
    -Php/              
          d Z ddlZddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
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mZmZmZmZmZmZ dZd ZdedededdfdZ dededede!ddf
dZ"dedeeef         fdZ#dS )z7Bootstrap-based sphinx theme from the PyData community.    N)partial)Path)Dict)urlparse)ConnectionError	HTTPError
RetryError)Sphinx)DirectoryHTMLBuilder)ExtensionError   )edit_this_pagelogopygments
short_linktoctree
translatorutilsz0.16.1c           	         t          j        |           }t          t           j        |           }ddg}|D ]8}|                    d| d          x}r||d| d<    |d| d| d           9t          |                    d	g           t                    s3t          d
t          |                    d	                     d          t          j	        | d          sd| j
        _        t          |                    d          t                    }|                    dd          }|r`|r]|                    d          }|d         }	|d          d}
t          |	          j        dv rd	 t          j        |	          }|                                 |j        }n# t$          t&          t(          f$ r}t+          |          }
Y d}~nWd}~ww xY w	 t-          | j        |	                                          }n&# t2          $ r}t+          |          }
Y d}~nd}~ww xY w|
 |d|	 d|
            nYt5          j        |          }t9          d |D                       }t9          d |D                       }|s|r |d|	 d           |                    di           }|r|                    d          }|                    d          }|r|rd||d} | j        d0i | |                    d          }|r9d | }d!| d"}|                     |d#$           |                     d|%           t          j	        | d&          }d'| j
        j        v r|sd| j
        _        g d(}|                    d	g           }|D ]I\  }}}|                    |          r.|                     d)|                    |          ||d*d+           J||d	<   |                    d,          }|si }t          |t                    stC          d-t          |                     |                    d.          }|r||d/<   ||d,<   dS )1zAUpdate config with new default values and handle deprecated keys.lightdarkpygment__style	pygments_zThe parameter "pygment_z!_style" was renamed to "pygments_z%_style" (note the "s" on "pygments").
icon_linksz?`icon_links` must be a list of dictionaries, you provided type .html_permalinks_icon#switchercheck_switcherTjson_urlversion_matchN)httphttpszThe version switcher "z2" file cannot be read due to the following error:
c                     g | ]}d |vS )url .0es     \/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pydata_sphinx_theme/__init__.py
<listcomp>z!update_config.<locals>.<listcomp>Y   s    HHH!uA~HHH    c                     g | ]}d |vS )versionr'   r(   s     r+   r,   z!update_config.<locals>.<listcomp>Z   s    "P"P"P!9A#5"P"P"Pr-   zT" file is malformed; at least one of the items is missing the "url" or "version" key	analyticsplausible_analytics_domainplausible_analytics_urldefer)loading_methodzdata-domainfilenamegoogle_analytics_idz,https://www.googletagmanager.com/gtag/js?id=z
                window.dataLayer = window.dataLayer || [];
                function gtag(){ dataLayer.push(arguments); }
                gtag('js', new Date());
                gtag('config', 'z');
            async)r4   bodyfontawesome_includedablog))twitter_urlzfa-brands fa-square-twitterTwitter)bitbucket_urlzfa-brands fa-bitbucket	Bitbucket)
gitlab_urlzfa-brands fa-square-gitlabGitLab)
github_urlzfa-brands fa-square-githubGitHubr   fontawesome)r&   iconnametyper   zIncorrect logo config type: theme_logo_linklinkr'   )"r   get_theme_options_dictr   
maybe_warnget
isinstancelistr   rG   config_provided_by_userconfigr   dictr   schemerequestsraise_for_statustextr   r   r	   reprr   srcdir	read_textFileNotFoundErrorjsonloadsanyadd_js_file
extensionsr:   insert
ValueError) apptheme_optionswarningthemesthemestyleis_dictshould_testtheme_switcherr!   reading_errorrequestcontentr*   switcher_contentmissing_urlmissing_versionr0   plausible_domainplausible_urlkwargsgidgid_js_path
gid_scriptfa_provided	shortcutsr   r&   rE   rF   
theme_logorH   s                                    r+   update_configry      s    055Me&,,G vF  !%%&>&>&>&>???5 	7<M3e3334GJ% J J"J J J   m''b994@@ 
=**<8899= = =
 
 	
 (.DEE .*-
' **:66==G##$4d;;K '; '&**:66 "*-''
 H$(999(",x00((***!,#Y
; ( ( ( $Q((sz844>>@@$ ( ( ( $Q( $G9 9 9)69 9     $z'22HH7GHHHIIK!"P"P?O"P"P"PQQO o VX V V V   !!+r22I 3$==)EFF!&?@@  	& 	&")/) F
 CO%%f%%% mm122 	3NNNK "%	  J OOKO@@@OODzO222 /5KLLK#*''''*.
'  I ""<44J$  T4S!! 
	(,,S11  )	    #-M, ""6**J 
j$'' LJZ8H8HJJKKK#''(9::O -,
6&M&s0   -/F G4GG'G9 9
HHHra   pagenametemplatenamereturnc                    g d}|D ]I}|                     |          r2t          j        | ||                     |g           |ddg          ||<   Jd|v rdd}t          t	          |d                             D ]?}|d         |         }	t          |	dt          |	                    }
|
|k    r|d         |=  n@|                     dg           D ]}t          |d	                   j        	                    d
          }|                     dd          |                     dd          d| d}d|v r|d         |d<    | j
        |d	         fi | |                     dd| d           t          |                     d          t                    rh|d         }|d         }|d         }dt           d| d| dt          |d                                                    d	}|                     d|           t          |d<   dS ) z0Update template names and assets for page build.)theme_navbar_starttheme_navbar_centertheme_navbar_persistenttheme_navbar_endtheme_article_header_starttheme_article_header_endtheme_article_footer_itemstheme_content_footer_itemstheme_footer_starttheme_footer_centertheme_footer_endtheme_primary_sidebar_endsidebarszsidebar-nav-bs.htmlznavbar-nav.html)ra   context	templatessectiontemplates_skip_empty_check	css_filesz&_static/styles/pydata-sphinx-theme.cssr5   theme_faviconshrefr   relrE   sizes16x16zimage/)r   r   rG   colorNz"DOCUMENTATION_OPTIONS.pagename = 'z';r8   ri   r!   r"   z0
        DOCUMENTATION_OPTIONS.theme_version = 'z<';
        DOCUMENTATION_OPTIONS.theme_switcher_json_url = 'zA';
        DOCUMENTATION_OPTIONS.theme_switcher_version_match = 'zK';
        DOCUMENTATION_OPTIONS.show_version_warning_banner =
            !theme_show_version_warning_bannerz
;
        theme_version)rL   r   _update_and_remove_templatesrangelengetattrstrr   suffixstripadd_css_filer]   rM   rQ   __version__lower)ra   rz   r{   r   doctreetemplate_sectionsr   theme_css_nameiasset
asset_pathfavicon	icon_typeoptsri   r!   r"   jss                     r+   update_and_remove_templatesr      s   
   %  ;;w 	$A!++gr22,ACT+U     GG gAs7;/0011 	 	AK(+E !
CJJ??J^++K(+ , ;;/44 
2 
2))066s;;	;;uf--[['22(Y((
 

 g#G,DM11D1111 OODPHPPPOQQQ'++.//66 ' !12!*-&70; :B  @M 
 <=>>DDFF   	2&&&  +GOr-   r   c                     | j         j        r=t          | j        t                    r#|d         r|d                             d          sdS | j                            |          }| j         j        |z   |d<   dS )a  Fix the canonical URL when using the dirhtml builder.

    Sphinx builds a canonical URL if ``html_baseurl`` config is set. However,
    it builds a URL ending with ".html" when using the dirhtml builder, which is
    incorrect. Detect this and generate the correct URL for each page.

    Workaround for https://github.com/sphinx-doc/sphinx/issues/9730; can be removed
    when that is fixed, released, and available in our minimum supported Sphinx version.
    pageurlz.htmlN)rP   html_baseurlrM   builderr   endswithget_target_uri)ra   rz   r{   r   r   targets         r+   _fix_canonical_urlr      s     J##+';<< y! y!**733	 	[''11F069GIr-   c                    t          t                    j                                        }|dz  dz  }|                     dt          |                     |                     t          j                   | 	                    dt          j                   | 	                    dt                     | 	                    dt                     | 	                    dt          j                   | 	                    dt           j                   | 	                    dt$                     | 	                    dt&          j                   | 	                    dt*          j                   | 	                    dt.          j                   | 	                    dt&          j                   |                     d|dz             | j        j                            t          |dz                       d	d	d
S )zSetup the Sphinx application.re   pydata_sphinx_themezbuilder-initedzhtml-page-contextzbuild-finishedsphinxlocale
componentsT)parallel_read_safeparallel_write_safe)r   __file__parentresolveadd_html_themer   add_post_transformr   ShortenLinkTransformconnectr   setup_translatorsry   r   r   setup_edit_urlr   add_toctree_functionsr   r   setup_logo_pathr   set_secondary_sidebar_itemsr   overwrite_pygments_csscopy_logo_imagesadd_message_catalogrP   templates_pathappend)ra   here
theme_paths      r+   setupr     s   >> ((**D"77J,c*oo>>>::;;;KK *">???KK -000KK#%7888KK#^%BCCCKK#W%BCCCKK#%@AAAKK#T%9:::KK#U%FGGGKK ("ABBBKK $"7888 HdXo666 J$$Sl)B%C%CDDD"&tDDDr-   )$__doc__rZ   	functoolsr   pathlibr   typingr   urllib.parser   rS   requests.exceptionsr   r   r	   sphinx.applicationr
   sphinx.builders.dirhtmlr   sphinx.errorsr    r   r   r   r   r   r   r   r   ry   r   r   rQ   r   r   r'   r-   r+   <module>r      s   = =                    ! ! ! ! ! !  F F F F F F F F F F % % % % % % 8 8 8 8 8 8 ( ( ( ( ( ( T T T T T T T T T T T T T T T T T T P' P' P'fK+	K+K+.1K+	K+ K+ K+ K+\:	::.1:<@:	: : : :0Ev E$sCx. E E E E E Er-   