+
    Q(i                         R t ^ RIt^ RIHt ]P                  R8  d   ^ RIHt M^ RIHt ]'       d   ^ RIHt ^ RI	H
t
  ! R R4      tR# )	z@InlineText class for rich text rendering with appended metadata.N)TYPE_CHECKING)Self)RenderableTypeTextc                   z   a  ] tR t^t o RR/V 3R lR llt]RRRR/V 3R lR ll4       tV 3R lR	 ltR
 tRt	V t
R# )
InlineTextforce_empty_endFc                   < V ^8  d   QhRR/# )   primary_renderabler    )format__classdict__s   "_/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/cyclopts/help/inline_text.py__annotate__InlineText.__annotate__   s     / /+; /    c               ,    Wn         . V n        W n        R # N)r   textsr	   )selfr   r	   s   &&$r   __init__InlineText.__init__   s    "4
.r   show_errorsc          
      F   < V ^8  d   QhRS[ R,          RS[ RS[RS[RS[/# )r   contentNr   r	   r   return)strboolr   )r   r   s   "r   r   r      sH     "H "Ht"H "H
 "H "H 
"Hr   c               X   Vf   ^ RI Hp V! RR7      pMVR8X  d   ^ RI Hp V! VP                  4       4      pMjVR9   d   ^ RIHp V! V4      pMTVR9   d   ^ RIHp ^ RIHp	 V	! V4      p
V! WR7      pM/VR	8X  d   ^ RI Hp VP                  ! V4      pM\        R
V R24      hV ! WcR7      # )Nr    end	plaintext)Markdown)RestructuredText)process_sphinx_directives)r   richzUnknown help_format "")r	   )markdownmd)restructuredtextrst)	rich.textr   rstriprich.markdownr%   rich_rstr&   cyclopts.help.rst_preprocessorr'   from_markup
ValueError)clsr   r   r	   r   r   r   r%   r&   r'   processed_contents   &&&$$      r   from_formatInlineText.from_format   s     ?&!%"{"&!%gnn&6!7)).!)'!2221P 9' B!12C!]v&!%!1!1'!:4VHA>??%GGr   c                   < V ^8  d   QhRR/# )r   textr   r   )r   r   s   "r   r   r   ;   s        6  r   c                <    V P                   P                  V4       R # r   )r   append)r   r:   s   &&r   r<   InlineText.append;   s    

$r   c              #    "   ^ RI Hp ^ RIHp V P                  '       g   V P
                  '       g   R# . . reVP                  V P                  V4       FA  pVP                  R8X  d   VP                  Wg.,           4       . pK0  VP                  V4       KC  	  V'       d   VP                  V4       V'       gH   V P
                  '       d4   VP                  ! V P
                  !  pVP                  W4       Rj  xL
  R# VRR	  F  p	V	 F  pVx  K	  	  K  	  V'       Ed   VR	,          p
T
;'       d    V
R	,          P                  R8H  pV'       d   V
P                  4       MRpV
'       dE   V
R	,          pV! VP                  P                  4       VP                  VP                  R7      pWR	&   V! RRR7      pV
 F=  pVP                  '       g   K  VP                  VP                  VP                  4       K?  	  V! R4      pV P
                   F  pV'       d	   W,          pVV,          pK  	  \        VP                  W4      4      pV P                  '       dJ   VR	,          pV'       d9   VP                  P!                  R4      '       g   VP                  V! R4      4       V'       d   VP                  V4       T Rj  xL
  R# R#  EL L5i)
    )Segmentr   N
)stylecontrolr!   r"    )rich.segmentr@   r.   r   r   r   renderr:   r<   assemblepopr/   rB   rC   listr	   endswith)r   consoleoptionsr@   r   lines_of_segmentscurrent_linesegmentcombined_textline	last_linehas_newlinenewline_segmentlast_segmentlast_line_text	separatorr:   wrapped_segmentss   &&&               r   __rich_console__InlineText.__rich_console__>   sS    ("&&&tzzz +-b<~~d&=&=wGG||t#!((	)AB!##G, H $$\2 !zzz $tzz :">>-AAA &cr*D   + )"-I $BB	"(:(:d(BK1<immo$O (}& %%,,.&,,(00 
 !-" """-N$<<<"))',,F % S	I

!"/N$& #  $GNN>$KL###/3(9(9(B(B4(H(H$++GDM:  ''8'''S  Bf (sg   0KA-K!K:K.K:K;'K#K5KK.A"KB;KK0KK	KK)r	   r   r   N)__name__
__module____qualname____firstlineno__r   classmethodr7   r<   rZ   __static_attributes____classdictcell__)r   s   @r   r   r      s`     /PU / /
 "H
 !&"H ""H "H "HH   J( J(r   r   )      )__doc__systypingr   version_infor   typing_extensionsrich.consoler   r.   r   r   r   r   r   <module>rk      s7    F 
  w&+x( x(r   