+
     h6  c            	       s2   ^ RI HtHt ^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
HtHtHtHtHtHtHtH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 ^RI H!t! ^RI"H#t# ^RI$H%t%H&t& ^RI'H(t( ^RI)H*t* ]
'       d   ^ RI+H,t,  ! R R]4      t-]R]#3,          t.]R]-3,          t/ ! R R]04      t1 ! R R]14      t2 ! R R4      t3 ! R R]4      t4 ! R R]44      t5 ! R R]44      t6]& ! R  R4      4       t7]8R!8X  Ed   ^ R"I9Ht ]! 4       t]7! 4       t:]:Pw                  ]7! R#^R$7      ]7! ^R%R&7      ]7! ^
R'R(7      4       ]:R%,          Py                  ]7! R)R*7      ]7! R+^R,7      4       ]:R+,          Py                  ]7! R-^R,7      ]7! R.R*7      4       ]:R.,          Pw                  ]7! R/R*7      ]7! R0R*7      ]7! R1R*7      4       ]:R),          Pw                  ]7! ]:Pz                  R2R*7      ]7! R3R*7      4       ]:R-,          P}                  R44       ]P                  ]:4       R5# R5# )6    )ABCabstractmethod)islice)
itemgetter)RLock)	TYPE_CHECKINGDictIterableList
NamedTupleOptionalSequenceTupleUnion)ratio_resolve)Align)ConsoleConsoleOptionsRenderableTypeRenderResult)ReprHighlighter)Panel)Pretty)Region)Result	rich_repr)Segment	StyleTypeTreec                   s0   a  ] tR t^ t o RtV 3R ltRtV tR# )LayoutRenderzAn individual layout render.c                sR   < V ^8  d   Qh/ S[ ;R&   S[S[S[,          ,          ;R&   # )   regionrender)r   r	   r   format__classdict__   "</usr/lib/python3.14/site-packages/pip/_vendor/rich/layout.py__annotate__ZLayoutRender.__annotate__    s'      N  g	      N)__name__
__module____qualname____firstlineno____doc____annotate_func____static_attributes____classdictcell__r&      @r(   r    r        s     &  r*   r    Layoutc                   s    ] tR t^+tRtRtR# )LayoutErrorzLayout related error.r+   Nr,   r-   r.   r/   r0   r2   r+   r*   r(   r7   r7   +   s    r*   r7   c                   s    ] tR t^/tRtRtR# )
NoSplitterz"Requested splitter does not exist.r+   Nr8   r+   r*   r(   r9   r9   /   s    ,r*   r9   c                   sZ   a  ] tR t^3t o Rt]! 4       tRV 3R lR lltV 3R lR ltRt	V t
R# )	_Placeholderz4An internal renderable used as a Layout placeholder.c                (   < V ^8  d   QhRRRS[ RR/# )r!   layoutr6   stylereturnNr   r$   r'   r(   r)   _Placeholder.__annotate__8   s"      x 	 4 r*   c                s    Wn         W n        R # Nr<   r=   )selfr<   r=      &&&r(   __init__Z_Placeholder.__init__8   s    
r*   c                ,   < V ^8  d   QhRS[ RS[RS[/# r!   consoleoptionsr>   r   r   r   r$   r'   r(   r)   r?   <   s%     
 

)7
	
r*   c              #  s  "   VP                   pVP                  ;'       g    VP                  P                  pV P                  pVP                  '       d   VP                  : R V RV R2MRV RV R2p\        \        P                  ! \        V4      RR7      V P                  V P                  V4      RVR7      x  R# 5i)	z (z x Z)Z(middle)ZverticalZblue)r=   titleZborder_styleheightN)	max_widthrL   sizer<   namer   r   Zcenterr   r=   highlighter)rB   rG   rH   widthrL   r<   rK   s   &&&    r(   __rich_console__Z_Placeholder.__rich_console__<   s      !!667<<#6#6 {{{ {{oRwc&3UG3vha( 	
 LL(;**""5)
 	
s   ACA+CrA   N) )r,   r-   r.   r/   r0   r   rP   rD   rR   r2   r3   r4   r5   r(   r:   r:   3   s$     >!#K 
 
r*   r:   c                   sl   a  ] tR t^Pt o RtRt]V 3R lR l4       t]V 3R lR l4       tV 3R lt	Rt
V tR	# )
SplitterzBase class for a splitter.rS   c                    < V ^8  d   QhRS[ /# r!   r>   strr$   r'   r(   r)   Splitter.__annotate__V   s     7 7s 7r*   c                    R# )z(Get the icon (emoji) used in layout.treeNr+   rB      &r(   get_tree_iconZSplitter.get_tree_iconU       r*   c          	      ^   < V ^8  d   QhRS[ R,          RS[RS[S[RS[3,          ,          /# r!   childrenr6   r"   r>   r   r   r   r   r$   r'   r(   r)   rY   Z   s9       *4:	%&()	*r*   c                rZ   )zDivide a region amongst several child layouts.

Args:
    children (Sequence(Layout)): A number of child layouts.
    region (Region): A rectangular region to divide.
Nr+   )rB   ra   r"   rC   r(   divideZSplitter.divideY   r^   r*   c                s&   < V ^8  d   Qh/ S[ ;R&   # )r!   rO   rW   r$   r'   r(   r)   rY   P   s      N r*   r+   N)r,   r-   r.   r/   r0   rO   r   r]   rc   r1   r2   r3   r4   r5   r(   rT   rT   P   s:     $D7 7    r*   rT   c                   sL   a  ] tR t^et o RtRtV 3R lR ltV 3R lR ltRtV t	R# )	RowSplitterz!Split a layout region in to rows.rowc                rU   rV   rW   r$   r'   r(   r)   RowSplitter.__annotate__j   s     & &s &r*   c                    R # )u   [layout.tree.row]⬌r+   r[   r\   r(   r]   ZRowSplitter.get_tree_iconj   s    %r*   c          	      r_   r`   rb   r$   r'   r(   r)   rf   m   s9     	" 	" *	"4:	"	%&()	*	"r*   c              #  s   "   Vw  r4rV\        WQ4      p^ p\        p	\        W4       F   w  rW! W8,           WKV4      3x  W,          pK"  	  R# 5ir    Nr   r   zip)rB   ra   r"   xyrQ   rL   Zrender_widthsoffset_RegionchildZchild_width   &&&         r(   rc   ZRowSplitter.dividem   sU      %e%e6"%h">EQVDDD!F #?   A
Ar+   N
r,   r-   r.   r/   r0   rO   r]   rc   r2   r3   r4   r5   r(   rd   rd   e   s!     +D& &	" 	"r*   rd   c                   sL   a  ] tR t^yt o RtRtV 3R lR ltV 3R lR ltRtV t	R# )	ColumnSplitterz$Split a layout region in to columns.columnc                rU   rV   rW   r$   r'   r(   r)   ColumnSplitter.__annotate__~   s     ) )s )r*   c                rg   )u   [layout.tree.column]⬍r+   r[   r\   r(   r]   ZColumnSplitter.get_tree_icon~   s    (r*   c          	      r_   r`   rb   r$   r'   r(   r)   ru      s9     	# 	# *	#4:	#	%&()	*	#r*   c              #  s   "   Vw  r4rV\        Wa4      p^ p\        p	\        W4       F   w  rW! W4V,           W[4      3x  W,          pK"  	  R# 5irh   ri   )rB   ra   r"   rk   rl   rQ   rL   Zrender_heightsrm   rn   ro   Zchild_heightrp   r(   rc   ZColumnSplitter.divide   sV      %e&v8#&x#@EJDDD"F $Arq   r+   Nrr   r4   r5   r(   rs   rs   y   s!     .D) )	# 	#r*   rs   c                   s  a  ] tR t^t o RtR]R]/tR1RRRRR^R^R	R
/V 3R lR llltV 3R lR lt	]
V 3R lR l4       t]
V 3R lR l4       t]
V 3R lR l4       tV 3R lR ltV 3R lR lt]
V 3R lR l4       tRR/V 3R lR lltV 3R lR ltV 3R  lR! ltV 3R" lR# ltV 3R$ lR% ltV 3R& lR' ltV 3R( lR) ltV 3R* lR+ ltV 3R, lR- ltV 3R. lR/ ltR0tV tR# )2r6   a"  A renderable to divide a fixed height in to rows or columns.

Args:
    renderable (RenderableType, optional): Renderable content, or None for placeholder. Defaults to None.
    name (str, optional): Optional identifier for Layout. Defaults to None.
    size (int, optional): Optional fixed size of layout. Defaults to None.
    minimum_size (int, optional): Minimum size of layout. Defaults to 1.
    ratio (int, optional): Optional ratio for flexible layout. Defaults to 1.
    visible (bool, optional): Visibility of layout. Defaults to True.
re   rt   NrO   rN   minimum_sizeratiovisibleTc                sr   < V ^8  d   QhRS[ S[,          RS[ S[,          RS[ S[,          RS[RS[RS[RR/# )	r!   
renderablerO   rN   rv   rw   rx   r>   N)r   r   rX   intZboolr$   r'   r(   r)   Layout.__annotate__   s^      ^, sm	
 sm    
r*   c               s    T;'       g    \        V 4      V n        W0n        W@n        WPn        W n        W`n        V P                  R ,          ! 4       V n        . V n	        / V n
        \        4       V n        R# )rt   N)r:   _renderablerN   rv   rw   rO   rx   	splitterssplitter	_children_render_mapr   _lock)rB   ry   rO   rN   rv   rw   rx   s   &&$$$$$r(   rD   ZLayout.__init__   s^     &;;d);	(
	"&..":"<')&(W
r*   c                rU   rV   )r   r$   r'   r(   r)   r{      s     % %v %r*   c              #  s   "   R V P                   R3x  RV P                  R3x  RV P                  ^3x  RV P                  ^3x  R# 5i)rO   NrN   rv   rw   )rO   rN   rv   rw   r[   r\   r(   __rich_repr__ZLayout.__rich_repr__   sK     dii%%dii%%d//22tzz1$$s   AA	c                rU   rV   r   r$   r'   r(   r)   r{      s     < <N <r*   c                sB    V P                   '       d   V # V P                  # )zLayout renderable.)r   r|   r[   r\   r(   ry   ZLayout.renderable   s     ~~~t;4+;+;;r*   c                s.   < V ^8  d   QhRS[ R,          /# )r!   r>   r6   )r	   r$   r'   r(   r)   r{      s     D D$x. Dr*   c                sj    V P                    Uu. uF  qP                  '       g   K  VNK  	  up# u upi )zGets (visible) layout children.)r   rx   )rB   ro      & r(   ra   ZLayout.children   s&     $(>>C>%]]>CCCs   00c                rU   rV   )	RenderMapr$   r'   r(   r)   r{      s        Y  r*   c                s    V P                   # )zGet a map of the last render.)r   r[   r\   r(   mapZ
Layout.map   s     r*   c                s4   < V ^8  d   QhRS[ RS[R,          /# r!   rO   r>   r6   )rX   r   r$   r'   r(   r)   r{      s         2 r*   c                s    V P                   V8X  d   V # V P                   F  pVP                  V4      pVf   K  Vu # 	  R# )zGet a named layout, or None if it doesn't exist.

Args:
    name (str): Name of layout.

Returns:
    Optional[Layout]: Layout instance or None if no layout was found.
N)rO   r   get)rB   rO   ro   Znamed_layouts   &&  r(   r   Z
Layout.get   sA     99K$yy+'' ( r*   c                $   < V ^8  d   QhRS[ RR/# r   rW   r$   r'   r(   r)   r{      s        r*   c                sN    V P                  V4      pVf   \        RV: 24      hV# )NzNo layout with name )r   KeyError)rB   rO   r<   s   && r(   __getitem__ZLayout.__getitem__   s,    $>1$:;;r*   c                   < V ^8  d   QhRR/# )r!   r>   r   r+   r$   r'   r(   r)   r{      s     $ $f $r*   c                s   aaaa ^ RI Ho ^ RIHo ^ RIHp V3R lVV3R lloT pV! S! V4      RVP                  P                   2RR7      pR	 VV3R
 lloS! W04       V# )z/Get a tree renderable to show layout structure.)Styled)Tabler   c                s"   < V ^8  d   QhRRRS/# )r!   r<   r6   r>   r+   )r%   r   r'   r(   r)   !Layout.tree.<locals>.__annotate__   s     
	 
	H 
	 
	r*   c                 s   < V P                   P                  4       pSP                  RR7      pV P                  '       d   \	        V 4      MS! \	        V 4      R4      pVP                  W4       TpV# )r    )ZpaddingZdim)r    i   r    r    )r~   r]   Zgridrx   r   Zadd_row)r<   ZiconZtableZtextZ_summaryr   r   s   &    r(   summaryZLayout.tree.<locals>.summary   s`    ??002DJJ|J4E #)...vfVF^U6S  MM$%HOr*   layout.tree.T)guide_styleZ	highlightc                s$    V ^8  d   QhRRRRRR/# )r!   treer   r<   r6   r>   Nr+   )r%   s   "r(   r)   r      s!     	 	& 	( 	t 	r*   c                 s   < VP                    F:  pS! V P                  S! V4      R VP                  P                   2R7      V4       K<  	  R# )r   )r   N)r   Zaddr~   rO   )r   r<   ro   recurser   s   && r(   r   ZLayout.tree.<locals>.recurse   sM    ))HH&25>>3F3F2G$H    *r*   )Zpip._vendor.rich.styledr   Zpip._vendor.rich.tabler   pip._vendor.rich.treer   r~   rO   )rB   r   r<   r   r   r   r   r   s   &   @@@@r(   r   ZLayout.tree   sa     	30.
	 
	 FO&v';';&<=
	 	 	r*   r~   c                sT   < V ^8  d   QhRS[ RS[3,          RS[ S[S[3,          RR/# )r!   layoutsr6   r~   r>   N)r   r   rT   rX   r$   r'   r(   r)   r{     s<     % %.01% #&% 
	%r*   c               s8   V Uu. uF&  p\        V\        4      '       d   TM
\        V4      NK(  	  pp \        V\        4      '       d   TMV P                  V,          ! 4       V n        Y@P                  R&   R# u upi   \
         d    \        RT: 24      hi ; i)zSplit the layout in to multiple sub-layouts.

Args:
    *layouts (Layout): Positional arguments should be (sub) Layout instances.
    splitter (Union[Splitter, str]): Splitter instance or name of splitter.
zNo splitter called NNNN)
isinstancer6   rT   r}   r~   r   r9   r   )rB   r~   r   r<   _layoutss   &$*  r(   splitZLayout.split  s     "
! !00FfVnD! 	 
	A h11 ^^H-/ M %q
  	A28,?@@	As   ,A95A> >Bc                8   < V ^8  d   QhRS[ RS[3,          RR/# r!   r   r6   r>   Nr   r   r$   r'   r(   r)   r{     s%     ( (%.(@"A (d (r*   c                sN    R V 4       pV P                   P                  V4       R# )zAdd a new layout(s) to existing split.

Args:
    *layouts (Union[Layout, RenderableType]): Positional arguments should be renderables or (sub) Layout instances.

c              3   sh   "   T F(  p\        V\        4      '       d   TM
\        V4      x  K*  	  R # 5ir@   )r   r6   )Z.0r<   r   r(   Z	<genexpr>Z#Layout.add_split.<locals>.<genexpr>%  s,      
! !00FfVnD!s   02N)r   extend)rB   r   r   s   &* r(   	add_splitZLayout.add_split  s%    
!
 	h'r*   c                r   r   r   r$   r'   r(   r)   r{   +  s%     - -%.(@"A -d -r*   c                *    V P                   ! VRR/  R# )zSplit the layout in to a row (layouts side by side).

Args:
    *layouts (Layout): Positional arguments should be (sub) Layout instances.
r~   re   Nr   rB   r      &*r(   	split_rowZLayout.split_row+  s     	

G,e,r*   c                r   r   r   r$   r'   r(   r)   r{   3  s%     0 0U8^+C%D 0 0r*   c                r   )zSplit the layout in to a column (layouts stacked on top of each other).

Args:
    *layouts (Layout): Positional arguments should be (sub) Layout instances.
r~   rt   Nr   r   r   r(   split_columnZLayout.split_column3  s     	

G/h/r*   c                r   )r!   r>   Nr+   r$   r'   r(   r)   r{   ;  s       r*   c                s     V P                   R R# )zReset splits to initial state.r   N)r   r[   r\   r(   unsplitZLayout.unsplit;  s    NN1r*   c                r   )r!   ry   r>   Nr   r$   r'   r(   r)   r{   ?  s     * * *D *r*   c                st    V P                   ;_uu_ 4        Wn        RRR4       R#   + '       g   i     R# ; i)zRUpdate renderable.

Args:
    renderable (RenderableType): New renderable object.
N)r   r|   )rB   ry   s   &&r(   updateZLayout.update?  s     ZZZ) ZZZs   &7	c                r;   )r!   rG   r   layout_namer>   NrW   r$   r'   r(   r)   r{   H  s"     5 5i 5c 5d 5r*   c           	     sT   V P                   ;_uu_ 4        W,          pV P                  V,          w  rEVw  rgrVP                  W1P                  P	                  W4      4      p
\        WJ4      V P                  V&   VP                  WV4       RRR4       R#   + '       g   i     R# ; i)zRefresh a sub-layout.

Args:
    console (Console): Console instance where Layout is to be rendered.
    layout_name (str): Name of layout.
N)r   r   render_linesrH   update_dimensionsr    Zupdate_screen_lines)rB   rG   r   r<   r"   Z_linesrk   rl   rQ   rL   liness   &&&        r(   refresh_screenZLayout.refresh_screenH  s     ZZZ&F!--f5NF$*!Q5((99%HE (4F'BDV$''!4 ZZZs   A7BB'	c                s,   < V ^8  d   QhRS[ RS[ RS[/# )r!   rQ   rL   r>   )rz   	RegionMapr$   r'   r(   r)   r{   Y  s"      c 3 9 r*   c                s   V \        ^ ^ W4      3.pVP                  pVP                  p. pVP                  pV'       d[   V! V! 4       4       VR,          w  rVP                  p
V
'       g   K6  VP                  P                  W4       F  pV! V4       K  	  Kb  \        V\        ^4      R7       UU	u/ uF  w  rWbK	  	  ppp	V# u up	pi )z,Create a dict that maps layout on to Region.)Zkeyi)r   Zappendpopra   r~   rc   Zsortedr   )rB   rQ   rL   ZstackZpushr   layout_regionsZappend_layout_regionr<   r"   ra   Zchild_and_region
region_map   &&&          r(   _make_region_mapZLayout._make_region_mapY  s    /3VAq%5P.Q-R||ii68-44 '+B/NFHx(.(>(>x(P$)* )Q
 #)Z]"K
"K N"K 	 
 	
s   2Cc                rE   rF   )r   r   r   r$   r'   r(   r)   r{   n  s"      g  9 r*   c                s   VP                   pVP                  ;'       g    VP                  pV P                  W44      pVP                  4        UUu. uF  w  rgVP                  '       d   K  Wg3NK  	  ppp/ p	VP
                  p
VP                  pV F@  w  rgV
! VP                  V! VP                  VP                  4      4      p\        W|4      W&   KB  	  V	# u uppi )zRender the sub_layouts.

Args:
    console (Console): Console instance.
    options (ConsoleOptions): Console options.

Returns:
    RenderMap: A dict that maps Layout on to a tuple of Region, lines
)
rM   rL   r   Zitemsra   r   r   ry   rQ   r    )rB   rG   rH   Zrender_widthZrender_heightr   r<   r"   r   
render_mapr   r   r   r   r(   r#   ZLayout.rendern  s     ((88'..**<G
 #-"2"2"4
"4?? V"4 	 

 68
++#55,NF !!#4V\\6==#QE ".f!<J	 -
 
s   C,Cc                rE   rF   rI   r$   r'   r(   r)   r{     s%      )7	r*   c              #  s  "   V P                   ;_uu_ 4        VP                  ;'       g    VP                  pVP                  ;'       g    VP                  pV P	                  WP                  W44      4      pWPn        \        V4       Uu. uF  p. NK  	  pp\        pVP                  4        F>  w  rV	w  rr\        V! W|W,           4      V
4       F  w  ppVP                  V4       K  	  K@  	  \        P                  ! 4       pV F  pT R j  xL
  Vx  K  	  R R R 4       R # u upi  L  + '       g   i     R # ; i5ir@   )r   rM   rQ   rL   r#   r   r   Zranger   Zvaluesrj   r   r   line)rB   rG   rH   rQ   rL   r   Z_Zlayout_linesZ_islicer"   r   Z_xrl   Z_layout_widthZlayout_heightre   r   Znew_lineZ
layout_rows   &&&                r(   rR   ZLayout.__rich_console__  s     ZZZ%%66E^^55w~~FW.G.G.VWJ)=B6]0K]]L0KG!+!2!2!46<3}!$LQ->?"IC JJt$" "5 ||~H*
%%% + Z
 1L &! ZZsB   E3D-A D-D&A9D-D+
D-
E&D--D>	8	E)
r   r   r   r|   rv   rO   rw   rN   r~   rx   r@   )r,   r-   r.   r/   r0   rd   rs   r}   rD   r   Zpropertyry   ra   r   r   r   r   r   r   r   r   r   r   r   r   r#   rR   r2   r3   r4   r5   r(   r6   r6      s5    	 X~>I #	
 #    *% % < < D D     $  $ $L% *2% %2( (- -0 0 * *5 5" * : r*   Z__main__)r   Zheader)rO   rN   Zmain)rw   rO   Zfooter)rN   rO   Zside)rO   Zbody)rO   rw   ZcontentZs2ZtoprJ   ZbottomZleft1Zleft2ZfooN)@Zabcr   r   Z	itertoolsr   Zoperatorr   Z	threadingr   Ztypingr   r   r   r	   r
   r   r   r   r   Z_ratior   Zalignr   rG   r   r   r   r   rP   r   Zpanelr   Zprettyr   r"   r   Zreprr   r   Zsegmentr   r=   r   r   r   r    r   r   Z	Exceptionr7   r9   r:   rT   rd   rs   r6   r,   Zpip._vendor.rich.consoler<   r   r   r   r   Zprintr+   r*   r(   <module>r      s   #   
 
 
 "  J J (    #  * :   6!"	<'(	 )  - -
 
:s *"( "(#X #( Q Q Qh z0iGXF
H1%QV$BX& 6NV0&fA2NO
6NV!<f$>OP
4LEF16x3H 6Nv{{ A6wCWX
9U#MM&1 r*   