
    -PhFH                    	   U d Z ddlmZ ddlmZ ddlmZ ddlmZ erddl	m
Z
 ddlmZ ddlmZ dd	lmZ dd
lmZ  G d dej                  Z G d d          Z G d dej        ej        e          Z G d dej        e          Z G d dej        ej                  Z G d deej        ej        ej                  Z G d dej        ej        ej                  Z G d dej        ej                  Z G d deej        ej                  Z  G d deej        ej        ej                  Z! G d d eej        ej        ej                  Z"e"Z# G d! d"ej        ej        ej                  Z$ G d# d$e$          Z% G d% d&ej        ej        ej                  Z& G d' d(ej        ej        ej                  Z' G d) d*ej        ej        ej                  Z( G d+ d,ej        ej        ej                  Z) G d- d.ej        ej        ej                  Z* G d/ d0ej        ej        ej                  Z+ e,            Z-d1e.d2<    G d3 d4ej/        e          Z0 G d5 d6e0d78          Z1 G d9 d:e0d78          Z2 G d; d<e0d78          Z3 G d= d>e0d78          Z4 G d? d@e0d78          Z5 G dA dBe0d78          Z6 G dC dDe0d78          Z7 G dE dFe0d78          Z8 G dG dHe0d78          Z9 G dI dJej        ej                  Z: G dK dLej        ej                  Z; G dM dNej        ej                  Z< G dO dPej        ej        ej                  Z= G dQ dRej>        ej        ej                  Z? G dS dTej        ej                  Z@ G dU dVej                  ZA G dW dXej                  ZB G dY dZej                  ZC G d[ d\ejD                  ZE G d] d^ej                  ZF G d_ d`ej                  ZG G da dbej                  ZH G dc ddej                  ZI G de dfej                  ZJ G dg dhej        ej                  ZK G di djej        ej                  ZL G dk dlejM                  ZN G dm dnejM                  ZO G do dpejP        e          ZQ G dq drejR        e          ZS G ds dtej        ej                  ZTd{dyZUdzS )|zDDocument tree nodes that Sphinx defines on top of those in Docutils.    )annotations)TYPE_CHECKING)nodes)document)Sequence)Any)Element)Sphinx)ExtensionMetadatac                  *    e Zd ZdZddZddZdd
ZdS )translatablea  Node which supports translation.

    The translation goes forward with following steps:

    1. Preserve original translatable messages
    2. Apply translated messages from message catalog
    3. Extract preserved messages (for gettext builder)

    The translatable nodes MUST preserve original messages.
    And these messages should not be overridden at applying step.
    Because they are used at final step; extraction.
    returnNonec                    t           )z(Preserve original translatable messages.NotImplementedErrorselfs    O/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sphinx/addnodes.pypreserve_original_messagesz'translatable.preserve_original_messages"   s    !!    original_messagestrtranslated_messagec                    t           )zApply translated message.r   )r   r   r   s      r   apply_translated_messagez%translatable.apply_translated_message&   s
     "!r   Sequence[str]c                    t           )zjExtract translation messages.

        :returns: list of extracted messages or messages generator
        r   r   s    r   extract_original_messagesz&translatable.extract_original_messages,   s
    
 "!r   Nr   r   r   r   r   r   r   r   )r   r   __name__
__module____qualname____doc__r   r   r    r   r   r   r      sZ         " " " "" " " "" " " " " "r   r   c                      e Zd ZdZdZdS )not_smartquotablez+A node which does not support smart-quotes.FN)r#   r$   r%   r&   support_smartquotesr'   r   r   r)   r)   4   s        55r   r)   c                  *    e Zd ZdZddZddZdd
ZdS )toctreez Node for inserting a "TOC tree".r   r   c                    |                      dg           }| d         D ]\  }}|r|                    |           |                     d          r| d         | d<   d S d S )N
rawentriesentriescaption
rawcaption)
setdefaultappendget)r   r.   title_docnames       r   r   z"toctree.preserve_original_messages=   s}     $b A A
#I 	) 	)OE8 )!!%((( 88I 	1!%iD	1 	1r   r   r   r   c                    t          | d                   D ]\  }\  }}||k    r||f| d         |<   |                     d          |k    r|| d<   d S d S )Nr/   r1   r0   )	enumerater4   )r   r   r   ir5   docnames         r   r   z toctree.apply_translated_messageH   sz     $-T)_#=#= 	C 	CAw(((&8'%BY" 88L!!%5550DOOO 65r   	list[str]c                    g }|                     |                     dg                      d| v r|                    | d                    |S )Nr.   r1   )extendr4   r3   )r   messagess     r   r   z!toctree.extract_original_messagesT   sR      	r22333 4OOD.///r   Nr    r!   )r   r;   r"   r'   r   r   r,   r,   :   sV        **	1 	1 	1 	1
1 
1 
1 
1	 	 	 	 	 	r   r,   c                  4     e Zd ZU dZg Zded<   d
 fd	Z xZS )_desc_classes_injectorz_Helper base class for injecting a fixed list of classes.

    Use as the first base class.
    r;   classesargsr   kwargsr   r   c                z     t                      j        |i | | d                             | j                   d S NrA   super__init__r=   rA   )r   rB   rC   	__class__s      r   rH   z_desc_classes_injector.__init__m   s?    $)&)))Yt|,,,,,r   )rB   r   rC   r   r   r   )r#   r$   r%   r&   rA   __annotations__rH   __classcell__rI   s   @r   r@   r@   e   s\          
 G- - - - - - - - - -r   r@   c                      e Zd ZdZdS )descam  Node for a list of object signatures and a common description of them.

    Contains one or more :py:class:`desc_signature` nodes
    and then a single :py:class:`desc_content` node.

    This node always has two classes:

    - The name of the domain it belongs to, e.g., ``py`` or ``cpp``.
    - The name of the object type in the domain, e.g., ``function``.
    Nr#   r$   r%   r&   r'   r   r   rN   rN   v   s        	 	 	 	r   rN   c                  <     e Zd ZdZddgZed fd            Z xZS )desc_signatureaS  Node for a single object signature.

    As default the signature is a single-line signature.
    Set ``is_multiline = True`` to describe a multi-line signature.
    In that case all child nodes must be :py:class:`desc_signature_line` nodes.

    This node always has the classes ``sig``, ``sig-object``, and the domain it belongs to.
    sigz
sig-objectr   r   c                X    |                      d          rdS t                      j        S )Nis_multiline )r4   rG   child_text_separatorr   rI   s    r   rV   z#desc_signature.child_text_separator   s)    88N## 	0377//r   r   r   )r#   r$   r%   r&   rA   propertyrV   rK   rL   s   @r   rQ   rQ      s]          l#G0 0 0 0 0 X0 0 0 0 0r   rQ   c                      e Zd ZdZdZdS )desc_signature_linezNode for a line in a multi-line object signature.

    It should only be used as a child of a :py:class:`desc_signature`
    with ``is_multiline`` set to ``True``.
    Set ``add_permalink = True`` for the line that should get the permalink.
     N)r#   r$   r%   r&   sphinx_line_typer'   r   r   r[   r[      s"          r   r[   c                      e Zd ZdZdS )desc_contentzfNode for object description content.

    Must be the last child node in a :py:class:`desc` node.
    NrO   r'   r   r   r_   r_                 r   r_   c                  ,     e Zd ZdZddgZd fdZ xZS )desc_inlinezNode for a signature fragment in inline text.

    This is for example used for roles like :rst:role:`cpp:expr`.

    This node always has the classes ``sig``, ``sig-inline``,
    and the name of the domain it belongs to.
    rR   z
sig-inlinedomainr   rB   r   rC   r   r   c                x     t                      j        |i |d|i | d                             |           d S )Nrc   rA   )rG   rH   r3   )r   rc   rB   rC   rI   s       r   rH   zdesc_inline.__init__   sH    $8&888888Yv&&&&&r   )rc   r   rB   r   rC   r   r   r   r#   r$   r%   r&   rA   rH   rK   rL   s   @r   rb   rb      sS          l#G' ' ' ' ' ' ' ' ' 'r   rb   c                      e Zd ZdZddgZdS )	desc_namezNode for the main object name.

    For example, in the declaration of a Python class ``MyModule.MyClass``,
    the main name is ``MyClass``.

    This node always has the class ``sig-name``.
    zsig-namedescnameNr#   r$   r%   r&   rA   r'   r   r   rg   rg      s$          :&GGGr   rg   c                      e Zd ZdZddgZdS )desc_addnamezNode for additional name parts for an object.

    For example, in the declaration of a Python class ``MyModule.MyClass``,
    the additional name part is ``MyModule.``.

    This node always has the class ``sig-prename``.
    zsig-prenamedescclassnameNri   r'   r   r   rk   rk      s$          o.GGGr   rk   c                      e Zd ZdZdS )	desc_typez+Node for return types or object type names.NrO   r'   r   r   rn   rn      s        5555r   rn   c                  $     e Zd ZdZd fdZ xZS )desc_returnsz4Node for a "returns" annotation (a la -> in Python).r   r   c                J    dt                                                      z   S )Nz -> rG   astextrW   s    r   rs   zdesc_returns.astext   s    ((((r   rX   )r#   r$   r%   r&   rs   rK   rL   s   @r   rp   rp      sC        >>) ) ) ) ) ) ) ) ) )r   rp   c                  (     e Zd ZdZdZd fdZ xZS )desc_parameterlista  Node for a general parameter list.

    As default the parameter list is written in line with the rest of the signature.
    Set ``multi_line_parameter_list = True`` to describe a multi-line parameter list.
    In that case each parameter will then be written on its own, indented line.
    A trailing comma will be added on the last line
    if ``multi_line_trailing_comma`` is True.
    , r   r   c                L    dt                                                       dS )N()rr   rW   s    r   rs   zdesc_parameterlist.astext   "    &577>>##&&&&r   rX   r#   r$   r%   r&   rV   rs   rK   rL   s   @r   ru   ru      O           ' ' ' ' ' ' ' ' ' 'r   ru   c                  (     e Zd ZdZdZd fdZ xZS )desc_type_parameter_lista  Node for a general type parameter list.

    As default the type parameters list is written in line with the rest of the signature.
    Set ``multi_line_parameter_list = True`` to describe a multi-line type parameters list.
    In that case each type parameter will then be written on its own, indented line.
    A trailing comma will be added on the last line
    if ``multi_line_trailing_comma`` is True.
    rv   r   r   c                L    dt                                                       dS N[]rr   rW   s    r   rs   zdesc_type_parameter_list.astext  rz   r   rX   r{   rL   s   @r   r~   r~     r|   r   r~   c                      e Zd ZdZdS )desc_parameterzNode for a single parameter.NrO   r'   r   r   r   r     s        &&&&r   r   c                      e Zd ZdZdS )desc_type_parameterz!Node for a single type parameter.NrO   r'   r   r   r   r     s        ++++r   r   c                  (     e Zd ZdZdZd fdZ xZS )desc_optionalz6Node for marking optional parts of the parameter list.rv   r   r   c                P    dt                                                      z   dz   S r   rr   rW   s    r   rs   zdesc_optional.astext  s!    UWW^^%%%++r   rX   r{   rL   s   @r   r   r     sI        @@, , , , , , , , , ,r   r   c                      e Zd ZdZdS )desc_annotationz@Node for signature annotations (not Python 3-style annotations).NrO   r'   r   r   r   r   "  s        JJJJr   r   zset[type[desc_sig_element]]SIG_ELEMENTSc                  J     e Zd ZU dZg Zded<   	 dd fdZddd fdZ xZS )desc_sig_elementz<Common parent class of nodes for inline text of a signature.r;   rA   r\   	rawsourcer   textchildrenr	   
attributesr   r   r   c                     t                      j        ||g|R i | | d                             | j                   d S rE   rF   r   r   r   r   r   rI   s        r   rH   zdesc_sig_element.__init__>  sN     	DB8BBBzBBBYt|,,,,,r   F_sig_elementr   boolrC   c               v     t                      j        di | |rt                              |            d S d S )Nr'   )rG   __init_subclass__r   add)clsr   rC   rI   s      r   r   z"desc_sig_element.__init_subclass__D  sL    !!++F+++ 	"S!!!!!	" 	"r   )r\   r\   
r   r   r   r   r   r	   r   r   r   r   )r   r   rC   r   r   r   )	r#   r$   r%   r&   rA   rJ   rH   r   rK   rL   s   @r   r   r   9  s         FFG 02- - - - - - - 8= " " " " " " " " " " " "r   r   c                  0     e Zd ZdZdgZ	 	 dd fdZ xZS )desc_sig_spacez Node for a space in a signature.wr\   rU   r   r   r   r   r	   r   r   r   r   c                D     t                      j        ||g|R i | d S )N)rG   rH   r   s        r   rH   zdesc_sig_space.__init__T  s4     	DB8BBBzBBBBBr   )r\   rU   r   re   rL   s   @r   r   r   O  sb        **eG C C C C C C C C C C Cr   r   Tr   c                      e Zd ZdZdgZdS )desc_sig_namez&Node for an identifier in a signature.nNri   r'   r   r   r   r   ^  s        00eGGGr   r   c                      e Zd ZdZdgZdS )desc_sig_operatorz$Node for an operator in a signature.oNri   r'   r   r   r   r   d          ..eGGGr   r   c                      e Zd ZdZdgZdS )desc_sig_punctuationz$Node for punctuation in a signature.pNri   r'   r   r   r   r   j  r   r   r   c                      e Zd ZdZdgZdS )desc_sig_keywordz*Node for a general keyword in a signature.kNri   r'   r   r   r   r   p          44eGGGr   r   c                      e Zd ZdZdgZdS )desc_sig_keyword_typez;Node for a keyword which is a built-in type in a signature.ktNri   r'   r   r   r   r   v  s        EEfGGGr   r   c                      e Zd ZdZdgZdS )desc_sig_literal_numberz*Node for a numeric literal in a signature.mNri   r'   r   r   r   r   |  r   r   r   c                      e Zd ZdZdgZdS )desc_sig_literal_stringz)Node for a string literal in a signature.sNri   r'   r   r   r   r     s        33eGGGr   r   c                      e Zd ZdZdgZdS )desc_sig_literal_charz,Node for a character literal in a signature.scNri   r'   r   r   r   r     s        66fGGGr   r   c                      e Zd ZdZdS )versionmodifiedzNode for version change entries.

    Currently used for "versionadded", "versionchanged", "deprecated"
    and "versionremoved" directives.
    NrO   r'   r   r   r   r     s           r   r   c                      e Zd ZdZdS )seealsozCustom "see also" admonition.NrO   r'   r   r   r   r     s        ''''r   r   c                      e Zd ZdZdS )productionlistzKNode for grammar production lists.

    Contains ``production`` nodes.
    NrO   r'   r   r   r   r     r`   r   r   c                      e Zd ZdZdS )
productionz*Node for a single grammar production rule.NrO   r'   r   r   r   r     s        4444r   r   c                      e Zd ZdZdS )indexa  Node for index entries.

    This node is created by the ``index`` directive and has one attribute,
    ``entries``.  Its value is a list of 5-tuples of ``(entrytype, entryname,
    target, ignored, key)``.

    *entrytype* is one of "single", "pair", "double", "triple".

    *key* is categorization characters (usually a single character) for
    general index page. For the details of this, please see also:
    :rst:dir:`glossary` and https://github.com/sphinx-doc/sphinx/pull/2320.
    NrO   r'   r   r   r   r     s           r   r   c                      e Zd ZdZdS )centeredzDeprecated.NrO   r'   r   r   r   r     s        r   r   c                      e Zd ZdZdS )ackszSpecial node for "acks" lists.NrO   r'   r   r   r   r     s        ((((r   r   c                      e Zd ZdZdS )hlistzjNode for "horizontal lists", i.e. lists that should be compressed to
    take up less vertical space.
    NrO   r'   r   r   r   r                r   r   c                      e Zd ZdZdS )hlistcolz)Node for one column in a horizontal list.NrO   r'   r   r   r   r     s        3333r   r   c                      e Zd ZdZdS )compact_paragraphz<Node for a compact paragraph (which never makes a <p> node).NrO   r'   r   r   r   r     s        FFFFr   r   c                      e Zd ZdZdS )glossaryzNode to insert a glossary.NrO   r'   r   r   r   r     s        $$$$r   r   c                      e Zd ZdZdS )onlyzANode for "only" directives (conditional inclusion based on tags).NrO   r'   r   r   r   r             KKKKr   r   c                      e Zd ZdZdS )start_of_filezANode to mark start of a new file, used in the LaTeX builder only.NrO   r'   r   r   r   r     r   r   r   c                      e Zd ZdZdS )highlightlangzcInserted to set the highlight language and line number options for
    subsequent code blocks.
    NrO   r'   r   r   r   r     r   r   r   c                      e Zd ZdZdS )tabular_col_specz;Node for specifying tabular columns, used for LaTeX output.NrO   r'   r   r   r   r     s        EEEEr   r   c                      e Zd ZdZdZdS )pending_xrefzNode for cross-references that cannot be resolved without complete
    information about all documents.

    These nodes are resolved before writing output, in
    BuildEnvironment.resolve_references.
    r\   N)r#   r$   r%   r&   rV   r'   r   r   r   r     s"          r   r   c                      e Zd ZdZdS )pending_xref_conditionaE  Node representing a potential way to create a cross-reference and the
    condition in which this way should be used.

    This node is only allowed to be placed under a :py:class:`pending_xref`
    node.  A **pending_xref** node must contain either no **pending_xref_condition**
    nodes or it must only contains **pending_xref_condition** nodes.

    The cross-reference resolver will replace a :py:class:`pending_xref` which
    contains **pending_xref_condition** nodes by the content of exactly one of
    those **pending_xref_condition** nodes' content. It uses the **condition**
    attribute to decide which **pending_xref_condition** node's content to
    use. For example, let us consider how the cross-reference resolver acts on::

        <pending_xref refdomain="py" reftarget="io.StringIO ...>
            <pending_xref_condition condition="resolved">
                <literal>
                    StringIO
            <pending_xref_condition condition="*">
                <literal>
                    io.StringIO

    If the cross-reference resolver successfully resolves the cross-reference,
    then it rewrites the **pending_xref** as::

        <reference>
            <literal>
                StringIO

    Otherwise, if the cross-reference resolution failed, it rewrites the
    **pending_xref** as::

        <reference>
            <literal>
                io.StringIO

    The **pending_xref_condition** node should have **condition** attribute.
    Domains can be store their individual conditions into the attribute to
    filter contents on resolving phase.  As a reserved condition name,
    ``condition="*"`` is used for the fallback of resolution failure.
    Additionally, as a recommended condition name, ``condition="resolved"``
    represents a resolution success in the intersphinx module.

    .. versionadded:: 4.0
    NrO   r'   r   r   r   r     s        + + + +r   r   c                      e Zd ZdZdS )number_referencez4Node for number references, similar to pending_xref.NrO   r'   r   r   r   r   '  s        >>>>r   r   c                      e Zd ZdZdS )download_referencez6Node for download references, similar to pending_xref.NrO   r'   r   r   r   r   +  s        @@@@r   r   c                      e Zd ZdZdS )literal_emphasisz{Node that behaves like `emphasis`, but further text processors are not
    applied (e.g. smartypants for HTML output).
    NrO   r'   r   r   r   r   /  r   r   r   c                      e Zd ZdZdS )literal_strongzyNode that behaves like `strong`, but further text processors are not
    applied (e.g. smartypants for HTML output).
    NrO   r'   r   r   r   r   5  r   r   r   c                      e Zd ZdZdS )manpagez Node for references to manpages.NrO   r'   r   r   r   r   ;  s        ****r   r   appr
   r   r   c                   |                      t                     |                      t                     |                      t                     |                      t                     |                      t
                     |                      t                     |                      t                     |                      t                     |                      t                     |                      t                     |                      t                     |                      t                     |                      t                     |                      t                     |                      t                     |                      t                      t"          D ]}|                      |           |                      t$                     |                      t&                     |                      t(                     |                      t*                     |                      t,                     |                      t.                     |                      t0                     |                      t2                     |                      t4                     |                      t6                     |                      t8                     |                      t:                     |                      t<                     |                      t>                     |                      t@                     |                      tB                     |                      tD                     |                      tF                     |                      tH                     |                      tJ                     |                      tL                     ddddS )NbuiltinT)versionparallel_read_safeparallel_write_safe)'add_noder,   rN   rQ   r[   r_   rb   rg   rk   rn   rp   ru   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   r   s     r   setupr   ?  s   LLLLLL   LL$%%%LLLLLLLLLLLLLL#$$$LL)***LL   LL$%%%LLLL!!!  QLL!!!LLLL   LLLLLLLLLLLLLL"###LLLLLLLLLL!"""LLLL!"""LL#$$$LL!"""LL   LL "#  r   N)r   r
   r   r   )Vr&   
__future__r   typingr   docutilsr   docutils.nodesr   collections.abcr   r   r	   sphinx.applicationr
   sphinx.util.typingr   Noder   r)   Generalr,   r@   
AdmonitionrN   PartInlineTextElementrQ   FixedTextElementr[   r_   rb   rg   rk   desc_classnamern   rp   ru   r~   r   r   r   r   setr   rJ   inliner   r   r   r   r   r   r   r   r   r   r   r   r   r   	Invisibler   r   r   r   r   	paragraphr   r   r   r   r   r   r   r   	referencer   r   emphasisr   strongr   r   r   r'   r   r   <module>r     s
   J J J " " " " " "                   # # # # # # 5((((((&&&&&&))))))444444" " " " "5: " " "@               # # # # #emU]L # # #V
- 
- 
- 
- 
-U],= 
- 
- 
-"
 
 
 
 
5U] 
 
 
 0 0 0 0 0EJe6G0 0 0.    %*elE4J       5=%-   ' ' ' ' '(%,8I ' ' ',' ' ' ' 'EJe6L' ' '/ / / / /EJe6L/ / /  6 6 6 6 6
EL%*@ 6 6 6) ) ) ) )9 ) ) )' ' ' ' 'U\53I ' ' ' ' ' ' ' 'uz5<9O ' ' ' ' ' ' ' 'UZu/E ' ' ', , , , ,%*elE4J , , ,, , , , ,EJe.D , , ,K K K K Kej%,0F K K K -0CEE 1 1 1 1" " " " "u|%; " " ",C C C C C%D C C C C    $4        (t        +$        'd        ,4        .T        .T        ,4        e&(9   ( ( ( ( (e ( ( (    U%u}   5 5 5 5 5U\5+A 5 5 5    EOU\5+<       uz5,   ) ) ) ) )5= ) ) )    EM   4 4 4 4 4u} 4 4 4G G G G G G G G% % % % %u} % % %L L L L L5= L L LL L L L LEM L L L    EM   F F F F Fu} F F F    5<   , , , , ,U\5+< , , ,^? ? ? ? ?u ? ? ?A A A A A A A A    u~'8       U\#4   + + + + +elE2 + + +1 1 1 1 1 1r   