+
    Îi!                       ^ RI Ht ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHtHtHtHtHt ^ RIHt ^ RIHt ^ R	IHtHt ^ R
IHt ]P4                  ! ]4      t]],          t]],          t]
].]],          3,          t]
].] 3,          t! ! R R4      t"R R lt# ! R R4      t$ ! R R]"4      t% ! R R]"4      t& ! R R]"4      t' ! R R]"4      t(R R lt)R# )    )annotationsN)defaultdict)Iterable)Callable)InvalidSdistFilenameInvalidWheelFilenamecanonicalize_nameparse_sdist_filenameparse_wheel_filename)InstallationCandidate)Link)path_to_urlurl_to_path)is_urlc                  D    ] tR t^t]R R l4       tR R ltR R ltRtR# )	
LinkSourcec                   V ^8  d   QhRR/#    returnzLink | None )formats   "j/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/pip/_internal/index/sources.py__annotate__LinkSource.__annotate__!   s     $ $k $    c                    \        4       h)z,Returns the underlying link, if there's one.NotImplementedErrorselfs   &r   linkLinkSource.link    s     "##r   c                   V ^8  d   QhRR/# r   r   FoundCandidatesr   )r   s   "r   r   r   %   s     $ $ $r   c                    \        4       h)z9Candidates found by parsing an archive listing HTML file.r   r    s   &r   page_candidatesLinkSource.page_candidates%       !##r   c                   V ^8  d   QhRR/# r   r   
FoundLinksr   )r   s   "r   r   r   )   s     $ $J $r   c                    \        4       h)z,Links found by specifying archives directly.r   r    s   &r   
file_linksLinkSource.file_links)   r*   r   r   N)	__name__
__module____qualname____firstlineno__propertyr"   r(   r/   __static_attributes__r   r   r   r   r      s#    $ $$$ $r   r   c                    V ^8  d   QhRRRR/# )r   file_urlstrr   boolr   )r   s   "r   r   r   .   s     J JC JD Jr   c                F    \         P                  ! V R R7      ^ ,          R8H  # )F)strictz	text/html)	mimetypes
guess_type)r8   s   &r   _is_html_filer?   .   s    7:kIIr   c                  ^    ] tR t^2tRtR R ltR R lt]R R l4       t]R R	 l4       t	R
t
R# )_FlatDirectoryToUrlsz"Scans directory and caches resultsc                    V ^8  d   QhRRRR/# )r   pathr9   r   Noner   )r   s   "r   r   !_FlatDirectoryToUrls.__annotate__5   s     ( (S (T (r   c                	V    Wn         . V n        \        \        4      V n        R V n        R# )FN)_path_page_candidatesr   list_project_name_to_urls_scanned_directory)r!   rC   s   &&r   __init___FlatDirectoryToUrls.__init__5   s$    
+-;Ft;L""'r   c                   V ^8  d   QhRR/# )r   r   rD   r   )r   s   "r   r   rE   ;   s     ' ' 'r   c                   \         P                  ! V P                  4       F  p\        VP                  4      p\        V4      '       d   V P                  P                  V4       KF   \        VP                  4      ^ ,          pT P                  T,          P                  T4       K  	  RV n        R#   \         d4     \        TP                  4      ^ ,          p LY  \         d      K  i ; ii ; i)zbScans directory once and populates both page_candidates
and project_name_to_urls at the same time
TN)osscandirrG   r   rC   r?   rH   appendr   namer   r
   r   rJ   rK   )r!   entryurlproject_filenames   &   r   _scan_directory$_FlatDirectoryToUrls._scan_directory;   s     ZZ

+Eejj)CS!!%%,,S1#7

#CA#F  &&'78??D! ," #' ( ';EJJ'G'J$+ s*   (B33C1?CC-(C1,C--C1c                   V ^8  d   QhRR/# )r   r   z	list[str]r   )r   s   "r   r   rE   S   s     % % %r   c                	^    V P                   '       g   V P                  4        V P                  # N)rK   rW   rH   r    s   &r   r(   $_FlatDirectoryToUrls.page_candidatesR   s&    &&&  "$$$r   c                   V ^8  d   QhRR/# )r   r   zdict[str, list[str]]r   )r   s   "r   r   rE   Z   s     * *&: *r   c                	^    V P                   '       g   V P                  4        V P                  # r[   )rK   rW   rJ   r    s   &r   project_name_to_urls)_FlatDirectoryToUrls.project_name_to_urlsY   s&    &&&  ")))r   )rH   rG   rJ   rK   N)r1   r2   r3   r4   __doc__rL   rW   r5   r(   r_   r6   r   r   r   rA   rA   2   s7    ,('. % % * *r   rA   c                  d    ] tR t^at$ Rt/ tR]R&   R R lt]R R l4       t	R R	 lt
R
 R ltRtR# )_FlatDirectorySourcezLink 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.
zdict[str, _FlatDirectoryToUrls]_paths_to_urlsc               (    V ^8  d   QhRRRRRRRR/# )r   candidates_from_pageCandidatesFromPagerC   r9   project_namer   rD   r   )r   s   "r   r   !_FlatDirectorySource.__annotate__l   s2     ; ;0; ; 	;
 
;r   c                	    Wn         \        V4      V n        W P                  9   d   V P                  V,          V n        R# \        VR 7      V n        V P                  V P                  V&   R# ))rC   N)_candidates_from_pager	   _project_namerd   _path_to_urlsrA   )r!   rf   rC   rh   s   &&&&r   rL   _FlatDirectorySource.__init__l   s[     &:".|< &&&!%!4!4T!:D!54!@D(,(:(:D%r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   ri   }   s      k r   c                	    R # r[   r   r    s   &r   r"   _FlatDirectorySource.link|   s    r   c                   V ^8  d   QhRR/# r%   r   )r   s   "r   r   ri      s     = = =r   c              #  	   "   V P                   P                   F%  pV P                  \        V4      4       R j  xL
  K'  	  R #  L
5ir[   )rm   r(   rk   r   r!   rU   s   & r   r(   $_FlatDirectorySource.page_candidates   s6     %%55C11$s)<<< 6<s   7AAAc                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   ri      s      J r   c              #  	   "   V P                   P                  V P                  ,           F  p\        V4      x  K  	  R # 5ir[   )rm   r_   rl   r   rt   s   & r   r/   _FlatDirectorySource.file_links   s3     %%::4;M;MNNCs)O Os   >A )rk   rm   rl   N)r1   r2   r3   r4   ra   rd   __annotations__rL   r5   r"   r(   r/   r6   r   r   r   rc   rc   a   s<     79N38;   = r   rc   c                  T    ] tR t^tRtR R lt]R R l4       tR R ltR R	 lt	R
t
R# )_LocalFileSourcea/  ``--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.
c               $    V ^8  d   QhRRRRRR/# r   rf   rg   r"   r   r   rD   r   )r   s   "r   r   _LocalFileSource.__annotate__   (      0  
	r   c                	    Wn         W n        R # r[   rk   _linkr!   rf   r"   s   &&&r   rL   _LocalFileSource.__init__       
 &:"
r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r~            k r   c                	    V P                   # r[   r   r    s   &r   r"   _LocalFileSource.link       zzr   c                   V ^8  d   QhRR/# r%   r   )r   s   "r   r   r~           : : :r   c              #  	   "   \        V P                  P                  4      '       g   R # V P                  V P                  4       R j  xL
  R #  L5ir[   )r?   r   rU   rk   r    s   &r   r(    _LocalFileSource.page_candidates   s3     TZZ^^,,--djj999s   AAA	Ac                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   r~      s      J r   c              #  	x   "   \        V P                  P                  4      '       d   R # V P                  x  R # 5ir[   )r?   r   rU   r    s   &r   r/   _LocalFileSource.file_links   s%     ((jjs   8:r   Nr1   r2   r3   r4   ra   rL   r5   r"   r(   r/   r6   r   r   r   r{   r{      s/      :
 r   r{   c                  T    ] tR t^tRtR R lt]R R l4       tR R ltR R	 lt	R
t
R# )_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.
c               (    V ^8  d   QhRRRRRRRR/# )	r   rf   rg   page_validatorPageValidatorr"   r   r   rD   r   )r   s   "r   r   _RemoteFileSource.__annotate__   s2      0 & 	
 
r   c                	*    Wn         W n        W0n        R # r[   )rk   _page_validatorr   )r!   rf   r   r"   s   &&&&r   rL   _RemoteFileSource.__init__   s     &:"-
r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      r   r   c                	    V P                   # r[   r   r    s   &r   r"   _RemoteFileSource.link   r   r   c                   V ^8  d   QhRR/# r%   r   )r   s   "r   r   r      r   r   c              #  	   "   V P                  V P                  4      '       g   R # V P                  V P                  4       R j  xL
  R #  L5ir[   )r   r   rk   r    s   &r   r(   !_RemoteFileSource.page_candidates   s5     ##DJJ//--djj999s   AAAAc                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   r      s      J r   c              #  	*   "   V P                   x  R # 5ir[   r   r    s   &r   r/   _RemoteFileSource.file_links   s     jjs   )rk   r   r   Nr   r   r   r   r   r      s/      :
 r   r   c                  T    ] tR t^tRtR R lt]R R l4       tR R ltR R	 lt	R
t
R# )_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.
c               $    V ^8  d   QhRRRRRR/# r}   r   )r   s   "r   r   "_IndexDirectorySource.__annotate__   r   r   c                	    Wn         W n        R # r[   r   r   s   &&&r   rL   _IndexDirectorySource.__init__   r   r   c                   V ^8  d   QhRR/# r   r   )r   s   "r   r   r      r   r   c                	    V P                   # r[   r   r    s   &r   r"   _IndexDirectorySource.link   r   r   c                   V ^8  d   QhRR/# r%   r   )r   s   "r   r   r      s     : : :r   c              #  	X   "   V P                  V P                  4       R j  xL
  R #  L5ir[   r   r    s   &r   r(   %_IndexDirectorySource.page_candidates   s     --djj999s   *(*c                   V ^8  d   QhRR/# r,   r   )r   s   "r   r   r      s      J r   c                	    R# )Nr   r   r    s   &r   r/    _IndexDirectorySource.file_links   s    	r   r   Nr   r   r   r   r   r      s/      : r   r   c               4    V ^8  d   QhRRRRRRRRR	RR
RRR/# )r   locationr9   rf   rg   r   r   
expand_dirr:   cache_link_parsingrh   r   z$tuple[str | None, LinkSource | None]r   )r   s   "r   r   r      sP     ; ;; -; "	;
 ; ; ; *;r   c          	        R pR p\         P                  P                  V 4      '       d   \        V 4      pT pM8V P	                  R4      '       d   T p\        V 4      pM\        V 4      '       d   T pVf   Rp\        P                  W4       R# Vf   \        VV\        WtR7      R7      p	Wy3# \         P                  P                  V4      '       d4   V'       d   \        VVVR7      p	Wy3# \        V\        WtR7      R7      p	Wy3# \         P                  P                  V4      '       d   \        V\        WtR7      R7      p	Wy3# \        P                  RV 4       VR 3# )	Nzfile:zVLocation '%s' is ignored: it is either a non-existing path or lacks a specific scheme.)r   )rf   r   r"   )rf   rC   rh   )rf   r"   z?Location '%s' is ignored: it is neither a file nor a directory.)NN)rP   rC   existsr   
startswithr   r   loggerwarningr   r   isdirrc   r   isfiler{   )
r   rf   r   r   r   rh   rC   rU   msgsources
   &$$$$$    r   build_sourcer      sO    DC	ww~~h(#			W	%	%8$			
{K 	 	s%|.!5)cA

 }	ww}}T)%9)F }	 +%9#EF }			!!5cA
 }
NNI ;r   )*
__future__r   loggingr=   rP   collectionsr   collections.abcr   typingr   pip._vendor.packaging.utilsr   r   r	   r
   r   pip._internal.models.candidater   pip._internal.models.linkr   pip._internal.utils.urlsr   r   pip._internal.vcsr   	getLoggerr1   r   r&   r-   rg   r:   r   r   r?   rA   rc   r{   r   r   r   r   r   r   <module>r      s    "   	 # $   A * = $			8	$01d^
tfh/D&EEF $&$ $J,* ,*^%: %Pz B
 @J 4;r   