ó
    ‰*£hñ  ã                  ó¤   • S r SSKJr  SSKrSSKJrJr  SSKJ	r	  \(       a  SSK
JrJr  SSKJr  SSKJr  SS	KJr   " S
 S5      r " S S\	5      rg)z?Collection providing access to comments added to this document.é    )ÚannotationsN)ÚTYPE_CHECKINGÚIterator)ÚBlockItemContainer)Ú
CT_CommentÚCT_Comments)ÚCommentsPart)ÚParagraphStyle)Ú	Paragraphc                  óN   • \ rS rSrSrS
S jrSS jrSS jrSSS jjrSS jr	Sr
g	)ÚCommentsé   z:Collection containing the comments added to this document.c                ó   • Xl         X l        g ©N©Ú_comments_elmÚ_comments_part)ÚselfÚcomments_elmÚcomments_parts      ÚJ/home/mande/repo/quber/.venv/lib/python3.13/site-packages/docx/comments.pyÚ__init__ÚComments.__init__   s   € Ø)ÔØ+Õó    c                óD   ^ • U 4S jT R                   R                   5       $ )z.Iterator over the comments in this collection.c              3  óP   >#   • U  H  n[        UTR                  5      v •  M     g 7fr   )ÚCommentr   )Ú.0Úcomment_elmr   s     €r   Ú	<genexpr>Ú$Comments.__iter__.<locals>.<genexpr>   s(   øé € ð 
â=�ô �K ×!4Ñ!4×5Ð5Ú=ùs   ƒ#&)r   Úcomment_lst©r   s   `r   Ú__iter__ÚComments.__iter__   s!   ø€ ô
à#×1Ñ1×=Ò=ó
ð 	
r   c                ó@   • [        U R                  R                  5      $ )z*The number of comments in this collection.)Úlenr   r"   r#   s    r   Ú__len__ÚComments.__len__   s   € ä�4×%Ñ%×1Ñ1Ó2Ð2r   c                ó¾  • U R                   R                  5       nX$l        X4l        [        R
                  R                  [        R                  R                  5      Ul	        [        X@R                  5      nUS:X  a  U$ [        UR                  S5      5      n[        U5      nUR                  S   nUR!                  U5        U H  n	UR#                  U	S9  M     U$ )a:  Add a new comment to the document and return it.

The comment is added to the end of the comments collection and is assigned a unique
comment-id.

If `text` is provided, it is added to the comment. This option provides for the common
case where a comment contains a modest passage of plain text. Multiple paragraphs can be
added using the `text` argument by separating their text with newlines (`"\\n"`).
Between newlines, text is interpreted as it is in `Document.add_paragraph(text=...)`.

The default is to place a single empty paragraph in the comment, which is the same
behavior as the Word UI when you add a comment. New runs can be added to the first
paragraph in the empty comment with `comments.paragraphs[0].add_run()` to adding more
complex text with emphasis or images. Additional paragraphs can be added using
`.add_paragraph()`.

`author` is a required attribute, set to the empty string by default.

`initials` is an optional attribute, set to the empty string by default. Passing |None|
for the `initials` parameter causes that attribute to be omitted from the XML.
Ú Ú
r   ©Útext)r   Úadd_commentÚauthorÚinitialsÚdtÚdatetimeÚnowÚtimezoneÚutcÚdater   r   ÚiterÚsplitÚnextÚ
paragraphsÚadd_runÚadd_paragraph)
r   r.   r0   r1   r   ÚcommentÚpara_text_iterÚfirst_para_textÚ
first_paraÚss
             r   r/   ÚComments.add_comment#   sº   € ð, ×(Ñ(×4Ñ4Ó6ˆØ#ÔØ'ÔÜŸ;™;Ÿ?™?¬2¯;©;¯?©?Ó;ˆÔÜ˜+×':Ñ':Ó;ˆà�2‹:ØˆNä˜dŸj™j¨Ó.Ó/ˆä˜~Ó.ˆØ×'Ñ'¨Ñ*ˆ
Ø×Ñ˜?Ô+ãˆAØ×!Ñ! qÐ!Ó)ñ  ð ˆr   c                ól   • U R                   R                  U5      nUb  [        X R                  5      $ S$ )zFReturn the comment identified by `comment_id`, or |None| if not found.N)r   Úget_comment_by_idr   r   )r   Ú
comment_idr   s      r   ÚgetÚComments.getM   s4   € à×(Ñ(×:Ñ:¸:ÓFˆØ<GÑ<SŒw�{×$7Ñ$7Ó8Ð]ÐY]Ð]r   r   N)r   r   r   r	   )ÚreturnzIterator[Comment]©rI   Úint)r+   r+   r+   )r.   Ústrr0   rL   r1   ú
str | NonerI   r   )rF   rK   rI   zComment | None)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r$   r(   r/   rG   Ú__static_attributes__© r   r   r   r      s    † ÙDô,ô
ô3ö(÷T^r   r   c                  óø   ^ • \ rS rSrSrSU 4S jjrSSU 4S jjjr\SS j5       r\R                  SS j5       r\SS j5       r
\SS j5       r\R                  SS	 j5       r\SS
 j5       r\SS j5       rSrU =r$ )r   éS   aS  Proxy for a single comment in the document.

Provides methods to access comment metadata such as author, initials, and date.

A comment is also a block-item container, similar to a table cell, so it can contain both
paragraphs and tables and its paragraphs can contain rich text, hyperlinks and images,
although the common case is that a comment contains a single paragraph of plain text like a
sentence or phrase.

Note that certain content like tables may not be displayed in the Word comment sidebar due to
space limitations. Such "over-sized" content can still be viewed in the review pane.
c                ó0   >• [         TU ]  X5        Xl        g r   )Úsuperr   Ú_comment_elm)r   r   r   Ú	__class__s      €r   r   ÚComment.__init__a   s   ø€ Ü‰Ñ˜Ô4Ø'Õr   c                óN   >• [         TU ]  X5      nUc  SUR                  l        U$ )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`.
When `style` is |None| or ommitted, the "CommentText" paragraph style is applied, which is
the default style for comments.
ÚCommentText)rX   r=   Ú_pÚstyle)r   r.   r_   Ú	paragraphrZ   s       €r   r=   ÚComment.add_paragraphe   s-   ø€ ô ‘GÑ)¨$Ó6ˆ	ð ‰=Ø!.ˆI�L‰LÔàÐr   c                ó.   • U R                   R                  $ )zmRead/write. The recorded author of this comment.

This field is required but can be set to the empty string.
©rY   r0   r#   s    r   r0   ÚComment.authoru   s   € ð × Ñ ×'Ñ'Ð'r   c                ó$   • XR                   l        g r   rc   ©r   Úvalues     r   r0   rd   }   s   € à#(×ÑÕ r   c                ó.   • U R                   R                  $ )z&The unique identifier of this comment.)rY   Úidr#   s    r   rF   ÚComment.comment_id�   s   € ð × Ñ ×#Ñ#Ð#r   c                ó.   • U R                   R                  $ )z¹Read/write. The recorded initials of the comment author.

This attribute is optional in the XML, returns |None| if not set. Assigning |None| removes
any existing initials from the XML.
©rY   r1   r#   s    r   r1   ÚComment.initials†   s   € ð × Ñ ×)Ñ)Ð)r   c                ó$   • XR                   l        g r   rl   rf   s     r   r1   rm   �   s   € à%*×ÑÕ"r   c                óF   • SR                  S U R                   5       5      $ )zÇThe text content of this comment as a string.

Only content in paragraphs is included and of course all emphasis and styling is stripped.

Paragraph boundaries are indicated with a newline (`"\\n"`)
r,   c              3  ó8   #   • U  H  oR                   v •  M     g 7fr   r-   )r   Úps     r   r    ÚComment.text.<locals>.<genexpr>›   s   é € Ð9ª AŸžªùs   ‚)Újoinr;   r#   s    r   r.   ÚComment.text“   s   € ð �y‰yÑ9¨¯ªÓ9Ó9Ð9r   c                ó.   • U R                   R                  $ )zpThe date and time this comment was authored.

This attribute is optional in the XML, returns |None| if not set.
)rY   r7   r#   s    r   Ú	timestampÚComment.timestamp�   s   € ð × Ñ ×%Ñ%Ð%r   )rY   )r   r   r   r	   )r+   N)r.   rL   r_   zstr | ParagraphStyle | NonerI   r   )rI   rL   )rg   rL   rJ   )rI   rM   )rg   rM   )rI   zdt.datetime | None)rN   rO   rP   rQ   rR   r   r=   Úpropertyr0   ÚsetterrF   r1   r.   rv   rS   Ú__classcell__)rZ   s   @r   r   r   S   s«   ø† ñ÷(÷ñ ð  ó(ó ð(ð ‡]�]ó)ó ð)ð ó$ó ð$ð ó*ó ð*ð ‡_�_ó+ó ð+ð ó:ó ð:ð ó&ó ö&r   r   )rR   Ú
__future__r   r3   r2   Útypingr   r   Údocx.blkcntnrr   Údocx.oxml.commentsr   r   Údocx.parts.commentsr	   Údocx.styles.styler
   Údocx.text.paragraphr   r   r   rT   r   r   Ú<module>r‚      s?   ðÙ Eå "ã ß *å ,æß:Ý0Ý0Ý-÷?^ñ ?^ôDP&Ð õ P&r   