
    5hq                     2   S 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  SSK	J
r
JrJr  SSKJrJrJr   SSKrS/r\" S5      S	\" S
5      S\" S5      S\" S5      S\" S5      S0r\4S jrS rS rSrS\-   S-   rSrSr " S S\5      rg! \ a    Sr N]f = f)z
pygments.formatters.html
~~~~~~~~~~~~~~~~~~~~~~~~

Formatter for HTML output.

:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
    N)StringIO)	Formatter)TokenTextSTANDARD_TYPES)get_bool_optget_int_optget_list_optHtmlFormatter&z&amp;<z&lt;>z&gt;"z&quot;'z&#39;c                 $    U R                  U5      $ )z<Escape &, <, > as well as single and double quotes for HTML.)	translate)texttables     c/var/www/html/cementerio_25MayoBackend/env/lib/python3.13/site-packages/pygments/formatters/html.pyescape_htmlr   &   s    >>%      c                    U R                  S5      (       d  U R                  S5      (       a  U $ U R                  5       n [        U 5      S:X  a6  U S   U S   :X  a*  U S   U S   :X  a  U S   U S	   :X  a  S
U S    U S    U S    3$ S
U  3$ )Ncalcvar   r                  #)
startswithupperlen)colors    r   webifyr&   +   s    5#3#3E#:#: J!OqU1X%qU1X%qU1X%uQxjq
58*55ug;r   c                     [         R                  " U 5      nU(       a  U$ SnUc2  SU S   -   U-   nU R                  n [         R                  " U 5      nUc  M2  X-   $ )N -)r   getparent)ttypefnameanames      r   _get_ttype_classr0   :   s`    u%EE
-eBi%'""5) - =r   z/*
generated by Pygments <https://pygments.org/>
Copyright 2006-2025 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
*/
%(styledefs)s
a  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<!--
generated by Pygments <https://pygments.org/>
Copyright 2006-2025 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
-->
<html>
<head>
  <title>%(title)s</title>
  <meta http-equiv="content-type" content="text/html; charset=%(encoding)s">
  <style type="text/css">
z/
  </style>
</head>
<body>
<h2>%(title)s</h2>

a5  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html>
<head>
  <title>%(title)s</title>
  <meta http-equiv="content-type" content="text/html; charset=%(encoding)s">
  <link rel="stylesheet" href="%(cssfile)s" type="text/css">
</head>
<body>
<h2>%(title)s</h2>

z</body>
</html>
c                   "   \ rS rSrSrSrS/rSS/rS rS r	S	 r
S
 rS rS'S jrS'S jrS'S jrS rS r\S 5       r\S 5       r\S 5       rS rS rS rS rS rS rS rS rS r\R@                  " SS9S  5       r!S! r"S" r#S# r$S$ r%S% r&S&r'g)(r   y   a:)  
Format tokens as HTML 4 ``<span>`` tags. By default, the content is enclosed
in a ``<pre>`` tag, itself wrapped in a ``<div>`` tag (but see the `nowrap` option).
The ``<div>``'s CSS class can be set by the `cssclass` option.

If the `linenos` option is set to ``"table"``, the ``<pre>`` is
additionally wrapped inside a ``<table>`` which has one row and two
cells: one containing the line numbers and one containing the code.
Example:

.. sourcecode:: html

    <div class="highlight" >
    <table><tr>
      <td class="linenos" title="click to toggle"
        onclick="with (this.firstChild.style)
                 { display = (display == '') ? 'none' : '' }">
        <pre>1
        2</pre>
      </td>
      <td class="code">
        <pre><span class="Ke">def </span><span class="NaFu">foo</span>(bar):
          <span class="Ke">pass</span>
        </pre>
      </td>
    </tr></table></div>

(whitespace added to improve clarity).

A list of lines can be specified using the `hl_lines` option to make these
lines highlighted (as of Pygments 0.11).

With the `full` option, a complete HTML 4 document is output, including
the style definitions inside a ``<style>`` tag, or in a separate file if
the `cssfile` option is given.

When `tagsfile` is set to the path of a ctags index file, it is used to
generate hyperlinks from names to their definition.  You must enable
`lineanchors` and run ctags with the `-n` option for this to work.  The
`python-ctags` module from PyPI must be installed to use this feature;
otherwise a `RuntimeError` will be raised.

The `get_style_defs(arg='')` method of a `HtmlFormatter` returns a string
containing CSS rules for the CSS classes used by the formatter. The
argument `arg` can be used to specify additional CSS selectors that
are prepended to the classes. A call `fmter.get_style_defs('td .code')`
would result in the following CSS classes:

.. sourcecode:: css

    td .code .kw { font-weight: bold; color: #00FF00 }
    td .code .cm { color: #999999 }
    ...

If you have Pygments 0.6 or higher, you can also pass a list or tuple to the
`get_style_defs()` method to request multiple prefixes for the tokens:

.. sourcecode:: python

    formatter.get_style_defs(['div.syntax pre', 'pre.syntax'])

The output would then look like this:

.. sourcecode:: css

    div.syntax pre .kw,
    pre.syntax .kw { font-weight: bold; color: #00FF00 }
    div.syntax pre .cm,
    pre.syntax .cm { color: #999999 }
    ...

Additional options accepted:

`nowrap`
    If set to ``True``, don't add a ``<pre>`` and a ``<div>`` tag
    around the tokens. This disables most other options (default: ``False``).

`full`
    Tells the formatter to output a "full" document, i.e. a complete
    self-contained document (default: ``False``).

`title`
    If `full` is true, the title that should be used to caption the
    document (default: ``''``).

`style`
    The style to use, can be a string or a Style subclass (default:
    ``'default'``). This option has no effect if the `cssfile`
    and `noclobber_cssfile` option are given and the file specified in
    `cssfile` exists.

`noclasses`
    If set to true, token ``<span>`` tags (as well as line number elements)
    will not use CSS classes, but inline styles. This is not recommended
    for larger pieces of code since it increases output size by quite a bit
    (default: ``False``).

`classprefix`
    Since the token types use relatively short class names, they may clash
    with some of your own class names. In this case you can use the
    `classprefix` option to give a string to prepend to all Pygments-generated
    CSS class names for token types.
    Note that this option also affects the output of `get_style_defs()`.

`cssclass`
    CSS class for the wrapping ``<div>`` tag (default: ``'highlight'``).
    If you set this option, the default selector for `get_style_defs()`
    will be this class.

    .. versionadded:: 0.9
       If you select the ``'table'`` line numbers, the wrapping table will
       have a CSS class of this string plus ``'table'``, the default is
       accordingly ``'highlighttable'``.

`cssstyles`
    Inline CSS styles for the wrapping ``<div>`` tag (default: ``''``).

`prestyles`
    Inline CSS styles for the ``<pre>`` tag (default: ``''``).

    .. versionadded:: 0.11

`cssfile`
    If the `full` option is true and this option is given, it must be the
    name of an external file. If the filename does not include an absolute
    path, the file's path will be assumed to be relative to the main output
    file's path, if the latter can be found. The stylesheet is then written
    to this file instead of the HTML file.

    .. versionadded:: 0.6

`noclobber_cssfile`
    If `cssfile` is given and the specified file exists, the css file will
    not be overwritten. This allows the use of the `full` option in
    combination with a user specified css file. Default is ``False``.

    .. versionadded:: 1.1

`linenos`
    If set to ``'table'``, output line numbers as a table with two cells,
    one containing the line numbers, the other the whole code.  This is
    copy-and-paste-friendly, but may cause alignment problems with some
    browsers or fonts.  If set to ``'inline'``, the line numbers will be
    integrated in the ``<pre>`` tag that contains the code (that setting
    is *new in Pygments 0.8*).

    For compatibility with Pygments 0.7 and earlier, every true value
    except ``'inline'`` means the same as ``'table'`` (in particular, that
    means also ``True``).

    The default value is ``False``, which means no line numbers at all.

    **Note:** with the default ("table") line number mechanism, the line
    numbers and code can have different line heights in Internet Explorer
    unless you give the enclosing ``<pre>`` tags an explicit ``line-height``
    CSS property (you get the default line spacing with ``line-height:
    125%``).

`hl_lines`
    Specify a list of lines to be highlighted. The line numbers are always
    relative to the input (i.e. the first line is line 1) and are
    independent of `linenostart`.

    .. versionadded:: 0.11

`linenostart`
    The line number for the first line (default: ``1``).

`linenostep`
    If set to a number n > 1, only every nth line number is printed.

`linenospecial`
    If set to a number n > 0, every nth line number is given the CSS
    class ``"special"`` (default: ``0``).

`nobackground`
    If set to ``True``, the formatter won't output the background color
    for the wrapping element (this automatically defaults to ``False``
    when there is no wrapping element [eg: no argument for the
    `get_syntax_defs` method given]) (default: ``False``).

    .. versionadded:: 0.6

`lineseparator`
    This string is output between lines of code. It defaults to ``"\n"``,
    which is enough to break a line inside ``<pre>`` tags, but you can
    e.g. set it to ``"<br>"`` to get HTML line breaks.

    .. versionadded:: 0.7

`lineanchors`
    If set to a nonempty string, e.g. ``foo``, the formatter will wrap each
    output line in an anchor tag with an ``id`` (and `name`) of ``foo-linenumber``.
    This allows easy linking to certain lines.

    .. versionadded:: 0.9

`linespans`
    If set to a nonempty string, e.g. ``foo``, the formatter will wrap each
    output line in a span tag with an ``id`` of ``foo-linenumber``.
    This allows easy access to lines via javascript.

    .. versionadded:: 1.6

`anchorlinenos`
    If set to `True`, will wrap line numbers in <a> tags. Used in
    combination with `linenos` and `lineanchors`.

`tagsfile`
    If set to the path of a ctags file, wrap names in anchor tags that
    link to their definitions. `lineanchors` should be used, and the
    tags file should specify line numbers (see the `-n` option to ctags).
    The tags file is assumed to be encoded in UTF-8.

    .. versionadded:: 1.6

`tagurlformat`
    A string formatting pattern used to generate links to ctags definitions.
    Available variables are `%(path)s`, `%(fname)s` and `%(fext)s`.
    Defaults to an empty string, resulting in just `#prefix-number` links.

    .. versionadded:: 1.6

`filename`
    A string used to generate a filename when rendering ``<pre>`` blocks,
    for example if displaying source code. If `linenos` is set to
    ``'table'`` then the filename will be rendered in an initial row
    containing a single `<th>` which spans both columns.

    .. versionadded:: 2.1

`wrapcode`
    Wrap the code inside ``<pre>`` blocks using ``<code>``, as recommended
    by the HTML5 specification.

    .. versionadded:: 2.4

`debug_token_types`
    Add ``title`` attributes to all token ``<span>`` tags that show the
    name of the token.

    .. versionadded:: 2.10


**Subclassing the HTML formatter**

.. versionadded:: 0.7

The HTML formatter is now built in a way that allows easy subclassing, thus
customizing the output HTML code. The `format()` method calls
`self._format_lines()` which returns a generator that yields tuples of ``(1,
line)``, where the ``1`` indicates that the ``line`` is a line of the
formatted source code.

If the `nowrap` option is set, the generator is the iterated over and the
resulting HTML is output.

Otherwise, `format()` calls `self.wrap()`, which wraps the generator with
other generators. These may add some HTML code to the one generated by
`_format_lines()`, either by modifying the lines generated by the latter,
then yielding them again with ``(1, line)``, and/or by yielding other HTML
code before or after the lines, with ``(0, html)``. The distinction between
source lines and other code makes it possible to wrap the generator multiple
times.

The default `wrap()` implementation adds a ``<div>`` and a ``<pre>`` tag.

A custom `HtmlFormatter` subclass could look like this:

.. sourcecode:: python

    class CodeHtmlFormatter(HtmlFormatter):

        def wrap(self, source, *, include_div):
            return self._wrap_code(source)

        def _wrap_code(self, source):
            yield 0, '<code>'
            for i, t in source:
                if i == 1:
                    # it's a line of formatted code
                    t += '<br>'
                yield i, t
            yield 0, '</code>'

This results in wrapping the formatted lines with a ``<code>`` tag, where the
source lines are broken using ``<br>`` tags.

After calling `wrap()`, the `format()` method also adds the "line numbers"
and/or "full document" wrappers if the respective options are set. Then, all
HTML yielded by the wrapped generator is output.
HTMLhtmlz*.htmlz*.htmc                    [         R                  " U 40 UD6  U R                  U R                  5      U l        [	        USS5      U l        [	        USS5      U l        UR                  SS5      U l        U R                  UR                  SS5      5      U l	        U R                  UR                  SS5      5      U l
        U R                  UR                  S	S5      5      U l        U R                  UR                  S
S5      5      U l        [	        USS5      U l        U R                  UR                  SS5      5      U l        U R                  UR                  SS5      5      U l        U R                  UR                  SS5      5      U l        [	        USS5      U l        0 U l        [	        USS5      U l        U R                  (       a;  [(        (       d  [+        S5      e[(        R,                  " U R                  5      U l        UR                  SS5      nUS:X  a  SU l        OU(       a  SU l        OSU l        [3        [5        USS5      5      U l        [3        [5        USS5      5      U l        [3        [5        USS5      5      U l        [	        USS5      U l        UR                  SS5      U l        UR                  SS5      U l         UR                  SS5      U l!        [	        USS5      U l"        [G        5       U l$        [K        US / 5       H(  n U RH                  RM                  [O        U5      5        M*     U RS                  5         g ! [P         a     MJ  f = f)!NnowrapF	noclassesclassprefixr(   cssclass	highlight	cssstyles	prestylescssfilenoclobber_cssfiletagsfiletagurlformatfilenamewrapcodedebug_token_typeszRThe "ctags" package must to be installed to be able to use the "tagsfile" feature.linenosinliner   r   r   linenostart
linenosteplinenospecialnobackgroundlineseparator
lineanchors	linespansanchorlinenoshl_lines)*r   __init___decodeifneededtitler   r6   r7   r+   r8   r9   r;   r<   r=   r>   r?   r@   rA   rB   span_element_openersrC   ctagsRuntimeErrorCTags_ctagsrD   absr	   rF   rG   rH   rI   rJ   rL   rM   rN   setrO   r
   addint
ValueError_create_stylesheet)selfoptionsrD   linenos       r   rP   HtmlFormatter.__init__  s   4+7+))$**5
"7He<%g{EB";;}b9,,W[[[-QR--gkk+r.JK--gkk+r.JK++GKK	2,FG!-g7JE!R,,W[[R-HI 00^R1PQ,,W[[R-HI$Wj%@$&!!-g7JE!R==5" $O P P++dmm4DK++i/hDLDLDL{7M1EFk'<CD Woq!IJ(.%H$[[$?";;}b9 ["5)'?EJ"7J;F!!#f+. < 	!  s   $M
MMc                 F    [        U5      nU(       a  U R                  U-   $ g)zMReturn the css class of this token type prefixed with
the classprefix option.r(   )r0   r8   )r^   r-   
ttypeclasss      r   _get_css_classHtmlFormatter._get_css_class  s%     &e,
##j00r   c                     U R                  U5      nU[        ;  a/  UR                  nU R                  U5      S-   U-   nU[        ;  a  M/  U=(       d    S$ )zOReturn the CSS classes of this token type prefixed with the classprefix option. r(   )rd   r   r,   )r^   r-   clss      r   _get_css_classesHtmlFormatter._get_css_classes  sS    !!%(>)LLE%%e,s2S8C >) ybr   c                     U R                   R                  U5      nUc,  UR                  nU R                   R                  U5      nUc  M,  U=(       d    S$ )z1Return the inline CSS styles for this token type.r(   )ttype2classr+   r,   )r^   r-   cclasss      r   _get_css_inline_styles$HtmlFormatter._get_css_inline_styles  sO    !!%%e,nLLE%%))%0F n |r   c                    [         S0=ol        0 =o l        U R                   H  u  p4U R	                  U5      nSnUS   (       a   USR                  [        US   5      5      -  nUS   (       a  US-  nUS   (       a  US-  nUS   (       a  US	-  nUS
   (       a   USR                  [        US
   5      5      -  nUS   (       a   USR                  [        US   5      5      -  nU(       d  M  XQU'   US S U[        U5      4X%'   M     g )Nr(   r%   zcolor: {}; boldzfont-weight: bold; italiczfont-style: italic; 	underlineztext-decoration: underline; bgcolorzbackground-color: {}; borderzborder: 1px solid {}; )r   rl   class2stylestylerd   formatr&   r$   )r^   t2cc2sr-   ndefnamerx   s          r   r]    HtmlFormatter._create_stylesheet  s   "',!##::KE&&u-DEG}--fT'].CDDF|..H~//K 77I188Y9PQQH~188X9OPPu!E
 #3BZE
;	' &r   Nc                     / nUR                  U R                  5       5        UR                  U R                  U5      5        UR                  U R                  U5      5        SR	                  U5      $ )z
Return CSS style definitions for the classes produced by the current
highlighting style. ``arg`` can be a string or list of selectors to
insert before the token type classes.
rK   )extendget_linenos_style_defsget_background_style_defsget_token_style_defsjoin)r^   argstyle_liness      r   get_style_defsHtmlFormatter.get_style_defs  sa     46689499#>?444S9:yy%%r   c                 d   U R                  U5      nU R                  R                  5        VVVVs/ sH  u  nu  pEnU(       d  M  U(       d  M  XeX44PM!     nnnnnUR                  5         U VVVVs/ sH#  u  pep4U" U5       SU S[	        U5      SS   S3PM%     nnnnnU$ s  snnnnf s  snnnnf )Nz { z } /* r   z */)get_css_prefixrw   itemssortrepr)	r^   r   prefixrh   rx   r-   levelstylesliness	            r   r   "HtmlFormatter.get_token_style_defs  s    $$S) /3.>.>.D.D.F
.F**eE ' 'U3&.F 	 

 	 /5
.4*s c{m4wgd5k!"o->cB.4 	 

 

s   B"
B"
B"
2)B*
c                    U R                  U5      nU R                  R                  nU R                  R                  n/ nU(       ax  U R                  (       dg  Ubd  Sn[
        U R                  ;   a&  SU R                  U R                  [
              S   -   nUR                  SSR                  U" S5      X65      5        Ub(  UR                  SSR                  U" S5      U5      5        U$ )Nr(   rg   r   z{}{{ background: {};{} }}z{} {{ background-color: {} }}hll)
r   rx   background_colorhighlight_colorrI   r   rl   rw   insertry   )r^   r   r   bg_colorhl_colorr   
text_styles          r   r   'HtmlFormatter.get_background_style_defs#  s    $$S)::..::--t((X-AJt''' 4#3#3D4D4DT4J#KA#NN
LL.552J
 LL299&-R r   c                     SU R                    S3SU R                   S3SU R                   S3SU R                   S3SU R                   S3/nU$ )Nzpre { z }ztd.linenos .normal { zspan.linenos { ztd.linenos .special { zspan.linenos.special { )
_pre_style_linenos_style_linenos_special_style)r^   r   s     r   r   $HtmlFormatter.get_linenos_style_defs:  sm    doo&c*$T%8%8$9=t22337%d&A&A%B#F&t'B'B&C3G
 r   c                    ^ Uc.  SU R                   ;   =(       a    SU R                  -   =(       d    Sn[        U[        5      (       a  U/mO[	        U5      mU4S jnU$ )Nr9   .r(   c                    > U (       a  SU -   n / nT H,  nUR                  U=(       a    US-   =(       d    SU -   5        M.     SR                  U5      $ )Nr   rg   r(   z, )appendr   )rh   tmpr   argss      r   r   ,HtmlFormatter.get_css_prefix.<locals>.prefixM  sK    CiC

C-C#I3s:; 99S>!r   )r_   r9   
isinstancestrlist)r^   r   r   r   s      @r   r   HtmlFormatter.get_css_prefixE  sR    ;-C#dmm2CIrCc35D9D	" r   c                     g)Nzline-height: 125%; )r^   s    r   r   HtmlFormatter._pre_styleW  s    #r   c                 l    U R                   R                  nU R                   R                  nSU SU S3$ Nzcolor: z; background-color: z(; padding-left: 5px; padding-right: 5px;)rx   line_number_colorline_number_background_colorr^   r%   r   s      r   r   HtmlFormatter._linenos_style[  s:    

,,::BB34D3EEmnnr   c                 l    U R                   R                  nU R                   R                  nSU SU S3$ r   )rx   line_number_special_color$line_number_special_background_colorr   s      r   r   $HtmlFormatter._linenos_special_stylea  s:    

44::JJ34D3EEmnnr   c                     [        U[        5      (       a<  U R                  (       a  UR                  U R                  5      $ UR                  5       $ U$ N)r   bytesencodingdecoder^   values     r   rQ   HtmlFormatter._decodeifneededg  s:    eU##}}||DMM22<<>!r   c              #   F  #    U R                   (       GaO  [        R                  R                  U R                   5      (       a  U R                   nOj UR                  nU(       a	  US   S:X  a  [
        e[        R                  R                  [        R                  R                  U5      U R                   5      n [        R                  R                  U5      (       a  U R                  (       d>  [        USSS9 nUR                  [        SU R!                  S	5      0-  5        S S S 5        O S[&        [)        U R*                  U R                   U R,                  S9-  4v   O9S[.        [)        U R*                  U R!                  S	5      U R,                  S9-  4v   U S h  vN   S[0        4v   g ! [
         a(    [        S[        R                  S9  U R                   n GN)f = f! , (       d  f       N= f! ["         a  nS
UR$                  -   Ul        e S nAff = f N|7f)Nr   r   z^Note: Cannot determine output file name, using current directory as base for the CSS file name)filewzutf-8)r   	styledefsbodyzError writing CSS file: )rR   r=   r   )rR   r   r   )r=   ospathisabsr}   AttributeErrorr   dirnameprintsysstderrexistsr>   openwriteCSSFILE_TEMPLATEr   OSErrorstrerrorDOC_HEADER_EXTERNALCSSdictrR   r   
DOC_HEADER
DOC_FOOTER)r^   inneroutfilecssfilenamerA   cferrs          r   
_wrap_fullHtmlFormatter._wrap_fulln  s    <<<ww}}T\\**"ll/&||H#x{c'9,,"$'',,rwwx/H/3||#=Kww~~k22$:P:Pk3AR!1"-t/B/B6/J!K"L M BA ;Q ,#'<<$(MM33 4 4
 j%)%8%8%@$(MM33 4 4
 m5 & / R"zz+ #',,K	/ BA  9CLLH 	s{   AH!A)F2 ;A G8 ;*G'%G8 -A5H!"H#H!2.G$ H!#G$$H!'
G51G8 4H!5G8 8
HHHH!c              #     #    [        5       nSnU H"  u  pEU(       a  US-  nUR                  U5        M$     U R                  n[        [	        X6-   S-
  5      5      nU R
                  nU R                  n	U R                  =(       d    U R                  n
U R                  nU R                  n/ n[        XfU-   5       H  nX-  S:H  nU=(       a    X-  S:H  nU(       a  SX~4-  nU(       a  SXU4-  nOSU-  nU(       a)  U(       a  SU R                   S3nOSU R                   S3nOU(       a  SnOS	nU(       a	  S
U SU S3nUR                  U5        M     SR                  U5      nSnU R                   (       a  SU R                   -   S-   nSSU R"                   S3U-   S-   U-   S-   4v   Sv   SUR%                  5       4v   Sv   Sv   g 7f)Nr   r   %*d<a href="#%s-%d">%s</a>rg    style="r   z class="special"z class="normal"<spanr   </span>rK   r(   z<<tr><th colspan="2" class="filename"><span class="filename">z</span></th></tr>z<table class="ztable">z4<tr><td class="linenos"><div class="linenodiv"><pre>z"</pre></div></td><td class="code">)r   z<div>)r   z</div>)r   z</td></tr></table>)r   r   rF   r$   r   rH   rG   rL   rM   rN   r7   ranger   r   r   r   rA   r9   getvalue)r^   r   dummyoutfilelncounttlineflmwspstanchor_namealnnoclsr   i
print_linespecial_linerx   lsfilename_trs                       r   _wrap_tablelinenos HtmlFormatter._wrap_tablelinenos  s    zGA1t$ 
 W\A%&'__&&8$..  rg:&A1J-!&A+Lw47MMDRx&t'B'B&C1EE&t':':&;1=E.E-EugQtfG4LL3 '6 YYu ==*,0MM:=  N4==/9KGBC56 7 	7 &&(((%%s   GGc              #   n  #    [        U5      nU R                  nU R                  nU R                  n[	        [        [	        U5      U-   S-
  5      5      nU R                  =(       d    U R                  nU R                  nU R                  n	U H  u  pXT-  S:H  nU=(       a    XS-  S:H  nU(       a  SXe4-  nOSU-  nU	(       a)  U(       a  SU R                   S3nOSU R                   S3nOU(       a  SnOSnU(       a
  S	U S
U S3nOUnU(       a  SSXuU4-  U-   4v   O	SUU-   4v   US-  nM     g 7f)Nr   r   r   rg   r   r   z class="linenos special"z class="linenos"r   r   r   r   )r   rH   rG   rF   r$   r   rL   rM   rN   r7   r   r   )r^   r   inner_linesr   r   numr   r   r   r   _
inner_liner   r   r   rx   rD   s                    r   _wrap_inlinelinenos!HtmlFormatter._wrap_inlinelinenos  sK    5k__S%+a/01&&8$..  (MAQJ/#(a-Ly(Rx&t'B'B&C1EE&t':':&;1=E6E.E!%$w73{6QQ$% & & :---1HC= )s   D3D5c              #      #    U R                   nU R                  S-
  nU HA  u  pEU(       a/  US-  nU R                  (       a  SOSX#4-  nSSX#X#U4-  U-   4v   M;  SU4v   MC     g 7f)Nr   r(   z href="#%s-%d"z!<a id="%s-%d" name="%s-%d"%s></a>r   )rL   rF   rD   )r^   r   sr   r   r   hrefs          r   _wrap_lineanchorsHtmlFormatter._wrap_lineanchors  st     q GAQ!\\r/?1&/H<aD?QQTXXXXg s   A$A&c              #      #    U R                   nU R                  S-
  nU H$  u  pEU(       a  US-  nSSX#U4-  4v   M  SU4v   M&     g 7f)Nr   z<span id="%s-%d">%s</span>r   )rM   rF   )r^   r   r  r   r   r   s         r   _wrap_linespansHtmlFormatter._wrap_linespans  sT     NNq GAQ5tDDDg s   AA	c              #     #    / nU R                   (       aP  U R                  (       d?  U R                  R                  b(  UR	                  SU R                  R                   35        U R
                  (       a  UR	                  U R
                  5        SR                  U5      nSSU R                  =(       a    SU R                   S3-   U=(       a    SU S3-   S-   4v   U S h  vN   S	v   g  N	7f)
Nzbackground: ; r   z<divz class="r   r   r   )r   z</div>
)r7   rI   rx   r   r   r;   r   r9   r^   r   rx   s      r   	_wrap_divHtmlFormatter._wrap_div  s     NN4#4#4

++7LL<

(C(C'DEF>>LL(		% &DMMIq.IJ2q1469: ; 	; 	s   C#C1%C/&
C1c              #     #    / nU R                   (       a  UR                  U R                   5        U R                  (       a  UR                  U R                  5        SR	                  U5      nU R
                  (       a&  U R                  S:w  a  SSU R
                  -   S-   4v   SSU=(       a    SU S3-   S	-   4v   U S h  vN   S
v   g  N	7f)Nr	  r   r   z<span class="filename">r   z<prer   r   z><span></span>)r   z</pre>)r<   r   r7   r   r   rA   rD   r
  s      r   	_wrap_preHtmlFormatter._wrap_pre*  s     >>LL(>>LL)		% ==T\\Q./$--?)KLL &E9q&9:=MMNN 	s   CCC
Cc              #   4   #    Sv   U S h  vN   Sv   g  N	7f)N)r   z<code>)r   z</code>r   )r^   r   s     r   
_wrap_codeHtmlFormatter._wrap_code;  s      	s   

d   )maxsizec                 J    UR                  [        5      R                  S5      $ )z-HTML-escape a value and split it by newlines.rK   )r   _escape_html_tablesplitr   s     r   _translate_partsHtmlFormatter._translate_parts@  s     1288>>r   c           	   #   2  #    U R                   nU R                  nU R                  nSn/ nU GH  u  px U R                  U   n	U R                  U5      nU(       a  U[        R                  ;   a  U R                  U5      u  pU(       a  [        R                   R#                  U5      u  nnU(       a  US	-  n[        R                   R%                  U5      u  nnU R&                  UUUS
.-  nSUU R(                  XS   4-  US'   US   S-   US'   USS  H  nU(       ak  XY:w  a0  U(       a)  UR+                  U=(       a    SU	UU	=(       a    SU45        OUR+                  UU=(       a    SU45        SSR                  U5      4v   / nMu  U(       a$  SSR                  U	UU	=(       a    SU45      4v   M  SU4v   M     U(       aJ  US   (       a@  XY:w  a$  UR+                  U=(       a    SXS   45        U	nGM  UR-                  US   5        GM  US   (       d  GM  XS   /nU	nGM     U(       a2  UR+                  U=(       a    SU45        SSR                  U5      4v   gg! [         a    U R
                  (       a   SR                  SR                  U5      5      OSn
U(       a7  U R                  U5      nU(       a  U R                  U   S   nSU SU
 S3n	O'Sn	O$U R                  U5      nU(       a
  SU SU
 S3n	OSn	XR                  U'    GNf = f7f)zL
Just format the tokens, without any wrapping tags.
Yield individual lines.
r(   z title="{}"r   r   z<span style="r   r   z<span class="/)r   r.   fextz<a href="%s#%s-%d">%sr*   z</a>Nr   r   )r7   rJ   r?   rS   KeyErrorrC   ry   r   rn   rw   ri   r  r   Name_lookup_ctagr   r   r  splitextr@   rL   r   r   )r^   tokensourcer   lsepr?   lspanr   r-   r   cspanrR   	css_style	css_classpartsrA   
linenumberbase	extensionurlparts                       r   _format_linesHtmlFormatter._format_linesE  s    
 !!=='LE911%8$ ))%0EEUZZ/'+'8'8'?$%'WW]]8%<ND(*,''*:*:8*D'Hi++th7@/B BC8d..
!HE FE!H %b	F 2E"I cr
 ~$e&9	E4&+&9	D%B C TE,?i$$GHRWWT]**DRWWeTE4Gi$%OPPPT'M #  b	>KK%"5IRy IJ!EKKb	*rRy)y (~ KK%-I56RWWT]"" y  9AEAWAW,,SXXe_=]_ $ ; ;E BI $($4$4Y$?$B	"/	{!E7! D " $ 5 5e <I "/	{!E7! D "38))%09s1   1LI#GLAL#B-LLLLc                     [         R                  " 5       nU R                  R                  X!R	                  5       S5      (       a  US   R                  5       US   4$ g)Nr   r   
lineNumber)NN)rT   TagEntryrW   findencoder   )r^   tokenentrys      r   r  HtmlFormatter._lookup_ctag  sK     ;;E<<>155='')5+>>>r   c              #   D  #    U R                   n[        U5       H  u  nu  pEUS:w  a  XE4v   US-   U;   a_  U R                  (       aB  SnU R                  R                  b  SU R                  R                   S3nSSU SU S34v   Mo  SS	U S34v   M{  SU4v   M     g7f)
z{
Highlighted the lines specified in the `hl_lines` option by
post-processing the token stream coming from `_format_lines`.
r   r(   Nz style="background-color: r   r   r   r   z<span class="hll">)rO   	enumerater7   rx   r   )r^   r!  hlsr   r   r   rx   s          r   _highlight_linesHtmlFormatter._highlight_lines  s     
 mm&{3MAzAvh1u|>>Ezz11=#=djj>X>X=YYZ![uUG1UG7;;;1%@@@h 4s   BB c                 p    UnU R                   (       a  U R                  U5      nU R                  U5      nU$ )z
Wrap the ``source``, which is a generator yielding
individual lines, in custom generators. See docstring
for `format`. Can be overridden.
)rB   r  r  )r^   sourceoutputs      r   wrapHtmlFormatter.wrap  s1     ==__V,F'r   c                 z   U R                  U5      nU R                  (       d!  U R                  S:X  a  U R                  U5      nU R                  (       a  U R                  U5      nU R                  (       d  U R                  (       a  U R                  U5      nU R                  (       a  U R                  U5      nU R                  U5      nU R                  S:X  a  U R                  U5      nU R                  U5      nU R                  (       a  U R                  X25      nU H  u  pEUR                  U5        M     g)a  
The formatting process uses several nested generators; which of
them are used is determined by the user's options.

Each generator should take at least one argument, ``inner``,
and wrap the pieces of text generated by this.

Always yield 2-tuples: (code, text). If "code" is 1, the text
is part of the original tokensource being highlighted, if it's
0, the text is some piece of wrapping. This makes it possible to
use several different wrappers that process the original source
linewise, e.g. line number generators.
r   r   N)r-  r6   rD   r   rO   r:  rL   r  rM   r  r?  r   r  fullr   r   )r^   r!  r   r=  r   pieces         r   format_unencodedHtmlFormatter.format_unencoded  s     ##K0 {{t||q0--f5F==**62F{{//7~~--f5YYv&F||q 008^^F+Fyy9HAMM%  r   )rW   rN   rw   r8   r9   r=   r;   rC   rA   rO   rL   rD   rH   rF   rG   rJ   rM   rI   r7   r>   r6   r<   rS   r?   r@   rR   rl   rB   r   )(__name__
__module____qualname____firstlineno____doc__r}   aliases	filenamesrP   rd   ri   rn   r]   r   r   r   r   r   propertyr   r   r   rQ   r   r   r   r  r  r  r  r  	functools	lru_cacher  r-  r  r:  r?  rD  __static_attributes__r   r   r   r   r   y   s    cJ	 DhG7#I/"b<0&".	$ $ $ o o
 o o
'RA&H)V
"
 %? &?L#\*%!r   )rJ  rN  r   r   os.pathior   pygments.formatterr   pygments.tokenr   r   r   pygments.utilr   r	   r
   rT   ImportError__all__ordr  r   r&   r0   r   r   r   r   r   r   r   r   <module>rY     s     	 
   ( 6 6 A A 
 HgHfHfHhHg  / !
	  
* 
j!I j!E  Es   B BB