
    jJ                     n    d Z ddlZddlmZ ddlmZ ddlmZ  G d de          Z	 G d d	e          Z
dS )
zHeader and footer part objects.    N)CONTENT_TYPE)	parse_xml)	StoryPartc                   >    e Zd ZdZed             Zed             ZdS )
FooterPartzDefinition of a section footer.c                     |                     d          }t          j        }t          |                                           } | ||||          S )z!Return newly created footer part.z/word/footer%d.xml)next_partnameCT
WML_FOOTERr   _default_footer_xmlclspackagepartnamecontent_typeelements        [/lsinfo/ai/hellotax_ai/base_platform/venv/lib/python3.11/site-packages/docx/parts/hdrftr.pynewzFooterPart.new   N     (()=>>}C335566s8\7G<<<    c                    t           j                            t           j                            t                    d         ddd          }t          |d          5 }|                                }ddd           n# 1 swxY w Y   |S )z6Return bytes containing XML for a default footer part.r   ..	templateszdefault-footer.xmlrbNospathjoinsplit__file__openreadr   r   f	xml_bytess       r   r   zFooterPart._default_footer_xml        w||GMM(##A&k;O
 
 $ 	!I	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	!   A<<B B N)__name__
__module____qualname____doc__classmethodr   r    r   r   r   r   
   N        ))= = [=   [  r   r   c                   >    e Zd ZdZed             Zed             ZdS )
HeaderPartzDefinition of a section header.c                     |                     d          }t          j        }t          |                                           } | ||||          S )z!Return newly created header part.z/word/header%d.xml)r	   r
   
WML_HEADERr   _default_header_xmlr   s        r   r   zHeaderPart.new#   r   r   c                    t           j                            t           j                            t                    d         ddd          }t          |d          5 }|                                }ddd           n# 1 swxY w Y   |S )z6Return bytes containing XML for a default header part.r   r   r   zdefault-header.xmlr   Nr   r#   s       r   r3   zHeaderPart._default_header_xml+   r&   r'   N)r(   r)   r*   r+   r,   r   r3   r-   r   r   r0   r0       r.   r   r0   )r+   r   docx.opc.constantsr   r
   docx.oxml.parserr   docx.parts.storyr   r   r0   r-   r   r   <module>r8      s    % % 				 1 1 1 1 1 1 & & & & & & & & & & & &       ,         r   