§
    %P„j°&  ã                  óª   — d Z ddlmZ ddlZddlZddlmZ erddlm	Z	 ddl
mZ ddlmZ erdd	lmZ  G d
„ de¦  «        Z G d„ dee¦  «        ZdgZdS )zmacOS.é    )ÚannotationsN)ÚTYPE_CHECKING)ÚIteratoré   )ÚXDGMixin)ÚPlatformDirsABC)ÚPathc                  ó:  — e Zd ZdZ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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&d0d)„Z'd0d*„Z(d0d+„Z)d,S )1Ú_MacOSDefaultsaˆ  Default platform directories for macOS without XDG environment variable overrides.

    Follows the guidance from `Apple's File System Programming Guide
    <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
    The XDG env var handling is in :class:`~platformdirs._xdg.XDGMixin`.

    ÚreturnÚstrc                óf   — |                       t          j                             d¦  «        ¦  «        S )Nz~/Library/Application Support©Ú_append_app_name_and_versionÚosÚpathÚ
expanduser©Úselfs    úW/root/disk_3tb/conda_envs/Huy-visual/lib/python3.11/site-packages/platformdirs/macos.pyÚ_base_user_app_support_dirz)_MacOSDefaults._base_user_app_support_dir   s'   € Ø×0Ò0µ´×1CÒ1CÐDcÑ1dÔ1dÑeÔeÐeó    ú	list[str]c                óþ   — dt           j        v }|r%t           j                             d¦  «        d         nd}|r|                      |› d�¦  «        gng }|                     |                      d¦  «        ¦  «         |S )Nú/opt/pythonr   Ú z/sharez/Library/Application Support©ÚsysÚprefixÚsplitr   Úappend©r   Úis_homebrewÚhomebrew_prefixÚ	path_lists       r   Ú_base_site_dirsz_MacOSDefaults._base_site_dirs   s†   € Ø#¥s¤zÐ1ˆØ@KÐS�#œ*×*Ò*¨=Ñ9Ô9¸!Ô<Ð<ÐQSˆØWbÐj�T×6Ò6¸/Ð7QÐ7QÐ7QÑRÔRÐSÐSÐhjˆ	Ø×Ò˜×:Ò:Ð;YÑZÔZÑ[Ô[Ð[ØÐr   c                ó*   — |                       ¦   «         S )zZData directory tied to the user, e.g. ``~/Library/Application Support/$appname/$version``.©r   r   s    r   Úuser_data_dirz_MacOSDefaults.user_data_dir&   ó   € ð ×.Ò.Ñ0Ô0Ð0r   c                ó*   — |                       ¦   «         S ©N©r&   r   s    r   Ú_site_data_dirsz_MacOSDefaults._site_data_dirs+   ó   € à×#Ò#Ñ%Ô%Ð%r   r	   c                ó6   — |                       | j        ¦  «        S )z`Data path shared by users. Only return the first item, even if ``multipath`` is set to ``True``.)Ú _first_item_as_path_if_multipathÚsite_data_dirr   s    r   Úsite_data_pathz_MacOSDefaults.site_data_path/   s   € ð ×4Ò4°TÔ5GÑHÔHÐHr   c                ó6   — |                       | j        ¦  «        S )zbConfig path shared by users. Only return the first item, even if ``multipath`` is set to ``True``.)r1   Úsite_config_dirr   s    r   Úsite_config_pathz_MacOSDefaults.site_config_path4   s   € ð ×4Ò4°TÔ5IÑJÔJÐJr   c                ó*   — |                       ¦   «         S )z;Config directory tied to the user, same as `user_data_dir`.r(   r   s    r   Úuser_config_dirz_MacOSDefaults.user_config_dir9   r*   r   c                ó*   — |                       ¦   «         S r,   r-   r   s    r   Ú_site_config_dirsz _MacOSDefaults._site_config_dirs>   r/   r   c                óf   — |                       t          j                             d¦  «        ¦  «        S )zNCache directory tied to the user, e.g. ``~/Library/Caches/$appname/$version``.z~/Library/Cachesr   r   s    r   Úuser_cache_dirz_MacOSDefaults.user_cache_dirB   s)   € ð ×0Ò0µ´×1CÒ1CÐDVÑ1WÔ1WÑXÔXÐXr   c                óþ   — dt           j        v }|r%t           j                             d¦  «        d         nd}|r|                      |› d�¦  «        gng }|                     |                      d¦  «        ¦  «         |S )Nr   r   r   z
/var/cachez/Library/Cachesr   r"   s       r   Ú_site_cache_dirsz_MacOSDefaults._site_cache_dirsG   s†   € à#¥s¤zÐ1ˆØ@KÐS�#œ*×*Ò*¨=Ñ9Ô9¸!Ô<Ð<ÐQSˆØ[fÐn�T×6Ò6¸/Ð7UÐ7UÐ7UÑVÔVÐWÐWÐlnˆ	Ø×Ò˜×:Ò:Ð;LÑMÔMÑNÔNÐNØÐr   c                ól   — | j         }| j        rt          j                             |¦  «        n|d         S )aë  Cache directory shared by users, e.g. ``/Library/Caches/$appname/$version``. If we're using a Python binary managed by `Homebrew <https://brew.sh>`_, the directory will be under the Homebrew prefix, e.g. ``$homebrew_prefix/var/cache/$appname/$version``. If `multipath <platformdirs.api.PlatformDirsABC.multipath>` is enabled, and we're in Homebrew, the response is a multi-path string separated by ":", e.g. ``$homebrew_prefix/var/cache/$appname/$version:/Library/Caches/$appname/$version``.r   )r>   Ú	multipathr   ÚpathsepÚjoin©r   Údirss     r   Úsite_cache_dirz_MacOSDefaults.site_cache_dirO   s0   € ð Ô$ˆØ(,¬ÐC�rŒz�Š˜tÑ$Ô$Ð$¸DÀ¼GÐCr   c                ó6   — |                       | j        ¦  «        S )zaCache path shared by users. Only return the first item, even if ``multipath`` is set to ``True``.)r1   rE   r   s    r   Úsite_cache_pathz_MacOSDefaults.site_cache_pathU   s   € ð ×4Ò4°TÔ5HÑIÔIÐIr   c                ó*   — |                       ¦   «         S )z:State directory tied to the user, same as `user_data_dir`.r(   r   s    r   Úuser_state_dirz_MacOSDefaults.user_state_dirZ   r*   r   c                ó6   — |                       ¦   «         d         S )z9State directory shared by users, same as `site_data_dir`.r   r-   r   s    r   Úsite_state_dirz_MacOSDefaults.site_state_dir_   s   € ð ×#Ò#Ñ%Ô% aÔ(Ð(r   c                óf   — |                       t          j                             d¦  «        ¦  «        S )zJLog directory tied to the user, e.g. ``~/Library/Logs/$appname/$version``.z~/Library/Logsr   r   s    r   Úuser_log_dirz_MacOSDefaults.user_log_dird   s)   € ð ×0Ò0µ´×1CÒ1CÐDTÑ1UÔ1UÑVÔVÐVr   c                ó,   — |                       d¦  «        S )zHLog directory shared by users, e.g. ``/Library/Logs/$appname/$version``.z/Library/Logs)r   r   s    r   Úsite_log_dirz_MacOSDefaults.site_log_diri   s   € ð ×0Ò0°ÑAÔAÐAr   c                ó@   — t           j                             d¦  «        S )z;Documents directory tied to the user, e.g. ``~/Documents``.z~/Documents©r   r   r   r   s    r   Úuser_documents_dirz!_MacOSDefaults.user_documents_dirn   ó   € õ Œw×!Ò! -Ñ0Ô0Ð0r   c                ó@   — t           j                             d¦  «        S )z;Downloads directory tied to the user, e.g. ``~/Downloads``.z~/DownloadsrQ   r   s    r   Úuser_downloads_dirz!_MacOSDefaults.user_downloads_dirs   rS   r   c                ó@   — t           j                             d¦  «        S )z9Pictures directory tied to the user, e.g. ``~/Pictures``.z
~/PicturesrQ   r   s    r   Úuser_pictures_dirz _MacOSDefaults.user_pictures_dirx   ó   € õ Œw×!Ò! ,Ñ/Ô/Ð/r   c                ó@   — t           j                             d¦  «        S )z5Videos directory tied to the user, e.g. ``~/Movies``.z~/MoviesrQ   r   s    r   Úuser_videos_dirz_MacOSDefaults.user_videos_dir}   ó   € õ Œw×!Ò! *Ñ-Ô-Ð-r   c                ó@   — t           j                             d¦  «        S )z3Music directory tied to the user, e.g. ``~/Music``.z~/MusicrQ   r   s    r   Úuser_music_dirz_MacOSDefaults.user_music_dir‚   s   € õ Œw×!Ò! )Ñ,Ô,Ð,r   c                ó@   — t           j                             d¦  «        S )z7Desktop directory tied to the user, e.g. ``~/Desktop``.z	~/DesktoprQ   r   s    r   Úuser_desktop_dirz_MacOSDefaults.user_desktop_dir‡   s   € õ Œw×!Ò! +Ñ.Ô.Ð.r   c                ó@   — t           j                             d¦  «        S )z9Projects directory tied to the user, e.g. ``~/Projects``.z
~/ProjectsrQ   r   s    r   Úuser_projects_dirz _MacOSDefaults.user_projects_dirŒ   rX   r   c                ó@   — t           j                             d¦  «        S )z;Public share directory tied to the user, e.g. ``~/Public``.z~/PublicrQ   r   s    r   Úuser_publicshare_dirz#_MacOSDefaults.user_publicshare_dir‘   r[   r   c                ó@   — t           j                             d¦  «        S )z;Templates directory tied to the user, e.g. ``~/Templates``.z~/TemplatesrQ   r   s    r   Úuser_templates_dirz!_MacOSDefaults.user_templates_dir–   rS   r   c                ó@   — t           j                             d¦  «        S )z;Fonts directory tied to the user, e.g. ``~/Library/Fonts``.z~/Library/FontsrQ   r   s    r   Úuser_fonts_dirz_MacOSDefaults.user_fonts_dir›   s   € õ Œw×!Ò!Ð"3Ñ4Ô4Ð4r   c                óf   — |                       t          j                             d¦  «        ¦  «        S )zNPreference directory tied to the user, e.g. ``~/Library/Preferences/AppName``.z~/Library/Preferencesr   r   s    r   Úuser_preference_dirz"_MacOSDefaults.user_preference_dir    s)   € ð ×0Ò0µ´×1CÒ1CÐD[Ñ1\Ô1\Ñ]Ô]Ð]r   c                ó@   — t           j                             d¦  «        S )z6Bin directory tied to the user, e.g. ``~/.local/bin``.z~/.local/binrQ   r   s    r   Úuser_bin_dirz_MacOSDefaults.user_bin_dir¥   s   € õ Œw×!Ò! .Ñ1Ô1Ð1r   c                ó   — dS )z7Bin directory shared by users, e.g. ``/usr/local/bin``.z/usr/local/bin© r   s    r   Úsite_bin_dirz_MacOSDefaults.site_bin_dirª   s
   € ð  Ðr   c                ó@   — t           j                             d¦  «        S )zAApplications directory tied to the user, e.g. ``~/Applications``.z~/ApplicationsrQ   r   s    r   Úuser_applications_dirz$_MacOSDefaults.user_applications_dir¯   s   € õ Œw×!Ò!Ð"2Ñ3Ô3Ð3r   c                ó   — dgS )Nz/Applicationsrm   r   s    r   Ú_site_applications_dirsz&_MacOSDefaults._site_applications_dirs´   s   € àÐ Ð r   c                ól   — | j         }| j        rt          j                             |¦  «        n|d         S )z?Applications directory shared by users, e.g. ``/Applications``.r   )rr   r@   r   rA   rB   rC   s     r   Úsite_applications_dirz$_MacOSDefaults.site_applications_dir¸   s0   € ð Ô+ˆØ(,¬ÐC�rŒz�Š˜tÑ$Ô$Ð$¸DÀ¼GÐCr   c                óf   — |                       t          j                             d¦  «        ¦  «        S )z_Runtime directory tied to the user, e.g. ``~/Library/Caches/TemporaryItems/$appname/$version``.z~/Library/Caches/TemporaryItemsr   r   s    r   Úuser_runtime_dirz_MacOSDefaults.user_runtime_dir¾   s)   € ð ×0Ò0µ´×1CÒ1CÐDeÑ1fÔ1fÑgÔgÐgr   c                ó   — | j         S )z>Runtime directory shared by users, same as `user_runtime_dir`.)rv   r   s    r   Úsite_runtime_dirz_MacOSDefaults.site_runtime_dirÃ   s   € ð Ô$Ð$r   úIterator[str]c              #  ó6   K  — | j         V — | j        E d{V —† dS )z4:yield: all user and site configuration directories.N)r8   r:   r   s    r   Úiter_config_dirsz_MacOSDefaults.iter_config_dirsÈ   s6   è è € àÔ"Ð"Ð"Ð"ØÔ)Ð)Ð)Ð)Ð)Ð)Ð)Ð)Ð)Ð)r   c              #  ó6   K  — | j         V — | j        E d{V —† dS )z+:yield: all user and site data directories.N)r)   r.   r   s    r   Úiter_data_dirsz_MacOSDefaults.iter_data_dirsÍ   s6   è è € àÔ Ð Ð Ð ØÔ'Ð'Ð'Ð'Ð'Ð'Ð'Ð'Ð'Ð'r   c              #  ó6   K  — | j         V — | j        E d{V —† dS )z,:yield: all user and site cache directories.N)r<   r>   r   s    r   Úiter_cache_dirsz_MacOSDefaults.iter_cache_dirsÒ   s6   è è € àÔ!Ð!Ð!Ð!ØÔ(Ð(Ð(Ð(Ð(Ð(Ð(Ð(Ð(Ð(r   N)r   r   )r   r   )r   r	   )r   ry   )*Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r&   Úpropertyr)   r.   r3   r6   r8   r:   r<   r>   rE   rG   rI   rK   rM   rO   rR   rU   rW   rZ   r]   r_   ra   rc   re   rg   ri   rk   rn   rp   rr   rt   rv   rx   r{   r}   r   rm   r   r   r   r      s®  € € € € € ðð ðfð fð fð fðð ð ð ð ð1ð 1ð 1ñ „Xð1ð ð&ð &ð &ñ „Xð&ð ðIð Ið Iñ „XðIð ðKð Kð Kñ „XðKð ð1ð 1ð 1ñ „Xð1ð ð&ð &ð &ñ „Xð&ð ðYð Yð Yñ „XðYð ðð ð ñ „Xðð ðDð Dð Dñ „XðDð
 ðJð Jð Jñ „XðJð ð1ð 1ð 1ñ „Xð1ð ð)ð )ð )ñ „Xð)ð ðWð Wð Wñ „XðWð ðBð Bð Bñ „XðBð ð1ð 1ð 1ñ „Xð1ð ð1ð 1ð 1ñ „Xð1ð ð0ð 0ð 0ñ „Xð0ð ð.ð .ð .ñ „Xð.ð ð-ð -ð -ñ „Xð-ð ð/ð /ð /ñ „Xð/ð ð0ð 0ð 0ñ „Xð0ð ð.ð .ð .ñ „Xð.ð ð1ð 1ð 1ñ „Xð1ð ð5ð 5ð 5ñ „Xð5ð ð^ð ^ð ^ñ „Xð^ð ð2ð 2ð 2ñ „Xð2ð ð ð  ð  ñ „Xð ð ð4ð 4ð 4ñ „Xð4ð ð!ð !ð !ñ „Xð!ð ðDð Dð Dñ „XðDð
 ðhð hð hñ „Xðhð ð%ð %ð %ñ „Xð%ð*ð *ð *ð *ð
(ð (ð (ð (ð
)ð )ð )ð )ð )ð )r   r   c                  ó   — e Zd ZdZdS )ÚMacOSaF  Platform directories for the macOS operating system.

    Follows the guidance from `Apple documentation
    <https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/MacOSXDirectories/MacOSXDirectories.html>`_.
    Makes use of the `appname <platformdirs.api.PlatformDirsABC.appname>`, `version
    <platformdirs.api.PlatformDirsABC.version>`, `ensure_exists <platformdirs.api.PlatformDirsABC.ensure_exists>`.

    XDG environment variables (e.g. ``$XDG_DATA_HOME``) are supported and take precedence over macOS defaults.

    N)r€   r�   r‚   rƒ   rm   r   r   r†   r†   Ø   s   € € € € € ð	ð 	ð 	ð 	r   r†   )rƒ   Ú
__future__r   Úos.pathr   r   Útypingr   Úcollections.abcr   Ú_xdgr   Úapir   Úpathlibr	   r   r†   Ú__all__rm   r   r   ú<module>r�      s  ðØ €à "Ð "Ð "Ð "Ð "Ð "à €€€Ø 
€
€
€
Ø  Ð  Ð  Ð  Ð  Ð  àð )Ø(Ð(Ð(Ð(Ð(Ð(à Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  àð ØÐÐÐÐÐðB)ð B)ð B)ð B)ð B)�_ñ B)ô B)ð B)ðJ
ð 
ð 
ð 
ð 
ˆH�nñ 
ô 
ð 
ð ð€€€r   