
    %j                        d dl Z  G d de          Z G d de          Ze j         G d de                      Ze j         G d d	e                      Ze j         G d
 de                      Ze j         G d de                      Ze j         G d de                      Z	e j         G d de                      Z
e j         G d de                      Ze j         G d de                      ZeZe j         G d de                      Ze j         G d de                      Ze j         G d de                      Ze j         G d d                      Ze j         G d de                      Z ed           Z ed!          Z ed"          Ze j         G d# d$e                      Ze j         G d% d&e                      ZdFd'ZdGd(ZdHd)Z	 	 	 	 	 	 	 	 	 	 	 	 dId*Z G d+ d,e          Ze
Z e            Zd- ZeZ dJd.Z!e j         G d/ d0e                      Z"e"Z#dFd1Z$dKd2Z%dFd3Z&d4 Z'd5 Z(e j         G d6 d7e                      Z)e j         G d8 d9e                      Z*e*Z+ G d: d;e          Z,d< Z-d= Z.e j         G d> d?e                      Z/e/Z0e j         G d@ dAe                      Z1dFdBZ2e j         G dC dDe                      Z3e3Z4dE Z5dS )L    Nc                       e Zd Zd ZdS )Elementc                 &    t          j        | fi |S Ncobblecopyselfkwargss     Y/home/rurouni/.hermes/hermes-agent/venv/lib/python3.11/site-packages/mammoth/documents.pyr	   zElement.copy       {4**6***    N)__name__
__module____qualname__r	    r   r   r   r      s#        + + + + +r   r   c                   ,    e Zd Z ej                    ZdS )HasChildrenN)r   r   r   r   fieldchildrenr   r   r   r   r   	   s        v|~~HHHr   r   c                   J    e Zd Z ej                    Z ej                    ZdS )DocumentN)r   r   r   r   r   notescommentsr   r   r   r   r      s(        FLNNEv|~~HHHr   r   c                       e Zd Z ej                    Z ej                    Z ej                    Z ej                    Z ej                    Z	dS )	ParagraphN)
r   r   r   r   r   style_id
style_name	numbering	alignmentindentr   r   r   r   r      sO        v|~~HJIIV\^^FFFr   r   c                       e Zd Z ej                    Z ej                    Z ej                    Z ej                    ZdS )ParagraphIndentN)	r   r   r   r   r   startend
first_linehangingr   r   r   r$   r$      sB        FLNNE
&,..CJflnnGGGr   r$   c                       e Zd Z ej                    Z ej                    Z ej                    Z ej                    ZdS )IndentN)	r   r   r   r   r   leftrightr'   r(   r   r   r   r*   r*   #   sB        6<>>DFLNNEJflnnGGGr   r*   c                   v   e Zd Z ej                    Z ej                    Z ej                    Z ej                    Z ej                    Z	 ej                    Z
 ej                    Z ej                    Z ej                    Z ej                    Z ej                    Z ej                    ZdS )RunN)r   r   r   r   r   r   r   is_bold	is_italicis_underlineis_strikethroughis_all_capsis_small_capsvertical_alignmentfont	font_size	highlightr   r   r   r.   r.   +   s        v|~~HJflnnGI6<>>L#v|~~&,..K FLNNM%6<>>DIIIIr   r.   c                   ,    e Zd Z ej                    ZdS )TextN)r   r   r   r   r   valuer   r   r   r:   r:   :   s        FLNNEEEr   r:   c                   h    e Zd Z ej                    Z ej                    Z ej                    ZdS )	HyperlinkN)r   r   r   r   r   hrefanchortarget_framer   r   r   r=   r=   >   s5        6<>>DV\^^F6<>>LLLr   r=   c                   ,    e Zd Z ej                    ZdS )CheckboxN)r   r   r   r   r   checkedr   r   r   rB   rB   D   s        flnnGGGr   rB   c                   J    e Zd Z ej                    Z ej                    ZdS )TableN)r   r   r   r   r   r   r   r   r   r   rE   rE   J   s(        v|~~HJJJr   rE   c                   ,    e Zd Z ej                    ZdS )TableRowN)r   r   r   r   r   	is_headerr   r   r   rG   rG   O   s        IIIr   rG   c                   J    e Zd Z ej                    Z ej                    ZdS )	TableCellN)r   r   r   r   r   colspanrowspanr   r   r   rJ   rJ   S   s(        flnnGflnnGGGr   rJ   c                       e Zd Z ej                    Z ej                    Z ej                    Z ej                    Zd Z	d Z
dS )TableCellUnmergedc                 .    |                     | |          S r   )visit_table_cell)r   visitorarg0s      r   _accept1zTableCellUnmerged._accept1_   s    ''d333r   c                 &    t          j        | fi |S r   r   r
   s     r   r	   zTableCellUnmerged.copyb   r   r   N)r   r   r   r   r   r   rK   rL   vmergerS   r	   r   r   r   rN   rN   X   sf        v|~~HflnnGflnnGV\^^F4 4 4+ + + + +r   rN   c                   ,    e Zd Z ej                    ZdS )BreakN)r   r   r   r   r   
break_typer   r   r   rW   rW   e           JJJr   rW   linepagecolumnc                       e Zd ZdS )TabN)r   r   r   r   r   r   r^   r^   n   s        Dr   r^   c                   h    e Zd Z ej                    Z ej                    Z ej                    ZdS )ImageN)r   r   r   r   r   alt_textcontent_typeopenr   r   r   r`   r`   s   s5        v|~~H6<>>L6<>>DDDr   r`   c                 P    |t          i           }|g }t          | ||          S )N)r   )Notesr   )r   r   r   s      r   documentrf   z   s2    }b		Heh7777r   c                 L    |t                      }t          | |||||          S )N)r!   r"   )paragraph_indentr   )r   r   r   r    r!   r"   s         r   	paragraphri      s.    ~!##XxY)\bccccr   c                 (    t          | |||          S )Nr%   r&   r'   r(   )r$   rk   s       r   rh   rh      s    CJPWXXXXr   c                     |	t           j        }	t          | ||t          |          t          |          t          |          t          |          t          |          t          |          |	|
||          S )Nr   r   r   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   )VerticalAlignmentbaseliner.   boolrm   s                r   runrq      s~     !.7Wy//,''.//%%=))-   r   c                       e Zd ZdZdZdZdS )rn   ro   superscript	subscriptN)r   r   r   ro   rs   rt   r   r   r   rn   rn      s        HKIIIr   rn   c                      t           S r   )_tabr   r   r   tabrw      s    Kr   c                 (    t          ||||           S )N)r>   r?   r@   r   )r=   )r   r>   r?   r@   s       r   	hyperlinkry      s    $vLS[\\\\r   c                   ,    e Zd Z ej                    ZdS )BookmarkN)r   r   r   r   r   namer   r   r   r{   r{      s        6<>>DDDr   r{   c                 &    t          | ||          S )Nr   r   r   )rE   r~   s      r   tabler      s    (X*MMMMr   c                 >    t          | t          |                    S )Nr   rH   )rG   rp   r   s     r   	table_rowr      s    XiAAAAr   c                 6    |d}|d}t          | ||          S )N   r   rK   rL   )rJ   r   s      r   
table_cellr      s+    hIIIIr   c                 (    t          | |||          S )Nr   rK   rL   rU   )rN   r   s       r   table_cell_unmergedr      s    hY_````r   c                 V    t          t          |           t          |                    S r   )_NumberingLevelstrrp   )level_index
is_ordereds     r   numbering_levelr      s"    3{++T*-=-=>>>r   c                   J    e Zd Z ej                    Z ej                    ZdS )r   N)r   r   r   r   r   r   r   r   r   r   r   r      s(        &,..KJJJr   r   c                   h    e Zd Z ej                    Z ej                    Z ej                    ZdS )NoteN)r   r   r   r   r   	note_typenote_idbodyr   r   r   r   r      s5        IflnnG6<>>DDDr   r   c                   ,    e Zd Zd Zd Zd Zd Zd ZdS )re   c                     || _         d S r   _notes)r   r   s     r   __init__zNotes.__init__   s    r   c                      | j         ||f         S r   r   )r   r   r   s      r   	find_notezNotes.find_note   s    {Iw/00r   c                 B    |                      |j        |j                  S r   )r   r   r   )r   	references     r   resolvezNotes.resolve   s    ~~i193DEEEr   c                 L    t          |t                    o| j        |j        k    S r   )
isinstancere   r   r   others     r   __eq__zNotes.__eq__   s     %''GDK5<,GGr   c                     | |k     S r   r   r   s     r   __ne__zNotes.__ne__   s    EM""r   N)r   r   r   r   r   r   r   r   r   r   r   re   re      se          1 1 1F F FH H H# # # # #r   re   c                 N    t          t          d | D                                 S )Nc              3   8   K   | ]}t          |          |fV  d S r   )	_note_key).0notes     r   	<genexpr>znotes.<locals>.<genexpr>   sA         
4$     r   )re   dict)
notes_lists    r   r   r      s<             r   c                     | j         | j        fS r   )r   r   )r   s    r   r   r      s    NDL))r   c                   J    e Zd Z ej                    Z ej                    ZdS )NoteReferenceN)r   r   r   r   r   r   r   r   r   r   r   r      s(        IflnnGGGr   r   c                       e Zd Z ej                    Z ej                    Z ej                    Z ej                    ZdS )CommentN)	r   r   r   r   r   
comment_idr   author_nameauthor_initialsr   r   r   r   r     sB        J6<>>D&,..K"flnnOOOr   r   c                 (    t          | |||          S )Nr   r   r   r   )r   r   s       r   commentr     s%    '	   r   c                   ,    e Zd Z ej                    ZdS )CommentReferenceN)r   r   r   r   r   r   r   r   r   r   r     rY   r   r   c                 8    t          j        t          |           S )Nargs)r   rQ   r   r   s    r   element_visitorr     s    >'----r   )NN)NNNNN)NNNN)NNNNNNNNNNNN)NNNr   )6r   objectr   r   datar   r   r$   r*   r.   r:   r=   rB   checkboxrE   rG   rJ   rN   rW   
line_break
page_breakcolumn_breakr^   r`   rf   ri   rh   rq   rn   textrv   rw   imagery   r{   bookmarkr   r   r   r   r   r   r   r   re   r   r   r   note_referencer   r   r   comment_referencer   r   r   r   <module>r      s
   + + + + +f + + +
    '        {                f        V        +        7    " " " " " " " "
     w             K           {            
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+          G       U6]]
U6]]
uX 	 	 	 	 	' 	 	 	     G   8 8 8 8d d d dY Y Y Y
 	   B       
 
suu   	] ] ] ]     w    N N N NB B B BJ J J Ja a a? ? ?          f           7    # # # # #F # # #   * * *     G     % % % % %f % % %             w       % . . . . .r   