+
    Q?jZ                         ^ 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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   "v/home/vela/workspace/domain/tn-silver/web/tn-site/.runtime/imagegen-venv/lib/python3.14/site-packages/httpx2/_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     0 0!6 0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      '       d4   R	V9   d"   VP                  R	4      w  rgpRVR
V RV 2&   Ky  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://[z]/]	localhostzall://*)httphttpsall)r   getsplitstripis_ipv4_hostnameis_ipv6_hostname	partitionlower)	
proxy_infomountsschemehostnamehostno_proxy_hostsaddr_subnets	            r   get_environment_proxiesr2      s`    J$&F*>>&!!!)H16(1BX'RZQ[H\FXS>" +
 0:~~dB/G/M/Mc/RS/Rtjjl/RNS" s?
 IX  #' !(++.2z*+!(++(?&.&8&8&=ODV9=FWTF"VH5648FWXJa01![0.2z*+/3
+,= #@ MC 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   Q   s&     G GK G3 GU Gr   c                T    \        V \        4      '       d   V P                  V4      # T # N
isinstancer   encoder
   r5   s   &&r   to_bytesr=   Q   s"    %/s%;%;5<<!FFr   c               $    V ^8  d   QhRRRRRR/# )r	   r
   r4   r5   r   r   r   )r   s   "r   r   r   U   s&     G G+ G G3 Gr   c                T    \        V \        4      '       d   V # V P                  V4      # r8   )r:   r   decoder<   s   &&r   to_strrA   U   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   Y   s&     G G3 G} G Gr   c                R    \        V\        4      '       d   V # V P                  4       # r8   r9   )r
   rC   s   &&r   to_bytes_or_strrE   Y   s    }c225FFr   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)rG   fdlengthoffsets   &   r   peek_filelike_lengthrV   ]   s    
]]_"%% M G$ 
	 [[]F[[BKK0FKK
 M	 ( 		
s(   04 B$AB

B B$B  B$c                  l    ] tR t^vt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# )
URLPatternaN  
A utility class currently used for making lookups against proxy keys...

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

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

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

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

# With port matching...
>>> pattern = URLPattern("https://example.com:1234")
>>> pattern.matches(httpx2.URL("https://example.com:1234"))
True
>>> pattern.matches(httpx2.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   
ValueErrorrZ   r+   r-   port
host_regex
startswithreescapecompile)selfrZ   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-   re   matchrd   rj   rp   s   &&r   matchesURLPattern.matches   sl    ;;;4;;%,,69994T__=R=RSXS]S]=^=^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.
)rd   lenr-   r+   )rj   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      # r8   )hashrZ   )rj   s   &r   __hash__URLPattern.__hash__   s    DLL!!r   c                    V ^8  d   QhRRRR/# )r	   rp   rX   r   rq   r   )r   s   "r   r   r\      s     . .J .4 .r   c                	4    V P                   VP                   8  # r8   )r}   rt   s   &&r   __lt__URLPattern.__lt__   s    }}u~~--r   c                    V ^8  d   QhRRRR/# )r	   rp   rH   r   rq   r   )r   s   "r   r   r\      s     O OJ O4 Or   c                	d    \        V\        4      ;'       d    V P                  VP                  8H  # r8   )r:   rX   rZ   rt   s   &&r   __eq__URLPattern.__eq__   s$    %,NN1NNr   )r-   re   rZ   rd   r+   N)__name__
__module____qualname____firstlineno____doc__rm   ru   propertyr}   r   r   r   __static_attributes__r   r   r   rX   rX   v   s<    'R8< ? ?".O Or   rX   c                    V ^8  d   QhRRRR/# r	   r,   r   r   rq   r   )r   s   "r   r   r            s t r   c                     \         P                  ! V P                  R 4      ^ ,          4       R#   \         d     R# i ; ir   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   rK   rg   typingurllib.requestr   _typesr   TYPE_CHECKINGrb   r   r   r2   r=   rA   rE   rV   rX   r%   r&   r   r   r   <module>r      sd    "  	 	  % !	0fGGG2fO fORr   