o
    j+                     @   s  d 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 ddlmZ dgZi edededejded	ejde
jd
ejdejdejdejdejdejdejdejdejdejdede	d	ejdejdej dej!dejdediZ"i dddddddddddd d!d"d#d$d%d$d&d'd(d)d*d)d+d,d-d.d/d.d0d1d2d3d4d5dZ#d6d7 Z$G d8d deZ%d9S ):z
    pygments.formatters.irc
    ~~~~~~~~~~~~~~~~~~~~~~~

    Formatter for IRC output

    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
    )	Formatter)
KeywordNameCommentStringErrorNumberOperatorGenericToken
Whitespace)get_choice_optIRCFormatter) r   )graybrightblack)cyan
brightcyan)blue
brightblue)magentar   )greenbrightgreen)Z_cyan_Z_brightcyan_)Z_green_Z_brightgreen_)r   r   )red	brightred)r   r   )yellowr   )r   r   )**r   )z	*magenta*z*brightmagenta*)_brightred_r   whiteblack   r      r      r      r      r      Zorange   r   Zbrightyellow   Z
lightgreen	   r   r   
   Z	lightblue   r   r      Zbrightmagenta         c                 C   s   t | dk r|S d }}d| v r|d7 }d| }| d} d| v r.|d7 }d| }| d} t | dkrE|dtt|  d	 7 }d| }|| | S )
Nr    r   _*r   r!   )lenstripstrIRC_COLOR_MAPzfill)colortextaddsub r=   X/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/pygments/formatters/irc.py	ircformatL   s   

r?   c                   @   s8   e Zd ZdZdZddgZg Zdd Zdd Zdd	 Z	d
S )r   aS  
    Format tokens with IRC color sequences

    The `get_style_defs()` method doesn't do anything special since there is
    no support for common styles.

    Options accepted:

    `bg`
        Set to ``"light"`` or ``"dark"`` depending on the terminal's background
        (default: ``"light"``).

    `colorscheme`
        A dictionary mapping token types to (lightbg, darkbg) color names or
        ``None`` (default: ``None`` = use builtin colorscheme).

    `linenos`
        Set to ``True`` to have line numbers in the output as well
        (default: ``False`` = no line numbers).
    ZIRCircc                 K   sT   t j| fi | t|dddgddk| _|dd pt| _|dd| _d| _d S )NbgZlightZdarkcolorschemelinenosFr   )	r   __init__r   darkbgget
IRC_COLORSrB   rC   _lineno)selfoptionsr=   r=   r>   rD   y   s   
zIRCFormatter.__init__c                 C   s,   | j r|  jd7  _|d| j  d S d S )Nr    z%04d: )rC   rH   write)rI   outfiler=   r=   r>   _write_lineno   s   zIRCFormatter._write_linenoc                 C   s   |  | |D ][\}}| j|}|d u r%|d d }| j|}|d u s|r]|| j }|d}|d d D ]}|rC|t|| |d |  | q7|d r\|t||d  q|| qd S )N
)rM   rB   rF   rE   splitrK   r?   )rI   ZtokensourcerL   ttypevaluer9   Zsplliner=   r=   r>   format_unencoded   s(   



zIRCFormatter.format_unencodedN)
__name__
__module____qualname____doc__namealiases	filenamesrD   rM   rT   r=   r=   r=   r>   r   `   s    N)&rX   Zpygments.formatterr   Zpygments.tokenr   r   r   r   r   r   r	   r
   r   r   Zpygments.utilr   __all__PreprocTypeWordBuiltinFunction	NamespaceClass	Exception	DecoratorVariableConstant	AttributeTagDeletedInsertedHeading
SubheadingrG   r7   r?   r   r=   r=   r=   r>   <module>   s    
0	
 	
