+
    i'                     t  a  Rj tn0 t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	H
t
HtHtHt ^ RIHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHtHtHtHtHtHtHtH t H!t!H"t"H#t# ^ R	I$H%t%  ^ RI&t'](! ]'R
4      t)^RI+H,t, ^RI-H.t. ^RI/H0t0 ^RI1H2t2 ^RI3H4t4 ^RI5H6t6 ^RI7H8t8H9t9 ^RI:H;t; ^RI<H=t= ]'       d   ^RI>H?t?H@t@HAtAHBtBHCtCHDtD R R ltER R ltFR R ltG]P                  ! R. 4      tIR R ltJRkR R  lltKR! R" ltLRkR# R$ lltM ! R% R&]84      tNR' R( ltOR) R* ltPR+ R, ltQ]P                  R- ]]Q]]O]	R. ]]P]SR/ ]
R0 ]TR1 ]UR2 ]R3 ]VR4 ]WR5 ]R6 /tX] ^ k ]W! ]XP                  4       4      tZ]S]P                  ]]
3t[R7 R8 lt\] ! R9 R:4      4       t]] ! R; R<4      4       t^R= R> lt_RlR? R@ llt`RA^PRB^RCRRDRRERRFR/RG RH lltaRIRRJRKRCRRDRRERRFR/RL RM lltb]cRN8X  d    ! RO RP4      td^ RQIHete  ! RR RS]e4      tf]! ]g4      th^]hRT&   RT^RURVRWRX0 Rmm.RY]T! 0 Rnm4      RZ]! ]UR[. RoO/4      R\]	! . RpO4      R]RqR^]f! R_R`RaRbRcRd.4      Re]d! 4       /ti]iRT,          P                  ]i4       ^ RfIkHltl ]l! ]N! ]iRK^Rg7      4        ! Rh Ri4      tm]l! ]N! ]m! 4       4      4       R# R#   ]* d    Rt) EL1i ; i)r    N)array)CounterUserDictUserListdefaultdictdeque)	dataclassfieldsis_dataclass)isclass)islice)MappingProxyType)TYPE_CHECKINGAnyCallableDefaultDictDequeDictIterableListOptionalSequenceSetTupleUnion)RichReprResultibFget_console)	loop_last)	pick_bool)RichRenderablecell_len)ReprHighlighter)JupyterMixinJupyterRenderable)Measurement)Text)ConsoleConsoleOptionsHighlighterTypeJustifyMethodOverflowMethodRenderResultc                0    V ^8  d   QhR\         R\        /#    objreturnr   bool)formats   "^/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pip/_vendor/rich/pretty.py__annotate__r9   <   s     6 6 6 6    c                \    \         ;'       d     \        P                  ! \        V 4      4      # )z1Check if an object was created with attrs module.)
_has_attrs_attr_modulehastyper3   s   &r8   _is_attr_objectrA   <   s    55,**4955r:   c                >    V ^8  d   QhR\         R\        R,          /# )r2   r3   r4   z_attr_module.Attribute[Any])r   r   )r7   s   "r8   r9   r9   A   s$     @ @# @(+H"I @r:   c                \    \         '       d    \        P                  ! \        V 4      4      # . # )zGet fields for an attrs object.)r<   r=   r
   r?   r@   s   &r8   _get_attr_fieldsrD   A   s     -7Z<tCy)?R?r:   c                0    V ^8  d   QhR\         R\        /# r1   objectr6   )r7   s   "r8   r9   r9   F   s      F t r:   c                     V P                   P                  P                  \        P                  \
        P                  39   #   \         d     R# i ; i)zCheck if an instance of a dataclass contains the default repr.

Args:
    obj (object): A dataclass instance.

Returns:
    bool: True if the default repr is used, False if there is a custom repr.
F)__repr____code__co_filenamedataclasses__file__reprlib	Exceptionr@   s   &r8   _is_dataclass_reprrP   F   sO    ||$$00  5
 
 	
  s   A A AA_dummy_namedtuplec                0    V ^8  d   QhR\         R\        /# r1   rF   )r7   s   "r8   r9   r9   ]   s     ) )f ) )r:   c                    Rp \         P                  ! V P                  4      p\         P                  ! \
        P                  4      pW8H  #   \        \        3 d     L;i ; i)zCheck if an instance of namedtuple contains the default repr

Args:
    obj (object): A namedtuple

Returns:
    bool: True if the default repr is used, False if there's a custom repr.
N)inspectgetfilerI   OSError	TypeErrorrQ   )r3   obj_filedefault_repr_files   &  r8   _has_default_namedtuple_reprrZ   ]   s\     H??3<<0
  (9(B(BC(( Y  	s    A A A c                    V ^8  d   QhR\         R\        R,          RRR\        R\        R\        \        ,          R	\        \        ,          R
\        \        ,          R\        R\        \
        R3,          /
# )r2   valueconsoler*   overflowr.   cropindent_guides
max_length
max_string	max_depth
expand_allr4   N)r   r   r6   intr   str)r7   s   "r8   r9   r9   q   s     -& -&-&i -& -& 	-&
 -& -& -& }-& -& 39-&r:   c	                    ^RI Hp	 \        V \        4      '       g   V f   R# T;'       g    \	        4       pVP                  4       ;_uu_ 4       p
\        W	4      '       d   VP                  4        TP                  \        V \        4      '       d   T M\        V VVVVVV^R7      VRRR7       RRR4       X
P                  4       P                  R4      #   + '       g   i     L/; i)   )ConsoleRenderableN)r^   r`   ra   rb   rc   rd   marginT )r_   new_line_startend
)r]   ri   _safe_isinstancer'   r   capturelineprintr"   Prettygetrstrip)r\   r]   r^   r_   r`   ra   rb   rc   rd   ri   rp   s   &&&&&&&&&  r8   _ipy_display_hookrv   q   s     + 011U]&&G			gE55LLN $E>:: %"/))')	 # 	 	
	 
2 ;;=%%3 
	s   A CC&	c                x    V ^8  d   QhR\         R\        \        \        \        R3,          3,          R\        /# )r2   r3   class_or_tuple.r4   )rG   r   r?   r   r6   )r7   s   "r8   r9   r9      s7      	!&tU49-='=!>	r:   c                >     \        W4      #   \         d     R# i ; i)zFisinstance can fail in rare cases, for example types with no __class__F)
isinstancerO   )r3   rx   s   &&r8   ro   ro      s$    #.. s   
 c                    V ^8  d   QhR\         R,          RRR\        R\        R\         \        ,          R\         \        ,          R	\         \        ,          R
\        RR/	# )r2   r]   r*   r^   r.   r_   r`   ra   rb   rc   rd   r4   N)r   r6   re   )r7   s   "r8   r9   r9      s     OG OGi OGOG OG 	OG
 OG OG }OG OG 
OGr:   c           	     4  a aaaaaaaa ^ RI Ho S ;'       g    S! 4       o S f   Q hR V VVVVVVV3R llp \        4       p	^ RIHp
  ! VVVVVVV3R lRV
4      pV! 4       pWP
                  P                  R&   R#   \         d    T\        n	         R# i ; i)	a  Install automatic pretty printing in the Python REPL.

Args:
    console (Console, optional): Console instance or ``None`` to use global console. Defaults to None.
    overflow (Optional[OverflowMethod], optional): Overflow method. Defaults to "ignore".
    crop (Optional[bool], optional): Enable cropping of long lines. Defaults to False.
    indent_guides (bool, optional): Enable indentation guides. Defaults to False.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
    max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
    expand_all (bool, optional): Expand all containers. Defaults to False.
    max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
r   Nc                (    V ^8  d   QhR\         RR/# )r2   r\   r4   Nr   )r7   s   "r8   r9   install.<locals>.__annotate__   s      C D r:   c                   < V eZ   Sf   Q hR\         n        SP                  \        V \        4      '       d   T M\        V SSSSSSR7      SR7       V \         n        R# R# )z?Replacement sys.displayhook which prettifies objects with Rich.N)r^   r`   ra   rb   rc   rd   )r_   )builtins_rr   ro   r"   rs   )	r\   r]   r_   rd   r`   rc   ra   rb   r^   s	   &r8   display_hookinstall.<locals>.display_hook   sq    &&&HJMM (~>> !)&3#-#-"+#-     HJ' r:   )BaseFormatterc                   V   <a  ] tR t^t o RtV 3R lVVVVVVV3R lltV 3R ltRtV tR# )zinstall.<locals>.RichFormatterTc                &   < V ^8  d   QhRS[ RS[ /# )r2   r\   r4   r~   )r7   __classdict__s   "r8   r9   +install.<locals>.RichFormatter.__annotate__   s     ' 'c 'c 'r:   c                n   < V P                   '       d   \        VS! 4       SSSSSSR 7      # \        V4      # ))r]   r^   r`   ra   rb   rc   rd   )pprintrv   repr)	selfr\   rd   r   r`   rc   ra   rb   r^   s	   &&r8   __call__'install.<locals>.RichFormatter.__call__   s?    ;;;, +!)&3#-#-"+#-	 	  ;&r:   c                &   < V ^8  d   Qh/ S[ ;R&   # )r2   r   r6   )r7   r   s   "r8   r9   r      s      r:    N)	__name__
__module____qualname____firstlineno__r   r   __annotate_func____static_attributes____classdictcell__)r   rd   r   r`   rc   ra   rb   r^   s   @r8   RichFormatterinstall.<locals>.RichFormatter   s      F' ' '  r:   r   z
text/plain)
pip._vendor.richr   get_ipythonIPython.core.formattersr   display_formatter
formatters	NameErrorsysdisplayhook)r]   r^   r_   r`   ra   rb   rc   rd   r   ipr   r   rich_formatterr   s   ffffffff     @r8   installr      s    0 -&&G .G] 	:	' 	'M 	'& '8F''53  '&'s   
A= =BBc                      a  ] tR t^t o RtRR^RRRRRRRRR	RR
RRRRRR^ RR/V 3R lR llltV 3R lR ltV 3R lR ltRtV t	R# )rs   a+  A rich renderable that pretty prints an object.

Args:
    _object (Any): An object to pretty print.
    highlighter (HighlighterType, optional): Highlighter object to apply to result, or None for ReprHighlighter. Defaults to None.
    indent_size (int, optional): Number of spaces in indent. Defaults to 4.
    justify (JustifyMethod, optional): Justify method, or None for default. Defaults to None.
    overflow (OverflowMethod, optional): Overflow method, or None for default. Defaults to None.
    no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to False.
    indent_guides (bool, optional): Enable indentation guides. Defaults to False.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
    max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
    expand_all (bool, optional): Expand all containers. Defaults to False.
    margin (int, optional): Subtrace a margin from width to force containers to expand earlier. Defaults to 0.
    insert_line (bool, optional): Insert a new line if the output has multiple new lines. Defaults to False.
Nindent_sizejustifyr^   no_wrapFr`   ra   rb   rc   rd   rj   insert_linec                   < V ^8  d   QhRS[ RS[R,          RS[RS[R,          RS[R,          R	S[S[,          R
S[RS[S[,          RS[S[,          RS[S[,          RS[RS[RS[RR/# )r2   _objecthighlighterr,   r   r   r-   r^   r.   r   r`   ra   rb   rc   rd   rj   r   r4   N)r   r   re   r6   )r7   r   s   "r8   r9   Pretty.__annotate__  s     ' '' /0'
 ' /*' +,' $' ' SM' SM' C=' ' ' '  
!'r:   c                   Wn         T;'       g    \        4       V n        W0n        W@n        WPn        W`n        Wpn        Wn        Wn	        Wn
        Wn        Wn        Wn        R # N)r   r%   r   r   r   r^   r   r`   ra   rb   rc   rd   rj   r   )r   r   r   r   r   r^   r   r`   ra   rb   rc   rd   rj   r   s   &&&$$$$$$$$$$$r8   __init__Pretty.__init__  sV    " &;;/*;&294<*$$"$&r:   c                &   < V ^8  d   QhRRRRRR/# )r2   r]   r*   optionsr+   r4   r/   r   )r7   r   s   "r8   r9   r   0  s%     ! ! !+;!	!r:   c           
   #    "   \        V P                  VP                  V P                  ,
          V P                  V P
                  V P                  V P                  V P                  R 7      p\        P                  ! TV P                  ;'       g    VP                  V P                  ;'       g    VP                  \        V P                  VP                  4      RR7      pV'       d   V P                  V4      M"\        \!        V P                  4       R2RR7      pV P"                  '       d0   VP$                  '       g   VP'                  V P                  RR7      pV P(                  '       d   RV9   d   Rx  Vx  R	# 5i)
	max_widthr   ra   rb   rc   rd   pretty)r   r^   r   stylez.__repr__ returned empty stringz
dim italic)r   zrepr.indentrn   rk   N)pretty_reprr   r   rj   r   ra   rb   rc   rd   r)   	from_ansir   r^   r!   r   r   r?   r`   
ascii_onlywith_indent_guidesr   )r   r]   r   
pretty_strpretty_texts   &&&  r8   __rich_console__Pretty.__rich_console__0  s2     !LL''$++5((nn

 nnLL33GOO]]66g&6&6dllGOO<
  [)%&&EF" 	 g&8&8&8%88   9 K  3Hs   B,F/A?F/F.F0Fc                &   < V ^8  d   QhRRRRRR/# )r2   r]   r*   r   r+   r4   r(   r   )r7   r   s   "r8   r9   r   S  s%     3 3 3+;3	3r:   c           
        \        V P                  VP                  V P                  V P                  V P
                  V P                  V P                  R 7      pV'       d!   \        R VP                  4        4       4      M^ p\        WD4      # )r   c              3   8   "   T F  p\        V4      x  K  	  R # 5ir   r#   .0rq   s   & r8   	<genexpr>*Pretty.__rich_measure__.<locals>.<genexpr>`  s     C+B4+B   )r   r   r   r   ra   rb   rc   rd   max
splitlinesr(   )r   r]   r   r   
text_widths   &&&  r8   __rich_measure__Pretty.__rich_measure__S  su     !LL''((nn

 HRCC:+@+@+BCCWX 	 :22r:   )r   rd   r   r`   r   r   r   rj   rc   ra   rb   r   r^   r   )
r   r   r   r   __doc__r   r   r   r   r   r   s   @r8   rs   rs      s     &'
 ' .2' 04' #(' $' %)' %)' $(' !' ' "' '>! !F3 3r:   rs   c                ~    V ^8  d   QhR\         \        \        3,          R\        \        \        \        3,          /# r2   r   r4   )r   r   r   rf   )r7   s   "r8   r9   r9   e  s/      S#X)> 5cSVCW r:   c                 H    R V P                   : R2RR V P                   : R23# )zdefaultdict(z, {})z, {}))default_factoryr   s   &r8   _get_braces_for_defaultdictr   e  s5    
w..16
w..19 r:   c                r    V ^8  d   QhR\         \        ,          R\        \        \        \        3,          /# r   )r   r   r   rf   )r7   s   "r8   r9   r9   m  s)      5: %S#2F r:   c                 d    V P                   f   R# RRV P                    R2RV P                    R23# )Ndeque([z
], maxlen=)zdeque(maxlen=)r   ])zdeque())maxlenr   s   &r8   _get_braces_for_dequer   m  sA    ~~++
W^^$A&
'q) r:   c                T    V ^8  d   QhRRR\         \        \        \        3,          /# )r2   r   z
array[Any]r4   )r   rf   )r7   s   "r8   r9   r9   w  s)     T T< TE#sC-4H Tr:   c                 H    R V P                   : R2RR V P                   : R23# )zarray(z, [r   r   )typecoder   s   &r8   _get_braces_for_arrayr   w  s0    W%%(,dfW=M=M<PPQ4RSSr:   c                     R# )	environ({)r   r   zenviron({})r   r   s   &r8   <lambda>r   |  s    !Cr:   c                     R# )	Counter({)r   r   z	Counter()r   r   s   &r8   r   r     s    =r:   c                     R# {)r   }z{}r   r   s   &r8   r   r         *r:   c                     R# r   r   r   s   &r8   r   r         .r:   c                     R# )frozenset({)r   r   zfrozenset()r   r   s   &r8   r   r     s    Cr:   c                     R# [)r   ]z[]r   r   s   &r8   r   r     r   r:   c                     R# r   r   r   s   &r8   r   r     r   r:   c                     R# )r   )r   r   zset()r   r   s   &r8   r   r     s    ,r:   c                     R# )()r   r   ()r   r   s   &r8   r   r     s    +r:   c                     R# )mappingproxy({)r   r   zmappingproxy({})r   r   s   &r8   r   r     s    &Rr:   c                0    V ^8  d   QhR\         R\        /# r1   r5   )r7   s   "r8   r9   r9     s      s t r:   c                    \        V \        4      ;'       g;    \        V 4      ;'       g(    \        V R4      ;'       g    \	        V 4      ;'       d    \        V 4      '       * # )z3Check if an object may be expanded by pretty print.__rich_repr__)ro   _CONTAINERSr   hasattrrA   r   r@   s   &r8   is_expandabler    sc     	k* 	  	 	  	 C)	  	  3	 
 cl
r:   c                      a  ] tR tRt o RtRtRtRtRtRt	Rt
RtRtRtRtRtV 3R lR	 ltV 3R
 lR ltV 3R lR ltRV 3R lR lltV 3R ltRtV tR# )Nodei  z4A node in a repr tree. May be atomic or a container.rk   FNz: z, c                0   < V ^8  d   QhRS[ S[,          /# r2   r4   )r   rf   )r7   r   s   "r8   r9   Node.__annotate__  s     ! !Xc] !r:   c              #    "   V P                   '       d   V P                   x  V P                  x  V P                  '       d   V P                  x  R# V P                  e   V P                  '       d   V P                  x  V P
                  '       d[   V P                  '       gI   \        V P                  4      ^8X  d/   V P                  ^ ,          P                  4        Rj  xL
  Rx  MMV P                   F=  pVP                  4        Rj  xL
  VP                  '       d   K/  V P                  x  K?  	  V P                  x  R# V P                  x  R# R#  Lx LN5i)zGenerate tokens for this node.N,)key_reprkey_separator
value_reprchildren
open_braceis_tupleis_namedtupleleniter_tokenslast	separatorclose_braceempty)r   childs   & r8   r  Node.iter_tokens  s     ===--$$$???//!]]&}}}oo%===);););DMM@RVW@W#}}Q/;;===I!%#(#4#4#666$zzz"&..0 "/ &&&jj  ' > 7sB   A E /E 3E E %>E #E$+E EE (5E E c                ,   < V ^8  d   QhRS[ RS[ RS[/# )r2   start_lengthra   r4   re   r6   )r7   r   s   "r8   r9   r    s"       # $ r:   c                n    TpV P                  4        F  pV\        V4      ,          pW28  g   K   R# 	  R# )zCheck the length fits within a limit.

Args:
    start_length (int): Starting length of the line (indent, prefix, suffix).
    max_length (int): Maximum length.

Returns:
    bool: True if the node can be rendered within max length, otherwise False.
FT)r  r$   )r   r  ra   total_lengthtokens   &&&  r8   check_lengthNode.check_length  s8     $%%'EHUO+L( ( r:   c                    < V ^8  d   QhRS[ /# r  rf   )r7   r   s   "r8   r9   r    s       r:   c                D    R P                  V P                  4       4      pV# rk   )joinr  )r   	repr_texts   & r8   __str__Node.__str__  s    GGD,,./	r:   c                2   < V ^8  d   QhRS[ RS[ RS[RS[/# )r2   r   r   rd   r4   )re   r6   rf   )r7   r   s   "r8   r9   r    s-      03EI	r:   c                V   \        V RR7      .p^ pV\        V4      8  dq   WE,          pVP                  '       dL   VP                  '       g:   V'       g   VP	                  V4      '       g   VP                  V4      WEV^,           % V^,          pK  RP                  R V 4       4      pV# )a4  Render the node to a pretty repr.

Args:
    max_width (int, optional): Maximum width of the repr. Defaults to 80.
    indent_size (int, optional): Size of indents. Defaults to 4.
    expand_all (bool, optional): Expand all levels. Defaults to False.

Returns:
    str: A repr string of the original object.
T)nodeis_rootrn   c              3   8   "   T F  p\        V4      x  K  	  R # 5ir   r"  r   s   & r8   r   Node.render.<locals>.<genexpr>  s     954SYY5r   )_Liner  
expandableexpandedr  expandr%  )r   r   r   rd   linesline_norq   repr_strs   &&&&    r8   renderNode.render  s     D$/0E
">Dt}}}T%6%6y%A%A37;;{3KEGaK0qLG999599r:   c                   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   S[;R&   S[S[R	,          ,          ;R
&   S[ ;R&   S[ ;R&   # )r2   r
  r  r  r  r  r  r  r  r  r  r  r  )rf   r6   r   r   )r7   r   s   "r8   r9   r    s      	 
       O        tF|$+     r:   r   )P      F)r   r   r   r   r   r
  r  r  r  r  r  r  r  r  r  r  r  r  r'  r6  r   r   r   r   s   @r8   r  r    so     >HJJKEDHM'+HMI! !, "  w  r:   r  c                      a  ] tR tRt o RtRtRtRtRtRt	Rt
RtRt]V 3R lR l4       tV 3R lR	 ltV 3R
 lR ltV 3R lR ltV 3R ltRtV tR# )r/  i  zA line in repr output.NFrk   c                    < V ^8  d   QhRS[ /# r  r   )r7   r   s   "r8   r9   _Line.__annotate__  s     B BD Br:   c                l    \        V P                  RJ;'       d    V P                  P                  4      # )z"Check if the line may be expanded.N)r6   r+  r  r   s   &r8   r0  _Line.expandable  s*     DIIT)@@dii.@.@AAr:   c                &   < V ^8  d   QhRS[ RS[/# )r2   ra   r4   r  )r7   r   s   "r8   r9   r=    s     @ @s @t @r:   c                    \        V P                  4      \        V P                  4      ,           \        V P                  4      ,           pV P
                  f   Q hV P
                  P                  W!4      # )z4Check this line fits within a given number of cells.)r  
whitespacer$   textsuffixr+  r  )r   ra   r  s   && r8   r  _Line.check_length  sX      8DII#66$++9NN 	 yy$$$yy%%l??r:   c                4   < V ^8  d   QhRS[ RS[R,          /# )r2   r   r4   r/  )re   r   )r7   r   s   "r8   r9   r=    s      
 
# 
(7*; 
r:   c           	   #    "   V P                   pVf   Q hV P                  pVP                  '       g   Q hVP                  '       d5   \	        VP                   VP
                   VP                   2VR7      x pM\	        VP                  VR7      x pV P                  RV,          ,           pVP                  ;'       d    \        VP                  4      ^8H  p\        VP                  4       F>  w  rxV'       d   RMVP                  p	\	        TTTT	T;'       d    V'       * R7      p
V
x  K@  	  \	        VP                  VV P                  V P                  R7      x  R# 5i)z6Expand this line by adding children on their own line.N)rD  rC   r	  )parentr+  rC  rE  r  )rD  rC  rE  r  )r+  rC  r  r
  r/  r  r  r  r  r    r  r  rE  r  )r   r   r+  rC  new_linechild_whitespacetuple_of_oner  r  r  rq   s   &&         r8   r2  _Line.expand  s*    yy__
}}}}==="t'9'9&:4??:KL% H
 #JOOH??S;->>}}@@T]]);q)@$T]]3KD+I+ ..,.D J 4 !!!;;	
 	
s   0E"E"A9E"AE"AE"c                    < V ^8  d   QhRS[ /# r  r"  )r7   r   s   "r8   r9   r=  (  s       r:   c                   V P                   '       d1   V P                   V P                   V P                  ;'       g    R  2# V P                   V P                   V P                  ;'       g    R  V P                  P                  4        2# r$  )r  rC  rD  r+  rE  ru   r?  s   &r8   r'  _Line.__str__(  so    999oo&tyyk$))//r1BCC ??#DII;tyyB.?@R@R@T?UVr:   c                   < V ^8  d   Qh/ S[ R,          ;R&   S[;R&   S[ S[,          ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R	&   # )
r2   r/  rJ  r,  r+  rD  rE  rC  r1  r  )r   r6   r  rf   )r7   r   s   "r8   r9   r=    su      W$	 
   4.  N         r:   r   )r   r   r   r   r   rJ  r,  r+  rD  rE  rC  r1  r  propertyr0  r  r2  r'  r   r   r   r   s   @r8   r/  r/    sm       $FGDDFJHDB B@ @
 
B w  r:   r/  c                0    V ^8  d   QhR\         R\        /# r1   r5   )r7   s   "r8   r9   r9   1  s     @ @ @ @r:   c                     \        V RR4      p\        T \        4      ;'       d    \        T\        4      #   \         d     R# i ; i)a<  Checks if an object is most likely a namedtuple. It is possible
to craft an object that passes this check and isn't a namedtuple, but
there is only a minuscule chance of this happening unintentionally.

Args:
    obj (Any): The object to test

Returns:
    bool: True if the object is a namedtuple. False otherwise.
_fieldsNF)getattrrO   rz   tuple)r3   r
   s   & r8   _is_namedtuplerY  1  sG    i. c5!??j&??  s   7 AAc          
          V ^8  d   QhR\         R\        \        ,          R\        \        ,          R\        \        ,          R\        /# )r2   r   ra   rb   rc   r4   )r   r   re   r  )r7   s   "r8   r9   r9   D  sM     g ggg g }	g
 
gr:   c           	        aaaaaaaa	 R V3R llo\        4       o	S	P                  oS	P                  oRR VVVVVVV	3R llloS! V RR7      pV# )a4  Traverse object and generate a tree.

Args:
    _object (Any): Object to be traversed.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
        Defaults to None.
    max_depth (int, optional): Maximum depth of data structures, or None for no maximum.
        Defaults to None.

Returns:
    Node: The root of a tree structure which can be used to render a pretty repr.
c                0    V ^8  d   QhR\         R\        /# r1   )r   rf   )r7   s   "r8   r9   traverse.<locals>.__annotate__Y  s      S S r:   c                  < SeL   \        V \        \        34      '       d0   \        V 4      S8  d    \        V 4      S,
          pV RS : RV 2pV#  \	        V 4      pV#   \
         d   pR\        T4      : R2p Rp?T# Rp?ii ; i)z0Get repr string for an object, but catch errors.N+z<repr-error >)ro   bytesrf   r  r   rO   )r3   	truncatedobj_reprerrorrb   s   &   r8   to_reprtraverse.<locals>.to_reprY  s     " ucl33C:%C:-Ikz*-Qyk:H 	:9   :)#e*q9:s   A B*B  Bc                H    V ^8  d   QhR\         R\        R\        R\        /# )r2   r3   rootdepthr4   )r   r6   re   r  )r7   s   "r8   r9   r]  m  s.     { {s {$ {s {4 {r:   c                  <a a" \        S 4      pVS)9   d   \        RR7      # \        S 4      pS$RJ;'       d    VS$8  pR R lp \        S R4      pRpV'       g5    \        S R4      '       d"   \        S 4      '       g   S P                  4       pVEeg   S'! V4       \        S P                  R	R4      p	\        V! V4      4      p
S P                  P                  pV
'       d   . pVP                  pV'       d*   V	'       d   \        R
V R2R7      pM\        V R2R7      pMV	'       d   \        R
V R2RVVRR7      pM\        V R2RVVR7      p\        V
4       Fq  w  pp\        V\        4      '       d6   Vw  ppS#! VV^,           R7      pVVn        VVn        RVn        V! V4       KQ  S#! VV^,           R7      pVVn        V! V4       Ks  	  M\        V	'       d   R
V R2MV R2. VR7      pS&! V4       EM}\%        S 4      '       Ed/   V'       Eg&   S'! V4       . pVP                  p\'        S 4      o"S"'       d   V'       d%   \        S P                  P                   R2R7      pM\        S P                  P                   R2RVVR7      pR V"V 3R llp\        V! 4       4       F\  w  pw  pppV'       d   \        \)        V! V4      4      R7      pMS#! VV^,           R7      pVVn        VVn        RVn        V! V4       K^  	  M%\        S P                  P                   R2. VR7      pS&! V4       EM=\+        S 4      '       Ed0   \        S \        4      '       Eg   V'       Eg   \-        S 4      '       d   S'! V4       . pVP                  pV'       d%   \        S P                  P                   R2R7      pM\        S P                  P                   R2RVVS P                  P                   R2R7      p\        V 3R l\/        S 4       4       4       FR  w  ppS#! \        S VP0                  4      V^,           R7      pVP0                  Vn        VVn        RVn        V! V4       KT  	  S&! V4       EM\3        S 4      '       d   \5        S 4      '       d   S'! V4       S P                  P                  pV'       d   \        V R2R7      pM. pVP                  p\        V R2RVV R2R7      p\        S P7                  4       P9                  4       4       F7  w  pw  ppS#! VV^,           R7      pVVn        VVn        RVn        V! V4       K9  	  S&! V4       EM\        S \:        4      '       Ed   \:         F  p\        S V4      '       g   K  Tp M	  S'! V4       \<        V,          ! S 4      w  pppV'       d   \        V RV 2R7      pEMVP>                  \        S 4      P>                  8w  d   \        S(! S 4      VR7      pEMLS '       Ed6   . p\        VVVVR7      pVP                  p\A        S 4      pV^,
          p\        S \B        4      '       ds   \E        S P9                  4       4      pS%e   \G        VS%4      p\I        V4       F9  w  p w  ppS#! VV^,           R7      pS(! V4      Vn        V V8H  Vn        V! V4       K;  	  MS\E        S 4      p!S%e   \G        V!S%4      p!\I        V!4       F)  w  p pS#! VV^,           R7      pV V8H  Vn        V! V4       K+  	  S%e%   VS%8  d   V! \        RVS%,
           2RR7      4       M\        V. VR7      pS&! V4       M\        S(! S 4      VR7      p\        S 4      \        8H  Vn%        \3        S 4      Vn&        V#   \         d    Rp EL_i ; i  \         d     EL3i ; i) zWalk the object depth first.z...)r  Nc          	          V ^8  d   QhR\         R\        \        \         \        \        \         3,          3,          ,          /# )r2   	rich_argsr4   )r   r   r   r   rf   )r7   s   "r8   r9   1traverse.<locals>._traverse.<locals>.__annotate__y  s1     	 	c 	huS%S/=Q7R.S 	r:   c              3     "   V  F{  p\        V\        4      '       d_   \        V4      ^8X  d   Vw  r#pWC8X  d   K6  W#3x  K=  \        V4      ^8X  d   Vw  r#W#3x  KX  \        V4      ^8X  d   V^ ,          x  Ku  Kw  Vx  K}  	  R# 5i)   N)ro   rX  r  )rl  argkeyr  defaults   &    r8   iter_rich_args3traverse.<locals>._traverse.<locals>.iter_rich_argsy  s|      #C//3x1}.1+G"+$!j(SQ%(
!j(SQ!!f ' I !s   BB,awehoi234_wdfjwljet234_234wdfoijsdfmmnxpi492Fr   angular<z...>z(...)rI  r`  )r  r  r  r  r  r   r   )r  r  r  r  )ri  =r   )r  r  r  c          	          V ^8  d   QhR\         \        \        \        \        \
        \        .\        3,          ,          3,          ,          /# r  )r   r   rf   r   r   r   )r7   s   "r8   r9   rm    s5     & & sC(C5#::N1O'O!PQ&r:   c               3  <  <"   S Ff  p V P                   '       g   K   \        SV P                  4      pV P                  T\        V P                   4      '       d   V P                   MR3x  Kh  	  R#   \         d   pT P                  TR3x   Rp?K  Rp?ii ; i5i)z$Iterate over attr fields and values.N)r   rW  namecallablerO   )attrr\   rd  attr_fieldsr3   s      r8   
iter_attrs/traverse.<locals>._traverse.<locals>.iter_attrs  s      %0D#yyy
!&,3C,CE )-		(-5=dii5H5H		d+& %& %0 (1 !C+/99eT*B$B$B!Cs-   BA2>B2B=BBBB)r  r  r  r  r  c              3      <"   T F9  pVP                   '       g   K  \        SVP                  4      '       g   K5  Vx  K;  	  R # 5ir   )r   r  r{  )r   fieldr3   s   & r8   r   .traverse.<locals>._traverse.<locals>.<genexpr>  s4      -!,zz &-c5::&> E!,s   AA
A)r  r  r  r  )r  r  z... +T)r  r  r  )'idr  r?   r  rO   r   r   rW  list	__class__r   appendr    ro   rX  r  r
  r  rA   rD   rf   r   rP   r
   r{  rY  rZ   _asdictitemsr   _BRACESrI   r  _MAPPING_CONTAINERSiterr   	enumerater  r  )*r3   rh  ri  obj_idobj_typereached_max_depthrs  fake_attributesrich_repr_resultrv  args
class_namer  r  r+  r  rp  rq  r  
child_noder  r{  r\   repr_callabler  container_typer  r  r  	num_itemslast_item_index
iter_itemsindexiter_valuesr~  	_traverserc   ra   pop_visitedpush_visitedre  visited_idss*   f&&                               @r8   r  traverse.<locals>._traversem  s2    C[ 5))9%T1HHey6H	 	$%CO 6:300'*'8'8':$ ' c//EBG'789D//J!$#:,d/CD#*U/CD#)*:,a'8(+%-!%&)   $*4Q'7(+%-!%	  &/t_	c+C77),JC)25	)JJ.2JO25J/7:J4":.)23eai)HJ.2JO":. &5 4;:,a0J<rAR
 S!!// H__F*3/K$cmm.D.D-EU+KLD&)mm&<&<%=Q#?$'!)!	D& &$ ?H
>U::tUM()-]5=Q9R)SJ)25	)JJ*.
.2
+36
0z* ?V "%--"8"8!9<rPT $S$//#O"3'' H__F #--*@*@)A'GH"%--"8"8!9; #% ]]334B7 $- -!'- $KD%
 "+73

+C5ST9!UJ*/**J'&*JO/2J,:&$ C  %A#%F%F //J ",U3 !",Q/ #%'L+	 +4CKKM4G4G4I*J&D,3!*5	!BJ*-J'&*JO/2J,:& +K c;//"-#C88-H #.
  -4X->s-C*JU *S'FG""d3i&8&88ws|$?) +%	 "H	"+a-#C)<==!%ciik!2J!-%+J
%C
/8/D+|U%.uEAI%F
.5cl
+*/?*B
z*	 0E #'s)K!-&,[*&E(1+(>u%.uEAI%F
*/?*B
z* )? )i*.D4U9z3I2J+KRVWX%"4@73<d;DS	U*+C0w  	$#O	$  s$   ^  3^4  ^10^14__T)rh  )Fr   )setaddremove)
r   ra   rb   rc   r+  r  r  r  re  r  s
   &fff @@@@@r8   traverser  D  sP    *    EK??L$$K{ { {z W4(DKr:   r   r   ra   rb   rc   rd   c                    V ^8  d   QhR\         R\        R\        R\        \        ,          R\        \        ,          R\        \        ,          R\        R\        /# )	r2   r   r   r   ra   rb   rc   rd   r4   )r   re   r   r6   rf   )r7   s   "r8   r9   r9   n  sf     % %% % 	%
 % % }% % 	%r:   c               x    \        V \        4      '       d   T pM\        WWER7      pVP                  WVR7      pV# )aO  Prettify repr string by expanding on to new lines to fit within a given width.

Args:
    _object (Any): Object to repr.
    max_width (int, optional): Desired maximum width of repr string. Defaults to 80.
    indent_size (int, optional): Number of spaces to indent. Defaults to 4.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
        Defaults to None.
    max_depth (int, optional): Maximum depth of nested data structure, or None for no depth.
        Defaults to None.
    expand_all (bool, optional): Expand all containers regardless of available width. Defaults to False.

Returns:
    str: A possibly multi-line representation of the object.
)ra   rb   rc   )r   r   rd   )ro   r  r  r6  )	r   r   r   ra   rb   rc   rd   r+  r5  s	   &$$$$$$  r8   r   r   n  sF    8 &&z
 KK   H Or:   r]   r`   Tc                    V ^8  d   QhR\         R\        R,          R\        R\        \        ,          R\        \        ,          R\        \        ,          R\        R	R
/# )r2   r   r]   r*   r`   ra   rb   rc   rd   r4   N)r   r   r6   re   )r7   s   "r8   r9   r9     sk     " "" i " 	"
 " " }" " 
"r:   c               l    Vf   \        4       MTpVP                  \        V VVVVVRR7      RR7       R# )a  A convenience function for pretty printing.

Args:
    _object (Any): Object to pretty print.
    console (Console, optional): Console instance, or None to use default. Defaults to None.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of strings before truncating, or None to disable. Defaults to None.
    max_depth (int, optional): Maximum depth for nested data structures, or None for unlimited depth. Defaults to None.
    indent_guides (bool, optional): Enable indentation guides. Defaults to True.
    expand_all (bool, optional): Expand all containers. Defaults to False.
Nignore)ra   rb   rc   r`   rd   r^   T)	soft_wrap)r   rr   rs   )r   r]   r`   ra   rb   rc   rd   _consoles   &$$$$$$ r8   r   r     sD    , !({}WHNN!!'!	
   r:   __main__c                   2   a  ] tR tRt o V 3R lR ltRtV tR# )
BrokenRepri  c                    < V ^8  d   QhRS[ /# r  r"  )r7   r   s   "r8   r9   BrokenRepr.__annotate__  s     	$ 	$c 	$r:   c                    ^^ ,           R# )rh   zthis will failr   r?  s   &r8   rI   BrokenRepr.__repr__  s    E#r:   r   Nr   r   r   r   rI   r   r   r   s   @r8   r  r    s     	$ 	$r:   r  )
NamedTuplec                   ,   a  ] tR tRt o V 3R ltRtV tR# )StockKeepingUniti  c                f   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[;R&   S[ ;R&   S[S[ ,          ;R&   # )r2   r{  descriptionpricecategoryreviews)rf   floatr   )r7   r   s   "r8   r9   StockKeepingUnit.__annotate__  sC     	     	 
 c r:   r   N)r   r   r   r   r   r   r   r   s   @r8   r  r    s      r:   r  foozHello World!gZd;Y@gʡE3t@g    cAbarr   crumblecounteratomic
namedtuplezSparkling British Spring WaterzCarbonated spring waterg?waterzits amazing!zits terrible!Broken)rr   )r`   rb   c                   2   a  ] tR tRt o V 3R lR ltRtV tR# )Thingi  c                    < V ^8  d   QhRS[ /# r  r"  )r7   r   s   "r8   r9   Thing.__annotate__  s     	0 	0c 	0r:   c                    R # )zHello[38;5;239m World!r   r?  s   &r8   rI   Thing.__repr__  s    /r:   r   Nr  r   s   @r8   r  r    s     	0 	0r:   r  c          	          V ^8  d   Qh/ ^ \         9   dC   \        \        \        \        .\
        \        \        \        3,          3,          3,          ;R&   # )r2   r  )__conditional_annotations__r   r?   r   r   r   rf   )r7   s   "r8   r9   r9      s?    t dHcUE#sC-$8899	: u r:   )Nr  FFNNNF)NNN>   rh   r2   ro  r:              >   rh   r2   ro  )applerhubarbbuttersugarflour)r  orangepearkumquatr  X  duriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurian)FTN)or  r   collectionsrL   rT   osrN   r   r   r   r   r   r   r   r	   r
   r   r   	itertoolsr   typesr   typingr   r   r   r   r   r   r   r   r   r   r   r   r   pip._vendor.rich.reprr   r}  r=   r  r<   ImportErrorrk   r   _loopr    _pickr!   abcr"   cellsr$   r   r%   jupyterr&   r'   measurer(   rD  r)   r]   r*   r+   r,   r-   r.   r/   rA   rD   rP   r  rQ   rZ   rv   ro   r   rs   r   r   r   _Environdict	frozensetr  r  rX  r  keysr   r  r  r  r/  rY  r  r   r   r   r  r  r  re   ddatar  r   rr   r  r9   )r  s   @r8   <module>r     s\       	  
  G G 7 7   "     1t,J      ( 4    6
@
(  **+>C )(-&`OGde3\ e3PT
 KKC	 ,=	 
*.C
*.	,	+R>  GLLN#R[[*:HE  Q Q Qh @ @ @F@&gT	% % 	%
 !%% !%%  $% %P" $(" 	"
 !%" !%"  $" "J z$ $
 ":  	CAAeH&
 	y#{9NO
 	7	
 	%&,%_-
 	*,? DB 	Kt&	&Tb
9:0 0 
&/{ o  Js   8J* *	J76J7