
    if!                     D   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 d dlm	Z	m
Z
mZmZmZmZ  ed          Z ede	          Z G d d          Z ed	
          dededefd            Z ed	
          dededefd            Z ed	
          dededefd            Z G d d          Z G d d          Z G d d          Z G d de          ZdedefdZ	 d$deeee         f         dedefdZde de fdZ!d ed!edefd"Z"d!ede	e	gef         fd#Z#dS )%    N)	lru_cachewraps)CallableListUnionIterableTypeVarcast\   C)boundc                       e Zd ZU dZg Zee         ed<   g Zee         ed<   dZ	e
d             Z e
d           Z e
d           ZdS )	__config_flagsz=Internal class for defining compatibility and debugging flags
_all_names_fixed_namesconfigurationc                 6   || j         v r[t          j        | j         d| d| j         dt          t          | |                                                     dd           d S || j        v rt          | ||           d S t          d| j         d|          )N. z is z and cannot be overridden   )
stacklevelzno such )r   warningswarn__name__
_type_descstrgetattrupperr   setattr
ValueError)clsdnamevalues      L/var/www/html/env/lib/python3.11/site-packages/pip/_vendor/pyparsing/util.py_setz__config_flags._set   s    C$$$M< - -% - -#. - -c'#uBUBU>V>V>\>\>^>^ - - -   
 FCN""C&&&&&BBBBBCCC    c                 .    |                      |d          S )NTr%   r!   names     r$   <lambda>z__config_flags.<lambda>#   s    388D$+?+? r&   c                 .    |                      |d          S )NFr(   r)   s     r$   r+   z__config_flags.<lambda>$   s    CHHT5,A,A r&   N)r   
__module____qualname____doc__r   r   r   __annotations__r   r   classmethodr%   enabledisable r&   r$   r   r      s         GGJS	 L$s)    JD D [D [??@@FkAABBGGGr&   r      )maxsizelocstrgreturnc                     |}d| cxk     rt          |          k     rn n|| dz
           dk    rdn| |                    dd|           z
  S )a  
    Returns current column within a string, counting newlines as line separators.
    The first column is number 1.

    Note: the default parsing behavior is to expand tabs in the input string
    before starting the parsing process.  See
    :class:`ParserElement.parse_string` for more
    information on parsing strings containing ``<TAB>`` s, and suggested
    methods to maintain a consistent view of the parsed string, the parse
    location, and line and column positions within the parsed string.
    r      
)lenrfind)r7   r8   ss      r$   colr@   '   sc     	AC    #a&&     QsQwZ4%7%711S1774QRTWCXCX=XXr&   c                 6    |                     dd|           dz   S )a  Returns current line number within a string, counting newlines as line separators.
    The first line is number 1.

    Note - the default parsing behavior is to expand tabs in the input string
    before starting the parsing process.  See :class:`ParserElement.parse_string`
    for more information on parsing strings containing ``<TAB>`` s, and
    suggested methods to maintain a consistent view of the parsed string, the
    parse location, and line and column positions within the parsed string.
    r<   r   r;   )count)r7   r8   s     r$   linenorC   8   s     ::dAs##a''r&   c                     |                     dd|           }|                    d|           }|dk    r||dz   |         n||dz   d         S )zh
    Returns the line of text containing loc within a string, counting newlines as line separators.
    r<   r   r;   N)r>   find)r7   r8   last_crnext_crs       r$   linerH   F   sZ    
 jjq#&&Giic""G*1Q,,4!g%&&D1<OOr&   c                       e Zd Zd ZdS )_UnboundedCachec                    i j         t                      x| _        fd}fd}fd}d | _        t	          j        ||           | _         t	          j        ||           | _        t	          j        ||           | _        d S )Nc                      |          S Nr4   _key	cache_getnot_in_caches     r$   getz%_UnboundedCache.__init__.<locals>.getV       9S,///r&   c                     ||<   d S rM   r4   )rO   rP   r#   caches      r$   set_z&_UnboundedCache.__init__.<locals>.set_Y   s    E#JJJr&   c                 0                                      d S rM   )clear)rO   rV   s    r$   rY   z'_UnboundedCache.__init__.<locals>.clear\   s    KKMMMMMr&   )rS   objectrR   sizetypes
MethodTypesetrY   )selfrS   rW   rY   rV   rQ   rR   s       @@@r$   __init__z_UnboundedCache.__init__Q   s    I	+1883L	0 	0 	0 	0 	0 	0	 	 	 	 		 	 	 	 	 	#C..#D$//%eT22


r&   Nr   r-   r.   r`   r4   r&   r$   rJ   rJ   P   s#        3 3 3 3 3r&   rJ   c                       e Zd Zd ZdS )
_FifoCachec                   	
 t                      x| _        
i t                      gz  	j        j        t	          j        t                              
fd}	fd}	fd}| _        t          j	        ||           | _        t          j	        ||           | _
        t          j	        ||           | _        d S )Nc                      |          S rM   r4   rN   s     r$   rS   z _FifoCache.__init__.<locals>.getn   rT   r&   c                 ^    ||<   t                    } |         d            ||<   d S rM   )next)rO   rP   r#   irV   	cache_popkeyiterkeyrings       r$   rW   z!_FifoCache.__init__.<locals>.set_q   s:    E#JWAIgaj$'''GAJJJr&   c                 ^                                      t                      gz  d d <   d S rM   )rY   rZ   )rO   rV   rk   r[   s    r$   rY   z"_FifoCache.__init__.<locals>.clearw   s,    KKMMM ((d*GAAAJJJr&   )rZ   rR   rS   pop	itertoolscycleranger[   r\   r]   r^   rY   )r_   r[   rS   rW   rY   rV   rQ   ri   rj   rk   rR   s    `   @@@@@@r$   r`   z_FifoCache.__init__f   s   +1883L88*t#I	I	/%++..	0 	0 	0 	0 	0 	0	 	 	 	 	 	 	 		+ 	+ 	+ 	+ 	+ 	+ 	+ 	#C..#D$//%eT22


r&   Nra   r4   r&   r$   rc   rc   e   s#        3 3 3 3 3r&   rc   c                   0    e Zd ZdZd Zd Zd Zd Zd ZdS )LRUMemoz
    A memoizing mapping that retains `capacity` deleted items

    The memo tracks retained items by their access order; once `capacity` items
    are retained, the least recently used item is discarded.
    c                 R    || _         i | _        t          j                    | _        d S rM   )	_capacity_activecollectionsOrderedDict_memory)r_   capacitys     r$   r`   zLRUMemo.__init__   s$    !".00r&   c                     	 | j         |         S # t          $ r* | j                            |           | j        |         cY S w xY wrM   )ru   KeyErrorrx   move_to_endr_   rP   s     r$   __getitem__zLRUMemo.__getitem__   sX    	%<$$ 	% 	% 	%L$$S)))<$$$$	%s    1AAc                 P    | j                             |d            || j        |<   d S rM   )rx   rm   ru   r_   rP   r#   s      r$   __setitem__zLRUMemo.__setitem__   s,    d###!Sr&   c                    	 | j                             |          }t          | j                  | j        k    r8| j                            d           t          | j                  | j        k    8|| j        |<   d S # t          $ r Y d S w xY w)NF)last)ru   rm   r=   rx   rt   popitemr{   r   s      r$   __delitem__zLRUMemo.__delitem__   s    	&L$$S))E dl##t~55$$%$000 dl##t~55 %DL  	 	 	DD	s   A= =
B
Bc                 j    | j                                          | j                                         d S rM   )ru   rY   rx   )r_   s    r$   rY   zLRUMemo.clear   s0    r&   N)	r   r-   r.   r/   r`   r~   r   r   rY   r4   r&   r$   rr   rr      si         1 1 1
% % %" " "& & &    r&   rr   c                       e Zd ZdZd ZdS )UnboundedMemoz<
    A memoizing mapping that retains all deleted items
    c                     d S rM   r4   r}   s     r$   r   zUnboundedMemo.__delitem__   s    r&   N)r   r-   r.   r/   r   r4   r&   r$   r   r      s-             r&   r   r?   c                     dD ] }|                      |t          |z             } !|                      dd          } |                      dd          } t          |           S )Nz\^-[]r<   z\n	z\t)replace_bslashr   )r?   cs     r$   _escape_regex_range_charsr      s[     & &IIa1%%			$A			$Aq66Mr&   T	re_escapec                   	
 
fd
d
_         t          j                    
_        d
_        d 	d }|s|	g }d                    t          t          |                               } t          |           dk    rt          j	        | 
          D ]\  }}t          |          x}}t          j        t          j        t          |g          |          d	
                                          }||k    r|                     	|                     t#          |          t#          |          d	z   k    rdnd}|                     	|           |  	|                      n	fd| D             }d                    |          S )Nc                     t          |           }|j        c_        }||z
  dk    rt          j                  _        j        S )Nr;   )ordprevrg   counterr#   )r   c_intr   is_consecutives      r$   r   z2_collapse_string_to_ranges.<locals>.is_consecutive   sK    A$)>+>!T4<!#'(>#?#?N ##r&   r   c                     | dv rd| z   n| S )Nz\^-][\r4   r   s    r$   escape_re_range_charz8_collapse_string_to_ranges.<locals>.escape_re_range_char   s    ==taxxa/r&   c                     | S rM   r4   r   s    r$   no_escape_re_range_charz;_collapse_string_to_ranges.<locals>.no_escape_re_range_char   s    r&    r   )rP   r;   )maxlen-c                 &    g | ]} |          S r4   r4   ).0r   r   s     r$   
<listcomp>z._collapse_string_to_ranges.<locals>.<listcomp>   s%    2221##A&&222r&   )r   rn   rB   r   r#   joinsortedr^   r=   groupbyrg   rv   dequechainiterrm   appendr   )r?   r   r   retrO   charsfirstr   sepr   r   s            @@r$   _collapse_string_to_rangesr      s   $ $ $ $ $ N&_..NN0 0 0    76
C
s1vvA
1vvzz!)!@@@ 	 	HAu;;&ED$dVe44Q  cee  }}

//667777IIUa77bbS

++E22UCU9M9Md9S9SUU   	 3222222773<<r&   llc                     g }| D ]O}t          |t                    r#|                    t          |                     :|                    |           P|S rM   )
isinstancelistextend_flattenr   )r   r   rh   s      r$   r   r      sY    
C  a 	JJx{{####JJqMMMMJr&   compat_namefnc                 B   t          d          dt          t          j                  j                  d         k    rt                    fd            }nt                    fd            }dj         d|_        | |_        j        |_        t          t          j                  rj        |_        n>t          t                    r"t          d          rj        j        |_        nd |_        j        |_        t#          t$          |          S )	N__func__r_   r   c                      | g|R i |S rM   r4   )r_   argskwargsr   s      r$   _innerz&_make_synonym_function.<locals>._inner   s%    
 2d,T,,,V,,,r&   c                       | i |S rM   r4   )r   r   r   s     r$   r   z&_make_synonym_function.<locals>._inner  s    
 2t&v&&&r&   zDeprecated - use :class:``r`   )r   r   inspect	signature
parametersr   r   r/   r0   r   r\   FunctionType__kwdefaults__typehasattrr`   r.   r
   r   )r   r   r   s    ` r$   _make_synonym_functionr      s6   
 
Z	$	$B g'++677:::	r	- 	- 	- 	- 
	- 	- 
r	' 	' 	' 	' 
	' D2;CCCFN!FO/F"e()) % " 1	B		 %'"j"9"9 % " : $/F6??r&   c                       fdS )zZ
    Decorator for pre-PEP8 compatibility synonyms, to link them to the new function.
    c                 .    t          | j                  S rM   )r   r   )otherr   s    r$   r+   z"replaced_by_pep8.<locals>.<lambda>  s    /CC r&   r4   )r   s   `r$   replaced_by_pep8r     s     DCCCCr&   )T)$r   r   r\   rv   rn   	functoolsr   r   typingr   r   r   r   r	   r
   chrr   r   r   intr   r@   rC   rH   rJ   rc   rr   dictr   r   boolr   r   r   r   r   r4   r&   r$   <module>r      s=              & & & & & & & & A A A A A A A A A A A A A A A A
#b''GCx   C C C C C C C C2 3YS Y Y Y Y Y Y  3
( 
(3 
(3 
( 
( 
( 
( 3Pc P P P P P P3 3 3 3 3 3 3 3*3 3 3 3 3 3 3 38$ $ $ $ $ $ $ $N    D         59) )S(3- )-1)) ) ) )X $    % % %q % % % %PD Dx
A6 D D D D D Dr&   