
    -Pho                   :   U d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	 ddl
mZmZ ddlmZ ddlZddlmZmZ dd	lmZ dd
lmZ ddlmZ ddlmZmZmZ 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% ddl&m'Z'm(Z( ddl)m*Z*m+Z+ ddl,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2m3Z3 ddl4m5Z5m6Z6 ddl7m8Z8 erddl9Z9ddl:m;Z;m<Z<m=Z=m>Z>m?Z? ddl@mAZA ddl
mBZBmCZCmDZDmEZE ddl'mFZF ddlGmHZHmIZI ddlJmKZK dd lmLZL dd!lMmNZN dd"lOmPZP dd#lmQZQ dd$lRmSZS dd%lmTZTmUZU dd&lVmWZWmXZX dd'lYmZZZ dd(l[m\Z\m]Z] dd)l^m_Z_ dd*l`maZa dd+l$mbZbmcZcmdZdmeZe dd,lfmgZg dd-lhmiZi dd.ljmkZk dd/llmmZm dd0lnmoZompZp d1Zqd2erd3<   d4Zsd5Zteqetz  Zqeqesz  Zqd6Zu e(jv        ew          Zx G d7 d8          Zy G d9 d:          ZzdS );znSphinx application class and extensibility interface.

Gracefully adapted from the TextPress system by Armin.
    )annotationsN)deque)StringIO)TYPE_CHECKINGoverload)roles)localepackage_dir)bold)Config)BuildEnvironment)ApplicationErrorConfigErrorVersionRequirementError)EventManager)lexer_classes)__)Project)SphinxComponentRegistry)docutilslogging)_StrPath_StrPathProperty)
BuildPhase)progress_message)CatalogRepository)prefixed_warnings)	ensuredirrelpath)Tags)Callable
CollectionIterableSequenceSet)Path)IOAnyFinalLiteral)nodes)ElementNode)Parser)	Directive)	Transform)Lexer)addnodes)Builder)ENUM_ConfigRebuild)DomainIndex)EnvironmentCollector)
Documenter _AutodocProcessDocstringListener)	todo_node)	Extension)_MathsBlockRenderers_MathsInlineRenderers_NodeHandler_NodeHandlerPair)XRefRole)SearchLanguage)Theme)Field)RoleFunctionTitleGetter)/zsphinx.addnodeszsphinx.builders.changeszsphinx.builders.epub3zsphinx.builders.dirhtmlzsphinx.builders.dummyzsphinx.builders.gettextzsphinx.builders.htmlzsphinx.builders.latexzsphinx.builders.linkcheckzsphinx.builders.manpagezsphinx.builders.singlehtmlzsphinx.builders.texinfozsphinx.builders.textzsphinx.builders.xmlzsphinx.configzsphinx.domains.czsphinx.domains.changesetzsphinx.domains.citationzsphinx.domains.cppzsphinx.domains.indexzsphinx.domains.javascriptzsphinx.domains.mathzsphinx.domains.pythonzsphinx.domains.rstzsphinx.domains.stdzsphinx.directiveszsphinx.directives.admonitionszsphinx.directives.codezsphinx.directives.otherzsphinx.directives.patcheszsphinx.extensionzsphinx.parserszsphinx.registryzsphinx.roleszsphinx.transformsz%sphinx.transforms.compact_bullet_listzsphinx.transforms.i18nzsphinx.transforms.referencesz!sphinx.transforms.post_transformsz&sphinx.transforms.post_transforms.codez(sphinx.transforms.post_transforms.imageszsphinx.versioningz*sphinx.environment.collectors.dependenciesz#sphinx.environment.collectors.assetz&sphinx.environment.collectors.metadataz#sphinx.environment.collectors.titlez%sphinx.environment.collectors.toctreeztuple[str, ...]builtin_extensions)zsphinxcontrib.applehelpzsphinxcontrib.devhelpzsphinxcontrib.htmlhelpzsphinxcontrib.serializinghtmlzsphinxcontrib.qthelp)	alabasterzenvironment.picklec                  N   e Zd ZU dZdZded<   ded<    e            Z e            Z e            Z	 e            Z
dej        ej        dddd	d	dddfdd"Zedd$            Zdd%Zdd'Zdd(Z e ed)                    dd,            Zdd-Zdd/Zdd1Zdd2Zddd6Zdd8Zedd;            Ze	 dddB            Z e	 dddE            Z e	 dddH            Z e	 dddK            Z e	 dddN            Z e	 dddQ            Z e	 dddT            Z e	 dd dW            Z e	 dd!dZ            Z e	 dd"d]            Z e	 dd#d`            Z e	 dd$dc            Z e	 dd%df            Z e	 dd&di            Z e	 dd'dl            Z e	 dd(do            Z e	 dd)dr            Z e	 dd*du            Z e	 dd+dx            Z e	 dd,d{            Z e	 dd-d~            Z e	 dd.d            Z e	 dd/d            Z e	 dd0d            Z e	 dd1d            Z e	 dd2d            Z e	 dd3d            Z e	 dd4d            Z e	 dd5d            Z e	 dd6d            Z 	 dd6dZ d7dZ!ddd8dZ"ddd9dZ#d:d;dZ$	 	 d<d=dZ%ddZ&	 d:d>dZ'	 d:d?dZ(	 	 d@dAdZ)	 d:dBdZ*d:dCdZ+	 d:dDdńZ,d:dEdȄZ-	 d:dFdɄZ.	 d:dGd˄Z/	 d:dHdτZ0	 	 	 	 	 	 dIdJdڄZ1	 	 	 	 dKdLdۄZ2dMdބZ3dMd߄Z4	 	 dNdOdZ5ddPdZ6	 d@dQdZ7dRdZ8d:dSdZ9dTdZ:dUdZ;	 d:dVdZ<d:dWdZ=dXdZ>dYdZ?	 	 dZd[dZ@d\dZAd]dZBd^dZCdS (_  Sphinxa  The main application class and extensibility interface.

    :ivar srcdir: Directory containing source.
    :ivar confdir: Directory containing ``conf.py``.
    :ivar doctreedir: Directory for storing pickled doctrees.
    :ivar outdir: Directory for storing build documents.
    Fr)   warningiserrorint
_warncountN r   srcdirstr | os.PathLike[str]confdirstr | os.PathLike[str] | Noneoutdir
doctreedirbuildernamestrconfoverridesdict[str, Any] | NonestatusIO[str] | NonewarningfreshenvbooltagsSequence[str]	verbosityparallel
keep_goingpdbexception_on_warningreturnNonec                
   t           j        | _        || _        d| _        i | _        t                      | _        t          |          	                                | _
        t          |          	                                | _        t          |          	                                | _        | j
                                        s$t          t          d          | j
        z            | j                                        r=| j                                        s$t          t          d          | j        z            | j
        | j        k    rt          t          d                    || _        |t%                      | _        d| _        n|| _        d| _        |t%                      | _        n|| _        d| _        t/          |
          | _        t/          |
          | _        || _        || _        t9          j        | | j        | j                   t=          |           | _        tA          d	          | _!        tD          #                    tI          t          d
                    tJ          j&                   d| _'        tQ          |          | _)        |$| j
        | _*        tW          i |pi           | _,        nMt          |          	                                | _*        tW          j-        | j*        |pi | j)                  | _,        | .                                 | j,        j/        rC| j,        j/        tJ          j&        k    r)ta          t          d          | j,        j/        z            tb          D ]}| 2                    |           | j,        j        D ]}| 2                    |           | 3                    |           | j                                        sHti          t          d                    5  tk          | j                   ddd           n# 1 swxY w Y   | j,        j        rt          d          dz  }tm          |          5  to          | j,        j                  r| j,                            |            ntq          t          d                    	 ddd           n# 1 swxY w Y   | j,        9                                 | j        :                    d| j,                   tw          | j
        | j,        j<                  | _=        | >                    |	          | _?        | @                    |          | _A        | B                                 | C                                 dS )a  Initialize the Sphinx application.

        :param srcdir: The path to the source directory.
        :param confdir: The path to the configuration directory.
            If not given, it is assumed to be the same as ``srcdir``.
        :param outdir: Directory for storing build documents.
        :param doctreedir: Directory for caching pickled doctrees.
        :param buildername: The name of the builder to use.
        :param confoverrides: A dictionary of configuration settings that override the
            settings in the configuration file.
        :param status: A file-like object to write status messages to.
        :param warning: A file-like object to write warnings to.
        :param freshenv: If true, clear the cached environment.
        :param warningiserror: If true, warnings become errors.
        :param tags: A list of tags to apply.
        :param verbosity: The verbosity level.
        :param parallel: The maximum number of parallel jobs to use
            when reading/writing documents.
        :param keep_going: Unused.
        :param pdb: If true, enable the Python debugger on an exception.
        :param exception_on_warning: If true, raise an exception on warnings.
        Nz!Cannot find source directory (%s)z(Output directory (%s) is not a directoryz>Source directory and destination directory cannot be identicalTFr   
   )maxlenzRunning Sphinx v%szWThis project needs at least Sphinx v%s and therefore cannot be built with this version.zmaking output directoryzwhile setting up extension %s:zconf.pyz'setup' as currently defined in conf.py isn't a Python callable. Please modify its definition to make it a callable function. This is needed for conf.py to behave as a Sphinx extension.zconfig-inited)Dr   INITIALIZATIONphaser`   _fresh_env_used
extensionsr   registryr   resolverO   rS   rT   is_dirr   r   existsra   r   _statusquiet_warningrM   r]   rb   _fail_on_warningsrc   _exception_on_warningr   setupr   eventsr   
messagelogloggerinfor   sphinx__display_version__
statuscoder    r^   rQ   r   configread
_init_i18nneeds_sphinxr   rG   setup_extensionpreload_builderr   r   r   callabler   _report_override_warningsemitr   source_suffixproject	_init_envenvcreate_builderbuilder_post_init_env_init_builder)selfrO   rQ   rS   rT   rU   rW   rY   r[   r\   rK   r^   r`   ra   rb   rc   rd   	extensionprefixs                      R/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sphinx/application.py__init__zSphinx.__init__   s   R  .
",002/11 v&&..00v&&..00":..6688{!!## 	"677$+E   ; 	(:(:(<(< 	"=>>L   ;$+%%"STT   !>$,JJDL#DJJ!DLDJ?%-ZZDMM#DM~..!%n!5!5%9"dDL$-888"4(( ',2&6&6&6 	D01122F4NOOO  JJ	?  ;DL ]%8b99DKK#G,,4466DL +dlM4GRSSDK 	 K$
	(6+EEE)2  +*	+   , 	, 	,I  ++++ / 	, 	,I  ++++ 	[))){!!## 	'!"%>"?"?@@ ' '$+&&&' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ; 	899IEF"6** 
 
DK-.. 	K%%d++++%Z    ,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 	--///$+666 t{DK,EFF >>(++ **;77 	 	s%   =PP"%P"AR44R8;R8bool | Nonec                    | j         S )zTrue/False as to whether a new environment was created for this build,
        or None if the environment has not been initialised yet.
        )rl   r   s    r   fresh_env_usedzSphinx.fresh_env_usedN  s    
 ##    c                   t                               t          t          d                    | j        j        d           t          | j        | j        j        | j        j        | j        j	                  }|j
        D ]K}|j        dk    r>|                                r*|                    | j        j        | j        j                   Lt          |j                  }|dgz  }|t           dz  gz  }t#          j        || j        j                  \  | _        }|s| j        j        dk    r)t                               t          d                     dS t                               t          d	                     dS )
zhLoad translated strings from the configured localedirs if enabled in
        the configuration.
        zloading translations [%s]... T)nonlr|   Nr	   endonez#not available for built-in messages)rz   r{   r   r   r   languager   rO   locale_dirssource_encodingcatalogsdomainis_outdatedwrite_mo gettext_allow_fuzzy_translationslistr
   r	   init
translator)r   repocatalogr   has_translations        r   r   zSphinx._init_i18nU  so    	34455t{7KRV 	 	
 	
 	

 !KK#K K'	
 
 } 	 	G~))g.A.A.C.C)  K($+*V   .2$2B-C-Cvh.//+1;-,
 ,
(  	Cdk2d::KK6

#####KK@AABBBBBr   r   c                    | j         t          z  }|s|                                s|                                 S |                     |          S N)rT   ENV_PICKLE_FILENAMErq   _create_fresh_env_load_existing_env)r   r\   filenames      r   r   zSphinx._init_envv  sN    ?%88 	58??,, 	5))+++**8444r   c                2    t          |           }d| _        |S )NT)r   rl   )r   r   s     r   r   zSphinx._create_fresh_env}  s    t$$#
r   zloading pickled environmentr   r&   c                `   	 t          |d          5 }t          j        |          }d d d            n# 1 swxY w Y   |                    |            d| _        nS# t
          $ rF}t                              t          d          |           | 	                                }Y d }~nd }~ww xY w|S )NrbFz
failed: %s)
openpickleloadrw   rl   	Exceptionrz   r{   r   r   )r   r   fr   errs        r   r   zSphinx._load_existing_env  s    	+h%% %k!nn% % % % % % % % % % % % % % %IIdOOO#(D   	+ 	+ 	+KK<((#...((**CCCCCC	+ 
s2   A 3A 7A 7A 
B+%<B&&B+c                b    | j         r'| j                            | j        | j                   d S d S r   )rl   r   
find_filesr   r   r   s    r   r   zSphinx._post_init_env  s9     	;HT\:::::	; 	;r   namec                <    | j                             | |           d S r   )rn   r   r   r   s     r   r   zSphinx.preload_builder  s     %%dD11111r   r3   c                    |)t                               t          d                     d}| j                            | || j                  S )Nz(No builder selected, using default: htmlhtml)rz   r{   r   rn   r   r   r   s     r   r   zSphinx.create_builder  sC    <KKEFFGGGD}++D$AAAr   c                l    | j                                          | j                            d           d S )Nzbuilder-inited)r   r   rx   r   r   s    r   r   zSphinx._init_builder  s3    )*****r   	force_all	filenamesSequence[Path]c                   t           j        | _        	 |r| j                                         n6|r| j                            |           n| j                                         | j                            dd            ne# t          $ rX}| j
        t          z  }|                                r|                                 | j                            d|            d }~ww xY w| j        dk    rv| j        dk    r6t                               t%          t'          d                               n%t                               t%          t'          d                               n| j        dk    rp| j        rd| _        t'          d          }n*| j        dk    rt'          d          }nt'          d          }t                               t%          |                     nu| j        rd| _        t'          d	          }n*| j        dk    rt'          d
          }nt'          d          }t                               t%          |          | j                   | j        dk    rj| j        j        r^t                               d           t                               | j        j        t-          | j                  | j        j        d           | j                                         d S )Nzbuild-finishedr   zbuild finished with problems.zbuild succeeded.   zJbuild finished with problems, 1 warning (with warnings treated as errors).z(build finished with problems, 1 warning.zbuild succeeded, 1 warning.zLbuild finished with problems, %s warnings (with warnings treated as errors).z*build finished with problems, %s warnings.zbuild succeeded, %s warnings. )rS   r   )r   READINGrk   r   	build_allbuild_specificbuild_updaterx   r   r   rT   r   is_fileunlinkrM   r~   rz   r{   r   r   ru   epilogr   rS   r   r   cleanup)r   r   r   r   envfilemsgs         r   buildzSphinx.build  s   '
	 ,&&(((( ,++I6666))+++K-t4444 	 	 	o(;;G   !   K-s333	 ?a!##D$C!D!DEEFFFFD$6!7!7889999_!!% 	8"#9  A%%CDD677KKS		""""% 	:"#9  A%%EFF899KKS		4?333?aDL$7KKOOOKK#%dk22#{2    	s   A-B 
C#ACC#extnamec                r    t                               d|           | j                            | |           dS )zImport and setup a Sphinx extension module.

        Load the extension given by the module *name*.  Use this if your
        extension needs the features provided by another extension.  No-op if
        called twice.
        z[app] setting up extension: %rN)rz   debugrn   load_extension)r   r   s     r   r   zSphinx.setup_extension  s7     	5w???$$T733333r   versiontuple[int, int] | strc                   t          | t                    r| \  }}n3t          t          |                     d          dd                   \  }}||ft
          j        dd         k    r| d| }t          |          dS )a  Check the Sphinx version if requested.

        Compare *version* with the version of the running Sphinx, and abort the
        build when it is too old.

        :param version: The required version in the form of ``major.minor`` or
                        ``(major, minor)``.

        .. versionadded:: 1.0
        .. versionchanged:: 7.1
           Type of *version* now allows ``(major, minor)`` form.
        .N   )
isinstancetuplemaprL   splitr|   version_infor   )r   majorminorreqs       r   require_sphinxzSphinx.require_sphinx  s     gu%% 	<"LE55sGMM#$6$6rr$:;;LE55>F/333$$U$$C)#... 43r     eventLiteral['config-inited']callback Callable[[Sphinx, Config], None]priorityc                    d S r   rN   r   r   r   r   s       r   connectzSphinx.connect  	     cr   Literal['builder-inited']Callable[[Sphinx], None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   Literal['env-get-outdated']QCallable[[Sphinx, BuildEnvironment, Set[str], Set[str], Set[str]], Sequence[str]]c                    d S r   rN   r   s       r   r   zSphinx.connect  	     cr   Literal['env-before-read-docs']5Callable[[Sphinx, BuildEnvironment, list[str]], None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   Literal['env-purge-doc']/Callable[[Sphinx, BuildEnvironment, str], None]c                    d S r   rN   r   s       r   r   zSphinx.connect%  r   r   Literal['source-read'](Callable[[Sphinx, str, list[str]], None]c                    d S r   rN   r   s       r   r   zSphinx.connect-  r   r   Literal['include-read'].Callable[[Sphinx, Path, str, list[str]], None]c                    d S r   rN   r   s       r   r   zSphinx.connect5  r   r   Literal['doctree-read'](Callable[[Sphinx, nodes.document], None]c                    d S r   rN   r   s       r   r   zSphinx.connect=  r   r   Literal['env-merge-info']FCallable[[Sphinx, BuildEnvironment, Set[str], BuildEnvironment], None]c                    d S r   rN   r   s       r   r   zSphinx.connectE  r   r   Literal['env-updated'])Callable[[Sphinx, BuildEnvironment], str]c                    d S r   rN   r   s       r   r   zSphinx.connectO  r   r   Literal['env-get-updated']3Callable[[Sphinx, BuildEnvironment], Iterable[str]]c                    d S r   rN   r   s       r   r   zSphinx.connectW  r   r    Literal['env-check-consistency']*Callable[[Sphinx, BuildEnvironment], None]c                    d S r   rN   r   s       r   r   zSphinx.connect_  r   r   Literal['write-started']!Callable[[Sphinx, Builder], None]c                    d S r   rN   r   s       r   r   zSphinx.connectg  r   r   Literal['doctree-resolved']-Callable[[Sphinx, nodes.document, str], None]c                    d S r   rN   r   s       r   r   zSphinx.connecto  r   r   Literal['missing-reference']fCallable[[Sphinx, BuildEnvironment, addnodes.pending_xref, nodes.TextElement], nodes.reference | None]c                    d S r   rN   r   s       r   r   zSphinx.connectw  	     cr   !Literal['warn-missing-reference']>Callable[[Sphinx, Domain, addnodes.pending_xref], bool | None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   Literal['build-finished']*Callable[[Sphinx, Exception | None], None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   Literal['html-collect-pages']=Callable[[Sphinx], Iterable[tuple[str, dict[str, Any], str]]]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   Literal['html-page-context']HCallable[[Sphinx, str, str, dict[str, Any], nodes.document], str | None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r    Literal['linkcheck-process-uri']#Callable[[Sphinx, str], str | None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   'Literal['object-description-transform']9Callable[[Sphinx, str, str, addnodes.desc_content], None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   $Literal['autodoc-process-docstring']r:   c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   +Literal['autodoc-before-process-signature']#Callable[[Sphinx, Any, bool], None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   $Literal['autodoc-process-signature']Callable[[Sphinx, Literal['module', 'class', 'exception', 'function', 'method', 'attribute'], str, Any, dict[str, bool], str | None, str | None], tuple[str | None, str | None] | None]c                    d S r   rN   r   s       r   r   zSphinx.connect  s	    & cr    Literal['autodoc-process-bases']>Callable[[Sphinx, str, Any, dict[str, bool], list[str]], None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   Literal['autodoc-skip-member']Callable[[Sphinx, Literal['module', 'class', 'exception', 'function', 'method', 'attribute'], str, Any, bool, dict[str, bool]], bool]c                    d S r   rN   r   s       r   r   zSphinx.connect  s	    $ cr   Literal['todo-defined']#Callable[[Sphinx, todo_node], None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   Literal['viewcode-find-source']aCallable[[Sphinx, str], tuple[str, dict[str, tuple[Literal['class', 'def', 'other'], int, int]]]]c                    d S r   rN   r   s       r   r   zSphinx.connect  r  r   #Literal['viewcode-follow-imported'](Callable[[Sphinx, str, str], str | None]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   Callable[..., Any]c                    d S r   rN   r   s       r   r   zSphinx.connect  r   r   c                z    | j                             |||          }t                              d||||           |S )a?  Register *callback* to be called when *event* is emitted.

        For details on available core events and the arguments of callback
        functions, please see :ref:`events`.

        :param event: The name of target event
        :param callback: Callback function for the event
        :param priority: The priority of the callback.  The callbacks will be invoked
                         in order of *priority* (ascending).
        :return: A listener ID.  It can be used for :meth:`disconnect`.

        .. versionchanged:: 3.0

           Support *priority*
        z*[app] connecting event %r (%d): %r [id=%s])rx   r   rz   r   )r   r   r   r   listener_ids        r   r   zSphinx.connect!  sJ    $ k))%8DD8	
 	
 	
 r   rH  c                p    t                               d|           | j                            |           dS )zvUnregister callback by *listener_id*.

        :param listener_id: A listener_id that :meth:`connect` returns
        z"[app] disconnecting event: [id=%s]N)rz   r   rx   
disconnect)r   rH  s     r   rJ  zSphinx.disconnect=  s5    
 	9;GGG{+++++r   )allowed_exceptionsargsr(   rK  tuple[type[Exception], ...]	list[Any]c               .     | j         j        |g|R d|iS )a  Emit *event* and pass *arguments* to the callback functions.

        Return the return values of all callbacks as a list.  Do not emit core
        Sphinx events in extensions!

        :param event: The name of event that will be emitted
        :param args: The arguments for the event
        :param allowed_exceptions: The list of exceptions that are allowed in the callbacks

        .. versionchanged:: 3.1

           Added *allowed_exceptions* to specify path-through exceptions
        rK  )rx   r   r   r   rK  rL  s       r   r   zSphinx.emitE  s*    &  t{TTTTASTTTr   c               .     | j         j        |g|R d|iS )a  Emit *event* and pass *arguments* to the callback functions.

        Return the result of the first callback that doesn't return ``None``.

        :param event: The name of event that will be emitted
        :param args: The arguments for the event
        :param allowed_exceptions: The list of exceptions that are allowed in the callbacks

        .. versionadded:: 0.5
        .. versionchanged:: 3.1

           Added *allowed_exceptions* to specify path-through exceptions
        rK  )rx   emit_firstresultrP  s       r   rR  zSphinx.emit_firstresultZ  s:    & ,t{+

 
 
-?
 
 	
r   r   type[Builder]overridec                >    | j                             ||           dS )a#  Register a new builder.

        :param builder: A builder class
        :param override: If true, install the builder forcedly even if another builder
                         is already installed as the same name

        .. versionchanged:: 1.8
           Add *override* keyword.
        rT  N)rn   add_builder)r   r   rT  s      r   rW  zSphinx.add_builders  s%     	!!'H!=====r   r   defaultrebuildr5   typestype | Collection[type] | ENUMdescriptionc                    t                               d||||f           | j                            |||||           dS )a  Register a configuration value.

        This is necessary for Sphinx to recognize new values and set default
        values accordingly.


        :param name: The name of the configuration value.  It is recommended to be prefixed
                     with the extension name (ex. ``html_logo``, ``epub_title``)
        :param default: The default value of the configuration.
        :param rebuild: The condition of rebuild.  It must be one of those values:

                        * ``'env'`` if a change in the setting only takes effect when a
                          document is parsed -- this means that the whole environment must be
                          rebuilt.
                        * ``'html'`` if a change in the setting needs a full rebuild of HTML
                          documents.
                        * ``''`` if a change in the setting will not need any special rebuild.
        :param types: The type of configuration value.  A list of types can be specified.  For
                      example, ``[str]`` is used to describe a configuration that takes string
                      value.
        :param description: A short description of the configuration value.

        .. versionchanged:: 0.4
           If the *default* value is a callable, it will be called with the
           config object as its argument in order to get the default value.
           This can be used to implement config values whose default depends on
           other values.

        .. versionchanged:: 0.6
           Changed *rebuild* from a simple boolean (equivalent to ``''`` or
           ``'env'``) to a string.  However, booleans are still accepted and
           converted internally.

        .. versionadded:: 7.4
           The *description* parameter.
        z[app] adding config value: %r)r   rX  rY  rZ  r\  N)rz   r   r   add)r   r   rX  rY  rZ  r\  s         r   add_config_valuezSphinx.add_config_value  sY    X 	4tWgu6UVVV# 	 	
 	
 	
 	
 	
r   c                p    t                               d|           | j                            |           dS )zRegister an event called *name*.

        This is needed to be able to emit it.

        :param name: The name of the event
        z[app] adding event: %rN)rz   r   rx   r^  r   s     r   	add_eventzSphinx.add_event  s3     	-t444r   translator_classtype[nodes.NodeVisitor]c                @    | j                             |||           dS )a  Register or override a Docutils translator class.

        This is used to register a custom output translator or to replace a
        builtin translator.  This allows extensions to use a custom translator
        and define custom nodes for the translator (see :meth:`add_node`).

        :param name: The name of the builder for the translator
        :param translator_class: A translator class
        :param override: If true, install the translator forcedly even if another translator
                         is already installed as the same name

        .. versionadded:: 1.3
        .. versionchanged:: 1.8
           Add *override* keyword.
        rV  N)rn   add_translator)r   r   rb  rT  s       r   set_translatorzSphinx.set_translator  s(    * 	$$T+;h$OOOOOr   nodetype[Element]kwargsr@   c                   t                               d||f           |sDt          j        |          r0t                               t          d          |j        dd           t          j        |            | j        j	        |fi | dS )a  Register a Docutils node class.

        This is necessary for Docutils internals.  It may also be used in the
        future to validate nodes in the parsed documents.

        :param node: A node class
        :param kwargs: Visitor functions for each builder (see below)
        :param override: If true, install the node forcedly even if another node is already
                         installed as the same name

        Node visitor functions for the Sphinx HTML, LaTeX, text and manpage
        writers can be given as keyword arguments: the keyword should be one or
        more of ``'html'``, ``'latex'``, ``'text'``, ``'man'``, ``'texinfo'``
        or any other supported translators, the value a 2-tuple of ``(visit,
        depart)`` methods.  ``depart`` can be ``None`` if the ``visit``
        function raises :exc:`docutils.nodes.SkipNode`.  Example:

        .. code-block:: python

           class math(docutils.nodes.Element): ...

           def visit_math_html(self, node):
               self.body.append(self.starttag(node, 'math'))

           def depart_math_html(self, node):
               self.body.append('</math>')

           app.add_node(math, html=(visit_math_html, depart_math_html))

        Obviously, translators for which you don't specify visitor methods will
        choke on the node when encountered in a document to translate.

        .. versionchanged:: 0.5
           Added the support for keyword arguments giving visit functions.
        z[app] adding node: %rzDnode class %r is already registered, its visitors will be overriddenappadd_nodetypesubtypeN)
rz   r   r   is_node_registeredr[   r   __name__register_nodern   add_translation_handlers)r   rg  rT  ri  s       r   rl  zSphinx.add_node  s    R 	,tVn=== 		H7== 		NN6  "     	t$$$..t>>v>>>>>r   figtypetitle_getterTitleGetter | None!tuple[_NodeHandler, _NodeHandler]c                b    | j                             ||||            | j        |fd|i| dS )a_  Register a Docutils node class as a numfig target.

        Sphinx numbers the node automatically. And then the users can refer it
        using :rst:role:`numref`.

        :param node: A node class
        :param figtype: The type of enumerable nodes.  Each figtype has individual numbering
                        sequences.  As system figtypes, ``figure``, ``table`` and
                        ``code-block`` are defined.  It is possible to add custom nodes to
                        these default figtypes.  It is also possible to define new custom
                        figtype if a new figtype is given.
        :param title_getter: A getter function to obtain the title of node.  It takes an
                             instance of the enumerable node, and it must return its title as
                             string.  The title is used to the default title of references for
                             :rst:role:`ref`.  By default, Sphinx searches
                             ``docutils.nodes.caption`` or ``docutils.nodes.title`` from the
                             node as a title.
        :param kwargs: Visitor functions for each builder (same as :meth:`add_node`)
        :param override: If true, install the node forcedly even if another node is already
                         installed as the same name

        .. versionadded:: 1.4
        rV  rT  N)rn   add_enumerable_noderl  )r   rg  rt  ru  rT  ri  s         r   ry  zSphinx.add_enumerable_node  sS    > 	))'<( 	* 	
 	
 	
 	d88X888888r   clstype[Directive]c                    t                               d||f           |s?t          j        |          r+t                               t          d          |dd           t          j        ||           dS )a  Register a Docutils directive.

        :param name: The name of the directive
        :param cls: A directive class
        :param override: If false, do not install it if another directive
                         is already installed as the same name
                         If true, unconditionally install the directive.

        For example, a custom directive named ``my-directive`` would be added
        like this:

        .. code-block:: python

           from docutils.parsers.rst import Directive, directives

           class MyDirective(Directive):
               has_content = True
               required_arguments = 1
               optional_arguments = 0
               final_argument_whitespace = True
               option_spec = {
                   'class': directives.class_option,
                   'name': directives.unchanged,
               }

               def run(self):
                   pass

           def setup(app):
               app.add_directive('my-directive', MyDirective)

        For more details, see `the Docutils docs
        <https://docutils.sourceforge.io/docs/howto/rst-directives.html>`__ .

        .. versionchanged:: 0.6
           Docutils 0.5-style directive classes are now supported.
        .. deprecated:: 1.8
           Docutils 0.4-style (function based) directives support is deprecated.
        .. versionchanged:: 1.8
           Add *override* keyword.
        z[app] adding directive: %rz=directive %r is already registered and will not be overriddenrk  add_directiverm  N)rz   r   r   is_directive_registeredr[   r   register_directive)r   r   rz  rT  s       r   r}  zSphinx.add_directive0  s    X 	1D#;??? 	H<TBB 	NNRSS'	     	#D#.....r   rolec                    t                               d||f           |s?t          j        |          r+t                               t          d          |dd           t          j        ||           dS )a
  Register a Docutils role.

        :param name: The name of role
        :param role: A role function
        :param override: If false, do not install it if another role
                         is already installed as the same name
                         If true, unconditionally install the role.

        For more details about role functions, see `the Docutils docs
        <https://docutils.sourceforge.io/docs/howto/rst-roles.html>`__ .

        .. versionchanged:: 1.8
           Add *override* keyword.
        z[app] adding role: %r8role %r is already registered and will not be overriddenrk  add_rolerm  N)rz   r   r   is_role_registeredr[   r   register_role)r   r   r  rT  s       r   r  zSphinx.add_roleg  s     	,tTl;;; 	H7== 	NNMNN"	     	tT*****r   	nodeclass
type[Node]c                   t                               d||f           |s?t          j        |          r+t                               t          d          |dd           t          j        ||          }t          j        ||           dS )a  Register a generic Docutils role.

        Register a Docutils role that does nothing but wrap its contents in the
        node given by *nodeclass*.

        :param override: If false, do not install it if another role
                         is already installed as the same name
                         If true, unconditionally install the role.

        .. versionadded:: 0.6
        .. versionchanged:: 1.8
           Add *override* keyword.
        z[app] adding generic role: %rr  rk  add_generic_rolerm  N)	rz   r   r   r  r[   r   r   GenericRoler  )r   r   r  rT  r  s        r   r  zSphinx.add_generic_role  s    $ 	4tY6GHHH 	H7== 	NNMNN*	      y11tT*****r   r   type[Domain]c                >    | j                             ||           dS )ap  Register a domain.

        :param domain: A domain class
        :param override: If false, do not install it if another domain
                         is already installed as the same name
                         If true, unconditionally install the domain.

        .. versionadded:: 1.0
        .. versionchanged:: 1.8
           Add *override* keyword.
        rV  N)rn   
add_domain)r   r   rT  s      r   r  zSphinx.add_domain  s%     	  ( ;;;;;r   c                B    | j                             ||||           dS )aN  Register a Docutils directive in a domain.

        Like :meth:`add_directive`, but the directive is added to the domain
        named *domain*.

        :param domain: The name of target domain
        :param name: A name of directive
        :param cls: A directive class
        :param override: If false, do not install it if another directive
                         is already installed as the same name
                         If true, unconditionally install the directive.

        .. versionadded:: 1.0
        .. versionchanged:: 1.8
           Add *override* keyword.
        rV  N)rn   add_directive_to_domain)r   r   r   rz  rT  s        r   r  zSphinx.add_directive_to_domain  s)    & 	--fdC(-SSSSSr   RoleFunction | XRefRolec                B    | j                             ||||           dS )a;  Register a Docutils role in a domain.

        Like :meth:`add_role`, but the role is added to the domain named
        *domain*.

        :param domain: The name of the target domain
        :param name: The name of the role
        :param role: The role function
        :param override: If false, do not install it if another role
                         is already installed as the same name
                         If true, unconditionally install the role.

        .. versionadded:: 1.0
        .. versionchanged:: 1.8
           Add *override* keyword.
        rV  N)rn   add_role_to_domain)r   r   r   r  rT  s        r   r  zSphinx.add_role_to_domain  s)    . 	((th(OOOOOr   indextype[Index]	_overridec                <    | j                             ||           dS )a  Register a custom index for a domain.

        Add a custom *index* class to the domain named *domain*.

        :param domain: The name of the target domain
        :param index: The index class
        :param override: If false, do not install it if another index
                         is already installed as the same name
                         If true, unconditionally install the index.

        .. versionadded:: 1.0
        .. versionchanged:: 1.8
           Add *override* keyword.
        N)rn   add_index_to_domain)r   r   r  r  s       r   r  zSphinx.add_index_to_domain  s"    " 	))&%88888r   directivenamerolenameindextemplate
parse_nodeFCallable[[BuildEnvironment, str, addnodes.desc_signature], str] | Noneref_nodeclasstype[nodes.TextElement] | Noneobjnamedoc_field_typesSequence[Field]c	           
     J    | j                             ||||||||           dS )aX
  Register a new object type.

        This method is a very convenient way to add a new :term:`object` type
        that can be cross-referenced.  It will do this:

        - Create a new directive (called *directivename*) for documenting an
          object.  It will automatically add index entries if *indextemplate*
          is nonempty; if given, it must contain exactly one instance of
          ``%s``.  See the example below for how the template will be
          interpreted.
        - Create a new role (called *rolename*) to cross-reference to these
          object descriptions.
        - If you provide *parse_node*, it must be a function that takes a
          string and a docutils node, and it must populate the node with
          children parsed from the string.  It must then return the name of the
          item to be used in cross-referencing and index entries.  See the
          :file:`conf.py` file in the source for this documentation for an
          example.
        - The *objname* (if not given, will default to *directivename*) names
          the type of object.  It is used when listing objects, e.g. in search
          results.

        For example, if you have this call in a custom Sphinx extension::

           app.add_object_type('directive', 'dir', 'pair: %s; directive')

        you can use this markup in your documents::

           .. rst:directive:: function

              Document a function.

           <...>

           See also the :rst:dir:`function` directive.

        For the directive, an index entry will be generated as if you had prepended ::

           .. index:: pair: function; directive

        The reference node will be of class ``literal`` (so it will be rendered
        in a proportional font, as appropriate for code) unless you give the
        *ref_nodeclass* argument, which must be a docutils node class.  Most
        useful are ``docutils.nodes.emphasis`` or ``docutils.nodes.strong`` --
        you can also use ``docutils.nodes.generated`` if you want no further
        text decoration.  If the text should be treated as literal (e.g. no
        smart quote replacement), but not have typewriter styling, use
        ``sphinx.addnodes.literal_emphasis`` or
        ``sphinx.addnodes.literal_strong``.

        For the role content, you have the same syntactical possibilities as
        for standard Sphinx roles (see :ref:`xref-syntax`).

        If *override* is True, the given object_type is forcedly installed even if
        an object_type having the same name is already installed.

        .. versionchanged:: 1.8
           Add *override* keyword.
        rV  N)rn   add_object_type)	r   r  r  r  r  r  r  r  rT  s	            r   r  zSphinx.add_object_type  sF    N 	%% 	& 		
 		
 		
 		
 		
r   c                F    | j                             ||||||           dS )ar  Register a new crossref object type.

        This method is very similar to :meth:`~Sphinx.add_object_type` except that the
        directive it generates must be empty, and will produce no output.

        That means that you can add semantic targets to your sources, and refer
        to them using custom roles instead of generic ones (like
        :rst:role:`ref`).  Example call::

           app.add_crossref_type(
               'topic', 'topic', 'single: %s', docutils.nodes.emphasis
           )

        Example usage::

           .. topic:: application API

           The application API
           -------------------

           Some random text here.

           See also :topic:`this section <application API>`.

        (Of course, the element following the ``topic`` directive needn't be a
        section.)


        :param override: If false, do not install it if another cross-reference type
                         is already installed as the same name
                         If true, unconditionally install the cross-reference type.

        .. versionchanged:: 1.8
           Add *override* keyword.
        rV  N)rn   add_crossref_type)r   r  r  r  r  r  rT  s          r   r  zSphinx.add_crossref_type>  s@    X 	'' 	( 	
 	
 	
 	
 	
r   	transformtype[Transform]c                :    | j                             |           dS )aR  Register a Docutils transform to be applied after parsing.

        Add the standard docutils :class:`~docutils.transforms.Transform`
        subclass *transform* to the list of transforms that are applied after
        Sphinx parses a reST document.

        :param transform: A transform class

        .. list-table:: priority range categories for Sphinx transforms
           :widths: 20,80

           * - Priority
             - Main purpose in Sphinx
           * - 0-99
             - Fix invalid nodes by docutils. Translate a doctree.
           * - 100-299
             - Preparation
           * - 300-399
             - early
           * - 400-699
             - main
           * - 700-799
             - Post processing. Deadline to modify text and referencing.
           * - 800-899
             - Collect referencing and referenced nodes. Domain processing.
           * - 900-999
             - Finalize and clean up.

        refs: `Transform Priority Range Categories`__

        __ https://docutils.sourceforge.io/docs/ref/transforms.html#transform-priority-range-categories
        N)rn   add_transformr   r  s     r   r  zSphinx.add_transforms  s!    B 	##I.....r   c                :    | j                             |           dS )a-  Register a Docutils transform to be applied before writing.

        Add the standard docutils :class:`~docutils.transforms.Transform`
        subclass *transform* to the list of transforms that are applied before
        Sphinx writes a document.

        :param transform: A transform class
        N)rn   add_post_transformr  s     r   r  zSphinx.add_post_transform  s      	((33333r   
str | Noneloading_methodc                    |dk    rd|d<   n|dk    rd|d<   |pd} | j         j        |fd|i| t          j        t                    5   | j        j        |fd|i| ddd           dS # 1 swxY w Y   dS )a)
  Register a JavaScript file to include in the HTML output.

        :param filename: The name of a JavaScript file that the default HTML
                         template will include. It must be relative to the HTML
                         static path, or a full URI with scheme, or ``None`` .
                         The ``None`` value is used to create an inline
                         ``<script>`` tag.  See the description of *kwargs*
                         below.
        :param priority: Files are included in ascending order of priority. If
                         multiple JavaScript files have the same priority,
                         those files will be included in order of registration.
                         See list of "priority range for JavaScript files" below.
        :param loading_method: The loading method for the JavaScript file.
                               Either ``'async'`` or ``'defer'`` are allowed.
        :param kwargs: Extra keyword arguments are included as attributes of the
                       ``<script>`` tag.  If the special keyword argument
                       ``body`` is given, its value will be added as the content
                       of the  ``<script>`` tag.

        Example::

            app.add_js_file('example.js')
            # => <script src="_static/example.js"></script>

            app.add_js_file('example.js', loading_method='async')
            # => <script src="_static/example.js" async="async"></script>

            app.add_js_file(None, body="var myVariable = 'foo';")
            # => <script>var myVariable = 'foo';</script>

        .. list-table:: priority range for JavaScript files
           :widths: 20,80

           * - Priority
             - Main purpose in Sphinx
           * - 200
             - default priority for built-in JavaScript files
           * - 500
             - default priority for extensions
           * - 800
             - default priority for :confval:`html_js_files`

        A JavaScript file can be added to the specific HTML page when an extension
        calls this method on :event:`html-page-context` event.

        .. versionadded:: 0.5

        .. versionchanged:: 1.8
           Renamed from ``app.add_javascript()``.
           And it allows keyword arguments as attributes of script tag.

        .. versionchanged:: 3.5
           Take priority argument.  Allow to add a JavaScript file to the specific page.
        .. versionchanged:: 4.4
           Take loading_method argument.  Allow to change the loading method of the
           JavaScript file.
        asyncdeferr   r   N)rn   add_js_file
contextlibsuppressAttributeErrorr   )r   r   r   r  ri  s        r   r  zSphinx.add_js_file  s    @ W$$%F7OOw&&%F7O>r!!(HHXHHHH 00 	 	$DL$ #+/5  	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	   
A--A14A1c                    t                               d|            | j        j        |fd|i| t	          j        t                    5   | j        j        |fd|i| ddd           dS # 1 swxY w Y   dS )ay	  Register a stylesheet to include in the HTML output.

        :param filename: The name of a CSS file that the default HTML
                         template will include. It must be relative to the HTML
                         static path, or a full URI with scheme.
        :param priority: Files are included in ascending order of priority. If
                         multiple CSS files have the same priority,
                         those files will be included in order of registration.
                         See list of "priority range for CSS files" below.
        :param kwargs: Extra keyword arguments are included as attributes of the
                       ``<link>`` tag.

        Example::

            app.add_css_file('custom.css')
            # => <link rel="stylesheet" href="_static/custom.css" type="text/css" />

            app.add_css_file('print.css', media='print')
            # => <link rel="stylesheet" href="_static/print.css"
            #          type="text/css" media="print" />

            app.add_css_file('fancy.css', rel='alternate stylesheet', title='fancy')
            # => <link rel="alternate stylesheet" href="_static/fancy.css"
            #          type="text/css" title="fancy" />

        .. list-table:: priority range for CSS files
           :widths: 20,80

           * - Priority
             - Main purpose in Sphinx
           * - 200
             - default priority for built-in CSS files
           * - 500
             - default priority for extensions
           * - 800
             - default priority for :confval:`html_css_files`

        A CSS file can be added to the specific HTML page when an extension calls
        this method on :event:`html-page-context` event.

        .. versionadded:: 1.0

        .. versionchanged:: 1.6
           Optional ``alternate`` and/or ``title`` attributes can be supplied
           with the arguments *alternate* (a Boolean) and *title* (a string).
           The default is no title and *alternate* = ``False``. For
           more information, refer to the `documentation
           <https://mdn.io/Web/CSS/Alternative_style_sheets>`__.

        .. versionchanged:: 1.8
           Renamed from ``app.add_stylesheet()``.
           And it allows keyword arguments as attributes of link tag.

        .. versionchanged:: 3.5
           Take priority argument.  Allow to add a CSS file to the specific page.
        z[app] adding stylesheet: %rr   N)	rz   r   rn   add_css_filesr  r  r  r   add_css_file)r   r   r   ri  s       r   r  zSphinx.add_css_file  s    r 	2H===##HJJxJ6JJJ 00 	 	%DL% #+/5  	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	r  packagenameoptionsafter_hyperrefc                >    | j                             |||           dS )a  Register a package to include in the LaTeX source code.

        Add *packagename* to the list of packages that LaTeX source code will
        include.  If you provide *options*, it will be taken to the `\usepackage`
        declaration.  If you set *after_hyperref* truthy, the package will be
        loaded after ``hyperref`` package.

        .. code-block:: python

           app.add_latex_package('mypackage')
           # => \usepackage{mypackage}
           app.add_latex_package('mypackage', 'foo,bar')
           # => \usepackage[foo,bar]{mypackage}

        .. versionadded:: 1.3
        .. versionadded:: 3.1

           *after_hyperref* option.
        N)rn   add_latex_package)r   r  r  r  s       r   r  zSphinx.add_latex_package-  s$    , 	''WnMMMMMr   aliaslexertype[Lexer]c                T    t                               d||f           |t          |<   dS )aI  Register a new lexer for source code.

        Use *lexer* to highlight code blocks with the given language *alias*.

        .. versionadded:: 0.6
        .. versionchanged:: 2.1
           Take a lexer class as an argument.
        .. versionchanged:: 4.0
           Removed support for lexer instances as an argument.
        z[app] adding lexer: %rN)rz   r   r   )r   r  r  s      r   	add_lexerzSphinx.add_lexerE  s-     	-u~>>>$er   type[Documenter]c                    t                               d|           ddlm} | j                            |j        |           |                     d|j        z   ||           dS )a  Register a new documenter class for the autodoc extension.

        Add *cls* as a new documenter class for the :mod:`sphinx.ext.autodoc`
        extension.  It must be a subclass of
        :class:`sphinx.ext.autodoc.Documenter`.  This allows auto-documenting
        new types of objects.  See the source of the autodoc module for
        examples on how to subclass :class:`~sphinx.ext.autodoc.Documenter`.

        If *override* is True, the given *cls* is forcedly installed even if
        a documenter having the same name is already installed.

        See :ref:`autodoc_ext_tutorial`.

        .. versionadded:: 0.6
        .. versionchanged:: 2.2
           Add *override* keyword.
        z[app] adding autodocumenter: %rr   )AutodocDirectiveautorV  N)rz   r   sphinx.ext.autodoc.directiver  rn   add_documenterobjtyper}  )r   rz  rT  r  s       r   add_autodocumenterzSphinx.add_autodocumenterS  sn    $ 	6<<<AAAAAA$$S[#6666CK/1AHUUUUUr   typrn  getterCallable[[Any, str, Any], Any]c                v    t                               d||f           | j                            ||           dS )a  Register a new ``getattr``-like function for the autodoc extension.

        Add *getter*, which must be a function with an interface compatible to
        the :func:`getattr` builtin, as the autodoc attribute getter for
        objects that are instances of *typ*.  All cases where autodoc needs to
        get an attribute of a type are then handled by this function instead of
        :func:`getattr`.

        .. versionadded:: 0.6
        z#[app] adding autodoc attrgetter: %rN)rz   r   rn   add_autodoc_attrgetter)r   r  r  s      r   r  zSphinx.add_autodoc_attrgetterk  s;     	:S&MJJJ,,S&99999r   type[SearchLanguage]c                \    t                               d|           ddlm} |||j        <   dS )a  Register a new language for the HTML search index.

        Add *cls*, which must be a subclass of
        :class:`sphinx.search.SearchLanguage`, as a support language for
        building the HTML full-text search index.  The class must have a *lang*
        attribute that indicates the language it should be used for.  See
        :confval:`html_search_language`.

        .. versionadded:: 1.1
        z [app] adding search language: %rr   )	languagesN)rz   r   sphinx.searchr  lang)r   rz  r  s      r   add_search_languagezSphinx.add_search_language{  s=     	7===++++++!	#(r   suffixfiletypec                @    | j                             |||           dS )ao  Register a suffix of source files.

        Same as :confval:`source_suffix`.  The users can override this
        using the config setting.

        :param override: If false, do not install it the same suffix
                         is already installed.
                         If true, unconditionally install the suffix.

        .. versionadded:: 1.8
        rV  N)rn   add_source_suffix)r   r  r  rT  s       r   r  zSphinx.add_source_suffix  s'     	''8'LLLLLr   parsertype[Parser]c                >    | j                             ||           dS )a  Register a parser class.

        :param override: If false, do not install it if another parser
                         is already installed for the same suffix.
                         If true, unconditionally install the parser.

        .. versionadded:: 1.4
        .. versionchanged:: 1.8
           *suffix* argument is deprecated.  It only accepts *parser* argument.
           Use :meth:`add_source_suffix` API to register suffix instead.
        .. versionchanged:: 1.8
           Add *override* keyword.
        rV  N)rn   add_source_parser)r   r  rT  s      r   r  zSphinx.add_source_parser  s%     	'''BBBBBr   	collectortype[EnvironmentCollector]c                v    t                               d|            |                                |            dS )zxRegister an environment collector class.

        Refer to :ref:`collector-api`.

        .. versionadded:: 1.6
        z&[app] adding environment collector: %rN)rz   r   enable)r   r  s     r   add_env_collectorzSphinx.add_env_collector  s9     	=yIII	4     r   
theme_pathc                t    t                               d||           | j                            ||           dS )zRegister a HTML Theme.

        The *name* is a name of theme, and *theme_path* is a full path to the
        theme (refs: :ref:`distribute-your-theme`).

        .. versionadded:: 1.6
        z[app] adding HTML theme: %r, %rN)rz   r   rn   add_html_theme)r   r   r  s      r   r  zSphinx.add_html_theme  s9     	6jIII$$T:66666r   inline_renderers_MathsInlineRenderers | Noneblock_renderers_MathsBlockRenderers | Nonec                >    | j                             |||           dS )a  Register a math renderer for HTML.

        The *name* is a name of math renderer.  Both *inline_renderers* and
        *block_renderers* are used as visitor functions for the HTML writer:
        the former for inline math node (``nodes.math``), the latter for
        block math node (``nodes.math_block``).  Regarding visitor functions,
        see :meth:`add_node` for details.

        .. versionadded:: 1.8

        N)rn   add_html_math_renderer)r   r   r  r  s       r   r  zSphinx.add_html_math_renderer  s%    " 	,,T3C_UUUUUr   r   
locale_dirc                r    t          j        |g| j        j        |           t          j        ||           dS )zRegister a message catalog.

        :param catalog: The name of the catalog
        :param locale_dir: The base path of the message catalog

        For more details, see :func:`sphinx.locale.get_translation()`.

        .. versionadded:: 1.8
        N)r	   r   r   r   init_console)r   r   r  s      r   add_message_catalogzSphinx.add_message_catalog  s8     	ZL$+"6@@@J00000r   c                T   |dk    r!d}t          d          }t          d          }n9|dk    r!d}t          d          }t          d          }nt          d	|z            | j                                        D ]}t	          ||d
          }|Kt
                              ||j                   t
                              t          d          |            dS |sKt
                              ||j                   t
                              t          d          |            dS dS )zCheck whether parallel processing is allowed or not.

        :param typ: A type of processing; ``'read'`` or ``'write'``.
        r   parallel_read_safezthe %s extension does not declare if it is safe for parallel reading, assuming it isn't - please ask the extension author to check and make it explicitz1the %s extension is not safe for parallel readingwriteparallel_write_safezthe %s extension does not declare if it is safe for parallel writing, assuming it isn't - please ask the extension author to check and make it explicitz1the %s extension is not safe for parallel writingz!parallel type %s is not supportedNzdoing serial %sFT)r   
ValueErrorrm   valuesgetattrrz   r[   r   )r   r  attrnamemessage_not_declaredmessage_not_safeextalloweds          r   is_parallel_allowedzSphinx.is_parallel_allowed  sC   
 &==+H#%0$ $   ""UVVG^^,H#%0$ $   ""UVV@3FGGG?))++ 		 		Cc8T22G3SX>>>r"344c:::uu /:::r"344c:::uu
 tr   policyLiteral['always', 'per_page']c                J    |dvrt          d|z            || j        _        dS )zSet the policy to include assets in HTML pages.

        - always: include the assets in all the pages
        - per_page: include the assets only in pages where they are used

        .. versionadded: 4.1
        >   alwaysper_pagezpolicy %s is not supportedN)r  rn   html_assets_policy)r   r  s     r   set_html_assets_policyzSphinx.set_html_assets_policy
  s4     ///9FBCCC+1(((r   )"rO   rP   rQ   rR   rS   rP   rT   rP   rU   rV   rW   rX   rY   rZ   r[   rZ   r\   r]   rK   r]   r^   r_   r`   rL   ra   rL   rb   r]   rc   r]   rd   r]   re   rf   )re   r   )re   rf   )r\   r]   re   r   )re   r   )r   r&   re   r   )r   rV   re   rf   )r   rV   re   r3   )FrN   )r   r]   r   r   re   rf   )r   rV   re   rf   )r   r   re   rf   )r   )r   r   r   r   r   rL   re   rL   )r   r   r   r   r   rL   re   rL   )r   r   r   r   r   rL   re   rL   )r   r   r   r   r   rL   re   rL   )r   r   r   r   r   rL   re   rL   )r   r   r   r   r   rL   re   rL   )r   r   r   r  r   rL   re   rL   )r   r  r   r  r   rL   re   rL   )r   r  r   r  r   rL   re   rL   )r   r	  r   r
  r   rL   re   rL   )r   r  r   r  r   rL   re   rL   )r   r  r   r  r   rL   re   rL   )r   r  r   r  r   rL   re   rL   )r   r  r   r  r   rL   re   rL   )r   r  r   r  r   rL   re   rL   )r   r  r   r  r   rL   re   rL   )r   r  r   r   r   rL   re   rL   )r   r"  r   r#  r   rL   re   rL   )r   r%  r   r&  r   rL   re   rL   )r   r(  r   r)  r   rL   re   rL   )r   r+  r   r,  r   rL   re   rL   )r   r.  r   r:   r   rL   re   rL   )r   r0  r   r1  r   rL   re   rL   )r   r3  r   r4  r   rL   re   rL   )r   r6  r   r7  r   rL   re   rL   )r   r9  r   r:  r   rL   re   rL   )r   r<  r   r=  r   rL   re   rL   )r   r?  r   r@  r   rL   re   rL   )r   rB  r   rC  r   rL   re   rL   )r   rV   r   rE  r   rL   re   rL   )rH  rL   re   rf   )r   rV   rL  r(   rK  rM  re   rN  )r   rV   rL  r(   rK  rM  re   r(   )F)r   rS  rT  r]   re   rf   )rN   r   )r   rV   rX  r(   rY  r5   rZ  r[  r\  rV   re   rf   )r   rV   rb  rc  rT  r]   re   rf   )rg  rh  rT  r]   ri  r@   re   rf   )NF)rg  rh  rt  rV   ru  rv  rT  r]   ri  rw  re   rf   )r   rV   rz  r{  rT  r]   re   rf   )r   rV   r  r(   rT  r]   re   rf   )r   rV   r  r  rT  r]   re   rf   )r   r  rT  r]   re   rf   )
r   rV   r   rV   rz  r{  rT  r]   re   rf   )
r   rV   r   rV   r  r  rT  r]   re   rf   )r   rV   r  r  r  r]   re   rf   )r   NNr   rN   F)r  rV   r  rV   r  rV   r  r  r  r  r  rV   r  r  rT  r]   re   rf   )r   Nr   F)r  rV   r  rV   r  rV   r  r  r  rV   rT  r]   re   rf   )r  r  re   rf   )r   N)
r   r  r   rL   r  r  ri  r(   re   rf   )r   rV   r   rL   ri  r(   re   rf   )r  rV   r  r  r  r]   re   rf   )r  rV   r  r  re   rf   )rz  r  rT  r]   re   rf   )r  rn  r  r  re   rf   )rz  r  re   rf   )r  rV   r  rV   rT  r]   re   rf   )r  r  rT  r]   re   rf   )r  r  re   rf   )r   rV   r  rP   re   rf   NN)r   rV   r  r  r  r  re   rf   )r   rV   r  rP   re   rf   )r  rV   re   r]   )r  r  re   rf   )Drq  
__module____qualname____doc__rK   __annotations__r   rO   rQ   rS   rT   sysstdoutstderrr   propertyr   r   r   r   r   r   r   r   r   r   r   r   r   staticmethodr   r   r   rJ  r   rR  rW  r_  ra  rf  rl  ry  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  rN   r   r   rJ   rJ      s
          "N!!!!OOOF  GF!!##J 04!$"%*$  %*#n n n n n` $ $ $ X$C C C CB5 5 5 5   
 bb67788	 	 	 98	; ; ; ;2 2 2 2B B B B+ + + +; ; ; ; ;~4 4 4 4 / / / \/. 
 	    X 
 	    X      X 
 	    X 
 	    X 
 	    X 
 	    X 
 	    X      X 
 	    X 
 	    X 
 	    X 
 	    X 
 	    X      X 
 	    X 
 	    X 
 	    X      X 
 	    X 
 	    X 
 	    X 
 	    X $ #    X( 
 	    X " !    X& 
 	    X      X 
 	    X 
 	    X IL    8, , , , ;=	U U U U U U2 ;=	
 
 
 
 
 
2
> 
> 
> 
> 
>" 133
 3
 3
 3
 3
j    	P P P P P4 5? 5? 5? 5? 5?v ,0"9 "9 "9 "9 "9J AF5/ 5/ 5/ 5/ 5/n+ + + + +4 BG+ + + + +:< < < < < NST T T T T4 P P P P P4 BG9 9 9 9 9.  8<+-P
 P
 P
 P
 P
l  8<3
 3
 3
 3
 3
j!/ !/ !/ !/F	4 	4 	4 	4 %)	J J J J JX> > > > >B TYN N N N N0% % % %V V V V V0: : : : " " " "" <AM M M M M C C C C C ! ! ! !	7 	7 	7 	7 :>7;	V V V V V&1 1 1 1 % % % %N
2 
2 
2 
2 
2 
2r   rJ   c                  8    e Zd ZdZ	 	 dddZddZddZddZdS )TemplateBridgezThis class defines the interface for a "template bridge", that is, a class
    that renders templates given a template name and a context.
    Nr   r3   themeTheme | Nonedirslist[str] | Nonere   rf   c                $    d}t          |          )ab  Called by the builder to initialize the template system.

        *builder* is the builder object; you'll probably want to look at the
        value of ``builder.config.templates_path``.

        *theme* is a :class:`sphinx.theming.Theme` object or None; in the latter
        case, *dirs* can be list of fixed directories to look for templates.
        !must be implemented in subclassesNotImplementedError)r   r   r  r  r   s        r   r   zTemplateBridge.init  s     2!#&&&r   floatc                    dS )zCalled by the builder to determine if output files are outdated
        because of template changes.  Return the mtime of the newest template
        file that was changed.  The default implementation returns ``0``.
        r   rN   r   s    r   newest_template_mtimez$TemplateBridge.newest_template_mtime-  s	    
 qr   templaterV   contextdict[str, Any]c                $    d}t          |          )zCalled by the builder to render a template given as a filename with
        a specified context (a Python dictionary).
        r  r  r   r  r  r   s       r   renderzTemplateBridge.render4       2!#&&&r   c                $    d}t          |          )z}Called by the builder to render a template given as a string with a
        specified context (a Python dictionary).
        r  r  r   s       r   render_stringzTemplateBridge.render_string;  r"  r   r  )r   r3   r  r  r  r  re   rf   )re   r  )r  rV   r  r  re   rf   )r  rV   r  r  re   rV   )rq  r  r  r  r   r  r!  r$  rN   r   r   r  r    s{          #!%	' ' ' ' '"   ' ' ' '' ' ' ' ' 'r   r  ){r  
__future__r   r  r   r
  collectionsr   ior   typingr   r   docutils.parsers.rstr   r|   r	   r
   sphinx._cli.util.colourr   sphinx.configr   sphinx.environmentr   sphinx.errorsr   r   r   sphinx.eventsr   sphinx.highlightingr   sphinx.localer   sphinx.projectr   sphinx.registryr   sphinx.utilr   r   sphinx.util._pathlibr   r   sphinx.util.build_phaser   sphinx.util.displayr   sphinx.util.i18nr   sphinx.util.loggingr   sphinx.util.osutilr   r   sphinx.util.tagsr    oscollections.abcr!   r"   r#   r$   r%   pathlibr&   r'   r(   r)   r*   r+   docutils.nodesr,   r-   docutils.parsersr.   r/   docutils.transformsr0   pygments.lexerr1   r2   sphinx.buildersr3   r4   r5   sphinx.domainsr6   r7   sphinx.environment.collectorsr8   sphinx.ext.autodocr9   r:   sphinx.ext.todor;   sphinx.extensionr<   r=   r>   r?   r@   sphinx.rolesrA   r  rB   sphinx.themingrC   sphinx.util.docfieldsrD   sphinx.util.typingrE   rF   rG   r	  _first_party_extensions_first_party_themesr   	getLoggerrq  rz   rJ   r  rN   r   r   <module>rO     s    
 # " " " " "      



             * * * * * * * * & & & & & &  & & & & & & & & ( ( ( ( ( (             / / / / / / P P P P P P P P P P & & & & & & - - - - - -       " " " " " " 3 3 3 3 3 3 ) ) ) ) ) ) ) ) ; ; ; ; ; ; ; ; . . . . . . 0 0 0 0 0 0 . . . . . . 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ! ! ! ! ! ! =IIIMMMMMMMMMMMMMM............,,,,,,,,''''''......------$$$$$$''''''22222222,,,,,,,,BBBBBBOOOOOOOO))))))******            &%%%%%,,,,,,$$$$$$++++++<<<<<<<<1'  1 1 1 1d   ) )  - - * 		8	$	$G2 G2 G2 G2 G2 G2 G2 G2T4)' )' )' )' )' )' )' )' )' )'r   