403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/markdown/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/markdown/__pycache__/util.cpython-311.pyc
�

Ӽ�bl-����dZddlZddlZddlZddlmZddlmZmZddl	m
Z
	gd�ZdZdZ
ed	zZed
ze
zZejedz��Zedze
zZed
ze
zZejedz��Zedze
zZ	dZ	ed���d���Zd%d�Zd&d�Zd�Zd%d�Zd�Z	Gd�de��ZGd�d��ZGd�d��Z ed d!d"g��Z!Gd#�d$��Z"dS)'a�
Python Markdown

A Python implementation of John Gruber's Markdown.

Documentation: https://python-markdown.github.io/
GitHub: https://github.com/Python-Markdown/markdown/
PyPI: https://pypi.org/project/Markdown/

Started by Manfred Stienstra (http://www.dwerg.net/).
Maintained for a few years by Yuri Takhteyev (http://www.freewisdom.org).
Currently maintained by Waylan Limberg (https://github.com/waylan),
Dmitry Shachnev (https://github.com/mitya57) and Isaac Muse (https://github.com/facelessuser).

Copyright 2007-2018 The Python Markdown Project (v. 1.7 and later)
Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
Copyright 2004 Manfred Stienstra (the original version)

License: BSD (see LICENSE.md for details).
�N)�
namedtuple)�wraps�	lru_cache)�count)8�address�article�aside�
blockquote�details�div�dl�fieldset�
figcaption�figure�footer�form�h1�h2�h3�h4�h5�h6�header�hgroup�hr�main�menu�nav�ol�p�pre�section�table�ul�canvas�colgroup�dd�body�dt�group�iframe�li�legend�math�map�noscript�output�object�option�progress�script�style�tbody�td�textarea�tfoot�th�thead�tr�video��zklzzwxh:z%sz([0-9]+)�ampz
wzxhzdk:%sz
hzzhzkh:%s))u֐u߿)uⴰu⵿)�maxsizec�d�tjdkrddlm}nddl}|�d���S)N)��
r��metadatazmarkdown.extensions)r*)�sys�version_info�	importlibrG�importlib_metadata�entry_pointsrFs �//usr/lib/python3/dist-packages/markdown/util.py�get_installed_extensionsrNQsI��
��7�"�"�&�&�&�&�&�&�&�-�-�-�-�� � �'<� �=�=�=��c������fd�}|S)z�
    Raise a DeprecationWarning when wrapped function/method is called.

    Usage:
        @deprecated("This method will be removed in version X; use Y instead.")
        def some_method()"
            pass
    c�B���t������fd���}|S)Nc�b��tjd�j�d���t�����|i|��S)N�'z' is deprecated. )�category�
stacklevel)�warnings�warn�__name__�DeprecationWarning)�args�kwargs�func�messagerVs  ���rM�deprecated_funcz4deprecated.<locals>.wrapper.<locals>.deprecated_funcesN����M�=�D�M�=�=�G�=�=�+�%�
�
�
�
�
�4��(��(�(�(rO)r)r]r_r^rVs` ��rM�wrapperzdeprecated.<locals>.wrapperds?����	�t���	)�	)�	)�	)�	)�	)�
��	)��rO�)r^rVr`s`` rM�
deprecatedrb[s)����	�	�	�	�	�	��NrOTFc��t|t��s|r|�|St|��S|r|���dkrdS|���dvrdS|���dvrdS|rt	d|z���dS)aParses a string representing bool value. If parsing was successful,
       returns True or False. If preserve_none=True, returns True, False,
       or None. If parsing was not successful, raises  ValueError, or, if
       fail_on_errors=False, returns None.N�none)�true�yes�y�on�1T)�false�no�n�off�0rdFzCannot parse bool value: %r)�
isinstance�str�bool�lower�
ValueError)�value�fail_on_errors�
preserve_nones   rM�parseBoolValuerwqs���
�e�S�!�!�@��	�U�]��L��E�{�{��	�@�5�;�;�=�=�F�2�2��t�	�����9�	9�	9��t�	�����B�	B�	B��u�	�@��6��>�?�?�?�@�@rOc��d|vr|�dd��}d|vr|�dd��}d|vr|�dd��}|S)zEscape code.�&z&amp;�<z&lt;�>z&gt;)�replace)�texts rM�code_escaper~�s[��
�d�{�{��|�|�C��)�)��
�d�{�{��|�|�C��(�(��
�d�{�{��|�|�C��(�(���KrOc�l�tj|��}t|��D]}|j}|s|cS�dS)z+Get current stack depth, performantly.
    N)rH�	_getframer�f_back)�size�frames  rM�_get_stack_depthr��sO��
�M�$���E��d����������	��K�K�K�	��rOc�N�tj��t��z
dkS)zBReturn true if current stack depth is within 100 of maximum limit.�d)rH�getrecursionlimitr�rarOrM�nearing_recursion_limitr��s"��� �"�"�%5�%7�%7�7�#�=�=rOc��eZdZdZdS)�AtomicStringz/A string which should not be further processed.N)rY�
__module__�__qualname__�__doc__rarOrMr�r��s������9�9��DrOr�c��eZdZdd�ZdS)�	ProcessorNc��||_dS�N)�md)�selfr�s  rM�__init__zProcessor.__init__�s
������rOr�)rYr�r�r�rarOrMr�r��s(�����������rOr�c�0�eZdZdZd�Zd�Zd�Zd�Zd�ZdS)�	HtmlStashz{
    This class is used for stashing HTML objects that we extract
    in the beginning and replace with place-holders.
    c�>�d|_g|_d|_g|_dS)z Create a HtmlStash. rN)�html_counter�
rawHtmlBlocks�tag_counter�tag_data�r�s rMr�zHtmlStash.__init__�s%�������������
�
�
rOc��|j�|��|�|j��}|xjdz
c_|S)z�
        Saves an HTML segment for later reinsertion.  Returns a
        placeholder string that needs to be inserted into the
        document.

        Keyword arguments:

        * html: an html segment

        Returns : a placeholder string

        �)r��append�get_placeholderr�)r��html�placeholders   rM�storezHtmlStash.store�sK��	
��!�!�$�'�'�'��*�*�4�+<�=�=�����Q�����rOc�"�d|_g|_dS)Nr)r�r�r�s rM�resetzHtmlStash.reset�s���������rOc��t|zSr�)�HTML_PLACEHOLDER)r��keys  rMr�zHtmlStash.get_placeholder�s
���#�%�%rOc��|j�||||d���tt|j��z}|xjdz
c_|S)z(Store tag data and return a placeholder.)�tag�attrs�
left_index�right_indexr�)r�r��TAG_PLACEHOLDERrpr�)r�r�r�r�r�r�s      rM�	store_tagzHtmlStash.store_tag�sa���
���S�5�,6�-8�:�:�	;�	;�	;�&��D�,<�(=�(=�=�����A�����rON)	rYr�r�r�r�r�r�r�r�rarOrMr�r��si��������
������$ � � �&�&�&�����rOr��PriorityItem�name�priorityc�P�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zdd�Zd�Z
d
S)�Registrya�
    A priority sorted registry.

    A `Registry` instance provides two public methods to alter the data of the
    registry: `register` and `deregister`. Use `register` to add items and
    `deregister` to remove items. See each method for specifics.

    When registering an item, a "name" and a "priority" must be provided. All
    items are automatically sorted by "priority" from highest to lowest. The
    "name" is used to remove ("deregister") and get items.

    A `Registry` instance it like a list (which maintains order) when reading
    data. You may iterate over the items, get an item and get a count (length)
    of all items. You may also check that the registry contains an item.

    When getting an item you may use either the index of the item or the
    string-based "name". For example:

        registry = Registry()
        registry.register(SomeItem(), 'itemname', 20)
        # Get the item by index
        item = registry[0]
        # Get the item by name
        item = registry['itemname']

    When checking that the registry contains an item, you may use either the
    string-based "name", or a reference to the actual item. For example:

        someitem = SomeItem()
        registry.register(someitem, 'itemname', 20)
        # Contains the name
        assert 'itemname' in registry
        # Contains the item instance
        assert someitem in registry

    The method `get_index_for_name` is also available to obtain the index of
    an item using that item's assigned "name".
    c�0�i|_g|_d|_dS)NF)�_data�	_priority�
_is_sortedr�s rMr�zRegistry.__init__
s����
��������rOc��t|t��r||j���vS||j���vSr�)rorpr��keys�values)r��items  rM�__contains__zRegistry.__contains__sD���d�C� � �	-��4�:�?�?�,�,�,�,��t�z�(�(�*�*�*�*rOc�l������t�fd��jD����S)Nc�0��g|]\}}�j|��Sra)r�)�.0�kr r�s   �rM�
<listcomp>z%Registry.__iter__.<locals>.<listcomp>s#���>�>�>�t�q�!�T�Z��]�>�>�>rO)�_sort�iterr�r�s`rM�__iter__zRegistry.__iter__s5����
�
�����>�>�>�>�t�~�>�>�>�?�?�?rOc�\�|���t|t��rEt��}|j|D]'\}}|�|j|||���(|St|t��r|j|j|jS|j|Sr�)	r�ro�slicer�r��registerr��intr�)r�r��datar�r s     rM�__getitem__zRegistry.__getitem__s����
�
�����c�5�!�!�	��:�:�D���s�+�
3�
3���1��
�
�d�j��m�Q��2�2�2�2��K��c�3���	8��:�d�n�S�1�6�7�7��z�#��rOc�*�t|j��Sr�)�lenr�r�s rM�__len__zRegistry.__len__(s���4�>�"�"�"rOc�\�d�|jjt|����S)Nz<{}({})>)�format�	__class__rY�listr�s rM�__repr__zRegistry.__repr__+s#��� � ���!8�$�t�*�*�E�E�ErOc�����|vrE|���|j��fd�|jD��d��Std�������)z5
        Return the index of the given name.
        c�*��g|]}|j�k�
|��Sra)r�)r��xr�s  �rMr�z/Registry.get_index_for_name.<locals>.<listcomp>5s ���=�=�=�q�a�f��n�n��n�n�nrOrzNo item named "{}" exists.)r�r��indexrsr�)r�r�s `rM�get_index_for_namezRegistry.get_index_for_name.sr����4�<�<��J�J�L�L�L��>�'�'�=�=�=�=�D�N�=�=�=�a�@���
��5�<�<�T�B�B�C�C�CrOc��||vr|�|��d|_||j|<|j�t||����dS)aY
        Add an item to the registry with the given name and priority.

        Parameters:

        * `item`: The item being registered.
        * `name`: A string used to reference the item.
        * `priority`: An integer or float used to sort against all items.

        If an item is registered with a "name" which already exists, the
        existing item is replaced with the new item. Treat carefully as the
        old item is lost with no way to recover it. The new item will be
        sorted according to its priority and will **not** retain the position
        of the old item.
        FN)�
deregisterr�r�r�r��
_PriorityItem)r�r�r�r�s    rMr�zRegistry.register9sX�� �4�<�<��O�O�D�!�!�!������
�4������m�D�(�;�;�<�<�<�<�<rOTc�z�	|�|��}|j|=|j|=dS#t$r|r�YdSwxYw)za
        Remove an item from the registry.

        Set `strict=False` to fail silently.
        N)r�r�r�rs)r�r��strictr�s    rMr�zRegistry.deregisterPsi��	��+�+�D�1�1�E���u�%��
�4� � � ���	�	�	��
��
�
�
�	���s�%)�
:�:c�`�|js&|j�d�d���d|_dSdS)z�
        Sort the registry by priority from highest to lowest.

        This method is called internally and should never be explicitly called.
        c��|jSr�)r�)r�s rM�<lambda>z Registry._sort.<locals>.<lambda>es����rOT)r��reverseN)r�r��sortr�s rMr�zRegistry._sort^sB����	#��N���$>�$>���M�M�M�"�D�O�O�O�	#�	#rON)T)rYr�r�r�r�r�r�r�r�r�r�r�r�r�rarOrMr�r��s�������%�%�N � � �
+�+�+�@�@�@�	�	�	�#�#�#�F�F�F�	D�	D�	D�=�=�=�.����#�#�#�#�#rOr�)rP)TF)#r��rerHrW�collectionsr�	functoolsrr�	itertoolsr�BLOCK_LEVEL_ELEMENTS�STX�ETX�INLINE_PLACEHOLDER_PREFIX�INLINE_PLACEHOLDER�compile�INLINE_PLACEHOLDER_RE�AMP_SUBSTITUTEr��HTML_PLACEHOLDER_REr��RTL_BIDI_RANGESrNrbrwr~r�r�rpr�r�r�r�r�rarOrM�<module>r�sm����*
�	�	�	�
�
�
�
�����"�"�"�"�"�"�&�&�&�&�&�&�&�&�����������������
�N��.��5��;��"��
�#5��#C�D�D���U��3�����%��+�� �b�j�!1�K�!?�@�@����$�s�*���
�����4����>�>���>�����,@�@�@�@�&�������>�>�>�
�	�	�	�	�	�3�	�	�	�
��������
-�-�-�-�-�-�-�-�f�
�>�F�J�+?�@�@�
�A#�A#�A#�A#�A#�A#�A#�A#�A#�A#rO

Youez - 2016 - github.com/yon3zu
LinuXploit