+
    :1j                     N    R t ^ RIHt ^ RIHt ]! ]4      tR tR t	R t
RR ltR# )	z#Topological sorting implementation.)reduce)	getLoggerc           	   #  X  "   \        V 4      ^ 8X  d   R# V P                  4        F  w  rVP                  V4       K  	  \        \        P
                  V P                  4       4      \	        V P                  4       4      ,
          pT P                  V Uu/ uF  qD\	        4       bK  	  up4        \        V P                  4        UUu0 uF  w  rE\        V4      ^ 8X  g   K  VkK  	  upp4      pV'       g   MSV F  pVx  V P                  VR4       K  	  \        V P                  4       4       F  pV\	        V4      ,          pK  	  K  \        V 4      ^ 8w  dD   ^RIHp RpV! VP                  RP                  R V P                  4        4       4      4      4      hR# u upi u uppi 5i)a'  Dependencies are expressed as a dictionary whose keys are items
and whose values are a set of dependent items. Output is a list of
sets in topological order. The first set consists of items with no
dependences, each subsequent set consists of items that depend upon
items in the preceding sets.
N)CondaValueErrorz/Cyclic dependencies exist among these items: {}z -> c              3   8   "   T F  p\        V4      x  K  	  R # 5i)N)repr).0xs   & 5lib/python3.14/site-packages/conda/common/toposort.py	<genexpr>_toposort.<locals>.<genexpr>-   s     4RkT!WWks   )lenitemsdiscard_reducesetunionvalueskeysupdatesortedpop
exceptionsr   formatjoin)	datakvextra_items_in_depsitemdeporderedr   msgs	   &        r
   	_toposortr#      sB     4yA~ 

			!  "#))T[[];c$))+>NNKK)<=)<su)<=>


N94CA$$NODJHHT4   $++-(C3w<C ) 4yA~0?cjj4Rdiik4R)RSTT	  >Ns+   BF*F' F*F$
 F$
&F*6B4F*c                    \        V P                  4       R R7      pV^ ,          ^ ,          pV P                  V4       V P                  4        F  pVP	                  V4       K  	  V# )z|
Pop an item from the graph that has the fewest dependencies in the case of a tie
The winners will be sorted alphabetically
c                 8    \        V ^,          4      V ^ ,          3# )   )r   )r   s   &r
   <lambda>pop_key.<locals>.<lambda>5   s    3tAw<a2I    )key)r   r   r   r   r   )r   r   r*   r    s   &   r
   pop_keyr+   0   sR    
 4::<%IJE
(1+CHHSM{{}C  Jr)   c              #  N  "   \        V 4      ^ 8X  d   R# \        V 4      p  \        V4      pVx  K    \         dX   p\        P                  TP                  ^ ,          4       T '       g    Rp?R# \        T 4      x  \        T 4      p Rp?Kp  Rp?i\         d     R# i ; i5i)a(  Dependencies are expressed as a dictionary whose keys are items
and whose values are a set of dependent items. Output is a list of
sets in topological order. The first set consists of items with no
dependencies, each subsequent set consists of items that depend upon
items in the preceding sets.
N)	r   r#   next
ValueErrorlogdebugargsr+   StopIteration)r   tvalueerrs   &   r
   _safe_toposortr6   @   s~      4yA~$A
	GEK 
	IIchhqk"$-$A 		sH   B%3 B%B".B,B%2B
B%B"B"B%!B""B%c                    V P                  4        UUu/ uF  w  r#V\        V4      bK  	  p ppR V 9   d   V R ,          P                  R4       V'       d   \        \	        V 4      4      # \        \        V 4      4      # u uppi )pythonpip)r   r   r   listr6   r#   )r   safer   r   s   &&  r
   toposortr<   `   si    "&**,/,$!As1vI,D/4 	Xu%N4())IdO$$ 0s   A=N)T)__doc__	functoolsr   r   loggingr   __name__r/   r#   r+   r6   r<    r)   r
   <module>rB      s1    * ' "UJ @%r)   