+
    i                         R t ^ RIHt ^ RIHt ^ RIHtHt ^ RIHtH	t	H
t
 ^ RIHtHt  ! R R]4      t ! R R	]4      tR
# )z
RichText definition
)copy)NUMERIC_TYPES)
InlineFontText)StrictStringTyped)Element
whitespacec                   b   a  ] tR t^t o Rt]! ]R7      t]! 4       t	R t
R tR tR tR tRtV tR	# )
	TextBlockzmRepresents text string in a specific format

This class is used as part of constructing a rich text strings.
)expected_typec                    Wn         W n        R # Nfonttext)selfr   r   s   &&&^/Users/agent/.openclaw/workspace/.venv/lib/python3.14/site-packages/openpyxl/cell/rich_text.py__init__TextBlock.__init__   s    		    c                v    V P                   VP                   8H  ;'       d    V P                  VP                  8H  # r   )r   r   )r   others   &&r   __eq__TextBlock.__eq__   s*    yyEJJ&BB499

+BBr   c                    V P                   # )zJust retun the text)r   r   s   &r   __str__TextBlock.__str__"   s    yyr   c                    V P                   \        4       8g  ;'       d    V P                   ;'       g    R pV P                  P                   RV P                   RV 2# )defaultz text=z, font=)r   r   	__class____name__r   )r   r   s   & r   __repr__TextBlock.__repr__'   sL    yyJL(66TYYCC)..))*&74&IIr   c                    \        R 4      pVP                  V P                  P                  RR7      4       \        R4      pV P                  Vn        \        V4       VP                  V4       V# )rrPr)tagnamet)r	   appendr   to_treer   r
   )r   elr*   s   &  r   r,   TextBlock.to_tree,   sT    S\
		$))##E#23CL1
		!	r   r   N)r#   
__module____qualname____firstlineno____doc__r   r   r   r   r   r   r   r   r$   r,   __static_attributes____classdictcell__)__classdict__s   @r   r   r      s=      z*D8D
C
J
 r   r   c                      a a ] tR t^<t oRtV 3R lt]R 4       t]R 4       t]R 4       t	V 3R lt
V 3R ltR tV 3R	 ltV 3R
 ltV 3R ltR tR tR tR tRtVtV ;t# )CellRichTexta  Represents a rich text string.

Initialize with a list made of pure strings or :class:`TextBlock` elements
Can index object to access or modify individual rich text elements
it also supports the + and += operators between rich text strings
There are no user methods for this class

operations which modify the string will generally call an optimization pass afterwards,
that merges text blocks with identical formats, consecutive pure text strings,
and remove empty strings and empty text blocks
c                  < \        V4      ^8X  dU   V^ ,          p\        V\        \        34      '       d   \        P                  V4       M.\        P                  V4       V.pM\        P                  V4       \        SV `!  V4       R# )   N)	len
isinstancelisttupler7   _check_rich_text_check_elementsuperr   )r   argsr"   s   &*r   r   CellRichText.__init__I   sf    t9>7D$u..--d3++D1v))$/r   c                d    \        V\        \        \        34      '       g   \	        R V 24      hR# )zIllegal CellRichText element N)r;   strr   r   	TypeError)clsvalues   &&r   r?   CellRichText._check_elementV   s/    %#y-!@AA;E7CDD Br   c                B    V F  p\         P                  V4       K  	  R # r   )r7   r?   )rF   	rich_textr*   s   && r   r>   CellRichText._check_rich_text\   s    A''* r   c                   \         P                  ! V4      pVP                  '       d   VP                  P                  R R4      3# . pVP                   F}  pRpVP                  '       d   VP                  P                  R R4      pVP
                  '       d(   VP                  \        VP
                  V4      4       Kl  VP                  V4       K  	  V ! V4      # )x005F_ )r   	from_treer*   replacer'   r(   r+   r   )rF   noder   sr'   r*   s   &&    r   rO   CellRichText.from_treea   s    ~~d#666FFNN8R022AAsssCCKK"-uuu155!,-  1vr   c                :  < R p\        \        4       4      pV  F  p\        V\        4      '       d   V'       g   K#  MVP                  '       g   K8  \        V4      \        V4      8X  da   \        V\        4      '       d   W,          pKq  VP                  VP                  8X  d&   V;P                  VP                  ,          un        K  V'       d   VP                  V4       TpK  	  V'       d   VP                  V4       \        SV `%  \        R 4      V4       V # r   )r7   r=   r;   rD   r   typer   r+   r@   __setitem__slice)r   last_tlr*   r"   s   &   r   _optCellRichText._opts   s    !A!S!! VVVF|tAw&a%%KF[[AFF*KK166)K F   HHVE$K+r   c                   < \         P                  V4       \        ST `  \	        V4       Uu. uF  p\        V4      NK  	  up4       V P                  4       # u upi r   )r7   r>   r@   __iadd__r<   r   rZ   )r   arger"   s   && r   r]   CellRichText.__iadd__   sF    %%c*4959a$q'956yy{ 6s   Ac                    \        \        V 4      \        V4      ,            Uu. uF  p\        V4      NK  	  up4      P                  4       # u upi r   )r7   r<   r   rZ   )r   r^   r_   s   && r   __add__CellRichText.__add__   s;    d4j49.DE.DT!W.DEFKKMMEs   Ac                p   < \         P                  V4       \        SV `  W4       V P	                  4        R # r   )r7   r?   r@   rV   rZ   )r   indxvalr"   s   &&&r   rV   CellRichText.__setitem__   s'    ##C(D&		r   c                P   < \         P                  V4       \        SV `  V4       R # r   )r7   r?   r@   r+   r   r^   r"   s   &&r   r+   CellRichText.append   s    ##C(sr   c                P   < \         P                  V4       \        SV `  V4       R # r   )r7   r>   r@   extendri   s   &&r   rl   CellRichText.extend   s    %%c*sr   c                P    R P                  RP                  R V  4       4      4      # )zCellRichText([{}])z, c              3   8   "   T F  p\        V4      x  K  	  R # 5ir   )repr).0rR   s   & r   	<genexpr>(CellRichText.__repr__.<locals>.<genexpr>   s     5Lt!d1ggts   )formatjoinr   s   &r   r$   CellRichText.__repr__   s"    #**4995Lt5L+MNNr   c                `    R P                  V  Uu. uF  p\        V4      NK  	  up4      # u upi )rN   )ru   rD   r   rR   s   & r   r   CellRichText.__str__   s'    ww-1A-..-s   +c                B    V  Uu. uF  p\        V4      NK  	  up# u upi )z^
Returns a list of the strings contained.
The main reason for this is to make editing easier.
)rD   rx   s   & r   as_listCellRichText.as_list   s     
 !%%1A%%%s   c                .   \        R4      pV  F  p\        V\        4      '       d"   VP                  VP	                  4       4       K:  \        R4      p\        R4      pW$n        \        V4       VP                  V4       VP                  V4       K  	  V# )z$
Return the full XML representation
isr'   r*   )r	   r;   r   r+   r,   r   r
   )r   	containerobjr-   r*   s   &    r   r,   CellRichText.to_tree   sy     DM	C#y))  / S\CL1		!  $  r    )r#   r/   r0   r1   r2   r   classmethodr?   r>   rO   rZ   r]   rb   rV   r+   rl   r$   r   r{   r,   r3   r4   __classcell__)r"   r5   s   @@r   r7   r7   <   s     

 E E
 + +  "4N

O/& r   r7   N)r2   r   openpyxl.compatr   openpyxl.cell.textr   r   openpyxl.descriptorsr   r   r   openpyxl.xml.functionsr	   r
   r   r<   r7   r   r   r   <module>r      s?     ) /  7" "VM4 Mr   