
    ;e                        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mZmZm	Z	m
Z
mZ ddlmZ eej        ef         ZeZd Zd Zededed	e	fd
            Zededed	efd            Ze	 	 ddedededed	e
f
d            Ze	 	 ddedededed	ef
d            Zeded	ee         fd            Zededed	efd            Zededed	eej                 fd            ZdS )    N)UnionIterableContextManagerBinaryIOTextIOAny   )_commonc                 F     t          j                    fd            }|S )Nc                  \    t          j        j         dt          d            | i |S )Nz is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.   )
stacklevel)warningswarn__name__DeprecationWarning)argskwargsfuncs     2/usr/lib/python3.11/importlib/resources/_legacy.pywrapperzdeprecated.<locals>.wrapper   sR    } P P P 	
 	
 	
 	
 tT$V$$$    )	functoolswraps)r   r   s   ` r   
deprecatedr      s8    _T% % % % % Nr   c                     	 t          |           }t          j                            |          \  }}|rt	          | d          |S )Nz must be only a file name)strospathsplit
ValueError)r   str_pathparent	file_names       r   normalize_pathr%      sQ     4yyHh//FI ?D===>>>r   packageresourcereturnc                 r    	 t          j        |           t          |          z                      d          S )Nrbr
   filesr%   openr&   r'   s     r   open_binaryr/   +   s0    NM'""^H%=%==CCDIIIr   c                 p    	 t          j        |           t          |          z                                  S N)r
   r,   r%   
read_bytesr.   s     r   read_binaryr3   1   s.    5M'""^H%=%==IIKKKr   utf-8strictencodingerrorsc                 x    	 t          j        |           t          |          z                      d||          S )Nr)r6   r7   r+   )r&   r'   r6   r7   s       r   	open_textr:   7   sD     MM'""^H%=%==CChv D   r   c                     	 t          | |||          5 }|                                cd d d            S # 1 swxY w Y   d S r1   )r:   read)r&   r'   r6   r7   fps        r   	read_textr>   D   s    
 
7Hh	7	7 2wwyy                 s   599c                 d    	 d t          j        |                                           D             S )Nc                     g | ]	}|j         
S  )name).0r   s     r   
<listcomp>zcontents.<locals>.<listcomp>\   s    CCC$DICCCr   )r
   r,   iterdir)r&   s    r   contentsrF   T   s4     DC'-"8"8"@"@"B"BCCCCr   rB   c                     	 t          |          t          fdt          j        |                                           D                       S )Nc              3   V   K   | ]#}|j         k    o|                                V  $d S r1   )rB   is_file)rC   traversabler'   s     r   	<genexpr>zis_resource.<locals>.<genexpr>f   sP         	H$>)<)<)>)>     r   )r%   anyr
   r,   rE   )r&   rB   r'   s     @r   is_resourcerM   _   se     d##H    "=1199;;     r   c                 p    	 t          j        t          j        |           t          |          z            S r1   )r
   as_filer,   r%   r.   s     r   r   r   l   s0    
 ?7=11N84L4LLMMMr   )r4   r5   )r   r   pathlibtypesr   typingr   r   r   r   r   r    r
   
ModuleTyper   PackageResourcer   r%   r/   bytesr3   r:   r>   rF   boolrM   Pathr   rA   r   r   <module>rZ      s       				    I I I I I I I I I I I I I I I I      
 #%
&  
 
 
 J JH J J J J J
 L LH L L L L L
  		 			 	 		
 	 	 	 	  	   	
 	    Dg D(3- D D D D 	 	 	 	 	 	 	 NNN GL!N N N N N Nr   