ó
    €õhŸ	  ã                   óœ   • S SK r S SKrS SKrS SKJrJr  S SKJrJr  S SK	J
r
Jr  SS/rS\S\\   4S	 jrS\S\\   4S
 jrS\S\\   4S jrg)é    N)ÚListÚOptional)Úsite_packagesÚ	user_site)Úrunning_under_virtualenvÚvirtualenv_no_globalÚegg_link_path_from_sys_pathÚegg_link_path_from_locationÚraw_nameÚreturnc                 óB   • [         R                  " SSU 5      S-   U  S3/$ )ah  
Convert a Name metadata value to a .egg-link name, by applying
the same substitution as pkg_resources's safe_name function.
Note: we cannot use canonicalize_name because it has a different logic.

We also look for the raw name (without normalization) as setuptools 69 changed
the way it names .egg-link files (https://github.com/pypa/setuptools/issues/4167).
z[^A-Za-z0-9.]+Ú-z	.egg-link)ÚreÚsub)r   s    Ú<lib/python3.13/site-packages/pip/_internal/utils/egg_link.pyÚ_egg_link_namesr      s.   € ô 	ŠÐ  hÓ/°+Ñ=Øˆ*IÐðð ó    c                 óì   • [        U 5      n[        R                   HU  nU HL  n[        R                  R	                  X#5      n[        R                  R                  U5      (       d  MH  Us  s  $    MW     g)zB
Look for a .egg-link file for project name, by walking sys.path.
N)r   ÚsysÚpathÚosÚjoinÚisfile)r   Úegg_link_namesÚ	path_itemÚegg_link_nameÚegg_links        r   r	   r	   !   sU   € ô % XÓ.€NÜ—X”Xˆ	Û+ˆMÜ—w‘w—|‘| IÓ=ˆHÜw‰w~‰~˜h×'Ó'Ø”ó ,ñ ð
 r   c                 óæ  • / n[        5       (       aE  UR                  [        5        [        5       (       d   [        (       a  UR                  [        5        O5[        (       a  UR                  [        5        UR                  [        5        [        U 5      nU HU  nU HL  n[        R                  R                  X45      n[        R                  R                  U5      (       d  MH  Us  s  $    MW     g)aã  
Return the path for the .egg-link file if it exists, otherwise, None.

There's 3 scenarios:
1) not in a virtualenv
   try to find in site.USER_SITE, then site_packages
2) in a no-global virtualenv
   try to find in site_packages
3) in a yes-global virtualenv
   try to find in site_packages, then site.USER_SITE
   (don't look in global location)

For #1 and #3, there could be odd cases, where there's an egg-link in 2
locations.

This method will just return the first one found.
N)
r   Úappendr   r   r   r   r   r   r   r   )r   Úsitesr   Úsiter   Úegglinks         r   r
   r
   .   s¢   € ð$ €EÜ×!Ñ!Ø‰”]Ô#Ü#×%Ñ%¯)ª)ØL‰LœÔ#øçŠ9ØL‰LœÔ#Ø‰”]Ô#ä$ XÓ.€NÛˆÛ+ˆMÜ—g‘g—l‘l 4Ó7ˆGÜw‰w~‰~˜g×&Ó&Ø”ó ,ñ ð
 r   )r   r   r   Útypingr   r   Úpip._internal.locationsr   r   Úpip._internal.utils.virtualenvr   r   Ú__all__Ústrr   r	   r
   © r   r   Ú<module>r)      sm   ðÛ 	Û 	Û 
ß !ç <÷ð "Ø!ð€ð˜cð  d¨3¡iô ð
¨#ð 
°(¸3±-ô 
ð"¨#ð "°(¸3±-õ "r   