§
    £”jÅ  ã                  óò   — U d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ ddlmZ er0dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dZde d<    G d„ de¦  «        Z!d	S )z¾Block item container, used by body, cell, header, etc.

Block level items are things like paragraph and table, although there are a few other
specialized ones like structured document tags.
é    )Úannotations)ÚTYPE_CHECKINGÚIterator)Ú	TypeAlias)ÚCT_Tbl)ÚCT_P)Ú
StoryChild©Ú	ParagraphN)Ú
CT_Comment)ÚCT_Body)Ú	CT_HdrFtr)ÚCT_Tc)ÚLength)ÚParagraphStyle©ÚTablez(CT_Body | CT_Comment | CT_HdrFtr | CT_Tcr   ÚBlockItemElementc                  óp   ‡ — e Zd ZdZdˆ fd„Zddd„Zdd„Zd d„Zed„ ¦   «         Z	ed„ ¦   «         Z
d„ Zˆ xZS )!ÚBlockItemContainera  Base class for proxy objects that can contain block items.

    These containers include _Body, _Cell, header, footer, footnote, endnote, comment,
    and text box objects. Provides the shared functionality to add a block item like a
    paragraph or table.
    Úelementr   Úparentút.ProvidesStoryPartc                óf   •— t          t          | ¦  «                             |¦  «         || _        d S )N)Úsuperr   Ú__init__Ú_element)Úselfr   r   Ú	__class__s      €ú\/var/www/finuniver-perm.ru/html/portfolio/venv/lib/python3.11/site-packages/docx/blkcntnr.pyr   zBlockItemContainer.__init__)   s-   ø€ ÝÕ  $Ñ'Ô'×0Ò0°Ñ8Ô8Ð8ØˆŒˆˆó    Ú NÚtextÚstrÚstyleústr | ParagraphStyle | NoneÚreturnr   c                ón   — |                       ¦   «         }|r|                     |¦  «         |�||_        |S )a>  Return paragraph newly added to the end of the content in this container.

        The paragraph has `text` in a single run if present, and is given paragraph
        style `style`.

        If `style` is |None|, no paragraph style is applied, which has the same effect
        as applying the 'Normal' style.
        )Ú_add_paragraphÚadd_runr%   )r   r#   r%   Ú	paragraphs       r    Úadd_paragraphz BlockItemContainer.add_paragraph-   sD   € ð ×'Ò'Ñ)Ô)ˆ	Øð 	$Ø×Ò˜dÑ#Ô#Ð#ØÐØ#ˆIŒOØÐr!   ÚrowsÚintÚcolsÚwidthr   r   c                ó†   — ddl m} t          j        |||¦  «        }| j                             |¦  «          ||| ¦  «        S )zÞReturn table of `width` having `rows` rows and `cols` columns.

        The table is appended appended at the end of the content in this container.

        `width` is evenly distributed between the table columns.
        r   r   )Ú
docx.tabler   r   Únew_tblr   Ú_insert_tbl)r   r-   r/   r0   r   Útbls         r    Ú	add_tablezBlockItemContainer.add_table=   sQ   € ð 	%Ð$Ð$Ð$Ð$Ð$åŒn˜T 4¨Ñ/Ô/ˆØŒ×!Ò! #Ñ&Ô&Ð&Øˆu�S˜$ÑÔÐr!   úIterator[Paragraph | Table]c              #  óš   K  — ddl m} | j        j        D ]5}t	          |t
          ¦  «        rt          || ¦  «        n ||| ¦  «        V — Œ6dS )zIGenerate each `Paragraph` or `Table` in this container in document order.r   r   N)r2   r   r   Úinner_content_elementsÚ
isinstancer   r   )r   r   r   s      r    Úiter_inner_contentz%BlockItemContainer.iter_inner_contentJ   su   è è € à$Ð$Ð$Ð$Ð$Ð$à”}Ô;ð 	dð 	dˆGÝ/9¸'Å4Ñ/HÔ/HÐb•9˜W dÑ+Ô+Ð+ÈeÈeÐT[Ð]aÑNbÔNbÐcÐcÐcÐcð	dð 	dr!   c                ó4   ‡ — ˆ fd„‰ j         j        D ¦   «         S )zcA list containing the paragraphs in this container, in document order.

        Read-only.
        c                ó0   •— g | ]}t          |‰¦  «        ‘ŒS © r
   )Ú.0Úpr   s     €r    ú
<listcomp>z1BlockItemContainer.paragraphs.<locals>.<listcomp>W   s#   ø€ Ð@Ð@Ð@ q•	˜!˜TÑ"Ô"Ð@Ð@Ð@r!   )r   Úp_lst©r   s   `r    Ú
paragraphszBlockItemContainer.paragraphsQ   s%   ø€ ð AÐ@Ð@Ð@¨D¬MÔ,?Ð@Ñ@Ô@Ð@r!   c                óD   ‡ ‡— ddl mŠ ˆˆ fd„‰ j        j        D ¦   «         S )z_A list containing the tables in this container, in document order.

        Read-only.
        r   r   c                ó(   •— g | ]} ‰|‰¦  «        ‘ŒS r>   r>   )r?   r5   r   r   s     €€r    rA   z-BlockItemContainer.tables.<locals>.<listcomp>a   s%   ø€ ÐBÐBÐB S���c˜4Ñ Ô ÐBÐBÐBr!   )r2   r   r   Útbl_lst)r   r   s   `@r    ÚtableszBlockItemContainer.tablesY   s:   øø€ ð 	%Ð$Ð$Ð$Ð$Ð$àBÐBÐBÐBÐB¨D¬MÔ,AÐBÑBÔBÐBr!   c                óP   — t          | j                             ¦   «         | ¦  «        S )zIReturn paragraph newly added to the end of the content in this container.)r   r   Úadd_prC   s    r    r)   z!BlockItemContainer._add_paragraphc   s    € å˜œ×,Ò,Ñ.Ô.°Ñ5Ô5Ð5r!   )r   r   r   r   )r"   N)r#   r$   r%   r&   r'   r   )r-   r.   r/   r.   r0   r   r'   r   )r'   r7   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r,   r6   r;   ÚpropertyrD   rH   r)   Ú__classcell__)r   s   @r    r   r   !   s×   ø€ € € € € ðð ð ð  ð  ð  ð  ð  ðð ð ð ð ð  ð  ð  ð  ðdð dð dð dð ðAð Añ „XðAð ðCð Cñ „XðCð6ð 6ð 6ð 6ð 6ð 6ð 6r!   r   )"rN   Ú
__future__r   Útypingr   r   Útyping_extensionsr   Údocx.oxml.tabler   Údocx.oxml.text.paragraphr   Údocx.sharedr	   Údocx.text.paragraphr   Ú
docx.typesÚtypesÚtÚdocx.oxml.commentsr   Údocx.oxml.documentr   Údocx.oxml.sectionr   r   r   Údocx.styles.styler   r2   r   r   Ú__annotations__r   r>   r!   r    ú<module>r`      s‚  ððð ð ð #Ð "Ð "Ð "Ð "Ð "à *Ð *Ð *Ð *Ð *Ð *Ð *Ð *à 'Ð 'Ð 'Ð 'Ð 'Ð 'à "Ð "Ð "Ð "Ð "Ð "Ø )Ð )Ð )Ð )Ð )Ð )Ø "Ð "Ð "Ð "Ð "Ð "Ø )Ð )Ð )Ð )Ð )Ð )àð !ØÐÐÐÐÐØ-Ð-Ð-Ð-Ð-Ð-Ø*Ð*Ð*Ð*Ð*Ð*Ø+Ð+Ð+Ð+Ð+Ð+Ø%Ð%Ð%Ð%Ð%Ð%Ø"Ð"Ð"Ð"Ð"Ð"Ø0Ð0Ð0Ð0Ð0Ð0Ø Ð Ð Ð Ð Ð àHÐ Ð HÐ HÐ HÑ HðD6ð D6ð D6ð D6ð D6˜ñ D6ô D6ð D6ð D6ð D6r!   