+
    i]                        ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIHt ^RIH	t	 ]P                  '       d   ^RIHt R R ltR R	 ltRR
 R lltRR R lltR R ltR R ltR R lt ! R R4      tR R ltR R ltR# )    )annotationsN)
getproxies)PrimitiveDataURLc                    V ^8  d   QhRRRR/# )   valuer   returnstr )formats   "_/Users/igloo/.openclaw/workspace/scratch/fb_ad_env/lib/python3.14/site-packages/httpx/_utils.py__annotate__r      s      - C     c                D    V RJ d   R# V RJ d   R# V f   R# \        V 4      # )z{
Coerce a primitive data type into a string value.

Note that we prefer JSON-style 'true'/'false' for boolean values here.
TtrueFfalse )r   r
   s   &r   primitive_value_to_strr      s*     }	%	u:r   c                   V ^8  d   QhRR/# )r	   r   zdict[str, str | None]r   )r   s   "r   r   r      s     . .!6 .r   c                 .   \        4       p / pR F7  pV P                  V4      '       g   K  W,          pRV9   d   TMRV 2W R2&   K9  	  V P                  RR4      P                  R4       Uu. uF  qDP                  4       NK  	  ppV F  pVR8X  d   / u # V'       g   K  RV9   d   RW&   K%  \	        V4      '       d   RVRV 2&   K@  \        V4      '       d   RVR	V R
2&   K\  VP                  4       R8X  d   RVRV 2&   K{  RVRV 2&   K  	  V# u upi )z+Gets proxy information from the environmentz://zhttp://nor   ,*Nzall://zall://[]	localhostzall://*)httphttpsall)r   getsplitstripis_ipv4_hostnameis_ipv6_hostnamelower)
proxy_infomountsschemehostnamehostno_proxy_hostss         r   get_environment_proxiesr.      s-    J$&F*>>&!!!)H!X-WXJ3G XS>" + 0:~~dB/G/M/Mc/RS/Rtjjl/RNS" s?
 IX  #' !(++.2z*+!(++04
!,-![0.2z*+/3
+,5 #8 M; Ts   -Dc               $    V ^8  d   QhRRRRRR/# )r	   r
   str | bytesencodingr   r   bytesr   )r   s   "r   r   r   O   s&     G GK G3 GU Gr   c                T    \        V \        4      '       d   V P                  V4      # T # N
isinstancer   encoder
   r1   s   &&r   to_bytesr9   O   s"    %/s%;%;5<<!FFr   c               $    V ^8  d   QhRRRRRR/# )r	   r
   r0   r1   r   r   r   )r   s   "r   r   r   S   s&     G G+ G G3 Gr   c                T    \        V \        4      '       d   V # V P                  V4      # r4   )r6   r   decoder8   s   &&r   to_strr=   S   s"    uc**5FX0FFr   c               $    V ^8  d   QhRRRRRR/# )r	   r
   r   match_type_ofztyping.AnyStrr   r   )r   s   "r   r   r   W   s&     G G3 G} G Gr   c                R    \        V\        4      '       d   V # V P                  4       # r4   r5   )r
   r?   s   &&r   to_bytes_or_strrA   W   s    }c225FFr   c                    V ^8  d   QhRRRR/# )r	   r
   r   r   r   )r   s   "r   r   r   [   s     B B3 B3 Br   c                P    V ^ ,          V R,          u;8X  d   R8X  d	   M MV ^R # T # )r   "r   r   s   &r   unquoterF   [   s'    (eBi63652;AEAr   c                    V ^8  d   QhRRRR/# )r	   stream
typing.Anyr   z
int | Noner   )r   s   "r   r   r   _   s       
 r   c                N    V P                  4       p\        P                  ! V4      P                  pV#   \        \
        3 d`     T P                  4       pT P                  ^ \        P                  4      pT P                  T4        T#   \        \
        3 d      R# i ; ii ; i)zg
Given a file-like stream object, return its length in number of bytes
without reading it into memory.
N)	filenoosfstatst_sizeAttributeErrorOSErrortellseekSEEK_END)rH   fdlengthoffsets   &   r   peek_filelike_lengthrW   _   s    
]]_"%% M G$ 
	 [[]F[[BKK0FKK
 M	 ( 		
s(   04 B$AB

B B$B  B$c                  l    ] tR t^xtRtR R ltR R lt]R R l4       tR R	 lt	R
 R lt
R R ltRtR# )
URLPatternaC  
A utility class currently used for making lookups against proxy keys...

# Wildcard matching...
>>> pattern = URLPattern("all://")
>>> pattern.matches(httpx.URL("http://example.com"))
True

# Witch scheme matching...
>>> pattern = URLPattern("https://")
>>> pattern.matches(httpx.URL("https://example.com"))
True
>>> pattern.matches(httpx.URL("http://example.com"))
False

# With domain matching...
>>> pattern = URLPattern("https://example.com")
>>> pattern.matches(httpx.URL("https://example.com"))
True
>>> pattern.matches(httpx.URL("http://example.com"))
False
>>> pattern.matches(httpx.URL("https://other.com"))
False

# Wildcard scheme, with domain matching...
>>> pattern = URLPattern("all://example.com")
>>> pattern.matches(httpx.URL("https://example.com"))
True
>>> pattern.matches(httpx.URL("http://example.com"))
True
>>> pattern.matches(httpx.URL("https://other.com"))
False

# With port matching...
>>> pattern = URLPattern("https://example.com:1234")
>>> pattern.matches(httpx.URL("https://example.com:1234"))
True
>>> pattern.matches(httpx.URL("https://example.com"))
False
c                    V ^8  d   QhRRRR/# )r	   patternr   r   Noner   )r   s   "r   r   URLPattern.__annotate__   s     8 8 8 8r   c                	   ^RI Hp V'       d   RV9  d   \        RV RV R24      hV! V4      pWn        VP                  R8X  d   RMVP                  V n        VP
                  R8X  d   RMVP
                  V n        VP                  V n        VP
                  '       d   VP
                  R8X  d
   R	V n        R	# VP
                  P                  R
4      '       dI   \        P                  ! VP
                  R,          4      p\        P                  ! RV R24      V n        R	# VP
                  P                  R4      '       dI   \        P                  ! VP
                  R,          4      p\        P                  ! RV R24      V n        R	# \        P                  ! VP
                  4      p\        P                  ! RV R24      V n        R	# )   r   :zUProxy keys should use proper URL forms rather than plain scheme strings. Instead of "z", use "z://"r!   r   r   Nz*.:r	   NNz^.+\.$:r_   NNz^(.+\.)?^)_urlsr   
ValueErrorr[   r*   r,   port
host_regex
startswithreescapecompile)selfr[   r   urldomains   &&   r   __init__URLPattern.__init__   sK   s')&ixy>  'lJJ%/bSZZ((c/Bsxx	HH	xxx388s?:>DOXX  &&YYsxx|,F jj6&);<DOXX  %%YYsxx|,F jj9VHA)>?DO YYsxx(F jj1VHA7DOr   c                    V ^8  d   QhRRRR/# )r	   otherr   r   boolr   )r   s   "r   r   r]      s      S T r   c                	T   V P                   '       d   V P                   VP                   8w  d   R # V P                  '       d<   V P                  e.   V P                  P                  VP                  4      '       g   R # V P                  e   V P                  VP                  8w  d   R # R# )FT)r*   r,   rf   matchre   rk   rq   s   &&r   matchesURLPattern.matches   sk    ;;;4;;%,,6III+OO))%**5599 TYY%**%<r   c                   V ^8  d   QhRR/# )r	   r   ztuple[int, int, int]r   )r   s   "r   r   r]      s     ? ?. ?r   c                    V P                   e   ^ M^p\        V P                  4      ) p\        V P                  4      ) pWV3# )zu
The priority allows URLPattern instances to be sortable, so that
we can match from most specific to least specific.
)re   lenr,   r*   )rk   port_priorityhost_priorityscheme_prioritys   &   r   priorityURLPattern.priority   s?     "YY2TYYt{{++o>>r   c                   V ^8  d   QhRR/# )r	   r   intr   )r   s   "r   r   r]      s     " "# "r   c                	,    \        V P                  4      # r4   )hashr[   )rk   s   &r   __hash__URLPattern.__hash__   s    DLL!!r   c                    V ^8  d   QhRRRR/# )r	   rq   rY   r   rr   r   )r   s   "r   r   r]      s     . .J .4 .r   c                	4    V P                   VP                   8  # r4   )r~   ru   s   &&r   __lt__URLPattern.__lt__   s    }}u~~--r   c                    V ^8  d   QhRRRR/# )r	   rq   rI   r   rr   r   )r   s   "r   r   r]      s     O OJ O4 Or   c                	d    \        V\        4      ;'       d    V P                  VP                  8H  # r4   )r6   rY   r[   ru   s   &&r   __eq__URLPattern.__eq__   s$    %,NN1NNr   )r,   rf   r[   re   r*   N)__name__
__module____qualname____firstlineno____doc__rn   rv   propertyr~   r   r   r   __static_attributes__r   r   r   rY   rY   x   s<    'R8< ? ?".O Or   rY   c                    V ^8  d   QhRRRR/# r	   r+   r   r   rr   r   )r   s   "r   r   r            s t r   c                     \         P                  ! V P                  R 4      ^ ,          4       R#   \         d     R# i ; i/FT)	ipaddressIPv4Addressr#   	Exceptionr+   s   &r   r%   r%      <    hnnS1!45      ,0 ??c                    V ^8  d   QhRRRR/# r   r   )r   s   "r   r   r      r   r   c                     \         P                  ! V P                  R 4      ^ ,          4       R#   \         d     R# i ; ir   )r   IPv6Addressr#   r   r   s   &r   r&   r&      r   r   )zutf-8)
__future__r   r   rL   rh   typingurllib.requestr   _typesr   TYPE_CHECKINGrc   r   r   r.   r9   r=   rA   rF   rW   rY   r%   r&   r   r   r   <module>r      sj    "  	 	  % !	.bGGGB2jO jOZr   