
    i                       % S SK Jr  S SKJrJr  S SKJrJr  S SKJr	  S SKJ
r  S SKJr  S SKJr  S SKJr  S S	KJr  S S
KJr  S SKJrJrJrJrJr  S SKJrJr  S SKJr   S SK!J"r"  SSK#J$r$J%r%JrJ
r
J&r&J'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0JrJ1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r:J;r;J<r<J=r=J>r>J?r?J@r@JArAJBrBJCrCJr  SSKDJErEJFrFJGrGJHrHJIrIJJrJJKrKJLrLJMrMJNrNJOrOJPrP  SSKQJRrRJSrS  SSKTJUrUJVrVJWrWJXrXJYrYJZrZJ[r[  SSK\J]r]J^r^  SSK_J`r`JaraJbrb  SSKcJdrdJereJfrf  SSKgJhrhJiriJjrjJkrkJlrlJmrmJnrn  SSKoJlrp  SSKoJmrq  SSKrJsrs  SSKtJuruJvrvJwrw  SSKxJyry  / SQrz\" S5      r{\" S5      r|\" S \U\[   S!9r}\\Y\{/\[4   r~S"\S#'   \" S$S%S!9r\" S&S'S!9r\" S(\U\X   S!9r\\Y\{/\X4   rS"\S)'   \" S*S+S!9r\" S,S-S!9r\" S.\[S!9r\" S/\XS!9r\" S0\S!9r " S1 S2\5      rS:S3 jr " S4 S55      r " S6 S7\5      r\rS"\S8'   g9);    )annotations)Counterdeque)CallableIterable)Mapping)MutableMapping)Field)Enum)	Signature)	signature)Path)AnyOptionalTupleTypeVaroverload)	Attributeresolve_types)has)Self   )$ANIESFrozenSetSubscriptabler   r	   MutableSequenceNoneTypeOriginAbstractSetOriginMutableSetSequenceSet	TypeAliasfieldsget_final_baseget_newtype_base
get_originr   has_with_genericis_annotatedis_bare
is_counteris_dequeis_frozenset
is_genericis_generic_attrsis_hetero_tuple
is_literal
is_mappingis_mutable_sequenceis_mutable_setis_optionalis_protocolis_subclassis_tupleis_typeddictis_union_typer   )defaultdict_structure_factory"homogenous_tuple_structure_factoryis_abstract_setis_defaultdictis_namedtupleis_sequenceiterable_unstructure_factorylist_structure_factorymapping_structure_factorymapping_unstructure_factorynamedtuple_structure_factorynamedtuple_unstructure_factory)create_default_dis_funcis_supported_union)HookFactoryMultiStrategyDispatchStructuredValueStructureHook
TargetTypeUnstructuredValueUnstructureHook)enum_structure_factoryenum_unstructure_factory)IterableValidationErrorIterableValidationNoteStructureHandlerNotFoundError)	Predicateidentityraise_error)AttributeOverrideHeteroTupleUnstructureFnIterableUnstructureFnMappingUnstructureFnmake_dict_structure_fnmake_dict_unstructure_fn make_hetero_tuple_unstructure_fn)rZ   )r[   )is_literal_containing_enums)get_type_alias_baseis_type_aliastype_alias_structure_factory)SimpleStructureHook)BaseConverter	ConverterGenConverterUnstructureStrategyTVUnstructureHookFactory)boundr!   ExtendedUnstructureHookFactoryAnyUnstructureHookFactoryBasezLHookFactory[UnstructureHook] | ExtendedUnstructureHookFactory[BaseConverter]AnyUnstructureHookFactoryzHHookFactory[UnstructureHook] | ExtendedUnstructureHookFactory[Converter]StructureHookFactoryExtendedStructureHookFactoryAnyStructureHookFactoryBasezHHookFactory[StructureHook] | ExtendedStructureHookFactory[BaseConverter]AnyStructureHookFactoryzDHookFactory[StructureHook] | ExtendedStructureHookFactory[Converter]UnstructureHookTStructureHookTCounterTc                       \ rS rSrSrSrSrSrg)re      z)`attrs` classes unstructuring strategies.asdictastuple N)__name__
__module____qualname____firstlineno____doc__AS_DICTAS_TUPLE__static_attributes__rx       P/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/cattrs/converters.pyre   re      s    3GHr   re   c                    [        U 5      n[        UR                  5      S:  =(       a@    [        UR                  R	                  5       5      S   R
                  [        R                  L $ )z.Does this factory also accept a converter arg?   r   )inspect_signaturelen
parameterslistvaluesdefaultr   empty)factorysigs     r   _is_extended_factoryr      sS     G
$CCNNq  	J#..'')*1-66)//Ir   c                     \ rS rSrSrSr\\R                  SSS S 4             S7S jjr	S8S9S
 jjr
\S:S j5       r\S;S j5       r\S<S j5       r S=     S>S jjr      S?S jr\    S@S j5       r\      SAS j5       r\      SBS j5       rS8S jr SC     SDS jjr\SES j5       r\SFS j5       r S8     SGS jjr      SHS jr\    SIS j5       r\      SJS j5       r\      SKS j5       rS8S jrSLS jrSCSMS jjrSNS jrSOS  jrSPS! jrSQS" jrSRS# jr    SSS$ jr SC     STS% jjr\SUS& j5       r\S' 5       r \S( 5       r!SVS) jr"S* r#SWS+ jr$SXS, jr%SYS- jr&SZS. jr'\(4       S[S/ jjr)      S\S0 jr*S]S1 jr+S2 r,S^S3 jr-  S_       S`S4 jjr.SaS5 jr/    Sb         ScS6 jjr0Sr1g	)drb      z2Converts between structured and unstructured data.)
_dict_factory_prefer_attrib_converters_struct_copy_skip_structure_attrs_structure_func_union_struct_registry_unstruct_copy_skip_unstructure_attrs_unstructure_funcdetailed_validationFTc                    [         $ NrT   _s    r   <lambda>BaseConverter.<lambda>       xr   c                    [        S U 5      $ r   rU   ts    r   r   r          ;!L
r   c                  ^  [        U5      nUT l        UT l        0 T l        U[         R                  L a#  T R
                  T l        T R                  T l        O"T R                  T l        T R                  T l        [        UT 5      T l        T R                  R                  [        [        4[         [        4["        [         4/5        T R                  R%                  S U 4S j4[&        U 4S j4S U 4S jS4[(        U 4S jS4[*        T R,                  4[.        T R0                  4[2        T R0                  4[4        T R0                  4[6        T R8                  4S [:        S	4[<        T R                  4[>        T R@                  4S
 T R8                  4/5        [        UT 5      T l!        T RB                  R%                  S S 4[D        T RF                  S4S T RH                  4[(        [J        S	4S T RL                  S4[N        T RP                  4[6        T RR                  4[.        [T        S	4[V        [X        S	4[Z        T R\                  4[2        T R^                  4[`        T Rb                  4[4        T Rb                  4[d        T Rf                  4[h        [j        S	4[*        T Rl                  4/U[         R                  L a  [n        T Rp                  S4/O/ Q[r        T Rt                  4PU 4S jT R                  Rv                  S4PS [x        S	4P[<        T R                  4P5        T RB                  R                  [         T Rz                  4[        T Rz                  4[|        T Rz                  4[~        T Rz                  4["        T Rz                  4/5        UT l@        T R                  R                  5       T lB        T RB                  R                  5       T lC        g)aX  
:param detailed_validation: Whether to use a slightly slower mode for detailed
    validation errors.
:param unstructure_fallback_factory: A hook factory to be called when no
    registered unstructuring hooks match.
:param structure_fallback_factory: A hook factory to be called when no
    registered structuring hooks match.

..  versionadded:: 23.2.0 *unstructure_fallback_factory*
..  versionadded:: 23.2.0 *structure_fallback_factory*
..  versionchanged:: 24.2.0
    The default `structure_fallback_factory` now raises errors for missing handlers
    more eagerly, surfacing problems earlier.
c                    [        U 5      S L$ r   r$   r   s    r   r   (BaseConverter.__init__.<locals>.<lambda>   s    .q1=r   c                6   > TR                  X R                  S9$ N)unstructure_asunstructure	__class__oselfs    r   r   r          d..q.Mr   c                6   > TR                  X R                  S9$ r   r   r   s    r   r   r      r   r   c                    [        U 5      S L$ r   r#   r   s    r   r   r          nQ/t;r   c                8   > TR                  [        U 5      5      $ r   )get_unstructure_hookr#   r   r   s    r   r   r      s    d77q8IJr   Tc                8   > TR                  [        U 5      5      $ r   )r   r^   r   s    r   r   r      s    d778KA8NOr   c                "    [        U [        5      $ r   r5   r   r   s    r   r   r          ;q$/r   extendedc                    U [         ;   $ r   )r   r   s    r   r   r     s    1:r   c                H    U [         ;   =(       d    U [        L =(       d    U S L $ r   )r   r   )cls    r   r   r     s    rU{JbHnJd
Jr   c                    U $ r   rx   )vr   s     r   r   r     s    r   c                    [        U 5      S L$ r   r   r   s    r   r   r     s    +A.d:r   c                    [        U 5      S L$ r   r   r   s    r   r   r     r   r   c                F   > [        U 5      =(       a    U TR                  ;   $ r   )r8   r   r   s    r   r   r   +  s    mA.S18S8S3SSr   c                "    [        U [        5      $ r   r   r   s    r   r   r   /  r   r   N)Dre   r   r   r   r~   unstructure_attrs_asdictr   structure_attrs_fromdictr   unstructure_attrs_astuplestructure_attrs_fromtuplerH   r   register_cls_listbytesrT   strr   register_func_listr4   r_   r0   _unstructure_mappingr>   _unstructure_seqr2   r+   r]   r   rO   r   r8   _unstructure_unionr   r-   _gen_structure_generic_structure_newtyper`   _structure_final_factoryr/   _structure_simple_literal_structure_enum_literalr:   r1   r@   r*   _structure_deque_structure_setr;   _structure_frozensetr6   _structure_tupler=   rC   _structure_dictrF   _gen_attrs_union_structurer3   _structure_optional__getitem__rN   _structure_callintfloatr   get_num_fnsr   r   )r   dict_factoryunstruct_stratprefer_attrib_convertersr   unstructure_fallback_factorystructure_fallback_factorys   `      r   __init__BaseConverter.__init__   s   2 -^<)A&#6 NP# 0888&*&C&CD#$($A$AD!&*&D&DD#$($B$BD!!6($"
 	00Xh$=	
 	11 >M
  M
 <J "O
 T667d334!6!67t445,d.>.>?/1I:Vd--. 7 78%t'7'787	
F  55OQUV// K" "4#>#>E:D<S<ST <jI;11
 T;;<,d.J.JK@*M$&<jI4001!4!45 $";";<t8894001 <jIT112/%4 &)<)D)DD )$*I*I4PQ7%: d667;%> T//;;=%F 01GTG%H d++,I%'	
R 	..d**+,,-d**+,,-t++,	
 *#'#9#9#E#E#G !%!5!5!A!A!Cr   Nc                b    U R                   R                  Uc  UR                  OU5      " U5      $ r   r   dispatchr   )r   objr   s      r   r   BaseConverter.unstructureC  s1    %%..+3CMM

 	r   c                v    U R                   U R                  :X  a  [        R                  $ [        R                  $ )z3The default way of unstructuring ``attrs`` classes.)r   r   re   r~   r   )r   s    r   r   BaseConverter.unstruct_stratH  s8    
 &&$*G*GG  ''	
 %--	
r   c                    g r   rx   )r   clss     r   register_unstructure_hook'BaseConverter.register_unstructure_hookQ  s    TWr   c                    g r   rx   )r   r   funcs      r   r   r   T  s    RUr   c                V  ^ UcW  Tn[        U5      n[        [        UR                  R	                  5       5      5      R
                  mU R                  TU5        U$ [        T5      (       a  [        T5        [        T5      (       a#  U R                  R                  U4S jU4/5        g[        T5      (       a#  U R                  R                  U4S jU4/5        g[        T5      b#  U R                  R                  U4S jU4/5        gU R                  R                  TU4/5        g)a  Register a class-to-primitive converter function for a class.

The converter function should take an instance of the class and return
its Python equivalent.

May also be used as a decorator. When used as a decorator, the first
argument annotation from the decorated function will be used as the
type to register the hook for.

.. versionchanged:: 24.1.0
    This method may now be used as a decorator.
.. versionchanged:: 25.1.0
    Modern type aliases are now supported.
Nc                   > U T:H  $ r   rx   r   r   s    r   r   9BaseConverter.register_unstructure_hook.<locals>.<lambda>t  s	    !s(r   c                   > U TL $ r   rx   r   s    r   r   r   v  	    !s(r   c                   > U TL $ r   rx   r   s    r   r   r   y  r   r   )r   nextiterr   r   
annotationr   	attrs_hasr   r8   r   r   r_   r$   r   )r   r   r   r   s    `  r   r   r   W  s
   " <DD/CtCNN11345@@C**35KS>>#""558JD7Q6RS  3""558JD7Q6RS  c".""558JD7Q6RS  ""44sDk]Cr   c                >    U R                   R                  X4/5        gziRegister a class-to-primitive converter function for a class, using
a function to check if it's a match.
N)r   r   r   
check_funcr   s      r   register_unstructure_hook_func,BaseConverter.register_unstructure_hook_func~  s     	11J3E2FGr   c                    g r   rx   r   	predicates     r   !register_unstructure_hook_factory/BaseConverter.register_unstructure_hook_factory  s	     TWr   c                    g r   rx   r   r  r   s      r   r  r         "%r   c                    g r   rx   r  s      r   r  r    s    
 9<r   c                   ^ ^ Uc	  UU 4S jnU$ T R                   R                  TU[        U5      (       a  SOS4/5        U$ )a  
Register a hook factory for a given predicate.

The hook factory may expose an additional required parameter. In this case,
the current converter will be provided to the hook factory as that
parameter.

May also be used as a decorator.

:param predicate: A function that, given a type, returns whether the factory
    can produce a hook for that type.
:param factory: A callable that, given a type, produces an unstructuring
    hook for that type. This unstructuring hook will be cached.

.. versionchanged:: 24.1.0
    This method may now be used as a decorator.
    The factory may also receive the converter as a second, required argument.
c                   > [        U 5      (       a   TR                  R                  TU S4/5        g TR                  R                  TU S4/5        g Nr   T)r   r   r   r   r  r   s    r   	decoratorBBaseConverter.register_unstructure_hook_factory.<locals>.decorator  sR    '00**==#Wj9: **==#Wd34r   r   T)r   r   r   r   r  r   r  s   ``  r   r  r    sS    & ?	 11 "6w"?"?JT	
 r   c                |    U(       a  U R                   R                  U5      $ U R                   R                  U5      $ )a4  Get the unstructure hook for the given type.

This hook can be manually called, or composed with other functions
and re-registered.

If no hook is registered, the converter unstructure fallback factory
will be used to produce one.

:param cache: Whether to cache the returned hook.

.. versionadded:: 24.1.0
)r   r   dispatch_without_cachingr   typecache_results      r   r   "BaseConverter.get_unstructure_hook  s=    "  ""++D1	
 ''@@F	
r   c                    g r   rx   r   r   s     r   register_structure_hook%BaseConverter.register_structure_hook      MPr   c                    g r   rx   )r   r   r   s      r   r$  r%    r&  r   c                
  ^ Uc+  Tn[        U5      nU R                  UR                  U5        U$ [        T5      (       a  [	        T5        [        T5      (       a)  X R                  T'   U R                  R                  5         g[        T5      (       a#  U R                  R                  U4S jU4/5        g[        T5      b#  U R                  R                  U4S jU4/5        gU R                  R                  TU4/5        g)ay  Register a primitive-to-class converter function for a type.

The converter function should take two arguments:
  * a Python object to be converted,
  * the type to convert to

and return the instance of the class. The type may seem redundant, but
is sometimes needed (for example, when dealing with generic classes).

This method may be used as a decorator. In this case, the decorated
hook must have a return type annotation, and this annotation will be used
as the type for the hook.

.. versionchanged:: 24.1.0
    This method may now be used as a decorator.
.. versionchanged:: 25.1.0
    Modern type aliases are now supported.
Nc                   > U TL $ r   rx   r   r   s    r   r   7BaseConverter.register_structure_hook.<locals>.<lambda>  	    Rr   c                   > U TL $ r   rx   r*  s    r   r   r+    r,  r   )r   r$  return_annotationr  r   r8   r   r   clear_cacher_   r   r$   r   )r   r   r   r   s    `  r   r$  r%    s    * <DD/C(()>)>EKR==".2''+  ,,.  2  336G5N4OP  b!-  336G5N4OP    22RJ<@r   c                >    U R                   R                  X4/5        gr  )r   r   r  s      r   register_structure_hook_func*BaseConverter.register_structure_hook_func
  s     	//*1C0DEr   c                    g r   rx   r  s     r   register_structure_hook_factory-BaseConverter.register_structure_hook_factory  s	     PSr   c                    g r   rx   r  s      r   r4  r5          #r   c                    g r   rx   r  s      r   r4  r5    s     7:r   c                   ^ ^ Uc	  UU 4S jnU$ T R                   R                  TU[        U5      (       a  SOS4/5        U$ )a  
Register a hook factory for a given predicate.

The hook factory may expose an additional required parameter. In this case,
the current converter will be provided to the hook factory as that
parameter.

May also be used as a decorator.

:param predicate: A function that, given a type, returns whether the factory
    can produce a hook for that type.
:param factory: A callable that, given a type, produces a structuring
    hook for that type. This structuring hook will be cached.

.. versionchanged:: 24.1.0
    This method may now be used as a decorator.
    The factory may also receive the converter as a second, required argument.
c                   > [        U 5      (       a   TR                  R                  TU S4/5        g TR                  R                  TU S4/5        g r  )r   r   r   r  s    r   r  @BaseConverter.register_structure_hook_factory.<locals>.decorator6  sR    '00((;;#Wj9: ((;;#Wd34r   r   T)r   r   r   r  s   ``  r   r4  r5  !  sS    & ?	 // "6w"?"?JT	
 r   c                D    U R                   R                  U5      " X5      $ )z?Convert unstructured Python data structures to structured data.)r   r   r   r   r   s      r   	structureBaseConverter.structureM  s    ##,,R099r   c                |    U(       a  U R                   R                  U5      $ U R                   R                  U5      $ )a0  Get the structure hook for the given type.

This hook can be manually called, or composed with other functions
and re-registered.

If no hook is registered, the converter structure fallback factory
will be used to produce one.

:param cache: Whether to cache the returned hook.

.. versionadded:: 24.1.0
)r   r   r  r  s      r   get_structure_hook BaseConverter.get_structure_hookQ  s=        ))$/	
 %%>>tD	
r   c                   [        UR                  5      nU R                  R                  nU R	                  5       nU HG  nUR
                  n[        X5      nU" UR                  =(       d    UR                  5      " U5      XF'   MI     U$ )z9Our version of `attrs.asdict`, so we can call back to us.)r"   r   r   r   r   namegetattrr  )r   r   attrsr   rvarD  r   s           r   r   &BaseConverter.unstructure_attrs_asdicte  sq    s}}%))22!A66D"A 5!++6q9BH  	r   c                &   [        UR                  5      nU R                  R                  n/ nU HT  nUR                  n[        X5      nUR                  U" UR                  =(       d    UR                  5      " U5      5        MV     [        U5      $ )z:Our version of `attrs.astuple`, so we can call back to us.)	r"   r   r   r   rD  rE  appendr  tuple)r   r   rF  r   resrH  rD  r   s           r   r   'BaseConverter.unstructure_attrs_astuplep  sr    s}}%))22A66D"AJJx 5!++6q9:  Szr   c                f   ^ U R                   R                  mUR                  U4S jU 5       5      $ )z,Convert a sequence to primitive equivalents.c              3  T   >#    U  H  nT" UR                   5      " U5      v   M     g 7fr   r   ).0er   s     r   	<genexpr>1BaseConverter._unstructure_seq.<locals>.<genexpr>  s"     Cs!Xakk2155ss   %(r   )r   seqr   s     @r   r   BaseConverter._unstructure_seq{  s+     ))22}}CsCCCr   c                   ^ U R                   R                  mUR                  U4S jUR                  5        5       5      $ )z;Convert a mapping of attr classes to primitive equivalents.c              3     >#    U  H7  u  pT" UR                   5      " U5      T" UR                   5      " U5      4v   M9     g 7fr   rQ  )rR  kr   r   s      r   rT  5BaseConverter._unstructure_mapping.<locals>.<genexpr>  s;      !
' akk"1%x'<Q'?@'s   ?A)r   r   r   items)r   mappingr   s     @r   r   "BaseConverter._unstructure_mapping  s<    
 ))22   !
!
 
 	
r   c                X    U R                   R                  UR                  5      " U5      $ )zP
Unstructure an object as a union.

By default, just unstructures the instance.
r   )r   r   s     r   r    BaseConverter._unstructure_union  s$     %%..s}}=cBBr   c                *    [        XU R                  S9$ )z2Create and return a hook for structuring generics.) _cattrs_prefer_attrib_converters)rZ   r   r#  s     r   r   $BaseConverter._gen_structure_generic  s     &t7U7U
 	
r   c                   ^ ^ T R                  XS9m[        UR                  ;   nU(       a  SUU 4S jjnU$ UU 4S jnU$ )z
Generate a structuring function for a union of attrs classes (and maybe None).

:param use_literals: Whether to consider literal fields.
)use_literalsc                <   > U c  g TR                  U T" U 5      5      $ r   r>  r   r   dis_fnr   s     r   structure_attrs_unionGBaseConverter._gen_attrs_union_structure.<locals>.structure_attrs_union  s     ;~~c6#;77r   c                4   > TR                  U T" U 5      5      $ r   rg  rh  s     r   rj  rk    s    ~~c6#;77r   )returnr   )_get_dis_funcr   __args__)r   r   re  has_nonerj  ri  s   `    @r   r   (BaseConverter._gen_attrs_union_structure  sH     ##B#Br{{*8 8 %$8 %$r   c                    U" U 5      $ )zJust call ``cl`` with the given ``obj``.

This is just an optimization on the ``_structure_default`` case, when
we know we can skip the ``if`` s. Use for ``str``, ``bytes``, ``enum``,
etc.
rx   )r   r   s     r   r   BaseConverter._structure_call  s     #wr   c                D    XR                   ;  a  [        U  SU 35      eU $ Nz not in literal )ro  	Exception)valr  s     r   r   'BaseConverter._structure_simple_literal  s(    mm#se#3D6:;;
r   c                    UR                    Vs0 s H'  n[        U[        5      (       a  UR                  OUU_M)     nn X0   $ s  snf ! [         a    [        U  SU 35      S ef = fru  )ro  
isinstancer   valueKeyErrorrv  )rw  r  xvalss       r   r   %BaseConverter._structure_enum_literal  sq    DHMMRMqJq$//Q:MR	F9 S  	Fse#3D6:;E	Fs   .A A	 	A%c                F    [        U5      nU R                  U5      " X5      $ r   r$   rA  )r   rw  r  bases       r   r    BaseConverter._structure_newtype  s"    %&&t,S77r   c                N   ^ [        U5      nU R                  U5      mU4U4S jj$ )Nc                   > T" X5      $ r   rx   )r   r   _BaseConverter__baserM  s      r   r   8BaseConverter._structure_final_factory.<locals>.<lambda>  s	    Qr   )r#   rA  )r   r  r  rM  s      @r   r   &BaseConverter._structure_final_factory  s&    d#%%d+#'77r   c                    / n[        [        U5      U5       H'  u  pEU R                  XE5      nUR                  U5        M)     U" U6 $ )z,Load an attrs class from a sequence (tuple).)zipr"   _structure_attributerK  )r   r   r   conv_objrH  r{  	converteds          r   r   'BaseConverter.structure_attrs_fromtuple  sF    F2J,HA11!;IOOI& -
 8}r   c                    UR                   n[        USS5      nU R                  (       a	  U(       a  U$ Uc  U$  U R                  R	                  U5      " X#5      $ ! [
         a    U(       a  Us $ e f = f)z%Handle an individual attrs attribute.	converterN)r  rE  r   r   r   rR   )r   rH  r{  type_attrib_converters        r   r  "BaseConverter._structure_attribute  sr    "1k48)).>
 L=L	''007EE, 			s    A A20A2c                    0 n[        U5       H;  n XR                     nU R                  XE5      U[	        USUR                  5      '   M=     U" S0 UD6$ ! [         a     MT  f = f)z1Instantiate an attrs class from a mapping (dict).aliasrx   )r"   rD  r|  r  rE  )r   r   r   r  rH  rw  s         r   r   &BaseConverter.structure_attrs_fromdict  sm     A&&k
 594M4Ma4UHWQ01  ~H~  s   A
A#"A#c                h  ^^	 [        U5      (       d  UR                  S   [        ;   a  [        U5      nU$ UR                  S   mU R                  R                  T5      m	U R                  (       aO  / n[        5       nSnU H!  n UR                  T	" UT5      5        US-  nM#     U(       a  [        SU< 3XB5      e U$ [        UU	4S jU 5       5      nU$ ! [         aD  n[        SU SU 3UT5      n/ [        US/ 5      QUPUl        UR                  U5         SnANSnAff = f! US-  nf = f)	z3Convert an iterable to a potentially generic deque.r   Structuring 	 @ index 	__notes__Nr   While structuring c              3  6   >#    U  H  nT" UT5      v   M     g 7fr   rx   )rR  rS  	elem_typehandlers     r   rT  1BaseConverter._structure_deque.<locals>.<genexpr>(  s     ?3aGAy113   )r(   ro  r   r   r   r   r   rK  rv  rQ   rE  r  rP   )
r   r   r   rM  errorsixrS  msgr  r  s
           @@r   r   BaseConverter._structure_deque  s@   2;;"++a.E1*C2 
/ AI**33I>G''gA	 

71i#89 a  1,RF3V   
 ?3??
 % )4*2$it<b) 'J;(C&IS&Ia(() as*   C
D'#:D"D*"D''D**D1c           	        [        U5      (       d  UR                  S   [        ;   a  U" U5      $ UR                  S   nU R                  R	                  U5      nU R
                  (       a^  / n[        5       nSnU H   n	 UR                  U" X5      5        US-  nM"     U(       a  [        SU< 3Xb5      eU[        L a  U$ U" U5      $ U[        L a  U V	s1 s H
  o" X5      iM     sn	$ U" U V	s/ s H
  o" X5      PM     sn	5      $ ! [         aO  n
[        SUR                   SU	< 3UU5      n/ [        U
S/ 5      QUPU
l        UR                  U
5         Sn
A
NSn
A
ff = f! US-  nf = fs  sn	f s  sn	f )z3Convert an iterable into a potentially generic set.r   r  z @ element r  Nr   r  )r(   ro  r   r   r   r   setaddrv  rQ   ry   rE  r  rK  rP   )r   r   r   structure_tor  r  r  rM  r  rS  excr  s               r   r   BaseConverter._structure_set+  sy    2;;"++a.E1$$KKN	&&//	:##F%CBGGGA12 !GB  -0B2&.I6VV&#-3D<3DD33673aGA)377C@CqWQ2C@AA ! '0&|'<'<&=[N!C
 %Jgc;&C$IS$ICMMM#&&' !GB
 8@s7   ?DE.0E3
E!AEE$E!!E$$E+c                *    U R                  X[        S9$ )z9Convert an iterable into a potentially generic frozenset.)r  )r   	frozensetr=  s      r   r   "BaseConverter._structure_frozensetK  s     ""3"CCr   c           	     $   [        U5      (       d  UR                  [        [        4:X  a  [        U5      $ UR                  u  p4U R                  (       a  U R
                  R                  U5      nU R
                  R                  U5      n/ n0 nUR                  5        H  u  p U" X5      n U" X5      nXU'   M     U(       a  [        SU< 3Xr5      eU$ U[        ;   aF  U R
                  R                  U5      nUR                  5        V	V
s0 s H  u  pX" X5      _M     sn
n	$ U[        ;   aG  U R
                  R                  U5      nUR                  5        V	V
s0 s H  u  pU" X5      U
_M     sn
n	$ U R
                  R                  U5      nU R
                  R                  U5      nUR                  5        V	V
s0 s H  u  pU" X5      U" X5      _M     sn
n	$ ! [         aC  n[        SU	< 3X5      n/ [        US/ 5      QUPUl        UR                  U5         SnAGM  SnAff = f! [         aC  n[        SU	< 3X5      n/ [        US/ 5      QUPUl        UR                  U5         SnAGM  SnAff = fs  sn
n	f s  sn
n	f s  sn
n	f )z2Convert a mapping into a potentially generic dict.z Structuring mapping value @ key r  NzStructuring mapping key @ key r  )r(   ro  r   dictr   r   r   r\  rv  rQ   rE  r  rK  rP   r   )r   r   r   key_typeval_typekey_handlerval_handlerr  rM  rZ  r   r{  r  r  keyval_convkey_convs                    r   r   BaseConverter._structure_dictQ  s_   2;;"++#s39[[##..77AK..77AKFC		'4E'%a2C$H $* -0B2&.I6VVJu++44X>H9<EAx,,EEu++44X>H9<EHQ)1,EE''00:''00:ILU%x'<<UU= ! 0:1%@!C %Jgc;&C$IS$ICMMM#& ! '08>C %Jgc;&C$IS$ICMMM#&&' F F VsB   %G .H0J JJ 
H-*7H((H-0
I=:7I88I=c                    Uc  g UR                   nUS   [        L a  US   OUS   nU R                  R                  U5      " X5      $ )Nr   r   )ro  r   r   r   )r   r   unionunion_paramsothers        r   r   !BaseConverter._structure_optional  sJ    ;~~#/?h#>QLQRO##,,U3C??r   c           
     P  ^^ U[         [        4;   a  SOUR                  nU=(       a    US   [        L nUb  U(       a  US   [        ;   a  [        U5      $ U(       a  US   mU R
                  R                  T5      mU R                  (       aO  / n/ nSnU H!  n UR                  T" UT5      5        US-  nM#     U(       a  [        SU< 3XR5      e[        U5      $ [        UU4S	 jU 5       5      $ [        U5      nU R                  (       a  / n/ n[        [!        X15      5       H;  u  nu  p U R
                  R                  U5      mUR                  T" X5      5        M=     [        U5      U:w  aT  [        U5      U:  a  S
OSn[#        U SU< SU< 35      n	SU 3n
/ [        U	S/ 5      QU
PU	l        UR                  U	5        U(       a  [        SU< 3XR5      e[        U5      $ [        U5      U:w  a1  [        U5      [        U5      :  a  S
OSn[#        U SU< SU< 35      e[        [!        X15       VVs/ s H&  u  pU R
                  R                  U5      " X5      PM(     snn5      $ ! [         aE  n	[        SU SU 3UT5      n
/ [        U	S/ 5      QU
PU	l        UR                  U	5         Sn	A	GNSn	A	ff = f! US-  nf = f! [         aE  n	[        SU SU 3X|5      n
/ [        U	S/ 5      QU
PU	l        UR                  U	5         Sn	A	GM  Sn	A	ff = fs  snnf )z#Deal with structuring into a tuple.Nr   r  r  r  r   r  c              3  6   >#    U  H  nT" UT5      v   M     g 7fr   rx   )rR  rS  convtup_types     r   rT  1BaseConverter._structure_tuple.<locals>.<genexpr>  s     8Cqa**Cr  z
Not enoughzToo manyz values in z to structure as )r   rL  ro  Ellipsisr   r   r   r   rK  rv  rQ   rE  r  rP   r   	enumerater  
ValueError)r   r   tup
tup_paramshas_ellipsisr  rM  r  rS  r  r  exp_lenr   problemr  r  s                 @@r   r   BaseConverter._structure_tuple  s#    UEN2T
!@jn&@,:a=E3I:!!}H''00:D''A	 

48#45 a  1,SG4f  Sz!8C888 j/##FC'J(<=
FQ'//88;DJJtAz* > 3x7"*-c(W*<,* G9Kw>OPSw!WX$SE* E'#{B"? E Ec"-0B3'.JFXX:s8w&)#hZ&@ljGyC7:KC7STT@CJ@TU@TT!!**1-a3@TU
 	
W % +4*3%y=r8 )N'#{B*G(M(Mc**+ a" ! '0&se9RD92C %Jgc;&C$IS$ICMMM#&&'( VsH   I412K?-L"
4
K>:J>8K>KKK
L9LLc                    UR                   n[        U;   a  [        S U 5       5      n[        S U 5       5      (       d
  [	        SUS9e[        U /UQ7UUb  US.6$ SS.6$ )z<Fetch or try creating a disambiguation function for a union.c              3  :   #    U  H  o[         Ld  M  Uv   M     g 7fr   )r   rR  rS  s     r   rT  .BaseConverter._get_dis_func.<locals>.<genexpr>  s     L;a8:K;s   	c              3  \   #    U  H"  n[        [        U5      =(       d    U5      v   M$     g 7fr   )r   r%   r  s     r   rT  r    s!     @Kq3z!})**Ks   *,zeOnly unions of attrs classes and dataclasses supported currently. Register a structure hook manually.)r  from_converter)re  	overrides)ro  r   rL  allrR   rE   )r   r  re  r  union_typess        r   rn  BaseConverter._get_dis_func  s     nn{"  L;LLK@K@@@/A  '

 &#,#8i	
 	
 ?O	
 	
r   c                "    U R                  5       $ r   )copy)r   r   s     r   __deepcopy__BaseConverter.__deepcopy__  s    yy{r   c                   U R                  Ub  UOU R                  Ub  UO9U R                  U R                  :X  a  [        R
                  O[        R                  Ub  UOU R                  Ub  UOU R                  5      nU R                  R                  UR                  U R                  5        U R                  R                  UR                  U R                  5        U$ )Create a copy of the converter, keeping all existing custom hooks.

:param detailed_validation: Whether to use a slightly slower mode for detailed
    validation errors.
)r   r   r   r   re   r~   r   r   r   r   copy_tor   r   r   )r   r   r   r   r   rM  s         r   r  BaseConverter.copy  s     nn(4L$:L:L "-  ..$2O2OO (//,55
 ,7 )33 '2 $--'
. 	&&s'<'<d>V>VW$$S%8%8$:P:PQ
r   )r   Callable[[], Any]r   re   r   boolr   r  r   HookFactory[UnstructureHook]r   HookFactory[StructureHook]rm  Noner   )r   r   r   r   rm  r   )rm  re   )r   rq   rm  rq   )r   r   r   rM   rm  r  NN)r   r   r   zUnstructureHook | Nonerm  z"Callable[[UnstructureHook]] | None)r	  rS   r   rM   rm  r  )r  rS   rm  zHCallable[[AnyUnstructureHookFactoryBase], AnyUnstructureHookFactoryBase]r  rS   r   rh   rm  rh   )r  rS   r   -ExtendedUnstructureHookFactory[BaseConverter]rm  r  )T)r  r   r   r  rm  rM   )r   rr   rm  rr   )r   r   r   rJ   rm  r  )r   r   r   zStructureHook | Nonerm  r  )r	  rS   r   rJ   rm  r  )r  rS   rm  zDCallable[[AnyStructureHookFactoryBase], AnyStructureHookFactoryBase]r  rS   r   rm   rm  rm   )r  rS   r   +ExtendedStructureHookFactory[BaseConverter]rm  r  )r   rL   r   type[T]rm  rf   )r  r   r   r  rm  rJ   )r   r   rm  zdict[str, Any])r   r   rm  tuple[Any, ...])rV  Sequence[T]rm  r  )r]  Mapping[T, V]rm  r  )r   r   rm  r   )r   r  rm  z)SimpleStructureHook[Mapping[str, Any], T])r   r   re  r  rm  z(Callable[[Any, type[T]], type[T] | None])r   r   r   r  rm  r   )rw  rL   rm  rI   )r   r  r   r  rm  rf   )rH  zAttribute | Fieldr{  r   rm  r   )r   zMapping[str, Any]r   r  rm  rf   )r   Iterable[T]r   r   rm  zdeque[T])r   r  r   r   r  r  rm  zSet[T])r   r  r   r   rm  zFrozenSetSubscriptable[T])r   r  r   r   rm  z
dict[T, V])r   r   r  r  rm  rf   )TN)r  r   re  r  r  z#dict[str, AttributeOverride] | Nonerm  zCallable[[Any], type])rm  rb   )NNNN)
r   Callable[[], Any] | Noner   UnstructureStrategy | Noner   bool | Noner   r  rm  r   )2ry   rz   r{   r|   r}   	__slots__r  re   r~   r   r   propertyr   r   r   r
  r  r   r$  r1  r4  r>  rA  r   r   r   r   r   r   r   staticmethodr   r   r   r   r   r   r  r   r   r  r   r   r   r   r   rn  r  r  r   rx   r   r   rb   rb      s1   <I +/.A.I.I).$(EWB
GD'GD ,GD #'	GD
 "GD 'CGD %?GD 
GDR
 
 
 W WU U ?C%%%;%	+%NH#H+:H	H W"W	QW W %"%-C%	% % << ?< 
7	< <+\ /3

'+
	
* P PP P 59))1)	)VF#F+8F	F S"S	MS S #"#-A#	# # :":-X:	4: :*X:
(		D	
C

	2
 -1%%%)%	1%2    
 F F88, > ?BBB$'B7;B	B@DD$'D	"D-V^@?
H "9=	

 
 7	

 

6
 265904+/&.& 3& #.	&
 )& 
& &r   rb   c                    ^  \ rS rSrSrSr\\R                  SS0 0 SSS S S4                     S U 4S jjjr	\
    S!S	 j5       r\
      S"S
 j5       r\
      S#S j5       rS$U 4S jjr\
    S%S j5       r\
      S&S j5       r\
      S'S j5       rS$U 4S jjrS(S jrS rS)S jrS*S jr    S+S jrS,S jrS-S jr    S.S jr S$     S/S jjr S$     S0S jjr  S1       S2S jjr    S3S jr    S4S jr         S5                   S6S jjrSrU =r$ )7rc   i  zAA converter which generates specialized un/structuring functions.)_unstruct_collection_overridesforbid_extra_keysomit_if_defaulttype_overrides	use_aliasFTc                    [         $ r   r   r   s    r   r   Converter.<lambda>%  r   r   c                    [        S U 5      $ r   r   r   s    r   r   r  &  r   r   c           	     z  >^  [         TT ]  UUUUU	U
S9  UT l        UT l        [	        U5      T l        UT l        UR                  5        VVs0 s H  u  p[        U5      =(       d    UU_M     nnnUT l	        Un[        U;   a4  [        U;  a  U[           U[        '   [        U;  a  U[           U[        '   [        U;   a  [        U;  a  U[           U[        '   [        U;   a4  [        U;  a  U[           U[        '   [         U;  a  U[           U[         '   [        U;   a4  ["        U;  a  U[           U["        '   [$        U;  a  U[           U[$        '   [&        U;   a  [(        U;  a  U[&           U[(        '   [(        U;   a  [        U;  a  U[(           U[        '   [        U;   a  [*        U;  a  U[           U[*        '   U[,        R.                  L a@  T R1                  [2        T R4                  5        T R7                  [2        T R8                  5        T R1                  [:        T R<                  5        T R1                  [>        T R@                  5        T R1                  [B        5      " [D        5        T R1                  [F        T RH                  5        T R1                  [J        T RL                  5        T R1                  [N        U 4S j5        T R1                  [P        U 4S j5        T R1                  [R        T RT                  5        T R1                  [V        T RX                  5        T R1                  S U 4S j5        T R7                  [:        T RZ                  5        T R7                  [J        T R\                  5        T R7                  [^        T R`                  5        T R7                  [b        [d        5        T R7                  [V        T Rf                  5        T R7                  S T Rh                  5        T Rj                  Rm                  5       T l7        T Rp                  Rm                  5       T l9        gs  snnf )a  
:param detailed_validation: Whether to use a slightly slower mode for detailed
    validation errors.
:param unstructure_fallback_factory: A hook factory to be called when no
    registered unstructuring hooks match.
:param structure_fallback_factory: A hook factory to be called when no
    registered structuring hooks match.
:param use_alias: Whether to use the field alias instead of the field name as
    the un/structured dictionary key by default.

..  versionadded:: 23.2.0 *unstructure_fallback_factory*
..  versionadded:: 23.2.0 *structure_fallback_factory*
..  versionchanged:: 24.2.0
    The default `structure_fallback_factory` now raises errors for missing handlers
    more eagerly, surfacing problems earlier.
..  versionadded:: 25.2.0 *use_alias*
)r   r   r   r   r   r   c                ,   > TR                  U [        S9$ Nunstructure_to)gen_unstructure_iterabler  r   r   s    r   r   $Converter.__init__.<locals>.<lambda>  s    t44R4Lr   c                ,   > TR                  U [        S9$ r  )r  r  r  s    r   r   r    s    t44R	4Rr   c                    [        U 5      S L$ r   r   r   s    r   r   r        &q)5r   c                8   > TR                  [        U 5      5      $ r   )r   r$   r   s    r   r   r    s    d//0@0CDr   c                    [        U 5      S L$ r   r   r   s    r   r   r    r  r   N):superr   r  r  r  r  r  r\  r%   r  r   r   r   r  r   r   rL  r   r   r   r	   r   re   r~   r  r&   gen_unstructure_attrs_fromdictr4  gen_structure_attrs_fromdictr'   gen_unstructure_annotatedr.   gen_unstructure_hetero_tupler=   rD   r>   r  r0   gen_unstructure_mappingr2   r+   r3   gen_unstructure_optionalr7   gen_unstructure_typeddictgen_structure_annotatedgen_structure_mappingr)   gen_structure_counterr<   r9   gen_structure_typeddictget_structure_newtyper   r   r   r   r   )r   r   r   r  r  r  unstruct_collection_overridesr   r   r   r   r  rZ  r   cor   s   `              r   r   Converter.__init__  s   B 	%)%= 3)E'A 	 	
  /!2">2" /L.Q.Q.S)
.SdaJqMQ!.S 	& )
 /L+ + "r)')*;'<#$%R/-/0A-B)* r!cm)*BsG r>b(&(l?#BxL5	 b 2~o.4B/5	 b=^25!#GB~ RDN.)BtH 2:'+T(BwK088822 $"E"E 00 $"C"C 	..$88	
 	..T>>	
 	..}=*	
 	..66	
 	..z4;W;WX..L	
 	..R	
 	..66	
 	..$88	
 	..5D	

 	,,\4;W;WX,,Z9S9ST,,Z9S9ST,,9	
 	,,\4;W;WX,,5t7Q7Q	

 "&!5!5!A!A!C#'#9#9#E#E#G I)
s   !P7c                    g r   rx   r  s     r   r  +Converter.register_unstructure_hook_factory  s	     LOr   c                    g r   rx   r  s      r   r  r    r  r   c                    g r   rx   r  s      r   r  r    s     58r   c                "   > [         TU ]  X5      $ r   )r	  r  r   r  r   r   s      r   r  r    s    w8LLr   c                    g r   rx   r  s     r   r4  )Converter.register_structure_hook_factory  s	     HKr   c                    g r   rx   r  s      r   r4  r     r7  r   c                    g r   rx   r  s      r   r4  r     s     36r   c                "   > [         TU ]  X5      $ r   )r	  r4  r  s      r   r4  r     s    w6yJJr   c                L   ^^ [        U5      mU R                  T5      mUU4S j$ )Nc                   > T" U T5      $ r   rx   )r   r   r  r  s     r   r   1Converter.get_structure_newtype.<locals>.<lambda>  s    GAt,r   r  )r   r  r  r  s     @@r   r  Converter.get_structure_newtype  s#    %))$/,,r   c                <    UR                   nU R                  U5      $ r   )
__origin__r   )r   r  origins      r   r  #Converter.gen_unstructure_annotated  s    ((00r   c                N   ^^ UR                   mU R                  T5      mUU4S j$ )z#A hook factory for annotated types.c                   > T" U T5      $ r   rx   )r   r   hookr*  s     r   r   3Converter.gen_structure_annotated.<locals>.<lambda>  s    DFOr   )r)  rA  )r   r  r.  r*  s     @@r   r  !Converter.gen_structure_annotated  s"    &&v.++r   c                    [        X5      $ )zWGenerate a TypedDict unstructure function.

Also apply converter-scored modifications.
)make_typeddict_dict_unstruct_fnr#  s     r   r  #Converter.gen_unstructure_typeddict  s    
 /r88r   c                   [        U5      n[        U=(       d    U5      n[        U5      (       a+  [        S U 5       5      (       a  [	        U=(       d    U5        U Vs0 s HC  nUR
                  U R                  ;   d  M  UR                  U R                  UR
                     _ME     nn[        X4SU R                  0UD6$ s  snf )Nc              3  V   #    U  H  n[        UR                  [        5      v   M!     g 7fr   rz  r  r   rR  rH  s     r   rT  ;Converter.gen_unstructure_attrs_fromdict.<locals>.<genexpr>        J'QAFFC!8!8'   ')_cattrs_omit_if_default)
r%   r"   r  anyr   r  r  rD  r[   r  r   r   r*  attribsrH  attrib_overridess         r   r
  (Converter.gen_unstructure_attrs_fromdict  s     B2&R==S J' JJJ&,B' 
vv,,, 0AFFD''// 	 
 (
.2.B.B
FV
 	

s   C(Cc                    UR                   nUS   [        L a  US   OUS   n[        U[        5      (       a  U R                  nOU R                  U5      nU4S jnU$ )z2Generate an unstructuring hook for optional types.r   r   c                    U c  S $ U" U 5      $ r   rx   )rw  _handlers     r   unstructure_optional@Converter.gen_unstructure_optional.<locals>.unstructure_optional  s    ;49HSM9r   )ro  r   rz  r   r   r   )r   r   r  r  r  rD  s         r   r  "Converter.gen_unstructure_optional  s^    {{#/?h#>QLQROeW%%&&G//6G/6 	: $#r   c                *    [        XU R                  S9$ )zUGenerate a TypedDict structure function.

Also apply converter-scored modifications.
)_cattrs_detailed_validation)make_typeddict_dict_struct_fnr   r#  s     r   r  !Converter.gen_structure_typeddict  s    
 -$2J2J
 	
r   c                   [        U5      n[        [        U5      (       a  U=(       d    UOU5      n[        U5      (       a+  [	        S U 5       5      (       a  [        U=(       d    U5        U Vs0 s HC  nUR                  U R                  ;   d  M  UR                  U R                  UR                     _ME     nn[        UU 4U R                  U R                  U R                  U R                  S.UD6$ s  snf )Nc              3  V   #    U  H  n[        UR                  [        5      v   M!     g 7fr   r6  r7  s     r   rT  9Converter.gen_structure_attrs_fromdict.<locals>.<genexpr>  r9  r:  )_cattrs_forbid_extra_keysrb  rH  _cattrs_use_alias)r%   r"   r,   r  r<  r   r  r  rD  rZ   r  r   r   r  r=  s         r   r  &Converter.gen_structure_attrs_fromdict  s     BB2R@R==S J' JJJ&,B' 
vv,,, 0AFFD''// 	 

 &
 '+&<&<-1-K-K(,(@(@"nn
 
 	

s   1C7(C7c                    U R                   R                  [        U5      =(       d    UU=(       d    [        5      n[	        XUS9nU R
                  R                  X4/SS9  U$ Nr  Tdirect)r  getr%   r   r?   r   r   r   r   r   hs       r   r  "Converter.gen_unstructure_iterable,  s]     <<@@rN b."8D
 ).Q002'40Hr   c                    U R                   R                  [        U5      =(       d    UU=(       d    [        5      n[	        XUS9nU R
                  R                  X4/SS9  U$ rR  )r  rU  r%   rL  r\   r   r   rV  s       r   r  &Converter.gen_unstructure_hetero_tuple6  s]     <<@@rN b."9E
 -RnU002'40Hr   c                    U R                   R                  [        U5      =(       d    UU=(       d    [        5      n[	        XX#S9nU R
                  R                  X4/SS9  U$ )N)r   r  TrS  )r  rU  r%   r  rB   r   r   )r   r   r   r  rW  s        r   r  !Converter.gen_unstructure_mapping@  sb     <<@@rN b."8D
 (^
 	002'40Hr   c                |    [        UU [        [        U R                  S9nU R                  R                  X4/SS9  U$ )N)r  r  r   TrS  )rA   r   r   r   r   r   )r   r   rW  s      r   r  Converter.gen_structure_counterO  sG     &  $ 8 8
 	..y.Fr   c                    [        U5      =(       d    UnU[        [        [        [        4;   a  [
        n[        XX R                  S9nU R                  R                  X4/SS9  U$ )N)r   TrS  )
r%   r	   AbcMutableMappingr   
AbcMappingr  rA   r   r   r   )r   r   r  rW  s       r   r  Converter.gen_structure_mapping\  sk     ""~+	
 
  L%l8P8P
 	..y.Fr   c
                V   U R                  Ub  UOU R                  Ub  UO9U R                  U R                  :X  a  [        R
                  O[        R                  Ub  UOU R                  Ub  UOU R                  Ub  UOU R                  Ub  UOU R                  Ub  UOU R                  Ub  UOU R                  U	b  U	OU R                  S9	n
U R                  R                  U
R                  U R                   S9  U R"                  R                  U
R"                  U R$                  S9  U
$ )r  )r  )skip)r   r   r   r   re   r~   r   r  r  r  r  r   r   r  r   r  r   r   r   )r   r   r   r  r  r  r  r   r   r  rM  s              r   r  Converter.copym  s@   " nn(4L$:L:L "-  ..$2O2OO (//,55  /:O@T@T %0 "++,8Nd>Q>Q 1< .88 ,7 )33 '2 $--$-$9yt~~C  "
H 	&&!!(@(@ 	' 	
 	$$S%8%8t?U?U$V
r   )r   r  r   r  r  r  r  )r   r  r   re   r  r  r  r  r  z Mapping[type, AttributeOverride]r  zMapping[type, UnstructureHook]r   r  r   r  r   r  r   r  r  r  )r  rS   rm  z@Callable[[AnyUnstructureHookFactory], AnyUnstructureHookFactory]r  )r  rS   r   )ExtendedUnstructureHookFactory[Converter]rm  rf  r   )r  rS   rm  z<Callable[[AnyStructureHookFactory], AnyStructureHookFactory]r  )r  rS   r   'ExtendedStructureHookFactory[Converter]rm  rg  )r  r  rm  zCallable[[Any, Any], T])rm  r   )r   r   rm  zCallable[[dict], dict])r   r  rm  zCallable[[T], dict[str, Any]])r   r  rm  zCallable[[T], Any])r   r   rm  zCallable[[dict, Any], dict])r   r  rm  z%Callable[[Mapping[str, Any], Any], T])r   r   r   r   rm  rX   )r   r   r   r   rm  rW   r  )r   r   r   r   r  z'Callable[[Any, Any | None], Any] | Nonerm  rY   )r   ztype[CounterT]rm  z0SimpleStructureHook[Mapping[Any, Any], CounterT])r   r   rm  z+SimpleStructureHook[Mapping[Any, Any], Any])	NNNNNNNNN)r   r  r   r  r  r  r  r  r  z'Mapping[type, AttributeOverride] | Noner  z%Mapping[type, UnstructureHook] | Noner   r  r   r  r  r  rm  r   )ry   rz   r{   r|   r}   r  r  re   r~   r   r   r  r4  r  r  r  r  r
  r  r  r  r  r  r  r  r  r  r   __classcell__rQ  s   @r   rc   rc     sN   KI +/.A.I.I %"';=HJ).$(EWB
  RH'RH ,RH 	RH
  RH 9RH (FRH #'RH "RH 'CRH %?RH RH RHh O"O	IO O %"%-C%	% % 8"8-V8	28 8M K"K	EK K #"#-A#	# # 6"6-T6	06 6K-
1,9

	&
$$


	.
0 .2'*	 .2'*	! #?C	  =	
 
 	9	4& 2659'+)-BFOS04+/!%:.: 3: %	:
 ': @: (M: #.: ): : 
: :r   rc   rd   N)r   r   rm  r  )
__future__r   collectionsr   r   collections.abcr   r   r   ra  r	   r`  dataclassesr
   enumr   inspectr   r   r   pathlibr   typingr   r   r   r   r   rF  r   r   r   r  typing_extensionsr   _compatr   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   colsr9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   disambiguatorsrE   rF   r   rG   rH   rI   rJ   rK   rL   rM   enumsrN   rO   r  rP   rQ   rR   fnsrS   rT   rU   genrV   rW   rX   rY   rZ   r[   r\   gen.typeddictsrI  r2  literalsr]   typealiasesr^   r_   r`   typesra   __all__rf   rg   rh   rj   __annotations__rk   rl   rm   rn   ro   rp   rq   rr   rs   re   r   rb   rc   rd   rx   r   r   <module>r~     s   " & . 1 ?    2  : : * " "% % % % % % % % % %L    H   D 
 2 1   T W 1 
 '
OCLCL K$@ 
 -5j!_o5U,V 	 V !(#
X!  $
T 
 5[=WX  +3J?M3Q*R i R &!
T  "
P 
 -_E )?:W-$ c cLW Wt $i #r   