JFIF$        dd7 

Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/pyrsistent/__pycache__/_plist.cpython-311.pyc

�

6ك\�^}���@�ddlmZmZddlmZddlmZGd�de��ZGd�de��Z	Gd�d	e	��Z
eje
��eje
��Gd
�de	��Zeje��eje��e��Z
dd�Zd�ZdS)�)�Sequence�Hashable)�Integral)�reducec�4�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	dS)	�
_PListBuilderzc
    Helper class to allow construction of a list without
    having to reverse it in the end.
    )�_head�_tailc�6�t|_t|_dS�N)�_EMPTY_PLISTr	r
��selfs �q/builddir/build/BUILD/imunify360-venv-2.6.0/opt/imunify360/venv/lib/python3.11/site-packages/pyrsistent/_plist.py�__init__z_PListBuilder.__init__
s��!��
�!��
�
�
�c��|js||��|_|j|_n&||��|j_|jj|_|jSr)r
r	�rest)r�elem�constructors   r�_appendz_PListBuilder._appendsN���z�	)�$��T�*�*�D�J���D�J�J�)�k�$�/�/�D�J�O����D�J��z�rc�0�|�|d���S)Nc�,�t|t��Sr)�PListr
)�es r�<lambda>z+_PListBuilder.append_elem.<locals>.<lambda>s��E�!�\�,B�,B�r�r�rrs  r�append_elemz_PListBuilder.append_elems���|�|�D�"B�"B�C�C�Crc�0�|�|d���S)Nc��|Sr�)�ls rrz,_PListBuilder.append_plist.<locals>.<lambda>s��!�rr)r�pls  r�append_plistz_PListBuilder.append_plists���|�|�B���,�,�,rc��|jSr)r	rs r�buildz_PListBuilder.build!s
���z�rN)
�__name__�
__module__�__qualname__�__doc__�	__slots__rrrr%r'r"rrrrss��������#�I�"�"�"����D�D�D�-�-�-�����rrc��eZdZdZejZejZd�Zd�Zd�Z	e	Z
d�Zd�Zd�Z
e
Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�ZdS)�
_PListBase)�__weakref__c�0�tt|��ffSr)�plist�listrs r�
__reduce__z_PListBase.__reduce__.s���t�D�z�z�m�#�#rc�4�td�|D����S)a
        Return the length of the list, computed by traversing it.

        This is obviously O(n) but with the current implementation
        where a list is also a node the overhead of storing the length
        in every node would be quite significant.
        c3�K�|]}dV��dS)�Nr")�.0�_s  r�	<genexpr>z%_PListBase.__len__.<locals>.<genexpr>:s"����#�#��1�#�#�#�#�#�#r)�sumrs r�__len__z_PListBase.__len__2s!���#�#�d�#�#�#�#�#�#rc�F�d�t|����S)Nz
plist({0}))�formatr2rs r�__repr__z_PListBase.__repr__<s���"�"�4��:�:�.�.�.rc�"�t||��S)z
        Return a new list with elem inserted as new head.

        >>> plist([1, 2]).cons(3)
        plist([3, 1, 2])
        )rrs  r�consz_PListBase.cons@s���T�4� � � rc�>�|}|D]}|�|��}�|S)a 
        Return a new list with all elements of iterable repeatedly cons:ed to the current list.
        NB! The elements will be inserted in the reverse order of the iterable.
        Runs in O(len(iterable)).

        >>> plist([1, 2]).mcons([3, 4])
        plist([4, 3, 1, 2])
        �r@)r�iterable�headrs    r�mconsz_PListBase.mconsIs.�����	#�	#�D��9�9�T�?�?�D�D��rc�p�t��}|}|r#|�|j��}|j}|�#|S)a
        Return a reversed version of list. Runs in O(n) where n is the length of the list.

        >>> plist([1, 2, 3]).reverse()
        plist([3, 2, 1])

        Also supports the standard reversed function.

        >>> reversed(plist([1, 2, 3]))
        plist([3, 2, 1])
        )r1r@�firstr)r�resultrDs   r�reversez_PListBase.reverseXsE���������	��[�[���,�,�F��9�D��	��
rc���t��}|}d}|r4||kr.|�|j��|j}|dz
}|r||k�.|s	|tfS|���|fS)z�
        Spilt the list at position specified by index. Returns a tuple containing the
        list up until index and the list after the index. Runs in O(index).

        >>> plist([1, 2, 3, 4]).split(2)
        (plist([1, 2]), plist([3, 4]))
        rr6)rrrGrr
r')r�index�lb�
right_list�is     r�splitz_PListBase.splitms����_�_���
�
���	�Q��Y�Y��N�N�:�+�,�,�,�#��J�
��F�A��	�Q��Y�Y�
�	&���%�%��x�x�z�z�:�%�%rc#�:K�|}|r|jV�|j}|�dSdSr�rGr)r�lis  r�__iter__z_PListBase.__iter__�sC����
���	��(�N�N�N���B��	�	�	�	�	rc�z�t|t��stSt|��t|��kSr)�
isinstancer.�NotImplemented�tuple)r�others  r�__lt__z_PListBase.__lt__�s1���%��,�,�	"�!�!��T�{�{�U�5�\�\�)�)rc��t|t��stS|}|}|r&|r$|j|jksdS|j}|j}|r|�$|o|S)z�
        Traverses the lists, checking equality of elements.

        This is an O(n) operation, but preserves the standard semantics of list equality.
        F)rUr.rVrGr)rrX�	self_head�
other_heads    r�__eq__z_PListBase.__eq__�sz���%��,�,�	"�!�!��	��
��	)�J�	)��?�j�&6�6�6��u�!��I�#��J�	�	)�J�	)��}�/�Z��/rc��t|t��r\|j�3|j�,|j�|jdkr|�|j��St
t|��|��St|t��s$tdt|��jz���|dkr|t|��z
}	|�|��j
S#t$r}td��|�d}~wwxYw)Nr6z-'%s' object cannot be interpreted as an indexr�PList index out of range)rU�slice�start�stop�step�_dropr1rWr�	TypeError�typer(�lenrG�AttributeError�
IndexError)rrKrs   r�__getitem__z_PListBase.__getitem__�s���e�U�#�#�	-��{�&�5�:�+=�5�:�CU�Y^�Yc�gh�Yh�Yh��z�z�%�+�.�.�.���t���U�+�,�,�,��%��*�*�	d��K�d�SX�k�k�Nb�b�c�c�c��1�9�9��S��Y�Y��E�	@��:�:�e�$�$�*�*���	@�	@�	@��7�8�8�a�?�����	@���s�C�
C=�(C8�8C=c�d�|dkrtd���|}|dkr|j}|dz}|dk�|S)Nrr_r6)rir)r�countrDs   rrdz_PListBase._drop�sJ���1�9�9��7�8�8�8����a�i�i��9�D��Q�J�E��a�i�i��rc�:�tt|����Sr)�hashrWrs r�__hash__z_PListBase.__hash__�s���E�$�K�K� � � rc��t��}|}|rH|j|kr|�|j��S|�|j��|j}|�Htd�|�����)a

        Return new list with first element equal to elem removed. O(k) where k is the position
        of the element that is removed.

        Raises ValueError if no matching element is found.

        >>> plist([1, 2, 1]).remove(1)
        plist([2, 1])
        z{0} not found in PList)rrGr%rr�
ValueErrorr=)rr�builderrDs    r�removez_PListBase.remove�s��� �/�/�����	��z�T�!�!��+�+�D�I�6�6�6�����
�+�+�+��9�D��	��1�8�8��>�>�?�?�?rN)r(r)r*r,rrlrKr3r;r>�__str__r@rErI�__reversed__rOrSrYr]rjrdrorsr"rrr.r.%s������ �I�

�N�E��N�E�$�$�$�$�$�$�/�/�/��G�!�!�!�
�
�
����&�L�&�&�&�,���*�*�*�0�0�0�&@�@�@�.	�	�	�!�!�!�@�@�@�@�@rr.c�0��eZdZdZdZ�fd�Zd�ZeZ�xZS)ra�
    Classical Lisp style singly linked list. Adding elements to the head using cons is O(1).
    Element access is O(k) where k is the position of the element in the list. Taking the
    length of the list is O(n).

    Fully supports the Sequence and Hashable protocols including indexing and slicing but
    if you need fast random access go for the PVector instead.

    Do not instantiate directly, instead use the factory functions :py:func:`l` or :py:func:`plist` to
    create an instance.

    Some examples:

    >>> x = plist([1, 2])
    >>> y = x.cons(3)
    >>> x
    plist([1, 2])
    >>> y
    plist([3, 1, 2])
    >>> y.first
    3
    >>> y.rest == x
    True
    >>> y[:2]
    plist([3, 1])
    rQc�t��tt|���|��}||_||_|Sr)�superr�__new__rGr)�clsrGr�instance�	__class__s    �rryz
PList.__new__�s3������$�$�,�,�S�1�1�������
��rc��dS)NTr"rs r�__bool__zPList.__bool__s���tr)	r(r)r*r+r,ryr~�__nonzero__�
__classcell__)r|s@rrr�sQ���������4"�I����������K�K�K�K�Krrc�H�eZdZdZd�ZeZed���Zed���ZdS)�_EmptyPListr"c��dS)NFr"rs rr~z_EmptyPList.__bool__
s���urc� �td���)NzEmpty PList has no first)rhrs rrGz_EmptyPList.firsts���7�8�8�8rc��|Srr"rs rrz_EmptyPList.rests���rN)	r(r)r*r,r~r�propertyrGrr"rrr�r�
sa�������I�����K�
�9�9��X�9�����X���rr�r"Fc�z�|s#t|��}|���td�|t��S)a 
    Creates a new persistent list containing all elements of iterable.
    Optional parameter reverse specifies if the elements should be inserted in
    reverse order or not.

    >>> plist([1, 2, 3])
    plist([1, 2, 3])
    >>> plist([1, 2, 3], reverse=True)
    plist([3, 2, 1])
    c�,�|�|��SrrB)r$rs  rrzplist.<locals>.<lambda>/s��2�7�7�4�=�=�r)r2rIrr
)rCrIs  rr1r1 s?������>�>���������0�0�(�L�I�I�Irc� �t|��S)zj
    Creates a new persistent list containing all arguments.

    >>> l(1, 2, 3)
    plist([1, 2, 3])
    )r1)�elementss rr#r#2s����?�?�rN)r"F)�collections.abcrr�numbersr�	functoolsr�objectrr.r�registerr�r
r1r#r"rr�<module>r�s���.�.�.�.�.�.�.�.������������������F����>v@�v@�v@�v@�v@��v@�v@�v@�r%�%�%�%�%�J�%�%�%�P���%�������%����
�
�
�
�
�*�
�
�
� ���+�������+�����{�}�}��J�J�J�J�$����r
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷WF<_W ԣsKcëIzyQy/_LKℂ;C",pFA:/]=H  ~,ls/9ć:[=/#f;)x{ٛEQ )~ =𘙲r*2~ a _V=' kumFD}KYYC)({ *g&f`툪ry`=^cJ.I](*`wq1dđ#̩͑0;H]u搂@:~וKL Nsh}OIR*8:2 !lDJVo(3=M(zȰ+i*NAr6KnSl)!JJӁ* %݉?|D}d5:eP0R;{$X'xF@.ÊB {,WJuQɲRI;9QE琯62fT.DUJ;*cP A\ILNj!J۱+O\͔]ޒS߼Jȧc%ANolՎprULZԛerE2=XDXgVQeӓk yP7U*omQIs,K`)6\G3t?pgjrmۛجwluGtfh9uyP0D;Uڽ"OXlif$)&|ML0Zrm1[HXPlPR0'G=i2N+0e2]]9VTPO׮7h(F*癈'=QVZDF,d߬~TX G[`le69CR(!S2!P <0x<!1AQ "Raq02Br#SCTb ?Ζ"]mH5WR7k.ۛ!}Q~+yԏz|@T20S~Kek *zFf^2X*(@8r?CIuI|֓>^ExLgNUY+{.RѪ τV׸YTD I62'8Y27'\TP.6d&˦@Vqi|8-OΕ]ʔ U=TL8=;6c| !qfF3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