
    f                       U d Z ddlmZ ddlmZmZmZ ddlmZm	Z	m
Z
 g dZ G d de
      Z	  eddd	d	d	d	d	d	d	
	      Zg dZddddddddddd
Zded<    eej%                               j'                   ee            sJ  eej)                                ee      z  rJ  G d de      Z G d de      Z G d de      Zy )!z#
The base classes for the styling.
    )annotations)ABCMetaabstractmethodabstractproperty)CallableHashable
NamedTuple)AttrsDEFAULT_ATTRSANSI_COLOR_NAMESANSI_COLOR_NAMES_ALIASES	BaseStyle
DummyStyleDynamicStylec                  h    e Zd ZU ded<   ded<   ded<   ded<   ded<   ded<   ded	<   ded
<   ded<   y)r
   z
str | Nonecolorbgcolorzbool | Nonebold	underlinestrikeitalicblinkreversehiddenN)__name__
__module____qualname____annotations__     U/var/www/cvtools/html/venv/lib/python3.12/site-packages/prompt_toolkit/styles/base.pyr
   r
      s8    
r    r
    F)	r   r   r   r   r   r   r   r   r   )ansidefault	ansiblackansired	ansigreen
ansiyellowansiblueansimagentaansicyanansigrayansibrightblackansibrightredansibrightgreenansibrightyellowansibrightblueansibrightmagentaansibrightcyan	ansiwhiter,   r*   r2   r'   r)   r1   r+   r%   r&   r(   )
ansidarkgrayansitealansiturquoise	ansibrown
ansipurpleansifuchsiaansilightgrayansidarkredansidarkgreenansidarkbluezdict[str, str]r   c                  T    e Zd ZdZeef	 	 	 	 	 dd       Zedd       Zedd       Z	y)	r   z8
    Abstract base class for prompt_toolkit styles.
    c                     y)a  
        Return :class:`.Attrs` for the given style string.

        :param style_str: The style string. This can contain inline styling as
            well as classnames (e.g. "class:title").
        :param default: `Attrs` to be used if no styling was defined.
        Nr   self	style_strdefaults      r!   get_attrs_for_style_strz!BaseStyle.get_attrs_for_style_strr       r    c                    g S )z
        The list of style rules, used to create this style.
        (Required for `DynamicStyle` and `_MergedStyle` to work.)
        r   rA   s    r!   style_ruleszBaseStyle.style_rules~   s	     	r    c                     y)z
        Invalidation hash for the style. When this changes over time, the
        renderer knows that something in the style changed, and that everything
        has to be redrawn.
        Nr   rG   s    r!   invalidation_hashzBaseStyle.invalidation_hash   rE   r    NrB   strrC   r
   returnr
   rM   zlist[tuple[str, str]]rM   r   )
r   r   r   __doc__r   r   rD   r   rH   rJ   r   r    r!   r   r   m   s^     /<		',			 	    r    r   )	metaclassc                  @    e Zd ZdZef	 	 	 	 	 ddZddZedd       Zy)	r   z.
    A style that doesn't style anything.
    c                    |S Nr   r@   s      r!   rD   z"DummyStyle.get_attrs_for_style_str   s	     r    c                     y)N   r   rG   s    r!   rJ   zDummyStyle.invalidation_hash   s    r    c                    g S rT   r   rG   s    r!   rH   zDummyStyle.style_rules   s    	r    NrK   rO   rN   )	r   r   r   rP   r   rD   rJ   propertyrH   r   r    r!   r   r      sB    
 0=',	
  r    r   c                  H    e Zd ZdZddZef	 	 	 	 	 ddZd	dZed
d       Z	y)r   z
    Style class that can dynamically returns an other Style.

    :param get_style: Callable that returns a :class:`.Style` instance.
    c                0    || _         t               | _        y rT   )	get_styler   _dummy)rA   r[   s     r!   __init__zDynamicStyle.__init__   s    " lr    c                b    | j                         xs | j                  }|j                  ||      S rT   )r[   r\   rD   )rA   rB   rC   styles       r!   rD   z$DynamicStyle.get_attrs_for_style_str   s,      /DKK,,Y@@r    c                Z    | j                         xs | j                  j                         S rT   )r[   r\   rJ   rG   s    r!   rJ   zDynamicStyle.invalidation_hash   s!     /DKKBBDDr    c                R    | j                         xs | j                  j                  S rT   )r[   r\   rH   rG   s    r!   rH   zDynamicStyle.style_rules   s     /DKK<<<r    N)r[   zCallable[[], BaseStyle | None]rK   rO   rN   )
r   r   r   rP   r]   r   rD   rJ   rX   rH   r   r    r!   r   r      sL    #
 0=AA',A	AE = =r    r   N)rP   
__future__r   abcr   r   r   typingr   r   r	   __all__r
   r   r   r   r   setvaluesissubsetkeysr   r   r   r   r    r!   <module>rj      s   # 9 9 1 1	J 	
 
	

$ : &%& , .  #**,-66s;K7LM MM(--/037G3HH II' D $=9 =r    