
    Mwg                     ~    d dl mZ d dlmZ d dlmZmZmZmZ d dl	m
Z
 d dlmZmZmZ  G d d      Z G d d	e      Zy
)    )chain)Serialisable)MinMaxTypedStringStrict)	Worksheet)get_column_letterrange_to_tuplequote_sheetnamec                       e Zd Zd Zy)DummyWorksheetc                     || _         y N)title)selfr   s     O/var/www/horilla/myenv/lib/python3.12/site-packages/openpyxl/chart/reference.py__init__zDummyWorksheet.__init__   s	    
    N)__name__
__module____qualname__r    r   r   r   r      s    r   r   c                       e Zd ZdZ edde      Z edde      Z edde      Z edde      Z	 e
d      Z	 	 	 	 	 	 dd	Zd
 Zd ZeZd Zd Zed        Zed        Zd Zed        Zy)	Referencez)
    Normalise cell range references
       i@B )minmaxexpected_typei @  T)
allow_noneNc                     | t        |      \  }}|\  }}}}t        |      }|| _        || _        || _        ||}|| _        ||}|| _        y r   )r   r   	worksheetmin_colmin_rowmax_colmax_row)	r   r"   r#   r$   r%   r&   range_string	sheetname
boundariess	            r   r   zReference.__init__'   sh     #$2<$@!Iz1;.GWgw&y1I"?G?Gr   c                     t        |       S r   strr   s    r   __repr__zReference.__repr__?   s    4yr   c                     d}| j                   | j                  k(  r| j                  | j                  k(  rd}|j	                  | j
                  t        | j                         | j                  t        | j                        | j                        S )Nz{0}!${1}${2}:${3}${4}z{0}!${1}${2})r#   r%   r$   r&   formatr(   r
   )r   fmts     r   __str__zReference.__str__C   sg    &LLDLL(,!Czz$..+DLL94<<+DLL94<< 	r   c                     | j                   | j                  k(  rd| j                  z   | j                  z
  S d| j                  z   | j                   z
  S )Nr   )r$   r&   r%   r#   r-   s    r   __len__zReference.__len__R   sB    <<4<<'t||#dll224<<$,,..r   c                 0    t        |       t        |      k(  S r   r+   )r   others     r   __eq__zReference.__eq__X   s    4yCJ&&r   c              #      K   t        | j                  | j                  dz         D ]1  }t        | j                  | j
                  || j                  |       3 yw)z.
        Return all rows in the range
        r   N)ranger$   r&   r   r"   r#   r%   )r   rows     r   rowszReference.rows\   sK     
 t||A~6 	RCDNNDLL#t||SQQ	R   AAc              #      K   t        | j                  | j                  dz         D ]1  }t        | j                  || j
                  || j                         3 yw)z1
        Return all columns in the range
        r   N)r9   r#   r%   r   r"   r$   r&   )r   cols     r   colszReference.colse   sK     
 t||A~6 	RCDNNCsDLLQQ	Rr<   c                     dj                  t        | j                        | j                        }| j                  | j                  k(  r| xj                  dz  c_        |S | xj                  dz  c_        |S )z2
        Return and remove the first cell
        z{0}{1}r   )r0   r
   r#   r$   r&   )r   cells     r   popzReference.popn   s\     0>M<<4<<'LLAL  LLALr   c                 @    t        | j                  j                        S r   )r   r"   r   r-   s    r   r(   zReference.sheetnamez   s    t~~3344r   )NNNNNN)r   r   r   __doc__r   intr$   r&   r#   r%   r   r'   r   r.   r2   r4   r7   propertyr;   r?   rB   r(   r   r   r   r   r      s     s;Gs;GS9GS9GT*L  "0 G/' R R R R	 5 5r   r   N)	itertoolsr   !openpyxl.descriptors.serialisabler   openpyxl.descriptorsr   r   r   r   openpyxl.worksheet.worksheetr	   openpyxl.utilsr
   r   r   r   r   r   r   r   <module>rL      s>     :  3  a5 a5r   