
    RhR}                     Z
   d Z ddlmZmZ ddlZ eee         Z ed      Z	d Z
 ee
      Z[
g dZdZ e ed            Z e e e                   Z e ei j%                                     Z e ei j)                                     Z e ei j-                                     Z e eg             Z e e eg                   Z e e ed                  Z e e ed	d
z                    Z e e e                   Z e ed            Z  e ed            Z! e e e"                   Z# ei j%                               Z$ ei j)                               Z% ei j-                               Z& eejN                        Z( e d              Z)d Z* e*       Z* ee*      Z+e*jY                          [*d Z- e-       Z- ee-      Z.[-d Z/ G d de      Z0 G d de      Z1 G d de1      Z2e2jg                  e+        G d de      Z4 G d de4      Z5 G d de5      Z6e6jg                  e.        G d de      Z7 G d  d!e7      Z8e8jg                  e       e8jg                  e       e8jg                  e       e8jg                  e       e8jg                  e       e8jg                  e       e8jg                  e       e8jg                  e       e8jg                  e       e8jg                  e       e8jg                  e        e8jg                  e!       e8jg                  e#        G d" d#e7      Z9 G d$ d%e8      Z:e:jg                  e)        G d& d'e      Z; G d( d)e      Z< G d* d+e;e7e<      Z= G d, d-e      Z> G d. d/e      Z?d0 Z@d1 ZA G d2 d3e      ZB G d4 d5e=      ZCeCjg                  eD        G d6 d7eC      ZEeEjg                  e        G d8 d9e=      ZFeFjg                  e(        G d: d;e;      ZG G d< d=eGeC      ZHeHjg                  e$        G d> d?eGeC      ZIeIjg                  e&        G d@ dAeGe=      ZJeJjg                  e%        G dB dCeF      ZKeKjg                  eL        G dD dEe9e=      ZMeMjg                  eN       eMjg                  eO       eMjg                  e       eMjg                  eP        G dF dGe      ZQ G dH dIeMeQ      ZReRjg                  eS       eRjg                  e        G dJ dKeM      ZTeTjg                  e       eTjg                  e       y)LzjAbstract Base Classes (ABCs) for collections, according to PEP 3119.

Unit tests are in test_collections.
    )ABCMetaabstractmethodN.c                       y N r       '/usr/lib/python3.12/_collections_abc.py_fr
   (   s    r   )	Awaitable	CoroutineAsyncIterableAsyncIteratorAsyncGeneratorHashableIterableIterator	Generator
ReversibleSized	ContainerCallable
CollectionSet
MutableSetMappingMutableMappingMappingViewKeysView	ItemsView
ValuesViewSequenceMutableSequence
ByteStringBufferzcollections.abcr      i   r   c               #      K   d  S r   r   r   r   r	   <lambda>r(   X   s     5r   c                     K   y wr   r   r   r   r	   _coror*   Z   s        c                    K   d  y wr   r   r   r   r	   _agr-   `   s        	c                     | j                   }|D ]9  }|D ]+  }||j                  v s|j                  |   
t        c c S  2 t        c S  y)NT)__mro____dict__NotImplemented)CmethodsmromethodBs        r	   _check_methodsr8   h   sZ    
))C " 	"A#::f%-))		" "!" r   c                   0    e Zd ZdZed        Zed        Zy)r   r   c                      yNr   r   selfs    r	   __hash__zHashable.__hash__x       r   c                 6    | t         u rt        |d      S t        S )Nr>   )r   r8   r2   clsr3   s     r	   __subclasshook__zHashable.__subclasshook__|       (?!!Z00r   N)__name__
__module____qualname__	__slots__r   r>   classmethodrC   r   r   r	   r   r   t   -    I   r   r   )	metaclassc                   @    e Zd ZdZed        Zed        Z ee      Z	y)r   r   c              #      K   d  y wr   r   r<   s    r	   	__await__zAwaitable.__await__   s	     s   c                 6    | t         u rt        |d      S t        S )NrN   )r   r8   r2   rA   s     r	   rC   zAwaitable.__subclasshook__   s    )!![11r   N)
rE   rF   rG   rH   r   rN   rI   rC   GenericAlias__class_getitem__r   r   r	   r   r      s:    I   
 $L1r   r   c                   H    e Zd ZdZed        Zedd       Zd Zed        Z	y)r   r   c                     t         )zcSend a value into the coroutine.
        Return next yielded value or raise StopIteration.
        StopIterationr=   values     r	   sendzCoroutine.send   
    
 r   Nc                 F    ||| |       }||j                  |      }|)zgRaise an exception in the coroutine.
        Return next yielded value or raise StopIteration.
        with_tracebackr=   typvaltbs       r	   throwzCoroutine.throw   4    
 ;z	%C>$$R(C	r   c                 n    	 | j                  t               t        d      # t        t        f$ r Y yw xY w).Raise GeneratorExit inside coroutine.
        zcoroutine ignored GeneratorExitNra   GeneratorExitRuntimeErrorrU   r<   s    r	   closezCoroutine.close   ;    	BJJ}% @AA }- 		   " 44c                 <    | t         u rt        |dddd      S t        S )NrN   rX   ra   rh   )r   r8   r2   rA   s     r	   rC   zCoroutine.__subclasshook__   s#    )!![&'7KKr   NN)
rE   rF   rG   rH   r   rX   ra   rh   rI   rC   r   r   r	   r   r      sG    I  
 
B  r   r   c                   @    e Zd ZdZed        Zed        Z ee      Z	y)r   r   c                     t               S r   )r   r<   s    r	   	__aiter__zAsyncIterable.__aiter__   s
    r   c                 6    | t         u rt        |d      S t        S )Nro   )r   r8   r2   rA   s     r	   rC   zAsyncIterable.__subclasshook__   s    -!![11r   N)
rE   rF   rG   rH   r   ro   rI   rC   rP   rQ   r   r   r	   r   r      s:    I   
 $L1r   r   c                   6    e Zd ZdZed        Zd Zed        Zy)r   r   c                    K   t         w)z@Return the next item or raise StopAsyncIteration when exhausted.StopAsyncIterationr<   s    r	   	__anext__zAsyncIterator.__anext__   s      ! r.   c                     | S r   r   r<   s    r	   ro   zAsyncIterator.__aiter__       r   c                 8    | t         u rt        |dd      S t        S )Nru   ro   )r   r8   r2   rA   s     r	   rC   zAsyncIterator.__subclasshook__   s    -!![+>>r   N)	rE   rF   rG   rH   r   ru   ro   rI   rC   r   r   r	   r   r      s2    I! !  r   r   c                   N    e Zd ZdZd Zed        Zedd       Zd Ze	d        Z
y)	r   r   c                 @   K   | j                  d       d{   S 7 w)zpReturn the next item from the asynchronous generator.
        When exhausted, raise StopAsyncIteration.
        N)asendr<   s    r	   ru   zAsyncGenerator.__anext__   s      ZZ%%%%s   c                    K   t         w)zuSend a value into the asynchronous generator.
        Return next yielded value or raise StopAsyncIteration.
        rs   rV   s     r	   r{   zAsyncGenerator.asend   s     
 ! r.   Nc                 N   K   ||| |       }||j                  |      }|w)zyRaise an exception in the asynchronous generator.
        Return next yielded value or raise StopAsyncIteration.
        r[   r]   s       r	   athrowzAsyncGenerator.athrow   s8     
 ;z	%C>$$R(C	s   #%c                    K   	 | j                  t               d{    t        d      7 # t        t        f$ r Y yw xY ww)rd   Nz,asynchronous generator ignored GeneratorExit)r~   rf   rg   rt   r<   s    r	   aclosezAsyncGenerator.aclose  sH     	O++m,,, MNN	 -12 		s/   A. ,. A. A AA  Ac                 >    | t         u rt        |ddddd      S t        S )Nro   ru   r{   r~   r   )r   r8   r2   rA   s     r	   rC   zAsyncGenerator.__subclasshook__  s*    . !![+")8X? ?r   rl   )rE   rF   rG   rH   ru   r   r{   r~   r   rI   rC   r   r   r	   r   r      sN    I& ! ! 
 
O  r   r   c                   @    e Zd ZdZed        Zed        Z ee      Z	y)r   r   c              #      K   y wr   r   r<   s    r	   __iter__zIterable.__iter__  	     r+   c                 6    | t         u rt        |d      S t        S )Nr   )r   r8   r2   rA   s     r	   rC   zIterable.__subclasshook__   rD   r   N)
rE   rF   rG   rH   r   r   rI   rC   rP   rQ   r   r   r	   r   r     s:    I   
 $L1r   r   c                   6    e Zd ZdZed        Zd Zed        Zy)r   r   c                     t         )zKReturn the next item from the iterator. When exhausted, raise StopIterationrT   r<   s    r	   __next__zIterator.__next__-  s
     r   c                     | S r   r   r<   s    r	   r   zIterator.__iter__2  rw   r   c                 8    | t         u rt        |dd      S t        S )Nr   r   )r   r8   r2   rA   s     r	   rC   zIterator.__subclasshook__5  s    (?!!Z<<r   N)	rE   rF   rG   rH   r   r   r   rI   rC   r   r   r	   r   r   )  s2    I   r   r   c                   0    e Zd ZdZed        Zed        Zy)r   r   c              #      K   y wr   r   r<   s    r	   __reversed__zReversible.__reversed__P  r   r+   c                 8    | t         u rt        |dd      S t        S )Nr   r   )r   r8   r2   rA   s     r	   rC   zReversible.__subclasshook__U  s    *!!^Z@@r   N)rE   rF   rG   rH   r   r   rI   rC   r   r   r	   r   r   L  s-    I   r   r   c                   N    e Zd ZdZd Zed        Zedd       Zd Ze	d        Z
y)	r   r   c                 $    | j                  d      S )z^Return the next item from the generator.
        When exhausted, raise StopIteration.
        N)rX   r<   s    r	   r   zGenerator.__next__`  s     yyr   c                     t         )zcSend a value into the generator.
        Return next yielded value or raise StopIteration.
        rT   rV   s     r	   rX   zGenerator.sendf  rY   r   Nc                 F    ||| |       }||j                  |      }|)zgRaise an exception in the generator.
        Return next yielded value or raise StopIteration.
        r[   r]   s       r	   ra   zGenerator.throwm  rb   r   c                 n    	 | j                  t               t        d      # t        t        f$ r Y yw xY w)z.Raise GeneratorExit inside generator.
        zgenerator ignored GeneratorExitNre   r<   s    r	   rh   zGenerator.closez  ri   rj   c                 >    | t         u rt        |ddddd      S t        S )Nr   r   rX   ra   rh   )r   r8   r2   rA   s     r	   rC   zGenerator.__subclasshook__  s*    )!!Z"('7< <r   rl   )rE   rF   rG   rH   r   r   rX   ra   rh   rI   rC   r   r   r	   r   r   \  sN    I   
 
B  r   r   c                   0    e Zd ZdZed        Zed        Zy)r   r   c                      yr;   r   r<   s    r	   __len__zSized.__len__  r?   r   c                 6    | t         u rt        |d      S t        S )Nr   )r   r8   r2   rA   s     r	   rC   zSized.__subclasshook__  s    %<!!Y//r   N)rE   rF   rG   rH   r   r   rI   rC   r   r   r	   r   r     rJ   r   r   c                   @    e Zd ZdZed        Zed        Z ee      Z	y)r   r   c                      yNFr   )r=   xs     r	   __contains__zContainer.__contains__      r   c                 6    | t         u rt        |d      S t        S )Nr   )r   r8   r2   rA   s     r	   rC   zContainer.__subclasshook__  s    )!!^44r   N)
rE   rF   rG   rH   r   r   rI   rC   rP   rQ   r   r   r	   r   r     s:    I   
 $L1r   r   c                        e Zd ZdZed        Zy)r   r   c                 :    | t         u rt        |ddd      S t        S )Nr   r   r   )r   r8   r2   rA   s     r	   rC   zCollection.__subclasshook__  s!    *!!i^LLr   N)rE   rF   rG   rH   rI   rC   r   r   r	   r   r     s    I r   r   c                   :    e Zd ZdZededefd       Zed        Z	y)r$   r   flagsreturnc                    t         r   NotImplementedError)r=   r   s     r	   
__buffer__zBuffer.__buffer__  s    !!r   c                 6    | t         u rt        |d      S t        S )Nr   )r$   r8   r2   rA   s     r	   rC   zBuffer.__subclasshook__  s    &=!!\22r   N)
rE   rF   rG   rH   r   int
memoryviewr   rI   rC   r   r   r	   r$   r$     s;    I" ": " "  r   r$   c                   @     e Zd ZdZdZ fdZ fdZd Z fdZ xZ	S )_CallableGenericAliasz Represent `Callable[argtypes, resulttype]`.

    This sets ``__args__`` to a tuple containing the flattened ``argtypes``
    followed by ``resulttype``.

    Example: ``Callable[[int, str], float]`` sets ``__args__`` to
    ``(int, str, float)``.
    r   c                     t        |t              rt        |      dk(  st        d      |\  }}t        |t        t        f      rg ||}nt        |      st        d|       t        |   | ||      S )N   z6Callable must be used as Callable[[arg, ...], result].zFExpected a list of types, an ellipsis, ParamSpec, or Concatenate. Got )
isinstancetuplelen	TypeErrorlist_is_param_exprsuper__new__)rB   originargst_argst_result	__class__s        r	   r   z_CallableGenericAlias.__new__  s    4'CINHJ Jfudm,&V&X&D' >>DXG H HwsFD11r   c           	      .   t        | j                        dk(  r&t        | j                  d         rt        |          S ddj                  | j                  d d D cg c]  }t        |       c}       dt        | j                  d          dS c c}w )Nr   r   zcollections.abc.Callable[[z, z], ])r   __args__r   r   __repr__join
_type_repr)r=   ar   s     r	   r   z_CallableGenericAlias.__repr__  s    t}}"~dmmA6F'G7#%%YYt}}Sb7IJ!
1JKLCdmmB/014 	5Js   B
c                     | j                   }t        |      dk(  rt        |d         st        |d d       |d   f}t        t
        |ffS )Nr   r   r   )r   r   r   r   r   r   )r=   r   s     r	   
__reduce__z _CallableGenericAlias.__reduce__  sI    }}D	Q>$q'#:Sb	?DH,D$x&666r   c                     t        |t              s|f}t        |   |      j                  }t        |d   t        t
        f      s|d   }|d d }||f}t        t        t        |            S )Nr   r   )r   r   r   __getitem__r   r   r   r   )r=   itemnew_argsr   r   r   s        r	   r   z!_CallableGenericAlias.__getitem__  sn    
 $&7D7&t,55 (1+t}5|Hcr]F)H$XuX??r   )
rE   rF   rG   __doc__rH   r   r   r   r   __classcell__r   s   @r	   r   r     s*     I
257@ @r   r   c                       t         u ryt         t              ryt                d} j                  dk(  xr t         fd|D              S )z|Checks if obj matches either a list of types, ``...``, ``ParamSpec`` or
    ``_ConcatenateGenericAlias`` from typing.py
    T)	ParamSpec_ConcatenateGenericAliastypingc              3   <   K   | ]  }j                   |k(    y wr   )rE   ).0nameobjs     r	   	<genexpr>z!_is_param_expr.<locals>.<genexpr>	  s     -Utclld.B-Us   )Ellipsisr   r   typerF   any)r   namess   ` r	   r   r     sI     h#t
s)C5E>>X%U#-Uu-U*UUr   c                     t        | t              r6| j                  dk(  r| j                  S | j                   d| j                   S | t        u ryt        | t
              r| j                  S t        |       S )zReturn the repr() of an object, special-casing types (internal helper).

    Copied from :mod:`typing` since collections.abc
    shouldn't depend on that module.
    (Keep this roughly in sync with the typing version.)
    builtins.z...)r   r   rF   rG   r   FunctionTyperE   repr)r   s    r	   r   r     sk     #t>>Z'###..!3#3#3"455
h#|$||9r   c                   @    e Zd ZdZed        Zed        Z ee      Z	y)r   r   c                      yr   r   )r=   r   kwdss      r	   __call__zCallable.__call__!  r   r   c                 6    | t         u rt        |d      S t        S )Nr   )r   r8   r2   rA   s     r	   rC   zCallable.__subclasshook__%  rD   r   N)
rE   rF   rG   rH   r   r   rI   rC   r   rQ   r   r   r	   r   r     s;    I   
 $$9:r   r   c                   x    e Zd ZdZdZd Zd Zd Zd Zd Z	e
d        Zd	 ZeZd
 Zd ZeZd Zd Zd ZeZd Zy)r   aZ  A set is a finite, iterable container.

    This class provides concrete generic implementations of all
    methods except for __contains__, __iter__ and __len__.

    To override the comparisons (presumably for speed, as the
    semantics are fixed), redefine __le__ and __ge__,
    then the other operations will automatically follow suit.
    r   c                 z    t        |t              st        S t        |       t        |      kD  ry| D ]  }||vs y yNFTr   r   r2   r   r=   otherelems      r	   __le__z
Set.__le__>  sD    %%!!t9s5z! 	D5 	 r   c                     t        |t              st        S t        |       t        |      k  xr | j	                  |      S r   r   r   r2   r   r   r=   r   s     r	   __lt__z
Set.__lt__H  3    %%!!4y3u:%<$++e*<<r   c                     t        |t              st        S t        |       t        |      kD  xr | j	                  |      S r   )r   r   r2   r   __ge__r   s     r	   __gt__z
Set.__gt__M  r   r   c                 z    t        |t              st        S t        |       t        |      k  ry|D ]  }|| vs y yr   r   r   s      r	   r   z
Set.__ge__R  sD    %%!!t9s5z! 	D4	 r   c                     t        |t              st        S t        |       t        |      k(  xr | j	                  |      S r   r   r   s     r	   __eq__z
Set.__eq__\  s3    %%!!4yCJ&=4;;u+==r   c                      | |      S )zConstruct an instance of the class from any iterable input.

        Must override this method if the class constructor signature
        does not accept an iterable for an input.
        r   rB   its     r	   _from_iterablezSet._from_iterablea  s     2wr   c                 d     t        |t              st        S  j                   fd|D              S )Nc              3   ,   K   | ]  }|v s|  y wr   r   r   rW   r=   s     r	   r   zSet.__and__.<locals>.<genexpr>m  s     "MUu}5"Ms   	r   r   r2   r   r   s   ` r	   __and__zSet.__and__j  s*    %*!!"""Me"MMMr   c                     |D ]  }|| v s y y)z1Return True if two sets have a null intersection.FTr   )r=   r   rW   s      r	   
isdisjointzSet.isdisjointq  s      	E}	 r   c                 f    t        |t              st        S d | |fD        }| j                  |      S )Nc              3   .   K   | ]  }|D ]  }|   y wr   r   )r   ses      r	   r   zSet.__or__.<locals>.<genexpr>{  s     5q15a55s   r   )r=   r   chains      r	   __or__z
Set.__or__x  s1    %*!!5T5M5""5))r   c                     t        t              s't        t              st        S | j	                        | j	                  fd| D              S )Nc              3   *   K   | ]
  }|vr|  y wr   r   )r   rW   r   s     r	   r   zSet.__sub__.<locals>.<genexpr>  s       #:U&+5&8 $) #:   r   r   r   r2   r   r   s    `r	   __sub__zSet.__sub__  sL    %%eX.%%''.E"" #:d #: : 	:r   c                      t        |t              s't        |t              st        S  j	                  |      } j	                   fd|D              S )Nc              3   *   K   | ]
  }|vr|  y wr   r   r   s     r	   r   zSet.__rsub__.<locals>.<genexpr>  s       #9U&+4&7 $) #9r  r  r   s   ` r	   __rsub__zSet.__rsub__  sL    %%eX.%%''.E"" #9e #9 9 	9r   c                     t        |t              s't        |t              st        S | j	                  |      }| |z
  || z
  z  S r   r  r   s     r	   __xor__zSet.__xor__  s?    %%eX.%%''.Eu..r   c                    t         j                  }d|z  dz   }t        |       }d|dz   z  }||z  }| D ]#  }t        |      }|||dz  z  dz  dz  z  }||z  }% ||dz	  |dz	  z  z  }|d	z  d
z   }||z  }||kD  r||dz   z  }|dk(  rd}|S )a+  Compute the hash value of a set.

        Note that we don't define __hash__: not all sets are hashable.
        But if you define a hashable set type, its __hash__ should
        call this function.

        This must be compatible __eq__.

        All sets ought to compare equal if they contain the same
        elements, regardless of how they are implemented, and
        regardless of the order of the elements; so there's not much
        freedom for __eq__ or __hash__.  We match the algorithm used
        by the built-in frozenset type.
        r   r%   iMr   iM[l   4~2       i i6r   i8#)sysmaxsizer   hash)r=   MAXMASKnhr   hxs          r	   _hashz	Set._hash  s     kk3w{I!a% 	T	 	AaB"b/H,;;AIA	 	
a2g!r'""I	!	T	s7MA7Ar   N)rE   rF   rG   r   rH   r   r   r   r   r   rI   r   r  __rand__r  r	  __ror__r  r  r  __rxor__r   r   r   r	   r   r   1  st     I=
=
>
  N
 H* G:9/ Hr   r   c                   ^    e Zd ZdZdZed        Zed        Zd Zd Z	d Z
d Zd	 Zd
 Zd Zy)r   a  A mutable set is a finite, iterable container.

    This class provides concrete generic implementations of all
    methods except for __contains__, __iter__, __len__,
    add(), and discard().

    To override the comparisons (presumably for speed, as the
    semantics are fixed), all you have to do is redefine __le__ and
    then the other operations will automatically follow suit.
    r   c                     t         )zAdd an element.r   rV   s     r	   addzMutableSet.add  
     "!r   c                     t         )z8Remove an element.  Do not raise an exception if absent.r   rV   s     r	   discardzMutableSet.discard  r'  r   c                 D    || vrt        |      | j                  |       y)z5Remove an element. If not a member, raise a KeyError.N)KeyErrorr)  rV   s     r	   removezMutableSet.remove  s     5/!Ur   c                 ~    t        |       }	 t        |      }| j	                  |       |S # t        $ r t        dw xY w)z2Return the popped value.  Raise KeyError if empty.N)iternextrU   r+  r)  r=   r   rW   s      r	   popzMutableSet.pop  sE    $Z	%HE 	U  	%$	%s   + <c                 F    	 	 | j                          # t        $ r Y yw xY w)z6This is slow (creates N new iterators!) but effective.N)r1  r+  r<   s    r	   clearzMutableSet.clear  s*    	
  		    	  c                 6    |D ]  }| j                  |        | S r   )r&  r0  s      r	   __ior__zMutableSet.__ior__  s!     	EHHUO	r   c                 <    | |z
  D ]  }| j                  |        | S r   )r)  r0  s      r	   __iand__zMutableSet.__iand__  s&    Ri 	 ELL	 r   c                     || u r| j                          | S t        |t              s| j                  |      }|D ])  }|| v r| j	                  |       | j                  |       + | S r   )r3  r   r   r   r)  r&  r0  s      r	   __ixor__zMutableSet.__ixor__  si    :JJL  b#&((, $D=LL'HHUO	$
 r   c                 b    || u r| j                          | S |D ]  }| j                  |        | S r   )r3  r)  r0  s      r	   __isub__zMutableSet.__isub__  s;    :JJL   $U#$r   N)rE   rF   rG   r   rH   r   r&  r)  r,  r1  r3  r6  r8  r:  r<  r   r   r	   r   r     sW    	 I" " " "

r   r   c                   R    e Zd ZdZdZdZed        ZddZd Z	d Z
d	 Zd
 Zd ZdZy)r   zA Mapping is a generic container for associating key/value
    pairs.

    This class provides concrete generic implementations of all
    methods except for __getitem__, __iter__, and __len__.
    r   @   c                     t         r   r+  r=   keys     r	   r   zMapping.__getitem__       r   Nc                 0    	 | |   S # t         $ r |cY S w xY w)z<D.get(k[,d]) -> D[k] if k in D, else d.  d defaults to None.r@  r=   rB  defaults      r	   getzMapping.get$  s%    	9 	N	s    c                 .    	 | |    y# t         $ r Y yw xY wNTFr@  rA  s     r	   r   zMapping.__contains__+  s'    	I   		s    	c                     t        |       S )z:D.keys() -> a set-like object providing a view on D's keys)r   r<   s    r	   keyszMapping.keys3  s    ~r   c                     t        |       S )z<D.items() -> a set-like object providing a view on D's items)r   r<   s    r	   itemszMapping.items7  s    r   c                     t        |       S )z6D.values() -> an object providing a view on D's values)r    r<   s    r	   valueszMapping.values;  s    $r   c                     t        |t              st        S t        | j	                               t        |j	                               k(  S r   )r   r   r2   dictrM  r   s     r	   r   zMapping.__eq__?  s3    %)!!DJJL!T%++-%888r   r   )rE   rF   rG   r   rH   __abc_tpflags__r   r   rG  r   rK  rM  rO  r   r   r   r   r	   r   r     sL     I O  9
 Lr   r   c                   2    e Zd ZdZd Zd Zd Z ee      Z	y)r   _mappingc                     || _         y r   rT  )r=   mappings     r	   __init__zMappingView.__init__M  s	    r   c                 ,    t        | j                        S r   )r   rU  r<   s    r	   r   zMappingView.__len__P  s    4==!!r   c                 $    dj                  |       S )Nz&{0.__class__.__name__}({0._mapping!r}))formatr<   s    r	   r   zMappingView.__repr__S  s    7>>tDDr   N)
rE   rF   rG   rH   rX  r   r   rI   rP   rQ   r   r   r	   r   r   I  s$    I "E $L1r   r   c                   ,    e Zd ZdZed        Zd Zd Zy)r   r   c                     t        |      S r   setr   s     r	   r   zKeysView._from_iterable]      2wr   c                     || j                   v S r   rT  rA  s     r	   r   zKeysView.__contains__a  s    dmm##r   c              #   8   K   | j                   E d {    y 7 wr   rT  r<   s    r	   r   zKeysView.__iter__d  s     ==  s   NrE   rF   rG   rH   rI   r   r   r   r   r   r	   r   r   Y  s#    I $!r   r   c                   ,    e Zd ZdZed        Zd Zd Zy)r   r   c                     t        |      S r   r^  r   s     r	   r   zItemsView._from_iterableo  r`  r   c                 `    |\  }}	 | j                   |   }||u xs ||k(  S # t        $ r Y yw xY wr   )rU  r+  )r=   r   rB  rW   vs        r	   r   zItemsView.__contains__s  sG    
U	,c"A :+e+  		s   ! 	--c              #   T   K   | j                   D ]  }|| j                   |   f  y wr   rT  rA  s     r	   r   zItemsView.__iter__|  s-     == 	,Cc*++	,s   &(Nrc  r   r   r	   r   r   k  s#    I ,,r   r   c                       e Zd ZdZd Zd Zy)r    r   c                 Z    | j                   D ]  }| j                   |   }||u s||k(  s y yrI  rT  )r=   rW   rB  rg  s       r	   r   zValuesView.__contains__  s8    == 	Cc"AEzQ%Z	 r   c              #   P   K   | j                   D ]  }| j                   |     y wr   rT  rA  s     r	   r   zValuesView.__iter__  s(     == 	%C--$$	%s   $&N)rE   rF   rG   rH   r   r   r   r   r	   r    r      s    I%r   r    c                   h    e Zd ZdZdZed        Zed        Z e       Z	e	fdZ
d Zd ZddZdd
Zy	)r   zA MutableMapping is a generic container for associating
    key/value pairs.

    This class provides concrete generic implementations of all
    methods except for __getitem__, __setitem__, __delitem__,
    __iter__, and __len__.
    r   c                     t         r   r@  r=   rB  rW   s      r	   __setitem__zMutableMapping.__setitem__  rC  r   c                     t         r   r@  rA  s     r	   __delitem__zMutableMapping.__delitem__  rC  r   c                 X    	 | |   }| |= |S # t         $ r || j                  u r |cY S w xY w)zD.pop(k[,d]) -> v, remove specified key and return the corresponding value.
          If key is not found, d is returned if given, otherwise KeyError is raised.
        )r+  _MutableMapping__marker)r=   rB  rF  rW   s       r	   r1  zMutableMapping.pop  sC    	IE S	L  	$--'N	s    ))c                 l    	 t        t        |             }| |   }| |= ||fS # t        $ r t        dw xY w)zD.popitem() -> (k, v), remove and return some (key, value) pair
           as a 2-tuple; but raise KeyError if D is empty.
        N)r/  r.  rU   r+  rn  s      r	   popitemzMutableMapping.popitem  sJ    	%tDz"C S	IEz	  	%$	%s   " 3c                 F    	 	 | j                          # t        $ r Y yw xY w)z,D.clear() -> None.  Remove all items from D.N)ru  r+  r<   s    r	   r3  zMutableMapping.clear  s*    	  		r4  c                    t        |t              r|D ]
  }||   | |<    n9t        |d      r|j                         D ]
  }||   | |<    n|D ]
  \  }}|| |<    |j	                         D ]
  \  }}|| |<    y)aK   D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
            If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
            If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
            In either case, this is followed by: for k, v in F.items(): D[k] = v
        rK  N)r   r   hasattrrK  rM  )r=   r   r   rB  rW   s        r	   updatezMutableMapping.update  s     eW% '!#JS	'UF#zz| '!#JS	' $ "
U!S	"**, 	JCDI	r   Nc                 8    	 | |   S # t         $ r	 || |<   Y |S w xY w)z@D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in Dr@  rE  s      r	   
setdefaultzMutableMapping.setdefault  s.    	 9 	 DI	 s    )r   r   )rE   rF   rG   r   rH   r   ro  rq  objectrs  r1  ru  r3  ry  r{  r   r   r	   r   r     sY     I    xH' 
$r   r   c                   H    e Zd ZdZdZdZed        Zd Zd Z	d Z
dd	Zd
 Zy)r!   zAll the operations on a read-only sequence.

    Concrete subclasses must override __new__ or __init__,
    __getitem__, and __len__.
    r       c                     t         r   
IndexErrorr=   indexs     r	   r   zSequence.__getitem__      r   c              #   N   K   d}	 	 | |   }| |dz  }# t         $ r Y y w xY ww)Nr   r%   r  )r=   irg  s      r	   r   zSequence.__iter__  sB     	GQ   		s   % 	"%"%c                 (    | D ]  }||u s||k(  s y yrI  r   )r=   rW   rg  s      r	   r   zSequence.__contains__  s&     	AEzQ%Z	 r   c              #   ^   K   t        t        t        |                   D ]	  }| |     y wr   )reversedranger   )r=   r  s     r	   r   zSequence.__reversed__  s,     %D	*+ 	Aq'M	s   +-Nc                     ||dk  rt        t        |       |z   d      }||dk  r|t        |       z  }|}|||k  r	 | |   }||u s||k(  r|S |dz  }|||k  rt        # t        $ r Y t        w xY w)zS.index(value, [start, [stop]]) -> integer -- return first index of value.
           Raises ValueError if the value is not present.

           Supporting start and stop arguments is optional, but
           recommended.
        r   r%   )maxr   r  
ValueError)r=   rW   startstopr  rg  s         r	   r  zSequence.index  s     D	E)1-EqCIDla$hG EzQ%ZFA la$h    s   A# #	A43A4c                 ,    t        fd| D              S )zBS.count(value) -> integer -- return number of occurrences of valuec              3   6   K   | ]  }|u s|k(  sd   yw)r%   Nr   )r   rg  rW   s     r	   r   z!Sequence.count.<locals>.<genexpr>+  s     ?a5jAJ1?s   )sumrV   s    `r	   countzSequence.count)  s    ?d???r   )r   N)rE   rF   rG   r   rH   rR  r   r   r   r   r   r  r  r   r   r	   r!   r!     sA     I O .@r   r!   c                   (     e Zd Z fdZ fdZ xZS )_DeprecateByteStringMetac                 b    |dk7  rdd l }|j                  dd       t        |   | |||fi |S )Nr#   r   collections.abc.ByteString      r,  )warnings_deprecatedr   r   )rB   r   bases	namespacekwargsr  r   s         r	   r   z _DeprecateByteStringMeta.__new__3  sC    <  , !  wsD%EfEEr   c                 P    dd l }|j                  dd       t        |   |      S )Nr   r  r  r  )r  r  r   __instancecheck__)rB   instancer  r   s      r	   r  z*_DeprecateByteStringMeta.__instancecheck__=  s1    ( 	 	
 w(22r   )rE   rF   rG   r   r  r   r   s   @r	   r  r  2  s    F3 3r   r  c                       e Zd ZdZdZy)r#   zMThis unifies bytes and bytearray.

    XXX Should add all their methods.
    r   N)rE   rF   rG   r   rH   r   r   r	   r#   r#   F  s    
 Ir   r#   c                   p    e Zd ZdZdZed        Zed        Zed        Zd Z	d Z
d Zd	 Zdd
Zd Zd Zy)r"   zAll the operations on a read-write sequence.

    Concrete subclasses must provide __new__ or __init__,
    __getitem__, __setitem__, __delitem__, __len__, and insert().
    r   c                     t         r   r  r=   r  rW   s      r	   ro  zMutableSequence.__setitem__[  r  r   c                     t         r   r  r  s     r	   rq  zMutableSequence.__delitem___  r  r   c                     t         )z3S.insert(index, value) -- insert value before indexr  r  s      r	   insertzMutableSequence.insertc  s
     r   c                 :    | j                  t        |       |       y)z:S.append(value) -- append value to the end of the sequenceN)r  r   rV   s     r	   appendzMutableSequence.appendh  s    CIu%r   c                 F    	 	 | j                          # t        $ r Y yw xY w)z,S.clear() -> None -- remove all items from SN)r1  r  r<   s    r	   r3  zMutableSequence.clearl  s*    	
  		r4  c                 z    t        |       }t        |dz        D ]  }| ||z
  dz
     | |   c| |<   | ||z
  dz
  <   ! y)z!S.reverse() -- reverse *IN PLACE*r   r%   N)r   r  )r=   r  r  s      r	   reversezMutableSequence.reverset  sN    Iq!t 	8A#'!A;Q DGT!A#a%[	8r   c                 R    || u rt        |      }|D ]  }| j                  |        y)zMS.extend(iterable) -- extend sequence by appending elements from the iterableN)r   r  )r=   rO  rg  s      r	   extendzMutableSequence.extendz  s,    T>&\F 	AKKN	r   c                     | |   }| |= |S )zS.pop([index]) -> item -- remove and return item at index (default last).
           Raise IndexError if list is empty or index is out of range.
        r   )r=   r  rg  s      r	   r1  zMutableSequence.pop  s     KKr   c                 (    | | j                  |      = y)zvS.remove(value) -- remove first occurrence of value.
           Raise ValueError if the value is not present.
        N)r  rV   s     r	   r,  zMutableSequence.remove  s     E"#r   c                 (    | j                  |       | S r   )r  )r=   rO  s     r	   __iadd__zMutableSequence.__iadd__  s    Fr   N)r   )rE   rF   rG   r   rH   r   ro  rq  r  r  r3  r  r  r1  r,  r  r   r   r	   r"   r"   R  sk     I     &8$r   r"   )Ur   abcr   r   r  r   r   r   rP   EllipsisTyper
   r   __all__rE   r.  bytes_iterator	bytearraybytearray_iteratorrK  dict_keyiteratorrO  dict_valueiteratorrM  dict_itemiteratorlist_iteratorr  list_reverseiteratorr  range_iteratorlongrange_iteratorr_  set_iteratorstr_iteratortuple_iteratorzipzip_iterator	dict_keysdict_values
dict_itemsr1   mappingproxy	generatorr*   	coroutinerh   r-   async_generatorr8   r   r   r   registerr   r   r   r   r   r   r   r   r   r   r$   r   r   r   r   r   	frozensetr   r   r   r   r   r    r   rQ  r!   r   strr   r  r#   bytesr"   r   r   r	   <module>r     s  > ( 
DICy Bx	  d3i$y{+, RWWY( $ryy{+, bhhj)* T"XD"./ d58n%$uQ$Y/01 DK DH~d2hDK O	299;"((*
DMM"/$%	 K	 	 	es)

 2' 2"&	 &R 
  9 2g 2"M &-] -`    (2 2$x & 	  . !   $ %   " #   $ %   # $   -     & '   . !   $ %   ,    ,    . !   ,   - -` 
  9 g 2' 2") w 4@L 4@l
V$; ;(G* GT Y M M`   C 
1j 1f    2% 2 !{C ! 	  ) ,S ,, 
  : %j %    K  OW Od    
=@z: =@~ 	  %    #    %    * 3w 3(%=    E  
  I ?h ?D        #r   