o
    HEDi                     @   s"  d dl mZmZ dZed ed fed  ed  fed ed fed d d ded d  fddd	d
dddfZdddddZe ZdddefddZ	dddefddZ
ddddZddddZdddefddZdddefd d!Zdddefd"d#Zdddefd$d%Zdddefd&d'Zdddefd(d)Zdddefd*d+Zdddefd,d-Zdddefd.d/Zdddefd0d1Zdddefd2d3Zdddefd4d5Zdddefd6d7Zdddefd8d9Zd:ed;edefd<d=Zd:ed;edefd>d?Zd;edefd@dAZdBS )C   )html_decorationmarkdown_decorationz*_`[          
)||r   )z<b>z</b>)z<i>z</i>)z<code>z</code>)z<pre>z</pre>)z<span class="tg-spoiler">z</span>)z<tg-spoiler>z</tg-spoiler>z&lt;z&gt;z&amp;z&quot;)<>&" )sepreturnc                 G      t t|d| iS )a  
    Quote HTML symbols

    All <, >, & and " symbols that are not a part of a tag or
    an HTML entity must be replaced with the corresponding HTML entities
    (< with &lt; > with &gt; & with &amp and " with &quot).

    :param content:
    :param sep:
    :return:
    r   )r   quote_joinr   content r   e/var/www/www-root/data/www/ovozai.pdev.uz/venv/lib/python3.10/site-packages/aiogram/utils/markdown.py
quote_html   s   r   c                 G   r   )zh
    Escape markdown text

    E.g. for usernames

    :param content:
    :param sep:
    :return:
    r   )r   r   r   r   r   r   r   	escape_md'   s   
r   c                 G   s   |  tt|S )N)joinmapstrr   r   r   r   r   4   s   r   c                 G   s   t |d| iS )z^
    Join all elements with a separator

    :param content:
    :param sep:
    :return:
    r   )r   r   r   r   r   text8   s   r   c                 G      t jt t|d| idS )zU
    Make bold text (Markdown)

    :param content:
    :param sep:
    :return:
    r   value)r   boldr   r   r   r   r   r   r    C      r    c                 G   r   )zQ
    Make bold text (HTML)

    :param content:
    :param sep:
    :return:
    r   r   )r   r    r   r   r   r   r   r   hboldP   r!   r"   c                 G   r   )zW
    Make italic text (Markdown)

    :param content:
    :param sep:
    :return:
    r   r   )r   italicr   r   r   r   r   r   r#   ]   r!   r#   c                 G   r   )zS
    Make italic text (HTML)

    :param content:
    :param sep:
    :return:
    r   r   )r   r#   r   r   r   r   r   r   hitalicj   r!   r$   c                 G   r   )zX
    Make spoiler text (Markdown)

    :param content:
    :param sep:
    :return:
    r   r   )r   spoilerr   r   r   r   r   r   r%   w   r!   r%   c                 G   r   )zT
    Make spoiler text (HTML)

    :param content:
    :param sep:
    :return:
    r   r   )r   r%   r   r   r   r   r   r   hspoiler   r!   r&   c                 G   r   )z[
    Make mono-width text (Markdown)

    :param content:
    :param sep:
    :return:
    r   r   )r   coder   r   r   r   r   r   r'      r!   r'   c                 G   r   )zW
    Make mono-width text (HTML)

    :param content:
    :param sep:
    :return:
    r   r   )r   r'   r   r   r   r   r   r   hcode   r!   r(   c                 G   r   )za
    Make mono-width text block (Markdown)

    :param content:
    :param sep:
    :return:
    r   r   )r   prer   r   r   r   r   r   r)      r!   r)   c                 G   r   )z]
    Make mono-width text block (HTML)

    :param content:
    :param sep:
    :return:
    r   r   )r   r)   r   r   r   r   r   r   hpre   r!   r*   c                 G   r   )z[
    Make underlined text (Markdown)

    :param content:
    :param sep:
    :return:
    r   r   )r   	underliner   r   r   r   r   r   r+      r!   r+   c                 G   r   )zW
    Make underlined text (HTML)

    :param content:
    :param sep:
    :return:
    r   r   )r   r+   r   r   r   r   r   r   
hunderline   r!   r,   c                 G   r   )z^
    Make strikethrough text (Markdown)

    :param content:
    :param sep:
    :return:
    r   r   )r   strikethroughr   r   r   r   r   r   r-      r!   r-   c                 G   r   )zZ
    Make strikethrough text (HTML)

    :param content:
    :param sep:
    :return:
    r   r   )r   r-   r   r   r   r   r   r   hstrikethrough   r!   r.   titleurlc                 C      t jt | |dS )zO
    Format URL (Markdown)

    :param title:
    :param url:
    :return:
    r   link)r   r3   r   r/   r0   r   r   r   r3         r3   c                 C   r1   )zK
    Format URL (HTML)

    :param title:
    :param url:
    :return:
    r2   )r   r3   r   r4   r   r   r   hlink  r5   r6   c                 C   s   d|  dS )zr
    Hide URL (HTML only)
    Can be used for adding an image to a text message

    :param url:
    :return:
    z	<a href="z">&#8288;</a>r   )r0   r   r   r   	hide_link  s   r7   N)text_decorationsr   r   LIST_MD_SYMBOLS
MD_SYMBOLSHTML_QUOTES_MAPkeys_HQSr   r   r   r   r   r    r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r3   r6   r7   r   r   r   r   <module>   sJ    