Prv8 Shell
Server : Apache
System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64
User : matalashes ( 1004)
PHP Version : 8.1.29
Disable Function : NONE
Directory :  /usr/local/lib64/python3.6/site-packages/markupsafe/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/lib64/python3.6/site-packages/markupsafe/__pycache__/__init__.cpython-36.pyc
3

G�Kd�"�@sLddlZddlZddlZddlZejr@ddlZGdd�dej�Z	dZ
ejd�Ze
ejdd�d	d
�ZGdd�de
�ZGdd
�d
ej�Zejdee�Zeejejejejgefed�dd�ZGdd�d�Zy4ddlmZddlmZddlmZddlmZWnFe k
�rFddl!mZddl!mZddl!mZddl!mZYnXdS)�Nc@seZdZed�dd�ZdS)�HasHTML)�returncCsdS)N�)�selfrr�9/tmp/pip-build-8nxjc3nm/MarkupSafe/markupsafe/__init__.py�__html__
szHasHTML.__html__N)�__name__�
__module__�__qualname__�strrrrrrr	srz2.0.1z(<!--.*?-->|<[^>]*>).�Markup)�namercs4tt|��tj��dtjtjdd��fdd��}|S)Nr)r�args�kwargsrcs>tt|�t|�|j�}t||j�|j�|j�|f|�|��S)N)�_escape_argspec�list�	enumerate�escape�items�	__class__)rrr)�origrr�wrappedsz)_simple_escaping_wrapper.<locals>.wrapped)�getattrr�	functools�wraps�t�Any)r
rr)rr�_simple_escaping_wrappers
rcseZdZdZfZdHejejeedd��fdd�
Z	dd�d	d
�Z
ejedfdd��fd
d�Zejedfdd�dd�Z
edd��fdd�ZeZejdd��fdd�Zed��fdd�Zejejedfdd��fdd�Zejje_dJejeeejdd��fdd�
Zejje_dLejeeejdd��fd d!�
Zejje_dMeejdd#��fd$d%�
Zejje_ed�d&d'�Zed�d(d)�Zeejdd*�d+d,��ZxdND]Zee�e �e<�q�W[eej!dOd=��fd>d?�Z"eej!dPd=��fd@dA�Z#ejejddB�dCdD�Z$eddE�dFdG�Z%�Z&S)Qra�A string that is ready to be safely inserted into an HTML or XML
    document, either because it was escaped or because it was marked
    safe.

    Passing an object to the constructor converts it to text and wraps
    it to mark it safe without escaping. To escape the text, use the
    :meth:`escape` class method instead.

    >>> Markup("Hello, <em>World</em>!")
    Markup('Hello, <em>World</em>!')
    >>> Markup(42)
    Markup('42')
    >>> Markup.escape("Hello, <em>World</em>!")
    Markup('Hello &lt;em&gt;World&lt;/em&gt;!')

    This implements the ``__html__()`` interface that some frameworks
    use. Passing an object that implements ``__html__()`` will wrap the
    output of that method, marking it safe.

    >>> class Foo:
    ...     def __html__(self):
    ...         return '<a href="/foo">foo</a>'
    ...
    >>> Markup(Foo())
    Markup('<a href="/foo">foo</a>')

    This is a subclass of :class:`str`. It has the same methods, but
    escapes their arguments and returns a ``Markup`` instance.

    >>> Markup("<em>%s</em>") % ("foo & bar",)
    Markup('<em>foo &amp; bar</em>')
    >>> Markup("<em>Hello</em> ") + "<foo>"
    Markup('<em>Hello</em> &lt;foo&gt;')
    �N�strict)�base�encoding�errorsrcs:t|d�r|j�}|dkr(t�j||�St�j||||�S)Nr)�hasattrr�super�__new__)�clsr r!r")rrrr%Es

zMarkup.__new__)rcCs|S)Nr)rrrrrPszMarkup.__html__r)�otherrcs0t|t�st|d�r,|jt�j|j|���StS)Nr)�
isinstancerr#rr$�__add__r�NotImplemented)rr')rrrr)SszMarkup.__add__cCs(t|t�st|d�r$|j|�j|�StS)Nr)r(rr#rr)r*)rr'rrr�__radd__YszMarkup.__radd__)�numrcs t|t�r|jt�j|��StS)N)r(�intrr$�__mul__r*)rr,)rrrr._s
zMarkup.__mul__)�argrcs@t|t�r"t�fdd�|D��}nt|�j�}�jt�j|��S)Nc3s|]}t|�j�VqdS)N)�_MarkupEscapeHelperr)�.0�x)rrr�	<genexpr>isz!Markup.__mod__.<locals>.<genexpr>)r(�tupler0rrr$�__mod__)rr/)r)rrr5gs
zMarkup.__mod__cs|jj�dt�j��d�S)N�(�))rrr$�__repr__)r)rrrr8oszMarkup.__repr__)�seqrcs|jt�jt|j|���S)N)rr$�join�mapr)rr9)rrrr:rszMarkup.join�)�sep�maxsplitrcs�fdd�t�j||�D�S)Ncsg|]}�j|��qSr)r)r1�v)rrr�
<listcomp>zsz Markup.split.<locals>.<listcomp>)r$�split)rr=r>)r)rrrAwszMarkup.splitcs�fdd�t�j||�D�S)Ncsg|]}�j|��qSr)r)r1r?)rrrr@�sz!Markup.rsplit.<locals>.<listcomp>)r$�rsplit)rr=r>)r)rrrB~sz
Markup.rsplitF)�keependsrcs�fdd�t�j|�D�S)Ncsg|]}�j|��qSr)r)r1r?)rrrr@�sz%Markup.splitlines.<locals>.<listcomp>)r$�
splitlines)rrC)r)rrrD�szMarkup.splitlinescCsddlm}|t|��S)u�Convert escaped markup back into a text string. This replaces
        HTML entities with the characters they represent.

        >>> Markup("Main &raquo; <em>About</em>").unescape()
        'Main » <em>About</em>'
        r)�unescape)�htmlrEr)rrErrrrE�szMarkup.unescapecCs"djtjd|�j��}t|�j�S)u�:meth:`unescape` the markup, remove tags, and normalize
        whitespace to single spaces.

        >>> Markup("Main &raquo;	<em>About</em>").striptags()
        'Main » About'
        � r)r:�
_striptags_re�subrArrE)r�strippedrrr�	striptags�szMarkup.striptags)�srcCst|�}|j|k	r||�S|S)ztEscape a string. Calls :func:`escape` and ensures that for
        subclasses the correct type is returned.
        )rr)r&rL�rvrrrr�s
z
Markup.escape�__getitem__�
capitalize�title�lower�upper�replace�ljust�rjust�lstrip�rstrip�center�strip�	translate�
expandtabs�swapcase�zfill)r=rcs4t�j|j|��\}}}|j}||�||�||�fS)N)r$�	partitionrr)rr=�lrL�rr&)rrrr^�szMarkup.partitioncs4t�j|j|��\}}}|j}||�||�||�fS)N)r$�
rpartitionrr)rr=r_rLr`r&)rrrra�szMarkup.rpartition)rrrcOst|j�}|j|j|||��S)N)�EscapeFormatterrr�vformat)rrr�	formatterrrr�format�s
z
Markup.format)�format_specrcCs|rtd��|S)Nz,Unsupported format specification for Markup.)�
ValueError)rrfrrr�__html_format__�szMarkup.__html_format__)rNr���)Nriri)Nri)F)rNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r])rrr)rrr)'rr	r
�__doc__�	__slots__rr�Optionalrr%r�Unionr)r+r-r.�__rmul__r5r8�Iterabler:ZListrArB�boolrDrErK�classmethodr�methodr�localsZTupler^rarerh�
__classcell__rr)rrrs`"	$




csJeZdZd	Zejejgefdd��fdd�Zeje	e	d�dd�Z
�ZS)
rbrN)rrcs||_t�j�dS)N)rr$�__init__)rr)rrrru�szEscapeFormatter.__init__)�valuerfrcCsjt|d�r|j|�}nFt|d�rH|r>td|�dt|��d���|j�}ntjj||t|��}t|j	|��S)NrhrzFormat specifier z given, but z{ does not define __html_format__. A class that defines __html__ must define __html_format__ to work with format specifiers.)
r#rhrg�typer�string�	Formatter�format_fieldrr)rrvrfrMrrrrz�s


zEscapeFormatter.format_field)r)rr	r
rkr�Callablerrrurrzrtrr)rrrb�s"rb�_ListOrDict)�obj�iterablerrcCs6x0|D](\}}t|t�s"t|d�r||�||<qW|S)z,Helper for various string-wrapped functions.r)r(rr#)r}r~r�keyrvrrrr�src@s�eZdZdZdZejejejgefdd�dd�Z	ejdd�d	d
�Z
ed�dd
�Zed�dd�Z
ed�dd�Zed�dd�ZdS)r0z"Helper for :meth:`Markup.__mod__`.r}rN)r}rrcCs||_||_dS)N)r}r)rr}rrrrrusz_MarkupEscapeHelper.__init__)�itemrcCst|j||j�S)N)r0r}r)rr�rrrrNsz_MarkupEscapeHelper.__getitem__)rcCst|j|j��S)N)rrr})rrrr�__str__	sz_MarkupEscapeHelper.__str__cCst|jt|j���S)N)rr�reprr})rrrrr8sz_MarkupEscapeHelper.__repr__cCs
t|j�S)N)r-r})rrrr�__int__sz_MarkupEscapeHelper.__int__cCs
t|j�S)N)�floatr})rrrr�	__float__sz_MarkupEscapeHelper.__float__)r}r)rr	r
rjrkrrr{rrurNrr�r8r-r�r�r�rrrrr0�s"r0r<)r)�
escape_silent)�soft_str)�soft_unicode).r)"r�rerxZtypingrZ
TYPE_CHECKINGZtyping_extensions�teZProtocolr�__version__�compilerHrr{rrryrbZTypeVarr�dictr|rorrr0Z	_speedupsrr�r�r��ImportErrorZ_nativerrrr�<module>s4
8	

haha - 2025