
    i"              
          S SK JrJrJrJr  S SKJr  S SKJr  S SK	J
r
  S SKJrJr  S SKrS SKJrJrJrJr  S SKJr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$J%r%  S SK&J'r'  \" S5      r(SS.S\\   S\)S\*\   S-  S\4S jjr+S\*\   S\,\"\   S4   S\-\)\"\   \
-  4   S\\)   S\"4
S jr.S\S\*\   S\"4S jr/S\S\\   S\"4S jr0S \\\(      S\\(SS4   4S! jr1S"\)S\\)SS4   4S# jr2g)$    )
Collection	GeneratorIterableSequence)reduce)chain)EllipsisType)AnyTypeVarN)_AndValidator_InstanceOfValidator_InValidator_OptionalValidator)	AttributeAttrsInstanceFactory)
strategies)ResolutionFailed)get_type_hints)BuildsStrategy)SearchStrategy)	is_a_typetype_sorting_key)inferTtargetfieldsaliasr   returnc                
   U  Vs/ s H  o3R                   U:X  d  M  UPM     nnU(       d:  [        SU SU(       a  SU 3OS SU  Vs/ s H  o3R                  PM     sn 35      e[        U5      S:X  d   eUS   $ s  snf s  snf )z
Get an attrs attribute by its alias, rather than its name (compare
getattr(fields, name)).

``target`` is used only to provide a nicer error message, and can be safely
omitted.
zUnexpected keyword argument z for attrs class  z. Expected one of    r   )r   	TypeErrornamelen)r   r   r   fmatched_fieldss        d/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/strategies/_internal/attrs.pyget_attribute_by_aliasr+   +   s    " "(<A77e+;aN<*5'1A%6(|2..@ &'1'(*
 	
 ~!###! =
 (s   A;A;B args.kwargsto_inferc                     [         R                  " U 5      nUR                  5        VVs0 s H  u  pVU[        Ld  M  XV_M     nnnU H  n[	        XGU S9n[        X5      X''   M     [        XU5      $ s  snnf )z?An internal version of builds(), specialised for Attrs classes.r   )attrr   itemsr   r+   from_attrs_attributer   )	r   r,   r-   r.   
attributeskvr&   attribs	            r*   
from_attrsr7   I   so     )-F(;J%||~@~tq%dad~F@'
H+F;  &// As
   A2A2r6   c                 
   [         R                  " 5       n[        U R                  [        5      (       aU  U R                  c   eU R                  R
                  (       d*  [         R                  " U R                  R                  5      nO=U R                  [        R                  La   [         R                  " U R                  5      n[         R                  " 5       n/ n[        5       nU R                  Gb"  U R                  n[        U[        5      (       a!  [         R                  " 5       nUR                  n[        U[        5      (       a  UR                   nOU/nU H  n[        U["        5      (       ak  [        UR$                  [&        5      (       a/  UR)                  [+        [-        UR$                  5      5      5        Mf  UR)                  UR$                  5        M  [        U[.        5      (       d  M  UR1                  UR2                  5        M     U(       a0  [         R4                  " [+        [7        U5      5      5      n	X#-  U	-  n
OX#-  [9        X5      -  n
U
R:                  (       a  [=        SU < SU< 35      eU
$ )z?Infer a strategy from the metadata on an attr.Attribute object.zVCannot infer a strategy from the default, validator, type, or converter for attribute=z
 of class=)stnothing
isinstancedefaultr   
takes_selfbuildsfactoryr0   NOTHINGjustset	validatorr   noner   _validatorsr   optionsstrappendlistall_substringsr   addtypesampled_fromordered_intersectiontypes_to_strategyis_emptyr   )r6   r   r<   nullin_collectionsvalidator_typesrC   vsr5   samplestrats              r*   r2   r2   [   s    !jjlG &..'**~~)))~~((ii 6 67G	t||	+''&..)
 ::<DNeO#$$	i!344779D!++Ii//&&BBA!\**aii--"))$~aii/H*IJ"))!))4A344##AFF+  &:>&J!KL'!26!KK ~~''-j
6*F
 	
 L    typesc                   ^ [        U5      S:X  aZ  Uu  n[        U[        5      (       a+  [        R                  " [        [        R                  U5      6 $ [        R                  " U5      $ U(       a  U Vs/ s H  n[        U[        5      (       a  UOU4PM     nn[        [        US5      5       V^s/ s H!  m[        U4S jU 5       5      (       d  M  TPM#     nnUR                  [        S9  [        R                  " U Vs/ s H  n[        R                  " U5      PM     sn5      $ [        [        U SS5      5      (       a/  U R                  c   e[        R                  " U R                  5      $ [        U SS5      n[        U[        5      (       a  [        R                  " U5      $ [        U5      (       a*  [!        U5      nSU;   a  [        R                  " US   5      $ [        R"                  " 5       $ s  snf s  snf s  snf )	z`Find all the type metadata for this attribute, reconcile it, and infer a
strategy from the mess.r$    c              3   <   >#    U  H  n[        TU5      v   M     g 7f)N)
issubclass).0tupts     r*   	<genexpr>$types_to_strategy.<locals>.<genexpr>   s     =#:a%%s   )keyrL   N	converterr    )r'   r;   tupler9   one_ofmap	from_typerB   sumallsortr   r   getattrrL   callabler   r:   )	r6   rX   typr4   type_tuplesr_   allowedrc   hintss	        `   r*   rO   rO      s    5zQc5!!99c",,455||C  	 EJJEqJq%00qqd:EJ
 ["-.
.=== . 	 

 	)*yy7;7a",,q/7;<< .//{{&&& ||FKK((T2I)T""||I&&	)		y)u<<h00::<9 K
 <s   6$G=4HH Hin_c              #      #    [        [        R                  U [        U S   5      5      n[        R                  " U 5       H  nX!;   d  M
  Uv   UR                  U5        M!     g7f)zBSet union of n sequences, ordered for reproducibility across runs.r   N)r   rB   intersectionr   from_iterableremove)rq   rs   xs      r*   rN   rN      sO     #**CSV=L  %G" &s   AA$
A$sc              #      #    U SS v   [        U 5       H.  u  p[        [        U 5      U-
  5       H  nXX1-   S-    v   M     M0     g7f)zGenerate all substrings of `s`, in order of length then occurrence.
Includes the empty string (first), and any duplicates that are present.

>>> list(all_substrings('010'))
['', '0', '1', '0', '01', '10', '010']
Nr   r$   )	enumerateranger'   )rw   n_is       r*   rJ   rJ      sJ      BQ%K!s1vz"A	"" # s   AA)3collections.abcr   r   r   r   	functoolsr   	itertoolsr   rX   r	   typingr
   r   r0   attr.validatorsr   r   r   r   attrsr   r   r   
hypothesisr   r9   hypothesis.errorsr   hypothesis.internal.compatr   $hypothesis.strategies._internal.corer   *hypothesis.strategies._internal.strategiesr   %hypothesis.strategies._internal.typesr   r   hypothesis.utils.conventionsr   r   rG   rL   r+   rd   dictr7   r2   rO   rN   rJ   rZ   rW   r*   <module>r      sp   F E       4 3 ' . 5 ? E M .CL *.	Y $&	
 <00
s#S(
)0 nS)L8890 sm	0
 0$>>#M2>>B(i (
3 (N (V#hx{3 #	!T4-8P #
#c 
#iT48 
#rW   