
    h
=                    t   S SK Jr  S SKrS SKrS SKrS SKrS SKrS SKrS SK	rS SK
rS SKrS SKrS SKrS SKrSSKJr  SSKJr  SSKJr  SSKJr  \R0                  (       a  S SKrSaS jrSbS	 jrScSdS jjr          SeS jrScSfS jjr          SgS jrShS jr \RB                  \RB                  \"\"4   S4   r#\RB                  \#S4   r$\RJ                  \"\RL                  \"\$\#4   4   r'SiS jr( Sc       SjS jjr)SkS jr*        SlS jr+        SlS jr,        SmS jr-\R\                  " S
S9\R^                  " S\"S9\R`                  " SSS\"SS 9\R`                  " S!S"S#\"\"4S$S%S&9\R`                  " S'S(S)\"S*S 9\R`                  " S+S,S-\"\"4S$S.S&9\R`                  " S/S0S1\"\Rb                  " S2S394S$S4S&9\R`                  " S5S6S7\"\+S8S99\R`                  " S:S;S\"\"4S$S<S&9\R`                  " S=S>\"\"4S$S?S&9\R`                  " S@SA\"\"4SB\,SCSD9\R`                  " SESF\"SSGSH9\R`                  " SISJ\2SKSLSH9\R`                  " SMSNS$S
SOSP9\R`                  " SQSRS$S$SSSP9\R`                  " STS\3S$S
SUSV9\R`                  " SW\Rb                  " SX5      SYS 9\R`                  " SZS[\3S$S
S\SV9\R`                  " S]S$S$S
\-S^S_9                                    SnS` j5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       5       r4g)o    )annotationsN   )Client)RequestError)Response)codesc                    [         R                  R                  5       n U R                  SSS9  U R                  5         U R                  SSS9  U R                  5         U R                  SSS9  U R                  5         [         R                  R
                  R                  SSS	9nUR                  S
SSSS9  UR                  S5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  SS5        UR                  S S!5        UR                  S"S#5        UR                  S$S%5        UR                  S&S'5        UR                  S(S)5        UR                  S*S+5        UR                  S,S-5        UR                  S.S/5        U R                  U5        g )0Nz[bold]HTTPX :butterfly:center)justifyzA next generation HTTP client.z7Usage: [bold]httpx[/bold] [cyan]<URL> [OPTIONS][/cyan] leftr   T)paddingpad_edge	Parameterbold)no_wrapr   styleDescriptionz-m, --method [cyan]METHODz{Request method, such as GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD.
[Default: GET, or POST if a request body is included]z#-p, --params [cyan]<NAME VALUE> .../Query parameters to include in the request URL.z-c, --content [cyan]TEXT,Byte content to include in the request body.z!-d, --data [cyan]<NAME VALUE> ...)Form data to include in the request body.z%-f, --files [cyan]<NAME FILENAME> ...*Form files to include in the request body.z-j, --json [cyan]TEXT)JSON data to include in the request body.z$-h, --headers [cyan]<NAME VALUE> .../Include additional HTTP headers in the request.z --cookies [cyan]<NAME VALUE> ..."Cookies to include in the request.z--auth [cyan]<USER PASS>Username and password to include in the request. Specify '-' for the password to use a password prompt. Note that using --verbose/-v will expose the Authorization header, including the password encoding in a trivially reversible format.z--proxy [cyan]URLISend the request via a proxy. Should be the URL giving the proxy address.z--timeout [cyan]FLOATzTimeout value to use for network operations, such as establishing the connection, reading some data, etc... [Default: 5.0]--follow-redirectsAutomatically follow redirects.--no-verifyDisable SSL verification.--http2@Send the request using HTTP/2, if the remote server supports it.z--download [cyan]FILE?Save the response content as a file, rather than displaying it.z-v, --verbosez1Verbose output. Show request as well as response.--helpShow this message and exit.)	richconsoleConsoleprinttableTablegrid
add_columnadd_row)r(   r+   s     =/var/www/html/env/lib/python3.13/site-packages/httpx/_main.py
print_helpr1      s   ll""$GMM+XM>MMOMM2HMEMMOMMA6   MMOJJ!!!d!;E	[$fM	]#	MM#	@
 
MM-9 
MM"$R 
MM+-X 
MM/4 
MM)+VW	MM.9 
MM*,P 
MM"	- 
MMS
 
MM	@ 
MM&(IJ	MM-!<=	MMU 
MMI
 
MM/#VW	MM(9:MM%    c                T   U R                   R                  S5      nUbf  UR                  S5      u  n  n [        R                  " [
        [        R                  R                  UR                  5       5      R                  5      $ g! [        R                  R                   a     gf = f)NzContent-Type; )headersget	partitiontypingcaststrpygmentslexersget_lexer_for_mimetypestripnameutilClassNotFound)responsecontent_type	mime_type_s       r0   get_lexer_for_responserG   g   s    ##''7L&005	1a	;;X__;;IOO<MNSS 
  }}** 		s   AB B'&B'Fhttp2c           
        U(       a  SOSnU R                    VVs/ s H   u  p4U(       a  UR                  5       OUU4PM"     nnnU R                  R                  S5      nU R                  R
                  R                  S5      nU SU SU 3/U VVs/ s H*  u  p4UR                  S5       SUR                  S5       3PM,     snn-   nSR                  U5      $ s  snnf s  snnf )NzHTTP/2zHTTP/1.1ascii : 
)r6   lowermethoddecodeurltargetjoin)	requestrH   versionr@   valuer6   rO   rR   liness	            r0   format_request_headersrX   t   s    hZGDKOODS[TD%0O   ^^""7+F[[&&w/Fxq'+,NU0NU{t4;;w
 5<<#8"9:g0 E 99U
0s   'C1C"r6   c           
     2   U R                  S5      nUc  [        R                  " U5      OUR                  S5      nU SU SU 3/U VVs/ s H*  u  pgUR                  S5       SUR                  S5       3PM,     snn-   nSR                  U5      $ s  snnf )NrJ   rK   rL   rM   )rP   r   get_reason_phraserS   )	http_versionstatusreason_phraser6   rU   reasonr@   rV   rW   s	            r0   format_response_headersr_      s     !!'*G   	'!!'* 
 y&6(+,NU0NU{t4;;w
 5<<#8"9:g0 E 99U0s   1Bc                   [         R                  R                  5       n[        XS9n[         R                  R                  USSSS9nUR                  U5        [         R                  R                  SSSSS9nUR                  U5        g )NrH   http	ansi_darkTtheme	word_wrapr5   )r'   r(   r)   rX   syntaxSyntaxr*   )rT   rH   r(   	http_textrg   s        r0   print_request_headersrj      sq    ll""$G&w<I[[	6PTUFMM&[[F+NFMM&r2   c                   [         R                  R                  5       n[        XX#5      n[         R                  R                  USSSS9nUR                  U5        [         R                  R                  SSSSS9nUR                  U5        g )Nrb   rc   Trd   r5   )r'   r(   r)   r_   rg   rh   r*   )r[   r\   r]   r6   r(   ri   rg   s          r0   print_response_headersrl      su     ll""$G'mUI[[	6PTUFMM&[[F+NFMM&r2   c                   [         R                  R                  5       n[        U 5      nU(       ax  UR	                  5       S:X  a'   U R                  5       n[
        R                  " USS9nOU R                  n[         R                  R                  XBSSS9nUR                  U5        g UR                  S[        U R                  5       S35        g ! [         a    U R                  n Nrf = f)	Njson   )indentrc   Trd   <z bytes of binary data>)r'   r(   r)   rG   rN   rn   dumps
ValueErrortextrg   rh   r*   lencontent)rC   r(   
lexer_namedatart   rg   s         r0   print_responsery      s    ll""$G'1J'%}}zz$q1 ==D##DKSW#Xf#h../00FGH  %}}%s   %C C+*C+.c           
        / nU R                  5        H  u  p#[        U[        [        45      (       a  UR	                  SU S35        U H  nUS;   a)  U H!  nUR	                  SUS    SUS   < 35        M#     M2  [        U[        5      (       a/  [        U5      S:X  a   UR	                  SUS    SUS   < 35        Mv  UR	                  SU< 35        M     M  UR	                  SU SU< 35        M     S	R                  U5      $ )
Nz*   :)subjectissuerz*     r   rL   r      rM   )items
isinstancelisttupleappendru   rS   )certrW   keyrV   itemsub_items         r0   format_certificater      s    Ejjl
edE]++LL4uA'//$(vhqk]"Xa[O%LM %)e,,TaLL6$q'"T!WK!@ALL6$!23  LL4uBui01 # 99Ur2   c                   [         R                  R                  5       nU S:X  a"  U(       a  US   nUR                  SU< 35        g U S:X  a<  U(       a5  US   nUR	                  S5      nUR                  SUS   < S	US
    35        g U S:X  a  U(       a  US   nUR	                  S5      nUR                  5       nUR                  5       n	UR                  5       n
UR                  5       nUR                  SU< SU	S   < 35        UR                  SU< 35        U
(       a,  UR                  S5        UR                  [        U
5      5        g g U S:X  a  U(       a  US   n[        USS9  g U S:X  a  U(       a  US   n[        USS9  g U S:X  a  US   u  pnn[        XUU5        g U S:X  a  US   u  nnSnS n[        XUU5        g g )Nzconnection.connect_tcp.startedhostz* Connecting to zconnection.connect_tcp.completereturn_valueserver_addrz* Connected to r   z	 on port r   zconnection.start_tls.complete
ssl_objectz* SSL established using z / z* Selected ALPN protocol: z* Server certificate:z#http11.send_request_headers.startedrT   Fra   z"http2.send_request_headers.startedTz(http11.receive_response_headers.completez'http2.receive_response_headers.completes   HTTP/2)r'   r(   r)   r*   get_extra_inforU   ciphergetpeercertselected_alpn_protocolr   rj   rl   )r@   infoverboser(   r   streamr   r   rU   r   server_certalpnrT   r[   r\   r]   r6   s                    r0   tracer      s    ll""$G//GF|(12	2	2wn%++M:A'9;q>BRST	0	0Wn%**<8
$$&""$ ,,.00203vaymLM24(;<MM12MM,[9:  
6	67y/gU3	5	5'y/gT2	;	;7;N7K4mW|]GL	:	:~. |]GL	 
;r2   c                   [         R                  R                  5       nUR                  5         U R                  R                  S5      n[         R                  R                  SS[         R                  R                  S S9[         R                  R                  5       [         R                  R                  5       5       nS[         R                  R                  UR                  5       3nUR                  U[        U=(       d    S5      US LS9nU R!                  5        H-  nUR#                  U5        UR%                  X`R&                  S9  M/     S S S 5        g ! , (       d  f       g = f)	NzContent-Lengthz([progress.description]{task.description}z-[progress.percentage]{task.percentage:>3.0f}%)	bar_widthzDownloading [bold]r   )totalstart)	completed)r'   r(   r)   r*   r6   r7   progressProgress	BarColumnDownloadColumnTransferSpeedColumnmarkupescaper@   add_taskint
iter_byteswriteupdatenum_bytes_downloaded)rC   downloadr(   content_lengthr   descriptiondownload_taskchunks           r0   download_responser      s   ll""$GMMO%%))*:;N			27$/$$&))+
 
*4;;+=+=hmm+L*MN ))n)* , * 

 ((*ENN5!OOM5R5ROS +
 
 
s    BE
E*c                    Uc  g  [         R                  " U5      $ ! [         R                   a    [        R                  " S5      ef = f)NzNot valid JSON)rn   loadsJSONDecodeErrorclickBadParameterctxparamrV   s      r0   validate_jsonr     sG    
 }3zz%   3  !1223s	    +Ac                T    US:X  a  g Uu  p4US:X  a  [         R                  " SSS9nX44$ )NNN-PasswordT)
hide_input)r   prompt)r   r   rV   usernamepasswords        r0   validate_authr     s7    
 H3<<
t<r2   c                j    U(       a  U R                   (       a  g [        5         U R                  5         g )N)resilient_parsingr1   exitr   s      r0   handle_helpr   -  s     
 C))LHHJr2   )add_help_optionrQ   )typez--methodz-mrO   z{Request method, such as GET, POST, PUT, PATCH, DELETE, OPTIONS, HEAD. [Default: GET, or POST if a request body is included])r   helpz--paramsz-pparamsTr   )r   multipler   z	--contentz-crv   r   z--dataz-drx   r   z--filesz-ffilesrb)moder   z--jsonz-jrn   r   )r   callbackr   z	--headersz-hr   z	--cookiescookiesr   z--authauthr   r   )r   defaultr   r   z--proxyproxyr   )r   r   r   z	--timeouttimeoutg      @r   r   follow_redirectsr   )is_flagr   r   r    verifyr!   r"   r#   )r   r   r   r   z
--downloadwbr$   z	--verbosez-vz*Verbose. Show request as well as response.r%   r&   )r   is_eagerexpose_valuer   r   c                *   U(       d   U(       d  U(       d  U(       d  U(       a  SOSn [        XXS9 nUR                  UU [        U5      U[        U5      UUU[        U5      U	US[        R
                  " [        US90S9 nUb  [        UU5        O,UR                  5         UR                  (       a  [        U5        SSS5        SSS5        [$        R&                  " WR(                  (       a  S5        gS
5        g! , (       d  f       NE= f! , (       d  f       NN= f! [         ah  n[        R                  R                  5       nUR                  S[!        U5      R"                   S	U 35        [$        R&                  " S
5         SnANSnAff = f)zI
An HTTP command line client.
Sends a request and displays the response.
POSTGET)r   r   rH   r   r   )r   )
r   rv   rx   r   rn   r6   r   r   r   
extensionsNz[red]z[/red]: r   r   )r   r   r   dict	functoolspartialr   r   readrv   ry   r   r'   r(   r)   r*   r   __name__sysr   
is_success)rQ   rO   r   rv   rx   r   rn   r6   r   r   r   r   r   r   rH   r   r   clientrC   excr(   s                        r0   mainr   9  s:   D "det%MQWF|$ZW!1#Y%6%6ug%NO   '%h9MMO''&x0' N6 HH(%%Q-1-5  NM,  ,,&&(d3i001#?@sN   
D  AD=C>?DD  >
D	D
DD  D   
F*AFF)returnNone)rC   r   r   r;   )F)rT   httpcore.RequestrH   boolr   r;   )
r[   bytesr\   r   r]   bytes | Noner6   list[tuple[bytes, bytes]]r   r;   )rT   r   rH   r   r   r   )
r[   r   r\   r   r]   r   r6   r   r   r   )rC   r   r   r   )r   _PeerCertRetDictTyper   r;   )r@   r;   r   ztyping.Mapping[str, typing.Any]r   r   r   r   )rC   r   r   ztyping.BinaryIOr   r   )r   click.Contextr   click.Option | click.ParameterrV   
typing.Anyr   r   )r   r   r   r   rV   r   r   r   )$rQ   r;   rO   r;   r   list[tuple[str, str]]rv   r;   rx   r   r   zlist[tuple[str, click.File]]rn   r;   r6   r   r   r   r   ztuple[str, str] | Noner   r;   r   floatr   r   r   r   rH   r   r   ztyping.BinaryIO | Noner   r   r   r   )5
__future__r   r   rn   r   r9   r   pygments.lexersr<   pygments.utilrich.consoler'   rich.markuprich.progressrich.syntax
rich.table_clientr   _exceptionsr   _modelsr   _status_codesr   TYPE_CHECKINGhttpcorer1   rG   rX   r_   rj   rl   ry   Tupler;   _PCTRTT_PCTRTTTDictUnionr   r   r   r   r   r   r   commandargumentoptionFiler   r   r    r2   r0   <module>r     s?   "   
           %   	JZ

   '	
 	$   '	
 
I& ,,v||CH-s2
3<<%{{3S(G5K(L#LM & GL$M
$M4$M?C$M	$MNT,3	3)3 3 	3 	 )    	 			)	 	 
		 u%C 		@	 
s	: 		7 

s	4 
uzzt$	%	5 
		4 
s	: 
s	- 

s	L 		T 		?	 	* 	$ 		K 	D		J
 		5 	&6.	6.6. "6. 	6.
  6. (6. 6. #6. #6. !6. 6. 6. 6. 6. 6.  %!6." #6.$ 
%6.		 ! &V6.r2   