§
    ZŠtj}-  ã                  ó¶  — d dl mZ d dlZd dlZd dlZd dlmZ d dlm	Z	m
Z
mZmZ e	r(d dlZd dlmZ d dlmZ ej        dk    rd dlmZ nd dlmZ g d	¢Zd=d„Z ed¦  «        Z G d„ de¦  «        Z ede¬¦  «        Zd>d„Zd?d„Zd@d„ZdAd"„Z ej        d#¦  «        ZdBd'„ZdCd)„ZdDd-„Z  G d.„ d/e!¦  «        Z" G d0„ d1e"¦  «        Z# ej$        d2d3¬4¦  «         G d5„ d6¦  «        ¦   «         Z% ej$        d2d3¬4¦  «         G d7„ d8¦  «        ¦   «         Z& ej$        d2d3¬4¦  «         G d9„ d:¦  «        ¦   «         Z' ej$        d2d3¬4¦  «         G d;„ d<¦  «        ¦   «         Z(dS )Eé    )ÚannotationsN)ÚMapping)ÚTYPE_CHECKINGÚAnyÚProtocolÚTypeVar)Ú
Collection)ÚSplitResult)é   é   )ÚSelf)ÚArchiveInfoÚDirInfoÚ	DirectUrlÚDirectUrlValidationErrorÚVcsInfoÚreturnú	list[str]c                 ó   — t           S ©N)Ú__all__© ó    úR/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/packaging/direct_url.pyÚ__dir__r      s   € Ý€Nr   Ú_Tc                  ó&   — e Zd Zedd„¦   «         ZdS )Ú_FromMappingProtocolÚdúMapping[str, Any]r   r   c                ó   — d S r   r   ©Úclsr   s     r   Ú
_from_dictz_FromMappingProtocol._from_dict$   s   € Ø7:°sr   N©r   r    r   r   )Ú__name__Ú
__module__Ú__qualname__Úclassmethodr$   r   r   r   r   r   #   s&   € € € € € ØØ:Ð:Ð:ñ „[Ø:Ð:Ð:r   r   Ú_FromMappingProtocolT)ÚboundÚdataúlist[tuple[str, Any]]údict[str, Any]c                ó   — d„ | D ¦   «         S )Nc                ó   — i | ]
\  }}|®||“ŒS r   r   )Ú.0ÚkeyÚvalues      r   ú
<dictcomp>z&_json_dict_factory.<locals>.<dictcomp>,   s#   € ÐCÐCÐC™:˜3 °Ð1BˆC�Ð1BÐ1BÐ1Br   r   )r,   s    r   Ú_json_dict_factoryr5   +   s   € ØCÐC¨ÐCÑCÔCÐCr   r   r    Úexpected_typeútype[_T]r2   Ústrú	_T | Nonec                ó¶   — |                       |¦  «        x}€dS t          ||¦  «        s/t          dt          |¦  «        j        › d|j        › d�|¬¦  «        ‚|S )zBGet a value from the dictionary and verify it's the expected type.NzUnexpected type z (expected ú)©Úcontext)ÚgetÚ
isinstancer   Útyper&   ©r   r6   r2   r3   s       r   Ú_getrB   /   s~   € à—’�s‘”ÐˆÐ$ØˆtÝ�e˜]Ñ+Ô+ð 
Ý&ð3�t E™{œ{Ô3ð 3ð 3Ø&Ô/ð3ð 3ð 3àð
ñ 
ô 
ð 	
ð
 €Lr   c                óJ   — t          | ||¦  «        x}€t          |¦  «        ‚|S )zKGet a required value from the dictionary and verify it's the expected type.)rB   Ú_DirectUrlRequiredKeyErrorrA   s       r   Ú_get_requiredrE   <   s,   € å�a˜¨Ñ,Ô,Ð,ˆÐ5Ý(¨Ñ-Ô-Ð-Ø€Lr   Útarget_typeútype[_FromMappingProtocolT]ú_FromMappingProtocolT | Nonec                óª   — t          | t          |¦  «        x}€dS 	 |                     |¦  «        S # t          $ r}t	          ||¬¦  «        |‚d}~ww xY w)zIGet a dictionary value from the dictionary and convert it to a dataclass.Nr<   )rB   r   r$   Ú	Exceptionr   )r   rF   r2   r3   Úes        r   Ú_get_objectrL   C   sm   € õ �a� #Ñ&Ô&Ð&ˆÐ/Øˆtð>Ø×%Ò% eÑ,Ô,Ð,øÝð >ð >ð >Ý& q°#Ð6Ñ6Ô6¸AÐ=øøøøð>øøøs   œ1 ±
A»AÁAz.^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$ÚnetlocÚsafe_user_passwordsúCollection[str]c                óˆ   — d| vr| S |                       dd¦  «        \  }}||v r| S t                               |¦  «        r| S |S )Nú@é   )ÚrsplitÚ _PEP610_USER_PASS_ENV_VARS_REGEXÚmatch)rM   rN   Ú	user_passÚnetloc_no_user_passs       r   Ú_strip_auth_from_netlocrX   T   s]   € Ø
�&ÐÐØˆØ%+§]¢]°3¸Ñ%:Ô%:Ñ"€IÐ"ØÐ'Ð'Ð'ØˆÝ'×-Ò-¨iÑ8Ô8ð ØˆØÐr   Úurlc                óÚ   — t           j                             | ¦  «        }t          |j        |¦  «        }t           j                             |j        ||j        |j        |j	        f¦  «        S )z¥url with user:password part removed unless it is formed with
    environment variables as specified in PEP 610, or it is a safe user:password
    such as `git`.
    )
ÚurllibÚparseÚurlsplitrX   rM   Ú
urlunsplitÚschemeÚpathÚqueryÚfragment)rY   rN   Ú
parsed_urlrM   s       r   Ú
_strip_urlrd   _   se   € õ
 ”×&Ò& sÑ+Ô+€JÝ$ ZÔ%6Ð8KÑLÔL€FÝŒ<×"Ò"àÔØØŒOØÔØÔð	
ñô ð r   rc   r
   Úboolc                ó6   — | j                              d¦  «        S )Nú/)r`   Ú
startswith)rc   s    r   Ú_file_url_has_absolute_pathri   q   s   € ØŒ?×%Ò% cÑ*Ô*Ð*r   c                  óB   — e Zd ZU dZdZded<   ded<   ddœdd„Zdd„ZdS )r   zSRaised when when input data is not spec-compliant.

    .. versionadded:: 26.1
    Nú
str | Noner=   r8   Úmessager<   Úcauseústr | Exceptionr   ÚNonec               óÔ   — t          |t          ¦  «        r7|j        r|r|› d|j        › �n|j        | _        n|| _        |j        | _        d S || _        t	          |¦  «        | _        d S )Nú.)r?   r   r=   rl   r8   )Úselfrm   r=   s      r   Ú__init__z!DirectUrlValidationError.__init__~   sw   € õ �eÕ5Ñ6Ô6ð 
	&ØŒ}ð 'à4;ÐN�wÐ0Ð0 ¤Ð0Ð0Ð0ÀÄð ”�ð  '�”Ø œ=ˆDŒLˆLˆLà"ˆDŒLÝ˜u™:œ:ˆDŒLˆLˆLr   c                ó@   — | j         r| j        › d| j         ›�S | j        S )Nz in )r=   rl   ©rr   s    r   Ú__str__z DirectUrlValidationError.__str__�   s,   € ØŒ<ð 	9Ø”lÐ8Ð8¨¬Ð8Ð8Ð8ØŒ|Ðr   )rm   rn   r=   rk   r   ro   )r   r8   )r&   r'   r(   Ú__doc__r=   Ú__annotations__rs   rv   r   r   r   r   r   u   ss   € € € € € € ðð ð
 €GÐÐÐÑØ€L€L�Lð #ð	&ð &ð &ð &ð &ð &ð$ð ð ð ð ð r   r   c                  ó    ‡ — e Zd Zdˆ fd„Zˆ xZS )rD   r2   r8   r   ro   c                óN   •— t          ¦   «                              d|¬¦  «         d S )NzMissing required valuer<   )Úsuperrs   )rr   r2   Ú	__class__s     €r   rs   z#_DirectUrlRequiredKeyError.__init__—   s'   ø€ Ý‰Œ×ÒÐ1¸3ÐÑ?Ô?Ð?Ð?Ð?r   )r2   r8   r   ro   )r&   r'   r(   rs   Ú__classcell__)r|   s   @r   rD   rD   –   sG   ø€ € € € € ð@ð @ð @ð @ð @ð @ð @ð @ð @ð @r   rD   TF)ÚfrozenÚinitc                  ó\   — e Zd ZU dZded<   ded<   dZded<   ddœdd„Zedd„¦   «         ZdS )r   z8The version control information of a :class:`DirectUrl`.r8   ÚvcsÚ	commit_idNrk   Úrequested_revision)rƒ   r   ro   c               ó®   — t                                | d|¦  «         t                                | d|¦  «         t                                | d|¦  «         d S )Nr�   r‚   rƒ   ©ÚobjectÚ__setattr__)rr   r�   r‚   rƒ   s       r   rs   zVcsInfo.__init__£   sT   € õ 	×Ò˜4 ¨Ñ,Ô,Ð,Ý×Ò˜4 ¨iÑ8Ô8Ð8Ý×Ò˜4Ð!5Ð7IÑJÔJÐJÐJÐJr   r   r    r   c           	     ó–   —  | t          |t          d¦  «        t          |t          d¦  «        t          |t          d¦  «        ¬¦  «        S )Nr�   rƒ   r‚   )r�   rƒ   r‚   )rE   r8   rB   r"   s     r   r$   zVcsInfo._from_dict®   sK   € ð ˆsÝ˜a¥ eÑ,Ô,Ý# A¥sÐ,@ÑAÔAÝ# A¥s¨KÑ8Ô8ð
ñ 
ô 
ð 	
r   )r�   r8   r‚   r8   rƒ   rk   r   ro   r%   )	r&   r'   r(   rw   rx   rƒ   rs   r)   r$   r   r   r   r   r   ›   s‰   € € € € € € àBÐBà€H€H�HØ€N€N�NØ%)ÐÐ)Ð)Ð)Ñ)ð *.ð	Kð 	Kð 	Kð 	Kð 	Kð 	Kð ð
ð 
ð 
ñ „[ð
ð 
ð 
r   r   c                  óH   — e Zd ZU dZdZded<   ddœdd„Zedd„¦   «         ZdS )r   z0The archive information of a :class:`DirectUrl`.NúMapping[str, str] | NoneÚhashes©r‹   r   ro   c               ó>   — t                                | d|¦  «         d S )Nr‹   r…   )rr   r‹   s     r   rs   zArchiveInfo.__init__¾   s"   € õ
 	×Ò˜4 ¨6Ñ2Ô2Ð2Ð2Ð2r   r   r    r   c                óÐ  — t          |t          d¦  «        }|�<t          d„ |                     ¦   «         D ¦   «         ¦  «        st	          dd¬¦  «        ‚t          |t
          d¦  «        }|�od|vrt	          dd¬¦  «        ‚|                     dd¦  «        \  }}|€||i}n:||vrt	          d	|›d
�d¬¦  «        ‚||         |k    rt	          d	|›d�d¬¦  «        ‚ | |¬¦  «        S )Nr‹   c              3  ó@   K  — | ]}t          |t          ¦  «        V — Œd S r   )r?   r8   )r1   Úhs     r   ú	<genexpr>z)ArchiveInfo._from_dict.<locals>.<genexpr>È   s,   è è € Ð)VÐ)VÀ­*°Q½Ñ*<Ô*<Ð)VÐ)VÐ)VÐ)VÐ)VÐ)Vr   zHash values must be stringsr<   Úhashú=z3Invalid hash format (expected '<algorithm>=<hash>')rR   z
Algorithm z2 used in hash field is not present in hashes fieldz7 used in hash field has different value in hashes fieldrŒ   )rB   r   ÚallÚvaluesr   r8   Úsplit)r#   r   r‹   Úlegacy_hashÚhash_algorithmÚ
hash_values         r   r$   zArchiveInfo._from_dictÅ   s[  € å�a� (Ñ+Ô+ˆØÐ¥cÐ)VÐ)VÀfÇmÂmÁoÄoÐ)VÑ)VÔ)VÑ&VÔ&VÐÝ*Ø-°xðñ ô ð õ ˜1�c 6Ñ*Ô*ˆØÐ"Ø˜+Ð%Ð%Ý.ØIØ"ðñ ô ð ð *5×):Ò):¸3ÀÑ)BÔ)BÑ&ˆN˜JØˆ~à(¨*Ð5��ð "¨Ð/Ð/Ý2ð: ^ð :ð :ð :à (ðñ ô ð ð
 ˜.Ô)¨ZÒ7Ð7Ý2ð? ^ð ?ð ?ð ?à &ðñ ô ð ð
 ˆs˜&Ð!Ñ!Ô!Ð!r   )r‹   rŠ   r   ro   r%   )	r&   r'   r(   rw   r‹   rx   rs   r)   r$   r   r   r   r   r   ¸   sp   € € € € € € à:Ð:à'+€FÐ+Ð+Ð+Ñ+ð
 ,0ð3ð 3ð 3ð 3ð 3ð 3ð ð"ð "ð "ñ „[ð"ð "ð "r   r   c                  óH   — e Zd ZU dZdZded<   ddœdd„Zedd„¦   «         ZdS )r   z8The local directory information of a :class:`DirectUrl`.Núbool | NoneÚeditable©rœ   r   ro   c               ó>   — t                                | d|¦  «         d S )Nrœ   r…   )rr   rœ   s     r   rs   zDirInfo.__init__î   s"   € õ
 	×Ò˜4 ¨XÑ6Ô6Ð6Ð6Ð6r   r   r    r   c                óB   —  | t          |t          d¦  «        ¬¦  «        S )Nrœ   r�   )rB   re   r"   s     r   r$   zDirInfo._from_dictõ   s*   € àˆsÝ˜!�T :Ñ.Ô.ð
ñ 
ô 
ð 	
r   )rœ   r›   r   ro   r%   )	r&   r'   r(   rw   rœ   rx   rs   r)   r$   r   r   r   r   r   è   sp   € € € € € € àBÐBà €HÐ Ð Ð Ñ ð
 !%ð7ð 7ð 7ð 7ð 7ð 7ð ð
ð 
ð 
ñ „[ð
ð 
ð 
r   r   c                  ó´   — e Zd ZU dZded<   dZded<   dZded<   dZd	ed
<   dZded<   dddddœd!d„Z	e
d"d„¦   «         Ze
d"d„¦   «         Zddddœd#d„Zd$d „ZdS )%r   zCA class representing a direct URL.

    .. versionadded:: 26.1
    r8   rY   NúArchiveInfo | NoneÚarchive_infoúVcsInfo | NoneÚvcs_infoúDirInfo | NoneÚdir_infork   Úsubdirectory)r¢   r¤   r¦   r§   r   ro   c               ó  — t                                | d|¦  «         t                                | d|¦  «         t                                | d|¦  «         t                                | d|¦  «         t                                | d|¦  «         d S )NrY   r¢   r¤   r¦   r§   r…   )rr   rY   r¢   r¤   r¦   r§   s         r   rs   zDirectUrl.__init__	  s‚   € õ 	×Ò˜4 ¨Ñ,Ô,Ð,Ý×Ò˜4 °Ñ>Ô>Ð>Ý×Ò˜4 ¨XÑ6Ô6Ð6Ý×Ò˜4 ¨XÑ6Ô6Ð6Ý×Ò˜4 °Ñ>Ô>Ð>Ð>Ð>r   r   r    r   c                ó^  —  | t          |t          d¦  «        t          |t          d¦  «        t          |t          d¦  «        t          |t
          d¦  «        t          |t          d¦  «        ¬¦  «        }t          |j        ¦  «        t          |j	        ¦  «        z   t          |j
        ¦  «        z   dk    rt          d¦  «        ‚|j
        �`t          j                             |j        ¦  «        }|j        d	k    rt          d
d¬¦  «        ‚t#          |¦  «        st          dd¬¦  «        ‚|S )NrY   r¢   r¤   r¦   r§   )rY   r¢   r¤   r¦   r§   rR   z?Exactly one of vcs_info, archive_info, dir_info must be presentÚfilez3URL scheme must be file:// when dir_info is presentr<   z2File URL must be absolute when dir_info is present)rE   r8   rL   r   r   r   rB   re   r¤   r¢   r¦   r   r[   r\   r]   rY   r_   ri   )r#   r   Ú
direct_urlrc   s       r   r$   zDirectUrl._from_dict  sC  € à�SÝ˜a¥ eÑ,Ô,Ý$ Q­°^ÑDÔDÝ  ¥G¨ZÑ8Ô8Ý  ¥G¨ZÑ8Ô8Ý˜a¥ nÑ5Ô5ð
ñ 
ô 
ˆ
õ �Ô$Ñ%Ô%Ý�:Ô*Ñ+Ô+ñ,å�:Ô&Ñ'Ô'ñ(ð ò	ð õ
 +ØQñô ð ð ÔÐ*Ýœ×.Ò.¨z¬~Ñ>Ô>ˆJØÔ  FÒ*Ð*Ý.ØIØ!ðñ ô ð õ /¨zÑ:Ô:ð Ý.ØHØ!ðñ ô ð ð
 Ðr   c               ó,   — |                       |¦  «        S )z@Create and validate a DirectUrl instance from a JSON dictionary.)r$   r"   s     r   Ú	from_dictzDirectUrl.from_dict8  s   € ð �~Š~˜aÑ Ô Ð r   FT)Úgit)Úgenerate_legacy_hashÚstrip_user_passwordrN   r¯   re   r°   rN   rO   c               ó0  — t          j        | t          ¬¦  «        }|r^| j        rW| j        j        rKt          t          | j        j                             ¦   «         ¦  «        ¦  «        \  }}|› d|› �|d         d<   |rt          | j	        |¦  «        |d<   |S )aŽ  Convert the DirectUrl instance to a JSON dictionary.

        :param generate_legacy_hash: If True, include a legacy `hash` field in
            `archive_info` for backward compatibility with tools that don't
            support the `hashes` field.
        :param strip_user_password: If True, strip user:password from the URL
            unless it is formed with environment variables as specified in PEP
            610, or it is a safe user:password such as `git`.
        :param safe_user_passwords: A collection of user:password strings that
            should not be stripped from the URL even if `strip_user_password` is
            True.
        )Údict_factoryr“   r¢   r’   rY   )
ÚdataclassesÚasdictr5   r¢   r‹   ÚnextÚiterÚitemsrd   rY   )rr   r¯   r°   rN   Úresr˜   r™   s          r   Úto_dictzDirectUrl.to_dict=  s©   € õ& Ô  Õ4FÐGÑGÔGˆØð 	K DÔ$5ð 	K¸$Ô:KÔ:Rð 	KÝ)-­d°4Ô3DÔ3K×3QÒ3QÑ3SÔ3SÑ.TÔ.TÑ)UÔ)UÑ&ˆN˜JØ-;Ð*JÐ*J¸jÐ*JÐ*JˆC�Ô Ñ'Øð 	CÝ# D¤HÐ.AÑBÔBˆC�‰JØˆ
r   c                óT   — |                       |                      ¦   «         ¦  «         dS )z�Validate the DirectUrl instance against the specification.

        Raises :class:`DirectUrlValidationError` if invalid.
        N)r­   r¹   ru   s    r   ÚvalidatezDirectUrl.validateX  s$   € ð
 	�Š�t—|’|‘~”~Ñ&Ô&Ð&Ð&Ð&r   )rY   r8   r¢   r¡   r¤   r£   r¦   r¥   r§   rk   r   ro   r%   )r¯   re   r°   re   rN   rO   r   r    )r   ro   )r&   r'   r(   rw   rx   r¢   r¤   r¦   r§   rs   r)   r$   r­   r¹   r»   r   r   r   r   r   ü   s  € € € € € € ðð ð
 €H€H�HØ'+€LÐ+Ð+Ð+Ñ+Ø#€HÐ#Ð#Ð#Ñ#Ø#€HÐ#Ð#Ð#Ñ#Ø#€LÐ#Ð#Ð#Ñ#ð ,0Ø#'Ø#'Ø#'ð?ð ?ð ?ð ?ð ?ð ?ð ðð ð ñ „[ðð> ð!ð !ð !ñ „[ð!ð &+Ø$(Ø/7ðð ð ð ð ð ð6'ð 'ð 'ð 'ð 'ð 'r   r   )r   r   )r,   r-   r   r.   )r   r    r6   r7   r2   r8   r   r9   )r   r    r6   r7   r2   r8   r   r   )r   r    rF   rG   r2   r8   r   rH   )rM   r8   rN   rO   r   r8   )rY   r8   rN   rO   r   r8   )rc   r
   r   re   ))Ú
__future__r   r³   ÚreÚurllib.parser[   Úcollections.abcr   Útypingr   r   r   r   Úsysr	   r
   Úversion_infor   Útyping_extensionsr   r   r   r   r*   r5   rB   rE   rL   ÚcompilerT   rX   rd   ri   rJ   r   rD   Ú	dataclassr   r   r   r   r   r   r   ú<module>rÆ      s‡  ðØ "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ø 	€	€	€	Ø Ð Ð Ð Ø #Ð #Ð #Ð #Ð #Ð #Ø 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8Ð 8àð +Ø€J€J€JØ*Ð*Ð*Ð*Ð*Ð*Ø(Ð(Ð(Ð(Ð(Ð(à
Ô˜7Ò"Ð"ØÐÐÐÐÐÐà*Ð*Ð*Ð*Ð*Ð*ðð ð €ðð ð ð ð €WˆT�]„]€ð;ð ;ð ;ð ;ð ;˜8ñ ;ô ;ð ;ð
  ˜Ð 7Ð?SÐTÑTÔTÐ ðDð Dð Dð Dð
ð 
ð 
ð 
ðð ð ð ð	>ð 	>ð 	>ð 	>ð $. 2¤:Ø5ñ$ô $Ð  ð
ð ð ð ðð ð ð ð$+ð +ð +ð +ðð ð ð ð ˜yñ ô ð ðB@ð @ð @ð @ð @Ð!9ñ @ô @ð @ð
 €Ô˜d¨Ð/Ñ/Ô/ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ 0Ô/ð
ð8 €Ô˜d¨Ð/Ñ/Ô/ð,"ð ,"ð ,"ð ,"ð ,"ñ ,"ô ,"ñ 0Ô/ð,"ð^ €Ô˜d¨Ð/Ñ/Ô/ð
ð 
ð 
ð 
ð 
ñ 
ô 
ñ 0Ô/ð
ð& €Ô˜d¨Ð/Ñ/Ô/ð`'ð `'ð `'ð `'ð `'ñ `'ô `'ñ 0Ô/ð`'ð `'ð `'r   