§
    dŠtj1T  ã                   ój  — d Z ddlZddlZddlmZ ddlmZ ddlmZmZ ddl	m
Z
mZmZmZ ddlmZ dd	lmZ g d
¢Zd„ Zd„ Zed„ ¦   «         Z eddd¬¦  «         G d„ d¦  «        ¦   «         Zd„ Z eddd¬¦  «         G d„ d¦  «        ¦   «         Zd=d„Z eddd¬¦  «         G d„ d¦  «        ¦   «         Zd„ Z eddd¬¦  «         G d„ d¦  «        ¦   «         Zd„ Z eddd¬¦  «         G d„ d¦  «        ¦   «         Zd „ Z eddd¬¦  «         G d!„ d"¦  «        ¦   «         Z d>d#„Z! eddd¬¦  «         G d$„ d%¦  «        ¦   «         Z"	 d?d&„Z# eddd¬¦  «         G d'„ d(¦  «        ¦   «         Z$d)„ Z%d*„ Z&d+„ Z'd,„ Z( eddd¬¦  «         G d-„ d.¦  «        ¦   «         Z)d/„ Z* eddd¬¦  «         G d0„ d1¦  «        ¦   «         Z+d2„ Z, eddd¬¦  «         G d3„ d4¦  «        ¦   «         Z-d5„ Z. eddd¬¦  «         G d6„ d7¦  «        ¦   «         Z/de0e1fd8œd9„Z2 eddd¬¦  «         G d:„ d;¦  «        ¦   «         Z3d<„ Z4dS )@z
Commonly useful validators.
é    N)Úcontextmanager)ÚPatterné   ©Úget_run_validatorsÚset_run_validators)Ú_AndValidatorÚand_ÚattribÚattrs)Údefault_if_none)ÚNotCallableError)r
   Údeep_iterableÚdeep_mappingÚdisabledÚgeÚget_disabledÚgtÚin_Úinstance_ofÚis_callableÚleÚltÚ
matches_reÚmax_lenÚmin_lenÚnot_ÚoptionalÚor_Úset_disabledc                 ó&   — t          |  ¦  «         dS )a  
    Globally disable or enable running validators.

    By default, they are run.

    Args:
        disabled (bool): If `True`, disable running all validators.

    .. warning::

        This function is not thread-safe!

    .. versionadded:: 21.3.0
    N)r   )r   s    úM/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/attr/validators.pyr    r    *   s   € õ ˜8�|Ñ$Ô$Ð$Ð$Ð$ó    c                  ó    — t          ¦   «          S )zº
    Return a bool indicating whether validators are currently disabled or not.

    Returns:
        bool:`True` if validators are currently disabled.

    .. versionadded:: 21.3.0
    )r   © r#   r"   r   r   <   s   € õ "Ñ#Ô#Ð#Ð#r#   c               #   ó”   K  — t          ¦   «         } t          d¦  «         	 dV — t          | ¦  «         dS # t          | ¦  «         w xY w)zï
    Context manager that disables running validators within its context.

    .. warning::

        This context manager is not thread-safe!

    .. versionadded:: 21.3.0
    .. versionchanged:: 26.1.0 The contextmanager is nestable.
    FNr   )Úprevs    r"   r   r   H   sX   è è € õ ÑÔ€DÝ�uÑÔÐð!Øˆˆˆå˜4Ñ Ô Ð Ð Ð øÕ˜4Ñ Ô Ð Ð øøøs	   ¡6 ¶AFT)ÚreprÚslotsÚunsafe_hashc                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_InstanceOfValidatorc           	      óš   — t          || j        ¦  «        s5d|j        › d| j        ›d|›d|j        ›d�	}t	          ||| j        |¦  «        ‚dS )úP
        We use a callable class to be able to change the ``__repr__``.
        ú'ú
' must be ú (got z that is a ú).N)Ú
isinstanceÚtypeÚnameÚ	__class__Ú	TypeError©ÚselfÚinstÚattrÚvalueÚmsgs        r"   Ú__call__z_InstanceOfValidator.__call__`   sr   € õ ˜% ¤Ñ+Ô+ð 	Øg�d”iÐgÐg¨4¬9ÐgÐg¸eÐgÐgÐRWÔRaÐgÐgÐgˆCÝØØØ”	Øñ	ô ð ð	ð 	r#   c                 ó   — d| j         ›d�S )Nz <instance_of validator for type ú>©r4   ©r9   s    r"   Ú__repr__z_InstanceOfValidator.__repr__m   ó   € Ø@°$´)Ð@Ð@Ð@Ð@r#   N©Ú__name__Ú
__module__Ú__qualname__r   r4   r>   rC   r%   r#   r"   r,   r,   \   óB   € € € € € àˆ6‰8Œ8€Dðð ð ðAð Að Að Að Ar#   r,   c                 ó    — t          | ¦  «        S )aØ  
    A validator that raises a `TypeError` if the initializer is called with a
    wrong type for this particular attribute (checks are performed using
    `isinstance` therefore it's also valid to pass a tuple of types).

    Args:
        type (type | tuple[type]): The type to check for.

    Raises:
        TypeError:
            With a human readable error message, the attribute (of type
            `attrs.Attribute`), the expected type, and the value it got.
    )r,   rA   s    r"   r   r   q   ó   € õ   Ñ%Ô%Ð%r#   )r(   Úfrozenr)   c                   óB   — e Zd Z e¦   «         Z e¦   «         Zd„ Zd„ ZdS )Ú_MatchesReValidatorc                 ó”   — |                       |¦  «        s2d|j        › d| j        j        ›d|›d�}t          ||| j        |¦  «        ‚dS )r.   r/   z' must match regex z (z	 doesn't)N)Ú
match_funcr5   ÚpatternÚ
ValueErrorr8   s        r"   r>   z_MatchesReValidator.__call__‡   si   € ð �Š˜uÑ%Ô%ð 	Ø`�d”iÐ`Ð`°D´LÔ4HÐ`Ð`ÈeÐ`Ð`Ð`ˆCÝØØØ”Øñ	ô ð ð	ð 	r#   c                 ó   — d| j         ›d�S )Nz"<matches_re validator for pattern r@   )rQ   rB   s    r"   rC   z_MatchesReValidator.__repr__”   s   € ØE°D´LÐEÐEÐEÐEr#   N)rF   rG   rH   r   rQ   rP   r>   rC   r%   r#   r"   rN   rN   ‚   sM   € € € € € àˆf‰hŒh€GØ�‘”€Jðð ð ðFð Fð Fð Fð Fr#   rN   c           
      ó  — t           j        dt           j        t           j        f}||vr[d                     d                     t          d„ t          |¦  «        D ¦   «         ¦  «        ¦  «        ¦  «        }t          |¦  «        ‚t          | t          ¦  «        r|rd}t          |¦  «        ‚| }nt          j        | |¦  «        }|t           j        u r|j        }n|t           j        u r|j        }n|j        }t          ||¦  «        S )aâ  
    A validator that raises `ValueError` if the initializer is called with a
    string that doesn't match *regex*.

    Args:
        regex (str, re.Pattern):
            A regex string or precompiled pattern to match against

        flags (int):
            Flags that will be passed to the underlying re function (default 0)

        func (typing.Callable):
            Which underlying `re` function to call. Valid options are
            `re.fullmatch`, `re.search`, and `re.match`; the default `None`
            means `re.fullmatch`. For performance reasons, the pattern is
            always precompiled using `re.compile`.

    .. versionadded:: 19.2.0
    .. versionchanged:: 21.3.0 *regex* can be a pre-compiled pattern.
    Nz'func' must be one of {}.z, c              3   ó,   K  — | ]}|r|j         pd V — ŒdS )ÚNoneN)rF   )Ú.0Úes     r"   ú	<genexpr>zmatches_re.<locals>.<genexpr>±   s.   è è € ÐNÐN¸˜Ð(˜aœjÐ3¨VÐNÐNÐNÐNÐNÐNr#   zR'flags' can only be used with a string pattern; pass flags to re.compile() instead)ÚreÚ	fullmatchÚsearchÚmatchÚformatÚjoinÚsortedÚsetrR   r3   r   r7   ÚcompilerN   )ÚregexÚflagsÚfuncÚvalid_funcsr=   rQ   rP   s          r"   r   r   ˜   s   € õ* ”< ¥r¤yµ"´(Ð;€KØ�;ÐÐØ)×0Ò0Ø�IŠIÝÐNÐN½SÀÑ=MÔ=MÐNÑNÔNÑNÔNñô ñ
ô 
ˆõ
 ˜‰oŒoÐå�%�Ñ!Ô!ð +Øð 	!ØfˆCÝ˜C‘.”.Ð Øˆˆå”*˜U EÑ*Ô*ˆà�rŒxÐÐØ”]ˆ
ˆ
Ø	•”Ð	Ð	Ø”^ˆ
ˆ
àÔ&ˆ
å˜w¨
Ñ3Ô3Ð3r#   c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_OptionalValidatorc                 ó<   — |€d S |                       |||¦  «         d S ©N©Ú	validator©r9   r:   r;   r<   s       r"   r>   z_OptionalValidator.__call__Ì   s(   € Øˆ=ØˆFà�Š�t˜T 5Ñ)Ô)Ð)Ð)Ð)r#   c                 ó   — d| j         ›d�S )Nz<optional validator for z	 or None>rk   rB   s    r"   rC   z_OptionalValidator.__repr__Ò   s   € ØE¨$¬.ÐEÐEÐEÐEr#   N)rF   rG   rH   r   rl   r>   rC   r%   r#   r"   rh   rh   È   sB   € € € € € à�‘”€Ið*ð *ð *ðFð Fð Fð Fð Fr#   rh   c                 ó�   — t          | t          t          f¦  «        rt          t	          | ¦  «        ¦  «        S t          | ¦  «        S )a&  
    A validator that makes an attribute optional.  An optional attribute is one
    which can be set to `None` in addition to satisfying the requirements of
    the sub-validator.

    Args:
        validator
            (typing.Callable | tuple[typing.Callable] | list[typing.Callable]):
            A validator (or validators) that is used for non-`None` values.

    .. versionadded:: 15.1.0
    .. versionchanged:: 17.1.0 *validator* can be a list of validators.
    .. versionchanged:: 23.1.0 *validator* can also be a tuple of validators.
    )r3   ÚlistÚtuplerh   r	   rk   s    r"   r   r   Ö   s>   € õ �)�d¥E˜]Ñ+Ô+ð <Ý!¥-°	Ñ":Ô":Ñ;Ô;Ð;å˜iÑ(Ô(Ð(r#   c                   óF   — e Zd Z e¦   «         Z ed¬¦  «        Zd„ Zd„ ZdS )Ú_InValidatorF)Úhashc                 óž   — 	 || j         v }n# t          $ r d}Y nw xY w|s-d|j        › d| j        ›d|›d�}t	          ||| j        |¦  «        ‚d S )NFr/   z' must be in r1   ú))Úoptionsr7   r5   Ú_original_optionsrR   )r9   r:   r;   r<   Ú
in_optionsr=   s         r"   r>   z_InValidator.__call__ð   s“   € ð	Ø $¤,Ð.ˆJˆJøÝð 	ð 	ð 	ØˆJˆJˆJð	øøøð ð 	ØX�d”iÐXÐX¨dÔ.DÐXÐXÈeÐXÐXÐXˆCÝØØØÔ&Øñ	ô ð ð	ð 	s   ‚	 Œšc                 ó   — d| j         ›d�S )Nz<in_ validator with options r@   )rx   rB   s    r"   rC   z_InValidator.__repr__ÿ   s   € ØI¨dÔ.DÐIÐIÐIÐIr#   N)rF   rG   rH   r   rw   rx   r>   rC   r%   r#   r"   rs   rs   ë   sU   € € € € € àˆf‰hŒh€GØ˜ EÐ*Ñ*Ô*Ððð ð ðJð Jð Jð Jð Jr#   rs   c                 óˆ   — | }t          | t          t          t          f¦  «        rt	          | ¦  «        } t          | |¦  «        S )aÖ  
    A validator that raises a `ValueError` if the initializer is called with a
    value that does not belong in the *options* provided.

    The check is performed using ``value in options``, so *options* has to
    support that operation.

    To keep the validator hashable, dicts, lists, and sets are transparently
    transformed into a `tuple`.

    Args:
        options: Allowed options.

    Raises:
        ValueError:
            With a human readable error message, the attribute (of type
            `attrs.Attribute`), the expected options, and the value it got.

    .. versionadded:: 17.1.0
    .. versionchanged:: 22.1.0
       The ValueError was incomplete until now and only contained the human
       readable error message. Now it contains all the information that has
       been promised since 17.1.0.
    .. versionchanged:: 24.1.0
       *options* that are a list, dict, or a set are now transformed into a
       tuple to keep the validator hashable.
    )r3   rp   Údictra   rq   rs   )rw   Úrepr_optionss     r"   r   r     s=   € ð8 €LÝ�'�D¥$­Ð,Ñ-Ô-ð !Ý˜‘.”.ˆå˜ Ñ.Ô.Ð.r#   c                   ó   — e Zd Zd„ Zd„ ZdS )Ú_IsCallableValidatorc                 óŠ   — t          |¦  «        s3d}t          |                     |j        ||j        ¬¦  «        |¬¦  «        ‚dS )r.   z?'{name}' must be callable (got {value!r} that is a {actual!r}).)r5   r<   Úactual)r=   r<   N)Úcallabler   r^   r5   r6   )r9   r:   r;   r<   Úmessages        r"   r>   z_IsCallableValidator.__call__(  se   € õ ˜‰Œð 
	ð8ð õ #Ø—N’NØœ¨%¸¼ð #ñ ô ð ð	ñ ô ð ð
	ð 
	r#   c                 ó   — dS )Nz<is_callable validator>r%   rB   s    r"   rC   z_IsCallableValidator.__repr__8  s   € Ø(Ð(r#   N)rF   rG   rH   r>   rC   r%   r#   r"   r   r   &  s2   € € € € € ðð ð ð )ð )ð )ð )ð )r#   r   c                  ó   — t          ¦   «         S )aˆ  
    A validator that raises a `attrs.exceptions.NotCallableError` if the
    initializer is called with a value for this particular attribute that is
    not callable.

    .. versionadded:: 19.1.0

    Raises:
        attrs.exceptions.NotCallableError:
            With a human readable error message containing the attribute
            (`attrs.Attribute`) name, and the value it got.
    )r   r%   r#   r"   r   r   <  s   € õ  Ñ!Ô!Ð!r#   c                   ó~   — e Zd Z e e¦   «         ¬¦  «        Z ed e e¦   «         ¦  «        ¬¦  «        Zd„ Zd„ Z	dS )Ú_DeepIterablerk   N)Údefaultrl   c                 óz   — | j         �|                       |||¦  «         |D ]}|                      |||¦  «         ŒdS ©r.   N©Úiterable_validatorÚmember_validator)r9   r:   r;   r<   Úmembers        r"   r>   z_DeepIterable.__call__S  sY   € ð Ô"Ð.Ø×#Ò# D¨$°Ñ6Ô6Ð6àð 	6ð 	6ˆFØ×!Ò! $¨¨fÑ5Ô5Ð5Ð5ð	6ð 	6r#   c                 óD   — | j         €dn	d| j         ›�}d|› d| j        ›d�S )NÚ ú z<deep_iterable validator forz iterables of r@   r‹   )r9   Úiterable_identifiers     r"   rC   z_DeepIterable.__repr__]  sS   € ð Ô&Ð.ð ˆBà0�TÔ,Ð0Ð0ð 	ð8Ð+>ð 8ð 8Ø!Ô2ð8ð 8ð 8ð	
r#   )
rF   rG   rH   r   r   r�   r   rŒ   r>   rC   r%   r#   r"   r‡   r‡   L  sw   € € € € € à�v¨¨©¬Ð6Ñ6Ô6ÐØ˜Ø  ¨¨©¬Ñ 7Ô 7ðñ ô Ðð6ð 6ð 6ð	
ð 	
ð 	
ð 	
ð 	
r#   r‡   c                 ó¶   — t          | t          t          f¦  «        r	t          | Ž } t          |t          t          f¦  «        r	t          |Ž }t	          | |¦  «        S )aÍ  
    A validator that performs deep validation of an iterable.

    Args:
        member_validator: Validator(s) to apply to iterable members.

        iterable_validator:
            Validator(s) to apply to iterable itself (optional).

    Raises
        TypeError: if any sub-validators fail

    .. versionadded:: 19.1.0

    .. versionchanged:: 25.4.0
       *member_validator* and *iterable_validator* can now be a list or tuple
       of validators.
    )r3   rp   rq   r
   r‡   ©r�   rŒ   s     r"   r   r   i  s\   € õ& Ð"¥T­5 MÑ2Ô2ð 3ÝÐ!1Ð2ÐÝÐ$¥t­U mÑ4Ô4ð 7Ý!Ð#5Ð6ÐÝÐ)Ð+=Ñ>Ô>Ð>r#   c                   óÈ   — e Zd Z e e e¦   «         ¦  «        ¬¦  «        Z e e e¦   «         ¦  «        ¬¦  «        Z e e e¦   «         ¦  «        ¬¦  «        Zd„ Z	d„ Z
dS )Ú_DeepMappingrk   c                 óÐ   — | j         �|                       |||¦  «         |D ]D}| j        �|                      |||¦  «         | j        �|                      ||||         ¦  «         ŒEdS rŠ   )Úmapping_validatorÚkey_validatorÚvalue_validator)r9   r:   r;   r<   Úkeys        r"   r>   z_DeepMapping.__call__‰  s…   € ð Ô!Ð-Ø×"Ò" 4¨¨uÑ5Ô5Ð5àð 	=ð 	=ˆCØÔ!Ð-Ø×"Ò" 4¨¨sÑ3Ô3Ð3ØÔ#Ð/Ø×$Ò$ T¨4°°s´Ñ<Ô<Ð<øð		=ð 	=r#   c                 ó(   — d| j         ›d| j        ›d�S )Nz,<deep_mapping validator for objects mapping z to r@   )r™   rš   rB   s    r"   rC   z_DeepMapping.__repr__–  s"   € Øq¸dÔ>PÐqÐqÐX\ÔXlÐqÐqÐqÐqr#   N)rF   rG   rH   r   r   r   r™   rš   r˜   r>   rC   r%   r#   r"   r–   r–   ƒ  sž   € € € € € à�F X X¨k¨k©m¬mÑ%<Ô%<Ð=Ñ=Ô=€MØ�f x x°°±´Ñ'>Ô'>Ð?Ñ?Ô?€OØ˜¨¨°+°+±-´-Ñ)@Ô)@ÐAÑAÔAÐð=ð =ð =ðrð rð rð rð rr#   r–   c                 ó,  — | €|€d}t          |¦  «        ‚t          | t          t          f¦  «        r	t	          | Ž } t          |t          t          f¦  «        r	t	          |Ž }t          |t          t          f¦  «        r	t	          |Ž }t          | ||¦  «        S )a®  
    A validator that performs deep validation of a dictionary.

    All validators are optional, but at least one of *key_validator* or
    *value_validator* must be provided.

    Args:
        key_validator: Validator(s) to apply to dictionary keys.

        value_validator: Validator(s) to apply to dictionary values.

        mapping_validator:
            Validator(s) to apply to top-level mapping attribute.

    .. versionadded:: 19.1.0

    .. versionchanged:: 25.4.0
       *key_validator* and *value_validator* are now optional, but at least one
       of them must be provided.

    .. versionchanged:: 25.4.0
       *key_validator*, *value_validator*, and *mapping_validator* can now be a
       list or tuple of validators.

    Raises:
        TypeError: If any sub-validator fails on validation.

        ValueError:
            If neither *key_validator* nor *value_validator* is provided on
            instantiation.
    NzAAt least one of key_validator or value_validator must be provided)rR   r3   rp   rq   r
   r–   )r™   rš   r˜   r=   s       r"   r   r   š  sœ   € ðD Ð Ð!8àOð 	õ ˜‰oŒoÐå�-¥$­ Ñ/Ô/ð -Ý˜mÐ,ˆÝ�/¥D­% =Ñ1Ô1ð 1Ý Ð0ˆÝÐ#¥d­E ]Ñ3Ô3ð 5Ý Ð"3Ð4Ðå˜ Ð8IÑJÔJÐJr#   c                   óV   — e Zd Z e¦   «         Z e¦   «         Z e¦   «         Zd„ Zd„ ZdS )Ú_NumberValidatorc                 ó”   — |                       || j        ¦  «        s,d|j        › d| j        › d| j        › d|› �}t	          |¦  «        ‚dS )r.   r/   r0   r‘   ú: N)Úcompare_funcÚboundr5   Ú
compare_oprR   r8   s        r"   r>   z_NumberValidator.__call__Ò  s_   € ð × Ò  ¨¬
Ñ3Ô3ð 	"ØR�d”iÐRÐR¨4¬?ÐRÐR¸T¼ZÐRÐRÈ5ÐRÐRˆCÝ˜S‘/”/Ð!ð	"ð 	"r#   c                 ó(   — d| j         › d| j        › d�S )Nz<Validator for x r‘   r@   )r¤   r£   rB   s    r"   rC   z_NumberValidator.__repr__Ú  s   € ØB 4¤?ÐBÐB°T´ZÐBÐBÐBÐBr#   N)	rF   rG   rH   r   r£   r¤   r¢   r>   rC   r%   r#   r"   rŸ   rŸ   Ì  sX   € € € € € àˆF‰HŒH€EØ�‘”€JØ�6‘8”8€Lð"ð "ð "ðCð Cð Cð Cð Cr#   rŸ   c                 ó8   — t          | dt          j        ¦  «        S )a  
    A validator that raises `ValueError` if the initializer is called with a
    number larger or equal to *val*.

    The validator uses `operator.lt` to compare the values.

    Args:
        val: Exclusive upper bound for values.

    .. versionadded:: 21.3.0
    ú<)rŸ   Úoperatorr   ©Úvals    r"   r   r   Þ  ó   € õ ˜C ¥h¤kÑ2Ô2Ð2r#   c                 ó8   — t          | dt          j        ¦  «        S )a  
    A validator that raises `ValueError` if the initializer is called with a
    number greater than *val*.

    The validator uses `operator.le` to compare the values.

    Args:
        val: Inclusive upper bound for values.

    .. versionadded:: 21.3.0
    z<=)rŸ   r¨   r   r©   s    r"   r   r   í  ó   € õ ˜C ¥x¤{Ñ3Ô3Ð3r#   c                 ó8   — t          | dt          j        ¦  «        S )a  
    A validator that raises `ValueError` if the initializer is called with a
    number smaller than *val*.

    The validator uses `operator.ge` to compare the values.

    Args:
        val: Inclusive lower bound for values

    .. versionadded:: 21.3.0
    z>=)rŸ   r¨   r   r©   s    r"   r   r   ü  r­   r#   c                 ó8   — t          | dt          j        ¦  «        S )a  
    A validator that raises `ValueError` if the initializer is called with a
    number smaller or equal to *val*.

    The validator uses `operator.gt` to compare the values.

    Args:
       val: Exclusive lower bound for values

    .. versionadded:: 21.3.0
    r@   )rŸ   r¨   r   r©   s    r"   r   r     r«   r#   c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_MaxLengthValidatorc                 ó˜   — t          |¦  «        | j        k    r1d|j        › d| j        › dt          |¦  «        › �}t          |¦  «        ‚dS )r.   úLength of 'z' must be <= r¡   N)ÚlenÚ
max_lengthr5   rR   r8   s        r"   r>   z_MaxLengthValidator.__call__  óR   € õ ˆu‰:Œ:˜œÒ'Ð'ØW ¤	ÐWÐW¸¼ÐWÐWÍ3ÈuÉ:Ì:ÐWÐWˆCÝ˜S‘/”/Ð!ð (Ð'r#   c                 ó   — d| j         › d�S )Nz<max_len validator for r@   )rµ   rB   s    r"   rC   z_MaxLengthValidator.__repr__&  ó   € Ø;¨¬Ð;Ð;Ð;Ð;r#   N)rF   rG   rH   r   rµ   r>   rC   r%   r#   r"   r±   r±     ó=   € € € € € à�‘”€Jð"ð "ð "ð<ð <ð <ð <ð <r#   r±   c                 ó    — t          | ¦  «        S )zï
    A validator that raises `ValueError` if the initializer is called
    with a string or iterable that is longer than *length*.

    Args:
        length (int): Maximum length of the string or iterable

    .. versionadded:: 21.3.0
    )r±   ©Úlengths    r"   r   r   *  ó   € õ ˜vÑ&Ô&Ð&r#   c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_MinLengthValidatorc                 ó˜   — t          |¦  «        | j        k     r1d|j        › d| j        › dt          |¦  «        › �}t          |¦  «        ‚dS )r.   r³   z' must be >= r¡   N)r´   Ú
min_lengthr5   rR   r8   s        r"   r>   z_MinLengthValidator.__call__;  r¶   r#   c                 ó   — d| j         › d�S )Nz<min_len validator for r@   )rÁ   rB   s    r"   rC   z_MinLengthValidator.__repr__C  r¸   r#   N)rF   rG   rH   r   rÁ   r>   rC   r%   r#   r"   r¿   r¿   7  r¹   r#   r¿   c                 ó    — t          | ¦  «        S )zð
    A validator that raises `ValueError` if the initializer is called
    with a string or iterable that is shorter than *length*.

    Args:
        length (int): Minimum length of the string or iterable

    .. versionadded:: 22.1.0
    )r¿   r»   s    r"   r   r   G  r½   r#   c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_SubclassOfValidatorc                 óŠ   — t          || j        ¦  «        s-d|j        › d| j        ›d|›d�}t          ||| j        |¦  «        ‚dS )r.   r/   z' must be a subclass of r1   r2   N)Ú
issubclassr4   r5   r7   r8   s        r"   r>   z_SubclassOfValidator.__call__X  sf   € õ ˜% ¤Ñ+Ô+ð 	ØW�d”iÐWÐW¸¼ÐWÐWÈEÐWÐWÐWˆCÝØØØ”	Øñ	ô ð ð	ð 	r#   c                 ó   — d| j         ›d�S )Nz <subclass_of validator for type r@   rA   rB   s    r"   rC   z_SubclassOfValidator.__repr__e  rD   r#   NrE   r%   r#   r"   rÅ   rÅ   T  rI   r#   rÅ   c                 ó    — t          | ¦  «        S )aà  
    A validator that raises a `TypeError` if the initializer is called with a
    wrong type for this particular attribute (checks are performed using
    `issubclass` therefore it's also valid to pass a tuple of types).

    Args:
        type (type | tuple[type, ...]): The type(s) to check for.

    Raises:
        TypeError:
            With a human readable error message, the attribute (of type
            `attrs.Attribute`), the expected type, and the value it got.
    )rÅ   rA   s    r"   Ú_subclass_ofrÊ   i  rK   r#   c                   óª   — e Zd Z e¦   «         Z e ed¦  «        ¬¦  «        Z e e ee	¦  «         e
e¦  «        ¬¦  «        ¬¦  «        Zd„ Zd„ ZdS )Ú_NotValidatorzCnot_ validator child '{validator!r}' did not raise a captured error)Ú	converterr”   rk   c                 óÖ   — 	 |                       |||¦  «         t          | j                             | j         | j        ¬¦  «        || j         || j        ¦  «        ‚# | j        $ r Y d S w xY w)N©rl   Ú	exc_types)rl   rR   r=   r^   rÐ   rm   s       r"   r>   z_NotValidator.__call__Š  s‹   € ð	Ø�NŠN˜4  uÑ-Ô-Ð-õ Ø”—’Ø"œnØ"œnð  ñ ô ð Ø”ØØ”ñ	ô 	ð 	øð Œ~ð 	ð 	ð 	ØˆDˆDð	øøøs   ‚A Á
A(Á'A(c                 ó(   — d| j         ›d| j        ›d�S )Nz<not_ validator wrapping z, capturing r@   rÏ   rB   s    r"   rC   z_NotValidator.__repr__›  s   € Ø\¨4¬>Ð\Ð\ÈÌÐ\Ð\Ð\Ð\r#   N)rF   rG   rH   r   rl   r   r=   r   rÊ   Ú	Exceptionr   rq   rÐ   r>   rC   r%   r#   r"   rÌ   rÌ   z  s²   € € € € € à�‘”€IØ
ˆ&Ø!�/ð-ñ
ô 
ðñ ô €Cð �Ø�-Ø)˜\¨)Ñ4Ô4Ø*˜{¨5Ñ1Ô1ð
ñ 
ô 
ðñ ô €Iðð ð ð"]ð ]ð ]ð ]ð ]r#   rÌ   )r=   rÐ   c                ól   — 	 t          |¦  «        }n# t          $ r |f}Y nw xY wt          | ||¦  «        S )a:  
    A validator that wraps and logically 'inverts' the validator passed to it.
    It will raise a `ValueError` if the provided validator *doesn't* raise a
    `ValueError` or `TypeError` (by default), and will suppress the exception
    if the provided validator *does*.

    Intended to be used with existing validators to compose logic without
    needing to create inverted variants, for example, ``not_(in_(...))``.

    Args:
        validator: A validator to be logically inverted.

        msg (str):
            Message to raise if validator fails. Formatted with keys
            ``exc_types`` and ``validator``.

        exc_types (tuple[type, ...]):
            Exception type(s) to capture. Other types raised by child
            validators will not be intercepted and pass through.

    Raises:
        ValueError:
            With a human readable error message, the attribute (of type
            `attrs.Attribute`), the validator that failed to raise an
            exception, the value it got, and the expected exception types.

    .. versionadded:: 22.2.0
    )rq   r7   rÌ   )rl   r=   rÐ   s      r"   r   r   Ÿ  sN   € ð:!Ý˜)Ñ$Ô$ˆ	ˆ	øÝð !ð !ð !Ø�Lˆ	ˆ	ˆ	ð!øøøå˜ C¨Ñ3Ô3Ð3s   ‚ ’"¡"c                   ó.   — e Zd Z e¦   «         Zd„ Zd„ ZdS )Ú_OrValidatorc                 óŽ   — | j         D ]"}	  ||||¦  «          d S # t          $ r Y Œw xY wd| j         ›d|›�}t          |¦  «        ‚)NzNone of z satisfied for value )Ú
validatorsrÒ   rR   )r9   r:   r;   r<   Úvr=   s         r"   r>   z_OrValidator.__call__Ç  s}   € Ø”ð 	ð 	ˆAðØ��$˜˜eÑ$Ô$Ð$ð ��øõ ð ð ð Ø�ðøøøð
 K˜œÐJÐJÀÐJÐJˆÝ˜‰oŒoÐs   ‹›
(§(c                 ó   — d| j         ›d�S )Nz<or validator wrapping r@   )r×   rB   s    r"   rC   z_OrValidator.__repr__Ó  s   € Ø=¨¬Ð=Ð=Ð=Ð=r#   N)rF   rG   rH   r   r×   r>   rC   r%   r#   r"   rÕ   rÕ   Ã  s=   € € € € € à�‘”€Jð
ð 
ð 
ð>ð >ð >ð >ð >r#   rÕ   c                  ó¬   — g }| D ]4}|                      t          |t          ¦  «        r|j        n|g¦  «         Œ5t          t	          |¦  «        ¦  «        S )a  
    A validator that composes multiple validators into one.

    When called on a value, it runs all wrapped validators until one of them is
    satisfied.

    Args:
        validators (~collections.abc.Iterable[typing.Callable]):
            Arbitrary number of validators.

    Raises:
        ValueError:
            If no validator is satisfied. Raised with a human-readable error
            message listing all the wrapped validators and the value that
            failed all of them.

    .. versionadded:: 24.1.0
    )Úextendr3   rÕ   r×   rq   )r×   ÚvalsrØ   s      r"   r   r   ×  sZ   € ð& €DØð Jð JˆØ�Š¥J¨qµ,Ñ$?Ô$?ÐH�A”L�LÀaÀSÑIÔIÐIÐIå�˜d™œÑ$Ô$Ð$r#   )r   Nrj   )NNN)5Ú__doc__r¨   rZ   Ú
contextlibr   r   Ú_configr   r   Ú_maker	   r
   r   r   Ú
convertersr   Ú
exceptionsr   Ú__all__r    r   r   r,   r   rN   r   rh   r   rs   r   r   r   r‡   r   r–   r   rŸ   r   r   r   r   r±   r   r¿   r   rÅ   rÊ   rÌ   rR   r7   r   rÕ   r   r%   r#   r"   ú<module>rä      sî  ððð ð €€€Ø 	€	€	€	à %Ð %Ð %Ð %Ð %Ð %Ø Ð Ð Ð Ð Ð à ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ð 5Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'Ø (Ð (Ð (Ð (Ð (Ð (ðð ð €ð.%ð %ð %ð$	$ð 	$ð 	$ð ð!ð !ñ „ð!ð& €ˆE˜¨4Ð0Ñ0Ô0ðAð Að Að Að Añ Aô Añ 1Ô0ðAð(&ð &ð &ð" €ˆE˜$ dÐ+Ñ+Ô+ðFð Fð Fð Fð Fñ Fô Fñ ,Ô+ðFð*-4ð -4ð -4ð -4ð` €ˆE˜¨4Ð0Ñ0Ô0ð
Fð 
Fð 
Fð 
Fð 
Fñ 
Fô 
Fñ 1Ô0ð
Fð)ð )ð )ð* €ˆE˜¨4Ð0Ñ0Ô0ðJð Jð Jð Jð Jñ Jô Jñ 1Ô0ðJð. /ð  /ð  /ðF €ˆE˜¨DÐ1Ñ1Ô1ð)ð )ð )ð )ð )ñ )ô )ñ 2Ô1ð)ð*"ð "ð "ð  €ˆE˜¨4Ð0Ñ0Ô0ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ 1Ô0ð
ð8?ð ?ð ?ð ?ð4 €ˆE˜¨4Ð0Ñ0Ô0ðrð rð rð rð rñ rô rñ 1Ô0ðrð. AEð/Kð /Kð /Kð /Kðd €ˆE˜$ dÐ+Ñ+Ô+ðCð Cð Cð Cð Cñ Cô Cñ ,Ô+ðCð"3ð 3ð 3ð4ð 4ð 4ð4ð 4ð 4ð3ð 3ð 3ð €ˆE˜$ dÐ+Ñ+Ô+ð<ð <ð <ð <ð <ñ <ô <ñ ,Ô+ð<ð
'ð 
'ð 
'ð €ˆE˜$ dÐ+Ñ+Ô+ð<ð <ð <ð <ð <ñ <ô <ñ ,Ô+ð<ð
'ð 
'ð 
'ð €ˆE˜¨4Ð0Ñ0Ô0ðAð Að Að Að Añ Aô Añ 1Ô0ðAð(&ð &ð &ð" €ˆE˜¨4Ð0Ñ0Ô0ð!]ð !]ð !]ð !]ð !]ñ !]ô !]ñ 1Ô0ð!]ðH  ¨J¸	Ð+Bð !4ð !4ð !4ð !4ð !4ðH €ˆE˜¨4Ð0Ñ0Ô0ð>ð >ð >ð >ð >ñ >ô >ñ 1Ô0ð>ð&%ð %ð %ð %ð %r#   