Ë
    äØjjc  ã                   óŠ   — d dl Z ddlmZ  G d„ de«      Z G d„ dej
                  «      Z G d„ d	e«      Z G d
„ de«      Zd„ Z	y)é    Né   )Úcollections_abcc                   óX   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zd„ Zd„ Zy)ÚDirectedGraphz&A graph structure with directed edges.c                 ó>   — t        «       | _        i | _        i | _        y ©N)ÚsetÚ	_verticesÚ	_forwardsÚ
_backwards©Úselfs    ú`/opt/eval-harness/bench_task/venv/lib/python3.12/site-packages/pip/_vendor/resolvelib/structs.pyÚ__init__zDirectedGraph.__init__	   s   € Ü›ˆŒØˆŒØˆ�ó    c                 ó,   — t        | j                  «      S r   )Úiterr
   r   s    r   Ú__iter__zDirectedGraph.__iter__   ó   € Ü�D—N‘NÓ#Ð#r   c                 ó,   — t        | j                  «      S r   )Úlenr
   r   s    r   Ú__len__zDirectedGraph.__len__   s   € Ü�4—>‘>Ó"Ð"r   c                 ó   — || j                   v S r   )r
   ©r   Úkeys     r   Ú__contains__zDirectedGraph.__contains__   s   € Ø�d—n‘nÐ$Ð$r   c                 óV  — t        «       }t        | j                  «      |_        | j                  j	                  «       D ��ci c]  \  }}|t        |«      “Œ c}}|_        | j
                  j	                  «       D ��ci c]  \  }}|t        |«      “Œ c}}|_        |S c c}}w c c}}w )z$Return a shallow copy of this graph.)r   r	   r
   r   Úitemsr   )r   ÚotherÚkÚvs       r   ÚcopyzDirectedGraph.copy   s~   € ä“ˆÜ˜dŸn™nÓ-ˆŒØ15·±×1EÑ1EÓ1G×H©¨¨A˜1œc !›f™9ÓHˆŒØ26·/±/×2GÑ2GÓ2I×J©$¨!¨Q˜Aœs 1›v™IÓJˆÔØˆùó IùÛJs   ÁBÁ>B%c                 óÈ   — || j                   v rt        d«      ‚| j                   j                  |«       t        «       | j                  |<   t        «       | j
                  |<   y)zAdd a new vertex to the graph.zvertex existsN)r
   Ú
ValueErrorÚaddr	   r   r   r   s     r   r%   zDirectedGraph.add   sK   € à�$—.‘.Ñ Ü˜_Ó-Ð-Ø�‰×Ñ˜3ÔÜ!›eˆ�‰�sÑÜ"›uˆ�‰˜Òr   c                 ó2  — | j                   j                  |«       | j                  j                  |«      D ]   }| j                  |   j                  |«       Œ" | j                  j                  |«      D ]   }| j                  |   j                  |«       Œ" y)zCRemove a vertex from the graph, disconnecting all edges from/to it.N)r
   Úremover   Úpopr   )r   r   ÚfÚts       r   r'   zDirectedGraph.remove'   s~   € à�‰×Ñ˜cÔ"Ø—‘×#Ñ# CÓ(ò 	+ˆAØ�O‰O˜AÑ×%Ñ% cÕ*ð	+à—‘×$Ñ$ SÓ)ò 	*ˆAØ�N‰N˜1Ñ×$Ñ$ SÕ)ñ	*r   c                 óJ   — || j                   |   v xr || j                  |   v S r   )r   r   ©r   r)   r*   s      r   Ú	connectedzDirectedGraph.connected/   s)   € Ø�D—O‘O AÑ&Ð&ÒA¨1°·±¸qÑ0AÐ+AÐAr   c                 ó®   — || j                   vrt        |«      ‚| j                  |   j                  |«       | j                  |   j                  |«       y)zgConnect two existing vertices.

        Nothing happens if the vertices are already connected.
        N)r
   ÚKeyErrorr   r%   r   r,   s      r   ÚconnectzDirectedGraph.connect2   sH   € ð
 �D—N‘NÑ"Ü˜1“+ÐØ�‰�qÑ×Ñ˜aÔ Ø�‰˜Ñ×Ñ˜qÕ!r   c              #   ój   K  — | j                   j                  «       D ]  \  }}|D ]  }||f–— Œ
 Œ y ­wr   )r   r   )r   r)   Úchildrenr*   s       r   Ú
iter_edgeszDirectedGraph.iter_edges<   s>   è ø€ ØŸ>™>×/Ñ/Ó1ò 	‰KˆAˆxØò �Ø˜�d“
ññ	ùs   ‚13c                 ó2   — t        | j                  |   «      S r   )r   r   r   s     r   Úiter_childrenzDirectedGraph.iter_childrenA   s   € Ü�D—N‘N 3Ñ'Ó(Ð(r   c                 ó2   — t        | j                  |   «      S r   )r   r   r   s     r   Úiter_parentszDirectedGraph.iter_parentsD   s   € Ü�D—O‘O CÑ(Ó)Ð)r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r"   r%   r'   r-   r0   r3   r5   r7   © r   r   r   r      sB   „ Ù0òò
$ò#ò%òò%ò*òBò"òò
)ó*r   r   c                   ó<   — e Zd Zd	d„Zd„ Zd„ ZeZd„ Zd„ Zd„ Z	d„ Z
y)
ÚIteratorMappingNc                 ó6   — || _         || _        |xs i | _        y r   )Ú_mappingÚ	_accessorÚ_appends)r   ÚmappingÚaccessorÚappendss       r   r   zIteratorMapping.__init__I   s   € ØˆŒØ!ˆŒØš 2ˆ�r   c                 ód   — dj                  | j                  | j                  | j                  «      S )Nz!IteratorMapping({!r}, {!r}, {!r}))Úformatr@   rA   rB   r   s    r   Ú__repr__zIteratorMapping.__repr__N   s*   € Ø2×9Ñ9Ø�M‰MØ�N‰NØ�M‰Mó
ð 	
r   c                 óH   — t        | j                  xs | j                  «      S r   )Úboolr@   rB   r   s    r   Ú__bool__zIteratorMapping.__bool__U   s   € Ü�D—M‘MÒ2 T§]¡]Ó3Ð3r   c                 ó>   — || j                   v xs || j                  v S r   )r@   rB   r   s     r   r   zIteratorMapping.__contains__Z   s   € Ø�d—m‘mÐ#Ò; s¨d¯m©mÐ';Ð;r   c                 óî   — 	 | j                   |   }t	        j
                  | j                  |«      | j                  j                  |d«      «      S # t        $ r t        | j                  |   «      cY S w xY w)Nr<   )r@   r/   r   rB   Ú	itertoolsÚchainrA   Úget)r   r    r!   s      r   Ú__getitem__zIteratorMapping.__getitem__]   sg   € ð	*Ø—‘˜aÑ ˆAô �‰˜tŸ~™~¨aÓ0°$·-±-×2CÑ2CÀAÀrÓ2JÓKÐKøô ò 	*Ü˜Ÿ™ aÑ(Ó)Ò)ð	*ús   ‚A Á!A4Á3A4c                 ón   ‡ — ˆ fd„‰ j                   D «       }t        j                  ‰ j                  |«      S )Nc              3   ó@   •K  — | ]  }|‰j                   vsŒ|–— Œ y ­wr   ©r@   ©Ú.0r    r   s     €r   ú	<genexpr>z+IteratorMapping.__iter__.<locals>.<genexpr>e   s   øè ø€ ÒC�a¨A°T·]±]Ò,B”ÑCùó   ƒ—)rB   rN   rO   r@   ©r   Úmores   ` r   r   zIteratorMapping.__iter__d   s&   ø€ ÛC˜4Ÿ=™=ÔCˆÜ�‰˜tŸ}™}¨dÓ3Ð3r   c                 óp   ‡ — t        ˆ fd„‰ j                  D «       «      }t        ‰ j                  «      |z   S )Nc              3   ó@   •K  — | ]  }|‰j                   vsŒd –— Œ y­w)r   NrT   rU   s     €r   rW   z*IteratorMapping.__len__.<locals>.<genexpr>i   s   øè ø€ ÒF˜¨q¸¿¹Ò/E”1ÑFùrX   )ÚsumrB   r   r@   rY   s   ` r   r   zIteratorMapping.__len__h   s+   ø€ ÜÓF˜dŸm™mÔFÓFˆÜ�4—=‘=Ó! DÑ(Ð(r   r   )r8   r9   r:   r   rH   rK   Ú__nonzero__r   rQ   r   r   r<   r   r   r>   r>   H   s-   „ ó&ò

ò4ð €Kò<òLò4ó)r   r>   c                   ó,   — e Zd ZdZd„ Zd„ Zd„ ZeZd„ Zy)Ú_FactoryIterableViewa:  Wrap an iterator factory returned by `find_matches()`.

    Calling `iter()` on this class would invoke the underlying iterator
    factory, making it a "collection with ordering" that can be iterated
    through multiple times, but lacks random access methods presented in
    built-in Python sequence types.
    c                 ó    — || _         d | _        y r   )Ú_factoryÚ	_iterable)r   Úfactorys     r   r   z_FactoryIterableView.__init__v   s   € ØˆŒØˆ�r   c                 ó^   — dj                  t        | «      j                  t        | «      «      S ©Nz{}({}))rG   Útyper8   Úlistr   s    r   rH   z_FactoryIterableView.__repr__z   s!   € Ø�‰œt D›z×2Ñ2´D¸³JÓ?Ð?r   c                 óL   — 	 t        t        | «      «       y# t        $ r Y yw xY w)NFT)Únextr   ÚStopIterationr   s    r   rK   z_FactoryIterableView.__bool__}   s,   € ð	Ü”�d“Ôð øô ò 	Ùð	ús   ‚ —	#¢#c                 ó�   — | j                   €| j                  «       n| j                   }t        j                  |«      \  | _         }|S r   )rc   rb   rN   Útee)r   ÚiterableÚcurrents      r   r   z_FactoryIterableView.__iter__†   s;   € à#Ÿ~™~Ð5ˆD�M‰MŒO¸4¿>¹>ð 	ô #,§-¡-°Ó"9ÑˆŒ˜Øˆr   N©	r8   r9   r:   r;   r   rH   rK   r^   r   r<   r   r   r`   r`   m   s#   „ ñòò@òð €Kór   r`   c                   ó,   — e Zd ZdZd„ Zd„ Zd„ ZeZd„ Zy)Ú_SequenceIterableViewz²Wrap an iterable returned by find_matches().

    This is essentially just a proxy to the underlying sequence that provides
    the same interface as `_FactoryIterableView`.
    c                 ó   — || _         y r   )Ú	_sequence)r   Úsequences     r   r   z_SequenceIterableView.__init__•   s	   € Ø!ˆ�r   c                 ó`   — dj                  t        | «      j                  | j                  «      S rf   )rG   rg   r8   rt   r   s    r   rH   z_SequenceIterableView.__repr__˜   s!   € Ø�‰œt D›z×2Ñ2°D·N±NÓCÐCr   c                 ó,   — t        | j                  «      S r   )rJ   rt   r   s    r   rK   z_SequenceIterableView.__bool__›   r   r   c                 ó,   — t        | j                  «      S r   )r   rt   r   s    r   r   z_SequenceIterableView.__iter__    r   r   Nrp   r<   r   r   rr   rr   Ž   s#   „ ñò"òDò$ð €Kó$r   rr   c                 óŽ   — t        | «      rt        | «      S t        | t        j                  «      st        | «      } t        | «      S )zCBuild an iterable view from the value returned by `find_matches()`.)Úcallabler`   Ú
isinstancer   ÚSequencerh   rr   )Úmatchess    r   Úbuild_iter_viewr~   ¤   s9   € ä�ÔÜ# GÓ,Ð,Ü�gœ×7Ñ7Ô8Ü�w“-ˆÜ  Ó)Ð)r   )
rN   Úcompatr   Úobjectr   ÚMappingr>   r`   rr   r~   r<   r   r   ú<module>r‚      sI   ðÛ å #ô?*�Fô ?*ôD")�o×-Ñ-ô ")ôJ˜6ô ôB$˜Fô $ó,*r   