2bi %SSKrSSKrSSKrSSKrSSKrSSKrSSKJrJr SSK J r J r SSK J r SSK Jr SSKJr SSKJr SSKJr SS KJr SS KJr SS KJr SS KJrJrJr SS KJrJrJ r J!r!J"r"J#r#J$r$J%r%J&r&J'r'J(r(J)r)J*r*J+r+J,r, SSK-J.r. \R^S:a SSKJ0r0J1r1J2r2 O SSK3J0r0J1r1J2r2 SSK4J5r5J6r6 SSK7J7r7 SSK8J9r9J:r: SSK;Jr>J?r? SSK@JArAJBrB SSKCJDrDJErE SSKFJGrG SSKHJIrI SSKJJKrKJLrL SSKMJNrO SSKPJQrQJRrR SSKSJTrTJUrU SSKVJWrWJXrX SS KYJZrZ SS!K[J\r\ SS"K]J^r^ SS#K_J`r` SS$KaJbrb SS%KcJdrdJere SS&KfJgrg SS'KhJiriJjrjJkrk SS(KlJmrmJnrn SS)KoJprpJqrq \(aSS*KrJsrs SS+KtJuru SS,KvJwrw S-rxS.ry\R"5S/:Hr{\!\+\|S04/S04r}\0S1r~\0S2r"S3S45r\"5r\GRGR5r\GR GR5r\GRGR5r\\\4r\\4r\DGR\DGR\DGRS6.r"S7S8\&5r\ "S9S:55r\2"S;S<\155r\2"S=S>\155r\+\\\|4r\#\+\\b4r\K"5r"S?S@\5r"SASB5r"SCSD5r"SESF5r"SGSH5r"SISJ5r"SKSL5r"SMSN5rSSP\SQ\!SR\!SR\444SSjjrSQ\4STjr\DGR\DGR\DGRB\DRSU.r\GRG5VVs0sHupX_M snnr\ "SVSW\GRJ55r"SXSY\5rSq\'SZ\S['SS\jrSQ\4S]jr"S^S_5rS`\|SQ\|4Sajr\Sb:Xas\"SOSc9r\GRaSdSeSfSOSgSShSiSjSkSl.SmSn.5 \GRaSoSp\"\55 \GReS/SOSq/SrQSsSt.Su.SgSv/SwQSxSt.Sy/SzQS{St.S|.S}.S~.5 gg!\a SrGNVf=f!\a SrGNHf=f!\a S5rGN:f=fs snnf)N)ABCabstractmethod) dataclassfield)datetime)wraps)getpass)escape)isclass)islice)ceil) monotonic) FrameType ModuleType TracebackType)IO TYPE_CHECKINGAnyCallableDictIterableListMapping NamedTupleOptionalTextIOTupleTypeUnioncast) NULL_FILE))LiteralProtocolruntime_checkable)errorsthemes)_emoji_replace)CONSOLE_HTML_FORMATCONSOLE_SVG_FORMAT) get_fileno)FormatTimeCallable LogRender)Align AlignMethod) ColorSystem blend_rgb)Control) EmojiVariant)NullHighlighterReprHighlighterrender) Measurementmeasure_renderables)Pager SystemPager)Pretty is_expandable) rich_cast)Region) render_scope)Screen)Segment)Style StyleType)Styled)DEFAULT_TERMINAL_THEMESVG_EXPORT_THEME TerminalTheme)TextTextType)Theme ThemeStack)WindowsConsoleFeatures)LiveStatussdWindowsrK)defaultleftcenterrightfull)foldcropellipsisignorec\rSrSrSrg)NoChangeVN)__name__ __module__ __qualname____firstlineno____static_attributes__rbڊ/builddir/build/BUILDROOT/alt-python313-pip-23.3.1-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/pip/_vendor/rich/console.pyr`r`Vsrhr`)kitty256color16colorc0\rSrSr%Sr\\S'\\S'Srg)ConsoleDimensionstzSize of the terminal.widthheightrbN)rcrdrerf__doc__int__annotations__rgrbrhrirorots J. K-rhroc\rSrSr%Sr\\S'\\S'\\S'\\S'\\S'\ \S'\\S 'S r \ \ \S 'S r \ \\S 'S r\ \\S'S r\ \\S'S r\ \\S'S r\ \\S'\S\4Sj5rSSjr\\\\\\\\\S. S\\\4S\\\4S\\\4S \\ \ \4S \\ \\4S\\ \\4S\\ \\4S\\ \\4S\\ \\4SS4SjjrS\SS4SjrS\SS4SjrSSjrS\S\SS4SjrSrg )ConsoleOptions}z$Options for __rich_console__ method.sizelegacy_windows min_width max_width is_terminalencoding max_heightNjustifyoverflowFno_wrap highlightmarkuprrreturncBURRS5(+$)z+Check if renderables should use ascii only.utf)r~ startswithselfs ri ascii_onlyConsoleOptions.ascii_onlys==++E222rhcv[R[5nURR5UlU$)zLReturn a copy of the options. Returns: ConsoleOptions: a copy of self. )rw__new____dict__copyroptionss rirConsoleOptions.copys. #1"8"8"H==--/rh) rqr{r|rrrrrrrrqc bUR5n [U[5(d[SU5=U lU l[U[5(dX*l[U[5(dX:l[U[5(dXJl[U[5(dXZl[U[5(dXjl[U[5(dXzl [U[5(dXl [U [5(dU bXl U cSO [SU 5U l U $)zUpdate values, return a copy.rN) r isinstancer`maxr{r|rrrrrrrr) rrqr{r|rrrrrrrrs riupdateConsoleOptions.updates))+%**475M AG  1)X.. ) )X.. ) '8,,%O(H--' '8,,%O)X.. ) &(++#N&(++!%+"%+^TQGNrhcVUR5n[SU5=UlUlU$)zUpdate just the width, return a copy. Args: width (int): New width (sets both min_width and max_width) Returns: ~ConsoleOptions: New console options instance. r)rrr{r|)rrqrs ri update_widthConsoleOptions.update_widths*))+03Au =G-rhcBUR5nU=UlUlU$)zUpdate the height, and return a copy. Args: height (int): New height Returns: ~ConsoleOptions: New Console options instance. )rrrr)rrrrs ri update_heightConsoleOptions.update_heights#))+.44W^rhc4UR5nSUlU$)zwReturn a copy of the options with height set to ``None``. Returns: ~ConsoleOptions: New console options instance. N)rrrrs ri reset_heightConsoleOptions.reset_heights ))+rhcrUR5n[SU5=UlUlU=UlUlU$)zUpdate the width and height, and return a copy. Args: width (int): New width (sets both min_width and max_width). height (int): New height. Returns: ~ConsoleOptions: New console options instance. r)rrr{r|rrr)rrqrrrs riupdate_dimensions ConsoleOptions.update_dimensionss9))+03Au =G-.44+rhrb)rrw)rcrdrerfrsroruboolrtstrrr JustifyMethodrOverflowMethodrrrrrpropertyrr NO_CHANGErr`rrrrrrgrbrhrirwrw}s. 2N&N&<MO2'+GXm $+0)-Hh~&-1#GXd^#$ $Ix~$,!FHTN!/ FHSM  3D33'0*3*3G3<5>2;1:#S(]##h' # h' # x .89 #0(:;#x~x/0#$12#htnh./#hsmX-.# #J # *:  C ,<  s C  33D9 ==T-- LL $ $U + rhrrrcUR(aIURRS5 UR(aURR S5 ggg)NFT)rrr'rr(rs rirScreenContext.__exit__sB == LL ' ' . ((.  rh)rrrrr)rr)rcrdrerfrsrrFrRenderableTyperrrrrrrrgrbrhrirrssIK /3^[T5S[S[S[4UU4Sjj5nU$)zGConvert a method that returns an iterable of renderables in to a Group.argskwargsrc*>T"U0UD6n[UST06$)Nr/)r")r?r@rr/r=s ri_replace*group..decorator.._replaces" $1&1K+/3/ /rh)rrr")r=rBr/s` ri decoratorgroup..decorators7 v 0C 03 05 0  0rh)rrr-r")r/rDs` rigrouprFs8 h~667  #u*   rhc[ [5nURRnS[ UR5;d![ R "S5(dUS:XagUS:Xagg![a gf=f)z-Check if we're running in a Jupyter notebook.Fz google.colabDATABRICKS_RUNTIME_VERSIONZMQInteractiveShellTTerminalInteractiveShell) get_ipython NameError __class__rcrosgetenv)ipythonshells ri _is_jupyterrRsvmG    & &E#g//00 991 2 2 ) ) , , sA++ A87A8)standard256 truecolorwindowscN\rSrSr%Sr\\S'\"\S9r \ \ \S'Sr \ \S'Srg ) ConsoleThreadLocalsi#z(Thread local values for Console context. theme_stack)default_factoryrr buffer_indexrbN)rcrdrerfrsrNrurr5rrrDr[rtrgrbrhrirXrX#s(2!$7FDM7L#rhrXc@\rSrSrSr\S\\S\\4Sj5rSr g) RenderHooki,z(Provides hooks in to the render process.rrcg)aCalled with a list of objects to render. This method can return a new list of renderables, or modify and return the same list. Args: renderables (List[ConsoleRenderable]): A number of renderable objects. Returns: List[ConsoleRenderable]: A replacement list of renderables. Nrb)rrs riprocess_renderablesRenderHook.process_renderables/srhrbN) rcrdrerfrsrrrr_rgrbrhrir]r],s32   12       rhr]rO_windows_console_featurescB[b[$SSKJn U"5q[$)Nr'get_windows_console_features)ra_windowsrdrcs rirdrdBs  ,((6 < > $$rhcN[=(a [5R(+$)zDetect legacy Windows.)WINDOWSrdvtrbrhridetect_legacy_windowsriLs  <79<<<\.S)S4S?jr/SS@jr0S)\ 4SAjr1SSB.S\SC\S)S4SDjjr2SSEjr3SSB.S\SC\S)\44SFjjr5\S)\ \ 4SGj5r6\S)\ 4SHj5r7\S)\4SIj5r8\S)\4SJj5r9\S)\:4SKj5r;\S)\<4SLj5r=\=R:SM\>\\4S)S4SNj5r=\S)\4SOj5r?\?R:S\S)S4SPj5r?\S)\4SQj5r@\@R:S\S)S4SRj5r@SSSjrAS)\B4STjrCSSU\ \DSV\SW\S)\E4SXjjrFSSZ\S)S4S[jjrGSS\\S)S4S]jjrHS^S_S`SaSb.Sc\ISd\ Se\Sf\Sg\S)Sh4 SijjrJSSj\S)\4SkjjrKSSl\S)\4SmjjrL\S)\4Snj5rMSo\ S)\4SpjrNSSq\S\ \S)Sr4SsjjrOSSt.Su\ISv\ \:S)\P4SwjjrQSSu\ISv\ \:S)\R\4SxjjrSSSSSSy.Su\ISv\ \:S\ \TSz\S{\S)\\\4 S|jjjrUS}SSSSSSS~.S\ S\\ \T4S\ \VS\ \WS\ \S\ \S\ \S"\ \XS)S4SjjrYSS.S\\ \T4S\ \\T\ 4S)\T4SjjrZSSSSS.S\R\.S\ S\ S\ \VS\ \S\ \S\ \S)\\[4Sjjr\SSSSS.So\]S\ S\\ \T4S\^S)S4 Sjjjr_S\`S)S4SjraSSSSS.S\.S\ S\ S\ \\ \T4S\ \S)S4 SjjrbSSSSSSSSSSSSSSS.S\.S\ S\ S\ \\ \T4S\ \VS\ \WS\ \S\ \S\ \S\ \S\ \S\ \S\S\ \S\S)S4 SjjrcSSSSSSSSSSS. S\ \ S\.S\S\\ 4S\S\S\S\S\S\ \\./\.4S\S)S4SjjjrdSSS.Su\IS\ \eSv\ \:S)S4SjjrfSS\\\S\S\S)S4SjjrgSSSSSSSS.S\ \S\S\ \ S\S\S\R\\ \h4S\S)S4Sjjri\j\kR4S\S\/\ \m4S)\>\ \\n\ \.444Sjj5roSSSSSSSSSYS. S\.S\ S\ S\ \\ \T4S\ \VS\ \S\ \S\ \S\S\S)S4SjjrpSSjrqS\R\S)\ 4SjrrSSSSSS.S\]S\S\S\S\ \sS)\ 4 SjjjrtSSS.S\SV\S)\ 4SjjruSSS.S\ S\SV\S)S4SjjrvSSSSS.S\ \wS\S\ \ S\S)\ 4 SjjrxSS\ySS.S\ S\ \wS\S\ S\S)S4 SjjrzSSS\{SSS.So\ S\ \wS\S\ S\S\ \ S)\ 4Sjjr|SSS\{SSS.S\ So\ S\ \wS\S\ S\S\ \ S)S4Sjjr}Sr~g)riQa A high level console interface. Args: color_system (str, optional): The color system supported by your terminal, either ``"standard"``, ``"256"`` or ``"truecolor"``. Leave as ``"auto"`` to autodetect. force_terminal (Optional[bool], optional): Enable/disable terminal control codes, or None to auto-detect terminal. Defaults to None. force_jupyter (Optional[bool], optional): Enable/disable Jupyter rendering, or None to auto-detect Jupyter. Defaults to None. force_interactive (Optional[bool], optional): Enable/disable interactive mode, or None to auto detect. Defaults to None. soft_wrap (Optional[bool], optional): Set soft wrap default on print method. Defaults to False. theme (Theme, optional): An optional style theme object, or ``None`` for default theme. stderr (bool, optional): Use stderr rather than stdout if ``file`` is not specified. Defaults to False. file (IO, optional): A file object where the console should write to. Defaults to stdout. quiet (bool, Optional): Boolean to suppress all output. Defaults to False. width (int, optional): The width of the terminal. Leave as default to auto-detect width. height (int, optional): The height of the terminal. Leave as default to auto-detect height. style (StyleType, optional): Style to apply to all output, or None for no style. Defaults to None. no_color (Optional[bool], optional): Enabled no color mode, or None to auto detect. Defaults to None. tab_size (int, optional): Number of spaces used to replace a tab character. Defaults to 8. record (bool, optional): Boolean to enable recording of terminal output, required to call :meth:`export_html`, :meth:`export_svg`, and :meth:`export_text`. Defaults to False. markup (bool, optional): Boolean to enable :ref:`console_markup`. Defaults to True. emoji (bool, optional): Enable emoji code. Defaults to True. emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None. highlight (bool, optional): Enable automatic highlighting. Defaults to True. log_time (bool, optional): Boolean to enable logging of time by :meth:`log` methods. Defaults to True. log_path (bool, optional): Boolean to enable the logging of the caller by :meth:`log`. Defaults to True. log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%X] ". highlighter (HighlighterType, optional): Default highlighter. legacy_windows (bool, optional): Enable legacy Windows mode, or ``None`` to auto detect. Defaults to ``None``. safe_box (bool, optional): Restrict box options that don't render on legacy Windows. get_datetime (Callable[[], datetime], optional): Callable that gets the current time as a datetime.datetime object (used by Console.log), or None for datetime.now. get_time (Callable[[], time], optional): Callable that gets the current time in seconds, default uses time.monotonic. _environautoNFr#Tz[%X]) color_systemforce_terminal force_jupyterforce_interactive soft_wraprstderrfilequietrqrrrno_colortab_sizerecordremoji emoji_variantrlog_timelog_pathlog_time_format highlighterrzsafe_box get_datetimeget_timerkrm)rlrSrTrUrVrnrorprqrrrrsrtrqrrrrurvrwrrxryrrzr{r|r}HighlighterTyperzr~rrcfUbUUlUc [5OUUlUR(aU cEURRS5nUb!UR 5(a [ U5n O[ n U cEURRS5nUb!UR 5(a [ U5n O[n XlXl UUl UUl UUl UUl Uc"[5=(a UR(+OUUlU cKURRS5nUb-UR 5(a[ U5UR- n U c>URRS5n U b U R 5(a [ U 5n XPlXlXlU SUlUbX lXlXlXplUcSUlO*US:XaUR15UlO[2UUl[4R6"5Ul[;UUUS9UlU=(d [>Ul UUl!U=(d [DRFUl$U=(d [JUl&Xl'U bU OSUR;Ul(Uc$URR=(a URT(+OUUl+[4R6"5Ul,[[[]Uc[^R`OU5S9Ul1/Ul2/Ul3SUl4S Ul5g) NJUPYTER_COLUMNS JUPYTER_LINESCOLUMNSLINESrl) show_time show_path time_formatNO_COLOR)rYF)6rkrR is_jupyterrisdigitrtJUPYTER_DEFAULT_COLUMNSJUPYTER_DEFAULT_LINESrvrw_markup_emoji_emoji_variant _highlightrirzrq_width_height_force_terminal_filertrr _color_system_detect_color_system COLOR_SYSTEMS threadingRLockrr/ _log_render_null_highlighterr}r~rnowrrrrrur}is_dumb_terminalis_interactive_record_buffer_lockrXrNr)DEFAULT_thread_locals_record_buffer _render_hooks_live_is_alt_screen)!rrmrnrorprqrrrrsrtrqrrrrurvrwrrxryrrzr{r|r}rzr~rrrkjupyter_columns jupyter_linescolumnsrs! rirConsole.__init__wsF  $DM+8+@+-m ??}"&--"3"34E"F".?3J3J3L3L0E3E~ $ 1 1/ B  ,1F1F1H1H /F2F    6C#%# $ MM%%g.E U]]__U"   #  %#1     !%D  V #!%!:!:!>N .0/1'+ #rhrc>SURSUR<S3$)Nz)rqrrs ri__repr__Console.__repr__s"  Ad.@.@-C1EErhcUR=(d1 UR(a[RO[Rn[ USU5nUc[ nU$)z Get the file object to write to.rich_proxied_file)rrrsysstdoutgetattrr!)rrss rirs Console.files@zzHDKKcjjSZZt0$7 <D rhnew_filecXlg)zSet a new file object.N)r)rrs rirsrs  rhc.URR$zGet a thread local buffer.)rrrs rir Console._buffers"")))rhc.URR$rrr[rs ri _buffer_indexConsole._buffer_index s""///rhvaluec$XRlgrr)rrs rirrs+0(rhc.URR$)z!Get the thread local theme stack.)rrYrs ri _theme_stackConsole._theme_stacks""...rhcUR(a[R$UR(aUR(ag[ (a\UR (a[R $[5nUR(a[R$[R$URRSS5R5R5nUS;a[R$URRSS5R5R5nURS5upEn[RU[R 5nU$)z"Detect color system from env vars.N COLORTERMr)rU24bitTERM-)rr2 TRUECOLORr}rrgrzrdrU EIGHT_BITrkrstriplower rpartition _TERM_COLORSSTANDARD)rwindows_console_features color_termterm _term_name_hyphencolorsrms rirConsole._detect_color_systems ??(( (4#8#8 7"""***'C'E $,55%% !**  **;;AACIIKJ33",,,==$$VR0668>>@D*.//#*> 'J'++FK4H4HIL rhc.U=RS- slg)z4Enter in to a buffer context, and buffer all output.r'N)rrs rirConsole._enter_buffer/s arhcNU=RS-slUR5 g)z5Leave buffer context, and render content if required.r'N)r _check_bufferrs rirConsole._exit_buffer3s a rhcUR URb[R"S5eXlSSS5 g!,(df  g=f)zSet Live instance. Used by Live context manager. Args: live (Live): Live instance using this Console. Raises: errors.LiveError: If this Console has a Live context currently active. Nz+Only one live display may be active at once)rrr( LiveError)rlives riset_liveConsole.set_live8s6ZZzz%&&'TUUJZZs *A Ac^UR SUlSSS5 g!,(df  g=f)zClear the Live instance.N)rrrs ri clear_liveConsole.clear_liveFs ZZDJZZs ,hookcUR URRU5 SSS5 g!,(df  g=f)zXAdd a new render hook to the stack. Args: hook (RenderHook): Render hook instance. N)rrappend)rrs ripush_render_hookConsole.push_render_hookKs) ZZ    % %d +ZZs 2 AcUR URR5 SSS5 g!,(df  g=f)z'Pop the last renderhook from the stack.N)rrpoprs ripop_render_hookConsole.pop_render_hookTs% ZZ    " " $ZZs1 ?c&UR5 U$)z,Own context manager to enter buffer context.rrs rirConsole.__enter__Ys  rhr exc_value tracebackc$UR5 g)zExit buffer context.N)r)rrrrs rirConsole.__exit__^s rhc$UR5 g)z`Begin capturing console output. Call :meth:`end_capture` to exit capture mode and return output.Nrrs rirConsole.begin_capturebs rhczURUR5nURSS2 UR5 U$)zPEnd capture mode and return captured string. Returns: str: Console output. N)r r r)r render_results rirConsole.end_capturefs5 ++DLL9 LLO rhrrc6URRXS9 g)a`Push a new theme on to the top of the stack, replacing the styles from the previous theme. Generally speaking, you should call :meth:`~rich.console.Console.use_theme` to get a context manager, rather than calling this method directly. Args: theme (Theme): A theme instance. inherit (bool, optional): Inherit existing styles. Defaults to True. rN)rrrrrs rirConsole.push_themeqs $$U$E'' 'DKKll*F  04   +#J8   ' G<s$5FF.F+*F+.GGnew_sizec$Uup#X lX0lg)z^Set a new size for the terminal. Args: new_size (Tuple[int, int]): New width and height. N)rr)rr#rqrrs riryr" s!   rhc.URR$)z[Get the width of the console. Returns: int: The width (in characters) of the console. )ryrqrs rirq Console.widthsyyrhcXlg)z.Set width. Args: width (int): New width. N)r)rrqs rirqr&!s  rhc.URR$)zXGet the height of the console. Returns: int: The height (in lines) of the console. )ryrrrs rirrConsole.height*syyrhcXlg)z1Set height. Args: height (int): new height. N)r)rrrs rirrr)3s  rhcLUR[R"55 g)z3Play a 'bell' sound (if supported by the terminal).N)controlr4bellrs rir- Console.bell<s W\\^$rhc[U5nU$)aA context manager to *capture* the result of print() or log() in a string, rather than writing it to the console. Example: >>> from rich.console import Console >>> console = Console() >>> with console.capture() as capture: ... console.print("[bold magenta]Hello World[/]") >>> print(capture.get()) Returns: Capture: Context manager with disables writing to the terminal. )r)rcaptures rir0Console.capture@s$-rhrrrc[XX#S9$)aA context manager to display anything printed within a "pager". The pager application is defined by the system and will typically support at least pressing a key to scroll. Args: pager (Pager, optional): A pager object, or None to use :class:`~rich.pager.SystemPager`. Defaults to None. styles (bool, optional): Show styles in pager. Defaults to False. links (bool, optional): Show links in pager. Defaults to False. Example: >>> from rich.console import Console >>> from rich.__main__ import make_test_card >>> console = Console() >>> with console.pager(): console.print(make_test_card()) Returns: PagerContext: A context manager. )rrr)r)rrrrs rir Console.pagerQs*DfJJrhr'rcRUS:dS5eUR[U55 g)zYWrite new line(s). Args: count (int, optional): Number of new lines. Defaults to 1. rzcount must be >= 0N)r$rrs rir Console.linehs&z///z 75>"rhhomecU(a9UR[R"5[R"55 gUR[R"55 g)zoClear the screen. Args: home (bool, optional): Also move the cursor to 'home' position. Defaults to True. N)r,r4clearr6)rr6s rir8 Console.clearrs3  LL',,. 9 LL )rhdotszstatus.spinnerg?g)@)spinner spinner_stylespeedrefresh_per_secondstatusr;r<r=r>rRc (SSKJn U"UUUUUUS9nU$)a,Display a status and spinner. Args: status (RenderableType): A status renderable (str or Text typically). spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots". spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner". speed (float, optional): Speed factor for spinner animation. Defaults to 1.0. refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5. Returns: Status: A Status object that may be used as a context manager. r'rQ)rr;r<r=r>)r?rR)rr?r;r<r=r>rRstatus_renderables rir?Console.status}s,* #" '1  ! rhr crUR(a&UR[R"U55 gg)zYShow or hide the cursor. Args: show (bool, optional): Set visibility of the cursor. TF)r}r,r4r()rr s rir(Console.show_cursors*    LL,,T2 3rhenablecSnUR(a>UR(d-UR[R"U55 SnXlU$)azEnables alternative screen mode. Note, if you enable this mode, you should ensure that is disabled before the application exits. See :meth:`~rich.Console.screen` for a context manager that handles this for you. Args: enable (bool, optional): Enable (True) or disable (False) alternate screen. Defaults to True. Returns: bool: True if the control codes were written. FT)r}rzr,r4 alt_screenr)rrEchangeds rir'Console.set_alt_screensA   D$7$7 LL++F3 4G"( rhcUR$)znCheck if the alt screen was enabled. Returns: bool: True if the alt screen was enabled, otherwise False. )rrs ri is_alt_screenConsole.is_alt_screens"""rhtitlecrUR(a&UR[R"U55 gg)a|Set the title of the console terminal window. Warning: There is no means within Rich of "resetting" the window title to its previous value, meaning the title you set will persist even after your application exits. ``fish`` shell resets the window title before and after each command by default, negating this issue. Windows Terminal and command prompt will also reset the title for you. Most other shells and terminals, however, do not do this. Some terminals may require configuration changes before you can set the title. Some terminals may not support setting the title at all. Other software (including the terminal itself, the shell, custom prompts, plugins, etc.) may also set the terminal window title. This could result in whatever value you write using this method being overwritten. Args: title (str): The new title of the terminal window. Returns: bool: True if the control code to change the terminal title was written, otherwise False. Note that a return value of True does not guarantee that the window title has actually changed, since the feature may be unsupported/disabled in some terminals. TF)r}r,r4rM)rrMs riset_window_titleConsole.set_window_titles(6    LLu- .rhrrc([XU=(d SS9$)aEContext manager to enable and disable 'alternative screen' mode. Args: hide_cursor (bool, optional): Also hide the cursor. Defaults to False. style (Style, optional): Optional style for screen. Defaults to None. Returns: ~ScreenContext: Context which enables alternate screen on enter, and disables it on exit. r)rr)r)rrrs rirConsole.screensT%+2NNrhrr#rcZ[R"X=(d URU5nU$)aMeasure a renderable. Returns a :class:`~rich.measure.Measurement` object which contains information regarding the number of characters required to print the renderable. Args: renderable (RenderableType): Any renderable or string. options (Optional[ConsoleOptions], optional): Options to use when measuring, or None to use default options. Defaults to None. Returns: Measurement: A measurement of the renderable. )r:rr)rr#r measurements rimeasureConsole.measures#"ood,Ct||ZP rhc## U=(d URnURS:ag[U5n[US5(a"[ U5(dUR X5nOf[ U[5(a6URXRURS9nUR X5nO[R"SU<S35e[U5n[nUR!5nUH2n[ X5(aUv MUR#X5ShvN M4 g![a [R"SU<S35ef=fN27f) a#Render an object in to an iterable of `Segment` instances. This method contains the logic for rendering objects with the console protocol. You are unlikely to need to use it directly, unless you are extending the library. Args: renderable (RenderableType): An object supporting the console protocol, or an object that may be converted to a string. options (ConsoleOptions, optional): An options object, or None to use self.options. Defaults to None. Returns: Iterable[Segment]: An iterable of segments that may be rendered. r'Nr)rrzUnable to render zC; A str, Segment or object with __rich_console__ method is requiredzobject z is not renderable)rr|r@r r rrr render_strrrr(NotRenderableErroriter TypeErrorrDrr9) rr#r_optionsrender_iterabletext_renderable iter_render_Segment render_outputs rir9Console.rendersJ"*dll    ! z* :1 2 27:;N;N(99$IO  C ( ("oo&8&8.O.>>tNO++#J>2TT   /K ((*(M-22##;;}??? )  ++/,,>?  @s+C E D(AEE E(&EE)rpad new_linesrdrec UR U=(d URnURX5nU(a[R"Xs5nUR nUb [ SU5n[[[R"UURUUUS9SU55n UR bwUR [U 5- n U S:aYU(a$[SUR-U5[S5/O[SUR-U5//n U RX-5 U sSSS5 $!,(df  g=f)aGRender objects in to a list of lines. The output of render_lines is useful when further formatting of rendered console text is required, such as the Panel class which draws a border around any renderable object. Args: renderable (RenderableType): Any object renderable in the console. options (Optional[ConsoleOptions], optional): Console options, or None to use self.options. Default to ``None``. style (Style, optional): Optional style to apply to renderables. Defaults to ``None``. pad (bool, optional): Pad lines shorter than render width. Defaults to ``True``. new_lines (bool, optional): Include " " characters at end of lines. Returns: List[List[Segment]]: A list of lines, where a line is a list of Segment objects. Nr)include_new_linesrdrrr) rrr9rD apply_stylerrrr5r split_and_crop_linesr|r!extend) rr#rrrdrerender_options _rendered render_heightr extra_linespad_lines ri render_linesConsole.render_lines9s!0ZZ$4 N J?I#// A *11M( #A} 5 00!&00*3# !  E$$0,33c%j@ ?%!~'?'?!?GQUW%cN,D,D&DeLM H LL!78CZZs DD11 D?r)rrrrxrrr}textrrrKcU=(d USL=(a URn U=(d USL=(a URn U=(d USL=(a URn U (a#[UUU URS9n XConvert a string to a Text instance. This is called automatically if you print or log a string. Args: text (str): Text to render. style (Union[str, Style], optional): Style to apply to rendered text. justify (str, optional): Justify method: "default", "left", "center", "full", or "right". Defaults to ``None``. overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to ``None``. emoji (Optional[bool], optional): Enable emoji, or ``None`` to use Console default. markup (Optional[bool], optional): Enable markup, or ``None`` to use Console default. highlight (Optional[bool], optional): Enable highlighting, or ``None`` to use Console default. highlighter (HighlighterType, optional): Optional highlighter to apply. Returns: ConsoleRenderable: Renderable object. N)rrxry)default_variant)rrr) rrr render_markuprrrrKr*r}r copy_styles)rrrrrrrxrrr} emoji_enabledmarkup_enabledhighlight_enabled rich_text _highlighterhighlight_texts rirYConsole.render_strts8@%4-"?DKK DFdN$Ct||%P)t*;*O %#"11 I !( !)  t5H5HI! I=N 7t'7'7SW  #)#i.9N  & &y 1! !rh)rVnamerVc[U[5(aU$URRU5nUc[R"U5nUR (aUR 5$U$![Ra<nUbURU5sSnA$[R"SU<SU35SeSnAff=f)zGet a Style instance by its theme name or parse a definition. Args: name (str): The name of a style or a style definition. Returns: Style: A Style object. Raises: MissingStyle: If no style could be parsed from name. NzFailed to get style z; ) rrErrparselinkrr(StyleSyntaxError get_style MissingStyle)rr~rVrerrors rirConsole.get_styles dE " "K %%))$/E} D)#(::5::< 85 8&& "~~g..%%&thb8  s*AA0.A00CB;CB;;Crrxrrobjectssepr c ^^^^^^/nURm/mTRn TmTS;aS[SS4UU4Sjjn U m[n U(dUcUR(a URn S UUUUU4Sjjn UHn [ U 5n [ U [5(aU "URXXkS95 M;[ U [5(a U "U 5 MZ[ U [5(aU "5 T"U 5 M[U 5(aU "5 T"[XS95 MU "U "[U 555 M U "5 URb6URUR5nUV s/sHn [X5PM nn U$s sn f) aCombine a number of renderables and text into one renderable. Args: objects (Iterable[Any]): Anything that Rich can render. sep (str): String to write between print data. end (str): String to write at end of print data. justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``. emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Returns: List[ConsoleRenderable]: A list of things to render. )rWrXrYr#rNc F>T"[U[[T555 gr)r0r r1)r#_appendrs ri align_append2Console._collect_renderables..align_appendsj${G*DEFrhcz>T(a3[TTTS9nT"URT55 TR5 gg)N)rr )rKjoinr8)sep_textrr rrrrs ri check_text0Console._collect_renderables..check_texts3W#>x}}T*+ rh)rxrr})r}rN)rr-rrr}r@rrrYrKrr?r>rrrG)rrrr rrxrrr append_textrr{rr#rrrrrs ``` @@@ri_collect_renderablesConsole._collect_renderablesse202 $$kk  1 1 G GD G G"F(9 *t++L   "J":.J*c**OO"$ J--J'J(9:: z"z** vjCDLZ9:#"&  :: !NN4::.EGRS{6*4{KSTs/Fu─z rule.linerX) charactersralignrrc@SSKJn U"XX4S9nURU5 g)u}Draw a line with optional centered title. Args: title (str, optional): Text to render over the rule. Defaults to "". characters (str, optional): Character(s) to form the line. Defaults to "─". style (str, optional): Style of line. Defaults to "rule.line". align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center". r')Rule)rMrrrN)rulerr$)rrMrrrrrs rir Console.rules %eQ 4rhr,cUR(d.U URRSU55 SSS5 gg!,(df  g=f)zzInsert non-printing control codes. Args: control_codes (str): Control codes, such as those that may move the cursor. c38# UHoRv M g7fr)segment).0_controls ri "Console.control..5s#MW$4$4WN)rr rj)rr,s rir,Console.control-s: $$ ###MW#MM%s #A Arr)rr rrc bURSU55nURUUUSSSSSUS9 g)aoOutput to the terminal. This is a low-level way of writing to the terminal which unlike :meth:`~rich.console.Console.print` won't pretty print, wrap text, or apply markup, but will optionally apply highlighting and a basic style. Args: sep (str, optional): String to write between print data. Defaults to " ". end (str, optional): String to write at end of print data. Defaults to "\\n". style (Union[str, Style], optional): A style to apply to output. Defaults to None. highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to ``None``. c38# UHn[U5v M g7fr)r)r_objects rirConsole.out..Js"GwG3w<.sIL Lrr'rrd)rrqrrr_rrminrqrrjr9rDrhrr!r splitlinesinsertrr ri)rrr rrrrrxrrrqrrr\rqrr render_hooksrrrk new_segmentsrjr9r# buffer_extendrs rir$ Console.printWsJylG  I #D))!, 33#4K%"66{C %!\\00!050Ac%,y#1N+-L!((F[[F}"-J6*n=>#.#.J++":~>u@U#. ILIITTVW!''7<<>: $ 3 3 #88 $**%D"$'  ##L1aTTs F$G33 Hrj) dataindentr skip_keys ensure_asciicheck_circular allow_nanrV sort_keysjsonrrrrrrrc SSKJn UcU RUUUUUUUU U S9 n O3[U[5(d[ SU<S35eU "UUUUUUUU U S9 n UR U SS9 g) aPretty prints JSON. Output will be valid JSON. Args: json (Optional[str]): A string containing JSON. data (Any): If json is not supplied, then encode this data. indent (Union[None, int, str], optional): Number of spaces to indent. Defaults to 2. highlight (bool, optional): Enable highlighting of output: Defaults to True. skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False. ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False. check_circular (bool, optional): Check for circular references. Defaults to True. allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True. default (Callable, optional): A callable that converts values that can not be encoded in to something that can be JSON encoded. Defaults to None. sort_keys (bool, optional): Sort dictionary keys. Defaults to False. r)JSONN)rrrrrrrVrz/json must be str. Did you mean print_json(data=z) ?T)rq)pip._vendor.rich.jsonr from_datarrr\r$) rrrrrrrrrrVrrjson_renderables ri print_jsonConsole.print_jsons: / <"nn##)-##- OdC((EdXSQ###)-## O ?d 3rh)regionrrcjUR(d[R"S5eU=(d URnUc=S=pVUR UR UR =(d UR 5nOUupVpxUR Xx5nURXS9n URXU5 g)asUpdate the screen at a given offset. Args: renderable (RenderableType): A Rich renderable. region (Region, optional): Region of screen to update, or None for entire screen. Defaults to None. x (int, optional): x offset. Defaults to 0. y (int, optional): y offset. Defaults to 0. Raises: errors.NoAltScreen: If the Console isn't in alt screen mode. 0Alt screen must be enabled to call update_screenNrrS) rKr( NoAltScreenrrr|rrrpupdate_screen_lines) rr#rrrkrrrqrrrs ri update_screenConsole.update_screens&!!$$%WX X 0DLL >IA+==((.*?*?*N4;;N#) A%+==eLN!!*!E   1-rhrrrcUR(d[R"S5e[XU5nUR U5nUR R U5 UR5 g)a\Update lines of the screen at a given offset. Args: lines (List[List[Segment]]): Rendered lines (as produced by :meth:`~rich.Console.render_lines`). x (int, optional): x offset (column no). Defaults to 0. y (int, optional): y offset (column no). Defaults to 0. Raises: errors.NoAltScreen: If the Console isn't in alt screen mode. rN)rKr(rrr9r rjr)rrrr screen_updaters rirConsole.update_screen_linessW!!$$%WX X$Uq1 ;;}- H% rhrTr"rbrqrnr word_wrap show_localssuppress max_framesrnrrrrc JSSKJn U"UUUUUUUS9n URU 5 g)aPrints a rich render of the last exception and traceback. Args: width (Optional[int], optional): Number of characters used to render code. Defaults to 100. extra_lines (int, optional): Additional lines of code to render. Defaults to 3. theme (str, optional): Override pygments theme used in traceback word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False. show_locals (bool, optional): Enable display of local variables. Defaults to False. suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback. max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100. r') TracebackrN)rrr$) rrqrnrrrrrrrs riprint_exceptionConsole.print_exception-s4, )##!  9rhr currentframec\US- nU"5nUbYU(a UbURnUS-nU(aUbMUceURRURUR4$[ R "5UnURURURR4$)aGet caller frame information. Args: offset (int): the caller offset within the current frame stack. currentframe (Callable[[], Optional[FrameType]], optional): the callable to use to retrieve the current frame. Defaults to ``inspect.currentframe``. Returns: Tuple[str, int, Dict[str, Any]]: A tuple containing the filename, the line number and the dictionary of local variables associated with the caller frame. Raises: RuntimeError: If the stack offset is invalid. r') f_backf_code co_filenamef_linenof_localsinspectstackfilenamelinenoframe)rrr frame_infos ri_caller_frame_infoConsole._caller_frame_infoPs( !   U. ! U.$ $$<<++U^^U^^K K!0J&& (9(9:;K;K;T;TT Trh) rr rrrxrr log_locals _stack_offsetrrc U (d [54n URSSn U URU UUUUUUS9n UbU V s/sHn [X5PM n n UR U 5upnUR S5(aSO[ RRU5nUR[ R5SnU(aWUR5VVs0sH!unnUR S5(aMUU_M# nnnU R[USS95 URUU UR5UUUS9/n U HnUR!U 5n M /nUR"nUR$nUR&nU Hn U"U"U U55 M UR(R"n[*R,"UUR.S S 9H nU"U5 M SSS5 gs sn fs snnf!,(df  g=f) aPLog rich content to the terminal. Args: objects (positional args): Objects to log to the terminal. sep (str, optional): String to write between print data. Defaults to " ". end (str, optional): String to write at end of print data. Defaults to "\\n". style (Union[str, Style], optional): A style to apply to output. Defaults to None. justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``. overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to None. emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to None. markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to None. highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to None. log_locals (bool, optional): Boolean to enable logging of locals where ``log()`` was called. Defaults to False. _stack_offset (int, optional): Offset of caller from end of call stack. Defaults to 1. Nr<__z [i]locals)rM)rzpathline_no link_pathFr)rrrrGrrrNrabspathrritemsrrBrrr_rjr9rr rDrirq)rrr rrrxrrrrrrrr#rrlocalsrrkeyr locals_maprrrjr9rkrrs rilog Console.logss:ylG))!, 33#4K KVW;Zvj8; W(,(?(? (N %Hv ( 3 3C 8 8bggooh>WI&&rvv.r2D'-lln&4 U>>$/CJ&4 ""< +#NO  !..0#' ! K%"66{C %*,L!((F[[F!\\N) vj.9:* LL//M44djjed#WTX #Ts1G7G,B G7G1G1CG7, G77 Hc UR(aURSS2 gUR UR(a=UR UR R URSS5 SSS5 URS:XGauUR(aFSSK J n U"URURURSS55 URSS2 GO[(GaSnUR(a![UR5nUb U[ ;nU(avSSKJn SSKJn URSSnUR*(a0UR,(a[/[0R2"U55nU"Xd"UR55 GO8URURSS5nURR4nSn [7U5U ::a U"U5 O/n U R8n Sn UR;S 5H[n U [7U 5-U :a0U (a)U"S R=U 55 U R?5 Sn U "U 5 U [7U 5- n M] U (a'U"S R=U 55 U R?5 O:URURSS5nURR5U5 URRE5 URSS2 SSS5 g!,(df  GN=f![@anURBS 3Ul!eSnAff=f![@anURBS 3Ul!eSnAff=f!,(df  g=f) a1Check if the buffer may be rendered. Render it if it can (e.g. Console.quiet is False) Rendering is supported on Windows, Unix and Jupyter environments. For legacy Windows consoles, the win32 API is called directly. This method will also record what it renders if recording is enabled via Console.record. Nrr')displayF)LegacyWindowsTerm)legacy_windows_renderi TrzG *** You may need to add PYTHONIOENCODING=utf-8 to your environment ***)#rtr rrwrrrjrrjupyterrr rgrzr-rs_STD_STREAMS_OUTPUTpip._vendor.rich._win32_consoler"pip._vendor.rich._windows_rendererrrurr5rD remove_colorwriter!rrrr8UnicodeEncodeErrorreasonflush)rruse_legacy_windows_renderfilenorrrrrr MAX_WRITEbatch batch_appendryrrs rirConsole._check_buffers :: Q  ZZ{{--''..t||A?.!!Q&??0DLL$*=*=dll1o*NO Qw491..%/ %:F%1$*.A$A!:5Y`%)\\!_F#}}1C1C)-g.B.B6.J)K1&:KDII:VW$(#6#6t||A#GD%)IIOOE(6I&#&t9 #9$)$K79E38<upxn U(aU"URUUUS95 M&U(a U (aM6U"U5 M@ SRU5n U $)z)Render buffered output, and clear buffer.)rmrzr) rrrzr}rurDrr9r) rroutputrrmrz not_terminalrrrr,rendereds rir Console._render_buffers)) ,,+++ ==\))&1F$* DLL%1'5!#wwt %+776?rh)rrxpasswordstreampromptrrcU(aURXUSS9 U(a [SUS9nU$U(aUR5nU$[5nU$)aDisplays a prompt and waits for input from the user. The prompt may contain color / style. It works in the same way as Python's builtin :func:`input` function and provides elaborate line editing and history features if Python's builtin :mod:`readline` module is previously loaded. Args: prompt (Union[str, Text]): Text to render in the prompt. markup (bool, optional): Enable console markup (requires a str prompt). Defaults to True. emoji (bool, optional): Enable emoji (requires a str prompt). Defaults to True. password: (bool, optional): Hide typed text. Defaults to False. stream: (TextIO, optional): Optional file to read input from (rather than stdin). Defaults to None. Returns: str: Text read from stdin. r)rrxr )r)r$r readlineinput)rrrrxrrresults rir Console.input,sU.  JJvErJ B R/F  *  rhr8rr8cHUR(dS5eUR U(a#SRSUR55nO"SRSUR55nU(aURSS2 SSS5 U$!,(df  W$=f)aqGenerate text from console contents (requires record=True argument in constructor). Args: clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. styles (bool, optional): If ``True``, ansi escape codes will be included. ``False`` for plain text. Defaults to ``False``. Returns: str: String containing console contents. ITo export console contents set record=True in the constructor or instancerc3\# UH"upnU(aURU5OUv M$ g7frr8)rrrr_s rir&Console.export_text..`s+*=Q,1U\\$'d:*=s*,c3`# UH$nUR(aMURv M& g7fr)r,rrrs rirr"es$#6"??!GLL#6s..N)rwrrr)rr8rrrs ri export_textConsole.export_textNs KK W V W  % %ww*.*=*= ww#'#6#6 ''*& & % s A#B B!rcURX#S9n[USSS9nURU5 SSS5 g!,(df  g=f)awGenerate text from console and save to a given location (requires record=True argument in constructor). Args: path (str): Path to write text files. clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. styles (bool, optional): If ``True``, ansi style codes will be included. ``False`` for plain text. Defaults to ``False``. rwtrr~N)r$openr)rrr8rrr write_files ri save_textConsole.save_textns?e; $w /:   T "0 / /s 6 Arr8 code_format inline_stylesr.r/c UR(dS5e/nURnU=(d [nSnUc[OUn UR U(a[ R "[ R"UR55Hgupn [U 5n U (aGU RU5n U R(aSU RSU S3n U (a SU SU S3OU n U"U 5 Mi GO 0n[ R "[ R"UR55Hupn [U 5n U (a`U RU5n URU [U5S -5nU R(aS US U RSU S3n O S USU S3n U"U 5 M /nURnUR5HunnU(dMU"S USUS35 M SRU5nU R!SRU5UUR"R$UR&R$S9nU(aURSS2 SSS5 U$!,(df  W$=f)aGenerate HTML from console contents (requires record=True argument in constructor). Args: theme (TerminalTheme, optional): TerminalTheme object containing console colors. clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. code_format (str, optional): Format string to render HTML. In addition to '{foreground}', '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``. inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag. Defaults to False. Returns: str: String containing console contents as HTML. rrNz zz D6#QD4L'/1 $4$;$;!06 ,J !z)B|nC |2*NO1?"YY'78 .55WWY'%!2266!2266 6M ''*Q&RS& %RsF I,BI,, I;cURUUUUS9n[USSS9nURU5 SSS5 g!,(df  g=f)aGenerate HTML from console contents and write to a file (requires record=True argument in constructor). Args: path (str): Path to write html file. theme (TerminalTheme, optional): TerminalTheme object containing console colors. clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. code_format (str, optional): Format string to render HTML. In addition to '{foreground}', '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``. inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag. Defaults to False. r-r'rr(N)rFr)r)rrrr8r.r/htmlr*s ri save_htmlConsole.save_htmlsO,#'    $w /:   T "0 / /s 9 ARichgQ?rMrr8r.font_aspect_ratio unique_idrNrOcD ^^3^4^5^6^7^8SSKJn 0m7S[S[4U3U74SjjnU=(d [m3UR m8Sn X-m4U S-m5Sn Sn Sn Sn S nS nS nS nUU-nUU-nX-nX-n/n/n0nSnS [S[4S jnS2S[S[ [S[S[4Sjjm6UR [[R"UR55nU(aURR5 S S S 5 Tc[S[[R"SR!SW55R#SS5UR#SS5-55-mSn[%[R&"WT8S95GHunnSnUGHunn n!U =(d [5n U"U 5n"U"U;a UUU"'US- nSUU"3n#U R((aKSn$U R*cT3R,R.O$U R*R1T35R.n%OpU R2n&U&S L=(a U&R4(+n$U R2cT3R6R.O$U R2R1T35R.n%U"U5n'U$(a*UR9T6"SU%UT4-UT5-S-T4U'-T5S-SS95 US[;U5-:waBUR9T6"S U"U5TS U#3UT4-UT5-U -T4[;U5-S!TS"US#3S$95 UU"U5- nGM GM [=U5V(s/sH n(U(T5-S-PM n)n(S%R!U4U5U6UU84S&j[%U)555n*S%R!U4S'jUR?555n+SR!U5n,SR!U5n-[AT8T4-U-5n.US-T5-U-n/T6"ST3R6R.S(S)U U U.U/S S*9 n0T3R,R.n1U(a U0T6"S U"U5TS+3U1S,U.S--X-S.-S/9- n0U0S0- n0URCTT4U T5T4T8-S- US-T5-S- U.U-U/U-U U-X-U+U0U,U-U*S19n2U2$!,(df  GN=fs sn(f)3a Generate an SVG from the console contents (requires record=True in Console constructor). Args: title (str, optional): The title of the tab in the output image theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal clear (bool, optional): Clear record buffer after exporting. Defaults to ``True`` code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables into the string in order to form the final SVG output. The default template used and the variables injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable. font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format`` string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font). If you aren't specifying a different font inside ``code_format``, you probably don't need this. unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node ids). If not set, this defaults to a computed value based on the recorded content. r)cell_lenrrc6>UT;aTU$/nURbURR(a TROURRT5nURbURR(a TR OURRT5nUR (aX2p2UR(a [X#S5nURSUR35 UR(aURS5 UR(aURS5 UR(aURS5 UR(aURS5 SRU5nUTU'U$)z%Convert a Style to CSS rules for SVG.g?zfill: zfont-weight: boldzfont-style: italic;ztext-decoration: underline;ztext-decoration: line-through;;)color is_defaultr; get_truecolorbgcolorr=reversedimr3rr<bolditalic underlinestriker)r css_rulesrTrWcssr? style_caches ri get_svg_style)Console.export_svg..get_svg_style s> #"5))IKK'5;;+A+A''[[..v6 MM)U]]-E-E'']]008  }}!(wyy!%#6   veii[1 2zz  !45||  !67  !>?||  !AB((9%C!$K JrhgQ?r'(r#rrc8[U5RSS5$)z.HTML escape text and replace spaces with nbsp.rz )r replacers ri escape_text'Console.export_svg..escape_textA s$<''X6 6rhNr~rattribsc ^S[S[4SjmSRU4SjUR555nU(aSUSUSUSUS3 $SUSUS 3$) z.Make a tag from name, content, and attributes.rrcZ[U[5(a [US5$[U5$)Ng)rfloatr:r)rs ri stringify7Console.export_svg..make_tag..stringifyJ s&ee--!%--5z!rhrc3># UH4upURS5RSS5ST"U5S3v M6 g7f)r!rz=""N)lstriprf)rkvrns rir7Console.export_svg..make_tag..O sA#+DA88C=((c232il^1E+s)objectrrr)r~rri tag_attribsrns @rimake_tag$Console.export_svg..make_tagE s|  " "C " ((##MMO#K D6;-q D6; a }B/ rhz terminal-rc38# UHn[U5v M g7fr)reprrs rir%Console.export_svg..a sC(wT']](rrr^)lengthrTrectg?? crispEdges)fillrrrqrrshape_renderingrrzurl(#-line-))_classrr textLength clip_pathrc3\># UH!upSTSUST"SSUTT-TS-S9S3v M# g7f) z rrr)rrrqrrz Nrb)rrr char_width line_heightrxrOrqs rirr| sV $;yky9 fV:+=kTXFXYZ[ $;s),c3@># UHupSTSUSUS3v M g7f).z-rz { z }Nrb)rr_rule_norOs rirr| s+ GV|sa {"WIT#c 2szrgba(255,255,255,0.35)1)rstroke stroke_widthrrrqrrrxz-titlemiddlerj)rr text_anchorrrz )rOr char_heightrterminal_widthterminal_heightrqrr terminal_x terminal_yrchrome backgroundsmatrixrr)"pip._vendor.rich.cellsrQrErrIrqrrvrr5rDr6rr8zlibadler32rencoderrirXrTr;r<rVrWrUr=rr!rangerr r:)9rrMrr8r.rNrOrQrar margin_top margin_right margin_bottom margin_left padding_top padding_rightpadding_bottom padding_left padding_widthpadding_height margin_width margin_heighttext_backgrounds text_groupclassesstyle_norgrrrrrrrrrules class_namehas_backgroundr5rW text_lengthr line_offsetsrrrrrrr title_colorsvgr?rrrxr`rqs9 ` @@@@@@ri export_svgConsole.export_svgsZ6 4(*   3  B**   4 !D(        $}4 $~5"1 "2 &( " "$ 7c 7c 7 15   (  AG   ( % %G2243F3FGHH##))+&  #c WWC(CCKK ll7H5 6'I  !=!=hu!UVGAtA)-%eX(%e,'%-GENMH  01 ==%)N!;;.//33"[[66v>BB $mmG%,D%8%SASAS=SN!==0//33"]]88@DD 'tn !$++ "!+*n+o3",{":#.#5,8 3T?*%% "'-&/[*#>*n+o ;'1CI'=(-i[qc&C Xd^#e*.WlDI8L8+-38 L   $-\#:    GN}}  gg./ $ej0=@Aq5K/.@ ((,,+ "  --11  hE"#F+ $ A%*Q. F     !##%-1Uk1A5 </"]2"\1!/#! " M& %LMs9A R  R Rc URUUUUUUS9n[USSS9n U RU5 SSS5 g!,(df  g=f)aGenerate an SVG file from the console contents (requires record=True in Console constructor). Args: path (str): The path to write the SVG to. title (str, optional): The title of the tab in the output image theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal clear (bool, optional): Clear record buffer after exporting. Defaults to ``True`` code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables into the string in order to form the final SVG output. The default template used and the variables injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable. font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format`` string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font). If you aren't specifying a different font inside ``code_format``, you probably don't need this. unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node ids). If not set, this defaults to a computed value based on the recorded content. rMr'rr(N)rr)r) rrrMrr8r.rNrOrr*s risave_svgConsole.save_svg sS6oo#/  $w /:   S !0 / /s ; A ) rrrrkrrrrrrrrrrrrrrrrr}rrrzrurtrwr~rqrrrrvr)rrPrN)rrrrr)TNrr,)rr)rcrdrerfrsrNenvironrkrrrur7rr$rrMrrtrFr5rr.rrrmrrrrssetterrrDr rrNrr2rrrrrr]rrrrrrrrrrrrmr~r}rrwrroryrrqrrr-rr0r<rrrr8r-r?r(r'rKrOrr:rVrr9rErprrrrYrrrrLr1rr4r,rr$rrArrrr staticmethodrrrrrrrr rrr$r+rJrFr+rJr,rrrgrbrhrirrQss!F#%**Hgc3h, )-(,,0!%"&# $%)#'04:@3B3D)-9=2604Az$ E F z$ ! z$ ~z$$D>z$z$z$z$r#wz$z$}z$ z$  "!z$"4.#z$$%z$&'z$()z$*+z$, --z$./z$01z$23z$4s$6675z$6/07z$8!9z$:;z$<xH 56=z$>8BI./?z$@738,-Az$xF#Fbg [[RW*g**0s00131411/j// h{&; 0   ,Z,D,%   S ;? = =4 =4 =&:> 2u 2$ 2, 2 hsm  L#LL!T!!F ,$ , ,      + '+ + Z [[U38_s \\34    ]]ST%$RWKe_K59KJNK K.###d# *$ *$ *#3$(!! ! ! !  !"! !B   TT*#t##cdBFJ O O/7 /B O  ORV(6>~6N $OS1@(1@3;N3K1@ ' 1@l-19 "&9"9.)9  9  99 d7m 9~$&+/-1 $!%$(1599S%Z 9 -( 9 >* 9~99D>9o.9 9xRV#u*%3;E%*I  IZ #.%   S%Z    *NNDN-1$(      c5j)*  D>    F-1+/-1"& $!%$(# $$($!a2a2a2 a2 c5j)* a2 -( a2>*a2$a2~a2a2D>a2}a2 a2a2D>a2 !a2" #a2J#;4()"#26;4sm;4 ;4 dCn% ;4  ;4;4;4;4;4(C5#:./;4;4 ;4B$(,0 ." . . .) .  .F@A$w-(-09< . ##!57!}! ! } !  !!5j12!! !F;B:N:N U Ur8I#667 U sCc3h' ( U UJ-1+/ $!%$( P$P$P$ P$ c5j)* P$ -( P$~P$P$D>P$P$P$ P$dM(^Xg%634 #'           D,0D#@59 #c #T #$ #SW #"*.%)# I &I I c] I  I I^*..### & #  #  ## #D)--#'#'yy & y  y  y!yC=y y~)--#'#'$"$" $"  & $"  $"$"!$"C=$" $"$"rhr svg_main_codec\[[R"UR555$)zReturns a unique hash for the given SVG main code. Args: svg_main_code (str): The content we're going to inject in the SVG envelope. Returns: str: a hash of the given content )rrrr)rs ri _svg_hashr s! t||M0023 44rh__main__)rwzJSONRPC [i]request[/i]g?Fz2.0subtract*)minuend subtrahendr")jsonrpcr=paramsidz Hello, World!z{'a': 1}z&Which one is correct team name in NBA?)zNew York BullszLos Angeles KingszGolden State Warriors Huston Rocketr)questionranswer)answeredq1z 5 + 7 = ?) rz 12 - 8 = ?)r'rjr"r)rrq2)sportmaths)r~emptyquizr)rrO)rrNplatformrrrabcrr dataclassesrrr functoolsrr rIr r itertoolsr mathr timertypesrrrtypingrrrrrrrrrrrrrrr pip._vendor.rich._null_filer! version_infor$r%r&pip._vendor.typing_extensionsrr(r)r*_export_formatr+r,_filenor-rr.r/rr0r1rTr2r3r,r4rxr5r}r6r7rr9rurVr:r;rr<r=prettyr>r?protocolr@rrAscoperBrrCrrDrrErFstyledrGterminal_themerHrIrJrrrKrLrrMrNrerOrrPr?rRrrsystemrgrrrrr`r __stdin__r  _STDIN_FILENO Exception __stdout___STDOUT_FILENO __stderr___STDERR_FILENOr rrrrrorwrrr-rrrrrrrrrr"rrFrRrrrrlocalrXr]rarurdrirrrcrrr{r$)r~rs00rirs   #(66$2v;; *C6%)9+5%)#SS $0 // y (E#v+./78DE =>   J MM((*M^^**,N^^**,N~~> %~6 " "%%## . . BB BJ x     ((C78ng567 #%393 ) )$B!!*$%$%N,/,/^$$BtxXc5j-A(AB,T*$$  &&""  :G9L9L9NO9N 9NO )//   &AE8$<=D%=t= t"t"n= 5S 5S 5 zT"G KK       "$B7    KKT']; MM!%$L$ #2  !&$/#3"$ %1#/"#  !)mMMNNt Ps<7PP-1P<Q P*)P*-P98P9<QQ