
    жvg                        U d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ d dlmZmZm	Z	m
Z
mZ d dl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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#Z$ e%e$d
          Z&n# e'$ r dZ&Y nw xY wddl(m)Z) ddl*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5m6Z6 ddl7m8Z8 ddl9m:Z: erddl;m<Z<m=Z=m>Z>m?Z?m@Z@mAZA dedeBfdZCdeded         fdZDdeEdeBfdZF ejG        dg           ZHdeEdeBfdZI	 	 	 	 	 	 	 	 dpd ed!ed"         d#d$d%eBd&eBd'eeJ         d(eeJ         d)eeJ         d*eBde eKdf         fd+ZLdeEd,e eMeeMd-f         f         deBfd.ZN	 	 	 	 	 	 	 	 dpd!ed"         d#d$d%eBd&eBd'eeJ         d(eeJ         d)eeJ         d*eBddfd/ZO G d0 d1e5          ZPd2eeef         deeKeKeKf         fd3ZQd2d4deeKeKeKf         fd5ZRejS        d6 eeRe
eQed7 ed8 eTd9 ed: eUd; eVd< e	d= eWd> eXd? ed@ iZYeeMeegeeKeKeKf         f         f         eZdA<    eXeY[                                          Z\eTejS        eefZ]dedeBfdBZ^e G dC dD                      Z_e G dE dF                      Z`dedeBfdGZa	 	 	 dqd2ed'eeJ         d(eeJ         d)eeJ         de_f
dHZbdIdJdddddKd2edLeJdMeJd'eeJ         d(eeJ         d)eeJ         d*eBdeKfdNZcddOdddddPd2ed!ed"         d&eBd'eeJ         d(eeJ         d)eeJ         d*eBddfdQZdeedRk    r G dS dT          Zfd dUlmgZg  G dV dWeg          Zh e
eJ          ZidXeidY<   ddZd[d\d]h d^g eUh d_           e
eVd`g dai           eg db          dc ehdddedfdgdhdig           ef            djZjejdY         k                    ej           d dkllmmZm  em ePejdOdlm                      G dn do          Zn em eP en                                 dS dS )r    N)array)CounterUserDictUserListdefaultdictdeque)	dataclassfieldsis_dataclass)isclass)islice)MappingProxyType)TYPE_CHECKINGAnyCallableDefaultDict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RenderResultobjreturnc                 R    t           o t          j        t          |                     S )z1Check if an object was created with attrs module.)
_has_attrs_attr_modulehastyper0   s    T/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/pip/_vendor/rich/pretty.py_is_attr_objectr9   :   s    5,*499555    z_attr_module.Attribute[Any]c                 V    t           r!t          j        t          |                     ng S )zGet fields for an attrs object.)r3   r4   r
   r6   r7   s    r8   _get_attr_fieldsr<   ?   s#    -7?<tCyy)))R?r:   c                 d    	 | j         j        j        t          j        k    S # t
          $ r Y dS w xY w)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__	Exceptionr7   s    r8   _is_dataclass_reprrD   D   s?    |$0K4HHH   uus   ! 
//_dummy_namedtuplec                     d}	 t          j        | j                  }n# t          t          f$ r Y nw xY wt          j        t
          j                  }||k    S )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getfiler>   OSError	TypeErrorrE   )r0   obj_filedefault_repr_files      r8   _has_default_namedtuple_reprrM   X   sj     H?3<00Y    	  (9(BCC(((s    22ignorevalueconsoler*   overflowr.   cropindent_guides
max_length
max_string	max_depth
expand_allc	                    ddl m}	 t          | t                    s| d S |pt	                      }|                                5 }
t          | |	          r|                                 |                    t          | t                    r| nt          | ||||||d          |dd           d d d            n# 1 swxY w Y   |

                                                    d          S )	Nr   )ConsoleRenderable   )rQ   rS   rT   rU   rV   rW   marginT )rR   new_line_startend
)rP   rY   _safe_isinstancer'   r   capturelineprintr"   Prettygetrstrip)rO   rP   rQ   rR   rS   rT   rU   rV   rW   rY   ra   s              r8   _ipy_display_hookrg   l   sH    +***** 011 U]t&G			 
gE#455 	LLNNN~66EE!+%%#%	 	 	  	 	
 	
 	
	
 
 
 
 
 
 
 
 
 
 
 
 
 
 
. ;;==%%%s   A*B::B>B>class_or_tuple.c                 F    	 t          | |          S # t          $ r Y dS w xY w)zFisinstance can fail in rare cases, for example types with no __class__F)
isinstancerC   )r0   rh   s     r8   r`   r`      s9    #~...   uus    
  c           	      2    ddl m  p	               J dt          ddf fd}	 t                      }	ddlm}
  G fdd	|
          } |            }||	j        j        d
<   dS # t          $ r |t          _
        Y dS w xY w)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   r   NrO   r1   c                     | `J dt           _                            t          | t                    r| nt          |                      | t           _        dS dS )z?Replacement sys.displayhook which prettifies objects with Rich.N)rQ   rS   rT   rU   rV   rW   )rR   )builtins_rc   r`   r"   rd   )	rO   rP   rR   rW   rS   rV   rT   rU   rQ   s	    r8   display_hookzinstall.<locals>.display_hook   s    &&&HJMM#E>::
%"/))')        HJJJ# r:   )BaseFormatterc                   @    e Zd ZU dZeed<   dedef fdZdS )install.<locals>.RichFormatterTpprintrO   r1   c           
      n    | j         rt          |                       S t          |          S )N)rP   rQ   rS   rT   rU   rV   rW   )rs   rg   repr)	selfrO   rW   r   rS   rV   rT   rU   rQ   s	     r8   __call__z'install.<locals>.RichFormatter.__call__   sP    ; ', +!)&3#-#-"+#-	 	 	 	  ;;&r:   N)__name__
__module____qualname__rs   bool__annotations__r   rw   )rW   r   rS   rV   rT   rU   rQ   s   r8   RichFormatterrr      sq         FD'c 'c ' ' ' ' ' ' ' ' ' ' ' ' ' 'r:   r}   z
text/plain)pip._vendor.richr   r   get_ipythonIPython.core.formattersrp   display_formatter
formatters	NameErrorsysdisplayhook)rP   rQ   rR   rS   rT   rU   rV   rW   ro   iprp   r}   rich_formatterr   s   ````````     @r8   installr      sL   0 -,,,,,&GC D             *G]] 	:99999	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	'M 	' 	' 	'& '8F'5553  ' ' '&'s   A< <BBc                       e Zd ZdZ	 d!dddddddddddddeded	         d
eded         ded         dee         dedee         dee         dee         dedededdfdZ	 	 	 	 	 	 d"dZ		 	 	 	 	 	 d#d Z
dS )$rd   ak  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   Fr   )indent_sizejustifyrQ   no_wraprS   rT   rU   rV   rW   r[   insert_line_objecthighlighterr,   r   r   r-   rQ   r.   r   rS   rT   rU   rV   rW   r[   r   r1   c                    || _         |pt                      | _        || _        || _        || _        || _        || _        || _        |	| _	        |
| _
        || _        || _        || _        d S N)r   r%   r   r   r   rQ   r   rS   rT   rU   rV   rW   r[   r   )rv   r   r   r   r   rQ   r   rS   rT   rU   rV   rW   r[   r   s                 r8   __init__zPretty.__init__  st    " &;/*;*;&294<*$$"$&r:   rP   r*   optionsr+   r/   c           	   #     K   t          | j        |j        | j        z
  | j        | j        | j        | j        | j                  }t          j
        || j        p|j        | j        p|j        t          | j        |j                  d          }|r|                     |          n%t          t!          | j                   dd          }| j        r#|j        s|                    | j        d          }| j        rd|v rd	V  |V  d S )
N	max_widthr   rT   rU   rV   rW   pretty)r   rQ   r   stylez.__repr__ returned empty stringz
dim italic)r   zrepr.indentr_   r\   )pretty_reprr   r   r[   r   rT   rU   rV   rW   r)   	from_ansir   rQ   r!   r   r   r6   rS   
ascii_onlywith_indent_guidesr   )rv   rP   r   
pretty_strpretty_texts        r8   __rich_console__zPretty.__rich_console__'  sH      !L'$+5(n
 
 

 nL3GO]6g&6dlGO<<
 
 
 D[)))%%FFF"   	  	g&8 	%88  9  K  	 3 3HHHr:   r(   c           	          t          | j        |j        | j        | j        | j        | j        | j                  }|r+t          d |	                                D                       nd}t          ||          S )Nr   c              3   4   K   | ]}t          |          V  d S r   r#   .0rb   s     r8   	<genexpr>z*Pretty.__rich_measure__.<locals>.<genexpr>W  s(      CC4CCCCCCr:   r   )r   r   r   r   rT   rU   rV   rW   max
splitlinesr(   )rv   rP   r   r   
text_widths        r8   __rich_measure__zPretty.__rich_measure__J  s     !L'(n
 
 

 HRXCCC:+@+@+B+BCCCCCCWX 	 :z222r:   r   )rP   r*   r   r+   r1   r/   )rP   r*   r   r+   r1   r(   )rx   ry   rz   __doc__r   r   intr{   r   r   r    r:   r8   rd   rd      sm        , 48'
 -1/3"'#$($(#' !' ' '' /0'
 ' /*' +,' $' ' SM' SM' C=' ' ' '  
!' ' ' '>! !+;!	! ! ! !F3 3+;3	3 3 3 3 3 3r:   rd   r   c                 0    d| j         ddd| j         dfS )Nzdefaultdict(z, {})z, {}))default_factoryr   s    r8   _get_braces_for_defaultdictr   \  s1    6w.6669w.999 r:   z
array[Any]c                 0    d| j         ddd| j         dfS )Nzarray(z, [])))typecoder   s    r8   _get_braces_for_arrayr   d  s,    ,W%,,,d4RW=M4R4R4RSSr:   c                     dS )N)z	environ({r   zenviron({})r   r   s    r8   <lambda>r   i  s    !C r:   c                     dS )N)z	Counter({r   z	Counter()r   r   s    r8   r   r   l  s    = r:   c                     dS )N)zdeque([r   zdeque()r   r   s    r8   r   r   m  s    7 r:   c                     dS N){}z{}r   r   s    r8   r   r   n      * r:   c                     dS r   r   r   s    r8   r   r   o      . r:   c                     dS )N)zfrozenset({r   zfrozenset()r   r   s    r8   r   r   p  s    C r:   c                     dS N)[]z[]r   r   s    r8   r   r   q  r   r:   c                     dS r   r   r   s    r8   r   r   r  r   r:   c                     dS )N)r   r   zset()r   r   s    r8   r   r   s  s    , r:   c                     dS )N)(r   ()r   r   s    r8   r   r   t  s    + r:   c                     dS )N)zmappingproxy({r   zmappingproxy({})r   r   s    r8   r   r   u  s    &R r:   _BRACESc                     t          | t                    p-t          |           pt          | d          pt	          |           ot          |            S )z3Check if an object may be expanded by pretty print.__rich_repr__)r`   _CONTAINERSr   hasattrr9   r   r7   s    r8   is_expandabler   {  s]     	k** 	 	 C))	  3	
 cll
r:   c            	          e Zd ZU dZdZeed<   dZeed<   dZeed<   dZ	eed<   dZ
eed<   dZeed	<   dZeed
<   dZeed<   dZeed                   ed<   dZeed<   dZeed<   dee         fdZdededefdZdefdZ	 ddedededefdZdS )Nodez4A node in a repr tree. May be atomic or a container.r\   key_repr
value_repr
open_braceclose_braceemptyFlastis_tupleis_namedtupleNchildrenz: key_separatorz, 	separatorr1   c              #     K   | j         r| j         V  | j        V  | j        r| j        V  dS | j        | j        r| j        V  | j        rI| j        sBt          | j                  dk    r*| j        d                                         E d{V  dV  n4| j        D ],}|                                E d{V  |j	        s	| j
        V  -| j        V  dS | j        V  dS dS )zGenerate tokens for this node.Nr   r   ,)r   r   r   r   r   r   r   leniter_tokensr   r   r   r   )rv   childs     r8   r   zNode.iter_tokens  sI     = 	%-$$$$? 	!/!!!!!]&} !o%%%= 1); 1DM@R@RVW@W@W#}Q/;;=========IIII!% 1 1#(#4#4#6#66666666$z 1"&.000&&&&&&j      '&r:   start_lengthrT   c                 n    |}|                                  D ]}|t          |          z  }||k    r dS dS )a*  Check 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$   )rv   r   rT   total_lengthtokens        r8   check_lengthzNode.check_length  sP     $%%'' 	 	EHUOO+Lj((uu )tr:   c                 T    d                     |                                           }|S Nr\   )joinr   )rv   	repr_texts     r8   __str__zNode.__str__  s%    GGD,,..//	r:   P   r   r   r   rW   c                 V   t          | d          g}d}|t          |          k     rb||         }|j        r;|j        s4|s|                    |          s|                    |          |||dz   <   |dz  }|t          |          k     bd                    d |D                       }|S )al  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_rootr   r   r_   c              3   4   K   | ]}t          |          V  d S r   )strr   s     r8   r   zNode.render.<locals>.<genexpr>  s(      994SYY999999r:   )_Liner   
expandableexpandedr   expandr   )rv   r   r   rW   linesline_norb   repr_strs           r8   renderzNode.render  s     D$///0E

"">D Lt} L LT%6%6y%A%A L37;;{3K3KE'GaK/0qLG E

"" 9999599999r:   )r   r   F)rx   ry   rz   r   r   r   r|   r   r   r   r   r   r{   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r:   r8   r   r     su        >>HcJJKE3OOOD$HdM4'+HhtF|$+++M3Is!Xc] ! ! ! !, # $    "    
 MR 03EI	     r:   r   c                       e Zd ZU dZdZed          ed<   dZeed<   dZ	ee
         ed<   dZeed<   dZeed	<   dZeed
<   dZeed<   dZeed<   edefd            ZdedefdZdeded          fdZdefdZdS )r   zA line in repr output.NparentFr   r   r\   textsuffix
whitespacer   r   r1   c                 F    t          | j        duo| j        j                  S )z"Check if the line may be expanded.N)r{   r   r   rv   s    r8   r   z_Line.expandable  s#     DIT)@di.@AAAr:   rT   c                     t          | j                  t          | j                  z   t          | j                  z   }| j        J | j                            ||          S )z4Check this line fits within a given number of cells.)r   r  r$   r   r   r   r   )rv   rT   r   s      r8   r   z_Line.check_length  s\       8DI#6#66$+9N9NN 	 y$$$y%%lJ???r:   r   c              #     K   | j         }|J | j        }|j        sJ |j        r)t	          |j         |j         |j         |          V }nt	          |j        |          V }| j        d|z  z   }|j        ot          |j                  dk    }t          |j                  D ]+\  }}|rdn|j
        }	t	          ||||	|o|           }
|
V  ,t	          |j        || j        | j                  V  dS )z6Expand this line by adding children on their own line.N)r   r   r   r   )r   r   r  r   r   )r   r  r   r   )r   r  r   r   r   r   r   r   r   r    r   r   r   r   )rv   r   r   r  new_linechild_whitespacetuple_of_oner   r   r   rb   s              r8   r   z_Line.expand  sb     y_
}= 	P"Lt'9L4?LL%    HH
 #JOOOOOH?S;->>}@T]););q)@$T]33 		 		KD%+?I+ .,.  D JJJJ!!;	
 
 
 	
 	
 	
 	
 	
r:   c                     | j         r| j         | j         | j        pd S | j         | j         | j        pd | j                                         S r   )r   r  r   r   r   rf   r  s    r8   r   z_Line.__str__  sc    9 	oCtyC$)/rCCC ?VDIVtyBV@R@R@T@TVVr:   )rx   ry   rz   r   r   r   r|   r   r{   r   r   r   r   r   r  r   r   propertyr   r   r   r   r   r   r   r:   r8   r   r     s7           $FHW$$$GTD(4.D#NNNFCJHdD$BD B B B XB@s @t @ @ @ @
# 
(7*; 
 
 
 
B      r:   r   c                     	 t          | dd          }n# t          $ r Y dS w xY wt          | t                    ot          |t                    S )aX  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)getattrrC   rj   tuple)r0   r
   s     r8   _is_namedtupler    s]    i..   uu c5!!?j&?&??s    
""c           	         	 dt           dt          ffdt                      		j        	j        ddt           dt
          dt          dt          f	fd | d	
          }|S )a`  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.
    r0   r1   c                 $   Qt          | t          t          f          r5t          |           k    r"t          |           z
  }| d         d| }n;	 t	          |           }n*# t
          $ r}dt          |          d}Y d}~nd}~ww xY w|S )z0Get repr string for an object, but catch errors.N+z<repr-error >)r`   bytesr   r   ru   rC   )r0   	truncatedobj_reprerrorrU   s       r8   to_reprztraverse.<locals>.to_reprF  s     " ucl33 #C:%%C:-Ikzk*::y::HH:99 : : :9#e**999:s   A& &
B0BBFr   rootdepthc           	      8   " t                     }|)v rt          d          S t                     }$duo|$k    }dt          dt          t
          t          t          t          t          f         f                  fd}	 t           d          }n# t          $ r d}Y nw xY wd}|sE	 t           d	          r#t                     s                                 }n# t          $ r Y nw xY w|[ '|           t           j        d
d          }	t           ||                    }
 j        j        }|
rg }|j        }|r+|	rt          d| d          }nt          | d          }n|	rt          d| dd||d          }nt          | dd||          }t#          |
          D ]r\  }}t%          |t&                    r6|\  }} #||dz             }||_        ||_        d|_         ||           P #||dz             }||_         ||           snt          |	rd| dn| dg |          } &|           nt/                     r`|s] '|           g }|j        }t1                     ""r|rt           j        j         d          }n	t           j        j         dd||          }dt          t          t          t          t2          t4          t          gt          f                  f                  f" fd}t#           |                      D ]b\  }\  }}}|r't          t           ||                              }n #||dz             }||_        ||_        d|_         ||           cnt           j        j         dg |          } &|           n0t7                     r	t%           t                    s|st9                     r '|           g }|j        }|rt           j        j         d          }nt           j        j         dd|| j        j         d          }t#          d t;                     D                       D ]M\  }} #t           |j                  |dz             }|j        |_        ||_        d|_         ||           N &|           nt?                     rtA                     r '|            j        j        }|rt          | d          }ng }|j        }t          | dd|| d          }t#           !                                "                                          D ]8\  }\  }} #||dz             }||_        ||_        d|_         ||           9 &|           n1t%           tF                    rtF          D ]}t%           |          r|} n '|           tI          |                    \  }}}|rt          | d|           }n|j%        t                     j%        k    rt           (           |          }na rLg }t          ||||          }|j        }tM                     }|dz
  }t%           tN                    rtQ           "                                          }%tS          |%          }tU          |          D ]>\  } \  }} #||dz             } (|          |_        | |k    |_         ||           ?n\tQ                     }!%tS          |!%          }!tU          |!          D ]+\  } } #||dz             }| |k    |_         ||           ,%&|%k    r  |t          d|%z
   d                     nt          |g |           } &|           nt           (           |          }t%           t&                    |_+        t?                     |_,        |S )!zWalk the object depth first.z...)r   N	rich_argsr1   c              3     K   | D ]}t          |t                    rdt          |          dk    r|\  }}}||k    r7||fV  >t          |          dk    r|\  }}||fV  ]t          |          dk    r
|d         V  {|V  d S )N      r   r   )r`   r  r   )r  argkeyr   defaults        r8   iter_rich_argsz3traverse.<locals>._traverse.<locals>.iter_rich_argsf  s         #C// 3xx1}}.1+UG"e++$!5j((((SQ%(
U!5j((((SQ!!fIIII r:   ,awehoi234_wdfjwljet234_234wdfoijsdfmmnxpi492Fr   angular<z...>z(...)r  r  )r   r   r   r   r   r   r   )r   r   r   r   r   )r  =r   )r   r   r   c               3      K   D ]j} | j         ra	 t          | j                  }| j        |t          | j                   r| j         ndfV  G# t          $ r}| j        |dfV  Y d}~bd}~ww xY wkdS )z$Iterate over attr fields and values.N)ru   r  namecallablerC   )attrrO   r  attr_fieldsr0   s      r8   
iter_attrsz/traverse.<locals>._traverse.<locals>.iter_attrs  s       %0 & &D#y &
!&,3C,C,CE )-	(-5=di5H5H(R		d+& %& %& %& %&	 (1 !C !C !C+/9eT*B$B$B$B$B$B$B$B$B!C&& &s   A
A-A((A-)r   r   r   r   r   c              3   (   K   | ]}|j         	|V  d S r   )ru   )r   fields     r8   r   z.traverse.<locals>._traverse.<locals>.<genexpr>  s=       - -#ej-- - - - - -r:   )r   r   r   r   )r   r   z... +T)r   r   r   )-idr   r6   r   r   r   r   r   r   rC   r   r   r  list	__class__rx   appendr    r`   r  r   r   r   r9   r<   r   r   r   rD   r
   r*  r  rM   _asdictitemsr   r   r>   r   _MAPPING_CONTAINERSiterr   	enumerater   r   )*r0   r  r  obj_idobj_typereached_max_depthr$  fake_attributesrich_repr_resultr&  args
class_namer   r4  r   r   r!  r"  r   
child_noder.  r*  rO   repr_callabler0  container_typer   r   r   	num_itemslast_item_index
iter_itemsindexiter_valuesr-  	_traverserV   rT   pop_visitedpush_visitedr  visited_idss*   `                                 @r8   rI  ztraverse.<locals>._traverseZ  s
    C[  5))))99%T1Hey6H	c 	huS%S/=Q7R.S 	 	 	 	 	$%C OO  	$ 	$ 	$#OOO	$ 6: 	300 ; ;'*'8'8':':$    'L   c/EBBG'78899D/J *!$  / E#/C:/C/C/CDDD#*/C/C/CDDD #'8:'8'8'8(+%-!%&)       $*4'7'7'7(+%-!%	      &/t__ / /	c+C77 
/),JC)25	)J)J)JJ.2JO25J/7:J4"F:....)23eai)H)H)HJ.2JO"F:..../ 4;R0:0000JARARAR  
 KS!! Y	</ Y	<L   H_F*3//K )$ $+cm.D+K+K+KLLLDD&)m&<#?#?#?$'!)!	  D& sC(C5#::N1O'O!PQ& & & & & & &$ ?H

>U>U + +::tUM( K)-]]5=Q=Q9R9R)S)S)SJJ)25	)J)J)JJ*.
.2
+36
0z****+ "%-"8<<<rPT   Kh	<$S$//h	< $h	< #3''	h	< L   H_F  '#-*@'G'G'GHHH"%-"8;;; #% ]3777   $- - -'-c{{- - - $ $ ' 'KD% "+73
+C+C5ST9!U!U!UJ*/*J'&*JO/2J,F:&&&&KC   J	<%A#%F%F J	<L   /J  '",333   !",/// #%'+++	   +4CKKMM4G4G4I4I*J*J ' '&D,3!*5	!B!B!BJ*-J'&*JO/2J,F:&&&&Kc;// 2	<"-  #C88 -HE L   -4X->s-C-C*JU  $A*'F'F'F'FGGG"d3ii&888wws||$???  A) +%	   "HH	"+a-#C)<== +!%ciikk!2!2J!-%+J
%C%C
/8/D/D + ++|U%.YuEAI%F%F%F
.5gcll
+*/?*B
z****	+ #'s))K!-&,[*&E&E(1+(>(> + +u%.YuEAI%F%F%F
*/?*B
z****)i*.D.DF4+K9z3I+K+KRVWWWXXX%"4@@@K773<<d;;;D(e44+C00s$   B B"!B"*3C 
C+*C+T)r  )Fr   )r   r   setaddremover{   r   r   )
r   rT   rU   rV   r   rI  rJ  rK  r  rL  s
    ``` @@@@@r8   traverserP  1  s    *S S         EEK?L$Ky ys y$ ys y4 y y y y y y y y y y y yv 9W4(((DKr:   r   r   r   r   r   c                    t          | t                    r| }nt          | |||          }|                    |||          }|S )a  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.
    )rT   rU   rV   )r   r   rW   )r`   r   rP  r   )	r   r   r   rT   rU   rV   rW   r   r   s	            r8   r   r   Y  sb    8 && 

zY
 
 
 KK    H Or:   T)rP   rS   rT   rU   rV   rW   c                    |t                      n|}|                    t          | |||||d          d           dS )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.
    NrN   )rT   rU   rV   rS   rW   rQ   T)	soft_wrap)r   rc   rd   )r   rP   rS   rT   rU   rV   rW   _consoles           r8   rs   rs     sf    , !({}}}WHNN!!'!	
 	
 	
       r:   __main__c                       e Zd ZdefdZdS )
BrokenReprr1   c                     ddz   dS )Nr   r   zthis will failr   r  s    r8   r>   zBrokenRepr.__repr__  s    EE##r:   Nrx   ry   rz   r   r>   r   r:   r8   rW  rW    s/        	$c 	$ 	$ 	$ 	$ 	$ 	$r:   rW  )
NamedTuplec                   N    e Zd ZU eed<   eed<   eed<   eed<   ee         ed<   dS )StockKeepingUnitr*  descriptionpricecategoryreviewsN)rx   ry   rz   r   r|   floatr   r   r:   r8   r\  r\    sI         			cr:   r\     foozHello World!gZd;Y@gʡE3t@g    cA>   r   r   r  r   rb           >   r   r   r  crumble)applerhubarbbuttersugarflour)ri  orangepearkumquatrp  X  duriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurian)FTNzSparkling British Spring WaterzCarbonated spring waterg?waterzits amazing!zits terrible!)rc  barr   counteratomic
namedtupleBroken)rc      )rS   rU   c                       e Zd ZdefdZdS )Thingr1   c                     dS )NzHello[38;5;239m World!r   r  s    r8   r>   zThing.__repr__  s    //r:   NrY  r   r:   r8   rz  rz    s/        	0c 	0 	0 	0 	0 	0 	0r:   rz  )NrN   FFNNNF)NNN)orm   collectionsrA   rG   osr   r   r   r   r   r   r   r	   r
   r   r   	itertoolsr   typesr   typingr   r   r   r   r   r   r   r   r   r   r   r   pip._vendor.rich.reprr   r,  r4   r   r3   ImportErrorr\   r   _loopr    _pickr!   abcr"   cellsr$   r   r%   jupyterr&   r'   measurer(   r   r)   rP   r*   r+   r,   r-   r.   r/   r{   r9   r<   objectrD   rv  rE   rM   r   r   rg   r6   r`   r   rd   r   r   _Environdict	frozensetr2  rM  r  r   r|   keysr   r7  r   r   r   r  rP  r   rs   rx   rW  rZ  r\  ddatar4  r~   rc   rz  r   r:   r8   <module>r     s
             				 



       G G G G G G G G G G G G G G 7 7 7 7 7 7 7 7 7 7             " " " " " "                            1 0 0 0 0 0t,,JJ   JJJ                               ( ( ( ( ( ( 4 4 4 4 4 4 4 4                                  6 6 6 6 6 6
@# @(+H"I @ @ @ @
F t    " +K*+>CC )f ) ) ) ) ), $(!) $ $#+& +&+&i +& +& 	+&
 +& +& +& }+& +& 39+& +& +& +&\	!&tU49-='=!>	    $(!) $ $#MG MGi MGMG MG 	MG
 MG MG }MG MG 
MG MG MG MG`e3 e3 e3 e3 e3\ e3 e3 e3PS#X)> 5cSVCW    T< TE#sC-4H T T T T
 KCC	 ,==	77
*
*..CC
*
*..	,	,	++RR>dHcUE#sC-$8899	:    eGLLNN##R[*:HE s t     Q Q Q Q Q Q Q Qh @ @ @ @ @ @ @ @F@ @ @ @ @ @* !% $#	e eee e }	e
 
e e e eV	  $ $#% % %% % 	%
 % % }% % 	% % % %V $( $ $#" " "" i " 	"
 " " }" " 
" " " "J z$ $ $ $ $ $ $ $
 "!!!!!    :    	CAAeH &&&
 y##"{9NNNO
 
 7  	
 	
 &&&,%_-
 
 *,,?   DB 	Kt&&&&&&	E&&Tb
9
9
9:::0 0 0 0 0 0 0 0 
E&&//{ s   -A> >BB