ó
    T=Œjê'  ã                  ó  • S SK Jr  S SKrS SKJrJr  SSKJr  SSKJ	r	  / SQr
SS jr " S	 S
\5      r " S S\5      r " S S\5      r " S S5      r " S S5      r      SS jr\R&                  " S5      rSS jr      SS jrg)é    )ÚannotationsN)ÚMappingÚSequenceé   )Ú_ErrorCollector)ÚRequirement)ÚCyclicDependencyGroupÚDependencyGroupIncludeÚDependencyGroupResolverÚDuplicateGroupNamesÚInvalidDependencyGroupObjectÚresolve_dependency_groupsc                 ó   • [         $ ©N)Ú__all__© ó    Úk/Users/stevendouglas/BidBrain/.venv/lib/python3.13/site-packages/pip/_vendor/packaging/dependency_groups.pyÚ__dir__r      s   € Ü€Nr   c                  ó   • \ rS rSrSrSrg)r   é   zU
The same dependency groups were defined twice, with different non-normalized names.
r   N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   r   r   r   r      s   † ôr   r   c                  ó0   ^ • \ rS rSrSrSU 4S jjrSrU =r$ )r	   é"   z-
The dependency group includes form a cycle.
c                ó„   >• Xl         X l        X0l        X2:X  a  U S3nOU SU SU SU 3n[        TU ]  SU SU 35        g )Nz includes itselfz -> ú, z0Cyclic dependency group include while resolving z: )Úrequested_groupÚgroupÚinclude_groupÚsuperÚ__init__)Úselfr#   r$   r%   ÚreasonÚ	__class__s        €r   r'   ÚCyclicDependencyGroup.__init__'   sd   ø€ Ø.ÔØŒ
Ø*ÔàÓ!Ø�wÐ.Ð/‰Fà%� d¨5¨'°°E°7¸$¸}¸oÐNˆFÜ‰ÑØ>ØÐ˜r & ð+õ	
r   )r$   r%   r#   )r#   Ústrr$   r,   r%   r,   ÚreturnÚNone)r   r   r   r   r   r'   r   Ú__classcell__)r*   s   @r   r	   r	   "   s   ø† ñ÷
õ 
r   r	   c                  ó   • \ rS rSrSrSrg)r   é9   zY
A member of a dependency group was identified as a dict, but was not in a valid
format.
r   Nr   r   r   r   r   r   9   s   † ôr   r   c                  ó,   • \ rS rSrSrSS jrSS jrSrg)r
   éE   ©r%   c                ó   • Xl         g)zp
Initialize a DependencyGroupInclude.

:param include_group: The name of the group referred to by this include.
Nr4   )r(   r%   s     r   r'   ÚDependencyGroupInclude.__init__H   s
   € ð +Õr   c                óP   • U R                   R                   SU R                  < S3$ )NÚ(Ú))r*   r   r%   )r(   s    r   Ú__repr__ÚDependencyGroupInclude.__repr__P   s'   € Ø—.‘.×)Ñ)Ð*¨!¨D×,>Ñ,>Ñ+AÀÐCÐCr   N)r%   r,   r-   r.   )r-   r,   )r   r   r   r   Ú	__slots__r'   r:   r   r   r   r   r
   r
   E   s   † Ø"€Iô+÷Dr   r
   c                  ón   • \ rS rSrSr    S
S jrSS jrSS jr        SS jr      SS jr	Sr
g	)r   éT   a@  
A resolver for Dependency Group data.

This class handles caching, name normalization, cycle detection, and other
parsing requirements. There are only two public methods for exploring the data:
``lookup()`` and ``resolve()``.

:param dependency_groups: A mapping, as provided via pyproject
    ``[dependency-groups]``.
c                ó„   • [        5       n[        X5      U l        0 U l        0 U l        0 U l        UR                  S5        g )Nz$[dependency-groups] data was invalid)r   Ú_normalize_group_namesÚdependency_groupsÚ_parsed_groupsÚ_include_graph_ancestorsÚ_resolve_cacheÚfinalize)r(   rA   Úerrorss      r   r'   Ú DependencyGroupResolver.__init__`   sH   € ô !Ó"ˆä!7Ð8IÓ!RˆÔð
 ð 	Ôð EGˆÔ%àBDˆÔà�‰Ð>Õ?r   c                ó¬   • [        U5      n[        5       R                  SU< S35       nU R                  X5      sSSS5        $ ! , (       d  f       g= f)zš
Lookup a group name, returning the parsed dependency data for that group.
This will not resolve includes.

:param group: the name of the group to lookup
ú[dependency-groups] data for ú was malformedN)Ú_normalize_namer   Úon_exitÚ_parse_group©r(   r$   rF   s      r   ÚlookupÚDependencyGroupResolver.lookups   sL   € ô   Ó&ˆäÓ×&Ñ&Ø+¨E©9°NÐCô
àØ×$Ñ$ UÓ3÷
÷ 
÷ 
ús   ªAÁ
Ac                ó®   • [        U5      n[        5       R                  SU< S35       nU R                  XU5      sSSS5        $ ! , (       d  f       g= f)zg
Resolve a dependency group to a list of requirements.

:param group: the name of the group to resolve
rI   rJ   N)rK   r   rL   Ú_resolverN   s      r   ÚresolveÚDependencyGroupResolver.resolve�   sL   € ô   Ó&ˆäÓ×&Ñ&Ø+¨E©9°NÐCô
àØ—=‘= ¨vÓ6÷
÷ 
÷ 
ús   ªAÁ
Ac                óÒ  • XR                   ;   a  U R                   U   $ U R                  X5      n/ nU Hø  n[        U[        5      (       a  UR	                  U5        M+  [        U[
        5      (       a¬  [        UR                  5      nXpR                  R                  US5      ;   a'  UR                  [        X!UR                  5      5        M›  / U R                  R                  US5      QUP7U R                  U'   UR                  U R                  XrU5      5        Mì  [        SU 35      e   UR                  (       a  g[!        U5      U R                   U'   U R                   U   $ )a\  
This is a helper for cached resolution to strings. It preserves the name of the
group which the user initially requested in order to present a clearer error in
the event that a cycle is detected.

:param group: The normalized name of the group to resolve.
:param requested_group: The group which was used in the original, user-facing
    request.
r   z+Invalid dependency group item after parse: )rD   rM   Ú
isinstancer   Úappendr
   rK   r%   rC   ÚgetÚerrorr	   ÚextendrR   ÚNotImplementedErrorrF   Útuple)r(   r$   r#   rF   ÚparsedÚresolved_groupÚitemr%   s           r   rR   Ú DependencyGroupResolver._resolveŽ   sU  € ð ×'Ñ'Ó'Ø×&Ñ& uÑ-Ð-à×"Ñ" 5Ó1ˆàˆãˆDÜ˜$¤×,Ñ,Ø×%Ñ% dÖ+Ü˜DÔ"8×9Ñ9Ü /°×0BÑ0BÓ C�ð !×$AÑ$A×$EÑ$EÀeÈRÓ$PÓPØ—L‘LÜ-Ø+°D×4FÑ4FóöðDØ×6Ñ6×:Ñ:¸5À"ÓEðDàñD�D×1Ñ1°-Ñ@ð #×)Ñ)ØŸ™ mÀfÓMöô *ØAÀ$ÀÐHóð ñ5 ðB �=�=Øä%*¨>Ó%:ˆ×Ñ˜EÑ"Ø×"Ñ" 5Ñ)Ð)r   c                óp  • XR                   ;   a  U R                   U   $ XR                  ;  a  UR                  [        SU S35      5        gU R                  U   n[	        U[
        5      (       a   UR                  [        SU< S35      5        g[	        U[        5      (       d   UR                  [        SU< S35      5        g/ nU HÃ  n[	        U[
        5      (       a  UR                  [        U5      5        M4  [	        U[        5      (       a\  [        UR                  5       5      S:w  a   UR                  [        SU< 35      5        M†  US	   nUR                  [        US
95        M¥  UR                  [        SU< 35      5        MÅ     [        U5      U R                   U'   U R                   U   $ )NzDependency group 'z' not foundr   zDependency group z' contained a string rather than a list.z is not a sequence type.)úinclude-groupzInvalid dependency group item: rb   r4   )rB   rA   rY   ÚLookupErrorrV   r,   Ú	TypeErrorr   rW   r   r   r\   Úkeysr   r
   )r(   r$   rF   Ú	raw_groupÚelementsr_   r%   s          r   rM   Ú$DependencyGroupResolver._parse_groupÈ   s‹  € ð ×'Ñ'Ó'Ø×&Ñ& uÑ-Ð-à×.Ñ.Ó.Ø�L‰LœÐ'9¸%¸ÀÐ%LÓMÔNØà×*Ñ*¨5Ñ1ˆ	Ü�i¤×%Ñ%Ø�L‰LÜØ'¨¡yÐ0WÐXóôð
 ä˜)¤X×.Ñ.Ø�L‰LÜÐ-¨e©YÐ6NÐOÓPôð à?AˆÛˆDÜ˜$¤×$Ñ$ð —‘¤¨DÓ 1Ö2Ü˜D¤'×*Ñ*Ü˜Ÿ™›Ó%Ð);Ó;Ø—L‘LÜ4Ø=¸d¹XÐFóöð %)¨Ñ$9�MØ—O‘OÔ$:ÈÑ$WÖXà—‘œYÐ)HÈÉÐ'QÓRÖSñ# ô& &+¨8£_ˆ×Ñ˜EÑ"Ø×"Ñ" 5Ñ)Ð)r   )rC   rB   rD   rA   N)rA   ú/Mapping[str, Sequence[str | Mapping[str, str]]]r-   r.   )r$   r,   r-   ú0tuple[Requirement | DependencyGroupInclude, ...])r$   r,   r-   útuple[Requirement, ...])r$   r,   r#   r,   rF   r   r-   rk   )r$   r,   rF   r   r-   rj   )r   r   r   r   r   r'   rO   rS   rR   rM   r   r   r   r   r   r   T   sn   † ñ	ð@àJð@ð 
ô@ô&4ô7ð8*Øð8*Ø+.ð8*Ø8Gð8*à	 ô8*ðt/*Øð/*Ø"1ð/*à	9÷/*r   r   c               óD   ^• [        U 5      m[        U4S jU 5       5      $ )zç
Resolve a dependency group to a tuple of requirements, as strings.

:param dependency_groups: the parsed contents of the ``[dependency-groups]`` table
    from ``pyproject.toml``
:param groups: the name of the group(s) to resolve
c              3  ól   >#   • U  H)  nTR                  U5        H  n[        U5      v •  M     M+     g 7fr   )rS   r,   )Ú.0r$   ÚrÚresolvers      €r   Ú	<genexpr>Ú,resolve_dependency_groups.<locals>.<genexpr>
  s+   øé € ÐM¢V˜E°X×5EÑ5EÀe×5L°”�Q—�Ñ5L‘¢Vùs   ƒ14)r   r\   )rA   Úgroupsrp   s     @r   r   r   ÿ   s!   ø€ ô 'Ð'8Ó9€HÜÔM¡VÓMÓMÐMr   z[-_.]+c                óJ   • [         R                  SU 5      R                  5       $ )NÚ-)Ú_NORMALIZE_PATTERNÚsubÚlower)Únames    r   rK   rK     s   € Ü×!Ñ! # tÓ,×2Ñ2Ó4Ð4r   c                óT  • 0 n0 nU R                  5        H5  u  pE[        U5      nUR                  U/ 5      R                  U5        XSU'   M7     UR                  5        HF  u  px[	        U5      S:”  d  M  UR                  [        SU SSR                  U5       S35      5        MH     U$ )Nr   z"Duplicate dependency group names: z (r"   r9   )ÚitemsrK   Ú
setdefaultrW   ÚlenrY   r   Újoin)	rA   rF   Úoriginal_namesÚnormalized_groupsÚ
group_nameÚvalueÚnormed_group_nameÚnormed_nameÚnamess	            r   r@   r@     s³   € ð ,.€NØFHÐà.×4Ñ4Ö6Ñˆ
Ü+¨JÓ7ÐØ×!Ñ!Ð"3°RÓ8×?Ñ?À
ÔKØ/4Ð+Ó,ñ 7ð
 -×2Ñ2Ö4ÑˆÜˆu‹:˜�>Ø�L‰LÜ#Ø8Ø"�m 2 d§i¡i°Ó&6Ð%7°qð:óöñ 5ð Ðr   )r-   z	list[str])rA   ri   rs   r,   r-   ztuple[str, ...])ry   r,   r-   r,   )rA   ri   rF   r   r-   z,dict[str, Sequence[str | Mapping[str, str]]])Ú
__future__r   ÚreÚcollections.abcr   r   rF   r   Úrequirementsr   r   r   Ú
ValueErrorr   r	   r   r
   r   r   Úcompilerv   rK   r@   r   r   r   Ú<module>rŒ      s³   ðÝ "ã 	ß -å #Ý %ò€ôô˜*ô ô
˜Jô 
ô. :ô ÷Dñ D÷c*ñ c*ðVNØFðNØTWðNàôNð& —Z’Z 	Ó*Ð ô5ðØFðàðð 2õr   