+
     Bic                    *   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
Ht ^RIHt ^RIHt R t ! R R]P"                  4      t ! R	 R
]P"                  4      t ! R R]P(                  4      t ! R R]P"                  4      tR tR# )    )annotationsN)Iterator)abc)onlyc                R    \        \        P                  P                  V 4      4      # N)itercollectionsOrderedDictfromkeys)itemss   &2/usr/lib/python3.14/importlib/resources/readers.pyremove_duplicatesr      s    ''00788    c                  (    ] tR t^tR tR tR tRtR# )
FileReaderc                	d    \         P                  ! VP                  4      P                  V n        R # r   )pathlibPathpathparent)selfloaders   &&r   __init__FileReader.__init__   s    LL-44	r   c                J    \        V P                  P                  V4      4      # z[
Return the file system path to prevent
`resources.path()` from creating a temporary
copy.
strr   joinpathr   resources   &&r   resource_pathFileReader.resource_path        499%%h/00r   c                	    V P                   # r   r   r   s   &r   filesFileReader.files"       yyr   r'   N)__name__
__module____qualname____firstlineno__r   r#   r)   __static_attributes__ r   r   r   r      s    51r   r   c                  :   a  ] tR t^&tR tV 3R ltR tR tRtV ;t	# )	ZipReaderc                	    VP                   P                  R R4      V n         VP                  V4      '       d5   VP                  R4      w   r4V ;P                   VR,           ,          un         VP                  V n        R# )\/.N)prefixreplace
is_package
rpartitionarchive)r   r   module_names   &&&  r   r   ZipReader.__init__'   s\    mm++D#6V$$**3/JAqKK4#:%K~~r   c                	   <  \         SV `  V4      #   \         d"   p\        TP                  ^ ,          4      hRp?ii ; i)r   N)superopen_resourceKeyErrorFileNotFoundErrorargs)r   r"   exc	__class__s   && r   rC   ZipReader.open_resource.   s;    	17(22 	1#CHHQK00	1s    >9>c                    V P                  4       P                  V4      pVP                  4       ;'       d    VP                  4       # )zN
Workaround for `zipfile.Path.is_file` returning true
for non-existent paths.
)r)   r    is_fileexists)r   r   targets   && r   is_resourceZipReader.is_resource4   s5    
 &&t,~~33FMMO3r   c                	X    \         P                  ! V P                  V P                  4      # r   )zipfiler   r<   r8   r(   s   &r   r)   ZipReader.files<   s    ||DLL$++66r   )r<   r8   )
r,   r-   r.   r/   r   rC   rN   r)   r0   __classcell__rH   s   @r   r3   r3   &   s    &147 7r   r3   c                  |   a  ] tR t^@tRtR tR tR tR tR t	R t
V 3R lt]R	 4       tR
 t]R 4       tR tRtV ;t# )MultiplexedPathz
Given a series of Traversable objects, implement a merged
version of the interface across all objects. Useful for
namespace packages which may be multihomed at a single
name.
c                	D   \        \        \        \        V4      4      4      V n        V P                  '       g   R p\        V4      h\        ;QJ d&    R V P                   4       F  '       d   K   RM	  RM! R V P                   4       4      '       g   \        R4      hR# )z.MultiplexedPath must contain at least one pathc              3  @   "   T F  qP                  4       x  K  	  R # 5ir   is_dir.0r   s   & r   	<genexpr>+MultiplexedPath.__init__.<locals>.<genexpr>M   s     9[T;;==[s   FTz)MultiplexedPath only supports directoriesN)listmap_ensure_traversabler   _pathsrE   allNotADirectoryError)r   pathsmessages   &* r   r   MultiplexedPath.__init__H   so    324Ee4LMN{{{FG#G,,s9T[[9sss9T[[999$%PQQ :r   c                	    R  V P                    4       p\        P                  ! R4      p\        P                  ! \        WR7      VR7      p\        V P                  R V 4       4      # )c              3  P   "   T F  qP                  4        F  q"x  K  	  K  	  R # 5ir   )iterdir)r\   r   childs   &  r   r]   *MultiplexedPath.iterdir.<locals>.<genexpr>Q   s     Nkd||~eE~Eks   $&r?   )keyc              3  *   "   T F	  w  rVx  K  	  R # 5ir   r1   )r\   r?   locss   &  r   r]   rl   T   s     !@:4$s   )rb   operator
attrgetter	itertoolsgroupbysortedr`   _follow)r   childrenby_namegroupss   &   r   rj   MultiplexedPath.iterdirP   sN    NdkkN%%f-""6(#@gN4<<!@!@AAr   c                	    \        V  R 24      hz is not a filerE   r(   s   &r   
read_bytesMultiplexedPath.read_bytesV       4& 788r   c                	    \        V  R 24      hr{   r|   r   rF   kwargss   &*,r   	read_textMultiplexedPath.read_textY   r   r   c                	    R # )Tr1   r(   s   &r   rZ   MultiplexedPath.is_dir\   s    r   c                	    R # )Fr1   r(   s   &r   rK   MultiplexedPath.is_file_   s    r   c                	   <  \         SV `  ! V!  #   \        P                   d%    T P                  ^ ,          P                  ! T!  u # i ; ir   )rB   r    r   TraversalErrorrb   )r   descendantsrH   s   &*r   r    MultiplexedPath.joinpathb   sH    	97#[11!! 	9 ;;q>**K88	9s    6A
	A
c                    \         P                  ! V^4      w  r#p \        V4      #   \         d)     T ! T!  u #   \         d    \        T4      u u # i ; ii ; i)z
Construct a MultiplexedPath if needed.

If children contains a sole element, return it.
Otherwise, return a MultiplexedPath of the items.
Unless one of the items is not a Directory, then return the first.
)rr   teer   
ValueErrorrd   next)clsrv   subdirsone_dirone_files   &&   r   ru   MultiplexedPath._followj   s_     &/]]8Q%?"(	&=  	&&G}$% &H~%&	&s)   
' A;AAAAAc                	    \        V  R 24      hr{   r|   r   s   &*,r   openMultiplexedPath.open}   r   r   c                	<    V P                   ^ ,          P                  # r   )rb   r?   r(   s   &r   r?   MultiplexedPath.name   s    {{1~"""r   c                	R    R P                  R V P                   4       4      pRV R2# )z, c              3  .   "   T F  pR V R 2x  K  	  R# 5i)'Nr1   r[   s   & r   r]   +MultiplexedPath.__repr__.<locals>.<genexpr>   s     >+$AdV1++s   zMultiplexedPath())joinrb   )r   re   s   & r   __repr__MultiplexedPath.__repr__   s)    		>$++>>!%**r   )rb   )r,   r-   r.   r/   __doc__r   rj   r}   r   rZ   rK   r    classmethodru   r   propertyr?   r   r0   rS   rT   s   @r   rV   rV   @   sd    RB999 & &$9 # #+ +r   rV   c                  j    ] tR t^tR t]R R l4       t]R R l4       t]R R l4       t	R t
R	 tR
tR# )NamespaceReaderc           	     	    R \        V4      9  d   \        R4      h\        \        \        \        V P                  V4      4      !  V n        R# )NamespacePathzInvalid pathN)r   r   rV   filterboolr`   _resolver   )r   namespace_paths   &&r   r   NamespaceReader.__init__   s8    #n"55^,,#VD#dmm^2T%UV	r   c                   V ^8  d   QhRR/# )   returnzabc.Traversable | Noner1   )formats   "r   __annotate__NamespaceReader.__annotate__   s        #9  r   c                J    R V P                  V4       4       p\        VR4      # )a  
Given an item from a namespace path, resolve it to a Traversable.

path_str might be a directory on the filesystem or a path to a
zipfile plus the path within the zipfile, e.g. ``/foo/bar`` or
``/foo/baz.zip/inner_dir`` or ``foo\baz.zip\inner_dir\sub``.

path_str might also be a sentinel used by editable packages to
trigger other behaviors (see python/importlib_resources#311).
In that case, return None.
c              3  T   "   T F  qP                  4       '       g   K  Vx  K   	  R # 5ir   rY   )r\   cands   & r   r]   +NamespaceReader._resolve.<locals>.<genexpr>   s     Q!?;;=!?s   (
(N)_candidate_pathsr   )r   path_strdirss   && r   r   NamespaceReader._resolve   s'     R!5!5h!?QD$r   c                    V ^8  d   QhRRRR/# )r   r   r   r   zIterator[abc.Traversable]r1   )r   s   "r   r   r      s     3 3 30I 3r   c              #  	t   "   \         P                  ! V4      x  V P                  V4       R j  xL
  R #  L5ir   )r   r   _resolve_zip_path)r   r   s   &&r   r    NamespaceReader._candidate_paths   s(     ll8$$((222s   -868c                   V ^8  d   QhRR/# )r   r   r   r1   )r   s   "r   r   r      s     	Q 	QC 	Qr   c           	   #  	  "   \        \        \        P                  ! R V 4      4      4       F  p\        P
                  ! \        \        \        \        4      ;_uu_ 4        WP                  4       R P                  RR4      R,           p\        P                  ! V RVP                  4        VP                  R4      4      x  RRR4       K  	  R#   + '       g   i     K  ; i5i)z[\\/]Nr5   r6   )reversedr_   refinditer
contextlibsuppressrE   IsADirectoryErrorrd   PermissionErrorendr9   rQ   r   startlstrip)r   matchinners   &  r   r   !NamespaceReader._resolve_zip_path   s     d2;;x#BCDE$$!!"	  !/77cBSHll8Oekkm#<ell3>OPP  E  s   AC% A#CC%C"	C%c                J    \        V P                  P                  V4      4      # r   r   r!   s   &&r   r#   NamespaceReader.resource_path   r%   r   c                	    V P                   # r   r'   r(   s   &r   r)   NamespaceReader.files   r+   r   r'   N)r,   r-   r.   r/   r   r   r   r   staticmethodr   r#   r)   r0   r1   r   r   r   r      sP    W
     3 3 	Q 	Q1r   r   c                    \        V \        4      '       g   V # \        P                  ! R\        ^R7       \
        P                  ! V 4      # )z_
Convert deprecated string arguments to traversables (pathlib.Path).

Remove with Python 3.15.
z<String arguments are deprecated. Pass a Traversable instead.)
stacklevel)
isinstancer   warningswarnDeprecationWarningr   r   r'   s   &r   ra   ra      s<     dC  MMF <<r   )
__future__r   r
   r   rr   r   rp   r   r   rQ   collections.abcr    r   
_itertoolsr   r   TraversableResourcesr   r3   TraversablerV   r   ra   r1   r   r   <module>r      s}    "      	   $  9))  7(( 74F+coo F+R0c.. 0fr   