
    ,h              #          d dl Z d dlZd dlZd dlZd dlmZmZ d dlmZ d dl	m
Z
 d dl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 d dlmZ d dlmZmZmZmZ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*m+Z+ ddl,m-Z- ddl.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4 ddl5m6Z6 ddl7m8Z8m9Z9 ddl:m;Z; ddl<m=Z= ddl>m?Z? ddl@mAZAmBZB dd	lCm"Z" ddlDmEZE ej                  dk(  ZGdZHdZIdeBdeBdeeeJeJeJf      fdZKddd d!dd"d"eHeId#dd#d$dd%d&ee/   d'eeJ   d(eeJ   d)eJd*eeL   d+eMd,eMd-eJd.eJd/eMd0eeM   d1eMd2eeeLef      d3eJdeeeN   eNee   gef   fd4ZOe G d5 d6             ZPe G d7 d8             ZQe G d9 d:             ZRe G d; d<             ZS G d= d>e8      ZT G d? d@      ZUeVdAk(  r) eOd#B       d dlZdCeddfdDZWdCeddfdEZXdGdFZY eY        yy)H    N)	dataclassfield)islice)walk_tb)
ModuleTypeTracebackType)
AnyCallableDictIterableListOptionalSequenceTupleTypeUnion)guess_lexer_for_filename)CommentKeywordNameNumberOperatorString)Text)Token)ClassNotFound   )pretty)loop_first_last	loop_last)Columns)ConsoleConsoleOptionsConsoleRenderableGroupRenderResultgroup)	Constrain)RegexHighlighterReprHighlighter)Panel)render_scope)Style)SyntaxSyntaxPosition)Themewin32
   P   startendreturnc              #      K   | \  }}|\  }}||k(  r|||f yt        t        ||dz               D ]!  \  }}}|r||df |r|d|f |ddf # yw)zYield start and end positions per line.

    Args:
        start: Start position.
        end: End position.

    Returns:
        Iterable of (LINE, COLUMN1, COLUMN2).
    r   r   N)r   range)	r4   r5   line1column1line2column2firstlastline_nos	            P/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/rich/traceback.py_iter_syntax_linesrB   6   s      NE7NE7~Wg%%$3E%4K$L 	% E4w**q'))q"n$	%s   AAd   X      FT )consolewidth
code_widthextra_linestheme	word_wrapshow_localslocals_max_lengthlocals_max_stringlocals_hide_dunderlocals_hide_sunderindent_guidessuppress
max_framesrG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   c                   	
 | t        d      n| j                  r
dn

dt        t           dt        dt        t
           ddf	
fdd	t        ddffd
}	 t               } ||       t        j                  S # t        $ r  t        j                  }t        _	        |cY S w xY w)a  Install a rich traceback handler.

    Once installed, any tracebacks will be printed with syntax highlighting and rich formatting.


    Args:
        console (Optional[Console], optional): Console to write exception to. Default uses internal Console instance.
        width (Optional[int], optional): Width (in characters) of traceback. Defaults to 100.
        code_width (Optional[int], optional): Code width (in characters) of traceback. Defaults to 88.
        extra_lines (int, optional): Extra lines of code. Defaults to 3.
        theme (Optional[str], optional): Pygments theme to use in traceback. Defaults to ``None`` which will pick
            a theme appropriate for the platform.
        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.
        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to 10.
        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
        locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
        locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
        indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
        suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.

    Returns:
        Callable: The previous exception handler that was replaced.

    NT)stderrtype_value	tracebackr6   c                     t         j                  | ||	
t                    }j                  |       y )NrH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   )	Tracebackfrom_exceptionboolprint)rW   rX   rY   exception_tracebackrI   rJ   rR   rP   rQ   rN   rO   rT   rM   rS   rK   traceback_consolerH   rL   s       rA   
excepthookzinstall.<locals>.excepthook   sb    
 (66!##//1#$67'!! 7 
$ 	 34    ipc           	           i  j                   dt        dt        dd ffd}dddt        dt        dt        dd f fd _        | _         fd	 _        y )
Nargskwargsr6   c                      | | i | y)zEwrap the default ip.showtraceback to store info for ip._showtracebackNrF   )rf   rg   default_showtracebacktb_datas     rA   ipy_show_tracebackzCinstall.<locals>.ipy_excepthook_closure.<locals>.ipy_show_traceback   s     G!4262rc   F)	is_syntaxrl   c                     	j                         }| rdn|d   }
j                  dd      }
j                  d|rdnd      }t        |      D ]  }| n|j                  }  |d   |d   |       i 
y)z2Internally called traceback from ip._showtracebackN   running_compiled_codeF	tb_offsetr   r   )_get_exc_infogetr9   tb_next)rl   rf   rg   	exc_tupletbcompiledrp   _rb   rd   rj   s           rA   ipy_display_tracebackzFinstall.<locals>.ipy_excepthook_closure.<locals>.ipy_display_traceback   s    
 ((*I 3<$1B {{#:EBHKhAFI9%  :ZZ 
 y|Yq\26Grc   c                       | ddi|S )Nrl   TrF   )rf   rg   rx   s     rA   <lambda>z9install.<locals>.ipy_excepthook_closure.<locals>.<lambda>   s     5J6
!6
%+6
 rc   )showtracebackr	   r^   _showtracebackshowsyntaxerror)rd   rk   ri   rx   rj   rb   s   ` @@@rA   ipy_excepthook_closurez'install.<locals>.ipy_excepthook_closure   st     " 0 0	3c 	3S 	3T 	3 +0		#'	;>		0 2-
rc   )r"   
is_jupyterr   BaseExceptionr   r   r	   get_ipythonsysrb   	Exception)rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   r~   rd   old_excepthookrb   ra   s    `````````````   @@rA   installr   R   s    V 18t,W ((-?-G 	 5M"55 M*5 
	5 5 52'
3 '
4 '
R	]r"~~ #	s   6!B &C Cc                       e Zd ZU eed<   eed<   eed<   dZeed<   dZee	ee
j                  f      ed<   dZeeeeef   eeef   f      ed<   y)	Framefilenamelinenoname lineNlocalslast_instruction)__name__
__module____qualname__str__annotations__intr   r   r   r   r   Noder   r   rF   rc   rA   r   r      sa    MK
ID#N/3FHT#v{{*+,3JNhuU38_eCHo%EFGNrc   r   c                   b    e Zd ZU eed<   eed<   eed<   eed<   eed<    ee      Ze	e   ed<   y)	_SyntaxErroroffsetr   r   r   msgdefault_factorynotesN)
r   r   r   r   r   r   r   listr   r   rF   rc   rA   r   r      s.    KM
IK	HT2E492rc   r   c                       e Zd ZU eed<   eed<   dZee   ed<   dZe	ed<    e
e      Zee   ed<    e
e      Zee   ed	<   dZe	ed
<    e
e      Zed   ed<   y)Stackexc_type	exc_valueNsyntax_errorFis_causer   framesr   is_groupTrace
exceptions)r   r   r   r   r   r   r   r   r   r^   r   r   r   r   r   r   r   r   rF   rc   rA   r   r      sh    MN+/L(<(/Hd5FDK5T2E492Hd %d ;JW;rc   r   c                       e Zd ZU ee   ed<   y)r   stacksN)r   r   r   r   r   r   rF   rc   rA   r   r      s    Krc   r   c                       e Zd ZdgZy)PathHighlighterz(?P<dim>.*/)(?P<bold>.+)N)r   r   r   
highlightsrF   rc   rA   r   r      s
    -.Jrc   r   c            $          e Zd ZdZddddddZ	 d/dd	d
dddeedddddddee   dee	   dee	   de	dee
   dedede	de	dedededeee
ef      de	fdZedd	d
dddeedddddddee   ded ee   dee	   dee	   de	dee
   dedede	de	dedededeee
ef      de	d!d f"d"       Zedeeddd#dee   ded ee   dede	de	deded!efd$       Zd%ed&ed!efd'Z e       d(ed!efd)       Zed*e
d+e
d!e
fd,       Z e       d-ed!efd.       Z y)0r\   a  A Console renderable that renders a traceback.

    Args:
        trace (Trace, optional): A `Trace` object produced from `extract`. Defaults to None, which uses
            the last exception.
        width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
        code_width (Optional[int], optional): Number of code characters used to traceback. Defaults to 88.
        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.
        indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to 10.
        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
        locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
        locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
        suppress (Sequence[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.

    textpythoncythonpyrex)r   z.pyz.pxdz.pyxz.pxiNrC   rD   rE   FTrF   r[   tracerH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   c                   |>t        j                         \  }}}|||t        d      | j                  ||||      }|| _        || _        || _        || _        t        j                  |xs d      | _
        || _        || _        || _        || _        |	| _        |
| _        || _        g | _        |D ]  }t'        |t(              s@|j*                  
J |d       t,        j.                  j1                  |j*                        }n|}t,        j.                  j3                  t,        j.                  j5                  |            }| j$                  j7                  |        |dkD  rt9        d|      | _        y d| _        y )Nz9Value for 'trace' required if not called in except: blockrM   	ansi_darkz+ must be a module with '__file__' attributer      )r   exc_info
ValueErrorextractr   rH   rI   rJ   r.   	get_themerK   rL   rM   rR   rN   rO   rP   rQ   rS   
isinstancer   __file__ospathdirnamenormpathabspathappendmaxrT   )selfr   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   r   r   rY   suppress_entityr   s                       rA   __init__zTraceback.__init__  sx   $ =-0\\^*Hi9#4	8I O  LL)YK ! E 

$&%%e&:{;
"&*!2!2"4"4')' 		'Oos3#,,8U%((STU ww'?'?@&77##BGGOOD$9:DMM  &		' 1;Q#a,Arc   r   r   rY   r6   c                `    | j                  ||||	|
|||      } | |||||||	||
|||||      S )a  Create a traceback from exception info

        Args:
            exc_type (Type[BaseException]): Exception type.
            exc_value (BaseException): Exception value.
            traceback (TracebackType): Python Traceback object.
            width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
            code_width (Optional[int], optional): Number of code characters used to traceback. Defaults to 88.
            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.
            indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
            locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
                Defaults to 10.
            locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
            locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
            locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. 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.

        Returns:
            Traceback: A Traceback instance that may be printed.
        rM   rN   rO   rP   rQ   )rH   rI   rJ   rK   rL   rM   rR   rN   rO   rP   rQ   rS   rT   )r   )clsr   r   rY   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rich_tracebacks                     rA   r]   zTraceback.from_exceptionP  si    Z #//11 % 	
 !##'//11!
 	
rc   r   c                   g }	d}
ddl m} t        |dd      xs g }dt        dt        fd}	 t         ||j                         ||      |
|
      }t        j                  dk\  rvt        |t        t        f      r`d	|_        |j                  D ]J  }|j                  j                  t        j!                  t#        |      ||j$                  ||             L t        |t&              rXt)        |j*                  xs d|j,                  xs d|j.                  xs d|j0                  xs d|j2                  |      |_        |	j                  |       |j6                  j                  }dt8        t:        t        t<        f      dt8        t:        t        t<        f      ffd}t?        |      D ]  \  }}|j@                  jB                  }d}t        j                  dk\  rW|jD                  dz  }tG        tI        |j@                  jK                         ||dz               }|\  }}}}|||
|||f||ff}|rP|jM                  d      s?tN        jP                  jS                  |      s tN        jP                  jU                  ||      }|jV                  jY                  dd      rt[        |xs d||j@                  j\                  |rt ||jV                  j_                               D ci c]H  \  }}ta        jb                  |      s.ta        jd                  |      s|tg        jh                  |||      J c}}nd|      } ||       |jV                  jY                  dd      s|j6                  dd=  t        |dd      }|r|jj                  }|}|j$                  }d	}
|jl                  }|r+t        |dd      s|jj                  }|}|j$                  }d}
	 to        |	      } | S c c}}w )a  Extract traceback information.

        Args:
            exc_type (Type[BaseException]): Exception type.
            exc_value (BaseException): Exception value.
            traceback (TracebackType): Python Traceback object.
            show_locals (bool, optional): Enable display of local variables. Defaults to False.
            locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
                Defaults to 10.
            locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
            locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
            locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.

        Returns:
            Trace: A Trace instance which you can use to construct a `Traceback`.
        Fr   )_IMPORT_CWD	__notes__N_objectr6   c                 8    	 t        |       S # t        $ r Y yw xY w)z1Don't allow exceptions from __str__ to propagate.z<exception str() failed>)r   r   )r   s    rA   safe_strz#Traceback.extract.<locals>.safe_str  s#    27|# 212s   
 	T)r   r   r   r   )rE      )rM   rN   rP   rQ   ?r   )r   r   r   r   r   r   iter_localsc              3      K   ss| E d{    y| D ]3  \  }}r|j                  d      rr|j                  d      r.||f 5 y7 >w)z-Extract locals from an iterator of key pairs.N__rw   
startswith)r   keyrX   rP   rQ   s      rA   
get_localsz%Traceback.extract.<locals>.get_locals  s_      +.@***"- %JC)cnnT.B )cnnS.A u*$% +s   
AA?Arn   r   <_rich_traceback_omit)
max_length
max_string)r   r   r   r   r   _rich_traceback_guard	__cause____suppress_context__)r   )8richr   getattrr	   r   r   r   r   version_infor   BaseExceptionGroupExceptionGroupr   r   r   r\   r   type__traceback__SyntaxErrorr   r   r   r   r   r   r   r   r   r   objectr   f_codeco_filenamef_lastinextr   co_positionsr   r   r   isabsjoinf_localsrr   r   co_nameitemsinspect
isfunctionisclassr   traverse	__class____context__r   )!r   r   r   rY   rM   rN   rO   rP   rQ   r   r   r   r   r   stack	exceptionr   r   frame_summaryr@   r   r   instruction_indexinstruction_position
start_lineend_linestart_column
end_columnr   rX   framecauser   s!          ``                        rA   r   zTraceback.extract  s   < !$"9k4@FB	2c 	2c 	2 !("3"34"9-!	E 7*i*<n)MN%)EN%.%9%9 	((//%-- $Y ) ) 7 7,72C3E3E . 
 )[1%1$++0q&//63$++0q"-2!&" MM% \\((F%%eCK&89%%V,-% +2)*< :(&w(//;; $( ##w.(5(=(=(B%+/)00==?--1,( -" $" #.$0(4&2 (6%z2,(
 H$7$7$<77==2#%77<<X#F ))--.DeL%_"&--55 ' /99O9O9U9U9W.X !+U$+$6$6u$=QVAW   %+<+<"  "%5#& u ))--.EuMQu:(x I{D9E ??!	 "//	))EWY0FN ??!	!//	 V$Qs   /AO5rG   optionsc              #      	
K    j                   }|j                         |j                  }t        i d |t              d |t
              d |t              d |t        j                        d |t              d |t              t        d      z   d	 |t              d
 |t              t        d      z   d |t              d |t        j                        d |t        j                        d |t        j                        d |t        j                        d |t              d |t              d |t        j                        t        d      z   d      
t!               t#               dt$        dt&        dt(        f	 
fd       	t+        t-         j.                  j0                              D ]  \  }} 	||        y w)Nr   pygments.textpygments.stringpygments.functionpygments.numberzrepr.indentT)dimzrepr.strz
repr.brace)boldzrepr.numberzrepr.bool_truezrepr.bool_falsez	repr.nonezscope.borderzscope.equalsz	scope.keyzscope.key.specialF)inheritr   r?   r6   c              3   4  K   | j                   rTt        j                  |       d	ddd      }t        |j                        }
j                        5  | d d d        | j                  
j                        5  t        t        j                  | j                        	dddj                        j                         d d d        t        j                  | j                   dd	f | j                  j                               nh| j                  r8t        j                  | j                   dd	f | j                               n$t        j                  | j                   d	f       | j                  D ]   }t        j                  d
 |             " | j                  rt        | j                   d      D ]m  \  }}g }t#        |j$                        D ]  \  }}|j'                   ||              d t        t        t)        | d| d      j                         o |s<| j*                  rt        j,                  d       y t        j,                  d       y y # 1 sw Y   $xY w# 1 sw Y   xY ww)Nz7[traceback.title]Traceback [dim](most recent call last)ztraceback.borderT)r   r   )titlestyleborder_styleexpandpaddingztraceback.border.syntax_error)r  r  r  r  rH   z: ztraceback.exc_type)z[NOTE] ztraceback.noter   r   zSub-exception #ztraceback.group.border)r  r  zI
[i]The above exception was the direct cause of the following exception:
zH
[i]During handling of the above exception, another exception occurred:
)r   r+   _render_stackr(   rH   	use_themer   _render_syntax_errorr   assembler   r   r   r   r   	enumerater   r    r   r   r%   r   from_markup)r   r?   stack_renderablenotegroup_nogroup_exceptiongrouped_exceptions
group_lastgroup_stackbackground_stylerG   highlighterrender_stackr   traceback_themes            rA   r#  z0Traceback.__rich_console__.<locals>.render_stackk  s    ||6;&&u-S*!3"7  $--=tzz#J &&7 +**+ !!-&&7 # 55e6H6HI"2)H#'$*"&** 


 
 mm'r*,@A 2 2 6 67  mm'r*,@A0 
 mm'7:N$OPP Vmm$A;tCTUUV ~~1:5;K;KQ1O -Ho68&3<_=S=S3T Y/
K*11,{J2WXYH#!#56$3H:">)A
 

  >>**e  **d  ]+ + s8   AJI>%JAJF2J>JJJJ)rK   get_background_styleget_style_for_tokenr0   	TextTokenr   r   r   Functionr   r   r-   r   Constant	Delimiterr   r*   r'   r   r^   r&   r    reversedr   r   )r   rG   r  rK   token_styler?   r   r!  r"  r#  r$  s   ``     @@@@rA   __rich_console__zTraceback.__rich_console__L  s     

 557//+i0U!3 ";v#6 $[%?	
 ";v#6 {73eoE K/ k)4u$7GG {62 !+g.>.>"? ";w/?/?#@ [)9)9: F,<,< = H 5 [.  $[%?%D/%Q!$ '
, &'	A	 A	T A	l A	 A	 
A	F %Xdjj.?.?%@A 	,KD%ud++	,s   GG!r   c              #   8  K   t               }t               }|j                  dk7  rpt        j                  j                  |j                        rGt        j                  d|j                   dfdt        |j                        dfd      } ||        ||j                  j                               }d|_        t        |j                  d	z
  t        |            }|j!                  d
||       |t        j"                  dd|z  z   dz   d      z  }| y w)Nz<stdin> r  :r  r
  r  r  Tr   zbold underline
u   [traceback.offset]▲[/])r*   r   r   r   r   existsr   r  r   r   r   rstripno_wrapminr   lenstylizer  )r   r   r"  path_highlighterr   syntax_error_textr   s          rA   r  zTraceback._render_syntax_error  s    %'*,  I-ww~~l334}}../02CD*,,-/@A)	 't,,'(9(9(@(@(BC$(!\((1,c2C.DE!!"2FFCT--3<"<<!
 	
  s   DDr   codec                 R   t         j                  j                  |      d   }|sA|j                  d      }|dk7  r|d | n|}|j	                  d      rd|j                         v ry	 | j                  j                  |      xs t        ||      j                  S # t        $ r Y yw xY w)Nr8   r3  z#!r   r   )r   r   splitextindexr   lowerLEXERSrr   r   r   r   )r   r   r<  extnew_line_index
first_lines         rA   _guess_lexerzTraceback._guess_lexer  s    ggx(, "ZZ-N2@B2Fo~.DJ$$T*x:;K;K;M/M	::>>#&W*B8T*R*W*WW 		s   '2B 	B&%B&r   c              #      K   t               } j                  }dt        dt        t           f fd}d } j
                  dk7  r<t         j
                  dz  t        |j                         j
                  dz  z
        }d}t        |j                        D ]  \  }}|r||v rd}|r#|J t        dt        |       d	d
d       d}|dk(  }	|j                  t        fd j                  D              }
t        j                  j!                  |j                        rXt        j"                   |t        |j                  d            dt%        |j&                        dfd|j(                  dfd      }n;t        j"                  d|j(                  dfdt%        |j&                        dfd      }|j                  j+                  d      s|	sd | |j                  j+                  d      r ||      E d {    r|
rv	 t-        j.                  |j                        }dj1                  |      }|s j3                  |j                  |      }t5        |||d|j&                   j6                  z
  |j&                   j6                  z   f|j&                  h j8                   j:                   j<                  d
      }d |j>                  |j>                  \  }}tA        ||      D ]g  \  }}}	 |dk(  r-||dz
     }t        |      t        |jC                               z
  }|dk(  rt        ||dz
           }|jG                  d||f||f       i |jH                  rtK        |g ||      d      n|  y 7 # tD        $ r Y w xY w# tL        $ r'}t        j"                  d| df       Y d }~1d }~ww xY ww)Nr  r6   c              3      K   | j                   r;t        | j                   dj                  j                  j                         y y w)Nr   )r  rR   r   r   )r   r,   rR   rN   rO   )r  r   s    rA   render_localsz.Traceback._render_stack.<locals>.render_locals  sE     ||"LL""&"4"4#55#55  s   A	Ar   rn   FTz
... z frames hidden ...centerztraceback.error)justifyr  c              3   @   K   | ]  }j                  |        y wNr   ).0r   frame_filenames     rA   	<genexpr>z*Traceback._render_stack.<locals>.<genexpr>   s     W^66t<Ws   r  r2  r0  r
  z in r	  r  zin r   r   )rK   line_numbers
line_rangehighlight_linesrL   rI   rR   dedentr   r8   ztraceback.error_range)r  r4   r5   )r  r3  )'r   rK   r   r   r$   rT   r9   r8  r   r  r   r   anyrS   r   r   r4  r  r   r   r   r   	linecachegetlinesr   rE  r.   rJ   rL   rI   rR   r   rB   lstrip
IndexErrorstylize_ranger   r!   r   )r   r   r:  rK   rH  exclude_framesexcludedframe_indexr  r>   
suppressedr   
code_linesr<  
lexer_namesyntaxr4   r5   r:   r;   r=   r   errorrN  s   `                      @rA   r  zTraceback._render_stack  s    *,

	 	84E+F 	 +/??a"1$ELL!DOOq$88N
 "+ELL"9 g	K+"?%11S011CD$+ 
 !1$E"^^NWWWJww~~enn-}}$T%..@Q%RS*&(9:ZZ!45) }}ZZ!45*&(9:) >>,,S1%J~~((-(///=!*!3!3ENN!CJ77:.D !!%!2!25>>4!HJ#"#%)!LL4+;+;;!LL4+;+;;$ */"&..#'??&*&8&8$F H --9%*%;%;
s 8J%QT7U 3E7G	)#*a<+5eai+@D.1$i#dkkm:L.LG#*b=.1*UQY2G.HG #00&=',g&6%*G$4 1 2 !<<   &!.u!5 %& $
{g	N 0X $. ) !))# ! --eW'89  so   G?ONO2NOBN.O ANAO	NONO	O'O	O	OOrL  )!r   r   r   __doc__rA  LOCALS_MAX_LENGTHLOCALS_MAX_STRINGr   r   r   r   r^   r   r   r   r   classmethodr   r	   r   r   r]   r   r"   r#   r&   r-  r'   r   r  rE  r   r  rF   rc   rA   r\   r\      sV   . F "&3F  #$&#!!2!2#'#("57!3F3F }	3F
 SM3F 3F }3F 3F 3F 3F 3F !3F !3F 3F 5j123F  !3Fj   #$&#!!2!2#'#("57%F
s)F
 !F
 M*	F
 }F
 SMF
 F
 }F
 F
 F
 F
 F
 !F
 !F
  !F
" 5j12#F
$ %F
& 
'F
 F
P  "!2!2#'#(p}%p !p M*	p p p p !p !p 
p pdd,d,)7d,	d,L W   ,    , C s s   W}5 }\ } }rc   r\   __main__r   ac                 $    d}t        || z         y )Nr   )r_   )rg  ones     rA   barrj  ^  s     cAgrc   c                 ,    d}h ddd}t        |        y )NT>   Duncan IdahoThufir HawatPaul AtreidesVladimir Harkonnen)NFT)
charactersatomic_types)rj  )rg  r   zeds      rA   foors  d  s"     $ 0
 	Arc   c                      t        d       y )Nr   )rs  rF   rc   rA   ra  ra  q  s	    Arc   )r6   N)Zr   rU  r   r   dataclassesr   r   	itertoolsr   rY   r   typesr   r   typingr	   r
   r   r   r   r   r   r   r   r   pygments.lexersr   pygments.tokenr   r   r   r   r   r   r   r'  r   pygments.utilr   r   r   _loopr   r    columnsr!   rG   r"   r#   r$   r%   r&   r'   	constrainr(   r"  r)   r*   panelr+   scoper,   r  r-   r`  r.   r/   r   rK   r0   platformWINDOWSrc  rd  r   rB   r   r^   r   r   r   r   r   r   r   r\   r   rj  rs  ra  rF   rc   rA   <module>r     s     	 
 (   +   5 K K ,   '  -   ! :    *  
,,'
!  %% .%eCcM"#%< "& "..#)-13~g~ C=~ 	~
 ~ C=~ ~ ~ ~ ~ ~ !~ ~ uS*_-.~ ~  tM"M8M3JKSPQ!~B O O O 3 3 3 < < <   /& /[	 [	| z	s t  
G5 rc   