
    6Dhsd                        S SK r S SKrS SKrS SKrS SKrS SKJr  S SKJrJ	r	  S SK
JrJrJrJr  S SKJr  S SKJr  S SKJrJr  S SKJr  \	R0                  " S	5      r\	R0                  " S
5      r S SKJrJr   " S S\ 5      r! " S S\!5      r" " S S\"5      r# " S S\"5      r$ " S S\"5      r% " S S\%5      r& " S S\%5      r' " S S\%5      r( " S S\%5      r)Sr*Sr+ " S  S!\"5      r, " S" S#\,5      r- " S$ S%\,5      r. " S& S'\,5      r/ " S( S)\,5      r0 " S* S+\"5      r1 " S, S-\15      r2 " S. S/\!5      r3S9S0 jr4 " S1 S2\35      r5 " S3 S4\35      r6 " S5 S6\,5      r7 " S7 S8\35      r8g! \ a    S SKJrJr   GNf = f):    N)isdir)utilsoptional_imports)to_jsonto_imagewrite_image
write_html)ensure_server)plotly_cdn_url)_get_jconfigget_plotlyjs)!return_figure_from_figure_or_datazIPython.displayIPython)BaseHTTPRequestHandler
HTTPServerc                   *    \ rS rSrSrS rS rS rSrg)BaseRenderer   z
Base class for all renderers
c                     g N selfs    K/var/www/html/env/lib/python3.13/site-packages/plotly/io/_base_renderers.pyactivateBaseRenderer.activate   s        c                   ^   [         R                  " T R                  5      n[        UR                  R                  5       5      nSR                  T R                  R                  SR                  U 4S jU 5       5      T R                  S9$ ! [         aL    [         R                  " T R                  5      nUR                   Vs/ s H  oDS:w  d  M
  UPM     Os  snf nn Nf = f)Nr   z{cls}({attrs})
{doc}z, c              3   b   >#    U  H$  nS R                  UTR                  U   5      v   M&     g7f)z{}={!r}N)format__dict__).0kr   s     r   	<genexpr>(BaseRenderer.__repr__.<locals>.<genexpr>,   s*     U9aI,,Qa0@AA9s   ,/)clsattrsdoc)inspect	signature__init__list
parameterskeysAttributeError
getargspecargsr    	__class____name__join__doc__)r   init_sig	init_argsargspecas   `    r   __repr__BaseRenderer.__repr__!   s    	A((7HX005578I '--''))U9UU . 
 	
  	A((7G$+LL@LqKL@I@I	As$   AB 8C$	CCC$#C$c                 *    [        [        U 5      5      $ r   )hashreprr   s    r   __hash__BaseRenderer.__hash__0   s    DJr   r   N)	r3   
__module____qualname____firstlineno__r5   r   r:   r?   __static_attributes__r   r   r   r   r      s    
 r   r   c                       \ rS rSrSrS rSrg)MimetypeRenderer5   z(
Base class for all mime type renderers
c                     [        5       er   NotImplementedError)r   fig_dicts     r   to_mimebundleMimetypeRenderer.to_mimebundle:       !##r   r   Nr3   rA   rB   rC   r5   rL   rD   r   r   r   rF   rF   5   s    $r   rF   c                       \ rS rSrSrS rSrg)JsonRenderer>   z
Renderer to display figures as JSON hierarchies.  This renderer is
compatible with JupyterLab and VSCode.

mime type: 'application/json'
c                 H    [         R                  " [        USSS95      nSU0$ )NFvalidateremove_uidszapplication/json)jsonloadsr   )r   rK   values      r   rL   JsonRenderer.to_mimebundleF   s$    

78eOP"E**r   r   NrO   r   r   r   rQ   rQ   >   s    +r   rQ   c                   (    \ rS rSrSrSS jrS rSrg)PlotlyRendererL   z
Renderer to display figures using the plotly mime type.  This renderer is
compatible with VSCode and nteract.

mime type: 'application/vnd.plotly.v1+json'
Nc                 B    U(       a  [        U5      U l        g 0 U l        g r   )dictconfig)r   r`   s     r   r+   PlotlyRenderer.__init__T   s    &,d6l"r   c                     [        U R                  5      nU(       a  X!S'   [        R                  " [	        USSS95      nSU0$ )Nr`   FrT   zapplication/vnd.plotly.v1+json)r   r`   rW   rX   r   )r   rK   r`   json_compatible_fig_dicts       r   rL   PlotlyRenderer.to_mimebundleW   sD    dkk*!'X#'::Hu%@$
  12JKKr   )r`   r   r3   rA   rB   rC   r5   r+   rL   rD   r   r   r   r\   r\   L   s    5	Lr   r\   c                   4    \ rS rSrSr      SS jrS rSrg)ImageRendererd   z+
Base class for all static image renderers
Nc                 X    Xl         X l        X0l        X@l        XPl        X`l        Xpl        g r   	mime_type
b64_encoder    widthheightscaleengine)r   rk   rl   r    rm   rn   ro   rp   s           r   r+   ImageRenderer.__init__i   s'     #$

r   c           
      0   [        UU R                  U R                  U R                  U R                  SU R
                  S9nU R                  (       a&  [        R                  " U5      R                  S5      nOUR                  S5      nU R                  U0$ )NF)r    rm   rn   ro   rU   rp   utf8)r   r    rm   rn   ro   rp   rl   base64	b64encodedecoderk   )r   rK   image_bytes	image_strs       r   rL   ImageRenderer.to_mimebundle|   sx    ;;**;;**;;
 ??((5<<VDI#**62I	**r   )rl   rp   r    rn   rk   ro   rm   )FNNNNautore   r   r   r   rg   rg   d   s%     &+r   rg   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )PngRenderer   aF  
Renderer to display figures as static PNG images.  This renderer requires
either the kaleido package or the orca command-line utility and is broadly
compatible across IPython environments (classic Jupyter Notebook, JupyterLab,
QtConsole, VSCode, PyCharm, etc) and nbconvert targets (HTML, PDF, etc.).

mime type: 'image/png'
c           
      4   > [         [        U ]  SSSUUUUS9  g )Nz	image/pngTpngrj   )superr|   r+   r   rm   rn   ro   rp   r2   s        r   r+   PngRenderer.__init__   s,    k4)! 	* 	
r   r   NNNrz   r3   rA   rB   rC   r5   r+   rD   __classcell__r2   s   @r   r|   r|          	
 	
r   r|   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )SvgRenderer   aJ  
Renderer to display figures as static SVG images.  This renderer requires
either the kaleido package or the orca command-line utility and is broadly
compatible across IPython environments (classic Jupyter Notebook, JupyterLab,
QtConsole, VSCode, PyCharm, etc) and nbconvert targets (HTML, PDF, etc.).

mime type: 'image/svg+xml'
c           
      4   > [         [        U ]  SSSUUUUS9  g )Nzimage/svg+xmlFsvgrj   )r   r   r+   r   s        r   r+   SvgRenderer.__init__   s,    k4)% 	* 	
r   r   r   r   r   s   @r   r   r      r   r   r   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )JpegRenderer   aH  
Renderer to display figures as static JPEG images.  This renderer requires
either the kaleido package or the orca command-line utility and is broadly
compatible across IPython environments (classic Jupyter Notebook, JupyterLab,
QtConsole, VSCode, PyCharm, etc) and nbconvert targets (HTML, PDF, etc.).

mime type: 'image/jpeg'
c           
      4   > [         [        U ]  SSSUUUUS9  g )Nz
image/jpegTjpgrj   )r   r   r+   r   s        r   r+   JpegRenderer.__init__   s,    lD*" 	+ 	
r   r   r   r   r   s   @r   r   r      r   r   r   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )PdfRenderer   z
Renderer to display figures as static PDF images.  This renderer requires
either the kaleido package or the orca command-line utility and is compatible
with JupyterLab and the LaTeX-based nbconvert export to PDF.

mime type: 'application/pdf'
c           
      4   > [         [        U ]  SSSUUUUS9  g )Nzapplication/pdfTpdfrj   )r   r   r+   r   s        r   r+   PdfRenderer.__init__   s,    k4)' 	* 	
r   r   r   r   r   s   @r   r   r      s    	
 	
r   r   z/window.PlotlyConfig = {MathJaxConfig: 'local'};z~if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: "STIX-Web"}});}c                   >    \ rS rSrSr        SS jrS rS rSrg)	HtmlRenderer   zE
Base class for all HTML mime type renderers

mime type: 'text/html'
Nc	                     U(       a  [        U5      O0 U l        XPl        Xl        X0l        X l        Xpl        X`l        U R                  (       a  SU l        g UU l        g )Ncdn)	r_   r`   	auto_play	connectedglobal_init	full_htmlanimation_optspost_scriptinclude_plotlyjs)	r   r   r   r   r`   r   r   r   r   s	            r   r+   HtmlRenderer.__init__   sJ     '-d6l"""&",&)-=Mr   c                    U R                   (       a  [        (       d,  [        SR                  U R                  R
                  S95      eU R                  (       a1  SR                  [        [        [        5       R                  S5      S9nO!SR                  [        5       [        [        S9n[        R                  USS	9  g g )
Nz8The {cls} class requires ipython but it is not installed)r&   z        <script type="text/javascript">
        {win_config}
        {mathjax_config}
        </script>
        <script type="module">import "{plotly_cdn}"</script>
        z.js)
win_configmathjax_config
plotly_cdnz        <script type="text/javascript">
        {win_config}
        {mathjax_config}
        </script>
        <script>{script}</script>
        )scriptr   r   T)raw)r   ipython_display
ValueErrorr    r2   r3   r   _window_plotly_config_mathjax_configr   rstripr   display_html)r   r   s     r   r   HtmlRenderer.activate  s    "? NUU NN33 V   ~~ F4#2-/66u=    F'>4#2    ((T(:I r   c                 ~   SSK Jn  SnS/nU R                  (       a\  [        U R                  [        [
        45      (       d  UR                  U R                  5        OUR                  U R                  5        U" UU R                  U R                  U R                  UUU R                  U R                  SSSS9nS	U0$ )
Nr   to_htmlr   a  
var gd = document.getElementById('{plot_id}');
var x = new MutationObserver(function (mutations, observer) {{
        var display = window.getComputedStyle(gd).display;
        if (!display || display === 'none') {{
            console.log([gd, 'removed!']);
            Plotly.purge(gd);
            observer.disconnect();
        }}
}});

// Listen for the removal of the full notebook cells
var notebookContainer = gd.closest('#notebook-container');
if (notebookContainer) {{
    x.observe(notebookContainer, {childList: true});
}}

// Listen for the clearing of the current output cell
var outputEl = gd.closest('.output');
if (outputEl) {{
    x.observe(outputEl, {childList: true});
}}
100%  F
r`   r   r   include_mathjaxr   r   r   default_widthdefault_heightrU   	text/html)	plotly.ior   r   
isinstancer,   tupleappendextendr`   r   r   r   r   )r   rK   r   r   r   htmls         r   rL   HtmlRenderer.to_mimebundle3  s    %
6 d..u>>""4#3#34""4#3#34;;nn!22+#nn.. 
 T""r   )r   r   r`   r   r   r   r   r   )FFFNFNNT)	r3   rA   rB   rC   r5   r+   r   rL   rD   r   r   r   r   r      s2     N*%;N6#r   r   c                   <   ^  \ rS rSrSr      SU 4S jjrSrU =r$ )NotebookRendereril  ae  
Renderer to display interactive figures in the classic Jupyter Notebook.
This renderer is also useful for notebooks that will be converted to
HTML using nbconvert/nbviewer as it will produce standalone HTML files
that include interactive figures.

This renderer automatically performs global notebook initialization when
activated.

mime type: 'text/html'
c                 6   > [         [        U ]  USSUUUUUS9  g )NFTr   r   r   r`   r   r   r   r   )r   r   r+   )r   r   r`   r   r   r   r   r2   s          r   r+   NotebookRenderer.__init__y  s2     	.#)- 	/ 		
r   r   )FNFNNFr   r   s   @r   r   r   l  s&    
 
 
r   r   c                   2   ^  \ rS rSrSr SU 4S jjrSrU =r$ )KaggleRendereri  a.  
Renderer to display interactive figures in Kaggle Notebooks.

Same as NotebookRenderer but with connected=True so that the plotly.js
bundle is loaded from a CDN rather than being embedded in the notebook.

This renderer is enabled by default when running in a Kaggle notebook.

mime type: 'text/html'
c                 6   > [         [        U ]  SSSUUUUSS9  g NTFr   )r   r   r+   r   r`   r   r   r   r2   s        r   r+   KaggleRenderer.__init__  s1     	nd,#)" 	- 		
r   r   NFNNr   r   s   @r   r   r         	 NR
 
r   r   c                   2   ^  \ rS rSrSr SU 4S jjrSrU =r$ )AzureRendereri  a-  
Renderer to display interactive figures in Azure Notebooks.

Same as NotebookRenderer but with connected=True so that the plotly.js
bundle is loaded from a CDN rather than being embedded in the notebook.

This renderer is enabled by default when running in an Azure notebook.

mime type: 'text/html'
c                 6   > [         [        U ]  SSSUUUUSS9  g r   )r   r   r+   r   s        r   r+   AzureRenderer.__init__  s1     	mT+#)" 	, 		
r   r   r   r   r   s   @r   r   r     r   r   r   c                   2   ^  \ rS rSrSr SU 4S jjrSrU =r$ )ColabRendereri  z
Renderer to display interactive figures in Google Colab Notebooks.

This renderer is enabled by default when running in a Colab notebook.

mime type: 'text/html'
c           
      4   > [         [        U ]  SSSUUUUS9  g )NTFr   r   r   r`   r   r   r   )r   r   r+   r   s        r   r+   ColabRenderer.__init__  s.     	mT+#) 	, 	
r   r   r   r   r   s   @r   r   r     s     NR
 
r   r   c                   @    \ rS rSrSr      S	S jrS rS rS rSr	g)
IFrameRendereri  a  
Renderer to display interactive figures using an IFrame.  HTML
representations of Figures are saved to an `iframe_figures/` directory and
iframe HTML elements that reference these files are inserted into the
notebook.

With this approach, neither plotly.js nor the figure data are embedded in
the notebook, so this is a good choice for notebooks that contain so many
large figures that basic operations (like saving and opening) become
very slow.

Notebooks using this renderer will display properly when exported to HTML
as long as the `iframe_figures/` directory is placed in the same directory
as the exported html file.

Note that the HTML files in `iframe_figures/` are numbered according to
the IPython cell execution count and so they will start being overwritten
each time the kernel is restarted.  This directory may be deleted whenever
the kernel is restarted and it will be automatically recreated.

mime type: 'text/html'
Nc                 L    Xl         X l        X0l        X@l        XPl        X`l        g r   )r`   r   r   r   r   html_directory)r   r`   r   r   r   r   r   s          r   r+   IFrameRenderer.__init__  s&     "&, 0,r   c                    SSK Jn  SnUR                  S0 5      nUR                  SS5      (       a  [        US   U-   5      S-   nOSnUR                  S	S5      (       a	  US	   U-   nO[        S
U-   5      S-   nU R	                  5       n [
        R                  " U R                  5        U" UUU R                  U R                  U R                  SSU R                  U R                  SS
SS9  SR                  XVU R!                  U5      S9n	SU	0$ ! [         a%  n[        U R                  5      (       d  e  S nANS nAff = f)Nr   )r	      layoutrm   Fpxr   rn   r   r   )
r`   r   r   r   	auto_openr   r   r   r   rU   z<iframe
    scrolling="no"
    width="{width}"
    height="{height}"
    src="{src}"
    frameborder="0"
    allowfullscreen
></iframe>
)rm   rn   srcr   )r   r	   getstrbuild_filenameosmakedirsr   OSErrorr   r`   r   r   r   r   r    	build_url)
r   rK   r	   iframe_bufferr   iframe_widthiframe_heightfilenameerroriframe_htmls
             r   rL   IFrameRenderer.to_mimebundle  sO   ( h+::gu%%vg>?$FL!L::h&&"8,}<Mm 34t;M &&(	KK++,
 	;;nn!22!((.. 	
 	 F$..:R  
 	 [))C  	,,-- .	s    D 
E D;;E c                 
   [         (       a  [         R                  5       OS n U(       a-  [        UR                  R	                  S5      5      S   S   S-   OSnSR                  U R                  US9$ ! [
         a    Sn N(f = f)N   r   z#{dirname}/figure_{cell_number}.html)dirnamecell_number)r   get_ipythonr,   history_managerget_tail	Exceptionr    r   )r   ipr   s      r   r   IFrameRenderer.build_filenameB  s    &-gW  "4	LN$r11::1=>qA!DqHTUK 5;;''[ < 
 	
  	K	s   6A3 3BBc                     U$ r   r   r   r   s     r   r   IFrameRenderer.build_urlL  s    r   )r   r   r`   r   r   r   )NFNNTiframe_figures)
r3   rA   rB   rC   r5   r+   rL   r   r   rD   r   r   r   r   r     s0    2 '-"9*v
r   r   c                   $    \ rS rSrSrS rS rSrg)CoCalcRendereriP  r   c                     SR                  U R                  [        R                  S9n[        =R                  S-  sl        U$ )Nz${dirname}/figure_{render_count}.html)r   render_countr   )r    r   r  _render_countr   s     r   r   CoCalcRenderer.build_filenameT  sA    9@@''n6R6R A 
 	$$)$r   c                      SR                  US9$ )Nz{filename}?fullscreen=kiosk)r   )r    r   s     r   r   CoCalcRenderer.build_url\  s    ,33X3FFr   r   N)r3   rA   rB   rC   r  r   r   rD   r   r   r   r  r  P  s    MGr   r  c                       \ rS rSrSrS rSrg)ExternalRendereri`  a  
Base class for external renderers.  ExternalRenderer subclasses
do not display figures inline in a notebook environment, but render
figures by some external means (e.g. a separate browser tab).

Unlike MimetypeRenderer subclasses, ExternalRenderer subclasses are not
invoked when a figure is asked to display itself in the notebook.
Instead, they are invoked when the plotly.io.show function is called
on a figure.
c                     [        5       er   rI   )r   figs     r   renderExternalRenderer.renderl  rN   r   r   N)r3   rA   rB   rC   r5   r  rD   r   r   r   r  r  `  s    	$r   r  c                   ^  [        T [        5      (       a  T R                  S5      m SnUc  [        R                  " S5      nOW[        U[
        5      (       d  U4nU H  n [        R                  " U5      nUb    OM!     Uc  [        S[        U5      -   5      e " U 4S jS[        5      n[        SU5      nUR                  SUR                  -  X#S9  UR                  5         g! [        R                   a     M  f = f)	a=  
Display html in a web browser without creating a temp file.

Instantiates a trivial http server and uses the webbrowser module to
open a URL to retrieve html from that server.

Parameters
----------
html: str
    HTML string to display
using, new, autoraise:
    See docstrings in webbrowser.get and webbrowser.open
rs   Nz#Can't locate a browser with key in c                   (   > \ rS rSrU 4S jrS rSrg)3open_html_in_browser.<locals>.OneShotRequestHandleri  c                    > U R                  S5        U R                  SS5        U R                  5         Sn[        S[	        T5      U5       H#  nU R
                  R                  TX"U-    5        M%     g )N   zContent-typer   i   r   )send_responsesend_headerend_headersrangelenwfilewrite)r   
bufferSizeir   s      r   do_GET:open_html_in_browser.<locals>.OneShotRequestHandler.do_GET  sd    s#^[9$J1c$i4

  aj.!9: 5r   c                     g r   r   )r   r    r1   s      r   log_message?open_html_in_browser.<locals>.OneShotRequestHandler.log_message  s    r   r   N)r3   rA   rB   rC   r  r!  rD   )r   s   r   OneShotRequestHandlerr    s    	;	r   r#  )z	127.0.0.1r   zhttp://127.0.0.1:%s)new	autoraise)r   r   encode
webbrowserr   r   Errorr   r   r   openserver_porthandle_request)r   usingr$  r%  browserbrowser_keyr#  servers   `       r   open_html_in_browserr0  p  s     ${{6"G}..&%''HE K$..5& ' ! ?BSZOPP 6  (*?@FLL 2 22   3 ## s   "C''C?>C?c                   6    \ rS rSrSr       SS jrS rSrg)BrowserRendereri  ah  
Renderer to display interactive figures in an external web browser.
This renderer will open a new browser window or tab when the
plotly.io.show function is called on a figure.

This renderer has no ipython/jupyter dependencies and is a good choice
for use in environments that do not support the inline display of
interactive figures.

mime type: 'text/html'
Nc                 X    Xl         X l        X0l        X@l        XPl        X`l        Xpl        g r   )r`   r   r,  r$  r%  r   r   )r   r`   r   r,  r$  r%  r   r   s           r   r+   BrowserRenderer.__init__  s)     "
"&,r   c                     SSK Jn  U" UU R                  U R                  SSU R                  SU R
                  SSSS9n[        X0R                  U R                  U R                  5        g )Nr   r   Tr   r   Fr   )
r   r   r`   r   r   r   r0  r,  r$  r%  r   rK   r   r   s       r   r  BrowserRenderer.render  s^    %;;nn!!((.. !
 	T::txxHr   )r   r   r%  r`   r$  r   r,  )NFNr   TNN)r3   rA   rB   rC   r5   r+   r  rD   r   r   r   r2  r2    s)    
 -&Ir   r2  c                   >    \ rS rSr     SS jr\S 5       rS rSrg)DatabricksRendereri  Nc                 N    Xl         X l        X0l        X@l        XPl        S U l        g r   )r`   r   r   r   r   _displayHTML)r   r`   r   r   r   r   s         r   r+   DatabricksRenderer.__init__  s(     "&, 0 r   c                 p  ^ SS K nU R                  c  UR                  " UR                  " 5       5       H\  n[	        UR
                  R                  5      m[        U4S jS 5       5      (       d  M>  UR
                  R                  S   U l          O   U R                  c  [        S5      eU R                  $ )Nr   c              3   ,   >#    U  H	  oT;   v   M     g 7fr   r   )r"   vglobal_namess     r   r$   1DatabricksRenderer.displayHTML.<locals>.<genexpr>  s     V2UQL(2Us   )displayHTMLdisplaysparkrB  z
Unable to detect the Databricks displayHTML function. The 'databricks' renderer is only
supported when called from within the Databricks notebook environment.)	r)   r;  getouterframescurrentframesetframe	f_globalsallEnvironmentError)r   r)   rH  r@  s      @r   rB  DatabricksRenderer.displayHTML  s    $ //0D0D0FG"5;;#8#89 V2UVVV(-(=(=m(LD% H   (&J     r   c                     SSK Jn  U" UU R                  U R                  U R                  SU R
                  SU R                  SSSS9nU R                  U5        g )Nr   r   r   Tr   Fr   )r   r   r`   r   r   r   r   rB  r6  s       r   r  DatabricksRenderer.render  sZ    %;;nn!22!((.. !
 	r   )r;  r   r   r`   r   r   )NFNNr   )	r3   rA   rB   rC   r+   propertyrB  r  rD   r   r   r   r9  r9    s1     !  ! !*r   r9  c                   <   ^  \ rS rSr     SU 4S jjrS rSrU =r$ )SphinxGalleryHtmlRendereri  c           
      4   > [         [        U ]  USSUUUUS9  g )NFr   )r   rQ  r+   )r   r   r`   r   r   r   r2   s         r   r+   "SphinxGalleryHtmlRenderer.__init__  s/     	'7#) 	8 	
r   c                     SSK Jn  U R                  (       a  SnSnOSnSnU" UU R                  U R                  UUU R
                  U R                  SSSS9
nS	U0$ )
Nr   r   r   Tr   r   F)	r`   r   r   r   r   r   r   r   rU   r   )r   r   r   r`   r   r   r   )r   rK   r   r   r   r   s         r   rL   'SphinxGalleryHtmlRenderer.to_mimebundle+  si    %>>$#O##O;;nn-+nn.. 
 T""r   r   )TNFNN)r3   rA   rB   rC   r+   rL   rD   r   r   s   @r   rQ  rQ    s#     
$# #r   rQ  c                       \ rS rSrS rSrg)SphinxGalleryOrcaRendereriF  c                 D   [         R                  " 5       n US   R                  n[        R                  R                  U5      u  pEUS-   nUS-   n[        US5      n[        XSS9n [        X5        g !   US   S   n NZ= f! [        [        4 a    [        S5      ef = f)	N   r   z.htmlz.pngTr   )filer   a6  orca and psutil are required to use the `sphinx-gallery-orca` renderer. See https://plotly.com/python/static-image-export/ for instructions on how to install orca. Alternatively, you can use the `sphinx-gallery` renderer (note that png thumbnails can only be generated with the `sphinx-gallery-orca` renderer).)r)   stackr   r   pathsplitextr   r	   r   r   ImportError)	r   rK   r[  r   filename_root_filename_htmlfilename_pngfigures	            r   r   SphinxGalleryOrcaRenderer.renderG  s    	#Qx((H 77++H5%/$v-28TBxeL		-	#Qx{H K( 	7 	s   A4 (B 4
B Br   N)r3   rA   rB   rC   r  rD   r   r   r   rW  rW  F  s    r   rW  )Nr   T)9rt   rW   r'  r)   r   os.pathr   plotlyr   r   r   r   r   r   r	   plotly.io._orcar
   plotly.io._utilsr   plotly.offline.offliner   r   plotly.toolsr   
get_moduler   r   http.serverr   r   r^  BaseHTTPServerobjectr   rF   rQ   r\   rg   r|   r   r   r   r   r   r   r   r   r   r   r   r  r  r0  r2  r9  rQ  rW  r   r   r   <module>ro     s       	  * @ @ ) + = :"--.?@

%
%i
0B> 6  8$| $
+# 
+L% L0(+$ (+V
- 
,
- 
,
= 
,
- 
03 By## y#x
| 
D
\ 
8
L 
8
L 
0o% odG^ G $| $ 6r0I& 0If9) 9x+# +#\ 0 e  BAABs   .E' 'E98E9