Ë
    /ÆVhÖ  ã                  ó\   — d Z ddlmZ ddlmZmZmZmZ ddlm	Z	 erddl
mZ  G d„ d«      Zy	)
aì  
Markdown accepts an [`Extension`][markdown.extensions.Extension] instance for each extension. Therefore, each extension
must to define a class that extends [`Extension`][markdown.extensions.Extension] and over-rides the
[`extendMarkdown`][markdown.extensions.Extension.extendMarkdown] method. Within this class one can manage configuration
options for their extension and attach the various processors and patterns which make up an extension to the
[`Markdown`][markdown.Markdown] instance.
é    )Úannotations)ÚTYPE_CHECKINGÚAnyÚIterableÚMappingé   )ÚparseBoolValue)ÚMarkdownc                  óZ   — e Zd ZU dZi Zded<   	 d„ Zddd„Zdd„Zdd„Z	dd„Z
dd	„Zdd
„Zy)Ú	Extensionz( Base class for extensions to subclass. zMapping[str, list]Úconfigc                ó&   — | j                  |«       y)z( Initiate Extension and set up configs. N)Ú
setConfigs)ÚselfÚkwargss     úL/home/dcms/DCMS/lib/python3.12/site-packages/markdown/extensions/__init__.pyÚ__init__zExtension.__init__8   s   € à‰˜Õó    c                óF   — || j                   v r| j                   |   d   S |S )a  
        Return a single configuration option value.

        Arguments:
            key: The configuration option name.
            default: Default value to return if key is not set.

        Returns:
            Value of stored configuration option.
        r   )r   )r   ÚkeyÚdefaults      r   Ú	getConfigzExtension.getConfig<   s)   € ð $—+‘+ÑØ—;‘;˜sÑ# AÑ&Ð&àˆNr   c                ó|   — | j                   j                  «       D ci c]  }|| j                  |«      “Œ c}S c c}w )zl
        Return all configuration options.

        Returns:
            All configuration options.
        )r   Úkeysr   ©r   r   s     r   Ú
getConfigszExtension.getConfigsL   s3   € ð 59·K±K×4DÑ4DÓ4FÖG¨ST—^‘^ CÓ(Ñ(ÒGÐGùÒGs   9c                ó€   — | j                   j                  «       D cg c]  }|| j                   |   d   f‘Œ c}S c c}w )zŒ
        Return descriptions of all configuration options.

        Returns:
            All descriptions of configuration options.
        é   )r   r   r   s     r   ÚgetConfigInfozExtension.getConfigInfoU   s8   € ð 7;·k±k×6FÑ6FÓ6HÖI¨sd—k‘k #Ñ& qÑ)Ò*ÒIÐIùÒIs   ;c                ó¼   — t        | j                  |   d   t        «      rt        |«      }| j                  |   d   €t        |d¬«      }|| j                  |   d<   y)aÙ  
        Set a configuration option.

        If the corresponding default value set in [`config`][markdown.extensions.Extension.config]
        is a `bool` value or `None`, then `value` is passed through
        [`parseBoolValue`][markdown.util.parseBoolValue] before being stored.

        Arguments:
            key: Name of configuration option to set.
            value: Value to assign to option.

        Raises:
            KeyError: If `key` is not known.
        r   NT)Úpreserve_none)Ú
isinstancer   Úboolr	   )r   r   Úvalues      r   Ú	setConfigzExtension.setConfig^   sY   € ô d—k‘k #Ñ& qÑ)¬4Ô0Ü" 5Ó)ˆEØ;‰;sÑ˜AÑÐ&Ü" 5¸Ô=ˆEØ#ˆ‰CÑ˜Òr   c                ót   — t        |d«      r|j                  «       }|D ]  \  }}| j                  ||«       Œ y)a  
        Loop through a collection of configuration options, passing each to
        [`setConfig`][markdown.extensions.Extension.setConfig].

        Arguments:
            items: Collection of configuration options.

        Raises:
            KeyError: for any unknown key.
        ÚitemsN)Úhasattrr'   r%   )r   r'   r   r$   s       r   r   zExtension.setConfigss   s:   € ô 5˜'Ô"à—K‘K“MˆEØò 	'‰JˆCØN‰N˜3 Õ&ñ	'r   c                óv   — t        d| j                  j                  ›d| j                  j                  ›d«      ‚)zË
        Add the various processors and patterns to the Markdown Instance.

        This method must be overridden by every extension.

        Arguments:
            md: The Markdown instance.

        zExtension "ú.z(" must define an "extendMarkdown"method.)ÚNotImplementedErrorÚ	__class__Ú
__module__Ú__name__)r   Úmds     r   ÚextendMarkdownzExtension.extendMarkdown„   s0   € õ "àŸ™×2Ó2°D·N±N×4KÓ4KðMó
ð 	
r   N)Ú )r   Ústrr   r   Úreturnr   )r3   zdict[str, Any])r3   zlist[tuple[str, str]])r   r2   r$   r   r3   ÚNone)r'   z-Mapping[str, Any] | Iterable[tuple[str, Any]]r3   r4   )r/   r
   r3   r4   )r.   r-   Ú__qualname__Ú__doc__r   Ú__annotations__r   r   r   r   r%   r   r0   © r   r   r   r   %   s:   … Ù2à!#€FÐÓ#ðò ôó HóJó$ó*'ô"
r   r   N)r6   Ú
__future__r   Útypingr   r   r   r   Úutilr	   Úmarkdownr
   r   r8   r   r   ú<module>r=      s*   ðñ(õ #ç 8Ó 8Ý !áÝ!÷l
ò l
r   