2biձ%SSKrSSKJrJr SSKJr SSKJr SSKJ r J r J r J r J r JrJrJrJrJr SSKJr SSKJr SS KJr SS KJr SS KJrJr SS KJr SS K J!r! SSK"J#r# SSK$J%r% SSK&J'r' SSK(J)r) SSK*J+r+J,r, \ (a SSK-J.r.J/r/J0r0J1r1 Sr2S\3S'Sr4S\3S'\Rj"S5r6\\7S4r8\ \7/\\,4r9"SS\5r:"SS\%5r;\\>RS"/S#5 \>RS$/S%5 \."5r-\-RS&5 \-R\>S'S(9 \-R5 \-RS)5 \-R\>S*S+S,9 \-R5 \-RS-5 \-R\>S.S/S,9 \-R5 \-RS05 \-R\>S1S2S,9 \-R5 gg)3N)partialreduce)gcd) itemgetter) TYPE_CHECKINGAnyCallableDictIterableList NamedTupleOptionalTupleUnion) loop_last) pick_bool) divide_line) AlignMethod)cell_len set_cell_size)Lines)strip_control_codes) EmojiVariant) JupyterMixin) Measurement)Segment)Style StyleType)ConsoleConsoleOptions JustifyMethodOverflowMethoddefaultr"DEFAULT_JUSTIFYfoldr#DEFAULT_OVERFLOWz\s+$Textc\rSrSr%Sr\\S'\\S'\\\ 4\S'S\4Sjr S\ 4Sjr S \S\ S\S44S jrS \SS4S jrS \SS4S jrS rg)Span-z A marked up region in some text.startendstylereturncXSURSURSUR<S3$)NzSpan(z, ))r,r-r.selfs ڇ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/rich/text.py__repr__ Span.__repr__7s)tzzl"TXXJba@@c4URUR:$N)r-r,r2s r4__bool__ Span.__bool__:sxx$**$$r7offsetcXR:aUS4$XR:aUS4$Uup#n[U[X15U5n[URX45nXV4$)z)Split a span in to 2 from a given offset.N)r,r-r*min)r3r<r,r-r.span1span2s r4split Span.split=sa JJ :  XX :  EUC,e4UYY+|r7c.Uup#n[X!-X1-U5$)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*r3r<r,r-r.s r4move Span.moveJs!!EENCL%88r7cFUup#nX:aU$[U[X5U5$)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>rDs r4 right_cropSpan.right_cropVs,!E =KE3v+U33r7N)__name__ __module__ __qualname____firstlineno____doc__int__annotations__rstrrr5boolr:rrrArErH__static_attributes__rJr7r4r*r*-s* J H e )A#A%$% C E&(62B*B$C  93 96 9 4 4 4r7r*c\rSrSrSr/SQrSSSSSSSS.S \S \\\4S \ S S \ SS\ \ S\S\ \ S\ \ \ SS4SjjjrS\ 4SjrS\ 4SjrS\4SjrS\4SjrS\SS4SjrS\S\ 4SjrS\S\ 4SjrS\\ \4SS4Sjr\S\ 4Sj5r\S\4S j5r\SS!SSSSS".S \S \\\4S#\ S$\ \S \ S S \ SS\SS4S%jj5r\SSSSSSS&.S \S \\\4S \ S S \ SS\ \ S\S\ \ SS4S'jj5r \SSSS(.S \S \!S \ S S \ SSS4 S)jjj5r"\SSSSSSSS*.S+\\S\#\\!44S \\\4S \ S S \ SS\ \ S\S\ S,\ \$\\4SS4S-jj5r%\S\4S.j5r&\&RNS/\SS4S0j5r&\S\ \ 4S1j5r(\(RNS\ \ SS4S2j5r(SS3\SS4S4jjr)SS5jr*SS \\\4S6\ S\ \ SS4S7jjr+SS \\\4S6\ S\ \ SS4S8jjr,SS,\$\\4S6\ S\ \ SS4S9jjr-SS,\ \$\\4S:\SS4S;jjr.S<\SS4S=jr/S>S?S@\ S\4SAjr0SSSB.SC\S \ \\1\!4SD\S\ 4SEjjjr2S!SF.SG\3\S \\\4SH\ S\ 4SIjjr4SSJjr5SK\ SS4SLjr6SM\ SS4SNjr7S>S?SOSPS\3\84SQjr9S>S?SOSPS\:4SRjr;SS>S?S\S\3SS4STjjrSSXSY.SZ\ S \ SS[\ SS4S\jjr?SS]jr@SS^\ S_\SS4S`jjrASS^\ S_\SS4SajjrBSS^\ S_\SS4SbjjrCSSc\DSd\ S_\SS4SejjrESS \S\4S \ \\Sf4SS4SgjjrFSShjrGSi\3\#\\ \!4SS4SjjrHSSkjrISSXSXSl.Sm\Sn\ So\ S\J4SpjjjrKSq\3\ S\J4SrjrLSSs\ SS4StjjrMSSSSSu.S>S?Sd\ S \ S S \ SS\ S\ \ S\J4SvjjrNSd\ S\J4SwjrOS\ 4SxjrPSSySzS{.S|\ \ S_\S \!SS4S}jjjrQS~rRg)r(eaText 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 8. spans (List[Span], optional). A list of predefined style spans. Defaults to None. ) _textr.justifyoverflowno_wrapr-tab_size_spans_lengthN )rXrYrZr-r[spanstextr.rXr"rYr#rZr-r[rar/c[U5n U /UlX lX0lX@lXPlX`lXplU=(d /Ul[U 5Ul gr9) rrWr.rXrYrZr-r[r\lenr]) r3rbr.rXrYrZr-r[rasanitized_texts r4__init__ Text.__init__sM-T2$%  29 4<   "'+2 / r7cUR$r9)r]r2s r4__len__ Text.__len__s ||r7c,[UR5$r9)rSr]r2s r4r: Text.__bool__sDLL!!r7cUR$r9plainr2s r4__str__ Text.__str__s zzr7c@SUR<SUR<S3$)Nz)ror\r2s r4r5 Text.__repr__s ~Qt{{oQ77r7otherc[U[[45(a#UR5nUR U5 U$[ $r9) isinstancerRr(copyappendNotImplemented)r3rvresults r4__add__ Text.__add__s5 ec4[ ) )YY[F MM% Mr7c[U[5(d[$URUR:H=(a URUR:H$r9)rxr(r{ror\r3rvs r4__eq__ Text.__eq__s:%&&! !zzU[[(HT[[ELL-HHr7c[U[5(aXR;$[U[5(aURUR;$g)NF)rxrRror(rs r4 __contains__Text.__contains__s? eS ! !JJ& & t $ $;;$**, ,r7slicec^S[SS4U4Sjjn[U[5(aU"U5$UR[TR55up4nUS:XaTR X4/5nUS$[ S5e)Nr<r/r(c >[n[TRUTRVVVs/sH"up#nX0s=:aU:dMO MU"SSU5PM$ snnnSS9nU$s snnnf)Nrrr^)rar-)r*r(ror\)r<_Spanr,r-r.rbr3s r4 get_text_at%Text.__getitem__..get_text_atssE 6".2[[-8)E,u,','E!Q&-8 DKsAAArz%slices with step!=1 are not supported)rPrxindicesrdrodivide TypeError)r3rrr,stopstepliness` r4 __getitem__Text.__getitem__sy    eS ! !u% % % c$**o > Eqy UM2Qx GHHr7c,[UR5$)z5Get the number of cells required to render this text.)rror2s r4r Text.cell_lens ##r7cSSKJn /nURnSSUR4/SUR5QSUR5Q[ U5SUR4PnUR [SS5S9 SnURnUH?upxn Xu:aU"U"X5U55 UnU (dM&U"U(aS U S 3OS U S 35 MA S RU5n U $) zfGet console markup to render this Text. Returns: str: A string potentially creating markup tags. r)escaperFc3R# UHoRSUR4v M g7fFN)r,r..0spans r4 Text.markup..s F+$zz5$**-+%'c3R# UHoRSUR4v M g7fTN)r-r.rs r4rrs C{txxtzz*{rTkeyz[/][r^) markuprror.r\rdsortrrzjoin) r3routputro markup_spanspositionrzr<closingr.rs r4r Text.markups #  tzz " F$++ F Dt{{ C Ztzz *  jA./&2 "FU veV456!uE7!}qq\B '3  r7T)r.emoji emoji_variantrXrYr-rrcDSSKJn U"XX4S9n XYlXilXylU $)aCreate Text instance from markup. Args: text (str): A string containing console markup. emoji (bool, optional): Also render emoji code. Defaults to True. 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)rr)rrrXrYr-) clsrbr.rrrXrYr-r rendered_texts r4 from_markupText.from_markups+0 #t%U '!)r7r.rXrYrZr-r[c SSKJn [SUUUUUUS9n U"5n U RSU R U555n U $)aCreate 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 8. r) AnsiDecoderr_)rXrYrZr-r[r.c3$# UHov M g7fr9rJrlines r4r!Text.from_ansi..5sC.BdT.Bs)ansirr(rdecode) rrbr.rXrYrZr-r[rjoinerdecoderr|s r4 from_ansiText.from_ansisQ. &  -CgnnT.BCC r7rXrYc6U"XUS9nURU5 U$)aConstruct 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)rrbr.rXrY styled_texts r4styled Text.styled8s$*$(C E"r7)r.rXrYrZr-r[metapartsrc U"UUUUUUS9n U Rn [n UH(n [X[45(a U "U 5 M#U "U 6 M* U(aU R U5 U $)aConstruct 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. 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 8. 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)rzr(rxrR apply_meta) rr.rXrYrZr-r[rrrbrz_Textparts r4assemble Text.assembleQsm4  D$ --t    OOD ! r7c[UR5S:wa)SRUR5/URSS&URS$)z Get the text as a single string.rr^Nr)rdrWrr2s r4ro Text.plain~s? tzz?a WWTZZ01DJJqMzz!}r7new_textcXR:waX[U5nU/URSS&URn[ U5UlX0R:aUR 5 ggg)zSet the text to a new value.N)rorrWr]rd _trim_spans)r3rre old_lengths r4rors] zz !0:N+,DJJqMJ~.DLLL(  ") "r7cUR$)z.Get a reference to the internal list of spans.r\r2s r4ra Text.spanss{{r7cUSSUlg)z Set spans.Nr)r3ras r4rarsAh r7roc [UURURURURUR UR S9nU$)zOReturn a new Text instance with copied meta data (but not the string or spans).r)r(r.rXrYrZr-r[)r3ro copy_selfs r4 blank_copyText.blank_copysA **LL]]LL]] r7c [URURURURUR UR URS9nURURSS&U$)zReturn a copy of this instance.rN) r(ror.rXrYrZr-r[r\)r3rs r4ry Text.copysY JJ**LL]]LL]] #kk r7r,c U(a_[U5nUS:aXB-nUcUnUS:aXC-nX$:dX2::agURR[U[ XC5U55 gg)aRApply 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. rN)rdr\rzr*r>r3r.r,r-lengths r4r Text.stylizesg YFqy{Qwl#, KK  tE3v+;UC D r7c U(a`[U5nUS:aXB-nUcUnUS:aXC-nX$:dX2::agURRS[U[ XC5U55 gg)aApply 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. rN)rdr\insertr*r>rs r4stylize_beforeText.stylize_beforesi YFqy{Qwl#, KK  q$uc&.>"F G r7cP[R"U5nURXBUS9 g)a@Apply meta data 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)r3rr,r-r.s r4rText.apply_metas"% US 1r7handlersc Uc0OUnURUR5VVs0sH up4SU3U_M snn5 UR[R"U55 U$s snnf)atApply 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. @)updateitemsrrr)r3rrrvalues r4onText.ons`\rt 8HI8H*#qY%8HIJ U__T*+ JsA' suffixczURRU5(aUR[U55 gg)zIRemove a suffix if it exists. Args: suffix (str): Suffix to remove. N)roendswithrHrd)r3rs r4 remove_suffixText.remove_suffix s. ::  v & & OOCK ( 'r7consoler r<cUS:a[U5U-nURnU"UR5R5nURH!upVnXbs=:aU:dMO MXC"USS9- nM# 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. rr^r$)rd get_styler.ryr\)r3rr<rr.r,r- span_styles r4get_style_at_offsetText.get_style_at_offsetst A:Y'F%% $**%**,&*kk "E $u$$:r::'2 r7) style_prefix re_highlightrc SnURRn[nURn[R "X5HnUR n U(a<U "5up[U5(a U"XzU 5OUn U bX:aU"U"XU 55 US- nUR5R5H/n U "U 5upU S:wdMX:dMU"U"XUU 355 M1 M U$)aHighlight text with a regular expression, where group names are translated to styles. Args: re_highlight (str): A regular expression. 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 rr) r\rzr*rorefinditerrcallable groupdictkeys)r3rr.rcount append_spanrromatchget_spanr,r- match_stylenames r4highlight_regexText.highlight_regex(s&kk((  [[5EzzH%Z 9A%eE$45e *s{e+ >? QJE)..0%d^ B;3;e\N4&2I JK16 r7)case_sensitivewordsrc:SRSU55nURRnSn[n[R "X@R U(aSO[RS9H*nURS5upU"U"XU55 US- nM, U$)a Highlight words with a style. Args: words (Iterable[str]): Worlds to highlight. style (Union[str, Style]): Style to apply. case_sensitive (bool, optional): Enable case sensitive matchings. Defaults to True. Returns: int: Number of words highlighted. |c3N# UHn[R"U5v M g7fr9)rrrwords r4r'Text.highlight_words.._s>BIIdOOs#%rflagsr) rr\rzr*rrro IGNORECASEr) r3rr.rre_wordsadd_spanr rr r,r-s r4highlight_wordsText.highlight_wordsNs"88>>>;;%%[[ jj^ EAJE U5u- . QJE   r7cBURR5Ulg)z"Strip whitespace from end of text.N)rorstripr2s r4r! Text.rstripksZZ&&( r7sizec[U5nX!:a\X!- n[RUR5nUb5[UR S55nUR [ XS55 ggg)zvRemove whitespace beyond a certain width at the end of the text. Args: size (int): The desired size of the text. Nr)rd_re_whitespacesearchrogrouprHr>)r3r# text_lengthexcesswhitespace_matchwhitespace_counts r4 rstrip_endText.rstrip_endosi $i   'F-44TZZ@ +#&'7'='=a'@#A $4 =>, r7 new_lengthc~[U5nX!:wa-X!:aURX- 5 gURX!- 5 gg)zDMM>Q,,D'//D_==HG$4$4H8H    ]dllGOOUC  JOOE* ##G#:::sC=D?DDcURnUR5nU(a[SU55OSnUR5nU(a[SU55OUn[ Xu5$)Nc38# UHn[U5v M g7fr9rrs r4r(Text.__rich_measure__..s>Xd^^rc38# UHn[U5v M g7fr9r>rs r4rr?s1545r@)ro splitlinesmaxrAr)r3rr3rbrmax_text_widthrmin_text_widths r4__rich_measure__Text.__rich_measure__s\zz!BG>>>Q 5:C151 1 >::r7rc#|^^^^^# [nURnUR(d[U5v U(a U"U5v g[UR[ R "5S9n[[URS55nUVVs0sHupxXu"UR5_M snnmU"UR5TS'S/SU5QSU5Q[U5SS4Pn U R[SS5S 9 /mTRn TRn 0mTRm[ R mS [ 4UUUUU4S jjn [#XSS5H?uupnun nU(a U "U5 OU "U5 UU :dM-U"XMUU "55v MA U(a U"U5v ggs snnf7f) 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. Nrrr)rFrc3D# UHupURSU4v M g7fr)r,rindexrs r4rText.render..s M[U4Sj[T555nT"U5nUbU$T"U5nUTU'U$)z#Construct current style from stack.c3.># UH nTUv M g7fr9rJ)r _style_id style_maps r4r9Text.render..get_current_style..sOI9Y/s)tuplesorted)styles cached_style current_stylecombinestack style_cachestyle_cache_getrRs r4get_current_style&Text.render..get_current_stylesFOOOF*62L'###FOM"/K  r7)rror\rrrnulllist enumerater.rdrrrzremovegetrYzip)r3rr-_Segmentrbrenumerated_spansrKrra stack_append stack_popr]r<leavingstyle_id next_offset_rYrZr[r\rRs @@@@@r4r Text.renderszz{{$- sm# G--uzz|D  $++q 9:EUVEUkeUIdjj11EUV  , !   M# TR(a&[T5HupUv U(aMTv M gTShvN gN7fr9)ror)lastrrr3s r4 iter_textText.join..iter_texts8zz"+E"2JDJ4" #3 !  s+AAAArc3J># UHupnT"TU-TU-U5v M g7fr9rJ)rr,r-r.rr<s r4rText.join..s1)4%EfunfslE::)4 #) rr rWextendr\rzr*r.rdr]) r3rrrq extend_textr  extend_spansrbrr<s `` @@r4r Text.joins??$ !8F+ ! !nn++ oo,, -- KD  #zzE&&3t9*BFsV|V4 4L=ll^ 4::  Ar7F)rYpadr8rcU=(d UR=(d [nUS:wa[UR5nXQ:aCUS:Xa"[ URUS- 5S-UlO[ URU5UlU(a>XQ:a8X- nURSU-3/Ul[ UR5Ulgggg)aMTruncate 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. ignoreellipsisru…rsN)rYr'rrorrWrdr])r3r8rYr _overflowrrs r4truncate Text.truncate)sA A1A  djj)F! *!.tzz9q=!IE!QDJ!.tzz9!EDJv)"+!% S6\N;< "4:: *s !r7c >[UR5n[nURVs/sHXnURU:dMUR U:aUO0U"UR[ XR 5UR5PMZ snURSS&gs snf)z=Remove or modify any spans that are over the end of the text.N)rdror*r\r,r-r>r.)r3 max_offsetrrs r4rText._trim_spansDs_   $zzJ& N88j(4::s:xx'@$**MN$   A s BABr  characterc  [U5S:XdS5eU(a_X!-nUURU3Ul[nURVVVs/sHupVnU"XQ-Xa-U5PM snnnURSS&ggs snnnf)z`Pad left and right with a given number of characters. Args: count (int): Width of padding. r&Character must be a string of length 1Nrdror*r\)r3r rpad_charactersrr,r-r.s r4rText.padRs 9~"L$LL" &.N*+DJJ<7GHDJE*.)4%EemS[%8)4DKKN sA>c [U5S:XdS5eU(a[X!-UR3Ul[nURVVVs/sHupEnU"XA-XQ-U5PM snnnURSS&ggs snnnf)zPad the left with a given character. Args: count (int): Number of characters to pad. character (str, optional): Character to pad with. Defaults to " ". rrNr)r3r rrr,r-r.s r4pad_left Text.pad_leftbs9~"L$LL" %-.tzzl;DJE*.)4%EemS[%8)4DKKN s A:cn[U5S:XdS5eU(aURX!-3Ulgg)zPad the right with a given character. Args: count (int): Number of characters to pad. character (str, optional): Character to pad with. Defaults to " ". rrN)rdro)r3r rs r4r0Text.pad_rightrs<9~"L$LL"  JJ< (9':;DJ r7alignwidthcURU5 U[UR5- nU(a[US:XaURXC5 gUS:Xa+US-nUR XS5 URXE- U5 gUR XC5 gg)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 " ". leftcenterN)rrror0r)r3rrr excess_spacers r4r Text.align}sy ex 33 |7("#q( d.|2I> l6 r7rc z^^[U[[45(d [S5e[ U5(Ga[U[5(a~[ U5nUR RU5 [ U5n[ U5mUb(URR[XDT-U55 U=RT- sl U$[U[5(a[mUb [S5eURmURb9URRT"TT[ U5-UR55 UR RUR5 URRUU4SjUR55 U=R[ U5- sl 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 instancec3J># UHupnT"UT-UT-U5v M g7fr9rJrr,r-r.rr(s r4rText.append..s3#-8)E%+-s[/@%HH-8ru)rxrRr(rrdrrWrzr\r*r] ValueErrorr.rorv)r3rbr.rer<rr(s @@r4rz Text.appends^$d ,,FG G t99$$$!4T!: !!.1T!.1 $KK&&tF[4H%'PQ + $ #D$''$$L#ll ::)KK&&k;T+BDJJO !!$**- ""#-1[[# D )  r7c ^^[mURmURb9URR T"TT[ U5-UR55 UR R UR5 URRUU4SjUR55 U=R[ U5- slU$)zAppend another Text instance. This method is more performant that Text.append, but only works for Text. Returns: Text: Returns self for chaining. c3J># UHupnT"UT-UT-U5v M g7fr9rJrs r4r#Text.append_text..s3 %0!E %+%s['8% @ @%0ru) r*r]r.r\rzrdrWrorv)r3rbrr(s @@r4 append_textText.append_textsll :: ! KK  u[+D 2I4::V W $**%  %)[[   D !  r7tokensc  URRnURRn[n[ U5nUH9upgU"U5 UbU"U"XU[ U5-U55 U[ U5- nM; XPlU$)aAppend iterable of str and style. Style may be a Style instance or a str style definition. Args: pairs (Iterable[Tuple[str, Optional[StyleType]]]): An iterable of tuples containing str content and style. Returns: Text: Returns self for chaining. )rWrzr\r*rdr])r3rrr rr<contentr.s r4 append_tokensText.append_tokenss|jj'' kk(( T$NG   E&3w<*?GH c'l "F %   r7cNURRUR5 g)z~Copy styles from another Text instance. Args: text (Text): A Text instance to copy styles from, must be the same length. N)r\rv)r3rbs r4 copy_stylesText.copy_styless 4;;'r7)r| allow_blank separatorr|rc^^T(dS5eURmTT;a[UR5/5$U(aBURS[R "[R "T5T555nO?S[[4UU4Sjjn[U4SjURU"5555nU(d&TRT5(aUR5 U$)aSplit 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. zseparator must not be emptyc3@# UHoR5v M g7fr9r6)rr s r4rText.split..s )P )Psr/c3># [R"[R"T5T5HnUR5upUv Uv M g7fr9)rrrr)r r,r-rrbs r4 flatten_spans!Text.split..flatten_spans s<[[9)=tDE!&JEKIEsAAc3J># UHoRT:wdMUv M g7fr9rn)rrrs r4rrs !=yAX!=s# #) rorryrrrrr rPrpop)r3rr|rrrrbs ` @r4rA Text.splits"777yzz D $))+' ' KK )+RYYy5I4)P E  8C=   !%]_!=Et}}Y77 IIK r7offsetsc ^^^^^[U5nU(d[UR5/5$URm[ T5nS/UQUPn[[ XDSS55nUR mURmURm[m[UUUUU4SjU55nUR(dU$URVs/sHowRRPM nn[ U5n [n URHupmSn U nX-S-nX_unnU U:aUS- nO U U:aUS-n OO X-S-nM)U U:aUnO1U=nn U nUUunnU U:aUS- nO U U:aUS-n OO X-S-nM*[UUS-5HGnUUunn[SU U- 5n[!U U- UU- 5nUU:dM4UU"U "UUT55 MI M U$s snf)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. rrNc3>># UHupT"TXTTTS9v M g7f))r.rXrYNrJ)rr,r-rrXrYr.rbs r4rText.divide..2s3 *  U!   *sr)r`rryrordrdr.rXrYr(r\_linesrzr*rangerCr>)r3r_offsetsr(divide_offsets line_ranges new_linesr _line_appends line_countr span_startspan_end lower_bound upper_bound start_line_no line_startline_end end_line_noline_no new_startnew_endrrXrYr.rbs @@@@@r4r Text.divides5=$))+' 'zz$i 4h4 43~ab/ABC  ,,==  *  {{ 8A8H8HI8H++8H I% +/;; 'J%K$K(61r.rWr])r3rrrrs r4rHText.right_cropks_v-   $zzJ& N88j(4::s:xx'@$**MN$   Ajj6'*+    s CACr5cjU=(d UR=(d [nU=(d UR=(d [n[ X`R S5=(d US:Hn[ 5n URSS9Hn SU ;aU RU5 U(a [ U /5n O'[[U 5X(S:HS9n U RU 5n U Hn U RU5 M U(aU RXXxS9 U Hn U RX(S 9 M U RU 5 M U $) a4Word wrap the text. Args: console (Console): Console instance. width (int): Number of characters per line. emoji (bool, optional): Also render emoji code. Defaults to True. 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. FrTrr{r&)r&r)rY)rXr%rYr'rrZrrArrrRrr,rrv) r3rrrXrYr[rZ wrap_justify wrap_overflowrrrrs r4r7 Text.wrap{s0A$,,A/  EDMME5E G\\59QX=QJJ4J0Dt|  *!4&M %c$if=TU KK0 !&"!!L"" e <" LL #!1" r7c[5nURnUR5HnURU5 U"U5 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. )rrzrAr1)r3rrrzrs r4fitText.fits>wJJLD OOE " 4L! r7cX[R"SUR[RS9Vs1sHn[ UR S55iM nn[ [UVs/sHo3S-(aMUPM sn5=(d SnU$s snfs snf![a SnU$f=f)zZAuto-detect indentation of code. Returns: int: Number of spaces used to indent code. ^( *)(.*)$rrr) rrro MULTILINErdr'rrr)r3r  _indentationsindent indentations r4detect_indentationText.detect_indentations]DJJbllS S  A S   s-R-PQzV-RSXWX   S K s/$BB& B 7B =BB B)(B)u│z dim green)rr. indent_sizec@UcUR5OUnUR5nUR5 USUS- -3n[R"S5n/nUR n Sn UR SS9Hn URU R5n U (aU RS5(dU S- n MBU RS5n [[U 5U5upXn-SU-3nUU R[U5S-U lU RUS[U55 U (aUR[UUS 9/U -5 Sn U "U 5 M U (aUR[S US 9/U -5 URS 5R!U5nU$) uSAdds 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. NrsrrrTrrr.r^r_)rryrrcompilerzrAr ror'divmodrdrrvr(rr)r3rrr. _indent_sizerb indent_line re_indentradd_line blank_linesrr r full_indentsremaining_space new_indentrs r4with_indent_guidesText.with_indent_guidess$5@4Gt..0[ yy{ " C JJ}- " ## JJ4J0DOODJJ/E Aq [[^F,23v; ,M )L'67o8M7NOJ#djjZ1B&CCDJ LL3z? 3  $z"?!@;!NO TN1    d2U34{B C??4(--i8r7) r]r\rWr-rXrZrYror.r[)r^r^)r^)r/r()rNr9)r/N)rs)rbr(r/r()rbr(r/N)r_)r)SrKrLrMrNrO __slots__rRrrrrSrPr r*rfrir:rpr5rr}objectrrrrpropertyrr classmethodrrrrrrr rrosetterrarryrrrrrrGetStyleCallablerr rr!r,r1rr:rrFrrrrrrrr0rrrzrrrrrArrHr7rrrrTrJr7r4r(r(es   I#%0 .2/3"&"#&*00S%Z 0 /* 0 +, 0$003-0T #0 0."$"8#8SVIFItI &TIsEz!2IvI4$#$$: $&04-1/3S%Z     - /*+, > $&-1/3"&"###S%Z # /* # +, #$##3-# ##J .2/3  /*  +,  0$&-1/3"&)-*c65i#889*S%Z */* * +, * $ ***tCH~&* **Xs  \\#c#d##tDz \\4:$  V  "! ES%Z EEc] E  E:! HS%Z HHc] H  H6JN 2cN 2+. 29A# 2  2xS#X/CF()C)D)9ce.?C$  $$. 9:;$  $ $V $ }S%Z    :) ?s ?t ?5S5T5; ;+;; ' ;& ;  ;+; ;  ;9 i9 c9 8I;N9 v%(6*%v%N 'HSM 'T 'L04 //+, /  /  /6  t ccD ? .(*#(! ** *  *  *XNhsmNN`T*.2/3"&/// /* / +, //$/ /b C.&*.& .c]. .  .  ..r7__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. Loremboldipsumitaliczjustify='left'redrzjustify='center'greenr)r.rXzjustify='right'bluerightzjustify='full'magentafull)Br functoolsrrmathroperatorrtypingrrr r r r r rrr_loopr_pickr_wraprrrcellsrr containersrcontrolrrrjupyterrmeasurersegmentrr.rrrr r!r"r#r%rQr'rr%rRTextTyperr*r(rKpip._vendor.rich.consolerbrruleprintrJr7r4rs %   *(! #OO#,,%+"+G$ f SE8I#66754:54pZ<Zz$ z0  P D 'F+'H-iG LL!" MM$eM$ MMO LL#$ MM$gxM8 MMO LL"# MM$fgM6 MMO LL!" MM$iM8 MMO3r7