+
    Q(i>e                         ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIHtHtH	t	H
t
 ^ RIHt ^ RIHt ]'       d5   ^ RIHt ^ RIHtHtHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^ RIHt ^ RIH t   ! R R4      t! ! R R4      t" ! R R4      t# ! R R4      t$] ! R R4      4       t%]%! ]$! 4       RR^RR7      t&]%! ]!! 4       RRRR7      t']%! ]#! 4       R RR!R"7      t(R# R$ lt)R% R& lt*] ! R' R(4      4       t+] ! R) R*4      4       t,R# )+    N)Iterable)
attrgetter)TYPE_CHECKINGLiteralOptionalUnionevolve)frozen)Box)ConsoleConsoleOptionsRenderableType)PaddingDimensionsPanel)	StyleTypeTable)	HelpEntry)Rendererc                   L   a  ] tR t^t o RtRV 3R lR lltV 3R lR ltRtV tR# )	NameRendererzRenderer for parameter/command names with optional text wrapping.

Parameters
----------
max_width : int | None
    Maximum width for wrapping. If None, no wrapping is applied.
Nc                .   < V ^8  d   QhRS[ R,          /#    	max_widthNint)format__classdict__s   "Y/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/cyclopts/help/specs.py__annotate__NameRenderer.__annotate__         # ##* #    c                    Wn         R# zInitialize the renderer with formatting options.

Parameters
----------
max_width : int | None
    Maximum width for wrapping. If None, no wrapping is applied.
Nr   selfr   s   &&r"   __init__NameRenderer.__init__    	     #r&   c                "   < V ^8  d   QhRRRR/# r   entryr   returnr    )r    r!   s   "r"   r#   r$   *   s     " "k ".> "r&   c                    RP                  VP                  4      pV P                  f   V# \        P                  ! VV P                  RR^R7      pRP                  V4      # )a*  Render the names column with optional text wrapping.

Parameters
----------
entry : HelpEntry
    The table entry to render.

Returns
-------
~rich.console.RenderableType
    Combined names and shorts, optionally wrapped.
    Order: positive_names, positive_shorts, negative_names, negative_shorts
   Fsubsequent_indentbreak_on_hyphenstabsize
)joinall_optionsr   textwrapwrap)r+   r1   textwrappeds   &&  r"   __call__NameRenderer.__call__*   sY     xx))*>>!K--NN""
 yy!!r&   r)   N	__name__
__module____qualname____firstlineno____doc__r,   rB   __static_attributes____classdictcell__r!   s   @r"   r   r      s     # #" "r&   r   c                   L   a  ] tR t^Ht o RtRV 3R lR lltV 3R lR ltRtV tR# )	CommandNameRendererzRenderer for command names with aliases in parentheses.

Displays commands in argparse-style format: ``primary (alias1, alias2)``.

Parameters
----------
max_width : int | None
    Maximum width for wrapping. If None, no wrapping is applied.
Nc                .   < V ^8  d   QhRS[ R,          /# r   r   )r    r!   s   "r"   r#    CommandNameRenderer.__annotate__S   r%   r&   c                    Wn         R# r(   r)   r*   s   &&r"   r,   CommandNameRenderer.__init__S   r.   r&   c                "   < V ^8  d   QhRRRR/# r0   r3   )r    r!   s   "r"   r#   rQ   ]   s      "  "k  ".>  "r&   c                X   VP                   '       d   VP                   ^ ,          MRp\        VP                   R,          4      pV'       d   V RRP                  V4       R2pMTpV P                  f   V# \        P
                  ! VV P                  RR^R7      pR	P                  V4      # )
zRender command name with aliases in parentheses.

Parameters
----------
entry : HelpEntry
    The table entry to render.

Returns
-------
~rich.console.RenderableType
    Primary command name with aliases in parentheses.
 :   NNz (, )r6   Fr7   r;   )r=   listr<   r   r>   r?   )r+   r1   primaryaliasesr@   rA   s   &&    r"   rB   CommandNameRenderer.__call__]   s     +0*;*;*;%##A&u((,-Yb7!3 4A6DD>>!K--NN""
 yy!!r&   r)   rD   rE   rM   s   @r"   rO   rO   H   s     # # "  "r&   rO   c                   L   a  ] tR t^t o RtRV 3R lR lltV 3R lR ltRtV tR# )	DescriptionRenderera  Renderer for descriptions with configurable metadata formatting.

Parameters
----------
newline_metadata : bool
    If True, display metadata (choices, env vars, defaults) on separate lines.
    If False (default), display metadata inline with the description.
c                    < V ^8  d   QhRS[ /# )r   newline_metadata)bool)r    r!   s   "r"   r#    DescriptionRenderer.__annotate__   s     1 1 1r&   c                    Wn         R# )zInitialize the renderer with formatting options.

Parameters
----------
newline_metadata : bool
    If True, display metadata on separate lines instead of inline.
Nra   )r+   ra   s   &&r"   r,   DescriptionRenderer.__init__   s
     !1r&   c                "   < V ^8  d   QhRRRR/# r0   r3   )r    r!   s   "r"   r#   rc      s      K Kk K.> Kr&   c                    ^ RI Hp ^ RIHp VP                  pVf   V! V! 4       4      pMS\        WC4      '       gC   \        VP                  R4      '       d
   V! V4      pM^ RI Hp V! V! \        V4      4      4      p. pVP                  '       d8   RP                  VP                  4      pVP                  V! RV R2R4      4       VP                  '       d8   RP                  VP                  4      pVP                  V! RV R2R4      4       VP                  e'   VP                  V! R	VP                   R2R4      4       VP                  '       d   VP                  V! R
R4      4       V P                  '       ds   V'       dk   ^ RIHp ^ RI Hp . p	VP"                  '       d   V	P                  VP"                  4       V F  p
V	P                  V
4       K  	  V	'       d   V! V	!  # V! 4       # V F  p
VP                  V
4       K  	  V# )a?  Render parameter description with metadata annotations.

Enriches the base description with choices, environment variables,
default values, and required status.

Parameters
----------
entry : HelpEntry
    The table entry to render.

Returns
-------
~rich.console.RenderableType
    Description with appended metadata.
)Text)
InlineText__rich_console__rX   z
[choices: ]dimz
[env var: z
[default: z
[required]zdim red)Group)	rich.textri   cyclopts.help.inline_textrj   description
isinstancehasattrstrchoicesr<   appendenv_vardefaultrequiredra   rich.consolern   primary_renderable)r+   r1   ri   rj   rq   metadata_itemschoices_strenv_vars_str	RichGrouprenderablesitems   &&         r"   rB   DescriptionRenderer.__call__   s     	#8''$TV,KK44u((*<==(5 +(c+.>)?@ ===))EMM2K!!$*[M'CU"KL===99U]]3L!!$*\N!'De"LM==$!!$*U]]O1'Eu"MN>>>!!$}i"@A    ^7& K ---"";#A#AB '""4( ' /:9k*EtvE '""4( ' r&   re   N)FrE   rM   s   @r"   r_   r_      s      1 1K Kr&   r_   c                   6   a  ] tR t^t o RtV 3R lR ltRtV tR# )AsteriskRendererz~Renderer for required parameter asterisk indicator.

A simple renderer that displays an asterisk (*) for required parameters.
c                "   < V ^8  d   QhRRRR/# r0   r3   )r    r!   s   "r"   r#   AsteriskRenderer.__annotate__   s     - -k -.> -r&   c                .    VP                   '       d   R# R# )zRender an asterisk for required parameters.

Parameters
----------
entry : HelpEntry
    The table entry to render.

Returns
-------
~rich.console.RenderableType
    An asterisk if the entry is required, empty string otherwise.
*rV   ry   )r+   r1   s   &&r"   rB   AsteriskRenderer.__call__   s     nnns,",r&   r3   N)rF   rG   rH   rI   rJ   rB   rK   rL   rM   s   @r"   r   r      s     
- -r&   r   c                      a  ] tR t^t o Rt Rt Rt Rt Rt Rt	 Rt
 Rt Rt Rt Rt Rt Rt Rt Rt V 3R lR	 ltR
 tV 3R ltRtV tR# )
ColumnSpeca  Specification for a single column in a help table.

Used by :class:`~cyclopts.help.formatters.default.DefaultFormatter` to define
how individual columns are rendered in help tables. Each column can have its
own renderer, styling, and layout properties.

See Also
--------
~cyclopts.help.formatters.default.DefaultFormatter : The formatter that uses these specs.
~cyclopts.help.specs.TableSpec : Specification for the entire table.
~cyclopts.help.specs.PanelSpec : Specification for the outer panel.
rV   NlefttopellipsisFc                "   < V ^8  d   QhRRRR/# r0   r3   )r    r!   s   "r"   r#   ColumnSpec.__annotate__  s     . .+ .2B .r&   c                    \        V P                  \        4      '       d   \        V P                  4      ! V4      pM/\	        V P                  4      '       d   V P                  V4      pMRpVf   R# T# )zRender the cell content based on the renderer type.

If renderer is a string, retrieves that attribute from the entry.
If renderer is callable, calls it with the entry.
NrV   )rr   rendererrt   r   callable)r+   r1   values   && r"   _render_cellColumnSpec._render_cell  sY     dmmS))t}}-e4Edmm$$MM%(EE]r--r&   c                    \        V 3/ VB # rD   r	   r+   kwargss   &,r"   copyColumnSpec.copy      d%f%%r&   c                |  < V ^8  d   Qh/ S[ S[R3,          ;R&   S[;R&   S[;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R	&   S[R,          ;R
&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[;R&   S[R,          ;R&   # )r   r   r   headerfooterr   header_stylefooter_stylestylejustifyverticaloverflowNwidth	min_widthr   rationo_wrap	highlight)rx   r   centerrightfull)r   middlebottom)foldcropr   ignore)r   rt   r   r   r   rb   )r    r!   s   "r"   r#   r      s"     CO$$ J K d e ~ ;'. J ;'.K V K 'W b ABKc n /08o z :;H{ F :G R Tz S ^ Tz _ j :k v w B d{!C r&   r3   )rF   rG   rH   rI   rJ   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   __annotate_func__rK   rL   rM   s   @r"   r   r      s     * F
 F
 +/L
 +/L
 $(E
 FLG
 49H
 ?IH
 E
 !I
 !I
 E
 G
 "I
. .&k  r&   r   rV   r   zred bold)r   r   r   r   r   Optioncyan)r   r   r   r   Descriptionr   )r   r   r   r   c          
      `    V ^8  d   QhRRRRR\         R,          R\        \        R3,          /# 	r   consoler   optionsr   entriesr   r2   .rZ   tupler   )r    s   "r"   r#   r#     s:      !1<@<M
:s?r&   c                    \         P                  ! V P                  R,          4      p\        \	        VR7      RRRVR7      pV\
        3# )al  Get default column specifications for command display.

Parameters
----------
console : ~rich.console.Console
    Rich console for width calculations.
options : ~rich.console.ConsoleOptions
    Console rendering options.
entries : list[HelpEntry]
    Command entries to display.

Returns
-------
tuple[ColumnSpec, ...]
    Column specifications for command table.
ffffff?r)   Commandr   r   r   r   r   r   r   )mathceilr   r   rO   DescriptionColumn)r   r   r   r   command_columns   &&&  r"   get_default_command_columnsr     sK    & 		'--$./I$y9N 	 r&   c          
      `    V ^8  d   QhRRRRR\         R,          R\        \        R3,          /# r   r   )r    s   "r"   r#   r#     s:     &
 &
&
!1&
<@<M&

:s?&
r&   c                "   \         P                  ! V P                  R,          4      p\        \	        VR7      RRRVR7      p\
        ;QJ d    R V 4       F  '       g   K   RM	  R	M! R V 4       4      '       d   \        V\        3# V\        3# )
ar  Get default column specifications for parameter display.

Parameters
----------
console : ~rich.console.Console
    Rich console for width calculations.
options : ~rich.console.ConsoleOptions
    Console rendering options.
entries : list[HelpEntry]
    Parameter entries to display.

Returns
-------
tuple[ColumnSpec, ...]
    Column specifications for parameter table.
r   r)   r   r   r   r   c              3   8   "   T F  qP                   x  K  	  R # 5irD   r   ).0xs   & r"   	<genexpr>0get_default_parameter_columns.<locals>.<genexpr>  s     
'w!::ws   TF)r   r   r   r   r   anyAsteriskColumnr   )r   r   r   r   name_columns   &&&  r"   get_default_parameter_columnsr     s    & 		'--$./I	2K s
'w
'sss
'w
'''
 	
 
 	
r&   c                      a  ] tR tRt o RtRt Rt Rt Rt Rt	 Rt
 Rt Rt Rt Rt Rt Rt Rt Rt Rt Rt Rt Rt V 3R lR ltR tV 3R	 ltR
tV tR# )	TableSpeci  a   Specification for table layout and styling.

Used by :class:`~cyclopts.help.formatters.default.DefaultFormatter` to control
the appearance of tables that display commands and parameters. This spec defines
table-wide properties like borders, headers, and padding.

See Also
--------
~cyclopts.help.formatters.default.DefaultFormatter : The formatter that uses these specs.
~cyclopts.help.specs.ColumnSpec : Specification for individual columns.
~cyclopts.help.specs.PanelSpec : Specification for the outer panel.
NFTc                L   < V ^8  d   QhRS[ S[R3,          RS[R,          RR/# )r   columns.r   r   r2   r   )r   r   r   )r    r!   s   "r"   r#   TableSpec.__annotate__k  s<     P Pz3'P +&P
 
Pr&   c                   V P                   pV'       d=   \        ;QJ d    R V 4       F  '       d   K   RM	  RM! R V 4       4      '       d   Rp/ RV P                  bRV P                  bRV P                  bRV P
                  bRV P                  bR	V P                  bR
V P                  bRVbRV P                  bRV P                  bRV P                  bRV P                  bRV P                  bRV P                  bRV P                  bRV P                   bRV P"                  bRV P$                  /CpVP'                  V4       ^ RIHp V! R / VB pV F  pRVP,                  RVP.                  RVP                  R	VP                  RVP                  RVP0                  RVP2                  RVP4                  RVP                   RVP"                  RVP6                  RVP8                  RVP:                  /p	VP<                  e   VP<                  V	R&   VP>                  ! R / V	B  K  	  V F2  p
V Uu. uF  qPA                  V
4      NK  	  ppVPB                  ! V!   K4  	  V# u upi )!aM  Construct and populate a rich.Table.

Parameters
----------
columns : tuple[ColumnSpec, ...]
    Column specifications defining the table structure.
entries : Iterable[HelpEntry]
    Table entries to populate the table with.
**overrides
    Per-render overrides for table settings.

Returns
-------
Table
    A populated Rich Table.
c              3   B   "   T F  qP                   '       * x  K  	  R # 5irD   )r   )r   cols   & r"   r   "TableSpec.build.<locals>.<genexpr>  s     A#::~~s   FTtitlecaptionr   border_styler   r   boxshow_headershow_footer
show_lines	show_edgeexpandpad_edgepaddingcollapse_paddingr   r   safe_boxr   r   r   r   r   r   r   r   r   r   r3   )"r   allr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   update
rich.tabler   r   r   r   r   r   r   r   r   r   
add_columnr   add_row)r+   r   r   	overridesr   optsr   tablecolumncol_optser   cellss   &&&,         r"   buildTableSpec.buildk  s|   0 &&33AA333AAAAK
TZZ
t||
 TZZ
 D--	

 D--
 D--
 488
 ;
 4++
 $//
 
 dkk
 
 t||
  5 5
  TZZ!
" #
$ %
( 	I$ F&--&-- 3 3 3 36>>FOOFOOV--V--6>>H +(.(8(8%(x(% * A4;<GS%%a(GE<MM5!   =s   2I#c                    \        V 3/ VB # rD   r	   r   s   &,r"   r   TableSpec.copy  r   r&   c                |  < V ^8  d   Qh/ S[ R,          ;R&   S[ R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[R	,          ;R
&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R&   R;R&   S[;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   # )r   Nr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )rt   r   rb   r   )r    r!   s   "r"   r#   r     s9      :! , 4Z- 8 K '9 D ;'.E P ;'.Q \ ;'.] h 
%i t u @ A L M X Y d e p q | !/} H "I T :U ` Tz a l Tk m r&   r3   )r   r   r   r   )rF   rG   rH   rI   rJ   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rK   rL   rM   s   @r"   r   r     s      E
 G
 $(E
 +/L
 +/L
 +/L
  C
 K
 K
 J
 I
 F
 H
 $0G
 #
 E
 !I
 !H
P Pd&]  r&   r   c                      a  ] tR tRt o RtRt Rt Rt Rt Rt	 Rt
 Rt Rt Rt Rt Rt Rt Rt V 3R	 lR
 ltR tV 3R ltRtV tR# )	PanelSpeci  a  Specification for panel (outer box) styling.

Used by :class:`~cyclopts.help.formatters.default.DefaultFormatter` to control
the appearance of the outer panel that wraps help sections. This spec defines
the panel's border, title, subtitle, and overall styling.

See Also
--------
~cyclopts.help.formatters.default.DefaultFormatter : The formatter that uses these specs.
~cyclopts.help.specs.TableSpec : Specification for the inner table.
~cyclopts.help.specs.ColumnSpec : Specification for individual columns.
Nr   r   noneTFc                "   < V ^8  d   QhRRRR/# )r   
renderabler   r2   r   r3   )r    r!   s   "r"   r#   PanelSpec.__annotate__   s     ) ) 0 )' )r&   c                   V P                   pVf	   ^ RIHp TpRV P                  RV P                  RV P
                  RV P                  RVRV P                  RV P                  R	V P                  R
V P                  RV P                  RV P                  /pV P                  e   V P                  VR&   V P                  e   V P                  VR&   TP                  V4       ^ RIHp V! V3/ VB # )zKCreate a Panel around `renderable`. Use kwargs to override spec per render.)ROUNDEDtitle_alignsubtitle_alignr   r   r   r   r   r   heightr   r   r   subtitler   )r   rich.boxr  r  r  r   r   r   r   r   r  r   r   r   r  r   
rich.panelr   )r+   r   r   r   r  r   r   s   &&,    r"   r   PanelSpec.build   s     hh;(C 4++d11TZZD--3t||dkkTZZdkk
 ::! JJDM==$#}}DI$Z(4((r&   c                    \        V 3/ VB # rD   r	   r   s   &,r"   r   PanelSpec.copyA  r   r&   c                @  < V ^8  d   Qh/ S[ R,          ;R&   S[ R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[ R,          ;R&   S[ R,          ;R&   S[ R	,          ;R
&   R;R&   S[;R&   S[R,          ;R&   S[R,          ;R&   S[R,          ;R&   S[;R&   # )r   r   r   r  r  r  r   r   r   r   r   r   r   r   Nr   r  r   r   )r   r   r   )r   r   rb   r   )r    r!   s   "r"   r#   r     s       $%,! , '(/- 8 23<9 D 56AE P K )Q \ ;'0] h 
%i v !)w B C N :O Z $J[ f Tk g r s r&   r3   )r   rW   )rF   rG   rH   rI   rJ   r   r  r  r  r   r   r   r   r   r   r  r   r   r   r   r   rK   rL   rM   s   @r"   r   r     s      )-E
 ,0H
 7=K
 :BN
 $*E
 +1L
  C $*G
 F
 E
 F
 !H
 I
) )B&A  r&   r   )-r   r>   collections.abcr   operatorr   typingr   r   r   r   attrsr
   cyclopts.utilsr   r  r   rz   r   r   r   rich.paddingr   r  r   
rich.styler   r   r   cyclopts.helpr   cyclopts.help.protocolsr   r   rO   r_   r   r   r   
NameColumnr   r   r   r   r   r3   r&   r"   <module>r     s     $  : :  !DD. $ '0." ."b5" 5"p_ _D- -, U& U& U&r 

 ^
	
 (;(=m]cntu D&
R N& N& N&b @& @& @&r&   