, based on the\n",
" // current slider value.\n",
" super.render();\n",
" this.content_el = dom_1.div({ style: {\n",
" textAlign: \"center\",\n",
" fontSize: \"1.2em\",\n",
" padding: \"2px\",\n",
" color: \"#b88d8e\",\n",
" backgroundColor: \"#2a3153\",\n",
" } });\n",
" this.el.appendChild(this.content_el);\n",
" this._update_text();\n",
" }\n",
" _update_text() {\n",
" this.content_el.textContent = `${this.model.text}: ${this.model.slider.value}`;\n",
" }\n",
" }\n",
" exports.CustomView = CustomView;\n",
" CustomView.__name__ = \"CustomView\";\n",
" class Custom extends html_box_1.HTMLBox {\n",
" constructor(attrs) {\n",
" super(attrs);\n",
" }\n",
" static initClass() {\n",
" // The ``type`` class attribute should generally match exactly the name\n",
" // of the corresponding Python class.\n",
" this.prototype.type = \"Custom\";\n",
" // If there is an associated view, this is typically boilerplate.\n",
" this.prototype.default_view = CustomView;\n",
" // The define block adds corresponding \"properties\" to the JS model. These\n",
" // should normally line up 1-1 with the Python model class. Most property\n",
" // types have counterparts, e.g. bokeh.core.properties.String will be\n",
" // ``p.String`` in the JS implementation. Any time the JS type system is not\n",
" // yet as complete, you can use ``p.Any`` as a \"wildcard\" property type.\n",
" this.define({\n",
" text: [p.String],\n",
" slider: [p.Any],\n",
" });\n",
" this.override({\n",
" margin: 5,\n",
" });\n",
" }\n",
" }\n",
" exports.Custom = Custom;\n",
" Custom.__name__ = \"Custom\";\n",
" Custom.initClass();\n",
" //# sourceMappingURL=Custom.js.map\n",
" }\n",
" }, \"custom/main\");\n",
" ;\n",
" });\n",
"\n",
" },\n",
" function(Bokeh) {\n",
" \n",
" \n",
" }\n",
" ];\n",
"\n",
" function run_inline_js() {\n",
" \n",
" if (root.Bokeh !== undefined || force === true) {\n",
" \n",
" for (var i = 0; i < inline_js.length; i++) {\n",
" inline_js[i].call(root, root.Bokeh);\n",
" }\n",
" if (force === true) {\n",
" display_loaded();\n",
" }} else if (Date.now() < root._bokeh_timeout) {\n",
" setTimeout(run_inline_js, 100);\n",
" } else if (!root._bokeh_failed_load) {\n",
" console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n",
" root._bokeh_failed_load = true;\n",
" } else if (force !== true) {\n",
" var cell = $(document.getElementById(\"1314\")).parents('.cell').data().cell;\n",
" cell.output_area.append_execute_result(NB_LOAD_WARNING)\n",
" }\n",
"\n",
" }\n",
"\n",
" if (root._bokeh_is_loading === 0) {\n",
" console.debug(\"Bokeh: BokehJS loaded, going straight to plotting\");\n",
" run_inline_js();\n",
" } else {\n",
" load_libs(css_urls, js_urls, function() {\n",
" console.debug(\"Bokeh: BokehJS plotting callback run at\", now());\n",
" run_inline_js();\n",
" });\n",
" }\n",
"}(window));"
],
"application/vnd.bokehjs_load.v0+json": "\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 \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 \"
\\n\"+\n \"
\\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 \"
\\n\"+\n \"
\\n\"+\n \"- re-rerun `output_notebook()` to attempt to load from CDN again, or
\\n\"+\n \"- use INLINE resources instead, as so:
\\n\"+\n \"
\\n\"+\n \"
\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"
\\n\"+\n \"
\"}};\n\n function display_loaded() {\n var el = document.getElementById(\"1314\");\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 const hashes = {\"https://cdn.bokeh.org/bokeh/release/bokeh-2.0.1.min.js\": \"JpP8FXbgAZLkfur7LiK3j9AGBhHNIvF742meBJrjO2ShJDhCG2I1uVvW+0DUtrmc\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.0.1.min.js\": \"xZlADit0Q04ISQEdKg2k3L4W9AwQBAuDs9nJL9fM/WwzL1tEU9VPNezOFX0nLEAz\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.0.1.min.js\": \"4BuPRZkdMKSnj3zoxiNrQ86XgNw0rYmBOxe7nshquXwwcauupgBF2DHLVG1WuZlV\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.0.1.min.js\": \"Dv1SQ87hmDqK6S5OhBf0bCuwAEvL5QYL0PuR/F1SPVhCS/r/abjkbpKDYL2zeM19\"};\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 if (url in hashes) {\n element.crossOrigin = \"anonymous\";\n element.integrity = \"sha384-\" + hashes[url];\n }\n console.debug(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.head.appendChild(element);\n }\n };var element = document.getElementById(\"1314\");\n if (element == null) {\n console.error(\"Bokeh: ERROR: autoload.js configured with elementid '1314' but no matching script tag was found. \")\n return false;\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 = [\"https://cdn.bokeh.org/bokeh/release/bokeh-2.0.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-widgets-2.0.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-tables-2.0.1.min.js\", \"https://cdn.bokeh.org/bokeh/release/bokeh-gl-2.0.1.min.js\"];\n var css_urls = [];\n \n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n \n function(Bokeh) {\n (function(root, factory) {\n factory(root[\"Bokeh\"]);\n })(this, function(Bokeh) {\n var define;\n return (function outer(modules, entry) {\n if (Bokeh != null) {\n return Bokeh.register_plugin(modules, entry);\n } else {\n throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\");\n }\n })\n ({\n \"custom/main\": function(require, module, exports) {\n var models = {\n \"Custom\": require(\"custom/custom\").Custom\n };\n require(\"base\").register_models(models);\n module.exports = models;\n },\n \"custom/custom\": function(require, module, exports) {\n \"use strict\";\n var __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result[\"default\"] = mod;\n return result;\n };\n Object.defineProperty(exports, \"__esModule\", { value: true });\n const html_box_1 = require(\"models/layouts/html_box\");\n const dom_1 = require(\"core/dom\");\n const p = __importStar(require(\"core/properties\"));\n class CustomView extends html_box_1.HTMLBoxView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.slider.change, () => this._update_text());\n }\n render() {\n // BokehJS Views create
elements by default, accessible as ``this.el``.\n // Many Bokeh views extend this default
with additional elements\n // (e.g.