
    q"h                        % S SK r S SKJrJr  S SKJr  S SKJr  S SKJ	r	J
r
JrJrJrJrJr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  SSKJrJr  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K)J*r*  SSK+J,r,J-r-  \	(       a  SSK.J/r/J0r0J1r1J2r2  Sr3S\4S'   Sr5S\4S'   \ Rl                  " S5      r7\\8S4   r9 \\8/\\-   4   r: " S S\5      r; " S S\&5      r<\=S:X  Ga  S S K>J/r/  \<" S!5      r?\?R                  S"/S#5        \?R                  S$/S%5        \/" 5       r.\.R                  S&5        \.R                  \?S'S(9  \.R                  5         \.R                  S)5        \.R                  \?S*S+S,9  \.R                  5         \.R                  S-5        \.R                  \?S.S/S,9  \.R                  5         \.R                  S05        \.R                  \?S1S2S,9  \.R                  5         gg)3    N)partialreduce)gcd)
itemgetter)TYPE_CHECKINGAnyCallableDictIterableList
NamedTupleOptionalPatternTupleUnion   )	loop_last)	pick_bool)divide_line)AlignMethod)cell_lenset_cell_size)Lines)strip_control_codes)EmojiVariant)JupyterMixin)Measurement)Segment)Style	StyleType)ConsoleConsoleOptionsJustifyMethodOverflowMethoddefaultr#   DEFAULT_JUSTIFYfoldr$   DEFAULT_OVERFLOWz\s+$Textc                       \ rS rSr% Sr\\S'    \\S'    \\\	4   \S'    S\4S jr
S\4S jrS	\S\S \S    4   4S
 jrS	\SS 4S jrS	\SS 4S jrS\SS 4S jrSrg)Span/   z A marked up region in some text.startendstylereturnc                 X    SU R                    SU R                   SU R                  < S3$ )NzSpan(z, ))r-   r.   r/   selfs    G/var/www/html/env/lib/python3.13/site-packages/pip/_vendor/rich/text.py__repr__Span.__repr__9   s)    tzzl"TXXJba@@    c                 4    U R                   U R                  :  $ N)r.   r-   r3   s    r5   __bool__Span.__bool__<   s    xx$**$$r8   offsetc                     XR                   :  a  U S4$ XR                  :  a  U S4$ U u  p#n[        U[        X15      U5      n[        UR                  X45      nXV4$ )z)Split a span in to 2 from a given offset.N)r-   r.   r+   min)r4   r=   r-   r.   r/   span1span2s          r5   split
Span.split?   sa     JJ:XX: EUC,e4UYY+|r8   c                 .    U u  p#n[        X!-   X1-   U5      $ )zMove start and end by a given offset.

Args:
    offset (int): Number of characters to add to start and end.

Returns:
    TextSpan: A new TextSpan with adjusted position.
r+   r4   r=   r-   r.   r/   s        r5   move	Span.moveL   s!     !EENCL%88r8   c                 F    U u  p#nX:  a  U $ [        U[        X5      U5      $ )zCrop the span at the given offset.

Args:
    offset (int): A value between start and end.

Returns:
    Span: A new (possibly smaller) span.
)r+   r?   rF   s        r5   
right_cropSpan.right_cropX   s,     !E=KE3v+U33r8   cellsc                 <    U(       a  U u  p#n[        X#U-   U5      $ U $ )zExtend the span by the given number of cells.

Args:
    cells (int): Additional space to add to end of span.

Returns:
    Span: A span.
rE   )r4   rL   r-   r.   r/   s        r5   extendSpan.extendf   s'      $EU{E22Kr8    N)__name__
__module____qualname____firstlineno____doc__int__annotations__r   strr   r6   boolr;   r   r   rB   rG   rJ   rN   __static_attributes__rP   r8   r5   r+   r+   /   s    *J	He)A# A%$ %C E&(62B*B$C 
93 
96 
94 4 4C F r8   r+   c                      \ rS rSrSr/ SQr  SSSSSSSS.S\S	\\\4   S
\	S   S\	S   S\	\
   S\S\	\   S\	\\      SS4S jjjrS\4S jrS\
4S jrS\4S jrS\4S jrS\SS 4S jrS\S\
4S jrS\S\
4S jrS\\\4   SS 4S jr\S\4S j5       r\S\4S j5       r\SS SSSSS!.S\S	\\\4   S"\
S#\	\   S
\	S   S\	S   S\SS 4S$ jj5       r\SSSSSS%S&.S\S	\\\4   S
\	S   S\	S   S\	\
   S\S\	\   SS 4S' jj5       r \ SSSS(.S\S	\!S
\	S   S\	S   SS 4
S) jjj5       r"\SSSSSS%SS*.S+\\S \#\\!4   4   S	\\\4   S
\	S   S\	S   S\	\
   S\S\S,\	\$\\4      SS 4S- jj5       r%\S\4S. j5       r&\&RN                  S/\SS4S0 j5       r&\S\\   4S1 j5       r(\(RN                  S\\   SS4S2 j5       r(SS3\SS 4S4 jjr)SS5 jr*  SS	\\\4   S6\S\	\   SS4S7 jjr+  SS	\\\4   S6\S\	\   SS4S8 jjr, SS,\$\\4   S6\S\	\   SS4S9 jjr-SS,\	\$\\4      S:\SS 4S; jjr.S<\SS4S= jr/S>S?S@\S\4SA jr0SB\SS4SC jr1 SSSD.SE\\2\   \4   S	\	\\3\!4      SF\S\4SG jjjr4S SH.SI\5\   S	\\\4   SJ\
S\4SK jjr6SSL jr7SM\SS4SN jr8SO\SS4SP jr9S>S?SQSRS\5\:   4SS jr;S>S?SQSRS\<4ST jr=SS>S?S\S\5SU   4SV jjr>SW\5S    SS 4SX jr?SS\	\   SS4SY jjr@SSZS[.S\\S\	S   S]\
SS4S^ jjrASS_ jrBSS`\Sa\SS4Sb jjrCSS`\Sa\SS4Sc jjrDSS`\Sa\SS4Sd jjrESSe\FSf\Sa\SS4Sg jjrG SS\S \4   S	\	\\Sh4      SS 4Si jjrHSSj jrISk\5\#\\	\!   4      SS 4Sl jrJSSm jrK SSZSZSn.So\Sp\
Sq\
S\L4Sr jjjrMSs\5\   S\L4St jrNSSu\SS4Sv jjrOSSS%SSw.S>S?Sf\S
\	S   S\	S   S\S\	\
   S\L4Sx jjrPSf\S\L4Sy jrQS\4Sz jrR SS{S|S}.S~\	\   Sa\S	\!SS 4S jjjrSSrTg)r)   v   a  Text with color / style.

Args:
    text (str, optional): Default unstyled text. Defaults to "".
    style (Union[str, Style], optional): Base style for text. Defaults to "".
    justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
    overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
    no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
    end (str, optional): Character to end text with. Defaults to "\\n".
    tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to None.
    spans (List[Span], optional). A list of predefined style spans. Defaults to None.
)	_textr/   justifyoverflowno_wrapr.   tab_size_spans_length N
)r^   r_   r`   r.   ra   spanstextr/   r^   r#   r_   r$   r`   r.   ra   rf   r0   c                    [        U5      n	U	/U l        X l        X0l        X@l        XPl        X`l        Xpl        U=(       d    / U l        [        U	5      U l
        g r:   )r   r]   r/   r^   r_   r`   r.   ra   rb   lenrc   )
r4   rg   r/   r^   r_   r`   r.   ra   rf   sanitized_texts
             r5   __init__Text.__init__   sM     -T2$%

294< "'+2/r8   c                     U R                   $ r:   )rc   r3   s    r5   __len__Text.__len__   s    ||r8   c                 ,    [        U R                  5      $ r:   )rY   rc   r3   s    r5   r;   Text.__bool__   s    DLL!!r8   c                     U R                   $ r:   plainr3   s    r5   __str__Text.__str__   s    zzr8   c                 \    SU R                   < SU R                  < SU R                  < S3$ )Nz<text  >)rt   rb   r/   r3   s    r5   r6   Text.__repr__   s)    

~Qt{{oQtzznAFFr8   otherc                     [        U[        [        45      (       a#  U R                  5       nUR	                  U5        U$ [
        $ r:   )
isinstancerX   r)   copyappendNotImplemented)r4   r{   results      r5   __add__Text.__add__   s5    ec4[))YY[FMM% Mr8   c                     [        U[        5      (       d  [        $ U R                  UR                  :H  =(       a    U R                  UR                  :H  $ r:   )r}   r)   r   rt   rb   r4   r{   s     r5   __eq__Text.__eq__   s:    %&&!!zzU[[(HT[[ELL-HHr8   c                     [        U[        5      (       a  XR                  ;   $ [        U[        5      (       a  UR                  U R                  ;   $ g)NF)r}   rX   rt   r)   r   s     r5   __contains__Text.__contains__   s?    eS!!JJ&&t$$;;$**,,r8   slicec                    ^  S[         SS4U 4S jjn[        U[         5      (       a  U" U5      $ UR                  [        T R                  5      5      u  p4nUS:X  a  T R                  X4/5      nUS   $ [        S5      e)Nr=   r0   r)   c                    > [         n[        TR                  U    TR                   VVVs/ s H"  u  p#nX0s=:  a  U:  d  M  O  M  U" SSU5      PM$     snnnSS9nU$ s  snnnf )Nr   r   rd   )rf   r.   )r+   r)   rt   rb   )r=   _Spanr-   r.   r/   rg   r4   s         r5   get_text_at%Text.__getitem__.<locals>.get_text_at   ss    E

6" .2[[-8)E,u, ', 'E!Q&-8
 D Ks   AAAr   z%slices with step!=1 are not supported)rV   r}   indicesri   rt   divide	TypeError)r4   r   r   r-   stopstepliness   `      r5   __getitem__Text.__getitem__   sy    	 	 	 eS!!u%% %c$**o >EqyUM2Qx   GHHr8   c                 ,    [        U R                  5      $ )z5Get the number of cells required to render this text.)r   rt   r3   s    r5   r   Text.cell_len   s     

##r8   c                    SSK Jn  / nU R                  nSSU R                  4/S U R                   5       QS U R                   5       Q[        U5      SU R                  4PnUR                  [        SS5      S9  SnUR                  nU H?  u  pxn	Xu:  a  U" U" X5U 5      5        UnU	(       d  M&  U" U(       a  S	U	 S
3OSU	 S
35        MA     SR                  U5      n
U
$ )zfGet console markup to render this Text.

Returns:
    str: A string potentially creating markup tags.
r   )escaper   Fc              3   R   #    U  H  oR                   S UR                  4v   M     g7fFN)r-   r/   .0spans     r5   	<genexpr>Text.markup.<locals>.<genexpr>   s     F+$zz5$**-+   %'c              3   R   #    U  H  oR                   S UR                  4v   M     g7fTN)r.   r/   r   s     r5   r   r      s     C{txxtzz*{r   Tkeyz[/][rd   )
markupr   rt   r/   rb   ri   sortr   r   join)r4   r   outputrt   markup_spanspositionr   r=   closingr/   r   s              r5   r   Text.markup   s     	#

tzz"
F$++F
 Dt{{C
 Ztzz*	
 	jA./&2"FU veV456!uE7!}qq\B '3 r8   T)r/   emojiemoji_variantr^   r_   r.   r   r   c                D    SSK Jn  U" XX4S9n	XYl        Xil        Xyl        U	$ )a  Create Text instance from markup.

Args:
    text (str): A string containing console markup.
    style (Union[str, Style], optional): Base style for text. Defaults to "".
    emoji (bool, optional): Also render emoji code. Defaults to True.
    emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None.
    justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
    overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
    end (str, optional): Character to end text with. Defaults to "\\n".

Returns:
    Text: A Text instance with markup rendered.
r   )render)r   r   )r   r   r^   r_   r.   )
clsrg   r/   r   r   r^   r_   r.   r   rendered_texts
             r5   from_markupText.from_markup  s+    4 	#t%U '!)r8      r/   r^   r_   r`   r.   ra   c          
          SSK Jn  [        SUUUUUUS9n	U" 5       n
U	R                  S U
R	                  U5       5       5      nU$ )a  Create a Text object from a string containing ANSI escape codes.

Args:
    text (str): A string containing escape codes.
    style (Union[str, Style], optional): Base style for text. Defaults to "".
    justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
    overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
    no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
    end (str, optional): Character to end text with. Defaults to "\\n".
    tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to None.
r   )AnsiDecoderre   )r^   r_   r`   r.   ra   r/   c              3   $   #    U  H  ov   M     g 7fr:   rP   r   lines     r5   r   !Text.from_ansi.<locals>.<genexpr>H  s     C.BdT.Bs   )ansir   r)   r   decode)r   rg   r/   r^   r_   r`   r.   ra   r   joinerdecoderr   s               r5   	from_ansiText.from_ansi%  sQ    . 	&
 -CgnnT.BCCr8   r^   r_   c                6    U " XUS9nUR                  U5        U$ )a  Construct a Text instance with a pre-applied styled. A style applied in this way won't be used
to pad the text when it is justified.

Args:
    text (str): A string containing console markup.
    style (Union[str, Style]): Style to apply to the text. Defaults to "".
    justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
    overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.

Returns:
    Text: A text instance with a style applied to the entire string.
r   )stylize)r   rg   r/   r^   r_   styled_texts         r5   styledText.styledK  s$    * $(CE"r8   )r/   r^   r_   r`   r.   ra   metapartsr   c          	          U " UUUUUUS9n	U	R                   n
[        nU H(  n[        X[        45      (       a
  U
" U5        M#  U
" U6   M*     U(       a  U	R	                  U5        U	$ )aY  Construct a text instance by combining a sequence of strings with optional styles.
The positional arguments should be either strings, or a tuple of string + style.

Args:
    style (Union[str, Style], optional): Base style for text. Defaults to "".
    justify (str, optional): Justify method: "left", "center", "full", "right". Defaults to None.
    overflow (str, optional): Overflow method: "crop", "fold", "ellipsis". Defaults to None.
    no_wrap (bool, optional): Disable text wrapping, or None for default. Defaults to None.
    end (str, optional): Character to end text with. Defaults to "\\n".
    tab_size (int): Number of spaces per tab, or ``None`` to use ``console.tab_size``. Defaults to None.
    meta (Dict[str, Any], optional). Meta data to apply to text, or None for no meta data. Default to None

Returns:
    Text: A new text instance.
r   )r   r)   r}   rX   
apply_meta)r   r/   r^   r_   r`   r.   ra   r   r   rg   r   _Textparts                r5   assembleText.assembled  sm    6 
 D$--t	 
 OOD!r8   c                     [        U R                  5      S:w  a)  SR                  U R                  5      /U R                  SS& U R                  S   $ )z Get the text as a single string.r   rd   Nr   )ri   r]   r   r3   s    r5   rt   
Text.plain  s?     tzz?aWWTZZ01DJJqMzz!}r8   new_textc                     XR                   :w  aX  [        U5      nU/U R                  SS& U R                  n[	        U5      U l        X0R                  :  a  U R                  5         ggg)zSet the text to a new value.N)rt   r   r]   rc   ri   _trim_spans)r4   r   rj   
old_lengths       r5   rt   r     s]     zz!0:N+,DJJqMJ~.DLLL(  " ) "r8   c                     U R                   $ )z.Get a reference to the internal list of spans.rb   r3   s    r5   rf   
Text.spans  s     {{r8   c                     USS U l         g)z
Set spans.Nr   )r4   rf   s     r5   rf   r     s     Ahr8   rt   c           
          [        UU R                  U R                  U R                  U R                  U R
                  U R                  S9nU$ )zNReturn a new Text instance with copied metadata (but not the string or spans).r   )r)   r/   r^   r_   r`   r.   ra   )r4   rt   	copy_selfs      r5   
blank_copyText.blank_copy  sA    **LL]]LL]]
	 r8   c           
          [        U R                  U R                  U R                  U R                  U R
                  U R                  U R                  S9nU R                  UR                  SS& U$ )zReturn a copy of this instance.r   N)	r)   rt   r/   r^   r_   r`   r.   ra   rb   )r4   r   s     r5   r~   	Text.copy  sY    JJ**LL]]LL]]
	 #kk	r8   r-   c           	          U(       a_  [        U 5      nUS:  a  XB-   nUc  UnUS:  a  XC-   nX$:  d  X2::  a  gU R                  R                  [        U[	        XC5      U5      5        gg)aR  Apply a style to the text, or a portion of the text.

Args:
    style (Union[str, Style]): Style instance or style definition to apply.
    start (int): Start offset (negative indexing is supported). Defaults to 0.
    end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
r   N)ri   rb   r   r+   r?   r4   r/   r-   r.   lengths        r5   r   Text.stylize  sg     YFqy{Qwl#,KKtE3v+;UCD r8   c           
          U(       a`  [        U 5      nUS:  a  XB-   nUc  UnUS:  a  XC-   nX$:  d  X2::  a  gU R                  R                  S[        U[	        XC5      U5      5        gg)a  Apply a style to the text, or a portion of the text. Styles will be applied before other styles already present.

Args:
    style (Union[str, Style]): Style instance or style definition to apply.
    start (int): Start offset (negative indexing is supported). Defaults to 0.
    end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.
r   N)ri   rb   insertr+   r?   r   s        r5   stylize_beforeText.stylize_before  si     YFqy{Qwl#,KKq$uc&.>"FG r8   c                 P    [         R                  " U5      nU R                  XBUS9  g)a?  Apply metadata to the text, or a portion of the text.

Args:
    meta (Dict[str, Any]): A dict of meta information.
    start (int): Start offset (negative indexing is supported). Defaults to 0.
    end (Optional[int], optional): End offset (negative indexing is supported), or None for end of text. Defaults to None.

)r-   r.   N)r   	from_metar   )r4   r   r-   r.   r/   s        r5   r   Text.apply_meta  s"     %US1r8   handlersc                     Uc  0 OUnUR                  UR                  5        VVs0 s H  u  p4SU 3U_M     snn5        U R                  [        R                  " U5      5        U $ s  snnf )at  Apply event handlers (used by Textual project).

Example:
    >>> from rich.text import Text
    >>> text = Text("hello world")
    >>> text.on(click="view.toggle('world')")

Args:
    meta (Dict[str, Any]): Mapping of meta information.
    **handlers: Keyword args are prefixed with "@" to defined handlers.

Returns:
    Text: Self is returned to method may be chained.
@)updateitemsr   r   r   )r4   r   r   r   values        r5   onText.on  s`     \rt8HI8H*#qY%8HIJU__T*+ Js   A'
suffixc                 z    U R                   R                  U5      (       a  U R                  [        U5      5        gg)zIRemove a suffix if it exists.

Args:
    suffix (str): Suffix to remove.
N)rt   endswithrJ   ri   )r4   r   s     r5   remove_suffixText.remove_suffix  s.     ::v&&OOCK( 'r8   consoler!   r=   c                     US:  a  [        U 5      U-   nUR                  nU" U R                  5      R                  5       nU R                   H!  u  pVnXbs=:  a  U:  d  M  O  M  XC" USS9-  nM#     U$ )zGet the style of a character at give offset.

Args:
    console (~Console): Console where text will be rendered.
    offset (int): Offset in to text (negative indexing supported)

Returns:
    Style: A Style instance.
r   rd   r%   )ri   	get_styler/   r~   rb   )r4   r   r=   r  r/   r-   r.   
span_styles           r5   get_style_at_offsetText.get_style_at_offset(  st     A:Y'F%%	$**%**,&*kk"E
$u$$:r:: '2 r8   spacesc                 p   US::  a  gU R                   nSU-  nU(       a}  [        U 5      nU Vs/ s H&  nUR                  U:  a  UR                  U5      OUPM(     snU R                  SS& U R
                  R                  U5        U =R                  U-  sl        gU =R                  U-  sl        gs  snf )zExtend the Text given number of spaces where the spaces have the same style as the last character.

Args:
    spaces (int): Number of spaces to add to the Text.
r   Nrx   )	rf   ri   r.   rN   rb   r]   r   rc   rt   )r4   r  rf   
new_spaces
end_offsetr   s         r5   extend_styleText.extend_style<  s     Q;

6\
TJ "!D (,xx:'=F#4G!DKKN JJj)LLF"LJJ*$Js   -B3)style_prefixre_highlightr  c          
      *   SnU R                   R                  n[        nU R                  n[	        U[
        5      (       a  [        R                  " U5      nUR                  U5       H  nUR                  n	U(       a<  U	" 5       u  p[        U5      (       a
  U" XzU 5      OUnUb  X:  a  U" U" XU5      5        US-  nUR                  5       R                  5        H/  nU	" U5      u  pU
S:w  d  M  X:  d  M  U" U" XU U 35      5        M1     M     U$ )a  Highlight text with a regular expression, where group names are
translated to styles.

Args:
    re_highlight (Union[re.Pattern, str]): A regular expression object or string.
    style (Union[GetStyleCallable, StyleType]): Optional style to apply to whole match, or a callable
        which accepts the matched text and returns a style. Defaults to None.
    style_prefix (str, optional): Optional prefix to add to style group names.

Returns:
    int: Number of regex matches
r   r   )rb   r   r+   rt   r}   rX   recompilefinditerr   callable	groupdictkeys)r4   r  r/   r  countappend_spanr   rt   matchget_spanr-   r.   match_stylenames                 r5   highlight_regexText.highlight_regexQ  s    & kk((

lC((::l3L!**51EzzH%Z
9A%eE$45e*s{e+ >?QJE)..0%d^
B;3;e\N4&2I JK 1 2 r8   )case_sensitivewordsr  c                :   SR                  S U 5       5      nU R                  R                  nSn[        n[        R
                  " X@R                  U(       a  SO[        R                  S9 H*  nUR                  S5      u  pU" U" XU5      5        US-  nM,     U$ )a
  Highlight words with a style.

Args:
    words (Iterable[str]): Words to highlight.
    style (Union[str, Style]): Style to apply.
    case_sensitive (bool, optional): Enable case sensitive matching. Defaults to True.

Returns:
    int: Number of words highlighted.
|c              3   N   #    U  H  n[         R                  " U5      v   M     g 7fr:   )r  r   r   words     r5   r   'Text.highlight_words.<locals>.<genexpr>  s     >BIIdOOs   #%r   flagsr   )	r   rb   r   r+   r  r  rt   
IGNORECASEr   )r4   r  r/   r  re_wordsadd_spanr  r   r  r-   r.   s              r5   highlight_wordsText.highlight_wordsy  s    " 88>>>;;%%[[jj^
E AJEU5u-.QJE
 r8   c                 B    U R                   R                  5       U l         g)z"Strip whitespace from end of text.N)rt   rstripr3   s    r5   r.  Text.rstrip  s    ZZ&&(
r8   sizec                     [        U 5      nX!:  a\  X!-
  n[        R                  U R                  5      nUb5  [        UR	                  S5      5      nU R                  [        XS5      5        ggg)zvRemove whitespace beyond a certain width at the end of the text.

Args:
    size (int): The desired size of the text.
Nr   )ri   _re_whitespacesearchrt   grouprJ   r?   )r4   r0  text_lengthexcesswhitespace_matchwhitespace_counts         r5   
rstrip_endText.rstrip_end  si     $i 'F-44TZZ@+#&'7'='=a'@#A $4 => , r8   
new_lengthc                 ~    [        U 5      nX!:w  a-  X!:  a  U R                  X-
  5        gU R                  X!-
  5        gg)z<Set new length of the text, clipping or padding is required.N)ri   	pad_rightrJ   )r4   r;  r   s      r5   
set_lengthText.set_length  s:    T"z23 34	  r8   optionsr"   c              #     #    U R                   c  UR                   OU R                   nU R                  =(       d    UR                  =(       d    [        nU R                  =(       d    UR                  =(       d    [        nU R                  UUR                  UUU=(       d    S[        U R                  UR                  S5      S9n[        S5      R                  U5      nUR                  XR                  S9 S h  vN   g  N7f)Nr   Fr^   r_   ra   r`   re   r.   )ra   r^   r&   r_   r(   wrap	max_widthr   r`   r)   r   r   r.   )r4   r   r@  ra   r^   r_   r   	all_liness           r5   __rich_console__Text.__rich_console__  s      -1MM,A((t}},,D'//D_==HG$4$4H8H		]dllGOOUC  
 JOOE*	##G#:::s   C:D<D=Dc                     U R                   nUR                  5       nU(       a  [        S U 5       5      OSnUR                  5       nU(       a  [        S U 5       5      OUn[	        Xu5      $ )Nc              3   8   #    U  H  n[        U5      v   M     g 7fr:   r   r   s     r5   r   (Text.__rich_measure__.<locals>.<genexpr>  s     >Xd^^   r   c              3   8   #    U  H  n[        U5      v   M     g 7fr:   rK  r#  s     r5   r   rL    s     1545rM  )rt   
splitlinesmaxrB   r   )r4   r   r@  rg   r   max_text_widthr  min_text_widths           r5   __rich_measure__Text.__rich_measure__  s\     zz!BG>>>Q

5:C1511 	 >::r8   r   c              #   |  ^^^^^#    [         nU R                  nU R                  (       d  [        U5      v   U(       a
  U" U5      v   g[        UR                  [
        R                  " 5       S9n[        [        U R                  S5      5      nU VVs0 s H  u  pxXu" UR                  5      _M     snnmU" U R                  5      TS'   S/S U 5       QS U 5       Q[        U5      SS4Pn	U	R                  [        SS5      S	9  / mTR                  n
TR                  n0 mTR                  m[
        R                   mS
[
        4UUUUU4S jjn[#        XSS 5       H?  u  u  pnu  n  nU(       a	  U" U5        OU
" U5        UU:  d  M-  U" XMU U" 5       5      v   MA     U(       a  U" U5      v   ggs  snnf 7f)zRender the text as Segments.

Args:
    console (Console): Console instance.
    end (Optional[str], optional): Optional end character.

Returns:
    Iterable[Segment]: Result of render that may be written to the console.
Nr  r   r   )r   Fr   c              3   D   #    U  H  u  pUR                   S U4v   M     g7fr   )r-   r   indexr   s      r5   r   Text.render.<locals>.<genexpr>  s     M<L[Utzz5%(<L    c              3   D   #    U  H  u  pUR                   S U4v   M     g7fr   rC  rW  s      r5   r   rY    s     J9I+%txxu%9IrZ  Tr   r0   c                  x   > [        U4S j[        T5       5       5      n T" U 5      nUb  U$ T" U 5      nUTU '   U$ )z#Construct current style from stack.c              3   .   >#    U  H
  nTU   v   M     g 7fr:   rP   )r   	_style_id	style_maps     r5   r   9Text.render.<locals>.get_current_style.<locals>.<genexpr>  s     OI9Y/s   )tuplesorted)stylescached_stylecurrent_stylecombinestackstyle_cachestyle_cache_getr_  s      r5   get_current_style&Text.render.<locals>.get_current_style  sF    OOOF*62L'###FOM"/K  r8   )r   rt   rb   r   r  r   nulllist	enumerater/   ri   r   r   r   removegetrf  zip)r4   r   r.   _Segmentrg   r  enumerated_spansrX  r   rf   stack_append	stack_poprj  r=   leavingstyle_idnext_offset_rf  rg  rh  ri  r_  s                     @@@@@r5   r   Text.render  s     zz{{$-sm#G--uzz|D		$++q 9:EUVEUkeUIdjj11EUV	 ,	! 
M<LM
 K9IJ
 Ya 	
 	

z!Q'
(||LL	68%//--	!5 	! 	! ADEQRQS9@U<'Vh)<+q!(#X&V#t;79J9LMM AV 3- I Ws   BF<F63CF</F<r   c           
        ^ ^^^	 T R                  5       nS[        S   4UU 4S jjnUR                  R                  nUR                  R
                  nUR                  R                  nSm	[        mU" 5        Hw  nU" UR                  5        UR                  (       a&  U" T" T	T	[        U5      -   UR                  5      5        U" UU	4S jUR                   5       5        T	[        U5      -  m	My     T	Ul	        U$ )zJoin text together with this instance as the separator.

Args:
    lines (Iterable[Text]): An iterable of Text instances to join.

Returns:
    Text: A new text instance containing join text.
r0   r)   c               3      >#    TR                   (       a&  [        T5       H  u  pUv   U (       a  M  Tv   M     g T S h  vN   g  N7fr:   )rt   r   )lastr   r   r4   s     r5   	iter_textText.join.<locals>.iter_text  s8     zz"+E"2JDJ4"
 #3
 !  s   +AA AAr   c              3   J   >#    U  H  u  pnT" TU-   TU-   U5      v   M     g 7fr:   rP   )r   r-   r.   r/   r   r=   s       r5   r   Text.join.<locals>.<genexpr>*  s1      )4%E funfslE::)4    #)
r   r   r]   rN   rb   r   r+   r/   ri   rc   )
r4   r   r   r~  extend_textr  extend_spansrg   r   r=   s
   ``      @@r5   r   	Text.join  s     ??$	!8F+ 	! 	! nn++oo,,--KD

#zzE&&3t9*<djjIJ )-  c$iF   "r8   c                    SU R                   ;  a  gUc  U R                  nUc  Sn/ nUR                  nU R                  SSS9 H  nSUR                   ;  a
  U" U5        M  SnUR                  SSS9nU H  nUR                   R	                  S5      (       aU  UR
                  S   SS S	-   UR
                  S'   XWR                  -  nXQ-  nU(       a  X-
  n	UR                  U	5        XY-  nOXWR                  -  nU" U5        M     M     [        S
5      R                  U5      n
U
R                   /U l        [        U R                   5      U l        U
R                  U R                  SS& g)z\Converts tabs to spaces.

Args:
    tab_size (int, optional): Size of tabs. Defaults to 8.

	Nr   re   T)include_separatorr   r  rx   rd   )rt   ra   r   rB   r   r]   r   r
  r)   r   ri   rc   rb   )r4   ra   r   r   r   cell_positionr   r   tab_remainderr  r   s              r5   expand_tabsText.expand_tabs2  sF    tzz!}}HH!JJttJ<D4::%t !

44
@!Dzz**400)-B)<s)B

2%6(5(@(%-%=F --f5)3M%64L " =& bx(ll^
4::Ar8   F)r_   padrE  r  c                   U=(       d    U R                   =(       d    [        nUS:w  a  [        U R                  5      nXQ:  aC  US:X  a"  [	        U R                  US-
  5      S-   U l        O[	        U R                  U5      U l        U(       a>  XQ:  a8  X-
  nU R                   SU-   3/U l        [        U R                  5      U l        gggg)aM  Truncate text if it is longer that a given width.

Args:
    max_width (int): Maximum number of characters in text.
    overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None, to use self.overflow.
    pad (bool, optional): Pad with spaces if the length is less than max_width. Defaults to False.
ignoreellipsisr   u   …rx   N)r_   r(   r   rt   r   r]   ri   rc   )r4   rE  r_   r  	_overflowr   r  s          r5   truncateText.truncate\  s     AA1A	 djj)F!
*!.tzz9q=!IE!QDJ!.tzz9!EDJv)"+!%S6\N;<
"4:: *s !r8   c           
      >   [        U R                  5      n[        nU R                   Vs/ s HX  nUR                  U:  d  M  UR
                  U:  a  UO0U" UR                  [        XR
                  5      UR                  5      PMZ     snU R                  SS& gs  snf )z=Remove or modify any spans that are over the end of the text.N)ri   rt   r+   rb   r-   r.   r?   r/   )r4   
max_offsetr   r   s       r5   r   Text._trim_spansw  s    _
 
 $zzJ&N88j( 4::s:xx'@$**MN $
A 
s   BABr  	characterc           
      
   [        U5      S:X  d   S5       eU(       a_  X!-  nU U R                   U 3U l        [        nU R                   VVVs/ s H  u  pVnU" XQ-   Xa-   U5      PM     snnnU R                  SS& ggs  snnnf )zPad left and right with a given number of characters.

Args:
    count (int): Width of padding.
    character (str): The character to pad with. Must be a string of length 1.
r   &Character must be a string of length 1Nri   rt   r+   rb   )r4   r  r  pad_charactersr   r-   r.   r/   s           r5   r  Text.pad  s     9~"L$LL"&.N*+DJJ<7GHDJE *.)4%E emS[%8)4DKKN	 s   A>c           
         [        U5      S:X  d   S5       eU(       a[  X!-   U R                   3U l        [        nU R                   VVVs/ s H  u  pEnU" XA-   XQ-   U5      PM     snnnU R                  SS& ggs  snnnf )zPad the left with a given character.

Args:
    count (int): Number of characters to pad.
    character (str, optional): Character to pad with. Defaults to " ".
r   r  Nr  )r4   r  r  r   r-   r.   r/   s          r5   pad_leftText.pad_left  s     9~"L$LL"%-.tzzl;DJE *.)4%E emS[%8)4DKKN s   A:c                 n    [        U5      S:X  d   S5       eU(       a  U R                   X!-   3U l        gg)zPad the right with a given character.

Args:
    count (int): Number of characters to pad.
    character (str, optional): Character to pad with. Defaults to " ".
r   r  N)ri   rt   )r4   r  r  s      r5   r=  Text.pad_right  s<     9~"L$LL" JJ<	(9':;DJ r8   alignwidthc                    U R                  U5        U[        U R                  5      -
  nU(       a[  US:X  a  U R                  XC5        gUS:X  a+  US-  nU R	                  XS5        U R                  XE-
  U5        gU R	                  XC5        gg)zAlign text to a given width.

Args:
    align (AlignMethod): One of "left", "center", or "right".
    width (int): Desired width.
    character (str, optional): Character to pad with. Defaults to " ".
leftcenter   N)r  r   rt   r=  r  )r4   r  r  r  excess_spacer  s         r5   r  
Text.align  sy     	ex

33|7("#q(d.|2I>l6 r8   r   c           	        ^^ [        U[        [        45      (       d  [        S5      e[	        U5      (       Ga  [        U[        5      (       a  [        U5      nU R                  R                  U5        [	        U 5      n[	        U5      mU(       a(  U R                  R                  [        XDT-   U5      5        U =R                  T-  sl
        U $ [        U[        5      (       a  [        mUb  [        S5      eU R                  mUR                  (       a9  U R                  R                  T" TT[	        U5      -   UR                  5      5        U R                  R                  UR                  5        U R                  R                  UU4S jUR                  R                  5        5       5        U =R                  [	        U5      -  sl
        U $ )zAdd text with an optional style.

Args:
    text (Union[Text, str]): A str or Text to append.
    style (str, optional): A style name. Defaults to None.

Returns:
    Text: Returns self for chaining.
z(Only str or Text can be appended to Textz2style must not be set when appending Text instancec              3   J   >#    U  H  u  pnT" UT-   UT-   U5      v   M     g 7fr:   rP   r   r-   r.   r/   r   r5  s       r5   r   Text.append.<locals>.<genexpr>  s3      #-?)E %+-s[/@%HH-?r  )r}   rX   r)   r   ri   r   r]   r   rb   r+   rc   
ValueErrorr/   rt   rN   r~   )r4   rg   r/   rj   r=   r   r5  s        @@r5   r   Text.append  sa    $d,,FGGt99$$$!4T!:

!!.1T!.1KK&&tF[4H%'PQ+$ # D$''$$L  #ll::KK&&k;T+BDJJO 

!!$**-"" #-1[[-=-=-?#  D	)r8   c           	        ^^ [         mU R                  mUR                  (       a9  U R                  R	                  T" TT[        U5      -   UR                  5      5        U R                  R	                  UR                  5        U R                  R                  UU4S jUR                  R                  5        5       5        U =R                  [        U5      -  sl        U $ )zAppend another Text instance. This method is more performant that Text.append, but
only works for Text.

Args:
    text (Text): The Text instance to append to this instance.

Returns:
    Text: Returns self for chaining.
c              3   J   >#    U  H  u  pnT" UT-   UT-   U5      v   M     g 7fr:   rP   r  s       r5   r   #Text.append_text.<locals>.<genexpr>   s3      
%7!E %+%s['8%@@%7r  )
r+   rc   r/   rb   r   ri   r]   rt   rN   r~   )r4   rg   r   r5  s     @@r5   append_textText.append_text  s     ll::KKu[+D	2I4::VW

$**% 
%)[[%5%5%7
 	
 	D	!r8   tokensc           
      (   U R                   R                  nU R                  R                  n[        n[	        U 5      nU HH  u  pg[        U5      nU" U5        U(       a  U" U" XU[	        U5      -   U5      5        U[	        U5      -  nMJ     XPl        U $ )a  Append iterable of str and style. Style may be a Style instance or a str style definition.

Args:
    tokens (Iterable[Tuple[str, Optional[StyleType]]]): An iterable of tuples containing str content and style.

Returns:
    Text: Returns self for chaining.
)r]   r   rb   r+   ri   r   rc   )r4   r  r  r  r   r=   contentr/   s           r5   append_tokensText.append_tokens  s     jj''kk((T$NG)'2G E&3w<*?GHc'l"F % r8   c                 N    U R                   R                  UR                   5        g)z~Copy styles from another Text instance.

Args:
    text (Text): A Text instance to copy styles from, must be the same length.
N)rb   rN   )r4   rg   s     r5   copy_stylesText.copy_styles  s     	4;;'r8   )r  allow_blank	separatorr  r  c                  ^^ T(       d   S5       eU R                   mTT;  a  [        U R                  5       /5      $ U(       aB  U R                  S [        R
                  " [        R                  " T5      T5       5       5      nO?S[        [           4UU4S jjn[        U4S jU R                  U" 5       5       5       5      nU(       d&  TR                  T5      (       a  UR                  5         U$ )a  Split rich text in to lines, preserving styles.

Args:
    separator (str, optional): String to split on. Defaults to "\\n".
    include_separator (bool, optional): Include the separator in the lines. Defaults to False.
    allow_blank (bool, optional): Return a blank line if the text ends with a separator. Defaults to False.

Returns:
    List[RichText]: A list of rich text, one per line of the original.
zseparator must not be emptyc              3   @   #    U  H  oR                  5       v   M     g 7fr:   rC  )r   r  s     r5   r   Text.split.<locals>.<genexpr>?  s       )P		)Ps   r0   c               3      >#    [         R                  " [         R                  " T5      T5       H  n U R                  5       u  pUv   Uv   M     g 7fr:   )r  r  r   r   )r  r-   r.   r  rg   s      r5   flatten_spans!Text.split.<locals>.flatten_spansD  s<     [[9)=tDE!&JEKI Es   AAc              3   J   >#    U  H  oR                   T:w  d  M  Uv   M     g 7fr:   rs   )r   r   r  s     r5   r   r  J  s       !=yAX!=s   #	#)rt   r   r~   r   r  r  r   r   rV   r   pop)r4   r  r  r  r   r  rg   s    `    @r5   rB   
Text.split'  s    " 777yzzD $))+''KK  )+RYYy5I4)P  E
8C=    !%]_!= E t}}Y77IIKr8   offsetsc           	        ^^^^^ [        U5      nU(       d  [        U R                  5       /5      $ U R                  m[	        T5      nS/UQUPn[        [        XDSS 5      5      nU R                  mU R                  mU R                  m[        m[        UUUUU4S jU 5       5      nU R                  (       d  U$ UR                   Vs/ s H  owR                  R                  PM     nn[	        U5      n	[        n
U R                   H  u  pmSnU	nX-   S-  n X_   u  nnUU:  a  US-
  nOUU:  a  US-   nOO	X-   S-  nM)  UU:  a  UnO1U=nnU	n UU   u  nnUU:  a  US-
  nOUU:  a  US-   nOO	X-   S-  nM*  [        UUS-   5       HG  nUU   u  nn[        SUU-
  5      n[!        UU-
  UU-
  5      nUU:  d  M4  UU   " U
" UUT5      5        MI     M     U$ s  snf )zDivide text in to a number of lines at given offsets.

Args:
    offsets (Iterable[int]): Offsets used to divide text.

Returns:
    Lines: New RichText instances between offsets.
r   r   Nc              3   >   >#    U  H  u  pT" TX TTTS 9v   M     g7f))r/   r^   r_   NrP   )r   r-   r.   r   r^   r_   r/   rg   s      r5   r   Text.divide.<locals>.<genexpr>j  s3      
 *
 U!	 *s   r  )rm  r   r~   rt   ri   rq  r/   r^   r_   r)   rb   _linesr   r+   rangerP  r?   )r4   r  _offsetsr5  divide_offsetsline_ranges	new_linesr   _line_appends
line_countr   
span_startspan_endlower_boundupper_boundstart_line_no
line_startline_endend_line_noline_no	new_startnew_endr   r^   r_   r/   rg   s                         @@@@@r5   r   Text.divideS  s4    =$))+''zz$i4h443~ab/ABC

,,== 
 
 *
 
	 {{8A8H8HI8H++8HI%
+/;;'J%K$K(61<M'2'A$
H
*"/!"3K(*"/!"3K!,!:q @  ("+,99k(+6{+C(J*,&1Ao!H,&1Ao#.#<"BK  !a@'27';$
H:
#:;	h3X
5JKY&!'*5GU+KL A? ,7L U Js   Gamountc           
         [        U R                  5      U-
  n[        nU R                   Vs/ s HX  nUR                  U:  d  M  UR
                  U:  a  UO0U" UR                  [        X$R
                  5      UR                  5      PMZ     snU R                  SS& U R                  SU*  /U l        U =R                  U-  sl	        gs  snf )z7Remove a number of characters from the end of the text.N)
ri   rt   r+   rb   r-   r.   r?   r/   r]   rc   )r4   r  r  r   r   s        r5   rJ   Text.right_crop  s    _v-
 
 $zzJ&N88j( 4::s:xx'@$**MN $
A jj6'*+

s   CACrB  c                j   U=(       d    U R                   =(       d    [        nU=(       d    U R                  =(       d    [        n[	        X`R
                  S5      =(       d    US:H  n[        5       n	U R                  SS9 H  n
SU
;   a  U
R                  U5        U(       a  [        U
/5      nO'[        [        U
5      X(S:H  S9nU
R                  U5      nU H  n
U
R                  U5        M     U(       a  UR                  XXxS9  U H  n
U
R                  X(S	9  M     U	R                  U5        M     U	$ )
a  Word wrap the text.

Args:
    console (Console): Console instance.
    width (int): Number of cells available per line.
    justify (str, optional): Justify method: "default", "left", "center", "full", "right". Defaults to "default".
    overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None.
    tab_size (int, optional): Default tab size. Defaults to 8.
    no_wrap (bool, optional): Disable wrapping, Defaults to False.

Returns:
    Lines: Number of lines.
Fr  Tr  r  r'   )r'   r   )r_   )r^   r&   r_   r(   r   r`   r   rB   r  r   rX   r   r9  r  rN   )r4   r   r  r^   r_   ra   r`   wrap_justifywrap_overflowr   r   r  r  s                r5   rD  	Text.wrap  s   . A$,,A/ EDMME5EG\\59QX=QJJ4J0Dt|  *!4&M	%c$if=TU KK0	!& "!!L "  "e< "LL#! 1" r8   c                     [        5       nUR                  nU R                  5        H  nUR                  U5        U" U5        M     U$ )zFit the text in to given width by chopping in to lines.

Args:
    width (int): Maximum characters in a line.

Returns:
    Lines: Lines container.
)r   r   rB   r>  )r4   r  r   r   r   s        r5   fitText.fit  s>     wJJLDOOE"4L ! r8   c                 X   [         R                  " SU R                  [         R                  S9 Vs1 s H  n[	        UR                  S5      5      iM     nn [        [        U Vs/ s H  o3S-  (       a  M  UPM     sn5      =(       d    SnU$ s  snf s  snf ! [         a    Sn U$ f = f)zZAuto-detect indentation of code.

Returns:
    int: Number of spaces used to indent code.

^( *)(.*)$r&  r   r  )	r  r  rt   	MULTILINEri   r4  r   r   r   )r4   r  _indentationsindentindentations        r5   detect_indentationText.detect_indentation  s     ]DJJbllS
S AS 	 

	s-R-PQzV-RSXWX  
 S 	K	s/   $BB &B
7B
=B B B)(B)u   │z	dim green)r  r/   indent_sizec                @   Uc  U R                  5       OUnU R                  5       nUR                  5         U SUS-
  -   3n[        R                  " S5      n/ nUR
                  n	Sn
UR                  SS9 H  nUR                  UR                  5      nU(       a  UR                  S5      (       d  U
S-  n
MB  UR                  S5      n[        [        U5      U5      u  pXn-   SU-   3nUUR                  [        U5      S -   Ul        UR                  US[        U5      5        U
(       a  UR                  [        UUS	9/U
-  5        Sn
U	" U5        M     U
(       a  UR                  [        S
US	9/U
-  5        UR                  S5      R!                  U5      nU$ )uS  Adds indent guide lines to text.

Args:
    indent_size (Optional[int]): Size of indentation, or None to auto detect. Defaults to None.
    character (str, optional): Character to use for indentation. Defaults to "│".
    style (Union[Style, str], optional): Style of indent guides.

Returns:
    Text: New text with indentation guides.
Nrx   r   r  r   Tr  r  r/   rd   re   )r  r~   r  r  r  r   rB   r  rt   r4  divmodri   r   rN   r)   r   r   )r4   r  r  r/   _indent_sizerg   indent_line	re_indentr  add_lineblank_linesr   r  r  full_indentsremaining_space
new_indentr   s                     r5   with_indent_guidesText.with_indent_guides  s   $ 5@4Gt..0[yy{"C<!+;$<#=>JJ}-	 "	##JJ4J0DOODJJ/EAq [[^F,23v;,M)L'67o8M7NOJ#djjZ1B&CCDJLL3z?3  $z"?!@;!NOTN 1 d2U34{BC??4(--i8r8   )
rc   rb   r]   r.   r^   r`   r_   rt   r/   ra   )rd   rd   )rd   )r0   r)   )r   Nr:   )r0   N)rx   )rg   r)   r0   r)   )rg   r)   r0   N)re   )r   )UrQ   rR   rS   rT   rU   	__slots__rX   r   r   r   rY   rV   r   r+   rk   rn   r;   ru   r6   r   r   objectr   r   r   r   propertyr   r   classmethodr   r   r   r    r   r   r
   r   rt   setterrf   r   r~   r   r   r   r   r   r  r
  r   GetStyleCallabler  r   r+  r.  r9  r>  r   rG  r   rS  r   r   r  r  r   r  r  r=  r   r  r   r  r  r  r   rB   r   rJ   rD  r  r  r  rZ   rP   r8   r5   r)   r)   v   s'	   
I #%0
 .2/3"&"&&*00 S%Z 0
 /*0 +,0 $0 0 3-0 T
#0 
0. "$ " G# GS V IF It I
& T IsEz!2 Iv I4 $# $ $   : 
 $&04-1/3 S%Z 	
   - /* +,  
 B 
 $&-1/3"&"### S%Z 	#
 /*# +,# $# # 3-# 
# #J  
 .2/3 
 /* +, 
 0  $&-1/3"&)-+c65i#889+ S%Z + /*	+
 +,+ $+ + + tCH~&+ 
+ +Z s   \\#c #d # # tDz   \\4: $   V " !	ES%Z E E c]	E
 
E: !	HS%Z H H c]	H
 
H6 JN2cN2+.29A#2	2xS#X/ C F ()C )D )9 c e (%3 %4 %0 ?C&
 &GCL#-.& .	9:;&
 & 
&Z  $} S%Z 
  
:)?s ?t ?5S 5T 5; ;+;;	'	;&
; 
;+;
;	
;9 i 9 c 9 8I;N 9 v%(6* %v %N('HSM ('T ('\ 04// +,	/
 / 
/6
  t "c c D  	<s 	<s 	<T 	<7; 7s 7s 7T 7* PT*&#+&*/7c7l8K/L*	*X,uS(9*=%=>?	0( * #(!**  	*
 * 
*XMhsm M M^ T * .2/3"&.. .
 /*. +,. . $. 
.`   C . &*. &.c]. 	.
 . 
. .r8   __main__)r!   a  
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Loremboldipsumitaliczjustify='left'redr  zjustify='center'greenr  )r/   r^   zjustify='right'bluerightzjustify='full'magentafull)Cr  	functoolsr   r   mathr   operatorr   typingr   r   r	   r
   r   r   r   r   r   r   r   _loopr   _pickr   _wrapr   r  r   rL   r   r   
containersr   controlr   r   r   jupyterr   measurer   segmentr   r/   r   r    r   r!   r"   r#   r$   r&   rW   r(   r  r2  rX   TextTyper  r+   r)   rQ   pip._vendor.rich.consolerg   r+  ruleprintrP   r8   r5   <module>r"     s   	 %          *  (  !    #OO#, ,%+ " + G$f 1SE8I#667 D: DN< D& z0 	PD 	'F+'H-iGLL!"MM$eM$MMOLL#$MM$gxM8MMOLL"#MM$fgM6MMOLL!"MM$iM8MMO3 r8   