
    ,h
                         d dl Z d dlZe j                   ee j                         ee j                        z  z   Z G d d      Zd Zy)    Nc                   P    e Zd ZU dZeed<   efdefdZd Zd Z	d Z
d Zd Zd	 Zy
)
Translatorz
    >>> Translator('xyz')
    Traceback (most recent call last):
    ...
    AssertionError: Invalid separators

    >>> Translator('')
    Traceback (most recent call last):
    ...
    AssertionError: Invalid separators
    sepsc                 Z    |rt        |      t        t              k  sJ d       || _        y )NzInvalid separators)set_default_sepsr   )selfr   s     ^/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/setuptools/_vendor/zipp/glob.py__init__zTranslator.__init__   s%    D	S%77M9MM	    c                 B    | j                  | j                  |            S )zH
        Given a glob pattern, produce a regex that matches it.
        )extendtranslate_corer	   patterns     r
   	translatezTranslator.translate   s     {{4..w788r   c                     d| dS )z
        Extend regex for pattern-wide concerns.

        Apply '(?s:)' to create a non-matching group that
        matches newlines (valid on Unix).

        Append '\Z' to imply fullmatch even when match is used.
        z(?s:z)\Z r   s     r
   r   zTranslator.extend!   s     wis##r   c           
          | j                  |       dj                  t        | j                  t	        | j                  |                        S )a?  
        Given a glob pattern, produce a regex that matches it.

        >>> t = Translator()
        >>> t.translate_core('*.txt').replace('\\\\', '')
        '[^/]*\\.txt'
        >>> t.translate_core('a?txt')
        'a[^/]txt'
        >>> t.translate_core('**/*').replace('\\\\', '')
        '.*/[^/][^/]*'
         )restrict_rglobjoinmapreplaceseparatestar_not_emptyr   s     r
   r   zTranslator.translate_core,   s<     	G$wws4<<$2E2Eg2N)OPQQr   c                    |j                  d      xsu t        j                  |j                  d            j                  dd      j                  ddt        j                  | j                         d      j                  dd	      S )
zM
        Perform the replacements for a match from :func:`separate`.
        r   r   z\*\*z.*z\*[^z]*z\?z[^/])groupreescaper   r   )r	   matchs     r
   r   zTranslator.replace;   si     {{5! 
IIekk!n%WXu%WUr"))DII"6!7r:;WUG$		
r   c                     dt        j                  | j                         d}t        j                  ||      }t	        d |D              rt        d      y)z
        Raise ValueError if ** appears in anything but a full path segment.

        >>> Translator().translate('**foo')
        Traceback (most recent call last):
        ...
        ValueError: ** must appear alone in a path segment
        []+c              3   2   K   | ]  }d |v xr |d k7    yw)z**Nr   ).0segments     r
   	<genexpr>z,Translator.restrict_rglob.<locals>.<genexpr>Q   s      Kwtw27d?2Ks   z&** must appear alone in a path segmentN)r    r!   r   splitany
ValueError)r	   r   seps_patternsegmentss       r
   r   zTranslator.restrict_rglobF   sP     BIIdii01488L'2K(KKEFF Lr   c                 |    d }dt        j                  | j                         d}t        j                  |||      S )z@
        Ensure that * will not match an empty segment.
        c                 6    | j                  d      }|dk(  rdS |S )Nr   *z?*)r   )r"   r(   s     r
   handle_segmentz1Translator.star_not_empty.<locals>.handle_segmentY   s     kk!nG"c>46w6r   r   r%   )r    r!   r   sub)r	   r   r2   not_seps_patterns       r
   r   zTranslator.star_not_emptyT   s:    
	7 !499!5 6b9vv&@@r   N)__name__
__module____qualname____doc__str__annotations__r   r   r   r   r   r   r   r   r   r   r
   r   r      s>    
 I#0 S 9	$R	
G
Ar   r   c                 .    t        j                  d|       S )z
    Separate out character sets to avoid translating their contents.

    >>> [m.group(0) for m in separate('*.txt')]
    ['*.txt']
    >>> [m.group(0) for m in separate('a[?]txt')]
    ['a', '[?]', 'txt']
    z+([^\[]+)|(?P<set>[\[].*?[\]])|([\[][^\]]*$))r    finditer)r   s    r
   r   r   a   s     ;;EwOOr   )	osr    sepr9   altsepboolr   r   r   r   r   r
   <module>rA      sE    	 	 RYY$ryy/99VA VAr	Pr   