§
    
Á³g�  ã                   óÌ  — d dl Z d dlZd dlZd dlZd dlmZmZmZmZ d dl	m
Z
 d dlmZ d dlmZmZ d dlmZ  e j        e¦  «        Zee
         Zee         Zeegee
         f         Zeegef         Z G d„ d¦  «        Zd	ed
efd„Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z dededededed
eee         ee         f         fd„Z!dS )é    N)ÚCallableÚIterableÚOptionalÚTuple)ÚInstallationCandidate)ÚLink)Úpath_to_urlÚurl_to_path)Úis_urlc                   óN   — e Zd Zedee         fd„¦   «         Zdefd„Zde	fd„Z
dS )Ú
LinkSourceÚreturnc                 ó   — t          ¦   «         ‚)z,Returns the underlying link, if there's one.©ÚNotImplementedError©Úselfs    úY/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/pip/_internal/index/sources.pyÚlinkzLinkSource.link   s   € õ "Ñ#Ô#Ð#ó    c                 ó   — t          ¦   «         ‚)z9Candidates found by parsing an archive listing HTML file.r   r   s    r   Úpage_candidateszLinkSource.page_candidates   ó   € å!Ñ#Ô#Ð#r   c                 ó   — t          ¦   «         ‚)z,Links found by specifying archives directly.r   r   s    r   Ú
file_linkszLinkSource.file_links   r   r   N)Ú__name__Ú
__module__Ú__qualname__Úpropertyr   r   r   ÚFoundCandidatesr   Ú
FoundLinksr   © r   r   r   r      ss   € € € € € Øð$�h˜t”nð $ð $ð $ñ „Xð$ð$ ð $ð $ð $ð $ð$˜Jð $ð $ð $ð $ð $ð $r   r   Úfile_urlr   c                 óB   — t          j        | d¬¦  «        d         dk    S )NF)Ústrictr   z	text/html)Ú	mimetypesÚ
guess_type)r#   s    r   Ú_is_html_filer(   #   s"   € ÝÔ °Ð7Ñ7Ô7¸Ô:¸kÒIÐIr   c                   óf   — e Zd ZdZdededdfd„Zedee	         fd„¦   «         Z
defd„Zdefd	„ZdS )
Ú_FlatDirectorySourcezûLink source specified by ``--find-links=<path-to-dir>``.

    This looks the content of the directory, and returns:

    * ``page_candidates``: Links listed on each HTML file in the directory.
    * ``file_candidates``: Archives in the directory.
    Úcandidates_from_pageÚpathr   Nc                 ó€   — || _         t          j        t          j                             |¦  «        ¦  «        | _        d S ©N)Ú_candidates_from_pageÚpathlibÚPathÚosr,   ÚrealpathÚ_path)r   r+   r,   s      r   Ú__init__z_FlatDirectorySource.__init__0   s1   € ð
 &:ˆÔ"Ý”\¥"¤'×"2Ò"2°4Ñ"8Ô"8Ñ9Ô9ˆŒ
ˆ
ˆ
r   c                 ó   — d S r.   r"   r   s    r   r   z_FlatDirectorySource.link8   s   € àˆtr   c              #   óê   K  — | j                              ¦   «         D ]V}t          t          |¦  «        ¦  «        }t	          |¦  «        sŒ.|                      t          |¦  «        ¦  «        E d {V —† ŒWd S r.   )r4   Úiterdirr	   Ústrr(   r/   r   ©r   r,   Úurls      r   r   z$_FlatDirectorySource.page_candidates<   s‚   è è € Ø”J×&Ò&Ñ(Ô(ð 	=ð 	=ˆDÝ�c $™iœiÑ(Ô(ˆCÝ  Ñ%Ô%ð ØØ×1Ò1µ$°s±)´)Ñ<Ô<Ð<Ð<Ð<Ð<Ð<Ð<Ð<Ð<ð		=ð 	=r   c              #   ó¼   K  — | j                              ¦   «         D ]?}t          t          |¦  «        ¦  «        }t	          |¦  «        rŒ.t          |¦  «        V — Œ@d S r.   )r4   r8   r	   r9   r(   r   r:   s      r   r   z_FlatDirectorySource.file_linksC   sd   è è € Ø”J×&Ò&Ñ(Ô(ð 	ð 	ˆDÝ�c $™iœiÑ(Ô(ˆCÝ˜SÑ!Ô!ð ØÝ�s‘)”)ˆOˆOˆOˆOð		ð 	r   )r   r   r   Ú__doc__ÚCandidatesFromPager9   r5   r   r   r   r   r    r   r!   r   r"   r   r   r*   r*   '   s¯   € € € € € ðð ð:à0ð:ð ð:ð 
ð	:ð :ð :ð :ð ð�h˜t”nð ð ð ñ „Xðð= ð =ð =ð =ð =ð˜Jð ð ð ð ð ð r   r*   c                   óf   — e Zd ZdZdededdfd„Zedee         fd„¦   «         Z	de
fd„Zdefd	„ZdS )
Ú_LocalFileSourceaC  ``--find-links=<path-or-url>`` or ``--[extra-]index-url=<path-or-url>``.

    If a URL is supplied, it must be a ``file:`` URL. If a path is supplied to
    the option, it is converted to a URL first. This returns:

    * ``page_candidates``: Links listed on an HTML file.
    * ``file_candidates``: The non-HTML file.
    r+   r   r   Nc                 ó"   — || _         || _        d S r.   ©r/   Ú_link©r   r+   r   s      r   r5   z_LocalFileSource.__init__U   ó   € ð
 &:ˆÔ"ØˆŒ
ˆ
ˆ
r   c                 ó   — | j         S r.   ©rC   r   s    r   r   z_LocalFileSource.link]   ó
   € àŒzÐr   c              #   ó€   K  — t          | j        j        ¦  «        sd S |                      | j        ¦  «        E d {V —† d S r.   )r(   rC   r;   r/   r   s    r   r   z _LocalFileSource.page_candidatesa   sM   è è € Ý˜TœZœ^Ñ,Ô,ð 	ØˆFØ×-Ò-¨d¬jÑ9Ô9Ð9Ð9Ð9Ð9Ð9Ð9Ð9Ð9Ð9r   c              #   óR   K  — t          | j        j        ¦  «        rd S | j        V — d S r.   )r(   rC   r;   r   s    r   r   z_LocalFileSource.file_linksf   s3   è è € Ý˜œœÑ(Ô(ð 	ØˆFØŒjÐÐÐÐÐr   ©r   r   r   r=   r>   r   r5   r   r   r   r    r   r!   r   r"   r   r   r@   r@   K   s¯   € € € € € ðð ðà0ðð ðð 
ð	ð ð ð ð ð�h˜t”nð ð ð ñ „Xðð: ð :ð :ð :ð :ð
˜Jð ð ð ð ð ð r   r@   c                   ój   — e Zd ZdZdedededdfd„Zede	e         fd„¦   «         Z
defd	„Zdefd
„ZdS )Ú_RemoteFileSourcez¸``--find-links=<url>`` or ``--[extra-]index-url=<url>``.

    This returns:

    * ``page_candidates``: Links listed on an HTML file.
    * ``file_candidates``: The non-HTML file.
    r+   Úpage_validatorr   r   Nc                 ó0   — || _         || _        || _        d S r.   )r/   Ú_page_validatorrC   )r   r+   rN   r   s       r   r5   z_RemoteFileSource.__init__u   s   € ð &:ˆÔ"Ø-ˆÔØˆŒ
ˆ
ˆ
r   c                 ó   — | j         S r.   rG   r   s    r   r   z_RemoteFileSource.link   rH   r   c              #   ó‚   K  — |                       | j        ¦  «        sd S |                      | j        ¦  «        E d {V —† d S r.   )rP   rC   r/   r   s    r   r   z!_RemoteFileSource.page_candidatesƒ   sQ   è è € Ø×#Ò# D¤JÑ/Ô/ð 	ØˆFØ×-Ò-¨d¬jÑ9Ô9Ð9Ð9Ð9Ð9Ð9Ð9Ð9Ð9Ð9r   c              #   ó   K  — | j         V — d S r.   rG   r   s    r   r   z_RemoteFileSource.file_linksˆ   s   è è € ØŒjÐÐÐÐÐr   )r   r   r   r=   r>   ÚPageValidatorr   r5   r   r   r   r    r   r!   r   r"   r   r   rM   rM   l   s¹   € € € € € ðð ðà0ðð &ðð ð	ð
 
ðð ð ð ð ð�h˜t”nð ð ð ñ „Xðð: ð :ð :ð :ð :ð
˜Jð ð ð ð ð ð r   rM   c                   óf   — e Zd ZdZdededdfd„Zedee         fd„¦   «         Z	de
fd„Zdefd	„ZdS )
Ú_IndexDirectorySourcez·``--[extra-]index-url=<path-to-directory>``.

    This is treated like a remote URL; ``candidates_from_page`` contains logic
    for this by appending ``index.html`` to the link.
    r+   r   r   Nc                 ó"   — || _         || _        d S r.   rB   rD   s      r   r5   z_IndexDirectorySource.__init__“   rE   r   c                 ó   — | j         S r.   rG   r   s    r   r   z_IndexDirectorySource.link›   rH   r   c              #   óJ   K  — |                       | j        ¦  «        E d {V —† d S r.   rB   r   s    r   r   z%_IndexDirectorySource.page_candidatesŸ   s4   è è € Ø×-Ò-¨d¬jÑ9Ô9Ð9Ð9Ð9Ð9Ð9Ð9Ð9Ð9Ð9r   c                 ó   — dS )Nr"   r"   r   s    r   r   z _IndexDirectorySource.file_links¢   s   € Øˆrr   rK   r"   r   r   rV   rV   Œ   s¯   € € € € € ðð ðà0ðð ðð 
ð	ð ð ð ð ð�h˜t”nð ð ð ñ „Xðð: ð :ð :ð :ð :ð˜Jð ð ð ð ð ð r   rV   Úlocationr+   rN   Ú
expand_dirÚcache_link_parsingc                óÞ  — d }d }t           j                             | ¦  «        rt          | ¦  «        }| }n8|                      d¦  «        r| }t          | ¦  «        }nt          | ¦  «        r| }|€d}t                               || ¦  «         dS |€%t          ||t          ||¬¦  «        ¬¦  «        }||fS t           j                             |¦  «        r8|rt          ||¬¦  «        }n t          |t          ||¬¦  «        ¬¦  «        }||fS t           j                             |¦  «        r$t          |t          ||¬¦  «        ¬¦  «        }||fS t                               d| ¦  «         |d fS )	Nzfile:zVLocation '%s' is ignored: it is either a non-existing path or lacks a specific scheme.)NN)r]   )r+   rN   r   )r+   r,   )r+   r   z?Location '%s' is ignored: it is neither a file nor a directory.)r2   r,   Úexistsr	   Ú
startswithr
   r   ÚloggerÚwarningrM   r   Úisdirr*   rV   Úisfiler@   )	r[   r+   rN   r\   r]   r,   r;   ÚmsgÚsources	            r   Úbuild_sourcerg   ¦   sÀ  € ð €DØ€CÝ	„w‡~‚~�hÑÔð Ý˜(Ñ#Ô#ˆØˆˆØ	×	Ò	˜WÑ	%Ô	%ð ØˆÝ˜8Ñ$Ô$ˆˆÝ	�Ñ	Ô	ð Øˆà
€{ðKð 	õ 	�Š�s˜HÑ%Ô%Ð%Øˆ|à€|Ý.Ø!5Ø)Ý�cÐ.@ÐAÑAÔAð
ñ 
ô 
ˆð
 �Vˆ}Ðå	„w‡}‚}�TÑÔð Øð 		Ý)Ø%9Øðñ ô ˆFˆFõ
 +Ø%9Ý˜#Ð2DÐEÑEÔEðñ ô ˆFð �Vˆ}ÐÝ	Œ�Š˜Ñ	Ô	ð Ý!Ø!5Ý�cÐ.@ÐAÑAÔAð
ñ 
ô 
ˆð �Vˆ}ÐÝ
‡N‚NØIØñô ð ð �ˆ;Ðr   )"Úloggingr&   r2   r0   Útypingr   r   r   r   Úpip._internal.models.candidater   Úpip._internal.models.linkr   Úpip._internal.utils.urlsr	   r
   Úpip._internal.vcsr   Ú	getLoggerr   ra   r    r!   r>   ÚboolrT   r   r9   r(   r*   r@   rM   rV   rg   r"   r   r   ú<module>rp      sR  ðØ €€€Ø Ð Ð Ð Ø 	€	€	€	Ø €€€Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6Ð 6à @Ð @Ð @Ð @Ð @Ð @Ø *Ð *Ð *Ð *Ð *Ð *Ø =Ð =Ð =Ð =Ð =Ð =Ð =Ð =Ø $Ð $Ð $Ð $Ð $Ð $à	ˆÔ	˜8Ñ	$Ô	$€àÐ0Ô1€Ø�dŒ^€
Ø˜t˜f hÐ/DÔ&EÐEÔFÐ Ø˜$˜ ˜Ô&€ð$ð $ð $ð $ð $ñ $ô $ð $ðJ˜Cð J Dð Jð Jð Jð Jð!ð !ð !ð !ð !˜:ñ !ô !ð !ðHð ð ð ð �zñ ô ð ðBð ð ð ð ˜
ñ ô ð ð@ð ð ð ð ˜Jñ ô ð ð4:Øð:ð -ð:ð "ð	:ð
 ð:ð ð:ð ˆ8�CŒ=˜( :Ô.Ð.Ô/ð:ð :ð :ð :ð :ð :r   