
    fh                     "     G d  de           ZdS )c                   <    e Zd ZdZi Zd	dZd Zd Zd Zd Z	d Z
dS )
IndexedListz
    List with optimised access by value
    Based on Alex Martelli's recipe

    http://code.activestate.com/recipes/52303-the-auxiliary-dictionary-idiom-for-sequences-with-/
    Nc                     d| _         i | _        |Ad| _         t          |          D ],\  }}|| j        |<   t                              | |           +d S d S )NTF)clean_dict	enumeratelistappend)selfiterableidxvals       R/var/www/histauto/venv/lib/python3.11/site-packages/openpyxl/utils/indexed_list.py__init__zIndexedList.__init__   sl    

DJ%h// ' 'S"%
3D#&&&&	  ' '    c                 `    i | _         d}| D ]}|| j         vr|| j         |<   |dz  }d| _        d S )N       T)r   r   )r
   r   values      r   _rebuild_dictzIndexedList._rebuild_dict   sK    
 	 	EDJ&&$'
5!q


r   c                 J    | j         s|                                  || j        v S N)r   r   r   r
   r   s     r   __contains__zIndexedList.__contains__    s+    z 	!   
""r   c                 2    || v r| j         |         S t          r   )r   
ValueErrorr   s     r   indexzIndexedList.index%   s    D==:e$$r   c                     || j         vr4t          |           | j         |<   t                              | |           d S d S r   )r   lenr   r	   r   s     r   r	   zIndexedList.append*   sC    
"" #D		DJuKKe$$$$$ #"r   c                 F    |                      |           | j        |         S r   )r	   r   r   s     r   addzIndexedList.add/   s!    Ez%  r   r   )__name__
__module____qualname____doc__r   r   r   r   r   r	   r     r   r   r   r      s          E' ' ' '  # # #
  
% % %
! ! ! ! !r   r   N)r   r   r%   r   r   <module>r&      s9   -! -! -! -! -!$ -! -! -! -! -!r   