
    q"h$              
          S SK JrJrJrJr  SSKJrJr  SSKJ	r	J
r
JrJr  SSKJr  SSKJr  SSKJr  SSKJrJrJr  SS	KJr  \\\\\4   r " S
 S\5      r\S:X  Ga  S SKJr  S SKJ r   S SK!J"r"  S SK#J$r$  S SK%J&r&  \&" SS/S9r'\'RQ                  SSSS9  \'RQ                  SSS9  \'RQ                  SSSS9  \'RS                  S S!S"5        \'RS                  S#S$S%5        \'RS                  S&S'S(5        \'RS                  S)S*S+5        S,r*\$" \*S-S.SS/9r+\ " S05      r,\" S1SSS29r-\-R]                  S3S4S59r/\/R]                  S6S7S59r0\0R]                  \" S8\+5      5        \0R]                  \" S9\"" \,SS:95      5        \/R]                  S;S<S59r1S\1l2        \"Rf                  " S=S4S:9r4\1R]                  \" S>\45      5        \1R]                  \" S?\'5      5        \	" 5       r\Rk                  \-5        g@g@)A    )IteratorListOptionalTuple   )
loop_first	loop_last)ConsoleConsoleOptionsRenderableTypeRenderResult)JupyterMixin)Measurement)Segment)Style
StyleStack	StyleType)Styledc                       \ rS rSrSrSr/ SQrSSSSSS	.S
\S\S\S\	S\	S\	SS4S jjr
SSSSS.S
\S\\   S\\   S\	S\\	   SS 4S jjr      SS jr      SS jrSrg)Tree   a  A renderable for a tree structure.

Attributes:
    ASCII_GUIDES (GuideType): Guide lines used when Console.ascii_only is True.
    TREE_GUIDES (List[GuideType, GuideType, GuideType]): Default guide lines.

Args:
    label (RenderableType): The renderable or str for the tree label.
    style (StyleType, optional): Style of this tree. Defaults to "tree".
    guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
    expanded (bool, optional): Also display children. Defaults to True.
    highlight (bool, optional): Highlight renderable (if str). Defaults to False.
    hide_root (bool, optional): Hide the root node. Defaults to False.
)    z|   z+-- z`-- ))r   u   │   u
   ├── u
   └── )r   u   ┃   u
   ┣━━ u
   ┗━━ )r   u   ║   u
   ╠══ u
   ╚══ treez	tree.lineTF)styleguide_styleexpanded	highlight	hide_rootlabelr   r   r   r   r   returnNc                Z    Xl         X l        X0l        / U l        X@l        XPl        X`l        g N)r   r   r   childrenr   r   r   )selfr   r   r   r   r   r   s          G/var/www/html/env/lib/python3.13/site-packages/pip/_vendor/rich/tree.py__init__Tree.__init__%   s*     

&$& ""    r   r   r   r   c                    [        UUc  U R                  OUUc  U R                  OUUUc  U R                  OUS9nU R                  R                  U5        U$ )a  Add a child tree.

Args:
    label (RenderableType): The renderable or str for the tree label.
    style (StyleType, optional): Style of this tree. Defaults to "tree".
    guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
    expanded (bool, optional): Also display children. Defaults to True.
    highlight (Optional[bool], optional): Highlight renderable (if str). Defaults to False.

Returns:
    Tree: A new child Tree, which may be further modified.
r)   )r   r   r   r   r#   append)r$   r   r   r   r   r   nodes          r%   addTree.add7   sX    *  %$**5,7,?(([(1(9dnny
 	T"r(   c           
   #   :  ^ ^^#    / nUR                   nUR                  n[        R                  " 5       nUR                  n[
        R                  " 5       nU" T R                  SS9=(       d    Un	[        S5      u  pp[        mS[        S[
        S[        4UUU 4S jjnU" X5      /nU" [        [        T /5      5      5        [        U" T R                  5      5      n[        U" T R                  5      5      n[        SSS	9nS
nU(       Ga  U" 5       n [        U5      u  nnU" U5        U(       a!  U" XS   R                  =(       d    U5      US'   UR                   U" UR                  5      -   n	UR                   U" UR                  5      -   nUT R"                  (       a  SOSS  nUR%                  ['        UR(                  U5      TR+                  TR,                  [/        S U 5       5      -
  T R0                  S S9TR2                  S LS9nUS
:X  a  T R"                  (       d  [5        U5       H{  u  nnU(       a#  TR7                  UUR8                  US9 S h  vN   U S h  vN   Uv   U(       d  MG  U(       d  MP  U" U(       a  U
OUUS   R                  =(       d    U5      US'   M}     UR:                  (       a  UR<                  (       a  U" U(       a  U
OUUS   R                  =(       d    U5      US'   UR                  U" [?        UR<                  5      S:X  a  UOUU	5      5        URA                  U" UR                  5      5        URA                  U" UR                  5      5        U" [        [        UR<                  5      5      5        US-  nU(       a  GM  g g ! [         a_    UR                  5         U(       aC  US   R                  =(       d    Un	U" X5      US'   UR                  5         UR                  5          GM  f = f GN GN7f)N )default   indexr   r    c                    > TR                   (       a  TR                  U    nOMUR                  (       a  SOUR                  (       a  SOSnTR                  TR
                  (       a  SOU   U    nT" X!5      $ )z.Make a Segment for a level of the guide lines.r      r   )
ascii_onlyASCII_GUIDESbold
underline2TREE_GUIDESlegacy_windows)r3   r   lineguide_Segmentoptionsr$   s       r%   
make_guide)Tree.__rich_console__.<locals>.make_guidee   s^    !!((/"ZZ53C3Ca''W-C-COPUVD((r(   F)r8   r9   r   r5   r   c              3   8   #    U  H  oR                   v   M     g 7fr"   )cell_length).0levels     r%   	<genexpr>(Tree.__rich_console__.<locals>.<genexpr>   s     @++s   )widthr   height)pad)
post_style)!popr+   r   r<   	get_styler   nullr   rangeintiterr	   r   r   nextStopIterationcurrentr   render_linesr   r   update	max_widthsumr   justifyr   apply_stylebackground_styler   r#   lenpush)r$   consoler?   stackrM   r^   new_linerN   
null_styler   SPACECONTINUEFORKENDr@   levelsguide_style_stackstyle_stackremove_guide_stylesdepth
stack_nodelastr,   r   prefixrenderable_linesfirstr<   r>   s   ` `                         @r%   __rich_console__Tree.__rich_console__V   s     46ii||<<>%%	ZZ\
 0 0"=K%*1X"	)c 	)% 	)G 	) 	) ",H!B CT)TF#$%&y1A1A'BC 4::!67#5AJ	!*-
d 'BZ-=-=-KLr
+33i@P@P6QQK'')DJJ*??E$..Qa:;F&33tzz5)!++@@@A"nn	   OO4/  4 	  QJ4>>#-.>#?KE4#+#7#7"!22': $8 $  
  $OO"Nu%/%)Ex9I9I9WZ&r
 $@ }}'!Ex1A1A1OZr
 c$--&8A&=s4U   4::!67!&&y1A1A'BCT)DMM234
o e ! 

"(*"2"2"@jK!+D!>F2J%))+OO%:
 $s]   DPN) $D:PP	P(P)P:PD!P'P)A$PPPPPc                     [        U /5      /nUR                  nUR                  nSnSn[        R                  nSn	U(       a  U" 5       n
 [        U
5      nU" U
5        U" XUR                  5      u  pU	S-  n[        X-   U5      n[        X-   U5      nUR                  (       a1  UR                  (       a   U" [        UR                  5      5        U	S-  n	U(       a  M  [        Xg5      $ ! [         a	    U	S-  n	 M  f = f)Nr   r   r2   )rR   rM   r+   r   getrS   rT   r   maxr   r#   )r$   r_   r?   r`   rM   r^   minimummaximummeasurerF   	iter_treer   min_measuremax_measureindents                  r%   __rich_measure__Tree.__rich_measure__   s     (,TF|nii||//II O'.w'L$KQYF+.8G+.8G}}T$--()
 e 7,, ! 
s   C* *C=<C=)r#   r   r   r   r   r   r   )r_   r
   r?   r   r    r   )r_   r
   r?   r   r    r   )__name__
__module____qualname____firstlineno____doc__r7   r:   r   r   boolr&   r   r-   rq   r}   __static_attributes__ r(   r%   r   r      s	    4LK "!,## 	#
 # # # # 
#, &*+/$) 	"	
 i(  D> 
>X X+;X	Xt- -+;-	-r(   r   __main__)Group)Markdown)Panel)Syntax)Tabler0   dim)
row_stylesReleasedcyanT)r   no_wrapTitlemagenta)r   z
Box Officerightgreen)rZ   r   zDec 20, 2019z Star Wars: The Rise of Skywalkerz$952,110,690zMay 25, 2018zSolo: A Star Wars Storyz$393,151,347zDec 15, 2017z!Star Wars Ep. V111: The Last Jediz$1,332,539,889zDec 16, 2016zRogue One: A Star Wars Storyz$1,332,439,889zmclass Segment(NamedTuple):
    text: str = ""
    style: Optional[Style] = None
    is_control: bool = False
pythonmonokai)themeline_numbersz=### example.md
> Hello, World!
>
> Markdown _all_ the things
u   🌲 [b green]Rich Tree)r   r   z:file_folder: Renderablesred)r   z!:file_folder: [bold yellow]Atomiczuu greenu   📄 Syntaxu   📄 Markdown)border_stylez&:file_folder: [bold magenta]Containerszbold magentazJust a panelu   📄 Panelsu   📄 [b magenta]TableN)6typingr   r   r   r   _loopr   r	   r_   r
   r   r   r   jupyterr   rx   r   segmentr   r   r   r   r   styledr   str	GuideTyper   r   pip._vendor.rich.consoler   pip._vendor.rich.markdownr   pip._vendor.rich.panelr   pip._vendor.rich.syntaxr   pip._vendor.rich.tabler   table
add_columnadd_rowcodesyntaxmarkdownrootr-   r,   simple_nodecontainers_noder   fitpanelprintr   r(   r%   <module>r      s   2 2 ( J J !    / / #sC$%	{-< {-| z.2,.,b%[)E	Zvt<	WI.	\7'B	MM."DnU	MM.";^L	MM."EGWX	MM."@BRSD D()$GF	H )TTJD88/U8CD((>J(WKOOE-01OOE/5+PQRhh0n  O  $OIIn59EmU345u=>iGMM$k r(   