+
    ~j]                        ^ RI Ht ^ RIt^ RIHtHtHt ^ RIHt ]P                  ! R4      t
]P                  ! R4      tR R ltR	 R
 ltR R ltR R ltR R ltR# )    )annotationsN)AnyMappingCallablequotez^(?:\.|%2[eE]){1,2}$z	\{(\w+)\}c                    V ^8  d   QhRRRR/#    valuestrreturn )formats   "k/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/anthropic/_utils/_path.py__annotate__r      s     	. 	.C 	.C 	.    c                    \        V RR7      # )u   Percent-encode `value` for use in a URI path segment.

Considers characters not in `pchar` set from RFC 3986 §3.3 to be unsafe.
https://datatracker.ietf.org/doc/html/rfc3986#section-3.3
z!$&'()*+,;=:@safer   r   s   &r   _quote_path_segment_partr      s     _--r   c                    V ^8  d   QhRRRR/# r
   r   )r   s   "r   r   r      s     . .S .S .r   c                    \        V RR7      # )u   Percent-encode `value` for use in a URI query string.

Considers &, = and characters not in `query` set from RFC 3986 §3.4 to be unsafe.
https://datatracker.ietf.org/doc/html/rfc3986#section-3.4
z!$'()*+,;:@/?r   r   r   s   &r   _quote_query_partr      s     _--r   c                    V ^8  d   QhRRRR/# r
   r   )r   s   "r   r   r   &   s     0 0 0 0r   c                    \        V RR7      # )u   Percent-encode `value` for use in a URI fragment.

Considers characters not in `fragment` set from RFC 3986 §3.5 to be unsafe.
https://datatracker.ietf.org/doc/html/rfc3986#section-3.5
z!$&'()*+,;=:@/?r   r   r   s   &r   _quote_fragment_partr   &   s     .//r   c               (    V ^8  d   QhRRRRRRRR/# )r   templater   valueszMapping[str, Any]quoterzCallable[[str], str]r   r   )r   s   "r   r   r   /   s0       ! 		r   c                d   \         P                  V 4      p\        ^\        V4      ^4       Fq  pW4,          pWQ9  d   \	        RV R24      hW,          pVf   RW4&   K2  \        V\        4      '       d   V'       d   RMRW4&   KX  V! \        W,          4      4      W4&   Ks  	  RP                  V4      # )zReplace {name} placeholders in `template`, quoting each value with `quoter`.

Placeholder names are looked up in `values`.

Raises:
    KeyError: If a placeholder is not found in `values`.
za value for placeholder {z} was not providednulltruefalse )	_PLACEHOLDER_REsplitrangelenKeyError
isinstanceboolr   join)r    r!   r"   partsinamevals   &&&    r   _interpolater4   /   s     !!(+E1c%j!$x7v=PQRRl;EHT""!$v'EHc&,/0EH % 775>r   c               $    V ^8  d   QhRRRRRR/# )r   r    r   kwargsr   r   r   )r   s   "r   r   r   N   s!     1 1C 1c 1c 1r   c                  RpRpT pRV9   d   VP                  R^4      w  rBRV9   d   VP                  R^4      w  rCTp\        WQ\        4      pVP                  R4       F2  p\        P	                  V4      '       g   K   \        RV: RV: R24      h	  TpVe   VR\        W1\        4      ,           ,          pVe   VR\        W!\        4      ,           ,          pV# )uS  Interpolate {name} placeholders in `template` from keyword arguments.

Args:
    template: The template string containing {name} placeholders.
    **kwargs: Keyword arguments to interpolate into the template.

Returns:
    The template with placeholders interpolated and percent-encoded.

    Safe characters for percent-encoding are dependent on the URI component.
    Placeholders in path and fragment portions are percent-encoded where the `segment`
    and `fragment` sets from RFC 3986 respectively are considered safe.
    Placeholders in the query portion are percent-encoded where the `query` set from
    RFC 3986 §3.3 is considered safe except for = and & characters.

Raises:
    KeyError: If a placeholder is not found in `kwargs`.
    ValueError: If resulting path contains /./ or /../ segments (including percent-encoded dot-segments).
N#?/zConstructed path z contains dot-segment z which is not allowed)r)   r4   r   _DOT_SEGMENT_REmatch
ValueErrorr   r   )	r    r6   fragment_templatequery_templaterestpath_templatepath_resultsegmentresults	   ",       r   rA   rA   N   s    * %)!%ND
d{"&**S!"4
d{#zz#q1M }6NOK $$S)  ))0?UV]U``uvww * F!#^=NOOO$#%6@TUUUMr   )
__future__r   retypingr   r   r   urllib.parser   compiler;   r(   r   r   r   r4   rA   r   r   r   <module>rJ      sR    " 	 
  **45**\*	..0>1r   