+
    jA                    @  a  0 t $ ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	H
t
 ^ RIHtHt ^ RIHtHtHtHt ^ RIHt ^R	IHt ^R
IHt ]'       d    R0tR0tRR0t0 R-mtR0]mtR0t0 ]m]mRkRkRkRkRkRkt0 ]m]mt 0 ]m]m]mt!0 ]m]m]mt"0 ]m]m]mt#0 ]m]mt$0 ]m]mt%0 ]m]mt&0 ]m]m]mt'RR0]'mt(0 ]m]m]mt)]t*]t+0 ]m]mt,0 ]m]mt-0 ]m]mt.]t/]t0]t1R0t20 R.mt3R/t4. R0O]4O5t5R1t6]! ]74      t8R]9R&   ]]43] R23]!R33]"R43]#R53]$R63]%R73]'R83])R93],R:3]. ]4O]5O]6ORNRN53]2R;3]3R<3]*R=3]+R>3]/R?3]0R@3](RA3]1RB3.t:R]9R&   ]: F'  w  t;t<]; F  t=]8]=,          P}                  ]<4       K  	  K)  	  R  R! lt?R" R# lt@]	R$ R% l4       tAR& R' ltBR( R) ltCR* R+ ltDR,# )C    )annotations)defaultdict)Iterable)copy)	lru_cachepartial)TYPE_CHECKINGAny)
CoreSchemaPydanticCustomErrorValidationErrorto_jsonable_python)core_schema)PydanticMetadata)import_cached_field_infostrict	fail_fast
min_length
max_lengthmultiple_ofallow_inf_nanstrip_whitespaceto_lowerto_upperpatterncoerce_numbers_to_str
ascii_only
max_digitsdecimal_places
union_modezdict[str, set[str]]CONSTRAINTS_TO_ALLOWED_SCHEMASz
typed-dictmodelz&list[tuple[set[str], tuple[str, ...]]]constraint_schema_pairingsc                    V ^8  d   QhRRRR/#    vr
   return )formats   "Llib/python3.14/site-packages/pydantic/_internal/_known_annotated_metadata.py__annotate__r,   e   s            c           	         \        V 4      \        \        \        \        \
        \        R 4      39  d   \        V 4      # V # )N)typeintstrfloatbytesboolr   )r'   s   &r+   as_jsonable_valuer5   e   s/    AwsCtT$Z@@!!$$Hr-   c                    V ^8  d   QhRRRR/# )r&   r   Iterable[Any]r(   r)   )r*   s   "r+   r,   r,   k   s     % % %= %r-   c              #    "   ^ RI p\        4       pV  Fk  p\        W1P                  4      '       d   T Rj  xL
  K*  \        W24      '       d-   VP                   Rj  xL
  \        V4      p. Vn        Vx  Kg  Vx  Km  	  R#  LM L(5i)a  Expand the annotations.

Args:
    annotations: An iterable of annotations.

Returns:
    An iterable of expanded annotations.

Example:
    ```python
    from annotated_types import Ge, Len

    from pydantic._internal._known_annotated_metadata import expand_grouped_metadata

    print(list(expand_grouped_metadata([Ge(4), Len(5)])))
    #> [Ge(ge=4), MinLen(min_length=5)]
    ```
N)annotated_typesr   
isinstanceGroupedMetadatametadatar   )r   at	FieldInfo
annotations   &   r+   expand_grouped_metadatar@   k   sv     & !(*I!
j"4"455!!!
..!**** j)J"$J "!*s!   4BB&BB'BBc                   V ^8  d   QhRR/# )r&   r(   zdict[type, str]r)   )r*   s   "r+   r,   r,      s      ? r-   c                     ^ RI p V P                  RV P                  RV P                  RV P                  RV P
                  RV P                  RV P                  R/# )	aw  Return a mapping of annotated types to constraints.

Normally, we would define a mapping like this in the module scope, but we can't do that
because we don't permit module level imports of `annotated_types`, in an attempt to speed up
the import time of `pydantic`. We still only want to have this dictionary defined in one place,
so we use this function to cache the result.
Ngtgeltler   r   r   )r9   GtGeLtLe
MultipleOfMinLenMaxLen)r=   s    r+   _get_at_to_constraint_maprN      sR     ! 	t
t
t
t
}
		<
		< r-   c               $    V ^8  d   QhRRRRRR/# )r&   r?   r
   schemar   r(   zCoreSchema | Noner)   )r*   s   "r+   r,   r,      s'     j jS j* jAR jr-   c                (  a aaa ^ RI p^RIHpHp VP	                  4       p\        S .4      w  rVVR,          o0 R"mp. pVP                  4        EF  w  op	S\        9  d   \        RS 24      h\        S,          p
SR#9   d"   SR8X  d   \        S VR,          4      VR&   Vu # SV
9   d   SR8X  d   SR8X  d   WR	&   MWS&   Ku  SV9   dI   R
 VV3R llpVP                  \        P                  ! V\        P                  ! R$/ SV	/B 4      4       K  SV9   d   S\        9   d`   TpVR,          R#9   d   VR,          pK  VR,          pVR8X  g   VR8X  d"   VR,          R,          R8X  d   SR8X  d   RMRpMSR8X  d   RMRpMSp\        P                  ! \!        VS,          3/ SV	/B V4      pVP#                  R/ 4      pVP#                  R4      ;pe   / VCV\%        V	4      /CVR&   MV\%        V	4      /VR&   WR&   EK  SR8X  d!   V	RJ d   \        P                  ! VV4      pEK  \'        RS RS R24      h	  V EF&  o \)        S 4      ;p\+        4       ;p9   d\   VV,          oVP#                  S4      pVf   \        RS 24      h\        P                  ! \!        VS\-        S S4      /4      V4      pK{  \/        S VP0                  VP2                  34      '       d   \5        S P6                  R4      '       d   S P6                  P8                  : R2MRo\/        S VP0                  4      '       d   R V V3R llpM
R  V V3R! llp\        P                  ! VV4      pEK&   R# 	  V'       d!   V.V,           p\        P:                  ! V4      # V# )%a  Apply `annotation` to `schema` if it is an annotation we know about (Gt, Le, etc.).
Otherwise return `None`.

This does not handle all known annotations. If / when it does, it can always
return a CoreSchema and return the unmodified schema if the annotation should be ignored.

Assumes that GroupedMetadata has already been expanded via `expand_grouped_metadata`.

Args:
    annotation: The annotation.
    schema: The schema.

Returns:
    An updated schema with annotation if it is an annotation we know about, `None` otherwise.

Raises:
    RuntimeError: If a constraint can't be applied to a specific schema type.
    ValueError: If an unknown constraint is encountered.
N)NUMERIC_VALIDATOR_LOOKUPforbid_inf_nan_checkr/   zUnknown constraint r   rP   r    unionmodec               $    V ^8  d   QhRRRRRR/# )r&   valuer
   handlerzcs.ValidatorFunctionWrapHandlerr(   r)   )r*   s   "r+   r,   *apply_known_metadata.<locals>.__annotate__   s$      %Dr-   c           
        <  V! V 4      pV#   \          d@   pR TP                  4       ^ ,          R ,          9   d   \        RS RT  RS R24      hThRp?ii ; i)r/   Unable to apply constraint 'z' to supplied value z for schema of type ''N)r   errors	TypeError)rW   rX   xve
constraintschema_types   &&  r+   +_apply_constraint_with_incompatibility_infoIapply_known_metadata.<locals>._apply_constraint_with_incompatibility_info   s    A  ' 
 Q!77'::,FZ[`Zaav  xC  wD  DE  F  H
s    A:AAlistzjson-or-pythonjson_schemar   minItemsmaxItems	minLength	maxLengthr<   pydantic_js_updatesr   Fr[   z' to schema of type 'r\   __qualname__  c                    V ^8  d   QhRRRR/# r%   r)   )r*   s   "r+   r,   rY   6          r-   c                Z   < SP                  V 4      pV'       g   \        R RS R24      hV # )predicate_failedz
Predicate failedfuncr   r'   predicate_satisfiedr?   predicate_names   & r+   val_func&apply_known_metadata.<locals>.val_func6  s9    *4//!*<'.1.((8?  Hr-   c                    V ^8  d   QhRRRR/# r%   r)   )r*   s   "r+   r,   rY   A  rp   r-   c                Z   < SP                  V 4      pV'       d   \        R RS R24      hV # )not_operation_failedzNot of rs   rt   rv   s   & r+   ry   rz   A  s9    *4//!*<'*12%n%5V<  Hr-   >   r   r   r   r   r   r   >   function-wrapfunction-afterfunction-beforer)   )r9   _validatorsrR   rS   r   collect_known_metadataitemsr!   
ValueErrorapply_known_metadataappendcsno_info_wrap_validator_function
str_schemaLENGTH_CONSTRAINTS no_info_after_validator_functionr   getr5   RuntimeErrorr/   rN   getattrr:   	PredicateNothasattrru   rl   chain_schema)r?   rP   r=   rR   rS   schema_updateother_metadatachain_schema_constraintschain_schema_stepsrW   allowed_schemasrc   inner_schemainner_schema_typejs_constraint_keyr<   existing_json_schema_updatesannotation_typeat_to_constraint_map	validatorry   ra   rx   rb   s   f&                   @@@r+   r   r      s   ( !K[[]F$:J<$H!M.K* ,.*002
E;;2:,?@@8D PPU_ckUk3Jx@PQF8M /)\)kW.D!&v%*z" 11 $ %%22?AeR\^cQdAe
 33//%"6*.dd#/#9L$0$8!$.%)99l=>YZ`>aek>k6@L6P
V`%7A\7QWb%$.!880<TU@STV\F zz*b1H08=R0SS,`323(*;E*BC3./
 4EFWX]F^2_./!):?*u~88$F !=j\I^_j^kklmnne 3h %
#J//OMfMh5h5Ii-o>J044Z@I  #6zl!CDD88	J
J0O#PQSYF 
R\\266$:;;ELZ__^lEmEm
 < <?qAsuN *bll33   886JF U %X $X(::122Mr-   c                    V ^8  d   QhRRRR/# )r&   r   r7   r(   z tuple[dict[str, Any], list[Any]]r)   )r*   s   "r+   r,   r,   V  s     * * *:Z *r-   c           
        \        V 4      p / p. pV  F  p\        V\        4      '       d   VP                  VP                  4       K6  \        V4      ;p\        4       ;p9   d   WT,          p\        W64      W&   Ki  \        V\
        4      '       dn   \        V\        4      '       dX   TP                  \        V4      P                  4        UUu/ uF   w  rxVP                  R4      '       d   K  WxbK"  	  upp4       K  VP                  V4       K  	  VP                  4        UUu/ uF  w  rxVf   K  WxbK  	  pppW3# u uppi u uppi )a  Split `annotations` into known metadata and unknown annotations.

Args:
    annotations: An iterable of annotations.

Returns:
    A tuple contains a dict of known metadata and a list of unknown annotations.

Example:
    ```python
    from annotated_types import Gt, Len

    from pydantic._internal._known_annotated_metadata import collect_known_metadata

    print(collect_known_metadata([Gt(1), Len(42), ...]))
    #> ({'gt': 1, 'min_length': 42}, [Ellipsis])
    ```
_)r@   r:   r   update__dict__r/   rN   r   
issubclassvarsr   
startswithr   )	r   res	remainingr?   r   r   ra   kr'   s	   &        r+   r   r   V  s   & *+6KCI!
j"233JJz**+!%j!11oOhOj7j7Kk->J%j=CO
D))jEU.V.V JJj)9)?)?)A[)AVYIZ)A[\Z( ""  IIK
9KDA1414KC
9> \ :s   D?.D?&E3Ec               (    V ^8  d   QhRRRRRRRR/# )	r&   r<   zdict[str, Any]allowedzIterable[str]source_typer
   r(   Noner)   )r*   s   "r+   r,   r,     s*     
 
^ 
m 
RU 
Z^ 
r-   c                    V P                  4       \        V4      ,
          pV'       d3   \        RV: RRP                  V Uu. uF  qD: NK  	  up4       24      hR# u upi )a  A small utility function to validate that the given metadata can be applied to the target.
More than saving lines of code, this gives us a consistent error message for all of our internal implementations.

Args:
    metadata: A dict of metadata.
    allowed: An iterable of allowed metadata.
    source_type: The source type.

Raises:
    TypeError: If there is metadatas that can't be applied on source type.
z/The following constraints cannot be applied to z: z, N)keyssetr^   join)r<   r   r   unknownr   s   &&&  r+   check_metadatar     sa     mmoG,G=k_BtyylsYtlsgh\aZblsYtOuNvw
 	
 Yts   AN>   rD   rC   rF   rE   >   r   default_hostdefault_pathdefault_porthost_requiredallowed_schemes)r1   r3   urlmulti-host-url)re   tupler   	frozenset	generator)r2   r0   datetime	timedeltadatetime)r3   )re   )r   )r   r   )dict)r   )r2   )r0   )r   r   r   r   )rT   )r   r   )r4   )uuid)zlax-or-strict)enum)decimal)complex)E__conditional_annotations__
__future__r   collectionsr   collections.abcr   r   	functoolsr   r   typingr	   r
   pydantic_corer   r   r   r   r   r   _fieldsr   _import_utilsr   STRICT	FAIL_FASTr   
INEQUALITYNUMERIC_CONSTRAINTSALLOW_INF_NANSTR_CONSTRAINTSBYTES_CONSTRAINTSLIST_CONSTRAINTSTUPLE_CONSTRAINTSSET_CONSTRAINTSDICT_CONSTRAINTSGENERATOR_CONSTRAINTSSEQUENCE_CONSTRAINTSFLOAT_CONSTRAINTSDECIMAL_CONSTRAINTSINT_CONSTRAINTSBOOL_CONSTRAINTSUUID_CONSTRAINTSDATE_TIME_CONSTRAINTSTIMEDELTA_CONSTRAINTSTIME_CONSTRAINTSLAX_OR_STRICT_CONSTRAINTSENUM_CONSTRAINTSCOMPLEX_CONSTRAINTSUNION_CONSTRAINTSURL_CONSTRAINTSTEXT_SCHEMA_TYPESSEQUENCE_SCHEMA_TYPESNUMERIC_SCHEMA_TYPESr   r!   __annotations__r#   constraintsschemascr   r5   r@   rN   r   r   r   )r   s   @r+   <module>r      s4   " " # $  ( % ^ ^ + % 3
M	"L1 %
$2z2  !			 	 		
 	 	 	 	 3(262 ='=&=9= >(>6>I> <&<<)<1'1&1 6,6v6 8+8i8 C)CMCFC #%5J8IJ A'A-A&A  7-77 7-77 2(262 "   !N  > ^L]^ P 6A#6F  3 F '(
#y!
#*+y!N+
#hEFg g#8g;OgQ]g_fgh
#/0y!y! 23y!,',')F B . 7K&q)009  7
%P  *jZ*Z
r-   