+
     Ii K  c                   s   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
HtHtHt ^ RIHt ^ RIHtHt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H t H!t!H"t"H#t# ^ RI$H%t%  ^ RIH&t&H't'  ]PR                  ! 4       ;_uu_ 4        ]PT                  ! R]+R7       ^ RI,H-t. RRR4        ^ RIH0t0 ^ RI1t2^ RI3H4t4H5t5H6t6H7t7H8t8 ^ RI9H:t:HtH;t;H<t<H=t=H>t>HtHt ]6! 4        ] P~                  ! ]@4      tA^<tB^
tC]P                  P                  ]P                  P                  ]G4      R4      tHRtI]J! ]R4      '       d   R"tI ^ RIKHLtL R tMR#R ltNR tOR tPR tQ ! R R4      tR ! R  R!4      tSR#   ]( d    ^ RI#H&t&H't'  ELi ; i  + '       g   i     L; i  ]/](3 d
    ^ RIH.t.  Li ; i  ]( d    Rt0 ELi ; i  ]( d    R tL Li ; i)$i    N)	b64encode)CancelledError)PoolManagerTimeoutproxy_from_url)ConnectTimeoutError)LocationParseErrorNewConnectionErrorProtocolError
ProxyError)ReadTimeoutError)SSLError)PoolKey)Retry)OP_NO_COMPRESSIONPROTOCOL_TLSOP_NO_SSLv2OP_NO_SSLv3is_ipaddressssl)	parse_url)OP_NO_TICKETPROTOCOL_TLS_CLIENTZignore)Zcategory)orig_util_SSLContext)
SSLContext)DEFAULT_CIPHERS)IPV6_ADDRZ_REensure_bytesfilter_ssl_warningsunquoteurlparse)ConnectionClosedErrorr   EndpointConnectionErrorHTTPClientErrorInvalidProxiesConfigErrorProxyConnectionErrorr
   r   z
cacert.pemZkey_blocksize)wherec                  s    \         # N)DEFAULT_CA_BUNDLE     9/usr/lib/python3.14/site-packages/botocore/httpsession.pyr$   r$   c   s      r(   c                 sV    V R Jd   V # \        4       p\        P                  RV4       V# )TzCertificate path: %s)r$   loggerdebug)verifyZ	cert_path   & r)   get_cert_pathr.   g   s+    TI
LL'3r(   c                sH  a V '       d   V \         8X  d   \        p \        V 4      oV'       d   SP                  V4       M!\        '       d   SP                  \        4       Vf   \
        P                  MTpVf7   ^ pV\        ,          pV\        ,          pV\        ,          pV\        ,          pS;P                  V,          un        V\
        P                  8X  g   \        P                  R8  d   \        SRR4      e   RSn        V3R lpV\
        P                  8X  d   VSn        V! 4        MV! 4        VSn        \#        SR4      '       dO   \$        P&                  P)                  R4      pV'       d(   \        P*                  P,                  '       g   VSn        S# )zThis function is a vendored version of the same function in urllib3

We vendor this function to ensure that the SSL contexts we construct
always use the std lib SSLContext instead of pyopenssl.
Npost_handshake_authTc                  s8   < \        S R R4      e
   RS n        R# R# )check_hostnameNF)getattrr0   )contexts   r)   disable_check_hostnameZ6create_urllib3_context.<locals>.disable_check_hostname   s#    G-t4@ &+G"	 Ar(   keylog_filenameZSSLKEYLOGFILE)i   i   i   )r   r   r   Zset_ciphersr   r   CERT_REQUIREDr   r   r   r   optionssysZversion_infor1   r/   Zverify_modehasattrosenvirongetZflagsZignore_environmentr4   )Zssl_version	cert_reqsr6   Zciphersr3   Zsslkeylogfiler2   s   &&&&  @r)   create_urllib3_contextr=   q   sB    +5)%GG$	O, &/%6!!II;; 	$$
 	<OOwO 	S&&&#*:*:i*G
'0$
7
C&*#+ C%%%'  ' w)**

7!=!=!=&3G#Nr(   c                sX    \        V \        4      '       d   V # V P                  4       R8H  # )zvEnsures a boolean value if a string or boolean is provided

For strings, the value for True/False is case insensitive
Ztrue)
isinstanceboollower)Zval   &r)   ensure_booleanrB      s'    
 #t
yy{f$$r(   c                s    Rp\        V 4      pVP                  '       d   V P                  VP                  V^4      p VP                  '       d   V P                  VP                  V^4      p V # )z
Mask proxy url credentials.

:type proxy_url: str
:param proxy_url: The proxy url, i.e. https://username:password@proxy.com

:return: Masked proxy url, i.e. https://***:***@proxy.com
z***)r   usernameZreplacepassword)	proxy_urlZmask
parsed_urls   &  r)   mask_proxy_urlrG      se     D)$J%%j&9&94C	%%j&9&94C	r(   c                sf    \        V 4      ;'       g     \        \        P                  ! V 4      4      # )z@Wrap urllib3's is_ipaddress to support bracketed IPv6 addresses.)r   r?   r   Zmatch)hostrA   r)   _is_ipaddressrI      s%    @@m&9&9$&?!@@r(   c                   s\   a  ] tR t^t o RtRR ltR tR t]R 4       t	R t
R tR	 tR
tV tR# )ProxyConfigurationzRepresents a proxy configuration dictionary and additional settings.

This class represents a proxy configuration dictionary and provides utility
functions to retrieve well structured proxy urls and proxy headers from the
proxy configuration dictionary.
Nc                s6    Vf   / pVf   / pWn         W n        R # r%   _proxies_proxies_settings)selfproxiesproxies_settingss   &&&r)   __init__ZProxyConfiguration.__init__   s#    ?G#!!1r(   c                s    \        V4      pV P                  P                  VP                  4      pV'       d   V P	                  V4      pV# )z6Retrieves the corresponding proxy url for a given url.)r   rL   r;   scheme_fix_proxy_url)rN   urlrF   Zproxy   &&  r)   proxy_url_forZ ProxyConfiguration.proxy_url_for   s=    c]
!!*"3"34''.Er(   c                sz    / pV P                  V4      w  r4V'       d   V'       d   V P                  W44      pWRR&   V# )z@Retrieves the corresponding proxy headers for a given proxy url.zProxy-Authorization)_get_auth_from_url_construct_basic_auth)rN   rE   headersrC   rD   Z
basic_auth   &&    r)   proxy_headers_forZ$ProxyConfiguration.proxy_headers_for   s=    !44Y?33HGJ-7)*r(   c                s    V P                   # r%   )rM   rN   rA   r)   settingsZProxyConfiguration.settings  s    %%%r(   c                s    VP                  R 4      '       g   VP                  R4      '       d   V# VP                  R4      '       d
   R V,           # RV,           # )http:zhttps:z//zhttp://)
startswith)rN   rE   s   &&r)   rS   Z!ProxyConfiguration._fix_proxy_url	  sP    ((I,@,@,J,J!!$''Y&&y((r(   c                s    V R V 2p\        VP                  R4      4      P                  4       P                  4       pRV 2# )Z:ZasciizBasic )r    ZencodeZstripZdecode)rN   rC   rD   Zauth_strZencoded_strs   &&&  r)   rX   Z(ProxyConfiguration._construct_basic_auth  sD    Zq
+ 89??AHHJ}%%r(   c                s    \        V4      p \        VP                  4      \        VP                  4      3#   \        \
        3 d    Ru # i ; i)NNN)r   r   rC   rD   AttributeErrorZ	TypeError)rN   rT   rF      && r)   rW   Z%ProxyConfiguration._get_auth_from_url  sK    c]
	:../9L9L1MMM	* 		s   )7 AArK   r`   )__name__
__module____qualname____firstlineno____doc__rQ   rV   r[   Zpropertyr]   rS   rX   rW   __static_attributes____classdictcell__Z__classdict__   @r)   rJ   rJ      sA     2 & &)&
 r(   rJ   c                   s   a  ] tR tRt o RtRRR]RRR3R ltR tR tR t	R	 t
R
 tR tR tRR ltR tR tR tR tRtV tR# )URLLib3Sessioni  a?  A basic HTTP client that supports connection pooling and proxies.

This class is inspired by requests.adapters.HTTPAdapter, but has been
boiled down to meet the use cases needed by botocore. For the most part
this classes matches the functionality of HTTPAdapter in requests v2.7.0
(the same as our vendored version). The only major difference of note is
that we currently do not support sending chunked requests. While requests
v2.7.0 implemented this themselves, later version urllib3 support this
directly via a flag to urlopen so enabling it if needed should be trivial.
TNc                s   Wn         \        W'R 7      V n        R\        P                  P
                  R\        P                  P                  /V n        Vf   \        p\        V\        \        34      '       g   \        V^ ,          V^,          R7      pRV n        RV n        \        V\        4      '       d   W`n        M%\        V\         4      '       d   Vw  V n        V n        W0n        W@n        WPn        Vf   . V n        / V n        \+        R/ V P-                  4       B V n        V P                  V P.                  n        R# ))rO   rP   ZhttphttpsN)ZconnectZreadr'   )_verifyrJ   _proxy_configbotocore
awsrequestZAWSHTTPConnectionPoolZAWSHTTPSConnectionPool_pool_classes_by_schemeDEFAULT_TIMEOUTr>   ZintZfloatr   
_cert_file	_key_filestrtuple_timeout_max_pool_connections_socket_options_proxy_managersr   _get_pool_manager_kwargs_managerpool_classes_by_scheme)rN   r,   rO   timeoutZmax_pool_connectionssocket_optionsZclient_certZproxies_configs   &&&&&&&&r)   rQ   ZURLLib3Session.__init__*  s    /
 H''==X((??(
$ ?%G'C<00gajwqzBGk3'')OU++.9+DOT^%9"-!#%D !#Fd&C&C&EF/3/K/K,r(   c                s    V P                   P                  pR VP                  R4      /VCpVP                  4        UUu/ uF  w  rEVf   K  WEbK  	  upp# u uppi )use_forwarding_for_httpsZproxy_use_forwarding_for_https)ro   r]   r;   Zitems)rN   ZkwargsrP   Zproxies_kwargsZkZvs   &,    r)   _proxies_kwargsZURLLib3Session._proxies_kwargsQ  sf    --66&(8(<(<0)
 	
 "0!5!5!7I!71!7IIIs   AAc                s    R V P                   RV P                  RV P                  4       RV P                  RV P                  RV P
                  /p\        '       d
   \        VR&   VP                  ! R/ VB  V# )r   ZmaxsizeZssl_contextr   Z	cert_fileZkey_fileZ	blocksizer'   )rx   ry   _get_ssl_contextrz   rt   ru   BUFFER_SIZEupdate)rN   Zextra_kwargsZpool_manager_kwargss   &, r)   r|   Z'URLLib3Session._get_pool_manager_kwargs[  sr    t}}t114002d22
 ;/:,""2\2""r(   c                s    \        4       # r%   )r=   r\   rA   r)   r   ZURLLib3Session._get_ssl_contexti  s    %''r(   c                s\   WP                   9  d   V P                  P                  V4      pV P                  V4      pV P	                  VR 7      pVP                  V P                  VR7      4       \        V3/ VB pV P                  Vn	        WPP                   V&   V P                   V,          # ))proxy_headers)proxy_ssl_context)
r{   ro   r[   _setup_proxy_ssl_contextr|   r   r   r   rr   r~   )rN   rE   r   r   Zproxy_manager_kwargsZproxy_managerrZ   r)   _get_proxy_managerZ!URLLib3Session._get_proxy_managerl  s    000 ..@@KM $ = =i H#'#@#@+ $A $  !''$$7H$I +9M8LMM373O3OM0.;  +##I..r(   c                s    \        V4      pVP                  pV'       g   R pVP                  '       d   VR,           VP                  ,           pV# )Z/Z?)r   pathZquery)rN   rT   rF   r   rU   r)   	_path_urlZURLLib3Session._path_url|  sA    c]
D#:
 0 00Dr(   c                s    VP                  4       P                  R 4      '       d"   V'       d   RVn        \        V4      Vn        R# RVn        RVn        R# )rm   r5   Z	CERT_NONEN)r@   r_   r<   r.   Zca_certs)rN   connrT   r,   s   &&&&r)   _setup_ssl_certZURLLib3Session._setup_ssl_cert  s<    99;!!'**v,DN)&1DM(DN DMr(   c                sF   V P                   P                  pVP                  R 4      pVP                  R4      pVf   Vf   R# V P                  4       p \	        V4      p\        VP                  4      '       g   RVn        Ve   VP                  VR7       \        V\        4      '       d$   VP                  V^ ,          V^,          R7       V# \        V\        4      '       d   VP                  V4       V#   \        \        \        3 d   p\!        TR7      hRp?ii ; i)proxy_ca_bundleZproxy_client_certNT)Zcafile)Zkeyfileerror)ro   r]   r;   r   r   rI   rH   r0   Zload_verify_locationsr>   rw   Zload_cert_chainrv   ZOSErrorURLLib3SSLErrorr   r"   )rN   rE   rP   r   Z
proxy_certr2   rT   es   &&      r)   r   Z'URLLib3Session._setup_proxy_ssl_context  s   --66*../@A%))*=>
"z'9'')	5I&C !**)-&*--_-E*e,,''
1z!}'M N J,,''
3N*<= 	5+!44	5s   A;C9 (C9 9D DD c                sT    V'       d   V P                  V4      pV# V P                  pV# r%   )r   r}   )rN   rT   rE   managers   &&& r)   _get_connection_managerZ&URLLib3Session._get_connection_manager  s,    --i8G  mmGr(   c                s$   VR JpV'       g   V P                  V4      # \        V4      P                  pVR8H  ;'       d!    V P                  4       P	                  RR4      pV'       g   VP                  R4      '       d   V# V P                  V4      # )Nrm   r   Fr^   )r   r   rR   r   r;   r_   )rN   rT   rE   Z	has_proxyZproxy_schemeZusing_https_forwarding_proxys   &&&   r)   _get_request_targetZ"URLLib3Session._get_request_target  s    T)	>>#&&
  	*11G# N N$$&**+EuM 	%
 (3>>'+B+BJ>>#&&r(   c                sb    VP                  R R4      p\        V4      pVP                  4       R8H  # )zTransfer-Encodingr(   s   chunked)r;   r   r@   )rN   rY   Ztransfer_encodingrb   r)   _chunkedZURLLib3Session._chunked  s4    #KK(;SA():; &&(J66r(   c                s    V P                   P                  4        V P                  P                  4        F  pVP                  4        K  	  R # r%   )r}   Zclearr{   Zvalues)rN   r   r-   r)   closeZURLLib3Session.close  s4    ++224GMMO 5r(   c                s    V P                   P                  VP                  4      pV P                  VP                  V4      pVP	                  VP                  4      pV P                  WAP                  V P                  4       \        \        P                  P                  R R4      4      '       d.   \        VP                  4      P                  pWTP                  R&   V P                  VP                  V4      pVP                  VP                   VVP"                  VP$                  \'        R4      RRRV P)                  VP$                  4      R7	      p\*        P,                  P/                  VP                  VP0                  VP$                  V4      pVP2                  '       g   VP4                   V#   \6         d   p	\9        TP                  T	R7      hRp	?	i\:        \<        P>                  3 d   p	\A        TP                  T	R7      hRp	?	i\B         d   p	\E        \G        X4      T	R7      hRp	?	i\H         d   p	\K        TP                  T	R7      hRp	?	i\L         d   p	\O        TP                  T	R7      hRp	?	i\P         d   p	\S        YTP                  R7      hRp	?	i\T         d    h \V         d+   p	R	p
\X        P[                  T
R
R7       \]        T	R7      hRp	?	ii ; i)Z(BOTO_EXPERIMENTAL__ADD_PROXY_HOST_HEADERZ rH   F)	methodrT   bodyrY   ZretriesZassert_same_hostZpreload_contentZdecode_contentZchunked)endpoint_urlr   N)rE   r   )r   requestr   z4Exception received when sending urllib3 HTTP requestT)Zexc_infor   )/ro   rV   rT   r   Zconnection_from_urlr   rn   rB   r9   r:   r;   r   Zhostnamer   r   Zurlopenr   r   rY   r   r   rp   rq   ZAWSResponseZstatusZstream_outputZcontentr   r   r   socketZgaierrorr    r	   r#   rG   URLLib3ConnectTimeoutErrorr   URLLib3ReadTimeoutErrorr
   r   r   r   Z	Exceptionr*   r+   r!   )rN   r   rE   r   r   rH   Zrequest_targetZurllib_responseZhttp_responser   Zmessages   &&         r)   sendZURLLib3Session.send  sM   ?	+**88EI227;;	JG..w{{;D  {{DLLA

I2N   ,55-1""6*!55gkk9MN"ll~~"\\e!& %$goo6 + 
O %//;;&&''	M ((( %%   	>1=="FOO4 	M)w{{!LL 	&(31  * 	I%7;;aHH& 	F"1EE 	'w{{   	 	+LGLL4L0!**	+s   F3F6 6K#GK#5K#6HK#K#H11K#>K#?IK##K#$I;;K#K#	J  K#-
K#8K#9%KK#)
rt   ru   r}   ry   rr   ro   r{   rz   rx   rn   r%   )rc   rd   re   rf   rg   MAX_POOL_CONNECTIONSrQ   r   r|   r   r   r   r   r   r   r   r   r   r   rh   ri   rj   rk   r)   rl   rl     sl     	 1%LNJ#(/ !54'(7

@+ @+r(   rl   i   )NNNN)TZloggingr9   Zos.pathr   r7   ZwarningsZbase64r    Zconcurrent.futuresr   Zurllib3r   r   r   Zurllib3.exceptionsr   r   r   r   r   r	   r
   r   r   r   Zurllib3.poolmanagerr   Zurllib3.util.retryr   Zurllib3.util.ssl_r   r   r   r   r   r   Zurllib3.util.urlr   r   r   ZImportErrorZcatch_warningsZsimplefilterZDeprecationWarningZurllib3.contrib.pyopensslr   r   ra   r   Zbotocore.awsrequestrp   Zbotocore.compatr   r   r   r   r   Zbotocore.exceptionsr   r    r!   r"   r#   Z	getLoggerrc   r*   rs   r   r   ZjoinZdirnameZ__file__r&   r   r8   Zcertifir$   r.   r=   rB   rG   rI   rJ   rl   r'   r(   r)   <module>r      s    	   
   - 8 8  K : ' $  '6C
- 
	 	 	"	"h1CD	
 
#1  	 	 	  			8	$ GGLL!:LI 
7O$$ K!M`%$A
8 8vn+ n+u  6 656 
#	" 	$ -,-
   O	T  !!!sf   0E5 9F F-F 6F3 G 5FFF	F F F0/F03	G ?G 
GG