§
    ZŠtj€  ã                  ó¸   — d dl mZ d dlm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 ddlmZ erd d	lmZ d
dgZdd„Z G d„ d
e¦  «        Z G d„ d¦  «        ZdS )é    )Úannotations)ÚTYPE_CHECKINGé   )Úparse_requirement)ÚParserSyntaxError)ÚMarkerÚ_normalize_extra_values)ÚInvalidSpecifierÚSpecifierSet©Úcanonicalize_name)ÚIteratorÚInvalidRequirementÚRequirementÚreturnú	list[str]c                 ó   — t           S ©N)Ú__all__© ó    úT/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/packaging/requirements.pyÚ__dir__r      s   € Ý€Nr   c                  ó   — e Zd ZdZdS )r   zf
    An invalid requirement was found, users should refer to PEP 508.

    .. versionadded:: 16.1
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r      s   € € € € € ðð ð ð r   c                  óV   — e Zd ZdZdZdd„Zdd
„Zdd„Zdd„Zdd„Z	dd„Z
dd„Zdd„ZdS )r   aÝ  Parse a requirement.

    Parse a given requirement string into its parts, such as name, specifier,
    URL, and extras. Raises InvalidRequirement on a badly-formed requirement
    string.

    .. versionadded:: 16.1

    .. versionchanged:: 22.0
        Added equality (``__eq__``) and hashing (``__hash__``) so requirements
        can be compared and stored in sets / dicts.

    .. versionchanged:: 23.2
        Equality and hashing began canonicalizing requirement names, so
        requirements whose names differ only by normalization (e.g.
        ``Requirement("Foo")`` vs ``Requirement("foo")``) now compare and hash
        equal.

    Instances are safe to serialize with :mod:`pickle`. They use a stable
    format so the same pickle can be loaded in future packaging releases.

    .. versionchanged:: 26.2

        Added a stable pickle format. Pickles created with packaging 26.2+ can
        be unpickled with future releases.  Backward compatibility with pickles
        from packaging < 26.2 is supported but may be removed in a future
        release.

    .. versionchanged:: 26.3

        The dedicated pickle support introduced in 26.2 did not preserve the
        specifier's explicit :attr:`~packaging.specifiers.SpecifierSet.prereleases`
        override; it is now included again.

        Equality and hashing normalize requirement names, extras, and
        equivalent specifiers. The string representation still preserves the
        parsed name and extras spelling.
    )ÚextrasÚmarkerÚnameÚ	specifierÚurlÚrequirement_stringÚstrr   ÚNonec                ó  — 	 t          |¦  «        }n/# t          $ r"}t          t          |¦  «        ¦  «        |‚d }~ww xY w|j        | _        |j        pd | _        t          |j        ¦  «        | _        	 t          |j	        ¦  «        | _	        n/# t          $ r"}t          t          |¦  «        ¦  «        |‚d }~ww xY wd | _        |j        �>t          j        t          ¦  «        | _        t          |j        ¦  «        | j        _        d S d S r   )Ú_parse_requirementr   r   r&   r"   r$   Úsetr    r   r#   r
   r!   r   Ú__new__r	   Ú_markers)Úselfr%   ÚparsedÚes       r   Ú__init__zRequirement.__init__R   s  € ð	4Ý'Ð(:Ñ;Ô;ˆFˆFøÝ ð 	4ð 	4ð 	4Ý$¥S¨¡V¤VÑ,Ô,°!Ð3øøøøð	4øøøð  œˆŒ	Ø%œzÐ1¨TˆŒÝ # F¤MÑ 2Ô 2ˆŒð	4Ý+7¸Ô8HÑ+IÔ+IˆDŒNˆNøÝð 	4ð 	4ð 	4Ý$¥S¨¡V¤VÑ,Ô,°!Ð3øøøøð	4øøøà%)ˆŒØŒ=Ð$Ý œ.­Ñ0Ô0ˆDŒKÝ#:¸6¼=Ñ#IÔ#IˆDŒKÔ Ð Ð ð %Ð$s(   ‚ ’
>œ9¹>Á5B Â
B;ÂB6Â6B;r"   úIterator[str]c              #  ó  K  — |V — | j         r/d                     t          | j         ¦  «        ¦  «        }d|› d�V — | j        rt	          | j        ¦  «        V — | j        rd| j        › �V — | j        rdV — | j        rd| j        › �V — d S d S )Nú,ú[ú]z @ ú z; )r    ÚjoinÚsortedr#   r&   r$   r!   )r-   r"   Úformatted_extrass      r   Ú_iter_partszRequirement._iter_partsd   sÐ   è è € Øˆ
ˆ
ˆ
àŒ;ð 	*Ø"Ÿxšx­¨t¬{Ñ(;Ô(;Ñ<Ô<ÐØ)Ð&Ð)Ð)Ð)Ð)Ð)Ð)àŒ>ð 	&Ý�d”nÑ%Ô%Ð%Ð%Ð%àŒ8ð 	Ø"˜œÐ"Ð"Ð"Ð"Ð"ØŒ{ð Ø�	�	�	àŒ;ð 	%Ø$�t”{Ð$Ð$Ð$Ð$Ð$Ð$Ð$ð	%ð 	%r   útuple[str, bool | None]c                ó8   — t          | ¦  «        | j        j        fS r   )r&   r#   Ú_prereleases©r-   s    r   Ú__getstate__zRequirement.__getstate__v   s   € õ
 �D‘	”	˜4œ>Ô6Ð7Ð7r   ÚstateÚobjectc                óö  — t          |t          ¦  «        r|}d }nàt          |t          ¦  «        rWt          |¦  «        dk    rDt          |d         t          ¦  «        r)|d         �t          |d         t          ¦  «        r|\  }}ntt          |t
          ¦  «        rM|                     ¦   «         t          | j        ¦  «        k    r#| j        D ]}t          | |||         ¦  «         Œd S t          d|›�¦  «        ‚	 t          |¦  «        }n%# t          $ r}t          d|›�¦  «        |‚d }~ww xY w|j        | _        |j        | _        |j        | _        |j        | _        || j        _        |j        | _        d S )Né   r   r   z Cannot restore Requirement from )Ú
isinstancer&   ÚtupleÚlenÚboolÚdictÚkeysr*   Ú	__slots__ÚsetattrÚ	TypeErrorr   r   r"   r$   r    r#   r=   r!   )r-   r@   r%   ÚprereleasesÚkeyÚtmpÚexcs          r   Ú__setstate__zRequirement.__setstate__}   sˆ  € Ý�e�SÑ!Ô!ð 	Jà&+ÐØ'+ˆKˆKå�u�eÑ$Ô$ð	Jå�E‘
”
˜a’�Ý˜5 œ8¥SÑ)Ô)ð  à�q”Ð!¥Z°°a´½$Ñ%?Ô%?Ð!ð /4Ñ+Ð  Ý˜�tÑ$Ô$ð 	J¨¯ª©¬½¸T¼^Ñ9LÔ9LÒ)LÐ)Là”~ð /ð /�Ý˜˜c 5¨¤:Ñ.Ô.Ð.Ð.ØˆFåÐH¸uÐHÐHÑIÔIÐIð	SÝÐ0Ñ1Ô1ˆCˆCøÝ!ð 	Sð 	Sð 	SÝÐH¸uÐHÐHÑIÔIÈsÐRøøøøð	Søøøà”HˆŒ	Ø”7ˆŒØ”jˆŒØœˆŒØ&1ˆŒÔ#Ø”jˆŒˆˆs   Ã<D Ä
D.ÄD)Ä)D.c                ó\   — d                      |                      | j        ¦  «        ¦  «        S )NÚ )r7   r:   r"   r>   s    r   Ú__str__zRequirement.__str__�   s$   € Ø�wŠw�t×'Ò'¨¬	Ñ2Ô2Ñ3Ô3Ð3r   c                óB   — d| j         j        › dt          | ¦  «        ›d�S )Nú<ú(z)>)Ú	__class__r   r&   r>   s    r   Ú__repr__zRequirement.__repr__    s&   € Ø<�4”>Ô*Ð<Ð<­S°©Y¬YÐ<Ð<Ð<Ð<r   Úintc                ó¤   — t          t          | j        ¦  «        t          d„ | j        D ¦   «         ¦  «        | j        | j        | j        f¦  «        S )Nc              3  ó4   K  — | ]}t          |¦  «        V — Œd S r   r   ©Ú.0r/   s     r   ú	<genexpr>z'Requirement.__hash__.<locals>.<genexpr>¬   s+   è è € ÐDÐD°1Õ+¨AÑ.Ô.ÐDÐDÐDÐDÐDÐDr   )Úhashr   r"   Ú	frozensetr    r#   r$   r!   r>   s    r   Ú__hash__zRequirement.__hash__£   sS   € õ å! $¤)Ñ,Ô,ÝÐDÐD¸¼ÐDÑDÔDÑDÔDØ”Ø”Ø”ðñ
ô 
ð 	
r   ÚotherrG   c                ór  — t          |t          ¦  «        st          S t          d„ | j        D ¦   «         ¦  «        }t          d„ |j        D ¦   «         ¦  «        }t          | j        ¦  «        t          |j        ¦  «        k    o5||k    o/| j        |j        k    o| j        |j        k    o| j	        |j	        k    S )Nc              3  ó4   K  — | ]}t          |¦  «        V — Œd S r   r   r]   s     r   r_   z%Requirement.__eq__.<locals>.<genexpr>¸   s+   è è € ÐJÐJ¸Õ 1°!Ñ 4Ô 4ÐJÐJÐJÐJÐJÐJr   c              3  ó4   K  — | ]}t          |¦  «        V — Œd S r   r   r]   s     r   r_   z%Requirement.__eq__.<locals>.<genexpr>¹   s+   è è € Ð LÐ L¸!Õ!2°1Ñ!5Ô!5Ð LÐ LÐ LÐ LÐ LÐ Lr   )
rD   r   ÚNotImplementedra   r    r   r"   r#   r$   r!   )r-   rc   Úself_extrasÚother_extrass       r   Ú__eq__zRequirement.__eq__³   s¾   € Ý˜%¥Ñ-Ô-ð 	"Ý!Ð!õ  ÐJÐJ¸d¼kÐJÑJÔJÑJÔJˆÝ Ð LÐ L¸u¼|Ð LÑ LÔ LÑLÔLˆå˜dœiÑ(Ô(Õ,=¸e¼jÑ,IÔ,IÒIð ,Ø˜|Ò+ð,à” %¤/Ò1ð,ð ”˜EœIÒ%ð,ð ”˜uœ|Ò+ð	
r   N)r%   r&   r   r'   )r"   r&   r   r1   )r   r;   )r@   rA   r   r'   )r   r&   )r   rZ   )rc   rA   r   rG   )r   r   r   r   rJ   r0   r:   r?   rQ   rT   rY   rb   rj   r   r   r   r   r   #   sÌ   € € € € € ð%ð %ðX A€IðJð Jð Jð Jð$%ð %ð %ð %ð$8ð 8ð 8ð 8ð!ð !ð !ð !ð@4ð 4ð 4ð 4ð=ð =ð =ð =ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r   N)r   r   )Ú
__future__r   Útypingr   Ú_parserr   r)   Ú
_tokenizerr   Úmarkersr   r	   Ú
specifiersr
   r   Úutilsr   Úcollections.abcr   r   r   Ú
ValueErrorr   r   r   r   r   ú<module>rt      s4  ðð #Ð "Ð "Ð "Ð "Ð "à  Ð  Ð  Ð  Ð  Ð  à <Ð <Ð <Ð <Ð <Ð <Ø )Ð )Ð )Ð )Ð )Ð )Ø 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ð 4Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø $Ð $Ð $Ð $Ð $Ð $àð )Ø(Ð(Ð(Ð(Ð(Ð(ð Øð€ðð ð ð ðð ð ð ð ˜ñ ô ð ð]
ð ]
ð ]
ð ]
ð ]
ñ ]
ô ]
ð ]
ð ]
ð ]
r   