+
    il,                         ^ RI Ht  ^ RIHtHt  ^ RIHt ^ RIH	t	 ^RI
Ht ^RIHt ^R	IHtHt R
R.t]! 4       t ! R R
]4      t ! R R]4      tR#   ] d    ^ RIHtHt  LUi ; i  ] d     ! R R4      t Lei ; i)    )absolute_import)MappingMutableMapping)RLockc                   ,   a  ] tR t^t o R tR tRtV tR# )r   c                    R # N selfs   &g/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pip/_vendor/urllib3/_collections.py	__enter__RLock.__enter__           c                    R # r	   r
   )r   exc_type	exc_value	tracebacks   &&&&r   __exit__RLock.__exit__   r   r   r
   N)__name__
__module____qualname____firstlineno__r   r   __static_attributes____classdictcell____classdict__s   @r   r   r      s     		 	r   r   )OrderedDict)InvalidHeader)six)iterkeys
itervaluesRecentlyUsedContainerHTTPHeaderDictc                   \   a  ] tR t^t o Rt]tRR ltR tR t	R t
R tR tR	 tR
 tRtV tR# )r%   am  
Provides a thread-safe dict-like container which maintains up to
``maxsize`` keys while throwing away the least-recently-used keys beyond
``maxsize``.

:param maxsize:
    Maximum number of recent elements to retain.

:param dispose_func:
    Every time an item is evicted from the container,
    ``dispose_func(value)`` is called.  Callback which will get called
Nc                f    Wn         W n        V P                  4       V n        \	        4       V n        R # r	   )_maxsizedispose_funcContainerCls
_containerr   lock)r   maxsizer*   s   &&&r   __init__RecentlyUsedContainer.__init__/   s&    (++-G	r   c                    V P                   ;_uu_ 4        V P                  P                  V4      pW P                  V&   VuuR R R 4       #   + '       g   i     R # ; ir	   )r-   r,   pop)r   keyitems   && r   __getitem__!RecentlyUsedContainer.__getitem__6   s:    YYY??&&s+D#'OOC  YYYs   +AA	c                   \         pV P                  ;_uu_ 4        V P                  P                  V\         4      pW P                  V&   \	        V P                  4      V P
                  8  d   V P                  P                  R R7      w  rCRRR4       V P                  '       d    V\         Jd   V P                  V4       R# R# R#   + '       g   i     LC; i)F)lastN)_Nullr-   r,   getlenr)   popitemr*   )r   r3   valueevicted_value_keys   &&&  r   __setitem__!RecentlyUsedContainer.__setitem__=   s    YYY OO//U;M#(OOC  4??#dmm3&*oo&=&=5&=&I#  e!;m, "< Ys   A1CC	c                    V P                   ;_uu_ 4        V P                  P                  V4      pR R R 4       V P                  '       d   V P                  X4       R # R #   + '       g   i     L7; ir	   )r-   r,   r2   r*   )r   r3   r=   s   && r   __delitem__!RecentlyUsedContainer.__delitem__L   sM    YYYOO'',E  e$  Ys   A  A0	c                    V P                   ;_uu_ 4        \        V P                  4      uuR R R 4       #   + '       g   i     R # ; ir	   )r-   r;   r,   r   s   &r   __len__RecentlyUsedContainer.__len__S   s#    YYYt' YYYs	   5A	c                    \        R 4      h)z7Iteration over this class is unlikely to be threadsafe.)NotImplementedErrorr   s   &r   __iter__RecentlyUsedContainer.__iter__W   s    !E
 	
r   c                2   V P                   ;_uu_ 4        \        \        V P                  4      4      pV P                  P	                  4        R R R 4       V P
                  '       d   X F  pV P                  V4       K  	  R # R #   + '       g   i     L@; ir	   )r-   listr$   r,   clearr*   )r   valuesr=   s   &  r   rN   RecentlyUsedContainer.clear\   sf    YYY*T__56FOO!!# 
 !!%(    Ys   9BB	c                    V P                   ;_uu_ 4        \        \        V P                  4      4      uuR R R 4       #   + '       g   i     R # ; ir	   )r-   rM   r#   r,   r   s   &r   keysRecentlyUsedContainer.keysf   s(    YYY12 YYYs	   >A	)r,   r)   r*   r-   )
   N)r   r   r   r   __doc__r    r+   r/   r5   r@   rC   rF   rJ   rN   rR   r   r   r   s   @r   r%   r%      s>      L-%(

)3 3r   c                   @  a a ] tR t^kt oRtRV 3R lltR tR tR tR t	R t
R t]P                  '       d   ]P                  t]P                   t]! 4       tR	 tR
 t]3R ltR tR tR t]3R ltR t]t]t]t]tR tR t R t!R t"R t#R t$]%R 4       t&Rt'Vt(V ;t)# )r&   a  
:param headers:
    An iterable of field-value pairs. Must not contain multiple field names
    when compared case-insensitively.

:param kwargs:
    Additional field-value pairs to pass in to ``dict.update``.

A ``dict`` like container for storing HTTP Headers.

Field names are stored and compared case-insensitively in compliance with
RFC 7230. Iteration provides the first case-sensitive key seen for each
case-insensitive pair.

Using ``__setitem__`` syntax overwrites fields that compare equal
case-insensitively in order to maintain ``dict``'s api. For fields that
compare equal, instead create a new ``HTTPHeaderDict`` and use ``.add``
in a loop.

If multiple fields that are equal case-insensitively are passed to the
constructor or ``.update``, the behavior is undefined and some will be
lost.

>>> headers = HTTPHeaderDict()
>>> headers.add('Set-Cookie', 'foo=bar')
>>> headers.add('set-cookie', 'baz=quxx')
>>> headers['content-length'] = '7'
>>> headers['SET-cookie']
'foo=bar, baz=quxx'
>>> headers['Content-Length']
'7'
c                   < \         \        V `  4        \        4       V n        Ve:   \        V\        4      '       d   V P                  V4       MV P                  V4       V'       d   V P                  V4       R # R # r	   )superr&   r/   r    r,   
isinstance
_copy_fromextend)r   headerskwargs	__class__s   &&,r   r/   HTTPHeaderDict.__init__   sX    nd,.%-'>22(G$KK r   c                    W.V P                   VP                  4       &   V P                   VP                  4       ,          # r	   r,   lowerr   r3   vals   &&&r   r@   HTTPHeaderDict.__setitem__   s-    (+z		$syy{++r   c                t    V P                   VP                  4       ,          pR P                  VR,          4      # ),    NNr,   rb   joinrc   s   && r   r5   HTTPHeaderDict.__getitem__   s)    oociik*yyR!!r   c                <    V P                   VP                  4        R # r	   ra   r   r3   s   &&r   rC   HTTPHeaderDict.__delitem__   s    OOCIIK(r   c                <    VP                  4       V P                  9   # r	   )rb   r,   rn   s   &&r   __contains__HTTPHeaderDict.__contains__   s    yy{doo--r   c                0   \        V\        4      '       g   \        VR 4      '       g   R# \        V\        V 4      4      '       g   \        V 4      ! V4      p\	        R V P                  4        4       4      \	        R VP                  4        4       4      8H  # )rR   Fc              3   J   "   T F  w  rVP                  4       V3x  K  	  R # 5ir	   rb   .0kvs   &  r   	<genexpr>(HTTPHeaderDict.__eq__.<locals>.<genexpr>   s     A/@tqQWWYN/@   !#c              3   J   "   T F  w  rVP                  4       V3x  K  	  R # 5ir	   ru   rv   s   &  r   rz   r{      s!      J
'9tqQWWYN'9r|   )rY   r   hasattrtypedict
itermergedr   others   &&r   __eq__HTTPHeaderDict.__eq__   s|    %))'%2H2H%d,,Ju%EAt/@AAT J
','7'7'9J
 F
 
 	
r   c                .    V P                  V4      '       * # r	   )r   r   s   &&r   __ne__HTTPHeaderDict.__ne__   s    ;;u%%%r   c                ,    \        V P                  4      # r	   )r;   r,   r   s   &r   rF   HTTPHeaderDict.__len__   s    4??##r   c              #  f   "   V P                   P                  4        F  pV^ ,          x  K  	  R# 5i)r   N)r,   rO   )r   valss   & r   rJ   HTTPHeaderDict.__iter__   s%     OO**,Dq'M -s   /1c                b     W,          pW V#   \          d    Y P                  J d   h Tu # i ; i)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.
)KeyError_HTTPHeaderDict__marker)r   r3   defaultr=   s   &&& r   r2   HTTPHeaderDict.pop   s=    	IE 	L  	--'N	s    ..c                0     W R #   \          d     R # i ; ir	   )r   rn   s   &&r   discardHTTPHeaderDict.discard   s    		 		s    c                    VP                  4       pW.pV P                  P                  W44      pWEJd   VP                  V4       R# R# )zAdds a (name, value) pair, doesn't overwrite the value if it already
exists.

>>> headers = HTTPHeaderDict(foo='bar')
>>> headers.add('Foo', 'baz')
>>> headers['foo']
'bar, baz'
N)rb   r,   
setdefaultappend)r   r3   rd   	key_lowernew_valsr   s   &&&   r   addHTTPHeaderDict.add   sA     IIK	:)))>KK  r   c                   \        V4      ^8  d$   \        RP                  \        V4      4      4      h\        V4      ^8  d
   V^ ,          MRp\        V\        4      '       d,   VP                  4        F  w  rEV P                  WE4       K  	  M\        V\        4      '       d#   V F  pV P                  WCV,          4       K  	  M^\        VR4      '       d1   VP                  4        F  pV P                  WCV,          4       K  	  MV F  w  rFV P                  WF4       K  	  VP                  4        F  w  rFV P                  WF4       K  	  R# )zGeneric import function for any type of header-like object.
Adapted version of MutableMapping.update in order to insert items
with self.add instead of self.__setitem__
z9extend() takes at most 1 positional arguments ({0} given)rR   Nr
   )r;   	TypeErrorformatrY   r&   	iteritemsr   r   r~   rR   items)r   argsr]   r   r3   rd   r=   s   &*,    r   r[   HTTPHeaderDict.extend   s    
 t9q=((.s4y(9  t9>Qre^,,!OO-" .w''Cj) UF##zz|Cj) $ $
$ $ !,,.JCHHS  )r   c                     V P                   VP                  4       ,          pVR,          #   \         d    Y P                  J d   . u # Tu # i ; i)zeReturns a list of all the values for the named field. Returns an
empty list if the key doesn't exist.rh   )r,   rb   r   r   )r   r3   r   r   s   &&& r   getlistHTTPHeaderDict.getlist  sK    	??399;/D 8O  	--'	N	s   !, A
AAc                B    . ROpV F  pV P                  V4       K  	  V # )z~
Remove content-specific header fields before changing the request
method to GET or HEAD according to RFC 9110, Section 15.4.
)zContent-EncodingzContent-LanguagezContent-LocationzContent-TypezContent-LengthDigestzLast-Modified)r   )r   content_specific_headersheaders   &  r   _prepare_for_method_change)HTTPHeaderDict._prepare_for_method_change  s'    
$
  /FLL  /r   c                j    \        V 4      P                  : R \        V P                  4       4      : R2# )())r   r   r   r   r   s   &r   __repr__HTTPHeaderDict.__repr__)  s#    :..T__5F0GHHr   c                    V FZ  pVP                  V4      p\        V\        4      '       d   \        V4      pV.V,           V P                  VP	                  4       &   K\  	  R # r	   )r   rY   rM   r,   rb   )r   r   r3   rd   s   &&  r   rZ   HTTPHeaderDict._copy_from,  sJ    C--$C#t$$3i,/53;DOOCIIK( r   c                H    \        V 4      ! 4       pVP                  V 4       V# r	   )r   rZ   )r   clones   & r   copyHTTPHeaderDict.copy4  s     T
r   c              #     "   V  FA  pV P                   VP                  4       ,          pVR,           F  pV^ ,          V3x  K  	  KC  	  R# 5i)z8Iterate over all header lines, including duplicate ones.rh   Nra   )r   r3   r   rd   s   &   r   r   HTTPHeaderDict.iteritems9  sA     C??399;/DBxx1gsl"   s   A
Ac              #     "   V  FG  pV P                   VP                  4       ,          pV^ ,          RP                  VR,          4      3x  KI  	  R# 5i)z:Iterate over all headers, merging duplicate ones together.rg   rh   Nrj   rc   s   &  r   r   HTTPHeaderDict.itermerged@  s?     C//#))+.Ca&$))CG,,, s   AAc                4    \        V P                  4       4      # r	   )rM   r   r   s   &r   r   HTTPHeaderDict.itemsF  s    DNN$%%r   c                h   Rp. pVP                    F  pVP                  V4      '       dJ   V'       g   \        RV,          4      hVR,          w  rVWVR,           VP                  4       ,           3VR&   Kc  VP	                  R^4      w  rVVP                  WVP                  4       34       K  	  V ! V4      # )z4Read headers from a Python 2 httplib message object. z/Header continuation with no previous header: %s:)r   	)r\   
startswithr!   stripsplitr   )clsmessageobs_fold_continued_leadersr\   liner3   r=   s   &&     r   from_httplibHTTPHeaderDict.from_httplibI  s     &1"OOD9:: (IDP  ")JC#&djjl(B"CGBKC+JCNNC/0 $" 7|r   )r,   r	   )*r   r   r   r   rU   r/   r@   r5   rC   rq   r   r   r"   PY2r   r#   r$   objectr   rF   rJ   r2   r   r   r[   r   r   
getheadersgetallmatchingheadersigetget_allr   rZ   r   r   r   r   classmethodr   r   r   __classcell__)r^   r   s   @@r   r&   r&   k   s     B	 ,").
& www!**#..
xH$
  ( " !8 $, 
& J#D GI7
#-&   r   N)
__future__r   collections.abcr   r   ImportErrorcollections	threadingr   r    
exceptionsr!   packagesr"   packages.sixr#   r$   __all__r   r9   r%   r&   r
   r   r   <module>r      s    &47	 $ %  ."$4
5 	I3N I3Xx^ xM  4334   s"   A A) A&%A&)A=<A=