§
    ¢[e‡  ã                  ób   — d dl mZ d dlmZmZ d dlmZ d dlmZ  G d„ dee         ¦  «        Z	dS )é    )Úannotations)ÚIterableÚIterator)Ú
MutableSet)ÚTc                  óx   — e Zd ZU dZded<   dZddd
„Zdd„Zdd„Zd d„Z	d!d„Z
d!d„Zd!d„Zd"d„Zd"d„ZeZd#d„ZdS )$ÚInsertionSortedSetzéA set-like that retains insertion order, like a dict. Thread-safe.

    Equality does not compare order or class, but only compares against the contents of
    any other set-like, coherently with dict and the AbstractSet design.
    zdict[T, None]Ú_d©r
   © ÚotherúIterable[T]ÚreturnÚNonec                óD   — t                                |¦  «        | _        d S ©N)ÚdictÚfromkeysr
   )Úselfr   s     ú*lib/python3.11/site-packages/zict/utils.pyÚ__init__zInsertionSortedSet.__init__   s   € Ý—-’- Ñ&Ô&ˆŒˆˆó    ÚitemÚobjectÚboolc                ó   — || j         v S r   r   )r   r   s     r   Ú__contains__zInsertionSortedSet.__contains__   s   € Øt”wˆÐr   úIterator[T]c                ó*   — t          | j        ¦  «        S r   )Úiterr
   ©r   s    r   Ú__iter__zInsertionSortedSet.__iter__   s   € ÝD”G‰}Œ}Ðr   Úintc                ó*   — t          | j        ¦  «        S r   )Úlenr
   r!   s    r   Ú__len__zInsertionSortedSet.__len__   s   € Ý4”7‰|Œ|Ðr   Úvaluer   c                ó   — d| j         |<   dS )zoAdd element to the set. If the element is already in the set, retain original
        insertion order.
        Nr   ©r   r'   s     r   ÚaddzInsertionSortedSet.add   s   € ð ˆŒ‰ˆˆr   c                ó:   — 	 | j         |= d S # t          $ r Y d S w xY wr   )r
   ÚKeyErrorr)   s     r   ÚdiscardzInsertionSortedSet.discard%   s6   € ð	Ø”˜øÝð 	ð 	ð 	ØˆDˆDð	øøøs   ‚ Œ
™c                ó   — | j         |= d S r   r   r)   s     r   ÚremovezInsertionSortedSet.remove,   s   € ØŒGEˆNˆNˆNr   c                óº   — 	 	 t          t          | j        ¦  «        ¦  «        }| j        |= |S # t          $ r t	          d¦  «        ‚t          t
          f$ r Y ŒXw xY w)z(Pop the oldest-inserted key from the setTzpop from an empty set)Únextr    r
   ÚStopIterationr,   ÚRuntimeErrorr)   s     r   ÚpopleftzInsertionSortedSet.popleft/   su   € ð		ðÝT $¤'™]œ]Ñ+Ô+Ø”G˜ENØøÝ ð 8ð 8ð 8ÝÐ6Ñ7Ô7Ð7ÝlÐ+ð ð ð àðøøøs   ƒ*. ®)AÁAc                ó@   — | j                              ¦   «         d         S )z(Pop the latest-inserted key from the setr   )r
   Úpopitemr!   s    r   ÚpoprightzInsertionSortedSet.popright<   s   € àŒwŠÑ Ô  Ô#Ð#r   c                ó8   — | j                              ¦   «          d S r   )r
   Úclearr!   s    r   r9   zInsertionSortedSet.clearB   s   € ØŒŠ‰Œˆˆˆr   N)r   )r   r   r   r   )r   r   r   r   )r   r   )r   r#   )r'   r   r   r   )r   r   )r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__Ú	__slots__r   r   r"   r&   r*   r-   r/   r4   r7   Úpopr9   r   r   r   r	   r	   	   s  € € € € € € ðð ð ÐÐÑØ€Ið'ð 'ð 'ð 'ð 'ðð ð ð ðð ð ð ðð ð ð ðð ð ð ðð ð ð ðð ð ð ðð ð ð ð$ð $ð $ð $ð €Cðð ð ð ð ð r   r	   N)
Ú
__future__r   Úcollections.abcr   r   Útypingr   Úzict.commonr   r	   r   r   r   ú<module>rE      s‹   ðØ "Ð "Ð "Ð "Ð "Ð "à .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð ð:ð :ð :ð :ð :˜ Aœñ :ô :ð :ð :ð :r   