§
    —Çj,A  ã                  óŒ  — U d Z ddlmZ ddlZddlZddlZddlZddlZddlm	Z	 ddl
mZ ddlmZ ddlmZmZ dd	lmZmZmZ dd
lmZmZ ej        dk    rd+d„ZnddlmZ  G d„ de¦  «        Z G d„ dee¦  «        Z ej        dej        ¦  «        Zded<   d,d„Z d-d„Z!ddœd.d#„Z"d/d&„Z# e$¦   «         Z%d'ed(<   d)Z&ded*<   dgZ'dS )0zUnix.é    )ÚannotationsN)Úsuppress)ÚPath)Ú
gettempdir)ÚFinalÚNoReturné   )ÚXDGMixinÚ_expand_userÚ_xdg_dir)ÚPlatformDirsABCÚRuntimeDirWarningÚwin32Úreturnr   c                 ó$   — d} t          | ¦  «        ‚)Nzshould only be used on Unix)ÚRuntimeError)Úmsgs    úBC:\Projects\Historical\venv\Lib\site-packages\platformdirs/unix.pyÚgetuidr      s   € Ø+ˆÝ˜3ÑÔÐó    )r   c                  ó²  — e Zd ZdZed'd„¦   «         Zed(d„¦   «         Zed)d„¦   «         Zed(d	„¦   «         Zed)d
„¦   «         Z	ed(d„¦   «         Z
ed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zd*d„Zed(d„¦   «         Zed(d„¦   «         Zed(d„¦   «         Zed(d „¦   «         Zed(d!„¦   «         Zed)d"„¦   «         Zd(d#„Z d(d$„Z!ed(d%„¦   «         Z"d&S )+Ú_UnixDefaultszžDefault directories for Unix/Linux without XDG environment variable overrides.

    The XDG env var handling is in :class:`~platformdirs._xdg.XDGMixin`.

    r   Úboolc                ó4   — | j         ot          ¦   «         dk    S )Nr   )Úuse_site_for_rootr   ©Úselfs    r   Ú	_use_sitez_UnixDefaults._use_site#   s   € àÔ%Ð7­&©(¬(°aª-Ð7r   Ústrc                óJ   — |                       t          d¦  «        d¬¦  «        S )zsData directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or ``$XDG_DATA_HOME/$appname/$version``.ú~/.local/shareT©Úprivate©Ú_append_app_name_and_versionr   r   s    r   Úuser_data_dirz_UnixDefaults.user_data_dir'   ó'   € ð ×0Ò0µÐ>NÑ1OÔ1OÐY]Ð0Ñ^Ô^Ð^r   ú	list[str]c                óV   — |                       d¦  «        |                       d¦  «        gS )Nú/usr/local/shareú
/usr/share©Ú_join_app_name_and_versionr   s    r   Ú_site_data_dirsz_UnixDefaults._site_data_dirs,   s+   € à×/Ò/Ð0BÑCÔCÀT×EdÒEdÐeqÑErÔErÐsÐsr   c                óJ   — |                       t          d¦  «        d¬¦  «        S )zrConfig directory tied to the user, e.g. ``~/.config/$appname/$version`` or ``$XDG_CONFIG_HOME/$appname/$version``.ú	~/.configTr"   r$   r   s    r   Úuser_config_dirz_UnixDefaults.user_config_dir0   s&   € ð ×0Ò0µ¸kÑ1JÔ1JÐTXÐ0ÑYÔYÐYr   c                ó.   — |                       d¦  «        gS )Nz/etc/xdgr,   r   s    r   Ú_site_config_dirsz_UnixDefaults._site_config_dirs5   s   € à×/Ò/°
Ñ;Ô;Ð<Ð<r   c                óJ   — |                       t          d¦  «        d¬¦  «        S )zoCache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or ``$XDG_CACHE_HOME/$appname/$version``.z~/.cacheTr"   r$   r   s    r   Úuser_cache_dirz_UnixDefaults.user_cache_dir9   s&   € ð ×0Ò0µ¸jÑ1IÔ1IÐSWÐ0ÑXÔXÐXr   c                ó0   — |                       dd¬¦  «        S )zGCache directory shared by users, e.g. ``/var/cache/$appname/$version``.z
/var/cacheFr"   ©r%   r   s    r   Úsite_cache_dirz_UnixDefaults.site_cache_dir>   s   € ð ×0Ò0°ÀuÐ0ÑMÔMÐMr   c                óJ   — |                       t          d¦  «        d¬¦  «        S )zuState directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or ``$XDG_STATE_HOME/$appname/$version``.z~/.local/stateTr"   r$   r   s    r   Úuser_state_dirz_UnixDefaults.user_state_dirC   r'   r   c                ó0   — |                       dd¬¦  «        S )zEState directory shared by users, e.g. ``/var/lib/$appname/$version``.z/var/libFr"   r7   r   s    r   Úsite_state_dirz_UnixDefaults.site_state_dirH   s   € ð ×0Ò0°ÀUÐ0ÑKÔKÐKr   c                ó�   — | j         }| j        r7t          j                             |d¦  «        }|                      |d¬¦  «         |S )z_Log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in it.ÚlogTr"   )r:   ÚopinionÚosÚpathÚjoinÚ_optionally_create_directory©r   rA   s     r   Úuser_log_dirz_UnixDefaults.user_log_dirM   sJ   € ð Ô"ˆØŒ<ð 	BÝ”7—<’<  eÑ,Ô,ˆDØ×-Ò-¨d¸DÐ-ÑAÔAÐAØˆr   c                ó0   — |                       dd¬¦  «        S )z¹Log directory shared by users, e.g. ``/var/log/$appname/$version``.

        Unlike `user_log_dir`, ``opinion`` has no effect since ``/var/log`` is inherently a log directory.

        z/var/logFr"   r7   r   s    r   Úsite_log_dirz_UnixDefaults.site_log_dirV   s   € ð ×0Ò0°ÀUÐ0ÑKÔKÐKr   c                ó.   — |                       dd¦  «        S )z;Documents directory tied to the user, e.g. ``~/Documents``.ÚXDG_DOCUMENTS_DIRz~/Documents©Ú_user_media_dirr   s    r   Úuser_documents_dirz _UnixDefaults.user_documents_dir_   ó   € ð ×#Ò#Ð$7¸ÑGÔGÐGr   c                ó.   — |                       dd¦  «        S )z;Downloads directory tied to the user, e.g. ``~/Downloads``.ÚXDG_DOWNLOAD_DIRz~/DownloadsrJ   r   s    r   Úuser_downloads_dirz _UnixDefaults.user_downloads_dird   s   € ð ×#Ò#Ð$6¸ÑFÔFÐFr   c                ó.   — |                       dd¦  «        S )z9Pictures directory tied to the user, e.g. ``~/Pictures``.ÚXDG_PICTURES_DIRz
~/PicturesrJ   r   s    r   Úuser_pictures_dirz_UnixDefaults.user_pictures_diri   ó   € ð ×#Ò#Ð$6¸ÑEÔEÐEr   c                ó.   — |                       dd¦  «        S )z5Videos directory tied to the user, e.g. ``~/Videos``.ÚXDG_VIDEOS_DIRz~/VideosrJ   r   s    r   Úuser_videos_dirz_UnixDefaults.user_videos_dirn   s   € ð ×#Ò#Ð$4°jÑAÔAÐAr   c                ó.   — |                       dd¦  «        S )z3Music directory tied to the user, e.g. ``~/Music``.ÚXDG_MUSIC_DIRz~/MusicrJ   r   s    r   Úuser_music_dirz_UnixDefaults.user_music_dirs   s   € ð ×#Ò# O°YÑ?Ô?Ð?r   c                ó.   — |                       dd¦  «        S )z7Desktop directory tied to the user, e.g. ``~/Desktop``.ÚXDG_DESKTOP_DIRz	~/DesktoprJ   r   s    r   Úuser_desktop_dirz_UnixDefaults.user_desktop_dirx   s   € ð ×#Ò#Ð$5°{ÑCÔCÐCr   c                ó.   — |                       dd¦  «        S )z9Projects directory tied to the user, e.g. ``~/Projects``.ÚXDG_PROJECTS_DIRz
~/ProjectsrJ   r   s    r   Úuser_projects_dirz_UnixDefaults.user_projects_dir}   rT   r   c                ó.   — |                       dd¦  «        S )z;Public share directory tied to the user, e.g. ``~/Public``.ÚXDG_PUBLICSHARE_DIRz~/PublicrJ   r   s    r   Úuser_publicshare_dirz"_UnixDefaults.user_publicshare_dir‚   s   € ð ×#Ò#Ð$9¸:ÑFÔFÐFr   c                ó.   — |                       dd¦  «        S )z;Templates directory tied to the user, e.g. ``~/Templates``.ÚXDG_TEMPLATES_DIRz~/TemplatesrJ   r   s    r   Úuser_templates_dirz _UnixDefaults.user_templates_dir‡   rM   r   ÚkeyÚdefaultc                óp   — t          |¦  «        x}r|                      |¦  «         |S t          |¦  «        S )N)Ú_get_user_dirs_folderÚ"_optionally_create_media_directoryr   )r   rg   rh   rA   s       r   rK   z_UnixDefaults._user_media_dirŒ   s>   € Ý(¨Ñ-Ô-Ð-ˆ4ð 	Ø×3Ò3°DÑ9Ô9Ð9ØˆKÝ˜GÑ$Ô$Ð$r   c                ó&   — t          d¦  «        › d�S )z@Fonts directory tied to the user, e.g. ``~/.local/share/fonts``.r!   z/fonts©r   r   s    r   Úuser_fonts_dirz_UnixDefaults.user_fonts_dir’   s   € õ Ð/Ñ0Ô0Ð8Ð8Ð8Ð8r   c                ó   — | j         S )zCPreference directory tied to the user, same as ``user_config_dir``.)r1   r   s    r   Úuser_preference_dirz!_UnixDefaults.user_preference_dir—   s   € ð Ô#Ð#r   c                ó    — t          d¦  «        S )z6Bin directory tied to the user, e.g. ``~/.local/bin``.z~/.local/binrm   r   s    r   Úuser_bin_dirz_UnixDefaults.user_bin_dirœ   s   € õ ˜NÑ+Ô+Ð+r   c                ó   — dS )z7Bin directory shared by users, e.g. ``/usr/local/bin``.z/usr/local/bin© r   s    r   Úsite_bin_dirz_UnixDefaults.site_bin_dir¡   s
   € ð  Ðr   c                ó>   — t          d¦  «        › t          j        › d�S )zNApplications directory tied to the user, e.g. ``~/.local/share/applications``.r!   Úapplications)r   r@   Úsepr   s    r   Úuser_applications_dirz#_UnixDefaults.user_applications_dir¦   s#   € õ Ð/Ñ0Ô0ÐFµ"´&ÐFÐFÐFÐFr   c                ó   — d„ dD ¦   «         S )Nc                óN   — g | ]"}t           j                             |d ¦  «        ‘Œ#S )rw   )r@   rA   rB   )Ú.0Úps     r   ú
<listcomp>z9_UnixDefaults._site_applications_dirs.<locals>.<listcomp>­   s(   € Ð\Ð\Ð\°A•”—’˜Q Ñ/Ô/Ð\Ð\Ð\r   )r*   r+   rt   r   s    r   Ú_site_applications_dirsz%_UnixDefaults._site_applications_dirs«   s   € à\Ð\Ð9[Ð\Ñ\Ô\Ð\r   c                óp  — t           j                             d¦  «        rdt          ¦   «         › �}nBt           j                             d¦  «        rdt          ¦   «         › �}ndt          ¦   «         › �}t          j                             |¦  «        rt          |¦  «        s|n|                      ¦   «         S )NÚopenbsdz/tmp/run/user/)ÚfreebsdÚnetbsdz/var/run/user/z
/run/user/)	ÚsysÚplatformÚ
startswithr   r@   rA   ÚlexistsÚ_runtime_dir_problemÚ_temp_runtime_dirrD   s     r   Ú_default_runtime_dirz"_UnixDefaults._default_runtime_dir¯   s¢   € ÝŒ<×"Ò" 9Ñ-Ô-ð 	+Ø.¥F¡H¤HÐ.Ð.ˆDˆDÝŒ\×$Ò$Ð%:Ñ;Ô;ð 	+Ø.¥F¡H¤HÐ.Ð.ˆDˆDà*¥¡¤Ð*Ð*ˆDÝ”w—’ tÑ,Ô,ÐmÕ5IÈ$Ñ5OÔ5OÐmˆtˆtÐUY×UkÒUkÑUmÔUmÐmr   c                óv  — t          ¦   «         › dt          ¦   «         › �}t          t          ¦  «        5  |                      |d¬¦  «         d d d ¦  «         n# 1 swxY w Y   t          |d¬¦  «        x}rd|› d�}t          |¦  «        ‚| j        r't          |¦  «         	                    t          ¦  «         |S )Nz	/runtime-Tr"   F©Ú
check_modezruntime directory z; set XDG_RUNTIME_DIR instead)r   r   r   ÚFileExistsErrorrC   rˆ   ÚPermissionErrorÚensure_existsr   ÚchmodÚ_RUNTIME_DIR_MODE)r   rA   Úproblemr   s       r   r‰   z_UnixDefaults._temp_runtime_dir¸   s  € å‘,”,Ð3Ð3­©¬Ð3Ð3ˆÝ•oÑ&Ô&ð 	Bð 	BØ×-Ò-¨d¸DÐ-ÑAÔAÐAð	Bð 	Bð 	Bñ 	Bô 	Bð 	Bð 	Bð 	Bð 	Bð 	Bð 	Bøøøð 	Bð 	Bð 	Bð 	Bå*¨4¸EÐBÑBÔBÐBˆ7ð 	'ØM wÐMÐMÐMˆCÝ! #Ñ&Ô&Ð&àÔð 	0Ý�‰JŒJ×ÒÕ.Ñ/Ô/Ð/Øˆs   ´AÁAÁAc                óx   — t           j                             d¦  «        rd}nd}|                      |d¬¦  «        S )aT  Runtime directory shared by users, e.g. ``/run/$appname/$version`` or ``$XDG_RUNTIME_DIR/$appname/$version``.

        Note that this behaves almost exactly like `user_runtime_dir` if ``$XDG_RUNTIME_DIR`` is set, but will fall back
        to paths associated to the root user instead of a regular logged-in user if it's not set.

        If you wish to ensure that a logged-in root user path is returned e.g. ``/run/user/0``, use `user_runtime_dir`
        instead.

        For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/$appname/$version`` if ``$XDG_RUNTIME_DIR`` is not set.

        )r‚   r�   rƒ   z/var/runz/runFr"   )r„   r…   r†   r%   rD   s     r   Úsite_runtime_dirz_UnixDefaults.site_runtime_dirÅ   sB   € õ Œ<×"Ò"Ð#CÑDÔDð 	ØˆDˆDàˆDØ×0Ò0°¸uÐ0ÑEÔEÐEr   N)r   r   ©r   r   )r   r(   )rg   r   rh   r   r   r   )#Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr   r&   r.   r1   r3   r5   r8   r:   r<   rE   rG   rL   rP   rS   rW   rZ   r]   r`   rc   rf   rK   rn   rp   rr   ru   ry   r   rŠ   r‰   r•   rt   r   r   r   r      s  € € € € € ðð ð ð8ð 8ð 8ñ „Xð8ð ð_ð _ð _ñ „Xð_ð ðtð tð tñ „Xðtð ðZð Zð Zñ „XðZð ð=ð =ð =ñ „Xð=ð ðYð Yð Yñ „XðYð ðNð Nð Nñ „XðNð ð_ð _ð _ñ „Xð_ð ðLð Lð Lñ „XðLð ðð ð ñ „Xðð ðLð Lð Lñ „XðLð ðHð Hð Hñ „XðHð ðGð Gð Gñ „XðGð ðFð Fð Fñ „XðFð ðBð Bð Bñ „XðBð ð@ð @ð @ñ „Xð@ð ðDð Dð Dñ „XðDð ðFð Fð Fñ „XðFð ðGð Gð Gñ „XðGð ðHð Hð Hñ „XðHð%ð %ð %ð %ð ð9ð 9ð 9ñ „Xð9ð ð$ð $ð $ñ „Xð$ð ð,ð ,ð ,ñ „Xð,ð ð ð  ð  ñ „Xð ð ðGð Gð Gñ „XðGð ð]ð ]ð ]ñ „Xð]ðnð nð nð nðð ð ð ð ðFð Fð Fñ „XðFð Fð Fr   r   c                  óh  ‡ — e Zd ZdZedˆ fd„¦   «         Zedˆ fd„¦   «         Zedˆ fd„¦   «         Zedˆ fd„¦   «         Zedˆ fd„¦   «         Z	edˆ fd	„¦   «         Z
edˆ fd
„¦   «         Zedˆ fd„¦   «         Zedˆ fd„¦   «         Zedˆ fd„¦   «         Zedˆ fd„¦   «         Zedˆ fd„¦   «         Zˆ xZS )ÚUnixaf  On Unix/Linux, we follow the `XDG Basedir Spec <https://specifications.freedesktop.org/basedir/latest/>`_.

    The spec allows overriding directories with environment variables. The examples shown are the default values,
    alongside the name of the environment variable that overrides them. Makes use of the `appname
    <platformdirs.api.PlatformDirsABC.appname>`, `version <platformdirs.api.PlatformDirsABC.version>`, `multipath
    <platformdirs.api.PlatformDirsABC.multipath>`, `opinion <platformdirs.api.PlatformDirsABC.opinion>`, `ensure_exists
    <platformdirs.api.PlatformDirsABC.ensure_exists>`.

    r   r   c                óF   •— | j         r| j        nt          ¦   «         j        S )zYData directory tied to the user, or site equivalent when root with ``use_site_for_root``.)r   Úsite_data_dirÚsuperr&   ©r   Ú	__class__s    €r   r&   zUnix.user_data_dirä   s!   ø€ ð &*¤^ÐNˆtÔ!Ð!½¹¼Ô9NÐNr   c                óF   •— | j         r| j        nt          ¦   «         j        S )z[Config directory tied to the user, or site equivalent when root with ``use_site_for_root``.)r   Úsite_config_dirr    r1   r¡   s    €r   r1   zUnix.user_config_diré   s!   ø€ ð (,¤~ÐRˆtÔ#Ð#½5¹7¼7Ô;RÐRr   c                óF   •— | j         r| j        nt          ¦   «         j        S )zZCache directory tied to the user, or site equivalent when root with ``use_site_for_root``.)r   r8   r    r5   r¡   s    €r   r5   zUnix.user_cache_dirî   ó!   ø€ ð '+¤nÐPˆtÔ"Ð"½%¹'¼'Ô:PÐPr   c                óF   •— | j         r| j        nt          ¦   «         j        S )zZState directory tied to the user, or site equivalent when root with ``use_site_for_root``.)r   r<   r    r:   r¡   s    €r   r:   zUnix.user_state_diró   r¦   r   c                óF   •— | j         r| j        nt          ¦   «         j        S )zXLog directory tied to the user, or site equivalent when root with ``use_site_for_root``.)r   rG   r    rE   r¡   s    €r   rE   zUnix.user_log_dirø   ó!   ø€ ð %)¤NÐLˆtÔ Ð ½¹¼Ô8LÐLr   c                óF   •— | j         r| j        nt          ¦   «         j        S )zaApplications directory tied to the user, or site equivalent when root with ``use_site_for_root``.)r   Úsite_applications_dirr    ry   r¡   s    €r   ry   zUnix.user_applications_dirý   s!   ø€ ð .2¬^Ð^ˆtÔ)Ð)ÅÁÄÔA^Ð^r   c                óÌ  •— | j         rt          t          | ¦  «        j        S t	          d¦  «        x}sd}npt          t          ¦  «        5  |                      |d¬¦  «         ddd¦  «         n# 1 swxY w Y   t          |¦  «        x}s|  	                    |d¬¦  «        S d|› �}t          |› d|                      ¦   «         x}› �¦  «         |  	                    |d¬¦  «        S )aN  Runtime directory tied to the user, e.g. ``$XDG_RUNTIME_DIR/$appname/$version``.

        Accepts ``$XDG_RUNTIME_DIR`` only as a directory, not a symlink, that the user owns with mode ``0700``, as the
        XDG spec requires, and creates a missing one that way under ``ensure_exists``. When the variable is unset or
        fails that check, emits one :class:`~platformdirs.RuntimeDirWarning` per cause and falls back to the platform
        default (``/tmp/run/user/<uid>`` on OpenBSD, ``/var/run/user/<uid>`` on FreeBSD/NetBSD, ``/run/user/<uid>``
        elsewhere) if it passes the same check, else to ``runtime-<uid>`` in the temporary directory. Root with
        ``use_site_for_root`` gets the site equivalent.

        :raises PermissionError: if the temporary fallback is a symlink, not a directory, or owned by another user.

        ÚXDG_RUNTIME_DIRzXDG_RUNTIME_DIR is not setTr"   NzXDG_RUNTIME_DIR z, falling back to )r   r    r
   r•   r   r   ÚOSErrorrC   rˆ   r%   Ú
_warn_oncerŠ   )r   rA   Úreasonr“   Úfallbackr¢   s        €r   Úuser_runtime_dirzUnix.user_runtime_dir  sN  ø€ ð Œ>ð 	:å� 4Ñ(Ô(Ô9Ð9Ý Ð!2Ñ3Ô3Ð3�ð 	2Ø1ˆFˆFå�'Ñ"Ô"ð Fð FØ×1Ò1°$ÀÐ1ÑEÔEÐEðFð Fð Fñ Fô Fð Fð Fð Fð Fð Fð Føøøð Fð Fð Fð Få3°DÑ9Ô9Ð9�Gð MØ×8Ò8¸ÀtÐ8ÑLÔLÐLØ1¨Ð1Ð1ˆFÝ�fÐ[Ð[¸T×=VÒ=VÑ=XÔ=XÐ1X°Ð[Ð[Ñ\Ô\Ð\Ø×0Ò0°À4Ð0ÑHÔHÐHs   ÁA/Á/A3Á6A3c                óF   •— | j         r| j        nt          ¦   «         j        S )zXBin directory tied to the user, or site equivalent when root with ``use_site_for_root``.)r   ru   r    rr   r¡   s    €r   rr   zUnix.user_bin_dir  r©   r   r   c                óF   •— | j         r| j        nt          ¦   «         j        S )zYData path tied to the user, or the first site entry when root with ``use_site_for_root``.)r   Úsite_data_pathr    Úuser_data_pathr¡   s    €r   r¶   zUnix.user_data_path#  r¦   r   c                óF   •— | j         r| j        nt          ¦   «         j        S )z[Config path tied to the user, or the first site entry when root with ``use_site_for_root``.)r   Úsite_config_pathr    Úuser_config_pathr¡   s    €r   r¹   zUnix.user_config_path(  s!   ø€ ð )-¬ÐTˆtÔ$Ð$½E¹G¼GÔ<TÐTr   c                óF   •— | j         r| j        nt          ¦   «         j        S )zfPreference path tied to the user, or the first site config entry when root with ``use_site_for_root``.)r   r¸   r    Úuser_preference_pathr¡   s    €r   r»   zUnix.user_preference_path-  s!   ø€ ð )-¬ÐXˆtÔ$Ð$½E¹G¼GÔ<XÐXr   c                óF   •— | j         r| j        nt          ¦   «         j        S )zaApplications path tied to the user, or the first site entry when root with ``use_site_for_root``.)r   Úsite_applications_pathr    Úuser_applications_pathr¡   s    €r   r¾   zUnix.user_applications_path2  s!   ø€ ð /3¬nÐ`ˆtÔ*Ð*Å%Á'Ä'ÔB`Ð`r   r–   )r   r   )r—   r˜   r™   rš   r›   r&   r1   r5   r:   rE   ry   r²   rr   r¶   r¹   r»   r¾   Ú__classcell__)r¢   s   @r   r�   r�   Ù   sm  ø€ € € € € ðð ð ðOð Oð Oð Oð Oñ „XðOð ðSð Sð Sð Sð Sñ „XðSð ðQð Qð Qð Qð Qñ „XðQð ðQð Qð Qð Qð Qñ „XðQð ðMð Mð Mð Mð Mñ „XðMð ð_ð _ð _ð _ð _ñ „Xð_ð ðIð Ið Ið Ið Iñ „XðIð6 ðMð Mð Mð Mð Mñ „XðMð ðQð Qð Qð Qð Qñ „XðQð ðUð Uð Uð Uð Uñ „XðUð ðYð Yð Yð Yð Yñ „XðYð ðað að að að añ „Xðað að að að ar   r�   aˆ  
    [ \t]*(?P<key>\w+)[ \t]*=[ \t]*  # KEY=, blanks allowed around the key and after the =
    (?:
        "(?P<quoted>(?:[^"\\]|\\.)*)"  # a double-quoted value with backslash escapes, text after it ignored
        |(?P<bare>[^"\s].*?)          # or an unquoted value, up to
        (?:[ \t]+\#.*|[ \t]*)$         # a comment, which sh starts at a word-initial #, or the line end
    )
    r   Ú_USER_DIRS_LINErg   r   ú
str | Nonec                ó”  — t          d¦  «        pt          d¦  «        }t          |¦  «        dz  }|                     ¦   «         sdS d}|                     t          j        ¦   «         d¬¦  «        5 }|D ];}t                               |¦  «        x}r|d         | k    rt          |¦  «        p|}Œ<	 ddd¦  «         n# 1 swxY w Y   |S )a  Return directory from user-dirs.dirs config file.

    ``xdg-user-dirs-update`` writes shell assignments, so match each line like ``xdg-user-dir`` does and keep the last
    valid assignment to ``key``.

    See https://freedesktop.org/wiki/Software/xdg-user-dirs/.

    ÚXDG_CONFIG_HOMEr0   zuser-dirs.dirsNÚsurrogateescape)ÚencodingÚerrorsrg   )
r   r   r   ÚexistsÚopenr„   ÚgetfilesystemencodingrÀ   ÚmatchÚ_resolve_user_dirs_value)rg   Úconfig_homeÚuser_dirs_config_pathÚfolderÚstreamÚlineÚentrys          r   rj   rj   E  s2  € õ Ð,Ñ-Ô-ÐJµ¸kÑ1JÔ1J€KÝ  Ñ-Ô-Ð0@Ñ@ÐØ ×'Ò'Ñ)Ô)ð ØˆtØ€Fà	×	#Ò	#­SÔ-FÑ-HÔ-HÐQbÐ	#Ñ	cÔ	cð CÐgmØð 	Cð 	CˆDÝ(×.Ò.¨tÑ4Ô4Ð4�ð C¸%À¼,È#Ò:MÐ:MÝ1°%Ñ8Ô8ÐB¸F�øð	CðCð Cð Cñ Cô Cð Cð Cð Cð Cð Cð Cøøøð Cð Cð Cð Cð €Ms   Á1?B=Â=CÃCrÑ   úre.Match[str]c                ó,  — | d         €| d         n| d         }|dk    s|                      d¦  «        r%t          d¦  «        |                     d¦  «        }}n|                      d¦  «        rd}nd S | d         �t          j        dd	|¦  «        }||z   S )
NÚquotedÚbarez$HOMEz$HOME/ú~ú/Ú z\\(.)z\1)r†   r   ÚremoveprefixÚreÚsub)rÑ   ÚvalueÚprefixs      r   rË   rË   [  s¤   € Ø" 8œ_Ð4ˆE�&ŒMˆM¸%À¼/€EØ�ÒÐ˜5×+Ò+¨HÑ5Ô5ÐÝ$ SÑ)Ô)¨5×+=Ò+=¸gÑ+FÔ+F�ˆˆØ	×	Ò	˜#Ñ	Ô	ð ØˆˆàˆtØˆX„Ð"å”�x ¨Ñ.Ô.ˆØ�E‰>Ðr   TrŒ   rA   r�   r   c          	     óÈ  ‡ — 	 t          j        ‰ ¦  «        }n/# t          $ r Y dS t          $ r}‰ › d|j        › �cY d}~S d}~ww xY w|j        dz  }t          j        |j        ¦  «        dft          j        |j        ¦  «         df|j	        t          ¦   «         x}k    d|j	        › d|› �f|o
|t          k    d|d	›dt          d	›�ff}t          ˆ fd
„|D ¦   «         d¦  «        S )zlReturn why ``path`` fails the checks of Qt's ``checkXdgRuntimeDir``, or ``None`` if it passes or is missing.Nz cannot be checked: iÿ  zis a symlinkzis not a directoryzis owned by uid z, not z	has mode Ú04oc              3  ó0   •K  — | ]\  }}|¯‰› d |› �V — ŒdS )ú Nrt   )r|   Úfailedr“   rA   s      €r   ú	<genexpr>z'_runtime_dir_problem.<locals>.<genexpr>x  s:   øè è € ÐMÐM©¨°ÀfÐM�DÐ$Ð$˜7Ð$Ð$ÐMÐMÐMÐMÐMÐMr   )r@   ÚlstatÚFileNotFoundErrorr®   ÚstrerrorÚst_modeÚstatÚS_ISLNKÚS_ISDIRÚst_uidr   r’   Únext)rA   r�   ÚinfoÚerrorÚmodeÚuidÚcheckss   `      r   rˆ   rˆ   i  s0  ø€ ð=ÝŒx˜‰~Œ~ˆˆøÝð ð ð ØˆtˆtÝð =ð =ð =ØÐ<Ð<¨E¬NÐ<Ð<Ð<Ð<Ð<Ð<Ð<Ð<øøøøð=øøøàŒ<˜%Ñ€Då	Œ�d”lÑ	#Ô	# ^Ð4ÝŒ\˜$œ,Ñ'Ô'Ð	'Ð)=Ð>Ø	Œ¥¡¤˜˜Ò	)Ð+V¸d¼kÐ+VÐ+VÐQTÐ+VÐ+VÐWØ	Ð	1˜Õ 1Ò1Ð3f¸tÐ3fÐ3fÐ3fÕO`Ð3fÐ3fÐ3fÐgð	€Fõ ÐMÐMÐMÐM¸FÐMÑMÔMÈtÑTÔTÐTs   ƒ ˜
A¥	A®?¹A¿AÚmessageÚNonec                óˆ   — | t           vr8t                                | ¦  «         t          j        | t          d¬¦  «         d S d S )Né   )Ú
stacklevel)Ú_WARNEDÚaddÚwarningsÚwarnr   )rò   s    r   r¯   r¯   {  sE   € à•gÐÐÝ�Š�GÑÔÐÝŒ�gÕ0¸QÐ?Ñ?Ô?Ð?Ð?Ð?ð Ðr   zFinal[set[str]]r÷   iÀ  r’   )r   r   )rg   r   r   rÁ   )rÑ   rÒ   r   rÁ   )rA   r   r�   r   r   rÁ   )rò   r   r   ró   )(rš   Ú
__future__r   r@   rÚ   rè   r„   rù   Ú
contextlibr   Úpathlibr   Útempfiler   Útypingr   r   Ú_xdgr
   r   r   Úapir   r   r…   r   r   r�   ÚcompileÚVERBOSErÀ   Ú__annotations__rj   rË   rˆ   r¯   Úsetr÷   r’   Ú__all__rt   r   r   ú<module>r     sZ  ðØ €€à "Ð "Ð "Ð "Ð "Ð "à 	€	€	€	Ø 	€	€	€	Ø €€€Ø 
€
€
€
Ø €€€Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø "Ð "Ð "Ð "Ð "Ð "Ð "Ð "à 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3Ð 3à„<�7ÒÐð ð  ð  ð  ð  ð
 ÐÐÐÐÐðzFð zFð zFð zFð zF�Oñ zFô zFð zFðz\að \að \að \að \aˆ8�]ñ \aô \að \að~ $˜œðð „Jñ
ô 
€ð 
ð 
ð 
ñ 
ðð ð ð ð,ð ð ð ð ;?ð Uð Uð Uð Uð Uð Uð$@ð @ð @ð @ð ˜3™5œ5€Ð  Ð  Ð  Ñ  Ø Ð Ð  Ð  Ð  Ñ  ð ð€€€r   