Ë
    úmxiÃ5  ã                  óJ  — U d dl mZ d dlZd dlmZmZ d dlZd dlmZm	Z	 ed   Z
ed   Z ej                  d«      Z ej                  d«      Z ej                  d	«      Z ej                  d
«      ZeeeedœZded<   	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Zy)é    )ÚannotationsN)ÚAnyÚLiteral)Úimport_vl_convertÚvl_version_for_vl_convert)ÚstandardÚ	universalÚinlineÚolli)Úvegaú	vega-litea
  
{%- if fullhtml -%}
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
{%- endif %}
  <style>
    #{{ output_div }}.vega-embed {
      width: 100%;
      display: flex;
    }

    #{{ output_div }}.vega-embed details,
    #{{ output_div }}.vega-embed details summary {
      position: relative;
    }
  </style>
{%- if not requirejs %}
  <script type="text/javascript" src="{{ base_url }}/vega@{{ vega_version }}"></script>
  {%- if mode == 'vega-lite' %}
  <script type="text/javascript" src="{{ base_url }}/vega-lite@{{ vegalite_version }}"></script>
  {%- endif %}
  <script type="text/javascript" src="{{ base_url }}/vega-embed@{{ vegaembed_version }}"></script>
{%- endif %}
{%- if fullhtml %}
{%- if requirejs %}
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js"></script>
<script>
requirejs.config({
    "paths": {
        "vega": "{{ base_url }}/vega@{{ vega_version }}?noext",
        "vega-lib": "{{ base_url }}/vega-lib?noext",
        "vega-lite": "{{ base_url }}/vega-lite@{{ vegalite_version }}?noext",
        "vega-embed": "{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext",
    }
});
</script>
{%- endif %}
</head>
<body>
{%- endif %}
  <div id="{{ output_div }}"></div>
  <script>
    {%- if requirejs and not fullhtml %}
    requirejs.config({
        "paths": {
            "vega": "{{ base_url }}/vega@{{ vega_version }}?noext",
            "vega-lib": "{{ base_url }}/vega-lib?noext",
            "vega-lite": "{{ base_url }}/vega-lite@{{ vegalite_version }}?noext",
            "vega-embed": "{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext",
        }
    });
    {% endif %}
    {% if requirejs -%}
    require(['vega-embed'],
    {%- else -%}
    (
    {%- endif -%}
    function(vegaEmbed) {
      var spec = {{ spec }};
      var embedOpt = {{ embed_options }};

      function showError(el, error){
          el.innerHTML = ('<div style="color:red;">'
                          + '<p>JavaScript Error: ' + error.message + '</p>'
                          + "<p>This usually means there's a typo in your chart specification. "
                          + "See the javascript console for the full traceback.</p>"
                          + '</div>');
          throw error;
      }
      const el = document.getElementById('{{ output_div }}');
      vegaEmbed("#{{ output_div }}", spec, embedOpt)
        .catch(error => showError(el, error));
    }){% if not requirejs %}(vegaEmbed){% endif %};

  </script>
{%- if fullhtml %}
</body>
</html>
{%- endif %}
a…	  
<style>
  #{{ output_div }}.vega-embed {
    width: 100%;
    display: flex;
  }

  #{{ output_div }}.vega-embed details,
  #{{ output_div }}.vega-embed details summary {
    position: relative;
  }
</style>
<div id="{{ output_div }}"></div>
<script type="text/javascript">
  var VEGA_DEBUG = (typeof VEGA_DEBUG == "undefined") ? {} : VEGA_DEBUG;
  (function(spec, embedOpt){
    let outputDiv = document.currentScript.previousElementSibling;
    if (outputDiv.id !== "{{ output_div }}") {
      outputDiv = document.getElementById("{{ output_div }}");
    }

    const paths = {
      "vega": "{{ base_url }}/vega@{{ vega_version }}?noext",
      "vega-lib": "{{ base_url }}/vega-lib?noext",
      "vega-lite": "{{ base_url }}/vega-lite@{{ vegalite_version }}?noext",
      "vega-embed": "{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext",
    };

    function maybeLoadScript(lib, version) {
      var key = `${lib.replace("-", "")}_version`;
      return (VEGA_DEBUG[key] == version) ?
        Promise.resolve(paths[lib]) :
        new Promise(function(resolve, reject) {
          var s = document.createElement('script');
          document.getElementsByTagName("head")[0].appendChild(s);
          s.async = true;
          s.onload = () => {
            VEGA_DEBUG[key] = version;
            return resolve(paths[lib]);
          };
          s.onerror = () => reject(`Error loading script: ${paths[lib]}`);
          s.src = paths[lib];
        });
    }

    function showError(err) {
      outputDiv.innerHTML = `<div class="error" style="color:red;">${err}</div>`;
      throw err;
    }

    function displayChart(vegaEmbed) {
      vegaEmbed(outputDiv, spec, embedOpt)
        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));
    }

    if(typeof define === "function" && define.amd) {
      requirejs.config({paths});
      let deps = ["vega-embed"];
      require(deps, displayChart, err => showError(`Error loading script: ${err.message}`));
    } else {
      maybeLoadScript("vega", "{{vega_version}}")
        .then(() => maybeLoadScript("vega-lite", "{{vegalite_version}}"))
        .then(() => maybeLoadScript("vega-embed", "{{vegaembed_version}}"))
        .catch(showError)
        .then(() => displayChart(vegaEmbed));
    }
  })({{ spec }}, {{ embed_options }});
</script>
a¿  <!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <style>
    #{{ output_div }}.vega-embed {
      width: 100%;
      display: flex;
    }

    #{{ output_div }}.vega-embed details,
    #{{ output_div }}.vega-embed details summary {
      position: relative;
    }
  </style>
  <script type="text/javascript">
    // vega-embed.js bundle with Vega-Lite version v{{ vegalite_version }}
    {{ vegaembed_script }}
  </script>
</head>
<body>
<div class="vega-visualization" id="{{ output_div }}"></div>
<script type="text/javascript">
  const spec = {{ spec }};
  const embedOpt = {{ embed_options }};
  vegaEmbed('#{{ output_div }}', spec, embedOpt).catch(console.error);
</script>
</body>
</html>
aŸ  
<style>
  #{{ output_div }}.vega-embed {
    width: 100%;
    display: flex;
  }

  #{{ output_div }}.vega-embed details,
  #{{ output_div }}.vega-embed details summary {
    position: relative;
  }
</style>
<div id="{{ output_div }}"></div>
<script type="text/javascript">
  var VEGA_DEBUG = (typeof VEGA_DEBUG == "undefined") ? {} : VEGA_DEBUG;
  (function(spec, embedOpt){
    let outputDiv = document.currentScript.previousElementSibling;
    if (outputDiv.id !== "{{ output_div }}") {
      outputDiv = document.getElementById("{{ output_div }}");
    }
    const olliDiv = document.createElement("div");
    const vegaDiv = document.createElement("div");
    outputDiv.appendChild(vegaDiv);
    outputDiv.appendChild(olliDiv);
    outputDiv = vegaDiv;

    const paths = {
      "vega": "{{ base_url }}/vega@{{ vega_version }}?noext",
      "vega-lib": "{{ base_url }}/vega-lib?noext",
      "vega-lite": "{{ base_url }}/vega-lite@{{ vegalite_version }}?noext",
      "vega-embed": "{{ base_url }}/vega-embed@{{ vegaembed_version }}?noext",
      "olli": "{{ base_url }}/olli@{{ olli_version }}?noext",
      "olli-adapters": "{{ base_url }}/olli-adapters@{{ olli_adapters_version }}?noext",
    };

    function maybeLoadScript(lib, version) {
      var key = `${lib.replace("-", "")}_version`;
      return (VEGA_DEBUG[key] == version) ?
        Promise.resolve(paths[lib]) :
        new Promise(function(resolve, reject) {
          var s = document.createElement('script');
          document.getElementsByTagName("head")[0].appendChild(s);
          s.async = true;
          s.onload = () => {
            VEGA_DEBUG[key] = version;
            return resolve(paths[lib]);
          };
          s.onerror = () => reject(`Error loading script: ${paths[lib]}`);
          s.src = paths[lib];
        });
    }

    function showError(err) {
      outputDiv.innerHTML = `<div class="error" style="color:red;">${err}</div>`;
      throw err;
    }

    function displayChart(vegaEmbed, olli, olliAdapters) {
      vegaEmbed(outputDiv, spec, embedOpt)
        .catch(err => showError(`Javascript Error: ${err.message}<br>This usually means there's a typo in your chart specification. See the javascript console for the full traceback.`));
      olliAdapters.VegaLiteAdapter(spec).then(olliVisSpec => {
        const olliFunc = typeof olli === 'function' ? olli : olli.olli;
        const olliRender = olliFunc(olliVisSpec);
        olliDiv.append(olliRender);
      });
    }

    if(typeof define === "function" && define.amd) {
      requirejs.config({paths});
      let deps = ["vega-embed", "olli", "olli-adapters"];
      require(deps, displayChart, err => showError(`Error loading script: ${err.message}`));
    } else {
      maybeLoadScript("vega", "{{vega_version}}")
        .then(() => maybeLoadScript("vega-lite", "{{vegalite_version}}"))
        .then(() => maybeLoadScript("vega-embed", "{{vegaembed_version}}"))
        .then(() => maybeLoadScript("olli", "{{olli_version}}"))
        .then(() => maybeLoadScript("olli-adapters", "{{olli_adapters_version}}"))
        .catch(showError)
        .then(() => displayChart(vegaEmbed, olli, OlliAdapters));
    }
  })({{ spec }}, {{ embed_options }});
</script>
z#dict[TemplateName, jinja2.Template]Ú	TEMPLATESc                ó8  — |xs i }|xs i }|j                  d|«      }|dvrd}t        |«      ‚|€d}t        |«      ‚|€d}t        |«      ‚|dk(  r|€d}t        |«      ‚i }|dk(  r*t        «       }t        «       }|j	                  |¬	«      |d
<   n|dk(  rd}d}||d<   ||d<   t
        j                  ||«      }t        |d«      sd|› �}t        |«      ‚ |j                  dt        j                  | fi |¤Žt        j                  |«      |||||||	|
dœ
|¤ŽS )a¸  
    Embed a Vega/Vega-Lite spec into an HTML page.

    Parameters
    ----------
    spec : dict
        a dictionary representing a vega-lite plot spec.
    mode : string {'vega' | 'vega-lite'}
        The rendering mode. This value is overridden by embed_options['mode'],
        if it is present.
    vega_version : string
        For html output, the version of vega.js to use.
    vegalite_version : string
        For html output, the version of vegalite.js to use.
    vegaembed_version : string
        For html output, the version of vegaembed.js to use.
    base_url : string (optional)
        The base url from which to load the javascript libraries.
    output_div : string (optional)
        The id of the div element where the plot will be shown.
    embed_options : dict (optional)
        Dictionary of options to pass to the vega-embed script. Default
        entry is {'mode': mode}.
    json_kwds : dict (optional)
        Dictionary of keywords to pass to json.dumps().
    fullhtml : boolean (optional)
        If True (default) then return a full html page. If False, then return
        an HTML snippet that can be embedded into an HTML page.
    requirejs : boolean (optional)
        If False (default) then load libraries from base_url using <script>
        tags. If True, then load libraries using requirejs
    template : jinja2.Template or string (optional)
        Specify the template to use (default = 'standard'). If template is a
        string, it must be one of {'universal', 'standard', 'inline'}. Otherwise, it
        can be a jinja2.Template object containing a custom template.

    Returns
    -------
    output : string
        an HTML string for rendering the chart.
    Úmode>   r   r   z)mode must be either 'vega' or 'vega-lite'zmust specify vega_versionzmust specify vegaembed_versionr   z3must specify vega-lite version for mode='vega-lite'r
   )Ú
vl_versionÚvegaembed_scriptr   Ú2Úolli_versionÚolli_adapters_versionÚrenderzInvalid template: )
ÚspecÚembed_optionsr   Úvega_versionÚvegalite_versionÚvegaembed_versionÚbase_urlÚ
output_divÚfullhtmlÚ	requirejs© )Ú
setdefaultÚ
ValueErrorr   r   Újavascript_bundler   ÚgetÚhasattrr   ÚjsonÚdumps)r   r   r   r   r   r   r   r   Ú	json_kwdsr   r   ÚtemplateÚmsgÚrender_kwargsÚvlcr   ÚOLLI_VERSIONÚOLLI_ADAPTERS_VERSIONÚjinja_templates                      úH/home/htdocs/ttos/venv/lib/python3.12/site-packages/altair/utils/html.pyÚspec_to_htmlr1   3  sq  € ðn "Ò' R€MØ’˜R€Ià×#Ñ# F¨DÓ1€DàÐ(Ñ(Ø9ˆÜ˜‹oÐàÐØ)ˆÜ˜‹oÐàÐ Ø.ˆÜ˜‹oÐàˆ{ÒÐ/Ð7ØCˆÜ˜‹oÐà€MØ�8ÒÜÓ!ˆÜ.Ó0ˆ
Ø,/×,AÑ,AÈZÐ,AÓ,XˆÐ(Ò)Ø	�VÒ	ØˆØ #ÐØ(4ˆ�nÑ%Ø1FˆÐ-Ñ.ä—]‘] 8¨XÓ6€NÜ�> 8Ô,Ø" >Ð"2Ð3ˆÜ˜‹oÐà ˆ>× Ñ ð Ü�Z‰Z˜Ñ* 	Ñ*Ü—j‘j Ó/ØØ!Ø)Ø+ØØØØñð ñð ó    )Nzhttps://cdn.jsdelivr.net/npmÚvisNNTFr   )r   zdict[str, Any]r   Ú
RenderModer   ú
str | Noner   r5   r   r5   r   Ústrr   r6   r   údict[str, Any] | Noner(   r7   r   Úboolr   r8   r)   zjinja2.Template | TemplateNameÚreturnr6   )Ú
__future__r   r&   Útypingr   r   Újinja2Úaltair.utils._importersr   r   ÚTemplateNamer4   ÚTemplateÚHTML_TEMPLATEÚHTML_TEMPLATE_UNIVERSALÚINLINE_HTML_TEMPLATEÚHTML_TEMPLATE_OLLIr   Ú__annotations__r1   r    r2   r0   ú<module>rE      sY  ðÞ "ã ß ã ç PàÐ@ÑA€ØÐ(Ñ)€
à�—‘ðQóS€ðl *˜&Ÿ/™/ðDóFÐ ð\ '�v—‘ðó Ð ðF %�V—_‘_ðRóTÐ ðp Ø(Ø"Øñ	2€	Ð.ó ð $(Ø2ØØ+/Ø'+ØØØ/9ðhØ
ðhà
ðhð ðhð "ð	hð
 !ðhð ðhð ðhð )ðhð %ðhð ðhð ðhð -ðhð 	ôhr2   