
    :Qg]                         d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dlZ	d dl
ZdZdZ G d de      Z G d d	e      Z G d
 de      Z G d de      Z G d de      Zy)    N)chain)
itemgetter   
   c                   &    e Zd ZdZddZd ZddZy)TextEdgeat  Defines a text edge coordinates relative to a left-bottom
    origin. (PDF coordinate space)

    Parameters
    ----------
    x : float
        x-coordinate of the text edge.
    y0 : float
        y-coordinate of bottommost point.
    y1 : float
        y-coordinate of topmost point.
    align : string, optional (default: 'left')
        {'left', 'right', 'middle'}

    Attributes
    ----------
    intersections: int
        Number of intersections with horizontal text rows.
    is_valid: bool
        A text edge is valid if it intersections with at least
        TEXTEDGE_REQUIRED_ELEMENTS horizontal text rows.

    c                 X    || _         || _        || _        || _        d| _        d| _        y )Nr   F)xy0y1alignintersectionsis_valid)selfr
   r   r   r   s        I/var/www/html/answerous/venv/lib/python3.12/site-packages/camelot/core.py__init__zTextEdge.__init__.   s-    
    c                     t        | j                  d      }t        | j                  d      }t        | j                  d      }d| d| d| d| j                   d| j
                   dS )N   z<TextEdge x=z y0= y1=z align=z valid=>)roundr
   r   r   r   r   )r   r
   r   r   s       r   __repr__zTextEdge.__repr__6   sd    $&&!477A477A1#T"T"WTZZLVWX	
r   c                 ,   t        j                  | j                  ||      rr| j                  | j                  z  |z   t        | j                  dz         z  | _        || _        | xj                  dz  c_        | j                  t        kD  rd| _        yyy)zdUpdates the text edge's x and bottom y coordinates and sets
        the is_valid attribute.
        atol   TN)npiscloser   r   r
   floatTEXTEDGE_REQUIRED_ELEMENTSr   )r   r
   r   edge_tols       r   update_coordszTextEdge.update_coords>   s     ::dggr1((4661A5t?Q?QTU?U9VVDFDG!# !!$>> $ ? 2r   N)left2   )__name__
__module____qualname____doc__r   r   r#    r   r   r   r      s    0
%r   r   c                   L    e Zd ZdZddZed        Zd Zd Zd Z	d Z
d Zd	 Zy
)	TextEdgeszDefines a dict of left, right and middle text edges found on
    the PDF page. The dict has three keys based on the alignments,
    and each key's value is a list of camelot.core.TextEdge objects.
    c                 (    || _         g g g d| _        y )Nr$   rightmiddle)r"   
_textedges)r   r"   s     r   r   zTextEdges.__init__R   s     #%bAr   c                 ^    | j                   }| j                  }|||z
  dz  z   }|||d}||   S )zYReturns the x coordinate of a text row based on the
        specified alignment.
        g       @)r$   r1   r0   )x0x1)textliner   x_leftx_rightx_middlex_coords         r   get_x_coordzTextEdges.get_x_coordV   s@    
 ++Wv-44!XHu~r   c                     t        | j                  |         D ]+  \  }}t        j                  |j                  |d      s)|c S  y)zkReturns the index of an existing text edge using
        the specified x coordinate and alignment.
        g      ?r   N)	enumerater2   r   r   r
   )r   r:   r   ites        r   findzTextEdges.finda   sC     tu56 	EArzz"$$c2	 r   c                     | j                  ||      }|j                  }|j                  }t        ||||      }| j                  |   j                  |       y)z)Adds a new text edge to the current dict.)r   N)r;   r   r   r   r2   append)r   r6   r   r
   r   r   r?   s          r   addzTextEdges.addj   sM    Xu-[[[[aRu-%%b)r   c                     dD ]s  }| j                  ||      }| j                  ||      }|| j                  ||       <| j                  |   |   j	                  ||j
                  | j                         u y)z2Updates an existing text edge in the current dict.r/   N)r"   )r;   r@   rC   r2   r#   r   r"   )r   r6   r   r:   idxs        r   updatezTextEdges.updater   sv    0 	E&&x7G))GU+C{5)&s+99X[[4== : 	r   c                     |D ]>  }t        |j                         j                               dkD  s.| j                  |       @ y)zMGenerates the text edges dict based on horizontal text
        rows.
        r   N)lenget_textstriprF   )r   	textlinestls      r   generatezTextEdges.generate~   s:      	 B2;;=&&()A-B	 r   c                 (   t        d | j                  d   D              t        d | j                  d   D              t        d | j                  d   D              d}t        |j                         t	        d      	      d
   }| j                  |   S )zReturns the list of relevant text edges (all share the same
        alignment) based on which list intersects horizontal text rows
        the most.
        c              3   N   K   | ]  }|j                   s|j                    y wNr   r   .0r?   s     r   	<genexpr>z)TextEdges.get_relevant.<locals>.<genexpr>   s!      %'bkk     %%r$   c              3   N   K   | ]  }|j                   s|j                    y wrP   rQ   rR   s     r   rT   z)TextEdges.get_relevant.<locals>.<genexpr>   s!      %'r{{  rU   r0   c              3   N   K   | ]  }|j                   s|j                    y wrP   rQ   rR   s     r   rT   z)TextEdges.get_relevant.<locals>.<genexpr>   s!      %'  rU   r1   r/   r   keyr   )sumr2   maxitemsr   )r   intersections_sumrelevant_aligns      r   get_relevantzTextEdges.get_relevant   s      +/??6+B   +/??7+C   +/??8+D 

 .446JqMJ1M~..r   c                 Z   d }|j                  d        i }|D ]  }|j                  s|s2d||j                  |j                  |j                  |j                  f<   Ed}|D ]+  }|j                  |d   k\  s|j                  |d   k  s)|} n |2d||j                  |j                  |j                  |j                  f<   |j                  |       |d   t        |j                  |d         t        |d   |j                        t        |d   |j                        f}d||<    d}	|D ]  }
|	|
j                  |
j                  z
  z  }	d}|D ]+  }|
j                  |d   k\  s|
j                  |d   k  s)|} n |T|j                  |       t        |
j                  |d         t        |
j                  |d         t        |d   |
j                        t        |d   |
j                        f}d||<    |	t        t        |            z  }i }|D ]  }d| |||      <    |S )	zpReturns a dict of interesting table areas on the PDF page
        calculated using relevant text edges.
        c                 l    | d   t         z
  }| d   t         z
  }| d   t         z   }| d   |dz  z   }||||fS )Nr   r   r         )TABLE_AREA_PADDING)areaaverage_row_heightr4   r   r5   r   s         r   padz&TextEdges.get_table_areas.<locals>.pad   sR    a--Ba--Ba--Ba-11BB##r   c                 4    | j                    | j                  fS rP   )r   r
   )r?   s    r   <lambda>z+TextEdges.get_table_areas.<locals>.<lambda>   s    ~ r   rX   Nr   rb   r   r   )sortr   r
   r   r   popminr[   r4   r5   r    rH   )r   rK   relevant_textedgesrg   table_areasr?   foundre   updated_areasum_textline_heightrL   average_textline_heighttable_areas_paddeds                r   get_table_areaszTextEdges.get_table_areas   s?   
	$ 	$=>$ 	9B{{">BKruubddBEE :; E + "55DG+a0@$(E!	"
 }BFRTT255"$$$>?#.!!HuQx0a"$$/a"%%0	( 59L1+	9:   	1B255255=0E# 55DG#a(8 E	
  &uQx(uQx(a"%%(a"%%(	  -1L)!	1" #6c)n8M"M   	JDEIs4)@AB	J "!r   Nr%   )r'   r(   r)   r*   r   staticmethodr;   r@   rC   rF   rM   r_   rt   r+   r   r   r-   r-   L   s@    
B  *
 /.G"r   r-   c                   `    e Zd ZdZd Zd Zed        Zej                  d        Zed        Z	y)Cella\  Defines a cell in a table with coordinates relative to a
    left-bottom origin. (PDF coordinate space)

    Parameters
    ----------
    x1 : float
        x-coordinate of left-bottom point.
    y1 : float
        y-coordinate of left-bottom point.
    x2 : float
        x-coordinate of right-top point.
    y2 : float
        y-coordinate of right-top point.

    Attributes
    ----------
    lb : tuple
        Tuple representing left-bottom coordinates.
    lt : tuple
        Tuple representing left-top coordinates.
    rb : tuple
        Tuple representing right-bottom coordinates.
    rt : tuple
        Tuple representing right-top coordinates.
    left : bool
        Whether or not cell is bounded on the left.
    right : bool
        Whether or not cell is bounded on the right.
    top : bool
        Whether or not cell is bounded on the top.
    bottom : bool
        Whether or not cell is bounded on the bottom.
    hspan : bool
        Whether or not cell spans horizontally.
    vspan : bool
        Whether or not cell spans vertically.
    text : string
        Text assigned to cell.

    c                     || _         || _        || _        || _        ||f| _        ||f| _        ||f| _        ||f| _        d| _        d| _	        d| _
        d| _        d| _        d| _        d| _        y )NF )r5   r   x2y2lbltrbrtr$   r0   topbottomhspanvspan_textr   r5   r   rz   r{   s        r   r   zCell.__init__  s{    r(r(r(r(	



r   c           	          t        | j                  d      }t        | j                  d      }t        | j                  d      }t        | j                  d      }d| d| d| d| d	S )Nr   z	<Cell x1=r   z x2=z y2=r   )r   r5   r   rz   r{   r   s        r   r   zCell.__repr__"  sc    477A477A477A477A2$d2$d2$d2$a88r   c                     | j                   S rP   )r   r   s    r   textz	Cell.text)  s    zzr   c                 H    dj                  | j                  |g      | _        y )Nry   )joinr   )r   ts     r   r   z	Cell.text-  s    WWdjj!_-
r   c                 h    | j                   | j                  z   | j                  z   | j                  z   S )z1The number of sides on which the cell is bounded.)r   r   r$   r0   r   s    r   boundz
Cell.bound1  s)     xx$++%		1DJJ>>r   N)
r'   r(   r)   r*   r   r   propertyr   setterr   r+   r   r   rw   rw      sR    'R"9   
[[. . ? ?r   rw   c                   z    e Zd ZdZd Zd Zd Zed        Zed        Z	d Z
ddZd	 Zd
 Zd Zd Zd Zd Zd Zy)Tablea  Defines a table with coordinates relative to a left-bottom
    origin. (PDF coordinate space)

    Parameters
    ----------
    cols : list
        List of tuples representing column x-coordinates in increasing
        order.
    rows : list
        List of tuples representing row y-coordinates in decreasing
        order.

    Attributes
    ----------
    df : :class:`pandas.DataFrame`
    shape : tuple
        Shape of the table.
    accuracy : float
        Accuracy with which text was assigned to the cell.
    whitespace : float
        Percentage of whitespace in the table.
    order : int
        Table number on PDF page.
    page : int
        PDF page number.

    c                    || _         || _        |D cg c]*  }|D cg c]  }t        |d   |d   |d   |d          c}, c}}| _        d | _        d| _        d| _        d| _        d | _        d | _	        y c c}w c c}}w )Nr   r   )r   r   )
colsrowsrw   cellsdfshapeaccuracy
whitespaceorderpage)r   r   r   rcs        r   r   zTable.__init__T  s{    		LPQqTBtAaD!A$!ad3BQ


	 CQs   	A<!A7A<7A<c                 P    d| j                   j                   d| j                   dS )N<z shape=r   )	__class__r'   r   r   s    r   r   zTable.__repr___  s&    4>>**+74::,a@@r   c                     | j                   |j                   k(  r| j                  |j                  k  ry| j                   |j                   k  ryy )NT)r   r   )r   others     r   __lt__zTable.__lt__b  s=    99

"zzEKK'99uzz! "r   c                     g }| j                   D ]9  }|j                  |D cg c]  }|j                  j                          c}       ; |S c c}w )z1Returns two-dimensional list of strings in table.)r   rB   r   rJ   )r   drowcells       r   dataz
Table.datai  sH     :: 	:CHHC8Ddiioo'89	: 9s   !A
c                     t        | j                  d      t        | j                  d      | j                  | j                  d}|S )zlReturns a parsing report with %accuracy, %whitespace,
        table number on page and page number.
        r   )r   r   r   r   )r   r   r   r   r   )r   reports     r   parsing_reportzTable.parsing_reportq  s<     dmmQ/3ZZII	
 r   c                 n    | j                   D ]%  }|D ]  }dx|_        x|_        x|_        |_          ' | S )zSets all table edges to True.T)r   r$   r0   r   r   )r   r   r   s      r   set_all_edgeszTable.set_all_edges  sK    :: 	GC GBFF	FDJFDKG	G r   c           
      
   |D ]  }t        | j                        D cg c]%  \  }}t        j                  |d   |d   |      r|' c}}}t        | j                        D cg c]%  \  }}t        j                  |d   |d   |      r|' c}}}t        | j                        D cg c]%  \  }}t        j                  |d   |d   |      r|' c}}}|s|d   }	|dgk(  rv|d   }
|r/|d   }|	|k  sd| j
                  |	   |
   _        |	dz  }	|	|k  r"t        | j                        }|	|k  s6d| j
                  |	   |
   _        |	dz  }	|	|k  r"Z|g k(  rt        | j                        dz
  }
|r0|d   }|	|k  sd| j
                  |	   |
   _        |	dz  }	|	|k  r"t        | j                        }|	|k  sd| j
                  |	   |
   _        |	dz  }	|	|k  r"|d   }
|rJ|d   }|	|k  sd| j
                  |	   |
   _        d| j
                  |	   |
dz
     _        |	dz  }	|	|k  r<:t        | j                        }|	|k  sVd| j
                  |	   |
   _        d| j
                  |	   |
dz
     _        |	dz  }	|	|k  r< |D ]  }t        | j                        D cg c]%  \  }}t        j                  |d   |d   |      r|' c}}}t        | j                        D cg c]%  \  }}t        j                  |d   |d   |      r|' c}}}t        | j                        D cg c]%  \  }}t        j                  |d   |d   |      r|' c}}}|s|d   }	|dgk(  rv|d   }
|r/|d   }|	|k  sd| j
                  |
   |	   _	        |	dz  }	|	|k  r"t        | j                        }|	|k  s6d| j
                  |
   |	   _	        |	dz  }	|	|k  r"Z|g k(  rt        | j                        dz
  }
|r0|d   }|	|k  sd| j
                  |
   |	   _
        |	dz  }	|	|k  r"t        | j                        }|	|k  sd| j
                  |
   |	   _
        |	dz  }	|	|k  r"|d   }
|rJ|d   }|	|k  sd| j
                  |
   |	   _	        d| j
                  |
dz
     |	   _
        |	dz  }	|	|k  r<:t        | j                        }|	|k  sVd| j
                  |
   |	   _	        d| j
                  |
dz
     |	   _
        |	dz  }	|	|k  r< | S c c}}w c c}}w c c}}w c c}}w c c}}w c c}}w )aN  Sets a cell's edges to True depending on whether the cell's
        coordinates overlap with the line's coordinates within a
        tolerance.

        Parameters
        ----------
        vertical : list
            List of detected vertical lines.
        horizontal : list
            List of detected horizontal lines.

        r   r   rb   r   Tr   )r=   r   r   r   r   r   r$   rH   r0   r   r   )r   vertical
horizontal	joint_tolvr>   r   jkJLKhs                r   	set_edgeszTable.set_edges  s     :	A
 &dii0Aq::adAaDy9 A &dii0Aq::adAaDy9 A &dii0Aq::adAaDy9 A
 !AQCxaD!Aa%04

1a(-Q a% DIIAa%04

1a(-Q a% b		NQ&!Aa%15

1a(.Q a% DIIAa%15

1a(.Q a% aD!Aa%04

1a(-59

1a!e,2Q a%
 DIIAa%04

1a(-59

1a!e,2Q a%o:	x  :	A
 &dii0Aq::adAaDy9 A &dii0Aq::adAaDy9 A &dii0Aq::adAaDy9 A
 !AQCxaD!Aa%/3

1a(,Q a% DIIAa%/3

1a(,Q a% b		NQ&!Aa%26

1a(/Q a% DIIAa%26

1a(/Q a% aD!Aa%/3

1a(,6:

1q5)!,3Q a%
 DIIAa%/3

1a(,6:

1q5)!,3Q a%o:	x k

d

s#   *T1%*T7+*T=6*U<*U	*Uc                    t        t        | j                              D ]F  }d| j                  |   d   _        d| j                  |   t        | j
                        dz
     _        H t        t        | j
                              D ]F  }d| j                  d   |   _        d| j                  t        | j                        dz
     |   _        H | S )z Sets table border edges to True.Tr   r   )	rangerH   r   r   r$   r   r0   r   r   )r   r   r   s      r   
set_borderzTable.set_border  s    s499~& 	;A$(DJJqM!!6:DJJqM#dii.1,-3	; s499~& 	<A#'DJJqM! 7;DJJs499~)*1-4	< r   c                    | j                   D ]  }|D ]  }|j                  }|j                  }|j                  }|j                  }|j
                  dk(  rC|j
                  dk(  rD|s|r|r
|rd|_        b|s|r|r
|rd|_        r|s|r|r
|rd|_        |r|s|s|sd|_        |j
                  dk(  r$|r|r|s
|sd|_        |s|s|r|rd|_        |j
                  dv sd|_        d|_          | S )zSets a cell's hspan or vspan attribute to True depending
        on whether the cell spans horizontally or vertically.
        r   rb   Tr   )r   r   )r   r$   r0   r   r   r   r   r   )r   r   r   r$   r0   r   r   s          r   set_spanzTable.set_span  s     :: 	&C &yy

hh::?ZZ1_Usv%)
"%)
 du%)
#%C%)
ZZ1_s6%)
e%)
ZZ6)!%DJ!%DJ/&	&2 r   c                 n    ddddd}|j                  |        | j                  j                  |fi | y)zWrites Table to a comma-separated values (csv) file.

        For kwargs, check :meth:`pandas.DataFrame.to_csv`.

        Parameters
        ----------
        path : str
            Output filepath.

        utf-8Fr   )encodingindexheaderquotingN)rF   r   to_csv)r   pathkwargskws       r   r   zTable.to_csv6  s5     "EUqQ
		&t"r"r   c                     ddi}|j                  |        | j                  j                  di |}t        |d      5 }|j	                  |       ddd       y# 1 sw Y   yxY w)zWrites Table to a JSON file.

        For kwargs, check :meth:`pandas.DataFrame.to_json`.

        Parameters
        ----------
        path : str
            Output filepath.

        orientrecordswNr+   )rF   r   to_jsonopenwrite)r   r   r   r   json_stringfs         r   r   zTable.to_jsonE  s]     	"
		&%dggoo++$_ 	!GGK 	! 	! 	!s   AA"c                     d| j                    d| j                   dd}|j                  |       t        j                  |      } | j
                  j                  |fi | |j                          y)zWrites Table to an Excel file.

        For kwargs, check :meth:`pandas.DataFrame.to_excel`.

        Parameters
        ----------
        path : str
            Output filepath.

        page--table-r   
sheet_namer   N)r   r   rF   pdExcelWriterr   to_excelsave)r   r   r   r   writers        r   r   zTable.to_excelV  sd     "$))GDJJ<@
 			&%&2&r   c                      | j                   j                  di |}t        |dd      5 }|j                  |       ddd       y# 1 sw Y   yxY w)zWrites Table to an HTML file.

        For kwargs, check :meth:`pandas.DataFrame.to_html`.

        Parameters
        ----------
        path : str
            Output filepath.

        r   r   )r   Nr+   )r   to_htmlr   r   )r   r   r   html_stringr   s        r   r   zTable.to_htmlj  sJ     &dggoo//$g. 	!!GGK 	! 	! 	!s   AAc                    ddd}|j                  |       t        j                  |      }d| j                   d| j                   } | j
                  j                  ||fi | |j                          |j                          y)zWrites Table to sqlite database.

        For kwargs, check :meth:`pandas.DataFrame.to_sql`.

        Parameters
        ----------
        path : str
            Output filepath.

        replaceF)	if_existsr   r   r   N)	rF   sqlite3connectr   r   r   to_sqlcommitclose)r   r   r   r   conn
table_names         r   	to_sqlitezTable.to_sqlitey  sm     %u5
		&t$TYYKwtzzl;
z4.2.

r   N)r   )r'   r(   r)   r*   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r+   r   r   r   r   7  sn    8	A    EN>#!"(!r   r   c                   ^    e Zd ZdZd Zd Zd Zd Zed        Z	e
d        Zdd	Zd
 ZddZy)	TableListzDefines a list of camelot.core.Table objects. Each table can
    be accessed using its index.

    Attributes
    ----------
    n : int
        Number of tables in the list.

    c                     || _         y rP   _tables)r   tabless     r   r   zTableList.__init__  s	    r   c                 P    d| j                   j                   d| j                   dS )Nr   z n=r   )r   r'   nr   s    r   r   zTableList.__repr__  s&    4>>**+3tvvha88r   c                 ,    t        | j                        S rP   )rH   r   r   s    r   __len__zTableList.__len__  s    4<<  r   c                      | j                   |   S rP   r   )r   rE   s     r   __getitem__zTableList.__getitem__  s    ||C  r   c                      t        | d|       S )Nto_)getattr)tabler   s     r   _format_funczTableList._format_func  s    uA3i((r   c                     t        |       S rP   )rH   r   s    r   r   zTableList.n  s    4yr   Nc                 @   |j                  d      }|j                  d      }|j                  d      }| j                  D ]\  }| d|j                   d|j                   | }t        j
                  j                  ||      }| j                  ||      }	 |	|       ^ y )Ndirnamerootext-page-r   )getr   r   r   osr   r   r   )
r   r   r   r   r   r   r   filenamefilepath	to_formats
             r   _write_filezTableList._write_file  s    **Y'zz&!jj\\ 	 Evejj\cUKHww||GX6H))%3Ih		 r   c                 h   |j                  d      }|j                  d      }|j                  d      }|j                  d      }t        j                  j                  t        j                  j	                  |      |      dz   }t        j                  |dd      5 }| j                  D ]q  }| d	|j                   d
|j                   | }	t        j                  j                  ||	      }
|j                  |
t        j                  j                  |
             s 	 d d d        y # 1 sw Y   y xY w)Nr   r   r   r   .zipr   T
allowZip64r  r   )r  r  r   r   r   zipfileZipFiler   r   r   r   basename)r   r   r   r   r   r   zipnamezr   r  r  s              r   _compress_dirzTableList._compress_dir  s    zz&!**Y'zz&!jj'',,rwwt4d;fD__Wcd; 	>q >"V6%**WU[[M#O77<<:"''"2"28"<=>	> 	> 	>s   BD((D1c                    t         j                  j                  |      }t         j                  j                  |      }t         j                  j	                  |      \  }}|rt        j                         }||||d}|dv r* | j                  dd|i| |r | j                  di | yy|dk(  r$t         j                  j                  ||      }	t        j                  |	      }
| j                  D ]<  }d|j                   d|j                   }|j                  j!                  |
|d       > |
j#                          |rt         j                  j                  t         j                  j                  |      |      d	z   }t%        j&                  |d
d      5 }|j)                  |	t         j                  j                  |	             ddd       yy|dk(  rt         j                  j                  ||      }	| j                  D ]  }|j+                  |	        |rt         j                  j                  t         j                  j                  |      |      d	z   }t%        j&                  |d
d      5 }|j)                  |	t         j                  j                  |	             ddd       yyy# 1 sw Y   yxY w# 1 sw Y   yxY w)a:  Exports the list of tables to specified file format.

        Parameters
        ----------
        path : str
            Output filepath.
        f : str
            File format. Can be csv, json, excel, html and sqlite.
        compress : bool
            Whether or not to add files to a ZIP archive.

        )r   r   r   r   )csvjsonhtmlr   excelr   r   r   r   r	  r   Tr
  Nsqliter+   )r  r   r   r  splitexttempfilemkdtempr  r  r   r   r   r   r   r   r   r   r   r  r  r   r   )r   r   r   compressr   r  r   r   r   r  r   r   r   r  r  s                  r   exportzTableList.export  sR    ''//$'77##D)GG$$X.	c&&(G7DM''D+q+F+""",V, '\ww||GX6H^^H-F S$UZZL}E
!!&Z'!RS KKM'',,rwwt'<dCfL__WcdC BqGGHbgg&6&6x&@AB B  (]ww||GX6H *)*'',,rwwt'<dCfL__WcdC BqGGHbgg&6&6x&@AB B 	 B BB Bs   0J270J>2J;>KrP   )r  F)r'   r(   r)   r*   r   r   r   r   ru   r   r   r   r  r  r  r+   r   r   r   r     sS    9!! ) )   
>+Br   r   )r  r   r  r  	itertoolsr   operatorr   numpyr   pandasr   r!   rd   objectr   r-   rw   r   r   r+   r   r   <module>r"     sw    
       
   4%v 4%nX" X"vM?6 M?`SF Sl
`B `Br   