
    Qi                        % S SK r S SKrS SKrS SKrS SKrS SKrS SKJr  S SKJrJrJ	r	J
r
Jr  S SKJrJrJr  S SKJr  S SKJr  S SKJr  S SKJrJrJrJrJrJrJrJrJrJrJrJ r   S S	K!J"r"   S SK#r$S
r%SSK'J(r(  SSK)J*r*  SSK+J,r,  SSK-J.r.  SSK/J0r0  SSK1J2r2  SSK3J4r4J5r5  SSK6J7r7  SSK8J9r9  \(       a  SSK:J;r;J<r<J=r=J>r>J?r?J@r@  S1rAS\S\B4S jrCS\S\S   4S jrDS\ES\B4S jrF\R                  " S/ 5      rHS\ES\B4S jrI        SmS \S!\S"   S#S$S%\BS&\BS'\\J   S(\\J   S)\\J   S*\BSS4S+ jjrKS\ES,\ \L\\LS-4   4   S\B4S. jrM        SmS!\S"   S#S$S%\BS&\BS'\\J   S(\\J   S)\\J   S*\BSS4S/ jjrN " S0 S1\45      rOS2\\\4   S\\P\P\P4   4S3 jrQS2S4S\\P\P\P4   4S5 jrR\R                  S6 \\R\
\Q\S7 \S8 \TS9 \S: \US; \VS< \	S= \WS> \XS? \S@ 0rY\\L\\/\\P\P\P4   4   4   \ZSA'   \X" \YR                  5       5      r\\T\R                  \\4r]S\S\B4SB jr^\ " SC SD5      5       r_\ " SE SF5      5       r`S\S\B4SG jra   SnS2\S'\\J   S(\\J   S)\\J   S\_4
SH jjrbSISJSSSSSK.S2\SL\JSM\JS'\\J   S(\\J   S)\\J   S*\BS\P4SN jjrcSS
SSSSSO.S2\S!\S"   S&\BS'\\J   S(\\J   S)\\J   S*\BSS4SP jjrd\eSQ:X  a   " SR SS5      rfS STKJgrg   " SU SV\g5      rh\
" \J5      riSW\iSX'   SSYSZS[S\1 S]k/\U" 1 S^k5      \
" \VS_/ S`Q05      \" / SaQ5      Sb\h" ScSdSeSfSgSh/5      \f" 5       Si.rj\jSX   R                  \j5        S SjKlJmrm   " Sk Sl5      rn\m" \O" \n" 5       5      5        gg! \& a    Sr% GNf = f)o    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)RichReprResultTF   get_console)	loop_last)	pick_bool)RichRenderablecell_len)ReprHighlighter)JupyterMixinJupyterRenderable)Measurement)Text)ConsoleConsoleOptionsHighlighterTypeJustifyMethodOverflowMethodRenderResultzmatplotlib.artist.Artistobjreturnc                 Z    [         =(       a    [        R                  " [        U 5      5      $ )z1Check if an object was created with attrs module.)
_has_attrs_attr_modulehastyper/   s    ]/var/www/html/backend/Backoffice_Marketplace/venv/lib/python3.13/site-packages/rich/pretty.py_is_attr_objectr8   A   s    5,**4955    z_attr_module.Attribute[Any]c                 Z    [         (       a  [        R                  " [        U 5      5      $ / $ )zGet fields for an attrs object.)r2   r3   r
   r5   r6   s    r7   _get_attr_fieldsr;   F   s     -7Z<tCy)?R?r9   c                      U R                   R                  R                  [        R                  :H  $ ! [
         a     gf = f)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__	Exceptionr6   s    r7   _is_dataclass_reprrC   K   s:    ||$$00K4H4HHH s   03 
A A _dummy_namedtuplec                     Sn [         R                  " U R                  5      n[         R                  " [
        R                  5      nX:H  $ ! [        [        4 a     N:f = f)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	TypeErrorrD   )r/   obj_filedefault_repr_files      r7   _has_default_namedtuple_reprrL   _   s\     H??3<<0
  (9(B(BC(( Y  	s    A AAvalueconsoler)   overflowr-   cropindent_guides
max_length
max_string	max_depth
expand_allc	                    SSK Jn	  SSKJn
  [	        U [
        5      (       d  U c  g U=(       d
    [        5       nUR                  (       aV  / SQnU H9  n[        XS 5      n[        R                  " U5      (       d  M,   U" 5       nUc  M9    g    U	" U [        5      (       a  g [	        X
5      (       a  UR                  5         UR                  [	        U [        5      (       a  U O[!        U UUUUUUSS9USS9  g ! [         a     M  f = f)	Nr   )is_object_one_of_types)ConsoleRenderable)_repr_html__repr_markdown__repr_json__repr_latex__repr_jpeg_
_repr_png_
_repr_svg__repr_mimebundle_   )rO   rQ   rR   rS   rT   rU   marginT)rP   new_line_start)_inspectrW   rN   rX   _safe_isinstancer&   r   
is_jupytergetattrrF   ismethodrB   JUPYTER_CLASSES_TO_NOT_RENDERlineprintr!   Pretty)rM   rN   rO   rP   rQ   rR   rS   rT   rU   rW   rX   ipython_repr_methodsrepr_methodmethodrepr_results                  r7   _ipy_display_hookrq   s   s    1* 011U]&G	 
 0KU6F''"((K * 0" "%)FGG 11MME>22 	'!!!	
   ! ! s   =C77
DDclass_or_tuple.c                 :     [        X5      $ ! [         a     gf = f)zFisinstance can fail in rare cases, for example types with no __class__F)
isinstancerB   )r/   rr   s     r7   re   re      s$    #.. s   
 
c           	      8  ^ ^^^^^^^^ SSK Jm  T =(       d    T" 5       m T c   eS[        SS4U UUUUUUU4S jjn [        5       n	SSKJn
   " UUUUUUU4S jS	U
5      nU" 5       nXR                  R                  S
'   g! [         a    U[        l
         gf = f)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   NrM   r0   c                    > U bP  Tc   eS[         l        TR                  [        U [        5      (       a  U O[        U TTTTTTS9TS9  U [         l        gg)z?Replacement sys.displayhook which prettifies objects with Rich.N)rO   rQ   rR   rS   rT   rU   )rP   )builtins_rk   re   r!   rl   )	rM   rN   rP   rU   rQ   rT   rR   rS   rO   s	    r7   display_hookinstall.<locals>.display_hook   so    &&&HJMM#E>:: %"/))')    HJ# r9   )BaseFormatterc                   J   > \ rS rSr% Sr\\S'   S\S\4U UUUUUU4S jjrSr	g)	zinstall.<locals>.RichFormatter   TpprintrM   r0   c                 f   > U R                   (       a  [        UT" 5       TTTTTTS9$ [        U5      $ )N)rN   rO   rQ   rR   rS   rT   rU   )r~   rq   repr)	selfrM   rU   r   rQ   rT   rR   rS   rO   s	     r7   __call__'install.<locals>.RichFormatter.__call__  s=    ;;, +!)&3#-#-"+#-	 	  ;&r9    N)
__name__
__module____qualname____firstlineno__r~   bool__annotations__r   r   __static_attributes__)rU   r   rQ   rT   rR   rS   rO   s   r7   RichFormatterinstall.<locals>.RichFormatter   s*    FD'c 'c ' ' 'r9   r   z
text/plain)richr   r   get_ipythonIPython.core.formattersr{   display_formatter
formattersrB   sysdisplayhook)rN   rO   rP   rQ   rR   rS   rT   rU   ry   ipr{   r   rich_formatterr   s   ````````     @r7   installr      s    0 !&GC D  *']9	' 	'M 	'& '8F''5 '&'s   AB BBc                       \ rS rSrSr SSSSSSSSSSSSS.S\S	\S
   S\S\S   S\S   S\\   S\S\\   S\\   S\\   S\S\S\SS4S jjjr	      SS jr
      SS jrSrg) rl   i  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   Fr   )indent_sizejustifyrO   no_wraprQ   rR   rS   rT   rU   rb   insert_line_objecthighlighterr+   r   r   r,   rO   r-   r   rQ   rR   rS   rT   rU   rb   r   r0   c                    Xl         U=(       d
    [        5       U l        X0l        X@l        XPl        X`l        Xpl        Xl        Xl	        Xl
        Xl        Xl        Xl        g N)r   r$   r   r   r   rO   r   rQ   rR   rS   rT   rU   rb   r   )r   r   r   r   r   rO   r   rQ   rR   rS   rT   rU   rb   r   s                 r7   __init__Pretty.__init__+  sS    " &;/*;&294<*$$"$&r9   c           
   #     #    [        U R                  UR                  U R                  -
  U R                  U R
                  U R                  U R                  U R                  S9n[        R                  " UU R                  =(       d    UR                  U R                  =(       d    UR                  [        U R                  UR                  5      SS9nU(       a  U R                  U5      O[        [!        U R                  5       S3SS9nU R"                  (       a+  UR$                  (       d  UR'                  U R                  SS9nU R(                  (       a
  SU;   a  S	v   Uv   g 7f)
N	max_widthr   rR   rS   rT   rU   pretty)r   rO   r   stylez.__repr__ returned empty stringz
dim italic)r   zrepr.indent
 )pretty_reprr   r   rb   r   rR   rS   rT   rU   r(   	from_ansir   rO   r    r   r   r5   rQ   
ascii_onlywith_indent_guidesr   )r   rN   options
pretty_strpretty_texts        r7   __rich_console__Pretty.__rich_console__J  s#     !LL''$++5((nn

 nnLL3GOO]]6g&6&6dllGOO<
  [)%&&EF" 	 g&8&8%88   9 K  3Hs   E'E)c           	          [        U R                  UR                  U R                  U R                  U R
                  U R                  S9nU(       a   [        S UR                  5        5       5      OSn[        XD5      $ )N)r   r   rR   rS   rU   c              3   8   #    U  H  n[        U5      v   M     g 7fr   r"   .0rj   s     r7   	<genexpr>*Pretty.__rich_measure__.<locals>.<genexpr>y  s     C+B4+B   r   )
r   r   r   r   rR   rS   rU   max
splitlinesr'   )r   rN   r   r   
text_widths        r7   __rich_measure__Pretty.__rich_measure__m  sn     !LL''((

 HRCC:+@+@+BCCWX 	 :22r9   )r   rU   r   rQ   r   r   r   rb   rT   rR   rS   r   rO   r   )rN   r)   r   r*   r0   r.   )rN   r)   r   r*   r0   r'   )r   r   r   r   __doc__r   r   intr   r   r   r   r   r   r9   r7   rl   rl     s   , 48'
 -1/3"'#$($(#' !'' /0'
 ' /*' +,' $' ' SM' SM' C=' ' ' '  
!'>! !+;!	!F3 3+;3	3r9   rl   r   c                 H    SU R                   < S3SSU R                   < S34$ )Nzdefaultdict(z, {})z, {}))default_factoryr   s    r7   _get_braces_for_defaultdictr   ~  s5    
w..16
w..19 r9   z
array[Any]c                 H    SU R                   < S3SSU R                   < S34$ )Nzarray(z, [])))typecoder   s    r7   _get_braces_for_arrayr     s0    W%%(,dfW=M=M<PPQ4RSSr9   c                     g)N)z	environ({r   zenviron({})r   r   s    r7   <lambda>r     s    !Cr9   c                     g)N)z	Counter({r   z	Counter()r   r   s    r7   r   r     s    =r9   c                     g)N)zdeque([r   zdeque()r   r   s    r7   r   r     s    7r9   c                     gN){}z{}r   r   s    r7   r   r         *r9   c                     gr   r   r   s    r7   r   r         .r9   c                     g)N)zfrozenset({r   zfrozenset()r   r   s    r7   r   r     s    Cr9   c                     gN)[]z[]r   r   s    r7   r   r     r   r9   c                     gr   r   r   s    r7   r   r     r   r9   c                     g)N)r   r   zset()r   r   s    r7   r   r     s    ,r9   c                     g)N)(r   ()r   r   s    r7   r   r     s    +r9   c                     g)N)zmappingproxy({r   zmappingproxy({})r   r   s    r7   r   r     s    &Rr9   _BRACESc                     [        U [        5      =(       d0    [        U 5      =(       d    [        U S5      =(       d    [	        U 5      =(       a    [        U 5      (       + $ )z3Check if an object may be expanded by pretty print.__rich_repr__)re   _CONTAINERSr   hasattrr8   r   r6   s    r7   is_expandabler     sO     	k* 	 	 C)	  3	
 cl
r9   c            	          \ rS rSr% SrSr\\S'   Sr\\S'   Sr	\\S'   Sr
\\S'   Sr\\S'   S	r\\S
'   S	r\\S'   S	r\\S'   Sr\\S       \S'   SrSr\\S'   S\\   4S jrS\S\S\4S jrS\4S jr SS\S\S\S\4S jjrSrg)Nodei  z4A 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: z, 	separatorr0   c              #     #    U R                   (       a  U R                   v   U R                  v   U R                  (       a  U R                  v   gU R                  b  U R                  (       a  U R                  v   U R
                  (       aT  U R                  (       dC  [        U R                  5      S:X  a*  U R                  S   R                  5        Sh  vN   Sv   OLU R                   H<  nUR                  5        Sh  vN   UR                  (       a  M.  U R                  v   M>     U R                  v   gU R                  v   gg Nt NJ7f)zGenerate tokens for this node.Nr   r   ,)r   key_separatorr   r   r   r   r   leniter_tokensr   r   r   r   )r   childs     r7   r   Node.iter_tokens  s     ==--$$$??//!]]&}}oo%==););DMM@RVW@W#}}Q/;;===I!%#(#4#4#666$zzz"&..0 "/ &&&jj  ' > 7s*   CEE+EEE2EEstart_lengthrR   c                 `    UnU R                  5        H  nU[        U5      -  nX2:  d  M    g   g)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   rR   total_lengthtokens        r7   check_lengthNode.check_length  s8     $%%'EHUO+L( ( r9   c                 D    SR                  U R                  5       5      nU$ Nr   )joinr   )r   	repr_texts     r7   __str__Node.__str__  s    GGD,,./	r9   r   r   rU   c                 L   [        U SS9/nSnU[        U5      :  ao  XE   nUR                  (       aD  UR                  (       d3  U(       d  UR	                  U5      (       d  UR                  U5      XEUS-   & US-  nU[        U5      :  a  Mo  SR                  S U 5       5      nU$ )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_rootr   r   r   c              3   8   #    U  H  n[        U5      v   M     g 7fr   )strr   s     r7   r   Node.render.<locals>.<genexpr>  s     954SYY5r   )_Liner   
expandableexpandedr   expandr  )r   r   r   rU   linesline_norj   repr_strs           r7   renderNode.render  s     D$/0E
">Dt}}T%6%6y%A%A37;;{3KEGaK0qLG E
" 999599r9   r   )P   r   F)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  r   r   r9   r7   r   r     s    >HcJJKE3OD$HdM4'+HhtF|$+MIs!Xc] !, # $ " 
 MR03EI	 r9   r   c                       \ rS rSr% SrSr\S    \S'   Sr\	\S'   Sr
\\   \S'   Sr\\S	'   Sr\\S
'   Sr\\S'   Sr\	\S'   Sr\	\S'   \S\	4S j5       rS\S\	4S jrS\S\S    4S jrS\4S jrSrg)r  i  zA line in repr output.NparentFr	  r  r   textsuffix
whitespacer  r   r0   c                 j    [        U R                  SL=(       a    U R                  R                  5      $ )z"Check if the line may be expanded.N)r   r  r   r   s    r7   r  _Line.expandable	  s'     DIIT)@dii.@.@AAr9   rR   c                     [        U R                  5      [        U R                  5      -   [        U R                  5      -   nU R
                  c   eU R
                  R                  X!5      $ )z4Check this line fits within a given number of cells.)r   r  r#   r  r  r  r   )r   rR   r   s      r7   r   _Line.check_length  sX      8DII#66$++9NN 	 yy$$$yy%%l??r9   r   c           	   #     #    U R                   nUc   eU R                  nUR                  (       d   eUR                  (       a1  [	        UR                   UR
                   UR                   3US9v nO[	        UR                  US9v nU R                  SU-  -   nUR                  =(       a    [        UR                  5      S:H  n[        UR                  5       H9  u  pxU(       a  SOUR                  n	[	        UUUU	U=(       a    U(       + S9n
U
v   M;     [	        UR                  UU R                  U R                  S9v   g7f)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   )r   r   r  r  new_linechild_whitespacetuple_of_oner   r   r   rj   s              r7   r  _Line.expand  s     yy__
}}}=="t'9'9&:4??:KL% H
 #JOOH??S;->>}}@T]]);q)@$T]]3KD+I+ .,.D J 4 !!!;;	
 	
s   EEc                    U R                   (       a/  U R                   U R                   U R                  =(       d    S 3$ U R                   U R                   U R                  =(       d    S U R                  R                  5        3$ r  )r   r  r  r  r  rstripr  s    r7   r  _Line.__str__7  si    99oo&tyyk$))/r1BCC ??#DII;tyyB.?@R@R@T?UVr9   r   )r   r   r   r   r   r  r   r   r	  r   r  r   r  r  r  r  r  r   propertyr  r   r   r   r  r  r   r   r9   r7   r  r    s      $FHW$GTD(4.D#NFCJHdD$BD B B@s @t @
# 
(7*; 
B r9   r  c                      [        U SS5      n[        U [        5      =(       a    [        U[        5      $ ! [         a     gf = f)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)rg   rB   rt   tuple)r/   r
   s     r7   _is_namedtupler.  @  sD    i. c5!?j&??  s   6 
AAc           	         ^^^^^^^^	 S[         S[        4U4S jjm[        5       m	T	R                  mT	R                  mS	S[         S[
        S[        S[        4UUUUUUU	4S jjjmT" U SS9nU$ )
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.
r/   r0   c                    > TbE  [        U [        [        45      (       a*  [        U 5      T:  a  [        U 5      T-
  nU ST < SU 3nU$  [	        U 5      nU$ ! [
         a  nS[        U5      < S3n SnAU$ SnAff = f)z0Get repr string for an object, but catch errors.N+z<repr-error >)re   bytesr  r   r   rB   )r/   	truncatedobj_reprerrorrS   s       r7   to_reprtraverse.<locals>.to_reprh  s     " ucl33C:%C:-Ikz*-Qyk:H 	:9   :)#e*q9:s   A 
A="A88A=rootdepthc           	      D  >^ ^# [        T 5      nUT*;   a	  [        SS9$ [        T 5      n[        R                  R
                  [        R                  R                  4nT%SL=(       a    UT%:  nS[        S[        [        [        [        [        [        4   4      4S jn [        T S5      nSn	U(       d2   [        T S	5      (       a   [        T 5      (       d  T R                  5       n	U	GbC  T(" U5        [!        T R                  S
S5      n
[#        U" U	5      5      nT R$                  R&                  nU(       a  / nUR(                  nU(       a"  U
(       a  [        SU S3S9nO[        U S3S9nOU
(       a  [        SU S3SUUSS9nO[        U S3SUUS9n[+        U5       Hb  u  nn[-        U[.        5      (       a.  Uu  nnT$" UUS-   S9nUUl        UUl        SUl        U" U5        MI  T$" UUS-   S9nUUl        U" U5        Md     O[        U
(       a  SU S3OU S3/ US9nT'" U5        GO)[7        T 5      (       GaJ  U(       GdB  T(" U5        / nUR(                  n[9        T 5      m#T#(       a  U(       a!  [        T R$                  R&                   S3S9nO[        T R$                  R&                   S3SUUS9nS[        [        [        [        [:        [<        [        /[        4      4      4U#U 4S jjn[+        U" 5       5       HQ  u  nu  nnnU(       a  [        [        U" U5      5      S9nO
T$" UUS-   S9nUUl        UUl        SUl        U" U5        MS     O"[        T R$                  R&                   S3/ US9nT'" U5        GO[?        T 5      (       Ga  [-        T [        5      (       d  U(       d  [A        T 5      (       d  US:X  a  T(" U5        / nUR(                  nU(       a!  [        T R$                  R&                   S3S9nO[        T R$                  R&                   S3SUUS9n[+        S [C        T 5       5       5       HK  u  nnT$" [!        T URD                  5      US-   S9nURD                  Ul        UUl        SUl        U" U5        MM     T'" U5        GO[G        T 5      (       a  [I        T 5      (       a  T(" U5        T R$                  R&                  nU(       a  [        U S3S9nO{/ nUR(                  n[        U S3SUU S3S9n[+        T RK                  5       RM                  5       5       H0  u  nu  nnT$" UUS-   S9nUUl        UUl        SUl        U" U5        M2     T'" U5        GO[-        T [N        5      (       Ga  [N         H  n[-        T U5      (       d  M  Un  O   T(" U5        [P        U   " T 5      u  nnnU(       a  [        U SU 3S9nGO\URR                  [        T 5      RR                  :w  a  [        T)" T 5      US9nGO'T (       Ga  / n[        UUUUS9nUR(                  n[U        T 5      nUS-
  n[-        T [V        5      (       aj  [Y        T RM                  5       5      n T&b  [[        U T&5      n []        U 5       H2  u  n!u  nnT$" UUS-   S9nT)" U5      Ul        U!U:H  Ul        U" U5        M4     OK[Y        T 5      n"T&b  [[        U"T&5      n"[]        U"5       H"  u  n!nT$" UUS-   S9nU!U:H  Ul        U" U5        M$     T&b  UT&:  a  U" [        SUT&-
   3SS95        O[        U/ US 9nT'" U5        O[        T)" T 5      US9n[-        T [.        5      Ul/        [G        T 5      Ul0        U$ ! [         a    Sn GNf = f! [         a     GNf = f)!zWalk the object depth first.z...)r   N	rich_argsr0   c              3      #    U  Hr  n[        U[        5      (       aV  [        U5      S:X  a  Uu  p#nXC:X  a  M3  X#4v   M:  [        U5      S:X  a  Uu  p#X#4v   MT  [        U5      S:X  a	  US   v   Ml  Mn  Uv   Mt     g 7f)N      r   r   )re   r-  r   )r<  argkeyr   defaults        r7   iter_rich_args3traverse.<locals>._traverse.<locals>.iter_rich_args  s|      #C//3x1}.1+G"+$!j(SQ%(
!j(SQ!!f ' I !s   A:A<,awehoi234_wdfjwljet234_234wdfoijsdfmmnxpi492Fr   angular<z...>z(...)r"  r2  )r   r   r   r   r   r   r   )r   r   r   r   r   )r:  =r   )r   r   r   c               3   4  >#    T Hd  n U R                   (       d  M   [        TU R                  5      nU R                  U[        U R                   5      (       a  U R                   OS4v   Mf     g! [         a  nU R                  US4v    SnAM  SnAff = f7f)z$Iterate over attr fields and values.N)r   rg   namecallablerB   )attrrM   r6  attr_fieldsr/   s      r7   
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A/<B/
B9B
BBB)r>     c              3   J   #    U  H  oR                   (       d  M  Uv   M     g 7fr   )r   )r   fields     r7   r   .traverse.<locals>._traverse.<locals>.<genexpr>  s      -'2ejjEE{s   #	#)r   r   r   r   )r   r   z... +T)r   r   r   )1idr   r5   r   version_infomajorminorr   r   r   r   r  r   rB   r   r   rg   list	__class__r   appendr   re   r-  r   r   r   r8   r;   r   r   r   rC   r
   rJ  r.  rL   _asdictitemsr   r   r=   r   _MAPPING_CONTAINERSiterr   	enumerater   r   )+r/   r9  r:  obj_idobj_type
py_versionreached_max_depthrC  fake_attributesrich_repr_resultrF  args
class_namer   rZ  r  r   r@  rA  r   
child_noderN  rJ  rM   repr_callablerR  container_typer   r   r   	num_itemslast_item_index
iter_itemsindexiter_valuesrM  	_traverserT   rR   pop_visitedpush_visitedr7  visited_idss+   `                                  @r7   rp  traverse.<locals>._traverse|  s    C[ 5))9&&,,c.>.>.D.DE
%T1Hey6H	c 	huS%S/=Q7R.S 	 	$%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&c33%*1E(FFG) & &$ ?H
>U::tUM()-]5=Q9R)SJ)25	)JJ*.
.2
+36
0z* ?V "%--"8"8!9<rPT $S$//##C((J&,@ H__F #--*@*@)A'GH"%--"8"8!9; #%	 $- -'-c{- $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(e4+C0q  	$#O	$  s$    ]> 61^ >^^
^^T)r9  )Fr   )r   r  setaddremover   r   r   )
r   rR   rS   rT   r  rp  rq  rr  r7  rs  s
    ``` @@@@@r7   traverserx  S  ss    *S S    EK??L$$Kys y$ ys y4 y yv W4(DKr9   r  r   r   r   r   c                j    [        U [        5      (       a  U nO
[        XXES9nUR                  XUS9nU$ )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.
)rR   rS   rT   )r   r   rU   )re   r   rx  r  )	r   r   r   rR   rS   rT   rU   r  r  s	            r7   r   r   {  sF    8 &&z
 KK   H Or9   )rN   rQ   rR   rS   rT   rU   c                \    Uc
  [        5       OUnUR                  [        U UUUUUSS9SS9  g)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)rR   rS   rT   rQ   rU   rO   T)	soft_wrap)r   rk   rl   )r   rN   rQ   rR   rS   rT   rU   _consoles           r7   r~   r~     sD    , !({}WHNN!!'!	
   r9   __main__c                   "    \ rS rSrS\4S jrSrg)
BrokenRepri  r0   c                     SS-    g)Nr   r   zthis will failr   r  s    r7   r=   BrokenRepr.__repr__  s    E#r9   r   Nr   r   r   r   r  r=   r   r   r9   r7   r  r    s    	$c 	$r9   r  )
NamedTuplec                   N    \ rS rSr% \\S'   \\S'   \\S'   \\S'   \\   \S'   Srg)	StockKeepingUniti  rJ  descriptionpricecategoryreviewsr   N)	r   r   r   r   r  r   floatr   r   r   r9   r7   r  r    s!    	cr9   r     foozHello World!gZd;Y@gʡE3t@g    cA>   r   r?  r>  r   r  rP        >   r   r?  r>  crumble)applerhubarbbuttersugarflour)r  orangepearkumquatr  X  duriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurian)FTNzSparkling British Spring WaterzCarbonated spring waterg?waterzits amazing!zits terrible!)r  barr   counteratomic
namedtupleBroken)rk   c                   "    \ rS rSrS\4S jrSrg)Thingi  r0   c                     g)NzHello[38;5;239m World!r   r  s    r7   r=   Thing.__repr__  s    /r9   r   Nr  r   r9   r7   r  r    s    	0c 	0r9   r  )Nr{  FFNNNF)NNN)orw   collectionsr@   rF   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   	rich.reprr   rL  r3   r2   ImportErrorr   r   _loopr   _pickr    abcr!   cellsr#   r   r$   jupyterr%   r&   measurer'   r  r(   rN   r)   r*   r+   r,   r-   r.   ri   r   r8   r;   objectrC   r  rD   rL   r   rq   r5   re   r   rl   r  r   r   _Environdict	frozensetrX  ru  r-  r   r   keysr   r]  r   r   r  r.  rx  r   r~   r   r  r  r  ddatarZ  r   rk   r  r   r9   r7   <module>r     s       	 
  G G 7 7   "    %J      ( 4     ! 6 6 6
@# @(+H"I @
F t "  **+>C )f ) ), $(!) $ $#HHi H H 	H
 H H H }H H 
HV	!&tU49-='=!>	 $(!) $ $#L'i L'L' L' 	L'
 L' L' }L' L' 
L'^d3\ d3NS#X)> 5cSVCW T< TE#sC-4H T
 KKC	 ,=	7
*.C
*.	,	+R>dHcUE#sC-$8899	:  GLLN#R[[*:HE s t  Q Q Qh @ @ @F@ @ @* !% $#	eee e }	e
 
eV	  $ $#%% % 	%
 % % }% % 	%V $( $ $#"" i " 	"
 " " }" " 
"J z$ $
 ":  	CAAeH &
 #"9NO
 	
 &&,%_-
 ,? DB 	Kt0 0 
&/{ M  Js   -M MM