
    f                     n   U d dl Z d dlZd dlmZ d dlmZmZ dad Z	 e j                  dk(  re
d dlmZmZ d dlmZ d	 Z	  e       Z e       Z e       ZdZdZdZdZeeeegdf      ed<   d a ej                         ad Zd Zedd       ZdddZdddZd Z d Z!y# e
$ r  G d
 d      ZY rw xY w)    N)contextmanager)CallableOptionalFc                       y)z
    Lazily init colorama if necessary, not to screw up stdout if debugging is
    not enabled.

    This version of the function does nothing.
    N r       E/var/www/cvtools/html/venv/lib/python3.12/site-packages/jedi/debug.py_lazy_colorama_initr
   	   s    r   nt)Foreinit)
initialisec                  l    t         sdt        _        	 t        d       da yda y# t        $ r Y da yw xY w)z
            Lazily init colorama if necessary, not to screw up stdout is
            debug not enabled.

            This version of the function does init colorama.
            TF)stripN)_initedr   atexit_doner   	Exceptionr   r   r	   r
   r
      sD      *.
&u%
 GdG	 !  G	s   % 	33c                   $    e Zd ZdZdZdZdZdZdZy)r    N)	__name__
__module____qualname__REDGREENYELLOWMAGENTARESETBLUEr   r   r	   r   r   1   s     r   r   debug_functionc                  0    t        j                          aday )Nr   )time_start_time_debug_indentr   r   r	   
reset_timer$   G   s    ))+KMr   c                       fd}|S )zDecorator for makin c                  T    t               5   | i |cd d d        S # 1 sw Y   y xY wN)increase_indent_cm)argskwargsfuncs     r	   wrapperz increase_indent.<locals>.wrapperO   s+    ! 	)((	) 	) 	)s   'r   )r+   r,   s   ` r	   increase_indentr-   M   s    ) Nr   c              #      K   | rt        d| z   |       t        dz  a	 d  t        dz  a| rt        d| z   |       y y # t        dz  a| rt        d| z   |       w w xY ww)NzStart: color   zEnd: )dbgr#   )titler0   s     r	   r(   r(   U   so      IU+QM.%u-  	%u- s   A!A  A! AA!r   r/   c          	          |sJ t         r@t        r9dt        z  }t                t        ||dz   | t	        d |D              z  z          yyy)zB Looks at the stack, to see if a debug message should be printed.  zdbg: c              3   2   K   | ]  }t        |        y wr'   repr.0as     r	   	<genexpr>zdbg.<locals>.<genexpr>j   s     ;RDG;R   N)r   enable_noticer#   r
   tuple)messager0   r)   is       r	   r2   r2   c   sH    L5--ua'kGe;RT;R6R,RRS (~r   T)formatc                    t         r:t        r3dt        z  }|r| t        d |D              z  } t        d|dz   | z          y y y )Nr5   c              3   2   K   | ]  }t        |        y wr'   r7   r9   s     r	   r<   zwarning.<locals>.<genexpr>q   s     %<!d1g%<r=   r   z	warning: )r   enable_warningr#   r?   )r@   rB   r)   rA   s       r	   warningrF   m   sC    .-%<t%< <<Gua+o78	 )~r   c                     t         rCt        r<t        j                         }dt        z  }t        d|dz   | d|t        z
  z          y y y )Nr5   r   zspeed: )r   enable_speedr!   r#   r"   )namenowrA   s      r	   speedrK   u   s@    ,iik-xYD#BS1T!TU '~r   c                 v    t        t        |       }t                t        ||z   t        j                  z          y)z
    The default debug function that prints to standard out.

    :param str color: A string that is an attribute of ``colorama.Fore``.
    N)getattrr   r
   printr   )r0   str_outcols      r	   print_to_stdoutrQ   |   s+     $
C	#-$**
$%r   )Nr   )"osr!   
contextlibr   typingr   r   r   r
   rI   ImportErrorcoloramar   r   r   objectNOTICEWARNINGSPEEDrH   rE   r>   r   str__annotations__r#   r"   r$   r-   r(   r2   rF   rK   rQ   r   r   r	   <module>r]      s    	  % %
%	ww$ 	('	< 

( 8<3*d"234 ;diik 
. 
. & T $( 9V&Y   s   "B" "B43B4