Ë
    êÿæiñ‹ ã                   óÔ  — U d dl Z d dlZd dlZd dlmZmZ d dlmZmZ d dl	m	Z	 d dl
mZ d dlmZ d dlmZ d dl mZ d d	lmZ d d
lmZmZmZ d dlmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z) d dl*m+Z+ ddl,m-Z-m.Z. ddl/m/Z/ ddl0m1Z1m2Z2 ddl3m4Z4 ddl5m6Z6m7Z7 ddl8m9Z9m:Z: ddl;m<Z<m=Z= ddl>m?Z? ddl@mAZA ddlBmCZCmDZD ddlEmFZG ddlHmIZImJZJ ddlKmLZLmMZM ddlNmOZO ddlPmQZQ ddlRmSZS ddlTmUZU ddlVmWZWmXZX dd lYmZZZ dd!l[m\Z\m]Z]m^Z^ dd"l_m`Z`maZa dd#lbmcZcmdZd erdd$lemfZf dd%lgmhZh dd&limjZj d'Zkd(ZlejÚ                  d)k(  Znee'eod*f   gd*f   Zped+   Zqed,   Zr G d-„ d.«      Zs es«       Zt	 ejê                  jí                  «       Zw	 ejò                  jí                  «       Zz	 ejö                  jí                  «       Z|eweze|fZ}eze|fZ~e<jþ                  e<jþ                  e<�j                   d0œZ� G d1„ d2e!«      Z‚e G d3„ d4«      «       Zƒe) G d5„ d6e#«      «       Z„e) G d7„ d8e#«      «       Z…e'e…e„eof   Z†	 ee'e†eUf      Z‡ eC«       Zˆ G d9„ d:ex«      Z‰ G d;„ d<«      ZŠ G d=„ d>«      Z‹ G d?„ d@«      ZŒ G dA„ dB«      Z� G dC„ dD«      ZŽ G dE„ dF«      Z� G dG„ dH«      Z�dwdJe‘dKedLedLe�f   f   fdM„Z’dKe‘fdN„Z“e<�j                   e<jþ                  e<�j(                  e<jÜ                  dOœZ•e•�j-                  «       D � �ci c]  \  } }|| “Œ
 c}} Z—e G dP„ dQe�j0                  «      «       Z™ G dR„ dSe«      Zšda›e"dT   eœdU<   dxdV„Z�dKe‘fdW„Zž G dX„ dY«      ZŸe dZk(  rv eŸdI¬[«      Z¡e¡�jE                  d\d]d^dId_dd`dadbdcddœdedfœ«       e¡�jE                  dgdh e£e¡«      «       e¡�jI                  dg dIdig dj¢dkdlœdmœd_dng do¢dpdlœdqg dr¢dsdlœdtœduœdvœ«       yy# ex$ r d ZwY �ŒBw xY w# ex$ r dZzY �Œ5w xY w# ex$ r d/Z|Y �Œ(w xY wc c}} w )yé    N)ÚABCÚabstractmethod)Ú	dataclassÚfield)Údatetime)Úwraps)Úislice)Úceil)ÚPathLike)Ú	monotonic)Ú	FrameTypeÚ
ModuleTypeÚTracebackType)ÚIOÚTYPE_CHECKINGÚAnyÚCallableÚDictÚIterableÚListÚLiteralÚMappingÚ
NamedTupleÚOptionalÚProtocolÚTextIOÚTupleÚTypeÚUnionÚcastÚruntime_checkable)Ú	NULL_FILEé   )ÚerrorsÚthemes)Ú_emoji_replace)ÚCONSOLE_HTML_FORMATÚCONSOLE_SVG_FORMAT)Ú
get_fileno)ÚFormatTimeCallableÚ	LogRender)ÚAlignÚAlignMethod)ÚColorSystemÚ	blend_rgb)ÚControl)ÚEmojiVariant)ÚNullHighlighterÚReprHighlighter©Úrender)ÚMeasurementÚmeasure_renderables)ÚPagerÚSystemPager)Ú	rich_cast)ÚRegion)ÚScreen)ÚSegment)ÚStyleÚ	StyleType)ÚStyled)ÚDEFAULT_TERMINAL_THEMEÚSVG_EXPORT_THEMEÚTerminalTheme)ÚTextÚTextType)ÚThemeÚ
ThemeStack)ÚWindowsConsoleFeatures)ÚLive©ÚStatusés   éd   Úwin32rD   )ÚdefaultÚleftÚcenterÚrightÚfull)ÚfoldÚcropÚellipsisÚignorec                   ó   — e Zd Zy)ÚNoChangeN)Ú__name__Ú
__module__Ú__qualname__© ó    úa/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/rich/console.pyrY   rY   I   s   „ Ør^   rY   é   )ÚkittyÚ256colorÚ16colorc                   ó(   — e Zd ZU dZeed<   	 eed<   y)ÚConsoleDimensionszSize of the terminal.ÚwidthÚheightN)rZ   r[   r\   Ú__doc__ÚintÚ__annotations__r]   r^   r_   re   re   g   s   … ÙàƒJØ.ØƒKØ-r^   re   c                   ó  — e Zd ZU dZeed<   	 eed<   	 eed<   	 eed<   	 eed<   	 eed<   	 eed<   	 d	Z	e
e   ed
<   	 d	Ze
e   ed<   	 dZe
e   ed<   	 d	Ze
e   ed<   	 d	Ze
e   ed<   	 d	Ze
e   ed<   edefd„«       Zdd„Zeeeeeeeeedœ	deeef   deeef   deeef   d
ee
e   ef   dee
e   ef   dee
e   ef   dee
e   ef   dee
e   ef   dee
e   ef   dd fd„Zdedd fd„Zdedd fd„Zdd„Zdededd fd„Zy	)ÚConsoleOptionsz$Options for __rich_console__ method.ÚsizeÚlegacy_windowsÚ	min_widthÚ	max_widthÚis_terminalÚencodingÚ
max_heightNÚjustifyÚoverflowFÚno_wrapÚ	highlightÚmarkuprg   Úreturnc                 ó:   — | j                   j                  d«       S )z+Check if renderables should use ascii only.Úutf)rr   Ú
startswith©Úselfs    r_   Ú
ascii_onlyzConsoleOptions.ascii_onlyŽ   s   € ð —=‘=×+Ñ+¨EÓ2Ð2Ð2r^   c                 óv   — t         j                  t         «      }| j                  j                  «       |_        |S )zdReturn a copy of the options.

        Returns:
            ConsoleOptions: a copy of self.
        )rl   Ú__new__Ú__dict__Úcopy©r~   Úoptionss     r_   rƒ   zConsoleOptions.copy“   s.   € ô #1×"8Ñ"8¼Ó"HˆØŸ=™=×-Ñ-Ó/ˆÔØˆr^   )	rf   ro   rp   rt   ru   rv   rw   rx   rg   rf   c       	         ó  — | j                  «       }
t        |t        «      st        d|«      x|
_        |
_        t        |t        «      s||
_        t        |t        «      s||
_        t        |t        «      s||
_        t        |t        «      s||
_        t        |t        «      s||
_        t        |t        «      s||
_	        t        |t        «      s||
_
        t        |	t        «      s|	�|	|
_        |	€dnt        d|	«      |
_        |
S )zUpdate values, return a copy.r   N)rƒ   Ú
isinstancerY   Úmaxro   rp   rt   ru   rv   rw   rx   rs   rg   )r~   rf   ro   rp   rt   ru   rv   rw   rx   rg   r…   s              r_   ÚupdatezConsoleOptions.update�   sÚ   € ð —)‘)“+ˆÜ˜%¤Ô*Ü47¸¸5³MÐAˆGÔ Ô 1Ü˜)¤XÔ.Ø )ˆGÔÜ˜)¤XÔ.Ø )ˆGÔÜ˜'¤8Ô,Ø%ˆGŒOÜ˜(¤HÔ-Ø'ˆGÔÜ˜'¤8Ô,Ø%ˆGŒOÜ˜)¤XÔ.Ø )ˆGÔÜ˜&¤(Ô+Ø#ˆGŒNÜ˜&¤(Ô+ØÐ!Ø%+�Ô"Ø%+ ^™T¼¸QÀ»ˆGŒNØˆr^   c                 óV   — | j                  «       }t        d|«      x|_        |_        |S )zÑUpdate 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   )rƒ   rˆ   ro   rp   )r~   rf   r…   s      r_   Úupdate_widthzConsoleOptions.update_widthÂ   s*   € ð —)‘)“+ˆÜ03°A°u³Ð=ˆÔ˜GÔ-Øˆr^   c                 óB   — | j                  «       }|x|_        |_        |S )z¯Update the height, and return a copy.

        Args:
            height (int): New height

        Returns:
            ~ConsoleOptions: New Console options instance.
        )rƒ   rs   rg   )r~   rg   r…   s      r_   Úupdate_heightzConsoleOptions.update_heightÏ   s#   € ð —)‘)“+ˆØ.4Ð4ˆÔ˜Wœ^Øˆr^   c                 ó4   — | j                  «       }d|_        |S )z�Return a copy of the options with height set to ``None``.

        Returns:
            ~ConsoleOptions: New console options instance.
        N)rƒ   rg   r„   s     r_   Úreset_heightzConsoleOptions.reset_heightÜ   s   € ð —)‘)“+ˆØˆŒØˆr^   c                 ór   — | j                  «       }t        d|«      x|_        |_        |x|_        |_        |S )a  Update 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   )rƒ   rˆ   ro   rp   rg   rs   )r~   rf   rg   r…   s       r_   Úupdate_dimensionsz ConsoleOptions.update_dimensionsæ   s9   € ð —)‘)“+ˆÜ03°A°u³Ð=ˆÔ˜GÔ-Ø.4Ð4ˆŒ˜Ô+Øˆr^   )ry   rl   )rZ   r[   r\   rh   re   rj   Úboolri   Ústrrt   r   ÚJustifyMethodru   ÚOverflowMethodrv   rw   rx   rg   Úpropertyr   rƒ   Ú	NO_CHANGEr   rY   r‰   r‹   r�   r�   r‘   r]   r^   r_   rl   rl   p   s  … á.à
ÓØØÓØ2ØƒNØ&ØƒNØ&ØÓØ<ØƒMØØƒOØ2Ø'+€GˆX�mÑ$Ó+Ø0Ø)-€Hˆh�~Ñ&Ó-Ø1Ø#€GˆX�d‰^Ó#Ø$Ø $€Iˆx˜‰~Ó$Ø,Ø!€FˆH�T‰NÓ!Ø/Ø €FˆH�S‰MÓ àð3˜Dò 3ó ð3óð '0Ø*3Ø*3Ø<EØ>GØ3<Ø5>Ø2;Ø1:ò#ð �S˜(�]Ñ#ð#ð ˜˜h˜Ñ'ð	#ð
 ˜˜h˜Ñ'ð#ð �x Ñ.°Ð8Ñ9ð#ð ˜ Ñ0°(Ð:Ñ;ð#ð �x ‘~ xÐ/Ñ0ð#ð ˜ $™¨Ð1Ñ2ð#ð �h˜t‘n hÐ.Ñ/ð#ð �h˜s‘m XÐ-Ñ.ð#ð 
ó#ðJ #ð Ð*:ó ð Cð Ð,<ó óð sð °Cð Ð<Lô r^   rl   c                   ó(   — e Zd ZdZdedd ef   fd„Zy)ÚRichCastz5An object that may be 'cast' to a console renderable.ry   ÚConsoleRenderablec                  ó   — y ©Nr]   r}   s    r_   Ú__rich__zRichCast.__rich__ú   ó   € ð 	r^   N)rZ   r[   r\   rh   r   r“   r�   r]   r^   r_   r™   r™   ö   s   „ á?ðà	Ð" J°Ð3Ñ	4ôr^   r™   c                   ó$   — e Zd ZdZ	 	 	 	 	 	 dd„Zy)rš   z-An object that supports the console protocol.c                  ó   — y rœ   r]   ©r~   Úconsoler…   s      r_   Ú__rich_console__z"ConsoleRenderable.__rich_console__  rž   r^   N)r¢   ÚConsoler…   rl   ry   ÚRenderResult)rZ   r[   r\   rh   r£   r]   r^   r_   rš   rš      s"   „ á7ðØ ðØ+;ðà	ôr^   rš   c                   ó   — e Zd ZdZy)ÚCaptureErrorz(An error in the Capture context manager.N)rZ   r[   r\   rh   r]   r^   r_   r§   r§     s   „ Ú2r^   r§   c                   ó<   — e Zd ZdZddeddfd„Zdddd	dee   fd
„Zy)ÚNewLinez$A renderable to generate new line(s)Úcountry   Nc                 ó   — || _         y rœ   )rª   ©r~   rª   s     r_   Ú__init__zNewLine.__init__  s	   € Øˆ�
r^   r¢   r¤   r…   rl   c              #   ó@   K  — t        d| j                  z  «      –— y ­w)NÚ
)r=   rª   r¡   s      r_   r£   zNewLine.__rich_console__  s   è ø€ ô �d˜TŸZ™ZÑ'Ó(Ó(ùs   ‚©r#   )	rZ   r[   r\   rh   ri   r­   r   r=   r£   r]   r^   r_   r©   r©     s:   „ Ù.ñ˜cð ¨$ó ð)Ø ð)Ø+;ð)à	�'Ñ	ô)r^   r©   c                   óH   — e Zd ZdZdeee      dededdfd„Zdd	d
ede	fd„Z
y)ÚScreenUpdatez)Render a list of lines at a given offset.ÚlinesÚxÚyry   Nc                 ó.   — || _         || _        || _        y rœ   )Ú_linesr´   rµ   )r~   r³   r´   rµ   s       r_   r­   zScreenUpdate.__init__'  s   € ØˆŒØˆŒØˆ�r^   r¢   r¤   r…   c              #   óÂ   K  — | j                   }t        j                  }t        | j                  | j
                  «      D ]  \  }} |||«      –— |E d {  –—†  Œ y 7 Œ­wrœ   )r´   r0   Úmove_toÚ	enumerater·   rµ   )r~   r¢   r…   r´   r¹   ÚoffsetÚlines          r_   r£   zScreenUpdate.__rich_console__,  sN   è ø€ ð �F‰FˆÜ—/‘/ˆÜ% d§k¡k°4·6±6Ö:‰LˆF�DÙ˜!˜VÓ$Ò$Ø�O‰Oñ ;àús   ‚AAÁAÁA)rZ   r[   r\   rh   r   r=   ri   r­   rl   r¥   r£   r]   r^   r_   r²   r²   $  sL   „ Ù3ð˜d 4¨¡=Ñ1ð °cð ¸cð Àdó ð
Ø ðØ+9ðà	ôr^   r²   c                   ó\   — e Zd ZdZdd„Zdd„Zdeee      dee   dee	   ddfd	„Z
defd
„Zy)ÚCapturezÐContext manager to capture the result of printing to the console.
    See :meth:`~rich.console.Console.capture` for how to use.

    Args:
        console (Console): A console instance to capture output.
    ry   Nc                 ó    — || _         d | _        y rœ   )Ú_consoleÚ_result)r~   r¢   s     r_   r­   zCapture.__init__>  s   € ØˆŒØ&*ˆ�r^   c                 ó:   — | j                   j                  «        | S rœ   )rÀ   Úbegin_capturer}   s    r_   Ú	__enter__zCapture.__enter__B  ó   € Ø�‰×#Ñ#Ô%Øˆr^   Úexc_typeÚexc_valÚexc_tbc                 óB   — | j                   j                  «       | _        y rœ   )rÀ   Úend_capturerÁ   ©r~   rÆ   rÇ   rÈ   s       r_   Ú__exit__zCapture.__exit__F  s   € ð —}‘}×0Ñ0Ó2ˆ�r^   c                 óH   — | j                   €t        d«      ‚| j                   S )zGet the result of the capture.z<Capture result is not available until context manager exits.)rÁ   r§   r}   s    r_   ÚgetzCapture.getN  s(   € à�<‰<ÐÜØNóð ð �|‰|Ðr^   )r¢   r¤   ry   N)ry   r¾   )rZ   r[   r\   rh   r­   rÄ   r   r   ÚBaseExceptionr   rÌ   r“   rÎ   r]   r^   r_   r¾   r¾   6  s\   „ ñó+óð3à˜4 Ñ.Ñ/ð3ð ˜-Ñ(ð3ð ˜Ñ'ð	3ð
 
ó3ð�Sô r^   r¾   c            	       ób   — e Zd ZdZddddededdfd„Zdd	„Zd
ee	e
      dee
   dee   ddfd„Zy)ÚThemeContextzbA context manager to use a temporary theme. See :meth:`~rich.console.Console.use_theme` for usage.r¢   r¤   ÚthemeÚinheritry   Nc                 ó.   — || _         || _        || _        y rœ   )r¢   rÒ   rÓ   )r~   r¢   rÒ   rÓ   s       r_   r­   zThemeContext.__init__Z  s   € ØˆŒØˆŒ
Øˆ�r^   c                 óP   — | j                   j                  | j                  «       | S rœ   )r¢   Ú
push_themerÒ   r}   s    r_   rÄ   zThemeContext.__enter___  s   € Ø�‰×Ñ §
¡
Ô+Øˆr^   rÆ   rÇ   rÈ   c                 ó8   — | j                   j                  «        y rœ   )r¢   Ú	pop_themerË   s       r_   rÌ   zThemeContext.__exit__c  s   € ð 	�‰×ÑÕ r^   ©T)ry   rÑ   )rZ   r[   r\   rh   rF   r’   r­   rÄ   r   r   rÏ   r   rÌ   r]   r^   r_   rÑ   rÑ   W  sk   „ Ùlñ 	ð °%ð À$ð ÐRVó ó
ð!à˜4 Ñ.Ñ/ð!ð ˜-Ñ(ð!ð ˜Ñ'ð	!ð
 
ô!r^   rÑ   c                   ór   — e Zd ZdZ	 	 	 ddddee   dededdf
d	„Zdd
„Zdee	e
      dee
   dee   ddfd„Zy)ÚPagerContextzZA context manager that 'pages' content. See :meth:`~rich.console.Console.pager` for usage.Nr¢   r¤   ÚpagerÚstylesÚlinksry   c                 óT   — || _         |€
t        «       n|| _        || _        || _        y rœ   )rÀ   r9   rÜ   rÝ   rÞ   )r~   r¢   rÜ   rÝ   rÞ   s        r_   r­   zPagerContext.__init__o  s(   € ð  ˆŒØ&+ m”[”]¸ˆŒ
ØˆŒØˆ�
r^   c                 ó:   — | j                   j                  «        | S rœ   )rÀ   Ú_enter_bufferr}   s    r_   rÄ   zPagerContext.__enter__{  rÅ   r^   rÆ   rÇ   rÈ   c                 óì  — |€Ì| j                   j                  5  | j                   j                  d d  }| j                   j                  d d …= |}| j                  st	        j
                  |«      }n!| j                  st	        j                  |«      }| j                   j                  |«      }d d d «       | j                  j                  «       | j                   j                  «        y # 1 sw Y   Œ?xY wrœ   )rÀ   Ú_lockÚ_bufferrÝ   r=   Ústrip_stylesrÞ   Ústrip_linksÚ_render_bufferrÜ   ÚshowÚ_exit_buffer)r~   rÆ   rÇ   rÈ   ÚbufferÚsegmentsÚcontents          r_   rÌ   zPagerContext.__exit__  s´   € ð ÐØ—‘×$Ó$Ø(,¯©×(=Ñ(=¹aÐ(@�Ø—M‘M×)Ñ)ª!Ð,Ø.4�Ø—{’{Ü&×3Ñ3°HÓ=‘HØŸšÜ&×2Ñ2°8Ó<�HØŸ-™-×6Ñ6°xÓ@�÷ %ð �J‰J�O‰O˜GÔ$Ø�‰×"Ñ"Õ$÷ %Ð$ús   ™BC*Ã*C3©NFF)ry   rÛ   )rZ   r[   r\   rh   r   r8   r’   r­   rÄ   r   rÏ   r   rÌ   r]   r^   r_   rÛ   rÛ   l  s�   „ Ùdð
 "&ØØñ
àð
ð ˜‰ð
ð ð	
ð
 ð
ð 
ó
óð%à˜4 Ñ.Ñ/ð%ð ˜-Ñ(ð%ð ˜Ñ'ð	%ð
 
ô%r^   rÛ   c            	       ó„   — e Zd ZdZ	 ddddededdfd„Zdd	œd
edee   ddfd„Z	dd„Z
deee      dee   dee   ddfd„Zy)ÚScreenContextziA context manager that enables an alternative screen. See :meth:`~rich.console.Console.screen` for usage.r¢   r¤   Úhide_cursorÚstylery   Nc                 óP   — || _         || _        t        |¬«      | _        d| _        y )N©rñ   F)r¢   rð   r<   ÚscreenÚ_changed)r~   r¢   rð   rñ   s       r_   r­   zScreenContext.__init__–  s&   € ð ˆŒØ&ˆÔÜ 5Ô)ˆŒØˆ�r^   ró   Úrenderablesc                óÐ   — |r*t        |«      dkD  rt        |Ž n|d   | j                  _        |�|| j                  _        | j
                  j                  | j                  d¬«       y)a+  Update the screen.

        Args:
            renderable (RenderableType, optional): Optional renderable to replace current renderable,
                or None for no change. Defaults to None.
            style: (Style, optional): Replacement style, or None for no change. Defaults to None.
        r#   r   NÚ )Úend)ÚlenÚGrouprô   Ú
renderablerñ   r¢   Úprint)r~   rñ   rö   s      r_   r‰   zScreenContext.updatež  s\   € ñ ä'*¨;Ó'7¸!Ò';”�{Ñ#ÀÈQÁð �K‰KÔ"ð ÐØ %ˆD�K‰KÔØ�‰×Ñ˜4Ÿ;™;¨BÐÕ/r^   c                 ó¬   — | j                   j                  d«      | _        | j                  r'| j                  r| j                   j	                  d«       | S )NTF)r¢   Úset_alt_screenrõ   rð   Úshow_cursorr}   s    r_   rÄ   zScreenContext.__enter__°  s>   € ØŸ™×3Ñ3°DÓ9ˆŒØ�=Š=˜T×-Ò-Ø�L‰L×$Ñ$ UÔ+Øˆr^   rÆ   rÇ   rÈ   c                 ó¤   — | j                   rD| j                  j                  d«       | j                  r| j                  j	                  d«       y y y )NFT)rõ   r¢   rÿ   rð   r   rË   s       r_   rÌ   zScreenContext.__exit__¶  sB   € ð �=Š=Ø�L‰L×'Ñ'¨Ô.Ø×ÒØ—‘×(Ñ(¨Õ.ð  ð r^   ©rø   )ry   rï   )rZ   r[   r\   rh   r’   r?   r­   ÚRenderableTyper   r‰   rÄ   r   rÏ   r   rÌ   r]   r^   r_   rï   rï   “  sž   „ Ùsð IKñØ ðØ/3ðØ<Eðà	óð JNò0Ø*ð0Ø3;¸IÑ3Fð0à	ó0ó$ð	/à˜4 Ñ.Ñ/ð	/ð ˜-Ñ(ð	/ð ˜Ñ'ð		/ð
 
ô	/r^   rï   c                   ón   — e Zd ZdZddœdddeddfd	„Zeded   fd
„«       Z	 	 	 	 	 	 dd„Z	ddddde
fd„Zy)rû   a$  Takes a group of renderables and returns a renderable object that renders the group.

    Args:
        renderables (Iterable[RenderableType]): An iterable of renderable objects.
        fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True.
    T)Úfitrö   r  r  ry   Nc                ó.   — || _         || _        d | _        y rœ   )Ú_renderablesr  Ú_render)r~   r  rö   s      r_   r­   zGroup.__init__Ê  s   € Ø'ˆÔØˆŒØ7;ˆ�r^   c                 óf   — | j                   €t        | j                  «      | _         | j                   S rœ   )r  Úlistr  r}   s    r_   rö   zGroup.renderablesÏ  s(   € à�<‰<ÐÜ × 1Ñ 1Ó2ˆDŒLØ�|‰|Ðr^   r¢   r¤   r…   rl   c                 óˆ   — | j                   rt        ||| j                  «      S t        |j                  |j                  «      S rœ   )r  r7   rö   r6   rp   r¡   s      r_   Ú__rich_measure__zGroup.__rich_measure__Õ  s9   € ð �8Š8Ü& w°¸×9IÑ9IÓJÐJä˜w×0Ñ0°'×2CÑ2CÓDÐDr^   c              #   ó8   K  — | j                   E d {  –—†  y 7 Œ­wrœ   )rö   r¡   s      r_   r£   zGroup.__rich_console__Ý  s   è ø€ ð ×#Ñ#×#Ò#ús   ‚’“)r¢   r¤   r…   rl   ry   r6   )rZ   r[   r\   rh   r’   r­   r–   r   rö   r  r¥   r£   r]   r^   r_   rû   rû   Â  sˆ   „ ñð DHò <Ð%5ð <¸Dð <ÈDó <ð
 ð˜TÐ"2Ñ3ò ó ðð
EØ ðEØ+;ðEà	óEð$Ø ð$Ø+;ð$à	ô$r^   rû   Tr  ry   .c                 ó^   ‡ — dt         dt        t           f   dt         dt        f   fˆ fd„}|S )z½A decorator that turns an iterable of renderables in to a group.

    Args:
        fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True.
    Úmethod.ry   c                 óX   •‡ — t        ‰ «      dt        dt        dt        fˆˆ fd„«       }|S )zGConvert a method that returns an iterable of renderables in to a Group.ÚargsÚkwargsry   c                  ó*   •—  ‰| i |¤Ž}t        |d‰iŽS )Nr  )rû   )r  r  rö   r  r  s      €€r_   Ú_replacez*group.<locals>.decorator.<locals>._replaceï  s"   ø€ á  $Ð1¨&Ñ1ˆKÜ˜+Ð/¨3Ñ/Ð/r^   )r   r   rû   )r  r  r  s   ` €r_   Ú	decoratorzgroup.<locals>.decoratorê  s7   ù€ ô
 
ˆv‹ð	0œCð 	0¬3ð 	0´5õ 	0ó 
ð	0ð ˆr^   )r   r   r  rû   )r  r  s   ` r_   Úgroupr  ã  s8   ø€ ð
Ü˜œh¤~Ñ6Ð6Ñ7ð
ä	�#”u�*Ñ	õ
ð Ðr^   c                  óà   — 	 t          t        «       } | j                  j                  }dt	        | j                  «      v st        j                  d«      s|dk(  ry|dk(  ryy# t        $ r Y yw xY w)z-Check if we're running in a Jupyter notebook.Fzgoogle.colabÚDATABRICKS_RUNTIME_VERSIONÚZMQInteractiveShellTÚTerminalInteractiveShell)Úget_ipythonÚ	NameErrorÚ	__class__rZ   r“   ÚosÚgetenv)ÚipythonÚshells     r_   Ú_is_jupyterr"  ù  ss   € ðÝô ‹m€GØ×Ñ×&Ñ&€Eàœ#˜g×/Ñ/Ó0Ñ0Ü�9‰9Ð1Ô2ØÐ)Ò)àØ	Ð,Ò	,Øàøô ò Ùðús   ‚A! Á!	A-Á,A-)ÚstandardÚ256Ú	truecolorÚwindowsc                   óL   — e Zd ZU dZeed<    ee¬«      Ze	e
   ed<   dZeed<   y)ÚConsoleThreadLocalsz(Thread local values for Console context.Útheme_stack)Údefault_factoryrê   r   Úbuffer_indexN)rZ   r[   r\   rh   rG   rj   r   r
  rê   r   r=   r+  ri   r]   r^   r_   r(  r(    s(   … á2àÓÙ!°$Ô7€FˆD�‰MÓ7Ø€L�#Ôr^   r(  c                   ó6   — e Zd ZdZedee   dee   fd„«       Zy)Ú
RenderHookz(Provides hooks in to the render process.rö   ry   c                  ó   — y)aL  Called 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.
        Nr]   )r~   rö   s     r_   Úprocess_renderableszRenderHook.process_renderables#  s   � r^   N)rZ   r[   r\   rh   r   r   rš   r/  r]   r^   r_   r-  r-     s3   „ Ù2àðØÐ 1Ñ2ðà	ÐÑ	 òó ñr^   r-  rH   Ú_windows_console_featuresc                  ó@   — t         �t         S ddlm}   | «       a t         S )Nr#   ©Úget_windows_console_features)r0  Ú_windowsr3  r2  s    r_   r3  r3  6  s    € ä Ð,Ü(Ð(Ý6á <Ó >ÐÜ$Ð$r^   c                  ó<   — t         xr t        «       j                   S )zDetect legacy Windows.)ÚWINDOWSr3  Úvtr]   r^   r_   Údetect_legacy_windowsr8  @  s   € äÒ<Ô7Ó9×<Ñ<Ð<Ð<r^   c            <       ó¨  — e Zd ZU dZej
                  Zeeef   e	d<   dddddddddddddddddddddd e
«       dddddd	œd
eed      dee   dee   dee   dedee   dedeee      dedee   dee   dee   dee   dededededee   dededed eeef   d!ed"   d#ee   d$ed%eeg ef      d&eeg ef      deeeef      f8d'„Zd(efd)„Zed(ee   fd*„«       Zej8                  d+ee   d(dfd,„«       Zed(ee   fd-„«       Zed(efd.„«       Z e j8                  d/ed(dfd0„«       Z ed(e!fd1„«       Z"d(ee#   fd2„Z$dÞd3„Z%dÞd4„Z&d5d6d(efd7„Z'dÞd8„Z(d9e)d(dfd:„Z*dÞd;„Z+dßd<„Z,d=e-d>e-d?e-d(dfd@„Z.dÞdA„Z/d(efdB„Z0ddCœdedDed(dfdE„Z1dÞdF„Z2ddCœdedDed(e3fdG„Z4ed(ee   fdH„«       Z5ed(efdI„«       Z6ed(efdJ„«       Z7ed(efdK„«       Z8ed(e9fdL„«       Z:ed(e;fdM„«       Z<e<j8                  dNe=eef   d(dfdO„«       Z<ed(efdP„«       Z>e>j8                  ded(dfdQ„«       Z>ed(efdR„«       Z?e?j8                  ded(dfdS„«       Z?dÞdT„Z@d(eAfdU„ZB	 dàdVeeC   dWedXed(eDfdY„ZEdád[ed(dfd\„ZFdâd]ed(dfd^„ZGd_d`dadbdcœddeHdeedfedgedhed(difdj„ZIdâdked(efdl„ZJdâdmed(efdn„ZKed(efdo„«       ZLdped(efdq„ZM	 dãdredee   d(dsfdt„ZNdduœdveHdwee9   d(eOfdx„ZP	 dädveHdwee9   d(eQe   fdy„ZR	 däddddzœdveHdwee9   deeS   d{ed|ed(eee      fd}„ZTd~dddddddœd€edeeeSf   d�eeU   d‚eeV   dee   dee   dee   d!eeW   d(dƒfd„„ZXdd…œd†eeeSf   d‡eeeSef      d(eSfdˆ„ZYddddd‰œdŠeQe-   d‹edŒed�eeU   dee   dee   dee   d(eeZ   fd�„Z[	 dådŽd�d�d‘œdpe\d’edeeeSf   d“e]d(df
d”„Z^d•e_d(dfd–„Z`d—d˜ddd™œdŠe-d‹edŒedeeeeSf      dee   d(dfdš„Zad—d˜ddddddddddddd›œdŠe-d‹edŒedeeeeSf      d�eeU   d‚eeV   dœee   dee   dee   dee   dee   dee   d�edee   džed(df dŸ„Zb	 dädd dddddddd¡œ	d¢ee   d£e-d¤edeef   ded¥ed¦ed§ed¨ed‡eee-ge-f      d©ed(dfdª„Zcddd«œdveHd¬eed   dwee9   d(dfd­„Ze	 dæd®eee      d¯ed°ed(dfd±„Zfd²d³dddd´d²dµœdee   d¶edee   d·ed¸ed¹eQeeegf      dºed(dfd»„Zhei	 däd¼ed½eeg eej   f      d(e=eeekee-f   f   fd¾„«       Zld—d˜dddddddZd¿œ	dŠe-d‹edŒedeeeeSf      d�eeU   dee   dee   dee   dÀedÁed(dfdÂ„ZmdÞdÃ„ZndÞdÄ„ZodÞdÅ„ZpdÆeQe   d(efdÇ„Zq	 dådddddÈœdÉe\dededÊedËeer   d(efdÌ„ZsdddÍœdÎedWed(efdÏ„ZtdddÍœdÐeeeue   f   dÎedWed(dfdÑ„ZvdddddÒœdeew   dÎedÓee   dÔed(ef
dÕ„ZxddeyddÒœdÐeeeue   f   deew   dÎedÓedÔed(dfdÖ„Zzd×dde{dØddÙœdpedeew   dÎedÓedÚedÛee   d(efdÜ„Z|d×dde{dØddÙœdÐeeeue   f   dpedeew   dÎedÓedÚedÛee   d(dfdÝ„Z}y)çr¤   ar  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.
    Ú_environÚautoNFé   Tz[%X])Úcolor_systemÚforce_terminalÚforce_jupyterÚforce_interactiveÚ	soft_wraprÒ   ÚstderrÚfileÚquietrf   rg   rñ   Úno_colorÚtab_sizeÚrecordrx   ÚemojiÚemoji_variantrw   Úlog_timeÚlog_pathÚlog_time_formatÚhighlighterrn   Úsafe_boxÚget_datetimeÚget_timer:  r=  )r;  r#  r$  r%  r&  r>  r?  r@  rA  rÒ   rB  rC  rD  rf   rg   rñ   rE  rF  rG  rx   rH  rI  rw   rJ  rK  rL  rM  ÚHighlighterTypern   rN  rO  rP  c                ój  — |�|| _         |€
t        «       n|| _        | j                  r‚|
€?| j                   j                  d«      }|�|j	                  «       rt        |«      }
nt        }
|€?| j                   j                  d«      }|�|j	                  «       rt        |«      }nt        }|| _        || _	        || _
        || _        || _        || _        |€t        «       xr | j                   n|| _        |
€E| j                   j                  d«      }|�(|j	                  «       rt        |«      | j                  z
  }
|€8| j                   j                  d«      } | �| j	                  «       rt        | «      }|| _        |
| _        || _        |  d | _        |�|| _        || _        |	| _        || _        |€d | _        n)|dk(  r| j1                  «       | _        nt2        |   | _        t5        j6                  «       | _        t;        |||¬«      | _        |xs t>        | _         || _!        |xs tD        jF                  | _$        |xs tJ        | _&        || _'        |�|n| j                   j                  dd«      dk7  | _(        |€-| j                   j                  d	d «      }!|!�|!d
k(  rd}n|!dk(  rd}|€| jR                  xr | jT                   n|| _+        t5        j6                  «       | _,        t[        t]        |€t^        j`                  n|«      ¬«      | _1        g | _2        g | _3        g | _4        d| _5        y )NÚJUPYTER_COLUMNSÚJUPYTER_LINESÚCOLUMNSÚLINESr;  )Ú	show_timeÚ	show_pathÚtime_formatÚNO_COLORrø   ÚTTY_INTERACTIVEÚ0FÚ1T)r)  )6r:  r"  Ú
is_jupyterrÎ   Úisdigitri   ÚJUPYTER_DEFAULT_COLUMNSÚJUPYTER_DEFAULT_LINESrF  rG  Ú_markupÚ_emojiÚ_emoji_variantÚ
_highlightr8  rn   rA  Ú_widthÚ_heightÚ_force_terminalÚ_filerD  rB  Ú_color_systemÚ_detect_color_systemÚCOLOR_SYSTEMSÚ	threadingÚRLockrã   r+   Ú_log_renderÚ_null_highlighterrM  rN  r   ÚnowrO  r   rP  rñ   rE  rq   Úis_dumb_terminalÚis_interactiveÚ_record_buffer_lockr(  rG   r%   ÚDEFAULTÚ_thread_localsÚ_record_bufferÚ_render_hooksÚ_live_stackÚ_is_alt_screen)"r~   r=  r>  r?  r@  rA  rÒ   rB  rC  rD  rf   rg   rñ   rE  rF  rG  rx   rH  rI  rw   rJ  rK  rL  rM  rn   rN  rO  rP  r:  Újupyter_columnsÚjupyter_linesÚcolumnsr³   Útty_interactives"                                     r_   r­   zConsole.__init__k  s  € ðF ÐØ$ˆDŒMà+8Ð+@œ+œ-ÀmˆŒØ�?Š?Øˆ}Ø"&§-¡-×"3Ñ"3Ð4EÓ"F�Ø"Ð.°?×3JÑ3JÔ3LÜ Ó0‘Eä3�EØˆ~Ø $§¡× 1Ñ 1°/Ó B�Ø Ð,°×1FÑ1FÔ1HÜ  Ó/‘Fä2�Fà ˆŒØˆŒØˆŒØˆŒØ6CˆÔØ#ˆŒð Ð%ô #Ó$Ò<¨T¯_©_Ñ)<àð 	Ôð ˆ=Ø—m‘m×'Ñ'¨	Ó2ˆGØÐ" w§¡Ô'8Ü˜G› t×':Ñ':Ñ:�Øˆ>Ø—M‘M×%Ñ% gÓ.ˆEØÐ  U§]¡]¤_Ü˜U›�à"ˆŒØˆŒØˆŒáà#ˆÔØÐ%Ø#1ˆDÔ àˆŒ
ØˆŒ
ØˆŒàÐØ!%ˆDÕØ˜VÒ#Ø!%×!:Ñ!:Ó!<ˆDÕä!.¨|Ñ!<ˆDÔä—_‘_Ó&ˆŒ
Ü$ØØØ'ô
ˆÔð
 -8Ò,LÔ;LˆÔØ ˆŒØ(Ò8¬H¯L©LˆÔØ Ò-¤IˆŒØˆŒ
ð Ð#ñ à—‘×"Ñ" :¨rÓ2°bÑ8ð 	Œð
 Ð$Ø"Ÿm™m×/Ñ/Ð0AÀ4ÓHˆOØÐ*Ø" cÒ)Ø(-Ñ%Ø$¨Ò+Ø(,Ð%ð !Ð(ð ×ÑÒ; d×&;Ñ&;Ñ";à"ð 	Ôô $-§?¡?Ó#4ˆÔ Ü1Ü"°U°]¤6§>¢>ÈÓNô
ˆÔð .0ˆÔØ/1ˆÔØ')ˆÔØ#ˆÕr^   ry   c                 ó<   — d| j                   › d| j                  ›d�S )Nz<console width=Ú Ú>)rf   rj  r}   s    r_   Ú__repr__zConsole.__repr__ñ  s"   € Ø  §¡ ¨A¨d×.@Ñ.@Ð-CÀ1ÐEÐEr^   c                 ó¤   — | j                   xs, | j                  rt        j                  nt        j                  }t	        |d|«      }|€t
        }|S )z Get the file object to write to.Úrich_proxied_file)ri  rB  ÚsysÚstdoutÚgetattrr"   )r~   rC  s     r_   rC  zConsole.fileô  s@   € ð �z‰zÒH¨D¯KªKœcŸjšj¼S¿Z¹ZˆÜ�tÐ0°$Ó7ˆØˆ<ÜˆDØˆr^   Únew_filec                 ó   — || _         y)zSet a new file object.N)ri  )r~   rˆ  s     r_   rC  zConsole.fileý  s   € ð ˆ�
r^   c                 ó.   — | j                   j                  S ©zGet a thread local buffer.)rv  rê   r}   s    r_   rä   zConsole._buffer  s   € ð ×"Ñ"×)Ñ)Ð)r^   c                 ó.   — | j                   j                  S r‹  ©rv  r+  r}   s    r_   Ú_buffer_indexzConsole._buffer_index  s   € ð ×"Ñ"×/Ñ/Ð/r^   Úvaluec                 ó&   — || j                   _        y rœ   r�  )r~   r�  s     r_   rŽ  zConsole._buffer_index  s   € à+0ˆ×ÑÕ(r^   c                 ó.   — | j                   j                  S )z!Get the thread local theme stack.)rv  r)  r}   s    r_   Ú_theme_stackzConsole._theme_stack  s   € ð ×"Ñ"×.Ñ.Ð.r^   c                 óš  — | j                   rt        j                  S | j                  r| j                  ryt
        rR| j                  rt        j
                  S t        «       }|j                  rt        j                  S t        j                  S | j                  j                  dd«      j                  «       j                  «       }|dv rt        j                  S | j                  j                  dd«      j                  «       j                  «       }|j                  d«      \  }}}t        j                  |t        j                   «      }|S )z"Detect color system from env vars.NÚ	COLORTERMrø   )r%  Ú24bitÚTERMÚ-)r^  r.   Ú	TRUECOLORrq   rr  r6  rn   r3  r%  Ú	EIGHT_BITr:  rÎ   ÚstripÚlowerÚ
rpartitionÚ_TERM_COLORSÚSTANDARD)r~   Úwindows_console_featuresÚ
color_termÚtermÚ
_term_nameÚ_hyphenÚcolorsr=  s           r_   rk  zConsole._detect_color_system  s  € à�?Š?Ü×(Ñ(Ð(Ø×Ò 4×#8Ò#8ØÝØ×"Ò"Ü"×*Ñ*Ð*Ü'CÓ'EÐ$ð ,×5Ò5ô ×%Ñ%ðô !×*Ñ*ðð Ÿ™×*Ñ*¨;¸Ó;×AÑAÓC×IÑIÓKˆJØÐ3Ñ3Ü"×,Ñ,Ð,Ø—=‘=×$Ñ$ V¨RÓ0×6Ñ6Ó8×>Ñ>Ó@ˆDØ*.¯/©/¸#Ó*>Ñ'ˆJ˜ Ü'×+Ñ+¨F´K×4HÑ4HÓIˆLØÐr^   c                 ó.   — | xj                   dz  c_         y)z4Enter in to a buffer context, and buffer all output.r#   N)rŽ  r}   s    r_   rá   zConsole._enter_buffer-  s   € à×Ò˜aÑÖr^   c                 óN   — | xj                   dz  c_         | j                  «        y)z5Leave buffer context, and render content if required.r#   N)rŽ  Ú_check_bufferr}   s    r_   ré   zConsole._exit_buffer1  s   € à×Ò˜aÑÕØ×ÑÕr^   ÚliverI   c                 ó¬   — | j                   5  | j                  j                  |«       t        | j                  «      dk(  cddd«       S # 1 sw Y   yxY w)a`  Set Live instance. Used by Live context manager (no need to call directly).

        Args:
            live (Live): Live instance using this Console.

        Returns:
            Boolean that indicates if the live is the topmost of the stack.

        Raises:
            errors.LiveError: If this Console has a Live context currently active.
        r#   N)rã   ry  Úappendrú   )r~   r¨  s     r_   Úset_livezConsole.set_live6  s<   € ð �Z‹ZØ×Ñ×#Ñ# DÔ)Ü�t×'Ñ'Ó(¨AÑ-÷ �ZŠZús   �3A
Á
Ac                 óz   — | j                   5  | j                  j                  «        ddd«       y# 1 sw Y   yxY w)zUClear the Live instance. Used by the Live context manager (no need to call directly).N)rã   ry  Úpopr}   s    r_   Ú
clear_livezConsole.clear_liveF  s%   € à�Z‹ZØ×Ñ× Ñ Ô"÷ �Z‰Zúó   �1±:Úhookc                 ó|   — | j                   5  | j                  j                  |«       ddd«       y# 1 sw Y   yxY w)zpAdd a new render hook to the stack.

        Args:
            hook (RenderHook): Render hook instance.
        N)rã   rx  rª  )r~   r°  s     r_   Úpush_render_hookzConsole.push_render_hookK  s)   € ð �Z‹ZØ×Ñ×%Ñ% dÔ+÷ �Z‰Zús   �2²;c                 óz   — | j                   5  | j                  j                  «        ddd«       y# 1 sw Y   yxY w)z'Pop the last renderhook from the stack.N)rã   rx  r­  r}   s    r_   Úpop_render_hookzConsole.pop_render_hookT  s%   € à�Z‹ZØ×Ñ×"Ñ"Ô$÷ �Z‰Zúr¯  c                 ó&   — | j                  «        | S )z,Own context manager to enter buffer context.©rá   r}   s    r_   rÄ   zConsole.__enter__Y  s   € à×ÑÔØˆr^   rÆ   Ú	exc_valueÚ	tracebackc                 ó$   — | j                  «        y)zExit buffer context.N)ré   )r~   rÆ   r·  r¸  s       r_   rÌ   zConsole.__exit__^  s   € à×ÑÕr^   c                 ó$   — | j                  «        y)z`Begin capturing console output. Call :meth:`end_capture` to exit capture mode and return output.Nr¶  r}   s    r_   rÃ   zConsole.begin_captureb  s   € à×ÑÕr^   c                 óz   — | j                  | j                  «      }| j                  dd…= | j                  «        |S )zhEnd capture mode and return captured string.

        Returns:
            str: Console output.
        N)rç   rä   ré   )r~   Úrender_results     r_   rÊ   zConsole.end_capturef  s5   € ð ×+Ñ+¨D¯L©LÓ9ˆØ�L‰LšˆOØ×ÑÔØÐr^   ©rÓ   rÓ   c                ó>   — | j                   j                  ||¬«       y)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.
        r½  N)r’  rÖ   ©r~   rÒ   rÓ   s      r_   rÖ   zConsole.push_themeq  s   € ð 	×Ñ×$Ñ$ U°GÐ$Õ<r^   c                 ó8   — | j                   j                  «        y)z9Remove theme from top of stack, restoring previous theme.N)r’  rØ   r}   s    r_   rØ   zConsole.pop_theme|  s   € à×Ñ×#Ñ#Õ%r^   c                ó   — t        | ||«      S )a  Use a different theme for the duration of the context manager.

        Args:
            theme (Theme): Theme instance to user.
            inherit (bool, optional): Inherit existing console styles. Defaults to True.

        Returns:
            ThemeContext: [description]
        )rÑ   r¿  s      r_   Ú	use_themezConsole.use_theme€  s   € ô ˜D %¨Ó1Ð1r^   c                 óB   — | j                   �t        | j                      S y)zpGet color system string.

        Returns:
            Optional[str]: "standard", "256" or "truecolor".
        N)rj  Ú_COLOR_SYSTEMS_NAMESr}   s    r_   r=  zConsole.color_systemŒ  s$   € ð ×ÑÐ)Ü'¨×(:Ñ(:Ñ;Ð;àr^   c                 óT   — t        | j                  dd«      xs dj                  «       S )zGet the encoding of the console file, e.g. ``"utf-8"``.

        Returns:
            str: A standard encoding string.
        rr   úutf-8)r‡  rC  r›  r}   s    r_   rr   zConsole.encoding™  s%   € ô ˜Ÿ	™	 :¨wÓ7ÒB¸7×IÑIÓKÐKr^   c                 ó¼  — | j                   �| j                   S t        t        j                  d«      r*t        j                  j                  j                  d«      ry| j                  ry| j                  }|j                  dd«      }|dk(  ry|dk(  ry	|j                  d
«      }|�|dk7  S t        | j                  dd«      }	 |€dS  |«       S # t        $ r Y yw xY w)zÏCheck if the console is writing to a terminal.

        Returns:
            bool: True if the console writing to a device capable of
                understanding escape sequences, otherwise False.
        Nr[   ÚidlelibFÚTTY_COMPATIBLErø   r\  r]  TÚFORCE_COLORÚisatty)rh  Úhasattrr…  Ústdinr[   r|   r^  r:  rÎ   r‡  rC  Ú
ValueError)r~   ÚenvironÚtty_compatibleÚforce_colorrË  s        r_   rq   zConsole.is_terminal¢  sä   € ð ×ÑÐ+Ø×'Ñ'Ð'ô ”3—9‘9˜lÔ+´·	±	×0DÑ0D×0OÑ0OØô1
ð à�?Š?àà—-‘-ˆà Ÿ™Ð%5°rÓ:ˆà˜SÒ Øà˜SÒ Øð —k‘k -Ó0ˆØÐ"Ø "Ñ$Ð$ô 07°t·y±yÀ(ÈDÓ/Qˆð	Ø"˜N�5Ð8±³Ð8øÜò 	ñ ð		ús   ÃC ÃC Ã	CÃCc                 ó~   — | j                   j                  dd«      }|j                  «       dv }| j                  xr |S )zxDetect dumb terminal.

        Returns:
            bool: True if writing to a dumb terminal, otherwise False.

        r–  rø   )ÚdumbÚunknown)r:  rÎ   r›  rq   )r~   Ú_termÚis_dumbs      r_   rr  zConsole.is_dumb_terminalÒ  s<   € ð —‘×!Ñ! &¨"Ó-ˆØ—+‘+“-Ð#6Ð6ˆØ×ÑÒ+ GÐ+r^   c           	      ó¢   — | j                   }t        |j                  || j                  d|j                  | j
                  | j                  ¬«      S )zGet default console options.r#   )rs   rm   rn   ro   rp   rr   rq   )rm   rl   rg   rn   rf   rr   rq   )r~   rm   s     r_   r…   zConsole.optionsÞ  sG   € ð �y‰yˆÜØ—{‘{ØØ×.Ñ.ØØ—j‘jØ—]‘]Ø×(Ñ(ô
ð 	
r^   c                 óð  — | j                   �9| j                  �-t        | j                   | j                  z
  | j                  «      S | j                  rt        dd«      S d}d}t
        rt        nt        }|D ]  }	 t        j                  |«      \  }} n | j                  j                  d«      }|�|j                  «       rt!        |«      }| j                  j                  d«      }|�|j                  «       rt!        |«      }|xs d}|xs d}t        | j                   €|| j                  z
  n| j                   | j                  €|«      S | j                  «      S # t        t        t        f$ r Y Œþw xY w)zGet the size of the console.

        Returns:
            ConsoleDimensions: A named tuple containing the dimensions.
        NéP   é   rU  rV  )rf  rg  re   rn   rr  r6  Ú_STD_STREAMS_OUTPUTÚ_STD_STREAMSr  Úget_terminal_sizeÚAttributeErrorrÎ  ÚOSErrorr:  rÎ   r_  ri   )r~   rf   rg   ÚstreamsÚfile_descriptorr}  r³   s          r_   rm   zConsole.sizeì  sX  € ð �;‰;Ð" t§|¡|Ð'?Ü$ T§[¡[°4×3FÑ3FÑ%FÈÏÉÓUÐUà× Ò Ü$ R¨Ó,Ð,à#ˆØ $ˆå)0Õ%´lˆÛ&ˆOðÜ "× 4Ñ 4°_Ó E‘��vñ ð  'ð —-‘-×#Ñ# IÓ.ˆØÐ 7§?¡?Ô#4Ü˜“LˆEØ—‘×!Ñ! 'Ó*ˆØÐ §¡¤Ü˜“ZˆFð ’˜ˆØ’˜2ˆÜ Ø+/¯;©;Ð+>ˆE�D×'Ñ'Ò'ÀDÇKÁKØ—l‘lÐ*ˆFó
ð 	
à04·±ó
ð 	
øô #¤J´Ð8ò Ùðús   Á:EÅE5Å4E5Únew_sizec                 ó*   — |\  }}|| _         || _        y)zvSet a new size for the terminal.

        Args:
            new_size (Tuple[int, int]): New width and height.
        N)rf  rg  )r~   râ  rf   rg   s       r_   rm   zConsole.size  s   € ð !‰ˆˆvØˆŒØˆ�r^   c                 ó.   — | j                   j                  S )zsGet the width of the console.

        Returns:
            int: The width (in characters) of the console.
        )rm   rf   r}   s    r_   rf   zConsole.width   s   € ð �y‰y�‰Ðr^   c                 ó   — || _         y)zFSet width.

        Args:
            width (int): New width.
        N)rf  )r~   rf   s     r_   rf   zConsole.width)  s   € ð ˆ�r^   c                 ó.   — | j                   j                  S )zpGet the height of the console.

        Returns:
            int: The height (in lines) of the console.
        )rm   rg   r}   s    r_   rg   zConsole.height2  s   € ð �y‰y×ÑÐr^   c                 ó   — || _         y)zISet height.

        Args:
            height (int): new height.
        N)rg  )r~   rg   s     r_   rg   zConsole.height;  s   € ð ˆ�r^   c                 óJ   — | j                  t        j                  «       «       y)z3Play a 'bell' sound (if supported by the terminal).N)Úcontrolr0   Úbellr}   s    r_   rê  zConsole.bellD  s   € à�‰”W—\‘\“^Õ$r^   c                 ó   — t        | «      }|S )aá  A 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¾   )r~   Úcaptures     r_   rì  zConsole.captureH  s   € ô ˜$“-ˆØˆr^   rÜ   rÝ   rÞ   c                 ó    — t        | |||¬«      S )a  A 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.
        )rÜ   rÝ   rÞ   )rÛ   )r~   rÜ   rÝ   rÞ   s       r_   rÜ   zConsole.pagerY  s   € ô* ˜D¨°fÀEÔJÐJr^   r#   rª   c                 óP   — |dk\  sJ d«       ‚| j                  t        |«      «       y)zqWrite new line(s).

        Args:
            count (int, optional): Number of new lines. Defaults to 1.
        r   zcount must be >= 0N)rý   r©   r¬   s     r_   r¼   zConsole.linep  s&   € ð ˜ŠzÐ/Ð/Ó/ˆzØ�
‰
”7˜5“>Õ"r^   Úhomec                 ó¼   — |r7| j                  t        j                  «       t        j                  «       «       y| j                  t        j                  «       «       y)z‡Clear the screen.

        Args:
            home (bool, optional): Also move the cursor to 'home' position. Defaults to True.
        N)ré  r0   Úclearrï  )r~   rï  s     r_   rñ  zConsole.clearz  s3   € ñ Ø�L‰LœŸ™›¬'¯,©,«.Õ9à�L‰LœŸ™›Õ)r^   Údotszstatus.spinnerg      ð?g      )@)ÚspinnerÚspinner_styleÚspeedÚrefresh_per_secondÚstatusró  rô  rõ  rö  rK   c                ó.   — ddl m}  ||| ||||¬«      }|S )at  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#   rJ   )r¢   ró  rô  rõ  rö  )r÷  rK   )r~   r÷  ró  rô  rõ  rö  rK   Ústatus_renderables           r_   r÷  zConsole.status…  s,   € õ* 	#á"ØØØØ'ØØ1ô
Ðð !Ð r^   rè   c                 óf   — | j                   r%| j                  t        j                  |«      «       yy)zqShow or hide the cursor.

        Args:
            show (bool, optional): Set visibility of the cursor.
        TF)rq   ré  r0   r   )r~   rè   s     r_   r   zConsole.show_cursor¦  s*   € ð ×ÒØ�L‰Lœ×,Ñ,¨TÓ2Ô3ØØr^   Úenablec                 ó”   — d}| j                   r9| j                  s-| j                  t        j                  |«      «       d}|| _        |S )aº  Enables 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)rq   rn   ré  r0   Ú
alt_screenrz  )r~   rû  Úchangeds      r_   rÿ   zConsole.set_alt_screen±  sC   € ð ˆØ×Ò D×$7Ò$7Ø�L‰Lœ×+Ñ+¨FÓ3Ô4ØˆGØ"(ˆDÔØˆr^   c                 ó   — | j                   S )z†Check if the alt screen was enabled.

        Returns:
            bool: True if the alt screen was enabled, otherwise False.
        )rz  r}   s    r_   Úis_alt_screenzConsole.is_alt_screenÆ  s   € ð ×"Ñ"Ð"r^   Útitlec                 óf   — | j                   r%| j                  t        j                  |«      «       yy)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)rq   ré  r0   r  )r~   r  s     r_   Úset_window_titlezConsole.set_window_titleÏ  s(   € ð6 ×ÒØ�L‰LœŸ™ uÓ-Ô.ØØr^   rð   rï   c                 ó&   — t        | ||xs d¬«      S )au  Context 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ø   )rð   rñ   )rï   )r~   rð   rñ   s      r_   rô   zConsole.screenï  s   € ô ˜T¨{À%Â+È2ÔNÐNr^   ©r…   rü   r…   c                óP   — t        j                  | |xs | j                  |«      }|S )aó  Measure 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.
        )r6   rÎ   r…   )r~   rü   r…   Úmeasurements       r_   ÚmeasurezConsole.measureý  s%   € ô "—o‘o d¨GÒ,C°t·|±|ÀZÓPˆØÐr^   c              #   ó€  K  — |xs | j                   }|j                  dk  ryt        |«      }t        |d«      r#t	        |t
        «      s|j                  | |«      }ndt	        |t        «      r;| j                  ||j                  |j                  ¬«      }|j                  | |«      }nt        j                  d|›d�«      ‚	 t        |«      }t        }|j!                  «       }|D ]-  }t	        ||«      r|–— Œ| j#                  ||«      E d{  –—†  Œ/ y# t        $ r t        j                  d|›d�«      ‚w xY w7 Œ-­w)	ak  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£   )rw   rx   zUnable to render zC; A str, Segment or object with __rich_console__ method is requiredzobject z is not renderable)r…   rp   r:   rÌ  r‡   Útyper£   r“   Ú
render_strrw   rx   r$   ÚNotRenderableErrorÚiterÚ	TypeErrorr=   r�   r5   )	r~   rü   r…   Ú_optionsÚrender_iterableÚtext_renderableÚiter_renderÚ_SegmentÚrender_outputs	            r_   r5   zConsole.render  sL  è ø€ ð" Ò*˜dŸl™lˆØ×Ñ Ò!àô ˜zÓ*ˆ
Ü�:Ð1Ô2¼:ÀjÔRVÔ;WØ(×9Ñ9¸$ÀÓI‰OÜ˜
¤CÔ(Ø"Ÿo™oØ h×&8Ñ&8ÀÇÁð .ó ˆOð .×>Ñ>¸tÀXÓN‰Oä×+Ñ+Ø# J >ð 2Tð Tóð ð
	Ü˜Ó/ˆKô
 ˆØ×(Ñ(Ó*ˆÛ(ˆMÜ˜-¨Ô2Ø#Ó#àŸ;™; }°hÓ?×?Ñ?ñ	 )øô ò 	Ü×+Ñ+Ø˜/Ð,Ð,>Ð?óð ð	úð @ús+   ‚B?D>ÃD ÃAD>ÄD<ÄD>Ä#D9Ä9D>)rñ   ÚpadÚ	new_linesr  r  c                ó^  — | j                   5  |xs | j                  }| j                  ||«      }|rt        j                  ||«      }|j
                  }|�t        d|«      }t        t        t        j                  ||j                  |||¬«      d|«      «      }	|j
                  �r|j
                  t        |	«      z
  }
|
dkD  rU|r$t        d|j                  z  |«      t        d«      gnt        d|j                  z  |«      gg}|	j                  ||
z  «       |	cddd«       S # 1 sw Y   yxY w)aG  Render 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_linesr  rñ   r€  r¯   )rã   r…   r5   r=   Úapply_stylerg   rˆ   r
  r	   Úsplit_and_crop_linesrp   rú   Úextend)r~   rü   r…   rñ   r  r  Úrender_optionsÚ	_renderedÚrender_heightr³   Úextra_linesÚpad_lines               r_   Úrender_lineszConsole.render_linesA  s+  € ð0 �Z‹ZØ$Ò4¨¯©ˆNØŸ™ J°Ó?ˆIÙÜ#×/Ñ/°	¸5ÓA�	à*×1Ñ1ˆMØÐ(Ü # A }Ó 5�äÜÜ×0Ñ0Ø!Ø&×0Ñ0Ø*3ØØ#ôð Ø!ó
óˆEð ×$Ñ$Ð0Ø,×3Ñ3´c¸%³jÑ@�Ø ’?ñ  )ô !(¨¨n×.FÑ.FÑ(FÈÓ NÜ '¨£ñô
 #*¨#°×0HÑ0HÑ*HÈ%Ó"PÐ!Qð	 �Hð —L‘L ¨KÑ!7Ô8à÷M �ZŠZús   �DD#Ä#D,rø   )rñ   rt   ru   rH  rx   rw   rM  Útextrt   ru   rD   c                ó¢  — |xs |du xr | j                   }	|xs |du xr | j                  }
|xs |du xr | j                  }|
r(t        |||	| j                  ¬«      }||_        ||_        n(t        |	rt        || j                  ¬«      n||||¬«      }|r|xs | j                  nd}|�$ |t        |«      «      }|j                  |«       |S |S )a¦  Convert 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)rñ   rH  rI  )Údefault_variant)rt   ru   rñ   )rc  rb  re  Úrender_markuprd  rt   ru   rD   r&   rM  r“   Úcopy_styles)r~   r"  rñ   rt   ru   rH  rx   rw   rM  Úemoji_enabledÚmarkup_enabledÚhighlight_enabledÚ	rich_textÚ_highlighterÚhighlight_texts                  r_   r  zConsole.render_str�  sï   € ð8 Ò@ %¨4 -Ò"?°D·K±KˆØÒD F¨d NÒ$C°t·|±|ˆØ%ÒP¨)°tÐ*;Ò*OÀÇÁÐáÜ%ØØØ#Ø"×1Ñ1ô	ˆIð !(ˆIÔØ!)ˆIÕäñ %ô # 4¸×9LÑ9LÕMààØ!Øô	ˆIñ =N˜Ò7 t×'7Ò'7ÐSWˆØÐ#Ù)¬#¨i«.Ó9ˆNØ×&Ñ& yÔ1Ø!Ð!àÐr^   )rO   ÚnamerO   c                óf  — t        |t        «      r|S 	 | j                  j                  |«      }|€t        j                  |«      }|j
                  r|j                  «       S |S # t        j                  $ r9}|�| j                  |«      cY d}~S t        j                  d|›d|› �«      d‚d}~ww xY w)a   Get 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.

        NzFailed to get style z; )r‡   r>   r’  rÎ   ÚparseÚlinkrƒ   r$   ÚStyleSyntaxErrorÚ	get_styleÚMissingStyle)r~   r-  rO   rñ   Úerrors        r_   r2  zConsole.get_style¾  s©   € ô �dœEÔ"ØˆKð
	Ø×%Ñ%×)Ñ)¨$Ó/ˆEØˆ}ÜŸ™ DÓ)�Ø#(§:¢:�5—:‘:“<Ð8°5Ð8øÜ×&Ñ&ò 	ØÐ"Ø—~‘~ gÓ.Õ.Ü×%Ñ%Ø& t h¨b°°Ð8óàðûð	ús*   ”AA$ Á"A$ Á$B0Á7B+Â	B0ÂB+Â+B0©rt   rH  rx   rw   ÚobjectsÚseprù   c          
      óò  ‡‡‡‡‡‡— dt         dt        fd„}g }	|	j                  Šg Š‰j                  }
‰Š‰dv rdt        ddfˆˆfd„}|Št        }|s|€| j
                  r| j                  }dˆˆˆˆˆfd„}|D ]°  }t        |«      }t        |t        «      r |
| j                  |||||¬	«      «       Œ;t        |t        «      r	 |
|«       ŒTt        |t        «      r |«         ‰|«       Œt ||«      r |«        d
dlm}  ‰ |||¬«      «       Œš |
 |t        |«      «      «       Œ²  |«        | j                  �4| j!                  | j                  «      }|	D �cg c]  }t#        ||«      ‘Œ }	}|	S c c}w )a  Combine 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.
        Úobjry   c                 ó   — ddl m}  || «      S )z3Check if an object is expandable by pretty printer.r#   )Úis_expandable)Úprettyr;  )r9  Ú_is_expandables     r_   r;  z3Console._collect_renderables.<locals>.is_expandableö  s   € õ @á! #Ó&Ð&r^   )rP   rQ   rR   rü   Nc           	      óF   •—  ‰t        | t        t        ‰«      «      «       y rœ   )r,   r    r-   )rü   Ú_appendrt   s    €€r_   Úalign_appendz2Console._collect_renderables.<locals>.align_append  s   ø€ Ùœ˜j¬$¬{¸GÓ*DÓEÕFr^   c                  óv   •— ‰r6t        ‰‰‰¬«      }  ‰| j                  ‰«      «       ‰j                  «        y y )N)rt   rù   )rD   Újoinrñ  )Úsep_textrª  rù   rt   r7  r"  s    €€€€€r_   Ú
check_textz0Console._collect_renderables.<locals>.check_text  s3   ø€ ÙÜ ¨W¸#Ô>�Ù�x—}‘} TÓ*Ô+Ø—
‘
•ð r^   )rH  rx   rw   rM  r#   )ÚPretty)rM  ©ry   N)Úobjectr’   rª  r  rp  re  rM  r:   r‡   r“   r  rD   rš   r<  rE  rñ   r2  r@   )r~   r6  r7  rù   rt   rH  rx   rw   r;  rö   Úappend_textr@  r+  rD  rü   rE  rñ   r?  rª  r"  s     ```            @@@r_   Ú_collect_renderableszConsole._collect_renderablesÜ  sw  ý€ ð4	'œvð 	'¬$ó 	'ð 02ˆØ×$Ñ$ˆØˆØ—k‘kˆàˆØÐ1Ñ1ðG¬ð G¸Dö Gð "ˆFä(9ˆÙ˜Ð*¨t¯ªØ×+Ñ+ˆL÷	ñ 	ó "ˆJÜ" :Ó.ˆJÜ˜*¤cÔ*ÙØ—O‘OØ"Ø#Ø%Ø"+Ø$0ð $ó õô ˜J¬Ô-Ù˜JÕ'Ü˜JÔ(9Ô:Ù”Ù�zÕ"Ù˜zÔ*Ù”Ý*á‘v˜j°lÔCÕDá™L¬¨Z«Ó9Õ:ð/ "ñ2 	Œà�:‰:Ð!Ø—N‘N 4§:¡:Ó.ˆEÙGRÓSÁ{¸œ6 *¨eÕ4À{ˆKÐSàÐùò Ts   ÅE4u   â”€z	rule.linerQ   )Ú
charactersrñ   ÚalignrJ  rK  c                óJ   — ddl m}  |||||¬«      }| j                  |«       y)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)r  rJ  rñ   rK  N)ÚrulerM  rý   )r~   r  rJ  rñ   rK  rM  rN  s          r_   rN  zConsole.rule5  s#   € õ  	á˜%¨J¸eÈ5ÔQˆØ�
‰
�4Õr^   ré  c                 ó�   — | j                   s.| 5  | j                  j                  d„ |D «       «       ddd«       yy# 1 sw Y   yxY w)z’Insert non-printing control codes.

        Args:
            control_codes (str): Control codes, such as those that may move the cursor.
        c              3   ó4   K  — | ]  }|j                   –— Œ y ­wrœ   )Úsegment)Ú.0Ú_controls     r_   Ú	<genexpr>z"Console.control.<locals>.<genexpr>R  s   è ø€ Ð#MÁW¸ H×$4Õ$4ÁWùó   ‚N)rr  rä   r  )r~   ré  s     r_   ré  zConsole.controlJ  s:   € ð ×$Ò$ÚØ—‘×#Ñ#Ñ#MÁWÓ#MÔM÷ �ð %ß�ús	   �#<¼Ar€  r¯   )r7  rù   rñ   rw   c                óh   — |j                  d„ |D «       «      }| j                  |||ddddd|¬«	       y)a·  Output 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``.
        c              3   ó2   K  — | ]  }t        |«      –— Œ y ­wrœ   )r“   )rR  Ú_objects     r_   rT  zConsole.out.<locals>.<genexpr>g  s   è ø€ Ð"G¹w°G¤3 w§<¹wùó   ‚FTrW   )rñ   rw   rH  rx   rv   ru   rU   rù   N)rB  rý   )r~   r7  rù   rñ   rw   r6  Ú
raw_outputs          r_   ÚoutzConsole.outT  sD   € ð& Ÿ(™(Ñ"G¹wÓ"GÓGˆ
Ø�
‰
ØØØØØØØØØð 	õ 
	
r^   )r7  rù   rñ   rt   ru   rv   rH  rx   rw   rf   rg   rU   rA  Únew_line_startrv   rU   r\  c          
      óf  — |s|dk(  rt        «       f}nd}|€| j                  }|r
|€d}|€d}d}| j                  dd }| 5  | j                  |||||||	¬«      }|D ]  }|j	                  |«      }Œ | j
                  j                  |||
�t        |
| j                  «      nt        ||||	¬«      }g }|j                  }| j                  }|€|D ]  } | |||«      «       Œ n€| j                  |«      }t        j                  «       }|D ]V  }t        j                   |||«      «      D ]5  \  }} |t        j                   ||«      «       |sŒ%|j#                  |«       Œ7 ŒX |rVt%        d	j'                  d
„ |D «       «      j)                  «       «      dkD  r$|j+                  dt        j                  «       «       |rF| j,                  j                  }t        j.                  || j                  d¬«      D ]
  } ||«       Œ n| j,                  j                  |«       ddd«       y# 1 sw Y   yxY w)a[  Print to the console.

        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): Justify method: "default", "left", "right", "center", or "full". Defaults to ``None``.
            overflow (str, optional): Overflow method: "ignore", "crop", "fold", or "ellipsis". Defaults to None.
            no_wrap (Optional[bool], optional): Disable word wrapping. 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``.
            width (Optional[int], optional): Width of output, or ``None`` to auto-detect. Defaults to ``None``.
            crop (Optional[bool], optional): Crop output to width of terminal. Defaults to True.
            soft_wrap (bool, optional): Enable soft wrap mode which disables word wrapping and cropping of text or ``None`` for
                Console default. Defaults to ``None``.
            new_line_start (bool, False): Insert a new line at the start if the output contains more than one line. Defaults to ``False``.
        r¯   r  NTrW   Fr5  )rt   ru   rf   rg   rv   rx   rw   rø   c              3   ó4   K  — | ]  }|j                   –— Œ y ­wrœ   )r"  ©rR  rQ  s     r_   rT  z Console.print.<locals>.<genexpr>Ñ  s   è ø€ ÐI¹L° §¥¹LùrU  r#   r   ©r  )r©   rA  rx  rI  r/  r…   r‰   Úminrf   r—   r  r5   r2  r=   r¼   Úsplit_lines_terminatorr  rª  rú   rB  Ú
splitlinesÚinserträ   r  )r~   r7  rù   rñ   rt   ru   rv   rH  rx   rw   rf   rg   rU   rA  r\  r6  Úrender_hooksrö   r°  r  Únew_segmentsr  r5   rü   Úrender_styleÚnew_liner¼   Úadd_new_lineÚbuffer_extends                                r_   rý   zConsole.printt  s,  € ñJ Ø�dŠ{Ü"›9˜,‘à�àÐØŸ™ˆIÙØˆØ�ØÐØ#�ØˆDØ×)Ñ)©!Ð,ˆÚØ×3Ñ3ØØØØØØØ#ð 4ó ˆKó %�Ø"×6Ñ6°{ÓC‘ð %à!Ÿ\™\×0Ñ0ØØ!Ø05Ð0A”c˜% §¡Ô,ÄyØØØØ#ð 1ó ˆNð +-ˆLØ!×(Ñ(ˆFØ—[‘[ˆFØˆ}Û"-�JÙ™6 *¨nÓ=Õ>ñ #.ð  $Ÿ~™~¨eÓ4�Ü"Ÿ<™<›>�Û"-�JÜ.5×.LÑ.LÙ˜z¨>Ó:ö/Ñ*˜˜lñ œw×2Ñ2°4¸ÓFÔGÚ'Ø(×/Ñ/°Õ9ñ/ð #.ñ ä˜Ÿ™ÑI¹LÓIÓI×TÑTÓVÓWØòð !×'Ñ'¨¬7¯<©<«>Ô:ÙØ $§¡× 3Ñ 3�Ü#×8Ñ8Ø  $§*¡*°%÷�Dñ " $Õ'ñð
 —‘×#Ñ# LÔ1÷i �T‰Tús   ÁDH'ÅCH'È'H0r`   )	ÚdataÚindentrw   Ú	skip_keysÚensure_asciiÚcheck_circularÚ	allow_nanrO   Ú	sort_keysÚjsonrk  rl  rm  rn  ro  rp  rq  c       	         óÐ   — ddl m} |€|j                  ||||||||	|
¬«	      }n0t        |t        «      st        d|›d�«      ‚ |||||||||	|
¬«	      }| j                  |d¬«       y)	aó  Pretty 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)rl  rw   rm  rn  ro  rp  rO   rq  z/json must be str. Did you mean print_json(data=z) ?T)rA  )Ú	rich.jsonrt  Ú	from_datar‡   r“   r  rý   )r~   rr  rk  rl  rw   rm  rn  ro  rp  rO   rq  rt  Újson_renderables                r_   Ú
print_jsonzConsole.print_jsonÞ  s˜   € õ: 	#àˆ<Ø"Ÿn™nØØØ#Ø#Ø)Ø-Ø#ØØ#ð -ó 
‰Oô ˜d¤CÔ(ÜØEÀdÀXÈSÐQóð ñ #ØØØ#Ø#Ø)Ø-Ø#ØØ#ô
ˆOð 	�
‰
�?¨dˆ
Õ3r^   )Úregionr…   ry  c                óZ  — | j                   st        j                  d«      ‚|xs | j                  }|€9dx}}|j	                  |j
                  |j                  xs | j                  «      }n|\  }}}}|j	                  ||«      }| j                  ||¬«      }	| j                  |	||«       y)a³  Update 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_screenNr   r  )	r   r$   ÚNoAltScreenr…   r‘   rp   rg   r!  Úupdate_screen_lines)
r~   rü   ry  r…   r  r´   rµ   rf   rg   r³   s
             r_   Úupdate_screenzConsole.update_screen  s®   € ð& ×!Ò!Ü×$Ñ$Ð%WÓXÐXØ Ò0 D§L¡LˆØˆ>ØˆIˆA�Ø+×=Ñ=Ø×(Ñ(¨.×*?Ñ*?Ò*NÀ4Ç;Á;ó‰Nð #)ÑˆAˆq�%˜Ø+×=Ñ=¸eÀVÓLˆNà×!Ñ! *°nÐ!ÓEˆØ× Ñ  ¨¨1Õ-r^   r³   r´   rµ   c                 óØ   — | j                   st        j                  d«      ‚t        |||«      }| j	                  |«      }| j
                  j                  |«       | j                  «        y)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.
        r{  N)r   r$   r|  r²   r5   rä   r  r§  )r~   r³   r´   rµ   Úscreen_updaterë   s         r_   r}  zConsole.update_screen_lines=  sY   € ð ×!Ò!Ü×$Ñ$Ð%WÓXÐXÜ$ U¨A¨qÓ1ˆØ—;‘;˜}Ó-ˆØ�‰×Ñ˜HÔ%Ø×ÑÕr^   rM   é   r]   ©rf   r  rÒ   Ú	word_wrapÚshow_localsÚsuppressÚ
max_framesr  rƒ  r„  r…  r†  c          	      óP   — ddl m}  ||||||||¬«      }	| j                  |	«       y)a  Prints 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#   )Ú	Tracebackr‚  N)r¸  rˆ  rý   )
r~   rf   r  rÒ   rƒ  r„  r…  r†  rˆ  r¸  s
             r_   Úprint_exceptionzConsole.print_exceptionQ  s4   € õ, 	)áØØ#ØØØ#ØØ!ô
ˆ	ð 	�
‰
�9Õr^   r»   Úcurrentframec                 ó\  — | dz  } |€ddl }|j                  «       }n |«       }|�K| r|�|j                  }| dz  } | r|�Œ|€J ‚|j                  j                  |j
                  |j                  fS ddl m}  |«       |    }|j                  |j                  |j                  j                  fS )a\  Get 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 None, which will use ``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#   Nr   )Ústack)ÚinspectrŠ  Úf_backÚf_codeÚco_filenameÚf_linenoÚf_localsrŒ  ÚfilenameÚlinenoÚframe)r»   rŠ  r�  r•  rŒ  Ú
frame_infos         r_   Ú_caller_frame_infozConsole._caller_frame_infot  sµ   € ð& 	�!‰ˆàÐÛà×(Ñ(Ó*‰Eá “NˆEØÐÙ˜UÐ.ØŸ™�Ø˜!‘�ñ ˜UÑ.ð Ð$Ð$Ð$Ø—<‘<×+Ñ+¨U¯^©^¸U¿^¹^ÐKÐKå%á› ™ˆJØ×&Ñ&¨
×(9Ñ(9¸:×;KÑ;K×;TÑ;TÐTÐTr^   )	r7  rù   rñ   rt   rH  rx   rw   Ú
log_localsÚ_stack_offsetr˜  r™  c       	   
      óâ  — |
st        «       f}
| j                  dd }| 5  | j                  |
||||||¬«      }|�|D �cg c]  }t        ||«      ‘Œ }}| j	                  |	«      \  }}}|j                  d«      rdnt        j                  j                  |«      }|j                  t        j                  «      d   }|rSddlm} |j                  «       D ��ci c]  \  }}|j                  d«      s||“Œ }}}|j                   ||d¬	«      «       | j                  | || j!                  «       |||¬
«      g}|D ]  }|j#                  |«      }Œ g }|j$                  }| j&                  }| j(                  }|D ]  } | |||«      «       Œ | j*                  j$                  }t-        j.                  || j0                  d¬«      D ]
  } ||«       Œ 	 ddd«       yc c}w c c}}w # 1 sw Y   yxY w)aX  Log 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``.
            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.
        Nr5  Ú<éÿÿÿÿr#   )Úrender_scopeÚ__z	[i]locals)r  )rJ  ÚpathÚline_noÚ	link_pathFr`  )r©   rx  rI  r@   r—  r|   r  rŸ  Úabspathrœ  r7  Úscoper�  Úitemsrª  ro  rO  r/  r  r5   r…   rä   r=   r  rf   )r~   r7  rù   rñ   rt   rH  rx   rw   r˜  r™  r6  re  rö   rü   r“  r   Úlocalsr¡  rŸ  r�  Úkeyr�  Ú
locals_mapr°  rf  r  r5   r  rj  r¼   s                                 r_   ÚlogzConsole.log›  sü  € ñ8 Ü“y�lˆGà×)Ñ)©!Ð,ˆâØ×3Ñ3ØØØØØØØ#ð 4ó ˆKð Ð ÙKVÓWÉ;¸Zœv j°%Õ8È;�ÐWà(,×(?Ñ(?ÀÓ(NÑ%ˆH�g˜vØ (× 3Ñ 3°CÔ 8™¼b¿g¹g¿o¹oÈhÓ>WˆIØ×&Ñ&¤r§v¡vÓ.¨rÑ2ˆDÙÝ/ð '-§l¡l¤nôá&4™
˜˜UØŸ>™>¨$Ô/ð ˜‘JØ&4ð ñ ð
 ×"Ñ"¡<°
À+Ô#NÔOð × Ñ ØØØ!×.Ñ.Ó0ØØ#Ø'ð !ó ð	ˆKó %�Ø"×6Ñ6°{ÓC‘ð %à*,ˆLØ!×(Ñ(ˆFØ—[‘[ˆFØ!Ÿ\™\ˆNÛ)�
Ù‘v˜j¨.Ó9Õ:ð *à ŸL™L×/Ñ/ˆMÜ×4Ñ4Ø˜dŸj™j¨e÷�ñ ˜dÕ#ñ÷[ ˆTùò Xùó÷' ˆTús*   ŸG%¾GÁBG%ÃGÃ5CG%ÇG%Ç%G.c                 óî   — d| _         t        j                  t        j                  t        j                  «      }t        j
                  |t        j                  j                  «       «       t        d«      ‚)al  This function is called when a `BrokenPipeError` is raised.

        This can occur when piping Textual output in Linux and macOS.
        The default implementation is to exit the app, but you could implement
        this method in a subclass to change the behavior.

        See https://docs.python.org/3/library/signal.html#note-on-sigpipe for details.
        Tr#   )
rD  r  ÚopenÚdevnullÚO_WRONLYÚdup2r…  r†  ÚfilenoÚ
SystemExit)r~   r«  s     r_   Úon_broken_pipezConsole.on_broken_pipeî  sH   € ð ˆŒ
Ü—'‘'œ"Ÿ*™*¤b§k¡kÓ2ˆÜ
�‰�œŸ™×*Ñ*Ó,Ô-Ü˜‹mÐr^   c                 óœ   — | j                   r| j                  dd…= y	 | j                  «        y# t        $ r | j	                  «        Y yw xY w)aQ  Check 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.
        N)rD  rä   Ú_write_bufferÚBrokenPipeErrorr°  r}   s    r_   r§  zConsole._check_bufferü  sE   € ð �:Š:Ø—‘šQ�Øð	"Ø×ÑÕ øÜò 	"Ø×ÑÖ!ð	"ús   ž/ ¯AÁ
Ac           	      óP  — | j                   5  | j                  rI| j                  s=| j                  5  | j                  j                  | j                  dd «       ddd«       | j                  dk(  �rG| j                  rFddlm	}  || j                  | j                  | j                  dd «      «       | j                  dd…= �nõt        �r‹d}| j                  rt        | j                  «      }|�|t        v }|rlddlm} ddlm} | j                  dd }| j(                  r*| j*                  rt-        t/        j0                  |«      «      } || || j                  «      «       �n*| j                  | j                  dd «      }| j                  j2                  }d}		 t5        |«      |	k  r	 ||«       n¡g }
|
j6                  }d}|j9                  d	«      D ]T  }|t5        |«      z   |	kD  r+|
r) |d
j;                  |
«      «       |
j=                  «        d} ||«       |t5        |«      z  }ŒV |
r' |d
j;                  |
«      «       |
j=                  «        n:| j                  | j                  dd «      }	 | j                  j3                  |«       | j                  jC                  «        | j                  dd…= ddd«       y# 1 sw Y   �ŒjxY w# t>        $ r}|j@                  › d�|_         ‚ d}~ww xY w# t>        $ r}|j@                  › d�|_         ‚ d}~ww xY w# 1 sw Y   yxY w)z$Write the buffer to the output file.Nr   r#   )ÚdisplayF)ÚLegacyWindowsTerm)Úlegacy_windows_renderi    Trø   zG
*** You may need to add PYTHONIOENCODING=utf-8 to your environment ***)"rã   rG  rŽ  rt  rw  r  rä   r^  Újupyterrµ  rç   r6  rn   r)   rC  rÛ  Úrich._win32_consoler¶  Úrich._windows_rendererr·  rE  rj  r
  r=   Úremove_colorÚwriterú   rª  rc  rB  rñ  ÚUnicodeEncodeErrorÚreasonÚflush)r~   rµ  Úuse_legacy_windows_renderr®  r¶  r·  rê   r"  r¼  Ú	MAX_WRITEÚbatchÚbatch_appendrm   r¼   r4  s                  r_   r²  zConsole._write_buffer  sŸ  € ð �Z‹ZØ�{Š{ 4×#5Ò#5Ø×-Ó-Ø×'Ñ'×.Ñ.¨t¯|©|¹A¨Ô?÷ .ð ×!Ñ! QÓ&Ø—?’?Ý0á˜DŸL™L¨$×*=Ñ*=¸d¿l¹lÉ1¸oÓ*NÔOØŸ™¢QšæØ49Ð1Ø×.Ò.Ü%/°·	±	Ó%:˜FØ%Ð1à$*Ô.AÐ$Að !:ñ 5ÝMÝTà%)§\¡\±! _˜FØ#Ÿ}š}°×1CÒ1CÜ)-¬g×.BÑ.BÀ6Ó.JÓ)K á1°&Ñ:KÈDÏIÉIÓ:VÖWð $(×#6Ñ#6°t·|±|ÁA°Ó#G˜Dð %)§I¡I§O¡O˜Eà(6˜Ið&Ü#& t£9°	Ò#9Ù$)¨$¥Kà79 EØ38·<±< LØ+, DØ04·±ÀÖ0E¨Ø+/´#°d³)Ñ+;¸iÒ+GÉEÙ,1°"·'±'¸%³.Ô,AØ,1¯K©K¬MØ34¨DÙ(4°TÔ(:Ø(,´°D³	Ñ(9©ð 1Fñ (-Ù(-¨b¯g©g°e«nÔ(=Ø(-¯©¬øð
  $×2Ñ2°4·<±<Á°?ÓC˜ð"Ø ŸI™IŸO™O¨DÔ1ð
 —I‘I—O‘OÔ%ØŸ™¢Q˜÷I ˆZç-Ñ-ûôl $6ò &Ø27·,±,°ð  @Hð  0I ¤Ø %ûð&ûô  2ò "Ø.3¯l©l¨^ð  <Dð  ,E˜EœLØ!ûð"ú÷ ˆZúsl   �%L²)KÁELÆB8KÉLÉ6K6Ê)LËK	ËLË	K3ËK.Ë.K3Ë3LË6	LË?LÌLÌLÌL%rê   c                 ó>  — g }|j                   }| j                  }| j                  }| j                   }| j                  r|rt        j                  |«      }|D ]0  \  }}}	|r ||j                  |||¬«      «       Œ$|r|	rŒ) ||«       Œ2 dj                  |«      }
|
S )z)Render buffered output, and clear buffer.)r=  rn   rø   )	rª  rj  rn   rq   rE  r=   r»  r5   rB  )r~   rê   Úoutputrª  r=  rn   Únot_terminalr"  rñ   ré  Úrendereds              r_   rç   zConsole._render_bufferT  s¥   € àˆØ—‘ˆØ×)Ñ)ˆØ×,Ñ,ˆØ×+Ñ+Ð+ˆØ�=Š=™\Ü×)Ñ)¨&Ó1ˆFÛ$*Ñ ˆD�%˜ÙÙØ—L‘LØØ%1Ø'5ð !ó õñ #¢wÙ�t•ð %+ð —7‘7˜6“?ˆØˆr^   )rx   rH  ÚpasswordÚstreamÚpromptrÈ  rÉ  c                ó¦   — |r| j                  |||d¬«       |rddl}|j                  d|¬«      }|S |r|j                  «       }|S t        «       }|S )a5  Displays 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ø   )rx   rH  rù   r   N)rÉ  )rý   ÚgetpassÚreadlineÚinput)r~   rÊ  rx   rH  rÈ  rÉ  Ú_getpass_modÚresults           r_   rÎ  zConsole.inputl  sc   € ñ. Ø�J‰J�v f°E¸rˆJÔBÙÛ*à!×)Ñ)¨"°VÐ)Ó<ˆFð ˆñ	 ØŸ™Ó*�ð ˆô ›�Øˆr^   ©rñ  rÝ   rñ  c                ó   — | j                   sJ d«       ‚| j                  5  |r#dj                  d„ | j                  D «       «      }n"dj                  d„ | j                  D «       «      }|r| j                  dd…= ddd«       |S # 1 sw Y   S xY w)a©  Generate 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 instancerø   c              3   óN   K  — | ]  \  }}}|r|j                  |«      n|–— Œ y ­wrœ   r4   )rR  r"  rñ   Ú_s       r_   rT  z&Console.export_text.<locals>.<genexpr>¢  s.   è ø€ ð á*=™˜˜e Qñ ,1�U—\‘\ $Ô'°dÓ:Ù*=ùs   ‚#%c              3   óL   K  — | ]  }|j                   s|j                  –— Œ y ­wrœ   )ré  r"  r_  s     r_   rT  z&Console.export_text.<locals>.<genexpr>§  s#   è ø€ ð á#6˜Ø"Ÿ?š?ð —L•LÙ#6ùs   ‚"$N)rG  rt  rB  rw  )r~   rñ  rÝ   r"  s       r_   Úexport_textzConsole.export_text�  s›   € ð �KŠKð	WàVó	WØð ×%Ó%ÙØ—w‘wñ à*.×*=Ò*=óó ‘ð
 —w‘wñ à#'×#6Ò#6óó �ñ
 Ø×'Ñ'ªÐ*÷ &ð ˆ÷ &ð ˆús    ABÂBrŸ  c                ó’   — | j                  ||¬«      }t        |dd¬«      5 }|j                  |«       ddd«       y# 1 sw Y   yxY w)a½  Generate text from console and save to a given location (requires record=True argument in constructor).

        Args:
            path (Union[str, PathLike[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``.

        rÑ  ÚwrÆ  ©rr   N)r×  rª  r¼  )r~   rŸ  rñ  rÝ   r"  Ú
write_files         r_   Ú	save_textzConsole.save_text°  sA   € ð  ×Ñ e°FÐÓ;ˆÜ�$˜ gÕ.°*Ø×Ñ˜TÔ"÷ /×.Ñ.ús	   ¢=½A©rÒ   rñ  Úcode_formatÚinline_stylesrÞ  rß  c          	      ó~  — ddl m} | j                  sJ d«       ‚g }|j                  }|xs t        }d}	|€t
        n|}
| j                  5  |r‹t        j                  t        j                  | j                  «      «      D ]U  \  }}} ||«      }|r=|j                  |«      }|j                  rd|j                  › d|› d�}|r	d	|› d|› d
�n|} ||«       ŒW nói }t        j                  t        j                  | j                  «      «      D ]s  \  }}} ||«      }|r[|j                  |«      }|j                  |t        |«      dz   «      }|j                  rd|› d|j                  › d|› d�}n	d|› d|› d
�} ||«       Œu g }|j                  }|j                  «       D ]  \  }}|sŒ	 |d|› d|› d�«       Œ dj!                  |«      }	|
j#                  dj!                  |«      |	|j$                  j&                  |j(                  j&                  ¬«      }|r| j                  dd…= ddd«       |S # 1 sw Y   S xY w)aI  Generate 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.
        r   ©ÚescaperÓ  rø   Nz	<a href="z">z</a>z<span style="z</span>r#   z<a class="rz" href="z<span class="rz.rz {Ú}r¯   )ÚcodeÚ
stylesheetÚ
foregroundÚ
background)Úhtmlrâ  rG  rª  rA   r'   rt  r=   Úfilter_controlÚsimplifyrw  Úget_html_styler0  Ú
setdefaultrú   r¤  rB  ÚformatÚforeground_colorÚhexÚbackground_color)r~   rÒ   rñ  rÞ  rß  râ  Ú	fragmentsrª  Ú_themerå  Úrender_code_formatr"  rñ   rÕ  rN  rÝ   Ústyle_numberÚstylesheet_rulesÚstylesheet_appendÚ
style_ruleÚrendered_codes                        r_   Úexport_htmlzConsole.export_htmlÄ  sb  € õ, 	 ð �KŠKð	WàVó	WØà!ˆ	Ø×!Ñ!ˆØÒ0Ô0ˆØˆ
à4?Ð4GÕ0È[Ðà×%Ó%ÙÜ&-×&<Ñ&<Ü×$Ñ$ T×%8Ñ%8Ó9ö'‘N�D˜% ñ " $›<�DÙØ$×3Ñ3°FÓ;˜Ø Ÿ:š:Ø%.¨u¯z©z¨l¸"¸T¸FÀ$Ð#G˜DÙHL ¨t¨f°B°t°f¸GÑDÐRV˜Ù˜4•Lñ'ð *,�Ü&-×&<Ñ&<Ü×$Ñ$ T×%8Ñ%8Ó9ö'‘N�D˜% ñ " $›<�DÙØ$×3Ñ3°FÓ;˜Ø'-×'8Ñ'8¸¼sÀ6»{ÈQ¹Ó'O˜Ø Ÿ:š:Ø%0°°¸hÀuÇzÁzÀlÐRTÐUYÐTZÐZ^Ð#_™Dà%3°L°>ÀÀDÀ6ÈÐ#Q˜DÙ˜4•Lð'ð /1Ð Ø$4×$;Ñ$;Ð!Ø06·±¶Ñ,�J Ú!Ù)¨B¨|¨n¸CÀ
¸|È2Ð*NÕOð 1?ð "ŸY™YÐ'7Ó8�
à.×5Ñ5Ø—W‘W˜YÓ'Ø%Ø!×2Ñ2×6Ñ6Ø!×2Ñ2×6Ñ6ð	 6ó ˆMñ Ø×'Ñ'ªÐ*÷Q &ðR Ð÷S &ðR Ðús   Á
EH2Æ)A?H2È2H<c                ó–   — | j                  ||||¬«      }t        |dd¬«      5 }|j                  |«       ddd«       y# 1 sw Y   yxY w)aV  Generate HTML from console contents and write to a file (requires record=True argument in constructor).

        Args:
            path (Union[str, PathLike[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Ù  rÆ  rÚ  N)rù  rª  r¼  )r~   rŸ  rÒ   rñ  rÞ  rß  rè  rÛ  s           r_   Ú	save_htmlzConsole.save_html	  sO   € ð, ×ÑØØØ#Ø'ð	  ó 
ˆô �$˜ gÕ.°*Ø×Ñ˜TÔ"÷ /×.Ñ.ús	   ¤?¿AÚRichg…ëQ¸…ã?©r  rÒ   rñ  rÞ  Úfont_aspect_ratioÚ	unique_idrþ  rÿ  c                óþ  ‡‡4‡5‡6‡7‡8‡9‡:— ddl }ddlmŠ6 ddlm} i Š9dt
        dt        fˆ4ˆ9fd„}	|xs t        Š4| j                  Š:d}
|
|z  Š5|
d	z  Š7d
}d
}d
}d
}d}d}d}d}||z   }||z   }||z   }||z   }g }g }i }d
}dt        dt        fˆ6fd„}	 d3dt        dt        t           dt        dt        fd„Š8| j                  5  t        t        j                  | j                  «      «      }|r| j                  j!                  «        ddd«       ‰€Vdt        |j#                  dj%                  d„ D «       «      j'                  dd«      |j'                  dd«      z   «      «      z   Šd}t)        t        j*                  ‰:¬«      «      D �]•  \  }}d}|D �]‡  \  } }!}"|!xs
 t        «       }! |	|!«      }#|#|vr
|||#<   |d
z  }d||#   › �}$|!j,                  rJd}%|!j.                  €‰4j0                  j2                  n$|!j.                  j5                  ‰4«      j2                  }&nf|!j6                  }'|'duxr |'j8                   }%|!j6                  €‰4j:                  j2                  n$|!j6                  j5                  ‰4«      j2                  }& || «      }(|%r-|j=                   ‰8d|&|‰5z  |‰7z  dz   ‰5|(z  ‰7dz   d¬«      «       | d t?        | «      z  k7  rE|j=                   ‰8d || «      ‰› d!|$› �|‰5z  |‰7z  |
z   ‰5t?        | «      z  d"‰› d#|› d$�¬%«      «       | || «      z  }�ŒŠ �Œ˜ tA        |«      D �)cg c]
  })|)‰7z  dz   ‘Œ }*})d&j%                  ˆ5ˆ7ˆ8ˆˆ:fd'„t)        |*«      D «       «      }+d&j%                  ˆfd(„|jC                  «       D «       «      },dj%                  |«      }-dj%                  |«      }.tE        ‰:‰5z  |z   «      }/|d
z   ‰7z  |z   }0 ‰8d‰4j:                  j2                  d)d*|||/|0d¬+«	      }1‰4j0                  j2                  }2|r$|1 ‰8d ||«      ‰› d,�|2d-|/d.z  ||
z   d/z   ¬0«      z  }1|1d1z  }1|jG                  ‰‰5|
‰7‰5‰:z  d
z
  |d
z   ‰7z  d
z
  |/|z   |0|z   ||z   ||z   |,|1|-|.|+¬2«      }3|3S # 1 sw Y   �ŒkxY wc c})w )4a  
        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   Nrá  )Úcell_lenrñ   ry   c                 óä  •— | ‰v r‰|    S g }| j                   �| j                   j                  r‰j                  n| j                   j                  ‰«      }| j                  �| j                  j                  r‰j
                  n| j                  j                  ‰«      }| j                  r||}}| j                  rt        ||d«      }|j                  d|j                  › �«       | j                  r|j                  d«       | j                  r|j                  d«       | j                  r|j                  d«       | j                  r|j                  d«       dj                  |«      }|‰| <   |S )z%Convert a Style to CSS rules for SVG.gš™™™™™Ù?zfill: zfont-weight: boldzfont-style: italic;ztext-decoration: underline;ztext-decoration: line-through;Ú;)ÚcolorÚ
is_defaultrî  Úget_truecolorÚbgcolorrð  ÚreverseÚdimr/   rª  rï  ÚboldÚitalicÚ	underlineÚstrikerB  )rñ   Ú	css_rulesr  r  Úcssrò  Ústyle_caches        €€r_   Úget_svg_stylez)Console.export_svg.<locals>.get_svg_styleR	  sD  ø€ à˜Ñ#Ø" 5Ñ)Ð)ØˆIð —K‘KÐ'¨5¯;©;×+AÒ+Að ×'Ò'à—[‘[×.Ñ.¨vÓ6ð ð —M‘MÐ)¨U¯]©]×-EÒ-Eð ×'Ò'à—]‘]×0Ñ0°Ó8ð ð
 �}Š}Ø!(¨%�w�Ø�yŠyÜ! %¨°#Ó6�Ø×Ñ˜v e§i¡i [Ð1Ô2Ø�zŠzØ× Ñ Ð!4Ô5Ø�|Š|Ø× Ñ Ð!6Ô7Ø�ŠØ× Ñ Ð!>Ô?Ø�|Š|Ø× Ñ Ð!AÔBà—(‘(˜9Ó%ˆCØ!$ˆK˜ÑØˆJr^   é   g…ëQ¸…ó?r#   é(   r<  r"  c                 ó4   •—  ‰| «      j                  dd«      S )z.HTML escape text and replace spaces with nbsp.r€  z&#160;)Úreplace)r"  râ  s    €r_   Úescape_textz'Console.export_svg.<locals>.escape_textŽ	  s   ø€ á˜$“<×'Ñ'¨¨XÓ6Ð6r^   r-  rì   Úattribsc           	      ó¨   ‡— dt         dt        fd„Šdj                  ˆfd„|j                  «       D «       «      }|rd| › d|› d|› d| › d�	S d| › d|› d	�S )
z.Make a tag from name, content, and attributes.r�  ry   c                 óP   — t        | t        «      rt        | d«      S t        | «      S )NÚg)r‡   Úfloatrí  r“   )r�  s    r_   Ú	stringifyz7Console.export_svg.<locals>.make_tag.<locals>.stringify—	  s#   € Ü˜e¤eÔ-Ü! %¨Ó-Ð-Ü˜5“zÐ!r^   r€  c              3   ó~   •K  — | ]4  \  }}|j                  d «      j                  d d«      › d ‰|«      › d�–— Œ6 y­w)rÕ  r—  z="Ú"N)Úlstripr  )rR  ÚkÚvr  s      €r_   rT  z7Console.export_svg.<locals>.make_tag.<locals>.<genexpr>œ	  sD   øè ø€ ð #á+‘D�A�qð —8‘8˜C“=×(Ñ(¨¨cÓ2Ð3°2±iÀ³l°^À1ÔEÙ+ùs   ƒ:=r›  r�  z</z/>)rG  r“   rB  r¤  )r-  rì   r  Útag_attribsr  s       @r_   Úmake_tagz$Console.export_svg.<locals>.make_tag’	  s|   ø€ ð
"¤ð "¬Có "ð
 Ÿ(™(ó #à#ŸM™MœOó#ó ˆKñ ð �D�6˜˜;˜- q¨¨	°°D°6¸Ð;ðð ˜˜˜a ˜}¨BÐ/ðr^   z	terminal-rø   c              3   ó2   K  — | ]  }t        |«      –— Œ y ­wrœ   )Úreprr_  s     r_   rT  z%Console.export_svg.<locals>.<genexpr>®	  s   è ø€ ÐC¹(¨wœT 'Ÿ]¹(ùrY  rÆ  rW   )ÚlengthÚrTÚrectg      ø?ç      Ð?Ú
crispEdges)Úfillr´   rµ   rf   rg   Úshape_renderingr€  r—  zurl(#ú-line-Ú))Ú_classr´   rµ   Ú
textLengthÚ	clip_pathr¯   c              3   ó^   •K  — | ]$  \  }}d ‰› d|› d ‰dd|‰‰z  ‰dz   ¬«      › d�–— Œ& y­w)	z<clipPath id="r-  z">
    r(  r   r)  )r´   rµ   rf   rg   z
            </clipPath>Nr]   )rR  r   r»   Ú
char_widthÚline_heightr#  rÿ  rf   s      €€€€€r_   rT  z%Console.export_svg.<locals>.<genexpr>í	  sY   øè ø€ ð 
ñ $;‘�˜ð ˜y˜k¨°¨yð 9Ùˆf˜˜V¨:¸Ñ+=ÀkÐTXÑFXÔYÐZð [ôñ $;ùs   ƒ*-c              3   ó<   •K  — | ]  \  }}d ‰› d|› d|› d�–— Œ y­w)Ú.z-rz { z }Nr]   )rR  r  Úrule_norÿ  s      €r_   rT  z%Console.export_svg.<locals>.<genexpr>ô	  s.   øè ø€ ð 
ÙGV±|°s¸Gˆa�	ˆ{˜"˜W˜I T¨#¨¨cÔ2Áùs   ƒzrgba(255,255,255,0.35)r]  )r+  ÚstrokeÚstroke_widthr´   rµ   rf   rg   Úrxz-titleÚmiddler`   é   )r/  r+  Útext_anchorr´   rµ   zô
            <g transform="translate(26,22)">
            <circle cx="0" cy="0" r="7" fill="#ff5f57"/>
            <circle cx="22" cy="0" r="7" fill="#febc2e"/>
            <circle cx="44" cy="0" r="7" fill="#28c840"/>
            </g>
        )rÿ  r3  Úchar_heightr4  Úterminal_widthÚterminal_heightrf   rg   Ú
terminal_xÚ
terminal_yrÝ   ÚchromeÚbackgroundsÚmatrixr³   rœ   )$Úzlibrè  râ  Ú
rich.cellsr  r>   r“   rB   rf   r   rG  rt  r
  r=   ré  rw  rñ  Úadler32rB  Úencoderº   r  r  r  rî  rï  r  r  r  rð  rª  rú   Úranger¤  r
   rí  );r~   r  rÒ   rñ  rÞ  rþ  rÿ  rF  r  r  r>  Ú
margin_topÚmargin_rightÚmargin_bottomÚmargin_leftÚpadding_topÚpadding_rightÚpadding_bottomÚpadding_leftÚpadding_widthÚpadding_heightÚmargin_widthÚmargin_heightÚtext_backgroundsÚ
text_groupÚclassesÚstyle_nor  rë   rµ   r¼   r´   r"  rñ   rS  ÚrulesÚ
class_nameÚhas_backgroundrç  r  Útext_lengthr   Úline_offsetsr³   rÝ   rD  rE  r?  r@  rC  Útitle_colorÚsvgrò  r3  râ  r4  r#  r  rf   s;         `                                             @@@@@@@r_   Ú
export_svgzConsole.export_svg0	  sa  ÿ€ ó6 	Ýå'à(*ˆð	¤ð 	¬3ö 	ðB Ò*Ô*ˆà—
‘
ˆØˆØ Ð#4Ñ4ˆ
Ø! DÑ(ˆàˆ
ØˆØˆØˆàˆØˆØˆØˆà$ }Ñ4ˆØ$ ~Ñ5ˆØ" \Ñ1ˆØ" ]Ñ2ˆà&(ÐØ "ˆ
Ø"$ˆØˆð	7œcð 	7¤cõ 	7ð
 15ñ	Üð	Ü (¬¡ð	ÜAGð	äó	ð( ×%Ó%ÜœG×2Ñ2°4×3FÑ3FÓGÓHˆHÙØ×#Ñ#×)Ñ)Ô+÷ &ð
 ÐØ#¤cØ—‘Ø—W‘WÑC¹(ÓCÓC×KÑKØØ óð —l‘l 7¨HÓ5ñ	6óó'ñ ˆIð ˆÜ ¤×!=Ñ!=¸hÈuÔ!U×V‰GˆAˆtØˆAÜ)-Ñ%��e˜XØÒ(¤£�Ù% eÓ,�Ø Ñ'Ø%-�G˜E‘NØ ‘M�HØ  ¨¡Ð 0Ð1�
à—=’=Ø%)�Nð !Ÿ;™;Ð.ð ×/Ñ/×3Ò3à"Ÿ[™[×6Ñ6°vÓ>×BÑBñ ð $Ÿm™m�GØ%,°DÐ%8Ò%SÀ×ASÑASÐ=S�Nð !Ÿ=™=Ð0ð ×/Ñ/×3Ò3à"Ÿ]™]×8Ñ8¸Ó@×DÑDð ñ ' t›n�Ù!Ø$×+Ñ+Ù Ø"Ø!+Ø *™nØ +™o°Ñ3Ø",¨{Ñ":Ø#.°Ñ#5Ø,8ôô
ð ˜3¤ T£™?Ò*Ø×%Ñ%Ù Ø"Ù'¨Ó-Ø&/ [°°*°Ð#>Ø *™nØ +™o°Ñ;Ø'1´C¸³IÑ'=Ø(-¨i¨[¸¸q¸cÀÐ&Côô
ð ‘X˜d“^Ñ#’òe *.ð Wôl DIÈÄ8ÓLÁ8¸˜ +Ñ-°Ó3À8ˆÐLØ—	‘	÷ 
ô $-¨\Ô#:ó	
ó 
ˆð —‘ó 
ØGNÇ}Á}Äó
ó 
ˆð —g‘gÐ.Ó/ˆØ—‘˜Ó$ˆä˜e jÑ0°=Ñ@ÓAˆØ˜q™5 KÑ/°.Ñ@ˆÙØØ×(Ñ(×,Ñ,Ø+ØØØØ Ø"Øô

ˆð ×-Ñ-×1Ñ1ˆÙØ‘hØÙ˜EÓ"Ø#˜ FÐ+Ø Ø$Ø  AÑ%Ø˜{Ñ*¨QÑ.ôñ ˆFð 	ð 	ñ 	ˆð × Ñ ØØ!Ø#Ø#Ø%¨Ñ-°Ñ1Ø ™U kÑ1°AÑ5Ø  <Ñ/Ø" ]Ñ2Ø" \Ñ1Ø! KÑ/ØØØ#ØØð !ó 
ˆð" ˆ
÷M &Ñ%üòL Ms   Â?AQ-Ì,Q:Ñ-Q7c                óš   — | j                  ||||||¬«      }t        |dd¬«      5 }	|	j                  |«       ddd«       y# 1 sw Y   yxY w)aM  Generate an SVG file from the console contents (requires record=True in Console constructor).

        Args:
            path (Union[str, PathLike[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.
        rý  rÙ  rÆ  rÚ  N)rb  rª  r¼  )
r~   rŸ  r  rÒ   rñ  rÞ  rþ  rÿ  ra  rÛ  s
             r_   Úsave_svgzConsole.save_svg.
  sS   € ð6 �o‰oØØØØ#Ø/Øð ó 
ˆô �$˜ gÕ.°*Ø×Ñ˜SÔ!÷ /×.Ñ.ús   ¦AÁA
rF  )ry   r¤   rí   r°   rÙ   )TNrœ   r  )r   r   )~rZ   r[   r\   rh   r  rÏ  r:  r   r“   rj   r3   r   r   r’   rF   r   ri   r?   r1   r   r*   r   r   r  r­   r‚  r–   rC  Úsetterr   r=   rä   rŽ  rG   r’  r.   rk  rá   ré   r«  r®  r-  r²  r´  rÄ   r   rÌ   rÃ   rÊ   rÖ   rØ   rÑ   rÂ  r=  rr   rq   rr  rl   r…   re   rm   r   rf   rg   rê  r¾   rì  r8   rÛ   rÜ   r¼   rñ  r  r÷  r   rÿ   r   r  rô   r6   r  r   r5   r>   r!  r”   r•   rQ  r  r2  rš   rI  rE   r-   rN  r0   ré  r[  rý   rx  r;   r~  r}  r   r‰  Ústaticmethodr   r   r—  r¨  r°  r§  r²  rç   r   rÎ  r×  r   rÜ  rC   rù  r'   rû  r(   rb  rd  r]   r^   r_   r¤   r¤   E  s´  … ñ!ðF #%§*¡*€Hˆg�c˜3�hÑÓ,ð Ø)-Ø(,Ø,0ØØ!%ØØ"&ØØ#Ø $Ø%)Ø#'ØØØØØ04ØØØØ:@Ù3BÓ3DØ)-ØØ9=Ø26Ø04òAD$ð ØÐEÑFñ
ðD$ð ! ™ðD$ð   ‘~ðD$ð $ D™>ðD$ð ðD$ð ˜‰ðD$ð ðD$ð �r˜#‘wÑðD$ð ðD$ð ˜‰}ðD$ð ˜‘ðD$ð  ˜	Ñ"ð!D$ð" ˜4‘.ð#D$ð$ ð%D$ð& ð'D$ð( ð)D$ð* ð+D$ð,   Ñ-ð-D$ð. ð/D$ð0 ð1D$ð2 ð3D$ð4 ˜sÐ$6Ð6Ñ7ð5D$ð6 Ð/Ñ0ð7D$ð8 ! ™ð9D$ð: ð;D$ð< ˜x¨¨H¨Ñ5Ñ6ð=D$ð> ˜8 B¨ IÑ.Ñ/ð?D$ð@ ˜7 3¨ 8Ñ,Ñ-óAD$ðLF˜#ó Fð ð�b˜‘gò ó ðð 
‡[�[ð˜R ™Wð ¨ò ó ðð ð*˜˜g™ò *ó ð*ð ð0˜sò 0ó ð0ð ×Ñð1 3ð 1¨4ò 1ó ð1ð ð/˜jò /ó ð/ð  h¨{Ñ&;ó  ó0 óð
.˜Vð .¨ó .ó #ð
, Zð ,°Dó ,ó%ó
ð
 ð °ð Àð Èó óð	˜Só 	ð ;?ò 	= ð 	=°4ð 	=À4ó 	=ó&ð :>ò 
2˜uð 
2°$ð 
2À,ó 
2ð ð
˜h s™mò 
ó ð
ð ðL˜#ò Ló ðLð ð-˜Tò -ó ð-ð^ ð	, $ò 	,ó ð	,ð ð
˜ò 
ó ð
ð ð&
Ð'ò &
ó ð&
ðP 
‡[�[ð˜U 3¨ 8™_ð °ò ó ðð ð�sò ó ðð ‡\�\ð˜3ð  4ò ó ðð ð ˜ò  ó ð ð ‡]�]ð˜Sð  Tò ó ðó%ð˜ó ð$ RWñKØ˜e‘_ðKØ59ðKØJNðKà	óKñ.#˜#ð # dó #ñ	*˜$ð 	*¨$ó 	*ð Ø#3ØØ$(ò!àð!ð ð	!ð
 !ð!ð ð!ð "ð!ð 
ó!ñB	 ð 	°ó 	ñ Tð °Tó ð* ð#˜tò #ó ð#ð cð ¨dó ðB FJñOØðOØ/7¸	Ñ/BðOà	óOð RVòØ(ðØ6>¸~Ñ6Nðà	óð$ OSñ1@Ø(ð1@Ø3;¸NÑ3Kð1@à	�'Ñ	ó1@ðl -1ð>ð
 "&ØØò>à"ð>ð ˜.Ñ)ð>ð
 ˜‰ð>ð ð>ð ð>ð 
ˆd�7‰mÑ	ó>ðH $&Ø+/Ø-1Ø $Ø!%Ø$(Ø15ò;àð;ð �S˜%�ZÑ ð	;ð
 ˜-Ñ(ð;ð ˜>Ñ*ð;ð ˜‰~ð;ð ˜‘ð;ð ˜D‘>ð;ð ˜oÑ.ð;ð 
ó;ð| RVòØ˜#˜u˜*Ñ%ðØ3;¸EÀ%ÈÀ*Ñ<MÑ3Nðà	óðH ,0Ø $Ø!%Ø$(òWà˜#‘ðWð ðWð ð	Wð ˜-Ñ(ðWð ˜‰~ðWð ˜‘ðWð ˜D‘>ðWð 
ÐÑ	 óWðv ðð  Ø#.Ø%òàðð ð	ð
 �S˜%�ZÑ ðð ðð 
óð*N ð N¨Dó Nð ØØ-1Ø$(ò
àð
ð ð
ð ð	
ð
 ˜˜c 5˜jÑ)Ñ*ð
ð ˜D‘>ð
ð 
ó
ðF ØØ-1Ø+/Ø-1Ø"&Ø $Ø!%Ø$(Ø#Ø $ØØ$(Ø$ò!h2àðh2ð ðh2ð ð	h2ð
 ˜˜c 5˜jÑ)Ñ*ðh2ð ˜-Ñ(ðh2ð ˜>Ñ*ðh2ð ˜$‘ðh2ð ˜‰~ðh2ð ˜‘ðh2ð ˜D‘>ðh2ð ˜‰}ðh2ð ˜‘ðh2ð ðh2ð ˜D‘>ðh2ð  ð!h2ð" 
ó#h2ðX #ð;4ð Ø()ØØØ"Ø#ØØ26Øò;4à�s‰mð;4ð ð	;4ð
 �d˜C �nÑ%ð;4ð ð;4ð ð;4ð ð;4ð ð;4ð ð;4ð ˜( C 5¨# :Ñ.Ñ/ð;4ð ð;4ð 
ó;4ðB $(Ø,0ò .à"ð .ð ˜Ñ ð	 .ð
 ˜.Ñ)ð .ð 
ó .ðF @AñØ˜$˜w™-Ñ(ðØ-0ðØ9<ðà	óð.  #ØØ#ØØ!Ø57Øò!ð ˜‰}ð!ð ð	!ð
 ˜‰}ð!ð ð!ð ð!ð ˜5  j Ñ1Ñ2ð!ð ð!ð 
ó!ðF àQUñ$UØð$UØ#+¨H°R¸À)Ñ9LÐ5LÑ,MÑ#Nð$Uà	ˆs�C˜˜c 3˜h™Ð'Ñ	(ò$Uó ð$UðR ØØ-1Ø+/Ø $Ø!%Ø$(Ø ØòQ$àðQ$ð ðQ$ð ð	Q$ð
 ˜˜c 5˜jÑ)Ñ*ðQ$ð ˜-Ñ(ðQ$ð ˜‰~ðQ$ð ˜‘ðQ$ð ˜D‘>ðQ$ð ðQ$ð ðQ$ð 
óQ$ófó"óG(ðR X¨gÑ%6ð ¸3ó ð4 ð"ð ØØØ#'ò"àð"ð ð	"ð
 ð"ð ð"ð ˜Ñ ð"ð 
ó"ðH ,0Àò  Dð ¸ð È#ó ðH Øò#à�C˜ #™Ð&Ñ'ð#ð ð	#ð
 ð#ð 
ó#ð. *.ØØ%)Ø#òKð ˜Ñ&ðKð ð	Kð
 ˜c‘]ðKð ðKð 
óKðb *.ØØ.Ø#ò#à�C˜ #™Ð&Ñ'ð#ð ˜Ñ&ð	#ð
 ð#ð ð#ð ð#ð 
ó#ðD Ø)-ØØ-Ø#'Ø#'ò|ð ð|ð ˜Ñ&ð	|ð
 ð|ð ð|ð !ð|ð ˜C‘=ð|ð 
ó|ðD Ø)-ØØ-Ø#'Ø#'ò$"à�C˜ #™Ð&Ñ'ð$"ð ð	$"ð
 ˜Ñ&ð$"ð ð$"ð ð$"ð !ð$"ð ˜C‘=ð$"ð 
ô$"r^   r¤   Ú__main__)rG  zJSONRPC [i]request[/i]é   gÍÌÌÌÌÌô?Fz2.0Úsubtracté*   é   )ÚminuendÚ
subtrahendr�  )Újsonrpcr  ÚparamsÚidzHello, World!z{'a': 1}z&Which one is correct team name in NBA?)zNew York BullszLos Angeles KingszGolden State WarriorsúHuston Rocketrq  )Úquestionr…   Úanswer)ÚansweredÚq1z	5 + 7 = ?)é
   é   é   é   rx  z
12 - 8 = ?)r#   r`   r�  é   rz  )rt  ru  Úq2)ÚsportÚmaths)r-  ÚemptyÚquizrÙ   )ry   rH   )¥r  r…  rm  Úabcr   r   Údataclassesr   r   r   Ú	functoolsr   Ú	itertoolsr	   Úmathr
   r   Útimer   Útypesr   r   r   Útypingr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   Úrich._null_filer"   rø   r$   r%   r&   Ú_export_formatr'   r(   Ú_filenor)   ro  r*   r+   rK  r,   r-   r  r.   r/   ré  r0   rH  r1   rM  r2   r3   rx   r5   r%  r  r6   r7   rÜ   r8   r9   Úprotocolr:   ry  r;   rô   r<   rQ  r=   rñ   r>   r?   Ústyledr@   Úterminal_themerA   rB   rC   r"  rD   rE   rÒ   rF   rG   r4  rH   r¨  rI   r÷  rK   r`  ra  Úplatformr6  r“   rQ  r”   r•   rY   r—   Ú	__stdin__r®  Ú_STDIN_FILENOÚ	ExceptionÚ
__stdout__Ú_STDOUT_FILENOÚ
__stderr__Ú_STDERR_FILENOrÜ  rÛ  r™  rž  r�  re   rl   r™   rš   r  r¥   rp  r§   r©   r²   r¾   rÑ   rÛ   rï   rû   r’   r  r"  r˜  rl  r¤  rÄ  Úlocalr(  r-  r0  rj   r3  r8  r¤   rZ   r¢   r¨  r%  rý   )r-  Úsystems   00r_   Ú<module>r˜     sZ  ðÜ 	Û 
Û ß #ß (Ý Ý Ý Ý Ý Ý ß 6Ñ 6÷÷ ÷ ÷ ÷ õ* &ç Ý *ß CÝ ß 6ß %ß )Ý Ý ß 9Ý +ß 5ß %Ý Ý Ý Ý ß #Ý ß SÑ Sß  ß $áÝ0ÝÝàÐ ØÐ Ø
�,‰,˜'Ñ
!€à˜E # v +Ñ.Ð/°Ð7Ñ8€ØÐDÑE€ØÐ=Ñ>€÷	ñ 	ñ ‹J€	ðØ—M‘M×(Ñ(Ó*€MðØ—^‘^×*Ñ*Ó,€NðØ—^‘^×*Ñ*Ó,€Nð ˜~¨~Ð>€Ø% ~Ð6Ð ð ×"Ñ"Ø×%Ñ%Ø×#Ò#ñ€ô.˜
ô .ð ÷Bð Bó ðBðJ ôˆxó ó ðð ô˜ó ó ðð Ð(¨(°CÐ7Ñ8€Ø :ð ˜˜n¨gÐ5Ñ6Ñ7€á#Ó%Ð ô3�9ô 3÷	)ñ 	)÷ñ ÷$ñ ÷B!ñ !÷*$%ñ $%÷N,/ñ ,/÷^$ñ $ñBˆtð ˜x¨¨X°c¸5°jÑ-AÐ(AÑBó ð,�Tó ð* ×$Ò$Ø× Ñ Ø×&Ò&Ø×"Ñ"ñ	€ð :G×9LÒ9LÔ9NÔOÑ9N©¨¨v˜ ™Ð9NÒOÐ ð ô˜)Ÿ/š/ó ó ðô�ô ð& AEÐ ˜8Ð$<Ñ=Ó Dó%ð=˜tó =÷
M "ñ M "ð`@ ˆzÒÙ˜TÔ"€Gà‡K‚KØ Ø	ØØØØàØ Ø"$°BÑ7Øñ		
ôð ‡K‚K� ©T°'«]Ô;à‡M‚MàØð !%à$Lò$ð #2ñ	ñð !&à$/Ú#3Ø"$ñð %1Ú#/Ø"#ññññ	
õ!ð) øðIP ò ØƒMðûð ò ØƒNðûð ò ØƒNðüóv Ps<   Å(N: ÆO ÆO Ë)O$Î:OÏOÏOÏOÏO!Ï O!