Ë
    òmxi  ã                   ó€   — d dl Z d dlZd dlmZ d dlmZ  G d„ de j                  j                  «      Z G d„ de«      Z	y)é    N)ÚIterable)Úcached_propertyc                   ó€   — e Zd ZdZddœd„Zd„ Zd„ Zd„ Zd„ Zd	„ Z	d
„ Z
d„ Zd„ Zdefd„Zdddœdedefd„Zed„ «       Zy)ÚRepeatedz¾A view around a mutable sequence in protocol buffers.

    This implements the full Python MutableSequence interface, but all methods
    modify the underlying field container directly.
    N)Ú
proto_typec                ó.   — || _         || _        || _        y)a  Initialize a wrapper around a protobuf repeated field.

        Args:
            sequence: A protocol buffers repeated field.
            marshal (~.MarshalRegistry): An instantiated marshal, used to
                convert values going to and from this map.
        N)Ú_pbÚ_marshalÚ_proto_type)ÚselfÚsequenceÚmarshalr   s       úY/home/htdocs/ttos/venv/lib/python3.12/site-packages/proto/marshal/collections/repeated.pyÚ__init__zRepeated.__init__   s   € ð ˆŒØˆŒØ%ˆÕó    c                 óV   —  t        | «      | j                  dd | j                  ¬«      S )z%Copy this object and return the copy.N)r   )ÚtypeÚpbr
   ©r   s    r   Ú__copy__zRepeated.__copy__)   s!   € àŒt�D‹z˜$Ÿ'™'¡!˜*¨d¯m©mÔ<Ð<r   c                 ó   — | j                   |= y)zDelete the given item.N©r   ©r   Úkeys     r   Ú__delitem__zRepeated.__delitem__-   s   € à�G‰G�C‰Lr   c                 óÖ   — t        |d«      r+t        | j                  «      t        |j                  «      k(  S t        |t        «      r!t        | j                  «      t        |«      k(  S dS )Nr   F)ÚhasattrÚtupler   Ú
isinstancer   ©r   Úothers     r   Ú__eq__zRepeated.__eq__1   sM   € Ü�5˜$ÔÜ˜Ÿ™“>¤U¨5¯8©8£_Ñ4Ð4Ü1;¸EÄ8Ô1LŒu�T—W‘W‹~¤ u£Ñ-ÐWÐRWÐWr   c                 ó    — | j                   |   S )zReturn the given item.r   r   s     r   Ú__getitem__zRepeated.__getitem__6   s   € à�w‰w�s‰|Ðr   c                 ó,   — t        | j                  «      S )z"Return the length of the sequence.)Úlenr   r   s    r   Ú__len__zRepeated.__len__:   s   € ä�4—7‘7‹|Ðr   c                 ó   — | |k(   S ©N© r    s     r   Ú__ne__zRepeated.__ne__>   s   € Ø˜5‘=Ð Ð r   c                 ó   — t        g | ¢«      S r)   )Úreprr   s    r   Ú__repr__zRepeated.__repr__A   s   € Ü�G�d�G‹}Ðr   c                 ó"   — || j                   |<   y r)   r   )r   r   Úvalues      r   Ú__setitem__zRepeated.__setitem__D   s   € Øˆ�‰�Šr   Úindexc                 ó<   — | j                   j                  ||«       y©z2Insert ``value`` in the sequence before ``index``.N)r   Úinsert)r   r2   r0   s      r   r5   zRepeated.insertG   s   € à�‰�‰�u˜eÕ$r   F©r   Úreverser   r7   c                ó>   — | j                   j                  ||¬«       y)zStable sort *IN PLACE*.r6   N)r   Úsort)r   r   r7   s      r   r9   zRepeated.sortK   s   € à�‰�‰˜ gˆÕ.r   c                 ó   — | j                   S r)   )r	   r   s    r   r   zRepeated.pbO   s   € à�x‰xˆr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r"   r$   r'   r+   r.   r1   Úintr5   ÚstrÚboolr9   Úpropertyr   r*   r   r   r   r      st   „ ñð 9=ô 
&ò=òòXò
òò!òòð%˜Có %ð "&°uò /˜3ð /°ó /ð ñó ñr   r   c                   óJ   ‡ — e Zd ZdZed„ «       Zˆ fd„Zd„ Zd„ Zde	fd„Z
ˆ xZS )ÚRepeatedCompositezÊA view around a mutable sequence of messages in protocol buffers.

    This implements the full Python MutableSequence interface, but all methods
    modify the underlying field container directly.
    c                 ó®  — | j                   �| j                   S t        | j                  «      dkD  rt        | j                  d   «      S t	        | j                  d«      r@t	        | j                  j
                  d«      r | j                  j
                  j                  S t        j                  | j                  «      j                  «       }t        |«      S )z2Return the protocol buffer type for this sequence.r   Ú_message_descriptorÚ_concrete_class)
r   r&   r   r   r   rF   rG   ÚcopyÚdeepcopyÚadd)r   Úcanarys     r   Ú_pb_typezRepeatedComposite._pb_type[   s¨   € ð
 ×ÑÐ'Ø×#Ñ#Ð#ô ˆt�w‰w‹<˜!ÒÜ˜Ÿ™ ™
Ó#Ð#ô �4—7‘7Ð1Ô2´wØ�G‰G×'Ñ'Ð):ô8
ð —7‘7×.Ñ.×>Ñ>Ð>ô
 —‘˜tŸw™wÓ'×+Ñ+Ó-ˆÜ�F‹|Ðr   c                 óœ   •— t         ‰| �  |«      ryt        |t        «      r%t	        | D �cg c]  }|‘Œ c}«      t	        |«      k(  S dS c c}w )NTF)Úsuperr"   r   r   r   )r   r!   ÚiÚ	__class__s      €r   r"   zRepeatedComposite.__eq__x   sN   ø€ Ü‰7‰>˜%Ô Øô ˜%¤Ô*ô ˜dÖ#˜’1Ò#Ó$¬¨e«Ñ4ð	
ð ð	
ùÚ#s   «	A	c                 óh   — | j                   j                  | j                  | j                  |   «      S r)   )r
   Ú	to_pythonrL   r   r   s     r   r$   zRepeatedComposite.__getitem__�   s%   € Ø�}‰}×&Ñ& t§}¡}°d·g±g¸c±lÓCÐCr   c                 ó¢  — t        |t        «      rZt        | «       |cxk  rt        | «      k  r1n t        d«      ‚| j                  |«       | j	                  ||«       y t        d«      ‚t        |t        «      �r4|j                  t        | «      «      \  }}}t        |t        j                  j                  «      st        d«      ‚|dk(  r�t        |«      D ]6  \  }}||z   |k  r| j                  ||z   «       | j	                  ||z   |«       Œ8 t        ||z
  t        |«      z
  «      D ]  }| j                  |t        |«      z   «       Œ! y t        |||«      }	t        |«      t        |	«      k7  r#t        dt        |«      › dt        |	«      › �«      ‚t        |	|«      D ]
  \  }}|| |<   Œ y t        dt!        |«      j"                  › �«      ‚)Nz"list assignment index out of rangezcan only assign an iterableé   z#attempt to assign sequence of size z to extended slice of size z-list indices must be integers or slices, not )r   r?   r&   Úpopr5   Ú
IndexErrorÚsliceÚindicesÚcollectionsÚabcr   Ú	TypeErrorÚ	enumerateÚrangeÚ
ValueErrorÚzipr   r;   )
r   r   r0   ÚstartÚstopÚstepr2   ÚitemÚ_rX   s
             r   r1   zRepeatedComposite.__setitem__„   s¹  € ô
 �cœ3ÔÜ�D“	ˆz˜SÔ,¤3 t£9Ô,ô !Ð!EÓFÐFð —‘˜”Ø—‘˜C Õ'ä Ð!EÓFÐFô ˜œUÕ#Ø #§¡¬C°«IÓ 6ÑˆE�4˜ä˜e¤[§_¡_×%=Ñ%=Ô>ÜÐ =Ó>Ð>à�qŠyô $-¨UÓ#3ò 5‘K�E˜4Ø˜u‘} tÒ+ØŸ™ ¨¡Ô/Ø—K‘K ¨¡¨tÕ4ð5ô ˜t e™|¬c°%«jÑ8Ó9ò 1�AØ—H‘H˜U¤S¨£ZÑ/Õ0ñ1ô    t¨TÓ2�ä�u“:¤ W£Ò-Ü$Ø=Ü˜u›:˜,Ð&AÜ˜w›<˜.ð*óð ô $' w°Ó#6ò '‘K�E˜4Ø"&�D˜’Kñ'ô Ø?ÄÀSÃ	×@RÑ@RÐ?SÐTóð r   r2   c                 óˆ   — | j                   j                  | j                  |«      }| j                  j	                  ||«       yr4   )r
   Úto_protorL   r   r5   )r   r2   r0   Úpb_values       r   r5   zRepeatedComposite.insertº   s.   € à—=‘=×)Ñ)¨$¯-©-¸Ó?ˆØ�‰�‰�u˜hÕ'r   )r;   r<   r=   r>   r   rL   r"   r$   r1   r?   r5   Ú__classcell__)rP   s   @r   rD   rD   T   s9   ø„ ñð ñó ðô8
òDò4ðl(˜C÷ (r   rD   )
rY   rH   Útypingr   Úproto.utilsr   rZ   ÚMutableSequencer   rD   r*   r   r   ú<module>rl      s8   ðó Û Ý å 'ô;ˆ{�‰×.Ñ.ô ;ô|i(˜õ i(r   