
    Mh7                        d dl mZ d dlmZmZmZ d dlmZ d dlmZ d dl	m
Z
mZmZmZ e
rd dlmZ eeef   Z	  G d de      Z G d	 d
e      Z G d de      ZddZy)    )annotations)CallableIterableMutableMapping)r   )Path)TYPE_CHECKINGAny	TypedDictcast)NotRequiredc                      e Zd ZU dZ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<   	 ded<   y)OptionsTypezOptions for parsing.int
maxNestingboolhtmllinkifytypographerstrquotesxhtmlOutbreaks
langPrefix%Callable[[str, str, str], str] | None	highlightzNotRequired[bool]store_labelsN__name__
__module____qualname____doc____annotations__     i/var/www/pru.catia.catastroantioquia-mas.com/valormasv2/lib/python3.12/site-packages/markdown_it/utils.pyr   r      sZ    O/
J%M;.KN0L3O044>##r$   r   c                  (    e Zd ZU dZded<   	 ded<   y)
PresetTypez%Preset configuration for markdown-it.r   optionsz3MutableMapping[str, MutableMapping[str, list[str]]]
componentsNr   r#   r$   r%   r'   r'   .   s    /CC/r$   r'   c                  H   e Zd ZdZddZddZddZd dZd!dZd"dZ	d#dZ
d#d	Zed"d
       Zej                  d$d       Zed%d       Zej                  d&d       Zed%d       Zej                  d&d       Zed%d       Zej                  d&d       Zed#d       Zej                  d'd       Zed%d       Zej                  d&d       Zed%d       Zej                  d&d       Zed#d       Zej                  d'd       Zed(d       Zej                  d)d       Zy)*OptionsDictzMA dictionary, with attribute access to core markdownit configuration options.c                @    t        t        t        |            | _        y N)r   r   dict_options)selfr(   s     r%   __init__zOptionsDict.__init__=   s    [$w-8r$   c                     | j                   |   S r-   r/   r0   keys     r%   __getitem__zOptionsDict.__getitem__@   s    }}S!!r$   c                "    || j                   |<   y r-   r3   )r0   r5   values      r%   __setitem__zOptionsDict.__setitem__C   s    "cr$   c                    | j                   |= y r-   r3   r4   s     r%   __delitem__zOptionsDict.__delitem__F   s    MM#r$   c                ,    t        | j                        S r-   )iterr/   r0   s    r%   __iter__zOptionsDict.__iter__I       DMM""r$   c                ,    t        | j                        S r-   )lenr/   r>   s    r%   __len__zOptionsDict.__len__L       4==!!r$   c                ,    t        | j                        S r-   )reprr/   r>   s    r%   __repr__zOptionsDict.__repr__O   r@   r$   c                ,    t        | j                        S r-   )r   r/   r>   s    r%   __str__zOptionsDict.__str__R   rD   r$   c                     | j                   d   S )z%Internal protection, recursion limit.r   r3   r>   s    r%   r   zOptionsDict.maxNestingU        }}\**r$   c                "    || j                   d<   y )Nr   r3   r0   r8   s     r%   r   zOptionsDict.maxNestingZ       &+l#r$   c                     | j                   d   S )zEnable HTML tags in source.r   r3   r>   s    r%   r   zOptionsDict.html^   s     }}V$$r$   c                "    || j                   d<   y )Nr   r3   rM   s     r%   r   zOptionsDict.htmlc   s     %fr$   c                     | j                   d   S )z1Enable autoconversion of URL-like texts to links.r   r3   r>   s    r%   r   zOptionsDict.linkifyg   s     }}Y''r$   c                "    || j                   d<   y )Nr   r3   rM   s     r%   r   zOptionsDict.linkifyl   s    #(i r$   c                     | j                   d   S )z$Enable smartquotes and replacements.r   r3   r>   s    r%   r   zOptionsDict.typographerp   s     }}]++r$   c                "    || j                   d<   y )Nr   r3   rM   s     r%   r   zOptionsDict.typographeru   s    ',m$r$   c                     | j                   d   S )zQuote characters.r   r3   r>   s    r%   r   zOptionsDict.quotesy        }}X&&r$   c                "    || j                   d<   y )Nr   r3   rM   s     r%   r   zOptionsDict.quotes~       "'hr$   c                     | j                   d   S )z&Use '/' to close single tags (<br />).r   r3   r>   s    r%   r   zOptionsDict.xhtmlOut   s     }}Z((r$   c                "    || j                   d<   y )Nr   r3   rM   s     r%   r   zOptionsDict.xhtmlOut   s    $)j!r$   c                     | j                   d   S )z)Convert newlines in paragraphs into <br>.r   r3   r>   s    r%   r   zOptionsDict.breaks   rV   r$   c                "    || j                   d<   y )Nr   r3   rM   s     r%   r   zOptionsDict.breaks   rX   r$   c                     | j                   d   S )z&CSS language prefix for fenced blocks.r   r3   r>   s    r%   r   zOptionsDict.langPrefix   rK   r$   c                "    || j                   d<   y )Nr   r3   rM   s     r%   r   zOptionsDict.langPrefix   rN   r$   c                     | j                   d   S )zEHighlighter function: (content, langName, langAttrs) -> escaped HTML.r   r3   r>   s    r%   r   zOptionsDict.highlight   s     }}[))r$   c                "    || j                   d<   y )Nr   r3   rM   s     r%   r   zOptionsDict.highlight   s    %*k"r$   N)r(   r   returnNone)r5   r   ra   r	   )r5   r   r8   r	   ra   rb   )r5   r   ra   rb   )ra   zIterable[str])ra   r   )ra   r   )r8   r   ra   rb   )ra   r   )r8   r   ra   rb   )r8   r   ra   rb   )ra   r   )r8   r   ra   rb   )r   r   r    r!   r1   r6   r9   r;   r?   rC   rG   rI   propertyr   setterr   r   r   r   r   r   r   r   r#   r$   r%   r+   r+   7   s   W
9"##"#" + + , , % % 
[[& & ( ( ^^) ) , , - - ' ' ]]( ( ) ) __* * ' ' ]]( ( + + , , * * + +r$   r+   c                   t        |       j                  d      }g }d}d}|j                  d      }t        t	        |            D ]  }||   j                         dk(  s|dk(  r*|j                  |||dz
     j                         g       d}na|dk(  r,|d   j                  d	j                  ||dz   |              d
}n0|d
k(  r+|d   j                  d	j                  ||dz   |              d}|} |S )Nzutf-8)encodingr   T)keepends.       )	r   	read_text
splitlinesrangerB   rstripappendstripjoin)pathtexttestssectionlast_poslinesis          r%   read_fixture_filer{      s   :1DEGHOOTO*E3u: 8??#!|aq1u!3!3!567Ab	  x!|a)@!ABAb	  x!|a)@!ABH Lr$   N)rt   z
str | Pathra   zlist[list[Any]])
__future__r   collections.abcr   r   r   MutableMappingABCpathlibr   typingr   r	   r
   r   typing_extensionsr   r   EnvTyper   r'   r+   r{   r#   r$   r%   <module>r      sb    " > > ?  6 6- c
"
) 80 0m+# m+`r$   