+
    9i^                      a  0 t $ R t^ RIHt ^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^R
IHt ]'       d   ^ RIHtHt ^ RIHt ^ RI
Ht ]'       d   RMRtR]R&   RtR]R&   RtR]R&   RtR]R&   ] ! ]!! R]]'       g   RMR]RR]]R34      4      t"R]R&   Rt#R]R&   ]	! ]! ]]R7      4      t$R]R &   ]R! R" l4       t%R# R$ lt&R4R% R& llt'R' R( lt(R) R* lt)R4R+ R, llt*R-R/R. R/ llt+R0 R1 lt,R2 R3 lt-R# )5zLow-level path helpers.)annotationsN)cache)Path)TYPE_CHECKING)on_win)custom_expandvars)Channel)user_cache_dir)APP_NAME)IterableIterator)datetime)FinalzC:/ProgramData/conda/tosz/etc/conda/tosr   SITE_TOS_ROOTz$CONDA_ROOT/conda-meta/tosSYSTEM_TOS_ROOTz~/.conda/tosUSER_TOS_ROOTz$CONDA_PREFIX/conda-meta/tosENV_TOS_ROOTz/var/lib/conda/tosz$XDG_CONFIG_HOME/conda/tosz~/.config/conda/tosz	$CONDATOSSEARCH_PATHz*.jsonTOS_GLOB)	appauthor	CACHE_DIRc                    V ^8  d   QhRRRR/# )   channelstr | Channelreturnstr )formats   "7lib/python3.14/site-packages/conda_anaconda_tos/path.py__annotate__r    ?   s      - C     c                F   \        V 4      p V P                  '       g   \        R4      h\        P                  ! R4      pVP                  V P                  P                  R4      4       VP                  V P                  P                  R4      4       VP                  4       # )z;Hash the channel to remove problematic characters (e.g. /).z\`channel` must have a base URL. (hint: `conda.models.channel.MultiChannel` cannot be hashed)sha256zutf-8)
r   base_url
ValueErrorhashlibnewupdatechannel_locationencodechannel_name	hexdigest)r   hashers   & r   hash_channelr.   >   s     gGK
 	

 [["F
MM'**11':;
MM'&&--g67r!   c                    V ^8  d   QhRRRR/# )r   pathstr | os.PathLike[str] | Pathr   r   r   )r   s   "r   r    r    N   s     # #0 #T #r!   c                    \        V \        4      '       d   \        V \        P                  4      p M!\        V \
        4      '       g   \        R4      h\        V 4      P                  4       # )z7Expand environment variables and user home in the path.z*`path` must be a string or `pathlib.Path`.)
isinstancer   r   osenvironr   	TypeError
expanduser)r0   s   &r   get_pathr8   N   sK    $ rzz2d##DEE:  ""r!   c                    V ^8  d   QhRRRR/# r   extend_search_path.Iterable[str | os.PathLike[str] | Path] | Noner   Iterator[Path]r   )r   s   "r   r    r    W   s      Fr!   c              #     "   \        4       p. \        OT ;'       g    RO FC  p\        V4      ;pP                  4       '       g   K&  W19  g   K.  Vx  VP	                  V4       KE  	  R# 5i)zDGet all root metadata paths ordered from highest to lowest priority.Nr   )setr   r8   is_diradd)r;   seentos_rootr0   s   &   r   get_search_pathrD   W   sZ      eD?k?%7%=%=2?X&&D..00T5EJHHTN @s   A A*A*A*c               $    V ^8  d   QhRRRRRR/# )r   rC   r1   r   r   r   r   r   )r   s   "r   r    r    b   s&     6 6+66 
6r!   c                8    \        V 4      \        V4      ,          # )z1Get the metadata directory for the given channel.)r8   r.   )rC   r   s   &&r   get_tos_dirrG   b   s    
 HW 555r!   c               (    V ^8  d   QhRRRRRRRR/# )	r   rC   r1   r   r   versionr   r   r   r   )r   s   "r   r    r    j   s6     J J+JJ J 
	Jr!   c                H    \        W4      VP                  4        R2,          # )z=Get the metadata file path for the given channel and version.z.json)rG   	timestamp)rC   r   rI   s   &&&r   get_metadata_pathrL   j   s%     x)w/@/@/B.C5,IIIr!   c                    V ^8  d   QhRRRR/# r:   r   )r   s   "r   r    r    s   s      @ @F@@r!   c              #     "   \        V 4       F5  p\        \        V4      P                  R\         24      4       Rj  xL
  K7  	  R#  L
5i)z"Get all local metadata file paths.z*/N)rD   sortedr8   globr   )r;   r0   s   & r   get_all_channel_pathsrQ   s   s=        23(4.--8*o>??? 4?s   <AA	Ar;   c               $    V ^8  d   QhRRRRRR/# )r   r   r   r;   r<   r   r=   r   )r   s   "r   r    r    {   s.     E EE GE 	Er!   c             #     "   \        V4       F2  p\        \        W 4      P                  \        4      4       Rj  xL
  K4  	  R#  L
5i)z8Get all local metadata file paths for the given channel.N)rD   rO   rG   rP   r   )r   r;   r0   s   &$ r   get_channel_pathsrT   {   s8        23+d499(CDDD 4Ds   9AAAc                    V ^8  d   QhRRRR/# )r   r   r   r   r   r   )r   s   "r   r    r       s     8 8M 8d 8r!   c                4    \         \        V 4       R2,          # )z7Get the metadata cache file path for the given channel.z.cache)r   r.   )r   s   &r   get_cache_pathrW      s    ,w/0777r!   c                   V ^8  d   QhRR/# )r   r   r=   r   )r   s   "r   r    r       s     1 1 1r!   c               #  ^   "   \        \        P                  R4      4       Rj  xL
  R#  L5i)z(Get all local metadata cache file paths.z*.cacheN)rO   r   rP   r   r!   r   get_cache_pathsrZ      s     innY/000s   "-+-)N).__conditional_annotations____doc__
__future__r   r&   r4   	functoolsr   pathlibr   typingr   conda.common.compatr   conda.common.configurationr   conda.models.channelr   platformdirsr	    r
   collections.abcr   r   r   r   r   __annotations__r   r   r   tuplefilterr   r   r   r.   r8   rD   rG   rL   rQ   rT   rW   rZ   )r[   s   @r   <module>rj      s    "  	     & 8 ( ' 2! 6<1AQu Q 6 5 &u % 5e 4 
(. D(!
	
U $ %  x8DE	5 E  #6J@E JNE8
1r!   