Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jlstevens/f13d16581399195a5889d95ecd70b3b8 to your computer and use it in GitHub Desktop.
Save jlstevens/f13d16581399195a5889d95ecd70b3b8 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<a href='http://www.holoviews.org'><img src=\"https://raw.githubusercontent.com/ioam/scipy-2017-holoviews-tutorial/master/notebooks/assets/hv%2Bbk.png\" alt=\"HV+BK logos\" width=\"40%;\" align=\"left\"/></a>\n",
"<div style=\"float:right;\"><h2>08. Deploying Bokeh Apps</h2></div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the previous sections we discovered how to use a ``HoloMap`` to build a Jupyter notebook with interactive visualizations that can be exported to a standalone HTML file, as well as how to use ``DynamicMap`` and ``Streams`` to set up dynamic interactivity backed by the Jupyter Python kernel. However, frequently we want to package our visualization or dashboard for wider distribution, backed by Python but run outside of the notebook environment. Bokeh Server provides a flexible and scalable architecture to deploy complex interactive visualizations and dashboards, integrating seamlessly with Bokeh and with HoloViews.\n",
"\n",
"For a detailed background on Bokeh Server see [the bokeh user guide](http://bokeh.pydata.org/en/latest/docs/user_guide/server.html). In this tutorial we will discover how to deploy the visualizations we have created so far as a standalone bokeh server app, and how to flexibly combine HoloViews and Bokeh APIs to build highly customized apps. We will also reuse a lot of what we have learned so far---loading large, tabular datasets, applying datashader operations to them, and adding linked streams to our app."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## A simple bokeh app\n",
"\n",
"The preceding sections of this tutorial focused solely on the Jupyter notebook, but now let's look at a bare Python script that can be deployed using Bokeh Server:"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"import dask.dataframe as dd\n",
"import holoviews as hv\n",
"from holoviews.operation.datashader import datashade\n",
"\n",
"# 1. Instead of using hv.extension, declare that we are using Bokeh and grab the renderer\n",
"renderer = hv.renderer('bokeh')\n",
"\n",
"# 2. Load data and datashade it\n",
"ddf = dd.read_csv('../data/nyc_taxi.csv', usecols=['dropoff_x', 'dropoff_y']).persist()\n",
"points = hv.Points(ddf, kdims=['dropoff_x', 'dropoff_y'])\n",
"shaded = datashade(points).opts(plot=dict(width=800, height=600))\n",
"\n",
"# 3. Instead of Jupyter's automatic rich display, render the object as a bokeh document\n",
"doc = renderer.server_doc(shaded)\n",
"doc.title = 'HoloViews Bokeh App'\n",
"\n"
]
}
],
"source": [
"with open('./apps/server_app.py', 'r') as f:\n",
" print(f.read())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Of the three parts of this app, part 2 should be very familiar by now -- load some taxi dropoff locations, declare a Points object, datashade them, and set some plot options.\n",
"\n",
"Step 1 is new: Instead of loading the bokeh extension using ``hv.extension('bokeh')``, we get a direct handle on a bokeh renderer using the ``hv.renderer`` function. This has to be done at the top of the script, to be sure that options declared are passed to the Bokeh renderer. \n",
"\n",
"Step 3 is also new: instead of typing ``app`` to see the visualization as we would in the notebook, here we create a Bokeh document from it by passing the HoloViews object to the ``renderer.server_doc`` method. \n",
"\n",
"Steps 1 and 3 are essentially boilerplate, so you can now use this simple skeleton to turn any HoloViews object into a fully functional, deployable Bokeh app!\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Deploying the app\n",
"\n",
"Assuming that you have a terminal window open with the ``hvtutorial`` environment activated, in the ``notebooks/`` directory, you can launch this app using Bokeh Server:\n",
"\n",
"```\n",
"bokeh serve --show apps/server_app.py\n",
"```\n",
"\n",
"If you don't already have a favorite way to get a terminal, one way is to [open it from within Jupyter](../terminals/1), then make sure you are in the ``notebooks`` directory, and activate the environment using ``source activate hvtutorial`` (or ``activate tutorial`` on Windows). You can also [open the app script file](../edit/apps/server_app.py) in the inbuilt text editor, or you can use your own preferred editor."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"import dask.dataframe as dd\n",
"import holoviews as hv\n",
"import geoviews as gv\n",
"\n",
"from bokeh.models import WMTSTileSource\n",
"from holoviews.operation.datashader import datashade\n",
"\n",
"url = 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{Z}/{Y}/{X}.jpg'\n",
"wmts = WMTSTileSource(url=url)\n",
"\n",
"# 1. Instead of using hv.extension, declare that we are using Bokeh and grab the renderer\n",
"renderer = hv.renderer('bokeh')\n",
"\n",
"\n",
"# 2. Declare points and datashade them\n",
"ddf = dd.read_csv('../data/nyc_taxi.csv', usecols=['pickup_x', 'pickup_y']).persist()\n",
"shaded = datashade(hv.Points(ddf))\n",
"\n",
"# Set some plot options\n",
"app = gv.WMTS(wmts) * shaded.opts(plot=dict(width=800, height=600))\n",
"\n",
"# 3. Instead of Jupyter's automatic rich display, render the object as a bokeh document\n",
"doc = renderer.server_doc(app)\n",
"doc.title = 'HoloViews Bokeh App'\n",
"\n"
]
}
],
"source": [
"# Exercise: Modify the app to display the pickup locations and add a tilesource, then run the app with bokeh serve\n",
"# Tip: Refer to the previous notebook\n",
"with open('./apps/server_app_with_solutions.py', 'r') as f:\n",
" print(f.read())\n",
" \n",
"# Run using: bokeh serve --show apps/server_app_with_solutions.py"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Iteratively building a bokeh app in the notebook\n",
"\n",
"The above app script can be built entirely without using Jupyter, though we displayed it here using Jupyter for convenience in the tutorial. Jupyter notebooks are also often helpful when initially developing such apps, allowing you to quickly iterate over visualizations in the notebook, deploying it as a standalone app only once we are happy with it.\n",
"\n",
"To illustrate this process, let's quickly go through such a workflow. As before we will set up our imports, load the extension, and load the taxi dataset:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/jstevens/miniconda3/envs/hvtutorial/lib/python3.6/site-packages/odo/backends/pandas.py:94: FutureWarning: pandas.tslib is deprecated and will be removed in a future version.\n",
"You can access NaTType as type(pandas.NaT)\n",
" @convert.register((pd.Timestamp, pd.Timedelta), (pd.tslib.NaTType, type(None)))\n"
]
},
{
"data": {
"text/html": []
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"application/javascript": [
"\n",
"(function(global) {\n",
" function now() {\n",
" return new Date();\n",
" }\n",
"\n",
" var force = true;\n",
"\n",
" if (typeof (window._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n",
" window._bokeh_onload_callbacks = [];\n",
" window._bokeh_is_loading = undefined;\n",
" }\n",
"\n",
"\n",
" \n",
" if (typeof (window._bokeh_timeout) === \"undefined\" || force === true) {\n",
" window._bokeh_timeout = Date.now() + 5000;\n",
" window._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",
" if (window.Bokeh !== undefined) {\n",
" var el = document.getElementById(\"\");\n",
" el.textContent = \"BokehJS \" + Bokeh.version + \" successfully loaded.\";\n",
" } else if (Date.now() < window._bokeh_timeout) {\n",
" setTimeout(display_loaded, 100)\n",
" }\n",
" }\n",
"\n",
" function run_callbacks() {\n",
" try {\n",
" window._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n",
" }\n",
" finally {\n",
" delete window._bokeh_onload_callbacks\n",
" }\n",
" console.info(\"Bokeh: all callbacks have finished\");\n",
" }\n",
"\n",
" function load_libs(js_urls, callback) {\n",
" window._bokeh_onload_callbacks.push(callback);\n",
" if (window._bokeh_is_loading > 0) {\n",
" console.log(\"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.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n",
" window._bokeh_is_loading = js_urls.length;\n",
" for (var i = 0; i < js_urls.length; i++) {\n",
" var url = js_urls[i];\n",
" var s = document.createElement('script');\n",
" s.src = url;\n",
" s.async = false;\n",
" s.onreadystatechange = s.onload = function() {\n",
" window._bokeh_is_loading--;\n",
" if (window._bokeh_is_loading === 0) {\n",
" console.log(\"Bokeh: all BokehJS libraries loaded\");\n",
" run_callbacks()\n",
" }\n",
" };\n",
" s.onerror = function() {\n",
" console.warn(\"failed to load library \" + url);\n",
" };\n",
" console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n",
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
" }\n",
" };\n",
"\n",
" var js_urls = [];\n",
"\n",
" var inline_js = [\n",
" function(Bokeh) {\n",
" /* BEGIN bokeh.min.js */\n",
" window.Bokeh=Bokeh=function(){var t=void 0;return function e(t,r,o){function i(n){if(!r[n]){if(!t[n]){var s=new Error(\"Cannot find module '\"+n+\"'\");throw s.code=\"MODULE_NOT_FOUND\",s}var a=r[n]={exports:{}},l=function(e){var r=t[n][1][e];return i(r?r:e)};l.modules=i.modules,t[n][0].call(a.exports,l,a,a.exports,e,t,r,o)}return r[n].exports}i.modules=t;var n=i(o[0]);return n.require=i,n}({base:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i={}.hasOwnProperty,n=t(\"./models/index\"),s=t(\"./core/util/object\");r.overrides={},o=s.clone(n),r.Models=function(t){var e,i;if(e=null!=(i=r.overrides[t])?i:o[t],null==e)throw new Error(\"Model `\"+t+\"' does not exist. This could be due to a widget or a custom model not being registered before first usage.\");return e},r.Models.register=function(t,e){return r.overrides[t]=e},r.Models.unregister=function(t){return delete r.overrides[t]},r.Models.register_models=function(t,e,r){var n,s,a;if(null==e&&(e=!1),null==r&&(r=null),null!=t){a=[];for(s in t)i.call(t,s)&&(n=t[s],e||!o.hasOwnProperty(s)?a.push(o[s]=n):a.push(\"function\"==typeof r?r(s):void 0));return a}},r.Models.registered_names=function(){return Object.keys(o)},r.index={}},{\"./core/util/object\":\"core/util/object\",\"./models/index\":\"models/index\"}],client:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a=t(\"es6-promise\"),l=t(\"./core/logging\"),u=t(\"./core/util/string\"),c=t(\"./core/util/object\"),_=t(\"./document\");r.DEFAULT_SERVER_WEBSOCKET_URL=\"ws://localhost:5006/ws\",r.DEFAULT_SESSION_ID=\"default\",n=function(){function t(t,e,r){this.header=t,this.metadata=e,this.content=r,this.buffers=[]}return t.assemble=function(e,r,o){var i,n,s;return n=JSON.parse(e),s=JSON.parse(r),i=JSON.parse(o),new t(n,s,i)},t.create_header=function(t,e){var r;return r={msgid:u.uniqueId(),msgtype:t},c.extend(r,e)},t.create=function(e,r,o){var i;return null==o&&(o={}),i=t.create_header(e,r),new t(i,{},o)},t.prototype.send=function(t){var e,r,o;return r=JSON.stringify(this.header),o=JSON.stringify(this.metadata),e=JSON.stringify(this.content),t.send(r),t.send(o),t.send(e)},t.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)},t.prototype.add_buffer=function(t){return this.buffers.push(t)},t.prototype._header_field=function(t){return t in this.header?this.header[t]:null},t.prototype.msgid=function(){return this._header_field(\"msgid\")},t.prototype.msgtype=function(){return this._header_field(\"msgtype\")},t.prototype.sessid=function(){return this._header_field(\"sessid\")},t.prototype.reqid=function(){return this._header_field(\"reqid\")},t.prototype.problem=function(){return\"msgid\"in this.header?\"msgtype\"in this.header?null:\"No msgtype in header\":\"No msgid in header\"},t}(),s={\"PATCH-DOC\":function(t,e){return t._for_session(function(t){return t._handle_patch(e)})},OK:function(t,e){return l.logger.trace(\"Unhandled OK reply to \"+e.reqid())},ERROR:function(t,e){return l.logger.error(\"Unhandled ERROR reply to \"+e.reqid()+\": \"+e.content.text)}},o=function(){function t(e,o,i,n,s){this.url=e,this.id=o,this.args_string=i,this._on_have_session_hook=n,this._on_closed_permanently_hook=s,this._number=t._connection_count,t._connection_count=this._number+1,null==this.url&&(this.url=r.DEFAULT_SERVER_WEBSOCKET_URL),null==this.id&&(this.id=r.DEFAULT_SESSION_ID),l.logger.debug(\"Creating websocket \"+this._number+\" to '\"+this.url+\"' session '\"+this.id+\"'\"),this.socket=null,this.closed_permanently=!1,this._fragments=[],this._partial=null,this._current_handler=null,this._pending_ack=null,this._pending_replies={},this.session=null}return t._connection_count=0,t.prototype._for_session=function(t){if(null!==this.session)return t(this.session)},t.prototype.connect=function(){var t,e,r;if(this.closed_permanently)return a.Promise.reject(new Error(\"Cannot connect() a closed ClientConnection\"));if(null!=this.socket)return a.Promise.reject(new Error(\"Already connected\"));this._fragments=[],this._partial=null,this._pending_replies={},this._current_handler=null;try{return r=this.url+\"?bokeh-protocol-version=1.0&bokeh-session-id=\"+this.id,(null!=(e=this.args_string)?e.length:void 0)>0&&(r+=\"&\"+this.args_string),null!=window.MozWebSocket?this.socket=new MozWebSocket(r):this.socket=new WebSocket(r),new a.Promise(function(t){return function(e,r){return t.socket.binaryType=\"arraybuffer\",t.socket.onopen=function(){return t._on_open(e,r)},t.socket.onmessage=function(e){return t._on_message(e)},t.socket.onclose=function(e){return t._on_close(e)},t.socket.onerror=function(){return t._on_error(r)}}}(this))}catch(o){return t=o,l.logger.error(\"websocket creation failed to url: \"+this.url),l.logger.error(\" - \"+t),a.Promise.reject(t)}},t.prototype.close=function(){if(!this.closed_permanently&&(l.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._for_session(function(t){return t._connection_closed()}),null!=this._on_closed_permanently_hook))return this._on_closed_permanently_hook(),this._on_closed_permanently_hook=null},t.prototype._schedule_reconnect=function(t){var e;return e=function(t){return function(){t.closed_permanently||l.logger.info(\"Websocket connection \"+t._number+\" disconnected, will not attempt to reconnect\")}}(this),setTimeout(e,t)},t.prototype.send=function(t){if(null===this.socket)throw new Error(\"not connected so cannot send \"+t);return t.send(this.socket)},t.prototype.send_event=function(t){var e;return e=n.create(\"EVENT\",{},JSON.stringify(t)),this.send(e)},t.prototype.send_with_reply=function(t){var e;return e=new a.Promise(function(e){return function(r,o){return e._pending_replies[t.msgid()]=[r,o],e.send(t)}}(this)),e.then(function(t){if(\"ERROR\"===t.msgtype())throw new Error(\"Error reply \"+t.content.text);return t},function(t){throw t})},t.prototype._pull_doc_json=function(){var t,e;return t=n.create(\"PULL-DOC-REQ\",{}),e=this.send_with_reply(t),e.then(function(t){if(!(\"doc\"in t.content))throw new Error(\"No 'doc' field in PULL-DOC-REPLY\");return t.content.doc},function(t){throw t})},t.prototype._repull_session_doc=function(){return null===this.session?l.logger.debug(\"Pulling session for first time\"):l.logger.debug(\"Repulling session\"),this._pull_doc_json().then(function(t){return function(e){var r,o,s;return null!==t.session?(t.session.document.replace_with_json(e),l.logger.debug(\"Updated existing session with new pulled doc\")):t.closed_permanently?l.logger.debug(\"Got new document after connection was already closed\"):(r=_.Document.from_json(e),o=_.Document._compute_patch_since_json(e,r),o.events.length>0&&(l.logger.debug(\"Sending \"+o.events.length+\" changes from model construction back to server\"),s=n.create(\"PATCH-DOC\",{},o),t.send(s)),t.session=new i(t,r,t.id),l.logger.debug(\"Created a new session from new pulled doc\"),null!=t._on_have_session_hook?(t._on_have_session_hook(t.session),t._on_have_session_hook=null):void 0)}}(this),function(t){throw t})[\"catch\"](function(t){return null!=console.trace&&console.trace(t),l.logger.error(\"Failed to repull session \"+t)})},t.prototype._on_open=function(t,e){return l.logger.info(\"Websocket connection \"+this._number+\" is now open\"),this._pending_ack=[t,e],this._current_handler=function(t){return function(e){return t._awaiting_ack_handler(e)}}(this)},t.prototype._on_message=function(t){return this._on_message_unchecked(t)},t.prototype._on_message_unchecked=function(t){var e,r;if(null==this._current_handler&&l.logger.error(\"got a message but haven't set _current_handler\"),t.data instanceof ArrayBuffer?null==this._partial||this._partial.complete()?this._close_bad_protocol(\"Got binary from websocket but we were expecting text\"):this._partial.add_buffer(t.data):null!=this._partial?this._close_bad_protocol(\"Got text from websocket but we were expecting binary\"):(this._fragments.push(t.data),3===this._fragments.length&&(this._partial=n.assemble(this._fragments[0],this._fragments[1],this._fragments[2]),this._fragments=[],r=this._partial.problem(),null!==r&&this._close_bad_protocol(r))),null!=this._partial&&this._partial.complete())return e=this._partial,this._partial=null,this._current_handler(e)},t.prototype._on_close=function(t){var e,r;for(l.logger.info(\"Lost websocket \"+this._number+\" connection, \"+t.code+\" (\"+t.reason+\")\"),this.socket=null,null!=this._pending_ack&&(this._pending_ack[1](new Error(\"Lost websocket connection, \"+t.code+\" (\"+t.reason+\")\")),this._pending_ack=null),e=function(t){return function(){var e,r,o;r=t._pending_replies;for(o in r)return e=r[o],delete t._pending_replies[o],e;return null}}(this),r=e();null!==r;)r[1](\"Disconnected\"),r=e();if(!this.closed_permanently)return this._schedule_reconnect(2e3)},t.prototype._on_error=function(t){return l.logger.debug(\"Websocket error on socket \"+this._number),t(new Error(\"Could not open websocket\"))},t.prototype._close_bad_protocol=function(t){if(l.logger.error(\"Closing connection: \"+t),null!=this.socket)return this.socket.close(1002,t)},t.prototype._awaiting_ack_handler=function(t){return\"ACK\"!==t.msgtype()?this._close_bad_protocol(\"First message was not an ACK\"):(this._current_handler=function(t){return function(e){return t._steady_state_handler(e)}}(this),this._repull_session_doc(),null!=this._pending_ack?(this._pending_ack[0](this),this._pending_ack=null):void 0)},t.prototype._steady_state_handler=function(t){var e;return t.reqid()in this._pending_replies?(e=this._pending_replies[t.reqid()],delete this._pending_replies[t.reqid()],e[0](t)):t.msgtype()in s?s[t.msgtype()](this,t):l.logger.debug(\"Doing nothing with message \"+t.msgtype())},t}(),i=function(){function t(t,e,r){this._connection=t,this.document=e,this.id=r,this.document_listener=function(t){return function(e){return t._document_changed(e)}}(this),this.document.on_change(this.document_listener),this.event_manager=this.document.event_manager,this.event_manager.session=this}return t.prototype.close=function(){return this._connection.close()},t.prototype.send_event=function(t){return this._connection.send_event(t)},t.prototype._connection_closed=function(){return this.document.remove_on_change(this.document_listener)},t.prototype.request_server_info=function(){var t,e;return t=n.create(\"SERVER-INFO-REQ\",{}),e=this._connection.send_with_reply(t),e.then(function(t){return t.content})},t.prototype.force_roundtrip=function(){return this.request_server_info().then(function(t){})},t.prototype._document_changed=function(t){var e;if(t.setter_id!==this.id&&(!(t instanceof _.ModelChangedEvent)||t.attr in t.model.serializable_attributes()))return e=n.create(\"PATCH-DOC\",{},this.document.create_json_patch([t])),this._connection.send(e)},t.prototype._handle_patch=function(t){return this.document.apply_json_patch(t.content,this.id)},t}(),r.pull_session=function(t,e,r){var i,n,s;return s=null,i=null,n=new a.Promise(function(n,s){return i=new o(t,e,r,function(t){var e;try{return n(t)}catch(r){throw e=r,l.logger.error(\"Promise handler threw an error, closing session \"+error),t.close(),e}},function(){return s(new Error(\"Connection was closed before we successfully pulled a session\"))}),i.connect().then(function(t){},function(t){throw l.logger.error(\"Failed to connect to Bokeh server \"+t),t})}),n.close=function(){return i.close()},n}},{\"./core/logging\":\"core/logging\",\"./core/util/object\":\"core/util/object\",\"./core/util/string\":\"core/util/string\",\"./document\":\"document\",\"es6-promise\":\"es6-promise\"}],\"core/bokeh_events\":[function(t,e,r){\"use strict\";function o(t){return function(e){e.prototype.event_name=t,l[t]=e}}function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var o=t.prototype.applicable_models.concat(e);t.prototype.applicable_models=o}Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(\"tslib\"),s=t(\"./logging\"),a=t(\"./util/object\"),l={};r.register_event_class=o,r.register_with_event=i;var u=function(){function t(t){void 0===t&&(t={}),this.model_id=null,this._options=t,t.model_id&&(this.model_id=t.model_id)}return t.prototype.set_model_id=function(t){return this._options.model_id=t,this.model_id=t,this},t.prototype.is_applicable_to=function(t){return this.applicable_models.some(function(e){return t instanceof e})},t.event_class=function(t){return t.type?l[t.type]:void s.logger.warn(\"BokehEvent.event_class required events with a string type attribute\")},t.prototype.toJSON=function(){return{event_name:this.event_name,event_values:a.clone(this._options)}},t.prototype._customize_event=function(t){return this},t}();r.BokehEvent=u,u.prototype.applicable_models=[];var c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(u);c=n.__decorate([o(\"button_click\")],c),r.ButtonClick=c;var _=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(u);r.UIEvent=_;var p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(_);p=n.__decorate([o(\"lodstart\")],p),r.LODStart=p;var h=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(_);h=n.__decorate([o(\"lodend\")],h),r.LODEnd=h;var d=function(t){function e(e){var r=t.call(this,e)||this;return r.sx=e.sx,r.sy=e.sy,r.x=null,r.y=null,r}return n.__extends(e,t),e.from_event=function(t,e){return void 0===e&&(e=null),new this({sx:t.bokeh.sx,sy:t.bokeh.sy,model_id:e})},e.prototype._customize_event=function(t){var e=t.plot_canvas.frame.xscales[\"default\"],r=t.plot_canvas.frame.yscales[\"default\"];return this.x=e.invert(t.plot_canvas.canvas.sx_to_vx(this.sx)),this.y=r.invert(t.plot_canvas.canvas.sy_to_vy(this.sy)),this._options.x=this.x,this._options.y=this.y,this},e}(_);r.PointEvent=d;var f=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,e)||this;return r.delta_x=e.delta_x,r.delta_y=e.delta_y,r}return n.__extends(e,t),e.from_event=function(t,e){return void 0===e&&(e=null),new this({sx:t.bokeh.sx,sy:t.bokeh.sy,delta_x:t.deltaX,delta_y:t.deltaY,direction:t.direction,model_id:e})},e}(d);f=n.__decorate([o(\"pan\")],f),r.Pan=f;var m=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,e)||this;return r.scale=e.scale,r}return n.__extends(e,t),e.from_event=function(t,e){return void 0===e&&(e=null),new this({sx:t.bokeh.sx,sy:t.bokeh.sy,scale:t.scale,model_id:e})},e}(d);m=n.__decorate([o(\"pinch\")],m),r.Pinch=m;var y=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,e)||this;return r.delta=e.delta,r}return n.__extends(e,t),e.from_event=function(t,e){return void 0===e&&(e=null),new this({sx:t.bokeh.sx,sy:t.bokeh.sy,delta:t.bokeh.delta,model_id:e})},e}(d);y=n.__decorate([o(\"wheel\")],y),r.MouseWheel=y;var g=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(d);g=n.__decorate([o(\"mousemove\")],g),r.MouseMove=g;var v=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(d);v=n.__decorate([o(\"mouseenter\")],v),r.MouseEnter=v;var b=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(d);b=n.__decorate([o(\"mouseleave\")],b),r.MouseLeave=b;var w=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(d);w=n.__decorate([o(\"tap\")],w),r.Tap=w;var x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(d);x=n.__decorate([o(\"doubletap\")],x),r.DoubleTap=x;var k=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(d);k=n.__decorate([o(\"press\")],k),r.Press=k;var M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(d);M=n.__decorate([o(\"panstart\")],M),r.PanStart=M;var j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(d);j=n.__decorate([o(\"panend\")],j),r.PanEnd=j;var T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(d);T=n.__decorate([o(\"pinchstart\")],T),r.PinchStart=T;var S=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n.__extends(e,t),e}(d);S=n.__decorate([o(\"pinchend\")],S),r.PinchEnd=S},{\"./logging\":\"core/logging\",\"./util/object\":\"core/util/object\",tslib:\"tslib/tslib\"}],\"core/build_views\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./util/array\"),i=t(\"./util/object\");r.build_views=function(t,e,r,n){var s,a,l,u,c,_,p,h,d,f,m,y,g,v;for(null==n&&(n=[]),m=o.difference(Object.keys(t),function(){var t,r,o;for(o=[],t=0,r=e.length;t<r;t++)p=e[t],o.push(p.id);return o}()),l=0,c=m.length;l<c;l++)h=m[l],t[h].remove(),delete t[h];for(s=[],d=e.filter(function(e){return null==t[e.id]}),a=u=0,_=d.length;u<_;a=++u)p=d[a],g=null!=(f=n[a])?f:p.default_view,v=i.extend({model:p},r),t[p.id]=y=new g(v),s.push(y);return s},r.remove_views=function(t){var e,r,o,n,s;for(n=i.keys(t),s=[],r=0,o=n.length;r<o;r++)e=n[r],t[e].remove(),s.push(delete t[e]);return s}},{\"./util/array\":\"core/util/array\",\"./util/object\":\"core/util/object\"}],\"core/dom\":[function(t,e,r){\"use strict\";function o(t,e){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];return h(t).apply(void 0,[e].concat(r))}function i(t){var e=t.parentNode;null!=e&&e.removeChild(t)}function n(t,e){var r=t.parentNode;null!=r&&r.replaceChild(e,t)}function s(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var o=t.firstChild,i=0,n=e;i<n.length;i++){var s=n[i];t.insertBefore(s,o)}}function a(t){for(var e;e=t.firstChild;)t.removeChild(e)}function l(t){t.style.display=\"\"}function u(t){t.style.display=\"none\"}function c(t){return{top:t.offsetTop,left:t.offsetLeft}}function _(t){var e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset-document.documentElement.clientTop,left:e.left+window.pageXOffset-document.documentElement.clientLeft}}Object.defineProperty(r,\"__esModule\",{value:!0});var p=t(\"./util/types\"),h=function(t){return function(e){function r(t){if(t instanceof HTMLElement)n.appendChild(t);else if(p.isString(t))n.appendChild(document.createTextNode(t));else if(null!=t&&t!==!1)throw new Error(\"expected an HTMLElement, string, false or null, got \"+JSON.stringify(t))}void 0===e&&(e={});for(var o=[],i=1;i<arguments.length;i++)o[i-1]=arguments[i];var n;if(\"fragment\"===t)n=document.createDocumentFragment();else{n=document.createElement(t);for(var s in e){var a=e[s];if(null!=a&&(!p.isBoolean(a)||a))if(\"class\"===s&&p.isArray(a))for(var l=0,u=a;l<u.length;l++){var c=u[l];null!=c&&n.classList.add(c)}else if(\"style\"===s&&p.isObject(a))for(var _ in a)n.style[_]=a[_];else n.setAttribute(s,a)}}for(var h=0,d=o;h<d.length;h++){var f=d[h];if(p.isArray(f))for(var m=0,y=f;m<y.length;m++){var g=y[m];r(g)}else r(f)}return n}};r.createElement=o,r.div=h(\"div\"),r.span=h(\"span\"),r.link=h(\"link\"),r.style=h(\"style\"),r.a=h(\"a\"),r.p=h(\"p\"),r.pre=h(\"pre\"),r.button=h(\"button\"),r.input=h(\"input\"),r.label=h(\"label\"),r.canvas=h(\"canvas\"),r.ul=h(\"ul\"),r.ol=h(\"ol\"),r.li=h(\"li\"),r.nbsp=document.createTextNode(\" \"),r.removeElement=i,r.replaceWith=n,r.prepend=s,r.empty=a,r.show=l,r.hide=u,r.position=c,r.offset=_},{\"./util/types\":\"core/util/types\"}],\"core/dom_view\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./view\"),s=t(\"./dom\");r.DOMView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.tagName=\"div\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._has_finished=!1,this.el=this._createElement()},e.prototype.remove=function(){return s.removeElement(this.el),e.__super__.remove.call(this)},e.prototype.layout=function(){},e.prototype.render=function(){},e.prototype.renderTo=function(t,e){return null==e&&(e=!1),e?s.replaceWith(t,this.el):t.appendChild(this.el),this.layout()},e.prototype.has_finished=function(){return this._has_finished},e.prototype.notify_finished=function(){return this.root.notify_finished()},e.getters({solver:function(){return this.is_root?this._solver:this.parent.solver},is_idle:function(){return this.has_finished()}}),e.prototype._createElement=function(){return s.createElement(this.tagName,{id:this.id,\"class\":this.className})},e}(n.View)},{\"./dom\":\"core/dom\",\"./view\":\"core/view\"}],\"core/enums\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.AngleUnits=[\"deg\",\"rad\"],r.Dimension=[\"width\",\"height\"],r.Dimensions=[\"width\",\"height\",\"both\"],r.Direction=[\"clock\",\"anticlock\"],r.FontStyle=[\"normal\",\"italic\",\"bold\"],r.LatLon=[\"lat\",\"lon\"],r.LineCap=[\"butt\",\"round\",\"square\"],r.LineJoin=[\"miter\",\"round\",\"bevel\"],r.Location=[\"above\",\"below\",\"left\",\"right\"],r.LegendLocation=[\"top_left\",\"top_center\",\"top_right\",\"center_left\",\"center\",\"center_right\",\"bottom_left\",\"bottom_center\",\"bottom_right\"],r.Orientation=[\"vertical\",\"horizontal\"],r.OutputBackend=[\"canvas\",\"svg\",\"webgl\"],r.RenderLevel=[\"image\",\"underlay\",\"glyph\",\"annotation\",\"overlay\"],r.RenderMode=[\"canvas\",\"css\"],r.Side=[\"left\",\"right\"],r.SpatialUnits=[\"screen\",\"data\"],r.StartEnd=[\"start\",\"end\"],r.TextAlign=[\"left\",\"right\",\"center\"],r.TextBaseline=[\"top\",\"middle\",\"bottom\",\"alphabetic\",\"hanging\",\"ideographic\"],r.DistributionTypes=[\"uniform\",\"normal\"],r.TransformStepModes=[\"after\",\"before\",\"center\"],r.SizingMode=[\"stretch_both\",\"scale_width\",\"scale_height\",\"scale_both\",\"fixed\"],r.PaddingUnits=[\"percent\",\"absolute\"]},{}],\"core/has_props\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].slice,s=t(\"./logging\"),a=t(\"./signaling\"),l=t(\"./property_mixins\"),u=t(\"./util/refs\"),c=t(\"./properties\"),_=t(\"./util/string\"),p=t(\"./util/array\"),h=t(\"./util/object\"),d=t(\"./util/types\"),f=t(\"./util/eq\");r.HasProps=function(){function t(t,e){var r,o,i,n,s;null==t&&(t={}),null==e&&(e={}),this.document=null,this.destroyed=new a.Signal(this,\"destroyed\"),this.change=new a.Signal(this,\"change\"),this.propchange=new a.Signal(this,\"propchange\"),this.transformchange=new a.Signal(this,\"transformchange\"),this.attributes={},this.properties={},i=this.props;for(o in i){if(n=i[o],s=n.type,r=n.default_value,null==s)throw new Error(\"undefined property type for \"+this.type+\".\"+o);this.properties[o]=new s({obj:this,attr:o,default_value:r})}this._set_after_defaults={},null==t.id&&this.setv(\"id\",_.uniqueId(),{silent:!0}),this.setv(t,h.extend({silent:!0},e)),e.defer_initialization||this.finalize(t,e)}return o(t.prototype,a.Signalable),t.getters=function(t){var e,r,o;o=[];for(r in t)e=t[r],o.push(Object.defineProperty(this.prototype,r,{get:e}));return o},t.prototype.props={},t.prototype.mixins=[],t.define=function(t){var e,r,o;o=[];for(e in t)r=t[e],o.push(function(t){return function(e,r){var o,i,n,s,a;if(null!=t.prototype.props[e])throw new Error(\"attempted to redefine property '\"+t.name+\".\"+e+\"'\");if(null!=t.prototype[e])throw new Error(\"attempted to redefine attribute '\"+t.name+\".\"+e+\"'\");return Object.defineProperty(t.prototype,e,{get:function(){var t;return t=this.getv(e)},set:function(t){return this.setv(e,t),this}},{configurable:!1,enumerable:!0}),a=r[0],o=r[1],i=r[2],s={type:a,default_value:o,internal:null!=i&&i},n=h.clone(t.prototype.props),n[e]=s,t.prototype.props=n}}(this)(e,r));return o},t.internal=function(t){var e,r,o,i;e={},r=function(t){return function(t,r){var o,i;return i=r[0],o=r[1],e[t]=[i,o,!0]}}(this);for(o in t)i=t[o],r(o,i);return this.define(e)},t.mixin=function(){var t,e;return e=1<=arguments.length?n.call(arguments,0):[],this.define(l.create(e)),t=this.prototype.mixins.concat(e),this.prototype.mixins=t},t.mixins=function(t){return this.mixin.apply(this,t)},t.override=function(t,e){var r,o,i;d.isString(t)?(o={},o[r]=e):o=t,i=[];for(r in o)e=o[r],i.push(function(t){return function(e,r){var o,i;if(i=t.prototype.props[e],null==i)throw new Error(\"attempted to override nonexistent '\"+t.name+\".\"+e+\"'\");return o=h.clone(t.prototype.props),o[e]=h.extend({},i,{default_value:r}),t.prototype.props=o}}(this)(r,e));return i},t.define({id:[c.Any]}),t.prototype.toString=function(){return this.type+\"(\"+this.id+\")\"},t.prototype.finalize=function(t,e){var r,o,i;i=this.properties;for(r in i)o=i[r],o.update(),o.spec.transform&&this.connect(o.spec.transform.change,function(){return this.transformchange.emit()});return this.initialize(t,e),this.connect_signals()},t.prototype.initialize=function(t,e){},t.prototype.connect_signals=function(){},t.prototype.disconnect_signals=function(){return a.Signal.disconnectReceiver(this)},t.prototype.destroy=function(){return this.disconnect_signals(),this.destroyed.emit()},t.prototype.clone=function(){return new this.constructor(this.attributes)},t.prototype._setv=function(t,e){var r,o,i,n,s,a,l,u,c;u=e.silent,o=[],i=this._changing,this._changing=!0,n=this.attributes;for(r in t)c=t[r],c=t[r],f.isEqual(n[r],c)||o.push(r),n[r]=c;if(!u)for(o.length&&(this._pending=!0),s=a=0,l=o.length;0<=l?a<l:a>l;s=0<=l?++a:--a)this.properties[o[s]].change.emit(n[o[s]]);if(i)return this;if(!u&&!e.no_change)for(;this._pending;)this._pending=!1,this.change.emit();return this._pending=!1,this._changing=!1,this},t.prototype.setv=function(t,e,r){var o,n,s,a,l;d.isObject(t)||null===t?(o=t,r=e):(o={},o[t]=e),null==r&&(r={});for(t in o)if(i.call(o,t)){if(l=o[t],s=t,null==this.props[s])throw new Error(\"property \"+this.type+\".\"+s+\" wasn't declared\");null!=r&&r.defaults||(this._set_after_defaults[t]=!0)}if(!h.isEmpty(o)){n={};for(t in o)e=o[t],n[t]=this.getv(t);if(this._setv(o,r),null==(null!=r?r.silent:void 0)){a=[];for(t in o)e=o[t],a.push(this._tell_document_about_change(t,n[t],this.getv(t),r));return a}}},t.prototype.set=function(t,e,r){return s.logger.warn(\"HasProps.set('prop_name', value) is deprecated, use HasProps.prop_name = value instead\"),this.setv(t,e,r)},t.prototype.get=function(t){return s.logger.warn(\"HasProps.get('prop_name') is deprecated, use HasProps.prop_name instead\"),this.getv(t)},t.prototype.getv=function(t){if(null==this.props[t])throw new Error(\"property \"+this.type+\".\"+t+\" wasn't declared\");return this.attributes[t]},t.prototype.ref=function(){return u.create_ref(this)},t.prototype.set_subtype=function(t){return this._subtype=t},t.prototype.attribute_is_serializable=function(t){var e;if(e=this.props[t],null==e)throw new Error(this.type+\".attribute_is_serializable('\"+t+\"'): \"+t+\" wasn't declared\");return!e.internal},t.prototype.serializable_attributes=function(){var t,e,r,o;t={},r=this.attributes;for(e in r)o=r[e],this.attribute_is_serializable(e)&&(t[e]=o);return t},t._value_to_json=function(e,r,o){var n,s,a,l,u,c,_;if(r instanceof t)return r.ref();if(d.isArray(r)){for(l=[],n=s=0,a=r.length;s<a;n=++s)_=r[n],l.push(t._value_to_json(n,_,r));return l}if(d.isObject(r)){u={};for(c in r)i.call(r,c)&&(u[c]=t._value_to_json(c,r[c],r));return u}return r},t.prototype.attributes_as_json=function(e,r){var o,n,s,a;null==e&&(e=!0),null==r&&(r=t._value_to_json),o={},s=this.serializable_attributes();for(n in s)i.call(s,n)&&(a=s[n],e?o[n]=a:n in this._set_after_defaults&&(o[n]=a));return r(\"attributes\",o,this)},t._json_record_references=function(e,r,o,n){var s,a,l,c,_,p,h;if(null==r);else if(u.is_ref(r)){if(!(r.id in o))return _=e.get_model_by_id(r.id),t._value_record_references(_,o,n)}else{if(d.isArray(r)){for(p=[],a=0,c=r.length;a<c;a++)s=r[a],p.push(t._json_record_references(e,s,o,n));return p}if(d.isObject(r)){h=[];for(l in r)i.call(r,l)&&(s=r[l],h.push(t._json_record_references(e,s,o,n)));return h}}},t._value_record_references=function(e,r,o){var n,s,a,l,u,c,_,p,h,f,m;if(null==e);else if(e instanceof t){if(!(e.id in r)&&(r[e.id]=e,o)){for(s=e._immediate_references(),h=[],a=0,c=s.length;a<c;a++)p=s[a],h.push(t._value_record_references(p,r,!0));return h}}else if(e.buffer instanceof ArrayBuffer);else{if(d.isArray(e)){for(f=[],u=0,_=e.length;u<_;u++)n=e[u],f.push(t._value_record_references(n,r,o));return f}if(d.isObject(e)){m=[];for(l in e)i.call(e,l)&&(n=e[l],m.push(t._value_record_references(n,r,o)));return m}}},t.prototype._immediate_references=function(){var e,r,o,i;o={},e=this.serializable_attributes();for(r in e)i=e[r],t._value_record_references(i,o,!1);return h.values(o)},t.prototype.references=function(){var e;return e={},t._value_record_references(this,e,!0),h.values(e)},t.prototype.attach_document=function(t){if(null!==this.document&&this.document!==t)throw new Error(\"models must be owned by only a single document\");if(this.document=t,null!=this._doc_attached)return this._doc_attached()},t.prototype.detach_document=function(){return this.document=null},t.prototype._tell_document_about_change=function(e,r,o,i){var n,s,a,l,u,c,_;if(this.attribute_is_serializable(e)&&null!==this.document){l={},t._value_record_references(o,l,!1),_={},t._value_record_references(r,_,!1),n=!1;for(s in l)if(a=l[s],!(s in _)){n=!0;break}if(!n)for(u in _)if(c=_[u],!(u in l)){n=!0;break}return n&&this.document._invalidate_all_models(),this.document._notify_change(this,e,r,o,i)}},t.prototype.materialize_dataspecs=function(t){var e,r,o,i;e={},i=this.properties;for(r in i)o=i[r],o.dataspec&&(!o.optional||null!==o.spec.value||r in this._set_after_defaults)&&(e[\"_\"+r]=o.array(t),null!=o.spec.field&&o.spec.field in t._shapes&&(e[\"_\"+r+\"_shape\"]=t._shapes[o.spec.field]),o instanceof c.Distance&&(e[\"max_\"+r]=p.max(e[\"_\"+r])));return e},t}()},{\"./logging\":\"core/logging\",\"./properties\":\"core/properties\",\"./property_mixins\":\"core/property_mixins\",\"./signaling\":\"core/signaling\",\"./util/array\":\"core/util/array\",\"./util/eq\":\"core/util/eq\",\"./util/object\":\"core/util/object\",\"./util/refs\":\"core/util/refs\",\"./util/string\":\"core/util/string\",\"./util/types\":\"core/util/types\"}],\"core/hittest\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s=t(\"./util/array\"),a=t(\"./util/object\");r.point_in_poly=function(t,e,r,o){var i,n,s,a,l,u,c,_;for(n=!1,l=r[r.length-1],c=o[o.length-1],i=s=0,a=r.length;0<=a?s<a:s>a;i=0<=a?++s:--s)u=r[i],_=o[i],c<e!=_<e&&l+(e-c)/(_-c)*(u-l)<t&&(n=!n),l=u,c=_;return n},i=function(){return null},r.HitTestResult=function(){function t(){this[\"0d\"]={glyph:null,get_view:i,indices:[]},this[\"1d\"]={indices:[]},this[\"2d\"]={indices:{}}}return Object.defineProperty(t.prototype,\"_0d\",{get:function(){return this[\"0d\"]}}),Object.defineProperty(t.prototype,\"_1d\",{get:function(){return this[\"1d\"]}}),Object.defineProperty(t.prototype,\"_2d\",{get:function(){return this[\"2d\"]}}),t.prototype.is_empty=function(){return 0===this._0d.indices.length&&0===this._1d.indices.length},t.prototype.update_through_union=function(t){return this[\"0d\"].indices=s.union(t[\"0d\"].indices,this[\"0d\"].indices),this[\"0d\"].glyph=t[\"0d\"].glyph||this[\"0d\"].glyph,this[\"1d\"].indices=s.union(t[\"1d\"].indices,this[\"1d\"].indices),this[\"2d\"].indices=a.merge(t[\"2d\"].indices,this[\"2d\"].indices)},t}(),r.create_hit_test_result=function(){return new r.HitTestResult},r.create_1d_hit_test_result=function(t){var e,o,i;return i=new r.HitTestResult,i[\"1d\"].indices=function(){var r,i,n,a,l;for(n=s.sortBy(t,function(t){var e,r;return e=t[0],r=t[1]}),l=[],r=0,i=n.length;r<i;r++)a=n[r],o=a[0],e=a[1],l.push(o);return l}(),i},r.validate_bbox_coords=function(t,e){var r,o,i,n,s,a;return i=t[0],n=t[1],s=e[0],a=e[1],i>n&&(r=[n,i],i=r[0],n=r[1]),s>a&&(o=[a,s],s=o[0],a=o[1]),{minX:i,minY:s,maxX:n,maxY:a}},n=function(t){return t*t},r.dist_2_pts=function(t,e,r,o){return n(t-r)+n(e-o)},o=function(t,e,o){var i,n;return i=r.dist_2_pts(e.x,e.y,o.x,o.y),0===i?r.dist_2_pts(t.x,t.y,e.x,e.y):(n=((t.x-e.x)*(o.x-e.x)+(t.y-e.y)*(o.y-e.y))/i,\n",
" n<0?r.dist_2_pts(t.x,t.y,e.x,e.y):n>1?r.dist_2_pts(t.x,t.y,o.x,o.y):r.dist_2_pts(t.x,t.y,e.x+n*(o.x-e.x),e.y+n*(o.y-e.y)))},r.dist_to_segment=function(t,e,r){return Math.sqrt(o(t,e,r))},r.check_2_segments_intersect=function(t,e,r,o,i,n,s,a){var l,u,c,_,p,h,d;return c=(a-n)*(r-t)-(s-i)*(o-e),0===c?{hit:!1,x:null,y:null}:(l=e-n,u=t-i,_=(s-i)*l-(a-n)*u,p=(r-t)*l-(o-e)*u,l=_/c,u=p/c,h=t+l*(r-t),d=e+l*(o-e),{hit:l>0&&l<1&&u>0&&u<1,x:h,y:d})}},{\"./util/array\":\"core/util/array\",\"./util/object\":\"core/util/object\"}],\"core/layout/layout_canvas\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./solver\"),s=t(\"../../model\");r.LayoutCanvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LayoutCanvas\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._top=new n.Variable(\"top \"+this.id),this._left=new n.Variable(\"left \"+this.id),this._width=new n.Variable(\"width \"+this.id),this._height=new n.Variable(\"height \"+this.id),this._right=new n.Variable(\"right \"+this.id),this._bottom=new n.Variable(\"bottom \"+this.id)},e.prototype.get_edit_variables=function(){var t;return t=[],t.push({edit_variable:this._top,strength:n.Strength.strong}),t.push({edit_variable:this._left,strength:n.Strength.strong}),t.push({edit_variable:this._width,strength:n.Strength.strong}),t.push({edit_variable:this._height,strength:n.Strength.strong}),t},e.prototype.get_constraints=function(){return[]},e.getters({layout_bbox:function(){return{top:this._top.value,left:this._left.value,width:this._width.value,height:this._height.value,right:this._right.value,bottom:this._bottom.value}}}),e.prototype.dump_layout=function(){return console.log(this.toString(),this.layout_bbox)},e}(s.Model)},{\"../../model\":\"model\",\"./solver\":\"core/layout/solver\"}],\"core/layout/side_panel\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a,l,u,c,_,p,h,d,f,m,y=function(t,e){function r(){this.constructor=t}for(var o in e)g.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},g={}.hasOwnProperty,v=t(\"./solver\"),b=t(\"./layout_canvas\"),w=t(\"core/properties\"),x=t(\"core/logging\"),k=t(\"core/util/types\");m=Math.PI/2,o=\"alphabetic\",c=\"top\",i=\"bottom\",l=\"middle\",s=\"hanging\",a=\"left\",u=\"right\",n=\"center\",d={above:{parallel:0,normal:-m,horizontal:0,vertical:-m},below:{parallel:0,normal:m,horizontal:0,vertical:m},left:{parallel:-m,normal:0,horizontal:0,vertical:-m},right:{parallel:m,normal:0,horizontal:0,vertical:m}},f={above:{justified:c,parallel:o,normal:l,horizontal:o,vertical:l},below:{justified:i,parallel:s,normal:l,horizontal:s,vertical:l},left:{justified:c,parallel:o,normal:l,horizontal:l,vertical:o},right:{justified:c,parallel:o,normal:l,horizontal:l,vertical:o}},_={above:{justified:n,parallel:n,normal:a,horizontal:n,vertical:a},below:{justified:n,parallel:n,normal:a,horizontal:n,vertical:a},left:{justified:n,parallel:n,normal:u,horizontal:u,vertical:n},right:{justified:n,parallel:n,normal:a,horizontal:a,vertical:n}},p={above:u,below:a,left:u,right:a},h={above:a,below:u,left:u,right:a},r.update_panel_constraints=function(t){var e;if(null==t.model.props.visible||t.model.visible)return e=t.solver,null!=t._size_constraint&&e.has_constraint(t._size_constraint)&&e.remove_constraint(t._size_constraint),t._size_constraint=v.GE(t.model.panel._size,-t._get_size()),e.add_constraint(t._size_constraint),null!=t._full_constraint&&e.has_constraint(t._full_constraint)&&e.remove_constraint(t._full_constraint),t._full_constraint=function(){switch(t.model.panel.side){case\"above\":case\"below\":return v.EQ(t.model.panel._width,[-1,t.plot_model.canvas._width]);case\"left\":case\"right\":return v.EQ(t.model.panel._height,[-1,t.plot_model.canvas._height])}}(),e.add_constraint(t._full_constraint)},r.SidePanel=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return y(e,t),e.internal({side:[w.String],plot:[w.Instance]}),e.prototype.initialize=function(t,r){switch(e.__super__.initialize.call(this,t,r),this.side){case\"above\":return this._dim=0,this._normals=[0,-1],this._size=this._height;case\"below\":return this._dim=0,this._normals=[0,1],this._size=this._height;case\"left\":return this._dim=1,this._normals=[-1,0],this._size=this._width;case\"right\":return this._dim=1,this._normals=[1,0],this._size=this._width;default:return x.logger.error(\"unrecognized side: '\"+this.side+\"'\")}},e.prototype.get_constraints=function(){return[v.GE(this._top),v.GE(this._bottom),v.GE(this._left),v.GE(this._right),v.GE(this._width),v.GE(this._height),v.EQ(this._left,this._width,[-1,this._right]),v.EQ(this._bottom,this._height,[-1,this._top])]},e.prototype.apply_label_text_heuristics=function(t,e){var r,o,i;return i=this.side,k.isString(e)?(o=f[i][e],r=_[i][e]):0===e?(o=f[i][e],r=_[i][e]):e<0?(o=\"middle\",r=p[i]):e>0&&(o=\"middle\",r=h[i]),t.textBaseline=o,t.textAlign=r,t},e.prototype.get_label_angle_heuristic=function(t){var e;return e=this.side,d[e][t]},e}(b.LayoutCanvas)},{\"./layout_canvas\":\"core/layout/layout_canvas\",\"./solver\":\"core/layout/solver\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"core/layout/solver\":[function(t,e,r){\"use strict\";function o(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new n.Constraint(new(n.Expression.bind.apply(n.Expression,[void 0].concat(e))),t)}}function i(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return new n.Constraint(new(n.Expression.bind.apply(n.Expression,[void 0].concat(e))),t,n.Strength.weak)}}Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(\"kiwi\");r.Variable=n.Variable,r.Expression=n.Expression,r.Constraint=n.Constraint,r.Operator=n.Operator,r.Strength=n.Strength,r.EQ=o(n.Operator.Eq),r.LE=o(n.Operator.Le),r.GE=o(n.Operator.Ge),r.WEAK_EQ=i(n.Operator.Eq),r.WEAK_LE=i(n.Operator.Le),r.WEAK_GE=i(n.Operator.Ge);var s=function(){function t(){this.solver=new n.Solver}return t.prototype.clear=function(){this.solver=new n.Solver},t.prototype.toString=function(){return\"Solver(num_constraints=\"+this.num_constraints+\", num_edit_variables=\"+this.num_edit_variables+\")\"},Object.defineProperty(t.prototype,\"num_constraints\",{get:function(){return this.solver.numConstraints},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"num_edit_variables\",{get:function(){return this.solver.numEditVariables},enumerable:!0,configurable:!0}),t.prototype.update_variables=function(){this.solver.updateVariables()},t.prototype.has_constraint=function(t){return this.solver.hasConstraint(t)},t.prototype.add_constraint=function(t){this.solver.addConstraint(t)},t.prototype.remove_constraint=function(t){this.solver.removeConstraint(t)},t.prototype.add_edit_variable=function(t,e){this.solver.addEditVariable(t,e)},t.prototype.remove_edit_variable=function(t){this.solver.removeEditVariable(t)},t.prototype.suggest_value=function(t,e){this.solver.suggestValue(t,e)},t}();r.Solver=s},{kiwi:\"kiwi\"}],\"core/logging\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},l=t(\"./util/types\");s=function(){},n=function(t,e){return null!=console[t]?console[t].bind(console,e):null!=console.log?console.log.bind(console,e):s},i={},o=function(){function t(t,e){this.name=t,this.level=e}return t}(),r.Logger=function(){function t(e,r){null==r&&(r=t.INFO),this._name=e,this.set_level(r)}return t.TRACE=new o(\"trace\",0),t.DEBUG=new o(\"debug\",1),t.INFO=new o(\"info\",2),t.WARN=new o(\"warn\",6),t.ERROR=new o(\"error\",7),t.FATAL=new o(\"fatal\",8),t.OFF=new o(\"off\",9),t.log_levels={trace:t.TRACE,debug:t.DEBUG,info:t.INFO,warn:t.WARN,error:t.ERROR,fatal:t.FATAL,off:t.OFF},Object.defineProperty(t,\"levels\",{get:function(){return Object.keys(t.log_levels)}}),t.get=function(e,r){var o;if(null==r&&(r=t.INFO),l.isString(e)&&e.length>0)return o=i[e],null==o&&(o=i[e]=new t(e,r)),o;throw new TypeError(\"Logger.get() expects a string name and an optional log-level\")},Object.defineProperty(t.prototype,\"level\",{get:function(){return this.get_level()}}),t.prototype.get_level=function(){return this._log_level},t.prototype.set_level=function(e){var r,i,a,u,c;if(e instanceof o)this._log_level=e;else{if(!l.isString(e)||null==t.log_levels[e])throw new Error(\"Logger.set_level() expects a log-level object or a string name of a log-level\");this._log_level=t.log_levels[e]}i=\"[\"+this._name+\"]\",u=t.log_levels,c=[];for(r in u){if(e=u[r],e===t.OFF)break;a=e.name,e.level<this._log_level.level?c.push(this[a]=s):c.push(this[a]=n(a,i))}return c},t}(),r.logger=r.Logger.get(\"bokeh\"),r.set_log_level=function(t){return a.call(r.Logger.levels,t)<0?(console.log(\"[bokeh] unrecognized logging level '\"+t+\"' passed to Bokeh.set_log_level(), ignoring\"),console.log(\"[bokeh] valid log levels are: \"+r.Logger.levels.join(\", \"))):(console.log(\"[bokeh] setting log level to: '\"+t+\"'\"),r.logger.set_level(t))}},{\"./util/types\":\"core/util/types\"}],\"core/properties\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},a=t(\"./signaling\"),l=t(\"./enums\"),u=t(\"./util/svg_colors\"),c=t(\"./util/color\"),_=t(\"./util/array\"),p=t(\"./util/types\");o=function(t){try{return JSON.stringify(t)}catch(e){return t.toString()}},r.Property=function(){function t(t){this.obj=t.obj,this.attr=t.attr,this.default_value=t.default_value,this._init(),this.change=new a.Signal(this.obj,\"change\"),this.connect(this.change,function(t){return function(){return t._init(),t.obj.propchange.emit()}}(this))}return i(t.prototype,a.Signalable),t.prototype.dataspec=!1,t.prototype.update=function(){return this._init()},t.prototype.init=function(){},t.prototype.transform=function(t){return t},t.prototype.validate=function(t){},t.prototype.value=function(t){var e;if(null==t&&(t=!0),void 0===this.spec.value)throw new Error(\"attempted to retrieve property value for property without value specification\");return e=this.transform([this.spec.value])[0],null!=this.spec.transform&&t&&(e=this.spec.transform.compute(e)),e},t.prototype.array=function(t){var e,r,o,i,n;if(!this.dataspec)throw new Error(\"attempted to retrieve property array for non-dataspec property\");if(e=t.data,null!=this.spec.field){if(!(this.spec.field in e))throw new Error(\"attempted to retrieve property array for nonexistent field '\"+this.spec.field+\"'\");i=this.transform(t.get_column(this.spec.field))}else o=t.get_length(),null==o&&(o=1),n=this.value(!1),i=function(){var t,e,i;for(i=[],r=t=0,e=o;0<=e?t<e:t>e;r=0<=e?++t:--t)i.push(n);return i}();return null!=this.spec.transform&&(i=this.spec.transform.v_compute(i)),i},t.prototype._init=function(){var t,e,r,o;if(o=this.obj,null==o)throw new Error(\"missing property object\");if(null==o.properties)throw new Error(\"property object must be a HasProps\");if(t=this.attr,null==t)throw new Error(\"missing property attr\");if(e=o.getv(t),void 0===e&&(r=this.default_value,e=function(){switch(!1){case void 0!==r:return null;case!p.isArray(r):return _.copy(r);case!p.isFunction(r):return r(o);default:return r}}(),o.setv(t,e,{silent:!0,defaults:!0})),p.isArray(e)?this.spec={value:e}:p.isObject(e)&&void 0===e.value!=(void 0===e.field)?this.spec=e:this.spec={value:e},null!=this.spec.field&&!p.isString(this.spec.field))throw new Error(\"field value for property '\"+t+\"' is not a string\");return null!=this.spec.value&&this.validate(this.spec.value),this.init()},t.prototype.toString=function(){return this.name+\"(\"+this.obj+\".\"+this.attr+\", spec: \"+o(this.spec)+\")\"},t}(),r.simple_prop=function(t,e){var n;return n=function(r){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,r),n.prototype.name=t,n.prototype.validate=function(r){if(!e(r))throw new Error(t+\" property '\"+this.attr+\"' given invalid value: \"+o(r))},n}(r.Property)},r.Any=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Any\",function(t){return!0})),r.Array=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Array\",function(t){return p.isArray(t)||t instanceof Float64Array})),r.Bool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Bool\",p.isBoolean)),r.Boolean=r.Bool,r.Color=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Color\",function(t){return null!=u[t.toLowerCase()]||\"#\"===t.substring(0,1)||c.valid_rgb(t)})),r.Instance=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Instance\",function(t){return null!=t.properties})),r.Number=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Number\",function(t){return p.isNumber(t)||p.isBoolean(t)})),r.Int=r.Number,r.Percent=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"Number\",function(t){return(p.isNumber(t)||p.isBoolean(t))&&0<=t&&t<=1})),r.String=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.simple_prop(\"String\",p.isString)),r.Font=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.String),r.enum_prop=function(t,e){var o;return o=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return i(r,e),r.prototype.name=t,r}(r.simple_prop(t,function(t){return s.call(e,t)>=0}))},r.Anchor=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Anchor\",l.LegendLocation)),r.AngleUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"AngleUnits\",l.AngleUnits)),r.Direction=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.transform=function(t){var e,r,o,i;for(i=new Uint8Array(t.length),e=r=0,o=t.length;0<=o?r<o:r>o;e=0<=o?++r:--r)switch(t[e]){case\"clock\":i[e]=!1;break;case\"anticlock\":i[e]=!0}return i},e}(r.enum_prop(\"Direction\",l.Direction)),r.Dimension=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Dimension\",l.Dimension)),r.Dimensions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Dimensions\",l.Dimensions)),r.FontStyle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"FontStyle\",l.FontStyle)),r.LatLon=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LatLon\",l.LatLon)),r.LineCap=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LineCap\",l.LineCap)),r.LineJoin=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LineJoin\",l.LineJoin)),r.LegendLocation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"LegendLocation\",l.LegendLocation)),r.Location=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Location\",l.Location)),r.OutputBackend=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"OutputBackend\",l.OutputBackend)),r.Orientation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Orientation\",l.Orientation)),r.TextAlign=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TextAlign\",l.TextAlign)),r.TextBaseline=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TextBaseline\",l.TextBaseline)),r.RenderLevel=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"RenderLevel\",l.RenderLevel)),r.RenderMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"RenderMode\",l.RenderMode)),r.SizingMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"SizingMode\",l.SizingMode)),r.SpatialUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"SpatialUnits\",l.SpatialUnits)),r.Distribution=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"Distribution\",l.DistributionTypes)),r.TransformStepMode=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"TransformStepMode\",l.TransformStepModes)),r.PaddingUnits=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"PaddingUnits\",l.PaddingUnits)),r.StartEnd=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.enum_prop(\"StartEnd\",l.StartEnd)),r.units_prop=function(t,e,o){var n;return n=function(r){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,r),n.prototype.name=t,n.prototype.init=function(){var r;if(null==this.spec.units&&(this.spec.units=o),this.units=this.spec.units,r=this.spec.units,s.call(e,r)<0)throw new Error(t+\" units must be one of \"+e+\", given invalid value: \"+r)},n}(r.Number)},r.Angle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.transform=function(t){var r;return\"deg\"===this.spec.units&&(t=function(){var e,o,i;for(i=[],e=0,o=t.length;e<o;e++)r=t[e],i.push(r*Math.PI/180);return i}()),t=function(){var e,o,i;for(i=[],e=0,o=t.length;e<o;e++)r=t[e],i.push(-r);return i}(),e.__super__.transform.call(this,t)},e}(r.units_prop(\"Angle\",l.AngleUnits,\"rad\")),r.Distance=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.units_prop(\"Distance\",l.SpatialUnits,\"data\")),r.AngleSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.Angle),r.ColorSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.Color),r.DirectionSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.Distance),r.DistanceSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.Distance),r.FontSizeSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.String),r.NumberSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.Number),r.StringSpec=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.dataspec=!0,e}(r.String)},{\"./enums\":\"core/enums\",\"./signaling\":\"core/signaling\",\"./util/array\":\"core/util/array\",\"./util/color\":\"core/util/color\",\"./util/svg_colors\":\"core/util/svg_colors\",\"./util/types\":\"core/util/types\"}],\"core/property_mixins\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a=t(\"./properties\"),l=t(\"./util/object\");i=function(t,e){var r,o,i;o={},null==e&&(e=\"\");for(r in t)i=t[r],o[e+r]=i;return o},n={line_color:[a.ColorSpec,\"black\"],line_width:[a.NumberSpec,1],line_alpha:[a.NumberSpec,1],line_join:[a.LineJoin,\"miter\"],line_cap:[a.LineCap,\"butt\"],line_dash:[a.Array,[]],line_dash_offset:[a.Number,0]},r.line=function(t){return i(n,t)},o={fill_color:[a.ColorSpec,\"gray\"],fill_alpha:[a.NumberSpec,1]},r.fill=function(t){return i(o,t)},s={text_font:[a.Font,\"helvetica\"],text_font_size:[a.FontSizeSpec,\"12pt\"],text_font_style:[a.FontStyle,\"normal\"],text_color:[a.ColorSpec,\"#444444\"],text_alpha:[a.NumberSpec,1],text_align:[a.TextAlign,\"left\"],text_baseline:[a.TextBaseline,\"bottom\"]},r.text=function(t){return i(s,t)},r.create=function(t){var e,r,o,i,n,s,a;for(a={},r=0,i=t.length;r<i;r++){if(e=t[r],s=e.split(\":\"),o=s[0],n=s[1],null==this[o])throw new Error(\"Unknown property mixin kind '\"+o+\"'\");a=l.extend(a,this[o](n))}return a}},{\"./properties\":\"core/properties\",\"./util/object\":\"core/util/object\"}],\"core/selection_manager\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./has_props\"),s=t(\"./logging\"),a=t(\"./selector\"),l=t(\"./hittest\"),u=t(\"./properties\");r.SelectionManager=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"SelectionManager\",e.internal({source:[u.Any]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.selector=new a.Selector,this.inspectors={},this.last_inspection_was_empty={}},e.prototype.select=function(t,e,r,o,i){var n,a,l,u,c,_,p,h;if(null==i&&(i=!1),h=this.source,h!==e[0].model.data_source&&s.logger.warn(\"select called with mis-matched data sources\"),u=function(){var t,o,i;for(i=[],t=0,o=e.length;t<o;t++)p=e[t],i.push(p.hit_test(r));return i}(),u=function(){var t,e,r;for(r=[],t=0,e=u.length;t<e;t++)n=u[t],null!==n&&r.push(n);return r}(),0===u.length)return!1;if(null!=u){for(a=u[0],c=0,_=u.length;c<_;c++)l=u[c],a.update_through_union(l);return this.selector.update(a,o,i),this.source.selected=this.selector.indices,h.select.emit(),!a.is_empty()}return!1},e.prototype.inspect=function(t,e,r,o){var i,n,a,l;if(l=this.source,l!==e.model.data_source&&s.logger.warn(\"inspect called with mis-matched data sources\"),i=e.hit_test(r),null!=i){if(a=e.model.id,i.is_empty()){if(null==this.last_inspection_was_empty[a]&&(this.last_inspection_was_empty[a]=!1),this.last_inspection_was_empty[a])return;this.last_inspection_was_empty[a]=!0}else this.last_inspection_was_empty[a]=!1;return n=this._get_inspector(e),n.update(i,!0,!1,!0),this.source.setv({inspected:n.indices},{silent:!0}),l.inspect.emit([i,t,e,l,o]),!i.is_empty()}return!1},e.prototype.clear=function(t){return this.selector.clear(),this.source.selected=l.create_hit_test_result()},e.prototype._get_inspector=function(t){var e;return e=t.model.id,null!=this.inspectors[e]?this.inspectors[e]:this.inspectors[e]=new a.Selector},e}(n.HasProps)},{\"./has_props\":\"core/has_props\",\"./hittest\":\"core/hittest\",\"./logging\":\"core/logging\",\"./properties\":\"core/properties\",\"./selector\":\"core/selector\"}],\"core/selector\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./has_props\"),s=t(\"./hittest\"),a=t(\"./properties\");r.Selector=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Selector\",e.prototype.update=function(t,e,r,o){return null==o&&(o=!1),this.setv(\"timestamp\",new Date,{silent:o}),this.setv(\"final\",e,{silent:o}),r&&t.update_through_union(this.indices),this.setv(\"indices\",t,{silent:o})},e.prototype.clear=function(){return this.timestamp=new Date,this[\"final\"]=!0,this.indices=s.create_hit_test_result()},e.internal({indices:[a.Any,function(){return s.create_hit_test_result()}],\"final\":[a.Boolean],timestamp:[a.Any]}),e}(n.HasProps)},{\"./has_props\":\"core/has_props\",\"./hittest\":\"core/hittest\",\"./properties\":\"core/properties\"}],\"core/settings\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(){function t(){this._dev=!1}return Object.defineProperty(t.prototype,\"dev\",{get:function(){return this._dev},set:function(t){this._dev=t},enumerable:!0,configurable:!0}),t}();r.Settings=o,r.settings=new o},{}],\"core/signaling\":[function(t,e,r){\"use strict\";function o(t,e,r,o){return l.find(t,function(t){return t.signal===e&&t.slot===r&&t.context===o})}function i(t){0===h.size&&a.defer(n),h.add(t)}function n(){h.forEach(function(t){l.removeBy(t,function(t){return null==t.signal})}),h.clear()}Object.defineProperty(r,\"__esModule\",{value:!0});var s=t(\"./logging\"),a=t(\"./util/callback\"),l=t(\"./util/array\"),u=function(){function t(t,e){this.sender=t,this.name=e}return t.prototype.connect=function(t,e){void 0===e&&(e=null),_.has(this.sender)||_.set(this.sender,[]);var r=_.get(this.sender);if(null!=o(r,this,t,e))return!1;var i=e||t;p.has(i)||p.set(i,[]);var n=p.get(i),s={signal:this,slot:t,context:e};return r.push(s),n.push(s),!0},t.prototype.disconnect=function(t,e){void 0===e&&(e=null);var r=_.get(this.sender);if(null==r||0===r.length)return!1;var n=o(r,this,t,e);if(null==n)return!1;var s=e||t,a=p.get(s);return n.signal=null,i(r),i(a),!0},t.prototype.emit=function(t){for(var e=_.get(this.sender)||[],r=0,o=e;r<o.length;r++){var i=o[r],n=i.signal,s=i.slot,a=i.context;n===this&&s.call(a,t,this.sender)}},t}();r.Signal=u,function(t){function e(t,e){var r=_.get(t);if(null!=r&&0!==r.length){var o=p.get(e);if(null!=o&&0!==o.length){for(var n=0,s=o;n<s.length;n++){var a=s[n];if(null==a.signal)return;a.signal.sender===t&&(a.signal=null)}i(r),i(o)}}}function r(t){var e=_.get(t);if(null!=e&&0!==e.length){for(var r=0,o=e;r<o.length;r++){var n=o[r];if(null==n.signal)return;var s=n.context||n.slot;n.signal=null,i(p.get(s))}i(e)}}function o(t){var e=p.get(t);if(null!=e&&0!==e.length){for(var r=0,o=e;r<o.length;r++){var n=o[r];if(null==n.signal)return;var s=n.signal.sender;n.signal=null,i(_.get(s))}i(e)}}function n(t){var e=_.get(t);if(null!=e&&0!==e.length){for(var r=0,o=e;r<o.length;r++){var n=o[r];n.signal=null}i(e)}var s=p.get(t);if(null!=s&&0!==s.length){for(var a=0,l=s;a<l.length;a++){var n=l[a];n.signal=null}i(s)}}t.disconnectBetween=e,t.disconnectSender=r,t.disconnectReceiver=o,t.disconnectAll=n}(u=r.Signal||(r.Signal={})),r.Signal=u;var c;!function(t){function e(t,e){return t.connect(e,this)}function r(t,e){s.logger.warn(\"obj.listenTo('event', handler) is deprecated, use obj.connect(signal, slot)\");var r=t.split(\":\"),o=r[0],i=r[1],n=null==i?this[o]:this.properties[i][o];return n.connect(e,this)}function o(t,e){s.logger.warn(\"obj.trigger('event', args) is deprecated, use signal.emit(args)\");var r=t.split(\":\"),o=r[0],i=r[1],n=null==i?this[o]:this.properties[i][o];return n.emit(e)}t.connect=e,t.listenTo=r,t.trigger=o}(c=r.Signalable||(r.Signalable={}));var _=new WeakMap,p=new WeakMap,h=new Set},{\"./logging\":\"core/logging\",\"./util/array\":\"core/util/array\",\"./util/callback\":\"core/util/callback\"}],\"core/ui_events\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"hammerjs\"),i=t(\"./signaling\"),n=t(\"./logging\"),s=t(\"./dom\"),a=t(\"./util/wheel\"),l=t(\"./util/object\"),u=t(\"./bokeh_events\");r.UIEvents=function(){function t(t,e,r,o){this.plot_view=t,this.toolbar=e,this.hit_area=r,this.plot=o,this.tap=new i.Signal(this,\"tap\"),this.doubletap=new i.Signal(this,\"doubletap\"),this.press=new i.Signal(this,\"press\"),this.pan_start=new i.Signal(this,\"pan:start\"),this.pan=new i.Signal(this,\"pan\"),this.pan_end=new i.Signal(this,\"pan:end\"),this.pinch_start=new i.Signal(this,\"pinch:start\"),this.pinch=new i.Signal(this,\"pinch\"),this.pinch_end=new i.Signal(this,\"pinch:end\"),this.rotate_start=new i.Signal(this,\"rotate:start\"),this.rotate=new i.Signal(this,\"rotate\"),this.rotate_end=new i.Signal(this,\"rotate:end\"),this.move_enter=new i.Signal(this,\"move:enter\"),this.move=new i.Signal(this,\"move\"),this.move_exit=new i.Signal(this,\"move:exit\"),this.scroll=new i.Signal(this,\"scroll\"),this.keydown=new i.Signal(this,\"keydown\"),this.keyup=new i.Signal(this,\"keyup\"),this._configure_hammerjs()}return t.prototype._configure_hammerjs=function(){return this.hammer=new o(this.hit_area),this.hammer.get(\"doubletap\").recognizeWith(\"tap\"),this.hammer.get(\"tap\").requireFailure(\"doubletap\"),this.hammer.get(\"doubletap\").dropRequireFailure(\"tap\"),this.hammer.on(\"doubletap\",function(t){return function(e){return t._doubletap(e)}}(this)),this.hammer.on(\"tap\",function(t){return function(e){return t._tap(e)}}(this)),this.hammer.on(\"press\",function(t){return function(e){return t._press(e)}}(this)),this.hammer.get(\"pan\").set({direction:o.DIRECTION_ALL}),this.hammer.on(\"panstart\",function(t){return function(e){return t._pan_start(e)}}(this)),this.hammer.on(\"pan\",function(t){return function(e){return t._pan(e)}}(this)),this.hammer.on(\"panend\",function(t){return function(e){return t._pan_end(e)}}(this)),this.hammer.get(\"pinch\").set({enable:!0}),this.hammer.on(\"pinchstart\",function(t){return function(e){return t._pinch_start(e)}}(this)),this.hammer.on(\"pinch\",function(t){return function(e){return t._pinch(e)}}(this)),this.hammer.on(\"pinchend\",function(t){return function(e){return t._pinch_end(e)}}(this)),this.hammer.get(\"rotate\").set({enable:!0}),this.hammer.on(\"rotatestart\",function(t){return function(e){return t._rotate_start(e)}}(this)),this.hammer.on(\"rotate\",function(t){return function(e){return t._rotate(e)}}(this)),this.hammer.on(\"rotateend\",function(t){return function(e){return t._rotate_end(e)}}(this)),this.hit_area.addEventListener(\"mousemove\",function(t){return function(e){return t._mouse_move(e)}}(this)),this.hit_area.addEventListener(\"mouseenter\",function(t){return function(e){return t._mouse_enter(e)}}(this)),this.hit_area.addEventListener(\"mouseleave\",function(t){return function(e){return t._mouse_exit(e)}}(this)),this.hit_area.addEventListener(\"wheel\",function(t){return function(e){return t._mouse_wheel(e)}}(this)),document.addEventListener(\"keydown\",function(t){return function(e){return t._key_down(e)}}(this)),document.addEventListener(\"keyup\",function(t){return function(e){return t._key_up(e)}}(this))},t.prototype.register_tool=function(t){var e,r,o,i;if(e=t.model.event_type,r=t.model.id,o=t.model.type,null==e)return void n.logger.debug(\"Button tool: \"+o);switch(i=t,e){case\"pan\":null!=i._pan_start&&i.connect(this.pan_start,function(t){if(t.id===r)return i._pan_start(t.e)}),null!=i._pan&&i.connect(this.pan,function(t){if(t.id===r)return i._pan(t.e)}),null!=i._pan_end&&i.connect(this.pan_end,function(t){if(t.id===r)return i._pan_end(t.e)});break;case\"pinch\":null!=i._pinch_start&&i.connect(this.pinch_start,function(t){if(t.id===r)return i._pinch_start(t.e)}),null!=i._pinch&&i.connect(this.pinch,function(t){if(t.id===r)return i._pinch(t.e)}),null!=i._pinch_end&&i.connect(this.pinch_end,function(t){if(t.id===r)return i._pinch_end(t.e)});break;case\"rotate\":null!=i._rotate_start&&i.connect(this.rotate_start,function(t){if(t.id===r)return i._rotate_start(t.e)}),null!=i._rotate&&i.connect(this.rotate,function(t){if(t.id===r)return i._rotate(t.e)}),null!=i._rotate_end&&i.connect(this.rotate_end,function(t){if(t.id===r)return i._rotate_end(t.e)});break;case\"move\":null!=i._move_enter&&i.connect(this.move_enter,function(t){if(t.id===r)return i._move_enter(t.e)}),null!=i._move&&i.connect(this.move,function(t){if(t.id===r)return i._move(t.e)}),null!=i._move_exit&&i.connect(this.move_exit,function(t){if(t.id===r)return i._move_exit(t.e)});break;case\"tap\":null!=i._tap&&i.connect(this.tap,function(t){\n",
" if(t.id===r)return i._tap(t.e)});break;case\"press\":null!=i._press&&i.connect(this.press,function(t){if(t.id===r)return i._press(t.e)});break;case\"scroll\":null!=i._scroll&&i.connect(this.scroll,function(t){if(t.id===r)return i._scroll(t.e)});break;default:throw new Error(\"unsupported event_type: \"+ev)}return null!=i._doubletap&&i.connect(this.doubletap,function(t){return i._doubletap(t.e)}),null!=i._keydown&&i.connect(this.keydown,function(t){return i._keydown(t.e)}),null!=i._keyup&&i.connect(this.keyup,function(t){return i._keyup(t.e)}),(\"ontouchstart\"in window||navigator.maxTouchPoints>0)&&\"pinch\"===e?(n.logger.debug(\"Registering scroll on touch screen\"),i.connect(this.scroll,function(t){if(t.id===r)return i._scroll(t.e)})):void 0},t.prototype._hit_test_renderers=function(t,e){var r,o,i,n;for(o=this.plot_view.get_renderer_views(),r=o.length-1;r>=0;r+=-1)if(n=o[r],(\"annotation\"===(i=n.model.level)||\"overlay\"===i)&&null!=n.bbox&&n.bbox().contains(t,e))return n;return null},t.prototype._hit_test_frame=function(t,e){var r,o,i;return r=this.plot_view.canvas,o=r.sx_to_vx(t),i=r.sy_to_vy(e),this.plot_view.frame.contains(o,i)},t.prototype._trigger=function(t,e){var r,o,i,n,s,a,u,c,_,p,h;switch(a=t.name,n=a.split(\":\")[0],h=this._hit_test_renderers(e.bokeh.sx,e.bokeh.sy),n){case\"move\":for(o=this.toolbar.inspectors.filter(function(t){return t.active}),s=\"default\",null!=h?(null!=h.model.cursor&&(s=h.model.cursor()),l.isEmpty(o)||(t=this.move_exit,a=t.name)):this._hit_test_frame(e.bokeh.sx,e.bokeh.sy)&&(l.isEmpty(o)||(s=\"crosshair\")),this.plot_view.set_cursor(s),p=[],u=0,_=o.length;u<_;u++)c=o[u],p.push(this.trigger(t,e,c.id));return p;case\"tap\":if(null!=h&&\"function\"==typeof h.on_hit&&h.on_hit(e.bokeh.sx,e.bokeh.sy),r=this.toolbar.gestures[n].active,null!=r)return this.trigger(t,e,r.id);break;case\"scroll\":if(i=\"ontouchstart\"in window||navigator.maxTouchPoints>0?\"pinch\":\"scroll\",r=this.toolbar.gestures[i].active,null!=r)return e.preventDefault(),e.stopPropagation(),this.trigger(t,e,r.id);break;default:if(r=this.toolbar.gestures[n].active,null!=r)return this.trigger(t,e,r.id)}},t.prototype.trigger=function(t,e,r){return null==r&&(r=null),t.emit({id:r,e:e})},t.prototype._bokify_hammer=function(t,e){var r,o,i,a,c,_;return null==e&&(e={}),\"mouse\"===t.pointerType?(c=t.srcEvent.pageX,_=t.srcEvent.pageY):(c=t.pointers[0].pageX,_=t.pointers[0].pageY),i=s.offset(t.target),o=i.left,a=i.top,t.bokeh={sx:c-o,sy:_-a},t.bokeh=l.extend(t.bokeh,e),r=u.BokehEvent.event_class(t),null!=r?this.plot.trigger_event(r.from_event(t)):n.logger.debug(\"Unhandled event of type \"+t.type)},t.prototype._bokify_point_event=function(t,e){var r,o,i,a;return null==e&&(e={}),i=s.offset(t.currentTarget),o=i.left,a=i.top,t.bokeh={sx:t.pageX-o,sy:t.pageY-a},t.bokeh=l.extend(t.bokeh,e),r=u.BokehEvent.event_class(t),null!=r?this.plot.trigger_event(r.from_event(t)):n.logger.debug(\"Unhandled event of type \"+t.type)},t.prototype._tap=function(t){return this._bokify_hammer(t),this._trigger(this.tap,t)},t.prototype._doubletap=function(t){return this._bokify_hammer(t),this.trigger(this.doubletap,t)},t.prototype._press=function(t){return this._bokify_hammer(t),this._trigger(this.press,t)},t.prototype._pan_start=function(t){return this._bokify_hammer(t),t.bokeh.sx-=t.deltaX,t.bokeh.sy-=t.deltaY,this._trigger(this.pan_start,t)},t.prototype._pan=function(t){return this._bokify_hammer(t),this._trigger(this.pan,t)},t.prototype._pan_end=function(t){return this._bokify_hammer(t),this._trigger(this.pan_end,t)},t.prototype._pinch_start=function(t){return this._bokify_hammer(t),this._trigger(this.pinch_start,t)},t.prototype._pinch=function(t){return this._bokify_hammer(t),this._trigger(this.pinch,t)},t.prototype._pinch_end=function(t){return this._bokify_hammer(t),this._trigger(this.pinch_end,t)},t.prototype._rotate_start=function(t){return this._bokify_hammer(t),this._trigger(this.rotate_start,t)},t.prototype._rotate=function(t){return this._bokify_hammer(t),this._trigger(this.rotate,t)},t.prototype._rotate_end=function(t){return this._bokify_hammer(t),this._trigger(this.rotate_end,t)},t.prototype._mouse_enter=function(t){return this._bokify_point_event(t),this._trigger(this.move_enter,t)},t.prototype._mouse_move=function(t){return this._bokify_point_event(t),this._trigger(this.move,t)},t.prototype._mouse_exit=function(t){return this._bokify_point_event(t),this._trigger(this.move_exit,t)},t.prototype._mouse_wheel=function(t){return this._bokify_point_event(t,{delta:a.getDeltaY(t)}),this._trigger(this.scroll,t)},t.prototype._key_down=function(t){return this.trigger(this.keydown,t)},t.prototype._key_up=function(t){return this.trigger(this.keyup,t)},t}()},{\"./bokeh_events\":\"core/bokeh_events\",\"./dom\":\"core/dom\",\"./logging\":\"core/logging\",\"./signaling\":\"core/signaling\",\"./util/object\":\"core/util/object\",\"./util/wheel\":\"core/util/wheel\",hammerjs:\"hammerjs\"}],\"core/util/array\":[function(t,e,r){\"use strict\";function o(t){return D.call(t)}function i(t){return(e=[]).concat.apply(e,t);var e}function n(t,e){return t.indexOf(e)>=0}function s(t,e){return t[e>=0?e:t.length+e]}function a(t,e){for(var r=Math.min(t.length,e.length),o=new Array(r),i=0;i<r;i++)o[i]=[t[i],e[i]];return o}function l(t){for(var e=t.length,r=new Array(e),o=new Array(e),i=0;i<e;i++)n=t[i],r[i]=n[0],o[i]=n[1];return[r,o];var n}function u(t,e,r){void 0===r&&(r=1),null==e&&(e=t,t=0);for(var o=Math.max(Math.ceil((e-t)/r),0),i=Array(o),n=0;n<o;n++,t+=r)i[n]=t;return i}function c(t,e,r){void 0===r&&(r=100);for(var o=(e-t)/(r-1),i=new Array(r),n=0;n<r;n++)i[n]=t+o*n;return i}function _(t){for(var e=t.length,r=t[0].length,o=[],i=0;i<r;i++){o[i]=[];for(var n=0;n<e;n++)o[i][n]=t[n][i]}return o}function p(t){return t.reduce(function(t,e){return t+e},0)}function h(t){var e=[];return t.reduce(function(t,r,o){return e[o]=t+r},0),e}function d(t){for(var e,r=1/0,o=0,i=t.length;o<i;o++)e=t[o],e<r&&(r=e);return r}function f(t,e){if(0==t.length)throw new Error(\"minBy() called with an empty array\");for(var r=t[0],o=e(r),i=1,n=t.length;i<n;i++){var s=t[i],a=e(s);a<o&&(r=s,o=a)}return r}function m(t){for(var e,r=-(1/0),o=0,i=t.length;o<i;o++)e=t[o],e>r&&(r=e);return r}function y(t,e){if(0==t.length)throw new Error(\"maxBy() called with an empty array\");for(var r=t[0],o=e(r),i=1,n=t.length;i<n;i++){var s=t[i],a=e(s);a>o&&(r=s,o=a)}return r}function g(t){return f(u(t.length),function(e){return t[e]})}function v(t){return y(u(t.length),function(e){return t[e]})}function b(t,e){for(var r=0,o=t;r<o.length;r++){var i=o[r];if(!e(i))return!1}return!0}function w(t,e){for(var r=0,o=t;r<o.length;r++){var i=o[r];if(e(i))return!0}return!1}function x(t){return function(e,r){for(var o=e.length,i=t>0?0:o-1;i>=0&&i<o;i+=t)if(r(e[i]))return i;return-1}}function k(t,e){var o=r.findIndex(t,e);return o==-1?void 0:t[o]}function M(t,e){var o=r.findLastIndex(t,e);return o==-1?void 0:t[o]}function j(t,e){for(var r=0,o=t.length;r<o;){var i=Math.floor((r+o)/2);t[i]<e?r=i+1:o=i}return r}function T(t,e){var r=t.map(function(t,r){return{value:t,index:r,key:e(t)}});return r.sort(function(t,e){var r=t.key,o=e.key;if(r!==o){if(r>o||void 0===r)return 1;if(r<o||void 0===o)return-1}return t.index-e.index}),r.map(function(t){return t.value})}function S(t){for(var e=[],r=0,o=t;r<o.length;r++){var i=o[r];n(e,i)||e.push(i)}return e}function O(t,e){for(var r=[],o=[],i=0,s=t;i<s.length;i++){var a=s[i],l=e(a);n(o,l)||(o.push(l),r.push(a))}return r}function P(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return S(i(t))}function A(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var o=[];t:for(var i=0,s=t;i<s.length;i++){var a=s[i];if(!n(o,a)){for(var l=0,u=e;l<u.length;l++){var c=u[l];if(!n(c,a))continue t}o.push(a)}}return o}function E(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var o=i(e);return t.filter(function(t){return!n(o,t)})}function z(t,e){for(var r=0;r<t.length;)e(t[r])?t.splice(r,1):r++}function C(t){for(var e=t.length,r=new Array(e),o=0;o<e;o++){var i=N.randomIn(0,o);i!==o&&(r[o]=r[i]),r[i]=t[o]}return r}\n",
" // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n",
" // Underscore may be freely distributed under the MIT license.\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var N=t(\"./math\"),D=Array.prototype.slice;r.copy=o,r.concat=i,r.contains=n,r.nth=s,r.zip=a,r.unzip=l,r.range=u,r.linspace=c,r.transpose=_,r.sum=p,r.cumsum=h,r.min=d,r.minBy=f,r.max=m,r.maxBy=y,r.argmin=g,r.argmax=v,r.all=b,r.any=w,r.findIndex=x(1),r.findLastIndex=x(-1),r.find=k,r.findLast=M,r.sortedIndex=j,r.sortBy=T,r.uniq=S,r.uniqBy=O,r.union=P,r.intersection=A,r.difference=E,r.removeBy=z,r.shuffle=C},{\"./math\":\"core/util/math\"}],\"core/util/bbox\":[function(t,e,r){\"use strict\";function o(){return{minX:1/0,minY:1/0,maxX:-(1/0),maxY:-(1/0)}}function i(){return{minX:Number.MIN_VALUE,minY:-(1/0),maxX:1/0,maxY:1/0}}function n(){return{minX:-(1/0),minY:Number.MIN_VALUE,maxX:1/0,maxY:1/0}}function s(t,e){return{minX:Math.min(t.minX,e.minX),maxX:Math.max(t.maxX,e.maxX),minY:Math.min(t.minY,e.minY),maxY:Math.max(t.maxY,e.maxY)}}Object.defineProperty(r,\"__esModule\",{value:!0}),r.empty=o,r.positive_x=i,r.positive_y=n,r.union=s;var a=function(){function t(t){null==t?(this.x0=1/0,this.y0=-(1/0),this.x1=1/0,this.y1=-(1/0)):(this.x0=t.x0,this.y0=t.y0,this.x1=t.x1,this.y1=t.y1)}return Object.defineProperty(t.prototype,\"minX\",{get:function(){return this.x0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"minY\",{get:function(){return this.y0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"maxX\",{get:function(){return this.x1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"maxY\",{get:function(){return this.y1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"pt0\",{get:function(){return[this.x0,this.y0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"pt1\",{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.x1},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}),t.prototype.contains=function(t,e){return t>=this.x0&&t<=this.x1&&e>=this.y0&&e<=this.y1},t.prototype.union=function(e){return new t({x0:Math.min(this.x0,e.x0),y0:Math.min(this.y0,e.y0),x1:Math.max(this.x1,e.x1),y1:Math.max(this.y1,e.y1)})},t}();r.BBox=a},{}],\"core/util/callback\":[function(t,e,r){\"use strict\";function o(t,e){return setTimeout(t,e)}function i(t){return a(t)}function n(t,e,r){void 0===r&&(r={});var o,i,n,s=null,a=0,l=function(){a=r.leading===!1?0:Date.now(),s=null,n=t.apply(o,i),s||(o=i=null)};return function(){var u=Date.now();a||r.leading!==!1||(a=u);var c=e-(u-a);return o=this,i=arguments,c<=0||c>e?(s&&(clearTimeout(s),s=null),a=u,n=t.apply(o,i),s||(o=i=null)):s||r.trailing===!1||(s=setTimeout(l,c)),n}}function s(t){var e,r=!1;return function(){return r||(r=!0,e=t()),e}}\n",
" // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n",
" // Underscore may be freely distributed under the MIT license.\n",
" Object.defineProperty(r,\"__esModule\",{value:!0}),r.delay=o;var a=\"function\"==typeof requestAnimationFrame?requestAnimationFrame:setImmediate;r.defer=i,r.throttle=n,r.once=s},{}],\"core/util/canvas\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a;n=function(t){if(t.setLineDash||(t.setLineDash=function(e){return t.mozDash=e,t.webkitLineDash=e}),!t.getLineDash)return t.getLineDash=function(){return t.mozDash}},s=function(t){return t.setLineDashOffset=function(e){return t.lineDashOffset=e,t.mozDashOffset=e,t.webkitLineDashOffset=e},t.getLineDashOffset=function(){return t.mozDashOffset}},i=function(t){return t.setImageSmoothingEnabled=function(e){return t.imageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.oImageSmoothingEnabled=e,t.webkitImageSmoothingEnabled=e},t.getImageSmoothingEnabled=function(){var e;return null==(e=t.imageSmoothingEnabled)||e}},a=function(t){if(t.measureText&&null==t.html5MeasureText)return t.html5MeasureText=t.measureText,t.measureText=function(e){var r;return r=t.html5MeasureText(e),r.ascent=1.6*t.html5MeasureText(\"m\").width,r}},o=function(t){var e;if(e=function(e,r,o,i,n,s,a,l){var u,c,_;null==l&&(l=!1),u=.551784,t.translate(e,r),t.rotate(n),c=o,_=i,l&&(c=-o,_=-i),t.moveTo(-c,0),t.bezierCurveTo(-c,_*u,-c*u,_,0,_),t.bezierCurveTo(c*u,_,c,_*u,c,0),t.bezierCurveTo(c,-_*u,c*u,-_,0,-_),t.bezierCurveTo(-c*u,-_,-c,-_*u,-c,0),t.rotate(-n),t.translate(-e,-r)},!t.ellipse)return t.ellipse=e},r.fixup_ctx=function(t){return n(t),s(t),i(t),a(t),o(t)},r.get_scale_ratio=function(t,e,r){var o,i;return\"svg\"===r?1:e?(i=window.devicePixelRatio||1,o=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1,i/o):1}},{}],\"core/util/color\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},n=t(\"./svg_colors\");o=function(t){var e;return e=Number(t).toString(16),e=1===e.length?\"0\"+e:e},r.color2hex=function(t){var e,r,i;return t+=\"\",0===t.indexOf(\"#\")?t:null!=n[t]?n[t]:0===t.indexOf(\"rgb\")?(r=t.match(/\\d+/g),e=function(){var t,e,n;for(n=[],t=0,e=r.length;t<e;t++)i=r[t],n.push(o(i));return n}().join(\"\"),\"#\"+e.slice(0,8)):t},r.color2rgba=function(t,e){var o,i,n;if(null==e&&(e=1),!t)return[0,0,0,0];for(o=r.color2hex(t),o=o.replace(/ |#/g,\"\"),o.length<=4&&(o=o.replace(/(.)/g,\"$1$1\")),o=o.match(/../g),n=function(){var t,e,r;for(r=[],t=0,e=o.length;t<e;t++)i=o[t],r.push(parseInt(i,16)/255);return r}();n.length<3;)n.push(0);return n.length<4&&n.push(e),n.slice(0,4)},r.valid_rgb=function(t){var e,r,o,n;switch(t.substring(0,4)){case\"rgba\":r={start:\"rgba(\",len:4,alpha:!0};break;case\"rgb(\":r={start:\"rgb(\",len:3,alpha:!1};break;default:return!1}if(new RegExp(\".*?(\\\\.).*(,)\").test(t))throw new Error(\"color expects integers for rgb in rgb/rgba tuple, received \"+t);if(e=t.replace(r.start,\"\").replace(\")\",\"\").split(\",\").map(parseFloat),e.length!==r.len)throw new Error(\"color expects rgba \"+expect_len+\"-tuple, received \"+t);if(r.alpha&&!(0<=(o=e[3])&&o<=1))throw new Error(\"color expects rgba 4-tuple to have alpha value between 0 and 1\");if(i.call(function(){var t,r,o,i;for(o=e.slice(0,3),i=[],t=0,r=o.length;t<r;t++)n=o[t],i.push(0<=n&&n<=255);return i}(),!1)>=0)throw new Error(\"color expects rgb to have value between 0 and 255\");return!0}},{\"./svg_colors\":\"core/util/svg_colors\"}],\"core/util/data_structures\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./array\"),i=t(\"./eq\"),n=t(\"./types\");r.MultiDict=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,e){var r;if(null===e)throw new Error(\"Can't put null in this dict\");if(n.isArray(e))throw new Error(\"Can't put arrays in this dict\");return r=this._existing(t),null===r?this._dict[t]=e:n.isArray(r)?r.push(e):this._dict[t]=[r,e]},t.prototype.remove_value=function(t,e){var r,s;return r=this._existing(t),n.isArray(r)?(s=o.difference(r,[e]),s.length>0?this._dict[t]=s:delete this._dict[t]):i.isEqual(r,e)?delete this._dict[t]:void 0},t.prototype.get_one=function(t,e){var r;if(r=this._existing(t),n.isArray(r)){if(1===r.length)return r[0];throw new Error(e)}return r},t}(),r.Set=function(){function t(e){if(e){if(e.constructor===t)return new t(e.values);e.constructor===Array?this.values=t.compact(e):this.values=[e]}else this.values=[]}return t.compact=function(t){var e,r,o,i;for(i=[],r=0,o=t.length;r<o;r++)e=t[r],i.indexOf(e)===-1&&i.push(e);return i},t.prototype.push=function(t){if(this.missing(t))return this.values.push(t)},t.prototype.remove=function(t){var e;return e=this.values.indexOf(t),this.values=this.values.slice(0,e).concat(this.values.slice(e+1))},t.prototype.length=function(){return this.values.length},t.prototype.includes=function(t){return this.values.indexOf(t)!==-1},t.prototype.missing=function(t){return!this.includes(t)},t.prototype.slice=function(t,e){return this.values.slice(t,e)},t.prototype.join=function(t){return this.values.join(t)},t.prototype.toString=function(){return this.join(\", \")},t.prototype.includes=function(t){return this.values.indexOf(t)!==-1},t.prototype.union=function(e){return e=new t(e),new t(this.values.concat(e.values))},t.prototype.intersect=function(e){var r,o,i,n,s;for(e=new t(e),n=new t,s=e.values,o=0,i=s.length;o<i;o++)r=s[o],this.includes(r)&&e.includes(r)&&n.push(r);return n},t.prototype.diff=function(e){var r,o,i,n,s;for(e=new t(e),n=new t,s=this.values,o=0,i=s.length;o<i;o++)r=s[o],e.missing(r)&&n.push(r);return n},t}()},{\"./array\":\"core/util/array\",\"./eq\":\"core/util/eq\",\"./types\":\"core/util/types\"}],\"core/util/eq\":[function(t,e,r){\"use strict\";function o(t,e,r,i){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;var a=s.call(t);if(a!==s.call(e))return!1;switch(a){case\"[object RegExp]\":case\"[object String]\":return\"\"+t==\"\"+e;case\"[object Number]\":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case\"[object Date]\":case\"[object Boolean]\":return+t===+e}var l=\"[object Array]\"===a;if(!l){if(\"object\"!=typeof t||\"object\"!=typeof e)return!1;var u=t.constructor,c=e.constructor;if(u!==c&&!(n.isFunction(u)&&u instanceof u&&n.isFunction(c)&&c instanceof c)&&\"constructor\"in t&&\"constructor\"in e)return!1}r=r||[],i=i||[];for(var _=r.length;_--;)if(r[_]===t)return i[_]===e;if(r.push(t),i.push(e),l){if(_=t.length,_!==e.length)return!1;for(;_--;)if(!o(t[_],e[_],r,i))return!1}else{var p=Object.keys(t),h=void 0;if(_=p.length,Object.keys(e).length!==_)return!1;for(;_--;)if(h=p[_],!e.hasOwnProperty(h)||!o(t[h],e[h],r,i))return!1}return r.pop(),i.pop(),!0}function i(t,e){return o(t,e)}\n",
" // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n",
" // Underscore may be freely distributed under the MIT license.\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(\"./types\"),s=Object.prototype.toString;r.isEqual=i},{\"./types\":\"core/util/types\"}],\"core/util/math\":[function(t,e,r){\"use strict\";function o(t){for(;t<0;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;return t}function i(t,e){return Math.abs(o(t-e))}function n(t,e,r,n){var s=o(t),a=i(e,r),l=i(e,s)<=a&&i(s,r)<=a;return\"anticlock\"==n?l:!l}function s(){return Math.random()}function a(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}function l(t,e){return Math.atan2(e[1]-t[1],e[0]-t[0])}function u(t,e){for(var r,o;;)if(r=s(),o=s(),o=(2*o-1)*Math.sqrt(2*(1/Math.E)),-4*r*r*Math.log(r)>=o*o)break;var i=o/r;return i=t+e*i}function c(t,e,r){return t>r?r:t<e?e:t}Object.defineProperty(r,\"__esModule\",{value:!0}),r.angle_norm=o,r.angle_dist=i,r.angle_between=n,r.random=s,r.randomIn=a,r.atan2=l,r.rnorm=u,r.clamp=c},{}],\"core/util/object\":[function(t,e,r){\"use strict\";function o(t){for(var e=Object.keys(t),r=e.length,o=new Array(r),i=0;i<r;i++)o[i]=t[e[i]];return o}function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var o=0,i=e;o<i.length;o++){var n=i[o];for(var s in n)n.hasOwnProperty(s)&&(t[s]=n[s])}return t}function n(t){return i({},t)}function s(t,e){for(var r=Object.create(Object.prototype),o=u.concat([Object.keys(t),Object.keys(e)]),i=0,n=o;i<n.length;i++){var s=n[i],a=t.hasOwnProperty(s)?t[s]:[],l=e.hasOwnProperty(s)?e[s]:[];r[s]=u.union(a,l)}return r}function a(t){return Object.keys(t).length}function l(t){return 0===a(t)}Object.defineProperty(r,\"__esModule\",{value:!0});var u=t(\"./array\");r.keys=Object.keys,r.values=o,r.extend=i,r.clone=n,r.merge=s,r.size=a,r.isEmpty=l},{\"./array\":\"core/util/array\"}],\"core/util/proj4\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"proj4/lib/core\");r.proj4=o;var i=t(\"proj4/lib/Proj\"),n=t(\"proj4/lib/common/toPoint\"),s=t(\"proj4/lib/defs\"),a=t(\"proj4/lib/transform\");o.defaultDatum=\"WGS84\",o.WGS84=new i(\"WGS84\"),o.Proj=i,o.toPoint=n,o.defs=s,o.transform=a,r.mercator=s(\"GOOGLE\"),r.wgs84=s(\"WGS84\")},{\"proj4/lib/Proj\":\"proj4/lib/Proj\",\"proj4/lib/common/toPoint\":\"proj4/lib/common/toPoint\",\"proj4/lib/core\":\"proj4/lib/core\",\"proj4/lib/defs\":\"proj4/lib/defs\",\"proj4/lib/transform\":\"proj4/lib/transform\"}],\"core/util/projections\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./proj4\");r.project_xy=function(t,e){var r,i,n,s,a,l,u,c;for(s=[],l=[],r=i=0,u=t.length;0<=u?i<u:i>u;r=0<=u?++i:--i)c=o.proj4(o.mercator,[t[r],e[r]]),n=c[0],a=c[1],s[r]=n,l[r]=a;return[s,l]},r.project_xsys=function(t,e){var o,i,n,s,a,l,u,c;for(s=[],l=[],o=i=0,u=t.length;0<=u?i<u:i>u;o=0<=u?++i:--i)c=r.project_xy(t[o],e[o]),n=c[0],a=c[1],s[o]=n,l[o]=a;return[s,l]}},{\"./proj4\":\"core/util/proj4\"}],\"core/util/refs\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"../has_props\"),i=t(\"./types\");r.create_ref=function(t){var e;if(!(t instanceof o.HasProps))throw new Error(\"can only create refs for HasProps subclasses\");return e={type:t.type,id:t.id},null!=t._subtype&&(e.subtype=t._subtype),e},r.is_ref=function(t){var e;if(i.isObject(t)){if(e=Object.keys(t).sort(),2===e.length)return\"id\"===e[0]&&\"type\"===e[1];if(3===e.length)return\"id\"===e[0]&&\"subtype\"===e[1]&&\"type\"===e[2]}return!1},r.convert_to_ref=function(t){return i.isArray(t)?t.map(r.convert_to_ref):t instanceof o.HasProps?t.ref():void 0}},{\"../has_props\":\"core/has_props\",\"./types\":\"core/util/types\"}],\"core/util/selection\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.get_indices=function(t){var e;return e=t.selected,e[\"0d\"].glyph?e[\"0d\"].indices:e[\"1d\"].indices.length>0?e[\"1d\"].indices:e[\"2d\"].indices.length>0?e[\"2d\"].indices:[]}},{}],\"core/util/serialization\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a,l,u=t(\"./types\");o={float32:Float32Array,float64:Float64Array,uint8:Uint8Array,int8:Int8Array,uint16:Uint16Array,int16:Int16Array,uint32:Uint32Array,int32:Int32Array},i={};for(a in o)l=o[a],i[l.name]=a;n=function(t){var e,r,o;return o=new Uint8Array(t),r=function(){var t,r,i;for(i=[],t=0,r=o.length;t<r;t++)e=o[t],i.push(String.fromCharCode(e));return i}(),btoa(r.join(\"\"))},s=function(t){var e,r,o,i,n,s;for(e=atob(t),n=e.length,r=new Uint8Array(n),o=i=0,s=n;0<=s?i<s:i>s;o=0<=s?++i:--i)r[o]=e.charCodeAt(o);return r.buffer},r.decode_base64=function(t){var e,r,i,n;return r=s(t.__ndarray__),i=t.dtype,i in o&&(e=new o[i](r)),n=t.shape,[e,n]},r.encode_base64=function(t,e){var r,o,s;return r=n(t.buffer),s=i[t.constructor.name],o={__ndarray__:r,shape:e,dtype:s}},r.decode_column_data=function(t){var e,o,i,n,s,c,_,p,h,d;c={},i={};for(a in t)if(l=t[a],u.isArray(l)){for(o=[],d=[],n=0,s=l.length;n<s;n++)e=l[n],u.isObject(e)&&\"__ndarray__\"in e?(_=r.decode_base64(e),e=_[0],h=_[1],d.push(h),o.push(e)):u.isArray(e)&&(d.push([]),o.push(e));d.length>0?(c[a]=o,i[a]=d):c[a]=l}else u.isObject(l)&&\"__ndarray__\"in l?(p=r.decode_base64(l),e=p[0],h=p[1],c[a]=e,i[a]=h):(c[a]=l,i[a]=[]);return[c,i]},r.encode_column_data=function(t,e){var o,i,n,s,c,_,p;s={};for(a in t){if(l=t[a],(null!=l?l.buffer:void 0)instanceof ArrayBuffer)l=r.encode_base64(l,null!=e?e[a]:void 0);else if(u.isArray(l)){for(n=[],o=i=0,c=l.length;0<=c?i<c:i>c;o=0<=c?++i:--i)(null!=(_=l[o])?_.buffer:void 0)instanceof ArrayBuffer?n.push(r.encode_base64(l[o],null!=e&&null!=(p=e[a])?p[o]:void 0)):n.push(l[o]);l=n}s[a]=l}return s}},{\"./types\":\"core/util/types\"}],\"core/util/spatial\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"tslib\"),i=t(\"rbush\"),n=function(){function t(){}return t}();r.SpatialIndex=n;var s=function(t){function e(e){var r=t.call(this)||this;return r.index=i(),r.index.load(e),r}return o.__extends(e,t),Object.defineProperty(e.prototype,\"bbox\",{get:function(){var t=this.index.toJSON(),e=t.minX,r=t.minY,o=t.maxX,i=t.maxY;return{minX:e,minY:r,maxX:o,maxY:i}},enumerable:!0,configurable:!0}),e.prototype.search=function(t){return this.index.search(t)},e.prototype.indices=function(t){for(var e=this.search(t),r=e.length,o=new Array(r),i=0;i<r;i++)o[i]=e[i].i;return o},e}(n);r.RBush=s},{rbush:\"rbush\",tslib:\"tslib/tslib\"}],\"core/util/string\":[function(t,e,r){\"use strict\";function o(t,e,r){return void 0===r&&(r=0),t.substr(r,e.length)==e}function i(){for(var t=new Array(32),e=\"0123456789ABCDEF\",r=0;r<32;r++)t[r]=e.substr(Math.floor(16*Math.random()),1);return t[12]=\"4\",t[16]=e.substr(3&t[16].charCodeAt(0)|8,1),t.join(\"\")}function n(t){var e=a.settings.dev?\"j\"+l++:i();return null!=t?t+\"-\"+e:e}function s(t){return t.replace(/(?:[&<>\"'`])/g,function(t){switch(t){case\"&\":return\"&amp;\";case\"<\":return\"&lt;\";case\">\":return\"&gt;\";case'\"':return\"&quot;\";case\"'\":return\"&#x27;\";case\"`\":return\"&#x60;\";default:return t}})}Object.defineProperty(r,\"__esModule\",{value:!0});var a=t(\"../settings\");r.startsWith=o,r.uuid4=i;var l=1e3;r.uniqueId=n,r.escape=s},{\"../settings\":\"core/settings\"}],\"core/util/svg_colors\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.indianred=\"#CD5C5C\",r.lightcoral=\"#F08080\",r.salmon=\"#FA8072\",r.darksalmon=\"#E9967A\",r.lightsalmon=\"#FFA07A\",r.crimson=\"#DC143C\",r.red=\"#FF0000\",r.firebrick=\"#B22222\",r.darkred=\"#8B0000\",r.pink=\"#FFC0CB\",r.lightpink=\"#FFB6C1\",r.hotpink=\"#FF69B4\",r.deeppink=\"#FF1493\",r.mediumvioletred=\"#C71585\",r.palevioletred=\"#DB7093\",r.coral=\"#FF7F50\",r.tomato=\"#FF6347\",r.orangered=\"#FF4500\",r.darkorange=\"#FF8C00\",r.orange=\"#FFA500\",r.gold=\"#FFD700\",r.yellow=\"#FFFF00\",r.lightyellow=\"#FFFFE0\",r.lemonchiffon=\"#FFFACD\",r.lightgoldenrodyellow=\"#FAFAD2\",r.papayawhip=\"#FFEFD5\",r.moccasin=\"#FFE4B5\",r.peachpuff=\"#FFDAB9\",r.palegoldenrod=\"#EEE8AA\",r.khaki=\"#F0E68C\",r.darkkhaki=\"#BDB76B\",r.lavender=\"#E6E6FA\",r.thistle=\"#D8BFD8\",r.plum=\"#DDA0DD\",r.violet=\"#EE82EE\",r.orchid=\"#DA70D6\",r.fuchsia=\"#FF00FF\",r.magenta=\"#FF00FF\",r.mediumorchid=\"#BA55D3\",r.mediumpurple=\"#9370DB\",r.blueviolet=\"#8A2BE2\",r.darkviolet=\"#9400D3\",r.darkorchid=\"#9932CC\",r.darkmagenta=\"#8B008B\",r.purple=\"#800080\",r.indigo=\"#4B0082\",r.slateblue=\"#6A5ACD\",r.darkslateblue=\"#483D8B\",r.mediumslateblue=\"#7B68EE\",r.greenyellow=\"#ADFF2F\",r.chartreuse=\"#7FFF00\",r.lawngreen=\"#7CFC00\",r.lime=\"#00FF00\",r.limegreen=\"#32CD32\",r.palegreen=\"#98FB98\",r.lightgreen=\"#90EE90\",r.mediumspringgreen=\"#00FA9A\",r.springgreen=\"#00FF7F\",r.mediumseagreen=\"#3CB371\",r.seagreen=\"#2E8B57\",r.forestgreen=\"#228B22\",r.green=\"#008000\",r.darkgreen=\"#006400\",r.yellowgreen=\"#9ACD32\",r.olivedrab=\"#6B8E23\",r.olive=\"#808000\",r.darkolivegreen=\"#556B2F\",r.mediumaquamarine=\"#66CDAA\",r.darkseagreen=\"#8FBC8F\",r.lightseagreen=\"#20B2AA\",r.darkcyan=\"#008B8B\",r.teal=\"#008080\",r.aqua=\"#00FFFF\",r.cyan=\"#00FFFF\",r.lightcyan=\"#E0FFFF\",r.paleturquoise=\"#AFEEEE\",r.aquamarine=\"#7FFFD4\",r.turquoise=\"#40E0D0\",r.mediumturquoise=\"#48D1CC\",r.darkturquoise=\"#00CED1\",r.cadetblue=\"#5F9EA0\",r.steelblue=\"#4682B4\",r.lightsteelblue=\"#B0C4DE\",r.powderblue=\"#B0E0E6\",r.lightblue=\"#ADD8E6\",r.skyblue=\"#87CEEB\",r.lightskyblue=\"#87CEFA\",r.deepskyblue=\"#00BFFF\",r.dodgerblue=\"#1E90FF\",r.cornflowerblue=\"#6495ED\",r.royalblue=\"#4169E1\",r.blue=\"#0000FF\",r.mediumblue=\"#0000CD\",r.darkblue=\"#00008B\",r.navy=\"#000080\",r.midnightblue=\"#191970\",r.cornsilk=\"#FFF8DC\",r.blanchedalmond=\"#FFEBCD\",r.bisque=\"#FFE4C4\",r.navajowhite=\"#FFDEAD\",r.wheat=\"#F5DEB3\",r.burlywood=\"#DEB887\",r.tan=\"#D2B48C\",r.rosybrown=\"#BC8F8F\",r.sandybrown=\"#F4A460\",r.goldenrod=\"#DAA520\",r.darkgoldenrod=\"#B8860B\",r.peru=\"#CD853F\",r.chocolate=\"#D2691E\",r.saddlebrown=\"#8B4513\",r.sienna=\"#A0522D\",r.brown=\"#A52A2A\",r.maroon=\"#800000\",r.white=\"#FFFFFF\",r.snow=\"#FFFAFA\",r.honeydew=\"#F0FFF0\",r.mintcream=\"#F5FFFA\",r.azure=\"#F0FFFF\",r.aliceblue=\"#F0F8FF\",r.ghostwhite=\"#F8F8FF\",r.whitesmoke=\"#F5F5F5\",r.seashell=\"#FFF5EE\",r.beige=\"#F5F5DC\",r.oldlace=\"#FDF5E6\",r.floralwhite=\"#FFFAF0\",r.ivory=\"#FFFFF0\",r.antiquewhite=\"#FAEBD7\",r.linen=\"#FAF0E6\",r.lavenderblush=\"#FFF0F5\",r.mistyrose=\"#FFE4E1\",r.gainsboro=\"#DCDCDC\",r.lightgray=\"#D3D3D3\",r.lightgrey=\"#D3D3D3\",r.silver=\"#C0C0C0\",r.darkgray=\"#A9A9A9\",r.darkgrey=\"#A9A9A9\",r.gray=\"#808080\",r.grey=\"#808080\",r.dimgray=\"#696969\",r.dimgrey=\"#696969\",r.lightslategray=\"#778899\",r.lightslategrey=\"#778899\",r.slategray=\"#708090\",r.slategrey=\"#708090\",r.darkslategray=\"#2F4F4F\",r.darkslategrey=\"#2F4F4F\",r.black=\"#000000\"},{}],\"core/util/templating\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=t(\"sprintf\"),n=t(\"numbro\"),s=t(\"timezone\"),a=t(\"./string\"),l=t(\"./types\");o=function(t){var e;return l.isNumber(t)?(e=function(){switch(!1){case Math.floor(t)!==t:return\"%d\";case!(Math.abs(t)>.1&&Math.abs(t)<1e3):return\"%0.3f\";default:return\"%0.3e\"}}(),i.sprintf(e,t)):\"\"+t},r.replace_placeholders=function(t,e,r,l,u){return null==u&&(u={}),t=t.replace(/(^|[^\\$])\\$(\\w+)/g,function(t){return function(t,e,r){return e+\"@$\"+r}}(this)),t=t.replace(/(^|[^@])@(?:(\\$?\\w+)|{([^{}]+)})(?:{([^{}]+)})?/g,function(t){return function(t,c,_,p,h){var d,f,m;if(_=null!=p?p:_,m=\"$\"===_[0]?u[_.substring(1)]:null!=(d=e.get_column(_))?d[r]:void 0,f=null,null==m)f=\"???\";else{if(\"safe\"===h)return\"\"+c+m;if(null!=h)if(null!=l&&_ in l)if(\"numeral\"===l[_])f=n.format(m,h);else if(\"datetime\"===l[_])f=s(m,h);else{if(\"printf\"!==l[_])throw new Error(\"Unknown tooltip field formatter type '\"+l[_]+\"'\");f=i(h,m)}else f=n.format(m,h);else f=o(m)}return f=\"\"+c+a.escape(f)}}(this))}},{\"./string\":\"core/util/string\",\"./types\":\"core/util/types\",numbro:\"numbro\",sprintf:\"sprintf\",timezone:\"timezone/index\"}],\"core/util/text\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=t(\"../dom\");o={},r.get_text_height=function(t){var e,r,n,s;if(null!=o[t])return o[t];s=i.span({style:{font:t}},\"Hg\"),e=i.div({style:{display:\"inline-block\",width:\"1px\",height:\"0px\"}}),r=i.div({},s,e),document.body.appendChild(r);try{n={},e.style.verticalAlign=\"baseline\",n.ascent=i.offset(e).top-i.offset(s).top,e.style.verticalAlign=\"bottom\",n.height=i.offset(e).top-i.offset(s).top,n.descent=n.height-n.ascent}finally{document.body.removeChild(r)}return o[t]=n,n}},{\"../dom\":\"core/dom\"}],\"core/util/throttle\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i;o=function(t){return t()},i=(\"undefined\"!=typeof window&&null!==window?window.requestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.mozRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.webkitRequestAnimationFrame:void 0)||(\"undefined\"!=typeof window&&null!==window?window.msRequestAnimationFrame:void 0)||o,r.throttle=function(t,e){var r,o,n,s,a,l,u,c;return l=[null,null,null,null],o=l[0],r=l[1],c=l[2],u=l[3],a=0,s=!1,n=function(){return a=new Date,c=null,s=!1,u=t.apply(o,r)},function(){var t,l;return t=new Date,l=e-(t-a),o=this,r=arguments,l<=0&&!s?(clearTimeout(c),s=!0,i(n)):c||s||(c=setTimeout(function(){return i(n)},l)),u}}},{}],\"core/util/types\":[function(t,e,r){\"use strict\";function o(t){return t===!0||t===!1||\"[object Boolean]\"===c.call(t)}function i(t){return\"[object Number]\"===c.call(t)}function n(t){return\"[object String]\"===c.call(t)}function s(t){return i(t)&&t!==+t}function a(t){return\"[object Function]\"===c.call(t)}function l(t){return Array.isArray(t)}function u(t){var e=typeof t;return\"function\"===e||\"object\"===e&&!!t}\n",
" // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n",
" // Underscore may be freely distributed under the MIT license.\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var c=Object.prototype.toString;r.isBoolean=o,r.isNumber=i,r.isString=n,r.isStrictNaN=s,r.isFunction=a,r.isArray=l,r.isObject=u},{}],\"core/util/wheel\":[function(t,e,r){\"use strict\";function o(t){var e=getComputedStyle(t).fontSize;return null!=e?parseInt(e,10):null}function i(t){var e=t.offsetParent||document.body;return o(e)||o(t)||16}function n(t){return t.clientHeight}function s(t){var e=-t.deltaY;if(t.target instanceof HTMLElement)switch(t.deltaMode){case t.DOM_DELTA_LINE:e*=i(t.target);break;case t.DOM_DELTA_PAGE:e*=n(t.target)}return e}/*!\n",
" * jQuery Mousewheel 3.1.13\n",
" *\n",
" * Copyright jQuery Foundation and other contributors\n",
" * Released under the MIT license\n",
" * http://jquery.org/license\n",
" */\n",
" Object.defineProperty(r,\"__esModule\",{value:!0}),r.getDeltaY=s},{}],\"core/util/zoom\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./math\");r.scale_highlow=function(t,e,r){var o,i,n,s,a,l;return null==r&&(r=null),n=[t.start,t.end],i=n[0],o=n[1],s=null!=r?r:(o+i)/2,a=i-(i-s)*e,l=o-(o-s)*e,[a,l]},r.get_info=function(t,e){var r,o,i,n,s,a,l,u;l=e[0],u=e[1],o={};for(i in t)s=t[i],n=s.v_invert([l,u],!0),a=n[0],r=n[1],o[i]={start:a,end:r};return o},r.scale_range=function(t,e,i,n,s){var a,l,u,c,_,p,h,d,f,m;return null==i&&(i=!0),null==n&&(n=!0),null==s&&(s=null),e=o.clamp(e,-.9,.9),a=i?e:0,l=r.scale_highlow(t.h_range,a,null!=s?s.x:void 0),_=l[0],p=l[1],f=r.get_info(t.xscales,[_,p]),c=n?e:0,u=r.scale_highlow(t.v_range,c,null!=s?s.y:void 0),h=u[0],d=u[1],m=r.get_info(t.yscales,[h,d]),{xrs:f,yrs:m,factor:e}}},{\"./math\":\"core/util/math\"}],\"core/view\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./signaling\"),s=t(\"./util/string\");r.View=function(){function t(t){var e;if(null==t&&(t={}),this.removed=new n.Signal(this,\"removed\"),null==t.model)throw new Error(\"model of a view wasn't configured\");this.model=t.model,this._parent=t.parent,this.id=null!=(e=t.id)?e:s.uniqueId(),this.initialize(t)}return o(t.prototype,n.Signalable),t.getters=function(t){var e,r,o;o=[];for(r in t)e=t[r],o.push(Object.defineProperty(this.prototype,r,{get:e}));return o},t.prototype.initialize=function(t){},t.prototype.remove=function(){return this._parent=void 0,this.disconnect_signals(),this.removed.emit()},t.prototype.toString=function(){return this.model.type+\"View(\"+this.id+\")\"},t.getters({parent:function(){if(void 0!==this._parent)return this._parent;throw new Error(\"parent of a view wasn't configured\")},is_root:function(){return null===this.parent},root:function(){return this.is_root?this:this.parent.root}}),t.prototype.connect_signals=function(){},t.prototype.disconnect_signals=function(){return n.Signal.disconnectReceiver(this)},t}()},{\"./signaling\":\"core/signaling\",\"./util/string\":\"core/util/string\"}],\"core/visuals\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./property_mixins\"),a=t(\"./util/color\");o=function(){function t(t,e){var r,o,i,n,s;for(null==e&&(e=\"\"),this.obj=t,this.prefix=e,this.cache={},o=t.properties[e+this.do_attr].spec,this.doit=null!==o.value,s=this.attrs,i=0,n=s.length;i<n;i++)r=s[i],this[r]=t.properties[e+r]}return t.prototype.warm_cache=function(t){var e,r,o,i,n,s;for(n=this.attrs,s=[],r=0,o=n.length;r<o;r++)e=n[r],i=this.obj.properties[this.prefix+e],void 0!==i.spec.value?s.push(this.cache[e]=i.spec.value):s.push(this.cache[e+\"_array\"]=i.array(t));return s},t.prototype.cache_select=function(t,e){var r;return r=this.obj.properties[this.prefix+t],void 0!==r.spec.value?this.cache[t]=r.spec.value:this.cache[t]=this.cache[t+\"_array\"][e]},t}(),r.Line=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.attrs=Object.keys(s.line()),e.prototype.do_attr=\"line_color\",e.prototype.set_value=function(t){return t.strokeStyle=this.line_color.value(),t.globalAlpha=this.line_alpha.value(),t.lineWidth=this.line_width.value(),t.lineJoin=this.line_join.value(),t.lineCap=this.line_cap.value(),t.setLineDash(this.line_dash.value()),t.setLineDashOffset(this.line_dash_offset.value())},e.prototype.set_vectorize=function(t,e){if(this.cache_select(\"line_color\",e),t.strokeStyle!==this.cache.line_color&&(t.strokeStyle=this.cache.line_color),this.cache_select(\"line_alpha\",e),t.globalAlpha!==this.cache.line_alpha&&(t.globalAlpha=this.cache.line_alpha),this.cache_select(\"line_width\",e),t.lineWidth!==this.cache.line_width&&(t.lineWidth=this.cache.line_width),this.cache_select(\"line_join\",e),t.lineJoin!==this.cache.line_join&&(t.lineJoin=this.cache.line_join),this.cache_select(\"line_cap\",e),t.lineCap!==this.cache.line_cap&&(t.lineCap=this.cache.line_cap),this.cache_select(\"line_dash\",e),t.getLineDash()!==this.cache.line_dash&&t.setLineDash(this.cache.line_dash),this.cache_select(\"line_dash_offset\",e),t.getLineDashOffset()!==this.cache.line_dash_offset)return t.setLineDashOffset(this.cache.line_dash_offset)},e.prototype.color_value=function(){var t;return t=a.color2rgba(this.line_color.value(),this.line_alpha.value()),\"rgba(\"+255*t[0]+\",\"+255*t[1]+\",\"+255*t[2]+\",\"+t[3]+\")\"},e}(o),r.Fill=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.attrs=Object.keys(s.fill()),e.prototype.do_attr=\"fill_color\",e.prototype.set_value=function(t){return t.fillStyle=this.fill_color.value(),t.globalAlpha=this.fill_alpha.value()},e.prototype.set_vectorize=function(t,e){if(this.cache_select(\"fill_color\",e),t.fillStyle!==this.cache.fill_color&&(t.fillStyle=this.cache.fill_color),this.cache_select(\"fill_alpha\",e),t.globalAlpha!==this.cache.fill_alpha)return t.globalAlpha=this.cache.fill_alpha},e.prototype.color_value=function(){var t;return t=a.color2rgba(this.fill_color.value(),this.fill_alpha.value()),\"rgba(\"+255*t[0]+\",\"+255*t[1]+\",\"+255*t[2]+\",\"+t[3]+\")\"},e}(o),r.Text=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.attrs=Object.keys(s.text()),e.prototype.do_attr=\"text_color\",e.prototype.cache_select=function(t,r){var o;return\"font\"===t?(o=e.__super__.cache_select.call(this,\"text_font_style\",r)+\" \"+e.__super__.cache_select.call(this,\"text_font_size\",r)+\" \"+e.__super__.cache_select.call(this,\"text_font\",r),this.cache.font=o):e.__super__.cache_select.call(this,t,r)},e.prototype.font_value=function(){var t,e,r;return t=this.text_font.value(),e=this.text_font_size.value(),r=this.text_font_style.value(),r+\" \"+e+\" \"+t},e.prototype.color_value=function(){var t;return t=a.color2rgba(this.text_color.value(),this.text_alpha.value()),\"rgba(\"+255*t[0]+\",\"+255*t[1]+\",\"+255*t[2]+\",\"+t[3]+\")\"},e.prototype.set_value=function(t){return t.font=this.font_value(),t.fillStyle=this.text_color.value(),t.globalAlpha=this.text_alpha.value(),t.textAlign=this.text_align.value(),t.textBaseline=this.text_baseline.value()},e.prototype.set_vectorize=function(t,e){if(this.cache_select(\"font\",e),t.font!==this.cache.font&&(t.font=this.cache.font),this.cache_select(\"text_color\",e),t.fillStyle!==this.cache.text_color&&(t.fillStyle=this.cache.text_color),this.cache_select(\"text_alpha\",e),t.globalAlpha!==this.cache.text_alpha&&(t.globalAlpha=this.cache.text_alpha),this.cache_select(\"text_align\",e),t.textAlign!==this.cache.text_align&&(t.textAlign=this.cache.text_align),this.cache_select(\"text_baseline\",e),t.textBaseline!==this.cache.text_baseline)return t.textBaseline=this.cache.text_baseline},e}(o),r.Visuals=function(){function t(t){var e,o,i,n,s,a,l,u,c;for(a=t.mixins,o=0,i=a.length;o<i;o++)c=a[o],l=c.split(\":\"),n=l[0],s=null!=(u=l[1])?u:\"\",e=function(){switch(n){case\"line\":return r.Line;case\"fill\":return r.Fill;case\"text\":return r.Text}}(),this[s+n]=new e(t,s)}return t.prototype.warm_cache=function(t){var e,r,i,s;i=this,s=[];for(e in i)n.call(i,e)&&(r=i[e],r instanceof o?s.push(r.warm_cache(t)):s.push(void 0));return s},t}()},{\"./property_mixins\":\"core/property_mixins\",\"./util/color\":\"core/util/color\"}],document:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},a=t(\"./base\"),l=t(\"./version\"),u=t(\"./core/logging\"),c=t(\"./core/has_props\"),_=t(\"./core/signaling\"),p=t(\"./core/util/refs\"),h=t(\"./core/util/serialization\"),d=t(\"./core/util/data_structures\"),f=t(\"./core/util/array\"),m=t(\"./core/util/object\"),y=t(\"./core/util/eq\"),g=t(\"./core/util/types\"),v=t(\"./models/layouts/layout_dom\"),b=t(\"./models/sources/column_data_source\");o=function(){function t(t){this.document=t,this.session=null,this.subscribed_models=new d.Set}return t.prototype.send_event=function(t){var e;return null!=(e=this.session)?e.send_event(t):void 0},t.prototype.trigger=function(t){var e,r,o,i,n,s;for(n=this.subscribed_models.values,s=[],e=0,r=n.length;e<r;e++)i=n[e],null!==t.model_id&&t.model_id!==i||(o=this.document._all_models[i],s.push(null!=o?o._process_event(t):void 0));return s},t}(),r.DocumentChangedEvent=function(){function t(t){this.document=t}return t}(),r.ModelChangedEvent=function(t){function e(t,r,o,i,n,s){this.document=t,this.model=r,this.attr=o,this.old=i,this.new_=n,this.setter_id=s,e.__super__.constructor.call(this,this.document)}return i(e,t),e.prototype.json=function(t){var e,r,o,i;if(\"id\"===this.attr)throw u.logger.warn(\"'id' field is immutable and should never be in a ModelChangedEvent \",this),new Error(\"'id' field should never change, whatever code just set it is wrong\");r=this.new_,o=this.model.constructor._value_to_json(this.attr,r,this.model),i={},c.HasProps._value_record_references(r,i,!0),this.model.id in i&&this.model!==r&&delete i[this.model.id];for(e in i)t[e]=i[e];return{kind:\"ModelChanged\",model:this.model.ref(),attr:this.attr,\"new\":o}},e}(r.DocumentChangedEvent),r.TitleChangedEvent=function(t){function e(t,r,o){this.document=t,this.title=r,this.setter_id=o,e.__super__.constructor.call(this,this.document)}return i(e,t),e.prototype.json=function(t){return{kind:\"TitleChanged\",title:this.title}},e}(r.DocumentChangedEvent),r.RootAddedEvent=function(t){function e(t,r,o){this.document=t,this.model=r,this.setter_id=o,e.__super__.constructor.call(this,this.document)}return i(e,t),e.prototype.json=function(t){return c.HasProps._value_record_references(this.model,t,!0),{kind:\"RootAdded\",model:this.model.ref()}},e}(r.DocumentChangedEvent),r.RootRemovedEvent=function(t){function e(t,r,o){this.document=t,this.model=r,this.setter_id=o,e.__super__.constructor.call(this,this.document)}return i(e,t),e.prototype.json=function(t){return{kind:\"RootRemoved\",model:this.model.ref()}},e}(r.DocumentChangedEvent),r.documents=[],r.DEFAULT_TITLE=\"Bokeh Application\",r.Document=function(){function t(){r.documents.push(this),this._title=r.DEFAULT_TITLE,this._roots=[],this._all_models={},this._all_models_by_name=new d.MultiDict,this._all_models_freeze_count=0,this._callbacks=[],this.event_manager=new o(this),this.idle=new _.Signal(this,\"idle\"),this._idle_roots=new WeakMap}return Object.defineProperty(t.prototype,\"layoutables\",{get:function(){var t,e,r,o,i;for(r=this._roots,o=[],t=0,e=r.length;t<e;t++)i=r[t],i instanceof v.LayoutDOM&&o.push(i);return o}}),Object.defineProperty(t.prototype,\"is_idle\",{get:function(){var t,e,r,o;for(r=this.layoutables,t=0,e=r.length;t<e;t++)if(o=r[t],!this._idle_roots.has(o))return!1;return!0}}),t.prototype.notify_idle=function(t){if(this._idle_roots.set(t,!0),this.is_idle)return this.idle.emit()},t.prototype.clear=function(){var t;this._push_all_models_freeze();try{for(t=[];this._roots.length>0;)t.push(this.remove_root(this._roots[0]));return t}finally{this._pop_all_models_freeze()}},t.prototype.destructively_move=function(t){var e,r,o,i,n,s,a,l,u;if(t===this)throw new Error(\"Attempted to overwrite a document with itself\");for(t.clear(),u=[],l=this._roots,e=0,o=l.length;e<o;e++)a=l[e],u.push(a);for(this.clear(),r=0,i=u.length;r<i;r++)if(a=u[r],null!==a.document)throw new Error(\"Somehow we didn't detach \"+a);if(0!==Object.keys(this._all_models).length)throw new Error(\"@_all_models still had stuff in it: \"+this._all_models);for(s=0,n=u.length;s<n;s++)a=u[s],t.add_root(a);return t.set_title(this._title)},t.prototype._push_all_models_freeze=function(){return this._all_models_freeze_count+=1},t.prototype._pop_all_models_freeze=function(){if(this._all_models_freeze_count-=1,0===this._all_models_freeze_count)return this._recompute_all_models()},t.prototype._invalidate_all_models=function(){if(u.logger.debug(\"invalidating document models\"),0===this._all_models_freeze_count)return this._recompute_all_models()},t.prototype._recompute_all_models=function(){var t,e,r,o,i,n,s,a,l,u,c,_,p,h,f,y,g,v,b,w,x,k;for(_=new d.Set,g=this._roots,r=0,i=g.length;r<i;r++)f=g[r],_=_.union(f.references());for(h=new d.Set(m.values(this._all_models)),k=h.diff(_),x=_.diff(h),y={},v=_.values,o=0,n=v.length;o<n;o++)l=v[o],y[l.id]=l;for(b=k.values,u=0,s=b.length;u<s;u++)e=b[u],e.detach_document(),c=e.name,null!==c&&this._all_models_by_name.remove_value(c,e);for(w=x.values,p=0,a=w.length;p<a;p++)t=w[p],t.attach_document(this),c=t.name,null!==c&&this._all_models_by_name.add_value(c,t);return this._all_models=y},t.prototype.roots=function(){return this._roots},t.prototype.add_root=function(t,e){if(u.logger.debug(\"Adding root: \"+t),!(s.call(this._roots,t)>=0)){this._push_all_models_freeze();try{this._roots.push(t)}finally{this._pop_all_models_freeze()}return this._trigger_on_change(new r.RootAddedEvent(this,t,e))}},t.prototype.remove_root=function(t,e){var o;if(o=this._roots.indexOf(t),!(o<0)){this._push_all_models_freeze();try{this._roots.splice(o,1)}finally{this._pop_all_models_freeze()}return this._trigger_on_change(new r.RootRemovedEvent(this,t,e))}},t.prototype.title=function(){return this._title},t.prototype.set_title=function(t,e){if(t!==this._title)return this._title=t,this._trigger_on_change(new r.TitleChangedEvent(this,t,e))},t.prototype.get_model_by_id=function(t){return t in this._all_models?this._all_models[t]:null},t.prototype.get_model_by_name=function(t){return this._all_models_by_name.get_one(t,\"Multiple models are named '\"+t+\"'\")},t.prototype.on_change=function(t){if(!(s.call(this._callbacks,t)>=0))return this._callbacks.push(t)},t.prototype.remove_on_change=function(t){var e;if(e=this._callbacks.indexOf(t),e>=0)return this._callbacks.splice(e,1)},t.prototype._trigger_on_change=function(t){var e,r,o,i,n;for(i=this._callbacks,n=[],r=0,o=i.length;r<o;r++)e=i[r],n.push(e(t));return n},t.prototype._notify_change=function(t,e,o,i,n){return\"name\"===e&&(this._all_models_by_name.remove_value(o,t),null!==i&&this._all_models_by_name.add_value(i,t)),this._trigger_on_change(new r.ModelChangedEvent(this,t,e,o,i,null!=n?n.setter_id:void 0))},t._references_json=function(t,e){var r,o,i,n,s;for(null==e&&(e=!0),s=[],r=0,o=t.length;r<o;r++)i=t[r],n=i.ref(),n.attributes=i.attributes_as_json(e),delete n.attributes.id,s.push(n);return s},t._instantiate_object=function(t,e,r){var o,i;return o=m.extend({},r,{id:t}),new(i=a.Models(e))(o,{silent:!0,defer_initialization:!0})},t._instantiate_references_json=function(e,r){var o,i,n,s,a,l,u,c;for(c={},i=0,n=e.length;i<n;i++)s=e[i],l=s.id,u=s.type,a=s.attributes,l in r?o=r[l]:(o=t._instantiate_object(l,u,a),\"subtype\"in s&&o.set_subtype(s.subtype)),c[o.id]=o;return c},t._resolve_refs=function(t,e,r){var o,i,n;return n=function(t){if(p.is_ref(t)){if(t.id in e)return e[t.id];if(t.id in r)return r[t.id];throw new Error(\"reference \"+JSON.stringify(t)+\" isn't known (not in Document?)\")}return g.isArray(t)?o(t):g.isObject(t)?i(t):t},i=function(t){var e,r,o;r={};for(e in t)o=t[e],r[e]=n(o);return r},o=function(t){var e,r,o,i;for(o=[],e=0,r=t.length;e<r;e++)i=t[e],o.push(n(i));return o},n(t)},t._initialize_references_json=function(e,r,o){var i,n,s,a,l,u,_,p,h;for(p={},s=0,a=e.length;s<a;s++)l=e[s],_=l.id,u=l.attributes,h=!1,n=_ in r?r[_]:(h=!0,o[_]),u=t._resolve_refs(u,r,o),p[n.id]=[n,u,h];return i=function(t,e){var r,o,i,n,s;r={},o=function(e,i){var n,s,a,l,u,_,p,d,f,m;if(e instanceof c.HasProps){if(!(e.id in r)&&e.id in t){r[e.id]=!0,p=t[e.id],m=p[0],s=p[1],h=p[2];for(n in s)a=s[n],o(a,i);return i(e,s,h)}}else{if(g.isArray(e)){for(d=[],u=0,_=e.length;u<_;u++)a=e[u],d.push(o(a,i));return d}if(g.isObject(e)){f=[];for(l in e)a=e[l],f.push(o(a,i));return f}}},n=[];for(i in t)s=t[i],n.push(o(s[0],e));return n},i(p,function(t,e,r){if(r)return t.setv(e,{silent:!0})}),i(p,function(t,e,r){if(r)return t.finalize(e)})},t._event_for_attribute_change=function(t,e,r,o,i){var n,s;return n=o.get_model_by_id(t.id),n.attribute_is_serializable(e)?(s={kind:\"ModelChanged\",model:{id:t.id,type:t.type},attr:e,\"new\":r},c.HasProps._json_record_references(o,r,i,!0),s):null},t._events_to_sync_objects=function(e,r,o,i){var n,s,a,l,c,_,p,h,d,m,g,v,b,w,x;for(a=Object.keys(e.attributes),x=Object.keys(r.attributes),b=f.difference(a,x),n=f.difference(x,a),w=f.intersection(a,x),s=[],l=0,p=b.length;l<p;l++)c=b[l],u.logger.warn(\"Server sent key \"+c+\" but we don't seem to have it in our JSON\");for(_=0,h=n.length;_<h;_++)c=n[_],g=r.attributes[c],s.push(t._event_for_attribute_change(e,c,g,o,i));for(m=0,d=w.length;m<d;m++)c=w[m],v=e.attributes[c],g=r.attributes[c],null===v&&null===g||(null===v||null===g?s.push(t._event_for_attribute_change(e,c,g,o,i)):y.isEqual(v,g)||s.push(t._event_for_attribute_change(e,c,g,o,i)));return s.filter(function(t){return null!==t})},t._compute_patch_since_json=function(e,r){var o,i,n,s,a,l,u,c,_,p,h,d,y,g,v,b,w,x,k,M,j,T;for(w=r.to_json(l=!1),b=function(t){var e,r,o,i,n;for(n={},i=t.roots.references,e=0,r=i.length;e<r;e++)o=i[e],n[o.id]=o;return n},i=b(e),s={},n=[],y=e.roots.root_ids,u=0,_=y.length;u<_;u++)d=y[u],s[d]=i[d],n.push(d);for(x=b(w),M={},k=[],g=w.roots.root_ids,c=0,p=g.length;c<p;c++)d=g[c],M[d]=x[d],k.push(d);if(n.sort(),k.sort(),f.difference(n,k).length>0||f.difference(k,n).length>0)throw new Error(\"Not implemented: computing add/remove of document roots\");T={},o=[],v=r._all_models;for(a in v)h=v[a],a in i&&(j=t._events_to_sync_objects(i[a],x[a],r,T),o=o.concat(j));return{events:o,references:t._references_json(m.values(T),l=!1)}},t.prototype.to_json_string=function(t){return null==t&&(t=!0),JSON.stringify(this.to_json(t))},t.prototype.to_json=function(e){var r,o,i,n,s,a;for(null==e&&(e=!0),s=[],n=this._roots,r=0,o=n.length;r<o;r++)i=n[r],s.push(i.id);return a=m.values(this._all_models),{title:this._title,roots:{root_ids:s,references:t._references_json(a,e)}}},t.from_json_string=function(e){var r;if(null===e||null==e)throw new Error(\"JSON string is \"+typeof e);return r=JSON.parse(e),t.from_json(r)},t.from_json=function(e){var r,o,i,n,s,a,c,_,p,h,d;if(u.logger.debug(\"Creating Document from JSON\"),\"object\"!=typeof e)throw new Error(\"JSON object has wrong type \"+typeof e);for(s=e.version,o=s.indexOf(\"+\")!==-1||s.indexOf(\"-\")!==-1,d=\"Library versions: JS (\"+l.version+\") / Python (\"+s+\")\",o||l.version===s?u.logger.debug(d):(u.logger.warn(\"JS/Python version mismatch\"),u.logger.warn(d)),h=e.roots,p=h.root_ids,_=h.references,c=t._instantiate_references_json(_,{}),t._initialize_references_json(_,{},c),r=new t,i=0,n=p.length;i<n;i++)a=p[i],r.add_root(c[a]);return r.set_title(e.title),r},t.prototype.replace_with_json=function(e){var r;return r=t.from_json(e),r.destructively_move(this)},t.prototype.create_json_patch_string=function(t){return JSON.stringify(this.create_json_patch(t))},t.prototype.create_json_patch=function(e){var r,o,i,n,s,a;for(s={},i=[],o=0,n=e.length;o<n;o++){if(r=e[o],r.document!==this)throw u.logger.warn(\"Cannot create a patch using events from a different document, event had \",r.document,\" we are \",this),new Error(\"Cannot create a patch using events from a different document\");i.push(r.json(s))}return a={events:i,references:t._references_json(m.values(s))}},t.prototype.apply_json_patch_string=function(t){return this.apply_json_patch(JSON.parse(t))},t.prototype.apply_json_patch=function(e,r){var o,i,n,s,a,l,c,_,p,d,f,m,y,g,v,w,x,k,M,j,T,S,O,P,A,E,z,C;for(S=e.references,l=e.events,T=t._instantiate_references_json(S,this._all_models),_=0,d=l.length;_<d;_++)if(a=l[_],\"model\"in a)if(m=a.model.id,m in this._all_models)T[m]=this._all_models[m];else if(!(m in T))throw u.logger.warn(\"Got an event for unknown model \",a.model),new Error(\"event model wasn't known\");w={},g={};for(c in T)C=T[c],c in this._all_models?w[c]=C:g[c]=C;for(t._initialize_references_json(S,w,g),O=[],p=0,f=l.length;p<f;p++)switch(a=l[p],a.kind){case\"ModelChanged\":if(x=a.model.id,!(x in this._all_models))throw new Error(\"Cannot apply patch to \"+x+\" which is not in the document\");k=this._all_models[x],o=a.attr,y=a.model.type,\"data\"===o&&\"ColumnDataSource\"===y?(j=h.decode_column_data(a[\"new\"]),s=j[0],z=j[1],O.push(k.setv({_shapes:z,data:s},{setter_id:r}))):(C=t._resolve_refs(a[\"new\"],w,g),O.push(k.setv((v={},v[\"\"+o]=C,v),{setter_id:r})));break;case\"ColumnsStreamed\":if(n=a.column_source.id,!(n in this._all_models))throw new Error(\"Cannot stream to \"+n+\" which is not in the document\");if(i=this._all_models[n],!(i instanceof b.ColumnDataSource))throw new Error(\"Cannot stream to non-ColumnDataSource\");s=a.data,P=a.rollover,O.push(i.stream(s,P));break;case\"ColumnsPatched\":if(n=a.column_source.id,!(n in this._all_models))throw new Error(\"Cannot patch \"+n+\" which is not in the document\");if(i=this._all_models[n],!(i instanceof b.ColumnDataSource))throw new Error(\"Cannot patch non-ColumnDataSource\");M=a.patches,O.push(i.patch(M));break;case\"RootAdded\":A=a.model.id,E=T[A],O.push(this.add_root(E,r));break;case\"RootRemoved\":A=a.model.id,E=T[A],O.push(this.remove_root(E,r));break;case\"TitleChanged\":O.push(this.set_title(a.title,r));break;default:throw new Error(\"Unknown patch event \"+JSON.stringify(a))}return O},t}()},{\"./base\":\"base\",\"./core/has_props\":\"core/has_props\",\"./core/logging\":\"core/logging\",\"./core/signaling\":\"core/signaling\",\"./core/util/array\":\"core/util/array\",\"./core/util/data_structures\":\"core/util/data_structures\",\"./core/util/eq\":\"core/util/eq\",\"./core/util/object\":\"core/util/object\",\"./core/util/refs\":\"core/util/refs\",\"./core/util/serialization\":\"core/util/serialization\",\"./core/util/types\":\"core/util/types\",\"./models/layouts/layout_dom\":\"models/layouts/layout_dom\",\"./models/sources/column_data_source\":\"models/sources/column_data_source\",\"./version\":\"version\"}],embed:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a,l,u,c,_,p,h,d=t(\"./base\"),f=t(\"./client\"),m=t(\"./core/logging\"),y=t(\"./document\"),g=t(\"./core/dom\");r.BOKEH_ROOT=\"bk-root\",n=function(t){var e;if(m.logger.debug(\"handling notebook comms\"),e=JSON.parse(t.content.data),\"events\"in e&&\"references\"in e)return this.apply_json_patch(e);if(\"doc\"in e)return this.replace_with_json(e.doc);throw new Error(\"handling notebook comms message: \",t)},u=function(t,e,r){if(t===r.target_name)return r.on_msg(n.bind(e))},s=function(t,e){var r,o,i,s,a,l;if(\"undefined\"==typeof Jupyter||null===Jupyter||null==Jupyter.notebook.kernel)return console.warn(\"Jupyter notebooks comms not available. push_notebook() will not function\");m.logger.info(\"Registering Jupyter comms for target \"+t),r=Jupyter.notebook.kernel.comm_manager,l=function(r){return u(t,e,r)},a=r.comms;for(i in a)s=a[i],s.then(l);try{return r.register_target(t,function(r,o){return m.logger.info(\"Registering Jupyter comms for target \"+t),r.on_msg(n.bind(e))})}catch(c){return o=c,m.logger.warn(\"Jupyter comms failed to register. push_notebook() will not function. (exception reported: \"+o+\")\")}},o=function(t){var e;return e=new t.default_view({model:t,parent:null}),d.index[t.id]=e,e},a=function(t,e,r){var i,n,s,a,l,u,c;c={},l=function(e){var r;return r=o(e),r.renderTo(t),c[e.id]=r},u=function(e){var r;if(e.id in c)return r=c[e.id],t.removeChild(r.el),delete c[e.id],delete d.index[e.id]},a=e.roots();for(i=0,n=a.length;i<n;i++)s=a[i],l(s);return r&&(window.document.title=e.title()),e.on_change(function(t){return t instanceof y.RootAddedEvent?l(t.model):t instanceof y.RootRemovedEvent?u(t.model):r&&t instanceof y.TitleChangedEvent?window.document.title=t.title:void 0}),c},p=function(t,e,r){var i,n;if(i=r.get_model_by_id(e),null==i)throw new Error(\"Model \"+e+\" was not in document \"+r);return n=o(i),n.renderTo(t,!0)},r.add_document_static=function(t,e,r){return a(t,e,r)},r.add_document_standalone=function(t,e,r){return null==r&&(r=!1),a(e,t,r)},l={},i=function(t,e,r){var o;if(null==t)throw new Error(\"Missing websocket_url\");return t in l||(l[t]={}),o=l[t],e in o||(o[e]=f.pull_session(t,e,r)),o[e]},c=function(t,e,r,o){var n,s;return n=window.location.search.substr(1),s=i(e,r,n),s.then(function(e){return a(t,e.document,o)},function(t){throw m.logger.error(\"Failed to load Bokeh session \"+r+\": \"+t),t})},_=function(t,e,r,n){var s,a;return s=window.location.search.substr(1),a=i(e,n,s),a.then(function(e){var i,n;if(i=e.document.get_model_by_id(r),null==i)throw new Error(\"Did not find model \"+r+\" in session\");return n=o(i),n.renderTo(t,!0)},function(t){throw m.logger.error(\"Failed to load Bokeh session \"+n+\": \"+t),t})},r.inject_css=function(t){var e;return e=g.link({href:t,rel:\"stylesheet\",type:\"text/css\"}),document.body.appendChild(e)},r.inject_raw_css=function(t){var e;return e=g.style({},t),document.body.appendChild(e)},h=function(t,e){var r;return r=t.dataset,null!=r.bokehLogLevel&&r.bokehLogLevel.length>0&&m.set_log_level(r.bokehLogLevel),null!=r.bokehDocId&&r.bokehDocId.length>0&&(e.docid=r.bokehDocId),null!=r.bokehModelId&&r.bokehModelId.length>0&&(e.modelid=r.bokehModelId),null!=r.bokehSessionId&&r.bokehSessionId.length>0&&(e.sessionid=r.bokehSessionId),m.logger.info(\"Will inject Bokeh script tag with params \"+JSON.stringify(e))},r.embed_items=function(t,e,o,i){var n,a,l,u,d,f,v,b,w,x,k,M,j,T,S;M=\"ws:\",\"https:\"===window.location.protocol&&(M=\"wss:\"),x=null!=i?new URL(i):window.location,null!=o?\"/\"===o&&(o=\"\"):o=x.pathname.replace(/\\/+$/,\"\"),S=M+\"//\"+x.host+o+\"/ws\",m.logger.debug(\"embed: computed ws url: \"+S),u={};for(l in t)u[l]=y.Document.from_json(t[l]);for(j=[],v=0,w=e.length;v<w;v++){if(b=e[v],null!=b.notebook_comms_target&&s(b.notebook_comms_target,u[l]),f=b.elementid,d=document.getElementById(f),null==d)throw new Error(\"Error rendering Bokeh model: could not find tag with id: \"+f);if(!document.body.contains(d))throw new Error(\"Error rendering Bokeh model: element with id '\"+f+\"' must be under <body>\");if(\"SCRIPT\"===d.tagName&&(h(d,b),a=g.div({\"class\":r.BOKEH_ROOT}),g.replaceWith(d,a),n=g.div(),a.appendChild(n),d=n),T=null!=b.use_for_title&&b.use_for_title,k=null,null!=b.modelid)if(null!=b.docid)p(d,b.modelid,u[b.docid]);else{if(null==b.sessionid)throw new Error(\"Error rendering Bokeh model \"+b.modelid+\" to element \"+f+\": no document ID or session ID specified\");k=_(d,S,b.modelid,b.sessionid)}else if(null!=b.docid)r.add_document_static(d,u[b.docid],T);else{if(null==b.sessionid)throw new Error(\"Error rendering Bokeh document to element \"+f+\": no document ID or session ID specified\");k=c(d,S,b.sessionid,T)}null!==k?j.push(k.then(function(t){return console.log(\"Bokeh items were rendered successfully\")},function(t){return console.log(\"Error rendering Bokeh items \",t)})):j.push(void 0)}return j}},{\"./base\":\"base\",\"./client\":\"client\",\"./core/dom\":\"core/dom\",\"./core/logging\":\"core/logging\",\"./document\":\"document\"}],main:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),t(\"./polyfill\");var o=t(\"./version\");r.version=o.version;var i=t(\"./embed\");r.embed=i;var n=t(\"./core/logging\");r.logger=n.logger,r.set_log_level=n.set_log_level;var s=t(\"./core/settings\");r.settings=s.settings;var a=t(\"./base\");r.Models=a.Models,r.index=a.index;var l=t(\"./document\");r.documents=l.documents;var u=t(\"./safely\");r.safely=u.safely},{\"./base\":\"base\",\"./core/logging\":\"core/logging\",\"./core/settings\":\"core/settings\",\"./document\":\"document\",\"./embed\":\"embed\",\"./polyfill\":\"polyfill\",\"./safely\":\"safely\",\"./version\":\"version\"}],model:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./core/has_props\"),s=t(\"./core/properties\"),a=t(\"./core/util/types\"),l=t(\"./core/util/object\"),u=t(\"./core/logging\");r.Model=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Model\",e.define({tags:[s.Array,[]],name:[s.String],js_property_callbacks:[s.Any,{}],js_event_callbacks:[s.Any,{}],subscribed_events:[s.Array,[]]}),e.prototype.connect_signals=function(){var t,r,o,i,n,s,a,l,u;e.__super__.connect_signals.call(this),a=this.js_property_callbacks;for(i in a)for(r=a[i],l=i.split(\":\"),i=l[0],t=null!=(u=l[1])?u:null,n=0,s=r.length;n<s;n++)o=r[n],null!==t?this.connect(this.properties[t][i],function(){return o.execute(this)}):this.connect(this[i],function(){return o.execute(this)});return this.connect(this.properties.js_event_callbacks.change,function(){return this._update_event_callbacks}),this.connect(this.properties.subscribed_events.change,function(){return this._update_event_callbacks})},e.prototype._process_event=function(t){var e,r,o,i,n;if(t.is_applicable_to(this)){for(t=t._customize_event(this),n=null!=(i=this.js_event_callbacks[t.event_name])?i:[],r=0,o=n.length;r<o;r++)e=n[r],e.execute(t,{});if(this.subscribed_events.some(function(e){return e===t.event_name}))return this.document.event_manager.send_event(t)}},e.prototype.trigger_event=function(t){var e;return null!=(e=this.document)?e.event_manager.trigger(t.set_model_id(this.id)):void 0},e.prototype._update_event_callbacks=function(){return null==this.document?void u.logger.warn(\"WARNING: Document not defined for updating event callbacks\"):this.document.event_manager.subscribed_models.push(this.id)},e.prototype._doc_attached=function(){if(!l.isEmpty(this.js_event_callbacks)||!l.isEmpty(this.subscribed_events))return this._update_event_callbacks()},e.prototype.select=function(t){if(t.prototype instanceof e)return this.references().filter(function(e){return e instanceof t});if(a.isString(t))return this.references().filter(function(e){return e.name===t});throw new Error(\"invalid selector\")},e.prototype.select_one=function(t){var e;switch(e=this.select(t),e.length){case 0:return null;case 1:return e[0];default:throw new Error(\"found more than one object matching given selector\")}},e}(n.HasProps)},{\"./core/has_props\":\"core/has_props\",\"./core/logging\":\"core/logging\",\"./core/properties\":\"core/properties\",\"./core/util/object\":\"core/util/object\",\"./core/util/types\":\"core/util/types\"}],\"models/annotations/annotation\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/layout/side_panel\"),s=t(\"core/properties\"),a=t(\"../renderers/renderer\");r.AnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._get_panel_offset=function(){var t,e;return t=this.model.panel._left.value,e=this.model.panel._bottom.value,{x:t,y:-e}},e.prototype._get_size=function(){return-1},e}(a.RendererView),r.Annotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Annotation\",e.prototype.default_view=r.AnnotationView,e.define({plot:[s.Instance]}),e.override({level:\"annotation\"}),e.prototype.add_panel=function(t){return this.panel=new n.SidePanel({side:t}),this.panel.attach_document(this.document),this.level=\"overlay\"},e}(a.Renderer)},{\"../renderers/renderer\":\"models/renderers/renderer\",\"core/layout/side_panel\":\"core/layout/side_panel\",\"core/properties\":\"core/properties\"}],\"models/annotations/arrow\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"./arrow_head\"),a=t(\"../sources/column_data_source\"),l=t(\"core/properties\"),u=t(\"core/util/math\");\n",
" r.ArrowView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),null==this.model.source&&(this.model.source=new a.ColumnDataSource),this.canvas=this.plot_model.canvas,this.set_data(this.model.source)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source)})},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,r,o;return e=\"data\"===this.model.start_units?this.plot_view.map_to_screen(this._x_start,this._y_start,r=this.model.x_range_name,o=this.model.y_range_name):[this.canvas.v_vx_to_sx(this._x_start),this.canvas.v_vy_to_sy(this._y_start)],t=\"data\"===this.model.end_units?this.plot_view.map_to_screen(this._x_end,this._y_end,r=this.model.x_range_name,o=this.model.y_range_name):[this.canvas.v_vx_to_sx(this._x_end),this.canvas.v_vy_to_sy(this._y_end)],[e,t]},e.prototype.render=function(){var t,e;if(this.model.visible)return t=this.plot_view.canvas_view.ctx,t.save(),e=this._map_data(),this.start=e[0],this.end=e[1],null!=this.model.end&&this._arrow_head(t,\"render\",this.model.end,this.start,this.end),null!=this.model.start&&this._arrow_head(t,\"render\",this.model.start,this.end,this.start),t.beginPath(),t.rect(0,0,this.canvas._width.value,this.canvas._height.value),null!=this.model.end&&this._arrow_head(t,\"clip\",this.model.end,this.start,this.end),null!=this.model.start&&this._arrow_head(t,\"clip\",this.model.start,this.end,this.start),t.closePath(),t.clip(),this._arrow_body(t),t.restore()},e.prototype._arrow_body=function(t){var e,r,o,i;if(this.visuals.line.doit){for(i=[],e=r=0,o=this._x_start.length;0<=o?r<o:r>o;e=0<=o?++r:--r)this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(this.start[0][e],this.start[1][e]),t.lineTo(this.end[0][e],this.end[1][e]),i.push(t.stroke());return i}},e.prototype._arrow_head=function(t,e,r,o,i){var n,s,a,l,c;for(c=[],s=a=0,l=this._x_start.length;0<=l?a<l:a>l;s=0<=l?++a:--a)n=Math.PI/2+u.atan2([o[0][s],o[1][s]],[i[0][s],i[1][s]]),t.save(),t.translate(i[0][s],i[1][s]),t.rotate(n),\"render\"===e?r.render(t):\"clip\"===e&&r.clip(t),c.push(t.restore());return c},e}(n.AnnotationView),r.Arrow=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.ArrowView,e.prototype.type=\"Arrow\",e.mixins([\"line\"]),e.define({x_start:[l.NumberSpec],y_start:[l.NumberSpec],start_units:[l.String,\"data\"],start:[l.Instance,null],x_end:[l.NumberSpec],y_end:[l.NumberSpec],end_units:[l.String,\"data\"],end:[l.Instance,new s.OpenHead({})],source:[l.Instance],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),e}(n.Annotation)},{\"../sources/column_data_source\":\"models/sources/column_data_source\",\"./annotation\":\"models/annotations/annotation\",\"./arrow_head\":\"models/annotations/arrow_head\",\"core/properties\":\"core/properties\",\"core/util/math\":\"core/util/math\"}],\"models/annotations/arrow_head\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/visuals\"),a=t(\"core/properties\");r.ArrowHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ArrowHead\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.visuals=new s.Visuals(this)},e.prototype.render=function(t,e){return null},e.prototype.clip=function(t,e){return null},e}(n.Annotation),r.OpenHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"OpenHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(0,0),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.stroke()},e.mixins([\"line\"]),e.define({size:[a.Number,25]}),e}(r.ArrowHead),r.NormalHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"NormalHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,e),this._normal(t,e),t.fill()),this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),this._normal(t,e),t.stroke()},e.prototype._normal=function(t,e){return t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.closePath()},e.mixins([\"line\",\"fill\"]),e.define({size:[a.Number,25]}),e.override({fill_color:\"black\"}),e}(r.ArrowHead),r.VeeHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"VeeHead\",e.prototype.clip=function(t,e){return this.visuals.line.set_vectorize(t,e),t.moveTo(.5*this.size,this.size),t.lineTo(.5*this.size,-2),t.lineTo(-.5*this.size,-2),t.lineTo(-.5*this.size,this.size),t.lineTo(0,.5*this.size),t.lineTo(.5*this.size,this.size)},e.prototype.render=function(t,e){if(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,e),this._vee(t,e),t.fill()),this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),this._vee(t,e),t.stroke()},e.prototype._vee=function(t,e){return t.beginPath(),t.moveTo(.5*this.size,this.size),t.lineTo(0,0),t.lineTo(-.5*this.size,this.size),t.lineTo(0,.5*this.size),t.closePath()},e.mixins([\"line\",\"fill\"]),e.define({size:[a.Number,25]}),e.override({fill_color:\"black\"}),e}(r.ArrowHead),r.TeeHead=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"TeeHead\",e.prototype.render=function(t,e){if(this.visuals.line.doit)return this.visuals.line.set_vectorize(t,e),t.beginPath(),t.moveTo(.5*this.size,0),t.lineTo(-.5*this.size,0),t.stroke()},e.mixins([\"line\"]),e.define({size:[a.Number,25]}),e}(r.ArrowHead)},{\"./annotation\":\"models/annotations/annotation\",\"core/properties\":\"core/properties\",\"core/visuals\":\"core/visuals\"}],\"models/annotations/band\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"../sources/column_data_source\"),a=t(\"core/properties\");r.BandView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.set_data(this.model.source)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source)})},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,r,o,i,n,s,a,l,u,c,_;return c=this.plot_view.frame.xscales[this.model.x_range_name],_=this.plot_view.frame.yscales[this.model.y_range_name],l=\"height\"===this.model.dimension?_:c,n=\"height\"===this.model.dimension?c:_,r=\"data\"===this.model.lower.units?l.v_compute(this._lower):this._lower,i=\"data\"===this.model.upper.units?l.v_compute(this._upper):this._upper,t=\"data\"===this.model.base.units?n.v_compute(this._base):this._base,u=this.model._normals(),s=u[0],a=u[1],e=[r,t],o=[i,t],this._lower_sx=this.plot_model.canvas.v_vx_to_sx(e[s]),this._lower_sy=this.plot_model.canvas.v_vy_to_sy(e[a]),this._upper_sx=this.plot_model.canvas.v_vx_to_sx(o[s]),this._upper_sy=this.plot_model.canvas.v_vy_to_sy(o[a])},e.prototype.render=function(){var t,e,r,o,i,n,s,a,l,u;if(this.model.visible){for(this._map_data(),t=this.plot_view.canvas_view.ctx,t.beginPath(),t.moveTo(this._lower_sx[0],this._lower_sy[0]),e=r=0,s=this._lower_sx.length;0<=s?r<s:r>s;e=0<=s?++r:--r)t.lineTo(this._lower_sx[e],this._lower_sy[e]);for(e=o=a=this._upper_sx.length-1;a<=0?o<=0:o>=0;e=a<=0?++o:--o)t.lineTo(this._upper_sx[e],this._upper_sy[e]);for(t.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_value(t),t.fill()),t.beginPath(),t.moveTo(this._lower_sx[0],this._lower_sy[0]),e=i=0,l=this._lower_sx.length;0<=l?i<l:i>l;e=0<=l?++i:--i)t.lineTo(this._lower_sx[e],this._lower_sy[e]);for(this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),t.beginPath(),t.moveTo(this._upper_sx[0],this._upper_sy[0]),e=n=0,u=this._upper_sx.length;0<=u?n<u:n>u;e=0<=u?++n:--n)t.lineTo(this._upper_sx[e],this._upper_sy[e]);return this.visuals.line.doit?(this.visuals.line.set_value(t),t.stroke()):void 0}},e}(n.AnnotationView),r.Band=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.BandView,e.prototype.type=\"Band\",e.mixins([\"line\",\"fill\"]),e.define({lower:[a.DistanceSpec],upper:[a.DistanceSpec],base:[a.DistanceSpec],dimension:[a.Dimension,\"height\"],source:[a.Instance,function(){return new s.ColumnDataSource}],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype._normals=function(){var t,e,r,o;return\"height\"===this.dimension?(r=[1,0],t=r[0],e=r[1]):(o=[0,1],t=o[0],e=o[1]),[t,e]},e}(n.Annotation)},{\"../sources/column_data_source\":\"models/sources/column_data_source\",\"./annotation\":\"models/annotations/annotation\",\"core/properties\":\"core/properties\"}],\"models/annotations/box_annotation\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/signaling\"),a=t(\"core/dom\"),l=t(\"core/properties\"),u=t(\"core/util/types\");r.BoxAnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.classList.add(\"bk-shading\"),a.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?(this.connect(this.model.change,function(){return this.render()}),this.connect(this.model.data_update,function(){return this.render()})):(this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.data_update,function(t){return function(){return t.plot_view.request_render()}}(this)))},e.prototype.render=function(){var t,e,r,o,i,n,s,l;if(this.model.visible||\"css\"!==this.model.render_mode||a.hide(this.el),this.model.visible)return null==this.model.left&&null==this.model.right&&null==this.model.top&&null==this.model.bottom?(a.hide(this.el),null):(e=this.plot_model.frame,t=this.plot_model.canvas,s=this.plot_view.frame.xscales[this.model.x_range_name],l=this.plot_view.frame.yscales[this.model.y_range_name],o=t.vx_to_sx(this._calc_dim(this.model.left,this.model.left_units,s,e.h_range.start)),i=t.vx_to_sx(this._calc_dim(this.model.right,this.model.right_units,s,e.h_range.end)),r=t.vy_to_sy(this._calc_dim(this.model.bottom,this.model.bottom_units,l,e.v_range.start)),n=t.vy_to_sy(this._calc_dim(this.model.top,this.model.top_units,l,e.v_range.end)),\"css\"===this.model.render_mode?this._css_box(o,i,r,n):this._canvas_box(o,i,r,n))},e.prototype._css_box=function(t,e,r,o){var i,n,s;return s=Math.abs(e-t),n=Math.abs(r-o),this.el.style.left=t+\"px\",this.el.style.width=s+\"px\",this.el.style.top=o+\"px\",this.el.style.height=n+\"px\",this.el.style.borderWidth=this.model.line_width.value+\"px\",this.el.style.borderColor=this.model.line_color.value,this.el.style.backgroundColor=this.model.fill_color.value,this.el.style.opacity=this.model.fill_alpha.value,i=this.model.line_dash,u.isArray(i)&&(i=i.length<2?\"solid\":\"dashed\"),u.isString(i)&&(this.el.style.borderStyle=i),a.show(this.el)},e.prototype._canvas_box=function(t,e,r,o){var i;return i=this.plot_view.canvas_view.ctx,i.save(),i.beginPath(),i.rect(t,o,e-t,r-o),this.visuals.fill.set_value(i),i.fill(),this.visuals.line.set_value(i),i.stroke(),i.restore()},e.prototype._calc_dim=function(t,e,r,o){var i;return i=null!=t?\"data\"===e?r.compute(t):t:o},e}(n.AnnotationView),r.BoxAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.BoxAnnotationView,e.prototype.type=\"BoxAnnotation\",e.mixins([\"line\",\"fill\"]),e.define({render_mode:[l.RenderMode,\"canvas\"],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"],top:[l.Number,null],top_units:[l.SpatialUnits,\"data\"],bottom:[l.Number,null],bottom_units:[l.SpatialUnits,\"data\"],left:[l.Number,null],left_units:[l.SpatialUnits,\"data\"],right:[l.Number,null],right_units:[l.SpatialUnits,\"data\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.data_update=new s.Signal(this,\"data_update\")},e.prototype.update=function(t){var e,r,o,i;return r=t.left,o=t.right,i=t.top,e=t.bottom,this.setv({left:r,right:o,top:i,bottom:e},{silent:!0}),this.data_update.emit()},e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\",\"core/signaling\":\"core/signaling\",\"core/util/types\":\"core/util/types\"}],\"models/annotations/color_bar\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s=function(t,e){function r(){this.constructor=t}for(var o in e)a.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(\"./annotation\"),u=t(\"../tickers/basic_ticker\"),c=t(\"../formatters/basic_tick_formatter\"),_=t(\"../mappers/linear_color_mapper\"),p=t(\"../scales/linear_scale\"),h=t(\"../scales/log_scale\"),d=t(\"../ranges/range1d\"),f=t(\"core/properties\"),m=t(\"core/util/text\"),y=t(\"core/util/array\"),g=t(\"core/util/object\"),v=t(\"core/util/types\");n=25,i=.3,o=.8,r.ColorBarView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._set_canvas_image()},e.prototype.connect_signals=function(){if(e.__super__.connect_signals.call(this),this.connect(this.model.properties.visible.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.ticker.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.formatter.change,function(t){return function(){return t.plot_view.request_render()}}(this)),null!=this.model.color_mapper)return this.connect(this.model.color_mapper.change,function(){return this._set_canvas_image(),this.plot_view.request_render()})},e.prototype._get_panel_offset=function(){var t,e;return t=this.model.panel._left.value,e=this.model.panel._top.value,{x:t,y:-e}},e.prototype._get_size=function(){var t,e;if(null!=this.model.color_mapper)return t=this.compute_legend_dimensions(),e=this.model.panel.side,\"above\"===e||\"below\"===e?t.height:\"left\"===e||\"right\"===e?t.width:void 0},e.prototype._set_canvas_image=function(){var t,e,r,o,i,n,s,a,l,u,c,p,h;if(null!=this.model.color_mapper){switch(a=this.model.color_mapper.palette,\"vertical\"===this.model.orientation&&(a=a.slice(0).reverse()),this.model.orientation){case\"vertical\":l=[1,a.length],h=l[0],i=l[1];break;case\"horizontal\":u=[a.length,1],h=u[0],i=u[1]}return r=document.createElement(\"canvas\"),c=[h,i],r.width=c[0],r.height=c[1],n=r.getContext(\"2d\"),s=n.getImageData(0,0,h,i),o=new _.LinearColorMapper({palette:a}),t=o.v_map_screen(function(){p=[];for(var t=0,e=a.length;0<=e?t<e:t>e;0<=e?t++:t--)p.push(t);return p}.apply(this)),e=new Uint8Array(t),s.data.set(e),n.putImageData(s,0,0),this.image=r}},e.prototype.compute_legend_dimensions=function(){var t,e,r,o,i,n,s,a,l,u;switch(t=this.model._computed_image_dimensions(),a=[t.height,t.width],e=a[0],r=a[1],o=this._get_label_extent(),u=this.model._title_extent(),l=this.model._tick_extent(),s=this.model.padding,this.model.orientation){case\"vertical\":i=e+u+2*s,n=r+l+o+2*s;break;case\"horizontal\":i=e+u+l+o+2*s,n=r+2*s}return{height:i,width:n}},e.prototype.compute_legend_location=function(){var t,e,r,o,i,n,s,a,l,u,c,_;if(e=this.compute_legend_dimensions(),s=[e.height,e.width],r=s[0],i=s[1],o=this.model.margin,n=this.model.location,t=this.plot_view.frame.h_range,u=this.plot_view.frame.v_range,v.isString(n))switch(n){case\"top_left\":c=t.start+o,_=u.end-o;break;case\"top_center\":c=(t.end+t.start)/2-i/2,_=u.end-o;break;case\"top_right\":c=t.end-o-i,_=u.end-o;break;case\"center_right\":c=t.end-o-i,_=(u.end+u.start)/2+r/2;break;case\"bottom_right\":c=t.end-o-i,_=u.start+o+r;break;case\"bottom_center\":c=(t.end+t.start)/2-i/2,_=u.start+o+r;break;case\"bottom_left\":c=t.start+o,_=u.start+o+r;break;case\"center_left\":c=t.start+o,_=(u.end+u.start)/2+r/2;break;case\"center\":c=(t.end+t.start)/2-i/2,_=(u.end+u.start)/2+r/2}else v.isArray(n)&&2===n.length&&(c=n[0],_=n[1]);return a=this.plot_view.canvas.vx_to_sx(c),l=this.plot_view.canvas.vy_to_sy(_),{sx:a,sy:l}},e.prototype.render=function(){var t,e,r,o,i;if(this.model.visible&&null!=this.model.color_mapper)return t=this.plot_view.canvas_view.ctx,t.save(),null!=this.model.panel&&(i=this._get_panel_offset(),t.translate(i.x,i.y),e=this._get_frame_offset(),t.translate(e.x,e.y)),o=this.compute_legend_location(),t.translate(o.sx,o.sy),this._draw_bbox(t),r=this._get_image_offset(),t.translate(r.x,r.y),this._draw_image(t),null!=this.model.color_mapper.low&&null!=this.model.color_mapper.high&&(this._draw_major_ticks(t),this._draw_minor_ticks(t),this._draw_major_labels(t)),this.model.title&&this._draw_title(t),t.restore()},e.prototype._draw_bbox=function(t){var e;return 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;return e=this.model._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){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f;if(this.visuals.major_tick_line.doit){for(s=this.model._normals(),i=s[0],n=s[1],r=this.model._computed_image_dimensions(),a=[r.width*i,r.height*n],d=a[0],f=a[1],l=this.model._tick_coordinates().major,c=l[0],_=l[1],p=this.model.major_tick_in,h=this.model.major_tick_out,t.save(),t.translate(d,f),this.visuals.major_tick_line.set_value(t),e=o=0,u=c.length;0<=u?o<u:o>u;e=0<=u?++o:--o)t.beginPath(),t.moveTo(Math.round(c[e]+i*h),Math.round(_[e]+n*h)),t.lineTo(Math.round(c[e]-i*p),Math.round(_[e]-n*p)),t.stroke();return t.restore()}},e.prototype._draw_minor_ticks=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f;if(this.visuals.minor_tick_line.doit){for(s=this.model._normals(),i=s[0],n=s[1],r=this.model._computed_image_dimensions(),a=[r.width*i,r.height*n],d=a[0],f=a[1],l=this.model._tick_coordinates().minor,c=l[0],_=l[1],p=this.model.minor_tick_in,h=this.model.minor_tick_out,t.save(),t.translate(d,f),this.visuals.minor_tick_line.set_value(t),e=o=0,u=c.length;0<=u?o<u:o>u;e=0<=u?++o:--o)t.beginPath(),t.moveTo(Math.round(c[e]+i*h),Math.round(_[e]+n*h)),t.lineTo(Math.round(c[e]-i*p),Math.round(_[e]-n*p)),t.stroke();return t.restore()}},e.prototype._draw_major_labels=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v;if(this.visuals.major_label_text.doit){for(l=this.model._normals(),s=l[0],a=l[1],o=this.model._computed_image_dimensions(),u=[o.width*s,o.height*a],m=u[0],g=u[1],h=this.model.label_standoff+this.model._tick_extent(),c=[h*s,h*a],y=c[0],v=c[1],_=this.model._tick_coordinates().major,d=_[0],f=_[1],n=this.model._tick_coordinates().major_labels,e=this.model.formatter.doFormat(n,null),this.visuals.major_label_text.set_value(t),t.save(),t.translate(m+y,g+v),r=i=0,p=d.length;0<=p?i<p:i>p;r=0<=p?++i:--i)t.fillText(e[r],Math.round(d[r]+s*this.model.label_standoff),Math.round(f[r]+a*this.model.label_standoff));return t.restore()}},e.prototype._draw_title=function(t){if(this.visuals.title_text.doit)return 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,r,o,i;if(i=this.model._tick_coordinates().major_labels,null==this.model.color_mapper.low||null==this.model.color_mapper.high||g.isEmpty(i))o=0;else{switch(t=this.plot_view.canvas_view.ctx,t.save(),this.visuals.major_label_text.set_value(t),this.model.orientation){case\"vertical\":e=this.model.formatter.doFormat(i),o=y.max(function(){var o,i,n;for(n=[],o=0,i=e.length;o<i;o++)r=e[o],n.push(t.measureText(r.toString()).width);return n}());break;case\"horizontal\":o=m.get_text_height(this.visuals.major_label_text.font_value()).height}o+=this.model.label_standoff,t.restore()}return o},e.prototype._get_frame_offset=function(){var t,e,r,o,i;switch(r=[0,0],o=r[0],i=r[1],e=this.model.panel,t=this.plot_view.frame,e.side){case\"left\":case\"right\":i=Math.abs(e._top.value-t._top.value);break;case\"above\":case\"below\":o=Math.abs(t._left.value)}return{x:o,y:i}},e.prototype._get_image_offset=function(){var t,e;return t=this.model.padding,e=this.model.padding+this.model._title_extent(),{x:t,y:e}},e}(l.AnnotationView),r.ColorBar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.default_view=r.ColorBarView,e.prototype.type=\"ColorBar\",e.mixins([\"text:major_label_\",\"text:title_\",\"line:major_tick_\",\"line:minor_tick_\",\"line:border_\",\"line:bar_\",\"fill:background_\"]),e.define({location:[f.Any,\"top_right\"],orientation:[f.Orientation,\"vertical\"],title:[f.String],title_standoff:[f.Number,2],height:[f.Any,\"auto\"],width:[f.Any,\"auto\"],scale_alpha:[f.Number,1],ticker:[f.Instance,function(){return new u.BasicTicker}],formatter:[f.Instance,function(){return new c.BasicTickFormatter}],color_mapper:[f.Instance],label_standoff:[f.Number,5],margin:[f.Number,30],padding:[f.Number,10],major_tick_in:[f.Number,5],major_tick_out:[f.Number,0],minor_tick_in:[f.Number,0],minor_tick_out:[f.Number,0]}),e.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.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r)},e.prototype._normals=function(){var t,e,r,o;return\"vertical\"===this.orientation?(r=[1,0],t=r[0],e=r[1]):(o=[0,1],t=o[0],e=o[1]),[t,e]},e.prototype._title_extent=function(){var t,e;return t=this.title_text_font+\" \"+this.title_text_font_size+\" \"+this.title_text_font_style,e=this.title?m.get_text_height(t).height+this.title_standoff:0},e.prototype._tick_extent=function(){var t;return t=null!=this.color_mapper.low&&null!=this.color_mapper.high?y.max([this.major_tick_out,this.minor_tick_out]):0},e.prototype._computed_image_dimensions=function(){var t,e,r,s,a;switch(t=this.plot.plot_canvas.frame._height.value,e=this.plot.plot_canvas.frame._width.value,s=this._title_extent(),this.orientation){case\"vertical\":\"auto\"===this.height?null!=this.panel?r=t-2*this.padding-s:(r=y.max([this.color_mapper.palette.length*n,t*i]),r=y.min([r,t*o-2*this.padding-s])):r=this.height,a=\"auto\"===this.width?n:this.width;break;case\"horizontal\":r=\"auto\"===this.height?n:this.height,\"auto\"===this.width?null!=this.panel?a=e-2*this.padding:(a=y.max([this.color_mapper.palette.length*n,e*i]),a=y.min([a,e*o-2*this.padding])):a=this.width}return{height:r,width:a}},e.prototype._tick_coordinate_scale=function(t){var e,r;switch(e={source_range:new d.Range1d({start:this.color_mapper.low,end:this.color_mapper.high}),target_range:new d.Range1d({start:0,end:t})},this.color_mapper.type){case\"LinearColorMapper\":r=new p.LinearScale(e);break;case\"LogColorMapper\":r=new h.LogScale(e)}return r},e.prototype._tick_coordinates=function(){var t,e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b;switch(i=this._computed_image_dimensions(),this.orientation){case\"vertical\":g=i.height;break;case\"horizontal\":g=i.width}for(y=this._tick_coordinate_scale(g),h=this._normals(),r=h[0],n=h[1],d=[this.color_mapper.low,this.color_mapper.high],v=d[0],e=d[1],b=this.ticker.get_ticks(v,e,null,null,this.ticker.desired_num_ticks),c=b.major,p=b.minor,l=[[],[]],_=[[],[]],o=s=0,f=c.length;0<=f?s<f:s>f;o=0<=f?++s:--s)c[o]<v||c[o]>e||(l[r].push(c[o]),l[n].push(0));for(o=a=0,m=p.length;0<=m?a<m:a>m;o=0<=m?++a:--a)p[o]<v||p[o]>e||(_[r].push(p[o]),_[n].push(0));return u=l[r].slice(0),l[r]=y.v_compute(l[r]),_[r]=y.v_compute(_[r]),\"vertical\"===this.orientation&&(l[r]=new Float64Array(function(){var e,o,i,n;for(i=l[r],n=[],o=0,e=i.length;o<e;o++)t=i[o],n.push(g-t);return n}()),_[r]=new Float64Array(function(){var e,o,i,n;for(i=_[r],n=[],o=0,e=i.length;o<e;o++)t=i[o],n.push(g-t);return n}())),{major:l,minor:_,major_labels:u}},e}(l.Annotation)},{\"../formatters/basic_tick_formatter\":\"models/formatters/basic_tick_formatter\",\"../mappers/linear_color_mapper\":\"models/mappers/linear_color_mapper\",\"../ranges/range1d\":\"models/ranges/range1d\",\"../scales/linear_scale\":\"models/scales/linear_scale\",\"../scales/log_scale\":\"models/scales/log_scale\",\"../tickers/basic_ticker\":\"models/tickers/basic_ticker\",\"./annotation\":\"models/annotations/annotation\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/object\":\"core/util/object\",\"core/util/text\":\"core/util/text\",\"core/util/types\":\"core/util/types\"}],\"models/annotations/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./annotation\");r.Annotation=o.Annotation;var i=t(\"./arrow\");r.Arrow=i.Arrow;var n=t(\"./arrow_head\");r.ArrowHead=n.ArrowHead;var s=t(\"./arrow_head\");r.OpenHead=s.OpenHead;var a=t(\"./arrow_head\");r.NormalHead=a.NormalHead;var l=t(\"./arrow_head\");r.TeeHead=l.TeeHead;var u=t(\"./arrow_head\");r.VeeHead=u.VeeHead;var c=t(\"./band\");r.Band=c.Band;var _=t(\"./box_annotation\");r.BoxAnnotation=_.BoxAnnotation;var p=t(\"./color_bar\");r.ColorBar=p.ColorBar;var h=t(\"./label\");r.Label=h.Label;var d=t(\"./label_set\");r.LabelSet=d.LabelSet;var f=t(\"./legend\");r.Legend=f.Legend;var m=t(\"./legend_item\");r.LegendItem=m.LegendItem;var y=t(\"./poly_annotation\");r.PolyAnnotation=y.PolyAnnotation;var g=t(\"./span\");r.Span=g.Span;var v=t(\"./text_annotation\");r.TextAnnotation=v.TextAnnotation;var b=t(\"./title\");r.Title=b.Title;var w=t(\"./tooltip\");r.Tooltip=w.Tooltip;var x=t(\"./whisker\");r.Whisker=x.Whisker},{\"./annotation\":\"models/annotations/annotation\",\"./arrow\":\"models/annotations/arrow\",\"./arrow_head\":\"models/annotations/arrow_head\",\"./band\":\"models/annotations/band\",\"./box_annotation\":\"models/annotations/box_annotation\",\"./color_bar\":\"models/annotations/color_bar\",\"./label\":\"models/annotations/label\",\"./label_set\":\"models/annotations/label_set\",\"./legend\":\"models/annotations/legend\",\"./legend_item\":\"models/annotations/legend_item\",\"./poly_annotation\":\"models/annotations/poly_annotation\",\"./span\":\"models/annotations/span\",\"./text_annotation\":\"models/annotations/text_annotation\",\"./title\":\"models/annotations/title\",\"./tooltip\":\"models/annotations/tooltip\",\"./whisker\":\"models/annotations/whisker\"}],\"models/annotations/label\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./text_annotation\"),s=t(\"core/dom\"),a=t(\"core/properties\");r.LabelView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.canvas=this.plot_model.canvas,this.visuals.warm_cache(null)},e.prototype._get_size=function(){var t,e,r,o;return t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),r=this.model.panel.side,\"above\"===r||\"below\"===r?e=t.measureText(this.model.text).ascent:\"left\"===r||\"right\"===r?o=t.measureText(this.model.text).width:void 0},e.prototype.render=function(){var t,e,r,o,i,n,a,l,u;if(this.model.visible||\"css\"!==this.model.render_mode||s.hide(this.el),this.model.visible){switch(l=this.plot_view.frame.xscales[this.model.x_range_name],u=this.plot_view.frame.yscales[this.model.y_range_name],e=this.plot_view.canvas_view.ctx,this.model.angle_units){case\"rad\":t=-1*this.model.angle;break;case\"deg\":t=-1*this.model.angle*Math.PI/180}return n=\"data\"===this.model.x_units?l.compute(this.model.x):this.model.x,o=this.canvas.vx_to_sx(n),a=\"data\"===this.model.y_units?u.compute(this.model.y):this.model.y,i=this.canvas.vy_to_sy(a),null!=this.model.panel&&(r=this._get_panel_offset(),o+=r.x,i+=r.y),\"canvas\"===this.model.render_mode?this._canvas_text(e,this.model.text,o+this.model.x_offset,i-this.model.y_offset,t):this._css_text(e,this.model.text,o+this.model.x_offset,i-this.model.y_offset,t)}},e}(n.TextAnnotationView),r.Label=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.LabelView,e.prototype.type=\"Label\",e.mixins([\"text\",\"line:border_\",\"fill:background_\"]),e.define({x:[a.Number],x_units:[a.SpatialUnits,\"data\"],y:[a.Number],y_units:[a.SpatialUnits,\"data\"],text:[a.String],angle:[a.Angle,0],angle_units:[a.AngleUnits,\"rad\"],x_offset:[a.Number,0],y_offset:[a.Number,0],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"],render_mode:[a.RenderMode,\"canvas\"]}),e.override({background_fill_color:null,border_line_color:null}),e}(n.TextAnnotation)},{\"./text_annotation\":\"models/annotations/text_annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\"}],\"models/annotations/label_set\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./text_annotation\"),s=t(\"../sources/column_data_source\"),a=t(\"core/dom\"),l=t(\"core/properties\"),u=t(\"core/util/types\");r.LabelSetView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){var r,o,i,n;\n",
" if(e.__super__.initialize.call(this,t),this.set_data(this.model.source),\"css\"===this.model.render_mode){for(n=[],r=o=0,i=this._text.length;0<=i?o<i:o>i;r=0<=i?++o:--o)this.title_div=a.div({\"class\":\"bk-annotation-child\",style:{display:\"none\"}}),n.push(this.el.appendChild(this.title_div));return n}},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?(this.connect(this.model.change,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source),this.render()}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source),this.render()})):(this.connect(this.model.change,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source),this.plot_view.request_render()}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source),this.plot_view.request_render()}))},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t)},e.prototype._map_data=function(){var t,e,r,o,i,n;return i=this.plot_view.frame.xscales[this.model.x_range_name],n=this.plot_view.frame.yscales[this.model.y_range_name],r=\"data\"===this.model.x_units?i.v_compute(this._x):this._x.slice(0),t=this.canvas.v_vx_to_sx(r),o=\"data\"===this.model.y_units?n.v_compute(this._y):this._y.slice(0),e=this.canvas.v_vy_to_sy(o),[t,e]},e.prototype.render=function(){var t,e,r,o,i,n,s,l,u,c,_;if(this.model.visible||\"css\"!==this.model.render_mode||a.hide(this.el),this.model.visible){if(t=this.plot_view.canvas_view.ctx,i=this._map_data(),c=i[0],_=i[1],\"canvas\"===this.model.render_mode){for(l=[],e=r=0,n=this._text.length;0<=n?r<n:r>n;e=0<=n?++r:--r)l.push(this._v_canvas_text(t,e,this._text[e],c[e]+this._x_offset[e],_[e]-this._y_offset[e],this._angle[e]));return l}for(u=[],e=o=0,s=this._text.length;0<=s?o<s:o>s;e=0<=s?++o:--o)u.push(this._v_css_text(t,e,this._text[e],c[e]+this._x_offset[e],_[e]-this._y_offset[e],this._angle[e]));return u}},e.prototype._get_size=function(){var t,e,r,o;return t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),r=this.model.panel.side,\"above\"===r||\"below\"===r?e=t.measureText(this._text[0]).ascent:\"left\"===r||\"right\"===r?o=t.measureText(this._text[0]).width:void 0},e.prototype._v_canvas_text=function(t,e,r,o,i,n){var s;return this.visuals.text.set_vectorize(t,e),s=this._calculate_bounding_box_dimensions(t,r),t.save(),t.beginPath(),t.translate(o,i),t.rotate(n),t.rect(s[0],s[1],s[2],s[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(r,0,0)),t.restore()},e.prototype._v_css_text=function(t,e,r,o,i,n){var s,l,c,_;return l=this.el.childNodes[e],l.textContent=r,this.visuals.text.set_vectorize(t,e),s=this._calculate_bounding_box_dimensions(t,r),c=this.visuals.border_line.line_dash.value(),u.isArray(c)&&(_=c.length<2?\"solid\":\"dashed\"),u.isString(c)&&(_=c),this.visuals.border_line.set_vectorize(t,e),this.visuals.background_fill.set_vectorize(t,e),l.style.position=\"absolute\",l.style.left=o+s[0]+\"px\",l.style.top=i+s[1]+\"px\",l.style.color=\"\"+this.visuals.text.text_color.value(),l.style.opacity=\"\"+this.visuals.text.text_alpha.value(),l.style.font=\"\"+this.visuals.text.font_value(),l.style.lineHeight=\"normal\",n&&(l.style.transform=\"rotate(\"+n+\"rad)\"),this.visuals.background_fill.doit&&(l.style.backgroundColor=\"\"+this.visuals.background_fill.color_value()),this.visuals.border_line.doit&&(l.style.borderStyle=\"\"+_,l.style.borderWidth=this.visuals.border_line.line_width.value()+\"px\",l.style.borderColor=\"\"+this.visuals.border_line.color_value()),a.show(l)},e}(n.TextAnnotationView),r.LabelSet=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.LabelSetView,e.prototype.type=\"Label\",e.mixins([\"text\",\"line:border_\",\"fill:background_\"]),e.define({x:[l.NumberSpec],y:[l.NumberSpec],x_units:[l.SpatialUnits,\"data\"],y_units:[l.SpatialUnits,\"data\"],text:[l.StringSpec,{field:\"text\"}],angle:[l.AngleSpec,0],x_offset:[l.NumberSpec,{value:0}],y_offset:[l.NumberSpec,{value:0}],source:[l.Instance,function(){return new s.ColumnDataSource}],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"],render_mode:[l.RenderMode,\"canvas\"]}),e.override({background_fill_color:null,border_line_color:null}),e}(n.TextAnnotation)},{\"../sources/column_data_source\":\"models/sources/column_data_source\",\"./text_annotation\":\"models/annotations/text_annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/annotations/legend\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/properties\"),a=t(\"core/util/text\"),l=t(\"core/util/bbox\"),u=t(\"core/util/array\"),c=t(\"core/util/object\"),_=t(\"core/util/types\");r.LegendView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.visible.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype.compute_legend_bbox=function(){var t,e,r,o,i,n,s,l,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P;for(d=this.model.get_legend_names(),e=this.model.glyph_height,r=this.model.glyph_width,n=this.model.label_height,l=this.model.label_width,this.max_label_height=u.max([a.get_text_height(this.visuals.label_text.font_value()).height,n,e]),t=this.plot_view.canvas_view.ctx,t.save(),this.visuals.label_text.set_value(t),this.text_widths={},i=0,g=d.length;i<g;i++)w=d[i],this.text_widths[w]=u.max([t.measureText(w).width,l]);if(t.restore(),b=u.max(c.values(this.text_widths)),h=this.model.margin,f=this.model.padding,m=this.model.spacing,s=this.model.label_standoff,\"vertical\"===this.model.orientation)p=d.length*this.max_label_height+(d.length-1)*m+2*f,y=b+r+s+2*f;else{y=2*f+(d.length-1)*m,k=this.text_widths;for(w in k)S=k[w],y+=u.max([S,l])+r+s;p=this.max_label_height+2*f}if(x=null!=(M=this.model.panel)?M:this.plot_view.frame,o={start:x._left.value,end:x._right.value},T={start:x._bottom.value,end:x._top.value},v=this.model.location,_.isString(v))switch(v){case\"top_left\":O=o.start+h,P=T.end-h;break;case\"top_center\":O=(o.end+o.start)/2-y/2,P=T.end-h;break;case\"top_right\":O=o.end-h-y,P=T.end-h;break;case\"center_right\":O=o.end-h-y,P=(T.end+T.start)/2+p/2;break;case\"bottom_right\":O=o.end-h-y,P=T.start+h+p;break;case\"bottom_center\":O=(o.end+o.start)/2-y/2,P=T.start+h+p;break;case\"bottom_left\":O=o.start+h,P=T.start+h+p;break;case\"center_left\":O=o.start+h,P=(T.end+T.start)/2+p/2;break;case\"center\":O=(o.end+o.start)/2-y/2,P=(T.end+T.start)/2+p/2}else _.isArray(v)&&2===v.length&&(O=v[0],P=v[1],\"left\"===(j=x.side)||\"right\"===j||\"above\"===j||\"below\"===j?(O+=o.start,P+=T.end):(O+=o.start,P+=T.start));return O=this.plot_view.canvas.vx_to_sx(O),P=this.plot_view.canvas.vy_to_sy(P),{x:O,y:P,width:y,height:p}},e.prototype.bbox=function(){var t,e,r,o,i;return e=this.compute_legend_bbox(),o=e.x,i=e.y,r=e.width,t=e.height,new l.BBox({x0:o,y0:i,x1:o+r,y1:i+t})},e.prototype.on_hit=function(t,e){var r,o,i,n,s,a,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C,N,D;for(i=this.model.glyph_height,n=this.model.glyph_width,y=this.model.spacing,d=this.model.label_standoff,z=D=this.model.padding,m=this.compute_legend_bbox(),O=\"vertical\"===this.model.orientation,k=this.model.items,a=0,g=k.length;a<g;a++)for(u=k[a],f=u.get_labels_list_from_label_prop(),o=u.get_field_from_label_prop(),c=0,v=f.length;c<v;c++){if(h=f[c],A=m.x+z,C=m.y+D,E=A+n,N=C+i,O?(M=[m.width-2*this.model.padding,this.max_label_height],P=M[0],s=M[1]):(j=[this.text_widths[h]+n+d,this.max_label_height],P=j[0],s=j[1]),r=new l.BBox({x0:A,y0:C,x1:A+P,y1:C+s}),r.contains(t,e)){switch(this.model.click_policy){case\"hide\":for(T=u.renderers,_=0,b=T.length;_<b;_++)x=T[_],x.visible=!x.visible;break;case\"mute\":for(S=u.renderers,p=0,w=S.length;p<w;p++)x=S[p],x.muted=!x.muted}return!0}O?D+=this.max_label_height+y:z+=this.text_widths[h]+n+d+y}return!1},e.prototype.render=function(){var t,e;if(this.model.visible&&0!==this.model.items.length)return e=this.plot_view.canvas_view.ctx,t=this.compute_legend_bbox(),e.save(),this._draw_legend_box(e,t),this._draw_legend_items(e,t),e.restore()},e.prototype._draw_legend_box=function(t,e){if(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)return this.visuals.border_line.set_value(t),t.stroke()},e.prototype._draw_legend_items=function(t,e){var r,o,i,n,s,a,l,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z;for(i=this.model.glyph_height,n=this.model.glyph_width,f=this.model.spacing,h=this.model.label_standoff,P=z=this.model.padding,M=\"vertical\"===this.model.orientation,b=this.model.items,a=0,m=b.length;a<m;a++)if(l=b[a],d=l.get_labels_list_from_label_prop(),o=l.get_field_from_label_prop(),0!==d.length)for(r=function(){switch(this.model.click_policy){case\"none\":return!0;case\"hide\":return u.all(l.renderers,function(t){return t.visible});case\"mute\":return u.all(l.renderers,function(t){return!t.muted})}}.call(this),c=0,y=d.length;c<y;c++){for(p=d[c],S=e.x+P,A=e.y+z,O=S+n,E=A+i,M?z+=this.max_label_height+f:P+=this.text_widths[p]+n+h+f,this.visuals.label_text.set_value(t),t.fillText(p,O+h,A+this.max_label_height/2),w=l.renderers,_=0,g=w.length;_<g;_++)v=w[_],j=this.plot_view.renderer_views[v.id],j.draw_legend(t,S,O,A,E,o,p);r||(M?(x=[e.width-2*this.model.padding,this.max_label_height],T=x[0],s=x[1]):(k=[this.text_widths[p]+n+h,this.max_label_height],T=k[0],s=k[1]),t.beginPath(),t.rect(S,A,T,s),this.visuals.inactive_fill.set_value(t),t.fill())}return null},e.prototype._get_size=function(){var t,e;return t=this.compute_legend_bbox(),e=this.model.panel.side,\"above\"===e||\"below\"===e?t.height:\"left\"===e||\"right\"===e?t.width:void 0},e}(n.AnnotationView),r.Legend=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.LegendView,e.prototype.type=\"Legend\",e.prototype.cursor=function(){return\"none\"===this.click_policy?null:\"pointer\"},e.prototype.get_legend_names=function(){var t,e,r,o,i,n;for(o=[],n=this.items,t=0,i=n.length;t<i;t++)e=n[t],r=e.get_labels_list_from_label_prop(),o=o.concat(r);return o},e.mixins([\"text:label_\",\"fill:inactive_\",\"line:border_\",\"fill:background_\"]),e.define({orientation:[s.Orientation,\"vertical\"],location:[s.Any,\"top_right\"],label_standoff:[s.Number,5],glyph_height:[s.Number,20],glyph_width:[s.Number,20],label_height:[s.Number,20],label_width:[s.Number,20],margin:[s.Number,10],padding:[s.Number,10],spacing:[s.Number,3],items:[s.Array,[]],click_policy:[s.Any,\"none\"]}),e.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:.9,label_text_font_size:\"10pt\",label_text_baseline:\"middle\"}),e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/bbox\":\"core/util/bbox\",\"core/util/object\":\"core/util/object\",\"core/util/text\":\"core/util/text\",\"core/util/types\":\"core/util/types\"}],\"models/annotations/legend_item\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},a=t(\"../../model\"),l=t(\"core/properties\"),u=t(\"core/logging\"),c=t(\"core/util/array\"),_=t(\"../../models/sources/column_data_source\");r.LegendItem=function(t){function e(){return this.get_labels_list_from_label_prop=o(this.get_labels_list_from_label_prop,this),this.get_field_from_label_prop=o(this.get_field_from_label_prop,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"LegendItem\",e.prototype._check_data_sources_on_renderers=function(){var t,e,r,o,i,n;if(t=this.get_field_from_label_prop(),null!=t){if(this.renderers.length<1)return!1;if(n=this.renderers[0].data_source,null!=n)for(i=this.renderers,e=0,r=i.length;e<r;e++)if(o=i[e],o.data_source!==n)return!1}return!0},e.prototype._check_field_label_on_data_source=function(){var t,e;if(t=this.get_field_from_label_prop(),null!=t){if(this.renderers.length<1)return!1;if(e=this.renderers[0].data_source,null!=e&&s.call(e.columns(),t)<0)return!1}return!0},e.prototype.initialize=function(t,r){var o,i;if(e.__super__.initialize.call(this,t,r),o=this._check_data_sources_on_renderers(),o||u.logger.error(\"Non matching data sources on legend item renderers\"),i=this._check_field_label_on_data_source(),!i)return u.logger.error(\"Bad column name on label: \"+this.label)},e.define({label:[l.StringSpec,null],renderers:[l.Array,[]]}),e.prototype.get_field_from_label_prop=function(){if(null!=this.label&&null!=this.label.field)return this.label.field},e.prototype.get_labels_list_from_label_prop=function(){var t,e,r;if(null!=this.label&&null!=this.label.value)return[this.label.value];if(e=this.get_field_from_label_prop(),null!=e){if(!this.renderers[0]||null==this.renderers[0].data_source)return[\"No source found\"];if(r=this.renderers[0].data_source,r instanceof _.ColumnDataSource)return t=r.get_column(e),null!=t?c.uniq(t):[\"Invalid field\"]}return[]},e}(a.Model)},{\"../../model\":\"model\",\"../../models/sources/column_data_source\":\"models/sources/column_data_source\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/annotations/poly_annotation\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/signaling\"),a=t(\"core/properties\");r.PolyAnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.data_update,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype.render=function(t){var e,r,o,i,n,s,a,l,u,c;if(this.model.visible){if(u=this.model.xs,c=this.model.ys,u.length!==c.length)return null;if(u.length<3||c.length<3)return null;for(e=this.plot_view.canvas,t=this.plot_view.canvas_view.ctx,r=o=0,i=u.length;0<=i?o<i:o>i;r=0<=i?++o:--o)\"screen\"===this.model.xs_units&&(a=u[r]),\"screen\"===this.model.ys_units&&(l=c[r]),n=e.vx_to_sx(a),s=e.vy_to_sy(l),0===r?(t.beginPath(),t.moveTo(n,s)):t.lineTo(n,s);return t.closePath(),this.visuals.line.doit&&(this.visuals.line.set_value(t),t.stroke()),this.visuals.fill.doit?(this.visuals.fill.set_value(t),t.fill()):void 0}},e}(n.AnnotationView),r.PolyAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.PolyAnnotationView,e.prototype.type=\"PolyAnnotation\",e.mixins([\"line\",\"fill\"]),e.define({xs:[a.Array,[]],xs_units:[a.SpatialUnits,\"data\"],ys:[a.Array,[]],ys_units:[a.SpatialUnits,\"data\"],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({fill_color:\"#fff9ba\",fill_alpha:.4,line_color:\"#cccccc\",line_alpha:.3}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.data_update=new s.Signal(this,\"data_update\")},e.prototype.update=function(t){var e,r;return e=t.xs,r=t.ys,this.setv({xs:e,ys:r},{silent:!0}),this.data_update.emit()},e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/properties\":\"core/properties\",\"core/signaling\":\"core/signaling\"}],\"models/annotations/span\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/dom\"),a=t(\"core/properties\");r.SpanView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.style.position=\"absolute\",s.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.model.for_hover?this.connect(this.model.properties.computed_location.change,function(){return this._draw_span()}):\"canvas\"===this.model.render_mode?(this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this)),this.connect(this.model.properties.location.change,function(t){return function(){return t.plot_view.request_render()}}(this))):(this.connect(this.model.change,function(){return this.render()}),this.connect(this.model.properties.location.change,function(){return this._draw_span()}))},e.prototype.render=function(){if(this.model.visible||\"css\"!==this.model.render_mode||s.hide(this.el),this.model.visible)return this._draw_span()},e.prototype._draw_span=function(){var t,e,r,o,i,n,a,l,u,c;return i=this.model.for_hover?this.model.computed_location:this.model.location,null==i?void s.hide(this.el):(r=this.plot_model.frame,t=this.plot_model.canvas,u=this.plot_view.frame.xscales[this.model.x_range_name],c=this.plot_view.frame.yscales[this.model.y_range_name],\"width\"===this.model.dimension?(a=t.vy_to_sy(this._calc_dim(i,c)),n=t.vx_to_sx(r._left.value),l=r._width.value,o=this.model.properties.line_width.value()):(a=t.vy_to_sy(r._top.value),n=t.vx_to_sx(this._calc_dim(i,u)),l=this.model.properties.line_width.value(),o=r._height.value),\"css\"===this.model.render_mode?(this.el.style.top=a+\"px\",this.el.style.left=n+\"px\",this.el.style.width=l+\"px\",this.el.style.height=o+\"px\",this.el.style.zIndex=1e3,this.el.style.backgroundColor=this.model.properties.line_color.value(),this.el.style.opacity=this.model.properties.line_alpha.value(),s.show(this.el)):\"canvas\"===this.model.render_mode?(e=this.plot_view.canvas_view.ctx,e.save(),e.beginPath(),this.visuals.line.set_value(e),e.moveTo(n,a),\"width\"===this.model.dimension?e.lineTo(n+l,a):e.lineTo(n,a+o),e.stroke(),e.restore()):void 0)},e.prototype._calc_dim=function(t,e){var r;return r=\"data\"===this.model.location_units?e.compute(t):t},e}(n.AnnotationView),r.Span=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.SpanView,e.prototype.type=\"Span\",e.mixins([\"line\"]),e.define({render_mode:[a.RenderMode,\"canvas\"],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"],location:[a.Number,null],location_units:[a.SpatialUnits,\"data\"],dimension:[a.Dimension,\"width\"]}),e.override({line_color:\"black\"}),e.internal({for_hover:[a.Boolean,!1],computed_location:[a.Number,null]}),e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\"}],\"models/annotations/text_annotation\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/dom\"),a=t(\"core/util/types\"),l=t(\"core/util/text\");r.TextAnnotationView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),this.canvas=this.plot_model.canvas,this.frame=this.plot_model.frame,\"css\"===this.model.render_mode)return this.el.classList.add(\"bk-annotation\"),this.plot_view.canvas_overlays.appendChild(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),\"css\"===this.model.render_mode?this.connect(this.model.change,function(){return this.render()}):this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype._calculate_text_dimensions=function(t,e){var r,o;return o=t.measureText(e).width,r=l.get_text_height(this.visuals.text.font_value()).height,[o,r]},e.prototype._calculate_bounding_box_dimensions=function(t,e){var r,o,i,n,s;switch(o=this._calculate_text_dimensions(t,e),i=o[0],r=o[1],t.textAlign){case\"left\":n=0;break;case\"center\":n=-i/2;break;case\"right\":n=-i}switch(t.textBaseline){case\"top\":s=0;break;case\"middle\":s=-.5*r;break;case\"bottom\":s=-1*r;break;case\"alphabetic\":s=-.8*r;break;case\"hanging\":s=-.17*r;break;case\"ideographic\":s=-.83*r}return[n,s,i,r]},e.prototype._get_size=function(){var t;return t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),t.measureText(this.model.text).ascent},e.prototype.render=function(){return null},e.prototype._canvas_text=function(t,e,r,o,i){var n;return this.visuals.text.set_value(t),n=this._calculate_bounding_box_dimensions(t,e),t.save(),t.beginPath(),t.translate(r,o),i&&t.rotate(i),t.rect(n[0],n[1],n[2],n[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,r,o,i){var n,l,u;return s.hide(this.el),this.visuals.text.set_value(t),n=this._calculate_bounding_box_dimensions(t,e),l=this.visuals.border_line.line_dash.value(),a.isArray(l)&&(u=l.length<2?\"solid\":\"dashed\"),a.isString(l)&&(u=l),this.visuals.border_line.set_value(t),this.visuals.background_fill.set_value(t),this.el.style.position=\"absolute\",this.el.style.left=r+n[0]+\"px\",this.el.style.top=o+n[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\",i&&(this.el.style.transform=\"rotate(\"+i+\"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=\"\"+u,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,s.show(this.el)},e}(n.AnnotationView),r.TextAnnotation=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"TextAnnotation\",e.prototype.default_view=r.TextAnnotationView,e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/dom\":\"core/dom\",\"core/util/text\":\"core/util/text\",\"core/util/types\":\"core/util/types\"}],\"models/annotations/title\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./text_annotation\"),s=t(\"core/dom\"),a=t(\"core/properties\"),l=t(\"core/visuals\");r.TitleView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),this.visuals.text=new l.Text(this.model),r=this.plot_view.canvas_view.ctx,r.save(),this.model.panel.apply_label_text_heuristics(r,\"justified\"),this.model.text_baseline=r.textBaseline,this.model.text_align=this.model.align,r.restore()},e.prototype._get_computed_location=function(){var t,e,r,o,i,n,s;switch(e=this._calculate_text_dimensions(this.plot_view.canvas_view.ctx,this.text),s=e[0],t=e[1],this.model.panel.side){case\"left\":i=0,n=this._get_text_location(this.model.align,this.frame.v_range)+this.model.offset;break;case\"right\":i=this.canvas._right.value-1,n=this.canvas._height.value-this._get_text_location(this.model.align,this.frame.v_range)-this.model.offset;break;case\"above\":i=this._get_text_location(this.model.align,this.frame.h_range)+this.model.offset,n=this.canvas._top.value-10;break;case\"below\":i=this._get_text_location(this.model.align,this.frame.h_range)+this.model.offset,n=0}return r=this.canvas.vx_to_sx(i),o=this.canvas.vy_to_sy(n),[r,o]},e.prototype._get_text_location=function(t,e){var r;switch(t){case\"left\":r=e.start;break;case\"center\":r=(e.end+e.start)/2;break;case\"right\":r=e.end}return r},e.prototype.render=function(){var t,e,r,o,i;if(this.model.visible||\"css\"!==this.model.render_mode||s.hide(this.el),this.model.visible&&(t=this.model.panel.get_label_angle_heuristic(\"parallel\"),r=this._get_computed_location(),o=r[0],i=r[1],e=this.plot_view.canvas_view.ctx,\"\"!==this.model.text&&null!==this.model.text))return\"canvas\"===this.model.render_mode?this._canvas_text(e,this.model.text,o,i,t):this._css_text(e,this.model.text,o,i,t)},e.prototype._get_size=function(){var t,e;return e=this.model.text,\"\"===e||null===e?0:(t=this.plot_view.canvas_view.ctx,this.visuals.text.set_value(t),t.measureText(e).ascent+10)},e}(n.TextAnnotationView),r.Title=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.TitleView,e.prototype.type=\"Title\",e.mixins([\"line:border_\",\"fill:background_\"]),e.define({text:[a.String],text_font:[a.Font,\"helvetica\"],text_font_size:[a.FontSizeSpec,\"10pt\"],text_font_style:[a.FontStyle,\"bold\"],text_color:[a.ColorSpec,\"#444444\"],text_alpha:[a.NumberSpec,1],align:[a.TextAlign,\"left\"],offset:[a.Number,0],render_mode:[a.RenderMode,\"canvas\"]}),e.override({background_fill_color:null,border_line_color:null}),e.internal({text_align:[a.TextAlign,\"left\"],text_baseline:[a.TextBaseline,\"bottom\"]}),e}(n.TextAnnotation)},{\"./text_annotation\":\"models/annotations/text_annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\",\"core/visuals\":\"core/visuals\"}],\"models/annotations/tooltip\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"core/dom\"),a=t(\"core/properties\");r.TooltipView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-tooltip\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view.canvas_overlays.appendChild(this.el),this.el.style.zIndex=1010,s.hide(this.el)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.data.change,function(){return this._draw_tips()})},e.prototype.render=function(){if(this.model.visible)return this._draw_tips()},e.prototype._draw_tips=function(){var t,e,r,o,i,n,a,l,u,c,_,p,h,d,f,m,y,g;if(i=this.model.data,s.empty(this.el),s.hide(this.el),this.model.custom?this.el.classList.add(\"bk-tooltip-custom\"):this.el.classList.remove(\"bk-tooltip-custom\"),0!==i.length){for(a=0,u=i.length;a<u;a++)f=i[a],m=f[0],y=f[1],o=f[2],this.model.inner_only&&!this.plot_view.frame.contains(m,y)||(h=s.div({},o),this.el.appendChild(h));switch(_=this.plot_view.model.canvas.vx_to_sx(m),p=this.plot_view.model.canvas.vy_to_sy(y),e=this.model.attachment){case\"horizontal\":g=this.plot_view.frame._width.value,l=this.plot_view.frame._left.value,c=m-l<g/2?\"right\":\"left\";break;case\"vertical\":n=this.plot_view.frame._height.value,r=this.plot_view.frame._bottom.value,c=y-r<n/2?\"below\":\"above\";break;default:c=e}switch(this.el.classList.remove(\"bk-right\"),this.el.classList.remove(\"bk-left\"),this.el.classList.remove(\"bk-above\"),this.el.classList.remove(\"bk-below\"),t=10,s.show(this.el),c){case\"right\":this.el.classList.add(\"bk-left\"),l=_+(this.el.offsetWidth-this.el.clientWidth)+t,d=p-this.el.offsetHeight/2;break;case\"left\":this.el.classList.add(\"bk-right\"),l=_-this.el.offsetWidth-t,d=p-this.el.offsetHeight/2;break;case\"above\":this.el.classList.add(\"bk-above\"),d=p+(this.el.offsetHeight-this.el.clientHeight)+t,l=Math.round(_-this.el.offsetWidth/2);break;case\"below\":this.el.classList.add(\"bk-below\"),d=p-this.el.offsetHeight-t,l=Math.round(_-this.el.offsetWidth/2)}return this.model.show_arrow&&this.el.classList.add(\"bk-tooltip-arrow\"),this.el.childNodes.length>0?(this.el.style.top=d+\"px\",this.el.style.left=l+\"px\"):s.hide(this.el)}},e}(n.AnnotationView),r.Tooltip=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.TooltipView,e.prototype.type=\"Tooltip\",e.define({attachment:[a.String,\"horizontal\"],inner_only:[a.Bool,!0],show_arrow:[a.Bool,!0]}),e.override({level:\"overlay\"}),e.internal({data:[a.Any,[]],custom:[a.Any]}),e.prototype.clear=function(){return this.data=[]},e.prototype.add=function(t,e,r){var o;return o=this.data,o.push([t,e,r]),this.data=o,this.properties.data.change.emit()},e}(n.Annotation)},{\"./annotation\":\"models/annotations/annotation\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\"}],\"models/annotations/whisker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./annotation\"),s=t(\"../sources/column_data_source\"),a=t(\"./arrow_head\"),l=t(\"core/properties\");r.WhiskerView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.set_data(this.model.source)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.source.streaming,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.patching,function(){return this.set_data(this.model.source)}),this.connect(this.model.source.change,function(){return this.set_data(this.model.source)})},e.prototype.set_data=function(t){return e.__super__.set_data.call(this,t),this.visuals.warm_cache(t),this.plot_view.request_render()},e.prototype._map_data=function(){var t,e,r,o,i,n,s,a,l,u,c,_;return c=this.plot_view.frame.xscales[this.model.x_range_name],_=this.plot_view.frame.yscales[this.model.y_range_name],l=\"height\"===this.model.dimension?_:c,n=\"height\"===this.model.dimension?c:_,r=\"data\"===this.model.lower.units?l.v_compute(this._lower):this._lower,i=\"data\"===this.model.upper.units?l.v_compute(this._upper):this._upper,t=\"data\"===this.model.base.units?n.v_compute(this._base):this._base,u=this.model._normals(),s=u[0],a=u[1],e=[r,t],o=[i,t],this._lower_sx=this.plot_model.canvas.v_vx_to_sx(e[s]),this._lower_sy=this.plot_model.canvas.v_vy_to_sy(e[a]),this._upper_sx=this.plot_model.canvas.v_vx_to_sx(o[s]),\n",
" this._upper_sy=this.plot_model.canvas.v_vy_to_sy(o[a])},e.prototype.render=function(){var t,e,r,o,i,n,s,a,l,u;if(this.model.visible){if(this._map_data(),e=this.plot_view.canvas_view.ctx,this.visuals.line.doit)for(r=o=0,s=this._lower_sx.length;0<=s?o<s:o>s;r=0<=s?++o:--o)this.visuals.line.set_vectorize(e,r),e.beginPath(),e.moveTo(this._lower_sx[r],this._lower_sy[r]),e.lineTo(this._upper_sx[r],this._upper_sy[r]),e.stroke();if(t=\"height\"===this.model.dimension?0:Math.PI/2,null!=this.model.lower_head)for(r=i=0,a=this._lower_sx.length;0<=a?i<a:i>a;r=0<=a?++i:--i)e.save(),e.translate(this._lower_sx[r],this._lower_sy[r]),e.rotate(t+Math.PI),this.model.lower_head.render(e,r),e.restore();if(null!=this.model.upper_head){for(u=[],r=n=0,l=this._upper_sx.length;0<=l?n<l:n>l;r=0<=l?++n:--n)e.save(),e.translate(this._upper_sx[r],this._upper_sy[r]),e.rotate(t),this.model.upper_head.render(e,r),u.push(e.restore());return u}}},e}(n.AnnotationView),r.Whisker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.WhiskerView,e.prototype.type=\"Whisker\",e.mixins([\"line\"]),e.define({lower:[l.DistanceSpec],lower_head:[l.Instance,function(){return new a.TeeHead({level:\"underlay\",size:10})}],upper:[l.DistanceSpec],upper_head:[l.Instance,function(){return new a.TeeHead({level:\"underlay\",size:10})}],base:[l.DistanceSpec],dimension:[l.Dimension,\"height\"],source:[l.Instance,function(){return new s.ColumnDataSource}],x_range_name:[l.String,\"default\"],y_range_name:[l.String,\"default\"]}),e.override({level:\"underlay\"}),e.prototype._normals=function(){var t,e,r,o;return\"height\"===this.dimension?(r=[1,0],t=r[0],e=r[1]):(o=[0,1],t=o[0],e=o[1]),[t,e]},e}(n.Annotation)},{\"../sources/column_data_source\":\"models/sources/column_data_source\",\"./annotation\":\"models/annotations/annotation\",\"./arrow_head\":\"models/annotations/arrow_head\",\"core/properties\":\"core/properties\"}],\"models/axes/axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/layout/side_panel\"),s=t(\"../renderers/guide_renderer\"),a=t(\"../renderers/renderer\"),l=t(\"core/logging\"),u=t(\"core/properties\"),c=t(\"core/util/types\");r.AxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._x_range_name=this.model.x_range_name,this._y_range_name=this.model.y_range_name},e.prototype.render=function(){var t;if(this.model.visible!==!1)return t=this.plot_view.canvas_view.ctx,t.save(),this._draw_rule(t),this._draw_major_ticks(t),this._draw_minor_ticks(t),this._draw_major_labels(t),this._draw_axis_label(t),t.restore()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(t){return function(){return t.plot_view.request_render()}}(this))},e.prototype._get_size=function(){return this._tick_extent()+this._tick_label_extent()+this._axis_label_extent()},e.prototype._draw_rule=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m;if(this.visuals.axis_line.doit){for(s=e=this.model.rule_coords,h=s[0],f=s[1],a=this.plot_view.map_to_screen(h,f,this._x_range_name,this._y_range_name),_=a[0],p=a[1],l=this.model.normals,i=l[0],n=l[1],u=this.model.offsets,d=u[0],m=u[1],this.visuals.axis_line.set_value(t),t.beginPath(),t.moveTo(Math.round(_[0]+i*d),Math.round(p[0]+n*m)),r=o=1,c=_.length;1<=c?o<c:o>c;r=1<=c?++o:--o)t.lineTo(Math.round(_[r]+i*d),Math.round(p[r]+n*m));return t.stroke()}},e.prototype._draw_major_ticks=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v;if(this.visuals.major_tick_line.doit){for(e=this.model.tick_coords,s=e.major,m=s[0],g=s[1],a=this.plot_view.map_to_screen(m,g,this._x_range_name,this._y_range_name),p=a[0],h=a[1],l=this.model.normals,i=l[0],n=l[1],u=this.model.offsets,y=u[0],v=u[1],d=this.model.major_tick_in,f=this.model.major_tick_out,this.visuals.major_tick_line.set_value(t),_=[],r=o=0,c=p.length;0<=c?o<c:o>c;r=0<=c?++o:--o)t.beginPath(),t.moveTo(Math.round(p[r]+i*f+i*y),Math.round(h[r]+n*f+n*v)),t.lineTo(Math.round(p[r]-i*d+i*y),Math.round(h[r]-n*d+n*v)),_.push(t.stroke());return _}},e.prototype._draw_minor_ticks=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v;if(this.visuals.minor_tick_line.doit){for(e=this.model.tick_coords,s=e.minor,m=s[0],g=s[1],a=this.plot_view.map_to_screen(m,g,this._x_range_name,this._y_range_name),p=a[0],h=a[1],l=this.model.normals,i=l[0],n=l[1],u=this.model.offsets,y=u[0],v=u[1],d=this.model.minor_tick_in,f=this.model.minor_tick_out,this.visuals.minor_tick_line.set_value(t),_=[],r=o=0,c=p.length;0<=c?o<c:o>c;r=0<=c?++o:--o)t.beginPath(),t.moveTo(Math.round(p[r]+i*f+i*y),Math.round(h[r]+n*f+n*v)),t.lineTo(Math.round(p[r]-i*d+i*y),Math.round(h[r]-n*d+n*v)),_.push(t.stroke());return _}},e.prototype._draw_major_labels=function(t){var e,r,o,i,n,s,a,l,u,_,p,h,d,f,m,y,g,v,b,w,x,k,M;for(r=this.model.tick_coords,_=r.major,w=_[0],k=_[1],p=this.plot_view.map_to_screen(w,k,this._x_range_name,this._y_range_name),v=p[0],b=p[1],h=this.model.normals,a=h[0],l=h[1],d=this.model.offsets,x=d[0],M=d[1],o=this.model.dimension,y=this.model.panel_side,u=this.model.major_label_orientation,e=c.isString(u)?this.model.panel.get_label_angle_heuristic(u):-u,g=this._tick_extent()+this.model.major_label_standoff,s=this.model.compute_labels(r.major[o]),this.visuals.major_label_text.set_value(t),this.model.panel.apply_label_text_heuristics(t,u),m=[],i=n=0,f=v.length;0<=f?n<f:n>f;i=0<=f?++n:--n)e?(t.translate(v[i]+a*g+a*x,b[i]+l*g+l*M),t.rotate(e),t.fillText(s[i],0,0),t.rotate(-e),m.push(t.translate(-v[i]-a*g+a*x,-b[i]-l*g+l*M))):m.push(t.fillText(s[i],Math.round(v[i]+a*g+a*x),Math.round(b[i]+l*g+l*M)));return m},e.prototype._draw_axis_label=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y;if(r=this.model.axis_label,null!=r&&(s=this.model.rule_coords,d=s[0],m=s[1],a=this.plot_view.map_to_screen(d,m,this._x_range_name,this._y_range_name),p=a[0],h=a[1],l=this.model.normals,o=l[0],i=l[1],u=this.model.offsets,f=u[0],y=u[1],c=this.model.panel_side,n=\"parallel\",e=this.model.panel.get_label_angle_heuristic(n),_=this._tick_extent()+this._tick_label_extent()+this.model.axis_label_standoff,p=(p[0]+p[p.length-1])/2,h=(h[0]+h[h.length-1])/2,this.visuals.axis_label_text.set_value(t),this.model.panel.apply_label_text_heuristics(t,n),d=p+o*_+o*f,m=h+i*_+i*y,!isNaN(d)&&!isNaN(m)))return e?(t.translate(d,m),t.rotate(e),t.fillText(r,0,0),t.rotate(-e),t.translate(-d,-m)):t.fillText(r,d,m)},e.prototype._tick_extent=function(){return this.model.major_tick_out},e.prototype._tick_label_extent=function(){var t,e,r,o,i,n,s,a,l,u,_,p,h,d,f,m,y,g,v;for(n=0,o=this.plot_view.canvas_view.ctx,i=this.model.dimension,r=this.model.tick_coords.major,m=this.model.panel_side,h=this.model.major_label_orientation,p=this.model.compute_labels(r[i]),this.visuals.major_label_text.set_value(o),c.isString(h)?(l=1,t=this.model.panel.get_label_angle_heuristic(h)):(l=2,t=-h),t=Math.abs(t),e=Math.cos(t),f=Math.sin(t),\"above\"===m||\"below\"===m?(v=f,a=e):(v=e,a=f),u=_=0,d=p.length;0<=d?_<d:_>d;u=0<=d?++_:--_)null!=p[u]&&(g=1.1*o.measureText(p[u]).width,s=.9*o.measureText(p[u]).ascent,y=g*v+s/l*a,y>n&&(n=y));return n>0&&(n+=this.model.major_label_standoff),n},e.prototype._axis_label_extent=function(){var t,e,r,o,i,n,s,a,l,u;return i=0,l=this.model.panel_side,e=this.model.axis_label,s=\"parallel\",o=this.plot_view.canvas_view.ctx,this.visuals.axis_label_text.set_value(o),t=Math.abs(this.model.panel.get_label_angle_heuristic(s)),r=Math.cos(t),a=Math.sin(t),e&&(i+=this.model.axis_label_standoff,this.visuals.axis_label_text.set_value(o),u=1.1*o.measureText(e).width,n=.9*o.measureText(e).ascent,i+=\"above\"===l||\"below\"===l?u*a+n*r:u*r+n*a),i},e}(a.RendererView),r.Axis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.AxisView,e.prototype.type=\"Axis\",e.mixins([\"line:axis_\",\"line:major_tick_\",\"line:minor_tick_\",\"text:major_label_\",\"text:axis_label_\"]),e.define({bounds:[u.Any,\"auto\"],ticker:[u.Instance,null],formatter:[u.Instance,null],x_range_name:[u.String,\"default\"],y_range_name:[u.String,\"default\"],axis_label:[u.String,\"\"],axis_label_standoff:[u.Int,5],major_label_standoff:[u.Int,5],major_label_orientation:[u.Any,\"horizontal\"],major_label_overrides:[u.Any,{}],major_tick_in:[u.Number,2],major_tick_out:[u.Number,6],minor_tick_in:[u.Number,0],minor_tick_out:[u.Number,4]}),e.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\"}),e.internal({panel_side:[u.Any]}),e.prototype.compute_labels=function(t){var e,r,o,i;for(o=this.formatter.doFormat(t,this),e=r=0,i=t.length;0<=i?r<i:r>i;e=0<=i?++r:--r)t[e]in this.major_label_overrides&&(o[e]=this.major_label_overrides[t[e]]);return o},e.getters({computed_bounds:function(){return this._computed_bounds()},rule_coords:function(){return this._rule_coords()},tick_coords:function(){return this._tick_coords()},ranges:function(){return this._ranges()},normals:function(){return this.panel._normals},dimension:function(){return this.panel._dim},offsets:function(){return this._offsets()},loc:function(){return this._get_loc()}}),e.prototype.add_panel=function(t){return this.panel=new n.SidePanel({side:t}),this.panel.attach_document(this.document),this.panel_side=t},e.prototype._offsets=function(){var t,e,r,o,i;switch(r=this.panel_side,e=[0,0],o=e[0],i=e[1],t=this.plot.plot_canvas.frame,r){case\"below\":i=Math.abs(this.panel._top.value-t._bottom.value);break;case\"above\":i=Math.abs(this.panel._bottom.value-t._top.value);break;case\"right\":o=Math.abs(this.panel._left.value-t._right.value);break;case\"left\":o=Math.abs(this.panel._right.value-t._left.value)}return[o,i]},e.prototype._ranges=function(){var t,e,r,o;return e=this.dimension,r=(e+1)%2,t=this.plot.plot_canvas.frame,o=[t.x_ranges[this.x_range_name],t.y_ranges[this.y_range_name]],[o[e],o[r]]},e.prototype._computed_bounds=function(){var t,e,r,o,i,n,s,a;return i=this.ranges,r=i[0],t=i[1],a=null!=(n=this.bounds)?n:\"auto\",o=[r.min,r.max],\"auto\"===a?o:c.isArray(a)?(Math.abs(a[0]-a[1])>Math.abs(o[0]-o[1])?(s=Math.max(Math.min(a[0],a[1]),o[0]),e=Math.min(Math.max(a[0],a[1]),o[1])):(s=Math.min(a[0],a[1]),e=Math.max(a[0],a[1])),[s,e]):(l.logger.error(\"user bounds '\"+a+\"' not understood\"),null)},e.prototype._rule_coords=function(){var t,e,r,o,i,n,s,a,l,u,c;return o=this.dimension,i=(o+1)%2,s=this.ranges,n=s[0],e=s[1],a=this.computed_bounds,l=a[0],r=a[1],u=new Array(2),c=new Array(2),t=[u,c],t[o][0]=Math.max(l,n.min),t[o][1]=Math.min(r,n.max),t[o][0]>t[o][1]&&(t[o][0]=t[o][1]=NaN),t[i][0]=this.loc,t[i][1]=this.loc,t},e.prototype._tick_coords=function(){var t,e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T;if(o=this.dimension,n=(o+1)%2,y=this.ranges,d=y[0],e=y[1],g=this.computed_bounds,k=g[0],r=g[1],M=this.ticker.get_ticks(k,r,d,this.loc,{}),u=M.major,h=M.minor,j=[],T=[],t=[j,T],_=[],p=[],c=[_,p],\"FactorRange\"===d.type)for(i=s=0,v=u.length;0<=v?s<v:s>v;i=0<=v?++s:--s)t[o].push(u[i]),t[n].push(this.loc);else{for(b=[d.min,d.max],m=b[0],f=b[1],i=a=0,w=u.length;0<=w?a<w:a>w;i=0<=w?++a:--a)u[i]<m||u[i]>f||(t[o].push(u[i]),t[n].push(this.loc));for(i=l=0,x=h.length;0<=x?l<x:l>x;i=0<=x?++l:--l)h[i]<m||h[i]>f||(c[o].push(h[i]),c[n].push(this.loc))}return{major:t,minor:c}},e.prototype._get_loc=function(){var t,e,r,o,i,n;switch(i=this.ranges,o=i[0],e=i[1],r=e.start,t=e.end,n=this.panel_side){case\"left\":case\"below\":return e.start;case\"right\":case\"above\":return e.end}},e}(s.GuideRenderer)},{\"../renderers/guide_renderer\":\"models/renderers/guide_renderer\",\"../renderers/renderer\":\"models/renderers/renderer\",\"core/layout/side_panel\":\"core/layout/side_panel\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/axes/categorical_axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./axis\"),s=t(\"../formatters/categorical_tick_formatter\"),a=t(\"../tickers/categorical_ticker\"),l=t(\"core/logging\");r.CategoricalAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(n.AxisView),r.CategoricalAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.CategoricalAxisView,e.prototype.type=\"CategoricalAxis\",e.override({ticker:function(){return new a.CategoricalTicker},formatter:function(){return new s.CategoricalTickFormatter}}),e.prototype._computed_bounds=function(){var t,e,r,o,i,n;return o=this.ranges,e=o[0],t=o[1],n=null!=(i=this.bounds)?i:\"auto\",r=[e.min,e.max],\"auto\"!==n&&l.logger.warn(\"Categorical Axes only support user_bounds='auto', ignoring\"),r},e}(n.Axis)},{\"../formatters/categorical_tick_formatter\":\"models/formatters/categorical_tick_formatter\",\"../tickers/categorical_ticker\":\"models/tickers/categorical_ticker\",\"./axis\":\"models/axes/axis\",\"core/logging\":\"core/logging\"}],\"models/axes/continuous_axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./axis\");r.ContinuousAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ContinuousAxis\",e}(n.Axis)},{\"./axis\":\"models/axes/axis\"}],\"models/axes/datetime_axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./linear_axis\"),s=t(\"../formatters/datetime_tick_formatter\"),a=t(\"../tickers/datetime_ticker\");r.DatetimeAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(n.LinearAxisView),r.DatetimeAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.DatetimeAxisView,e.prototype.type=\"DatetimeAxis\",e.override({ticker:function(){return new a.DatetimeTicker},formatter:function(){return new s.DatetimeTickFormatter}}),e}(n.LinearAxis)},{\"../formatters/datetime_tick_formatter\":\"models/formatters/datetime_tick_formatter\",\"../tickers/datetime_ticker\":\"models/tickers/datetime_ticker\",\"./linear_axis\":\"models/axes/linear_axis\"}],\"models/axes/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./axis\");r.Axis=o.Axis;var i=t(\"./categorical_axis\");r.CategoricalAxis=i.CategoricalAxis;var n=t(\"./continuous_axis\");r.ContinuousAxis=n.ContinuousAxis;var s=t(\"./datetime_axis\");r.DatetimeAxis=s.DatetimeAxis;var a=t(\"./linear_axis\");r.LinearAxis=a.LinearAxis;var l=t(\"./log_axis\");r.LogAxis=l.LogAxis},{\"./axis\":\"models/axes/axis\",\"./categorical_axis\":\"models/axes/categorical_axis\",\"./continuous_axis\":\"models/axes/continuous_axis\",\"./datetime_axis\":\"models/axes/datetime_axis\",\"./linear_axis\":\"models/axes/linear_axis\",\"./log_axis\":\"models/axes/log_axis\"}],\"models/axes/linear_axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./axis\"),s=t(\"./continuous_axis\"),a=t(\"../formatters/basic_tick_formatter\"),l=t(\"../tickers/basic_ticker\");r.LinearAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(n.AxisView),r.LinearAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.LinearAxisView,e.prototype.type=\"LinearAxis\",e.override({ticker:function(){return new l.BasicTicker},formatter:function(){return new a.BasicTickFormatter}}),e}(s.ContinuousAxis)},{\"../formatters/basic_tick_formatter\":\"models/formatters/basic_tick_formatter\",\"../tickers/basic_ticker\":\"models/tickers/basic_ticker\",\"./axis\":\"models/axes/axis\",\"./continuous_axis\":\"models/axes/continuous_axis\"}],\"models/axes/log_axis\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./axis\"),s=t(\"./continuous_axis\"),a=t(\"../formatters/log_tick_formatter\"),l=t(\"../tickers/log_ticker\");r.LogAxisView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(n.AxisView),r.LogAxis=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.LogAxisView,e.prototype.type=\"LogAxis\",e.override({ticker:function(){return new l.LogTicker},formatter:function(){return new a.LogTickFormatter}}),e}(s.ContinuousAxis)},{\"../formatters/log_tick_formatter\":\"models/formatters/log_tick_formatter\",\"../tickers/log_ticker\":\"models/tickers/log_ticker\",\"./axis\":\"models/axes/axis\",\"./continuous_axis\":\"models/axes/continuous_axis\"}],\"models/callbacks/customjs\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].slice,s=t(\"core/properties\"),a=t(\"core/util/object\"),l=t(\"../../model\");r.CustomJS=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return o(r,e),r.prototype.type=\"CustomJS\",r.define({args:[s.Any,{}],code:[s.String,\"\"]}),r.getters({values:function(){return this._make_values()},func:function(){return this._make_func()}}),r.prototype.execute=function(e,r){return this.func.apply(e,this.values.concat(e,r,t,{}))},r.prototype._make_values=function(){return a.values(this.args)},r.prototype._make_func=function(){return function(t,e,r){r.prototype=t.prototype;var o=new r,i=t.apply(o,e);return Object(i)===i?i:o}(Function,n.call(Object.keys(this.args)).concat([\"cb_obj\"],[\"cb_data\"],[\"require\"],[\"exports\"],[this.code]),function(){})},r}(l.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\"}],\"models/callbacks/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./customjs\");r.CustomJS=o.CustomJS;var i=t(\"./open_url\");r.OpenURL=i.OpenURL},{\"./customjs\":\"models/callbacks/customjs\",\"./open_url\":\"models/callbacks/open_url\"}],\"models/callbacks/open_url\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\"),s=t(\"core/properties\"),a=t(\"core/util/selection\"),l=t(\"core/util/templating\");r.OpenURL=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"OpenURL\",e.define({url:[s.String,\"http://\"]}),e.prototype.execute=function(t){var e,r,o,i,n;for(i=a.get_indices(t),r=0,o=i.length;r<o;r++)e=i[r],n=l.replace_placeholders(this.url,t,e),window.open(n);return null},e}(n.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\",\"core/util/selection\":\"core/util/selection\",\"core/util/templating\":\"core/util/templating\"}],\"models/canvas/canvas\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/layout/layout_canvas\"),s=t(\"core/dom_view\"),a=t(\"core/layout/solver\"),l=t(\"core/logging\"),u=t(\"core/properties\"),c=t(\"core/dom\"),_=t(\"core/util/canvas\"),p=t(\"canvas2svg\");null!=window.CanvasPixelArray&&(CanvasPixelArray.prototype.set=function(t){var e,r,o,i;for(i=[],e=r=0,o=this.length;0<=o?r<o:r>o;e=0<=o?++r:--r)i.push(this[e]=t[e]);return i}),r.CanvasView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-canvas-wrapper\",e.prototype.initialize=function(t){switch(e.__super__.initialize.call(this,t),this.map_el=this.model.map?this.el.appendChild(c.div({\"class\":\"bk-canvas-map\"})):null,this.events_el=this.el.appendChild(c.div({\"class\":\"bk-canvas-events\"})),this.overlays_el=this.el.appendChild(c.div({\"class\":\"bk-canvas-overlays\"})),this.model.output_backend){case\"canvas\":case\"webgl\":this.canvas_el=this.el.appendChild(c.canvas({\"class\":\"bk-canvas\"})),this._ctx=this.canvas_el.getContext(\"2d\");break;case\"svg\":this._ctx=new p,this.canvas_el=this.el.appendChild(this._ctx.getSvg())}return this.ctx=this.get_ctx(),_.fixup_ctx(this.ctx),l.logger.debug(\"CanvasView initialized\")},e.prototype.get_ctx=function(){return this._ctx},e.prototype.get_canvas_element=function(){return this.canvas_el},e.prototype.prepare_canvas=function(){var t,e,r;return r=this.model._width.value,t=this.model._height.value,this.el.style.width=r+\"px\",this.el.style.height=t+\"px\",e=_.get_scale_ratio(this.ctx,this.model.use_hidpi,this.model.output_backend),this.model.pixel_ratio=e,this.canvas_el.style.width=r+\"px\",this.canvas_el.style.height=t+\"px\",this.canvas_el.setAttribute(\"width\",r*e),this.canvas_el.setAttribute(\"height\",t*e),l.logger.debug(\"Rendering CanvasView with width: \"+r+\", height: \"+t+\", pixel ratio: \"+e)},e.prototype.set_dims=function(t){var e,r;if(r=t[0],e=t[1],0!==r&&0!==e)return null!=this._width_constraint&&this.solver.has_constraint(this._width_constraint)&&this.solver.remove_constraint(this._width_constraint),null!=this._height_constraint&&this.solver.has_constraint(this._height_constraint)&&this.solver.remove_constraint(this._height_constraint),this._width_constraint=a.EQ(this.model._width,-r),this.solver.add_constraint(this._width_constraint),this._height_constraint=a.EQ(this.model._height,-e),this.solver.add_constraint(this._height_constraint),this.solver.update_variables()},e}(s.DOMView),r.Canvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Canvas\",e.prototype.default_view=r.CanvasView,e.internal({map:[u.Boolean,!1],initial_width:[u.Number],initial_height:[u.Number],use_hidpi:[u.Boolean,!0],pixel_ratio:[u.Number,1],output_backend:[u.OutputBackend,\"canvas\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.panel=this},e.prototype.vx_to_sx=function(t){return t},e.prototype.vy_to_sy=function(t){return this._height.value-(t+1)},e.prototype.v_vx_to_sx=function(t){return new Float64Array(t)},e.prototype.v_vy_to_sy=function(t){var e,r,o,i,n,s;for(e=new Float64Array(t.length),r=this._height.value,o=i=0,n=t.length;i<n;o=++i)s=t[o],e[o]=r-(s+1);return e},e.prototype.sx_to_vx=function(t){return t},e.prototype.sy_to_vy=function(t){return this._height.value-(t+1)},e.prototype.v_sx_to_vx=function(t){return new Float64Array(t)},e.prototype.v_sy_to_vy=function(t){var e,r,o,i,n,s;for(e=new Float64Array(t.length),r=this._height.value,o=i=0,n=t.length;i<n;o=++i)s=t[o],e[o]=r-(s+1);return e},e.prototype.get_constraints=function(){return e.__super__.get_constraints.call(this).concat([a.GE(this._top),a.GE(this._bottom),a.GE(this._left),a.GE(this._right),a.GE(this._width),a.GE(this._height),a.EQ(this._width,[-1,this._right]),a.EQ(this._height,[-1,this._top])])},e}(n.LayoutCanvas)},{canvas2svg:\"canvas2svg\",\"core/dom\":\"core/dom\",\"core/dom_view\":\"core/dom_view\",\"core/layout/layout_canvas\":\"core/layout/layout_canvas\",\"core/layout/solver\":\"core/layout/solver\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/canvas\":\"core/util/canvas\"}],\"models/canvas/cartesian_frame\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../scales/categorical_scale\"),s=t(\"../scales/linear_scale\"),a=t(\"../scales/log_scale\"),l=t(\"../ranges/range1d\"),u=t(\"../ranges/data_range1d\"),c=t(\"../ranges/factor_range\"),_=t(\"core/layout/solver\"),p=t(\"core/layout/layout_canvas\"),h=t(\"core/logging\"),d=t(\"core/properties\");r.CartesianFrame=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"CartesianFrame\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.panel=this,this._configure_scales(),this.connect(this.change,function(t){return function(){return t._configure_scales()}}(this)),null},e.prototype.contains=function(t,e){return t>=this._left.value&&t<=this._right.value&&e>=this._bottom.value&&e<=this._top.value},e.prototype.map_to_screen=function(t,e,r,o,i){var n,s,a,l;return null==o&&(o=\"default\"),null==i&&(i=\"default\"),a=this.xscales[o].v_compute(t),n=r.v_vx_to_sx(a),l=this.yscales[i].v_compute(e),s=r.v_vy_to_sy(l),[n,s]},e.prototype._get_ranges=function(t,e){var r,o,i;if(i={},i[\"default\"]=t,null!=e)for(o in e)r=e[o],i[o]=r;return i},e.prototype._get_scales=function(t,e,r){var o,i,_,p;p={};for(o in e){if(i=e[o],i instanceof u.DataRange1d||i instanceof l.Range1d){if(!(t instanceof a.LogScale||t instanceof s.LinearScale))throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type);if(t instanceof n.CategoricalScale)throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type)}if(i instanceof c.FactorRange&&!(t instanceof n.CategoricalScale))throw new Error(\"Range \"+i.type+\" is incompatible is Scale \"+t.type);t instanceof a.LogScale&&i instanceof u.DataRange1d&&(i.scale_hint=\"log\"),_=t.clone(),_.setv({source_range:i,target_range:r}),p[o]=_}return p},e.prototype._configure_frame_ranges=function(){return this._h_range=new l.Range1d({start:this._left.value,end:this._left.value+this._width.value}),this._v_range=new l.Range1d({start:this._bottom.value,end:this._bottom.value+this._height.value})},e.prototype._configure_scales=function(){return 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_range),this._yscales=this._get_scales(this.y_scale,this._y_ranges,this._v_range)},e.prototype._update_scales=function(){var t,e,r,o;this._configure_frame_ranges(),e=this._xscales;for(t in e)o=e[t],o.target_range=this._h_range;r=this._yscales;for(t in r)o=r[t],o.target_range=this._v_range;return null},e.getters({h_range:function(){return this._h_range},v_range:function(){return this._v_range},x_ranges:function(){return this._x_ranges},y_ranges:function(){return this._y_ranges},xscales:function(){return this._xscales},yscales:function(){return this._yscales},x_mappers:function(){return h.logger.warn(\"x_mappers attr is deprecated, use xscales\"),this._xscales},y_mappers:function(){return h.logger.warn(\"y_mappers attr is deprecated, use yscales\"),this._yscales}}),e.internal({extra_x_ranges:[d.Any,{}],extra_y_ranges:[d.Any,{}],x_range:[d.Instance],y_range:[d.Instance],x_scale:[d.Instance],y_scale:[d.Instance]}),e.prototype.get_constraints=function(){return[_.GE(this._top),_.GE(this._bottom),_.GE(this._left),_.GE(this._right),_.GE(this._width),_.GE(this._height),_.EQ(this._left,this._width,[-1,this._right]),_.EQ(this._bottom,this._height,[-1,this._top])]},e}(p.LayoutCanvas)},{\"../ranges/data_range1d\":\"models/ranges/data_range1d\",\"../ranges/factor_range\":\"models/ranges/factor_range\",\"../ranges/range1d\":\"models/ranges/range1d\",\"../scales/categorical_scale\":\"models/scales/categorical_scale\",\"../scales/linear_scale\":\"models/scales/linear_scale\",\"../scales/log_scale\":\"models/scales/log_scale\",\"core/layout/layout_canvas\":\"core/layout/layout_canvas\",\"core/layout/solver\":\"core/layout/solver\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/canvas/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./canvas\");r.Canvas=o.Canvas;var i=t(\"./cartesian_frame\");r.CartesianFrame=i.CartesianFrame},{\"./canvas\":\"models/canvas/canvas\",\"./cartesian_frame\":\"models/canvas/cartesian_frame\"}],\"models/formatters/basic_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./tick_formatter\"),s=t(\"core/properties\"),a=t(\"core/util/types\");r.BasicTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"BasicTickFormatter\",e.define({precision:[s.Any,\"auto\"],use_scientific:[s.Bool,!0],power_limit_high:[s.Number,5],power_limit_low:[s.Number,-3]}),e.getters({scientific_limit_low:function(){return Math.pow(10,this.power_limit_low)},scientific_limit_high:function(){return Math.pow(10,this.power_limit_high)}}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.last_precision=3},e.prototype.doFormat=function(t,e){var r,o,i,n,s,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k;if(0===t.length)return[];if(k=0,t.length>=2&&(k=Math.abs(t[1]-t[0])/1e4),p=!1,this.use_scientific)for(i=0,u=t.length;i<u;i++)if(b=t[i],w=Math.abs(b),w>k&&(w>=this.scientific_limit_high||w<=this.scientific_limit_low)){p=!0;break}if(d=this.precision,null==d||a.isNumber(d)){if(l=new Array(t.length),p)for(r=n=0,f=t.length;0<=f?n<f:n>f;r=0<=f?++n:--n)l[r]=t[r].toExponential(d||void 0);else for(r=s=0,m=t.length;0<=m?s<m:s>m;r=0<=m?++s:--s)l[r]=t[r].toFixed(d||void 0).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\");return l}if(\"auto\"===d)for(l=new Array(t.length),x=c=y=this.last_precision;y<=15?c<=15:c>=15;x=y<=15?++c:--c){if(o=!0,p){for(r=_=0,g=t.length;0<=g?_<g:_>g;r=0<=g?++_:--_)if(l[r]=t[r].toExponential(x),r>0&&l[r]===l[r-1]){o=!1;break}if(o)break}else{for(r=h=0,v=t.length;0<=v?h<v:h>v;r=0<=v?++h:--h)if(l[r]=t[r].toFixed(x).replace(/(\\.[0-9]*?)0+$/,\"$1\").replace(/\\.$/,\"\"),r>0&&l[r]===l[r-1]){o=!1;break}if(o)break}if(o)return this.last_precision=x,l}return l},e}(n.TickFormatter)},{\"./tick_formatter\":\"models/formatters/tick_formatter\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/formatters/categorical_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./tick_formatter\");r.CategoricalTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"CategoricalTickFormatter\",e.prototype.doFormat=function(t,e){return t},e}(n.TickFormatter)},{\"./tick_formatter\":\"models/formatters/tick_formatter\"}],\"models/formatters/datetime_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s=function(t,e){function r(){this.constructor=t}for(var o in e)a.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,\n",
" t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(\"sprintf\"),u=t(\"timezone\"),c=t(\"./tick_formatter\"),_=t(\"core/logging\"),p=t(\"core/properties\"),h=t(\"core/util/array\"),d=t(\"core/util/types\");n=function(t){return Math.round(t/1e3%1*1e6)},o=function(t){return u(t,\"%Y %m %d %H %M %S\").split(/\\s+/).map(function(t){return parseInt(t,10)})},i=function(t,e){var r;return d.isFunction(e)?e(t):(r=l.sprintf(\"$1%06d\",n(t)),e=e.replace(/((^|[^%])(%%)*)%f/,r),e.indexOf(\"%\")===-1?e:u(t,e))},r.DatetimeTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type=\"DatetimeTickFormatter\",e.define({microseconds:[p.Array,[\"%fus\"]],milliseconds:[p.Array,[\"%3Nms\",\"%S.%3Ns\"]],seconds:[p.Array,[\"%Ss\"]],minsec:[p.Array,[\":%M:%S\"]],minutes:[p.Array,[\":%M\",\"%Mm\"]],hourmin:[p.Array,[\"%H:%M\"]],hours:[p.Array,[\"%Hh\",\"%H:%M\"]],days:[p.Array,[\"%m/%d\",\"%a%d\"]],months:[p.Array,[\"%m/%Y\",\"%b%y\"]],years:[p.Array,[\"%Y\"]]}),e.prototype.format_order=[\"microseconds\",\"milliseconds\",\"seconds\",\"minsec\",\"minutes\",\"hourmin\",\"hours\",\"days\",\"months\",\"years\"],e.prototype.strip_leading_zeros=!0,e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._update_width_formats()},e.prototype._update_width_formats=function(){var t,e;return e=u(new Date),t=function(t){var r,o,n;return o=function(){var o,n,s;for(s=[],o=0,n=t.length;o<n;o++)r=t[o],s.push(i(e,r).length);return s}(),n=h.sortBy(h.zip(o,t),function(t){var e,r;return r=t[0],e=t[1],r}),h.unzip(n)},this._width_formats={microseconds:t(this.microseconds),milliseconds:t(this.milliseconds),seconds:t(this.seconds),minsec:t(this.minsec),minutes:t(this.minutes),hourmin:t(this.hourmin),hours:t(this.hours),days:t(this.days),months:t(this.months),years:t(this.years)}},e.prototype._get_resolution_str=function(t,e){var r;switch(r=1.1*t,!1){case!(r<.001):return\"microseconds\";case!(r<1):return\"milliseconds\";case!(r<60):return e>=60?\"minsec\":\"seconds\";case!(r<3600):return e>=3600?\"hourmin\":\"minutes\";case!(r<86400):return\"hours\";case!(r<2678400):return\"days\";case!(r<31536e3):return\"months\";default:return\"years\"}},e.prototype.doFormat=function(t,e,r,n,s,a){var l,u,c,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C,N,D,F;if(null==r&&(r=null),null==n&&(n=null),null==s&&(s=.3),null==a&&(a=null),0===t.length)return[];if(E=Math.abs(t[t.length-1]-t[0])/1e3,M=a?a.resolution:E/(t.length-1),O=this._get_resolution_str(M,E),j=this._width_formats[O],F=j[0],p=j[1],c=p[0],n){for(h=[],f=m=0,T=F.length;0<=T?m<T:m>T;f=0<=T?++m:--m)F[f]*t.length<s*n&&h.push(this._width_formats[f]);h.length>0&&(c=h[h.length-1])}for(v=[],P=this.format_order.indexOf(O),N={},S=this.format_order,y=0,b=S.length;y<b;y++)u=S[y],N[u]=0;for(N.seconds=5,N.minsec=4,N.minutes=4,N.hourmin=3,N.hours=3,g=0,w=t.length;g<w;g++){C=t[g];try{D=o(C),A=i(C,c)}catch(I){l=I,_.logger.warn(\"unable to format tick for timestamp value \"+C),_.logger.warn(\" - \"+l),v.push(\"ERR\");continue}for(d=!1,k=P;0===D[N[this.format_order[k]]]&&(k+=1,k!==this.format_order.length);){if((\"minsec\"===O||\"hourmin\"===O)&&!d){if(\"minsec\"===O&&0===D[4]&&0!==D[5]||\"hourmin\"===O&&0===D[3]&&0!==D[4]){x=this._width_formats[this.format_order[P-1]][1][0],A=i(C,x);break}d=!0}x=this._width_formats[this.format_order[k]][1][0],A=i(C,x)}this.strip_leading_zeros?(z=A.replace(/^0+/g,\"\"),z!==A&&isNaN(parseInt(z))&&(z=\"0\"+z),v.push(z)):v.push(A)}return v},e}(c.TickFormatter)},{\"./tick_formatter\":\"models/formatters/tick_formatter\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/types\":\"core/util/types\",sprintf:\"sprintf\",timezone:\"timezone/index\"}],\"models/formatters/func_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].slice,s=t(\"./tick_formatter\"),a=t(\"core/properties\"),l=t(\"core/util/object\");r.FuncTickFormatter=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return o(r,e),r.prototype.type=\"FuncTickFormatter\",r.define({args:[a.Any,{}],code:[a.String,\"\"]}),r.prototype._make_func=function(){return function(t,e,r){r.prototype=t.prototype;var o=new r,i=t.apply(o,e);return Object(i)===i?i:o}(Function,[\"tick\"].concat(n.call(Object.keys(this.args)),[\"require\"],[this.code]),function(){})},r.prototype.doFormat=function(e,r){var o,i;return o=this._make_func(),function(){var r,s,a;for(a=[],r=0,s=e.length;r<s;r++)i=e[r],a.push(o.apply(null,[i].concat(n.call(l.values(this.args)),[t])));return a}.call(this)},r}(s.TickFormatter)},{\"./tick_formatter\":\"models/formatters/tick_formatter\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\"}],\"models/formatters/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./basic_tick_formatter\");r.BasicTickFormatter=o.BasicTickFormatter;var i=t(\"./categorical_tick_formatter\");r.CategoricalTickFormatter=i.CategoricalTickFormatter;var n=t(\"./datetime_tick_formatter\");r.DatetimeTickFormatter=n.DatetimeTickFormatter;var s=t(\"./func_tick_formatter\");r.FuncTickFormatter=s.FuncTickFormatter;var a=t(\"./log_tick_formatter\");r.LogTickFormatter=a.LogTickFormatter;var l=t(\"./mercator_tick_formatter\");r.MercatorTickFormatter=l.MercatorTickFormatter;var u=t(\"./numeral_tick_formatter\");r.NumeralTickFormatter=u.NumeralTickFormatter;var c=t(\"./printf_tick_formatter\");r.PrintfTickFormatter=c.PrintfTickFormatter;var _=t(\"./tick_formatter\");r.TickFormatter=_.TickFormatter},{\"./basic_tick_formatter\":\"models/formatters/basic_tick_formatter\",\"./categorical_tick_formatter\":\"models/formatters/categorical_tick_formatter\",\"./datetime_tick_formatter\":\"models/formatters/datetime_tick_formatter\",\"./func_tick_formatter\":\"models/formatters/func_tick_formatter\",\"./log_tick_formatter\":\"models/formatters/log_tick_formatter\",\"./mercator_tick_formatter\":\"models/formatters/mercator_tick_formatter\",\"./numeral_tick_formatter\":\"models/formatters/numeral_tick_formatter\",\"./printf_tick_formatter\":\"models/formatters/printf_tick_formatter\",\"./tick_formatter\":\"models/formatters/tick_formatter\"}],\"models/formatters/log_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./basic_tick_formatter\"),s=t(\"./tick_formatter\"),a=t(\"core/logging\"),l=t(\"core/properties\");r.LogTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LogTickFormatter\",e.define({ticker:[l.Instance,null]}),e.prototype.initialize=function(t,r){if(e.__super__.initialize.call(this,t,r),this.basic_formatter=new n.BasicTickFormatter,null==this.ticker)return a.logger.warn(\"LogTickFormatter not configured with a ticker, using default base of 10 (labels will be incorrect if ticker base is not 10)\")},e.prototype.doFormat=function(t,e){var r,o,i,n,s,a;if(0===t.length)return[];for(r=null!=this.ticker?this.ticker.base:10,a=!1,n=new Array(t.length),o=i=0,s=t.length;0<=s?i<s:i>s;o=0<=s?++i:--i)if(n[o]=r+\"^\"+Math.round(Math.log(t[o])/Math.log(r)),o>0&&n[o]===n[o-1]){a=!0;break}return a&&(n=this.basic_formatter.doFormat(t)),n},e}(s.TickFormatter)},{\"./basic_tick_formatter\":\"models/formatters/basic_tick_formatter\",\"./tick_formatter\":\"models/formatters/tick_formatter\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/formatters/mercator_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./basic_tick_formatter\"),s=t(\"core/properties\"),a=t(\"core/util/proj4\");r.MercatorTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"MercatorTickFormatter\",e.define({dimension:[s.LatLon]}),e.prototype.doFormat=function(t,r){var o,i,n,s,l,u,c,_,p,h;if(null==this.dimension)throw new Error(\"MercatorTickFormatter.dimension not configured\");if(0===t.length)return[];if(u=new Array(t.length),\"lon\"===this.dimension)for(o=i=0,c=t.length;0<=c?i<c:i>c;o=0<=c?++i:--i)_=a.proj4(a.mercator).inverse([t[o],r.loc]),l=_[0],s=_[1],u[o]=l;else for(o=n=0,p=t.length;0<=p?n<p:n>p;o=0<=p?++n:--n)h=a.proj4(a.mercator).inverse([r.loc,t[o]]),l=h[0],s=h[1],u[o]=s;return e.__super__.doFormat.call(this,u,r)},e}(n.BasicTickFormatter)},{\"./basic_tick_formatter\":\"models/formatters/basic_tick_formatter\",\"core/properties\":\"core/properties\",\"core/util/proj4\":\"core/util/proj4\"}],\"models/formatters/numeral_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"numbro\"),s=t(\"./tick_formatter\"),a=t(\"core/properties\");r.NumeralTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"NumeralTickFormatter\",e.define({format:[a.String,\"0,0\"],language:[a.String,\"en\"],rounding:[a.String,\"round\"]}),e.prototype.doFormat=function(t,e){var r,o,i,s,a;return r=this.format,i=this.language,s=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}}.call(this),o=function(){var e,o,l;for(l=[],e=0,o=t.length;e<o;e++)a=t[e],l.push(n.format(a,r,i,s));return l}()},e}(s.TickFormatter)},{\"./tick_formatter\":\"models/formatters/tick_formatter\",\"core/properties\":\"core/properties\",numbro:\"numbro\"}],\"models/formatters/printf_tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"sprintf\"),s=t(\"./tick_formatter\"),a=t(\"core/properties\");r.PrintfTickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"PrintfTickFormatter\",e.define({format:[a.String,\"%s\"]}),e.prototype.doFormat=function(t,e){var r,o,i;return r=this.format,o=function(){var e,o,s;for(s=[],e=0,o=t.length;e<o;e++)i=t[e],s.push(n.sprintf(r,i));return s}()},e}(s.TickFormatter)},{\"./tick_formatter\":\"models/formatters/tick_formatter\",\"core/properties\":\"core/properties\",sprintf:\"sprintf\"}],\"models/formatters/tick_formatter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\");r.TickFormatter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"TickFormatter\",e.prototype.doFormat=function(t,e){},e}(n.Model)},{\"../../model\":\"model\"}],\"models/glyphs/annular_wedge\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/hittest\"),a=t(\"core/properties\"),l=t(\"core/util/math\");r.AnnularWedgeView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._map_data=function(){var t,e,r,o;for(\"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),o=[],t=e=0,r=this._start_angle.length;0<=r?e<r:e>r;t=0<=r?++e:--e)o.push(this._angle[t]=this._end_angle[t]-this._start_angle[t]);return o},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h;for(p=r.sx,h=r.sy,i=r._start_angle,o=r._angle,c=r.sinner_radius,_=r.souter_radius,n=this.model.properties.direction.value(),u=[],a=0,l=e.length;a<l;a++)s=e[a],isNaN(p[s]+h[s]+c[s]+_[s]+i[s]+o[s])||(t.translate(p[s],h[s]),t.rotate(i[s]),t.moveTo(_[s],0),t.beginPath(),t.arc(0,0,_[s],0,o[s],n),t.rotate(o[s]),t.lineTo(c[s],0),t.arc(0,0,c[s],0,-o[s],!n),t.closePath(),t.rotate(-o[s]-i[s]),t.translate(-p[s],-h[s]),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,s),t.fill()),this.visuals.line.doit?(this.visuals.line.set_vectorize(t,s),u.push(t.stroke())):u.push(void 0));return u},e.prototype._hit_point=function(t){var e,r,o,i,n,a,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C,N,D,F,I,B;for(m=[t.vx,t.vy],S=m[0],A=m[1],C=this.renderer.xscale.invert(S,!0),F=this.renderer.yscale.invert(A,!0),\"data\"===this.model.properties.outer_radius.units?(N=C-this.max_outer_radius,D=C+this.max_outer_radius,I=F-this.max_outer_radius,B=F+this.max_outer_radius):(O=S-this.max_outer_radius,P=S+this.max_outer_radius,y=this.renderer.xscale.v_invert([O,P],!0),N=y[0],D=y[1],E=A-this.max_outer_radius,z=A+this.max_outer_radius,g=this.renderer.yscale.v_invert([E,z],!0),I=g[0],B=g[1]),o=[],r=s.validate_bbox_coords([N,D],[I,B]),v=this.index.indices(r),_=0,h=v.length;_<h;_++)u=v[_],f=Math.pow(this.souter_radius[u],2),c=Math.pow(this.sinner_radius[u],2),x=this.renderer.xscale.compute(C,!0),k=this.renderer.xscale.compute(this._x[u],!0),j=this.renderer.yscale.compute(F,!0),T=this.renderer.yscale.compute(this._y[u],!0),n=Math.pow(x-k,2)+Math.pow(j-T,2),n<=f&&n>=c&&o.push([u,n]);for(i=this.model.properties.direction.value(),a=[],p=0,d=o.length;p<d;p++)b=o[p],u=b[0],n=b[1],w=this.renderer.plot_view.canvas.vx_to_sx(S),M=this.renderer.plot_view.canvas.vy_to_sy(A),e=Math.atan2(M-this.sy[u],w-this.sx[u]),l.angle_between(-e,-this._start_angle[u],-this._end_angle[u],i)&&a.push([u,n]);return s.create_1d_hit_test_result(a)},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_area_legend(t,e,r,o,i,n)},e.prototype._scxy=function(t){var e,r;return r=(this.sinner_radius[t]+this.souter_radius[t])/2,e=(this._start_angle[t]+this._end_angle[t])/2,{x:this.sx[t]+r*Math.cos(e),y:this.sy[t]+r*Math.sin(e)}},e.prototype.scx=function(t){return this._scxy(t).x},e.prototype.scy=function(t){return this._scxy(t).y},e}(n.XYGlyphView),r.AnnularWedge=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.AnnularWedgeView,e.prototype.type=\"AnnularWedge\",e.mixins([\"line\",\"fill\"]),e.define({direction:[a.Direction,\"anticlock\"],inner_radius:[a.DistanceSpec],outer_radius:[a.DistanceSpec],start_angle:[a.AngleSpec],end_angle:[a.AngleSpec]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\",\"core/util/math\":\"core/util/math\"}],\"models/glyphs/annulus\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/hittest\"),a=t(\"core/properties\");r.AnnulusView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._map_data=function(){return\"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},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f;for(d=r.sx,f=r.sy,p=r.sinner_radius,h=r.souter_radius,_=[],s=0,l=e.length;s<l;s++)if(i=e[s],!isNaN(d[i]+f[i]+p[i]+h[i])){if(n=navigator.userAgent.indexOf(\"MSIE\")>=0||navigator.userAgent.indexOf(\"Trident\")>0||navigator.userAgent.indexOf(\"Edge\")>0,this.visuals.fill.doit){if(this.visuals.fill.set_vectorize(t,i),t.beginPath(),n)for(c=[!1,!0],a=0,u=c.length;a<u;a++)o=c[a],t.arc(d[i],f[i],p[i],0,Math.PI,o),t.arc(d[i],f[i],h[i],Math.PI,0,!o);else t.arc(d[i],f[i],p[i],0,2*Math.PI,!0),t.arc(d[i],f[i],h[i],2*Math.PI,0,!1);t.fill()}this.visuals.line.doit?(this.visuals.line.set_vectorize(t,i),t.beginPath(),t.arc(d[i],f[i],p[i],0,2*Math.PI),t.moveTo(d[i]+h[i],f[i]),t.arc(d[i],f[i],h[i],0,2*Math.PI),_.push(t.stroke())):_.push(void 0)}return _},e.prototype._hit_point=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k;for(c=[t.vx,t.vy],m=c[0],y=c[1],g=this.renderer.xscale.invert(m,!0),v=g-this.max_radius,b=g+this.max_radius,w=this.renderer.yscale.invert(y,!0),x=w-this.max_radius,k=w+this.max_radius,o=[],e=s.validate_bbox_coords([v,b],[x,k]),_=this.index.indices(e),a=0,l=_.length;a<l;a++)i=_[a],u=Math.pow(this.souter_radius[i],2),n=Math.pow(this.sinner_radius[i],2),p=this.renderer.xscale.compute(g),h=this.renderer.xscale.compute(this._x[i]),d=this.renderer.yscale.compute(w),f=this.renderer.yscale.compute(this._y[i]),r=Math.pow(p-h,2)+Math.pow(d-f,2),r<=u&&r>=n&&o.push([i,r]);return s.create_1d_hit_test_result(o)},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){var s,a,l,u,c,_,p;return a=[n],_={},_[n]=(e+r)/2,p={},p[n]=(o+i)/2,l=.5*Math.min(Math.abs(r-e),Math.abs(i-o)),u={},u[n]=.4*l,c={},c[n]=.8*l,s={sx:_,sy:p,sinner_radius:u,souter_radius:c},this._render(t,a,s)},e}(n.XYGlyphView),r.Annulus=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.AnnulusView,e.prototype.type=\"Annulus\",e.mixins([\"line\",\"fill\"]),e.define({inner_radius:[a.DistanceSpec],outer_radius:[a.DistanceSpec]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\"}],\"models/glyphs/arc\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/properties\");r.ArcView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._map_data=function(){return\"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(t,e,r){var o,i,n,s,a,l,u,c,_,p;if(_=r.sx,p=r.sy,c=r.sradius,i=r._start_angle,o=r._end_angle,this.visuals.line.doit){for(n=this.model.properties.direction.value(),u=[],a=0,l=e.length;a<l;a++)s=e[a],isNaN(_[s]+p[s]+c[s]+i[s]+o[s])||(t.beginPath(),t.arc(_[s],p[s],c[s],i[s],o[s],n),this.visuals.line.set_vectorize(t,s),u.push(t.stroke()));return u}},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_line_legend(t,e,r,o,i,n)},e}(n.XYGlyphView),r.Arc=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.ArcView,e.prototype.type=\"Arc\",e.mixins([\"line\"]),e.define({direction:[s.Direction,\"anticlock\"],radius:[s.DistanceSpec],start_angle:[s.AngleSpec],end_angle:[s.AngleSpec]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/properties\":\"core/properties\"}],\"models/glyphs/bezier\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"core/util/spatial\"),a=t(\"./glyph\");o=function(t,e,r,o,i,n,s,a){var l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M;for(x=[],_=[[],[]],h=m=0;m<=2;h=++m)if(0===h?(u=6*t-12*r+6*i,l=-3*t+9*r-9*i+3*s,p=3*r-3*t):(u=6*e-12*o+6*n,l=-3*e+9*o-9*n+3*a,p=3*o-3*e),Math.abs(l)<1e-12){if(Math.abs(u)<1e-12)continue;v=-p/u,0<v&&v<1&&x.push(v)}else c=u*u-4*p*l,g=Math.sqrt(c),c<0||(b=(-u+g)/(2*l),0<b&&b<1&&x.push(b),w=(-u-g)/(2*l),0<w&&w<1&&x.push(w));for(d=x.length,f=d;d--;)v=x[d],y=1-v,k=y*y*y*t+3*y*y*v*r+3*y*v*v*i+v*v*v*s,_[0][d]=k,M=y*y*y*e+3*y*y*v*o+3*y*v*v*n+v*v*v*a,_[1][d]=M;return _[0][f]=t,_[1][f]=e,_[0][f+1]=s,_[1][f+1]=a,[Math.min.apply(null,_[0]),Math.max.apply(null,_[1]),Math.max.apply(null,_[0]),Math.min.apply(null,_[1])]},r.BezierView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._index_data=function(){var t,e,r,i,n,a,l,u,c;for(r=[],t=e=0,i=this._x0.length;0<=i?e<i:e>i;t=0<=i?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t]+this._cx0[t]+this._cy0[t]+this._cx1[t]+this._cy1[t])||(n=o(this._x0[t],this._y0[t],this._x1[t],this._y1[t],this._cx0[t],this._cy0[t],this._cx1[t],this._cy1[t]),a=n[0],u=n[1],l=n[2],c=n[3],r.push({minX:a,minY:u,maxX:l,maxY:c,i:t}));return new s.RBush(r)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f;if(p=r.sx0,d=r.sy0,h=r.sx1,f=r.sy1,a=r.scx,l=r.scx0,c=r.scy0,u=r.scx1,_=r.scy1,this.visuals.line.doit){for(s=[],i=0,n=e.length;i<n;i++)o=e[i],isNaN(p[o]+d[o]+h[o]+f[o]+l[o]+c[o]+u[o]+_[o])||(t.beginPath(),t.moveTo(p[o],d[o]),t.bezierCurveTo(l[o],c[o],u[o],_[o],h[o],f[o]),this.visuals.line.set_vectorize(t,o),s.push(t.stroke()));return s}},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_line_legend(t,e,r,o,i,n)},e}(a.GlyphView),r.Bezier=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.BezierView,e.prototype.type=\"Bezier\",e.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"],[\"cx0\",\"cy0\"],[\"cx1\",\"cy1\"]]),e.mixins([\"line\"]),e}(a.Glyph)},{\"./glyph\":\"models/glyphs/glyph\",\"core/util/spatial\":\"core/util/spatial\"}],\"models/glyphs/circle\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/hittest\"),a=t(\"core/properties\");r.CircleView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._map_data=function(){var t,e;return null!=this._radius?\"data\"===this.model.properties.radius.spec.units?(t=this.model.properties.radius_dimension.spec.value,this.sradius=this.sdist(this.renderer[t+\"scale\"],this[\"_\"+t],this._radius)):(this.sradius=this._radius,this.max_size=2*this.max_radius):this.sradius=function(){var t,r,o,i;for(o=this._size,i=[],t=0,r=o.length;t<r;t++)e=o[t],i.push(e/2);return i}.call(this)},e.prototype._mask_data=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d,f,m;return r=this.renderer.plot_view.frame.h_range,p=this.renderer.plot_view.frame.v_range,null!=this._radius&&\"data\"===this.model.properties.radius.units?(l=r.start,u=r.end,o=this.renderer.xscale.v_invert([l,u],!0),h=o[0],d=o[1],h-=this.max_radius,d+=this.max_radius,c=p.start,_=p.end,i=this.renderer.yscale.v_invert([c,_],!0),f=i[0],m=i[1],f-=this.max_radius,m+=this.max_radius):(l=r.start-this.max_size,u=r.end+this.max_size,n=this.renderer.xscale.v_invert([l,u],!0),h=n[0],d=n[1],c=p.start-this.max_size,_=p.end+this.max_size,a=this.renderer.yscale.v_invert([c,_],!0),f=a[0],m=a[1]),e=s.validate_bbox_coords([h,d],[f,m]),this.index.indices(e)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u;for(l=r.sx,u=r.sy,a=r.sradius,s=[],i=0,n=e.length;i<n;i++)o=e[i],isNaN(l[o]+u[o]+a[o])||(t.beginPath(),t.arc(l[o],u[o],a[o],0,2*Math.PI,!1),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,o),t.fill()),this.visuals.line.doit?(this.visuals.line.set_vectorize(t,o),s.push(t.stroke())):s.push(void 0));return s},e.prototype._hit_point=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C,N;if(p=[t.vx,t.vy],k=p[0],T=p[1],P=this.renderer.xscale.invert(k,!0),z=this.renderer.yscale.invert(T,!0),null!=this._radius&&\"data\"===this.model.properties.radius.units?(A=P-this.max_radius,E=P+this.max_radius,C=z-this.max_radius,N=z+this.max_radius):(M=k-this.max_size,j=k+this.max_size,h=this.renderer.xscale.v_invert([M,j],!0),A=h[0],E=h[1],d=[Math.min(A,E),Math.max(A,E)],A=d[0],E=d[1],S=T-this.max_size,O=T+this.max_size,f=this.renderer.yscale.v_invert([S,O],!0),C=f[0],N=f[1],m=[Math.min(C,N),Math.max(C,N)],C=m[0],N=m[1]),e=s.validate_bbox_coords([A,E],[C,N]),r=this.index.indices(e),i=[],null!=this._radius&&\"data\"===this.model.properties.radius.units)for(a=0,u=r.length;a<u;a++)n=r[a],_=Math.pow(this.sradius[n],2),g=this.renderer.xscale.compute(P,!0),v=this.renderer.xscale.compute(this._x[n],!0),w=this.renderer.yscale.compute(z,!0),x=this.renderer.yscale.compute(this._y[n],!0),o=Math.pow(g-v,2)+Math.pow(w-x,2),o<=_&&i.push([n,o]);else for(y=this.renderer.plot_view.canvas.vx_to_sx(k),b=this.renderer.plot_view.canvas.vy_to_sy(T),l=0,c=r.length;l<c;l++)n=r[l],_=Math.pow(this.sradius[n],2),o=Math.pow(this.sx[n]-y,2)+Math.pow(this.sy[n]-b,2),o<=_&&i.push([n,o]);return s.create_1d_hit_test_result(i)},e.prototype._hit_span=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j;return u=[t.vx,t.vy],m=u[0],v=u[1],c=this.bounds(),n=c.minX,a=c.minY,o=c.maxX,i=c.maxY,f=s.create_hit_test_result(),\"h\"===t.direction?(M=a,j=i,null!=this._radius&&\"data\"===this.model.properties.radius.units?(y=m-this.max_radius,g=m+this.max_radius,_=this.renderer.xscale.v_invert([y,g]),x=_[0],k=_[1]):(l=this.max_size/2,y=m-l,g=m+l,p=this.renderer.xscale.v_invert([y,g],!0),x=p[0],k=p[1])):(x=n,k=o,null!=this._radius&&\"data\"===this.model.properties.radius.units?(b=v-this.max_radius,w=v+this.max_radius,h=this.renderer.yscale.v_invert([b,w]),M=h[0],j=h[1]):(l=this.max_size/2,b=v-l,w=v+l,d=this.renderer.yscale.v_invert([b,w],!0),M=d[0],j=d[1])),e=s.validate_bbox_coords([x,k],[M,j]),r=this.index.indices(e),f[\"1d\"].indices=r,f},e.prototype._hit_rect=function(t){var e,r,o,i,n,a,l,u;return r=this.renderer.xscale.v_invert([t.vx0,t.vx1],!0),n=r[0],a=r[1],o=this.renderer.yscale.v_invert([t.vy0,t.vy1],!0),l=o[0],u=o[1],e=s.validate_bbox_coords([n,a],[l,u]),i=s.create_hit_test_result(),i[\"1d\"].indices=this.index.indices(e),i},e.prototype._hit_poly=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d;for(a=[t.vx,t.vy],h=a[0],d=a[1],_=this.renderer.plot_view.canvas.v_vx_to_sx(h),p=this.renderer.plot_view.canvas.v_vy_to_sy(d),e=function(){c=[];for(var t=0,e=this.sx.length;0<=e?t<e:t>e;0<=e?t++:t--)c.push(t);return c}.apply(this),r=[],o=n=0,l=e.length;0<=l?n<l:n>l;o=0<=l?++n:--n)i=e[o],s.point_in_poly(this.sx[o],this.sy[o],_,p)&&r.push(i);return u=s.create_hit_test_result(),u[\"1d\"].indices=r,u},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){var s,a,l,u,c;return a=[n],u={},u[n]=(e+r)/2,c={},c[n]=(o+i)/2,l={},l[n]=.2*Math.min(Math.abs(r-e),Math.abs(i-o)),s={sx:u,sy:c,sradius:l},this._render(t,a,s)},e}(n.XYGlyphView),r.Circle=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.CircleView,e.prototype.type=\"Circle\",e.mixins([\"line\",\"fill\"]),e.define({angle:[a.AngleSpec,0],size:[a.DistanceSpec,{units:\"screen\",value:4}],radius:[a.DistanceSpec,null],radius_dimension:[a.String,\"x\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.properties.radius.optional=!0},e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\"}],\"models/glyphs/ellipse\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/properties\");r.EllipseView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._set_data=function(){if(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)return this.max_h2=this.max_height/2},e.prototype._map_data=function(){return\"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},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;for(u=r.sx,c=r.sy,l=r.sw,a=r.sh,s=[],i=0,n=e.length;i<n;i++)o=e[i],isNaN(u[o]+c[o]+l[o]+a[o]+this._angle[o])||(t.beginPath(),t.ellipse(u[o],c[o],l[o]/2,a[o]/2,this._angle[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),s.push(t.stroke())):s.push(void 0));return s},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){var s,a,l,u,c,_,p,h;return l=[n],p={},p[n]=(e+r)/2,h={},h[n]=(o+i)/2,u=this.sw[n]/this.sh[n],s=.8*Math.min(Math.abs(r-e),Math.abs(i-o)),_={},c={},u>1?(_[n]=s,c[n]=s/u):(_[n]=s*u,c[n]=s),a={sx:p,sy:h,sw:_,sh:c},this._render(t,l,a)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(n.XYGlyphView),r.Ellipse=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.EllipseView,e.prototype.type=\"Ellipse\",e.mixins([\"line\",\"fill\"]),e.define({angle:[s.AngleSpec,0],width:[s.DistanceSpec],height:[s.DistanceSpec]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/properties\":\"core/properties\"}],\"models/glyphs/glyph\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"core/util/bbox\"),a=t(\"core/util/projections\"),l=t(\"core/view\"),u=t(\"../../model\"),c=t(\"core/visuals\"),_=t(\"core/logging\"),p=t(\"core/util/object\"),h=t(\"core/util/types\");r.GlyphView=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return o(r,e),r.prototype.initialize=function(e){var o,i,n,s;if(r.__super__.initialize.call(this,e),this._nohit_warned={},this.renderer=e.renderer,this.visuals=new c.Visuals(this.model),i=this.renderer.plot_view.canvas_view.ctx,null!=i.glcanvas){try{s=t(\"models/glyphs/webgl/index\")}catch(a){if(n=a,\"MODULE_NOT_FOUND\"!==n.code)throw n;_.logger.warn(\"WebGL was requested and is supported, but bokeh-gl(.min).js is not available, falling back to 2D rendering.\"),s=null}if(null!=s&&(o=s[this.model.type+\"GLGlyph\"],null!=o))return this.glglyph=new o(i.glcanvas.gl,this)}},r.prototype.set_visuals=function(t){if(this.visuals.warm_cache(t),null!=this.glglyph)return this.glglyph.set_visuals_changed()},r.prototype.render=function(t,e,r){if(t.beginPath(),null==this.glglyph||!this.glglyph.render(t,e,r))return this._render(t,e,r)},r.prototype.has_finished=function(){return!0},r.prototype.notify_finished=function(){return this.renderer.notify_finished()},r.prototype.bounds=function(){return null==this.index?s.empty():this._bounds(this.index.bbox)},r.prototype.log_bounds=function(){var t,e,r,o,i,n,a,l,u;if(null==this.index)return s.empty();for(t=s.empty(),n=this.index.search(s.positive_x()),a=this.index.search(s.positive_y()),e=0,o=n.length;e<o;e++)l=n[e],l.minX<t.minX&&(t.minX=l.minX),l.maxX>t.maxX&&(t.maxX=l.maxX);for(r=0,i=a.length;r<i;r++)u=a[r],\n",
" u.minY<t.minY&&(t.minY=u.minY),u.maxY>t.maxY&&(t.maxY=u.maxY);return this._bounds(t)},r.prototype.max_wh2_bounds=function(t){return{minX:t.minX-this.max_w2,maxX:t.maxX+this.max_w2,minY:t.minY-this.max_h2,maxY:t.maxY+this.max_h2}},r.prototype.get_anchor_point=function(t,e,r){var o,i;switch(o=r[0],i=r[1],t){case\"center\":return{x:this.scx(e,o,i),y:this.scy(e,o,i)};default:return null}},r.prototype.scx=function(t){return this.sx[t]},r.prototype.scy=function(t){return this.sy[t]},r.prototype.sdist=function(t,e,r,o,i){var n,s,a,l,u,c,_;return null==o&&(o=\"edge\"),null==i&&(i=!1),h.isString(e[0])&&(e=t.v_compute(e)),\"center\"===o?(s=function(){var t,e,o;for(o=[],t=0,e=r.length;t<e;t++)n=r[t],o.push(n/2);return o}(),l=function(){var t,r,o;for(o=[],a=t=0,r=e.length;0<=r?t<r:t>r;a=0<=r?++t:--t)o.push(e[a]-s[a]);return o}(),u=function(){var t,r,o;for(o=[],a=t=0,r=e.length;0<=r?t<r:t>r;a=0<=r?++t:--t)o.push(e[a]+s[a]);return o}()):(l=e,u=function(){var t,e,o;for(o=[],a=t=0,e=l.length;0<=e?t<e:t>e;a=0<=e?++t:--t)o.push(l[a]+r[a]);return o}()),c=t.v_compute(l),_=t.v_compute(u),i?function(){var t,e,r;for(r=[],a=t=0,e=c.length;0<=e?t<e:t>e;a=0<=e?++t:--t)r.push(Math.ceil(Math.abs(_[a]-c[a])));return r}():function(){var t,e,r;for(r=[],a=t=0,e=c.length;0<=e?t<e:t>e;a=0<=e?++t:--t)r.push(Math.abs(_[a]-c[a]));return r}()},r.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return null},r.prototype._generic_line_legend=function(t,e,r,o,i,n){return t.save(),t.beginPath(),t.moveTo(e,(o+i)/2),t.lineTo(r,(o+i)/2),this.visuals.line.doit&&(this.visuals.line.set_vectorize(t,n),t.stroke()),t.restore()},r.prototype._generic_area_legend=function(t,e,r,o,i,n){var s,a,l,u,c,_,p,h,d;if(u=[n],d=Math.abs(r-e),a=.1*d,l=Math.abs(i-o),s=.1*l,c=e+a,_=r-a,p=o+s,h=i-s,this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,n),t.fillRect(c,p,_-c,h-p)),this.visuals.line.doit)return t.beginPath(),t.rect(c,p,_-c,h-p),this.visuals.line.set_vectorize(t,n),t.stroke()},r.prototype.hit_test=function(t){var e,r;return r=null,e=\"_hit_\"+t.type,null!=this[e]?r=this[e](t):null==this._nohit_warned[t.type]&&(_.logger.debug(\"'\"+t.type+\"' selection not available for \"+this.model.type),this._nohit_warned[t.type]=!0),r},r.prototype.set_data=function(t,e){var r,o,i;return r=this.model.materialize_dataspecs(t),p.extend(this,r),this.renderer.plot_view.model.use_map&&(null!=this._x&&(o=a.project_xy(this._x,this._y),this._x=o[0],this._y=o[1]),null!=this._xs&&(i=a.project_xsys(this._xs,this._ys),this._xs=i[0],this._ys=i[1])),null!=this.glglyph&&this.glglyph.set_data_changed(this._x.length),this._set_data(t,e),this.index=this._index_data()},r.prototype._set_data=function(){},r.prototype._index_data=function(){},r.prototype.mask_data=function(t){return null!=this.glglyph?t:this._mask_data(t)},r.prototype._mask_data=function(t){return t},r.prototype._bounds=function(t){return t},r.prototype.map_data=function(){var t,e,r,o,i,n,s,a,l,u,c,_,p,d,f,m,y,g,v;for(i=this.model._coords,e=0,o=i.length;e<o;e++)if(n=i[e],g=n[0],v=n[1],f=\"s\"+g,y=\"s\"+v,g=\"_\"+g,v=\"_\"+v,h.isArray(null!=(s=this[g])?s[0]:void 0)||(null!=(a=this[g])&&null!=(l=a[0])?l.buffer:void 0)instanceof ArrayBuffer)for(u=[[],[]],this[f]=u[0],this[y]=u[1],t=r=0,c=this[g].length;0<=c?r<c:r>c;t=0<=c?++r:--r)_=this.map_to_screen(this[g][t],this[v][t]),d=_[0],m=_[1],this[f].push(d),this[y].push(m);else p=this.map_to_screen(this[g],this[v]),this[f]=p[0],this[y]=p[1];return this._map_data()},r.prototype._map_data=function(){},r.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)},r}(l.View),r.Glyph=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._coords=[],e.coords=function(t){var e,r,o,i,s,a,l;for(e=this.prototype._coords.concat(t),this.prototype._coords=e,s={},r=0,o=t.length;r<o;r++)i=t[r],a=i[0],l=i[1],s[a]=[n.NumberSpec],s[l]=[n.NumberSpec];return this.define(s)},e.internal({x_range_name:[n.String,\"default\"],y_range_name:[n.String,\"default\"]}),e}(u.Model)},{\"../../model\":\"model\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/bbox\":\"core/util/bbox\",\"core/util/object\":\"core/util/object\",\"core/util/projections\":\"core/util/projections\",\"core/util/types\":\"core/util/types\",\"core/view\":\"core/view\",\"core/visuals\":\"core/visuals\",\"models/glyphs/webgl/index\":void 0}],\"models/glyphs/hbar\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/util/spatial\"),s=t(\"./glyph\"),a=t(\"../scales/categorical_scale\"),l=t(\"core/hittest\"),u=t(\"core/properties\");r.HBarView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._map_data=function(){var t,e,r,o,i,n;for(n=this.renderer.yscale.v_compute(this._y),this.sy=this.renderer.plot_view.canvas.v_vy_to_sy(n),i=this.renderer.xscale.v_compute(this._right),o=this.renderer.xscale.v_compute(this._left),this.sright=this.renderer.plot_view.canvas.v_vx_to_sx(i),this.sleft=this.renderer.plot_view.canvas.v_vx_to_sx(o),this.stop=[],this.sbottom=[],this.sh=this.sdist(this.renderer.yscale,this._y,this._height,\"center\"),t=e=0,r=this.sy.length;0<=r?e<r:e>r;t=0<=r?++e:--e)this.stop.push(this.sy[t]-this.sh[t]/2),this.sbottom.push(this.sy[t]+this.sh[t]/2);return null},e.prototype._index_data=function(){var t,e,r,o,i,s,l,u,c,_,p,h,d;for(l=function(t,e){return t instanceof a.CategoricalScale?t.v_compute(e,!0):e},s=l(this.renderer.xscale,this._left),p=l(this.renderer.xscale,this._right),d=l(this.renderer.yscale,this._y),e=l(this.renderer.yscale,this._height),u=[],r=o=0,_=d.length;0<=_?o<_:o>_;r=0<=_?++o:--o)i=s[r],c=p[r],h=d[r]+.5*e[r],t=d[r]-.5*e[r],!isNaN(i+c+h+t)&&isFinite(i+c+h+t)&&u.push({minX:i,minY:t,maxX:c,maxY:h,i:r});return new n.RBush(u)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;for(l=r.sleft,u=r.sright,c=r.stop,a=r.sbottom,s=[],i=0,n=e.length;i<n;i++)o=e[i],isNaN(l[o]+c[o]+u[o]+a[o])||(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,o),t.fillRect(l[o],c[o],u[o]-l[o],a[o]-c[o])),this.visuals.line.doit?(t.beginPath(),t.rect(l[o],c[o],u[o]-l[o],a[o]-c[o]),this.visuals.line.set_vectorize(t,o),s.push(t.stroke())):s.push(void 0));return s},e.prototype._hit_point=function(t){var e,r,o,i,n,s,a;return r=[t.vx,t.vy],i=r[0],n=r[1],s=this.renderer.xscale.invert(i,!0),a=this.renderer.yscale.invert(n,!0),e=this.index.indices({minX:s,minY:a,maxX:s,maxY:a}),o=l.create_hit_test_result(),o[\"1d\"].indices=e,o},e.prototype.scx=function(t){return(this.sleft[t]+this.sright[t])/2},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_area_legend(t,e,r,o,i,n)},e}(s.GlyphView),r.HBar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.HBarView,e.prototype.type=\"HBar\",e.mixins([\"line\",\"fill\"]),e.define({y:[u.NumberSpec],height:[u.DistanceSpec],left:[u.NumberSpec,0],right:[u.NumberSpec]}),e}(s.Glyph)},{\"../scales/categorical_scale\":\"models/scales/categorical_scale\",\"./glyph\":\"models/glyphs/glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\",\"core/util/spatial\":\"core/util/spatial\"}],\"models/glyphs/image\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./xy_glyph\"),a=t(\"../mappers/linear_color_mapper\"),l=t(\"core/properties\"),u=t(\"core/util/array\");r.ImageView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.color_mapper.change,function(){return this._update_image()})},e.prototype._update_image=function(){if(null!=this.image_data)return this._set_data(),this.renderer.plot_view.request_render()},e.prototype._set_data=function(){var t,e,r,o,i,n,s,a,l,c,_,p;for(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)),_=[],n=l=0,c=this._image.length;0<=c?l<c:l>c;n=0<=c?++l:--l)p=[],null!=this._image_shape&&(p=this._image_shape[n]),p.length>0?(a=this._image[n],this._height[n]=p[0],this._width[n]=p[1]):(a=u.concat(this._image[n]),this._height[n]=this._image[n].length,this._width[n]=this._image[n][0].length),null!=this.image_data[n]&&this.image_data[n].width===this._width[n]&&this.image_data[n].height===this._height[n]?r=this.image_data[n]:(r=document.createElement(\"canvas\"),r.width=this._width[n],r.height=this._height[n]),i=r.getContext(\"2d\"),s=i.getImageData(0,0,this._width[n],this._height[n]),o=this.model.color_mapper,t=o.v_map_screen(a,!0),e=new Uint8Array(t),s.data.set(e),i.putImageData(s,0,0),this.image_data[n]=r,this.max_dw=0,\"data\"===this._dw.units&&(this.max_dw=u.max(this._dw)),this.max_dh=0,\"data\"===this._dh.units?_.push(this.max_dh=u.max(this._dh)):_.push(void 0);return _},e.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\":return this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);case\"screen\":return this.sh=this._dh}},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p;for(i=r.image_data,c=r.sx,_=r.sy,u=r.sw,l=r.sh,a=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),n=0,s=e.length;n<s;n++)o=e[n],null!=i[o]&&(isNaN(c[o]+_[o]+u[o]+l[o])||(p=_[o],t.translate(0,p),t.scale(1,-1),t.translate(0,-p),t.drawImage(i[o],0|c[o],0|_[o],u[o],l[o]),t.translate(0,p),t.scale(1,-1),t.translate(0,-p)));return t.setImageSmoothingEnabled(a)},e.prototype.bounds=function(){var t;return t=this.index.bbox,t.maxX+=this.max_dw,t.maxY+=this.max_dh,t},e}(s.XYGlyphView),o=function(){return[0,2434341,5395026,7566195,9868950,12434877,14277081,15790320,16777215]},r.Image=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.ImageView,e.prototype.type=\"Image\",e.define({image:[l.NumberSpec],dw:[l.DistanceSpec],dh:[l.DistanceSpec],dilate:[l.Bool,!1],color_mapper:[l.Instance,function(){return new a.LinearColorMapper({palette:o()})}]}),e}(s.XYGlyph)},{\"../mappers/linear_color_mapper\":\"models/mappers/linear_color_mapper\",\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/glyphs/image_rgba\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/properties\"),a=t(\"core/util/array\");r.ImageRGBAView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._set_data=function(t,e){var r,o,i,n,s,l,u,c,_,p,h,d,f,m,y,g,v;for(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)),g=[],u=p=0,f=this._image.length;0<=f?p<f:p>f;u=0<=f?++p:--p)if(!(null!=e&&e.indexOf(u)<0)){if(v=[],null!=this._image_shape&&(v=this._image_shape[u]),null!=this._rows)if(this._height[u]=this._rows[u],this._width[u]=this._cols[u],v.length>0)r=this._image[u].buffer;else for(l=this._image[u],r=new ArrayBuffer(4*l.length),n=new Uint32Array(r),_=h=0,m=l.length;0<=m?h<m:h>m;_=0<=m?++h:--h)n[_]=l[_];else if(v.length>0)r=this._image[u].buffer,this._height[u]=v[0],this._width[u]=v[1];else{for(l=a.concat(this._image[u]),r=new ArrayBuffer(4*l.length),n=new Uint32Array(r),_=d=0,y=l.length;0<=y?d<y:d>y;_=0<=y?++d:--d)n[_]=l[_];this._height[u]=this._image[u].length,this._width[u]=this._image[u][0].length}null!=this.image_data[u]&&this.image_data[u].width===this._width[u]&&this.image_data[u].height===this._height[u]?i=this.image_data[u]:(i=document.createElement(\"canvas\"),i.width=this._width[u],i.height=this._height[u]),s=i.getContext(\"2d\"),c=s.getImageData(0,0,this._width[u],this._height[u]),o=new Uint8Array(r),c.data.set(o),s.putImageData(c,0,0),this.image_data[u]=i,this.max_dw=0,\"data\"===this._dw.units&&(this.max_dw=a.max(this._dw)),this.max_dh=0,\"data\"===this._dh.units?g.push(this.max_dh=a.max(this._dh)):g.push(void 0)}return g},e.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\":return this.sh=this.sdist(this.renderer.yscale,this._y,this._dh,\"edge\",this.model.dilate);case\"screen\":return this.sh=this._dh}},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p;for(i=r.image_data,c=r.sx,_=r.sy,u=r.sw,l=r.sh,a=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),n=0,s=e.length;n<s;n++)o=e[n],isNaN(c[o]+_[o]+u[o]+l[o])||(p=_[o],t.translate(0,p),t.scale(1,-1),t.translate(0,-p),t.drawImage(i[o],0|c[o],0|_[o],u[o],l[o]),t.translate(0,p),t.scale(1,-1),t.translate(0,-p));return t.setImageSmoothingEnabled(a)},e.prototype.bounds=function(){var t;return t=this.index.bbox,t.maxX+=this.max_dw,t.maxY+=this.max_dh,t},e}(n.XYGlyphView),r.ImageRGBA=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.ImageRGBAView,e.prototype.type=\"ImageRGBA\",e.define({image:[s.NumberSpec],rows:[s.NumberSpec],cols:[s.NumberSpec],dw:[s.DistanceSpec],dh:[s.DistanceSpec],dilate:[s.Bool,!1]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.properties.rows.optional=!0,this.properties.cols.optional=!0},e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/glyphs/image_url\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./glyph\"),s=t(\"core/logging\"),a=t(\"core/properties\");r.ImageURLView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.properties.global_alpha.change,function(t){return function(){return t.renderer.request_render()}}(this))},e.prototype._index_data=function(){},e.prototype._set_data=function(){var t,e,r,o,i,n,a;for(null!=this.image&&this.image.length===this._url.length||(this.image=function(){var t,r,o,i;for(o=this._url,i=[],t=0,r=o.length;t<r;t++)e=o[t],i.push(null);return i}.call(this)),n=this.model.retry_attempts,a=this.model.retry_timeout,this.retries=function(){var t,r,o,i;for(o=this._url,i=[],t=0,r=o.length;t<r;t++)e=o[t],i.push(n);return i}.call(this),i=[],t=r=0,o=this._url.length;0<=o?r<o:r>o;t=0<=o?++r:--r)null!=this._url[t]&&(e=new Image,e.onerror=function(t){return function(e,r){return function(){return t.retries[e]>0?(s.logger.trace(\"ImageURL failed to load \"+t._url[e]+\" image, retrying in \"+a+\" ms\"),setTimeout(function(){return r.src=t._url[e]},a)):s.logger.warn(\"ImageURL unable to load \"+t._url[e]+\" image after \"+n+\" retries\"),t.retries[e]-=1}}}(this)(t,e),e.onload=function(t){return function(e,r){return function(){return t.image[r]=e,t.renderer.request_render()}}}(this)(e,t),i.push(e.src=this._url[t]));return i},e.prototype.has_finished=function(){return e.__super__.has_finished.call(this)&&this._images_rendered===!0},e.prototype._map_data=function(){var t,e,r;switch(e=function(){var t,e,o,i;if(null!=this.model.w)return this._w;for(o=this._x,i=[],t=0,e=o.length;t<e;t++)r=o[t],i.push(NaN);return i}.call(this),t=function(){var t,e,o,i;if(null!=this.model.h)return this._h;for(o=this._x,i=[],t=0,e=o.length;t<e;t++)r=o[t],i.push(NaN);return i}.call(this),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\":return this.sh=this.sdist(this.renderer.yscale,this._y,t,\"edge\",this.model.dilate);case\"screen\":return this.sh=t}},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d;for(i=r._url,l=r.image,h=r.sx,d=r.sy,p=r.sw,_=r.sh,o=r._angle,s=this.renderer.plot_view.frame,t.rect(s._left.value+1,s._bottom.value+1,s._width.value-2,s._height.value-2),t.clip(),n=!0,u=0,c=e.length;u<c;u++)a=e[u],isNaN(h[a]+d[a]+o[a])||this.retries[a]!==-1&&(null!=l[a]?this._render_image(t,a,l[a],h,d,p,_,o):n=!1);if(n&&!this._images_rendered)return this._images_rendered=!0,this.notify_finished()},e.prototype._final_sx_sy=function(t,e,r,o,i){switch(t){case\"top_left\":return[e,r];case\"top_center\":return[e-o/2,r];case\"top_right\":return[e-o,r];case\"center_right\":return[e-o,r-i/2];case\"bottom_right\":return[e-o,r-i];case\"bottom_center\":return[e-o/2,r-i];case\"bottom_left\":return[e,r-i];case\"center_left\":return[e,r-i/2];case\"center\":return[e-o/2,r-i/2]}},e.prototype._render_image=function(t,e,r,o,i,n,s,a){var l,u;return isNaN(n[e])&&(n[e]=r.width),isNaN(s[e])&&(s[e]=r.height),l=this.model.anchor,u=this._final_sx_sy(l,o[e],i[e],n[e],s[e]),o=u[0],i=u[1],t.save(),t.globalAlpha=this.model.global_alpha,a[e]?(t.translate(o,i),t.rotate(a[e]),t.drawImage(r,0,0,n[e],s[e]),t.rotate(-a[e]),t.translate(-o,-i)):t.drawImage(r,o,i,n[e],s[e]),t.restore()},e}(n.GlyphView),r.ImageURL=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.ImageURLView,e.prototype.type=\"ImageURL\",e.coords([[\"x\",\"y\"]]),e.mixins([]),e.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.Bool,!1],retry_attempts:[a.Number,0],retry_timeout:[a.Number,0]}),e}(n.Glyph)},{\"./glyph\":\"models/glyphs/glyph\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/glyphs/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./annular_wedge\");r.AnnularWedge=o.AnnularWedge;var i=t(\"./annulus\");r.Annulus=i.Annulus;var n=t(\"./arc\");r.Arc=n.Arc;var s=t(\"./bezier\");r.Bezier=s.Bezier;var a=t(\"./circle\");r.Circle=a.Circle;var l=t(\"./ellipse\");r.Ellipse=l.Ellipse;var u=t(\"./glyph\");r.Glyph=u.Glyph;var c=t(\"./hbar\");r.HBar=c.HBar;var _=t(\"./image\");r.Image=_.Image;var p=t(\"./image_rgba\");r.ImageRGBA=p.ImageRGBA;var h=t(\"./image_url\");r.ImageURL=h.ImageURL;var d=t(\"./line\");r.Line=d.Line;var f=t(\"./multi_line\");r.MultiLine=f.MultiLine;var m=t(\"./oval\");r.Oval=m.Oval;var y=t(\"./patch\");r.Patch=y.Patch;var g=t(\"./patches\");r.Patches=g.Patches;var v=t(\"./quad\");r.Quad=v.Quad;var b=t(\"./quadratic\");r.Quadratic=b.Quadratic;var w=t(\"./ray\");r.Ray=w.Ray;var x=t(\"./rect\");r.Rect=x.Rect;var k=t(\"./segment\");r.Segment=k.Segment;var M=t(\"./text\");r.Text=M.Text;var j=t(\"./vbar\");r.VBar=j.VBar;var T=t(\"./wedge\");r.Wedge=T.Wedge;var S=t(\"./xy_glyph\");r.XYGlyph=S.XYGlyph},{\"./annular_wedge\":\"models/glyphs/annular_wedge\",\"./annulus\":\"models/glyphs/annulus\",\"./arc\":\"models/glyphs/arc\",\"./bezier\":\"models/glyphs/bezier\",\"./circle\":\"models/glyphs/circle\",\"./ellipse\":\"models/glyphs/ellipse\",\"./glyph\":\"models/glyphs/glyph\",\"./hbar\":\"models/glyphs/hbar\",\"./image\":\"models/glyphs/image\",\"./image_rgba\":\"models/glyphs/image_rgba\",\"./image_url\":\"models/glyphs/image_url\",\"./line\":\"models/glyphs/line\",\"./multi_line\":\"models/glyphs/multi_line\",\"./oval\":\"models/glyphs/oval\",\"./patch\":\"models/glyphs/patch\",\"./patches\":\"models/glyphs/patches\",\"./quad\":\"models/glyphs/quad\",\"./quadratic\":\"models/glyphs/quadratic\",\"./ray\":\"models/glyphs/ray\",\"./rect\":\"models/glyphs/rect\",\"./segment\":\"models/glyphs/segment\",\"./text\":\"models/glyphs/text\",\"./vbar\":\"models/glyphs/vbar\",\"./wedge\":\"models/glyphs/wedge\",\"./xy_glyph\":\"models/glyphs/xy_glyph\"}],\"models/glyphs/line\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/hittest\");r.LineView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._render=function(t,e,r){var o,i,n,s,a,l;for(a=r.sx,l=r.sy,o=!1,this.visuals.line.set_value(t),n=0,s=e.length;n<s;n++)i=e[n],isFinite(a[i]+l[i])||!o?o?t.lineTo(a[i],l[i]):(t.beginPath(),t.moveTo(a[i],l[i]),o=!0):(t.stroke(),t.beginPath(),o=!1);if(o)return t.stroke()},e.prototype._hit_point=function(t){var e,r,o,i,n,a,l,u,c,_,p;for(c=s.create_hit_test_result(),a={x:this.renderer.plot_view.canvas.vx_to_sx(t.vx),y:this.renderer.plot_view.canvas.vy_to_sy(t.vy)},_=9999,p=Math.max(2,this.visuals.line.line_width.value()/2),r=o=0,l=this.sx.length-1;0<=l?o<l:o>l;r=0<=l?++o:--o)u=[{x:this.sx[r],y:this.sy[r]},{x:this.sx[r+1],y:this.sy[r+1]}],i=u[0],n=u[1],e=s.dist_to_segment(a,i,n),e<p&&e<_&&(_=e,c[\"0d\"].glyph=this.model,c[\"0d\"].get_view=function(){return this}.bind(this),c[\"0d\"].flag=!0,c[\"0d\"].indices=[r]);return c},e.prototype._hit_span=function(t){var e,r,o,i,n,a,l,u,c;for(o=[t.vx,t.vy],u=o[0],c=o[1],n=s.create_hit_test_result(),\"v\"===t.direction?(a=this.renderer.yscale.invert(c),l=this._y):(a=this.renderer.xscale.invert(u),l=this._x),e=r=0,i=l.length-1;0<=i?r<i:r>i;e=0<=i?++r:--r)(l[e]<=a&&a<=l[e+1]||l[e+1]<=a&&a<=l[e])&&(n[\"0d\"].glyph=this.model,n[\"0d\"].get_view=function(){return this}.bind(this),n[\"0d\"].flag=!0,n[\"0d\"].indices.push(e));return n},e.prototype.get_interpolation_hit=function(t,e){var r,o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w;return r=[e.vx,e.vy],p=r[0],h=r[1],o=[this._x[t],this._y[t],this._x[t+1],this._y[t+1]],m=o[0],b=o[1],y=o[2],w=o[3],\"point\"===e.type?(i=this.renderer.yscale.v_invert([h-1,h+1]),g=i[0],v=i[1],n=this.renderer.xscale.v_invert([p-1,p+1]),d=n[0],f=n[1]):\"v\"===e.direction?(a=this.renderer.yscale.v_invert([h,h]),g=a[0],v=a[1],l=[m,y],d=l[0],f=l[1]):(u=this.renderer.xscale.v_invert([p,p]),d=u[0],f=u[1],c=[b,w],g=c[0],v=c[1]),_=s.check_2_segments_intersect(d,g,f,v,m,b,y,w),[_.x,_.y]},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_line_legend(t,e,r,o,i,n)},e}(n.XYGlyphView),r.Line=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.LineView,e.prototype.type=\"Line\",e.mixins([\"line\"]),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\"}],\"models/glyphs/multi_line\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/util/spatial\"),s=t(\"core/hittest\"),a=t(\"core/util/array\"),l=t(\"core/util/types\"),u=t(\"./glyph\");r.MultiLineView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._index_data=function(){var t,e,r,o,i,s,u,c;for(r=[],t=e=0,o=this._xs.length;0<=o?e<o:e>o;t=0<=o?++e:--e)s=function(){var e,r,o,n;for(o=this._xs[t],n=[],e=0,r=o.length;e<r;e++)i=o[e],l.isStrictNaN(i)||n.push(i);return n}.call(this),c=function(){var e,r,o,i;for(o=this._ys[t],i=[],e=0,r=o.length;e<r;e++)u=o[e],l.isStrictNaN(u)||i.push(u);return i}.call(this),0!==s.length&&r.push({minX:a.min(s),minY:a.min(c),maxX:a.max(s),maxY:a.max(c),i:t});return new n.RBush(r)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d;for(p=r.sxs,d=r.sys,c=[],n=0,a=e.length;n<a;n++){for(o=e[n],l=[p[o],d[o]],_=l[0],h=l[1],this.visuals.line.set_vectorize(t,o),i=s=0,u=_.length;0<=u?s<u:s>u;i=0<=u?++s:--s)0!==i?isNaN(_[i])||isNaN(h[i])?(t.stroke(),t.beginPath()):t.lineTo(_[i],h[i]):(t.beginPath(),t.moveTo(_[i],h[i]));c.push(t.stroke())}return c},e.prototype._hit_point=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d,f,m,y;for(f=s.create_hit_test_result(),c={x:this.renderer.plot_view.canvas.vx_to_sx(t.vx),y:this.renderer.plot_view.canvas.vy_to_sy(t.vy)},m=9999,r={},o=n=0,p=this.sxs.length;0<=p?n<p:n>p;o=0<=p?++n:--n){for(y=Math.max(2,this.visuals.line.cache_select(\"line_width\",o)/2),_=null,i=a=0,h=this.sxs[o].length-1;0<=h?a<h:a>h;i=0<=h?++a:--a)d=[{x:this.sxs[o][i],y:this.sys[o][i]},{x:this.sxs[o][i+1],y:this.sys[o][i+1]}],l=d[0],u=d[1],e=s.dist_to_segment(c,l,u),e<y&&e<m&&(m=e,_=[i]);_&&(r[o]=_)}return f[\"1d\"].indices=Object.keys(r),f[\"2d\"].indices=r,f},e.prototype._hit_span=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d,f;for(l=[t.vx,t.vy],d=l[0],f=l[1],_=s.create_hit_test_result(),\"v\"===t.direction?(p=this.renderer.yscale.invert(f),h=this._ys):(p=this.renderer.xscale.invert(d),h=this._xs),e={},r=i=0,u=h.length;0<=u?i<u:i>u;r=0<=u?++i:--i){for(a=[],o=n=0,c=h[r].length-1;0<=c?n<c:n>c;o=0<=c?++n:--n)h[r][o]<=p&&p<=h[r][o+1]&&a.push(o);a.length>0&&(e[r]=a)}return _[\"1d\"].indices=Object.keys(e),_[\"2d\"].indices=e,_},e.prototype.get_interpolation_hit=function(t,e,r){var o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x;return o=[r.vx,r.vy],h=o[0],d=o[1],i=[this._xs[t][e],this._ys[t][e],this._xs[t][e+1],this._ys[t][e+1]],y=i[0],w=i[1],g=i[2],x=i[3],\"point\"===r.type?(n=this.renderer.yscale.v_invert([d-1,d+1]),v=n[0],b=n[1],a=this.renderer.xscale.v_invert([h-1,h+1]),f=a[0],m=a[1]):\"v\"===r.direction?(l=this.renderer.yscale.v_invert([d,d]),v=l[0],b=l[1],u=[y,g],f=u[0],m=u[1]):(c=this.renderer.xscale.v_invert([h,h]),f=c[0],m=c[1],_=[w,x],v=_[0],b=_[1]),p=s.check_2_segments_intersect(f,v,m,b,y,w,g,x),[p.x,p.y]},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_line_legend(t,e,r,o,i,n)},e}(u.GlyphView),r.MultiLine=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.MultiLineView,e.prototype.type=\"MultiLine\",e.coords([[\"xs\",\"ys\"]]),e.mixins([\"line\"]),e}(u.Glyph)},{\"./glyph\":\"models/glyphs/glyph\",\"core/hittest\":\"core/hittest\",\"core/util/array\":\"core/util/array\",\"core/util/spatial\":\"core/util/spatial\",\"core/util/types\":\"core/util/types\"}],\"models/glyphs/oval\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/properties\");r.OvalView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._set_data=function(){if(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)return this.max_h2=this.max_height/2},e.prototype._map_data=function(){return\"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},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;for(u=r.sx,c=r.sy,l=r.sw,a=r.sh,s=[],i=0,n=e.length;i<n;i++)o=e[i],isNaN(u[o]+c[o]+l[o]+a[o]+this._angle[o])||(t.translate(u[o],c[o]),t.rotate(this._angle[o]),t.beginPath(),t.moveTo(0,-a[o]/2),t.bezierCurveTo(l[o]/2,-a[o]/2,l[o]/2,a[o]/2,0,a[o]/2),t.bezierCurveTo(-l[o]/2,a[o]/2,-l[o]/2,-a[o]/2,0,-a[o]/2),t.closePath(),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()),t.rotate(-this._angle[o]),s.push(t.translate(-u[o],-c[o])));return s},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){var s,a,l,u,c,_,p,h;return l=[n],p={},p[n]=(e+r)/2,h={},h[n]=(o+i)/2,u=this.sw[n]/this.sh[n],s=.8*Math.min(Math.abs(r-e),Math.abs(i-o)),_={},c={},u>1?(_[n]=s,c[n]=s/u):(_[n]=s*u,c[n]=s),a={sx:p,sy:h,sw:_,sh:c},this._render(t,l,a)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(n.XYGlyphView),r.Oval=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.OvalView,e.prototype.type=\"Oval\",e.mixins([\"line\",\"fill\"]),e.define({angle:[s.AngleSpec,0],width:[s.DistanceSpec],height:[s.DistanceSpec]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/properties\":\"core/properties\"}],\"models/glyphs/patch\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\");r.PatchView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u;if(l=r.sx,u=r.sy,this.visuals.fill.doit){for(this.visuals.fill.set_value(t),i=0,s=e.length;i<s;i++)o=e[i],0!==o?isNaN(l[o]+u[o])?(t.closePath(),t.fill(),t.beginPath()):t.lineTo(l[o],u[o]):(t.beginPath(),t.moveTo(l[o],u[o]));t.closePath(),t.fill()}if(this.visuals.line.doit){for(this.visuals.line.set_value(t),n=0,a=e.length;n<a;n++)o=e[n],0!==o?isNaN(l[o]+u[o])?(t.closePath(),t.stroke(),t.beginPath()):t.lineTo(l[o],u[o]):(t.beginPath(),t.moveTo(l[o],u[o]));return t.closePath(),t.stroke()}},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_area_legend(t,e,r,o,i,n)},e}(n.XYGlyphView),r.Patch=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.PatchView,e.prototype.type=\"Patch\",e.mixins([\"line\",\"fill\"]),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\"}],\"models/glyphs/patches\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/util/spatial\"),s=t(\"./glyph\"),a=t(\"core/util/array\"),l=t(\"core/util/types\"),u=t(\"core/hittest\");r.PatchesView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._build_discontinuous_object=function(t){var e,r,o,i,n,s,u,c,_;for(r={},o=i=0,_=t.length;0<=_?i<_:i>_;o=0<=_?++i:--i)for(r[o]=[],u=a.copy(t[o]);u.length>0;)n=a.findLastIndex(u,function(t){return l.isStrictNaN(t)}),n>=0?c=u.splice(n):(c=u,u=[]),e=function(){var t,e,r;for(r=[],t=0,e=c.length;t<e;t++)s=c[t],l.isStrictNaN(s)||r.push(s);return r}(),r[o].push(e);return r},e.prototype._index_data=function(){var t,e,r,o,i,s,l,u,c,_,p;for(c=this._build_discontinuous_object(this._xs),p=this._build_discontinuous_object(this._ys),i=[],t=r=0,s=this._xs.length;0<=s?r<s:r>s;t=0<=s?++r:--r)for(e=o=0,l=c[t].length;0<=l?o<l:o>l;e=0<=l?++o:--o)u=c[t][e],_=p[t][e],0!==u.length&&i.push({minX:a.min(u),minY:a.min(_),maxX:a.max(u),maxY:a.max(_),i:t});return new n.RBush(i)},e.prototype._mask_data=function(t){var e,r,o,i,n,s,a,l,c;return s=this.renderer.plot_view.frame.x_ranges[\"default\"],r=[s.min,s.max],i=r[0],n=r[1],c=this.renderer.plot_view.frame.y_ranges[\"default\"],o=[c.min,c.max],\n",
" a=o[0],l=o[1],e=u.validate_bbox_coords([i,n],[a,l]),this.index.indices(e)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f,m;for(d=r.sxs,m=r.sys,this.renderer.sxss=this._build_discontinuous_object(d),this.renderer.syss=this._build_discontinuous_object(m),p=[],n=0,a=e.length;n<a;n++){if(o=e[n],u=[d[o],m[o]],h=u[0],f=u[1],this.visuals.fill.doit){for(this.visuals.fill.set_vectorize(t,o),i=s=0,c=h.length;0<=c?s<c:s>c;i=0<=c?++s:--s)0!==i?isNaN(h[i]+f[i])?(t.closePath(),t.fill(),t.beginPath()):t.lineTo(h[i],f[i]):(t.beginPath(),t.moveTo(h[i],f[i]));t.closePath(),t.fill()}if(this.visuals.line.doit){for(this.visuals.line.set_vectorize(t,o),i=l=0,_=h.length;0<=_?l<_:l>_;i=0<=_?++l:--l)0!==i?isNaN(h[i]+f[i])?(t.closePath(),t.stroke(),t.beginPath()):t.lineTo(h[i],f[i]):(t.beginPath(),t.moveTo(h[i],f[i]));t.closePath(),p.push(t.stroke())}else p.push(void 0)}return p},e.prototype._hit_point=function(t){var e,r,o,i,n,s,a,l,c,_,p,h,d,f,m,y,g,v,b;for(l=[t.vx,t.vy],y=l[0],g=l[1],h=this.renderer.plot_view.canvas.vx_to_sx(y),f=this.renderer.plot_view.canvas.vy_to_sy(g),v=this.renderer.xscale.invert(y,!0),b=this.renderer.yscale.invert(g,!0),e=this.index.indices({minX:v,minY:b,maxX:v,maxY:b}),r=[],o=s=0,c=e.length;0<=c?s<c:s>c;o=0<=c?++s:--s)for(i=e[o],d=this.renderer.sxss[i],m=this.renderer.syss[i],n=a=0,_=d.length;0<=_?a<_:a>_;n=0<=_?++a:--a)u.point_in_poly(h,f,d[n],m[n])&&r.push(i);return p=u.create_hit_test_result(),p[\"1d\"].indices=r,p},e.prototype._get_snap_coord=function(t){var e,r,o,i;for(i=0,e=0,r=t.length;e<r;e++)o=t[e],i+=o;return i/t.length},e.prototype.scx=function(t,e,r){var o,i,n,s,a;if(1===this.renderer.sxss[t].length)return this._get_snap_coord(this.sxs[t]);for(s=this.renderer.sxss[t],a=this.renderer.syss[t],o=i=0,n=s.length;0<=n?i<n:i>n;o=0<=n?++i:--i)if(u.point_in_poly(e,r,s[o],a[o]))return this._get_snap_coord(s[o]);return null},e.prototype.scy=function(t,e,r){var o,i,n,s,a;if(1===this.renderer.syss[t].length)return this._get_snap_coord(this.sys[t]);for(s=this.renderer.sxss[t],a=this.renderer.syss[t],o=i=0,n=s.length;0<=n?i<n:i>n;o=0<=n?++i:--i)if(u.point_in_poly(e,r,s[o],a[o]))return this._get_snap_coord(a[o])},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_area_legend(t,e,r,o,i,n)},e}(s.GlyphView),r.Patches=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.PatchesView,e.prototype.type=\"Patches\",e.coords([[\"xs\",\"ys\"]]),e.mixins([\"line\",\"fill\"]),e}(s.Glyph)},{\"./glyph\":\"models/glyphs/glyph\",\"core/hittest\":\"core/hittest\",\"core/util/array\":\"core/util/array\",\"core/util/spatial\":\"core/util/spatial\",\"core/util/types\":\"core/util/types\"}],\"models/glyphs/quad\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/util/spatial\"),s=t(\"./glyph\"),a=t(\"../scales/categorical_scale\"),l=t(\"core/hittest\");r.QuadView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._index_data=function(){var t,e,r,o,i,s,l,u,c,_,p,h,d;for(l=function(t,e){return t instanceof a.CategoricalScale?t.v_compute(e,!0):e},s=l(this.renderer.xscale,this._left),p=l(this.renderer.xscale,this._right),d=l(this.renderer.yscale,this._top),e=l(this.renderer.yscale,this._bottom),u=[],r=o=0,_=s.length;0<=_?o<_:o>_;r=0<=_?++o:--o)i=s[r],c=p[r],h=d[r],t=e[r],!isNaN(i+c+h+t)&&isFinite(i+c+h+t)&&u.push({minX:i,minY:t,maxX:c,maxY:h,i:r});return new n.RBush(u)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;for(l=r.sleft,u=r.sright,c=r.stop,a=r.sbottom,s=[],i=0,n=e.length;i<n;i++)o=e[i],isNaN(l[o]+c[o]+u[o]+a[o])||(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,o),t.fillRect(l[o],c[o],u[o]-l[o],a[o]-c[o])),this.visuals.line.doit?(t.beginPath(),t.rect(l[o],c[o],u[o]-l[o],a[o]-c[o]),this.visuals.line.set_vectorize(t,o),s.push(t.stroke())):s.push(void 0));return s},e.prototype._hit_point=function(t){var e,r,o,i,n,s,a;return r=[t.vx,t.vy],i=r[0],n=r[1],s=this.renderer.xscale.invert(i,!0),a=this.renderer.yscale.invert(n,!0),e=this.index.indices({minX:s,minY:a,maxX:s,maxY:a}),o=l.create_hit_test_result(),o[\"1d\"].indices=e,o},e.prototype.get_anchor_point=function(t,e,r){var o,i,n,s;switch(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]),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\"center_right\":return{x:n,y:(s+o)/2};case\"bottom_right\":return{x:n,y:o};case\"bottom_center\":return{x:(i+n)/2,y:o};case\"bottom_left\":return{x:i,y:o};case\"center_left\":return{x:i,y:(s+o)/2};case\"center\":return{x:(i+n)/2,y:(s+o)/2}}},e.prototype.scx=function(t){return(this.sleft[t]+this.sright[t])/2},e.prototype.scy=function(t){return(this.stop[t]+this.sbottom[t])/2},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_area_legend(t,e,r,o,i,n)},e}(s.GlyphView),r.Quad=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.QuadView,e.prototype.type=\"Quad\",e.coords([[\"right\",\"bottom\"],[\"left\",\"top\"]]),e.mixins([\"line\",\"fill\"]),e}(s.Glyph)},{\"../scales/categorical_scale\":\"models/scales/categorical_scale\",\"./glyph\":\"models/glyphs/glyph\",\"core/hittest\":\"core/hittest\",\"core/util/spatial\":\"core/util/spatial\"}],\"models/glyphs/quadratic\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"core/util/spatial\"),a=t(\"./glyph\");o=function(t,e,r){var o,i;return e===(t+r)/2?[t,r]:(i=(t-e)/(t-2*e+r),o=t*Math.pow(1-i,2)+2*e*(1-i)*i+r*Math.pow(i,2),[Math.min(t,r,o),Math.max(t,r,o)])},r.QuadraticView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._index_data=function(){var t,e,r,i,n,a,l,u,c,_;for(r=[],t=e=0,i=this._x0.length;0<=i?e<i:e>i;t=0<=i?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t]+this._cx[t]+this._cy[t])||(n=o(this._x0[t],this._cx[t],this._x1[t]),l=n[0],u=n[1],a=o(this._y0[t],this._cy[t],this._y1[t]),c=a[0],_=a[1],r.push({minX:l,minY:c,maxX:u,maxY:_,i:t}));return new s.RBush(r)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p;if(u=r.sx0,_=r.sy0,c=r.sx1,p=r.sy1,a=r.scx,l=r.scy,this.visuals.line.doit){for(s=[],i=0,n=e.length;i<n;i++)o=e[i],isNaN(u[o]+_[o]+c[o]+p[o]+a[o]+l[o])||(t.beginPath(),t.moveTo(u[o],_[o]),t.quadraticCurveTo(a[o],l[o],c[o],p[o]),this.visuals.line.set_vectorize(t,o),s.push(t.stroke()));return s}},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_line_legend(t,e,r,o,i,n)},e}(a.GlyphView),r.Quadratic=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.QuadraticView,e.prototype.type=\"Quadratic\",e.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"],[\"cx\",\"cy\"]]),e.mixins([\"line\"]),e}(a.Glyph)},{\"./glyph\":\"models/glyphs/glyph\",\"core/util/spatial\":\"core/util/spatial\"}],\"models/glyphs/ray\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/properties\");r.RayView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._map_data=function(){return this.slength=this.sdist(this.renderer.xscale,this._x,this._length)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f;if(h=r.sx,d=r.sy,p=r.slength,o=r._angle,this.visuals.line.doit){for(f=this.renderer.plot_view.frame._width.value,i=this.renderer.plot_view.frame._height.value,s=2*(f+i),n=a=0,c=p.length;0<=c?a<c:a>c;n=0<=c?++a:--a)0===p[n]&&(p[n]=s);for(_=[],l=0,u=e.length;l<u;l++)n=e[l],isNaN(h[n]+d[n]+o[n]+p[n])||(t.translate(h[n],d[n]),t.rotate(o[n]),t.beginPath(),t.moveTo(0,0),t.lineTo(p[n],0),this.visuals.line.set_vectorize(t,n),t.stroke(),t.rotate(-o[n]),_.push(t.translate(-h[n],-d[n])));return _}},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_line_legend(t,e,r,o,i,n)},e}(n.XYGlyphView),r.Ray=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.RayView,e.prototype.type=\"Ray\",e.mixins([\"line\"]),e.define({length:[s.DistanceSpec],angle:[s.AngleSpec]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/properties\":\"core/properties\"}],\"models/glyphs/rect\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/hittest\"),a=t(\"core/properties\"),l=t(\"core/util/array\"),u=t(\"core/util/types\"),c=t(\"../scales/categorical_scale\");r.RectView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._set_data=function(){if(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)return this.max_h2=this.max_height/2},e.prototype._map_data=function(){var t,e,r,o;return t=this.renderer.plot_view.canvas,\"data\"===this.model.properties.width.units?(r=this._map_dist_corner_for_data_side_length(this._x,this._width,this.renderer.xscale,t,0),this.sw=r[0],this.sx0=r[1]):(this.sw=this._width,this.sx0=function(){var t,r,o;for(o=[],e=t=0,r=this.sx.length;0<=r?t<r:t>r;e=0<=r?++t:--t)o.push(this.sx[e]-this.sw[e]/2);return o}.call(this)),\"data\"===this.model.properties.height.units?(o=this._map_dist_corner_for_data_side_length(this._y,this._height,this.renderer.yscale,t,1),this.sh=o[0],this.sy1=o[1]):(this.sh=this._height,this.sy1=function(){var t,r,o;for(o=[],e=t=0,r=this.sy.length;0<=r?t<r:t>r;e=0<=r?++t:--t)o.push(this.sy[e]-this.sh[e]/2);return o}.call(this)),this.ssemi_diag=function(){var t,r,o;for(o=[],e=t=0,r=this.sw.length;0<=r?t<r:t>r;e=0<=r?++t:--t)o.push(Math.sqrt(this.sw[e]/2*this.sw[e]/2+this.sh[e]/2*this.sh[e]/2));return o}.call(this)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d;if(_=r.sx,h=r.sy,p=r.sx0,d=r.sy1,c=r.sw,u=r.sh,o=r._angle,this.visuals.fill.doit)for(n=0,a=e.length;n<a;n++)i=e[n],isNaN(_[i]+h[i]+p[i]+d[i]+c[i]+u[i]+o[i])||(this.visuals.fill.set_vectorize(t,i),o[i]?(t.translate(_[i],h[i]),t.rotate(o[i]),t.fillRect(-c[i]/2,-u[i]/2,c[i],u[i]),t.rotate(-o[i]),t.translate(-_[i],-h[i])):t.fillRect(p[i],d[i],c[i],u[i]));if(this.visuals.line.doit){for(t.beginPath(),s=0,l=e.length;s<l;s++)i=e[s],isNaN(_[i]+h[i]+p[i]+d[i]+c[i]+u[i]+o[i])||0!==c[i]&&0!==u[i]&&(o[i]?(t.translate(_[i],h[i]),t.rotate(o[i]),t.rect(-c[i]/2,-u[i]/2,c[i],u[i]),t.rotate(-o[i]),t.translate(-_[i],-h[i])):t.rect(p[i],d[i],c[i],u[i]),this.visuals.line.set_vectorize(t,i),t.stroke(),t.beginPath());return t.stroke()}},e.prototype._hit_rect=function(t){var e,r,o,i,n,a,l,u;return r=this.renderer.xscale.v_invert([t.vx0,t.vx1],!0),n=r[0],a=r[1],o=this.renderer.yscale.v_invert([t.vy0,t.vy1],!0),l=o[0],u=o[1],e=s.validate_bbox_coords([n,a],[l,u]),i=s.create_hit_test_result(),i[\"1d\"].indices=this.index.indices(e),i},e.prototype._hit_point=function(t){var e,r,o,i,n,a,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E;for(f=[t.vx,t.vy],k=f[0],M=f[1],T=this.renderer.xscale.invert(k,!0),P=this.renderer.yscale.invert(M,!0),v=function(){var t,e,r;for(r=[],a=t=0,e=this.sx0.length;0<=e?t<e:t>e;a=0<=e?++t:--t)r.push(this.sx0[a]+this.sw[a]/2);return r}.call(this),b=function(){var t,e,r;for(r=[],a=t=0,e=this.sy1.length;0<=e?t<e:t>e;a=0<=e?++t:--t)r.push(this.sy1[a]+this.sh[a]/2);return r}.call(this),_=l.max(this._ddist(0,v,this.ssemi_diag)),p=l.max(this._ddist(1,b,this.ssemi_diag)),S=T-_,O=T+_,A=P-p,E=P+p,n=[],e=s.validate_bbox_coords([S,O],[A,E]),m=this.index.indices(e),u=0,c=m.length;u<c;u++)a=m[u],w=this.renderer.plot_view.canvas.vx_to_sx(k),x=this.renderer.plot_view.canvas.vy_to_sy(M),this._angle[a]?(o=Math.sqrt(Math.pow(w-this.sx[a],2)+Math.pow(x-this.sy[a],2)),g=Math.sin(-this._angle[a]),r=Math.cos(-this._angle[a]),h=r*(w-this.sx[a])-g*(x-this.sy[a])+this.sx[a],d=g*(w-this.sx[a])+r*(x-this.sy[a])+this.sy[a],w=h,x=d,j=Math.abs(this.sx[a]-w)<=this.sw[a]/2,i=Math.abs(this.sy[a]-x)<=this.sh[a]/2):(j=w-this.sx0[a]<=this.sw[a]&&w-this.sx0[a]>=0,i=x-this.sy1[a]<=this.sh[a]&&x-this.sy1[a]>=0),i&&j&&n.push(a);return y=s.create_hit_test_result(),y[\"1d\"].indices=n,y},e.prototype._map_dist_corner_for_data_side_length=function(t,e,r,o,i){var n,s,a,l,_,p,h,d,f,m;return u.isString(t[0])&&r instanceof c.CategoricalScale?(l=!0,p=r.v_compute(t,l),0===i?h=function(){var r,o,i;for(i=[],n=r=0,o=t.length;0<=o?r<o:r>o;n=0<=o?++r:--r)i.push(p[n]-e[n]/2);return i}():1===i&&(h=function(){var r,o,i;for(i=[],n=r=0,o=t.length;0<=o?r<o:r>o;n=0<=o?++r:--r)i.push(p[n]+e[n]/2);return i}()),m=r.v_compute(h),_=this.sdist(r,t,e,\"center\",this.model.dilate)):(s=function(){var r,o,i;for(i=[],n=r=0,o=t.length;0<=o?r<o:r>o;n=0<=o?++r:--r)i.push(Number(t[n])-e[n]/2);return i}(),a=function(){var r,o,i;for(i=[],n=r=0,o=t.length;0<=o?r<o:r>o;n=0<=o?++r:--r)i.push(Number(t[n])+e[n]/2);return i}(),d=r.v_compute(s),f=r.v_compute(a),_=this.sdist(r,s,e,\"edge\",this.model.dilate),0===i?m=d[0]<f[0]?d:f:1===i&&(m=d[0]<f[0]?f:d)),0===i?[_,o.v_vx_to_sx(m)]:1===i?[_,o.v_vy_to_sy(m)]:void 0},e.prototype._ddist=function(t,e,r){var o,i,n,s,a,l,u;return 0===t?(u=this.renderer.plot_view.canvas.v_sx_to_vx(e),s=this.renderer.xscale):(u=this.renderer.plot_view.canvas.v_vy_to_sy(e),s=this.renderer.yscale),a=u,l=function(){var t,e,i;for(i=[],o=t=0,e=a.length;0<=e?t<e:t>e;o=0<=e?++t:--t)i.push(a[o]+r[o]);return i}(),i=s.v_invert(a),n=s.v_invert(l),function(){var t,e,r;for(r=[],o=t=0,e=i.length;0<=e?t<e:t>e;o=0<=e?++t:--t)r.push(Math.abs(n[o]-i[o]));return r}()},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_area_legend(t,e,r,o,i,n)},e.prototype._bounds=function(t){return this.max_wh2_bounds(t)},e}(n.XYGlyphView),r.Rect=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.RectView,e.prototype.type=\"Rect\",e.mixins([\"line\",\"fill\"]),e.define({angle:[a.AngleSpec,0],width:[a.DistanceSpec],height:[a.DistanceSpec],dilate:[a.Bool,!1]}),e}(n.XYGlyph)},{\"../scales/categorical_scale\":\"models/scales/categorical_scale\",\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/types\":\"core/util/types\"}],\"models/glyphs/segment\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/hittest\"),s=t(\"core/util/spatial\"),a=t(\"./glyph\");r.SegmentView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._index_data=function(){var t,e,r,o;for(r=[],t=e=0,o=this._x0.length;0<=o?e<o:e>o;t=0<=o?++e:--e)isNaN(this._x0[t]+this._x1[t]+this._y0[t]+this._y1[t])||r.push({minX:Math.min(this._x0[t],this._x1[t]),minY:Math.min(this._y0[t],this._y1[t]),maxX:Math.max(this._x0[t],this._x1[t]),maxY:Math.max(this._y0[t],this._y1[t]),i:t});return new s.RBush(r)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;if(a=r.sx0,u=r.sy0,l=r.sx1,c=r.sy1,this.visuals.line.doit){for(s=[],i=0,n=e.length;i<n;i++)o=e[i],isNaN(a[o]+u[o]+l[o]+c[o])||(t.beginPath(),t.moveTo(a[o],u[o]),t.lineTo(l[o],c[o]),this.visuals.line.set_vectorize(t,o),s.push(t.stroke()));return s}},e.prototype._hit_point=function(t){var e,r,o,i,s,a,l,u,c,_,p,h,d,f,m,y,g;for(_=[t.vx,t.vy],f=_[0],m=_[1],y=this.renderer.xscale.invert(f,!0),g=this.renderer.yscale.invert(m,!0),c={x:this.renderer.plot_view.canvas.vx_to_sx(f),y:this.renderer.plot_view.canvas.vy_to_sy(m)},o=[],e=this.index.indices({minX:y,minY:g,maxX:y,maxY:g}),s=0,a=e.length;s<a;s++)i=e[s],d=Math.max(2,this.visuals.line.cache_select(\"line_width\",i)/2),p=[{x:this.sx0[i],y:this.sy0[i]},{x:this.sx1[i],y:this.sy1[i]}],l=p[0],u=p[1],r=n.dist_to_segment(c,l,u),r<d&&o.push(i);return h=n.create_hit_test_result(),h[\"1d\"].indices=o,h},e.prototype._hit_span=function(t){var e,r,o,i,s,a,l,u,c,_,p,h,d,f,m,y;for(o=this.renderer.plot_view.frame.h_range,f=this.renderer.plot_view.frame.v_range,l=[t.vx,t.vy],m=l[0],y=l[1],\"v\"===t.direction?(d=this.renderer.yscale.invert(y),u=[this._y0,this._y1],p=u[0],h=u[1]):(d=this.renderer.xscale.invert(m),c=[this._x0,this._x1],p=c[0],h=c[1]),r=[],e=this.index.indices({minX:this.renderer.xscale.invert(o.min),minY:this.renderer.yscale.invert(f.min),maxX:this.renderer.xscale.invert(o.max),maxY:this.renderer.yscale.invert(f.max)}),s=0,a=e.length;s<a;s++)i=e[s],(p[i]<=d&&d<=h[i]||h[i]<=d&&d<=p[i])&&r.push(i);return _=n.create_hit_test_result(),_[\"1d\"].indices=r,_},e.prototype.scx=function(t){return(this.sx0[t]+this.sx1[t])/2},e.prototype.scy=function(t){return(this.sy0[t]+this.sy1[t])/2},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_line_legend(t,e,r,o,i,n)},e}(a.GlyphView),r.Segment=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.SegmentView,e.prototype.type=\"Segment\",e.coords([[\"x0\",\"y0\"],[\"x1\",\"y1\"]]),e.mixins([\"line\"]),e}(a.Glyph)},{\"./glyph\":\"models/glyphs/glyph\",\"core/hittest\":\"core/hittest\",\"core/util/spatial\":\"core/util/spatial\"}],\"models/glyphs/text\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/properties\");r.TextView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_,p;for(_=r.sx,p=r.sy,n=r._x_offset,s=r._y_offset,o=r._angle,i=r._text,c=[],l=0,u=e.length;l<u;l++)a=e[l],isNaN(_[a]+p[a]+n[a]+s[a]+o[a])||null==i[a]||(this.visuals.text.doit?(t.save(),t.translate(_[a]+n[a],p[a]+s[a]),t.rotate(o[a]),this.visuals.text.set_vectorize(t,a),t.fillText(i[a],0,0),c.push(t.restore())):c.push(void 0));return c},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return t.save(),this.text_props.set_value(t),t.font=this.text_props.font_value(),t.font=t.font.replace(/\\b[\\d\\.]+[\\w]+\\b/,\"10pt\"),t.textAlign=\"right\",t.textBaseline=\"middle\",t.fillText(\"text\",x2,(i+y2)/2),t.restore()},e}(n.XYGlyphView),r.Text=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.TextView,e.prototype.type=\"Text\",e.mixins([\"text\"]),e.define({text:[s.StringSpec,{field:\"text\"}],angle:[s.AngleSpec,0],x_offset:[s.NumberSpec,0],y_offset:[s.NumberSpec,0]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/properties\":\"core/properties\"}],\"models/glyphs/vbar\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/util/spatial\"),s=t(\"./glyph\"),a=t(\"../scales/categorical_scale\"),l=t(\"core/hittest\"),u=t(\"core/properties\");r.VBarView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._map_data=function(){var t,e,r,o,i;for(this.sx=this.renderer.xscale.v_compute(this._x),i=this.renderer.yscale.v_compute(this._top),o=this.renderer.yscale.v_compute(this._bottom),this.stop=this.renderer.plot_view.canvas.v_vy_to_sy(i),this.sbottom=this.renderer.plot_view.canvas.v_vy_to_sy(o),this.sleft=[],this.sright=[],this.sw=this.sdist(this.renderer.xscale,this._x,this._width,\"center\"),t=e=0,r=this.sx.length;0<=r?e<r:e>r;t=0<=r?++e:--e)this.sleft.push(this.sx[t]-this.sw[t]/2),this.sright.push(this.sx[t]+this.sw[t]/2);return null},e.prototype._index_data=function(){var t,e,r,o,i,s,l,u,c,_,p,h,d;for(s=function(t,e){return t instanceof a.CategoricalScale?t.v_compute(e,!0):e},d=s(this.renderer.xscale,this._x),h=s(this.renderer.xscale,this._width),p=s(this.renderer.yscale,this._top),e=s(this.renderer.yscale,this._bottom),l=[],r=o=0,c=d.length;0<=c?o<c:o>c;r=0<=c?++o:--o)i=d[r]-h[r]/2,u=d[r]+h[r]/2,_=p[r],t=e[r],!isNaN(i+u+_+t)&&isFinite(i+u+_+t)&&l.push({minX:i,minY:t,maxX:u,maxY:_,i:r});return new n.RBush(l)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c;for(l=r.sleft,u=r.sright,c=r.stop,a=r.sbottom,s=[],i=0,n=e.length;i<n;i++)o=e[i],isNaN(l[o]+c[o]+u[o]+a[o])||(this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,o),t.fillRect(l[o],c[o],u[o]-l[o],a[o]-c[o])),this.visuals.line.doit?(t.beginPath(),t.rect(l[o],c[o],u[o]-l[o],a[o]-c[o]),this.visuals.line.set_vectorize(t,o),s.push(t.stroke())):s.push(void 0));return s},e.prototype._hit_point=function(t){var e,r,o,i,n,s,a;return r=[t.vx,t.vy],i=r[0],n=r[1],s=this.renderer.xscale.invert(i,!0),a=this.renderer.yscale.invert(n,!0),e=this.index.indices({minX:s,minY:a,maxX:s,maxY:a}),o=l.create_hit_test_result(),o[\"1d\"].indices=e,o},e.prototype.scy=function(t){return(this.stop[t]+this.sbottom[t])/2},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_area_legend(t,e,r,o,i,n)},e}(s.GlyphView),r.VBar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.VBarView,e.prototype.type=\"VBar\",e.mixins([\"line\",\"fill\"]),e.define({x:[u.NumberSpec],width:[u.DistanceSpec],top:[u.NumberSpec],bottom:[u.NumberSpec,0]}),e}(s.Glyph)},{\"../scales/categorical_scale\":\"models/scales/categorical_scale\",\"./glyph\":\"models/glyphs/glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\",\"core/util/spatial\":\"core/util/spatial\"}],\"models/glyphs/wedge\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./xy_glyph\"),s=t(\"core/hittest\"),a=t(\"core/properties\"),l=t(\"core/util/math\");r.WedgeView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._map_data=function(){return\"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(t,e,r){var o,i,n,s,a,l,u,c,_,p;for(_=r.sx,p=r.sy,c=r.sradius,i=r._start_angle,o=r._end_angle,n=this.model.properties.direction.value(),u=[],a=0,l=e.length;a<l;a++)s=e[a],isNaN(_[s]+p[s]+c[s]+i[s]+o[s])||(t.beginPath(),t.arc(_[s],p[s],c[s],i[s],o[s],n),t.lineTo(_[s],p[s]),t.closePath(),this.visuals.fill.doit&&(this.visuals.fill.set_vectorize(t,s),t.fill()),this.visuals.line.doit?(this.visuals.line.set_vectorize(t,s),u.push(t.stroke())):u.push(void 0));return u},e.prototype._hit_point=function(t){var e,r,o,i,n,a,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C,N,D,F,I;for(f=[t.vx,t.vy],T=f[0],P=f[1],z=this.renderer.xscale.invert(T,!0),D=this.renderer.yscale.invert(P,!0),\"data\"===this.model.properties.radius.units?(C=z-this.max_radius,N=z+this.max_radius,F=D-this.max_radius,I=D+this.max_radius):(S=T-this.max_radius,O=T+this.max_radius,m=this.renderer.xscale.v_invert([S,O],!0),C=m[0],N=m[1],A=P-this.max_radius,E=P+this.max_radius,y=this.renderer.yscale.v_invert([A,E],!0),F=y[0],I=y[1]),o=[],r=s.validate_bbox_coords([C,N],[F,I]),g=this.index.indices(r),c=0,p=g.length;c<p;c++)u=g[c],d=Math.pow(this.sradius[u],2),w=this.renderer.xscale.compute(z,!0),x=this.renderer.xscale.compute(this._x[u],!0),M=this.renderer.yscale.compute(D,!0),j=this.renderer.yscale.compute(this._y[u],!0),n=Math.pow(w-x,2)+Math.pow(M-j,2),n<=d&&o.push([u,n]);for(i=this.model.properties.direction.value(),a=[],_=0,h=o.length;_<h;_++)v=o[_],u=v[0],n=v[1],b=this.renderer.plot_view.canvas.vx_to_sx(T),k=this.renderer.plot_view.canvas.vy_to_sy(P),e=Math.atan2(k-this.sy[u],b-this.sx[u]),l.angle_between(-e,-this._start_angle[u],-this._end_angle[u],i)&&a.push([u,n]);return s.create_1d_hit_test_result(a)},e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){return this._generic_area_legend(t,e,r,o,i,n)},e}(n.XYGlyphView),r.Wedge=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.WedgeView,e.prototype.type=\"Wedge\",e.mixins([\"line\",\"fill\"]),e.define({direction:[a.Direction,\"anticlock\"],radius:[a.DistanceSpec],start_angle:[a.AngleSpec],end_angle:[a.AngleSpec]}),e}(n.XYGlyph)},{\"./xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\",\"core/util/math\":\"core/util/math\"}],\"models/glyphs/xy_glyph\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/util/spatial\"),s=t(\"./glyph\"),a=t(\"../scales/categorical_scale\");r.XYGlyphView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._index_data=function(){var t,e,r,o,i,s,l,u;for(s=this.renderer.xscale instanceof a.CategoricalScale?this.renderer.xscale.v_compute(this._x,!0):this._x,u=this.renderer.yscale instanceof a.CategoricalScale?this.renderer.yscale.v_compute(this._y,!0):this._y,r=[],t=e=0,o=s.length;0<=o?e<o:e>o;t=0<=o?++e:--e)i=s[t],!isNaN(i)&&isFinite(i)&&(l=u[t],!isNaN(l)&&isFinite(l)&&r.push({minX:i,minY:l,maxX:i,maxY:l,i:t}));return new n.RBush(r)},e}(s.GlyphView),r.XYGlyph=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"XYGlyph\",e.prototype.default_view=r.XYGlyphView,e.coords([[\"x\",\"y\"]]),e}(s.Glyph)},{\"../scales/categorical_scale\":\"models/scales/categorical_scale\",\"./glyph\":\"models/glyphs/glyph\",\"core/util/spatial\":\"core/util/spatial\"}],\"models/grids/grid\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../renderers/guide_renderer\"),s=t(\"../renderers/renderer\"),a=t(\"core/properties\"),l=t(\"core/util/types\");r.GridView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._x_range_name=this.model.x_range_name,this._y_range_name=this.model.y_range_name},e.prototype.render=function(){var t;if(this.model.visible!==!1)return t=this.plot_view.canvas_view.ctx,t.save(),this._draw_regions(t),this._draw_minor_grids(t),this._draw_grids(t),t.restore()},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()})},e.prototype._draw_regions=function(t){var e,r,o,i,n,s,a,l,u,c,_,p;if(this.visuals.band_fill.doit)for(o=this.model.grid_coords(\"major\",!1),_=o[0],p=o[1],this.visuals.band_fill.set_value(t),e=r=0,i=_.length-1;0<=i?r<i:r>i;e=0<=i?++r:--r)e%2===1&&(n=this.plot_view.map_to_screen(_[e],p[e],this._x_range_name,this._y_range_name),a=n[0],u=n[1],s=this.plot_view.map_to_screen(_[e+1],p[e+1],this._x_range_name,this._y_range_name),l=s[0],c=s[1],t.fillRect(a[0],u[0],l[1]-a[0],c[1]-u[0]),t.fill())},e.prototype._draw_grids=function(t){var e,r,o;if(this.visuals.grid_line.doit)return e=this.model.grid_coords(\"major\"),r=e[0],o=e[1],this._draw_grid_helper(t,this.visuals.grid_line,r,o)},e.prototype._draw_minor_grids=function(t){var e,r,o;if(this.visuals.minor_grid_line.doit)return e=this.model.grid_coords(\"minor\"),r=e[0],o=e[1],this._draw_grid_helper(t,this.visuals.minor_grid_line,r,o)},e.prototype._draw_grid_helper=function(t,e,r,o){var i,n,s,a,l,u,c,_;for(e.set_value(t),i=n=0,a=r.length;0<=a?n<a:n>a;i=0<=a?++n:--n){for(l=this.plot_view.map_to_screen(r[i],o[i],this._x_range_name,this._y_range_name),c=l[0],_=l[1],t.beginPath(),t.moveTo(Math.round(c[0]),Math.round(_[0])),i=s=1,u=c.length;1<=u?s<u:s>u;i=1<=u?++s:--s)t.lineTo(Math.round(c[i]),Math.round(_[i]));t.stroke()}},e}(s.RendererView),r.Grid=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.GridView,e.prototype.type=\"Grid\",e.mixins([\"line:grid_\",\"line:minor_grid_\",\"fill:band_\"]),e.define({bounds:[a.Any,\"auto\"],dimension:[a.Number,0],ticker:[a.Instance],x_range_name:[a.String,\"default\"],y_range_name:[a.String,\"default\"]}),e.override({level:\"underlay\",band_fill_color:null,band_fill_alpha:0,grid_line_color:\"#e5e5e5\",minor_grid_line_color:null}),e.prototype.ranges=function(){var t,e,r,o;return e=this.dimension,r=(e+1)%2,t=this.plot.plot_canvas.frame,o=[t.x_ranges[this.x_range_name],t.y_ranges[this.y_range_name]],[o[e],o[r]]},e.prototype.computed_bounds=function(){var t,e,r,o,i,n,s;return i=this.ranges(),r=i[0],t=i[1],s=this.bounds,o=[r.min,r.max],l.isArray(s)?(n=Math.min(s[0],s[1]),e=Math.max(s[0],s[1]),n<o[0]?n=o[0]:n>o[1]&&(n=null),e>o[1]?e=o[1]:e<o[0]&&(e=null)):(n=o[0],e=o[1]),[n,e]},e.prototype.grid_coords=function(t,e){var r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T;for(null==e&&(e=!0),c=this.dimension,p=(c+1)%2,b=this.ranges(),v=b[0],s=b[1],w=this.computed_bounds(),M=w[0],u=w[1],T=Math.min(M,u),u=Math.max(M,u),M=T,j=this.ticker.get_ticks(M,u,v,s.min,{})[t],y=v.min,m=v.max,i=s.min,o=s.max,n=[[],[]],_=h=0,x=j.length;0<=x?h<x:h>x;_=0<=x?++h:--h)if(j[_]!==y&&j[_]!==m||!e){for(a=[],l=[],r=2,g=d=0,k=r;0<=k?d<k:d>k;g=0<=k?++d:--d)f=i+(o-i)/(r-1)*g,a.push(j[_]),l.push(f);n[c].push(a),n[p].push(l)}return n},e}(n.GuideRenderer)},{\"../renderers/guide_renderer\":\"models/renderers/guide_renderer\",\"../renderers/renderer\":\"models/renderers/renderer\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/grids/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./grid\");r.Grid=o.Grid},{\"./grid\":\"models/grids/grid\"}],\"models/index\":[function(t,e,r){\"use strict\";function o(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}Object.defineProperty(r,\"__esModule\",{value:!0}),o(t(\"./annotations\")),o(t(\"./axes\")),o(t(\"./callbacks\")),o(t(\"./canvas\")),o(t(\"./formatters\")),o(t(\"./glyphs\")),o(t(\"./grids\")),o(t(\"./layouts\")),o(t(\"./mappers\")),o(t(\"./transforms\")),o(t(\"./markers\")),o(t(\"./plots\")),o(t(\"./ranges\")),o(t(\"./renderers\")),o(t(\"./scales\")),o(t(\"./sources\")),o(t(\"./tickers\")),o(t(\"./tiles\")),o(t(\"./tools\"))},{\"./annotations\":\"models/annotations/index\",\"./axes\":\"models/axes/index\",\"./callbacks\":\"models/callbacks/index\",\"./canvas\":\"models/canvas/index\",\"./formatters\":\"models/formatters/index\",\"./glyphs\":\"models/glyphs/index\",\"./grids\":\"models/grids/index\",\"./layouts\":\"models/layouts/index\",\"./mappers\":\"models/mappers/index\",\"./markers\":\"models/markers/index\",\"./plots\":\"models/plots/index\",\"./ranges\":\"models/ranges/index\",\"./renderers\":\"models/renderers/index\",\"./scales\":\"models/scales/index\",\"./sources\":\"models/sources/index\",\"./tickers\":\"models/tickers/index\",\"./tiles\":\"models/tiles/index\",\"./tools\":\"models/tools/index\",\"./transforms\":\"models/transforms/index\"}],\"models/layouts/box\":[function(t,e,r){\n",
" \"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(\"core/layout/solver\"),a=t(\"core/properties\"),l=t(\"core/util/array\"),u=t(\"core/util/object\"),c=t(\"./layout_dom\");r.BoxView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-grid\",e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.children.change,function(t){return function(){return t.rebuild_child_views()}}(this))},e.prototype.get_height=function(){var t,e,r;return e=this.model.get_layoutable_children(),t=e.map(function(t){return t._height.value}),r=this.model._horizontal?l.max(t):l.sum(t)},e.prototype.get_width=function(){var t,e,r;return e=this.model.get_layoutable_children(),t=e.map(function(t){return t._width.value}),r=this.model._horizontal?l.sum(t):l.max(t)},e}(c.LayoutDOMView),r.Box=function(t){function e(t,r){e.__super__.constructor.call(this,t,r),this._child_equal_size_width=new s.Variable,this._child_equal_size_height=new s.Variable,this._box_equal_size_top=new s.Variable,this._box_equal_size_bottom=new s.Variable,this._box_equal_size_left=new s.Variable,this._box_equal_size_right=new s.Variable,this._box_cell_align_top=new s.Variable,this._box_cell_align_bottom=new s.Variable,this._box_cell_align_left=new s.Variable,this._box_cell_align_right=new s.Variable}return o(e,t),e.prototype.default_view=r.BoxView,e.define({children:[a.Array,[]]}),e.internal({spacing:[a.Number,6]}),e.prototype.get_layoutable_children=function(){return this.children},e.prototype.get_edit_variables=function(){var t,r,o,i,n;for(r=e.__super__.get_edit_variables.call(this),n=this.get_layoutable_children(),o=0,i=n.length;o<i;o++)t=n[o],r=r.concat(t.get_edit_variables());return r},e.prototype.get_constrained_variables=function(){return u.extend({},e.__super__.get_constrained_variables.call(this),{box_equal_size_top:this._box_equal_size_top,box_equal_size_bottom:this._box_equal_size_bottom,box_equal_size_left:this._box_equal_size_left,box_equal_size_right:this._box_equal_size_right,box_cell_align_top:this._box_cell_align_top,box_cell_align_bottom:this._box_cell_align_bottom,box_cell_align_left:this._box_cell_align_left,box_cell_align_right:this._box_cell_align_right})},e.prototype.get_constraints=function(){var t,e,r,o,i,n,a,l,u,c,_,p;if(r=[],e=this.get_layoutable_children(),0===e.length)return r;for(i=0,l=e.length;i<l;i++)t=e[i],p=t.get_constrained_variables(),c=this._child_rect(p),this._horizontal?null!=p.height&&r.push(s.EQ(c.height,[-1,this._height])):null!=p.width&&r.push(s.EQ(c.width,[-1,this._width])),this._horizontal?null!=p.box_equal_size_left&&null!=p.box_equal_size_right&&null!=p.width&&r.push(s.EQ([-1,p.box_equal_size_left],[-1,p.box_equal_size_right],p.width,this._child_equal_size_width)):null!=p.box_equal_size_top&&null!=p.box_equal_size_bottom&&null!=p.height&&r.push(s.EQ([-1,p.box_equal_size_top],[-1,p.box_equal_size_bottom],p.height,this._child_equal_size_height)),r=r.concat(t.get_constraints());for(a=this._info(e[0].get_constrained_variables()),r.push(s.EQ(a.span.start,0)),o=n=1,_=e.length;1<=_?n<_:n>_;o=1<=_?++n:--n)u=this._info(e[o].get_constrained_variables()),a.span.size&&r.push(s.EQ(a.span.start,a.span.size,[-1,u.span.start])),r.push(s.WEAK_EQ(a.whitespace.after,u.whitespace.before,0-this.spacing)),r.push(s.GE(a.whitespace.after,u.whitespace.before,0-this.spacing)),a=u;return this._horizontal?null!=p.width&&r.push(s.EQ(a.span.start,a.span.size,[-1,this._width])):null!=p.height&&r.push(s.EQ(a.span.start,a.span.size,[-1,this._height])),r=r.concat(this._align_outer_edges_constraints(!0),this._align_outer_edges_constraints(!1),this._align_inner_cell_edges_constraints(),this._box_equal_size_bounds(!0),this._box_equal_size_bounds(!1),this._box_cell_align_bounds(!0),this._box_cell_align_bounds(!1),this._box_whitespace(!0),this._box_whitespace(!1))},e.prototype._child_rect=function(t){return{x:t.origin_x,y:t.origin_y,width:t.width,height:t.height}},e.prototype._span=function(t){return this._horizontal?{start:t.x,size:t.width}:{start:t.y,size:t.height}},e.prototype._info=function(t){var e,r;return r=this._horizontal?{before:t.whitespace_left,after:t.whitespace_right}:{before:t.whitespace_top,after:t.whitespace_bottom},e=this._span(this._child_rect(t)),{span:e,whitespace:r}},e.prototype._flatten_cell_edge_variables=function(t){var r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x;for(w=t?e._top_bottom_inner_cell_edge_variables:e._left_right_inner_cell_edge_variables,r=t!==this._horizontal,l=this.get_layoutable_children(),i=l.length,c={},n=0,_=0,f=l.length;_<f;_++){for(a=l[_],s=a instanceof e?a._flatten_cell_edge_variables(t):{},o=a.get_constrained_variables(),p=0,m=w.length;p<m;p++)y=w[p],y in o&&(s[y]=[o[y]]);for(h in s)x=s[h],r?(v=h.split(\" \"),d=v[0],b=v.length>1?v[1]:\"\",u=this._horizontal?\"row\":\"col\",g=d+\" \"+u+\"-\"+i+\"-\"+n+\"-\"+b):g=h,g in c?c[g]=c[g].concat(x):c[g]=x;n+=1}return c},e.prototype._align_inner_cell_edges_constraints=function(){var t,e,r,o,i,a,l,u;if(t=[],null!=this.document&&n.call(this.document.roots(),this)>=0){e=this._flatten_cell_edge_variables(this._horizontal);for(i in e)if(u=e[i],u.length>1)for(a=u[0],r=o=1,l=u.length;1<=l?o<l:o>l;r=1<=l?++o:--o)t.push(s.EQ(u[r],[-1,a]))}return t},e.prototype._find_edge_leaves=function(t){var r,o,i,n,s,a,l,u;if(i=this.get_layoutable_children(),a=[[],[]],i.length>0)if(this._horizontal===t)u=i[0],n=i[i.length-1],u instanceof e?a[0]=a[0].concat(u._find_edge_leaves(t)[0]):a[0].push(u),n instanceof e?a[1]=a[1].concat(n._find_edge_leaves(t)[1]):a[1].push(n);else for(s=0,l=i.length;s<l;s++)r=i[s],r instanceof e?(o=r._find_edge_leaves(t),a[0]=a[0].concat(o[0]),a[1]=a[1].concat(o[1])):(a[0].push(r),a[1].push(r));return a},e.prototype._align_outer_edges_constraints=function(t){var e,r,o,i,n,a,l,u,c,_;return a=this._find_edge_leaves(t),c=a[0],i=a[1],t?(_=\"on_edge_align_left\",n=\"on_edge_align_right\"):(_=\"on_edge_align_top\",n=\"on_edge_align_bottom\"),r=function(t,e){var r,o,i,n,s;for(r=[],o=0,n=t.length;o<n;o++)i=t[o],s=i.get_constrained_variables(),e in s&&r.push(s[e]);return r},u=r(c,_),o=r(i,n),l=[],e=function(t){var e,r,o,i,n;if(t.length>1){for(r=t[0],o=i=1,n=t.length;1<=n?i<n:i>n;o=1<=n?++i:--i)e=t[o],l.push(s.EQ([-1,r],e));return null}},e(u),e(o),l},e.prototype._box_insets_from_child_insets=function(t,e,r,o){var i,n,a,l,u,c,_,p,h;return c=this._find_edge_leaves(t),p=c[0],n=c[1],t?(h=e+\"_left\",a=e+\"_right\",u=this[r+\"_left\"],l=this[r+\"_right\"]):(h=e+\"_top\",a=e+\"_bottom\",u=this[r+\"_top\"],l=this[r+\"_bottom\"]),_=[],i=function(t,e,r){var i,n,a,l,u;for(i=[],n=0,l=e.length;n<l;n++)a=e[n],u=a.get_constrained_variables(),r in u&&(o?_.push(s.GE([-1,t],u[r])):_.push(s.EQ([-1,t],u[r])));return null},i(u,p,h),i(l,n,a),_},e.prototype._box_equal_size_bounds=function(t){return this._box_insets_from_child_insets(t,\"box_equal_size\",\"_box_equal_size\",!1)},e.prototype._box_cell_align_bounds=function(t){return this._box_insets_from_child_insets(t,\"box_cell_align\",\"_box_cell_align\",!1)},e.prototype._box_whitespace=function(t){return this._box_insets_from_child_insets(t,\"whitespace\",\"_whitespace\",!0)},e._left_right_inner_cell_edge_variables=[\"box_cell_align_left\",\"box_cell_align_right\"],e._top_bottom_inner_cell_edge_variables=[\"box_cell_align_top\",\"box_cell_align_bottom\"],e}(c.LayoutDOM)},{\"./layout_dom\":\"models/layouts/layout_dom\",\"core/layout/solver\":\"core/layout/solver\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/object\":\"core/util/object\"}],\"models/layouts/column\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./box\");r.ColumnView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-grid-column\",e}(n.BoxView),r.Column=function(t){function e(t,r){e.__super__.constructor.call(this,t,r),this._horizontal=!1}return o(e,t),e.prototype.type=\"Column\",e.prototype.default_view=r.ColumnView,e}(n.Box)},{\"./box\":\"models/layouts/box\"}],\"models/layouts/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./box\");r.Box=o.Box;var i=t(\"./column\");r.Column=i.Column;var n=t(\"./layout_dom\");r.LayoutDOM=n.LayoutDOM;var s=t(\"./row\");r.Row=s.Row;var a=t(\"./spacer\");r.Spacer=a.Spacer;var l=t(\"./widget_box\");r.WidgetBox=l.WidgetBox},{\"./box\":\"models/layouts/box\",\"./column\":\"models/layouts/column\",\"./layout_dom\":\"models/layouts/layout_dom\",\"./row\":\"models/layouts/row\",\"./spacer\":\"models/layouts/spacer\",\"./widget_box\":\"models/layouts/widget_box\"}],\"models/layouts/layout_dom\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\"),s=t(\"core/dom\"),a=t(\"core/properties\"),l=t(\"core/layout/solver\"),u=t(\"core/build_views\"),c=t(\"core/dom_view\"),_=t(\"core/logging\");r.LayoutDOMView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.is_root&&(this._solver=new l.Solver),this.child_views={},this.build_child_views(),this.connect_signals()},e.prototype.remove=function(){var t,r,o;r=this.child_views;for(t in r)o=r[t],o.remove();return this.child_views={},e.__super__.remove.call(this)},e.prototype.has_finished=function(){var t,r,o;if(!e.__super__.has_finished.call(this))return!1;o=this.child_views;for(t in o)if(r=o[t],!r.has_finished())return!1;return!0},e.prototype.notify_finished=function(){return this.is_root?!this._idle_notified&&this.has_finished()&&null!=this.model.document?(this._idle_notified=!0,this.model.document.notify_idle(this.model)):void 0:e.__super__.notify_finished.call(this)},e.prototype._calc_width_height=function(){var t,e,r,o;for(e=this.el;;){if(e=e.parentNode,null==e){_.logger.warn(\"detached element\"),o=t=null;break}if(r=e.getBoundingClientRect(),o=r.width,t=r.height,0!==t)break}return[o,t]},e.prototype._init_solver=function(){var t,e,r,o,i,n,s,a,u,c,_;for(this._root_width=new l.Variable(\"root_width\"),this._root_height=new l.Variable(\"root_height\"),this._solver.add_edit_variable(this._root_width),this._solver.add_edit_variable(this._root_height),o=this.model.get_edit_variables(),e=this.model.get_constraints(),_=this.model.get_constrained_variables(),i=0,s=o.length;i<s;i++)u=o[i],r=u.edit_variable,c=u.strength,this._solver.add_edit_variable(r,c);for(n=0,a=e.length;n<a;n++)t=e[n],this._solver.add_constraint(t);return null!=_.width&&this._solver.add_constraint(l.EQ(_.width,this._root_width)),null!=_.height&&this._solver.add_constraint(l.EQ(_.height,this._root_height)),this._solver.update_variables()},e.prototype._suggest_dims=function(t,e){var r,o;if(o=this.model.get_constrained_variables(),null!=o.width||null!=o.height)return null!==t&&null!==e||(r=this._calc_width_height(),t=r[0],e=r[1]),null!=o.width&&null!=t&&this._solver.suggest_value(this._root_width,t),null!=o.height&&null!=e&&this._solver.suggest_value(this._root_height,e),this._solver.update_variables()},e.prototype.resize=function(t,e){return null==t&&(t=null),null==e&&(e=null),this.is_root?this._do_layout(!1,t,e):this.root.resize(t,e)},e.prototype.layout=function(t){return null==t&&(t=!0),this.is_root?this._do_layout(t):this.root.layout(t)},e.prototype._do_layout=function(t,e,r){return null==e&&(e=null),null==r&&(r=null),t&&(this._solver.clear(),this._init_solver()),this._suggest_dims(e,r),this._layout(),this._layout(),this._layout(!0),this.notify_finished()},e.prototype._layout=function(t){var e,r,o,i,n;for(null==t&&(t=!1),n=this.model.get_layoutable_children(),o=0,i=n.length;o<i;o++)e=n[o],r=this.child_views[e.id],null!=r._layout&&r._layout(t);if(this.render(),t)return this._has_finished=!0},e.prototype.rebuild_child_views=function(){return this.solver.clear(),this.build_child_views(),this.layout()},e.prototype.build_child_views=function(){var t,e,r,o,i,n;for(r=this.model.get_layoutable_children(),u.build_views(this.child_views,r,{parent:this}),s.empty(this.el),n=[],o=0,i=r.length;o<i;o++)t=r[o],e=this.child_views[t.id],n.push(this.el.appendChild(e.el));return n},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.is_root&&window.addEventListener(\"resize\",function(t){return function(){return t.resize()}}(this)),this.connect(this.model.properties.sizing_mode.change,function(t){return function(){return t.layout()}}(this))},e.prototype._render_classes=function(){var t,e,r,o,i;if(this.el.className=\"\",null!=this.className&&this.el.classList.add(this.className),null!=this.model.sizing_mode&&this.el.classList.add(\"bk-layout-\"+this.model.sizing_mode),null!=this.model.css_classes){for(o=this.model.css_classes,i=[],e=0,r=o.length;e<r;e++)t=o[e],i.push(this.el.classList.add(t));return i}},e.prototype.render=function(){var t,e;switch(this._render_classes(),this.model.sizing_mode){case\"fixed\":return null!=this.model.width?e=this.model.width:(e=this.get_width(),this.model.setv({width:e},{silent:!0})),null!=this.model.height?t=this.model.height:(t=this.get_height(),this.model.setv({height:t},{silent:!0})),this.solver.suggest_value(this.model._width,e),this.solver.suggest_value(this.model._height,t),this.solver.update_variables(),this.el.style.position=\"relative\",this.el.style.left=\"\",this.el.style.top=\"\",this.el.style.width=e+\"px\",this.el.style.height=t+\"px\";case\"scale_width\":return t=this.get_height(),this.solver.suggest_value(this.model._height,t),this.solver.update_variables(),this.el.style.position=\"relative\",this.el.style.left=\"\",this.el.style.top=\"\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\";case\"scale_height\":return e=this.get_width(),this.solver.suggest_value(this.model._width,e),this.solver.update_variables(),this.el.style.position=\"relative\",this.el.style.left=\"\",this.el.style.top=\"\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\";case\"stretch_both\":return this.el.style.position=\"absolute\",this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"}},e.prototype.get_height=function(){return null},e.prototype.get_width=function(){return null},e}(c.DOMView),r.LayoutDOM=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LayoutDOM\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._width=new l.Variable(\"_width \"+this.id),this._height=new l.Variable(\"_height \"+this.id),this._left=new l.Variable(\"_left \"+this.id),this._right=new l.Variable(\"_right \"+this.id),this._top=new l.Variable(\"_top \"+this.id),this._bottom=new l.Variable(\"_bottom \"+this.id),this._dom_top=new l.Variable(\"_dom_top \"+this.id),this._dom_left=new l.Variable(\"_dom_left \"+this.id),this._width_minus_right=new l.Variable(\"_width_minus_right \"+this.id),this._height_minus_bottom=new l.Variable(\"_height_minus_bottom \"+this.id),this._whitespace_top=new l.Variable,this._whitespace_bottom=new l.Variable,this._whitespace_left=new l.Variable,this._whitespace_right=new l.Variable},e.getters({layout_bbox:function(){return{top:this._top.value,left:this._left.value,width:this._width.value,height:this._height.value,right:this._right.value,bottom:this._bottom.value,dom_top:this._dom_top.value,dom_left:this._dom_left.value}}}),e.prototype.dump_layout=function(){var t,e,r,o,i;for(console.log(this.toString(),this.layout_bbox),o=this.get_layoutable_children(),i=[],e=0,r=o.length;e<r;e++)t=o[e],i.push(t.dump_layout());return i},e.prototype.get_constraints=function(){return[l.GE(this._dom_left),l.GE(this._dom_top),l.GE(this._left),l.GE(this._width,[-1,this._right]),l.GE(this._top),l.GE(this._height,[-1,this._bottom]),l.EQ(this._width_minus_right,[-1,this._width],this._right),l.EQ(this._height_minus_bottom,[-1,this._height],this._bottom)]},e.prototype.get_layoutable_children=function(){return[]},e.prototype.get_edit_variables=function(){var t;return t=[],\"fixed\"===this.sizing_mode&&(t.push({edit_variable:this._height,strength:l.Strength.strong}),t.push({edit_variable:this._width,strength:l.Strength.strong})),\"scale_width\"===this.sizing_mode&&t.push({edit_variable:this._height,strength:l.Strength.strong}),\"scale_height\"===this.sizing_mode&&t.push({edit_variable:this._width,strength:l.Strength.strong}),t},e.prototype.get_constrained_variables=function(){var t;switch(t={origin_x:this._dom_left,origin_y:this._dom_top,whitespace_top:this._whitespace_top,whitespace_bottom:this._whitespace_bottom,whitespace_left:this._whitespace_left,whitespace_right:this._whitespace_right},this.sizing_mode){case\"stretch_both\":t.width=this._width,t.height=this._height;break;case\"scale_width\":t.width=this._width;break;case\"scale_height\":t.height=this._height}return t},e.define({height:[a.Number],width:[a.Number],disabled:[a.Bool,!1],sizing_mode:[a.SizingMode,\"fixed\"],css_classes:[a.Array]}),e}(n.Model)},{\"../../model\":\"model\",\"core/build_views\":\"core/build_views\",\"core/dom\":\"core/dom\",\"core/dom_view\":\"core/dom_view\",\"core/layout/solver\":\"core/layout/solver\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/layouts/row\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./box\");r.RowView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-grid-row\",e}(n.BoxView),r.Row=function(t){function e(t,r){e.__super__.constructor.call(this,t,r),this._horizontal=!0}return o(e,t),e.prototype.type=\"Row\",e.prototype.default_view=r.RowView,e}(n.Box)},{\"./box\":\"models/layouts/box\"}],\"models/layouts/spacer\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./layout_dom\"),s=t(\"core/util/object\");r.SpacerView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-spacer-box\",e.prototype.render=function(){if(e.__super__.render.call(this),\"fixed\"===this.sizing_mode)return this.el.style.width=this.model.width+\"px\",this.el.style.height=this.model.height+\"px\"},e.prototype.get_height=function(){return 1},e}(n.LayoutDOMView),r.Spacer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Spacer\",e.prototype.default_view=r.SpacerView,e.prototype.get_constrained_variables=function(){return s.extend({},e.__super__.get_constrained_variables.call(this),{on_edge_align_top:this._top,on_edge_align_bottom:this._height_minus_bottom,on_edge_align_left:this._left,on_edge_align_right:this._width_minus_right,box_cell_align_top:this._top,box_cell_align_bottom:this._height_minus_bottom,box_cell_align_left:this._left,box_cell_align_right:this._width_minus_right,box_equal_size_top:this._top,box_equal_size_bottom:this._height_minus_bottom,box_equal_size_left:this._left,box_equal_size_right:this._width_minus_right})},e}(n.LayoutDOM)},{\"./layout_dom\":\"models/layouts/layout_dom\",\"core/util/object\":\"core/util/object\"}],\"models/layouts/widget_box\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/logging\"),s=t(\"core/properties\"),a=t(\"core/util/object\"),l=t(\"../layouts/layout_dom\");r.WidgetBoxView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-widget-box\",e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.children.change,function(t){return function(){return t.rebuild_child_views()}}(this))},e.prototype.render=function(){var t,e,r;return this._render_classes(),\"fixed\"!==this.model.sizing_mode&&\"scale_height\"!==this.model.sizing_mode||(r=this.get_width(),this.model._width.value!==r&&this.solver.suggest_value(this.model._width,r)),\"fixed\"!==this.model.sizing_mode&&\"scale_width\"!==this.model.sizing_mode||(e=this.get_height(),this.model._height.value!==e&&this.solver.suggest_value(this.model._height,e)),this.solver.update_variables(),\"stretch_both\"===this.model.sizing_mode?(this.el.style.position=\"absolute\",this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"):(t=this.model._width.value-20>0?this.model._width.value-20+\"px\":\"100%\",this.el.style.width=t)},e.prototype.get_height=function(){var t,e,r,o;e=0,o=this.child_views;for(r in o)i.call(o,r)&&(t=o[r],e+=t.el.scrollHeight);return e+20},e.prototype.get_width=function(){var t,e,r,o,n;if(null!=this.model.width)return this.model.width;n=this.el.scrollWidth+20,o=this.child_views;for(r in o)i.call(o,r)&&(t=o[r],e=t.el.scrollWidth,e>n&&(n=e));return n},e}(l.LayoutDOMView),r.WidgetBox=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"WidgetBox\",e.prototype.default_view=r.WidgetBoxView,e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),\"fixed\"===this.sizing_mode&&null===this.width&&(this.width=300,n.logger.info(\"WidgetBox mode is fixed, but no width specified. Using default of 300.\")),\"scale_height\"===this.sizing_mode)return n.logger.warn(\"sizing_mode `scale_height` is not experimental for WidgetBox. Please report your results to the bokeh dev team so we can improve.\")},e.prototype.get_edit_variables=function(){var t,r,o,i,n;for(r=e.__super__.get_edit_variables.call(this),n=this.get_layoutable_children(),o=0,i=n.length;o<i;o++)t=n[o],r=r.concat(t.get_edit_variables());return r},e.prototype.get_constraints=function(){var t,r,o,i,n;for(r=e.__super__.get_constraints.call(this),n=this.get_layoutable_children(),o=0,i=n.length;o<i;o++)t=n[o],r=r.concat(t.get_constraints());return r},e.prototype.get_constrained_variables=function(){var t;return t=a.extend({},e.__super__.get_constrained_variables.call(this),{on_edge_align_top:this._top,on_edge_align_bottom:this._height_minus_bottom,on_edge_align_left:this._left,on_edge_align_right:this._width_minus_right,box_cell_align_top:this._top,box_cell_align_bottom:this._height_minus_bottom,box_cell_align_left:this._left,box_cell_align_right:this._width_minus_right,box_equal_size_top:this._top,box_equal_size_bottom:this._height_minus_bottom}),\"fixed\"!==this.sizing_mode&&(t.box_equal_size_left=this._left,t.box_equal_size_right=this._width_minus_right),t},e.prototype.get_layoutable_children=function(){return this.children},e.define({children:[s.Array,[]]}),e}(l.LayoutDOM)},{\"../layouts/layout_dom\":\"models/layouts/layout_dom\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\"}],\"models/mappers/categorical_color_mapper\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"./color_mapper\");r.CategoricalColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"CategoricalColorMapper\",e.define({factors:[n.Array]}),e.prototype._get_values=function(t,e){var r,o,i,n,s,a;for(a=[],i=0,s=t.length;i<s;i++)o=t[i],n=this.factors.indexOf(o),r=n<0||n>=e.length?this.nan_color:e[n],a.push(r);return a},e}(s.ColorMapper)},{\"./color_mapper\":\"models/mappers/color_mapper\",\"core/properties\":\"core/properties\"}],\"models/mappers/color_mapper\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"../transforms/transform\"),a=t(\"core/util/types\");r.ColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ColorMapper\",e.define({palette:[n.Any],nan_color:[n.Color,\"gray\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._little_endian=this._is_little_endian(),this._palette=this._build_palette(this.palette),this.connect(this.change,function(){return this._palette=this._build_palette(this.palette)})},e.prototype.v_map_screen=function(t,e){var r,o,i,n,s,a,l,u,c;if(null==e&&(e=!1),c=this._get_values(t,this._palette,e),r=new ArrayBuffer(4*t.length),o=new Uint32Array(r),this._little_endian)for(i=n=0,a=t.length;0<=a?n<a:n>a;i=0<=a?++n:--n)u=c[i],o[i]=255<<24|(16711680&u)>>16|65280&u|(255&u)<<16;else for(i=s=0,l=t.length;0<=l?s<l:s>l;i=0<=l?++s:--s)u=c[i],o[i]=u<<8|255;return r},e.prototype.compute=function(t){return null},e.prototype.v_compute=function(t){var e;return e=this._get_values(t,this.palette)},e.prototype._get_values=function(t,e,r){return null==r&&(r=!1),[]},e.prototype._is_little_endian=function(){var t,e,r,o;return t=new ArrayBuffer(4),r=new Uint8Array(t),e=new Uint32Array(t),e[1]=168496141,o=!0,10===r[4]&&11===r[5]&&12===r[6]&&13===r[7]&&(o=!1),o},e.prototype._build_palette=function(t){var e,r,o,i,n;for(i=new Uint32Array(t.length),e=function(t){return a.isNumber(t)?t:parseInt(t.slice(1),16)},r=o=0,n=t.length;0<=n?o<n:o>n;r=0<=n?++o:--o)i[r]=e(t[r]);return i},e}(s.Transform)},{\"../transforms/transform\":\"models/transforms/transform\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/mappers/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./categorical_color_mapper\");r.CategoricalColorMapper=o.CategoricalColorMapper;var i=t(\"./color_mapper\");r.ColorMapper=i.ColorMapper;var n=t(\"./linear_color_mapper\");r.LinearColorMapper=n.LinearColorMapper;var s=t(\"./log_color_mapper\");r.LogColorMapper=s.LogColorMapper},{\"./categorical_color_mapper\":\"models/mappers/categorical_color_mapper\",\"./color_mapper\":\"models/mappers/color_mapper\",\"./linear_color_mapper\":\"models/mappers/linear_color_mapper\",\"./log_color_mapper\":\"models/mappers/log_color_mapper\"}],\"models/mappers/linear_color_mapper\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"core/util/color\"),a=t(\"core/util/array\"),l=t(\"./color_mapper\");r.LinearColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LinearColorMapper\",e.define({high:[n.Number],low:[n.Number],high_color:[n.Color],low_color:[n.Color]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._nan_color=this._build_palette([s.color2hex(this.nan_color)])[0],this._high_color=null!=this.high_color?this._build_palette([s.color2hex(this.high_color)])[0]:void 0,this._low_color=null!=this.low_color?this._build_palette([s.color2hex(this.low_color)])[0]:void 0},e.prototype._get_values=function(t,e,r){var o,i,n,s,l,u,c,_,p,h,d,f,m,y,g,v;for(null==r&&(r=!1),c=null!=(y=this.low)?y:a.min(t),i=null!=(g=this.high)?g:a.max(t),p=e.length-1,v=[],h=r?this._nan_color:this.nan_color,_=r?this._low_color:this.low_color,n=r?this._high_color:this.high_color,d=1/(i-c),m=1/e.length,s=0,u=t.length;s<u;s++)o=t[s],isNaN(o)?v.push(h):o!==i?(f=(o-c)*d,l=Math.floor(f/m),l<0?null!=this.low_color?v.push(_):v.push(e[0]):l>p?null!=this.high_color?v.push(n):v.push(e[p]):v.push(e[l])):v.push(e[p]);return v},e}(l.ColorMapper)},{\"./color_mapper\":\"models/mappers/color_mapper\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/color\":\"core/util/color\"}],\"models/mappers/log_color_mapper\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n=function(t,e){function r(){this.constructor=t}for(var o in e)s.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=t(\"core/properties\"),l=t(\"core/util/color\"),u=t(\"core/util/array\"),c=t(\"./color_mapper\");o=null!=(i=Math.log1p)?i:function(t){return Math.log(1+t)},r.LogColorMapper=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"LogColorMapper\",e.define({high:[a.Number],low:[a.Number],high_color:[a.Color],low_color:[a.Color]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._nan_color=this._build_palette([l.color2hex(this.nan_color)])[0],this._high_color=null!=this.high_color?this._build_palette([l.color2hex(this.high_color)])[0]:void 0,this._low_color=null!=this.low_color?this._build_palette([l.color2hex(this.low_color)])[0]:void 0},e.prototype._get_values=function(t,e,r){var i,n,s,a,l,c,_,p,h,d,f,m,y,g,v,b;for(null==r&&(r=!1),f=e.length,p=null!=(y=this.low)?y:u.min(t),n=null!=(g=this.high)?g:u.max(t),v=f/(o(n)-o(p)),d=e.length-1,b=[],m=r?this._nan_color:this.nan_color,s=r?this._high_color:this.high_color,h=r?this._low_color:this.low_color,a=0,c=t.length;a<c;a++)i=t[a],isNaN(i)?b.push(m):i>n?null!=this.high_color?b.push(s):b.push(e[d]):i!==n?i<p?null!=this.low_color?b.push(h):b.push(e[0]):(_=o(i)-o(p),l=Math.floor(_*v),l>d&&(l=d),b.push(e[l])):b.push(e[d]);return b},e}(c.ColorMapper)},{\"./color_mapper\":\"models/mappers/color_mapper\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/color\":\"core/util/color\"}],\"models/markers/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w=function(t,e){function r(){this.constructor=t}for(var o in e)x.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},x={}.hasOwnProperty,k=t(\"./marker\");o=Math.sqrt(3),l=function(t,e){return t.moveTo(-e,e),t.lineTo(e,-e),t.moveTo(-e,-e),t.lineTo(e,e)},n=function(t,e){return t.moveTo(0,e),t.lineTo(0,-e),t.moveTo(-e,0),t.lineTo(e,0)},s=function(t,e){return t.moveTo(0,e),t.lineTo(e/1.5,0),t.lineTo(0,-e),t.lineTo(-e/1.5,0),t.closePath()},a=function(t,e){var r,i;return i=e*o,r=i/3,t.moveTo(-e,r),t.lineTo(e,r),t.lineTo(0,r-i),t.closePath()},u=function(t,e,r,o,i,s,a){var u;u=.65*i,n(t,i),l(t,u),s.doit&&(s.set_vectorize(t,e),t.stroke())},c=function(t,e,r,o,i,s,a){t.arc(0,0,i,0,2*Math.PI,!1),a.doit&&(a.set_vectorize(t,e),t.fill()),s.doit&&(s.set_vectorize(t,e),n(t,i),t.stroke())},_=function(t,e,r,o,i,n,s){t.arc(0,0,i,0,2*Math.PI,!1),s.doit&&(s.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),l(t,i),t.stroke())},p=function(t,e,r,o,i,s,a){n(t,i),s.doit&&(s.set_vectorize(t,e),t.stroke());\n",
" },h=function(t,e,r,o,i,n,a){s(t,i),a.doit&&(a.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),t.stroke())},d=function(t,e,r,o,i,a,l){s(t,i),l.doit&&(l.set_vectorize(t,e),t.fill()),a.doit&&(a.set_vectorize(t,e),n(t,i),t.stroke())},f=function(t,e,r,o,i,n,s){t.rotate(Math.PI),a(t,i),t.rotate(-Math.PI),s.doit&&(s.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),t.stroke())},m=function(t,e,r,o,i,n,s){var a;a=2*i,t.rect(-i,-i,a,a),s.doit&&(s.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),t.stroke())},y=function(t,e,r,o,i,s,a){var l;l=2*i,t.rect(-i,-i,l,l),a.doit&&(a.set_vectorize(t,e),t.fill()),s.doit&&(s.set_vectorize(t,e),n(t,i),t.stroke())},g=function(t,e,r,o,i,n,s){var a;a=2*i,t.rect(-i,-i,a,a),s.doit&&(s.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),l(t,i),t.stroke())},v=function(t,e,r,o,i,n,s){a(t,i),s.doit&&(s.set_vectorize(t,e),t.fill()),n.doit&&(n.set_vectorize(t,e),t.stroke())},b=function(t,e,r,o,i,n,s){l(t,i),n.doit&&(n.set_vectorize(t,e),t.stroke())},i=function(t,e){var r,o;return o=function(t){function r(){return r.__super__.constructor.apply(this,arguments)}return w(r,t),r.prototype._render_one=e,r}(k.MarkerView),r=function(e){function r(){return r.__super__.constructor.apply(this,arguments)}return w(r,e),r.prototype.default_view=o,r.prototype.type=t,r}(k.Marker)},r.Asterisk=i(\"Asterisk\",u),r.CircleCross=i(\"CircleCross\",c),r.CircleX=i(\"CircleX\",_),r.Cross=i(\"Cross\",p),r.Diamond=i(\"Diamond\",h),r.DiamondCross=i(\"DiamondCross\",d),r.InvertedTriangle=i(\"InvertedTriangle\",f),r.Square=i(\"Square\",m),r.SquareCross=i(\"SquareCross\",y),r.SquareX=i(\"SquareX\",g),r.Triangle=i(\"Triangle\",v),r.X=i(\"X\",b)},{\"./marker\":\"models/markers/marker\"}],\"models/markers/marker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../glyphs/xy_glyph\"),s=t(\"core/hittest\"),a=t(\"core/properties\");r.MarkerView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.draw_legend_for_index=function(t,e,r,o,i,n){var s,a,l,u,c,_;return l=[n],c={},c[n]=(e+r)/2,_={},_[n]=(o+i)/2,u={},u[n]=.4*Math.min(Math.abs(r-e),Math.abs(i-o)),s={},s[n]=this._angle[n],a={sx:c,sy:_,_size:u,_angle:s},this._render(t,l,a)},e.prototype._render=function(t,e,r){var o,i,n,s,a,l,u,c,_;for(c=r.sx,_=r.sy,i=r._size,o=r._angle,u=[],s=0,a=e.length;s<a;s++)n=e[s],isNaN(c[n]+_[n]+i[n]+o[n])||(l=i[n]/2,t.beginPath(),t.translate(c[n],_[n]),o[n]&&t.rotate(o[n]),this._render_one(t,n,c[n],_[n],l,this.visuals.line,this.visuals.fill),o[n]&&t.rotate(-o[n]),u.push(t.translate(-c[n],-_[n])));return u},e.prototype._mask_data=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d;return r=this.renderer.plot_view.frame.h_range,a=r.start-this.max_size,l=r.end+this.max_size,o=this.renderer.xscale.v_invert([a,l],!0),_=o[0],p=o[1],n=this.renderer.plot_view.frame.v_range,u=n.start-this.max_size,c=n.end+this.max_size,i=this.renderer.yscale.v_invert([u,c],!0),h=i[0],d=i[1],e=s.validate_bbox_coords([_,p],[h,d]),this.index.indices(e)},e.prototype._hit_point=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M;for(u=[t.vx,t.vy],f=u[0],g=u[1],h=this.renderer.plot_view.canvas.vx_to_sx(f),d=this.renderer.plot_view.canvas.vy_to_sy(g),m=f-this.max_size,y=f+this.max_size,c=this.renderer.xscale.v_invert([m,y],!0),w=c[0],x=c[1],v=g-this.max_size,b=g+this.max_size,_=this.renderer.yscale.v_invert([v,b],!0),k=_[0],M=_[1],e=s.validate_bbox_coords([w,x],[k,M]),r=this.index.indices(e),i=[],a=0,l=r.length;a<l;a++)n=r[a],p=this._size[n]/2,o=Math.abs(this.sx[n]-h)+Math.abs(this.sy[n]-d),Math.abs(this.sx[n]-h)<=p&&Math.abs(this.sy[n]-d)<=p&&i.push([n,o]);return s.create_1d_hit_test_result(i)},e.prototype._hit_span=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k;return u=[t.vx,t.vy],d=u[0],y=u[1],c=this.bounds(),n=c.minX,a=c.minY,o=c.maxX,i=c.maxY,h=s.create_hit_test_result(),\"h\"===t.direction?(x=a,k=i,l=this.max_size/2,f=d-l,m=d+l,_=this.renderer.xscale.v_invert([f,m],!0),b=_[0],w=_[1]):(b=n,w=o,l=this.max_size/2,g=y-l,v=y+l,p=this.renderer.yscale.v_invert([g,v],!0),x=p[0],k=p[1]),e=s.validate_bbox_coords([b,w],[x,k]),r=this.index.indices(e),h[\"1d\"].indices=r,h},e.prototype._hit_rect=function(t){var e,r,o,i,n,a,l,u;return r=this.renderer.xscale.v_invert([t.vx0,t.vx1],!0),n=r[0],a=r[1],o=this.renderer.yscale.v_invert([t.vy0,t.vy1],!0),l=o[0],u=o[1],e=s.validate_bbox_coords([n,a],[l,u]),i=s.create_hit_test_result(),i[\"1d\"].indices=this.index.indices(e),i},e.prototype._hit_poly=function(t){var e,r,o,i,n,a,l,u,c,_,p,h,d;for(a=[t.vx,t.vy],h=a[0],d=a[1],_=this.renderer.plot_view.canvas.v_vx_to_sx(h),p=this.renderer.plot_view.canvas.v_vy_to_sy(d),e=function(){c=[];for(var t=0,e=this.sx.length;0<=e?t<e:t>e;0<=e?t++:t--)c.push(t);return c}.apply(this),r=[],o=n=0,l=e.length;0<=l?n<l:n>l;o=0<=l?++n:--n)i=e[o],s.point_in_poly(this.sx[o],this.sy[o],_,p)&&r.push(i);return u=s.create_hit_test_result(),u[\"1d\"].indices=r,u},e}(n.XYGlyphView),r.Marker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.mixins([\"line\",\"fill\"]),e.define({size:[a.DistanceSpec,{units:\"screen\",value:4}],angle:[a.AngleSpec,0]}),e}(n.XYGlyph)},{\"../glyphs/xy_glyph\":\"models/glyphs/xy_glyph\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\"}],\"models/plots/gmap_plot\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/logging\"),s=t(\"./gmap_plot_canvas\"),a=t(\"./plot\"),l=t(\"core/properties\"),u=t(\"../../model\");r.MapOptions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"MapOptions\",e.define({lat:[l.Number],lng:[l.Number],zoom:[l.Number,12]}),e}(u.Model),r.GMapOptions=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"GMapOptions\",e.define({map_type:[l.String,\"roadmap\"],scale_control:[l.Bool,!1],styles:[l.String]}),e}(r.MapOptions),r.GMapPlotView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(a.PlotView),r.GMapPlot=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"GMapPlot\",e.prototype.default_view=r.GMapPlotView,e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),!this.api_key)return n.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.\")},e.prototype._init_plot_canvas=function(){return new s.GMapPlotCanvas({plot:this})},e.define({map_options:[l.Instance],api_key:[l.String]}),e}(a.Plot)},{\"../../model\":\"model\",\"./gmap_plot_canvas\":\"models/plots/gmap_plot_canvas\",\"./plot\":\"models/plots/plot\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/plots/gmap_plot_canvas\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n=function(t,e){return function(){return t.apply(e,arguments)}},s=function(t,e){function r(){this.constructor=t}for(var o in e)a.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=t(\"core/util/proj4\"),u=t(\"./plot_canvas\"),c=t(\"core/signaling\");o=new c.Signal(this,\"gmaps_ready\"),i=function(t){var e;return window._bokeh_gmaps_callback=function(){return o.emit()},e=document.createElement(\"script\"),e.type=\"text/javascript\",e.src=\"https://maps.googleapis.com/maps/api/js?key=\"+t+\"&callback=_bokeh_gmaps_callback\",document.body.appendChild(e)},r.GMapPlotCanvasView=function(t){function e(){return this._set_bokeh_ranges=n(this._set_bokeh_ranges,this),this._get_projected_bounds=n(this._get_projected_bounds,this),this._get_latlon_bounds=n(this._get_latlon_bounds,this),e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){var r,n;return this.pause(),e.__super__.initialize.call(this,t),this._tiles_loaded=!1,this.zoom_count=0,r=this.model.plot.map_options,this.initial_zoom=r.zoom,this.initial_lat=r.lat,this.initial_lng=r.lng,this.canvas_view.map_el.style.position=\"absolute\",null==(null!=(n=window.google)?n.maps:void 0)&&(null==window._bokeh_gmaps_callback&&i(this.model.plot.api_key),o.connect(function(t){return function(){return t.request_render()}}(this))),this.unpause()},e.prototype.update_range=function(t){var r,o,i,n,s,a,l,u,c;if(null==t)r=this.model.plot.map_options,this.map.setCenter({lat:this.initial_lat,lng:this.initial_lng}),this.map.setOptions({zoom:this.initial_zoom}),e.__super__.update_range.call(this,null);else if(null!=t.sdx||null!=t.sdy)this.map.panBy(t.sdx,t.sdy),e.__super__.update_range.call(this,t);else if(null!=t.factor){if(10!==this.zoom_count)return void(this.zoom_count+=1);this.zoom_count=0,this.pause(),e.__super__.update_range.call(this,t),c=t.factor<0?-1:1,i=this.map.getZoom(),o=i+c,o>=2&&(this.map.setZoom(o),u=this._get_projected_bounds(),s=u[0],n=u[1],l=u[2],a=u[3],n-s<0&&this.map.setZoom(i)),this.unpause()}return this._set_bokeh_ranges()},e.prototype._build_map=function(){var t,e,r;return e=window.google.maps,this.map_types={satellite:e.MapTypeId.SATELLITE,terrain:e.MapTypeId.TERRAIN,roadmap:e.MapTypeId.ROADMAP,hybrid:e.MapTypeId.HYBRID},r=this.model.plot.map_options,t={center:new e.LatLng(r.lat,r.lng),zoom:r.zoom,disableDefaultUI:!0,mapTypeId:this.map_types[r.map_type],scaleControl:r.scale_control},null!=r.styles&&(t.styles=JSON.parse(r.styles)),this.map=new e.Map(this.canvas_view.map_el,t),e.event.addListener(this.map,\"idle\",function(t){return function(){return t._set_bokeh_ranges()}}(this)),e.event.addListener(this.map,\"bounds_changed\",function(t){return function(){return t._set_bokeh_ranges()}}(this)),e.event.addListenerOnce(this.map,\"tilesloaded\",function(t){return function(){return t._render_finished()}}(this)),this.connect(this.model.plot.properties.map_options.change,function(t){return function(){return t._update_options()}}(this)),this.connect(this.model.plot.map_options.properties.styles.change,function(t){return function(){return t._update_styles()}}(this)),this.connect(this.model.plot.map_options.properties.lat.change,function(t){return function(){return t._update_center(\"lat\")}}(this)),this.connect(this.model.plot.map_options.properties.lng.change,function(t){return function(){return t._update_center(\"lng\")}}(this)),this.connect(this.model.plot.map_options.properties.zoom.change,function(t){return function(){return t._update_zoom()}}(this)),this.connect(this.model.plot.map_options.properties.map_type.change,function(t){return function(){return t._update_map_type()}}(this)),this.connect(this.model.plot.map_options.properties.scale_control.change,function(t){return function(){return t._update_scale_control()}}(this))},e.prototype._render_finished=function(){return this._tiles_loaded=!0,this.notify_finished()},e.prototype.has_finished=function(){return e.__super__.has_finished.call(this)&&this._tiles_loaded===!0},e.prototype._get_latlon_bounds=function(){var t,e,r,o,i,n,s;return e=this.map.getBounds(),r=e.getNorthEast(),t=e.getSouthWest(),i=t.lng(),o=r.lng(),s=t.lat(),n=r.lat(),[i,o,s,n]},e.prototype._get_projected_bounds=function(){var t,e,r,o,i,n,s,a,u,c,_;return i=this._get_latlon_bounds(),u=i[0],a=i[1],_=i[2],c=i[3],n=l.proj4(l.mercator,[u,_]),e=n[0],o=n[1],s=l.proj4(l.mercator,[a,c]),t=s[0],r=s[1],[e,t,o,r]},e.prototype._set_bokeh_ranges=function(){var t,e,r,o,i;return i=this._get_projected_bounds(),e=i[0],t=i[1],o=i[2],r=i[3],this.frame.x_range.setv({start:e,end:t}),this.frame.y_range.setv({start:o,end:r})},e.prototype._update_center=function(t){var e;return e=this.map.getCenter().toJSON(),e[t]=this.model.plot.map_options[t],this.map.setCenter(e),this._set_bokeh_ranges()},e.prototype._update_map_type=function(){var t;return t=window.google.maps,this.map.setOptions({mapTypeId:this.map_types[this.model.plot.map_options.map_type]})},e.prototype._update_scale_control=function(){var t;return t=window.google.maps,this.map.setOptions({scaleControl:this.model.plot.map_options.scale_control})},e.prototype._update_options=function(){return this._update_styles(),this._update_center(\"lat\"),this._update_center(\"lng\"),this._update_zoom(),this._update_map_type()},e.prototype._update_styles=function(){return this.map.setOptions({styles:JSON.parse(this.model.plot.map_options.styles)})},e.prototype._update_zoom=function(){return this.map.setOptions({zoom:this.model.plot.map_options.zoom}),this._set_bokeh_ranges()},e.prototype._map_hook=function(t,e){var r,o,i,n,s;if(o=e[0],n=e[1],s=e[2],r=e[3],this.canvas_view.map_el.style.top=n+\"px\",this.canvas_view.map_el.style.left=o+\"px\",this.canvas_view.map_el.style.width=s+\"px\",this.canvas_view.map_el.style.height=r+\"px\",null==this.map&&null!=(null!=(i=window.google)?i.maps:void 0))return this._build_map()},e.prototype._paint_empty=function(t,e){var r,o,i,n,s,a;return s=this.canvas._width.value,n=this.canvas._height.value,i=e[0],a=e[1],o=e[2],r=e[3],t.clearRect(0,0,s,n),t.beginPath(),t.moveTo(0,0),t.lineTo(0,n),t.lineTo(s,n),t.lineTo(s,0),t.lineTo(0,0),t.moveTo(i,a),t.lineTo(i+o,a),t.lineTo(i+o,a+r),t.lineTo(i,a+r),t.lineTo(i,a),t.closePath(),t.fillStyle=this.model.plot.border_fill_color,t.fill()},e}(u.PlotCanvasView),r.GMapPlotCanvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type=\"GMapPlotCanvas\",e.prototype.default_view=r.GMapPlotCanvasView,e.prototype.initialize=function(t,r){return this.use_map=!0,e.__super__.initialize.call(this,t,r)},e}(u.PlotCanvas)},{\"./plot_canvas\":\"models/plots/plot_canvas\",\"core/signaling\":\"core/signaling\",\"core/util/proj4\":\"core/util/proj4\"}],\"models/plots/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./gmap_plot\");r.MapOptions=o.MapOptions;var i=t(\"./gmap_plot\");r.GMapOptions=i.GMapOptions;var n=t(\"./gmap_plot\");r.GMapPlot=n.GMapPlot;var s=t(\"./gmap_plot_canvas\");r.GMapPlotCanvas=s.GMapPlotCanvas;var a=t(\"./plot\");r.Plot=a.Plot;var l=t(\"./plot_canvas\");r.PlotCanvas=l.PlotCanvas},{\"./gmap_plot\":\"models/plots/gmap_plot\",\"./gmap_plot_canvas\":\"models/plots/gmap_plot_canvas\",\"./plot\":\"models/plots/plot\",\"./plot_canvas\":\"models/plots/plot_canvas\"}],\"models/plots/plot\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].slice,s=t(\"core/layout/solver\"),a=t(\"core/logging\"),l=t(\"core/properties\"),u=t(\"core/util/object\"),c=t(\"core/util/types\"),_=t(\"../layouts/layout_dom\"),p=t(\"../annotations/title\"),h=t(\"../scales/linear_scale\"),d=t(\"../tools/toolbar\"),f=t(\"../tools/tool_events\"),m=t(\"./plot_canvas\"),y=t(\"../sources/column_data_source\"),g=t(\"../renderers/glyph_renderer\"),v=t(\"core/bokeh_events\");r.PlotView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-plot-layout\",e.prototype.connect_signals=function(){var t;return e.__super__.connect_signals.call(this),t=\"Title object cannot be replaced. Try changing properties on title to update it after initialization.\",this.connect(this.model.properties.title.change,function(e){return function(){return a.logger.warn(t)}}(this))},e.prototype.render=function(){var t,r,o;if(e.__super__.render.call(this),\"scale_both\"===this.model.sizing_mode)return r=this.get_width_height(),o=r[0],t=r[1],this.solver.suggest_value(this.model._width,o),this.solver.suggest_value(this.model._height,t),this.solver.update_variables(),this.el.style.position=\"absolute\",this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"},e.prototype.get_width_height=function(){var t,e,r,o,i,n,s,a,l;return s=this.el.parentNode.clientHeight,a=this.el.parentNode.clientWidth,t=this.model.get_aspect_ratio(),i=a,r=a/t,n=s*t,o=s,i<n?(l=i,e=r):(l=n,e=o),[l,e]},e.prototype.get_height=function(){return this.model._width.value/this.model.get_aspect_ratio()},e.prototype.get_width=function(){return this.model._height.value*this.model.get_aspect_ratio()},e.prototype.save=function(t){return this.plot_canvas_view.save(t)},e.getters({plot_canvas_view:function(){var t;return function(){var e,r,o,i;for(o=u.values(this.child_views),i=[],e=0,r=o.length;e<r;e++)t=o[e],t instanceof m.PlotCanvasView&&i.push(t);return i}.call(this)[0]}}),e}(_.LayoutDOMView),r.Plot=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Plot\",e.prototype.default_view=r.PlotView,e.prototype.initialize=function(t){var r,o,i,n,s,a,l,_,h,d,f,m,y,g,v,b,w,x,k,M;for(e.__super__.initialize.call(this,t),m=u.values(this.extra_x_ranges).concat(this.x_range),o=0,l=m.length;o<l;o++)k=m[o],f=k.plots,c.isArray(f)&&(f=f.concat(this),k.setv(\"plots\",f,{silent:!0}));for(y=u.values(this.extra_y_ranges).concat(this.y_range),i=0,_=y.length;i<_;i++)M=y[i],f=M.plots,c.isArray(f)&&(f=f.concat(this),M.setv(\"plots\",f,{silent:!0}));for(this._horizontal=\"left\"===(g=this.toolbar_location)||\"right\"===g,null!=this.min_border&&(null==this.min_border_top&&(this.min_border_top=this.min_border),null==this.min_border_bottom&&(this.min_border_bottom=this.min_border),null==this.min_border_left&&(this.min_border_left=this.min_border),null==this.min_border_right&&(this.min_border_right=this.min_border)),null!=this.title&&(x=c.isString(this.title)?new p.Title({text:this.title}):this.title,this.add_layout(x,this.title_location)),this._plot_canvas=this._init_plot_canvas(),this.toolbar.toolbar_location=this.toolbar_location,this.toolbar.toolbar_sticky=this.toolbar_sticky,this.plot_canvas.toolbar=this.toolbar,null==this.width&&(this.width=this.plot_width),null==this.height&&(this.height=this.plot_height),v=[\"above\",\"below\",\"left\",\"right\"],n=0,h=v.length;n<h;n++)for(w=v[n],a=this.getv(w),s=0,d=a.length;s<d;s++)b=a[s],b.add_panel(w);return r=function(t){return function(e){return e._sizeable=t._horizontal?e._width:e._height}}(this),r(this),r(this.plot_canvas)},e.prototype._init_plot_canvas=function(){return new m.PlotCanvas({plot:this})},e.getters({plot_canvas:function(){return this._plot_canvas}}),e.prototype._doc_attached=function(){return this.plot_canvas.attach_document(this.document),e.__super__._doc_attached.call(this)},e.prototype.add_renderers=function(){var t,e;return t=1<=arguments.length?n.call(arguments,0):[],e=this.renderers,e=e.concat(t),this.renderers=e},e.prototype.add_layout=function(t,e){var r;return null==e&&(e=\"center\"),null!=t.props.plot&&(t.plot=this),\"center\"!==e&&(r=this.getv(e),r.push(t),t.add_panel(e)),this.add_renderers(t)},e.prototype.add_glyph=function(t,e,r){var o;return null==r&&(r={}),null==e&&(e=new y.ColumnDataSource),r=u.extend({},r,{data_source:e,glyph:t}),o=new g.GlyphRenderer(r),this.add_renderers(o),o},e.prototype.add_tools=function(){var t,e,r,o;return o=1<=arguments.length?n.call(arguments,0):[],e=function(){var e,i,n;for(n=[],e=0,i=o.length;e<i;e++)r=o[e],null!=r.overlay&&this.add_renderers(r.overlay),null!=r.plot?n.push(r):(t=u.clone(r.attributes),t.plot=this,n.push(new r.constructor(t)));return n}.call(this),this.toolbar.tools=this.toolbar.tools.concat(e)},e.prototype.get_aspect_ratio=function(){return this.width/this.height},e.prototype.get_layoutable_children=function(){var t;return t=[this.plot_canvas],null!=this.toolbar_location&&(t=[this.toolbar,this.plot_canvas]),t},e.prototype.get_edit_variables=function(){var t,r,o,i,n;for(r=e.__super__.get_edit_variables.call(this),\"scale_both\"===this.sizing_mode&&(r.push({edit_variable:this._width,strength:s.Strength.strong}),r.push({edit_variable:this._height,strength:s.Strength.strong})),n=this.get_layoutable_children(),o=0,i=n.length;o<i;o++)t=n[o],r=r.concat(t.get_edit_variables());return r},e.prototype.get_constraints=function(){var t,r,o,i,n,a,l,u;for(r=e.__super__.get_constraints.call(this),null!=this.toolbar_location&&(this.toolbar_sticky===!0?r.push(s.EQ(this._sizeable,[-1,this.plot_canvas._sizeable])):r.push(s.EQ(this._sizeable,[-1,this.plot_canvas._sizeable],[-1,this.toolbar._sizeable])),this._horizontal?r.push(s.EQ(this._height,[-1,this.plot_canvas._height])):r.push(s.EQ(this._width,[-1,this.plot_canvas._width])),\"above\"===this.toolbar_location&&(u=this.toolbar_sticky===!0?this.plot_canvas._top:this.plot_canvas._dom_top,r.push(s.EQ(u,[-1,this.toolbar._dom_top],[-1,this.toolbar._height]))),\"below\"===this.toolbar_location&&(this.toolbar_sticky===!1&&r.push(s.EQ(this.toolbar._dom_top,[-1,this.plot_canvas._height],this.toolbar._bottom,[-1,this.toolbar._height])),this.toolbar_sticky===!0&&(r.push(s.GE(this.plot_canvas.below_panel._height,[-1,this.toolbar._height])),r.push(s.WEAK_EQ(this.toolbar._dom_top,[-1,this.plot_canvas._height],this.plot_canvas.below_panel._height)))),\"left\"===this.toolbar_location&&(u=this.toolbar_sticky===!0?this.plot_canvas._left:this.plot_canvas._dom_left,r.push(s.EQ(u,[-1,this.toolbar._dom_left],[-1,this.toolbar._width]))),\"right\"===this.toolbar_location&&(this.toolbar_sticky===!1&&r.push(s.EQ(this.toolbar._dom_left,[-1,this.plot_canvas._width],this.toolbar._right,[-1,this.toolbar._width])),this.toolbar_sticky===!0&&(r.push(s.GE(this.plot_canvas.right_panel._width,[-1,this.toolbar._width])),r.push(s.WEAK_EQ(this.toolbar._dom_left,[-1,this.plot_canvas._width],this.plot_canvas.right_panel._width)))),\"above\"!==(n=this.toolbar_location)&&\"below\"!==n||r.push(s.EQ(this._width,[-1,this.toolbar._width],[-1,this.plot_canvas._width_minus_right])),\"left\"!==(a=this.toolbar_location)&&\"right\"!==a||(r.push(s.EQ(this._height,[-1,this.toolbar._height],[-1,this.plot_canvas.above_panel._height])),r.push(s.EQ(this.toolbar._dom_top,[-1,this.plot_canvas.above_panel._height])))),null==this.toolbar_location&&(r.push(s.EQ(this._width,[-1,this.plot_canvas._width])),r.push(s.EQ(this._height,[-1,this.plot_canvas._height]))),l=this.get_layoutable_children(),o=0,i=l.length;o<i;o++)t=l[o],r=r.concat(t.get_constraints());return r},e.prototype.get_constrained_variables=function(){var t;return t=u.extend({},e.__super__.get_constrained_variables.call(this),{on_edge_align_top:this.plot_canvas._top,on_edge_align_bottom:this.plot_canvas._height_minus_bottom,on_edge_align_left:this.plot_canvas._left,on_edge_align_right:this.plot_canvas._width_minus_right,box_cell_align_top:this.plot_canvas._top,box_cell_align_bottom:this.plot_canvas._height_minus_bottom,box_cell_align_left:this.plot_canvas._left,box_cell_align_right:this.plot_canvas._width_minus_right,box_equal_size_top:this.plot_canvas._top,box_equal_size_bottom:this.plot_canvas._height_minus_bottom}),\"fixed\"!==this.sizing_mode&&(t.box_equal_size_left=this.plot_canvas._left,t.box_equal_size_right=this.plot_canvas._width_minus_right),t},e.mixins([\"line:outline_\",\"fill:background_\",\"fill:border_\"]),e.define({toolbar:[l.Instance,function(){return new d.Toolbar}],toolbar_location:[l.Location,\"right\"],toolbar_sticky:[l.Bool,!0],plot_width:[l.Number,600],plot_height:[l.Number,600],title:[l.Any,function(){return new p.Title({text:\"\"})}],title_location:[l.Location,\"above\"],h_symmetry:[l.Bool,!0],v_symmetry:[l.Bool,!1],above:[l.Array,[]],below:[l.Array,[]],left:[l.Array,[]],right:[l.Array,[]],renderers:[l.Array,[]],x_range:[l.Instance],extra_x_ranges:[l.Any,{}],y_range:[l.Instance],extra_y_ranges:[l.Any,{}],x_scale:[l.Instance,function(){return new h.LinearScale}],y_scale:[l.Instance,function(){return new h.LinearScale}],tool_events:[l.Instance,function(){return new f.ToolEvents}],lod_factor:[l.Number,10],lod_interval:[l.Number,300],lod_threshold:[l.Number,2e3],lod_timeout:[l.Number,500],hidpi:[l.Bool,!0],output_backend:[l.OutputBackend,\"canvas\"],min_border:[l.Number,5],min_border_top:[l.Number,null],min_border_left:[l.Number,null],min_border_bottom:[l.Number,null],min_border_right:[l.Number,null],inner_width:[l.Number],inner_height:[l.Number],layout_width:[l.Number],layout_height:[l.Number]}),e.override({outline_line_color:\"#e5e5e5\",border_fill_color:\"#ffffff\",background_fill_color:\"#ffffff\"}),e.getters({all_renderers:function(){var t,e,r,o,i;for(o=this.renderers,r=this.toolbar.tools,t=0,e=r.length;t<e;t++)i=r[t],o=o.concat(i.synthetic_renderers);return o},x_mapper_type:function(){return log.warning(\"x_mapper_type attr is deprecated, use x_scale\"),this.x_scale},y_mapper_type:function(){return log.warning(\"y_mapper_type attr is deprecated, use y_scale\"),this.y_scale},webgl:function(){return log.warning(\"webgl attr is deprecated, use output_backend\"),\"webgl\"===this.output_backend}}),e}(_.LayoutDOM),v.register_with_event(v.UIEvent,r.Plot)},{\"../annotations/title\":\"models/annotations/title\",\"../layouts/layout_dom\":\"models/layouts/layout_dom\",\"../renderers/glyph_renderer\":\"models/renderers/glyph_renderer\",\"../scales/linear_scale\":\"models/scales/linear_scale\",\"../sources/column_data_source\":\"models/sources/column_data_source\",\"../tools/tool_events\":\"models/tools/tool_events\",\"../tools/toolbar\":\"models/tools/toolbar\",\"./plot_canvas\":\"models/plots/plot_canvas\",\"core/bokeh_events\":\"core/bokeh_events\",\"core/layout/solver\":\"core/layout/solver\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\",\"core/util/types\":\"core/util/types\"}],\"models/plots/plot_canvas\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},a=t(\"../canvas/canvas\"),l=t(\"../canvas/cartesian_frame\"),u=t(\"../ranges/data_range1d\"),c=t(\"../renderers/glyph_renderer\"),_=t(\"../layouts/layout_dom\"),p=t(\"core/signaling\"),h=t(\"core/build_views\"),d=t(\"core/ui_events\"),f=t(\"core/bokeh_events\"),m=t(\"core/layout/layout_canvas\"),y=t(\"core/visuals\"),g=t(\"core/dom_view\"),v=t(\"core/layout/solver\"),b=t(\"core/logging\"),w=t(\"core/enums\"),x=t(\"core/properties\"),k=t(\"core/util/throttle\"),M=t(\"core/util/types\"),j=t(\"core/util/array\"),T=t(\"core/util/object\"),S=t(\"core/layout/side_panel\");o=null,r.PlotCanvasView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.className=\"bk-plot-wrapper\",e.prototype.state={history:[],index:-1},e.prototype.view_options=function(){return T.extend({plot_view:this,parent:this},this.options)},e.prototype.pause=function(){return null==this._is_paused?this._is_paused=1:this._is_paused+=1},e.prototype.unpause=function(t){if(null==t&&(t=!1),this._is_paused-=1,0===this._is_paused&&!t)return this.request_render()},e.prototype.request_render=function(){return this.request_paint()},e.prototype.request_paint=function(){this.is_paused||this.throttled_paint()},e.prototype.remove=function(){return h.remove_views(this.renderer_views),h.remove_views(this.tool_views),this.canvas_view.remove(),this.canvas_view=null,e.__super__.remove.call(this)},e.prototype.initialize=function(t){var r,o,i,n;for(this.pause(),e.__super__.initialize.call(this,t),this.force_paint=new p.Signal(this,\"force_paint\"),this.state_changed=new p.Signal(this,\"state_changed\"),this.lod_started=!1,this.visuals=new y.Visuals(this.model.plot),this._initial_state_info={range:null,selection:{},dimensions:{width:this.model.canvas._width.value,height:this.model.canvas._height.value}},this.frame=this.model.frame,this.canvas=this.model.canvas,this.canvas_view=new this.canvas.default_view({model:this.canvas,parent:this}),this.el.appendChild(this.canvas_view.el),this.canvas_view.render(),\"webgl\"===this.model.plot.output_backend&&this.init_webgl(),this.throttled_paint=k.throttle(function(t){return function(){return t.force_paint.emit()}}(this),15),this.ui_event_bus=new d.UIEvents(this,this.model.toolbar,this.canvas_view.el,this.model.plot),this.levels={},n=w.RenderLevel,r=0,o=n.length;r<o;r++)i=n[r],this.levels[i]={};return this.renderer_views={},this.tool_views={},this.build_levels(),this.build_tools(),this.connect_signals(),this.update_dataranges(),this.unpause(!0),b.logger.debug(\"PlotView initialized\"),this},e.prototype.set_cursor=function(t){return null==t&&(t=\"default\"),this.canvas_view.el.style.cursor=t},e.getters({canvas_overlays:function(){return this.canvas_view.overlays_el},is_paused:function(){return null!=this._is_paused&&0!==this._is_paused}}),e.prototype.init_webgl=function(){var t,e,r;return t=this.canvas_view.ctx,e=o,null==e&&(o=e=document.createElement(\"canvas\"),r={premultipliedAlpha:!0},e.gl=e.getContext(\"webgl\",r)||e.getContext(\"experimental-webgl\",r)),null!=e.gl?t.glcanvas=e:b.logger.warn(\"WebGL is not supported, falling back to 2D canvas.\")},e.prototype.prepare_webgl=function(t,e){var r,o,i,n;if(o=this.canvas_view.ctx,r=this.canvas_view.get_canvas_element(),o.glcanvas)return o.glcanvas.width=r.width,o.glcanvas.height=r.height,n=o.glcanvas.gl,n.viewport(0,0,o.glcanvas.width,o.glcanvas.height),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT||n.DEPTH_BUFFER_BIT),n.enable(n.SCISSOR_TEST),i=o.glcanvas.height-t*(e[1]+e[3]),n.scissor(t*e[0],i,t*e[2],t*e[3]),n.enable(n.BLEND),n.blendFuncSeparate(n.SRC_ALPHA,n.ONE_MINUS_SRC_ALPHA,n.ONE_MINUS_DST_ALPHA,n.ONE)},e.prototype.blit_webgl=function(t){var e;if(e=this.canvas_view.ctx,e.glcanvas)return b.logger.debug(\"drawing with WebGL\"),e.restore(),e.drawImage(e.glcanvas,0,0),e.save(),e.scale(t,t),e.translate(.5,.5)},e.prototype.update_dataranges=function(){var t,e,r,o,i,n,s,a,l,c,_,p,h,d,f,m,y,g,v,w,x,k,M,j,S,O,P,A,E,z,C,N;for(n=this.model.frame,e={},y={},o=!1,k=T.values(n.x_ranges).concat(T.values(n.y_ranges)),a=0,_=k.length;a<_;a++)x=k[a],x instanceof u.DataRange1d&&\"log\"===x.scale_hint&&(o=!0);M=this.renderer_views;for(l in M)z=M[l],t=null!=(j=z.glyph)&&\"function\"==typeof j.bounds?j.bounds():void 0,null!=t&&(e[l]=t),o&&(m=null!=(S=z.glyph)&&\"function\"==typeof S.log_bounds?S.log_bounds():void 0,null!=m&&(y[l]=m));for(i=!1,s=!1,O=T.values(n.x_ranges),c=0,p=O.length;c<p;c++)C=O[c],C instanceof u.DataRange1d&&(r=\"log\"===C.scale_hint?y:e,C.update(r,0,this.model.id),C.follow&&(i=!0)),null!=C.bounds&&(s=!0);for(P=T.values(n.y_ranges),g=0,h=P.length;g<h;g++)N=P[g],N instanceof u.DataRange1d&&(r=\"log\"===N.scale_hint?y:e,N.update(r,1,this.model.id),N.follow&&(i=!0)),null!=N.bounds&&(s=!0);if(i&&s){for(b.logger.warn(\"Follow enabled so bounds are unset.\"),A=T.values(n.x_ranges),v=0,d=A.length;v<d;v++)C=A[v],C.bounds=null;for(E=T.values(n.y_ranges),w=0,f=E.length;w<f;w++)N=E[w],N.bounds=null}return this.range_update_timestamp=Date.now()},e.prototype.map_to_screen=function(t,e,r,o){return null==r&&(r=\"default\"),null==o&&(o=\"default\"),this.frame.map_to_screen(t,e,this.canvas,r,o)},e.prototype.push_state=function(t,e){var r,o;return r=(null!=(o=this.state.history[this.state.index])?o.info:void 0)||{},e=T.extend({},this._initial_state_info,r,e),this.state.history.slice(0,this.state.index+1),this.state.history.push({type:t,info:e}),this.state.index=this.state.history.length-1,this.state_changed.emit()},e.prototype.clear_state=function(){return this.state={history:[],index:-1},this.state_changed.emit()},e.prototype.can_undo=function(){return this.state.index>=0},e.prototype.can_redo=function(){return this.state.index<this.state.history.length-1},e.prototype.undo=function(){if(this.can_undo())return this.state.index-=1,this._do_state_change(this.state.index),this.state_changed.emit()},e.prototype.redo=function(){if(this.can_redo())return this.state.index+=1,\n",
" this._do_state_change(this.state.index),this.state_changed.emit()},e.prototype._do_state_change=function(t){var e,r;if(e=(null!=(r=this.state.history[t])?r.info:void 0)||this._initial_state_info,null!=e.range&&this.update_range(e.range),null!=e.selection&&this.update_selection(e.selection),null!=e.dimensions)return this.canvas_view.set_dims([e.dimensions.width,e.dimensions.height])},e.prototype.reset_dimensions=function(){return this.update_dimensions(this.canvas.initial_width,this.canvas.initial_height)},e.prototype.update_dimensions=function(t,e){return this.pause(),this.model.plot.width=t,this.model.plot.height=e,this.parent.layout(),this.unpause()},e.prototype.get_selection=function(){var t,e,r,o,i,n;for(n=[],r=this.model.plot.renderers,t=0,e=r.length;t<e;t++)o=r[t],o instanceof c.GlyphRenderer&&(i=o.data_source.selected,n[o.id]=i);return n},e.prototype.update_selection=function(t){var e,r,o,i,n,a,l;for(i=this.model.plot.renderers,l=[],r=0,o=i.length;r<o;r++)a=i[r],a instanceof c.GlyphRenderer&&(e=a.data_source,null!=t?(n=a.id,s.call(t,n)>=0?l.push(e.selected=t[a.id]):l.push(void 0)):l.push(e.selection_manager.clear()));return l},e.prototype.reset_selection=function(){return this.update_selection(null)},e.prototype._update_ranges_together=function(t){var e,r,o,i,n,s,a,l,u,c;for(c=1,e=0,o=t.length;e<o;e++)s=t[e],u=s[0],n=s[1],c=Math.min(c,this._get_weight_to_constrain_interval(u,n));if(c<1){for(l=[],r=0,i=t.length;r<i;r++)a=t[r],u=a[0],n=a[1],n.start=c*n.start+(1-c)*u.start,l.push(n.end=c*n.end+(1-c)*u.end);return l}},e.prototype._update_ranges_individually=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f,m,y;for(o=!1,i=0,s=t.length;i<s;i++)p=t[i],m=p[0],_=p[1],f=m.start>m.end,r||(y=this._get_weight_to_constrain_interval(m,_),y<1&&(_.start=y*_.start+(1-y)*m.start,_.end=y*_.end+(1-y)*m.end)),null!=m.bounds&&(u=m.bounds[0],l=m.bounds[1],c=Math.abs(_.end-_.start),f?(null!=u&&u>=_.end&&(o=!0,_.end=u,null==e&&null==r||(_.start=u+c)),null!=l&&l<=_.start&&(o=!0,_.start=l,null==e&&null==r||(_.end=l-c))):(null!=u&&u>=_.start&&(o=!0,_.start=u,null==e&&null==r||(_.end=u+c)),null!=l&&l<=_.end&&(o=!0,_.end=l,null==e&&null==r||(_.start=l-c))));if(!r||!o){for(d=[],n=0,a=t.length;n<a;n++)h=t[n],m=h[0],_=h[1],m.have_updated_interactively=!0,m.start!==_.start||m.end!==_.end?d.push(m.setv(_)):d.push(void 0);return d}},e.prototype._get_weight_to_constrain_interval=function(t,e){var r,o,i,n,s,a,l,u,c;return s=t.min_interval,o=t.max_interval,c=1,null!=t.bounds&&(u=t.bounds,n=u[0],r=u[1],null!=n&&null!=r&&(i=Math.abs(r-n),o=null!=o?Math.min(o,i):i)),null==s&&null==o||(l=Math.abs(t.end-t.start),a=Math.abs(e.end-e.start),s>0&&a<s&&(c=(l-s)/(l-a)),o>0&&a>o&&(c=(o-l)/(a-l)),c=Math.max(0,Math.min(1,c))),c},e.prototype.update_range=function(t,e,r){var o,i,n,s,a,l,u;if(this.pause(),null==t){n=this.frame.x_ranges;for(o in n)u=n[o],u.reset();s=this.frame.y_ranges;for(o in s)u=s[o],u.reset();this.update_dataranges()}else{i=[],a=this.frame.x_ranges;for(o in a)u=a[o],i.push([u,t.xrs[o]]);l=this.frame.y_ranges;for(o in l)u=l[o],i.push([u,t.yrs[o]]);r&&this._update_ranges_together(i),this._update_ranges_individually(i,e,r)}return this.unpause()},e.prototype.reset_range=function(){return this.update_range(null)},e.prototype.build_levels=function(){var t,e,r,o,i,n,s,a,l,u,c;for(l=this.model.plot.all_renderers,a=Object.keys(this.renderer_views),s=h.build_views(this.renderer_views,l,this.view_options()),u=j.difference(a,function(){var t,e,r;for(r=[],t=0,e=l.length;t<e;t++)n=l[t],r.push(n.id);return r}()),e=0,o=u.length;e<o;e++)t=u[e],delete this.levels.glyph[t];for(r=0,i=s.length;r<i;r++)c=s[r],this.levels[c.model.level][c.model.id]=c,c.connect_signals();return this},e.prototype.get_renderer_views=function(){var t,e,r,o,i;for(o=this.model.plot.renderers,i=[],t=0,e=o.length;t<e;t++)r=o[t],i.push(this.levels[r.level][r.id]);return i},e.prototype.build_tools=function(){var t,e,r,o,i,n;for(i=this.model.plot.toolbar.tools,r=h.build_views(this.tool_views,i,this.view_options()),o=[],t=0,e=r.length;t<e;t++)n=r[t],n.connect_signals(),o.push(this.ui_event_bus.register_tool(n));return o},e.prototype.connect_signals=function(){var t,r,o,i;e.__super__.connect_signals.call(this),this.connect(this.force_paint,function(t){return function(){return t.paint()}}(this)),r=this.model.frame.x_ranges;for(t in r)i=r[t],this.connect(i.change,function(){return this.request_render()});o=this.model.frame.y_ranges;for(t in o)i=o[t],this.connect(i.change,function(){return this.request_render()});return this.connect(this.model.plot.properties.renderers.change,function(t){return function(){return t.build_levels()}}(this)),this.connect(this.model.plot.toolbar.properties.tools.change,function(t){return function(){return t.build_levels(),t.build_tools()}}(this)),this.connect(this.model.plot.change,function(){return this.request_render()})},e.prototype.set_initial_range=function(){var t,e,r,o,i,n,s;t=!0,n={},r=this.frame.x_ranges;for(e in r){if(i=r[e],null==i.start||null==i.end||M.isStrictNaN(i.start+i.end)){t=!1;break}n[e]={start:i.start,end:i.end}}if(t){s={},o=this.frame.y_ranges;for(e in o){if(i=o[e],null==i.start||null==i.end||M.isStrictNaN(i.start+i.end)){t=!1;break}s[e]={start:i.start,end:i.end}}}return t?(this._initial_state_info.range=this.initial_range_info={xrs:n,yrs:s},b.logger.debug(\"initial ranges set\")):b.logger.warn(\"could not set initial ranges\")},e.prototype.update_constraints=function(){var t,e,r;this.solver.suggest_value(this.frame._width,this.canvas._width.value-1),this.solver.suggest_value(this.frame._height,this.canvas._height.value-1),e=this.renderer_views;for(t in e)r=e[t],null!=r.model.panel&&S.update_panel_constraints(r);return this.solver.update_variables()},e.prototype._layout=function(t){if(null==t&&(t=!1),this.render(),t)return this.model.plot.setv({inner_width:Math.round(this.frame._width.value),inner_height:Math.round(this.frame._height.value),layout_width:Math.round(this.canvas._width.value),layout_height:Math.round(this.canvas._height.value)},{no_change:!0}),this.request_paint()},e.prototype.has_finished=function(){var t,r,o,i;if(!e.__super__.has_finished.call(this))return!1;r=this.levels;for(t in r){o=r[t];for(t in o)if(i=o[t],!i.has_finished())return!1}return!0},e.prototype.render=function(){var t,e;return e=this.model._width.value,t=this.model._height.value,this.canvas_view.set_dims([e,t]),this.update_constraints(),this.el.style.position=\"absolute\",this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"},e.prototype.paint=function(){var t,e,r,o,i,n,s;if(!this.is_paused){b.logger.trace(\"PlotCanvas.render() for \"+this.model.id),this.canvas_view.prepare_canvas(),Date.now()-this.interactive_timestamp<this.model.plot.lod_interval?(this.lod_started||(this.model.plot.trigger_event(new f.LODStart({})),this.lod_started=!0),this.interactive=!0,o=this.model.plot.lod_timeout,setTimeout(function(t){return function(){return t.interactive&&Date.now()-t.interactive_timestamp>o&&(t.interactive=!1),t.request_render()}}(this),o)):(this.interactive=!1,this.lod_started&&(this.model.plot.trigger_event(new f.LODEnd({})),this.lod_started=!1)),n=this.renderer_views;for(r in n)if(s=n[r],null==this.range_update_timestamp||s.set_data_timestamp>this.range_update_timestamp){this.update_dataranges();break}return this.model.frame._update_scales(),t=this.canvas_view.ctx,t.pixel_ratio=i=this.canvas.pixel_ratio,t.save(),t.scale(i,i),t.translate(.5,.5),e=[this.canvas.vx_to_sx(this.frame._left.value),this.canvas.vy_to_sy(this.frame._top.value),this.frame._width.value,this.frame._height.value],this._map_hook(t,e),this._paint_empty(t,e),this.prepare_webgl(i,e),t.save(),this.visuals.outline_line.doit&&(this.visuals.outline_line.set_value(t),t.strokeRect.apply(t,e)),t.restore(),this._paint_levels(t,[\"image\",\"underlay\",\"glyph\"],e),this.blit_webgl(i),this._paint_levels(t,[\"annotation\"],e),this._paint_levels(t,[\"overlay\"]),null==this.initial_range_info&&this.set_initial_range(),t.restore(),this._has_finished?void 0:(this._has_finished=!0,this.notify_finished())}},e.prototype._paint_levels=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f,m;for(t.save(),null!=r&&\"canvas\"===this.model.plot.output_backend&&(t.beginPath(),t.rect.apply(t,r),t.clip()),i={},p=this.model.plot.renderers,o=n=0,a=p.length;n<a;o=++n)h=p[o],i[h.id]=o;for(m=function(t){return i[t.model.id]},s=0,l=e.length;s<l;s++)for(c=e[s],f=j.sortBy(T.values(this.levels[c]),m),_=0,u=f.length;_<u;_++)d=f[_],d.render();return t.restore()},e.prototype._map_hook=function(t,e){},e.prototype._paint_empty=function(t,e){if(t.clearRect(0,0,this.canvas_view.model._width.value,this.canvas_view.model._height.value),this.visuals.border_fill.doit&&(this.visuals.border_fill.set_value(t),t.fillRect(0,0,this.canvas_view.model._width.value,this.canvas_view.model._height.value),t.clearRect.apply(t,e)),this.visuals.background_fill.doit)return this.visuals.background_fill.set_value(t),t.fillRect.apply(t,e)},e.prototype.save=function(t){var e,r,o,i,n,s;return\"canvas\"===this.model.plot.output_backend?(r=this.canvas_view.get_canvas_element(),null!=r.msToBlob?(e=r.msToBlob(),window.navigator.msSaveBlob(e,t)):(i=document.createElement(\"a\"),i.href=r.toDataURL(\"image/png\"),i.download=t+\".png\",i.target=\"_blank\",i.dispatchEvent(new MouseEvent(\"click\")))):\"svg\"===this.model.plot.output_backend?(n=this.canvas_view.ctx.getSerializedSvg(!0),s=new Blob([n],{type:\"text/plain\"}),o=document.createElement(\"a\"),o.download=t+\".svg\",o.innerHTML=\"Download svg\",o.href=window.URL.createObjectURL(s),o.onclick=function(t){return document.body.removeChild(t.target)},o.style.display=\"none\",document.body.appendChild(o),o.click()):void 0},e}(g.DOMView),r.PlotCanvas=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"PlotCanvas\",e.prototype.default_view=r.PlotCanvasView,e.prototype.initialize=function(t,r){var o;return e.__super__.initialize.call(this,t,r),this.canvas=new a.Canvas({map:null!=(o=this.use_map)&&o,initial_width:this.plot.plot_width,initial_height:this.plot.plot_height,use_hidpi:this.plot.hidpi,output_backend:this.plot.output_backend}),this.frame=new l.CartesianFrame({x_range:this.plot.x_range,extra_x_ranges:this.plot.extra_x_ranges,x_scale:this.plot.x_scale,y_range:this.plot.y_range,extra_y_ranges:this.plot.extra_y_ranges,y_scale:this.plot.y_scale}),this.above_panel=new m.LayoutCanvas,this.below_panel=new m.LayoutCanvas,this.left_panel=new m.LayoutCanvas,this.right_panel=new m.LayoutCanvas,b.logger.debug(\"PlotCanvas initialized\")},e.prototype._doc_attached=function(){return this.canvas.attach_document(this.document),this.frame.attach_document(this.document),this.above_panel.attach_document(this.document),this.below_panel.attach_document(this.document),this.left_panel.attach_document(this.document),this.right_panel.attach_document(this.document),e.__super__._doc_attached.call(this),b.logger.debug(\"PlotCanvas attached to document\")},e.override({sizing_mode:\"stretch_both\"}),e.internal({plot:[x.Instance],toolbar:[x.Instance],canvas:[x.Instance],frame:[x.Instance]}),e.prototype.get_layoutable_children=function(){var t,e;return t=[this.above_panel,this.below_panel,this.left_panel,this.right_panel,this.canvas,this.frame],e=function(e){var r,o,i,n;for(n=[],r=0,o=e.length;r<o;r++)i=e[r],null!=i.panel?n.push(t.push(i.panel)):n.push(void 0);return n},e(this.plot.above),e(this.plot.below),e(this.plot.left),e(this.plot.right),t},e.prototype.get_edit_variables=function(){var t,e,r,o,i;for(e=[],i=this.get_layoutable_children(),r=0,o=i.length;r<o;r++)t=i[r],e=e.concat(t.get_edit_variables());return e},e.prototype.get_constraints=function(){var t,r,o,i,n;for(r=e.__super__.get_constraints.call(this),r=r.concat(this._get_constant_constraints()),r=r.concat(this._get_side_constraints()),n=this.get_layoutable_children(),o=0,i=n.length;o<i;o++)t=n[o],r=r.concat(t.get_constraints());return r},e.prototype._get_constant_constraints=function(){return[v.GE(this.above_panel._height,-this.plot.min_border_top),v.GE(this.below_panel._height,-this.plot.min_border_bottom),v.GE(this.left_panel._width,-this.plot.min_border_left),v.GE(this.right_panel._width,-this.plot.min_border_right),v.EQ(this.above_panel._top,[-1,this.canvas._top]),v.EQ(this.above_panel._bottom,[-1,this.frame._top]),v.EQ(this.below_panel._bottom,[-1,this.canvas._bottom]),v.EQ(this.below_panel._top,[-1,this.frame._bottom]),v.EQ(this.left_panel._left,[-1,this.canvas._left]),v.EQ(this.left_panel._right,[-1,this.frame._left]),v.EQ(this.right_panel._right,[-1,this.canvas._right]),v.EQ(this.right_panel._left,[-1,this.frame._right]),v.EQ(this.above_panel._height,[-1,this._top]),v.EQ(this.above_panel._height,[-1,this.canvas._top],this.frame._top),v.EQ(this.below_panel._height,[-1,this._height],this._bottom),v.EQ(this.below_panel._height,[-1,this.frame._bottom]),v.EQ(this.left_panel._width,[-1,this._left]),v.EQ(this.left_panel._width,[-1,this.frame._left]),v.EQ(this.right_panel._width,[-1,this._width],this._right),v.EQ(this.right_panel._width,[-1,this.canvas._right],this.frame._right)]},e.prototype._get_side_constraints=function(){var t,e,r,o,i,n,s,a,l,u,c,_;for(e=[],_=[[\"above\",this.plot.above],[\"below\",this.plot.below],[\"left\",this.plot.left],[\"right\",this.plot.right]],r=0,s=_.length;r<s;r++){for(u=_[r],c=u[0],n=u[1],i=this.frame,o=0,a=n.length;o<a;o++)l=n[o],t=function(){switch(c){case\"above\":return v.EQ(i.panel._top,[-1,l.panel._bottom]);case\"below\":return v.EQ(i.panel._bottom,[-1,l.panel._top]);case\"left\":return v.EQ(i.panel._left,[-1,l.panel._right]);case\"right\":return v.EQ(i.panel._right,[-1,l.panel._left])}}(),e.push(t),i=l;0!==n.length&&(t=function(){switch(c){case\"above\":return v.EQ(i.panel._top,[-1,this.above_panel._top]);case\"below\":return v.EQ(i.panel._bottom,[-1,this.below_panel._bottom]);case\"left\":return v.EQ(i.panel._left,[-1,this.left_panel._left]);case\"right\":return v.EQ(i.panel._right,[-1,this.right_panel._right])}}.call(this),e.push(t))}return e},e}(_.LayoutDOM)},{\"../canvas/canvas\":\"models/canvas/canvas\",\"../canvas/cartesian_frame\":\"models/canvas/cartesian_frame\",\"../layouts/layout_dom\":\"models/layouts/layout_dom\",\"../ranges/data_range1d\":\"models/ranges/data_range1d\",\"../renderers/glyph_renderer\":\"models/renderers/glyph_renderer\",\"core/bokeh_events\":\"core/bokeh_events\",\"core/build_views\":\"core/build_views\",\"core/dom_view\":\"core/dom_view\",\"core/enums\":\"core/enums\",\"core/layout/layout_canvas\":\"core/layout/layout_canvas\",\"core/layout/side_panel\":\"core/layout/side_panel\",\"core/layout/solver\":\"core/layout/solver\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/signaling\":\"core/signaling\",\"core/ui_events\":\"core/ui_events\",\"core/util/array\":\"core/util/array\",\"core/util/object\":\"core/util/object\",\"core/util/throttle\":\"core/util/throttle\",\"core/util/types\":\"core/util/types\",\"core/visuals\":\"core/visuals\"}],\"models/ranges/data_range\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./range\"),s=t(\"core/properties\");r.DataRange=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"DataRange\",e.define({names:[s.Array,[]],renderers:[s.Array,[]]}),e}(n.Range)},{\"./range\":\"models/ranges/range\",\"core/properties\":\"core/properties\"}],\"models/ranges/data_range1d\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./data_range\"),s=t(\"../renderers/glyph_renderer\"),a=t(\"core/logging\"),l=t(\"core/properties\"),u=t(\"core/util/bbox\");r.DataRange1d=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"DataRange1d\",e.define({start:[l.Number],end:[l.Number],range_padding:[l.Number,.1],range_padding_units:[l.PaddingUnits,\"percent\"],flipped:[l.Bool,!1],follow:[l.StartEnd],follow_interval:[l.Number],default_span:[l.Number,2],bounds:[l.Any],min_interval:[l.Any],max_interval:[l.Any]}),e.internal({scale_hint:[l.String,\"auto\"]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.plot_bounds={},this.have_updated_interactively=!1,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},e.getters({min:function(){return Math.min(this.start,this.end)},max:function(){return Math.max(this.start,this.end)}}),e.prototype.computed_renderers=function(){var t,e,r,o,i,n,l,u,c,_,p;if(n=this.names,_=this.renderers,0===_.length)for(c=this.plots,e=0,o=c.length;e<o;e++)l=c[e],t=l.renderers,p=function(){var e,r,o;for(o=[],e=0,r=t.length;e<r;e++)u=t[e],u instanceof s.GlyphRenderer&&o.push(u);return o}(),_=_.concat(p);for(n.length>0&&(_=function(){var t,e,r;for(r=[],t=0,e=_.length;t<e;t++)u=_[t],n.indexOf(u.name)>=0&&r.push(u);return r}()),a.logger.debug(\"computed \"+_.length+\" renderers for DataRange1d \"+this.id),r=0,i=_.length;r<i;r++)u=_[r],a.logger.trace(\" - \"+u.type+\" \"+u.id);return _},e.prototype._compute_plot_bounds=function(t,e){var r,o,i,n;for(n=u.empty(),r=0,o=t.length;r<o;r++)i=t[r],null!=e[i.id]&&(n=u.union(n,e[i.id]));return n},e.prototype._compute_min_max=function(t,e){var r,o,i,n,s,a,l;n=u.empty();for(r in t)l=t[r],n=u.union(n,l);return 0===e?(s=[n.minX,n.maxX],i=s[0],o=s[1]):(a=[n.minY,n.maxY],i=a[0],o=a[1]),[i,o]},e.prototype._compute_range=function(t,e){var r,o,i,n,s,l,u,c,_,p,h,d,f;return u=this.range_padding,null!=u&&u>0?\"log\"===this.scale_hint?((isNaN(t)||!isFinite(t)||t<=0)&&(t=isNaN(e)||!isFinite(e)||e<=0?.1:e/100,a.logger.warn(\"could not determine minimum data value for log axis, DataRange1d using value \"+t)),(isNaN(e)||!isFinite(e)||e<=0)&&(e=isNaN(t)||!isFinite(t)||t<=0?10:100*t,a.logger.warn(\"could not determine maximum data value for log axis, DataRange1d using value \"+e)),e===t?(d=this.default_span+.001,r=Math.log(t)/Math.log(10)):(\"percent\"===this.range_padding_units?(l=Math.log(t)/Math.log(10),s=Math.log(e)/Math.log(10),d=(s-l)*(1+u)):(l=Math.log(t-u)/Math.log(10),s=Math.log(e+u)/Math.log(10),d=s-l),r=(l+s)/2),c=[Math.pow(10,r-d/2),Math.pow(10,r+d/2)],f=c[0],o=c[1]):(d=e===t?this.default_span:\"percent\"===this.range_padding_units?(e-t)*(1+u):e-t+2*u,r=(e+t)/2,_=[r-d/2,r+d/2],f=_[0],o=_[1]):(p=[t,e],f=p[0],o=p[1]),n=1,this.flipped&&(h=[o,f],f=h[0],o=h[1],n=-1),i=this.follow_interval,null!=i&&Math.abs(f-o)>i&&(\"start\"===this.follow?o=f+n*i:\"end\"===this.follow&&(f=o-n*i)),[f,o]},e.prototype.update=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h;if(!this.have_updated_interactively)return p=this.computed_renderers(),this.plot_bounds[r]=this._compute_plot_bounds(p,t),u=this._compute_min_max(this.plot_bounds,e),a=u[0],s=u[1],c=this._compute_range(a,s),h=c[0],n=c[1],null!=this._initial_start&&(\"log\"===this.scale_hint?this._initial_start>0&&(h=this._initial_start):h=this._initial_start),null!=this._initial_end&&(\"log\"===this.scale_hint?this._initial_end>0&&(n=this._initial_end):n=this._initial_end),_=[this.start,this.end],i=_[0],o=_[1],h===i&&n===o||(l={},h!==i&&(l.start=h),n!==o&&(l.end=n),this.setv(l)),\"auto\"===this.bounds&&this.setv({bounds:[h,n]},{silent:!0}),this.change.emit()},e.prototype.reset=function(){return 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()},e}(n.DataRange)},{\"../renderers/glyph_renderer\":\"models/renderers/glyph_renderer\",\"./data_range\":\"models/ranges/data_range\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/bbox\":\"core/util/bbox\"}],\"models/ranges/factor_range\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./range\"),s=t(\"core/properties\");r.FactorRange=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"FactorRange\",e.define({offset:[s.Number,0],factors:[s.Array,[]],bounds:[s.Any],min_interval:[s.Any],max_interval:[s.Any]}),e.internal({_bounds_as_factors:[s.Any],start:[s.Number],end:[s.Number]}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),null!=this.bounds&&\"auto\"!==this.bounds?this.setv({_bounds_as_factors:this.bounds},{silent:!0}):this.setv({_bounds_as_factors:this.factors},{silent:!0}),this._init(),this.connect(this.properties.factors.change,function(){return this._update_factors()}),this.connect(this.properties.offset.change,function(){return this._init()})},e.getters({min:function(){return this.start},max:function(){return this.end}}),e.prototype.reset=function(){return this._init(),this.change.emit()},e.prototype._update_factors=function(){return this.setv(\"_bounds_as_factors\",this.factors,{silent:!0}),this._init()},e.prototype._init=function(){var t,e,r;if(e=this.factors,null!=this.bounds&&\"auto\"!==this.bounds&&(e=this._bounds_as_factors,this.setv({factors:e},{silent:!0})),r=.5+this.offset,t=e.length+r,this.setv({start:r,end:t},{silent:!0}),null!=this.bounds)return this.setv({bounds:[r,t]},{silent:!0})},e}(n.Range)},{\"./range\":\"models/ranges/range\",\"core/properties\":\"core/properties\"}],\"models/ranges/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./data_range\");r.DataRange=o.DataRange;var i=t(\"./data_range1d\");r.DataRange1d=i.DataRange1d;var n=t(\"./factor_range\");r.FactorRange=n.FactorRange;var s=t(\"./range\");r.Range=s.Range;var a=t(\"./range1d\");r.Range1d=a.Range1d},{\"./data_range\":\"models/ranges/data_range\",\"./data_range1d\":\"models/ranges/data_range1d\",\"./factor_range\":\"models/ranges/factor_range\",\"./range\":\"models/ranges/range\",\"./range1d\":\"models/ranges/range1d\"}],\"models/ranges/range\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\"),s=t(\"core/properties\");r.Range=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Range\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.change,function(){var t;return null!=(t=this.callback)?t.execute(this):void 0})},e.define({callback:[s.Instance]}),e.internal({plots:[s.Array,[]]}),e.prototype.reset=function(){return this.change.emit()},e}(n.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\"}],\"models/ranges/range1d\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./range\"),s=t(\"core/properties\");r.Range1d=function(t){function e(){var t,r;return this instanceof e?e.__super__.constructor.apply(this,arguments):(r=arguments[0],t=arguments[1],new e({start:r,end:t}))}return o(e,t),e.prototype.type=\"Range1d\",e.define({start:[s.Number,0],end:[s.Number,1],bounds:[s.Any],min_interval:[s.Any],max_interval:[s.Any]}),e.prototype._set_auto_bounds=function(){var t,e;if(\"auto\"===this.bounds)return e=Math.min(this._initial_start,this._initial_end),t=Math.max(this._initial_start,this._initial_end),this.setv({bounds:[e,t]},{silent:!0})},e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._initial_start=this.start,this._initial_end=this.end,this._set_auto_bounds()},e.getters({min:function(){return Math.min(this.start,this.end)},max:function(){return Math.max(this.start,this.end)}}),e.prototype.reset=function(){return this._set_auto_bounds(),this.start!==this._initial_start||this.end!==this._initial_end?this.setv({start:this._initial_start,end:this._initial_end}):this.change.emit()},e}(n.Range)},{\"./range\":\"models/ranges/range\",\"core/properties\":\"core/properties\"}],\"models/renderers/glyph_renderer\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(\"./renderer\"),a=t(\"../sources/remote_data_source\"),l=t(\"core/logging\"),u=t(\"core/properties\"),c=t(\"core/util/array\"),_=t(\"core/util/object\");r.GlyphRendererView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){var r,o,i,s,l,u,c,p,h,d;if(e.__super__.initialize.call(this,t),r=this.model.glyph,s=n.call(r.mixins,\"fill\")>=0,l=n.call(r.mixins,\"line\")>=0,i=_.clone(r.attributes),delete i.id,c=function(t){var e;return e=_.clone(i),s&&_.extend(e,t.fill),l&&_.extend(e,t.line),new r.constructor(e)},this.glyph=this.build_glyph_view(r),d=this.model.selection_glyph,null==d?d=c({fill:{},line:{}}):\"auto\"===d&&(d=c(this.model.selection_defaults)),this.selection_glyph=this.build_glyph_view(d),h=this.model.nonselection_glyph,null==h?h=c({fill:{},line:{}}):\"auto\"===h&&(h=c(this.model.nonselection_defaults)),this.nonselection_glyph=this.build_glyph_view(h),u=this.model.hover_glyph,null!=u&&(this.hover_glyph=this.build_glyph_view(u)),p=this.model.muted_glyph,null!=p&&(this.muted_glyph=this.build_glyph_view(p)),o=c(this.model.decimated_defaults),this.decimated_glyph=this.build_glyph_view(o),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),this.model.data_source instanceof a.RemoteDataSource)return this.model.data_source.setup(this.plot_view,this.glyph)},e.getters({xmapper:function(){return log.warning(\"xmapper attr is deprecated, use xscale\"),this.xscale},ymapper:function(){return log.warning(\"ymapper attr is deprecated, use yscale\"),this.yscale}}),e.prototype.build_glyph_view=function(t){return new t.default_view({model:t,renderer:this,plot_view:this.plot_view,parent:this})},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()}),this.connect(this.model.data_source.change,function(){return this.set_data()}),this.connect(this.model.data_source.streaming,function(){return this.set_data()}),this.connect(this.model.data_source.patching,function(t){return this.set_data(!0,t)}),this.connect(this.model.data_source.select,function(){return this.request_render()}),null!=this.hover_glyph&&this.connect(this.model.data_source.inspect,function(){return this.request_render()}),this.connect(this.model.glyph.transformchange,function(){return this.set_data()}),this.connect(this.model.glyph.propchange,function(){return this.glyph.set_visuals(this.model.data_source),this.request_render()})},e.prototype.have_selection_glyphs=function(){return null!=this.selection_glyph&&null!=this.nonselection_glyph},e.prototype.set_data=function(t,e){var r,o,i,n,s,a,u,c,_;for(null==t&&(t=!0),_=Date.now(),c=this.model.data_source,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(c,e),this.glyph.set_visuals(c),this.decimated_glyph.set_visuals(c),this.have_selection_glyphs()&&(this.selection_glyph.set_visuals(c),this.nonselection_glyph.set_visuals(c)),null!=this.hover_glyph&&this.hover_glyph.set_visuals(c),null!=this.muted_glyph&&this.muted_glyph.set_visuals(c),n=c.get_length(),null==n&&(n=1),this.all_indices=function(){u=[];for(var t=0;0<=n?t<n:t>n;0<=n?t++:t--)u.push(t);return u}.apply(this),s=this.plot_model.plot.lod_factor,this.decimated=[],o=i=0,a=Math.floor(this.all_indices.length/s);0<=a?i<a:i>a;o=0<=a?++i:--i)this.decimated.push(this.all_indices[o*s]);if(r=Date.now()-_,l.logger.debug(this.glyph.model.type+\" GlyphRenderer (\"+this.model.id+\"): set_data finished in \"+r+\"ms\"),this.set_data_timestamp=Date.now(),t)return this.request_render()},e.prototype.render=function(){var t,e,r,o,i,n,s,a,u,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S;if(this.model.visible){if(k=Date.now(),s=this.glyph.glglyph,M=Date.now(),this.glyph.map_data(),e=Date.now()-k,j=Date.now(),_=this.glyph.mask_data(this.all_indices),r=Date.now()-j,t=this.plot_view.canvas_view.ctx,t.save(),b=this.model.data_source.selected,b=b&&0!==b.length?b[\"0d\"].glyph?_:b[\"1d\"].indices.length>0?b[\"1d\"].indices:[]:[],p=this.model.data_source.inspected,p=p&&0!==p.length?p[\"0d\"].glyph?_:p[\"1d\"].indices.length>0?p[\"1d\"].indices:[]:[],y=this.plot_model.plot.lod_threshold,this.plot_view.interactive&&!s&&null!=y&&this.all_indices.length>y?(_=this.decimated,a=this.decimated_glyph,v=this.decimated_glyph,x=this.selection_glyph):(a=this.model.muted&&null!=this.muted_glyph?this.muted_glyph:this.glyph,v=this.nonselection_glyph,x=this.selection_glyph),null!=this.hover_glyph&&p.length&&(_=c.difference(_,p)),b.length&&this.have_selection_glyphs()){for(S=Date.now(),w={},h=0,f=b.length;h<f;h++)u=b[h],w[u]=!0;for(b=new Array,g=new Array,d=0,m=_.length;d<m;d++)u=_[d],null!=w[u]?b.push(u):g.push(u);i=Date.now()-S,T=Date.now(),v.render(t,g,this.glyph),x.render(t,b,this.glyph),null!=this.hover_glyph&&this.hover_glyph.render(t,p,this.glyph),o=Date.now()-T}else T=Date.now(),a.render(t,_,this.glyph),this.hover_glyph&&p.length&&this.hover_glyph.render(t,p,this.glyph),o=Date.now()-T;return this.last_dtrender=o,n=Date.now()-k,l.logger.debug(this.glyph.model.type+\" GlyphRenderer (\"+this.model.id+\"): render finished in \"+n+\"ms\"),l.logger.trace(\" - map_data finished in : \"+e+\"ms\"),null!=r&&l.logger.trace(\" - mask_data finished in : \"+r+\"ms\"),null!=i&&l.logger.trace(\" - selection mask finished in : \"+i+\"ms\"),l.logger.trace(\" - glyph renders finished in : \"+o+\"ms\"),t.restore()}},e.prototype.map_to_screen=function(t,e){return this.plot_view.map_to_screen(t,e,this.model.x_range_name,this.model.y_range_name)},e.prototype.draw_legend=function(t,e,r,o,i,n,s){var a;return a=this.model.get_reference_point(n,s),this.glyph.draw_legend_for_index(t,e,r,o,i,a)},e.prototype.hit_test=function(t){return this.model.hit_test_helper(t,this.glyph)},e}(s.RendererView),r.GlyphRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.GlyphRendererView,e.prototype.type=\"GlyphRenderer\",e.prototype.get_reference_point=function(t,e){var r,o,i;return i=0,null!=t&&null!=this.data_source.get_column&&(r=this.data_source.get_column(t),r&&(o=r.indexOf(e),o>0&&(i=o))),i},e.prototype.hit_test_helper=function(t,e){return this.visible?e.hit_test(t):null},e.define({x_range_name:[u.String,\"default\"],y_range_name:[u.String,\"default\"],data_source:[u.Instance],glyph:[u.Instance],hover_glyph:[u.Instance],nonselection_glyph:[u.Any,\"auto\"],selection_glyph:[u.Any,\"auto\"],muted_glyph:[u.Instance],muted:[u.Bool,!1]}),e.override({level:\"glyph\"}),e.prototype.selection_defaults={fill:{},line:{}},e.prototype.decimated_defaults={fill:{fill_alpha:.3,fill_color:\"grey\"},line:{line_alpha:.3,line_color:\"grey\"}},e.prototype.nonselection_defaults={\n",
" fill:{fill_alpha:.2,line_alpha:.2},line:{}},e}(s.Renderer)},{\"../sources/remote_data_source\":\"models/sources/remote_data_source\",\"./renderer\":\"models/renderers/renderer\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/object\":\"core/util/object\"}],\"models/renderers/guide_renderer\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./renderer\"),s=t(\"core/properties\");r.GuideRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"GuideRenderer\",e.define({plot:[s.Instance]}),e.override({level:\"overlay\"}),e}(n.Renderer)},{\"./renderer\":\"models/renderers/renderer\",\"core/properties\":\"core/properties\"}],\"models/renderers/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./glyph_renderer\");r.GlyphRenderer=o.GlyphRenderer;var i=t(\"./guide_renderer\");r.GuideRenderer=i.GuideRenderer;var n=t(\"./renderer\");r.Renderer=n.Renderer},{\"./glyph_renderer\":\"models/renderers/glyph_renderer\",\"./guide_renderer\":\"models/renderers/guide_renderer\",\"./renderer\":\"models/renderers/renderer\"}],\"models/renderers/renderer\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/dom_view\"),s=t(\"core/visuals\"),a=t(\"core/properties\"),l=t(\"core/util/projections\"),u=t(\"core/util/object\"),c=t(\"../../model\");r.RendererView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view=t.plot_view,this.visuals=new s.Visuals(this.model),this._has_finished=!0},e.getters({plot_model:function(){return this.plot_view.model}}),e.prototype.request_render=function(){return this.plot_view.request_render()},e.prototype.set_data=function(t){var e,r,o;if(e=this.model.materialize_dataspecs(t),u.extend(this,e),this.plot_model.use_map&&(null!=this._x&&(r=l.project_xy(this._x,this._y),this._x=r[0],this._y=r[1]),null!=this._xs))return o=l.project_xsys(this._xs,this._ys),this._xs=o[0],this._ys=o[1],o},e.prototype.map_to_screen=function(t,e){return this.plot_view.map_to_screen(t,e,this.model.x_range_name,this.model.y_range_name)},e}(n.DOMView),r.Renderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Renderer\",e.define({level:[a.RenderLevel,null],visible:[a.Bool,!0]}),e}(c.Model)},{\"../../model\":\"model\",\"core/dom_view\":\"core/dom_view\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\",\"core/util/projections\":\"core/util/projections\",\"core/visuals\":\"core/visuals\"}],\"models/scales/categorical_scale\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./linear_scale\"),s=t(\"core/util/types\");r.CategoricalScale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"CategoricalScale\",e.prototype.compute=function(t,r){var o,i,n,a,l,u;return null==r&&(r=!1),s.isNumber(t)?r?t:e.__super__.compute.call(this,t):(a=this.source_range,i=a.factors,t.indexOf(\":\")>=0?(l=t.split(\":\"),o=l[0],n=l[1],n=parseFloat(n),u=i.indexOf(o)+.5+a.offset+n):u=i.indexOf(t)+1+a.offset,r?u:e.__super__.compute.call(this,u))},e.prototype.v_compute=function(t,r){var o,i,n,a,l,u,c,_,p,h;if(null==r&&(r=!1),s.isNumber(t[0]))return r?t:e.__super__.v_compute.call(this,t);for(u=this.source_range,i=u.factors,p=Array(t.length),n=a=0,c=t.length;0<=c?a<c:a>c;n=0<=c?++a:--a)h=t[n],h.indexOf(\":\")>=0?(_=h.split(\":\"),o=_[0],l=_[1],l=parseFloat(l),p[n]=i.indexOf(o)+.5+u.offset+l):p[n]=i.indexOf(h)+1+u.offset;return r?p:e.__super__.v_compute.call(this,p)},e.prototype.invert=function(t,r){var o,i;return null==r&&(r=!1),t=e.__super__.invert.call(this,t),r?t:(i=this.source_range,o=i.factors,o[Math.floor(t-.5-i.offset)])},e.prototype.v_invert=function(t,r){var o,i,n,s,a,l,u,c,_;for(null==r&&(r=!1),_=e.__super__.v_invert.call(this,t),i=n=0,l=_.length;0<=l?n<l:n>l;i=0<=l?++n:--n)_[i]=_[i];if(r)return _;for(c=Array(_),a=this.source_range,o=a.factors,i=s=0,u=t.length;0<=u?s<u:s>u;i=0<=u?++s:--s)c[i]=o[Math.floor(_[i]-.5-a.offset)];return c},e}(n.LinearScale)},{\"./linear_scale\":\"models/scales/linear_scale\",\"core/util/types\":\"core/util/types\"}],\"models/scales/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./categorical_scale\");r.CategoricalScale=o.CategoricalScale;var i=t(\"./linear_scale\");r.LinearScale=i.LinearScale;var n=t(\"./log_scale\");r.LogScale=n.LogScale;var s=t(\"./scale\");r.Scale=s.Scale},{\"./categorical_scale\":\"models/scales/categorical_scale\",\"./linear_scale\":\"models/scales/linear_scale\",\"./log_scale\":\"models/scales/log_scale\",\"./scale\":\"models/scales/scale\"}],\"models/scales/linear_scale\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./scale\"),s=t(\"core/properties\");r.LinearScale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LinearScale\",e.prototype.compute=function(t){var e,r,o;return o=this._compute_state(),e=o[0],r=o[1],e*t+r},e.prototype.v_compute=function(t){var e,r,o,i,n,s,a,l;for(s=this._compute_state(),e=s[0],n=s[1],a=new Float64Array(t.length),o=r=0,i=t.length;r<i;o=++r)l=t[o],a[o]=e*l+n;return a},e.prototype.invert=function(t){var e,r,o;return o=this._compute_state(),e=o[0],r=o[1],(t-r)/e},e.prototype.v_invert=function(t){var e,r,o,i,n,s,a,l;for(s=this._compute_state(),e=s[0],n=s[1],a=new Float64Array(t.length),o=r=0,i=t.length;r<i;o=++r)l=t[o],a[o]=(l-n)/e;return a},e.prototype._compute_state=function(){var t,e,r,o,i,n;return o=this.source_range.start,r=this.source_range.end,n=this.target_range.start,i=this.target_range.end,t=(i-n)/(r-o),e=-(t*o)+n,[t,e]},e.internal({source_range:[s.Any],target_range:[s.Any]}),e}(n.Scale)},{\"./scale\":\"models/scales/scale\",\"core/properties\":\"core/properties\"}],\"models/scales/log_scale\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./scale\"),s=t(\"core/properties\");r.LogScale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LogScale\",e.prototype.compute=function(t){var e,r,o,i,n,s,a;return s=this._compute_state(),r=s[0],n=s[1],o=s[2],i=s[3],0===o?a=0:(e=(Math.log(t)-i)/o,a=isFinite(e)?e*r+n:NaN),a},e.prototype.v_compute=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h;if(u=this._compute_state(),r=u[0],l=u[1],i=u[2],n=u[3],p=new Float64Array(t.length),0===i)for(o=s=0,c=t.length;0<=c?s<c:s>c;o=0<=c?++s:--s)p[o]=0;else for(o=a=0,_=t.length;0<=_?a<_:a>_;o=0<=_?++a:--a)e=(Math.log(t[o])-n)/i,h=isFinite(e)?e*r+l:NaN,p[o]=h;return p},e.prototype.invert=function(t){var e,r,o,i,n,s;return n=this._compute_state(),e=n[0],i=n[1],r=n[2],o=n[3],s=(t-i)/e,Math.exp(r*s+o)},e.prototype.v_invert=function(t){var e,r,o,i,n,s,a,l,u,c;for(a=this._compute_state(),e=a[0],s=a[1],o=a[2],i=a[3],u=new Float64Array(t.length),r=n=0,l=t.length;0<=l?n<l:n>l;r=0<=l?++n:--n)c=(t[r]-s)/e,u[r]=Math.exp(o*c+i);return u},e.prototype._get_safe_factor=function(t,e){var r,o,i,n;return n=t<0?0:t,r=e<0?0:e,n===r&&(0===n?(i=[1,10],n=i[0],r=i[1]):(o=Math.log(n)/Math.log(10),n=Math.pow(10,Math.floor(o)),r=Math.ceil(o)!==Math.floor(o)?Math.pow(10,Math.ceil(o)):Math.pow(10,Math.ceil(o)+1))),[n,r]},e.prototype._compute_state=function(){var t,e,r,o,i,n,s,a,l,u,c,_;return l=this.source_range.start,a=this.source_range.end,_=this.target_range.start,c=this.target_range.end,s=c-_,n=this._get_safe_factor(l,a),u=n[0],t=n[1],0===u?(r=Math.log(t),o=0):(r=Math.log(t)-Math.log(u),o=Math.log(u)),e=s,i=_,[e,i,r,o]},e.internal({source_range:[s.Any],target_range:[s.Any]}),e}(n.Scale)},{\"./scale\":\"models/scales/scale\",\"core/properties\":\"core/properties\"}],\"models/scales/scale\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].slice,s=t(\"../transforms\");r.Scale=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.map_to_target=function(){var t,e;return e=arguments[0],t=2<=arguments.length?n.call(arguments,1):[],this.compute.apply(this,[e].concat(n.call(t)))},e.prototype.v_map_to_target=function(){var t,e;return e=arguments[0],t=2<=arguments.length?n.call(arguments,1):[],this.v_compute.apply(this,[e].concat(n.call(t)))},e.prototype.map_from_target=function(t){return this.invert(t)},e.prototype.v_map_from_target=function(t){return this.v_invert(t)},e}(s.Transform)},{\"../transforms\":\"models/transforms/index\"}],\"models/sources/ajax_data_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./remote_data_source\"),a=t(\"core/logging\"),l=t(\"core/properties\");r.AjaxDataSource=function(t){function e(){return this.get_data=o(this.get_data,this),this.setup=o(this.setup,this),this.destroy=o(this.destroy,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type=\"AjaxDataSource\",e.define({mode:[l.String,\"replace\"],content_type:[l.String,\"application/json\"],http_headers:[l.Any,{}],max_size:[l.Number],method:[l.String,\"POST\"],if_modified:[l.Bool,!1]}),e.prototype.destroy=function(){if(null!=this.interval)return clearInterval(this.interval)},e.prototype.setup=function(t,e){if(this.pv=t,this.get_data(this.mode),this.polling_interval)return this.interval=setInterval(this.get_data,this.polling_interval,this.mode,this.max_size,this.if_modified)},e.prototype.get_data=function(t,e,r){var o,i,n,s;null==e&&(e=0),null==r&&(r=!1),s=new XMLHttpRequest,s.open(this.method,this.data_url,!0),s.withCredentials=!1,s.setRequestHeader(\"Content-Type\",this.content_type),i=this.http_headers;for(o in i)n=i[o],s.setRequestHeader(o,n);return s.addEventListener(\"load\",function(r){return function(){var o,i,n,a,l,u;if(200===s.status)switch(i=JSON.parse(s.responseText),t){case\"replace\":return r.data=i;case\"append\":for(l=r.data,u=r.columns(),n=0,a=u.length;n<a;n++)o=u[n],i[o]=l[o].concat(i[o]).slice(-e);return r.data=i}}}(this)),s.addEventListener(\"error\",function(t){return function(){return a.logger.error(\"Failed to fetch JSON from \"+t.data_url+\" with code \"+s.status)}}(this)),s.send(),null},e}(s.RemoteDataSource)},{\"./remote_data_source\":\"models/sources/remote_data_source\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/sources/column_data_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./columnar_data_source\"),s=t(\"core/has_props\"),a=t(\"core/properties\"),l=t(\"core/util/data_structures\"),u=t(\"core/util/serialization\"),c=t(\"core/util/types\");r.concat_typed_arrays=function(t,e){var r;return r=new t.constructor(t.length+e.length),r.set(t,0),r.set(e,t.length),r},r.stream_to_column=function(t,e,o){var i,n,s,a,l,u,c,_,p,h;if(null!=t.concat)return t=t.concat(e),t.length>o&&(t=t.slice(-o)),t;if(h=t.length+e.length,null!=o&&h>o){for(_=h-o,i=t.length,t.length<o&&(p=new t.constructor(o),p.set(t,0),t=p),n=s=l=_,u=i;l<=u?s<u:s>u;n=l<=u?++s:--s)t[n-_]=t[n];for(n=a=0,c=e.length;0<=c?a<c:a>c;n=0<=c?++a:--a)t[n+(i-_)]=e[n];return t}return p=new t.constructor(e),r.concat_typed_arrays(t,p)},r.slice=function(t,e){var r,o,i,n,s,a,l;return c.isObject(t)?[null!=(r=t.start)?r:0,null!=(o=t.stop)?o:e,null!=(i=t.step)?i:1]:(n=[t,t+1,1],s=n[0],l=n[1],a=n[2],n)},r.patch_to_column=function(t,e,o){var i,n,s,a,u,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C;for(w=new l.Set,x=!1,y=0,g=e.length;y<g;y++)for(k=e[y],s=k[0],C=k[1],c.isArray(s)?(w.push(s[0]),z=o[s[0]],p=t[s[0]]):(c.isNumber(s)?(C=[C],w.push(s)):x=!0,s=[0,0,s],z=[1,t.length],p=t),2===s.length&&(z=[1,z[0]],s=[s[0],0,s[1]]),i=0,M=r.slice(s[1],z[0]),a=M[0],_=M[1],u=M[2],j=r.slice(s[2],z[1]),d=j[0],m=j[1],f=j[2],n=v=T=a,S=_,O=u;O>0?v<S:v>S;n=v+=O)for(h=b=P=d,A=m,E=f;E>0?b<A:b>A;h=b+=E)x&&w.push(h),p[n*z[1]+h]=C[i],i++;return w},r.ColumnDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ColumnDataSource\",e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),r=u.decode_column_data(this.data),this.data=r[0],this._shapes=r[1],r},e.define({data:[a.Any,{}]}),e.prototype.attributes_as_json=function(t,r){var o,n,s,a;null==t&&(t=!0),null==r&&(r=e._value_to_json),o={},s=this.serializable_attributes();for(n in s)i.call(s,n)&&(a=s[n],\"data\"===n&&(a=u.encode_column_data(a,this._shapes)),t?o[n]=a:n in this._set_after_defaults&&(o[n]=a));return r(\"attributes\",o,this)},e._value_to_json=function(t,e,r){return c.isObject(e)&&\"data\"===t?u.encode_column_data(e,r._shapes):s.HasProps._value_to_json(t,e,r)},e.prototype.stream=function(t,e){var o,i,n;o=this.data;for(i in t)n=t[i],o[i]=r.stream_to_column(o[i],t[i],e);return this.setv(\"data\",o,{silent:!0}),this.streaming.emit()},e.prototype.patch=function(t){var e,o,i,n;e=this.data,n=new l.Set;for(o in t)i=t[o],n=n.union(r.patch_to_column(e[o],i,this._shapes[o]));return this.setv(\"data\",e,{silent:!0}),this.patching.emit(n.values)},e}(n.ColumnarDataSource)},{\"./columnar_data_source\":\"models/sources/columnar_data_source\",\"core/has_props\":\"core/has_props\",\"core/properties\":\"core/properties\",\"core/util/data_structures\":\"core/util/data_structures\",\"core/util/serialization\":\"core/util/serialization\",\"core/util/types\":\"core/util/types\"}],\"models/sources/columnar_data_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./data_source\"),s=t(\"core/signaling\"),a=t(\"core/logging\"),l=t(\"core/selection_manager\"),u=t(\"core/properties\"),c=t(\"core/util/array\");r.ColumnarDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ColumnarDataSource\",e.define({column_names:[u.Array,[]]}),e.internal({selection_manager:[u.Instance,function(t){return new l.SelectionManager({source:t})}],inspected:[u.Any],_shapes:[u.Any,{}]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.select=new s.Signal(this,\"select\"),this.inspect=new s.Signal(this,\"inspect\"),this.streaming=new s.Signal(this,\"streaming\"),this.patching=new s.Signal(this,\"patching\")},e.prototype.get_column=function(t){var e;return null!=(e=this.data[t])?e:null},e.prototype.columns=function(){return Object.keys(this.data)},e.prototype.get_length=function(t){var e,r,o,i;switch(null==t&&(t=!0),r=c.uniq(function(){var t,r;t=this.data,r=[];for(e in t)i=t[e],r.push(i.length);return r}.call(this)),r.length){case 0:return null;case 1:return r[0];default:if(o=\"data source has columns of inconsistent lengths\",t)return a.logger.warn(o),r.sort()[0];throw new Error(o)}},e}(n.DataSource)},{\"./data_source\":\"models/sources/data_source\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/selection_manager\":\"core/selection_manager\",\"core/signaling\":\"core/signaling\",\"core/util/array\":\"core/util/array\"}],\"models/sources/data_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\"),s=t(\"core/hittest\"),a=t(\"core/properties\"),l=t(\"core/util/types\");r.DataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"DataSource\",e.define({selected:[a.Any,s.create_hit_test_result()],callback:[a.Any]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.properties.selected.change,function(t){return function(){var e;if(e=t.callback,null!=e)return l.isFunction(e)?e(t):e.execute(t)}}(this))},e}(n.Model)},{\"../../model\":\"model\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/sources/geojson_data_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./columnar_data_source\"),s=t(\"core/logging\"),a=t(\"core/properties\");r.GeoJSONDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"GeoJSONDataSource\",e.define({geojson:[a.Any]}),e.internal({data:[a.Any,{}]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this._update_data(),this.connect(this.properties.geojson.change,function(t){return function(){return t._update_data()}}(this))},e.prototype._update_data=function(){return this.data=this.geojson_to_column_data()},e.prototype._get_new_list_array=function(t){var e,r,o,i;for(i=[],e=r=0,o=t;0<=o?r<o:r>o;e=0<=o?++r:--r)i.push([]);return i},e.prototype._get_new_nan_array=function(t){var e,r,o,i;for(i=[],e=r=0,o=t;0<=o?r<o:r>o;e=0<=o?++r:--r)i.push(NaN);return i},e.prototype._flatten_function=function(t,e){return t.concat([[NaN,NaN,NaN]]).concat(e)},e.prototype._add_properties=function(t,e,r,o){var i,n;n=[];for(i in t.properties)e.hasOwnProperty(i)||(e[i]=this._get_new_nan_array(o)),n.push(e[i][r]=t.properties[i]);return n},e.prototype._add_geometry=function(t,e,r){var o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A;switch(t.type){case\"Point\":return i=t.coordinates,e.x[r]=i[0],e.y[r]=i[1],e.z[r]=null!=(w=i[2])?w:NaN;case\"LineString\":for(o=t.coordinates,S=[],u=c=0,p=o.length;c<p;u=++c)i=o[u],e.xs[r][u]=i[0],e.ys[r][u]=i[1],S.push(e.zs[r][u]=null!=(x=i[2])?x:NaN);return S;case\"Polygon\":for(t.coordinates.length>1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),n=t.coordinates[0],O=[],u=_=0,h=n.length;_<h;u=++_)i=n[u],e.xs[r][u]=i[0],e.ys[r][u]=i[1],O.push(e.zs[r][u]=null!=(k=i[2])?k:NaN);return O;case\"MultiPoint\":return s.logger.warn(\"MultiPoint not supported in Bokeh\");case\"MultiLineString\":for(l=t.coordinates.reduce(this._flatten_function),P=[],u=y=0,d=l.length;y<d;u=++y)i=l[u],e.xs[r][u]=i[0],e.ys[r][u]=i[1],P.push(e.zs[r][u]=null!=(M=i[2])?M:NaN);return P;case\"MultiPolygon\":for(a=[],j=t.coordinates,g=0,f=j.length;g<f;g++)b=j[g],b.length>1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),a.push(b[0]);for(l=a.reduce(this._flatten_function),A=[],u=v=0,m=l.length;v<m;u=++v)i=l[u],e.xs[r][u]=i[0],e.ys[r][u]=i[1],A.push(e.zs[r][u]=null!=(T=i[2])?T:NaN);return A;default:throw new Error(\"Invalid type \"+t.type)}},e.prototype._get_items_length=function(t){var e,r,o,i,n,s,a,l,u,c,_;for(e=0,i=a=0,u=t.length;a<u;i=++a)if(n=t[i],o=\"Feature\"===n.type?n.geometry:n,\"GeometryCollection\"===o.type)for(_=o.geometries,s=l=0,c=_.length;l<c;s=++l)r=_[s],e+=1;else e+=1;return e},e.prototype.geojson_to_column_data=function(){var t,e,r,o,i,n,s,a,l,u,c,_,p,h,d,f;if(o=JSON.parse(this.geojson),\"GeometryCollection\"!==(d=o.type)&&\"FeatureCollection\"!==d)throw new Error(\"Bokeh only supports type GeometryCollection and FeatureCollection at top level\");if(\"GeometryCollection\"===o.type){if(null==o.geometries)throw new Error(\"No geometries found in GeometryCollection\");if(0===o.geometries.length)throw new Error(\"geojson.geometries must have one or more items\");l=o.geometries}if(\"FeatureCollection\"===o.type){if(null==o.features)throw new Error(\"No features found in FeaturesCollection\");if(0===o.features.length)throw new Error(\"geojson.features must have one or more items\");l=o.features}for(a=this._get_items_length(l),e={x:this._get_new_nan_array(a),y:this._get_new_nan_array(a),z:this._get_new_nan_array(a),xs:this._get_new_list_array(a),ys:this._get_new_list_array(a),zs:this._get_new_list_array(a)},t=0,n=c=0,p=l.length;c<p;n=++c)if(s=l[n],i=\"Feature\"===s.type?s.geometry:s,\"GeometryCollection\"===i.type)for(f=i.geometries,u=_=0,h=f.length;_<h;u=++_)r=f[u],this._add_geometry(r,e,t),\"Feature\"===s.type&&this._add_properties(s,e,t,a),t+=1;else this._add_geometry(i,e,t),\"Feature\"===s.type&&this._add_properties(s,e,t,a),t+=1;return e},e}(n.ColumnarDataSource)},{\"./columnar_data_source\":\"models/sources/columnar_data_source\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/sources/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./ajax_data_source\");r.AjaxDataSource=o.AjaxDataSource;var i=t(\"./column_data_source\");r.ColumnDataSource=i.ColumnDataSource;var n=t(\"./columnar_data_source\");r.ColumnarDataSource=n.ColumnarDataSource;var s=t(\"./data_source\");r.DataSource=s.DataSource;var a=t(\"./geojson_data_source\");r.GeoJSONDataSource=a.GeoJSONDataSource;var l=t(\"./remote_data_source\");r.RemoteDataSource=l.RemoteDataSource},{\"./ajax_data_source\":\"models/sources/ajax_data_source\",\"./column_data_source\":\"models/sources/column_data_source\",\"./columnar_data_source\":\"models/sources/columnar_data_source\",\"./data_source\":\"models/sources/data_source\",\"./geojson_data_source\":\"models/sources/geojson_data_source\",\"./remote_data_source\":\"models/sources/remote_data_source\"}],\"models/sources/remote_data_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./column_data_source\"),s=t(\"core/properties\");r.RemoteDataSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"RemoteDataSource\",e.define({data_url:[s.String],polling_interval:[s.Number]}),e}(n.ColumnDataSource)},{\"./column_data_source\":\"models/sources/column_data_source\",\"core/properties\":\"core/properties\"}],\"models/tickers/adaptive_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n=function(t,e){function r(){this.constructor=t}for(var o in e)s.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=[].slice,l=t(\"./continuous_ticker\"),u=t(\"core/properties\"),c=t(\"core/util/array\");o=function(t,e,r){return Math.max(e,Math.min(r,t))},i=function(t,e){return null==e&&(e=Math.E),Math.log(t)/Math.log(e)},r.AdaptiveTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"AdaptiveTicker\",e.define({base:[u.Number,10],mantissas:[u.Array,[1,2,5]],min_interval:[u.Number,0],max_interval:[u.Number]}),e.prototype.initialize=function(t,r){var o,i;return e.__super__.initialize.call(this,t,r),o=c.nth(this.mantissas,-1)/this.base,i=c.nth(this.mantissas,0)*this.base,this.extended_mantissas=[o].concat(a.call(this.mantissas),[i]),this.base_factor=0===this.get_min_interval()?1:this.get_min_interval()},e.prototype.get_interval=function(t,e,r){var n,s,a,l,u,_,p,h,d;return a=e-t,u=this.get_ideal_interval(t,e,r),d=Math.floor(i(u/this.base_factor,this.base)),_=Math.pow(this.base,d)*this.base_factor,p=u/_,s=this.extended_mantissas,l=s.map(function(t){return Math.abs(r-a/(t*_))}),n=s[c.argmin(l)],h=n*_,o(h,this.get_min_interval(),this.get_max_interval())},e}(l.ContinuousTicker)},{\"./continuous_ticker\":\"models/tickers/continuous_ticker\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/tickers/basic_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./adaptive_ticker\");r.BasicTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"BasicTicker\",e}(n.AdaptiveTicker)},{\"./adaptive_ticker\":\"models/tickers/adaptive_ticker\"}],\"models/tickers/categorical_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./ticker\");r.CategoricalTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"CategoricalTicker\",e.prototype.get_ticks=function(t,e,r,o,i){var n,s,a,l,u,c,_;for(n=i.desired_n_ticks,c=[],s=r.factors,a=u=0,_=s.length;0<=_?u<_:u>_;a=0<=_?++u:--u)l=a+r.offset,l+1>t&&l+1<e&&c.push(s[a]);return{major:c,minor:[]}},e}(n.Ticker)},{\"./ticker\":\"models/tickers/ticker\"}],\"models/tickers/composite_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./continuous_ticker\"),s=t(\"core/properties\"),a=t(\"core/util/array\"),l=t(\"core/util/object\");r.CompositeTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"CompositeTicker\",e.define({tickers:[s.Array,[]]}),e.getters({min_intervals:function(){var t,e,r,o,i;for(r=this.tickers,o=[],t=0,e=r.length;t<e;t++)i=r[t],o.push(i.get_min_interval());return o},max_intervals:function(){var t,e,r,o,i;for(r=this.tickers,o=[],t=0,e=r.length;t<e;t++)i=r[t],o.push(i.get_max_interval());return o},min_interval:function(){return this.min_intervals[0]},max_interval:function(){return this.max_intervals[0]}}),e.prototype.get_best_ticker=function(t,e,r){var o,i,n,s,u,c,_,p;return s=e-t,c=this.get_ideal_interval(t,e,r),p=[a.sortedIndex(this.min_intervals,c)-1,a.sortedIndex(this.max_intervals,c)],_=[this.min_intervals[p[0]],this.max_intervals[p[1]]],u=_.map(function(t){return Math.abs(r-s/t)}),l.isEmpty(u.filter(function(t){return!isNaN(t)}))?i=this.tickers[0]:(o=a.argmin(u),n=p[o],i=this.tickers[n]),i},e.prototype.get_interval=function(t,e,r){var o;return o=this.get_best_ticker(t,e,r),o.get_interval(t,e,r)},e.prototype.get_ticks_no_defaults=function(t,e,r,o){var i,n;return i=this.get_best_ticker(t,e,o),n=i.get_ticks_no_defaults(t,e,r,o)},e}(n.ContinuousTicker)},{\"./continuous_ticker\":\"models/tickers/continuous_ticker\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/util/object\":\"core/util/object\"}],\"models/tickers/continuous_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./ticker\"),s=t(\"core/properties\");r.ContinuousTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ContinuousTicker\",e.define({num_minor_ticks:[s.Number,5],desired_num_ticks:[s.Number,6]}),e.prototype.get_interval=void 0,e.prototype.get_min_interval=function(){return this.min_interval},e.prototype.get_max_interval=function(){var t;return null!=(t=this.max_interval)?t:Infinity},e.prototype.get_ideal_interval=function(t,e,r){var o;return o=e-t,o/r},e}(n.Ticker)},{\"./ticker\":\"models/tickers/ticker\",\"core/properties\":\"core/properties\"}],\"models/tickers/datetime_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a,l=function(t,e){function r(){this.constructor=t}for(var o in e)u.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},u={}.hasOwnProperty,c=t(\"core/util/array\"),_=t(\"./adaptive_ticker\"),p=t(\"./composite_ticker\"),h=t(\"./days_ticker\"),d=t(\"./months_ticker\"),f=t(\"./years_ticker\"),m=t(\"./util\");i=m.ONE_MILLI,a=m.ONE_SECOND,n=m.ONE_MINUTE,o=m.ONE_HOUR,s=m.ONE_MONTH,r.DatetimeTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type=\"DatetimeTicker\",e.override({num_minor_ticks:0,tickers:function(){return[new _.AdaptiveTicker({mantissas:[1,2,5],base:10,min_interval:0,max_interval:500*i,num_minor_ticks:0}),new _.AdaptiveTicker({mantissas:[1,2,5,10,15,20,30],base:60,min_interval:a,max_interval:30*n,num_minor_ticks:0}),new _.AdaptiveTicker({mantissas:[1,2,4,6,8,12],base:24,min_interval:o,max_interval:12*o,num_minor_ticks:0}),new h.DaysTicker({days:c.range(1,32)}),new h.DaysTicker({days:c.range(1,31,3)}),new h.DaysTicker({days:[1,8,15,22]}),new h.DaysTicker({days:[1,15]}),new d.MonthsTicker({months:c.range(0,12,1)}),new d.MonthsTicker({months:c.range(0,12,2)}),new d.MonthsTicker({months:c.range(0,12,4)}),new d.MonthsTicker({months:c.range(0,12,6)}),new f.YearsTicker({})]}}),e}(p.CompositeTicker)},{\"./adaptive_ticker\":\"models/tickers/adaptive_ticker\",\"./composite_ticker\":\"models/tickers/composite_ticker\",\"./days_ticker\":\"models/tickers/days_ticker\",\"./months_ticker\":\"models/tickers/months_ticker\",\"./util\":\"models/tickers/util\",\"./years_ticker\":\"models/tickers/years_ticker\",\"core/util/array\":\"core/util/array\"}],\"models/tickers/days_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a=function(t,e){function r(){this.constructor=t}for(var o in e)l.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},l={}.hasOwnProperty,u=t(\"./single_interval_ticker\"),c=t(\"./util\"),_=t(\"core/properties\"),p=t(\"core/util/array\");i=c.copy_date,s=c.last_month_no_later_than,o=c.ONE_DAY,n=function(t,e){var r,o,n,a,l;for(l=s(new Date(t)),n=s(new Date(e)),a=i(n),n.setUTCMonth(n.getUTCMonth()+1),o=[],r=l;;)if(o.push(i(r)),r.setUTCMonth(r.getUTCMonth()+1),r>n)break;return o},r.DaysTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type=\"DaysTicker\",e.define({days:[_.Array,[]]}),e.prototype.initialize=function(t,r){var i,n;return t.num_minor_ticks=0,e.__super__.initialize.call(this,t,r),i=this.days,n=i.length>1?(i[1]-i[0])*o:31*o,this.interval=n},e.prototype.get_ticks_no_defaults=function(t,e,r,o){var s,a,l,u,c,_,h,d,f;return d=n(t,e),c=this.days,_=function(t){return function(t,e){var r,o,n,s,a,l;for(r=[],a=0,l=c.length;a<l;a++)o=c[a],n=i(t),n.setUTCDate(o),s=new Date(n.getTime()+e/2),\n",
" s.getUTCMonth()===t.getUTCMonth()&&r.push(n);return r}}(this),h=this.interval,u=p.concat(function(){var t,e,r;for(r=[],t=0,e=d.length;t<e;t++)a=d[t],r.push(_(a,h));return r}()),s=function(){var t,e,r;for(r=[],t=0,e=u.length;t<e;t++)l=u[t],r.push(l.getTime());return r}(),f=s.filter(function(r){return t<=r&&r<=e}),{major:f,minor:[]}},e}(u.SingleIntervalTicker)},{\"./single_interval_ticker\":\"models/tickers/single_interval_ticker\",\"./util\":\"models/tickers/util\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/tickers/fixed_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./continuous_ticker\"),s=t(\"core/properties\");r.FixedTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"FixedTicker\",e.define({ticks:[s.Array,[]]}),e.prototype.get_ticks_no_defaults=function(t,e,r,o){return{major:this.ticks,minor:[]}},e}(n.ContinuousTicker)},{\"./continuous_ticker\":\"models/tickers/continuous_ticker\",\"core/properties\":\"core/properties\"}],\"models/tickers/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./adaptive_ticker\");r.AdaptiveTicker=o.AdaptiveTicker;var i=t(\"./basic_ticker\");r.BasicTicker=i.BasicTicker;var n=t(\"./categorical_ticker\");r.CategoricalTicker=n.CategoricalTicker;var s=t(\"./composite_ticker\");r.CompositeTicker=s.CompositeTicker;var a=t(\"./continuous_ticker\");r.ContinuousTicker=a.ContinuousTicker;var l=t(\"./datetime_ticker\");r.DatetimeTicker=l.DatetimeTicker;var u=t(\"./days_ticker\");r.DaysTicker=u.DaysTicker;var c=t(\"./fixed_ticker\");r.FixedTicker=c.FixedTicker;var _=t(\"./log_ticker\");r.LogTicker=_.LogTicker;var p=t(\"./mercator_ticker\");r.MercatorTicker=p.MercatorTicker;var h=t(\"./months_ticker\");r.MonthsTicker=h.MonthsTicker;var d=t(\"./single_interval_ticker\");r.SingleIntervalTicker=d.SingleIntervalTicker;var f=t(\"./ticker\");r.Ticker=f.Ticker;var m=t(\"./years_ticker\");r.YearsTicker=m.YearsTicker},{\"./adaptive_ticker\":\"models/tickers/adaptive_ticker\",\"./basic_ticker\":\"models/tickers/basic_ticker\",\"./categorical_ticker\":\"models/tickers/categorical_ticker\",\"./composite_ticker\":\"models/tickers/composite_ticker\",\"./continuous_ticker\":\"models/tickers/continuous_ticker\",\"./datetime_ticker\":\"models/tickers/datetime_ticker\",\"./days_ticker\":\"models/tickers/days_ticker\",\"./fixed_ticker\":\"models/tickers/fixed_ticker\",\"./log_ticker\":\"models/tickers/log_ticker\",\"./mercator_ticker\":\"models/tickers/mercator_ticker\",\"./months_ticker\":\"models/tickers/months_ticker\",\"./single_interval_ticker\":\"models/tickers/single_interval_ticker\",\"./ticker\":\"models/tickers/ticker\",\"./years_ticker\":\"models/tickers/years_ticker\"}],\"models/tickers/log_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/util/array\"),s=t(\"./adaptive_ticker\");r.LogTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"LogTicker\",e.override({mantissas:[1,5]}),e.prototype.get_ticks_no_defaults=function(t,e,r,o){var i,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C,N,D,F;if(P=this.num_minor_ticks,S=[],i=this.base,k=Math.log(t)/Math.log(i),w=Math.log(e)/Math.log(i),x=w-k,isFinite(x)){if(x<2){if(_=this.get_interval(t,e,o),z=Math.floor(t/_),s=Math.ceil(e/_),u=n.range(z,s+1),D=function(){var t,e,r;for(r=[],t=0,e=u.length;t<e;t++)l=u[t],0!==l&&r.push(l*_);return r}(),D=D.filter(function(r){return t<=r&&r<=e}),P>0&&D.length>0){for(j=_/P,T=function(){var t,e,r;for(r=[],c=t=0,e=P;0<=e?t<e:t>e;c=0<=e?++t:--t)r.push(c*j);return r}(),E=T.slice(1,+T.length+1||9e9),p=0,f=E.length;p<f;p++)F=E[p],S.push(D[0]-F);for(h=0,m=D.length;h<m;h++)for(N=D[h],d=0,y=T.length;d<y;d++)F=T[d],S.push(N+F)}}else if(C=Math.ceil(.999999*k),a=Math.floor(1.000001*w),_=Math.ceil((a-C)/9),D=n.range(C,a+1,_),D=D.map(function(t){return Math.pow(i,t)}),D=D.filter(function(r){return t<=r&&r<=e}),P>0&&D.length>0){for(j=Math.pow(i,_)/P,T=function(){var t,e,r;for(r=[],c=t=1,e=P;1<=e?t<=e:t>=e;c=1<=e?++t:--t)r.push(c*j);return r}(),M=0,g=T.length;M<g;M++)F=T[M],S.push(D[0]/F);for(S.push(D[0]),O=0,v=D.length;O<v;O++)for(N=D[O],A=0,b=T.length;A<b;A++)F=T[A],S.push(N*F)}}else D=[];return{major:D,minor:S}},e}(s.AdaptiveTicker)},{\"./adaptive_ticker\":\"models/tickers/adaptive_ticker\",\"core/util/array\":\"core/util/array\"}],\"models/tickers/mercator_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./basic_ticker\"),s=t(\"core/properties\"),a=t(\"core/util/proj4\");r.MercatorTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"MercatorTicker\",e.define({dimension:[s.LatLon]}),e.prototype.get_ticks_no_defaults=function(t,r,o,i){var n,s,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C,N;if(null==this.dimension)throw new Error(\"MercatorTicker.dimension not configured\");if(\"lon\"===this.dimension?(w=a.proj4(a.mercator).inverse([t,o]),v=w[0],y=w[1],x=a.proj4(a.mercator).inverse([r,o]),g=x[0],y=x[1]):(j=a.proj4(a.mercator).inverse([o,t]),y=j[0],v=j[1],T=a.proj4(a.mercator).inverse([o,r]),y=T[0],g=T[1]),b=e.__super__.get_ticks_no_defaults.call(this,v,g,o,i),N={major:[],minor:[]},\"lon\"===this.dimension){for(S=b.major,s=0,p=S.length;s<p;s++)C=S[s],O=a.proj4(a.mercator).forward([C,y]),m=O[0],n=O[1],N.major.push(m);for(P=b.minor,l=0,h=P.length;l<h;l++)C=P[l],A=a.proj4(a.mercator).forward([C,y]),m=A[0],n=A[1],N.minor.push(m)}else{for(E=b.major,u=0,d=E.length;u<d;u++)C=E[u],z=a.proj4(a.mercator).forward([y,C]),n=z[0],_=z[1],N.major.push(_);for(k=b.minor,c=0,f=k.length;c<f;c++)C=k[c],M=a.proj4(a.mercator).forward([y,C]),n=M[0],_=M[1],N.minor.push(_)}return N},e}(n.BasicTicker)},{\"./basic_ticker\":\"models/tickers/basic_ticker\",\"core/properties\":\"core/properties\",\"core/util/proj4\":\"core/util/proj4\"}],\"models/tickers/months_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n,s,a=function(t,e){function r(){this.constructor=t}for(var o in e)l.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},l={}.hasOwnProperty,u=t(\"./single_interval_ticker\"),c=t(\"./util\"),_=t(\"core/properties\"),p=t(\"core/util/array\");i=c.copy_date,s=c.last_year_no_later_than,o=c.ONE_MONTH,n=function(t,e){var r,o,n,a;for(a=s(new Date(t)),n=s(new Date(e)),n.setUTCFullYear(n.getUTCFullYear()+1),o=[],r=a;;)if(o.push(i(r)),r.setUTCFullYear(r.getUTCFullYear()+1),r>n)break;return o},r.MonthsTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type=\"MonthsTicker\",e.define({months:[_.Array,[]]}),e.prototype.initialize=function(t,r){var i,n;return e.__super__.initialize.call(this,t,r),n=this.months,i=n.length>1?(n[1]-n[0])*o:12*o,this.interval=i},e.prototype.get_ticks_no_defaults=function(t,e,r,o){var s,a,l,u,c,_,h,d;return d=n(t,e),c=this.months,_=function(t){return c.map(function(e){var r;return r=i(t),r.setUTCMonth(e),r})},u=p.concat(function(){var t,e,r;for(r=[],t=0,e=d.length;t<e;t++)a=d[t],r.push(_(a));return r}()),s=function(){var t,e,r;for(r=[],t=0,e=u.length;t<e;t++)l=u[t],r.push(l.getTime());return r}(),h=s.filter(function(r){return t<=r&&r<=e}),{major:h,minor:[]}},e}(u.SingleIntervalTicker)},{\"./single_interval_ticker\":\"models/tickers/single_interval_ticker\",\"./util\":\"models/tickers/util\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/tickers/single_interval_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./continuous_ticker\"),s=t(\"core/properties\");r.SingleIntervalTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"SingleIntervalTicker\",e.define({interval:[s.Number]}),e.getters({min_interval:function(){return this.interval},max_interval:function(){return this.interval}}),e.prototype.get_interval=function(t,e,r){return this.interval},e}(n.ContinuousTicker)},{\"./continuous_ticker\":\"models/tickers/continuous_ticker\",\"core/properties\":\"core/properties\"}],\"models/tickers/ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\"),s=t(\"core/util/array\"),a=t(\"core/util/types\");r.Ticker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Ticker\",e.prototype.get_ticks=function(t,e,r,o,i){var n;return n=i.desired_n_ticks,this.get_ticks_no_defaults(t,e,o,this.desired_num_ticks)},e.prototype.get_ticks_no_defaults=function(t,e,r,o){var i,n,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j;if(c=this.get_interval(t,e,o),x=Math.floor(t/c),i=Math.ceil(e/c),l=a.isStrictNaN(x)||a.isStrictNaN(i)?[]:s.range(x,i+1),M=function(){var t,e,r;for(r=[],t=0,e=l.length;t<e;t++)n=l[t],r.push(n*c);return r}(),M=M.filter(function(r){return t<=r&&r<=e}),b=this.num_minor_ticks,v=[],b>0&&M.length>0){for(y=c/b,g=function(){var t,e,r;for(r=[],u=t=0,e=b;0<=e?t<e:t>e;u=0<=e?++t:--t)r.push(u*y);return r}(),w=g.slice(1,+g.length+1||9e9),_=0,d=w.length;_<d;_++)j=w[_],v.push(M[0]-j);for(p=0,f=M.length;p<f;p++)for(k=M[p],h=0,m=g.length;h<m;h++)j=g[h],v.push(k+j)}return{major:M,minor:v}},e}(n.Model)},{\"../../model\":\"model\",\"core/util/array\":\"core/util/array\",\"core/util/types\":\"core/util/types\"}],\"models/tickers/util\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.ONE_MILLI=1,r.ONE_SECOND=1e3,r.ONE_MINUTE=60*r.ONE_SECOND,r.ONE_HOUR=60*r.ONE_MINUTE,r.ONE_DAY=24*r.ONE_HOUR,r.ONE_MONTH=30*r.ONE_DAY,r.ONE_YEAR=365*r.ONE_DAY,r.copy_date=function(t){return new Date(t.getTime())},r.last_month_no_later_than=function(t){return t=r.copy_date(t),t.setUTCDate(1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),t},r.last_year_no_later_than=function(t){return t=r.last_month_no_later_than(t),t.setUTCMonth(0),t}},{}],\"models/tickers/years_ticker\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i,n=function(t,e){function r(){this.constructor=t}for(var o in e)s.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},s={}.hasOwnProperty,a=t(\"./basic_ticker\"),l=t(\"./single_interval_ticker\"),u=t(\"./util\");i=u.last_year_no_later_than,o=u.ONE_YEAR,r.YearsTicker=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"YearsTicker\",e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.interval=o,this.basic_ticker=new a.BasicTicker({num_minor_ticks:0})},e.prototype.get_ticks_no_defaults=function(t,e,r,o){var n,s,a,l,u,c;return a=i(new Date(t)).getUTCFullYear(),s=i(new Date(e)).getUTCFullYear(),c=this.basic_ticker.get_ticks_no_defaults(a,s,r,o).major,n=function(){var t,e,r;for(r=[],t=0,e=c.length;t<e;t++)u=c[t],r.push(Date.UTC(u,0,1));return r}(),l=n.filter(function(r){return t<=r&&r<=e}),{major:l,minor:[]}},e}(l.SingleIntervalTicker)},{\"./basic_ticker\":\"models/tickers/basic_ticker\",\"./single_interval_ticker\":\"models/tickers/single_interval_ticker\",\"./util\":\"models/tickers/util\"}],\"models/tiles/bbox_tile_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./mercator_tile_source\"),s=t(\"core/properties\");r.BBoxTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"BBoxTileSource\",e.define({use_latlon:[s.Bool,!1]}),e.prototype.get_image_url=function(t,e,r){var o,i,n,s,a,l,u;return o=this.string_lookup_replace(this.url,this.extra_url_vars),this.use_latlon?(i=this.get_tile_geographic_bounds(t,e,r),a=i[0],u=i[1],s=i[2],l=i[3]):(n=this.get_tile_meter_bounds(t,e,r),a=n[0],u=n[1],s=n[2],l=n[3]),o.replace(\"{XMIN}\",a).replace(\"{YMIN}\",u).replace(\"{XMAX}\",s).replace(\"{YMAX}\",l)},e}(n.MercatorTileSource)},{\"./mercator_tile_source\":\"models/tiles/mercator_tile_source\",\"core/properties\":\"core/properties\"}],\"models/tiles/dynamic_image_renderer\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"../renderers/renderer\"),a=t(\"core/logging\"),l=t(\"core/properties\");r.DynamicImageView=function(t){function e(){return this._on_image_error=o(this._on_image_error,this),this._on_image_load=o(this._on_image_load,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()})},e.prototype.get_extent=function(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]},e.prototype._set_data=function(){return this.map_plot=this.plot_view.model.plot,this.map_canvas=this.plot_view.canvas_view.ctx,this.map_frame=this.plot_view.frame,this.x_range=this.map_plot.x_range,this.y_range=this.map_plot.y_range,this.lastImage=void 0,this.extent=this.get_extent()},e.prototype._map_data=function(){return this.initial_extent=this.get_extent()},e.prototype._on_image_load=function(t){var e;if(e=t.target.image_data,e.img=t.target,e.loaded=!0,this.lastImage=e,this.get_extent().join(\":\")===e.cache_key)return this.request_render()},e.prototype._on_image_error=function(t){var e;return a.logger.error(\"Error loading image: \"+t.target.src),e=t.target.image_data,this.model.image_source.remove_image(e)},e.prototype._create_image=function(t){var e;return e=new Image,e.onload=this._on_image_load,e.onerror=this._on_image_error,e.alt=\"\",e.image_data={bounds:t,loaded:!1,cache_key:t.join(\":\")},this.model.image_source.add_image(e.image_data),e.src=this.model.image_source.get_image_url(t[0],t[1],t[2],t[3],Math.ceil(this.map_frame._height.value),Math.ceil(this.map_frame._width.value)),e},e.prototype.render=function(t,e,r){var o,i;return null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),o=this.get_extent(),this.render_timer&&clearTimeout(this.render_timer),i=this.model.image_source.images[o.join(\":\")],null!=i&&i.loaded?void this._draw_image(o.join(\":\")):(null!=this.lastImage&&this._draw_image(this.lastImage.cache_key),null==i?this.render_timer=setTimeout(function(t){return function(){return t._create_image(o)}}(this),125):void 0)},e.prototype._draw_image=function(t){var e,r,o,i,n,s,a,l,u,c,_;if(e=this.model.image_source.images[t],null!=e)return this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.model.alpha,r=this.plot_view.frame.map_to_screen([e.bounds[0]],[e.bounds[3]],this.plot_view.canvas),l=r[0],_=r[1],o=this.plot_view.frame.map_to_screen([e.bounds[2]],[e.bounds[1]],this.plot_view.canvas),a=o[0],c=o[1],l=l[0],_=_[0],a=a[0],c=c[0],n=a-l,i=c-_,s=l,u=_,this.map_canvas.drawImage(e.img,s,u,n,i),this.map_canvas.restore()},e.prototype._set_rect=function(){var t,e,r,o,i;return r=this.plot_model.plot.properties.outline_line_width.value(),e=this.plot_view.canvas.vx_to_sx(this.map_frame._left.value)+r/2,o=this.plot_view.canvas.vy_to_sy(this.map_frame._top.value)+r/2,i=this.map_frame._width.value-r,t=this.map_frame._height.value-r,this.map_canvas.rect(e,o,i,t),this.map_canvas.clip()},e}(s.RendererView),r.DynamicImageRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.DynamicImageView,e.prototype.type=\"DynamicImageRenderer\",e.define({alpha:[l.Number,1],image_source:[l.Instance],render_parents:[l.Bool,!0]}),e.override({level:\"underlay\"}),e}(s.Renderer)},{\"../renderers/renderer\":\"models/renderers/renderer\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/tiles/image_pool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.ImagePool=function(){function t(){this.images=[]}return t.prototype.pop=function(){var t;return t=this.images.pop(),null!=t?t:new Image},t.prototype.push=function(t){if(!(this.images.length>50))return t.constructor===Array?Array.prototype.push.apply(this.images,t):this.images.push(t)},t}()},{}],\"models/tiles/image_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"../../model\");r.ImageSource=function(t){function e(t){null==t&&(t={}),e.__super__.constructor.apply(this,arguments),this.images={},this.normalize_case()}return o(e,t),e.prototype.type=\"ImageSource\",e.define({url:[n.String,\"\"],extra_url_vars:[n.Any,{}]}),e.prototype.normalize_case=function(){\"Note: should probably be refactored into subclasses.\";var t;return t=this.url,t=t.replace(\"{xmin}\",\"{XMIN}\"),t=t.replace(\"{ymin}\",\"{YMIN}\"),t=t.replace(\"{xmax}\",\"{XMAX}\"),t=t.replace(\"{ymax}\",\"{YMAX}\"),t=t.replace(\"{height}\",\"{HEIGHT}\"),t=t.replace(\"{width}\",\"{WIDTH}\"),this.url=t},e.prototype.string_lookup_replace=function(t,e){var r,o,i;o=t;for(r in e)i=e[r],o=o.replace(\"{\"+r+\"}\",i.toString());return o},e.prototype.add_image=function(t){return this.images[t.cache_key]=t},e.prototype.remove_image=function(t){return delete this.images[t.cache_key]},e.prototype.get_image_url=function(t,e,r,o,i,n){var s;return s=this.string_lookup_replace(this.url,this.extra_url_vars),s.replace(\"{XMIN}\",t).replace(\"{YMIN}\",e).replace(\"{XMAX}\",r).replace(\"{YMAX}\",o).replace(\"{WIDTH}\",n).replace(\"{HEIGHT}\",i)},e}(s.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\"}],\"models/tiles/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./bbox_tile_source\");r.BBoxTileSource=o.BBoxTileSource;var i=t(\"./dynamic_image_renderer\");r.DynamicImageRenderer=i.DynamicImageRenderer;var n=t(\"./image_source\");r.ImageSource=n.ImageSource;var s=t(\"./mercator_tile_source\");r.MercatorTileSource=s.MercatorTileSource;var a=t(\"./quadkey_tile_source\");r.QUADKEYTileSource=a.QUADKEYTileSource;var l=t(\"./tile_renderer\");r.TileRenderer=l.TileRenderer;var u=t(\"./tile_source\");r.TileSource=u.TileSource;var c=t(\"./tms_tile_source\");r.TMSTileSource=c.TMSTileSource;var _=t(\"./wmts_tile_source\");r.WMTSTileSource=_.WMTSTileSource},{\"./bbox_tile_source\":\"models/tiles/bbox_tile_source\",\"./dynamic_image_renderer\":\"models/tiles/dynamic_image_renderer\",\"./image_source\":\"models/tiles/image_source\",\"./mercator_tile_source\":\"models/tiles/mercator_tile_source\",\"./quadkey_tile_source\":\"models/tiles/quadkey_tile_source\",\"./tile_renderer\":\"models/tiles/tile_renderer\",\"./tile_source\":\"models/tiles/tile_source\",\"./tms_tile_source\":\"models/tiles/tms_tile_source\",\"./wmts_tile_source\":\"models/tiles/wmts_tile_source\"}],\"models/tiles/mercator_tile_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(\"./tile_source\"),a=t(\"core/properties\");r.MercatorTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"MercatorTileSource\",e.define({wrap_around:[a.Bool,!0]}),e.override({x_origin_offset:20037508.34,y_origin_offset:20037508.34,initial_resolution:156543.03392804097}),e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),this._resolutions=function(){var t,e;for(e=[],r=t=0;t<=30;r=++t)e.push(this.get_resolution(r));return e}.call(this)},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,r){return!(!this.wrap_around&&(t<0||t>=Math.pow(2,r)))&&!(e<0||e>=Math.pow(2,r))},e.prototype.retain_children=function(t){var e,r,o,i,n,s,a;i=t.quadkey,o=i.length,r=o+3,n=this.tiles,s=[];for(e in n)a=n[e],0===a.quadkey.indexOf(i)&&a.quadkey.length>o&&a.quadkey.length<=r?s.push(a.retain=!0):s.push(void 0);return s},e.prototype.retain_neighbors=function(t){var e,r,o,i,s,a,l,u,c,_,p,h,d,f,m;r=4,s=t.tile_coords,p=s[0],h=s[1],d=s[2],o=function(){var t,e,o,i;for(i=[],f=t=e=p-r,o=p+r;e<=o?t<=o:t>=o;f=e<=o?++t:--t)i.push(f);return i}(),i=function(){var t,e,o,i;for(i=[],m=t=e=h-r,o=h+r;e<=o?t<=o:t>=o;m=e<=o?++t:--t)i.push(m);return i}(),a=this.tiles,c=[];for(e in a)_=a[e],_.tile_coords[2]===d&&(l=_.tile_coords[0],n.call(o,l)>=0)&&(u=_.tile_coords[1],n.call(i,u)>=0)?c.push(_.retain=!0):c.push(void 0);return c},e.prototype.retain_parents=function(t){var e,r,o,i,n;r=t.quadkey,o=this.tiles,i=[];for(e in o)n=o[e],i.push(n.retain=0===r.indexOf(n.quadkey));return i},e.prototype.children_by_tile_xyz=function(t,e,r){var o,i,n,s,a,l,u,c,_;for(_=this.calculate_world_x_by_tile_xyz(t,e,r),0!==_&&(l=this.normalize_xyz(t,e,r),t=l[0],e=l[1],r=l[2]),a=this.tile_xyz_to_quadkey(t,e,r),i=[],n=s=0;s<=3;n=s+=1)u=this.quadkey_to_tile_xyz(a+n.toString()),t=u[0],e=u[1],r=u[2],0!==_&&(c=this.denormalize_xyz(t,e,r,_),t=c[0],e=c[1],r=c[2]),o=this.get_tile_meter_bounds(t,e,r),null!=o&&i.push([t,e,r,o]);return i},e.prototype.parent_by_tile_xyz=function(t,e,r){var o,i;return i=this.tile_xyz_to_quadkey(t,e,r),o=i.substring(0,i.length-1),this.quadkey_to_tile_xyz(o)},e.prototype.get_resolution=function(t){return this._computed_initial_resolution()/Math.pow(2,t)},e.prototype.get_resolution_by_extent=function(t,e,r){var o,i;return o=(t[2]-t[0])/r,i=(t[3]-t[1])/e,[o,i]},e.prototype.get_level_by_extent=function(t,e,r){var o,i,n,s,a,l,u,c;for(u=(t[2]-t[0])/r,c=(t[3]-t[1])/e,l=Math.max(u,c),o=0,a=this._resolutions,i=0,n=a.length;i<n;i++){if(s=a[i],l>s){if(0===o)return 0;if(o>0)return o-1}o+=1}},e.prototype.get_closest_level_by_extent=function(t,e,r){var o,i,n,s,a;return s=(t[2]-t[0])/r,a=(t[3]-t[1])/e,i=Math.max(s,a),n=this._resolutions,o=this._resolutions.reduce(function(t,e){return Math.abs(e-i)<Math.abs(t-i)?e:t}),this._resolutions.indexOf(o)},e.prototype.snap_to_zoom=function(t,e,r,o){var i,n,s,a,l,u,c,_,p;return i=this._resolutions[o],n=r*i,s=e*i,u=t[0],p=t[1],l=t[2],_=t[3],a=(n-(l-u))/2,c=(s-(_-p))/2,[u-a,p-c,l+a,_+c]},e.prototype.tms_to_wmts=function(t,e,r){\"Note this works both ways\";return[t,Math.pow(2,r)-1-e,r]},e.prototype.wmts_to_tms=function(t,e,r){\"Note this works both ways\";return[t,Math.pow(2,r)-1-e,r]},e.prototype.pixels_to_meters=function(t,e,r){var o,i,n;return n=this.get_resolution(r),o=t*n-this.x_origin_offset,i=e*n-this.y_origin_offset,[o,i]},e.prototype.meters_to_pixels=function(t,e,r){var o,i,n;return n=this.get_resolution(r),o=(t+this.x_origin_offset)/n,i=(e+this.y_origin_offset)/n,[o,i]},e.prototype.pixels_to_tile=function(t,e){var r,o;return r=Math.ceil(t/parseFloat(this.tile_size)),r=0===r?r:r-1,o=Math.max(Math.ceil(e/parseFloat(this.tile_size))-1,0),[r,o]},e.prototype.pixels_to_raster=function(t,e,r){var o;return o=this.tile_size<<r,[t,o-e]},e.prototype.meters_to_tile=function(t,e,r){var o,i,n;return n=this.meters_to_pixels(t,e,r),o=n[0],i=n[1],this.pixels_to_tile(o,i)},e.prototype.get_tile_meter_bounds=function(t,e,r){var o,i,n,s,a,l;return o=this.pixels_to_meters(t*this.tile_size,e*this.tile_size,r),s=o[0],l=o[1],i=this.pixels_to_meters((t+1)*this.tile_size,(e+1)*this.tile_size,r),n=i[0],a=i[1],null!=s&&null!=l&&null!=n&&null!=a?[s,l,n,a]:void 0},e.prototype.get_tile_geographic_bounds=function(t,e,r){var o,i,n,s,a,l;return o=this.get_tile_meter_bounds(t,e,r),l=this.utils.meters_extent_to_geographic(o),a=l[0],s=l[1],n=l[2],i=l[3],[a,s,n,i]},e.prototype.get_tiles_by_extent=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w;for(null==r&&(r=1),v=t[0],w=t[1],g=t[2],b=t[3],n=this.meters_to_tile(v,w,e),d=n[0],y=n[1],s=this.meters_to_tile(g,b,e),h=s[0],m=s[1],d-=r,y-=r,h+=r,m+=r,_=[],f=o=a=m,l=y;o>=l;f=o+=-1)for(p=i=u=d,c=h;i<=c;p=i+=1)this.is_valid_tile(p,f,e)&&_.push([p,f,e,this.get_tile_meter_bounds(p,f,e)]);return _=this.sort_tiles_from_center(_,[d,y,h,m])},e.prototype.quadkey_to_tile_xyz=function(t){\"Computes tile x, y and z values based on quadKey.\";var e,r,o,i,n,s,a,l;for(n=0,s=0,a=t.length,e=r=i=a;r>0;e=r+=-1)switch(l=t.charAt(a-e),o=1<<e-1,l){case\"0\":continue;case\"1\":n|=o;break;case\"2\":s|=o;break;case\"3\":n|=o,s|=o;break;default:throw new TypeError(\"Invalid Quadkey: \"+t)}return[n,s,a]},e.prototype.tile_xyz_to_quadkey=function(t,e,r){\"Computes quadkey value based on tile x, y and z values.\";var o,i,n,s,a,l;for(a=\"\",i=n=l=r;n>0;i=n+=-1)o=0,s=1<<i-1,0!==(t&s)&&(o+=1),0!==(e&s)&&(o+=2),a+=o.toString();return a},e.prototype.children_by_tile_xyz=function(t,e,r){var o,i,n,s,a,l;for(a=this.tile_xyz_to_quadkey(t,e,r),i=[],n=s=0;s<=3;n=s+=1)l=this.quadkey_to_tile_xyz(a+n.toString()),t=l[0],e=l[1],r=l[2],o=this.get_tile_meter_bounds(t,e,r),null!=o&&i.push([t,e,r,o]);return i},e.prototype.parent_by_tile_xyz=function(t,e,r){var o,i;return i=this.tile_xyz_to_quadkey(t,e,r),o=i.substring(0,i.length-1),this.quadkey_to_tile_xyz(o)},e.prototype.get_closest_parent_by_tile_xyz=function(t,e,r){var o,i,n,s,a;for(a=this.calculate_world_x_by_tile_xyz(t,e,r),i=this.normalize_xyz(t,e,r),t=i[0],e=i[1],r=i[2],o=this.tile_xyz_to_quadkey(t,e,r);o.length>0;)if(o=o.substring(0,o.length-1),n=this.quadkey_to_tile_xyz(o),t=n[0],e=n[1],r=n[2],s=this.denormalize_xyz(t,e,r,a),t=s[0],e=s[1],r=s[2],this.tile_xyz_to_key(t,e,r)in this.tiles)return[t,e,r];return[0,0,0]},e.prototype.normalize_xyz=function(t,e,r){var o;return this.wrap_around?(o=Math.pow(2,r),[(t%o+o)%o,e,r]):[t,e,r]},e.prototype.denormalize_xyz=function(t,e,r,o){return[t+o*Math.pow(2,r),e,r]},e.prototype.denormalize_meters=function(t,e,r,o){return[t+2*o*Math.PI*6378137,e]},e.prototype.calculate_world_x_by_tile_xyz=function(t,e,r){return Math.floor(t/Math.pow(2,r))},e}(s.TileSource)},{\"./tile_source\":\"models/tiles/tile_source\",\"core/properties\":\"core/properties\"}],\"models/tiles/quadkey_tile_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./mercator_tile_source\");r.QUADKEYTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"QUADKEYTileSource\",e.prototype.get_image_url=function(t,e,r){var o,i,n;return o=this.string_lookup_replace(this.url,this.extra_url_vars),n=this.tms_to_wmts(t,e,r),t=n[0],e=n[1],r=n[2],i=this.tile_xyz_to_quadkey(t,e,r),o.replace(\"{Q}\",i)},e}(n.MercatorTileSource)},{\"./mercator_tile_source\":\"models/tiles/mercator_tile_source\"}],\"models/tiles/tile_renderer\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},a=t(\"./image_pool\"),l=t(\"./wmts_tile_source\"),u=t(\"../renderers/renderer\"),c=t(\"core/dom\"),_=t(\"core/properties\"),p=t(\"core/util/types\");r.TileRendererView=function(t){function e(){return this._update=o(this._update,this),this._prefetch_tiles=o(this._prefetch_tiles,this),this._on_tile_error=o(this._on_tile_error,this),this._on_tile_cache_load=o(this._on_tile_cache_load,this),this._on_tile_load=o(this._on_tile_load,this),this._add_attribution=o(this._add_attribution,this),e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return this.attributionEl=null,this._tiles=[],e.__super__.initialize.apply(this,arguments)},e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.change,function(){return this.request_render()})},e.prototype.get_extent=function(){return[this.x_range.start,this.y_range.start,this.x_range.end,this.y_range.end]},e.prototype._set_data=function(){return this.pool=new a.ImagePool,this.map_plot=this.plot_model.plot,this.map_canvas=this.plot_view.canvas_view.ctx,this.map_frame=this.plot_model.frame,this.x_range=this.map_plot.x_range,this.y_range=this.map_plot.y_range,this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0},e.prototype._add_attribution=function(){var t,e,r,o,i,n;if(t=this.model.tile_source.attribution,p.isString(t)&&t.length>0)return null==this.attributionEl&&(e=this.map_plot.outline_line_width,r=this.map_plot.min_border_bottom+e,n=this.map_frame._right.value-this.map_frame._width.value,o=this.map_frame._width.value-e,this.attributionEl=c.div({\"class\":\"bk-tile-attribution\",style:{position:\"absolute\",bottom:r+\"px\",right:n+\"px\",\"max-width\":o+\"px\",\"background-color\":\"rgba(255,255,255,0.8)\",\"font-size\":\"9pt\",\"font-family\":\"sans-serif\"}}),i=this.plot_view.canvas_view.events_el,i.appendChild(this.attributionEl)),this.attributionEl.innerHTML=t},e.prototype._map_data=function(){var t,e;return this.initial_extent=this.get_extent(),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(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._add_attribution()},e.prototype._on_tile_load=function(t){var e;return e=t.target.tile_data,e.img=t.target,e.current=!0,e.loaded=!0,this.request_render()},e.prototype._on_tile_cache_load=function(t){var e;return e=t.target.tile_data,e.img=t.target,e.loaded=!0,e.finished=!0,this.notify_finished()},e.prototype._on_tile_error=function(t){var e;return e=t.target.tile_data,e.finished=!0},e.prototype._create_tile=function(t,e,r,o,i){var n,s,a;return null==i&&(i=!1),n=this.model.tile_source.normalize_xyz(t,e,r),a=this.pool.pop(),i?a.onload=this._on_tile_cache_load:a.onload=this._on_tile_load,a.onerror=this._on_tile_error,a.alt=\"\",a.tile_data={tile_coords:[t,e,r],normalized_coords:n,quadkey:this.model.tile_source.tile_xyz_to_quadkey(t,e,r),cache_key:this.model.tile_source.tile_xyz_to_key(t,e,r),bounds:o,loaded:!1,finished:!1,x_coord:o[0],y_coord:o[3]},this.model.tile_source.tiles[a.tile_data.cache_key]=a.tile_data,a.src=(s=this.model.tile_source).get_image_url.apply(s,n),this._tiles.push(a),a},e.prototype._enforce_aspect_ratio=function(){var t,e,r;return(this._last_height!==this.map_frame._height.value||this._last_width!==this.map_frame._width.value)&&(t=this.get_extent(),\n",
" r=this.model.tile_source.get_level_by_extent(t,this.map_frame._height.value,this.map_frame._width.value),e=this.model.tile_source.snap_to_zoom(t,this.map_frame._height.value,this.map_frame._width.value,r),this.x_range.setv({start:e[0],end:e[2]}),this.y_range.setv({start:e[1],end:e[3]}),this.extent=e,this._last_height=this.map_frame._height.value,this._last_width=this.map_frame._width.value,!0)},e.prototype.has_finished=function(){var t,r,o,i;if(!e.__super__.has_finished.call(this))return!1;if(0===this._tiles.length)return!1;for(o=this._tiles,t=0,r=o.length;t<r;t++)if(i=o[t],!i.tile_data.finished)return!1;return!0},e.prototype.render=function(t,e,r){if(null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),!this._enforce_aspect_ratio())return this._update(),null!=this.prefetch_timer&&clearTimeout(this.prefetch_timer),this.prefetch_timer=setTimeout(this._prefetch_tiles,500),this.has_finished()?this.notify_finished():void 0},e.prototype._draw_tile=function(t){var e,r,o,i,n,s,a,l,u,c,_;if(_=this.model.tile_source.tiles[t],null!=_)return e=this.plot_view.frame.map_to_screen([_.bounds[0]],[_.bounds[3]],this.plot_view.canvas),a=e[0],c=e[1],r=this.plot_view.frame.map_to_screen([_.bounds[2]],[_.bounds[1]],this.plot_view.canvas),s=r[0],u=r[1],a=a[0],c=c[0],s=s[0],u=u[0],i=s-a,o=u-c,n=a,l=c,this.map_canvas.drawImage(_.img,n,l,i,o)},e.prototype._set_rect=function(){var t,e,r,o,i;return r=this.plot_model.plot.properties.outline_line_width.value(),e=this.plot_view.canvas.vx_to_sx(this.map_frame._left.value)+r/2,o=this.plot_view.canvas.vy_to_sy(this.map_frame._top.value)+r/2,i=this.map_frame._width.value-r,t=this.map_frame._height.value-r,this.map_canvas.rect(e,o,i,t),this.map_canvas.clip()},e.prototype._render_tiles=function(t){var e,r,o;for(this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.model.alpha,e=0,r=t.length;e<r;e++)o=t[e],this._draw_tile(o);return this.map_canvas.restore()},e.prototype._prefetch_tiles=function(){var t,e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v;for(h=this.model.tile_source,a=this.get_extent(),l=this.map_frame._height.value,f=this.map_frame._width.value,v=this.model.tile_source.get_level_by_extent(a,l,f),d=this.model.tile_source.get_tiles_by_extent(a,v),_=[],p=u=0,c=Math.min(10,d.length);u<=c;p=u+=1)m=p[0],y=p[1],g=p[2],t=p[3],o=this.model.tile_source.children_by_tile_xyz(m,y,g),_.push(function(){var t,a,l;for(l=[],t=0,a=o.length;t<a;t++)e=o[t],i=e[0],n=e[1],s=e[2],r=e[3],h.tile_xyz_to_key(i,n,s)in h.tiles||l.push(this._create_tile(i,n,s,r,!0));return l}.call(this));return _},e.prototype._fetch_tiles=function(t){var e,r,o,i,n,s,a,l;for(i=[],r=0,o=t.length;r<o;r++)n=t[r],s=n[0],a=n[1],l=n[2],e=n[3],i.push(this._create_tile(s,a,l,e));return i},e.prototype._update=function(){var t,e,r,o,i,n,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C,N,D,F,I,B,L;for(z=this.model.tile_source,b=z.min_zoom,v=z.max_zoom,z.update(),c=this.get_extent(),L=this.extent[2]-this.extent[0]<c[2]-c[0],_=this.map_frame._height.value,N=this.map_frame._width.value,B=z.get_level_by_extent(c,_,N),P=!1,B<b?(c=this.extent,B=b,P=!0):B>v&&(c=this.extent,B=v,P=!0),P&&(this.x_range.setv({x_range:{start:c[0],end:c[2]}}),this.y_range.setv({start:c[1],end:c[3]}),this.extent=c),this.extent=c,C=z.get_tiles_by_extent(c,B),M=[],w=[],r=[],n=[],p=0,m=C.length;p<m;p++){if(A=C[p],D=A[0],F=A[1],I=A[2],t=A[3],f=z.tile_xyz_to_key(D,F,I),E=z.tiles[f],null!=E&&E.loaded===!0)r.push(f);else if(this.model.render_parents&&(O=z.get_closest_parent_by_tile_xyz(D,F,I),j=O[0],T=O[1],S=O[2],x=z.tile_xyz_to_key(j,T,S),k=z.tiles[x],null!=k&&k.loaded&&s.call(M,x)<0&&M.push(x),L))for(n=z.children_by_tile_xyz(D,F,I),h=0,y=n.length;h<y;h++)e=n[h],a=e[0],l=e[1],u=e[2],o=e[3],i=z.tile_xyz_to_key(a,l,u),i in z.tiles&&n.push(i);null==E&&w.push(A)}for(this._render_tiles(M),this._render_tiles(n),this._render_tiles(r),d=0,g=r.length;d<g;d++)A=r[d],z.tiles[A].current=!0;return null!=this.render_timer&&clearTimeout(this.render_timer),this.render_timer=setTimeout(function(t){return function(){return t._fetch_tiles(w)}}(this),65)},e}(u.RendererView),r.TileRenderer=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.TileRendererView,e.prototype.type=\"TileRenderer\",e.define({alpha:[_.Number,1],x_range_name:[_.String,\"default\"],y_range_name:[_.String,\"default\"],tile_source:[_.Instance,function(){return new l.WMTSTileSource}],render_parents:[_.Bool,!0]}),e.override({level:\"underlay\"}),e}(u.Renderer)},{\"../renderers/renderer\":\"models/renderers/renderer\",\"./image_pool\":\"models/tiles/image_pool\",\"./wmts_tile_source\":\"models/tiles/wmts_tile_source\",\"core/dom\":\"core/dom\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/tiles/tile_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./image_pool\"),s=t(\"./tile_utils\"),a=t(\"core/logging\"),l=t(\"core/properties\"),u=t(\"../../model\");r.TileSource=function(t){function e(t){null==t&&(t={}),e.__super__.constructor.apply(this,arguments),this.utils=new s.ProjectionUtils,this.pool=new n.ImagePool,this.tiles={},this.normalize_case()}return o(e,t),e.prototype.type=\"TileSource\",e.define({url:[l.String,\"\"],tile_size:[l.Number,256],max_zoom:[l.Number,30],min_zoom:[l.Number,0],extra_url_vars:[l.Any,{}],attribution:[l.String,\"\"],x_origin_offset:[l.Number],y_origin_offset:[l.Number],initial_resolution:[l.Number]}),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.normalize_case()},e.prototype.string_lookup_replace=function(t,e){var r,o,i;o=t;for(r in e)i=e[r],o=o.replace(\"{\"+r+\"}\",i.toString());return o},e.prototype.normalize_case=function(){\"Note: should probably be refactored into subclasses.\";var t;return t=this.url,t=t.replace(\"{x}\",\"{X}\"),t=t.replace(\"{y}\",\"{Y}\"),t=t.replace(\"{z}\",\"{Z}\"),t=t.replace(\"{q}\",\"{Q}\"),t=t.replace(\"{xmin}\",\"{XMIN}\"),t=t.replace(\"{ymin}\",\"{YMIN}\"),t=t.replace(\"{xmax}\",\"{XMAX}\"),t=t.replace(\"{ymax}\",\"{YMAX}\"),this.url=t},e.prototype.update=function(){var t,e,r,o;a.logger.debug(\"TileSource: tile cache count: \"+Object.keys(this.tiles).length),e=this.tiles,r=[];for(t in e)o=e[t],o.current=!1,r.push(o.retain=!1);return r},e.prototype.tile_xyz_to_key=function(t,e,r){var o;return o=t+\":\"+e+\":\"+r},e.prototype.key_to_tile_xyz=function(t){var e;return function(){var r,o,i,n;for(i=t.split(\":\"),n=[],r=0,o=i.length;r<o;r++)e=i[r],n.push(parseInt(e));return n}()},e.prototype.sort_tiles_from_center=function(t,e){var r,o,i,n,s,a;return n=e[0],a=e[1],i=e[2],s=e[3],r=(i-n)/2+n,o=(s-a)/2+a,t.sort(function(t,e){var i,n;return i=Math.sqrt(Math.pow(r-t[0],2)+Math.pow(o-t[1],2)),n=Math.sqrt(Math.pow(r-e[0],2)+Math.pow(o-e[1],2)),i-n}),t},e.prototype.prune_tiles=function(){var t,e,r,o,i;e=this.tiles;for(t in e)i=e[t],i.retain=i.current||i.tile_coords[2]<3,i.current&&(this.retain_neighbors(i),this.retain_children(i),this.retain_parents(i));r=this.tiles,o=[];for(t in r)i=r[t],i.retain?o.push(void 0):o.push(this.remove_tile(t));return o},e.prototype.remove_tile=function(t){var e;if(e=this.tiles[t],null!=e)return this.pool.push(e.img),delete this.tiles[t]},e.prototype.get_image_url=function(t,e,r){var o;return o=this.string_lookup_replace(this.url,this.extra_url_vars),o.replace(\"{X}\",t).replace(\"{Y}\",e).replace(\"{Z}\",r)},e.prototype.retain_neighbors=function(t){throw new Error(\"Not Implemented\")},e.prototype.retain_parents=function(t){throw new Error(\"Not Implemented\")},e.prototype.retain_children=function(t){throw new Error(\"Not Implemented\")},e.prototype.tile_xyz_to_quadkey=function(t,e,r){throw new Error(\"Not Implemented\")},e.prototype.quadkey_to_tile_xyz=function(t){throw new Error(\"Not Implemented\")},e}(u.Model)},{\"../../model\":\"model\",\"./image_pool\":\"models/tiles/image_pool\",\"./tile_utils\":\"models/tiles/tile_utils\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/tiles/tile_utils\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"core/util/proj4\");r.ProjectionUtils=function(){function t(){this.origin_shift=2*Math.PI*6378137/2}return t.prototype.geographic_to_meters=function(t,e){return o.proj4(o.wgs84,o.mercator,[t,e])},t.prototype.meters_to_geographic=function(t,e){return o.proj4(o.mercator,o.wgs84,[t,e])},t.prototype.geographic_extent_to_meters=function(t){var e,r,o,i,n,s;return i=t[0],s=t[1],o=t[2],n=t[3],e=this.geographic_to_meters(i,s),i=e[0],s=e[1],r=this.geographic_to_meters(o,n),o=r[0],n=r[1],[i,s,o,n]},t.prototype.meters_extent_to_geographic=function(t){var e,r,o,i,n,s;return i=t[0],s=t[1],o=t[2],n=t[3],e=this.meters_to_geographic(i,s),i=e[0],s=e[1],r=this.meters_to_geographic(o,n),o=r[0],n=r[1],[i,s,o,n]},t}()},{\"core/util/proj4\":\"core/util/proj4\"}],\"models/tiles/tms_tile_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./mercator_tile_source\");r.TMSTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"TMSTileSource\",e.prototype.get_image_url=function(t,e,r){var o;return o=this.string_lookup_replace(this.url,this.extra_url_vars),o.replace(\"{X}\",t).replace(\"{Y}\",e).replace(\"{Z}\",r)},e}(n.MercatorTileSource)},{\"./mercator_tile_source\":\"models/tiles/mercator_tile_source\"}],\"models/tiles/wmts_tile_source\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./mercator_tile_source\");r.WMTSTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"WMTSTileSource\",e.prototype.get_image_url=function(t,e,r){var o,i;return o=this.string_lookup_replace(this.url,this.extra_url_vars),i=this.tms_to_wmts(t,e,r),t=i[0],e=i[1],r=i[2],o.replace(\"{X}\",t).replace(\"{Y}\",e).replace(\"{Z}\",r)},e}(n.MercatorTileSource)},{\"./mercator_tile_source\":\"models/tiles/mercator_tile_source\"}],\"models/tools/actions/action_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../button_tool\"),s=t(\"core/signaling\");r.ActionToolButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._clicked=function(){return this.model[\"do\"].emit()},e}(n.ButtonToolButtonView),r.ActionToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model[\"do\"],function(){return this.doit()})},e}(n.ButtonToolView),r.ActionTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this[\"do\"]=new s.Signal(this,\"do\")},e}(n.ButtonTool)},{\"../button_tool\":\"models/tools/button_tool\",\"core/signaling\":\"core/signaling\"}],\"models/tools/actions/help_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./action_tool\"),s=t(\"core/properties\");r.HelpToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.doit=function(){return window.open(this.model.redirect)},e}(n.ActionToolView),r.HelpTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.HelpToolView,e.prototype.type=\"HelpTool\",e.prototype.tool_name=\"Help\",e.prototype.icon=\"bk-tool-icon-help\",e.define({help_tooltip:[s.String,\"Click the question mark to learn more about Bokeh plot tools.\"],redirect:[s.String,\"http://bokeh.pydata.org/en/latest/docs/user_guide/tools.html#built-in-tools\"]}),e.getters({tooltip:function(){return this.help_tooltip}}),e}(n.ActionTool)},{\"./action_tool\":\"models/tools/actions/action_tool\",\"core/properties\":\"core/properties\"}],\"models/tools/actions/redo_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./action_tool\");r.RedoToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.plot_view.state_changed,function(t){return function(){return t.model.disabled=!t.plot_view.can_redo()}}(this))},e.prototype.doit=function(){return this.plot_view.redo()},e}(n.ActionToolView),r.RedoTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.RedoToolView,e.prototype.type=\"RedoTool\",e.prototype.tool_name=\"Redo\",e.prototype.icon=\"bk-tool-icon-redo\",e.override({disabled:!0}),e}(n.ActionTool)},{\"./action_tool\":\"models/tools/actions/action_tool\"}],\"models/tools/actions/reset_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./action_tool\"),s=t(\"core/properties\");r.ResetToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.doit=function(){if(this.plot_view.clear_state(),this.plot_view.reset_range(),this.plot_view.reset_selection(),this.model.reset_size)return this.plot_view.reset_dimensions()},e}(n.ActionToolView),r.ResetTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.ResetToolView,e.prototype.type=\"ResetTool\",e.prototype.tool_name=\"Reset\",e.prototype.icon=\"bk-tool-icon-reset\",e.define({reset_size:[s.Bool,!0]}),e}(n.ActionTool)},{\"./action_tool\":\"models/tools/actions/action_tool\",\"core/properties\":\"core/properties\"}],\"models/tools/actions/save_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./action_tool\");r.SaveToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.doit=function(){return this.plot_view.save(\"bokeh_plot\")},e}(n.ActionToolView),r.SaveTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.SaveToolView,e.prototype.type=\"SaveTool\",e.prototype.tool_name=\"Save\",e.prototype.icon=\"bk-tool-icon-save\",e}(n.ActionTool)},{\"./action_tool\":\"models/tools/actions/action_tool\"}],\"models/tools/actions/undo_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./action_tool\");r.UndoToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.plot_view.state_changed,function(t){return function(){return t.model.disabled=!t.plot_view.can_undo()}}(this))},e.prototype.doit=function(){return this.plot_view.undo()},e}(n.ActionToolView),r.UndoTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.UndoToolView,e.prototype.type=\"UndoTool\",e.prototype.tool_name=\"Undo\",e.prototype.icon=\"bk-tool-icon-undo\",e.override({disabled:!0}),e}(n.ActionTool)},{\"./action_tool\":\"models/tools/actions/action_tool\"}],\"models/tools/actions/zoom_in_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./action_tool\"),s=t(\"core/util/zoom\"),a=t(\"core/properties\");r.ZoomInToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.doit=function(){var t,e,r,o,i;return e=this.plot_model.frame,t=this.model.dimensions,r=\"width\"===t||\"both\"===t,o=\"height\"===t||\"both\"===t,i=s.scale_range(e,this.model.factor,r,o),this.plot_view.push_state(\"zoom_out\",{range:i}),this.plot_view.update_range(i,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(n.ActionToolView),r.ZoomInTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.ZoomInToolView,e.prototype.type=\"ZoomInTool\",e.prototype.tool_name=\"Zoom In\",e.prototype.icon=\"bk-tool-icon-zoom-in\",e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e.define({factor:[a.Percent,.1],dimensions:[a.Dimensions,\"both\"]}),e}(n.ActionTool)},{\"./action_tool\":\"models/tools/actions/action_tool\",\"core/properties\":\"core/properties\",\"core/util/zoom\":\"core/util/zoom\"}],\"models/tools/actions/zoom_out_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./action_tool\"),s=t(\"core/util/zoom\"),a=t(\"core/properties\");r.ZoomOutToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.doit=function(){var t,e,r,o,i;return e=this.plot_model.frame,t=this.model.dimensions,r=\"width\"===t||\"both\"===t,o=\"height\"===t||\"both\"===t,i=s.scale_range(e,-this.model.factor,r,o),this.plot_view.push_state(\"zoom_out\",{range:i}),this.plot_view.update_range(i,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(n.ActionToolView),r.ZoomOutTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.ZoomOutToolView,e.prototype.type=\"ZoomOutTool\",e.prototype.tool_name=\"Zoom Out\",e.prototype.icon=\"bk-tool-icon-zoom-out\",e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e.define({factor:[a.Percent,.1],dimensions:[a.Dimensions,\"both\"]}),e}(n.ActionTool)},{\"./action_tool\":\"models/tools/actions/action_tool\",\"core/properties\":\"core/properties\",\"core/util/zoom\":\"core/util/zoom\"}],\"models/tools/button_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/dom_view\"),s=t(\"./tool\"),a=t(\"core/dom\"),l=t(\"core/properties\");r.ButtonToolButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-toolbar-button\",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.change,function(t){return function(){return t.render()}}(this)),this.el.addEventListener(\"click\",function(t){return function(e){return t._clicked(e)}}(this)),this.render()},e.prototype.render=function(){var t,e;return a.empty(this.el),this.el.disabled=this.model.disabled,t=a.div({\"class\":[\"bk-btn-icon\",this.model.icon]}),e=a.span({\"class\":\"bk-tip\"},this.model.tooltip),this.el.appendChild(t),this.el.appendChild(e)},e.prototype._clicked=function(t){},e}(n.DOMView),r.ButtonToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(s.ToolView),r.ButtonTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.icon=null,e.getters({tooltip:function(){return this.tool_name}}),e.internal({disabled:[l.Boolean,!1]}),e}(s.Tool)},{\"./tool\":\"models/tools/tool\",\"core/dom\":\"core/dom\",\"core/dom_view\":\"core/dom_view\",\"core/properties\":\"core/properties\"}],\"models/tools/gestures/box_select_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./select_tool\"),a=t(\"../../annotations/box_annotation\"),l=t(\"core/properties\");r.BoxSelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._pan_start=function(t){var e;return e=this.plot_view.canvas,this._baseboint=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],null},e.prototype._pan=function(t){var e,r,o,i,n,s,a,l,u;return r=this.plot_view.canvas,o=[r.sx_to_vx(t.bokeh.sx),r.sy_to_vy(t.bokeh.sy)],n=this.plot_model.frame,i=this.model.dimensions,s=this.model._get_dim_limits(this._baseboint,o,n,i),l=s[0],u=s[1],this.model.overlay.update({left:l[0],right:l[1],top:u[1],bottom:u[0]}),this.model.select_every_mousemove&&(e=null!=(a=t.srcEvent.shiftKey)&&a,this._select(l,u,!1,e)),null},e.prototype._pan_end=function(t){var e,r,o,i,n,s,a,l,u;return r=this.plot_view.canvas,o=[r.sx_to_vx(t.bokeh.sx),r.sy_to_vy(t.bokeh.sy)],n=this.plot_model.frame,i=this.model.dimensions,s=this.model._get_dim_limits(this._baseboint,o,n,i),l=s[0],u=s[1],e=null!=(a=t.srcEvent.shiftKey)&&a,this._select(l,u,!0,e),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._baseboint=null,this.plot_view.push_state(\"box_select\",{selection:this.plot_view.get_selection()}),null},e.prototype._select=function(t,e,r,o){var i,n,s,a,l,u,c,_,p,h;c=t[0],_=t[1],p=e[0],h=e[1],null==o&&(o=!1),n={type:\"rect\",vx0:c,vx1:_,vy0:p,vy1:h},l=this.model._computed_renderers_by_data_source();for(i in l)a=l[i],u=a[0].data_source.selection_manager,u.select(this,function(){var t,e,r;for(r=[],t=0,e=a.length;t<e;t++)s=a[t],r.push(this.plot_view.renderer_views[s.id]);return r}.call(this),n,r,o);return null!=this.model.callback&&this._emit_callback(n),this._save_geometry(n,r,o),null},e.prototype._emit_callback=function(t){var e,r,o,i,n;o=this.model.computed_renderers[0],e=this.plot_model.canvas,r=this.plot_model.frame,t.sx0=e.vx_to_sx(t.vx0),t.sx1=e.vx_to_sx(t.vx1),t.sy0=e.vy_to_sy(t.vy0),t.sy1=e.vy_to_sy(t.vy1),i=r.xscales[o.x_range_name],n=r.yscales[o.y_range_name],t.x0=i.invert(t.vx0),t.x1=i.invert(t.vx1),t.y0=n.invert(t.vy0),t.y1=n.invert(t.vy1),this.model.callback.execute(this.model,{geometry:t})},e}(s.SelectToolView),o=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]}})},r.BoxSelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.BoxSelectToolView,e.prototype.type=\"BoxSelectTool\",e.prototype.tool_name=\"Box Select\",e.prototype.icon=\"bk-tool-icon-box-select\",e.prototype.event_type=\"pan\",e.prototype.default_order=30,e.define({dimensions:[l.Dimensions,\"both\"],select_every_mousemove:[l.Bool,!1],callback:[l.Instance],overlay:[l.Instance,o]}),e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e}(s.SelectTool)},{\"../../annotations/box_annotation\":\"models/annotations/box_annotation\",\"./select_tool\":\"models/tools/gestures/select_tool\",\"core/properties\":\"core/properties\"}],\"models/tools/gestures/box_zoom_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./gesture_tool\"),a=t(\"../../annotations/box_annotation\"),l=t(\"core/properties\");r.BoxZoomToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._match_aspect=function(t,e,r){var o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b;return s=r.h_range.end,a=r.h_range.start,d=r.v_range.end,m=r.v_range.start,g=s-a,n=d-m,o=g/n,y=Math.abs(t[0]-e[0]),f=Math.abs(t[1]-e[1]),h=0===f?0:y/f,h>=o?(u=[1,h/o],v=u[0],b=u[1]):(c=[o/h,1],v=c[0],b=c[1]),t[0]<=e[0]?(l=t[0],_=t[0]+y*v,_>s&&(_=s)):(_=t[0],l=t[0]-y*v,l<a&&(l=a)),y=Math.abs(_-l),t[1]<=e[1]?(i=t[1],p=t[1]+y/o,p>d&&(p=d)):(p=t[1],i=t[1]-y/o,i<m&&(i=m)),f=Math.abs(p-i),t[0]<=e[0]?_=t[0]+o*f:l=t[0]-o*f,[[l,_],[i,p]]},e.prototype._pan_start=function(t){var e;return e=this.plot_view.canvas,this._baseboint=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],null},e.prototype._pan=function(t){var e,r,o,i,n,s,a,l;return e=this.plot_view.canvas,r=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],i=this.plot_model.frame,o=this.model.dimensions,this.model.match_aspect&&\"both\"===o?(n=this._match_aspect(this._baseboint,r,i),a=n[0],l=n[1]):(s=this.model._get_dim_limits(this._baseboint,r,i,o),a=s[0],l=s[1]),this.model.overlay.update({left:a[0],right:a[1],top:l[1],bottom:l[0]}),null},e.prototype._pan_end=function(t){var e,r,o,i,n,s,a,l;return e=this.plot_view.canvas,r=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],i=this.plot_model.frame,o=this.model.dimensions,this.model.match_aspect&&\"both\"===o?(n=this._match_aspect(this._baseboint,r,i),a=n[0],l=n[1]):(s=this.model._get_dim_limits(this._baseboint,r,i,o),a=s[0],l=s[1]),this._update(a,l),this.model.overlay.update({left:null,right:null,top:null,bottom:null}),this._baseboint=null,null},e.prototype._update=function(t,e){var r,o,i,n,s,a,l,u,c,_,p;if(!(Math.abs(t[1]-t[0])<=5||Math.abs(e[1]-e[0])<=5)){c={},i=this.plot_view.frame.xscales;for(o in i)l=i[o],n=l.v_invert(t,!0),u=n[0],r=n[1],c[o]={start:u,end:r};_={},s=this.plot_view.frame.yscales;for(o in s)l=s[o],a=l.v_invert(e,!0),u=a[0],r=a[1],_[o]={start:u,end:r};return p={xrs:c,yrs:_},this.plot_view.push_state(\"box_zoom\",{range:p}),this.plot_view.update_range(p)}},e}(s.GestureToolView),o=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]}})},r.BoxZoomTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.BoxZoomToolView,e.prototype.type=\"BoxZoomTool\",e.prototype.tool_name=\"Box Zoom\",e.prototype.icon=\"bk-tool-icon-box-zoom\",e.prototype.event_type=\"pan\",e.prototype.default_order=20,e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e.define({dimensions:[l.Dimensions,\"both\"],overlay:[l.Instance,o],match_aspect:[l.Bool,!1]}),e}(s.GestureTool)},{\"../../annotations/box_annotation\":\"models/annotations/box_annotation\",\"./gesture_tool\":\"models/tools/gestures/gesture_tool\",\"core/properties\":\"core/properties\"}],\"models/tools/gestures/gesture_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../button_tool\");r.GestureToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(n.ButtonToolView),r.GestureTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.event_type=null,e.prototype.default_order=null,e}(n.ButtonTool)},{\"../button_tool\":\"models/tools/button_tool\"}],\"models/tools/gestures/lasso_select_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./select_tool\"),a=t(\"../../annotations/poly_annotation\"),l=t(\"core/properties\");r.LassoSelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.properties.active.change,function(){return this._active_change()}),this.data=null},e.prototype._active_change=function(){if(!this.model.active)return this._clear_overlay()},e.prototype._keyup=function(t){if(13===t.keyCode)return this._clear_overlay()},e.prototype._pan_start=function(t){var e,r,o;return e=this.plot_view.canvas,r=e.sx_to_vx(t.bokeh.sx),o=e.sy_to_vy(t.bokeh.sy),this.data={vx:[r],vy:[o]},null},e.prototype._pan=function(t){var e,r,o,i,n,s,a,l;if(r=this.plot_view.canvas,a=r.sx_to_vx(t.bokeh.sx),l=r.sy_to_vy(t.bokeh.sy),o=this.plot_model.frame.h_range,s=this.plot_model.frame.v_range,a>o.end&&(a=o.end),a<o.start&&(a=o.start),l>s.end&&(l=s.end),l<s.start&&(l=s.start),this.data.vx.push(a),this.data.vy.push(l),i=this.model.overlay,i.update({xs:this.data.vx,ys:this.data.vy}),this.model.select_every_mousemove)return e=null!=(n=t.srcEvent.shiftKey)&&n,this._select(this.data.vx,this.data.vy,!1,e)},e.prototype._pan_end=function(t){var e,r;return this._clear_overlay(),e=null!=(r=t.srcEvent.shiftKey)&&r,this._select(this.data.vx,this.data.vy,!0,e),this.plot_view.push_state(\"lasso_select\",{selection:this.plot_view.get_selection()})},e.prototype._clear_overlay=function(){return this.model.overlay.update({xs:[],ys:[]})},e.prototype._select=function(t,e,r,o){var i,n,s,a,l,u;n={type:\"poly\",vx:t,vy:e},l=this.model._computed_renderers_by_data_source();for(i in l)a=l[i],u=a[0].data_source.selection_manager,u.select(this,function(){var t,e,r;for(r=[],t=0,e=a.length;t<e;t++)s=a[t],r.push(this.plot_view.renderer_views[s.id]);return r}.call(this),n,r,o);return null!=this.model.callback&&this._emit_callback(n),this._save_geometry(n,r,o),null},e.prototype._emit_callback=function(t){var e,r,o,i,n;o=this.model.computed_renderers[0],e=this.plot_model.canvas,r=this.plot_model.frame,t.sx=e.v_vx_to_sx(t.vx),t.sy=e.v_vy_to_sy(t.vy),i=r.xscales[o.x_range_name],n=r.yscales[o.y_range_name],t.x=i.v_invert(t.vx),t.y=n.v_invert(t.vy),this.model.callback.execute(this.model,{geometry:t})},e}(s.SelectToolView),o=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]}})},r.LassoSelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.LassoSelectToolView,e.prototype.type=\"LassoSelectTool\",e.prototype.tool_name=\"Lasso Select\",e.prototype.icon=\"bk-tool-icon-lasso-select\",e.prototype.event_type=\"pan\",e.prototype.default_order=12,e.define({select_every_mousemove:[l.Bool,!0],callback:[l.Instance],\n",
" overlay:[l.Instance,o]}),e}(s.SelectTool)},{\"../../annotations/poly_annotation\":\"models/annotations/poly_annotation\",\"./select_tool\":\"models/tools/gestures/select_tool\",\"core/properties\":\"core/properties\"}],\"models/tools/gestures/pan_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./gesture_tool\"),s=t(\"core/properties\");r.PanToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._pan_start=function(t){var e,r,o,i,n,s;return this.last_dx=0,this.last_dy=0,e=this.plot_view.canvas,r=this.plot_view.frame,n=e.sx_to_vx(t.bokeh.sx),s=e.sy_to_vy(t.bokeh.sy),r.contains(n,s)||(o=r.h_range,i=r.v_range,(n<o.start||n>o.end)&&(this.v_axis_only=!0),(s<i.start||s>i.end)&&(this.h_axis_only=!0)),this.plot_view.interactive_timestamp=Date.now()},e.prototype._pan=function(t){return this._update(t.deltaX,-t.deltaY),this.plot_view.interactive_timestamp=Date.now()},e.prototype._pan_end=function(t){if(this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info)return this.plot_view.push_state(\"pan\",{range:this.pan_info})},e.prototype._update=function(t,e){var r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O;i=this.plot_view.frame,l=t-this.last_dx,u=e-this.last_dy,n=i.h_range,w=n.start-l,b=n.end-l,T=i.v_range,j=T.start-u,M=T.end-u,r=this.model.dimensions,\"width\"!==r&&\"both\"!==r||this.v_axis_only?(g=n.start,v=n.end,f=0):(g=w,v=b,f=-l),\"height\"!==r&&\"both\"!==r||this.h_axis_only?(x=T.start,k=T.end,m=0):(x=j,k=M,m=u),this.last_dx=t,this.last_dy=e,S={},c=i.xscales;for(a in c)d=c[a],_=d.v_invert([g,v],!0),y=_[0],o=_[1],S[a]={start:y,end:o};O={},p=i.yscales;for(a in p)d=p[a],h=d.v_invert([x,k],!0),y=h[0],o=h[1],O[a]={start:y,end:o};return this.pan_info={xrs:S,yrs:O,sdx:f,sdy:m},this.plot_view.update_range(this.pan_info,s=!0),null},e}(n.GestureToolView),r.PanTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.PanToolView,e.prototype.type=\"PanTool\",e.prototype.tool_name=\"Pan\",e.prototype.event_type=\"pan\",e.prototype.default_order=10,e.define({dimensions:[s.Dimensions,\"both\"]}),e.getters({tooltip:function(){return this._get_dim_tooltip(\"Pan\",this.dimensions)},icon:function(){var t;return t=function(){switch(this.dimensions){case\"both\":return\"pan\";case\"width\":return\"xpan\";case\"height\":return\"ypan\"}}.call(this),\"bk-tool-icon-\"+t}}),e}(n.GestureTool)},{\"./gesture_tool\":\"models/tools/gestures/gesture_tool\",\"core/properties\":\"core/properties\"}],\"models/tools/gestures/poly_select_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./select_tool\"),a=t(\"../../annotations/poly_annotation\"),l=t(\"core/properties\"),u=t(\"core/util/array\");r.PolySelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.connect(this.model.properties.active.change,function(){return this._active_change()}),this.data={vx:[],vy:[]}},e.prototype._active_change=function(){if(!this.model.active)return this._clear_data()},e.prototype._keyup=function(t){if(13===t.keyCode)return this._clear_data()},e.prototype._doubletap=function(t){var e,r;return e=null!=(r=t.srcEvent.shiftKey)&&r,this._select(this.data.vx,this.data.vy,!0,e),this._clear_data()},e.prototype._clear_data=function(){return this.data={vx:[],vy:[]},this.model.overlay.update({xs:[],ys:[]})},e.prototype._tap=function(t){var e,r,o;return e=this.plot_view.canvas,r=e.sx_to_vx(t.bokeh.sx),o=e.sy_to_vy(t.bokeh.sy),this.data.vx.push(r),this.data.vy.push(o),this.model.overlay.update({xs:u.copy(this.data.vx),ys:u.copy(this.data.vy)})},e.prototype._select=function(t,e,r,o){var i,n,s,a,l,u;n={type:\"poly\",vx:t,vy:e},l=this.model._computed_renderers_by_data_source();for(i in l)a=l[i],u=a[0].data_source.selection_manager,u.select(this,function(){var t,e,r;for(r=[],t=0,e=a.length;t<e;t++)s=a[t],r.push(this.plot_view.renderer_views[s.id]);return r}.call(this),n,r,o);return this._save_geometry(n,r,o),this.plot_view.push_state(\"poly_select\",{selection:this.plot_view.get_selection()}),null},e}(s.SelectToolView),o=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]}})},r.PolySelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.PolySelectToolView,e.prototype.type=\"PolySelectTool\",e.prototype.tool_name=\"Poly Select\",e.prototype.icon=\"bk-tool-icon-polygon-select\",e.prototype.event_type=\"tap\",e.prototype.default_order=11,e.define({overlay:[l.Instance,o]}),e}(s.SelectTool)},{\"../../annotations/poly_annotation\":\"models/annotations/poly_annotation\",\"./select_tool\":\"models/tools/gestures/select_tool\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/tools/gestures/resize_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./gesture_tool\"),s=t(\"core/dom\");r.ResizeToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-resize-popup\",e.prototype.initialize=function(t){var r;return e.__super__.initialize.call(this,t),this.overlay=s.div(),r=this.plot_view.canvas_view.el,r.appendChild(this.overlay),s.hide(this.overlay),this.active=!1,null},e.prototype.activate=function(){return this.active=!0,this.render(),null},e.prototype.deactivate=function(){return this.active=!1,this.render(),null},e.prototype.render=function(t){var e,r,o,i;return this.active?(e=this.plot_view.canvas,r=this.plot_view.frame,o=e.vx_to_sx(r.h_range.end-40),i=e.vy_to_sy(r.v_range.start+40),this.overlay.style.position=\"absolute\",this.overlay.style.top=i+\"px\",this.overlay.style.left=o+\"px\",s.show(this.overlay)):s.hide(this.overlay),this},e.prototype._pan_start=function(t){var e;return e=this.plot_view.canvas,this.ch=e._height.value,this.cw=e._width.value,this.plot_view.interactive_timestamp=Date.now(),null},e.prototype._pan=function(t){return this._update(t.deltaX,t.deltaY),this.plot_view.interactive_timestamp=Date.now(),null},e.prototype._pan_end=function(t){return this.plot_view.push_state(\"resize\",{dimensions:{width:this.plot_view.canvas._width.value,height:this.plot_view.canvas._height.value}})},e.prototype._update=function(t,e){var r,o;o=this.cw+t,r=this.ch+e,o<100||r<100||this.plot_view.update_dimensions(o,r)},e}(n.GestureToolView),r.ResizeTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.ResizeToolView,e.prototype.type=\"ResizeTool\",e.prototype.tool_name=\"Resize\",e.prototype.icon=\"bk-tool-icon-resize\",e.prototype.event_type=\"pan\",e.prototype.default_order=40,e}(n.GestureTool)},{\"./gesture_tool\":\"models/tools/gestures/gesture_tool\",\"core/dom\":\"core/dom\"}],\"models/tools/gestures/select_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./gesture_tool\"),s=t(\"../../renderers/glyph_renderer\"),a=t(\"core/logging\"),l=t(\"core/properties\"),u=t(\"core/util/object\");r.SelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._keyup=function(t){var e,r,o,i,n,s,a;if(27===t.keyCode){for(n=this.model.computed_renderers,s=[],r=0,o=n.length;r<o;r++)i=n[r],e=i.data_source,a=e.selection_manager,s.push(a.clear());return s}},e.prototype._save_geometry=function(t,e,r){var o,i,n,s,l,c,_,p;switch(o=u.clone(t),_=this.plot_view.frame.xscales[\"default\"],p=this.plot_view.frame.yscales[\"default\"],o.type){case\"point\":o.x=_.invert(o.vx),o.y=p.invert(o.vy);break;case\"rect\":o.x0=_.invert(o.vx0),o.y0=p.invert(o.vy0),o.x1=_.invert(o.vx1),o.y1=p.invert(o.vy1);break;case\"poly\":for(o.x=new Array(o.vx.length),o.y=new Array(o.vy.length),n=s=0,l=o.vx.length;0<=l?s<l:s>l;n=0<=l?++s:--s)o.x[n]=_.invert(o.vx[n]),o.y[n]=p.invert(o.vy[n]);break;default:a.logger.debug(\"Unrecognized selection geometry type: '\"+o.type+\"'\")}return e&&(c=this.plot_model.plot.tool_events,r?(i=c.geometries,i.push(o)):i=[o],c.geometries=i),null},e}(n.GestureToolView),r.SelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.define({renderers:[l.Array,[]],names:[l.Array,[]]}),e.internal({multi_select_modifier:[l.String,\"shift\"]}),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.properties.renderers.change,function(){return this._computed_renderers=null}),this.connect(this.properties.names.change,function(){return this._computed_renderers=null}),this.connect(this.properties.plot.change,function(){return this._computed_renderers=null})},e.prototype._compute_renderers=function(){var t,e,r,o;return o=this.renderers,e=this.names,0===o.length&&(t=this.plot.renderers,o=function(){var e,o,i;for(i=[],e=0,o=t.length;e<o;e++)r=t[e],r instanceof s.GlyphRenderer&&i.push(r);return i}()),e.length>0&&(o=function(){var t,i,n;for(n=[],t=0,i=o.length;t<i;t++)r=o[t],e.indexOf(r.name)>=0&&n.push(r);return n}()),o},e.getters({computed_renderers:function(){return null==this._computed_renderers&&(this._computed_renderers=this._compute_renderers()),this._computed_renderers}}),e.prototype._computed_renderers_by_data_source=function(){var t,e,r,o,i;for(i={},o=this.computed_renderers,t=0,e=o.length;t<e;t++)r=o[t],r.data_source.id in i?i[r.data_source.id]=i[r.data_source.id].concat([r]):i[r.data_source.id]=[r];return i},e}(n.GestureTool)},{\"../../renderers/glyph_renderer\":\"models/renderers/glyph_renderer\",\"./gesture_tool\":\"models/tools/gestures/gesture_tool\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\"}],\"models/tools/gestures/tap_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./select_tool\"),s=t(\"core/properties\"),a=t(\"core/util/types\");r.TapToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._tap=function(t){var e,r,o,i,n;return r=this.plot_view.canvas,i=r.sx_to_vx(t.bokeh.sx),n=r.sy_to_vy(t.bokeh.sy),e=null!=(o=t.srcEvent.shiftKey)&&o,this._select(i,n,!0,e)},e.prototype._select=function(t,e,r,o){var i,n,s,l,u,c,_,p,h,d,f,m,y,g;if(c={type:\"point\",vx:t,vy:e},n=this.model.callback,this._save_geometry(c,r,o),s={geometries:this.plot_model.plot.tool_events.geometries},\"select\"===this.model.behavior){m=this.model._computed_renderers_by_data_source();for(i in m)f=m[i],u=f[0].data_source,y=u.selection_manager,l=y.select(this,function(){var t,e,r;for(r=[],t=0,e=f.length;t<e;t++)h=f[t],r.push(this.plot_view.renderer_views[h.id]);return r}.call(this),c,r,o),l&&null!=n&&(a.isFunction(n)?n(u,s):n.execute(u,s));this.plot_view.push_state(\"tap\",{selection:this.plot_view.get_selection()})}else for(d=this.model.computed_renderers,_=0,p=d.length;_<p;_++)h=d[_],u=h.data_source,y=u.selection_manager,g=this.plot_view.renderer_views[h.id],l=y.inspect(this,g,c,{geometry:c}),l&&null!=n&&(a.isFunction(n)?n(u,s):n.execute(u,s));return null},e}(n.SelectToolView),r.TapTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.TapToolView,e.prototype.type=\"TapTool\",e.prototype.tool_name=\"Tap\",e.prototype.icon=\"bk-tool-icon-tap-select\",e.prototype.event_type=\"tap\",e.prototype.default_order=10,e.define({behavior:[s.String,\"select\"],callback:[s.Any]}),e}(n.SelectTool)},{\"./select_tool\":\"models/tools/gestures/select_tool\",\"core/properties\":\"core/properties\",\"core/util/types\":\"core/util/types\"}],\"models/tools/gestures/wheel_pan_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./gesture_tool\"),s=t(\"core/properties\");r.WheelPanToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._scroll=function(t){var e;return e=this.model.speed*t.bokeh.delta,e>.9?e=.9:e<-.9&&(e=-.9),this._update_ranges(e)},e.prototype._update_ranges=function(t){var e,r,o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w,x,k,M,j,T;switch(r=this.plot_model.frame,o=r.h_range,g=r.v_range,s=[o.start,o.end],b=s[0],v=s[1],a=[g.start,g.end],k=a[0],x=a[1],this.model.dimension){case\"height\":M=Math.abs(x-k),d=b,f=v,m=k+M*t,y=x+M*t;break;case\"width\":w=Math.abs(v-b),d=b-w*t,f=v-w*t,m=k,y=x}j={},l=r.xscales;for(i in l)p=l[i],u=p.v_invert([d,f],!0),h=u[0],e=u[1],j[i]={start:h,end:e};T={},c=r.yscales;for(i in c)p=c[i],_=p.v_invert([m,y],!0),h=_[0],e=_[1],T[i]={start:h,end:e};return n={xrs:j,yrs:T,factor:t},this.plot_view.push_state(\"wheel_pan\",{range:n}),this.plot_view.update_range(n,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(n.GestureToolView),r.WheelPanTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"WheelPanTool\",e.prototype.default_view=r.WheelPanToolView,e.prototype.tool_name=\"Wheel Pan\",e.prototype.icon=\"bk-tool-icon-wheel-pan\",e.prototype.event_type=\"scroll\",e.prototype.default_order=12,e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimension)}}),e.define({dimension:[s.Dimension,\"width\"]}),e.internal({speed:[s.Number,.001]}),e}(n.GestureTool)},{\"./gesture_tool\":\"models/tools/gestures/gesture_tool\",\"core/properties\":\"core/properties\"}],\"models/tools/gestures/wheel_zoom_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./gesture_tool\"),a=t(\"core/util/zoom\"),l=t(\"core/properties\");\"undefined\"!=typeof o&&null!==o||(o={}),r.WheelZoomToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype._pinch=function(t){var e;return e=t.scale>=1?20*(t.scale-1):-20/t.scale,t.bokeh.delta=e,this._scroll(t)},e.prototype._scroll=function(t){var e,r,o,i,n,s,l,u,c,_;return o=this.plot_model.frame,n=o.h_range,l=o.v_range,u=this.plot_view.canvas.sx_to_vx(t.bokeh.sx),c=this.plot_view.canvas.sy_to_vy(t.bokeh.sy),e=this.model.dimensions,i=(\"width\"===e||\"both\"===e)&&n.min<u&&u<n.max,s=(\"height\"===e||\"both\"===e)&&l.min<c&&c<l.max,r=this.model.speed*t.bokeh.delta,_=a.scale_range(o,r,i,s,{x:u,y:c}),this.plot_view.push_state(\"wheel_zoom\",{range:_}),this.plot_view.update_range(_,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(s.GestureToolView),r.WheelZoomTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.WheelZoomToolView,e.prototype.type=\"WheelZoomTool\",e.prototype.tool_name=\"Wheel Zoom\",e.prototype.icon=\"bk-tool-icon-wheel-zoom\",e.prototype.event_type=\"ontouchstart\"in window||navigator.maxTouchPoints>0?\"pinch\":\"scroll\",e.prototype.default_order=10,e.getters({tooltip:function(){return this._get_dim_tooltip(this.tool_name,this.dimensions)}}),e.define({dimensions:[l.Dimensions,\"both\"]}),e.internal({speed:[l.Number,1/600]}),e}(s.GestureTool)},{\"./gesture_tool\":\"models/tools/gestures/gesture_tool\",\"core/properties\":\"core/properties\",\"core/util/zoom\":\"core/util/zoom\"}],\"models/tools/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./actions/action_tool\");r.ActionTool=o.ActionTool;var i=t(\"./actions/help_tool\");r.HelpTool=i.HelpTool;var n=t(\"./actions/redo_tool\");r.RedoTool=n.RedoTool;var s=t(\"./actions/reset_tool\");r.ResetTool=s.ResetTool;var a=t(\"./actions/save_tool\");r.SaveTool=a.SaveTool;var l=t(\"./actions/undo_tool\");r.UndoTool=l.UndoTool;var u=t(\"./actions/zoom_in_tool\");r.ZoomInTool=u.ZoomInTool;var c=t(\"./actions/zoom_out_tool\");r.ZoomOutTool=c.ZoomOutTool;var _=t(\"./button_tool\");r.ButtonTool=_.ButtonTool;var p=t(\"./gestures/box_select_tool\");r.BoxSelectTool=p.BoxSelectTool;var h=t(\"./gestures/box_zoom_tool\");r.BoxZoomTool=h.BoxZoomTool;var d=t(\"./gestures/gesture_tool\");r.GestureTool=d.GestureTool;var f=t(\"./gestures/lasso_select_tool\");r.LassoSelectTool=f.LassoSelectTool;var m=t(\"./gestures/pan_tool\");r.PanTool=m.PanTool;var y=t(\"./gestures/poly_select_tool\");r.PolySelectTool=y.PolySelectTool;var g=t(\"./gestures/resize_tool\");r.ResizeTool=g.ResizeTool;var v=t(\"./gestures/select_tool\");r.SelectTool=v.SelectTool;var b=t(\"./gestures/tap_tool\");r.TapTool=b.TapTool;var w=t(\"./gestures/wheel_pan_tool\");r.WheelPanTool=w.WheelPanTool;var x=t(\"./gestures/wheel_zoom_tool\");r.WheelZoomTool=x.WheelZoomTool;var k=t(\"./inspectors/crosshair_tool\");r.CrosshairTool=k.CrosshairTool;var M=t(\"./inspectors/hover_tool\");r.HoverTool=M.HoverTool;var j=t(\"./inspectors/inspect_tool\");r.InspectTool=j.InspectTool;var T=t(\"./tool\");r.Tool=T.Tool;var S=t(\"./tool_events\");r.ToolEvents=S.ToolEvents;var O=t(\"./tool_proxy\");r.ToolProxy=O.ToolProxy;var P=t(\"./toolbar\");r.Toolbar=P.Toolbar;var A=t(\"./toolbar_base\");r.ToolbarBase=A.ToolbarBase;var E=t(\"./toolbar_box\");r.ToolbarBoxToolbar=E.ToolbarBoxToolbar;var z=t(\"./toolbar_box\");r.ToolbarBox=z.ToolbarBox},{\"./actions/action_tool\":\"models/tools/actions/action_tool\",\"./actions/help_tool\":\"models/tools/actions/help_tool\",\"./actions/redo_tool\":\"models/tools/actions/redo_tool\",\"./actions/reset_tool\":\"models/tools/actions/reset_tool\",\"./actions/save_tool\":\"models/tools/actions/save_tool\",\"./actions/undo_tool\":\"models/tools/actions/undo_tool\",\"./actions/zoom_in_tool\":\"models/tools/actions/zoom_in_tool\",\"./actions/zoom_out_tool\":\"models/tools/actions/zoom_out_tool\",\"./button_tool\":\"models/tools/button_tool\",\"./gestures/box_select_tool\":\"models/tools/gestures/box_select_tool\",\"./gestures/box_zoom_tool\":\"models/tools/gestures/box_zoom_tool\",\"./gestures/gesture_tool\":\"models/tools/gestures/gesture_tool\",\"./gestures/lasso_select_tool\":\"models/tools/gestures/lasso_select_tool\",\"./gestures/pan_tool\":\"models/tools/gestures/pan_tool\",\"./gestures/poly_select_tool\":\"models/tools/gestures/poly_select_tool\",\"./gestures/resize_tool\":\"models/tools/gestures/resize_tool\",\"./gestures/select_tool\":\"models/tools/gestures/select_tool\",\"./gestures/tap_tool\":\"models/tools/gestures/tap_tool\",\"./gestures/wheel_pan_tool\":\"models/tools/gestures/wheel_pan_tool\",\"./gestures/wheel_zoom_tool\":\"models/tools/gestures/wheel_zoom_tool\",\"./inspectors/crosshair_tool\":\"models/tools/inspectors/crosshair_tool\",\"./inspectors/hover_tool\":\"models/tools/inspectors/hover_tool\",\"./inspectors/inspect_tool\":\"models/tools/inspectors/inspect_tool\",\"./tool\":\"models/tools/tool\",\"./tool_events\":\"models/tools/tool_events\",\"./tool_proxy\":\"models/tools/tool_proxy\",\"./toolbar\":\"models/tools/toolbar\",\"./toolbar_base\":\"models/tools/toolbar_base\",\"./toolbar_box\":\"models/tools/toolbar_box\"}],\"models/tools/inspectors/crosshair_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./inspect_tool\"),s=t(\"../../annotations/span\"),a=t(\"core/properties\"),l=t(\"core/util/object\");r.CrosshairToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype._move=function(t){var e,r,o,i;if(this.model.active)return r=this.plot_model.frame,e=this.plot_model.canvas,o=e.sx_to_vx(t.bokeh.sx),i=e.sy_to_vy(t.bokeh.sy),r.contains(o,i)||(o=i=null),this._update_spans(o,i)},e.prototype._move_exit=function(t){return this._update_spans(null,null)},e.prototype._update_spans=function(t,e){var r;if(r=this.model.dimensions,\"width\"!==r&&\"both\"!==r||(this.model.spans.width.computed_location=e),\"height\"===r||\"both\"===r)return this.model.spans.height.computed_location=t},e}(n.InspectToolView),r.CrosshairTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.default_view=r.CrosshairToolView,e.prototype.type=\"CrosshairTool\",e.prototype.tool_name=\"Crosshair\",e.prototype.icon=\"bk-tool-icon-crosshair\",e.define({dimensions:[a.Dimensions,\"both\"],line_color:[a.Color,\"black\"],line_width:[a.Number,1],line_alpha:[a.Number,1]}),e.internal({location_units:[a.SpatialUnits,\"screen\"],render_mode:[a.RenderMode,\"css\"],spans:[a.Any]}),e.getters({tooltip:function(){return this._get_dim_tooltip(\"Crosshair\",this.dimensions)},synthetic_renderers:function(){return l.values(this.spans)}}),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),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})}},e}(n.InspectTool)},{\"../../annotations/span\":\"models/annotations/span\",\"./inspect_tool\":\"models/tools/inspectors/inspect_tool\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\"}],\"models/tools/inspectors/hover_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=function(t,e){function r(){this.constructor=t}for(var o in e)n.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},n={}.hasOwnProperty,s=t(\"./inspect_tool\"),a=t(\"../../annotations/tooltip\"),l=t(\"../../renderers/glyph_renderer\"),u=t(\"core/hittest\"),c=t(\"core/util/templating\"),_=t(\"core/dom\"),p=t(\"core/properties\"),h=t(\"core/util/object\"),d=t(\"core/util/types\"),f=t(\"core/build_views\");o=function(t){var e,r,o,i,n;return\"#\"===t.substr(0,1)?t:(r=/(.*?)rgb\\((\\d+), (\\d+), (\\d+)\\)/.exec(t),i=parseInt(r[2]),o=parseInt(r[3]),e=parseInt(r[4]),n=e|o<<8|i<<16,r[1]+\"#\"+n.toString(16))},r.HoverToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.ttviews={}},e.prototype.remove=function(){return f.remove_views(this.ttviews),e.__super__.remove.call(this)},e.prototype.connect_signals=function(){var t,r,o,i;for(e.__super__.connect_signals.call(this),i=this.computed_renderers,t=0,r=i.length;t<r;t++)o=i[t],this.connect(o.data_source.inspect,this._update);return this.connect(this.model.properties.renderers.change,function(){return this._computed_renderers=this._ttmodels=null}),this.connect(this.model.properties.names.change,function(){return this._computed_renderers=this._ttmodels=null}),this.connect(this.model.properties.plot.change,function(){return this._computed_renderers=this._ttmodels=null}),this.connect(this.model.properties.tooltips.change,function(){return this._ttmodels=null})},e.prototype._compute_renderers=function(){var t,e,r,o;return o=this.model.renderers,e=this.model.names,0===o.length&&(t=this.model.plot.renderers,o=function(){var e,o,i;for(i=[],e=0,o=t.length;e<o;e++)r=t[e],r instanceof l.GlyphRenderer&&i.push(r);return i}()),e.length>0&&(o=function(){var t,i,n;for(n=[],t=0,i=o.length;t<i;t++)r=o[t],e.indexOf(r.name)>=0&&n.push(r);return n}()),o},e.prototype._compute_ttmodels=function(){var t,e,r,o,i,n,s,l,u,c,_;if(c={},u=this.model.tooltips,null!=u)for(s=this.computed_renderers,t=0,r=s.length;t<r;t++)n=s[t],l=new a.Tooltip({custom:d.isString(u)||d.isFunction(u),attachment:this.model.attachment,show_arrow:this.model.show_arrow}),c[n.id]=l;for(i=f.build_views(this.ttviews,h.values(c),{parent:this,plot_view:this.plot_view}),e=0,o=i.length;e<o;e++)_=i[e],_.connect_signals();return c},e.getters({computed_renderers:function(){return null==this._computed_renderers&&(this._computed_renderers=this._compute_renderers()),this._computed_renderers},ttmodels:function(){return null==this._ttmodels&&(this._ttmodels=this._compute_ttmodels()),this._ttmodels}}),e.prototype._clear=function(){var t,e,r,o;this._inspect(Infinity,Infinity),t=this.ttmodels,e=[];for(r in t)o=t[r],e.push(o.clear());return e},e.prototype._move=function(t){var e,r,o;if(this.model.active)return e=this.plot_view.canvas,r=e.sx_to_vx(t.bokeh.sx),o=e.sy_to_vy(t.bokeh.sy),this.plot_view.frame.contains(r,o)?this._inspect(r,o):this._clear()},e.prototype._move_exit=function(){return this._clear()},e.prototype._inspect=function(t,e,r){var o,i,n,s,a,l,u,c;for(o={type:\"point\",vx:t,vy:e},\"mouse\"===this.model.mode?o.type=\"point\":(o.type=\"span\",\"vline\"===this.model.mode?o.direction=\"h\":o.direction=\"v\"),i=[],n=[],u=this.computed_renderers,s=0,a=u.length;s<a;s++)l=u[s],c=l.data_source.selection_manager,c.inspect(this,this.plot_view.renderer_views[l.id],o,{geometry:o});null!=this.model.callback&&this._emit_callback(o)},e.prototype._update=function(t){var e,r,o,i,n,s,a,l,c,_,p,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C,N,D,F,I,B,L,R,V,G,q,U,Y,X,W,H,Q,J,$,Z,K,tt,et;if(y=t[0],W=t[1],R=t[2],_=t[3],j=t[4],d=j.geometry,this.model.active&&(H=null!=(T=this.ttmodels[R.model.id])?T:null,null!=H&&(H.clear(),null!==y[\"0d\"].glyph||0!==y[\"1d\"].indices.length))){for(J=d.vx,$=d.vy,e=this.plot_model.canvas,p=this.plot_model.frame,Y=e.vx_to_sx(J),X=e.vy_to_sy($),K=p.xscales[R.model.x_range_name],et=p.yscales[R.model.y_range_name],Z=K.invert(J),tt=et.invert($),z=y[\"0d\"].indices,b=0,x=z.length;b<x;b++){switch(f=z[b],s=R.glyph._x[f+1],a=R.glyph._y[f+1],m=f,this.model.line_policy){case\"interp\":C=R.glyph.get_interpolation_hit(f,d),s=C[0],a=C[1],V=K.compute(s),G=et.compute(a);break;case\"prev\":V=e.sx_to_vx(R.glyph.sx[f]),G=e.sy_to_vy(R.glyph.sy[f]);break;case\"next\":V=e.sx_to_vx(R.glyph.sx[f+1]),G=e.sy_to_vy(R.glyph.sy[f+1]),m=f+1;break;case\"nearest\":r=R.glyph.sx[f],o=R.glyph.sy[f],l=u.dist_2_pts(r,o,Y,X),i=R.glyph.sx[f+1],n=R.glyph.sy[f+1],c=u.dist_2_pts(i,n,Y,X),l<c?(N=[r,o],q=N[0],U=N[1]):(D=[i,n],q=D[0],U=D[1],m=f+1),s=R.glyph._x[f],a=R.glyph._y[f],V=e.sx_to_vx(q),G=e.sy_to_vy(U);break;default:F=[J,$],V=F[0],G=F[1]}Q={index:m,x:Z,y:tt,vx:J,vy:$,sx:Y,sy:X,data_x:s,data_y:a,rx:V,ry:G},H.add(V,G,this._render_tooltips(_,m,Q))}for(I=y[\"1d\"].indices,w=0,k=I.length;w<k;w++)if(f=I[w],h.isEmpty(y[\"2d\"].indices))s=null!=(P=R.glyph._x)?P[f]:void 0,a=null!=(A=R.glyph._y)?A[f]:void 0,\"snap_to_data\"===this.model.point_policy?(M=R.glyph.get_anchor_point(this.model.anchor,f,[Y,X]),null==M&&(M=R.glyph.get_anchor_point(\"center\",f,[Y,X])),V=e.sx_to_vx(M.x),G=e.sy_to_vy(M.y)):(E=[J,$],V=E[0],G=E[1]),Q={index:f,x:Z,y:tt,vx:J,vy:$,sx:Y,sy:X,data_x:s,data_y:a},H.add(V,G,this._render_tooltips(_,f,Q));else{B=y[\"2d\"].indices;for(f in B){switch(g=B[f][0],s=R.glyph._xs[f][g],a=R.glyph._ys[f][g],v=g,this.model.line_policy){case\"interp\":L=R.glyph.get_interpolation_hit(f,g,d),s=L[0],a=L[1],V=K.compute(s),G=et.compute(a);break;case\"prev\":V=e.sx_to_vx(R.glyph.sxs[f][g]),G=e.sy_to_vy(R.glyph.sys[f][g]);break;case\"next\":V=e.sx_to_vx(R.glyph.sxs[f][g+1]),G=e.sy_to_vy(R.glyph.sys[f][g+1]),v=g+1;break;case\"nearest\":r=R.glyph.sxs[f][g],o=R.glyph.sys[f][g],l=u.dist_2_pts(r,o,Y,X),i=R.glyph.sxs[f][g+1],n=R.glyph.sys[f][g+1],c=u.dist_2_pts(i,n,Y,X),l<c?(S=[r,o],q=S[0],U=S[1]):(O=[i,n],q=O[0],U=O[1],v=g+1),s=R.glyph._xs[f][g],a=R.glyph._ys[f][g],V=e.sx_to_vx(q),G=e.sy_to_vy(U)}Q={index:f,segment_index:v,x:Z,y:tt,vx:J,vy:$,sx:Y,sy:X,data_x:s,data_y:a},H.add(V,G,this._render_tooltips(_,f,Q))}}return null}},e.prototype._emit_callback=function(t){var e,r,o,i,n,s,a,l,u,c;a=this.computed_renderers[0],n=this.plot_view.renderer_views[a.id].hit_test(t),r=this.plot_model.canvas,i=this.plot_model.frame,t.sx=r.vx_to_sx(t.vx),t.sy=r.vy_to_sy(t.vy),u=i.xscales[a.x_range_name],c=i.yscales[a.y_range_name],t.x=u.invert(t.vx),t.y=c.invert(t.vy),e=this.model.callback,l=[e,{index:n,geometry:t,renderer:a}],s=l[0],o=l[1],d.isFunction(e)?e(s,o):e.execute(s,o)},e.prototype._render_tooltips=function(t,e,r){var i,n,s,a,l,u,p,h,f,m,y,g,v,b,w,x,k,M;if(k=this.model.tooltips,d.isString(k))return l=_.div(),l.innerHTML=c.replace_placeholders(k,t,e,this.model.formatters,r),l;if(d.isFunction(k))return k(t,r);for(w=_.div({style:{display:\"table\",borderSpacing:\"2px\"}}),p=0,f=k.length;p<f;p++)if(g=k[p],h=g[0],M=g[1],b=_.div({style:{display:\"table-row\"}}),w.appendChild(b),i=_.div({style:{display:\"table-cell\"},\"class\":\"bk-tooltip-row-label\"},h+\": \"),b.appendChild(i),i=_.div({style:{display:\"table-cell\"},\"class\":\"bk-tooltip-row-value\"}),b.appendChild(i),M.indexOf(\"$color\")>=0){if(v=M.match(/\\$color(\\[.*\\])?:(\\w*)/),m=v[0],y=v[1],n=v[2],a=t.get_column(n),null==a){l=_.span({},n+\" unknown\"),i.appendChild(l);continue}if(u=(null!=y?y.indexOf(\"hex\"):void 0)>=0,x=(null!=y?y.indexOf(\"swatch\"):void 0)>=0,s=a[e],null==s){l=_.span({},\"(null)\"),i.appendChild(l);continue}u&&(s=o(s)),l=_.span({},s),i.appendChild(l),x&&(l=_.span({\"class\":\"bk-tooltip-color-block\",style:{backgroundColor:s}},\" \"),i.appendChild(l))}else M=M.replace(\"$~\",\"$data_\"),l=_.span(),l.innerHTML=c.replace_placeholders(M,t,e,this.model.formatters,r),i.appendChild(l);return w},e}(s.InspectToolView),r.HoverTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.default_view=r.HoverToolView,e.prototype.type=\"HoverTool\",e.prototype.tool_name=\"Hover\",e.prototype.icon=\"bk-tool-icon-hover\",e.define({tooltips:[p.Any,[[\"index\",\"$index\"],[\"data (x, y)\",\"($x, $y)\"],[\"canvas (x, y)\",\"($sx, $sy)\"]]],formatters:[p.Any,{}],renderers:[p.Array,[]],names:[p.Array,[]],mode:[p.String,\"mouse\"],point_policy:[p.String,\"snap_to_data\"],line_policy:[p.String,\"nearest\"],show_arrow:[p.Boolean,!0],anchor:[p.String,\"center\"],attachment:[p.String,\"horizontal\"],callback:[p.Any]}),e}(s.InspectTool)},{\"../../annotations/tooltip\":\"models/annotations/tooltip\",\"../../renderers/glyph_renderer\":\"models/renderers/glyph_renderer\",\"./inspect_tool\":\"models/tools/inspectors/inspect_tool\",\"core/build_views\":\"core/build_views\",\"core/dom\":\"core/dom\",\"core/hittest\":\"core/hittest\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\",\"core/util/templating\":\"core/util/templating\",\"core/util/types\":\"core/util/types\"}],\"models/tools/inspectors/inspect_tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"../button_tool\");r.InspectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(s.ButtonToolView),r.InspectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.event_type=\"move\",e.define({toggleable:[n.Bool,!0]}),e.override({active:!0}),e}(s.ButtonTool)},{\"../button_tool\":\"models/tools/button_tool\",\n",
" \"core/properties\":\"core/properties\"}],\"models/tools/on_off_button\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./button_tool\");r.OnOffButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.render=function(){return e.__super__.render.call(this),this.model.active?this.el.classList.add(\"bk-active\"):this.el.classList.remove(\"bk-active\")},e.prototype._clicked=function(){var t;return t=this.model.active,this.model.active=!t},e}(n.ButtonToolButtonView)},{\"./button_tool\":\"models/tools/button_tool\"}],\"models/tools/tool\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"core/view\"),a=t(\"core/util/array\"),l=t(\"../../model\");r.ToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.plot_view=t.plot_view},e.getters({plot_model:function(){return this.plot_view.model}}),e.prototype.connect_signals=function(){return e.__super__.connect_signals.call(this),this.connect(this.model.properties.active.change,function(t){return function(){return t.model.active?t.activate():t.deactivate()}}(this))},e.prototype.activate=function(){},e.prototype.deactivate=function(){},e}(s.View),r.Tool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.getters({synthetic_renderers:function(){return[]}}),e.define({plot:[n.Instance]}),e.internal({active:[n.Boolean,!1]}),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,r,o){var i,n,s,l,u,c,_,p;return s=t[0],c=t[1],l=e[0],_=e[1],i=r.h_range,\"width\"===o||\"both\"===o?(u=[a.min([s,l]),a.max([s,l])],u=[a.max([u[0],i.min]),a.min([u[1],i.max])]):u=[i.min,i.max],n=r.v_range,\"height\"===o||\"both\"===o?(p=[a.min([c,_]),a.max([c,_])],p=[a.max([p[0],n.min]),a.min([p[1],n.max])]):p=[n.min,n.max],[u,p]},e}(l.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\",\"core/view\":\"core/view\"}],\"models/tools/tool_events\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\"),s=t(\"core/properties\");r.ToolEvents=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ToolEvents\",e.define({geometries:[s.Array,[]]}),e}(n.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\"}],\"models/tools/tool_proxy\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/properties\"),s=t(\"core/signaling\"),a=t(\"../../model\");r.ToolProxy=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this[\"do\"]=new s.Signal(this,\"do\"),this.connect(this[\"do\"],function(){return this.doit()}),this.connect(this.properties.active.change,function(){return this.set_active()})},e.prototype.doit=function(){var t,e,r,o;for(r=this.tools,t=0,e=r.length;t<e;t++)o=r[t],o[\"do\"].emit();return null},e.prototype.set_active=function(){var t,e,r,o;for(r=this.tools,t=0,e=r.length;t<e;t++)o=r[t],o.active=this.active;return null},e.define({tools:[n.Array,[]],active:[n.Bool,!1],tooltip:[n.String],tool_name:[n.String],disabled:[n.Bool,!1],event_type:[n.String],icon:[n.String]}),e.prototype._clicked=function(){var t;return t=this.model.active,this.model.active=!t},e}(a.Model)},{\"../../model\":\"model\",\"core/properties\":\"core/properties\",\"core/signaling\":\"core/signaling\"}],\"models/tools/toolbar\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(\"core/properties\"),a=t(\"core/util/array\"),l=t(\"./actions/action_tool\"),u=t(\"./actions/help_tool\"),c=t(\"./gestures/gesture_tool\"),_=t(\"./inspectors/inspect_tool\"),p=t(\"./toolbar_base\");r.Toolbar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"Toolbar\",e.prototype.default_view=p.ToolbarBaseView,e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this.connect(this.properties.tools.change,function(){return this._init_tools()}),this._init_tools()},e.prototype._init_tools=function(){var t,e,r,o,i,s,p;for(o=this.tools,e=0,r=o.length;e<r;e++)if(s=o[e],s instanceof _.InspectTool)a.any(this.inspectors,function(t){return function(t){return t.id===s.id}}(this))||(this.inspectors=this.inspectors.concat([s]));else if(s instanceof u.HelpTool)a.any(this.help,function(t){return function(t){return t.id===s.id}}(this))||(this.help=this.help.concat([s]));else if(s instanceof l.ActionTool)a.any(this.actions,function(t){return function(t){return t.id===s.id}}(this))||(this.actions=this.actions.concat([s]));else if(s instanceof c.GestureTool){if(t=s.event_type,!(t in this.gestures)){logger.warn(\"Toolbar: unknown event type '\"+t+\"' for tool: \"+s.type+\" (\"+s.id+\")\");continue}a.any(this.gestures[t].tools,function(t){return function(t){return t.id===s.id}}(this))||(this.gestures[t].tools=this.gestures[t].tools.concat([s])),this.connect(s.properties.active.change,this._active_change.bind(null,s))}\"auto\"===this.active_inspect||(this.active_inspect instanceof _.InspectTool?this.inspectors.map(function(t){return function(e){if(e!==t.active_inspect)return e.active=!1}}(this)):this.active_inspect instanceof Array?this.inspectors.map(function(t){return function(e){if(n.call(t.active_inspect,e)<0)return e.active=!1}}(this)):null===this.active_inspect&&this.inspectors.map(function(t){return t.active=!1})),i=[];for(t in this.gestures)if(p=this.gestures[t].tools,0!==p.length){if(this.gestures[t].tools=a.sortBy(p,function(t){return t.default_order}),\"tap\"===t){if(null===this.active_tap)continue;\"auto\"===this.active_tap?this.gestures[t].tools[0].active=!0:this.active_tap.active=!0}if(\"pan\"===t){if(null===this.active_drag)continue;\"auto\"===this.active_drag?this.gestures[t].tools[0].active=!0:this.active_drag.active=!0}if(\"pinch\"===t||\"scroll\"===t){if(null===this.active_scroll||\"auto\"===this.active_scroll)continue;i.push(this.active_scroll.active=!0)}else i.push(void 0)}return i},e.define({active_drag:[s.Any,\"auto\"],active_inspect:[s.Any,\"auto\"],active_scroll:[s.Any,\"auto\"],active_tap:[s.Any,\"auto\"]}),e}(p.ToolbarBase)},{\"./actions/action_tool\":\"models/tools/actions/action_tool\",\"./actions/help_tool\":\"models/tools/actions/help_tool\",\"./gestures/gesture_tool\":\"models/tools/gestures/gesture_tool\",\"./inspectors/inspect_tool\":\"models/tools/inspectors/inspect_tool\",\"./toolbar_base\":\"models/tools/toolbar_base\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/tools/toolbar_base\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=function(t,e){return function(){return t.apply(e,arguments)}},s=t(\"core/logging\"),a=t(\"core/layout/solver\"),l=t(\"core/dom\"),u=t(\"core/properties\"),c=t(\"../layouts/layout_dom\"),_=t(\"./actions/action_tool\"),p=t(\"./on_off_button\"),h=t(\"./toolbar_template\");r.ToolbarBaseView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-toolbar-wrapper\",e.prototype.template=h[\"default\"],e.prototype.render=function(){var t,e,r,o,i,n,s,a,u,c,h,d,f,m,y,g;for(l.empty(this.el),\"fixed\"!==this.model.sizing_mode&&(this.el.style.left=this.model._dom_left.value+\"px\",this.el.style.top=this.model._dom_top.value+\"px\",this.el.style.width=this.model._width.value+\"px\",this.el.style.height=this.model._height.value+\"px\"),this.el.appendChild(this.template({logo:this.model.logo,location:this.model.toolbar_location,sticky:this.model.toolbar_sticky?\"sticky\":\"not-sticky\"})),t=this.el.querySelector(\".bk-button-bar-list[type='inspectors']\"),f=this.model.inspectors,o=0,a=f.length;o<a;o++)d=f[o],d.toggleable&&t.appendChild(new p.OnOffButtonView({model:d,parent:this}).el);for(t=this.el.querySelector(\".bk-button-bar-list[type='help']\"),m=this.model.help,i=0,u=m.length;i<u;i++)d=m[i],t.appendChild(new _.ActionToolButtonView({model:d,parent:this}).el);for(t=this.el.querySelector(\".bk-button-bar-list[type='actions']\"),y=this.model.actions,n=0,c=y.length;n<c;n++)d=y[n],t.appendChild(new _.ActionToolButtonView({model:d,parent:this}).el);r=this.model.gestures;for(e in r)for(t=this.el.querySelector(\".bk-button-bar-list[type='\"+e+\"']\"),g=r[e].tools,s=0,h=g.length;s<h;s++)d=g[s],t.appendChild(new p.OnOffButtonView({model:d,parent:this}).el);return this},e}(c.LayoutDOMView),r.ToolbarBase=function(t){function e(){return this._active_change=n(this._active_change,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ToolbarBase\",e.prototype.default_view=r.ToolbarBaseView,e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._set_sizeable(),this.connect(this.properties.toolbar_location.change,function(t){return function(){return t._set_sizeable()}}(this))},e.prototype._set_sizeable=function(){var t,e;return t=\"left\"===(e=this.toolbar_location)||\"right\"===e,this._sizeable=t?this._width:this._height},e.prototype._active_change=function(t){var e,r;return r=t.event_type,t.active?(e=this.gestures[r].active,null!=e&&(s.logger.debug(\"Toolbar: deactivating tool: \"+e.type+\" (\"+e.id+\") for event type '\"+r+\"'\"),e.active=!1),this.gestures[r].active=t,s.logger.debug(\"Toolbar: activating tool: \"+t.type+\" (\"+t.id+\") for event type '\"+r+\"'\")):this.gestures[r].active=null,null},e.prototype.get_constraints=function(){return e.__super__.get_constraints.call(this).concat([a.EQ(this._sizeable,-30)])},e.define({tools:[u.Array,[]],logo:[u.String,\"normal\"]}),e.internal({gestures:[u.Any,function(){return{pan:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},press:{tools:[],active:null},rotate:{tools:[],active:null}}}],actions:[u.Array,[]],inspectors:[u.Array,[]],help:[u.Array,[]],toolbar_location:[u.Location,\"right\"],toolbar_sticky:[u.Bool]}),e.override({sizing_mode:null}),e}(c.LayoutDOM)},{\"../layouts/layout_dom\":\"models/layouts/layout_dom\",\"./actions/action_tool\":\"models/tools/actions/action_tool\",\"./on_off_button\":\"models/tools/on_off_button\",\"./toolbar_template\":\"models/tools/toolbar_template\",\"core/dom\":\"core/dom\",\"core/layout/solver\":\"core/layout/solver\",\"core/logging\":\"core/logging\",\"core/properties\":\"core/properties\"}],\"models/tools/toolbar_box\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(\"core/properties\"),a=t(\"core/util/array\"),l=t(\"./actions/action_tool\"),u=t(\"./actions/help_tool\"),c=t(\"./gestures/gesture_tool\"),_=t(\"./inspectors/inspect_tool\"),p=t(\"./toolbar_base\"),h=t(\"./tool_proxy\"),d=t(\"../layouts/box\");r.ToolbarBoxToolbar=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ToolbarBoxToolbar\",e.prototype.default_view=p.ToolbarBaseView,e.prototype.initialize=function(t){if(e.__super__.initialize.call(this,t),this._init_tools(),this.merge_tools===!0)return this._merge_tools()},e.define({merge_tools:[s.Bool,!0]}),e.prototype._init_tools=function(){var t,e,r,o,i,n;for(o=this.tools,i=[],e=0,r=o.length;e<r;e++)n=o[e],n instanceof _.InspectTool?a.any(this.inspectors,function(t){return function(t){return t.id===n.id}}(this))?i.push(void 0):i.push(this.inspectors=this.inspectors.concat([n])):n instanceof u.HelpTool?a.any(this.help,function(t){return function(t){return t.id===n.id}}(this))?i.push(void 0):i.push(this.help=this.help.concat([n])):n instanceof l.ActionTool?a.any(this.actions,function(t){return function(t){return t.id===n.id}}(this))?i.push(void 0):i.push(this.actions=this.actions.concat([n])):n instanceof c.GestureTool?(t=n.event_type,a.any(this.gestures[t].tools,function(t){return function(t){return t.id===n.id}}(this))?i.push(void 0):i.push(this.gestures[t].tools=this.gestures[t].tools.concat([n]))):i.push(void 0);return i},e.prototype._merge_tools=function(){var t,e,r,o,i,s,l,u,c,_,p,d,f,m,y,g,v,b,w,x,k,M,j,T,S,O,P,A,E,z,C;for(c={},t={},i={},b=[],w=[],k=this.help,l=0,f=k.length;l<f;l++)s=k[l],M=s.redirect,n.call(w,M)<0&&(b.push(s),w.push(s.redirect));this.help=b,j=this.gestures;for(o in j){u=j[o],o in i||(i[o]={}),T=u.tools;for(_=0,m=T.length;_<m;_++)E=T[_],E.type in i[o]||(i[o][E.type]=[]),i[o][E.type].push(E)}for(S=this.inspectors,p=0,y=S.length;p<y;p++)E=S[p],E.type in c||(c[E.type]=[]),c[E.type].push(E);for(O=this.actions,d=0,g=O.length;d<g;d++)E=O[d],E.type in t||(t[E.type]=[]),t[E.type].push(E);v=function(t,e){return null==e&&(e=!1),new h.ToolProxy({tools:t,event_type:t[0].event_type,tooltip:t[0].tool_name,tool_name:t[0].tool_name,icon:t[0].icon,active:e})};for(o in i){this.gestures[o].tools=[],P=i[o];for(z in P)C=P[z],C.length>0&&(x=v(C),this.gestures[o].tools.push(x),this.connect(x.properties.active.change,this._active_change.bind(null,x)))}this.actions=[];for(z in t)C=t[z],C.length>0&&this.actions.push(v(C));this.inspectors=[];for(z in c)C=c[z],C.length>0&&this.inspectors.push(v(C,e=!0));A=[];for(r in this.gestures)C=this.gestures[r].tools,0!==C.length&&(this.gestures[r].tools=a.sortBy(C,function(t){return t.default_order}),\"pinch\"!==r&&\"scroll\"!==r?A.push(this.gestures[r].tools[0].active=!0):A.push(void 0));return A},e}(p.ToolbarBase),r.ToolbarBoxView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.className=\"bk-toolbar-box\",e.prototype.get_width=function(){return this.model._horizontal===!0?30:null},e.prototype.get_height=function(){return 30},e}(d.BoxView),r.ToolbarBox=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.type=\"ToolbarBox\",e.prototype.default_view=r.ToolbarBoxView,e.prototype.initialize=function(t){var o;return e.__super__.initialize.call(this,t),this._toolbar=new r.ToolbarBoxToolbar(t),this._horizontal=\"left\"===(o=this.toolbar_location)||\"right\"===o,this._sizeable=this._horizontal?this._width:this._height},e.prototype._doc_attached=function(){return this._toolbar.attach_document(this.document),e.__super__._doc_attached.call(this)},e.prototype.get_layoutable_children=function(){return[this._toolbar]},e.define({toolbar_location:[s.Location,\"right\"],merge_tools:[s.Bool,!0],tools:[s.Any,[]],logo:[s.String,\"normal\"]}),e}(d.Box)},{\"../layouts/box\":\"models/layouts/box\",\"./actions/action_tool\":\"models/tools/actions/action_tool\",\"./actions/help_tool\":\"models/tools/actions/help_tool\",\"./gestures/gesture_tool\":\"models/tools/gestures/gesture_tool\",\"./inspectors/inspect_tool\":\"models/tools/inspectors/inspect_tool\",\"./tool_proxy\":\"models/tools/tool_proxy\",\"./toolbar_base\":\"models/tools/toolbar_base\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/tools/toolbar_template\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"core/dom\");r[\"default\"]=function(t){var e;if(null!=t.logo){var r=\"grey\"===t.logo?\"bk-grey\":null;e=o.createElement(\"a\",{href:\"http://bokeh.pydata.org/\",target:\"_blank\",\"class\":[\"bk-logo\",\"bk-logo-small\",r]})}return o.createElement(\"div\",{\"class\":[\"bk-toolbar-\"+t.location,\"bk-toolbar-\"+t.sticky]},e,o.createElement(\"div\",{\"class\":\"bk-button-bar\"},o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"pan\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"scroll\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"pinch\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"tap\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"press\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"rotate\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"actions\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"inspectors\"}),o.createElement(\"div\",{\"class\":\"bk-button-bar-list\",type:\"help\"})))}},{\"core/dom\":\"core/dom\"}],\"models/transforms/customjs_transform\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].slice,s=t(\"./transform\"),a=t(\"core/properties\"),l=t(\"core/util/object\");r.CustomJSTransform=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return o(i,e),i.prototype.type=\"CustomJSTransform\",i.define({args:[a.Any,{}],func:[a.String,\"\"],v_func:[a.String,\"\"]}),i.getters({values:function(){return this._make_values()},scalar_transform:function(){return this._make_transform(\"x\",this.func)},vector_transform:function(){return this._make_transform(\"xs\",this.v_func)}}),i.prototype.compute=function(e){return this.scalar_transform.apply(this,n.call(this.values).concat([e],[t],[r]))},i.prototype.v_compute=function(e){return this.vector_transform.apply(this,n.call(this.values).concat([e],[t],[r]))},i.prototype._make_transform=function(t,e){return function(t,e,r){r.prototype=t.prototype;var o=new r,i=t.apply(o,e);return Object(i)===i?i:o}(Function,n.call(Object.keys(this.args)).concat([t],[\"require\"],[\"exports\"],[e]),function(){})},i.prototype._make_values=function(){return l.values(this.args)},i}(s.Transform)},{\"./transform\":\"models/transforms/transform\",\"core/properties\":\"core/properties\",\"core/util/object\":\"core/util/object\"}],\"models/transforms/index\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./customjs_transform\");r.CustomJSTransform=o.CustomJSTransform;var i=t(\"./interpolator\");r.Interpolator=i.Interpolator;var n=t(\"./jitter\");r.Jitter=n.Jitter;var s=t(\"./linear_interpolator\");r.LinearInterpolator=s.LinearInterpolator;var a=t(\"./step_interpolator\");r.StepInterpolator=a.StepInterpolator;var l=t(\"./transform\");r.Transform=l.Transform},{\"./customjs_transform\":\"models/transforms/customjs_transform\",\"./interpolator\":\"models/transforms/interpolator\",\"./jitter\":\"models/transforms/jitter\",\"./linear_interpolator\":\"models/transforms/linear_interpolator\",\"./step_interpolator\":\"models/transforms/step_interpolator\",\"./transform\":\"models/transforms/transform\"}],\"models/transforms/interpolator\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=[].indexOf||function(t){for(var e=0,r=this.length;e<r;e++)if(e in this&&this[e]===t)return e;return-1},s=t(\"./transform\"),a=t(\"core/properties\");r.Interpolator=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._x_sorted=[],this._y_sorted=[],this._sorted_dirty=!0,this.connect(this.change,function(){return this._sorted_dirty=!0})},e.define({x:[a.Any],y:[a.Any],data:[a.Any],clip:[a.Bool,!0]}),e.prototype.sort=function(t){var e,r,o,i,s,a,l,u,c,_,p;if(null==t&&(t=!1),typeof this.x!=typeof this.y)throw new Error(\"The parameters for x and y must be of the same type, either both strings which define a column in the data source or both arrays of the same length\");if(\"string\"==typeof this.x&&null===this.data)throw new Error(\"If the x and y parameters are not specified as an array, the data parameter is reqired.\");if(this._sorted_dirty!==!1){if(_=[],p=[],\"string\"==typeof this.x){if(r=this.data,e=r.columns(),l=this.x,n.call(e,l)<0)throw new Error(\"The x parameter does not correspond to a valid column name defined in the data parameter\");if(u=this.y,n.call(e,u)<0)throw new Error(\"The x parameter does not correspond to a valid column name defined in the data parameter\");_=r.get_column(this.x),p=r.get_column(this.y)}else _=this.x,p=this.y;if(_.length!==p.length)throw new Error(\"The length for x and y do not match\");if(_.length<2)throw new Error(\"x and y must have at least two elements to support interpolation\");a=[];for(i in _)a.push({x:_[i],y:p[i]});for(t===!0?a.sort(function(t,e){var r,o;return null!=(r=t.x<e.x)?r:-{1:null!=(o=t.x===e.x)?o:{0:1}}}):a.sort(function(t,e){var r,o;return null!=(r=t.x>e.x)?r:-{1:null!=(o=t.x===e.x)?o:{0:1}}}),s=o=0,c=a.length;0<=c?o<c:o>c;s=0<=c?++o:--o)this._x_sorted[s]=a[s].x,this._y_sorted[s]=a[s].y;return this._sorted_dirty=!1}},e}(s.Transform)},{\"./transform\":\"models/transforms/transform\",\"core/properties\":\"core/properties\"}],\"models/transforms/jitter\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./transform\"),s=t(\"core/properties\"),a=t(\"core/util/math\");r.Jitter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.define({mean:[s.Number,0],width:[s.Number,1],distribution:[s.Distribution,\"uniform\"]}),e.prototype.compute=function(t){return\"uniform\"===this.distribution?t+this.mean+(a.random()-.5)*this.width:\"normal\"===this.distribution?t+a.rnorm(this.mean,this.width):void 0},e.prototype.v_compute=function(t){var e,r,o,i,n;for(i=new Float64Array(t.length),r=e=0,o=t.length;e<o;r=++e)n=t[r],i[r]=this.compute(n);return i},e}(n.Transform)},{\"./transform\":\"models/transforms/transform\",\"core/properties\":\"core/properties\",\"core/util/math\":\"core/util/math\"}],\"models/transforms/linear_interpolator\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"core/util/array\"),s=t(\"./interpolator\");r.LinearInterpolator=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.compute=function(t){var e,r,o,i,s,a,l;if(this.sort(e=!1),this.clip===!0){if(t<this._x_sorted[0]||t>this._x_sorted[this._x_sorted.length-1])return null}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]}return t===this._x_sorted[0]?this._y_sorted[0]:(r=n.findLastIndex(this._x_sorted,function(e){return e<t}),i=this._x_sorted[r],s=this._x_sorted[r+1],a=this._y_sorted[r],l=this._y_sorted[r+1],o=a+(t-i)/(s-i)*(l-a))},e.prototype.v_compute=function(t){var e,r,o,i,n;for(i=new Float64Array(t.length),r=e=0,o=t.length;e<o;r=++e)n=t[r],i[r]=this.compute(n);return i},e}(s.Interpolator)},{\"./interpolator\":\"models/transforms/interpolator\",\"core/util/array\":\"core/util/array\"}],\"models/transforms/step_interpolator\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"./interpolator\"),s=t(\"core/properties\"),a=t(\"core/util/array\");r.StepInterpolator=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.define({mode:[s.TransformStepMode,\"after\"]}),e.prototype.compute=function(t){var e,r,o,i,n,s;if(this.sort(e=!1),this.clip===!0){if(t<this._x_sorted[0]||t>this._x_sorted[this._x_sorted.length-1])return null}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]}return o=-1,\"after\"===this.mode&&(o=a.findLastIndex(this._x_sorted,function(e){return t>=e})),\"before\"===this.mode&&(o=a.findIndex(this._x_sorted,function(e){return t<=e})),\"center\"===this.mode&&(r=function(){var e,r,o,i;for(o=this._x_sorted,i=[],e=0,r=o.length;e<r;e++)s=o[e],i.push(Math.abs(s-t));return i}.call(this),i=a.min(r),o=a.findIndex(r,function(t){return i===t})),n=o!==-1?this._y_sorted[o]:null},e.prototype.v_compute=function(t){var e,r,o,i,n;for(i=new Float64Array(t.length),r=e=0,o=t.length;e<o;r=++e)n=t[r],i[r]=this.compute(n);return i},e}(n.Interpolator)},{\"./interpolator\":\"models/transforms/interpolator\",\"core/properties\":\"core/properties\",\"core/util/array\":\"core/util/array\"}],\"models/transforms/transform\":[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(t,e){function r(){this.constructor=t}for(var o in e)i.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,n=t(\"../../model\");r.Transform=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(n.Model)},{\"../../model\":\"model\"}],polyfill:[function(t,e,r){\"use strict\";\"function\"!=typeof WeakMap&&t(\"es6-weak-map/implement\"),\"function\"!=typeof Set&&t(\"es6-set/implement\")},{\"es6-set/implement\":\"es6-set/implement\",\"es6-weak-map/implement\":\"es6-weak-map/implement\"}],safely:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var o;o=function(t){var e,r,o,i,n,s;return r=document.createElement(\"div\"),r.style[\"background-color\"]=\"#f2dede\",r.style.border=\"1px solid #a94442\",r.style[\"border-radius\"]=\"4px\",r.style.display=\"inline-block\",r.style[\"font-family\"]=\"sans-serif\",r.style[\"margin-top\"]=\"5px\",r.style[\"min-width\"]=\"200px\",r.style.padding=\"5px 5px 5px 10px\",o=document.createElement(\"span\"),o.style[\"background-color\"]=\"#a94442\",o.style[\"border-radius\"]=\"0px 4px 0px 0px\",o.style.color=\"white\",o.style.cursor=\"pointer\",o.style[\"float\"]=\"right\",o.style[\"font-size\"]=\"0.8em\",o.style.margin=\"-6px -6px 0px 0px\",o.style.padding=\"2px 5px 4px 5px\",o.title=\"close\",o.setAttribute(\"aria-label\",\"close\"),o.appendChild(document.createTextNode(\"x\")),o.addEventListener(\"click\",function(){return e.removeChild(r)}),s=document.createElement(\"h3\"),s.style.color=\"#a94442\",s.style.margin=\"8px 0px 0px 0px\",s.style.padding=\"0px\",s.appendChild(document.createTextNode(\"Bokeh Error\")),i=document.createElement(\"pre\"),i.style[\"white-space\"]=\"unset\",i.style[\"overflow-x\"]=\"auto\",i.appendChild(document.createTextNode(null!=(n=t.message)?n:t)),r.appendChild(o),r.appendChild(s),r.appendChild(i),e=document.getElementsByTagName(\"body\")[0],e.insertBefore(r,e.firstChild)},r.safely=function(t,e){var r;null==e&&(e=!1);try{return t()}catch(i){if(r=i,o(r),!e)throw r}}},{}],version:[function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.version=\"0.12.6\"},{}],canvas2svg:[function(t,e,r){!function(){\"use strict\";function t(t,e){var r,o=Object.keys(e);for(r=0;r<o.length;r++)t=t.replace(new RegExp(\"\\\\{\"+o[r]+\"\\\\}\",\"gi\"),e[o[r]]);return t}function r(t){var e,r,o;if(!t)throw new Error(\"cannot create a random attribute name for an undefined object\");e=\"ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz\",r=\"\";do for(r=\"\",o=0;o<12;o++)r+=e[Math.floor(Math.random()*e.length)];while(t[r]);return r}function o(t,e){var r,o,i,n={};for(t=t.split(\",\"),e=e||10,r=0;r<t.length;r+=2)o=\"&\"+t[r+1]+\";\",i=parseInt(t[r],e),n[o]=\"&#\"+i+\";\";return n[\"\\\\xa0\"]=\"&#160;\",n}function i(t){var e={left:\"start\",right:\"end\",center:\"middle\",start:\"start\",end:\"end\"};return e[t]||e.start}function n(t){var e={alphabetic:\"alphabetic\",hanging:\"hanging\",top:\"text-before-edge\",bottom:\"text-after-edge\",middle:\"central\"};return e[t]||e.alphabetic}var s,a,l,u,c;c=o(\"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),s={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\"}},l=function(t,e){\n",
" this.__root=t,this.__ctx=e},l.prototype.addColorStop=function(e,r){var o,i,n=this.__ctx.__createElement(\"stop\");n.setAttribute(\"offset\",e),r.indexOf(\"rgba\")!==-1?(o=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d?\\.?\\d*)\\s*\\)/gi,i=o.exec(r),n.setAttribute(\"stop-color\",t(\"rgb({r},{g},{b})\",{r:i[1],g:i[2],b:i[3]})),n.setAttribute(\"stop-opacity\",i[4])):n.setAttribute(\"stop-color\",r),this.__root.appendChild(n)},u=function(t,e){this.__root=t,this.__ctx=e},a=function(t){var e,r={width:500,height:500,enableMirroring:!1};return arguments.length>1?(e=r,e.width=arguments[0],e.height=arguments[1]):e=t?t:r,this instanceof a?(this.width=e.width||r.width,this.height=e.height||r.height,this.enableMirroring=void 0!==e.enableMirroring?e.enableMirroring:r.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\"),void this.__root.appendChild(this.__currentElement)):new a(e)},a.prototype.__createElement=function(t,e,r){\"undefined\"==typeof e&&(e={});var o,i,n=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",t),s=Object.keys(e);for(r&&(n.setAttribute(\"fill\",\"none\"),n.setAttribute(\"stroke\",\"none\")),o=0;o<s.length;o++)i=s[o],n.setAttribute(i,e[i]);return n},a.prototype.__setDefaultStyles=function(){var t,e,r=Object.keys(s);for(t=0;t<r.length;t++)e=r[t],this[e]=s[e].canvas},a.prototype.__applyStyleState=function(t){var e,r,o=Object.keys(t);for(e=0;e<o.length;e++)r=o[e],this[r]=t[r]},a.prototype.__getStyleState=function(){var t,e,r={},o=Object.keys(s);for(t=0;t<o.length;t++)e=o[t],r[e]=this[e];return r},a.prototype.__applyStyleToCurrentElement=function(e){var r=this.__currentElement,o=this.__currentElementsToStyle;o&&(r.setAttribute(e,\"\"),r=o.element,o.children.forEach(function(t){t.setAttribute(e,\"\")}));var i,n,a,c,_,p,h=Object.keys(s);for(i=0;i<h.length;i++)if(n=s[h[i]],a=this[h[i]],n.apply)if(a instanceof u){if(a.__ctx)for(;a.__ctx.__defs.childNodes.length;)c=a.__ctx.__defs.childNodes[0].getAttribute(\"id\"),this.__ids[c]=c,this.__defs.appendChild(a.__ctx.__defs.childNodes[0]);r.setAttribute(n.apply,t(\"url(#{id})\",{id:a.__root.getAttribute(\"id\")}))}else if(a instanceof l)r.setAttribute(n.apply,t(\"url(#{id})\",{id:a.__root.getAttribute(\"id\")}));else if(n.apply.indexOf(e)!==-1&&n.svg!==a)if(\"stroke\"!==n.svgAttr&&\"fill\"!==n.svgAttr||a.indexOf(\"rgba\")===-1){var d=n.svgAttr;if(\"globalAlpha\"===h[i]&&(d=e+\"-\"+n.svgAttr,r.getAttribute(d)))continue;r.setAttribute(d,a)}else{_=/rgba\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d?\\.?\\d*)\\s*\\)/gi,p=_.exec(a),r.setAttribute(n.svgAttr,t(\"rgb({r},{g},{b})\",{r:p[1],g:p[2],b:p[3]}));var f=p[4],m=this.globalAlpha;null!=m&&(f*=m),r.setAttribute(n.svgAttr+\"-opacity\",f)}},a.prototype.__closestGroupOrSvg=function(t){return t=t||this.__currentElement,\"g\"===t.nodeName||\"svg\"===t.nodeName?t:this.__closestGroupOrSvg(t.parentNode)},a.prototype.getSerializedSvg=function(t){var e,r,o,i,n,s,a=(new XMLSerializer).serializeToString(this.__root);if(s=/xmlns=\"http:\\/\\/www\\.w3\\.org\\/2000\\/svg\".+xmlns=\"http:\\/\\/www\\.w3\\.org\\/2000\\/svg/gi,s.test(a)&&(a=a.replace('xmlns=\"http://www.w3.org/2000/svg','xmlns:xlink=\"http://www.w3.org/1999/xlink')),t)for(e=Object.keys(c),r=0;r<e.length;r++)o=e[r],i=c[o],n=new RegExp(o,\"gi\"),n.test(a)&&(a=a.replace(n,i));return a},a.prototype.getSvg=function(){return this.__root},a.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())},a.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)},a.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 o=this.__currentElement.getAttribute(\"transform\");o?o+=\" \":o=\"\",o+=t,this.__currentElement.setAttribute(\"transform\",o)},a.prototype.scale=function(e,r){void 0===r&&(r=e),this.__addTransform(t(\"scale({x},{y})\",{x:e,y:r}))},a.prototype.rotate=function(e){var r=180*e/Math.PI;this.__addTransform(t(\"rotate({angle},{cx},{cy})\",{angle:r,cx:0,cy:0}))},a.prototype.translate=function(e,r){this.__addTransform(t(\"translate({x},{y})\",{x:e,y:r}))},a.prototype.transform=function(e,r,o,i,n,s){this.__addTransform(t(\"matrix({a},{b},{c},{d},{e},{f})\",{a:e,b:r,c:o,d:i,e:n,f:s}))},a.prototype.beginPath=function(){var t,e;this.__currentDefaultPath=\"\",this.__currentPosition={},t=this.__createElement(\"path\",{},!0),e=this.__closestGroupOrSvg(),e.appendChild(t),this.__currentElement=t},a.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)},a.prototype.__addPathCommand=function(t){this.__currentDefaultPath+=\" \",this.__currentDefaultPath+=t},a.prototype.moveTo=function(e,r){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.__currentPosition={x:e,y:r},this.__addPathCommand(t(\"M {x} {y}\",{x:e,y:r}))},a.prototype.closePath=function(){this.__currentDefaultPath&&this.__addPathCommand(\"Z\")},a.prototype.lineTo=function(e,r){this.__currentPosition={x:e,y:r},this.__currentDefaultPath.indexOf(\"M\")>-1?this.__addPathCommand(t(\"L {x} {y}\",{x:e,y:r})):this.__addPathCommand(t(\"M {x} {y}\",{x:e,y:r}))},a.prototype.bezierCurveTo=function(e,r,o,i,n,s){this.__currentPosition={x:n,y:s},this.__addPathCommand(t(\"C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}\",{cp1x:e,cp1y:r,cp2x:o,cp2y:i,x:n,y:s}))},a.prototype.quadraticCurveTo=function(e,r,o,i){this.__currentPosition={x:o,y:i},this.__addPathCommand(t(\"Q {cpx} {cpy} {x} {y}\",{cpx:e,cpy:r,x:o,y:i}))};var _=function(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]};a.prototype.arcTo=function(t,e,r,o,i){var n=this.__currentPosition&&this.__currentPosition.x,s=this.__currentPosition&&this.__currentPosition.y;if(\"undefined\"!=typeof n&&\"undefined\"!=typeof s){if(i<0)throw new Error(\"IndexSizeError: The radius provided (\"+i+\") is negative.\");if(n===t&&s===e||t===r&&e===o||0===i)return void this.lineTo(t,e);var a=_([n-t,s-e]),l=_([r-t,o-e]);if(a[0]*l[1]===a[1]*l[0])return void this.lineTo(t,e);var u=a[0]*l[0]+a[1]*l[1],c=Math.acos(Math.abs(u)),p=_([a[0]+l[0],a[1]+l[1]]),h=i/Math.sin(c/2),d=t+h*p[0],f=e+h*p[1],m=[-a[1],a[0]],y=[l[1],-l[0]],g=function(t){var e=t[0],r=t[1];return r>=0?Math.acos(e):-Math.acos(e)},v=g(m),b=g(y);this.lineTo(d+m[0]*i,f+m[1]*i),this.arc(d,f,i,v,b)}},a.prototype.stroke=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"fill stroke markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"stroke\")},a.prototype.fill=function(){\"path\"===this.__currentElement.nodeName&&this.__currentElement.setAttribute(\"paint-order\",\"stroke fill markers\"),this.__applyCurrentDefaultPath(),this.__applyStyleToCurrentElement(\"fill\")},a.prototype.rect=function(t,e,r,o){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+o),this.lineTo(t,e+o),this.lineTo(t,e),this.closePath()},a.prototype.fillRect=function(t,e,r,o){var i,n;i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:o},!0),n=this.__closestGroupOrSvg(),n.appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement(\"fill\")},a.prototype.strokeRect=function(t,e,r,o){var i,n;i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:o},!0),n=this.__closestGroupOrSvg(),n.appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement(\"stroke\")},a.prototype.__clearCanvas=function(){for(var t=this.__closestGroupOrSvg(),e=t.getAttribute(\"transform\"),r=this.__root.childNodes[1],o=r.childNodes,i=o.length-1;i>=0;i--)o[i]&&r.removeChild(o[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)},a.prototype.clearRect=function(t,e,r,o){if(0===t&&0===e&&r===this.width&&o===this.height)return void this.__clearCanvas();var i,n=this.__closestGroupOrSvg();i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:o,fill:\"#FFFFFF\"},!0),n.appendChild(i)},a.prototype.createLinearGradient=function(t,e,o,i){var n=this.__createElement(\"linearGradient\",{id:r(this.__ids),x1:t+\"px\",x2:o+\"px\",y1:e+\"px\",y2:i+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(n),new l(n,this)},a.prototype.createRadialGradient=function(t,e,o,i,n,s){var a=this.__createElement(\"radialGradient\",{id:r(this.__ids),cx:i+\"px\",cy:n+\"px\",r:s+\"px\",fx:t+\"px\",fy:e+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(a),new l(a,this)},a.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,e=t.exec(this.font),r={style:e[1]||\"normal\",size:e[4]||\"10px\",family:e[6]||\"sans-serif\",weight:e[3]||\"normal\",decoration:e[2]||\"normal\",href:null};return\"underline\"===this.__fontUnderline&&(r.decoration=\"underline\"),this.__fontHref&&(r.href=this.__fontHref),r},a.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},a.prototype.__applyText=function(t,e,r,o){var s=this.__parseFont(),a=this.__closestGroupOrSvg(),l=this.__createElement(\"text\",{\"font-family\":s.family,\"font-size\":s.size,\"font-style\":s.style,\"font-weight\":s.weight,\"text-decoration\":s.decoration,x:e,y:r,\"text-anchor\":i(this.textAlign),\"dominant-baseline\":n(this.textBaseline)},!0);l.appendChild(this.__document.createTextNode(t)),this.__currentElement=l,this.__applyStyleToCurrentElement(o),a.appendChild(this.__wrapTextLink(s,l))},a.prototype.fillText=function(t,e,r){this.__applyText(t,e,r,\"fill\")},a.prototype.strokeText=function(t,e,r){this.__applyText(t,e,r,\"stroke\")},a.prototype.measureText=function(t){return this.__ctx.font=this.font,this.__ctx.measureText(t)},a.prototype.arc=function(e,r,o,i,n,s){if(i!==n){i%=2*Math.PI,n%=2*Math.PI,i===n&&(n=(n+2*Math.PI-.001*(s?-1:1))%(2*Math.PI));var a=e+o*Math.cos(n),l=r+o*Math.sin(n),u=e+o*Math.cos(i),c=r+o*Math.sin(i),_=s?0:1,p=0,h=n-i;h<0&&(h+=2*Math.PI),p=s?h>Math.PI?0:1:h>Math.PI?1:0,this.lineTo(u,c),this.__addPathCommand(t(\"A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}\",{rx:o,ry:o,xAxisRotation:0,largeArcFlag:p,sweepFlag:_,endX:a,endY:l})),this.__currentPosition={x:a,y:l}}},a.prototype.clip=function(){var e=this.__closestGroupOrSvg(),o=this.__createElement(\"clipPath\"),i=r(this.__ids),n=this.__createElement(\"g\");this.__applyCurrentDefaultPath(),e.removeChild(this.__currentElement),o.setAttribute(\"id\",i),o.appendChild(this.__currentElement),this.__defs.appendChild(o),e.setAttribute(\"clip-path\",t(\"url(#{id})\",{id:i})),e.appendChild(n),this.__currentElement=n},a.prototype.drawImage=function(){var t,e,r,o,i,n,s,l,u,c,_,p,h,d,f,m=Array.prototype.slice.call(arguments),y=m[0],g=0,v=0;if(3===m.length)t=m[1],e=m[2],i=y.width,n=y.height,r=i,o=n;else if(5===m.length)t=m[1],e=m[2],r=m[3],o=m[4],i=y.width,n=y.height;else{if(9!==m.length)throw new Error(\"Inavlid number of arguments passed to drawImage: \"+arguments.length);g=m[1],v=m[2],i=m[3],n=m[4],t=m[5],e=m[6],r=m[7],o=m[8]}s=this.__closestGroupOrSvg(),_=this.__currentElement;var b=\"translate(\"+t+\", \"+e+\")\";if(y instanceof a){if(l=y.getSvg().cloneNode(!0),l.childNodes&&l.childNodes.length>1){for(u=l.childNodes[0];u.childNodes.length;)f=u.childNodes[0].getAttribute(\"id\"),this.__ids[f]=f,this.__defs.appendChild(u.childNodes[0]);if(c=l.childNodes[1]){var w,x=c.getAttribute(\"transform\");w=x?x+\" \"+b:b,c.setAttribute(\"transform\",w),s.appendChild(c)}}}else\"IMG\"===y.nodeName?(p=this.__createElement(\"image\"),p.setAttribute(\"width\",r),p.setAttribute(\"height\",o),p.setAttribute(\"preserveAspectRatio\",\"none\"),(g||v||i!==y.width||n!==y.height)&&(h=this.__document.createElement(\"canvas\"),h.width=r,h.height=o,d=h.getContext(\"2d\"),d.drawImage(y,g,v,i,n,0,0,r,o),y=h),p.setAttribute(\"transform\",b),p.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===y.nodeName?y.toDataURL():y.getAttribute(\"src\")),s.appendChild(p)):\"CANVAS\"===y.nodeName&&(p=this.__createElement(\"image\"),p.setAttribute(\"width\",r),p.setAttribute(\"height\",o),p.setAttribute(\"preserveAspectRatio\",\"none\"),h=this.__document.createElement(\"canvas\"),h.width=r,h.height=o,d=h.getContext(\"2d\"),d.imageSmoothingEnabled=!1,d.mozImageSmoothingEnabled=!1,d.oImageSmoothingEnabled=!1,d.webkitImageSmoothingEnabled=!1,d.drawImage(y,g,v,i,n,0,0,r,o),y=h,p.setAttribute(\"transform\",b),p.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",y.toDataURL()),s.appendChild(p))},a.prototype.createPattern=function(t,e){var o,i=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"pattern\"),n=r(this.__ids);return i.setAttribute(\"id\",n),i.setAttribute(\"width\",t.width),i.setAttribute(\"height\",t.height),\"CANVAS\"===t.nodeName||\"IMG\"===t.nodeName?(o=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"image\"),o.setAttribute(\"width\",t.width),o.setAttribute(\"height\",t.height),o.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===t.nodeName?t.toDataURL():t.getAttribute(\"src\")),i.appendChild(o),this.__defs.appendChild(i)):t instanceof a&&(i.appendChild(t.__root.childNodes[1]),this.__defs.appendChild(i)),new u(i,this)},a.prototype.setLineDash=function(t){t&&t.length>0?this.lineDash=t.join(\",\"):this.lineDash=null},a.prototype.drawFocusRing=function(){},a.prototype.createImageData=function(){},a.prototype.getImageData=function(){},a.prototype.putImageData=function(){},a.prototype.globalCompositeOperation=function(){},a.prototype.setTransform=function(){},\"object\"==typeof window&&(window.C2S=a),\"object\"==typeof e&&\"object\"==typeof e.exports&&(e.exports=a)}()},{}],\"d/auto-bind\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/object/copy\"),n=t(\"es5-ext/object/normalize-options\"),s=t(\"es5-ext/object/valid-callable\"),a=t(\"es5-ext/object/map\"),l=t(\"es5-ext/object/valid-callable\"),u=t(\"es5-ext/object/valid-value\"),c=Function.prototype.bind,_=Object.defineProperty,p=Object.prototype.hasOwnProperty;o=function(t,e,r){var o,n=u(e)&&l(e.value);return o=i(e),delete o.writable,delete o.value,o.get=function(){return!r.overwriteDefinition&&p.call(this,t)?n:(e.value=c.call(n,r.resolveContext?r.resolveContext(this):this),_(this,t,e),this[t])},o},e.exports=function(t){var e=n(arguments[1]);return null!=e.resolveContext&&s(e.resolveContext),a(t,function(t,r){return o(r,t,e)})}},{\"es5-ext/object/copy\":\"es5-ext/object/copy\",\"es5-ext/object/map\":\"es5-ext/object/map\",\"es5-ext/object/normalize-options\":\"es5-ext/object/normalize-options\",\"es5-ext/object/valid-callable\":\"es5-ext/object/valid-callable\",\"es5-ext/object/valid-value\":\"es5-ext/object/valid-value\"}],\"d/index\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/object/assign\"),n=t(\"es5-ext/object/normalize-options\"),s=t(\"es5-ext/object/is-callable\"),a=t(\"es5-ext/string/#/contains\");o=e.exports=function(t,e){var r,o,s,l,u;return arguments.length<2||\"string\"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(r=s=!0,o=!1):(r=a.call(t,\"c\"),o=a.call(t,\"e\"),s=a.call(t,\"w\")),u={value:e,configurable:r,enumerable:o,writable:s},l?i(n(l),u):u},o.gs=function(t,e,r){var o,l,u,c;return\"string\"!=typeof t?(u=r,r=e,e=t,t=null):u=arguments[3],null==e?e=void 0:s(e)?null==r?r=void 0:s(r)||(u=r,r=void 0):(u=e,e=r=void 0),null==t?(o=!0,l=!1):(o=a.call(t,\"c\"),l=a.call(t,\"e\")),c={get:e,set:r,configurable:o,enumerable:l},u?i(n(u),c):c}},{\"es5-ext/object/assign\":\"es5-ext/object/assign/index\",\"es5-ext/object/is-callable\":\"es5-ext/object/is-callable\",\"es5-ext/object/normalize-options\":\"es5-ext/object/normalize-options\",\"es5-ext/string/#/contains\":\"es5-ext/string/#/contains/index\"}],\"es5-ext/array/#/clear\":[function(t,e,r){\"use strict\";var o=t(\"../../object/valid-value\");e.exports=function(){return o(this).length=0,this}},{\"../../object/valid-value\":\"es5-ext/object/valid-value\"}],\"es5-ext/array/#/e-index-of\":[function(t,e,r){\"use strict\";var o=t(\"../../number/to-pos-integer\"),i=t(\"../../object/valid-value\"),n=Array.prototype.indexOf,s=Object.prototype.hasOwnProperty,a=Math.abs,l=Math.floor;e.exports=function(t){var e,r,u,c;if(t===t)return n.apply(this,arguments);for(r=o(i(this).length),u=arguments[1],u=isNaN(u)?0:u>=0?l(u):o(this.length)-l(a(u)),e=u;e<r;++e)if(s.call(this,e)&&(c=this[e],c!==c))return e;return-1}},{\"../../number/to-pos-integer\":\"es5-ext/number/to-pos-integer\",\"../../object/valid-value\":\"es5-ext/object/valid-value\"}],\"es5-ext/array/from/index\":[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Array.from:t(\"./shim\")},{\"./is-implemented\":\"es5-ext/array/from/is-implemented\",\"./shim\":\"es5-ext/array/from/shim\"}],\"es5-ext/array/from/is-implemented\":[function(t,e,r){\"use strict\";e.exports=function(){var t,e,r=Array.from;return\"function\"==typeof r&&(t=[\"raz\",\"dwa\"],e=r(t),Boolean(e&&e!==t&&\"dwa\"===e[1]))}},{}],\"es5-ext/array/from/shim\":[function(t,e,r){\"use strict\";var o=t(\"es6-symbol\").iterator,i=t(\"../../function/is-arguments\"),n=t(\"../../function/is-function\"),s=t(\"../../number/to-pos-integer\"),a=t(\"../../object/valid-callable\"),l=t(\"../../object/valid-value\"),u=t(\"../../string/is-string\"),c=Array.isArray,_=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},h=Object.defineProperty;e.exports=function(t){var e,r,d,f,m,y,g,v,b,w,x=arguments[1],k=arguments[2];if(t=Object(l(t)),null!=x&&a(x),this&&this!==Array&&n(this))e=this;else{if(!x){if(i(t))return m=t.length,1!==m?Array.apply(null,t):(f=new Array(1),f[0]=t[0],f);if(c(t)){for(f=new Array(m=t.length),r=0;r<m;++r)f[r]=t[r];return f}}f=[]}if(!c(t))if(void 0!==(b=t[o])){for(g=a(b).call(t),e&&(f=new e),v=g.next(),r=0;!v.done;)w=x?_.call(x,k,v.value,r):v.value,e?(p.value=w,h(f,r,p)):f[r]=w,v=g.next(),++r;m=r}else if(u(t)){for(m=t.length,e&&(f=new e),r=0,d=0;r<m;++r)w=t[r],r+1<m&&(y=w.charCodeAt(0),y>=55296&&y<=56319&&(w+=t[++r])),w=x?_.call(x,k,w,d):w,e?(p.value=w,h(f,d,p)):f[d]=w,++d;m=d}if(void 0===m)for(m=s(t.length),e&&(f=new e(m)),r=0;r<m;++r)w=x?_.call(x,k,t[r],r):t[r],e?(p.value=w,h(f,r,p)):f[r]=w;return e&&(p.value=null,f.length=m),f}},{\"../../function/is-arguments\":\"es5-ext/function/is-arguments\",\"../../function/is-function\":\"es5-ext/function/is-function\",\"../../number/to-pos-integer\":\"es5-ext/number/to-pos-integer\",\"../../object/valid-callable\":\"es5-ext/object/valid-callable\",\"../../object/valid-value\":\"es5-ext/object/valid-value\",\"../../string/is-string\":\"es5-ext/string/is-string\",\"es6-symbol\":\"es6-symbol/index\"}],\"es5-ext/function/is-arguments\":[function(t,e,r){\"use strict\";var o=Object.prototype.toString,i=o.call(function(){return arguments}());e.exports=function(t){return o.call(t)===i}},{}],\"es5-ext/function/is-function\":[function(t,e,r){\"use strict\";var o=Object.prototype.toString,i=o.call(t(\"./noop\"));e.exports=function(t){return\"function\"==typeof t&&o.call(t)===i}},{\"./noop\":\"es5-ext/function/noop\"}],\"es5-ext/function/noop\":[function(t,e,r){\"use strict\";e.exports=function(){}},{}],\"es5-ext/global\":[function(t,e,r){\"use strict\";e.exports=new Function(\"return this\")()},{}],\"es5-ext/math/sign/index\":[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Math.sign:t(\"./shim\")},{\"./is-implemented\":\"es5-ext/math/sign/is-implemented\",\"./shim\":\"es5-ext/math/sign/shim\"}],\"es5-ext/math/sign/is-implemented\":[function(t,e,r){\"use strict\";e.exports=function(){var t=Math.sign;return\"function\"==typeof t&&(1===t(10)&&t(-20)===-1)}},{}],\"es5-ext/math/sign/shim\":[function(t,e,r){\"use strict\";e.exports=function(t){return t=Number(t),isNaN(t)||0===t?t:t>0?1:-1}},{}],\"es5-ext/number/to-integer\":[function(t,e,r){\"use strict\";var o=t(\"../math/sign\"),i=Math.abs,n=Math.floor;e.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?o(t)*n(i(t)):t)}},{\"../math/sign\":\"es5-ext/math/sign/index\"}],\"es5-ext/number/to-pos-integer\":[function(t,e,r){\"use strict\";var o=t(\"./to-integer\"),i=Math.max;e.exports=function(t){return i(0,o(t))}},{\"./to-integer\":\"es5-ext/number/to-integer\"}],\"es5-ext/object/_iterate\":[function(t,e,r){\"use strict\";var o=t(\"./valid-callable\"),i=t(\"./valid-value\"),n=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(r,u){var c,_=arguments[2],p=arguments[3];return r=Object(i(r)),o(u),c=a(r),p&&c.sort(\"function\"==typeof p?n.call(p,r):void 0),\"function\"!=typeof t&&(t=c[t]),s.call(t,c,function(t,o){return l.call(r,t)?s.call(u,_,r[t],t,r,o):e})}}},{\"./valid-callable\":\"es5-ext/object/valid-callable\",\"./valid-value\":\"es5-ext/object/valid-value\"}],\"es5-ext/object/assign/index\":[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.assign:t(\"./shim\")},{\"./is-implemented\":\"es5-ext/object/assign/is-implemented\",\"./shim\":\"es5-ext/object/assign/shim\"}],\"es5-ext/object/assign/is-implemented\":[function(t,e,r){\"use strict\";e.exports=function(){var t,e=Object.assign;return\"function\"==typeof e&&(t={foo:\"raz\"},e(t,{bar:\"dwa\"},{trzy:\"trzy\"}),t.foo+t.bar+t.trzy===\"razdwatrzy\")}},{}],\"es5-ext/object/assign/shim\":[function(t,e,r){\"use strict\";var o=t(\"../keys\"),i=t(\"../valid-value\"),n=Math.max;e.exports=function(t,e){var r,s,a,l=n(arguments.length,2);for(t=Object(i(t)),a=function(o){try{t[o]=e[o]}catch(i){r||(r=i)}},s=1;s<l;++s)e=arguments[s],o(e).forEach(a);if(void 0!==r)throw r;return t}},{\"../keys\":\"es5-ext/object/keys/index\",\"../valid-value\":\"es5-ext/object/valid-value\"}],\"es5-ext/object/copy\":[function(t,e,r){\"use strict\";var o=t(\"../array/from\"),i=t(\"./assign\"),n=t(\"./valid-value\");e.exports=function(t){var e=Object(n(t)),r=arguments[1],s=Object(arguments[2]);if(e!==t&&!r)return e;var a={};return r?o(r,function(e){(s.ensure||e in t)&&(a[e]=t[e])}):i(a,t),a}},{\"../array/from\":\"es5-ext/array/from/index\",\"./assign\":\"es5-ext/object/assign/index\",\"./valid-value\":\"es5-ext/object/valid-value\"}],\"es5-ext/object/create\":[function(t,e,r){\"use strict\";var o,i=Object.create;t(\"./set-prototype-of/is-implemented\")()||(o=t(\"./set-prototype-of/shim\")),e.exports=function(){var t,e,r;return o?1!==o.level?i:(t={},e={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(t){return\"__proto__\"===t?void(e[t]={configurable:!0,enumerable:!1,writable:!0,value:void 0}):void(e[t]=r)}),Object.defineProperties(t,e),Object.defineProperty(o,\"nullPolyfill\",{configurable:!1,enumerable:!1,writable:!1,value:t}),function(e,r){return i(null===e?t:e,r)}):i}()},{\"./set-prototype-of/is-implemented\":\"es5-ext/object/set-prototype-of/is-implemented\",\"./set-prototype-of/shim\":\"es5-ext/object/set-prototype-of/shim\"}],\"es5-ext/object/for-each\":[function(t,e,r){\"use strict\";e.exports=t(\"./_iterate\")(\"forEach\")},{\"./_iterate\":\"es5-ext/object/_iterate\"}],\"es5-ext/object/is-callable\":[function(t,e,r){\"use strict\";e.exports=function(t){return\"function\"==typeof t}},{}],\"es5-ext/object/is-object\":[function(t,e,r){\"use strict\";var o={\"function\":!0,object:!0};e.exports=function(t){return null!=t&&o[typeof t]||!1}},{}],\"es5-ext/object/keys/index\":[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.keys:t(\"./shim\")},{\"./is-implemented\":\"es5-ext/object/keys/is-implemented\",\"./shim\":\"es5-ext/object/keys/shim\"}],\"es5-ext/object/keys/is-implemented\":[function(t,e,r){\"use strict\";e.exports=function(){try{return Object.keys(\"primitive\"),!0}catch(t){return!1}}},{}],\"es5-ext/object/keys/shim\":[function(t,e,r){\"use strict\";var o=Object.keys;e.exports=function(t){return o(null==t?t:Object(t))}},{}],\"es5-ext/object/map\":[function(t,e,r){\"use strict\";var o=t(\"./valid-callable\"),i=t(\"./for-each\"),n=Function.prototype.call;e.exports=function(t,e){var r={},s=arguments[2];return o(e),i(t,function(t,o,i,a){r[o]=n.call(e,s,t,o,i,a)}),r}},{\"./for-each\":\"es5-ext/object/for-each\",\"./valid-callable\":\"es5-ext/object/valid-callable\"}],\"es5-ext/object/normalize-options\":[function(t,e,r){\"use strict\";var o=Array.prototype.forEach,i=Object.create,n=function(t,e){var r;for(r in t)e[r]=t[r]};e.exports=function(t){var e=i(null);return o.call(arguments,function(t){null!=t&&n(Object(t),e)}),e}},{}],\"es5-ext/object/set-prototype-of/index\":[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Object.setPrototypeOf:t(\"./shim\")},{\"./is-implemented\":\"es5-ext/object/set-prototype-of/is-implemented\",\"./shim\":\"es5-ext/object/set-prototype-of/shim\"}],\"es5-ext/object/set-prototype-of/is-implemented\":[function(t,e,r){\"use strict\";var o=Object.create,i=Object.getPrototypeOf,n={};e.exports=function(){var t=Object.setPrototypeOf,e=arguments[0]||o;return\"function\"==typeof t&&i(t(e(null),n))===n}},{}],\"es5-ext/object/set-prototype-of/shim\":[function(t,e,r){\"use strict\";var o,i=t(\"../is-object\"),n=t(\"../valid-value\"),s=Object.prototype.isPrototypeOf,a=Object.defineProperty,l={configurable:!0,enumerable:!1,writable:!0,value:void 0};o=function(t,e){if(n(t),null===e||i(e))return t;throw new TypeError(\"Prototype must be null or an object\")},e.exports=function(t){var e,r;return t?(2===t.level?t.set?(r=t.set,e=function(t,e){return r.call(o(t,e),e),t}):e=function(t,e){return o(t,e).__proto__=e,t}:e=function i(t,e){var r;return o(t,e),r=s.call(i.nullPolyfill,t),r&&delete i.nullPolyfill.__proto__,null===e&&(e=i.nullPolyfill),t.__proto__=e,r&&a(i.nullPolyfill,\"__proto__\",l),t},Object.defineProperty(e,\"level\",{configurable:!1,enumerable:!1,writable:!1,value:t.level})):null}(function(){var t,e=Object.create(null),r={},o=Object.getOwnPropertyDescriptor(Object.prototype,\"__proto__\");if(o){try{t=o.set,t.call(e,r)}catch(i){}if(Object.getPrototypeOf(e)===r)return{set:t,level:2}}return e.__proto__=r,Object.getPrototypeOf(e)===r?{level:2}:(e={},e.__proto__=r,Object.getPrototypeOf(e)===r&&{level:1})}()),t(\"../create\")},{\"../create\":\"es5-ext/object/create\",\"../is-object\":\"es5-ext/object/is-object\",\"../valid-value\":\"es5-ext/object/valid-value\"}],\"es5-ext/object/valid-callable\":[function(t,e,r){\"use strict\";e.exports=function(t){if(\"function\"!=typeof t)throw new TypeError(t+\" is not a function\");return t}},{}],\"es5-ext/object/valid-object\":[function(t,e,r){\"use strict\";var o=t(\"./is-object\");e.exports=function(t){if(!o(t))throw new TypeError(t+\" is not an Object\");return t}},{\"./is-object\":\"es5-ext/object/is-object\"}],\"es5-ext/object/valid-value\":[function(t,e,r){\"use strict\";e.exports=function(t){if(null==t)throw new TypeError(\"Cannot use null or undefined\");return t}},{}],\"es5-ext/string/#/contains/index\":[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?String.prototype.contains:t(\"./shim\")},{\"./is-implemented\":\"es5-ext/string/#/contains/is-implemented\",\"./shim\":\"es5-ext/string/#/contains/shim\"}],\"es5-ext/string/#/contains/is-implemented\":[function(t,e,r){\"use strict\";var o=\"razdwatrzy\";e.exports=function(){return\"function\"==typeof o.contains&&(o.contains(\"dwa\")===!0&&o.contains(\"foo\")===!1)}},{}],\"es5-ext/string/#/contains/shim\":[function(t,e,r){\"use strict\";var o=String.prototype.indexOf;e.exports=function(t){return o.call(this,t,arguments[1])>-1}},{}],\"es5-ext/string/is-string\":[function(t,e,r){\"use strict\";var o=Object.prototype.toString,i=o.call(\"\");e.exports=function(t){return\"string\"==typeof t||t&&\"object\"==typeof t&&(t instanceof String||o.call(t)===i)||!1}},{}],\"es5-ext/string/random-uniq\":[function(t,e,r){\"use strict\";var o=Object.create(null),i=Math.random;e.exports=function(){var t;do t=i().toString(36).slice(2);while(o[t]);return t}},{}],\"es6-iterator/array\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/object/set-prototype-of\"),n=t(\"es5-ext/string/#/contains\"),s=t(\"d\"),a=t(\"./\"),l=Object.defineProperty;o=e.exports=function(t,e){return this instanceof o?(a.call(this,t),e=e?n.call(e,\"key+value\")?\"key+value\":n.call(e,\"key\")?\"key\":\"value\":\"value\",void l(this,\"__kind__\",s(\"\",e))):new o(t,e)},i&&i(o,a),o.prototype=Object.create(a.prototype,{constructor:s(o),_resolve:s(function(t){return\"value\"===this.__kind__?this.__list__[t]:\"key+value\"===this.__kind__?[t,this.__list__[t]]:t}),toString:s(function(){return\"[object Array Iterator]\"})})},{\"./\":\"es6-iterator/index\",d:\"d/index\",\"es5-ext/object/set-prototype-of\":\"es5-ext/object/set-prototype-of/index\",\"es5-ext/string/#/contains\":\"es5-ext/string/#/contains/index\"}],\"es6-iterator/for-of\":[function(t,e,r){\"use strict\";var o=t(\"es5-ext/function/is-arguments\"),i=t(\"es5-ext/object/valid-callable\"),n=t(\"es5-ext/string/is-string\"),s=t(\"./get\"),a=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;e.exports=function(t,e){var r,c,_,p,h,d,f,m,y=arguments[2];if(a(t)||o(t)?r=\"array\":n(t)?r=\"string\":t=s(t),i(e),_=function(){p=!0},\"array\"===r)return void u.call(t,function(t){if(l.call(e,y,t,_),p)return!0});if(\"string\"!==r)for(c=t.next();!c.done;){if(l.call(e,y,c.value,_),p)return;c=t.next()}else for(d=t.length,h=0;h<d&&(f=t[h],h+1<d&&(m=f.charCodeAt(0),m>=55296&&m<=56319&&(f+=t[++h])),l.call(e,y,f,_),!p);++h);}},{\"./get\":\"es6-iterator/get\",\"es5-ext/function/is-arguments\":\"es5-ext/function/is-arguments\",\"es5-ext/object/valid-callable\":\"es5-ext/object/valid-callable\",\"es5-ext/string/is-string\":\"es5-ext/string/is-string\"}],\"es6-iterator/get\":[function(t,e,r){\"use strict\";var o=t(\"es5-ext/function/is-arguments\"),i=t(\"es5-ext/string/is-string\"),n=t(\"./array\"),s=t(\"./string\"),a=t(\"./valid-iterable\"),l=t(\"es6-symbol\").iterator;e.exports=function(t){return\"function\"==typeof a(t)[l]?t[l]():o(t)?new n(t):i(t)?new s(t):new n(t)}},{\"./array\":\"es6-iterator/array\",\"./string\":\"es6-iterator/string\",\"./valid-iterable\":\"es6-iterator/valid-iterable\",\"es5-ext/function/is-arguments\":\"es5-ext/function/is-arguments\",\"es5-ext/string/is-string\":\"es5-ext/string/is-string\",\"es6-symbol\":\"es6-symbol/index\"}],\"es6-iterator/index\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/array/#/clear\"),n=t(\"es5-ext/object/assign\"),s=t(\"es5-ext/object/valid-callable\"),a=t(\"es5-ext/object/valid-value\"),l=t(\"d\"),u=t(\"d/auto-bind\"),c=t(\"es6-symbol\"),_=Object.defineProperty,p=Object.defineProperties;e.exports=o=function(t,e){return this instanceof o?(p(this,{__list__:l(\"w\",a(t)),__context__:l(\"w\",e),__nextIndex__:l(\"w\",0)}),void(e&&(s(e.on),e.on(\"_add\",this._onAdd),e.on(\"_delete\",this._onDelete),e.on(\"_clear\",this._onClear)))):new o(t,e)},p(o.prototype,n({constructor:l(o),_next:l(function(){var t;if(this.__list__)return this.__redo__&&(t=this.__redo__.shift(),void 0!==t)?t:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:l(function(){return this._createResult(this._next())}),_createResult:l(function(t){return void 0===t?{done:!0,value:void 0}:{done:!1,value:this._resolve(t)}}),_resolve:l(function(t){return this.__list__[t]}),_unBind:l(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off(\"_add\",this._onAdd),\n",
" this.__context__.off(\"_delete\",this._onDelete),this.__context__.off(\"_clear\",this._onClear),this.__context__=null)}),toString:l(function(){return\"[object Iterator]\"})},u({_onAdd:l(function(t){if(!(t>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void _(this,\"__redo__\",l(\"c\",[t]));this.__redo__.forEach(function(e,r){e>=t&&(this.__redo__[r]=++e)},this),this.__redo__.push(t)}}),_onDelete:l(function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(e=this.__redo__.indexOf(t),e!==-1&&this.__redo__.splice(e,1),this.__redo__.forEach(function(e,r){e>t&&(this.__redo__[r]=--e)},this)))}),_onClear:l(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),_(o.prototype,c.iterator,l(function(){return this})),_(o.prototype,c.toStringTag,l(\"\",\"Iterator\"))},{d:\"d/index\",\"d/auto-bind\":\"d/auto-bind\",\"es5-ext/array/#/clear\":\"es5-ext/array/#/clear\",\"es5-ext/object/assign\":\"es5-ext/object/assign/index\",\"es5-ext/object/valid-callable\":\"es5-ext/object/valid-callable\",\"es5-ext/object/valid-value\":\"es5-ext/object/valid-value\",\"es6-symbol\":\"es6-symbol/index\"}],\"es6-iterator/is-iterable\":[function(t,e,r){\"use strict\";var o=t(\"es5-ext/function/is-arguments\"),i=t(\"es5-ext/string/is-string\"),n=t(\"es6-symbol\").iterator,s=Array.isArray;e.exports=function(t){return null!=t&&(!!s(t)||(!!i(t)||(!!o(t)||\"function\"==typeof t[n])))}},{\"es5-ext/function/is-arguments\":\"es5-ext/function/is-arguments\",\"es5-ext/string/is-string\":\"es5-ext/string/is-string\",\"es6-symbol\":\"es6-symbol/index\"}],\"es6-iterator/string\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/object/set-prototype-of\"),n=t(\"d\"),s=t(\"./\"),a=Object.defineProperty;o=e.exports=function(t){return this instanceof o?(t=String(t),s.call(this,t),void a(this,\"__length__\",n(\"\",t.length))):new o(t)},i&&i(o,s),o.prototype=Object.create(s.prototype,{constructor:n(o),_next:n(function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:n(function(t){var e,r=this.__list__[t];return this.__nextIndex__===this.__length__?r:(e=r.charCodeAt(0),e>=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r)}),toString:n(function(){return\"[object String Iterator]\"})})},{\"./\":\"es6-iterator/index\",d:\"d/index\",\"es5-ext/object/set-prototype-of\":\"es5-ext/object/set-prototype-of/index\"}],\"es6-iterator/valid-iterable\":[function(t,e,r){\"use strict\";var o=t(\"./is-iterable\");e.exports=function(t){if(!o(t))throw new TypeError(t+\" is not iterable\");return t}},{\"./is-iterable\":\"es6-iterator/is-iterable\"}],\"es6-promise\":[function(e,r,o){(function(o,i){/*!\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/jakearchibald/es6-promise/master/LICENSE\n",
" * @version 3.0.2\n",
" */\n",
" (function(){\"use strict\";function n(t){return\"function\"==typeof t||\"object\"==typeof t&&null!==t}function s(t){return\"function\"==typeof t}function a(t){return\"object\"==typeof t&&null!==t}function l(t){X=t}function u(t){J=t}function c(){return function(){o.nextTick(f)}}function _(){return function(){Y(f)}}function p(){var t=0,e=new K(f),r=document.createTextNode(\"\");return e.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}function h(){var t=new MessageChannel;return t.port1.onmessage=f,function(){t.port2.postMessage(0)}}function d(){return function(){setTimeout(f,1)}}function f(){for(var t=0;t<Q;t+=2){var e=rt[t],r=rt[t+1];e(r),rt[t]=void 0,rt[t+1]=void 0}Q=0}function m(){try{var t=e,r=t(\"vertx\");return Y=r.runOnLoop||r.runOnContext,_()}catch(o){return d()}}function y(){}function g(){return new TypeError(\"You cannot resolve a promise with itself\")}function v(){return new TypeError(\"A promises callback cannot return that same promise.\")}function b(t){try{return t.then}catch(e){return st.error=e,st}}function w(t,e,r,o){try{t.call(e,r,o)}catch(i){return i}}function x(t,e,r){J(function(t){var o=!1,i=w(r,e,function(r){o||(o=!0,e!==r?j(t,r):S(t,r))},function(e){o||(o=!0,O(t,e))},\"Settle: \"+(t._label||\" unknown promise\"));!o&&i&&(o=!0,O(t,i))},t)}function k(t,e){e._state===it?S(t,e._result):e._state===nt?O(t,e._result):P(e,void 0,function(e){j(t,e)},function(e){O(t,e)})}function M(t,e){if(e.constructor===t.constructor)k(t,e);else{var r=b(e);r===st?O(t,st.error):void 0===r?S(t,e):s(r)?x(t,e,r):S(t,e)}}function j(t,e){t===e?O(t,g()):n(e)?M(t,e):S(t,e)}function T(t){t._onerror&&t._onerror(t._result),A(t)}function S(t,e){t._state===ot&&(t._result=e,t._state=it,0!==t._subscribers.length&&J(A,t))}function O(t,e){t._state===ot&&(t._state=nt,t._result=e,J(T,t))}function P(t,e,r,o){var i=t._subscribers,n=i.length;t._onerror=null,i[n]=e,i[n+it]=r,i[n+nt]=o,0===n&&t._state&&J(A,t)}function A(t){var e=t._subscribers,r=t._state;if(0!==e.length){for(var o,i,n=t._result,s=0;s<e.length;s+=3)o=e[s],i=e[s+r],o?C(r,o,i,n):i(n);t._subscribers.length=0}}function E(){this.error=null}function z(t,e){try{return t(e)}catch(r){return at.error=r,at}}function C(t,e,r,o){var i,n,a,l,u=s(r);if(u){if(i=z(r,o),i===at?(l=!0,n=i.error,i=null):a=!0,e===i)return void O(e,v())}else i=o,a=!0;e._state!==ot||(u&&a?j(e,i):l?O(e,n):t===it?S(e,i):t===nt&&O(e,i))}function N(t,e){try{e(function(e){j(t,e)},function(e){O(t,e)})}catch(r){O(t,r)}}function D(t,e){var r=this;r._instanceConstructor=t,r.promise=new t(y),r._validateInput(e)?(r._input=e,r.length=e.length,r._remaining=e.length,r._init(),0===r.length?S(r.promise,r._result):(r.length=r.length||0,r._enumerate(),0===r._remaining&&S(r.promise,r._result))):O(r.promise,r._validationError())}function F(t){return new lt(this,t).promise}function I(t){function e(t){j(i,t)}function r(t){O(i,t)}var o=this,i=new o(y);if(!H(t))return O(i,new TypeError(\"You must pass an array to race.\")),i;for(var n=t.length,s=0;i._state===ot&&s<n;s++)P(o.resolve(t[s]),void 0,e,r);return i}function B(t){var e=this;if(t&&\"object\"==typeof t&&t.constructor===e)return t;var r=new e(y);return j(r,t),r}function L(t){var e=this,r=new e(y);return O(r,t),r}function R(){throw new TypeError(\"You must pass a resolver function as the first argument to the promise constructor\")}function V(){throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\")}function G(t){this._id=ht++,this._state=void 0,this._result=void 0,this._subscribers=[],y!==t&&(s(t)||R(),this instanceof G||V(),N(this,t))}function q(){var t;if(\"undefined\"!=typeof i)t=i;else if(\"undefined\"!=typeof self)t=self;else try{t=Function(\"return this\")()}catch(e){throw new Error(\"polyfill failed because global object is unavailable in this environment\")}var r=t.Promise;r&&\"[object Promise]\"===Object.prototype.toString.call(r.resolve())&&!r.cast||(t.Promise=dt)}var U;U=Array.isArray?Array.isArray:function(t){return\"[object Array]\"===Object.prototype.toString.call(t)};var Y,X,W,H=U,Q=0,J=({}.toString,function(t,e){rt[Q]=t,rt[Q+1]=e,Q+=2,2===Q&&(X?X(f):W())}),$=\"undefined\"!=typeof window?window:void 0,Z=$||{},K=Z.MutationObserver||Z.WebKitMutationObserver,tt=\"undefined\"!=typeof o&&\"[object process]\"==={}.toString.call(o),et=\"undefined\"!=typeof Uint8ClampedArray&&\"undefined\"!=typeof importScripts&&\"undefined\"!=typeof MessageChannel,rt=new Array(1e3);W=tt?c():K?p():et?h():void 0===$&&\"function\"==typeof e?m():d();var ot=void 0,it=1,nt=2,st=new E,at=new E;D.prototype._validateInput=function(t){return H(t)},D.prototype._validationError=function(){return new Error(\"Array Methods must be provided an Array\")},D.prototype._init=function(){this._result=new Array(this.length)};var lt=D;D.prototype._enumerate=function(){for(var t=this,e=t.length,r=t.promise,o=t._input,i=0;r._state===ot&&i<e;i++)t._eachEntry(o[i],i)},D.prototype._eachEntry=function(t,e){var r=this,o=r._instanceConstructor;a(t)?t.constructor===o&&t._state!==ot?(t._onerror=null,r._settledAt(t._state,e,t._result)):r._willSettleAt(o.resolve(t),e):(r._remaining--,r._result[e]=t)},D.prototype._settledAt=function(t,e,r){var o=this,i=o.promise;i._state===ot&&(o._remaining--,t===nt?O(i,r):o._result[e]=r),0===o._remaining&&S(i,o._result)},D.prototype._willSettleAt=function(t,e){var r=this;P(t,void 0,function(t){r._settledAt(it,e,t)},function(t){r._settledAt(nt,e,t)})};var ut=F,ct=I,_t=B,pt=L,ht=0,dt=G;G.all=ut,G.race=ct,G.resolve=_t,G.reject=pt,G._setScheduler=l,G._setAsap=u,G._asap=J,G.prototype={constructor:G,then:function(t,e){var r=this,o=r._state;if(o===it&&!t||o===nt&&!e)return this;var i=new this.constructor(y),n=r._result;if(o){var s=arguments[o-1];J(function(){C(o,i,s,n)})}else P(r,i,t,e);return i},\"catch\":function(t){return this.then(null,t)}};var ft=q,mt={Promise:dt,polyfill:ft};\"function\"==typeof t&&t.amd?t(function(){return mt}):\"undefined\"!=typeof r&&r.exports?r.exports=mt:\"undefined\"!=typeof this&&(this.ES6Promise=mt),ft()}).call(this)}).call(this,e(\"_process\"),\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{_process:\"_process\"}],\"es6-set/implement\":[function(t,e,r){\"use strict\";t(\"./is-implemented\")()||Object.defineProperty(t(\"es5-ext/global\"),\"Set\",{value:t(\"./polyfill\"),configurable:!0,enumerable:!1,writable:!0})},{\"./is-implemented\":\"es6-set/is-implemented\",\"./polyfill\":\"es6-set/polyfill\",\"es5-ext/global\":\"es5-ext/global\"}],\"es6-set/is-implemented\":[function(t,e,r){\"use strict\";e.exports=function(){var t,e,r;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&&(e=t.values(),r=e.next(),r.done===!1&&\"raz\"===r.value)))))))))))}},{}],\"es6-set/is-native-implemented\":[function(t,e,r){\"use strict\";e.exports=function(){return\"undefined\"!=typeof Set&&\"[object Set]\"===Object.prototype.toString.call(Set.prototype)}()},{}],\"es6-set/lib/iterator\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/object/set-prototype-of\"),n=t(\"es5-ext/string/#/contains\"),s=t(\"d\"),a=t(\"es6-iterator\"),l=t(\"es6-symbol\").toStringTag,u=Object.defineProperty;o=e.exports=function(t,e){return this instanceof o?(a.call(this,t.__setData__,t),e=e&&n.call(e,\"key+value\")?\"key+value\":\"value\",void u(this,\"__kind__\",s(\"\",e))):new o(t,e)},i&&i(o,a),o.prototype=Object.create(a.prototype,{constructor:s(o),_resolve:s(function(t){return\"value\"===this.__kind__?this.__list__[t]:[this.__list__[t],this.__list__[t]]}),toString:s(function(){return\"[object Set Iterator]\"})}),u(o.prototype,l,s(\"c\",\"Set Iterator\"))},{d:\"d/index\",\"es5-ext/object/set-prototype-of\":\"es5-ext/object/set-prototype-of/index\",\"es5-ext/string/#/contains\":\"es5-ext/string/#/contains/index\",\"es6-iterator\":\"es6-iterator/index\",\"es6-symbol\":\"es6-symbol/index\"}],\"es6-set/polyfill\":[function(t,e,r){\"use strict\";var o,i,n,s=t(\"es5-ext/array/#/clear\"),a=t(\"es5-ext/array/#/e-index-of\"),l=t(\"es5-ext/object/set-prototype-of\"),u=t(\"es5-ext/object/valid-callable\"),c=t(\"d\"),_=t(\"event-emitter\"),p=t(\"es6-symbol\"),h=t(\"es6-iterator/valid-iterable\"),d=t(\"es6-iterator/for-of\"),f=t(\"./lib/iterator\"),m=t(\"./is-native-implemented\"),y=Function.prototype.call,g=Object.defineProperty,v=Object.getPrototypeOf;m&&(n=Set),e.exports=o=function(){var t,e=arguments[0];if(!(this instanceof o))throw new TypeError(\"Constructor requires 'new'\");return t=m&&l?l(new n,v(this)):this,null!=e&&h(e),g(t,\"__setData__\",c(\"c\",[])),e?(d(e,function(t){a.call(this,t)===-1&&this.push(t)},t.__setData__),t):t},m&&(l&&l(o,n),o.prototype=Object.create(n.prototype,{constructor:c(o)})),_(Object.defineProperties(o.prototype,{add:c(function(t){return this.has(t)?this:(this.emit(\"_add\",this.__setData__.push(t)-1,t),this)}),clear:c(function(){this.__setData__.length&&(s.call(this.__setData__),this.emit(\"_clear\"))}),\"delete\":c(function(t){var e=a.call(this.__setData__,t);return e!==-1&&(this.__setData__.splice(e,1),this.emit(\"_delete\",e,t),!0)}),entries:c(function(){return new f(this,\"key+value\")}),forEach:c(function(t){var e,r,o,i=arguments[1];for(u(t),e=this.values(),r=e._next();void 0!==r;)o=e._resolve(r),y.call(t,i,o,o,this),r=e._next()}),has:c(function(t){return a.call(this.__setData__,t)!==-1}),keys:c(i=function(){return this.values()}),size:c.gs(function(){return this.__setData__.length}),values:c(function(){return new f(this)}),toString:c(function(){return\"[object Set]\"})})),g(o.prototype,p.iterator,c(i)),g(o.prototype,p.toStringTag,c(\"c\",\"Set\"))},{\"./is-native-implemented\":\"es6-set/is-native-implemented\",\"./lib/iterator\":\"es6-set/lib/iterator\",d:\"d/index\",\"es5-ext/array/#/clear\":\"es5-ext/array/#/clear\",\"es5-ext/array/#/e-index-of\":\"es5-ext/array/#/e-index-of\",\"es5-ext/object/set-prototype-of\":\"es5-ext/object/set-prototype-of/index\",\"es5-ext/object/valid-callable\":\"es5-ext/object/valid-callable\",\"es6-iterator/for-of\":\"es6-iterator/for-of\",\"es6-iterator/valid-iterable\":\"es6-iterator/valid-iterable\",\"es6-symbol\":\"es6-symbol/index\",\"event-emitter\":\"event-emitter/index\"}],\"es6-symbol/index\":[function(t,e,r){\"use strict\";e.exports=t(\"./is-implemented\")()?Symbol:t(\"./polyfill\")},{\"./is-implemented\":\"es6-symbol/is-implemented\",\"./polyfill\":\"es6-symbol/polyfill\"}],\"es6-symbol/is-implemented\":[function(t,e,r){\"use strict\";var o={object:!0,symbol:!0};e.exports=function(){var t;if(\"function\"!=typeof Symbol)return!1;t=Symbol(\"test symbol\");try{String(t)}catch(e){return!1}return!!o[typeof Symbol.iterator]&&(!!o[typeof Symbol.toPrimitive]&&!!o[typeof Symbol.toStringTag])}},{}],\"es6-symbol/is-symbol\":[function(t,e,r){\"use strict\";e.exports=function(t){return!!t&&(\"symbol\"==typeof t||!!t.constructor&&(\"Symbol\"===t.constructor.name&&\"Symbol\"===t[t.constructor.toStringTag]))}},{}],\"es6-symbol/polyfill\":[function(t,e,r){\"use strict\";var o,i,n,s,a=t(\"d\"),l=t(\"./validate-symbol\"),u=Object.create,c=Object.defineProperties,_=Object.defineProperty,p=Object.prototype,h=u(null);if(\"function\"==typeof Symbol){o=Symbol;try{String(o()),s=!0}catch(d){}}var f=function(){var t=u(null);return function(e){for(var r,o,i=0;t[e+(i||\"\")];)++i;return e+=i||\"\",t[e]=!0,r=\"@@\"+e,_(p,r,a.gs(null,function(t){o||(o=!0,_(this,r,a(t)),o=!1)})),r}}();n=function(t){if(this instanceof n)throw new TypeError(\"Symbol is not a constructor\");return i(t)},e.exports=i=function m(t){var e;if(this instanceof m)throw new TypeError(\"Symbol is not a constructor\");return s?o(t):(e=u(n.prototype),t=void 0===t?\"\":String(t),c(e,{__description__:a(\"\",t),__name__:a(\"\",f(t))}))},c(i,{\"for\":a(function(t){return h[t]?h[t]:h[t]=i(String(t))}),keyFor:a(function(t){var e;l(t);for(e in h)if(h[e]===t)return e}),hasInstance:a(\"\",o&&o.hasInstance||i(\"hasInstance\")),isConcatSpreadable:a(\"\",o&&o.isConcatSpreadable||i(\"isConcatSpreadable\")),iterator:a(\"\",o&&o.iterator||i(\"iterator\")),match:a(\"\",o&&o.match||i(\"match\")),replace:a(\"\",o&&o.replace||i(\"replace\")),search:a(\"\",o&&o.search||i(\"search\")),species:a(\"\",o&&o.species||i(\"species\")),split:a(\"\",o&&o.split||i(\"split\")),toPrimitive:a(\"\",o&&o.toPrimitive||i(\"toPrimitive\")),toStringTag:a(\"\",o&&o.toStringTag||i(\"toStringTag\")),unscopables:a(\"\",o&&o.unscopables||i(\"unscopables\"))}),c(n.prototype,{constructor:a(i),toString:a(\"\",function(){return this.__name__})}),c(i.prototype,{toString:a(function(){return\"Symbol (\"+l(this).__description__+\")\"}),valueOf:a(function(){return l(this)})}),_(i.prototype,i.toPrimitive,a(\"\",function(){var t=l(this);return\"symbol\"==typeof t?t:t.toString()})),_(i.prototype,i.toStringTag,a(\"c\",\"Symbol\")),_(n.prototype,i.toStringTag,a(\"c\",i.prototype[i.toStringTag])),_(n.prototype,i.toPrimitive,a(\"c\",i.prototype[i.toPrimitive]))},{\"./validate-symbol\":\"es6-symbol/validate-symbol\",d:\"d/index\"}],\"es6-symbol/validate-symbol\":[function(t,e,r){\"use strict\";var o=t(\"./is-symbol\");e.exports=function(t){if(!o(t))throw new TypeError(t+\" is not a symbol\");return t}},{\"./is-symbol\":\"es6-symbol/is-symbol\"}],\"es6-weak-map/implement\":[function(t,e,r){\"use strict\";t(\"./is-implemented\")()||Object.defineProperty(t(\"es5-ext/global\"),\"WeakMap\",{value:t(\"./polyfill\"),configurable:!0,enumerable:!1,writable:!0})},{\"./is-implemented\":\"es6-weak-map/is-implemented\",\"./polyfill\":\"es6-weak-map/polyfill\",\"es5-ext/global\":\"es5-ext/global\"}],\"es6-weak-map/is-implemented\":[function(t,e,r){\"use strict\";e.exports=function(){var t,e;if(\"function\"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},\"one\"],[{},\"two\"],[{},\"three\"]])}catch(r){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)))))}},{}],\"es6-weak-map/is-native-implemented\":[function(t,e,r){\"use strict\";e.exports=function(){return\"function\"==typeof WeakMap&&\"[object WeakMap]\"===Object.prototype.toString.call(new WeakMap)}()},{}],\"es6-weak-map/polyfill\":[function(t,e,r){\"use strict\";var o,i=t(\"es5-ext/object/set-prototype-of\"),n=t(\"es5-ext/object/valid-object\"),s=t(\"es5-ext/object/valid-value\"),a=t(\"es5-ext/string/random-uniq\"),l=t(\"d\"),u=t(\"es6-iterator/get\"),c=t(\"es6-iterator/for-of\"),_=t(\"es6-symbol\").toStringTag,p=t(\"./is-native-implemented\"),h=Array.isArray,d=Object.defineProperty,f=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf;e.exports=o=function(){var t,e=arguments[0];if(!(this instanceof o))throw new TypeError(\"Constructor requires 'new'\");return t=p&&i&&WeakMap!==o?i(new WeakMap,m(this)):this,null!=e&&(h(e)||(e=u(e))),d(t,\"__weakMapData__\",l(\"c\",\"$weakMap$\"+a())),e?(c(e,function(e){s(e),t.set(e[0],e[1])}),t):t},p&&(i&&i(o,WeakMap),o.prototype=Object.create(WeakMap.prototype,{constructor:l(o)})),Object.defineProperties(o.prototype,{\"delete\":l(function(t){return!!f.call(n(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)}),get:l(function(t){if(f.call(n(t),this.__weakMapData__))return t[this.__weakMapData__]}),has:l(function(t){return f.call(n(t),this.__weakMapData__)}),set:l(function(t,e){return d(n(t),this.__weakMapData__,l(\"c\",e)),this}),toString:l(function(){return\"[object WeakMap]\"})}),d(o.prototype,_,l(\"c\",\"WeakMap\"))},{\"./is-native-implemented\":\"es6-weak-map/is-native-implemented\",d:\"d/index\",\"es5-ext/object/set-prototype-of\":\"es5-ext/object/set-prototype-of/index\",\"es5-ext/object/valid-object\":\"es5-ext/object/valid-object\",\"es5-ext/object/valid-value\":\"es5-ext/object/valid-value\",\"es5-ext/string/random-uniq\":\"es5-ext/string/random-uniq\",\"es6-iterator/for-of\":\"es6-iterator/for-of\",\"es6-iterator/get\":\"es6-iterator/get\",\"es6-symbol\":\"es6-symbol/index\"}],\"event-emitter/index\":[function(t,e,r){\"use strict\";var o,i,n,s,a,l,u,c=t(\"d\"),_=t(\"es5-ext/object/valid-callable\"),p=Function.prototype.apply,h=Function.prototype.call,d=Object.create,f=Object.defineProperty,m=Object.defineProperties,y=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};o=function(t,e){var r;return _(e),y.call(this,\"__ee__\")?r=this.__ee__:(r=g.value=d(null),f(this,\"__ee__\",g),g.value=null),r[t]?\"object\"==typeof r[t]?r[t].push(e):r[t]=[r[t],e]:r[t]=e,this},i=function(t,e){var r,i;return _(e),i=this,o.call(this,t,r=function(){n.call(i,t,r),p.call(e,this,arguments)}),r.__eeOnceListener__=e,this},n=function(t,e){var r,o,i,n;if(_(e),!y.call(this,\"__ee__\"))return this;if(r=this.__ee__,!r[t])return this;if(o=r[t],\"object\"==typeof o)for(n=0;i=o[n];++n)i!==e&&i.__eeOnceListener__!==e||(2===o.length?r[t]=o[n?0:1]:o.splice(n,1));else o!==e&&o.__eeOnceListener__!==e||delete r[t];return this},s=function(t){var e,r,o,i,n;if(y.call(this,\"__ee__\")&&(i=this.__ee__[t]))if(\"object\"==typeof i){for(r=arguments.length,n=new Array(r-1),e=1;e<r;++e)n[e-1]=arguments[e];for(i=i.slice(),e=0;o=i[e];++e)p.call(o,this,n)}else switch(arguments.length){case 1:h.call(i,this);break;case 2:h.call(i,this,arguments[1]);break;case 3:h.call(i,this,arguments[1],arguments[2]);break;default:for(r=arguments.length,n=new Array(r-1),e=1;e<r;++e)n[e-1]=arguments[e];p.call(i,this,n)}},a={on:o,once:i,off:n,emit:s},l={on:c(o),once:c(i),off:c(n),emit:c(s)},u=m({},l),e.exports=r=function(t){return null==t?d(u):m(Object(t),l)},r.methods=a},{d:\"d/index\",\"es5-ext/object/valid-callable\":\"es5-ext/object/valid-callable\"}],hammerjs:[function(e,r,o){/*! 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(e,o,i,n){\"use strict\";function s(t,e,r){return setTimeout(_(t,r),e)}function a(t,e,r){return!!Array.isArray(t)&&(l(t,r[e],r),!0)}function l(t,e,r){var o;if(t)if(t.forEach)t.forEach(e,r);else if(t.length!==n)for(o=0;o<t.length;)e.call(r,t[o],o,t),o++;else for(o in t)t.hasOwnProperty(o)&&e.call(r,t[o],o,t)}function u(t,r,o){var i=\"DEPRECATED METHOD: \"+r+\"\\n\"+o+\" AT \\n\";return function(){var r=new Error(\"get-stack-trace\"),o=r&&r.stack?r.stack.replace(/^[^\\(]+?[\\n$]/gm,\"\").replace(/^\\s+at\\s+/gm,\"\").replace(/^Object.<anonymous>\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",n=e.console&&(e.console.warn||e.console.log);return n&&n.call(e.console,i,o),t.apply(this,arguments)}}function c(t,e,r){var o,i=e.prototype;o=t.prototype=Object.create(i),o.constructor=t,o._super=i,r&&ht(o,r)}function _(t,e){return function(){return t.apply(e,arguments)}}function p(t,e){return typeof t==mt?t.apply(e?e[0]||n:n,e):t}function h(t,e){return t===n?e:t}function d(t,e,r){l(g(e),function(e){t.addEventListener(e,r,!1)})}function f(t,e,r){l(g(e),function(e){t.removeEventListener(e,r,!1)})}function m(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function y(t,e){return t.indexOf(e)>-1}function g(t){return t.trim().split(/\\s+/g)}function v(t,e,r){if(t.indexOf&&!r)return t.indexOf(e);for(var o=0;o<t.length;){if(r&&t[o][r]==e||!r&&t[o]===e)return o;o++}return-1}function b(t){return Array.prototype.slice.call(t,0)}function w(t,e,r){for(var o=[],i=[],n=0;n<t.length;){var s=e?t[n][e]:t[n];v(i,s)<0&&o.push(t[n]),i[n]=s,n++}return r&&(o=e?o.sort(function(t,r){return t[e]>r[e]}):o.sort()),o}function x(t,e){for(var r,o,i=e[0].toUpperCase()+e.slice(1),s=0;s<dt.length;){if(r=dt[s],o=r?r+i:e,o in t)return o;s++}return n}function k(){return xt++}function M(t){var r=t.ownerDocument||t;return r.defaultView||r.parentWindow||e}function j(t,e){var r=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){p(t.options.enable,[t])&&r.handler(e)},this.init()}function T(t){var e,r=t.options.inputClass;return new(e=r?r:jt?R:Tt?q:Mt?Y:L)(t,S)}function S(t,e,r){var o=r.pointers.length,i=r.changedPointers.length,n=e&zt&&o-i===0,s=e&(Nt|Dt)&&o-i===0;r.isFirst=!!n,r.isFinal=!!s,n&&(t.session={}),r.eventType=e,O(t,r),t.emit(\"hammer.input\",r),t.recognize(r),t.session.prevInput=r}function O(t,e){var r=t.session,o=e.pointers,i=o.length;r.firstInput||(r.firstInput=E(e)),i>1&&!r.firstMultiple?r.firstMultiple=E(e):1===i&&(r.firstMultiple=!1);var n=r.firstInput,s=r.firstMultiple,a=s?s.center:n.center,l=e.center=z(o);e.timeStamp=vt(),e.deltaTime=e.timeStamp-n.timeStamp,e.angle=F(a,l),e.distance=D(a,l),P(r,e),e.offsetDirection=N(e.deltaX,e.deltaY);var u=C(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=gt(u.x)>gt(u.y)?u.x:u.y,e.scale=s?B(s.pointers,o):1,e.rotation=s?I(s.pointers,o):0,e.maxPointers=r.prevInput?e.pointers.length>r.prevInput.maxPointers?e.pointers.length:r.prevInput.maxPointers:e.pointers.length,A(r,e);var c=t.element;m(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}function P(t,e){var r=e.center,o=t.offsetDelta||{},i=t.prevDelta||{},n=t.prevInput||{};e.eventType!==zt&&n.eventType!==Nt||(i=t.prevDelta={x:n.deltaX||0,y:n.deltaY||0},o=t.offsetDelta={x:r.x,y:r.y}),e.deltaX=i.x+(r.x-o.x),e.deltaY=i.y+(r.y-o.y)}function A(t,e){var r,o,i,s,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(e.eventType!=Dt&&(l>Et||a.velocity===n)){var u=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,_=C(l,u,c);o=_.x,i=_.y,r=gt(_.x)>gt(_.y)?_.x:_.y,s=N(u,c),t.lastInterval=e}else r=a.velocity,o=a.velocityX,i=a.velocityY,s=a.direction;e.velocity=r,e.velocityX=o,e.velocityY=i,e.direction=s}function E(t){for(var e=[],r=0;r<t.pointers.length;)e[r]={clientX:yt(t.pointers[r].clientX),clientY:yt(t.pointers[r].clientY)},r++;return{timeStamp:vt(),pointers:e,center:z(e),deltaX:t.deltaX,deltaY:t.deltaY}}function z(t){var e=t.length;if(1===e)return{x:yt(t[0].clientX),y:yt(t[0].clientY)};for(var r=0,o=0,i=0;i<e;)r+=t[i].clientX,o+=t[i].clientY,i++;return{x:yt(r/e),y:yt(o/e)}}function C(t,e,r){return{x:e/t||0,y:r/t||0}}function N(t,e){return t===e?Ft:gt(t)>=gt(e)?t<0?It:Bt:e<0?Lt:Rt}function D(t,e,r){r||(r=Ut);var o=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return Math.sqrt(o*o+i*i)}function F(t,e,r){r||(r=Ut);var o=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return 180*Math.atan2(i,o)/Math.PI}function I(t,e){return F(e[1],e[0],Yt)+F(t[1],t[0],Yt)}function B(t,e){return D(e[0],e[1],Yt)/D(t[0],t[1],Yt)}function L(){this.evEl=Wt,this.evWin=Ht,this.pressed=!1,j.apply(this,arguments)}function R(){this.evEl=$t,this.evWin=Zt,j.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function V(){this.evTarget=te,this.evWin=ee,this.started=!1,j.apply(this,arguments)}function G(t,e){var r=b(t.touches),o=b(t.changedTouches);return e&(Nt|Dt)&&(r=w(r.concat(o),\"identifier\",!0)),[r,o]}function q(){this.evTarget=oe,this.targetIds={},j.apply(this,arguments)}function U(t,e){var r=b(t.touches),o=this.targetIds;if(e&(zt|Ct)&&1===r.length)return o[r[0].identifier]=!0,[r,r];var i,n,s=b(t.changedTouches),a=[],l=this.target;if(n=r.filter(function(t){return m(t.target,l)}),e===zt)for(i=0;i<n.length;)o[n[i].identifier]=!0,i++;for(i=0;i<s.length;)o[s[i].identifier]&&a.push(s[i]),e&(Nt|Dt)&&delete o[s[i].identifier],i++;return a.length?[w(n.concat(a),\"identifier\",!0),a]:void 0}function Y(){j.apply(this,arguments);var t=_(this.handler,this);this.touch=new q(this.manager,t),this.mouse=new L(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function X(t,e){t&zt?(this.primaryTouch=e.changedPointers[0].identifier,W.call(this,e)):t&(Nt|Dt)&&W.call(this,e)}function W(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var r={x:e.clientX,y:e.clientY};this.lastTouches.push(r);var o=this.lastTouches,i=function(){var t=o.indexOf(r);t>-1&&o.splice(t,1)};setTimeout(i,ie)}}function H(t){for(var e=t.srcEvent.clientX,r=t.srcEvent.clientY,o=0;o<this.lastTouches.length;o++){var i=this.lastTouches[o],n=Math.abs(e-i.x),s=Math.abs(r-i.y);if(n<=ne&&s<=ne)return!0}return!1}function Q(t,e){this.manager=t,this.set(e)}function J(t){if(y(t,_e))return _e;var e=y(t,pe),r=y(t,he);return e&&r?_e:e||r?e?pe:he:y(t,ce)?ce:ue}function $(){if(!ae)return!1;var t={},r=e.CSS&&e.CSS.supports;return[\"auto\",\"manipulation\",\"pan-y\",\"pan-x\",\"pan-x pan-y\",\"none\"].forEach(function(o){t[o]=!r||e.CSS.supports(\"touch-action\",o)}),t}function Z(t){this.options=ht({},this.defaults,t||{}),this.id=k(),this.manager=null,this.options.enable=h(this.options.enable,!0),this.state=fe,this.simultaneous={},this.requireFail=[]}function K(t){return t&be?\"cancel\":t&ge?\"end\":t&ye?\"move\":t&me?\"start\":\"\"}function tt(t){return t==Rt?\"down\":t==Lt?\"up\":t==It?\"left\":t==Bt?\"right\":\"\"}function et(t,e){var r=e.manager;return r?r.get(t):t}function rt(){Z.apply(this,arguments)}function ot(){rt.apply(this,arguments),this.pX=null,this.pY=null}function it(){rt.apply(this,arguments)}function nt(){Z.apply(this,arguments),this._timer=null,this._input=null}function st(){rt.apply(this,arguments)}function at(){rt.apply(this,arguments)}function lt(){Z.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ut(t,e){return e=e||{},e.recognizers=h(e.recognizers,ut.defaults.preset),new ct(t,e)}function ct(t,e){this.options=ht({},ut.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=T(this),this.touchAction=new Q(this,this.options.touchAction),_t(this,!0),l(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 _t(t,e){var r=t.element;if(r.style){var o;l(t.options.cssProps,function(i,n){o=x(r.style,n),e?(t.oldCssProps[o]=r.style[o],r.style[o]=i):r.style[o]=t.oldCssProps[o]||\"\"}),e||(t.oldCssProps={})}}function pt(t,e){var r=o.createEvent(\"Event\");r.initEvent(t,!0,!0),r.gesture=e,e.target.dispatchEvent(r)}var ht,dt=[\"\",\"webkit\",\"Moz\",\"MS\",\"ms\",\"o\"],ft=o.createElement(\"div\"),mt=\"function\",yt=Math.round,gt=Math.abs,vt=Date.now;ht=\"function\"!=typeof Object.assign?function(t){if(t===n||null===t)throw new TypeError(\"Cannot convert undefined or null to object\");for(var e=Object(t),r=1;r<arguments.length;r++){var o=arguments[r];if(o!==n&&null!==o)for(var i in o)o.hasOwnProperty(i)&&(e[i]=o[i])}return e}:Object.assign;var bt=u(function(t,e,r){for(var o=Object.keys(e),i=0;i<o.length;)(!r||r&&t[o[i]]===n)&&(t[o[i]]=e[o[i]]),i++;return t},\"extend\",\"Use `assign`.\"),wt=u(function(t,e){return bt(t,e,!0)},\"merge\",\"Use `assign`.\"),xt=1,kt=/mobile|tablet|ip(ad|hone|od)|android/i,Mt=\"ontouchstart\"in e,jt=x(e,\"PointerEvent\")!==n,Tt=Mt&&kt.test(navigator.userAgent),St=\"touch\",Ot=\"pen\",Pt=\"mouse\",At=\"kinect\",Et=25,zt=1,Ct=2,Nt=4,Dt=8,Ft=1,It=2,Bt=4,Lt=8,Rt=16,Vt=It|Bt,Gt=Lt|Rt,qt=Vt|Gt,Ut=[\"x\",\"y\"],Yt=[\"clientX\",\"clientY\"];j.prototype={handler:function(){},init:function(){this.evEl&&d(this.element,this.evEl,this.domHandler),this.evTarget&&d(this.target,this.evTarget,this.domHandler),this.evWin&&d(M(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&f(this.element,this.evEl,this.domHandler),this.evTarget&&f(this.target,this.evTarget,this.domHandler),this.evWin&&f(M(this.element),this.evWin,this.domHandler)}};var Xt={mousedown:zt,mousemove:Ct,mouseup:Nt},Wt=\"mousedown\",Ht=\"mousemove mouseup\";c(L,j,{handler:function(t){var e=Xt[t.type];e&zt&&0===t.button&&(this.pressed=!0),e&Ct&&1!==t.which&&(e=Nt),this.pressed&&(e&Nt&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:Pt,srcEvent:t}))}});var Qt={pointerdown:zt,pointermove:Ct,pointerup:Nt,pointercancel:Dt,pointerout:Dt},Jt={2:St,3:Ot,4:Pt,5:At},$t=\"pointerdown\",Zt=\"pointermove pointerup pointercancel\";e.MSPointerEvent&&!e.PointerEvent&&($t=\"MSPointerDown\",Zt=\"MSPointerMove MSPointerUp MSPointerCancel\"),c(R,j,{handler:function(t){var e=this.store,r=!1,o=t.type.toLowerCase().replace(\"ms\",\"\"),i=Qt[o],n=Jt[t.pointerType]||t.pointerType,s=n==St,a=v(e,t.pointerId,\"pointerId\");i&zt&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):i&(Nt|Dt)&&(r=!0),a<0||(e[a]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:n,srcEvent:t}),r&&e.splice(a,1))}});var Kt={touchstart:zt,touchmove:Ct,touchend:Nt,touchcancel:Dt},te=\"touchstart\",ee=\"touchstart touchmove touchend touchcancel\";c(V,j,{handler:function(t){var e=Kt[t.type];if(e===zt&&(this.started=!0),this.started){var r=G.call(this,t,e);e&(Nt|Dt)&&r[0].length-r[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:r[0],changedPointers:r[1],pointerType:St,srcEvent:t})}}});var re={touchstart:zt,touchmove:Ct,touchend:Nt,touchcancel:Dt},oe=\"touchstart touchmove touchend touchcancel\";c(q,j,{handler:function(t){var e=re[t.type],r=U.call(this,t,e);r&&this.callback(this.manager,e,{pointers:r[0],changedPointers:r[1],pointerType:St,srcEvent:t})}});var ie=2500,ne=25;c(Y,j,{handler:function(t,e,r){var o=r.pointerType==St,i=r.pointerType==Pt;if(!(i&&r.sourceCapabilities&&r.sourceCapabilities.firesTouchEvents)){if(o)X.call(this,e,r);else if(i&&H.call(this,r))return;this.callback(t,e,r)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var se=x(ft.style,\"touchAction\"),ae=se!==n,le=\"compute\",ue=\"auto\",ce=\"manipulation\",_e=\"none\",pe=\"pan-x\",he=\"pan-y\",de=$();Q.prototype={set:function(t){t==le&&(t=this.compute()),ae&&this.manager.element.style&&de[t]&&(this.manager.element.style[se]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){p(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),J(t.join(\" \"))},preventDefaults:function(t){var e=t.srcEvent,r=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var o=this.actions,i=y(o,_e)&&!de[_e],n=y(o,he)&&!de[he],s=y(o,pe)&&!de[pe];if(i){var a=1===t.pointers.length,l=t.distance<2,u=t.deltaTime<250;if(a&&l&&u)return}return s&&n?void 0:i||n&&r&Vt||s&&r&Gt?this.preventSrc(e):void 0},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var fe=1,me=2,ye=4,ge=8,ve=ge,be=16,we=32;Z.prototype={defaults:{},set:function(t){return ht(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(a(t,\"recognizeWith\",this))return this;var e=this.simultaneous;return t=et(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return a(t,\"dropRecognizeWith\",this)?this:(t=et(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(a(t,\"requireFailure\",this))return this;var e=this.requireFail;return t=et(t,this),v(e,t)===-1&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(a(t,\"dropRequireFailure\",this))return this;t=et(t,this);var e=v(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){function e(e){r.manager.emit(e,t)}var r=this,o=this.state;o<ge&&e(r.options.event+K(o)),e(r.options.event),t.additionalEvent&&e(t.additionalEvent),o>=ge&&e(r.options.event+K(o))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=we)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(we|fe)))return!1;t++}return!0},recognize:function(t){var e=ht({},t);return p(this.options.enable,[this,e])?(this.state&(ve|be|we)&&(this.state=fe),this.state=this.process(e),void(this.state&(me|ye|ge|be)&&this.tryEmit(e))):(this.reset(),void(this.state=we))},process:function(t){},getTouchAction:function(){},reset:function(){}},c(rt,Z,{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,r=t.eventType,o=e&(me|ye),i=this.attrTest(t);return o&&(r&Dt||!i)?e|be:o||i?r&Nt?e|ge:e&me?e|ye:me:we}}),c(ot,rt,{defaults:{event:\"pan\",threshold:10,pointers:1,direction:qt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Vt&&e.push(he),t&Gt&&e.push(pe),e},directionTest:function(t){var e=this.options,r=!0,o=t.distance,i=t.direction,n=t.deltaX,s=t.deltaY;return i&e.direction||(e.direction&Vt?(i=0===n?Ft:n<0?It:Bt,r=n!=this.pX,o=Math.abs(t.deltaX)):(i=0===s?Ft:s<0?Lt:Rt,r=s!=this.pY,o=Math.abs(t.deltaY))),t.direction=i,r&&o>e.threshold&&i&e.direction},attrTest:function(t){return rt.prototype.attrTest.call(this,t)&&(this.state&me||!(this.state&me)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=tt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),c(it,rt,{defaults:{event:\"pinch\",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&me)},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)}}),c(nt,Z,{defaults:{event:\"press\",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ue]},process:function(t){var e=this.options,r=t.pointers.length===e.pointers,o=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,!o||!r||t.eventType&(Nt|Dt)&&!i)this.reset();else if(t.eventType&zt)this.reset(),this._timer=s(function(){this.state=ve,this.tryEmit()},e.time,this);else if(t.eventType&Nt)return ve;return we},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ve&&(t&&t.eventType&Nt?this.manager.emit(this.options.event+\"up\",t):(this._input.timeStamp=vt(),this.manager.emit(this.options.event,this._input)))}}),c(st,rt,{defaults:{event:\"rotate\",threshold:0,pointers:2},getTouchAction:function(){return[_e]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&me)}}),c(at,rt,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:Vt|Gt,pointers:1},getTouchAction:function(){return ot.prototype.getTouchAction.call(this)},attrTest:function(t){var e,r=this.options.direction;return r&(Vt|Gt)?e=t.overallVelocity:r&Vt?e=t.overallVelocityX:r&Gt&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&gt(e)>this.options.velocity&&t.eventType&Nt},emit:function(t){var e=tt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),c(lt,Z,{defaults:{event:\"tap\",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ce]},process:function(t){var e=this.options,r=t.pointers.length===e.pointers,o=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),t.eventType&zt&&0===this.count)return this.failTimeout();if(o&&i&&r){if(t.eventType!=Nt)return this.failTimeout();var n=!this.pTime||t.timeStamp-this.pTime<e.interval,a=!this.pCenter||D(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,a&&n?this.count+=1:this.count=1,this._input=t;var l=this.count%e.taps;if(0===l)return this.hasRequireFailures()?(this._timer=s(function(){this.state=ve,this.tryEmit()},e.interval,this),me):ve}return we},failTimeout:function(){return this._timer=s(function(){this.state=we},this.options.interval,this),we},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==ve&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),ut.VERSION=\"2.0.7\",ut.defaults={domEvents:!1,touchAction:le,enable:!0,inputTarget:null,inputClass:null,preset:[[st,{enable:!1}],[it,{enable:!1},[\"rotate\"]],[at,{direction:Vt}],[ot,{direction:Vt},[\"swipe\"]],[lt],[lt,{event:\"doubletap\",taps:2},[\"tap\"]],[nt]],cssProps:{userSelect:\"none\",touchSelect:\"none\",touchCallout:\"none\",contentZooming:\"none\",userDrag:\"none\",tapHighlightColor:\"rgba(0,0,0,0)\"}};var xe=1,ke=2;ct.prototype={set:function(t){return ht(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?ke:xe},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var r,o=this.recognizers,i=e.curRecognizer;(!i||i&&i.state&ve)&&(i=e.curRecognizer=null);for(var n=0;n<o.length;)r=o[n],e.stopped===ke||i&&r!=i&&!r.canRecognizeWith(i)?r.reset():r.recognize(t),!i&&r.state&(me|ye|ge)&&(i=e.curRecognizer=r),n++}},get:function(t){if(t instanceof Z)return t;for(var e=this.recognizers,r=0;r<e.length;r++)if(e[r].options.event==t)return e[r];return null},add:function(t){if(a(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(a(t,\"remove\",this))return this;if(t=this.get(t)){var e=this.recognizers,r=v(e,t);r!==-1&&(e.splice(r,1),this.touchAction.update())}return this},on:function(t,e){if(t!==n&&e!==n){var r=this.handlers;return l(g(t),function(t){r[t]=r[t]||[],r[t].push(e)}),this}},off:function(t,e){if(t!==n){var r=this.handlers;return l(g(t),function(t){e?r[t]&&r[t].splice(v(r[t],e),1):delete r[t]}),this}},emit:function(t,e){this.options.domEvents&&pt(t,e);var r=this.handlers[t]&&this.handlers[t].slice();if(r&&r.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var o=0;o<r.length;)r[o](e),o++}},destroy:function(){this.element&&_t(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},ht(ut,{INPUT_START:zt,INPUT_MOVE:Ct,INPUT_END:Nt,INPUT_CANCEL:Dt,STATE_POSSIBLE:fe,STATE_BEGAN:me,STATE_CHANGED:ye,STATE_ENDED:ge,STATE_RECOGNIZED:ve,STATE_CANCELLED:be,STATE_FAILED:we,DIRECTION_NONE:Ft,DIRECTION_LEFT:It,DIRECTION_RIGHT:Bt,DIRECTION_UP:Lt,DIRECTION_DOWN:Rt,DIRECTION_HORIZONTAL:Vt,DIRECTION_VERTICAL:Gt,DIRECTION_ALL:qt,Manager:ct,Input:j,TouchAction:Q,TouchInput:q,MouseInput:L,PointerEventInput:R,TouchMouseInput:Y,SingleTouchInput:V,Recognizer:Z,AttrRecognizer:rt,Tap:lt,Pan:ot,Swipe:at,Pinch:it,Rotate:st,Press:nt,on:d,off:f,each:l,merge:wt,extend:bt,assign:ht,inherit:c,bindFn:_,prefixed:x});var Me=\"undefined\"!=typeof e?e:\"undefined\"!=typeof self?self:{};Me.Hammer=ut,\"function\"==typeof t&&t.amd?t(function(){return ut}):\"undefined\"!=typeof r&&r.exports?r.exports=ut:e[i]=ut}(window,document,\"Hammer\")},{}],\"kiwi/build/constraint\":[function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var o,i=t(\"./strength\");!function(t){t[t.Le=0]=\"Le\",t[t.Ge=1]=\"Ge\",t[t.Eq=2]=\"Eq\"}(o=r.Operator||(r.Operator={}));var n=function(){function t(t,e,r){void 0===r&&(r=i.Strength.required),this._id=s++,this._operator=e,this._expression=t,this._strength=i.Strength.clip(r)}return t.Compare=function(t,e){return t.id-e.id},Object.defineProperty(t.prototype,\"id\",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"expression\",{get:function(){return this._expression},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"op\",{get:function(){return this._operator},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"strength\",{get:function(){return this._strength},enumerable:!0,configurable:!0}),t}();r.Constraint=n;var s=0},{\"./strength\":\"kiwi/build/strength\"}],\"kiwi/build/expression\":[function(t,e,r){\"use strict\";function o(t){for(var e=0,r=function(){return 0},o=s.createMap(n.Variable.Compare),i=0,a=t.length;i<a;++i){var l=t[i];if(\"number\"==typeof l)e+=l;else if(l instanceof n.Variable)o.setDefault(l,r).second+=1;else{if(!(l instanceof Array))throw new Error(\"invalid Expression argument: \"+JSON.stringify(l));if(2!==l.length)throw new Error(\"array must have length 2\");var u=l[0],c=l[1];if(\"number\"!=typeof u)throw new Error(\"array item 0 must be a number\");if(!(c instanceof n.Variable))throw new Error(\"array item 1 must be a variable\");o.setDefault(c,r).second+=u}}return{terms:o,constant:e}}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var i=t(\"./tsu\"),n=t(\"./variable\"),s=t(\"./maptype\"),a=function(){function t(){var t=o(arguments);this._terms=t.terms,this._constant=t.constant}return Object.defineProperty(t.prototype,\"terms\",{get:function(){return this._terms},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"constant\",{get:function(){return this._constant},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"value\",{get:function(){var t=this._constant;return i.forEach(this._terms,function(e){t+=e.first.value*e.second}),t},enumerable:!0,configurable:!0}),t}();r.Expression=a},{\"./maptype\":\"kiwi/build/maptype\",\"./tsu\":\"kiwi/build/tsu/index\",\"./variable\":\"kiwi/build/variable\"}],kiwi:[function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" function o(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}Object.defineProperty(r,\"__esModule\",{value:!0}),o(t(\"./variable\")),o(t(\"./expression\")),o(t(\"./constraint\")),o(t(\"./strength\")),o(t(\"./solver\"))},{\"./constraint\":\"kiwi/build/constraint\",\"./expression\":\"kiwi/build/expression\",\"./solver\":\"kiwi/build/solver\",\"./strength\":\"kiwi/build/strength\",\"./variable\":\"kiwi/build/variable\"}],\"kiwi/build/maptype\":[function(t,e,r){\"use strict\";function o(t){return new i.AssociativeArray(t)}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var i=t(\"./tsu\");r.createMap=o},{\"./tsu\":\"kiwi/build/tsu/index\"}],\"kiwi/build/solver\":[function(t,e,r){\"use strict\";function o(t){var e=1e-8;return t<0?-t<e:t<e}function i(){return p.createMap(c.Constraint.Compare)}function n(){return p.createMap(f.Compare)}function s(){return p.createMap(l.Variable.Compare)}function a(){return p.createMap(l.Variable.Compare)}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var l=t(\"./variable\"),u=t(\"./expression\"),c=t(\"./constraint\"),_=t(\"./strength\"),p=t(\"./maptype\"),h=function(){function t(){this._cnMap=i(),this._rowMap=n(),this._varMap=s(),this._editMap=a(),this._infeasibleRows=[],this._objective=new y,this._artificial=null,this._idTick=0}return t.prototype.addConstraint=function(t){var e=this._cnMap.find(t);if(void 0!==e)throw new Error(\"duplicate constraint\");var r=this._createRow(t),i=r.row,n=r.tag,s=this._chooseSubject(i,n);if(s.type()===d.Invalid&&i.allDummies()){if(!o(i.constant())){for(var a=[],l=0,u=t.expression.terms._array;l<u.length;l++){var c=u[l];a.push(c.first.name)}var _=[\"LE\",\"GE\",\"EQ\"][t.op];throw new Error(\"unsatisfiable constraint [\"+a.join(\",\")+\"] operator: \"+_)}s=n.marker}if(s.type()===d.Invalid){if(!this._addWithArtificialVariable(i))throw new Error(\"unsatisfiable constraint\")}else i.solveFor(s),this._substitute(s,i),this._rowMap.insert(s,i);this._cnMap.insert(t,n),this._optimize(this._objective)},t.prototype.removeConstraint=function(t,e){void 0===e&&(e=!1);var r=this._cnMap.erase(t);if(void 0===r){if(e)return;throw new Error(\"unknown constraint\")}this._removeConstraintEffects(t,r.second);var o=r.second.marker,i=this._rowMap.erase(o);if(void 0===i){var n=this._getMarkerLeavingSymbol(o);if(n.type()===d.Invalid)throw new Error(\"failed to find leaving row\");i=this._rowMap.erase(n),i.second.solveForEx(n,o),this._substitute(o,i.second)}this._optimize(this._objective)},t.prototype.hasConstraint=function(t){return this._cnMap.contains(t)},t.prototype.addEditVariable=function(t,e){var r=this._editMap.find(t);if(void 0!==r)throw new Error(\"duplicate edit variable: \"+t.name);if(e=_.Strength.clip(e),e===_.Strength.required)throw new Error(\"bad required strength\");var o=new u.Expression(t),i=new c.Constraint(o,c.Operator.Eq,e);this.addConstraint(i);var n=this._cnMap.find(i).second,s={tag:n,constraint:i,constant:0};this._editMap.insert(t,s)},t.prototype.removeEditVariable=function(t,e){void 0===e&&(e=!1);var r=this._editMap.erase(t);if(void 0===r){if(e)return;throw new Error(\"unknown edit variable: \"+t.name)}this.removeConstraint(r.second.constraint,e)},t.prototype.hasEditVariable=function(t){return this._editMap.contains(t)},t.prototype.suggestValue=function(t,e){var r=this._editMap.find(t);if(void 0===r)throw new Error(\"unknown edit variable: \"+t.name);var o=this._rowMap,i=r.second,n=e-i.constant;i.constant=e;var s=i.tag.marker,a=o.find(s);if(void 0!==a)return a.second.add(-n)<0&&this._infeasibleRows.push(s),void this._dualOptimize();var l=i.tag.other;if(a=o.find(l),void 0!==a)return a.second.add(n)<0&&this._infeasibleRows.push(l),void this._dualOptimize();for(var u=0,c=o.size();u<c;++u){var _=o.itemAt(u),p=_.second,h=p.coefficientFor(s);0!==h&&p.add(n*h)<0&&_.first.type()!==d.External&&this._infeasibleRows.push(_.first)}this._dualOptimize()},t.prototype.updateVariables=function(){for(var t=this._varMap,e=this._rowMap,r=0,o=t.size();r<o;++r){var i=t.itemAt(r),n=e.find(i.second);void 0!==n?i.first.setValue(n.second.constant()):i.first.setValue(0)}},Object.defineProperty(t.prototype,\"numConstraints\",{get:function(){return this._cnMap.size()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"numEditVariables\",{get:function(){return this._editMap.size()},enumerable:!0,configurable:!0}),t.prototype._getVarSymbol=function(t){var e=this,r=function(){return e._makeSymbol(d.External)};return this._varMap.setDefault(t,r).second},t.prototype._createRow=function(t){for(var e=t.expression,r=new y(e.constant),i=e.terms,n=0,s=i.size();n<s;++n){var a=i.itemAt(n);if(!o(a.second)){var l=this._getVarSymbol(a.first),u=this._rowMap.find(l);void 0!==u?r.insertRow(u.second,a.second):r.insertSymbol(l,a.second)}}var p=this._objective,h=t.strength,f={marker:m,other:m};switch(t.op){case c.Operator.Le:case c.Operator.Ge:var g=t.op===c.Operator.Le?1:-1,v=this._makeSymbol(d.Slack);if(f.marker=v,r.insertSymbol(v,g),h<_.Strength.required){var b=this._makeSymbol(d.Error);f.other=b,r.insertSymbol(b,-g),p.insertSymbol(b,h)}break;case c.Operator.Eq:if(h<_.Strength.required){var w=this._makeSymbol(d.Error),x=this._makeSymbol(d.Error);f.marker=w,f.other=x,r.insertSymbol(w,-1),r.insertSymbol(x,1),p.insertSymbol(w,h),p.insertSymbol(x,h)}else{var k=this._makeSymbol(d.Dummy);f.marker=k,r.insertSymbol(k)}}return r.constant()<0&&r.reverseSign(),{row:r,tag:f}},t.prototype._chooseSubject=function(t,e){for(var r=t.cells(),o=0,i=r.size();o<i;++o){var n=r.itemAt(o);if(n.first.type()===d.External)return n.first}var s=e.marker.type();return(s===d.Slack||s===d.Error)&&t.coefficientFor(e.marker)<0?e.marker:(s=e.other.type(),(s===d.Slack||s===d.Error)&&t.coefficientFor(e.other)<0?e.other:m)},t.prototype._addWithArtificialVariable=function(t){var e=this._makeSymbol(d.Slack);this._rowMap.insert(e,t.copy()),this._artificial=t.copy(),this._optimize(this._artificial);var r=o(this._artificial.constant());this._artificial=null;var i=this._rowMap.erase(e);if(void 0!==i){var n=i.second;if(n.isConstant())return r;var s=this._anyPivotableSymbol(n);if(s.type()===d.Invalid)return!1;n.solveForEx(e,s),this._substitute(s,n),this._rowMap.insert(s,n)}for(var a=this._rowMap,l=0,u=a.size();l<u;++l)a.itemAt(l).second.removeSymbol(e);return this._objective.removeSymbol(e),r},t.prototype._substitute=function(t,e){for(var r=this._rowMap,o=0,i=r.size();o<i;++o){var n=r.itemAt(o);n.second.substitute(t,e),n.second.constant()<0&&n.first.type()!==d.External&&this._infeasibleRows.push(n.first)}this._objective.substitute(t,e),this._artificial&&this._artificial.substitute(t,e)},t.prototype._optimize=function(t){for(;;){var e=this._getEnteringSymbol(t);if(e.type()===d.Invalid)return;var r=this._getLeavingSymbol(e);if(r.type()===d.Invalid)throw new Error(\"the objective is unbounded\");var o=this._rowMap.erase(r).second;o.solveForEx(r,e),this._substitute(e,o),this._rowMap.insert(e,o)}},t.prototype._dualOptimize=function(){for(var t=this._rowMap,e=this._infeasibleRows;0!==e.length;){var r=e.pop(),o=t.find(r);if(void 0!==o&&o.second.constant()<0){var i=this._getDualEnteringSymbol(o.second);if(i.type()===d.Invalid)throw new Error(\"dual optimize failed\");var n=o.second;t.erase(r),n.solveForEx(r,i),this._substitute(i,n),t.insert(i,n)}}},t.prototype._getEnteringSymbol=function(t){for(var e=t.cells(),r=0,o=e.size();r<o;++r){var i=e.itemAt(r),n=i.first;if(i.second<0&&n.type()!==d.Dummy)return n}return m},t.prototype._getDualEnteringSymbol=function(t){for(var e=Number.MAX_VALUE,r=m,o=t.cells(),i=0,n=o.size();i<n;++i){var s=o.itemAt(i),a=s.first,l=s.second;if(l>0&&a.type()!==d.Dummy){var u=this._objective.coefficientFor(a),c=u/l;c<e&&(e=c,r=a)}}return r},t.prototype._getLeavingSymbol=function(t){for(var e=Number.MAX_VALUE,r=m,o=this._rowMap,i=0,n=o.size();i<n;++i){var s=o.itemAt(i),a=s.first;if(a.type()!==d.External){var l=s.second,u=l.coefficientFor(t);if(u<0){var c=-l.constant()/u;c<e&&(e=c,r=a)}}}return r},t.prototype._getMarkerLeavingSymbol=function(t){for(var e=Number.MAX_VALUE,r=e,o=e,i=m,n=i,s=i,a=i,l=this._rowMap,u=0,c=l.size();u<c;++u){var _=l.itemAt(u),p=_.second,h=p.coefficientFor(t);if(0!==h){var f=_.first;if(f.type()===d.External)a=f;else if(h<0){var y=-p.constant()/h;y<r&&(r=y,n=f)}else{var y=p.constant()/h;y<o&&(o=y,s=f)}}}return n!==i?n:s!==i?s:a},t.prototype._removeConstraintEffects=function(t,e){e.marker.type()===d.Error&&this._removeMarkerEffects(e.marker,t.strength),e.other.type()===d.Error&&this._removeMarkerEffects(e.other,t.strength)},t.prototype._removeMarkerEffects=function(t,e){var r=this._rowMap.find(t);void 0!==r?this._objective.insertRow(r.second,-e):this._objective.insertSymbol(t,-e)},t.prototype._anyPivotableSymbol=function(t){for(var e=t.cells(),r=0,o=e.size();r<o;++r){var i=e.itemAt(r),n=i.first.type();if(n===d.Slack||n===d.Error)return i.first}return m},t.prototype._makeSymbol=function(t){return new f(t,(this._idTick++))},t}();r.Solver=h;var d;!function(t){t[t.Invalid=0]=\"Invalid\",t[t.External=1]=\"External\",t[t.Slack=2]=\"Slack\",t[t.Error=3]=\"Error\",t[t.Dummy=4]=\"Dummy\"}(d||(d={}));var f=function(){function t(t,e){this._id=e,this._type=t}return t.Compare=function(t,e){return t.id()-e.id()},t.prototype.id=function(){return this._id},t.prototype.type=function(){return this._type},t}(),m=new f(d.Invalid,(-1)),y=function(){function t(t){void 0===t&&(t=0),this._cellMap=p.createMap(f.Compare),this._constant=t}return t.prototype.cells=function(){return this._cellMap},t.prototype.constant=function(){return this._constant},t.prototype.isConstant=function(){return this._cellMap.empty()},t.prototype.allDummies=function(){for(var t=this._cellMap,e=0,r=t.size();e<r;++e){var o=t.itemAt(e);if(o.first.type()!==d.Dummy)return!1}return!0},t.prototype.copy=function(){var e=new t(this._constant);return e._cellMap=this._cellMap.copy(),e},t.prototype.add=function(t){return this._constant+=t},t.prototype.insertSymbol=function(t,e){void 0===e&&(e=1);var r=this._cellMap.setDefault(t,function(){return 0});o(r.second+=e)&&this._cellMap.erase(t)},t.prototype.insertRow=function(t,e){void 0===e&&(e=1),this._constant+=t._constant*e;for(var r=t._cellMap,o=0,i=r.size();o<i;++o){var n=r.itemAt(o);this.insertSymbol(n.first,n.second*e)}},t.prototype.removeSymbol=function(t){this._cellMap.erase(t)},t.prototype.reverseSign=function(){this._constant=-this._constant;for(var t=this._cellMap,e=0,r=t.size();e<r;++e){var o=t.itemAt(e);o.second=-o.second}},t.prototype.solveFor=function(t){var e=this._cellMap,r=e.erase(t),o=-1/r.second;this._constant*=o;for(var i=0,n=e.size();i<n;++i)e.itemAt(i).second*=o},t.prototype.solveForEx=function(t,e){this.insertSymbol(t,-1),this.solveFor(e)},t.prototype.coefficientFor=function(t){var e=this._cellMap.find(t);return void 0!==e?e.second:0},t.prototype.substitute=function(t,e){var r=this._cellMap.erase(t);void 0!==r&&this.insertRow(e,r.second)},t}()},{\"./constraint\":\"kiwi/build/constraint\",\"./expression\":\"kiwi/build/expression\",\"./maptype\":\"kiwi/build/maptype\",\"./strength\":\"kiwi/build/strength\",\"./variable\":\"kiwi/build/variable\"}],\"kiwi/build/strength\":[function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var o;!function(t){function e(t,e,r,o){void 0===o&&(o=1);var i=0;return i+=1e6*Math.max(0,Math.min(1e3,t*o)),i+=1e3*Math.max(0,Math.min(1e3,e*o)),i+=Math.max(0,Math.min(1e3,r*o))}function r(e){return Math.max(0,Math.min(t.required,e))}t.create=e,t.required=e(1e3,1e3,1e3),t.strong=e(1,0,0),t.medium=e(0,1,0),t.weak=e(0,0,1),t.clip=r}(o=r.Strength||(r.Strength={}))},{}],\"kiwi/build/tsu/algorithm\":[function(t,e,r){\"use strict\";function o(t,e,r){for(var o,i,n=0,s=t.length;s>0;)o=s>>1,i=n+o,r(t[i],e)<0?(n=i+1,s-=o+1):s=o;return n}function i(t,e,r){var i=o(t,e,r);if(i===t.length)return-1;var n=t[i];return 0!==r(n,e)?-1:i}function n(t,e,r){var i=o(t,e,r);if(i!==t.length){var n=t[i];if(0===r(n,e))return n}}function s(t,e){var r=h.asArray(t),o=r.length;if(o<=1)return r;r.sort(e);for(var i=[r[0]],n=1,s=0;n<o;++n){var a=r[n];0!==e(i[s],a)&&(i.push(a),++s)}return i}function a(t,e,r){for(var o=0,i=0,n=t.length,s=e.length;o<n&&i<s;){var a=r(t[o],e[i]);if(a<0)++o;else{if(!(a>0))return!1;++i}}return!0}function l(t,e,r){var o=t.length,i=e.length;if(o>i)return!1;for(var n=0,s=0;n<o&&s<i;){var a=r(t[n],e[s]);if(a<0)return!1;a>0?++s:(++n,++s)}return!(n<o)}function u(t,e,r){for(var o=0,i=0,n=t.length,s=e.length,a=[];o<n&&i<s;){var l=t[o],u=e[i],c=r(l,u);c<0?(a.push(l),++o):c>0?(a.push(u),++i):(a.push(l),++o,++i)}for(;o<n;)a.push(t[o]),++o;for(;i<s;)a.push(e[i]),++i;return a}function c(t,e,r){for(var o=0,i=0,n=t.length,s=e.length,a=[];o<n&&i<s;){var l=t[o],u=e[i],c=r(l,u);c<0?++o:c>0?++i:(a.push(l),++o,++i)}return a}function _(t,e,r){for(var o=0,i=0,n=t.length,s=e.length,a=[];o<n&&i<s;){var l=t[o],u=e[i],c=r(l,u);c<0?(a.push(l),++o):c>0?++i:(++o,++i)}for(;o<n;)a.push(t[o]),++o;return a}function p(t,e,r){for(var o=0,i=0,n=t.length,s=e.length,a=[];o<n&&i<s;){var l=t[o],u=e[i],c=r(l,u);c<0?(a.push(l),++o):c>0?(a.push(u),++i):(++o,++i)}for(;o<n;)a.push(t[o]),++o;for(;i<s;)a.push(e[i]),++i;return a}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var h=t(\"./iterator\");r.lowerBound=o,r.binarySearch=i,r.binaryFind=n,r.asSet=s,r.setIsDisjoint=a,r.setIsSubset=l,r.setUnion=u,r.setIntersection=c,r.setDifference=_,r.setSymmetricDifference=p},{\"./iterator\":\"kiwi/build/tsu/iterator\"}],\"kiwi/build/tsu/array_base\":[function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var o=t(\"./iterator\"),i=function(){function t(){this._array=[]}return t.prototype.size=function(){return this._array.length},t.prototype.empty=function(){return 0===this._array.length},t.prototype.itemAt=function(t){return this._array[t]},t.prototype.takeAt=function(t){return this._array.splice(t,1)[0]},t.prototype.clear=function(){this._array=[]},t.prototype.swap=function(t){var e=this._array;this._array=t._array,t._array=e},t.prototype.__iter__=function(){return o.iter(this._array)},t.prototype.__reversed__=function(){return o.reversed(this._array)},t}();r.ArrayBase=i},{\"./iterator\":\"kiwi/build/tsu/iterator\"}],\"kiwi/build/tsu/associative_array\":[function(t,e,r){\"use strict\";function o(t){return function(e,r){return t(e.first,r)}}function i(t,e,r){for(var o=0,i=0,n=t.length,s=e.length,a=[];o<n&&i<s;){var l=t[o],u=e[i],c=r(l.first,u.first);c<0?(a.push(l.copy()),++o):c>0?(a.push(u.copy()),++i):(a.push(u.copy()),++o,++i)}for(;o<n;)a.push(t[o].copy()),++o;for(;i<s;)a.push(e[i].copy()),++i;return a}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" var n=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(r,\"__esModule\",{value:!0});var s=t(\"./pair\"),a=t(\"./array_base\"),l=t(\"./algorithm\"),u=t(\"./iterator\"),c=function(t){function e(e){var r=t.call(this)||this;return r._compare=e,r._wrapped=o(e),r}return n(e,t),e.prototype.comparitor=function(){return this._compare},e.prototype.indexOf=function(t){return l.binarySearch(this._array,t,this._wrapped)},e.prototype.contains=function(t){return l.binarySearch(this._array,t,this._wrapped)>=0},e.prototype.find=function(t){return l.binaryFind(this._array,t,this._wrapped)},e.prototype.setDefault=function(t,e){var r=this._array,o=l.lowerBound(r,t,this._wrapped);if(o===r.length){var i=new s.Pair(t,e());return r.push(i),i}var n=r[o];if(0!==this._compare(n.first,t)){var i=new s.Pair(t,e());return r.splice(o,0,i),i}return n},e.prototype.insert=function(t,e){var r=this._array,o=l.lowerBound(r,t,this._wrapped);if(o===r.length){var i=new s.Pair(t,e);return r.push(i),i}var n=r[o];if(0!==this._compare(n.first,t)){var i=new s.Pair(t,e);return r.splice(o,0,i),i}return n.second=e,n},e.prototype.update=function(t){var r=this;t instanceof e?this._array=i(this._array,t._array,this._compare):u.forEach(t,function(t){r.insert(t.first,t.second)})},e.prototype.erase=function(t){var e=this._array,r=l.binarySearch(e,t,this._wrapped);if(!(r<0))return e.splice(r,1)[0]},e.prototype.copy=function(){for(var t=new e(this._compare),r=t._array,o=this._array,i=0,n=o.length;i<n;++i)r.push(o[i].copy());return t},e}(a.ArrayBase);r.AssociativeArray=c},{\"./algorithm\":\"kiwi/build/tsu/algorithm\",\"./array_base\":\"kiwi/build/tsu/array_base\",\"./iterator\":\"kiwi/build/tsu/iterator\",\"./pair\":\"kiwi/build/tsu/pair\"}],\"kiwi/build/tsu/index\":[function(t,e,r){\"use strict\";function o(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}Object.defineProperty(r,\"__esModule\",{value:!0}),o(t(\"./algorithm\")),o(t(\"./array_base\")),o(t(\"./associative_array\")),o(t(\"./iterator\")),o(t(\"./pair\"))},{\"./algorithm\":\"kiwi/build/tsu/algorithm\",\"./array_base\":\"kiwi/build/tsu/array_base\",\"./associative_array\":\"kiwi/build/tsu/associative_array\",\"./iterator\":\"kiwi/build/tsu/iterator\",\"./pair\":\"kiwi/build/tsu/pair\"}],\"kiwi/build/tsu/iterator\":[function(t,e,r){\"use strict\";function o(t){return t instanceof Array?new c(t):t.__iter__()}function i(t){return t instanceof Array?new _(t):t.__reversed__()}function n(t){return t.__next__()}function s(t){if(t instanceof Array)return t.slice();for(var e,r=[],o=t.__iter__();void 0!==(e=o.__next__());)r.push(e);return r}function a(t,e){if(t instanceof Array){for(var r=0,o=t.length;r<o;++r)if(e(t[r])===!1)return}else for(var i,n=t.__iter__();void 0!==(i=n.__next__());)if(e(i)===!1)return}function l(t,e){var r=[];if(t instanceof Array)for(var o=0,i=t.length;o<i;++o)r.push(e(t[o]));else for(var n,s=t.__iter__();void 0!==(n=s.__next__());)r.push(e(n));return r}function u(t,e){var r,o=[];if(t instanceof Array)for(var i=0,n=t.length;i<n;++i)r=t[i],e(r)&&o.push(r);else for(var s=t.__iter__();void 0!==(r=s.__next__());)e(r)&&o.push(r);return o}/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var c=function(){function t(t,e){\"undefined\"==typeof e&&(e=0),this._array=t,this._index=Math.max(0,Math.min(e,t.length))}return t.prototype.__next__=function(){return this._array[this._index++]},t.prototype.__iter__=function(){return this},t}();r.ArrayIterator=c;var _=function(){function t(t,e){\"undefined\"==typeof e&&(e=t.length),this._array=t,this._index=Math.max(0,Math.min(e,t.length))}return t.prototype.__next__=function(){return this._array[--this._index]},t.prototype.__iter__=function(){return this},t}();r.ReverseArrayIterator=_,r.iter=o,r.reversed=i,r.next=n,r.asArray=s,r.forEach=a,r.map=l,r.filter=u},{}],\"kiwi/build/tsu/pair\":[function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(){function t(t,e){this.first=t,this.second=e}return t.prototype.copy=function(){return new t(this.first,this.second)},t}();r.Pair=o},{}],\"kiwi/build/variable\":[function(t,e,r){\"use strict\";/*-----------------------------------------------------------------------------\n",
" | Copyright (c) 2014, Nucleic Development Team.\n",
" |\n",
" | Distributed under the terms of the Modified BSD License.\n",
" |\n",
" | The full license is in the file COPYING.txt, distributed with this software.\n",
" |----------------------------------------------------------------------------*/\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var o=function(){function t(t){void 0===t&&(t=\"\"),this._value=0,this._context=null,this._id=i++,this._name=t}return t.Compare=function(t,e){return t.id-e.id},Object.defineProperty(t.prototype,\"id\",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,\"name\",{get:function(){return this._name},enumerable:!0,configurable:!0}),t.prototype.setName=function(t){this._name=t},Object.defineProperty(t.prototype,\"context\",{get:function(){return this._context},enumerable:!0,configurable:!0}),t.prototype.setContext=function(t){this._context=t},Object.defineProperty(t.prototype,\"value\",{get:function(){return this._value},enumerable:!0,configurable:!0}),t.prototype.setValue=function(t){this._value=t},t}();r.Variable=o;var i=0},{}],numbro:[function(t,e,r){function o(t){this._value=t}function i(t){var e,r=\"\";for(e=0;e<t;e++)r+=\"0\";return r}function n(t,e){var r,o,n,s,a;return a=t.toString(),r=a.split(\"e\")[0],s=a.split(\"e\")[1],o=r.split(\".\")[0],n=r.split(\".\")[1]||\"\",a=o+n+i(s-n.length),e>0&&(a+=\".\"+i(e)),a}function s(t,e,r,o){var i,s,a=Math.pow(10,e);return s=t.toFixed(0).search(\"e\")>-1?n(t,e):(r(t*a)/a).toFixed(e),o&&(i=new RegExp(\"0{1,\"+o+\"}$\"),s=s.replace(i,\"\")),s}function a(t,e,r){var o;return o=e.indexOf(\"$\")>-1?l(t,e,r):e.indexOf(\"%\")>-1?u(t,e,r):e.indexOf(\":\")>-1?c(t):_(t,e,r)}function l(t,e,r){var o,i,n=e,s=n.indexOf(\"$\"),a=n.indexOf(\"(\"),l=n.indexOf(\"+\"),u=n.indexOf(\"-\"),c=\"\",p=\"\";if(n.indexOf(\"$\")===-1?\"infix\"===y[v].currency.position?(p=y[v].currency.symbol,y[v].currency.spaceSeparated&&(p=\" \"+p+\" \")):y[v].currency.spaceSeparated&&(c=\" \"):n.indexOf(\" $\")>-1?(c=\" \",n=n.replace(\" $\",\"\")):n.indexOf(\"$ \")>-1?(c=\" \",n=n.replace(\"$ \",\"\")):n=n.replace(\"$\",\"\"),i=_(t,n,r,p),e.indexOf(\"$\")===-1)switch(y[v].currency.position){case\"postfix\":i.indexOf(\")\")>-1?(i=i.split(\"\"),i.splice(-1,0,c+y[v].currency.symbol),i=i.join(\"\")):i=i+c+y[v].currency.symbol;break;case\"infix\":break;case\"prefix\":i.indexOf(\"(\")>-1||i.indexOf(\"-\")>-1?(i=i.split(\"\"),o=Math.max(a,u)+1,i.splice(o,0,y[v].currency.symbol+c),i=i.join(\"\")):i=y[v].currency.symbol+c+i;break;default:throw Error('Currency position should be among [\"prefix\", \"infix\", \"postfix\"]')}else s<=1?i.indexOf(\"(\")>-1||i.indexOf(\"+\")>-1||i.indexOf(\"-\")>-1?(i=i.split(\"\"),o=1,(s<a||s<l||s<u)&&(o=0),i.splice(o,0,y[v].currency.symbol+c),i=i.join(\"\")):i=y[v].currency.symbol+c+i:i.indexOf(\")\")>-1?(i=i.split(\"\"),i.splice(-1,0,c+y[v].currency.symbol),i=i.join(\"\")):i=i+c+y[v].currency.symbol;return i}function u(t,e,r){var o,i=\"\";return t=100*t,e.indexOf(\" %\")>-1?(i=\" \",e=e.replace(\" %\",\"\")):e=e.replace(\"%\",\"\"),o=_(t,e,r),o.indexOf(\")\")>-1?(o=o.split(\"\"),o.splice(-1,0,i+\"%\"),o=o.join(\"\")):o=o+i+\"%\",o}function c(t){var e=Math.floor(t/60/60),r=Math.floor((t-60*e*60)/60),o=Math.round(t-60*e*60-60*r);return e+\":\"+(r<10?\"0\"+r:r)+\":\"+(o<10?\"0\"+o:o)}function _(t,e,r,o){var i,n,a,l,u,c,_,p,h,d,f,m,g,w,x,k,M,j,T=!1,S=!1,O=!1,P=\"\",A=!1,E=!1,z=!1,C=!1,N=!1,D=\"\",F=\"\",I=Math.abs(t),B=[\"B\",\"KiB\",\"MiB\",\"GiB\",\"TiB\",\"PiB\",\"EiB\",\"ZiB\",\"YiB\"],L=[\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\"],R=\"\",V=!1,G=!1,q=\"\";if(0===t&&null!==b)return b;if(!isFinite(t))return\"\"+t;if(0===e.indexOf(\"{\")){var U=e.indexOf(\"}\");if(U===-1)throw Error('Format should also contain a \"}\"');m=e.slice(1,U),e=e.slice(U+1)}else m=\"\";if(e.indexOf(\"}\")===e.length-1){var Y=e.indexOf(\"{\");if(Y===-1)throw Error('Format should also contain a \"{\"');g=e.slice(Y+1,-1),e=e.slice(0,Y+1)}else g=\"\";var X;if(X=e.indexOf(\".\")===-1?e.match(/([0-9]+).*/):e.match(/([0-9]+)\\..*/),j=null===X?-1:X[1].length,e.indexOf(\"-\")!==-1&&(V=!0),e.indexOf(\"(\")>-1?(T=!0,e=e.slice(1,-1)):e.indexOf(\"+\")>-1&&(S=!0,e=e.replace(/\\+/g,\"\")),e.indexOf(\"a\")>-1){if(d=e.split(\".\")[0].match(/[0-9]+/g)||[\"0\"],d=parseInt(d[0],10),A=e.indexOf(\"aK\")>=0,E=e.indexOf(\"aM\")>=0,z=e.indexOf(\"aB\")>=0,C=e.indexOf(\"aT\")>=0,N=A||E||z||C,e.indexOf(\" a\")>-1?(P=\" \",e=e.replace(\" a\",\"\")):e=e.replace(\"a\",\"\"),u=Math.floor(Math.log(I)/Math.LN10)+1,_=u%3,_=0===_?3:_,d&&0!==I&&(c=Math.floor(Math.log(I)/Math.LN10)+1-d,p=3*~~((Math.min(d,u)-_)/3),I/=Math.pow(10,p),e.indexOf(\".\")===-1&&d>3))for(e+=\"[.]\",k=0===c?0:3*~~(c/3)-c,k=k<0?k+3:k,i=0;i<k;i++)e+=\"0\";Math.floor(Math.log(Math.abs(t))/Math.LN10)+1!==d&&(I>=Math.pow(10,12)&&!N||C?(P+=y[v].abbreviations.trillion,t/=Math.pow(10,12)):I<Math.pow(10,12)&&I>=Math.pow(10,9)&&!N||z?(P+=y[v].abbreviations.billion,t/=Math.pow(10,9)):I<Math.pow(10,9)&&I>=Math.pow(10,6)&&!N||E?(P+=y[v].abbreviations.million,t/=Math.pow(10,6)):(I<Math.pow(10,6)&&I>=Math.pow(10,3)&&!N||A)&&(P+=y[v].abbreviations.thousand,t/=Math.pow(10,3)))}if(e.indexOf(\"b\")>-1)for(e.indexOf(\" b\")>-1?(D=\" \",e=e.replace(\" b\",\"\")):e=e.replace(\"b\",\"\"),l=0;l<=B.length;l++)if(n=Math.pow(1024,l),a=Math.pow(1024,l+1),t>=n&&t<a){D+=B[l],n>0&&(t/=n);break}if(e.indexOf(\"d\")>-1)for(e.indexOf(\" d\")>-1?(D=\" \",e=e.replace(\" d\",\"\")):e=e.replace(\"d\",\"\"),l=0;l<=L.length;l++)if(n=Math.pow(1e3,l),a=Math.pow(1e3,l+1),t>=n&&t<a){D+=L[l],n>0&&(t/=n);break}if(e.indexOf(\"o\")>-1&&(e.indexOf(\" o\")>-1?(F=\" \",e=e.replace(\" o\",\"\")):e=e.replace(\"o\",\"\"),y[v].ordinal&&(F+=y[v].ordinal(t))),e.indexOf(\"[.]\")>-1&&(O=!0,e=e.replace(\"[.]\",\".\")),h=t.toString().split(\".\")[0],f=e.split(\".\")[1],w=e.indexOf(\",\"),f){if(f.indexOf(\"*\")!==-1?R=s(t,t.toString().split(\".\")[1].length,r):f.indexOf(\"[\")>-1?(f=f.replace(\"]\",\"\"),f=f.split(\"[\"),R=s(t,f[0].length+f[1].length,r,f[1].length)):R=s(t,f.length,r),h=R.split(\".\")[0],R.split(\".\")[1].length){var W=o?P+o:y[v].delimiters.decimal;R=W+R.split(\".\")[1]}else R=\"\";O&&0===Number(R.slice(1))&&(R=\"\")}else h=s(t,null,r);return h.indexOf(\"-\")>-1&&(h=h.slice(1),G=!0),h.length<j&&(h=new Array(j-h.length+1).join(\"0\")+h),w>-1&&(h=h.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g,\"$1\"+y[v].delimiters.thousands)),0===e.indexOf(\".\")&&(h=\"\"),x=e.indexOf(\"(\"),M=e.indexOf(\"-\"),q=x<M?(T&&G?\"(\":\"\")+(V&&G||!T&&G?\"-\":\"\"):(V&&G||!T&&G?\"-\":\"\")+(T&&G?\"(\":\"\"),m+q+(!G&&S&&0!==t?\"+\":\"\")+h+R+(F?F:\"\")+(P&&!o?P:\"\")+(D?D:\"\")+(T&&G?\")\":\"\")+g}function p(t,e){y[t]=e}function h(t){v=t;var e=y[t].defaults;e&&e.format&&f.defaultFormat(e.format),e&&e.currencyFormat&&f.defaultCurrencyFormat(e.currencyFormat)}function d(t,e,r,o){return null!=r&&r!==f.culture()&&f.setCulture(r),a(Number(t),null!=e?e:w,null==o?Math.round:o)}/*!\n",
" * numbro.js\n",
" * version : 1.6.2\n",
" * author : Företagsplatsen AB\n",
" * license : MIT\n",
" * http://www.foretagsplatsen.se\n",
" */\n",
" var f,m=\"1.6.2\",y={},g=y,v=\"en-US\",b=null,w=\"0,0\",x=\"0$\",k=(\"undefined\"!=typeof e&&e.exports,{delimiters:{thousands:\",\",decimal:\".\"},abbreviations:{thousand:\"k\",million:\"m\",billion:\"b\",trillion:\"t\"},ordinal:function(t){var e=t%10;return 1===~~(t%100/10)?\"th\":1===e?\"st\":2===e?\"nd\":3===e?\"rd\":\"th\"},currency:{symbol:\"$\",position:\"prefix\"},defaults:{currencyFormat:\",0000 a\"},formats:{fourDigits:\"0000 a\",fullWithTwoDecimals:\"$ ,0.00\",fullWithTwoDecimalsNoCurrency:\",0.00\"}});f=function(t){return f.isNumbro(t)?t=t.value():0===t||\"undefined\"==typeof t?t=0:Number(t)||(t=f.fn.unformat(t)),new o(Number(t))},f.version=m,f.isNumbro=function(t){return t instanceof o},f.setLanguage=function(t,e){console.warn(\"`setLanguage` is deprecated since version 1.6.0. Use `setCulture` instead\");var r=t,o=t.split(\"-\")[0],i=null;g[r]||(Object.keys(g).forEach(function(t){i||t.split(\"-\")[0]!==o||(i=t)}),r=i||e||\"en-US\"),h(r)},f.setCulture=function(t,e){var r=t,o=t.split(\"-\")[1],i=null;y[r]||(o&&Object.keys(y).forEach(function(t){i||t.split(\"-\")[1]!==o||(i=t)}),r=i||e||\"en-US\"),h(r)},f.language=function(t,e){if(console.warn(\"`language` is deprecated since version 1.6.0. Use `culture` instead\"),!t)return v;if(t&&!e){if(!g[t])throw new Error(\"Unknown language : \"+t);h(t)}return!e&&g[t]||p(t,e),f},f.culture=function(t,e){if(!t)return v;if(t&&!e){if(!y[t])throw new Error(\"Unknown culture : \"+t);h(t)}return!e&&y[t]||p(t,e),f},f.languageData=function(t){if(console.warn(\"`languageData` is deprecated since version 1.6.0. Use `cultureData` instead\"),!t)return g[v];if(!g[t])throw new Error(\"Unknown language : \"+t);return g[t]},f.cultureData=function(t){if(!t)return y[v];if(!y[t])throw new Error(\"Unknown culture : \"+t);return y[t]},f.culture(\"en-US\",k),f.languages=function(){return console.warn(\"`languages` is deprecated since version 1.6.0. Use `cultures` instead\"),g},f.cultures=function(){return y},f.zeroFormat=function(t){b=\"string\"==typeof t?t:null},f.defaultFormat=function(t){w=\"string\"==typeof t?t:\"0.0\"},f.defaultCurrencyFormat=function(t){x=\"string\"==typeof t?t:\"0$\"},f.validate=function(t,e){var r,o,i,n,s,a,l,u;if(\"string\"!=typeof t&&(t+=\"\",console.warn&&console.warn(\"Numbro.js: Value is not string. It has been co-erced to: \",t)),t=t.trim(),t.match(/^\\d+$/))return!0;if(\"\"===t)return!1;try{l=f.cultureData(e)}catch(c){l=f.cultureData(f.culture())}return i=l.currency.symbol,s=l.abbreviations,r=l.delimiters.decimal,o=\".\"===l.delimiters.thousands?\"\\\\.\":l.delimiters.thousands,u=t.match(/^[^\\d]+/),(null===u||(t=t.substr(1),u[0]===i))&&(u=t.match(/[^\\d]+$/),(null===u||(t=t.slice(0,-1),u[0]===s.thousand||u[0]===s.million||u[0]===s.billion||u[0]===s.trillion))&&(a=new RegExp(o+\"{2}\"),!t.match(/[^\\d.,]/g)&&(n=t.split(r),!(n.length>2)&&(n.length<2?!!n[0].match(/^\\d+.*\\d$/)&&!n[0].match(a):1===n[0].length?!!n[0].match(/^\\d+$/)&&!n[0].match(a)&&!!n[1].match(/^\\d+$/):!!n[0].match(/^\\d+.*\\d$/)&&!n[0].match(a)&&!!n[1].match(/^\\d+$/)))))},e.exports={format:d}},{}],_process:[function(t,e,r){function o(){throw new Error(\"setTimeout has not been defined\")}function i(){throw new Error(\"clearTimeout has not been defined\")}function n(t){if(_===setTimeout)return setTimeout(t,0);if((_===o||!_)&&setTimeout)return _=setTimeout,setTimeout(t,0);try{return _(t,0)}catch(e){try{return _.call(null,t,0)}catch(e){return _.call(this,t,0)}}}function s(t){if(p===clearTimeout)return clearTimeout(t);if((p===i||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(t);try{return p(t)}catch(e){try{return p.call(null,t)}catch(e){return p.call(this,t)}}}function a(){m&&d&&(m=!1,d.length?f=d.concat(f):y=-1,f.length&&l())}function l(){if(!m){var t=n(a);m=!0;for(var e=f.length;e;){for(d=f,f=[];++y<e;)d&&d[y].run();y=-1,e=f.length}d=null,m=!1,s(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var _,p,h=e.exports={};!function(){try{_=\"function\"==typeof setTimeout?setTimeout:o}catch(t){_=o}try{p=\"function\"==typeof clearTimeout?clearTimeout:i}catch(t){p=i}}();var d,f=[],m=!1,y=-1;h.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];f.push(new u(t,e)),1!==f.length||m||n(l)},u.prototype.run=function(){this.fun.apply(null,this.array)},h.title=\"browser\",h.browser=!0,h.env={},h.argv=[],h.version=\"\",h.versions={},h.on=c,h.addListener=c,h.once=c,h.off=c,h.removeListener=c,h.removeAllListeners=c,h.emit=c,h.prependListener=c,h.prependOnceListener=c,h.listeners=function(t){return[]},h.binding=function(t){throw new Error(\"process.binding is not supported\")},h.cwd=function(){return\"/\"},h.chdir=function(t){throw new Error(\"process.chdir is not supported\")},h.umask=function(){return 0}},{}],\"proj4/lib/Proj\":[function(t,e,r){function o(t,e){if(!(this instanceof o))return new o(t);e=e||function(t){if(t)throw t};var r=i(t);if(\"object\"!=typeof r)return void e(t);var s=o.projections.get(r.projName);if(!s)return void e(t);if(r.datumCode&&\"none\"!==r.datumCode){var c=l[r.datumCode];c&&(r.datum_params=c.towgs84?c.towgs84.split(\",\"):null,r.ellps=c.ellipse,r.datumName=c.datumName?c.datumName:r.datumCode)}r.k0=r.k0||1,r.axis=r.axis||\"enu\";var _=a.sphere(r.a,r.b,r.rf,r.ellps,r.sphere),p=a.eccentricity(_.a,_.b,_.rf,r.R_A),h=r.datum||u(r.datumCode,r.datum_params,_.a,_.b,p.es,p.ep2);n(this,r),n(this,s),this.a=_.a,this.b=_.b,this.rf=_.rf,this.sphere=_.sphere,this.es=p.es,this.e=p.e,this.ep2=p.ep2,this.datum=h,this.init(),e(null,this)}var i=t(\"./parseCode\"),n=t(\"./extend\"),s=t(\"./projections\"),a=t(\"./deriveConstants\"),l=t(\"./constants/Datum\"),u=t(\"./datum\");o.projections=s,o.projections.start(),e.exports=o},{\"./constants/Datum\":\"proj4/lib/constants/Datum\",\"./datum\":\"proj4/lib/datum\",\"./deriveConstants\":\"proj4/lib/deriveConstants\",\"./extend\":\"proj4/lib/extend\",\"./parseCode\":\"proj4/lib/parseCode\",\"./projections\":\"proj4/lib/projections\"}],\"proj4/lib/adjust_axis\":[function(t,e,r){e.exports=function(t,e,r){var o,i,n,s=r.x,a=r.y,l=r.z||0,u={};for(n=0;n<3;n++)if(!e||2!==n||void 0!==r.z)switch(0===n?(o=s,i=\"x\"):1===n?(o=a,i=\"y\"):(o=l,i=\"z\"),t.axis[n]){case\"e\":u[i]=o;break;case\"w\":u[i]=-o;break;case\"n\":u[i]=o;break;case\"s\":u[i]=-o;break;case\"u\":void 0!==r[i]&&(u.z=o);break;case\"d\":void 0!==r[i]&&(u.z=-o);break;default:return null}return u}},{}],\"proj4/lib/common/adjust_lon\":[function(t,e,r){var o=2*Math.PI,i=3.14159265359,n=t(\"./sign\");e.exports=function(t){return Math.abs(t)<=i?t:t-n(t)*o}},{\"./sign\":\"proj4/lib/common/sign\"}],\"proj4/lib/common/msfnz\":[function(t,e,r){e.exports=function(t,e,r){var o=t*e;return r/Math.sqrt(1-o*o)}},{}],\"proj4/lib/common/phi2z\":[function(t,e,r){var o=Math.PI/2;e.exports=function(t,e){for(var r,i,n=.5*t,s=o-2*Math.atan(e),a=0;a<=15;a++)if(r=t*Math.sin(s),i=o-2*Math.atan(e*Math.pow((1-r)/(1+r),n))-s,s+=i,Math.abs(i)<=1e-10)return s;return-9999}},{}],\"proj4/lib/common/sign\":[function(t,e,r){e.exports=function(t){return t<0?-1:1}},{}],\"proj4/lib/common/toPoint\":[function(t,e,r){e.exports=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}},{}],\"proj4/lib/common/tsfnz\":[function(t,e,r){var o=Math.PI/2;e.exports=function(t,e,r){var i=t*r,n=.5*t;return i=Math.pow((1-i)/(1+i),n),Math.tan(.5*(o-e))/i}},{}],\"proj4/lib/constants/Datum\":[function(t,e,r){r.wgs84={towgs84:\"0,0,0\",ellipse:\"WGS84\",datumName:\"WGS84\"},r.ch1903={towgs84:\"674.374,15.056,405.346\",ellipse:\"bessel\",datumName:\"swiss\"},r.ggrs87={towgs84:\"-199.87,74.79,246.62\",ellipse:\"GRS80\",datumName:\"Greek_Geodetic_Reference_System_1987\"},r.nad83={towgs84:\"0,0,0\",ellipse:\"GRS80\",datumName:\"North_American_Datum_1983\"},r.nad27={nadgrids:\"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat\",ellipse:\"clrk66\",datumName:\"North_American_Datum_1927\"},r.potsdam={towgs84:\"606.0,23.0,413.0\",ellipse:\"bessel\",datumName:\"Potsdam Rauenberg 1950 DHDN\"},r.carthage={towgs84:\"-263.0,6.0,431.0\",ellipse:\"clark80\",datumName:\"Carthage 1934 Tunisia\"},r.hermannskogel={towgs84:\"653.0,-212.0,449.0\",ellipse:\"bessel\",datumName:\"Hermannskogel\"},r.ire65={towgs84:\"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15\",ellipse:\"mod_airy\",datumName:\"Ireland 1965\"},r.rassadiran={towgs84:\"-133.63,-157.5,-158.62\",ellipse:\"intl\",datumName:\"Rassadiran\"},r.nzgd49={towgs84:\"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993\",ellipse:\"intl\",datumName:\"New Zealand Geodetic Datum 1949\"},r.osgb36={towgs84:\"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894\",ellipse:\"airy\",datumName:\"Airy 1830\"},r.s_jtsk={towgs84:\"589,76,480\",ellipse:\"bessel\",datumName:\"S-JTSK (Ferro)\"},r.beduaram={towgs84:\"-106,-87,188\",ellipse:\"clrk80\",datumName:\"Beduaram\"},r.gunung_segara={towgs84:\"-403,684,41\",ellipse:\"bessel\",datumName:\"Gunung Segara Jakarta\"},r.rnb72={towgs84:\"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1\",ellipse:\"intl\",datumName:\"Reseau National Belge 1972\"}},{}],\"proj4/lib/constants/Ellipsoid\":[function(t,e,r){r.MERIT={a:6378137,rf:298.257,ellipseName:\"MERIT 1983\"},r.SGS85={a:6378136,rf:298.257,ellipseName:\"Soviet Geodetic System 85\"},r.GRS80={a:6378137,rf:298.257222101,ellipseName:\"GRS 1980(IUGG, 1980)\"},r.IAU76={a:6378140,rf:298.257,ellipseName:\"IAU 1976\"},r.airy={a:6377563.396,b:6356256.91,ellipseName:\"Airy 1830\"},r.APL4={a:6378137,rf:298.25,ellipseName:\"Appl. Physics. 1965\"},r.NWL9D={a:6378145,rf:298.25,ellipseName:\"Naval Weapons Lab., 1965\"},r.mod_airy={a:6377340.189,b:6356034.446,ellipseName:\"Modified Airy\"},r.andrae={a:6377104.43,rf:300,ellipseName:\"Andrae 1876 (Den., Iclnd.)\"},r.aust_SA={a:6378160,rf:298.25,ellipseName:\"Australian Natl & S. Amer. 1969\"},r.GRS67={a:6378160,rf:298.247167427,ellipseName:\"GRS 67(IUGG 1967)\"},r.bessel={a:6377397.155,rf:299.1528128,ellipseName:\"Bessel 1841\"},r.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:\"Bessel 1841 (Namibia)\"},r.clrk66={a:6378206.4,b:6356583.8,ellipseName:\"Clarke 1866\"},r.clrk80={a:6378249.145,rf:293.4663,ellipseName:\"Clarke 1880 mod.\"},r.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:\"Clarke 1858\"},r.CPM={a:6375738.7,rf:334.29,ellipseName:\"Comm. des Poids et Mesures 1799\"},r.delmbr={a:6376428,rf:311.5,ellipseName:\"Delambre 1810 (Belgium)\"},r.engelis={a:6378136.05,rf:298.2566,ellipseName:\"Engelis 1985\"},r.evrst30={a:6377276.345,rf:300.8017,ellipseName:\"Everest 1830\"},r.evrst48={a:6377304.063,rf:300.8017,ellipseName:\"Everest 1948\"},r.evrst56={a:6377301.243,rf:300.8017,ellipseName:\"Everest 1956\"},r.evrst69={a:6377295.664,rf:300.8017,ellipseName:\"Everest 1969\"},r.evrstSS={a:6377298.556,rf:300.8017,ellipseName:\"Everest (Sabah & Sarawak)\"},r.fschr60={a:6378166,rf:298.3,ellipseName:\"Fischer (Mercury Datum) 1960\"},r.fschr60m={a:6378155,rf:298.3,ellipseName:\"Fischer 1960\"},r.fschr68={a:6378150,rf:298.3,ellipseName:\"Fischer 1968\"},r.helmert={a:6378200,rf:298.3,ellipseName:\"Helmert 1906\"},r.hough={a:6378270,rf:297,ellipseName:\"Hough\"},r.intl={a:6378388,rf:297,ellipseName:\"International 1909 (Hayford)\"},r.kaula={a:6378163,rf:298.24,ellipseName:\"Kaula 1961\"},r.lerch={a:6378139,rf:298.257,ellipseName:\"Lerch 1979\"},r.mprts={a:6397300,rf:191,ellipseName:\"Maupertius 1738\"},r.new_intl={a:6378157.5,b:6356772.2,ellipseName:\"New International 1967\"},r.plessis={a:6376523,rf:6355863,ellipseName:\"Plessis 1817 (France)\"},r.krass={a:6378245,rf:298.3,ellipseName:\"Krassovsky, 1942\"},r.SEasia={a:6378155,b:6356773.3205,ellipseName:\"Southeast Asia\"},r.walbeck={a:6376896,b:6355834.8467,ellipseName:\"Walbeck\"},r.WGS60={a:6378165,rf:298.3,ellipseName:\"WGS 60\"},r.WGS66={a:6378145,rf:298.25,ellipseName:\"WGS 66\"},r.WGS7={a:6378135,rf:298.26,ellipseName:\"WGS 72\"},r.WGS84={a:6378137,rf:298.257223563,ellipseName:\"WGS 84\"},r.sphere={a:6370997,b:6370997,ellipseName:\"Normal Sphere (r=6370997)\"}},{}],\"proj4/lib/constants/PrimeMeridian\":[function(t,e,r){r.greenwich=0,r.lisbon=-9.131906111111,r.paris=2.337229166667,r.bogota=-74.080916666667,r.madrid=-3.687938888889,r.rome=12.452333333333,r.bern=7.439583333333,r.jakarta=106.807719444444,r.ferro=-17.666666666667,r.brussels=4.367975,r.stockholm=18.058277777778,r.athens=23.7163375,r.oslo=10.722916666667},{}],\"proj4/lib/constants/units\":[function(t,e,r){r.ft={to_meter:.3048},r[\"us-ft\"]={to_meter:1200/3937}},{}],\"proj4/lib/core\":[function(t,e,r){function o(t,e,r){var o;return Array.isArray(r)?(o=a(t,e,r),3===r.length?[o.x,o.y,o.z]:[o.x,o.y]):a(t,e,r)}function i(t){return t instanceof s?t:t.oProj?t.oProj:s(t)}function n(t,e,r){t=i(t);var n,s=!1;return\"undefined\"==typeof e?(e=t,t=l,s=!0):(\"undefined\"!=typeof e.x||Array.isArray(e))&&(r=e,e=t,t=l,s=!0),e=i(e),r?o(t,e,r):(n={forward:function(r){return o(t,e,r)},inverse:function(r){return o(e,t,r)}},s&&(n.oProj=e),n)}var s=t(\"./Proj\"),a=t(\"./transform\"),l=s(\"WGS84\");e.exports=n},{\"./Proj\":\"proj4/lib/Proj\",\"./transform\":\"proj4/lib/transform\"}],\"proj4/lib/datum\":[function(t,e,r){function o(t,e,r,o,u,c){var _={};return _.datum_type=s,t&&\"none\"===t&&(_.datum_type=a),e&&(_.datum_params=e.map(parseFloat),0===_.datum_params[0]&&0===_.datum_params[1]&&0===_.datum_params[2]||(_.datum_type=i),_.datum_params.length>3&&(0===_.datum_params[3]&&0===_.datum_params[4]&&0===_.datum_params[5]&&0===_.datum_params[6]||(_.datum_type=n,_.datum_params[3]*=l,_.datum_params[4]*=l,_.datum_params[5]*=l,_.datum_params[6]=_.datum_params[6]/1e6+1))),_.a=r,_.b=o,_.es=u,_.ep2=c,_}var i=1,n=2,s=4,a=5,l=484813681109536e-20;e.exports=o},{}],\"proj4/lib/datumUtils\":[function(t,e,r){\"use strict\";var o=1,i=2,n=Math.PI/2;r.compareDatums=function(t,e){return t.datum_type===e.datum_type&&(!(t.a!==e.a||Math.abs(this.es-e.es)>5e-11)&&(t.datum_type===o?this.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:t.datum_type!==i||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6]))},r.geodeticToGeocentric=function(t,e,r){var o,i,s,a,l=t.x,u=t.y,c=t.z?t.z:0;if(u<-n&&u>-1.001*n)u=-n;else if(u>n&&u<1.001*n)u=n;else if(u<-n||u>n)return null;return l>Math.PI&&(l-=2*Math.PI),i=Math.sin(u),a=Math.cos(u),s=i*i,o=r/Math.sqrt(1-e*s),{x:(o+c)*a*Math.cos(l),y:(o+c)*a*Math.sin(l),z:(o*(1-e)+c)*i}},r.geocentricToGeodetic=function(t,e,r,o){var i,s,a,l,u,c,_,p,h,d,f,m,y,g,v,b,w=1e-12,x=w*w,k=30,M=t.x,j=t.y,T=t.z?t.z:0;if(i=Math.sqrt(M*M+j*j),s=Math.sqrt(M*M+j*j+T*T),i/r<w){if(g=0,s/r<w)return v=n,b=-o,{x:t.x,y:t.y,z:t.z}}else g=Math.atan2(j,M);a=T/s,l=i/s,u=1/Math.sqrt(1-e*(2-e)*l*l),p=l*(1-e)*u,h=a*u,y=0;do y++,_=r/Math.sqrt(1-e*h*h),b=i*p+T*h-_*(1-e*h*h),c=e*_/(_+b),u=1/Math.sqrt(1-c*(2-c)*l*l),d=l*(1-c)*u,f=a*u,m=f*p-d*h,p=d,h=f;while(m*m>x&&y<k);return v=Math.atan(f/Math.abs(d)),{x:g,y:v,z:b}},r.geocentricToWgs84=function(t,e,r){if(e===o)return{x:t.x+r[0],y:t.y+r[1],z:t.z+r[2]};if(e===i){var n=r[0],s=r[1],a=r[2],l=r[3],u=r[4],c=r[5],_=r[6];return{x:_*(t.x-c*t.y+u*t.z)+n,y:_*(c*t.x+t.y-l*t.z)+s,z:_*(-u*t.x+l*t.y+t.z)+a}}},r.geocentricFromWgs84=function(t,e,r){if(e===o)return{x:t.x-r[0],y:t.y-r[1],z:t.z-r[2]};if(e===i){var n=r[0],s=r[1],a=r[2],l=r[3],u=r[4],c=r[5],_=r[6],p=(t.x-n)/_,h=(t.y-s)/_,d=(t.z-a)/_;return{x:p+c*h-u*d,y:-c*p+h+l*d,z:u*p-l*h+d}}}},{}],\"proj4/lib/datum_transform\":[function(t,e,r){function o(t){return t===i||t===n}var i=1,n=2,s=5,a=t(\"./datumUtils\");e.exports=function(t,e,r){return a.compareDatums(t,e)?r:t.datum_type===s||e.datum_type===s?r:t.es!==e.es||t.a!==e.a||o(t.datum_type)||o(e.datum_type)?(r=a.geodeticToGeocentric(r,t.es,t.a),o(t.datum_type)&&(r=a.geocentricToWgs84(r,t.datum_type,t.datum_params)),o(e.datum_type)&&(r=a.geocentricFromWgs84(r,e.datum_type,e.datum_params)),a.geocentricToGeodetic(r,e.es,e.a,e.b)):r}},{\"./datumUtils\":\"proj4/lib/datumUtils\"}],\"proj4/lib/defs\":[function(t,e,r){function o(t){var e=this;if(2===arguments.length){var r=arguments[1];\"string\"==typeof r?\"+\"===r.charAt(0)?o[t]=n(arguments[1]):o[t]=s(arguments[1]):o[t]=r}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?o.apply(e,t):o(t)});if(\"string\"==typeof t){if(t in o)return o[t]}else\"EPSG\"in t?o[\"EPSG:\"+t.EPSG]=t:\"ESRI\"in t?o[\"ESRI:\"+t.ESRI]=t:\"IAU2000\"in t?o[\"IAU2000:\"+t.IAU2000]=t:console.log(t);return}}var i=t(\"./global\"),n=t(\"./projString\"),s=t(\"./wkt\");i(o),e.exports=o},{\"./global\":\"proj4/lib/global\",\"./projString\":\"proj4/lib/projString\",\"./wkt\":\"proj4/lib/wkt\"}],\"proj4/lib/deriveConstants\":[function(t,e,r){var o=.16666666666666666,i=.04722222222222222,n=.022156084656084655,s=1e-10,a=t(\"./constants/Ellipsoid\");r.eccentricity=function(t,e,r,s){var a=t*t,l=e*e,u=(a-l)/a,c=0;s?(t*=1-u*(o+u*(i+u*n)),a=t*t,u=0):c=Math.sqrt(u);var _=(a-l)/l;return{es:u,e:c,ep2:_}},r.sphere=function(t,e,r,o,i){if(!t){var n=a[o];n||(n=a.WGS84),t=n.a,e=n.b,r=n.rf}return r&&!e&&(e=(1-1/r)*t),(0===r||Math.abs(t-e)<s)&&(i=!0,e=t),{a:t,b:e,rf:r,sphere:i}}},{\"./constants/Ellipsoid\":\"proj4/lib/constants/Ellipsoid\"}],\"proj4/lib/extend\":[function(t,e,r){e.exports=function(t,e){t=t||{};var r,o;if(!e)return t;for(o in e)r=e[o],void 0!==r&&(t[o]=r);return t}},{}],\"proj4/lib/global\":[function(t,e,r){e.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\"]}},{}],\"proj4/lib/parseCode\":[function(t,e,r){function o(t){return\"string\"==typeof t}function i(t){return t in l}function n(t){return _.some(function(e){return t.indexOf(e)>-1})}function s(t){return\"+\"===t[0]}function a(t){return o(t)?i(t)?l[t]:n(t)?u(t):s(t)?c(t):void 0:t}var l=t(\"./defs\"),u=t(\"./wkt\"),c=t(\"./projString\"),_=[\"GEOGCS\",\"GEOCCS\",\"PROJCS\",\"LOCAL_CS\"];e.exports=a},{\"./defs\":\"proj4/lib/defs\",\"./projString\":\"proj4/lib/projString\",\"./wkt\":\"proj4/lib/wkt\"}],\"proj4/lib/projString\":[function(t,e,r){var o=.017453292519943295,i=t(\"./constants/PrimeMeridian\"),n=t(\"./constants/units\");e.exports=function(t){var e,r,s,a={},l=t.split(\"+\").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var r=e.split(\"=\");return r.push(!0),t[r[0].toLowerCase()]=r[1],t},{}),u={proj:\"projName\",datum:\"datumCode\",rf:function(t){a.rf=parseFloat(t)},lat_0:function(t){a.lat0=t*o},lat_1:function(t){a.lat1=t*o},lat_2:function(t){a.lat2=t*o},lat_ts:function(t){a.lat_ts=t*o},lon_0:function(t){a.long0=t*o},lon_1:function(t){a.long1=t*o},lon_2:function(t){a.long2=t*o},alpha:function(t){a.alpha=parseFloat(t)*o},lonc:function(t){a.longc=t*o},x_0:function(t){a.x0=parseFloat(t)},y_0:function(t){a.y0=parseFloat(t)},k_0:function(t){a.k0=parseFloat(t)},k:function(t){a.k0=parseFloat(t)},a:function(t){a.a=parseFloat(t)},b:function(t){a.b=parseFloat(t)},r_a:function(){a.R_A=!0},zone:function(t){a.zone=parseInt(t,10)},south:function(){a.utmSouth=!0},towgs84:function(t){a.datum_params=t.split(\",\").map(function(t){return parseFloat(t)})},to_meter:function(t){a.to_meter=parseFloat(t)},units:function(t){a.units=t,n[t]&&(a.to_meter=n[t].to_meter)},from_greenwich:function(t){a.from_greenwich=t*o},pm:function(t){a.from_greenwich=(i[t]?i[t]:parseFloat(t))*o},nadgrids:function(t){\"@null\"===t?a.datumCode=\"none\":a.nadgrids=t},axis:function(t){var e=\"ewnsud\";3===t.length&&e.indexOf(t.substr(0,1))!==-1&&e.indexOf(t.substr(1,1))!==-1&&e.indexOf(t.substr(2,1))!==-1&&(a.axis=t)}};for(e in l)r=l[e],e in u?(s=u[e],\"function\"==typeof s?s(r):a[s]=r):a[e]=r;return\"string\"==typeof a.datumCode&&\"WGS84\"!==a.datumCode&&(a.datumCode=a.datumCode.toLowerCase()),a}},{\"./constants/PrimeMeridian\":\"proj4/lib/constants/PrimeMeridian\",\"./constants/units\":\"proj4/lib/constants/units\"}],\"proj4/lib/projections\":[function(t,e,r){function o(t,e){var r=s.length;return t.names?(s[r]=t,t.names.forEach(function(t){n[t.toLowerCase()]=r}),this):(console.log(e),!0)}var i=[t(\"./projections/merc\"),t(\"./projections/longlat\")],n={},s=[];r.add=o,r.get=function(t){if(!t)return!1;var e=t.toLowerCase();return\"undefined\"!=typeof n[e]&&s[n[e]]?s[n[e]]:void 0},r.start=function(){i.forEach(o)}},{\"./projections/longlat\":\"proj4/lib/projections/longlat\",\"./projections/merc\":\"proj4/lib/projections/merc\"}],\"proj4/lib/projections/longlat\":[function(t,e,r){function o(t){return t}r.init=function(){},r.forward=o,r.inverse=o,r.names=[\"longlat\",\"identity\"]},{}],\"proj4/lib/projections/merc\":[function(t,e,r){var o=t(\"../common/msfnz\"),i=Math.PI/2,n=1e-10,s=57.29577951308232,a=t(\"../common/adjust_lon\"),l=Math.PI/4,u=t(\"../common/tsfnz\"),c=t(\"../common/phi2z\");r.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=o(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},r.forward=function(t){var e=t.x,r=t.y;if(r*s>90&&r*s<-90&&e*s>180&&e*s<-180)return null;var o,c;if(Math.abs(Math.abs(r)-i)<=n)return null;if(this.sphere)o=this.x0+this.a*this.k0*a(e-this.long0),c=this.y0+this.a*this.k0*Math.log(Math.tan(l+.5*r));else{var _=Math.sin(r),p=u(this.e,r,_);o=this.x0+this.a*this.k0*a(e-this.long0),c=this.y0-this.a*this.k0*Math.log(p)}return t.x=o,t.y=c,t},r.inverse=function(t){var e,r,o=t.x-this.x0,n=t.y-this.y0;if(this.sphere)r=i-2*Math.atan(Math.exp(-n/(this.a*this.k0)));else{var s=Math.exp(-n/(this.a*this.k0));if(r=c(this.e,s),r===-9999)return null}return e=a(this.long0+o/(this.a*this.k0)),t.x=e,t.y=r,t},r.names=[\"Mercator\",\"Popular Visualisation Pseudo Mercator\",\"Mercator_1SP\",\"Mercator_Auxiliary_Sphere\",\"merc\"]},{\"../common/adjust_lon\":\"proj4/lib/common/adjust_lon\",\"../common/msfnz\":\"proj4/lib/common/msfnz\",\"../common/phi2z\":\"proj4/lib/common/phi2z\",\"../common/tsfnz\":\"proj4/lib/common/tsfnz\"}],\"proj4/lib/transform\":[function(t,e,r){function o(t,e){return(t.datum.datum_type===s||t.datum.datum_type===a)&&\"WGS84\"!==e.datumCode||(e.datum.datum_type===s||e.datum.datum_type===a)&&\"WGS84\"!==t.datumCode}var i=.017453292519943295,n=57.29577951308232,s=1,a=2,l=t(\"./datum_transform\"),u=t(\"./adjust_axis\"),c=t(\"./Proj\"),_=t(\"./common/toPoint\");e.exports=function p(t,e,r){var s;return Array.isArray(r)&&(r=_(r)),t.datum&&e.datum&&o(t,e)&&(s=new c(\"WGS84\"),r=p(t,s,r),t=s),\"enu\"!==t.axis&&(r=u(t,!1,r)),\"longlat\"===t.projName?r={x:r.x*i,y:r.y*i}:(t.to_meter&&(r={x:r.x*t.to_meter,y:r.y*t.to_meter}),r=t.inverse(r)),t.from_greenwich&&(r.x+=t.from_greenwich),r=l(t.datum,e.datum,r),e.from_greenwich&&(r={x:r.x-e.grom_greenwich,y:r.y}),\"longlat\"===e.projName?r={x:r.x*n,y:r.y*n}:(r=e.forward(r),e.to_meter&&(r={x:r.x/e.to_meter,y:r.y/e.to_meter})),\"enu\"!==e.axis?u(e,!0,r):r}},{\"./Proj\":\"proj4/lib/Proj\",\"./adjust_axis\":\"proj4/lib/adjust_axis\",\"./common/toPoint\":\"proj4/lib/common/toPoint\",\"./datum_transform\":\"proj4/lib/datum_transform\"}],\"proj4/lib/wkt\":[function(t,e,r){function o(t,e,r){t[e]=r.map(function(t){var e={};return i(t,e),e}).reduce(function(t,e){return u(t,e)},{})}function i(t,e){var r;return Array.isArray(t)?(r=t.shift(),\"PARAMETER\"===r&&(r=t.shift()),1===t.length?Array.isArray(t[0])?(e[r]={},i(t[0],e[r])):e[r]=t[0]:t.length?\"TOWGS84\"===r?e[r]=t:(e[r]={},[\"UNIT\",\"PRIMEM\",\"VERT_DATUM\"].indexOf(r)>-1?(e[r]={name:t[0].toLowerCase(),convert:t[1]},3===t.length&&(e[r].auth=t[2])):\"SPHEROID\"===r?(e[r]={name:t[0],a:t[1],rf:t[2]},4===t.length&&(e[r].auth=t[3])):[\"GEOGCS\",\"GEOCCS\",\"DATUM\",\"VERT_CS\",\"COMPD_CS\",\"LOCAL_CS\",\"FITTED_CS\",\"LOCAL_DATUM\"].indexOf(r)>-1?(t[0]=[\"name\",t[0]],o(e,r,t)):t.every(function(t){return Array.isArray(t)})?o(e,r,t):i(t,e[r])):e[r]=!0,void 0):void(e[t]=!0)}function n(t,e){var r=e[0],o=e[1];!(r in t)&&o in t&&(t[r]=t[o],3===e.length&&(t[r]=e[2](t[r])))}function s(t){return t*l}function a(t){function e(e){var r=t.to_meter||1;return parseFloat(e,10)*r}\"GEOGCS\"===t.type?t.projName=\"longlat\":\"LOCAL_CS\"===t.type?(t.projName=\"identity\",t.local=!0):\"object\"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),\"metre\"===t.units&&(t.units=\"meter\"),t.UNIT.convert&&(\"GEOGCS\"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=parseFloat(t.UNIT.convert,10)*t.DATUM.SPHEROID.a):t.to_meter=parseFloat(t.UNIT.convert,10))),t.GEOGCS&&(t.GEOGCS.DATUM?t.datumCode=t.GEOGCS.DATUM.name.toLowerCase():t.datumCode=t.GEOGCS.name.toLowerCase(),\"d_\"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),\"new_zealand_geodetic_datum_1949\"!==t.datumCode&&\"new_zealand_1949\"!==t.datumCode||(t.datumCode=\"nzgd49\"),\"wgs_1984\"===t.datumCode&&(\"Mercator_Auxiliary_Sphere\"===t.PROJECTION&&(t.sphere=!0),t.datumCode=\"wgs84\"),\"_ferro\"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),\"_jakarta\"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf(\"belge\")&&(t.datumCode=\"rnb72\"),t.GEOGCS.DATUM&&t.GEOGCS.DATUM.SPHEROID&&(t.ellps=t.GEOGCS.DATUM.SPHEROID.name.replace(\"_19\",\"\").replace(/[Cc]larke\\_18/,\"clrk\"),\"international\"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps=\"intl\"),t.a=t.GEOGCS.DATUM.SPHEROID.a,t.rf=parseFloat(t.GEOGCS.DATUM.SPHEROID.rf,10)),~t.datumCode.indexOf(\"osgb_1936\")&&(t.datumCode=\"osgb36\")),t.b&&!isFinite(t.b)&&(t.b=t.a);var r=function(e){return n(t,e)},o=[[\"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\",s],[\"longitude_of_center\",\"Longitude_Of_Center\"],[\"longc\",\"longitude_of_center\",s],[\"x0\",\"false_easting\",e],[\"y0\",\"false_northing\",e],[\"long0\",\"central_meridian\",s],[\"lat0\",\"latitude_of_origin\",s],[\"lat0\",\"standard_parallel_1\",s],[\"lat1\",\"standard_parallel_1\",s],[\"lat2\",\"standard_parallel_2\",s],[\"alpha\",\"azimuth\",s],[\"srsCode\",\"name\"]];o.forEach(r),t.long0||!t.longc||\"Albers_Conic_Equal_Area\"!==t.projName&&\"Lambert_Azimuthal_Equal_Area\"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||\"Stereographic_South_Pole\"!==t.projName&&\"Polar Stereographic (variant B)\"!==t.projName||(t.lat0=s(t.lat1>0?90:-90),t.lat_ts=t.lat1)}var l=.017453292519943295,u=t(\"./extend\");e.exports=function(t,e){var r=JSON.parse((\",\"+t).replace(/\\s*\\,\\s*([A-Z_0-9]+?)(\\[)/g,',[\"$1\",').slice(1).replace(/\\s*\\,\\s*([A-Z_0-9]+?)\\]/g,',\"$1\"]').replace(/,\\[\"VERTCS\".+/,\"\")),o=r.shift(),n=r.shift();r.unshift([\"name\",n]),r.unshift([\"type\",o]),r.unshift(\"output\");var s={};return i(r,s),a(s.output),u(e,s.output)}},{\"./extend\":\"proj4/lib/extend\"}],\"quickselect/index\":[function(t,e,r){\"use strict\";function o(t,e,r,s,a){for(r=r||0,s=s||t.length-1,a=a||n;s>r;){if(s-r>600){var l=s-r+1,u=e-r+1,c=Math.log(l),_=.5*Math.exp(2*c/3),p=.5*Math.sqrt(c*_*(l-_)/l)*(u-l/2<0?-1:1),h=Math.max(r,Math.floor(e-u*_/l+p)),d=Math.min(s,Math.floor(e+(l-u)*_/l+p));o(t,e,h,d,a)}var f=t[e],m=r,y=s;for(i(t,r,e),a(t[s],f)>0&&i(t,r,s);m<y;){for(i(t,m,y),m++,y--;a(t[m],f)<0;)m++;for(;a(t[y],f)>0;)y--}0===a(t[r],f)?i(t,r,y):(y++,i(t,y,s)),y<=e&&(r=y+1),e<=y&&(s=y-1)}}function i(t,e,r){var o=t[e];t[e]=t[r],t[r]=o}function n(t,e){return t<e?-1:t>e?1:0}e.exports=o},{}],rbush:[function(t,e,r){\"use strict\";function o(t,e){return this instanceof o?(this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),void this.clear()):new o(t,e)}function i(t,e,r){if(!r)return e.indexOf(t);for(var o=0;o<e.length;o++)if(r(t,e[o]))return o;return-1}function n(t,e){s(t,0,t.children.length,e,t)}function s(t,e,r,o,i){i||(i=m(null)),i.minX=1/0,i.minY=1/0,i.maxX=-(1/0),i.maxY=-(1/0);for(var n,s=e;s<r;s++)n=t.children[s],a(i,t.leaf?o(n):n);return i}function a(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function c(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function _(t){return t.maxX-t.minX+(t.maxY-t.minY)}function p(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function h(t,e){var r=Math.max(t.minX,e.minX),o=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),n=Math.min(t.maxY,e.maxY);return Math.max(0,i-r)*Math.max(0,n-o)}function d(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function f(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function m(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-(1/0),maxY:-(1/0)}}function y(t,e,r,o,i){for(var n,s=[e,r];s.length;)r=s.pop(),e=s.pop(),r-e<=o||(n=e+Math.ceil((r-e)/o/2)*o,g(t,n,e,r,i),s.push(e,n,n,r))}e.exports=o;var g=t(\"quickselect\");o.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,r=[],o=this.toBBox;if(!f(t,e))return r;for(var i,n,s,a,l=[];e;){for(i=0,n=e.children.length;i<n;i++)s=e.children[i],a=e.leaf?o(s):s,f(t,a)&&(e.leaf?r.push(s):d(t,a)?this._all(s,r):l.push(s));e=l.pop()}return r},collides:function(t){var e=this.data,r=this.toBBox;if(!f(t,e))return!1;for(var o,i,n,s,a=[];e;){for(o=0,i=e.children.length;o<i;o++)if(n=e.children[o],s=e.leaf?r(n):n,f(t,s)){if(e.leaf||d(t,s))return!0;a.push(n)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,r=t.length;e<r;e++)this.insert(t[e]);return this}var o=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===o.height)this._splitRoot(this.data,o);else{if(this.data.height<o.height){var i=this.data;this.data=o,o=i}this._insert(o,this.data.height-o.height-1,!0)}else this.data=o;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=m([]),this},remove:function(t,e){if(!t)return this;for(var r,o,n,s,a=this.data,l=this.toBBox(t),u=[],c=[];a||u.length;){if(a||(a=u.pop(),o=u[u.length-1],r=c.pop(),s=!0),a.leaf&&(n=i(t,a.children,e),n!==-1))return a.children.splice(n,1),u.push(a),this._condense(u),this;s||a.leaf||!d(a,l)?o?(r++,a=o.children[r],s=!1):a=null:(u.push(a),c.push(r),r=0,o=a,a=a.children[0])}return this},toBBox:function(t){return t},compareMinX:l,compareMinY:u,toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var r=[];t;)t.leaf?e.push.apply(e,t.children):r.push.apply(r,t.children),t=r.pop();return e},_build:function(t,e,r,o){var i,s=r-e+1,a=this._maxEntries;if(s<=a)return i=m(t.slice(e,r+1)),n(i,this.toBBox),i;o||(o=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,o-1))),i=m([]),i.leaf=!1,i.height=o;var l,u,c,_,p=Math.ceil(s/a),h=p*Math.ceil(Math.sqrt(a));for(y(t,e,r,h,this.compareMinX),l=e;l<=r;l+=h)for(c=Math.min(l+h-1,r),y(t,l,c,p,this.compareMinY),u=l;u<=c;u+=p)_=Math.min(u+p-1,c),i.children.push(this._build(t,u,_,o-1));return n(i,this.toBBox),i},_chooseSubtree:function(t,e,r,o){for(var i,n,s,a,l,u,_,h;;){if(o.push(e),e.leaf||o.length-1===r)break;for(_=h=1/0,i=0,n=e.children.length;i<n;i++)s=e.children[i],l=c(s),u=p(t,s)-l,u<h?(h=u,_=l<_?l:_,a=s):u===h&&l<_&&(_=l,a=s);e=a||e.children[0]}return e},_insert:function(t,e,r){var o=this.toBBox,i=r?t:o(t),n=[],s=this._chooseSubtree(i,this.data,e,n);for(s.children.push(t),a(s,i);e>=0&&n[e].children.length>this._maxEntries;)this._split(n,e),e--;this._adjustParentBBoxes(i,n,e)},_split:function(t,e){var r=t[e],o=r.children.length,i=this._minEntries;this._chooseSplitAxis(r,i,o);var s=this._chooseSplitIndex(r,i,o),a=m(r.children.splice(s,r.children.length-s));a.height=r.height,a.leaf=r.leaf,n(r,this.toBBox),n(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(r,a)},_splitRoot:function(t,e){this.data=m([t,e]),this.data.height=t.height+1,this.data.leaf=!1,n(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,r){\n",
" var o,i,n,a,l,u,_,p;for(u=_=1/0,o=e;o<=r-e;o++)i=s(t,0,o,this.toBBox),n=s(t,o,r,this.toBBox),a=h(i,n),l=c(i)+c(n),a<u?(u=a,p=o,_=l<_?l:_):a===u&&l<_&&(_=l,p=o);return p},_chooseSplitAxis:function(t,e,r){var o=t.leaf?this.compareMinX:l,i=t.leaf?this.compareMinY:u,n=this._allDistMargin(t,e,r,o),s=this._allDistMargin(t,e,r,i);n<s&&t.children.sort(o)},_allDistMargin:function(t,e,r,o){t.children.sort(o);var i,n,l=this.toBBox,u=s(t,0,e,l),c=s(t,r-e,r,l),p=_(u)+_(c);for(i=e;i<r-e;i++)n=t.children[i],a(u,t.leaf?l(n):n),p+=_(u);for(i=r-e-1;i>=e;i--)n=t.children[i],a(c,t.leaf?l(n):n),p+=_(c);return p},_adjustParentBBoxes:function(t,e,r){for(var o=r;o>=0;o--)a(e[o],t)},_condense:function(t){for(var e,r=t.length-1;r>=0;r--)0===t[r].children.length?r>0?(e=t[r-1].children,e.splice(e.indexOf(t[r]),1)):this.clear():n(t[r],this.toBBox)},_initFormat:function(t){var e=[\"return a\",\" - b\",\";\"];this.compareMinX=new Function(\"a\",\"b\",e.join(t[0])),this.compareMinY=new Function(\"a\",\"b\",e.join(t[1])),this.toBBox=new Function(\"a\",\"return {minX: a\"+t[0]+\", minY: a\"+t[1]+\", maxX: a\"+t[2]+\", maxY: a\"+t[3]+\"};\")}}},{quickselect:\"quickselect/index\"}],sprintf:[function(t,e,r){/**\n",
" sprintf() for JavaScript 0.7-beta1\n",
" http://www.diveintojavascript.com/projects/javascript-sprintf\n",
" \n",
" Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>\n",
" All rights reserved.\n",
" \n",
" Redistribution and use in source and binary forms, with or without\n",
" modification, are permitted provided that the following conditions are met:\n",
" * Redistributions of source code must retain the above copyright\n",
" notice, this list of conditions and the following disclaimer.\n",
" * Redistributions in binary form must reproduce the above copyright\n",
" notice, this list of conditions and the following disclaimer in the\n",
" documentation and/or other materials provided with the distribution.\n",
" * Neither the name of sprintf() for JavaScript nor the\n",
" names of its contributors may be used to endorse or promote products\n",
" derived from this software without specific prior written permission.\n",
" \n",
" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n",
" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n",
" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n",
" DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY\n",
" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n",
" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n",
" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n",
" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n",
" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n",
" SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n",
" \n",
" \n",
" Changelog:\n",
" 2010.11.07 - 0.7-beta1-node\n",
" - converted it to a node.js compatible module\n",
" \n",
" 2010.09.06 - 0.7-beta1\n",
" - features: vsprintf, support for named placeholders\n",
" - enhancements: format cache, reduced global namespace pollution\n",
" \n",
" 2010.05.22 - 0.6:\n",
" - reverted to 0.4 and fixed the bug regarding the sign of the number 0\n",
" Note:\n",
" Thanks to Raphael Pigulla <raph (at] n3rd [dot) org> (http://www.n3rd.org/)\n",
" who warned me about a bug in 0.5, I discovered that the last update was\n",
" a regress. I appologize for that.\n",
" \n",
" 2010.05.09 - 0.5:\n",
" - bug fix: 0 is now preceeded with a + sign\n",
" - bug fix: the sign was not at the right position on padded results (Kamal Abdali)\n",
" - switched from GPL to BSD license\n",
" \n",
" 2007.10.21 - 0.4:\n",
" - unit test and patch (David Baird)\n",
" \n",
" 2007.09.17 - 0.3:\n",
" - bug fix: no longer throws exception on empty paramenters (Hans Pufal)\n",
" \n",
" 2007.09.11 - 0.2:\n",
" - feature: added argument swapping\n",
" \n",
" 2007.04.03 - 0.1:\n",
" - initial release\n",
" **/\n",
" var o=function(){function t(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function e(t,e){for(var r=[];e>0;r[--e]=t);return r.join(\"\")}var r=function(){return r.cache.hasOwnProperty(arguments[0])||(r.cache[arguments[0]]=r.parse(arguments[0])),r.format.call(null,r.cache[arguments[0]],arguments)};return r.object_stringify=function(t,e,o,i){var n=\"\";if(null!=t)switch(typeof t){case\"function\":return\"[Function\"+(t.name?\": \"+t.name:\"\")+\"]\";case\"object\":if(t instanceof Error)return\"[\"+t.toString()+\"]\";if(e>=o)return\"[Object]\";if(i&&(i=i.slice(0),i.push(t)),null!=t.length){n+=\"[\";var s=[];for(var a in t)i&&i.indexOf(t[a])>=0?s.push(\"[Circular]\"):s.push(r.object_stringify(t[a],e+1,o,i));n+=s.join(\", \")+\"]\"}else{if(\"getMonth\"in t)return\"Date(\"+t+\")\";n+=\"{\";var s=[];for(var l in t)t.hasOwnProperty(l)&&(i&&i.indexOf(t[l])>=0?s.push(l+\": [Circular]\"):s.push(l+\": \"+r.object_stringify(t[l],e+1,o,i)));n+=s.join(\", \")+\"}\"}return n;case\"string\":return'\"'+t+'\"'}return\"\"+t},r.format=function(i,n){var s,a,l,u,c,_,p,h=1,d=i.length,f=\"\",m=[];for(a=0;a<d;a++)if(f=t(i[a]),\"string\"===f)m.push(i[a]);else if(\"array\"===f){if(u=i[a],u[2])for(s=n[h],l=0;l<u[2].length;l++){if(!s.hasOwnProperty(u[2][l]))throw new Error(o('[sprintf] property \"%s\" does not exist',u[2][l]));s=s[u[2][l]]}else s=u[1]?n[u[1]]:n[h++];if(/[^sO]/.test(u[8])&&\"number\"!=t(s))throw new Error(o('[sprintf] expecting number but found %s \"'+s+'\"',t(s)));switch(u[8]){case\"b\":s=s.toString(2);break;case\"c\":s=String.fromCharCode(s);break;case\"d\":s=parseInt(s,10);break;case\"e\":s=u[7]?s.toExponential(u[7]):s.toExponential();break;case\"f\":s=u[7]?parseFloat(s).toFixed(u[7]):parseFloat(s);break;case\"O\":s=r.object_stringify(s,0,parseInt(u[7])||5);break;case\"o\":s=s.toString(8);break;case\"s\":s=(s=String(s))&&u[7]?s.substring(0,u[7]):s;break;case\"u\":s=Math.abs(s);break;case\"x\":s=s.toString(16);break;case\"X\":s=s.toString(16).toUpperCase()}s=/[def]/.test(u[8])&&u[3]&&s>=0?\"+\"+s:s,_=u[4]?\"0\"==u[4]?\"0\":u[4].charAt(1):\" \",p=u[6]-String(s).length,c=u[6]?e(_,p):\"\",m.push(u[5]?s+c:c+s)}return m.join(\"\")},r.cache={},r.parse=function(t){for(var e=t,r=[],o=[],i=0;e;){if(null!==(r=/^[^\\x25]+/.exec(e)))o.push(r[0]);else if(null!==(r=/^\\x25{2}/.exec(e)))o.push(\"%\");else{if(null===(r=/^\\x25(?:([1-9]\\d*)\\$|\\(([^\\)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-fosOuxX])/.exec(e)))throw new Error(\"[sprintf] \"+e);if(r[2]){i|=1;var n=[],s=r[2],a=[];if(null===(a=/^([a-z_][a-z_\\d]*)/i.exec(s)))throw new Error(\"[sprintf] \"+s);for(n.push(a[1]);\"\"!==(s=s.substring(a[0].length));)if(null!==(a=/^\\.([a-z_][a-z_\\d]*)/i.exec(s)))n.push(a[1]);else{if(null===(a=/^\\[(\\d+)\\]/.exec(s)))throw new Error(\"[sprintf] \"+s);n.push(a[1])}r[2]=n}else i|=2;if(3===i)throw new Error(\"[sprintf] mixing positional and named placeholders is not (yet) supported\");o.push(r)}e=e.substring(r[0].length)}return o},r}(),i=function(t,e){var r=e.slice();return r.unshift(t),o.apply(null,r)};e.exports=o,o.sprintf=o,o.vsprintf=i},{}],\"timezone/index\":[function(e,r,o){!function(e){\"object\"==typeof r&&r.exports?r.exports=e():\"function\"==typeof t?t(e):this.tz=e()}(function(){function t(t,e,r){var o,i=e.day[1];do o=new Date(Date.UTC(r,e.month,Math.abs(i++)));while(e.day[0]<7&&o.getUTCDay()!=e.day[0]);return o={clock:e.clock,sort:o.getTime(),rule:e,save:6e4*e.save,offset:t.offset},o[o.clock]=o.sort+6e4*e.time,o.posix?o.wallclock=o[o.clock]+(t.offset+e.saved):o.posix=o[o.clock]-(t.offset+e.saved),o}function e(e,r,o){var i,n,s,a,l,u,c,_=e[e.zone],p=[],h=new Date(o).getUTCFullYear(),d=1;for(i=1,n=_.length;i<n&&!(_[i][r]<=o);i++);if(s=_[i],s.rules){for(u=e[s.rules],c=h+1;c>=h-d;--c)for(i=0,n=u.length;i<n;i++)u[i].from<=c&&c<=u[i].to?p.push(t(s,u[i],c)):u[i].to<c&&1==d&&(d=c-u[i].to);for(p.sort(function(t,e){return t.sort-e.sort}),i=0,n=p.length;i<n;i++)o>=p[i][r]&&p[i][p[i].clock]>s[p[i].clock]&&(a=p[i])}return a&&((l=/^(.*)\\/(.*)$/.exec(s.format))?a.abbrev=l[a.save?2:1]:a.abbrev=s.format.replace(/%s/,a.rule.letter)),a||s}function r(t,r){return\"UTC\"==t.zone?r:(t.entry=e(t,\"posix\",r),r+t.entry.offset+t.entry.save)}function o(t,r){if(\"UTC\"==t.zone)return r;var o,i;return t.entry=o=e(t,\"wallclock\",r),i=r-o.wallclock,0<i&&i<o.save?null:r-o.offset-o.save}function i(t,e,i){var n,s=+(i[1]+1),a=i[2]*s,l=u.indexOf(i[3].toLowerCase());if(l>9)e+=a*_[l-10];else{if(n=new Date(r(t,e)),l<7)for(;a;)n.setUTCDate(n.getUTCDate()+s),n.getUTCDay()==l&&(a-=s);else 7==l?n.setUTCFullYear(n.getUTCFullYear()+a):8==l?n.setUTCMonth(n.getUTCMonth()+a):n.setUTCDate(n.getUTCDate()+a);null==(e=o(t,n.getTime()))&&(e=o(t,n.getTime()+864e5*s)-864e5*s)}return e}function n(t){if(!t.length)return\"1.0.6\";var e,n,s,a,l,u=Object.create(this),_=[];for(e=0;e<t.length;e++)if(a=t[e],Array.isArray(a))e||isNaN(a[1])?a.splice.apply(t,[e--,1].concat(a)):l=a;else if(isNaN(a)){if(s=typeof a,\"string\"==s)~a.indexOf(\"%\")?u.format=a:e||\"*\"!=a?!e&&(s=/^(\\d{4})-(\\d{2})-(\\d{2})(?:[T\\s](\\d{2}):(\\d{2})(?::(\\d{2})(?:\\.(\\d+))?)?(Z|(([+-])(\\d{2}(:\\d{2}){0,2})))?)?$/.exec(a))?(l=[],l.push.apply(l,s.slice(1,8)),s[9]?(l.push(s[10]+1),l.push.apply(l,s[11].split(/:/))):s[8]&&l.push(1)):/^\\w{2,3}_\\w{2}$/.test(a)?u.locale=a:(s=c.exec(a))?_.push(s):u.zone=a:l=a;else if(\"function\"==s){if(s=a.call(u))return s}else if(/^\\w{2,3}_\\w{2}$/.test(a.name))u[a.name]=a;else if(a.zones){for(s in a.zones)u[s]=a.zones[s];for(s in a.rules)u[s]=a.rules[s]}}else e||(l=a);if(u[u.locale]||delete u.locale,u[u.zone]||delete u.zone,null!=l){if(\"*\"==l)l=u.clock();else if(Array.isArray(l)){for(n=!l[7],e=0;e<11;e++)l[e]=+(l[e]||0);--l[1],l=Date.UTC.apply(Date.UTC,l.slice(0,8))+-l[7]*(36e5*l[8]+6e4*l[9]+1e3*l[10])}else l=Math.floor(l);if(!isNaN(l)){if(n&&(l=o(u,l)),null==l)return l;for(e=0,n=_.length;e<n;e++)l=i(u,l,_[e]);return u.format?(s=new Date(r(u,l)),u.format.replace(/%([-0_^]?)(:{0,3})(\\d*)(.)/g,function(t,e,r,o,i){var n,a,c=\"0\";if(n=u[i]){for(t=String(n.call(u,s,l,e,r.length)),\"_\"==(e||n.style)&&(c=\" \"),a=\"-\"==e?0:n.pad||0;t.length<a;)t=c+t;for(a=\"-\"==e?0:o||n.pad;t.length<a;)t=c+t;\"N\"==i&&a<t.length&&(t=t.slice(0,a)),\"^\"==e&&(t=t.toUpperCase())}return t})):l}}return function(){return u.convert(arguments)}}function s(t,e){var r,o,i;return o=new Date(Date.UTC(t.getUTCFullYear(),0)),r=Math.floor((t.getTime()-o.getTime())/864e5),o.getUTCDay()==e?i=0:(i=7-o.getUTCDay()+e,8==i&&(i=1)),r>=i?Math.floor((r-i)/7)+1:0}function a(t){var e,r,o;return r=t.getUTCFullYear(),e=new Date(Date.UTC(r,0)).getUTCDay(),o=s(t,1)+(e>1&&e<=4?1:0),o?53!=o||4==e||3==e&&29==new Date(r,1,29).getDate()?[o,t.getUTCFullYear()]:[1,t.getUTCFullYear()+1]:(r=t.getUTCFullYear()-1,e=new Date(Date.UTC(r,0)).getUTCDay(),o=4==e||3==e&&29==new Date(r,1,29).getDate()?53:52,[o,t.getUTCFullYear()-1])}var l={clock:function(){return+new Date},zone:\"UTC\",entry:{abbrev:\"UTC\",offset:0,save:0},UTC:1,z:function(t,e,r,o){var i,n,s=this.entry.offset+this.entry.save,a=Math.abs(s/1e3),l=[],u=3600;for(i=0;i<3;i++)l.push((\"0\"+Math.floor(a/u)).slice(-2)),a%=u,u/=60;return\"^\"!=r||s?(\"^\"==r&&(o=3),3==o?(n=l.join(\":\"),n=n.replace(/:00$/,\"\"),\"^\"!=r&&(n=n.replace(/:00$/,\"\"))):o?(n=l.slice(0,o+1).join(\":\"),\"^\"==r&&(n=n.replace(/:00$/,\"\"))):n=l.slice(0,2).join(\"\"),n=(s<0?\"-\":\"+\")+n,n=n.replace(/([-+])(0)/,{_:\" $1\",\"-\":\"$1\"}[r]||\"$1$2\")):\"Z\"},\"%\":function(t){return\"%\"},n:function(t){return\"\\n\"},t:function(t){return\"\\t\"},U:function(t){return s(t,0)},W:function(t){return s(t,1)},V:function(t){return a(t)[0]},G:function(t){return a(t)[1]},g:function(t){return a(t)[1]%100},j:function(t){return Math.floor((t.getTime()-Date.UTC(t.getUTCFullYear(),0))/864e5)+1},s:function(t){return Math.floor(t.getTime()/1e3)},C:function(t){return Math.floor(t.getUTCFullYear()/100)},N:function(t){return t.getTime()%1e3*1e6},m:function(t){return t.getUTCMonth()+1},Y:function(t){return t.getUTCFullYear()},y:function(t){return t.getUTCFullYear()%100},H:function(t){return t.getUTCHours()},M:function(t){return t.getUTCMinutes()},S:function(t){return t.getUTCSeconds()},e:function(t){return t.getUTCDate()},d:function(t){return t.getUTCDate()},u:function(t){return t.getUTCDay()||7},w:function(t){return t.getUTCDay()},l:function(t){return t.getUTCHours()%12||12},I:function(t){return t.getUTCHours()%12||12},k:function(t){return t.getUTCHours()},Z:function(t){return this.entry.abbrev},a:function(t){return this[this.locale].day.abbrev[t.getUTCDay()]},A:function(t){return this[this.locale].day.full[t.getUTCDay()]},h:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},b:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},B:function(t){return this[this.locale].month.full[t.getUTCMonth()]},P:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)].toLowerCase()},p:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)]},R:function(t,e){return this.convert([e,\"%H:%M\"])},T:function(t,e){return this.convert([e,\"%H:%M:%S\"])},D:function(t,e){return this.convert([e,\"%m/%d/%y\"])},F:function(t,e){return this.convert([e,\"%Y-%m-%d\"])},x:function(t,e){return this.convert([e,this[this.locale].date])},r:function(t,e){return this.convert([e,this[this.locale].time12||\"%I:%M:%S\"])},X:function(t,e){return this.convert([e,this[this.locale].time24])},c:function(t,e){return this.convert([e,this[this.locale].dateTime])},convert:n,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\",c=new RegExp(\"^\\\\s*([+-])(\\\\d+)\\\\s+(\"+u+\")s?\\\\s*$\",\"i\"),_=[36e5,6e4,1e3,1];return u=u.toLowerCase().split(\"|\"),\"delmHMSUWVgCIky\".replace(/./g,function(t){l[t].pad=2}),l.N.pad=9,l.j.pad=3,l.k.style=\"_\",l.l.style=\"_\",l.e.style=\"_\",function(){return l.convert(arguments)}})},{}],\"tslib/tslib\":[function(e,r,o){(function(e){/*! *****************************************************************************\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 o,i,n,s,a,l,u,c,_,p,h,d,f,m,y,g;!function(o){function i(t,e){return function(r,o){return t[r]=e?e(r,o):o}}var n=\"object\"==typeof e?e:\"object\"==typeof self?self:\"object\"==typeof this?this:{};\"function\"==typeof t&&t.amd?t(\"tslib\",[\"exports\"],function(t){o(i(n,i(t)))}):o(\"object\"==typeof r&&\"object\"==typeof r.exports?i(n,i(r.exports)):i(n))}(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};o=function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)},i=Object.assign||function(t){for(var e,r=1,o=arguments.length;r<o;r++){e=arguments[r];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t},n=function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(null!=t&&\"function\"==typeof Object.getOwnPropertySymbols)for(var i=0,o=Object.getOwnPropertySymbols(t);i<o.length;i++)e.indexOf(o[i])<0&&(r[o[i]]=t[o[i]]);return r},s=function(t,e,r,o){var i,n=arguments.length,s=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,r):o;if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.decorate)s=Reflect.decorate(t,e,r,o);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(n<3?i(s):n>3?i(e,r,s):i(e,r))||s);return n>3&&s&&Object.defineProperty(e,r,s),s},a=function(t,e){return function(r,o){e(r,o,t)}},l=function(t,e){if(\"object\"==typeof Reflect&&\"function\"==typeof Reflect.metadata)return Reflect.metadata(t,e)},u=function(t,e,r,o){return new(r||(r=Promise))(function(i,n){function s(t){try{l(o.next(t))}catch(e){n(e)}}function a(t){try{l(o[\"throw\"](t))}catch(e){n(e)}}function l(t){t.done?i(t.value):new r(function(e){e(t.value)}).then(s,a)}l((o=o.apply(t,e||[])).next())})},c=function(t,e){function r(t){return function(e){return o([t,e])}}function o(r){if(i)throw new TypeError(\"Generator is already executing.\");for(;l;)try{if(i=1,n&&(s=n[2&r[0]?\"return\":r[0]?\"throw\":\"next\"])&&!(s=s.call(n,r[1])).done)return s;switch(n=0,s&&(r=[0,s.value]),r[0]){case 0:case 1:s=r;break;case 4:return l.label++,{value:r[1],done:!1};case 5:l.label++,n=r[1],r=[0];continue;case 7:r=l.ops.pop(),l.trys.pop();continue;default:if(s=l.trys,!(s=s.length>0&&s[s.length-1])&&(6===r[0]||2===r[0])){l=0;continue}if(3===r[0]&&(!s||r[1]>s[0]&&r[1]<s[3])){l.label=r[1];break}if(6===r[0]&&l.label<s[1]){l.label=s[1],s=r;break}if(s&&l.label<s[2]){l.label=s[2],l.ops.push(r);break}s[2]&&l.ops.pop(),l.trys.pop();continue}r=e.call(t,l)}catch(o){r=[6,o],n=0}finally{i=s=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}var i,n,s,a,l={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return a={next:r(0),\"throw\":r(1),\"return\":r(2)},\"function\"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a},_=function(t,e){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])},p=function(t){var e=\"function\"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}},h=function(t,e){var r=\"function\"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var o,i,n=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(o=n.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(r=n[\"return\"])&&r.call(n)}finally{if(i)throw i.error}}return s},d=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(h(arguments[e]));return t},f=function(t){return this instanceof f?(this.v=t,this):new f(t)},m=function(t,e,r){function o(t){c[t]&&(u[t]=function(e){return new Promise(function(r,o){_.push([t,e,r,o])>1||i(t,e)})})}function i(t,e){try{n(c[t](e))}catch(r){l(_[0][3],r)}}function n(t){t.value instanceof f?Promise.resolve(t.value.v).then(s,a):l(_[0][2],t)}function s(t){i(\"next\",t)}function a(t){i(\"throw\",t)}function l(t,e){t(e),_.shift(),_.length&&i(_[0][0],_[0][1])}if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var u,c=r.apply(t,e||[]),_=[];return u={},o(\"next\"),o(\"throw\"),o(\"return\"),u[Symbol.asyncIterator]=function(){return this},u},y=function(t){function e(e,i){t[e]&&(r[e]=function(r){return(o=!o)?{value:f(t[e](r)),done:\"return\"===e}:i?i(r):r})}var r,o;return r={},e(\"next\"),e(\"throw\",function(t){throw t}),e(\"return\"),r[Symbol.iterator]=function(){return this},r},g=function(t){if(!Symbol.asyncIterator)throw new TypeError(\"Symbol.asyncIterator is not defined.\");var e=t[Symbol.asyncIterator];return e?e.call(t):\"function\"==typeof p?p(t):t[Symbol.iterator]()},t(\"__extends\",o),t(\"__assign\",i),t(\"__rest\",n),t(\"__decorate\",s),t(\"__param\",a),t(\"__metadata\",l),t(\"__awaiter\",u),t(\"__generator\",c),t(\"__exportStar\",_),t(\"__values\",p),t(\"__read\",h),t(\"__spread\",d),t(\"__await\",f),t(\"__asyncGenerator\",m),t(\"__asyncDelegator\",y),t(\"__asyncValues\",g)})}).call(this,\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:\"undefined\"!=typeof window?window:{})},{}]},{},[\"main\"])}();/*\n",
" Copyright (c) 2012, Continuum Analytics, Inc.\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 Continuum Analytics 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",
" \n",
" /* END bokeh.min.js */\n",
" },\n",
" \n",
" function(Bokeh) {\n",
" /* BEGIN bokeh-widgets.min.js */\n",
" !function(){var define=void 0;return function(e,t,i){if(null==Bokeh)throw new Error(\"Cannot find Bokeh. You have to load it prior to loading plugins.\");for(var n in e)Bokeh.require.modules[n]=e[n];for(var o=0;o<i.length;o++){var r=Bokeh.require(i[0]);Bokeh.Models.register_models(r.models);for(var n in r)\"models\"!==n&&(Bokeh[n]=r[n])}}({\"models/widgets/abstract_button\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"core/properties\"),s=e(\"core/dom\"),a=e(\"core/build_views\"),l=e(\"./widget\");i.AbstractButtonView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.icon_views={},this.connect(this.model.change,function(){return this.render()}),this.render()},t.prototype.remove=function(){return a.remove_views(this.icon_views),t.__super__.remove.call(this)},t.prototype.template=function(){return s.button({type:\"button\",disabled:this.model.disabled,\"class\":[\"bk-bs-btn\",\"bk-bs-btn-\"+this.model.button_type]},this.model.label)},t.prototype.render=function(){var e,i;return t.__super__.render.call(this),s.empty(this.el),this.buttonEl=e=this.template(),this.el.appendChild(e),i=this.model.icon,null!=i&&(a.build_views(this.icon_views,[i],{parent:this}),s.prepend(e,this.icon_views[i.id].el,s.nbsp)),this},t.prototype.change_input=function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0},t}(l.WidgetView),i.AbstractButton=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"AbstractButton\",t.prototype.default_view=i.AbstractButtonView,t.define({callback:[r.Instance],label:[r.String,\"Button\"],icon:[r.Instance],button_type:[r.String,\"default\"]}),t}(l.Widget)},{\"./widget\":\"models/widgets/widget\",\"core/build_views\":void 0,\"core/dom\":void 0,\"core/properties\":void 0}],\"models/widgets/abstract_icon\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./widget\");i.AbstractIcon=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"AbstractIcon\",t}(r.Widget)},{\"./widget\":\"models/widgets/widget\"}],\"models/widgets/autocomplete_input\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty;e(\"jquery-ui/autocomplete\");var r=e(\"./text_input\"),s=e(\"core/properties\");i.AutocompleteInputView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=this.$el.find(\"input\"),e.autocomplete({source:this.model.completions}),e.autocomplete(\"widget\").addClass(\"bk-autocomplete-input\"),this._prefix_ui(),this},t}(r.TextInputView),i.AutocompleteInput=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"AutocompleteInput\",t.prototype.default_view=i.AutocompleteInputView,t.define({completions:[s.Array,[]]}),t}(r.TextInput)},{\"./text_input\":\"models/widgets/text_input\",\"core/properties\":void 0,\"jquery-ui/autocomplete\":\"jquery-ui/autocomplete\"}],\"models/widgets/button\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"core/properties\"),s=e(\"core/bokeh_events\"),a=e(\"./abstract_button\");i.ButtonView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.buttonEl.addEventListener(\"click\",function(e){return function(){return e.change_input()}}(this))},t.prototype.change_input=function(){return this.model.trigger_event(new s.ButtonClick({})),this.model.clicks=this.model.clicks+1,t.__super__.change_input.call(this)},t}(a.AbstractButtonView),i.Button=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Button\",t.prototype.default_view=i.ButtonView,t.define({clicks:[r.Number,0]}),t}(a.AbstractButton),s.register_with_event(s.ButtonClick,i.Button)},{\"./abstract_button\":\"models/widgets/abstract_button\",\"core/bokeh_events\":void 0,\"core/properties\":void 0}],\"models/widgets/button_group_template\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=e(\"core/dom\");i[\"default\"]=function(){return n.createElement(\"div\",{\"class\":\"bk-bs-btn-group\",\"data-bk-bs-toggle\":\"buttons\"})}},{\"core/dom\":void 0}],\"models/widgets/cell_editors\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"jquery\");e(\"jquery-ui/autocomplete\"),e(\"jquery-ui/spinner\");var s=e(\"core/properties\"),a=e(\"core/util/object\"),l=e(\"core/dom_view\"),u=e(\"../../model\"),c=e(\"./data_table\"),d=e(\"./jqueryable\");i.CellEditorView=function(e){function t(e){this.args=e,t.__super__.constructor.call(this,a.extend({model:e.column.editor},e))}return n(t,e),n(t.prototype,d.JQueryable),t.prototype.className=\"bk-cell-editor\",t.prototype.input=null,t.prototype.emptyValue=null,t.prototype.defaultValue=null,t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render()},t.prototype.render=function(){return t.__super__.render.call(this),this.$el.appendTo(this.args.container),this.$input=r(this.input),this.$el.append(this.$input),this.renderEditor(),this.disableNavigation(),this._prefix_ui(),this},t.prototype.renderEditor=function(){},t.prototype.disableNavigation=function(){return this.$input.keydown(function(e){return function(e){var t;switch(t=function(){return e.stopImmediatePropagation()},e.keyCode){case r.ui.keyCode.LEFT:return t();case r.ui.keyCode.RIGHT:return t();case r.ui.keyCode.UP:return t();case r.ui.keyCode.DOWN:return t();case r.ui.keyCode.PAGE_UP:return t();case r.ui.keyCode.PAGE_DOWN:return t()}}}(this))},t.prototype.destroy=function(){return this.remove()},t.prototype.focus=function(){return this.$input.focus()},t.prototype.show=function(){},t.prototype.hide=function(){},t.prototype.position=function(){},t.prototype.getValue=function(){return this.$input.val()},t.prototype.setValue=function(e){return this.$input.val(e)},t.prototype.serializeValue=function(){return this.getValue()},t.prototype.isValueChanged=function(){return!(\"\"===this.getValue()&&null==this.defaultValue)&&this.getValue()!==this.defaultValue},t.prototype.applyValue=function(e,t){return this.args.grid.getData().setField(e[c.DTINDEX_NAME],this.args.column.field,t)},t.prototype.loadValue=function(e){var t;return t=e[this.args.column.field],this.defaultValue=null!=t?t:this.emptyValue,this.setValue(this.defaultValue)},t.prototype.validateValue=function(e){var t;return this.args.column.validator&&(t=this.args.column.validator(e),!t.valid)?t:{valid:!0,msg:null}},t.prototype.validate=function(){return this.validateValue(this.getValue())},t}(l.DOMView),i.CellEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"CellEditor\",t.prototype.default_view=i.CellEditorView,t}(u.Model),i.StringEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.emptyValue=\"\",t.prototype.input='<input type=\"text\" />',t.prototype.renderEditor=function(){var e;return e=this.model.completions,0!==e.length&&(this.$input.autocomplete({source:e}),this.$input.autocomplete(\"widget\").addClass(\"bk-cell-editor-completion\")),this.$input.focus().select()},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t}(i.CellEditorView),i.StringEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"StringEditor\",t.prototype.default_view=i.StringEditorView,t.define({completions:[s.Array,[]]}),t}(i.CellEditor),i.TextEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t}(i.CellEditorView),i.TextEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"TextEditor\",t.prototype.default_view=i.TextEditorView,t}(i.CellEditor),i.SelectEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input=\"<select />\",t.prototype.renderEditor=function(){var e,t,i,n;for(n=this.model.options,e=0,t=n.length;e<t;e++)i=n[e],this.$input.append(r(\"<option>\").attr({value:i}).text(i));return this.focus()},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input.select()},t}(i.CellEditorView),i.SelectEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"SelectEditor\",t.prototype.default_view=i.SelectEditorView,t.define({options:[s.Array,[]]}),t}(i.CellEditor),i.PercentEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t}(i.CellEditorView),i.PercentEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"PercentEditor\",t.prototype.default_view=i.PercentEditorView,t}(i.CellEditor),i.CheckboxEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input='<input type=\"checkbox\" value=\"true\" />',t.prototype.renderEditor=function(){return this.focus()},t.prototype.loadValue=function(e){return this.defaultValue=!!e[this.args.column.field],this.$input.prop(\"checked\",this.defaultValue)},t.prototype.serializeValue=function(){return this.$input.prop(\"checked\")},t}(i.CellEditorView),i.CheckboxEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"CheckboxEditor\",t.prototype.default_view=i.CheckboxEditorView,t}(i.CellEditor),i.IntEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input='<input type=\"text\" />',t.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.step}),this.$input.focus().select()},t.prototype.remove=function(){return this.$input.spinner(\"destroy\"),t.__super__.remove.call(this)},t.prototype.serializeValue=function(){return parseInt(this.getValue(),10)||0},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t.prototype.validateValue=function(e){return isNaN(e)?{valid:!1,msg:\"Please enter a valid integer\"}:t.__super__.validateValue.call(this,e)},t}(i.CellEditorView),i.IntEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"IntEditor\",t.prototype.default_view=i.IntEditorView,t.define({step:[s.Number,1]}),t}(i.CellEditor),i.NumberEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.input='<input type=\"text\" />',t.prototype.renderEditor=function(){return this.$input.spinner({step:this.model.step}),this.$input.focus().select()},t.prototype.remove=function(){return this.$input.spinner(\"destroy\"),t.__super__.remove.call(this)},t.prototype.serializeValue=function(){return parseFloat(this.getValue())||0},t.prototype.loadValue=function(e){return t.__super__.loadValue.call(this,e),this.$input[0].defaultValue=this.defaultValue,this.$input.select()},t.prototype.validateValue=function(e){return isNaN(e)?{valid:!1,msg:\"Please enter a valid number\"}:t.__super__.validateValue.call(this,e)},t}(i.CellEditorView),i.NumberEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"NumberEditor\",t.prototype.default_view=i.NumberEditorView,t.define({step:[s.Number,.01]}),t}(i.CellEditor),i.TimeEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t}(i.CellEditorView),i.TimeEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"TimeEditor\",t.prototype.default_view=i.TimeEditorView,t}(i.CellEditor),i.DateEditorView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.emptyValue=new Date,t.prototype.input='<input type=\"text\" />',t.prototype.renderEditor=function(){return this.calendarOpen=!1,this.$input.datepicker({showOn:\"button\",buttonImageOnly:!0,beforeShow:function(e){return function(){return e.calendarOpen=!0}}(this),onClose:function(e){return function(){return e.calendarOpen=!1}}(this)}),this.$input.siblings(\".bk-ui-datepicker-trigger\").css({\"vertical-align\":\"middle\"}),this.$input.width(this.$input.width()-26),this.$input.focus().select()},t.prototype.destroy=function(){return r.datepicker.dpDiv.stop(!0,!0),this.$input.datepicker(\"hide\"),this.$input.datepicker(\"destroy\"),t.__super__.destroy.call(this)},t.prototype.show=function(){return this.calendarOpen&&r.datepicker.dpDiv.stop(!0,!0).show(),t.__super__.show.call(this)},t.prototype.hide=function(){return this.calendarOpen&&r.datepicker.dpDiv.stop(!0,!0).hide(),t.__super__.hide.call(this)},t.prototype.position=function(e){return this.calendarOpen&&r.datepicker.dpDiv.css({top:e.top+30,left:e.left}),t.__super__.position.call(this)},t.prototype.getValue=function(){return this.$input.datepicker(\"getDate\").getTime()},t.prototype.setValue=function(e){return this.$input.datepicker(\"setDate\",new Date(e))},t}(i.CellEditorView),i.DateEditor=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"DateEditor\",t.prototype.default_view=i.DateEditorView,t}(i.CellEditor)},{\"../../model\":\"model\",\"./data_table\":\"models/widgets/data_table\",\"./jqueryable\":\"models/widgets/jqueryable\",\"core/dom_view\":void 0,\"core/properties\":void 0,\"core/util/object\":void 0,jquery:\"jquery\",\"jquery-ui/autocomplete\":\"jquery-ui/autocomplete\",\"jquery-ui/spinner\":\"jquery-ui/spinner\"}],\"models/widgets/cell_formatters\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"jquery\"),s=e(\"numbro\"),a=e(\"underscore.template\"),l=e(\"core/properties\"),u=e(\"core/util/object\"),c=e(\"core/util/types\"),d=e(\"../../model\");i.CellFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.doFormat=function(e,t,i,n,o){return null===i?\"\":(i+\"\").replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\")},t}(d.Model),i.StringFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"StringFormatter\",t.define({font_style:[l.FontStyle,\"normal\"],text_align:[l.TextAlign,\"left\"],text_color:[l.Color]}),t.prototype.doFormat=function(e,i,n,o,s){var a,l,u,c;if(l=t.__super__.doFormat.call(this,e,i,n,o,s),a=this.font_style,u=this.text_align,c=this.text_color,null!=a||null!=u||null!=c){switch(l=r(\"<span>\"+l+\"</span>\"),a){case\"bold\":l=l.css(\"font-weight\",\"bold\");break;case\"italic\":l=l.css(\"font-style\",\"italic\")}null!=u&&(l=l.css(\"text-align\",u)),null!=c&&(l=l.css(\"color\",c)),l=l.prop(\"outerHTML\")}return l},t}(i.CellFormatter),i.NumberFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"NumberFormatter\",t.define({format:[l.String,\"0,0\"],language:[l.String,\"en\"],rounding:[l.String,\"round\"]}),t.prototype.doFormat=function(e,i,n,o,r){var a,l,u;return a=this.format,l=this.language,u=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}}.call(this),n=s.format(n,a,l,u),t.__super__.doFormat.call(this,e,i,n,o,r)},t}(i.StringFormatter),i.BooleanFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"BooleanFormatter\",t.define({icon:[l.String,\"check\"]}),t.prototype.doFormat=function(e,t,i,n,o){return i?r(\"<i>\").addClass(this.icon).html():\"\"},t}(i.CellFormatter),i.DateFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"DateFormatter\",t.define({format:[l.String,\"yy M d\"]}),t.prototype.getFormat=function(){var e,t;return e=this.format,t=function(){switch(e){case\"ATOM\":case\"W3C\":case\"RFC-3339\":case\"ISO-8601\":return\"ISO-8601\";case\"COOKIE\":return\"COOKIE\";case\"RFC-850\":return\"RFC-850\";case\"RFC-1036\":return\"RFC-1036\";case\"RFC-1123\":return\"RFC-1123\";case\"RFC-2822\":return\"RFC-2822\";case\"RSS\":case\"RFC-822\":return\"RFC-822\";case\"TICKS\":return\"TICKS\";case\"TIMESTAMP\":return\"TIMESTAMP\";default:return null}}(),null!=t?r.datepicker[t]:e},t.prototype.doFormat=function(e,i,n,o,s){var a;return n=c.isString(n)?parseInt(n,10):n,a=r.datepicker.formatDate(this.getFormat(),new Date(n)),t.__super__.doFormat.call(this,e,i,a,o,s)},t}(i.CellFormatter),i.HTMLTemplateFormatter=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"HTMLTemplateFormatter\",t.define({template:[l.String,\"<%= value %>\"]}),t.prototype.doFormat=function(e,t,i,n,o){var r,s;return s=this.template,null===i?\"\":(o=u.extend({},o,{value:i}),(r=a(s))(o))},t}(i.CellFormatter)},{\"../../model\":\"model\",\"core/properties\":void 0,\"core/util/object\":void 0,\"core/util/types\":void 0,jquery:\"jquery\",numbro:\"numbro\",\"underscore.template\":\"underscore.template\"}],\"models/widgets/checkbox_button_group\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},s=e(\"jquery\");e(\"bootstrap/button\");var a=e(\"./widget\"),l=e(\"core/properties\"),u=e(\"./button_group_template\");i.CheckboxButtonGroupView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.events={\"change input\":\"change_input\"},t.prototype.template=u[\"default\"],t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.change,function(){return this.render()})},t.prototype.render=function(){var e,i,n,o,a,l,u,c,d;for(t.__super__.render.call(this),this.$el.empty(),o=this.template(),this.el.appendChild(o),n=this.model.active,d=this.model.labels,a=l=0,c=d.length;l<c;a=++l)u=d[a],e=s('<input type=\"checkbox\">').attr({value:\"\"+a}),r.call(n,a)>=0&&e.prop(\"checked\",!0),i=s('<label class=\"bk-bs-btn\"></label>'),i.text(u).prepend(e),i.addClass(\"bk-bs-btn-\"+this.model.button_type),r.call(n,a)>=0&&i.addClass(\"bk-bs-active\"),this.$el.find(\".bk-bs-btn-group\").append(i);return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,r;for(o=this.$el.find(\"input\"),r=[],i=e=0,n=o.length;e<n;i=++e)t=o[i],t.checked&&r.push(i);return r}.call(this),this.model.active=e,null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(a.WidgetView),i.CheckboxButtonGroup=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"CheckboxButtonGroup\",t.prototype.default_view=i.CheckboxButtonGroupView,t.define({active:[l.Array,[]],labels:[l.Array,[]],button_type:[l.String,\"default\"],callback:[l.Instance]}),t}(a.Widget)},{\"./button_group_template\":\"models/widgets/button_group_template\",\"./widget\":\"models/widgets/widget\",\"bootstrap/button\":\"bootstrap/button\",\"core/properties\":void 0,jquery:\"jquery\"}],\"models/widgets/checkbox_group\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=[].indexOf||function(e){for(var t=0,i=this.length;t<i;t++)if(t in this&&this[t]===e)return t;return-1},s=e(\"jquery\"),a=e(\"./widget\"),l=e(\"core/properties\");i.CheckboxGroupView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.events={\"change input\":\"change_input\"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.change,function(){return this.render()})},t.prototype.render=function(){var e,i,n,o,a,l,u,c,d;for(t.__super__.render.call(this),this.$el.empty(),o=this.model.active,d=this.model.labels,a=l=0,c=d.length;l<c;a=++l)u=d[a],i=s('<input type=\"checkbox\">').attr({value:\"\"+a}),this.model.disabled&&i.prop(\"disabled\",!0),r.call(o,a)>=0&&i.prop(\"checked\",!0),n=s(\"<label></label>\").text(u).prepend(i),this.model.inline?(n.addClass(\"bk-bs-checkbox-inline\"),this.$el.append(n)):(e=s('<div class=\"bk-bs-checkbox\"></div>').append(n),this.$el.append(e));return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,r;for(o=this.$el.find(\"input\"),r=[],i=e=0,n=o.length;e<n;i=++e)t=o[i],t.checked&&r.push(i);return r}.call(this),this.model.active=e,null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(a.WidgetView),i.CheckboxGroup=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"CheckboxGroup\",t.prototype.default_view=i.CheckboxGroupView,t.define({active:[l.Array,[]],labels:[l.Array,[]],inline:[l.Bool,!1],callback:[l.Instance]}),t}(a.Widget)},{\"./widget\":\"models/widgets/widget\",\"core/properties\":void 0,jquery:\"jquery\"}],\"models/widgets/data_table\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty;e(\"jquery-ui/sortable\");var r=e(\"slick_grid/slick.grid\"),s=e(\"slick_grid/plugins/slick.rowselectionmodel\"),a=e(\"slick_grid/plugins/slick.checkboxselectcolumn\"),l=e(\"core/hittest\"),u=e(\"core/properties\"),c=e(\"core/util/string\"),d=e(\"core/util/array\"),h=e(\"./table_widget\"),p=e(\"./widget\");i.DTINDEX_NAME=\"__bkdt_internal_index__\",i.DataProvider=function(){function e(e){var t;if(this.source=e,i.DTINDEX_NAME in this.source.data)throw new Error(\"special name \"+i.DTINDEX_NAME+\" cannot be used as a data table column\");this.index=function(){t=[];for(var e=0,i=this.getLength();0<=i?e<i:e>i;0<=i?e++:e--)t.push(e);return t}.apply(this)}return e.prototype.getLength=function(){return this.source.get_length()},e.prototype.getItem=function(e){var t,n,o,r,s;for(n={},s=Object.keys(this.source.data),o=0,r=s.length;o<r;o++)t=s[o],n[t]=this.source.data[t][this.index[e]];return n[i.DTINDEX_NAME]=this.index[e],n},e.prototype.setItem=function(e,t){var n,o;for(n in t)o=t[n],n!==i.DTINDEX_NAME&&(this.source.data[n][this.index[e]]=o);return this._update_source_inplace(),null},e.prototype.getField=function(e,t){return t===i.DTINDEX_NAME?this.index[e]:this.source.data[t][this.index[e]]},e.prototype.setField=function(e,t,i){return this.source.data[t][this.index[e]]=i,this._update_source_inplace(),null},e.prototype.getItemMetadata=function(e){return null},e.prototype.getRecords=function(){var e;return function(){var t,i,n;for(n=[],e=t=0,i=this.getLength();0<=i?t<i:t>i;e=0<=i?++t:--t)n.push(this.getItem(e));return n}.call(this)},e.prototype.sort=function(e){var t,n,o,r;return t=function(){var t,i,o;for(o=[],t=0,i=e.length;t<i;t++)n=e[t],o.push([n.sortCol.field,n.sortAsc?1:-1]);return o}(),0===t.length&&(t=[[i.DTINDEX_NAME,1]]),r=this.getRecords(),o=this.index.slice(),this.index.sort(function(e,i){var n,s,a,l,u,c,d,h;for(s=0,a=t.length;s<a;s++)if(l=t[s],n=l[0],c=l[1],d=r[o.indexOf(e)][n],h=r[o.indexOf(i)][n],u=d===h?0:d>h?c:-c,0!==u)return u;return 0})},e.prototype._update_source_inplace=function(){this.source.properties.data.change.emit(this,this.source.attributes.data)},e}(),i.DataTableView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.className=\"bk-data-table\",t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.in_selection_update=!1},t.prototype.connect_signals=function(){return this.connect(this.model.change,function(e){return function(){return e.render()}}(this)),this.connect(this.model.source.properties.data.change,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.streaming,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.patching,function(e){return function(){return e.updateGrid()}}(this)),this.connect(this.model.source.properties.selected.change,function(e){return function(){return e.updateSelection()}}(this))},t.prototype.updateGrid=function(){return this.data.constructor(this.model.source),this.grid.invalidate(),this.grid.render()},t.prototype.updateSelection=function(){var e,t,i,n,o,r;if(!this.in_selection_update)return n=this.model.source.selected,o=n[\"1d\"].indices,i=function(){var e,t,i;for(i=[],e=0,t=o.length;e<t;e++)r=o[e],i.push(this.data.index.indexOf(r));return i}.call(this),this.in_selection_update=!0,this.grid.setSelectedRows(i),this.in_selection_update=!1,e=this.grid.getViewport(),this.model.scroll_to_selection&&!d.any(i,function(t){return e.top<=t&&t<=e.bottom})?(t=Math.max(0,Math.min.apply(null,i)-1),this.grid.scrollRowToTop(t)):void 0},t.prototype.newIndexColumn=function(){return{id:c.uniqueId(),name:\"#\",field:i.DTINDEX_NAME,width:40,behavior:\"select\",cannotTriggerInsert:!0,resizable:!1,selectable:!1,sortable:!0,cssClass:\"bk-cell-index\"}},t.prototype.render=function(){var e,t,n,o;return n=function(){var e,i,n,o;for(n=this.model.columns,o=[],e=0,i=n.length;e<i;e++)t=n[e],o.push(t.toColumn());return o}.call(this),\"checkbox\"===this.model.selectable&&(e=new a({cssClass:\"bk-cell-select\"}),n.unshift(e.getColumnDefinition())),this.model.row_headers&&n.unshift(this.newIndexColumn()),o={enableCellNavigation:this.model.selectable!==!1,enableColumnReorder:this.model.reorderable,forceFitColumns:this.model.fit_columns,autoHeight:\"auto\"===this.model.height,multiColumnSort:this.model.sortable,editable:this.model.editable,autoEdit:!1},null!=this.model.width?this.el.style.width=this.model.width+\"px\":this.el.style.width=this.model.default_width+\"px\",null!=this.model.height&&\"auto\"!==this.model.height&&(this.el.style.height=this.model.height+\"px\"),this.data=new i.DataProvider(this.model.source),this.grid=new r(this.el,this.data,n,o),this.grid.onSort.subscribe(function(e){return function(t,i){return n=i.sortCols,e.data.sort(n),e.grid.invalidate(),e.updateSelection(),e.grid.render()}}(this)),this.model.selectable!==!1&&(this.grid.setSelectionModel(new s({selectActiveRow:null==e})),null!=e&&this.grid.registerPlugin(e),this.grid.onSelectedRowsChanged.subscribe(function(e){return function(t,i){var n,o;if(!e.in_selection_update)return o=l.create_hit_test_result(),o[\"1d\"].indices=function(){var e,t,o,r;for(o=i.rows,r=[],e=0,t=o.length;e<t;e++)n=o[e],r.push(this.data.index[n]);return r}.call(e),e.model.source.selected=o}}(this))),this._prefix_ui(),this},t}(p.WidgetView),i.DataTable=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"DataTable\",t.prototype.default_view=i.DataTableView,t.define({columns:[u.Array,[]],fit_columns:[u.Bool,!0],sortable:[u.Bool,!0],reorderable:[u.Bool,!0],editable:[u.Bool,!1],selectable:[u.Bool,!0],row_headers:[u.Bool,!0],scroll_to_selection:[u.Bool,!0]}),t.override({height:400}),t.internal({default_width:[u.Number,600]}),t}(h.TableWidget)},{\"./table_widget\":\"models/widgets/table_widget\",\"./widget\":\"models/widgets/widget\",\"core/hittest\":void 0,\"core/properties\":void 0,\"core/util/array\":void 0,\"core/util/string\":void 0,\"jquery-ui/sortable\":\"jquery-ui/sortable\",\"slick_grid/plugins/slick.checkboxselectcolumn\":\"slick_grid/plugins/slick.checkboxselectcolumn\",\"slick_grid/plugins/slick.rowselectionmodel\":\"slick_grid/plugins/slick.rowselectionmodel\",\"slick_grid/slick.grid\":\"slick_grid/slick.grid\"}],\"models/widgets/date_picker\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){return function(){return e.apply(t,arguments)}},o=function(e,t){function i(){this.constructor=e}for(var n in t)r.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r={}.hasOwnProperty,s=e(\"jquery\");e(\"jquery-ui/datepicker\");var a=e(\"core/dom\"),l=e(\"core/properties\"),u=e(\"./input_widget\");i.DatePickerView=function(e){function t(){return this.onSelect=n(this.onSelect,this),t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.render=function(){return t.__super__.render.call(this),a.empty(this.el),this.label=s(\"<label>\").text(this.model.title),this.input=s('<input type=\"text\">'),this.datepicker=this.input.datepicker({defaultDate:new Date(this.model.value),minDate:null!=this.model.min_date?new Date(this.model.min_date):null,maxDate:null!=this.model.max_date?new Date(this.model.max_date):null,onSelect:this.onSelect}),this.$el.append([this.label,this.input]),this._prefix_ui(),this},t.prototype.onSelect=function(e,t){var i,n;return i=new Date(e),this.model.value=i.toString(),null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(u.InputWidgetView),i.DatePicker=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"DatePicker\",t.prototype.default_view=i.DatePickerView,t.define({value:[l.Any,Date.now()],min_date:[l.Any],max_date:[l.Any]}),t}(u.InputWidget)},{\"./input_widget\":\"models/widgets/input_widget\",\"core/dom\":void 0,\"core/properties\":void 0,jquery:\"jquery\",\"jquery-ui/datepicker\":\"jquery-ui/datepicker\"}],\"models/widgets/date_range_slider\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty;e(\"jqrangeslider/jQDateRangeSlider\");var r=e(\"core/properties\"),s=e(\"core/util/types\"),a=e(\"./input_widget\");i.DateRangeSliderView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.change,function(e){return function(){return e.render}}(this))},t.prototype.render=function(){var e,i,n,o,r,a,l,u,c;return t.__super__.render.call(this),this.$el.empty(),r=this.model.value,c=r[0],u=r[1],a=this.model.range,o=a[0],n=a[1],l=this.model.bounds,i=l[0],e=l[1],this.$el.dateRangeSlider({defaultValues:{min:new Date(c),max:new Date(u)},bounds:{min:new Date(i),max:new Date(e)},range:{min:!!s.isObject(o)&&o,max:!!s.isObject(n)&&n},step:this.model.step||{},enabled:this.model.enabled,arrows:this.model.arrows,valueLabels:this.model.value_labels,\n",
" wheelMode:this.model.wheel_mode}),this.$el.on(\"userValuesChanged\",function(e){return function(t,i){var n;return e.model.value=[i.values.min,i.values.max],null!=(n=e.model.callback)?n.execute(e.model):void 0}}(this)),this},t}(a.InputWidgetView),i.DateRangeSlider=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"DateRangeSlider\",t.prototype.default_view=i.DateRangeSliderView,t.define({value:[r.Any],range:[r.Any],bounds:[r.Any],step:[r.Any,{}],enabled:[r.Bool,!0],arrows:[r.Bool,!0],value_labels:[r.String,\"show\"],wheel_mode:[r.Any]}),t}(a.InputWidget)},{\"./input_widget\":\"models/widgets/input_widget\",\"core/properties\":void 0,\"core/util/types\":void 0,\"jqrangeslider/jQDateRangeSlider\":\"jqrangeslider/jQDateRangeSlider\"}],\"models/widgets/div\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./markup\"),s=e(\"core/dom\"),a=e(\"core/properties\");i.DivView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=s.div(),this.model.render_as_text?e.textContent=this.model.text:e.innerHTML=this.model.text,this.$el.find(\".bk-markup\").append(e),this},t}(r.MarkupView),i.Div=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Div\",t.prototype.default_view=i.DivView,t.define({render_as_text:[a.Bool,!1]}),t}(r.Markup)},{\"./markup\":\"models/widgets/markup\",\"core/dom\":void 0,\"core/properties\":void 0}],\"models/widgets/dropdown\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"jquery\");e(\"bootstrap/dropdown\");var s=e(\"core/dom\"),a=e(\"core/properties\"),l=e(\"./abstract_button\");i.DropdownView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.template=function(){var e;return e=s.button({type:\"button\",disabled:this.model.disabled,value:this.model.default_value,\"class\":[\"bk-bs-btn\",\"bk-bs-btn-\"+this.model.button_type,\"bk-bs-dropdown-toggle\"]},this.model.label,\" \",s.span({\"class\":\"bk-bs-caret\"})),e.dataset.bkBsToggle=\"dropdown\",e},t.prototype.render=function(){var e,i,n,o,a,l,u,c,d,h;for(t.__super__.render.call(this),this.el.classList.add(\"bk-bs-dropdown\"),o=[],d=this.model.menu,e=0,l=d.length;e<l;e++)i=d[e],null!=i?(a=i[0],h=i[1],u=s.a({},a),u.dataset.value=h,u.addEventListener(\"click\",function(e){return function(t){return e.set_value(event.currentTarget.dataset.value)}}(this)),n=s.li({},u)):n=s.li({\"class\":\"bk-bs-divider\"}),o.push(n);return c=s.ul({\"class\":\"bk-bs-dropdown-menu\"},o),this.el.appendChild(c),r(this.buttonEl).dropdown(),this},t.prototype.set_value=function(e){return this.buttonEl.value=this.model.value=e,this.change_input()},t}(l.AbstractButtonView),i.Dropdown=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Dropdown\",t.prototype.default_view=i.DropdownView,t.define({value:[a.String],default_value:[a.String],menu:[a.Array,[]]}),t.override({label:\"Dropdown\"}),t}(l.AbstractButton)},{\"./abstract_button\":\"models/widgets/abstract_button\",\"bootstrap/dropdown\":\"bootstrap/dropdown\",\"core/dom\":void 0,\"core/properties\":void 0,jquery:\"jquery\"}],\"models/widgets/index\":[function(e,t,i){\"use strict\";function n(e){for(var t in e)i.hasOwnProperty(t)||(i[t]=e[t])}Object.defineProperty(i,\"__esModule\",{value:!0}),n(e(\"./cell_editors\")),n(e(\"./cell_formatters\"));var o=e(\"./abstract_button\");i.AbstractButton=o.AbstractButton;var r=e(\"./abstract_icon\");i.AbstractIcon=r.AbstractIcon;var s=e(\"./autocomplete_input\");i.AutocompleteInput=s.AutocompleteInput;var a=e(\"./button\");i.Button=a.Button;var l=e(\"./checkbox_button_group\");i.CheckboxButtonGroup=l.CheckboxButtonGroup;var u=e(\"./checkbox_group\");i.CheckboxGroup=u.CheckboxGroup;var c=e(\"./data_table\");i.DataTable=c.DataTable;var d=e(\"./date_picker\");i.DatePicker=d.DatePicker;var h=e(\"./date_range_slider\");i.DateRangeSlider=h.DateRangeSlider;var p=e(\"./div\");i.Div=p.Div;var f=e(\"./dropdown\");i.Dropdown=f.Dropdown;var m=e(\"./input_widget\");i.InputWidget=m.InputWidget;var g=e(\"./markup\");i.Markup=g.Markup;var v=e(\"./multiselect\");i.MultiSelect=v.MultiSelect;var _=e(\"./panel\");i.Panel=_.Panel;var y=e(\"./paragraph\");i.Paragraph=y.Paragraph;var b=e(\"./pretext\");i.PreText=b.PreText;var w=e(\"./radio_button_group\");i.RadioButtonGroup=w.RadioButtonGroup;var C=e(\"./radio_group\");i.RadioGroup=C.RadioGroup;var k=e(\"./range_slider\");i.RangeSlider=k.RangeSlider;var x=e(\"./selectbox\");i.Select=x.Select;var D=e(\"./slider\");i.Slider=D.Slider;var S=e(\"./table_column\");i.TableColumn=S.TableColumn;var E=e(\"./table_widget\");i.TableWidget=E.TableWidget;var T=e(\"./tabs\");i.Tabs=T.Tabs;var M=e(\"./text_input\");i.TextInput=M.TextInput;var P=e(\"./toggle\");i.Toggle=P.Toggle;var R=e(\"./widget\");i.Widget=R.Widget},{\"./abstract_button\":\"models/widgets/abstract_button\",\"./abstract_icon\":\"models/widgets/abstract_icon\",\"./autocomplete_input\":\"models/widgets/autocomplete_input\",\"./button\":\"models/widgets/button\",\"./cell_editors\":\"models/widgets/cell_editors\",\"./cell_formatters\":\"models/widgets/cell_formatters\",\"./checkbox_button_group\":\"models/widgets/checkbox_button_group\",\"./checkbox_group\":\"models/widgets/checkbox_group\",\"./data_table\":\"models/widgets/data_table\",\"./date_picker\":\"models/widgets/date_picker\",\"./date_range_slider\":\"models/widgets/date_range_slider\",\"./div\":\"models/widgets/div\",\"./dropdown\":\"models/widgets/dropdown\",\"./input_widget\":\"models/widgets/input_widget\",\"./markup\":\"models/widgets/markup\",\"./multiselect\":\"models/widgets/multiselect\",\"./panel\":\"models/widgets/panel\",\"./paragraph\":\"models/widgets/paragraph\",\"./pretext\":\"models/widgets/pretext\",\"./radio_button_group\":\"models/widgets/radio_button_group\",\"./radio_group\":\"models/widgets/radio_group\",\"./range_slider\":\"models/widgets/range_slider\",\"./selectbox\":\"models/widgets/selectbox\",\"./slider\":\"models/widgets/slider\",\"./table_column\":\"models/widgets/table_column\",\"./table_widget\":\"models/widgets/table_widget\",\"./tabs\":\"models/widgets/tabs\",\"./text_input\":\"models/widgets/text_input\",\"./toggle\":\"models/widgets/toggle\",\"./widget\":\"models/widgets/widget\"}],\"models/widgets/input_widget\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./widget\"),s=e(\"core/properties\");i.InputWidgetView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.$el.find(\"input\").prop(\"disabled\",this.model.disabled)},t.prototype.change_input=function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0},t}(r.WidgetView),i.InputWidget=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"InputWidget\",t.prototype.default_view=i.InputWidgetView,t.define({callback:[s.Instance],title:[s.String,\"\"]}),t}(r.Widget)},{\"./widget\":\"models/widgets/widget\",\"core/properties\":void 0}],\"models/widgets/jqueryable\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n,o=e(\"jquery\"),r=e(\"core/dom\"),s=e(\"core/util/types\");n=/^(\\S+)\\s*(.*)$/,i.JQueryable={_prefix_ui:function(){var e,t,i,n,o,r,s,a,l;for(a=this.el.querySelectorAll(\"*[class*='ui-']\"),n=0,r=a.length;n<r;n++){for(i=a[n],e=[],l=i.classList,o=0,s=l.length;o<s;o++)t=l[o],e.push(0===t.indexOf(\"ui-\")?\"bk-\"+t:t);i.className=e.join(\" \")}return null},_createElement:function(){var e;return e=r.createElement(this.tagName,{id:this.id,\"class\":this.className}),this.$el=o(e),this.delegateEvents(),e},delegateEvents:function(e){var t,i,o;if(null==e&&(e=this.events),!e)return this;this.undelegateEvents();for(t in e)o=e[t],s.isFunction(o)||(o=this[o]),null!=o&&(i=t.match(n),this.delegate(i[1],i[2],o.bind(this)));return this},delegate:function(e,t,i){return this.$el.on(e+\".delegateEvents\"+this.id,t,i),this},undelegateEvents:function(){return this.$el&&this.$el.off(\".delegateEvents\"+this.id),this},undelegate:function(e,t,i){return this.$el.off(e+\".delegateEvents\"+this.id,t,i),this}}},{\"core/dom\":void 0,\"core/util/types\":void 0,jquery:\"jquery\"}],\"models/widgets/main\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=e(\"./index\");i.models=n},{\"./index\":\"models/widgets/index\"}],\"models/widgets/markup\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"core/properties\"),s=e(\"./widget\"),a=e(\"./markup_template\");i.MarkupView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.template=a[\"default\"],t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.change,function(){return this.render()})},t.prototype.render=function(){if(t.__super__.render.call(this),this.$el.empty(),this.$el.html(this.template()),this.model.height&&this.$el.height(this.model.height),this.model.width)return this.$el.width(this.model.width)},t}(s.WidgetView),i.Markup=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Markup\",t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e)},t.define({text:[r.String,\"\"]}),t}(s.Widget)},{\"./markup_template\":\"models/widgets/markup_template\",\"./widget\":\"models/widgets/widget\",\"core/properties\":void 0}],\"models/widgets/markup_template\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=e(\"core/dom\");i[\"default\"]=function(){return n.createElement(\"div\",{\"class\":\"bk-markup\"})}},{\"core/dom\":void 0}],\"models/widgets/multiselect\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){return function(){return e.apply(t,arguments)}},o=function(e,t){function i(){this.constructor=e}for(var n in t)r.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r={}.hasOwnProperty,s=e(\"core/properties\"),a=e(\"./input_widget\"),l=e(\"./multiselecttemplate\");i.MultiSelectView=function(e){function t(){return this.render_selection=n(this.render_selection,this),t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.template=l[\"default\"],t.prototype.events={\"change select\":\"change_input\"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.properties.value.change,function(){return this.render_selection()}),this.connect(this.model.properties.options.change,function(){return this.render()}),this.connect(this.model.properties.name.change,function(){return this.render()}),this.connect(this.model.properties.title.change,function(){return this.render()}),this.connect(this.model.properties.size.change,function(){return this.render()})},t.prototype.render=function(){var e;return t.__super__.render.call(this),this.$el.empty(),e=this.template(this.model.attributes),this.$el.html(e),this.render_selection(),this},t.prototype.render_selection=function(){var e,t,i,n,o;for(n={},i=this.model.value,e=0,t=i.length;e<t;e++)o=i[e],n[o]=!0;return this.$el.find(\"option\").each(function(e){return function(t){if(t=e.$el.find(t),n[t.attr(\"value\")])return t.attr(\"selected\",\"selected\")}}(this)),this.$el.find(\"select\").attr(\"size\",this.model.size)},t.prototype.change_input=function(){var e,i;if(e=this.$el.find(\"select:focus\").size(),i=this.$el.find(\"select\").val(),i?this.model.value=i:this.model.value=[],t.__super__.change_input.call(this),e)return this.$el.find(\"select\").focus()},t}(a.InputWidgetView),i.MultiSelect=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"MultiSelect\",t.prototype.default_view=i.MultiSelectView,t.define({value:[s.Array,[]],options:[s.Array,[]],size:[s.Number,4]}),t}(a.InputWidget)},{\"./input_widget\":\"models/widgets/input_widget\",\"./multiselecttemplate\":\"models/widgets/multiselecttemplate\",\"core/properties\":void 0}],\"models/widgets/multiselecttemplate\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=e(\"core/dom\"),o=e(\"core/util/types\");i[\"default\"]=function(e){return n.createElement(\"fragment\",null,n.createElement(\"label\",{\"for\":e.id},\" \",e.title,\" \"),n.createElement(\"select\",{multiple:!0,\"class\":\"bk-widget-form-input\",id:e.id,name:e.name},e.options.map(function(t){var i,r;o.isString(t)?i=r=t:(i=t[0],r=t[1]);var s=e.value.indexOf(i)>-1;return n.createElement(\"option\",{selected:s,value:i},r)})))}},{\"core/dom\":void 0,\"core/util/types\":void 0}],\"models/widgets/panel\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./widget\"),s=e(\"core/properties\");i.PanelView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.$el.empty(),this},t}(r.WidgetView),i.Panel=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Panel\",t.prototype.default_view=i.PanelView,t.define({title:[s.String,\"\"],child:[s.Instance],closable:[s.Bool,!1]}),t}(r.Widget)},{\"./widget\":\"models/widgets/widget\",\"core/properties\":void 0}],\"models/widgets/paragraph\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./markup\"),s=e(\"core/dom\");i.ParagraphView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=s.p({style:{margin:0}},this.model.text),this.$el.find(\".bk-markup\").append(e)},t}(r.MarkupView),i.Paragraph=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Paragraph\",t.prototype.default_view=i.ParagraphView,t}(r.Markup)},{\"./markup\":\"models/widgets/markup\",\"core/dom\":void 0}],\"models/widgets/pretext\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./markup\"),s=e(\"core/dom\");i.PreTextView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e;return t.__super__.render.call(this),e=s.pre({style:{overflow:\"auto\"}},this.model.text),this.$el.find(\".bk-markup\").append(e)},t}(r.MarkupView),i.PreText=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"PreText\",t.prototype.default_view=i.PreTextView,t}(r.Markup)},{\"./markup\":\"models/widgets/markup\",\"core/dom\":void 0}],\"models/widgets/radio_button_group\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty;e(\"bootstrap/button\");var r=e(\"core/dom\"),s=e(\"core/properties\"),a=e(\"core/util/string\"),l=e(\"./widget\"),u=e(\"./button_group_template\");i.RadioButtonGroupView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.events={\"change input\":\"change_input\"},t.prototype.template=u[\"default\"],t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.change,function(){return this.render()})},t.prototype.render=function(){var e,i,n,o,s,l,u,c,d,h;for(t.__super__.render.call(this),this.$el.empty(),i=this.template(),this.$el.append(i),c=a.uniqueId(\"RadioButtonGroup\"),e=this.model.active,d=this.model.labels,n=s=0,u=d.length;s<u;n=++s)h=d[n],o=r.input({type:\"radio\",name:c,value:\"\"+n,checked:n===e}),l=r.label({\"class\":[\"bk-bs-btn\",\"bk-bs-btn-\"+this.model.button_type]},o,h),n===e&&l.classList.add(\"bk-bs-active\"),this.$el.find(\".bk-bs-btn-group\").append(l);return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,r;for(o=this.$el.find(\"input\"),r=[],t=e=0,n=o.length;e<n;t=++e)i=o[t],i.checked&&r.push(t);return r}.call(this),this.model.active=e[0],null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(l.WidgetView),i.RadioButtonGroup=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"RadioButtonGroup\",t.prototype.default_view=i.RadioButtonGroupView,t.define({active:[s.Any,null],labels:[s.Array,[]],button_type:[s.String,\"default\"],callback:[s.Instance]}),t}(l.Widget)},{\"./button_group_template\":\"models/widgets/button_group_template\",\"./widget\":\"models/widgets/widget\",\"bootstrap/button\":\"bootstrap/button\",\"core/dom\":void 0,\"core/properties\":void 0,\"core/util/string\":void 0}],\"models/widgets/radio_group\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"jquery\"),s=e(\"core/properties\"),a=e(\"core/util/string\"),l=e(\"./widget\");i.RadioGroupView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.events={\"change input\":\"change_input\"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.change,function(){return this.render()})},t.prototype.render=function(){var e,i,n,o,s,l,u,c,d,h;for(t.__super__.render.call(this),this.$el.empty(),d=a.uniqueId(\"RadioGroup\"),o=this.model.active,h=this.model.labels,s=l=0,c=h.length;l<c;s=++l)u=h[s],i=r('<input type=\"radio\">').attr({name:d,value:\"\"+s}),this.model.disabled&&i.prop(\"disabled\",!0),s===o&&i.prop(\"checked\",!0),n=r(\"<label></label>\").text(u).prepend(i),this.model.inline?(n.addClass(\"bk-bs-radio-inline\"),this.$el.append(n)):(e=r('<div class=\"bk-bs-radio\"></div>').append(n),this.$el.append(e));return this},t.prototype.change_input=function(){var e,t,i,n;return e=function(){var e,n,o,r;for(o=this.$el.find(\"input\"),r=[],t=e=0,n=o.length;e<n;t=++e)i=o[t],i.checked&&r.push(t);return r}.call(this),this.model.active=e[0],null!=(n=this.model.callback)?n.execute(this.model):void 0},t}(l.WidgetView),i.RadioGroup=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"RadioGroup\",t.prototype.default_view=i.RadioGroupView,t.define({active:[s.Any,null],labels:[s.Array,[]],inline:[s.Bool,!1],callback:[s.Instance]}),t}(l.Widget)},{\"./widget\":\"models/widgets/widget\",\"core/properties\":void 0,\"core/util/string\":void 0,jquery:\"jquery\"}],\"models/widgets/range_slider\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){return function(){return e.apply(t,arguments)}},o=function(e,t){function i(){this.constructor=e}for(var n in t)r.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r={}.hasOwnProperty;e(\"jquery-ui/slider\");var s=e(\"core/logging\"),a=e(\"core/properties\"),l=e(\"core/util/callback\"),u=e(\"./input_widget\"),c=e(\"./slidertemplate\");i.RangeSliderView=function(e){function t(){return this.slide=n(this.slide,this),this.slidestop=n(this.slidestop,this),t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.template=c[\"default\"],t.prototype.initialize=function(e){var i;return t.__super__.initialize.call(this,e),this.connect(this.model.properties.start.change,function(){return this._render()}),this.connect(this.model.properties.end.change,function(){return this._render()}),this.connect(this.model.properties.step.change,function(){return this._render()}),this.connect(this.model.properties.orientation.change,function(){return this._render()}),this.$el.empty(),i=this.template(this.model.attributes),this.$el.html(i),this.callbackWrapper=null,\"continuous\"===this.model.callback_policy&&(this.callbackWrapper=function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0}),\"throttle\"===this.model.callback_policy&&this.model.callback&&(this.callbackWrapper=l.throttle(function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0},this.model.callback_throttle)),this._render()},t.prototype._render=function(){var e,t,i,n,o;return this.render(),t=this.model.end,i=this.model.start,o=this.model.step||(t-i)/50,s.logger.debug(\"range-slider render: min, max, step = (\"+i+\", \"+t+\", \"+o+\")\"),n={range:!0,orientation:this.model.orientation,animate:\"fast\",values:this.model.range,min:i,max:t,step:o,stop:this.slidestop,slide:this.slide},this.$el.find(\".slider\").slider(n),null!=this.model.title&&this.$el.find(\"#\"+this.model.id).val(this.$el.find(\".slider\").slider(\"values\").join(\" - \")),this.$el.find(\".bk-slider-parent\").height(this.model.height),e=this.$el.find(\".bk-ui-slider-handle\"),2===e.length&&(e[0].style.left=this.$el.find(\".ui-slider-handle\")[0].style.left,e[1].style.left=this.$el.find(\".ui-slider-handle\")[1].style.left),this._prefix_ui(),this},t.prototype.slidestop=function(e,t){var i;if(\"mouseup\"===this.model.callback_policy||\"throttle\"===this.model.callback_policy)return null!=(i=this.model.callback)?i.execute(this.model):void 0},t.prototype.slide=function(e,t){var i,n;if(i=t.values,n=i.join(\" - \"),s.logger.debug(\"range-slide value = \"+n),null!=this.model.title&&this.$el.find(\"#\"+this.model.id).val(n),this.model.range=i,this.callbackWrapper)return this.callbackWrapper()},t}(u.InputWidgetView),i.RangeSlider=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"RangeSlider\",t.prototype.default_view=i.RangeSliderView,t.define({range:[a.Any,[.1,.9]],start:[a.Number,0],end:[a.Number,1],step:[a.Number,.1],orientation:[a.Orientation,\"horizontal\"],callback_throttle:[a.Number,200],callback_policy:[a.String,\"throttle\"]}),t}(u.InputWidget)},{\"./input_widget\":\"models/widgets/input_widget\",\"./slidertemplate\":\"models/widgets/slidertemplate\",\"core/logging\":void 0,\"core/properties\":void 0,\"core/util/callback\":void 0,\"jquery-ui/slider\":\"jquery-ui/slider\"}],\"models/widgets/selectbox\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"core/logging\"),s=e(\"core/properties\"),a=e(\"./input_widget\"),l=e(\"./selecttemplate\");i.SelectView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.template=l[\"default\"],t.prototype.events={\"change select\":\"change_input\"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.change,function(){return this.render()})},t.prototype.render=function(){var e;return t.__super__.render.call(this),this.$el.empty(),e=this.template(this.model.attributes),this.$el.html(e),this},t.prototype.change_input=function(){var e;return e=this.$el.find(\"select\").val(),r.logger.debug(\"selectbox: value = \"+e),this.model.value=e,t.__super__.change_input.call(this)},t}(a.InputWidgetView),i.Select=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Select\",t.prototype.default_view=i.SelectView,t.define({value:[s.String,\"\"],options:[s.Any,[]]}),t}(a.InputWidget)},{\"./input_widget\":\"models/widgets/input_widget\",\"./selecttemplate\":\"models/widgets/selecttemplate\",\"core/logging\":void 0,\"core/properties\":void 0}],\"models/widgets/selecttemplate\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=e(\"core/dom\"),o=e(\"core/util/types\");i[\"default\"]=function(e){return n.createElement(\"fragment\",null,n.createElement(\"label\",{\"for\":e.id},\" \",e.title,\" \"),n.createElement(\"select\",{\"class\":\"bk-widget-form-input\",id:e.id,name:e.name},e.options.map(function(t){var i,r;o.isString(t)?i=r=t:(i=t[0],r=t[1]);var s=e.value==i;return n.createElement(\"option\",{selected:s,value:i},r)})))}},{\"core/dom\":void 0,\"core/util/types\":void 0}],\"models/widgets/slider\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){return function(){return e.apply(t,arguments)}},o=function(e,t){function i(){this.constructor=e}for(var n in t)r.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},r={}.hasOwnProperty;e(\"jquery-ui/slider\");var s=e(\"core/logging\"),a=e(\"core/properties\"),l=e(\"core/util/callback\"),u=e(\"./input_widget\"),c=e(\"./slidertemplate\");i.SliderView=function(e){function t(){return this.slide=n(this.slide,this),this.slidestop=n(this.slidestop,this),t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.template=c[\"default\"],t.prototype.initialize=function(e){var i;return t.__super__.initialize.call(this,e),this.connect(this.model.change,function(){return this.render()}),this.$el.empty(),i=this.template(this.model.attributes),this.$el.html(i),this.callbackWrapper=null,\"continuous\"===this.model.callback_policy&&(this.callbackWrapper=function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0}),\"throttle\"===this.model.callback_policy&&this.model.callback&&(this.callbackWrapper=l.throttle(function(){var e;return null!=(e=this.model.callback)?e.execute(this.model):void 0},this.model.callback_throttle)),this.render()},t.prototype.render=function(){var e,i,n,o;return t.__super__.render.call(this),e=this.model.end,i=this.model.start,o=this.model.step||(e-i)/50,s.logger.debug(\"slider render: min, max, step = (\"+i+\", \"+e+\", \"+o+\")\"),n={orientation:this.model.orientation,animate:\"fast\",value:this.model.value,min:i,max:e,step:o,stop:this.slidestop,slide:this.slide},this.$el.find(\".slider\").slider(n),null!=this.model.title&&this.$el.find(\"#\"+this.model.id).val(this.$el.find(\".slider\").slider(\"value\")),this.$el.find(\".bk-slider-parent\").height(this.model.height),this._prefix_ui(),this},t.prototype.slidestop=function(e,t){var i;if(\"mouseup\"===this.model.callback_policy||\"throttle\"===this.model.callback_policy)return null!=(i=this.model.callback)?i.execute(this.model):void 0},t.prototype.slide=function(e,t){var i;if(i=t.value,s.logger.debug(\"slide value = \"+i),null!=this.model.title&&this.$el.find(\"#\"+this.model.id).val(t.value),this.model.value=i,this.callbackWrapper)return this.callbackWrapper()},t}(u.InputWidgetView),i.Slider=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t.prototype.type=\"Slider\",t.prototype.default_view=i.SliderView,t.define({value:[a.Number,.5],start:[a.Number,0],end:[a.Number,1],step:[a.Number,.1],orientation:[a.Orientation,\"horizontal\"],callback_throttle:[a.Number,200],callback_policy:[a.String,\"throttle\"]}),t}(u.InputWidget)},{\"./input_widget\":\"models/widgets/input_widget\",\"./slidertemplate\":\"models/widgets/slidertemplate\",\"core/logging\":void 0,\"core/properties\":void 0,\"core/util/callback\":void 0,\"jquery-ui/slider\":\"jquery-ui/slider\"}],\"models/widgets/slidertemplate\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=e(\"core/dom\");i[\"default\"]=function(e){var t,i;return null!=e.title&&(0!=e.title.length&&(t=n.createElement(\"label\",{\"for\":e.id},\" \",e.title,\": \")),i=n.createElement(\"input\",{type:\"text\",id:e.id,readonly:!0})),n.createElement(\"div\",{\"class\":\"bk-slider-parent\"},t,i,n.createElement(\"div\",{\"class\":\"bk-slider-\"+e.orientation},n.createElement(\"div\",{\"class\":\"slider\",id:e.id})))}},{\"core/dom\":void 0}],\"models/widgets/table_column\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./cell_formatters\"),s=e(\"./cell_editors\"),a=e(\"core/properties\"),l=e(\"core/util/string\"),u=e(\"../../model\");i.TableColumn=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"TableColumn\",t.prototype.default_view=null,t.define({field:[a.String],title:[a.String],width:[a.Number,300],formatter:[a.Instance,function(){return new r.StringFormatter}],editor:[a.Instance,function(){return new s.StringEditor}],sortable:[a.Bool,!0],default_sort:[a.String,\"ascending\"]}),t.prototype.toColumn=function(){var e;return{id:l.uniqueId(),field:this.field,name:this.title,width:this.width,formatter:null!=(e=this.formatter)?e.doFormat.bind(this.formatter):void 0,editor:this.editor,sortable:this.sortable,defaultSortAsc:\"ascending\"===this.default_sort}},t}(u.Model)},{\"../../model\":\"model\",\"./cell_editors\":\"models/widgets/cell_editors\",\"./cell_formatters\":\"models/widgets/cell_formatters\",\"core/properties\":void 0,\"core/util/string\":void 0}],\"models/widgets/table_widget\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"./widget\"),s=e(\"core/properties\");i.TableWidget=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"TableWidget\",t.define({source:[s.Instance]}),t}(r.Widget)},{\"./widget\":\"models/widgets/widget\",\"core/properties\":void 0}],\"models/widgets/tabs\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"jquery\");e(\"bootstrap/tab\");var s=e(\"core/properties\"),a=e(\"core/util/array\"),l=e(\"./tabs_template\"),u=e(\"./widget\");i.TabsView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){var e,i,n,s,u,c,d,h,p,f,m,g,v,_,y;t.__super__.render.call(this),f=this.child_views;for(i in f)o.call(f,i)&&(s=f[i],null!=(m=s.el.parentNode)&&m.removeChild(s.el));for(this.$el.empty(),_=this.model.tabs,n=this.model.active,u=this.model.children,c=r(l[\"default\"]({tabs:_,active_tab_id:_[n].id})),y=this,c.find(\".bk-bs-nav a\").click(function(e){var t,i,n;return e.preventDefault(),r(this).tab(\"show\"),t=r(this).attr(\"href\").replace(\"#tab-\",\"\"),_=y.model.tabs,i=a.findIndex(_,function(e){return e.id===t}),y.model.active=i,null!=(n=y.model.callback)?n.execute(y.model):void 0}),e=c.find(\".bk-bs-tab-pane\"),g=a.zip(u,e),d=0,h=g.length;d<h;d++)v=g[d],s=v[0],p=v[1],r(p).html(this.child_views[s.id].el);return this.$el.append(c),this},t}(u.WidgetView),i.Tabs=function(e){function t(){return t.__super__.constructor.apply(this,arguments);\n",
" }return n(t,e),t.prototype.type=\"Tabs\",t.prototype.default_view=i.TabsView,t.define({tabs:[s.Array,[]],active:[s.Number,0],callback:[s.Instance]}),t.getters({children:function(){var e,t,i,n,o;for(i=this.tabs,n=[],e=0,t=i.length;e<t;e++)o=i[e],n.push(o.child);return n}}),t.prototype.get_layoutable_children=function(){return this.children},t.prototype.get_edit_variables=function(){var e,i,n,o,r;for(i=t.__super__.get_edit_variables.call(this),r=this.get_layoutable_children(),n=0,o=r.length;n<o;n++)e=r[n],i=i.concat(e.get_edit_variables());return i},t.prototype.get_constraints=function(){var e,i,n,o,r;for(i=t.__super__.get_constraints.call(this),r=this.get_layoutable_children(),n=0,o=r.length;n<o;n++)e=r[n],i=i.concat(e.get_constraints());return i},t}(u.Widget)},{\"./tabs_template\":\"models/widgets/tabs_template\",\"./widget\":\"models/widgets/widget\",\"bootstrap/tab\":\"bootstrap/tab\",\"core/properties\":void 0,\"core/util/array\":void 0,jquery:\"jquery\"}],\"models/widgets/tabs_template\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=e(\"core/dom\");i[\"default\"]=function(e){var t=function(t){return t.id===e.active_tab_id?\"bk-bs-active\":null};return n.createElement(\"fragment\",null,n.createElement(\"ul\",{\"class\":\"bk-bs-nav bk-bs-nav-tabs\"},e.tabs.map(function(e){return n.createElement(\"li\",{\"class\":t(e)},n.createElement(\"a\",{href:\"#tab-\"+e.id},e.title))})),n.createElement(\"div\",{\"class\":\"bk-bs-tab-content\"},e.tabs.map(function(e){return n.createElement(\"div\",{\"class\":[\"bk-bs-tab-pane\",t(e)],id:\"tab-\"+e.id})})))}},{\"core/dom\":void 0}],\"models/widgets/text_input\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"core/logging\"),s=e(\"core/properties\"),a=e(\"./input_widget\"),l=e(\"./text_input_template\");i.TextInputView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.className=\"bk-widget-form-group\",t.prototype.template=l[\"default\"],t.prototype.events={\"change input\":\"change_input\"},t.prototype.initialize=function(e){return t.__super__.initialize.call(this,e),this.render(),this.connect(this.model.change,function(){return this.render()})},t.prototype.render=function(){return t.__super__.render.call(this),this.$el.html(this.template(this.model.attributes)),this.model.height&&this.$el.find(\"input\").height(this.model.height-35),this},t.prototype.change_input=function(){var e;return e=this.$el.find(\"input\").val(),r.logger.debug(\"widget/text_input: value = \"+e),this.model.value=e,t.__super__.change_input.call(this)},t}(a.InputWidgetView),i.TextInput=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"TextInput\",t.prototype.default_view=i.TextInputView,t.define({value:[s.String,\"\"],placeholder:[s.String,\"\"]}),t}(a.InputWidget)},{\"./input_widget\":\"models/widgets/input_widget\",\"./text_input_template\":\"models/widgets/text_input_template\",\"core/logging\":void 0,\"core/properties\":void 0}],\"models/widgets/text_input_template\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=e(\"core/dom\");i[\"default\"]=function(e){return n.createElement(\"fragment\",null,n.createElement(\"label\",{\"for\":e.id},\" \",e.title,\" \"),n.createElement(\"input\",{\"class\":\"bk-widget-form-input\",type:\"text\",id:e.id,name:e.name,value:e.value,placeholder:e.placeholder}))}},{\"core/dom\":void 0}],\"models/widgets/toggle\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"core/properties\"),s=e(\"./abstract_button\");i.ToggleView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.render=function(){return t.__super__.render.call(this),this.buttonEl.addEventListener(\"click\",function(e){return function(){return e.change_input()}}(this)),this.model.active&&this.buttonEl.classList.add(\"bk-bs-active\"),this},t.prototype.change_input=function(){return this.model.active=!this.model.active,t.__super__.change_input.call(this)},t}(s.AbstractButtonView),i.Toggle=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Toggle\",t.prototype.default_view=i.ToggleView,t.define({active:[r.Bool,!1]}),t.override({label:\"Toggle\"}),t}(s.AbstractButton)},{\"./abstract_button\":\"models/widgets/abstract_button\",\"core/properties\":void 0}],\"models/widgets/widget\":[function(e,t,i){\"use strict\";Object.defineProperty(i,\"__esModule\",{value:!0});var n=function(e,t){function i(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},o={}.hasOwnProperty,r=e(\"../layouts/layout_dom\"),s=e(\"./jqueryable\");i.WidgetView=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),n(t.prototype,s.JQueryable),t.prototype.className=\"bk-widget\",t.prototype.render=function(){if(this._render_classes(),this.model.height&&this.$el.height(this.model.height),this.model.width)return this.$el.width(this.model.width)},t}(r.LayoutDOMView),i.Widget=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return n(t,e),t.prototype.type=\"Widget\",t.prototype.default_view=i.WidgetView,t}(r.LayoutDOM)},{\"../layouts/layout_dom\":\"models/layouts/layout_dom\",\"./jqueryable\":\"models/widgets/jqueryable\"}],\"jquery-mousewheel\":[function(e,t,i){/*!\n",
" * jQuery Mousewheel 3.1.13\n",
" *\n",
" * Copyright jQuery Foundation and other contributors\n",
" * Released under the MIT license\n",
" * http://jquery.org/license\n",
" */\n",
" !function(e){\"function\"==typeof define&&define.amd?define([\"jquery\"],e):\"object\"==typeof i?t.exports=e:e(jQuery)}(function(e){function t(t){var s=t||window.event,a=l.call(arguments,1),u=0,d=0,h=0,p=0,f=0,m=0;if(t=e.event.fix(s),t.type=\"mousewheel\",\"detail\"in s&&(h=s.detail*-1),\"wheelDelta\"in s&&(h=s.wheelDelta),\"wheelDeltaY\"in s&&(h=s.wheelDeltaY),\"wheelDeltaX\"in s&&(d=s.wheelDeltaX*-1),\"axis\"in s&&s.axis===s.HORIZONTAL_AXIS&&(d=h*-1,h=0),u=0===h?d:h,\"deltaY\"in s&&(h=s.deltaY*-1,u=h),\"deltaX\"in s&&(d=s.deltaX,0===h&&(u=d*-1)),0!==h||0!==d){if(1===s.deltaMode){var g=e.data(this,\"mousewheel-line-height\");u*=g,h*=g,d*=g}else if(2===s.deltaMode){var v=e.data(this,\"mousewheel-page-height\");u*=v,h*=v,d*=v}if(p=Math.max(Math.abs(h),Math.abs(d)),(!r||p<r)&&(r=p,n(s,p)&&(r/=40)),n(s,p)&&(u/=40,d/=40,h/=40),u=Math[u>=1?\"floor\":\"ceil\"](u/r),d=Math[d>=1?\"floor\":\"ceil\"](d/r),h=Math[h>=1?\"floor\":\"ceil\"](h/r),c.settings.normalizeOffset&&this.getBoundingClientRect){var _=this.getBoundingClientRect();f=t.clientX-_.left,m=t.clientY-_.top}return t.deltaX=d,t.deltaY=h,t.deltaFactor=r,t.offsetX=f,t.offsetY=m,t.deltaMode=0,a.unshift(t,u,d,h),o&&clearTimeout(o),o=setTimeout(i,200),(e.event.dispatch||e.event.handle).apply(this,a)}}function i(){r=null}function n(e,t){return c.settings.adjustOldDeltas&&\"mousewheel\"===e.type&&t%120===0}var o,r,s=[\"wheel\",\"mousewheel\",\"DOMMouseScroll\",\"MozMousePixelScroll\"],a=\"onwheel\"in document||document.documentMode>=9?[\"wheel\"]:[\"mousewheel\",\"DomMouseScroll\",\"MozMousePixelScroll\"],l=Array.prototype.slice;if(e.event.fixHooks)for(var u=s.length;u;)e.event.fixHooks[s[--u]]=e.event.mouseHooks;var c=e.event.special.mousewheel={version:\"3.1.12\",setup:function(){if(this.addEventListener)for(var i=a.length;i;)this.addEventListener(a[--i],t,!1);else this.onmousewheel=t;e.data(this,\"mousewheel-line-height\",c.getLineHeight(this)),e.data(this,\"mousewheel-page-height\",c.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=a.length;i;)this.removeEventListener(a[--i],t,!1);else this.onmousewheel=null;e.removeData(this,\"mousewheel-line-height\"),e.removeData(this,\"mousewheel-page-height\")},getLineHeight:function(t){var i=e(t),n=i[\"offsetParent\"in e.fn?\"offsetParent\":\"parent\"]();return n.length||(n=e(\"body\")),parseInt(n.css(\"fontSize\"),10)||parseInt(i.css(\"fontSize\"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};e.fn.extend({mousewheel:function(e){return e?this.bind(\"mousewheel\",e):this.trigger(\"mousewheel\")},unmousewheel:function(e){return this.unbind(\"mousewheel\",e)}})})},{}],\"jquery-ui/autocomplete\":[function(e,t,i){var n=e(\"jquery\");e(\"./core\"),e(\"./widget\"),e(\"./position\"),e(\"./menu\"),/*!\n",
" * jQuery UI Autocomplete 1.10.4\n",
" * http://jqueryui.com\n",
" *\n",
" * Copyright 2014 jQuery Foundation and other contributors\n",
" * Released under the MIT license.\n",
" * http://jquery.org/license\n",
" *\n",
" * http://api.jqueryui.com/autocomplete/\n",
" *\n",
" * Depends:\n",
" *\tjquery.ui.core.js\n",
" *\tjquery.ui.widget.js\n",
" *\tjquery.ui.position.js\n",
" *\tjquery.ui.menu.js\n",
" */\n",
" function(e,t){e.widget(\"ui.autocomplete\",{version:\"1.10.4\",defaultElement:\"<input>\",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:\"left top\",at:\"left bottom\",collision:\"none\"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,n,o=this.element[0].nodeName.toLowerCase(),r=\"textarea\"===o,s=\"input\"===o;this.isMultiLine=!!r||!s&&this.element.prop(\"isContentEditable\"),this.valueMethod=this.element[r||s?\"val\":\"text\"],this.isNewMenu=!0,this.element.addClass(\"ui-autocomplete-input\").attr(\"autocomplete\",\"off\"),this._on(this.element,{keydown:function(o){if(this.element.prop(\"readOnly\"))return t=!0,n=!0,void(i=!0);t=!1,n=!1,i=!1;var r=e.ui.keyCode;switch(o.keyCode){case r.PAGE_UP:t=!0,this._move(\"previousPage\",o);break;case r.PAGE_DOWN:t=!0,this._move(\"nextPage\",o);break;case r.UP:t=!0,this._keyEvent(\"previous\",o);break;case r.DOWN:t=!0,this._keyEvent(\"next\",o);break;case r.ENTER:case r.NUMPAD_ENTER:this.menu.active&&(t=!0,o.preventDefault(),this.menu.select(o));break;case r.TAB:this.menu.active&&this.menu.select(o);break;case r.ESCAPE:this.menu.element.is(\":visible\")&&(this._value(this.term),this.close(o),o.preventDefault());break;default:i=!0,this._searchTimeout(o)}},keypress:function(n){if(t)return t=!1,void(this.isMultiLine&&!this.menu.element.is(\":visible\")||n.preventDefault());if(!i){var o=e.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:this._move(\"previousPage\",n);break;case o.PAGE_DOWN:this._move(\"nextPage\",n);break;case o.UP:this._keyEvent(\"previous\",n);break;case o.DOWN:this._keyEvent(\"next\",n)}}},input:function(e){return n?(n=!1,void e.preventDefault()):void this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),void this._change(e))}}),this._initSource(),this.menu=e(\"<ul>\").addClass(\"ui-autocomplete ui-front\").appendTo(this._appendTo()).menu({role:null}).hide().data(\"ui-menu\"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(\".ui-menu-item\").length||this._delay(function(){var t=this;this.document.one(\"mousedown\",function(n){n.target===t.element[0]||n.target===i||e.contains(i,n.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one(\"mousemove\",function(){e(t.target).trigger(t.originalEvent)});var n=i.item.data(\"ui-autocomplete-item\");!1!==this._trigger(\"focus\",t,{item:n})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value):this.liveRegion.text(n.value)},menuselect:function(e,t){var i=t.item.data(\"ui-autocomplete-item\"),n=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=i})),!1!==this._trigger(\"select\",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e(\"<span>\",{role:\"status\",\"aria-live\":\"polite\"}).addClass(\"ui-helper-hidden-accessible\").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr(\"autocomplete\")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass(\"ui-autocomplete-input\").removeAttr(\"autocomplete\"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),\"source\"===e&&this._initSource(),\"appendTo\"===e&&this.menu.element.appendTo(this._appendTo()),\"disabled\"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(\".ui-front\")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,n=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,n){n(e.ui.autocomplete.filter(t,i.term))}):\"string\"==typeof this.options.source?(i=this.options.source,this.source=function(t,o){n.xhr&&n.xhr.abort(),n.xhr=e.ajax({url:i,data:t,dataType:\"json\",success:function(e){o(e)},error:function(){o([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger(\"search\",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass(\"ui-autocomplete-loading\"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass(\"ui-autocomplete-loading\")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger(\"response\",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger(\"open\")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(\":visible\")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger(\"close\",e))},_change:function(e){this.previous!==this._value()&&this._trigger(\"change\",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return\"string\"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width(\"\").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var n=this;e.each(i,function(e,i){n._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data(\"ui-autocomplete-item\",t)},_renderItem:function(t,i){return e(\"<li>\").append(e(\"<a>\").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(\":visible\")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),void this.menu.blur()):void this.menu[e](t):void this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(\":visible\")||(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")},filter:function(t,i){var n=new RegExp(e.ui.autocomplete.escapeRegex(i),\"i\");return e.grep(t,function(e){return n.test(e.label||e.value||e)})}}),e.widget(\"ui.autocomplete\",e.ui.autocomplete,{options:{messages:{noResults:\"No search results.\",results:function(e){return e+(e>1?\" results are\":\" result is\")+\" available, use up and down arrow keys to navigate.\"}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})}(n)},{\"./core\":\"jquery-ui/core\",\"./menu\":\"jquery-ui/menu\",\"./position\":\"jquery-ui/position\",\"./widget\":\"jquery-ui/widget\",jquery:\"jquery\"}],\"jquery-ui/button\":[function(e,t,i){var n=e(\"jquery\");e(\"./core\"),e(\"./widget\"),/*!\n",
" * jQuery UI Button 1.10.4\n",
" * http://jqueryui.com\n",
" *\n",
" * Copyright 2014 jQuery Foundation and other contributors\n",
" * Released under the MIT license.\n",
" * http://jquery.org/license\n",
" *\n",
" * http://api.jqueryui.com/button/\n",
" *\n",
" * Depends:\n",
" *\tjquery.ui.core.js\n",
" *\tjquery.ui.widget.js\n",
" */\n",
" function(e,t){var i,n=\"ui-button ui-widget ui-state-default ui-corner-all\",o=\"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",r=function(){var t=e(this);setTimeout(function(){t.find(\":ui-button\").button(\"refresh\")},1)},s=function(t){var i=t.name,n=t.form,o=e([]);return i&&(i=i.replace(/'/g,\"\\\\'\"),o=n?e(n).find(\"[name='\"+i+\"']\"):e(\"[name='\"+i+\"']\",t.ownerDocument).filter(function(){return!this.form})),o};e.widget(\"ui.button\",{version:\"1.10.4\",defaultElement:\"<button>\",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest(\"form\").unbind(\"reset\"+this.eventNamespace).bind(\"reset\"+this.eventNamespace,r),\"boolean\"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop(\"disabled\"):this.element.prop(\"disabled\",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr(\"title\");var t=this,o=this.options,a=\"checkbox\"===this.type||\"radio\"===this.type,l=a?\"\":\"ui-state-active\";null===o.label&&(o.label=\"input\"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(n).attr(\"role\",\"button\").bind(\"mouseenter\"+this.eventNamespace,function(){o.disabled||this===i&&e(this).addClass(\"ui-state-active\")}).bind(\"mouseleave\"+this.eventNamespace,function(){o.disabled||e(this).removeClass(l)}).bind(\"click\"+this.eventNamespace,function(e){o.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass(\"ui-state-focus\")},blur:function(){this.buttonElement.removeClass(\"ui-state-focus\")}}),a&&this.element.bind(\"change\"+this.eventNamespace,function(){t.refresh()}),\"checkbox\"===this.type?this.buttonElement.bind(\"click\"+this.eventNamespace,function(){if(o.disabled)return!1}):\"radio\"===this.type?this.buttonElement.bind(\"click\"+this.eventNamespace,function(){if(o.disabled)return!1;e(this).addClass(\"ui-state-active\"),t.buttonElement.attr(\"aria-pressed\",\"true\");var i=t.element[0];s(i).not(i).map(function(){return e(this).button(\"widget\")[0]}).removeClass(\"ui-state-active\").attr(\"aria-pressed\",\"false\")}):(this.buttonElement.bind(\"mousedown\"+this.eventNamespace,function(){return!o.disabled&&(e(this).addClass(\"ui-state-active\"),i=this,void t.document.one(\"mouseup\",function(){i=null}))}).bind(\"mouseup\"+this.eventNamespace,function(){return!o.disabled&&void e(this).removeClass(\"ui-state-active\")}).bind(\"keydown\"+this.eventNamespace,function(t){return!o.disabled&&void(t.keyCode!==e.ui.keyCode.SPACE&&t.keyCode!==e.ui.keyCode.ENTER||e(this).addClass(\"ui-state-active\"))}).bind(\"keyup\"+this.eventNamespace+\" blur\"+this.eventNamespace,function(){e(this).removeClass(\"ui-state-active\")}),this.buttonElement.is(\"a\")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption(\"disabled\",o.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.element.is(\"[type=checkbox]\")?this.type=\"checkbox\":this.element.is(\"[type=radio]\")?this.type=\"radio\":this.element.is(\"input\")?this.type=\"input\":this.type=\"button\",\"checkbox\"===this.type||\"radio\"===this.type?(e=this.element.parents().last(),t=\"label[for='\"+this.element.attr(\"id\")+\"']\",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass(\"ui-helper-hidden-accessible\"),i=this.element.is(\":checked\"),i&&this.buttonElement.addClass(\"ui-state-active\"),this.buttonElement.prop(\"aria-pressed\",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass(\"ui-helper-hidden-accessible\"),this.buttonElement.removeClass(n+\" ui-state-active \"+o).removeAttr(\"role\").removeAttr(\"aria-pressed\").html(this.buttonElement.find(\".ui-button-text\").html()),this.hasTitle||this.buttonElement.removeAttr(\"title\")},_setOption:function(e,t){return this._super(e,t),\"disabled\"===e?(this.element.prop(\"disabled\",!!t),void(t&&this.buttonElement.removeClass(\"ui-state-focus\"))):void this._resetButton()},refresh:function(){var t=this.element.is(\"input, button\")?this.element.is(\":disabled\"):this.element.hasClass(\"ui-button-disabled\");t!==this.options.disabled&&this._setOption(\"disabled\",t),\"radio\"===this.type?s(this.element[0]).each(function(){e(this).is(\":checked\")?e(this).button(\"widget\").addClass(\"ui-state-active\").attr(\"aria-pressed\",\"true\"):e(this).button(\"widget\").removeClass(\"ui-state-active\").attr(\"aria-pressed\",\"false\")}):\"checkbox\"===this.type&&(this.element.is(\":checked\")?this.buttonElement.addClass(\"ui-state-active\").attr(\"aria-pressed\",\"true\"):this.buttonElement.removeClass(\"ui-state-active\").attr(\"aria-pressed\",\"false\"))},_resetButton:function(){if(\"input\"===this.type)return void(this.options.label&&this.element.val(this.options.label));var t=this.buttonElement.removeClass(o),i=e(\"<span></span>\",this.document[0]).addClass(\"ui-button-text\").html(this.options.label).appendTo(t.empty()).text(),n=this.options.icons,r=n.primary&&n.secondary,s=[];n.primary||n.secondary?(this.options.text&&s.push(\"ui-button-text-icon\"+(r?\"s\":n.primary?\"-primary\":\"-secondary\")),n.primary&&t.prepend(\"<span class='ui-button-icon-primary ui-icon \"+n.primary+\"'></span>\"),n.secondary&&t.append(\"<span class='ui-button-icon-secondary ui-icon \"+n.secondary+\"'></span>\"),this.options.text||(s.push(r?\"ui-button-icons-only\":\"ui-button-icon-only\"),this.hasTitle||t.attr(\"title\",e.trim(i)))):s.push(\"ui-button-text-only\"),t.addClass(s.join(\" \"))}}),e.widget(\"ui.buttonset\",{version:\"1.10.4\",options:{items:\"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)\"},_create:function(){this.element.addClass(\"ui-buttonset\")},_init:function(){this.refresh()},_setOption:function(e,t){\"disabled\"===e&&this.buttons.button(\"option\",e,t),this._super(e,t)},refresh:function(){var t=\"rtl\"===this.element.css(\"direction\");this.buttons=this.element.find(this.options.items).filter(\":ui-button\").button(\"refresh\").end().not(\":ui-button\").button().end().map(function(){return e(this).button(\"widget\")[0]}).removeClass(\"ui-corner-all ui-corner-left ui-corner-right\").filter(\":first\").addClass(t?\"ui-corner-right\":\"ui-corner-left\").end().filter(\":last\").addClass(t?\"ui-corner-left\":\"ui-corner-right\").end().end()},_destroy:function(){this.element.removeClass(\"ui-buttonset\"),this.buttons.map(function(){return e(this).button(\"widget\")[0]}).removeClass(\"ui-corner-left ui-corner-right\").end().button(\"destroy\")}})}(n)},{\"./core\":\"jquery-ui/core\",\"./widget\":\"jquery-ui/widget\",jquery:\"jquery\"}],\"jquery-ui/core\":[function(e,t,i){var n=e(\"jquery\");/*!\n",
" * jQuery UI Core 1.10.4\n",
" * http://jqueryui.com\n",
" *\n",
" * Copyright 2014 jQuery Foundation and other contributors\n",
" * Released under the MIT license.\n",
" * http://jquery.org/license\n",
" *\n",
" * http://api.jqueryui.com/category/ui-core/\n",
" */\n",
" !function(e,t){function i(t,i){var o,r,s,a=t.nodeName.toLowerCase();return\"area\"===a?(o=t.parentNode,r=o.name,!(!t.href||!r||\"map\"!==o.nodeName.toLowerCase())&&(s=e(\"img[usemap=#\"+r+\"]\")[0],!!s&&n(s))):(/input|select|textarea|button|object/.test(a)?!t.disabled:\"a\"===a?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return\"hidden\"===e.css(this,\"visibility\")}).length}var o=0,r=/^ui-id-\\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:\"1.10.4\",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return\"number\"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css(\"position\"))||/absolute/.test(this.css(\"position\"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,\"position\"))&&/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,\"overflow\")+e.css(this,\"overflow-y\")+e.css(this,\"overflow-x\"))}).eq(0),/fixed/.test(this.css(\"position\"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css(\"zIndex\",i);if(this.length)for(var n,o,r=e(this[0]);r.length&&r[0]!==document;){if(n=r.css(\"position\"),(\"absolute\"===n||\"relative\"===n||\"fixed\"===n)&&(o=parseInt(r.css(\"zIndex\"),10),!isNaN(o)&&0!==o))return o;r=r.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id=\"ui-id-\"+ ++o)})},removeUniqueId:function(){return this.each(function(){r.test(this.id)&&e(this).removeAttr(\"id\")})}}),e.extend(e.expr[\":\"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,\"tabindex\")))},tabbable:function(t){var n=e.attr(t,\"tabindex\"),o=isNaN(n);return(o||n>=0)&&i(t,!o)}}),e(\"<a>\").outerWidth(1).jquery||e.each([\"Width\",\"Height\"],function(i,n){function o(t,i,n,o){return e.each(r,function(){i-=parseFloat(e.css(t,\"padding\"+this))||0,n&&(i-=parseFloat(e.css(t,\"border\"+this+\"Width\"))||0),o&&(i-=parseFloat(e.css(t,\"margin\"+this))||0)}),i}var r=\"Width\"===n?[\"Left\",\"Right\"]:[\"Top\",\"Bottom\"],s=n.toLowerCase(),a={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn[\"inner\"+n]=function(i){return i===t?a[\"inner\"+n].call(this):this.each(function(){e(this).css(s,o(this,i)+\"px\")})},e.fn[\"outer\"+n]=function(t,i){return\"number\"!=typeof t?a[\"outer\"+n].call(this,t):this.each(function(){e(this).css(s,o(this,t,!0,i)+\"px\")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e(\"<a>\").data(\"a-b\",\"a\").removeData(\"a-b\").data(\"a-b\")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart=\"onselectstart\"in document.createElement(\"div\"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?\"selectstart\":\"mousedown\")+\".ui-disableSelection\",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(\".ui-disableSelection\")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var o,r=e.ui[t].prototype;for(o in n)r.plugins[o]=r.plugins[o]||[],r.plugins[o].push([i,n[o]])},call:function(e,t,i){var n,o=e.plugins[t];if(o&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;n<o.length;n++)e.options[o[n][0]]&&o[n][1].apply(e.element,i)}},hasScroll:function(t,i){if(\"hidden\"===e(t).css(\"overflow\"))return!1;var n=i&&\"left\"===i?\"scrollLeft\":\"scrollTop\",o=!1;return t[n]>0||(t[n]=1,o=t[n]>0,t[n]=0,o)}})}(n)},{jquery:\"jquery\"}],\"jquery-ui/datepicker\":[function(e,t,i){var n=e(\"jquery\");e(\"./core\"),/*!\n",
" * jQuery UI Datepicker 1.10.4\n",
" * http://jqueryui.com\n",
" *\n",
" * Copyright 2014 jQuery Foundation and other contributors\n",
" * Released under the MIT license.\n",
" * http://jquery.org/license\n",
" *\n",
" * http://api.jqueryui.com/datepicker/\n",
" *\n",
" * Depends:\n",
" *\tjquery.ui.core.js\n",
" */\n",
" function(e,t){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId=\"ui-datepicker-div\",this._inlineClass=\"ui-datepicker-inline\",this._appendClass=\"ui-datepicker-append\",this._triggerClass=\"ui-datepicker-trigger\",this._dialogClass=\"ui-datepicker-dialog\",this._disableClass=\"ui-datepicker-disabled\",this._unselectableClass=\"ui-datepicker-unselectable\",this._currentClass=\"ui-datepicker-current-day\",this._dayOverClass=\"ui-datepicker-days-cell-over\",this.regional=[],this.regional[\"\"]={closeText:\"Done\",prevText:\"Prev\",nextText:\"Next\",currentText:\"Today\",monthNames:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],monthNamesShort:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dayNames:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],dayNamesShort:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dayNamesMin:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],weekHeader:\"Wk\",dateFormat:\"mm/dd/yy\",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:\"\"},this._defaults={showOn:\"focus\",showAnim:\"fadeIn\",showOptions:{},defaultDate:null,appendText:\"\",buttonText:\"...\",buttonImage:\"\",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:\"c-10:c+10\",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:\"+10\",minDate:null,maxDate:null,duration:\"fast\",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:\"\",altFormat:\"\",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[\"\"]),this.dpDiv=n(e(\"<div id='\"+this._mainDivId+\"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"))}function n(t){var i=\"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";return t.delegate(i,\"mouseout\",function(){e(this).removeClass(\"ui-state-hover\"),this.className.indexOf(\"ui-datepicker-prev\")!==-1&&e(this).removeClass(\"ui-datepicker-prev-hover\"),this.className.indexOf(\"ui-datepicker-next\")!==-1&&e(this).removeClass(\"ui-datepicker-next-hover\")}).delegate(i,\"mouseover\",function(){e.datepicker._isDisabledDatepicker(r.inline?t.parent()[0]:r.input[0])||(e(this).parents(\".ui-datepicker-calendar\").find(\"a\").removeClass(\"ui-state-hover\"),e(this).addClass(\"ui-state-hover\"),this.className.indexOf(\"ui-datepicker-prev\")!==-1&&e(this).addClass(\"ui-datepicker-prev-hover\"),this.className.indexOf(\"ui-datepicker-next\")!==-1&&e(this).addClass(\"ui-datepicker-next-hover\"))})}function o(t,i){e.extend(t,i);for(var n in i)null==i[n]&&(t[n]=i[n]);return t}e.extend(e.ui,{datepicker:{version:\"1.10.4\"}});var r,s=\"datepicker\";e.extend(i.prototype,{markerClassName:\"hasDatepicker\",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return o(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var n,o,r;n=t.nodeName.toLowerCase(),o=\"div\"===n||\"span\"===n,t.id||(this.uuid+=1,t.id=\"dp\"+this.uuid),r=this._newInst(e(t),o),r.settings=e.extend({},i||{}),\"input\"===n?this._connectDatepicker(t,r):o&&this._inlineDatepicker(t,r)},_newInst:function(t,i){var o=t[0].id.replace(/([^A-Za-z0-9_\\-])/g,\"\\\\\\\\$1\");return{id:o,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?n(e(\"<div class='\"+this._inlineClass+\" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\")):this.dpDiv}},_connectDatepicker:function(t,i){var n=e(t);i.append=e([]),i.trigger=e([]),n.hasClass(this.markerClassName)||(this._attachments(n,i),n.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,s,i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var n,o,r,s=this._get(i,\"appendText\"),a=this._get(i,\"isRTL\");i.append&&i.append.remove(),s&&(i.append=e(\"<span class='\"+this._appendClass+\"'>\"+s+\"</span>\"),t[a?\"before\":\"after\"](i.append)),t.unbind(\"focus\",this._showDatepicker),i.trigger&&i.trigger.remove(),n=this._get(i,\"showOn\"),\"focus\"!==n&&\"both\"!==n||t.focus(this._showDatepicker),\"button\"!==n&&\"both\"!==n||(o=this._get(i,\"buttonText\"),r=this._get(i,\"buttonImage\"),i.trigger=e(this._get(i,\"buttonImageOnly\")?e(\"<img/>\").addClass(this._triggerClass).attr({src:r,alt:o,title:o}):e(\"<button type='button'></button>\").addClass(this._triggerClass).html(r?e(\"<img/>\").attr({src:r,alt:o,title:o}):o)),t[a?\"before\":\"after\"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,\"autoSize\")&&!e.inline){var t,i,n,o,r=new Date(2009,11,20),s=this._get(e,\"dateFormat\");s.match(/[DM]/)&&(t=function(e){for(i=0,n=0,o=0;o<e.length;o++)e[o].length>i&&(i=e[o].length,n=o);return n},r.setMonth(t(this._get(e,s.match(/MM/)?\"monthNames\":\"monthNamesShort\"))),r.setDate(t(this._get(e,s.match(/DD/)?\"dayNames\":\"dayNamesShort\"))+20-r.getDay())),e.input.attr(\"size\",this._formatDate(e,r).length)}},_inlineDatepicker:function(t,i){var n=e(t);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(i.dpDiv),e.data(t,s,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css(\"display\",\"block\"))},_dialogDatepicker:function(t,i,n,r,a){var l,u,c,d,h,p=this._dialogInst;return p||(this.uuid+=1,l=\"dp\"+this.uuid,this._dialogInput=e(\"<input type='text' id='\"+l+\"' style='position: absolute; top: -100px; width: 0px;'/>\"),this._dialogInput.keydown(this._doKeyDown),e(\"body\").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],s,p)),o(p.settings,r||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(u=document.documentElement.clientWidth,c=document.documentElement.clientHeight,d=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[u/2-100+d,c/2-150+h]),this._dialogInput.css(\"left\",this._pos[0]+20+\"px\").css(\"top\",this._pos[1]+\"px\"),p.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],s,p),this},_destroyDatepicker:function(t){var i,n=e(t),o=e.data(t,s);n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,s),\"input\"===i?(o.append.remove(),o.trigger.remove(),n.removeClass(this.markerClassName).unbind(\"focus\",this._showDatepicker).unbind(\"keydown\",this._doKeyDown).unbind(\"keypress\",this._doKeyPress).unbind(\"keyup\",this._doKeyUp)):\"div\"!==i&&\"span\"!==i||n.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,n,o=e(t),r=e.data(t,s);o.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),\"input\"===i?(t.disabled=!1,r.trigger.filter(\"button\").each(function(){this.disabled=!1}).end().filter(\"img\").css({opacity:\"1.0\",cursor:\"\"})):\"div\"!==i&&\"span\"!==i||(n=o.children(\".\"+this._inlineClass),n.children().removeClass(\"ui-state-disabled\"),n.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,n,o=e(t),r=e.data(t,s);o.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),\"input\"===i?(t.disabled=!0,r.trigger.filter(\"button\").each(function(){this.disabled=!0}).end().filter(\"img\").css({opacity:\"0.5\",cursor:\"default\"})):\"div\"!==i&&\"span\"!==i||(n=o.children(\".\"+this._inlineClass),n.children().addClass(\"ui-state-disabled\"),n.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,s)}catch(i){throw\"Missing instance data for this datepicker\"}},_optionDatepicker:function(i,n,r){var s,a,l,u,c=this._getInst(i);return 2===arguments.length&&\"string\"==typeof n?\"defaults\"===n?e.extend({},e.datepicker._defaults):c?\"all\"===n?e.extend({},c.settings):this._get(c,n):null:(s=n||{},\"string\"==typeof n&&(s={},s[n]=r),void(c&&(this._curInst===c&&this._hideDatepicker(),a=this._getDateDatepicker(i,!0),l=this._getMinMaxDate(c,\"min\"),u=this._getMinMaxDate(c,\"max\"),o(c.settings,s),null!==l&&s.dateFormat!==t&&s.minDate===t&&(c.settings.minDate=this._formatDate(c,l)),null!==u&&s.dateFormat!==t&&s.maxDate===t&&(c.settings.maxDate=this._formatDate(c,u)),\"disabled\"in s&&(s.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),c),this._autoSize(c),this._setDate(c,a),this._updateAlternate(c),this._updateDatepicker(c))))},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,n,o,r=e.datepicker._getInst(t.target),s=!0,a=r.dpDiv.is(\".ui-datepicker-rtl\");if(r._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),s=!1;break;case 13:return o=e(\"td.\"+e.datepicker._dayOverClass+\":not(.\"+e.datepicker._currentClass+\")\",r.dpDiv),o[0]&&e.datepicker._selectDay(t.target,r.selectedMonth,r.selectedYear,o[0]),i=e.datepicker._get(r,\"onSelect\"),i?(n=e.datepicker._formatDate(r),i.apply(r.input?r.input[0]:null,[n,r])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,\"stepBigMonths\"):-e.datepicker._get(r,\"stepMonths\"),\"M\");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,\"stepBigMonths\"):+e.datepicker._get(r,\"stepMonths\"),\"M\");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),s=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),s=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?1:-1,\"D\"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(r,\"stepBigMonths\"):-e.datepicker._get(r,\"stepMonths\"),\"M\");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,\"D\"),s=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,a?-1:1,\"D\"),s=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(r,\"stepBigMonths\"):+e.datepicker._get(r,\"stepMonths\"),\"M\");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,\"D\"),s=t.ctrlKey||t.metaKey;break;default:s=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):s=!1;s&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,n,o=e.datepicker._getInst(t.target);if(e.datepicker._get(o,\"constrainInput\"))return i=e.datepicker._possibleChars(e.datepicker._get(o,\"dateFormat\")),n=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||n<\" \"||!i||i.indexOf(n)>-1},_doKeyUp:function(t){var i,n=e.datepicker._getInst(t.target);if(n.input.val()!==n.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(n,\"dateFormat\"),n.input?n.input.val():null,e.datepicker._getFormatConfig(n)),i&&(e.datepicker._setDateFromField(n),e.datepicker._updateAlternate(n),e.datepicker._updateDatepicker(n))}catch(o){}return!0},_showDatepicker:function(t){if(t=t.target||t,\"input\"!==t.nodeName.toLowerCase()&&(t=e(\"input\",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,r,s,a,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,\"beforeShow\"),r=n?n.apply(t,[t,i]):{},r!==!1&&(o(i.settings,r),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=\"\"),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),s=!1,e(t).parents().each(function(){return s|=\"fixed\"===e(this).css(\"position\"),!s}),a={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:\"absolute\",display:\"block\",top:\"-1000px\"}),e.datepicker._updateDatepicker(i),a=e.datepicker._checkOffset(i,a,s),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?\"static\":s?\"fixed\":\"absolute\",display:\"none\",left:a.left+\"px\",top:a.top+\"px\"}),i.inline||(l=e.datepicker._get(i,\"showAnim\"),u=e.datepicker._get(i,\"duration\"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,\"showOptions\"),u):i.dpDiv[l||\"show\"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,r=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find(\".\"+this._dayOverClass+\" a\").mouseover();var i,n=this._getNumberOfMonths(t),o=n[1],s=17;t.dpDiv.removeClass(\"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\").width(\"\"),o>1&&t.dpDiv.addClass(\"ui-datepicker-multi-\"+o).css(\"width\",s*o+\"em\"),t.dpDiv[(1!==n[0]||1!==n[1]?\"add\":\"remove\")+\"Class\"](\"ui-datepicker-multi\"),t.dpDiv[(this._get(t,\"isRTL\")?\"add\":\"remove\")+\"Class\"](\"ui-datepicker-rtl\"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find(\"select.ui-datepicker-year:first\").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(\":visible\")&&!e.input.is(\":disabled\")&&!e.input.is(\":focus\")},_checkOffset:function(t,i,n){var o=t.dpDiv.outerWidth(),r=t.dpDiv.outerHeight(),s=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,l=document.documentElement.clientWidth+(n?0:e(document).scrollLeft()),u=document.documentElement.clientHeight+(n?0:e(document).scrollTop());return i.left-=this._get(t,\"isRTL\")?o-s:0,i.left-=n&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=n&&i.top===t.input.offset().top+a?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+o>l&&l>o?Math.abs(i.left+o-l):0),i.top-=Math.min(i.top,i.top+r>u&&u>r?Math.abs(r+a):0),i},_findPos:function(t){for(var i,n=this._getInst(t),o=this._get(n,\"isRTL\");t&&(\"hidden\"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[o?\"previousSibling\":\"nextSibling\"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,n,o,r,a=this._curInst;!a||t&&a!==e.data(t,s)||this._datepickerShowing&&(i=this._get(a,\"showAnim\"),n=this._get(a,\"duration\"),o=function(){e.datepicker._tidyDialog(a)},e.effects&&(e.effects.effect[i]||e.effects[i])?a.dpDiv.hide(i,e.datepicker._get(a,\"showOptions\"),n,o):a.dpDiv[\"slideDown\"===i?\"slideUp\":\"fadeIn\"===i?\"fadeOut\":\"hide\"](i?n:null,o),i||o(),this._datepickerShowing=!1,r=this._get(a,\"onClose\"),r&&r.apply(a.input?a.input[0]:null,[a.input?a.input.val():\"\",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:\"absolute\",left:\"0\",top:\"-100px\"}),e.blockUI&&(e.unblockUI(),e(\"body\").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(\".ui-datepicker-calendar\")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),n=e.datepicker._getInst(i[0]);(i[0].id===e.datepicker._mainDivId||0!==i.parents(\"#\"+e.datepicker._mainDivId).length||i.hasClass(e.datepicker.markerClassName)||i.closest(\".\"+e.datepicker._triggerClass).length||!e.datepicker._datepickerShowing||e.datepicker._inDialog&&e.blockUI)&&(!i.hasClass(e.datepicker.markerClassName)||e.datepicker._curInst===n)||e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,n){var o=e(t),r=this._getInst(o[0]);this._isDisabledDatepicker(o[0])||(this._adjustInstDate(r,i+(\"M\"===n?this._get(r,\"showCurrentAtPos\"):0),n),this._updateDatepicker(r))},_gotoToday:function(t){var i,n=e(t),o=this._getInst(n[0]);this._get(o,\"gotoCurrent\")&&o.currentDay?(o.selectedDay=o.currentDay,o.drawMonth=o.selectedMonth=o.currentMonth,o.drawYear=o.selectedYear=o.currentYear):(i=new Date,o.selectedDay=i.getDate(),o.drawMonth=o.selectedMonth=i.getMonth(),o.drawYear=o.selectedYear=i.getFullYear()),this._notifyChange(o),this._adjustDate(n)},_selectMonthYear:function(t,i,n){var o=e(t),r=this._getInst(o[0]);r[\"selected\"+(\"M\"===n?\"Month\":\"Year\")]=r[\"draw\"+(\"M\"===n?\"Month\":\"Year\")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(r),this._adjustDate(o)},_selectDay:function(t,i,n,o){var r,s=e(t);e(o).hasClass(this._unselectableClass)||this._isDisabledDatepicker(s[0])||(r=this._getInst(s[0]),r.selectedDay=r.currentDay=e(\"a\",o).html(),r.selectedMonth=r.currentMonth=i,r.selectedYear=r.currentYear=n,this._selectDate(t,this._formatDate(r,r.currentDay,r.currentMonth,r.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,\"\")},_selectDate:function(t,i){var n,o=e(t),r=this._getInst(o[0]);i=null!=i?i:this._formatDate(r),r.input&&r.input.val(i),this._updateAlternate(r),n=this._get(r,\"onSelect\"),n?n.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger(\"change\"),r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],\"object\"!=typeof r.input[0]&&r.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,n,o,r=this._get(t,\"altField\");r&&(i=this._get(t,\"altFormat\")||this._get(t,\"dateFormat\"),n=this._getDate(t),o=this.formatDate(i,n,this._getFormatConfig(t)),e(r).each(function(){e(this).val(o)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&t<6,\"\"]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,n){if(null==t||null==i)throw\"Invalid arguments\";if(i=\"object\"==typeof i?i.toString():i+\"\",\"\"===i)return null;var o,r,s,a,l=0,u=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,c=\"string\"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,h=(n?n.dayNames:null)||this._defaults.dayNames,p=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,f=(n?n.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,_=-1,y=!1,b=function(e){var i=o+1<t.length&&t.charAt(o+1)===e;return i&&o++,i},w=function(e){var t=b(e),n=\"@\"===e?14:\"!\"===e?20:\"y\"===e&&t?4:\"o\"===e?3:2,o=new RegExp(\"^\\\\d{1,\"+n+\"}\"),r=i.substring(l).match(o);if(!r)throw\"Missing number at position \"+l;return l+=r[0].length,parseInt(r[0],10)},C=function(t,n,o){var r=-1,s=e.map(b(t)?o:n,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(s,function(e,t){var n=t[1];if(i.substr(l,n.length).toLowerCase()===n.toLowerCase())return r=t[0],l+=n.length,!1}),r!==-1)return r+1;throw\"Unknown name at position \"+l},k=function(){if(i.charAt(l)!==t.charAt(o))throw\"Unexpected literal at position \"+l;l++};for(o=0;o<t.length;o++)if(y)\"'\"!==t.charAt(o)||b(\"'\")?k():y=!1;else switch(t.charAt(o)){case\"d\":v=w(\"d\");break;case\"D\":C(\"D\",d,h);break;case\"o\":_=w(\"o\");break;case\"m\":g=w(\"m\");break;case\"M\":g=C(\"M\",p,f);break;case\"y\":m=w(\"y\");break;case\"@\":a=new Date(w(\"@\")),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case\"!\":a=new Date((w(\"!\")-this._ticksTo1970)/1e4),m=a.getFullYear(),g=a.getMonth()+1,v=a.getDate();break;case\"'\":b(\"'\")?k():y=!0;break;default:k()}if(l<i.length&&(s=i.substr(l),!/^\\s+/.test(s)))throw\"Extra/unparsed characters found in date: \"+s;if(m===-1?m=(new Date).getFullYear():m<100&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(m<=c?0:-100)),_>-1)for(g=1,v=_;;){if(r=this._getDaysInMonth(m,g-1),v<=r)break;g++,v-=r}if(a=this._daylightSavingAdjust(new Date(m,g-1,v)),a.getFullYear()!==m||a.getMonth()+1!==g||a.getDate()!==v)throw\"Invalid date\";return a},ATOM:\"yy-mm-dd\",COOKIE:\"D, dd M yy\",ISO_8601:\"yy-mm-dd\",RFC_822:\"D, d M y\",RFC_850:\"DD, dd-M-y\",RFC_1036:\"D, d M y\",RFC_1123:\"D, d M yy\",RFC_2822:\"D, d M yy\",RSS:\"D, d M y\",TICKS:\"!\",TIMESTAMP:\"@\",W3C:\"yy-mm-dd\",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(e,t,i){if(!t)return\"\";var n,o=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,r=(i?i.dayNames:null)||this._defaults.dayNames,s=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,l=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},u=function(e,t,i){var n=\"\"+t;if(l(e))for(;n.length<i;)n=\"0\"+n;return n},c=function(e,t,i,n){return l(e)?n[t]:i[t]},d=\"\",h=!1;if(t)for(n=0;n<e.length;n++)if(h)\"'\"!==e.charAt(n)||l(\"'\")?d+=e.charAt(n):h=!1;else switch(e.charAt(n)){case\"d\":d+=u(\"d\",t.getDate(),2);break;case\"D\":d+=c(\"D\",t.getDay(),o,r);break;case\"o\":d+=u(\"o\",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case\"m\":d+=u(\"m\",t.getMonth()+1,2);break;case\"M\":d+=c(\"M\",t.getMonth(),s,a);break;case\"y\":d+=l(\"y\")?t.getFullYear():(t.getYear()%100<10?\"0\":\"\")+t.getYear()%100;break;case\"@\":d+=t.getTime();break;case\"!\":d+=1e4*t.getTime()+this._ticksTo1970;break;case\"'\":l(\"'\")?d+=\"'\":h=!0;break;default:d+=e.charAt(n)}return d},_possibleChars:function(e){var t,i=\"\",n=!1,o=function(i){var n=t+1<e.length&&e.charAt(t+1)===i;return n&&t++,n};for(t=0;t<e.length;t++)if(n)\"'\"!==e.charAt(t)||o(\"'\")?i+=e.charAt(t):n=!1;else switch(e.charAt(t)){case\"d\":case\"m\":case\"y\":case\"@\":i+=\"0123456789\";break;case\"D\":case\"M\":return null;case\"'\":o(\"'\")?i+=\"'\":n=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,\"dateFormat\"),n=e.lastVal=e.input?e.input.val():null,o=this._getDefaultDate(e),r=o,s=this._getFormatConfig(e);try{r=this.parseDate(i,n,s)||o}catch(a){n=t?\"\":n}e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),e.currentDay=n?r.getDate():0,e.currentMonth=n?r.getMonth():0,e.currentYear=n?r.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,\"defaultDate\"),new Date))},_determineDate:function(t,i,n){var o=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},r=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,\"dateFormat\"),i,e.datepicker._getFormatConfig(t))}catch(n){}for(var o=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,r=o.getFullYear(),s=o.getMonth(),a=o.getDate(),l=/([+\\-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g,u=l.exec(i);u;){switch(u[2]||\"d\"){case\"d\":case\"D\":a+=parseInt(u[1],10);break;case\"w\":case\"W\":a+=7*parseInt(u[1],10);break;case\"m\":case\"M\":s+=parseInt(u[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(r,s));break;case\"y\":case\"Y\":r+=parseInt(u[1],10),a=Math.min(a,e.datepicker._getDaysInMonth(r,s))}u=l.exec(i)}return new Date(r,s,a)},s=null==i||\"\"===i?n:\"string\"==typeof i?r(i):\"number\"==typeof i?isNaN(i)?n:o(i):new Date(i.getTime());return s=s&&\"Invalid Date\"===s.toString()?n:s,s&&(s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0)),this._daylightSavingAdjust(s)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var n=!t,o=e.selectedMonth,r=e.selectedYear,s=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=s.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=s.getMonth(),e.drawYear=e.selectedYear=e.currentYear=s.getFullYear(),o===e.selectedMonth&&r===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(n?\"\":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&\"\"===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,\"stepMonths\"),n=\"#\"+t.id.replace(/\\\\\\\\/g,\"\\\\\");t.dpDiv.find(\"[data-handler]\").map(function(){var t={prev:function(){e.datepicker._adjustDate(n,-i,\"M\")},next:function(){e.datepicker._adjustDate(n,+i,\"M\")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(n)},selectDay:function(){return e.datepicker._selectDay(n,+this.getAttribute(\"data-month\"),+this.getAttribute(\"data-year\"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(n,this,\"M\"),!1},selectYear:function(){return e.datepicker._selectMonthYear(n,this,\"Y\"),!1}};e(this).bind(this.getAttribute(\"data-event\"),t[this.getAttribute(\"data-handler\")])})},_generateHTML:function(e){var t,i,n,o,r,s,a,l,u,c,d,h,p,f,m,g,v,_,y,b,w,C,k,x,D,S,E,T,M,P,R,A,I,N,j,L,H,O,W,$=new Date,F=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth(),$.getDate())),q=this._get(e,\"isRTL\"),V=this._get(e,\"showButtonPanel\"),B=this._get(e,\"hideIfNoPrevNext\"),z=this._get(e,\"navigationAsDateFormat\"),Y=this._getNumberOfMonths(e),X=this._get(e,\"showCurrentAtPos\"),U=this._get(e,\"stepMonths\"),K=1!==Y[0]||1!==Y[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(e,\"min\"),J=this._getMinMaxDate(e,\"max\"),Z=e.drawMonth-X,ee=e.drawYear;if(Z<0&&(Z+=12,ee--),J)for(t=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-Y[0]*Y[1]+1,J.getDate())),t=Q&&t<Q?Q:t;this._daylightSavingAdjust(new Date(ee,Z,1))>t;)Z--,Z<0&&(Z=11,ee--);for(e.drawMonth=Z,e.drawYear=ee,i=this._get(e,\"prevText\"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,Z-U,1)),this._getFormatConfig(e)):i,n=this._canAdjustMonth(e,-1,ee,Z)?\"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='\"+i+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(q?\"e\":\"w\")+\"'>\"+i+\"</span></a>\":B?\"\":\"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='\"+i+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(q?\"e\":\"w\")+\"'>\"+i+\"</span></a>\",o=this._get(e,\"nextText\"),o=z?this.formatDate(o,this._daylightSavingAdjust(new Date(ee,Z+U,1)),this._getFormatConfig(e)):o,r=this._canAdjustMonth(e,1,ee,Z)?\"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='\"+o+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(q?\"w\":\"e\")+\"'>\"+o+\"</span></a>\":B?\"\":\"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='\"+o+\"'><span class='ui-icon ui-icon-circle-triangle-\"+(q?\"w\":\"e\")+\"'>\"+o+\"</span></a>\",s=this._get(e,\"currentText\"),a=this._get(e,\"gotoCurrent\")&&e.currentDay?G:F,s=z?this.formatDate(s,a,this._getFormatConfig(e)):s,l=e.inline?\"\":\"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>\"+this._get(e,\"closeText\")+\"</button>\",u=V?\"<div class='ui-datepicker-buttonpane ui-widget-content'>\"+(q?l:\"\")+(this._isInRange(e,a)?\"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>\"+s+\"</button>\":\"\")+(q?\"\":l)+\"</div>\":\"\",c=parseInt(this._get(e,\"firstDay\"),10),c=isNaN(c)?0:c,d=this._get(e,\"showWeek\"),h=this._get(e,\"dayNames\"),p=this._get(e,\"dayNamesMin\"),f=this._get(e,\"monthNames\"),m=this._get(e,\"monthNamesShort\"),g=this._get(e,\"beforeShowDay\"),v=this._get(e,\"showOtherMonths\"),_=this._get(e,\"selectOtherMonths\"),y=this._getDefaultDate(e),b=\"\",C=0;C<Y[0];C++){for(k=\"\",this.maxRows=4,x=0;x<Y[1];x++){if(D=this._daylightSavingAdjust(new Date(ee,Z,e.selectedDay)),S=\" ui-corner-all\",E=\"\",K){if(E+=\"<div class='ui-datepicker-group\",Y[1]>1)switch(x){case 0:E+=\" ui-datepicker-group-first\",S=\" ui-corner-\"+(q?\"right\":\"left\");break;case Y[1]-1:E+=\" ui-datepicker-group-last\",S=\" ui-corner-\"+(q?\"left\":\"right\");break;default:E+=\" ui-datepicker-group-middle\",S=\"\"}E+=\"'>\"}for(E+=\"<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix\"+S+\"'>\"+(/all|left/.test(S)&&0===C?q?r:n:\"\")+(/all|right/.test(S)&&0===C?q?n:r:\"\")+this._generateMonthYearHeader(e,Z,ee,Q,J,C>0||x>0,f,m)+\"</div><table class='ui-datepicker-calendar'><thead><tr>\",T=d?\"<th class='ui-datepicker-week-col'>\"+this._get(e,\"weekHeader\")+\"</th>\":\"\",w=0;w<7;w++)M=(w+c)%7,T+=\"<th\"+((w+c+6)%7>=5?\" class='ui-datepicker-week-end'\":\"\")+\"><span title='\"+h[M]+\"'>\"+p[M]+\"</span></th>\";for(E+=T+\"</tr></thead><tbody>\",P=this._getDaysInMonth(ee,Z),ee===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,P)),R=(this._getFirstDayOfMonth(ee,Z)-c+7)%7,A=Math.ceil((R+P)/7),I=K&&this.maxRows>A?this.maxRows:A,this.maxRows=I,N=this._daylightSavingAdjust(new Date(ee,Z,1-R)),j=0;j<I;j++){for(E+=\"<tr>\",L=d?\"<td class='ui-datepicker-week-col'>\"+this._get(e,\"calculateWeek\")(N)+\"</td>\":\"\",w=0;w<7;w++)H=g?g.apply(e.input?e.input[0]:null,[N]):[!0,\"\"],O=N.getMonth()!==Z,W=O&&!_||!H[0]||Q&&N<Q||J&&N>J,L+=\"<td class='\"+((w+c+6)%7>=5?\" ui-datepicker-week-end\":\"\")+(O?\" ui-datepicker-other-month\":\"\")+(N.getTime()===D.getTime()&&Z===e.selectedMonth&&e._keyEvent||y.getTime()===N.getTime()&&y.getTime()===D.getTime()?\" \"+this._dayOverClass:\"\")+(W?\" \"+this._unselectableClass+\" ui-state-disabled\":\"\")+(O&&!v?\"\":\" \"+H[1]+(N.getTime()===G.getTime()?\" \"+this._currentClass:\"\")+(N.getTime()===F.getTime()?\" ui-datepicker-today\":\"\"))+\"'\"+(O&&!v||!H[2]?\"\":\" title='\"+H[2].replace(/'/g,\"&#39;\")+\"'\")+(W?\"\":\" data-handler='selectDay' data-event='click' data-month='\"+N.getMonth()+\"' data-year='\"+N.getFullYear()+\"'\")+\">\"+(O&&!v?\"&#xa0;\":W?\"<span class='ui-state-default'>\"+N.getDate()+\"</span>\":\"<a class='ui-state-default\"+(N.getTime()===F.getTime()?\" ui-state-highlight\":\"\")+(N.getTime()===G.getTime()?\" ui-state-active\":\"\")+(O?\" ui-priority-secondary\":\"\")+\"' href='#'>\"+N.getDate()+\"</a>\")+\"</td>\",N.setDate(N.getDate()+1),N=this._daylightSavingAdjust(N);E+=L+\"</tr>\"}Z++,Z>11&&(Z=0,ee++),E+=\"</tbody></table>\"+(K?\"</div>\"+(Y[0]>0&&x===Y[1]-1?\"<div class='ui-datepicker-row-break'></div>\":\"\"):\"\"),k+=E}b+=k}return b+=u,e._keyEvent=!1,b},_generateMonthYearHeader:function(e,t,i,n,o,r,s,a){var l,u,c,d,h,p,f,m,g=this._get(e,\"changeMonth\"),v=this._get(e,\"changeYear\"),_=this._get(e,\"showMonthAfterYear\"),y=\"<div class='ui-datepicker-title'>\",b=\"\";if(r||!g)b+=\"<span class='ui-datepicker-month'>\"+s[t]+\"</span>\";else{for(l=n&&n.getFullYear()===i,u=o&&o.getFullYear()===i,b+=\"<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>\",c=0;c<12;c++)(!l||c>=n.getMonth())&&(!u||c<=o.getMonth())&&(b+=\"<option value='\"+c+\"'\"+(c===t?\" selected='selected'\":\"\")+\">\"+a[c]+\"</option>\");b+=\"</select>\"}if(_||(y+=b+(!r&&g&&v?\"\":\"&#xa0;\")),!e.yearshtml)if(e.yearshtml=\"\",r||!v)y+=\"<span class='ui-datepicker-year'>\"+i+\"</span>\";else{for(d=this._get(e,\"yearRange\").split(\":\"),h=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\\-].*/)?h+parseInt(e,10):parseInt(e,10);\n",
" return isNaN(t)?h:t},f=p(d[0]),m=Math.max(f,p(d[1]||\"\")),f=n?Math.max(f,n.getFullYear()):f,m=o?Math.min(m,o.getFullYear()):m,e.yearshtml+=\"<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>\";f<=m;f++)e.yearshtml+=\"<option value='\"+f+\"'\"+(f===i?\" selected='selected'\":\"\")+\">\"+f+\"</option>\";e.yearshtml+=\"</select>\",y+=e.yearshtml,e.yearshtml=null}return y+=this._get(e,\"yearSuffix\"),_&&(y+=(!r&&g&&v?\"\":\"&#xa0;\")+b),y+=\"</div>\"},_adjustInstDate:function(e,t,i){var n=e.drawYear+(\"Y\"===i?t:0),o=e.drawMonth+(\"M\"===i?t:0),r=Math.min(e.selectedDay,this._getDaysInMonth(n,o))+(\"D\"===i?t:0),s=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(n,o,r)));e.selectedDay=s.getDate(),e.drawMonth=e.selectedMonth=s.getMonth(),e.drawYear=e.selectedYear=s.getFullYear(),\"M\"!==i&&\"Y\"!==i||this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,\"min\"),n=this._getMinMaxDate(e,\"max\"),o=i&&t<i?i:t;return n&&o>n?n:o},_notifyChange:function(e){var t=this._get(e,\"onChangeMonthYear\");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,\"numberOfMonths\");return null==t?[1,1]:\"number\"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+\"Date\"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,n){var o=this._getNumberOfMonths(e),r=this._daylightSavingAdjust(new Date(i,n+(t<0?t:o[0]*o[1]),1));return t<0&&r.setDate(this._getDaysInMonth(r.getFullYear(),r.getMonth())),this._isInRange(e,r)},_isInRange:function(e,t){var i,n,o=this._getMinMaxDate(e,\"min\"),r=this._getMinMaxDate(e,\"max\"),s=null,a=null,l=this._get(e,\"yearRange\");return l&&(i=l.split(\":\"),n=(new Date).getFullYear(),s=parseInt(i[0],10),a=parseInt(i[1],10),i[0].match(/[+\\-].*/)&&(s+=n),i[1].match(/[+\\-].*/)&&(a+=n)),(!o||t.getTime()>=o.getTime())&&(!r||t.getTime()<=r.getTime())&&(!s||t.getFullYear()>=s)&&(!a||t.getFullYear()<=a)},_getFormatConfig:function(e){var t=this._get(e,\"shortYearCutoff\");return t=\"string\"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,\"dayNamesShort\"),dayNames:this._get(e,\"dayNames\"),monthNamesShort:this._get(e,\"monthNamesShort\"),monthNames:this._get(e,\"monthNames\")}},_formatDate:function(e,t,i,n){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var o=t?\"object\"==typeof t?t:this._daylightSavingAdjust(new Date(n,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,\"dateFormat\"),o,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e(\"#\"+e.datepicker._mainDivId).length&&e(\"body\").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return\"string\"!=typeof t||\"isDisabled\"!==t&&\"getDate\"!==t&&\"widget\"!==t?\"option\"===t&&2===arguments.length&&\"string\"==typeof arguments[1]?e.datepicker[\"_\"+t+\"Datepicker\"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){\"string\"==typeof t?e.datepicker[\"_\"+t+\"Datepicker\"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker[\"_\"+t+\"Datepicker\"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version=\"1.10.4\"}(n)},{\"./core\":\"jquery-ui/core\",jquery:\"jquery\"}],\"jquery-ui/menu\":[function(e,t,i){var n=e(\"jquery\");e(\"./core\"),e(\"./widget\"),e(\"./position\"),/*!\n",
" * jQuery UI Menu 1.10.4\n",
" * http://jqueryui.com\n",
" *\n",
" * Copyright 2014 jQuery Foundation and other contributors\n",
" * Released under the MIT license.\n",
" * http://jquery.org/license\n",
" *\n",
" * http://api.jqueryui.com/menu/\n",
" *\n",
" * Depends:\n",
" *\tjquery.ui.core.js\n",
" *\tjquery.ui.widget.js\n",
" *\tjquery.ui.position.js\n",
" */\n",
" function(e,t){e.widget(\"ui.menu\",{version:\"1.10.4\",defaultElement:\"<ul>\",delay:300,options:{icons:{submenu:\"ui-icon-carat-1-e\"},menus:\"ul\",position:{my:\"left top\",at:\"right top\"},role:\"menu\",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass(\"ui-menu ui-widget ui-widget-content ui-corner-all\").toggleClass(\"ui-menu-icons\",!!this.element.find(\".ui-icon\").length).attr({role:this.options.role,tabIndex:0}).bind(\"click\"+this.eventNamespace,e.proxy(function(e){this.options.disabled&&e.preventDefault()},this)),this.options.disabled&&this.element.addClass(\"ui-state-disabled\").attr(\"aria-disabled\",\"true\"),this._on({\"mousedown .ui-menu-item > a\":function(e){e.preventDefault()},\"click .ui-state-disabled > a\":function(e){e.preventDefault()},\"click .ui-menu-item:has(a)\":function(t){var i=e(t.target).closest(\".ui-menu-item\");!this.mouseHandled&&i.not(\".ui-state-disabled\").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(\".ui-menu\").length?this.expand(t):!this.element.is(\":focus\")&&e(this.document[0].activeElement).closest(\".ui-menu\").length&&(this.element.trigger(\"focus\",[!0]),this.active&&1===this.active.parents(\".ui-menu\").length&&clearTimeout(this.timer)))},\"mouseenter .ui-menu-item\":function(t){var i=e(t.currentTarget);i.siblings().children(\".ui-state-active\").removeClass(\"ui-state-active\"),this.focus(t,i)},mouseleave:\"collapseAll\",\"mouseleave .ui-menu\":\"collapseAll\",focus:function(e,t){var i=this.active||this.element.children(\".ui-menu-item\").eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:\"_keydown\"}),this.refresh(),this._on(this.document,{click:function(t){e(t.target).closest(\".ui-menu\").length||this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr(\"aria-activedescendant\").find(\".ui-menu\").addBack().removeClass(\"ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons\").removeAttr(\"role\").removeAttr(\"tabIndex\").removeAttr(\"aria-labelledby\").removeAttr(\"aria-expanded\").removeAttr(\"aria-hidden\").removeAttr(\"aria-disabled\").removeUniqueId().show(),this.element.find(\".ui-menu-item\").removeClass(\"ui-menu-item\").removeAttr(\"role\").removeAttr(\"aria-disabled\").children(\"a\").removeUniqueId().removeClass(\"ui-corner-all ui-state-hover\").removeAttr(\"tabIndex\").removeAttr(\"role\").removeAttr(\"aria-haspopup\").children().each(function(){var t=e(this);t.data(\"ui-menu-submenu-carat\")&&t.remove()}),this.element.find(\".ui-menu-divider\").removeClass(\"ui-menu-divider ui-widget-content\")},_keydown:function(t){function i(e){return e.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g,\"\\\\$&\")}var n,o,r,s,a,l=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move(\"first\",\"first\",t);break;case e.ui.keyCode.END:this._move(\"last\",\"last\",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(\".ui-state-disabled\")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:l=!1,o=this.previousFilter||\"\",r=String.fromCharCode(t.keyCode),s=!1,clearTimeout(this.filterTimer),r===o?s=!0:r=o+r,a=new RegExp(\"^\"+i(r),\"i\"),n=this.activeMenu.children(\".ui-menu-item\").filter(function(){return a.test(e(this).children(\"a\").text())}),n=s&&n.index(this.active.next())!==-1?this.active.nextAll(\".ui-menu-item\"):n,n.length||(r=String.fromCharCode(t.keyCode),a=new RegExp(\"^\"+i(r),\"i\"),n=this.activeMenu.children(\".ui-menu-item\").filter(function(){return a.test(e(this).children(\"a\").text())})),n.length?(this.focus(t,n),n.length>1?(this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&t.preventDefault()},_activate:function(e){this.active.is(\".ui-state-disabled\")||(this.active.children(\"a[aria-haspopup='true']\").length?this.expand(e):this.select(e))},refresh:function(){var t,i=this.options.icons.submenu,n=this.element.find(this.options.menus);this.element.toggleClass(\"ui-menu-icons\",!!this.element.find(\".ui-icon\").length),n.filter(\":not(.ui-menu)\").addClass(\"ui-menu ui-widget ui-widget-content ui-corner-all\").hide().attr({role:this.options.role,\"aria-hidden\":\"true\",\"aria-expanded\":\"false\"}).each(function(){var t=e(this),n=t.prev(\"a\"),o=e(\"<span>\").addClass(\"ui-menu-icon ui-icon \"+i).data(\"ui-menu-submenu-carat\",!0);n.attr(\"aria-haspopup\",\"true\").prepend(o),t.attr(\"aria-labelledby\",n.attr(\"id\"))}),t=n.add(this.element),t.children(\":not(.ui-menu-item):has(a)\").addClass(\"ui-menu-item\").attr(\"role\",\"presentation\").children(\"a\").uniqueId().addClass(\"ui-corner-all\").attr({tabIndex:-1,role:this._itemRole()}),t.children(\":not(.ui-menu-item)\").each(function(){var t=e(this);/[^\\-\\u2014\\u2013\\s]/.test(t.text())||t.addClass(\"ui-widget-content ui-menu-divider\")}),t.children(\".ui-state-disabled\").attr(\"aria-disabled\",\"true\"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:\"menuitem\",listbox:\"option\"}[this.options.role]},_setOption:function(e,t){\"icons\"===e&&this.element.find(\".ui-menu-icon\").removeClass(this.options.icons.submenu).addClass(t.submenu),this._super(e,t)},focus:function(e,t){var i,n;this.blur(e,e&&\"focus\"===e.type),this._scrollIntoView(t),this.active=t.first(),n=this.active.children(\"a\").addClass(\"ui-state-focus\"),this.options.role&&this.element.attr(\"aria-activedescendant\",n.attr(\"id\")),this.active.parent().closest(\".ui-menu-item\").children(\"a:first\").addClass(\"ui-state-active\"),e&&\"keydown\"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(\".ui-menu\"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger(\"focus\",e,{item:t})},_scrollIntoView:function(t){var i,n,o,r,s,a;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],\"borderTopWidth\"))||0,n=parseFloat(e.css(this.activeMenu[0],\"paddingTop\"))||0,o=t.offset().top-this.activeMenu.offset().top-i-n,r=this.activeMenu.scrollTop(),s=this.activeMenu.height(),a=t.height(),o<0?this.activeMenu.scrollTop(r+o):o+a>s&&this.activeMenu.scrollTop(r+o-s+a))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.children(\"a\").removeClass(\"ui-state-focus\"),this.active=null,this._trigger(\"blur\",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),\"true\"===e.attr(\"aria-hidden\")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(\".ui-menu\").not(t.parents(\".ui-menu\")).hide().attr(\"aria-hidden\",\"true\"),t.show().removeAttr(\"aria-hidden\").attr(\"aria-expanded\",\"true\").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var n=i?this.element:e(t&&t.target).closest(this.element.find(\".ui-menu\"));n.length||(n=this.element),this._close(n),this.blur(t),this.activeMenu=n},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(\".ui-menu\").hide().attr(\"aria-hidden\",\"true\").attr(\"aria-expanded\",\"false\").end().find(\"a.ui-state-active\").removeClass(\"ui-state-active\")},collapse:function(e){var t=this.active&&this.active.parent().closest(\".ui-menu-item\",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(\".ui-menu \").children(\".ui-menu-item\").first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move(\"next\",\"first\",e)},previous:function(e){this._move(\"prev\",\"last\",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(\".ui-menu-item\").length},isLastItem:function(){return this.active&&!this.active.nextAll(\".ui-menu-item\").length},_move:function(e,t,i){var n;this.active&&(n=\"first\"===e||\"last\"===e?this.active[\"first\"===e?\"prevAll\":\"nextAll\"](\".ui-menu-item\").eq(-1):this.active[e+\"All\"](\".ui-menu-item\").eq(0)),n&&n.length&&this.active||(n=this.activeMenu.children(\".ui-menu-item\")[t]()),this.focus(i,n)},nextPage:function(t){var i,n,o;return this.active?void(this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.nextAll(\".ui-menu-item\").each(function(){return i=e(this),i.offset().top-n-o<0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(\".ui-menu-item\")[this.active?\"last\":\"first\"]()))):void this.next(t)},previousPage:function(t){var i,n,o;return this.active?void(this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,o=this.element.height(),this.active.prevAll(\".ui-menu-item\").each(function(){return i=e(this),i.offset().top-n+o>0}),this.focus(t,i)):this.focus(t,this.activeMenu.children(\".ui-menu-item\").first()))):void this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop(\"scrollHeight\")},select:function(t){this.active=this.active||e(t.target).closest(\".ui-menu-item\");var i={item:this.active};this.active.has(\".ui-menu\").length||this.collapseAll(t,!0),this._trigger(\"select\",t,i)}})}(n)},{\"./core\":\"jquery-ui/core\",\"./position\":\"jquery-ui/position\",\"./widget\":\"jquery-ui/widget\",jquery:\"jquery\"}],\"jquery-ui/mouse\":[function(e,t,i){var n=e(\"jquery\");e(\"./widget\"),/*!\n",
" * jQuery UI Mouse 1.10.4\n",
" * http://jqueryui.com\n",
" *\n",
" * Copyright 2014 jQuery Foundation and other contributors\n",
" * Released under the MIT license.\n",
" * http://jquery.org/license\n",
" *\n",
" * http://api.jqueryui.com/mouse/\n",
" *\n",
" * Depends:\n",
" *\tjquery.ui.widget.js\n",
" */\n",
" function(e,t){var i=!1;e(document).mouseup(function(){i=!1}),e.widget(\"ui.mouse\",{version:\"1.10.4\",options:{cancel:\"input,textarea,button,select,option\",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind(\"mousedown.\"+this.widgetName,function(e){return t._mouseDown(e)}).bind(\"click.\"+this.widgetName,function(i){if(!0===e.data(i.target,t.widgetName+\".preventClickEvent\"))return e.removeData(i.target,t.widgetName+\".preventClickEvent\"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind(\".\"+this.widgetName),this._mouseMoveDelegate&&e(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!i){this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var n=this,o=1===t.which,r=!(\"string\"!=typeof this.options.cancel||!t.target.nodeName)&&e(t.target).closest(this.options.cancel).length;return!(o&&!r&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){n.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+\".preventClickEvent\")&&e.removeData(t.target,this.widgetName+\".preventClickEvent\"),this._mouseMoveDelegate=function(e){return n._mouseMove(e)},this._mouseUpDelegate=function(e){return n._mouseUp(e)},e(document).bind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).bind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),t.preventDefault(),i=!0,!0))}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind(\"mousemove.\"+this.widgetName,this._mouseMoveDelegate).unbind(\"mouseup.\"+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+\".preventClickEvent\",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(n)},{\"./widget\":\"jquery-ui/widget\",jquery:\"jquery\"}],\"jquery-ui/position\":[function(e,t,i){var n=e(\"jquery\");/*!\n",
" * jQuery UI Position 1.10.4\n",
" * http://jqueryui.com\n",
" *\n",
" * Copyright 2014 jQuery Foundation and other contributors\n",
" * Released under the MIT license.\n",
" * http://jquery.org/license\n",
" *\n",
" * http://api.jqueryui.com/position/\n",
" */\n",
" !function(e,t){function i(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function n(t,i){return parseInt(e.css(t,i),10)||0}function o(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var r,s=Math.max,a=Math.abs,l=Math.round,u=/left|center|right/,c=/top|center|bottom/,d=/[\\+\\-]\\d+(\\.[\\d]+)?%?/,h=/^\\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(r!==t)return r;var i,n,o=e(\"<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>\"),s=o.children()[0];return e(\"body\").append(o),i=s.offsetWidth,o.css(\"overflow\",\"scroll\"),n=s.offsetWidth,i===n&&(n=o[0].clientWidth),o.remove(),r=i-n},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?\"\":t.element.css(\"overflow-x\"),n=t.isWindow||t.isDocument?\"\":t.element.css(\"overflow-y\"),o=\"scroll\"===i||\"auto\"===i&&t.width<t.element[0].scrollWidth,r=\"scroll\"===n||\"auto\"===n&&t.height<t.element[0].scrollHeight;return{width:r?e.position.scrollbarWidth():0,height:o?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),n=e.isWindow(i[0]),o=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:n,isDocument:o,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:n?i.width():i.outerWidth(),height:n?i.height():i.outerHeight()}}},e.fn.position=function(t){if(!t||!t.of)return f.apply(this,arguments);t=e.extend({},t);var r,p,m,g,v,_,y=e(t.of),b=e.position.getWithinInfo(t.within),w=e.position.getScrollInfo(b),C=(t.collision||\"flip\").split(\" \"),k={};return _=o(y),y[0].preventDefault&&(t.at=\"left top\"),p=_.width,m=_.height,g=_.offset,v=e.extend({},g),e.each([\"my\",\"at\"],function(){var e,i,n=(t[this]||\"\").split(\" \");1===n.length&&(n=u.test(n[0])?n.concat([\"center\"]):c.test(n[0])?[\"center\"].concat(n):[\"center\",\"center\"]),n[0]=u.test(n[0])?n[0]:\"center\",n[1]=c.test(n[1])?n[1]:\"center\",e=d.exec(n[0]),i=d.exec(n[1]),k[this]=[e?e[0]:0,i?i[0]:0],t[this]=[h.exec(n[0])[0],h.exec(n[1])[0]]}),1===C.length&&(C[1]=C[0]),\"right\"===t.at[0]?v.left+=p:\"center\"===t.at[0]&&(v.left+=p/2),\"bottom\"===t.at[1]?v.top+=m:\"center\"===t.at[1]&&(v.top+=m/2),r=i(k.at,p,m),v.left+=r[0],v.top+=r[1],this.each(function(){var o,u,c=e(this),d=c.outerWidth(),h=c.outerHeight(),f=n(this,\"marginLeft\"),_=n(this,\"marginTop\"),x=d+f+n(this,\"marginRight\")+w.width,D=h+_+n(this,\"marginBottom\")+w.height,S=e.extend({},v),E=i(k.my,c.outerWidth(),c.outerHeight());\"right\"===t.my[0]?S.left-=d:\"center\"===t.my[0]&&(S.left-=d/2),\"bottom\"===t.my[1]?S.top-=h:\"center\"===t.my[1]&&(S.top-=h/2),S.left+=E[0],S.top+=E[1],e.support.offsetFractions||(S.left=l(S.left),S.top=l(S.top)),o={marginLeft:f,marginTop:_},e.each([\"left\",\"top\"],function(i,n){e.ui.position[C[i]]&&e.ui.position[C[i]][n](S,{targetWidth:p,targetHeight:m,elemWidth:d,elemHeight:h,collisionPosition:o,collisionWidth:x,collisionHeight:D,offset:[r[0]+E[0],r[1]+E[1]],my:t.my,at:t.at,within:b,elem:c})}),t.using&&(u=function(e){var i=g.left-S.left,n=i+p-d,o=g.top-S.top,r=o+m-h,l={target:{element:y,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:S.left,top:S.top,width:d,height:h},horizontal:n<0?\"left\":i>0?\"right\":\"center\",vertical:r<0?\"top\":o>0?\"bottom\":\"middle\"};p<d&&a(i+n)<p&&(l.horizontal=\"center\"),m<h&&a(o+r)<m&&(l.vertical=\"middle\"),s(a(i),a(n))>s(a(o),a(r))?l.important=\"horizontal\":l.important=\"vertical\",t.using.call(this,e,l)}),c.offset(e.extend(S,{using:u}))})},e.ui.position={fit:{left:function(e,t){var i,n=t.within,o=n.isWindow?n.scrollLeft:n.offset.left,r=n.width,a=e.left-t.collisionPosition.marginLeft,l=o-a,u=a+t.collisionWidth-r-o;t.collisionWidth>r?l>0&&u<=0?(i=e.left+l+t.collisionWidth-r-o,e.left+=l-i):u>0&&l<=0?e.left=o:l>u?e.left=o+r-t.collisionWidth:e.left=o:l>0?e.left+=l:u>0?e.left-=u:e.left=s(e.left-a,e.left)},top:function(e,t){var i,n=t.within,o=n.isWindow?n.scrollTop:n.offset.top,r=t.within.height,a=e.top-t.collisionPosition.marginTop,l=o-a,u=a+t.collisionHeight-r-o;t.collisionHeight>r?l>0&&u<=0?(i=e.top+l+t.collisionHeight-r-o,e.top+=l-i):u>0&&l<=0?e.top=o:l>u?e.top=o+r-t.collisionHeight:e.top=o:l>0?e.top+=l:u>0?e.top-=u:e.top=s(e.top-a,e.top)}},flip:{left:function(e,t){var i,n,o=t.within,r=o.offset.left+o.scrollLeft,s=o.width,l=o.isWindow?o.scrollLeft:o.offset.left,u=e.left-t.collisionPosition.marginLeft,c=u-l,d=u+t.collisionWidth-s-l,h=\"left\"===t.my[0]?-t.elemWidth:\"right\"===t.my[0]?t.elemWidth:0,p=\"left\"===t.at[0]?t.targetWidth:\"right\"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];c<0?(i=e.left+h+p+f+t.collisionWidth-s-r,(i<0||i<a(c))&&(e.left+=h+p+f)):d>0&&(n=e.left-t.collisionPosition.marginLeft+h+p+f-l,(n>0||a(n)<d)&&(e.left+=h+p+f))},top:function(e,t){var i,n,o=t.within,r=o.offset.top+o.scrollTop,s=o.height,l=o.isWindow?o.scrollTop:o.offset.top,u=e.top-t.collisionPosition.marginTop,c=u-l,d=u+t.collisionHeight-s-l,h=\"top\"===t.my[1],p=h?-t.elemHeight:\"bottom\"===t.my[1]?t.elemHeight:0,f=\"top\"===t.at[1]?t.targetHeight:\"bottom\"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];c<0?(n=e.top+p+f+m+t.collisionHeight-s-r,e.top+p+f+m>c&&(n<0||n<a(c))&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-l,e.top+p+f+m>d&&(i>0||a(i)<d)&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,n,o,r,s=document.getElementsByTagName(\"body\")[0],a=document.createElement(\"div\");t=document.createElement(s?\"div\":\"body\"),n={visibility:\"hidden\",width:0,height:0,border:0,margin:0,background:\"none\"},s&&e.extend(n,{position:\"absolute\",left:\"-1000px\",top:\"-1000px\"});for(r in n)t.style[r]=n[r];t.appendChild(a),i=s||document.documentElement,i.insertBefore(t,i.firstChild),a.style.cssText=\"position: absolute; left: 10.7432222px;\",o=e(a).offset().left,e.support.offsetFractions=o>10&&o<11,t.innerHTML=\"\",i.removeChild(t)}()}(n)},{jquery:\"jquery\"}],\"jquery-ui/slider\":[function(e,t,i){var n=e(\"jquery\");e(\"./core\"),e(\"./mouse\"),e(\"./widget\"),/*!\n",
" * jQuery UI Slider 1.10.4\n",
" * http://jqueryui.com\n",
" *\n",
" * Copyright 2014 jQuery Foundation and other contributors\n",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment