+
    <jP                    B   ^ RI Ht ^ RIt^ RIt^ RIt^ RIHtHtHtH	t	H
t
 ^RIHtHtHtHtHtHtHtHtHt ^RIHtHt ^RIHt ^RIHtHtHtHtHt ]'       d   ^RI H!t!H"t" ^R	I#H$t$ R
 R lt% ! R R]]]]3,          4      t& ! R R]]]]3,          4      t'R R lt(R# )    )annotationsN)TYPE_CHECKING
CollectionGenericIterableMapping)	CTKTRTDirectedGraphIterableViewIteratorMappingRequirementInformationStatebuild_iter_view)AbstractResolverResult)	Criterion)InconsistentCandidateRequirementsConflictedResolutionImpossibleResolutionTooDeepResolverException)AbstractProvider
Preference)BaseReporterc                    V ^8  d   QhRRRR/# )   stateState[RT, CT, KT]returnResult[RT, CT, KT] )formats   "`/opt/headortail/venv/lib/python3.14/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py__annotate__r&   "   s      * /A     c                   V P                   pVP                  4        UUu/ uF  w  r#\        V4      VbK  	  pppR V\        R 4      &   \        4       pVP	                  R 4       R 0pV P
                  P                  4        F  w  rx\        V P
                  WtV4      '       g   K$  Wu9  d   VP	                  V4       VP                  4        F>  p	 V\        V	4      ,          p
Y9  d   TP	                  T
4       TP                  Y4       K@  	  K  	  \        VP                  4        UUu/ uF  w  r#W&9   g   K  W#bK  	  uppVV P
                  R7      # u uppi   \         d     K  i ; iu uppi )N)mappinggraphcriteria)r)   itemsidr   addr+   _has_route_to_rootiter_parentKeyErrorconnectr   )r   r)   kvall_keysr*   	connectedkey	criterionppkeys   &          r%   _build_resultr;   "   s4   mmG;B==?%K?41beQh?H%KHRX&3oE	IIdO!%I....0!%..#KKIIcN&&(A1  		$MM$$ ) 1 ")--/D/$!Q^/D + &L   Es#   EE)
E+
8E+
E('E(c                      ] tR t^@tRtR R lt]R R l4       tR R ltR R	 lt	R
 R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltRtR# )
ResolutionzStateful resolution object.

This is designed as a one-off object that holds information to kick start
the resolution process, and holds the results afterwards.
c               $    V ^8  d   QhRRRRRR/# )r   providerzAbstractProvider[RT, CT, KT]reporterzBaseReporter[RT, CT, KT]r!   Noner#   )r$   s   "r%   r&   Resolution.__annotate__G   s(     3 3.3 +3 
	3r'   c                	,    Wn         W n        . V n        R # N_p_r_states)selfr?   r@   s   &&&r%   __init__Resolution.__init__G   s    
 02r'   c                   V ^8  d   QhRR/# )r   r!   r    r#   )r$   s   "r%   r&   rB   Q   s     1 1( 1r'   c                	h     V P                   R,          #   \         d   p\        R4      ThRp?ii ; i)   r   N)rH   
IndexErrorAttributeError)rI   es   & r%   r   Resolution.stateP   s3    	1<<## 	1 )q0	1s    1,1c                   V ^8  d   QhRR/# )r   r!   rA   r#   )r$   s   "r%   r&   rB   W   s     # # #r'   c                    V P                   R,          p\        VP                  P                  4       VP                  P                  4       VP
                  R,          R7      pV P                   P                  V4       R# )zqPush a new state into history.

This new state will be used to hold resolution results of the next
coming round.
NNNr)   r+   backtrack_causesNrO   )rH   r   r)   copyr+   rX   append)rI   baser   s   &  r%   _push_new_stateResolution._push_new_stateW   s^     ||BLL%%']]'')!2215

 	E"r'   c               (    V ^8  d   QhRRRRRRRR/# )	r   r+   dict[KT, Criterion[RT, CT]]requirementr   parentz	CT | Noner!   rA   r#   )r$   s   "r%   r&   rB   e   s2     *) *)-*) *) 	*)
 
*)r'   c           
     	   V P                   P                  W#R 7       V P                  P                  VR7      pVP	                  V4      pV'       d   \        VP                  4      pM. pV P                  P                  V\        V\        P                  ! R4      WB./4      \        V\        P                  ! R4      WF/4      R7      pV'       d1   \        VP                  4      pVP                  \        W#4      4       M\        W#4      .p\        \!        V4      VVR7      pVP"                  '       g   \%        V4      hWQV&   R# ))r`   ra   )requirement_or_candidateiter_requirementincompatibilities
identifierrequirementsre   
candidatesinformationre   N)rG   adding_requirementrF   identifygetlistre   find_matchesr   operatormethodcaller
attrgetterrk   rZ   r   r   r   rj   r   )	rI   r+   r`   ra   rg   r8   re   matchesrk   s	   &&&&     r%   _add_to_criteriaResolution._add_to_criteriae   s'    	""{"JWW%%{%K
LL,	 $Y%@%@ A "''&&!(%%&89]+
 .##$78/ ' 
 y445K5kJK1+FGK&w/#/
	
 ###(33(r'   c               $    V ^8  d   QhRRRRRR/# )r   r+   r_   parentszCollection[KT]r!   rA   r#   )r$   s   "r%   r&   rB      s$      3>L	r'   c           
     D   V'       g   R# VP                  4        F|  w  r4\        VP                  VP                   Uu. uF?  pVP                  e-   V P
                  P                  VP                  4      V9  g   K=  VNKA  	  upVP                  4      W&   K~  	  R# u upi )a/  Remove information from parents of criteria.

Concretely, removes all values from each criterion's ``information``
field that have one of ``parents`` as provider of the requirement.

:param criteria: The criteria to update.
:param parents: Identifiers for which to remove information from all criteria.
N)r,   r   rj   rk   ra   rF   rm   re   )rI   r+   rx   r7   r8   rk   s   &&&   r%   !_remove_information_from_criteria,Resolution._remove_information_from_criteria   s     &nn.NC%$$ (1'<'<'<#**277++K,>,>?wN	  K'< ++HM /s   :B=Bc                    V ^8  d   QhRRRR/# )r   namer
   r!   r   r#   )r$   s   "r%   r&   rB      s     
 
B 
: 
r'   c                	Z   V P                   P                  VV P                  P                  \	        V P                  P
                  \        P                  ! R 4      4      \	        V P                  P
                  \        P                  ! R4      4      V P                  P                  R7      # )rj   rk   )rg   resolutionsrj   rk   rX   )	rF   get_preferencer   r)   r   r+   rq   rs   rX   )rI   r}   s   &&r%   _get_preferenceResolution._get_preference   s    ww%%

**&

####L1 (

####M2 "ZZ88 & 
 	
r'   c               $    V ^8  d   QhRRRRRR/# )r   r}   r
   r8   zCriterion[RT, CT]r!   boolr#   )r$   s   "r%   r&   rB      s$     

 



#4

	

r'   c                	  a a  S P                   P                  V,          o\        ;QJ d.    TT 3R lTP	                  4        4       F  '       d   K   R # 	  R# ! TT 3R lTP	                  4        4       4      #   \         d     R # i ; i)Fc              3  ^   <"   T F"  pSP                   P                  VSR 7      x  K$  	  R# 5i)r`   	candidateNrF   is_satisfied_by).0rcurrent_pinrI   s   & r%   	<genexpr>8Resolution._is_current_pin_satisfying.<locals>.<genexpr>   s/      
1 GG##[#II1   *-T)r   r)   r1   allrd   )rI   r}   r8   r   s   f&&@r%   _is_current_pin_satisfying%Resolution._is_current_pin_satisfying   s    	**,,T2K s 
//1
ss 	
s 	
s 
//1
 
 	
  		s   A9 9BBc                    V ^8  d   QhRRRR/# )r   r   r	   r!   r_   r#   )r$   s   "r%   r&   rB      s      r 6Q r'   c                	    V P                   P                  P                  4       pV P                  P	                  VR 7       F  pV P                  W#VR7       K  	  V# )r   ra   )r   r+   rY   rF   get_dependenciesru   )rI   r   r+   r`   s   &&  r%   _get_updated_criteria Resolution._get_updated_criteria   sO    ::&&++-7733i3HK!!(	!J Ir'   c                    V ^8  d   QhRRRR/# )r   r}   r
   r!   list[Criterion[RT, CT]]r#   )r$   s   "r%   r&   rB      s     # #b #5L #r'   c                	&  a a S P                   P                  V,          p. pVP                   EF  o S P                  S4      p\        ;QJ d.    TT 3R lTP                  4        4       F  '       d   K   RM#	  RM! TT 3R lTP                  4        4       4      pT'       g   \        ST4      hS P
                  P                  SR7       S P                   P                  P                  T4       S P                   P                  P                  TR 4       SS P                   P                  T&   . u # 	  V#   \         dN   pS P
                  P                  TP                  S4       TP                  TP                  4        R p?EK]  R p?ii ; i)Nc              3  ^   <"   T F"  pSP                   P                  VSR 7      x  K$  	  R# 5ir   r   )r   r   r   rI   s   & r%   r   7Resolution._attempt_to_pin_criterion.<locals>.<genexpr>   s/      5A ''A'KK5r   FTr   )r   r+   rj   r   r   rG   rejecting_candidater8   rZ   r   rd   r   pinningupdater)   pop)rI   r}   r8   causesr+   rR   	satisfiedr   s   f&     @r%   _attempt_to_pin_criterion$Resolution._attempt_to_pin_criterion   s6   JJ''-	*,"--I55i@  "335 "335 I +IyAAGGOOiO0JJ&&x0 JJ""4.'0DJJt$I7 .> 9 * ++AKKCakk*s   D88FAFFc                    V ^8  d   QhRRRR/# )r   incompatibilities_from_brokenzlist[tuple[KT, list[CT]]]r!   r   r#   )r$   s   "r%   r&   rB      s     ! !-F!	!r'   c                	p   V EF  w  r#V'       g   K   V P                   P                  V,          pT P                  P	                  T\        T P                   P                  \        P                  ! R 4      4      \        T P                   P                  \        P                  ! R4      Y#/4      R7      p\        T4      pT'       g    R# TP                  TP                  4       \        T\        TP                  4      TR7      T P                   P                  T&   EK  	  R#   \         d     EK1  i ; i)rd   re   rf   Fri   T)r   r+   r1   rF   rp   r   rq   rr   rs   r   extendre   r   ro   rk   )rI   r   r3   re   r8   rt   rj   s   &&     r%   _patch_criteriaResolution._patch_criteria   s   
 %B A$ JJ//2	 gg**,JJ''))*<= #2JJ''''(;<*# + G ,;7+CJ$$Y%@%@A%.% !6!67"3&DJJ"/ %B8 /  s   D%%D54D5c                    V ^8  d   QhRRRR/# )r   r   $list[RequirementInformation[RT, CT]]r!   r   r#   )r$   s   "r%   r&   rB     s     W W D W Wr'   c                   \         P                  ! R V 4       R V 4       4      pV Uu0 uF  q0P                  P                  V4      kK  	  pp\	        V P
                  4      ^8  EdK   V P
                  R V P                  p  V P
                  P                  4       pVP                  P                  4       w  rgYd9  d   MoT P                  P                  T4       Uu0 uF  qP                  P                  T4      kK  	  p	pT	P                  T4      '       g   MTP                  '       d   K   TP                  P!                  4        U
Uu. uF  w  rT
\#        TP$                  4      3NK  	  pp
pTP'                  Yg.34       T P)                  4        T P+                  T4      pT'       g   EKc  R# R# u upi   \        \        3 d    \        T4      Rhi ; iu upi u upp
i )ar  Perform backjumping.

When we enter here, the stack is like this::

    [ state Z ]
    [ state Y ]
    [ state X ]
    .... earlier states are irrelevant.

1. No pins worked for Z, so it does not have a pin.
2. We want to reset state Y to unpinned, and pin another candidate.
3. State X holds what state Y was before the pin, but does not
   have the incompatibility information gathered in state Y.

Each iteration of the loop will:

1.  Identify Z. The incompatibility is not always caused by the latest
    state. For example, given three requirements A, B and C, with
    dependencies A1, B1 and C1, where A1 and B1 are incompatible: the
    last state might be related to C, so we want to discard the
    previous state.
2.  Discard Z.
3.  Discard Y but remember its incompatibility information gathered
    previously, and the failure we're dealing with right now.
4.  Push a new state Y' based on X, and apply the incompatibility
    information from Y to Y'.
5a. If this causes Y' to conflict, we need to backtrack again. Make Y'
    the new Z and go back to step 2.
5b. If the incompatibilities apply cleanly, end backtracking.
c              3  X   "   T F   qP                   f   K  VP                   x  K"  	  R # 5irD   r   r   cs   & r%   r   'Resolution._backjump.<locals>.<genexpr>5  s     >v!XQXXvs   **c              3  8   "   T F  qP                   x  K  	  R # 5irD   )r`   r   s   & r%   r   r   6  s     +Fq]]Fs   TNFrO   )	itertoolschainrF   rm   lenrH   r   r   r)   popitemrP   r1   r   r   
isdisjointr+   r,   ro   re   rZ   r\   r   )rI   r   incompatible_reqsr   incompatible_depsbroken_stater}   r   dcurrent_dependenciesr3   r4   r   successs   &&            r%   	_backjumpResolution._backjump  s   > 09>v>+F+0
 ;LL:KQWW--a0:KL$,,1$R   ::LA#'<<#3#3#5L&2&:&:&B&B&DOD 0
 261I1I)1T(1TAGG$$Q'1T % ( ,667HII
 $+++ <H;P;P;V;V;X-;X41D,,-.;X * -
 *00$1DE  "**+HIG w i M #H- A.v6D@A(-s   #F66F; #G"G!;Gc                    V ^8  d   QhRRRR/# )r   criteronr   r!   r   r#   )r$   s   "r%   r&   rB   n  s      R R/R	-Rr'   c           
         \        V UUu/ uF!  q"P                   F  p\        V4      VbK  	  K#  	  uppP                  4       4      # u uppi )z5Extract causes from list of criterion and deduplicate)ro   rk   r-   values)rI   r   r   is   &&  r%   _extract_causesResolution._extract_causesn  s<     xGx!ARUAXUxGNNPQQGs   'A
c               $    V ^8  d   QhRRRRRR/# )r   rh   Iterable[RT]
max_roundsintr!   r    r#   )r$   s   "r%   r&   rB   t  s'     f, f,L f,c f,FW f,r'   c                	t   V P                   '       d   \        R 4      hV P                  P                  4        \	        \
        P                  ! 4       / . R7      .V n         V F,  p V P                  V P                  P                  VRR7       K.  	  V P                  4        \        V4       EF?  pV P                  P!                  VR7       V P                  P                  P#                  4        UUu. uF   w  rgV P%                  Wg4      '       d   K  VNK"  	  pppV'       g5   V P                  P'                  V P                  R7       V P                  u # \)        V P                  P                  P+                  4       4      \)        V4      ,
          p	\-        V4      ^8  d   \/        V P0                  P3                  VV P                  P4                  \7        V P                  P                  \8        P:                  ! R4      4      \7        V P                  P                  \8        P:                  ! R4      4      V P                  P<                  R7      4      p
MTp
V
'       g   \        R	4      h\-        V
4      ^8  d   \?        WP@                  R
7      pM	V
^ ,          pV PC                  V4      pV'       d   V PE                  V4      pV P                  PG                  VR7       V PI                  V4      pWP                  P<                  R&   V'       g    \        V P                  P<                  4      hMV P                  P                  P#                  4        UUu0 uF(  w  rgWi9   g   K  V P%                  Wg4      '       d   K&  VkK*  	  pppV PK                  V P                  P                  V4       V P                  4        V P                  PM                  WPP                  R7       EKB  	  \O        V4      h  \         d&   p\        TP                  P                  4      ThRp?ii ; iu uppi u uppi )zalready resolvedrW   Nr   )index)r   rj   rk   )identifiersr   rj   rk   rX   z-narrow_requirement_selection returned 0 names)r7   )r   rV   )r   r   )(rH   RuntimeErrorrG   startingr   collectionsOrderedDictru   r   r+   r   r   r8   rk   r\   rangestarting_roundr,   r   endingsetkeysr   ro   rF   narrow_requirement_selectionr)   r   rq   rs   rX   minr   r   r   resolving_conflictsr   rz   ending_roundr   )rI   rh   r   r   rR   round_indexr7   r8   unsatisfied_namessatisfied_namesnarrowed_unstatisfied_namesr}   failure_criterionr   r   newly_unsatisfied_namess   &&&             r%   resolveResolution.resolvet  s|   <<<122 #//1!#
 AK%%djj&9&91T%J  	 ,KGG"""5 '+jj&9&9&?&?&A!&ANC66sF &A  ! %TZZ0zz! "$**"5"5":":"<=DU@VVO$%).2GG88$5$(JJ$6$6#2 JJ//$//=$ %4 JJ//$//>% *.)D)D 9 /+  /@+ /"#RSS ./!36<P<PQ215 $ > >t D --.?@ ++6+:..017

++A. .tzz/J/JKK  +/***=*=*C*C*E+*E-  !;;CK C*E ( + 66JJ'')@ $$&GG  {** EW -Z  
++k * K*1;;+B+BCJK!x+s6   %(O;3P.P.
P4-P4P4;P+ P&&P+rE   N)__name__
__module____qualname____firstlineno____doc__rJ   propertyr   r\   ru   rz   r   r   r   r   r   r   r   r   __static_attributes__r#   r'   r%   r=   r=   @   sd    3 1 1#*)X6


#J!FWrRf, f,r'   r=   c                  .    ] tR tRtRt]tRR R lltRtR# )Resolveri  z3The thing that performs the actual resolution work.c               $    V ^8  d   QhRRRRRR/# )r   rh   r   r   r   r!   r"   r#   )r$   s   "r%   r&   Resolver.__annotate__  s(     "$ "$""$ "$ 
	"$r'   c                |    \        V P                  V P                  4      pVP                  WR7      p\	        V4      # )af  Take a collection of constraints, spit out the resolution result.

The return value is a representation to the final resolution result. It
is a tuple subclass with three public members:

* `mapping`: A dict of resolved candidates. Each key is an identifier
    of a requirement (as returned by the provider's `identify` method),
    and the value is the resolved candidate.
* `graph`: A `DirectedGraph` instance representing the dependency tree.
    The vertices are keys of `mapping`, and each edge represents *why*
    a particular package is included. A special vertex `None` is
    included to represent parents of user-supplied requirements.
* `criteria`: A dict of "criteria" that hold detailed information on
    how edges in the graph are derived. Each key is an identifier of a
    requirement, and the value is a `Criterion` instance.

The following exceptions may be raised if a resolution cannot be found:

* `ResolutionImpossible`: A resolution cannot be found for the given
    combination of requirements. The `causes` attribute of the
    exception is a list of (requirement, parent), giving the
    requirements that could not be satisfied.
* `ResolutionTooDeep`: The dependency tree is too deeply nested and
    the resolver gave up. This is usually caused by a circular
    dependency, but you can try to resolve this by increasing the
    `max_rounds` argument.
)r   )r=   r?   r@   r   r;   )rI   rh   r   
resolutionr   s   &&&  r%   r   Resolver.resolve  s7    @  t}}=
""<"GU##r'   r#   N)d   )	r   r   r   r   r   r   base_exceptionr   r   r#   r'   r%   r   r     s    =&N"$ "$r'   r   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   r+   zMapping[KT, Criterion[RT, CT]]r7   z	KT | Noner5   zdict[int, KT | None]r6   zset[KT | None]r!   r   r#   )r$   s   "r%   r&   r&     s:      ,	 # 	
 
r'   c                6   W9   d   R # W9  d   R# Vf   Q hW,          P                  4        FV  p V\        V4      ,          pYS9   d   TP                  T4        R # \	        YY#4      '       g   KD  TP                  T4        R # 	  R#   \         d     Kj  i ; i)TF)r0   r-   r1   r.   r/   )r+   r7   r5   r6   r9   r:   s   &&&&  r%   r/   r/     s     
??]&&(	BqE?D MM#hhBBMM# )   		s   B		BB))
__future__r   r   r   rq   typingr   r   r   r   r   structsr	   r
   r   r   r   r   r   r   r   abstractr   r   r8   r   
exceptionsr   r   r   r   r   	providersr   r   	reportersr   r;   r=   r   r/   r#   r'   r%   <module>r      s    "    H H
 
 
 /    8(<Z,R$ Z,z'$B
+ '$Tr'   