Created
December 10, 2019 02:09
-
-
Save CJ-Wright/ae28b94b228165348c5800a50163ae9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"application/javascript": [ | |
"\n", | |
"(function(root) {\n", | |
" function now() {\n", | |
" return new Date();\n", | |
" }\n", | |
"\n", | |
" var force = true;\n", | |
"\n", | |
" if (typeof root._bokeh_onload_callbacks === \"undefined\" || force === true) {\n", | |
" root._bokeh_onload_callbacks = [];\n", | |
" root._bokeh_is_loading = undefined;\n", | |
" }\n", | |
"\n", | |
" var JS_MIME_TYPE = 'application/javascript';\n", | |
" var HTML_MIME_TYPE = 'text/html';\n", | |
" var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", | |
" var CLASS_NAME = 'output_bokeh rendered_html';\n", | |
"\n", | |
" /**\n", | |
" * Render data to the DOM node\n", | |
" */\n", | |
" function render(props, node) {\n", | |
" var script = document.createElement(\"script\");\n", | |
" node.appendChild(script);\n", | |
" }\n", | |
"\n", | |
" /**\n", | |
" * Handle when an output is cleared or removed\n", | |
" */\n", | |
" function handleClearOutput(event, handle) {\n", | |
" var cell = handle.cell;\n", | |
"\n", | |
" var id = cell.output_area._bokeh_element_id;\n", | |
" var server_id = cell.output_area._bokeh_server_id;\n", | |
" // Clean up Bokeh references\n", | |
" if (id != null && id in Bokeh.index) {\n", | |
" Bokeh.index[id].model.document.clear();\n", | |
" delete Bokeh.index[id];\n", | |
" }\n", | |
"\n", | |
" if (server_id !== undefined) {\n", | |
" // Clean up Bokeh references\n", | |
" var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", | |
" cell.notebook.kernel.execute(cmd, {\n", | |
" iopub: {\n", | |
" output: function(msg) {\n", | |
" var id = msg.content.text.trim();\n", | |
" if (id in Bokeh.index) {\n", | |
" Bokeh.index[id].model.document.clear();\n", | |
" delete Bokeh.index[id];\n", | |
" }\n", | |
" }\n", | |
" }\n", | |
" });\n", | |
" // Destroy server and session\n", | |
" var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", | |
" cell.notebook.kernel.execute(cmd);\n", | |
" }\n", | |
" }\n", | |
"\n", | |
" /**\n", | |
" * Handle when a new output is added\n", | |
" */\n", | |
" function handleAddOutput(event, handle) {\n", | |
" var output_area = handle.output_area;\n", | |
" var output = handle.output;\n", | |
"\n", | |
" // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", | |
" if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", | |
" return\n", | |
" }\n", | |
"\n", | |
" var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", | |
"\n", | |
" if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", | |
" toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", | |
" // store reference to embed id on output_area\n", | |
" output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", | |
" }\n", | |
" if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", | |
" var bk_div = document.createElement(\"div\");\n", | |
" bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", | |
" var script_attrs = bk_div.children[0].attributes;\n", | |
" for (var i = 0; i < script_attrs.length; i++) {\n", | |
" toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", | |
" }\n", | |
" // store reference to server id on output_area\n", | |
" output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", | |
" }\n", | |
" }\n", | |
"\n", | |
" function register_renderer(events, OutputArea) {\n", | |
"\n", | |
" function append_mime(data, metadata, element) {\n", | |
" // create a DOM node to render to\n", | |
" var toinsert = this.create_output_subarea(\n", | |
" metadata,\n", | |
" CLASS_NAME,\n", | |
" EXEC_MIME_TYPE\n", | |
" );\n", | |
" this.keyboard_manager.register_events(toinsert);\n", | |
" // Render to node\n", | |
" var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", | |
" render(props, toinsert[toinsert.length - 1]);\n", | |
" element.append(toinsert);\n", | |
" return toinsert\n", | |
" }\n", | |
"\n", | |
" /* Handle when an output is cleared or removed */\n", | |
" events.on('clear_output.CodeCell', handleClearOutput);\n", | |
" events.on('delete.Cell', handleClearOutput);\n", | |
"\n", | |
" /* Handle when a new output is added */\n", | |
" events.on('output_added.OutputArea', handleAddOutput);\n", | |
"\n", | |
" /**\n", | |
" * Register the mime type and append_mime function with output_area\n", | |
" */\n", | |
" OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", | |
" /* Is output safe? */\n", | |
" safe: true,\n", | |
" /* Index of renderer in `output_area.display_order` */\n", | |
" index: 0\n", | |
" });\n", | |
" }\n", | |
"\n", | |
" // register the mime type if in Jupyter Notebook environment and previously unregistered\n", | |
" if (root.Jupyter !== undefined) {\n", | |
" var events = require('base/js/events');\n", | |
" var OutputArea = require('notebook/js/outputarea').OutputArea;\n", | |
"\n", | |
" if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", | |
" register_renderer(events, OutputArea);\n", | |
" }\n", | |
" }\n", | |
"\n", | |
" \n", | |
" if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", | |
" root._bokeh_timeout = Date.now() + 5000;\n", | |
" root._bokeh_failed_load = false;\n", | |
" }\n", | |
"\n", | |
" var NB_LOAD_WARNING = {'data': {'text/html':\n", | |
" \"<div style='background-color: #fdd'>\\n\"+\n", | |
" \"<p>\\n\"+\n", | |
" \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", | |
" \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", | |
" \"</p>\\n\"+\n", | |
" \"<ul>\\n\"+\n", | |
" \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n", | |
" \"<li>use INLINE resources instead, as so:</li>\\n\"+\n", | |
" \"</ul>\\n\"+\n", | |
" \"<code>\\n\"+\n", | |
" \"from bokeh.resources import INLINE\\n\"+\n", | |
" \"output_notebook(resources=INLINE)\\n\"+\n", | |
" \"</code>\\n\"+\n", | |
" \"</div>\"}};\n", | |
"\n", | |
" function display_loaded() {\n", | |
" var el = document.getElementById(null);\n", | |
" if (el != null) {\n", | |
" el.textContent = \"BokehJS is loading...\";\n", | |
" }\n", | |
" if (root.Bokeh !== undefined) {\n", | |
" if (el != null) {\n", | |
" el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", | |
" }\n", | |
" } else if (Date.now() < root._bokeh_timeout) {\n", | |
" setTimeout(display_loaded, 100)\n", | |
" }\n", | |
" }\n", | |
"\n", | |
"\n", | |
" function run_callbacks() {\n", | |
" try {\n", | |
" root._bokeh_onload_callbacks.forEach(function(callback) {\n", | |
" if (callback != null)\n", | |
" callback();\n", | |
" });\n", | |
" } finally {\n", | |
" delete root._bokeh_onload_callbacks\n", | |
" }\n", | |
" console.debug(\"Bokeh: all callbacks have finished\");\n", | |
" }\n", | |
"\n", | |
" function load_libs(css_urls, js_urls, callback) {\n", | |
" if (css_urls == null) css_urls = [];\n", | |
" if (js_urls == null) js_urls = [];\n", | |
"\n", | |
" root._bokeh_onload_callbacks.push(callback);\n", | |
" if (root._bokeh_is_loading > 0) {\n", | |
" console.debug(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", | |
" return null;\n", | |
" }\n", | |
" if (js_urls == null || js_urls.length === 0) {\n", | |
" run_callbacks();\n", | |
" return null;\n", | |
" }\n", | |
" console.debug(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
" root._bokeh_is_loading = css_urls.length + js_urls.length;\n", | |
"\n", | |
" function on_load() {\n", | |
" root._bokeh_is_loading--;\n", | |
" if (root._bokeh_is_loading === 0) {\n", | |
" console.debug(\"Bokeh: all BokehJS libraries/stylesheets loaded\");\n", | |
" run_callbacks()\n", | |
" }\n", | |
" }\n", | |
"\n", | |
" function on_error() {\n", | |
" console.error(\"failed to load \" + url);\n", | |
" }\n", | |
"\n", | |
" for (var i = 0; i < css_urls.length; i++) {\n", | |
" var url = css_urls[i];\n", | |
" const element = document.createElement(\"link\");\n", | |
" element.onload = on_load;\n", | |
" element.onerror = on_error;\n", | |
" element.rel = \"stylesheet\";\n", | |
" element.type = \"text/css\";\n", | |
" element.href = url;\n", | |
" console.debug(\"Bokeh: injecting link tag for BokehJS stylesheet: \", url);\n", | |
" document.body.appendChild(element);\n", | |
" }\n", | |
"\n", | |
" for (var i = 0; i < js_urls.length; i++) {\n", | |
" var url = js_urls[i];\n", | |
" var element = document.createElement('script');\n", | |
" element.onload = on_load;\n", | |
" element.onerror = on_error;\n", | |
" element.async = false;\n", | |
" element.src = url;\n", | |
" console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
" document.head.appendChild(element);\n", | |
" }\n", | |
" };\n", | |
"\n", | |
" function inject_raw_css(css) {\n", | |
" const element = document.createElement(\"style\");\n", | |
" element.appendChild(document.createTextNode(css));\n", | |
" document.body.appendChild(element);\n", | |
" }\n", | |
"\n", | |
" \n", | |
" var js_urls = [];\n", | |
" var css_urls = [];\n", | |
" \n", | |
"\n", | |
" var inline_js = [\n", | |
" function(Bokeh) {\n", | |
" inject_raw_css(\"table.panel-df {\\n margin-left: auto;\\n margin-right: auto;\\n border: none;\\n border-collapse: collapse;\\n border-spacing: 0;\\n color: black;\\n font-size: 12px;\\n table-layout: fixed;\\n}\\n\\n.panel-df tr, th, td {\\n text-align: right;\\n vertical-align: middle;\\n padding: 0.5em 0.5em !important;\\n line-height: normal;\\n white-space: normal;\\n max-width: none;\\n border: none;\\n}\\n\\n.panel-df tbody {\\n display: table-row-group;\\n vertical-align: middle;\\n border-color: inherit;\\n}\\n\\n.panel-df tbody tr:nth-child(odd) {\\n background: #f5f5f5;\\n}\\n\\n.panel-df thead {\\n border-bottom: 1px solid black;\\n vertical-align: bottom;\\n}\\n\\n.panel-df tr:hover {\\n background: lightblue !important;\\n cursor: pointer;\\n}\\n\");\n", | |
" },\n", | |
" function(Bokeh) {\n", | |
" inject_raw_css(\".widget-box {\\n\\tmin-height: 20px;\\n\\tbackground-color: #f5f5f5;\\n\\tborder: 1px solid #e3e3e3 !important;\\n\\tborder-radius: 4px;\\n\\t-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.05);\\n\\tbox-shadow: inset 0 1px 1px rgba(0,0,0,.05);\\n\\toverflow-x: hidden;\\n\\toverflow-y: hidden;\\n}\\n\\n.scrollable {\\n overflow: scroll;\\n}\\n\\nprogress {\\n\\tappearance: none;\\n\\t-moz-appearance: none;\\n\\t-webkit-appearance: none;\\n\\n\\tborder: none;\\n\\theight: 20px;\\n\\tbackground-color: whiteSmoke;\\n\\tborder-radius: 3px;\\n\\tbox-shadow: 0 2px 3px rgba(0,0,0,.5) inset;\\n\\tcolor: royalblue;\\n\\tposition: relative;\\n\\tmargin: 0 0 1.5em;\\n}\\n\\nprogress[value]::-webkit-progress-bar {\\n\\tbackground-color: whiteSmoke;\\n\\tborder-radius: 3px;\\n\\tbox-shadow: 0 2px 3px rgba(0,0,0,.5) inset;\\n}\\n\\nprogress[value]::-webkit-progress-value {\\n\\tposition: relative;\\n\\n\\tbackground-size: 35px 20px, 100% 100%, 100% 100%;\\n\\tborder-radius:3px;\\n}\\n\\nprogress.active:not([value])::before {\\n\\tbackground-position: 10%;\\n\\tanimation-name: stripes;\\n\\tanimation-duration: 3s;\\n\\tanimation-timing-function: linear;\\n\\tanimation-iteration-count: infinite;\\n}\\n\\nprogress[value]::-moz-progress-bar {\\n\\tbackground-size: 35px 20px, 100% 100%, 100% 100%;\\n\\tborder-radius:3px;\\n}\\n\\nprogress:not([value])::-moz-progress-bar {\\n\\tborder-radius:3px;\\n\\tbackground:\\n\\tlinear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, 0.2) 33%, rgba(0, 0, 0, 0.2) 66%, transparent 66%) left/2.5em 1.5em;\\n\\n}\\n\\nprogress.active:not([value])::-moz-progress-bar {\\n\\tbackground-position: 10%;\\n\\tanimation-name: stripes;\\n\\tanimation-duration: 3s;\\n\\tanimation-timing-function: linear;\\n\\tanimation-iteration-count: infinite;\\n}\\n\\nprogress.active:not([value])::-webkit-progress-bar {\\n\\tbackground-position: 10%;\\n\\tanimation-name: stripes;\\n\\tanimation-duration: 3s;\\n\\tanimation-timing-function: linear;\\n\\tanimation-iteration-count: infinite;\\n}\\n\\nprogress.primary[value]::-webkit-progress-value { background-color: #007bff; }\\nprogress.primary:not([value])::before { background-color: #007bff; }\\nprogress.primary:not([value])::-webkit-progress-bar { background-color: #007bff; }\\nprogress.primary::-moz-progress-bar { background-color: #007bff; }\\n\\nprogress.secondary[value]::-webkit-progress-value { background-color: #6c757d; }\\nprogress.secondary:not([value])::before { background-color: #6c757d; }\\nprogress.secondary:not([value])::-webkit-progress-bar { background-color: #6c757d; }\\nprogress.secondary::-moz-progress-bar { background-color: #6c757d; }\\n\\nprogress.success[value]::-webkit-progress-value { background-color: #28a745; }\\nprogress.success:not([value])::before { background-color: #28a745; }\\nprogress.success:not([value])::-webkit-progress-bar { background-color: #28a745; }\\nprogress.success::-moz-progress-bar { background-color: #28a745; }\\n\\nprogress.danger[value]::-webkit-progress-value { background-color: #dc3545; }\\nprogress.danger:not([value])::before { background-color: #dc3545; }\\nprogress.danger:not([value])::-webkit-progress-bar { background-color: #dc3545; }\\nprogress.danger::-moz-progress-bar { background-color: #dc3545; }\\n\\nprogress.warning[value]::-webkit-progress-value { background-color: #ffc107; }\\nprogress.warning:not([value])::before { background-color: #ffc107; }\\nprogress.warning:not([value])::-webkit-progress-bar { background-color: #ffc107; }\\nprogress.warning::-moz-progress-bar { background-color: #ffc107; }\\n\\nprogress.info[value]::-webkit-progress-value { background-color: #17a2b8; }\\nprogress.info:not([value])::before { background-color: #17a2b8; }\\nprogress.info:not([value])::-webkit-progress-bar { background-color: #17a2b8; }\\nprogress.info::-moz-progress-bar { background-color: #17a2b8; }\\n\\nprogress.light[value]::-webkit-progress-value { background-color: #f8f9fa; }\\nprogress.light:not([value])::before { background-color: #f8f9fa; }\\nprogress.light:not([value])::-webkit-progress-bar { background-color: #f8f9fa; }\\nprogress.light::-moz-progress-bar { background-color: #f8f9fa; }\\n\\nprogress.dark[value]::-webkit-progress-value { background-color: #343a40; }\\nprogress.dark:not([value])::-webkit-progress-bar { background-color: #343a40; }\\nprogress.dark:not([value])::before { background-color: #343a40; }\\nprogress.dark::-moz-progress-bar { background-color: #343a40; }\\n\\nprogress:not([value])::-webkit-progress-bar {\\n\\tborder-radius: 3px;\\n\\tbackground:\\n\\tlinear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, 0.2) 33%, rgba(0, 0, 0, 0.2) 66%, transparent 66%) left/2.5em 1.5em;\\n}\\nprogress:not([value])::before {\\n\\tcontent:\\\" \\\";\\n\\tposition:absolute;\\n\\theight: 20px;\\n\\ttop:0;\\n\\tleft:0;\\n\\tright:0;\\n\\tbottom:0;\\n\\tborder-radius: 3px;\\n\\tbackground:\\n\\tlinear-gradient(-45deg, transparent 33%, rgba(0, 0, 0, 0.2) 33%, rgba(0, 0, 0, 0.2) 66%, transparent 66%) left/2.5em 1.5em;\\n}\\n\\n@keyframes stripes {\\n from {background-position: 0%}\\n to {background-position: 100%}\\n}\");\n", | |
" },\n", | |
" function(Bokeh) {\n", | |
" /* BEGIN bokeh.min.js */\n", | |
" /*!\n", | |
" * Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors\n", | |
" * All rights reserved.\n", | |
" * \n", | |
" * Redistribution and use in source and binary forms, with or without modification,\n", | |
" * are permitted provided that the following conditions are met:\n", | |
" * \n", | |
" * Redistributions of source code must retain the above copyright notice,\n", | |
" * this list of conditions and the following disclaimer.\n", | |
" * \n", | |
" * Redistributions in binary form must reproduce the above copyright notice,\n", | |
" * this list of conditions and the following disclaimer in the documentation\n", | |
" * and/or other materials provided with the distribution.\n", | |
" * \n", | |
" * Neither the name of Anaconda nor the names of any contributors\n", | |
" * may be used to endorse or promote products derived from this software\n", | |
" * without specific prior written permission.\n", | |
" * \n", | |
" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n", | |
" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n", | |
" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n", | |
" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n", | |
" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n", | |
" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n", | |
" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n", | |
" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n", | |
" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n", | |
" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n", | |
" * THE POSSIBILITY OF SUCH DAMAGE.\n", | |
" */\n", | |
" (function(root, factory) {\n", | |
" root[\"Bokeh\"] = factory();\n", | |
" })(this, function() {\n", | |
" var define;\n", | |
" var parent_require = typeof require === \"function\" && require\n", | |
" return (function(modules, entry, aliases, externals) {\n", | |
" if (aliases === undefined) aliases = {};\n", | |
" if (externals === undefined) externals = {};\n", | |
"\n", | |
" var cache = {};\n", | |
"\n", | |
" var normalize = function(name) {\n", | |
" if (typeof name === \"number\")\n", | |
" return name;\n", | |
"\n", | |
" if (name === \"bokehjs\")\n", | |
" return entry;\n", | |
"\n", | |
" var prefix = \"@bokehjs/\"\n", | |
" if (name.slice(0, prefix.length) === prefix)\n", | |
" name = name.slice(prefix.length)\n", | |
"\n", | |
" var alias = aliases[name]\n", | |
" if (alias != null)\n", | |
" return alias;\n", | |
"\n", | |
" var trailing = name.length > 0 && name[name.lenght-1] === \"/\";\n", | |
" var index = aliases[name + (trailing ? \"\" : \"/\") + \"index\"];\n", | |
" if (index != null)\n", | |
" return index;\n", | |
"\n", | |
" return name;\n", | |
" }\n", | |
"\n", | |
" var require = function(name) {\n", | |
" var mod = cache[name];\n", | |
" if (!mod) {\n", | |
" var id = normalize(name);\n", | |
"\n", | |
" mod = cache[id];\n", | |
" if (!mod) {\n", | |
" if (!modules[id]) {\n", | |
" if (parent_require && externals[id]) {\n", | |
" try {\n", | |
" mod = {exports: parent_require(id)};\n", | |
" cache[id] = cache[name] = mod;\n", | |
" return mod.exports;\n", | |
" } catch (e) {}\n", | |
" }\n", | |
"\n", | |
" var err = new Error(\"Cannot find module '\" + name + \"'\");\n", | |
" err.code = 'MODULE_NOT_FOUND';\n", | |
" throw err;\n", | |
" }\n", | |
"\n", | |
" mod = {exports: {}};\n", | |
" cache[id] = cache[name] = mod;\n", | |
" modules[id].call(mod.exports, require, mod, mod.exports);\n", | |
" } else\n", | |
" cache[name] = mod;\n", | |
" }\n", | |
"\n", | |
" return mod.exports;\n", | |
" }\n", | |
"\n", | |
" var main = require(entry);\n", | |
" main.require = require;\n", | |
"\n", | |
" main.register_plugin = function(plugin_modules, plugin_entry, plugin_aliases, plugin_externals) {\n", | |
" if (plugin_aliases === undefined) plugin_aliases = {};\n", | |
" if (plugin_externals === undefined) plugin_externals = {};\n", | |
"\n", | |
" for (var name in plugin_modules) {\n", | |
" modules[name] = plugin_modules[name];\n", | |
" }\n", | |
"\n", | |
" for (var name in plugin_aliases) {\n", | |
" aliases[name] = plugin_aliases[name];\n", | |
" }\n", | |
"\n", | |
" for (var name in plugin_externals) {\n", | |
" externals[name] = plugin_externals[name];\n", | |
" }\n", | |
"\n", | |
" var plugin = require(plugin_entry);\n", | |
"\n", | |
" for (var name in plugin) {\n", | |
" main[name] = plugin[name];\n", | |
" }\n", | |
"\n", | |
" return plugin;\n", | |
" }\n", | |
"\n", | |
" return main;\n", | |
" })\n", | |
" ([\n", | |
" function _(n,o,r){n(1),function(n){for(var o in n)r.hasOwnProperty(o)||(r[o]=n[o])}(n(102))},\n", | |
" function _(n,c,f){n(2),n(11),n(14),n(21),n(49),n(52),n(87),n(94),n(100)},\n", | |
" function _(e,n,a){e(3)()||Object.defineProperty(Object,\"assign\",{value:e(4),configurable:!0,enumerable:!1,writable:!0})},\n", | |
" function _(r,t,o){t.exports=function(){var r,t=Object.assign;return\"function\"==typeof t&&(t(r={foo:\"raz\"},{bar:\"dwa\"},{trzy:\"trzy\"}),r.foo+r.bar+r.trzy===\"razdwatrzy\")}},\n", | |
" function _(t,r,n){var o=t(5),c=t(10),a=Math.max;r.exports=function(t,r){var n,f,h,i=a(arguments.length,2);for(t=Object(c(t)),h=function(o){try{t[o]=r[o]}catch(t){n||(n=t)}},f=1;f<i;++f)r=arguments[f],o(r).forEach(h);if(void 0!==n)throw n;return t}},\n", | |
" function _(e,t,c){t.exports=e(6)()?Object.keys:e(7)},\n", | |
" function _(t,r,e){r.exports=function(){try{return Object.keys(\"primitive\"),!0}catch(t){return!1}}},\n", | |
" function _(t,e,n){var c=t(8),r=Object.keys;e.exports=function(t){return r(c(t)?Object(t):t)}},\n", | |
" function _(n,r,t){var u=n(9)();r.exports=function(n){return n!==u&&null!==n}},\n", | |
" function _(n,o,t){o.exports=function(){}},\n", | |
" function _(n,r,e){var o=n(8);r.exports=function(n){if(!o(n))throw new TypeError(\"Cannot use null or undefined\");return n}},\n", | |
" function _(e,r,n){e(12)()||Object.defineProperty(Number,\"isInteger\",{value:e(13),configurable:!0,enumerable:!1,writable:!0})},\n", | |
" function _(n,t,e){t.exports=function(){var n=Number.isInteger;return\"function\"==typeof n&&(!n(\"23\")&&n(34)&&!n(32.34))}},\n", | |
" function _(n,t,e){t.exports=function(n){return\"number\"==typeof n&&n%1==0}},\n", | |
" function _(e,r,t){e(15)()||Object.defineProperty(String.prototype,\"repeat\",{value:e(16),configurable:!0,enumerable:!1,writable:!0})},\n", | |
" function _(o,f,t){f.exports=function(){return\"function\"==typeof\"foo\".repeat&&\"foofoo\"===\"foo\".repeat(2)}},\n", | |
" function _(r,n,t){var o=r(10),e=r(17);n.exports=function(r){var n,t=String(o(this));if((r=e(r))<0)throw new RangeError(\"Count must be >= 0\");if(!isFinite(r))throw new RangeError(\"Count must be < ∞\");for(n=\"\";r;)r%2&&(n+=t),r>1&&(t+=t),r>>=1;return n}},\n", | |
" function _(t,i,n){var r=t(18),a=Math.abs,o=Math.floor;i.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?r(t)*o(a(t)):t}},\n", | |
" function _(n,t,i){t.exports=n(19)()?Math.sign:n(20)},\n", | |
" function _(n,t,o){t.exports=function(){var n=Math.sign;return\"function\"==typeof n&&(1===n(10)&&-1===n(-20))}},\n", | |
" function _(n,r,t){r.exports=function(n){return n=Number(n),isNaN(n)||0===n?n:n>0?1:-1}},\n", | |
" function _(e,r,a){e(22)()||Object.defineProperty(Array,\"from\",{value:e(23),configurable:!0,enumerable:!1,writable:!0})},\n", | |
" function _(n,o,r){o.exports=function(){var n,o,r=Array.from;return\"function\"==typeof r&&(o=r(n=[\"raz\",\"dwa\"]),Boolean(o&&o!==n&&\"dwa\"===o[1]))}},\n", | |
" function _(e,l,r){var n=e(24).iterator,t=e(44),a=e(45),i=e(46),u=e(47),o=e(10),f=e(8),c=e(48),v=Array.isArray,h=Function.prototype.call,y={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;l.exports=function(e){var l,r,A,g,p,w,b,d,x,j,O=arguments[1],m=arguments[2];if(e=Object(o(e)),f(O)&&u(O),this&&this!==Array&&a(this))l=this;else{if(!O){if(t(e))return 1!==(p=e.length)?Array.apply(null,e):((g=new Array(1))[0]=e[0],g);if(v(e)){for(g=new Array(p=e.length),r=0;r<p;++r)g[r]=e[r];return g}}g=[]}if(!v(e))if(void 0!==(x=e[n])){for(b=u(x).call(e),l&&(g=new l),d=b.next(),r=0;!d.done;)j=O?h.call(O,m,d.value,r):d.value,l?(y.value=j,s(g,r,y)):g[r]=j,d=b.next(),++r;p=r}else if(c(e)){for(p=e.length,l&&(g=new l),r=0,A=0;r<p;++r)j=e[r],r+1<p&&(w=j.charCodeAt(0))>=55296&&w<=56319&&(j+=e[++r]),j=O?h.call(O,m,j,A):j,l?(y.value=j,s(g,A,y)):g[A]=j,++A;p=A}if(void 0===p)for(p=i(e.length),l&&(g=new l(p)),r=0;r<p;++r)j=O?h.call(O,m,e[r],r):e[r],l?(y.value=j,s(g,r,y)):g[r]=j;return l&&(y.value=null,g.length=p),g}},\n", | |
" function _(o,n,t){n.exports=o(25)()?o(26).Symbol:o(27)},\n", | |
" function _(t,o,r){var e=t(26),n={object:!0,symbol:!0};o.exports=function(){var t,o=e.Symbol;if(\"function\"!=typeof o)return!1;t=o(\"test symbol\");try{String(t)}catch(t){return!1}return!!n[typeof o.iterator]&&(!!n[typeof o.toPrimitive]&&!!n[typeof o.toStringTag])}},\n", | |
" function _(t,e,o){e.exports=function(){if(this)return this;Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0});try{return __global__}finally{delete Object.prototype.__global__}}()},\n", | |
" function _(t,o,r){var n,e,i,c=t(28),p=t(39),y=t(26).Symbol,s=t(41),u=t(42),f=t(43),_=Object.create,a=Object.defineProperties,S=Object.defineProperty;if(\"function\"==typeof y)try{String(y()),i=!0}catch(t){}else y=null;e=function(t){if(this instanceof e)throw new TypeError(\"Symbol is not a constructor\");return n(t)},o.exports=n=function t(o){var r;if(this instanceof t)throw new TypeError(\"Symbol is not a constructor\");return i?y(o):(r=_(e.prototype),o=void 0===o?\"\":String(o),a(r,{__description__:c(\"\",o),__name__:c(\"\",s(o))}))},u(n),f(n),a(e.prototype,{constructor:c(n),toString:c(\"\",function(){return this.__name__})}),a(n.prototype,{toString:c(function(){return\"Symbol (\"+p(this).__description__+\")\"}),valueOf:c(function(){return p(this)})}),S(n.prototype,n.toPrimitive,c(\"\",function(){var t=p(this);return\"symbol\"==typeof t?t:t.toString()})),S(n.prototype,n.toStringTag,c(\"c\",\"Symbol\")),S(e.prototype,n.toStringTag,c(\"c\",n.prototype[n.toStringTag])),S(e.prototype,n.toPrimitive,c(\"c\",n.prototype[n.toPrimitive]))},\n", | |
" function _(l,e,n){var r=l(29),a=l(30),t=l(34),c=l(35),i=l(36);(e.exports=function(l,e){var n,a,o,u,v;return arguments.length<2||\"string\"!=typeof l?(u=e,e=l,l=null):u=arguments[2],r(l)?(n=i.call(l,\"c\"),a=i.call(l,\"e\"),o=i.call(l,\"w\")):(n=o=!0,a=!1),v={value:e,configurable:n,enumerable:a,writable:o},u?t(c(u),v):v}).gs=function(l,e,n){var o,u,v,f;return\"string\"!=typeof l?(v=n,n=e,e=l,l=null):v=arguments[3],r(e)?a(e)?r(n)?a(n)||(v=n,n=void 0):n=void 0:(v=e,e=n=void 0):e=void 0,r(l)?(o=i.call(l,\"c\"),u=i.call(l,\"e\")):(o=!0,u=!1),f={get:e,set:n,configurable:o,enumerable:u},v?t(c(v),f):f}},\n", | |
" function _(n,t,u){t.exports=function(n){return null!=n}},\n", | |
" function _(t,n,o){var r=t(31),s=/^\\s*class[\\s{\\/}]/,c=Function.prototype.toString;n.exports=function(t){return!!r(t)&&!s.test(c.call(t))}},\n", | |
" function _(t,n,r){var e=t(32);n.exports=function(t){if(\"function\"!=typeof t)return!1;if(!hasOwnProperty.call(t,\"length\"))return!1;try{if(\"number\"!=typeof t.length)return!1;if(\"function\"!=typeof t.call)return!1;if(\"function\"!=typeof t.apply)return!1}catch(t){return!1}return!e(t)}},\n", | |
" function _(r,t,n){var o=r(33);t.exports=function(r){if(!o(r))return!1;try{return!!r.constructor&&r.constructor.prototype===r}catch(r){return!1}}},\n", | |
" function _(n,t,e){var o=n(29),r={object:!0,function:!0,undefined:!0};t.exports=function(n){return!!o(n)&&hasOwnProperty.call(r,typeof n)}},\n", | |
" function _(n,s,t){s.exports=n(3)()?Object.assign:n(4)},\n", | |
" function _(r,n,t){var c=r(8),o=Array.prototype.forEach,a=Object.create;n.exports=function(r){var n=a(null);return o.call(arguments,function(r){c(r)&&function(r,n){var t;for(t in r)n[t]=r[t]}(Object(r),n)}),n}},\n", | |
" function _(t,n,o){n.exports=t(37)()?String.prototype.contains:t(38)},\n", | |
" function _(n,o,t){var a=\"razdwatrzy\";o.exports=function(){return\"function\"==typeof a.contains&&(!0===a.contains(\"dwa\")&&!1===a.contains(\"foo\"))}},\n", | |
" function _(t,n,r){var i=String.prototype.indexOf;n.exports=function(t){return i.call(this,t,arguments[1])>-1}},\n", | |
" function _(r,n,o){var t=r(40);n.exports=function(r){if(!t(r))throw new TypeError(r+\" is not a symbol\");return r}},\n", | |
" function _(o,t,n){t.exports=function(o){return!!o&&(\"symbol\"==typeof o||!!o.constructor&&(\"Symbol\"===o.constructor.name&&\"Symbol\"===o[o.constructor.toStringTag]))}},\n", | |
" function _(t,e,n){var r=t(28),o=Object.create,c=Object.defineProperty,u=Object.prototype,f=o(null);e.exports=function(t){for(var e,n,o=0;f[t+(o||\"\")];)++o;return f[t+=o||\"\"]=!0,c(u,e=\"@@\"+t,r.gs(null,function(t){n||(n=!0,c(this,e,r(t)),n=!1)})),e}},\n", | |
" function _(e,t,a){var s=e(28),i=e(26).Symbol;t.exports=function(e){return Object.defineProperties(e,{hasInstance:s(\"\",i&&i.hasInstance||e(\"hasInstance\")),isConcatSpreadable:s(\"\",i&&i.isConcatSpreadable||e(\"isConcatSpreadable\")),iterator:s(\"\",i&&i.iterator||e(\"iterator\")),match:s(\"\",i&&i.match||e(\"match\")),replace:s(\"\",i&&i.replace||e(\"replace\")),search:s(\"\",i&&i.search||e(\"search\")),species:s(\"\",i&&i.species||e(\"species\")),split:s(\"\",i&&i.split||e(\"split\")),toPrimitive:s(\"\",i&&i.toPrimitive||e(\"toPrimitive\")),toStringTag:s(\"\",i&&i.toStringTag||e(\"toStringTag\")),unscopables:s(\"\",i&&i.unscopables||e(\"unscopables\"))})}},\n", | |
" function _(r,n,e){var t=r(28),i=r(39),o=Object.create(null);n.exports=function(r){return Object.defineProperties(r,{for:t(function(n){return o[n]?o[n]:o[n]=r(String(n))}),keyFor:t(function(r){var n;for(n in i(r),o)if(o[n]===r)return n})})}},\n", | |
" function _(t,n,r){var o=Object.prototype.toString,c=o.call(function(){return arguments}());n.exports=function(t){return o.call(t)===c}},\n", | |
" function _(t,o,n){var e=Object.prototype.toString,c=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);o.exports=function(t){return\"function\"==typeof t&&c(e.call(t))}},\n", | |
" function _(n,t,r){var a=n(17),o=Math.max;t.exports=function(n){return o(0,a(n))}},\n", | |
" function _(n,o,t){o.exports=function(n){if(\"function\"!=typeof n)throw new TypeError(n+\" is not a function\");return n}},\n", | |
" function _(t,n,o){var e=Object.prototype.toString,r=e.call(\"\");n.exports=function(t){return\"string\"==typeof t||t&&\"object\"==typeof t&&(t instanceof String||e.call(t)===r)||!1}},\n", | |
" function _(e,a,l){e(50)()||Object.defineProperty(Math,\"log10\",{value:e(51),configurable:!0,enumerable:!1,writable:!0})},\n", | |
" function _(n,t,o){t.exports=function(){var n=Math.log10;return\"function\"==typeof n&&.3010299956639812===n(2)}},\n", | |
" function _(N,a,t){var n=Math.log,r=Math.LOG10E;a.exports=function(N){return isNaN(N)?NaN:(N=Number(N))<0?NaN:0===N?-1/0:1===N?0:N===1/0?1/0:n(N)*r}},\n", | |
" function _(e,n,r){e(53)()||Object.defineProperty(e(26),\"Set\",{value:e(54),configurable:!0,enumerable:!1,writable:!0})},\n", | |
" function _(t,e,n){e.exports=function(){var t,e;return\"function\"==typeof Set&&(t=new Set([\"raz\",\"dwa\",\"trzy\"]),\"[object Set]\"===String(t)&&(3===t.size&&(\"function\"==typeof t.add&&(\"function\"==typeof t.clear&&(\"function\"==typeof t.delete&&(\"function\"==typeof t.entries&&(\"function\"==typeof t.forEach&&(\"function\"==typeof t.has&&(\"function\"==typeof t.keys&&(\"function\"==typeof t.values&&(!1===(e=t.values().next()).done&&\"raz\"===e.value)))))))))))}},\n", | |
" function _(t,e,n){var r,i,s,o=t(55),a=t(56),_=t(60),c=t(47),u=t(28),h=t(65),l=t(24),f=t(66),p=t(68),y=t(85),v=t(86),d=Function.prototype.call,D=Object.defineProperty,g=Object.getPrototypeOf;v&&(s=Set),e.exports=r=function(){var t,e=arguments[0];if(!(this instanceof r))throw new TypeError(\"Constructor requires 'new'\");return t=v&&_?_(new s,g(this)):this,null!=e&&f(e),D(t,\"__setData__\",u(\"c\",[])),e?(p(e,function(t){-1===a.call(this,t)&&this.push(t)},t.__setData__),t):t},v&&(_&&_(r,s),r.prototype=Object.create(s.prototype,{constructor:u(r)})),h(Object.defineProperties(r.prototype,{add:u(function(t){return this.has(t)?this:(this.emit(\"_add\",this.__setData__.push(t)-1,t),this)}),clear:u(function(){this.__setData__.length&&(o.call(this.__setData__),this.emit(\"_clear\"))}),delete:u(function(t){var e=a.call(this.__setData__,t);return-1!==e&&(this.__setData__.splice(e,1),this.emit(\"_delete\",e,t),!0)}),entries:u(function(){return new y(this,\"key+value\")}),forEach:u(function(t){var e,n,r,i=arguments[1];for(c(t),n=(e=this.values())._next();void 0!==n;)r=e._resolve(n),d.call(t,i,r,r,this),n=e._next()}),has:u(function(t){return-1!==a.call(this.__setData__,t)}),keys:u(i=function(){return this.values()}),size:u.gs(function(){return this.__setData__.length}),values:u(function(){return new y(this)}),toString:u(function(){return\"[object Set]\"})})),D(r.prototype,l.iterator,u(i)),D(r.prototype,l.toStringTag,u(\"c\",\"Set\"))},\n", | |
" function _(t,n,i){var r=t(10);n.exports=function(){return r(this).length=0,this}},\n", | |
" function _(t,r,e){var i=t(57),n=t(46),o=t(10),a=Array.prototype.indexOf,h=Object.prototype.hasOwnProperty,s=Math.abs,p=Math.floor;r.exports=function(t){var r,e,f,l;if(!i(t))return a.apply(this,arguments);for(e=n(o(this).length),f=arguments[1],r=f=isNaN(f)?0:f>=0?p(f):n(this.length)-p(s(f));r<e;++r)if(h.call(this,r)&&(l=this[r],i(l)))return r;return-1}},\n", | |
" function _(N,e,i){e.exports=N(58)()?Number.isNaN:N(59)},\n", | |
" function _(n,t,o){t.exports=function(){var n=Number.isNaN;return\"function\"==typeof n&&(!n({})&&n(NaN)&&!n(34))}},\n", | |
" function _(n,t,o){t.exports=function(n){return n!=n}},\n", | |
" function _(t,e,o){e.exports=t(61)()?Object.setPrototypeOf:t(62)},\n", | |
" function _(t,e,o){var n=Object.create,r=Object.getPrototypeOf,c={};e.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||n;return\"function\"==typeof t&&r(t(e(null),c))===c}},\n", | |
" function _(e,t,l){var r,o,n,_,u=e(63),c=e(10),i=Object.prototype.isPrototypeOf,p=Object.defineProperty,f={configurable:!0,enumerable:!1,writable:!0,value:void 0};r=function(e,t){if(c(e),null===t||u(t))return e;throw new TypeError(\"Prototype must be null or an object\")},t.exports=(o=function(){var e,t=Object.create(null),l={},r=Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\");if(r){try{(e=r.set).call(t,l)}catch(e){}if(Object.getPrototypeOf(t)===l)return{set:e,level:2}}return t.__proto__=l,Object.getPrototypeOf(t)===l?{level:2}:((t={}).__proto__=l,Object.getPrototypeOf(t)===l&&{level:1})}())?(2===o.level?o.set?(_=o.set,n=function(e,t){return _.call(r(e,t),t),e}):n=function(e,t){return r(e,t).__proto__=t,e}:n=function e(t,l){var o;return r(t,l),(o=i.call(e.nullPolyfill,t))&&delete e.nullPolyfill.__proto__,null===l&&(l=e.nullPolyfill),t.__proto__=l,o&&p(e.nullPolyfill,\"__proto__\",f),t},Object.defineProperty(n,\"level\",{configurable:!1,enumerable:!1,writable:!1,value:o.level})):null,e(64)},\n", | |
" function _(n,t,o){var c=n(8),e={function:!0,object:!0};t.exports=function(n){return c(n)&&e[typeof n]||!1}},\n", | |
" function _(e,r,l){var t,n,o,a,i=Object.create;e(61)()||(t=e(62)),r.exports=t?1!==t.level?i:(n={},o={},a={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(e){o[e]=\"__proto__\"!==e?a:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(n,o),Object.defineProperty(t,\"nullPolyfill\",{configurable:!1,enumerable:!1,writable:!1,value:n}),function(e,r){return i(null===e?n:e,r)}):i},\n", | |
" function _(e,t,n){var i,l,r,c,_,o,s,a=e(28),h=e(47),f=Function.prototype.apply,u=Function.prototype.call,p=Object.create,b=Object.defineProperty,y=Object.defineProperties,O=Object.prototype.hasOwnProperty,j={configurable:!0,enumerable:!1,writable:!0};l=function(e,t){var n,l;return h(t),l=this,i.call(this,e,n=function(){r.call(l,e,n),f.call(t,this,arguments)}),n.__eeOnceListener__=t,this},_={on:i=function(e,t){var n;return h(t),O.call(this,\"__ee__\")?n=this.__ee__:(n=j.value=p(null),b(this,\"__ee__\",j),j.value=null),n[e]?\"object\"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:l,off:r=function(e,t){var n,i,l,r;if(h(t),!O.call(this,\"__ee__\"))return this;if(!(n=this.__ee__)[e])return this;if(\"object\"==typeof(i=n[e]))for(r=0;l=i[r];++r)l!==t&&l.__eeOnceListener__!==t||(2===i.length?n[e]=i[r?0:1]:i.splice(r,1));else i!==t&&i.__eeOnceListener__!==t||delete n[e];return this},emit:c=function(e){var t,n,i,l,r;if(O.call(this,\"__ee__\")&&(l=this.__ee__[e]))if(\"object\"==typeof l){for(n=arguments.length,r=new Array(n-1),t=1;t<n;++t)r[t-1]=arguments[t];for(l=l.slice(),t=0;i=l[t];++t)f.call(i,this,r)}else switch(arguments.length){case 1:u.call(l,this);break;case 2:u.call(l,this,arguments[1]);break;case 3:u.call(l,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,r=new Array(n-1),t=1;t<n;++t)r[t-1]=arguments[t];f.call(l,this,r)}}},o={on:a(i),once:a(l),off:a(r),emit:a(c)},s=y({},o),t.exports=n=function(e){return null==e?p(s):y(Object(e),o)},n.methods=_},\n", | |
" function _(r,n,t){var e=r(67);n.exports=function(r){if(!e(r))throw new TypeError(r+\" is not iterable\");return r}},\n", | |
" function _(r,t,n){var o=r(44),i=r(8),a=r(48),e=r(24).iterator,f=Array.isArray;t.exports=function(r){return!!i(r)&&(!!f(r)||(!!a(r)||(!!o(r)||\"function\"==typeof r[e])))}},\n", | |
" function _(r,n,t){var a=r(44),e=r(47),o=r(48),l=r(69),c=Array.isArray,i=Function.prototype.call,f=Array.prototype.some;n.exports=function(r,n){var t,u,s,y,p,A,g,v,x=arguments[2];if(c(r)||a(r)?t=\"array\":o(r)?t=\"string\":r=l(r),e(n),s=function(){y=!0},\"array\"!==t)if(\"string\"!==t)for(u=r.next();!u.done;){if(i.call(n,x,u.value,s),y)return;u=r.next()}else for(A=r.length,p=0;p<A&&(g=r[p],p+1<A&&(v=g.charCodeAt(0))>=55296&&v<=56319&&(g+=r[++p]),i.call(n,x,g,s),!y);++p);else f.call(r,function(r){return i.call(n,x,r,s),y})}},\n", | |
" function _(n,t,e){var o=n(44),r=n(48),f=n(70),i=n(84),u=n(66),c=n(24).iterator;t.exports=function(n){return\"function\"==typeof u(n)[c]?n[c]():o(n)?new f(n):r(n)?new i(n):new f(n)}},\n", | |
" function _(t,e,r){var o,_=t(60),i=t(36),n=t(28),l=t(24),a=t(71),s=Object.defineProperty;o=e.exports=function(t,e){if(!(this instanceof o))throw new TypeError(\"Constructor requires 'new'\");a.call(this,t),e=e?i.call(e,\"key+value\")?\"key+value\":i.call(e,\"key\")?\"key\":\"value\":\"value\",s(this,\"__kind__\",n(\"\",e))},_&&_(o,a),delete o.prototype.constructor,o.prototype=Object.create(a.prototype,{_resolve:n(function(t){return\"value\"===this.__kind__?this.__list__[t]:\"key+value\"===this.__kind__?[t,this.__list__[t]]:t})}),s(o.prototype,l.toStringTag,n(\"c\",\"Array Iterator\"))},\n", | |
" function _(_,t,e){var n,i=_(55),o=_(34),s=_(47),r=_(10),h=_(28),d=_(72),c=_(24),u=Object.defineProperty,l=Object.defineProperties;t.exports=n=function(_,t){if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");l(this,{__list__:h(\"w\",r(_)),__context__:h(\"w\",t),__nextIndex__:h(\"w\",0)}),t&&(s(t.on),t.on(\"_add\",this._onAdd),t.on(\"_delete\",this._onDelete),t.on(\"_clear\",this._onClear))},delete n.prototype.constructor,l(n.prototype,o({_next:h(function(){var _;if(this.__list__)return this.__redo__&&void 0!==(_=this.__redo__.shift())?_:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:h(function(){return this._createResult(this._next())}),_createResult:h(function(_){return void 0===_?{done:!0,value:void 0}:{done:!1,value:this._resolve(_)}}),_resolve:h(function(_){return this.__list__[_]}),_unBind:h(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off(\"_add\",this._onAdd),this.__context__.off(\"_delete\",this._onDelete),this.__context__.off(\"_clear\",this._onClear),this.__context__=null)}),toString:h(function(){return\"[object \"+(this[c.toStringTag]||\"Object\")+\"]\"})},d({_onAdd:h(function(_){_>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(t,e){t>=_&&(this.__redo__[e]=++t)},this),this.__redo__.push(_)):u(this,\"__redo__\",h(\"c\",[_])))}),_onDelete:h(function(_){var t;_>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(_))&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,e){t>_&&(this.__redo__[e]=--t)},this)))}),_onClear:h(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),u(n.prototype,c.iterator,h(function(){return this}))},\n", | |
" function _(e,t,n){var r,o=e(29),i=e(73),l=e(78),u=e(79),s=e(35),v=e(81),a=Function.prototype.bind,c=Object.defineProperty,f=Object.prototype.hasOwnProperty;r=function(e,t,n){var r,o=i(t)&&l(t.value);return delete(r=u(t)).writable,delete r.value,r.get=function(){return!n.overwriteDefinition&&f.call(this,e)?o:(t.value=a.call(o,n.resolveContext?n.resolveContext(this):this),c(this,e,t),this[e])},r},t.exports=function(e){var t=s(arguments[1]);return o(t.resolveContext)&&l(t.resolveContext),v(e,function(e,n){return r(n,e,t)})}},\n", | |
" function _(n,t,o){var r=n(74),u=n(29);t.exports=function(n){return u(n)?n:r(n,\"Cannot use %v\",arguments[1])}},\n", | |
" function _(r,e,n){var t=r(29),i=r(33),o=r(75),f=r(76),u=function(r,e){return r.replace(\"%v\",f(e))};e.exports=function(r,e,n){if(!i(n))throw new TypeError(u(e,r));if(!t(r)){if(\"default\"in n)return n.default;if(n.isOptional)return null}var f=o(n.errorMessage);throw t(f)||(f=e),new TypeError(u(f,r))}},\n", | |
" function _(t,n,r){var u=t(29),e=t(33),i=Object.prototype.toString;n.exports=function(t){if(!u(t))return null;if(e(t)){var n=t.toString;if(\"function\"!=typeof n)return null;if(n===i)return null}try{return\"\"+t}catch(t){return null}}},\n", | |
" function _(r,e,n){var t=r(77),u=/[\\n\\r\\u2028\\u2029]/g;e.exports=function(r){var e=t(r);return null===e?\"<Non-coercible to string value>\":(e.length>100&&(e=e.slice(0,99)+\"…\"),e=e.replace(u,function(r){switch(r){case\"\\n\":return\"\\\\n\";case\"\\r\":return\"\\\\r\";case\"\\u2028\":return\"\\\\u2028\";case\"\\u2029\":return\"\\\\u2029\";default:throw new Error(\"Unexpected character\")}}))}},\n", | |
" function _(t,r,n){r.exports=function(t){try{return t.toString()}catch(r){try{return String(t)}catch(t){return null}}}},\n", | |
" function _(n,t,i){var o=n(74),r=n(30);t.exports=function(n){return r(n)?n:o(n,\"%v is not a plain function\",arguments[1])}},\n", | |
" function _(n,r,t){var e=n(80),u=n(34),c=n(10);r.exports=function(n){var r=Object(c(n)),t=arguments[1],i=Object(arguments[2]);if(r!==n&&!t)return r;var f={};return t?e(t,function(r){(i.ensure||r in n)&&(f[r]=n[r])}):u(f,n),f}},\n", | |
" function _(r,o,f){o.exports=r(22)()?Array.from:r(23)},\n", | |
" function _(n,t,o){var c=n(47),r=n(82),u=Function.prototype.call;t.exports=function(n,t){var o={},a=arguments[2];return c(t),r(n,function(n,c,r,i){o[c]=u.call(t,a,n,c,r,i)}),o}},\n", | |
" function _(o,c,f){c.exports=o(83)(\"forEach\")},\n", | |
" function _(t,n,o){var c=t(47),e=t(10),r=Function.prototype.bind,u=Function.prototype.call,l=Object.keys,p=Object.prototype.propertyIsEnumerable;n.exports=function(t,n){return function(o,i){var a,f=arguments[2],y=arguments[3];return o=Object(e(o)),c(i),a=l(o),y&&a.sort(\"function\"==typeof y?r.call(y,o):void 0),\"function\"!=typeof t&&(t=a[t]),u.call(t,a,function(t,c){return p.call(o,t)?u.call(i,f,o[t],t,o,c):n})}}},\n", | |
" function _(t,_,e){var n,r=t(60),i=t(28),o=t(24),s=t(71),h=Object.defineProperty;n=_.exports=function(t){if(!(this instanceof n))throw new TypeError(\"Constructor requires 'new'\");t=String(t),s.call(this,t),h(this,\"__length__\",i(\"\",t.length))},r&&r(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:i(function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:i(function(t){var _,e=this.__list__[t];return this.__nextIndex__===this.__length__?e:(_=e.charCodeAt(0))>=55296&&_<=56319?e+this.__list__[this.__nextIndex__++]:e})}),h(n.prototype,o.toStringTag,i(\"c\",\"String Iterator\"))},\n", | |
" function _(t,e,_){var r,i=t(60),o=t(36),n=t(28),s=t(71),a=t(24).toStringTag,c=Object.defineProperty;r=e.exports=function(t,e){if(!(this instanceof r))return new r(t,e);s.call(this,t.__setData__,t),e=e&&o.call(e,\"key+value\")?\"key+value\":\"value\",c(this,\"__kind__\",n(\"\",e))},i&&i(r,s),r.prototype=Object.create(s.prototype,{constructor:n(r),_resolve:n(function(t){return\"value\"===this.__kind__?this.__list__[t]:[this.__list__[t],this.__list__[t]]}),toString:n(function(){return\"[object Set Iterator]\"})}),c(r.prototype,a,n(\"c\",\"Set Iterator\"))},\n", | |
" function _(t,e,o){e.exports=\"undefined\"!=typeof Set&&\"[object Set]\"===Object.prototype.toString.call(Set.prototype)},\n", | |
" function _(e,a,n){e(88)()||Object.defineProperty(e(26),\"Map\",{value:e(89),configurable:!0,enumerable:!1,writable:!0})},\n", | |
" function _(t,e,n){e.exports=function(){var t,e;if(\"function\"!=typeof Map)return!1;try{t=new Map([[\"raz\",\"one\"],[\"dwa\",\"two\"],[\"trzy\",\"three\"]])}catch(t){return!1}return\"[object Map]\"===String(t)&&(3===t.size&&(\"function\"==typeof t.clear&&(\"function\"==typeof t.delete&&(\"function\"==typeof t.entries&&(\"function\"==typeof t.forEach&&(\"function\"==typeof t.get&&(\"function\"==typeof t.has&&(\"function\"==typeof t.keys&&(\"function\"==typeof t.set&&(\"function\"==typeof t.values&&(!1===(e=t.entries().next()).done&&(!!e.value&&(\"raz\"===e.value[0]&&\"one\"===e.value[1])))))))))))))}},\n", | |
" function _(t,e,a){var _,n=t(55),i=t(56),r=t(60),s=t(47),o=t(10),p=t(28),c=t(65),u=t(24),l=t(66),h=t(68),f=t(90),y=t(93),m=Function.prototype.call,D=Object.defineProperties,v=Object.getPrototypeOf;e.exports=_=function(){var t,e,a,n=arguments[0];if(!(this instanceof _))throw new TypeError(\"Constructor requires 'new'\");return a=y&&r&&Map!==_?r(new Map,v(this)):this,null!=n&&l(n),D(a,{__mapKeysData__:p(\"c\",t=[]),__mapValuesData__:p(\"c\",e=[])}),n?(h(n,function(a){var _=o(a)[0];a=a[1],-1===i.call(t,_)&&(t.push(_),e.push(a))},a),a):a},y&&(r&&r(_,Map),_.prototype=Object.create(Map.prototype,{constructor:p(_)})),c(D(_.prototype,{clear:p(function(){this.__mapKeysData__.length&&(n.call(this.__mapKeysData__),n.call(this.__mapValuesData__),this.emit(\"_clear\"))}),delete:p(function(t){var e=i.call(this.__mapKeysData__,t);return-1!==e&&(this.__mapKeysData__.splice(e,1),this.__mapValuesData__.splice(e,1),this.emit(\"_delete\",e,t),!0)}),entries:p(function(){return new f(this,\"key+value\")}),forEach:p(function(t){var e,a,_=arguments[1];for(s(t),a=(e=this.entries())._next();void 0!==a;)m.call(t,_,this.__mapValuesData__[a],this.__mapKeysData__[a],this),a=e._next()}),get:p(function(t){var e=i.call(this.__mapKeysData__,t);if(-1!==e)return this.__mapValuesData__[e]}),has:p(function(t){return-1!==i.call(this.__mapKeysData__,t)}),keys:p(function(){return new f(this,\"key\")}),set:p(function(t,e){var a,_=i.call(this.__mapKeysData__,t);return-1===_&&(_=this.__mapKeysData__.push(t)-1,a=!0),this.__mapValuesData__[_]=e,a&&this.emit(\"_add\",_,t),this}),size:p.gs(function(){return this.__mapKeysData__.length}),values:p(function(){return new f(this,\"value\")}),toString:p(function(){return\"[object Map]\"})})),Object.defineProperty(_.prototype,u.iterator,p(function(){return this.entries()})),Object.defineProperty(_.prototype,u.toStringTag,p(\"c\",\"Map\"))},\n", | |
" function _(t,_,e){var i,n=t(60),r=t(28),o=t(71),s=t(24).toStringTag,a=t(91),u=Object.defineProperties,c=o.prototype._unBind;i=_.exports=function(t,_){if(!(this instanceof i))return new i(t,_);o.call(this,t.__mapKeysData__,t),_&&a[_]||(_=\"key+value\"),u(this,{__kind__:r(\"\",_),__values__:r(\"w\",t.__mapValuesData__)})},n&&n(i,o),i.prototype=Object.create(o.prototype,{constructor:r(i),_resolve:r(function(t){return\"value\"===this.__kind__?this.__values__[t]:\"key\"===this.__kind__?this.__list__[t]:[this.__list__[t],this.__values__[t]]}),_unBind:r(function(){this.__values__=null,c.call(this)}),toString:r(function(){return\"[object Map Iterator]\"})}),Object.defineProperty(i.prototype,s,r(\"c\",\"Map Iterator\"))},\n", | |
" function _(e,u,a){u.exports=e(92)(\"key\",\"value\",\"key+value\")},\n", | |
" function _(r,t,n){var c=Array.prototype.forEach,o=Object.create;t.exports=function(r){var t=o(null);return c.call(arguments,function(r){t[r]=!0}),t}},\n", | |
" function _(t,e,o){e.exports=\"undefined\"!=typeof Map&&\"[object Map]\"===Object.prototype.toString.call(new Map)},\n", | |
" function _(e,a,n){e(95)()||Object.defineProperty(e(26),\"WeakMap\",{value:e(96),configurable:!0,enumerable:!1,writable:!0})},\n", | |
" function _(t,e,n){e.exports=function(){var t,e;if(\"function\"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},\"one\"],[{},\"two\"],[{},\"three\"]])}catch(t){return!1}return\"[object WeakMap]\"===String(t)&&(\"function\"==typeof t.set&&(t.set({},1)===t&&(\"function\"==typeof t.delete&&(\"function\"==typeof t.has&&\"one\"===t.get(e)))))}},\n", | |
" function _(t,e,a){var r,n=t(8),o=t(60),p=t(97),_=t(10),i=t(98),c=t(28),s=t(69),u=t(68),f=t(24).toStringTag,k=t(99),M=Array.isArray,h=Object.defineProperty,w=Object.prototype.hasOwnProperty,y=Object.getPrototypeOf;e.exports=r=function(){var t,e=arguments[0];if(!(this instanceof r))throw new TypeError(\"Constructor requires 'new'\");return t=k&&o&&WeakMap!==r?o(new WeakMap,y(this)):this,n(e)&&(M(e)||(e=s(e))),h(t,\"__weakMapData__\",c(\"c\",\"$weakMap$\"+i())),e?(u(e,function(e){_(e),t.set(e[0],e[1])}),t):t},k&&(o&&o(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:c(r)})),Object.defineProperties(r.prototype,{delete:c(function(t){return!!w.call(p(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)}),get:c(function(t){if(w.call(p(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:c(function(t){return w.call(p(t),this.__weakMapData__)}),set:c(function(t,e){return h(p(t),this.__weakMapData__,c(\"c\",e)),this}),toString:c(function(){return\"[object WeakMap]\"})}),h(r.prototype,f,c(\"c\",\"WeakMap\"))},\n", | |
" function _(n,r,t){var o=n(63);r.exports=function(n){if(!o(n))throw new TypeError(n+\" is not an Object\");return n}},\n", | |
" function _(t,n,r){var e=Object.create(null),o=Math.random;n.exports=function(){var t;do{t=o().toString(36).slice(2)}while(e[t]);return t}},\n", | |
" function _(t,e,o){e.exports=\"function\"==typeof WeakMap&&\"[object WeakMap]\"===Object.prototype.toString.call(new WeakMap)},\n", | |
" function _(l,o,f){o.exports=l(101).polyfill()},\n", | |
" function _(t,e,r){\n", | |
" /*!\n", | |
" * @overview es6-promise - a tiny implementation of Promises/A+.\n", | |
" * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n", | |
" * @license Licensed under MIT license\n", | |
" * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n", | |
" * @version v4.2.6+9869a4bc\n", | |
" */\n", | |
" !function(t,n){\"object\"==typeof r&&void 0!==e?e.exports=n():\"function\"==typeof define&&define.amd?define(n):t.ES6Promise=n()}(this,function(){\"use strict\";function e(t){return\"function\"==typeof t}var r=Array.isArray?Array.isArray:function(t){return\"[object Array]\"===Object.prototype.toString.call(t)},n=0,o=void 0,i=void 0,s=function(t,e){v[n]=t,v[n+1]=e,2===(n+=2)&&(i?i(p):b())};var u=\"undefined\"!=typeof window?window:void 0,c=u||{},a=c.MutationObserver||c.WebKitMutationObserver,f=\"undefined\"==typeof self&&\"undefined\"!=typeof process&&\"[object process]\"==={}.toString.call(process),l=\"undefined\"!=typeof Uint8ClampedArray&&\"undefined\"!=typeof importScripts&&\"undefined\"!=typeof MessageChannel;function h(){var t=setTimeout;return function(){return t(p,1)}}var v=new Array(1e3);function p(){for(var t=0;t<n;t+=2){(0,v[t])(v[t+1]),v[t]=void 0,v[t+1]=void 0}n=0}var _,d,y,m,b=void 0;function w(t,e){var r=this,n=new this.constructor(j);void 0===n[A]&&L(n);var o=r._state;if(o){var i=arguments[o-1];s(function(){return D(o,n,i,r._result)})}else k(r,n,t,e);return n}function g(t){if(t&&\"object\"==typeof t&&t.constructor===this)return t;var e=new this(j);return O(e,t),e}f?b=function(){return process.nextTick(p)}:a?(d=0,y=new a(p),m=document.createTextNode(\"\"),y.observe(m,{characterData:!0}),b=function(){m.data=d=++d%2}):l?((_=new MessageChannel).port1.onmessage=p,b=function(){return _.port2.postMessage(0)}):b=void 0===u&&\"function\"==typeof t?function(){try{var t=Function(\"return this\")().require(\"vertx\");return void 0!==(o=t.runOnLoop||t.runOnContext)?function(){o(p)}:h()}catch(t){return h()}}():h();var A=Math.random().toString(36).substring(2);function j(){}var S=void 0,E=1,T=2,M={error:null};function P(t){try{return t.then}catch(t){return M.error=t,M}}function C(t,r,n){r.constructor===t.constructor&&n===w&&r.constructor.resolve===g?function(t,e){e._state===E?F(t,e._result):e._state===T?Y(t,e._result):k(e,void 0,function(e){return O(t,e)},function(e){return Y(t,e)})}(t,r):n===M?(Y(t,M.error),M.error=null):void 0===n?F(t,r):e(n)?function(t,e,r){s(function(t){var n=!1,o=function(t,e,r,n){try{t.call(e,r,n)}catch(t){return t}}(r,e,function(r){n||(n=!0,e!==r?O(t,r):F(t,r))},function(e){n||(n=!0,Y(t,e))},t._label);!n&&o&&(n=!0,Y(t,o))},t)}(t,r,n):F(t,r)}function O(t,e){var r,n;t===e?Y(t,new TypeError(\"You cannot resolve a promise with itself\")):(n=typeof(r=e),null===r||\"object\"!==n&&\"function\"!==n?F(t,e):C(t,e,P(e)))}function x(t){t._onerror&&t._onerror(t._result),q(t)}function F(t,e){t._state===S&&(t._result=e,t._state=E,0!==t._subscribers.length&&s(q,t))}function Y(t,e){t._state===S&&(t._state=T,t._result=e,s(x,t))}function k(t,e,r,n){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+E]=r,o[i+T]=n,0===i&&t._state&&s(q,t)}function q(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var n=void 0,o=void 0,i=t._result,s=0;s<e.length;s+=3)n=e[s],o=e[s+r],n?D(r,n,o,i):o(i);t._subscribers.length=0}}function D(t,r,n,o){var i=e(n),s=void 0,u=void 0,c=void 0,a=void 0;if(i){if((s=function(t,e){try{return t(e)}catch(t){return M.error=t,M}}(n,o))===M?(a=!0,u=s.error,s.error=null):c=!0,r===s)return void Y(r,new TypeError(\"A promises callback cannot return that same promise.\"))}else s=o,c=!0;r._state!==S||(i&&c?O(r,s):a?Y(r,u):t===E?F(r,s):t===T&&Y(r,s))}var K=0;function L(t){t[A]=K++,t._state=void 0,t._result=void 0,t._subscribers=[]}var N=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(j),this.promise[A]||L(this.promise),r(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?F(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&F(this.promise,this._result))):Y(this.promise,new Error(\"Array Methods must be provided an Array\"))}return t.prototype._enumerate=function(t){for(var e=0;this._state===S&&e<t.length;e++)this._eachEntry(t[e],e)},t.prototype._eachEntry=function(t,e){var r=this._instanceConstructor,n=r.resolve;if(n===g){var o=P(t);if(o===w&&t._state!==S)this._settledAt(t._state,e,t._result);else if(\"function\"!=typeof o)this._remaining--,this._result[e]=t;else if(r===U){var i=new r(j);C(i,t,o),this._willSettleAt(i,e)}else this._willSettleAt(new r(function(e){return e(t)}),e)}else this._willSettleAt(n(t),e)},t.prototype._settledAt=function(t,e,r){var n=this.promise;n._state===S&&(this._remaining--,t===T?Y(n,r):this._result[e]=r),0===this._remaining&&F(n,this._result)},t.prototype._willSettleAt=function(t,e){var r=this;k(t,void 0,function(t){return r._settledAt(E,e,t)},function(t){return r._settledAt(T,e,t)})},t}();var U=function(){function t(e){this[A]=K++,this._result=this._state=void 0,this._subscribers=[],j!==e&&(\"function\"!=typeof e&&function(){throw new TypeError(\"You must pass a resolver function as the first argument to the promise constructor\")}(),this instanceof t?function(t,e){try{e(function(e){O(t,e)},function(e){Y(t,e)})}catch(e){Y(t,e)}}(this,e):function(){throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\")}())}return t.prototype.catch=function(t){return this.then(null,t)},t.prototype.finally=function(t){var r=this.constructor;return e(t)?this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})}):this.then(t,t)},t}();return U.prototype.then=w,U.all=function(t){return new N(this,t).promise},U.race=function(t){var e=this;return r(t)?new e(function(r,n){for(var o=t.length,i=0;i<o;i++)e.resolve(t[i]).then(r,n)}):new e(function(t,e){return e(new TypeError(\"You must pass an array to race.\"))})},U.resolve=g,U.reject=function(t){var e=new this(j);return Y(e,t),e},U._setScheduler=function(t){i=t},U._setAsap=function(t){s=t},U._asap=s,U.polyfill=function(){var t=void 0;if(\"undefined\"!=typeof global)t=global;else if(\"undefined\"!=typeof self)t=self;else try{t=Function(\"return this\")()}catch(t){throw new Error(\"polyfill failed because global object is unavailable in this environment\")}var e=t.Promise;if(e){var r=null;try{r=Object.prototype.toString.call(e.resolve())}catch(t){}if(\"[object Promise]\"===r&&!e.cast)return}t.Promise=U},U.Promise=U,U})},\n", | |
" function _(n,o,r){!function(n){for(var o in n)r.hasOwnProperty(o)||(r[o]=n[o])}(n(103))},\n", | |
" function _(e,r,s){var o=e(104);s.version=o.version;var v=e(105);s.embed=v;var l=e(105);s.index=l.index;var a=e(450);s.protocol=a;var t=e(451);s._testing=t;var n=e(167);s.logger=n.logger,s.set_log_level=n.set_log_level;var g=e(128);s.settings=g.settings;var i=e(108);s.Models=i.Models;var d=e(106);s.documents=d.documents;var _=e(452);s.safely=_.safely},\n", | |
" function _(n,i,o){o.version=\"1.4.0\"},\n", | |
" function _(e,o,n){var r=e(106),d=e(167),t=e(119),s=e(127),i=e(109),_=e(441),u=e(443),l=e(442),a=e(441);n.add_document_standalone=a.add_document_standalone,n.index=a.index;var c=e(443);n.add_document_from_session=c.add_document_from_session;var m=e(448);n.embed_items_notebook=m.embed_items_notebook,n.kernels=m.kernels;var f=e(442);function v(e,o,n,t){i.isString(e)&&(e=JSON.parse(s.unescape(e)));var a={};for(var c in e){var m=e[c];a[c]=r.Document.from_json(m)}for(var f=0,v=o;f<v.length;f++){var g=v[f],O=l._resolve_element(g),b=l._resolve_root_elements(g);if(null!=g.docid)_.add_document_standalone(a[g.docid],O,b,g.use_for_title);else{if(null==g.sessionid)throw new Error(\"Error rendering Bokeh items: either 'docid' or 'sessionid' was expected.\");var h=u._get_ws_url(n,t);d.logger.debug(\"embed: computed ws url: \"+h),u.add_document_from_session(h,g.sessionid,O,b,g.use_for_title).then(function(){console.log(\"Bokeh items were rendered successfully\")},function(e){console.log(\"Error rendering Bokeh items:\",e)})}}}n.BOKEH_ROOT=f.BOKEH_ROOT,n.embed_item=function(e,o){var n,r={},d=s.uuid4();r[d]=e.doc,null==o&&(o=e.target_id);var i=document.getElementById(o);null!=i&&i.classList.add(l.BOKEH_ROOT);var _={roots:((n={})[e.root_id]=o,n),docid:d};t.defer(function(){return v(r,[_])})},n.embed_items=function(e,o,n,r){t.defer(function(){return v(e,o,n,r)})}},\n", | |
" function _(n,o,r){function f(n){for(var o in n)r.hasOwnProperty(o)||(r[o]=n[o])}f(n(107)),f(n(199))},\n", | |
" function _(e,t,n){var o=e(108),r=e(104),i=e(167),s=e(376),a=e(115),_=e(116),l=e(126),c=e(196),u=e(117),d=e(110),h=e(125),f=e(118),v=e(109),m=e(339),p=e(170),g=e(166),y=e(199),w=function(){function e(e){this.document=e,this.session=null,this.subscribed_models=new u.Set}return e.prototype.send_event=function(e){null!=this.session&&this.session.send_event(e)},e.prototype.trigger=function(e){for(var t=0,n=this.subscribed_models.values;t<n.length;t++){var o=n[t];if(null==e.origin||e.origin.id===o){var r=this.document._all_models[o];null!=r&&r instanceof g.Model&&r._process_event(e)}}},e}();n.EventManager=w,w.__name__=\"EventManager\",n.documents=[],n.DEFAULT_TITLE=\"Bokeh Application\";var b=function(){function e(){n.documents.push(this),this._init_timestamp=Date.now(),this._title=n.DEFAULT_TITLE,this._roots=[],this._all_models={},this._all_models_by_name=new u.MultiDict,this._all_models_freeze_count=0,this._callbacks=[],this.event_manager=new w(this),this.idle=new _.Signal0(this,\"idle\"),this._idle_roots=new WeakMap,this._interactive_timestamp=null,this._interactive_plot=null}return Object.defineProperty(e.prototype,\"layoutables\",{get:function(){return this._roots.filter(function(e){return e instanceof m.LayoutDOM})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"is_idle\",{get:function(){for(var e=0,t=this.layoutables;e<t.length;e++){var n=t[e];if(!this._idle_roots.has(n))return!1}return!0},enumerable:!0,configurable:!0}),e.prototype.notify_idle=function(e){this._idle_roots.set(e,!0),this.is_idle&&(i.logger.info(\"document idle at \"+(Date.now()-this._init_timestamp)+\" ms\"),this.idle.emit())},e.prototype.clear=function(){this._push_all_models_freeze();try{for(;this._roots.length>0;)this.remove_root(this._roots[0])}finally{this._pop_all_models_freeze()}},e.prototype.interactive_start=function(e){null==this._interactive_plot&&(this._interactive_plot=e,this._interactive_plot.trigger_event(new s.LODStart)),this._interactive_timestamp=Date.now()},e.prototype.interactive_stop=function(e){null!=this._interactive_plot&&this._interactive_plot.id===e.id&&this._interactive_plot.trigger_event(new s.LODEnd),this._interactive_plot=null,this._interactive_timestamp=null},e.prototype.interactive_duration=function(){return null==this._interactive_timestamp?-1:Date.now()-this._interactive_timestamp},e.prototype.destructively_move=function(e){if(e===this)throw new Error(\"Attempted to overwrite a document with itself\");e.clear();var t=d.copy(this._roots);this.clear();for(var n=0,o=t;n<o.length;n++){if(null!=(s=o[n]).document)throw new Error(\"Somehow we didn't detach \"+s)}if(0!==Object.keys(this._all_models).length)throw new Error(\"this._all_models still had stuff in it: \"+this._all_models);for(var r=0,i=t;r<i.length;r++){var s=i[r];e.add_root(s)}e.set_title(this._title)},e.prototype._push_all_models_freeze=function(){this._all_models_freeze_count+=1},e.prototype._pop_all_models_freeze=function(){this._all_models_freeze_count-=1,0===this._all_models_freeze_count&&this._recompute_all_models()},e.prototype._invalidate_all_models=function(){i.logger.debug(\"invalidating document models\"),0===this._all_models_freeze_count&&this._recompute_all_models()},e.prototype._recompute_all_models=function(){for(var e=new u.Set,t=0,n=this._roots;t<n.length;t++){var o=n[t];e=e.union(o.references())}for(var r=new u.Set(h.values(this._all_models)),i=r.diff(e),s=e.diff(r),a={},_=0,l=e.values;_<l.length;_++){var c=l[_];a[c.id]=c}for(var d=0,f=i.values;d<f.length;d++){var v=f[d];v.detach_document(),v instanceof g.Model&&null!=v.name&&this._all_models_by_name.remove_value(v.name,v)}for(var m=0,p=s.values;m<p.length;m++){var y=p[m];y.attach_document(this),y instanceof g.Model&&null!=y.name&&this._all_models_by_name.add_value(y.name,y)}this._all_models=a},e.prototype.roots=function(){return this._roots},e.prototype.add_root=function(e,t){if(i.logger.debug(\"Adding root: \"+e),!d.includes(this._roots,e)){this._push_all_models_freeze();try{this._roots.push(e)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new y.RootAddedEvent(this,e,t))}},e.prototype.remove_root=function(e,t){var n=this._roots.indexOf(e);if(!(n<0)){this._push_all_models_freeze();try{this._roots.splice(n,1)}finally{this._pop_all_models_freeze()}this._trigger_on_change(new y.RootRemovedEvent(this,e,t))}},e.prototype.title=function(){return this._title},e.prototype.set_title=function(e,t){e!==this._title&&(this._title=e,this._trigger_on_change(new y.TitleChangedEvent(this,e,t)))},e.prototype.get_model_by_id=function(e){return e in this._all_models?this._all_models[e]:null},e.prototype.get_model_by_name=function(e){return this._all_models_by_name.get_one(e,\"Multiple models are named '\"+e+\"'\")},e.prototype.on_change=function(e){d.includes(this._callbacks,e)||this._callbacks.push(e)},e.prototype.remove_on_change=function(e){var t=this._callbacks.indexOf(e);t>=0&&this._callbacks.splice(t,1)},e.prototype._trigger_on_change=function(e){for(var t=0,n=this._callbacks;t<n.length;t++){(0,n[t])(e)}},e.prototype._notify_change=function(e,t,n,o,r){\"name\"===t&&(this._all_models_by_name.remove_value(n,e),null!=o&&this._all_models_by_name.add_value(o,e));var i=null!=r?r.setter_id:void 0,s=null!=r?r.hint:void 0;this._trigger_on_change(new y.ModelChangedEvent(this,e,t,n,o,i,s))},e._references_json=function(e,t){void 0===t&&(t=!0);for(var n=[],o=0,r=e;o<r.length;o++){var i=r[o],s=i.ref();s.attributes=i.attributes_as_json(t),delete s.attributes.id,n.push(s)}return n},e._instantiate_object=function(e,t,n){var r=Object.assign(Object.assign({},n),{id:e,__deferred__:!0});return new(o.Models(t))(r)},e._instantiate_references_json=function(t,n){for(var o={},r=0,i=t;r<i.length;r++){var s=i[r],a=s.id,_=s.type,l=s.attributes||{},c=void 0;a in n?c=n[a]:(c=e._instantiate_object(a,_,l),null!=s.subtype&&c.set_subtype(s.subtype)),o[c.id]=c}return o},e._resolve_refs=function(e,t,n){function o(e){if(l.is_ref(e)){if(e.id in t)return t[e.id];if(e.id in n)return n[e.id];throw new Error(\"reference \"+JSON.stringify(e)+\" isn't known (not in Document?)\")}return v.isArray(e)?function(e){for(var t=[],n=0,r=e;n<r.length;n++){var i=r[n];t.push(o(i))}return t}(e):v.isPlainObject(e)?function(e){var t={};for(var n in e){var r=e[n];t[n]=o(r)}return t}(e):e}return o(e)},e._initialize_references_json=function(t,n,o){for(var r={},i=0,s=t;i<s.length;i++){var _=s[i],l=_.id,c=_.attributes,u=!(l in n),d=u?o[l]:n[l],h=e._resolve_refs(c,n,o);r[d.id]=[d,h,u]}function f(e,t){var n={};function o(r){if(r instanceof a.HasProps){if(!(r.id in n)&&r.id in e){n[r.id]=!0;var i=e[r.id],s=i[1],_=i[2];for(var l in s){o(s[l])}t(r,s,_)}}else if(v.isArray(r))for(var c=0,u=r;c<u.length;c++){o(u[c])}else if(v.isPlainObject(r))for(var d in r){o(r[d])}}for(var r in e){o(e[r][0])}}f(r,function(e,t,n){n&&e.setv(t,{silent:!0})}),f(r,function(e,t,n){n&&e.finalize()})},e._event_for_attribute_change=function(e,t,n,o,r){if(o.get_model_by_id(e.id).attribute_is_serializable(t)){var i={kind:\"ModelChanged\",model:{id:e.id,type:e.type},attr:t,new:n};return a.HasProps._json_record_references(o,n,r,!0),i}return null},e._events_to_sync_objects=function(t,n,o,r){for(var s=Object.keys(t.attributes),a=Object.keys(n.attributes),_=d.difference(s,a),l=d.difference(a,s),c=d.intersection(s,a),u=[],h=0,v=_;h<v.length;h++){var m=v[h];i.logger.warn(\"Server sent key \"+m+\" but we don't seem to have it in our JSON\")}for(var p=0,g=l;p<g.length;p++){m=g[p];var y=n.attributes[m];u.push(e._event_for_attribute_change(t,m,y,o,r))}for(var w=0,b=c;w<b.length;w++){m=b[w];var j=t.attributes[m];y=n.attributes[m];null==j&&null==y||(null==j||null==y?u.push(e._event_for_attribute_change(t,m,y,o,r)):f.isEqual(j,y)||u.push(e._event_for_attribute_change(t,m,y,o,r)))}return u.filter(function(e){return null!=e})},e._compute_patch_since_json=function(t,n){var o=n.to_json(!1);function r(e){for(var t={},n=0,o=e.roots.references;n<o.length;n++){var r=o[n];t[r.id]=r}return t}for(var i=r(t),s={},a=[],_=0,l=t.roots.root_ids;_<l.length;_++){s[p=l[_]]=i[p],a.push(p)}for(var c=r(o),u={},f=[],v=0,m=o.roots.root_ids;v<m.length;v++){var p;u[p=m[v]]=c[p],f.push(p)}if(a.sort(),f.sort(),d.difference(a,f).length>0||d.difference(f,a).length>0)throw new Error(\"Not implemented: computing add/remove of document roots\");var g={},y=[];for(var w in n._all_models)if(w in i){var b=e._events_to_sync_objects(i[w],c[w],n,g);y=y.concat(b)}return{references:e._references_json(h.values(g),!1),events:y}},e.prototype.to_json_string=function(e){return void 0===e&&(e=!0),JSON.stringify(this.to_json(e))},e.prototype.to_json=function(t){void 0===t&&(t=!0);var n=this._roots.map(function(e){return e.id}),o=h.values(this._all_models);return{version:r.version,title:this._title,roots:{root_ids:n,references:e._references_json(o,t)}}},e.from_json_string=function(t){var n=JSON.parse(t);return e.from_json(n)},e.from_json=function(t){i.logger.debug(\"Creating Document from JSON\");var n=t.version,o=-1!==n.indexOf(\"+\")||-1!==n.indexOf(\"-\"),s=\"Library versions: JS (\"+r.version+\") / Python (\"+n+\")\";o||r.version===n?i.logger.debug(s):(i.logger.warn(\"JS/Python version mismatch\"),i.logger.warn(s));var a=t.roots,_=a.root_ids,l=a.references,c=e._instantiate_references_json(l,{});e._initialize_references_json(l,{},c);for(var u=new e,d=0,h=_;d<h.length;d++){var f=h[d];u.add_root(c[f])}return u.set_title(t.title),u},e.prototype.replace_with_json=function(t){e.from_json(t).destructively_move(this)},e.prototype.create_json_patch_string=function(e){return JSON.stringify(this.create_json_patch(e))},e.prototype.create_json_patch=function(t){for(var n={},o=[],r=0,s=t;r<s.length;r++){var a=s[r];if(a.document!==this)throw i.logger.warn(\"Cannot create a patch using events from a different document, event had \",a.document,\" we are \",this),new Error(\"Cannot create a patch using events from a different document\");o.push(a.json(n))}return{events:o,references:e._references_json(h.values(n))}},e.prototype.apply_json_patch=function(t,n,o){var r;void 0===n&&(n=[]);for(var s=t.references,a=t.events,_=e._instantiate_references_json(s,this._all_models),l=0,u=a;l<u.length;l++){switch((w=u[l]).kind){case\"RootAdded\":case\"RootRemoved\":case\"ModelChanged\":var d=w.model.id;if(d in this._all_models)_[d]=this._all_models[d];else if(!(d in _))throw i.logger.warn(\"Got an event for unknown model \",w.model),new Error(\"event model wasn't known\")}}var h={},f={};for(var v in _){var m=_[v];v in this._all_models?h[v]=m:f[v]=m}e._initialize_references_json(s,h,f);for(var g=0,y=a;g<y.length;g++){var w;switch((w=y[g]).kind){case\"ModelChanged\":var b=w.model.id;if(!(b in this._all_models))throw new Error(\"Cannot apply patch to \"+b+\" which is not in the document\");var j=this._all_models[b],k=w.attr,E=w.model.type;if(\"data\"===k&&\"ColumnDataSource\"===E){var C=c.decode_column_data(w.new,n),O=C[0],S=C[1];j.setv({_shapes:S,data:O},{setter_id:o})}else{m=e._resolve_refs(w.new,h,f);j.setv(((r={})[k]=m,r),{setter_id:o})}break;case\"ColumnDataChanged\":if(!((J=w.column_source.id)in this._all_models))throw new Error(\"Cannot stream to \"+J+\" which is not in the document\");var D=this._all_models[J],z=c.decode_column_data(w.new,n);O=z[0],S=z[1];if(null!=w.cols){for(var M in D.data)M in O||(O[M]=D.data[M]);for(var M in D._shapes)M in S||(S[M]=D._shapes[M])}D.setv({_shapes:S,data:O},{setter_id:o,check_eq:!1});break;case\"ColumnsStreamed\":if(!((J=w.column_source.id)in this._all_models))throw new Error(\"Cannot stream to \"+J+\" which is not in the document\");if(!((D=this._all_models[J])instanceof p.ColumnDataSource))throw new Error(\"Cannot stream to non-ColumnDataSource\");O=w.data;var A=w.rollover;D.stream(O,A,o);break;case\"ColumnsPatched\":var J;if(!((J=w.column_source.id)in this._all_models))throw new Error(\"Cannot patch \"+J+\" which is not in the document\");if(!((D=this._all_models[J])instanceof p.ColumnDataSource))throw new Error(\"Cannot patch non-ColumnDataSource\");var P=w.patches;D.patch(P,o);break;case\"RootAdded\":var R=_[w.model.id];this.add_root(R,o);break;case\"RootRemoved\":R=_[w.model.id];this.remove_root(R,o);break;case\"TitleChanged\":this.set_title(w.title,o);break;default:throw new Error(\"Unknown patch event \"+JSON.stringify(w))}}},e}();n.Document=b,b.__name__=\"Document\"},\n", | |
" function _(e,r,o){var s=e(109),i=e(115);o.overrides={};var t=new Map;o.Models=function(e){var r=o.overrides[e]||t.get(e);if(null==r)throw new Error(\"Model '\"+e+\"' does not exist. This could be due to a widget or a custom model not being registered before first usage.\");return r},o.Models.register=function(e,r){o.overrides[e]=r},o.Models.unregister=function(e){delete o.overrides[e]},o.Models.register_models=function(e,r,o){var n;if(void 0===r&&(r=!1),null!=e)for(var d in e){var l=e[d];if(n=l,s.isObject(n)&&n.prototype instanceof i.HasProps){var a=l.__qualified__;r||!t.has(a)?t.set(a,l):null!=o?o(a):console.warn(\"Model '\"+a+\"' was already registered\")}}},o.register_models=o.Models.register_models,o.Models.registered_names=function(){return Array.from(t.keys())};var n=e(129);o.register_models(n)},\n", | |
" function _(n,r,t){var e=n(110),i=Object.prototype.toString;function o(n){return\"[object Number]\"===i.call(n)}function u(n){var r=typeof n;return\"function\"===r||\"object\"===r&&!!n}t.isBoolean=function(n){return!0===n||!1===n||\"[object Boolean]\"===i.call(n)},t.isNumber=o,t.isInteger=function(n){return o(n)&&isFinite(n)&&Math.floor(n)===n},t.isString=function(n){return\"[object String]\"===i.call(n)},t.isStrictNaN=function(n){return o(n)&&n!==+n},t.isFunction=function(n){return\"[object Function]\"===i.call(n)},t.isArray=function(n){return Array.isArray(n)},t.isArrayOf=function(n,r){return e.every(n,r)},t.isArrayableOf=function(n,r){for(var t=0,e=n.length;t<e;t++)if(!r(n[t]))return!1;return!0},t.isTypedArray=function(n){return null!=n&&n.buffer instanceof ArrayBuffer},t.isObject=u,t.isPlainObject=function(n){return u(n)&&(null==n.constructor||n.constructor===Object)}},\n", | |
" function _(n,r,e){var t=n(111),u=n(112),i=n(114);e.map=i.map,e.reduce=i.reduce,e.min=i.min,e.min_by=i.min_by,e.max=i.max,e.max_by=i.max_by,e.sum=i.sum,e.cumsum=i.cumsum,e.every=i.every,e.some=i.some,e.find=i.find,e.find_last=i.find_last,e.find_index=i.find_index,e.find_last_index=i.find_last_index,e.sorted_index=i.sorted_index;var a=Array.prototype.slice;function o(n){return a.call(n)}function f(n){return[].concat.apply([],n)}function c(n,r){return-1!==n.indexOf(r)}function l(n,r,e){void 0===e&&(e=1),u.assert(e>0,\"'step' must be a positive number\"),null==r&&(r=n,n=0);for(var t=n<=r?e:-e,i=(0,Math.max)((0,Math.ceil)((0,Math.abs)(r-n)/e),0),a=Array(i),o=0;o<i;o++,n+=t)a[o]=n;return a}function v(n){for(var r=[],e=0,t=n;e<t.length;e++){var u=t[e];c(r,u)||r.push(u)}return r}e.head=function(n){return n[0]},e.tail=function(n){return n[n.length-1]},e.last=function(n){return n[n.length-1]},e.copy=o,e.concat=f,e.includes=c,e.contains=c,e.nth=function(n,r){return n[r>=0?r:n.length+r]},e.zip=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(0==n.length)return[];for(var e=i.min(n.map(function(n){return n.length})),t=n.length,u=new Array(e),a=0;a<e;a++){u[a]=new Array(t);for(var o=0;o<t;o++)u[a][o]=n[o][a]}return u},e.unzip=function(n){for(var r=n.length,e=i.min(n.map(function(n){return n.length})),t=Array(e),u=0;u<e;u++)t[u]=new Array(r);for(var a=0;a<r;a++)for(u=0;u<e;u++)t[u][a]=n[a][u];return t},e.range=l,e.linspace=function(n,r,e){void 0===e&&(e=100);for(var t=(r-n)/(e-1),u=new Array(e),i=0;i<e;i++)u[i]=n+t*i;return u},e.transpose=function(n){for(var r=n.length,e=n[0].length,t=[],u=0;u<e;u++){t[u]=[];for(var i=0;i<r;i++)t[u][i]=n[i][u]}return t},e.argmin=function(n){return i.min_by(l(n.length),function(r){return n[r]})},e.argmax=function(n){return i.max_by(l(n.length),function(r){return n[r]})},e.sort_by=function(n,r){var e=n.map(function(n,e){return{value:n,index:e,key:r(n)}});return e.sort(function(n,r){var e=n.key,t=r.key;if(e!==t){if(e>t||void 0===e)return 1;if(e<t||void 0===t)return-1}return n.index-r.index}),e.map(function(n){return n.value})},e.uniq=v,e.uniq_by=function(n,r){for(var e=[],t=[],u=0,i=n;u<i.length;u++){var a=i[u],o=r(a);c(t,o)||(t.push(o),e.push(a))}return e},e.union=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return v(f(n))},e.intersection=function(n){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];var t=[];n:for(var u=0,i=n;u<i.length;u++){var a=i[u];if(!c(t,a)){for(var o=0,f=r;o<f.length;o++)if(!c(f[o],a))continue n;t.push(a)}}return t},e.difference=function(n){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];var t=f(r);return n.filter(function(n){return!c(t,n)})},e.remove_at=function(n,r){var e=o(n);return e.splice(r,1),e},e.remove_by=function(n,r){for(var e=0;e<n.length;)r(n[e])?n.splice(e,1):e++},e.shuffle=function(n){for(var r=n.length,e=new Array(r),u=0;u<r;u++){var i=t.randomIn(0,u);i!==u&&(e[u]=e[i]),e[i]=n[u]}return e},e.pairwise=function(n,r){for(var e=n.length,t=new Array(e-1),u=0;u<e-1;u++)t[u]=r(n[u],n[u+1]);return t},e.reversed=function(n){for(var r=n.length,e=new Array(r),t=0;t<r;t++)e[r-t-1]=n[t];return e},e.repeat=function(n,r){for(var e=new Array(r),t=0;t<r;t++)e[t]=n;return e}},\n", | |
" function _(n,r,t){function a(n){if(0==n)return 0;for(;n<=0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;return n}function o(n,r){return a(n-r)}function u(){return Math.random()}t.angle_norm=a,t.angle_dist=o,t.angle_between=function(n,r,t,u){var e=o(r,t);if(0==e)return!1;if(e==2*Math.PI)return!0;var f=a(n),i=o(r,f)<=e&&o(f,t)<=e;return 0==u?i:!i},t.random=u,t.randomIn=function(n,r){return null==r&&(r=n,n=0),n+Math.floor(Math.random()*(r-n+1))},t.atan2=function(n,r){return Math.atan2(r[1]-n[1],r[0]-n[0])},t.rnorm=function(n,r){for(var t,a;t=u(),a=(2*(a=u())-1)*Math.sqrt(1/Math.E*2),!(-4*t*t*Math.log(t)>=a*a););var o=a/t;return o=n+r*o},t.clamp=function(n,r,t){return n>t?t:n<r?r:n}},\n", | |
" function _(r,n,t){var e=r(113),i=function(r){function n(){return null!==r&&r.apply(this,arguments)||this}return e.__extends(n,r),n}(Error);t.AssertionError=i,i.__name__=\"AssertionError\",t.assert=function(r,n){if(!(!0===r||!1!==r&&r()))throw new i(n||\"Assertion failed\")}},\n", | |
" function _(t,e,n){\n", | |
" /*! *****************************************************************************\n", | |
" Copyright (c) Microsoft Corporation. All rights reserved.\n", | |
" Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\n", | |
" this file except in compliance with the License. You may obtain a copy of the\n", | |
" License at http://www.apache.org/licenses/LICENSE-2.0\n", | |
" \n", | |
" THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n", | |
" KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\n", | |
" WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\n", | |
" MERCHANTABLITY OR NON-INFRINGEMENT.\n", | |
" \n", | |
" See the Apache Version 2.0 License for specific language governing permissions\n", | |
" and limitations under the License.\n", | |
" ***************************************************************************** */\n", | |
" var r,o,a,c,u,i,f,l,s,y,p,_,b,h,v,d,w,m,O,j;!function(t){var n=\"object\"==typeof global?global:\"object\"==typeof self?self:\"object\"==typeof this?this:{};function r(t,e){return t!==n&&(\"function\"==typeof Object.create?Object.defineProperty(t,\"__esModule\",{value:!0}):t.__esModule=!0),function(n,r){return t[n]=e?e(n,r):r}}\"function\"==typeof define&&define.amd?define(\"tslib\",[\"exports\"],function(e){t(r(n,r(e)))}):\"object\"==typeof e&&\"object\"==typeof e.exports?t(r(n,r(e.exports))):t(r(n))}(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};r=function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)},o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n},c=function(t,e,n,r){var o,a=arguments.length,c=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)c=Reflect.decorate(t,e,n,r);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(c=(a<3?o(c):a>3?o(e,n,c):o(e,n))||c);return a>3&&c&&Object.defineProperty(e,n,c),c},u=function(t,e){return function(n,r){e(n,r,t)}},i=function(t,e){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(t,e)},f=function(t,e,n,r){return new(n||(n=Promise))(function(o,a){function c(t){try{i(r.next(t))}catch(t){a(t)}}function u(t){try{i(r.throw(t))}catch(t){a(t)}}function i(t){t.done?o(t.value):new n(function(e){e(t.value)}).then(c,u)}i((r=r.apply(t,e||[])).next())})},l=function(t,e){var n,r,o,a,c={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:u(0),throw:u(1),return:u(2)},\"function\"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(a){return function(u){return function(a){if(n)throw new TypeError(\"Generator is already executing.\");for(;c;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return c.label++,{value:a[1],done:!1};case 5:c.label++,r=a[1],a=[0];continue;case 7:a=c.ops.pop(),c.trys.pop();continue;default:if(!(o=(o=c.trys).length>0&&o[o.length-1])&&(6===a[0]||2===a[0])){c=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){c.label=a[1];break}if(6===a[0]&&c.label<o[1]){c.label=o[1],o=a;break}if(o&&c.label<o[2]){c.label=o[2],c.ops.push(a);break}o[2]&&c.ops.pop(),c.trys.pop();continue}a=e.call(t,c)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},s=function(t,e){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])},y=function(t){var e=\"function\"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}},p=function(t,e){var n=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,a=n.call(t),c=[];try{for(;(void 0===e||e-- >0)&&!(r=a.next()).done;)c.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return c},_=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(p(arguments[e]));return t},b=function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var a=arguments[e],c=0,u=a.length;c<u;c++,o++)r[o]=a[c];return r},h=function(t){return this instanceof h?(this.v=t,this):new h(t)},v=function(t,e,n){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var r,o=n.apply(t,e||[]),a=[];return r={},c(\"next\"),c(\"throw\"),c(\"return\"),r[Symbol.asyncIterator]=function(){return this},r;function c(t){o[t]&&(r[t]=function(e){return new Promise(function(n,r){a.push([t,e,n,r])>1||u(t,e)})})}function u(t,e){try{(n=o[t](e)).value instanceof h?Promise.resolve(n.value.v).then(i,f):l(a[0][2],n)}catch(t){l(a[0][3],t)}var n}function i(t){u(\"next\",t)}function f(t){u(\"throw\",t)}function l(t,e){t(e),a.shift(),a.length&&u(a[0][0],a[0][1])}},d=function(t){var e,n;return e={},r(\"next\"),r(\"throw\",function(t){throw t}),r(\"return\"),e[Symbol.iterator]=function(){return this},e;function r(r,o){e[r]=t[r]?function(e){return(n=!n)?{value:h(t[r](e)),done:\"return\"===r}:o?o(e):e}:o}},w=function(t){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=y(t),e={},r(\"next\"),r(\"throw\"),r(\"return\"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise(function(r,o){(function(t,e,n,r){Promise.resolve(r).then(function(e){t({value:e,done:n})},e)})(r,o,(e=t[n](e)).done,e.value)})}}},m=function(t,e){return Object.defineProperty?Object.defineProperty(t,\"raw\",{value:e}):t.raw=e,t},O=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e},j=function(t){return t&&t.__esModule?t:{default:t}},t(\"__extends\",r),t(\"__assign\",o),t(\"__rest\",a),t(\"__decorate\",c),t(\"__param\",u),t(\"__metadata\",i),t(\"__awaiter\",f),t(\"__generator\",l),t(\"__exportStar\",s),t(\"__values\",y),t(\"__read\",p),t(\"__spread\",_),t(\"__spreadArrays\",b),t(\"__await\",h),t(\"__asyncGenerator\",v),t(\"__asyncDelegator\",d),t(\"__asyncValues\",w),t(\"__makeTemplateObject\",m),t(\"__importStar\",O),t(\"__importDefault\",j)})},\n", | |
" function _(n,r,t){function e(n,r,t){for(var e=[],o=3;o<arguments.length;o++)e[o-3]=arguments[o];var u=n.length;r<0&&(r+=u),r<0?r=0:r>u&&(r=u),null==t||t>u-r?t=u-r:t<0&&(t=0);for(var i=u-t+e.length,f=new n.constructor(i),a=0;a<r;a++)f[a]=n[a];for(var c=0,l=e;c<l.length;c++){var v=l[c];f[a++]=v}for(var h=r+t;h<u;h++)f[a++]=n[h];return f}function o(n,r){return e(n,r,n.length-r)}function u(n,r,t){var e,o,u=n.length;if(void 0===t&&0==u)throw new Error(\"can't reduce an empty array without an initial value\");for(void 0===t?(e=n[0],o=1):(e=t,o=0);o<u;o++)e=r(e,n[o],o,n);return e}function i(n){return function(r,t){for(var e=r.length,o=n>0?0:e-1;o>=0&&o<e;o+=n)if(t(r[o]))return o;return-1}}t.splice=e,t.head=o,t.insert=function(n,r,t){return e(n,t,0,r)},t.append=function(n,r){return e(n,n.length,0,r)},t.prepend=function(n,r){return e(n,0,0,r)},t.indexOf=function(n,r){for(var t=0,e=n.length;t<e;t++)if(n[t]===r)return t;return-1},t.map=function(n,r){for(var t=n.length,e=new n.constructor(t),o=0;o<t;o++)e[o]=r(n[o],o,n);return e},t.filter=function(n,r){for(var t=n.length,e=new n.constructor(t),u=0,i=0;i<t;i++){var f=n[i];r(f,i,n)&&(e[u++]=f)}return o(e,u)},t.reduce=u,t.min=function(n){for(var r,t=1/0,e=0,o=n.length;e<o;e++)(r=n[e])<t&&(t=r);return t},t.min_by=function(n,r){if(0==n.length)throw new Error(\"min_by() called with an empty array\");for(var t=n[0],e=r(t),o=1,u=n.length;o<u;o++){var i=n[o],f=r(i);f<e&&(t=i,e=f)}return t},t.max=function(n){for(var r,t=-1/0,e=0,o=n.length;e<o;e++)(r=n[e])>t&&(t=r);return t},t.max_by=function(n,r){if(0==n.length)throw new Error(\"max_by() called with an empty array\");for(var t=n[0],e=r(t),o=1,u=n.length;o<u;o++){var i=n[o],f=r(i);f>e&&(t=i,e=f)}return t},t.sum=function(n){for(var r=0,t=0,e=n.length;t<e;t++)r+=n[t];return r},t.cumsum=function(n){var r=new n.constructor(n.length);return u(n,function(n,t,e){return r[e]=n+t},0),r},t.every=function(n,r){for(var t=0,e=n.length;t<e;t++)if(!r(n[t]))return!1;return!0},t.some=function(n,r){for(var t=0,e=n.length;t<e;t++)if(r(n[t]))return!0;return!1},t.index_of=function(n,r){for(var t=0,e=n.length;t<e;t++)if(n[t]===r)return t;return-1},t.find_index=i(1),t.find_last_index=i(-1),t.find=function(n,r){var e=t.find_index(n,r);return-1==e?void 0:n[e]},t.find_last=function(n,r){var e=t.find_last_index(n,r);return-1==e?void 0:n[e]},t.sorted_index=function(n,r){for(var t=0,e=n.length;t<e;){var o=Math.floor((t+e)/2);n[o]<r?t=o+1:e=o}return t}},\n", | |
" function _(e,t,r){var i=e(113),n=e(116),o=e(120),s=e(126),a=e(121),f=e(127),p=e(110),u=e(125),c=e(109),_=e(118),l=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;for(var i in r._subtype=void 0,r.document=null,r.destroyed=new n.Signal0(r,\"destroyed\"),r.change=new n.Signal0(r,\"change\"),r.transformchange=new n.Signal0(r,\"transformchange\"),r.attributes={},r.properties={},r._set_after_defaults={},r._pending=!1,r._changing=!1,r.props){var o=r.props[i],s=o.type,a=o.default_value;if(null==s)throw new Error(\"undefined property type for \"+r.type+\".\"+i);r.properties[i]=new s(r,i,a)}null==t.id&&r.setv({id:f.uniqueId()},{silent:!0});var p=t.__deferred__||!1;return p&&delete(t=u.clone(t)).__deferred__,r.setv(t,{silent:!0}),p||r.finalize(),r}return i.__extends(t,e),Object.defineProperty(t.prototype,\"type\",{get:function(){return this.constructor.__qualified__},set:function(e){console.warn(\"prototype.type = 'ModelName' is deprecated, use static __name__ instead\"),this.constructor.__name__=e},enumerable:!0,configurable:!0}),Object.defineProperty(t,\"__qualified__\",{get:function(){var e=this.__module__,t=this.__name__;return null!=e?e+\".\"+t:t},enumerable:!0,configurable:!0}),t.init_HasProps=function(){this.prototype.props={},this.prototype.mixins=[],this.define({id:[a.Any]})},t._fix_default=function(e,t){return void 0===e?void 0:c.isFunction(e)?e:c.isObject(e)?c.isArray(e)?function(){return p.copy(e)}:function(){return u.clone(e)}:function(){return e}},t.define=function(e){var t=function(t){var i=e[t];if(null!=r.prototype.props[t])throw new Error(\"attempted to redefine property '\"+r.prototype.type+\".\"+t+\"'\");if(null!=r.prototype[t])throw new Error(\"attempted to redefine attribute '\"+r.prototype.type+\".\"+t+\"'\");Object.defineProperty(r.prototype,t,{get:function(){return this.getv(t)},set:function(e){var r;return this.setv(((r={})[t]=e,r)),this},configurable:!1,enumerable:!0});var n=i[0],o=i[1],s=i[2],a={type:n,default_value:r._fix_default(o,t),internal:s||!1},f=u.clone(r.prototype.props);f[t]=a,r.prototype.props=f},r=this;for(var i in e)t(i)},t.internal=function(e){var t={};for(var r in e){var i=e[r],n=i[0],o=i[1];t[r]=[n,o,!0]}this.define(t)},t.mixin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.define(o.create(e));var r=this.prototype.mixins.concat(e);this.prototype.mixins=r},t.mixins=function(e){this.mixin.apply(this,e)},t.override=function(e){for(var t in e){var r=this._fix_default(e[t],t),i=this.prototype.props[t];if(null==i)throw new Error(\"attempted to override nonexistent '\"+this.prototype.type+\".\"+t+\"'\");var n=u.clone(this.prototype.props);n[t]=Object.assign(Object.assign({},i),{default_value:r}),this.prototype.props=n}},t.prototype.toString=function(){return this.type+\"(\"+this.id+\")\"},t.prototype.finalize=function(){var e=this;for(var t in this.properties){var r=this.properties[t];r.update(),null!=r.spec.transform&&this.connect(r.spec.transform.change,function(){return e.transformchange.emit()})}this.initialize(),this.connect_signals()},t.prototype.initialize=function(){},t.prototype.connect_signals=function(){},t.prototype.disconnect_signals=function(){n.Signal.disconnectReceiver(this)},t.prototype.destroy=function(){this.disconnect_signals(),this.destroyed.emit()},t.prototype.clone=function(){return new this.constructor(this.attributes)},t.prototype._setv=function(e,t){var r=t.check_eq,i=t.silent,n=[],o=this._changing;this._changing=!0;var s=this.attributes;for(var a in e){var f=e[a];!1!==r&&_.isEqual(s[a],f)||n.push(a),s[a]=f}if(!i){n.length>0&&(this._pending=!0);for(var p=0;p<n.length;p++)this.properties[n[p]].change.emit()}if(!o){if(!i&&!t.no_change)for(;this._pending;)this._pending=!1,this.change.emit();this._pending=!1,this._changing=!1}},t.prototype.setv=function(e,t){for(var r in void 0===t&&(t={}),e)if(e.hasOwnProperty(r)){var i=r;if(null==this.props[i])throw new Error(\"property \"+this.type+\".\"+i+\" wasn't declared\");null!=t&&t.defaults||(this._set_after_defaults[r]=!0)}if(!u.isEmpty(e)){var n={};for(var r in e)n[r]=this.getv(r);this._setv(e,t);var o=t.silent;if(null==o||!o)for(var r in e)this._tell_document_about_change(r,n[r],this.getv(r),t)}},t.prototype.getv=function(e){if(null==this.props[e])throw new Error(\"property \"+this.type+\".\"+e+\" wasn't declared\");return this.attributes[e]},t.prototype.ref=function(){return s.create_ref(this)},t.prototype.set_subtype=function(e){this._subtype=e},t.prototype.attribute_is_serializable=function(e){var t=this.props[e];if(null==t)throw new Error(this.type+\".attribute_is_serializable('\"+e+\"'): \"+e+\" wasn't declared\");return!t.internal},t.prototype.serializable_attributes=function(){var e={};for(var t in this.attributes){var r=this.attributes[t];this.attribute_is_serializable(t)&&(e[t]=r)}return e},t._value_to_json=function(e,r,i){if(r instanceof t)return r.ref();if(c.isArray(r)){for(var n=[],o=0;o<r.length;o++){var s=r[o];n.push(t._value_to_json(o.toString(),s,r))}return n}if(c.isPlainObject(r)){var a={};for(var f in r)r.hasOwnProperty(f)&&(a[f]=t._value_to_json(f,r[f],r));return a}return r},t.prototype.attributes_as_json=function(e,r){void 0===e&&(e=!0),void 0===r&&(r=t._value_to_json);var i=this.serializable_attributes(),n={};for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];e?n[o]=s:o in this._set_after_defaults&&(n[o]=s)}return r(\"attributes\",n,this)},t._json_record_references=function(e,r,i,n){if(null==r);else if(s.is_ref(r)){if(!(r.id in i)){var o=e.get_model_by_id(r.id);t._value_record_references(o,i,n)}}else if(c.isArray(r))for(var a=0,f=r;a<f.length;a++){var p=f[a];t._json_record_references(e,p,i,n)}else if(c.isPlainObject(r))for(var u in r)if(r.hasOwnProperty(u)){p=r[u];t._json_record_references(e,p,i,n)}},t._value_record_references=function(e,r,i){if(null==e);else if(e instanceof t){if(!(e.id in r)&&(r[e.id]=e,i))for(var n=0,o=e._immediate_references();n<o.length;n++){var s=o[n];t._value_record_references(s,r,!0)}}else if(e.buffer instanceof ArrayBuffer);else if(c.isArray(e))for(var a=0,f=e;a<f.length;a++){var p=f[a];t._value_record_references(p,r,i)}else if(c.isPlainObject(e))for(var u in e)if(e.hasOwnProperty(u)){p=e[u];t._value_record_references(p,r,i)}},t.prototype._immediate_references=function(){var e={},r=this.serializable_attributes();for(var i in r){var n=r[i];t._value_record_references(n,e,!1)}return u.values(e)},t.prototype.references=function(){var e={};return t._value_record_references(this,e,!0),u.values(e)},t.prototype._doc_attached=function(){},t.prototype.attach_document=function(e){if(null!=this.document&&this.document!=e)throw new Error(\"models must be owned by only a single document\");this.document=e,this._doc_attached()},t.prototype.detach_document=function(){this.document=null},t.prototype._tell_document_about_change=function(e,r,i,n){if(this.attribute_is_serializable(e)&&null!=this.document){var o={};t._value_record_references(i,o,!1);var s={};t._value_record_references(r,s,!1);var a=!1;for(var f in o)if(!(f in s)){a=!0;break}if(!a)for(var p in s)if(!(p in o)){a=!0;break}a&&this.document._invalidate_all_models(),this.document._notify_change(this,e,r,i,n)}},t.prototype.materialize_dataspecs=function(e){var t={};for(var r in this.properties){var i=this.properties[r];if(i instanceof a.VectorSpec&&(!i.optional||null!=i.spec.value||r in this._set_after_defaults)){var n=i.array(e);t[\"_\"+r]=n,null!=i.spec.field&&i.spec.field in e._shapes&&(t[\"_\"+r+\"_shape\"]=e._shapes[i.spec.field]),i instanceof a.DistanceSpec&&(t[\"max_\"+r]=p.max(n))}}return t},t}(n.Signalable());r.HasProps=l,l.init_HasProps()},\n", | |
" function _(n,t,e){var i=n(113),r=n(117),l=n(119),o=n(110),u=function(){function n(n,t){this.sender=n,this.name=t}return n.prototype.connect=function(n,t){void 0===t&&(t=null),a.has(this.sender)||a.set(this.sender,[]);var e=a.get(this.sender);if(null!=f(e,this,n,t))return!1;var i=t||n;s.has(i)||s.set(i,[]);var r=s.get(i),l={signal:this,slot:n,context:t};return e.push(l),r.push(l),!0},n.prototype.disconnect=function(n,t){void 0===t&&(t=null);var e=a.get(this.sender);if(null==e||0===e.length)return!1;var i=f(e,this,n,t);if(null==i)return!1;var r=t||n,l=s.get(r);return i.signal=null,h(e),h(l),!0},n.prototype.emit=function(n){for(var t=0,e=a.get(this.sender)||[];t<e.length;t++){var i=e[t],r=i.signal,l=i.slot,o=i.context;r===this&&l.call(o,n,this.sender)}},n}();e.Signal=u,u.__name__=\"Signal\";var c=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return i.__extends(t,n),t.prototype.emit=function(){n.prototype.emit.call(this,void 0)},t}(u);e.Signal0=c,c.__name__=\"Signal0\",function(n){n.disconnectBetween=function(n,t){var e=a.get(n);if(null!=e&&0!==e.length){var i=s.get(t);if(null!=i&&0!==i.length){for(var r=0,l=i;r<l.length;r++){var o=l[r];if(null==o.signal)return;o.signal.sender===n&&(o.signal=null)}h(e),h(i)}}},n.disconnectSender=function(n){var t=a.get(n);if(null!=t&&0!==t.length){for(var e=0,i=t;e<i.length;e++){var r=i[e];if(null==r.signal)return;var l=r.context||r.slot;r.signal=null,h(s.get(l))}h(t)}},n.disconnectReceiver=function(n){var t=s.get(n);if(null!=t&&0!==t.length){for(var e=0,i=t;e<i.length;e++){var r=i[e];if(null==r.signal)return;var l=r.signal.sender;r.signal=null,h(a.get(l))}h(t)}},n.disconnectAll=function(n){var t=a.get(n);if(null!=t&&0!==t.length){for(var e=0,i=t;e<i.length;e++)i[e].signal=null;h(t)}var r=s.get(n);if(null!=r&&0!==r.length){for(var l=0,o=r;l<o.length;l++)o[l].signal=null;h(r)}}}(u=e.Signal||(e.Signal={})),e.Signalable=function(n){return null!=n?function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return i.__extends(t,n),t.prototype.connect=function(n,t){return n.connect(t,this)},t.prototype.disconnect=function(n,t){return n.disconnect(t,this)},t}(n):function(){function n(){}return n.prototype.connect=function(n,t){return n.connect(t,this)},n.prototype.disconnect=function(n,t){return n.disconnect(t,this)},n}()},function(n){n.connect=function(n,t){return n.connect(t,this)},n.disconnect=function(n,t){return n.disconnect(t,this)}}(e._Signalable||(e._Signalable={}));var a=new WeakMap,s=new WeakMap;function f(n,t,e,i){return o.find(n,function(n){return n.signal===t&&n.slot===e&&n.context===i})}var g=new r.Set;function h(n){0===g.size&&l.defer(v),g.add(n)}function v(){g.forEach(function(n){o.remove_by(n,function(n){return null==n.signal})}),g.clear()}},\n", | |
" function _(t,n,e){var r=t(110),i=t(118),o=t(109),s=function(){function t(){this._dict={}}return t.prototype._existing=function(t){return t in this._dict?this._dict[t]:null},t.prototype.add_value=function(t,n){var e=this._existing(t);null==e?this._dict[t]=n:o.isArray(e)?e.push(n):this._dict[t]=[e,n]},t.prototype.remove_value=function(t,n){var e=this._existing(t);if(o.isArray(e)){var s=r.difference(e,[n]);s.length>0?this._dict[t]=s:delete this._dict[t]}else i.isEqual(e,n)&&delete this._dict[t]},t.prototype.get_one=function(t,n){var e=this._existing(t);if(o.isArray(e)){if(1===e.length)return e[0];throw new Error(n)}return e},t}();e.MultiDict=s,s.__name__=\"MultiDict\";var a=function(){function t(n){if(null==n)this._values=[];else if(n instanceof t)this._values=r.copy(n._values);else{this._values=[];for(var e=0,i=n;e<i.length;e++){var o=i[e];this.add(o)}}}return Object.defineProperty(t.prototype,\"values\",{get:function(){return r.copy(this._values).sort()},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return\"Set([\"+this.values.join(\",\")+\"])\"},Object.defineProperty(t.prototype,\"size\",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return-1!==this._values.indexOf(t)},t.prototype.add=function(t){this.has(t)||this._values.push(t)},t.prototype.remove=function(t){var n=this._values.indexOf(t);-1!==n&&this._values.splice(n,1)},t.prototype.toggle=function(t){var n=this._values.indexOf(t);-1===n?this._values.push(t):this._values.splice(n,1)},t.prototype.clear=function(){this._values=[]},t.prototype.union=function(n){return n=new t(n),new t(this._values.concat(n._values))},t.prototype.intersect=function(n){n=new t(n);for(var e=new t,r=0,i=n._values;r<i.length;r++){var o=i[r];this.has(o)&&n.has(o)&&e.add(o)}return e},t.prototype.diff=function(n){n=new t(n);for(var e=new t,r=0,i=this._values;r<i.length;r++){var o=i[r];n.has(o)||e.add(o)}return e},t.prototype.forEach=function(t,n){for(var e=0,r=this._values;e<r.length;e++){var i=r[e];t.call(n||this,i,i,this)}},t}();e.Set=a,a.__name__=\"Set\";var u=function(){function t(t,n,e){this.nrows=t,this.ncols=n,this._matrix=new Array(t);for(var r=0;r<t;r++){this._matrix[r]=new Array(n);for(var i=0;i<n;i++)this._matrix[r][i]=e(r,i)}}return t.prototype.at=function(t,n){return this._matrix[t][n]},t.prototype.map=function(n){var e=this;return new t(this.nrows,this.ncols,function(t,r){return n(e.at(t,r),t,r)})},t.prototype.apply=function(n){var e=this,r=t.from(n),i=this.nrows,o=this.ncols;if(i==r.nrows&&o==r.ncols)return new t(i,o,function(t,n){return r.at(t,n)(e.at(t,n),t,n)});throw new Error(\"dimensions don't match\")},t.prototype.to_sparse=function(){for(var t=[],n=0;n<this.nrows;n++)for(var e=0;e<this.ncols;e++){var r=this._matrix[n][e];t.push([r,n,e])}return t},t.from=function(n){return n instanceof t?n:new t(n.length,r.min(n.map(function(t){return t.length})),function(t,e){return n[t][e]})},t}();e.Matrix=u,u.__name__=\"Matrix\"},\n", | |
" function _(t,r,e){var n=t(109),o=Object.prototype.toString;e.isEqual=function(t,r){return function t(r,e,c,u){if(r===e)return 0!==r||1/r==1/e;if(null==r||null==e)return r===e;var i=o.call(r);if(i!==o.call(e))return!1;switch(i){case\"[object RegExp]\":case\"[object String]\":return\"\"+r==\"\"+e;case\"[object Number]\":return+r!=+r?+e!=+e:0==+r?1/+r==1/e:+r==+e;case\"[object Date]\":case\"[object Boolean]\":return+r==+e}var f=\"[object Array]\"===i;if(!f){if(\"object\"!=typeof r||\"object\"!=typeof e)return!1;var s=r.constructor,a=e.constructor;if(s!==a&&!(n.isFunction(s)&&s instanceof s&&n.isFunction(a)&&a instanceof a)&&\"constructor\"in r&&\"constructor\"in e)return!1}u=u||[];for(var l=(c=c||[]).length;l--;)if(c[l]===r)return u[l]===e;if(c.push(r),u.push(e),f){if((l=r.length)!==e.length)return!1;for(;l--;)if(!t(r[l],e[l],c,u))return!1}else{var b=Object.keys(r),p=void 0;if(l=b.length,Object.keys(e).length!==l)return!1;for(;l--;)if(p=b[l],!e.hasOwnProperty(p)||!t(r[p],e[p],c,u))return!1}return c.pop(),u.pop(),!0}(t,r)}},\n", | |
" function _(n,t,e){e.delay=function(n,t){return setTimeout(n,t)};var r=\"function\"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;e.defer=function(n){return r(n)},e.throttle=function(n,t,e){var r,u,i;void 0===e&&(e={});var a=null,o=0,l=function(){o=!1===e.leading?0:Date.now(),a=null,i=n.apply(r,u),a||(r=u=null)};return function(){var c=Date.now();o||!1!==e.leading||(o=c);var f=t-(c-o);return r=this,u=arguments,f<=0||f>t?(a&&(clearTimeout(a),a=null),o=c,i=n.apply(r,u),a||(r=u=null)):a||!1===e.trailing||(a=setTimeout(l,f)),i}},e.once=function(n){var t,e=!1;return function(){return e||(e=!0,t=n()),t}}},\n", | |
" function _(e,t,n){var r=e(121),a=e(125);function l(e,t){var n={};for(var r in e){var a=e[r];n[t+r]=a}return n}var i={line_color:[r.ColorSpec,\"black\"],line_width:[r.NumberSpec,1],line_alpha:[r.NumberSpec,1],line_join:[r.LineJoin,\"bevel\"],line_cap:[r.LineCap,\"butt\"],line_dash:[r.Array,[]],line_dash_offset:[r.Number,0]};n.line=function(e){return void 0===e&&(e=\"\"),l(i,e)};var o={fill_color:[r.ColorSpec,\"gray\"],fill_alpha:[r.NumberSpec,1]};n.fill=function(e){return void 0===e&&(e=\"\"),l(o,e)};var c={hatch_color:[r.ColorSpec,\"black\"],hatch_alpha:[r.NumberSpec,1],hatch_scale:[r.NumberSpec,12],hatch_pattern:[r.StringSpec,null],hatch_weight:[r.NumberSpec,1],hatch_extra:[r.Any,{}]};n.hatch=function(e){return void 0===e&&(e=\"\"),l(c,e)};var h={text_font:[r.Font,\"helvetica\"],text_font_size:[r.FontSizeSpec,\"12pt\"],text_font_style:[r.FontStyle,\"normal\"],text_color:[r.ColorSpec,\"#444444\"],text_alpha:[r.NumberSpec,1],text_align:[r.TextAlign,\"left\"],text_baseline:[r.TextBaseline,\"bottom\"],text_line_height:[r.Number,1.2]};n.text=function(e){return void 0===e&&(e=\"\"),l(h,e)},n.create=function(e){for(var t={},r=0,l=e;r<l.length;r++){var i=l[r].split(\":\"),o=i[0],c=i[1],h=void 0;switch(o){case\"line\":h=n.line;break;case\"fill\":h=n.fill;break;case\"hatch\":h=n.hatch;break;case\"text\":h=n.text;break;default:throw new Error(\"Unknown property mixin kind '\"+o+\"'\")}a.extend(t,h(c))}return t}},\n", | |
" function _(t,n,e){var i=t(113),r=t(116),o=t(122),u=t(110),a=t(114),l=t(123),s=t(109);function c(t){try{return JSON.stringify(t)}catch(n){return t.toString()}}function p(t){return s.isPlainObject(t)&&(void 0===t.value?0:1)+(void 0===t.field?0:1)+(void 0===t.expr?0:1)==1}r.Signal,e.isSpec=p;var _=function(t){function n(n,e,i){var o=t.call(this)||this;return o.obj=n,o.attr=e,o.default_value=i,o.optional=!1,o.change=new r.Signal0(o.obj,\"change\"),o._init(),o.connect(o.change,function(){return o._init()}),o}return i.__extends(n,t),n.prototype.update=function(){this._init()},n.prototype.init=function(){},n.prototype.transform=function(t){return t},n.prototype.validate=function(t){if(!this.valid(t))throw new Error(this.obj.type+\".\"+this.attr+\" given invalid value: \"+c(t))},n.prototype.valid=function(t){return!0},n.prototype.value=function(t){if(void 0===t&&(t=!0),void 0===this.spec.value)throw new Error(\"attempted to retrieve property value for property without value specification\");var n=this.transform([this.spec.value])[0];return null!=this.spec.transform&&t&&(n=this.spec.transform.compute(n)),n},n.prototype._init=function(){var t,n=this.obj,e=this.attr,i=n.getv(e);if(void 0===i){var r=this.default_value;i=void 0!==r?r(n):null,n.setv(((t={})[e]=i,t),{silent:!0,defaults:!0})}s.isArray(i)?this.spec={value:i}:p(i)?this.spec=i:this.spec={value:i},null!=this.spec.value&&this.validate(this.spec.value),this.init()},n.prototype.toString=function(){return\"Prop(\"+this.obj+\".\"+this.attr+\", spec: \"+c(this.spec)+\")\"},n}(r.Signalable());e.Property=_,_.__name__=\"Property\";var f=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(_);e.Any=f,f.__name__=\"Any\";var h=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.valid=function(t){return s.isArray(t)||t instanceof Float64Array},n}(_);e.Array=h,h.__name__=\"Array\";var d=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.valid=function(t){return s.isBoolean(t)},n}(_);e.Boolean=d,d.__name__=\"Boolean\";var y=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.valid=function(t){return s.isString(t)&&l.is_color(t)},n}(_);e.Color=y,y.__name__=\"Color\";var v=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(_);e.Instance=v,v.__name__=\"Instance\";var m=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.valid=function(t){return s.isNumber(t)},n}(_);e.Number=m,m.__name__=\"Number\";var S=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.valid=function(t){return s.isNumber(t)&&(0|t)==t},n}(m);e.Int=S,S.__name__=\"Int\";var g=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(m);e.Angle=g,g.__name__=\"Angle\";var x=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.valid=function(t){return s.isNumber(t)&&0<=t&&t<=1},n}(m);e.Percent=x,x.__name__=\"Percent\";var b=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.valid=function(t){return s.isString(t)},n}(_);e.String=b,b.__name__=\"String\";var P=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(b);e.FontSize=P,P.__name__=\"FontSize\";var L=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(b);e.Font=L,L.__name__=\"Font\";var T=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.valid=function(t){return s.isString(t)&&u.includes(this.enum_values,t)},n}(_);function A(t){return function(n){function e(){return null!==n&&n.apply(this,arguments)||this}return i.__extends(e,n),Object.defineProperty(e.prototype,\"enum_values\",{get:function(){return t},enumerable:!0,configurable:!0}),e}(T)}e.EnumProperty=T,T.__name__=\"EnumProperty\",e.Enum=A;var O=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),Object.defineProperty(n.prototype,\"enum_values\",{get:function(){return o.Direction},enumerable:!0,configurable:!0}),n.prototype.transform=function(t){for(var n=new Uint8Array(t.length),e=0;e<t.length;e++)switch(t[e]){case\"clock\":n[e]=0;break;case\"anticlock\":n[e]=1}return n},n}(T);e.Direction=O,O.__name__=\"Direction\",e.Anchor=A(o.Anchor),e.AngleUnits=A(o.AngleUnits),e.BoxOrigin=A(o.BoxOrigin),e.ButtonType=A(o.ButtonType),e.Dimension=A(o.Dimension),e.Dimensions=A(o.Dimensions),e.Distribution=A(o.Distribution),e.FontStyle=A(o.FontStyle),e.HatchPatternType=A(o.HatchPatternType),e.HTTPMethod=A(o.HTTPMethod),e.HexTileOrientation=A(o.HexTileOrientation),e.HoverMode=A(o.HoverMode),e.LatLon=A(o.LatLon),e.LegendClickPolicy=A(o.LegendClickPolicy),e.LegendLocation=A(o.LegendLocation),e.LineCap=A(o.LineCap),e.LineJoin=A(o.LineJoin),e.LinePolicy=A(o.LinePolicy),e.Location=A(o.Location),e.Logo=A(o.Logo),e.MarkerType=A(o.MarkerType),e.Orientation=A(o.Orientation),e.OutputBackend=A(o.OutputBackend),e.PaddingUnits=A(o.PaddingUnits),e.Place=A(o.Place),e.PointPolicy=A(o.PointPolicy),e.RadiusDimension=A(o.RadiusDimension),e.RenderLevel=A(o.RenderLevel),e.RenderMode=A(o.RenderMode),e.ResetPolicy=A(o.ResetPolicy),e.RoundingFunction=A(o.RoundingFunction),e.Side=A(o.Side),e.SizingMode=A(o.SizingMode),e.SliderCallbackPolicy=A(o.SliderCallbackPolicy),e.Sort=A(o.Sort),e.SpatialUnits=A(o.SpatialUnits),e.StartEnd=A(o.StartEnd),e.StepMode=A(o.StepMode),e.TapBehavior=A(o.TapBehavior),e.TextAlign=A(o.TextAlign),e.TextBaseline=A(o.TextBaseline),e.TextureRepetition=A(o.TextureRepetition),e.TickLabelOrientation=A(o.TickLabelOrientation),e.TooltipAttachment=A(o.TooltipAttachment),e.UpdateMode=A(o.UpdateMode),e.VerticalAlign=A(o.VerticalAlign);var M=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(_);e.ScalarSpec=M,M.__name__=\"ScalarSpec\";var k=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.array=function(t){var n;if(null!=this.spec.field){if(null==(n=this.transform(t.get_column(this.spec.field))))throw new Error(\"attempted to retrieve property array for nonexistent field '\"+this.spec.field+\"'\")}else if(null!=this.spec.expr)n=this.transform(this.spec.expr.v_compute(t));else{var e=t.get_length();null==e&&(e=1);var i=this.value(!1);n=u.repeat(i,e)}return null!=this.spec.transform&&(n=this.spec.transform.v_compute(n)),n},n}(_);e.VectorSpec=k,k.__name__=\"VectorSpec\";var B=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(k);e.DataSpec=B,B.__name__=\"DataSpec\";var D=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.init=function(){null==this.spec.units&&(this.spec.units=this.default_units);var t=this.spec.units;if(!u.includes(this.valid_units,t))throw new Error(\"units must be one of \"+this.valid_units.join(\", \")+\"; got: \"+t)},Object.defineProperty(n.prototype,\"units\",{get:function(){return this.spec.units},set:function(t){this.spec.units=t},enumerable:!0,configurable:!0}),n}(k);e.UnitsSpec=D,D.__name__=\"UnitsSpec\";var j=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),Object.defineProperty(n.prototype,\"default_units\",{get:function(){return\"rad\"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"valid_units\",{get:function(){return o.AngleUnits},enumerable:!0,configurable:!0}),n.prototype.transform=function(n){return\"deg\"==this.spec.units&&(n=a.map(n,function(t){return t*Math.PI/180})),n=a.map(n,function(t){return-t}),t.prototype.transform.call(this,n)},n}(D);e.AngleSpec=j,j.__name__=\"AngleSpec\";var C=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(B);e.BooleanSpec=C,C.__name__=\"BooleanSpec\";var U=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(B);e.ColorSpec=U,U.__name__=\"ColorSpec\";var w=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(B);e.CoordinateSpec=w,w.__name__=\"CoordinateSpec\";var R=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(B);e.CoordinateSeqSpec=R,R.__name__=\"CoordinateSeqSpec\";var F=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),Object.defineProperty(n.prototype,\"default_units\",{get:function(){return\"data\"},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"valid_units\",{get:function(){return o.SpatialUnits},enumerable:!0,configurable:!0}),n}(D);e.DistanceSpec=F,F.__name__=\"DistanceSpec\";var N=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(B);e.FontSizeSpec=N,N.__name__=\"FontSizeSpec\";var E=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(B);e.MarkerSpec=E,E.__name__=\"MarkerSpec\";var H=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(B);e.NumberSpec=H,H.__name__=\"NumberSpec\";var z=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(B);e.StringSpec=z,z.__name__=\"StringSpec\";var I=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n}(B);e.NullStringSpec=I,I.__name__=\"NullStringSpec\"},\n", | |
" function _(e,t,n){n.Align=[\"start\",\"center\",\"end\"],n.Anchor=[\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"],n.AngleUnits=[\"deg\",\"rad\"],n.BoxOrigin=[\"corner\",\"center\"],n.ButtonType=[\"default\",\"primary\",\"success\",\"warning\",\"danger\"],n.Dimension=[\"width\",\"height\"],n.Dimensions=[\"width\",\"height\",\"both\"],n.Direction=[\"clock\",\"anticlock\"],n.Distribution=[\"uniform\",\"normal\"],n.FontStyle=[\"normal\",\"italic\",\"bold\",\"bold italic\"],n.HatchPatternType=[\"blank\",\"dot\",\"ring\",\"horizontal_line\",\"vertical_line\",\"cross\",\"horizontal_dash\",\"vertical_dash\",\"spiral\",\"right_diagonal_line\",\"left_diagonal_line\",\"diagonal_cross\",\"right_diagonal_dash\",\"left_diagonal_dash\",\"horizontal_wave\",\"vertical_wave\",\"criss_cross\",\" \",\".\",\"o\",\"-\",\"|\",\"+\",'\"',\":\",\"@\",\"/\",\"\\\\\",\"x\",\",\",\"`\",\"v\",\">\",\"*\"],n.HTTPMethod=[\"POST\",\"GET\"],n.HexTileOrientation=[\"pointytop\",\"flattop\"],n.HoverMode=[\"mouse\",\"hline\",\"vline\"],n.LatLon=[\"lat\",\"lon\"],n.LegendClickPolicy=[\"none\",\"hide\",\"mute\"],n.LegendLocation=n.Anchor,n.LineCap=[\"butt\",\"round\",\"square\"],n.LineJoin=[\"miter\",\"round\",\"bevel\"],n.LinePolicy=[\"prev\",\"next\",\"nearest\",\"interp\",\"none\"],n.Location=[\"above\",\"below\",\"left\",\"right\"],n.Logo=[\"normal\",\"grey\"],n.MarkerType=[\"asterisk\",\"circle\",\"circle_cross\",\"circle_x\",\"cross\",\"dash\",\"diamond\",\"diamond_cross\",\"hex\",\"inverted_triangle\",\"square\",\"square_cross\",\"square_x\",\"triangle\",\"x\"],n.Orientation=[\"vertical\",\"horizontal\"],n.OutputBackend=[\"canvas\",\"svg\",\"webgl\"],n.PaddingUnits=[\"percent\",\"absolute\"],n.Place=[\"above\",\"below\",\"left\",\"right\",\"center\"],n.PointPolicy=[\"snap_to_data\",\"follow_mouse\",\"none\"],n.RadiusDimension=[\"x\",\"y\",\"max\",\"min\"],n.RenderLevel=[\"image\",\"underlay\",\"glyph\",\"annotation\",\"overlay\"],n.RenderMode=[\"canvas\",\"css\"],n.ResetPolicy=[\"standard\",\"event_only\"],n.RoundingFunction=[\"round\",\"nearest\",\"floor\",\"rounddown\",\"ceil\",\"roundup\"],n.Side=[\"above\",\"below\",\"left\",\"right\"],n.SizingMode=[\"stretch_width\",\"stretch_height\",\"stretch_both\",\"scale_width\",\"scale_height\",\"scale_both\",\"fixed\"],n.SliderCallbackPolicy=[\"continuous\",\"throttle\",\"mouseup\"],n.Sort=[\"ascending\",\"descending\"],n.SpatialUnits=[\"screen\",\"data\"],n.StartEnd=[\"start\",\"end\"],n.StepMode=[\"after\",\"before\",\"center\"],n.TapBehavior=[\"select\",\"inspect\"],n.TextAlign=[\"left\",\"right\",\"center\"],n.TextBaseline=[\"top\",\"middle\",\"bottom\",\"alphabetic\",\"hanging\",\"ideographic\"],n.TextureRepetition=[\"repeat\",\"repeat_x\",\"repeat_y\",\"no_repeat\"],n.TickLabelOrientation=[\"vertical\",\"horizontal\",\"parallel\",\"normal\"],n.TooltipAttachment=[\"horizontal\",\"vertical\",\"left\",\"right\",\"above\",\"below\"],n.UpdateMode=[\"replace\",\"append\"],n.VerticalAlign=[\"top\",\"middle\",\"bottom\"]},\n", | |
" function _(r,e,t){var n=r(124),a=r(110);function o(r){var e=Number(r).toString(16);return 1==e.length?\"0\"+e:e}function l(r){if(0==(r+=\"\").indexOf(\"#\"))return r;if(n.is_svg_color(r))return n.svg_colors[r];if(0==r.indexOf(\"rgb\")){var e=r.replace(/^rgba?\\(|\\s+|\\)$/g,\"\").split(\",\"),t=e.slice(0,3).map(o).join(\"\");return 4==e.length&&(t+=o(Math.floor(255*parseFloat(e[3])))),\"#\"+t.slice(0,8)}return r}function i(r){var e;switch(r.substring(0,4)){case\"rgba\":e={start:\"rgba(\",len:4,alpha:!0};break;case\"rgb(\":e={start:\"rgb(\",len:3,alpha:!1};break;default:return!1}if(new RegExp(\".*?(\\\\.).*(,)\").test(r))throw new Error(\"color expects integers for rgb in rgb/rgba tuple, received \"+r);var t=r.replace(e.start,\"\").replace(\")\",\"\").split(\",\").map(parseFloat);if(t.length!=e.len)throw new Error(\"color expects rgba \"+e.len+\"-tuple, received \"+r);if(e.alpha&&!(0<=t[3]&&t[3]<=1))throw new Error(\"color expects rgba 4-tuple to have alpha value between 0 and 1\");if(a.includes(t.slice(0,3).map(function(r){return 0<=r&&r<=255}),!1))throw new Error(\"color expects rgb to have value between 0 and 255\");return!0}t.is_color=function(r){return n.is_svg_color(r.toLowerCase())||\"#\"==r.substring(0,1)||i(r)},t.rgb2hex=function(r,e,t){return\"#\"+o(255&r)+o(255&e)+o(255&t)},t.color2hex=l,t.color2rgba=function(r,e){if(void 0===e&&(e=1),!r)return[0,0,0,0];var t=l(r);(t=t.replace(/ |#/g,\"\")).length<=4&&(t=t.replace(/(.)/g,\"$1$1\"));for(var n=t.match(/../g).map(function(r){return parseInt(r,16)/255});n.length<3;)n.push(0);return n.length<4&&n.push(e),n.slice(0,4)},t.valid_rgb=i},\n", | |
" function _(F,e,r){r.svg_colors={indianred:\"#CD5C5C\",lightcoral:\"#F08080\",salmon:\"#FA8072\",darksalmon:\"#E9967A\",lightsalmon:\"#FFA07A\",crimson:\"#DC143C\",red:\"#FF0000\",firebrick:\"#B22222\",darkred:\"#8B0000\",pink:\"#FFC0CB\",lightpink:\"#FFB6C1\",hotpink:\"#FF69B4\",deeppink:\"#FF1493\",mediumvioletred:\"#C71585\",palevioletred:\"#DB7093\",coral:\"#FF7F50\",tomato:\"#FF6347\",orangered:\"#FF4500\",darkorange:\"#FF8C00\",orange:\"#FFA500\",gold:\"#FFD700\",yellow:\"#FFFF00\",lightyellow:\"#FFFFE0\",lemonchiffon:\"#FFFACD\",lightgoldenrodyellow:\"#FAFAD2\",papayawhip:\"#FFEFD5\",moccasin:\"#FFE4B5\",peachpuff:\"#FFDAB9\",palegoldenrod:\"#EEE8AA\",khaki:\"#F0E68C\",darkkhaki:\"#BDB76B\",lavender:\"#E6E6FA\",thistle:\"#D8BFD8\",plum:\"#DDA0DD\",violet:\"#EE82EE\",orchid:\"#DA70D6\",fuchsia:\"#FF00FF\",magenta:\"#FF00FF\",mediumorchid:\"#BA55D3\",mediumpurple:\"#9370DB\",blueviolet:\"#8A2BE2\",darkviolet:\"#9400D3\",darkorchid:\"#9932CC\",darkmagenta:\"#8B008B\",purple:\"#800080\",indigo:\"#4B0082\",slateblue:\"#6A5ACD\",darkslateblue:\"#483D8B\",mediumslateblue:\"#7B68EE\",greenyellow:\"#ADFF2F\",chartreuse:\"#7FFF00\",lawngreen:\"#7CFC00\",lime:\"#00FF00\",limegreen:\"#32CD32\",palegreen:\"#98FB98\",lightgreen:\"#90EE90\",mediumspringgreen:\"#00FA9A\",springgreen:\"#00FF7F\",mediumseagreen:\"#3CB371\",seagreen:\"#2E8B57\",forestgreen:\"#228B22\",green:\"#008000\",darkgreen:\"#006400\",yellowgreen:\"#9ACD32\",olivedrab:\"#6B8E23\",olive:\"#808000\",darkolivegreen:\"#556B2F\",mediumaquamarine:\"#66CDAA\",darkseagreen:\"#8FBC8F\",lightseagreen:\"#20B2AA\",darkcyan:\"#008B8B\",teal:\"#008080\",aqua:\"#00FFFF\",cyan:\"#00FFFF\",lightcyan:\"#E0FFFF\",paleturquoise:\"#AFEEEE\",aquamarine:\"#7FFFD4\",turquoise:\"#40E0D0\",mediumturquoise:\"#48D1CC\",darkturquoise:\"#00CED1\",cadetblue:\"#5F9EA0\",steelblue:\"#4682B4\",lightsteelblue:\"#B0C4DE\",powderblue:\"#B0E0E6\",lightblue:\"#ADD8E6\",skyblue:\"#87CEEB\",lightskyblue:\"#87CEFA\",deepskyblue:\"#00BFFF\",dodgerblue:\"#1E90FF\",cornflowerblue:\"#6495ED\",royalblue:\"#4169E1\",blue:\"#0000FF\",mediumblue:\"#0000CD\",darkblue:\"#00008B\",navy:\"#000080\",midnightblue:\"#191970\",cornsilk:\"#FFF8DC\",blanchedalmond:\"#FFEBCD\",bisque:\"#FFE4C4\",navajowhite:\"#FFDEAD\",wheat:\"#F5DEB3\",burlywood:\"#DEB887\",tan:\"#D2B48C\",rosybrown:\"#BC8F8F\",sandybrown:\"#F4A460\",goldenrod:\"#DAA520\",darkgoldenrod:\"#B8860B\",peru:\"#CD853F\",chocolate:\"#D2691E\",saddlebrown:\"#8B4513\",sienna:\"#A0522D\",brown:\"#A52A2A\",maroon:\"#800000\",white:\"#FFFFFF\",snow:\"#FFFAFA\",honeydew:\"#F0FFF0\",mintcream:\"#F5FFFA\",azure:\"#F0FFFF\",aliceblue:\"#F0F8FF\",ghostwhite:\"#F8F8FF\",whitesmoke:\"#F5F5F5\",seashell:\"#FFF5EE\",beige:\"#F5F5DC\",oldlace:\"#FDF5E6\",floralwhite:\"#FFFAF0\",ivory:\"#FFFFF0\",antiquewhite:\"#FAEBD7\",linen:\"#FAF0E6\",lavenderblush:\"#FFF0F5\",mistyrose:\"#FFE4E1\",gainsboro:\"#DCDCDC\",lightgray:\"#D3D3D3\",lightgrey:\"#D3D3D3\",silver:\"#C0C0C0\",darkgray:\"#A9A9A9\",darkgrey:\"#A9A9A9\",gray:\"#808080\",grey:\"#808080\",dimgray:\"#696969\",dimgrey:\"#696969\",lightslategray:\"#778899\",lightslategrey:\"#778899\",slategray:\"#708090\",slategrey:\"#708090\",darkslategray:\"#2F4F4F\",darkslategrey:\"#2F4F4F\",black:\"#000000\"},r.is_svg_color=function(F){return F in r.svg_colors}},\n", | |
" function _(e,n,t){var r=e(113),c=e(110);function o(e,n){return r.__assign(e,n)}function u(e){return Object.keys(e).length}t.keys=Object.keys,t.values=function(e){for(var n=Object.keys(e),t=n.length,r=new Array(t),c=0;c<t;c++)r[c]=e[n[c]];return r},t.extend=o,t.clone=function(e){return o({},e)},t.merge=function(e,n){for(var t=Object.create(Object.prototype),r=0,o=c.concat([Object.keys(e),Object.keys(n)]);r<o.length;r++){var u=o[r],s=e.hasOwnProperty(u)?e[u]:[],a=n.hasOwnProperty(u)?n[u]:[];t[u]=c.union(s,a)}return t},t.size=u,t.isEmpty=function(e){return 0===u(e)}},\n", | |
" function _(e,t,r){var n=e(109);r.create_ref=function(e){var t={type:e.type,id:e.id};return null!=e._subtype&&(t.subtype=e._subtype),t},r.is_ref=function(e){if(n.isObject(e)){var t=Object.keys(e).sort();if(2==t.length)return\"id\"==t[0]&&\"type\"==t[1];if(3==t.length)return\"id\"==t[0]&&\"subtype\"==t[1]&&\"type\"==t[2]}return!1}},\n", | |
" function _(r,t,e){var n=r(128);function u(){for(var r=new Array(32),t=0;t<32;t++)r[t]=\"0123456789ABCDEF\".substr(Math.floor(16*Math.random()),1);return r[12]=\"4\",r[16]=\"0123456789ABCDEF\".substr(3&r[16].charCodeAt(0)|8,1),r.join(\"\")}e.startsWith=function(r,t,e){return void 0===e&&(e=0),r.substr(e,t.length)==t},e.uuid4=u;var a=1e3;e.uniqueId=function(r){var t=n.settings.dev?\"j\"+a++:u();return null!=r?r+\"-\"+t:t},e.escape=function(r){return r.replace(/(?:[&<>\"'`])/g,function(r){switch(r){case\"&\":return\"&\";case\"<\":return\"<\";case\">\":return\">\";case'\"':return\""\";case\"'\":return\"'\";case\"`\":return\"`\";default:return r}})},e.unescape=function(r){return r.replace(/&(amp|lt|gt|quot|#x27|#x60);/g,function(r,t){switch(t){case\"amp\":return\"&\";case\"lt\":return\"<\";case\"gt\":return\">\";case\"quot\":return'\"';case\"#x27\":return\"'\";case\"#x60\":return\"`\";default:return t}})},e.use_strict=function(r){return\"'use strict';\\n\"+r}},\n", | |
" function _(e,t,n){var i=function(){function e(){this._dev=!1}return Object.defineProperty(e.prototype,\"dev\",{get:function(){return this._dev},set:function(e){this._dev=e},enumerable:!0,configurable:!0}),e}();n.Settings=i,i.__name__=\"Settings\",n.settings=new i},\n", | |
" function _(n,o,r){function f(n){for(var o in n)r.hasOwnProperty(o)||(r[o]=n[o])}f(n(130)),f(n(242)),f(n(269)),f(n(273)),f(n(288)),f(n(292)),f(n(298)),f(n(302)),f(n(332)),f(n(335)),f(n(337)),f(n(350)),f(n(217)),f(n(356)),f(n(360)),f(n(383)),f(n(384)),f(n(385)),f(n(386)),f(n(387)),f(n(393)),f(n(395)),f(n(405)),f(n(409))},\n", | |
" function _(a,e,o){var r=a(131);o.Annotation=r.Annotation;var n=a(168);o.Arrow=n.Arrow;var t=a(169);o.ArrowHead=t.ArrowHead;var v=a(169);o.OpenHead=v.OpenHead;var l=a(169);o.NormalHead=l.NormalHead;var d=a(169);o.TeeHead=d.TeeHead;var i=a(169);o.VeeHead=i.VeeHead;var A=a(200);o.Band=A.Band;var H=a(201);o.BoxAnnotation=H.BoxAnnotation;var T=a(203);o.ColorBar=T.ColorBar;var p=a(227);o.Label=p.Label;var L=a(229);o.LabelSet=L.LabelSet;var b=a(230);o.Legend=b.Legend;var B=a(231);o.LegendItem=B.LegendItem;var S=a(233);o.PolyAnnotation=S.PolyAnnotation;var g=a(234);o.Slope=g.Slope;var m=a(235);o.Span=m.Span;var w=a(228);o.TextAnnotation=w.TextAnnotation;var x=a(236);o.Title=x.Title;var P=a(237);o.ToolbarPanel=P.ToolbarPanel;var h=a(238);o.Tooltip=h.Tooltip;var k=a(241);o.Whisker=k.Whisker},\n", | |
" function _(t,e,n){var i=t(113),o=t(132),r=t(125),s=t(160),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),Object.defineProperty(e.prototype,\"panel\",{get:function(){return this.layout},enumerable:!0,configurable:!0}),e.prototype.get_size=function(){if(this.model.visible){var t=this._get_size(),e=t.width,n=t.height;return{width:Math.round(e),height:Math.round(n)}}return{width:0,height:0}},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this);var n=this.model.properties;this.on_change(n.visible,function(){return e.plot_view.request_layout()})},e.prototype._get_size=function(){throw new Error(\"not implemented\")},Object.defineProperty(e.prototype,\"ctx\",{get:function(){return this.plot_view.canvas_view.ctx},enumerable:!0,configurable:!0}),e.prototype.set_data=function(t){var e,n,i=this.model.materialize_dataspecs(t);if(r.extend(this,i),this.plot_model.use_map){null!=this._x&&(e=o.project_xy(this._x,this._y),this._x=e[0],this._y=e[1]),null!=this._xs&&(n=o.project_xsys(this._xs,this._ys),this._xs=n[0],this._ys=n[1])}},Object.defineProperty(e.prototype,\"needs_clip\",{get:function(){return null==this.layout},enumerable:!0,configurable:!0}),e.prototype.serializable_state=function(){var e=t.prototype.serializable_state.call(this);return null==this.layout?e:Object.assign(Object.assign({},e),{bbox:this.layout.bbox.box})},e}(s.RendererView);n.AnnotationView=a,a.__name__=\"AnnotationView\";var l=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.init_Annotation=function(){this.override({level:\"annotation\"})},e}(s.Renderer);n.Annotation=l,l.__name__=\"Annotation\",l.init_Annotation()},\n", | |
" function _(r,n,t){var a=r(133),e=r(134),o=new e(\"GOOGLE\"),c=new e(\"WGS84\");t.wgs84_mercator=a(c,o);var i={lon:[-20026376.39,20026376.39],lat:[-20048966.1,20048966.1]},u={lon:[-180,180],lat:[-85.06,85.06]};function l(r,n){for(var a=Math.min(r.length,n.length),e=new Array(a),o=new Array(a),c=0;c<a;c++){var i=t.wgs84_mercator.forward([r[c],n[c]]),u=i[0],l=i[1];e[c]=u,o[c]=l}return[e,o]}t.clip_mercator=function(r,n,t){var a=i[t],e=a[0],o=a[1];return[Math.max(r,e),Math.min(n,o)]},t.in_bounds=function(r,n){return r>u[n][0]&&r<u[n][1]},t.project_xy=l,t.project_xsys=function(r,n){for(var t=Math.min(r.length,n.length),a=new Array(t),e=new Array(t),o=0;o<t;o++){var c=l(r[o],n[o]),i=c[0],u=c[1];a[o]=i,e[o]=u}return[a,e]}},\n", | |
" function _(r,n,o){var t=r(134),i=r(155),u=t(\"WGS84\");function e(r,n,o){var t;return Array.isArray(o)?(t=i(r,n,o),3===o.length?[t.x,t.y,t.z]:[t.x,t.y]):i(r,n,o)}function a(r){return r instanceof t?r:r.oProj?r.oProj:t(r)}n.exports=function(r,n,o){r=a(r);var t,i=!1;return void 0===n?(n=r,r=u,i=!0):(void 0!==n.x||Array.isArray(n))&&(o=n,n=r,r=u,i=!0),n=a(n),o?e(r,n,o):(t={forward:function(o){return e(r,n,o)},inverse:function(o){return e(n,r,o)}},i&&(t.oProj=n),t)}},\n", | |
" function _(e,t,s){var a=e(135),i=e(142),r=e(143),o=e(151),n=e(153),p=e(154);function u(e,t){if(!(this instanceof u))return new u(e);t=t||function(e){if(e)throw e};var s=a(e);if(\"object\"==typeof s){var r=u.projections.get(s.projName);if(r){if(s.datumCode&&\"none\"!==s.datumCode){var h=n[s.datumCode];h&&(s.datum_params=h.towgs84?h.towgs84.split(\",\"):null,s.ellps=h.ellipse,s.datumName=h.datumName?h.datumName:s.datumCode)}s.k0=s.k0||1,s.axis=s.axis||\"enu\";var m=o.sphere(s.a,s.b,s.rf,s.ellps,s.sphere),d=o.eccentricity(m.a,m.b,m.rf,s.R_A),f=s.datum||p(s.datumCode,s.datum_params,m.a,m.b,d.es,d.ep2);i(this,s),i(this,r),this.a=m.a,this.b=m.b,this.rf=m.rf,this.sphere=m.sphere,this.es=d.es,this.e=d.e,this.ep2=d.ep2,this.datum=f,this.init(),t(null,this)}else t(e)}else t(e)}u.projections=r,u.projections.start(),t.exports=u},\n", | |
" function _(n,r,t){var u=n(136),i=n(141),o=n(138);var e=[\"GEOGCS\",\"GEOCCS\",\"PROJCS\",\"LOCAL_CS\"];r.exports=function(n){return function(n){return\"string\"==typeof n}(n)?function(n){return n in u}(n)?u[n]:function(n){return e.some(function(r){return n.indexOf(r)>-1})}(n)?i(n):function(n){return\"+\"===n[0]}(n)?o(n):void 0:n}},\n", | |
" function _(r,n,i){var t=r(137),e=r(138),a=r(141);function f(r){var n=this;if(2===arguments.length){var i=arguments[1];\"string\"==typeof i?\"+\"===i.charAt(0)?f[r]=e(arguments[1]):f[r]=a(arguments[1]):f[r]=i}else if(1===arguments.length){if(Array.isArray(r))return r.map(function(r){Array.isArray(r)?f.apply(n,r):f(r)});if(\"string\"==typeof r){if(r in f)return f[r]}else\"EPSG\"in r?f[\"EPSG:\"+r.EPSG]=r:\"ESRI\"in r?f[\"ESRI:\"+r.ESRI]=r:\"IAU2000\"in r?f[\"IAU2000:\"+r.IAU2000]=r:console.log(r);return}}t(f),n.exports=f},\n", | |
" function _(t,l,G){l.exports=function(t){t(\"EPSG:4326\",\"+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees\"),t(\"EPSG:4269\",\"+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees\"),t(\"EPSG:3857\",\"+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs\"),t.WGS84=t[\"EPSG:4326\"],t[\"EPSG:3785\"]=t[\"EPSG:3857\"],t.GOOGLE=t[\"EPSG:3857\"],t[\"EPSG:900913\"]=t[\"EPSG:3857\"],t[\"EPSG:102113\"]=t[\"EPSG:3857\"]}},\n", | |
" function _(n,t,o){var a=.017453292519943295,u=n(139),e=n(140);t.exports=function(n){var t,o,r,i={},f=n.split(\"+\").map(function(n){return n.trim()}).filter(function(n){return n}).reduce(function(n,t){var o=t.split(\"=\");return o.push(!0),n[o[0].toLowerCase()]=o[1],n},{}),s={proj:\"projName\",datum:\"datumCode\",rf:function(n){i.rf=parseFloat(n)},lat_0:function(n){i.lat0=n*a},lat_1:function(n){i.lat1=n*a},lat_2:function(n){i.lat2=n*a},lat_ts:function(n){i.lat_ts=n*a},lon_0:function(n){i.long0=n*a},lon_1:function(n){i.long1=n*a},lon_2:function(n){i.long2=n*a},alpha:function(n){i.alpha=parseFloat(n)*a},lonc:function(n){i.longc=n*a},x_0:function(n){i.x0=parseFloat(n)},y_0:function(n){i.y0=parseFloat(n)},k_0:function(n){i.k0=parseFloat(n)},k:function(n){i.k0=parseFloat(n)},a:function(n){i.a=parseFloat(n)},b:function(n){i.b=parseFloat(n)},r_a:function(){i.R_A=!0},zone:function(n){i.zone=parseInt(n,10)},south:function(){i.utmSouth=!0},towgs84:function(n){i.datum_params=n.split(\",\").map(function(n){return parseFloat(n)})},to_meter:function(n){i.to_meter=parseFloat(n)},units:function(n){i.units=n,e[n]&&(i.to_meter=e[n].to_meter)},from_greenwich:function(n){i.from_greenwich=n*a},pm:function(n){i.from_greenwich=(u[n]?u[n]:parseFloat(n))*a},nadgrids:function(n){\"@null\"===n?i.datumCode=\"none\":i.nadgrids=n},axis:function(n){3===n.length&&-1!==\"ewnsud\".indexOf(n.substr(0,1))&&-1!==\"ewnsud\".indexOf(n.substr(1,1))&&-1!==\"ewnsud\".indexOf(n.substr(2,1))&&(i.axis=n)}};for(t in f)o=f[t],t in s?\"function\"==typeof(r=s[t])?r(o):i[r]=o:i[t]=o;return\"string\"==typeof i.datumCode&&\"WGS84\"!==i.datumCode&&(i.datumCode=i.datumCode.toLowerCase()),i}},\n", | |
" function _(o,r,s){s.greenwich=0,s.lisbon=-9.131906111111,s.paris=2.337229166667,s.bogota=-74.080916666667,s.madrid=-3.687938888889,s.rome=12.452333333333,s.bern=7.439583333333,s.jakarta=106.807719444444,s.ferro=-17.666666666667,s.brussels=4.367975,s.stockholm=18.058277777778,s.athens=23.7163375,s.oslo=10.722916666667},\n", | |
" function _(t,e,f){f.ft={to_meter:.3048},f[\"us-ft\"]={to_meter:1200/3937}},\n", | |
" function _(e,a,t){var r=.017453292519943295,n=e(142);function o(e,a,t){e[a]=t.map(function(e){var a={};return l(e,a),a}).reduce(function(e,a){return n(e,a)},{})}function l(e,a){var t;Array.isArray(e)?(\"PARAMETER\"===(t=e.shift())&&(t=e.shift()),1===e.length?Array.isArray(e[0])?(a[t]={},l(e[0],a[t])):a[t]=e[0]:e.length?\"TOWGS84\"===t?a[t]=e:(a[t]={},[\"UNIT\",\"PRIMEM\",\"VERT_DATUM\"].indexOf(t)>-1?(a[t]={name:e[0].toLowerCase(),convert:e[1]},3===e.length&&(a[t].auth=e[2])):\"SPHEROID\"===t?(a[t]={name:e[0],a:e[1],rf:e[2]},4===e.length&&(a[t].auth=e[3])):[\"GEOGCS\",\"GEOCCS\",\"DATUM\",\"VERT_CS\",\"COMPD_CS\",\"LOCAL_CS\",\"FITTED_CS\",\"LOCAL_DATUM\"].indexOf(t)>-1?(e[0]=[\"name\",e[0]],o(a,t,e)):e.every(function(e){return Array.isArray(e)})?o(a,t,e):l(e,a[t])):a[t]=!0):a[e]=!0}function i(e){return e*r}a.exports=function(e,a){var t=JSON.parse((\",\"+e).replace(/\\s*\\,\\s*([A-Z_0-9]+?)(\\[)/g,',[\"$1\",').slice(1).replace(/\\s*\\,\\s*([A-Z_0-9]+?)\\]/g,',\"$1\"]').replace(/,\\[\"VERTCS\".+/,\"\")),r=t.shift(),o=t.shift();t.unshift([\"name\",o]),t.unshift([\"type\",r]),t.unshift(\"output\");var _={};return l(t,_),function(e){function a(a){var t=e.to_meter||1;return parseFloat(a,10)*t}\"GEOGCS\"===e.type?e.projName=\"longlat\":\"LOCAL_CS\"===e.type?(e.projName=\"identity\",e.local=!0):\"object\"==typeof e.PROJECTION?e.projName=Object.keys(e.PROJECTION)[0]:e.projName=e.PROJECTION,e.UNIT&&(e.units=e.UNIT.name.toLowerCase(),\"metre\"===e.units&&(e.units=\"meter\"),e.UNIT.convert&&(\"GEOGCS\"===e.type?e.DATUM&&e.DATUM.SPHEROID&&(e.to_meter=parseFloat(e.UNIT.convert,10)*e.DATUM.SPHEROID.a):e.to_meter=parseFloat(e.UNIT.convert,10))),e.GEOGCS&&(e.GEOGCS.DATUM?e.datumCode=e.GEOGCS.DATUM.name.toLowerCase():e.datumCode=e.GEOGCS.name.toLowerCase(),\"d_\"===e.datumCode.slice(0,2)&&(e.datumCode=e.datumCode.slice(2)),\"new_zealand_geodetic_datum_1949\"!==e.datumCode&&\"new_zealand_1949\"!==e.datumCode||(e.datumCode=\"nzgd49\"),\"wgs_1984\"===e.datumCode&&(\"Mercator_Auxiliary_Sphere\"===e.PROJECTION&&(e.sphere=!0),e.datumCode=\"wgs84\"),\"_ferro\"===e.datumCode.slice(-6)&&(e.datumCode=e.datumCode.slice(0,-6)),\"_jakarta\"===e.datumCode.slice(-8)&&(e.datumCode=e.datumCode.slice(0,-8)),~e.datumCode.indexOf(\"belge\")&&(e.datumCode=\"rnb72\"),e.GEOGCS.DATUM&&e.GEOGCS.DATUM.SPHEROID&&(e.ellps=e.GEOGCS.DATUM.SPHEROID.name.replace(\"_19\",\"\").replace(/[Cc]larke\\_18/,\"clrk\"),\"international\"===e.ellps.toLowerCase().slice(0,13)&&(e.ellps=\"intl\"),e.a=e.GEOGCS.DATUM.SPHEROID.a,e.rf=parseFloat(e.GEOGCS.DATUM.SPHEROID.rf,10)),~e.datumCode.indexOf(\"osgb_1936\")&&(e.datumCode=\"osgb36\")),e.b&&!isFinite(e.b)&&(e.b=e.a),[[\"standard_parallel_1\",\"Standard_Parallel_1\"],[\"standard_parallel_2\",\"Standard_Parallel_2\"],[\"false_easting\",\"False_Easting\"],[\"false_northing\",\"False_Northing\"],[\"central_meridian\",\"Central_Meridian\"],[\"latitude_of_origin\",\"Latitude_Of_Origin\"],[\"latitude_of_origin\",\"Central_Parallel\"],[\"scale_factor\",\"Scale_Factor\"],[\"k0\",\"scale_factor\"],[\"latitude_of_center\",\"Latitude_of_center\"],[\"lat0\",\"latitude_of_center\",i],[\"longitude_of_center\",\"Longitude_Of_Center\"],[\"longc\",\"longitude_of_center\",i],[\"x0\",\"false_easting\",a],[\"y0\",\"false_northing\",a],[\"long0\",\"central_meridian\",i],[\"lat0\",\"latitude_of_origin\",i],[\"lat0\",\"standard_parallel_1\",i],[\"lat1\",\"standard_parallel_1\",i],[\"lat2\",\"standard_parallel_2\",i],[\"alpha\",\"azimuth\",i],[\"srsCode\",\"name\"]].forEach(function(a){return t=e,n=(r=a)[0],o=r[1],void(!(n in t)&&o in t&&(t[n]=t[o],3===r.length&&(t[n]=r[2](t[n]))));var t,r,n,o}),e.long0||!e.longc||\"Albers_Conic_Equal_Area\"!==e.projName&&\"Lambert_Azimuthal_Equal_Area\"!==e.projName||(e.long0=e.longc),e.lat_ts||!e.lat1||\"Stereographic_South_Pole\"!==e.projName&&\"Polar Stereographic (variant B)\"!==e.projName||(e.lat0=i(e.lat1>0?90:-90),e.lat_ts=e.lat1)}(_.output),n(a,_.output)}},\n", | |
" function _(n,r,i){r.exports=function(n,r){var i,o;if(n=n||{},!r)return n;for(o in r)void 0!==(i=r[o])&&(n[o]=i);return n}},\n", | |
" function _(n,o,t){var r=[n(144),n(150)],e={},a=[];function i(n,o){var t=a.length;return n.names?(a[t]=n,n.names.forEach(function(n){e[n.toLowerCase()]=t}),this):(console.log(o),!0)}t.add=i,t.get=function(n){if(!n)return!1;var o=n.toLowerCase();return void 0!==e[o]&&a[e[o]]?a[e[o]]:void 0},t.start=function(){r.forEach(i)}},\n", | |
" function _(t,s,i){var h=t(145),a=Math.PI/2,e=57.29577951308232,r=t(146),n=Math.PI/4,l=t(148),o=t(149);i.init=function(){var t=this.b/this.a;this.es=1-t*t,\"x0\"in this||(this.x0=0),\"y0\"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=h(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},i.forward=function(t){var s,i,h=t.x,o=t.y;if(o*e>90&&o*e<-90&&h*e>180&&h*e<-180)return null;if(Math.abs(Math.abs(o)-a)<=1e-10)return null;if(this.sphere)s=this.x0+this.a*this.k0*r(h-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(n+.5*o));else{var M=Math.sin(o),u=l(this.e,o,M);s=this.x0+this.a*this.k0*r(h-this.long0),i=this.y0-this.a*this.k0*Math.log(u)}return t.x=s,t.y=i,t},i.inverse=function(t){var s,i,h=t.x-this.x0,e=t.y-this.y0;if(this.sphere)i=a-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var n=Math.exp(-e/(this.a*this.k0));if(-9999===(i=o(this.e,n)))return null}return s=r(this.long0+h/(this.a*this.k0)),t.x=s,t.y=i,t},i.names=[\"Mercator\",\"Popular Visualisation Pseudo Mercator\",\"Mercator_1SP\",\"Mercator_Auxiliary_Sphere\",\"merc\"]},\n", | |
" function _(t,n,r){n.exports=function(t,n,r){var o=t*n;return r/Math.sqrt(1-o*o)}},\n", | |
" function _(t,n,a){var r=2*Math.PI,o=t(147);n.exports=function(t){return Math.abs(t)<=3.14159265359?t:t-o(t)*r}},\n", | |
" function _(n,t,o){t.exports=function(n){return n<0?-1:1}},\n", | |
" function _(t,a,n){var r=Math.PI/2;a.exports=function(t,a,n){var o=t*n,h=.5*t;return o=Math.pow((1-o)/(1+o),h),Math.tan(.5*(r-a))/o}},\n", | |
" function _(a,t,n){var r=Math.PI/2;t.exports=function(a,t){for(var n,h,M=.5*a,o=r-2*Math.atan(t),e=0;e<=15;e++)if(n=a*Math.sin(o),o+=h=r-2*Math.atan(t*Math.pow((1-n)/(1+n),M))-o,Math.abs(h)<=1e-10)return o;return-9999}},\n", | |
" function _(n,i,t){function e(n){return n}t.init=function(){},t.forward=e,t.inverse=e,t.names=[\"longlat\",\"identity\"]},\n", | |
" function _(r,e,t){var n=r(152);t.eccentricity=function(r,e,t,n){var a=r*r,c=e*e,f=(a-c)/a,i=0;return n?(a=(r*=1-f*(.16666666666666666+f*(.04722222222222222+.022156084656084655*f)))*r,f=0):i=Math.sqrt(f),{es:f,e:i,ep2:(a-c)/c}},t.sphere=function(r,e,t,a,c){if(!r){var f=n[a];f||(f=n.WGS84),r=f.a,e=f.b,t=f.rf}return t&&!e&&(e=(1-1/t)*r),(0===t||Math.abs(r-e)<1e-10)&&(c=!0,e=r),{a:r,b:e,rf:t,sphere:c}}},\n", | |
" function _(e,a,l){l.MERIT={a:6378137,rf:298.257,ellipseName:\"MERIT 1983\"},l.SGS85={a:6378136,rf:298.257,ellipseName:\"Soviet Geodetic System 85\"},l.GRS80={a:6378137,rf:298.257222101,ellipseName:\"GRS 1980(IUGG, 1980)\"},l.IAU76={a:6378140,rf:298.257,ellipseName:\"IAU 1976\"},l.airy={a:6377563.396,b:6356256.91,ellipseName:\"Airy 1830\"},l.APL4={a:6378137,rf:298.25,ellipseName:\"Appl. Physics. 1965\"},l.NWL9D={a:6378145,rf:298.25,ellipseName:\"Naval Weapons Lab., 1965\"},l.mod_airy={a:6377340.189,b:6356034.446,ellipseName:\"Modified Airy\"},l.andrae={a:6377104.43,rf:300,ellipseName:\"Andrae 1876 (Den., Iclnd.)\"},l.aust_SA={a:6378160,rf:298.25,ellipseName:\"Australian Natl & S. Amer. 1969\"},l.GRS67={a:6378160,rf:298.247167427,ellipseName:\"GRS 67(IUGG 1967)\"},l.bessel={a:6377397.155,rf:299.1528128,ellipseName:\"Bessel 1841\"},l.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:\"Bessel 1841 (Namibia)\"},l.clrk66={a:6378206.4,b:6356583.8,ellipseName:\"Clarke 1866\"},l.clrk80={a:6378249.145,rf:293.4663,ellipseName:\"Clarke 1880 mod.\"},l.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:\"Clarke 1858\"},l.CPM={a:6375738.7,rf:334.29,ellipseName:\"Comm. des Poids et Mesures 1799\"},l.delmbr={a:6376428,rf:311.5,ellipseName:\"Delambre 1810 (Belgium)\"},l.engelis={a:6378136.05,rf:298.2566,ellipseName:\"Engelis 1985\"},l.evrst30={a:6377276.345,rf:300.8017,ellipseName:\"Everest 1830\"},l.evrst48={a:6377304.063,rf:300.8017,ellipseName:\"Everest 1948\"},l.evrst56={a:6377301.243,rf:300.8017,ellipseName:\"Everest 1956\"},l.evrst69={a:6377295.664,rf:300.8017,ellipseName:\"Everest 1969\"},l.evrstSS={a:6377298.556,rf:300.8017,ellipseName:\"Everest (Sabah & Sarawak)\"},l.fschr60={a:6378166,rf:298.3,ellipseName:\"Fischer (Mercury Datum) 1960\"},l.fschr60m={a:6378155,rf:298.3,ellipseName:\"Fischer 1960\"},l.fschr68={a:6378150,rf:298.3,ellipseName:\"Fischer 1968\"},l.helmert={a:6378200,rf:298.3,ellipseName:\"Helmert 1906\"},l.hough={a:6378270,rf:297,ellipseName:\"Hough\"},l.intl={a:6378388,rf:297,ellipseName:\"International 1909 (Hayford)\"},l.kaula={a:6378163,rf:298.24,ellipseName:\"Kaula 1961\"},l.lerch={a:6378139,rf:298.257,ellipseName:\"Lerch 1979\"},l.mprts={a:6397300,rf:191,ellipseName:\"Maupertius 1738\"},l.new_intl={a:6378157.5,b:6356772.2,ellipseName:\"New International 1967\"},l.plessis={a:6376523,rf:6355863,ellipseName:\"Plessis 1817 (France)\"},l.krass={a:6378245,rf:298.3,ellipseName:\"Krassovsky, 1942\"},l.SEasia={a:6378155,b:6356773.3205,ellipseName:\"Southeast Asia\"},l.walbeck={a:6376896,b:6355834.8467,ellipseName:\"Walbeck\"},l.WGS60={a:6378165,rf:298.3,ellipseName:\"WGS 60\"},l.WGS66={a:6378145,rf:298.25,ellipseName:\"WGS 66\"},l.WGS7={a:6378135,rf:298.26,ellipseName:\"WGS 72\"},l.WGS84={a:6378137,rf:298.257223563,ellipseName:\"WGS 84\"},l.sphere={a:6370997,b:6370997,ellipseName:\"Normal Sphere (r=6370997)\"}},\n", | |
" function _(e,a,s){s.wgs84={towgs84:\"0,0,0\",ellipse:\"WGS84\",datumName:\"WGS84\"},s.ch1903={towgs84:\"674.374,15.056,405.346\",ellipse:\"bessel\",datumName:\"swiss\"},s.ggrs87={towgs84:\"-199.87,74.79,246.62\",ellipse:\"GRS80\",datumName:\"Greek_Geodetic_Reference_System_1987\"},s.nad83={towgs84:\"0,0,0\",ellipse:\"GRS80\",datumName:\"North_American_Datum_1983\"},s.nad27={nadgrids:\"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat\",ellipse:\"clrk66\",datumName:\"North_American_Datum_1927\"},s.potsdam={towgs84:\"606.0,23.0,413.0\",ellipse:\"bessel\",datumName:\"Potsdam Rauenberg 1950 DHDN\"},s.carthage={towgs84:\"-263.0,6.0,431.0\",ellipse:\"clark80\",datumName:\"Carthage 1934 Tunisia\"},s.hermannskogel={towgs84:\"653.0,-212.0,449.0\",ellipse:\"bessel\",datumName:\"Hermannskogel\"},s.ire65={towgs84:\"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15\",ellipse:\"mod_airy\",datumName:\"Ireland 1965\"},s.rassadiran={towgs84:\"-133.63,-157.5,-158.62\",ellipse:\"intl\",datumName:\"Rassadiran\"},s.nzgd49={towgs84:\"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993\",ellipse:\"intl\",datumName:\"New Zealand Geodetic Datum 1949\"},s.osgb36={towgs84:\"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894\",ellipse:\"airy\",datumName:\"Airy 1830\"},s.s_jtsk={towgs84:\"589,76,480\",ellipse:\"bessel\",datumName:\"S-JTSK (Ferro)\"},s.beduaram={towgs84:\"-106,-87,188\",ellipse:\"clrk80\",datumName:\"Beduaram\"},s.gunung_segara={towgs84:\"-403,684,41\",ellipse:\"bessel\",datumName:\"Gunung Segara Jakarta\"},s.rnb72={towgs84:\"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1\",ellipse:\"intl\",datumName:\"Reseau National Belge 1972\"}},\n", | |
" function _(a,m,t){var p=1,u=2,r=4,_=5,d=484813681109536e-20;m.exports=function(a,m,t,s,e,n){var o={};return o.datum_type=r,a&&\"none\"===a&&(o.datum_type=_),m&&(o.datum_params=m.map(parseFloat),0===o.datum_params[0]&&0===o.datum_params[1]&&0===o.datum_params[2]||(o.datum_type=p),o.datum_params.length>3&&(0===o.datum_params[3]&&0===o.datum_params[4]&&0===o.datum_params[5]&&0===o.datum_params[6]||(o.datum_type=u,o.datum_params[3]*=d,o.datum_params[4]*=d,o.datum_params[5]*=d,o.datum_params[6]=o.datum_params[6]/1e6+1))),o.a=t,o.b=s,o.es=e,o.ep2=n,o}},\n", | |
" function _(t,e,r){var m=.017453292519943295,a=57.29577951308232,o=1,u=2,n=t(156),d=t(158),y=t(134),_=t(159);e.exports=function t(e,r,x){var i;return Array.isArray(x)&&(x=_(x)),e.datum&&r.datum&&function(t,e){return(t.datum.datum_type===o||t.datum.datum_type===u)&&\"WGS84\"!==e.datumCode||(e.datum.datum_type===o||e.datum.datum_type===u)&&\"WGS84\"!==t.datumCode}(e,r)&&(x=t(e,i=new y(\"WGS84\"),x),e=i),\"enu\"!==e.axis&&(x=d(e,!1,x)),\"longlat\"===e.projName?x={x:x.x*m,y:x.y*m}:(e.to_meter&&(x={x:x.x*e.to_meter,y:x.y*e.to_meter}),x=e.inverse(x)),e.from_greenwich&&(x.x+=e.from_greenwich),x=n(e.datum,r.datum,x),r.from_greenwich&&(x={x:x.x-r.grom_greenwich,y:x.y}),\"longlat\"===r.projName?x={x:x.x*a,y:x.y*a}:(x=r.forward(x),r.to_meter&&(x={x:x.x/r.to_meter,y:x.y/r.to_meter})),\"enu\"!==r.axis?d(r,!0,x):x}},\n", | |
" function _(t,e,a){var u=1,m=2,o=t(157);function c(t){return t===u||t===m}e.exports=function(t,e,a){return o.compareDatums(t,e)?a:5===t.datum_type||5===e.datum_type?a:t.es!==e.es||t.a!==e.a||c(t.datum_type)||c(e.datum_type)?(a=o.geodeticToGeocentric(a,t.es,t.a),c(t.datum_type)&&(a=o.geocentricToWgs84(a,t.datum_type,t.datum_params)),c(e.datum_type)&&(a=o.geocentricFromWgs84(a,e.datum_type,e.datum_params)),o.geocentricToGeodetic(a,e.es,e.a,e.b)):a}},\n", | |
" function _(a,t,r){var m=Math.PI/2;r.compareDatums=function(a,t){return a.datum_type===t.datum_type&&(!(a.a!==t.a||Math.abs(this.es-t.es)>5e-11)&&(1===a.datum_type?this.datum_params[0]===t.datum_params[0]&&a.datum_params[1]===t.datum_params[1]&&a.datum_params[2]===t.datum_params[2]:2!==a.datum_type||a.datum_params[0]===t.datum_params[0]&&a.datum_params[1]===t.datum_params[1]&&a.datum_params[2]===t.datum_params[2]&&a.datum_params[3]===t.datum_params[3]&&a.datum_params[4]===t.datum_params[4]&&a.datum_params[5]===t.datum_params[5]&&a.datum_params[6]===t.datum_params[6]))},r.geodeticToGeocentric=function(a,t,r){var s,u,e,n,d=a.x,i=a.y,p=a.z?a.z:0;if(i<-m&&i>-1.001*m)i=-m;else if(i>m&&i<1.001*m)i=m;else if(i<-m||i>m)return null;return d>Math.PI&&(d-=2*Math.PI),u=Math.sin(i),n=Math.cos(i),e=u*u,{x:((s=r/Math.sqrt(1-t*e))+p)*n*Math.cos(d),y:(s+p)*n*Math.sin(d),z:(s*(1-t)+p)*u}},r.geocentricToGeodetic=function(a,t,r,s){var u,e,n,d,i,p,_,h,o,y,c,z,M,x,f,g=a.x,l=a.y,q=a.z?a.z:0;if(u=Math.sqrt(g*g+l*l),e=Math.sqrt(g*g+l*l+q*q),u/r<1e-12){if(x=0,e/r<1e-12)return m,f=-s,{x:a.x,y:a.y,z:a.z}}else x=Math.atan2(l,g);n=q/e,h=(d=u/e)*(1-t)*(i=1/Math.sqrt(1-t*(2-t)*d*d)),o=n*i,M=0;do{M++,p=t*(_=r/Math.sqrt(1-t*o*o))/(_+(f=u*h+q*o-_*(1-t*o*o))),z=(c=n*(i=1/Math.sqrt(1-p*(2-p)*d*d)))*h-(y=d*(1-p)*i)*o,h=y,o=c}while(z*z>1e-24&&M<30);return{x:x,y:Math.atan(c/Math.abs(y)),z:f}},r.geocentricToWgs84=function(a,t,r){if(1===t)return{x:a.x+r[0],y:a.y+r[1],z:a.z+r[2]};if(2===t){var m=r[0],s=r[1],u=r[2],e=r[3],n=r[4],d=r[5],i=r[6];return{x:i*(a.x-d*a.y+n*a.z)+m,y:i*(d*a.x+a.y-e*a.z)+s,z:i*(-n*a.x+e*a.y+a.z)+u}}},r.geocentricFromWgs84=function(a,t,r){if(1===t)return{x:a.x-r[0],y:a.y-r[1],z:a.z-r[2]};if(2===t){var m=r[0],s=r[1],u=r[2],e=r[3],n=r[4],d=r[5],i=r[6],p=(a.x-m)/i,_=(a.y-s)/i,h=(a.z-u)/i;return{x:p+d*_-n*h,y:-d*p+_+e*h,z:n*p-e*_+h}}}},\n", | |
" function _(e,a,r){a.exports=function(e,a,r){var s,c,i,n=r.x,o=r.y,t=r.z||0,u={};for(i=0;i<3;i++)if(!a||2!==i||void 0!==r.z)switch(0===i?(s=n,c=\"x\"):1===i?(s=o,c=\"y\"):(s=t,c=\"z\"),e.axis[i]){case\"e\":u[c]=s;break;case\"w\":u[c]=-s;break;case\"n\":u[c]=s;break;case\"s\":u[c]=-s;break;case\"u\":void 0!==r[c]&&(u.z=s);break;case\"d\":void 0!==r[c]&&(u.z=-s);break;default:return null}return u}},\n", | |
" function _(n,t,e){t.exports=function(n){var t={x:n[0],y:n[1]};return n.length>2&&(t.z=n[2]),n.length>3&&(t.m=n[3]),t}},\n", | |
" function _(e,t,n){var i=e(113),r=e(161),o=e(165),l=e(121),u=e(166),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this.visuals=new o.Visuals(this.model),this._has_finished=!0},Object.defineProperty(t.prototype,\"plot_view\",{get:function(){return this.parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"plot_model\",{get:function(){return this.parent.model},enumerable:!0,configurable:!0}),t.prototype.request_render=function(){this.plot_view.request_render()},t.prototype.map_to_screen=function(e,t){return this.plot_view.map_to_screen(e,t,this.model.x_range_name,this.model.y_range_name)},Object.defineProperty(t.prototype,\"needs_clip\",{get:function(){return!1},enumerable:!0,configurable:!0}),t.prototype.notify_finished=function(){this.plot_view.notify_finished()},Object.defineProperty(t.prototype,\"has_webgl\",{get:function(){return!1},enumerable:!0,configurable:!0}),t}(r.DOMView);n.RendererView=_,_.__name__=\"RendererView\";var p=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_Renderer=function(){this.define({level:[l.RenderLevel],visible:[l.Boolean,!0]})},t}(u.Model);n.Renderer=p,p.__name__=\"Renderer\",p.init_Renderer()},\n", | |
" function _(e,t,n){var i=e(113),r=e(162),o=e(163),s=e(164),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this._has_finished=!1,this.el=this._createElement()},t.prototype.remove=function(){o.removeElement(this.el),e.prototype.remove.call(this)},t.prototype.css_classes=function(){return[]},t.prototype.cursor=function(e,t){return null},t.prototype.render=function(){},t.prototype.renderTo=function(e){e.appendChild(this.el),this.render()},t.prototype.has_finished=function(){return this._has_finished},Object.defineProperty(t.prototype,\"_root_element\",{get:function(){return o.parent(this.el,\".\"+s.bk_root)||document.body},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"is_idle\",{get:function(){return this.has_finished()},enumerable:!0,configurable:!0}),t.prototype._createElement=function(){return o.createElement(this.tagName,{class:this.css_classes()})},t}(r.View);n.DOMView=p,p.__name__=\"DOMView\",p.prototype.tagName=\"div\"},\n", | |
" function _(t,e,n){var o=t(113),i=t(116),r=t(109),a=t(127),s=function(t){function e(e){var n=t.call(this)||this;if(n.removed=new i.Signal0(n,\"removed\"),null==e.model)throw new Error(\"model of a view wasn't configured\");return n.model=e.model,n._parent=e.parent,n.id=e.id||a.uniqueId(),n.initialize(),!1!==e.connect_signals&&n.connect_signals(),n}return o.__extends(e,t),e.prototype.initialize=function(){},e.prototype.remove=function(){this._parent=void 0,this.disconnect_signals(),this.removed.emit()},e.prototype.toString=function(){return this.model.type+\"View(\"+this.id+\")\"},e.prototype.serializable_state=function(){return{type:this.model.type}},Object.defineProperty(e.prototype,\"parent\",{get:function(){if(void 0!==this._parent)return this._parent;throw new Error(\"parent of a view wasn't configured\")},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"is_root\",{get:function(){return null===this.parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"root\",{get:function(){return this.is_root?this:this.parent.root},enumerable:!0,configurable:!0}),e.prototype.assert_root=function(){if(!this.is_root)throw new Error(this.toString()+\" is not a root layout\")},e.prototype.connect_signals=function(){},e.prototype.disconnect_signals=function(){i.Signal.disconnectReceiver(this)},e.prototype.on_change=function(t,e){for(var n=0,o=r.isArray(t)?t:[t];n<o.length;n++){var i=o[n];this.connect(i.change,e)}},e}(i.Signalable());n.View=s,s.__name__=\"View\"},\n", | |
" function _(t,e,n){var i=t(113),r=t(109),o=function(t){return function(e){void 0===e&&(e={});for(var n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var o=document.createElement(t);for(var l in o.classList.add(\"bk\"),e){var a=e[l];if(null!=a&&(!r.isBoolean(a)||a))if(\"class\"===l&&(r.isString(a)&&(a=a.split(/\\s+/)),r.isArray(a)))for(var s=0,h=a;s<h.length;s++){var c=h[s];null!=c&&o.classList.add(c)}else if(\"style\"===l&&r.isPlainObject(a))for(var u in a)o.style[u]=a[u];else if(\"data\"===l&&r.isPlainObject(a))for(var p in a)o.dataset[p]=a[p];else o.setAttribute(l,a)}function d(t){if(t instanceof HTMLElement)o.appendChild(t);else if(r.isString(t))o.appendChild(document.createTextNode(t));else if(null!=t&&!1!==t)throw new Error(\"expected an HTMLElement, string, false or null, got \"+JSON.stringify(t))}for(var f=0,g=n;f<g.length;f++){var y=g[f];if(r.isArray(y))for(var v=0,m=y;v<m.length;v++){d(m[v])}else d(y)}return o}};function l(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var i=t.firstChild,r=0,o=e;r<o.length;r++){var l=o[r];t.insertBefore(l,i)}}function a(t,e){var n=Element.prototype;return(n.matches||n.webkitMatchesSelector||n.mozMatchesSelector||n.msMatchesSelector).call(t,e)}function s(t){return parseFloat(t)||0}function h(t){var e=getComputedStyle(t);return{border:{top:s(e.borderTopWidth),bottom:s(e.borderBottomWidth),left:s(e.borderLeftWidth),right:s(e.borderRightWidth)},margin:{top:s(e.marginTop),bottom:s(e.marginBottom),left:s(e.marginLeft),right:s(e.marginRight)},padding:{top:s(e.paddingTop),bottom:s(e.paddingBottom),left:s(e.paddingLeft),right:s(e.paddingRight)}}}function c(t){var e=t.getBoundingClientRect();return{width:Math.ceil(e.width),height:Math.ceil(e.height)}}function u(t){return Array.from(t.children)}n.createElement=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return o(t).apply(void 0,i.__spreadArrays([e],n))},n.div=o(\"div\"),n.span=o(\"span\"),n.canvas=o(\"canvas\"),n.link=o(\"link\"),n.style=o(\"style\"),n.a=o(\"a\"),n.p=o(\"p\"),n.i=o(\"i\"),n.pre=o(\"pre\"),n.button=o(\"button\"),n.label=o(\"label\"),n.input=o(\"input\"),n.select=o(\"select\"),n.option=o(\"option\"),n.optgroup=o(\"optgroup\"),n.textarea=o(\"textarea\"),n.nbsp=function(){return document.createTextNode(\" \")},n.removeElement=function(t){var e=t.parentNode;null!=e&&e.removeChild(t)},n.replaceWith=function(t,e){var n=t.parentNode;null!=n&&n.replaceChild(e,t)},n.prepend=l,n.empty=function(t){for(var e;e=t.firstChild;)t.removeChild(e)},n.display=function(t){t.style.display=\"\"},n.undisplay=function(t){t.style.display=\"none\"},n.show=function(t){t.style.visibility=\"\"},n.hide=function(t){t.style.visibility=\"hidden\"},n.offset=function(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}},n.matches=a,n.parent=function(t,e){for(var n=t;n=n.parentElement;)if(a(n,e))return n;return null},n.extents=h,n.size=c,n.scroll_size=function(t){return{width:Math.ceil(t.scrollWidth),height:Math.ceil(t.scrollHeight)}},n.outer_size=function(t){var e=h(t).margin,n=e.left,i=e.right,r=e.top,o=e.bottom,l=c(t),a=l.width,s=l.height;return{width:Math.ceil(a+n+i),height:Math.ceil(s+r+o)}},n.content_size=function(t){for(var e=t.getBoundingClientRect(),n=e.left,i=e.top,r=h(t).padding,o=0,l=0,a=0,s=u(t);a<s.length;a++){var c=s[a].getBoundingClientRect();o=Math.max(o,Math.ceil(c.left-n-r.left+c.width)),l=Math.max(l,Math.ceil(c.top-i-r.top+c.height))}return{width:o,height:l}},n.position=function(t,e,n){var i=t.style;if(i.left=e.x+\"px\",i.top=e.y+\"px\",i.width=e.width+\"px\",i.height=e.height+\"px\",null==n)i.margin=\"\";else{var r=n.top,o=n.right,l=n.bottom,a=n.left;i.margin=r+\"px \"+o+\"px \"+l+\"px \"+a+\"px\"}},n.children=u;var p=function(){function t(t){this.el=t,this.classList=t.classList}return Object.defineProperty(t.prototype,\"values\",{get:function(){for(var t=[],e=0;e<this.classList.length;e++){var n=this.classList.item(e);null!=n&&t.push(n)}return t},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this.classList.contains(t)},t.prototype.add=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t;n<i.length;n++){var r=i[n];this.classList.add(r)}return this},t.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t;n<i.length;n++){var r=i[n];this.classList.remove(r)}return this},t.prototype.clear=function(){for(var t=0,e=this.values;t<e.length;t++){var n=e[t];\"bk\"!=n&&this.classList.remove(n)}return this},t.prototype.toggle=function(t,e){return(null!=e?e:!this.has(t))?this.add(t):this.remove(t),this},t}();function d(t,e,n){var i=t.style,r=i.width,o=i.height,l=i.position,a=i.display;t.style.position=\"absolute\",t.style.display=\"\",t.style.width=null!=e.width&&e.width!=1/0?e.width+\"px\":\"auto\",t.style.height=null!=e.height&&e.height!=1/0?e.height+\"px\":\"auto\";try{return n()}finally{t.style.position=l,t.style.display=a,t.style.width=r,t.style.height=o}}n.ClassList=p,p.__name__=\"ClassList\",n.classes=function(t){return new p(t)},function(t){t[t.Backspace=8]=\"Backspace\",t[t.Tab=9]=\"Tab\",t[t.Enter=13]=\"Enter\",t[t.Esc=27]=\"Esc\",t[t.PageUp=33]=\"PageUp\",t[t.PageDown=34]=\"PageDown\",t[t.Left=37]=\"Left\",t[t.Up=38]=\"Up\",t[t.Right=39]=\"Right\",t[t.Down=40]=\"Down\",t[t.Delete=46]=\"Delete\"}(n.Keys||(n.Keys={})),n.undisplayed=function(t,e){var n=t.style.display;t.style.display=\"none\";try{return e()}finally{t.style.display=n}},n.unsized=function(t,e){return d(t,{},e)},n.sized=d;var f=function(){function t(){this.style=n.style({type:\"text/css\"}),l(document.head,this.style)}return t.prototype.append=function(t){this.style.appendChild(document.createTextNode(t))},t}();n.StyleSheet=f,f.__name__=\"StyleSheet\",n.styles=new f},\n", | |
" function _(n,o,i){n(163).styles.append(\".bk-root {\\n position: relative;\\n width: auto;\\n height: auto;\\n z-index: 0;\\n box-sizing: border-box;\\n font-family: Helvetica, Arial, sans-serif;\\n font-size: 10pt;\\n}\\n.bk-root .bk,\\n.bk-root .bk:before,\\n.bk-root .bk:after {\\n box-sizing: inherit;\\n margin: 0;\\n border: 0;\\n padding: 0;\\n background-image: none;\\n font-family: inherit;\\n font-size: 100%;\\n line-height: 1.42857143;\\n}\\n.bk-root pre.bk {\\n font-family: Courier, monospace;\\n}\\n\"),i.bk_root=\"bk-root\"},\n", | |
" function _(e,t,a){var i=e(113),l=e(120),c=e(123);function o(e,t,a){e.moveTo(0,a+.5),e.lineTo(t,a+.5),e.stroke()}function s(e,t,a){e.moveTo(a+.5,0),e.lineTo(a+.5,t),e.stroke()}function h(e,t){e.moveTo(0,t),e.lineTo(t,0),e.stroke(),e.moveTo(0,0),e.lineTo(t,t),e.stroke()}function n(e,t,a,i){var l=a,c=l/2,n=c/2,r=function(e){var t=document.createElement(\"canvas\");return t.width=e,t.height=e,t}(a),_=r.getContext(\"2d\");switch(_.strokeStyle=t,_.lineCap=\"square\",_.fillStyle=t,_.lineWidth=i,e){case\" \":case\"blank\":break;case\".\":case\"dot\":_.arc(c,c,c/2,0,2*Math.PI,!0),_.fill();break;case\"o\":case\"ring\":_.arc(c,c,c/2,0,2*Math.PI,!0),_.stroke();break;case\"-\":case\"horizontal_line\":o(_,l,c);break;case\"|\":case\"vertical_line\":s(_,l,c);break;case\"+\":case\"cross\":o(_,l,c),s(_,l,c);break;case'\"':case\"horizontal_dash\":o(_,c,c);break;case\":\":case\"vertical_dash\":s(_,c,c);break;case\"@\":case\"spiral\":var p=l/30;_.moveTo(c,c);for(var u=0;u<360;u++){var f=.1*u,v=c+p*f*Math.cos(f),y=c+p*f*Math.sin(f);_.lineTo(v,y)}_.stroke();break;case\"/\":case\"right_diagonal_line\":_.moveTo(.5-n,l),_.lineTo(n+.5,0),_.stroke(),_.moveTo(n+.5,l),_.lineTo(3*n+.5,0),_.stroke(),_.moveTo(3*n+.5,l),_.lineTo(5*n+.5,0),_.stroke(),_.stroke();break;case\"\\\\\":case\"left_diagonal_line\":_.moveTo(n+.5,l),_.lineTo(.5-n,0),_.stroke(),_.moveTo(3*n+.5,l),_.lineTo(n+.5,0),_.stroke(),_.moveTo(5*n+.5,l),_.lineTo(3*n+.5,0),_.stroke(),_.stroke();break;case\"x\":case\"diagonal_cross\":h(_,l);break;case\",\":case\"right_diagonal_dash\":_.moveTo(n+.5,3*n+.5),_.lineTo(3*n+.5,n+.5),_.stroke();break;case\"`\":case\"left_diagonal_dash\":_.moveTo(n+.5,n+.5),_.lineTo(3*n+.5,3*n+.5),_.stroke();break;case\"v\":case\"horizontal_wave\":_.moveTo(0,n),_.lineTo(c,3*n),_.lineTo(l,n),_.stroke();break;case\">\":case\"vertical_wave\":_.moveTo(n,0),_.lineTo(3*n,c),_.lineTo(n,l),_.stroke();break;case\"*\":case\"criss_cross\":h(_,l),o(_,l,c),s(_,l,c)}return r}var r=function(){function e(e,t){void 0===t&&(t=\"\"),this.obj=e,this.prefix=t,this.cache={};for(var a=0,i=this.attrs;a<i.length;a++){var l=i[a];this[l]=e.properties[t+l]}}return e.prototype.warm_cache=function(e){for(var t=0,a=this.attrs;t<a.length;t++){var i=a[t],l=this.obj.properties[this.prefix+i];if(void 0!==l.spec.value)this.cache[i]=l.spec.value;else{if(null==e)throw new Error(\"source is required with a vectorized visual property\");this.cache[i+\"_array\"]=l.array(e)}}},e.prototype.cache_select=function(e,t){var a,i=this.obj.properties[this.prefix+e];return void 0!==i.spec.value?this.cache[e]=a=i.spec.value:this.cache[e]=a=this.cache[e+\"_array\"][t],a},e.prototype.set_vectorize=function(e,t){null!=this.all_indices?this._set_vectorize(e,this.all_indices[t]):this._set_vectorize(e,t)},e}();a.ContextProperties=r,r.__name__=\"ContextProperties\";var _=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.set_value=function(e){e.strokeStyle=this.line_color.value(),e.globalAlpha=this.line_alpha.value(),e.lineWidth=this.line_width.value(),e.lineJoin=this.line_join.value(),e.lineCap=this.line_cap.value(),e.setLineDash(this.line_dash.value()),e.setLineDashOffset(this.line_dash_offset.value())},Object.defineProperty(t.prototype,\"doit\",{get:function(){return!(null===this.line_color.spec.value||0==this.line_alpha.spec.value||0==this.line_width.spec.value)},enumerable:!0,configurable:!0}),t.prototype._set_vectorize=function(e,t){this.cache_select(\"line_color\",t),e.strokeStyle!==this.cache.line_color&&(e.strokeStyle=this.cache.line_color),this.cache_select(\"line_alpha\",t),e.globalAlpha!==this.cache.line_alpha&&(e.globalAlpha=this.cache.line_alpha),this.cache_select(\"line_width\",t),e.lineWidth!==this.cache.line_width&&(e.lineWidth=this.cache.line_width),this.cache_select(\"line_join\",t),e.lineJoin!==this.cache.line_join&&(e.lineJoin=this.cache.line_join),this.cache_select(\"line_cap\",t),e.lineCap!==this.cache.line_cap&&(e.lineCap=this.cache.line_cap),this.cache_select(\"line_dash\",t),e.getLineDash()!==this.cache.line_dash&&e.setLineDash(this.cache.line_dash),this.cache_select(\"line_dash_offset\",t),e.getLineDashOffset()!==this.cache.line_dash_offset&&e.setLineDashOffset(this.cache.line_dash_offset)},t.prototype.color_value=function(){var e=c.color2rgba(this.line_color.value(),this.line_alpha.value());return\"rgba(\"+255*e[0]+\",\"+255*e[1]+\",\"+255*e[2]+\",\"+e[3]+\")\"},t}(r);a.Line=_,_.__name__=\"Line\",_.prototype.attrs=Object.keys(l.line());var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.set_value=function(e){e.fillStyle=this.fill_color.value(),e.globalAlpha=this.fill_alpha.value()},Object.defineProperty(t.prototype,\"doit\",{get:function(){return!(null===this.fill_color.spec.value||0==this.fill_alpha.spec.value)},enumerable:!0,configurable:!0}),t.prototype._set_vectorize=function(e,t){this.cache_select(\"fill_color\",t),e.fillStyle!==this.cache.fill_color&&(e.fillStyle=this.cache.fill_color),this.cache_select(\"fill_alpha\",t),e.globalAlpha!==this.cache.fill_alpha&&(e.globalAlpha=this.cache.fill_alpha)},t.prototype.color_value=function(){var e=c.color2rgba(this.fill_color.value(),this.fill_alpha.value());return\"rgba(\"+255*e[0]+\",\"+255*e[1]+\",\"+255*e[2]+\",\"+e[3]+\")\"},t}(r);a.Fill=p,p.__name__=\"Fill\",p.prototype.attrs=Object.keys(l.fill());var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.cache_select=function(t,a){var i;if(\"pattern\"==t){this.cache_select(\"hatch_color\",a),this.cache_select(\"hatch_scale\",a),this.cache_select(\"hatch_pattern\",a),this.cache_select(\"hatch_weight\",a);var l=this.cache,c=l.hatch_color,o=l.hatch_scale,s=l.hatch_pattern,h=l.hatch_weight,r=l.hatch_extra;if(null!=r&&r.hasOwnProperty(s)){var _=r[s];this.cache.pattern=_.get_pattern(c,o,h)}else this.cache.pattern=function(e){var t=n(s,c,o,h);return e.createPattern(t,\"repeat\")}}else i=e.prototype.cache_select.call(this,t,a);return i},t.prototype._try_defer=function(e){var t=this.cache,a=t.hatch_pattern,i=t.hatch_extra;null!=i&&i.hasOwnProperty(a)&&i[a].onload(e)},Object.defineProperty(t.prototype,\"doit\",{get:function(){return!(null===this.hatch_color.spec.value||0==this.hatch_alpha.spec.value||\" \"==this.hatch_pattern.spec.value||\"blank\"==this.hatch_pattern.spec.value||null===this.hatch_pattern.spec.value)},enumerable:!0,configurable:!0}),t.prototype.doit2=function(e,t,a,i){this.doit&&(this.cache_select(\"pattern\",t),null==this.cache.pattern(e)?this._try_defer(i):(this.set_vectorize(e,t),a()))},t.prototype._set_vectorize=function(e,t){this.cache_select(\"pattern\",t),e.fillStyle=this.cache.pattern(e),this.cache_select(\"hatch_alpha\",t),e.globalAlpha!==this.cache.hatch_alpha&&(e.globalAlpha=this.cache.hatch_alpha)},t.prototype.color_value=function(){var e=c.color2rgba(this.hatch_color.value(),this.hatch_alpha.value());return\"rgba(\"+255*e[0]+\",\"+255*e[1]+\",\"+255*e[2]+\",\"+e[3]+\")\"},t}(r);a.Hatch=u,u.__name__=\"Hatch\",u.prototype.attrs=Object.keys(l.hatch());var f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.cache_select=function(t,a){var i;if(\"font\"==t){e.prototype.cache_select.call(this,\"text_font_style\",a),e.prototype.cache_select.call(this,\"text_font_size\",a),e.prototype.cache_select.call(this,\"text_font\",a);var l=this.cache,c=l.text_font_style,o=l.text_font_size,s=l.text_font;this.cache.font=i=c+\" \"+o+\" \"+s}else i=e.prototype.cache_select.call(this,t,a);return i},t.prototype.font_value=function(){var e=this.text_font.value(),t=this.text_font_size.value();return this.text_font_style.value()+\" \"+t+\" \"+e},t.prototype.color_value=function(){var e=c.color2rgba(this.text_color.value(),this.text_alpha.value());return\"rgba(\"+255*e[0]+\",\"+255*e[1]+\",\"+255*e[2]+\",\"+e[3]+\")\"},t.prototype.set_value=function(e){e.font=this.font_value(),e.fillStyle=this.text_color.value(),e.globalAlpha=this.text_alpha.value(),e.textAlign=this.text_align.value(),e.textBaseline=this.text_baseline.value()},Object.defineProperty(t.prototype,\"doit\",{get:function(){return!(null===this.text_color.spec.value||0==this.text_alpha.spec.value)},enumerable:!0,configurable:!0}),t.prototype._set_vectorize=function(e,t){this.cache_select(\"font\",t),e.font!==this.cache.font&&(e.font=this.cache.font),this.cache_select(\"text_color\",t),e.fillStyle!==this.cache.text_color&&(e.fillStyle=this.cache.text_color),this.cache_select(\"text_alpha\",t),e.globalAlpha!==this.cache.text_alpha&&(e.globalAlpha=this.cache.text_alpha),this.cache_select(\"text_align\",t),e.textAlign!==this.cache.text_align&&(e.textAlign=this.cache.text_align),this.cache_select(\"text_baseline\",t),e.textBaseline!==this.cache.text_baseline&&(e.textBaseline=this.cache.text_baseline)},t}(r);a.Text=f,f.__name__=\"Text\",f.prototype.attrs=Object.keys(l.text());var v=function(){function e(e){for(var t=0,a=e.mixins;t<a.length;t++){var i=a[t].split(\":\"),l=i[0],c=i[1],o=void 0===c?\"\":c,s=void 0;switch(l){case\"line\":s=_;break;case\"fill\":s=p;break;case\"hatch\":s=u;break;case\"text\":s=f;break;default:throw new Error(\"unknown visual: \"+l)}this[o+l]=new s(e,o)}}return e.prototype.warm_cache=function(e){for(var t in this)if(this.hasOwnProperty(t)){var a=this[t];a instanceof r&&a.warm_cache(e)}},e.prototype.set_all_indices=function(e){for(var t in this)if(this.hasOwnProperty(t)){var a=this[t];a instanceof r&&(a.all_indices=e)}},e}();a.Visuals=v,v.__name__=\"Visuals\"},\n", | |
" function _(t,e,n){var r=t(113),s=t(115),c=t(121),i=t(109),o=t(125),a=t(167),l=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.init_Model=function(){this.define({tags:[c.Array,[]],name:[c.String],js_property_callbacks:[c.Any,{}],js_event_callbacks:[c.Any,{}],subscribed_events:[c.Array,[]]})},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this._update_property_callbacks(),this.connect(this.properties.js_property_callbacks.change,function(){return e._update_property_callbacks()}),this.connect(this.properties.js_event_callbacks.change,function(){return e._update_event_callbacks()}),this.connect(this.properties.subscribed_events.change,function(){return e._update_event_callbacks()})},e.prototype._process_event=function(t){for(var e=0,n=this.js_event_callbacks[t.event_name]||[];e<n.length;e++){n[e].execute(t)}null!=this.document&&this.subscribed_events.some(function(e){return e==t.event_name})&&this.document.event_manager.send_event(t)},e.prototype.trigger_event=function(t){null!=this.document&&(t.origin=this,this.document.event_manager.trigger(t))},e.prototype._update_event_callbacks=function(){null!=this.document?this.document.event_manager.subscribed_models.add(this.id):a.logger.warn(\"WARNING: Document not defined for updating event callbacks\")},e.prototype._update_property_callbacks=function(){var t=this,e=function(e){var n=e.split(\":\"),r=n[0],s=n[1],c=void 0===s?null:s;return null!=c?t.properties[c][r]:t[r]};for(var n in this._js_callbacks)for(var r=this._js_callbacks[n],s=e(n),c=0,i=r;c<i.length;c++){var o=i[c];this.disconnect(s,o)}for(var n in this._js_callbacks={},this.js_property_callbacks){var a=(r=this.js_property_callbacks[n]).map(function(e){return function(){return e.execute(t)}});this._js_callbacks[n]=a;s=e(n);for(var l=0,_=a;l<_.length;l++){o=_[l];this.connect(s,o)}}},e.prototype._doc_attached=function(){o.isEmpty(this.js_event_callbacks)&&o.isEmpty(this.subscribed_events)||this._update_event_callbacks()},e.prototype.select=function(t){if(i.isString(t))return this.references().filter(function(n){return n instanceof e&&n.name===t});if(t.prototype instanceof s.HasProps)return this.references().filter(function(e){return e instanceof t});throw new Error(\"invalid selector\")},e.prototype.select_one=function(t){var e=this.select(t);switch(e.length){case 0:return null;case 1:return e[0];default:throw new Error(\"found more than one object matching given selector\")}},e}(s.HasProps);n.Model=l,l.__name__=\"Model\",l.init_Model()},\n", | |
" function _(e,l,o){var n=e(109),t={},r=function(){return function(e,l){this.name=e,this.level=l}}();o.LogLevel=r,r.__name__=\"LogLevel\";var g=function(){function e(l,o){void 0===o&&(o=e.INFO),this._name=l,this.set_level(o)}return Object.defineProperty(e,\"levels\",{get:function(){return Object.keys(e.log_levels)},enumerable:!0,configurable:!0}),e.get=function(l,o){if(void 0===o&&(o=e.INFO),l.length>0){var n=t[l];return null==n&&(t[l]=n=new e(l,o)),n}throw new TypeError(\"Logger.get() expects a non-empty string name and an optional log-level\")},Object.defineProperty(e.prototype,\"level\",{get:function(){return this.get_level()},enumerable:!0,configurable:!0}),e.prototype.get_level=function(){return this._log_level},e.prototype.set_level=function(l){if(l instanceof r)this._log_level=l;else{if(!n.isString(l)||null==e.log_levels[l])throw new Error(\"Logger.set_level() expects a log-level object or a string name of a log-level\");this._log_level=e.log_levels[l]}var o=\"[\"+this._name+\"]\";for(var t in e.log_levels){e.log_levels[t].level<this._log_level.level||this._log_level.level===e.OFF.level?this[t]=function(){}:this[t]=i(t,o)}},e.prototype.trace=function(){for(var e=[],l=0;l<arguments.length;l++)e[l]=arguments[l]},e.prototype.debug=function(){for(var e=[],l=0;l<arguments.length;l++)e[l]=arguments[l]},e.prototype.info=function(){for(var e=[],l=0;l<arguments.length;l++)e[l]=arguments[l]},e.prototype.warn=function(){for(var e=[],l=0;l<arguments.length;l++)e[l]=arguments[l]},e.prototype.error=function(){for(var e=[],l=0;l<arguments.length;l++)e[l]=arguments[l]},e}();function i(e,l){return null!=console[e]?console[e].bind(console,l):null!=console.log?console.log.bind(console,l):function(){}}o.Logger=g,g.__name__=\"Logger\",g.TRACE=new r(\"trace\",0),g.DEBUG=new r(\"debug\",1),g.INFO=new r(\"info\",2),g.WARN=new r(\"warn\",6),g.ERROR=new r(\"error\",7),g.FATAL=new r(\"fatal\",8),g.OFF=new r(\"off\",9),g.log_levels={trace:g.TRACE,debug:g.DEBUG,info:g.INFO,warn:g.WARN,error:g.ERROR,fatal:g.FATAL,off:g.OFF},o.logger=g.get(\"bokeh\"),o.set_log_level=function(e){null==g.log_levels[e]?(console.log(\"[bokeh] unrecognized logging level '\"+e+\"' passed to Bokeh.set_log_level(), ignoring\"),console.log(\"[bokeh] valid log levels are: \"+g.levels.join(\", \"))):(console.log(\"[bokeh] setting log level to: '\"+e+\"'\"),o.logger.set_level(e))}},\n", | |
" function _(t,e,i){var n=t(113),s=t(131),r=t(169),a=t(170),o=t(121),_=t(111),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),null==this.model.source&&(this.model.source=new a.ColumnDataSource),this.set_data(this.model.source)},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.set_data(e.model.source)}),this.connect(this.model.source.streaming,function(){return e.set_data(e.model.source)}),this.connect(this.model.source.patching,function(){return e.set_data(e.model.source)})},e.prototype.set_data=function(e){t.prototype.set_data.call(this,e),this.visuals.warm_cache(e),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,i,n,s=this.plot_view.frame;return\"data\"==this.model.start_units?(t=s.xscales[this.model.x_range_name].v_compute(this._x_start),e=s.yscales[this.model.y_range_name].v_compute(this._y_start)):(t=s.xview.v_compute(this._x_start),e=s.yview.v_compute(this._y_start)),\"data\"==this.model.end_units?(i=s.xscales[this.model.x_range_name].v_compute(this._x_end),n=s.yscales[this.model.y_range_name].v_compute(this._y_end)):(i=s.xview.v_compute(this._x_end),n=s.yview.v_compute(this._y_end)),[[t,e],[i,n]]},e.prototype.render=function(){if(this.model.visible){var t=this.plot_view.canvas_view.ctx;t.save();var e=this._map_data(),i=e[0],n=e[1];null!=this.model.end&&this._arrow_head(t,\"render\",this.model.end,i,n),null!=this.model.start&&this._arrow_head(t,\"render\",this.model.start,n,i),t.beginPath();var s=this.plot_view.layout.bbox,r=s.x,a=s.y,o=s.width,_=s.height;t.rect(r,a,o,_),null!=this.model.end&&this._arrow_head(t,\"clip\",this.model.end,i,n),null!=this.model.start&&this._arrow_head(t,\"clip\",this.model.start,n,i),t.closePath(),t.clip(),this._arrow_body(t,i,n),t.restore()}},e.prototype._arrow_head=function(t,e,i,n,s){for(var r=0,a=this._x_start.length;r<a;r++){var o=Math.PI/2+_.atan2([n[0][r],n[1][r]],[s[0][r],s[1][r]]);t.save(),t.translate(s[0][r],s[1][r]),t.rotate(o),\"render\"==e?i.render(t,r):\"clip\"==e&&i.clip(t,r),t.restore()}},e.prototype._arrow_body=function(t,e,i){if(this.visuals.line.doit)for(var n=0,s=this._x_start.length;n<s;n++)this.visuals.line.set_vectorize(t,n),t.beginPath(),t.moveTo(e[0][n],e[1][n]),t.lineTo(i[0][n],i[1][n]),t.stroke()},e}(s.AnnotationView);i.ArrowView=l,l.__name__=\"ArrowView\";var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_Arrow=function(){this.prototype.default_view=l,this.mixins([\"line\"]),this.define({x_start:[o.NumberSpec],y_start:[o.NumberSpec],start_units:[o.SpatialUnits,\"data\"],start:[o.Instance,null],x_end:[o.NumberSpec],y_end:[o.NumberSpec],end_units:[o.SpatialUnits,\"data\"],end:[o.Instance,function(){return new r.OpenHead({})}],source:[o.Instance],x_range_name:[o.String,\"default\"],y_range_name:[o.String,\"default\"]})},e}(s.Annotation);i.Arrow=h,h.__name__=\"Arrow\",h.init_Arrow()},\n", | |
" function _(i,e,t){var s=i(113),n=i(131),o=i(165),l=i(121),h=function(i){function e(e){return i.call(this,e)||this}return s.__extends(e,i),e.init_ArrowHead=function(){this.define({size:[l.Number,25]})},e.prototype.initialize=function(){i.prototype.initialize.call(this),this.visuals=new o.Visuals(this)},e}(n.Annotation);t.ArrowHead=h,h.__name__=\"ArrowHead\",h.init_ArrowHead();var r=function(i){function e(e){return i.call(this,e)||this}return s.__extends(e,i),e.init_OpenHead=function(){this.mixins([\"line\"])},e.prototype.clip=function(i,e){this.visuals.line.set_vectorize(i,e),i.moveTo(.5*this.size,this.size),i.lineTo(.5*this.size,-2),i.lineTo(-.5*this.size,-2),i.lineTo(-.5*this.size,this.size),i.lineTo(0,0),i.lineTo(.5*this.size,this.size)},e.prototype.render=function(i,e){this.visuals.line.doit&&(this.visuals.line.set_vectorize(i,e),i.beginPath(),i.moveTo(.5*this.size,this.size),i.lineTo(0,0),i.lineTo(-.5*this.size,this.size),i.stroke())},e}(h);t.OpenHead=r,r.__name__=\"OpenHead\",r.init_OpenHead();var a=function(i){function e(e){return i.call(this,e)||this}return s.__extends(e,i),e.init_NormalHead=function(){this.mixins([\"line\",\"fill\"]),this.override({fill_color:\"black\"})},e.prototype.clip=function(i,e){this.visuals.line.set_vectorize(i,e),i.moveTo(.5*this.size,this.size),i.lineTo(.5*this.size,-2),i.lineTo(-.5*this.size,-2),i.lineTo(-.5*this.size,this.size),i.lineTo(.5*this.size,this.size)},e.prototype.render=function(i,e){this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(i,e),this._normal(i,e),i.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(i,e),this._normal(i,e),i.stroke())},e.prototype._normal=function(i,e){i.beginPath(),i.moveTo(.5*this.size,this.size),i.lineTo(0,0),i.lineTo(-.5*this.size,this.size),i.closePath()},e}(h);t.NormalHead=a,a.__name__=\"NormalHead\",a.init_NormalHead();var _=function(i){function e(e){return i.call(this,e)||this}return s.__extends(e,i),e.init_VeeHead=function(){this.mixins([\"line\",\"fill\"]),this.override({fill_color:\"black\"})},e.prototype.clip=function(i,e){this.visuals.line.set_vectorize(i,e),i.moveTo(.5*this.size,this.size),i.lineTo(.5*this.size,-2),i.lineTo(-.5*this.size,-2),i.lineTo(-.5*this.size,this.size),i.lineTo(0,.5*this.size),i.lineTo(.5*this.size,this.size)},e.prototype.render=function(i,e){this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(i,e),this._vee(i,e),i.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(i,e),this._vee(i,e),i.stroke())},e.prototype._vee=function(i,e){i.beginPath(),i.moveTo(.5*this.size,this.size),i.lineTo(0,0),i.lineTo(-.5*this.size,this.size),i.lineTo(0,.5*this.size),i.closePath()},e}(h);t.VeeHead=_,_.__name__=\"VeeHead\",_.init_VeeHead();var u=function(i){function e(e){return i.call(this,e)||this}return s.__extends(e,i),e.init_TeeHead=function(){this.mixins([\"line\"])},e.prototype.render=function(i,e){this.visuals.line.doit&&(this.visuals.line.set_vectorize(i,e),i.beginPath(),i.moveTo(.5*this.size,0),i.lineTo(-.5*this.size,0),i.stroke())},e.prototype.clip=function(i,e){},e}(h);t.TeeHead=u,u.__name__=\"TeeHead\",u.init_TeeHead()},\n", | |
" function _(t,n,e){var a=t(113),i=t(171),r=t(115),o=t(121),s=t(117),u=t(196),l=t(109),h=t(198),c=t(125),d=t(199);function _(t,n,e){if(l.isArray(t)){var a=t.concat(n);return null!=e&&a.length>e?a.slice(-e):a}if(l.isTypedArray(t)){var i=t.length+n.length;if(null!=e&&i>e){var r=i-e,o=t.length;a=void 0;t.length<e?(a=new t.constructor(e)).set(t,0):a=t;for(var s=r,u=o;s<u;s++)a[s-r]=a[s];for(s=0,u=n.length;s<u;s++)a[s+(o-r)]=n[s];return a}var c=new t.constructor(n);return h.concat(t,c)}throw new Error(\"unsupported array types\")}function v(t,n){var e,a,i;return l.isNumber(t)?(e=t,i=t+1,a=1):(e=null!=t.start?t.start:0,i=null!=t.stop?t.stop:n,a=null!=t.step?t.step:1),[e,i,a]}function f(t,n,e){for(var a=new s.Set,i=!1,r=0,o=n;r<o.length;r++){var u=o[r],h=u[0],c=u[1],d=void 0,_=void 0,f=void 0,m=void 0;if(l.isArray(h)){var p=h[0];a.add(p),_=e[p],d=t[p],m=c,2===h.length?(_=[1,_[0]],f=[h[0],0,h[1]]):f=h}else l.isNumber(h)?(m=[c],a.add(h)):(m=c,i=!0),f=[0,0,h],_=[1,t.length],d=t;var y=0,g=v(f[1],_[0]),w=g[0],S=g[1],b=g[2],C=v(f[2],_[1]),j=C[0],D=C[1],A=C[2];for(p=w;p<S;p+=b)for(var z=j;z<D;z+=A)i&&a.add(z),d[p*_[1]+z]=m[y],y++}return a}e.stream_to_column=_,e.slice=v,e.patch_to_column=f;var m=function(t){function n(n){return t.call(this,n)||this}return a.__extends(n,t),n.init_ColumnDataSource=function(){this.define({data:[o.Any,{}]})},n.prototype.initialize=function(){var n;t.prototype.initialize.call(this),n=u.decode_column_data(this.data),this.data=n[0],this._shapes=n[1]},n.prototype.attributes_as_json=function(t,e){void 0===t&&(t=!0),void 0===e&&(e=n._value_to_json);for(var a={},i=this.serializable_attributes(),r=0,o=c.keys(i);r<o.length;r++){var s=o[r],l=i[s];\"data\"===s&&(l=u.encode_column_data(l,this._shapes)),t?a[s]=l:s in this._set_after_defaults&&(a[s]=l)}return e(\"attributes\",a,this)},n._value_to_json=function(t,n,e){return l.isPlainObject(n)&&\"data\"===t?u.encode_column_data(n,e._shapes):r.HasProps._value_to_json(t,n,e)},n.prototype.stream=function(t,n,e){var a=this.data;for(var i in t)a[i]=_(a[i],t[i],n);if(this.setv({data:a},{silent:!0}),this.streaming.emit(),null!=this.document){var r=new d.ColumnsStreamedEvent(this.document,this.ref(),t,n);this.document._notify_change(this,\"data\",null,null,{setter_id:e,hint:r})}},n.prototype.patch=function(t,n){var e=this.data,a=new s.Set;for(var i in t){var r=t[i];a=a.union(f(e[i],r,this._shapes[i]))}if(this.setv({data:e},{silent:!0}),this.patching.emit(a.values),null!=this.document){var o=new d.ColumnsPatchedEvent(this.document,this.ref(),t);this.document._notify_change(this,\"data\",null,null,{setter_id:n,hint:o})}},n}(i.ColumnarDataSource);e.ColumnDataSource=m,m.__name__=\"ColumnDataSource\",m.init_ColumnDataSource()},\n", | |
" function _(t,n,e){var r=t(113),i=t(172),a=t(116),o=t(167),s=t(174),u=t(121),c=t(109),l=t(110),h=t(125),g=t(173),p=t(195),f=function(t){function n(n){return t.call(this,n)||this}return r.__extends(n,t),n.prototype.get_array=function(t){var n=this.data[t];return null==n?this.data[t]=n=[]:c.isArray(n)||(this.data[t]=n=Array.from(n)),n},n.init_ColumnarDataSource=function(){this.define({selection_policy:[u.Instance,function(){return new p.UnionRenderers}]}),this.internal({selection_manager:[u.Instance,function(t){return new s.SelectionManager({source:t})}],inspected:[u.Instance,function(){return new g.Selection}],_shapes:[u.Any,{}]})},n.prototype.initialize=function(){t.prototype.initialize.call(this),this._select=new a.Signal0(this,\"select\"),this.inspect=new a.Signal(this,\"inspect\"),this.streaming=new a.Signal0(this,\"streaming\"),this.patching=new a.Signal(this,\"patching\")},n.prototype.get_column=function(t){var n=this.data[t];return null!=n?n:null},n.prototype.columns=function(){return h.keys(this.data)},n.prototype.get_length=function(t){void 0===t&&(t=!0);var n=l.uniq(h.values(this.data).map(function(t){return t.length}));switch(n.length){case 0:return null;case 1:return n[0];default:var e=\"data source has columns of inconsistent lengths\";if(t)return o.logger.warn(e),n.sort()[0];throw new Error(e)}},n.prototype.get_indices=function(){var t=this.get_length();return l.range(0,null!=t?t:1)},n.prototype.clear=function(){for(var t={},n=0,e=this.columns();n<e.length;n++){var r=e[n];t[r]=new this.data[r].constructor(0)}this.data=t},n}(i.DataSource);e.ColumnarDataSource=f,f.__name__=\"ColumnarDataSource\",f.init_ColumnarDataSource()},\n", | |
" function _(n,t,e){var c=n(113),a=n(166),i=n(173),o=n(121),l=function(n){function t(t){return n.call(this,t)||this}return c.__extends(t,n),t.init_DataSource=function(){this.define({selected:[o.Instance,function(){return new i.Selection}],callback:[o.Any]})},t.prototype.connect_signals=function(){var t=this;n.prototype.connect_signals.call(this),this.connect(this.selected.change,function(){null!=t.callback&&t.callback.execute(t)})},t}(a.Model);e.DataSource=l,l.__name__=\"DataSource\",l.init_DataSource()},\n", | |
" function _(i,e,t){var n=i(113),s=i(166),c=i(121),l=i(110),h=i(125),d=function(i){function e(e){return i.call(this,e)||this}return n.__extends(e,i),e.init_Selection=function(){this.define({indices:[c.Array,[]],line_indices:[c.Array,[]],multiline_indices:[c.Any,{}]}),this.internal({final:[c.Boolean],selected_glyphs:[c.Array,[]],get_view:[c.Any],image_indices:[c.Array,[]]})},e.prototype.initialize=function(){var e=this;i.prototype.initialize.call(this),this[\"0d\"]={glyph:null,indices:[],flag:!1,get_view:function(){return null}},this[\"1d\"]={indices:this.indices},this[\"2d\"]={indices:{}},this.get_view=function(){return null},this.connect(this.properties.indices.change,function(){return e[\"1d\"].indices=e.indices}),this.connect(this.properties.line_indices.change,function(){e[\"0d\"].indices=e.line_indices,e[\"0d\"].flag=0!=e.line_indices.length}),this.connect(this.properties.selected_glyphs.change,function(){return e[\"0d\"].glyph=e.selected_glyph}),this.connect(this.properties.get_view.change,function(){return e[\"0d\"].get_view=e.get_view}),this.connect(this.properties.multiline_indices.change,function(){return e[\"2d\"].indices=e.multiline_indices})},Object.defineProperty(e.prototype,\"selected_glyph\",{get:function(){return this.selected_glyphs.length>0?this.selected_glyphs[0]:null},enumerable:!0,configurable:!0}),e.prototype.add_to_selected_glyphs=function(i){this.selected_glyphs.push(i)},e.prototype.update=function(i,e,t){this.final=e,t?this.update_through_union(i):(this.indices=i.indices,this.line_indices=i.line_indices,this.selected_glyphs=i.selected_glyphs,this.get_view=i.get_view,this.multiline_indices=i.multiline_indices,this.image_indices=i.image_indices)},e.prototype.clear=function(){this.final=!0,this.indices=[],this.line_indices=[],this.multiline_indices={},this.get_view=function(){return null},this.selected_glyphs=[]},e.prototype.is_empty=function(){return 0==this.indices.length&&0==this.line_indices.length&&0==this.image_indices.length},e.prototype.update_through_union=function(i){this.indices=l.union(i.indices,this.indices),this.selected_glyphs=l.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=l.union(i.line_indices,this.line_indices),this.get_view()||(this.get_view=i.get_view),this.multiline_indices=h.merge(i.multiline_indices,this.multiline_indices)},e.prototype.update_through_intersection=function(i){this.indices=l.intersection(i.indices,this.indices),this.selected_glyphs=l.union(i.selected_glyphs,this.selected_glyphs),this.line_indices=l.union(i.line_indices,this.line_indices),this.get_view()||(this.get_view=i.get_view),this.multiline_indices=h.merge(i.multiline_indices,this.multiline_indices)},e}(s.Model);t.Selection=d,d.__name__=\"Selection\",d.init_Selection()},\n", | |
" function _(e,t,i){var n=e(113),o=e(115),r=e(173),s=e(175),c=e(192),l=e(121),p=function(e){function t(t){var i=e.call(this,t)||this;return i.inspectors={},i}return n.__extends(t,e),t.init_SelectionManager=function(){this.internal({source:[l.Any]})},t.prototype.select=function(e,t,i,n){void 0===n&&(n=!1);for(var o=[],r=[],l=0,p=e;l<p.length;l++){(u=p[l])instanceof s.GlyphRendererView?o.push(u):u instanceof c.GraphRendererView&&r.push(u)}for(var a=!1,_=0,h=r;_<h.length;_++){var u,d=(u=h[_]).model.selection_policy.hit_test(t,u);a=a||u.model.selection_policy.do_selection(d,u.model,i,n)}if(o.length>0){d=this.source.selection_policy.hit_test(t,o);a=a||this.source.selection_policy.do_selection(d,this.source,i,n)}return a},t.prototype.inspect=function(e,t){var i=!1;if(e instanceof s.GlyphRendererView){if(null!=(o=e.hit_test(t))){i=!o.is_empty();var n=this.get_or_create_inspector(e.model);n.update(o,!0,!1),this.source.setv({inspected:n},{silent:!0}),this.source.inspect.emit([e,{geometry:t}])}}else if(e instanceof c.GraphRendererView){var o=e.model.inspection_policy.hit_test(t,e);i=i||e.model.inspection_policy.do_inspection(o,t,e,!1,!1)}return i},t.prototype.clear=function(e){this.source.selected.clear(),null!=e&&this.get_or_create_inspector(e.model).clear()},t.prototype.get_or_create_inspector=function(e){return null==this.inspectors[e.id]&&(this.inspectors[e.id]=new r.Selection),this.inspectors[e.id]},t}(o.HasProps);i.SelectionManager=p,p.__name__=\"SelectionManager\",p.init_SelectionManager()},\n", | |
" function _(e,t,i){var n=e(113),l=e(176),s=e(177),h=e(187),r=e(188),o=e(190),a=e(191),d=e(167),c=e(121),_=e(114),p=e(110),u=e(125),g=e(184),y={fill:{},line:{}},m={fill:{fill_alpha:.3,fill_color:\"grey\"},line:{line_alpha:.3,line_color:\"grey\"}},v={fill:{fill_alpha:.2},line:{}},f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this);var t=this.model.glyph,i=p.includes(t.mixins,\"fill\"),n=p.includes(t.mixins,\"line\"),l=u.clone(t.attributes);function s(e){var s=u.clone(l);return i&&u.extend(s,e.fill),n&&u.extend(s,e.line),new t.constructor(s)}delete l.id,this.glyph=this.build_glyph_view(t);var h=this.model.selection_glyph;null==h?h=s({fill:{},line:{}}):\"auto\"===h&&(h=s(y)),this.selection_glyph=this.build_glyph_view(h);var r=this.model.nonselection_glyph;null==r?r=s({fill:{},line:{}}):\"auto\"===r&&(r=s(v)),this.nonselection_glyph=this.build_glyph_view(r);var o=this.model.hover_glyph;null!=o&&(this.hover_glyph=this.build_glyph_view(o));var a=this.model.muted_glyph;null!=a&&(this.muted_glyph=this.build_glyph_view(a));var d=s(m);this.decimated_glyph=this.build_glyph_view(d),this.xscale=this.plot_view.frame.xscales[this.model.x_range_name],this.yscale=this.plot_view.frame.yscales[this.model.y_range_name],this.set_data(!1)},t.prototype.build_glyph_view=function(e){return new e.default_view({model:e,parent:this})},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return t.request_render()}),this.connect(this.model.glyph.change,function(){return t.set_data()}),this.connect(this.model.data_source.change,function(){return t.set_data()}),this.connect(this.model.data_source.streaming,function(){return t.set_data()}),this.connect(this.model.data_source.patching,function(e){return t.set_data(!0,e)}),this.connect(this.model.data_source.selected.change,function(){return t.request_render()}),this.connect(this.model.data_source._select,function(){return t.request_render()}),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,function(){return t.request_render()}),this.connect(this.model.properties.view.change,function(){return t.set_data()}),this.connect(this.model.view.change,function(){return t.set_data()}),this.connect(this.model.properties.visible.change,function(){return t.plot_view.update_dataranges()});var i=this.plot_view.frame,n=i.x_ranges,l=i.y_ranges;for(var s in n){(h=n[s])instanceof g.FactorRange&&this.connect(h.change,function(){return t.set_data()})}for(var s in l){var h;(h=l[s])instanceof g.FactorRange&&this.connect(h.change,function(){return t.set_data()})}this.connect(this.model.glyph.transformchange,function(){return t.set_data()})},t.prototype.have_selection_glyphs=function(){return null!=this.selection_glyph&&null!=this.nonselection_glyph},t.prototype.set_data=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=null);var i=Date.now(),n=this.model.data_source;this.all_indices=this.model.view.indices,this.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),this.glyph.set_data(n,this.all_indices,t),this.glyph.set_visuals(n),this.decimated_glyph.set_visuals(n),this.have_selection_glyphs()&&(this.selection_glyph.set_visuals(n),this.nonselection_glyph.set_visuals(n)),null!=this.hover_glyph&&this.hover_glyph.set_visuals(n),null!=this.muted_glyph&&this.muted_glyph.set_visuals(n);var l=this.plot_model.lod_factor;this.decimated=[];for(var s=0,h=Math.floor(this.all_indices.length/l);s<h;s++)this.decimated.push(s*l);var r=Date.now()-i;d.logger.debug(this.glyph.model.type+\" GlyphRenderer (\"+this.model.id+\"): set_data finished in \"+r+\"ms\"),this.set_data_timestamp=Date.now(),e&&this.request_render()},Object.defineProperty(t.prototype,\"has_webgl\",{get:function(){return null!=this.glyph.glglyph},enumerable:!0,configurable:!0}),t.prototype.render=function(){var e=this;if(this.model.visible){var t=Date.now(),i=this.has_webgl;this.glyph.map_data();var n=Date.now()-t,l=Date.now(),a=this.glyph.mask_data(this.all_indices);a.length===this.all_indices.length&&(a=p.range(0,this.all_indices.length));var c=Date.now()-l,u=this.plot_view.canvas_view.ctx;u.save();var g,y=this.model.data_source.selected;g=!y||y.is_empty()?[]:this.glyph instanceof s.LineView&&y.selected_glyph===this.glyph.model?this.model.view.convert_indices_from_subset(a):y.indices;var m,v,f,w=this.model.data_source.inspected,b=new Set(!w||w.is_empty()?[]:w[\"0d\"].glyph?e.model.view.convert_indices_from_subset(a):w[\"1d\"].indices.length>0?w[\"1d\"].indices:_.map(Object.keys(w[\"2d\"].indices),function(e){return parseInt(e)})),x=_.filter(a,function(t){return b.has(e.all_indices[t])}),D=this.plot_model.lod_threshold;null!=this.model.document&&this.model.document.interactive_duration()>0&&!i&&null!=D&&this.all_indices.length>D?(a=this.decimated,m=this.decimated_glyph,v=this.decimated_glyph,f=this.selection_glyph):(m=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,v=this.nonselection_glyph,f=this.selection_glyph),null!=this.hover_glyph&&x.length&&(a=p.difference(a,x));var R,V=null;if(g.length&&this.have_selection_glyphs()){for(var G=Date.now(),A={},I=0,q=g;I<q.length;I++){A[P=q[I]]=!0}var k=new Array,z=new Array;if(this.glyph instanceof s.LineView)for(var L=0,O=this.all_indices;L<O.length;L++){null!=A[P=O[L]]?k.push(P):z.push(P)}else for(var j=0,F=a;j<F.length;j++){var P=F[j];null!=A[this.all_indices[P]]?k.push(P):z.push(P)}V=Date.now()-G,R=Date.now(),v.render(u,z,this.glyph),f.render(u,k,this.glyph),null!=this.hover_glyph&&(this.glyph instanceof s.LineView?this.hover_glyph.render(u,this.model.view.convert_indices_from_subset(x),this.glyph):this.hover_glyph.render(u,x,this.glyph))}else if(R=Date.now(),this.glyph instanceof s.LineView)this.hover_glyph&&x.length?this.hover_glyph.render(u,this.model.view.convert_indices_from_subset(x),this.glyph):m.render(u,this.all_indices,this.glyph);else if(this.glyph instanceof h.PatchView||this.glyph instanceof r.HAreaView||this.glyph instanceof o.VAreaView)if(0==w.selected_glyphs.length||null==this.hover_glyph)m.render(u,this.all_indices,this.glyph);else for(var S=0,B=w.selected_glyphs;S<B.length;S++){B[S].id==this.glyph.model.id&&this.hover_glyph.render(u,this.all_indices,this.glyph)}else m.render(u,a,this.glyph),this.hover_glyph&&x.length&&this.hover_glyph.render(u,x,this.glyph);var C=Date.now()-R;this.last_dtrender=C;var H=Date.now()-t;d.logger.debug(this.glyph.model.type+\" GlyphRenderer (\"+this.model.id+\"): render finished in \"+H+\"ms\"),d.logger.trace(\" - map_data finished in : \"+n+\"ms\"),d.logger.trace(\" - mask_data finished in : \"+c+\"ms\"),null!=V&&d.logger.trace(\" - selection mask finished in : \"+V+\"ms\"),d.logger.trace(\" - glyph renders finished in : \"+C+\"ms\"),u.restore()}},t.prototype.draw_legend=function(e,t,i,n,l,s,h,r){null==r&&(r=this.model.get_reference_point(s,h)),this.glyph.draw_legend_for_index(e,{x0:t,x1:i,y0:n,y1:l},r)},t.prototype.hit_test=function(e){if(!this.model.visible)return null;var t=this.glyph.hit_test(e);return null==t?null:this.model.view.convert_selection_from_subset(t)},t}(l.DataRendererView);i.GlyphRendererView=f,f.__name__=\"GlyphRendererView\";var w=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.init_GlyphRenderer=function(){this.prototype.default_view=f,this.define({data_source:[c.Instance],view:[c.Instance,function(){return new a.CDSView}],glyph:[c.Instance],hover_glyph:[c.Instance],nonselection_glyph:[c.Any,\"auto\"],selection_glyph:[c.Any,\"auto\"],muted_glyph:[c.Instance],muted:[c.Boolean,!1]})},t.prototype.initialize=function(){e.prototype.initialize.call(this),null==this.view.source&&(this.view.source=this.data_source,this.view.compute_indices())},t.prototype.get_reference_point=function(e,t){var i=0;if(null!=e){var n=this.data_source.get_column(e);if(null!=n){var l=_.indexOf(n,t);-1!=l&&(i=l)}}return i},t.prototype.get_selection_manager=function(){return this.data_source.selection_manager},t}(l.DataRenderer);i.GlyphRenderer=w,w.__name__=\"GlyphRenderer\",w.init_GlyphRenderer()},\n", | |
" function _(e,n,r){var t=e(113),a=e(160),i=e(121),_=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(n,e),n}(a.RendererView);r.DataRendererView=_,_.__name__=\"DataRendererView\";var d=function(e){function n(n){return e.call(this,n)||this}return t.__extends(n,e),n.init_DataRenderer=function(){this.define({x_range_name:[i.String,\"default\"],y_range_name:[i.String,\"default\"]}),this.override({level:\"glyph\"})},n}(a.Renderer);r.DataRenderer=d,d.__name__=\"DataRenderer\",d.init_DataRenderer()},\n", | |
" function _(t,e,i){var n=t(113),s=t(178),r=t(186),_=t(183),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._render=function(t,e,i){var n=i.sx,s=i.sy,r=!1,_=null;this.visuals.line.set_value(t);for(var o=0,h=e;o<h.length;o++){var l=h[o];if(r){if(!isFinite(n[l]+s[l])){t.stroke(),t.beginPath(),r=!1,_=l;continue}null!=_&&l-_>1&&(t.stroke(),r=!1)}r?t.lineTo(n[l],s[l]):(t.beginPath(),t.moveTo(n[l],s[l]),r=!0),_=l}r&&t.stroke()},e.prototype._hit_point=function(t){for(var e=this,i=_.create_empty_hit_test_result(),n={x:t.sx,y:t.sy},s=9999,r=Math.max(2,this.visuals.line.line_width.value()/2),o=0,h=this.sx.length-1;o<h;o++){var l={x:this.sx[o],y:this.sy[o]},u={x:this.sx[o+1],y:this.sy[o+1]},a=_.dist_to_segment(n,l,u);a<r&&a<s&&(s=a,i.add_to_selected_glyphs(this.model),i.get_view=function(){return e},i.line_indices=[o])}return i},e.prototype._hit_span=function(t){var e,i,n=this,s=t.sx,r=t.sy,o=_.create_empty_hit_test_result();\"v\"==t.direction?(e=this.renderer.yscale.invert(r),i=this._y):(e=this.renderer.xscale.invert(s),i=this._x);for(var h=0,l=i.length-1;h<l;h++)(i[h]<=e&&e<=i[h+1]||i[h+1]<=e&&e<=i[h])&&(o.add_to_selected_glyphs(this.model),o.get_view=function(){return n},o.line_indices.push(h));return o},e.prototype.get_interpolation_hit=function(t,e){var i=[this._x[t],this._y[t],this._x[t+1],this._y[t+1]],n=i[0],s=i[1],_=i[2],o=i[3];return r.line_interpolation(this.renderer,e,n,s,_,o)},e.prototype.draw_legend_for_index=function(t,e,i){r.generic_line_legend(this.visuals,t,e,i)},e}(s.XYGlyphView);i.LineView=o,o.__name__=\"LineView\";var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_Line=function(){this.prototype.default_view=o,this.mixins([\"line\"])},e}(s.XYGlyph);i.Line=h,h.__name__=\"Line\",h.init_Line()},\n", | |
" function _(t,n,i){var e=t(113),r=t(179),h=t(182),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(n,t),n.prototype._index_data=function(){for(var t=[],n=0,i=this._x.length;n<i;n++){var e=this._x[n],h=this._y[n];!isNaN(e+h)&&isFinite(e+h)&&t.push({x0:e,y0:h,x1:e,y1:h,i:n})}return new r.SpatialIndex(t)},n.prototype.scenterx=function(t){return this.sx[t]},n.prototype.scentery=function(t){return this.sy[t]},n}(h.GlyphView);i.XYGlyphView=s,s.__name__=\"XYGlyphView\";var _=function(t){function n(n){return t.call(this,n)||this}return e.__extends(n,t),n.init_XYGlyph=function(){this.coords([[\"x\",\"y\"]])},n}(h.Glyph);i.XYGlyph=_,_.__name__=\"XYGlyph\",_.init_XYGlyph()},\n", | |
" function _(n,t,i){var e=n(180),r=n(181),o=function(){function n(n){if(this.points=n,this.index=null,n.length>0){this.index=new e(n.length);for(var t=0,i=n;t<i.length;t++){var r=i[t],o=r.x0,a=r.y0,u=r.x1,x=r.y1;this.index.add(o,a,u,x)}this.index.finish()}}return n.prototype._normalize=function(n){var t,i,e=n.x0,r=n.y0,o=n.x1,a=n.y1;return e>o&&(e=(t=[o,e])[0],o=t[1]),r>a&&(r=(i=[a,r])[0],a=i[1]),{x0:e,y0:r,x1:o,y1:a}},Object.defineProperty(n.prototype,\"bbox\",{get:function(){if(null==this.index)return r.empty();var n=this.index;return{x0:n.minX,y0:n.minY,x1:n.maxX,y1:n.maxY}},enumerable:!0,configurable:!0}),n.prototype.search=function(n){var t=this;if(null==this.index)return[];var i=this._normalize(n),e=i.x0,r=i.y0,o=i.x1,a=i.y1;return this.index.search(e,r,o,a).map(function(n){return t.points[n]})},n.prototype.indices=function(n){return this.search(n).map(function(n){return n.i})},n}();i.SpatialIndex=o,o.__name__=\"SpatialIndex\"},\n", | |
" function _(t,s,i){var e,h;e=this,h=function(){\"use strict\";var t=function(){this.ids=[],this.values=[],this.length=0};t.prototype.clear=function(){this.length=this.ids.length=this.values.length=0},t.prototype.push=function(t,s){this.ids.push(t),this.values.push(s);for(var i=this.length++;i>0;){var e=i-1>>1,h=this.values[e];if(s>=h)break;this.ids[i]=this.ids[e],this.values[i]=h,i=e}this.ids[i]=t,this.values[i]=s},t.prototype.pop=function(){if(0!==this.length){var t=this.ids[0];if(this.length--,this.length>0){for(var s=this.ids[0]=this.ids[this.length],i=this.values[0]=this.values[this.length],e=this.length>>1,h=0;h<e;){var r=1+(h<<1),n=r+1,o=this.ids[r],a=this.values[r],u=this.values[n];if(n<this.length&&u<a&&(r=n,o=this.ids[n],a=u),a>=i)break;this.ids[h]=o,this.values[h]=a,h=r}this.ids[h]=s,this.values[h]=i}return this.ids.pop(),this.values.pop(),t}},t.prototype.peek=function(){return this.ids[0]},t.prototype.peekValue=function(){return this.values[0]};var s=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],i=function(i,e,h,r){if(void 0===e&&(e=16),void 0===h&&(h=Float64Array),void 0===i)throw new Error(\"Missing required argument: numItems.\");if(isNaN(i)||i<=0)throw new Error(\"Unpexpected numItems value: \"+i+\".\");this.numItems=+i,this.nodeSize=Math.min(Math.max(+e,2),65535);var n=i,o=n;this._levelBounds=[4*n];do{o+=n=Math.ceil(n/this.nodeSize),this._levelBounds.push(4*o)}while(1!==n);this.ArrayType=h||Float64Array,this.IndexArrayType=o<16384?Uint16Array:Uint32Array;var a=s.indexOf(this.ArrayType),u=4*o*this.ArrayType.BYTES_PER_ELEMENT;if(a<0)throw new Error(\"Unexpected typed array class: \"+h+\".\");r&&r instanceof ArrayBuffer?(this.data=r,this._boxes=new this.ArrayType(this.data,8,4*o),this._indices=new this.IndexArrayType(this.data,8+u,o),this._pos=4*o,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1]):(this.data=new ArrayBuffer(8+u+o*this.IndexArrayType.BYTES_PER_ELEMENT),this._boxes=new this.ArrayType(this.data,8,4*o),this._indices=new this.IndexArrayType(this.data,8+u,o),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(this.data,0,2).set([251,48+a]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=i),this._queue=new t};function e(t,s,i){return t<s?s-t:t<=i?0:t-i}function h(t,s){for(var i=0,e=s.length-1;i<e;){var h=i+e>>1;s[h]>t?e=h:i=h+1}return s[i]}function r(t,s,i,e,h){var r=t[e];t[e]=t[h],t[h]=r;var n=4*e,o=4*h,a=s[n],u=s[n+1],p=s[n+2],d=s[n+3];s[n]=s[o],s[n+1]=s[o+1],s[n+2]=s[o+2],s[n+3]=s[o+3],s[o]=a,s[o+1]=u,s[o+2]=p,s[o+3]=d;var _=i[e];i[e]=i[h],i[h]=_}function n(t,s){var i=t^s,e=65535^i,h=65535^(t|s),r=t&(65535^s),n=i|e>>1,o=i>>1^i,a=h>>1^e&r>>1^h,u=i&h>>1^r>>1^r;o=(i=n)&(e=o)>>2^e&(i^e)>>2,a^=i&(h=a)>>2^e&(r=u)>>2,u^=e&h>>2^(i^e)&r>>2,o=(i=n=i&i>>2^e&e>>2)&(e=o)>>4^e&(i^e)>>4,a^=i&(h=a)>>4^e&(r=u)>>4,u^=e&h>>4^(i^e)&r>>4,a^=(i=n=i&i>>4^e&e>>4)&(h=a)>>8^(e=o)&(r=u)>>8;var p=t^s,d=(e=(u^=e&h>>8^(i^e)&r>>8)^u>>1)|65535^(p|(i=a^a>>1));return((d=1431655765&((d=858993459&((d=252645135&((d=16711935&(d|d<<8))|d<<4))|d<<2))|d<<1))<<1|(p=1431655765&((p=858993459&((p=252645135&((p=16711935&(p|p<<8))|p<<4))|p<<2))|p<<1)))>>>0}return i.from=function(t){if(!(t instanceof ArrayBuffer))throw new Error(\"Data must be an instance of ArrayBuffer.\");var e=new Uint8Array(t,0,2),h=e[0],r=e[1];if(251!==h)throw new Error(\"Data does not appear to be in a Flatbush format.\");if(r>>4!=3)throw new Error(\"Got v\"+(r>>4)+\" data when expected v3.\");var n=new Uint16Array(t,2,1)[0],o=new Uint32Array(t,4,1)[0];return new i(o,n,s[15&r],t)},i.prototype.add=function(t,s,i,e){var h=this._pos>>2;this._indices[h]=h,this._boxes[this._pos++]=t,this._boxes[this._pos++]=s,this._boxes[this._pos++]=i,this._boxes[this._pos++]=e,t<this.minX&&(this.minX=t),s<this.minY&&(this.minY=s),i>this.maxX&&(this.maxX=i),e>this.maxY&&(this.maxY=e)},i.prototype.finish=function(){if(this._pos>>2!==this.numItems)throw new Error(\"Added \"+(this._pos>>2)+\" items when expected \"+this.numItems+\".\");for(var t=this.maxX-this.minX,s=this.maxY-this.minY,i=new Uint32Array(this.numItems),e=0;e<this.numItems;e++){var h=4*e,o=this._boxes[h++],a=this._boxes[h++],u=this._boxes[h++],p=this._boxes[h++],d=Math.floor(65535*((o+u)/2-this.minX)/t),_=Math.floor(65535*((a+p)/2-this.minY)/s);i[e]=n(d,_)}!function t(s,i,e,h,n){if(h>=n)return;var o=s[h+n>>1];var a=h-1;var u=n+1;for(;;){do{a++}while(s[a]<o);do{u--}while(s[u]>o);if(a>=u)break;r(s,i,e,a,u)}t(s,i,e,h,u);t(s,i,e,u+1,n)}(i,this._boxes,this._indices,0,this.numItems-1);for(var f=0,l=0;f<this._levelBounds.length-1;f++)for(var v=this._levelBounds[f];l<v;){for(var x=1/0,y=1/0,m=-1/0,c=-1/0,b=l,w=0;w<this.nodeSize&&l<v;w++){var A=this._boxes[l++],g=this._boxes[l++],E=this._boxes[l++],I=this._boxes[l++];A<x&&(x=A),g<y&&(y=g),E>m&&(m=E),I>c&&(c=I)}this._indices[this._pos>>2]=b,this._boxes[this._pos++]=x,this._boxes[this._pos++]=y,this._boxes[this._pos++]=m,this._boxes[this._pos++]=c}},i.prototype.search=function(t,s,i,e,h){if(this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");for(var r=this._boxes.length-4,n=this._levelBounds.length-1,o=[],a=[];void 0!==r;){for(var u=Math.min(r+4*this.nodeSize,this._levelBounds[n]),p=r;p<u;p+=4){var d=0|this._indices[p>>2];i<this._boxes[p]||(e<this._boxes[p+1]||t>this._boxes[p+2]||s>this._boxes[p+3]||(r<4*this.numItems?(void 0===h||h(d))&&a.push(d):(o.push(d),o.push(n-1))))}n=o.pop(),r=o.pop()}return a},i.prototype.neighbors=function(t,s,i,r,n){if(void 0===i&&(i=1/0),void 0===r&&(r=1/0),this._pos!==this._boxes.length)throw new Error(\"Data not yet indexed - call index.finish().\");for(var o=this._boxes.length-4,a=this._queue,u=[],p=r*r;void 0!==o;){for(var d=Math.min(o+4*this.nodeSize,h(o,this._levelBounds)),_=o;_<d;_+=4){var f=0|this._indices[_>>2],l=e(t,this._boxes[_],this._boxes[_+2]),v=e(s,this._boxes[_+1],this._boxes[_+3]),x=l*l+v*v;o<4*this.numItems?(void 0===n||n(f))&&a.push(-f-1,x):a.push(f,x)}for(;a.length&&a.peek()<0;){if(a.peekValue()>p)return a.clear(),u;if(u.push(-a.pop()-1),u.length===i)return a.clear(),u}o=a.pop()}return a.clear(),u},i},\"object\"==typeof i&&void 0!==s?s.exports=h():\"function\"==typeof define&&define.amd?define(h):(e=e||self).Flatbush=h()},\n", | |
" function _(t,e,r){var i=Math.min,n=Math.max;r.empty=function(){return{x0:1/0,y0:1/0,x1:-1/0,y1:-1/0}},r.positive_x=function(){return{x0:Number.MIN_VALUE,y0:-1/0,x1:1/0,y1:1/0}},r.positive_y=function(){return{x0:-1/0,y0:Number.MIN_VALUE,x1:1/0,y1:1/0}},r.union=function(t,e){return{x0:i(t.x0,e.x0),x1:n(t.x1,e.x1),y0:i(t.y0,e.y0),y1:n(t.y1,e.y1)}};var o=function(){function t(t){if(null==t)this.x0=0,this.y0=0,this.x1=0,this.y1=0;else if(\"x0\"in t){var e=t.x0,r=t.y0,i=t.x1,n=t.y1;if(!(e<=i&&r<=n))throw new Error(\"invalid bbox {x0: \"+e+\", y0: \"+r+\", x1: \"+i+\", y1: \"+n+\"}\");this.x0=e,this.y0=r,this.x1=i,this.y1=n}else if(\"x\"in t){var o=t.x,h=t.y,u=t.width,y=t.height;if(!(u>=0&&y>=0))throw new Error(\"invalid bbox {x: \"+o+\", y: \"+h+\", width: \"+u+\", height: \"+y+\"}\");this.x0=o,this.y0=h,this.x1=o+u,this.y1=h+y}else{var f=void 0,s=void 0,c=void 0,p=void 0;if(\"width\"in t)if(\"left\"in t)s=(f=t.left)+t.width;else if(\"right\"in t)f=(s=t.right)-t.width;else{var b=t.width/2;f=t.hcenter-b,s=t.hcenter+b}else f=t.left,s=t.right;if(\"height\"in t)if(\"top\"in t)p=(c=t.top)+t.height;else if(\"bottom\"in t)c=(p=t.bottom)-t.height;else{var a=t.height/2;c=t.vcenter-a,p=t.vcenter+a}else c=t.top,p=t.bottom;if(!(f<=s&&c<=p))throw new Error(\"invalid bbox {left: \"+f+\", top: \"+c+\", right: \"+s+\", bottom: \"+p+\"}\");this.x0=f,this.y0=c,this.x1=s,this.y1=p}}return t.prototype.toString=function(){return\"BBox({left: \"+this.left+\", top: \"+this.top+\", width: \"+this.width+\", height: \"+this.height+\"})\"},Object.defineProperty(t.prototype,\"left\",{get:function(){return this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"top\",{get:function(){return this.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"right\",{get:function(){return this.x1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"bottom\",{get:function(){return this.y1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"p0\",{get:function(){return[this.x0,this.y0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"p1\",{get:function(){return[this.x1,this.y1]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"x\",{get:function(){return this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"y\",{get:function(){return this.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"width\",{get:function(){return this.x1-this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"height\",{get:function(){return this.y1-this.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"rect\",{get:function(){return{x0:this.x0,y0:this.y0,x1:this.x1,y1:this.y1}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"box\",{get:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"h_range\",{get:function(){return{start:this.x0,end:this.x1}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"v_range\",{get:function(){return{start:this.y0,end:this.y1}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"ranges\",{get:function(){return[this.h_range,this.v_range]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"aspect\",{get:function(){return this.width/this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"hcenter\",{get:function(){return(this.left+this.right)/2},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"vcenter\",{get:function(){return(this.top+this.bottom)/2},enumerable:!0,configurable:!0}),t.prototype.contains=function(t,e){return t>=this.x0&&t<=this.x1&&e>=this.y0&&e<=this.y1},t.prototype.clip=function(t,e){return t<this.x0?t=this.x0:t>this.x1&&(t=this.x1),e<this.y0?e=this.y0:e>this.y1&&(e=this.y1),[t,e]},t.prototype.union=function(e){return new t({x0:i(this.x0,e.x0),y0:i(this.y0,e.y0),x1:n(this.x1,e.x1),y1:n(this.y1,e.y1)})},t.prototype.equals=function(t){return this.x0==t.x0&&this.y0==t.y0&&this.x1==t.x1&&this.y1==t.y1},Object.defineProperty(t.prototype,\"xview\",{get:function(){var t=this;return{compute:function(e){return t.left+e},v_compute:function(e){for(var r=new Float64Array(e.length),i=t.left,n=0;n<e.length;n++)r[n]=i+e[n];return r}}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"yview\",{get:function(){var t=this;return{compute:function(e){return t.bottom-e},v_compute:function(e){for(var r=new Float64Array(e.length),i=t.bottom,n=0;n<e.length;n++)r[n]=i-e[n];return r}}},enumerable:!0,configurable:!0}),t}();r.BBox=o,o.__name__=\"BBox\"},\n", | |
" function _(t,e,i){var n=t(113),r=t(183),s=t(121),o=t(181),a=t(132),h=t(165),_=t(162),l=t(166),p=t(167),c=t(114),u=t(125),y=t(109),d=t(177),f=t(184),g=function(e){function i(){var t=e.apply(this,arguments)||this;return t._nohit_warned={},t}return n.__extends(i,e),Object.defineProperty(i.prototype,\"renderer\",{get:function(){return this.parent},enumerable:!0,configurable:!0}),i.prototype.initialize=function(){e.prototype.initialize.call(this),this._nohit_warned={},this.visuals=new h.Visuals(this.model);var i=this.renderer.plot_view.gl;if(null!=i){var n=null;try{n=t(454)}catch(t){if(\"MODULE_NOT_FOUND\"!==t.code)throw t;p.logger.warn(\"WebGL was requested and is supported, but bokeh-gl(.min).js is not available, falling back to 2D rendering.\")}if(null!=n){var r=n[this.model.type+\"GLGlyph\"];null!=r&&(this.glglyph=new r(i.ctx,this))}}},i.prototype.set_visuals=function(t){this.visuals.warm_cache(t),null!=this.glglyph&&this.glglyph.set_visuals_changed()},i.prototype.render=function(t,e,i){t.beginPath(),null!=this.glglyph&&this.glglyph.render(t,e,i)||this._render(t,e,i)},i.prototype.has_finished=function(){return!0},i.prototype.notify_finished=function(){this.renderer.notify_finished()},i.prototype._bounds=function(t){return t},i.prototype.bounds=function(){return this._bounds(this.index.bbox)},i.prototype.log_bounds=function(){for(var t=o.empty(),e=0,i=this.index.search(o.positive_x());e<i.length;e++){var n=i[e];n.x0<t.x0&&(t.x0=n.x0),n.x1>t.x1&&(t.x1=n.x1)}for(var r=0,s=this.index.search(o.positive_y());r<s.length;r++){var a=s[r];a.y0<t.y0&&(t.y0=a.y0),a.y1>t.y1&&(t.y1=a.y1)}return this._bounds(t)},i.prototype.get_anchor_point=function(t,e,i){var n=i[0],r=i[1];switch(t){case\"center\":return{x:this.scenterx(e,n,r),y:this.scentery(e,n,r)};default:return null}},i.prototype.sdist=function(t,e,i,n,r){var s,o;void 0===n&&(n=\"edge\"),void 0===r&&(r=!1);var a=e.length;if(\"center\"==n){var h=c.map(i,function(t){return t/2});s=new Float64Array(a);for(var _=0;_<a;_++)s[_]=e[_]-h[_];o=new Float64Array(a);for(_=0;_<a;_++)o[_]=e[_]+h[_]}else{s=e,o=new Float64Array(a);for(_=0;_<a;_++)o[_]=s[_]+i[_]}var l=t.v_compute(s),p=t.v_compute(o);return r?c.map(l,function(t,e){return Math.ceil(Math.abs(p[e]-l[e]))}):c.map(l,function(t,e){return Math.abs(p[e]-l[e])})},i.prototype.draw_legend_for_index=function(t,e,i){},i.prototype.hit_test=function(t){var e=null,i=\"_hit_\"+t.type;return null!=this[i]?e=this[i](t):null==this._nohit_warned[t.type]&&(p.logger.debug(\"'\"+t.type+\"' selection not available for \"+this.model.type),this._nohit_warned[t.type]=!0),e},i.prototype._hit_rect_against_index=function(t){var e=t.sx0,i=t.sx1,n=t.sy0,s=t.sy1,o=this.renderer.xscale.r_invert(e,i),a=o[0],h=o[1],_=this.renderer.yscale.r_invert(n,s),l=_[0],p=_[1],c=r.create_empty_hit_test_result();return c.indices=this.index.indices({x0:a,x1:h,y0:l,y1:p}),c},i.prototype.set_data=function(t,e,i){var n,r,s,o,h=this.model.materialize_dataspecs(t);if(this.visuals.set_all_indices(e),e&&!(this instanceof d.LineView)){var _={},l=function(t){var i=h[t];\"_\"===t.charAt(0)?_[t]=e.map(function(t){return i[t]}):_[t]=i};for(var p in h)l(p);h=_}if(u.extend(this,h),this.renderer.plot_view.model.use_map&&(null!=this._x&&(n=a.project_xy(this._x,this._y),this._x=n[0],this._y=n[1]),null!=this._xs&&(r=a.project_xsys(this._xs,this._ys),this._xs=r[0],this._ys=r[1]),null!=this._x0&&(s=a.project_xy(this._x0,this._y0),this._x0=s[0],this._y0=s[1]),null!=this._x1&&(o=a.project_xy(this._x1,this._y1),this._x1=o[0],this._y1=o[1])),null!=this.renderer.plot_view.frame.x_ranges)for(var y=this.renderer.plot_view.frame.x_ranges[this.model.x_range_name],g=this.renderer.plot_view.frame.y_ranges[this.model.y_range_name],v=0,x=this.model._coords;v<x.length;v++){var m=x[v],w=m[0],b=m[1];w=\"_\"+w,b=\"_\"+b,null!=this._xs?(y instanceof f.FactorRange&&(this[w]=c.map(this[w],function(t){return y.v_synthetic(t)})),g instanceof f.FactorRange&&(this[b]=c.map(this[b],function(t){return g.v_synthetic(t)}))):(y instanceof f.FactorRange&&(this[w]=y.v_synthetic(this[w])),g instanceof f.FactorRange&&(this[b]=g.v_synthetic(this[b])))}null!=this.glglyph&&this.glglyph.set_data_changed(this._x.length),this._set_data(i),this.index_data()},i.prototype._set_data=function(t){},i.prototype.index_data=function(){this.index=this._index_data()},i.prototype.mask_data=function(t){return null!=this.glglyph||null==this._mask_data?t:this._mask_data()},i.prototype.map_data=function(){for(var t,e=0,i=this.model._coords;e<i.length;e++){var n=i[e],r=n[0],s=n[1],o=\"s\"+r,a=\"s\"+s;if(s=\"_\"+s,null!=this[r=\"_\"+r]&&(y.isArray(this[r][0])||y.isTypedArray(this[r][0]))){var h=this[r].length;this[o]=new Array(h),this[a]=new Array(h);for(var _=0;_<h;_++){var l=this.map_to_screen(this[r][_],this[s][_]),p=l[0],c=l[1];this[o][_]=p,this[a][_]=c}}else t=this.map_to_screen(this[r],this[s]),this[o]=t[0],this[a]=t[1]}this._map_data()},i.prototype._map_data=function(){},i.prototype.map_to_screen=function(t,e){return this.renderer.plot_view.map_to_screen(t,e,this.model.x_range_name,this.model.y_range_name)},i}(_.View);i.GlyphView=g,g.__name__=\"GlyphView\";var v=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_Glyph=function(){this.prototype._coords=[],this.internal({x_range_name:[s.String,\"default\"],y_range_name:[s.String,\"default\"]})},e.coords=function(t){var e=this.prototype._coords.concat(t);this.prototype._coords=e;for(var i={},n=0,r=t;n<r.length;n++){var o=r[n],a=o[0],h=o[1];i[a]=[s.CoordinateSpec],i[h]=[s.CoordinateSpec]}this.define(i)},e}(l.Model);i.Glyph=v,v.__name__=\"Glyph\",v.init_Glyph()},\n", | |
" function _(t,n,r){var e=t(110),i=t(173);function o(t){return t*t}function u(t,n){return o(t.x-n.x)+o(t.y-n.y)}function a(t,n,r){var e=u(n,r);if(0==e)return u(t,n);var i=((t.x-n.x)*(r.x-n.x)+(t.y-n.y)*(r.y-n.y))/e;return u(t,i<0?n:i>1?r:{x:n.x+i*(r.x-n.x),y:n.y+i*(r.y-n.y)})}r.point_in_poly=function(t,n,r,e){for(var i=!1,o=r[r.length-1],u=e[e.length-1],a=0;a<r.length;a++){var s=r[a],_=e[a];u<n!=_<n&&o+(n-u)/(_-u)*(s-o)<t&&(i=!i),o=s,u=_}return i},r.point_in_ellipse=function(t,n,r,e,i,o,u){var a=Math.pow(Math.cos(r)/i,2)+Math.pow(Math.sin(r)/e,2),s=2*Math.cos(r)*Math.sin(r)*(Math.pow(1/i,2)-Math.pow(1/e,2)),_=Math.pow(Math.cos(r)/e,2)+Math.pow(Math.sin(r)/i,2);return a*Math.pow(t-o,2)+s*(t-o)*(n-u)+_*Math.pow(n-u,2)<=1},r.create_empty_hit_test_result=function(){return new i.Selection},r.create_hit_test_result_from_hits=function(t){var n=new i.Selection;return n.indices=e.sort_by(t,function(t){return t[0],t[1]}).map(function(t){var n=t[0];return t[1],n}),n},r.dist_2_pts=u,r.dist_to_segment_squared=a,r.dist_to_segment=function(t,n,r){return Math.sqrt(a(t,n,r))},r.check_2_segments_intersect=function(t,n,r,e,i,o,u,a){var s=(a-o)*(r-t)-(u-i)*(e-n);if(0==s)return{hit:!1,x:null,y:null};var _=n-o,h=t-i,c=(u-i)*_-(a-o)*h;return h=((r-t)*_-(e-n)*h)/s,{hit:(_=c/s)>0&&_<1&&h>0&&h<1,x:t+_*(r-t),y:n+_*(e-n)}}},\n", | |
" function _(t,n,r){var e=t(113),i=t(185),a=t(121),s=t(114),o=t(110),p=t(109);function u(t,n,r){void 0===r&&(r=0);for(var e={},i=0;i<t.length;i++){var a=t[i];if(a in e)throw new Error(\"duplicate factor or subfactor: \"+a);e[a]={value:.5+i*(1+n)+r}}return[e,(t.length-1)*n]}function h(t,n,r,e){void 0===e&&(e=0);for(var i={},a={},s=[],p=0,h=t;p<h.length;p++){var g=h[p],c=g[0],f=g[1];c in a||(a[c]=[],s.push(c)),a[c].push(f)}for(var l=e,d=0,_=function(t){var e=a[t].length,s=u(a[t],r,l),p=s[0],h=s[1];d+=h;var g=o.sum(a[t].map(function(t){return p[t].value}));i[t]={value:g/e,mapping:p},l+=e+n+h},v=0,m=s;v<m.length;v++){_(c=m[v])}return[i,s,(s.length-1)*n+d]}function g(t,n,r,e,i){void 0===i&&(i=0);for(var a={},s={},p=[],u=0,g=t;u<g.length;u++){var c=g[u],f=c[0],l=c[1],d=c[2];f in s||(s[f]=[],p.push(f)),s[f].push([l,d])}for(var _=[],v=i,m=0,y=function(t){for(var i=s[t].length,p=h(s[t],r,e,v),u=p[0],g=p[1],c=p[2],f=0,l=g;f<l.length;f++){var d=l[f];_.push([t,d])}m+=c;var y=o.sum(s[t].map(function(t){var n=t[0];return u[n].value}));a[t]={value:y/i,mapping:u},v+=i+n+c},b=0,N=p;b<N.length;b++){y(f=N[b])}return[a,p,_,(p.length-1)*n+m]}r.map_one_level=u,r.map_two_levels=h,r.map_three_levels=g;var c=function(t){function n(n){return t.call(this,n)||this}return e.__extends(n,t),n.init_FactorRange=function(){this.define({factors:[a.Array,[]],factor_padding:[a.Number,0],subgroup_padding:[a.Number,.8],group_padding:[a.Number,1.4],range_padding:[a.Number,0],range_padding_units:[a.PaddingUnits,\"percent\"],start:[a.Number],end:[a.Number]}),this.internal({levels:[a.Number],mids:[a.Array],tops:[a.Array],tops_groups:[a.Array]})},Object.defineProperty(n.prototype,\"min\",{get:function(){return this.start},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"max\",{get:function(){return this.end},enumerable:!0,configurable:!0}),n.prototype.initialize=function(){t.prototype.initialize.call(this),this._init(!0)},n.prototype.connect_signals=function(){var n=this;t.prototype.connect_signals.call(this),this.connect(this.properties.factors.change,function(){return n.reset()}),this.connect(this.properties.factor_padding.change,function(){return n.reset()}),this.connect(this.properties.group_padding.change,function(){return n.reset()}),this.connect(this.properties.subgroup_padding.change,function(){return n.reset()}),this.connect(this.properties.range_padding.change,function(){return n.reset()}),this.connect(this.properties.range_padding_units.change,function(){return n.reset()})},n.prototype.reset=function(){this._init(!1),this.change.emit()},n.prototype._lookup=function(t){var n;if(1==t.length)return(n=this._mapping).hasOwnProperty(t[0])?n[t[0]].value:NaN;if(2==t.length)return(n=this._mapping).hasOwnProperty(t[0])&&n[t[0]].mapping.hasOwnProperty(t[1])?n[t[0]].mapping[t[1]].value:NaN;if(3==t.length)return(n=this._mapping).hasOwnProperty(t[0])&&n[t[0]].mapping.hasOwnProperty(t[1])&&n[t[0]].mapping[t[1]].mapping.hasOwnProperty(t[2])?n[t[0]].mapping[t[1]].mapping[t[2]].value:NaN;throw new Error(\"unreachable code\")},n.prototype.synthetic=function(t){if(p.isNumber(t))return t;if(p.isString(t))return this._lookup([t]);var n=0,r=t[t.length-1];return p.isNumber(r)&&(n=r,t=t.slice(0,-1)),this._lookup(t)+n},n.prototype.v_synthetic=function(t){var n=this;return s.map(t,function(t){return n.synthetic(t)})},n.prototype._init=function(t){var n,r,e,i,a;if(o.every(this.factors,p.isString))i=1,n=u(this.factors,this.factor_padding),this._mapping=n[0],a=n[1];else if(o.every(this.factors,function(t){return p.isArray(t)&&2==t.length&&p.isString(t[0])&&p.isString(t[1])}))i=2,r=h(this.factors,this.group_padding,this.factor_padding),this._mapping=r[0],this.tops=r[1],a=r[2];else{if(!o.every(this.factors,function(t){return p.isArray(t)&&3==t.length&&p.isString(t[0])&&p.isString(t[1])&&p.isString(t[2])}))throw new Error(\"???\");i=3,e=g(this.factors,this.group_padding,this.subgroup_padding,this.factor_padding),this._mapping=e[0],this.tops=e[1],this.mids=e[2],a=e[3]}var s=0,c=this.factors.length+a;if(\"percent\"==this.range_padding_units){var f=(c-s)*this.range_padding/2;s-=f,c+=f}else s-=this.range_padding,c+=this.range_padding;this.setv({start:s,end:c,levels:i},{silent:t}),\"auto\"==this.bounds&&this.setv({bounds:[s,c]},{silent:!0})},n}(i.Range);r.FactorRange=c,c.__name__=\"FactorRange\",c.init_FactorRange()},\n", | |
" function _(t,n,e){var i=t(113),a=t(166),c=t(121),l=t(109),r=function(t){function n(n){var e=t.call(this,n)||this;return e.have_updated_interactively=!1,e}return i.__extends(n,t),n.init_Range=function(){this.define({callback:[c.Any],bounds:[c.Any],min_interval:[c.Any],max_interval:[c.Any]}),this.internal({plots:[c.Array,[]]})},n.prototype.connect_signals=function(){var n=this;t.prototype.connect_signals.call(this),this.connect(this.change,function(){return n._emit_callback()})},n.prototype._emit_callback=function(){null!=this.callback&&(l.isFunction(this.callback)?this.callback(this):this.callback.execute(this,{}))},Object.defineProperty(n.prototype,\"is_reversed\",{get:function(){return this.start>this.end},enumerable:!0,configurable:!0}),n}(a.Model);e.Range=r,r.__name__=\"Range\",r.init_Range()},\n", | |
" function _(e,t,i){var n=e(183);i.generic_line_legend=function(e,t,i,n){var r=i.x0,a=i.x1,l=i.y0,c=i.y1;t.save(),t.beginPath(),t.moveTo(r,(l+c)/2),t.lineTo(a,(l+c)/2),e.line.doit&&(e.line.set_vectorize(t,n),t.stroke()),t.restore()},i.generic_area_legend=function(e,t,i,n){var r=i.x0,a=i.x1,l=i.y0,c=i.y1,o=.1*Math.abs(a-r),s=.1*Math.abs(c-l),_=r+o,v=a-o,h=l+s,x=c-s;e.fill.doit&&(e.fill.set_vectorize(t,n),t.fillRect(_,h,v-_,x-h)),null!=e.hatch&&e.hatch.doit&&(e.hatch.set_vectorize(t,n),t.fillRect(_,h,v-_,x-h)),e.line&&e.line.doit&&(t.beginPath(),t.rect(_,h,v-_,x-h),e.line.set_vectorize(t,n),t.stroke())},i.line_interpolation=function(e,t,i,r,a,l){var c,o,s,_,v,h,x,y,f,d,g=t.sx,m=t.sy;\"point\"==t.type?(f=(c=e.yscale.r_invert(m-1,m+1))[0],d=c[1],x=(o=e.xscale.r_invert(g-1,g+1))[0],y=o[1]):\"v\"==t.direction?(f=(s=e.yscale.r_invert(m,m))[0],d=s[1],x=(_=[Math.min(i-1,a-1),Math.max(i+1,a+1)])[0],y=_[1]):(x=(v=e.xscale.r_invert(g,g))[0],y=v[1],f=(h=[Math.min(r-1,l-1),Math.max(r+1,l+1)])[0],d=h[1]);var u=n.check_2_segments_intersect(x,f,y,d,i,r,a,l);return[u.x,u.y]}},\n", | |
" function _(t,i,e){var n=t(113),s=t(178),l=t(186),o=t(183),r=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(i,t),i.prototype._inner_loop=function(t,i,e,n,s){for(var l=0,o=i;l<o.length;l++){var r=o[l];0!=r?isNaN(e[r]+n[r])?(t.closePath(),s.apply(t),t.beginPath()):t.lineTo(e[r],n[r]):(t.beginPath(),t.moveTo(e[r],n[r]))}t.closePath(),s.call(t)},i.prototype._render=function(t,i,e){var n=this,s=e.sx,l=e.sy;this.visuals.fill.doit&&(this.visuals.fill.set_value(t),this._inner_loop(t,i,s,l,t.fill)),this.visuals.hatch.doit2(t,0,function(){return n._inner_loop(t,i,s,l,t.fill)},function(){return n.renderer.request_render()}),this.visuals.line.doit&&(this.visuals.line.set_value(t),this._inner_loop(t,i,s,l,t.stroke))},i.prototype.draw_legend_for_index=function(t,i,e){l.generic_area_legend(this.visuals,t,i,e)},i.prototype._hit_point=function(t){var i=this,e=o.create_empty_hit_test_result();return o.point_in_poly(t.sx,t.sy,this.sx,this.sy)&&(e.add_to_selected_glyphs(this.model),e.get_view=function(){return i}),e},i}(s.XYGlyphView);e.PatchView=r,r.__name__=\"PatchView\";var _=function(t){function i(i){return t.call(this,i)||this}return n.__extends(i,t),i.init_Patch=function(){this.prototype.default_view=r,this.mixins([\"line\",\"fill\",\"hatch\"])},i}(s.XYGlyph);e.Patch=_,_.__name__=\"Patch\",_.init_Patch()},\n", | |
" function _(t,e,i){var n=t(113),r=t(189),s=t(179),o=t(183),a=t(121),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._index_data=function(){for(var t=[],e=0,i=this._x1.length;e<i;e++){var n=this._x1[e],r=this._x2[e],o=this._y[e];!isNaN(n+r+o)&&isFinite(n+r+o)&&t.push({x0:Math.min(n,r),y0:o,x1:Math.max(n,r),y1:o,i:e})}return new s.SpatialIndex(t)},e.prototype._inner=function(t,e,i,n,r){t.beginPath();for(var s=0,o=e.length;s<o;s++)t.lineTo(e[s],n[s]);for(s=i.length-1;s>=0;s--)t.lineTo(i[s],n[s]);t.closePath(),r.call(t)},e.prototype._render=function(t,e,i){var n=this,r=i.sx1,s=i.sx2,o=i.sy;this.visuals.fill.doit&&(this.visuals.fill.set_value(t),this._inner(t,r,s,o,t.fill)),this.visuals.hatch.doit2(t,0,function(){return n._inner(t,r,s,o,t.fill)},function(){return n.renderer.request_render()})},e.prototype._hit_point=function(t){for(var e=this,i=o.create_empty_hit_test_result(),n=this.sy.length,r=new Float64Array(2*n),s=new Float64Array(2*n),a=0,h=n;a<h;a++)r[a]=this.sx1[a],s[a]=this.sy[a],r[n+a]=this.sx2[n-a-1],s[n+a]=this.sy[n-a-1];return o.point_in_poly(t.sx,t.sy,r,s)&&(i.add_to_selected_glyphs(this.model),i.get_view=function(){return e}),i},e.prototype.scenterx=function(t){return(this.sx1[t]+this.sx2[t])/2},e.prototype.scentery=function(t){return this.sy[t]},e.prototype._map_data=function(){this.sx1=this.renderer.xscale.v_compute(this._x1),this.sx2=this.renderer.xscale.v_compute(this._x2),this.sy=this.renderer.yscale.v_compute(this._y)},e}(r.AreaView);i.HAreaView=h,h.__name__=\"HAreaView\";var _=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_HArea=function(){this.prototype.default_view=h,this.define({x1:[a.CoordinateSpec],x2:[a.CoordinateSpec],y:[a.CoordinateSpec]})},e}(r.Area);i.HArea=_,_.__name__=\"HArea\",_.init_HArea()},\n", | |
" function _(n,e,i){var t=n(113),r=n(182),_=n(186),a=function(n){function e(){return null!==n&&n.apply(this,arguments)||this}return t.__extends(e,n),e.prototype.draw_legend_for_index=function(n,e,i){_.generic_area_legend(this.visuals,n,e,i)},e}(r.GlyphView);i.AreaView=a,a.__name__=\"AreaView\";var u=function(n){function e(e){return n.call(this,e)||this}return t.__extends(e,n),e.init_Area=function(){this.mixins([\"fill\",\"hatch\"])},e}(r.Glyph);i.Area=u,u.__name__=\"Area\",u.init_Area()},\n", | |
" function _(t,e,i){var n=t(113),r=t(189),s=t(179),o=t(183),a=t(121),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._index_data=function(){for(var t=[],e=0,i=this._x.length;e<i;e++){var n=this._x[e],r=this._y1[e],o=this._y2[e];!isNaN(n+r+o)&&isFinite(n+r+o)&&t.push({x0:n,y0:Math.min(r,o),x1:n,y1:Math.max(r,o),i:e})}return new s.SpatialIndex(t)},e.prototype._inner=function(t,e,i,n,r){t.beginPath();for(var s=0,o=i.length;s<o;s++)t.lineTo(e[s],i[s]);for(s=n.length-1;s>=0;s--)t.lineTo(e[s],n[s]);t.closePath(),r.call(t)},e.prototype._render=function(t,e,i){var n=this,r=i.sx,s=i.sy1,o=i.sy2;this.visuals.fill.doit&&(this.visuals.fill.set_value(t),this._inner(t,r,s,o,t.fill)),this.visuals.hatch.doit2(t,0,function(){return n._inner(t,r,s,o,t.fill)},function(){return n.renderer.request_render()})},e.prototype.scenterx=function(t){return this.sx[t]},e.prototype.scentery=function(t){return(this.sy1[t]+this.sy2[t])/2},e.prototype._hit_point=function(t){for(var e=this,i=o.create_empty_hit_test_result(),n=this.sx.length,r=new Float64Array(2*n),s=new Float64Array(2*n),a=0,h=n;a<h;a++)r[a]=this.sx[a],s[a]=this.sy1[a],r[n+a]=this.sx[n-a-1],s[n+a]=this.sy2[n-a-1];return o.point_in_poly(t.sx,t.sy,r,s)&&(i.add_to_selected_glyphs(this.model),i.get_view=function(){return e}),i},e.prototype._map_data=function(){this.sx=this.renderer.xscale.v_compute(this._x),this.sy1=this.renderer.yscale.v_compute(this._y1),this.sy2=this.renderer.yscale.v_compute(this._y2)},e}(r.AreaView);i.VAreaView=h,h.__name__=\"VAreaView\";var _=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_VArea=function(){this.prototype.default_view=h,this.define({x:[a.CoordinateSpec],y1:[a.CoordinateSpec],y2:[a.CoordinateSpec]})},e}(r.Area);i.VArea=_,_.__name__=\"VArea\",_.init_VArea()},\n", | |
" function _(i,n,t){var e=i(113),c=i(166),s=i(121),o=i(173),r=i(110),u=i(171),a=function(i){function n(n){return i.call(this,n)||this}return e.__extends(n,i),n.init_CDSView=function(){this.define({filters:[s.Array,[]],source:[s.Instance]}),this.internal({indices:[s.Array,[]],indices_map:[s.Any,{}]})},n.prototype.initialize=function(){i.prototype.initialize.call(this),this.compute_indices()},n.prototype.connect_signals=function(){var n=this;i.prototype.connect_signals.call(this),this.connect(this.properties.filters.change,function(){n.compute_indices(),n.change.emit()});var t=function(){var i=function(){return n.compute_indices()};null!=n.source&&(n.connect(n.source.change,i),n.source instanceof u.ColumnarDataSource&&(n.connect(n.source.streaming,i),n.connect(n.source.patching,i)))},e=null!=this.source;e?t():this.connect(this.properties.source.change,function(){e||(t(),e=!0)})},n.prototype.compute_indices=function(){var i=this,n=this.filters.map(function(n){return n.compute_indices(i.source)}).filter(function(i){return null!=i});n.length>0?this.indices=r.intersection.apply(this,n):this.source instanceof u.ColumnarDataSource&&(this.indices=this.source.get_indices()),this.indices_map_to_subset()},n.prototype.indices_map_to_subset=function(){this.indices_map={};for(var i=0;i<this.indices.length;i++)this.indices_map[this.indices[i]]=i},n.prototype.convert_selection_from_subset=function(i){var n=this,t=new o.Selection;t.update_through_union(i);var e=i.indices.map(function(i){return n.indices[i]});return t.indices=e,t.image_indices=i.image_indices,t},n.prototype.convert_selection_to_subset=function(i){var n=this,t=new o.Selection;t.update_through_union(i);var e=i.indices.map(function(i){return n.indices_map[i]});return t.indices=e,t.image_indices=i.image_indices,t},n.prototype.convert_indices_from_subset=function(i){var n=this;return i.map(function(i){return n.indices[i]})},n}(c.Model);t.CDSView=a,a.__name__=\"CDSView\",a.init_CDSView()},\n", | |
" function _(e,t,n){var r=e(113),i=e(176),a=e(193),o=e(121),s=e(194),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),this.xscale=this.plot_view.frame.xscales.default,this.yscale=this.plot_view.frame.yscales.default,this._renderer_views={},t=s.build_views(this._renderer_views,[this.model.node_renderer,this.model.edge_renderer],{parent:this.parent}),this.node_view=t[0],this.edge_view=t[1],this.set_data()},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.layout_provider.change,function(){return t.set_data()}),this.connect(this.model.node_renderer.data_source._select,function(){return t.set_data()}),this.connect(this.model.node_renderer.data_source.inspect,function(){return t.set_data()}),this.connect(this.model.node_renderer.data_source.change,function(){return t.set_data()}),this.connect(this.model.edge_renderer.data_source._select,function(){return t.set_data()}),this.connect(this.model.edge_renderer.data_source.inspect,function(){return t.set_data()}),this.connect(this.model.edge_renderer.data_source.change,function(){return t.set_data()});var n=this.plot_view.frame,r=n.x_ranges,i=n.y_ranges;for(var a in r){var o=r[a];this.connect(o.change,function(){return t.set_data()})}for(var a in i){o=i[a];this.connect(o.change,function(){return t.set_data()})}},t.prototype.set_data=function(e){var t,n;void 0===e&&(e=!0),this.node_view.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0}),this.edge_view.glyph.model.setv({x_range_name:this.model.x_range_name,y_range_name:this.model.y_range_name},{silent:!0});var r=this.node_view.glyph;t=this.model.layout_provider.get_node_coordinates(this.model.node_renderer.data_source),r._x=t[0],r._y=t[1];var i=this.edge_view.glyph;n=this.model.layout_provider.get_edge_coordinates(this.model.edge_renderer.data_source),i._xs=n[0],i._ys=n[1],r.index_data(),i.index_data(),e&&this.request_render()},t.prototype.render=function(){this.edge_view.render(),this.node_view.render()},t}(i.DataRendererView);n.GraphRendererView=d,d.__name__=\"GraphRendererView\";var _=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.init_GraphRenderer=function(){this.prototype.default_view=d,this.define({layout_provider:[o.Instance],node_renderer:[o.Instance],edge_renderer:[o.Instance],selection_policy:[o.Instance,function(){return new a.NodesOnly}],inspection_policy:[o.Instance,function(){return new a.NodesOnly}]})},t.prototype.get_selection_manager=function(){return this.node_renderer.data_source.selection_manager},t}(i.DataRenderer);n.GraphRenderer=_,_.__name__=\"GraphRenderer\",_.init_GraphRenderer()},\n", | |
" function _(e,t,n){var r=e(113),d=e(166),o=e(114),i=e(110),_=e(183),s=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype._hit_test_nodes=function(e,t){if(!t.model.visible)return null;var n=t.node_view.glyph.hit_test(e);return null==n?null:t.node_view.model.view.convert_selection_from_subset(n)},t.prototype._hit_test_edges=function(e,t){if(!t.model.visible)return null;var n=t.edge_view.glyph.hit_test(e);return null==n?null:t.edge_view.model.view.convert_selection_from_subset(n)},t}(d.Model);n.GraphHitTestPolicy=s,s.__name__=\"GraphHitTestPolicy\";var a=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.hit_test=function(e,t){return this._hit_test_nodes(e,t)},t.prototype.do_selection=function(e,t,n,r){if(null==e)return!1;var d=t.node_renderer.data_source.selected;return d.update(e,n,r),t.node_renderer.data_source._select.emit(),!d.is_empty()},t.prototype.do_inspection=function(e,t,n,r,d){if(null==e)return!1;var o=n.model.get_selection_manager().get_or_create_inspector(n.node_view.model);return o.update(e,r,d),n.node_view.model.data_source.setv({inspected:o},{silent:!0}),n.node_view.model.data_source.inspect.emit([n.node_view,{geometry:t}]),!o.is_empty()},t}(s);n.NodesOnly=a,a.__name__=\"NodesOnly\";var c=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.hit_test=function(e,t){return this._hit_test_nodes(e,t)},t.prototype.get_linked_edges=function(e,t,n){var r=[];\"selection\"==n?r=e.selected.indices.map(function(t){return e.data.index[t]}):\"inspection\"==n&&(r=e.inspected.indices.map(function(t){return e.data.index[t]}));for(var d=[],o=0;o<t.data.start.length;o++)(i.contains(r,t.data.start[o])||i.contains(r,t.data.end[o]))&&d.push(o);for(var s=_.create_empty_hit_test_result(),a=0,c=d;a<c.length;a++){o=c[a];s.multiline_indices[o]=[0]}return s.indices=d,s},t.prototype.do_selection=function(e,t,n,r){if(null==e)return!1;var d=t.node_renderer.data_source.selected;d.update(e,n,r);var o=t.edge_renderer.data_source.selected,i=this.get_linked_edges(t.node_renderer.data_source,t.edge_renderer.data_source,\"selection\");return o.update(i,n,r),t.node_renderer.data_source._select.emit(),!d.is_empty()},t.prototype.do_inspection=function(e,t,n,r,d){if(null==e)return!1;var o=n.node_view.model.data_source.selection_manager.get_or_create_inspector(n.node_view.model);o.update(e,r,d),n.node_view.model.data_source.setv({inspected:o},{silent:!0});var i=n.edge_view.model.data_source.selection_manager.get_or_create_inspector(n.edge_view.model),_=this.get_linked_edges(n.node_view.model.data_source,n.edge_view.model.data_source,\"inspection\");return i.update(_,r,d),n.edge_view.model.data_source.setv({inspected:i},{silent:!0}),n.node_view.model.data_source.inspect.emit([n.node_view,{geometry:t}]),!o.is_empty()},t}(s);n.NodesAndLinkedEdges=c,c.__name__=\"NodesAndLinkedEdges\";var u=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.prototype.hit_test=function(e,t){return this._hit_test_edges(e,t)},t.prototype.get_linked_nodes=function(e,t,n){var r=[];\"selection\"==n?r=t.selected.indices:\"inspection\"==n&&(r=t.inspected.indices);for(var d=[],s=0,a=r;s<a.length;s++){var c=a[s];d.push(t.data.start[c]),d.push(t.data.end[c])}var u=i.uniq(d).map(function(t){return o.indexOf(e.data.index,t)}),l=_.create_empty_hit_test_result();return l.indices=u,l},t.prototype.do_selection=function(e,t,n,r){if(null==e)return!1;var d=t.edge_renderer.data_source.selected;d.update(e,n,r);var o=t.node_renderer.data_source.selected,i=this.get_linked_nodes(t.node_renderer.data_source,t.edge_renderer.data_source,\"selection\");return o.update(i,n,r),t.edge_renderer.data_source._select.emit(),!d.is_empty()},t.prototype.do_inspection=function(e,t,n,r,d){if(null==e)return!1;var o=n.edge_view.model.data_source.selection_manager.get_or_create_inspector(n.edge_view.model);o.update(e,r,d),n.edge_view.model.data_source.setv({inspected:o},{silent:!0});var i=n.node_view.model.data_source.selection_manager.get_or_create_inspector(n.node_view.model),_=this.get_linked_nodes(n.node_view.model.data_source,n.edge_view.model.data_source,\"inspection\");return i.update(_,r,d),n.node_view.model.data_source.setv({inspected:i},{silent:!0}),n.edge_view.model.data_source.inspect.emit([n.edge_view,{geometry:t}]),!o.is_empty()},t}(s);n.EdgesAndLinkedNodes=u,u.__name__=\"EdgesAndLinkedNodes\"},\n", | |
" function _(e,n,r){var t=e(110);r.build_views=function(e,n,r,i){void 0===i&&(i=function(e){return e.default_view});for(var o=0,c=t.difference(Object.keys(e),n.map(function(e){return e.id}));o<c.length;o++){var f=c[o];e[f].remove(),delete e[f]}for(var u=[],v=0,a=n.filter(function(n){return null==e[n.id]});v<a.length;v++){var l=a[v],s=new(i(l))(Object.assign(Object.assign({},r),{model:l,connect_signals:!1}));e[l.id]=s,u.push(s)}for(var d=0,g=u;d<g.length;d++)(s=g[d]).connect_signals();return u},r.remove_views=function(e){for(var n in e)e[n].remove(),delete e[n]}},\n", | |
" function _(t,e,n){var r=t(113),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.do_selection=function(t,e,n,r){return null!==t&&(e.selected.update(t,n,r),e._select.emit(),!e.selected.is_empty())},e}(t(166).Model);n.SelectionPolicy=u,u.__name__=\"SelectionPolicy\";var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.hit_test=function(t,e){for(var n=[],r=0,u=e;r<u.length;r++){var i=u[r].hit_test(t);null!==i&&n.push(i)}if(n.length>0){for(var l=n[0],o=0,_=n;o<_.length;o++){var s=_[o];l.update_through_intersection(s)}return l}return null},e}(u);n.IntersectRenderers=i,i.__name__=\"IntersectRenderers\";var l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype.hit_test=function(t,e){for(var n=[],r=0,u=e;r<u.length;r++){var i=u[r].hit_test(t);null!==i&&n.push(i)}if(n.length>0){for(var l=n[0],o=0,_=n;o<_.length;o++){var s=_[o];l.update_through_union(s)}return l}return null},e}(u);n.UnionRenderers=l,l.__name__=\"UnionRenderers\"},\n", | |
" function _(r,n,t){var a=r(109),e=r(197);function i(r){for(var n=new Uint8Array(r.buffer,r.byteOffset,2*r.length),t=0,a=n.length;t<a;t+=2){var e=n[t];n[t]=n[t+1],n[t+1]=e}}function o(r){for(var n=new Uint8Array(r.buffer,r.byteOffset,4*r.length),t=0,a=n.length;t<a;t+=4){var e=n[t];n[t]=n[t+3],n[t+3]=e,e=n[t+1],n[t+1]=n[t+2],n[t+2]=e}}function f(r){for(var n=new Uint8Array(r.buffer,r.byteOffset,8*r.length),t=0,a=n.length;t<a;t+=8){var e=n[t];n[t]=n[t+7],n[t+7]=e,e=n[t+1],n[t+1]=n[t+6],n[t+6]=e,e=n[t+2],n[t+2]=n[t+5],n[t+5]=e,e=n[t+3],n[t+3]=n[t+4],n[t+4]=e}}function u(r,n){for(var a=r.order!==t.BYTE_ORDER,e=r.shape,u=null,y=0,s=n;y<s.length;y++){var A=s[y];if(JSON.parse(A[0]).id===r.__buffer__){u=A[1];break}}var c=new t.ARRAY_TYPES[r.dtype](u);return a&&(2===c.BYTES_PER_ELEMENT?i(c):4===c.BYTES_PER_ELEMENT?o(c):8===c.BYTES_PER_ELEMENT&&f(c)),[c,e]}function y(r,n){return a.isObject(r)&&\"__ndarray__\"in r?c(r):a.isObject(r)&&\"__buffer__\"in r?u(r,n):a.isArray(r)||a.isTypedArray(r)?[r,[]]:void 0}function s(r){var n=new Uint8Array(r),t=Array.from(n).map(function(r){return String.fromCharCode(r)});return btoa(t.join(\"\"))}function A(r){for(var n=atob(r),t=n.length,a=new Uint8Array(t),e=0,i=t;e<i;e++)a[e]=n.charCodeAt(e);return a.buffer}function c(r){var n=A(r.__ndarray__),a=r.dtype,e=r.shape;if(!(a in t.ARRAY_TYPES))throw new Error(\"unknown dtype: \"+a);return[new t.ARRAY_TYPES[a](n),e]}function _(r,n){var a=s(r.buffer),e=function(r){if(\"name\"in r.constructor)return r.constructor.name;switch(!0){case r instanceof Uint8Array:return\"Uint8Array\";case r instanceof Int8Array:return\"Int8Array\";case r instanceof Uint16Array:return\"Uint16Array\";case r instanceof Int16Array:return\"Int16Array\";case r instanceof Uint32Array:return\"Uint32Array\";case r instanceof Int32Array:return\"Int32Array\";case r instanceof Float32Array:return\"Float32Array\";case r instanceof Float64Array:return\"Float64Array\";default:throw new Error(\"unsupported typed array\")}}(r);if(!(e in t.DTYPES))throw new Error(\"unknown array type: \"+e);return{__ndarray__:a,shape:n,dtype:t.DTYPES[e]}}function l(r,n){if(0==r.length||!a.isObject(r[0])&&!a.isArray(r[0]))return[r,[]];for(var t=[],e=[],i=0,o=r;i<o.length;i++){var f=o[i],u=a.isArray(f)?l(f,n):y(f,n),s=u[0],A=u[1];t.push(s),e.push(A)}return[t,e.map(function(r){return r.filter(function(r){return 0!=r.length})})]}function v(r,n){for(var t=[],e=0,i=r.length;e<i;e++){var o=r[e];if(a.isTypedArray(o)){var f=n[e]?n[e]:void 0;t.push(_(o,f))}else a.isArray(o)?t.push(v(o,n?n[e]:[])):t.push(o)}return t}t.ARRAY_TYPES={uint8:Uint8Array,int8:Int8Array,uint16:Uint16Array,int16:Int16Array,uint32:Uint32Array,int32:Int32Array,float32:Float32Array,float64:Float64Array},t.DTYPES={Uint8Array:\"uint8\",Int8Array:\"int8\",Uint16Array:\"uint16\",Int16Array:\"int16\",Uint32Array:\"uint32\",Int32Array:\"int32\",Float32Array:\"float32\",Float64Array:\"float64\"},t.BYTE_ORDER=e.is_little_endian?\"little\":\"big\",t.swap16=i,t.swap32=o,t.swap64=f,t.process_buffer=u,t.process_array=y,t.arrayBufferToBase64=s,t.base64ToArrayBuffer=A,t.decode_base64=c,t.encode_base64=_,t.decode_column_data=function(r,n){void 0===n&&(n=[]);var t={},e={};for(var i in r){var o=r[i];if(a.isArray(o)){if(0==o.length||!a.isObject(o[0])&&!a.isArray(o[0])){t[i]=o;continue}var f=l(o,n),u=f[0],s=f[1];t[i]=u,e[i]=s}else{var A=y(o,n),c=A[0],_=A[1];t[i]=c,e[i]=_}}return[t,e]},t.encode_column_data=function(r,n){var t={};for(var e in r){var i=r[e],o=null!=n?n[e]:void 0,f=void 0;f=a.isTypedArray(i)?_(i,o):a.isArray(i)?v(i,o||[]):i,t[e]=f}return t}},\n", | |
" function _(n,i,e){var r;e.is_ie=(r=\"undefined\"!=typeof navigator?navigator.userAgent:\"\").indexOf(\"MSIE\")>=0||r.indexOf(\"Trident\")>0||r.indexOf(\"Edge\")>0,e.is_mobile=\"undefined\"!=typeof window&&(\"ontouchstart\"in window||navigator.maxTouchPoints>0),e.is_little_endian=function(){var n=new ArrayBuffer(4),i=new Uint8Array(n);new Uint32Array(n)[1]=168496141;var e=!0;return 10==i[4]&&11==i[5]&&12==i[6]&&13==i[7]&&(e=!1),e}()},\n", | |
" function _(n,t,r){r.concat=function(n){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var e=n.length,o=0,g=t;o<g.length;o++)e+=(f=g[o]).length;var h=new n.constructor(e);h.set(n,0);for(var l=n.length,a=0,c=t;a<c.length;a++){var f=c[a];h.set(f,l),l+=f.length}return h}},\n", | |
" function _(t,e,n){var o=t(113),r=t(115),i=function(){return function(t){this.document=t}}();n.DocumentChangedEvent=i,i.__name__=\"DocumentChangedEvent\";var s=function(t){function e(e,n,o,r,i,s,d){var u=t.call(this,e)||this;return u.model=n,u.attr=o,u.old=r,u.new_=i,u.setter_id=s,u.hint=d,u}return o.__extends(e,t),e.prototype.json=function(t){if(\"id\"===this.attr)throw new Error(\"'id' field should never change, whatever code just set it is wrong\");if(null!=this.hint)return this.hint.json(t);var e=this.new_,n=r.HasProps._value_to_json(this.attr,e,this.model),o={};for(var i in r.HasProps._value_record_references(e,o,!0),this.model.id in o&&this.model!==e&&delete o[this.model.id],o)t[i]=o[i];return{kind:\"ModelChanged\",model:this.model.ref(),attr:this.attr,new:n}},e}(i);n.ModelChangedEvent=s,s.__name__=\"ModelChangedEvent\";var d=function(t){function e(e,n,o){var r=t.call(this,e)||this;return r.column_source=n,r.patches=o,r}return o.__extends(e,t),e.prototype.json=function(t){return{kind:\"ColumnsPatched\",column_source:this.column_source,patches:this.patches}},e}(i);n.ColumnsPatchedEvent=d,d.__name__=\"ColumnsPatchedEvent\";var u=function(t){function e(e,n,o,r){var i=t.call(this,e)||this;return i.column_source=n,i.data=o,i.rollover=r,i}return o.__extends(e,t),e.prototype.json=function(t){return{kind:\"ColumnsStreamed\",column_source:this.column_source,data:this.data,rollover:this.rollover}},e}(i);n.ColumnsStreamedEvent=u,u.__name__=\"ColumnsStreamedEvent\";var a=function(t){function e(e,n,o){var r=t.call(this,e)||this;return r.title=n,r.setter_id=o,r}return o.__extends(e,t),e.prototype.json=function(t){return{kind:\"TitleChanged\",title:this.title}},e}(i);n.TitleChangedEvent=a,a.__name__=\"TitleChangedEvent\";var l=function(t){function e(e,n,o){var r=t.call(this,e)||this;return r.model=n,r.setter_id=o,r}return o.__extends(e,t),e.prototype.json=function(t){return r.HasProps._value_record_references(this.model,t,!0),{kind:\"RootAdded\",model:this.model.ref()}},e}(i);n.RootAddedEvent=l,l.__name__=\"RootAddedEvent\";var _=function(t){function e(e,n,o){var r=t.call(this,e)||this;return r.model=n,r.setter_id=o,r}return o.__extends(e,t),e.prototype.json=function(t){return{kind:\"RootRemoved\",model:this.model.ref()}},e}(i);n.RootRemovedEvent=_,_.__name__=\"RootRemovedEvent\"},\n", | |
" function _(e,t,i){var s=e(113),n=e(131),o=e(170),_=e(121),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this.set_data(this.model.source)},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return t.set_data(t.model.source)}),this.connect(this.model.source.patching,function(){return t.set_data(t.model.source)}),this.connect(this.model.source.change,function(){return t.set_data(t.model.source)})},t.prototype.set_data=function(t){e.prototype.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},t.prototype._map_data=function(){var e,t,i,s=this.plot_view.frame,n=this.model.dimension,o=s.xscales[this.model.x_range_name],_=s.yscales[this.model.y_range_name],r=\"height\"==n?_:o,a=\"height\"==n?o:_,l=\"height\"==n?s.yview:s.xview,h=\"height\"==n?s.xview:s.yview;e=\"data\"==this.model.properties.lower.units?r.v_compute(this._lower):l.v_compute(this._lower),t=\"data\"==this.model.properties.upper.units?r.v_compute(this._upper):l.v_compute(this._upper),i=\"data\"==this.model.properties.base.units?a.v_compute(this._base):h.v_compute(this._base);var p=\"height\"==n?[1,0]:[0,1],u=p[0],c=p[1],d=[e,i],m=[t,i];this._lower_sx=d[u],this._lower_sy=d[c],this._upper_sx=m[u],this._upper_sy=m[c]},t.prototype.render=function(){if(this.model.visible){this._map_data();var e=this.plot_view.canvas_view.ctx;e.beginPath(),e.moveTo(this._lower_sx[0],this._lower_sy[0]);for(var t=0,i=this._lower_sx.length;t<i;t++)e.lineTo(this._lower_sx[t],this._lower_sy[t]);for(t=this._upper_sx.length-1;t>=0;t--)e.lineTo(this._upper_sx[t],this._upper_sy[t]);e.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_value(e),e.fill()),e.beginPath(),e.moveTo(this._lower_sx[0],this._lower_sy[0]);for(t=0,i=this._lower_sx.length;t<i;t++)e.lineTo(this._lower_sx[t],this._lower_sy[t]);this.visuals.line.doit&&(this.visuals.line.set_value(e),e.stroke()),e.beginPath(),e.moveTo(this._upper_sx[0],this._upper_sy[0]);for(t=0,i=this._upper_sx.length;t<i;t++)e.lineTo(this._upper_sx[t],this._upper_sy[t]);this.visuals.line.doit&&(this.visuals.line.set_value(e),e.stroke())}},t}(n.AnnotationView);i.BandView=r,r.__name__=\"BandView\";var a=function(e){function t(t){return e.call(this,t)||this}return s.__extends(t,e),t.init_Band=function(){this.prototype.default_view=r,this.mixins([\"line\",\"fill\"]),this.define({lower:[_.DistanceSpec],upper:[_.DistanceSpec],base:[_.DistanceSpec],dimension:[_.Dimension,\"height\"],source:[_.Instance,function(){return new o.ColumnDataSource}],x_range_name:[_.String,\"default\"],y_range_name:[_.String,\"default\"]}),this.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3})},t}(n.Annotation);i.Band=a,a.__name__=\"Band\",a.init_Band()},\n", | |
" function _(t,i,e){var s=t(113),o=t(131),n=t(116),l=t(163),r=t(121),a=t(181),h=t(202);e.EDGE_TOLERANCE=2.5;var u=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(i,t),i.prototype.initialize=function(){t.prototype.initialize.call(this),this.plot_view.canvas_overlays.appendChild(this.el),this.el.classList.add(h.bk_shading),l.undisplay(this.el)},i.prototype.connect_signals=function(){var i=this;t.prototype.connect_signals.call(this),\"css\"==this.model.render_mode?(this.connect(this.model.change,function(){return i.render()}),this.connect(this.model.data_update,function(){return i.render()})):(this.connect(this.model.change,function(){return i.plot_view.request_render()}),this.connect(this.model.data_update,function(){return i.plot_view.request_render()}))},i.prototype.render=function(){var t=this;if(this.model.visible||\"css\"!=this.model.render_mode||l.undisplay(this.el),this.model.visible)if(null!=this.model.left||null!=this.model.right||null!=this.model.top||null!=this.model.bottom){var i=this.plot_view.frame,e=i.xscales[this.model.x_range_name],s=i.yscales[this.model.y_range_name],o=function(i,e,s,o,n){return null!=i?t.model.screen?i:\"data\"==e?s.compute(i):o.compute(i):n};this.sleft=o(this.model.left,this.model.left_units,e,i.xview,i._left.value),this.sright=o(this.model.right,this.model.right_units,e,i.xview,i._right.value),this.stop=o(this.model.top,this.model.top_units,s,i.yview,i._top.value),this.sbottom=o(this.model.bottom,this.model.bottom_units,s,i.yview,i._bottom.value),(\"css\"==this.model.render_mode?this._css_box.bind(this):this._canvas_box.bind(this))(this.sleft,this.sright,this.sbottom,this.stop)}else l.undisplay(this.el)},i.prototype._css_box=function(t,i,e,s){var o=this.model.properties.line_width.value(),n=Math.floor(i-t)-o,r=Math.floor(e-s)-o;this.el.style.left=t+\"px\",this.el.style.width=n+\"px\",this.el.style.top=s+\"px\",this.el.style.height=r+\"px\",this.el.style.borderWidth=o+\"px\",this.el.style.borderColor=this.model.properties.line_color.value(),this.el.style.backgroundColor=this.model.properties.fill_color.value(),this.el.style.opacity=this.model.properties.fill_alpha.value();var a=this.model.properties.line_dash.value().length<2?\"solid\":\"dashed\";this.el.style.borderStyle=a,l.display(this.el)},i.prototype._canvas_box=function(t,i,e,s){var o=this.plot_view.canvas_view.ctx;o.save(),o.beginPath(),o.rect(t,s,i-t,e-s),this.visuals.fill.set_value(o),o.fill(),this.visuals.line.set_value(o),o.stroke(),o.restore()},i.prototype.interactive_bbox=function(){var t=this.model.properties.line_width.value()+e.EDGE_TOLERANCE;return new a.BBox({x0:this.sleft-t,y0:this.stop-t,x1:this.sright+t,y1:this.sbottom+t})},i.prototype.interactive_hit=function(t,i){return null!=this.model.in_cursor&&this.interactive_bbox().contains(t,i)},i.prototype.cursor=function(t,i){return Math.abs(t-this.sleft)<3||Math.abs(t-this.sright)<3?this.model.ew_cursor:Math.abs(i-this.sbottom)<3||Math.abs(i-this.stop)<3?this.model.ns_cursor:t>this.sleft&&t<this.sright&&i>this.stop&&i<this.sbottom?this.model.in_cursor:null},i}(o.AnnotationView);e.BoxAnnotationView=u,u.__name__=\"BoxAnnotationView\";var d=function(t){function i(i){return t.call(this,i)||this}return s.__extends(i,t),i.init_BoxAnnotation=function(){this.prototype.default_view=u,this.mixins([\"line\",\"fill\"]),this.define({render_mode:[r.RenderMode,\"canvas\"],x_range_name:[r.String,\"default\"],y_range_name:[r.String,\"default\"],top:[r.Number,null],top_units:[r.SpatialUnits,\"data\"],bottom:[r.Number,null],bottom_units:[r.SpatialUnits,\"data\"],left:[r.Number,null],left_units:[r.SpatialUnits,\"data\"],right:[r.Number,null],right_units:[r.SpatialUnits,\"data\"]}),this.internal({screen:[r.Boolean,!1],ew_cursor:[r.String,null],ns_cursor:[r.String,null],in_cursor:[r.String,null]}),this.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3})},i.prototype.initialize=function(){t.prototype.initialize.call(this),this.data_update=new n.Signal0(this,\"data_update\")},i.prototype.update=function(t){var i=t.left,e=t.right,s=t.top,o=t.bottom;this.setv({left:i,right:e,top:s,bottom:o,screen:!0},{silent:!0}),this.data_update.emit()},i}(o.Annotation);e.BoxAnnotation=d,d.__name__=\"BoxAnnotation\",d.init_BoxAnnotation()},\n", | |
" function _(n,o,a){n(164),n(163).styles.append(\".bk-root .bk-shading {\\n position: absolute;\\n display: block;\\n border: 1px dashed green;\\n}\\n\"),a.bk_annotation=\"bk-annotation\",a.bk_shading=\"bk-shading\",a.bk_annotation_child=\"bk-annotation-child\"},\n", | |
" function _(t,e,i){var o=t(113),r=t(131),a=t(204),n=t(208),l=t(210),s=t(215),_=t(224),h=t(225),m=t(121),d=t(226),c=t(110),u=t(114),p=t(125),f=t(109),g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this._set_canvas_image()},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.visible.change,function(){return e.plot_view.request_render()}),this.connect(this.model.ticker.change,function(){return e.plot_view.request_render()}),this.connect(this.model.formatter.change,function(){return e.plot_view.request_render()}),null!=this.model.color_mapper&&this.connect(this.model.color_mapper.change,function(){e._set_canvas_image(),e.plot_view.request_render()})},e.prototype._get_size=function(){if(null==this.model.color_mapper)return{width:0,height:0};var t=this.compute_legend_dimensions();return{width:t.width,height:t.height}},e.prototype._set_canvas_image=function(){var t,e;if(null!=this.model.color_mapper){var i,o,r=this.model.color_mapper.palette;switch(\"vertical\"==this.model.orientation&&(r=c.reversed(r)),this.model.orientation){case\"vertical\":i=(t=[1,r.length])[0],o=t[1];break;case\"horizontal\":i=(e=[r.length,1])[0],o=e[1];break;default:throw new Error(\"unreachable code\")}var a=document.createElement(\"canvas\");a.width=i,a.height=o;var n=a.getContext(\"2d\"),s=n.getImageData(0,0,i,o),_=new l.LinearColorMapper({palette:r}).rgba_mapper.v_compute(c.range(0,r.length));s.data.set(_),n.putImageData(s,0,0),this.image=a}},e.prototype.compute_legend_dimensions=function(){var t,e,i=this._computed_image_dimensions(),o=[i.height,i.width],r=o[0],a=o[1],n=this._get_label_extent(),l=this._title_extent(),s=this._tick_extent(),_=this.model.padding;switch(this.model.orientation){case\"vertical\":t=r+l+2*_,e=a+s+n+2*_;break;case\"horizontal\":t=r+l+s+n+2*_,e=a+2*_;break;default:throw new Error(\"unreachable code\")}return{width:e,height:t}},e.prototype.compute_legend_location=function(){var t,e,i=this.compute_legend_dimensions(),o=[i.height,i.width],r=o[0],a=o[1],n=this.model.margin,l=null!=this.panel?this.panel:this.plot_view.frame,s=l.bbox.ranges,_=s[0],h=s[1],m=this.model.location;if(f.isString(m))switch(m){case\"top_left\":t=_.start+n,e=h.start+n;break;case\"top_center\":t=(_.end+_.start)/2-a/2,e=h.start+n;break;case\"top_right\":t=_.end-n-a,e=h.start+n;break;case\"bottom_right\":t=_.end-n-a,e=h.end-n-r;break;case\"bottom_center\":t=(_.end+_.start)/2-a/2,e=h.end-n-r;break;case\"bottom_left\":t=_.start+n,e=h.end-n-r;break;case\"center_left\":t=_.start+n,e=(h.end+h.start)/2-r/2;break;case\"center\":t=(_.end+_.start)/2-a/2,e=(h.end+h.start)/2-r/2;break;case\"center_right\":t=_.end-n-a,e=(h.end+h.start)/2-r/2;break;default:throw new Error(\"unreachable code\")}else{if(!f.isArray(m)||2!=m.length)throw new Error(\"unreachable code\");var d=m[0],c=m[1];t=l.xview.compute(d),e=l.yview.compute(c)-r}return{sx:t,sy:e}},e.prototype.render=function(){if(this.model.visible&&null!=this.model.color_mapper){var t=this.plot_view.canvas_view.ctx;t.save();var e=this.compute_legend_location(),i=e.sx,o=e.sy;t.translate(i,o),this._draw_bbox(t);var r=this._get_image_offset();if(t.translate(r.x,r.y),this._draw_image(t),null!=this.model.color_mapper.low&&null!=this.model.color_mapper.high){var a=this.tick_info();this._draw_major_ticks(t,a),this._draw_minor_ticks(t,a),this._draw_major_labels(t,a)}this.model.title&&this._draw_title(t),t.restore()}},e.prototype._draw_bbox=function(t){var e=this.compute_legend_dimensions();t.save(),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fillRect(0,0,e.width,e.height)),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.strokeRect(0,0,e.width,e.height)),t.restore()},e.prototype._draw_image=function(t){var e=this._computed_image_dimensions();t.save(),t.setImageSmoothingEnabled(!1),t.globalAlpha=this.model.scale_alpha,t.drawImage(this.image,0,0,e.width,e.height),this.visuals.bar_line.doit&&(this.visuals.bar_line.set_value(t),t.strokeRect(0,0,e.width,e.height)),t.restore()},e.prototype._draw_major_ticks=function(t,e){if(this.visuals.major_tick_line.doit){var i=this._normals(),o=i[0],r=i[1],a=this._computed_image_dimensions(),n=[a.width*o,a.height*r],l=n[0],s=n[1],_=e.coords.major,h=_[0],m=_[1],d=this.model.major_tick_in,c=this.model.major_tick_out;t.save(),t.translate(l,s),this.visuals.major_tick_line.set_value(t);for(var u=0,p=h.length;u<p;u++)t.beginPath(),t.moveTo(Math.round(h[u]+o*c),Math.round(m[u]+r*c)),t.lineTo(Math.round(h[u]-o*d),Math.round(m[u]-r*d)),t.stroke();t.restore()}},e.prototype._draw_minor_ticks=function(t,e){if(this.visuals.minor_tick_line.doit){var i=this._normals(),o=i[0],r=i[1],a=this._computed_image_dimensions(),n=[a.width*o,a.height*r],l=n[0],s=n[1],_=e.coords.minor,h=_[0],m=_[1],d=this.model.minor_tick_in,c=this.model.minor_tick_out;t.save(),t.translate(l,s),this.visuals.minor_tick_line.set_value(t);for(var u=0,p=h.length;u<p;u++)t.beginPath(),t.moveTo(Math.round(h[u]+o*c),Math.round(m[u]+r*c)),t.lineTo(Math.round(h[u]-o*d),Math.round(m[u]-r*d)),t.stroke();t.restore()}},e.prototype._draw_major_labels=function(t,e){if(this.visuals.major_label_text.doit){var i=this._normals(),o=i[0],r=i[1],a=this._computed_image_dimensions(),n=[a.width*o,a.height*r],l=n[0],s=n[1],_=this.model.label_standoff+this._tick_extent(),h=[_*o,_*r],m=h[0],d=h[1],c=e.coords.major,u=c[0],p=c[1],f=e.labels.major;this.visuals.major_label_text.set_value(t),t.save(),t.translate(l+m,s+d);for(var g=0,v=u.length;g<v;g++)t.fillText(f[g],Math.round(u[g]+o*this.model.label_standoff),Math.round(p[g]+r*this.model.label_standoff));t.restore()}},e.prototype._draw_title=function(t){this.visuals.title_text.doit&&(t.save(),this.visuals.title_text.set_value(t),t.fillText(this.model.title,0,-this.model.title_standoff),t.restore())},e.prototype._get_label_extent=function(){var t,e=this.tick_info().labels.major;if(null==this.model.color_mapper.low||null==this.model.color_mapper.high||p.isEmpty(e))t=0;else{var i=this.plot_view.canvas_view.ctx;switch(i.save(),this.visuals.major_label_text.set_value(i),this.model.orientation){case\"vertical\":t=c.max(e.map(function(t){return i.measureText(t.toString()).width}));break;case\"horizontal\":t=d.measure_font(this.visuals.major_label_text.font_value()).height;break;default:throw new Error(\"unreachable code\")}t+=this.model.label_standoff,i.restore()}return t},e.prototype._get_image_offset=function(){return{x:this.model.padding,y:this.model.padding+this._title_extent()}},e.prototype._normals=function(){return\"vertical\"==this.model.orientation?[1,0]:[0,1]},e.prototype._title_extent=function(){var t=this.model.title_text_font+\" \"+this.model.title_text_font_size+\" \"+this.model.title_text_font_style;return this.model.title?d.measure_font(t).height+this.model.title_standoff:0},e.prototype._tick_extent=function(){return null!=this.model.color_mapper.low&&null!=this.model.color_mapper.high?c.max([this.model.major_tick_out,this.model.minor_tick_out]):0},e.prototype._computed_image_dimensions=function(){var t,e,i=this.plot_view.frame._height.value,o=this.plot_view.frame._width.value,r=this._title_extent();switch(this.model.orientation){case\"vertical\":\"auto\"==this.model.height?null!=this.panel?t=i-2*this.model.padding-r:(t=c.max([25*this.model.color_mapper.palette.length,.3*i]),t=c.min([t,.8*i-2*this.model.padding-r])):t=this.model.height,e=\"auto\"==this.model.width?25:this.model.width;break;case\"horizontal\":t=\"auto\"==this.model.height?25:this.model.height,\"auto\"==this.model.width?null!=this.panel?e=o-2*this.model.padding:(e=c.max([25*this.model.color_mapper.palette.length,.3*o]),e=c.min([e,.8*o-2*this.model.padding])):e=this.model.width;break;default:throw new Error(\"unreachable code\")}return{width:e,height:t}},e.prototype._tick_coordinate_scale=function(t){var e={source_range:new h.Range1d({start:this.model.color_mapper.low,end:this.model.color_mapper.high}),target_range:new h.Range1d({start:0,end:t})};switch(this.model.color_mapper.type){case\"LinearColorMapper\":return new s.LinearScale(e);case\"LogColorMapper\":return new _.LogScale(e);default:throw new Error(\"unreachable code\")}},e.prototype._format_major_labels=function(t,e){for(var i=this.model.formatter.doFormat(t,null),o=0,r=e.length;o<r;o++)e[o]in this.model.major_label_overrides&&(i[o]=this.model.major_label_overrides[e[o]]);return i},e.prototype.tick_info=function(){var t,e=this._computed_image_dimensions();switch(this.model.orientation){case\"vertical\":t=e.height;break;case\"horizontal\":t=e.width;break;default:throw new Error(\"unreachable code\")}for(var i=this._tick_coordinate_scale(t),o=this._normals(),r=o[0],a=o[1],n=[this.model.color_mapper.low,this.model.color_mapper.high],l=n[0],s=n[1],_=this.model.ticker.get_ticks(l,s,null,null,this.model.ticker.desired_num_ticks),h=_.major,m=_.minor,d=[[],[]],c=[[],[]],p=0,f=h.length;p<f;p++)h[p]<l||h[p]>s||(d[r].push(h[p]),d[a].push(0));for(p=0,f=m.length;p<f;p++)m[p]<l||m[p]>s||(c[r].push(m[p]),c[a].push(0));var g={major:this._format_major_labels(d[r],h)},v={major:[[],[]],minor:[[],[]]};return v.major[r]=i.v_compute(d[r]),v.minor[r]=i.v_compute(c[r]),v.major[a]=d[a],v.minor[a]=c[a],\"vertical\"==this.model.orientation&&(v.major[r]=u.map(v.major[r],function(e){return t-e}),v.minor[r]=u.map(v.minor[r],function(e){return t-e})),{coords:v,labels:g}},e}(r.AnnotationView);i.ColorBarView=g,g.__name__=\"ColorBarView\";var v=function(t){function e(e){return t.call(this,e)||this}return o.__extends(e,t),e.init_ColorBar=function(){this.prototype.default_view=g,this.mixins([\"text:major_label_\",\"text:title_\",\"line:major_tick_\",\"line:minor_tick_\",\"line:border_\",\"line:bar_\",\"fill:background_\"]),this.define({location:[m.Any,\"top_right\"],orientation:[m.Orientation,\"vertical\"],title:[m.String],title_standoff:[m.Number,2],width:[m.Any,\"auto\"],height:[m.Any,\"auto\"],scale_alpha:[m.Number,1],ticker:[m.Instance,function(){return new a.BasicTicker}],formatter:[m.Instance,function(){return new n.BasicTickFormatter}],major_label_overrides:[m.Any,{}],color_mapper:[m.Instance],label_standoff:[m.Number,5],margin:[m.Number,30],padding:[m.Number,10],major_tick_in:[m.Number,5],major_tick_out:[m.Number,0],minor_tick_in:[m.Number,0],minor_tick_out:[m.Number,0]}),this.override({background_fill_color:\"#ffffff\",background_fill_alpha:.95,bar_line_color:null,border_line_color:null,major_label_text_align:\"center\",major_label_text_baseline:\"middle\",major_label_text_font_size:\"8pt\",major_tick_line_color:\"#ffffff\",minor_tick_line_color:null,title_text_font_size:\"10pt\",title_text_font_style:\"italic\"})},e}(r.Annotation);i.ColorBar=v,v.__name__=\"ColorBar\",v.init_ColorBar()},\n", | |
" function _(i,n,c){var e=i(113),t=function(i){function n(n){return i.call(this,n)||this}return e.__extends(n,i),n}(i(205).AdaptiveTicker);c.BasicTicker=t,t.__name__=\"BasicTicker\"},\n", | |
" function _(t,i,a){var e=t(113),n=t(206),s=t(110),r=t(121);var h=function(t){function i(i){return t.call(this,i)||this}return e.__extends(i,t),i.init_AdaptiveTicker=function(){this.define({base:[r.Number,10],mantissas:[r.Array,[1,2,5]],min_interval:[r.Number,0],max_interval:[r.Number]})},i.prototype.initialize=function(){t.prototype.initialize.call(this);var i=s.nth(this.mantissas,-1)/this.base,a=s.nth(this.mantissas,0)*this.base;this.extended_mantissas=e.__spreadArrays([i],this.mantissas,[a]),this.base_factor=0===this.get_min_interval()?1:this.get_min_interval()},i.prototype.get_interval=function(t,i,a){var e,n,r=i-t,h=this.get_ideal_interval(t,i,a),_=Math.floor((e=h/this.base_factor,void 0===(n=this.base)&&(n=Math.E),Math.log(e)/Math.log(n))),o=Math.pow(this.base,_)*this.base_factor,m=this.extended_mantissas,c=m.map(function(t){return Math.abs(a-r/(t*o))});return function(t,i,a){return Math.max(i,Math.min(a,t))}(m[s.argmin(c)]*o,this.get_min_interval(),this.get_max_interval())},i}(n.ContinuousTicker);a.AdaptiveTicker=h,h.__name__=\"AdaptiveTicker\",h.init_AdaptiveTicker()},\n", | |
" function _(t,n,i){var r=t(113),e=t(207),o=t(121),u=t(110),_=t(109),s=function(t){function n(n){return t.call(this,n)||this}return r.__extends(n,t),n.init_ContinuousTicker=function(){this.define({num_minor_ticks:[o.Number,5],desired_num_ticks:[o.Number,6]})},n.prototype.get_ticks=function(t,n,i,r,e){return this.get_ticks_no_defaults(t,n,r,this.desired_num_ticks)},n.prototype.get_ticks_no_defaults=function(t,n,i,r){var e=this.get_interval(t,n,r),o=Math.floor(t/e),s=Math.ceil(n/e),a=(_.isStrictNaN(o)||_.isStrictNaN(s)?[]:u.range(o,s+1)).map(function(t){return t*e}).filter(function(i){return t<=i&&i<=n}),c=this.num_minor_ticks,l=[];if(c>0&&a.length>0){for(var f=e/c,h=u.range(0,c).map(function(t){return t*f}),m=0,p=h.slice(1);m<p.length;m++){var g=p[m],v=a[0]-g;t<=v&&v<=n&&l.push(v)}for(var k=0,d=a;k<d.length;k++)for(var N=d[k],y=0,T=h;y<T.length;y++){g=T[y];t<=(v=N+g)&&v<=n&&l.push(v)}}return{major:a,minor:l}},n.prototype.get_min_interval=function(){return this.min_interval},n.prototype.get_max_interval=function(){return null!=this.max_interval?this.max_interval:1/0},n.prototype.get_ideal_interval=function(t,n,i){return(n-t)/i},n}(e.Ticker);i.ContinuousTicker=s,s.__name__=\"ContinuousTicker\",s.init_ContinuousTicker()},\n", | |
" function _(n,e,t){var i=n(113),r=function(n){function e(e){return n.call(this,e)||this}return i.__extends(e,n),e}(n(166).Model);t.Ticker=r,r.__name__=\"Ticker\"},\n", | |
" function _(i,e,t){var r=i(113),n=i(209),o=i(121),a=i(109),c=function(i){function e(e){var t=i.call(this,e)||this;return t.last_precision=3,t}return r.__extends(e,i),e.init_BasicTickFormatter=function(){this.define({precision:[o.Any,\"auto\"],use_scientific:[o.Boolean,!0],power_limit_high:[o.Number,5],power_limit_low:[o.Number,-3]})},Object.defineProperty(e.prototype,\"scientific_limit_low\",{get:function(){return Math.pow(10,this.power_limit_low)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"scientific_limit_high\",{get:function(){return Math.pow(10,this.power_limit_high)},enumerable:!0,configurable:!0}),e.prototype.doFormat=function(i,e){if(0==i.length)return[];var t=0;i.length>=2&&(t=Math.abs(i[1]-i[0])/1e4);var r=!1;if(this.use_scientific)for(var n=0,o=i;n<o.length;n++){var c=o[n],l=Math.abs(c);if(l>t&&(l>=this.scientific_limit_high||l<=this.scientific_limit_low)){r=!0;break}}var s=new Array(i.length),f=this.precision;if(null==f||a.isNumber(f))if(r)for(var h=0,_=i.length;h<_;h++)s[h]=i[h].toExponential(f||void 0);else for(h=0,_=i.length;h<_;h++)s[h]=i[h].toFixed(f||void 0).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\");else for(var p=this.last_precision,u=this.last_precision<=15;u?p<=15:p>=15;u?p++:p--){var m=!0;if(r){for(h=0,_=i.length;h<_;h++)if(s[h]=i[h].toExponential(p),h>0&&s[h]===s[h-1]){m=!1;break}if(m)break}else{for(h=0,_=i.length;h<_;h++)if(s[h]=i[h].toFixed(p).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\"),h>0&&s[h]==s[h-1]){m=!1;break}if(m)break}if(m){this.last_precision=p;break}}return s},e}(n.TickFormatter);t.BasicTickFormatter=c,c.__name__=\"BasicTickFormatter\",c.init_BasicTickFormatter()},\n", | |
" function _(t,n,r){var e=t(113),i=function(t){function n(n){return t.call(this,n)||this}return e.__extends(n,t),n}(t(166).Model);r.TickFormatter=i,i.__name__=\"TickFormatter\"},\n", | |
" function _(o,n,l){var r=o(113),t=o(211),i=o(114),e=function(o){function n(n){return o.call(this,n)||this}return r.__extends(n,o),n.prototype._v_compute=function(o,n,l,r){for(var t=r.nan_color,e=r.low_color,h=r.high_color,a=null!=this.low?this.low:i.min(o),u=null!=this.high?this.high:i.max(o),_=l.length-1,s=1/(u-a),c=1/l.length,p=0,f=o.length;p<f;p++){var g=o[p];if(isNaN(g))n[p]=t;else if(g!=u){var v=(g-a)*s,m=Math.floor(v/c);n[p]=m<0?null!=e?e:l[0]:m>_?null!=h?h:l[_]:l[m]}else n[p]=l[_]}},n}(t.ContinuousColorMapper);l.LinearColorMapper=e,e.__name__=\"LinearColorMapper\"},\n", | |
" function _(o,r,i){var l=o(113),n=o(212),t=o(121),u=function(o){function r(r){return o.call(this,r)||this}return l.__extends(r,o),r.init_ContinuousColorMapper=function(){this.define({high:[t.Number],low:[t.Number],high_color:[t.Color],low_color:[t.Color]})},r.prototype._colors=function(r){return Object.assign(Object.assign({},o.prototype._colors.call(this,r)),{low_color:null!=this.low_color?r(this.low_color):void 0,high_color:null!=this.high_color?r(this.high_color):void 0})},r}(n.ColorMapper);i.ContinuousColorMapper=u,u.__name__=\"ContinuousColorMapper\",u.init_ContinuousColorMapper()},\n", | |
" function _(t,r,n){var e=t(113),o=t(213),i=t(121),a=t(109),u=t(123),_=t(197);function c(t){return a.isNumber(t)?t:(\"#\"!=t[0]&&(t=u.color2hex(t)),9!=t.length&&(t+=\"ff\"),parseInt(t.slice(1),16))}function l(t){for(var r=new Uint32Array(t.length),n=0,e=t.length;n<e;n++)r[n]=c(t[n]);return r}function p(t){if(_.is_little_endian)for(var r=new DataView(t.buffer),n=0,e=t.length;n<e;n++)r.setUint32(4*n,t[n]);return new Uint8Array(t.buffer)}n._convert_color=c,n._convert_palette=l,n._uint32_to_rgba=p;var f=function(t){function r(r){return t.call(this,r)||this}return e.__extends(r,t),r.init_ColorMapper=function(){this.define({palette:[i.Any],nan_color:[i.Color,\"gray\"]})},r.prototype.v_compute=function(t){var r=new Array(t.length);return this._v_compute(t,r,this.palette,this._colors(function(t){return t})),r},Object.defineProperty(r.prototype,\"rgba_mapper\",{get:function(){var t=this,r=l(this.palette),n=this._colors(c);return{v_compute:function(e){var o=new Uint32Array(e.length);return t._v_compute(e,o,r,n),p(o)}}},enumerable:!0,configurable:!0}),r.prototype._colors=function(t){return{nan_color:t(this.nan_color)}},r}(o.Mapper);n.ColorMapper=f,f.__name__=\"ColorMapper\",f.init_ColorMapper()},\n", | |
" function _(n,r,t){var e=n(113),o=function(n){function r(r){return n.call(this,r)||this}return e.__extends(r,n),r.prototype.compute=function(n){throw new Error(\"mapping single values is not supported\")},r}(n(214).Transform);t.Mapper=o,o.__name__=\"Mapper\"},\n", | |
" function _(n,r,t){var _=n(113),e=function(n){function r(r){return n.call(this,r)||this}return _.__extends(r,n),r}(n(166).Model);t.Transform=e,e.__name__=\"Transform\"},\n", | |
" function _(t,e,r){var n=t(113),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.prototype.compute=function(t){var e=this._compute_state();return e[0]*t+e[1]},e.prototype.v_compute=function(t){for(var e=this._compute_state(),r=e[0],n=e[1],o=new Float64Array(t.length),a=0;a<t.length;a++)o[a]=r*t[a]+n;return o},e.prototype.invert=function(t){var e=this._compute_state(),r=e[0];return(t-e[1])/r},e.prototype.v_invert=function(t){for(var e=this._compute_state(),r=e[0],n=e[1],o=new Float64Array(t.length),a=0;a<t.length;a++)o[a]=(t[a]-n)/r;return o},e.prototype._compute_state=function(){var t=this.source_range.start,e=this.source_range.end,r=this.target_range.start,n=(this.target_range.end-r)/(e-t);return[n,-n*t+r]},e}(t(216).Scale);r.LinearScale=o,o.__name__=\"LinearScale\"},\n", | |
" function _(t,e,n){var r=t(113),i=t(217),s=t(121),c=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.init_Scale=function(){this.internal({source_range:[s.Any],target_range:[s.Any]})},e.prototype.r_compute=function(t,e){return this.target_range.is_reversed?[this.compute(e),this.compute(t)]:[this.compute(t),this.compute(e)]},e.prototype.r_invert=function(t,e){return this.target_range.is_reversed?[this.invert(e),this.invert(t)]:[this.invert(t),this.invert(e)]},e}(i.Transform);n.Scale=c,c.__name__=\"Scale\",c.init_Scale()},\n", | |
" function _(r,o,t){var a=r(218);t.CustomJSTransform=a.CustomJSTransform;var e=r(219);t.Dodge=e.Dodge;var n=r(220);t.Interpolator=n.Interpolator;var p=r(221);t.Jitter=p.Jitter;var v=r(222);t.LinearInterpolator=v.LinearInterpolator;var l=r(223);t.StepInterpolator=l.StepInterpolator;var m=r(214);t.Transform=m.Transform},\n", | |
" function _(t,r,e){var n=t(113),s=t(214),o=t(121),i=t(125),a=t(127),u=function(r){function e(t){return r.call(this,t)||this}return n.__extends(e,r),e.init_CustomJSTransform=function(){this.define({args:[o.Any,{}],func:[o.String,\"\"],v_func:[o.String,\"\"],use_strict:[o.Boolean,!1]})},Object.defineProperty(e.prototype,\"names\",{get:function(){return i.keys(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"values\",{get:function(){return i.values(this.args)},enumerable:!0,configurable:!0}),e.prototype._make_transform=function(t,r){var e=this.use_strict?a.use_strict(r):r;return new(Function.bind.apply(Function,n.__spreadArrays([void 0],this.names,[t,\"require\",\"exports\",e])))},Object.defineProperty(e.prototype,\"scalar_transform\",{get:function(){return this._make_transform(\"x\",this.func)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"vector_transform\",{get:function(){return this._make_transform(\"xs\",this.v_func)},enumerable:!0,configurable:!0}),e.prototype.compute=function(r){return this.scalar_transform.apply(this,n.__spreadArrays(this.values,[r,t,{}]))},e.prototype.v_compute=function(r){return this.vector_transform.apply(this,n.__spreadArrays(this.values,[r,t,{}]))},e}(s.Transform);e.CustomJSTransform=u,u.__name__=\"CustomJSTransform\",u.init_CustomJSTransform()},\n", | |
" function _(e,t,n){var r=e(113),i=e(214),o=e(184),u=e(121),a=e(109),c=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.init_Dodge=function(){this.define({value:[u.Number,0],range:[u.Instance]})},t.prototype.v_compute=function(e){var t;if(this.range instanceof o.FactorRange)t=this.range.v_synthetic(e);else{if(!a.isArrayableOf(e,a.isNumber))throw new Error(\"unexpected\");t=e}for(var n=new Float64Array(t.length),r=0;r<t.length;r++){var i=t[r];n[r]=this._compute(i)}return n},t.prototype.compute=function(e){if(this.range instanceof o.FactorRange)return this._compute(this.range.synthetic(e));if(a.isNumber(e))return this._compute(e);throw new Error(\"unexpected\")},t.prototype._compute=function(e){return e+this.value},t}(i.Transform);n.Dodge=c,c.__name__=\"Dodge\",c.init_Dodge()},\n", | |
" function _(t,r,n){var e=t(113),o=t(214),i=t(121),s=t(110),a=t(109),h=function(t){function r(r){var n=t.call(this,r)||this;return n._sorted_dirty=!0,n}return e.__extends(r,t),r.init_Interpolator=function(){this.define({x:[i.Any],y:[i.Any],data:[i.Any],clip:[i.Boolean,!0]})},r.prototype.connect_signals=function(){var r=this;t.prototype.connect_signals.call(this),this.connect(this.change,function(){return r._sorted_dirty=!0})},r.prototype.v_compute=function(t){for(var r=new Float64Array(t.length),n=0;n<t.length;n++){var e=t[n];r[n]=this.compute(e)}return r},r.prototype.sort=function(t){if(void 0===t&&(t=!1),this._sorted_dirty){var r,n;if(a.isString(this.x)&&a.isString(this.y)&&null!=this.data){var e=this.data.columns();if(!s.includes(e,this.x))throw new Error(\"The x parameter does not correspond to a valid column name defined in the data parameter\");if(!s.includes(e,this.y))throw new Error(\"The y parameter does not correspond to a valid column name defined in the data parameter\");r=this.data.get_column(this.x),n=this.data.get_column(this.y)}else{if(!a.isArray(this.x)||!a.isArray(this.y))throw new Error(\"parameters 'x' and 'y' must be both either string fields or arrays\");r=this.x,n=this.y}if(r.length!==n.length)throw new Error(\"The length for x and y do not match\");if(r.length<2)throw new Error(\"x and y must have at least two elements to support interpolation\");var o=[];for(var i in r)o.push({x:r[i],y:n[i]});t?o.sort(function(t,r){return t.x>r.x?-1:t.x==r.x?0:1}):o.sort(function(t,r){return t.x<r.x?-1:t.x==r.x?0:1}),this._x_sorted=[],this._y_sorted=[];for(var h=0,d=o;h<d.length;h++){var l=d[h],c=l.x,u=l.y;this._x_sorted.push(c),this._y_sorted.push(u)}this._sorted_dirty=!1}},r}(o.Transform);n.Interpolator=h,h.__name__=\"Interpolator\",h.init_Interpolator()},\n", | |
" function _(t,e,r){var i=t(113),n=t(214),s=t(184),o=t(109),u=t(121),a=t(111),h=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.init_Jitter=function(){this.define({mean:[u.Number,0],width:[u.Number,1],distribution:[u.Distribution,\"uniform\"],range:[u.Instance]}),this.internal({previous_values:[u.Array]})},e.prototype.v_compute=function(t){if(null!=this.previous_values&&this.previous_values.length==t.length)return this.previous_values;var e;if(this.range instanceof s.FactorRange)e=this.range.v_synthetic(t);else{if(!o.isArrayableOf(t,o.isNumber))throw new Error(\"unexpected\");e=t}for(var r=new Float64Array(e.length),i=0;i<e.length;i++){var n=e[i];r[i]=this._compute(n)}return this.previous_values=r,r},e.prototype.compute=function(t){if(this.range instanceof s.FactorRange)return this._compute(this.range.synthetic(t));if(o.isNumber(t))return this._compute(t);throw new Error(\"unexpected\")},e.prototype._compute=function(t){switch(this.distribution){case\"uniform\":return t+this.mean+(a.random()-.5)*this.width;case\"normal\":return t+a.rnorm(this.mean,this.width)}},e}(n.Transform);r.Jitter=h,h.__name__=\"Jitter\",h.init_Jitter()},\n", | |
" function _(t,r,_){var e=t(113),s=t(110),i=function(t){function r(r){return t.call(this,r)||this}return e.__extends(r,t),r.prototype.compute=function(t){if(this.sort(!1),this.clip){if(t<this._x_sorted[0]||t>this._x_sorted[this._x_sorted.length-1])return NaN}else{if(t<this._x_sorted[0])return this._y_sorted[0];if(t>this._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}if(t==this._x_sorted[0])return this._y_sorted[0];var r=s.find_last_index(this._x_sorted,function(r){return r<t}),_=this._x_sorted[r],e=this._x_sorted[r+1],i=this._y_sorted[r],o=this._y_sorted[r+1];return i+(t-_)/(e-_)*(o-i)},r}(t(220).Interpolator);_.LinearInterpolator=i,i.__name__=\"LinearInterpolator\"},\n", | |
" function _(t,e,r){var n=t(113),i=t(220),o=t(121),s=t(110),_=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_StepInterpolator=function(){this.define({mode:[o.StepMode,\"after\"]})},e.prototype.compute=function(t){if(this.sort(!1),this.clip){if(t<this._x_sorted[0]||t>this._x_sorted[this._x_sorted.length-1])return NaN}else{if(t<this._x_sorted[0])return this._y_sorted[0];if(t>this._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}var e;switch(this.mode){case\"after\":e=s.find_last_index(this._x_sorted,function(e){return t>=e});break;case\"before\":e=s.find_index(this._x_sorted,function(e){return t<=e});break;case\"center\":var r=this._x_sorted.map(function(e){return Math.abs(e-t)}),n=s.min(r);e=s.find_index(r,function(t){return n===t});break;default:throw new Error(\"unknown mode: \"+this.mode)}return-1!=e?this._y_sorted[e]:NaN},e}(i.Interpolator);r.StepInterpolator=_,_.__name__=\"StepInterpolator\",_.init_StepInterpolator()},\n", | |
" function _(t,e,a){var r=t(113),o=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.prototype.compute=function(t){var e,a=this._compute_state(),r=a[0],o=a[1],n=a[2],i=a[3];if(0==n)e=0;else{var h=(Math.log(t)-i)/n;e=isFinite(h)?h*r+o:NaN}return e},e.prototype.v_compute=function(t){var e=this._compute_state(),a=e[0],r=e[1],o=e[2],n=e[3],i=new Float64Array(t.length);if(0==o)for(var h=0;h<t.length;h++)i[h]=0;else for(h=0;h<t.length;h++){var _=(Math.log(t[h])-n)/o,l=void 0;l=isFinite(_)?_*a+r:NaN,i[h]=l}return i},e.prototype.invert=function(t){var e=this._compute_state(),a=e[0],r=e[1],o=e[2],n=e[3],i=(t-r)/a;return Math.exp(o*i+n)},e.prototype.v_invert=function(t){for(var e=this._compute_state(),a=e[0],r=e[1],o=e[2],n=e[3],i=new Float64Array(t.length),h=0;h<t.length;h++){var _=(t[h]-r)/a;i[h]=Math.exp(o*_+n)}return i},e.prototype._get_safe_factor=function(t,e){var a,r=t<0?0:t,o=e<0?0:e;if(r==o)if(0==r)r=(a=[1,10])[0],o=a[1];else{var n=Math.log(r)/Math.log(10);r=Math.pow(10,Math.floor(n)),o=Math.ceil(n)!=Math.floor(n)?Math.pow(10,Math.ceil(n)):Math.pow(10,Math.ceil(n)+1)}return[r,o]},e.prototype._compute_state=function(){var t,e,a=this.source_range.start,r=this.source_range.end,o=this.target_range.start,n=this.target_range.end-o,i=this._get_safe_factor(a,r),h=i[0],_=i[1];return 0==h?(t=Math.log(_),e=0):(t=Math.log(_)-Math.log(h),e=Math.log(h)),[n,o,t,e]},e}(t(216).Scale);a.LogScale=o,o.__name__=\"LogScale\"},\n", | |
" function _(t,e,s){var n=t(113),i=t(185),r=t(121),a=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_Range1d=function(){this.define({start:[r.Number,0],end:[r.Number,1],reset_start:[r.Number],reset_end:[r.Number]})},e.prototype._set_auto_bounds=function(){if(\"auto\"==this.bounds){var t=Math.min(this.reset_start,this.reset_end),e=Math.max(this.reset_start,this.reset_end);this.setv({bounds:[t,e]},{silent:!0})}},e.prototype.initialize=function(){t.prototype.initialize.call(this),null==this.reset_start&&(this.reset_start=this.start),null==this.reset_end&&(this.reset_end=this.end),this._set_auto_bounds()},Object.defineProperty(e.prototype,\"min\",{get:function(){return Math.min(this.start,this.end)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"max\",{get:function(){return Math.max(this.start,this.end)},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this._set_auto_bounds(),this.start!=this.reset_start||this.end!=this.reset_end?this.setv({start:this.reset_start,end:this.reset_end}):this.change.emit()},e}(i.Range);s.Range1d=a,a.__name__=\"Range1d\",a.init_Range1d()},\n", | |
" function _(t,e,i){var n=t(163),l={};i.measure_font=function(t){if(null!=l[t])return l[t];var e=n.span({style:{font:t}},\"Hg\"),i=n.div({style:{display:\"inline-block\",width:\"1px\",height:\"0px\"}}),o=n.div({},e,i);document.body.appendChild(o);try{i.style.verticalAlign=\"baseline\";var r=n.offset(i).top-n.offset(e).top;i.style.verticalAlign=\"bottom\";var d=n.offset(i).top-n.offset(e).top,a={height:d,ascent:r,descent:d-r};return l[t]=a,a}finally{document.body.removeChild(o)}};var o={};i.measure_text=function(t,e){var i=o[e];if(null!=i){var l=i[t];if(null!=l)return l}else o[e]={};var r=n.div({style:{display:\"inline-block\",\"white-space\":\"nowrap\",font:e}},t);document.body.appendChild(r);try{var d=r.getBoundingClientRect(),a=d.width,f=d.height;return o[e][t]={width:a,height:f},{width:a,height:f}}finally{document.body.removeChild(r)}}},\n", | |
" function _(e,t,i){var n=e(113),a=e(228),s=e(163),l=e(121),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this.visuals.warm_cache()},t.prototype._get_size=function(){var e=this.plot_view.canvas_view.ctx;this.visuals.text.set_value(e);var t=e.measureText(this.model.text);return{width:t.width,height:t.ascent}},t.prototype.render=function(){if(this.model.visible||\"css\"!=this.model.render_mode||s.undisplay(this.el),this.model.visible){var e;switch(this.model.angle_units){case\"rad\":e=-this.model.angle;break;case\"deg\":e=-this.model.angle*Math.PI/180;break;default:throw new Error(\"unreachable code\")}var t=null!=this.panel?this.panel:this.plot_view.frame,i=this.plot_view.frame.xscales[this.model.x_range_name],n=this.plot_view.frame.yscales[this.model.y_range_name],a=\"data\"==this.model.x_units?i.compute(this.model.x):t.xview.compute(this.model.x),l=\"data\"==this.model.y_units?n.compute(this.model.y):t.yview.compute(this.model.y);a+=this.model.x_offset,l-=this.model.y_offset,(\"canvas\"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this))(this.plot_view.canvas_view.ctx,this.model.text,a,l,e)}},t}(a.TextAnnotationView);i.LabelView=o,o.__name__=\"LabelView\";var r=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.init_Label=function(){this.prototype.default_view=o,this.mixins([\"text\",\"line:border_\",\"fill:background_\"]),this.define({x:[l.Number],x_units:[l.SpatialUnits,\"data\"],y:[l.Number],y_units:[l.SpatialUnits,\"data\"],text:[l.String],angle:[l.Angle,0],angle_units:[l.AngleUnits,\"rad\"],x_offset:[l.Number,0],y_offset:[l.Number,0],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),this.override({background_fill_color:null,border_line_color:null})},t}(a.TextAnnotation);i.Label=r,r.__name__=\"Label\",r.init_Label()},\n", | |
" function _(t,e,i){var s=t(113),n=t(131),l=t(163),a=t(121),o=t(226),r=t(202),u=function(t){function e(){var e=t.apply(this,arguments)||this;return e.rotate=!0,e}return s.__extends(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),\"css\"==this.model.render_mode&&(this.el.classList.add(r.bk_annotation),this.plot_view.canvas_overlays.appendChild(this.el))},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),\"css\"==this.model.render_mode?this.connect(this.model.change,function(){return e.render()}):this.connect(this.model.change,function(){return e.plot_view.request_render()})},e.prototype._calculate_text_dimensions=function(t,e){return[t.measureText(e).width,o.measure_font(this.visuals.text.font_value()).height]},e.prototype._calculate_bounding_box_dimensions=function(t,e){var i,s,n=this._calculate_text_dimensions(t,e),l=n[0],a=n[1];switch(t.textAlign){case\"left\":i=0;break;case\"center\":i=-l/2;break;case\"right\":i=-l;break;default:throw new Error(\"unreachable code\")}switch(t.textBaseline){case\"top\":s=0;break;case\"middle\":s=-.5*a;break;case\"bottom\":s=-1*a;break;case\"alphabetic\":s=-.8*a;break;case\"hanging\":s=-.17*a;break;case\"ideographic\":s=-.83*a;break;default:throw new Error(\"unreachable code\")}return[i,s,l,a]},e.prototype._canvas_text=function(t,e,i,s,n){this.visuals.text.set_value(t);var l=this._calculate_bounding_box_dimensions(t,e);t.save(),t.beginPath(),t.translate(i,s),n&&t.rotate(n),t.rect(l[0],l[1],l[2],l[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.stroke()),this.visuals.text.doit&&(this.visuals.text.set_value(t),t.fillText(e,0,0)),t.restore()},e.prototype._css_text=function(t,e,i,s,n){l.undisplay(this.el),this.visuals.text.set_value(t);var a=this._calculate_bounding_box_dimensions(t,e),o=this.visuals.border_line.line_dash.value().length<2?\"solid\":\"dashed\";this.visuals.border_line.set_value(t),this.visuals.background_fill.set_value(t),this.el.style.position=\"absolute\",this.el.style.left=i+a[0]+\"px\",this.el.style.top=s+a[1]+\"px\",this.el.style.color=\"\"+this.visuals.text.text_color.value(),this.el.style.opacity=\"\"+this.visuals.text.text_alpha.value(),this.el.style.font=\"\"+this.visuals.text.font_value(),this.el.style.lineHeight=\"normal\",n&&(this.el.style.transform=\"rotate(\"+n+\"rad)\"),this.visuals.background_fill.doit&&(this.el.style.backgroundColor=\"\"+this.visuals.background_fill.color_value()),this.visuals.border_line.doit&&(this.el.style.borderStyle=\"\"+o,this.el.style.borderWidth=this.visuals.border_line.line_width.value()+\"px\",this.el.style.borderColor=\"\"+this.visuals.border_line.color_value()),this.el.textContent=e,l.display(this.el)},e}(n.AnnotationView);i.TextAnnotationView=u,u.__name__=\"TextAnnotationView\";var h=function(t){function e(e){return t.call(this,e)||this}return s.__extends(e,t),e.init_TextAnnotation=function(){this.define({render_mode:[a.RenderMode,\"canvas\"]})},e}(n.Annotation);i.TextAnnotation=h,h.__name__=\"TextAnnotation\",h.init_TextAnnotation()},\n", | |
" function _(t,e,i){var s=t(113),o=t(228),n=t(170),l=t(163),a=t(121),r=t(202),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(e,t),e.prototype.initialize=function(){if(t.prototype.initialize.call(this),this.set_data(this.model.source),\"css\"==this.model.render_mode)for(var e=0,i=this._text.length;e<i;e++){var s=l.div({class:r.bk_annotation_child,style:{display:\"none\"}});this.el.appendChild(s)}},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),\"css\"==this.model.render_mode?(this.connect(this.model.change,function(){e.set_data(e.model.source),e.render()}),this.connect(this.model.source.streaming,function(){e.set_data(e.model.source),e.render()}),this.connect(this.model.source.patching,function(){e.set_data(e.model.source),e.render()}),this.connect(this.model.source.change,function(){e.set_data(e.model.source),e.render()})):(this.connect(this.model.change,function(){e.set_data(e.model.source),e.plot_view.request_render()}),this.connect(this.model.source.streaming,function(){e.set_data(e.model.source),e.plot_view.request_render()}),this.connect(this.model.source.patching,function(){e.set_data(e.model.source),e.plot_view.request_render()}),this.connect(this.model.source.change,function(){e.set_data(e.model.source),e.plot_view.request_render()}))},e.prototype.set_data=function(e){t.prototype.set_data.call(this,e),this.visuals.warm_cache(e)},e.prototype._map_data=function(){var t=this.plot_view.frame.xscales[this.model.x_range_name],e=this.plot_view.frame.yscales[this.model.y_range_name],i=null!=this.panel?this.panel:this.plot_view.frame;return[\"data\"==this.model.x_units?t.v_compute(this._x):i.xview.v_compute(this._x),\"data\"==this.model.y_units?e.v_compute(this._y):i.yview.v_compute(this._y)]},e.prototype.render=function(){if(this.model.visible||\"css\"!=this.model.render_mode||l.undisplay(this.el),this.model.visible)for(var t=\"canvas\"==this.model.render_mode?this._v_canvas_text.bind(this):this._v_css_text.bind(this),e=this.plot_view.canvas_view.ctx,i=this._map_data(),s=i[0],o=i[1],n=0,a=this._text.length;n<a;n++)t(e,n,this._text[n],s[n]+this._x_offset[n],o[n]-this._y_offset[n],this._angle[n])},e.prototype._get_size=function(){var t=this.plot_view.canvas_view.ctx;this.visuals.text.set_value(t);var e=t.measureText(this._text[0]);return{width:e.width,height:e.ascent}},e.prototype._v_canvas_text=function(t,e,i,s,o,n){this.visuals.text.set_vectorize(t,e);var l=this._calculate_bounding_box_dimensions(t,i);t.save(),t.beginPath(),t.translate(s,o),t.rotate(n),t.rect(l[0],l[1],l[2],l[3]),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_vectorize(t,e),t.fill()),this.visuals.border_line.doit&&(this.visuals.border_line.set_vectorize(t,e),t.stroke()),this.visuals.text.doit&&(this.visuals.text.set_vectorize(t,e),t.fillText(i,0,0)),t.restore()},e.prototype._v_css_text=function(t,e,i,s,o,n){var a=this.el.children[e];a.textContent=i,this.visuals.text.set_vectorize(t,e);var r=this._calculate_bounding_box_dimensions(t,i),_=this.visuals.border_line.line_dash.value().length<2?\"solid\":\"dashed\";this.visuals.border_line.set_vectorize(t,e),this.visuals.background_fill.set_vectorize(t,e),a.style.position=\"absolute\",a.style.left=s+r[0]+\"px\",a.style.top=o+r[1]+\"px\",a.style.color=\"\"+this.visuals.text.text_color.value(),a.style.opacity=\"\"+this.visuals.text.text_alpha.value(),a.style.font=\"\"+this.visuals.text.font_value(),a.style.lineHeight=\"normal\",n&&(a.style.transform=\"rotate(\"+n+\"rad)\"),this.visuals.background_fill.doit&&(a.style.backgroundColor=\"\"+this.visuals.background_fill.color_value()),this.visuals.border_line.doit&&(a.style.borderStyle=\"\"+_,a.style.borderWidth=this.visuals.border_line.line_width.value()+\"px\",a.style.borderColor=\"\"+this.visuals.border_line.color_value()),l.display(a)},e}(o.TextAnnotationView);i.LabelSetView=_,_.__name__=\"LabelSetView\";var c=function(t){function e(e){return t.call(this,e)||this}return s.__extends(e,t),e.init_LabelSet=function(){this.prototype.default_view=_,this.mixins([\"text\",\"line:border_\",\"fill:background_\"]),this.define({x:[a.NumberSpec],y:[a.NumberSpec],x_units:[a.SpatialUnits,\"data\"],y_units:[a.SpatialUnits,\"data\"],text:[a.StringSpec,{field:\"text\"}],angle:[a.AngleSpec,0],x_offset:[a.NumberSpec,{value:0}],y_offset:[a.NumberSpec,{value:0}],source:[a.Instance,function(){return new n.ColumnDataSource}],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),this.override({background_fill_color:null,border_line_color:null})},e}(o.TextAnnotation);i.LabelSet=c,c.__name__=\"LabelSet\",c.init_LabelSet()},\n", | |
" function _(t,e,i){var l=t(113),n=t(131),r=t(121),a=t(116),s=t(226),h=t(181),o=t(110),_=t(125),d=t(109),c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l.__extends(e,t),e.prototype.cursor=function(t,e){return\"none\"==this.model.click_policy?null:\"pointer\"},Object.defineProperty(e.prototype,\"legend_padding\",{get:function(){return null!=this.visuals.border_line.line_color.value()?this.model.padding:0},enumerable:!0,configurable:!0}),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.plot_view.request_render()}),this.connect(this.model.item_change,function(){return e.plot_view.request_render()})},e.prototype.compute_legend_bbox=function(){var t=this.model.get_legend_names(),e=this.model,i=e.glyph_height,l=e.glyph_width,n=this.model,r=n.label_height,a=n.label_width;this.max_label_height=o.max([s.measure_font(this.visuals.label_text.font_value()).height,r,i]);var c=this.plot_view.canvas_view.ctx;c.save(),this.visuals.label_text.set_value(c),this.text_widths={};for(var g=0,u=t;g<u.length;g++){var m=u[g];this.text_widths[m]=o.max([c.measureText(m).width,a])}this.visuals.title_text.set_value(c),this.title_height=this.model.title?s.measure_font(this.visuals.title_text.font_value()).height+this.model.title_standoff:0,this.title_width=this.model.title?c.measureText(this.model.title).width:0,c.restore();var f,p,b=Math.max(o.max(_.values(this.text_widths)),0),v=this.model.margin,x=this.legend_padding,w=this.model.spacing,y=this.model.label_standoff;if(\"vertical\"==this.model.orientation)f=t.length*this.max_label_height+Math.max(t.length-1,0)*w+2*x+this.title_height,p=o.max([b+l+y+2*x,this.title_width+2*x]);else{var k=2*x+Math.max(t.length-1,0)*w;for(var m in this.text_widths){var N=this.text_widths[m];k+=o.max([N,a])+l+y}p=o.max([this.title_width+2*x,k]),f=this.max_label_height+this.title_height+2*x}var A,L,z=null!=this.panel?this.panel:this.plot_view.frame,B=z.bbox.ranges,T=B[0],M=B[1],P=this.model.location;if(d.isString(P))switch(P){case\"top_left\":A=T.start+v,L=M.start+v;break;case\"top_center\":A=(T.end+T.start)/2-p/2,L=M.start+v;break;case\"top_right\":A=T.end-v-p,L=M.start+v;break;case\"bottom_right\":A=T.end-v-p,L=M.end-v-f;break;case\"bottom_center\":A=(T.end+T.start)/2-p/2,L=M.end-v-f;break;case\"bottom_left\":A=T.start+v,L=M.end-v-f;break;case\"center_left\":A=T.start+v,L=(M.end+M.start)/2-f/2;break;case\"center\":A=(T.end+T.start)/2-p/2,L=(M.end+M.start)/2-f/2;break;case\"center_right\":A=T.end-v-p,L=(M.end+M.start)/2-f/2;break;default:throw new Error(\"unreachable code\")}else{if(!d.isArray(P)||2!=P.length)throw new Error(\"unreachable code\");var S=P[0],V=P[1];A=z.xview.compute(S),L=z.yview.compute(V)-f}return new h.BBox({left:A,top:L,width:p,height:f})},e.prototype.interactive_bbox=function(){return this.compute_legend_bbox()},e.prototype.interactive_hit=function(t,e){return this.interactive_bbox().contains(t,e)},e.prototype.on_hit=function(t,e){for(var i,l,n,r=this.model.glyph_width,a=this.legend_padding,s=this.model.spacing,o=this.model.label_standoff,_=n=a,d=this.compute_legend_bbox(),c=\"vertical\"==this.model.orientation,g=0,u=this.model.items;g<u.length;g++)for(var m=u[g],f=0,p=m.get_labels_list_from_label_prop();f<p.length;f++){var b=p[f],v=d.x+_,x=d.y+n+this.title_height,w=void 0,y=void 0;if(c?(w=(i=[d.width-2*a,this.max_label_height])[0],y=i[1]):(w=(l=[this.text_widths[b]+r+o,this.max_label_height])[0],y=l[1]),new h.BBox({left:v,top:x,width:w,height:y}).contains(t,e)){switch(this.model.click_policy){case\"hide\":for(var k=0,N=m.renderers;k<N.length;k++){(z=N[k]).visible=!z.visible}break;case\"mute\":for(var A=0,L=m.renderers;A<L.length;A++){var z;(z=L[A]).muted=!z.muted}}return!0}c?n+=this.max_label_height+s:_+=this.text_widths[b]+r+o+s}return!1},e.prototype.render=function(){if(this.model.visible&&0!=this.model.items.length){for(var t=0,e=this.model.items;t<e.length;t++){e[t].legend=this.model}var i=this.plot_view.canvas_view.ctx,l=this.compute_legend_bbox();i.save(),this._draw_legend_box(i,l),this._draw_legend_items(i,l),this.model.title&&this._draw_title(i,l),i.restore()}},e.prototype._draw_legend_box=function(t,e){t.beginPath(),t.rect(e.x,e.y,e.width,e.height),this.visuals.background_fill.set_value(t),t.fill(),this.visuals.border_line.doit&&(this.visuals.border_line.set_value(t),t.stroke())},e.prototype._draw_legend_items=function(t,e){for(var i=this,l=this.model,n=l.glyph_width,r=l.glyph_height,a=this.legend_padding,s=this.model.spacing,h=this.model.label_standoff,_=a,d=a,c=\"vertical\"==this.model.orientation,g=function(l){var g,m,f=l.get_labels_list_from_label_prop(),p=l.get_field_from_label_prop();if(0==f.length)return\"continue\";for(var b=function(){switch(i.model.click_policy){case\"none\":return!0;case\"hide\":return o.every(l.renderers,function(t){return t.visible});case\"mute\":return o.every(l.renderers,function(t){return!t.muted})}}(),v=0,x=f;v<x.length;v++){var w=x[v],y=e.x+_,k=e.y+d+u.title_height,N=y+n,A=k+r;c?d+=u.max_label_height+s:_+=u.text_widths[w]+n+h+s,u.visuals.label_text.set_value(t),t.fillText(w,N+h,k+u.max_label_height/2);for(var L=0,z=l.renderers;L<z.length;L++){var B=z[L];u.plot_view.renderer_views[B.id].draw_legend(t,y,N,k,A,p,w,l.index)}if(!b){var T=void 0,M=void 0;c?(T=(g=[e.width-2*a,u.max_label_height])[0],M=g[1]):(T=(m=[u.text_widths[w]+n+h,u.max_label_height])[0],M=m[1]),t.beginPath(),t.rect(y,k,T,M),u.visuals.inactive_fill.set_value(t),t.fill()}}},u=this,m=0,f=this.model.items;m<f.length;m++){g(f[m])}},e.prototype._draw_title=function(t,e){this.visuals.title_text.doit&&(t.save(),t.translate(e.x0,e.y0+this.title_height),this.visuals.title_text.set_value(t),t.fillText(this.model.title,this.legend_padding,this.legend_padding-this.model.title_standoff),t.restore())},e.prototype._get_size=function(){var t=this.compute_legend_bbox(),e=t.width,i=t.height;return{width:e+2*this.model.margin,height:i+2*this.model.margin}},e}(n.AnnotationView);i.LegendView=c,c.__name__=\"LegendView\";var g=function(t){function e(e){return t.call(this,e)||this}return l.__extends(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.item_change=new a.Signal0(this,\"item_change\")},e.init_Legend=function(){this.prototype.default_view=c,this.mixins([\"text:label_\",\"text:title_\",\"fill:inactive_\",\"line:border_\",\"fill:background_\"]),this.define({orientation:[r.Orientation,\"vertical\"],location:[r.Any,\"top_right\"],title:[r.String],title_standoff:[r.Number,5],label_standoff:[r.Number,5],glyph_height:[r.Number,20],glyph_width:[r.Number,20],label_height:[r.Number,20],label_width:[r.Number,20],margin:[r.Number,10],padding:[r.Number,10],spacing:[r.Number,3],items:[r.Array,[]],click_policy:[r.Any,\"none\"]}),this.override({border_line_color:\"#e5e5e5\",border_line_alpha:.5,border_line_width:1,background_fill_color:\"#ffffff\",background_fill_alpha:.95,inactive_fill_color:\"white\",inactive_fill_alpha:.7,label_text_font_size:\"10pt\",label_text_baseline:\"middle\",title_text_font_size:\"10pt\",title_text_font_style:\"italic\"})},e.prototype.get_legend_names=function(){for(var t=[],e=0,i=this.items;e<i.length;e++){var l=i[e].get_labels_list_from_label_prop();t.push.apply(t,l)}return t},e}(n.Annotation);i.Legend=g,g.__name__=\"Legend\",g.init_Legend()},\n", | |
" function _(e,r,n){var t=e(113),l=e(166),i=e(171),o=e(232),a=e(121),s=e(167),_=e(110),u=function(e){function r(r){return e.call(this,r)||this}return t.__extends(r,e),r.init_LegendItem=function(){this.define({label:[a.StringSpec,null],renderers:[a.Array,[]],index:[a.Number,null]})},r.prototype._check_data_sources_on_renderers=function(){if(null!=this.get_field_from_label_prop()){if(this.renderers.length<1)return!1;var e=this.renderers[0].data_source;if(null!=e)for(var r=0,n=this.renderers;r<n.length;r++){if(n[r].data_source!=e)return!1}}return!0},r.prototype._check_field_label_on_data_source=function(){var e=this.get_field_from_label_prop();if(null!=e){if(this.renderers.length<1)return!1;var r=this.renderers[0].data_source;if(null!=r&&!_.includes(r.columns(),e))return!1}return!0},r.prototype.initialize=function(){var r=this;e.prototype.initialize.call(this),this.legend=null,this.connect(this.change,function(){null!=r.legend&&r.legend.item_change.emit()}),this._check_data_sources_on_renderers()||s.logger.error(\"Non matching data sources on legend item renderers\"),this._check_field_label_on_data_source()||s.logger.error(\"Bad column name on label: \"+this.label)},r.prototype.get_field_from_label_prop=function(){var e=this.label;return o.isField(e)?e.field:null},r.prototype.get_labels_list_from_label_prop=function(){if(o.isValue(this.label)){var e=this.label.value;return null!=e?[e]:[]}var r=this.get_field_from_label_prop();if(null!=r){var n=void 0;if(!this.renderers[0]||null==this.renderers[0].data_source)return[\"No source found\"];if((n=this.renderers[0].data_source)instanceof i.ColumnarDataSource){var t=n.get_column(r);return null!=t?_.uniq(Array.from(t)):[\"Invalid field\"]}}return[]},r}(l.Model);n.LegendItem=u,u.__name__=\"LegendItem\",u.init_LegendItem()},\n", | |
" function _(i,n,e){var t=i(109);e.isValue=function(i){return t.isPlainObject(i)&&\"value\"in i},e.isField=function(i){return t.isPlainObject(i)&&\"field\"in i}},\n", | |
" function _(t,i,n){var e=t(113),o=t(131),s=t(116),l=t(121),a=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype.connect_signals=function(){var i=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return i.plot_view.request_render()}),this.connect(this.model.data_update,function(){return i.plot_view.request_render()})},i.prototype.render=function(){if(this.model.visible){var t=this.model,i=t.xs,n=t.ys;if(i.length==n.length&&!(i.length<3||n.length<3)){for(var e=this.plot_view.frame,o=this.plot_view.canvas_view.ctx,s=0,l=i.length;s<l;s++){var a=void 0;if(\"screen\"!=this.model.xs_units)throw new Error(\"not implemented\");a=this.model.screen?i[s]:e.xview.compute(i[s]);var r=void 0;if(\"screen\"!=this.model.ys_units)throw new Error(\"not implemented\");r=this.model.screen?n[s]:e.yview.compute(n[s]),0==s?(o.beginPath(),o.moveTo(a,r)):o.lineTo(a,r)}o.closePath(),this.visuals.line.doit&&(this.visuals.line.set_value(o),o.stroke()),this.visuals.fill.doit&&(this.visuals.fill.set_value(o),o.fill())}}},i}(o.AnnotationView);n.PolyAnnotationView=a,a.__name__=\"PolyAnnotationView\";var r=function(t){function i(i){return t.call(this,i)||this}return e.__extends(i,t),i.init_PolyAnnotation=function(){this.prototype.default_view=a,this.mixins([\"line\",\"fill\"]),this.define({xs:[l.Array,[]],xs_units:[l.SpatialUnits,\"data\"],ys:[l.Array,[]],ys_units:[l.SpatialUnits,\"data\"],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),this.internal({screen:[l.Boolean,!1]}),this.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3})},i.prototype.initialize=function(){t.prototype.initialize.call(this),this.data_update=new s.Signal0(this,\"data_update\")},i.prototype.update=function(t){var i=t.xs,n=t.ys;this.setv({xs:i,ys:n,screen:!0},{silent:!0}),this.data_update.emit()},i}(o.Annotation);n.PolyAnnotation=r,r.__name__=\"PolyAnnotation\",r.init_PolyAnnotation()},\n", | |
" function _(e,t,n){var i=e(113),o=e(131),l=e(121),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this)},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return t.plot_view.request_render()})},t.prototype.render=function(){this.model.visible&&this._draw_slope()},t.prototype._draw_slope=function(){var e=this.model.gradient,t=this.model.y_intercept;if(null!=e&&null!=t){var n=this.plot_view.frame,i=n.xscales[this.model.x_range_name],o=n.yscales[this.model.y_range_name],l=n._top.value,r=l+n._height.value,a=(o.invert(l)-t)/e,s=(o.invert(r)-t)/e,_=i.compute(a),u=i.compute(s),p=this.plot_view.canvas_view.ctx;p.save(),p.beginPath(),this.visuals.line.set_value(p),p.moveTo(_,l),p.lineTo(u,r),p.stroke(),p.restore()}},t}(o.AnnotationView);n.SlopeView=r,r.__name__=\"SlopeView\";var a=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_Slope=function(){this.prototype.default_view=r,this.mixins([\"line\"]),this.define({gradient:[l.Number,null],y_intercept:[l.Number,null],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),this.override({line_color:\"black\"})},t}(o.Annotation);n.Slope=a,a.__name__=\"Slope\",a.init_Slope()},\n", | |
" function _(e,t,i){var n=e(113),o=e(131),l=e(163),s=e(121),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this.plot_view.canvas_overlays.appendChild(this.el),this.el.style.position=\"absolute\",l.undisplay(this.el)},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.model.for_hover?this.connect(this.model.properties.computed_location.change,function(){return t._draw_span()}):\"canvas\"==this.model.render_mode?(this.connect(this.model.change,function(){return t.plot_view.request_render()}),this.connect(this.model.properties.location.change,function(){return t.plot_view.request_render()})):(this.connect(this.model.change,function(){return t.render()}),this.connect(this.model.properties.location.change,function(){return t._draw_span()}))},t.prototype.render=function(){this.model.visible||\"css\"!=this.model.render_mode||l.undisplay(this.el),this.model.visible&&this._draw_span()},t.prototype._draw_span=function(){var e=this,t=this.model.for_hover?this.model.computed_location:this.model.location;if(null!=t){var i,n,o,s,a=this.plot_view.frame,r=a.xscales[this.model.x_range_name],h=a.yscales[this.model.y_range_name],d=function(i,n){return e.model.for_hover?e.model.computed_location:\"data\"==e.model.location_units?i.compute(t):n.compute(t)};if(\"width\"==this.model.dimension?(o=d(h,a.yview),n=a._left.value,s=a._width.value,i=this.model.properties.line_width.value()):(o=a._top.value,n=d(r,a.xview),s=this.model.properties.line_width.value(),i=a._height.value),\"css\"==this.model.render_mode)this.el.style.top=o+\"px\",this.el.style.left=n+\"px\",this.el.style.width=s+\"px\",this.el.style.height=i+\"px\",this.el.style.backgroundColor=this.model.properties.line_color.value(),this.el.style.opacity=this.model.properties.line_alpha.value(),l.display(this.el);else if(\"canvas\"==this.model.render_mode){var c=this.plot_view.canvas_view.ctx;c.save(),c.beginPath(),this.visuals.line.set_value(c),c.moveTo(n,o),\"width\"==this.model.dimension?c.lineTo(n+s,o):c.lineTo(n,o+i),c.stroke(),c.restore()}}else l.undisplay(this.el)},t}(o.AnnotationView);i.SpanView=a,a.__name__=\"SpanView\";var r=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.init_Span=function(){this.prototype.default_view=a,this.mixins([\"line\"]),this.define({render_mode:[s.RenderMode,\"canvas\"],x_range_name:[s.String,\"default\"],y_range_name:[s.String,\"default\"],location:[s.Number,null],location_units:[s.SpatialUnits,\"data\"],dimension:[s.Dimension,\"width\"]}),this.override({line_color:\"black\"}),this.internal({for_hover:[s.Boolean,!1],computed_location:[s.Number,null]})},t}(o.Annotation);i.Span=r,r.__name__=\"Span\",r.init_Span()},\n", | |
" function _(e,t,i){var l=e(113),a=e(228),r=e(163),n=e(165),o=e(121),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this.visuals.text=new n.Text(this.model)},t.prototype._get_location=function(){var e,t,i=this.panel,l=this.model.offset;switch(i.side){case\"above\":case\"below\":switch(this.model.vertical_align){case\"top\":t=i._top.value+5;break;case\"middle\":t=i._vcenter.value;break;case\"bottom\":t=i._bottom.value-5;break;default:throw new Error(\"unreachable code\")}switch(this.model.align){case\"left\":e=i._left.value+l;break;case\"center\":e=i._hcenter.value;break;case\"right\":e=i._right.value-l;break;default:throw new Error(\"unreachable code\")}break;case\"left\":switch(this.model.vertical_align){case\"top\":e=i._left.value-5;break;case\"middle\":e=i._hcenter.value;break;case\"bottom\":e=i._right.value+5;break;default:throw new Error(\"unreachable code\")}switch(this.model.align){case\"left\":t=i._bottom.value-l;break;case\"center\":t=i._vcenter.value;break;case\"right\":t=i._top.value+l;break;default:throw new Error(\"unreachable code\")}break;case\"right\":switch(this.model.vertical_align){case\"top\":e=i._right.value-5;break;case\"middle\":e=i._hcenter.value;break;case\"bottom\":e=i._left.value+5;break;default:throw new Error(\"unreachable code\")}switch(this.model.align){case\"left\":t=i._top.value+l;break;case\"center\":t=i._vcenter.value;break;case\"right\":t=i._bottom.value-l;break;default:throw new Error(\"unreachable code\")}break;default:throw new Error(\"unreachable code\")}return[e,t]},t.prototype.render=function(){if(this.model.visible){var e=this.model.text;if(null!=e&&0!=e.length){this.model.text_baseline=this.model.vertical_align,this.model.text_align=this.model.align;var t=this._get_location(),i=t[0],l=t[1],a=this.panel.get_label_angle_heuristic(\"parallel\");(\"canvas\"==this.model.render_mode?this._canvas_text.bind(this):this._css_text.bind(this))(this.plot_view.canvas_view.ctx,e,i,l,a)}}else\"css\"==this.model.render_mode&&r.undisplay(this.el)},t.prototype._get_size=function(){var e=this.model.text;if(null==e||0==e.length)return{width:0,height:0};this.visuals.text.set_value(this.ctx);var t=this.ctx.measureText(e);return{width:t.width,height:t.ascent*this.visuals.text.text_line_height.value()+10}},t}(a.TextAnnotationView);i.TitleView=s,s.__name__=\"TitleView\";var c=function(e){function t(t){return e.call(this,t)||this}return l.__extends(t,e),t.init_Title=function(){this.prototype.default_view=s,this.mixins([\"line:border_\",\"fill:background_\"]),this.define({text:[o.String],text_font:[o.Font,\"helvetica\"],text_font_size:[o.FontSizeSpec,\"10pt\"],text_font_style:[o.FontStyle,\"bold\"],text_color:[o.ColorSpec,\"#444444\"],text_alpha:[o.NumberSpec,1],text_line_height:[o.Number,1],vertical_align:[o.VerticalAlign,\"bottom\"],align:[o.TextAlign,\"left\"],offset:[o.Number,0]}),this.override({background_fill_color:null,border_line_color:null}),this.internal({text_align:[o.TextAlign,\"left\"],text_baseline:[o.TextBaseline,\"bottom\"]})},t}(a.TextAnnotation);i.Title=c,c.__name__=\"Title\",c.init_Title()},\n", | |
" function _(t,i,e){var o=t(113),l=t(131),n=t(194),s=t(163),r=t(121),a=function(t){function i(){var i=t.apply(this,arguments)||this;return i.rotate=!0,i}return o.__extends(i,t),i.prototype.initialize=function(){t.prototype.initialize.call(this),this.plot_view.canvas_events.appendChild(this.el),this._toolbar_views={},n.build_views(this._toolbar_views,[this.model.toolbar],{parent:this});var i=this._toolbar_views[this.model.toolbar.id];this.plot_view.visibility_callbacks.push(function(t){return i.set_visibility(t)})},i.prototype.remove=function(){n.remove_views(this._toolbar_views),t.prototype.remove.call(this)},i.prototype.render=function(){if(t.prototype.render.call(this),this.model.visible){this.el.style.position=\"absolute\",this.el.style.overflow=\"hidden\",s.position(this.el,this.panel.bbox);var i=this._toolbar_views[this.model.toolbar.id];i.render(),s.empty(this.el),this.el.appendChild(i.el),s.display(this.el)}else s.undisplay(this.el)},i.prototype._get_size=function(){var t=this.model.toolbar,i=t.tools,e=t.logo;return{width:30*i.length+(null!=e?25:0),height:30}},i}(l.AnnotationView);e.ToolbarPanelView=a,a.__name__=\"ToolbarPanelView\";var h=function(t){function i(i){return t.call(this,i)||this}return o.__extends(i,t),i.init_ToolbarPanel=function(){this.prototype.default_view=a,this.define({toolbar:[r.Instance]})},i}(l.Annotation);e.ToolbarPanel=h,h.__name__=\"ToolbarPanel\",h.init_ToolbarPanel()},\n", | |
" function _(t,e,i){var s=t(113),o=t(131),l=t(163),a=t(121),n=t(239),h=t(240);function r(t,e,i,s,o){switch(t){case\"horizontal\":return e<s?\"right\":\"left\";case\"vertical\":return i<o?\"below\":\"above\";default:return t}}i.compute_side=r;var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.plot_view.canvas_overlays.appendChild(this.el),l.undisplay(this.el)},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.data.change,function(){return e._draw_tips()})},e.prototype.css_classes=function(){return t.prototype.css_classes.call(this).concat(n.bk_tooltip)},e.prototype.render=function(){this.model.visible&&this._draw_tips()},e.prototype._draw_tips=function(){var t=this.model.data;if(l.empty(this.el),l.undisplay(this.el),this.model.custom?this.el.classList.add(n.bk_tooltip_custom):this.el.classList.remove(n.bk_tooltip_custom),0!=t.length){for(var e=this.plot_view.frame,i=0,s=t;i<s.length;i++){var o=s[i],a=o[0],c=o[1],d=o[2];if(!this.model.inner_only||e.bbox.contains(a,c)){var p=l.div({},d);this.el.appendChild(p)}}var _=t[t.length-1],f=_[0],u=_[1],v=r(this.model.attachment,f,u,e._hcenter.value,e._vcenter.value);this.el.classList.remove(h.bk_right),this.el.classList.remove(h.bk_left),this.el.classList.remove(h.bk_above),this.el.classList.remove(h.bk_below);var b,y;switch(l.display(this.el),v){case\"right\":this.el.classList.add(h.bk_left),b=f+(this.el.offsetWidth-this.el.clientWidth)+10,y=u-this.el.offsetHeight/2;break;case\"left\":this.el.classList.add(h.bk_right),b=f-this.el.offsetWidth-10,y=u-this.el.offsetHeight/2;break;case\"below\":this.el.classList.add(h.bk_above),y=u+(this.el.offsetHeight-this.el.clientHeight)+10,b=Math.round(f-this.el.offsetWidth/2);break;case\"above\":this.el.classList.add(h.bk_below),y=u-this.el.offsetHeight-10,b=Math.round(f-this.el.offsetWidth/2);break;default:throw new Error(\"unreachable code\")}this.model.show_arrow&&this.el.classList.add(n.bk_tooltip_arrow),this.el.childNodes.length>0?(this.el.style.top=y+\"px\",this.el.style.left=b+\"px\"):l.undisplay(this.el)}},e}(o.AnnotationView);i.TooltipView=c,c.__name__=\"TooltipView\";var d=function(t){function e(e){return t.call(this,e)||this}return s.__extends(e,t),e.init_Tooltip=function(){this.prototype.default_view=c,this.define({attachment:[a.TooltipAttachment,\"horizontal\"],inner_only:[a.Boolean,!0],show_arrow:[a.Boolean,!0]}),this.override({level:\"overlay\"}),this.internal({data:[a.Any,[]],custom:[a.Any]})},e.prototype.clear=function(){this.data=[]},e.prototype.add=function(t,e,i){this.data=this.data.concat([[t,e,i]])},e}(o.Annotation);i.Tooltip=d,d.__name__=\"Tooltip\",d.init_Tooltip()},\n", | |
" function _(o,t,n){o(164),o(163).styles.append('.bk-root {\\n /* Same border color used everywhere */\\n /* Gray of icons */\\n}\\n.bk-root .bk-tooltip {\\n font-weight: 300;\\n font-size: 12px;\\n position: absolute;\\n padding: 5px;\\n border: 1px solid #e5e5e5;\\n color: #2f2f2f;\\n background-color: white;\\n pointer-events: none;\\n opacity: 0.95;\\n z-index: 100;\\n}\\n.bk-root .bk-tooltip > div:not(:first-child) {\\n /* gives space when multiple elements are being hovered over */\\n margin-top: 5px;\\n border-top: #e5e5e5 1px dashed;\\n}\\n.bk-root .bk-tooltip.bk-left.bk-tooltip-arrow::before {\\n position: absolute;\\n margin: -7px 0 0 0;\\n top: 50%;\\n width: 0;\\n height: 0;\\n border-style: solid;\\n border-width: 7px 0 7px 0;\\n border-color: transparent;\\n content: \" \";\\n display: block;\\n left: -10px;\\n border-right-width: 10px;\\n border-right-color: #909599;\\n}\\n.bk-root .bk-tooltip.bk-left::before {\\n left: -10px;\\n border-right-width: 10px;\\n border-right-color: #909599;\\n}\\n.bk-root .bk-tooltip.bk-right.bk-tooltip-arrow::after {\\n position: absolute;\\n margin: -7px 0 0 0;\\n top: 50%;\\n width: 0;\\n height: 0;\\n border-style: solid;\\n border-width: 7px 0 7px 0;\\n border-color: transparent;\\n content: \" \";\\n display: block;\\n right: -10px;\\n border-left-width: 10px;\\n border-left-color: #909599;\\n}\\n.bk-root .bk-tooltip.bk-right::after {\\n right: -10px;\\n border-left-width: 10px;\\n border-left-color: #909599;\\n}\\n.bk-root .bk-tooltip.bk-above::before {\\n position: absolute;\\n margin: 0 0 0 -7px;\\n left: 50%;\\n width: 0;\\n height: 0;\\n border-style: solid;\\n border-width: 0 7px 0 7px;\\n border-color: transparent;\\n content: \" \";\\n display: block;\\n top: -10px;\\n border-bottom-width: 10px;\\n border-bottom-color: #909599;\\n}\\n.bk-root .bk-tooltip.bk-below::after {\\n position: absolute;\\n margin: 0 0 0 -7px;\\n left: 50%;\\n width: 0;\\n height: 0;\\n border-style: solid;\\n border-width: 0 7px 0 7px;\\n border-color: transparent;\\n content: \" \";\\n display: block;\\n bottom: -10px;\\n border-top-width: 10px;\\n border-top-color: #909599;\\n}\\n.bk-root .bk-tooltip-row-label {\\n text-align: right;\\n color: #26aae1;\\n /* blue from toolbar highlighting */\\n}\\n.bk-root .bk-tooltip-row-value {\\n color: default;\\n /* seems to be necessary for notebook */\\n}\\n.bk-root .bk-tooltip-color-block {\\n width: 12px;\\n height: 12px;\\n margin-left: 5px;\\n margin-right: 5px;\\n outline: #dddddd solid 1px;\\n display: inline-block;\\n}\\n'),n.bk_tooltip=\"bk-tooltip\",n.bk_tooltip_arrow=\"bk-tooltip-arrow\",n.bk_tooltip_custom=\"bk-tooltip-custom\",n.bk_tooltip_row_label=\"bk-tooltip-row-label\",n.bk_tooltip_row_value=\"bk-tooltip-row-value\",n.bk_tooltip_color_block=\"bk-tooltip-color-block\"},\n", | |
" function _(b,e,k){b(163).styles.append(\"\"),k.bk_active=\"bk-active\",k.bk_inline=\"bk-inline\",k.bk_left=\"bk-left\",k.bk_right=\"bk-right\",k.bk_above=\"bk-above\",k.bk_below=\"bk-below\",k.bk_up=\"bk-up\",k.bk_down=\"bk-down\",k.bk_side=function(b){switch(b){case\"above\":return k.bk_above;case\"below\":return k.bk_below;case\"left\":return k.bk_left;case\"right\":return k.bk_right}}},\n", | |
" function _(e,t,i){var s=e(113),n=e(131),r=e(170),o=e(169),a=e(121),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this.set_data(this.model.source)},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return t.set_data(t.model.source)}),this.connect(this.model.source.patching,function(){return t.set_data(t.model.source)}),this.connect(this.model.source.change,function(){return t.set_data(t.model.source)})},t.prototype.set_data=function(t){e.prototype.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},t.prototype._map_data=function(){var e,t,i,s=this.plot_view.frame,n=this.model.dimension,r=s.xscales[this.model.x_range_name],o=s.yscales[this.model.y_range_name],a=\"height\"==n?o:r,h=\"height\"==n?r:o,_=\"height\"==n?s.yview:s.xview,l=\"height\"==n?s.xview:s.yview;e=\"data\"==this.model.properties.lower.units?a.v_compute(this._lower):_.v_compute(this._lower),t=\"data\"==this.model.properties.upper.units?a.v_compute(this._upper):_.v_compute(this._upper),i=\"data\"==this.model.properties.base.units?h.v_compute(this._base):l.v_compute(this._base);var u=\"height\"==n?[1,0]:[0,1],p=u[0],c=u[1],d=[e,i],m=[t,i];this._lower_sx=d[p],this._lower_sy=d[c],this._upper_sx=m[p],this._upper_sy=m[c]},t.prototype.render=function(){if(this.model.visible){this._map_data();var e=this.plot_view.canvas_view.ctx;if(this.visuals.line.doit)for(var t=0,i=this._lower_sx.length;t<i;t++)this.visuals.line.set_vectorize(e,t),e.beginPath(),e.moveTo(this._lower_sx[t],this._lower_sy[t]),e.lineTo(this._upper_sx[t],this._upper_sy[t]),e.stroke();var s=\"height\"==this.model.dimension?0:Math.PI/2;if(null!=this.model.lower_head)for(t=0,i=this._lower_sx.length;t<i;t++)e.save(),e.translate(this._lower_sx[t],this._lower_sy[t]),e.rotate(s+Math.PI),this.model.lower_head.render(e,t),e.restore();if(null!=this.model.upper_head)for(t=0,i=this._upper_sx.length;t<i;t++)e.save(),e.translate(this._upper_sx[t],this._upper_sy[t]),e.rotate(s),this.model.upper_head.render(e,t),e.restore()}},t}(n.AnnotationView);i.WhiskerView=h,h.__name__=\"WhiskerView\";var _=function(e){function t(t){return e.call(this,t)||this}return s.__extends(t,e),t.init_Whisker=function(){this.prototype.default_view=h,this.mixins([\"line\"]),this.define({lower:[a.DistanceSpec],lower_head:[a.Instance,function(){return new o.TeeHead({level:\"underlay\",size:10})}],upper:[a.DistanceSpec],upper_head:[a.Instance,function(){return new o.TeeHead({level:\"underlay\",size:10})}],base:[a.DistanceSpec],dimension:[a.Dimension,\"height\"],source:[a.Instance,function(){return new r.ColumnDataSource}],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),this.override({level:\"underlay\"})},t}(n.Annotation);i.Whisker=_,_.__name__=\"Whisker\",_.init_Whisker()},\n", | |
" function _(i,a,s){var r=i(243);s.Axis=r.Axis;var x=i(245);s.CategoricalAxis=x.CategoricalAxis;var A=i(248);s.ContinuousAxis=A.ContinuousAxis;var o=i(249);s.DatetimeAxis=o.DatetimeAxis;var t=i(250);s.LinearAxis=t.LinearAxis;var e=i(263);s.LogAxis=e.LogAxis;var n=i(266);s.MercatorAxis=n.MercatorAxis},\n", | |
" function _(e,t,i){var a=e(113),r=e(244),n=e(121),o=e(110),s=e(109),l=e(184),_=Math.abs,h=Math.min,u=Math.max,c=function(e){function t(){var t=e.apply(this,arguments)||this;return t.rotate=!0,t}return a.__extends(t,e),Object.defineProperty(t.prototype,\"panel\",{get:function(){return this.layout},enumerable:!0,configurable:!0}),t.prototype.render=function(){if(this.model.visible){var e={tick:this._tick_extent(),tick_label:this._tick_label_extents(),axis_label:this._axis_label_extent()},t=this.tick_coords,i=this.plot_view.canvas_view.ctx;i.save(),this._draw_rule(i,e),this._draw_major_ticks(i,e,t),this._draw_minor_ticks(i,e,t),this._draw_major_labels(i,e,t),this._draw_axis_label(i,e,t),null!=this._render&&this._render(i,e,t),i.restore()}},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return t.plot_view.request_paint()});var i=this.model.properties;this.on_change(i.visible,function(){return t.plot_view.request_layout()})},t.prototype.get_size=function(){if(this.model.visible&&null==this.model.fixed_location){var e=this._get_size();return{width:0,height:Math.round(e)}}return{width:0,height:0}},t.prototype._get_size=function(){return this._tick_extent()+this._tick_label_extent()+this._axis_label_extent()},Object.defineProperty(t.prototype,\"needs_clip\",{get:function(){return null!=this.model.fixed_location},enumerable:!0,configurable:!0}),t.prototype._draw_rule=function(e,t){if(this.visuals.axis_line.doit){var i=this.rule_coords,a=i[0],r=i[1],n=this.plot_view.map_to_screen(a,r,this.model.x_range_name,this.model.y_range_name),o=n[0],s=n[1],l=this.normals,_=l[0],h=l[1],u=this.offsets,c=u[0],d=u[1];this.visuals.axis_line.set_value(e),e.beginPath(),e.moveTo(Math.round(o[0]+_*c),Math.round(s[0]+h*d));for(var m=1;m<o.length;m++){var b=Math.round(o[m]+_*c),p=Math.round(s[m]+h*d);e.lineTo(b,p)}e.stroke()}},t.prototype._draw_major_ticks=function(e,t,i){var a=this.model.major_tick_in,r=this.model.major_tick_out,n=this.visuals.major_tick_line;this._draw_ticks(e,i.major,a,r,n)},t.prototype._draw_minor_ticks=function(e,t,i){var a=this.model.minor_tick_in,r=this.model.minor_tick_out,n=this.visuals.minor_tick_line;this._draw_ticks(e,i.minor,a,r,n)},t.prototype._draw_major_labels=function(e,t,i){var a=i.major,r=this.compute_labels(a[this.dimension]),n=this.model.major_label_orientation,o=t.tick+this.model.major_label_standoff,s=this.visuals.major_label_text;this._draw_oriented_labels(e,r,a,n,this.panel.side,o,s)},t.prototype._draw_axis_label=function(e,t,i){if(null!=this.model.axis_label&&0!=this.model.axis_label.length&&null==this.model.fixed_location){var a,r;switch(this.panel.side){case\"above\":a=this.panel._hcenter.value,r=this.panel._bottom.value;break;case\"below\":a=this.panel._hcenter.value,r=this.panel._top.value;break;case\"left\":a=this.panel._right.value,r=this.panel._vcenter.value;break;case\"right\":a=this.panel._left.value,r=this.panel._vcenter.value;break;default:throw new Error(\"unknown side: \"+this.panel.side)}var n=[[a],[r]],s=t.tick+o.sum(t.tick_label)+this.model.axis_label_standoff,l=this.visuals.axis_label_text;this._draw_oriented_labels(e,[this.model.axis_label],n,\"parallel\",this.panel.side,s,l,\"screen\")}},t.prototype._draw_ticks=function(e,t,i,a,r){if(r.doit){var n=t[0],o=t[1],s=this.plot_view.map_to_screen(n,o,this.model.x_range_name,this.model.y_range_name),l=s[0],_=s[1],h=this.normals,u=h[0],c=h[1],d=this.offsets,m=d[0],b=d[1],p=[u*(m-i),c*(b-i)],f=p[0],v=p[1],x=[u*(m+a),c*(b+a)],g=x[0],y=x[1];r.set_value(e);for(var k=0;k<l.length;k++){var w=Math.round(l[k]+g),j=Math.round(_[k]+y),M=Math.round(l[k]+f),A=Math.round(_[k]+v);e.beginPath(),e.moveTo(w,j),e.lineTo(M,A),e.stroke()}}},t.prototype._draw_oriented_labels=function(e,t,i,a,r,n,o,l){var _,h,u;if(void 0===l&&(l=\"data\"),o.doit&&0!=t.length){var c,d,m,b;if(\"screen\"==l)c=i[0],d=i[1],m=(_=[0,0])[0],b=_[1];else{var p=i[0],f=i[1];c=(h=this.plot_view.map_to_screen(p,f,this.model.x_range_name,this.model.y_range_name))[0],d=h[1],m=(u=this.offsets)[0],b=u[1]}var v,x=this.normals,g=x[0]*(m+n),y=x[1]*(b+n);o.set_value(e),this.panel.apply_label_text_heuristics(e,a),v=s.isString(a)?this.panel.get_label_angle_heuristic(a):-a;for(var k=0;k<c.length;k++){var w=Math.round(c[k]+g),j=Math.round(d[k]+y);e.translate(w,j),e.rotate(v),e.fillText(t[k],0,0),e.rotate(-v),e.translate(-w,-j)}}},t.prototype._axis_label_extent=function(){if(null==this.model.axis_label||\"\"==this.model.axis_label)return 0;var e=this.model.axis_label_standoff,t=this.visuals.axis_label_text;return this._oriented_labels_extent([this.model.axis_label],\"parallel\",this.panel.side,e,t)},t.prototype._tick_extent=function(){return this.model.major_tick_out},t.prototype._tick_label_extent=function(){return o.sum(this._tick_label_extents())},t.prototype._tick_label_extents=function(){var e=this.tick_coords.major,t=this.compute_labels(e[this.dimension]),i=this.model.major_label_orientation,a=this.model.major_label_standoff,r=this.visuals.major_label_text;return[this._oriented_labels_extent(t,i,this.panel.side,a,r)]},t.prototype._oriented_labels_extent=function(e,t,i,a,r){if(0==e.length)return 0;var n,o,l=this.plot_view.canvas_view.ctx;r.set_value(l),s.isString(t)?(n=1,o=this.panel.get_label_angle_heuristic(t)):(n=2,o=-t),o=Math.abs(o);for(var _=Math.cos(o),h=Math.sin(o),u=0,c=0;c<e.length;c++){var d=1.1*l.measureText(e[c]).width,m=.9*l.measureText(e[c]).ascent,b=void 0;(b=\"above\"==i||\"below\"==i?d*h+m/n*_:d*_+m/n*h)>u&&(u=b)}return u>0&&(u+=a),u},Object.defineProperty(t.prototype,\"normals\",{get:function(){return this.panel.normals},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"dimension\",{get:function(){return this.panel.dimension},enumerable:!0,configurable:!0}),t.prototype.compute_labels=function(e){for(var t=this.model.formatter.doFormat(e,this),i=0;i<e.length;i++)e[i]in this.model.major_label_overrides&&(t[i]=this.model.major_label_overrides[e[i]]);return t},Object.defineProperty(t.prototype,\"offsets\",{get:function(){if(null!=this.model.fixed_location)return[0,0];var e=this.plot_view.frame,t=[0,0],i=t[0],a=t[1];switch(this.panel.side){case\"below\":a=_(this.panel._top.value-e._bottom.value);break;case\"above\":a=_(this.panel._bottom.value-e._top.value);break;case\"right\":i=_(this.panel._left.value-e._right.value);break;case\"left\":i=_(this.panel._right.value-e._left.value)}return[i,a]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"ranges\",{get:function(){var e=this.dimension,t=(e+1)%2,i=this.plot_view.frame,a=[i.x_ranges[this.model.x_range_name],i.y_ranges[this.model.y_range_name]];return[a[e],a[t]]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"computed_bounds\",{get:function(){var e=this.ranges[0],t=this.model.bounds,i=[e.min,e.max];if(\"auto\"==t)return[e.min,e.max];if(s.isArray(t)){var a=void 0,r=void 0,n=t[0],o=t[1],l=i[0],c=i[1];return _(n-o)>_(l-c)?(a=u(h(n,o),l),r=h(u(n,o),c)):(a=h(n,o),r=u(n,o)),[a,r]}throw new Error(\"user bounds '\"+t+\"' not understood\")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"rule_coords\",{get:function(){var e=this.dimension,t=(e+1)%2,i=this.ranges[0],a=this.computed_bounds,r=a[0],n=a[1],o=[new Array(2),new Array(2)];return o[e][0]=Math.max(r,i.min),o[e][1]=Math.min(n,i.max),o[e][0]>o[e][1]&&(o[e][0]=o[e][1]=NaN),o[t][0]=this.loc,o[t][1]=this.loc,o},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"tick_coords\",{get:function(){for(var e=this.dimension,t=(e+1)%2,i=this.ranges[0],a=this.computed_bounds,r=a[0],n=a[1],o=this.model.ticker.get_ticks(r,n,i,this.loc,{}),s=o.major,l=o.minor,_=[[],[]],h=[[],[]],u=[i.min,i.max],c=u[0],d=u[1],m=0;m<s.length;m++)s[m]<c||s[m]>d||(_[e].push(s[m]),_[t].push(this.loc));for(m=0;m<l.length;m++)l[m]<c||l[m]>d||(h[e].push(l[m]),h[t].push(this.loc));return{major:_,minor:h}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"loc\",{get:function(){var e=this.model.fixed_location;if(null!=e){if(s.isNumber(e))return e;var t=this.ranges[1];if(t instanceof l.FactorRange)return t.synthetic(e);throw new Error(\"unexpected\")}var i=this.ranges[1];switch(this.panel.side){case\"left\":case\"below\":return i.start;case\"right\":case\"above\":return i.end}},enumerable:!0,configurable:!0}),t.prototype.serializable_state=function(){return Object.assign(Object.assign({},e.prototype.serializable_state.call(this)),{bbox:this.layout.bbox.box})},t}(r.GuideRendererView);i.AxisView=c,c.__name__=\"AxisView\";var d=function(e){function t(t){return e.call(this,t)||this}return a.__extends(t,e),t.init_Axis=function(){this.prototype.default_view=c,this.mixins([\"line:axis_\",\"line:major_tick_\",\"line:minor_tick_\",\"text:major_label_\",\"text:axis_label_\"]),this.define({bounds:[n.Any,\"auto\"],ticker:[n.Instance],formatter:[n.Instance],x_range_name:[n.String,\"default\"],y_range_name:[n.String,\"default\"],axis_label:[n.String,\"\"],axis_label_standoff:[n.Int,5],major_label_standoff:[n.Int,5],major_label_orientation:[n.Any,\"horizontal\"],major_label_overrides:[n.Any,{}],major_tick_in:[n.Number,2],major_tick_out:[n.Number,6],minor_tick_in:[n.Number,0],minor_tick_out:[n.Number,4],fixed_location:[n.Any,null]}),this.override({axis_line_color:\"black\",major_tick_line_color:\"black\",minor_tick_line_color:\"black\",major_label_text_font_size:\"8pt\",major_label_text_align:\"center\",major_label_text_baseline:\"alphabetic\",axis_label_text_font_size:\"10pt\",axis_label_text_font_style:\"italic\"})},t}(r.GuideRenderer);i.Axis=d,d.__name__=\"Axis\",d.init_Axis()},\n", | |
" function _(e,n,r){var i=e(113),t=e(160),d=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(n,e),n}(t.RendererView);r.GuideRendererView=d,d.__name__=\"GuideRendererView\";var u=function(e){function n(n){return e.call(this,n)||this}return i.__extends(n,e),n.init_GuideRenderer=function(){this.override({level:\"overlay\"})},n}(t.Renderer);r.GuideRenderer=u,u.__name__=\"GuideRenderer\",u.init_GuideRenderer()},\n", | |
" function _(t,o,e){var i=t(113),r=t(243),s=t(246),a=t(247),n=t(121),l=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(o,t),o.prototype._render=function(t,o,e){this._draw_group_separators(t,o,e)},o.prototype._draw_group_separators=function(t,o,e){var i,r=this.ranges[0],s=this.computed_bounds,a=s[0],n=s[1];if(r.tops&&!(r.tops.length<2)&&this.visuals.separator_line.doit){for(var l=this.dimension,_=(l+1)%2,u=[[],[]],p=0,h=0;h<r.tops.length-1;h++){for(var c=void 0,m=void 0,d=p;d<r.factors.length;d++)if(r.factors[d][0]==r.tops[h+1]){c=(i=[r.factors[d-1],r.factors[d]])[0],m=i[1],p=d;break}var f=(r.synthetic(c)+r.synthetic(m))/2;f>a&&f<n&&(u[l].push(f),u[_].push(this.loc))}var g=this._tick_label_extent();this._draw_ticks(t,u,-3,g-6,this.visuals.separator_line)}},o.prototype._draw_major_labels=function(t,o,e){for(var i=this._get_factor_info(),r=o.tick+this.model.major_label_standoff,s=0;s<i.length;s++){var a=i[s],n=a[0],l=a[1],_=a[2],u=a[3];this._draw_oriented_labels(t,n,l,_,this.panel.side,r,u),r+=o.tick_label[s]}},o.prototype._tick_label_extents=function(){for(var t=[],o=0,e=this._get_factor_info();o<e.length;o++){var i=e[o],r=i[0],s=i[2],a=i[3],n=this._oriented_labels_extent(r,s,this.panel.side,this.model.major_label_standoff,a);t.push(n)}return t},o.prototype._get_factor_info=function(){var t=this.ranges[0],o=this.computed_bounds,e=o[0],i=o[1],r=this.loc,s=this.model.ticker.get_ticks(e,i,t,r,{}),a=this.tick_coords,n=[];if(1==t.levels){var l=s.major,_=this.model.formatter.doFormat(l,this);n.push([_,a.major,this.model.major_label_orientation,this.visuals.major_label_text])}else if(2==t.levels){l=s.major.map(function(t){return t[1]}),_=this.model.formatter.doFormat(l,this);n.push([_,a.major,this.model.major_label_orientation,this.visuals.major_label_text]),n.push([s.tops,a.tops,this.model.group_label_orientation,this.visuals.group_text])}else if(3==t.levels){l=s.major.map(function(t){return t[2]}),_=this.model.formatter.doFormat(l,this);var u=s.mids.map(function(t){return t[1]});n.push([_,a.major,this.model.major_label_orientation,this.visuals.major_label_text]),n.push([u,a.mids,this.model.subgroup_label_orientation,this.visuals.subgroup_text]),n.push([s.tops,a.tops,this.model.group_label_orientation,this.visuals.group_text])}return n},Object.defineProperty(o.prototype,\"tick_coords\",{get:function(){var t=this,o=this.dimension,e=(o+1)%2,i=this.ranges[0],r=this.computed_bounds,s=r[0],a=r[1],n=this.model.ticker.get_ticks(s,a,i,this.loc,{}),l={major:[[],[]],mids:[[],[]],tops:[[],[]],minor:[[],[]]};return l.major[o]=n.major,l.major[e]=n.major.map(function(o){return t.loc}),3==i.levels&&(l.mids[o]=n.mids,l.mids[e]=n.mids.map(function(o){return t.loc})),i.levels>1&&(l.tops[o]=n.tops,l.tops[e]=n.tops.map(function(o){return t.loc})),l},enumerable:!0,configurable:!0}),o}(r.AxisView);e.CategoricalAxisView=l,l.__name__=\"CategoricalAxisView\";var _=function(t){function o(o){return t.call(this,o)||this}return i.__extends(o,t),o.init_CategoricalAxis=function(){this.prototype.default_view=l,this.mixins([\"line:separator_\",\"text:group_\",\"text:subgroup_\"]),this.define({group_label_orientation:[n.Any,\"parallel\"],subgroup_label_orientation:[n.Any,\"parallel\"]}),this.override({ticker:function(){return new s.CategoricalTicker},formatter:function(){return new a.CategoricalTickFormatter},separator_line_color:\"lightgrey\",separator_line_width:2,group_text_font_style:\"bold\",group_text_font_size:\"8pt\",group_text_color:\"grey\",subgroup_text_font_style:\"bold\",subgroup_text_font_size:\"8pt\"})},o}(r.Axis);e.CategoricalAxis=_,_.__name__=\"CategoricalAxis\",_.init_CategoricalAxis()},\n", | |
" function _(t,c,r){var e=t(113),o=function(t){function c(c){return t.call(this,c)||this}return e.__extends(c,t),c.prototype.get_ticks=function(t,c,r,e,o){return{major:this._collect(r.factors,r,t,c),minor:[],tops:this._collect(r.tops||[],r,t,c),mids:this._collect(r.mids||[],r,t,c)}},c.prototype._collect=function(t,c,r,e){for(var o=[],i=0,n=t;i<n.length;i++){var s=n[i],l=c.synthetic(s);l>r&&l<e&&o.push(s)}return o},c}(t(207).Ticker);r.CategoricalTicker=o,o.__name__=\"CategoricalTicker\"},\n", | |
" function _(t,r,o){var n=t(113),e=t(209),a=t(110),c=function(t){function r(r){return t.call(this,r)||this}return n.__extends(r,t),r.prototype.doFormat=function(t,r){return a.copy(t)},r}(e.TickFormatter);o.CategoricalTickFormatter=c,c.__name__=\"CategoricalTickFormatter\"},\n", | |
" function _(n,i,t){var u=n(113),s=function(n){function i(i){return n.call(this,i)||this}return u.__extends(i,n),i}(n(243).Axis);t.ContinuousAxis=s,s.__name__=\"ContinuousAxis\"},\n", | |
" function _(t,e,i){var n=t(113),r=t(250),a=t(251),s=t(256),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(r.LinearAxisView);i.DatetimeAxisView=u,u.__name__=\"DatetimeAxisView\";var _=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_DatetimeAxis=function(){this.prototype.default_view=u,this.override({ticker:function(){return new s.DatetimeTicker},formatter:function(){return new a.DatetimeTickFormatter}})},e}(r.LinearAxis);i.DatetimeAxis=_,_.__name__=\"DatetimeAxis\",_.init_DatetimeAxis()},\n", | |
" function _(i,n,t){var e=i(113),r=i(243),s=i(248),u=i(208),a=i(204),_=function(i){function n(){return null!==i&&i.apply(this,arguments)||this}return e.__extends(n,i),n}(r.AxisView);t.LinearAxisView=_,_.__name__=\"LinearAxisView\";var o=function(i){function n(n){return i.call(this,n)||this}return e.__extends(n,i),n.init_LinearAxis=function(){this.prototype.default_view=_,this.override({ticker:function(){return new a.BasicTicker},formatter:function(){return new u.BasicTickFormatter}})},n}(s.ContinuousAxis);t.LinearAxis=o,o.__name__=\"LinearAxis\",o.init_LinearAxis()},\n", | |
" function _(t,r,e){var s=t(113),i=t(252),n=t(209),o=t(167),a=t(121),u=t(253),c=t(110),m=t(109);function h(t){return i(t,\"%Y %m %d %H %M %S\").split(/\\s+/).map(function(t){return parseInt(t,10)})}function d(t,r){if(m.isFunction(r))return r(t);var e=u.sprintf(\"$1%06d\",function(t){return Math.round(t/1e3%1*1e6)}(t));return-1==(r=r.replace(/((^|[^%])(%%)*)%f/,e)).indexOf(\"%\")?r:i(t,r)}var f=[\"microseconds\",\"milliseconds\",\"seconds\",\"minsec\",\"minutes\",\"hourmin\",\"hours\",\"days\",\"months\",\"years\"],l=function(t){function r(r){var e=t.call(this,r)||this;return e.strip_leading_zeros=!0,e}return s.__extends(r,t),r.init_DatetimeTickFormatter=function(){this.define({microseconds:[a.Array,[\"%fus\"]],milliseconds:[a.Array,[\"%3Nms\",\"%S.%3Ns\"]],seconds:[a.Array,[\"%Ss\"]],minsec:[a.Array,[\":%M:%S\"]],minutes:[a.Array,[\":%M\",\"%Mm\"]],hourmin:[a.Array,[\"%H:%M\"]],hours:[a.Array,[\"%Hh\",\"%H:%M\"]],days:[a.Array,[\"%m/%d\",\"%a%d\"]],months:[a.Array,[\"%m/%Y\",\"%b %Y\"]],years:[a.Array,[\"%Y\"]]})},r.prototype.initialize=function(){t.prototype.initialize.call(this),this._update_width_formats()},r.prototype._update_width_formats=function(){var t=+i(new Date),r=function(r){var e=r.map(function(r){return d(t,r).length}),s=c.sort_by(c.zip(e,r),function(t){return t[0]});return c.unzip(s)};this._width_formats={microseconds:r(this.microseconds),milliseconds:r(this.milliseconds),seconds:r(this.seconds),minsec:r(this.minsec),minutes:r(this.minutes),hourmin:r(this.hourmin),hours:r(this.hours),days:r(this.days),months:r(this.months),years:r(this.years)}},r.prototype._get_resolution_str=function(t,r){var e=1.1*t;switch(!1){case!(e<.001):return\"microseconds\";case!(e<1):return\"milliseconds\";case!(e<60):return r>=60?\"minsec\":\"seconds\";case!(e<3600):return r>=3600?\"hourmin\":\"minutes\";case!(e<86400):return\"hours\";case!(e<2678400):return\"days\";case!(e<31536e3):return\"months\";default:return\"years\"}},r.prototype.doFormat=function(t,r){if(0==t.length)return[];for(var e=Math.abs(t[t.length-1]-t[0])/1e3,s=e/(t.length-1),i=this._get_resolution_str(s,e),n=this._width_formats[i][1][0],a=[],u=f.indexOf(i),c={},m=0,l=f;m<l.length;m++){c[l[m]]=0}c.seconds=5,c.minsec=4,c.minutes=4,c.hourmin=3,c.hours=3;for(var _=0,p=t;_<p.length;_++){var y=p[_],g=void 0,v=void 0;try{v=h(y),g=d(y,n)}catch(t){o.logger.warn(\"unable to format tick for timestamp value \"+y),o.logger.warn(\" - \"+t),a.push(\"ERR\");continue}for(var w=!1,A=u;0==v[c[f[A]]];){if((A+=1)==f.length)break;if((\"minsec\"==i||\"hourmin\"==i)&&!w){if(\"minsec\"==i&&0==v[4]&&0!=v[5]||\"hourmin\"==i&&0==v[3]&&0!=v[4]){g=d(y,this._width_formats[f[u-1]][1][0]);break}w=!0}g=d(y,this._width_formats[f[A]][1][0])}if(this.strip_leading_zeros){var k=g.replace(/^0+/g,\"\");k!=g&&isNaN(parseInt(k))&&(k=\"0\"+k),a.push(k)}else a.push(g)}return a},r}(n.TickFormatter);e.DatetimeTickFormatter=l,l.__name__=\"DatetimeTickFormatter\",l.init_DatetimeTickFormatter()},\n", | |
" function _(e,t,n){!function(e){\"object\"==typeof t&&t.exports?t.exports=e():\"function\"==typeof define?define(e):this.tz=e()}(function(){function e(e,t,n){var r,o=t.day[1];do{r=new Date(Date.UTC(n,t.month,Math.abs(o++)))}while(t.day[0]<7&&r.getUTCDay()!=t.day[0]);return(r={clock:t.clock,sort:r.getTime(),rule:t,save:6e4*t.save,offset:e.offset})[r.clock]=r.sort+6e4*t.time,r.posix?r.wallclock=r[r.clock]+(e.offset+t.saved):r.posix=r[r.clock]-(e.offset+t.saved),r}function t(t,n,r){var o,a,u,i,l,s,c,f=t[t.zone],h=[],T=new Date(r).getUTCFullYear(),g=1;for(o=1,a=f.length;o<a&&!(f[o][n]<=r);o++);if((u=f[o]).rules){for(s=t[u.rules],c=T+1;c>=T-g;--c)for(o=0,a=s.length;o<a;o++)s[o].from<=c&&c<=s[o].to?h.push(e(u,s[o],c)):s[o].to<c&&1==g&&(g=c-s[o].to);for(h.sort(function(e,t){return e.sort-t.sort}),o=0,a=h.length;o<a;o++)r>=h[o][n]&&h[o][h[o].clock]>u[h[o].clock]&&(i=h[o])}return i&&((l=/^(.*)\\/(.*)$/.exec(u.format))?i.abbrev=l[i.save?2:1]:i.abbrev=u.format.replace(/%s/,i.rule.letter)),i||u}function n(e,n){return\"UTC\"==e.zone?n:(e.entry=t(e,\"posix\",n),n+e.entry.offset+e.entry.save)}function r(e,n){return\"UTC\"==e.zone?n:(e.entry=r=t(e,\"wallclock\",n),0<(o=n-r.wallclock)&&o<r.save?null:n-r.offset-r.save);var r,o}function o(e,t,o){var a,i=+(o[1]+1),s=o[2]*i,c=u.indexOf(o[3].toLowerCase());if(c>9)t+=s*l[c-10];else{if(a=new Date(n(e,t)),c<7)for(;s;)a.setUTCDate(a.getUTCDate()+i),a.getUTCDay()==c&&(s-=i);else 7==c?a.setUTCFullYear(a.getUTCFullYear()+s):8==c?a.setUTCMonth(a.getUTCMonth()+s):a.setUTCDate(a.getUTCDate()+s);null==(t=r(e,a.getTime()))&&(t=r(e,a.getTime()+864e5*i)-864e5*i)}return t}var a={clock:function(){return+new Date},zone:\"UTC\",entry:{abbrev:\"UTC\",offset:0,save:0},UTC:1,z:function(e,t,n,r){var o,a,u=this.entry.offset+this.entry.save,i=Math.abs(u/1e3),l=[],s=3600;for(o=0;o<3;o++)l.push((\"0\"+Math.floor(i/s)).slice(-2)),i%=s,s/=60;return\"^\"!=n||u?(\"^\"==n&&(r=3),3==r?(a=(a=l.join(\":\")).replace(/:00$/,\"\"),\"^\"!=n&&(a=a.replace(/:00$/,\"\"))):r?(a=l.slice(0,r+1).join(\":\"),\"^\"==n&&(a=a.replace(/:00$/,\"\"))):a=l.slice(0,2).join(\"\"),a=(a=(u<0?\"-\":\"+\")+a).replace(/([-+])(0)/,{_:\" $1\",\"-\":\"$1\"}[n]||\"$1$2\")):\"Z\"},\"%\":function(e){return\"%\"},n:function(e){return\"\\n\"},t:function(e){return\"\\t\"},U:function(e){return s(e,0)},W:function(e){return s(e,1)},V:function(e){return c(e)[0]},G:function(e){return c(e)[1]},g:function(e){return c(e)[1]%100},j:function(e){return Math.floor((e.getTime()-Date.UTC(e.getUTCFullYear(),0))/864e5)+1},s:function(e){return Math.floor(e.getTime()/1e3)},C:function(e){return Math.floor(e.getUTCFullYear()/100)},N:function(e){return e.getTime()%1e3*1e6},m:function(e){return e.getUTCMonth()+1},Y:function(e){return e.getUTCFullYear()},y:function(e){return e.getUTCFullYear()%100},H:function(e){return e.getUTCHours()},M:function(e){return e.getUTCMinutes()},S:function(e){return e.getUTCSeconds()},e:function(e){return e.getUTCDate()},d:function(e){return e.getUTCDate()},u:function(e){return e.getUTCDay()||7},w:function(e){return e.getUTCDay()},l:function(e){return e.getUTCHours()%12||12},I:function(e){return e.getUTCHours()%12||12},k:function(e){return e.getUTCHours()},Z:function(e){return this.entry.abbrev},a:function(e){return this[this.locale].day.abbrev[e.getUTCDay()]},A:function(e){return this[this.locale].day.full[e.getUTCDay()]},h:function(e){return this[this.locale].month.abbrev[e.getUTCMonth()]},b:function(e){return this[this.locale].month.abbrev[e.getUTCMonth()]},B:function(e){return this[this.locale].month.full[e.getUTCMonth()]},P:function(e){return this[this.locale].meridiem[Math.floor(e.getUTCHours()/12)].toLowerCase()},p:function(e){return this[this.locale].meridiem[Math.floor(e.getUTCHours()/12)]},R:function(e,t){return this.convert([t,\"%H:%M\"])},T:function(e,t){return this.convert([t,\"%H:%M:%S\"])},D:function(e,t){return this.convert([t,\"%m/%d/%y\"])},F:function(e,t){return this.convert([t,\"%Y-%m-%d\"])},x:function(e,t){return this.convert([t,this[this.locale].date])},r:function(e,t){return this.convert([t,this[this.locale].time12||\"%I:%M:%S\"])},X:function(e,t){return this.convert([t,this[this.locale].time24])},c:function(e,t){return this.convert([t,this[this.locale].dateTime])},convert:function(e){if(!e.length)return\"1.0.22\";var t,a,u,l,s,c=Object.create(this),f=[];for(t=0;t<e.length;t++)if(l=e[t],Array.isArray(l))t||isNaN(l[1])?l.splice.apply(e,[t--,1].concat(l)):s=l;else if(isNaN(l)){if(\"string\"==(u=typeof l))~l.indexOf(\"%\")?c.format=l:t||\"*\"!=l?!t&&(u=/^(\\d{4})-(\\d{2})-(\\d{2})(?:[T\\s](\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d+))?)?(Z|(([+-])(\\d{2}(:\\d{2}){0,2})))?)?$/.exec(l))?((s=[]).push.apply(s,u.slice(1,8)),u[9]?(s.push(u[10]+1),s.push.apply(s,u[11].split(/:/))):u[8]&&s.push(1)):/^\\w{2,3}_\\w{2}$/.test(l)?c.locale=l:(u=i.exec(l))?f.push(u):c.zone=l:s=l;else if(\"function\"==u){if(u=l.call(c))return u}else if(/^\\w{2,3}_\\w{2}$/.test(l.name))c[l.name]=l;else if(l.zones){for(u in l.zones)c[u]=l.zones[u];for(u in l.rules)c[u]=l.rules[u]}}else t||(s=l);if(c[c.locale]||delete c.locale,c[c.zone]||delete c.zone,null!=s){if(\"*\"==s)s=c.clock();else if(Array.isArray(s)){for(u=[],a=!s[7],t=0;t<11;t++)u[t]=+(s[t]||0);--u[1],s=Date.UTC.apply(Date.UTC,u)+-u[7]*(36e5*u[8]+6e4*u[9]+1e3*u[10])}else s=Math.floor(s);if(!isNaN(s)){if(a&&(s=r(c,s)),null==s)return s;for(t=0,a=f.length;t<a;t++)s=o(c,s,f[t]);return c.format?(u=new Date(n(c,s)),c.format.replace(/%([-0_^]?)(:{0,3})(\\d*)(.)/g,function(e,t,n,r,o){var a,i,l=\"0\";if(a=c[o]){for(e=String(a.call(c,u,s,t,n.length)),\"_\"==(t||a.style)&&(l=\" \"),i=\"-\"==t?0:a.pad||0;e.length<i;)e=l+e;for(i=\"-\"==t?0:r||a.pad;e.length<i;)e=l+e;\"N\"==o&&i<e.length&&(e=e.slice(0,i)),\"^\"==t&&(e=e.toUpperCase())}return e})):s}}return function(){return c.convert(arguments)}},locale:\"en_US\",en_US:{date:\"%m/%d/%Y\",time24:\"%I:%M:%S %p\",time12:\"%I:%M:%S %p\",dateTime:\"%a %d %b %Y %I:%M:%S %p %Z\",meridiem:[\"AM\",\"PM\"],month:{abbrev:\"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec\".split(\"|\"),full:\"January|February|March|April|May|June|July|August|September|October|November|December\".split(\"|\")},day:{abbrev:\"Sun|Mon|Tue|Wed|Thu|Fri|Sat\".split(\"|\"),full:\"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday\".split(\"|\")}}},u=\"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|year|month|day|hour|minute|second|millisecond\",i=new RegExp(\"^\\\\s*([+-])(\\\\d+)\\\\s+(\"+u+\")s?\\\\s*$\",\"i\"),l=[36e5,6e4,1e3,1];function s(e,t){var n,r,o;return r=new Date(Date.UTC(e.getUTCFullYear(),0)),n=Math.floor((e.getTime()-r.getTime())/864e5),r.getUTCDay()==t?o=0:8==(o=7-r.getUTCDay()+t)&&(o=1),n>=o?Math.floor((n-o)/7)+1:0}function c(e){var t,n,r;return n=e.getUTCFullYear(),t=new Date(Date.UTC(n,0)).getUTCDay(),(r=s(e,1)+(t>1&&t<=4?1:0))?53!=r||4==t||3==t&&29==new Date(n,1,29).getDate()?[r,e.getUTCFullYear()]:[1,e.getUTCFullYear()+1]:(n=e.getUTCFullYear()-1,[r=4==(t=new Date(Date.UTC(n,0)).getUTCDay())||3==t&&29==new Date(n,1,29).getDate()?53:52,e.getUTCFullYear()-1])}return u=u.toLowerCase().split(\"|\"),\"delmHMSUWVgCIky\".replace(/./g,function(e){a[e].pad=2}),a.N.pad=9,a.j.pad=3,a.k.style=\"_\",a.l.style=\"_\",a.e.style=\"_\",function(){return a.convert(arguments)}})},\n", | |
" function _(r,n,e){var t=r(113),i=r(254),u=r(255),a=r(252),f=r(127),o=r(109);function l(r){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];return i.sprintf.apply(i,t.__spreadArrays([r],n))}function c(r,n,e){return o.isNumber(r)?l(function(){switch(!1){case Math.floor(r)!=r:return\"%d\";case!(Math.abs(r)>.1&&Math.abs(r)<1e3):return\"%0.3f\";default:return\"%0.3e\"}}(),r):\"\"+r}function s(r,n,t,i){if(null==t)return c;if(null!=i&&(r in i||n in i)){var u=i[n in i?n:r];if(o.isString(u)){if(u in e.DEFAULT_FORMATTERS)return e.DEFAULT_FORMATTERS[u];throw new Error(\"Unknown tooltip field formatter type '\"+u+\"'\")}return function(r,n,e){return u.format(r,n,e)}}return e.DEFAULT_FORMATTERS.numeral}function p(r,n,e,t){if(\"$\"==r[0]){if(r.substring(1)in t)return t[r.substring(1)];throw new Error(\"Unknown special variable '\"+r+\"'\")}var i=n.get_column(r);if(null==i)return null;if(o.isNumber(e))return i[e];var u=i[e.index];return o.isTypedArray(u)||o.isArray(u)?o.isArray(u[0])?u[e.dim2][e.dim1]:u[e.flat_index]:u}e.sprintf=l,e.DEFAULT_FORMATTERS={numeral:function(r,n,e){return u.format(r,n)},datetime:function(r,n,e){return a(r,n)},printf:function(r,n,e){return l(n,r)}},e.basic_formatter=c,e.get_formatter=s,e.get_value=p,e.replace_placeholders=function(r,n,e,t,i){void 0===i&&(i={});var u=r.replace(/(?:^|[^@])([@|\\$](?:\\w+|{[^{}]+}))(?:{[^{}]+})?/g,function(r,n,e){return\"\"+n});return r=(r=(r=r.replace(/@\\$name/g,function(r){return\"@{\"+i.name+\"}\"})).replace(/(^|[^\\$])\\$(\\w+)/g,function(r,n,e){return n+\"@$\"+e})).replace(/(^|[^@])@(?:(\\$?\\w+)|{([^{}]+)})(?:{([^{}]+)})?/g,function(r,a,o,l,c){var m=p(o=null!=l?l:o,n,e,i);if(null==m)return\"\"+a+f.escape(\"???\");if(\"safe\"==c)return\"\"+a+m;var T=s(o,u,c,t);return\"\"+a+f.escape(T(m,c,i))})}},\n", | |
" function _(e,n,t){!function(){\"use strict\";var e={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\\x25]+/,modulo:/^\\x25{2}/,placeholder:/^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\\d]*)/i,key_access:/^\\.([a-z_][a-z_\\d]*)/i,index_access:/^\\[(\\d+)\\]/,sign:/^[+-]/};function n(t){return function(t,r){var i,s,a,o,p,c,l,u,f,d=1,g=t.length,y=\"\";for(s=0;s<g;s++)if(\"string\"==typeof t[s])y+=t[s];else if(\"object\"==typeof t[s]){if((o=t[s]).keys)for(i=r[d],a=0;a<o.keys.length;a++){if(null==i)throw new Error(n('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"',o.keys[a],o.keys[a-1]));i=i[o.keys[a]]}else i=o.param_no?r[o.param_no]:r[d++];if(e.not_type.test(o.type)&&e.not_primitive.test(o.type)&&i instanceof Function&&(i=i()),e.numeric_arg.test(o.type)&&\"number\"!=typeof i&&isNaN(i))throw new TypeError(n(\"[sprintf] expecting number but found %T\",i));switch(e.number.test(o.type)&&(u=i>=0),o.type){case\"b\":i=parseInt(i,10).toString(2);break;case\"c\":i=String.fromCharCode(parseInt(i,10));break;case\"d\":case\"i\":i=parseInt(i,10);break;case\"j\":i=JSON.stringify(i,null,o.width?parseInt(o.width):0);break;case\"e\":i=o.precision?parseFloat(i).toExponential(o.precision):parseFloat(i).toExponential();break;case\"f\":i=o.precision?parseFloat(i).toFixed(o.precision):parseFloat(i);break;case\"g\":i=o.precision?String(Number(i.toPrecision(o.precision))):parseFloat(i);break;case\"o\":i=(parseInt(i,10)>>>0).toString(8);break;case\"s\":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case\"t\":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case\"T\":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case\"u\":i=parseInt(i,10)>>>0;break;case\"v\":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case\"x\":i=(parseInt(i,10)>>>0).toString(16);break;case\"X\":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}e.json.test(o.type)?y+=i:(!e.number.test(o.type)||u&&!o.sign?f=\"\":(f=u?\"+\":\"-\",i=i.toString().replace(e.sign,\"\")),c=o.pad_char?\"0\"===o.pad_char?\"0\":o.pad_char.charAt(1):\" \",l=o.width-(f+i).length,p=o.width&&l>0?c.repeat(l):\"\",y+=o.align?f+i+p:\"0\"===c?f+p+i:p+f+i)}return y}(function(n){if(i[n])return i[n];var t,r=n,s=[],a=0;for(;r;){if(null!==(t=e.text.exec(r)))s.push(t[0]);else if(null!==(t=e.modulo.exec(r)))s.push(\"%\");else{if(null===(t=e.placeholder.exec(r)))throw new SyntaxError(\"[sprintf] unexpected placeholder\");if(t[2]){a|=1;var o=[],p=t[2],c=[];if(null===(c=e.key.exec(p)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");for(o.push(c[1]);\"\"!==(p=p.substring(c[0].length));)if(null!==(c=e.key_access.exec(p)))o.push(c[1]);else{if(null===(c=e.index_access.exec(p)))throw new SyntaxError(\"[sprintf] failed to parse named argument key\");o.push(c[1])}t[2]=o}else a|=2;if(3===a)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");s.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}r=r.substring(t[0].length)}return i[n]=s}(t),arguments)}function r(e,t){return n.apply(null,[e].concat(t||[]))}var i=Object.create(null);void 0!==t&&(t.sprintf=n,t.vsprintf=r),\"undefined\"!=typeof window&&(window.sprintf=n,window.vsprintf=r,\"function\"==typeof define&&define.amd&&define(function(){return{sprintf:n,vsprintf:r}}))}()},\n", | |
" function _(e,n,t){\n", | |
" /*!\n", | |
" * numbro.js\n", | |
" * version : 1.6.2\n", | |
" * author : Företagsplatsen AB\n", | |
" * license : MIT\n", | |
" * http://www.foretagsplatsen.se\n", | |
" */\n", | |
" var r,i={},a=i,o=\"en-US\",l=null,u=\"0,0\";void 0!==n&&n.exports;function c(e){this._value=e}function s(e){var n,t=\"\";for(n=0;n<e;n++)t+=\"0\";return t}function f(e,n,t,r){var i,a,o=Math.pow(10,n);return a=e.toFixed(0).search(\"e\")>-1?function(e,n){var t,r,i,a;return t=(a=e.toString()).split(\"e\")[0],i=a.split(\"e\")[1],a=t.split(\".\")[0]+(r=t.split(\".\")[1]||\"\")+s(i-r.length),n>0&&(a+=\".\"+s(n)),a}(e,n):(t(e*o)/o).toFixed(n),r&&(i=new RegExp(\"0{1,\"+r+\"}$\"),a=a.replace(i,\"\")),a}function d(e,n,t){return n.indexOf(\"$\")>-1?function(e,n,t){var r,a,l=n,u=l.indexOf(\"$\"),c=l.indexOf(\"(\"),s=l.indexOf(\"+\"),f=l.indexOf(\"-\"),d=\"\",p=\"\";-1===l.indexOf(\"$\")?\"infix\"===i[o].currency.position?(p=i[o].currency.symbol,i[o].currency.spaceSeparated&&(p=\" \"+p+\" \")):i[o].currency.spaceSeparated&&(d=\" \"):l.indexOf(\" $\")>-1?(d=\" \",l=l.replace(\" $\",\"\")):l.indexOf(\"$ \")>-1?(d=\" \",l=l.replace(\"$ \",\"\")):l=l.replace(\"$\",\"\");if(a=h(e,l,t,p),-1===n.indexOf(\"$\"))switch(i[o].currency.position){case\"postfix\":a.indexOf(\")\")>-1?((a=a.split(\"\")).splice(-1,0,d+i[o].currency.symbol),a=a.join(\"\")):a=a+d+i[o].currency.symbol;break;case\"infix\":break;case\"prefix\":a.indexOf(\"(\")>-1||a.indexOf(\"-\")>-1?(a=a.split(\"\"),r=Math.max(c,f)+1,a.splice(r,0,i[o].currency.symbol+d),a=a.join(\"\")):a=i[o].currency.symbol+d+a;break;default:throw Error('Currency position should be among [\"prefix\", \"infix\", \"postfix\"]')}else u<=1?a.indexOf(\"(\")>-1||a.indexOf(\"+\")>-1||a.indexOf(\"-\")>-1?(a=a.split(\"\"),r=1,(u<c||u<s||u<f)&&(r=0),a.splice(r,0,i[o].currency.symbol+d),a=a.join(\"\")):a=i[o].currency.symbol+d+a:a.indexOf(\")\")>-1?((a=a.split(\"\")).splice(-1,0,d+i[o].currency.symbol),a=a.join(\"\")):a=a+d+i[o].currency.symbol;return a}(e,n,t):n.indexOf(\"%\")>-1?function(e,n,t){var r,i=\"\";e*=100,n.indexOf(\" %\")>-1?(i=\" \",n=n.replace(\" %\",\"\")):n=n.replace(\"%\",\"\");(r=h(e,n,t)).indexOf(\")\")>-1?((r=r.split(\"\")).splice(-1,0,i+\"%\"),r=r.join(\"\")):r=r+i+\"%\";return r}(e,n,t):n.indexOf(\":\")>-1?function(e){var n=Math.floor(e/60/60),t=Math.floor((e-60*n*60)/60),r=Math.round(e-60*n*60-60*t);return n+\":\"+(t<10?\"0\"+t:t)+\":\"+(r<10?\"0\"+r:r)}(e):h(e,n,t)}function h(e,n,t,r){var a,u,c,s,d,h,p,m,x,g,O,b,w,y,M,v,$,B=!1,E=!1,F=!1,k=\"\",U=!1,N=!1,S=!1,j=!1,D=!1,C=\"\",L=\"\",T=Math.abs(e),K=[\"B\",\"KiB\",\"MiB\",\"GiB\",\"TiB\",\"PiB\",\"EiB\",\"ZiB\",\"YiB\"],G=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],I=\"\",P=!1,R=!1;if(0===e&&null!==l)return l;if(!isFinite(e))return\"\"+e;if(0===n.indexOf(\"{\")){var W=n.indexOf(\"}\");if(-1===W)throw Error('Format should also contain a \"}\"');b=n.slice(1,W),n=n.slice(W+1)}else b=\"\";if(n.indexOf(\"}\")===n.length-1){var Y=n.indexOf(\"{\");if(-1===Y)throw Error('Format should also contain a \"{\"');w=n.slice(Y+1,-1),n=n.slice(0,Y+1)}else w=\"\";if(v=null===($=-1===n.indexOf(\".\")?n.match(/([0-9]+).*/):n.match(/([0-9]+)\\..*/))?-1:$[1].length,-1!==n.indexOf(\"-\")&&(P=!0),n.indexOf(\"(\")>-1?(B=!0,n=n.slice(1,-1)):n.indexOf(\"+\")>-1&&(E=!0,n=n.replace(/\\+/g,\"\")),n.indexOf(\"a\")>-1){if(g=n.split(\".\")[0].match(/[0-9]+/g)||[\"0\"],g=parseInt(g[0],10),U=n.indexOf(\"aK\")>=0,N=n.indexOf(\"aM\")>=0,S=n.indexOf(\"aB\")>=0,j=n.indexOf(\"aT\")>=0,D=U||N||S||j,n.indexOf(\" a\")>-1?(k=\" \",n=n.replace(\" a\",\"\")):n=n.replace(\"a\",\"\"),p=0===(p=(d=Math.floor(Math.log(T)/Math.LN10)+1)%3)?3:p,g&&0!==T&&(h=Math.floor(Math.log(T)/Math.LN10)+1-g,m=3*~~((Math.min(g,d)-p)/3),T/=Math.pow(10,m),-1===n.indexOf(\".\")&&g>3))for(n+=\"[.]\",M=(M=0===h?0:3*~~(h/3)-h)<0?M+3:M,a=0;a<M;a++)n+=\"0\";Math.floor(Math.log(Math.abs(e))/Math.LN10)+1!==g&&(T>=Math.pow(10,12)&&!D||j?(k+=i[o].abbreviations.trillion,e/=Math.pow(10,12)):T<Math.pow(10,12)&&T>=Math.pow(10,9)&&!D||S?(k+=i[o].abbreviations.billion,e/=Math.pow(10,9)):T<Math.pow(10,9)&&T>=Math.pow(10,6)&&!D||N?(k+=i[o].abbreviations.million,e/=Math.pow(10,6)):(T<Math.pow(10,6)&&T>=Math.pow(10,3)&&!D||U)&&(k+=i[o].abbreviations.thousand,e/=Math.pow(10,3)))}if(n.indexOf(\"b\")>-1)for(n.indexOf(\" b\")>-1?(C=\" \",n=n.replace(\" b\",\"\")):n=n.replace(\"b\",\"\"),s=0;s<=K.length;s++)if(u=Math.pow(1024,s),c=Math.pow(1024,s+1),e>=u&&e<c){C+=K[s],u>0&&(e/=u);break}if(n.indexOf(\"d\")>-1)for(n.indexOf(\" d\")>-1?(C=\" \",n=n.replace(\" d\",\"\")):n=n.replace(\"d\",\"\"),s=0;s<=G.length;s++)if(u=Math.pow(1e3,s),c=Math.pow(1e3,s+1),e>=u&&e<c){C+=G[s],u>0&&(e/=u);break}if(n.indexOf(\"o\")>-1&&(n.indexOf(\" o\")>-1?(L=\" \",n=n.replace(\" o\",\"\")):n=n.replace(\"o\",\"\"),i[o].ordinal&&(L+=i[o].ordinal(e))),n.indexOf(\"[.]\")>-1&&(F=!0,n=n.replace(\"[.]\",\".\")),x=e.toString().split(\".\")[0],O=n.split(\".\")[1],y=n.indexOf(\",\"),O){if(x=(I=-1!==O.indexOf(\"*\")?f(e,e.toString().split(\".\")[1].length,t):O.indexOf(\"[\")>-1?f(e,(O=(O=O.replace(\"]\",\"\")).split(\"[\"))[0].length+O[1].length,t,O[1].length):f(e,O.length,t)).split(\".\")[0],I.split(\".\")[1].length)I=(r?k+r:i[o].delimiters.decimal)+I.split(\".\")[1];else I=\"\";F&&0===Number(I.slice(1))&&(I=\"\")}else x=f(e,null,t);return x.indexOf(\"-\")>-1&&(x=x.slice(1),R=!0),x.length<v&&(x=new Array(v-x.length+1).join(\"0\")+x),y>-1&&(x=x.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g,\"$1\"+i[o].delimiters.thousands)),0===n.indexOf(\".\")&&(x=\"\"),b+(n.indexOf(\"(\")<n.indexOf(\"-\")?(B&&R?\"(\":\"\")+(P&&R||!B&&R?\"-\":\"\"):(P&&R||!B&&R?\"-\":\"\")+(B&&R?\"(\":\"\"))+(!R&&E&&0!==e?\"+\":\"\")+x+I+(L||\"\")+(k&&!r?k:\"\")+(C||\"\")+(B&&R?\")\":\"\")+w}function p(e,n){i[e]=n}function m(e){o=e;var n=i[e].defaults;n&&n.format&&r.defaultFormat(n.format),n&&n.currencyFormat&&r.defaultCurrencyFormat(n.currencyFormat)}(r=function(e){return r.isNumbro(e)?e=e.value():0===e||void 0===e?e=0:Number(e)||(e=r.fn.unformat(e)),new c(Number(e))}).version=\"1.6.2\",r.isNumbro=function(e){return e instanceof c},r.setLanguage=function(e,n){console.warn(\"`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead\");var t=e,r=e.split(\"-\")[0],i=null;a[t]||(Object.keys(a).forEach(function(e){i||e.split(\"-\")[0]!==r||(i=e)}),t=i||n||\"en-US\"),m(t)},r.setCulture=function(e,n){var t=e,r=e.split(\"-\")[1],a=null;i[t]||(r&&Object.keys(i).forEach(function(e){a||e.split(\"-\")[1]!==r||(a=e)}),t=a||n||\"en-US\"),m(t)},r.language=function(e,n){if(console.warn(\"`language` is deprecated since version 1.6.0. Use `culture` instead\"),!e)return o;if(e&&!n){if(!a[e])throw new Error(\"Unknown language : \"+e);m(e)}return!n&&a[e]||p(e,n),r},r.culture=function(e,n){if(!e)return o;if(e&&!n){if(!i[e])throw new Error(\"Unknown culture : \"+e);m(e)}return!n&&i[e]||p(e,n),r},r.languageData=function(e){if(console.warn(\"`languageData` is deprecated since version 1.6.0. Use `cultureData` instead\"),!e)return a[o];if(!a[e])throw new Error(\"Unknown language : \"+e);return a[e]},r.cultureData=function(e){if(!e)return i[o];if(!i[e])throw new Error(\"Unknown culture : \"+e);return i[e]},r.culture(\"en-US\",{delimiters:{thousands:\",\",decimal:\".\"},abbreviations:{thousand:\"k\",million:\"m\",billion:\"b\",trillion:\"t\"},ordinal:function(e){var n=e%10;return 1==~~(e%100/10)?\"th\":1===n?\"st\":2===n?\"nd\":3===n?\"rd\":\"th\"},currency:{symbol:\"$\",position:\"prefix\"},defaults:{currencyFormat:\",0000 a\"},formats:{fourDigits:\"0000 a\",fullWithTwoDecimals:\"$ ,0.00\",fullWithTwoDecimalsNoCurrency:\",0.00\"}}),r.languages=function(){return console.warn(\"`languages` is deprecated since version 1.6.0. Use `cultures` instead\"),a},r.cultures=function(){return i},r.zeroFormat=function(e){l=\"string\"==typeof e?e:null},r.defaultFormat=function(e){u=\"string\"==typeof e?e:\"0.0\"},r.defaultCurrencyFormat=function(e){\"string\"==typeof e?e:\"0$\"},r.validate=function(e,n){var t,i,a,o,l,u,c,s;if(\"string\"!=typeof e&&(e+=\"\",console.warn&&console.warn(\"Numbro.js: Value is not string. It has been co-erced to: \",e)),(e=e.trim()).match(/^\\d+$/))return!0;if(\"\"===e)return!1;try{c=r.cultureData(n)}catch(e){c=r.cultureData(r.culture())}return a=c.currency.symbol,l=c.abbreviations,t=c.delimiters.decimal,i=\".\"===c.delimiters.thousands?\"\\\\.\":c.delimiters.thousands,(null===(s=e.match(/^[^\\d]+/))||(e=e.substr(1),s[0]===a))&&((null===(s=e.match(/[^\\d]+$/))||(e=e.slice(0,-1),s[0]===l.thousand||s[0]===l.million||s[0]===l.billion||s[0]===l.trillion))&&(u=new RegExp(i+\"{2}\"),!e.match(/[^\\d.,]/g)&&(!((o=e.split(t)).length>2)&&(o.length<2?!!o[0].match(/^\\d+.*\\d$/)&&!o[0].match(u):1===o[0].length?!!o[0].match(/^\\d+$/)&&!o[0].match(u)&&!!o[1].match(/^\\d+$/):!!o[0].match(/^\\d+.*\\d$/)&&!o[0].match(u)&&!!o[1].match(/^\\d+$/)))))},n.exports={format:function(e,n,t,i){return null!=t&&t!==r.culture()&&r.setCulture(t),d(Number(e),null!=n?n:u,null==i?Math.round:i)}}},\n", | |
" function _(e,n,i){var t=e(113),r=e(110),a=e(205),s=e(257),c=e(258),_=e(261),m=e(262),k=e(260),o=function(e){function n(n){return e.call(this,n)||this}return t.__extends(n,e),n.init_DatetimeTicker=function(){this.override({num_minor_ticks:0,tickers:function(){return[new a.AdaptiveTicker({mantissas:[1,2,5],base:10,min_interval:0,max_interval:500*k.ONE_MILLI,num_minor_ticks:0}),new a.AdaptiveTicker({mantissas:[1,2,5,10,15,20,30],base:60,min_interval:k.ONE_SECOND,max_interval:30*k.ONE_MINUTE,num_minor_ticks:0}),new a.AdaptiveTicker({mantissas:[1,2,4,6,8,12],base:24,min_interval:k.ONE_HOUR,max_interval:12*k.ONE_HOUR,num_minor_ticks:0}),new c.DaysTicker({days:r.range(1,32)}),new c.DaysTicker({days:r.range(1,31,3)}),new c.DaysTicker({days:[1,8,15,22]}),new c.DaysTicker({days:[1,15]}),new _.MonthsTicker({months:r.range(0,12,1)}),new _.MonthsTicker({months:r.range(0,12,2)}),new _.MonthsTicker({months:r.range(0,12,4)}),new _.MonthsTicker({months:r.range(0,12,6)}),new m.YearsTicker({})]}})},n}(s.CompositeTicker);i.DatetimeTicker=o,o.__name__=\"DatetimeTicker\",o.init_DatetimeTicker()},\n", | |
" function _(t,e,i){var n=t(113),r=t(206),o=t(121),s=t(110),a=t(125),_=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_CompositeTicker=function(){this.define({tickers:[o.Array,[]]})},Object.defineProperty(e.prototype,\"min_intervals\",{get:function(){return this.tickers.map(function(t){return t.get_min_interval()})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"max_intervals\",{get:function(){return this.tickers.map(function(t){return t.get_max_interval()})},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"min_interval\",{get:function(){return this.min_intervals[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"max_interval\",{get:function(){return this.max_intervals[0]},enumerable:!0,configurable:!0}),e.prototype.get_best_ticker=function(t,e,i){var n,r=e-t,o=this.get_ideal_interval(t,e,i),_=[s.sorted_index(this.min_intervals,o)-1,s.sorted_index(this.max_intervals,o)],u=[this.min_intervals[_[0]],this.max_intervals[_[1]]].map(function(t){return Math.abs(i-r/t)});if(a.isEmpty(u.filter(function(t){return!isNaN(t)})))n=this.tickers[0];else{var c=_[s.argmin(u)];n=this.tickers[c]}return n},e.prototype.get_interval=function(t,e,i){return this.get_best_ticker(t,e,i).get_interval(t,e,i)},e.prototype.get_ticks_no_defaults=function(t,e,i,n){return this.get_best_ticker(t,e,n).get_ticks_no_defaults(t,e,i,n)},e}(r.ContinuousTicker);i.CompositeTicker=_,_.__name__=\"CompositeTicker\",_.init_CompositeTicker()},\n", | |
" function _(t,n,e){var i=t(113),r=t(259),a=t(260),o=t(121),s=t(110);var _=function(t){function n(n){return t.call(this,n)||this}return i.__extends(n,t),n.init_DaysTicker=function(){this.define({days:[o.Array,[]]}),this.override({num_minor_ticks:0})},n.prototype.initialize=function(){t.prototype.initialize.call(this);var n=this.days;n.length>1?this.interval=(n[1]-n[0])*a.ONE_DAY:this.interval=31*a.ONE_DAY},n.prototype.get_ticks_no_defaults=function(t,n,e,i){var r=function(t,n){var e=a.last_month_no_later_than(new Date(t)),i=a.last_month_no_later_than(new Date(n));i.setUTCMonth(i.getUTCMonth()+1);for(var r=[],o=e;r.push(a.copy_date(o)),o.setUTCMonth(o.getUTCMonth()+1),!(o>i););return r}(t,n),o=this.days,_=this.interval;return{major:s.concat(r.map(function(t){return function(t,n){for(var e=t.getUTCMonth(),i=[],r=0,s=o;r<s.length;r++){var _=s[r],c=a.copy_date(t);c.setUTCDate(_),new Date(c.getTime()+n/2).getUTCMonth()==e&&i.push(c)}return i}(t,_)})).map(function(t){return t.getTime()}).filter(function(e){return t<=e&&e<=n}),minor:[]}},n}(r.SingleIntervalTicker);e.DaysTicker=_,_.__name__=\"DaysTicker\",_.init_DaysTicker()},\n", | |
" function _(e,n,t){var i=e(113),r=e(206),l=e(121),a=function(e){function n(n){return e.call(this,n)||this}return i.__extends(n,e),n.init_SingleIntervalTicker=function(){this.define({interval:[l.Number]})},n.prototype.get_interval=function(e,n,t){return this.interval},Object.defineProperty(n.prototype,\"min_interval\",{get:function(){return this.interval},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"max_interval\",{get:function(){return this.interval},enumerable:!0,configurable:!0}),n}(r.ContinuousTicker);t.SingleIntervalTicker=a,a.__name__=\"SingleIntervalTicker\",a.init_SingleIntervalTicker()},\n", | |
" function _(t,e,_){function n(t){return new Date(t.getTime())}function E(t){var e=n(t);return e.setUTCDate(1),e.setUTCHours(0),e.setUTCMinutes(0),e.setUTCSeconds(0),e.setUTCMilliseconds(0),e}_.ONE_MILLI=1,_.ONE_SECOND=1e3,_.ONE_MINUTE=60*_.ONE_SECOND,_.ONE_HOUR=60*_.ONE_MINUTE,_.ONE_DAY=24*_.ONE_HOUR,_.ONE_MONTH=30*_.ONE_DAY,_.ONE_YEAR=365*_.ONE_DAY,_.copy_date=n,_.last_month_no_later_than=E,_.last_year_no_later_than=function(t){var e=E(t);return e.setUTCMonth(0),e}},\n", | |
" function _(t,n,e){var r=t(113),i=t(259),a=t(260),o=t(121),l=t(110);var u=function(t){function n(n){return t.call(this,n)||this}return r.__extends(n,t),n.init_MonthsTicker=function(){this.define({months:[o.Array,[]]})},n.prototype.initialize=function(){t.prototype.initialize.call(this);var n=this.months;n.length>1?this.interval=(n[1]-n[0])*a.ONE_MONTH:this.interval=12*a.ONE_MONTH},n.prototype.get_ticks_no_defaults=function(t,n,e,r){var i=function(t,n){var e=a.last_year_no_later_than(new Date(t)),r=a.last_year_no_later_than(new Date(n));r.setUTCFullYear(r.getUTCFullYear()+1);for(var i=[],o=e;i.push(a.copy_date(o)),o.setUTCFullYear(o.getUTCFullYear()+1),!(o>r););return i}(t,n),o=this.months;return{major:l.concat(i.map(function(t){return o.map(function(n){var e=a.copy_date(t);return e.setUTCMonth(n),e})})).map(function(t){return t.getTime()}).filter(function(e){return t<=e&&e<=n}),minor:[]}},n}(i.SingleIntervalTicker);e.MonthsTicker=u,u.__name__=\"MonthsTicker\",u.init_MonthsTicker()},\n", | |
" function _(t,e,i){var n=t(113),r=t(204),a=t(259),_=t(260),c=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.interval=_.ONE_YEAR,this.basic_ticker=new r.BasicTicker({num_minor_ticks:0})},e.prototype.get_ticks_no_defaults=function(t,e,i,n){var r=_.last_year_no_later_than(new Date(t)).getUTCFullYear(),a=_.last_year_no_later_than(new Date(e)).getUTCFullYear();return{major:this.basic_ticker.get_ticks_no_defaults(r,a,i,n).major.map(function(t){return Date.UTC(t,0,1)}).filter(function(i){return t<=i&&i<=e}),minor:[]}},e}(a.SingleIntervalTicker);i.YearsTicker=c,c.__name__=\"YearsTicker\"},\n", | |
" function _(i,n,t){var e=i(113),o=i(243),r=i(248),u=i(264),s=i(265),_=function(i){function n(){return null!==i&&i.apply(this,arguments)||this}return e.__extends(n,i),n}(o.AxisView);t.LogAxisView=_,_.__name__=\"LogAxisView\";var c=function(i){function n(n){return i.call(this,n)||this}return e.__extends(n,i),n.init_LogAxis=function(){this.prototype.default_view=_,this.override({ticker:function(){return new s.LogTicker},formatter:function(){return new u.LogTickFormatter}})},n}(r.ContinuousAxis);t.LogAxis=c,c.__name__=\"LogAxis\",c.init_LogAxis()},\n", | |
" function _(t,i,r){var e=t(113),n=t(209),o=t(208),a=t(167),c=t(121),l=function(t){function i(i){return t.call(this,i)||this}return e.__extends(i,t),i.init_LogTickFormatter=function(){this.define({ticker:[c.Instance,null]})},i.prototype.initialize=function(){t.prototype.initialize.call(this),this.basic_formatter=new o.BasicTickFormatter,null==this.ticker&&a.logger.warn(\"LogTickFormatter not configured with a ticker, using default base of 10 (labels will be incorrect if ticker base is not 10)\")},i.prototype.doFormat=function(t,i){if(0==t.length)return[];for(var r=null!=this.ticker?this.ticker.base:10,e=!1,n=new Array(t.length),o=0,a=t.length;o<a;o++)if(n[o]=r+\"^\"+Math.round(Math.log(t[o])/Math.log(r)),o>0&&n[o]==n[o-1]){e=!0;break}return e?this.basic_formatter.doFormat(t,i):n},i}(n.TickFormatter);r.LogTickFormatter=l,l.__name__=\"LogTickFormatter\",l.init_LogTickFormatter()},\n", | |
" function _(t,r,n){var e=t(113),i=t(205),o=t(110),a=function(t){function r(r){return t.call(this,r)||this}return e.__extends(r,t),r.init_LogTicker=function(){this.override({mantissas:[1,5]})},r.prototype.get_ticks_no_defaults=function(t,r,n,e){var i,a=this.num_minor_ticks,u=[],f=this.base,h=Math.log(t)/Math.log(f),l=Math.log(r)/Math.log(f),c=l-h;if(isFinite(c))if(c<2){var s=this.get_interval(t,r,e),g=Math.floor(t/s),_=Math.ceil(r/s);if(i=o.range(g,_+1).filter(function(t){return 0!=t}).map(function(t){return t*s}).filter(function(n){return t<=n&&n<=r}),a>0&&i.length>0){for(var p=s/a,v=0,M=(y=o.range(0,a).map(function(t){return t*p})).slice(1);v<M.length;v++){var m=M[v];u.push(i[0]-m)}for(var k=0,T=i;k<T.length;k++)for(var d=T[k],L=0,w=y;L<w.length;L++){m=w[L];u.push(d+m)}}}else{var b=Math.ceil(.999999*h),j=Math.floor(1.000001*l),x=Math.ceil((j-b)/9);if(i=o.range(b-1,j+1,x).map(function(t){return Math.pow(f,t)}),a>0&&i.length>0){for(var y,A=Math.pow(f,x)/a,F=0,q=y=o.range(1,a+1).map(function(t){return t*A});F<q.length;F++){m=q[F];u.push(i[0]/m)}u.push(i[0]);for(var z=0,B=i;z<B.length;z++){d=B[z];for(var C=0,D=y;C<D.length;C++){m=D[C];u.push(d*m)}}}}else i=[];return{major:i.filter(function(n){return t<=n&&n<=r}),minor:u.filter(function(n){return t<=n&&n<=r})}},r}(i.AdaptiveTicker);n.LogTicker=a,a.__name__=\"LogTicker\",a.init_LogTicker()},\n", | |
" function _(t,r,i){var e=t(113),n=t(243),o=t(250),a=t(267),c=t(268),s=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(r,t),r}(n.AxisView);i.MercatorAxisView=s,s.__name__=\"MercatorAxisView\";var u=function(t){function r(r){return t.call(this,r)||this}return e.__extends(r,t),r.init_MercatorAxis=function(){this.prototype.default_view=s,this.override({ticker:function(){return new c.MercatorTicker({dimension:\"lat\"})},formatter:function(){return new a.MercatorTickFormatter({dimension:\"lat\"})}})},r}(o.LinearAxis);i.MercatorAxis=u,u.__name__=\"MercatorAxis\",u.init_MercatorAxis()},\n", | |
" function _(r,t,o){var e=r(113),n=r(208),i=r(121),a=r(132),c=function(r){function t(t){return r.call(this,t)||this}return e.__extends(t,r),t.init_MercatorTickFormatter=function(){this.define({dimension:[i.LatLon]})},t.prototype.doFormat=function(t,o){if(null==this.dimension)throw new Error(\"MercatorTickFormatter.dimension not configured\");if(0==t.length)return[];var e=t.length,n=new Array(e);if(\"lon\"==this.dimension)for(var i=0;i<e;i++){var c=a.wgs84_mercator.inverse([t[i],o.loc])[0];n[i]=c}else for(i=0;i<e;i++){var s=a.wgs84_mercator.inverse([o.loc,t[i]])[1];n[i]=s}return r.prototype.doFormat.call(this,n,o)},t}(n.BasicTickFormatter);o.MercatorTickFormatter=c,c.__name__=\"MercatorTickFormatter\",c.init_MercatorTickFormatter()},\n", | |
" function _(r,n,i){var o=r(113),e=r(204),t=r(121),s=r(132),a=function(r){function n(n){return r.call(this,n)||this}return o.__extends(n,r),n.init_MercatorTicker=function(){this.define({dimension:[t.LatLon]})},n.prototype.get_ticks_no_defaults=function(n,i,o,e){var t,a,c,_,f,m,l,u;if(null==this.dimension)throw new Error(\"MercatorTicker.dimension not configured\");n=(t=s.clip_mercator(n,i,this.dimension))[0],i=t[1],\"lon\"===this.dimension?(m=(a=s.wgs84_mercator.inverse([n,o]))[0],u=a[1],l=(c=s.wgs84_mercator.inverse([i,o]))[0],u=c[1]):(u=(_=s.wgs84_mercator.inverse([o,n]))[0],m=_[1],u=(f=s.wgs84_mercator.inverse([o,i]))[0],l=f[1]);var d=r.prototype.get_ticks_no_defaults.call(this,m,l,o,e),h=[],g=[];if(\"lon\"===this.dimension){for(var v=0,w=d.major;v<w.length;v++){var p=w[v];if(s.in_bounds(p,\"lon\")){var k=s.wgs84_mercator.forward([p,u])[0];h.push(k)}}for(var T=0,M=d.minor;T<M.length;T++){p=M[T];if(s.in_bounds(p,\"lon\")){k=s.wgs84_mercator.forward([p,u])[0];g.push(k)}}}else{for(var b=0,j=d.major;b<j.length;b++){p=j[b];if(s.in_bounds(p,\"lat\")){var y=s.wgs84_mercator.forward([u,p])[1];h.push(y)}}for(var L=0,x=d.minor;L<x.length;L++){p=x[L];if(s.in_bounds(p,\"lat\")){y=s.wgs84_mercator.forward([u,p])[1];g.push(y)}}}return{major:h,minor:g}},n}(e.BasicTicker);i.MercatorTicker=a,a.__name__=\"MercatorTicker\",a.init_MercatorTicker()},\n", | |
" function _(n,o,t){var u=n(270);t.CustomJS=u.CustomJS;var a=n(272);t.OpenURL=a.OpenURL},\n", | |
" function _(e,t,n){var r=e(113),i=e(271),o=e(121),u=e(125),s=e(127),c=function(t){function n(e){return t.call(this,e)||this}return r.__extends(n,t),n.init_CustomJS=function(){this.define({args:[o.Any,{}],code:[o.String,\"\"],use_strict:[o.Boolean,!1]})},Object.defineProperty(n.prototype,\"names\",{get:function(){return u.keys(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"values\",{get:function(){return u.values(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"func\",{get:function(){var e=this.use_strict?s.use_strict(this.code):this.code;return new(Function.bind.apply(Function,r.__spreadArrays([void 0],this.names,[\"cb_obj\",\"cb_data\",\"require\",\"exports\",e])))},enumerable:!0,configurable:!0}),n.prototype.execute=function(t,n){return void 0===n&&(n={}),this.func.apply(t,this.values.concat(t,n,e,{}))},n}(i.Callback);n.CustomJS=c,c.__name__=\"CustomJS\",c.init_CustomJS()},\n", | |
" function _(n,t,a){var l=n(113),_=function(n){function t(t){return n.call(this,t)||this}return l.__extends(t,n),t}(n(166).Model);a.Callback=_,_.__name__=\"Callback\"},\n", | |
" function _(n,e,t){var i=n(113),o=n(271),r=n(253),a=n(121),c=function(n){function e(e){return n.call(this,e)||this}return i.__extends(e,n),e.init_OpenURL=function(){this.define({url:[a.String,\"http://\"],same_tab:[a.Boolean,!1]})},e.prototype.execute=function(n,e){for(var t=this,i=e.source,o=function(n){var e=r.replace_placeholders(t.url,i,n);t.same_tab?window.location.href=e:window.open(e)},a=i.selected,c=0,l=a.indices;c<l.length;c++){o(l[c])}for(var _=0,s=a.line_indices;_<s.length;_++){o(s[_])}},e}(o.Callback);t.OpenURL=c,c.__name__=\"OpenURL\",c.init_OpenURL()},\n", | |
" function _(a,n,r){var e=a(274);r.Canvas=e.Canvas;var s=a(278);r.CartesianFrame=s.CartesianFrame},\n", | |
" function _(t,e,i){var a=t(113),s=t(115),n=t(161),l=t(167),h=t(121),o=t(163),r=t(181),c=t(197),p=t(275),_=t(276);c.is_ie&&\"undefined\"!=typeof CanvasPixelArray&&(CanvasPixelArray.prototype.set=function(t){for(var e=0;e<this.length;e++)this[e]=t[e]});var v=t(277),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a.__extends(e,t),Object.defineProperty(e.prototype,\"ctx\",{get:function(){return this._ctx},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.map_el=this.model.map?this.el.appendChild(o.div({class:_.bk_canvas_map})):null;var e={position:\"absolute\",top:\"0\",left:\"0\",width:\"100%\",height:\"100%\"};switch(this.model.output_backend){case\"canvas\":case\"webgl\":if(this.canvas_el=this.el.appendChild(o.canvas({class:_.bk_canvas,style:e})),null==(i=this.canvas_el.getContext(\"2d\")))throw new Error(\"unable to obtain 2D rendering context\");this._ctx=i;break;case\"svg\":var i=new v;this._ctx=i,this.canvas_el=this.el.appendChild(i.getSvg())}this.overlays_el=this.el.appendChild(o.div({class:_.bk_canvas_overlays,style:e})),this.events_el=this.el.appendChild(o.div({class:_.bk_canvas_events,style:e})),p.fixup_ctx(this._ctx),l.logger.debug(\"CanvasView initialized\")},e.prototype.get_canvas_element=function(){return this.canvas_el},e.prototype.prepare_canvas=function(t,e){this.bbox=new r.BBox({left:0,top:0,width:t,height:e}),this.el.style.width=t+\"px\",this.el.style.height=e+\"px\";var i=p.get_scale_ratio(this.ctx,this.model.use_hidpi,this.model.output_backend);this.model.pixel_ratio=i,this.canvas_el.style.width=t+\"px\",this.canvas_el.style.height=e+\"px\",this.canvas_el.setAttribute(\"width\",\"\"+t*i),this.canvas_el.setAttribute(\"height\",\"\"+e*i),l.logger.debug(\"Rendering CanvasView with width: \"+t+\", height: \"+e+\", pixel ratio: \"+i)},e}(n.DOMView);i.CanvasView=d,d.__name__=\"CanvasView\";var u=function(t){function e(e){return t.call(this,e)||this}return a.__extends(e,t),e.init_Canvas=function(){this.prototype.default_view=d,this.internal({map:[h.Boolean,!1],use_hidpi:[h.Boolean,!0],pixel_ratio:[h.Number,1],output_backend:[h.OutputBackend,\"canvas\"]})},e}(s.HasProps);i.Canvas=u,u.__name__=\"Canvas\",u.init_Canvas()},\n", | |
" function _(e,t,n){n.fixup_ctx=function(e){!function(e){e.setLineDash||(e.setLineDash=function(t){e.mozDash=t,e.webkitLineDash=t}),e.getLineDash||(e.getLineDash=function(){return e.mozDash})}(e),function(e){e.setLineDashOffset=function(t){e.lineDashOffset=t,e.mozDashOffset=t,e.webkitLineDashOffset=t},e.getLineDashOffset=function(){return e.mozDashOffset}}(e),function(e){e.setImageSmoothingEnabled=function(t){e.imageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.oImageSmoothingEnabled=t,e.webkitImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t},e.getImageSmoothingEnabled=function(){var t=e.imageSmoothingEnabled;return null==t||t}}(e),function(e){e.measureText&&null==e.html5MeasureText&&(e.html5MeasureText=e.measureText,e.measureText=function(t){var n=e.html5MeasureText(t);return n.ascent=1.6*e.html5MeasureText(\"m\").width,n})}(e),function(e){e.ellipse||(e.ellipse=function(t,n,i,o,a,r,s,u){void 0===u&&(u=!1);var m=.551784;e.translate(t,n),e.rotate(a);var l=i,f=o;u&&(l=-i,f=-o),e.moveTo(-l,0),e.bezierCurveTo(-l,f*m,-l*m,f,0,f),e.bezierCurveTo(l*m,f,l,f*m,l,0),e.bezierCurveTo(l,-f*m,l*m,-f,0,-f),e.bezierCurveTo(-l*m,-f,-l,-f*m,-l,0),e.rotate(-a),e.translate(-t,-n)})}(e)},n.get_scale_ratio=function(e,t,n){return\"svg\"==n?1:t?(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1):1}},\n", | |
" function _(a,n,s){a(164),s.bk_canvas=\"bk-canvas\",s.bk_canvas_map=\"bk-canvas-map\",s.bk_canvas_overlays=\"bk-canvas-overlays\",s.bk_canvas_events=\"bk-canvas-events\"},\n", | |
" function _(t,e,r){!function(){\"use strict\";var t,r,i,n,s;function a(t,e){var r,i=Object.keys(e);for(r=0;r<i.length;r++)t=t.replace(new RegExp(\"\\\\{\"+i[r]+\"\\\\}\",\"gi\"),e[i[r]]);return t}function o(t){var e,r,i;if(!t)throw new Error(\"cannot create a random attribute name for an undefined object\");e=\"ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz\",r=\"\";do{for(r=\"\",i=0;i<12;i++)r+=e[Math.floor(Math.random()*e.length)]}while(t[r]);return r}function h(t){var e={alphabetic:\"alphabetic\",hanging:\"hanging\",top:\"text-before-edge\",bottom:\"text-after-edge\",middle:\"central\"};return e[t]||e.alphabetic}s=function(t,e){var r,i,n,s={};for(t=t.split(\",\"),e=e||10,r=0;r<t.length;r+=2)i=\"&\"+t[r+1]+\";\",n=parseInt(t[r],e),s[i]=\"&#\"+n+\";\";return s[\"\\\\xa0\"]=\" \",s}(\"50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro\",32),t={strokeStyle:{svgAttr:\"stroke\",canvas:\"#000000\",svg:\"none\",apply:\"stroke\"},fillStyle:{svgAttr:\"fill\",canvas:\"#000000\",svg:null,apply:\"fill\"},lineCap:{svgAttr:\"stroke-linecap\",canvas:\"butt\",svg:\"butt\",apply:\"stroke\"},lineJoin:{svgAttr:\"stroke-linejoin\",canvas:\"miter\",svg:\"miter\",apply:\"stroke\"},miterLimit:{svgAttr:\"stroke-miterlimit\",canvas:10,svg:4,apply:\"stroke\"},lineWidth:{svgAttr:\"stroke-width\",canvas:1,svg:1,apply:\"stroke\"},globalAlpha:{svgAttr:\"opacity\",canvas:1,svg:1,apply:\"fill stroke\"},font:{canvas:\"10px sans-serif\"},shadowColor:{canvas:\"#000000\"},shadowOffsetX:{canvas:0},shadowOffsetY:{canvas:0},shadowBlur:{canvas:0},textAlign:{canvas:\"start\"},textBaseline:{canvas:\"alphabetic\"},lineDash:{svgAttr:\"stroke-dasharray\",canvas:[],svg:null,apply:\"stroke\"}},(i=function(t,e){this.__root=t,this.__ctx=e}).prototype.addColorStop=function(t,e){var r,i=this.__ctx.__createElement(\"stop\");i.setAttribute(\"offset\",t),-1!==e.indexOf(\"rgba\")?(r=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d?\\.?\\d*)\\s*\\)/gi.exec(e),i.setAttribute(\"stop-color\",a(\"rgb({r},{g},{b})\",{r:r[1],g:r[2],b:r[3]})),i.setAttribute(\"stop-opacity\",r[4])):i.setAttribute(\"stop-color\",e),this.__root.appendChild(i)},n=function(t,e){this.__root=t,this.__ctx=e},(r=function(t){var e,i={width:500,height:500,enableMirroring:!1};if(arguments.length>1?((e=i).width=arguments[0],e.height=arguments[1]):e=t||i,!(this instanceof r))return new r(e);this.width=e.width||i.width,this.height=e.height||i.height,this.enableMirroring=void 0!==e.enableMirroring?e.enableMirroring:i.enableMirroring,this.canvas=this,this.__document=e.document||document,e.ctx?this.__ctx=e.ctx:(this.__canvas=this.__document.createElement(\"canvas\"),this.__ctx=this.__canvas.getContext(\"2d\")),this.__setDefaultStyles(),this.__stack=[this.__getStyleState()],this.__groupStack=[],this.__root=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"svg\"),this.__root.setAttribute(\"version\",1.1),this.__root.setAttribute(\"xmlns\",\"http://www.w3.org/2000/svg\"),this.__root.setAttributeNS(\"http://www.w3.org/2000/xmlns/\",\"xmlns:xlink\",\"http://www.w3.org/1999/xlink\"),this.__root.setAttribute(\"width\",this.width),this.__root.setAttribute(\"height\",this.height),this.__ids={},this.__defs=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"defs\"),this.__root.appendChild(this.__defs),this.__currentElement=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"g\"),this.__root.appendChild(this.__currentElement)}).prototype.__createElement=function(t,e,r){void 0===e&&(e={});var i,n,s=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",t),a=Object.keys(e);for(r&&(s.setAttribute(\"fill\",\"none\"),s.setAttribute(\"stroke\",\"none\")),i=0;i<a.length;i++)n=a[i],s.setAttribute(n,e[n]);return s},r.prototype.__setDefaultStyles=function(){var e,r,i=Object.keys(t);for(e=0;e<i.length;e++)this[r=i[e]]=t[r].canvas},r.prototype.__applyStyleState=function(t){var e,r,i=Object.keys(t);for(e=0;e<i.length;e++)this[r=i[e]]=t[r]},r.prototype.__getStyleState=function(){var e,r,i={},n=Object.keys(t);for(e=0;e<n.length;e++)i[r=n[e]]=this[r];return i},r.prototype.__applyStyleToCurrentElement=function(e){var r=this.__currentElement,s=this.__currentElementsToStyle;s&&(r.setAttribute(e,\"\"),r=s.element,s.children.forEach(function(t){t.setAttribute(e,\"\")}));var o,h,l,c,p,_=Object.keys(t);for(o=0;o<_.length;o++)if(h=t[_[o]],l=this[_[o]],h.apply)if(l instanceof n){if(l.__ctx)for(;l.__ctx.__defs.childNodes.length;)c=l.__ctx.__defs.childNodes[0].getAttribute(\"id\"),this.__ids[c]=c,this.__defs.appendChild(l.__ctx.__defs.childNodes[0]);r.setAttribute(h.apply,a(\"url(#{id})\",{id:l.__root.getAttribute(\"id\")}))}else if(l instanceof i)r.setAttribute(h.apply,a(\"url(#{id})\",{id:l.__root.getAttribute(\"id\")}));else if(-1!==h.apply.indexOf(e)&&h.svg!==l)if(\"stroke\"!==h.svgAttr&&\"fill\"!==h.svgAttr||-1===l.indexOf(\"rgba\")){var u=h.svgAttr;if(\"globalAlpha\"===_[o]&&(u=e+\"-\"+h.svgAttr,r.getAttribute(u)))continue;r.setAttribute(u,l)}else{p=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d?\\.?\\d*)\\s*\\)/gi.exec(l),r.setAttribute(h.svgAttr,a(\"rgb({r},{g},{b})\",{r:p[1],g:p[2],b:p[3]}));var d=p[4],g=this.globalAlpha;null!=g&&(d*=g),r.setAttribute(h.svgAttr+\"-opacity\",d)}},r.prototype.__closestGroupOrSvg=function(t){return\"g\"===(t=t||this.__currentElement).nodeName||\"svg\"===t.nodeName?t:this.__closestGroupOrSvg(t.parentNode)},r.prototype.getSerializedSvg=function(t){var e,r,i,n,a,o=(new XMLSerializer).serializeToString(this.__root);if(/xmlns=\"http:\\/\\/www\\.w3\\.org\\/2000\\/svg\".+xmlns=\"http:\\/\\/www\\.w3\\.org\\/2000\\/svg/gi.test(o)&&(o=o.replace('xmlns=\"http://www.w3.org/2000/svg','xmlns:xlink=\"http://www.w3.org/1999/xlink')),t)for(e=Object.keys(s),r=0;r<e.length;r++)i=e[r],n=s[i],(a=new RegExp(i,\"gi\")).test(o)&&(o=o.replace(a,n));return o},r.prototype.getSvg=function(){return this.__root},r.prototype.save=function(){var t=this.__createElement(\"g\"),e=this.__closestGroupOrSvg();this.__groupStack.push(e),e.appendChild(t),this.__currentElement=t,this.__stack.push(this.__getStyleState())},r.prototype.restore=function(){this.__currentElement=this.__groupStack.pop(),this.__currentElementsToStyle=null,this.__currentElement||(this.__currentElement=this.__root.childNodes[1]);var t=this.__stack.pop();this.__applyStyleState(t)},r.prototype.__addTransform=function(t){var e=this.__closestGroupOrSvg();if(e.childNodes.length>0){\"path\"===this.__currentElement.nodeName&&(this.__currentElementsToStyle||(this.__currentElementsToStyle={element:e,children:[]}),this.__currentElementsToStyle.children.push(this.__currentElement),this.__applyCurrentDefaultPath());var r=this.__createElement(\"g\");e.appendChild(r),this.__currentElement=r}var i=this.__currentElement.getAttribute(\"transform\");i?i+=\" \":i=\"\",i+=t,this.__currentElement.setAttribute(\"transform\",i)},r.prototype.scale=function(t,e){void 0===e&&(e=t),this.__addTransform(a(\"scale({x},{y})\",{x:t,y:e}))},r.prototype.rotate=function(t){var e=180*t/Math.PI;this.__addTransform(a(\"rotate({angle},{cx},{cy})\",{angle:e,cx:0,cy:0}))},r.prototype.translate=function(t,e){this.__addTransform(a(\"translate({x},{y})\",{x:t,y:e}))},r.prototype.transform=function(t,e,r,i,n,s){this.__addTransform(a(\"matrix({a},{b},{c},{d},{e},{f})\",{a:t,b:e,c:r,d:i,e:n,f:s}))},r.prototype.beginPath=function(){var t;this.__currentDefaultPath=\"\",this.__currentPosition={},t=this.__createElement(\"path\",{},!0),this.__closestGroupOrSvg().appendChild(t),this.__currentElement=t},r.prototype.__applyCurrentDefaultPath=function(){var t=this.__currentElement;\"path\"===t.nodeName?t.setAttribute(\"d\",this.__currentDefaultPath):console.error(\"Attempted to apply path command to node\",t.nodeName)},r.prototype.__addPathCommand=function(t){this.__currentDefaultPath+=\" \",this.__currentDefaultPath+=t},r.prototype.moveTo=function(t,e){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.__currentPosition={x:t,y:e},this.__addPathCommand(a(\"M {x} {y}\",{x:t,y:e}))},r.prototype.closePath=function(){this.__currentDefaultPath&&this.__addPathCommand(\"Z\")},r.prototype.lineTo=function(t,e){this.__currentPosition={x:t,y:e},this.__currentDefaultPath.indexOf(\"M\")>-1?this.__addPathCommand(a(\"L {x} {y}\",{x:t,y:e})):this.__addPathCommand(a(\"M {x} {y}\",{x:t,y:e}))},r.prototype.bezierCurveTo=function(t,e,r,i,n,s){this.__currentPosition={x:n,y:s},this.__addPathCommand(a(\"C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}\",{cp1x:t,cp1y:e,cp2x:r,cp2y:i,x:n,y:s}))},r.prototype.quadraticCurveTo=function(t,e,r,i){this.__currentPosition={x:r,y:i},this.__addPathCommand(a(\"Q {cpx} {cpy} {x} {y}\",{cpx:t,cpy:e,x:r,y:i}))};var l=function(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]};r.prototype.arcTo=function(t,e,r,i,n){var s=this.__currentPosition&&this.__currentPosition.x,a=this.__currentPosition&&this.__currentPosition.y;if(void 0!==s&&void 0!==a){if(n<0)throw new Error(\"IndexSizeError: The radius provided (\"+n+\") is negative.\");if(s===t&&a===e||t===r&&e===i||0===n)this.lineTo(t,e);else{var o=l([s-t,a-e]),h=l([r-t,i-e]);if(o[0]*h[1]!=o[1]*h[0]){var c=o[0]*h[0]+o[1]*h[1],p=Math.acos(Math.abs(c)),_=l([o[0]+h[0],o[1]+h[1]]),u=n/Math.sin(p/2),d=t+u*_[0],g=e+u*_[1],m=[-o[1],o[0]],f=[h[1],-h[0]],y=function(t){var e=t[0];return t[1]>=0?Math.acos(e):-Math.acos(e)},v=y(m),b=y(f);this.lineTo(d+m[0]*n,g+m[1]*n),this.arc(d,g,n,v,b)}else this.lineTo(t,e)}}},r.prototype.stroke=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"fill stroke markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"stroke\")},r.prototype.fill=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"stroke fill markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"fill\")},r.prototype.rect=function(t,e,r,i){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+i),this.lineTo(t,e+i),this.lineTo(t,e),this.closePath()},r.prototype.fillRect=function(t,e,r,i){var n;n=this.__createElement(\"rect\",{x:t,y:e,width:r,height:i},!0),this.__closestGroupOrSvg().appendChild(n),this.__currentElement=n,this.__applyStyleToCurrentElement(\"fill\")},r.prototype.strokeRect=function(t,e,r,i){var n;n=this.__createElement(\"rect\",{x:t,y:e,width:r,height:i},!0),this.__closestGroupOrSvg().appendChild(n),this.__currentElement=n,this.__applyStyleToCurrentElement(\"stroke\")},r.prototype.__clearCanvas=function(){for(var t=this.__closestGroupOrSvg().getAttribute(\"transform\"),e=this.__root.childNodes[1],r=e.childNodes,i=r.length-1;i>=0;i--)r[i]&&e.removeChild(r[i]);this.__currentElement=e,this.__groupStack=[],t&&this.__addTransform(t)},r.prototype.clearRect=function(t,e,r,i){if(0!==t||0!==e||r!==this.width||i!==this.height){var n,s=this.__closestGroupOrSvg();n=this.__createElement(\"rect\",{x:t,y:e,width:r,height:i,fill:\"#FFFFFF\"},!0),s.appendChild(n)}else this.__clearCanvas()},r.prototype.createLinearGradient=function(t,e,r,n){var s=this.__createElement(\"linearGradient\",{id:o(this.__ids),x1:t+\"px\",x2:r+\"px\",y1:e+\"px\",y2:n+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(s),new i(s,this)},r.prototype.createRadialGradient=function(t,e,r,n,s,a){var h=this.__createElement(\"radialGradient\",{id:o(this.__ids),cx:n+\"px\",cy:s+\"px\",r:a+\"px\",fx:t+\"px\",fy:e+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(h),new i(h,this)},r.prototype.__parseFont=function(){var t=/^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:\\s*\\/\\s*(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s*([-,\\'\\\"\\sa-z0-9]+?)\\s*$/i.exec(this.font),e={style:t[1]||\"normal\",size:t[4]||\"10px\",family:t[6]||\"sans-serif\",weight:t[3]||\"normal\",decoration:t[2]||\"normal\",href:null};return\"underline\"===this.__fontUnderline&&(e.decoration=\"underline\"),this.__fontHref&&(e.href=this.__fontHref),e},r.prototype.__wrapTextLink=function(t,e){if(t.href){var r=this.__createElement(\"a\");return r.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",t.href),r.appendChild(e),r}return e},r.prototype.__applyText=function(t,e,r,i){var n,s,a=this.__parseFont(),o=this.__closestGroupOrSvg(),l=this.__createElement(\"text\",{\"font-family\":a.family,\"font-size\":a.size,\"font-style\":a.style,\"font-weight\":a.weight,\"text-decoration\":a.decoration,x:e,y:r,\"text-anchor\":(n=this.textAlign,s={left:\"start\",right:\"end\",center:\"middle\",start:\"start\",end:\"end\"},s[n]||s.start),\"dominant-baseline\":h(this.textBaseline)},!0);l.appendChild(this.__document.createTextNode(t)),this.__currentElement=l,this.__applyStyleToCurrentElement(i),o.appendChild(this.__wrapTextLink(a,l))},r.prototype.fillText=function(t,e,r){this.__applyText(t,e,r,\"fill\")},r.prototype.strokeText=function(t,e,r){this.__applyText(t,e,r,\"stroke\")},r.prototype.measureText=function(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)},r.prototype.arc=function(t,e,r,i,n,s){if(i!==n){(i%=2*Math.PI)===(n%=2*Math.PI)&&(n=(n+2*Math.PI-.001*(s?-1:1))%(2*Math.PI));var o=t+r*Math.cos(n),h=e+r*Math.sin(n),l=t+r*Math.cos(i),c=e+r*Math.sin(i),p=s?0:1,_=0,u=n-i;u<0&&(u+=2*Math.PI),_=s?u>Math.PI?0:1:u>Math.PI?1:0,this.lineTo(l,c),this.__addPathCommand(a(\"A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}\",{rx:r,ry:r,xAxisRotation:0,largeArcFlag:_,sweepFlag:p,endX:o,endY:h})),this.__currentPosition={x:o,y:h}}},r.prototype.clip=function(){var t=this.__closestGroupOrSvg(),e=this.__createElement(\"clipPath\"),r=o(this.__ids),i=this.__createElement(\"g\");this.__applyCurrentDefaultPath(),t.removeChild(this.__currentElement),e.setAttribute(\"id\",r),e.appendChild(this.__currentElement),this.__defs.appendChild(e),t.setAttribute(\"clip-path\",a(\"url(#{id})\",{id:r})),t.appendChild(i),this.__currentElement=i},r.prototype.drawImage=function(){var t,e,i,n,s,a,o,h,l,c,p,_,u,d,g=Array.prototype.slice.call(arguments),m=g[0],f=0,y=0;if(3===g.length)t=g[1],e=g[2],i=s=m.width,n=a=m.height;else if(5===g.length)t=g[1],e=g[2],i=g[3],n=g[4],s=m.width,a=m.height;else{if(9!==g.length)throw new Error(\"Inavlid number of arguments passed to drawImage: \"+arguments.length);f=g[1],y=g[2],s=g[3],a=g[4],t=g[5],e=g[6],i=g[7],n=g[8]}o=this.__closestGroupOrSvg(),this.__currentElement;var v=\"translate(\"+t+\", \"+e+\")\";if(m instanceof r){if((h=m.getSvg().cloneNode(!0)).childNodes&&h.childNodes.length>1){for(l=h.childNodes[0];l.childNodes.length;)d=l.childNodes[0].getAttribute(\"id\"),this.__ids[d]=d,this.__defs.appendChild(l.childNodes[0]);if(c=h.childNodes[1]){var b,w=c.getAttribute(\"transform\");b=w?w+\" \"+v:v,c.setAttribute(\"transform\",b),o.appendChild(c)}}}else\"IMG\"===m.nodeName?((p=this.__createElement(\"image\")).setAttribute(\"width\",i),p.setAttribute(\"height\",n),p.setAttribute(\"preserveAspectRatio\",\"none\"),(f||y||s!==m.width||a!==m.height)&&((_=this.__document.createElement(\"canvas\")).width=i,_.height=n,(u=_.getContext(\"2d\")).drawImage(m,f,y,s,a,0,0,i,n),m=_),p.setAttribute(\"transform\",v),p.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===m.nodeName?m.toDataURL():m.getAttribute(\"src\")),o.appendChild(p)):\"CANVAS\"===m.nodeName&&((p=this.__createElement(\"image\")).setAttribute(\"width\",i),p.setAttribute(\"height\",n),p.setAttribute(\"preserveAspectRatio\",\"none\"),(_=this.__document.createElement(\"canvas\")).width=i,_.height=n,(u=_.getContext(\"2d\")).imageSmoothingEnabled=!1,u.mozImageSmoothingEnabled=!1,u.oImageSmoothingEnabled=!1,u.webkitImageSmoothingEnabled=!1,u.drawImage(m,f,y,s,a,0,0,i,n),m=_,p.setAttribute(\"transform\",v),p.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",m.toDataURL()),o.appendChild(p))},r.prototype.createPattern=function(t,e){var i,s=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"pattern\"),a=o(this.__ids);return s.setAttribute(\"id\",a),s.setAttribute(\"width\",t.width),s.setAttribute(\"height\",t.height),\"CANVAS\"===t.nodeName||\"IMG\"===t.nodeName?((i=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"image\")).setAttribute(\"width\",t.width),i.setAttribute(\"height\",t.height),i.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===t.nodeName?t.toDataURL():t.getAttribute(\"src\")),s.appendChild(i),this.__defs.appendChild(s)):t instanceof r&&(s.appendChild(t.__root.childNodes[1]),this.__defs.appendChild(s)),new n(s,this)},r.prototype.setLineDash=function(t){t&&t.length>0?this.lineDash=t.join(\",\"):this.lineDash=null},r.prototype.drawFocusRing=function(){},r.prototype.createImageData=function(){},r.prototype.getImageData=function(){},r.prototype.putImageData=function(){},r.prototype.globalCompositeOperation=function(){},r.prototype.setTransform=function(){},\"object\"==typeof window&&(window.C2S=r),\"object\"==typeof e&&\"object\"==typeof e.exports&&(e.exports=r)}()},\n", | |
" function _(e,t,a){var r=e(113),n=e(279),s=e(215),i=e(224),_=e(225),o=e(280),c=e(184),g=function(e){function t(t,a,r,n,s,i){void 0===s&&(s={}),void 0===i&&(i={});var _=e.call(this)||this;return _.x_scale=t,_.y_scale=a,_.x_range=r,_.y_range=n,_.extra_x_ranges=s,_.extra_y_ranges=i,_._configure_scales(),_}return r.__extends(t,e),t.prototype.map_to_screen=function(e,t,a,r){return void 0===a&&(a=\"default\"),void 0===r&&(r=\"default\"),[this.xscales[a].v_compute(e),this.yscales[r].v_compute(t)]},t.prototype._get_ranges=function(e,t){var a={};if(a.default=e,null!=t)for(var r in t)a[r]=t[r];return a},t.prototype._get_scales=function(e,t,a){var r={};for(var g in t){var l=t[g];if(l instanceof o.DataRange1d||l instanceof _.Range1d){if(!(e instanceof i.LogScale||e instanceof s.LinearScale))throw new Error(\"Range \"+l.type+\" is incompatible is Scale \"+e.type);if(e instanceof n.CategoricalScale)throw new Error(\"Range \"+l.type+\" is incompatible is Scale \"+e.type)}if(l instanceof c.FactorRange&&!(e instanceof n.CategoricalScale))throw new Error(\"Range \"+l.type+\" is incompatible is Scale \"+e.type);e instanceof i.LogScale&&l instanceof o.DataRange1d&&(l.scale_hint=\"log\");var f=e.clone();f.setv({source_range:l,target_range:a}),r[g]=f}return r},t.prototype._configure_frame_ranges=function(){this._h_target=new _.Range1d({start:this._left.value,end:this._right.value}),this._v_target=new _.Range1d({start:this._bottom.value,end:this._top.value})},t.prototype._configure_scales=function(){this._configure_frame_ranges(),this._x_ranges=this._get_ranges(this.x_range,this.extra_x_ranges),this._y_ranges=this._get_ranges(this.y_range,this.extra_y_ranges),this._xscales=this._get_scales(this.x_scale,this._x_ranges,this._h_target),this._yscales=this._get_scales(this.y_scale,this._y_ranges,this._v_target)},t.prototype._update_scales=function(){for(var e in this._configure_frame_ranges(),this._xscales){this._xscales[e].target_range=this._h_target}for(var e in this._yscales){this._yscales[e].target_range=this._v_target}},t.prototype._set_geometry=function(t,a){e.prototype._set_geometry.call(this,t,a),this._update_scales()},Object.defineProperty(t.prototype,\"x_ranges\",{get:function(){return this._x_ranges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"y_ranges\",{get:function(){return this._y_ranges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"xscales\",{get:function(){return this._xscales},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"yscales\",{get:function(){return this._yscales},enumerable:!0,configurable:!0}),t}(e(282).LayoutItem);a.CartesianFrame=g,g.__name__=\"CartesianFrame\"},\n", | |
" function _(t,e,c){var n=t(113),o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.prototype.compute=function(e){return t.prototype.compute.call(this,this.source_range.synthetic(e))},e.prototype.v_compute=function(e){return t.prototype.v_compute.call(this,this.source_range.v_synthetic(e))},e}(t(215).LinearScale);c.CategoricalScale=o,o.__name__=\"CategoricalScale\"},\n", | |
" function _(t,i,n){var e=t(113),a=t(281),r=t(175),s=t(167),o=t(121),l=t(181),_=t(110),d=function(t){function i(i){var n=t.call(this,i)||this;return n._plot_bounds={},n.have_updated_interactively=!1,n}return e.__extends(i,t),i.init_DataRange1d=function(){this.define({start:[o.Number],end:[o.Number],range_padding:[o.Number,.1],range_padding_units:[o.PaddingUnits,\"percent\"],flipped:[o.Boolean,!1],follow:[o.StartEnd],follow_interval:[o.Number],default_span:[o.Number,2],only_visible:[o.Boolean,!1]}),this.internal({scale_hint:[o.String,\"auto\"]})},i.prototype.initialize=function(){t.prototype.initialize.call(this),this._initial_start=this.start,this._initial_end=this.end,this._initial_range_padding=this.range_padding,this._initial_range_padding_units=this.range_padding_units,this._initial_follow=this.follow,this._initial_follow_interval=this.follow_interval,this._initial_default_span=this.default_span},Object.defineProperty(i.prototype,\"min\",{get:function(){return Math.min(this.start,this.end)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"max\",{get:function(){return Math.max(this.start,this.end)},enumerable:!0,configurable:!0}),i.prototype.computed_renderers=function(){var t=this.names,i=this.renderers;if(0==i.length)for(var n=0,e=this.plots;n<e.length;n++){var a=e[n].renderers.filter(function(t){return t instanceof r.GlyphRenderer});i=i.concat(a)}t.length>0&&(i=i.filter(function(i){return _.includes(t,i.name)})),s.logger.debug(\"computed \"+i.length+\" renderers for DataRange1d \"+this.id);for(var o=0,l=i;o<l.length;o++){var d=l[o];s.logger.trace(\" - \"+d.type+\" \"+d.id)}return i},i.prototype._compute_plot_bounds=function(t,i){for(var n=l.empty(),e=0,a=t;e<a.length;e++){var r=a[e];null==i[r.id]||!r.visible&&this.only_visible||(n=l.union(n,i[r.id]))}return n},i.prototype.adjust_bounds_for_aspect=function(t,i){var n=l.empty(),e=t.x1-t.x0;e<=0&&(e=1);var a=t.y1-t.y0;a<=0&&(a=1);var r=.5*(t.x1+t.x0),s=.5*(t.y1+t.y0);return e<i*a?e=i*a:a=e/i,n.x1=r+.5*e,n.x0=r-.5*e,n.y1=s+.5*a,n.y0=s-.5*a,n},i.prototype._compute_min_max=function(t,i){var n,e,a,r,s=l.empty();for(var o in t){var _=t[o];s=l.union(s,_)}return 0==i?(a=(n=[s.x0,s.x1])[0],r=n[1]):(a=(e=[s.y0,s.y1])[0],r=e[1]),[a,r]},i.prototype._compute_range=function(t,i){var n,e,a,r=this.range_padding;if(\"log\"==this.scale_hint){(isNaN(t)||!isFinite(t)||t<=0)&&(t=isNaN(i)||!isFinite(i)||i<=0?.1:i/100,s.logger.warn(\"could not determine minimum data value for log axis, DataRange1d using value \"+t)),(isNaN(i)||!isFinite(i)||i<=0)&&(i=isNaN(t)||!isFinite(t)||t<=0?10:100*t,s.logger.warn(\"could not determine maximum data value for log axis, DataRange1d using value \"+i));var o=void 0,l=void 0;if(i==t)l=this.default_span+.001,o=Math.log(t)/Math.log(10);else{var _=void 0,d=void 0;\"percent\"==this.range_padding_units?(_=Math.log(t)/Math.log(10),l=((d=Math.log(i)/Math.log(10))-_)*(1+r)):(_=Math.log(t-r)/Math.log(10),l=(d=Math.log(i+r)/Math.log(10))-_),o=(_+d)/2}e=Math.pow(10,o-l/2),a=Math.pow(10,o+l/2)}else{l=void 0;e=(o=(i+t)/2)-(l=i==t?this.default_span:\"percent\"==this.range_padding_units?(i-t)*(1+r):i-t+2*r)/2,a=o+l/2}var h=1;this.flipped&&(e=(n=[a,e])[0],a=n[1],h=-1);var u=this.follow_interval;return null!=u&&Math.abs(e-a)>u&&(\"start\"==this.follow?a=e+h*u:\"end\"==this.follow&&(e=a-h*u)),[e,a]},i.prototype.update=function(t,i,n,e){if(!this.have_updated_interactively){var a=this.computed_renderers(),r=this._compute_plot_bounds(a,t);null!=e&&(r=this.adjust_bounds_for_aspect(r,e)),this._plot_bounds[n]=r;var s=this._compute_min_max(this._plot_bounds,i),o=s[0],l=s[1],_=this._compute_range(o,l),d=_[0],h=_[1];null!=this._initial_start&&(\"log\"==this.scale_hint?this._initial_start>0&&(d=this._initial_start):d=this._initial_start),null!=this._initial_end&&(\"log\"==this.scale_hint?this._initial_end>0&&(h=this._initial_end):h=this._initial_end);var u=[this.start,this.end],p=u[0],g=u[1];if(d!=p||h!=g){var f={};d!=p&&(f.start=d),h!=g&&(f.end=h),this.setv(f)}\"auto\"==this.bounds&&this.setv({bounds:[d,h]},{silent:!0}),this.change.emit()}},i.prototype.reset=function(){this.have_updated_interactively=!1,this.setv({range_padding:this._initial_range_padding,range_padding_units:this._initial_range_padding_units,follow:this._initial_follow,follow_interval:this._initial_follow_interval,default_span:this._initial_default_span},{silent:!0}),this.change.emit()},i}(a.DataRange);n.DataRange1d=d,d.__name__=\"DataRange1d\",d.init_DataRange1d()},\n", | |
" function _(n,a,e){var t=n(113),i=n(185),r=n(121),_=function(n){function a(a){return n.call(this,a)||this}return t.__extends(a,n),a.init_DataRange=function(){this.define({names:[r.Array,[]],renderers:[r.Array,[]]})},a}(i.Range);e.DataRange=_,_.__name__=\"DataRange\",_.init_DataRange()},\n", | |
" function _(a,o,t){var r=a(283);t.Sizeable=r.Sizeable;var e=a(284);t.Layoutable=e.Layoutable,t.LayoutItem=e.LayoutItem;var n=a(285);t.HStack=n.HStack,t.VStack=n.VStack,t.AnchorLayout=n.AnchorLayout;var c=a(286);t.Grid=c.Grid,t.Row=c.Row,t.Column=c.Column;var i=a(287);t.ContentBox=i.ContentBox,t.VariadicBox=i.VariadicBox},\n", | |
" function _(t,h,i){var e=Math.min,n=Math.max,o=function(){function t(t){void 0===t&&(t={}),this.width=null!=t.width?t.width:0,this.height=null!=t.height?t.height:0}return t.prototype.bounded_to=function(h){var i=h.width,e=h.height;return new t({width:this.width==1/0&&null!=i?i:this.width,height:this.height==1/0&&null!=e?e:this.height})},t.prototype.expanded_to=function(h){var i=h.width,e=h.height;return new t({width:i!=1/0?n(this.width,i):this.width,height:e!=1/0?n(this.height,e):this.height})},t.prototype.expand_to=function(t){var h=t.width,i=t.height;this.width=n(this.width,h),this.height=n(this.height,i)},t.prototype.narrowed_to=function(h){var i=h.width,n=h.height;return new t({width:e(this.width,i),height:e(this.height,n)})},t.prototype.narrow_to=function(t){var h=t.width,i=t.height;this.width=e(this.width,h),this.height=e(this.height,i)},t.prototype.grow_by=function(h){var i=h.left,e=h.right,n=h.top,o=h.bottom;return new t({width:this.width+i+e,height:this.height+n+o})},t.prototype.shrink_by=function(h){var i=h.left,e=h.right,o=h.top,r=h.bottom;return new t({width:n(this.width-i-e,0),height:n(this.height-o-r,0)})},t.prototype.map=function(h,i){return new t({width:h(this.width),height:(null!=i?i:h)(this.height)})},t}();i.Sizeable=o,o.__name__=\"Sizeable\"},\n", | |
" function _(i,t,e){var h=i(113),n=i(283),r=i(181),s=Math.min,o=Math.max,g=Math.round,u=function(){function i(){this._bbox=new r.BBox,this._inner_bbox=new r.BBox;var i=this;this._top={get value(){return i.bbox.top}},this._left={get value(){return i.bbox.left}},this._width={get value(){return i.bbox.width}},this._height={get value(){return i.bbox.height}},this._right={get value(){return i.bbox.right}},this._bottom={get value(){return i.bbox.bottom}},this._hcenter={get value(){return i.bbox.hcenter}},this._vcenter={get value(){return i.bbox.vcenter}}}return Object.defineProperty(i.prototype,\"bbox\",{get:function(){return this._bbox},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"inner_bbox\",{get:function(){return this._inner_bbox},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"sizing\",{get:function(){return this._sizing},enumerable:!0,configurable:!0}),i.prototype.set_sizing=function(i){var t=i.width_policy||\"fit\",e=i.width,h=null!=i.min_width?i.min_width:0,n=null!=i.max_width?i.max_width:1/0,r=i.height_policy||\"fit\",s=i.height,o=null!=i.min_height?i.min_height:0,g=null!=i.max_height?i.max_height:1/0,u=i.aspect,a=i.margin||{top:0,right:0,bottom:0,left:0},l=!1!==i.visible,_=i.halign||\"start\",d=i.valign||\"start\";this._sizing={width_policy:t,min_width:h,width:e,max_width:n,height_policy:r,min_height:o,height:s,max_height:g,aspect:u,margin:a,visible:l,halign:_,valign:d,size:{width:e,height:s},min_size:{width:h,height:o},max_size:{width:n,height:g}},this._init()},i.prototype._init=function(){},i.prototype._set_geometry=function(i,t){this._bbox=i,this._inner_bbox=t},i.prototype.set_geometry=function(i,t){this._set_geometry(i,t||i)},i.prototype.is_width_expanding=function(){return\"max\"==this.sizing.width_policy},i.prototype.is_height_expanding=function(){return\"max\"==this.sizing.height_policy},i.prototype.apply_aspect=function(i,t){var e=t.width,h=t.height,n=this.sizing.aspect;if(null!=n){var r=this.sizing,s=r.width_policy,o=r.height_policy;if(\"fixed\"!=s&&\"fixed\"!=o)if(s==o){var u=e,a=g(e/n),l=g(h*n),_=h;Math.abs(i.width-u)+Math.abs(i.height-a)<=Math.abs(i.width-l)+Math.abs(i.height-_)?(e=u,h=a):(e=l,h=_)}else!function(i,t){var e={max:4,fit:3,min:2,fixed:1};return e[i]>e[t]}(s,o)?e=g(h*n):h=g(e/n);else\"fixed\"==s?h=g(e/n):\"fixed\"==o&&(e=g(h*n))}return{width:e,height:h}},i.prototype.measure=function(i){var t=this;if(!this.sizing.visible)return{width:0,height:0};var e=function(i){return\"fixed\"==t.sizing.width_policy&&null!=t.sizing.width?t.sizing.width:i},h=function(i){return\"fixed\"==t.sizing.height_policy&&null!=t.sizing.height?t.sizing.height:i},r=new n.Sizeable(i).shrink_by(this.sizing.margin).map(e,h),s=this._measure(r),o=this.clip_size(s),g=e(o.width),u=h(o.height),a=this.apply_aspect(r,{width:g,height:u});return Object.assign(Object.assign({},s),a)},i.prototype.compute=function(i){void 0===i&&(i={});var t=this.measure({width:null!=i.width&&this.is_width_expanding()?i.width:1/0,height:null!=i.height&&this.is_height_expanding()?i.height:1/0}),e=t.width,h=t.height,n=new r.BBox({left:0,top:0,width:e,height:h}),s=void 0;if(null!=t.inner){var o=t.inner,g=o.left,u=o.top,a=o.right,l=o.bottom;s=new r.BBox({left:g,top:u,right:e-a,bottom:h-l})}this.set_geometry(n,s)},Object.defineProperty(i.prototype,\"xview\",{get:function(){return this.bbox.xview},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"yview\",{get:function(){return this.bbox.yview},enumerable:!0,configurable:!0}),i.prototype.clip_width=function(i){return o(this.sizing.min_width,s(i,this.sizing.max_width))},i.prototype.clip_height=function(i){return o(this.sizing.min_height,s(i,this.sizing.max_height))},i.prototype.clip_size=function(i){var t=i.width,e=i.height;return{width:this.clip_width(t),height:this.clip_height(e)}},i}();e.Layoutable=u,u.__name__=\"Layoutable\";var a=function(i){function t(){return null!==i&&i.apply(this,arguments)||this}return h.__extends(t,i),t.prototype._measure=function(i){var t,e,h=this.sizing,n=h.width_policy,r=h.height_policy;if(i.width==1/0)t=null!=this.sizing.width?this.sizing.width:0;else if(\"fixed\"==n)t=null!=this.sizing.width?this.sizing.width:0;else if(\"min\"==n)t=null!=this.sizing.width?s(i.width,this.sizing.width):0;else if(\"fit\"==n)t=null!=this.sizing.width?s(i.width,this.sizing.width):i.width;else{if(\"max\"!=n)throw new Error(\"unrechable\");t=null!=this.sizing.width?o(i.width,this.sizing.width):i.width}if(i.height==1/0)e=null!=this.sizing.height?this.sizing.height:0;else if(\"fixed\"==r)e=null!=this.sizing.height?this.sizing.height:0;else if(\"min\"==r)e=null!=this.sizing.height?s(i.height,this.sizing.height):0;else if(\"fit\"==r)e=null!=this.sizing.height?s(i.height,this.sizing.height):i.height;else{if(\"max\"!=r)throw new Error(\"unrechable\");e=null!=this.sizing.height?o(i.height,this.sizing.height):i.height}return{width:t,height:e}},t}(u);e.LayoutItem=a,a.__name__=\"LayoutItem\";var l=function(i){function t(){return null!==i&&i.apply(this,arguments)||this}return h.__extends(t,i),t.prototype._measure=function(i){var t=this,e=this._content_size(),h=i.bounded_to(this.sizing.size).bounded_to(e);return{width:function(){switch(t.sizing.width_policy){case\"fixed\":return null!=t.sizing.width?t.sizing.width:e.width;case\"min\":return e.width;case\"fit\":return h.width;case\"max\":return Math.max(e.width,h.width);default:throw new Error(\"unexpected\")}}(),height:function(){switch(t.sizing.height_policy){case\"fixed\":return null!=t.sizing.height?t.sizing.height:e.height;case\"min\":return e.height;case\"fit\":return h.height;case\"max\":return Math.max(e.height,h.height);default:throw new Error(\"unexpected\")}}()}},t}(u);e.ContentLayoutable=l,l.__name__=\"ContentLayoutable\"},\n", | |
" function _(t,e,r){var h=t(113),o=t(284),i=t(181),n=function(t){function e(){var e=t.apply(this,arguments)||this;return e.children=[],e}return h.__extends(e,t),e}(o.Layoutable);r.Stack=n,n.__name__=\"Stack\";var a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h.__extends(e,t),e.prototype._measure=function(t){for(var e=0,r=0,h=0,o=this.children;h<o.length;h++){var i=o[h].measure({width:0,height:0});e+=i.width,r=Math.max(r,i.height)}return{width:e,height:r}},e.prototype._set_geometry=function(e,r){t.prototype._set_geometry.call(this,e,r);for(var h=e.top,o=e.bottom,n=e.left,a=0,c=this.children;a<c.length;a++){var _=c[a],s=_.measure({width:0,height:0}).width;_.set_geometry(new i.BBox({left:n,width:s,top:h,bottom:o})),n+=s}},e}(n);r.HStack=a,a.__name__=\"HStack\";var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h.__extends(e,t),e.prototype._measure=function(t){for(var e=0,r=0,h=0,o=this.children;h<o.length;h++){var i=o[h].measure({width:0,height:0});e=Math.max(e,i.width),r+=i.height}return{width:e,height:r}},e.prototype._set_geometry=function(e,r){t.prototype._set_geometry.call(this,e,r);for(var h=e.left,o=e.right,n=e.top,a=0,c=this.children;a<c.length;a++){var _=c[a],s=_.measure({width:0,height:0}).height;_.set_geometry(new i.BBox({top:n,height:s,left:h,right:o})),n+=s}},e}(n);r.VStack=c,c.__name__=\"VStack\";var _=function(t){function e(){var e=t.apply(this,arguments)||this;return e.children=[],e}return h.__extends(e,t),e.prototype._measure=function(t){for(var e=0,r=0,h=0,o=this.children;h<o.length;h++){var i=o[h].layout.measure(t);e=Math.max(e,i.width),r=Math.max(r,i.height)}return{width:e,height:r}},e.prototype._set_geometry=function(e,r){t.prototype._set_geometry.call(this,e,r);for(var h=0,o=this.children;h<o.length;h++){var n=o[h],a=n.layout,c=n.anchor,_=n.margin,s=e.left,g=e.right,l=e.top,u=e.bottom,p=e.hcenter,d=e.vcenter,m=a.measure(e),w=m.width,f=m.height,y=void 0;switch(c){case\"top_left\":y=new i.BBox({left:s+_,top:l+_,width:w,height:f});break;case\"top_center\":y=new i.BBox({hcenter:p,top:l+_,width:w,height:f});break;case\"top_right\":y=new i.BBox({right:g-_,top:l+_,width:w,height:f});break;case\"bottom_right\":y=new i.BBox({right:g-_,bottom:u-_,width:w,height:f});break;case\"bottom_center\":y=new i.BBox({hcenter:p,bottom:u-_,width:w,height:f});break;case\"bottom_left\":y=new i.BBox({left:s+_,bottom:u-_,width:w,height:f});break;case\"center_left\":y=new i.BBox({left:s+_,vcenter:d,width:w,height:f});break;case\"center\":y=new i.BBox({hcenter:p,vcenter:d,width:w,height:f});break;case\"center_right\":y=new i.BBox({right:g-_,vcenter:d,width:w,height:f});break;default:throw new Error(\"unreachable\")}a.set_geometry(y)}},e}(o.Layoutable);r.AnchorLayout=_,_.__name__=\"AnchorLayout\"},\n", | |
" function _(t,i,e){var n=t(113),r=t(283),o=t(284),s=t(109),a=t(181),h=t(110),c=Math.max,l=Math.round,f=function(){function t(t){this.def=t,this._map=new Map}return t.prototype.get=function(t){var i=this._map.get(t);return void 0===i&&(i=this.def(),this._map.set(t,i)),i},t.prototype.apply=function(t,i){var e=this.get(t);this._map.set(t,i(e))},t}();f.__name__=\"DefaultMap\";var u=function(){function t(){this._items=[],this._nrows=0,this._ncols=0}return Object.defineProperty(t.prototype,\"nrows\",{get:function(){return this._nrows},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"ncols\",{get:function(){return this._ncols},enumerable:!0,configurable:!0}),t.prototype.add=function(t,i){var e=t.r1,n=t.c1;this._nrows=c(this._nrows,e+1),this._ncols=c(this._ncols,n+1),this._items.push({span:t,data:i})},t.prototype.at=function(t,i){return this._items.filter(function(e){var n=e.span;return n.r0<=t&&t<=n.r1&&n.c0<=i&&i<=n.c1}).map(function(t){return t.data})},t.prototype.row=function(t){return this._items.filter(function(i){var e=i.span;return e.r0<=t&&t<=e.r1}).map(function(t){return t.data})},t.prototype.col=function(t){return this._items.filter(function(i){var e=i.span;return e.c0<=t&&t<=e.c1}).map(function(t){return t.data})},t.prototype.foreach=function(t){for(var i=0,e=this._items;i<e.length;i++){var n=e[i];t(n.span,n.data)}},t.prototype.map=function(i){for(var e=new t,n=0,r=this._items;n<r.length;n++){var o=r[n],s=o.span,a=o.data;e.add(s,i(s,a))}return e},t}();u.__name__=\"Container\";var p=function(t){function i(i){void 0===i&&(i=[]);var e=t.call(this)||this;return e.items=i,e.rows=\"auto\",e.cols=\"auto\",e.spacing=0,e.absolute=!1,e}return n.__extends(i,t),i.prototype.is_width_expanding=function(){if(t.prototype.is_width_expanding.call(this))return!0;if(\"fixed\"==this.sizing.width_policy)return!1;var i=this._state.cols;return h.some(i,function(t){return\"max\"==t.policy})},i.prototype.is_height_expanding=function(){if(t.prototype.is_height_expanding.call(this))return!0;if(\"fixed\"==this.sizing.height_policy)return!1;var i=this._state.rows;return h.some(i,function(t){return\"max\"==t.policy})},i.prototype._init=function(){var i=this;t.prototype._init.call(this);for(var e=new u,n=0,r=this.items;n<r.length;n++){var o=r[n],a=o.layout,c=o.row,l=o.col,f=o.row_span,p=o.col_span;if(a.sizing.visible){var g=c,_=l,d=c+(null!=f?f:1)-1,w=l+(null!=p?p:1)-1;e.add({r0:g,c0:_,r1:d,c1:w},a)}}for(var y=e.nrows,m=e.ncols,v=new Array(y),x=function(t){var n,r=null==(n=s.isPlainObject(i.rows)?i.rows[t]||i.rows[\"*\"]:i.rows)?{policy:\"auto\"}:s.isNumber(n)?{policy:\"fixed\",height:n}:s.isString(n)?{policy:n}:n,o=r.align||\"auto\";if(\"fixed\"==r.policy)v[t]={policy:\"fixed\",height:r.height,align:o};else if(\"min\"==r.policy)v[t]={policy:\"min\",align:o};else if(\"fit\"==r.policy||\"max\"==r.policy)v[t]={policy:r.policy,flex:r.flex||1,align:o};else{if(\"auto\"!=r.policy)throw new Error(\"unrechable\");h.some(e.row(t),function(t){return t.is_height_expanding()})?v[t]={policy:\"max\",flex:1,align:o}:v[t]={policy:\"min\",align:o}}},b=0;b<y;b++)x(b);for(var z=new Array(m),j=function(t){var n,r=null==(n=s.isPlainObject(i.cols)?i.cols[t]||i.cols[\"*\"]:i.cols)?{policy:\"auto\"}:s.isNumber(n)?{policy:\"fixed\",width:n}:s.isString(n)?{policy:n}:n,o=r.align||\"auto\";if(\"fixed\"==r.policy)z[t]={policy:\"fixed\",width:r.width,align:o};else if(\"min\"==r.policy)z[t]={policy:\"min\",align:o};else if(\"fit\"==r.policy||\"max\"==r.policy)z[t]={policy:r.policy,flex:r.flex||1,align:o};else{if(\"auto\"!=r.policy)throw new Error(\"unrechable\");h.some(e.col(t),function(t){return t.is_width_expanding()})?z[t]={policy:\"max\",flex:1,align:o}:z[t]={policy:\"min\",align:o}}},O=0;O<m;O++)j(O);var B=s.isNumber(this.spacing)?[this.spacing,this.spacing]:this.spacing,A=B[0],M=B[1];this._state={items:e,nrows:y,ncols:m,rows:v,cols:z,rspacing:A,cspacing:M}},i.prototype._measure_totals=function(t,i){var e=this._state,n=e.nrows,r=e.ncols,o=e.rspacing,s=e.cspacing;return{height:h.sum(t)+(n-1)*o,width:h.sum(i)+(r-1)*s}},i.prototype._measure_cells=function(t){for(var i=this._state,e=i.items,n=i.nrows,o=i.ncols,s=i.rows,a=i.cols,h=i.rspacing,f=i.cspacing,p=new Array(n),g=0;g<n;g++){var _=s[g];p[g]=\"fixed\"==_.policy?_.height:0}for(var d=new Array(o),w=0;w<o;w++){var y=a[w];d[w]=\"fixed\"==y.policy?y.width:0}var m=new u;return e.foreach(function(i,e){for(var n=i.r0,o=i.c0,u=i.r1,g=i.c1,_=(u-n)*h,w=(g-o)*f,y=0,v=n;v<=u;v++)y+=t(v,o).height;y+=_;for(var x=0,b=o;b<=g;b++)x+=t(n,b).width;x+=w;var z=e.measure({width:x,height:y});m.add(i,{layout:e,size_hint:z});var j=new r.Sizeable(z).grow_by(e.sizing.margin);j.height-=_,j.width-=w;var O=[];for(v=n;v<=u;v++){var B=s[v];\"fixed\"==B.policy?j.height-=B.height:O.push(v)}if(j.height>0)for(var A=l(j.height/O.length),M=0,P=O;M<P.length;M++){v=P[M];p[v]=c(p[v],A)}var C=[];for(b=o;b<=g;b++){var N=a[b];\"fixed\"==N.policy?j.width-=N.width:C.push(b)}if(j.width>0)for(var S=l(j.width/C.length),E=0,G=C;E<G.length;E++){b=G[E];d[b]=c(d[b],S)}}),{size:this._measure_totals(p,d),row_heights:p,col_widths:d,size_hints:m}},i.prototype._measure_grid=function(t){var i,e=this._state,n=e.nrows,r=e.ncols,o=e.rows,s=e.cols,a=e.rspacing,h=e.cspacing,f=this._measure_cells(function(t,i){var e=o[t],n=s[i];return{width:\"fixed\"==n.policy?n.width:1/0,height:\"fixed\"==e.policy?e.height:1/0}});i=\"fixed\"==this.sizing.height_policy&&null!=this.sizing.height?this.sizing.height:t.height!=1/0&&this.is_height_expanding()?t.height:f.size.height;for(var u,p=0,g=0;g<n;g++){\"fit\"==(w=o[g]).policy||\"max\"==w.policy?p+=w.flex:i-=f.row_heights[g]}if(i-=(n-1)*a,0!=p&&i>0)for(g=0;g<n;g++){if(\"fit\"==(w=o[g]).policy||\"max\"==w.policy)i-=y=l(i*(w.flex/p)),f.row_heights[g]=y,p-=w.flex}else if(i<0){var _=0;for(g=0;g<n;g++){\"fixed\"!=(w=o[g]).policy&&_++}var d=-i;for(g=0;g<n;g++){var w;if(\"fixed\"!=(w=o[g]).policy){var y=f.row_heights[g],m=l(d/_);f.row_heights[g]=c(y-m,0),d-=m>y?y:m,_--}}}u=\"fixed\"==this.sizing.width_policy&&null!=this.sizing.width?this.sizing.width:t.width!=1/0&&this.is_width_expanding()?t.width:f.size.width;for(var v=0,x=0;x<r;x++){\"fit\"==(z=s[x]).policy||\"max\"==z.policy?v+=z.flex:u-=f.col_widths[x]}if(u-=(r-1)*h,0!=v&&u>0)for(x=0;x<r;x++){if(\"fit\"==(z=s[x]).policy||\"max\"==z.policy)u-=j=l(u*(z.flex/v)),f.col_widths[x]=j,v-=z.flex}else if(u<0){for(_=0,x=0;x<r;x++){\"fixed\"!=(z=s[x]).policy&&_++}var b=-u;for(x=0;x<r;x++){var z;if(\"fixed\"!=(z=s[x]).policy){var j=f.col_widths[x];m=l(b/_);f.col_widths[x]=c(j-m,0),b-=m>j?j:m,_--}}}var O=this._measure_cells(function(t,i){return{width:f.col_widths[i],height:f.row_heights[t]}}),B=O.row_heights,A=O.col_widths,M=O.size_hints;return{size:this._measure_totals(B,A),row_heights:B,col_widths:A,size_hints:M}},i.prototype._measure=function(t){return this._measure_grid(t).size},i.prototype._set_geometry=function(i,e){t.prototype._set_geometry.call(this,i,e);for(var n=this._state,r=n.nrows,o=n.ncols,s=n.rspacing,h=n.cspacing,u=this._measure_grid(i),p=u.row_heights,g=u.col_widths,_=u.size_hints,d=this._state.rows.map(function(t,i){return Object.assign(Object.assign({},t),{top:0,height:p[i],get bottom(){return this.top+this.height}})}),w=this._state.cols.map(function(t,i){return Object.assign(Object.assign({},t),{left:0,width:g[i],get right(){return this.left+this.width}})}),y=_.map(function(t,i){return Object.assign(Object.assign({},i),{outer:new a.BBox,inner:new a.BBox})}),m=0,v=this.absolute?i.top:0;m<r;m++){var x=d[m];x.top=v,v+=x.height+s}for(var b=0,z=this.absolute?i.left:0;b<o;b++){var j=w[b];j.left=z,z+=j.width+h}y.foreach(function(t,i){var e=t.r0,n=t.c0,r=t.r1,o=t.c1,c=i.layout,f=i.size_hint,u=c.sizing,p=f.width,g=f.height,_=function(t,i){for(var e=(i-t)*h,n=t;n<=i;n++)e+=w[n].width;return e}(n,o),y=function(t,i){for(var e=(i-t)*s,n=t;n<=i;n++)e+=d[n].height;return e}(e,r),m=n==o&&\"auto\"!=w[n].align?w[n].align:u.halign,v=e==r&&\"auto\"!=d[e].align?d[e].align:u.valign,x=w[n].left;\"start\"==m?x+=u.margin.left:\"center\"==m?x+=l((_-p)/2):\"end\"==m&&(x+=_-u.margin.right-p);var b=d[e].top;\"start\"==v?b+=u.margin.top:\"center\"==v?b+=l((y-g)/2):\"end\"==v&&(b+=y-u.margin.bottom-g),i.outer=new a.BBox({left:x,top:b,width:p,height:g})});var O=d.map(function(){return{start:new f(function(){return 0}),end:new f(function(){return 0})}}),B=w.map(function(){return{start:new f(function(){return 0}),end:new f(function(){return 0})}});y.foreach(function(t,i){var e=t.r0,n=t.c0,r=t.r1,o=t.c1,s=i.size_hint,a=i.outer,h=s.inner;null!=h&&(O[e].start.apply(a.top,function(t){return c(t,h.top)}),O[r].end.apply(d[r].bottom-a.bottom,function(t){return c(t,h.bottom)}),B[n].start.apply(a.left,function(t){return c(t,h.left)}),B[o].end.apply(w[o].right-a.right,function(t){return c(t,h.right)}))}),y.foreach(function(t,i){var e=t.r0,n=t.c0,r=t.r1,o=t.c1,s=i.size_hint,h=i.outer;function c(t){var i=t.left,e=t.right,n=t.top,r=t.bottom,o=h.width-i-e,s=h.height-n-r;return new a.BBox({left:i,top:n,width:o,height:s})}if(null!=s.inner){var l=c(s.inner);if(!1!==s.align){var f=O[e].start.get(h.top),u=O[r].end.get(d[r].bottom-h.bottom),p=B[n].start.get(h.left),g=B[o].end.get(w[o].right-h.right);try{l=c({top:f,bottom:u,left:p,right:g})}catch(t){}}i.inner=l}else i.inner=h}),y.foreach(function(t,i){var e=i.layout,n=i.outer,r=i.inner;e.set_geometry(n,r)})},i}(o.Layoutable);e.Grid=p,p.__name__=\"Grid\";var g=function(t){function i(i){var e=t.call(this)||this;return e.items=i.map(function(t,i){return{layout:t,row:0,col:i}}),e.rows=\"fit\",e}return n.__extends(i,t),i}(p);e.Row=g,g.__name__=\"Row\";var _=function(t){function i(i){var e=t.call(this)||this;return e.items=i.map(function(t,i){return{layout:t,row:i,col:0}}),e.cols=\"fit\",e}return n.__extends(i,t),i}(p);e.Column=_,_.__name__=\"Column\"},\n", | |
" function _(e,n,t){var i=e(113),o=e(284),r=e(283),a=e(163),u=function(e){function n(n){var t=e.call(this)||this;return t.content_size=a.unsized(n,function(){return new r.Sizeable(a.size(n))}),t}return i.__extends(n,e),n.prototype._content_size=function(){return this.content_size},n}(o.ContentLayoutable);t.ContentBox=u,u.__name__=\"ContentBox\";var _=function(e){function n(n){var t=e.call(this)||this;return t.el=n,t}return i.__extends(n,e),n.prototype._measure=function(e){var n=this,t=new r.Sizeable(e).bounded_to(this.sizing.size);return a.sized(this.el,t,function(){var e=new r.Sizeable(a.content_size(n.el)),t=a.extents(n.el),i=t.border,o=t.padding;return e.grow_by(i).grow_by(o).map(Math.ceil)})},n}(o.Layoutable);t.VariadicBox=_,_.__name__=\"VariadicBox\"},\n", | |
" function _(a,r,u){var m=a(289);u.Expression=m.Expression;var n=a(290);u.Stack=n.Stack;var s=a(291);u.CumSum=s.CumSum},\n", | |
" function _(t,e,n){var i=t(113),r=function(t){function e(e){var n=t.call(this,e)||this;return n._connected={},n._result={},n}return i.__extends(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this._connected={},this._result={}},e.prototype.v_compute=function(t){var e=this;null==this._connected[t.id]&&(this.connect(t.change,function(){return delete e._result[t.id]}),this.connect(t.patching,function(){return delete e._result[t.id]}),this.connect(t.streaming,function(){return delete e._result[t.id]}),this._connected[t.id]=!0);var n=this._result[t.id];return null==n&&(this._result[t.id]=n=this._v_compute(t)),n},e}(t(166).Model);n.Expression=r,r.__name__=\"Expression\"},\n", | |
" function _(t,n,i){var e=t(113),r=t(289),a=t(121),o=function(t){function n(n){return t.call(this,n)||this}return e.__extends(n,t),n.init_Stack=function(){this.define({fields:[a.Array,[]]})},n.prototype._v_compute=function(t){for(var n=t.get_length()||0,i=new Float64Array(n),e=0,r=this.fields;e<r.length;e++){var a=r[e],o=t.data[a];if(null!=o)for(var _=0,c=Math.min(n,o.length);_<c;_++)i[_]+=o[_]}return i},n}(r.Expression);i.Stack=o,o.__name__=\"Stack\",o.init_Stack()},\n", | |
" function _(n,t,e){var i=n(113),u=n(289),r=n(121),o=function(n){function t(t){return n.call(this,t)||this}return i.__extends(t,n),t.init_CumSum=function(){this.define({field:[r.String],include_zero:[r.Boolean,!1]})},t.prototype._v_compute=function(n){var t=new Float64Array(n.get_length()||0),e=n.data[this.field],i=this.include_zero?1:0;t[0]=this.include_zero?0:e[0];for(var u=1;u<t.length;u++)t[u]=t[u-1]+e[u-i];return t},t}(u.Expression);e.CumSum=o,o.__name__=\"CumSum\",o.init_CumSum()},\n", | |
" function _(r,e,t){var l=r(293);t.BooleanFilter=l.BooleanFilter;var i=r(295);t.CustomJSFilter=i.CustomJSFilter;var F=r(294);t.Filter=F.Filter;var o=r(296);t.GroupFilter=o.GroupFilter;var a=r(297);t.IndexFilter=a.IndexFilter},\n", | |
" function _(n,e,o){var t=n(113),l=n(294),i=n(121),r=n(167),a=n(110),s=n(109),g=function(n){function e(e){return n.call(this,e)||this}return t.__extends(e,n),e.init_BooleanFilter=function(){this.define({booleans:[i.Array,null]})},e.prototype.compute_indices=function(n){var e=this.booleans;return null!=e&&e.length>0?a.every(e,s.isBoolean)?(e.length!==n.get_length()&&r.logger.warn(\"BooleanFilter \"+this.id+\": length of booleans doesn't match data source\"),a.range(0,e.length).filter(function(n){return!0===e[n]})):(r.logger.warn(\"BooleanFilter \"+this.id+\": booleans should be array of booleans, defaulting to no filtering\"),null):(null!=e&&0==e.length?r.logger.warn(\"BooleanFilter \"+this.id+\": booleans is empty, defaulting to no filtering\"):r.logger.warn(\"BooleanFilter \"+this.id+\": booleans was not set, defaulting to no filtering\"),null)},e}(l.Filter);o.BooleanFilter=g,g.__name__=\"BooleanFilter\",g.init_BooleanFilter()},\n", | |
" function _(t,n,e){var i=t(113),r=t(166),l=t(121),o=t(109),a=t(110),f=t(167),u=function(t){function n(n){return t.call(this,n)||this}return i.__extends(n,t),n.init_Filter=function(){this.define({filter:[l.Array,null]})},n.prototype.compute_indices=function(t){var n=this.filter;return null!=n&&n.length>=0?o.isArrayOf(n,o.isBoolean)?a.range(0,n.length).filter(function(t){return!0===n[t]}):o.isArrayOf(n,o.isInteger)?n:(f.logger.warn(\"Filter \"+this.id+\": filter should either be array of only booleans or only integers, defaulting to no filtering\"),null):(f.logger.warn(\"Filter \"+this.id+\": filter was not set to be an array, defaulting to no filtering\"),null)},n}(r.Model);e.Filter=u,u.__name__=\"Filter\",u.init_Filter()},\n", | |
" function _(e,t,r){var i=e(113),n=e(294),s=e(121),o=e(125),u=e(127),c=function(t){function r(e){return t.call(this,e)||this}return i.__extends(r,t),r.init_CustomJSFilter=function(){this.define({args:[s.Any,{}],code:[s.String,\"\"],use_strict:[s.Boolean,!1]})},Object.defineProperty(r.prototype,\"names\",{get:function(){return o.keys(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"values\",{get:function(){return o.values(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"func\",{get:function(){var e=this.use_strict?u.use_strict(this.code):this.code;return new(Function.bind.apply(Function,i.__spreadArrays([void 0],this.names,[\"source\",\"require\",\"exports\",e])))},enumerable:!0,configurable:!0}),r.prototype.compute_indices=function(r){return this.filter=this.func.apply(this,i.__spreadArrays(this.values,[r,e,{}])),t.prototype.compute_indices.call(this,r)},r}(n.Filter);r.CustomJSFilter=c,c.__name__=\"CustomJSFilter\",c.init_CustomJSFilter()},\n", | |
" function _(n,i,t){var r=n(113),e=n(294),u=n(121),o=n(167),l=n(110),c=function(n){function i(i){var t=n.call(this,i)||this;return t.indices=null,t}return r.__extends(i,n),i.init_GroupFilter=function(){this.define({column_name:[u.String],group:[u.String]})},i.prototype.compute_indices=function(n){var i=this,t=n.get_column(this.column_name);return null==t?(o.logger.warn(\"group filter: groupby column not found in data source\"),null):(this.indices=l.range(0,n.get_length()||0).filter(function(n){return t[n]===i.group}),0===this.indices.length&&o.logger.warn(\"group filter: group '\"+this.group+\"' did not match any values in column '\"+this.column_name+\"'\"),this.indices)},i}(e.Filter);t.GroupFilter=c,c.__name__=\"GroupFilter\",c.init_GroupFilter()},\n", | |
" function _(i,n,e){var t=i(113),r=i(294),l=i(121),s=i(167),d=i(109),o=i(110),u=function(i){function n(n){return i.call(this,n)||this}return t.__extends(n,i),n.init_IndexFilter=function(){this.define({indices:[l.Array,null]})},n.prototype.compute_indices=function(i){return null!=this.indices&&this.indices.length>=0?o.every(this.indices,d.isInteger)?this.indices:(s.logger.warn(\"IndexFilter \"+this.id+\": indices should be array of integers, defaulting to no filtering\"),null):(s.logger.warn(\"IndexFilter \"+this.id+\": indices was not set, defaulting to no filtering\"),null)},n}(r.Filter);e.IndexFilter=u,u.__name__=\"IndexFilter\",u.init_IndexFilter()},\n", | |
" function _(r,t,a){var e=r(208);a.BasicTickFormatter=e.BasicTickFormatter;var c=r(247);a.CategoricalTickFormatter=c.CategoricalTickFormatter;var i=r(251);a.DatetimeTickFormatter=i.DatetimeTickFormatter;var o=r(299);a.FuncTickFormatter=o.FuncTickFormatter;var m=r(264);a.LogTickFormatter=m.LogTickFormatter;var F=r(267);a.MercatorTickFormatter=F.MercatorTickFormatter;var k=r(300);a.NumeralTickFormatter=k.NumeralTickFormatter;var T=r(301);a.PrintfTickFormatter=T.PrintfTickFormatter;var v=r(209);a.TickFormatter=v.TickFormatter},\n", | |
" function _(t,e,r){var n=t(113),i=t(209),o=t(121),c=t(125),u=t(127),a=function(e){function r(t){return e.call(this,t)||this}return n.__extends(r,e),r.init_FuncTickFormatter=function(){this.define({args:[o.Any,{}],code:[o.String,\"\"],use_strict:[o.Boolean,!1]})},Object.defineProperty(r.prototype,\"names\",{get:function(){return c.keys(this.args)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,\"values\",{get:function(){return c.values(this.args)},enumerable:!0,configurable:!0}),r.prototype._make_func=function(){var t=this.use_strict?u.use_strict(this.code):this.code;return new(Function.bind.apply(Function,n.__spreadArrays([void 0,\"tick\",\"index\",\"ticks\"],this.names,[\"require\",\"exports\",t])))},r.prototype.doFormat=function(e,r){var i=this,o=this._make_func().bind({});return e.map(function(e,r,c){return o.apply(void 0,n.__spreadArrays([e,r,c],i.values,[t,{}]))})},r}(i.TickFormatter);r.FuncTickFormatter=a,a.__name__=\"FuncTickFormatter\",a.init_FuncTickFormatter()},\n", | |
" function _(n,r,t){var e=n(113),o=n(255),i=n(209),a=n(121),u=function(n){function r(r){return n.call(this,r)||this}return e.__extends(r,n),r.init_NumeralTickFormatter=function(){this.define({format:[a.String,\"0,0\"],language:[a.String,\"en\"],rounding:[a.RoundingFunction,\"round\"]})},Object.defineProperty(r.prototype,\"_rounding_fn\",{get:function(){switch(this.rounding){case\"round\":case\"nearest\":return Math.round;case\"floor\":case\"rounddown\":return Math.floor;case\"ceil\":case\"roundup\":return Math.ceil}},enumerable:!0,configurable:!0}),r.prototype.doFormat=function(n,r){var t=this.format,e=this.language,i=this._rounding_fn;return n.map(function(n){return o.format(n,t,e,i)})},r}(i.TickFormatter);t.NumeralTickFormatter=u,u.__name__=\"NumeralTickFormatter\",u.init_NumeralTickFormatter()},\n", | |
" function _(t,r,n){var i=t(113),o=t(209),e=t(253),f=t(121),a=function(t){function r(r){return t.call(this,r)||this}return i.__extends(r,t),r.init_PrintfTickFormatter=function(){this.define({format:[f.String,\"%s\"]})},r.prototype.doFormat=function(t,r){var n=this;return t.map(function(t){return e.sprintf(n.format,t)})},r}(o.TickFormatter);n.PrintfTickFormatter=a,a.__name__=\"PrintfTickFormatter\",a.init_PrintfTickFormatter()},\n", | |
" function _(a,e,r){var v=a(303);r.AnnularWedge=v.AnnularWedge;var l=a(304);r.Annulus=l.Annulus;var t=a(305);r.Arc=t.Arc;var i=a(306);r.Bezier=i.Bezier;var n=a(307);r.Circle=n.Circle;var u=a(308);r.CenterRotatable=u.CenterRotatable;var g=a(309);r.Ellipse=g.Ellipse;var c=a(310);r.EllipseOval=c.EllipseOval;var A=a(182);r.Glyph=A.Glyph;var p=a(188);r.HArea=p.HArea;var s=a(311);r.HBar=s.HBar;var R=a(313);r.HexTile=R.HexTile;var d=a(314);r.Image=d.Image;var h=a(316);r.ImageRGBA=h.ImageRGBA;var m=a(317);r.ImageURL=m.ImageURL;var y=a(177);r.Line=y.Line;var B=a(319);r.MultiLine=B.MultiLine;var o=a(320);r.MultiPolygons=o.MultiPolygons;var G=a(321);r.Oval=G.Oval;var H=a(187);r.Patch=H.Patch;var I=a(322);r.Patches=I.Patches;var L=a(323);r.Quad=L.Quad;var P=a(324);r.Quadratic=P.Quadratic;var x=a(325);r.Ray=x.Ray;var C=a(326);r.Rect=C.Rect;var E=a(327);r.Segment=E.Segment;var M=a(328);r.Step=M.Step;var O=a(329);r.Text=O.Text;var Q=a(190);r.VArea=Q.VArea;var S=a(330);r.VBar=S.VBar;var T=a(331);r.Wedge=T.Wedge;var V=a(178);r.XYGlyph=V.XYGlyph},\n", | |
" function _(t,e,i){var r=t(113),s=t(178),n=t(186),a=t(183),_=t(121),h=t(111),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e.prototype._map_data=function(){\"data\"==this.model.properties.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xscale,this._x,this._inner_radius):this.sinner_radius=this._inner_radius,\"data\"==this.model.properties.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xscale,this._x,this._outer_radius):this.souter_radius=this._outer_radius,this._angle=new Float32Array(this._start_angle.length);for(var t=0,e=this._start_angle.length;t<e;t++)this._angle[t]=this._end_angle[t]-this._start_angle[t]},e.prototype._render=function(t,e,i){for(var r=i.sx,s=i.sy,n=i._start_angle,a=i._angle,_=i.sinner_radius,h=i.souter_radius,o=this.model.properties.direction.value(),u=0,l=e;u<l.length;u++){var d=l[u];isNaN(r[d]+s[d]+_[d]+h[d]+n[d]+a[d])||(t.translate(r[d],s[d]),t.rotate(n[d]),t.moveTo(h[d],0),t.beginPath(),t.arc(0,0,h[d],0,a[d],o),t.rotate(a[d]),t.lineTo(_[d],0),t.arc(0,0,_[d],0,-a[d],!o),t.closePath(),t.rotate(-a[d]-n[d]),t.translate(-r[d],-s[d]),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,d),t.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(t,d),t.stroke()))}},e.prototype._hit_point=function(t){var e,i,r,s,n,_,o=t.sx,u=t.sy,l=this.renderer.xscale.invert(o),d=this.renderer.yscale.invert(u);if(\"data\"==this.model.properties.outer_radius.units)r=l-this.max_outer_radius,n=l+this.max_outer_radius,s=d-this.max_outer_radius,_=d+this.max_outer_radius;else{var c=o-this.max_outer_radius,p=o+this.max_outer_radius;r=(e=this.renderer.xscale.r_invert(c,p))[0],n=e[1];var x=u-this.max_outer_radius,g=u+this.max_outer_radius;s=(i=this.renderer.yscale.r_invert(x,g))[0],_=i[1]}for(var v=[],y=0,f=this.index.indices({x0:r,x1:n,y0:s,y1:_});y<f.length;y++){var m=f[y],w=Math.pow(this.souter_radius[m],2),A=Math.pow(this.sinner_radius[m],2),M=this.renderer.xscale.r_compute(l,this._x[m]),W=(c=M[0],p=M[1],this.renderer.yscale.r_compute(d,this._y[m]));x=W[0],g=W[1];(z=Math.pow(c-p,2)+Math.pow(x-g,2))<=w&&z>=A&&v.push([m,z])}for(var S=this.model.properties.direction.value(),D=[],V=0,b=v;V<b.length;V++){var k=b[V],z=(m=k[0],k[1]),G=Math.atan2(u-this.sy[m],o-this.sx[m]);h.angle_between(-G,-this._start_angle[m],-this._end_angle[m],S)&&D.push([m,z])}return a.create_hit_test_result_from_hits(D)},e.prototype.draw_legend_for_index=function(t,e,i){n.generic_area_legend(this.visuals,t,e,i)},e.prototype._scenterxy=function(t){var e=(this.sinner_radius[t]+this.souter_radius[t])/2,i=(this._start_angle[t]+this._end_angle[t])/2;return{x:this.sx[t]+e*Math.cos(i),y:this.sy[t]+e*Math.sin(i)}},e.prototype.scenterx=function(t){return this._scenterxy(t).x},e.prototype.scentery=function(t){return this._scenterxy(t).y},e}(s.XYGlyphView);i.AnnularWedgeView=o,o.__name__=\"AnnularWedgeView\";var u=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.init_AnnularWedge=function(){this.prototype.default_view=o,this.mixins([\"line\",\"fill\"]),this.define({direction:[_.Direction,\"anticlock\"],inner_radius:[_.DistanceSpec],outer_radius:[_.DistanceSpec],start_angle:[_.AngleSpec],end_angle:[_.AngleSpec]})},e}(s.XYGlyph);i.AnnularWedge=u,u.__name__=\"AnnularWedge\",u.init_AnnularWedge()},\n", | |
" function _(i,r,t){var s=i(113),e=i(178),a=i(183),n=i(121),u=i(197),_=function(i){function r(){return null!==i&&i.apply(this,arguments)||this}return s.__extends(r,i),r.prototype._map_data=function(){\"data\"==this.model.properties.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xscale,this._x,this._inner_radius):this.sinner_radius=this._inner_radius,\"data\"==this.model.properties.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xscale,this._x,this._outer_radius):this.souter_radius=this._outer_radius},r.prototype._render=function(i,r,t){for(var s=t.sx,e=t.sy,a=t.sinner_radius,n=t.souter_radius,_=0,h=r;_<h.length;_++){var o=h[_];if(!isNaN(s[o]+e[o]+a[o]+n[o])){if(this.visuals.fill.doit){if(this.visuals.fill.set_vectorize(i,o),i.beginPath(),u.is_ie)for(var d=0,l=[!1,!0];d<l.length;d++){var c=l[d];i.arc(s[o],e[o],a[o],0,Math.PI,c),i.arc(s[o],e[o],n[o],Math.PI,0,!c)}else i.arc(s[o],e[o],a[o],0,2*Math.PI,!0),i.arc(s[o],e[o],n[o],2*Math.PI,0,!1);i.fill()}this.visuals.line.doit&&(this.visuals.line.set_vectorize(i,o),i.beginPath(),i.arc(s[o],e[o],a[o],0,2*Math.PI),i.moveTo(s[o]+n[o],e[o]),i.arc(s[o],e[o],n[o],0,2*Math.PI),i.stroke())}}},r.prototype._hit_point=function(i){var r,t,s,e,n,u,_=i.sx,h=i.sy,o=this.renderer.xscale.invert(_),d=this.renderer.yscale.invert(h);if(\"data\"==this.model.properties.outer_radius.units)s=o-this.max_outer_radius,n=o+this.max_outer_radius,e=d-this.max_outer_radius,u=d+this.max_outer_radius;else{var l=_-this.max_outer_radius,c=_+this.max_outer_radius;s=(r=this.renderer.xscale.r_invert(l,c))[0],n=r[1];var p=h-this.max_outer_radius,x=h+this.max_outer_radius;e=(t=this.renderer.yscale.r_invert(p,x))[0],u=t[1]}for(var v=[],f=0,y=this.index.indices({x0:s,x1:n,y0:e,y1:u});f<y.length;f++){var m=y[f],w=Math.pow(this.souter_radius[m],2),M=Math.pow(this.sinner_radius[m],2),A=this.renderer.xscale.r_compute(o,this._x[m]),P=(l=A[0],c=A[1],this.renderer.yscale.r_compute(d,this._y[m])),g=(p=P[0],x=P[1],Math.pow(l-c,2)+Math.pow(p-x,2));g<=w&&g>=M&&v.push([m,g])}return a.create_hit_test_result_from_hits(v)},r.prototype.draw_legend_for_index=function(i,r,t){var s=r.x0,e=r.y0,a=r.x1,n=r.y1,u=t+1,_=new Array(u);_[t]=(s+a)/2;var h=new Array(u);h[t]=(e+n)/2;var o=.5*Math.min(Math.abs(a-s),Math.abs(n-e)),d=new Array(u);d[t]=.4*o;var l=new Array(u);l[t]=.8*o,this._render(i,[t],{sx:_,sy:h,sinner_radius:d,souter_radius:l})},r}(e.XYGlyphView);t.AnnulusView=_,_.__name__=\"AnnulusView\";var h=function(i){function r(r){return i.call(this,r)||this}return s.__extends(r,i),r.init_Annulus=function(){this.prototype.default_view=_,this.mixins([\"line\",\"fill\"]),this.define({inner_radius:[n.DistanceSpec],outer_radius:[n.DistanceSpec]})},r}(e.XYGlyph);t.Annulus=h,h.__name__=\"Annulus\",h.init_Annulus()},\n", | |
" function _(i,e,t){var n=i(113),s=i(178),r=i(186),a=i(121),_=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return n.__extends(e,i),e.prototype._map_data=function(){\"data\"==this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius},e.prototype._render=function(i,e,t){var n=t.sx,s=t.sy,r=t.sradius,a=t._start_angle,_=t._end_angle;if(this.visuals.line.doit)for(var o=this.model.properties.direction.value(),c=0,l=e;c<l.length;c++){var d=l[c];isNaN(n[d]+s[d]+r[d]+a[d]+_[d])||(i.beginPath(),i.arc(n[d],s[d],r[d],a[d],_[d],o),this.visuals.line.set_vectorize(i,d),i.stroke())}},e.prototype.draw_legend_for_index=function(i,e,t){r.generic_line_legend(this.visuals,i,e,t)},e}(s.XYGlyphView);t.ArcView=_,_.__name__=\"ArcView\";var o=function(i){function e(e){return i.call(this,e)||this}return n.__extends(e,i),e.init_Arc=function(){this.prototype.default_view=_,this.mixins([\"line\"]),this.define({direction:[a.Direction,\"anticlock\"],radius:[a.DistanceSpec],start_angle:[a.AngleSpec],end_angle:[a.AngleSpec]})},e}(s.XYGlyph);t.Arc=o,o.__name__=\"Arc\",o.init_Arc()},\n", | |
" function _(t,i,e){var n=t(113),r=t(179),s=t(182),a=t(186);function h(t,i,e,n,r,s,a,h){for(var o=[],_=[[],[]],c=0;c<=2;c++){var y=void 0,p=void 0,u=void 0;if(0===c?(p=6*t-12*e+6*r,y=-3*t+9*e-9*r+3*a,u=3*e-3*t):(p=6*i-12*n+6*s,y=-3*i+9*n-9*s+3*h,u=3*n-3*i),Math.abs(y)<1e-12){if(Math.abs(p)<1e-12)continue;0<(M=-u/p)&&M<1&&o.push(M)}else{var l=p*p-4*u*y,x=Math.sqrt(l);if(!(l<0)){var v=(-p+x)/(2*y);0<v&&v<1&&o.push(v);var f=(-p-x)/(2*y);0<f&&f<1&&o.push(f)}}}for(var d=o.length,m=d;d--;){var M,w=1-(M=o[d]),z=w*w*w*t+3*w*w*M*e+3*w*M*M*r+M*M*M*a;_[0][d]=z;var g=w*w*w*i+3*w*w*M*n+3*w*M*M*s+M*M*M*h;_[1][d]=g}return _[0][m]=t,_[1][m]=i,_[0][m+1]=a,_[1][m+1]=h,[Math.min.apply(Math,_[0]),Math.max.apply(Math,_[1]),Math.max.apply(Math,_[0]),Math.min.apply(Math,_[1])]}var o=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(i,t),i.prototype._index_data=function(){for(var t=[],i=0,e=this._x0.length;i<e;i++)if(!isNaN(this._x0[i]+this._x1[i]+this._y0[i]+this._y1[i]+this._cx0[i]+this._cy0[i]+this._cx1[i]+this._cy1[i])){var n=h(this._x0[i],this._y0[i],this._x1[i],this._y1[i],this._cx0[i],this._cy0[i],this._cx1[i],this._cy1[i]),s=n[0],a=n[1],o=n[2],_=n[3];t.push({x0:s,y0:a,x1:o,y1:_,i:i})}return new r.SpatialIndex(t)},i.prototype._render=function(t,i,e){var n=e.sx0,r=e.sy0,s=e.sx1,a=e.sy1,h=e.scx0,o=e.scy0,_=e.scx1,c=e.scy1;if(this.visuals.line.doit)for(var y=0,p=i;y<p.length;y++){var u=p[y];isNaN(n[u]+r[u]+s[u]+a[u]+h[u]+o[u]+_[u]+c[u])||(t.beginPath(),t.moveTo(n[u],r[u]),t.bezierCurveTo(h[u],o[u],_[u],c[u],s[u],a[u]),this.visuals.line.set_vectorize(t,u),t.stroke())}},i.prototype.draw_legend_for_index=function(t,i,e){a.generic_line_legend(this.visuals,t,i,e)},i.prototype.scenterx=function(){throw new Error(\"not implemented\")},i.prototype.scentery=function(){throw new Error(\"not implemented\")},i}(s.GlyphView);e.BezierView=o,o.__name__=\"BezierView\";var _=function(t){function i(i){return t.call(this,i)||this}return n.__extends(i,t),i.init_Bezier=function(){this.prototype.default_view=o,this.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"],[\"cx0\",\"cy0\"],[\"cx1\",\"cy1\"]]),this.mixins([\"line\"])},i}(s.Glyph);e.Bezier=_,_.__name__=\"Bezier\",_.init_Bezier()},\n", | |
" function _(i,s,t){var e=i(113),r=i(178),a=i(183),n=i(121),h=i(110),d=i(114),_=function(i){function s(){return null!==i&&i.apply(this,arguments)||this}return e.__extends(s,i),s.prototype._map_data=function(){if(null!=this._radius)if(\"data\"==this.model.properties.radius.spec.units)switch(this.model.properties.radius_dimension.spec.value){case\"x\":this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius);break;case\"y\":this.sradius=this.sdist(this.renderer.yscale,this._y,this._radius);break;case\"max\":var i=this.sdist(this.renderer.xscale,this._x,this._radius),s=this.sdist(this.renderer.yscale,this._y,this._radius);this.sradius=d.map(i,function(i,t){return Math.max(i,s[t])});break;case\"min\":i=this.sdist(this.renderer.xscale,this._x,this._radius);var t=this.sdist(this.renderer.yscale,this._y,this._radius);this.sradius=d.map(i,function(i,s){return Math.min(i,t[s])})}else this.sradius=this._radius,this.max_size=2*this.max_radius;else this.sradius=d.map(this._size,function(i){return i/2})},s.prototype._mask_data=function(){var i,s,t,e,r,a,n,h,d=this.renderer.plot_view.frame.bbox.ranges,_=d[0],u=d[1];if(null!=this._radius&&\"data\"==this.model.properties.radius.units){var l=_.start,o=_.end;r=(i=this.renderer.xscale.r_invert(l,o))[0],n=i[1],r-=this.max_radius,n+=this.max_radius;var c=u.start,x=u.end;a=(s=this.renderer.yscale.r_invert(c,x))[0],h=s[1],a-=this.max_radius,h+=this.max_radius}else{l=_.start-this.max_size,o=_.end+this.max_size;r=(t=this.renderer.xscale.r_invert(l,o))[0],n=t[1];c=u.start-this.max_size,x=u.end+this.max_size;a=(e=this.renderer.yscale.r_invert(c,x))[0],h=e[1]}return this.index.indices({x0:r,x1:n,y0:a,y1:h})},s.prototype._render=function(i,s,t){for(var e=t.sx,r=t.sy,a=t.sradius,n=0,h=s;n<h.length;n++){var d=h[n];isNaN(e[d]+r[d]+a[d])||(i.beginPath(),i.arc(e[d],r[d],a[d],0,2*Math.PI,!1),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(i,d),i.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(i,d),i.stroke()))}},s.prototype._hit_point=function(i){var s,t,e,r,n,h,d,_,u,l,o,c,x,p,y,m,v=i.sx,f=i.sy,z=this.renderer.xscale.invert(v),w=this.renderer.yscale.invert(f);null!=this._radius&&\"data\"==this.model.properties.radius.units?(x=z-this.max_radius,p=z+this.max_radius,y=w-this.max_radius,m=w+this.max_radius):(u=v-this.max_size,l=v+this.max_size,x=(s=this.renderer.xscale.r_invert(u,l))[0],p=s[1],x=(t=[Math.min(x,p),Math.max(x,p)])[0],p=t[1],o=f-this.max_size,c=f+this.max_size,y=(e=this.renderer.yscale.r_invert(o,c))[0],m=e[1],y=(r=[Math.min(y,m),Math.max(y,m)])[0],m=r[1]);var M=this.index.indices({x0:x,x1:p,y0:y,y1:m}),g=[];if(null!=this._radius&&\"data\"==this.model.properties.radius.units)for(var b=0,C=M;b<C.length;b++){var k=C[b];_=Math.pow(this.sradius[k],2),u=(n=this.renderer.xscale.r_compute(z,this._x[k]))[0],l=n[1],o=(h=this.renderer.yscale.r_compute(w,this._y[k]))[0],c=h[1],(d=Math.pow(u-l,2)+Math.pow(o-c,2))<=_&&g.push([k,d])}else for(var A=0,D=M;A<D.length;A++){k=D[A];_=Math.pow(this.sradius[k],2),(d=Math.pow(this.sx[k]-v,2)+Math.pow(this.sy[k]-f,2))<=_&&g.push([k,d])}return a.create_hit_test_result_from_hits(g)},s.prototype._hit_span=function(i){var s,t,e,r,n,h,d,_,u=i.sx,l=i.sy,o=this.bounds(),c=a.create_empty_hit_test_result();if(\"h\"==i.direction){var x=void 0,p=void 0;if(d=o.y0,_=o.y1,null!=this._radius&&\"data\"==this.model.properties.radius.units)x=u-this.max_radius,p=u+this.max_radius,n=(s=this.renderer.xscale.r_invert(x,p))[0],h=s[1];else x=u-(y=this.max_size/2),p=u+y,n=(t=this.renderer.xscale.r_invert(x,p))[0],h=t[1]}else{var y,m=void 0,v=void 0;if(n=o.x0,h=o.x1,null!=this._radius&&\"data\"==this.model.properties.radius.units)m=l-this.max_radius,v=l+this.max_radius,d=(e=this.renderer.yscale.r_invert(m,v))[0],_=e[1];else m=l-(y=this.max_size/2),v=l+y,d=(r=this.renderer.yscale.r_invert(m,v))[0],_=r[1]}var f=this.index.indices({x0:n,x1:h,y0:d,y1:_});return c.indices=f,c},s.prototype._hit_rect=function(i){var s=i.sx0,t=i.sx1,e=i.sy0,r=i.sy1,n=this.renderer.xscale.r_invert(s,t),h=n[0],d=n[1],_=this.renderer.yscale.r_invert(e,r),u=_[0],l=_[1],o=a.create_empty_hit_test_result();return o.indices=this.index.indices({x0:h,x1:d,y0:u,y1:l}),o},s.prototype._hit_poly=function(i){for(var s=i.sx,t=i.sy,e=h.range(0,this.sx.length),r=[],n=0,d=e.length;n<d;n++){var _=e[n];a.point_in_poly(this.sx[n],this.sy[n],s,t)&&r.push(_)}var u=a.create_empty_hit_test_result();return u.indices=r,u},s.prototype.draw_legend_for_index=function(i,s,t){var e=s.x0,r=s.y0,a=s.x1,n=s.y1,h=t+1,d=new Array(h);d[t]=(e+a)/2;var _=new Array(h);_[t]=(r+n)/2;var u=new Array(h);u[t]=.2*Math.min(Math.abs(a-e),Math.abs(n-r)),this._render(i,[t],{sx:d,sy:_,sradius:u})},s}(r.XYGlyphView);t.CircleView=_,_.__name__=\"CircleView\";var u=function(i){function s(s){return i.call(this,s)||this}return e.__extends(s,i),s.init_Circle=function(){this.prototype.default_view=_,this.mixins([\"line\",\"fill\"]),this.define({angle:[n.AngleSpec,0],size:[n.DistanceSpec,{units:\"screen\",value:4}],radius:[n.DistanceSpec],radius_dimension:[n.RadiusDimension,\"x\"]})},s.prototype.initialize=function(){i.prototype.initialize.call(this),this.properties.radius.optional=!0},s}(r.XYGlyph);t.Circle=u,u.__name__=\"Circle\",u.init_Circle()},\n", | |
" function _(e,t,n){var i=e(113),a=e(178),l=e(121),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t}(a.XYGlyphView);n.CenterRotatableView=r,r.__name__=\"CenterRotatableView\";var _=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_CenterRotatable=function(){this.mixins([\"line\",\"fill\"]),this.define({angle:[l.AngleSpec,0],width:[l.DistanceSpec],height:[l.DistanceSpec]})},t}(a.XYGlyph);n.CenterRotatable=_,_.__name__=\"CenterRotatable\",_.init_CenterRotatable()},\n", | |
" function _(i,e,l){var n=i(113),t=i(310),_=function(i){function e(){return null!==i&&i.apply(this,arguments)||this}return n.__extends(e,i),e}(t.EllipseOvalView);l.EllipseView=_,_.__name__=\"EllipseView\";var s=function(i){function e(e){return i.call(this,e)||this}return n.__extends(e,i),e.init_Ellipse=function(){this.prototype.default_view=_},e}(t.EllipseOval);l.Ellipse=s,s.__name__=\"Ellipse\",s.init_Ellipse()},\n", | |
" function _(t,i,e){var s=t(113),h=t(308),r=t(183),a=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(i,t),i.prototype._set_data=function(){this.max_w2=0,\"data\"==this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,\"data\"==this.model.properties.height.units&&(this.max_h2=this.max_height/2)},i.prototype._map_data=function(){\"data\"==this.model.properties.width.units?this.sw=this.sdist(this.renderer.xscale,this._x,this._width,\"center\"):this.sw=this._width,\"data\"==this.model.properties.height.units?this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"):this.sh=this._height},i.prototype._render=function(t,i,e){for(var s=e.sx,h=e.sy,r=e.sw,a=e.sh,n=e._angle,_=0,l=i;_<l.length;_++){var o=l[_];isNaN(s[o]+h[o]+r[o]+a[o]+n[o])||(t.beginPath(),t.ellipse(s[o],h[o],r[o]/2,a[o]/2,n[o],0,2*Math.PI),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,o),t.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(t,o),t.stroke()))}},i.prototype._hit_point=function(t){var i,e,s,h,a,n,_,l,o,d,p,x,u,m=t.sx,w=t.sy,y=this.renderer.xscale.invert(m),c=this.renderer.yscale.invert(w);\"data\"==this.model.properties.width.units?(a=y-this.max_width,n=y+this.max_width):(d=m-this.max_width,p=m+this.max_width,a=(i=this.renderer.xscale.r_invert(d,p))[0],n=i[1]),\"data\"==this.model.properties.height.units?(_=c-this.max_height,l=c+this.max_height):(x=w-this.max_height,u=w+this.max_height,_=(e=this.renderer.yscale.r_invert(x,u))[0],l=e[1]);for(var v=[],f=0,g=this.index.indices({x0:a,x1:n,y0:_,y1:l});f<g.length;f++){var b=g[f];r.point_in_ellipse(m,w,this._angle[b],this.sh[b]/2,this.sw[b]/2,this.sx[b],this.sy[b])&&(d=(s=this.renderer.xscale.r_compute(y,this._x[b]))[0],p=s[1],x=(h=this.renderer.yscale.r_compute(c,this._y[b]))[0],u=h[1],o=Math.pow(d-p,2)+Math.pow(x-u,2),v.push([b,o]))}return r.create_hit_test_result_from_hits(v)},i.prototype.draw_legend_for_index=function(t,i,e){var s=i.x0,h=i.y0,r=i.x1,a=i.y1,n=e+1,_=new Array(n);_[e]=(s+r)/2;var l=new Array(n);l[e]=(h+a)/2;var o=this.sw[e]/this.sh[e],d=.8*Math.min(Math.abs(r-s),Math.abs(a-h)),p=new Array(n),x=new Array(n);o>1?(p[e]=d,x[e]=d/o):(p[e]=d*o,x[e]=d),this._render(t,[e],{sx:_,sy:l,sw:p,sh:x,_angle:[0]})},i.prototype._bounds=function(t){var i=t.x0,e=t.x1,s=t.y0,h=t.y1;return{x0:i-this.max_w2,x1:e+this.max_w2,y0:s-this.max_h2,y1:h+this.max_h2}},i}(h.CenterRotatableView);e.EllipseOvalView=a,a.__name__=\"EllipseOvalView\";var n=function(t){function i(i){return t.call(this,i)||this}return s.__extends(i,t),i}(h.CenterRotatable);e.EllipseOval=n,n.__name__=\"EllipseOval\"},\n", | |
" function _(t,i,e){var s=t(113),h=t(312),r=t(121),n=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(i,t),i.prototype.scenterx=function(t){return(this.sleft[t]+this.sright[t])/2},i.prototype.scentery=function(t){return this.sy[t]},i.prototype._index_data=function(){return this._index_box(this._y.length)},i.prototype._lrtb=function(t){return[Math.min(this._left[t],this._right[t]),Math.max(this._left[t],this._right[t]),this._y[t]+.5*this._height[t],this._y[t]-.5*this._height[t]]},i.prototype._map_data=function(){this.sy=this.renderer.yscale.v_compute(this._y),this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"),this.sleft=this.renderer.xscale.v_compute(this._left),this.sright=this.renderer.xscale.v_compute(this._right);var t=this.sy.length;this.stop=new Float64Array(t),this.sbottom=new Float64Array(t);for(var i=0;i<t;i++)this.stop[i]=this.sy[i]-this.sh[i]/2,this.sbottom[i]=this.sy[i]+this.sh[i]/2;this._clamp_viewport()},i}(h.BoxView);e.HBarView=n,n.__name__=\"HBarView\";var o=function(t){function i(i){return t.call(this,i)||this}return s.__extends(i,t),i.init_HBar=function(){this.prototype.default_view=n,this.coords([[\"left\",\"y\"]]),this.define({height:[r.NumberSpec],right:[r.CoordinateSpec]}),this.override({left:0})},i}(h.Box);e.HBar=o,o.__name__=\"HBar\",o.init_HBar()},\n", | |
" function _(t,e,r){var i=t(113),n=t(179),s=t(182),o=t(186),a=t(183),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.get_anchor_point=function(t,e,r){var i=Math.min(this.sleft[e],this.sright[e]),n=Math.max(this.sright[e],this.sleft[e]),s=Math.min(this.stop[e],this.sbottom[e]),o=Math.max(this.sbottom[e],this.stop[e]);switch(t){case\"top_left\":return{x:i,y:s};case\"top_center\":return{x:(i+n)/2,y:s};case\"top_right\":return{x:n,y:s};case\"bottom_left\":return{x:i,y:o};case\"bottom_center\":return{x:(i+n)/2,y:o};case\"bottom_right\":return{x:n,y:o};case\"center_left\":return{x:i,y:(s+o)/2};case\"center\":return{x:(i+n)/2,y:(s+o)/2};case\"center_right\":return{x:n,y:(s+o)/2};default:return null}},e.prototype._index_box=function(t){for(var e=[],r=0;r<t;r++){var i=this._lrtb(r),s=i[0],o=i[1],a=i[2],h=i[3];!isNaN(s+o+a+h)&&isFinite(s+o+a+h)&&e.push({x0:Math.min(s,o),y0:Math.min(a,h),x1:Math.max(o,s),y1:Math.max(a,h),i:r})}return new n.SpatialIndex(e)},e.prototype._render=function(t,e,r){for(var i=this,n=r.sleft,s=r.sright,o=r.stop,a=r.sbottom,h=function(e){if(isNaN(n[e]+o[e]+s[e]+a[e]))return\"continue\";t.rect(n[e],o[e],s[e]-n[e],a[e]-o[e]),_.visuals.fill.doit&&(_.visuals.fill.set_vectorize(t,e),t.beginPath(),t.rect(n[e],o[e],s[e]-n[e],a[e]-o[e]),t.fill()),_.visuals.hatch.doit2(t,e,function(){t.beginPath(),t.rect(n[e],o[e],s[e]-n[e],a[e]-o[e]),t.fill()},function(){return i.renderer.request_render()}),_.visuals.line.doit&&(_.visuals.line.set_vectorize(t,e),t.beginPath(),t.rect(n[e],o[e],s[e]-n[e],a[e]-o[e]),t.stroke())},_=this,c=0,l=e;c<l.length;c++){h(l[c])}},e.prototype._clamp_viewport=function(){for(var t=this.renderer.plot_view.frame.bbox.h_range,e=this.renderer.plot_view.frame.bbox.v_range,r=this.stop.length,i=0;i<r;i++)this.stop[i]=Math.max(this.stop[i],e.start),this.sbottom[i]=Math.min(this.sbottom[i],e.end),this.sleft[i]=Math.max(this.sleft[i],t.start),this.sright[i]=Math.min(this.sright[i],t.end)},e.prototype._hit_rect=function(t){return this._hit_rect_against_index(t)},e.prototype._hit_point=function(t){var e=t.sx,r=t.sy,i=this.renderer.xscale.invert(e),n=this.renderer.yscale.invert(r),s=this.index.indices({x0:i,y0:n,x1:i,y1:n}),o=a.create_empty_hit_test_result();return o.indices=s,o},e.prototype._hit_span=function(t){var e,r=t.sx,i=t.sy;if(\"v\"==t.direction){var n=this.renderer.yscale.invert(i),s=this.renderer.plot_view.frame.bbox.h_range,o=this.renderer.xscale.r_invert(s.start,s.end),h=o[0],_=o[1];e=this.index.indices({x0:h,y0:n,x1:_,y1:n})}else{var c=this.renderer.xscale.invert(r),l=this.renderer.plot_view.frame.bbox.v_range,u=this.renderer.yscale.r_invert(l.start,l.end),x=u[0],p=u[1];e=this.index.indices({x0:c,y0:x,x1:c,y1:p})}var f=a.create_empty_hit_test_result();return f.indices=e,f},e.prototype.draw_legend_for_index=function(t,e,r){o.generic_area_legend(this.visuals,t,e,r)},e}(s.GlyphView);r.BoxView=h,h.__name__=\"BoxView\";var _=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.init_Box=function(){this.mixins([\"line\",\"fill\",\"hatch\"])},e}(s.Glyph);r.Box=_,_.__name__=\"Box\",_.init_Box()},\n", | |
" function _(e,t,i){var s=e(113),r=e(182),n=e(183),a=e(121),o=e(179),h=e(186),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.scenterx=function(e){return this.sx[e]},t.prototype.scentery=function(e){return this.sy[e]},t.prototype._set_data=function(){var e=this._q.length,t=this.model.size,i=this.model.aspect_scale;if(this._x=new Float64Array(e),this._y=new Float64Array(e),\"pointytop\"==this.model.orientation)for(var s=0;s<e;s++)this._x[s]=t*Math.sqrt(3)*(this._q[s]+this._r[s]/2)/i,this._y[s]=3*-t/2*this._r[s];else for(s=0;s<e;s++)this._x[s]=3*t/2*this._q[s],this._y[s]=-t*Math.sqrt(3)*(this._r[s]+this._q[s]/2)*i},t.prototype._index_data=function(){var e,t=this.model.size,i=Math.sqrt(3)*t/2;\"flattop\"==this.model.orientation?(i=(e=[t,i])[0],t=e[1],t*=this.model.aspect_scale):i/=this.model.aspect_scale;for(var s=[],r=0;r<this._x.length;r++){var n=this._x[r],a=this._y[r];!isNaN(n+a)&&isFinite(n+a)&&s.push({x0:n-i,y0:a-t,x1:n+i,y1:a+t,i:r})}return new o.SpatialIndex(s)},t.prototype.map_data=function(){var e,t;e=this.map_to_screen(this._x,this._y),this.sx=e[0],this.sy=e[1],t=this._get_unscaled_vertices(),this.svx=t[0],this.svy=t[1]},t.prototype._get_unscaled_vertices=function(){var e=this.model.size,t=this.model.aspect_scale;if(\"pointytop\"==this.model.orientation){var i=this.renderer.yscale,s=this.renderer.xscale,r=Math.abs(i.compute(0)-i.compute(e));return[[0,-(n=Math.sqrt(3)/2*Math.abs(s.compute(0)-s.compute(e))/t),-n,0,n,n],[r,a=r/2,-a,-r,-a,a]]}var n,a;i=this.renderer.xscale,s=this.renderer.yscale;return[[r=Math.abs(i.compute(0)-i.compute(e)),a=r/2,-a,-r,-a,a],[0,-(n=Math.sqrt(3)/2*Math.abs(s.compute(0)-s.compute(e))*t),-n,0,n,n]]},t.prototype._render=function(e,t,i){for(var s=i.sx,r=i.sy,n=i.svx,a=i.svy,o=i._scale,h=0,_=t;h<_.length;h++){var l=_[h];if(!isNaN(s[l]+r[l]+o[l])){e.translate(s[l],r[l]),e.beginPath();for(var c=0;c<6;c++)e.lineTo(n[c]*o[l],a[c]*o[l]);e.closePath(),e.translate(-s[l],-r[l]),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,l),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,l),e.stroke())}}},t.prototype._hit_point=function(e){for(var t=e.sx,i=e.sy,s=this.renderer.xscale.invert(t),r=this.renderer.yscale.invert(i),a=[],o=0,h=this.index.indices({x0:s,y0:r,x1:s,y1:r});o<h.length;o++){var _=h[o];n.point_in_poly(t-this.sx[_],i-this.sy[_],this.svx,this.svy)&&a.push(_)}var l=n.create_empty_hit_test_result();return l.indices=a,l},t.prototype._hit_span=function(e){var t,i=e.sx,s=e.sy;if(\"v\"==e.direction){var r=this.renderer.yscale.invert(s),a=this.renderer.plot_view.frame.bbox.h_range,o=this.renderer.xscale.r_invert(a.start,a.end),h=o[0],_=o[1];t=this.index.indices({x0:h,y0:r,x1:_,y1:r})}else{var l=this.renderer.xscale.invert(i),c=this.renderer.plot_view.frame.bbox.v_range,p=this.renderer.yscale.r_invert(c.start,c.end),d=p[0],y=p[1];t=this.index.indices({x0:l,y0:d,x1:l,y1:y})}var u=n.create_empty_hit_test_result();return u.indices=t,u},t.prototype._hit_rect=function(e){var t=e.sx0,i=e.sx1,s=e.sy0,r=e.sy1,a=this.renderer.xscale.r_invert(t,i),o=a[0],h=a[1],_=this.renderer.yscale.r_invert(s,r),l=_[0],c=_[1],p=n.create_empty_hit_test_result();return p.indices=this.index.indices({x0:o,x1:h,y0:l,y1:c}),p},t.prototype.draw_legend_for_index=function(e,t,i){h.generic_area_legend(this.visuals,e,t,i)},t}(r.GlyphView);i.HexTileView=_,_.__name__=\"HexTileView\";var l=function(e){function t(t){return e.call(this,t)||this}return s.__extends(t,e),t.init_HexTile=function(){this.prototype.default_view=_,this.coords([[\"r\",\"q\"]]),this.mixins([\"line\",\"fill\"]),this.define({size:[a.Number,1],aspect_scale:[a.Number,1],scale:[a.NumberSpec,1],orientation:[a.HexTileOrientation,\"pointytop\"]}),this.override({line_color:null})},t}(r.Glyph);i.HexTile=l,l.__name__=\"HexTile\",l.init_HexTile()},\n", | |
" function _(e,t,a){var i=e(113),n=e(315),r=e(210),_=e(121),s=e(110),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initialize=function(){var t=this;e.prototype.initialize.call(this),this.connect(this.model.color_mapper.change,function(){return t._update_image()}),this.connect(this.model.properties.global_alpha.change,function(){return t.renderer.request_render()})},t.prototype._update_image=function(){null!=this.image_data&&(this._set_data(),this.renderer.plot_view.request_render())},t.prototype._set_data=function(){this._set_width_heigh_data();for(var e=this.model.color_mapper.rgba_mapper,t=0,a=this._image.length;t<a;t++){var i=void 0;if(null!=this._image_shape&&this._image_shape[t].length>0){i=this._image[t];var n=this._image_shape[t];this._height[t]=n[0],this._width[t]=n[1]}else{var r=this._image[t];i=s.concat(r),this._height[t]=r.length,this._width[t]=r[0].length}var _=e.v_compute(i);this._set_image_data_from_buffer(t,_)}},t.prototype._render=function(e,t,a){var i=a.image_data,n=a.sx,r=a.sy,_=a.sw,s=a.sh,o=e.getImageSmoothingEnabled();e.setImageSmoothingEnabled(!1),e.globalAlpha=this.model.global_alpha;for(var h=0,l=t;h<l.length;h++){var g=l[h];if(null!=i[g]&&!isNaN(n[g]+r[g]+_[g]+s[g])){var m=r[g];e.translate(0,m),e.scale(1,-1),e.translate(0,-m),e.drawImage(i[g],0|n[g],0|r[g],_[g],s[g]),e.translate(0,m),e.scale(1,-1),e.translate(0,-m)}}e.setImageSmoothingEnabled(o)},t}(n.ImageBaseView);a.ImageView=o,o.__name__=\"ImageView\";var h=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_Image=function(){this.prototype.default_view=o,this.define({color_mapper:[_.Instance,function(){return new r.LinearColorMapper({palette:[\"#000000\",\"#252525\",\"#525252\",\"#737373\",\"#969696\",\"#bdbdbd\",\"#d9d9d9\",\"#f0f0f0\",\"#ffffff\"]})}]})},t}(n.ImageBase);a.Image=h,h.__name__=\"Image\",h.init_Image()},\n", | |
" function _(e,t,i){var s=e(113),h=e(178),a=e(121),r=e(183),n=e(179),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype._render=function(e,t,i){},t.prototype._index_data=function(){for(var e=[],t=0,i=this._x.length;t<i;t++){var s=this._lrtb(t),h=s[0],a=s[1],r=s[2],_=s[3];!isNaN(h+a+r+_)&&isFinite(h+a+r+_)&&e.push({x0:h,y0:_,x1:a,y1:r,i:t})}return new n.SpatialIndex(e)},t.prototype._lrtb=function(e){var t=this.renderer.xscale.source_range,i=this._x[e],s=t.is_reversed?i-this._dw[e]:i+this._dw[e],h=this.renderer.yscale.source_range,a=this._y[e],r=h.is_reversed?a-this._dh[e]:a+this._dh[e],n=i<s?[i,s]:[s,i],_=a<r?[a,r]:[r,a];return[n[0],n[1],_[1],_[0]]},t.prototype._set_width_heigh_data=function(){null!=this.image_data&&this.image_data.length==this._image.length||(this.image_data=new Array(this._image.length)),null!=this._width&&this._width.length==this._image.length||(this._width=new Array(this._image.length)),null!=this._height&&this._height.length==this._image.length||(this._height=new Array(this._image.length))},t.prototype._get_or_create_canvas=function(e){var t=this.image_data[e];if(null!=t&&t.width==this._width[e]&&t.height==this._height[e])return t;var i=document.createElement(\"canvas\");return i.width=this._width[e],i.height=this._height[e],i},t.prototype._set_image_data_from_buffer=function(e,t){var i=this._get_or_create_canvas(e),s=i.getContext(\"2d\"),h=s.getImageData(0,0,this._width[e],this._height[e]);h.data.set(t),s.putImageData(h,0,0),this.image_data[e]=i},t.prototype._map_data=function(){switch(this.model.properties.dw.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,this._dw,\"edge\",this.model.dilate);break;case\"screen\":this.sw=this._dw}switch(this.model.properties.dh.units){case\"data\":this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);break;case\"screen\":this.sh=this._dh}},t.prototype._image_index=function(e,t,i){var s=this._lrtb(e),h=s[0],a=s[1],r=s[2],n=s[3],_=this._width[e],d=this._height[e],o=(a-h)/_,g=(r-n)/d,l=Math.floor((t-h)/o),c=Math.floor((i-n)/g);return this.renderer.xscale.source_range.is_reversed&&(l=_-l-1),this.renderer.yscale.source_range.is_reversed&&(c=d-c-1),{index:e,dim1:l,dim2:c,flat_index:c*_+l}},t.prototype._hit_point=function(e){var t=e.sx,i=e.sy,s=this.renderer.xscale.invert(t),h=this.renderer.yscale.invert(i),a=this.index.indices({x0:s,x1:s,y0:h,y1:h}),n=r.create_empty_hit_test_result();n.image_indices=[];for(var _=0,d=a;_<d.length;_++){var o=d[_];t!=1/0&&i!=1/0&&n.image_indices.push(this._image_index(o,s,h))}return n},t}(h.XYGlyphView);i.ImageBaseView=_,_.__name__=\"ImageBaseView\";var d=function(e){function t(t){return e.call(this,t)||this}return s.__extends(t,e),t.init_ImageBase=function(){this.prototype.default_view=_,this.define({image:[a.NumberSpec],dw:[a.DistanceSpec],dh:[a.DistanceSpec],dilate:[a.Boolean,!1],global_alpha:[a.Number,1]})},t}(h.XYGlyph);i.ImageBase=d,d.__name__=\"ImageBase\",d.init_ImageBase()},\n", | |
" function _(e,t,a){var i=e(113),n=e(315),r=e(110),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initialize=function(){var t=this;e.prototype.initialize.call(this),this.connect(this.model.properties.global_alpha.change,function(){return t.renderer.request_render()})},t.prototype._set_data=function(e){this._set_width_heigh_data();for(var t=0,a=this._image.length;t<a;t++)if(!(null!=e&&e.indexOf(t)<0)){var i=void 0;if(null!=this._image_shape&&this._image_shape[t].length>0){i=this._image[t].buffer;var n=this._image_shape[t];this._height[t]=n[0],this._width[t]=n[1]}else{var h=this._image[t],s=r.concat(h);i=new ArrayBuffer(4*s.length);for(var _=new Uint32Array(i),l=0,o=s.length;l<o;l++)_[l]=s[l];this._height[t]=h.length,this._width[t]=h[0].length}var g=new Uint8Array(i);this._set_image_data_from_buffer(t,g)}},t.prototype._render=function(e,t,a){var i=a.image_data,n=a.sx,r=a.sy,h=a.sw,s=a.sh,_=e.getImageSmoothingEnabled();e.setImageSmoothingEnabled(!1),e.globalAlpha=this.model.global_alpha;for(var l=0,o=t;l<o.length;l++){var g=o[l];if(!isNaN(n[g]+r[g]+h[g]+s[g])){var m=r[g];e.translate(0,m),e.scale(1,-1),e.translate(0,-m),e.drawImage(i[g],0|n[g],0|r[g],h[g],s[g]),e.translate(0,m),e.scale(1,-1),e.translate(0,-m)}}e.setImageSmoothingEnabled(_)},t}(n.ImageBaseView);a.ImageRGBAView=h,h.__name__=\"ImageRGBAView\";var s=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_ImageRGBA=function(){this.prototype.default_view=h},t}(n.ImageBase);a.ImageRGBA=s,s.__name__=\"ImageRGBA\",s.init_ImageRGBA()},\n", | |
" function _(e,t,r){var i=e(113),n=e(178),a=e(121),s=e(114),o=e(179),h=e(318),_=function(e){function t(){var t=e.apply(this,arguments)||this;return t._images_rendered=!1,t}return i.__extends(t,e),t.prototype.initialize=function(){var t=this;e.prototype.initialize.call(this),this.connect(this.model.properties.global_alpha.change,function(){return t.renderer.request_render()})},t.prototype._index_data=function(){return new o.SpatialIndex([])},t.prototype._set_data=function(){var e=this;null!=this.image&&this.image.length==this._url.length||(this.image=s.map(this._url,function(){return null}));for(var t=this.model,r=t.retry_attempts,i=t.retry_timeout,n=function(t,n){var s=a._url[t];if(null==s||\"\"==s)return\"continue\";new h.ImageLoader(s,{loaded:function(r){e.image[t]=r,e.renderer.request_render()},attempts:r+1,timeout:i})},a=this,o=0,_=this._url.length;o<_;o++)n(o);var l=\"data\"==this.model.properties.w.units,u=\"data\"==this.model.properties.h.units,c=this._x.length,d=new Array(l?2*c:c),p=new Array(u?2*c:c);for(o=0;o<c;o++)d[o]=this._x[o],p[o]=this._y[o];if(l)for(o=0;o<c;o++)d[c+o]=this._x[o]+this._w[o];if(u)for(o=0;o<c;o++)p[c+o]=this._y[o]+this._h[o];var m=s.min(d),f=s.max(d),g=s.min(p),y=s.max(p);this._bounds_rect={x0:m,x1:f,y0:g,y1:y}},t.prototype.has_finished=function(){return e.prototype.has_finished.call(this)&&1==this._images_rendered},t.prototype._map_data=function(){var e=null!=this.model.w?this._w:s.map(this._x,function(){return NaN}),t=null!=this.model.h?this._h:s.map(this._x,function(){return NaN});switch(this.model.properties.w.units){case\"data\":this.sw=this.sdist(this.renderer.xscale,this._x,e,\"edge\",this.model.dilate);break;case\"screen\":this.sw=e}switch(this.model.properties.h.units){case\"data\":this.sh=this.sdist(this.renderer.yscale,this._y,t,\"edge\",this.model.dilate);break;case\"screen\":this.sh=t}},t.prototype._render=function(e,t,r){var i=r.image,n=r.sx,a=r.sy,s=r.sw,o=r.sh,h=r._angle,_=this.renderer.plot_view.frame;e.rect(_._left.value+1,_._top.value+1,_._width.value-2,_._height.value-2),e.clip();for(var l=!0,u=0,c=t;u<c.length;u++){var d=c[u];if(!isNaN(n[d]+a[d]+h[d])){var p=i[d];null!=p?this._render_image(e,d,p,n,a,s,o,h):l=!1}}l&&!this._images_rendered&&(this._images_rendered=!0,this.notify_finished())},t.prototype._final_sx_sy=function(e,t,r,i,n){switch(e){case\"top_left\":return[t,r];case\"top_center\":return[t-i/2,r];case\"top_right\":return[t-i,r];case\"center_right\":return[t-i,r-n/2];case\"bottom_right\":return[t-i,r-n];case\"bottom_center\":return[t-i/2,r-n];case\"bottom_left\":return[t,r-n];case\"center_left\":return[t,r-n/2];case\"center\":return[t-i/2,r-n/2]}},t.prototype._render_image=function(e,t,r,i,n,a,s,o){isNaN(a[t])&&(a[t]=r.width),isNaN(s[t])&&(s[t]=r.height);var h=this.model.anchor,_=this._final_sx_sy(h,i[t],n[t],a[t],s[t]),l=_[0],u=_[1];e.save(),e.globalAlpha=this.model.global_alpha,o[t]?(e.translate(l,u),e.rotate(o[t]),e.drawImage(r,0,0,a[t],s[t]),e.rotate(-o[t]),e.translate(-l,-u)):e.drawImage(r,l,u,a[t],s[t]),e.restore()},t.prototype.bounds=function(){return this._bounds_rect},t}(n.XYGlyphView);r.ImageURLView=_,_.__name__=\"ImageURLView\";var l=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_ImageURL=function(){this.prototype.default_view=_,this.define({url:[a.StringSpec],anchor:[a.Anchor,\"top_left\"],global_alpha:[a.Number,1],angle:[a.AngleSpec,0],w:[a.DistanceSpec],h:[a.DistanceSpec],dilate:[a.Boolean,!1],retry_attempts:[a.Number,0],retry_timeout:[a.Number,0]})},t}(n.XYGlyph);r.ImageURL=l,l.__name__=\"ImageURL\",l.init_ImageURL()},\n", | |
" function _(e,i,n){var o=e(167),t=function(){function e(e,i){var n=this;void 0===i&&(i={}),this._image=new Image,this._finished=!1;var t=i.attempts,r=void 0===t?1:t,a=i.timeout,g=void 0===a?1:a;this.promise=new Promise(function(t,a){n._image.crossOrigin=\"anonymous\";var m=0;n._image.onerror=function(){if(++m==r){var t=\"unable to load \"+e+\" image after \"+r+\" attempts\";o.logger.warn(t),null!=n._image.crossOrigin?(o.logger.warn(\"attempting to load \"+e+\" without a cross origin policy\"),n._image.crossOrigin=null,m=0):null!=i.failed&&i.failed()}setTimeout(function(){return n._image.src=e},g)},n._image.onload=function(){n._finished=!0,null!=i.loaded&&i.loaded(n._image),t(n._image)},n._image.src=e})}return Object.defineProperty(e.prototype,\"finished\",{get:function(){return this._finished},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"image\",{get:function(){return this._image},enumerable:!0,configurable:!0}),e}();n.ImageLoader=t,t.__name__=\"ImageLoader\"},\n", | |
" function _(t,e,i){var n=t(113),s=t(179),r=t(183),o=t(125),h=t(110),_=t(109),l=t(182),a=t(186),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._index_data=function(){for(var t=[],e=0,i=this._xs.length;e<i;e++)if(null!=this._xs[e]&&0!==this._xs[e].length){for(var n=this._xs[e],r=[],o=0,l=n.length;o<l;o++){var a=n[o];_.isStrictNaN(a)||r.push(a)}var u=this._ys[e],p=[];for(o=0,l=u.length;o<l;o++){var c=u[o];_.isStrictNaN(c)||p.push(c)}var y=[h.min(r),h.max(r)],x=y[0],f=y[1],v=[h.min(p),h.max(p)],d=v[0],m=v[1];t.push({x0:x,y0:d,x1:f,y1:m,i:e})}return new s.SpatialIndex(t)},e.prototype._render=function(t,e,i){for(var n=i.sxs,s=i.sys,r=0,o=e;r<o.length;r++){var h=o[r],_=[n[h],s[h]],l=_[0],a=_[1];this.visuals.line.set_vectorize(t,h);for(var u=0,p=l.length;u<p;u++)0!=u?isNaN(l[u])||isNaN(a[u])?(t.stroke(),t.beginPath()):t.lineTo(l[u],a[u]):(t.beginPath(),t.moveTo(l[u],a[u]));t.stroke()}},e.prototype._hit_point=function(t){for(var e=r.create_empty_hit_test_result(),i={x:t.sx,y:t.sy},n=9999,s={},h=0,_=this.sxs.length;h<_;h++){for(var l=Math.max(2,this.visuals.line.cache_select(\"line_width\",h)/2),a=null,u=0,p=this.sxs[h].length-1;u<p;u++){var c={x:this.sxs[h][u],y:this.sys[h][u]},y={x:this.sxs[h][u+1],y:this.sys[h][u+1]},x=r.dist_to_segment(i,c,y);x<l&&x<n&&(n=x,a=[u])}a&&(s[h]=a)}return e.indices=o.keys(s).map(function(t){return parseInt(t,10)}),e.multiline_indices=s,e},e.prototype._hit_span=function(t){var e,i,n=t.sx,s=t.sy,h=r.create_empty_hit_test_result();\"v\"===t.direction?(e=this.renderer.yscale.invert(s),i=this._ys):(e=this.renderer.xscale.invert(n),i=this._xs);for(var _={},l=0,a=i.length;l<a;l++){for(var u=[],p=0,c=i[l].length-1;p<c;p++)i[l][p]<=e&&e<=i[l][p+1]&&u.push(p);u.length>0&&(_[l]=u)}return h.indices=o.keys(_).map(function(t){return parseInt(t,10)}),h.multiline_indices=_,h},e.prototype.get_interpolation_hit=function(t,e,i){var n=[this._xs[t][e],this._ys[t][e],this._xs[t][e+1],this._ys[t][e+1]],s=n[0],r=n[1],o=n[2],h=n[3];return a.line_interpolation(this.renderer,i,s,r,o,h)},e.prototype.draw_legend_for_index=function(t,e,i){a.generic_line_legend(this.visuals,t,e,i)},e.prototype.scenterx=function(){throw new Error(\"not implemented\")},e.prototype.scentery=function(){throw new Error(\"not implemented\")},e}(l.GlyphView);i.MultiLineView=u,u.__name__=\"MultiLineView\";var p=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_MultiLine=function(){this.prototype.default_view=u,this.coords([[\"xs\",\"ys\"]]),this.mixins([\"line\"])},e}(l.Glyph);i.MultiLine=p,p.__name__=\"MultiLine\",p.init_MultiLine()},\n", | |
" function _(t,i,e){var n=t(113),r=t(179),s=t(182),o=t(186),h=t(110),a=t(114),l=t(183),_=t(109),u=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(i,t),i.prototype._index_data=function(){for(var t=[],i=0,e=this._xs.length;i<e;i++)for(var n=0,s=this._xs[i].length;n<s;n++){var o=this._xs[i][n][0],a=this._ys[i][n][0];0!=o.length&&t.push({x0:h.min(o),y0:h.min(a),x1:h.max(o),y1:h.max(a),i:i})}return this.hole_index=this._index_hole_data(),new r.SpatialIndex(t)},i.prototype._index_hole_data=function(){for(var t=[],i=0,e=this._xs.length;i<e;i++)for(var n=0,s=this._xs[i].length;n<s;n++)if(this._xs[i][n].length>1)for(var o=1,a=this._xs[i][n].length;o<a;o++){var l=this._xs[i][n][o],_=this._ys[i][n][o];0!=l.length&&t.push({x0:h.min(l),y0:h.min(_),x1:h.max(l),y1:h.max(_),i:i})}return new r.SpatialIndex(t)},i.prototype._mask_data=function(){var t=this.renderer.plot_view.frame.x_ranges.default,i=[t.min,t.max],e=i[0],n=i[1],r=this.renderer.plot_view.frame.y_ranges.default,s=[r.min,r.max],o=s[0],h=s[1];return this.index.indices({x0:e,x1:n,y0:o,y1:h}).sort(function(t,i){return t-i}).filter(function(t,i,e){return 0===i||t!==e[i-1]})},i.prototype._inner_loop=function(t,i,e){t.beginPath();for(var n=0,r=i.length;n<r;n++)for(var s=0,o=i[n].length;s<o;s++){for(var h=i[n][s],a=e[n][s],l=0,_=h.length;l<_;l++)0!=l?t.lineTo(h[l],a[l]):t.moveTo(h[l],a[l]);t.closePath()}},i.prototype._render=function(t,i,e){var n=this,r=e.sxs,s=e.sys;if(this.visuals.fill.doit||this.visuals.line.doit)for(var o=function(i){var e=[r[i],s[i]],o=e[0],a=e[1];h.visuals.fill.doit&&(h.visuals.fill.set_vectorize(t,i),h._inner_loop(t,o,a),t.fill(\"evenodd\")),h.visuals.hatch.doit2(t,i,function(){n._inner_loop(t,o,a),t.fill(\"evenodd\")},function(){return n.renderer.request_render()}),h.visuals.line.doit&&(h.visuals.line.set_vectorize(t,i),h._inner_loop(t,o,a),t.stroke())},h=this,a=0,l=i;a<l.length;a++){o(l[a])}},i.prototype._hit_point=function(t){for(var i=t.sx,e=t.sy,n=this.renderer.xscale.invert(i),r=this.renderer.yscale.invert(e),s=this.index.indices({x0:n,y0:r,x1:n,y1:r}),o=this.hole_index.indices({x0:n,y0:r,x1:n,y1:r}),h=[],a=0,_=s.length;a<_;a++)for(var u=s[a],f=this.sxs[u],p=this.sys[u],y=0,d=f.length;y<d;y++){var v=f[y].length;if(l.point_in_poly(i,e,f[y][0],p[y][0]))if(1==v)h.push(u);else if(-1==o.indexOf(u))h.push(u);else if(v>1){for(var c=!1,x=1;x<v;x++){var g=f[y][x],m=p[y][x];if(l.point_in_poly(i,e,g,m)){c=!0;break}}c||h.push(u)}}var w=l.create_empty_hit_test_result();return w.indices=h,w},i.prototype._get_snap_coord=function(t){return a.sum(t)/t.length},i.prototype.scenterx=function(t,i,e){if(1==this.sxs[t].length)return this._get_snap_coord(this.sxs[t][0][0]);for(var n=this.sxs[t],r=this.sys[t],s=0,o=n.length;s<o;s++)if(l.point_in_poly(i,e,n[s][0],r[s][0]))return this._get_snap_coord(n[s][0]);throw new Error(\"unreachable code\")},i.prototype.scentery=function(t,i,e){if(1==this.sys[t].length)return this._get_snap_coord(this.sys[t][0][0]);for(var n=this.sxs[t],r=this.sys[t],s=0,o=n.length;s<o;s++)if(l.point_in_poly(i,e,n[s][0],r[s][0]))return this._get_snap_coord(r[s][0]);throw new Error(\"unreachable code\")},i.prototype.map_data=function(){for(var t=0,i=this.model._coords;t<i.length;t++){var e=i[t],n=e[0],r=e[1],s=\"s\"+n,o=\"s\"+r;if(r=\"_\"+r,null!=this[n=\"_\"+n]&&(_.isArray(this[n][0])||_.isTypedArray(this[n][0]))){var h=this[n].length;this[s]=new Array(h),this[o]=new Array(h);for(var a=0;a<h;a++){var l=this[n][a].length;this[s][a]=new Array(l),this[o][a]=new Array(l);for(var u=0;u<l;u++){var f=this[n][a][u].length;this[s][a][u]=new Array(f),this[o][a][u]=new Array(f);for(var p=0;p<f;p++){var y=this.map_to_screen(this[n][a][u][p],this[r][a][u][p]),d=y[0],v=y[1];this[s][a][u][p]=d,this[o][a][u][p]=v}}}}}},i.prototype.draw_legend_for_index=function(t,i,e){o.generic_area_legend(this.visuals,t,i,e)},i}(s.GlyphView);e.MultiPolygonsView=u,u.__name__=\"MultiPolygonsView\";var f=function(t){function i(i){return t.call(this,i)||this}return n.__extends(i,t),i.init_MultiPolygons=function(){this.prototype.default_view=u,this.coords([[\"xs\",\"ys\"]]),this.mixins([\"line\",\"fill\",\"hatch\"])},i}(s.Glyph);e.MultiPolygons=f,f.__name__=\"MultiPolygons\",f.init_MultiPolygons()},\n", | |
" function _(t,i,e){var s=t(113),h=t(310),n=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(i,t),i.prototype._map_data=function(){var t,i=this._x.length;this.sw=new Float64Array(i),t=\"data\"==this.model.properties.width.units?this.sdist(this.renderer.xscale,this._x,this._width,\"center\"):this._width;for(var e=0;e<i;e++)this.sw[e]=.75*t[e];\"data\"==this.model.properties.height.units?this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"):this.sh=this._height},i}(h.EllipseOvalView);e.OvalView=n,n.__name__=\"OvalView\";var r=function(t){function i(i){return t.call(this,i)||this}return s.__extends(i,t),i.init_Oval=function(){this.prototype.default_view=n},i}(h.EllipseOval);e.Oval=r,r.__name__=\"Oval\",r.init_Oval()},\n", | |
" function _(t,e,i){var n=t(113),s=t(179),r=t(182),o=t(186),_=t(110),a=t(114),h=t(109),l=t(183),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._build_discontinuous_object=function(t){for(var e=[],i=0,n=t.length;i<n;i++){e[i]=[];for(var s=_.copy(t[i]);s.length>0;){var r=_.find_last_index(s,function(t){return h.isStrictNaN(t)}),o=void 0;r>=0?o=s.splice(r):(o=s,s=[]);var a=o.filter(function(t){return!h.isStrictNaN(t)});e[i].push(a)}}return e},e.prototype._index_data=function(){for(var t=this._build_discontinuous_object(this._xs),e=this._build_discontinuous_object(this._ys),i=[],n=0,r=this._xs.length;n<r;n++)for(var o=0,a=t[n].length;o<a;o++){var h=t[n][o],l=e[n][o];0!=h.length&&i.push({x0:_.min(h),y0:_.min(l),x1:_.max(h),y1:_.max(l),i:n})}return new s.SpatialIndex(i)},e.prototype._mask_data=function(){var t=this.renderer.plot_view.frame.x_ranges.default,e=[t.min,t.max],i=e[0],n=e[1],s=this.renderer.plot_view.frame.y_ranges.default,r=[s.min,s.max],o=r[0],_=r[1];return this.index.indices({x0:i,x1:n,y0:o,y1:_}).sort(function(t,e){return t-e})},e.prototype._inner_loop=function(t,e,i,n){for(var s=0,r=e.length;s<r;s++)0!=s?isNaN(e[s]+i[s])?(t.closePath(),n.apply(t),t.beginPath()):t.lineTo(e[s],i[s]):(t.beginPath(),t.moveTo(e[s],i[s]));t.closePath(),n.call(t)},e.prototype._render=function(t,e,i){var n=this,s=i.sxs,r=i.sys;this.sxss=this._build_discontinuous_object(s),this.syss=this._build_discontinuous_object(r);for(var o=function(e){var i=[s[e],r[e]],o=i[0],a=i[1];_.visuals.fill.doit&&(_.visuals.fill.set_vectorize(t,e),_._inner_loop(t,o,a,t.fill)),_.visuals.hatch.doit2(t,e,function(){return n._inner_loop(t,o,a,t.fill)},function(){return n.renderer.request_render()}),_.visuals.line.doit&&(_.visuals.line.set_vectorize(t,e),_._inner_loop(t,o,a,t.stroke))},_=this,a=0,h=e;a<h.length;a++){o(h[a])}},e.prototype._hit_point=function(t){for(var e=t.sx,i=t.sy,n=this.renderer.xscale.invert(e),s=this.renderer.yscale.invert(i),r=this.index.indices({x0:n,y0:s,x1:n,y1:s}),o=[],_=0,a=r.length;_<a;_++)for(var h=r[_],u=this.sxss[h],c=this.syss[h],p=0,d=u.length;p<d;p++)l.point_in_poly(e,i,u[p],c[p])&&o.push(h);var f=l.create_empty_hit_test_result();return f.indices=o,f},e.prototype._get_snap_coord=function(t){return a.sum(t)/t.length},e.prototype.scenterx=function(t,e,i){if(1==this.sxss[t].length)return this._get_snap_coord(this.sxs[t]);for(var n=this.sxss[t],s=this.syss[t],r=0,o=n.length;r<o;r++)if(l.point_in_poly(e,i,n[r],s[r]))return this._get_snap_coord(n[r]);throw new Error(\"unreachable code\")},e.prototype.scentery=function(t,e,i){if(1==this.syss[t].length)return this._get_snap_coord(this.sys[t]);for(var n=this.sxss[t],s=this.syss[t],r=0,o=n.length;r<o;r++)if(l.point_in_poly(e,i,n[r],s[r]))return this._get_snap_coord(s[r]);throw new Error(\"unreachable code\")},e.prototype.draw_legend_for_index=function(t,e,i){o.generic_area_legend(this.visuals,t,e,i)},e}(r.GlyphView);i.PatchesView=u,u.__name__=\"PatchesView\";var c=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_Patches=function(){this.prototype.default_view=u,this.coords([[\"xs\",\"ys\"]]),this.mixins([\"line\",\"fill\",\"hatch\"])},e}(r.Glyph);i.Patches=c,c.__name__=\"Patches\",c.init_Patches()},\n", | |
" function _(t,i,n){var e=t(113),o=t(312),r=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype.scenterx=function(t){return(this.sleft[t]+this.sright[t])/2},i.prototype.scentery=function(t){return(this.stop[t]+this.sbottom[t])/2},i.prototype._index_data=function(){return this._index_box(this._right.length)},i.prototype._lrtb=function(t){return[this._left[t],this._right[t],this._top[t],this._bottom[t]]},i}(o.BoxView);n.QuadView=r,r.__name__=\"QuadView\";var u=function(t){function i(i){return t.call(this,i)||this}return e.__extends(i,t),i.init_Quad=function(){this.prototype.default_view=r,this.coords([[\"right\",\"bottom\"],[\"left\",\"top\"]])},i}(o.Box);n.Quad=u,u.__name__=\"Quad\",u.init_Quad()},\n", | |
" function _(t,i,n){var e=t(113),r=t(179),s=t(182),a=t(186);function o(t,i,n){if(i==(t+n)/2)return[t,n];var e=(t-i)/(t-2*i+n),r=t*Math.pow(1-e,2)+2*i*(1-e)*e+n*Math.pow(e,2);return[Math.min(t,n,r),Math.max(t,n,r)]}var _=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype._index_data=function(){for(var t=[],i=0,n=this._x0.length;i<n;i++)if(!isNaN(this._x0[i]+this._x1[i]+this._y0[i]+this._y1[i]+this._cx[i]+this._cy[i])){var e=o(this._x0[i],this._cx[i],this._x1[i]),s=e[0],a=e[1],_=o(this._y0[i],this._cy[i],this._y1[i]),h=_[0],c=_[1];t.push({x0:s,y0:h,x1:a,y1:c,i:i})}return new r.SpatialIndex(t)},i.prototype._render=function(t,i,n){var e=n.sx0,r=n.sy0,s=n.sx1,a=n.sy1,o=n.scx,_=n.scy;if(this.visuals.line.doit)for(var h=0,c=i;h<c.length;h++){var u=c[h];isNaN(e[u]+r[u]+s[u]+a[u]+o[u]+_[u])||(t.beginPath(),t.moveTo(e[u],r[u]),t.quadraticCurveTo(o[u],_[u],s[u],a[u]),this.visuals.line.set_vectorize(t,u),t.stroke())}},i.prototype.draw_legend_for_index=function(t,i,n){a.generic_line_legend(this.visuals,t,i,n)},i.prototype.scenterx=function(){throw new Error(\"not implemented\")},i.prototype.scentery=function(){throw new Error(\"not implemented\")},i}(s.GlyphView);n.QuadraticView=_,_.__name__=\"QuadraticView\";var h=function(t){function i(i){return t.call(this,i)||this}return e.__extends(i,t),i.init_Quadratic=function(){this.prototype.default_view=_,this.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"],[\"cx\",\"cy\"]]),this.mixins([\"line\"])},i}(s.Glyph);n.Quadratic=h,h.__name__=\"Quadratic\",h.init_Quadratic()},\n", | |
" function _(e,t,i){var n=e(113),s=e(178),r=e(186),a=e(121),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype._map_data=function(){\"data\"==this.model.properties.length.units?this.slength=this.sdist(this.renderer.xscale,this._x,this._length):this.slength=this._length},t.prototype._render=function(e,t,i){var n=i.sx,s=i.sy,r=i.slength,a=i._angle;if(this.visuals.line.doit){for(var l=2*(this.renderer.plot_view.frame._width.value+this.renderer.plot_view.frame._height.value),h=0,_=r.length;h<_;h++)0==r[h]&&(r[h]=l);for(var o=0,u=t;o<u.length;o++){h=u[o];isNaN(n[h]+s[h]+a[h]+r[h])||(e.translate(n[h],s[h]),e.rotate(a[h]),e.beginPath(),e.moveTo(0,0),e.lineTo(r[h],0),this.visuals.line.set_vectorize(e,h),e.stroke(),e.rotate(-a[h]),e.translate(-n[h],-s[h]))}}},t.prototype.draw_legend_for_index=function(e,t,i){r.generic_line_legend(this.visuals,e,t,i)},t}(s.XYGlyphView);i.RayView=l,l.__name__=\"RayView\";var h=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.init_Ray=function(){this.prototype.default_view=l,this.mixins([\"line\"]),this.define({length:[a.DistanceSpec],angle:[a.AngleSpec]})},t}(s.XYGlyph);i.Ray=h,h.__name__=\"Ray\",h.init_Ray()},\n", | |
" function _(t,s,i){var e=t(113),h=t(308),r=t(186),a=t(183),n=t(121),_=t(114),o=function(t){function s(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(s,t),s.prototype._set_data=function(){this.max_w2=0,\"data\"==this.model.properties.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,\"data\"==this.model.properties.height.units&&(this.max_h2=this.max_height/2)},s.prototype._map_data=function(){var t,s;if(\"data\"==this.model.properties.width.units)t=this._map_dist_corner_for_data_side_length(this._x,this._width,this.renderer.xscale),this.sw=t[0],this.sx0=t[1];else{this.sw=this._width;var i=this.sx.length;this.sx0=new Float64Array(i);for(var e=0;e<i;e++)this.sx0[e]=this.sx[e]-this.sw[e]/2}if(\"data\"==this.model.properties.height.units)s=this._map_dist_corner_for_data_side_length(this._y,this._height,this.renderer.yscale),this.sh=s[0],this.sy1=s[1];else{this.sh=this._height;var h=this.sy.length;this.sy1=new Float64Array(h);for(e=0;e<h;e++)this.sy1[e]=this.sy[e]-this.sh[e]/2}var r=this.sw.length;this.ssemi_diag=new Float64Array(r);for(e=0;e<r;e++)this.ssemi_diag[e]=Math.sqrt(this.sw[e]/2*this.sw[e]/2+this.sh[e]/2*this.sh[e]/2)},s.prototype._render=function(t,s,i){var e=i.sx,h=i.sy,r=i.sx0,a=i.sy1,n=i.sw,_=i.sh,o=i._angle;if(this.visuals.fill.doit)for(var l=0,d=s;l<d.length;l++){var c=d[l];isNaN(e[c]+h[c]+r[c]+a[c]+n[c]+_[c]+o[c])||(this.visuals.fill.set_vectorize(t,c),o[c]?(t.translate(e[c],h[c]),t.rotate(o[c]),t.fillRect(-n[c]/2,-_[c]/2,n[c],_[c]),t.rotate(-o[c]),t.translate(-e[c],-h[c])):t.fillRect(r[c],a[c],n[c],_[c]))}if(this.visuals.line.doit){t.beginPath();for(var y=0,u=s;y<u.length;y++){c=u[y];isNaN(e[c]+h[c]+r[c]+a[c]+n[c]+_[c]+o[c])||0!=n[c]&&0!=_[c]&&(o[c]?(t.translate(e[c],h[c]),t.rotate(o[c]),t.rect(-n[c]/2,-_[c]/2,n[c],_[c]),t.rotate(-o[c]),t.translate(-e[c],-h[c])):t.rect(r[c],a[c],n[c],_[c]),this.visuals.line.set_vectorize(t,c),t.stroke(),t.beginPath())}t.stroke()}},s.prototype._hit_rect=function(t){return this._hit_rect_against_index(t)},s.prototype._hit_point=function(t){for(var s=t.sx,i=t.sy,e=this.renderer.xscale.invert(s),h=this.renderer.yscale.invert(i),r=[],n=0,o=this.sx0.length;n<o;n++)r.push(this.sx0[n]+this.sw[n]/2);var l=[];for(n=0,o=this.sy1.length;n<o;n++)l.push(this.sy1[n]+this.sh[n]/2);for(var d=_.max(this._ddist(0,r,this.ssemi_diag)),c=_.max(this._ddist(1,l,this.ssemi_diag)),y=e-d,u=e+d,f=h-c,x=h+c,p=[],v=0,g=this.index.indices({x0:y,x1:u,y0:f,y1:x});v<g.length;v++){n=g[v];var m=void 0,w=void 0;if(this._angle[n]){var b=Math.sin(-this._angle[n]),R=Math.cos(-this._angle[n]),A=R*(s-this.sx[n])-b*(i-this.sy[n])+this.sx[n],F=b*(s-this.sx[n])+R*(i-this.sy[n])+this.sy[n];s=A,i=F,w=Math.abs(this.sx[n]-s)<=this.sw[n]/2,m=Math.abs(this.sy[n]-i)<=this.sh[n]/2}else w=s-this.sx0[n]<=this.sw[n]&&s-this.sx0[n]>=0,m=i-this.sy1[n]<=this.sh[n]&&i-this.sy1[n]>=0;m&&w&&p.push(n)}var M=a.create_empty_hit_test_result();return M.indices=p,M},s.prototype._map_dist_corner_for_data_side_length=function(t,s,i){for(var e=t.length,h=new Float64Array(e),r=new Float64Array(e),a=0;a<e;a++)h[a]=Number(t[a])-s[a]/2,r[a]=Number(t[a])+s[a]/2;for(var n=i.v_compute(h),_=i.v_compute(r),o=this.sdist(i,h,s,\"edge\",this.model.dilate),l=n,d=(a=0,n.length);a<d;a++)if(n[a]!=_[a]){l=n[a]<_[a]?n:_;break}return[o,l]},s.prototype._ddist=function(t,s,i){for(var e=0==t?this.renderer.xscale:this.renderer.yscale,h=s,r=h.length,a=new Float64Array(r),n=0;n<r;n++)a[n]=h[n]+i[n];var _=e.v_invert(h),o=e.v_invert(a),l=_.length,d=new Float64Array(l);for(n=0;n<l;n++)d[n]=Math.abs(o[n]-_[n]);return d},s.prototype.draw_legend_for_index=function(t,s,i){r.generic_area_legend(this.visuals,t,s,i)},s.prototype._bounds=function(t){var s=t.x0,i=t.x1,e=t.y0,h=t.y1;return{x0:s-this.max_w2,x1:i+this.max_w2,y0:e-this.max_h2,y1:h+this.max_h2}},s}(h.CenterRotatableView);i.RectView=o,o.__name__=\"RectView\";var l=function(t){function s(s){return t.call(this,s)||this}return e.__extends(s,t),s.init_Rect=function(){this.prototype.default_view=o,this.define({dilate:[n.Boolean,!1]})},s}(h.CenterRotatable);i.Rect=l,l.__name__=\"Rect\",l.init_Rect()},\n", | |
" function _(t,e,i){var n=t(113),s=t(183),r=t(179),h=t(182),_=t(186),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype._index_data=function(){for(var t=[],e=0,i=this._x0.length;e<i;e++){var n=this._x0[e],s=this._x1[e],h=this._y0[e],_=this._y1[e];isNaN(n+s+h+_)||t.push({x0:Math.min(n,s),y0:Math.min(h,_),x1:Math.max(n,s),y1:Math.max(h,_),i:e})}return new r.SpatialIndex(t)},e.prototype._render=function(t,e,i){var n=i.sx0,s=i.sy0,r=i.sx1,h=i.sy1;if(this.visuals.line.doit)for(var _=0,a=e;_<a.length;_++){var o=a[_];isNaN(n[o]+s[o]+r[o]+h[o])||(t.beginPath(),t.moveTo(n[o],s[o]),t.lineTo(r[o],h[o]),this.visuals.line.set_vectorize(t,o),t.stroke())}},e.prototype._hit_point=function(t){for(var e=t.sx,i=t.sy,n={x:e,y:i},r=[],h=this.renderer.xscale.r_invert(e-2,e+2),_=h[0],a=h[1],o=this.renderer.yscale.r_invert(i-2,i+2),x=o[0],y=o[1],l=0,c=this.index.indices({x0:_,y0:x,x1:a,y1:y});l<c.length;l++){var u=c[l],d=Math.pow(Math.max(2,this.visuals.line.cache_select(\"line_width\",u)/2),2),p={x:this.sx0[u],y:this.sy0[u]},v={x:this.sx1[u],y:this.sy1[u]};s.dist_to_segment_squared(n,p,v)<d&&r.push(u)}var f=s.create_empty_hit_test_result();return f.indices=r,f},e.prototype._hit_span=function(t){var e,i,n,r,h,_=this.renderer.plot_view.frame.bbox.ranges,a=_[0],o=_[1],x=t.sx,y=t.sy;\"v\"==t.direction?(h=this.renderer.yscale.invert(y),n=(e=[this._y0,this._y1])[0],r=e[1]):(h=this.renderer.xscale.invert(x),n=(i=[this._x0,this._x1])[0],r=i[1]);for(var l=[],c=this.renderer.xscale.r_invert(a.start,a.end),u=c[0],d=c[1],p=this.renderer.yscale.r_invert(o.start,o.end),v=p[0],f=p[1],m=0,g=this.index.indices({x0:u,y0:v,x1:d,y1:f});m<g.length;m++){var w=g[m];(n[w]<=h&&h<=r[w]||r[w]<=h&&h<=n[w])&&l.push(w)}var S=s.create_empty_hit_test_result();return S.indices=l,S},e.prototype.scenterx=function(t){return(this.sx0[t]+this.sx1[t])/2},e.prototype.scentery=function(t){return(this.sy0[t]+this.sy1[t])/2},e.prototype.draw_legend_for_index=function(t,e,i){_.generic_line_legend(this.visuals,t,e,i)},e}(h.GlyphView);i.SegmentView=a,a.__name__=\"SegmentView\";var o=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_Segment=function(){this.prototype.default_view=a,this.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"]]),this.mixins([\"line\"])},e}(h.Glyph);i.Segment=o,o.__name__=\"Segment\",o.init_Segment()},\n", | |
" function _(e,t,i){var n=e(113),o=e(178),r=e(186),s=e(121),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype._render=function(e,t,i){var n,o,r,s,a,l,_=i.sx,u=i.sy,d=!1,f=null;this.visuals.line.set_value(e);var h=t.length;if(!(h<2)){e.beginPath(),e.moveTo(_[0],u[0]);for(var p=0,c=t;p<c.length;p++){var v=c[p],b=void 0,g=void 0,m=void 0,w=void 0;switch(this.model.mode){case\"before\":b=(n=[_[v-1],u[v]])[0],m=n[1],g=(o=[_[v],u[v]])[0],w=o[1];break;case\"after\":b=(r=[_[v],u[v-1]])[0],m=r[1],g=(s=[_[v],u[v]])[0],w=s[1];break;case\"center\":var y=(_[v-1]+_[v])/2;b=(a=[y,u[v-1]])[0],m=a[1],g=(l=[y,u[v]])[0],w=l[1];break;default:throw new Error(\"unexpected\")}if(d){if(!isFinite(_[v]+u[v])){e.stroke(),e.beginPath(),d=!1,f=v;continue}null!=f&&v-f>1&&(e.stroke(),d=!1)}d?(e.lineTo(b,m),e.lineTo(g,w)):(e.beginPath(),e.moveTo(_[v],u[v]),d=!0),f=v}e.lineTo(_[h-1],u[h-1]),e.stroke()}},t.prototype.draw_legend_for_index=function(e,t,i){r.generic_line_legend(this.visuals,e,t,i)},t}(o.XYGlyphView);i.StepView=a,a.__name__=\"StepView\";var l=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.init_Step=function(){this.prototype.default_view=a,this.mixins([\"line\"]),this.define({mode:[s.StepMode,\"before\"]})},t}(o.XYGlyph);i.Step=l,l.__name__=\"Step\",l.init_Step()},\n", | |
" function _(t,e,s){var i=t(113),n=t(178),r=t(183),_=t(121),o=t(226),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype._rotate_point=function(t,e,s,i,n){return[(t-s)*Math.cos(n)-(e-i)*Math.sin(n)+s,(t-s)*Math.sin(n)+(e-i)*Math.cos(n)+i]},e.prototype._text_bounds=function(t,e,s,i){return[[t,t+s,t+s,t,t],[e,e,e-i,e-i,e]]},e.prototype._render=function(t,e,s){var i=s.sx,n=s.sy,r=s._x_offset,_=s._y_offset,h=s._angle,a=s._text;this._sys=[],this._sxs=[];for(var u=0,l=e;u<l.length;u++){var x=l[u];if(!isNaN(i[x]+n[x]+r[x]+_[x]+h[x])&&null!=a[x]&&(this._sxs[x]=[],this._sys[x]=[],this.visuals.text.doit)){var p=\"\"+a[x];t.save(),t.translate(i[x]+r[x],n[x]+_[x]),t.rotate(h[x]),this.visuals.text.set_vectorize(t,x);var c=this.visuals.text.cache_select(\"font\",x),f=o.measure_font(c).height,y=this.visuals.text.text_line_height.value()*f;if(-1==p.indexOf(\"\\n\")){t.fillText(p,0,0);var v=i[x]+r[x],d=n[x]+_[x],g=t.measureText(p).width,m=this._text_bounds(v,d,g,y),b=m[0],T=m[1];this._sxs[x].push(b),this._sys[x].push(T)}else{var w=p.split(\"\\n\"),N=y*w.length,S=this.visuals.text.cache_select(\"text_baseline\",x),M=void 0;switch(S){case\"top\":M=0;break;case\"middle\":M=-N/2+y/2;break;case\"bottom\":M=-N+y;break;default:M=0,console.warn(\"'\"+S+\"' baseline not supported with multi line text\")}for(var k=0,V=w;k<V.length;k++){var G=V[k];t.fillText(G,0,M);v=i[x]+r[x],d=M+n[x]+_[x],g=t.measureText(G).width;var X=this._text_bounds(v,d,g,y);b=X[0],T=X[1];this._sxs[x].push(b),this._sys[x].push(T),M+=y}}t.restore()}}},e.prototype._hit_point=function(t){for(var e=t.sx,s=t.sy,i=[],n=0;n<this._sxs.length;n++)for(var _=this._sxs[n],o=this._sys[n],h=_.length,a=0,u=h;a<u;a++){var l=this._rotate_point(e,s,_[h-1][0],o[h-1][0],-this._angle[n]),x=l[0],p=l[1];r.point_in_poly(x,p,_[a],o[a])&&i.push(n)}var c=r.create_empty_hit_test_result();return c.indices=i,c},e.prototype._scenterxy=function(t){var e=this._sxs[t][0][0],s=this._sys[t][0][0],i=(this._sxs[t][0][2]+e)/2,n=(this._sys[t][0][2]+s)/2,r=this._rotate_point(i,n,e,s,this._angle[t]);return{x:r[0],y:r[1]}},e.prototype.scenterx=function(t){return this._scenterxy(t).x},e.prototype.scentery=function(t){return this._scenterxy(t).y},e}(n.XYGlyphView);s.TextView=h,h.__name__=\"TextView\";var a=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.init_Text=function(){this.prototype.default_view=h,this.mixins([\"text\"]),this.define({text:[_.NullStringSpec,{field:\"text\"}],angle:[_.AngleSpec,0],x_offset:[_.NumberSpec,0],y_offset:[_.NumberSpec,0]})},e}(n.XYGlyph);s.Text=a,a.__name__=\"Text\",a.init_Text()},\n", | |
" function _(t,i,s){var e=t(113),r=t(312),o=t(121),h=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype.scenterx=function(t){return this.sx[t]},i.prototype.scentery=function(t){return(this.stop[t]+this.sbottom[t])/2},i.prototype._index_data=function(){return this._index_box(this._x.length)},i.prototype._lrtb=function(t){return[this._x[t]-this._width[t]/2,this._x[t]+this._width[t]/2,Math.max(this._top[t],this._bottom[t]),Math.min(this._top[t],this._bottom[t])]},i.prototype._map_data=function(){this.sx=this.renderer.xscale.v_compute(this._x),this.sw=this.sdist(this.renderer.xscale,this._x,this._width,\"center\"),this.stop=this.renderer.yscale.v_compute(this._top),this.sbottom=this.renderer.yscale.v_compute(this._bottom);var t=this.sx.length;this.sleft=new Float64Array(t),this.sright=new Float64Array(t);for(var i=0;i<t;i++)this.sleft[i]=this.sx[i]-this.sw[i]/2,this.sright[i]=this.sx[i]+this.sw[i]/2;this._clamp_viewport()},i}(r.BoxView);s.VBarView=h,h.__name__=\"VBarView\";var n=function(t){function i(i){return t.call(this,i)||this}return e.__extends(i,t),i.init_VBar=function(){this.prototype.default_view=h,this.coords([[\"x\",\"bottom\"]]),this.define({width:[o.NumberSpec],top:[o.CoordinateSpec]}),this.override({bottom:0})},i}(r.Box);s.VBar=n,n.__name__=\"VBar\",n.init_VBar()},\n", | |
" function _(e,t,i){var s=e(113),r=e(178),n=e(186),a=e(183),h=e(121),o=e(111),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype._map_data=function(){\"data\"==this.model.properties.radius.units?this.sradius=this.sdist(this.renderer.xscale,this._x,this._radius):this.sradius=this._radius},t.prototype._render=function(e,t,i){for(var s=i.sx,r=i.sy,n=i.sradius,a=i._start_angle,h=i._end_angle,o=this.model.properties.direction.value(),_=0,l=t;_<l.length;_++){var d=l[_];isNaN(s[d]+r[d]+n[d]+a[d]+h[d])||(e.beginPath(),e.arc(s[d],r[d],n[d],a[d],h[d],o),e.lineTo(s[d],r[d]),e.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(e,d),e.fill()),this.visuals.line.doit&&(this.visuals.line.set_vectorize(e,d),e.stroke()))}},t.prototype._hit_point=function(e){var t,i,s,r,n,h,_,l,d,u,c,p,y,f=e.sx,g=e.sy,v=this.renderer.xscale.invert(f),x=this.renderer.yscale.invert(g),m=2*this.max_radius;\"data\"===this.model.properties.radius.units?(u=v-m,c=v+m,p=x-m,y=x+m):(h=f-m,_=f+m,u=(t=this.renderer.xscale.r_invert(h,_))[0],c=t[1],l=g-m,d=g+m,p=(i=this.renderer.yscale.r_invert(l,d))[0],y=i[1]);for(var w=[],M=0,W=this.index.indices({x0:u,x1:c,y0:p,y1:y});M<W.length;M++){var S=W[M],V=Math.pow(this.sradius[S],2);h=(s=this.renderer.xscale.r_compute(v,this._x[S]))[0],_=s[1],l=(r=this.renderer.yscale.r_compute(x,this._y[S]))[0],d=r[1],(n=Math.pow(h-_,2)+Math.pow(l-d,2))<=V&&w.push([S,n])}for(var b=this.model.properties.direction.value(),k=[],z=0,A=w;z<A.length;z++){var D=A[z],G=(S=D[0],D[1]),N=Math.atan2(g-this.sy[S],f-this.sx[S]);o.angle_between(-N,-this._start_angle[S],-this._end_angle[S],b)&&k.push([S,G])}return a.create_hit_test_result_from_hits(k)},t.prototype.draw_legend_for_index=function(e,t,i){n.generic_area_legend(this.visuals,e,t,i)},t.prototype._scenterxy=function(e){var t=this.sradius[e]/2,i=(this._start_angle[e]+this._end_angle[e])/2;return{x:this.sx[e]+t*Math.cos(i),y:this.sy[e]+t*Math.sin(i)}},t.prototype.scenterx=function(e){return this._scenterxy(e).x},t.prototype.scentery=function(e){return this._scenterxy(e).y},t}(r.XYGlyphView);i.WedgeView=_,_.__name__=\"WedgeView\";var l=function(e){function t(t){return e.call(this,t)||this}return s.__extends(t,e),t.init_Wedge=function(){this.prototype.default_view=_,this.mixins([\"line\",\"fill\"]),this.define({direction:[h.Direction,\"anticlock\"],radius:[h.DistanceSpec],start_angle:[h.AngleSpec],end_angle:[h.AngleSpec]})},t}(r.XYGlyph);i.Wedge=l,l.__name__=\"Wedge\",l.init_Wedge()},\n", | |
" function _(n,o,r){function f(n){for(var o in n)r.hasOwnProperty(o)||(r[o]=n[o])}f(n(193)),f(n(333)),f(n(334))},\n", | |
" function _(n,t,r){var e=n(113),o=function(n){function t(t){return n.call(this,t)||this}return e.__extends(t,n),t}(n(166).Model);r.LayoutProvider=o,o.__name__=\"LayoutProvider\"},\n", | |
" function _(t,a,r){var o=t(113),i=t(333),n=t(121),u=function(t){function a(a){return t.call(this,a)||this}return o.__extends(a,t),a.init_StaticLayoutProvider=function(){this.define({graph_layout:[n.Any,{}]})},a.prototype.get_node_coordinates=function(t){for(var a=[],r=[],o=t.data.index,i=0,n=o.length;i<n;i++){var u=this.graph_layout[o[i]],e=null!=u?u:[NaN,NaN],s=e[0],d=e[1];a.push(s),r.push(d)}return[a,r]},a.prototype.get_edge_coordinates=function(t){for(var a,r,o=[],i=[],n=t.data.start,u=t.data.end,e=null!=t.data.xs&&null!=t.data.ys,s=0,d=n.length;s<d;s++){var h=null!=this.graph_layout[n[s]]&&null!=this.graph_layout[u[s]];if(e&&h)o.push(t.data.xs[s]),i.push(t.data.ys[s]);else{var l=void 0,_=void 0;h?(_=(a=[this.graph_layout[n[s]],this.graph_layout[u[s]]])[0],l=a[1]):(_=(r=[[NaN,NaN],[NaN,NaN]])[0],l=r[1]),o.push([_[0],l[0]]),i.push([_[1],l[1]])}}return[o,i]},a}(i.LayoutProvider);r.StaticLayoutProvider=u,u.__name__=\"StaticLayoutProvider\",u.init_StaticLayoutProvider()},\n", | |
" function _(i,r,d){var n=i(336);d.Grid=n.Grid},\n", | |
" function _(e,i,n){var r=e(113),t=e(244),o=e(121),a=e(109),_=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(i,e),Object.defineProperty(i.prototype,\"_x_range_name\",{get:function(){return this.model.x_range_name},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"_y_range_name\",{get:function(){return this.model.y_range_name},enumerable:!0,configurable:!0}),i.prototype.render=function(){if(this.model.visible){var e=this.plot_view.canvas_view.ctx;e.save(),this._draw_regions(e),this._draw_minor_grids(e),this._draw_grids(e),e.restore()}},i.prototype.connect_signals=function(){var i=this;e.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return i.request_render()})},i.prototype._draw_regions=function(e){var i=this;if(this.visuals.band_fill.doit||this.visuals.band_hatch.doit){this.visuals.band_fill.set_value(e);for(var n=this.grid_coords(\"major\",!1),r=n[0],t=n[1],o=function(n){if(n%2!=1)return\"continue\";var o=a.plot_view.map_to_screen(r[n],t[n],a._x_range_name,a._y_range_name),_=o[0],s=o[1],d=a.plot_view.map_to_screen(r[n+1],t[n+1],a._x_range_name,a._y_range_name),l=d[0],h=d[1];a.visuals.band_fill.doit&&e.fillRect(_[0],s[0],l[1]-_[0],h[1]-s[0]),a.visuals.band_hatch.doit2(e,n,function(){e.fillRect(_[0],s[0],l[1]-_[0],h[1]-s[0])},function(){return i.request_render()})},a=this,_=0;_<r.length-1;_++)o(_)}},i.prototype._draw_grids=function(e){if(this.visuals.grid_line.doit){var i=this.grid_coords(\"major\"),n=i[0],r=i[1];this._draw_grid_helper(e,this.visuals.grid_line,n,r)}},i.prototype._draw_minor_grids=function(e){if(this.visuals.minor_grid_line.doit){var i=this.grid_coords(\"minor\"),n=i[0],r=i[1];this._draw_grid_helper(e,this.visuals.minor_grid_line,n,r)}},i.prototype._draw_grid_helper=function(e,i,n,r){i.set_value(e);for(var t=0;t<n.length;t++){var o=this.plot_view.map_to_screen(n[t],r[t],this._x_range_name,this._y_range_name),a=o[0],_=o[1];e.beginPath(),e.moveTo(Math.round(a[0]),Math.round(_[0]));for(var s=1;s<a.length;s++)e.lineTo(Math.round(a[s]),Math.round(_[s]));e.stroke()}},i.prototype.ranges=function(){var e=this.model.dimension,i=(e+1)%2,n=this.plot_view.frame,r=[n.x_ranges[this.model.x_range_name],n.y_ranges[this.model.y_range_name]];return[r[e],r[i]]},i.prototype.computed_bounds=function(){var e,i,n,r=this.ranges()[0],t=this.model.bounds,o=[r.min,r.max];if(a.isArray(t))i=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i<o[0]&&(i=o[0]),n>o[1]&&(n=o[1]);else{i=o[0],n=o[1];for(var _=0,s=this.plot_view.axis_views;_<s.length;_++){var d=s[_];d.dimension==this.model.dimension&&d.model.x_range_name==this.model.x_range_name&&d.model.y_range_name==this.model.y_range_name&&(i=(e=d.computed_bounds)[0],n=e[1])}}return[i,n]},i.prototype.grid_coords=function(e,i){var n;void 0===i&&(i=!0);var r=this.model.dimension,t=(r+1)%2,o=this.ranges(),a=o[0],_=o[1],s=this.computed_bounds(),d=s[0],l=s[1];d=(n=[Math.min(d,l),Math.max(d,l)])[0],l=n[1];var h=this.model.ticker.get_ticks(d,l,a,_.min,{})[e],u=a.min,m=a.max,g=_.min,c=_.max,p=[[],[]];i||(h[0]!=u&&h.splice(0,0,u),h[h.length-1]!=m&&h.push(m));for(var f=0;f<h.length;f++)if(h[f]!=u&&h[f]!=m||!i){for(var v=[],y=[],b=0;b<2;b++){var w=g+(c-g)/1*b;v.push(h[f]),y.push(w)}p[r].push(v),p[t].push(y)}return p},i}(t.GuideRendererView);n.GridView=_,_.__name__=\"GridView\";var s=function(e){function i(i){return e.call(this,i)||this}return r.__extends(i,e),i.init_Grid=function(){this.prototype.default_view=_,this.mixins([\"line:grid_\",\"line:minor_grid_\",\"fill:band_\",\"hatch:band_\"]),this.define({bounds:[o.Any,\"auto\"],dimension:[o.Any,0],ticker:[o.Instance],x_range_name:[o.String,\"default\"],y_range_name:[o.String,\"default\"]}),this.override({level:\"underlay\",band_fill_color:null,band_fill_alpha:0,grid_line_color:\"#e5e5e5\",minor_grid_line_color:null})},i}(t.GuideRenderer);n.Grid=s,s.__name__=\"Grid\",s.init_Grid()},\n", | |
" function _(a,o,r){var v=a(338);r.Box=v.Box;var x=a(340);r.Column=x.Column;var B=a(341);r.GridBox=B.GridBox;var e=a(342);r.HTMLBox=e.HTMLBox;var n=a(339);r.LayoutDOM=n.LayoutDOM;var i=a(343);r.Row=i.Row;var t=a(344);r.Spacer=t.Spacer;var u=a(345);r.Panel=u.Panel,r.Tabs=u.Tabs;var d=a(349);r.WidgetBox=d.WidgetBox},\n", | |
" function _(n,t,e){var i=n(113),o=n(339),r=n(121),c=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return i.__extends(t,n),t.prototype.connect_signals=function(){var t=this;n.prototype.connect_signals.call(this),this.connect(this.model.properties.children.change,function(){return t.rebuild()})},Object.defineProperty(t.prototype,\"child_models\",{get:function(){return this.model.children},enumerable:!0,configurable:!0}),t}(o.LayoutDOMView);e.BoxView=c,c.__name__=\"BoxView\";var u=function(n){function t(t){return n.call(this,t)||this}return i.__extends(t,n),t.init_Box=function(){this.define({children:[r.Array,[]],spacing:[r.Number,0]})},t}(o.LayoutDOM);e.Box=u,u.__name__=\"Box\",u.init_Box()},\n", | |
" function _(t,i,e){var o=t(113),n=t(166),s=t(163),l=t(167),r=t(109),h=t(121),a=t(194),_=t(161),u=t(164),d=function(t){function i(){var i=t.apply(this,arguments)||this;return i._idle_notified=!1,i._offset_parent=null,i._viewport={},i}return o.__extends(i,t),i.prototype.initialize=function(){t.prototype.initialize.call(this),this.el.style.position=this.is_root?\"relative\":\"absolute\",this._child_views={},this.build_child_views()},i.prototype.remove=function(){for(var i=0,e=this.child_views;i<e.length;i++){e[i].remove()}this._child_views={},t.prototype.remove.call(this)},i.prototype.connect_signals=function(){var i=this;t.prototype.connect_signals.call(this),this.is_root&&(this._on_resize=function(){return i.resize_layout()},window.addEventListener(\"resize\",this._on_resize),this._parent_observer=setInterval(function(){var t=i.el.offsetParent;i._offset_parent!=t&&(i._offset_parent=t,null!=t&&(i.compute_viewport(),i.invalidate_layout()))},250));var e=this.model.properties;this.on_change([e.width,e.height,e.min_width,e.min_height,e.max_width,e.max_height,e.margin,e.width_policy,e.height_policy,e.sizing_mode,e.aspect_ratio,e.visible],function(){return i.invalidate_layout()}),this.on_change([e.background,e.css_classes],function(){return i.invalidate_render()})},i.prototype.disconnect_signals=function(){null!=this._parent_observer&&clearTimeout(this._parent_observer),null!=this._on_resize&&window.removeEventListener(\"resize\",this._on_resize),t.prototype.disconnect_signals.call(this)},i.prototype.css_classes=function(){return t.prototype.css_classes.call(this).concat(this.model.css_classes)},Object.defineProperty(i.prototype,\"child_views\",{get:function(){var t=this;return this.child_models.map(function(i){return t._child_views[i.id]})},enumerable:!0,configurable:!0}),i.prototype.build_child_views=function(){a.build_views(this._child_views,this.child_models,{parent:this})},i.prototype.render=function(){var i;t.prototype.render.call(this),s.empty(this.el);var e=this.model.background;this.el.style.backgroundColor=null!=e?e:\"\",(i=s.classes(this.el).clear()).add.apply(i,this.css_classes());for(var o=0,n=this.child_views;o<n.length;o++){var l=n[o];this.el.appendChild(l.el),l.render()}},i.prototype.update_layout=function(){for(var t=0,i=this.child_views;t<i.length;t++){i[t].update_layout()}this._update_layout()},i.prototype.update_position=function(){this.el.style.display=this.model.visible?\"block\":\"none\";var t=this.is_root?this.layout.sizing.margin:void 0;s.position(this.el,this.layout.bbox,t);for(var i=0,e=this.child_views;i<e.length;i++){e[i].update_position()}},i.prototype.after_layout=function(){for(var t=0,i=this.child_views;t<i.length;t++){i[t].after_layout()}this._has_finished=!0},i.prototype.compute_viewport=function(){this._viewport=this._viewport_size()},i.prototype.renderTo=function(t){t.appendChild(this.el),this._offset_parent=this.el.offsetParent,this.compute_viewport(),this.build()},i.prototype.build=function(){return this.assert_root(),this.render(),this.update_layout(),this.compute_layout(),this},i.prototype.rebuild=function(){this.build_child_views(),this.invalidate_render()},i.prototype.compute_layout=function(){var t=Date.now();this.layout.compute(this._viewport),this.update_position(),this.after_layout(),l.logger.debug(\"layout computed in \"+(Date.now()-t)+\" ms\"),this.notify_finished()},i.prototype.resize_layout=function(){this.root.compute_viewport(),this.root.compute_layout()},i.prototype.invalidate_layout=function(){this.root.update_layout(),this.root.compute_layout()},i.prototype.invalidate_render=function(){this.render(),this.invalidate_layout()},i.prototype.has_finished=function(){if(!t.prototype.has_finished.call(this))return!1;for(var i=0,e=this.child_views;i<e.length;i++){if(!e[i].has_finished())return!1}return!0},i.prototype.notify_finished=function(){this.is_root?!this._idle_notified&&this.has_finished()&&null!=this.model.document&&(this._idle_notified=!0,this.model.document.notify_idle(this.model)):this.root.notify_finished()},i.prototype._width_policy=function(){return null!=this.model.width?\"fixed\":\"fit\"},i.prototype._height_policy=function(){return null!=this.model.height?\"fixed\":\"fit\"},i.prototype.box_sizing=function(){var t=this.model,i=t.width_policy,e=t.height_policy,o=t.aspect_ratio;\"auto\"==i&&(i=this._width_policy()),\"auto\"==e&&(e=this._height_policy());var n=this.model.sizing_mode;if(null!=n)if(\"fixed\"==n)i=e=\"fixed\";else if(\"stretch_both\"==n)i=e=\"max\";else if(\"stretch_width\"==n)i=\"max\";else if(\"stretch_height\"==n)e=\"max\";else switch(null==o&&(o=\"auto\"),n){case\"scale_width\":i=\"max\",e=\"min\";break;case\"scale_height\":i=\"min\",e=\"max\";break;case\"scale_both\":i=\"max\",e=\"max\";break;default:throw new Error(\"unreachable\")}var s={width_policy:i,height_policy:e},l=this.model,h=l.min_width,a=l.min_height;null!=h&&(s.min_width=h),null!=a&&(s.min_height=a);var _=this.model,u=_.width,d=_.height;null!=u&&(s.width=u),null!=d&&(s.height=d);var c=this.model,p=c.max_width,f=c.max_height;null!=p&&(s.max_width=p),null!=f&&(s.max_height=f),\"auto\"==o&&null!=u&&null!=d?s.aspect=u/d:r.isNumber(o)&&(s.aspect=o);var m=this.model.margin;if(null!=m)if(r.isNumber(m))s.margin={top:m,right:m,bottom:m,left:m};else if(2==m.length){var y=m[0],v=m[1];s.margin={top:y,right:v,bottom:y,left:v}}else{var g=m[0],b=m[1],w=m[2],x=m[3];s.margin={top:g,right:b,bottom:w,left:x}}s.visible=this.model.visible;var z=this.model.align;return r.isArray(z)?(s.halign=z[0],s.valign=z[1]):s.halign=s.valign=z,s},i.prototype._viewport_size=function(){var t=this;return s.undisplayed(this.el,function(){for(var i=t.el;i=i.parentElement;)if(!i.classList.contains(u.bk_root)){if(i==document.body){var e=s.extents(document.body).margin,o=e.left,n=e.right,l=e.top,r=e.bottom;return{width:Math.ceil(document.documentElement.clientWidth-o-n),height:Math.ceil(document.documentElement.clientHeight-l-r)}}var h=s.extents(i).padding,a=h.left,_=h.right,d=h.top,c=h.bottom,p=i.getBoundingClientRect(),f=p.width,m=p.height,y=Math.ceil(f-a-_),v=Math.ceil(m-d-c);if(y>0||v>0)return{width:y>0?y:void 0,height:v>0?v:void 0}}return{}})},i.prototype.serializable_state=function(){return Object.assign(Object.assign({},t.prototype.serializable_state.call(this)),{bbox:this.layout.bbox.box,children:this.child_views.map(function(t){return t.serializable_state()})})},i}(_.DOMView);e.LayoutDOMView=d,d.__name__=\"LayoutDOMView\";var c=function(t){function i(i){return t.call(this,i)||this}return o.__extends(i,t),i.init_LayoutDOM=function(){this.define({width:[h.Number,null],height:[h.Number,null],min_width:[h.Number,null],min_height:[h.Number,null],max_width:[h.Number,null],max_height:[h.Number,null],margin:[h.Any,[0,0,0,0]],width_policy:[h.Any,\"auto\"],height_policy:[h.Any,\"auto\"],aspect_ratio:[h.Any,null],sizing_mode:[h.SizingMode,null],visible:[h.Boolean,!0],disabled:[h.Boolean,!1],align:[h.Any,\"start\"],background:[h.Color,null],css_classes:[h.Array,[]]})},i}(n.Model);e.LayoutDOM=c,c.__name__=\"LayoutDOM\",c.init_LayoutDOM()},\n", | |
" function _(t,n,i){var o=t(113),u=t(338),e=t(286),s=t(121),l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(n,t),n.prototype._update_layout=function(){var t=this.child_views.map(function(t){return t.layout});this.layout=new e.Column(t),this.layout.rows=this.model.rows,this.layout.spacing=[this.model.spacing,0],this.layout.set_sizing(this.box_sizing())},n}(u.BoxView);i.ColumnView=l,l.__name__=\"ColumnView\";var _=function(t){function n(n){return t.call(this,n)||this}return o.__extends(n,t),n.init_Column=function(){this.prototype.default_view=l,this.define({rows:[s.Any,\"auto\"]})},n}(u.Box);i.Column=_,_.__name__=\"Column\",_.init_Column()},\n", | |
" function _(t,i,n){var o=t(113),e=t(339),r=t(286),s=t(121),l=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(i,t),i.prototype.connect_signals=function(){var i=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.children.change,function(){return i.rebuild()})},Object.defineProperty(i.prototype,\"child_models\",{get:function(){return this.model.children.map(function(t){return t[0]})},enumerable:!0,configurable:!0}),i.prototype._update_layout=function(){this.layout=new r.Grid,this.layout.rows=this.model.rows,this.layout.cols=this.model.cols,this.layout.spacing=this.model.spacing;for(var t=0,i=this.model.children;t<i.length;t++){var n=i[t],o=n[0],e=n[1],s=n[2],l=n[3],u=n[4],a=this._child_views[o.id];this.layout.items.push({layout:a.layout,row:e,col:s,row_span:l,col_span:u})}this.layout.set_sizing(this.box_sizing())},i}(e.LayoutDOMView);n.GridBoxView=l,l.__name__=\"GridBoxView\";var u=function(t){function i(i){return t.call(this,i)||this}return o.__extends(i,t),i.init_GridBox=function(){this.prototype.default_view=l,this.define({children:[s.Array,[]],rows:[s.Any,\"auto\"],cols:[s.Any,\"auto\"],spacing:[s.Any,0]})},i}(e.LayoutDOM);n.GridBox=u,u.__name__=\"GridBox\",u.init_GridBox()},\n", | |
" function _(t,n,e){var o=t(113),i=t(339),u=t(282),r=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(n,t),Object.defineProperty(n.prototype,\"child_models\",{get:function(){return[]},enumerable:!0,configurable:!0}),n.prototype._update_layout=function(){this.layout=new u.ContentBox(this.el),this.layout.set_sizing(this.box_sizing())},n}(i.LayoutDOMView);e.HTMLBoxView=r,r.__name__=\"HTMLBoxView\";var _=function(t){function n(n){return t.call(this,n)||this}return o.__extends(n,t),n}(i.LayoutDOM);e.HTMLBox=_,_.__name__=\"HTMLBox\"},\n", | |
" function _(t,i,n){var o=t(113),e=t(338),s=t(286),u=t(121),_=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(i,t),i.prototype._update_layout=function(){var t=this.child_views.map(function(t){return t.layout});this.layout=new s.Row(t),this.layout.cols=this.model.cols,this.layout.spacing=[0,this.model.spacing],this.layout.set_sizing(this.box_sizing())},i}(e.BoxView);n.RowView=_,_.__name__=\"RowView\";var a=function(t){function i(i){return t.call(this,i)||this}return o.__extends(i,t),i.init_Row=function(){this.prototype.default_view=_,this.define({cols:[u.Any,\"auto\"]})},i}(e.Box);n.Row=a,a.__name__=\"Row\",a.init_Row()},\n", | |
" function _(t,e,n){var i=t(113),r=t(339),o=t(282),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),Object.defineProperty(e.prototype,\"child_models\",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype._update_layout=function(){this.layout=new o.LayoutItem,this.layout.set_sizing(this.box_sizing())},e}(r.LayoutDOMView);n.SpacerView=u,u.__name__=\"SpacerView\";var a=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.init_Spacer=function(){this.prototype.default_view=u},e}(r.LayoutDOM);n.Spacer=a,a.__name__=\"Spacer\",a.init_Spacer()},\n", | |
" function _(e,t,i){var a=e(113),s=e(282),l=e(163),r=e(110),n=e(121),h=e(339),o=e(166),c=e(240),d=e(346),_=e(347),u=e(348),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.properties.tabs.change,function(){return t.rebuild()}),this.connect(this.model.properties.active.change,function(){return t.on_active_change()})},Object.defineProperty(t.prototype,\"child_models\",{get:function(){return this.model.tabs.map(function(e){return e.child})},enumerable:!0,configurable:!0}),t.prototype._update_layout=function(){var e=this.model.tabs_location,t=\"above\"==e||\"below\"==e,i=this.scroll_el,n=this.headers_el;this.header=new(function(e){function s(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(s,e),s.prototype._measure=function(a){var s=l.size(i),h=l.children(n).slice(0,3).map(function(e){return l.size(e)}),o=e.prototype._measure.call(this,a),c=o.width,d=o.height;if(t){var _=s.width+r.sum(h.map(function(e){return e.width}));return{width:a.width!=1/0?a.width:_,height:d}}var u=s.height+r.sum(h.map(function(e){return e.height}));return{width:c,height:a.height!=1/0?a.height:u}},s}(s.ContentBox))(this.header_el),t?this.header.set_sizing({width_policy:\"fit\",height_policy:\"fixed\"}):this.header.set_sizing({width_policy:\"fixed\",height_policy:\"fit\"});var h=1,o=1;switch(e){case\"above\":h-=1;break;case\"below\":h+=1;break;case\"left\":o-=1;break;case\"right\":o+=1}var c={layout:this.header,row:h,col:o},d=this.child_views.map(function(e){return{layout:e.layout,row:1,col:1}});this.layout=new s.Grid(a.__spreadArrays([c],d)),this.layout.set_sizing(this.box_sizing())},t.prototype.update_position=function(){e.prototype.update_position.call(this),this.header_el.style.position=\"absolute\",l.position(this.header_el,this.header.bbox);var t=this.model.tabs_location,i=\"above\"==t||\"below\"==t,a=l.size(this.scroll_el),s=l.scroll_size(this.headers_el);if(i){var r=this.header.bbox.width;s.width>r?(this.wrapper_el.style.maxWidth=r-a.width+\"px\",l.display(this.scroll_el)):(this.wrapper_el.style.maxWidth=\"\",l.undisplay(this.scroll_el))}else{var n=this.header.bbox.height;s.height>n?(this.wrapper_el.style.maxHeight=n-a.height+\"px\",l.display(this.scroll_el)):(this.wrapper_el.style.maxHeight=\"\",l.undisplay(this.scroll_el))}for(var h=this.child_views,o=0,c=h;o<c.length;o++){var d=c[o];l.hide(d.el)}var _=h[this.model.active];null!=_&&l.show(_.el)},t.prototype.render=function(){var t=this;e.prototype.render.call(this);var i=this.model.active,a=this.model.tabs_location,s=\"above\"==a||\"below\"==a,n=this.model.tabs.map(function(e,a){var s=l.div({class:[d.bk_tab,a==i?c.bk_active:null]},e.title);if(s.addEventListener(\"click\",function(e){e.target==e.currentTarget&&t.change_active(a)}),e.closable){var n=l.div({class:d.bk_close});n.addEventListener(\"click\",function(e){if(e.target==e.currentTarget){t.model.tabs=r.remove_at(t.model.tabs,a);var i=t.model.tabs.length;t.model.active>i-1&&(t.model.active=i-1)}}),s.appendChild(n)}return s});this.headers_el=l.div({class:[d.bk_headers]},n),this.wrapper_el=l.div({class:d.bk_headers_wrapper},this.headers_el);var h=l.div({class:[_.bk_btn,_.bk_btn_default],disabled:\"\"},l.div({class:[u.bk_caret,c.bk_left]})),o=l.div({class:[_.bk_btn,_.bk_btn_default]},l.div({class:[u.bk_caret,c.bk_right]})),p=0,b=function(e){return function(){var i=t.model.tabs.length;0==(p=\"left\"==e?Math.max(p-1,0):Math.min(p+1,i-1))?h.setAttribute(\"disabled\",\"\"):h.removeAttribute(\"disabled\"),p==i-1?o.setAttribute(\"disabled\",\"\"):o.removeAttribute(\"disabled\");var a=l.children(t.headers_el).slice(0,p).map(function(e){return e.getBoundingClientRect()});if(s){var n=-r.sum(a.map(function(e){return e.width}));t.headers_el.style.left=n+\"px\"}else{var c=-r.sum(a.map(function(e){return e.height}));t.headers_el.style.top=c+\"px\"}}};h.addEventListener(\"click\",b(\"left\")),o.addEventListener(\"click\",b(\"right\")),this.scroll_el=l.div({class:_.bk_btn_group},h,o),this.header_el=l.div({class:[d.bk_tabs_header,c.bk_side(a)]},this.scroll_el,this.wrapper_el),this.el.appendChild(this.header_el)},t.prototype.change_active=function(e){e!=this.model.active&&(this.model.active=e,null!=this.model.callback&&this.model.callback.execute(this.model))},t.prototype.on_active_change=function(){for(var e=this.model.active,t=l.children(this.headers_el),i=0,a=t;i<a.length;i++){a[i].classList.remove(c.bk_active)}t[e].classList.add(c.bk_active);for(var s=this.child_views,r=0,n=s;r<n.length;r++){var h=n[r];l.hide(h.el)}l.show(s[e].el)},t}(h.LayoutDOMView);i.TabsView=p,p.__name__=\"TabsView\";var b=function(e){function t(t){return e.call(this,t)||this}return a.__extends(t,e),t.init_Tabs=function(){this.prototype.default_view=p,this.define({tabs:[n.Array,[]],tabs_location:[n.Location,\"above\"],active:[n.Number,0],callback:[n.Any]})},t}(h.LayoutDOM);i.Tabs=b,b.__name__=\"Tabs\",b.init_Tabs();var v=function(e){function t(t){return e.call(this,t)||this}return a.__extends(t,e),t.init_Panel=function(){this.define({title:[n.String,\"\"],child:[n.Instance],closable:[n.Boolean,!1]})},t}(o.Model);i.Panel=v,v.__name__=\"Panel\",v.init_Panel()},\n", | |
" function _(e,r,n){e(164),e(163).styles.append('.bk-root .bk-tabs-header {\\n display: flex;\\n display: -webkit-flex;\\n flex-wrap: nowrap;\\n -webkit-flex-wrap: nowrap;\\n align-items: center;\\n -webkit-align-items: center;\\n overflow: hidden;\\n user-select: none;\\n -ms-user-select: none;\\n -moz-user-select: none;\\n -webkit-user-select: none;\\n}\\n.bk-root .bk-tabs-header .bk-btn-group {\\n height: auto;\\n margin-right: 5px;\\n}\\n.bk-root .bk-tabs-header .bk-btn-group > .bk-btn {\\n flex-grow: 0;\\n -webkit-flex-grow: 0;\\n height: auto;\\n padding: 4px 4px;\\n}\\n.bk-root .bk-tabs-header .bk-headers-wrapper {\\n flex-grow: 1;\\n -webkit-flex-grow: 1;\\n overflow: hidden;\\n color: #666666;\\n}\\n.bk-root .bk-tabs-header.bk-above .bk-headers-wrapper {\\n border-bottom: 1px solid #e6e6e6;\\n}\\n.bk-root .bk-tabs-header.bk-right .bk-headers-wrapper {\\n border-left: 1px solid #e6e6e6;\\n}\\n.bk-root .bk-tabs-header.bk-below .bk-headers-wrapper {\\n border-top: 1px solid #e6e6e6;\\n}\\n.bk-root .bk-tabs-header.bk-left .bk-headers-wrapper {\\n border-right: 1px solid #e6e6e6;\\n}\\n.bk-root .bk-tabs-header.bk-above,\\n.bk-root .bk-tabs-header.bk-below {\\n flex-direction: row;\\n -webkit-flex-direction: row;\\n}\\n.bk-root .bk-tabs-header.bk-above .bk-headers,\\n.bk-root .bk-tabs-header.bk-below .bk-headers {\\n flex-direction: row;\\n -webkit-flex-direction: row;\\n}\\n.bk-root .bk-tabs-header.bk-left,\\n.bk-root .bk-tabs-header.bk-right {\\n flex-direction: column;\\n -webkit-flex-direction: column;\\n}\\n.bk-root .bk-tabs-header.bk-left .bk-headers,\\n.bk-root .bk-tabs-header.bk-right .bk-headers {\\n flex-direction: column;\\n -webkit-flex-direction: column;\\n}\\n.bk-root .bk-tabs-header .bk-headers {\\n position: relative;\\n display: flex;\\n display: -webkit-flex;\\n flex-wrap: nowrap;\\n -webkit-flex-wrap: nowrap;\\n align-items: center;\\n -webkit-align-items: center;\\n}\\n.bk-root .bk-tabs-header .bk-tab {\\n padding: 4px 8px;\\n border: solid transparent;\\n white-space: nowrap;\\n cursor: pointer;\\n}\\n.bk-root .bk-tabs-header .bk-tab:hover {\\n background-color: #f2f2f2;\\n}\\n.bk-root .bk-tabs-header .bk-tab.bk-active {\\n color: #4d4d4d;\\n background-color: white;\\n border-color: #e6e6e6;\\n}\\n.bk-root .bk-tabs-header .bk-tab .bk-close {\\n margin-left: 10px;\\n}\\n.bk-root .bk-tabs-header.bk-above .bk-tab {\\n border-width: 3px 1px 0px 1px;\\n border-radius: 4px 4px 0 0;\\n}\\n.bk-root .bk-tabs-header.bk-right .bk-tab {\\n border-width: 1px 3px 1px 0px;\\n border-radius: 0 4px 4px 0;\\n}\\n.bk-root .bk-tabs-header.bk-below .bk-tab {\\n border-width: 0px 1px 3px 1px;\\n border-radius: 0 0 4px 4px;\\n}\\n.bk-root .bk-tabs-header.bk-left .bk-tab {\\n border-width: 1px 0px 1px 3px;\\n border-radius: 4px 0 0 4px;\\n}\\n.bk-root .bk-close {\\n display: inline-block;\\n width: 10px;\\n height: 10px;\\n vertical-align: middle;\\n background-image: url(\\'data:image/svg+xml;utf8,\\\\\\n <svg viewPort=\"0 0 10 10\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\\\\\\n <line x1=\"1\" y1=\"9\" x2=\"9\" y2=\"1\" stroke=\"gray\" stroke-width=\"2\"/>\\\\\\n <line x1=\"1\" y1=\"1\" x2=\"9\" y2=\"9\" stroke=\"gray\" stroke-width=\"2\"/>\\\\\\n </svg>\\');\\n}\\n.bk-root .bk-close:hover {\\n background-image: url(\\'data:image/svg+xml;utf8,\\\\\\n <svg viewPort=\"0 0 10 10\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\\\\\\n <line x1=\"1\" y1=\"9\" x2=\"9\" y2=\"1\" stroke=\"red\" stroke-width=\"2\"/>\\\\\\n <line x1=\"1\" y1=\"1\" x2=\"9\" y2=\"9\" stroke=\"red\" stroke-width=\"2\"/>\\\\\\n </svg>\\');\\n}\\n'),n.bk_tabs_header=\"bk-tabs-header\",n.bk_headers_wrapper=\"bk-headers-wrapper\",n.bk_headers=\"bk-headers\",n.bk_tab=\"bk-tab\",n.bk_close=\"bk-close\"},\n", | |
" function _(n,b,o){n(164),n(163).styles.append(\".bk-root .bk-btn {\\n height: 100%;\\n display: inline-block;\\n text-align: center;\\n vertical-align: middle;\\n white-space: nowrap;\\n cursor: pointer;\\n padding: 6px 12px;\\n font-size: 12px;\\n border: 1px solid transparent;\\n border-radius: 4px;\\n outline: 0;\\n user-select: none;\\n -ms-user-select: none;\\n -moz-user-select: none;\\n -webkit-user-select: none;\\n}\\n.bk-root .bk-btn:hover,\\n.bk-root .bk-btn:focus {\\n text-decoration: none;\\n}\\n.bk-root .bk-btn:active,\\n.bk-root .bk-btn.bk-active {\\n background-image: none;\\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\\n}\\n.bk-root .bk-btn[disabled] {\\n cursor: not-allowed;\\n pointer-events: none;\\n opacity: 0.65;\\n box-shadow: none;\\n}\\n.bk-root .bk-btn-default {\\n color: #333;\\n background-color: #fff;\\n border-color: #ccc;\\n}\\n.bk-root .bk-btn-default:hover {\\n background-color: #f5f5f5;\\n border-color: #b8b8b8;\\n}\\n.bk-root .bk-btn-default.bk-active {\\n background-color: #ebebeb;\\n border-color: #adadad;\\n}\\n.bk-root .bk-btn-default[disabled],\\n.bk-root .bk-btn-default[disabled]:hover,\\n.bk-root .bk-btn-default[disabled]:focus,\\n.bk-root .bk-btn-default[disabled]:active,\\n.bk-root .bk-btn-default[disabled].bk-active {\\n background-color: #e6e6e6;\\n border-color: #ccc;\\n}\\n.bk-root .bk-btn-primary {\\n color: #fff;\\n background-color: #428bca;\\n border-color: #357ebd;\\n}\\n.bk-root .bk-btn-primary:hover {\\n background-color: #3681c1;\\n border-color: #2c699e;\\n}\\n.bk-root .bk-btn-primary.bk-active {\\n background-color: #3276b1;\\n border-color: #285e8e;\\n}\\n.bk-root .bk-btn-primary[disabled],\\n.bk-root .bk-btn-primary[disabled]:hover,\\n.bk-root .bk-btn-primary[disabled]:focus,\\n.bk-root .bk-btn-primary[disabled]:active,\\n.bk-root .bk-btn-primary[disabled].bk-active {\\n background-color: #506f89;\\n border-color: #357ebd;\\n}\\n.bk-root .bk-btn-success {\\n color: #fff;\\n background-color: #5cb85c;\\n border-color: #4cae4c;\\n}\\n.bk-root .bk-btn-success:hover {\\n background-color: #4eb24e;\\n border-color: #409240;\\n}\\n.bk-root .bk-btn-success.bk-active {\\n background-color: #47a447;\\n border-color: #398439;\\n}\\n.bk-root .bk-btn-success[disabled],\\n.bk-root .bk-btn-success[disabled]:hover,\\n.bk-root .bk-btn-success[disabled]:focus,\\n.bk-root .bk-btn-success[disabled]:active,\\n.bk-root .bk-btn-success[disabled].bk-active {\\n background-color: #667b66;\\n border-color: #4cae4c;\\n}\\n.bk-root .bk-btn-warning {\\n color: #fff;\\n background-color: #f0ad4e;\\n border-color: #eea236;\\n}\\n.bk-root .bk-btn-warning:hover {\\n background-color: #eea43b;\\n border-color: #e89014;\\n}\\n.bk-root .bk-btn-warning.bk-active {\\n background-color: #ed9c28;\\n border-color: #d58512;\\n}\\n.bk-root .bk-btn-warning[disabled],\\n.bk-root .bk-btn-warning[disabled]:hover,\\n.bk-root .bk-btn-warning[disabled]:focus,\\n.bk-root .bk-btn-warning[disabled]:active,\\n.bk-root .bk-btn-warning[disabled].bk-active {\\n background-color: #c89143;\\n border-color: #eea236;\\n}\\n.bk-root .bk-btn-danger {\\n color: #fff;\\n background-color: #d9534f;\\n border-color: #d43f3a;\\n}\\n.bk-root .bk-btn-danger:hover {\\n background-color: #d5433e;\\n border-color: #bd2d29;\\n}\\n.bk-root .bk-btn-danger.bk-active {\\n background-color: #d2322d;\\n border-color: #ac2925;\\n}\\n.bk-root .bk-btn-danger[disabled],\\n.bk-root .bk-btn-danger[disabled]:hover,\\n.bk-root .bk-btn-danger[disabled]:focus,\\n.bk-root .bk-btn-danger[disabled]:active,\\n.bk-root .bk-btn-danger[disabled].bk-active {\\n background-color: #a55350;\\n border-color: #d43f3a;\\n}\\n.bk-root .bk-btn-group {\\n height: 100%;\\n display: flex;\\n display: -webkit-flex;\\n flex-wrap: nowrap;\\n -webkit-flex-wrap: nowrap;\\n align-items: center;\\n -webkit-align-items: center;\\n flex-direction: row;\\n -webkit-flex-direction: row;\\n}\\n.bk-root .bk-btn-group > .bk-btn {\\n flex-grow: 1;\\n -webkit-flex-grow: 1;\\n}\\n.bk-root .bk-btn-group > .bk-btn + .bk-btn {\\n margin-left: -1px;\\n}\\n.bk-root .bk-btn-group > .bk-btn:first-child:not(:last-child) {\\n border-bottom-right-radius: 0;\\n border-top-right-radius: 0;\\n}\\n.bk-root .bk-btn-group > .bk-btn:not(:first-child):last-child {\\n border-bottom-left-radius: 0;\\n border-top-left-radius: 0;\\n}\\n.bk-root .bk-btn-group > .bk-btn:not(:first-child):not(:last-child) {\\n border-radius: 0;\\n}\\n.bk-root .bk-btn-group .bk-dropdown-toggle {\\n flex: 0 0 0;\\n -webkit-flex: 0 0 0;\\n padding: 6px 6px;\\n}\\n\"),o.bk_btn=\"bk-btn\",o.bk_btn_group=\"bk-btn-group\",o.bk_btn_default=\"bk-btn-default\",o.bk_btn_primary=\"bk-btn-primary\",o.bk_btn_success=\"bk-btn-success\",o.bk_btn_warning=\"bk-btn-warning\",o.bk_btn_danger=\"bk-btn-danger\",o.bk_btn_type=function(n){switch(n){case\"default\":return o.bk_btn_default;case\"primary\":return o.bk_btn_primary;case\"success\":return o.bk_btn_success;case\"warning\":return o.bk_btn_warning;case\"danger\":return o.bk_btn_danger}},o.bk_dropdown_toggle=\"bk-dropdown-toggle\"},\n", | |
" function _(n,o,r){n(164),n(163).styles.append(\".bk-root .bk-menu {\\n position: absolute;\\n left: 0;\\n width: 100%;\\n z-index: 100;\\n cursor: pointer;\\n font-size: 12px;\\n background-color: #fff;\\n border: 1px solid #ccc;\\n border-radius: 4px;\\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\\n}\\n.bk-root .bk-menu.bk-above {\\n bottom: 100%;\\n}\\n.bk-root .bk-menu.bk-below {\\n top: 100%;\\n}\\n.bk-root .bk-menu > .bk-divider {\\n height: 1px;\\n margin: 7.5px 0;\\n overflow: hidden;\\n background-color: #e5e5e5;\\n}\\n.bk-root .bk-menu > :not(.bk-divider) {\\n padding: 6px 12px;\\n}\\n.bk-root .bk-menu > :not(.bk-divider):hover,\\n.bk-root .bk-menu > :not(.bk-divider).bk-active {\\n background-color: #e6e6e6;\\n}\\n.bk-root .bk-caret {\\n display: inline-block;\\n vertical-align: middle;\\n width: 0;\\n height: 0;\\n margin: 0 5px;\\n}\\n.bk-root .bk-caret.bk-down {\\n border-top: 4px solid;\\n}\\n.bk-root .bk-caret.bk-up {\\n border-bottom: 4px solid;\\n}\\n.bk-root .bk-caret.bk-down,\\n.bk-root .bk-caret.bk-up {\\n border-right: 4px solid transparent;\\n border-left: 4px solid transparent;\\n}\\n.bk-root .bk-caret.bk-left {\\n border-right: 4px solid;\\n}\\n.bk-root .bk-caret.bk-right {\\n border-left: 4px solid;\\n}\\n.bk-root .bk-caret.bk-left,\\n.bk-root .bk-caret.bk-right {\\n border-top: 4px solid transparent;\\n border-bottom: 4px solid transparent;\\n}\\n\"),r.bk_menu=\"bk-menu\",r.bk_caret=\"bk-caret\",r.bk_divider=\"bk-divider\"},\n", | |
" function _(t,i,n){var e=t(113),o=t(340),_=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i}(o.ColumnView);n.WidgetBoxView=_,_.__name__=\"WidgetBoxView\";var u=function(t){function i(i){return t.call(this,i)||this}return e.__extends(i,t),i.init_WidgetBox=function(){this.prototype.default_view=_},i}(o.Column);n.WidgetBox=u,u.__name__=\"WidgetBox\",u.init_WidgetBox()},\n", | |
" function _(r,a,o){var p=r(351);o.CategoricalColorMapper=p.CategoricalColorMapper;var e=r(353);o.CategoricalMarkerMapper=e.CategoricalMarkerMapper;var C=r(354);o.CategoricalPatternMapper=C.CategoricalPatternMapper;var l=r(211);o.ContinuousColorMapper=l.ContinuousColorMapper;var M=r(212);o.ColorMapper=M.ColorMapper;var t=r(210);o.LinearColorMapper=t.LinearColorMapper;var i=r(355);o.LogColorMapper=i.LogColorMapper},\n", | |
" function _(t,r,o){var a=t(113),e=t(352),n=t(212),i=t(121),c=function(t){function r(r){return t.call(this,r)||this}return a.__extends(r,t),r.init_CategoricalColorMapper=function(){this.define({factors:[i.Array],start:[i.Number,0],end:[i.Number]})},r.prototype._v_compute=function(t,r,o,a){var n=a.nan_color;e.cat_v_compute(t,this.factors,o,r,this.start,this.end,n)},r}(n.ColorMapper);o.CategoricalColorMapper=c,c.__name__=\"CategoricalColorMapper\",c.init_CategoricalColorMapper()},\n", | |
" function _(n,t,e){var i=n(114),l=n(109);function r(n,t){if(n.length!=t.length)return!1;for(var e=0,i=n.length;e<i;e++)if(n[e]!==t[e])return!1;return!0}e._cat_equals=r,e.cat_v_compute=function(n,t,e,u,f,o,c){for(var a=function(a,v){var _=n[a],g=void 0;l.isString(_)?g=i.index_of(t,_):(null!=f?_=null!=o?_.slice(f,o):_.slice(f):null!=o&&(_=_.slice(0,o)),g=1==_.length?i.index_of(t,_[0]):i.find_index(t,function(n){return r(n,_)}));var d=void 0;d=g<0||g>=e.length?c:e[g],u[a]=d},v=0,_=n.length;v<_;v++)a(v)}},\n", | |
" function _(r,e,t){var a=r(113),i=r(352),n=r(213),c=r(121),u=function(r){function e(e){return r.call(this,e)||this}return a.__extends(e,r),e.init_CategoricalMarkerMapper=function(){this.define({factors:[c.Array],markers:[c.Array],start:[c.Number,0],end:[c.Number],default_value:[c.MarkerType,\"circle\"]})},e.prototype.v_compute=function(r){var e=new Array(r.length);return i.cat_v_compute(r,this.factors,this.markers,e,this.start,this.end,this.default_value),e},e}(n.Mapper);t.CategoricalMarkerMapper=u,u.__name__=\"CategoricalMarkerMapper\",u.init_CategoricalMarkerMapper()},\n", | |
" function _(t,e,a){var r=t(113),n=t(352),i=t(213),p=t(121),c=function(t){function e(e){return t.call(this,e)||this}return r.__extends(e,t),e.init_CategoricalPatternMapper=function(){this.define({factors:[p.Array],patterns:[p.Array],start:[p.Number,0],end:[p.Number],default_value:[p.HatchPatternType,\" \"]})},e.prototype.v_compute=function(t){var e=new Array(t.length);return n.cat_v_compute(t,this.factors,this.patterns,e,this.start,this.end,this.default_value),e},e}(i.Mapper);a.CategoricalPatternMapper=c,c.__name__=\"CategoricalPatternMapper\",c.init_CategoricalPatternMapper()},\n", | |
" function _(o,l,n){var t=o(113),e=o(211),r=o(114),i=null!=Math.log1p?Math.log1p:function(o){return Math.log(1+o)},h=function(o){function l(l){return o.call(this,l)||this}return t.__extends(l,o),l.prototype._v_compute=function(o,l,n,t){for(var e=t.nan_color,h=t.low_color,a=t.high_color,u=n.length,s=null!=this.low?this.low:r.min(o),_=null!=this.high?this.high:r.max(o),f=u/(i(_)-i(s)),g=n.length-1,p=0,c=o.length;p<c;p++){var M=o[p];if(isNaN(M))l[p]=e;else if(M>_)l[p]=null!=a?a:n[g];else if(M!=_)if(M<s)l[p]=null!=h?h:n[0];else{var v=i(M)-i(s),m=Math.floor(v*f);m>g&&(m=g),l[p]=n[m]}else l[p]=n[g]}},l}(e.ContinuousColorMapper);n.LogColorMapper=h,h.__name__=\"LogColorMapper\"},\n", | |
" function _(r,a,t){!function(r){for(var a in r)t.hasOwnProperty(a)||(t[a]=r[a])}(r(357));var n=r(358);t.Marker=n.Marker;var e=r(359);t.Scatter=e.Scatter},\n", | |
" function _(e,t,o){var i=e(113),r=e(358),n=Math.sqrt(3);function s(e,t){e.moveTo(-t,t),e.lineTo(t,-t),e.moveTo(-t,-t),e.lineTo(t,t)}function c(e,t){e.moveTo(0,t),e.lineTo(0,-t),e.moveTo(-t,0),e.lineTo(t,0)}function l(e,t){e.moveTo(0,t),e.lineTo(t/1.5,0),e.lineTo(0,-t),e.lineTo(-t/1.5,0),e.closePath()}function a(e,t){var o=t*n,i=o/3;e.moveTo(-t,i),e.lineTo(t,i),e.lineTo(0,i-o),e.closePath()}function u(e,t,o,i,r){var n=.65*o;c(e,o),s(e,n),i.doit&&(i.set_vectorize(e,t),e.stroke())}function v(e,t,o,i,r){e.arc(0,0,o,0,2*Math.PI,!1),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),c(e,o),e.stroke())}function _(e,t,o,i,r){e.arc(0,0,o,0,2*Math.PI,!1),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),s(e,o),e.stroke())}function d(e,t,o,i,r){c(e,o),i.doit&&(i.set_vectorize(e,t),e.stroke())}function f(e,t,o,i,r){l(e,o),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),e.stroke())}function T(e,t,o,i,r){l(e,o),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),c(e,o),e.stroke())}function z(e,t,o,i,r){!function(e,t){var o=t/2,i=n*o;e.moveTo(t,0),e.lineTo(o,-i),e.lineTo(-o,-i),e.lineTo(-t,0),e.lineTo(-o,i),e.lineTo(o,i),e.closePath()}(e,o),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),e.stroke())}function k(e,t,o,i,r){e.rotate(Math.PI),a(e,o),e.rotate(-Math.PI),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),e.stroke())}function h(e,t,o,i,r){var n=2*o;e.rect(-o,-o,n,n),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),e.stroke())}function m(e,t,o,i,r){var n=2*o;e.rect(-o,-o,n,n),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),c(e,o),e.stroke())}function C(e,t,o,i,r){var n=2*o;e.rect(-o,-o,n,n),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),s(e,o),e.stroke())}function q(e,t,o,i,r){a(e,o),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),e.stroke())}function p(e,t,o,i,r){!function(e,t){e.moveTo(-t,0),e.lineTo(t,0)}(e,o),i.doit&&(i.set_vectorize(e,t),e.stroke())}function x(e,t,o,i,r){s(e,o),i.doit&&(i.set_vectorize(e,t),e.stroke())}function M(e,t){var o,n=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(o,e),o.initClass=function(){this.prototype._render_one=t},o}(r.MarkerView);n.initClass();var s=((o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.initClass=function(){this.prototype.default_view=n},t}(r.Marker)).__name__=e,o);return s.initClass(),s}o.Asterisk=M(\"Asterisk\",u),o.CircleCross=M(\"CircleCross\",v),o.CircleX=M(\"CircleX\",_),o.Cross=M(\"Cross\",d),o.Dash=M(\"Dash\",p),o.Diamond=M(\"Diamond\",f),o.DiamondCross=M(\"DiamondCross\",T),o.Hex=M(\"Hex\",z),o.InvertedTriangle=M(\"InvertedTriangle\",k),o.Square=M(\"Square\",h),o.SquareCross=M(\"SquareCross\",m),o.SquareX=M(\"SquareX\",C),o.Triangle=M(\"Triangle\",q),o.X=M(\"X\",x),o.marker_funcs={asterisk:u,circle:function(e,t,o,i,r){e.arc(0,0,o,0,2*Math.PI,!1),r.doit&&(r.set_vectorize(e,t),e.fill()),i.doit&&(i.set_vectorize(e,t),e.stroke())},circle_cross:v,circle_x:_,cross:d,diamond:f,diamond_cross:T,hex:z,inverted_triangle:k,square:h,square_cross:m,square_x:C,triangle:q,dash:p,x:x}},\n", | |
" function _(e,t,r){var i=e(113),s=e(178),n=e(183),a=e(121),_=e(110),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype._render=function(e,t,r){for(var i=r.sx,s=r.sy,n=r._size,a=r._angle,_=0,h=t;_<h.length;_++){var x=h[_];if(!isNaN(i[x]+s[x]+n[x]+a[x])){var o=n[x]/2;e.beginPath(),e.translate(i[x],s[x]),a[x]&&e.rotate(a[x]),this._render_one(e,x,o,this.visuals.line,this.visuals.fill),a[x]&&e.rotate(-a[x]),e.translate(-i[x],-s[x])}}},t.prototype._mask_data=function(){var e=this.renderer.plot_view.frame.bbox.h_range,t=e.start-this.max_size,r=e.end+this.max_size,i=this.renderer.xscale.r_invert(t,r),s=i[0],n=i[1],a=this.renderer.plot_view.frame.bbox.v_range,_=a.start-this.max_size,h=a.end+this.max_size,x=this.renderer.yscale.r_invert(_,h),o=x[0],y=x[1];return this.index.indices({x0:s,x1:n,y0:o,y1:y})},t.prototype._hit_point=function(e){for(var t=e.sx,r=e.sy,i=t-this.max_size,s=t+this.max_size,a=this.renderer.xscale.r_invert(i,s),_=a[0],h=a[1],x=r-this.max_size,o=r+this.max_size,y=this.renderer.yscale.r_invert(x,o),l=y[0],c=y[1],d=[],u=0,v=this.index.indices({x0:_,x1:h,y0:l,y1:c});u<v.length;u++){var p=v[u],f=this._size[p]/2,m=Math.abs(this.sx[p]-t)+Math.abs(this.sy[p]-r);Math.abs(this.sx[p]-t)<=f&&Math.abs(this.sy[p]-r)<=f&&d.push([p,m])}return n.create_hit_test_result_from_hits(d)},t.prototype._hit_span=function(e){var t,r,i,s,a,_,h=e.sx,x=e.sy,o=this.bounds(),y=this.max_size/2,l=n.create_empty_hit_test_result();if(\"h\"==e.direction){a=o.y0,_=o.y1;var c=h-y,d=h+y;i=(t=this.renderer.xscale.r_invert(c,d))[0],s=t[1]}else{i=o.x0,s=o.x1;var u=x-y,v=x+y;a=(r=this.renderer.yscale.r_invert(u,v))[0],_=r[1]}var p=this.index.indices({x0:i,x1:s,y0:a,y1:_});return l.indices=p,l},t.prototype._hit_rect=function(e){var t=e.sx0,r=e.sx1,i=e.sy0,s=e.sy1,a=this.renderer.xscale.r_invert(t,r),_=a[0],h=a[1],x=this.renderer.yscale.r_invert(i,s),o=x[0],y=x[1],l=n.create_empty_hit_test_result();return l.indices=this.index.indices({x0:_,x1:h,y0:o,y1:y}),l},t.prototype._hit_poly=function(e){for(var t=e.sx,r=e.sy,i=_.range(0,this.sx.length),s=[],a=0,h=i.length;a<h;a++){var x=i[a];n.point_in_poly(this.sx[a],this.sy[a],t,r)&&s.push(x)}var o=n.create_empty_hit_test_result();return o.indices=s,o},t.prototype.draw_legend_for_index=function(e,t,r){var i=t.x0,s=t.x1,n=t.y0,a=t.y1,_=r+1,h=new Array(_);h[r]=(i+s)/2;var x=new Array(_);x[r]=(n+a)/2;var o=new Array(_);o[r]=.4*Math.min(Math.abs(s-i),Math.abs(a-n));var y=new Array(_);y[r]=0,this._render(e,[r],{sx:h,sy:x,_size:o,_angle:y})},t}(s.XYGlyphView);r.MarkerView=h,h.__name__=\"MarkerView\";var x=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_Marker=function(){this.mixins([\"line\",\"fill\"]),this.define({size:[a.DistanceSpec,{units:\"screen\",value:4}],angle:[a.AngleSpec,0]})},t}(s.XYGlyph);r.Marker=x,x.__name__=\"Marker\",x.init_Marker()},\n", | |
" function _(r,e,t){var a=r(113),n=r(358),i=r(357),_=r(121),s=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return a.__extends(e,r),e.prototype._render=function(r,e,t){for(var a=t.sx,n=t.sy,_=t._size,s=t._angle,l=t._marker,c=0,u=e;c<u.length;c++){var o=u[c];if(!isNaN(a[o]+n[o]+_[o]+s[o])&&null!=l[o]){var f=_[o]/2;r.beginPath(),r.translate(a[o],n[o]),s[o]&&r.rotate(s[o]),i.marker_funcs[l[o]](r,o,f,this.visuals.line,this.visuals.fill),s[o]&&r.rotate(-s[o]),r.translate(-a[o],-n[o])}}},e.prototype.draw_legend_for_index=function(r,e,t){var a=e.x0,n=e.x1,i=e.y0,_=e.y1,s=t+1,l=new Array(s);l[t]=(a+n)/2;var c=new Array(s);c[t]=(i+_)/2;var u=new Array(s);u[t]=.4*Math.min(Math.abs(n-a),Math.abs(_-i));var o=new Array(s);o[t]=0;var f=new Array(s);f[t]=this._marker[t],this._render(r,[t],{sx:l,sy:c,_size:u,_angle:o,_marker:f})},e}(n.MarkerView);t.ScatterView=s,s.__name__=\"ScatterView\";var l=function(r){function e(e){return r.call(this,e)||this}return a.__extends(e,r),e.init_Scatter=function(){this.prototype.default_view=s,this.define({marker:[_.MarkerSpec,{value:\"circle\"}]})},e}(n.Marker);t.Scatter=l,l.__name__=\"Scatter\",l.init_Scatter()},\n", | |
" function _(a,p,o){var t=a(361);o.MapOptions=t.MapOptions;var n=a(361);o.GMapOptions=n.GMapOptions;var M=a(361);o.GMapPlot=M.GMapPlot;var i=a(362);o.Plot=i.Plot},\n", | |
" function _(t,n,i){var e=t(113),o=t(167),a=t(362),r=t(121),p=t(166),s=t(225),_=t(382);i.GMapPlotView=_.GMapPlotView;var l=function(t){function n(n){return t.call(this,n)||this}return e.__extends(n,t),n.init_MapOptions=function(){this.define({lat:[r.Number],lng:[r.Number],zoom:[r.Number,12]})},n}(p.Model);i.MapOptions=l,l.__name__=\"MapOptions\",l.init_MapOptions();var u=function(t){function n(n){return t.call(this,n)||this}return e.__extends(n,t),n.init_GMapOptions=function(){this.define({map_type:[r.String,\"roadmap\"],scale_control:[r.Boolean,!1],styles:[r.String],tilt:[r.Int,45]})},n}(l);i.GMapOptions=u,u.__name__=\"GMapOptions\",u.init_GMapOptions();var c=function(t){function n(n){return t.call(this,n)||this}return e.__extends(n,t),n.init_GMapPlot=function(){this.prototype.default_view=_.GMapPlotView,this.define({map_options:[r.Instance],api_key:[r.String]}),this.override({x_range:function(){return new s.Range1d},y_range:function(){return new s.Range1d}})},n.prototype.initialize=function(){t.prototype.initialize.call(this),this.use_map=!0,this.api_key||o.logger.error(\"api_key is required. See https://developers.google.com/maps/documentation/javascript/get-api-key for more information on how to obtain your own.\")},n}(a.Plot);i.GMapPlot=c,c.__name__=\"GMapPlot\",c.init_GMapPlot()},\n", | |
" function _(t,e,r){var n=t(113),o=t(121),i=t(116),a=t(110),l=t(125),u=t(109),s=t(339),c=t(236),h=t(215),_=t(363),d=t(170),f=t(175),b=t(280),p=t(375);r.PlotView=p.PlotView;var g=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_Plot=function(){this.prototype.default_view=p.PlotView,this.mixins([\"line:outline_\",\"fill:background_\",\"fill:border_\"]),this.define({toolbar:[o.Instance,function(){return new _.Toolbar}],toolbar_location:[o.Location,\"right\"],toolbar_sticky:[o.Boolean,!0],plot_width:[o.Number,600],plot_height:[o.Number,600],frame_width:[o.Number,null],frame_height:[o.Number,null],title:[o.Any,function(){return new c.Title({text:\"\"})}],title_location:[o.Location,\"above\"],above:[o.Array,[]],below:[o.Array,[]],left:[o.Array,[]],right:[o.Array,[]],center:[o.Array,[]],renderers:[o.Array,[]],x_range:[o.Instance,function(){return new b.DataRange1d}],extra_x_ranges:[o.Any,{}],y_range:[o.Instance,function(){return new b.DataRange1d}],extra_y_ranges:[o.Any,{}],x_scale:[o.Instance,function(){return new h.LinearScale}],y_scale:[o.Instance,function(){return new h.LinearScale}],lod_factor:[o.Number,10],lod_interval:[o.Number,300],lod_threshold:[o.Number,2e3],lod_timeout:[o.Number,500],hidpi:[o.Boolean,!0],output_backend:[o.OutputBackend,\"canvas\"],min_border:[o.Number,5],min_border_top:[o.Number,null],min_border_left:[o.Number,null],min_border_bottom:[o.Number,null],min_border_right:[o.Number,null],inner_width:[o.Number],inner_height:[o.Number],outer_width:[o.Number],outer_height:[o.Number],match_aspect:[o.Boolean,!1],aspect_scale:[o.Number,1],reset_policy:[o.ResetPolicy,\"standard\"]}),this.override({outline_line_color:\"#e5e5e5\",border_fill_color:\"#ffffff\",background_fill_color:\"#ffffff\"})},Object.defineProperty(e.prototype,\"width\",{get:function(){var t=this.getv(\"width\");return null!=t?t:this.plot_width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"height\",{get:function(){var t=this.getv(\"height\");return null!=t?t:this.plot_height},enumerable:!0,configurable:!0}),e.prototype._doc_attached=function(){t.prototype._doc_attached.call(this),this._tell_document_about_change(\"inner_height\",null,this.inner_height,{}),this._tell_document_about_change(\"inner_width\",null,this.inner_width,{})},e.prototype.initialize=function(){t.prototype.initialize.call(this),this.reset=new i.Signal0(this,\"reset\");for(var e=0,r=l.values(this.extra_x_ranges).concat(this.x_range);e<r.length;e++){var n=r[e],o=n.plots;u.isArray(o)&&(o=o.concat(this),n.setv({plots:o},{silent:!0}))}for(var a=0,s=l.values(this.extra_y_ranges).concat(this.y_range);a<s.length;a++){var c=s[a];o=c.plots;u.isArray(o)&&(o=o.concat(this),c.setv({plots:o},{silent:!0}))}},e.prototype.add_layout=function(t,e){void 0===e&&(e=\"center\"),this.getv(e).push(t)},e.prototype.remove_layout=function(t){var e=function(e){a.remove_by(e,function(e){return e==t})};e(this.left),e(this.right),e(this.above),e(this.below),e(this.center)},e.prototype.add_renderers=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.renderers=this.renderers.concat(t)},e.prototype.add_glyph=function(t,e,r){void 0===e&&(e=new d.ColumnDataSource),void 0===r&&(r={});var n=Object.assign(Object.assign({},r),{data_source:e,glyph:t}),o=new f.GlyphRenderer(n);return this.add_renderers(o),o},e.prototype.add_tools=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.toolbar.tools=this.toolbar.tools.concat(t)},Object.defineProperty(e.prototype,\"panels\",{get:function(){return this.side_panels.concat(this.center)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"side_panels\",{get:function(){var t=this.above,e=this.below,r=this.left,n=this.right;return a.concat([t,e,r,n])},enumerable:!0,configurable:!0}),e}(s.LayoutDOM);r.Plot=g,g.__name__=\"Plot\",g.init_Plot()},\n", | |
" function _(t,i,e){var n=t(113),s=t(121),o=t(109),a=t(110),c=t(364),r=t(369),l=function(t){switch(t){case\"tap\":return\"active_tap\";case\"pan\":return\"active_drag\";case\"pinch\":case\"scroll\":return\"active_scroll\";case\"multi\":return\"active_multi\"}return null},h=function(t){return\"tap\"==t||\"pan\"==t},u=function(t){function i(i){return t.call(this,i)||this}return n.__extends(i,t),i.init_Toolbar=function(){this.prototype.default_view=r.ToolbarBaseView,this.define({active_drag:[s.Any,\"auto\"],active_inspect:[s.Any,\"auto\"],active_scroll:[s.Any,\"auto\"],active_tap:[s.Any,\"auto\"],active_multi:[s.Any,null]})},i.prototype.connect_signals=function(){var i=this;t.prototype.connect_signals.call(this),this.connect(this.properties.tools.change,function(){return i._init_tools()})},i.prototype._init_tools=function(){var i=this;if(t.prototype._init_tools.call(this),\"auto\"==this.active_inspect);else if(this.active_inspect instanceof c.InspectTool){for(var e=!1,n=0,s=this.inspectors;n<s.length;n++){(_=s[n])!=this.active_inspect?_.active=!1:e=!0}e||(this.active_inspect=null)}else if(o.isArray(this.active_inspect)){var r=a.intersection(this.active_inspect,this.inspectors);r.length!=this.active_inspect.length&&(this.active_inspect=r);for(var u=0,v=this.inspectors;u<v.length;u++){var _=v[u];a.includes(this.active_inspect,_)||(_.active=!1)}}else if(null==this.active_inspect)for(var p=0,f=this.inspectors;p<f.length;p++){(_=f[p]).active=!1}var g=function(t){t.active?i._active_change(t):t.active=!0};for(var y in this.gestures){(m=this.gestures[y]).tools=a.sort_by(m.tools,function(t){return t.default_order});for(var d=0,b=m.tools;d<b.length;d++){var T=b[d];this.connect(T.properties.active.change,this._active_change.bind(this,T))}}for(var y in this.gestures){var A=l(y);if(A){var m,w=this[A];if(\"auto\"==w)0!=(m=this.gestures[y]).tools.length&&h(y)&&g(m.tools[0]);else null!=w&&(a.includes(this.tools,w)?g(w):this[A]=null)}}},i}(r.ToolbarBase);e.Toolbar=u,u.__name__=\"Toolbar\",u.init_Toolbar()},\n", | |
" function _(t,n,e){var o=t(113),i=t(365),_=t(368),l=t(121),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(n,t),n}(i.ButtonToolView);e.InspectToolView=s,s.__name__=\"InspectToolView\";var u=function(t){function n(n){var e=t.call(this,n)||this;return e.event_type=\"move\",e}return o.__extends(n,t),n.init_InspectTool=function(){this.prototype.button_view=_.OnOffButtonView,this.define({toggleable:[l.Boolean,!0]}),this.override({active:!0})},n}(i.ButtonTool);e.InspectTool=u,u.__name__=\"InspectTool\",u.init_InspectTool()},\n", | |
" function _(t,n,e){var o=t(113),i=t(161),r=t(366),l=t(163),u=t(121),s=t(127),c=t(109),a=t(367),_=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(n,t),n.prototype.initialize=function(){var n=this;t.prototype.initialize.call(this),this.connect(this.model.change,function(){return n.render()}),this.el.addEventListener(\"click\",function(){return n._clicked()}),this.render()},n.prototype.css_classes=function(){return t.prototype.css_classes.call(this).concat(a.bk_toolbar_button)},n.prototype.render=function(){l.empty(this.el);var t=this.model.computed_icon;c.isString(t)&&(s.startsWith(t,\"data:image\")?this.el.style.backgroundImage=\"url('\"+t+\"')\":this.el.classList.add(t)),this.el.title=this.model.tooltip},n}(i.DOMView);e.ButtonToolButtonView=_,_.__name__=\"ButtonToolButtonView\";var p=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(n,t),n}(r.ToolView);e.ButtonToolView=p,p.__name__=\"ButtonToolView\";var h=function(t){function n(n){return t.call(this,n)||this}return o.__extends(n,t),n.init_ButtonTool=function(){this.internal({disabled:[u.Boolean,!1]})},Object.defineProperty(n.prototype,\"tooltip\",{get:function(){return this.tool_name},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"computed_icon\",{get:function(){return this.icon},enumerable:!0,configurable:!0}),n}(r.Tool);e.ButtonTool=h,h.__name__=\"ButtonTool\",h.init_ButtonTool()},\n", | |
" function _(t,e,n){var o=t(113),i=t(121),r=t(162),a=t(110),c=t(166),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(e,t),Object.defineProperty(e.prototype,\"plot_view\",{get:function(){return this.parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"plot_model\",{get:function(){return this.parent.model},enumerable:!0,configurable:!0}),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.active.change,function(){e.model.active?e.activate():e.deactivate()})},e.prototype.activate=function(){},e.prototype.deactivate=function(){},e}(r.View);n.ToolView=u,u.__name__=\"ToolView\";var l=function(t){function e(e){return t.call(this,e)||this}return o.__extends(e,t),e.init_Tool=function(){this.internal({active:[i.Boolean,!1]})},Object.defineProperty(e.prototype,\"synthetic_renderers\",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype._get_dim_tooltip=function(t,e){switch(e){case\"width\":return t+\" (x-axis)\";case\"height\":return t+\" (y-axis)\";case\"both\":return t}},e.prototype._get_dim_limits=function(t,e,n,o){var i,r=t[0],c=t[1],u=e[0],l=e[1],s=n.bbox.h_range;\"width\"==o||\"both\"==o?(i=[a.min([r,u]),a.max([r,u])],i=[a.max([i[0],s.start]),a.min([i[1],s.end])]):i=[s.start,s.end];var p,_=n.bbox.v_range;return\"height\"==o||\"both\"==o?(p=[a.min([c,l]),a.max([c,l])],p=[a.max([p[0],_.start]),a.min([p[1],_.end])]):p=[_.start,_.end],[i,p]},e}(c.Model);n.Tool=l,l.__name__=\"Tool\",l.init_Tool()},\n", | |
" function _(o,b,t){o(164),o(163).styles.append('.bk-root .bk-toolbar-hidden {\\n visibility: hidden;\\n opacity: 0;\\n transition: visibility 0.3s linear, opacity 0.3s linear;\\n}\\n.bk-root .bk-toolbar,\\n.bk-root .bk-button-bar {\\n display: flex;\\n display: -webkit-flex;\\n flex-wrap: nowrap;\\n -webkit-flex-wrap: nowrap;\\n align-items: center;\\n -webkit-align-items: center;\\n user-select: none;\\n -ms-user-select: none;\\n -moz-user-select: none;\\n -webkit-user-select: none;\\n}\\n.bk-root .bk-toolbar .bk-logo {\\n flex-shrink: 0;\\n -webkit-flex-shrink: 0;\\n}\\n.bk-root .bk-toolbar.bk-above,\\n.bk-root .bk-toolbar.bk-below {\\n flex-direction: row;\\n -webkit-flex-direction: row;\\n justify-content: flex-end;\\n -webkit-justify-content: flex-end;\\n}\\n.bk-root .bk-toolbar.bk-above .bk-button-bar,\\n.bk-root .bk-toolbar.bk-below .bk-button-bar {\\n display: flex;\\n display: -webkit-flex;\\n flex-direction: row;\\n -webkit-flex-direction: row;\\n}\\n.bk-root .bk-toolbar.bk-above .bk-logo,\\n.bk-root .bk-toolbar.bk-below .bk-logo {\\n order: 1;\\n -webkit-order: 1;\\n margin-left: 5px;\\n margin-right: 0px;\\n}\\n.bk-root .bk-toolbar.bk-left,\\n.bk-root .bk-toolbar.bk-right {\\n flex-direction: column;\\n -webkit-flex-direction: column;\\n justify-content: flex-start;\\n -webkit-justify-content: flex-start;\\n}\\n.bk-root .bk-toolbar.bk-left .bk-button-bar,\\n.bk-root .bk-toolbar.bk-right .bk-button-bar {\\n display: flex;\\n display: -webkit-flex;\\n flex-direction: column;\\n -webkit-flex-direction: column;\\n}\\n.bk-root .bk-toolbar.bk-left .bk-logo,\\n.bk-root .bk-toolbar.bk-right .bk-logo {\\n order: 0;\\n -webkit-order: 0;\\n margin-bottom: 5px;\\n margin-top: 0px;\\n}\\n.bk-root .bk-toolbar-button {\\n width: 30px;\\n height: 30px;\\n background-size: 60%;\\n background-color: transparent;\\n background-repeat: no-repeat;\\n background-position: center center;\\n}\\n.bk-root .bk-toolbar-button:hover {\\n background-color: #f9f9f9;\\n}\\n.bk-root .bk-toolbar-button:focus {\\n outline: none;\\n}\\n.bk-root .bk-toolbar-button::-moz-focus-inner {\\n border: 0;\\n}\\n.bk-root .bk-toolbar.bk-above .bk-toolbar-button {\\n border-bottom: 2px solid transparent;\\n}\\n.bk-root .bk-toolbar.bk-above .bk-toolbar-button.bk-active {\\n border-bottom-color: #26aae1;\\n}\\n.bk-root .bk-toolbar.bk-below .bk-toolbar-button {\\n border-top: 2px solid transparent;\\n}\\n.bk-root .bk-toolbar.bk-below .bk-toolbar-button.bk-active {\\n border-top-color: #26aae1;\\n}\\n.bk-root .bk-toolbar.bk-right .bk-toolbar-button {\\n border-left: 2px solid transparent;\\n}\\n.bk-root .bk-toolbar.bk-right .bk-toolbar-button.bk-active {\\n border-left-color: #26aae1;\\n}\\n.bk-root .bk-toolbar.bk-left .bk-toolbar-button {\\n border-right: 2px solid transparent;\\n}\\n.bk-root .bk-toolbar.bk-left .bk-toolbar-button.bk-active {\\n border-right-color: #26aae1;\\n}\\n.bk-root .bk-button-bar + .bk-button-bar:before {\\n content: \" \";\\n display: inline-block;\\n background-color: lightgray;\\n}\\n.bk-root .bk-toolbar.bk-above .bk-button-bar + .bk-button-bar:before,\\n.bk-root .bk-toolbar.bk-below .bk-button-bar + .bk-button-bar:before {\\n height: 10px;\\n width: 1px;\\n}\\n.bk-root .bk-toolbar.bk-left .bk-button-bar + .bk-button-bar:before,\\n.bk-root .bk-toolbar.bk-right .bk-button-bar + .bk-button-bar:before {\\n height: 1px;\\n width: 10px;\\n}\\n'),t.bk_toolbar=\"bk-toolbar\",t.bk_toolbar_hidden=\"bk-toolbar-hidden\",t.bk_toolbar_button=\"bk-toolbar-button\",t.bk_button_bar=\"bk-button-bar\",t.bk_toolbar_button_custom_action=\"bk-toolbar-button-custom-action\"},\n", | |
" function _(t,e,i){var n=t(113),o=t(365),c=t(240),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.render=function(){t.prototype.render.call(this),this.model.active?this.el.classList.add(c.bk_active):this.el.classList.remove(c.bk_active)},e.prototype._clicked=function(){var t=this.model.active;this.model.active=!t},e}(o.ButtonToolButtonView);i.OnOffButtonView=s,s.__name__=\"OnOffButtonView\"},\n", | |
" function _(t,o,e){var i=t(113),l=t(167),n=t(163),s=t(194),r=t(121),a=t(161),u=t(110),c=t(117),_=t(109),h=t(166),p=t(370),v=t(371),d=t(372),b=t(364),f=t(367),g=t(374),y=t(240),m=function(t){function o(o){return t.call(this,o)||this}return i.__extends(o,t),o.init_ToolbarViewModel=function(){this.define({_visible:[r.Any,null],autohide:[r.Boolean,!1]})},Object.defineProperty(o.prototype,\"visible\",{get:function(){return!this.autohide||null!=this._visible&&this._visible},enumerable:!0,configurable:!0}),o}(h.Model);e.ToolbarViewModel=m,m.__name__=\"ToolbarViewModel\",m.init_ToolbarViewModel();var w=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(o,t),o.prototype.initialize=function(){t.prototype.initialize.call(this),this._tool_button_views={},this._build_tool_button_views(),this._toolbar_view_model=new m({autohide:this.model.autohide})},o.prototype.connect_signals=function(){var o=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.tools.change,function(){o._build_tool_button_views(),o.render()}),this.connect(this.model.properties.autohide.change,function(){o._toolbar_view_model.autohide=o.model.autohide,o._on_visible_change()}),this.connect(this._toolbar_view_model.properties._visible.change,function(){return o._on_visible_change()})},o.prototype.remove=function(){s.remove_views(this._tool_button_views),t.prototype.remove.call(this)},o.prototype._build_tool_button_views=function(){var t=null!=this.model._proxied_tools?this.model._proxied_tools:this.model.tools;s.build_views(this._tool_button_views,t,{parent:this},function(t){return t.button_view})},o.prototype.set_visibility=function(t){t!=this._toolbar_view_model._visible&&(this._toolbar_view_model._visible=t)},o.prototype._on_visible_change=function(){var t=this._toolbar_view_model.visible,o=f.bk_toolbar_hidden;this.el.classList.contains(o)&&t?this.el.classList.remove(o):t||this.el.classList.add(o)},o.prototype.render=function(){var t=this;if(n.empty(this.el),this.el.classList.add(f.bk_toolbar),this.el.classList.add(y.bk_side(this.model.toolbar_location)),this._toolbar_view_model.autohide=this.model.autohide,this._on_visible_change(),null!=this.model.logo){var o=\"grey\"===this.model.logo?g.bk_grey:null,e=n.a({href:\"https://bokeh.org/\",target:\"_blank\",class:[g.bk_logo,g.bk_logo_small,o]});this.el.appendChild(e)}var i=[],l=function(o){return t._tool_button_views[o.id].el},s=this.model.gestures;for(var r in s)i.push(s[r].tools.map(l));i.push(this.model.actions.map(l)),i.push(this.model.inspectors.filter(function(t){return t.toggleable}).map(l)),i.push(this.model.help.map(l));for(var a=0,u=i;a<u.length;a++){var c=u[a];if(0!==c.length){var _=n.div({class:f.bk_button_bar},c);this.el.appendChild(_)}}},o.prototype.update_layout=function(){},o.prototype.update_position=function(){},o.prototype.after_layout=function(){this._has_finished=!0},o}(a.DOMView);function T(){return{pan:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},press:{tools:[],active:null},pressup:{tools:[],active:null},rotate:{tools:[],active:null},move:{tools:[],active:null},multi:{tools:[],active:null}}}e.ToolbarBaseView=w,w.__name__=\"ToolbarBaseView\";var k=function(t){function o(o){return t.call(this,o)||this}return i.__extends(o,t),o.init_ToolbarBase=function(){this.prototype.default_view=w,this.define({tools:[r.Array,[]],logo:[r.Logo,\"normal\"],autohide:[r.Boolean,!1]}),this.internal({gestures:[r.Any,T],actions:[r.Array,[]],inspectors:[r.Array,[]],help:[r.Array,[]],toolbar_location:[r.Location,\"right\"]})},o.prototype.initialize=function(){t.prototype.initialize.call(this),this._init_tools()},o.prototype._init_tools=function(){var t=this,o=function(t,o){if(t.length!=o.length)return!0;var e=new c.Set(o.map(function(t){return t.id}));return u.some(t,function(t){return!e.has(t.id)})},e=this.tools.filter(function(t){return t instanceof b.InspectTool});o(this.inspectors,e)&&(this.inspectors=e);var i=this.tools.filter(function(t){return t instanceof d.HelpTool});o(this.help,i)&&(this.help=i);var n=this.tools.filter(function(t){return t instanceof v.ActionTool});o(this.actions,n)&&(this.actions=n);for(var s=function(o,e){o in t.gestures||l.logger.warn(\"Toolbar: unknown event type '\"+o+\"' for tool: \"+e.type+\" (\"+e.id+\")\")},r={pan:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},press:{tools:[],active:null},pressup:{tools:[],active:null},rotate:{tools:[],active:null},move:{tools:[],active:null},multi:{tools:[],active:null}},a=0,h=this.tools;a<h.length;a++){var f=h[a];if(f instanceof p.GestureTool&&f.event_type)if(_.isString(f.event_type))r[f.event_type].tools.push(f),s(f.event_type,f);else{r.multi.tools.push(f);for(var g=0,y=f.event_type;g<y.length;g++){s(y[g],f)}}}for(var m=function(t){var e=w.gestures[t];o(e.tools,r[t].tools)&&(e.tools=r[t].tools),e.active&&u.every(e.tools,function(t){return t.id!=e.active.id})&&(e.active=null)},w=this,T=0,k=Object.keys(r);T<k.length;T++){m(k[T])}},Object.defineProperty(o.prototype,\"horizontal\",{get:function(){return\"above\"===this.toolbar_location||\"below\"===this.toolbar_location},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,\"vertical\",{get:function(){return\"left\"===this.toolbar_location||\"right\"===this.toolbar_location},enumerable:!0,configurable:!0}),o.prototype._active_change=function(t){var o=t.event_type;if(null!=o)for(var e=0,i=_.isString(o)?[o]:o;e<i.length;e++){var n=i[e];if(t.active){var s=this.gestures[n].active;null!=s&&t!=s&&(l.logger.debug(\"Toolbar: deactivating tool: \"+s.type+\" (\"+s.id+\") for event type '\"+n+\"'\"),s.active=!1),this.gestures[n].active=t,l.logger.debug(\"Toolbar: activating tool: \"+t.type+\" (\"+t.id+\") for event type '\"+n+\"'\")}else this.gestures[n].active=null}},o}(h.Model);e.ToolbarBase=k,k.__name__=\"ToolbarBase\",k.init_ToolbarBase()},\n", | |
" function _(t,n,e){var o=t(113),u=t(365),r=t(368),i=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(n,t),n}(u.ButtonToolView);e.GestureToolView=i,i.__name__=\"GestureToolView\";var _=function(t){function n(n){var e=t.call(this,n)||this;return e.button_view=r.OnOffButtonView,e}return o.__extends(n,t),n}(u.ButtonTool);e.GestureTool=_,_.__name__=\"GestureTool\"},\n", | |
" function _(t,n,o){var i=t(113),e=t(365),c=t(116),u=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype._clicked=function(){this.model.do.emit()},n}(e.ButtonToolButtonView);o.ActionToolButtonView=u,u.__name__=\"ActionToolButtonView\";var l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.connect_signals=function(){var n=this;t.prototype.connect_signals.call(this),this.connect(this.model.do,function(){return n.doit()})},n}(e.ButtonToolView);o.ActionToolView=l,l.__name__=\"ActionToolView\";var _=function(t){function n(n){var o=t.call(this,n)||this;return o.button_view=u,o.do=new c.Signal0(o,\"do\"),o}return i.__extends(n,t),n}(e.ButtonTool);o.ActionTool=_,_.__name__=\"ActionTool\"},\n", | |
" function _(o,t,e){var n=o(113),i=o(371),l=o(121),r=o(373),p=function(o){function t(){return null!==o&&o.apply(this,arguments)||this}return n.__extends(t,o),t.prototype.doit=function(){window.open(this.model.redirect)},t}(i.ActionToolView);e.HelpToolView=p,p.__name__=\"HelpToolView\";var _=function(o){function t(t){var e=o.call(this,t)||this;return e.tool_name=\"Help\",e.icon=r.bk_tool_icon_help,e}return n.__extends(t,o),t.init_HelpTool=function(){this.prototype.default_view=p,this.define({help_tooltip:[l.String,\"Click the question mark to learn more about Bokeh plot tools.\"],redirect:[l.String,\"https://docs.bokeh.org/en/latest/docs/user_guide/tools.html\"]})},Object.defineProperty(t.prototype,\"tooltip\",{get:function(){return this.help_tooltip},enumerable:!0,configurable:!0}),t}(i.ActionTool);e.HelpTool=_,_.__name__=\"HelpTool\",_.init_HelpTool()},\n", | |
" function _(A,g,o){A(164),A(163).styles.append('.bk-root .bk-tool-icon-box-select {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg0kduFrowAAAIdJREFUWMPtVtEKwCAI9KL//4e9DPZ3+wP3KgOjNZouFYI4C8q7s7DtB1lGIeMoRMRinCLXg/ML3EcFqpjjloOyZxRntxpwQ8HsgHYARKFAtSFrCg3TCdMFCE1BuuALEXJLjC4qENsFVXCESZw38/kWLOkC/K4PcOc/Hj03WkoDT3EaWW9egQul6CUbq90JTwAAAABJRU5ErkJggg==\");\\n}\\n.bk-root .bk-tool-icon-box-zoom {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg82t254aQAAAkBJREFUWMPN11+E1FEUB/DPTFn2qaeIpcSwr5NlUyJiKWVXWUqvlUh/iE3RY9mUekkPPURtLKNRrFJEeuphGfUUaVliiX1aVjGs6aG7+XX9ZnZ+d2fTl2vmnHvPPfeee/79Sk+may2/UQq/q7Qu+bAJoxjHIKqB/wlfUMcMVqI9bLZ+DGIKwzlzQ2GcxCx2xwvKOUKlaHTiX8bHNspjDONHkOmJBW5jIof/FvPh/06MZOb6cRc7cGn1AKUE5cdzlM/gAr5F/O24H3xkFRfxAbVygvK+cIsspjGWo1zgjeFpxL+BvnLw7laBA4xjIFJwrgu52DoVjKdY4HBEX8dSF3JLYe1fe6UcYCii3xWQjdfuSTnAtoheKCC7GNED5Zx4L4qt61jbTLHA94geKSC7P7ZeShQ0Inoi1IJuEOeORooFXkV0FZNdZs5qvFfKAeqYy7nZ6yg//HG0MBfffh71lFrQDCW2EvEP4mt4okZUDftz9rmGZkotmMxJRtlisy+MTniAWrty3AlXw0hFM2TD89l+oNsoOJXjbIs4EpqNtTCLXbiZ0g+M4mFObj8U3vsNjoZCVcmk60ZwthpepLZkB/AsivWfOJZxtpUQHfWib7KWDwzjeegBZJSdKFiE2qJTFFTwElsi/unQ/awXrU4WGMD7nOJxBY/1EO2iYConq93CHT1GOwucjdqnRyFz+VcHmMNefMY9nNkA3SWUOoXhQviSWQ4huLIRFlirFixnQq/XaKXUgg2xQNGv4V7x/RcW+AXPB3h7H1PaiQAAAABJRU5ErkJggg==\");\\n}\\n.bk-root .bk-tool-icon-zoom-in {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEgsUBmL8iQAAA2JJREFUWMO9l12IlFUYx3//MzPrLpSjkm5oN4FFIWVEl66IQlFYwtLOzozsjHdGRSCRF0sfBEXRVV0FQuQiLm5CZNBFgRRaRLVFhbJ2EdiN5gbK7toObTPn6eYdPTvNzPvOBz5Xh/ec5/n/n89zXtEHmZqeSXSuXBz/3zfdKvBWJHQrwZuRcP0El+QkbQXeBX6WZEgm6TtJk5lM5o4Lc+cV6qpf4Ga20Tm338zeATItVK9Ker6yvPzp4NDQ3+XieGsCU9MzTYumGbhz7m4ze9/MHgvBgItACrgfGAj2jgAvAYs3wlEujjc13kii8YyZrXXOfWhmo9GnFUlvOOemarVapVqtkslksmb2KjARqL62ecuWN9NxbRInzrldAXhV0uFSIfdew7G/gNLU9MwS8CwSmE3Oz88fcXG5blfpqVRq0Ix8VIAAX0XgrVL7HDCHGcCaWrV60LUBN8Dae58aQIxEqcA592I9M610JL0cpG/U9TIHJNKY3RV5z0R+7Nd4HZ0P1g/2RMBuegLAsRMnb4vT8d5vqKfMzOgtAlADrkmqGywmiMBTwfr3dC9j1Xv/r6Tvg/5/5ejxE6cO7M9faVbQZrYNOFSPmqQvVo9FKexvi5uWX58943aM7DwAfBDY+FbSCxP5sdkGx55GeguzrUEXPaSo2pFkAbiSZQCAzZJOmdkjwd6SpB/M7KykQTPbA2wDhoIzRzcNDx9MJwGNIXdJ0mEzmwbujL7dbma7gd03A7lKfnTOvf74nl0r6bonTUbujRSUCrm2d4L3/kvn3JPe+8+BDW2i9o+kT7z3kxP5sYsA6W47oE64TsR7P9tQL4vA2mh9WdIscKxUyJ0M7aR7acOGzikD65EQLEjaa2ZXzMwDFeB6qZBbbLTRE4EGeSaozNOZgYFf8qP7lmIvs354n0qlHpB0T7B9Ogl4IgJJrmjv/SiQjbrkD+BMUkfSbYATPdckrTOzkciWAXOlQu5cYgLdPEIapud9wMOR9zVJH3ViKx333mtHMJvNuoWFhZ3A+ojMcja77njXBEKwJJfTcqUyCIQ34Mf7nnh0paMnXacFuGoC1mr3AtuDfLzd8Zuyl+rfuGn4HLAD+Az4qZQf+61TAj0Noj8vX6oC35SL43u7teG6rf5+iXppwW7/JUL5D03qaFRvvUe+AAAAAElFTkSuQmCC\");\\n}\\n.bk-root .bk-tool-icon-zoom-out {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEgsHgty9VwAAA0FJREFUWMO9l09oXFUUxn/fmXlpItppi22k7UJBRSlVkCytSAuKUloIdjKT0El3FXVXdVFKRVAQV7qQohsNwdA0UFvBhYtqUVyIVlRaogtFQVq7qSTVjA3z3nHzBq/jvPmTN/Ss7rv3nvN99/y794kByMzcfE/7picn/jenmwWeRUI3E7wdCRskuCSTdDfwBvCtJEdySV9KOhpF0e0/LF5SqKtBgbv7ZjObcvfXgShD9Zqk5+orKx8Oj4z8NT05kU1gZm6+bdK0Azezu9z9hLs/HoIBvwAF4H5gKFh7B3gBWFY3460kWve4+3oze9fdx9OpVUmvmNlMHMf1RqNBFEUldz8OHAxUX9q6bduryut+Sfvc/Wz62ZD0fK1afjND9y3gGSRwv1GMojstTxUUCoVhdyopEYDzKXjWwZ4FFnEHWBc3Goet00m7lZlZYQixKw0FZnakGZksHUnHgvCN5/KARBH37enpOVg58H13HV0Kxg/kIuD/ngSA2ZMLt3bTSZJkUzNk7k4+D0AM/CGpaXCyBw/sC8Y/qZd2GpZiuL9YLN4Sx/HpoP5/c/exQ1OVq+1yyt13SLoArEsJnMjlgfOffvK3u58Kprab2QezJxfG2iTzUzI70wRPG9jbmpmb95SNB9mpzp7/j2yVdNbdx4K565K+cvfPJQ27+x5gBzAS7Hlvy+jo4WIvoC3kWpcvS3rR3eeAO9K529x9N7C7zX6AC2b28hN7Hl1Vt44niVq13LUjmtlYkiQfA5s6eO+GpDNJkhw9NFX5ueNt2ARodyF1IHIN2JiOl4H16fiKpK+B2Vq1vBAqFAf4IJkGNiIhWJK0192vunsC1IE/a9XycquNXARa5OnApeeioaHvKuP7r3dTGsiLqFAo7JR0T7B8rhfwXARa2us4UEqr5Ffgs151i/08oTNKdIO770ptObBYq5Yv5ibQq/sl3Qc8lJ4+lnSqH1vFfp9koZRKJVtaWnqkWXqSVkqlDe+vmUDWpZMlK/X6MBDegKf3P/nYaj8ErN9fqZBYEsf3Ag8G8Xit33BaniTcvGX0IvAw8BHwTa1y4Md+CeRqRL9fudwAvpienNi7Vhu21uwflOT+L+i1X2TJP57iUvUFtHWsAAAAAElFTkSuQmCC\");\\n}\\n.bk-root .bk-tool-icon-help {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAABltpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIKICAgICAgICAgICAgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIj4KICAgICAgICAgPHRpZmY6UmVzb2x1dGlvblVuaXQ+MjwvdGlmZjpSZXNvbHV0aW9uVW5pdD4KICAgICAgICAgPHRpZmY6Q29tcHJlc3Npb24+NTwvdGlmZjpDb21wcmVzc2lvbj4KICAgICAgICAgPHRpZmY6WFJlc29sdXRpb24+NzI8L3RpZmY6WFJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MzI8L2V4aWY6UGl4ZWxZRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFhEaW1lbnNpb24+MzI8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjE8L2V4aWY6Q29sb3JTcGFjZT4KICAgICAgICAgPHhtcE1NOkluc3RhbmNlSUQ+eG1wLmlpZDpBODVDNDBDMzIwQjMxMUU0ODREQUYzNzM5QTM2MjBCRTwveG1wTU06SW5zdGFuY2VJRD4KICAgICAgICAgPHhtcE1NOkRvY3VtZW50SUQ+eG1wLmRpZDpBODVDNDBDNDIwQjMxMUU0ODREQUYzNzM5QTM2MjBCRTwveG1wTU06RG9jdW1lbnRJRD4KICAgICAgICAgPHhtcE1NOkRlcml2ZWRGcm9tIHJkZjpwYXJzZVR5cGU9IlJlc291cmNlIj4KICAgICAgICAgICAgPHN0UmVmOmluc3RhbmNlSUQ+eG1wLmlpZDpBODVDNDBDMTIwQjMxMUU0ODREQUYzNzM5QTM2MjBCRTwvc3RSZWY6aW5zdGFuY2VJRD4KICAgICAgICAgICAgPHN0UmVmOmRvY3VtZW50SUQ+eG1wLmRpZDpBODVDNDBDMjIwQjMxMUU0ODREQUYzNzM5QTM2MjBCRTwvc3RSZWY6ZG9jdW1lbnRJRD4KICAgICAgICAgPC94bXBNTTpEZXJpdmVkRnJvbT4KICAgICAgICAgPGRjOnN1YmplY3Q+CiAgICAgICAgICAgIDxyZGY6U2VxLz4KICAgICAgICAgPC9kYzpzdWJqZWN0PgogICAgICAgICA8eG1wOk1vZGlmeURhdGU+MjAxNjoxMToyOCAxMToxMTo4MjwveG1wOk1vZGlmeURhdGU+CiAgICAgICAgIDx4bXA6Q3JlYXRvclRvb2w+UGl4ZWxtYXRvciAzLjY8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+Cphjt2AAAAT7SURBVFgJxRdbaFxFdGb2bhui227BWrsVKYgf2kJUbP9EUPuzEB803WTXJjH61Q/7Ya1+CMYKEVTsh4J/EpvY7BoabUiNiA8s1p+4KIhpoUUEselHqyS76TbZ3HuP58ydc3d2u4+IkQxczpz3mZkzZ86VYpXjvenpjZsLhUcliE4AuUuASAgptmt1EFdwPiclzIIUUwubNn17OJlcXo1p2UpodHRiux9xB1Eug1+slbzhFxGOKc851tu7/0oznYYBDA8Pt0U2tL8KQryIq2tvZqQhD0QJHRz3yqWhgYGBpXpydQMwqz6NCnurleCSADkJEfgKfOePqL80R/wV1ZaQyr1LenKfkPCkEPKeaj0xg7vxVL3duCmA0Vyuw/fl52hgBxsBED+h4Cv9z3R/zbRm8MTJTx7HQN7GQB6w5C4L4SX7M5lfLBpurjXMyvNIShiyi0l1pL8n9b7EDGPR8fHxzSsQ6XDB3618/xqo6Pk25V5MpVJllgHM1BO58RdQ612kOYZ+GXdij70TYQB05mpj+1kU5G2fB+l3PZtOf8NGx6ambnMXb3yAxg8wjSEG6OKKR9oicBQD+ZvpH2Wzj0lQpxCPG9qMv1x6hHNCsSAlHM7ZOa682vlI9tRDbvHGbD3nZAPpDoD/3JIrLpAs26UFkC3EMUA99hpfGtEBfJjNJnS2Gwnadnvl+Xw+iuc3DAJuNyIaSCHpilVldyDjjUxj3WDZIAhxhHHyRcdNuA7AAfUaXzVKODpzFiZ4/uLvh5G+m2no+C/pyIf7MqlEJB7bpqR6nXkEUfbeawuLaZsW2ISfNQ2vtaktQlGFQyIVGT0o2+2EC4iQNGwjBIN9qdQ5Qg4mk4X4rW3vCClLtowE2FOFUxKDfNmiZci3ovKKRFPh4FK9q4Zbdr+lKKJiA13TcHR2dmLBgdmQ0GAS2MZaEowY+XbAk09IvgtYZGp16SyvFhaHcIUh645t8T9DBCcnz5zZ4hZLu3DzK2QlL1QQa0Y+pHiJKPSuOGj3PmZTheM5w2TwqBxnvBZOTk7G5gvXJ5Aelms8wnJURL+olSWcfEhf6gDoUXPMq6ZlqbzWU2pE+3hi4s6F68tfIj9cBMlikr7Z0/P0b/X0yIcUXsDCF1WhtL4OROHaXk+xlkbV0Cu732Nmhc4peaWSg73pA8dq5RkvO37ldUTfXCKZv2q45MkhvG87WQEzpCCUSvV1d9GONBy3lMvgKSwrZig8gjAietWY0QriylO2jIo4yVbOSb7KB/qmI9BPKjHpSSXYauRyn92Nq9/Kcrj13x3s3v8D481glQ/0raiNYgX9njPSBOImbrHZePl+tfFmc9sH+Xaoh8NjOKSVdDMhjjYzQLy+dFceH5+IJQf9VYXX4tROg4ZFU8m31M3mfPEqUoJqCGJfvWpo2xnNfdrhC28n06SCeSzNZxlvBINGRXCtKS7EY1uV6V7HWAm38y1cXaXsMcOCvr9ySPj+af7A1U2HJXHzVNvUXVLIGyPf+jV0pf8GHoN+TLAyPkidTCi2RpPApmnR0Bd1zGRaB/B8Oj2HSw7LLbVR1MmskW8RdEWVXSJf3JbpAMgRtc4IZoxTh9qotQjCasm46M0YX9pV1VmbpvRH5OwwgdRtSg2vKaAz/1dNKVtb17Y8DCL4HVufHxMOYl1/zTgIgiYvBnFKfaNp3YjTdPz3n9Na8//X7/k/O1tdwopcZlcAAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-hover {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4oVHp0SwAAAQJJREFUWMPtlsENgzAMRb8RQ5VJItFDOgaZAMaAA0iZpN3KPZSoEEHSQBCViI/G8pfNt/KAFFcPshPdoAGgZkYVVYjQAFCyFLN8tlAbXRwAxp61nc9XCkGERpZCxRDvBl0zoxp7K98GAACxxH29srNNmPsK2l7zHoHHXZDr+/9vwDfB3kgeSB5IHkgeOH0DmesJjSXi6pUvkYt5u9teVy6aWREDM0D0BRvmGRV5N6DsQkMzI64FidtI5t3AOKWaFhuioY8dlYf9TO1PREUh/9HVeAqzIThHgWZ6MuNmC1jiL1mK4pAzlKUojEmNsxcmL0J60tazWjLZFpClPbd9BMJfL95145YajN5RHQAAAABJRU5ErkJggg==\");\\n}\\n.bk-root .bk-tool-icon-crosshair {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADEUlEQVRYR81XXVIaQRCeHqug8CXmBNETaE4gniDwIgpVspxAbxC9ATkBkCpQ8gKeQDiB5AQxNyAvUlrldr7eHxyGXZi1rMJ5opbp7m++7un+htSGF204vsoMoNXrlzSpfWa1oxQfhAegCZGaEtPorHo8znIoJwCt6+td8uk7ApUQCIHTF4BNAWzImq8ap6cP68CsBdDp9i9ZqXM7ML79g/EnCWD+jgMKENKqWT+tXK0CkQqgNRjs0OxpQIqKhoMxaG6/6JeRnK7T6yO2UvVqhYSlLX+ryORfgKn9ORDFIy7ky41yGcwsr0QAQfDH5zucOswx819fs4egI9OFCcD8DjBF7VNbEX0JzdWEt3NHSSASAcCxBDqMgt/623kvyTgNgNjJIfTjk4D4FqaJR1715MjmYAmA5Bx3AwUXQL+t105KaTlcBSC26XRvhjEIoLiq1yqXpr8FAGG16/ug4IT27fxBWu7EiQuAiImJpEMKE6nYM30uAIDDttSUOPfJP7JzbjPhAiBIh9QE67vIvoOi9WJfCwDavf40ulpjbCqmUf+W753ezURuh7Dg1SqflwAEHU6pgfyBq9Y4qx0LG++2fnZ/eUzcstmdM2AWH+jfc+liWdBJfSENf8Lifi3GVwC9mybOfi5dzatWVrbbLIHNva8p5h/16gkaFiLGGxbufkoE6XguwePiXLF3XmMfCUCUAqtKXU7sumd1CowOuJEi3Pg1FBpjitIGhyvVSfvmjci6ZR+rFQfDiPVE2jFYeICQ+PoewwjC5h7CZld6DBdyu6nDSKgzOyIMhmhK5TTqXYbRorZYM46TmpKAAOrGWwSJJekSB1yqJNOzp1Gs7YJ0EDeySDIMtJbQHh6Kf/uFfNFZkolJICRmz0P8DKWZuIG2g1hpok+Mk0Qphs0h9lzMtWRoNvYLuVImUWrmPJDlBKeRBDfATGOpHkhw670QSHWGLLckmF1PTsMlYqMJpyUbiO0weiMMceqLVTcotnMCYAYJJbcuQrVgZFP0NOOJYpr62pf3AmrHfWUG4O7abefGAfwH7EXSMJafOlYAAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-lasso-select {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEgwlGP1qdAAABMBJREFUWMO9V1uIVVUY/r61z57ZMx4DnbzgkbQXL5iCJphlWdpIGY4jpFBkEiU9ZNaDRRcITcIwMwgxoQtU2IMXdAZfMjFvpERXYiSbysyBEXFmyuHMnLP32uvrwT2xnY5nxvHQ93Jg7fWv71/r//7L4a59TRgqJk+Z6v3a+sv0OI5nk5wu6VaSVZImAThHsgjgrKTvM5nMUWvtmf5n8HodCIKgOgzDhc65pSTrJQWDsSNpJX1ljHnDOfdT37oZLLHv+8OMMasKhcIJ59xHAJYMlhwAJGUAzJfUTHLFuFzOG5QDU6dNMyQfs9Yedc5tBpAD4IYYNQGoBrDtQnt7/b0LFrJsCHzfn2itfQfAnZLiazytA3AaQAuAiwDaEgeNpGkkswAWSBqRONB38b88z5uTKePt6iiKXkk8jq+iJC5LOmiMaTLGHLPWhmWeHr7vV0dRtATAapAzIVmSo51zyzIlbm2stesFPA6pKk0r6Ryg93y/ek8YFvPOOTg3cDSiKCoC2OP7/rEoirYm4rUkF12lAWNM1lr7lqQn0+QA8gI2jBg5cj6Aj8OwmB+KAKIoukhyp6SRJAUgl0ndPLDWPi9pJQCbuviXvu+/GIZhW1dnJ24UJFuTjCCA2ADA8sYGWmsXS3qmL94kDYAtkh4Nw7ANlQJ5U6INT1KrAYC9zQdykl7nFSj5fXp5Y8NWVBhy7mUAjqShMYdMXV2dJ2klyRwAJ8lIeuGWCRMP7N7frEqSG2OmAFhKshNAp5wrmO7u7jEAngPQm1S2z2pqapr+OPt7XEly0oxwzq2RdFmSD2AMgKKJouhhAL4kA+Cs53l7e3t7uytJHgRBreTWkXwkKVJnJD0B4GAGwIJE9R6AFufc6UqSZ7PZbD6ff5dkA4CQZEHSqwAOISmXtwGIE+F1SeqqIP8d+Xz+C0mLJYWSAODteXffczjdDQNJ0BWMCoLg5gqIbRTJNwHsljQhUb0luWPM2LE7Thw/9m/5NCT/TByxAOYWi8X6/gdWV1dnfN8fNRBxJpMZTXKdc+6IpFVJWAEgkvSJpA0X2tvtVTaSjgOYBCAEEADYSHK87/sfhmEYA9gShuEDkgzJHyWtB/B1irQ2juP7ADxkrX0wOUOpzmdpzEY590HJ7Ni1r2kSyZOSiv2+hSRjSTXp/QAukzySNJOJkmalyNIl10hqMcasdc61XDNcQRD8BnITgNp+36r6kfcNFMMlLQGwTNLMEuQGQBfJl2bdPru+HDkAZAqFQux53jZHEsC6aw0eg2gylNRBcqcx5v04ji999+03AwsWAOI4Lsy9a94WkisAnE5a5WCJYwCfA1g7LJudI2lTHMeXBm1faiQzxkyRtF3S5CTupeAB+KG2tnZFT0/P30NO2VKLzrmfAbwGMipjG5Oc0dPTc0Md05SZ5U4Q2FxChErtEYD7jTGNQ3UgM8Asv90Yc9I5LSKRlXSI5CxJa0jWSALJjKRnAewfkniT+vwf7N7fXHK9rq7O7+jo+BTA/NRrdBpjnnLOnUrvXd7YMPQXSBunneno6IhIHgYwW1JtkgmBpBkATlVMAwOk3nFJ+VSoqgCMr6gIy2FcLtdKspAedyQN/98caDt/3kpyabUmf8WvG/8A1vODTBVE/0MAAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-pan {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4lKssI9gAAAOtJREFUWMPVll0KwyAMgNPgoc0JzDX2Mtgp3csKErSamGabIEUo/T6bHz0ezxdsjPJ5kvUDaROem7VJAp3gufkbtwtI+JYEOsHNEugIN0mgM1wtsVoF1MnyKtZHZBW4DVxoMh6jaAW0MTfnBAbALyUwCD6UwEB4VyJN4FXx4aqUAACgFLjzrsRP9AECAP4Cm88QtJeJrGivdeNdPpko+j1H7XzUB+6WYHmo4eDk4wj41XFMEfBZGXpK0F/eB+QhVcXslVo7i6eANjF5NYSojCN7wi05MJNgbfKiMaPZA75TBVKCrWWbnGrb3DPePZ9Bcbe/QecAAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-xpan {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4X4hxZdgAAAMpJREFUWMPtlsEKwjAMhr/pwOOedINJe/PobWXCfAIvgo/nA4heOiilZQqN2yE5lpD/I38SWt3uD9aMHSuHAiiAAmwaYCqoM/0KMABtQYDW11wEaHyiEei28bWb8LGOkk5C4iEEgE11YBQWDyHGuAMD0CeS30IQPfACbC3o+Vd2bOIOWMCtoO1mC+ap3CfmoCokFs/SZd6E0ILjnzrhvFbyEJ2FIZzXyB6iZ3AkjITn8WOdSbbAoaD4NSW+tIZdQYBOPyQKoAAKkIsPv0se4A/1UC0AAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-ypan {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4anK0lywAAAMVJREFUWMPtlzEKwzAMRX/S7rlpIMXeOnaLaME36FLo8XqCdNFghGljyc4kgQi2Q/SUj0F/eL7eMMTKz6j9wNlYPGRrFcSoLH4XxQPvdQeYuPOlcLbw2dRTgqvoXEaolWM0aP4LYm0NkHYWzyFSSwlmzjw2sR6OvAXNwgEcwAEcwAEcwAEcoGYk20SiMCHlmVoCzACoojEqjHBmCeJOCOo1lgPA7Q8E8TvdjMmHuzsV3NFD4w+1t+Ai/gTx3qHuOFqdMQB8ASMwJX0IEHOeAAAAAElFTkSuQmCC\");\\n}\\n.bk-root .bk-tool-icon-range {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAABCJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iCiAgICAgICAgICAgIHhtbG5zOnhtcD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLyI+CiAgICAgICAgIDx0aWZmOlJlc29sdXRpb25Vbml0PjI8L3RpZmY6UmVzb2x1dGlvblVuaXQ+CiAgICAgICAgIDx0aWZmOkNvbXByZXNzaW9uPjU8L3RpZmY6Q29tcHJlc3Npb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8dGlmZjpZUmVzb2x1dGlvbj43MjwvdGlmZjpZUmVzb2x1dGlvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjMyPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4zMjwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxkYzpzdWJqZWN0PgogICAgICAgICAgICA8cmRmOkJhZy8+CiAgICAgICAgIDwvZGM6c3ViamVjdD4KICAgICAgICAgPHhtcDpNb2RpZnlEYXRlPjIwMTgtMDQtMjhUMTQ6MDQ6NDk8L3htcDpNb2RpZnlEYXRlPgogICAgICAgICA8eG1wOkNyZWF0b3JUb29sPlBpeGVsbWF0b3IgMy43PC94bXA6Q3JlYXRvclRvb2w+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgrsrWBhAAAD60lEQVRYCcVWv2scRxSemZ097SHbSeWkcYwwclDhzr1Q5T6QE1LghP6BGNIYJGRWNlaZItiFK1mr+JAu4HQu0kjpU8sgF3ITAsaFg0hOvt2Zyfvmdsa7a610Unx44Zgf773vvfneezPHNzrbhn3CT3xC3wPXYOC8LDzqdi8YY/gwh4BeknS/2th6dr2kf94AOp3OFyWgMyziOPbMDxV9FTtJnl1ut795Xd0/YQ0/vtYQwMT1KXWCfr2IjOWwtNehwN4xL9ykTrm6Pzl58yLn3J+mKh9mXbT3uRjGEDph+O8/TjfP5dBp7Ha7AX7O3o5nZeD/0E/OGyXntDgzA0X6qmCnrVutVlrUWV9f/3xo+pwhGDhvEPHOjoxnZjJggXmMHzBQ7NGNp9vxk61fr0HR7e/u7pZzCGHlc7qwBYYTT7tJYSx1AQzppyFPft5apta9w7SKcn0b7P7+/jCsDQ5mbc0dCmIJGDN0ehdcjsmkm6A6KUeKFOTE11PLxrC7Ukqh3ylL2fT0NAP9q6ur6rRCJJYsbKB0JsbCKMuy+xREePDyxQPCz+Crlw062QcA5wBOOt1l6vIl2WiI9F1fN6Q+BBqit6hEC4Hk08GQJMn4myjSP7RavVxgdaVUh/3U6HCMsPr9pYnJKRziHtWQ+un58+hGs6nsjQSjpuTyKGN3CX+FBwHXSiEVgjP+O8X6N12kIePES+GzTKAkGbNp8yJsGUMVzz8jPKReiyAQRimy5/cjye5RpF8utFp/+nwmT7d/NMzcFkS7yjJNGDaPURQxIQThEQy0SyF4l5WJYYhBa816vZ6dU7A6CAhbZVow/pDe0O9hVOoCi13r4BgBAvJHqMSQL2vE/iH6IAXEwgrRVUmBoRRwnwJQT98xEeVeSUyB4dJ5nwJBKdCFFGRmUCcu7rwIYypCTblaChuNBhWODrman5ub+4v0rMNBt8z6Ezh7GksJQpCbm79cMQE7QBFm/X6f0rjWnv8WRYg/QdbUpwDAEBy8vPyA8rNGzg3a8MiElwiM7dAtRqNoNptjGPM1laVxP9umWEMGLOKhKUOJDtBwDmzsw9fC/CzHr9SGuCTi2LbbKvVtmqXpCjMihBFa79Wrt5fGx9PDzc3fmu32Lf8qFliwU9emKhBSp+kRKn/hu9k1COEDbFdt/BoKWOAkuEbdVYyoIXv8+I/QK9dMHEb1Knb7MHOv8LFFOsjzCVHWOD7Ltn+MXCRF4729vWMDK+p8rLkvwjLg4N4v741m5YuwCI9CvHp1Ha8gFdBoPnQAkGsYYGxxcfEI7QQlFCTGUXwjAz4tWF+EpymOWu7fglE7qsOvrYE6g4+9/x/vhRbMdLOCFgAAAABJRU5ErkJggg==\");\\n}\\n.bk-root .bk-tool-icon-polygon-select {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEjc1OfiVKAAAAe1JREFUWMPt1r9rU1EUB/DPK0XbqphFHETo4OCiFhwF0V1KHbRSROLqon+AUMVRRFBwEbRFMBiV+mMW/wIxi5OD1kERRVKRJHUwLvfBTZrU5OWBGXLgQu7Jfe98z/ec7z0vKa88b2q1BDtRHdAPBaylm1NzsxsOjPnPNt6WSWprbft+/c3I3zOAjhT1Y4+fvcjEQJIXnVECSa+AhqIHqlHH5lWCZoe+Gk4GRgDG86j9SAUdlDBSQaZhlOkuHyoVdJmsw98D1S5fM4NYM1LCpqM+Lwa240oLgmZzpVZvzKT75VLZcqksSZKWlQeAy/iORVwIvh31xvotvK7VG3Px4aWHj3Jl4C2uYSvq+Bn8v6LLbaVWb9zsBiKLCvbiNG7gLm7jAYqbPHMJMziZ9lsKoh8GtqCEVVzHftwJn+TFHp4/hg8BSCYVfMOZoPEv2NZGdy9WCGUr9toDR3E2/H4V6nwRe/BmgN65H1ZhvMuB3XiKIyFoGefwO6ysVkUlrNUNsyAK/jli533Q+Y8cJFvAeXyMS1CI/jiMr/gUtD2LQwMGr4R3p7bY3oQHQ5b38CT4D2AXXg6YcQXHpyYnlqKsi5iOAVSwL9zd7zJ09r+Cpwq72omFMazjT9Dnibym0dTkRDUKrrgwH7MwXVyYB38BstaGDfLUTsgAAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-redo {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4itK+dVQAAAaFJREFUWMPt1L1rFFEUBfDfJDaBBSslIFjbaSFp1FJQFMVCHkzhKIqdUYOCoBgErVz8rCwiTDMwBCIKipDWyip/gxAIWAmBgBC0eYFh2Gx2l9lFcA5M8e59782Zc84dWrT435Hs1siLchqn43MS0zgW22vYxjesYjVLw3YjBPKinMUTBOwf8J5fKLGYpWFjJAJ5Uc7gIW6jM6Kim3iNZ1katgYmEL/6I+YasvY7Lg6iRpIX5VF8wuEe/XV8wGf8jN6LWTiAc7iEQ7ucPZ+lYW0vAtfwvlbfwCKW9gpXDOv1mJvZHiSO91MiyYsyiQSuxtpXXM7SsDmM5nlRdrCMMz3sOJWl4Xevc/vwBzdwAl+yNNwZxfRI+GxelK9ikHcwh8d4NNR/YFRES1ZwoTYdR7I0rNf3TzVNIGbmSvR/Bx08mIgCFSVu4l2ltIWD9WxNGR+W8KOynqnZ0rwCeVG+wa0hjrxtWoF5dAfc28V8Mib/n+Nev5dnabg/zgw87aNEN/bHOwVRiRe4Wym9zNKwMKkpgIWKEt24njxiJlq0aPFv4i9ZWXMSPPhE/QAAAABJRU5ErkJggg==\");\\n}\\n.bk-root .bk-tool-icon-reset {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4gWqH8eQAABLdJREFUWMPtlktsVGUUx3/nfvfOlLQaY2IiRRMQIRpI0PjamJhoVASDvNpCpYw1vJQYSVwZwIVQF6wwRHmkAUof9ElrI6VqDAXcID4TF0IiYQMkSlTokNCZ+b7jove2t+NMH7rQBWd3v+989/zP+Z8X3Jb/WGQySvUNTQBJESkNguAVYIWqzhaRhwBU9WcR+QXoymazn6jqzUQiMQSQzWZRVdal1vwzAI2tHQBPOuc2AbWTdOyQ53n7nHNfRwee51GzqoIQMCLDpr3x/tLQ0oZzrk5Vj0/BOEBt+KYuOlBVGlrahr0Wob27t3gEjnZ2AyQzmUwHsDgP6J/AYRE553neDwDOuUdU9QngNeCumK4TkRMhZUORcYC1qysLA6iuSQHIwkWLD6lqapQsuSmwTVV3h99I7EcAR462A2xR2Ilq6ehTaejvO1774kuLNALR33eclsaGsQDe3fYegHl43vyNwEeqGl1963mm2jl7YZRTQ82qlWP4HM6ZToC5ztkW4LHQoALru7s6Di5dvlIj/e6ujrEAWoZDn8hmMjXATMACGaAVuBjXTVVXFc/AxhaA+4zvn1DV+eHxVWPMAmvtb5GeMWZyZVhI2rt7qVy2pOh9U1snwIPW2vMi4oWJuBPYHkVAVScPoKmtkzVVK6cEMsyJraHhiCqJqJUwj/JRz7TW1iSSyR2rVyylqa0Ta+24Ic8vXaAEmDFc/l5Z2A/80OibuVyuz/f9ElUdHCmvw82t5HK5h6y1PYhsz2YyGw43t2KtBZHIGwB6+j4rCkBVUdV7gXrggnPuu8h4eP+xMeZS2D0rJYZ6AdAMzAt1b4nI26p6IFZOY8pugijcKSIHVLUK0LyST4vnrVfnWr3mjmP4QTATaERkXkypRFX3isjmuHdRJEK6Ckqquopp06bdKCkp2Sgi7XnGLcg7gzeutwNIiPYc8HixqIrIOlU9ONVIhHPEd851icgSVXUiskVV94gIqoonIt0i8gfQCfwae38e6BWRXuBZz5jZ8VbaOE4EIqlZVUEQBLlkMplS1QER2RwkEnsSyaREDUzyeNsvIhvCMqkH1kdIJ2o+k8iJB1LVVRfjZ6nqqlEAIbdVQGto8Lrv+/dbawcjAL7vc+6bs+zetetfLSHxniIFGofGGsU2oC7eOCbDfZ7nQawBOSAX74SF9oEPImOq+r7nmVmxb5raukZa8UReGmNmhbMkAwwBH467EYVZe49z7kdgenj8k7V2oTHm8kgdWcvrNdVFjR8cHkYzjDH9wLjDaEwEzpwa4MypgWvAjtjxfGNMj4jMiT+M+kFsZI/Q6Pv+HGNMT8w4wI7TAyevxXVPD5z8+zD64tRXAMHVK1eaVLUyVvuDqroV2BOnJF4ZIedviUidqt4Re9s+vbx8zZXLl7PR2+nl5Tz/zNOFp2FzxzGAklw22wUsLLaSKXwf8vhosZUM6PeDYEUum70VHfpBwKsVyyfeikOP6oBNwN1TrLbfgX3A1kKLzKeff8nLLzw38T5wZDgxn1LnNk5lLRfP26/OnR2hwfNYW2Atn9RCsrf+EECyrKysDFimqhXhyjY3VLkAXBKRDqA7nU6nS0tLhyIj6XSaN9bVclv+l/IXAmkwvZc+jNUAAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-save {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4UexUIzAAAAIRJREFUWMNjXLhs5X+GAQRMDAMMWJDYjGhyf7CoIQf8x2H+f0KGM9M7BBio5FNcITo408CoA0YdQM1cwEhtB/ylgqMkCJmFLwrOQguj/xTg50hmkeyARAYGhlNUCIXjDAwM0eREwTUGBgbz0Ww46oBRB4w6YNQBow4YdcCIahP+H5EhAAAH2R8hH3Rg0QAAAABJRU5ErkJggg==\");\\n}\\n.bk-root .bk-tool-icon-tap-select {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3NzIwRUFGMDYyMjE2ODExOTdBNUNBNjVEQTY5OTRDRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCOTJBQzE0RDQ0RDUxMUU0QTE0ODk2NTE1M0M0MkZENCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCOTJBQzE0QzQ0RDUxMUU0QTE0ODk2NTE1M0M0MkZENCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OTQ0QzIwMUM1RjIxNjgxMUE3QkFFMzhGRjc2NTI3MjgiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzcyMEVBRjA2MjIxNjgxMTk3QTVDQTY1REE2OTk0Q0UiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6eYZ88AAADLklEQVR42rSXf2TUYRzHv7tuGcfE6Vwb5zLSSjEj7Y9KWqfEmFZJP+yPMdKKmUrrn0iUfjhWlLFi6YfNrF+StBoTo39iYkTGco4xxxG59P7k/T2PT8/37nu3bx9ezvPj+zyf5/PreS78bGLS8SmrwE6yje3NHJsDBTALpknBz6JhH3NiYAB0gHqPOVv52wJ6QQ48BzdAttTioRJjdeA8mAHHS2xuk3p+M8M16ipVQE49Ds6CiFO9RLjGONf05QLx6wPQaBlbBlPgJVgkP0ETiIJ2sB/E1XfimjfgBOOlKDUqCGOcqBcQnw6BYW5YTo4wbvQhMmCfGRemC2rBiGXzWUb+kM/NRZ6CHWBM9ce5R61NgX6ayhSJ5EPlItlDRNkz4JbFHf06BkSzHjXxM+gDv1S/mPUo2AXWgt9UUHL/IVhS8yUV1/EbV3o4N+NaoE9Fu/i827K5pNYHnqAVJECShWmAaddpscYFFXwR7vnXBRGlnUN/L6kqKJlxnRUuDbaDBiL+vst5d4gpcpBrqk/2jIgCKVUolhntplzivHmwh4stGOPfwBWwl/2dpp8p7xjQZqFLiQJtauKkivYm+kzccpK57yXfOUe+P23JqAnVbhMFmlXntCWnxbT31am9ZJ4BJifsUmNTqt0cYhA5ypympPg7VkEKunPbVb8cIG+0kyHLJZNR7fUMooUKFHAPkfQo58VLK+RzwRDd4FdWG9mjpaAXzqkJa1R7kQttqEABWXMjOOxxVRfnhRm5URX1prk/0pQHwNcKlchZ+jdpC+hFdVqO0my9Hj5dkYgCn1Rfh/KdlNDHrJhPqlDih+IfBd6qwpOgEqYMsorJ2HtWxtagLJDn/W3KRfPOZhoeBJfZPgVeGKeKrkQBh5dLXl25Ny3pc4/1fkTdbvFqFQgbxWeYD0hXulhQ0pYiM1jG547fcbMQpVnHTZEn9W3ljsCzwHxCdVteNHIZvQa7/7cC7nV6zHIfyFP9EXjFa7YxKAVqPP4bxhhoLWW+z9JyCb6M/MREg59/RlmmXbmneIybB+YC/ay+yrffqEddDzwGvKxxDmzhc0tc80XVgblqFfgjwAAPubcGjAOl1wAAAABJRU5ErkJggg==\");\\n}\\n.bk-root .bk-tool-icon-undo {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4em8Dh0gAAAatJREFUWMPt1rFrFFEQBvDfGhACASshkL/ALpWVrSAKEQV5sIULWlgZNSgIFkGIVQ412gkBt1lYLERREFJqJRaW1oHAoZUQsDqwecWy7N3tbe6C4H2wxc682Zn3zTfvLXPM8b8j6RqYF+UCzsfnHBawGt3fMcAX7GEvS8NgKgXkRbmMxwg41TLsN0psZmnodyogL8pFPMIdLHUk7hA7eJKl4U/rAuKu3+HslFr/FZezNPSTFslX8QErDe4DvMVH/Iq9F7VwGpdwZUjsPtaSFjv/1vCBPjaxO0xcNbHejLpZrrlvJCMCT+JzA+2fcC1Lw+GE4l3CG1yIptfjCtiKoqtiJ0vD3aM0Py/K57iIMxgkQxat4EdN7e9xdRzlk+LEEPvDWvIDXJ928sYxjL36icWK+VaWhlezOIqbGFirJd/H7szugrwoX+D2BDEvszSsT5OBdfRaru/F9dPXQF6U27g/KnmWhgctxqyzBrZGMNGL/rHI0nDkKXiKexXTsywNGx0OnFbFNk3BRoWJXnw//j+ivCi32/S8CxPVNiWOAdUiJtXITIqYY45/Cn8B2D97FYW2H+IAAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-wheel-pan {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEgswOmEYWAAABddJREFUWMO9l09oXNcVxn/n3vc0fzRjj2RHyIZ6ERuy6CarxJtS0pQSCsXNpqGFWK5tTHAwyqIGN7VdEts1LV04BEoxdlJnUbfNogtDCYWQRZOSxtAUCoFiJY0pWJVUjeTKM9LMe+9+Xcyb8ZMychuofeHCffeee7/vnXvOuefYlV/+mv932//tb91z/Y2rvxmMHQ+4FcEfOIGN4A+UwDDwoQScc7vM7AIwB8yZ2QXn3K77Ab6OgJnVgeOSbkqaBiaACUnTkm4Cx3OZzwf+qzcRQup1zNZ9RwDe+0YI4YKZTUn6zCGSMLOfAF/03r+QZdnyfwO+ePEiI6N1nPMgMDMkETLRbd2mXG8gCbd9YiIKIUxLKoLfBN7I+80+CUlTIYTp7RMT0b3Af37p8kh5y9gZcy4Fzt+5szqSaxkzUR7dwtrKMmaGW242d0t6vrD/He/90865o865o977p4F3Ctp4frnZ3L0Z+OryUrVSrZ0z8ZxhHjhcq1XPrS43q/0flDlK9XpPA2ma7gMeyvfPx3H8TJZlH4YQWiGEVpZlH8Zx/Awwn8s8lKbpvmq1ahvB641SXNk6dhLskNA2MIBtwKHK1vGTW8bKMRbAMgyPqWeETxUM8VSSJAv52JmZA0iSZMHMThWwnipXKp8hsLLcSaIR92oU8xjSayCQXotiHotG3Ku3m+0EOQwPQCDggMf7BzQajSs5eAk4B5zLx4O1vD2eJMmAQKliscgASJMw21pansFs1swQ/DNLmUmTMNuXX+taXHTDaj5OW612R1JZ0nFJJ/J+XFJ5aWmpA6S5bHV8fHsPHFU6q3pJCjtFxtrKMuXRLUUXXxdrRLazFOtUolZlsGhmACsgnHPTwJnCnjP5HMBKLotzxsTE9rgDL0t6LoriKsDIaB31ZEK+JxQJRHFUBR2NqLw8OTkZR0OC0ntm9k1JWU7OA4vD/mZ+YfElsANmNEKi75vztzB5M8uAr+bx48me88g757PQ1U5zNg52YH7hX8l6f+4Fi3c3BqHNmkI4YQOV2MGCNu9qHPYCewfzbrC+XSGcWEcgTRKA3wFfyzdDz5d+D3x9CIcfA4eBbQS9LscskgfLnHNPAnslvS/pbZDHLLPADpx9N9fqpSIBH8cxWZY9m6bpb4Ev5fN/iKLo2TRNgdx/eo8Wk5O7Ts/N/SOSdMjHdj4kmgkIEJLJzPZKetvMTkIvFLsR25Ml2gfuF5M7vnA66sdooJYkCSGERe/9VAjhzRxoKk3Tvg3U8nulVqvx8cyNpER2umM+SdOkbc5B8JhpqBdIgTRR24h+lpKen731aRIN7thscH9Zlv0d2F8YD2TIX7F2uw3A7ZWV1a0TYz9ca8cJZHRbuRuaDfUCw9/qJHamPOKToAwHtHN6lMvlSkH2o7wDMDo6WuGuQbbn5+YAKNcb3J5fSvrhtTY+vsOPuD1IOyRhMOkj9kSx29HfXB5RUnS964NT2+3vbGbxG9auO2cDNuV6A8NTb5TitBuOpQkfYD2vwOxgmvBB2g3Hto5X42EJyVsFlztbKpXGNgqVSqUxSWcLU2+tdToa9hasLjfPYlwGa+bTi8Dl1dvNsyvNtQQL9MO2w+HM7BqwlAtPdrvdq9773WAVsIr3fne3270KTOYyS2Z2bbXdHhogKmPj7YWF+VOSXs/v/9KdO+0fVBrjbRkgB/KIDBnYu9f/7D+ZmfmRxPd6qwB8YmZXcq1MAQ/nJhTM+OnDe/a8+PGNG9lm19V/D1Qw7HXZlcRa69+U6w38l5/4ipxzf5X0CPBILjcGPJH34pVcc8692FxcXLlXRnTwwH7+9P4f8aWe3fY59LIqo1NMyQBCCHNmdgx4BegUWefjDvCKmR0LIcz9L8nokSNH+PRvH4HC3YQ098pSbevg24qlmZmNmtmjkg4D3+j/tZldkvQXSa3PW5ptlpL3ZaIN99OS9F7+IgKUgSyEkNyv2nHT7DZX0dr9rpjua2l2r4rogRAYVqZvnPsPqVnpEXjEaB4AAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-wheel-zoom {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEgskILvMJQAABTtJREFUWMPdl1+MXVUVxn/fPvf2zrSFmUKnoBCUdjRoVaIxEpO2JhilMYBCtBQS2hejpg1Uo2NUrIFAoyGmtiE+GHwQGtvQJhqDmKYRBv+URFsFDNCSptH60DJTO3dKnX/33rM/H7rvsDu9M20fDMaVnGTvtb69z7fWXmvtc/TEzqd4OyXwNsv/FwFJQVI/sA14SZKRLOlPkr5TrVYXHz70quYkEEK4TtI2YAgYkrQthHDdhV5uuw+43/ZrwCbgRttgY/tjtrc0m83X3/f+D6ydnJhYcB4BSZcBA7aP2d4ELAGW2N5k+xgwkDB0IH19CGGH7R8B1aQeAf4KvAw0ku4K2zu7uru3ApdPEyiKohd4TNKjtjt5h6RHgccSNrddbvuHtm9Jqoak7xVF8WFgdavV+pSk5cCObNmXgK++85prCj3z28HKqZMnH7D9YAY4BvwujT8BvCuL1INX9vVt+dfwcCvNb7f9q2RuSfrGvWu/sL2Nf3LX7pzvj4ENSGBPVarVd4fRkZFltjdmoMGiKO4IIWwIIWwoiuIOYDDzeOPoyMiyFLkum7WJCMDztrcrTTrIRuAQZ6NcK1utL4dWq/VZoC8BhqvV6l1lWb4YYxyLMY6VZflitVq9CxhOmL60hhCKeYiV7WMKIXw9jT1HpXw3c+bOAKzOjJubzebJrKQCQLPZPClpc7bP6rMYKtjXth2OMf7tIkr11Wz8oQDc1Fb09vY+kQw1YAuwJY2nbUluAnCWpKkaFl6IQIzxivaR2SYA89sJVK/Xp2x32R6w/a30DNjuqtfrU0ArYecDCEqgLqm94T0dEm9mBG7PxkdDlkBnkhebgIezNQ8nHcCZPL9ijE1Jf/bZZoPtzbavmqNZLbf9tSxq+yoduuJ+SZ+zXSZyBXCqU+d8fvC5yRUrV+0G2j3g2hDCLyXd/+Su3QdnvP/zCuH72LWsgf2k0oHlH2c2odlkxcpVEdgr6aDtjyb8x20/J+mA7T9I6rL9SWA5dne2/GdXLl58qNJh398An85yTMA+4DOz8Dgu6Zu2dwJXJ91ltm8Gbp7Fgb+EEB4aHhpq5CEtACqVyr3AC0AlPS8k3TSmQ2YPhhBuS/1/LpmS9JTtNTHGfwBU2uUALARotVqniqJYH2Pck85pfavVaufAwnQvnHc0McaDKVptebN94QAnJB0EdtjekydyZXqjs/0ZgLIs/w6sy8bnYGYJ63pgERKC05JutT1kOwITwL9tvzlzUQUYB+Zjs2DBgu6xsbGJZHstByZbezregcBXeCsEz1bnzXt5anLyzLq71zDLxTRdVgemdx0fv2e2w5thO5DbiqL4oKT3ZKpnpyYnz+SY2ZpTAPZmJfdIrVZbNBNUq9UW2X4kU+2dcf53Aj1pj2PA7y/6m1DS00A9za9uNBq7iqJYBuoGdRdFsazRaOzKSqye1rTbaa/tlbYrqXQP2X4FIA9/J1l39xrC0v7+w5IeB8XkwS1lWe6TGJAYKMty31tfO4qSHl/a3384I3CDpI+kzC4lnRfrue6GytEjR8oQwlY73gC0L4qlth/q0M1/LYWtR48cKQF6enrC6dOnVwGLEpnxnp7en4+O1i/tszzGOCTpPmB7ahb57QUwBWyXdF+McWg6MScmuoA8OX8xOlpvXGz422XYTsB/SnpA0h7bX5R0WzI9HUL4qe2XbI+dk3xl+V7gxoztD5jRI+YK/zkEEokx2/uB/RdzIfUtueqVN04cXwF8G3iHY3z9Urw/j8ClyhsnjrcS2Vv/J/8NLxT+/zqBTkcxU/cfEkyEAu3kmjAAAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-box-edit {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEg4QfHjM1QAAAGRJREFUWMNjXLhsJcNAAiaGAQYsDAwM/+lsJ+OgCwGsLqMB+D8o08CoA0YdMOqAUQewDFQdMBoFIyoN/B/U7YFRB7DQIc7xyo9GwbBMA4xDqhxgISH1klXbDYk0QOseEeOgDgEAIS0JQleje6IAAAAASUVORK5CYII=\");\\n}\\n.bk-root .bk-tool-icon-freehand-draw {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADTElEQVRYCeWWTWwMYRjH/88721X1lZJIGxJxcEE4OOiBgzjXWh8TJKR76kWacOBGxdEJIdk4VChZI/phidRBHMRRIr7DSUiaSCRFRM3u88gz+o7Z6bBTdjmYZPf9eJ55fv/5zzvvDPC/H9QsA66Olo9Ga+/MdR+Ljm2/KQIULsz9FqItGdOfJKLhApLgVkiSCGODjWit7QpKWy+TNrFeXvzKVUT8NiTVaIgDcbiCFJ7GiT8WkARXAdYBK0Lbhi/CenArRNskuM7/tgNp4ArQ42dwjf3WY5gWTqC7O/NbNn2Xkfw/YwdSw/We14HP2IEZwX+y9cZ9SH0LmgFP7UCz4KkENBNeV0Cz4b8U8DfgKiDxMWwUXETqLvJpCQpXZfawbzS7t9v5pL19cHBwfja7YA0y/lyCM0+E5hv5+piZXwKYcF23as+37bTXsQVqgkL0p/34fHR7DcBtbetFsBmGDwMOJCggYG55yw7dMlk6DuC1Bdu2RsCU9TYWQq2IoGbsreZ5NzvEqfSBsIsIy8OTbcdgiRHeh4o8AFAEwDakbY2AaCCpH7V9aGhoUUUy3UyVbkPYFuYLDlUZH8XBpwxkK0Dbgxg5HcVi0ent7a0RULMIozaHBSMfF9b2SzdutFcFB2FkwMIJOG6qfteXOa1nHZ48tyefuwyfT9s6wtzZ3t7eZse2DR2I228TtHXzuWCx9g8MtK5cuHCZTH4tiHEOa4xFngvTyS8f35d6enomiCi4/foEXBkZaQuukChL4FYA2Whd7YcC4gEdW3CpdL3LtGAVCVYJywEyTpAuJKeMOKXZs/Bw947C50KhUFOG4cwz35cjWNBlHGeD53n3xsfHP/T19U1qciggar8Fa4I3PHobIotBWBtc2hSiChyZxVzM53Pv7FVH6Tp3uVy+g0r1ImD2GjIrQGYIxjnfuXTZGICS5k/bBwJoubwEFX4TLah9EXomJGMA3za+f9913Yl4TnzsDQ+vE6YTZOjHh4ngibstt1pzQwd04F0bPStEBpXqRoBeQ/AKghfBnOEKgS+Q7z91Xfdz/HGKg8Ox7z8iYD9z6wqTkZFgnvhMGP9VZ2or1XVkPM9z0mytSfVsHa1RLBZbLoyNzUnK+ydz3wC6I9x+lwbngwAAAABJRU5ErkJggg==\");\\n}\\n.bk-root .bk-tool-icon-poly-draw {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEjglo9eZgwAAAc5JREFUWMPt1zFrU1EUB/DfS4OmVTGDIChCP4BgnQXRxVHqIJUupp9AB8VBQcRBQUXIB9DWQoMRiXZzcnQSA34A7aAuHSJKkgo2LvfBrU3aJnlYkBy4vHcP557zP/9z3r33JdXa647N0kHSZd5Nn0rSxc8G3cXp85sMcnZZ8vge3osZ+l3vB8CWFA0iL14t79h210swAjACMAIwAjACkB90D/8/GchI9ve4nPwTBh5E9ws7OepzGWb9EddSn51Op9ZstadSg4VK1UKlKkmSDSMLALewiuNh/hVJq71Wxttmqz0dG88vPc+MgWP4grvYG3SLOBrZFFFrttqPe4HIDxh4GSei+98iSlusuYopXEAjBtEPA3tQwUpwluAbDm4TPJUz+BTW9l2Ce6G7L0X/Bw8D3T/7SKKIDzHg7QCcxjvcQAEtXAnrrg/RP0/DKPbqgcN4iVOR7gcO4dcQgRuoh7HSqwlP4n20m63jJu5n8MkWMYfP3UowhzdR8FU8w9iQwevBdyq3/27CMRzAE5yLuvsRLg+ZcR1nJ8YL81HWJUzGAPaFZwe/Q5MdyYDyNHgjzO90YyGHtVDncuiJchaHw8R4oREFV5qdiVmYLM3OgD9k5209/atmIAAAAABJRU5ErkJggg==\");\\n}\\n.bk-root .bk-tool-icon-point-draw {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gEMEiERGWPELgAAA4RJREFUWMO1lr1uG1cQhb9ztdRSP7AF1QxgwKlcuZSqRC9gWUUUINWqTh5AnaFOnVPEteQmRuhCURqWsSqqc9IolREXdEvQBElxtdw7KURSFEVKu4w8wAKLxdw9Z+bMnRmZGXfZ29//II8th4WwGVNyIoQLYB5vxA9Caq04iUd9A+7ZlsNC2I7TdSd2hZXMJKlnTqp9jtl/GBaqoyQ0noFKpUIzBicYYc+DEFpxkglc4oVJa5gvDn8v1xV2irG3FM4NSVwjUKlUaMcpJhCGmSEJQ6QGD8M5WnHCd8+f3QCXpPLx8WNwv0j6Bm9FMK7FJ3WBE+R/2t7c/GBmFvSBrzRTCsyTDjXrxUgEMtpxynJYmJoBJ4VAybwVARgvL7Oik0okCodnKpVKX7P0leiVMb0VvbJT+upznK4vh0GIeQwwQStJkHQD3MwsCALTJRG7Qrdrj5m/djgYaIa0hlkRdJk26XEgC9txurccBtVW3IudBImmZuACUP+ZlIDBt9FKcubYNTcAH/X0RYM1E7utJPlqe+uZzPxUcEkiSS4sTT95n15Mud0xWC0o2PAWOCdK3KYZlFxfM+tHOcnMzNr1es18ug+cgsVjP4yBU/Ppfrter1m/+l0+zYygML1xRVHU7TSb1cSzBzoBzszsH+AMdJJ49jrNZjWKou6wBnwOzcyndBpNbuueURR1Dw8Pq35p9cc5p/Dy9Dypt7jXrtdGwQECS9NPhr6Gq6txUzNigE6zydLK6lTw12/KT4FGFEUfJX2YJNONq5tVs4ODA7sD/DnwJ/BoADZuE3tHFs12dna6d4C/BI6AlbyzI8ii2TTw12/KK33gb2cdXsNZoAntbZC2SeO4c9592k/5eNQbiwvFd1kJuFGwLJr1wSPg/SwpvyFBHufOeXcFeAlE97U/uCxOY+P3b+Bn4B3Q+L8EdJfD4a+/AbC4UBzPxiPg3wlHZquB28Cn2IuR9x3gr3uV4DbwfvSDOvi4uFA8BDZmIRHkjHpS9Ht9iRqd8+5G3g05mAGcQbsdiX5QJ428G7Kygo8XYdb1/K4NWVmjzkNge2sz84bs+ELmpDDLtqWsNZBXgvmw8CTtpWVMT7x5YWBjLARnwZfKQNYN2U2LPvrh+5nBt7c2M2/It9bArCTKR8eZN+SJ13AScPnoODeRdqNenH+wul5w2gUr2WUjMFAt8bZ/0axX/wNnv4H8vTFb1QAAAABJRU5ErkJggg==\");\\n}\\n.bk-root .bk-tool-icon-poly-edit {\\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gELFi46qJmxxAAABV9JREFUWMOdl19vFFUYxn9n9u9sCyylUIzWUoMQBAWCMdEEIt6xIRQSLIEKtvHe6AcA4yeQb7CAUNJy0daLeomJN8SEULAC2kBBapBKoLvbmdl/c14vdmY7u91tF95kknPOnHmf95znPc97Ro2OTeBbdjFDT3c32ZxVHUOE9kSMB0/m6ExuoJn1H+ur6Y+OTfD50SMN5168OgrAlyf7CfuD+z7+iDs3p8hkLUQ0iFQ/yFl5Nm/qonfHVva+s32Zw9GxCYILsZ08tpNfBhbs+1YN4OH9+7huGdECSBVfqUosbsllfmauBqiR+cCNwOr7AEo8pPHJnymXykhg5fUWjoQpl0vVvhZhbSzGoUOHqgBlt6B6uruj2Zy1E9jo0fhfeyL2x4Mnc8VErK0KUEOB64JSyptfG4RSytsJjUJVxw2lsFy3urL9nx1Qd25ObctkrVMi+jQivd7U2ZyV/3Hzpq7h3h1b/7p9Y0o8v8rwAbTWrGpSocN/FGDlbAI0Rl23PCBan0Ok158H9Ipwzi25A/Mzc9Gl/BYx/E4kYqC1NKRARNAaDCNUM27Z+Zr+ouXs0q4+LSLBHPYCFkTkC6uU39kwCdsS7WRKmaYUiAhdnZ3MPX2K4+QjQI+C94A93rMzm8ltMwyDeDzWjMZeEb2pYQDdW3vITU2jtUZ5QThOPgm8C7wP7J15OPsBsB3oWpGnVWisCeDS1VHj4vBI92+/3tgB7Ab2AruAXiDBK5oIOkhtkEYRNRuJhObrd8Dl9ewf4D5wG7hVLpen29vb5wzD+BrkbBMaL3d1dk5nsrnlFDTTFWAWmAZueWD3gCemGde2k2fw1Al1YXhEvjozoO49eczdqekrWmsc2zlrmvEKOGoW1GUjFLqSk2KpJrCLwyMCPAP+BO54QL8DM6YZX/ClsP9YnwKkXnIBP4jdIpJRpdJTCYdMwwi98KU0Hjc/dDILNyUcwTCWdOSMJ0TRmBktGRhLugu0xyLk7CIqVNm+0bGJptl1YXikD0grpY4Rjc4a8Fbgdab/6OGbAJeCUuyJnnHmZH9pbSyGuBXV8NUwlUpR1EWyixmSyTWEwqGlJ2Swbo2JXbAAfgDGgGQA9I1A9t1tlq0AxrXxn0ilUpw4fhQqYkH/sT41OTnJJwf2s6FjI5mshdYa7bqVR2uezr9MJmJt14FvGrh/O9D+e6UkM/xyCuCqEKCYnJyUTKFQrZDHjxzGshwWLQcRsOz8Hi85P23id0ug/XilAMLBmm4tPGdoaKjSH5+oAGrhwvBI9SjZTn4QSK9yenoD7dlrExPoJlXW8G8ytpNHxRKk02lGxsdRKFwXLNvx5yY94HQLGhGk4LFCYQSqaE0AwWM1eOoEbR0dKBSW7bC4mKuffxs4D/wCLKwQQPAUzIkslfp6cVomROWSolh0GjldAM4nzDi2k9/i5UAzC9aKfwNJ3zgJg9YEvN6+C7SHgKm69+sD7RfNnKTTaZRPQfAut4oFV//IS7gkcB34VlVo8kGzphlfB+DU+TfNGBpZtRastvrvARJmfMF28ge9sc2B9/PNnCilMIDwK6y8/ow/Ai4kvILTljAXvDvEvrqKSUs60KolzPjBxspavQD2tKqCAGF/Ba+xE/Wbilu54wZV8NEKF5fXzQHl/bh4hUsE0WAXSlDMYcQSrQXgCmsTseXHsJkNnjqBFGwKJaHsKlxtUHYVhbLCzr1kaOA4bcn1y1Swmb+iLpJKpVrfgdpfsiVVCYcgluwgnU7jEgJ4s5UkLFtWYyHyEg0/N1q1tmQH+YXnAMFr97Nmv3p+0QsHQRsF8qpBOE5+rb9Nkaj50tVQKjqh4OU3GNL/1/So3vuUgbAAAAAASUVORK5CYII=\");\\n}\\n'),o.bk_tool_icon_box_select=\"bk-tool-icon-box-select\",o.bk_tool_icon_box_zoom=\"bk-tool-icon-box-zoom\",o.bk_tool_icon_zoom_in=\"bk-tool-icon-zoom-in\",o.bk_tool_icon_zoom_out=\"bk-tool-icon-zoom-out\",o.bk_tool_icon_help=\"bk-tool-icon-help\",o.bk_tool_icon_hover=\"bk-tool-icon-hover\",o.bk_tool_icon_crosshair=\"bk-tool-icon-crosshair\",o.bk_tool_icon_lasso_select=\"bk-tool-icon-lasso-select\",o.bk_tool_icon_pan=\"bk-tool-icon-pan\",o.bk_tool_icon_xpan=\"bk-tool-icon-xpan\",o.bk_tool_icon_ypan=\"bk-tool-icon-ypan\",o.bk_tool_icon_range=\"bk-tool-icon-range\",o.bk_tool_icon_polygon_select=\"bk-tool-icon-polygon-select\",o.bk_tool_icon_redo=\"bk-tool-icon-redo\",o.bk_tool_icon_reset=\"bk-tool-icon-reset\",o.bk_tool_icon_save=\"bk-tool-icon-save\",o.bk_tool_icon_tap_select=\"bk-tool-icon-tap-select\",o.bk_tool_icon_undo=\"bk-tool-icon-undo\",o.bk_tool_icon_wheel_pan=\"bk-tool-icon-wheel-pan\",o.bk_tool_icon_wheel_zoom=\"bk-tool-icon-wheel-zoom\",o.bk_tool_icon_box_edit=\"bk-tool-icon-box-edit\",o.bk_tool_icon_freehand_draw=\"bk-tool-icon-freehand-draw\",o.bk_tool_icon_poly_draw=\"bk-tool-icon-poly-draw\",o.bk_tool_icon_point_draw=\"bk-tool-icon-point-draw\",o.bk_tool_icon_poly_edit=\"bk-tool-icon-poly-edit\"},\n", | |
" function _(o,l,g){o(164),o(163).styles.append(\".bk-root .bk-logo {\\n margin: 5px;\\n position: relative;\\n display: block;\\n background-repeat: no-repeat;\\n}\\n.bk-root .bk-logo.bk-grey {\\n filter: url(\\\"data:image/svg+xml;utf8,<svg xmlns=\\\\'http://www.w3.org/2000/svg\\\\'><filter id=\\\\'grayscale\\\\'><feColorMatrix type=\\\\'matrix\\\\' values=\\\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\\\'/></filter></svg>#grayscale\\\");\\n /* Firefox 10+, Firefox on Android */\\n filter: gray;\\n /* IE6-9 */\\n -webkit-filter: grayscale(100%);\\n /* Chrome 19+, Safari 6+, Safari 6+ iOS */\\n}\\n.bk-root .bk-logo-small {\\n width: 20px;\\n height: 20px;\\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAOkSURBVDiNjZRtaJVlGMd/1/08zzln5zjP1LWcU9N0NkN8m2CYjpgQYQXqSs0I84OLIC0hkEKoPtiH3gmKoiJDU7QpLgoLjLIQCpEsNJ1vqUOdO7ppbuec5+V+rj4ctwzd8IIbbi6u+8f1539dt3A78eXC7QizUF7gyV1fD1Yqg4JWz84yffhm0qkFqBogB9rM8tZdtwVsPUhWhGcFJngGeWrPzHm5oaMmkfEg1usvLFyc8jLRqDOMru7AyC8saQr7GG7f5fvDeH7Ej8CM66nIF+8yngt6HWaKh7k49Soy9nXurCi1o3qUbS3zWfrYeQDTB/Qj6kX6Ybhw4B+bOYoLKCC9H3Nu/leUTZ1JdRWkkn2ldcCamzrcf47KKXdAJllSlxAOkRgyHsGC/zRday5Qld9DyoM4/q/rUoy/CXh3jzOu3bHUVZeU+DEn8FInkPBFlu3+nW3Nw0mk6vCDiWg8CeJaxEwuHS3+z5RgY+YBR6V1Z1nxSOfoaPa4LASWxxdNp+VWTk7+4vzaou8v8PN+xo+KY2xsw6une2frhw05CTYOmQvsEhjhWjn0bmXPjpE1+kplmmkP3suftwTubK9Vq22qKmrBhpY4jvd5afdRA3wGjFAgcnTK2s4hY0/GPNIb0nErGMCRxWOOX64Z8RAC4oCXdklmEvcL8o0BfkNK4lUg9HTl+oPlQxdNo3Mg4Nv175e/1LDGzZen30MEjRUtmXSfiTVu1kK8W4txyV6BMKlbgk3lMwYCiusNy9fVfvvwMxv8Ynl6vxoByANLTWplvuj/nF9m2+PDtt1eiHPBr1oIfhCChQMBw6Aw0UulqTKZdfVvfG7VcfIqLG9bcldL/+pdWTLxLUy8Qq38heUIjh4XlzZxzQm19lLFlr8vdQ97rjZVOLf8nclzckbcD4wxXMidpX30sFd37Fv/GtwwhzhxGVAprjbg0gCAEeIgwCZyTV2Z1REEW8O4py0wsjeloKoMr6iCY6dP92H6Vw/oTyICIthibxjm/DfN9lVz8IqtqKYLUXfoKVMVQVVJOElGjrnnUt9T9wbgp8AyYKaGlqingHZU/uG2NTZSVqwHQTWkx9hxjkpWDaCg6Ckj5qebgBVbT3V3NNXMSiWSDdGV3hrtzla7J+duwPOToIg42ChPQOQjspnSlp1V+Gjdged7+8UN5CRAV7a5EdFNwCjEaBR27b3W890TE7g24NAP/mMDXRWrGoFPQI9ls/MWO2dWFAar/xcOIImbbpA3zgAAAABJRU5ErkJggg==);\\n}\\n.bk-root .bk-logo-notebook {\\n display: inline-block;\\n vertical-align: middle;\\n margin-right: 5px;\\n}\\n\"),g.bk_logo=\"bk-logo\",g.bk_logo_notebook=\"bk-logo-notebook\",g.bk_logo_small=\"bk-logo-small\",g.bk_grey=\"bk-grey\"},\n", | |
" function _(t,e,i){var n=t(113),s=this&&this.__rest||function(t,e){var i={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(i[n]=t[n]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(i[n[s]]=t[n[s]])}return i},r=t(278),a=t(274),o=t(280),l=t(175),h=t(339),_=t(236),u=t(243),d=t(237),p=t(376),c=t(116),v=t(194),g=t(165),f=t(167),m=t(377),y=t(109),b=t(110),w=t(125),x=t(282),O=t(285),k=t(378),S=t(286),z=t(181),R=null,P=function(t){function e(){var e=t.apply(this,arguments)||this;return e.min_border={left:0,top:0,right:0,bottom:0},e}return n.__extends(e,t),e.prototype._measure=function(t){var e=this;t=new x.Sizeable(t).bounded_to(this.sizing.size);var i,n,s,r=this.left_panel.measure({width:0,height:t.height}),a=Math.max(r.width,this.min_border.left),o=this.right_panel.measure({width:0,height:t.height}),l=Math.max(o.width,this.min_border.right),h=this.top_panel.measure({width:t.width,height:0}),_=Math.max(h.height,this.min_border.top),u=this.bottom_panel.measure({width:t.width,height:0}),d=Math.max(u.height,this.min_border.bottom),p=new x.Sizeable(t).shrink_by({left:a,right:l,top:_,bottom:d}),c=this.center_panel.measure(p);return{width:a+c.width+l,height:_+c.height+d,inner:{left:a,right:l,top:_,bottom:d},align:(i=e.center_panel.sizing,n=i.width_policy,s=i.height_policy,\"fixed\"!=n&&\"fixed\"!=s)}},e.prototype._set_geometry=function(e,i){t.prototype._set_geometry.call(this,e,i),this.center_panel.set_geometry(i);var n=this.left_panel.measure({width:0,height:e.height}),s=this.right_panel.measure({width:0,height:e.height}),r=this.top_panel.measure({width:e.width,height:0}),a=this.bottom_panel.measure({width:e.width,height:0}),o=i.left,l=i.top,h=i.right,_=i.bottom;this.top_panel.set_geometry(new z.BBox({left:o,right:h,bottom:l,height:r.height})),this.bottom_panel.set_geometry(new z.BBox({left:o,right:h,top:_,height:a.height})),this.left_panel.set_geometry(new z.BBox({top:l,bottom:_,right:o,width:n.width})),this.right_panel.set_geometry(new z.BBox({top:l,bottom:_,left:h,width:s.width}))},e}(x.Layoutable);i.PlotLayout=P,P.__name__=\"PlotLayout\";var B=function(e){function i(){var t=e.apply(this,arguments)||this;return t._outer_bbox=new z.BBox,t._inner_bbox=new z.BBox,t._needs_paint=!0,t._needs_layout=!1,t}return n.__extends(i,e),Object.defineProperty(i.prototype,\"canvas_overlays\",{get:function(){return this.canvas_view.overlays_el},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"canvas_events\",{get:function(){return this.canvas_view.events_el},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"is_paused\",{get:function(){return null!=this._is_paused&&0!==this._is_paused},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,\"child_models\",{get:function(){return[]},enumerable:!0,configurable:!0}),i.prototype.pause=function(){null==this._is_paused?this._is_paused=1:this._is_paused+=1},i.prototype.unpause=function(t){if(void 0===t&&(t=!1),null==this._is_paused)throw new Error(\"wasn't paused\");this._is_paused-=1,0!=this._is_paused||t||this.request_paint()},i.prototype.request_render=function(){this.request_paint()},i.prototype.request_paint=function(){this.is_paused||this.throttled_paint()},i.prototype.request_layout=function(){this._needs_layout=!0,this.request_paint()},i.prototype.reset=function(){\"standard\"==this.model.reset_policy&&(this.clear_state(),this.reset_range(),this.reset_selection()),this.model.trigger_event(new p.Reset)},i.prototype.remove=function(){this.ui_event_bus.destroy(),v.remove_views(this.renderer_views),v.remove_views(this.tool_views),this.canvas_view.remove(),e.prototype.remove.call(this)},i.prototype.render=function(){e.prototype.render.call(this),this.el.appendChild(this.canvas_view.el),this.canvas_view.render()},i.prototype.initialize=function(){var i=this;this.pause(),e.prototype.initialize.call(this),this.force_paint=new c.Signal0(this,\"force_paint\"),this.state_changed=new c.Signal0(this,\"state_changed\"),this.lod_started=!1,this.visuals=new g.Visuals(this.model),this._initial_state_info={selection:{},dimensions:{width:0,height:0}},this.visibility_callbacks=[],this.state={history:[],index:-1},this.canvas=new a.Canvas({map:this.model.use_map||!1,use_hidpi:this.model.hidpi,output_backend:this.model.output_backend}),this.frame=new r.CartesianFrame(this.model.x_scale,this.model.y_scale,this.model.x_range,this.model.y_range,this.model.extra_x_ranges,this.model.extra_y_ranges),this.canvas_view=new this.canvas.default_view({model:this.canvas,parent:this}),\"webgl\"==this.model.output_backend&&this.init_webgl(),this.throttled_paint=m.throttle(function(){return i.force_paint.emit()},15);var n=t(379).UIEvents;this.ui_event_bus=new n(this,this.model.toolbar,this.canvas_view.events_el);var s=this.model,o=s.title_location,l=s.title;null!=o&&null!=l&&(this._title=l instanceof _.Title?l:new _.Title({text:l}));var h=this.model,u=h.toolbar_location,p=h.toolbar;null!=u&&null!=p&&(this._toolbar=new d.ToolbarPanel({toolbar:p}),p.toolbar_location=u),this.renderer_views={},this.tool_views={},this.build_renderer_views(),this.build_tool_views(),this.update_dataranges(),this.unpause(!0),f.logger.debug(\"PlotView initialized\")},i.prototype._width_policy=function(){return null==this.model.frame_width?e.prototype._width_policy.call(this):\"min\"},i.prototype._height_policy=function(){return null==this.model.frame_height?e.prototype._height_policy.call(this):\"min\"},i.prototype._update_layout=function(){var t=this;this.layout=new P,this.layout.set_sizing(this.box_sizing());var e=this.model,i=e.frame_width,n=e.frame_height;this.layout.center_panel=this.frame,this.layout.center_panel.set_sizing(Object.assign(Object.assign({},null!=i?{width_policy:\"fixed\",width:i}:{width_policy:\"fit\"}),null!=n?{height_policy:\"fixed\",height:n}:{height_policy:\"fit\"}));var s=b.copy(this.model.above),r=b.copy(this.model.below),a=b.copy(this.model.left),o=b.copy(this.model.right),l=function(t){switch(t){case\"above\":return s;case\"below\":return r;case\"left\":return a;case\"right\":return o}},h=this.model,u=h.title_location,p=h.title;null!=u&&null!=p&&l(u).push(this._title);var c=this.model,v=c.toolbar_location,g=c.toolbar;if(null!=v&&null!=g){var f=l(v),m=!0;if(this.model.toolbar_sticky)for(var w=0;w<f.length;w++){var x=f[w];if(x instanceof _.Title){f[w]=\"above\"==v||\"below\"==v?[x,this._toolbar]:[this._toolbar,x],m=!1;break}}m&&f.push(this._toolbar)}var z=function(e,i){var n=t.renderer_views[i.id];return n.layout=new k.SidePanel(e,n)},R=function(t,e){for(var i=\"above\"==t||\"below\"==t,n=[],s=0,r=e;s<r.length;s++){var a=r[s];if(y.isArray(a)){var o=a.map(function(e){var n,s=z(t,e);if(e instanceof d.ToolbarPanel){var r=i?\"width_policy\":\"height_policy\";s.set_sizing(Object.assign(Object.assign({},s.sizing),((n={})[r]=\"min\",n)))}return s}),l=void 0;i?(l=new S.Row(o)).set_sizing({width_policy:\"max\",height_policy:\"min\"}):(l=new S.Column(o)).set_sizing({width_policy:\"min\",height_policy:\"max\"}),l.absolute=!0,n.push(l)}else n.push(z(t,a))}return n},B=null!=this.model.min_border?this.model.min_border:0;this.layout.min_border={left:null!=this.model.min_border_left?this.model.min_border_left:B,top:null!=this.model.min_border_top?this.model.min_border_top:B,right:null!=this.model.min_border_right?this.model.min_border_right:B,bottom:null!=this.model.min_border_bottom?this.model.min_border_bottom:B};var M=new O.VStack,j=new O.VStack,E=new O.HStack,L=new O.HStack;M.children=b.reversed(R(\"above\",s)),j.children=R(\"below\",r),E.children=b.reversed(R(\"left\",a)),L.children=R(\"right\",o),M.set_sizing({width_policy:\"fit\",height_policy:\"min\"}),j.set_sizing({width_policy:\"fit\",height_policy:\"min\"}),E.set_sizing({width_policy:\"min\",height_policy:\"fit\"}),L.set_sizing({width_policy:\"min\",height_policy:\"fit\"}),this.layout.top_panel=M,this.layout.bottom_panel=j,this.layout.left_panel=E,this.layout.right_panel=L},Object.defineProperty(i.prototype,\"axis_views\",{get:function(){var t=[];for(var e in this.renderer_views){var i=this.renderer_views[e];i instanceof u.AxisView&&t.push(i)}return t},enumerable:!0,configurable:!0}),i.prototype.set_cursor=function(t){void 0===t&&(t=\"default\"),this.canvas_view.el.style.cursor=t},i.prototype.set_toolbar_visibility=function(t){for(var e=0,i=this.visibility_callbacks;e<i.length;e++){(0,i[e])(t)}},i.prototype.init_webgl=function(){if(null==R){var t=document.createElement(\"canvas\"),e=t.getContext(\"webgl\",{premultipliedAlpha:!0});null!=e&&(R={canvas:t,ctx:e})}null!=R?this.gl=R:f.logger.warn(\"WebGL is not supported, falling back to 2D canvas.\")},i.prototype.prepare_webgl=function(t,e){if(null!=this.gl){var i=this.canvas_view.get_canvas_element();this.gl.canvas.width=i.width,this.gl.canvas.height=i.height;var n=this.gl.ctx;n.enable(n.SCISSOR_TEST);var s=e[0],r=e[1],a=e[2],o=e[3],l=this.canvas_view.bbox,h=l.xview,_=l.yview,u=h.compute(s),d=_.compute(r+o);n.scissor(t*u,t*d,t*a,t*o),n.enable(n.BLEND),n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE_MINUS_DST_ALPHA,n.ONE)}},i.prototype.clear_webgl=function(){if(null!=this.gl){var t=this.gl.ctx;t.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT||t.DEPTH_BUFFER_BIT)}},i.prototype.blit_webgl=function(){var t=this.canvas_view.ctx;if(null!=this.gl){f.logger.debug(\"drawing with WebGL\"),t.restore(),t.drawImage(this.gl.canvas,0,0),t.save();var e=this.canvas.pixel_ratio;t.scale(e,e),t.translate(.5,.5)}},i.prototype.update_dataranges=function(){for(var t={},e={},i=!1,n=0,s=w.values(this.frame.x_ranges).concat(w.values(this.frame.y_ranges));n<s.length;n++){var r=s[n];r instanceof o.DataRange1d&&\"log\"==r.scale_hint&&(i=!0)}for(var a in this.renderer_views){var h=this.renderer_views[a];if(h instanceof l.GlyphRendererView){var _=h.glyph.bounds();if(null!=_&&(t[a]=_),i){var u=h.glyph.log_bounds();null!=u&&(e[a]=u)}}}var d,p=!1,c=!1,v=this.frame.bbox,g=v.width,m=v.height;!1!==this.model.match_aspect&&0!=g&&0!=m&&(d=1/this.model.aspect_scale*(g/m));for(var y=0,b=w.values(this.frame.x_ranges);y<b.length;y++){if((R=b[y])instanceof o.DataRange1d){var x=\"log\"==R.scale_hint?e:t;R.update(x,0,this.model.id,d),R.follow&&(p=!0)}null!=R.bounds&&(c=!0)}for(var O=0,k=w.values(this.frame.y_ranges);O<k.length;O++){if((M=k[O])instanceof o.DataRange1d){x=\"log\"==M.scale_hint?e:t;M.update(x,1,this.model.id,d),M.follow&&(p=!0)}null!=M.bounds&&(c=!0)}if(p&&c){f.logger.warn(\"Follow enabled so bounds are unset.\");for(var S=0,z=w.values(this.frame.x_ranges);S<z.length;S++){var R;(R=z[S]).bounds=null}for(var P=0,B=w.values(this.frame.y_ranges);P<B.length;P++){var M;(M=B[P]).bounds=null}}this.range_update_timestamp=Date.now()},i.prototype.map_to_screen=function(t,e,i,n){return void 0===i&&(i=\"default\"),void 0===n&&(n=\"default\"),this.frame.map_to_screen(t,e,i,n)},i.prototype.push_state=function(t,e){var i=this.state,n=i.history,s=i.index,r=null!=n[s]?n[s].info:{},a=Object.assign(Object.assign(Object.assign({},this._initial_state_info),r),e);this.state.history=this.state.history.slice(0,this.state.index+1),this.state.history.push({type:t,info:a}),this.state.index=this.state.history.length-1,this.state_changed.emit()},i.prototype.clear_state=function(){this.state={history:[],index:-1},this.state_changed.emit()},i.prototype.can_undo=function(){return this.state.index>=0},i.prototype.can_redo=function(){return this.state.index<this.state.history.length-1},i.prototype.undo=function(){this.can_undo()&&(this.state.index-=1,this._do_state_change(this.state.index),this.state_changed.emit())},i.prototype.redo=function(){this.can_redo()&&(this.state.index+=1,this._do_state_change(this.state.index),this.state_changed.emit())},i.prototype._do_state_change=function(t){var e=null!=this.state.history[t]?this.state.history[t].info:this._initial_state_info;null!=e.range&&this.update_range(e.range),null!=e.selection&&this.update_selection(e.selection)},i.prototype.get_selection=function(){for(var t={},e=0,i=this.model.renderers;e<i.length;e++){var n=i[e];if(n instanceof l.GlyphRenderer){var s=n.data_source.selected;t[n.id]=s}}return t},i.prototype.update_selection=function(t){for(var e=0,i=this.model.renderers;e<i.length;e++){var n=i[e];if(n instanceof l.GlyphRenderer){var s=n.data_source;null!=t?null!=t[n.id]&&s.selected.update(t[n.id],!0,!1):s.selection_manager.clear()}}},i.prototype.reset_selection=function(){this.update_selection(null)},i.prototype._update_ranges_together=function(t){for(var e=1,i=0,n=t;i<n.length;i++){var s=n[i],r=s[0],a=s[1];e=Math.min(e,this._get_weight_to_constrain_interval(r,a))}if(e<1)for(var o=0,l=t;o<l.length;o++){var h=l[o];r=h[0];(a=h[1]).start=e*a.start+(1-e)*r.start,a.end=e*a.end+(1-e)*r.end}},i.prototype._update_ranges_individually=function(t,e,i,n){for(var s=!1,r=0,a=t;r<a.length;r++){var o=a[r],l=o[0],h=o[1];if(!i){var _=this._get_weight_to_constrain_interval(l,h);_<1&&(h.start=_*h.start+(1-_)*l.start,h.end=_*h.end+(1-_)*l.end)}if(null!=l.bounds&&\"auto\"!=l.bounds){var u=l.bounds,d=u[0],p=u[1],c=Math.abs(h.end-h.start);l.is_reversed?(null!=d&&d>=h.end&&(s=!0,h.end=d,(e||i)&&(h.start=d+c)),null!=p&&p<=h.start&&(s=!0,h.start=p,(e||i)&&(h.end=p-c))):(null!=d&&d>=h.start&&(s=!0,h.start=d,(e||i)&&(h.end=d+c)),null!=p&&p<=h.end&&(s=!0,h.end=p,(e||i)&&(h.start=p-c)))}}if(!(i&&s&&n))for(var v=0,g=t;v<g.length;v++){var f=g[v];l=f[0],h=f[1];l.have_updated_interactively=!0,l.start==h.start&&l.end==h.end||l.setv(h)}},i.prototype._get_weight_to_constrain_interval=function(t,e){var i=t.min_interval,n=t.max_interval;if(null!=t.bounds&&\"auto\"!=t.bounds){var s=t.bounds,r=s[0],a=s[1];if(null!=r&&null!=a){var o=Math.abs(a-r);n=null!=n?Math.min(n,o):o}}var l=1;if(null!=i||null!=n){var h=Math.abs(t.end-t.start),_=Math.abs(e.end-e.start);i>0&&_<i&&(l=(h-i)/(h-_)),n>0&&_>n&&(l=(n-h)/(_-h)),l=Math.max(0,Math.min(1,l))}return l},i.prototype.update_range=function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=!1),void 0===n&&(n=!0),this.pause();var s=this.frame,r=s.x_ranges,a=s.y_ranges;if(null==t){for(var o in r){(h=r[o]).reset()}for(var o in a){(h=a[o]).reset()}this.update_dataranges()}else{var l=[];for(var o in r){var h=r[o];l.push([h,t.xrs[o]])}for(var o in a){h=a[o];l.push([h,t.yrs[o]])}i&&this._update_ranges_together(l),this._update_ranges_individually(l,e,i,n)}this.unpause()},i.prototype.reset_range=function(){this.update_range(null)},i.prototype._invalidate_layout=function(){var t=this;(function(){for(var e=0,i=t.model.side_panels;e<i.length;e++){var n=i[e];if(t.renderer_views[n.id].layout.has_size_changed())return!0}return!1})()&&this.root.compute_layout()},i.prototype.build_renderer_views=function(){var t,e,i,n,s,r,a;this.computed_renderers=[],(t=this.computed_renderers).push.apply(t,this.model.above),(e=this.computed_renderers).push.apply(e,this.model.below),(i=this.computed_renderers).push.apply(i,this.model.left),(n=this.computed_renderers).push.apply(n,this.model.right),(s=this.computed_renderers).push.apply(s,this.model.center),(r=this.computed_renderers).push.apply(r,this.model.renderers),null!=this._title&&this.computed_renderers.push(this._title),null!=this._toolbar&&this.computed_renderers.push(this._toolbar);for(var o=0,l=this.model.toolbar.tools;o<l.length;o++){var h=l[o];null!=h.overlay&&this.computed_renderers.push(h.overlay),(a=this.computed_renderers).push.apply(a,h.synthetic_renderers)}v.build_views(this.renderer_views,this.computed_renderers,{parent:this})},i.prototype.get_renderer_views=function(){var t=this;return this.computed_renderers.map(function(e){return t.renderer_views[e.id]})},i.prototype.build_tool_views=function(){var t=this,e=this.model.toolbar.tools;v.build_views(this.tool_views,e,{parent:this}).map(function(e){return t.ui_event_bus.register_tool(e)})},i.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.force_paint,function(){return t.repaint()});var i=this.frame,n=i.x_ranges,s=i.y_ranges;for(var r in n){var a=n[r];this.connect(a.change,function(){t._needs_layout=!0,t.request_paint()})}for(var r in s){a=s[r];this.connect(a.change,function(){t._needs_layout=!0,t.request_paint()})}this.connect(this.model.properties.renderers.change,function(){return t.build_renderer_views()}),this.connect(this.model.toolbar.properties.tools.change,function(){t.build_renderer_views(),t.build_tool_views()}),this.connect(this.model.change,function(){return t.request_paint()}),this.connect(this.model.reset,function(){return t.reset()})},i.prototype.set_initial_range=function(){var t=!0,e=this.frame,i=e.x_ranges,n=e.y_ranges,s={},r={};for(var a in i){var o=i[a],l=o.start,h=o.end;if(null==l||null==h||y.isStrictNaN(l+h)){t=!1;break}s[a]={start:l,end:h}}if(t)for(var a in n){var _=n[a];l=_.start,h=_.end;if(null==l||null==h||y.isStrictNaN(l+h)){t=!1;break}r[a]={start:l,end:h}}t?(this._initial_state_info.range={xrs:s,yrs:r},f.logger.debug(\"initial ranges set\")):f.logger.warn(\"could not set initial ranges\")},i.prototype.has_finished=function(){if(!e.prototype.has_finished.call(this))return!1;for(var t in this.renderer_views){if(!this.renderer_views[t].has_finished())return!1}return!0},i.prototype.after_layout=function(){if(e.prototype.after_layout.call(this),this._needs_layout=!1,this.model.setv({inner_width:Math.round(this.frame._width.value),inner_height:Math.round(this.frame._height.value),outer_width:Math.round(this.layout._width.value),outer_height:Math.round(this.layout._height.value)},{no_change:!0}),!1!==this.model.match_aspect&&(this.pause(),this.update_dataranges(),this.unpause(!0)),!this._outer_bbox.equals(this.layout.bbox)){var t=this.layout.bbox,i=t.width,n=t.height;this.canvas_view.prepare_canvas(i,n),this._outer_bbox=this.layout.bbox,this._needs_paint=!0}this._inner_bbox.equals(this.frame.inner_bbox)||(this._inner_bbox=this.layout.inner_bbox,this._needs_paint=!0),this._needs_paint&&(this._needs_paint=!1,this.paint())},i.prototype.repaint=function(){this._needs_layout&&this._invalidate_layout(),this.paint()},i.prototype.paint=function(){var t=this;if(!this.is_paused){f.logger.trace(\"PlotView.paint() for \"+this.model.id);var e=this.model.document;if(null!=e){var i=e.interactive_duration();i>=0&&i<this.model.lod_interval?setTimeout(function(){e.interactive_duration()>t.model.lod_timeout&&e.interactive_stop(t.model),t.request_paint()},this.model.lod_timeout):e.interactive_stop(this.model)}for(var n in this.renderer_views){var s=this.renderer_views[n];if(null==this.range_update_timestamp||s instanceof l.GlyphRendererView&&s.set_data_timestamp>this.range_update_timestamp){this.update_dataranges();break}}var r=this.canvas_view.ctx,a=this.canvas.pixel_ratio;r.save(),r.scale(a,a),r.translate(.5,.5);var o=[this.frame._left.value,this.frame._top.value,this.frame._width.value,this.frame._height.value];if(this._map_hook(r,o),this._paint_empty(r,o),this.prepare_webgl(a,o),this.clear_webgl(),this.visuals.outline_line.doit){r.save(),this.visuals.outline_line.set_value(r);var h=o[0],_=o[1],u=o[2],d=o[3];h+u==this.layout._width.value&&(u-=1),_+d==this.layout._height.value&&(d-=1),r.strokeRect(h,_,u,d),r.restore()}this._paint_levels(r,[\"image\",\"underlay\",\"glyph\"],o,!0),this._paint_levels(r,[\"annotation\"],o,!1),this._paint_levels(r,[\"overlay\"],o,!1),null==this._initial_state_info.range&&this.set_initial_range(),r.restore()}},i.prototype._paint_levels=function(t,e,i,n){for(var s=0,r=e;s<r.length;s++)for(var a=r[s],o=0,l=this.computed_renderers;o<l.length;o++){var h=l[o];if(h.level==a){var _=this.renderer_views[h.id];t.save(),(n||_.needs_clip)&&(t.beginPath(),t.rect.apply(t,i),t.clip()),_.render(),t.restore(),_.has_webgl&&(this.blit_webgl(),this.clear_webgl())}}},i.prototype._map_hook=function(t,e){},i.prototype._paint_empty=function(t,e){var i=[0,0,this.layout._width.value,this.layout._height.value],n=i[0],s=i[1],r=i[2],a=i[3],o=e[0],l=e[1],h=e[2],_=e[3];t.clearRect(n,s,r,a),this.visuals.border_fill.doit&&(this.visuals.border_fill.set_value(t),t.fillRect(n,s,r,a),t.clearRect(o,l,h,_)),this.visuals.background_fill.doit&&(this.visuals.background_fill.set_value(t),t.fillRect(o,l,h,_))},i.prototype.save=function(t){switch(this.model.output_backend){case\"canvas\":case\"webgl\":var e=this.canvas_view.get_canvas_element();if(null!=e.msToBlob){var i=e.msToBlob();window.navigator.msSaveBlob(i,t)}else{var n=document.createElement(\"a\");n.href=e.toDataURL(\"image/png\"),n.download=t+\".png\",n.target=\"_blank\",n.dispatchEvent(new MouseEvent(\"click\"))}break;case\"svg\":var s=this.canvas_view._ctx.getSerializedSvg(!0),r=new Blob([s],{type:\"text/plain\"}),a=document.createElement(\"a\");a.download=t+\".svg\",a.innerHTML=\"Download svg\",a.href=window.URL.createObjectURL(r),a.onclick=function(t){return document.body.removeChild(t.target)},a.style.display=\"none\",document.body.appendChild(a),a.click()}},i.prototype.serializable_state=function(){var t=e.prototype.serializable_state.call(this),i=t.children,r=s(t,[\"children\"]),a=this.get_renderer_views().map(function(t){return t.serializable_state()}).filter(function(t){return\"bbox\"in t});return Object.assign(Object.assign({},r),{children:n.__spreadArrays(i,a)})},i}(h.LayoutDOMView);i.PlotView=B,B.__name__=\"PlotView\"},\n", | |
" function _(t,n,e){var r=t(113),_=this&&this.__decorate||function(t,n,e,r){var _,o=arguments.length,s=o<3?n:null===r?r=Object.getOwnPropertyDescriptor(n,e):r;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)s=Reflect.decorate(t,n,e,r);else for(var i=t.length-1;i>=0;i--)(_=t[i])&&(s=(o<3?_(s):o>3?_(n,e,s):_(n,e))||s);return o>3&&s&&Object.defineProperty(n,e,s),s};function o(t){return function(n){n.prototype.event_name=t}}var s=function(){function t(){}return t.prototype.to_json=function(){return{event_name:this.event_name,event_values:this._to_json()}},t.prototype._to_json=function(){var t=this.origin;return{model_id:null!=t?t.id:null}},t}();e.BokehEvent=s,s.__name__=\"BokehEvent\";var i=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(s);i.__name__=\"ButtonClick\",i=_([o(\"button_click\")],i),e.ButtonClick=i;var a=function(t){function n(n){var e=t.call(this)||this;return e.item=n,e}return r.__extends(n,t),n.prototype._to_json=function(){var n=this.item;return Object.assign(Object.assign({},t.prototype._to_json.call(this)),{item:n})},n}(s);a.__name__=\"MenuItemClick\",a=_([o(\"menu_item_click\")],a),e.MenuItemClick=a;var u=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(s);e.UIEvent=u,u.__name__=\"UIEvent\";var l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(u);l.__name__=\"LODStart\",l=_([o(\"lodstart\")],l),e.LODStart=l;var c=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(u);c.__name__=\"LODEnd\",c=_([o(\"lodend\")],c),e.LODEnd=c;var p=function(t){function n(n,e){var r=t.call(this)||this;return r.geometry=n,r.final=e,r}return r.__extends(n,t),n.prototype._to_json=function(){var n=this.geometry,e=this.final;return Object.assign(Object.assign({},t.prototype._to_json.call(this)),{geometry:n,final:e})},n}(u);p.__name__=\"SelectionGeometry\",p=_([o(\"selectiongeometry\")],p),e.SelectionGeometry=p;var h=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(u);h.__name__=\"Reset\",h=_([o(\"reset\")],h),e.Reset=h;var f=function(t){function n(n,e,r,_){var o=t.call(this)||this;return o.sx=n,o.sy=e,o.x=r,o.y=_,o}return r.__extends(n,t),n.prototype._to_json=function(){var n=this.sx,e=this.sy,r=this.x,_=this.y;return Object.assign(Object.assign({},t.prototype._to_json.call(this)),{sx:n,sy:e,x:r,y:_})},n}(u);e.PointEvent=f,f.__name__=\"PointEvent\";var y=function(t){function n(n,e,r,_,o,s){var i=t.call(this,n,e,r,_)||this;return i.sx=n,i.sy=e,i.x=r,i.y=_,i.delta_x=o,i.delta_y=s,i}return r.__extends(n,t),n.prototype._to_json=function(){var n=this.delta_x,e=this.delta_y;return Object.assign(Object.assign({},t.prototype._to_json.call(this)),{delta_x:n,delta_y:e})},n}(f);y.__name__=\"Pan\",y=_([o(\"pan\")],y),e.Pan=y;var v=function(t){function n(n,e,r,_,o){var s=t.call(this,n,e,r,_)||this;return s.sx=n,s.sy=e,s.x=r,s.y=_,s.scale=o,s}return r.__extends(n,t),n.prototype._to_json=function(){var n=this.scale;return Object.assign(Object.assign({},t.prototype._to_json.call(this)),{scale:n})},n}(f);v.__name__=\"Pinch\",v=_([o(\"pinch\")],v),e.Pinch=v;var d=function(t){function n(n,e,r,_,o){var s=t.call(this,n,e,r,_)||this;return s.sx=n,s.sy=e,s.x=r,s.y=_,s.rotation=o,s}return r.__extends(n,t),n.prototype._to_json=function(){var n=this.rotation;return Object.assign(Object.assign({},t.prototype._to_json.call(this)),{rotation:n})},n}(f);d.__name__=\"Rotate\",d=_([o(\"rotate\")],d),e.Rotate=d;var m=function(t){function n(n,e,r,_,o){var s=t.call(this,n,e,r,_)||this;return s.sx=n,s.sy=e,s.x=r,s.y=_,s.delta=o,s}return r.__extends(n,t),n.prototype._to_json=function(){var n=this.delta;return Object.assign(Object.assign({},t.prototype._to_json.call(this)),{delta:n})},n}(f);m.__name__=\"MouseWheel\",m=_([o(\"wheel\")],m),e.MouseWheel=m;var x=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);x.__name__=\"MouseMove\",x=_([o(\"mousemove\")],x),e.MouseMove=x;var j=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);j.__name__=\"MouseEnter\",j=_([o(\"mouseenter\")],j),e.MouseEnter=j;var g=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);g.__name__=\"MouseLeave\",g=_([o(\"mouseleave\")],g),e.MouseLeave=g;var b=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);b.__name__=\"Tap\",b=_([o(\"tap\")],b),e.Tap=b;var O=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);O.__name__=\"DoubleTap\",O=_([o(\"doubletap\")],O),e.DoubleTap=O;var P=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);P.__name__=\"Press\",P=_([o(\"press\")],P),e.Press=P;var E=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);E.__name__=\"PressUp\",E=_([o(\"pressup\")],E),e.PressUp=E;var M=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);M.__name__=\"PanStart\",M=_([o(\"panstart\")],M),e.PanStart=M;var R=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);R.__name__=\"PanEnd\",R=_([o(\"panend\")],R),e.PanEnd=R;var S=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);S.__name__=\"PinchStart\",S=_([o(\"pinchstart\")],S),e.PinchStart=S;var k=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);k.__name__=\"PinchEnd\",k=_([o(\"pinchend\")],k),e.PinchEnd=k;var D=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);D.__name__=\"RotateStart\",D=_([o(\"rotatestart\")],D),e.RotateStart=D;var L=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n}(f);L.__name__=\"RotateEnd\",L=_([o(\"rotateend\")],L),e.RotateEnd=L},\n", | |
" function _(n,e,i){var o=(\"undefined\"!=typeof window?window.requestAnimationFrame:void 0)||(\"undefined\"!=typeof window?window.webkitRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window?window.mozRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window?window.msRequestAnimationFrame:void 0)||function(n){return n(Date.now()),-1};i.throttle=function(n,e){var i=null,t=0,u=!1,d=function(){t=Date.now(),i=null,u=!1,n()};return function(){var n=Date.now(),w=e-(n-t);w<=0&&!u?(null!=i&&clearTimeout(i),u=!0,o(d)):i||u||(i=setTimeout(function(){return o(d)},w))}}},\n", | |
" function _(e,t,i){var l=e(113),r=e(283),a=e(284),o=e(109),n=Math.PI/2,h=\"left\",s=\"center\",d={above:{parallel:0,normal:-n,horizontal:0,vertical:-n},below:{parallel:0,normal:n,horizontal:0,vertical:n},left:{parallel:-n,normal:0,horizontal:0,vertical:-n},right:{parallel:n,normal:0,horizontal:0,vertical:n}},c={above:{justified:\"top\",parallel:\"alphabetic\",normal:\"middle\",horizontal:\"alphabetic\",vertical:\"middle\"},below:{justified:\"bottom\",parallel:\"hanging\",normal:\"middle\",horizontal:\"hanging\",vertical:\"middle\"},left:{justified:\"top\",parallel:\"alphabetic\",normal:\"middle\",horizontal:\"middle\",vertical:\"alphabetic\"},right:{justified:\"top\",parallel:\"alphabetic\",normal:\"middle\",horizontal:\"middle\",vertical:\"alphabetic\"}},p={above:{justified:s,parallel:s,normal:h,horizontal:s,vertical:h},below:{justified:s,parallel:s,normal:h,horizontal:s,vertical:h},left:{justified:s,parallel:s,normal:\"right\",horizontal:\"right\",vertical:s},right:{justified:s,parallel:s,normal:h,horizontal:h,vertical:s}},b={above:\"right\",below:h,left:\"right\",right:h},_={above:h,below:\"right\",left:\"right\",right:h},m=function(e){function t(t,i){var l=e.call(this)||this;switch(l.side=t,l.obj=i,l.side){case\"above\":l._dim=0,l._normals=[0,-1];break;case\"below\":l._dim=0,l._normals=[0,1];break;case\"left\":l._dim=1,l._normals=[-1,0];break;case\"right\":l._dim=1,l._normals=[1,0];break;default:throw new Error(\"unreachable\")}return l.is_horizontal?l.set_sizing({width_policy:\"max\",height_policy:\"fixed\"}):l.set_sizing({width_policy:\"fixed\",height_policy:\"max\"}),l}return l.__extends(t,e),t.prototype._content_size=function(){return new r.Sizeable(this.get_oriented_size())},t.prototype.get_oriented_size=function(){var e=this.obj.get_size(),t=e.width,i=e.height;return!this.obj.rotate||this.is_horizontal?{width:t,height:i}:{width:i,height:t}},t.prototype.has_size_changed=function(){var e=this.get_oriented_size(),t=e.width,i=e.height;return this.is_horizontal?this.bbox.height!=i:this.bbox.width!=t},Object.defineProperty(t.prototype,\"dimension\",{get:function(){return this._dim},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"normals\",{get:function(){return this._normals},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"is_horizontal\",{get:function(){return 0==this._dim},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"is_vertical\",{get:function(){return 1==this._dim},enumerable:!0,configurable:!0}),t.prototype.apply_label_text_heuristics=function(e,t){var i,l,r=this.side;o.isString(t)?(i=c[r][t],l=p[r][t]):0===t?(i=\"whatever\",l=\"whatever\"):t<0?(i=\"middle\",l=b[r]):(i=\"middle\",l=_[r]),e.textBaseline=i,e.textAlign=l},t.prototype.get_label_angle_heuristic=function(e){return d[this.side][e]},t}(a.ContentLayoutable);i.SidePanel=m,m.__name__=\"SidePanel\"},\n", | |
" function _(t,e,n){var i=t(380),r=t(116),s=t(167),o=t(163),a=t(381),_=t(110),h=t(125),p=t(109),c=t(197),u=t(376),l=function(){function t(t,e,n){var s=this;this.plot_view=t,this.toolbar=e,this.hit_area=n,this.pan_start=new r.Signal(this,\"pan:start\"),this.pan=new r.Signal(this,\"pan\"),this.pan_end=new r.Signal(this,\"pan:end\"),this.pinch_start=new r.Signal(this,\"pinch:start\"),this.pinch=new r.Signal(this,\"pinch\"),this.pinch_end=new r.Signal(this,\"pinch:end\"),this.rotate_start=new r.Signal(this,\"rotate:start\"),this.rotate=new r.Signal(this,\"rotate\"),this.rotate_end=new r.Signal(this,\"rotate:end\"),this.tap=new r.Signal(this,\"tap\"),this.doubletap=new r.Signal(this,\"doubletap\"),this.press=new r.Signal(this,\"press\"),this.pressup=new r.Signal(this,\"pressup\"),this.move_enter=new r.Signal(this,\"move:enter\"),this.move=new r.Signal(this,\"move\"),this.move_exit=new r.Signal(this,\"move:exit\"),this.scroll=new r.Signal(this,\"scroll\"),this.keydown=new r.Signal(this,\"keydown\"),this.keyup=new r.Signal(this,\"keyup\"),this.hammer=new i(this.hit_area,{touchAction:\"auto\"}),this._configure_hammerjs(),this.hit_area.addEventListener(\"mousemove\",function(t){return s._mouse_move(t)}),this.hit_area.addEventListener(\"mouseenter\",function(t){return s._mouse_enter(t)}),this.hit_area.addEventListener(\"mouseleave\",function(t){return s._mouse_exit(t)}),this.hit_area.addEventListener(\"wheel\",function(t){return s._mouse_wheel(t)}),document.addEventListener(\"keydown\",this),document.addEventListener(\"keyup\",this)}return t.prototype.destroy=function(){this.hammer.destroy(),document.removeEventListener(\"keydown\",this),document.removeEventListener(\"keyup\",this)},t.prototype.handleEvent=function(t){\"keydown\"==t.type?this._key_down(t):\"keyup\"==t.type&&this._key_up(t)},t.prototype._configure_hammerjs=function(){var t=this;this.hammer.get(\"doubletap\").recognizeWith(\"tap\"),this.hammer.get(\"tap\").requireFailure(\"doubletap\"),this.hammer.get(\"doubletap\").dropRequireFailure(\"tap\"),this.hammer.on(\"doubletap\",function(e){return t._doubletap(e)}),this.hammer.on(\"tap\",function(e){return t._tap(e)}),this.hammer.on(\"press\",function(e){return t._press(e)}),this.hammer.on(\"pressup\",function(e){return t._pressup(e)}),this.hammer.get(\"pan\").set({direction:i.DIRECTION_ALL}),this.hammer.on(\"panstart\",function(e){return t._pan_start(e)}),this.hammer.on(\"pan\",function(e){return t._pan(e)}),this.hammer.on(\"panend\",function(e){return t._pan_end(e)}),this.hammer.get(\"pinch\").set({enable:!0}),this.hammer.on(\"pinchstart\",function(e){return t._pinch_start(e)}),this.hammer.on(\"pinch\",function(e){return t._pinch(e)}),this.hammer.on(\"pinchend\",function(e){return t._pinch_end(e)}),this.hammer.get(\"rotate\").set({enable:!0}),this.hammer.on(\"rotatestart\",function(e){return t._rotate_start(e)}),this.hammer.on(\"rotate\",function(e){return t._rotate(e)}),this.hammer.on(\"rotateend\",function(e){return t._rotate_end(e)})},t.prototype.register_tool=function(t){var e=this,n=t.model.event_type;null!=n&&(p.isString(n)?this._register_tool(t,n):n.forEach(function(n,i){return e._register_tool(t,n,i<1)}))},t.prototype._register_tool=function(t,e,n){void 0===n&&(n=!0);var i=t,r=i.model.id,o=function(t){return function(e){e.id==r&&t(e.e)}},a=function(t){return function(e){t(e.e)}};switch(e){case\"pan\":null!=i._pan_start&&i.connect(this.pan_start,o(i._pan_start.bind(i))),null!=i._pan&&i.connect(this.pan,o(i._pan.bind(i))),null!=i._pan_end&&i.connect(this.pan_end,o(i._pan_end.bind(i)));break;case\"pinch\":null!=i._pinch_start&&i.connect(this.pinch_start,o(i._pinch_start.bind(i))),null!=i._pinch&&i.connect(this.pinch,o(i._pinch.bind(i))),null!=i._pinch_end&&i.connect(this.pinch_end,o(i._pinch_end.bind(i)));break;case\"rotate\":null!=i._rotate_start&&i.connect(this.rotate_start,o(i._rotate_start.bind(i))),null!=i._rotate&&i.connect(this.rotate,o(i._rotate.bind(i))),null!=i._rotate_end&&i.connect(this.rotate_end,o(i._rotate_end.bind(i)));break;case\"move\":null!=i._move_enter&&i.connect(this.move_enter,o(i._move_enter.bind(i))),null!=i._move&&i.connect(this.move,o(i._move.bind(i))),null!=i._move_exit&&i.connect(this.move_exit,o(i._move_exit.bind(i)));break;case\"tap\":null!=i._tap&&i.connect(this.tap,o(i._tap.bind(i)));break;case\"press\":null!=i._press&&i.connect(this.press,o(i._press.bind(i))),null!=i._pressup&&i.connect(this.pressup,o(i._pressup.bind(i)));break;case\"scroll\":null!=i._scroll&&i.connect(this.scroll,o(i._scroll.bind(i)));break;default:throw new Error(\"unsupported event_type: \"+e)}n&&(null!=i._doubletap&&i.connect(this.doubletap,a(i._doubletap.bind(i))),null!=i._keydown&&i.connect(this.keydown,a(i._keydown.bind(i))),null!=i._keyup&&i.connect(this.keyup,a(i._keyup.bind(i))),c.is_mobile&&null!=i._scroll&&\"pinch\"==e&&(s.logger.debug(\"Registering scroll on touch screen\"),i.connect(this.scroll,o(i._scroll.bind(i)))))},t.prototype._hit_test_renderers=function(t,e){for(var n=this.plot_view.get_renderer_views(),i=0,r=_.reversed(n);i<r.length;i++){var s=r[i],o=s.model.level;if((\"annotation\"==o||\"overlay\"==o)&&null!=s.interactive_hit&&s.interactive_hit(t,e))return s}return null},t.prototype._hit_test_frame=function(t,e){return this.plot_view.frame.bbox.contains(t,e)},t.prototype._hit_test_canvas=function(t,e){return this.plot_view.layout.bbox.contains(t,e)},t.prototype._trigger=function(t,e,n){var i=this,r=this.toolbar.gestures,s=t.name,o=s.split(\":\")[0],a=this._hit_test_renderers(e.sx,e.sy),_=this._hit_test_canvas(e.sx,e.sy);switch(o){case\"move\":null!=(v=r[o].active)&&this.trigger(t,e,v.id);var p=this.toolbar.inspectors.filter(function(t){return t.active}),u=\"default\";null!=a?(u=a.cursor(e.sx,e.sy)||u,h.isEmpty(p)||(s=(t=this.move_exit).name)):this._hit_test_frame(e.sx,e.sy)&&(h.isEmpty(p)||(u=\"crosshair\")),this.plot_view.set_cursor(u),this.plot_view.set_toolbar_visibility(_),p.map(function(n){return i.trigger(t,e,n.id)});break;case\"tap\":var l=n.target;if(null!=l&&l!=this.hit_area)return;null!=a&&null!=a.on_hit&&a.on_hit(e.sx,e.sy),null!=(v=r[o].active)&&this.trigger(t,e,v.id);break;case\"scroll\":null!=(v=r[c.is_mobile?\"pinch\":\"scroll\"].active)&&(n.preventDefault(),n.stopPropagation(),this.trigger(t,e,v.id));break;case\"pan\":null!=(v=r[o].active)&&(n.preventDefault(),this.trigger(t,e,v.id));break;default:var v;null!=(v=r[o].active)&&this.trigger(t,e,v.id)}this._trigger_bokeh_event(e)},t.prototype.trigger=function(t,e,n){void 0===n&&(n=null),t.emit({id:n,e:e})},t.prototype._trigger_bokeh_event=function(t){var e=this,n=function(){var n=e.plot_view.frame.xscales.default,i=e.plot_view.frame.yscales.default,r=t.sx,s=t.sy,o=n.invert(r),a=i.invert(s);switch(t.type){case\"wheel\":return new u.MouseWheel(r,s,o,a,t.delta);case\"mousemove\":return new u.MouseMove(r,s,o,a);case\"mouseenter\":return new u.MouseEnter(r,s,o,a);case\"mouseleave\":return new u.MouseLeave(r,s,o,a);case\"tap\":return new u.Tap(r,s,o,a);case\"doubletap\":return new u.DoubleTap(r,s,o,a);case\"press\":return new u.Press(r,s,o,a);case\"pressup\":return new u.PressUp(r,s,o,a);case\"pan\":return new u.Pan(r,s,o,a,t.deltaX,t.deltaY);case\"panstart\":return new u.PanStart(r,s,o,a);case\"panend\":return new u.PanEnd(r,s,o,a);case\"pinch\":return new u.Pinch(r,s,o,a,t.scale);case\"pinchstart\":return new u.PinchStart(r,s,o,a);case\"pinchend\":return new u.PinchEnd(r,s,o,a);case\"rotate\":return new u.Rotate(r,s,o,a,t.rotation);case\"rotatestart\":return new u.RotateStart(r,s,o,a);case\"rotateend\":return new u.RotateEnd(r,s,o,a);default:return}}();null!=n&&this.plot_view.model.trigger_event(n)},t.prototype._get_sxy=function(t){var e=function(t){return\"undefined\"!=typeof TouchEvent&&t instanceof TouchEvent}(t)?(0!=t.touches.length?t.touches:t.changedTouches)[0]:t,n=e.pageX,i=e.pageY,r=o.offset(this.hit_area);return{sx:n-r.left,sy:i-r.top}},t.prototype._pan_event=function(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t.srcEvent)),{deltaX:t.deltaX,deltaY:t.deltaY,shiftKey:t.srcEvent.shiftKey})},t.prototype._pinch_event=function(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t.srcEvent)),{scale:t.scale,shiftKey:t.srcEvent.shiftKey})},t.prototype._rotate_event=function(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t.srcEvent)),{rotation:t.rotation,shiftKey:t.srcEvent.shiftKey})},t.prototype._tap_event=function(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t.srcEvent)),{shiftKey:t.srcEvent.shiftKey})},t.prototype._move_event=function(t){return Object.assign({type:t.type},this._get_sxy(t))},t.prototype._scroll_event=function(t){return Object.assign(Object.assign({type:t.type},this._get_sxy(t)),{delta:a.getDeltaY(t)})},t.prototype._key_event=function(t){return{type:t.type,keyCode:t.keyCode}},t.prototype._pan_start=function(t){var e=this._pan_event(t);e.sx-=t.deltaX,e.sy-=t.deltaY,this._trigger(this.pan_start,e,t.srcEvent)},t.prototype._pan=function(t){this._trigger(this.pan,this._pan_event(t),t.srcEvent)},t.prototype._pan_end=function(t){this._trigger(this.pan_end,this._pan_event(t),t.srcEvent)},t.prototype._pinch_start=function(t){this._trigger(this.pinch_start,this._pinch_event(t),t.srcEvent)},t.prototype._pinch=function(t){this._trigger(this.pinch,this._pinch_event(t),t.srcEvent)},t.prototype._pinch_end=function(t){this._trigger(this.pinch_end,this._pinch_event(t),t.srcEvent)},t.prototype._rotate_start=function(t){this._trigger(this.rotate_start,this._rotate_event(t),t.srcEvent)},t.prototype._rotate=function(t){this._trigger(this.rotate,this._rotate_event(t),t.srcEvent)},t.prototype._rotate_end=function(t){this._trigger(this.rotate_end,this._rotate_event(t),t.srcEvent)},t.prototype._tap=function(t){this._trigger(this.tap,this._tap_event(t),t.srcEvent)},t.prototype._doubletap=function(t){var e=this._tap_event(t);this._trigger_bokeh_event(e),this.trigger(this.doubletap,e)},t.prototype._press=function(t){this._trigger(this.press,this._tap_event(t),t.srcEvent)},t.prototype._pressup=function(t){this._trigger(this.pressup,this._tap_event(t),t.srcEvent)},t.prototype._mouse_enter=function(t){this._trigger(this.move_enter,this._move_event(t),t)},t.prototype._mouse_move=function(t){this._trigger(this.move,this._move_event(t),t)},t.prototype._mouse_exit=function(t){this._trigger(this.move_exit,this._move_event(t),t)},t.prototype._mouse_wheel=function(t){this._trigger(this.scroll,this._scroll_event(t),t)},t.prototype._key_down=function(t){this.trigger(this.keydown,this._key_event(t))},t.prototype._key_up=function(t){this.trigger(this.keyup,this._key_event(t))},t}();n.UIEvents=l,l.__name__=\"UIEvents\"},\n", | |
" function _(t,e,i){\n", | |
" /*! Hammer.JS - v2.0.7 - 2016-04-22\n", | |
" * http://hammerjs.github.io/\n", | |
" *\n", | |
" * Copyright (c) 2016 Jorik Tangelder;\n", | |
" * Licensed under the MIT license */\n", | |
" !function(t,i,n,r){\"use strict\";var s,o=[\"\",\"webkit\",\"Moz\",\"MS\",\"ms\",\"o\"],a=i.createElement(\"div\"),h=\"function\",u=Math.round,c=Math.abs,l=Date.now;function p(t,e,i){return setTimeout(y(t,i),e)}function f(t,e,i){return!!Array.isArray(t)&&(v(t,i[e],i),!0)}function v(t,e,i){var n;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==r)for(n=0;n<t.length;)e.call(i,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(i,t[n],n,t)}function d(e,i,n){var r=\"DEPRECATED METHOD: \"+i+\"\\n\"+n+\" AT \\n\";return function(){var i=new Error(\"get-stack-trace\"),n=i&&i.stack?i.stack.replace(/^[^\\(]+?[\\n$]/gm,\"\").replace(/^\\s+at\\s+/gm,\"\").replace(/^Object.<anonymous>\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",s=t.console&&(t.console.warn||t.console.log);return s&&s.call(t.console,r,n),e.apply(this,arguments)}}s=\"function\"!=typeof Object.assign?function(t){if(t===r||null===t)throw new TypeError(\"Cannot convert undefined or null to object\");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(n!==r&&null!==n)for(var s in n)n.hasOwnProperty(s)&&(e[s]=n[s])}return e}:Object.assign;var m=d(function(t,e,i){for(var n=Object.keys(e),s=0;s<n.length;)(!i||i&&t[n[s]]===r)&&(t[n[s]]=e[n[s]]),s++;return t},\"extend\",\"Use `assign`.\"),g=d(function(t,e){return m(t,e,!0)},\"merge\",\"Use `assign`.\");function T(t,e,i){var n,r=e.prototype;(n=t.prototype=Object.create(r)).constructor=t,n._super=r,i&&s(n,i)}function y(t,e){return function(){return t.apply(e,arguments)}}function E(t,e){return typeof t==h?t.apply(e&&e[0]||r,e):t}function I(t,e){return t===r?e:t}function A(t,e,i){v(b(e),function(e){t.addEventListener(e,i,!1)})}function _(t,e,i){v(b(e),function(e){t.removeEventListener(e,i,!1)})}function C(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function S(t,e){return t.indexOf(e)>-1}function b(t){return t.trim().split(/\\s+/g)}function P(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}function D(t){return Array.prototype.slice.call(t,0)}function x(t,e,i){for(var n=[],r=[],s=0;s<t.length;){var o=e?t[s][e]:t[s];P(r,o)<0&&n.push(t[s]),r[s]=o,s++}return i&&(n=e?n.sort(function(t,i){return t[e]>i[e]}):n.sort()),n}function w(t,e){for(var i,n,s=e[0].toUpperCase()+e.slice(1),a=0;a<o.length;){if((n=(i=o[a])?i+s:e)in t)return n;a++}return r}var O=1;function R(e){var i=e.ownerDocument||e;return i.defaultView||i.parentWindow||t}var M=\"ontouchstart\"in t,z=w(t,\"PointerEvent\")!==r,N=M&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),X=25,Y=1,F=2,W=4,q=8,k=1,H=2,L=4,U=8,V=16,j=H|L,G=U|V,Z=j|G,B=[\"x\",\"y\"],$=[\"clientX\",\"clientY\"];function J(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){E(t.options.enable,[t])&&i.handler(e)},this.init()}function K(t,e,i){var n=i.pointers.length,s=i.changedPointers.length,o=e&Y&&n-s==0,a=e&(W|q)&&n-s==0;i.isFirst=!!o,i.isFinal=!!a,o&&(t.session={}),i.eventType=e,function(t,e){var i=t.session,n=e.pointers,s=n.length;i.firstInput||(i.firstInput=Q(e));s>1&&!i.firstMultiple?i.firstMultiple=Q(e):1===s&&(i.firstMultiple=!1);var o=i.firstInput,a=i.firstMultiple,h=a?a.center:o.center,u=e.center=tt(n);e.timeStamp=l(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=rt(h,u),e.distance=nt(h,u),function(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},s=t.prevInput||{};e.eventType!==Y&&s.eventType!==W||(r=t.prevDelta={x:s.deltaX||0,y:s.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y});e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}(i,e),e.offsetDirection=it(e.deltaX,e.deltaY);var p=et(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=p.x,e.overallVelocityY=p.y,e.overallVelocity=c(p.x)>c(p.y)?p.x:p.y,e.scale=a?(f=a.pointers,v=n,nt(v[0],v[1],$)/nt(f[0],f[1],$)):1,e.rotation=a?function(t,e){return rt(e[1],e[0],$)+rt(t[1],t[0],$)}(a.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,function(t,e){var i,n,s,o,a=t.lastInterval||e,h=e.timeStamp-a.timeStamp;if(e.eventType!=q&&(h>X||a.velocity===r)){var u=e.deltaX-a.deltaX,l=e.deltaY-a.deltaY,p=et(h,u,l);n=p.x,s=p.y,i=c(p.x)>c(p.y)?p.x:p.y,o=it(u,l),t.lastInterval=e}else i=a.velocity,n=a.velocityX,s=a.velocityY,o=a.direction;e.velocity=i,e.velocityX=n,e.velocityY=s,e.direction=o}(i,e);var f,v;var d=t.element;C(e.srcEvent.target,d)&&(d=e.srcEvent.target);e.target=d}(t,i),t.emit(\"hammer.input\",i),t.recognize(i),t.session.prevInput=i}function Q(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:u(t.pointers[i].clientX),clientY:u(t.pointers[i].clientY)},i++;return{timeStamp:l(),pointers:e,center:tt(e),deltaX:t.deltaX,deltaY:t.deltaY}}function tt(t){var e=t.length;if(1===e)return{x:u(t[0].clientX),y:u(t[0].clientY)};for(var i=0,n=0,r=0;r<e;)i+=t[r].clientX,n+=t[r].clientY,r++;return{x:u(i/e),y:u(n/e)}}function et(t,e,i){return{x:e/t||0,y:i/t||0}}function it(t,e){return t===e?k:c(t)>=c(e)?t<0?H:L:e<0?U:V}function nt(t,e,i){i||(i=B);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function rt(t,e,i){i||(i=B);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}J.prototype={handler:function(){},init:function(){this.evEl&&A(this.element,this.evEl,this.domHandler),this.evTarget&&A(this.target,this.evTarget,this.domHandler),this.evWin&&A(R(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&_(this.element,this.evEl,this.domHandler),this.evTarget&&_(this.target,this.evTarget,this.domHandler),this.evWin&&_(R(this.element),this.evWin,this.domHandler)}};var st={mousedown:Y,mousemove:F,mouseup:W},ot=\"mousedown\",at=\"mousemove mouseup\";function ht(){this.evEl=ot,this.evWin=at,this.pressed=!1,J.apply(this,arguments)}T(ht,J,{handler:function(t){var e=st[t.type];e&Y&&0===t.button&&(this.pressed=!0),e&F&&1!==t.which&&(e=W),this.pressed&&(e&W&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:\"mouse\",srcEvent:t}))}});var ut={pointerdown:Y,pointermove:F,pointerup:W,pointercancel:q,pointerout:q},ct={2:\"touch\",3:\"pen\",4:\"mouse\",5:\"kinect\"},lt=\"pointerdown\",pt=\"pointermove pointerup pointercancel\";function ft(){this.evEl=lt,this.evWin=pt,J.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}t.MSPointerEvent&&!t.PointerEvent&&(lt=\"MSPointerDown\",pt=\"MSPointerMove MSPointerUp MSPointerCancel\"),T(ft,J,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace(\"ms\",\"\"),r=ut[n],s=ct[t.pointerType]||t.pointerType,o=\"touch\"==s,a=P(e,t.pointerId,\"pointerId\");r&Y&&(0===t.button||o)?a<0&&(e.push(t),a=e.length-1):r&(W|q)&&(i=!0),a<0||(e[a]=t,this.callback(this.manager,r,{pointers:e,changedPointers:[t],pointerType:s,srcEvent:t}),i&&e.splice(a,1))}});var vt={touchstart:Y,touchmove:F,touchend:W,touchcancel:q},dt=\"touchstart\",mt=\"touchstart touchmove touchend touchcancel\";function gt(){this.evTarget=dt,this.evWin=mt,this.started=!1,J.apply(this,arguments)}T(gt,J,{handler:function(t){var e=vt[t.type];if(e===Y&&(this.started=!0),this.started){var i=function(t,e){var i=D(t.touches),n=D(t.changedTouches);e&(W|q)&&(i=x(i.concat(n),\"identifier\",!0));return[i,n]}.call(this,t,e);e&(W|q)&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:\"touch\",srcEvent:t})}}});var Tt={touchstart:Y,touchmove:F,touchend:W,touchcancel:q},yt=\"touchstart touchmove touchend touchcancel\";function Et(){this.evTarget=yt,this.targetIds={},J.apply(this,arguments)}T(Et,J,{handler:function(t){var e=Tt[t.type],i=function(t,e){var i=D(t.touches),n=this.targetIds;if(e&(Y|F)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,s,o=D(t.changedTouches),a=[],h=this.target;if(s=i.filter(function(t){return C(t.target,h)}),e===Y)for(r=0;r<s.length;)n[s[r].identifier]=!0,r++;r=0;for(;r<o.length;)n[o[r].identifier]&&a.push(o[r]),e&(W|q)&&delete n[o[r].identifier],r++;if(!a.length)return;return[x(s.concat(a),\"identifier\",!0),a]}.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:\"touch\",srcEvent:t})}});var It=2500,At=25;function _t(){J.apply(this,arguments);var t=y(this.handler,this);this.touch=new Et(this.manager,t),this.mouse=new ht(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function Ct(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var n=this.lastTouches;setTimeout(function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)},It)}}T(_t,J,{handler:function(t,e,i){var n=\"touch\"==i.pointerType,r=\"mouse\"==i.pointerType;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)(function(t,e){t&Y?(this.primaryTouch=e.changedPointers[0].identifier,Ct.call(this,e)):t&(W|q)&&Ct.call(this,e)}).call(this,e,i);else if(r&&function(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var r=this.lastTouches[n],s=Math.abs(e-r.x),o=Math.abs(i-r.y);if(s<=At&&o<=At)return!0}return!1}.call(this,i))return;this.callback(t,e,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var St=w(a.style,\"touchAction\"),bt=St!==r,Pt=\"auto\",Dt=\"manipulation\",xt=\"none\",wt=\"pan-x\",Ot=\"pan-y\",Rt=function(){if(!bt)return!1;var e={},i=t.CSS&&t.CSS.supports;return[\"auto\",\"manipulation\",\"pan-y\",\"pan-x\",\"pan-x pan-y\",\"none\"].forEach(function(n){e[n]=!i||t.CSS.supports(\"touch-action\",n)}),e}();function Mt(t,e){this.manager=t,this.set(e)}Mt.prototype={set:function(t){\"compute\"==t&&(t=this.compute()),bt&&this.manager.element.style&&Rt[t]&&(this.manager.element.style[St]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return v(this.manager.recognizers,function(e){E(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),function(t){if(S(t,xt))return xt;var e=S(t,wt),i=S(t,Ot);if(e&&i)return xt;if(e||i)return e?wt:Ot;if(S(t,Dt))return Dt;return Pt}(t.join(\" \"))},preventDefaults:function(t){var e=t.srcEvent,i=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var n=this.actions,r=S(n,xt)&&!Rt[xt],s=S(n,Ot)&&!Rt[Ot],o=S(n,wt)&&!Rt[wt];if(r){var a=1===t.pointers.length,h=t.distance<2,u=t.deltaTime<250;if(a&&h&&u)return}if(!o||!s)return r||s&&i&j||o&&i&G?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var zt=1,Nt=2,Xt=4,Yt=8,Ft=Yt,Wt=16;function qt(t){this.options=s({},this.defaults,t||{}),this.id=O++,this.manager=null,this.options.enable=I(this.options.enable,!0),this.state=zt,this.simultaneous={},this.requireFail=[]}function kt(t){return t&Wt?\"cancel\":t&Yt?\"end\":t&Xt?\"move\":t&Nt?\"start\":\"\"}function Ht(t){return t==V?\"down\":t==U?\"up\":t==H?\"left\":t==L?\"right\":\"\"}function Lt(t,e){var i=e.manager;return i?i.get(t):t}function Ut(){qt.apply(this,arguments)}function Vt(){Ut.apply(this,arguments),this.pX=null,this.pY=null}function jt(){Ut.apply(this,arguments)}function Gt(){qt.apply(this,arguments),this._timer=null,this._input=null}function Zt(){Ut.apply(this,arguments)}function Bt(){Ut.apply(this,arguments)}function $t(){qt.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function Jt(t,e){return(e=e||{}).recognizers=I(e.recognizers,Jt.defaults.preset),new Kt(t,e)}qt.prototype={defaults:{},set:function(t){return s(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(f(t,\"recognizeWith\",this))return this;var e=this.simultaneous;return e[(t=Lt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return f(t,\"dropRecognizeWith\",this)?this:(t=Lt(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(f(t,\"requireFailure\",this))return this;var e=this.requireFail;return-1===P(e,t=Lt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(f(t,\"dropRequireFailure\",this))return this;t=Lt(t,this);var e=P(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,i=this.state;function n(i){e.manager.emit(i,t)}i<Yt&&n(e.options.event+kt(i)),n(e.options.event),t.additionalEvent&&n(t.additionalEvent),i>=Yt&&n(e.options.event+kt(i))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=32},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(32|zt)))return!1;t++}return!0},recognize:function(t){var e=s({},t);if(!E(this.options.enable,[this,e]))return this.reset(),void(this.state=32);this.state&(Ft|Wt|32)&&(this.state=zt),this.state=this.process(e),this.state&(Nt|Xt|Yt|Wt)&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},T(Ut,qt,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,n=e&(Nt|Xt),r=this.attrTest(t);return n&&(i&q||!r)?e|Wt:n||r?i&W?e|Yt:e&Nt?e|Xt:Nt:32}}),T(Vt,Ut,{defaults:{event:\"pan\",threshold:10,pointers:1,direction:Z},getTouchAction:function(){var t=this.options.direction,e=[];return t&j&&e.push(Ot),t&G&&e.push(wt),e},directionTest:function(t){var e=this.options,i=!0,n=t.distance,r=t.direction,s=t.deltaX,o=t.deltaY;return r&e.direction||(e.direction&j?(r=0===s?k:s<0?H:L,i=s!=this.pX,n=Math.abs(t.deltaX)):(r=0===o?k:o<0?U:V,i=o!=this.pY,n=Math.abs(t.deltaY))),t.direction=r,i&&n>e.threshold&&r&e.direction},attrTest:function(t){return Ut.prototype.attrTest.call(this,t)&&(this.state&Nt||!(this.state&Nt)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=Ht(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),T(jt,Ut,{defaults:{event:\"pinch\",threshold:0,pointers:2},getTouchAction:function(){return[xt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&Nt)},emit:function(t){if(1!==t.scale){var e=t.scale<1?\"in\":\"out\";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),T(Gt,qt,{defaults:{event:\"press\",pointers:1,time:251,threshold:9},getTouchAction:function(){return[Pt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime>e.time;if(this._input=t,!n||!i||t.eventType&(W|q)&&!r)this.reset();else if(t.eventType&Y)this.reset(),this._timer=p(function(){this.state=Ft,this.tryEmit()},e.time,this);else if(t.eventType&W)return Ft;return 32},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===Ft&&(t&&t.eventType&W?this.manager.emit(this.options.event+\"up\",t):(this._input.timeStamp=l(),this.manager.emit(this.options.event,this._input)))}}),T(Zt,Ut,{defaults:{event:\"rotate\",threshold:0,pointers:2},getTouchAction:function(){return[xt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&Nt)}}),T(Bt,Ut,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:j|G,pointers:1},getTouchAction:function(){return Vt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(j|G)?e=t.overallVelocity:i&j?e=t.overallVelocityX:i&G&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&c(e)>this.options.velocity&&t.eventType&W},emit:function(t){var e=Ht(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),T($t,qt,{defaults:{event:\"tap\",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Dt]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,r=t.deltaTime<e.time;if(this.reset(),t.eventType&Y&&0===this.count)return this.failTimeout();if(n&&r&&i){if(t.eventType!=W)return this.failTimeout();var s=!this.pTime||t.timeStamp-this.pTime<e.interval,o=!this.pCenter||nt(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,o&&s?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=p(function(){this.state=Ft,this.tryEmit()},e.interval,this),Nt):Ft}return 32},failTimeout:function(){return this._timer=p(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==Ft&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),Jt.VERSION=\"2.0.7\",Jt.defaults={domEvents:!1,touchAction:\"compute\",enable:!0,inputTarget:null,inputClass:null,preset:[[Zt,{enable:!1}],[jt,{enable:!1},[\"rotate\"]],[Bt,{direction:j}],[Vt,{direction:j},[\"swipe\"]],[$t],[$t,{event:\"doubletap\",taps:2},[\"tap\"]],[Gt]],cssProps:{userSelect:\"none\",touchSelect:\"none\",touchCallout:\"none\",contentZooming:\"none\",userDrag:\"none\",tapHighlightColor:\"rgba(0,0,0,0)\"}};function Kt(t,e){var i;this.options=s({},Jt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((i=this).options.inputClass||(z?ft:N?Et:M?_t:ht))(i,K),this.touchAction=new Mt(this,this.options.touchAction),Qt(this,!0),v(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function Qt(t,e){var i,n=t.element;n.style&&(v(t.options.cssProps,function(r,s){i=w(n.style,s),e?(t.oldCssProps[i]=n.style[i],n.style[i]=r):n.style[i]=t.oldCssProps[i]||\"\"}),e||(t.oldCssProps={}))}Kt.prototype={set:function(t){return s(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var i;this.touchAction.preventDefaults(t);var n=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&Ft)&&(r=e.curRecognizer=null);for(var s=0;s<n.length;)i=n[s],2===e.stopped||r&&i!=r&&!i.canRecognizeWith(r)?i.reset():i.recognize(t),!r&&i.state&(Nt|Xt|Yt)&&(r=e.curRecognizer=i),s++}},get:function(t){if(t instanceof qt)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)return e[i];return null},add:function(t){if(f(t,\"add\",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(f(t,\"remove\",this))return this;if(t=this.get(t)){var e=this.recognizers,i=P(e,t);-1!==i&&(e.splice(i,1),this.touchAction.update())}return this},on:function(t,e){if(t!==r&&e!==r){var i=this.handlers;return v(b(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this}},off:function(t,e){if(t!==r){var i=this.handlers;return v(b(t),function(t){e?i[t]&&i[t].splice(P(i[t],e),1):delete i[t]}),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=i.createEvent(\"Event\");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&Qt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},s(Jt,{INPUT_START:Y,INPUT_MOVE:F,INPUT_END:W,INPUT_CANCEL:q,STATE_POSSIBLE:zt,STATE_BEGAN:Nt,STATE_CHANGED:Xt,STATE_ENDED:Yt,STATE_RECOGNIZED:Ft,STATE_CANCELLED:Wt,STATE_FAILED:32,DIRECTION_NONE:k,DIRECTION_LEFT:H,DIRECTION_RIGHT:L,DIRECTION_UP:U,DIRECTION_DOWN:V,DIRECTION_HORIZONTAL:j,DIRECTION_VERTICAL:G,DIRECTION_ALL:Z,Manager:Kt,Input:J,TouchAction:Mt,TouchInput:Et,MouseInput:ht,PointerEventInput:ft,TouchMouseInput:_t,SingleTouchInput:gt,Recognizer:qt,AttrRecognizer:Ut,Tap:$t,Pan:Vt,Swipe:Bt,Pinch:jt,Rotate:Zt,Press:Gt,on:A,off:_,each:v,merge:g,extend:m,assign:s,inherit:T,bindFn:y,prefixed:w}),(void 0!==t?t:\"undefined\"!=typeof self?self:{}).Hammer=Jt,\"function\"==typeof define&&define.amd?define(function(){return Jt}):void 0!==e&&e.exports?e.exports=Jt:t.Hammer=Jt}(window,document)},\n", | |
" function _(t,e,n){function a(t){var e=getComputedStyle(t).fontSize;return null!=e?parseInt(e,10):null}n.getDeltaY=function(t){var e,n=-t.deltaY;if(t.target instanceof HTMLElement)switch(t.deltaMode){case t.DOM_DELTA_LINE:n*=a((e=t.target).offsetParent||document.body)||a(e)||16;break;case t.DOM_DELTA_PAGE:n*=function(t){return t.clientHeight}(t.target)}return n}},\n", | |
" function _(t,e,o){var i=t(113),n=t(116),s=t(132),a=t(375),p=new n.Signal0({},\"gmaps_ready\"),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.initialize=function(){var e=this;this.pause(),t.prototype.initialize.call(this),this._tiles_loaded=!1,this.zoom_count=0;var o=this.model.map_options,i=o.zoom,n=o.lat,s=o.lng;this.initial_zoom=i,this.initial_lat=n,this.initial_lng=s,this.canvas_view.map_el.style.position=\"absolute\",\"undefined\"!=typeof google&&null!=google.maps||(void 0===window._bokeh_gmaps_callback&&function(t){window._bokeh_gmaps_callback=function(){return p.emit()};var e=document.createElement(\"script\");e.type=\"text/javascript\",e.src=\"https://maps.googleapis.com/maps/api/js?v=3.36&key=\"+t+\"&callback=_bokeh_gmaps_callback\",document.body.appendChild(e)}(this.model.api_key),p.connect(function(){return e.request_render()})),this.unpause()},e.prototype.update_range=function(e){if(null==e)this.map.setCenter({lat:this.initial_lat,lng:this.initial_lng}),this.map.setOptions({zoom:this.initial_zoom}),t.prototype.update_range.call(this,null);else if(null!=e.sdx||null!=e.sdy)this.map.panBy(e.sdx||0,e.sdy||0),t.prototype.update_range.call(this,e);else if(null!=e.factor){var o=void 0;if(10!==this.zoom_count)return void(this.zoom_count+=1);this.zoom_count=0,this.pause(),t.prototype.update_range.call(this,e),o=e.factor<0?-1:1;var i=this.map.getZoom(),n=i+o;if(n>=2){this.map.setZoom(n);var s=this._get_projected_bounds(),a=s[0];s[1]-a<0&&this.map.setZoom(i)}this.unpause()}this._set_bokeh_ranges()},e.prototype._build_map=function(){var t=this,e=google.maps;this.map_types={satellite:e.MapTypeId.SATELLITE,terrain:e.MapTypeId.TERRAIN,roadmap:e.MapTypeId.ROADMAP,hybrid:e.MapTypeId.HYBRID};var o=this.model.map_options,i={center:new e.LatLng(o.lat,o.lng),zoom:o.zoom,disableDefaultUI:!0,mapTypeId:this.map_types[o.map_type],scaleControl:o.scale_control,tilt:o.tilt};null!=o.styles&&(i.styles=JSON.parse(o.styles)),this.map=new e.Map(this.canvas_view.map_el,i),e.event.addListener(this.map,\"idle\",function(){return t._set_bokeh_ranges()}),e.event.addListener(this.map,\"bounds_changed\",function(){return t._set_bokeh_ranges()}),e.event.addListenerOnce(this.map,\"tilesloaded\",function(){return t._render_finished()}),this.connect(this.model.properties.map_options.change,function(){return t._update_options()}),this.connect(this.model.map_options.properties.styles.change,function(){return t._update_styles()}),this.connect(this.model.map_options.properties.lat.change,function(){return t._update_center(\"lat\")}),this.connect(this.model.map_options.properties.lng.change,function(){return t._update_center(\"lng\")}),this.connect(this.model.map_options.properties.zoom.change,function(){return t._update_zoom()}),this.connect(this.model.map_options.properties.map_type.change,function(){return t._update_map_type()}),this.connect(this.model.map_options.properties.scale_control.change,function(){return t._update_scale_control()}),this.connect(this.model.map_options.properties.tilt.change,function(){return t._update_tilt()})},e.prototype._render_finished=function(){this._tiles_loaded=!0,this.notify_finished()},e.prototype.has_finished=function(){return t.prototype.has_finished.call(this)&&!0===this._tiles_loaded},e.prototype._get_latlon_bounds=function(){var t=this.map.getBounds(),e=t.getNorthEast(),o=t.getSouthWest();return[o.lng(),e.lng(),o.lat(),e.lat()]},e.prototype._get_projected_bounds=function(){var t=this._get_latlon_bounds(),e=t[0],o=t[1],i=t[2],n=t[3],a=s.wgs84_mercator.forward([e,i]),p=a[0],l=a[1],_=s.wgs84_mercator.forward([o,n]);return[p,_[0],l,_[1]]},e.prototype._set_bokeh_ranges=function(){var t=this._get_projected_bounds(),e=t[0],o=t[1],i=t[2],n=t[3];this.frame.x_range.setv({start:e,end:o}),this.frame.y_range.setv({start:i,end:n})},e.prototype._update_center=function(t){var e=this.map.getCenter().toJSON();e[t]=this.model.map_options[t],this.map.setCenter(e),this._set_bokeh_ranges()},e.prototype._update_map_type=function(){this.map.setOptions({mapTypeId:this.map_types[this.model.map_options.map_type]})},e.prototype._update_scale_control=function(){this.map.setOptions({scaleControl:this.model.map_options.scale_control})},e.prototype._update_tilt=function(){this.map.setOptions({tilt:this.model.map_options.tilt})},e.prototype._update_options=function(){this._update_styles(),this._update_center(\"lat\"),this._update_center(\"lng\"),this._update_zoom(),this._update_map_type()},e.prototype._update_styles=function(){this.map.setOptions({styles:JSON.parse(this.model.map_options.styles)})},e.prototype._update_zoom=function(){this.map.setOptions({zoom:this.model.map_options.zoom}),this._set_bokeh_ranges()},e.prototype._map_hook=function(t,e){var o=e[0],i=e[1],n=e[2],s=e[3];this.canvas_view.map_el.style.top=i+\"px\",this.canvas_view.map_el.style.left=o+\"px\",this.canvas_view.map_el.style.width=n+\"px\",this.canvas_view.map_el.style.height=s+\"px\",null==this.map&&\"undefined\"!=typeof google&&null!=google.maps&&this._build_map()},e.prototype._paint_empty=function(t,e){var o=this.layout._width.value,i=this.layout._height.value,n=e[0],s=e[1],a=e[2],p=e[3];t.clearRect(0,0,o,i),t.beginPath(),t.moveTo(0,0),t.lineTo(0,i),t.lineTo(o,i),t.lineTo(o,0),t.lineTo(0,0),t.moveTo(n,s),t.lineTo(n+a,s),t.lineTo(n+a,s+p),t.lineTo(n,s+p),t.lineTo(n,s),t.closePath(),null!=this.model.border_fill_color&&(t.fillStyle=this.model.border_fill_color,t.fill())},e}(a.PlotView);o.GMapPlotView=l,l.__name__=\"GMapPlotView\"},\n", | |
" function _(a,n,e){var g=a(281);e.DataRange=g.DataRange;var R=a(280);e.DataRange1d=R.DataRange1d;var r=a(184);e.FactorRange=r.FactorRange;var t=a(185);e.Range=t.Range;var v=a(225);e.Range1d=v.Range1d},\n", | |
" function _(e,r,d){var n=e(175);d.GlyphRenderer=n.GlyphRenderer;var R=e(192);d.GraphRenderer=R.GraphRenderer;var a=e(244);d.GuideRenderer=a.GuideRenderer;var G=e(160);d.Renderer=G.Renderer},\n", | |
" function _(a,e,c){var l=a(279);c.CategoricalScale=l.CategoricalScale;var r=a(215);c.LinearScale=r.LinearScale;var S=a(224);c.LogScale=S.LogScale;var i=a(216);c.Scale=i.Scale},\n", | |
" function _(n,o,e){!function(n){for(var o in n)e.hasOwnProperty(o)||(e[o]=n[o])}(n(195));var i=n(173);e.Selection=i.Selection},\n", | |
" function _(a,e,r){var o=a(388);r.ServerSentDataSource=o.ServerSentDataSource;var S=a(390);r.AjaxDataSource=S.AjaxDataSource;var t=a(170);r.ColumnDataSource=t.ColumnDataSource;var u=a(171);r.ColumnarDataSource=u.ColumnarDataSource;var D=a(191);r.CDSView=D.CDSView;var c=a(172);r.DataSource=c.DataSource;var v=a(392);r.GeoJSONDataSource=v.GeoJSONDataSource;var n=a(391);r.RemoteDataSource=n.RemoteDataSource},\n", | |
" function _(t,e,i){var a=t(113),n=function(t){function e(e){var i=t.call(this,e)||this;return i.initialized=!1,i}return a.__extends(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this)},e.prototype.setup=function(){var t=this;this.initialized||(this.initialized=!0,new EventSource(this.data_url).onmessage=function(e){t.load_data(JSON.parse(e.data),t.mode,t.max_size)})},e}(t(389).WebDataSource);i.ServerSentDataSource=n,n.__name__=\"ServerSentDataSource\"},\n", | |
" function _(t,a,e){var i=t(113),n=t(170),r=t(121),o=function(t){function a(a){return t.call(this,a)||this}return i.__extends(a,t),a.prototype.get_column=function(t){var a=this.data[t];return null!=a?a:[]},a.prototype.initialize=function(){t.prototype.initialize.call(this),this.setup()},a.prototype.load_data=function(t,a,e){var i,n=this.adapter;switch(i=null!=n?n.execute(this,{response:t}):t,a){case\"replace\":this.data=i;break;case\"append\":for(var r=this.data,o=0,c=this.columns();o<c.length;o++){var u=c[o],s=Array.from(r[u]),l=Array.from(i[u]);i[u]=s.concat(l).slice(-e)}this.data=i}},a.init_WebDataSource=function(){this.define({mode:[r.UpdateMode,\"replace\"],max_size:[r.Number],adapter:[r.Any,null],data_url:[r.String]})},a}(n.ColumnDataSource);e.WebDataSource=o,o.__name__=\"WebDataSource\",o.init_WebDataSource()},\n", | |
" function _(t,e,i){var r=t(113),o=t(391),a=t(167),n=t(121),s=function(t){function e(e){var i=t.call(this,e)||this;return i.initialized=!1,i}return r.__extends(e,t),e.init_AjaxDataSource=function(){this.define({content_type:[n.String,\"application/json\"],http_headers:[n.Any,{}],method:[n.HTTPMethod,\"POST\"],if_modified:[n.Boolean,!1]})},e.prototype.destroy=function(){null!=this.interval&&clearInterval(this.interval),t.prototype.destroy.call(this)},e.prototype.setup=function(){var t=this;if(!this.initialized&&(this.initialized=!0,this.get_data(this.mode),this.polling_interval)){this.interval=setInterval(function(){return t.get_data(t.mode,t.max_size,t.if_modified)},this.polling_interval)}},e.prototype.get_data=function(t,e,i){var r=this;void 0===e&&(e=0),void 0===i&&(i=!1);var o=this.prepare_request();o.addEventListener(\"load\",function(){return r.do_load(o,t,e)}),o.addEventListener(\"error\",function(){return r.do_error(o)}),o.send()},e.prototype.prepare_request=function(){var t=new XMLHttpRequest;t.open(this.method,this.data_url,!0),t.withCredentials=!1,t.setRequestHeader(\"Content-Type\",this.content_type);var e=this.http_headers;for(var i in e){var r=e[i];t.setRequestHeader(i,r)}return t},e.prototype.do_load=function(t,e,i){if(200===t.status){var r=JSON.parse(t.responseText);this.load_data(r,e,i)}},e.prototype.do_error=function(t){a.logger.error(\"Failed to fetch JSON from \"+this.data_url+\" with code \"+t.status)},e}(o.RemoteDataSource);i.AjaxDataSource=s,s.__name__=\"AjaxDataSource\",s.init_AjaxDataSource()},\n", | |
" function _(t,e,i){var n=t(113),o=t(389),a=t(121),r=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.prototype.get_column=function(t){var e=this.data[t];return null!=e?e:[]},e.prototype.initialize=function(){t.prototype.initialize.call(this),this.setup()},e.init_RemoteDataSource=function(){this.define({polling_interval:[a.Number]})},e}(o.WebDataSource);i.RemoteDataSource=r,r.__name__=\"RemoteDataSource\",r.init_RemoteDataSource()},\n", | |
" function _(e,t,r){var o=e(113),n=e(171),a=e(167),i=e(121),s=e(110);function l(e){return null!=e?e:NaN}var u=function(e){function t(t){return e.call(this,t)||this}return o.__extends(t,e),t.init_GeoJSONDataSource=function(){this.define({geojson:[i.Any]}),this.internal({data:[i.Any,{}]})},t.prototype.initialize=function(){e.prototype.initialize.call(this),this._update_data()},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.properties.geojson.change,function(){return t._update_data()})},t.prototype._update_data=function(){this.data=this.geojson_to_column_data()},t.prototype._get_new_list_array=function(e){return s.range(0,e).map(function(e){return[]})},t.prototype._get_new_nan_array=function(e){return s.range(0,e).map(function(e){return NaN})},t.prototype._add_properties=function(e,t,r,o){var n=e.properties||{};for(var a in n)t.hasOwnProperty(a)||(t[a]=this._get_new_nan_array(o)),t[a][r]=l(n[a])},t.prototype._add_geometry=function(e,t,r){function o(e,t){return e.concat([[NaN,NaN,NaN]]).concat(t)}switch(e.type){case\"Point\":var n=e.coordinates,i=n[0],s=n[1],u=n[2];t.x[r]=i,t.y[r]=s,t.z[r]=l(u);break;case\"LineString\":for(var _=e.coordinates,c=0;c<_.length;c++){var g=_[c];i=g[0],s=g[1],u=g[2];t.xs[r][c]=i,t.ys[r][c]=s,t.zs[r][c]=l(u)}break;case\"Polygon\":e.coordinates.length>1&&a.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\");var h=e.coordinates[0];for(c=0;c<h.length;c++){var p=h[c];i=p[0],s=p[1],u=p[2];t.xs[r][c]=i,t.ys[r][c]=s,t.zs[r][c]=l(u)}break;case\"MultiPoint\":a.logger.warn(\"MultiPoint not supported in Bokeh\");break;case\"MultiLineString\":for(_=e.coordinates.reduce(o),c=0;c<_.length;c++){var y=_[c];i=y[0],s=y[1],u=y[2];t.xs[r][c]=i,t.ys[r][c]=s,t.zs[r][c]=l(u)}break;case\"MultiPolygon\":for(var d=[],f=0,m=e.coordinates;f<m.length;f++){var w=m[f];w.length>1&&a.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),d.push(w[0])}for(_=d.reduce(o),c=0;c<_.length;c++){var v=_[c];i=v[0],s=v[1],u=v[2];t.xs[r][c]=i,t.ys[r][c]=s,t.zs[r][c]=l(u)}break;default:throw new Error(\"Invalid GeoJSON geometry type: \"+e.type)}},t.prototype.geojson_to_column_data=function(){var e,t=JSON.parse(this.geojson);switch(t.type){case\"GeometryCollection\":if(null==t.geometries)throw new Error(\"No geometries found in GeometryCollection\");if(0===t.geometries.length)throw new Error(\"geojson.geometries must have one or more items\");e=t.geometries;break;case\"FeatureCollection\":if(null==t.features)throw new Error(\"No features found in FeaturesCollection\");if(0==t.features.length)throw new Error(\"geojson.features must have one or more items\");e=t.features;break;default:throw new Error(\"Bokeh only supports type GeometryCollection and FeatureCollection at top level\")}for(var r=0,o=0,n=e;o<n.length;o++){\"GeometryCollection\"==(_=\"Feature\"===(u=n[o]).type?u.geometry:u).type?r+=_.geometries.length:r+=1}for(var a={x:this._get_new_nan_array(r),y:this._get_new_nan_array(r),z:this._get_new_nan_array(r),xs:this._get_new_list_array(r),ys:this._get_new_list_array(r),zs:this._get_new_list_array(r)},i=0,s=0,l=e;s<l.length;s++){var u,_;if(\"GeometryCollection\"==(_=\"Feature\"==(u=l[s]).type?u.geometry:u).type)for(var c=0,g=_.geometries;c<g.length;c++){var h=g[c];this._add_geometry(h,a,i),\"Feature\"===u.type&&this._add_properties(u,a,i,r),i+=1}else this._add_geometry(_,a,i),\"Feature\"===u.type&&this._add_properties(u,a,i,r),i+=1}return a},t}(n.ColumnarDataSource);r.GeoJSONDataSource=u,u.__name__=\"GeoJSONDataSource\",u.init_GeoJSONDataSource()},\n", | |
" function _(r,e,i){var c=r(205);i.AdaptiveTicker=c.AdaptiveTicker;var a=r(204);i.BasicTicker=a.BasicTicker;var k=r(246);i.CategoricalTicker=k.CategoricalTicker;var T=r(257);i.CompositeTicker=T.CompositeTicker;var t=r(206);i.ContinuousTicker=t.ContinuousTicker;var v=r(256);i.DatetimeTicker=v.DatetimeTicker;var o=r(258);i.DaysTicker=o.DaysTicker;var n=r(394);i.FixedTicker=n.FixedTicker;var s=r(265);i.LogTicker=s.LogTicker;var g=r(268);i.MercatorTicker=g.MercatorTicker;var l=r(261);i.MonthsTicker=l.MonthsTicker;var C=r(259);i.SingleIntervalTicker=C.SingleIntervalTicker;var u=r(207);i.Ticker=u.Ticker;var d=r(262);i.YearsTicker=d.YearsTicker},\n", | |
" function _(i,t,n){var r=i(113),e=i(206),c=i(121),o=function(i){function t(t){var n=i.call(this,t)||this;return n.min_interval=0,n.max_interval=0,n}return r.__extends(t,i),t.init_FixedTicker=function(){this.define({ticks:[c.Array,[]],minor_ticks:[c.Array,[]]})},t.prototype.get_ticks_no_defaults=function(i,t,n,r){return{major:this.ticks,minor:this.minor_ticks}},t.prototype.get_interval=function(i,t,n){return 0},t}(e.ContinuousTicker);n.FixedTicker=o,o.__name__=\"FixedTicker\",o.init_FixedTicker()},\n", | |
" function _(e,r,T){var o=e(396);T.BBoxTileSource=o.BBoxTileSource;var S=e(397);T.MercatorTileSource=S.MercatorTileSource;var c=e(400);T.QUADKEYTileSource=c.QUADKEYTileSource;var i=e(401);T.TileRenderer=i.TileRenderer;var l=e(398);T.TileSource=l.TileSource;var u=e(404);T.TMSTileSource=u.TMSTileSource;var a=e(402);T.WMTSTileSource=a.WMTSTileSource},\n", | |
" function _(e,t,i){var r=e(113),o=e(397),n=e(121),l=function(e){function t(t){return e.call(this,t)||this}return r.__extends(t,e),t.init_BBoxTileSource=function(){this.define({use_latlon:[n.Boolean,!1]})},t.prototype.get_image_url=function(e,t,i){var r,o,n,l,_,u,c=this.string_lookup_replace(this.url,this.extra_url_vars);return this.use_latlon?(l=(r=this.get_tile_geographic_bounds(e,t,i))[0],u=r[1],n=r[2],_=r[3]):(l=(o=this.get_tile_meter_bounds(e,t,i))[0],u=o[1],n=o[2],_=o[3]),c.replace(\"{XMIN}\",l.toString()).replace(\"{YMIN}\",u.toString()).replace(\"{XMAX}\",n.toString()).replace(\"{YMAX}\",_.toString())},t}(o.MercatorTileSource);i.BBoxTileSource=l,l.__name__=\"BBoxTileSource\",l.init_BBoxTileSource()},\n", | |
" function _(t,e,i){var o=t(113),r=t(398),n=t(121),_=t(110),s=t(399),u=function(t){function e(e){return t.call(this,e)||this}return o.__extends(e,t),e.init_MercatorTileSource=function(){this.define({snap_to_zoom:[n.Boolean,!1],wrap_around:[n.Boolean,!0]}),this.override({x_origin_offset:20037508.34,y_origin_offset:20037508.34,initial_resolution:156543.03392804097})},e.prototype.initialize=function(){var e=this;t.prototype.initialize.call(this),this._resolutions=_.range(this.min_zoom,this.max_zoom+1).map(function(t){return e.get_resolution(t)})},e.prototype._computed_initial_resolution=function(){return null!=this.initial_resolution?this.initial_resolution:2*Math.PI*6378137/this.tile_size},e.prototype.is_valid_tile=function(t,e,i){return!(!this.wrap_around&&(t<0||t>=Math.pow(2,i)))&&!(e<0||e>=Math.pow(2,i))},e.prototype.parent_by_tile_xyz=function(t,e,i){var o=this.tile_xyz_to_quadkey(t,e,i),r=o.substring(0,o.length-1);return this.quadkey_to_tile_xyz(r)},e.prototype.get_resolution=function(t){return this._computed_initial_resolution()/Math.pow(2,t)},e.prototype.get_resolution_by_extent=function(t,e,i){return[(t[2]-t[0])/i,(t[3]-t[1])/e]},e.prototype.get_level_by_extent=function(t,e,i){for(var o=(t[2]-t[0])/i,r=(t[3]-t[1])/e,n=Math.max(o,r),_=0,s=0,u=this._resolutions;s<u.length;s++){if(n>u[s]){if(0==_)return 0;if(_>0)return _-1}_+=1}return _-1},e.prototype.get_closest_level_by_extent=function(t,e,i){var o=(t[2]-t[0])/i,r=(t[3]-t[1])/e,n=Math.max(o,r),_=this._resolutions.reduce(function(t,e){return Math.abs(e-n)<Math.abs(t-n)?e:t});return this._resolutions.indexOf(_)},e.prototype.snap_to_zoom_level=function(t,e,i,o){var r=t[0],n=t[1],_=t[2],s=t[3],u=this._resolutions[o],a=i*u,l=e*u;if(!this.snap_to_zoom){var p=(_-r)/a,h=(s-n)/l;p>h?(a=_-r,l*=p):(a*=h,l=s-n)}var y=(a-(_-r))/2,c=(l-(s-n))/2;return[r-y,n-c,_+y,s+c]},e.prototype.tms_to_wmts=function(t,e,i){return[t,Math.pow(2,i)-1-e,i]},e.prototype.wmts_to_tms=function(t,e,i){return[t,Math.pow(2,i)-1-e,i]},e.prototype.pixels_to_meters=function(t,e,i){var o=this.get_resolution(i);return[t*o-this.x_origin_offset,e*o-this.y_origin_offset]},e.prototype.meters_to_pixels=function(t,e,i){var o=this.get_resolution(i);return[(t+this.x_origin_offset)/o,(e+this.y_origin_offset)/o]},e.prototype.pixels_to_tile=function(t,e){var i=Math.ceil(t/this.tile_size);return[i=0===i?i:i-1,Math.max(Math.ceil(e/this.tile_size)-1,0)]},e.prototype.pixels_to_raster=function(t,e,i){return[t,(this.tile_size<<i)-e]},e.prototype.meters_to_tile=function(t,e,i){var o=this.meters_to_pixels(t,e,i),r=o[0],n=o[1];return this.pixels_to_tile(r,n)},e.prototype.get_tile_meter_bounds=function(t,e,i){var o=this.pixels_to_meters(t*this.tile_size,e*this.tile_size,i),r=o[0],n=o[1],_=this.pixels_to_meters((t+1)*this.tile_size,(e+1)*this.tile_size,i);return[r,n,_[0],_[1]]},e.prototype.get_tile_geographic_bounds=function(t,e,i){var o=this.get_tile_meter_bounds(t,e,i),r=s.meters_extent_to_geographic(o);return[r[0],r[1],r[2],r[3]]},e.prototype.get_tiles_by_extent=function(t,e,i){void 0===i&&(i=1);var o=t[0],r=t[1],n=t[2],_=t[3],s=this.meters_to_tile(o,r,e),u=s[0],a=s[1],l=this.meters_to_tile(n,_,e),p=l[0],h=l[1];u-=i,a-=i,p+=i;for(var y=[],c=h+=i;c>=a;c--)for(var f=u;f<=p;f++)this.is_valid_tile(f,c,e)&&y.push([f,c,e,this.get_tile_meter_bounds(f,c,e)]);return this.sort_tiles_from_center(y,[u,a,p,h]),y},e.prototype.quadkey_to_tile_xyz=function(t){for(var e=0,i=0,o=t.length,r=o;r>0;r--){var n=1<<r-1;switch(t.charAt(o-r)){case\"0\":continue;case\"1\":e|=n;break;case\"2\":i|=n;break;case\"3\":e|=n,i|=n;break;default:throw new TypeError(\"Invalid Quadkey: \"+t)}}return[e,i,o]},e.prototype.tile_xyz_to_quadkey=function(t,e,i){for(var o=\"\",r=i;r>0;r--){var n=1<<r-1,_=0;0!=(t&n)&&(_+=1),0!=(e&n)&&(_+=2),o+=_.toString()}return o},e.prototype.children_by_tile_xyz=function(t,e,i){for(var o=this.tile_xyz_to_quadkey(t,e,i),r=[],n=0;n<=3;n++){var _=this.quadkey_to_tile_xyz(o+n.toString()),s=_[0],u=_[1],a=_[2],l=this.get_tile_meter_bounds(s,u,a);r.push([s,u,a,l])}return r},e.prototype.get_closest_parent_by_tile_xyz=function(t,e,i){var o,r,n,_=this.calculate_world_x_by_tile_xyz(t,e,i);t=(o=this.normalize_xyz(t,e,i))[0],e=o[1],i=o[2];for(var s=this.tile_xyz_to_quadkey(t,e,i);s.length>0;)if(s=s.substring(0,s.length-1),t=(r=this.quadkey_to_tile_xyz(s))[0],e=r[1],i=r[2],t=(n=this.denormalize_xyz(t,e,i,_))[0],e=n[1],i=n[2],this.tiles.has(this.tile_xyz_to_key(t,e,i)))return[t,e,i];return[0,0,0]},e.prototype.normalize_xyz=function(t,e,i){if(this.wrap_around){var o=Math.pow(2,i);return[(t%o+o)%o,e,i]}return[t,e,i]},e.prototype.denormalize_xyz=function(t,e,i,o){return[t+o*Math.pow(2,i),e,i]},e.prototype.denormalize_meters=function(t,e,i,o){return[t+2*o*Math.PI*6378137,e]},e.prototype.calculate_world_x_by_tile_xyz=function(t,e,i){return Math.floor(t/Math.pow(2,i))},e}(r.TileSource);i.MercatorTileSource=u,u.__name__=\"MercatorTileSource\",u.init_MercatorTileSource()},\n", | |
" function _(t,e,r){var i=t(113),n=t(166),o=t(121),a=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.init_TileSource=function(){this.define({url:[o.String,\"\"],tile_size:[o.Number,256],max_zoom:[o.Number,30],min_zoom:[o.Number,0],extra_url_vars:[o.Any,{}],attribution:[o.String,\"\"],x_origin_offset:[o.Number],y_origin_offset:[o.Number],initial_resolution:[o.Number]})},e.prototype.initialize=function(){t.prototype.initialize.call(this),this.tiles=new Map,this._normalize_case()},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.change,function(){return e._clear_cache()})},e.prototype.string_lookup_replace=function(t,e){var r=t;for(var i in e){var n=e[i];r=r.replace(\"{\"+i+\"}\",n)}return r},e.prototype._normalize_case=function(){var t=this.url.replace(\"{x}\",\"{X}\").replace(\"{y}\",\"{Y}\").replace(\"{z}\",\"{Z}\").replace(\"{q}\",\"{Q}\").replace(\"{xmin}\",\"{XMIN}\").replace(\"{ymin}\",\"{YMIN}\").replace(\"{xmax}\",\"{XMAX}\").replace(\"{ymax}\",\"{YMAX}\");this.url=t},e.prototype._clear_cache=function(){this.tiles=new Map},e.prototype.tile_xyz_to_key=function(t,e,r){return t+\":\"+e+\":\"+r},e.prototype.key_to_tile_xyz=function(t){var e=t.split(\":\").map(function(t){return parseInt(t)});return[e[0],e[1],e[2]]},e.prototype.sort_tiles_from_center=function(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],a=(n-r)/2+r,c=(o-i)/2+i;t.sort(function(t,e){return Math.sqrt(Math.pow(a-t[0],2)+Math.pow(c-t[1],2))-Math.sqrt(Math.pow(a-e[0],2)+Math.pow(c-e[1],2))})},e.prototype.get_image_url=function(t,e,r){return this.string_lookup_replace(this.url,this.extra_url_vars).replace(\"{X}\",t.toString()).replace(\"{Y}\",e.toString()).replace(\"{Z}\",r.toString())},e}(n.Model);r.TileSource=a,a.__name__=\"TileSource\",a.init_TileSource()},\n", | |
" function _(r,e,t){var n=r(132);function o(r,e){return n.wgs84_mercator.forward([r,e])}function _(r,e){return n.wgs84_mercator.inverse([r,e])}t.geographic_to_meters=o,t.meters_to_geographic=_,t.geographic_extent_to_meters=function(r){var e=r[0],t=r[1],n=r[2],_=r[3],c=o(e,t),a=c[0],g=c[1],i=o(n,_);return[a,g,i[0],i[1]]},t.meters_extent_to_geographic=function(r){var e=r[0],t=r[1],n=r[2],o=r[3],c=_(e,t),a=c[0],g=c[1],i=_(n,o);return[a,g,i[0],i[1]]}},\n", | |
" function _(t,e,r){var _=t(113),i=function(t){function e(e){return t.call(this,e)||this}return _.__extends(e,t),e.prototype.get_image_url=function(t,e,r){var _=this.string_lookup_replace(this.url,this.extra_url_vars),i=this.tms_to_wmts(t,e,r),u=i[0],n=i[1],o=i[2],l=this.tile_xyz_to_quadkey(u,n,o);return _.replace(\"{Q}\",l)},e}(t(397).MercatorTileSource);r.QUADKEYTileSource=i,i.__name__=\"QUADKEYTileSource\"},\n", | |
" function _(e,t,i){var n=e(113),a=e(402),r=e(176),_=e(225),s=e(163),o=e(121),l=e(318),h=e(110),u=e(109),p=e(174),d=e(170),c=e(403),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.initialize=function(){this._tiles=[],e.prototype.initialize.call(this)},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return t.request_render()}),this.connect(this.model.tile_source.change,function(){return t.request_render()})},t.prototype.get_extent=function(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]},Object.defineProperty(t.prototype,\"map_plot\",{get:function(){return this.plot_model},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"map_canvas\",{get:function(){return this.plot_view.canvas_view.ctx},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"map_frame\",{get:function(){return this.plot_view.frame},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"x_range\",{get:function(){return this.map_plot.x_range},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"y_range\",{get:function(){return this.map_plot.y_range},enumerable:!0,configurable:!0}),t.prototype._set_data=function(){this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0},t.prototype._update_attribution=function(){null!=this.attribution_el&&s.removeElement(this.attribution_el);var e=this.model.tile_source.attribution;if(u.isString(e)&&e.length>0){var t=this.plot_view,i=t.layout,n=t.frame,a=i._width.value-n._right.value,r=i._height.value-n._bottom.value,_=n._width.value;this.attribution_el=s.div({class:c.bk_tile_attribution,style:{position:\"absolute\",right:a+\"px\",bottom:r+\"px\",\"max-width\":_-4+\"px\",padding:\"2px\",\"background-color\":\"rgba(255,255,255,0.5)\",\"font-size\":\"7pt\",\"line-height\":\"1.05\",\"white-space\":\"nowrap\",overflow:\"hidden\",\"text-overflow\":\"ellipsis\"}}),this.plot_view.canvas_view.events_el.appendChild(this.attribution_el),this.attribution_el.innerHTML=e,this.attribution_el.title=this.attribution_el.textContent.replace(/\\s*\\n\\s*/g,\" \")}},t.prototype._map_data=function(){this.initial_extent=this.get_extent();var e=this.model.tile_source.get_level_by_extent(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value),t=this.model.tile_source.snap_to_zoom_level(this.initial_extent,this.map_frame._height.value,this.map_frame._width.value,e);this.x_range.start=t[0],this.y_range.start=t[1],this.x_range.end=t[2],this.y_range.end=t[3],this.x_range instanceof _.Range1d&&(this.x_range.reset_start=t[0],this.x_range.reset_end=t[2]),this.y_range instanceof _.Range1d&&(this.y_range.reset_start=t[1],this.y_range.reset_end=t[3]),this._update_attribution()},t.prototype._create_tile=function(e,t,i,n,a){var r=this;void 0===a&&(a=!1);var _=this.model.tile_source.normalize_xyz(e,t,i),s=_[0],o=_[1],h=_[2],u={img:void 0,tile_coords:[e,t,i],normalized_coords:[s,o,h],quadkey:this.model.tile_source.tile_xyz_to_quadkey(e,t,i),cache_key:this.model.tile_source.tile_xyz_to_key(e,t,i),bounds:n,loaded:!1,finished:!1,x_coord:n[0],y_coord:n[3]},p=this.model.tile_source.get_image_url(s,o,h);new l.ImageLoader(p,{loaded:function(e){Object.assign(u,{img:e,loaded:!0}),a?(u.finished=!0,r.notify_finished()):r.request_render()},failed:function(){u.finished=!0}}),this.model.tile_source.tiles.set(u.cache_key,u),this._tiles.push(u)},t.prototype._enforce_aspect_ratio=function(){if(this._last_height!==this.map_frame._height.value||this._last_width!==this.map_frame._width.value){var e=this.get_extent(),t=this.model.tile_source.get_level_by_extent(e,this.map_frame._height.value,this.map_frame._width.value),i=this.model.tile_source.snap_to_zoom_level(e,this.map_frame._height.value,this.map_frame._width.value,t);this.x_range.setv({start:i[0],end:i[2]}),this.y_range.setv({start:i[1],end:i[3]}),this.extent=i,this._last_height=this.map_frame._height.value,this._last_width=this.map_frame._width.value}},t.prototype.has_finished=function(){if(!e.prototype.has_finished.call(this))return!1;if(0===this._tiles.length)return!1;for(var t=0,i=this._tiles;t<i.length;t++){if(!i[t].finished)return!1}return!0},t.prototype.render=function(){null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),this._enforce_aspect_ratio(),this._update(),null!=this.prefetch_timer&&clearTimeout(this.prefetch_timer),this.prefetch_timer=setTimeout(this._prefetch_tiles.bind(this),500),this.has_finished()&&this.notify_finished()},t.prototype._draw_tile=function(e){var t=this.model.tile_source.tiles.get(e);if(null!=t&&t.loaded){var i=this.plot_view.map_to_screen([t.bounds[0]],[t.bounds[3]]),n=i[0][0],a=i[1][0],r=this.plot_view.map_to_screen([t.bounds[2]],[t.bounds[1]]),_=r[0][0]-n,s=r[1][0]-a,o=n,l=a,h=this.map_canvas.getImageSmoothingEnabled();this.map_canvas.setImageSmoothingEnabled(this.model.smoothing),this.map_canvas.drawImage(t.img,o,l,_,s),this.map_canvas.setImageSmoothingEnabled(h),t.finished=!0}},t.prototype._set_rect=function(){var e=this.plot_model.properties.outline_line_width.value(),t=this.map_frame._left.value+e/2,i=this.map_frame._top.value+e/2,n=this.map_frame._width.value-e,a=this.map_frame._height.value-e;this.map_canvas.rect(t,i,n,a),this.map_canvas.clip()},t.prototype._render_tiles=function(e){this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.model.alpha;for(var t=0,i=e;t<i.length;t++){var n=i[t];this._draw_tile(n)}this.map_canvas.restore()},t.prototype._prefetch_tiles=function(){for(var e=this.model.tile_source,t=this.get_extent(),i=this.map_frame._height.value,n=this.map_frame._width.value,a=this.model.tile_source.get_level_by_extent(t,i,n),r=this.model.tile_source.get_tiles_by_extent(t,a),_=0,s=Math.min(10,r.length);_<s;_++)for(var o=r[_],l=o[0],h=o[1],u=o[2],p=0,d=this.model.tile_source.children_by_tile_xyz(l,h,u);p<d.length;p++){var c=d[p],m=c[0],f=c[1],g=c[2],v=c[3];e.tiles.has(e.tile_xyz_to_key(m,f,g))||this._create_tile(m,f,g,v,!0)}},t.prototype._fetch_tiles=function(e){for(var t=0,i=e;t<i.length;t++){var n=i[t],a=n[0],r=n[1],_=n[2],s=n[3];this._create_tile(a,r,_,s)}},t.prototype._update=function(){var e=this,t=this.model.tile_source,i=t.min_zoom,n=t.max_zoom,a=this.get_extent(),r=this.extent[2]-this.extent[0]<a[2]-a[0],_=this.map_frame._height.value,s=this.map_frame._width.value,o=t.get_level_by_extent(a,_,s),l=!1;o<i?(a=this.extent,o=i,l=!0):o>n&&(a=this.extent,o=n,l=!0),l&&(this.x_range.setv({x_range:{start:a[0],end:a[2]}}),this.y_range.setv({start:a[1],end:a[3]}),this.extent=a),this.extent=a;for(var u=t.get_tiles_by_extent(a,o),p=[],d=[],c=[],m=[],f=0,g=u;f<g.length;f++){var v=g[f],y=v[0],x=v[1],b=v[2],w=t.tile_xyz_to_key(y,x,b),z=t.tiles.get(w);if(null!=z&&z.loaded)d.push(w);else if(this.model.render_parents){var T=t.get_closest_parent_by_tile_xyz(y,x,b),k=T[0],R=T[1],S=T[2],j=t.tile_xyz_to_key(k,R,S),I=t.tiles.get(j);if(null!=I&&I.loaded&&!h.includes(c,j)&&c.push(j),r)for(var O=0,q=t.children_by_tile_xyz(y,x,b);O<q.length;O++){var P=q[O],E=P[0],M=P[1],C=P[2],D=t.tile_xyz_to_key(E,M,C);t.tiles.has(D)&&m.push(D)}}null==z&&p.push(v)}this._render_tiles(c),this._render_tiles(m),this._render_tiles(d),null!=this.render_timer&&clearTimeout(this.render_timer),this.render_timer=setTimeout(function(){return e._fetch_tiles(p)},65)},t}(r.DataRendererView);i.TileRendererView=m,m.__name__=\"TileRendererView\";var f=function(e){function t(t){var i=e.call(this,t)||this;return i._selection_manager=new p.SelectionManager({source:new d.ColumnDataSource}),i}return n.__extends(t,e),t.init_TileRenderer=function(){this.prototype.default_view=m,this.define({alpha:[o.Number,1],smoothing:[o.Boolean,!0],tile_source:[o.Instance,function(){return new a.WMTSTileSource}],render_parents:[o.Boolean,!0]})},t.prototype.get_selection_manager=function(){return this._selection_manager},t}(r.DataRenderer);i.TileRenderer=f,f.__name__=\"TileRenderer\",f.init_TileRenderer()},\n", | |
" function _(t,r,e){var i=t(113),n=function(t){function r(r){return t.call(this,r)||this}return i.__extends(r,t),r.prototype.get_image_url=function(t,r,e){var i=this.string_lookup_replace(this.url,this.extra_url_vars),n=this.tms_to_wmts(t,r,e),o=n[0],_=n[1],u=n[2];return i.replace(\"{X}\",o.toString()).replace(\"{Y}\",_.toString()).replace(\"{Z}\",u.toString())},r}(t(397).MercatorTileSource);e.WMTSTileSource=n,n.__name__=\"WMTSTileSource\"},\n", | |
" function _(t,i,n){t(164),t(163).styles.append(\".bk-root .bk-tile-attribution a {\\n color: black;\\n}\\n\"),n.bk_tile_attribution=\"bk-tile-attribution\"},\n", | |
" function _(r,e,t){var i=r(113),n=function(r){function e(e){return r.call(this,e)||this}return i.__extends(e,r),e.prototype.get_image_url=function(r,e,t){return this.string_lookup_replace(this.url,this.extra_url_vars).replace(\"{X}\",r.toString()).replace(\"{Y}\",e.toString()).replace(\"{Z}\",t.toString())},e}(r(397).MercatorTileSource);t.TMSTileSource=n,n.__name__=\"TMSTileSource\"},\n", | |
" function _(e,a,r){var t=e(406);r.CanvasTexture=t.CanvasTexture;var u=e(408);r.ImageURLTexture=u.ImageURLTexture;var x=e(407);r.Texture=x.Texture},\n", | |
" function _(e,t,n){var r=e(113),i=e(407),a=e(121),u=e(127),c=function(t){function n(e){return t.call(this,e)||this}return r.__extends(n,t),n.init_CanvasTexture=function(){this.define({code:[a.String]})},Object.defineProperty(n.prototype,\"func\",{get:function(){var e=u.use_strict(this.code);return new Function(\"ctx\",\"color\",\"scale\",\"weight\",\"require\",\"exports\",e)},enumerable:!0,configurable:!0}),n.prototype.get_pattern=function(t,n,r){var i=this;return function(a){var u=document.createElement(\"canvas\");u.width=n,u.height=n;var c=u.getContext(\"2d\");return i.func.call(i,c,t,n,r,e,{}),a.createPattern(u,i.repetition)}},n}(i.Texture);n.CanvasTexture=c,c.__name__=\"CanvasTexture\",c.init_CanvasTexture()},\n", | |
" function _(e,t,n){var i=e(113),r=e(166),o=e(121),u=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_Texture=function(){this.define({repetition:[o.TextureRepetition,\"repeat\"]})},t.prototype.onload=function(e){e()},t}(r.Model);n.Texture=u,u.__name__=\"Texture\",u.init_Texture()},\n", | |
" function _(t,e,n){var i=t(113),r=t(407),o=t(121),a=t(318),u=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.init_ImageURLTexture=function(){this.define({url:[o.String]})},e.prototype.initialize=function(){t.prototype.initialize.call(this),this._loader=new a.ImageLoader(this.url)},e.prototype.get_pattern=function(t,e,n){var i=this;return function(t){return i._loader.finished?t.createPattern(i._loader.image,i.repetition):null}},e.prototype.onload=function(t){this._loader.promise.then(function(){return t()})},e}(r.Texture);n.ImageURLTexture=u,u.__name__=\"ImageURLTexture\",u.init_ImageURLTexture()},\n", | |
" function _(o,l,T){var a=o(371);T.ActionTool=a.ActionTool;var r=o(410);T.CustomAction=r.CustomAction;var e=o(372);T.HelpTool=e.HelpTool;var v=o(411);T.RedoTool=v.RedoTool;var t=o(412);T.ResetTool=t.ResetTool;var n=o(413);T.SaveTool=n.SaveTool;var s=o(414);T.UndoTool=s.UndoTool;var P=o(415);T.ZoomInTool=P.ZoomInTool;var c=o(417);T.ZoomOutTool=c.ZoomOutTool;var i=o(365);T.ButtonTool=i.ButtonTool;var d=o(418);T.EditTool=d.EditTool;var m=o(419);T.BoxEditTool=m.BoxEditTool;var x=o(420);T.FreehandDrawTool=x.FreehandDrawTool;var y=o(421);T.PointDrawTool=y.PointDrawTool;var B=o(422);T.PolyDrawTool=B.PolyDrawTool;var S=o(423);T.PolyTool=S.PolyTool;var u=o(424);T.PolyEditTool=u.PolyEditTool;var b=o(425);T.BoxSelectTool=b.BoxSelectTool;var h=o(428);T.BoxZoomTool=h.BoxZoomTool;var Z=o(370);T.GestureTool=Z.GestureTool;var p=o(429);T.LassoSelectTool=p.LassoSelectTool;var w=o(430);T.PanTool=w.PanTool;var C=o(431);T.PolySelectTool=C.PolySelectTool;var D=o(432);T.RangeTool=D.RangeTool;var E=o(426);T.SelectTool=E.SelectTool;var H=o(433);T.TapTool=H.TapTool;var R=o(434);T.WheelPanTool=R.WheelPanTool;var A=o(435);T.WheelZoomTool=A.WheelZoomTool;var I=o(436);T.CrosshairTool=I.CrosshairTool;var W=o(437);T.CustomJSHover=W.CustomJSHover;var g=o(438);T.HoverTool=g.HoverTool;var F=o(364);T.InspectTool=F.InspectTool;var G=o(366);T.Tool=G.Tool;var J=o(439);T.ToolProxy=J.ToolProxy;var L=o(363);T.Toolbar=L.Toolbar;var O=o(369);T.ToolbarBase=O.ToolbarBase;var U=o(440);T.ProxyToolbar=U.ProxyToolbar;var f=o(440);T.ToolbarBox=f.ToolbarBox},\n", | |
" function _(t,o,n){var i=t(113),e=t(371),c=t(121),u=t(367),s=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(o,t),o.prototype.css_classes=function(){return t.prototype.css_classes.call(this).concat(u.bk_toolbar_button_custom_action)},o}(e.ActionToolButtonView);n.CustomActionButtonView=s,s.__name__=\"CustomActionButtonView\";var l=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(o,t),o.prototype.doit=function(){null!=this.model.callback&&this.model.callback.execute(this.model)},o}(e.ActionToolView);n.CustomActionView=l,l.__name__=\"CustomActionView\";var r=function(t){function o(o){var n=t.call(this,o)||this;return n.tool_name=\"Custom Action\",n.button_view=s,n}return i.__extends(o,t),o.init_CustomAction=function(){this.prototype.default_view=l,this.define({action_tooltip:[c.String,\"Perform a Custom Action\"],callback:[c.Any],icon:[c.String]})},Object.defineProperty(o.prototype,\"tooltip\",{get:function(){return this.action_tooltip},enumerable:!0,configurable:!0}),o}(e.ActionTool);n.CustomAction=r,r.__name__=\"CustomAction\",r.init_CustomAction()},\n", | |
" function _(o,t,n){var e=o(113),i=o(371),_=o(373),l=function(o){function t(){return null!==o&&o.apply(this,arguments)||this}return e.__extends(t,o),t.prototype.connect_signals=function(){var t=this;o.prototype.connect_signals.call(this),this.connect(this.plot_view.state_changed,function(){return t.model.disabled=!t.plot_view.can_redo()})},t.prototype.doit=function(){this.plot_view.redo()},t}(i.ActionToolView);n.RedoToolView=l,l.__name__=\"RedoToolView\";var c=function(o){function t(t){var n=o.call(this,t)||this;return n.tool_name=\"Redo\",n.icon=_.bk_tool_icon_redo,n}return e.__extends(t,o),t.init_RedoTool=function(){this.prototype.default_view=l,this.override({disabled:!0})},t}(i.ActionTool);n.RedoTool=c,c.__name__=\"RedoTool\",c.init_RedoTool()},\n", | |
" function _(t,e,o){var n=t(113),i=t(371),_=t(373),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.doit=function(){this.plot_view.reset()},e}(i.ActionToolView);o.ResetToolView=l,l.__name__=\"ResetToolView\";var s=function(t){function e(e){var o=t.call(this,e)||this;return o.tool_name=\"Reset\",o.icon=_.bk_tool_icon_reset,o}return n.__extends(e,t),e.init_ResetTool=function(){this.prototype.default_view=l},e}(i.ActionTool);o.ResetTool=s,s.__name__=\"ResetTool\",s.init_ResetTool()},\n", | |
" function _(o,t,n){var e=o(113),i=o(371),_=o(373),a=function(o){function t(){return null!==o&&o.apply(this,arguments)||this}return e.__extends(t,o),t.prototype.doit=function(){this.plot_view.save(\"bokeh_plot\")},t}(i.ActionToolView);n.SaveToolView=a,a.__name__=\"SaveToolView\";var l=function(o){function t(t){var n=o.call(this,t)||this;return n.tool_name=\"Save\",n.icon=_.bk_tool_icon_save,n}return e.__extends(t,o),t.init_SaveTool=function(){this.prototype.default_view=a},t}(i.ActionTool);n.SaveTool=l,l.__name__=\"SaveTool\",l.init_SaveTool()},\n", | |
" function _(o,n,t){var i=o(113),e=o(371),_=o(373),l=function(o){function n(){return null!==o&&o.apply(this,arguments)||this}return i.__extends(n,o),n.prototype.connect_signals=function(){var n=this;o.prototype.connect_signals.call(this),this.connect(this.plot_view.state_changed,function(){return n.model.disabled=!n.plot_view.can_undo()})},n.prototype.doit=function(){this.plot_view.undo()},n}(e.ActionToolView);t.UndoToolView=l,l.__name__=\"UndoToolView\";var c=function(o){function n(n){var t=o.call(this,n)||this;return t.tool_name=\"Undo\",t.icon=_.bk_tool_icon_undo,t}return i.__extends(n,o),n.init_UndoTool=function(){this.prototype.default_view=l,this.override({disabled:!0})},n}(e.ActionTool);t.UndoTool=c,c.__name__=\"UndoTool\",c.init_UndoTool()},\n", | |
" function _(o,t,n){var i=o(113),e=o(371),_=o(416),l=o(121),s=o(373),r=function(o){function t(){return null!==o&&o.apply(this,arguments)||this}return i.__extends(t,o),t.prototype.doit=function(){var o=this.plot_view.frame,t=this.model.dimensions,n=\"width\"==t||\"both\"==t,i=\"height\"==t||\"both\"==t,e=_.scale_range(o,this.model.factor,n,i);this.plot_view.push_state(\"zoom_out\",{range:e}),this.plot_view.update_range(e,!1,!0),this.model.document&&this.model.document.interactive_start(this.plot_model)},t}(e.ActionToolView);n.ZoomInToolView=r,r.__name__=\"ZoomInToolView\";var m=function(o){function t(t){var n=o.call(this,t)||this;return n.tool_name=\"Zoom In\",n.icon=s.bk_tool_icon_zoom_in,n}return i.__extends(t,o),t.init_ZoomInTool=function(){this.prototype.default_view=r,this.define({factor:[l.Percent,.1],dimensions:[l.Dimensions,\"both\"]})},Object.defineProperty(t.prototype,\"tooltip\",{get:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)},enumerable:!0,configurable:!0}),t}(e.ActionTool);n.ZoomInTool=m,m.__name__=\"ZoomInTool\",m.init_ZoomInTool()},\n", | |
" function _(r,n,a){var e=r(111);function o(r,n,a){var e=[r.start,r.end],o=e[0],t=e[1],i=null!=a?a:(t+o)/2;return[o-(o-i)*n,t-(t-i)*n]}function t(r,n){var a=n[0],e=n[1],o={};for(var t in r){var i=r[t].r_invert(a,e),l=i[0],v=i[1];o[t]={start:l,end:v}}return o}a.scale_highlow=o,a.get_info=t,a.scale_range=function(r,n,a,i,l){void 0===a&&(a=!0),void 0===i&&(i=!0),n=e.clamp(n,-.9,.9);var v=a?n:0,c=o(r.bbox.h_range,v,null!=l?l.x:void 0),s=c[0],u=c[1],f=t(r.xscales,[s,u]),_=i?n:0,d=o(r.bbox.v_range,_,null!=l?l.y:void 0),g=d[0],x=d[1];return{xrs:f,yrs:t(r.yscales,[g,x]),factor:n}}},\n", | |
" function _(o,t,e){var i=o(113),n=o(371),_=o(416),l=o(121),s=o(373),r=function(o){function t(){return null!==o&&o.apply(this,arguments)||this}return i.__extends(t,o),t.prototype.doit=function(){var o=this.plot_view.frame,t=this.model.dimensions,e=\"width\"==t||\"both\"==t,i=\"height\"==t||\"both\"==t,n=_.scale_range(o,-this.model.factor,e,i);this.plot_view.push_state(\"zoom_out\",{range:n}),this.plot_view.update_range(n,!1,!0),this.model.document&&this.model.document.interactive_start(this.plot_model)},t}(n.ActionToolView);e.ZoomOutToolView=r,r.__name__=\"ZoomOutToolView\";var u=function(o){function t(t){var e=o.call(this,t)||this;return e.tool_name=\"Zoom Out\",e.icon=s.bk_tool_icon_zoom_out,e}return i.__extends(t,o),t.init_ZoomOutTool=function(){this.prototype.default_view=r,this.define({factor:[l.Percent,.1],dimensions:[l.Dimensions,\"both\"]})},Object.defineProperty(t.prototype,\"tooltip\",{get:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)},enumerable:!0,configurable:!0}),t}(n.ActionTool);e.ZoomOutTool=u,u.__name__=\"ZoomOutTool\",u.init_ZoomOutTool()},\n", | |
" function _(e,t,o){var n=e(113),r=e(121),i=e(110),a=e(109),s=e(370),_=function(e){function t(){var t=e.apply(this,arguments)||this;return t._mouse_in_frame=!0,t}return n.__extends(t,e),t.prototype._move_enter=function(e){this._mouse_in_frame=!0},t.prototype._move_exit=function(e){this._mouse_in_frame=!1},t.prototype._map_drag=function(e,t,o){var n=this.plot_view.frame;return n.bbox.contains(e,t)?[n.xscales[o.x_range_name].invert(e),n.yscales[o.y_range_name].invert(t)]:null},t.prototype._delete_selected=function(e){var t=e.data_source,o=t.selected.indices;o.sort();for(var n=0,r=t.columns();n<r.length;n++)for(var i=r[n],a=t.get_array(i),s=0;s<o.length;s++){var _=o[s];a.splice(_-s,1)}this._emit_cds_changes(t)},t.prototype._pop_glyphs=function(e,t){var o=e.columns();if(t&&o.length)for(var n=0,r=o;n<r.length;n++){var i=r[n],s=e.get_array(i),_=s.length-t+1;_<1||(a.isArray(s)||(s=Array.from(s),e.data[i]=s),s.splice(0,_))}},t.prototype._emit_cds_changes=function(e,t,o,n){void 0===t&&(t=!0),void 0===o&&(o=!0),void 0===n&&(n=!0),o&&e.selection_manager.clear(),t&&e.change.emit(),n&&(e.data=e.data,e.properties.data.change.emit())},t.prototype._drag_points=function(e,t){if(null!=this._basepoint){for(var o=this._basepoint,n=o[0],r=o[1],i=0,a=t;i<a.length;i++){var s=a[i],_=this._map_drag(n,r,s),l=this._map_drag(e.sx,e.sy,s);if(null!=l&&null!=_){for(var c=l[0],p=l[1],u=[c-_[0],p-_[1]],d=u[0],m=u[1],f=s.glyph,h=s.data_source,g=[f.x.field,f.y.field],v=g[0],y=g[1],b=0,x=h.selected.indices;b<x.length;b++){var T=x[b];v&&(h.data[v][T]+=d),y&&(h.data[y][T]+=m)}h.change.emit()}}this._basepoint=[e.sx,e.sy]}},t.prototype._pad_empty_columns=function(e,t){for(var o=0,n=e.columns();o<n.length;o++){var r=n[o];i.includes(t,r)||e.get_array(r).push(this.model.empty_value)}},t.prototype._select_event=function(e,t,o){var n=this.plot_view.frame,r=e.sx,i=e.sy;if(!n.bbox.contains(r,i))return[];for(var a={type:\"point\",sx:r,sy:i},s=[],_=0,l=o;_<l.length;_++){var c=l[_],p=c.get_selection_manager(),u=c.data_source,d=[this.plot_view.renderer_views[c.id]];p.select(d,a,!0,t)&&s.push(c),u.properties.selected.change.emit()}return s},t}(s.GestureToolView);o.EditToolView=_,_.__name__=\"EditToolView\";var l=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.init_EditTool=function(){this.define({custom_icon:[r.String],custom_tooltip:[r.String],empty_value:[r.Any],renderers:[r.Array,[]]})},Object.defineProperty(t.prototype,\"tooltip\",{get:function(){return this.custom_tooltip||this.tool_name},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"computed_icon\",{get:function(){return this.custom_icon||this.icon},enumerable:!0,configurable:!0}),t}(s.GestureTool);o.EditTool=l,l.__name__=\"EditTool\",l.init_EditTool()},\n", | |
" function _(t,e,i){var s=t(113),o=t(163),n=t(121),_=t(418),a=t(373),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(e,t),e.prototype._tap=function(t){if(null==this._draw_basepoint&&null==this._basepoint){var e=t.shiftKey;this._select_event(t,e,this.model.renderers)}},e.prototype._keyup=function(t){if(this.model.active&&this._mouse_in_frame)for(var e=0,i=this.model.renderers;e<i.length;e++){var s=i[e];if(t.keyCode===o.Keys.Backspace)this._delete_selected(s);else if(t.keyCode==o.Keys.Esc){s.data_source.selection_manager.clear()}}},e.prototype._set_extent=function(t,e,i,s){var o=t[0],n=t[1],_=e[0],a=e[1];void 0===s&&(s=!1);var r=this.model.renderers[0],d=this.plot_view.frame,l=r.glyph,h=r.data_source,p=d.xscales[r.x_range_name],u=d.yscales[r.y_range_name],f=p.r_invert(o,n),c=f[0],m=f[1],y=u.r_invert(_,a),v=y[0],b=y[1],x=[(c+m)/2,(v+b)/2],g=x[0],w=x[1],E=[m-c,b-v],T=E[0],B=E[1],K=[l.x.field,l.y.field],k=K[0],V=K[1],j=[l.width.field,l.height.field],C=j[0],D=j[1];if(i)this._pop_glyphs(h,this.model.num_objects),k&&h.get_array(k).push(g),V&&h.get_array(V).push(w),C&&h.get_array(C).push(T),D&&h.get_array(D).push(B),this._pad_empty_columns(h,[k,V,C,D]);else{var I=h.data[k].length-1;k&&(h.data[k][I]=g),V&&(h.data[V][I]=w),C&&(h.data[C][I]=T),D&&(h.data[D][I]=B)}this._emit_cds_changes(h,!0,!1,s)},e.prototype._update_box=function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!1),null!=this._draw_basepoint){var s=[t.sx,t.sy],o=this.plot_view.frame,n=this.model.dimensions,_=this.model._get_dim_limits(this._draw_basepoint,s,o,n);if(null!=_){var a=_[0],r=_[1];this._set_extent(a,r,e,i)}}},e.prototype._doubletap=function(t){this.model.active&&(null!=this._draw_basepoint?(this._update_box(t,!1,!0),this._draw_basepoint=null):(this._draw_basepoint=[t.sx,t.sy],this._select_event(t,!0,this.model.renderers),this._update_box(t,!0,!1)))},e.prototype._move=function(t){this._update_box(t,!1,!1)},e.prototype._pan_start=function(t){if(t.shiftKey){if(null!=this._draw_basepoint)return;this._draw_basepoint=[t.sx,t.sy],this._update_box(t,!0,!1)}else{if(null!=this._basepoint)return;this._select_event(t,!0,this.model.renderers),this._basepoint=[t.sx,t.sy]}},e.prototype._pan=function(t,e,i){if(void 0===e&&(e=!1),void 0===i&&(i=!1),t.shiftKey){if(null==this._draw_basepoint)return;this._update_box(t,e,i)}else{if(null==this._basepoint)return;this._drag_points(t,this.model.renderers)}},e.prototype._pan_end=function(t){if(this._pan(t,!1,!0),t.shiftKey)this._draw_basepoint=null;else{this._basepoint=null;for(var e=0,i=this.model.renderers;e<i.length;e++){var s=i[e];this._emit_cds_changes(s.data_source,!1,!0,!0)}}},e}(_.EditToolView);i.BoxEditToolView=r,r.__name__=\"BoxEditToolView\";var d=function(t){function e(e){var i=t.call(this,e)||this;return i.tool_name=\"Box Edit Tool\",i.icon=a.bk_tool_icon_box_edit,i.event_type=[\"tap\",\"pan\",\"move\"],i.default_order=1,i}return s.__extends(e,t),e.init_BoxEditTool=function(){this.prototype.default_view=r,this.define({dimensions:[n.Dimensions,\"both\"],num_objects:[n.Int,0]})},e}(_.EditTool);i.BoxEditTool=d,d.__name__=\"BoxEditTool\",d.init_BoxEditTool()},\n", | |
" function _(e,t,a){var r=e(113),n=e(163),o=e(121),i=e(109),_=e(418),s=e(373),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype._draw=function(e,t,a){if(void 0===a&&(a=!1),this.model.active){var r=this.model.renderers[0],n=this._map_drag(e.sx,e.sy,r);if(null!=n){var o=n[0],_=n[1],s=r.data_source,d=r.glyph,h=[d.xs.field,d.ys.field],l=h[0],p=h[1];if(\"new\"==t)this._pop_glyphs(s,this.model.num_objects),l&&s.get_array(l).push([o]),p&&s.get_array(p).push([_]),this._pad_empty_columns(s,[l,p]);else if(\"add\"==t){if(l){var c=s.data[l].length-1,u=s.get_array(l)[c];i.isArray(u)||(u=Array.from(u),s.data[l][c]=u),u.push(o)}if(p){var f=s.data[p].length-1,y=s.get_array(p)[f];i.isArray(y)||(y=Array.from(y),s.data[p][f]=y),y.push(_)}}this._emit_cds_changes(s,!0,!0,a)}}},t.prototype._pan_start=function(e){this._draw(e,\"new\")},t.prototype._pan=function(e){this._draw(e,\"add\")},t.prototype._pan_end=function(e){this._draw(e,\"add\",!0)},t.prototype._tap=function(e){this._select_event(e,e.shiftKey,this.model.renderers)},t.prototype._keyup=function(e){if(this.model.active&&this._mouse_in_frame)for(var t=0,a=this.model.renderers;t<a.length;t++){var r=a[t];e.keyCode===n.Keys.Esc?r.data_source.selection_manager.clear():e.keyCode===n.Keys.Backspace&&this._delete_selected(r)}},t}(_.EditToolView);a.FreehandDrawToolView=d,d.__name__=\"FreehandDrawToolView\";var h=function(e){function t(t){var a=e.call(this,t)||this;return a.tool_name=\"Freehand Draw Tool\",a.icon=s.bk_tool_icon_freehand_draw,a.event_type=[\"pan\",\"tap\"],a.default_order=3,a}return r.__extends(t,e),t.init_FreehandDrawTool=function(){this.prototype.default_view=d,this.define({num_objects:[o.Int,0]})},t}(_.EditTool);a.FreehandDrawTool=h,h.__name__=\"FreehandDrawTool\",h.init_FreehandDrawTool()},\n", | |
" function _(e,t,o){var n=e(113),i=e(163),a=e(121),r=e(418),s=e(373),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype._tap=function(e){var t=e.shiftKey;if(!this._select_event(e,t,this.model.renderers).length&&this.model.add){var o=this.model.renderers[0],n=this._map_drag(e.sx,e.sy,o);if(null!=n){var i=o.glyph,a=o.data_source,r=[i.x.field,i.y.field],s=r[0],_=r[1],d=n[0],l=n[1];this._pop_glyphs(a,this.model.num_objects),s&&a.get_array(s).push(d),_&&a.get_array(_).push(l),this._pad_empty_columns(a,[s,_]),a.change.emit(),a.data=a.data,a.properties.data.change.emit()}}},t.prototype._keyup=function(e){if(this.model.active&&this._mouse_in_frame)for(var t=0,o=this.model.renderers;t<o.length;t++){var n=o[t];e.keyCode===i.Keys.Backspace?this._delete_selected(n):e.keyCode==i.Keys.Esc&&n.data_source.selection_manager.clear()}},t.prototype._pan_start=function(e){this.model.drag&&(this._select_event(e,!0,this.model.renderers),this._basepoint=[e.sx,e.sy])},t.prototype._pan=function(e){this.model.drag&&null!=this._basepoint&&this._drag_points(e,this.model.renderers)},t.prototype._pan_end=function(e){if(this.model.drag){this._pan(e);for(var t=0,o=this.model.renderers;t<o.length;t++){var n=o[t];this._emit_cds_changes(n.data_source,!1,!0,!0)}this._basepoint=null}},t}(r.EditToolView);o.PointDrawToolView=_,_.__name__=\"PointDrawToolView\";var d=function(e){function t(t){var o=e.call(this,t)||this;return o.tool_name=\"Point Draw Tool\",o.icon=s.bk_tool_icon_point_draw,o.event_type=[\"tap\",\"pan\",\"move\"],o.default_order=2,o}return n.__extends(t,e),t.init_PointDrawTool=function(){this.prototype.default_view=_,this.define({add:[a.Boolean,!0],drag:[a.Boolean,!0],num_objects:[a.Int,0]})},t}(r.EditTool);o.PointDrawTool=d,d.__name__=\"PointDrawTool\",d.init_PointDrawTool()},\n", | |
" function _(e,t,i){var r=e(113),a=e(163),s=e(121),o=e(109),n=e(423),_=e(373),d=function(e){function t(){var t=e.apply(this,arguments)||this;return t._drawing=!1,t._initialized=!1,t}return r.__extends(t,e),t.prototype._tap=function(e){this._drawing?this._draw(e,\"add\",!0):this._select_event(e,e.shiftKey,this.model.renderers)},t.prototype._draw=function(e,t,i){void 0===i&&(i=!1);var a=this.model.renderers[0],s=this._map_drag(e.sx,e.sy,a);if(this._initialized||this.activate(),null!=s){var n=this._snap_to_vertex.apply(this,r.__spreadArrays([e],s)),_=n[0],d=n[1],l=a.data_source,h=a.glyph,p=[h.xs.field,h.ys.field],c=p[0],g=p[1];if(\"new\"==t)this._pop_glyphs(l,this.model.num_objects),c&&l.get_array(c).push([_,_]),g&&l.get_array(g).push([d,d]),this._pad_empty_columns(l,[c,g]);else if(\"edit\"==t){if(c)(y=l.data[c][l.data[c].length-1])[y.length-1]=_;if(g)(u=l.data[g][l.data[g].length-1])[u.length-1]=d}else if(\"add\"==t){if(c){var y,f=l.data[c].length-1,v=(y=l.get_array(c)[f])[y.length-1];y[y.length-1]=_,o.isArray(y)||(y=Array.from(y),l.data[c][f]=y),y.push(v)}if(g){var u,m=l.data[g].length-1,w=(u=l.get_array(g)[m])[u.length-1];u[u.length-1]=d,o.isArray(u)||(u=Array.from(u),l.data[g][m]=u),u.push(w)}}this._emit_cds_changes(l,!0,!1,i)}},t.prototype._show_vertices=function(){if(this.model.active){for(var e=[],t=[],i=0;i<this.model.renderers.length;i++){var r=this.model.renderers[i],a=r.data_source,s=r.glyph,o=[s.xs.field,s.ys.field],n=o[0],_=o[1];if(n)for(var d=0,l=a.get_array(n);d<l.length;d++){var h=l[d];Array.prototype.push.apply(e,h)}if(_)for(var p=0,c=a.get_array(_);p<c.length;p++){h=c[p];Array.prototype.push.apply(t,h)}this._drawing&&i==this.model.renderers.length-1&&(e.splice(e.length-1,1),t.splice(t.length-1,1))}this._set_vertices(e,t)}},t.prototype._doubletap=function(e){this.model.active&&(this._drawing?(this._drawing=!1,this._draw(e,\"edit\",!0)):(this._drawing=!0,this._draw(e,\"new\",!0)))},t.prototype._move=function(e){this._drawing&&this._draw(e,\"edit\")},t.prototype._remove=function(){var e=this.model.renderers[0],t=e.data_source,i=e.glyph,r=[i.xs.field,i.ys.field],a=r[0],s=r[1];if(a){var o=t.data[a].length-1,n=t.get_array(a)[o];n.splice(n.length-1,1)}if(s){var _=t.data[s].length-1,d=t.get_array(s)[_];d.splice(d.length-1,1)}this._emit_cds_changes(t)},t.prototype._keyup=function(e){if(this.model.active&&this._mouse_in_frame)for(var t=0,i=this.model.renderers;t<i.length;t++){var r=i[t];e.keyCode===a.Keys.Backspace?this._delete_selected(r):e.keyCode==a.Keys.Esc&&(this._drawing&&(this._remove(),this._drawing=!1),r.data_source.selection_manager.clear())}},t.prototype._pan_start=function(e){this.model.drag&&(this._select_event(e,!0,this.model.renderers),this._basepoint=[e.sx,e.sy])},t.prototype._pan=function(e){if(null!=this._basepoint&&this.model.drag){for(var t=this._basepoint,i=t[0],r=t[1],a=0,s=this.model.renderers;a<s.length;a++){var o=s[a],n=this._map_drag(i,r,o),_=this._map_drag(e.sx,e.sy,o);if(null!=_&&null!=n){var d=o.data_source,l=o.glyph,h=[l.xs.field,l.ys.field],p=h[0],c=h[1];if(p||c){for(var g=_[0],y=_[1],f=[g-n[0],y-n[1]],v=f[0],u=f[1],m=0,w=d.selected.indices;m<w.length;m++){var x=w[m],b=void 0,P=void 0,T=void 0;p&&(P=d.data[p][x]),b=c?(T=d.data[c][x]).length:P.length;for(var A=0;A<b;A++)P&&(P[A]+=v),T&&(T[A]+=u)}d.change.emit()}}}this._basepoint=[e.sx,e.sy]}},t.prototype._pan_end=function(e){if(this.model.drag){this._pan(e);for(var t=0,i=this.model.renderers;t<i.length;t++){var r=i[t];this._emit_cds_changes(r.data_source)}this._basepoint=null}},t.prototype.activate=function(){var e=this;if(this.model.vertex_renderer&&this.model.active){if(this._show_vertices(),!this._initialized)for(var t=0,i=this.model.renderers;t<i.length;t++){var r=i[t].data_source;r.connect(r.properties.data.change,function(){return e._show_vertices()})}this._initialized=!0}},t.prototype.deactivate=function(){this._drawing&&(this._remove(),this._drawing=!1),this.model.vertex_renderer&&this._hide_vertices()},t}(n.PolyToolView);i.PolyDrawToolView=d,d.__name__=\"PolyDrawToolView\";var l=function(e){function t(t){var i=e.call(this,t)||this;return i.tool_name=\"Polygon Draw Tool\",i.icon=_.bk_tool_icon_poly_draw,i.event_type=[\"pan\",\"tap\",\"move\"],i.default_order=3,i}return r.__extends(t,e),t.init_PolyDrawTool=function(){this.prototype.default_view=d,this.define({drag:[s.Boolean,!0],num_objects:[s.Int,0]})},t}(n.PolyTool);i.PolyDrawTool=l,l.__name__=\"PolyDrawTool\",l.init_PolyDrawTool()},\n", | |
" function _(e,t,r){var i=e(113),o=e(121),n=e(109),_=e(418),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype._set_vertices=function(e,t){var r=this.model.vertex_renderer.glyph,i=this.model.vertex_renderer.data_source,o=[r.x.field,r.y.field],_=o[0],l=o[1];_&&(n.isArray(e)?i.data[_]=e:r.x={value:e}),l&&(n.isArray(t)?i.data[l]=t:r.y={value:t}),this._emit_cds_changes(i,!0,!0,!1)},t.prototype._hide_vertices=function(){this._set_vertices([],[])},t.prototype._snap_to_vertex=function(e,t,r){if(this.model.vertex_renderer){var i=this._select_event(e,!1,[this.model.vertex_renderer]),o=this.model.vertex_renderer.data_source,n=this.model.vertex_renderer.glyph,_=[n.x.field,n.y.field],l=_[0],s=_[1];if(i.length){var d=o.selected.indices[0];l&&(t=o.data[l][d]),s&&(r=o.data[s][d]),o.selection_manager.clear()}}return[t,r]},t}(_.EditToolView);r.PolyToolView=l,l.__name__=\"PolyToolView\";var s=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_PolyTool=function(){this.prototype.default_view=l,this.define({vertex_renderer:[o.Instance]})},t}(_.EditTool);r.PolyTool=s,s.__name__=\"PolyTool\",s.init_PolyTool()},\n", | |
" function _(e,t,r){var i=e(113),s=e(163),_=e(109),d=e(423),n=e(373),a=function(e){function t(){var t=e.apply(this,arguments)||this;return t._drawing=!1,t}return i.__extends(t,e),t.prototype._doubletap=function(e){if(this.model.active){var t=this._map_drag(e.sx,e.sy,this.model.vertex_renderer);if(null!=t){var r=t[0],i=t[1],s=this._select_event(e,!1,[this.model.vertex_renderer]),_=this.model.vertex_renderer.data_source,d=this.model.vertex_renderer.glyph,n=[d.x.field,d.y.field],a=n[0],o=n[1];if(s.length&&null!=this._selected_renderer){var l=_.selected.indices[0];this._drawing?(this._drawing=!1,_.selection_manager.clear()):(_.selected.indices=[l+1],a&&_.get_array(a).splice(l+1,0,r),o&&_.get_array(o).splice(l+1,0,i),this._drawing=!0),_.change.emit(),this._emit_cds_changes(this._selected_renderer.data_source)}else this._show_vertices(e)}}},t.prototype._show_vertices=function(e){if(this.model.active){var t=this._select_event(e,!1,this.model.renderers);if(!t.length)return this._set_vertices([],[]),this._selected_renderer=null,void(this._drawing=!1);var r,i,s=t[0],d=s.glyph,n=s.data_source,a=n.selected.indices[0],o=[d.xs.field,d.ys.field],l=o[0],c=o[1];l?(r=n.data[l][a],_.isArray(r)||(n.data[l][a]=r=Array.from(r))):r=d.xs.value,c?(i=n.data[c][a],_.isArray(i)||(n.data[c][a]=i=Array.from(i))):i=d.ys.value,this._selected_renderer=s,this._set_vertices(r,i)}},t.prototype._move=function(e){var t;if(this._drawing&&null!=this._selected_renderer){var r=this.model.vertex_renderer,i=r.data_source,s=r.glyph,_=this._map_drag(e.sx,e.sy,r);if(null==_)return;var d=_[0],n=_[1],a=i.selected.indices;d=(t=this._snap_to_vertex(e,d,n))[0],n=t[1],i.selected.indices=a;var o=[s.x.field,s.y.field],l=o[0],c=o[1],h=a[0];l&&(i.data[l][h]=d),c&&(i.data[c][h]=n),i.change.emit(),this._selected_renderer.data_source.change.emit()}},t.prototype._tap=function(e){var t,r=this.model.vertex_renderer,i=this._map_drag(e.sx,e.sy,r);if(null!=i){if(this._drawing&&this._selected_renderer){var s=i[0],_=i[1],d=r.data_source,n=r.glyph,a=[n.x.field,n.y.field],o=a[0],l=a[1],c=d.selected.indices;s=(t=this._snap_to_vertex(e,s,_))[0],_=t[1];var h=c[0];if(d.selected.indices=[h+1],o){var v=d.get_array(o),p=v[h];v[h]=s,v.splice(h+1,0,p)}if(l){var y=d.get_array(l),u=y[h];y[h]=_,y.splice(h+1,0,u)}return d.change.emit(),void this._emit_cds_changes(this._selected_renderer.data_source,!0,!1,!0)}var m=e.shiftKey;this._select_event(e,m,[r]),this._select_event(e,m,this.model.renderers)}},t.prototype._remove_vertex=function(){if(this._drawing&&this._selected_renderer){var e=this.model.vertex_renderer,t=e.data_source,r=e.glyph,i=t.selected.indices[0],s=[r.x.field,r.y.field],_=s[0],d=s[1];_&&t.get_array(_).splice(i,1),d&&t.get_array(d).splice(i,1),t.change.emit(),this._emit_cds_changes(this._selected_renderer.data_source)}},t.prototype._pan_start=function(e){this._select_event(e,!0,[this.model.vertex_renderer]),this._basepoint=[e.sx,e.sy]},t.prototype._pan=function(e){null!=this._basepoint&&(this._drag_points(e,[this.model.vertex_renderer]),this._selected_renderer&&this._selected_renderer.data_source.change.emit())},t.prototype._pan_end=function(e){null!=this._basepoint&&(this._drag_points(e,[this.model.vertex_renderer]),this._emit_cds_changes(this.model.vertex_renderer.data_source,!1,!0,!0),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source),this._basepoint=null)},t.prototype._keyup=function(e){if(this.model.active&&this._mouse_in_frame)for(var t=0,r=this._selected_renderer?[this.model.vertex_renderer]:this.model.renderers;t<r.length;t++){var i=r[t];e.keyCode===s.Keys.Backspace?(this._delete_selected(i),this._selected_renderer&&this._emit_cds_changes(this._selected_renderer.data_source)):e.keyCode==s.Keys.Esc&&(this._drawing?(this._remove_vertex(),this._drawing=!1):this._selected_renderer&&this._hide_vertices(),i.data_source.selection_manager.clear())}},t.prototype.deactivate=function(){this._selected_renderer&&(this._drawing&&(this._remove_vertex(),this._drawing=!1),this._hide_vertices())},t}(d.PolyToolView);r.PolyEditToolView=a,a.__name__=\"PolyEditToolView\";var o=function(e){function t(t){var r=e.call(this,t)||this;return r.tool_name=\"Poly Edit Tool\",r.icon=n.bk_tool_icon_poly_edit,r.event_type=[\"tap\",\"pan\",\"move\"],r.default_order=4,r}return i.__extends(t,e),t.init_PolyEditTool=function(){this.prototype.default_view=a},t}(d.PolyTool);r.PolyEditTool=o,o.__name__=\"PolyEditTool\",o.init_PolyEditTool()},\n", | |
" function _(e,t,o){var i=e(113),l=e(426),n=e(201),s=e(121),_=e(373),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype._compute_limits=function(e){var t=this.plot_view.frame,o=this.model.dimensions,i=this._base_point;if(\"center\"==this.model.origin){var l=i[0],n=i[1];i=[l-(e[0]-l),n-(e[1]-n)]}return this.model._get_dim_limits(i,e,t,o)},t.prototype._pan_start=function(e){var t=e.sx,o=e.sy;this._base_point=[t,o]},t.prototype._pan=function(e){var t=[e.sx,e.sy],o=this._compute_limits(t),i=o[0],l=o[1];if(this.model.overlay.update({left:i[0],right:i[1],top:l[0],bottom:l[1]}),this.model.select_every_mousemove){var n=e.shiftKey;this._do_select(i,l,!1,n)}},t.prototype._pan_end=function(e){var t=[e.sx,e.sy],o=this._compute_limits(t),i=o[0],l=o[1],n=e.shiftKey;this._do_select(i,l,!0,n),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._base_point=null,this.plot_view.push_state(\"box_select\",{selection:this.plot_view.get_selection()})},t.prototype._do_select=function(e,t,o,i){void 0===i&&(i=!1);var l={type:\"rect\",sx0:e[0],sx1:e[1],sy0:t[0],sy1:t[1]};this._select(l,o,i)},t.prototype._emit_callback=function(e){var t=this.computed_renderers[0],o=this.plot_view.frame,i=o.xscales[t.x_range_name],l=o.yscales[t.y_range_name],n=e.sx0,s=e.sx1,_=e.sy0,r=e.sy1,a=i.r_invert(n,s),c=a[0],u=a[1],p=l.r_invert(_,r),h=p[0],m=p[1],v=Object.assign({x0:c,y0:h,x1:u,y1:m},e);null!=this.model.callback&&this.model.callback.execute(this.model,{geometry:v})},t}(l.SelectToolView);o.BoxSelectToolView=r,r.__name__=\"BoxSelectToolView\";var a=function(){return new n.BoxAnnotation({level:\"overlay\",render_mode:\"css\",top_units:\"screen\",left_units:\"screen\",bottom_units:\"screen\",right_units:\"screen\",fill_color:{value:\"lightgrey\"},fill_alpha:{value:.5},line_color:{value:\"black\"},line_alpha:{value:1},line_width:{value:2},line_dash:{value:[4,4]}})},c=function(e){function t(t){var o=e.call(this,t)||this;return o.tool_name=\"Box Select\",o.icon=_.bk_tool_icon_box_select,o.event_type=\"pan\",o.default_order=30,o}return i.__extends(t,e),t.init_BoxSelectTool=function(){this.prototype.default_view=r,this.define({dimensions:[s.Dimensions,\"both\"],select_every_mousemove:[s.Boolean,!1],callback:[s.Any],overlay:[s.Instance,a],origin:[s.BoxOrigin,\"corner\"]})},Object.defineProperty(t.prototype,\"tooltip\",{get:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)},enumerable:!0,configurable:!0}),t}(l.SelectTool);o.BoxSelectTool=c,c.__name__=\"BoxSelectTool\",c.init_BoxSelectTool()},\n", | |
" function _(e,t,r){var n=e(113),i=e(370),o=e(175),s=e(192),a=e(427),c=e(121),_=e(163),l=e(376),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),Object.defineProperty(t.prototype,\"computed_renderers\",{get:function(){var e=this.model.renderers,t=this.plot_model.renderers,r=this.model.names;return a.compute_renderers(e,t,r)},enumerable:!0,configurable:!0}),t.prototype._computed_renderers_by_data_source=function(){for(var e={},t=0,r=this.computed_renderers;t<r.length;t++){var n=r[t],i=void 0;if(n instanceof o.GlyphRenderer)i=n.data_source.id;else{if(!(n instanceof s.GraphRenderer))continue;i=n.node_renderer.data_source.id}i in e||(e[i]=[]),e[i].push(n)}return e},t.prototype._keyup=function(e){if(e.keyCode==_.Keys.Esc){for(var t=0,r=this.computed_renderers;t<r.length;t++){r[t].get_selection_manager().clear()}this.plot_view.request_render()}},t.prototype._select=function(e,t,r){var n=this._computed_renderers_by_data_source();for(var i in n){for(var o=n[i],s=o[0].get_selection_manager(),a=[],c=0,_=o;c<_.length;c++){var l=_[c];l.id in this.plot_view.renderer_views&&a.push(this.plot_view.renderer_views[l.id])}s.select(a,e,t,r)}null!=this.model.callback&&this._emit_callback(e),this._emit_selection_event(e,t)},t.prototype._emit_selection_event=function(e,t){void 0===t&&(t=!0);var r,n=this.plot_view.frame,i=n.xscales.default,o=n.yscales.default;switch(e.type){case\"point\":var s=e.sx,a=e.sy,c=i.invert(s),_=o.invert(a);r=Object.assign(Object.assign({},e),{x:c,y:_});break;case\"rect\":var d=e.sx0,u=e.sx1,p=e.sy0,v=e.sy1,y=i.r_invert(d,u),h=y[0],f=y[1],m=o.r_invert(p,v),g=m[0],b=m[1];r=Object.assign(Object.assign({},e),{x0:h,y0:g,x1:f,y1:b});break;case\"poly\":s=e.sx,a=e.sy,c=i.v_invert(s),_=o.v_invert(a);r=Object.assign(Object.assign({},e),{x:c,y:_});break;default:throw new Error(\"Unrecognized selection geometry type: '\"+e.type+\"'\")}this.plot_model.trigger_event(new l.SelectionGeometry(r,t))},t}(i.GestureToolView);r.SelectToolView=d,d.__name__=\"SelectToolView\";var u=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.init_SelectTool=function(){this.define({renderers:[c.Any,\"auto\"],names:[c.Array,[]]})},t}(i.GestureTool);r.SelectTool=u,u.__name__=\"SelectTool\",u.init_SelectTool()},\n", | |
" function _(n,r,e){var t=n(110);e.compute_renderers=function(n,r,e){if(null==n)return[];var u=\"auto\"==n?r:n;return e.length>0&&(u=u.filter(function(n){return t.includes(e,n.name)})),u}},\n", | |
" function _(t,o,e){var n=t(113),i=t(370),a=t(201),r=t(121),s=t(373),_=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(o,t),o.prototype._match_aspect=function(t,o,e){var n,i,a,r,s=e.bbox.aspect,_=e.bbox.h_range.end,l=e.bbox.h_range.start,u=e.bbox.v_range.end,p=e.bbox.v_range.start,h=Math.abs(t[0]-o[0]),c=Math.abs(t[1]-o[1]),m=0==c?0:h/c,v=(m>=s?[1,m/s]:[s/m,1])[0];return t[0]<=o[0]?(n=t[0],(i=t[0]+h*v)>_&&(i=_)):(i=t[0],(n=t[0]-h*v)<l&&(n=l)),h=Math.abs(i-n),t[1]<=o[1]?(r=t[1],(a=t[1]+h/s)>u&&(a=u)):(a=t[1],(r=t[1]-h/s)<p&&(r=p)),c=Math.abs(a-r),t[0]<=o[0]?i=t[0]+s*c:n=t[0]-s*c,[[n,i],[r,a]]},o.prototype._compute_limits=function(t){var o,e,n,i,a=this.plot_view.frame,r=this.model.dimensions,s=this._base_point;if(\"center\"==this.model.origin){var _=s[0],l=s[1];s=[_-(t[0]-_),l-(t[1]-l)]}return this.model.match_aspect&&\"both\"==r?(n=(o=this._match_aspect(s,t,a))[0],i=o[1]):(n=(e=this.model._get_dim_limits(s,t,a,r))[0],i=e[1]),[n,i]},o.prototype._pan_start=function(t){this._base_point=[t.sx,t.sy]},o.prototype._pan=function(t){var o=[t.sx,t.sy],e=this._compute_limits(o),n=e[0],i=e[1];this.model.overlay.update({left:n[0],right:n[1],top:i[0],bottom:i[1]})},o.prototype._pan_end=function(t){var o=[t.sx,t.sy],e=this._compute_limits(o),n=e[0],i=e[1];this._update(n,i),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._base_point=null},o.prototype._update=function(t,o){var e=t[0],n=t[1],i=o[0],a=o[1];if(!(Math.abs(n-e)<=5||Math.abs(a-i)<=5)){var r=this.plot_view.frame,s=r.xscales,_=r.yscales,l={};for(var u in s){var p=s[u].r_invert(e,n),h=p[0],c=p[1];l[u]={start:h,end:c}}var m={};for(var u in _){var v=_[u].r_invert(i,a);h=v[0],c=v[1];m[u]={start:h,end:c}}var d={xrs:l,yrs:m};this.plot_view.push_state(\"box_zoom\",{range:d}),this.plot_view.update_range(d)}},o}(i.GestureToolView);e.BoxZoomToolView=_,_.__name__=\"BoxZoomToolView\";var l=function(){return new a.BoxAnnotation({level:\"overlay\",render_mode:\"css\",top_units:\"screen\",left_units:\"screen\",bottom_units:\"screen\",right_units:\"screen\",fill_color:{value:\"lightgrey\"},fill_alpha:{value:.5},line_color:{value:\"black\"},line_alpha:{value:1},line_width:{value:2},line_dash:{value:[4,4]}})},u=function(t){function o(o){var e=t.call(this,o)||this;return e.tool_name=\"Box Zoom\",e.icon=s.bk_tool_icon_box_zoom,e.event_type=\"pan\",e.default_order=20,e}return n.__extends(o,t),o.init_BoxZoomTool=function(){this.prototype.default_view=_,this.define({dimensions:[r.Dimensions,\"both\"],overlay:[r.Instance,l],match_aspect:[r.Boolean,!1],origin:[r.BoxOrigin,\"corner\"]})},Object.defineProperty(o.prototype,\"tooltip\",{get:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)},enumerable:!0,configurable:!0}),o}(i.GestureTool);e.BoxZoomTool=u,u.__name__=\"BoxZoomTool\",u.init_BoxZoomTool()},\n", | |
" function _(e,t,o){var s=e(113),a=e(426),l=e(233),i=e(163),n=e(121),c=e(373),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this.data=null},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.properties.active.change,function(){return t._active_change()})},t.prototype._active_change=function(){this.model.active||this._clear_overlay()},t.prototype._keyup=function(e){e.keyCode==i.Keys.Enter&&this._clear_overlay()},t.prototype._pan_start=function(e){var t=e.sx,o=e.sy;this.data={sx:[t],sy:[o]}},t.prototype._pan=function(e){var t=e.sx,o=e.sy,s=this.plot_view.frame.bbox.clip(t,o),a=s[0],l=s[1];if(this.data.sx.push(a),this.data.sy.push(l),this.model.overlay.update({xs:this.data.sx,ys:this.data.sy}),this.model.select_every_mousemove){var i=e.shiftKey;this._do_select(this.data.sx,this.data.sy,!1,i)}},t.prototype._pan_end=function(e){this._clear_overlay();var t=e.shiftKey;this._do_select(this.data.sx,this.data.sy,!0,t),this.plot_view.push_state(\"lasso_select\",{selection:this.plot_view.get_selection()})},t.prototype._clear_overlay=function(){this.model.overlay.update({xs:[],ys:[]})},t.prototype._do_select=function(e,t,o,s){var a={type:\"poly\",sx:e,sy:t};this._select(a,o,s)},t.prototype._emit_callback=function(e){var t=this.computed_renderers[0],o=this.plot_view.frame,s=o.xscales[t.x_range_name],a=o.yscales[t.y_range_name],l=s.v_invert(e.sx),i=a.v_invert(e.sy),n=Object.assign({x:l,y:i},e);null!=this.model.callback&&this.model.callback.execute(this.model,{geometry:n})},t}(a.SelectToolView);o.LassoSelectToolView=_,_.__name__=\"LassoSelectToolView\";var r=function(){return new l.PolyAnnotation({level:\"overlay\",xs_units:\"screen\",ys_units:\"screen\",fill_color:{value:\"lightgrey\"},fill_alpha:{value:.5},line_color:{value:\"black\"},line_alpha:{value:1},line_width:{value:2},line_dash:{value:[4,4]}})},h=function(e){function t(t){var o=e.call(this,t)||this;return o.tool_name=\"Lasso Select\",o.icon=c.bk_tool_icon_lasso_select,o.event_type=\"pan\",o.default_order=12,o}return s.__extends(t,e),t.init_LassoSelectTool=function(){this.prototype.default_view=_,this.define({select_every_mousemove:[n.Boolean,!0],callback:[n.Any],overlay:[n.Instance,r]})},t}(a.SelectTool);o.LassoSelectTool=h,h.__name__=\"LassoSelectTool\",h.init_LassoSelectTool()},\n", | |
" function _(t,n,e){var i=t(113),o=t(370),s=t(121),a=t(373),r=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype._pan_start=function(t){this.last_dx=0,this.last_dy=0;var n=t.sx,e=t.sy,i=this.plot_view.frame.bbox;if(!i.contains(n,e)){var o=i.h_range,s=i.v_range;(n<o.start||n>o.end)&&(this.v_axis_only=!0),(e<s.start||e>s.end)&&(this.h_axis_only=!0)}null!=this.model.document&&this.model.document.interactive_start(this.plot_model)},n.prototype._pan=function(t){this._update(t.deltaX,t.deltaY),null!=this.model.document&&this.model.document.interactive_start(this.plot_model)},n.prototype._pan_end=function(t){this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info&&this.plot_view.push_state(\"pan\",{range:this.pan_info})},n.prototype._update=function(t,n){var e,i,o,s,a,r,_=this.plot_view.frame,l=t-this.last_dx,h=n-this.last_dy,d=_.bbox.h_range,p=d.start-l,u=d.end-l,c=_.bbox.v_range,f=c.start-h,v=c.end-h,y=this.model.dimensions;\"width\"!=y&&\"both\"!=y||this.v_axis_only?(e=d.start,i=d.end,o=0):(e=p,i=u,o=-l),\"height\"!=y&&\"both\"!=y||this.h_axis_only?(s=c.start,a=c.end,r=0):(s=f,a=v,r=-h),this.last_dx=t,this.last_dy=n;var m=_.xscales,b=_.yscales,x={};for(var g in m){var w=m[g].r_invert(e,i),P=w[0],T=w[1];x[g]={start:P,end:T}}var k={};for(var g in b){var V=b[g].r_invert(s,a);P=V[0],T=V[1];k[g]={start:P,end:T}}this.pan_info={xrs:x,yrs:k,sdx:o,sdy:r},this.plot_view.update_range(this.pan_info,!0)},n}(o.GestureToolView);e.PanToolView=r,r.__name__=\"PanToolView\";var _=function(t){function n(n){var e=t.call(this,n)||this;return e.tool_name=\"Pan\",e.event_type=\"pan\",e.default_order=10,e}return i.__extends(n,t),n.init_PanTool=function(){this.prototype.default_view=r,this.define({dimensions:[s.Dimensions,\"both\"]})},Object.defineProperty(n.prototype,\"tooltip\",{get:function(){return this._get_dim_tooltip(\"Pan\",this.dimensions)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,\"icon\",{get:function(){switch(this.dimensions){case\"both\":return a.bk_tool_icon_pan;case\"width\":return a.bk_tool_icon_xpan;case\"height\":return a.bk_tool_icon_ypan}},enumerable:!0,configurable:!0}),n}(o.GestureTool);e.PanTool=_,_.__name__=\"PanTool\",_.init_PanTool()},\n", | |
" function _(t,e,o){var l=t(113),i=t(426),a=t(233),n=t(163),s=t(121),c=t(110),_=t(373),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l.__extends(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.data={sx:[],sy:[]}},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.active.change,function(){return e._active_change()})},e.prototype._active_change=function(){this.model.active||this._clear_data()},e.prototype._keyup=function(t){t.keyCode==n.Keys.Enter&&this._clear_data()},e.prototype._doubletap=function(t){var e=t.shiftKey;this._do_select(this.data.sx,this.data.sy,!0,e),this.plot_view.push_state(\"poly_select\",{selection:this.plot_view.get_selection()}),this._clear_data()},e.prototype._clear_data=function(){this.data={sx:[],sy:[]},this.model.overlay.update({xs:[],ys:[]})},e.prototype._tap=function(t){var e=t.sx,o=t.sy;this.plot_view.frame.bbox.contains(e,o)&&(this.data.sx.push(e),this.data.sy.push(o),this.model.overlay.update({xs:c.copy(this.data.sx),ys:c.copy(this.data.sy)}))},e.prototype._do_select=function(t,e,o,l){var i={type:\"poly\",sx:t,sy:e};this._select(i,o,l)},e.prototype._emit_callback=function(t){var e=this.computed_renderers[0],o=this.plot_view.frame,l=o.xscales[e.x_range_name],i=o.yscales[e.y_range_name],a=l.v_invert(t.sx),n=i.v_invert(t.sy),s=Object.assign({x:a,y:n},t);null!=this.model.callback&&this.model.callback.execute(this.model,{geometry:s})},e}(i.SelectToolView);o.PolySelectToolView=r,r.__name__=\"PolySelectToolView\";var y=function(){return new a.PolyAnnotation({level:\"overlay\",xs_units:\"screen\",ys_units:\"screen\",fill_color:{value:\"lightgrey\"},fill_alpha:{value:.5},line_color:{value:\"black\"},line_alpha:{value:1},line_width:{value:2},line_dash:{value:[4,4]}})},p=function(t){function e(e){var o=t.call(this,e)||this;return o.tool_name=\"Poly Select\",o.icon=_.bk_tool_icon_polygon_select,o.event_type=\"tap\",o.default_order=11,o}return l.__extends(e,t),e.init_PolySelectTool=function(){this.prototype.default_view=r,this.define({callback:[s.Any],overlay:[s.Instance,y]})},e}(i.SelectTool);o.PolySelectTool=p,p.__name__=\"PolySelectTool\",p.init_PolySelectTool()},\n", | |
" function _(t,e,i){var n=t(113),s=t(201),r=t(167),l=t(121),a=t(370),o=t(373);function _(t){switch(t){case 1:return 2;case 2:return 1;case 4:return 5;case 5:return 4;default:return t}}function h(t,e,i,n){if(null==e)return!1;var s=i.compute(e);return Math.abs(t-s)<n}function u(t,e,i,n,s){var r=!0;if(null!=s.left&&null!=s.right){var l=i.invert(t);(l<s.left||l>s.right)&&(r=!1)}if(null!=s.bottom&&null!=s.top){var a=n.invert(e);(a<s.bottom||a>s.top)&&(r=!1)}return r}function d(t,e,i){var n=0;return t>=i.start&&t<=i.end&&(n+=1),e>=i.start&&e<=i.end&&(n+=1),n}function c(t,e,i,n){var s=e.compute(t),r=e.invert(s+i);return r>=n.start&&r<=n.end?r:t}function y(t,e,i){return t>e.start?(e.end=t,i):(e.end=e.start,e.start=t,_(i))}function f(t,e,i){return t<e.end?(e.start=t,i):(e.start=e.end,e.end=t,_(i))}function g(t,e,i,n){var s=e.r_compute(t.start,t.end),r=s[0],l=s[1],a=e.r_invert(r+i,l+i),o=a[0],_=a[1],h=d(t.start,t.end,n);d(o,_,n)>=h&&(t.start=o,t.end=_)}i.flip_side=_,i.is_near=h,i.is_inside=u,i.sides_inside=d,i.compute_value=c,i.update_range_end_side=y,i.update_range_start_side=f,i.update_range=g;var v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.side=0,this.model.update_overlay_from_ranges()},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),null!=this.model.x_range&&this.connect(this.model.x_range.change,function(){return e.model.update_overlay_from_ranges()}),null!=this.model.y_range&&this.connect(this.model.y_range.change,function(){return e.model.update_overlay_from_ranges()})},e.prototype._pan_start=function(t){this.last_dx=0,this.last_dy=0;var e=this.model.x_range,i=this.model.y_range,n=this.plot_view.frame,r=n.xscales.default,l=n.yscales.default,a=this.model.overlay,o=a.left,_=a.right,d=a.top,c=a.bottom,y=this.model.overlay.properties.line_width.value()+s.EDGE_TOLERANCE;null!=e&&this.model.x_interaction&&(h(t.sx,o,r,y)?this.side=1:h(t.sx,_,r,y)?this.side=2:u(t.sx,t.sy,r,l,a)&&(this.side=3)),null!=i&&this.model.y_interaction&&(0==this.side&&h(t.sy,c,l,y)&&(this.side=4),0==this.side&&h(t.sy,d,l,y)?this.side=5:u(t.sx,t.sy,r,l,this.model.overlay)&&(3==this.side?this.side=7:this.side=6))},e.prototype._pan=function(t){var e=this.plot_view.frame,i=t.deltaX-this.last_dx,n=t.deltaY-this.last_dy,s=this.model.x_range,r=this.model.y_range,l=e.xscales.default,a=e.yscales.default;if(null!=s)if(3==this.side||7==this.side)g(s,l,i,e.x_range);else if(1==this.side){var o=c(s.start,l,i,e.x_range);this.side=f(o,s,this.side)}else if(2==this.side){var _=c(s.end,l,i,e.x_range);this.side=y(_,s,this.side)}if(null!=r)if(6==this.side||7==this.side)g(r,a,n,e.y_range);else if(4==this.side){o=c(r.start,a,n,e.y_range);this.side=f(o,r,this.side)}else if(5==this.side){_=c(r.end,a,n,e.y_range);this.side=y(_,r,this.side)}this.last_dx=t.deltaX,this.last_dy=t.deltaY},e.prototype._pan_end=function(t){this.side=0},e}(a.GestureToolView);i.RangeToolView=v,v.__name__=\"RangeToolView\";var p=function(){return new s.BoxAnnotation({level:\"overlay\",render_mode:\"canvas\",fill_color:\"lightgrey\",fill_alpha:{value:.5},line_color:{value:\"black\"},line_alpha:{value:1},line_width:{value:.5},line_dash:[2,2]})},m=function(t){function e(e){var i=t.call(this,e)||this;return i.tool_name=\"Range Tool\",i.icon=o.bk_tool_icon_range,i.event_type=\"pan\",i.default_order=1,i}return n.__extends(e,t),e.init_RangeTool=function(){this.prototype.default_view=v,this.define({x_range:[l.Instance,null],x_interaction:[l.Boolean,!0],y_range:[l.Instance,null],y_interaction:[l.Boolean,!0],overlay:[l.Instance,p]})},e.prototype.initialize=function(){t.prototype.initialize.call(this),this.overlay.in_cursor=\"grab\",this.overlay.ew_cursor=null!=this.x_range&&this.x_interaction?\"ew-resize\":null,this.overlay.ns_cursor=null!=this.y_range&&this.y_interaction?\"ns-resize\":null},e.prototype.update_overlay_from_ranges=function(){null==this.x_range&&null==this.y_range&&(this.overlay.left=null,this.overlay.right=null,this.overlay.bottom=null,this.overlay.top=null,r.logger.warn(\"RangeTool not configured with any Ranges.\")),null==this.x_range?(this.overlay.left=null,this.overlay.right=null):(this.overlay.left=this.x_range.start,this.overlay.right=this.x_range.end),null==this.y_range?(this.overlay.bottom=null,this.overlay.top=null):(this.overlay.bottom=this.y_range.start,this.overlay.top=this.y_range.end)},e}(a.GestureTool);i.RangeTool=m,m.__name__=\"RangeTool\",m.init_RangeTool()},\n", | |
" function _(e,t,i){var s=e(113),n=e(426),o=e(121),a=e(373),r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s.__extends(t,e),t.prototype._tap=function(e){var t={type:\"point\",sx:e.sx,sy:e.sy},i=e.shiftKey;this._select(t,!0,i)},t.prototype._select=function(e,t,i){var s=this,n=this.model.callback;if(\"select\"==this.model.behavior){var o=this._computed_renderers_by_data_source();for(var a in o){var r=o[a],_=r[0].get_selection_manager(),l=r.map(function(e){return s.plot_view.renderer_views[e.id]});if(_.select(l,e,t,i)&&null!=n){var c=(y=this.plot_view.frame).xscales[r[0].x_range_name],p=y.yscales[r[0].y_range_name],v=c.invert(e.sx),u=p.invert(e.sy),h={geometries:Object.assign(Object.assign({},e),{x:v,y:u}),source:_.source};n.execute(this.model,h)}}this._emit_selection_event(e),this.plot_view.push_state(\"tap\",{selection:this.plot_view.get_selection()})}else for(var m=0,f=this.computed_renderers;m<f.length;m++){var d=f[m];if((_=d.get_selection_manager()).inspect(this.plot_view.renderer_views[d.id],e)&&null!=n){var y;c=(y=this.plot_view.frame).xscales[d.x_range_name],p=y.yscales[d.y_range_name],v=c.invert(e.sx),u=p.invert(e.sy),h={geometries:Object.assign(Object.assign({},e),{x:v,y:u}),source:_.source};n.execute(this.model,h)}}},t}(n.SelectToolView);i.TapToolView=r,r.__name__=\"TapToolView\";var _=function(e){function t(t){var i=e.call(this,t)||this;return i.tool_name=\"Tap\",i.icon=a.bk_tool_icon_tap_select,i.event_type=\"tap\",i.default_order=10,i}return s.__extends(t,e),t.init_TapTool=function(){this.prototype.default_view=r,this.define({behavior:[o.TapBehavior,\"select\"],callback:[o.Any]})},t}(n.SelectTool);i.TapTool=_,_.__name__=\"TapTool\",_.init_TapTool()},\n", | |
" function _(e,t,n){var o=e(113),r=e(370),i=e(121),a=e(373),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o.__extends(t,e),t.prototype._scroll=function(e){var t=this.model.speed*e.delta;t>.9?t=.9:t<-.9&&(t=-.9),this._update_ranges(t)},t.prototype._update_ranges=function(e){var t,n,o,r,i=this.plot_view.frame,a=i.bbox.h_range,s=i.bbox.v_range,l=[a.start,a.end],_=l[0],h=l[1],d=[s.start,s.end],u=d[0],p=d[1];switch(this.model.dimension){case\"height\":var c=Math.abs(p-u);t=_,n=h,o=u-c*e,r=p-c*e;break;case\"width\":var v=Math.abs(h-_);t=_-v*e,n=h-v*e,o=u,r=p;break;default:throw new Error(\"this shouldn't have happened\")}var f=i.xscales,m=i.yscales,w={};for(var b in f){var g=f[b].r_invert(t,n),y=g[0],P=g[1];w[b]={start:y,end:P}}var T={};for(var b in m){var W=m[b].r_invert(o,r);y=W[0],P=W[1];T[b]={start:y,end:P}}var x={xrs:w,yrs:T,factor:e};this.plot_view.push_state(\"wheel_pan\",{range:x}),this.plot_view.update_range(x,!1,!0),null!=this.model.document&&this.model.document.interactive_start(this.plot_model)},t}(r.GestureToolView);n.WheelPanToolView=s,s.__name__=\"WheelPanToolView\";var l=function(e){function t(t){var n=e.call(this,t)||this;return n.tool_name=\"Wheel Pan\",n.icon=a.bk_tool_icon_wheel_pan,n.event_type=\"scroll\",n.default_order=12,n}return o.__extends(t,e),t.init_WheelPanTool=function(){this.prototype.default_view=s,this.define({dimension:[i.Dimension,\"width\"]}),this.internal({speed:[i.Number,.001]})},Object.defineProperty(t.prototype,\"tooltip\",{get:function(){return this._get_dim_tooltip(this.tool_name,this.dimension)},enumerable:!0,configurable:!0}),t}(r.GestureTool);n.WheelPanTool=l,l.__name__=\"WheelPanTool\",l.init_WheelPanTool()},\n", | |
" function _(e,o,t){var i=e(113),n=e(370),l=e(416),s=e(121),_=e(197),r=e(373),a=function(e){function o(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(o,e),o.prototype._pinch=function(e){var o,t=e.sx,i=e.sy,n=e.scale;o=n>=1?20*(n-1):-20/n,this._scroll({type:\"wheel\",sx:t,sy:i,delta:o})},o.prototype._scroll=function(e){var o=this.plot_view.frame,t=o.bbox.h_range,i=o.bbox.v_range,n=e.sx,s=e.sy,_=this.model.dimensions,r=(\"width\"==_||\"both\"==_)&&t.start<n&&n<t.end,a=(\"height\"==_||\"both\"==_)&&i.start<s&&s<i.end;if(r&&a||this.model.zoom_on_axis){var h=this.model.speed*e.delta,m=l.scale_range(o,h,r,a,{x:n,y:s});this.plot_view.push_state(\"wheel_zoom\",{range:m}),this.plot_view.update_range(m,!1,!0,this.model.maintain_focus),null!=this.model.document&&this.model.document.interactive_start(this.plot_model)}},o}(n.GestureToolView);t.WheelZoomToolView=a,a.__name__=\"WheelZoomToolView\";var h=function(e){function o(o){var t=e.call(this,o)||this;return t.tool_name=\"Wheel Zoom\",t.icon=r.bk_tool_icon_wheel_zoom,t.event_type=_.is_mobile?\"pinch\":\"scroll\",t.default_order=10,t}return i.__extends(o,e),o.init_WheelZoomTool=function(){this.prototype.default_view=a,this.define({dimensions:[s.Dimensions,\"both\"],maintain_focus:[s.Boolean,!0],zoom_on_axis:[s.Boolean,!0],speed:[s.Number,1/600]})},Object.defineProperty(o.prototype,\"tooltip\",{get:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)},enumerable:!0,configurable:!0}),o}(n.GestureTool);t.WheelZoomTool=h,h.__name__=\"WheelZoomTool\",h.init_WheelZoomTool()},\n", | |
" function _(i,t,e){var o=i(113),n=i(364),s=i(235),r=i(121),l=i(125),a=i(373),h=function(i){function t(){return null!==i&&i.apply(this,arguments)||this}return o.__extends(t,i),t.prototype._move=function(i){if(this.model.active){var t=i.sx,e=i.sy;this.plot_view.frame.bbox.contains(t,e)?this._update_spans(t,e):this._update_spans(null,null)}},t.prototype._move_exit=function(i){this._update_spans(null,null)},t.prototype._update_spans=function(i,t){var e=this.model.dimensions;\"width\"!=e&&\"both\"!=e||(this.model.spans.width.computed_location=t),\"height\"!=e&&\"both\"!=e||(this.model.spans.height.computed_location=i)},t}(n.InspectToolView);e.CrosshairToolView=h,h.__name__=\"CrosshairToolView\";var _=function(i){function t(t){var e=i.call(this,t)||this;return e.tool_name=\"Crosshair\",e.icon=a.bk_tool_icon_crosshair,e}return o.__extends(t,i),t.init_CrosshairTool=function(){this.prototype.default_view=h,this.define({dimensions:[r.Dimensions,\"both\"],line_color:[r.Color,\"black\"],line_width:[r.Number,1],line_alpha:[r.Number,1]}),this.internal({location_units:[r.SpatialUnits,\"screen\"],render_mode:[r.RenderMode,\"css\"],spans:[r.Any]})},Object.defineProperty(t.prototype,\"tooltip\",{get:function(){return this._get_dim_tooltip(\"Crosshair\",this.dimensions)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"synthetic_renderers\",{get:function(){return l.values(this.spans)},enumerable:!0,configurable:!0}),t.prototype.initialize=function(){i.prototype.initialize.call(this),this.spans={width:new s.Span({for_hover:!0,dimension:\"width\",render_mode:this.render_mode,location_units:this.location_units,line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha}),height:new s.Span({for_hover:!0,dimension:\"height\",render_mode:this.render_mode,location_units:this.location_units,line_color:this.line_color,line_width:this.line_width,line_alpha:this.line_alpha})}},t}(n.InspectTool);e.CrosshairTool=_,_.__name__=\"CrosshairTool\",_.init_CrosshairTool()},\n", | |
" function _(e,t,r){var n=e(113),o=e(166),i=e(121),s=e(125),u=e(127),a=function(t){function o(e){return t.call(this,e)||this}return n.__extends(o,t),o.init_CustomJSHover=function(){this.define({args:[i.Any,{}],code:[i.String,\"\"]})},Object.defineProperty(o.prototype,\"values\",{get:function(){return s.values(this.args)},enumerable:!0,configurable:!0}),o.prototype._make_code=function(e,t,r,o){return new(Function.bind.apply(Function,n.__spreadArrays([void 0],s.keys(this.args),[e,t,r,\"require\",\"exports\",u.use_strict(o)])))},o.prototype.format=function(t,o,i){return this._make_code(\"value\",\"format\",\"special_vars\",this.code).apply(void 0,n.__spreadArrays(this.values,[t,o,i,e,r]))},o}(o.Model);r.CustomJSHover=a,a.__name__=\"CustomJSHover\",a.init_CustomJSHover()},\n", | |
" function _(e,t,n){var i=e(113),o=e(364),r=e(238),s=e(175),a=e(192),l=e(427),d=e(183),c=e(253),_=e(163),p=e(121),h=e(123),m=e(125),u=e(109),v=e(194),y=e(373),f=e(239);function x(e,t,n,i,o,r){var s,a,l={x:o[e],y:r[e]},c={x:o[e+1],y:r[e+1]};if(\"span\"==t.type)\"h\"==t.direction?(s=Math.abs(l.x-n),a=Math.abs(c.x-n)):(s=Math.abs(l.y-i),a=Math.abs(c.y-i));else{var _={x:n,y:i};s=d.dist_2_pts(l,_),a=d.dist_2_pts(c,_)}return s<a?[[l.x,l.y],e]:[[c.x,c.y],e+1]}function g(e,t,n){return[[e[n],t[n]],n]}n._nearest_line_hit=x,n._line_hit=g;var b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.initialize=function(){e.prototype.initialize.call(this),this.ttviews={}},t.prototype.remove=function(){v.remove_views(this.ttviews),e.prototype.remove.call(this)},t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this);for(var n=0,i=this.computed_renderers;n<i.length;n++){var o=i[n];o instanceof s.GlyphRenderer?this.connect(o.data_source.inspect,this._update):o instanceof a.GraphRenderer&&(this.connect(o.node_renderer.data_source.inspect,this._update),this.connect(o.edge_renderer.data_source.inspect,this._update))}this.connect(this.model.properties.renderers.change,function(){return t._computed_renderers=t._ttmodels=null}),this.connect(this.model.properties.names.change,function(){return t._computed_renderers=t._ttmodels=null}),this.connect(this.model.properties.tooltips.change,function(){return t._ttmodels=null})},t.prototype._compute_ttmodels=function(){var e={},t=this.model.tooltips;if(null!=t)for(var n=0,i=this.computed_renderers;n<i.length;n++){var o=i[n];if(o instanceof s.GlyphRenderer){var l=new r.Tooltip({custom:u.isString(t)||u.isFunction(t),attachment:this.model.attachment,show_arrow:this.model.show_arrow});e[o.id]=l}else if(o instanceof a.GraphRenderer){l=new r.Tooltip({custom:u.isString(t)||u.isFunction(t),attachment:this.model.attachment,show_arrow:this.model.show_arrow});e[o.node_renderer.id]=l,e[o.edge_renderer.id]=l}}return v.build_views(this.ttviews,m.values(e),{parent:this.plot_view}),e},Object.defineProperty(t.prototype,\"computed_renderers\",{get:function(){if(null==this._computed_renderers){var e=this.model.renderers,t=this.plot_model.renderers,n=this.model.names;this._computed_renderers=l.compute_renderers(e,t,n)}return this._computed_renderers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"ttmodels\",{get:function(){return null==this._ttmodels&&(this._ttmodels=this._compute_ttmodels()),this._ttmodels},enumerable:!0,configurable:!0}),t.prototype._clear=function(){for(var e in this._inspect(1/0,1/0),this.ttmodels){this.ttmodels[e].clear()}},t.prototype._move=function(e){if(this.model.active){var t=e.sx,n=e.sy;this.plot_view.frame.bbox.contains(t,n)?this._inspect(t,n):this._clear()}},t.prototype._move_exit=function(){this._clear()},t.prototype._inspect=function(e,t){var n;\"mouse\"==this.model.mode?n={type:\"point\",sx:e,sy:t}:n={type:\"span\",direction:\"vline\"==this.model.mode?\"h\":\"v\",sx:e,sy:t};for(var i=0,o=this.computed_renderers;i<o.length;i++){var r=o[i];r.get_selection_manager().inspect(this.plot_view.renderer_views[r.id],n)}null!=this.model.callback&&this._emit_callback(n)},t.prototype._update=function(e){var t,n,i,o,r,l,d,c,_,p,h,u,v,y,f,b,w=e[0],k=e[1].geometry;if(this.model.active&&(w instanceof s.GlyphRendererView||w instanceof a.GraphRendererView)){var T=w.model,H=this.ttmodels[T.id];if(null!=H){H.clear();var C=T.get_selection_manager(),G=C.inspectors[T.id];if(T instanceof s.GlyphRenderer&&(G=T.view.convert_selection_to_subset(G)),!G.is_empty()){for(var R=C.source,$=this.plot_view.frame,A=k.sx,M=k.sy,O=$.xscales[T.x_range_name],P=$.yscales[T.y_range_name],S=O.invert(A),V=P.invert(M),j=w.glyph,z=0,F=G.line_indices;z<F.length;z++){var L=F[z],E=j._x[L+1],I=j._y[L+1],B=L,N=void 0,q=void 0;switch(this.model.line_policy){case\"interp\":E=(t=j.get_interpolation_hit(L,k))[0],I=t[1],N=O.compute(E),q=P.compute(I);break;case\"prev\":N=(i=(n=g(j.sx,j.sy,L))[0])[0],q=i[1],B=n[1];break;case\"next\":N=(r=(o=g(j.sx,j.sy,L+1))[0])[0],q=r[1],B=o[1];break;case\"nearest\":N=(d=(l=x(L,k,A,M,j.sx,j.sy))[0])[0],q=d[1],B=l[1],E=j._x[B],I=j._y[B];break;default:N=(c=[A,M])[0],q=c[1]}var D={index:B,x:S,y:V,sx:A,sy:M,data_x:E,data_y:I,rx:N,ry:q,indices:G.line_indices,name:w.model.name};H.add(N,q,this._render_tooltips(R,B,D))}for(var J=0,K=G.image_indices;J<K.length;J++){var Q=K[J],U=(D={index:Q.index,x:S,y:V,sx:A,sy:M},this._render_tooltips(R,Q,D));H.add(A,M,U)}for(var W=0,X=G.indices;W<X.length;W++){L=X[W];if(m.isEmpty(G.multiline_indices)){E=null!=j._x?j._x[L]:void 0,I=null!=j._y?j._y[L]:void 0,N=void 0,q=void 0;if(\"snap_to_data\"==this.model.point_policy){var Y=j.get_anchor_point(this.model.anchor,L,[A,M]);null==Y&&(Y=j.get_anchor_point(\"center\",L,[A,M])),N=Y.x,q=Y.y}else N=(b=[A,M])[0],q=b[1];ie=void 0,D={index:ie=T instanceof s.GlyphRenderer?T.view.convert_indices_from_subset([L])[0]:L,x:S,y:V,sx:A,sy:M,data_x:E,data_y:I,indices:G.indices,name:w.model.name};H.add(N,q,this._render_tooltips(R,ie,D))}else for(var Z=0,ee=G.multiline_indices[L.toString()];Z<ee.length;Z++){var te=ee[Z],E=j._xs[L][te],I=j._ys[L][te],ne=te,N=void 0,q=void 0;switch(this.model.line_policy){case\"interp\":E=(_=j.get_interpolation_hit(L,te,k))[0],I=_[1],N=O.compute(E),q=P.compute(I);break;case\"prev\":N=(h=(p=g(j.sxs[L],j.sys[L],te))[0])[0],q=h[1],ne=p[1];break;case\"next\":N=(v=(u=g(j.sxs[L],j.sys[L],te+1))[0])[0],q=v[1],ne=u[1];break;case\"nearest\":N=(f=(y=x(te,k,A,M,j.sxs[L],j.sys[L]))[0])[0],q=f[1],ne=y[1],E=j._xs[L][ne],I=j._ys[L][ne];break;default:throw new Error(\"should't have happened\")}var ie=void 0,D={index:ie=T instanceof s.GlyphRenderer?T.view.convert_indices_from_subset([L])[0]:L,x:S,y:V,sx:A,sy:M,data_x:E,data_y:I,segment_index:ne,indices:G.multiline_indices,name:w.model.name};H.add(N,q,this._render_tooltips(R,ie,D))}}}}}},t.prototype._emit_callback=function(e){for(var t=0,n=this.computed_renderers;t<n.length;t++){var i=n[t],o=i.data_source.inspected,r=this.plot_view.frame,s=r.xscales[i.x_range_name],a=r.yscales[i.y_range_name],l=s.invert(e.sx),d=a.invert(e.sy),c=Object.assign({x:l,y:d},e);this.model.callback.execute(this.model,{index:o,geometry:c,renderer:i})}},t.prototype._render_tooltips=function(e,t,n){var i=this.model.tooltips;if(u.isString(i))return(G=_.div()).innerHTML=c.replace_placeholders(i,e,t,this.model.formatters,n),G;if(u.isFunction(i))return i(e,n);for(var o=_.div({style:{display:\"table\",borderSpacing:\"2px\"}}),r=0,s=i;r<s.length;r++){var a=s[r],l=a[0],d=a[1],p=_.div({style:{display:\"table-row\"}});o.appendChild(p);var m=void 0;if(m=_.div({style:{display:\"table-cell\"},class:f.bk_tooltip_row_label},0!=l.length?l+\": \":\"\"),p.appendChild(m),m=_.div({style:{display:\"table-cell\"},class:f.bk_tooltip_row_value}),p.appendChild(m),d.indexOf(\"$color\")>=0){var v=d.match(/\\$color(\\[.*\\])?:(\\w*)/),y=v[1],x=void 0===y?\"\":y,g=v[2],b=e.get_column(g);if(null==b){var w=_.span({},g+\" unknown\");m.appendChild(w);continue}var k=x.indexOf(\"hex\")>=0,T=x.indexOf(\"swatch\")>=0,H=u.isNumber(t)?b[t]:null;if(null==H){var C=_.span({},\"(null)\");m.appendChild(C);continue}k&&(H=h.color2hex(H));var G=_.span({},H);m.appendChild(G),T&&(G=_.span({class:f.bk_tooltip_color_block,style:{backgroundColor:H}},\" \"),m.appendChild(G))}else{(G=_.span()).innerHTML=c.replace_placeholders(d.replace(\"$~\",\"$data_\"),e,t,this.model.formatters,n),m.appendChild(G)}}return o},t}(o.InspectToolView);n.HoverToolView=b,b.__name__=\"HoverToolView\";var w=function(e){function t(t){var n=e.call(this,t)||this;return n.tool_name=\"Hover\",n.icon=y.bk_tool_icon_hover,n}return i.__extends(t,e),t.init_HoverTool=function(){this.prototype.default_view=b,this.define({tooltips:[p.Any,[[\"index\",\"$index\"],[\"data (x, y)\",\"($x, $y)\"],[\"screen (x, y)\",\"($sx, $sy)\"]]],formatters:[p.Any,{}],renderers:[p.Any,\"auto\"],names:[p.Array,[]],mode:[p.HoverMode,\"mouse\"],point_policy:[p.PointPolicy,\"snap_to_data\"],line_policy:[p.LinePolicy,\"nearest\"],show_arrow:[p.Boolean,!0],anchor:[p.Anchor,\"center\"],attachment:[p.TooltipAttachment,\"horizontal\"],callback:[p.Any]})},t}(o.InspectTool);n.HoverTool=w,w.__name__=\"HoverTool\",w.init_HoverTool()},\n", | |
" function _(t,e,o){var n=t(113),i=t(121),r=t(116),c=t(166),l=t(364),u=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_ToolProxy=function(){this.define({tools:[i.Array,[]],active:[i.Boolean,!1],disabled:[i.Boolean,!1]})},Object.defineProperty(e.prototype,\"button_view\",{get:function(){return this.tools[0].button_view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"event_type\",{get:function(){return this.tools[0].event_type},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"tooltip\",{get:function(){return this.tools[0].tooltip},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"tool_name\",{get:function(){return this.tools[0].tool_name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"icon\",{get:function(){return this.tools[0].computed_icon},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"computed_icon\",{get:function(){return this.icon},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,\"toggleable\",{get:function(){var t=this.tools[0];return t instanceof l.InspectTool&&t.toggleable},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this.do=new r.Signal0(this,\"do\")},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.do,function(){return e.doit()}),this.connect(this.properties.active.change,function(){return e.set_active()})},e.prototype.doit=function(){for(var t=0,e=this.tools;t<e.length;t++){e[t].do.emit()}},e.prototype.set_active=function(){for(var t=0,e=this.tools;t<e.length;t++){e[t].active=this.active}},e}(c.Model);o.ToolProxy=u,u.__name__=\"ToolProxy\",u.init_ToolProxy()},\n", | |
" function _(t,o,i){var e=t(113),n=t(121),r=t(110),s=t(369),l=t(439),a=t(339),h=t(282),p=function(t){function o(o){return t.call(this,o)||this}return e.__extends(o,t),o.prototype.initialize=function(){t.prototype.initialize.call(this),this._merge_tools()},o.prototype._merge_tools=function(){var t,o=this;this._proxied_tools=[];for(var i={},e={},n={},s=[],a=[],h=0,p=this.help;h<p.length;h++){var c=p[h];r.includes(a,c.redirect)||(s.push(c),a.push(c.redirect))}for(var u in(t=this._proxied_tools).push.apply(t,s),this.help=s,this.gestures){var _=this.gestures[u];u in n||(n[u]={});for(var f=0,y=_.tools;f<y.length;f++){(O=y[f]).type in n[u]||(n[u][O.type]=[]),n[u][O.type].push(O)}}for(var v=0,d=this.inspectors;v<d.length;v++){(O=d[v]).type in i||(i[O.type]=[]),i[O.type].push(O)}for(var g=0,b=this.actions;g<b.length;g++){(O=b[g]).type in e||(e[O.type]=[]),e[O.type].push(O)}var x=function(t,i){void 0===i&&(i=!1);var e=new l.ToolProxy({tools:t,active:i});return o._proxied_tools.push(e),e};for(var u in n){_=this.gestures[u];for(var m in _.tools=[],n[u]){if((z=n[u][m]).length>0)if(\"multi\"==u)for(var w=0,T=z;w<T.length;w++){var B=x([O=T[w]]);_.tools.push(B),this.connect(B.properties.active.change,this._active_change.bind(this,B))}else{B=x(z);_.tools.push(B),this.connect(B.properties.active.change,this._active_change.bind(this,B))}}}for(var m in this.actions=[],e){var z=e[m];if(\"CustomAction\"==m)for(var P=0,L=z;P<L.length;P++){var O=L[P];this.actions.push(x([O]))}else z.length>0&&this.actions.push(x(z))}for(var m in this.inspectors=[],i){(z=i[m]).length>0&&this.inspectors.push(x(z,!0))}for(var V in this.gestures){0!=(_=this.gestures[V]).tools.length&&(_.tools=r.sort_by(_.tools,function(t){return t.default_order}),\"pinch\"!=V&&\"scroll\"!=V&&\"multi\"!=V&&(_.tools[0].active=!0))}},o}(s.ToolbarBase);i.ProxyToolbar=p,p.__name__=\"ProxyToolbar\";var c=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(o,t),o.prototype.initialize=function(){this.model.toolbar.toolbar_location=this.model.toolbar_location,t.prototype.initialize.call(this)},Object.defineProperty(o.prototype,\"child_models\",{get:function(){return[this.model.toolbar]},enumerable:!0,configurable:!0}),o.prototype._update_layout=function(){this.layout=new h.ContentBox(this.child_views[0].el),this.model.toolbar.horizontal?this.layout.set_sizing({width_policy:\"fit\",min_width:100,height_policy:\"fixed\"}):this.layout.set_sizing({width_policy:\"fixed\",height_policy:\"fit\",min_height:100})},o}(a.LayoutDOMView);i.ToolbarBoxView=c,c.__name__=\"ToolbarBoxView\";var u=function(t){function o(o){return t.call(this,o)||this}return e.__extends(o,t),o.init_ToolbarBox=function(){this.prototype.default_view=c,this.define({toolbar:[n.Instance],toolbar_location:[n.Location,\"right\"]})},o}(a.LayoutDOM);i.ToolbarBox=u,u.__name__=\"ToolbarBox\",u.init_ToolbarBox()},\n", | |
" function _(e,n,t){var d=e(106),i=e(163),o=e(442);t.index={},t.add_document_standalone=function(e,n,a,l){void 0===a&&(a={}),void 0===l&&(l=!1);var r={};function v(e){var d;e.id in a?d=a[e.id]:n.classList.contains(o.BOKEH_ROOT)?d=n:(d=i.div({class:o.BOKEH_ROOT}),n.appendChild(d));var l=function(e){var n=new e.default_view({model:e,parent:null});return t.index[e.id]=n,n}(e);l.renderTo(d),r[e.id]=l}for(var c=0,u=e.roots();c<u.length;c++)v(u[c]);return l&&(window.document.title=e.title()),e.on_change(function(e){var n,i;e instanceof d.RootAddedEvent?v(e.model):e instanceof d.RootRemovedEvent?(n=e.model,(i=n.id)in r&&(r[i].remove(),delete r[i],delete t.index[i])):l&&e instanceof d.TitleChangedEvent&&(window.document.title=e.title)}),r}},\n", | |
" function _(e,r,o){var n=e(163),t=e(164);function l(e){var r=document.getElementById(e);if(null==r)throw new Error(\"Error rendering Bokeh model: could not find #\"+e+\" HTML tag\");if(!document.body.contains(r))throw new Error(\"Error rendering Bokeh model: element #\"+e+\" must be under <body>\");if(\"SCRIPT\"==r.tagName){var t=n.div({class:o.BOKEH_ROOT});n.replaceWith(r,t),r=t}return r}o.BOKEH_ROOT=t.bk_root,o._resolve_element=function(e){var r=e.elementid;return null!=r?l(r):document.body},o._resolve_root_elements=function(e){var r={};if(null!=e.roots)for(var o in e.roots)r[o]=l(e.roots[o]);return r}},\n", | |
" function _(n,o,t){var e=n(444),r=n(167),a=n(441);t._get_ws_url=function(n,o){var t,e=\"ws:\";return\"https:\"==window.location.protocol&&(e=\"wss:\"),null!=o?(t=document.createElement(\"a\")).href=o:t=window.location,null!=n?\"/\"==n&&(n=\"\"):n=t.pathname.replace(/\\/+$/,\"\"),e+\"//\"+t.host+n+\"/ws\"};var i={};t.add_document_from_session=function(n,o,t,s,u){void 0===s&&(s={}),void 0===u&&(u=!1);var c=window.location.search.substr(1);return function(n,o,t){n in i||(i[n]={});var r=i[n];return o in r||(r[o]=e.pull_session(n,o,t)),r[o]}(n,o,c).then(function(n){return a.add_document_standalone(n.document,t,s,u)},function(n){throw r.logger.error(\"Failed to load Bokeh session \"+o+\": \"+n),n})}},\n", | |
" function _(e,n,o){var t=e(167),s=e(106),r=e(445),i=e(446),c=e(447);o.DEFAULT_SERVER_WEBSOCKET_URL=\"ws://localhost:5006/ws\",o.DEFAULT_SESSION_ID=\"default\";var l=0,_=function(){function e(e,n,s,r,c){void 0===e&&(e=o.DEFAULT_SERVER_WEBSOCKET_URL),void 0===n&&(n=o.DEFAULT_SESSION_ID),void 0===s&&(s=null),void 0===r&&(r=null),void 0===c&&(c=null),this.url=e,this.id=n,this.args_string=s,this._on_have_session_hook=r,this._on_closed_permanently_hook=c,this._number=l++,this.socket=null,this.session=null,this.closed_permanently=!1,this._current_handler=null,this._pending_ack=null,this._pending_replies={},this._pending_messages=[],this._receiver=new i.Receiver,t.logger.debug(\"Creating websocket \"+this._number+\" to '\"+this.url+\"' session '\"+this.id+\"'\")}return e.prototype.connect=function(){var e=this;if(this.closed_permanently)return Promise.reject(new Error(\"Cannot connect() a closed ClientConnection\"));if(null!=this.socket)return Promise.reject(new Error(\"Already connected\"));this._pending_replies={},this._current_handler=null;try{var n=this.url+\"?bokeh-protocol-version=1.0&bokeh-session-id=\"+this.id;return null!=this.args_string&&this.args_string.length>0&&(n+=\"&\"+this.args_string),this.socket=new WebSocket(n),new Promise(function(n,o){e.socket.binaryType=\"arraybuffer\",e.socket.onopen=function(){return e._on_open(n,o)},e.socket.onmessage=function(n){return e._on_message(n)},e.socket.onclose=function(n){return e._on_close(n)},e.socket.onerror=function(){return e._on_error(o)}})}catch(e){return t.logger.error(\"websocket creation failed to url: \"+this.url),t.logger.error(\" - \"+e),Promise.reject(e)}},e.prototype.close=function(){this.closed_permanently||(t.logger.debug(\"Permanently closing websocket connection \"+this._number),this.closed_permanently=!0,null!=this.socket&&this.socket.close(1e3,\"close method called on ClientConnection \"+this._number),this.session._connection_closed(),null!=this._on_closed_permanently_hook&&(this._on_closed_permanently_hook(),this._on_closed_permanently_hook=null))},e.prototype._schedule_reconnect=function(e){var n=this;setTimeout(function(){n.closed_permanently||t.logger.info(\"Websocket connection \"+n._number+\" disconnected, will not attempt to reconnect\")},e)},e.prototype.send=function(e){if(null==this.socket)throw new Error(\"not connected so cannot send \"+e);e.send(this.socket)},e.prototype.send_with_reply=function(e){var n=this;return new Promise(function(o,t){n._pending_replies[e.msgid()]=[o,t],n.send(e)}).then(function(e){if(\"ERROR\"===e.msgtype())throw new Error(\"Error reply \"+e.content.text);return e},function(e){throw e})},e.prototype._pull_doc_json=function(){var e=r.Message.create(\"PULL-DOC-REQ\",{});return this.send_with_reply(e).then(function(e){if(!(\"doc\"in e.content))throw new Error(\"No 'doc' field in PULL-DOC-REPLY\");return e.content.doc},function(e){throw e})},e.prototype._repull_session_doc=function(){var e=this;null==this.session?t.logger.debug(\"Pulling session for first time\"):t.logger.debug(\"Repulling session\"),this._pull_doc_json().then(function(n){if(null==e.session)if(e.closed_permanently)t.logger.debug(\"Got new document after connection was already closed\");else{var o=s.Document.from_json(n),i=s.Document._compute_patch_since_json(n,o);if(i.events.length>0){t.logger.debug(\"Sending \"+i.events.length+\" changes from model construction back to server\");var l=r.Message.create(\"PATCH-DOC\",{},i);e.send(l)}e.session=new c.ClientSession(e,o,e.id);for(var _=0,h=e._pending_messages;_<h.length;_++){var u=h[_];e.session.handle(u)}e._pending_messages=[],t.logger.debug(\"Created a new session from new pulled doc\"),null!=e._on_have_session_hook&&(e._on_have_session_hook(e.session),e._on_have_session_hook=null)}else e.session.document.replace_with_json(n),t.logger.debug(\"Updated existing session with new pulled doc\")},function(e){throw e}).catch(function(e){null!=console.trace&&console.trace(e),t.logger.error(\"Failed to repull session \"+e)})},e.prototype._on_open=function(e,n){var o=this;t.logger.info(\"Websocket connection \"+this._number+\" is now open\"),this._pending_ack=[e,n],this._current_handler=function(e){o._awaiting_ack_handler(e)}},e.prototype._on_message=function(e){null==this._current_handler&&t.logger.error(\"Got a message with no current handler set\");try{this._receiver.consume(e.data)}catch(e){this._close_bad_protocol(e.toString())}if(null!=this._receiver.message){var n=this._receiver.message,o=n.problem();null!=o&&this._close_bad_protocol(o),this._current_handler(n)}},e.prototype._on_close=function(e){var n=this;t.logger.info(\"Lost websocket \"+this._number+\" connection, \"+e.code+\" (\"+e.reason+\")\"),this.socket=null,null!=this._pending_ack&&(this._pending_ack[1](new Error(\"Lost websocket connection, \"+e.code+\" (\"+e.reason+\")\")),this._pending_ack=null);for(var o=function(){for(var e in n._pending_replies){var o=n._pending_replies[e];return delete n._pending_replies[e],o}return null},s=o();null!=s;)s[1](\"Disconnected\"),s=o();this.closed_permanently||this._schedule_reconnect(2e3)},e.prototype._on_error=function(e){t.logger.debug(\"Websocket error on socket \"+this._number),e(new Error(\"Could not open websocket\"))},e.prototype._close_bad_protocol=function(e){t.logger.error(\"Closing connection: \"+e),null!=this.socket&&this.socket.close(1002,e)},e.prototype._awaiting_ack_handler=function(e){var n=this;\"ACK\"===e.msgtype()?(this._current_handler=function(e){return n._steady_state_handler(e)},this._repull_session_doc(),null!=this._pending_ack&&(this._pending_ack[0](this),this._pending_ack=null)):this._close_bad_protocol(\"First message was not an ACK\")},e.prototype._steady_state_handler=function(e){if(e.reqid()in this._pending_replies){var n=this._pending_replies[e.reqid()];delete this._pending_replies[e.reqid()],n[0](e)}else this.session?this.session.handle(e):this._pending_messages.push(e)},e}();o.ClientConnection=_,_.__name__=\"ClientConnection\",o.pull_session=function(e,n,o){return new Promise(function(s,r){new _(e,n,o,function(e){try{s(e)}catch(n){throw t.logger.error(\"Promise handler threw an error, closing session \"+n),e.close(),n}},function(){r(new Error(\"Connection was closed before we successfully pulled a session\"))}).connect().then(function(e){},function(e){throw t.logger.error(\"Failed to connect to Bokeh server \"+e),e})})}},\n", | |
" function _(e,t,r){var n=e(127),s=function(){function e(e,t,r){this.header=e,this.metadata=t,this.content=r,this.buffers=[]}return e.assemble=function(t,r,n){return new e(JSON.parse(t),JSON.parse(r),JSON.parse(n))},e.prototype.assemble_buffer=function(e,t){if((null!=this.header.num_buffers?this.header.num_buffers:0)<=this.buffers.length)throw new Error(\"too many buffers received, expecting #{nb}\");this.buffers.push([e,t])},e.create=function(t,r,n){void 0===n&&(n={});var s=e.create_header(t);return new e(s,r,n)},e.create_header=function(e){return{msgid:n.uniqueId(),msgtype:e}},e.prototype.complete=function(){return null!=this.header&&null!=this.metadata&&null!=this.content&&(!(\"num_buffers\"in this.header)||this.buffers.length===this.header.num_buffers)},e.prototype.send=function(e){if((null!=this.header.num_buffers?this.header.num_buffers:0)>0)throw new Error(\"BokehJS only supports receiving buffers, not sending\");var t=JSON.stringify(this.header),r=JSON.stringify(this.metadata),n=JSON.stringify(this.content);e.send(t),e.send(r),e.send(n)},e.prototype.msgid=function(){return this.header.msgid},e.prototype.msgtype=function(){return this.header.msgtype},e.prototype.reqid=function(){return this.header.reqid},e.prototype.problem=function(){return\"msgid\"in this.header?\"msgtype\"in this.header?null:\"No msgtype in header\":\"No msgid in header\"},e}();r.Message=s,s.__name__=\"Message\"},\n", | |
" function _(t,e,s){var r=t(445),_=function(){function t(){this.message=null,this._partial=null,this._fragments=[],this._buf_header=null,this._current_consumer=this._HEADER}return t.prototype.consume=function(t){this._current_consumer(t)},t.prototype._HEADER=function(t){this._assume_text(t),this.message=null,this._partial=null,this._fragments=[t],this._buf_header=null,this._current_consumer=this._METADATA},t.prototype._METADATA=function(t){this._assume_text(t),this._fragments.push(t),this._current_consumer=this._CONTENT},t.prototype._CONTENT=function(t){this._assume_text(t),this._fragments.push(t);var e=this._fragments.slice(0,3),s=e[0],_=e[1],i=e[2];this._partial=r.Message.assemble(s,_,i),this._check_complete()},t.prototype._BUFFER_HEADER=function(t){this._assume_text(t),this._buf_header=t,this._current_consumer=this._BUFFER_PAYLOAD},t.prototype._BUFFER_PAYLOAD=function(t){this._assume_binary(t),this._partial.assemble_buffer(this._buf_header,t),this._check_complete()},t.prototype._assume_text=function(t){if(t instanceof ArrayBuffer)throw new Error(\"Expected text fragment but received binary fragment\")},t.prototype._assume_binary=function(t){if(!(t instanceof ArrayBuffer))throw new Error(\"Expected binary fragment but received text fragment\")},t.prototype._check_complete=function(){this._partial.complete()?(this.message=this._partial,this._current_consumer=this._HEADER):this._current_consumer=this._BUFFER_HEADER},t}();s.Receiver=_,_.__name__=\"Receiver\"},\n", | |
" function _(e,t,n){var o=e(106),i=e(445),r=e(167),s=function(){function e(e,t,n){var o=this;this._connection=e,this.document=t,this.id=n,this._document_listener=function(e){return o._document_changed(e)},this.document.on_change(this._document_listener),this.event_manager=this.document.event_manager,this.event_manager.session=this}return e.prototype.handle=function(e){var t=e.msgtype();\"PATCH-DOC\"===t?this._handle_patch(e):\"OK\"===t?this._handle_ok(e):\"ERROR\"===t?this._handle_error(e):r.logger.debug(\"Doing nothing with message \"+e.msgtype())},e.prototype.close=function(){this._connection.close()},e.prototype.send_event=function(e){var t=i.Message.create(\"EVENT\",{},JSON.stringify(e.to_json()));this._connection.send(t)},e.prototype._connection_closed=function(){this.document.remove_on_change(this._document_listener)},e.prototype.request_server_info=function(){var e=i.Message.create(\"SERVER-INFO-REQ\",{});return this._connection.send_with_reply(e).then(function(e){return e.content})},e.prototype.force_roundtrip=function(){return this.request_server_info().then(function(e){})},e.prototype._document_changed=function(e){if(e.setter_id!==this.id&&(!(e instanceof o.ModelChangedEvent)||e.attr in e.model.serializable_attributes())){var t=i.Message.create(\"PATCH-DOC\",{},this.document.create_json_patch([e]));this._connection.send(t)}},e.prototype._handle_patch=function(e){this.document.apply_json_patch(e.content,e.buffers,this.id)},e.prototype._handle_ok=function(e){r.logger.trace(\"Unhandled OK reply to \"+e.reqid())},e.prototype._handle_error=function(e){r.logger.error(\"Unhandled ERROR reply to \"+e.reqid()+\": \"+e.content.text)},e}();n.ClientSession=s,s.__name__=\"ClientSession\"},\n", | |
" function _(e,o,t){var n=e(106),r=e(446),s=e(167),i=e(125),a=e(441),l=e(442);function c(e,o){o.buffers.length>0?e.consume(o.buffers[0].buffer):e.consume(o.content.data);var t=e.message;null!=t&&this.apply_json_patch(t.content,t.buffers)}function g(e,o){if(\"undefined\"!=typeof Jupyter&&null!=Jupyter.notebook.kernel){s.logger.info(\"Registering Jupyter comms for target \"+e);var n=Jupyter.notebook.kernel.comm_manager;try{n.register_target(e,function(t){s.logger.info(\"Registering Jupyter comms for target \"+e);var n=new r.Receiver;t.on_msg(c.bind(o,n))})}catch(e){s.logger.warn(\"Jupyter comms failed to register. push_notebook() will not function. (exception reported: \"+e+\")\")}}else if(o.roots()[0].id in t.kernels){s.logger.info(\"Registering JupyterLab comms for target \"+e);var i=t.kernels[o.roots()[0].id];try{i.registerCommTarget(e,function(t){s.logger.info(\"Registering JupyterLab comms for target \"+e);var n=new r.Receiver;t.onMsg=c.bind(o,n)})}catch(e){s.logger.warn(\"Jupyter comms failed to register. push_notebook() will not function. (exception reported: \"+e+\")\")}}else console.warn(\"Jupyter notebooks comms not available. push_notebook() will not function. If running JupyterLab ensure the latest @bokeh/jupyter_bokeh extension is installed. In an exported notebook this warning is expected.\")}e(374),e(449),t.kernels={},t.embed_items_notebook=function(e,o){if(1!=i.size(e))throw new Error(\"embed_items_notebook expects exactly one document in docs_json\");for(var t=n.Document.from_json(i.values(e)[0]),r=0,s=o;r<s.length;r++){var c=s[r];null!=c.notebook_comms_target&&g(c.notebook_comms_target,t);var u=l._resolve_element(c),m=l._resolve_root_elements(c);a.add_document_standalone(t,u,m)}}},\n", | |
" function _(e,t,o){e(164),e(163).styles.append(\"/* notebook specific tweaks so no black outline and matching padding\\n/* can't be wrapped inside bk-root. here are the offending jupyter lines:\\n/* https://github.com/jupyter/notebook/blob/master/notebook/static/notebook/less/renderedhtml.less#L59-L76 */\\n.rendered_html .bk-root .bk-tooltip table,\\n.rendered_html .bk-root .bk-tooltip tr,\\n.rendered_html .bk-root .bk-tooltip th,\\n.rendered_html .bk-root .bk-tooltip td {\\n border: none;\\n padding: 1px;\\n}\\n\")},\n", | |
" function _(n,o,r){function f(n){for(var o in n)r.hasOwnProperty(o)||(r[o]=n[o])}f(n(445)),f(n(446))},\n", | |
" function _(e,t,s){function n(){var e=document.getElementsByTagName(\"body\")[0],t=document.getElementsByClassName(\"bokeh-test-div\");1==t.length&&(e.removeChild(t[0]),delete t[0]);var s=document.createElement(\"div\");s.classList.add(\"bokeh-test-div\"),s.style.display=\"none\",e.insertBefore(s,e.firstChild)}s.results={},s.init=function(){n()},s.record=function(e,t){s.results[e]=t,n()},s.count=function(e){null==s.results[e]&&(s.results[e]=0),s.results[e]+=1,n()},s.clear=function(){for(var e=0,t=Object.keys(s.results);e<t.length;e++){var l=t[e];delete s.results[l]}n()}},\n", | |
" function _(e,t,r){r.safely=function(e,t){void 0===t&&(t=!1);try{return e()}catch(e){if(function(e){var t=document.createElement(\"div\");t.style.backgroundColor=\"#f2dede\",t.style.border=\"1px solid #a94442\",t.style.borderRadius=\"4px\",t.style.display=\"inline-block\",t.style.fontFamily=\"sans-serif\",t.style.marginTop=\"5px\",t.style.minWidth=\"200px\",t.style.padding=\"5px 5px 5px 10px\",t.classList.add(\"bokeh-error-box-into-flames\");var r=document.createElement(\"span\");r.style.backgroundColor=\"#a94442\",r.style.borderRadius=\"0px 4px 0px 0px\",r.style.color=\"white\",r.style.cursor=\"pointer\",r.style.cssFloat=\"right\",r.style.fontSize=\"0.8em\",r.style.margin=\"-6px -6px 0px 0px\",r.style.padding=\"2px 5px 4px 5px\",r.title=\"close\",r.setAttribute(\"aria-label\",\"close\"),r.appendChild(document.createTextNode(\"x\")),r.addEventListener(\"click\",function(){return a.removeChild(t)});var l=document.createElement(\"h3\");l.style.color=\"#a94442\",l.style.margin=\"8px 0px 0px 0px\",l.style.padding=\"0px\",l.appendChild(document.createTextNode(\"Bokeh Error\"));var o=document.createElement(\"pre\");o.style.whiteSpace=\"unset\",o.style.overflowX=\"auto\";var n=e instanceof Error?e.message:e;o.appendChild(document.createTextNode(n)),t.appendChild(r),t.appendChild(l),t.appendChild(o);var a=document.getElementsByTagName(\"body\")[0];a.insertBefore(t,a.firstChild)}(e),t)return;throw e}}},\n", | |
" ], 0, {\"legacy\":0,\"polyfill\":1,\"main\":102,\"index\":103,\"version\":104,\"embed/index\":105,\"document/index\":106,\"document/document\":107,\"base\":108,\"core/util/types\":109,\"core/util/array\":110,\"core/util/math\":111,\"core/util/assert\":112,\"core/util/arrayable\":114,\"core/has_props\":115,\"core/signaling\":116,\"core/util/data_structures\":117,\"core/util/eq\":118,\"core/util/callback\":119,\"core/property_mixins\":120,\"core/properties\":121,\"core/enums\":122,\"core/util/color\":123,\"core/util/svg_colors\":124,\"core/util/object\":125,\"core/util/refs\":126,\"core/util/string\":127,\"core/settings\":128,\"models/index\":129,\"models/annotations/index\":130,\"models/annotations/annotation\":131,\"core/util/projections\":132,\"models/renderers/renderer\":160,\"core/dom_view\":161,\"core/view\":162,\"core/dom\":163,\"styles/root\":164,\"core/visuals\":165,\"model\":166,\"core/logging\":167,\"models/annotations/arrow\":168,\"models/annotations/arrow_head\":169,\"models/sources/column_data_source\":170,\"models/sources/columnar_data_source\":171,\"models/sources/data_source\":172,\"models/selections/selection\":173,\"core/selection_manager\":174,\"models/renderers/glyph_renderer\":175,\"models/renderers/data_renderer\":176,\"models/glyphs/line\":177,\"models/glyphs/xy_glyph\":178,\"core/util/spatial\":179,\"core/util/bbox\":181,\"models/glyphs/glyph\":182,\"core/hittest\":183,\"models/ranges/factor_range\":184,\"models/ranges/range\":185,\"models/glyphs/utils\":186,\"models/glyphs/patch\":187,\"models/glyphs/harea\":188,\"models/glyphs/area\":189,\"models/glyphs/varea\":190,\"models/sources/cds_view\":191,\"models/renderers/graph_renderer\":192,\"models/graphs/graph_hit_test_policy\":193,\"core/build_views\":194,\"models/selections/interaction_policy\":195,\"core/util/serialization\":196,\"core/util/compat\":197,\"core/util/typed_array\":198,\"document/events\":199,\"models/annotations/band\":200,\"models/annotations/box_annotation\":201,\"styles/annotations\":202,\"models/annotations/color_bar\":203,\"models/tickers/basic_ticker\":204,\"models/tickers/adaptive_ticker\":205,\"models/tickers/continuous_ticker\":206,\"models/tickers/ticker\":207,\"models/formatters/basic_tick_formatter\":208,\"models/formatters/tick_formatter\":209,\"models/mappers/linear_color_mapper\":210,\"models/mappers/continuous_color_mapper\":211,\"models/mappers/color_mapper\":212,\"models/mappers/mapper\":213,\"models/transforms/transform\":214,\"models/scales/linear_scale\":215,\"models/scales/scale\":216,\"models/transforms/index\":217,\"models/transforms/customjs_transform\":218,\"models/transforms/dodge\":219,\"models/transforms/interpolator\":220,\"models/transforms/jitter\":221,\"models/transforms/linear_interpolator\":222,\"models/transforms/step_interpolator\":223,\"models/scales/log_scale\":224,\"models/ranges/range1d\":225,\"core/util/text\":226,\"models/annotations/label\":227,\"models/annotations/text_annotation\":228,\"models/annotations/label_set\":229,\"models/annotations/legend\":230,\"models/annotations/legend_item\":231,\"core/vectorization\":232,\"models/annotations/poly_annotation\":233,\"models/annotations/slope\":234,\"models/annotations/span\":235,\"models/annotations/title\":236,\"models/annotations/toolbar_panel\":237,\"models/annotations/tooltip\":238,\"styles/tooltips\":239,\"styles/mixins\":240,\"models/annotations/whisker\":241,\"models/axes/index\":242,\"models/axes/axis\":243,\"models/renderers/guide_renderer\":244,\"models/axes/categorical_axis\":245,\"models/tickers/categorical_ticker\":246,\"models/formatters/categorical_tick_formatter\":247,\"models/axes/continuous_axis\":248,\"models/axes/datetime_axis\":249,\"models/axes/linear_axis\":250,\"models/formatters/datetime_tick_formatter\":251,\"core/util/templating\":253,\"models/tickers/datetime_ticker\":256,\"models/tickers/composite_ticker\":257,\"models/tickers/days_ticker\":258,\"models/tickers/single_interval_ticker\":259,\"models/tickers/util\":260,\"models/tickers/months_ticker\":261,\"models/tickers/years_ticker\":262,\"models/axes/log_axis\":263,\"models/formatters/log_tick_formatter\":264,\"models/tickers/log_ticker\":265,\"models/axes/mercator_axis\":266,\"models/formatters/mercator_tick_formatter\":267,\"models/tickers/mercator_ticker\":268,\"models/callbacks/index\":269,\"models/callbacks/customjs\":270,\"models/callbacks/callback\":271,\"models/callbacks/open_url\":272,\"models/canvas/index\":273,\"models/canvas/canvas\":274,\"core/util/canvas\":275,\"styles/canvas\":276,\"models/canvas/cartesian_frame\":278,\"models/scales/categorical_scale\":279,\"models/ranges/data_range1d\":280,\"models/ranges/data_range\":281,\"core/layout/index\":282,\"core/layout/types\":283,\"core/layout/layoutable\":284,\"core/layout/alignments\":285,\"core/layout/grid\":286,\"core/layout/html\":287,\"models/expressions/index\":288,\"models/expressions/expression\":289,\"models/expressions/stack\":290,\"models/expressions/cumsum\":291,\"models/filters/index\":292,\"models/filters/boolean_filter\":293,\"models/filters/filter\":294,\"models/filters/customjs_filter\":295,\"models/filters/group_filter\":296,\"models/filters/index_filter\":297,\"models/formatters/index\":298,\"models/formatters/func_tick_formatter\":299,\"models/formatters/numeral_tick_formatter\":300,\"models/formatters/printf_tick_formatter\":301,\"models/glyphs/index\":302,\"models/glyphs/annular_wedge\":303,\"models/glyphs/annulus\":304,\"models/glyphs/arc\":305,\"models/glyphs/bezier\":306,\"models/glyphs/circle\":307,\"models/glyphs/center_rotatable\":308,\"models/glyphs/ellipse\":309,\"models/glyphs/ellipse_oval\":310,\"models/glyphs/hbar\":311,\"models/glyphs/box\":312,\"models/glyphs/hex_tile\":313,\"models/glyphs/image\":314,\"models/glyphs/image_base\":315,\"models/glyphs/image_rgba\":316,\"models/glyphs/image_url\":317,\"core/util/image\":318,\"models/glyphs/multi_line\":319,\"models/glyphs/multi_polygons\":320,\"models/glyphs/oval\":321,\"models/glyphs/patches\":322,\"models/glyphs/quad\":323,\"models/glyphs/quadratic\":324,\"models/glyphs/ray\":325,\"models/glyphs/rect\":326,\"models/glyphs/segment\":327,\"models/glyphs/step\":328,\"models/glyphs/text\":329,\"models/glyphs/vbar\":330,\"models/glyphs/wedge\":331,\"models/graphs/index\":332,\"models/graphs/layout_provider\":333,\"models/graphs/static_layout_provider\":334,\"models/grids/index\":335,\"models/grids/grid\":336,\"models/layouts/index\":337,\"models/layouts/box\":338,\"models/layouts/layout_dom\":339,\"models/layouts/column\":340,\"models/layouts/grid_box\":341,\"models/layouts/html_box\":342,\"models/layouts/row\":343,\"models/layouts/spacer\":344,\"models/layouts/tabs\":345,\"styles/tabs\":346,\"styles/buttons\":347,\"styles/menus\":348,\"models/layouts/widget_box\":349,\"models/mappers/index\":350,\"models/mappers/categorical_color_mapper\":351,\"models/mappers/categorical_mapper\":352,\"models/mappers/categorical_marker_mapper\":353,\"models/mappers/categorical_pattern_mapper\":354,\"models/mappers/log_color_mapper\":355,\"models/markers/index\":356,\"models/markers/defs\":357,\"models/markers/marker\":358,\"models/markers/scatter\":359,\"models/plots/index\":360,\"models/plots/gmap_plot\":361,\"models/plots/plot\":362,\"models/tools/toolbar\":363,\"models/tools/inspectors/inspect_tool\":364,\"models/tools/button_tool\":365,\"models/tools/tool\":366,\"styles/toolbar\":367,\"models/tools/on_off_button\":368,\"models/tools/toolbar_base\":369,\"models/tools/gestures/gesture_tool\":370,\"models/tools/actions/action_tool\":371,\"models/tools/actions/help_tool\":372,\"styles/icons\":373,\"styles/logo\":374,\"models/plots/plot_canvas\":375,\"core/bokeh_events\":376,\"core/util/throttle\":377,\"core/layout/side_panel\":378,\"core/ui_events\":379,\"core/util/wheel\":381,\"models/plots/gmap_plot_canvas\":382,\"models/ranges/index\":383,\"models/renderers/index\":384,\"models/scales/index\":385,\"models/selections/index\":386,\"models/sources/index\":387,\"models/sources/server_sent_data_source\":388,\"models/sources/web_data_source\":389,\"models/sources/ajax_data_source\":390,\"models/sources/remote_data_source\":391,\"models/sources/geojson_data_source\":392,\"models/tickers/index\":393,\"models/tickers/fixed_ticker\":394,\"models/tiles/index\":395,\"models/tiles/bbox_tile_source\":396,\"models/tiles/mercator_tile_source\":397,\"models/tiles/tile_source\":398,\"models/tiles/tile_utils\":399,\"models/tiles/quadkey_tile_source\":400,\"models/tiles/tile_renderer\":401,\"models/tiles/wmts_tile_source\":402,\"styles/tiles\":403,\"models/tiles/tms_tile_source\":404,\"models/textures/index\":405,\"models/textures/canvas_texture\":406,\"models/textures/texture\":407,\"models/textures/image_url_texture\":408,\"models/tools/index\":409,\"models/tools/actions/custom_action\":410,\"models/tools/actions/redo_tool\":411,\"models/tools/actions/reset_tool\":412,\"models/tools/actions/save_tool\":413,\"models/tools/actions/undo_tool\":414,\"models/tools/actions/zoom_in_tool\":415,\"core/util/zoom\":416,\"models/tools/actions/zoom_out_tool\":417,\"models/tools/edit/edit_tool\":418,\"models/tools/edit/box_edit_tool\":419,\"models/tools/edit/freehand_draw_tool\":420,\"models/tools/edit/point_draw_tool\":421,\"models/tools/edit/poly_draw_tool\":422,\"models/tools/edit/poly_tool\":423,\"models/tools/edit/poly_edit_tool\":424,\"models/tools/gestures/box_select_tool\":425,\"models/tools/gestures/select_tool\":426,\"models/tools/util\":427,\"models/tools/gestures/box_zoom_tool\":428,\"models/tools/gestures/lasso_select_tool\":429,\"models/tools/gestures/pan_tool\":430,\"models/tools/gestures/poly_select_tool\":431,\"models/tools/gestures/range_tool\":432,\"models/tools/gestures/tap_tool\":433,\"models/tools/gestures/wheel_pan_tool\":434,\"models/tools/gestures/wheel_zoom_tool\":435,\"models/tools/inspectors/crosshair_tool\":436,\"models/tools/inspectors/customjs_hover\":437,\"models/tools/inspectors/hover_tool\":438,\"models/tools/tool_proxy\":439,\"models/tools/toolbar_box\":440,\"embed/standalone\":441,\"embed/dom\":442,\"embed/server\":443,\"client/connection\":444,\"protocol/message\":445,\"protocol/receiver\":446,\"client/session\":447,\"embed/notebook\":448,\"styles/notebook\":449,\"protocol/index\":450,\"testing\":451,\"safely\":452}, {});\n", | |
" })\n", | |
"\n", | |
" //# sourceMappingURL=bokeh.min.js.map\n", | |
"\n", | |
" /* END bokeh.min.js */\n", | |
" },\n", | |
" \n", | |
" function(Bokeh) {\n", | |
" /* BEGIN bokeh-widgets.min.js */\n", | |
" /*!\n", | |
" * Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors\n", | |
" * All rights reserved.\n", | |
" * \n", | |
" * Redistribution and use in source and binary forms, with or without modification,\n", | |
" * are permitted provided that the following conditions are met:\n", | |
" * \n", | |
" * Redistributions of source code must retain the above copyright notice,\n", | |
" * this list of conditions and the following disclaimer.\n", | |
" * \n", | |
" * Redistributions in binary form must reproduce the above copyright notice,\n", | |
" * this list of conditions and the following disclaimer in the documentation\n", | |
" * and/or other materials provided with the distribution.\n", | |
" * \n", | |
" * Neither the name of Anaconda nor the names of any contributors\n", | |
" * may be used to endorse or promote products derived from this software\n", | |
" * without specific prior written permission.\n", | |
" * \n", | |
" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n", | |
" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n", | |
" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n", | |
" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n", | |
" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n", | |
" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n", | |
" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n", | |
" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n", | |
" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n", | |
" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n", | |
" * THE POSSIBILITY OF SUCH DAMAGE.\n", | |
" */\n", | |
" (function(root, factory) {\n", | |
" factory(root[\"Bokeh\"]);\n", | |
" })(this, function(Bokeh) {\n", | |
" var define;\n", | |
" return (function(modules, entry, aliases, externals) {\n", | |
" if (Bokeh != null) {\n", | |
" return Bokeh.register_plugin(modules, entry, aliases, externals);\n", | |
" } else {\n", | |
" throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\");\n", | |
" }\n", | |
" })\n", | |
" ({\n", | |
" 472: function _(e,i,r){var s=e(473);r.Widgets=s,e(108).register_models(s)},\n", | |
" 473: function _(r,t,a){var e=r(474);a.AbstractButton=e.AbstractButton;var o=r(477);a.AbstractIcon=o.AbstractIcon;var u=r(478);a.AutocompleteInput=u.AutocompleteInput;var n=r(482);a.Button=n.Button;var v=r(483);a.CheckboxButtonGroup=v.CheckboxButtonGroup;var p=r(485);a.CheckboxGroup=p.CheckboxGroup;var i=r(487);a.ColorPicker=i.ColorPicker;var l=r(488);a.DatePicker=l.DatePicker;var c=r(491);a.DateRangeSlider=c.DateRangeSlider;var d=r(496);a.DateSlider=d.DateSlider;var g=r(497);a.Div=g.Div;var I=r(500);a.Dropdown=I.Dropdown;var S=r(501);a.FileInput=S.FileInput;var k=r(480);a.InputWidget=k.InputWidget;var x=r(498);a.Markup=x.Markup;var D=r(502);a.MultiSelect=D.MultiSelect;var P=r(503);a.Paragraph=P.Paragraph;var b=r(504);a.PasswordInput=b.PasswordInput;var s=r(505);a.PreText=s.PreText;var A=r(506);a.RadioButtonGroup=A.RadioButtonGroup;var B=r(507);a.RadioGroup=B.RadioGroup;var G=r(508);a.RangeSlider=G.RangeSlider;var R=r(509);a.Select=R.Select;var T=r(510);a.Slider=T.Slider;var h=r(511);a.Spinner=h.Spinner;var C=r(479);a.TextInput=C.TextInput;var w=r(512);a.TextAreaInput=w.TextAreaInput;var M=r(513);a.Toggle=M.Toggle;var W=r(534);a.Widget=W.Widget},\n", | |
" 474: function _(t,n,e){var i=t(113),o=t(121),r=t(163),s=t(194),l=t(475),c=t(347),u=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(n,t),n.prototype.initialize=function(){t.prototype.initialize.call(this),this.icon_views={}},n.prototype.connect_signals=function(){var n=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return n.render()})},n.prototype.remove=function(){s.remove_views(this.icon_views),t.prototype.remove.call(this)},n.prototype._render_button=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return r.button.apply(r,i.__spreadArrays([{type:\"button\",disabled:this.model.disabled,class:[c.bk_btn,c.bk_btn_type(this.model.button_type)]}],t))},n.prototype.render=function(){var n=this;t.prototype.render.call(this),this.button_el=this._render_button(this.model.label),this.button_el.addEventListener(\"click\",function(){return n.click()});var e=this.model.icon;if(null!=e){s.build_views(this.icon_views,[e],{parent:this});var i=this.icon_views[e.id];i.render(),r.prepend(this.button_el,i.el,r.nbsp())}this.group_el=r.div({class:c.bk_btn_group},this.button_el),this.el.appendChild(this.group_el)},n.prototype.click=function(){null!=this.model.callback&&this.model.callback.execute(this.model)},n}(l.ControlView);e.AbstractButtonView=u,u.__name__=\"AbstractButtonView\";var a=function(t){function n(n){return t.call(this,n)||this}return i.__extends(n,t),n.init_AbstractButton=function(){this.define({label:[o.String,\"Button\"],icon:[o.Instance],button_type:[o.ButtonType,\"default\"],callback:[o.Any]})},n}(l.Control);e.AbstractButton=a,a.__name__=\"AbstractButton\",a.init_AbstractButton()},\n", | |
" 475: function _(n,t,e){var i=n(113),o=n(534),r=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return i.__extends(t,n),t.prototype.connect_signals=function(){var t=this;n.prototype.connect_signals.call(this);var e=this.model.properties;this.on_change(e.disabled,function(){return t.render()})},t}(o.WidgetView);e.ControlView=r,r.__name__=\"ControlView\";var s=function(n){function t(t){return n.call(this,t)||this}return i.__extends(t,n),t}(o.Widget);e.Control=s,s.__name__=\"Control\"},\n", | |
" 534: function _(t,i,e){var n=t(113),o=t(342),r=t(121),l=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(i,t),i.prototype._width_policy=function(){return\"horizontal\"==this.model.orientation?t.prototype._width_policy.call(this):\"fixed\"},i.prototype._height_policy=function(){return\"horizontal\"==this.model.orientation?\"fixed\":t.prototype._height_policy.call(this)},i.prototype.box_sizing=function(){var i=t.prototype.box_sizing.call(this);return\"horizontal\"==this.model.orientation?null==i.width&&(i.width=this.model.default_size):null==i.height&&(i.height=this.model.default_size),i},i}(o.HTMLBoxView);e.WidgetView=l,l.__name__=\"WidgetView\";var h=function(t){function i(i){return t.call(this,i)||this}return n.__extends(i,t),i.init_Widget=function(){this.define({orientation:[r.Orientation,\"horizontal\"],default_size:[r.Number,300]}),this.override({margin:[5,5,5,5]})},i}(o.HTMLBox);e.Widget=h,h.__name__=\"Widget\",h.init_Widget()},\n", | |
" 477: function _(n,t,c){var e=n(113),r=n(166),_=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return e.__extends(t,n),t}(n(161).DOMView);c.AbstractIconView=_,_.__name__=\"AbstractIconView\";var i=function(n){function t(t){return n.call(this,t)||this}return e.__extends(t,n),t}(r.Model);c.AbstractIcon=i,i.__name__=\"AbstractIcon\"},\n", | |
" 478: function _(e,t,n){var i=e(113),o=e(479),s=e(163),h=e(121),u=e(111),r=e(240),_=e(348),c=function(e){function t(){var t=e.apply(this,arguments)||this;return t._open=!1,t._last_value=\"\",t._hover_index=0,t}return i.__extends(t,e),t.prototype.render=function(){var t=this;e.prototype.render.call(this),this.input_el.addEventListener(\"keydown\",function(e){return t._keydown(e)}),this.input_el.addEventListener(\"keyup\",function(e){return t._keyup(e)}),this.menu=s.div({class:[_.bk_menu,r.bk_below]}),this.menu.addEventListener(\"click\",function(e){return t._menu_click(e)}),this.menu.addEventListener(\"mouseover\",function(e){return t._menu_hover(e)}),this.el.appendChild(this.menu),s.undisplay(this.menu)},t.prototype.change_input=function(){this._open&&this.menu.children.length>0&&(this.model.value=this.menu.children[this._hover_index].textContent,this.input_el.focus(),this._hide_menu())},t.prototype._update_completions=function(e){s.empty(this.menu);for(var t=0,n=e;t<n.length;t++){var i=n[t],o=s.div({},i);this.menu.appendChild(o)}e.length>0&&this.menu.children[0].classList.add(r.bk_active)},t.prototype._show_menu=function(){var e=this;if(!this._open){this._open=!0,this._hover_index=0,this._last_value=this.model.value,s.display(this.menu);var t=function(n){var i=n.target;i instanceof HTMLElement&&!e.el.contains(i)&&(document.removeEventListener(\"click\",t),e._hide_menu())};document.addEventListener(\"click\",t)}},t.prototype._hide_menu=function(){this._open&&(this._open=!1,s.undisplay(this.menu))},t.prototype._menu_click=function(e){e.target!=e.currentTarget&&e.target instanceof Element&&(this.model.value=e.target.textContent,this.input_el.focus(),this._hide_menu())},t.prototype._menu_hover=function(e){if(e.target!=e.currentTarget&&e.target instanceof Element){var t=0;for(t=0;t<this.menu.children.length&&this.menu.children[t].textContent!=e.target.textContent;t++);this._bump_hover(t)}},t.prototype._bump_hover=function(e){var t=this.menu.children.length;this._open&&t>0&&(this.menu.children[this._hover_index].classList.remove(r.bk_active),this._hover_index=u.clamp(e,0,t-1),this.menu.children[this._hover_index].classList.add(r.bk_active))},t.prototype._keydown=function(e){},t.prototype._keyup=function(e){switch(e.keyCode){case s.Keys.Enter:this.change_input();break;case s.Keys.Esc:this._hide_menu();break;case s.Keys.Up:this._bump_hover(this._hover_index-1);break;case s.Keys.Down:this._bump_hover(this._hover_index+1);break;default:var t=this.input_el.value;if(t.length<this.model.min_characters)return void this._hide_menu();for(var n=[],i=0,o=this.model.completions;i<o.length;i++){var h=o[i];h.startsWith(t)&&n.push(h)}this._update_completions(n),0==n.length?this._hide_menu():this._show_menu()}},t}(o.TextInputView);n.AutocompleteInputView=c,c.__name__=\"AutocompleteInputView\";var a=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_AutocompleteInput=function(){this.prototype.default_view=c,this.define({completions:[h.Array,[]],min_characters:[h.Int,2]})},t}(o.TextInput);n.AutocompleteInput=a,a.__name__=\"AutocompleteInput\",a.init_AutocompleteInput()},\n", | |
" 479: function _(t,e,n){var i=t(113),u=t(480),l=t(163),p=t(121),o=t(481),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.name.change,function(){return e.input_el.name=e.model.name||\"\"}),this.connect(this.model.properties.value.change,function(){return e.input_el.value=e.model.value}),this.connect(this.model.properties.value_input.change,function(){return e.input_el.value=e.model.value_input}),this.connect(this.model.properties.disabled.change,function(){return e.input_el.disabled=e.model.disabled}),this.connect(this.model.properties.placeholder.change,function(){return e.input_el.placeholder=e.model.placeholder})},e.prototype.render=function(){var e=this;t.prototype.render.call(this),this.input_el=l.input({type:\"text\",class:o.bk_input,name:this.model.name,value:this.model.value,disabled:this.model.disabled,placeholder:this.model.placeholder}),this.input_el.addEventListener(\"change\",function(){return e.change_input()}),this.input_el.addEventListener(\"input\",function(){return e.change_input_oninput()}),this.group_el.appendChild(this.input_el)},e.prototype.change_input=function(){this.model.value=this.input_el.value,t.prototype.change_input.call(this)},e.prototype.change_input_oninput=function(){this.model.value_input=this.input_el.value,t.prototype.change_input.call(this)},e}(u.InputWidgetView);n.TextInputView=a,a.__name__=\"TextInputView\";var r=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.init_TextInput=function(){this.prototype.default_view=a,this.define({value:[p.String,\"\"],value_input:[p.String,\"\"],placeholder:[p.String,\"\"]})},e}(u.InputWidget);n.TextInput=r,r.__name__=\"TextInput\",r.init_TextInput()},\n", | |
" 480: function _(t,e,n){var i=t(113),l=t(475),o=t(163),s=t(121),c=t(481),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.title.change,function(){e.label_el.textContent=e.model.title})},e.prototype.render=function(){t.prototype.render.call(this);var e=this.model.title;this.label_el=o.label({style:{display:0==e.length?\"none\":\"\"}},e),this.group_el=o.div({class:c.bk_input_group},this.label_el),this.el.appendChild(this.group_el)},e.prototype.change_input=function(){null!=this.model.callback&&this.model.callback.execute(this.model)},e}(l.ControlView);n.InputWidgetView=r,r.__name__=\"InputWidgetView\";var p=function(t){function e(e){return t.call(this,e)||this}return i.__extends(e,t),e.init_InputWidget=function(){this.define({title:[s.String,\"\"],callback:[s.Any]})},e}(l.Control);n.InputWidget=p,p.__name__=\"InputWidget\",p.init_InputWidget()},\n", | |
" 481: function _(n,o,t){n(164),n(163).styles.append('.bk-root .bk-input {\\n display: inline-block;\\n width: 100%;\\n flex-grow: 1;\\n -webkit-flex-grow: 1;\\n min-height: 31px;\\n padding: 0 12px;\\n background-color: #fff;\\n border: 1px solid #ccc;\\n border-radius: 4px;\\n}\\n.bk-root .bk-input:focus {\\n border-color: #66afe9;\\n outline: 0;\\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(102, 175, 233, 0.6);\\n}\\n.bk-root .bk-input::placeholder,\\n.bk-root .bk-input:-ms-input-placeholder,\\n.bk-root .bk-input::-moz-placeholder,\\n.bk-root .bk-input::-webkit-input-placeholder {\\n color: #999;\\n opacity: 1;\\n}\\n.bk-root .bk-input[disabled],\\n.bk-root .bk-input[readonly] {\\n cursor: not-allowed;\\n background-color: #eee;\\n opacity: 1;\\n}\\n.bk-root select[multiple].bk-input,\\n.bk-root select[size].bk-input,\\n.bk-root textarea.bk-input {\\n height: auto;\\n}\\n.bk-root .bk-input-group {\\n width: 100%;\\n height: 100%;\\n display: inline-flex;\\n display: -webkit-inline-flex;\\n flex-wrap: nowrap;\\n -webkit-flex-wrap: nowrap;\\n align-items: start;\\n -webkit-align-items: start;\\n flex-direction: column;\\n -webkit-flex-direction: column;\\n white-space: nowrap;\\n}\\n.bk-root .bk-input-group.bk-inline {\\n flex-direction: row;\\n -webkit-flex-direction: row;\\n}\\n.bk-root .bk-input-group.bk-inline > *:not(:first-child) {\\n margin-left: 5px;\\n}\\n.bk-root .bk-input-group input[type=\"checkbox\"] + span,\\n.bk-root .bk-input-group input[type=\"radio\"] + span {\\n position: relative;\\n top: -2px;\\n margin-left: 3px;\\n}\\n'),t.bk_input=\"bk-input\",t.bk_input_group=\"bk-input-group\"},\n", | |
" 482: function _(t,n,i){var e=t(113),o=t(474),u=t(376),c=t(121),r=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(n,t),n.prototype.click=function(){this.model.clicks=this.model.clicks+1,this.model.trigger_event(new u.ButtonClick),t.prototype.click.call(this)},n}(o.AbstractButtonView);i.ButtonView=r,r.__name__=\"ButtonView\";var l=function(t){function n(n){return t.call(this,n)||this}return e.__extends(n,t),n.init_Button=function(){this.prototype.default_view=r,this.define({clicks:[c.Number,0]}),this.override({label:\"Button\"})},n}(o.AbstractButton);i.Button=l,l.__name__=\"Button\",l.init_Button()},\n", | |
" 483: function _(t,e,o){var n=t(113),i=t(484),u=t(163),c=t(117),r=t(121),a=t(240),h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),Object.defineProperty(e.prototype,\"active\",{get:function(){return new c.Set(this.model.active)},enumerable:!0,configurable:!0}),e.prototype.change_active=function(t){var e=this.active;e.toggle(t),this.model.active=e.values,null!=this.model.callback&&this.model.callback.execute(this.model)},e.prototype._update_active=function(){var t=this.active;this._buttons.forEach(function(e,o){u.classes(e).toggle(a.bk_active,t.has(o))})},e}(i.ButtonGroupView);o.CheckboxButtonGroupView=h,h.__name__=\"CheckboxButtonGroupView\";var l=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_CheckboxButtonGroup=function(){this.prototype.default_view=h,this.define({active:[r.Array,[]]})},e}(i.ButtonGroup);o.CheckboxButtonGroup=l,l.__name__=\"CheckboxButtonGroup\",l.init_CheckboxButtonGroup()},\n", | |
" 484: function _(t,n,e){var o=t(113),i=t(475),r=t(163),u=t(121),a=t(347),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o.__extends(n,t),n.prototype.connect_signals=function(){var n=this;t.prototype.connect_signals.call(this);var e=this.model.properties;this.on_change(e.button_type,function(){return n.render()}),this.on_change(e.labels,function(){return n.render()}),this.on_change(e.active,function(){return n._update_active()})},n.prototype.render=function(){var n=this;t.prototype.render.call(this),this._buttons=this.model.labels.map(function(t,e){var o=r.div({class:[a.bk_btn,a.bk_btn_type(n.model.button_type)],disabled:n.model.disabled},t);return o.addEventListener(\"click\",function(){return n.change_active(e)}),o}),this._update_active();var e=r.div({class:a.bk_btn_group},this._buttons);this.el.appendChild(e)},n}(i.ControlView);e.ButtonGroupView=s,s.__name__=\"ButtonGroupView\";var _=function(t){function n(n){return t.call(this,n)||this}return o.__extends(n,t),n.init_ButtonGroup=function(){this.define({labels:[u.Array,[]],button_type:[u.ButtonType,\"default\"],callback:[u.Any]})},n}(i.Control);e.ButtonGroup=_,_.__name__=\"ButtonGroup\",_.init_ButtonGroup()},\n", | |
" 485: function _(e,t,n){var i=e(113),l=e(486),o=e(163),a=e(110),r=e(117),c=e(121),u=e(240),h=e(481),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.render=function(){var t=this;e.prototype.render.call(this);var n=o.div({class:[h.bk_input_group,this.model.inline?u.bk_inline:null]});this.el.appendChild(n);for(var i=this.model,l=i.active,r=i.labels,c=function(e){var i=o.input({type:\"checkbox\",value:\"\"+e});i.addEventListener(\"change\",function(){return t.change_active(e)}),p.model.disabled&&(i.disabled=!0),a.includes(l,e)&&(i.checked=!0);var c=o.label({},i,o.span({},r[e]));n.appendChild(c)},p=this,s=0;s<r.length;s++)c(s)},t.prototype.change_active=function(e){var t=new r.Set(this.model.active);t.toggle(e),this.model.active=t.values,null!=this.model.callback&&this.model.callback.execute(this.model)},t}(l.InputGroupView);n.CheckboxGroupView=p,p.__name__=\"CheckboxGroupView\";var s=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_CheckboxGroup=function(){this.prototype.default_view=p,this.define({active:[c.Array,[]],labels:[c.Array,[]],inline:[c.Boolean,!1],callback:[c.Any]})},t}(l.InputGroup);n.CheckboxGroup=s,s.__name__=\"CheckboxGroup\",s.init_CheckboxGroup()},\n", | |
" 486: function _(n,t,e){var o=n(113),r=n(475),u=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return o.__extends(t,n),t.prototype.connect_signals=function(){var t=this;n.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return t.render()})},t}(r.ControlView);e.InputGroupView=u,u.__name__=\"InputGroupView\";var i=function(n){function t(t){return n.call(this,t)||this}return o.__extends(t,n),t}(r.Control);e.InputGroup=i,i.__name__=\"InputGroup\"},\n", | |
" 487: function _(e,t,n){var i=e(113),o=e(480),r=e(163),l=e(121),c=e(481),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.properties.name.change,function(){return t.input_el.name=t.model.name||\"\"}),this.connect(this.model.properties.color.change,function(){return t.input_el.value=t.model.color}),this.connect(this.model.properties.disabled.change,function(){return t.input_el.disabled=t.model.disabled})},t.prototype.render=function(){var t=this;e.prototype.render.call(this),this.input_el=r.input({type:\"color\",class:c.bk_input,name:this.model.name,value:this.model.color,disabled:this.model.disabled}),this.input_el.addEventListener(\"change\",function(){return t.change_input()}),this.group_el.appendChild(this.input_el)},t.prototype.change_input=function(){this.model.color=this.input_el.value,e.prototype.change_input.call(this)},t}(o.InputWidgetView);n.ColorPickerView=s,s.__name__=\"ColorPickerView\";var u=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_ColorPicker=function(){this.prototype.default_view=s,this.define({color:[l.Color,\"#000000\"]})},t}(o.InputWidget);n.ColorPicker=u,u.__name__=\"ColorPicker\",u.init_ColorPicker()},\n", | |
" 488: function _(t,e,i){var n=t(113),o=t(480),s=t(163),l=t(121),a=t(489),r=t(481);t(490),a.prototype.adjustPosition=function(){if(!this._o.container){this.el.style.position=\"absolute\";var t=this._o.trigger,e=this.el.offsetWidth,i=this.el.offsetHeight,n=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,s=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop,l=t.getBoundingClientRect(),a=l.left+window.pageXOffset,r=l.bottom+window.pageYOffset;a-=this.el.parentElement.offsetLeft,r-=this.el.parentElement.offsetTop,(this._o.reposition&&a+e>n||this._o.position.indexOf(\"right\")>-1&&a-e+t.offsetWidth>0)&&(a=a-e+t.offsetWidth),(this._o.reposition&&r+i>o+s||this._o.position.indexOf(\"top\")>-1&&r-i-t.offsetHeight>0)&&(r=r-i-t.offsetHeight),this.el.style.left=a+\"px\",this.el.style.top=r+\"px\"}};var d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.render()})},e.prototype.render=function(){var e=this;null!=this._picker&&this._picker.destroy(),t.prototype.render.call(this),this.input_el=s.input({type:\"text\",class:r.bk_input,disabled:this.model.disabled}),this.group_el.appendChild(this.input_el),this._picker=new a({field:this.input_el,defaultDate:this._unlocal_date(new Date(this.model.value)),setDefaultDate:!0,minDate:null!=this.model.min_date?this._unlocal_date(new Date(this.model.min_date)):void 0,maxDate:null!=this.model.max_date?this._unlocal_date(new Date(this.model.max_date)):void 0,onSelect:function(t){return e._on_select(t)}}),this._root_element.appendChild(this._picker.el)},e.prototype._unlocal_date=function(t){var e=6e4*t.getTimezoneOffset();t.setTime(t.getTime()-e);var i=t.toISOString().substr(0,10).split(\"-\");return new Date(Number(i[0]),Number(i[1])-1,Number(i[2]))},e.prototype._on_select=function(t){this.model.value=t.toDateString(),this.change_input()},e}(o.InputWidgetView);i.DatePickerView=d,d.__name__=\"DatePickerView\";var h=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_DatePicker=function(){this.prototype.default_view=d,this.define({value:[l.Any,(new Date).toDateString()],min_date:[l.Any],max_date:[l.Any]})},e}(o.InputWidget);i.DatePicker=h,h.__name__=\"DatePicker\",h.init_DatePicker()},\n", | |
" 489: function _(e,t,n){var a=function(e,t,n,a){e.addEventListener(t,n,!!a)},i=function(e,t,n,a){e.removeEventListener(t,n,!!a)},s=function(e,t){return-1!==(\" \"+e.className+\" \").indexOf(\" \"+t+\" \")},o=function(e,t){s(e,t)||(e.className=\"\"===e.className?t:e.className+\" \"+t)},r=function(e,t){var n;e.className=(n=(\" \"+e.className+\" \").replace(\" \"+t+\" \",\" \")).trim?n.trim():n.replace(/^\\s+|\\s+$/g,\"\")},l=function(e){return/Array/.test(Object.prototype.toString.call(e))},h=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},d=function(e){var t=e.getDay();return 0===t||6===t},u=function(e){\n", | |
" // solution lifted from date.js (MIT license): https://github.com/datejs/Datejs\n", | |
" return e%4==0&&e%100!=0||e%400==0},c=function(e,t){return[31,u(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},f=function(e){h(e)&&e.setHours(0,0,0,0)},g=function(e,t){return e.getTime()===t.getTime()},m=function(e,t,n){var a,i;for(a in t)(i=void 0!==e[a])&&\"object\"==typeof t[a]&&null!==t[a]&&void 0===t[a].nodeName?h(t[a])?n&&(e[a]=new Date(t[a].getTime())):l(t[a])?n&&(e[a]=t[a].slice(0)):e[a]=m({},t[a],n):!n&&i||(e[a]=t[a]);return e},p=function(e,t,n){var a;document.createEvent?((a=document.createEvent(\"HTMLEvents\")).initEvent(t,!0,!1),a=m(a,n),e.dispatchEvent(a)):document.createEventObject&&(a=document.createEventObject(),a=m(a,n),e.fireEvent(\"on\"+t,a))},y=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},D={field:null,bound:void 0,ariaLabel:\"Use the arrow keys to pick a date\",position:\"bottom left\",reposition:!0,format:\"YYYY-MM-DD\",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:\"\",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:\"left\",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:\"Previous Month\",nextMonth:\"Next Month\",months:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],weekdays:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],weekdaysShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},b=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},_=function(e){var t=[],n=\"false\";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class=\"is-empty\"></td>';t.push(\"is-outside-current-month\"),e.enableSelectionDaysInNextAndPreviousMonths||t.push(\"is-selection-disabled\")}return e.isDisabled&&t.push(\"is-disabled\"),e.isToday&&t.push(\"is-today\"),e.isSelected&&(t.push(\"is-selected\"),n=\"true\"),e.hasEvent&&t.push(\"has-event\"),e.isInRange&&t.push(\"is-inrange\"),e.isStartRange&&t.push(\"is-startrange\"),e.isEndRange&&t.push(\"is-endrange\"),'<td data-day=\"'+e.day+'\" class=\"'+t.join(\" \")+'\" aria-selected=\"'+n+'\"><button class=\"pika-button pika-day\" type=\"button\" data-pika-year=\"'+e.year+'\" data-pika-month=\"'+e.month+'\" data-pika-day=\"'+e.day+'\">'+e.day+\"</button></td>\"},v=function(e,t,n){return'<td class=\"pika-week\">'+function(e){e.setHours(0,0,0,0);var t=e.getDate(),n=e.getDay(),a=function(e){return(e+7-1)%7};e.setDate(t+3-a(n));var i=new Date(e.getFullYear(),0,4),s=(e.getTime()-i.getTime())/864e5;return 1+Math.round((s-3+a(i.getDay()))/7)}(new Date(n,t,e))+\"</td>\"},w=function(e,t,n,a){return'<tr class=\"pika-row'+(n?\" pick-whole-week\":\"\")+(a?\" is-selected\":\"\")+'\">'+(t?e.reverse():e).join(\"\")+\"</tr>\"},k=function(e,t,n,a,i,s){var o,r,h,d,u,c=e._o,f=n===c.minYear,g=n===c.maxYear,m='<div id=\"'+s+'\" class=\"pika-title\" role=\"heading\" aria-live=\"assertive\">',p=!0,y=!0;for(h=[],o=0;o<12;o++)h.push('<option value=\"'+(n===i?o-t:12+o-t)+'\"'+(o===a?' selected=\"selected\"':\"\")+(f&&o<c.minMonth||g&&o>c.maxMonth?' disabled=\"disabled\"':\"\")+\">\"+c.i18n.months[o]+\"</option>\");for(d='<div class=\"pika-label\">'+c.i18n.months[a]+'<select class=\"pika-select pika-select-month\" tabindex=\"-1\">'+h.join(\"\")+\"</select></div>\",l(c.yearRange)?(o=c.yearRange[0],r=c.yearRange[1]+1):(o=n-c.yearRange,r=1+n+c.yearRange),h=[];o<r&&o<=c.maxYear;o++)o>=c.minYear&&h.push('<option value=\"'+o+'\"'+(o===n?' selected=\"selected\"':\"\")+\">\"+o+\"</option>\");return u='<div class=\"pika-label\">'+n+c.yearSuffix+'<select class=\"pika-select pika-select-year\" tabindex=\"-1\">'+h.join(\"\")+\"</select></div>\",c.showMonthAfterYear?m+=u+d:m+=d+u,f&&(0===a||c.minMonth>=a)&&(p=!1),g&&(11===a||c.maxMonth<=a)&&(y=!1),0===t&&(m+='<button class=\"pika-prev'+(p?\"\":\" is-disabled\")+'\" type=\"button\">'+c.i18n.previousMonth+\"</button>\"),t===e._o.numberOfMonths-1&&(m+='<button class=\"pika-next'+(y?\"\":\" is-disabled\")+'\" type=\"button\">'+c.i18n.nextMonth+\"</button>\"),m+\"</div>\"},M=function(e,t,n){return'<table cellpadding=\"0\" cellspacing=\"0\" class=\"pika-table\" role=\"grid\" aria-labelledby=\"'+n+'\">'+function(e){var t,n=[];for(e.showWeekNumber&&n.push(\"<th></th>\"),t=0;t<7;t++)n.push('<th scope=\"col\"><abbr title=\"'+b(e,t)+'\">'+b(e,t,!0)+\"</abbr></th>\");return\"<thead><tr>\"+(e.isRTL?n.reverse():n).join(\"\")+\"</tr></thead>\"}(e)+(\"<tbody>\"+t.join(\"\")+\"</tbody>\")+\"</table>\"},x=function(e){var t=this,n=t.config(e);t._onMouseDown=function(e){if(t._v){var a=(e=e||window.event).target||e.srcElement;if(a)if(s(a,\"is-disabled\")||(!s(a,\"pika-button\")||s(a,\"is-empty\")||s(a.parentNode,\"is-disabled\")?s(a,\"pika-prev\")?t.prevMonth():s(a,\"pika-next\")&&t.nextMonth():(t.setDate(new Date(a.getAttribute(\"data-pika-year\"),a.getAttribute(\"data-pika-month\"),a.getAttribute(\"data-pika-day\"))),n.bound&&setTimeout(function(){t.hide(),n.blurFieldOnSelect&&n.field&&n.field.blur()},100))),s(a,\"pika-select\"))t._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}}},t._onChange=function(e){var n=(e=e||window.event).target||e.srcElement;n&&(s(n,\"pika-select-month\")?t.gotoMonth(n.value):s(n,\"pika-select-year\")&&t.gotoYear(n.value))},t._onKeyChange=function(e){if(e=e||window.event,t.isVisible())switch(e.keyCode){case 13:case 27:n.field&&n.field.blur();break;case 37:t.adjustDate(\"subtract\",1);break;case 38:t.adjustDate(\"subtract\",7);break;case 39:t.adjustDate(\"add\",1);break;case 40:t.adjustDate(\"add\",7);break;case 8:case 46:t.setDate(null)}},t._parseFieldValue=function(){return n.parse?n.parse(n.field.value,n.format):new Date(Date.parse(n.field.value))},t._onInputChange=function(e){var n;e.firedBy!==t&&(n=t._parseFieldValue(),h(n)&&t.setDate(n),t._v||t.show())},t._onInputFocus=function(){t.show()},t._onInputClick=function(){t.show()},t._onInputBlur=function(){var e=document.activeElement;do{if(s(e,\"pika-single\"))return}while(e=e.parentNode);t._c||(t._b=setTimeout(function(){t.hide()},50)),t._c=!1},t._onClick=function(e){var a=(e=e||window.event).target||e.srcElement,i=a;if(a){do{if(s(i,\"pika-single\")||i===n.trigger)return}while(i=i.parentNode);t._v&&a!==n.trigger&&i!==n.trigger&&t.hide()}},t.el=document.createElement(\"div\"),t.el.className=\"pika-single\"+(n.isRTL?\" is-rtl\":\"\")+(n.theme?\" \"+n.theme:\"\"),a(t.el,\"mousedown\",t._onMouseDown,!0),a(t.el,\"touchend\",t._onMouseDown,!0),a(t.el,\"change\",t._onChange),n.keyboardInput&&a(document,\"keydown\",t._onKeyChange),n.field&&(n.container?n.container.appendChild(t.el):n.bound?document.body.appendChild(t.el):n.field.parentNode.insertBefore(t.el,n.field.nextSibling),a(n.field,\"change\",t._onInputChange),n.defaultDate||(n.defaultDate=t._parseFieldValue(),n.setDefaultDate=!0));var i=n.defaultDate;h(i)?n.setDefaultDate?t.setDate(i,!0):t.gotoDate(i):t.gotoDate(new Date),n.bound?(this.hide(),t.el.className+=\" is-bound\",a(n.trigger,\"click\",t._onInputClick),a(n.trigger,\"focus\",t._onInputFocus),a(n.trigger,\"blur\",t._onInputBlur)):this.show()};x.prototype={config:function(e){this._o||(this._o=m({},D,!0));var t=m(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme=\"string\"==typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn=\"function\"==typeof t.disableDayFn?t.disableDayFn:null;var n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,h(t.minDate)||(t.minDate=!1),h(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),l(t.yearRange)){var a=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||a,t.yearRange[1]=parseInt(t.yearRange[1],10)||a}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||D.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(e){return e=e||this._o.format,h(this._d)?this._o.toString?this._o.toString(this._d,e):this._d.toDateString():\"\"},getDate:function(){return h(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value=\"\",p(this._o.field,\"change\",{firedBy:this})),this.draw();if(\"string\"==typeof e&&(e=new Date(Date.parse(e))),h(e)){var n=this._o.minDate,a=this._o.maxDate;h(n)&&e<n?e=n:h(a)&&e>a&&(e=a),this._d=new Date(e.getTime()),f(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),p(this._o.field,\"change\",{firedBy:this})),t||\"function\"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())}},clear:function(){this.setDate(null)},gotoDate:function(e){var t=!0;if(h(e)){if(this.calendars){var n=new Date(this.calendars[0].year,this.calendars[0].month,1),a=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();a.setMonth(a.getMonth()+1),a.setDate(a.getDate()-1),t=i<n.getTime()||a.getTime()<i}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],\"right\"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(e,t){var n,a=this.getDate()||new Date,i=24*parseInt(t)*60*60*1e3;\"add\"===e?n=new Date(a.valueOf()+i):\"subtract\"===e&&(n=new Date(a.valueOf()-i)),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=y(this.calendars[0]);for(var e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=y({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(f(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=D.minDate,this._o.minYear=D.minYear,this._o.minMonth=D.minMonth,this._o.startRange=D.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(f(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=D.maxDate,this._o.maxYear=D.maxYear,this._o.maxMonth=D.maxMonth,this._o.endRange=D.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(this._v||e){var t,n=this._o,a=n.minYear,i=n.maxYear,s=n.minMonth,o=n.maxMonth,r=\"\";this._y<=a&&(this._y=a,!isNaN(s)&&this._m<s&&(this._m=s)),this._y>=i&&(this._y=i,!isNaN(o)&&this._m>o&&(this._m=o));for(var l=0;l<n.numberOfMonths;l++)t=\"pika-title-\"+Math.random().toString(36).replace(/[^a-z]+/g,\"\").substr(0,2),r+='<div class=\"pika-lendar\">'+k(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t)+\"</div>\";this.el.innerHTML=r,n.bound&&\"hidden\"!==n.field.type&&setTimeout(function(){n.trigger.focus()},1),\"function\"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute(\"aria-label\",n.ariaLabel)}},adjustPosition:function(){var e,t,n,a,i,s,l,h,d,u,c,f;if(!this._o.container){if(this.el.style.position=\"absolute\",t=e=this._o.trigger,n=this.el.offsetWidth,a=this.el.offsetHeight,i=window.innerWidth||document.documentElement.clientWidth,s=window.innerHeight||document.documentElement.clientHeight,l=window.pageYOffset||document.body.scrollTop||document.documentElement.scrollTop,c=!0,f=!0,\"function\"==typeof e.getBoundingClientRect)h=(u=e.getBoundingClientRect()).left+window.pageXOffset,d=u.bottom+window.pageYOffset;else for(h=t.offsetLeft,d=t.offsetTop+t.offsetHeight;t=t.offsetParent;)h+=t.offsetLeft,d+=t.offsetTop;(this._o.reposition&&h+n>i||this._o.position.indexOf(\"right\")>-1&&h-n+e.offsetWidth>0)&&(h=h-n+e.offsetWidth,c=!1),(this._o.reposition&&d+a>s+l||this._o.position.indexOf(\"top\")>-1&&d-a-e.offsetHeight>0)&&(d=d-a-e.offsetHeight,f=!1),this.el.style.left=h+\"px\",this.el.style.top=d+\"px\",o(this.el,c?\"left-aligned\":\"right-aligned\"),o(this.el,f?\"bottom-aligned\":\"top-aligned\"),r(this.el,c?\"right-aligned\":\"left-aligned\"),r(this.el,f?\"top-aligned\":\"bottom-aligned\")}},render:function(e,t,n){var a=this._o,i=new Date,s=c(e,t),o=new Date(e,t,1).getDay(),r=[],l=[];f(i),a.firstDay>0&&(o-=a.firstDay)<0&&(o+=7);for(var u=0===t?11:t-1,m=11===t?0:t+1,p=0===t?e-1:e,y=11===t?e+1:e,D=c(p,u),b=s+o,k=b;k>7;)k-=7;b+=7-k;for(var x=!1,R=0,N=0;R<b;R++){var S=new Date(e,t,R-o+1),T=!!h(this._d)&&g(S,this._d),C=g(S,i),I=-1!==a.events.indexOf(S.toDateString()),Y=R<o||R>=s+o,O=R-o+1,E=t,j=e,F=a.startRange&&g(a.startRange,S),W=a.endRange&&g(a.endRange,S),A=a.startRange&&a.endRange&&a.startRange<S&&S<a.endRange;Y&&(R<o?(O=D+O,E=u,j=p):(O-=s,E=m,j=y));var L={day:O,month:E,year:j,hasEvent:I,isSelected:T,isToday:C,isDisabled:a.minDate&&S<a.minDate||a.maxDate&&S>a.maxDate||a.disableWeekends&&d(S)||a.disableDayFn&&a.disableDayFn(S),isEmpty:Y,isStartRange:F,isEndRange:W,isInRange:A,showDaysInNextAndPreviousMonths:a.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:a.enableSelectionDaysInNextAndPreviousMonths};a.pickWholeWeek&&T&&(x=!0),l.push(_(L)),7==++N&&(a.showWeekNumber&&l.unshift(v(R-o,t,e)),r.push(w(l,a.isRTL,a.pickWholeWeek,x)),l=[],N=0,x=!1)}return M(a,r,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),r(this.el,\"is-hidden\"),this._o.bound&&(a(document,\"click\",this._onClick),this.adjustPosition()),\"function\"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){var e=this._v;!1!==e&&(this._o.bound&&i(document,\"click\",this._onClick),this.el.style.position=\"static\",this.el.style.left=\"auto\",this.el.style.top=\"auto\",o(this.el,\"is-hidden\"),this._v=!1,void 0!==e&&\"function\"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){var e=this._o;this.hide(),i(this.el,\"mousedown\",this._onMouseDown,!0),i(this.el,\"touchend\",this._onMouseDown,!0),i(this.el,\"change\",this._onChange),e.keyboardInput&&i(document,\"keydown\",this._onKeyChange),e.field&&(i(e.field,\"change\",this._onInputChange),e.bound&&(i(e.trigger,\"click\",this._onInputClick),i(e.trigger,\"focus\",this._onInputFocus),i(e.trigger,\"blur\",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}},t.exports=x},\n", | |
" 490: function _(n,o,t){n(164),n(163).styles.append('.bk-root {\\n @charset \"UTF-8\";\\n /*!\\n * Pikaday\\n * Copyright © 2014 David Bushell | BSD & MIT license | https://dbushell.com/\\n */\\n /*\\nclear child float (pika-lendar), using the famous micro clearfix hack\\nhttp://nicolasgallagher.com/micro-clearfix-hack/\\n*/\\n /* styling for abbr */\\n}\\n.bk-root .pika-single {\\n z-index: 9999;\\n display: block;\\n position: relative;\\n color: #333;\\n background: #fff;\\n border: 1px solid #ccc;\\n border-bottom-color: #bbb;\\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\\n}\\n.bk-root .pika-single:before,\\n.bk-root .pika-single:after {\\n content: \" \";\\n display: table;\\n}\\n.bk-root .pika-single:after {\\n clear: both;\\n}\\n.bk-root .pika-single.is-hidden {\\n display: none;\\n}\\n.bk-root .pika-single.is-bound {\\n position: absolute;\\n box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.5);\\n}\\n.bk-root .pika-lendar {\\n float: left;\\n width: 240px;\\n margin: 8px;\\n}\\n.bk-root .pika-title {\\n position: relative;\\n text-align: center;\\n}\\n.bk-root .pika-label {\\n display: inline-block;\\n position: relative;\\n z-index: 9999;\\n overflow: hidden;\\n margin: 0;\\n padding: 5px 3px;\\n font-size: 14px;\\n line-height: 20px;\\n font-weight: bold;\\n background-color: #fff;\\n}\\n.bk-root .pika-title select {\\n cursor: pointer;\\n position: absolute;\\n z-index: 9998;\\n margin: 0;\\n left: 0;\\n top: 5px;\\n opacity: 0;\\n}\\n.bk-root .pika-prev,\\n.bk-root .pika-next {\\n display: block;\\n cursor: pointer;\\n position: relative;\\n outline: none;\\n border: 0;\\n padding: 0;\\n width: 20px;\\n height: 30px;\\n /* hide text using text-indent trick, using width value (it\\'s enough) */\\n text-indent: 20px;\\n white-space: nowrap;\\n overflow: hidden;\\n background-color: transparent;\\n background-position: center center;\\n background-repeat: no-repeat;\\n background-size: 75% 75%;\\n opacity: 0.5;\\n}\\n.bk-root .pika-prev:hover,\\n.bk-root .pika-next:hover {\\n opacity: 1;\\n}\\n.bk-root .pika-prev,\\n.bk-root .is-rtl .pika-next {\\n float: left;\\n background-image: url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAUklEQVR42u3VMQoAIBADQf8Pgj+OD9hG2CtONJB2ymQkKe0HbwAP0xucDiQWARITIDEBEnMgMQ8S8+AqBIl6kKgHiXqQqAeJepBo/z38J/U0uAHlaBkBl9I4GwAAAABJRU5ErkJggg==\\');\\n}\\n.bk-root .pika-next,\\n.bk-root .is-rtl .pika-prev {\\n float: right;\\n background-image: url(\\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAeCAYAAAAsEj5rAAAAU0lEQVR42u3VOwoAMAgE0dwfAnNjU26bYkBCFGwfiL9VVWoO+BJ4Gf3gtsEKKoFBNTCoCAYVwaAiGNQGMUHMkjGbgjk2mIONuXo0nC8XnCf1JXgArVIZAQh5TKYAAAAASUVORK5CYII=\\');\\n}\\n.bk-root .pika-prev.is-disabled,\\n.bk-root .pika-next.is-disabled {\\n cursor: default;\\n opacity: 0.2;\\n}\\n.bk-root .pika-select {\\n display: inline-block;\\n}\\n.bk-root .pika-table {\\n width: 100%;\\n border-collapse: collapse;\\n border-spacing: 0;\\n border: 0;\\n}\\n.bk-root .pika-table th,\\n.bk-root .pika-table td {\\n width: 14.28571429%;\\n padding: 0;\\n}\\n.bk-root .pika-table th {\\n color: #999;\\n font-size: 12px;\\n line-height: 25px;\\n font-weight: bold;\\n text-align: center;\\n}\\n.bk-root .pika-button {\\n cursor: pointer;\\n display: block;\\n box-sizing: border-box;\\n -moz-box-sizing: border-box;\\n outline: none;\\n border: 0;\\n margin: 0;\\n width: 100%;\\n padding: 5px;\\n color: #666;\\n font-size: 12px;\\n line-height: 15px;\\n text-align: right;\\n background: #f5f5f5;\\n}\\n.bk-root .pika-week {\\n font-size: 11px;\\n color: #999;\\n}\\n.bk-root .is-today .pika-button {\\n color: #33aaff;\\n font-weight: bold;\\n}\\n.bk-root .is-selected .pika-button,\\n.bk-root .has-event .pika-button {\\n color: #fff;\\n font-weight: bold;\\n background: #33aaff;\\n box-shadow: inset 0 1px 3px #178fe5;\\n border-radius: 3px;\\n}\\n.bk-root .has-event .pika-button {\\n background: #005da9;\\n box-shadow: inset 0 1px 3px #0076c9;\\n}\\n.bk-root .is-disabled .pika-button,\\n.bk-root .is-inrange .pika-button {\\n background: #D5E9F7;\\n}\\n.bk-root .is-startrange .pika-button {\\n color: #fff;\\n background: #6CB31D;\\n box-shadow: none;\\n border-radius: 3px;\\n}\\n.bk-root .is-endrange .pika-button {\\n color: #fff;\\n background: #33aaff;\\n box-shadow: none;\\n border-radius: 3px;\\n}\\n.bk-root .is-disabled .pika-button {\\n pointer-events: none;\\n cursor: default;\\n color: #999;\\n opacity: 0.3;\\n}\\n.bk-root .is-outside-current-month .pika-button {\\n color: #999;\\n opacity: 0.3;\\n}\\n.bk-root .is-selection-disabled {\\n pointer-events: none;\\n cursor: default;\\n}\\n.bk-root .pika-button:hover,\\n.bk-root .pika-row.pick-whole-week:hover .pika-button {\\n color: #fff;\\n background: #ff8000;\\n box-shadow: none;\\n border-radius: 3px;\\n}\\n.bk-root .pika-table abbr {\\n border-bottom: none;\\n cursor: help;\\n}\\n')},\n", | |
" 491: function _(e,t,n){var r=e(113),i=e(252),a=e(492),_=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(a.AbstractRangeSliderView);n.DateRangeSliderView=_,_.__name__=\"DateRangeSliderView\";var o=function(e){function t(t){var n=e.call(this,t)||this;return n.behaviour=\"drag\",n.connected=[!1,!0,!1],n}return r.__extends(t,e),t.init_DateRangeSlider=function(){this.prototype.default_view=_,this.override({format:\"%d %b %Y\"})},t.prototype._formatter=function(e,t){return i(e,t)},t}(a.AbstractSlider);n.DateRangeSlider=o,o.__name__=\"DateRangeSlider\",o.init_DateRangeSlider()},\n", | |
" 492: function _(t,e,i){var l=t(113),r=t(493),n=t(121),o=t(163),s=t(110),a=t(119),c=t(475),d=t(494),h=\"bk-noUi-\",_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l.__extends(e,t),Object.defineProperty(e.prototype,\"noUiSlider\",{get:function(){return this.slider_el.noUiSlider},enumerable:!0,configurable:!0}),e.prototype.initialize=function(){t.prototype.initialize.call(this),this._init_callback()},e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this);var i=this.model.properties,l=i.callback,r=i.callback_policy,n=i.callback_throttle;this.on_change([l,r,n],function(){return e._init_callback()});var o=this.model.properties,s=o.start,a=o.end,c=o.value,d=o.step,h=o.title;this.on_change([s,a,c,d],function(){var t=e._calc_to(),i=t.start,l=t.end,r=t.value,n=t.step;e.noUiSlider.updateOptions({range:{min:i,max:l},start:r,step:n})});var _=this.model.properties.bar_color;this.on_change(_,function(){e._set_bar_color()}),this.on_change([c,h],function(){return e._update_title()})},e.prototype._init_callback=function(){var t=this,e=this.model.callback,i=function(){null!=e&&e.execute(t.model),t.model.value_throttled=t.model.value};switch(this.model.callback_policy){case\"continuous\":this.callback_wrapper=i;break;case\"throttle\":this.callback_wrapper=a.throttle(i,this.model.callback_throttle);break;default:this.callback_wrapper=void 0}},e.prototype._update_title=function(){var t=this;o.empty(this.title_el);var e=null==this.model.title||0==this.model.title.length&&!this.model.show_value;if(this.title_el.style.display=e?\"none\":\"\",!e&&(0!=this.model.title.length&&(this.title_el.textContent=this.model.title+\": \"),this.model.show_value)){var i=this._calc_to().value.map(function(e){return t.model.pretty(e)}).join(\" .. \");this.title_el.appendChild(o.span({class:d.bk_slider_value},i))}},e.prototype._set_bar_color=function(){this.model.disabled||(this.slider_el.querySelector(\".bk-noUi-connect\").style.backgroundColor=this.model.bar_color)},e.prototype._keypress_handle=function(t,e){void 0===e&&(e=0);var i=this._calc_to(),l=i.start,r=i.value,n=i.end,o=i.step,s=2==r.length,a=l,c=n;switch(s&&0==e?c=r[1]:s&&1==e&&(a=r[0]),t.which){case 37:r[e]=Math.max(r[e]-o,a);break;case 39:r[e]=Math.min(r[e]+o,c);break;default:return}s?(this.model.value=r,this.model.properties.value.change.emit()):this.model.value=r[0],this.noUiSlider.set(r),null!=this.callback_wrapper&&this.callback_wrapper()},e.prototype.render=function(){var e=this;t.prototype.render.call(this);var i,l=this._calc_to(),n=l.start,a=l.end,c=l.value,_=l.step;if(this.model.tooltips){var u={to:function(t){return e.model.pretty(t)}};i=s.repeat(u,c.length)}else i=!1;if(null==this.slider_el){this.slider_el=o.div(),r.create(this.slider_el,{cssPrefix:h,range:{min:n,max:a},start:c,step:_,behaviour:this.model.behaviour,connect:this.model.connected,tooltips:i,orientation:this.model.orientation,direction:this.model.direction}),this.noUiSlider.on(\"slide\",function(t,i,l){return e._slide(l)}),this.noUiSlider.on(\"change\",function(t,i,l){return e._change(l)}),this._set_keypress_handles();var p=function(t,l){i&&(e.slider_el.querySelectorAll(\".bk-noUi-handle\")[t].querySelector(\".bk-noUi-tooltip\").style.display=l?\"block\":\"\")};this.noUiSlider.on(\"start\",function(t,e){return p(e,!0)}),this.noUiSlider.on(\"end\",function(t,e){return p(e,!1)})}else this.noUiSlider.updateOptions({range:{min:n,max:a},start:c,step:_});this._set_bar_color(),this.model.disabled?this.slider_el.setAttribute(\"disabled\",\"true\"):this.slider_el.removeAttribute(\"disabled\"),this.title_el=o.div({class:d.bk_slider_title}),this._update_title(),this.group_el=o.div({class:d.bk_input_group},this.title_el,this.slider_el),this.el.appendChild(this.group_el)},e.prototype._slide=function(t){this.model.value=this._calc_from(t),null!=this.callback_wrapper&&this.callback_wrapper()},e.prototype._change=function(t){switch(this.model.value=this._calc_from(t),this.model.value_throttled=this.model.value,this.model.callback_policy){case\"mouseup\":case\"throttle\":null!=this.model.callback&&this.model.callback.execute(this.model)}},e}(c.ControlView);_.__name__=\"AbstractBaseSliderView\";var u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l.__extends(e,t),e.prototype._calc_to=function(){return{start:this.model.start,end:this.model.end,value:[this.model.value],step:this.model.step}},e.prototype._calc_from=function(t){var e=t[0];return Number.isInteger(this.model.start)&&Number.isInteger(this.model.end)&&Number.isInteger(this.model.step)?Math.round(e):e},e.prototype._set_keypress_handles=function(){var t=this,e=this.slider_el.querySelector(\".bk-noUi-handle\");e.setAttribute(\"tabindex\",\"0\"),e.addEventListener(\"keydown\",function(e){return t._keypress_handle(e)})},e}(_);i.AbstractSliderView=u,u.__name__=\"AbstractSliderView\";var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l.__extends(e,t),e.prototype._calc_to=function(){return{start:this.model.start,end:this.model.end,value:this.model.value,step:this.model.step}},e.prototype._calc_from=function(t){return t},e.prototype._set_keypress_handles=function(){var t=this,e=this.slider_el.querySelector(\".bk-noUi-handle-lower\"),i=this.slider_el.querySelector(\".bk-noUi-handle-upper\");e.setAttribute(\"tabindex\",\"0\"),e.addEventListener(\"keydown\",function(e){return t._keypress_handle(e,0)}),i.setAttribute(\"tabindex\",\"1\"),i.addEventListener(\"keydown\",function(e){return t._keypress_handle(e,1)})},e}(_);i.AbstractRangeSliderView=p,p.__name__=\"AbstractRangeSliderView\";var m=function(t){function e(e){var i=t.call(this,e)||this;return i.connected=!1,i}return l.__extends(e,t),e.init_AbstractSlider=function(){this.define({title:[n.String,\"\"],show_value:[n.Boolean,!0],start:[n.Any],end:[n.Any],value:[n.Any],value_throttled:[n.Any],step:[n.Number,1],format:[n.String],direction:[n.Any,\"ltr\"],tooltips:[n.Boolean,!0],callback:[n.Any],callback_throttle:[n.Number,200],callback_policy:[n.SliderCallbackPolicy,\"throttle\"],bar_color:[n.Color,\"#e6e6e6\"]})},e.prototype._formatter=function(t,e){return\"\"+t},e.prototype.pretty=function(t){return this._formatter(t,this.format)},e}(c.Control);i.AbstractSlider=m,m.__name__=\"AbstractSlider\",m.init_AbstractSlider()},\n", | |
" 493: function _(t,e,r){\n", | |
" /*! nouislider - 10.1.0 - 2017-07-28 17:11:18 */var n;n=function(){\"use strict\";var t=\"10.1.0\";function e(t){t.preventDefault()}function r(t){return\"number\"==typeof t&&!isNaN(t)&&isFinite(t)}function n(t,e,r){r>0&&(s(t,e),setTimeout(function(){a(t,e)},r))}function i(t){return Array.isArray(t)?t:[t]}function o(t){var e=(t=String(t)).split(\".\");return e.length>1?e[1].length:0}function s(t,e){t.classList?t.classList.add(e):t.className+=\" \"+e}function a(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp(\"(^|\\\\b)\"+e.split(\" \").join(\"|\")+\"(\\\\b|$)\",\"gi\"),\" \")}function l(t){var e=void 0!==window.pageXOffset,r=\"CSS1Compat\"===(t.compatMode||\"\");return{x:e?window.pageXOffset:r?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:r?t.documentElement.scrollTop:t.body.scrollTop}}function u(t,e){return 100/(e-t)}function c(t,e){return 100*e/(t[1]-t[0])}function p(t,e){for(var r=1;t>=e[r];)r+=1;return r}function f(t,e,r){if(r>=t.slice(-1)[0])return 100;var n,i,o,s,a=p(r,t);return n=t[a-1],i=t[a],o=e[a-1],s=e[a],o+function(t,e){return c(t,t[0]<0?e+Math.abs(t[0]):e-t[0])}([n,i],r)/u(o,s)}function d(t,e,r,n){if(100===n)return n;var i,o,s=p(n,t);return r?n-(i=t[s-1])>((o=t[s])-i)/2?o:i:e[s-1]?t[s-1]+function(t,e){return Math.round(t/e)*e}(n-t[s-1],e[s-1]):n}function h(e,n,i){var o;if(\"number\"==typeof n&&(n=[n]),\"[object Array]\"!==Object.prototype.toString.call(n))throw new Error(\"noUiSlider (\"+t+\"): 'range' contains invalid value.\");if(!r(o=\"min\"===e?0:\"max\"===e?100:parseFloat(e))||!r(n[0]))throw new Error(\"noUiSlider (\"+t+\"): 'range' value isn't numeric.\");i.xPct.push(o),i.xVal.push(n[0]),o?i.xSteps.push(!isNaN(n[1])&&n[1]):isNaN(n[1])||(i.xSteps[0]=n[1]),i.xHighestCompleteStep.push(0)}function m(t,e,r){if(!e)return!0;r.xSteps[t]=c([r.xVal[t],r.xVal[t+1]],e)/u(r.xPct[t],r.xPct[t+1]);var n=(r.xVal[t+1]-r.xVal[t])/r.xNumSteps[t],i=Math.ceil(Number(n.toFixed(3))-1),o=r.xVal[t]+r.xNumSteps[t]*i;r.xHighestCompleteStep[t]=o}function g(t,e,r){this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e;var n,i=[];for(n in t)t.hasOwnProperty(n)&&i.push([t[n],n]);for(i.length&&\"object\"==typeof i[0][0]?i.sort(function(t,e){return t[0][0]-e[0][0]}):i.sort(function(t,e){return t[0]-e[0]}),n=0;n<i.length;n++)h(i[n][1],i[n][0],this);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)m(n,this.xNumSteps[n],this)}g.prototype.getMargin=function(e){var r=this.xNumSteps[0];if(r&&e/r%1!=0)throw new Error(\"noUiSlider (\"+t+\"): 'limit', 'margin' and 'padding' must be divisible by step.\");return 2===this.xPct.length&&c(this.xVal,e)},g.prototype.toStepping=function(t){return t=f(this.xVal,this.xPct,t)},g.prototype.fromStepping=function(t){return function(t,e,r){if(r>=100)return t.slice(-1)[0];var n,i=p(r,e);return function(t,e){return e*(t[1]-t[0])/100+t[0]}([t[i-1],t[i]],(r-(n=e[i-1]))*u(n,e[i]))}(this.xVal,this.xPct,t)},g.prototype.getStep=function(t){return t=d(this.xPct,this.xSteps,this.snap,t)},g.prototype.getNearbySteps=function(t){var e=p(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},g.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(o);return Math.max.apply(null,t)},g.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var v={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};function b(e){if(function(t){return\"object\"==typeof t&&\"function\"==typeof t.to&&\"function\"==typeof t.from}(e))return!0;throw new Error(\"noUiSlider (\"+t+\"): 'format' requires 'to' and 'from' methods.\")}function S(e,n){if(!r(n))throw new Error(\"noUiSlider (\"+t+\"): 'step' is not numeric.\");e.singleStep=n}function w(e,r){if(\"object\"!=typeof r||Array.isArray(r))throw new Error(\"noUiSlider (\"+t+\"): 'range' is not an object.\");if(void 0===r.min||void 0===r.max)throw new Error(\"noUiSlider (\"+t+\"): Missing 'min' or 'max' in 'range'.\");if(r.min===r.max)throw new Error(\"noUiSlider (\"+t+\"): 'range' 'min' and 'max' cannot be equal.\");e.spectrum=new g(r,e.snap,e.singleStep)}function x(e,r){if(r=i(r),!Array.isArray(r)||!r.length)throw new Error(\"noUiSlider (\"+t+\"): 'start' option is incorrect.\");e.handles=r.length,e.start=r}function y(e,r){if(e.snap=r,\"boolean\"!=typeof r)throw new Error(\"noUiSlider (\"+t+\"): 'snap' option must be a boolean.\")}function E(e,r){if(e.animate=r,\"boolean\"!=typeof r)throw new Error(\"noUiSlider (\"+t+\"): 'animate' option must be a boolean.\")}function C(e,r){if(e.animationDuration=r,\"number\"!=typeof r)throw new Error(\"noUiSlider (\"+t+\"): 'animationDuration' option must be a number.\")}function N(e,r){var n,i=[!1];if(\"lower\"===r?r=[!0,!1]:\"upper\"===r&&(r=[!1,!0]),!0===r||!1===r){for(n=1;n<e.handles;n++)i.push(r);i.push(!1)}else{if(!Array.isArray(r)||!r.length||r.length!==e.handles+1)throw new Error(\"noUiSlider (\"+t+\"): 'connect' option doesn't match handle count.\");i=r}e.connect=i}function U(e,r){switch(r){case\"horizontal\":e.ort=0;break;case\"vertical\":e.ort=1;break;default:throw new Error(\"noUiSlider (\"+t+\"): 'orientation' option is invalid.\")}}function P(e,n){if(!r(n))throw new Error(\"noUiSlider (\"+t+\"): 'margin' option must be numeric.\");if(0!==n&&(e.margin=e.spectrum.getMargin(n),!e.margin))throw new Error(\"noUiSlider (\"+t+\"): 'margin' option is only supported on linear sliders.\")}function A(e,n){if(!r(n))throw new Error(\"noUiSlider (\"+t+\"): 'limit' option must be numeric.\");if(e.limit=e.spectrum.getMargin(n),!e.limit||e.handles<2)throw new Error(\"noUiSlider (\"+t+\"): 'limit' option is only supported on linear sliders with 2 or more handles.\")}function M(e,n){if(!r(n))throw new Error(\"noUiSlider (\"+t+\"): 'padding' option must be numeric.\");if(0!==n){if(e.padding=e.spectrum.getMargin(n),!e.padding)throw new Error(\"noUiSlider (\"+t+\"): 'padding' option is only supported on linear sliders.\");if(e.padding<0)throw new Error(\"noUiSlider (\"+t+\"): 'padding' option must be a positive number.\");if(e.padding>=50)throw new Error(\"noUiSlider (\"+t+\"): 'padding' option must be less than half the range.\")}}function O(e,r){switch(r){case\"ltr\":e.dir=0;break;case\"rtl\":e.dir=1;break;default:throw new Error(\"noUiSlider (\"+t+\"): 'direction' option was not recognized.\")}}function k(e,r){if(\"string\"!=typeof r)throw new Error(\"noUiSlider (\"+t+\"): 'behaviour' must be a string containing options.\");var n=r.indexOf(\"tap\")>=0,i=r.indexOf(\"drag\")>=0,o=r.indexOf(\"fixed\")>=0,s=r.indexOf(\"snap\")>=0,a=r.indexOf(\"hover\")>=0;if(o){if(2!==e.handles)throw new Error(\"noUiSlider (\"+t+\"): 'fixed' behaviour must be used with 2 handles\");P(e,e.start[1]-e.start[0])}e.events={tap:n||s,drag:i,fixed:o,snap:s,hover:a}}function V(e,r){if(e.multitouch=r,\"boolean\"!=typeof r)throw new Error(\"noUiSlider (\"+t+\"): 'multitouch' option must be a boolean.\")}function F(e,r){if(!1!==r)if(!0===r){e.tooltips=[];for(var n=0;n<e.handles;n++)e.tooltips.push(!0)}else{if(e.tooltips=i(r),e.tooltips.length!==e.handles)throw new Error(\"noUiSlider (\"+t+\"): must pass a formatter for all handles.\");e.tooltips.forEach(function(e){if(\"boolean\"!=typeof e&&(\"object\"!=typeof e||\"function\"!=typeof e.to))throw new Error(\"noUiSlider (\"+t+\"): 'tooltips' must be passed a formatter or 'false'.\")})}}function L(t,e){t.ariaFormat=e,b(e)}function z(t,e){t.format=e,b(e)}function j(e,r){if(void 0!==r&&\"string\"!=typeof r&&!1!==r)throw new Error(\"noUiSlider (\"+t+\"): 'cssPrefix' must be a string or `false`.\");e.cssPrefix=r}function H(e,r){if(void 0!==r&&\"object\"!=typeof r)throw new Error(\"noUiSlider (\"+t+\"): 'cssClasses' must be an object.\");if(\"string\"==typeof e.cssPrefix)for(var n in e.cssClasses={},r)r.hasOwnProperty(n)&&(e.cssClasses[n]=e.cssPrefix+r[n]);else e.cssClasses=r}function D(e,r){if(!0!==r&&!1!==r)throw new Error(\"noUiSlider (\"+t+\"): 'useRequestAnimationFrame' option should be true (default) or false.\");e.useRequestAnimationFrame=r}function q(e){var r={margin:0,limit:0,padding:0,animate:!0,animationDuration:300,ariaFormat:v,format:v},n={step:{r:!1,t:S},start:{r:!0,t:x},connect:{r:!0,t:N},direction:{r:!0,t:O},snap:{r:!1,t:y},animate:{r:!1,t:E},animationDuration:{r:!1,t:C},range:{r:!0,t:w},orientation:{r:!1,t:U},margin:{r:!1,t:P},limit:{r:!1,t:A},padding:{r:!1,t:M},behaviour:{r:!0,t:k},multitouch:{r:!0,t:V},ariaFormat:{r:!1,t:L},format:{r:!1,t:z},tooltips:{r:!1,t:F},cssPrefix:{r:!1,t:j},cssClasses:{r:!1,t:H},useRequestAnimationFrame:{r:!1,t:D}},i={connect:!1,direction:\"ltr\",behaviour:\"tap\",multitouch:!1,orientation:\"horizontal\",cssPrefix:\"noUi-\",cssClasses:{target:\"target\",base:\"base\",origin:\"origin\",handle:\"handle\",handleLower:\"handle-lower\",handleUpper:\"handle-upper\",horizontal:\"horizontal\",vertical:\"vertical\",background:\"background\",connect:\"connect\",ltr:\"ltr\",rtl:\"rtl\",draggable:\"draggable\",drag:\"state-drag\",tap:\"state-tap\",active:\"active\",tooltip:\"tooltip\",pips:\"pips\",pipsHorizontal:\"pips-horizontal\",pipsVertical:\"pips-vertical\",marker:\"marker\",markerHorizontal:\"marker-horizontal\",markerVertical:\"marker-vertical\",markerNormal:\"marker-normal\",markerLarge:\"marker-large\",markerSub:\"marker-sub\",value:\"value\",valueHorizontal:\"value-horizontal\",valueVertical:\"value-vertical\",valueNormal:\"value-normal\",valueLarge:\"value-large\",valueSub:\"value-sub\"},useRequestAnimationFrame:!0};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(n).forEach(function(o){if(void 0===e[o]&&void 0===i[o]){if(n[o].r)throw new Error(\"noUiSlider (\"+t+\"): '\"+o+\"' is required.\");return!0}n[o].t(r,void 0===e[o]?i[o]:e[o])}),r.pips=e.pips;var o=[[\"left\",\"top\"],[\"right\",\"bottom\"]];return r.style=o[r.dir][r.ort],r.styleOposite=o[r.dir?0:1][r.ort],r}function T(r,o,u){var c,p,f,d,h,m,g,v=window.navigator.pointerEnabled?{start:\"pointerdown\",move:\"pointermove\",end:\"pointerup\"}:window.navigator.msPointerEnabled?{start:\"MSPointerDown\",move:\"MSPointerMove\",end:\"MSPointerUp\"}:{start:\"mousedown touchstart\",move:\"mousemove touchmove\",end:\"mouseup touchend\"},b=window.CSS&&CSS.supports&&CSS.supports(\"touch-action\",\"none\")&&function(){var t=!1;try{var e=Object.defineProperty({},\"passive\",{get:function(){t=!0}});window.addEventListener(\"test\",null,e)}catch(t){}return t}(),S=r,w=[],x=[],y=0,E=o.spectrum,C=[],N={},U=r.ownerDocument,P=U.documentElement,A=U.body;function M(t,e){var r=U.createElement(\"div\");return e&&s(r,e),t.appendChild(r),r}function O(t,e){var r=M(t,o.cssClasses.origin),n=M(r,o.cssClasses.handle);return n.setAttribute(\"data-handle\",e),n.setAttribute(\"tabindex\",\"0\"),n.setAttribute(\"role\",\"slider\"),n.setAttribute(\"aria-orientation\",o.ort?\"vertical\":\"horizontal\"),0===e?s(n,o.cssClasses.handleLower):e===o.handles-1&&s(n,o.cssClasses.handleUpper),r}function k(t,e){return!!e&&M(t,o.cssClasses.connect)}function V(t,e){return!!o.tooltips[e]&&M(t.firstChild,o.cssClasses.tooltip)}function F(t,e,r){var n=U.createElement(\"div\"),i=[o.cssClasses.valueNormal,o.cssClasses.valueLarge,o.cssClasses.valueSub],a=[o.cssClasses.markerNormal,o.cssClasses.markerLarge,o.cssClasses.markerSub],l=[o.cssClasses.valueHorizontal,o.cssClasses.valueVertical],u=[o.cssClasses.markerHorizontal,o.cssClasses.markerVertical];function c(t,e){var r=e===o.cssClasses.value,n=r?i:a;return e+\" \"+(r?l:u)[o.ort]+\" \"+n[t]}return s(n,o.cssClasses.pips),s(n,0===o.ort?o.cssClasses.pipsHorizontal:o.cssClasses.pipsVertical),Object.keys(t).forEach(function(i){!function(t,i){i[1]=i[1]&&e?e(i[0],i[1]):i[1];var s=M(n,!1);s.className=c(i[1],o.cssClasses.marker),s.style[o.style]=t+\"%\",i[1]&&((s=M(n,!1)).className=c(i[1],o.cssClasses.value),s.style[o.style]=t+\"%\",s.innerText=r.to(i[0]))}(i,t[i])}),n}function L(){var t;h&&((t=h).parentElement.removeChild(t),h=null)}function z(e){L();var r=e.mode,n=e.density||1,i=e.filter||!1,o=function(e,r,n){if(\"range\"===e||\"steps\"===e)return E.xVal;if(\"count\"===e){if(!r)throw new Error(\"noUiSlider (\"+t+\"): 'values' required for mode 'count'.\");var i,o=100/(r-1),s=0;for(r=[];(i=s++*o)<=100;)r.push(i);e=\"positions\"}return\"positions\"===e?r.map(function(t){return E.fromStepping(n?E.getStep(t):t)}):\"values\"===e?n?r.map(function(t){return E.fromStepping(E.getStep(E.toStepping(t)))}):r:void 0}(r,e.values||!1,e.stepped||!1),s=function(t,e,r){var n,i={},o=E.xVal[0],s=E.xVal[E.xVal.length-1],a=!1,l=!1,u=0;return n=r.slice().sort(function(t,e){return t-e}),(r=n.filter(function(t){return!this[t]&&(this[t]=!0)},{}))[0]!==o&&(r.unshift(o),a=!0),r[r.length-1]!==s&&(r.push(s),l=!0),r.forEach(function(n,o){var s,c,p,f,d,h,m,g,v,b=n,S=r[o+1];if(\"steps\"===e&&(s=E.xNumSteps[o]),s||(s=S-b),!1!==b&&void 0!==S)for(s=Math.max(s,1e-7),c=b;c<=S;c=(c+s).toFixed(7)/1){for(m=(d=(f=E.toStepping(c))-u)/t,v=d/(g=Math.round(m)),p=1;p<=g;p+=1)i[(u+p*v).toFixed(5)]=[\"x\",0];h=r.indexOf(c)>-1?1:\"steps\"===e?2:0,!o&&a&&(h=0),c===S&&l||(i[f.toFixed(5)]=[c,h]),u=f}}),i}(n,r,o),a=e.format||{to:Math.round};return h=S.appendChild(F(s,i,a))}function j(){var t=c.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][o.ort];return 0===o.ort?t.width||c[e]:t.height||c[e]}function H(t,e,r,n){var i=function(i){return!S.hasAttribute(\"disabled\")&&(s=S,a=o.cssClasses.tap,(s.classList?!s.classList.contains(a):!new RegExp(\"\\\\b\"+a+\"\\\\b\").test(s.className))&&(!!(i=function(t,e,r){var n,i,s=0===t.type.indexOf(\"touch\"),a=0===t.type.indexOf(\"mouse\"),u=0===t.type.indexOf(\"pointer\");0===t.type.indexOf(\"MSPointer\")&&(u=!0);if(s&&o.multitouch){var c=function(t){return t.target===r||r.contains(t.target)};if(\"touchstart\"===t.type){var p=Array.prototype.filter.call(t.touches,c);if(p.length>1)return!1;n=p[0].pageX,i=p[0].pageY}else{var f=Array.prototype.find.call(t.changedTouches,c);if(!f)return!1;n=f.pageX,i=f.pageY}}else if(s){if(t.touches.length>1)return!1;n=t.changedTouches[0].pageX,i=t.changedTouches[0].pageY}e=e||l(U),(a||u)&&(n=t.clientX+e.x,i=t.clientY+e.y);return t.pageOffset=e,t.points=[n,i],t.cursor=a||u,t}(i,n.pageOffset,n.target||e))&&(!(t===v.start&&void 0!==i.buttons&&i.buttons>1)&&((!n.hover||!i.buttons)&&(b||i.preventDefault(),i.calcPoint=i.points[o.ort],void r(i,n))))));var s,a},s=[];return t.split(\" \").forEach(function(t){e.addEventListener(t,i,!!b&&{passive:!0}),s.push([t,i])}),s}function D(t){var e,r,n,i,s,a,u=100*(t-(e=c,r=o.ort,n=e.getBoundingClientRect(),i=e.ownerDocument,s=i.documentElement,a=l(i),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(a.x=0),r?n.top+a.y-s.clientTop:n.left+a.x-s.clientLeft))/j();return o.dir?100-u:u}function T(t,e,r,n){var i=r.slice(),o=[!t,t],s=[t,!t];n=n.slice(),t&&n.reverse(),n.length>1?n.forEach(function(t,r){var n=$(i,t,i[t]+e,o[r],s[r],!1);!1===n?e=0:(e=n-i[t],i[t]=n)}):o=s=[!0];var a=!1;n.forEach(function(t,n){a=K(t,r[t]+e,o[n],s[n])||a}),a&&n.forEach(function(t){R(\"update\",t),R(\"slide\",t)})}function R(t,e,r){Object.keys(N).forEach(function(n){var i=n.split(\".\")[0];t===i&&N[n].forEach(function(t){t.call(d,C.map(o.format.to),e,C.slice(),r||!1,w.slice())})})}function X(t,e){\"mouseout\"===t.type&&\"HTML\"===t.target.nodeName&&null===t.relatedTarget&&Y(t,e)}function B(t,e){if(-1===navigator.appVersion.indexOf(\"MSIE 9\")&&0===t.buttons&&0!==e.buttonsProperty)return Y(t,e);var r=(o.dir?-1:1)*(t.calcPoint-e.startCalcPoint);T(r>0,100*r/e.baseSize,e.locations,e.handleNumbers)}function Y(t,r){r.handle&&(a(r.handle,o.cssClasses.active),y-=1),r.listeners.forEach(function(t){P.removeEventListener(t[0],t[1])}),0===y&&(a(S,o.cssClasses.drag),J(),t.cursor&&(A.style.cursor=\"\",A.removeEventListener(\"selectstart\",e))),r.handleNumbers.forEach(function(t){R(\"change\",t),R(\"set\",t),R(\"end\",t)})}function _(t,r){var n;if(1===r.handleNumbers.length){var i=p[r.handleNumbers[0]];if(i.hasAttribute(\"disabled\"))return!1;n=i.children[0],y+=1,s(n,o.cssClasses.active)}t.stopPropagation();var a=[],l=H(v.move,P,B,{target:t.target,handle:n,listeners:a,startCalcPoint:t.calcPoint,baseSize:j(),pageOffset:t.pageOffset,handleNumbers:r.handleNumbers,buttonsProperty:t.buttons,locations:w.slice()}),u=H(v.end,P,Y,{target:t.target,handle:n,listeners:a,handleNumbers:r.handleNumbers}),c=H(\"mouseout\",P,X,{target:t.target,handle:n,listeners:a,handleNumbers:r.handleNumbers});a.push.apply(a,l.concat(u,c)),t.cursor&&(A.style.cursor=getComputedStyle(t.target).cursor,p.length>1&&s(S,o.cssClasses.drag),A.addEventListener(\"selectstart\",e,!1)),r.handleNumbers.forEach(function(t){R(\"start\",t)})}function I(t){t.stopPropagation();var e=D(t.calcPoint),r=function(t){var e=100,r=!1;return p.forEach(function(n,i){if(!n.hasAttribute(\"disabled\")){var o=Math.abs(w[i]-t);o<e&&(r=i,e=o)}}),r}(e);if(!1===r)return!1;o.events.snap||n(S,o.cssClasses.tap,o.animationDuration),K(r,e,!0,!0),J(),R(\"slide\",r,!0),R(\"update\",r,!0),R(\"change\",r,!0),R(\"set\",r,!0),o.events.snap&&_(t,{handleNumbers:[r]})}function W(t){var e=D(t.calcPoint),r=E.getStep(e),n=E.fromStepping(r);Object.keys(N).forEach(function(t){\"hover\"===t.split(\".\")[0]&&N[t].forEach(function(t){t.call(d,n)})})}function $(t,e,r,n,i,s){var a;return p.length>1&&(n&&e>0&&(r=Math.max(r,t[e-1]+o.margin)),i&&e<p.length-1&&(r=Math.min(r,t[e+1]-o.margin))),p.length>1&&o.limit&&(n&&e>0&&(r=Math.min(r,t[e-1]+o.limit)),i&&e<p.length-1&&(r=Math.max(r,t[e+1]-o.limit))),o.padding&&(0===e&&(r=Math.max(r,o.padding)),e===p.length-1&&(r=Math.min(r,100-o.padding))),r=E.getStep(r),a=r,!((r=Math.max(Math.min(a,100),0))===t[e]&&!s)&&r}function G(t){return t+\"%\"}function J(){x.forEach(function(t){var e=w[t]>50?-1:1,r=3+(p.length+e*t);p[t].childNodes[0].style.zIndex=r})}function K(t,e,r,n){return!1!==(e=$(w,t,e,r,n,!1))&&(function(t,e){w[t]=e,C[t]=E.fromStepping(e);var r=function(){p[t].style[o.style]=G(e),Q(t),Q(t+1)};window.requestAnimationFrame&&o.useRequestAnimationFrame?window.requestAnimationFrame(r):r()}(t,e),!0)}function Q(t){if(f[t]){var e=0,r=100;0!==t&&(e=w[t-1]),t!==f.length-1&&(r=w[t]),f[t].style[o.style]=G(e),f[t].style[o.styleOposite]=G(100-r)}}function Z(t,e){null!==t&&!1!==t&&(\"number\"==typeof t&&(t=String(t)),!1===(t=o.format.from(t))||isNaN(t)||K(e,E.toStepping(t),!1,!1))}function tt(t,e){var r=i(t),s=void 0===w[0];e=void 0===e||!!e,r.forEach(Z),o.animate&&!s&&n(S,o.cssClasses.tap,o.animationDuration),x.forEach(function(t){K(t,w[t],!0,!1)}),J(),x.forEach(function(t){R(\"update\",t),null!==r[t]&&e&&R(\"set\",t)})}function et(){var t=C.map(o.format.to);return 1===t.length?t[0]:t}function rt(t,e){N[t]=N[t]||[],N[t].push(e),\"update\"===t.split(\".\")[0]&&p.forEach(function(t,e){R(\"update\",e)})}if(S.noUiSlider)throw new Error(\"noUiSlider (\"+t+\"): Slider was already initialized.\");return function(t){s(t,o.cssClasses.target),0===o.dir?s(t,o.cssClasses.ltr):s(t,o.cssClasses.rtl),0===o.ort?s(t,o.cssClasses.horizontal):s(t,o.cssClasses.vertical),c=M(t,o.cssClasses.base)}(S),function(t,e){p=[],(f=[]).push(k(e,t[0]));for(var r=0;r<o.handles;r++)p.push(O(e,r)),x[r]=r,f.push(k(e,t[r+1]))}(o.connect,c),d={destroy:function(){for(var t in o.cssClasses)o.cssClasses.hasOwnProperty(t)&&a(S,o.cssClasses[t]);for(;S.firstChild;)S.removeChild(S.firstChild);delete S.noUiSlider},steps:function(){return w.map(function(t,e){var r=E.getNearbySteps(t),n=C[e],i=r.thisStep.step,o=null;!1!==i&&n+i>r.stepAfter.startValue&&(i=r.stepAfter.startValue-n),o=n>r.thisStep.startValue?r.thisStep.step:!1!==r.stepBefore.step&&n-r.stepBefore.highestStep,100===t?i=null:0===t&&(o=null);var s=E.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,i]})},on:rt,off:function(t){var e=t&&t.split(\".\")[0],r=e&&t.substring(e.length);Object.keys(N).forEach(function(t){var n=t.split(\".\")[0],i=t.substring(n.length);e&&e!==n||r&&r!==i||delete N[t]})},get:et,set:tt,reset:function(t){tt(o.start,t)},__moveHandles:function(t,e,r){T(t,e,w,r)},options:u,updateOptions:function(t,e){var r=et(),n=[\"margin\",\"limit\",\"padding\",\"range\",\"animate\",\"snap\",\"step\",\"format\"];n.forEach(function(e){void 0!==t[e]&&(u[e]=t[e])});var i=q(u);n.forEach(function(e){void 0!==t[e]&&(o[e]=i[e])}),E=i.spectrum,o.margin=i.margin,o.limit=i.limit,o.padding=i.padding,o.pips&&z(o.pips),w=[],tt(t.start||r,e)},target:S,removePips:L,pips:z},(m=o.events).fixed||p.forEach(function(t,e){H(v.start,t.children[0],_,{handleNumbers:[e]})}),m.tap&&H(v.start,c,I,{}),m.hover&&H(v.move,c,W,{hover:!0}),m.drag&&f.forEach(function(t,e){if(!1!==t&&0!==e&&e!==f.length-1){var r=p[e-1],n=p[e],i=[t];s(t,o.cssClasses.draggable),m.fixed&&(i.push(r.children[0]),i.push(n.children[0])),i.forEach(function(t){H(v.start,t,_,{handles:[r,n],handleNumbers:[e-1,e]})})}}),tt(o.start),o.pips&&z(o.pips),o.tooltips&&(g=p.map(V),rt(\"update\",function(t,e,r){if(g[e]){var n=t[e];!0!==o.tooltips[e]&&(n=o.tooltips[e].to(r[e])),g[e].innerHTML=n}})),rt(\"update\",function(t,e,r,n,i){x.forEach(function(t){var e=p[t],n=$(w,t,0,!0,!0,!0),s=$(w,t,100,!0,!0,!0),a=i[t],l=o.ariaFormat.to(r[t]);e.children[0].setAttribute(\"aria-valuemin\",n.toFixed(1)),e.children[0].setAttribute(\"aria-valuemax\",s.toFixed(1)),e.children[0].setAttribute(\"aria-valuenow\",a.toFixed(1)),e.children[0].setAttribute(\"aria-valuetext\",l)})}),d}return{version:t,create:function(e,r){if(!e||!e.nodeName)throw new Error(\"noUiSlider (\"+t+\"): create requires a single element, got: \"+e);var n=T(e,q(r),r);return e.noUiSlider=n,n}}},\"function\"==typeof define&&define.amd?define([],n):\"object\"==typeof r?e.exports=n():window.noUiSlider=n()},\n", | |
" 494: function _(e,t,i){e(164),e(495),e(163).styles.append(\".bk-root .bk-slider-title {\\n white-space: nowrap;\\n}\\n.bk-root .bk-slider-value {\\n font-weight: 600;\\n}\\n\"),i.bk_slider_value=\"bk-slider-value\",i.bk_slider_title=\"bk-slider-title\",i.bk_input_group=\"bk-input-group\"},\n", | |
" 495: function _(n,o,t){n(164),n(163).styles.append('.bk-root {\\n /* Functional styling;\\n * These styles are required for noUiSlider to function.\\n * You don\\'t need to change these rules to apply your design.\\n */\\n /* Painting and performance;\\n * Browsers can paint handles in their own layer.\\n */\\n /* Slider size and handle placement;\\n */\\n /* Styling;\\n */\\n /* Handles and cursors;\\n */\\n /* Handle stripes;\\n */\\n /* Disabled state;\\n */\\n /* Base;\\n *\\n */\\n /* Values;\\n *\\n */\\n /* Markings;\\n *\\n */\\n /* Horizontal layout;\\n *\\n */\\n /* Vertical layout;\\n *\\n */\\n}\\n.bk-root .bk-noUi-target,\\n.bk-root .bk-noUi-target * {\\n -webkit-touch-callout: none;\\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\\n -webkit-user-select: none;\\n -ms-touch-action: none;\\n touch-action: none;\\n -ms-user-select: none;\\n -moz-user-select: none;\\n user-select: none;\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n.bk-root .bk-noUi-target {\\n position: relative;\\n direction: ltr;\\n}\\n.bk-root .bk-noUi-base {\\n width: 100%;\\n height: 100%;\\n position: relative;\\n z-index: 1;\\n /* Fix 401 */\\n}\\n.bk-root .bk-noUi-connect {\\n position: absolute;\\n right: 0;\\n top: 0;\\n left: 0;\\n bottom: 0;\\n}\\n.bk-root .bk-noUi-origin {\\n position: absolute;\\n height: 0;\\n width: 0;\\n}\\n.bk-root .bk-noUi-handle {\\n position: relative;\\n z-index: 1;\\n}\\n.bk-root .bk-noUi-state-tap .bk-noUi-connect,\\n.bk-root .bk-noUi-state-tap .bk-noUi-origin {\\n -webkit-transition: top 0.3s, right 0.3s, bottom 0.3s, left 0.3s;\\n transition: top 0.3s, right 0.3s, bottom 0.3s, left 0.3s;\\n}\\n.bk-root .bk-noUi-state-drag * {\\n cursor: inherit !important;\\n}\\n.bk-root .bk-noUi-base,\\n.bk-root .bk-noUi-handle {\\n -webkit-transform: translate3d(0, 0, 0);\\n transform: translate3d(0, 0, 0);\\n}\\n.bk-root .bk-noUi-horizontal {\\n height: 18px;\\n}\\n.bk-root .bk-noUi-horizontal .bk-noUi-handle {\\n width: 34px;\\n height: 28px;\\n left: -17px;\\n top: -6px;\\n}\\n.bk-root .bk-noUi-vertical {\\n width: 18px;\\n}\\n.bk-root .bk-noUi-vertical .bk-noUi-handle {\\n width: 28px;\\n height: 34px;\\n left: -6px;\\n top: -17px;\\n}\\n.bk-root .bk-noUi-target {\\n background: #FAFAFA;\\n border-radius: 4px;\\n border: 1px solid #D3D3D3;\\n box-shadow: inset 0 1px 1px #F0F0F0, 0 3px 6px -5px #BBB;\\n}\\n.bk-root .bk-noUi-connect {\\n background: #3FB8AF;\\n border-radius: 4px;\\n box-shadow: inset 0 0 3px rgba(51, 51, 51, 0.45);\\n -webkit-transition: background 450ms;\\n transition: background 450ms;\\n}\\n.bk-root .bk-noUi-draggable {\\n cursor: ew-resize;\\n}\\n.bk-root .bk-noUi-vertical .bk-noUi-draggable {\\n cursor: ns-resize;\\n}\\n.bk-root .bk-noUi-handle {\\n border: 1px solid #D9D9D9;\\n border-radius: 3px;\\n background: #FFF;\\n cursor: default;\\n box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #EBEBEB, 0 3px 6px -3px #BBB;\\n}\\n.bk-root .bk-noUi-active {\\n box-shadow: inset 0 0 1px #FFF, inset 0 1px 7px #DDD, 0 3px 6px -3px #BBB;\\n}\\n.bk-root .bk-noUi-handle:before,\\n.bk-root .bk-noUi-handle:after {\\n content: \"\";\\n display: block;\\n position: absolute;\\n height: 14px;\\n width: 1px;\\n background: #E8E7E6;\\n left: 14px;\\n top: 6px;\\n}\\n.bk-root .bk-noUi-handle:after {\\n left: 17px;\\n}\\n.bk-root .bk-noUi-vertical .bk-noUi-handle:before,\\n.bk-root .bk-noUi-vertical .bk-noUi-handle:after {\\n width: 14px;\\n height: 1px;\\n left: 6px;\\n top: 14px;\\n}\\n.bk-root .bk-noUi-vertical .bk-noUi-handle:after {\\n top: 17px;\\n}\\n.bk-root [disabled] .bk-noUi-connect {\\n background: #B8B8B8;\\n}\\n.bk-root [disabled].bk-noUi-target,\\n.bk-root [disabled].bk-noUi-handle,\\n.bk-root [disabled] .bk-noUi-handle {\\n cursor: not-allowed;\\n}\\n.bk-root .bk-noUi-pips,\\n.bk-root .bk-noUi-pips * {\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n.bk-root .bk-noUi-pips {\\n position: absolute;\\n color: #999;\\n}\\n.bk-root .bk-noUi-value {\\n position: absolute;\\n white-space: nowrap;\\n text-align: center;\\n}\\n.bk-root .bk-noUi-value-sub {\\n color: #ccc;\\n font-size: 10px;\\n}\\n.bk-root .bk-noUi-marker {\\n position: absolute;\\n background: #CCC;\\n}\\n.bk-root .bk-noUi-marker-sub {\\n background: #AAA;\\n}\\n.bk-root .bk-noUi-marker-large {\\n background: #AAA;\\n}\\n.bk-root .bk-noUi-pips-horizontal {\\n padding: 10px 0;\\n height: 80px;\\n top: 100%;\\n left: 0;\\n width: 100%;\\n}\\n.bk-root .bk-noUi-value-horizontal {\\n -webkit-transform: translate3d(-50%, 50%, 0);\\n transform: translate3d(-50%, 50%, 0);\\n}\\n.bk-root .bk-noUi-marker-horizontal.bk-noUi-marker {\\n margin-left: -1px;\\n width: 2px;\\n height: 5px;\\n}\\n.bk-root .bk-noUi-marker-horizontal.bk-noUi-marker-sub {\\n height: 10px;\\n}\\n.bk-root .bk-noUi-marker-horizontal.bk-noUi-marker-large {\\n height: 15px;\\n}\\n.bk-root .bk-noUi-pips-vertical {\\n padding: 0 10px;\\n height: 100%;\\n top: 0;\\n left: 100%;\\n}\\n.bk-root .bk-noUi-value-vertical {\\n -webkit-transform: translate3d(0, 50%, 0);\\n transform: translate3d(0, 50%, 0);\\n padding-left: 25px;\\n}\\n.bk-root .bk-noUi-marker-vertical.bk-noUi-marker {\\n width: 5px;\\n height: 2px;\\n margin-top: -1px;\\n}\\n.bk-root .bk-noUi-marker-vertical.bk-noUi-marker-sub {\\n width: 10px;\\n}\\n.bk-root .bk-noUi-marker-vertical.bk-noUi-marker-large {\\n width: 15px;\\n}\\n.bk-root .bk-noUi-tooltip {\\n display: block;\\n position: absolute;\\n border: 1px solid #D9D9D9;\\n border-radius: 3px;\\n background: #fff;\\n color: #000;\\n padding: 5px;\\n text-align: center;\\n white-space: nowrap;\\n}\\n.bk-root .bk-noUi-horizontal .bk-noUi-tooltip {\\n -webkit-transform: translate(-50%, 0);\\n transform: translate(-50%, 0);\\n left: 50%;\\n bottom: 120%;\\n}\\n.bk-root .bk-noUi-vertical .bk-noUi-tooltip {\\n -webkit-transform: translate(0, -50%);\\n transform: translate(0, -50%);\\n top: 50%;\\n right: 120%;\\n}\\n.bk-root .bk-noUi-handle {\\n cursor: grab;\\n cursor: -webkit-grab;\\n}\\n.bk-root .bk-noUi-handle.bk-noUi-active {\\n cursor: grabbing;\\n cursor: -webkit-grabbing;\\n}\\n.bk-root .bk-noUi-tooltip {\\n display: none;\\n white-space: nowrap;\\n}\\n.bk-root .bk-noUi-handle:hover .bk-noUi-tooltip {\\n display: block;\\n}\\n.bk-root .bk-noUi-horizontal {\\n width: 100%;\\n height: 10px;\\n}\\n.bk-root .bk-noUi-horizontal.bk-noUi-target {\\n margin: 5px 0px;\\n}\\n.bk-root .bk-noUi-horizontal .bk-noUi-handle {\\n width: 14px;\\n height: 18px;\\n left: -7px;\\n top: -5px;\\n}\\n.bk-root .bk-noUi-vertical {\\n width: 10px;\\n height: 100%;\\n}\\n.bk-root .bk-noUi-vertical.bk-noUi-target {\\n margin: 0px 5px;\\n}\\n.bk-root .bk-noUi-vertical .bk-noUi-handle {\\n width: 18px;\\n height: 14px;\\n left: -5px;\\n top: -7px;\\n}\\n.bk-root .bk-noUi-handle:after,\\n.bk-root .bk-noUi-handle:before {\\n display: none;\\n}\\n.bk-root .bk-noUi-connect {\\n box-shadow: none;\\n}\\n')},\n", | |
" 496: function _(t,e,i){var r=t(113),n=t(252),a=t(492),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(e,t),e}(a.AbstractSliderView);i.DateSliderView=_,_.__name__=\"DateSliderView\";var o=function(t){function e(e){var i=t.call(this,e)||this;return i.behaviour=\"tap\",i.connected=[!0,!1],i}return r.__extends(e,t),e.init_DateSlider=function(){this.prototype.default_view=_,this.override({format:\"%d %b %Y\"})},e.prototype._formatter=function(t,e){return n(t,e)},e}(a.AbstractSlider);i.DateSlider=o,o.__name__=\"DateSlider\",o.init_DateSlider()},\n", | |
" 497: function _(t,e,i){var n=t(113),r=t(498),_=t(121),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.render=function(){t.prototype.render.call(this),this.model.render_as_text?this.markup_el.textContent=this.model.text:this.markup_el.innerHTML=this.model.text},e}(r.MarkupView);i.DivView=o,o.__name__=\"DivView\";var u=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_Div=function(){this.prototype.default_view=o,this.define({render_as_text:[_.Boolean,!1]})},e}(r.Markup);i.Div=u,u.__name__=\"Div\",u.init_Div()},\n", | |
" 498: function _(t,i,n){var e=t(113),s=t(282),o=t(163),r=t(121),a=t(534),l=t(499),u=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return e.__extends(i,t),i.prototype.connect_signals=function(){var i=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){i.render(),i.root.compute_layout()})},i.prototype._update_layout=function(){this.layout=new s.VariadicBox(this.el),this.layout.set_sizing(this.box_sizing())},i.prototype.render=function(){t.prototype.render.call(this);var i=Object.assign(Object.assign({},this.model.style),{display:\"inline-block\"});this.markup_el=o.div({class:l.bk_clearfix,style:i}),this.el.appendChild(this.markup_el)},i}(a.WidgetView);n.MarkupView=u,u.__name__=\"MarkupView\";var c=function(t){function i(i){return t.call(this,i)||this}return e.__extends(i,t),i.init_Markup=function(){this.define({text:[r.String,\"\"],style:[r.Any,{}]})},i}(a.Widget);n.Markup=c,c.__name__=\"Markup\",c.init_Markup()},\n", | |
" 499: function _(e,n,r){e(164),e(163).styles.append('.bk-root .bk-clearfix:before,\\n.bk-root .bk-clearfix:after {\\n content: \"\";\\n display: table;\\n}\\n.bk-root .bk-clearfix:after {\\n clear: both;\\n}\\n'),r.bk_clearfix=\"bk-clearfix\"},\n", | |
" 500: function _(e,t,i){var n=e(113),o=e(474),l=e(376),s=e(163),r=e(121),u=e(109),d=e(240),a=e(347),c=e(348),_=function(e){function t(){var t=e.apply(this,arguments)||this;return t._open=!1,t}return n.__extends(t,e),t.prototype.render=function(){var t=this;e.prototype.render.call(this);var i=s.div({class:[c.bk_caret,d.bk_down]});if(this.model.is_split){var n=this._render_button(i);n.classList.add(a.bk_dropdown_toggle),n.addEventListener(\"click\",function(){return t._toggle_menu()}),this.group_el.appendChild(n)}else this.button_el.appendChild(i);var o=this.model.menu.map(function(e,i){if(null==e)return s.div({class:c.bk_divider});var n=u.isString(e)?e:e[0],o=s.div({},n);return o.addEventListener(\"click\",function(){return t._item_click(i)}),o});this.menu=s.div({class:[c.bk_menu,d.bk_below]},o),this.el.appendChild(this.menu),s.undisplay(this.menu)},t.prototype._show_menu=function(){var e=this;if(!this._open){this._open=!0,s.display(this.menu);var t=function(i){var n=i.target;n instanceof HTMLElement&&!e.el.contains(n)&&(document.removeEventListener(\"click\",t),e._hide_menu())};document.addEventListener(\"click\",t)}},t.prototype._hide_menu=function(){this._open&&(this._open=!1,s.undisplay(this.menu))},t.prototype._toggle_menu=function(){this._open?this._hide_menu():this._show_menu()},t.prototype.click=function(){this.model.is_split?(this._hide_menu(),this.model.trigger_event(new l.ButtonClick),this.model.value=this.model.default_value,null!=this.model.callback&&this.model.callback.execute(this.model),e.prototype.click.call(this)):this._toggle_menu()},t.prototype._item_click=function(e){this._hide_menu();var t=this.model.menu[e];if(null!=t){var i=u.isString(t)?t:t[1];u.isString(i)?(this.model.trigger_event(new l.MenuItemClick(i)),this.model.value=i,null!=this.model.callback&&this.model.callback.execute(this.model)):(i.execute(this.model,{index:e}),null!=this.model.callback&&this.model.callback.execute(this.model))}},t}(o.AbstractButtonView);i.DropdownView=_,_.__name__=\"DropdownView\";var h=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.init_Dropdown=function(){this.prototype.default_view=_,this.define({split:[r.Boolean,!1],menu:[r.Array,[]],value:[r.String],default_value:[r.String]}),this.override({label:\"Dropdown\"})},Object.defineProperty(t.prototype,\"is_split\",{get:function(){return this.split||null!=this.default_value},enumerable:!0,configurable:!0}),t}(o.AbstractButton);i.Dropdown=h,h.__name__=\"Dropdown\",h.init_Dropdown()},\n", | |
" 501: function _(t,e,i){var n=t(113),l=t(121),o=t(534),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.render()}),this.connect(this.model.properties.width.change,function(){return e.render()})},e.prototype.render=function(){var t=this;this.dialogEl||(this.dialogEl=document.createElement(\"input\"),this.dialogEl.type=\"file\",this.dialogEl.multiple=!1,null!=this.model.accept&&\"\"!=this.model.accept&&(this.dialogEl.accept=this.model.accept),this.dialogEl.style.width=\"{this.model.width}px\",this.dialogEl.onchange=function(e){return t.load_file(e)},this.el.appendChild(this.dialogEl))},e.prototype.load_file=function(t){var e=this,i=new FileReader;this.model.filename=t.target.files[0].name,i.onload=function(t){return e.file(t)},i.readAsDataURL(t.target.files[0])},e.prototype.file=function(t){var e=t.target.result.split(\",\"),i=e[1],n=e[0].split(\":\")[1].split(\";\")[0];this.model.value=i,this.model.mime_type=n},e}(o.WidgetView);i.FileInputView=a,a.__name__=\"FileInputView\";var r=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_FileInput=function(){this.prototype.default_view=a,this.define({value:[l.String,\"\"],mime_type:[l.String,\"\"],filename:[l.String,\"\"],accept:[l.String,\"\"]})},e}(o.Widget);i.FileInput=r,r.__name__=\"FileInput\",r.init_FileInput()},\n", | |
" 502: function _(e,t,n){var i=e(113),r=e(163),l=e(109),o=e(117),s=e(121),c=e(480),u=e(481),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.properties.value.change,function(){return t.render_selection()}),this.connect(this.model.properties.options.change,function(){return t.render()}),this.connect(this.model.properties.name.change,function(){return t.render()}),this.connect(this.model.properties.title.change,function(){return t.render()}),this.connect(this.model.properties.size.change,function(){return t.render()}),this.connect(this.model.properties.disabled.change,function(){return t.render()})},t.prototype.render=function(){var t=this;e.prototype.render.call(this);var n=this.model.options.map(function(e){var t,n;return l.isString(e)?t=n=e:(t=e[0],n=e[1]),r.option({value:t},n)});this.select_el=r.select({multiple:!0,class:u.bk_input,name:this.model.name,disabled:this.model.disabled},n),this.select_el.addEventListener(\"change\",function(){return t.change_input()}),this.group_el.appendChild(this.select_el),this.render_selection()},t.prototype.render_selection=function(){for(var e=new o.Set(this.model.value),t=0,n=Array.from(this.el.querySelectorAll(\"option\"));t<n.length;t++){var i=n[t];i.selected=e.has(i.value)}this.select_el.size=this.model.size},t.prototype.change_input=function(){for(var t=null!=this.el.querySelector(\"select:focus\"),n=[],i=0,r=Array.from(this.el.querySelectorAll(\"option\"));i<r.length;i++){var l=r[i];l.selected&&n.push(l.value)}this.model.value=n,e.prototype.change_input.call(this),t&&this.select_el.focus()},t}(c.InputWidgetView);n.MultiSelectView=h,h.__name__=\"MultiSelectView\";var a=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_MultiSelect=function(){this.prototype.default_view=h,this.define({value:[s.Array,[]],options:[s.Array,[]],size:[s.Number,4]})},t}(c.InputWidget);n.MultiSelect=a,a.__name__=\"MultiSelect\",a.init_MultiSelect()},\n", | |
" 503: function _(r,t,a){var n=r(113),e=r(498),i=r(163),p=function(r){function t(){return null!==r&&r.apply(this,arguments)||this}return n.__extends(t,r),t.prototype.render=function(){r.prototype.render.call(this);var t=i.p({style:{margin:0}},this.model.text);this.markup_el.appendChild(t)},t}(e.MarkupView);a.ParagraphView=p,p.__name__=\"ParagraphView\";var _=function(r){function t(t){return r.call(this,t)||this}return n.__extends(t,r),t.init_Paragraph=function(){this.prototype.default_view=p},t}(e.Markup);a.Paragraph=_,_.__name__=\"Paragraph\",_.init_Paragraph()},\n", | |
" 504: function _(t,n,e){var r=t(113),i=t(479),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return r.__extends(n,t),n.prototype.render=function(){t.prototype.render.call(this),this.input_el.type=\"password\"},n}(i.TextInputView);e.PasswordInputView=s,s.__name__=\"PasswordInputView\";var u=function(t){function n(n){return t.call(this,n)||this}return r.__extends(n,t),n.init_PasswordInput=function(){this.prototype.default_view=s},n}(i.TextInput);e.PasswordInput=u,u.__name__=\"PasswordInput\",u.init_PasswordInput()},\n", | |
" 505: function _(e,t,r){var n=e(113),i=e(498),o=e(163),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t.prototype.render=function(){e.prototype.render.call(this);var t=o.pre({style:{overflow:\"auto\"}},this.model.text);this.markup_el.appendChild(t)},t}(i.MarkupView);r.PreTextView=u,u.__name__=\"PreTextView\";var _=function(e){function t(t){return e.call(this,t)||this}return n.__extends(t,e),t.init_PreText=function(){this.prototype.default_view=u},t}(i.Markup);r.PreText=_,_.__name__=\"PreText\",_.init_PreText()},\n", | |
" 506: function _(t,o,i){var n=t(113),e=t(484),u=t(163),a=t(121),c=t(240),r=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(o,t),o.prototype.change_active=function(t){this.model.active!==t&&(this.model.active=t,null!=this.model.callback&&this.model.callback.execute(this.model))},o.prototype._update_active=function(){var t=this.model.active;this._buttons.forEach(function(o,i){u.classes(o).toggle(c.bk_active,t===i)})},o}(e.ButtonGroupView);i.RadioButtonGroupView=r,r.__name__=\"RadioButtonGroupView\";var l=function(t){function o(o){return t.call(this,o)||this}return n.__extends(o,t),o.init_RadioButtonGroup=function(){this.prototype.default_view=r,this.define({active:[a.Any,null]})},o}(e.ButtonGroup);i.RadioButtonGroup=l,l.__name__=\"RadioButtonGroup\",l.init_RadioButtonGroup()},\n", | |
" 507: function _(e,i,n){var t=e(113),a=e(163),o=e(127),l=e(121),r=e(486),u=e(240),d=e(481),c=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t.__extends(i,e),i.prototype.render=function(){var i=this;e.prototype.render.call(this);var n=a.div({class:[d.bk_input_group,this.model.inline?u.bk_inline:null]});this.el.appendChild(n);for(var t=o.uniqueId(),l=this.model,r=l.active,c=l.labels,p=function(e){var o=a.input({type:\"radio\",name:t,value:\"\"+e});o.addEventListener(\"change\",function(){return i.change_active(e)}),s.model.disabled&&(o.disabled=!0),e==r&&(o.checked=!0);var l=a.label({},o,a.span({},c[e]));n.appendChild(l)},s=this,h=0;h<c.length;h++)p(h)},i.prototype.change_active=function(e){this.model.active=e,null!=this.model.callback&&this.model.callback.execute(this.model)},i}(r.InputGroupView);n.RadioGroupView=c,c.__name__=\"RadioGroupView\";var p=function(e){function i(i){return e.call(this,i)||this}return t.__extends(i,e),i.init_RadioGroup=function(){this.prototype.default_view=c,this.define({active:[l.Number],labels:[l.Array,[]],inline:[l.Boolean,!1],callback:[l.Any]})},i}(r.InputGroup);n.RadioGroup=p,p.__name__=\"RadioGroup\",p.init_RadioGroup()},\n", | |
" 508: function _(e,t,n){var r=e(113),i=e(255),a=e(492),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t}(a.AbstractRangeSliderView);n.RangeSliderView=o,o.__name__=\"RangeSliderView\";var _=function(e){function t(t){var n=e.call(this,t)||this;return n.behaviour=\"drag\",n.connected=[!1,!0,!1],n}return r.__extends(t,e),t.init_RangeSlider=function(){this.prototype.default_view=o,this.override({format:\"0[.]00\"})},t.prototype._formatter=function(e,t){return i.format(e,t)},t}(a.AbstractSlider);n.RangeSlider=_,_.__name__=\"RangeSlider\",_.init_RangeSlider()},\n", | |
" 509: function _(t,e,i){var n=t(113),o=t(163),l=t(109),s=t(167),r=t(121),a=t(480),c=t(481),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.change,function(){return e.render()})},e.prototype.build_options=function(t){var e=this;return t.map(function(t){var i,n;l.isString(t)?i=n=t:(i=t[0],n=t[1]);var s=e.model.value==i;return o.option({selected:s,value:i},n)})},e.prototype.render=function(){var e,i=this;if(t.prototype.render.call(this),l.isArray(this.model.options))e=this.build_options(this.model.options);else{e=[];var n=this.model.options;for(var s in n){var r=n[s];e.push(o.optgroup({label:s},this.build_options(r)))}}this.select_el=o.select({class:c.bk_input,id:this.model.id,name:this.model.name,disabled:this.model.disabled},e),this.select_el.addEventListener(\"change\",function(){return i.change_input()}),this.group_el.appendChild(this.select_el)},e.prototype.change_input=function(){var e=this.select_el.value;s.logger.debug(\"selectbox: value = \"+e),this.model.value=e,t.prototype.change_input.call(this)},e}(a.InputWidgetView);i.SelectView=u,u.__name__=\"SelectView\";var p=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_Select=function(){this.prototype.default_view=u,this.define({value:[r.String,\"\"],options:[r.Any,[]]})},e}(a.InputWidget);i.Select=p,p.__name__=\"Select\",p.init_Select()},\n", | |
" 510: function _(t,e,r){var i=t(113),n=t(255),o=t(492),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i.__extends(e,t),e}(o.AbstractSliderView);r.SliderView=_,_.__name__=\"SliderView\";var a=function(t){function e(e){var r=t.call(this,e)||this;return r.behaviour=\"tap\",r.connected=[!0,!1],r}return i.__extends(e,t),e.init_Slider=function(){this.prototype.default_view=_,this.override({format:\"0[.]00\"})},e.prototype._formatter=function(t,e){return n.format(t,e)},e}(o.AbstractSlider);r.Slider=a,a.__name__=\"Slider\",a.init_Slider()},\n", | |
" 511: function _(e,t,n){var i=e(113),l=e(480),o=e(163),s=e(121),h=e(481),p=Math.floor,u=Math.max,r=Math.min;function a(e){return p(e)!==e?e.toString().replace(\"/0+$/\",\"\").split(\".\")[1].length:0}var d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.properties.low.change,function(){var e=t.model.low;null!=e&&(t.input_el.min=e.toFixed(16))}),this.connect(this.model.properties.high.change,function(){var e=t.model.high;null!=e&&(t.input_el.max=e.toFixed(16))}),this.connect(this.model.properties.step.change,function(){var e=t.model.step;t.input_el.step=e.toFixed(16)}),this.connect(this.model.properties.value.change,function(){var e=t.model,n=e.value,i=e.step;t.input_el.value=n.toFixed(a(i)).replace(/(\\.[0-9]*[1-9])0+$|\\.0*$/,\"$1\")}),this.connect(this.model.properties.disabled.change,function(){t.input_el.disabled=t.model.disabled})},t.prototype.render=function(){var t=this;e.prototype.render.call(this),this.input_el=o.input({type:\"number\",class:h.bk_input,name:this.model.name,min:this.model.low,max:this.model.high,value:this.model.value,step:this.model.step,disabled:this.model.disabled}),this.input_el.addEventListener(\"change\",function(){return t.change_input()}),this.group_el.appendChild(this.input_el)},t.prototype.change_input=function(){if(this.input_el.value){var t=this.model.step,n=Number(this.input_el.value);null!=this.model.low&&(n=u(n,this.model.low)),null!=this.model.high&&(n=r(n,this.model.high)),this.model.value=Number(n.toFixed(a(t))),e.prototype.change_input.call(this)}},t}(l.InputWidgetView);n.SpinnerView=d,d.__name__=\"SpinnerView\";var c=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_Spinner=function(){this.prototype.default_view=d,this.define({value:[s.Number,0],low:[s.Number,null],high:[s.Number,null],step:[s.Number,1]})},t}(l.InputWidget);n.Spinner=c,c.__name__=\"Spinner\",c.init_Spinner()},\n", | |
" 512: function _(e,t,n){var i=e(113),o=e(479),l=e(480),r=e(163),s=e(121),u=e(481),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i.__extends(t,e),t.prototype.connect_signals=function(){var t=this;e.prototype.connect_signals.call(this),this.connect(this.model.properties.name.change,function(){return t.input_el.name=t.model.name||\"\"}),this.connect(this.model.properties.value.change,function(){return t.input_el.value=t.model.value}),this.connect(this.model.properties.disabled.change,function(){return t.input_el.disabled=t.model.disabled}),this.connect(this.model.properties.placeholder.change,function(){return t.input_el.placeholder=t.model.placeholder}),this.connect(this.model.properties.rows.change,function(){return t.input_el.rows=t.model.rows}),this.connect(this.model.properties.cols.change,function(){return t.input_el.cols=t.model.cols}),this.connect(this.model.properties.max_length.change,function(){return t.input_el.maxLength=t.model.max_length})},t.prototype.render=function(){var t=this;e.prototype.render.call(this),this.input_el=r.textarea({class:u.bk_input,name:this.model.name,disabled:this.model.disabled,placeholder:this.model.placeholder,cols:this.model.cols,rows:this.model.rows,maxLength:this.model.max_length}),this.input_el.textContent=this.model.value,this.input_el.addEventListener(\"change\",function(){return t.change_input()}),this.group_el.appendChild(this.input_el)},t.prototype.change_input=function(){this.model.value=this.input_el.value,e.prototype.change_input.call(this)},t}(l.InputWidgetView);n.TextAreaInputView=a,a.__name__=\"TextAreaInputView\";var c=function(e){function t(t){return e.call(this,t)||this}return i.__extends(t,e),t.init_TextAreaInput=function(){this.prototype.default_view=a,this.define({cols:[s.Number,20],rows:[s.Number,2],max_length:[s.Number,500]})},t}(o.TextInput);n.TextAreaInput=c,c.__name__=\"TextAreaInput\",c.init_TextAreaInput()},\n", | |
" 513: function _(t,e,i){var n=t(113),o=t(474),c=t(163),l=t(121),a=t(240),r=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e.prototype.connect_signals=function(){var e=this;t.prototype.connect_signals.call(this),this.connect(this.model.properties.active.change,function(){return e._update_active()})},e.prototype.render=function(){t.prototype.render.call(this),this._update_active()},e.prototype.click=function(){this.model.active=!this.model.active,t.prototype.click.call(this)},e.prototype._update_active=function(){c.classes(this.button_el).toggle(a.bk_active,this.model.active)},e}(o.AbstractButtonView);i.ToggleView=r,r.__name__=\"ToggleView\";var s=function(t){function e(e){return t.call(this,e)||this}return n.__extends(e,t),e.init_Toggle=function(){this.prototype.default_view=r,this.define({active:[l.Boolean,!1]}),this.override({label:\"Toggle\"})},e}(o.AbstractButton);i.Toggle=s,s.__name__=\"Toggle\",s.init_Toggle()},\n", | |
" }, 472, {\"models/widgets/main\":472,\"models/widgets/index\":473,\"models/widgets/abstract_button\":474,\"models/widgets/control\":475,\"models/widgets/widget\":534,\"models/widgets/abstract_icon\":477,\"models/widgets/autocomplete_input\":478,\"models/widgets/text_input\":479,\"models/widgets/input_widget\":480,\"styles/widgets/inputs\":481,\"models/widgets/button\":482,\"models/widgets/checkbox_button_group\":483,\"models/widgets/button_group\":484,\"models/widgets/checkbox_group\":485,\"models/widgets/input_group\":486,\"models/widgets/color_picker\":487,\"models/widgets/date_picker\":488,\"styles/widgets/pikaday\":490,\"models/widgets/date_range_slider\":491,\"models/widgets/abstract_slider\":492,\"styles/widgets/sliders\":494,\"styles/widgets/nouislider\":495,\"models/widgets/date_slider\":496,\"models/widgets/div\":497,\"models/widgets/markup\":498,\"styles/clearfix\":499,\"models/widgets/dropdown\":500,\"models/widgets/file_input\":501,\"models/widgets/multiselect\":502,\"models/widgets/paragraph\":503,\"models/widgets/password_input\":504,\"models/widgets/pretext\":505,\"models/widgets/radio_button_group\":506,\"models/widgets/radio_group\":507,\"models/widgets/range_slider\":508,\"models/widgets/selectbox\":509,\"models/widgets/slider\":510,\"models/widgets/spinner\":511,\"models/widgets/textarea_input\":512,\"models/widgets/toggle\":513}, {});\n", | |
" })\n", | |
"\n", | |
" //# sourceMappingURL=bokeh-widgets.min.js.map\n", | |
"\n", | |
" /* END bokeh-widgets.min.js */\n", | |
" },\n", | |
" \n", | |
" function(Bokeh) {\n", | |
" /* BEGIN bokeh-tables.min.js */\n", | |
" /*!\n", | |
" * Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors\n", | |
" * All rights reserved.\n", | |
" * \n", | |
" * Redistribution and use in source and binary forms, with or without modification,\n", | |
" * are permitted provided that the following conditions are met:\n", | |
" * \n", | |
" * Redistributions of source code must retain the above copyright notice,\n", | |
" * this list of conditions and the following disclaimer.\n", | |
" * \n", | |
" * Redistributions in binary form must reproduce the above copyright notice,\n", | |
" * this list of conditions and the following disclaimer in the documentation\n", | |
" * and/or other materials provided with the distribution.\n", | |
" * \n", | |
" * Neither the name of Anaconda nor the names of any contributors\n", | |
" * may be used to endorse or promote products derived from this software\n", | |
" * without specific prior written permission.\n", | |
" * \n", | |
" * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n", | |
" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n", | |
" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n", | |
" * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n", | |
" * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n", | |
" * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n", | |
" * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n", | |
" * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n", | |
" * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n", | |
" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n", | |
" * THE POSSIBILITY OF SUCH DAMAGE.\n", | |
" */\n", | |
" (function(root, factory) {\n", | |
" factory(root[\"Bokeh\"]);\n", | |
" })(this, function(Bokeh) {\n", | |
" var define;\n", | |
" return (function(modules, entry, aliases, externals) {\n", | |
" if (Bokeh != null) {\n", | |
" return Bokeh.register_plugin(modules, entry, aliases, externals);\n", | |
" } else {\n", | |
" throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\");\n", | |
" }\n", | |
" })\n", | |
" ({\n", | |
" 514: function _(e,r,s){var a=e(515);s.Tables=a,e(108).register_models(a)},\n", | |
" 515: function _(a,g,r){function e(a){for(var g in a)r.hasOwnProperty(g)||(r[g]=a[g])}e(a(516)),e(a(537));var o=a(517);r.DataTable=o.DataTable;var t=a(540);r.TableColumn=t.TableColumn;var n=a(533);r.TableWidget=n.TableWidget;var u=a(541);r.AvgAggregator=u.AvgAggregator,r.MinAggregator=u.MinAggregator,r.MaxAggregator=u.MaxAggregator,r.SumAggregator=u.SumAggregator;var A=a(542);r.GroupingInfo=A. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment