§
     hi"  ã                  ó¨   — d Z ddlmZ ddlZddlZddlmZ ddlmZ ddl	m
Z
 ej        dk    rdd„ZnddlmZ  G d„ de
¦  «        Zdd„Zdd„ZdgZdS )zUnix.é    )ÚannotationsN)ÚConfigParser)ÚPathé   )ÚPlatformDirsABCÚwin32ÚreturnÚintc                 ó$   — d} t          | ¦  «        ‚)Nzshould only be used on Unix)ÚRuntimeError)Úmsgs    úWc:\xampp_lite_8_4\www\timesheet\venv\Lib\site-packages\pip/_vendor/platformdirs/unix.pyÚgetuidr      s   € Ø+ˆÝ˜3ÑÔÐó    )r   c                  óº  — e Zd Z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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dS )ÚUnixaŠ  
    On Unix/Linux, we follow the
    `XDG Basedir Spec <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_. The spec allows
    overriding directories with environment variables. The examples show 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	   Ústrc                óÒ   — t           j                             dd¦  «        }|                     ¦   «         st           j                             d¦  «        }|                      |¦  «        S )z–
        :return: data directory tied to the user, e.g. ``~/.local/share/$appname/$version`` or
         ``$XDG_DATA_HOME/$appname/$version``
        ÚXDG_DATA_HOMEÚ z~/.local/share©ÚosÚenvironÚgetÚstripÚpathÚ
expanduserÚ_append_app_name_and_version©Úselfr   s     r   Úuser_data_dirzUnix.user_data_dir"   sS   € õ Œz�~Š~˜o¨rÑ2Ô2ˆØ�zŠz‰|Œ|ð 	8Ý”7×%Ò%Ð&6Ñ7Ô7ˆDØ×0Ò0°Ñ6Ô6Ð6r   c                ó´   — t           j                             dd¦  «        }|                     ¦   «         sdt           j        › d�}|                      |¦  «        S )aY  
        :return: data directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>` is
         enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/usr/local/share/$appname/$version`` or ``/usr/share/$appname/$version``
        ÚXDG_DATA_DIRSr   z/usr/local/sharez
/usr/share)r   r   r   r   ÚpathsepÚ_with_multi_pathr   s     r   Úsite_data_dirzUnix.site_data_dir-   sO   € õ Œz�~Š~˜o¨rÑ2Ô2ˆØ�zŠz‰|Œ|ð 	=Ø<¥b¤jÐ<Ð<Ð<ˆDØ×$Ò$ TÑ*Ô*Ð*r   r   c                ó¾   ‡ — |                      t          j        ¦  «        }‰ j        s
|dd…         }ˆ fd„|D ¦   «         }t          j                             |¦  «        S )Nr   r   c                ót   •— g | ]4}‰                      t          j                             |¦  «        ¦  «        ‘Œ5S © )r   r   r   r   )Ú.0Úpr    s     €r   ú
<listcomp>z)Unix._with_multi_path.<locals>.<listcomp>>   s8   ø€ ÐaÐaÐaÐRS�T×6Ò6µr´w×7IÒ7IÈ!Ñ7LÔ7LÑMÔMÐaÐaÐar   )Úsplitr   r$   Ú	multipathÚjoin)r    r   Ú	path_lists   `  r   r%   zUnix._with_multi_path:   s[   ø€ Ø—J’J�rœzÑ*Ô*ˆ	ØŒ~ð 	'Ø! ! A #œˆIØaÐaÐaÐaÐW`ÐaÑaÔaˆ	ÝŒz�Š˜yÑ)Ô)Ð)r   c                óÒ   — t           j                             dd¦  «        }|                     ¦   «         st           j                             d¦  «        }|                      |¦  «        S )z•
        :return: config directory tied to the user, e.g. ``~/.config/$appname/$version`` or
         ``$XDG_CONFIG_HOME/$appname/$version``
        ÚXDG_CONFIG_HOMEr   z	~/.configr   r   s     r   Úuser_config_dirzUnix.user_config_dirA   sS   € õ Œz�~Š~Ð/°Ñ4Ô4ˆØ�zŠz‰|Œ|ð 	3Ý”7×%Ò% kÑ2Ô2ˆDØ×0Ò0°Ñ6Ô6Ð6r   c                ó˜   — t           j                             dd¦  «        }|                     ¦   «         sd}|                      |¦  «        S )a/  
        :return: config directories shared by users (if `multipath <platformdirs.api.PlatformDirsABC.multipath>`
         is enabled and ``XDG_DATA_DIR`` is set and a multi path the response is also a multi path separated by the OS
         path separator), e.g. ``/etc/xdg/$appname/$version``
        ÚXDG_CONFIG_DIRSr   z/etc/xdg)r   r   r   r   r%   r   s     r   Úsite_config_dirzUnix.site_config_dirL   sC   € õ Œz�~Š~Ð/°Ñ4Ô4ˆØ�zŠz‰|Œ|ð 	ØˆDØ×$Ò$ TÑ*Ô*Ð*r   c                óÒ   — t           j                             dd¦  «        }|                     ¦   «         st           j                             d¦  «        }|                      |¦  «        S )z”
        :return: cache directory tied to the user, e.g. ``~/.cache/$appname/$version`` or
         ``~/$XDG_CACHE_HOME/$appname/$version``
        ÚXDG_CACHE_HOMEr   z~/.cacher   r   s     r   Úuser_cache_dirzUnix.user_cache_dirY   sS   € õ Œz�~Š~Ð.°Ñ3Ô3ˆØ�zŠz‰|Œ|ð 	2Ý”7×%Ò% jÑ1Ô1ˆDØ×0Ò0°Ñ6Ô6Ð6r   c                ó,   — |                       d¦  «        S )zM:return: cache directory shared by users, e.g. ``/var/tmp/$appname/$version``z/var/tmp)r   ©r    s    r   Úsite_cache_dirzUnix.site_cache_dird   s   € ð ×0Ò0°Ñ<Ô<Ð<r   c                óÒ   — t           j                             dd¦  «        }|                     ¦   «         st           j                             d¦  «        }|                      |¦  «        S )z˜
        :return: state directory tied to the user, e.g. ``~/.local/state/$appname/$version`` or
         ``$XDG_STATE_HOME/$appname/$version``
        ÚXDG_STATE_HOMEr   z~/.local/stater   r   s     r   Úuser_state_dirzUnix.user_state_diri   sT   € õ Œz�~Š~Ð.°Ñ3Ô3ˆØ�zŠz‰|Œ|ð 	8Ý”7×%Ò%Ð&6Ñ7Ô7ˆDØ×0Ò0°Ñ6Ô6Ð6r   c                ób   — | j         }| j        r t          j                             |d¦  «        }|S )zg:return: log directory tied to the user, same as `user_state_dir` if not opinionated else ``log`` in itÚlog)r?   Úopinionr   r   r/   r   s     r   Úuser_log_dirzUnix.user_log_dirt   s0   € ð Ô"ˆØŒ<ð 	-Ý”7—<’<  eÑ,Ô,ˆDØˆr   c                ó"   — t          dd¦  «        S )zC:return: documents directory tied to the user, e.g. ``~/Documents``ÚXDG_DOCUMENTS_DIRz~/Documents©Ú_get_user_media_dirr;   s    r   Úuser_documents_dirzUnix.user_documents_dir|   s   € õ #Ð#6¸ÑFÔFÐFr   c                ó"   — t          dd¦  «        S )zC:return: downloads directory tied to the user, e.g. ``~/Downloads``ÚXDG_DOWNLOAD_DIRz~/DownloadsrF   r;   s    r   Úuser_downloads_dirzUnix.user_downloads_dir�   s   € õ #Ð#5°}ÑEÔEÐEr   c                ó"   — t          dd¦  «        S )zA:return: pictures directory tied to the user, e.g. ``~/Pictures``ÚXDG_PICTURES_DIRz
~/PicturesrF   r;   s    r   Úuser_pictures_dirzUnix.user_pictures_dir†   s   € õ #Ð#5°|ÑDÔDÐDr   c                ó"   — t          dd¦  «        S )z=:return: videos directory tied to the user, e.g. ``~/Videos``ÚXDG_VIDEOS_DIRz~/VideosrF   r;   s    r   Úuser_videos_dirzUnix.user_videos_dir‹   s   € õ #Ð#3°ZÑ@Ô@Ð@r   c                ó"   — t          dd¦  «        S )z;:return: music directory tied to the user, e.g. ``~/Music``ÚXDG_MUSIC_DIRz~/MusicrF   r;   s    r   Úuser_music_dirzUnix.user_music_dir�   s   € õ # ?°IÑ>Ô>Ð>r   c                ó|  — t           j                             dd¦  «        }|                     ¦   «         stt          j                             d¦  «        rDdt          ¦   «         › �}t          |¦  «         	                    ¦   «         sdt          ¦   «         › �}ndt          ¦   «         › �}|  
                    |¦  «        S )az  
        :return: runtime directory tied to the user, e.g. ``/run/user/$(id -u)/$appname/$version`` or
         ``$XDG_RUNTIME_DIR/$appname/$version``.

         For FreeBSD/OpenBSD/NetBSD, it would return ``/var/run/user/$(id -u)/$appname/$version`` if
         exists, otherwise ``/tmp/runtime-$(id -u)/$appname/$version``, if``$XDG_RUNTIME_DIR``
         is not set.
        ÚXDG_RUNTIME_DIRr   )ÚfreebsdÚopenbsdÚnetbsdz/var/run/user/z/tmp/runtime-z
/run/user/)r   r   r   r   ÚsysÚplatformÚ
startswithr   r   Úexistsr   r   s     r   Úuser_runtime_dirzUnix.user_runtime_dir•   s¥   € õ Œz�~Š~Ð/°Ñ4Ô4ˆØ�zŠz‰|Œ|ð 	/ÝŒ|×&Ò&Ð'GÑHÔHð /Ø2­©¬Ð2Ð2�Ý˜D‘z”z×(Ò(Ñ*Ô*ð 6Ø5­6©8¬8Ð5Ð5�Døà.¥F¡H¤HÐ.Ð.�Ø×0Ò0°Ñ6Ô6Ð6r   r   c                ó6   — |                       | j        ¦  «        S )zd:return: data path shared by users. Only return first item, even if ``multipath`` is set to ``True``)Ú _first_item_as_path_if_multipathr&   r;   s    r   Úsite_data_pathzUnix.site_data_path©   s   € ð ×4Ò4°TÔ5GÑHÔHÐHr   c                ó6   — |                       | j        ¦  «        S )zj:return: config path shared by the users. Only return first item, even if ``multipath`` is set to ``True``)r`   r6   r;   s    r   Úsite_config_pathzUnix.site_config_path®   s   € ð ×4Ò4°TÔ5IÑJÔJÐJr   c                ó6   — |                       | j        ¦  «        S )ze:return: cache path shared by users. Only return first item, even if ``multipath`` is set to ``True``)r`   r<   r;   s    r   Úsite_cache_pathzUnix.site_cache_path³   s   € ð ×4Ò4°TÔ5HÑIÔIÐIr   Ú	directoryc                óx   — | j         r%|                     t          j        ¦  «        d         }t	          |¦  «        S )Nr   )r.   r-   r   r$   r   )r    rf   s     r   r`   z%Unix._first_item_as_path_if_multipath¸   s0   € ØŒ>ð 	7à!Ÿš­¬
Ñ3Ô3°AÔ6ˆIÝ�I‰ŒÐr   N)r	   r   )r   r   r	   r   )r	   r   )rf   r   r	   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úpropertyr!   r&   r%   r3   r6   r9   r<   r?   rC   rH   rK   rN   rQ   rT   r^   ra   rc   re   r`   r)   r   r   r   r      s‚  € € € € € ð
ð 
ð ð7ð 7ð 7ñ „Xð7ð ð
+ð 
+ð 
+ñ „Xð
+ð*ð *ð *ð *ð ð7ð 7ð 7ñ „Xð7ð ð
+ð 
+ð 
+ñ „Xð
+ð ð7ð 7ð 7ñ „Xð7ð ð=ð =ð =ñ „Xð=ð ð7ð 7ð 7ñ „Xð7ð ðð ð ñ „Xðð ðGð Gð Gñ „XðGð ðFð Fð Fñ „XðFð ðEð Eð Eñ „XðEð ðAð Að Añ „XðAð ð?ð ?ð ?ñ „Xð?ð ð7ð 7ð 7ñ „Xð7ð& ðIð Ið Iñ „XðIð ðKð Kð Kñ „XðKð ðJð Jð Jñ „XðJðð ð ð ð ð r   r   Úenv_varr   Úfallback_tilde_pathc                óÎ   — t          | ¦  «        }|€St          j                             | d¦  «                             ¦   «         }|st          j                             |¦  «        }|S )Nr   )Ú_get_user_dirs_folderr   r   r   r   r   r   )rm   rn   Ú	media_dirs      r   rG   rG   ¿   s[   € Ý% gÑ.Ô.€IØÐÝ”J—N’N 7¨BÑ/Ô/×5Ò5Ñ7Ô7ˆ	Øð 	@Ýœ×*Ò*Ð+>Ñ?Ô?ˆIàÐr   Úkeyú
str | Nonec                óü  — t          t          ¦   «         j        ¦  «        dz  }|                     ¦   «         rÄt	          ¦   «         }|                     ¦   «         5 }|                     d|                     ¦   «         › �¦  «         ddd¦  «         n# 1 swxY w Y   | |d         vrdS |d         |                               d¦  «        }| 	                    dt          j                             d¦  «        ¦  «        S dS )zkReturn directory from user-dirs.dirs config file. See https://freedesktop.org/wiki/Software/xdg-user-dirs/.zuser-dirs.dirsz[top]
NÚtopú"z$HOMEú~)r   r   r3   r]   r   ÚopenÚread_stringÚreadr   Úreplacer   r   r   )rr   Úuser_dirs_config_pathÚparserÚstreamr   s        r   rp   rp   É   s  € å ¥¡¤Ô!7Ñ8Ô8Ð;KÑKÐØ×#Ò#Ñ%Ô%ð >Ý‘”ˆà"×'Ò'Ñ)Ô)ð 	:¨Và×ÒÐ8¨¯ª©¬Ð8Ð8Ñ9Ô9Ð9ð	:ð 	:ð 	:ñ 	:ô 	:ð 	:ð 	:ð 	:ð 	:ð 	:ð 	:øøøð 	:ð 	:ð 	:ð 	:ð �f˜U”mÐ#Ð#Ø�4à�eŒ}˜SÔ!×'Ò'¨Ñ,Ô,ˆà�|Š|˜G¥R¤W×%7Ò%7¸Ñ%<Ô%<Ñ=Ô=Ð=àˆ4s   Á+BÂBÂB)r	   r
   )rm   r   rn   r   r	   r   )rr   r   r	   rs   )rk   Ú
__future__r   r   rZ   Úconfigparserr   Úpathlibr   Úapir   r[   r   r   rG   rp   Ú__all__r)   r   r   ú<module>r„      s	  ðØ €Ø "Ð "Ð "Ð "Ð "Ð "à 	€	€	€	Ø 
€
€
€
Ø %Ð %Ð %Ð %Ð %Ð %Ø Ð Ð Ð Ð Ð à  Ð  Ð  Ð  Ð  Ð  à„<�7ÒÐð ð  ð  ð  ð  ð
 ÐÐÐÐÐðgð gð gð gð gˆ?ñ gô gð gðTð ð ð ðð ð ð ð* ð€€€r   