1&&s.logger.warn(\"Bokeh does not support Polygons with holes in, only exterior ring used.\"),o=t.coordinates[0],P=[],u=_=0,p=o.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),E=[],u=g=0,y=l.length;gr&&io)break;return n},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,o;return t.num_minor_ticks=0,e.__super__.initialize.call(this,t,r),i=this.days,o=i.length>1?(i[1]-i[0])*n:31*n,this.interval=o},e.prototype.get_ticks_no_defaults=function(t,e,r,n){var s,a,l,u,c,_,p,d,f;return d=o(t,e),c=this.days,_=function(t){return function(t,e){var r,n,o,s,a,l;for(r=[],a=0,l=c.length;a0&&D.length>0){for(S=_/A,T=function(){var t,e,r;for(r=[],c=t=0,e=A;0<=e?te;c=0<=e?++t:--t)r.push(c*S);return r}(),j=T.slice(1,+T.length+1||9e9),h=0,f=j.length;h0&&D.length>0){for(S=Math.pow(i,_)/A,T=function(){var t,e,r;for(r=[],c=t=1,e=A;1<=e?t<=e:t>=e;c=1<=e?++t:--t)r.push(c*S);return r}(),M=0,v=T.length;Mo)break;return n},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,o;return e.__super__.initialize.call(this,t,r),o=this.months,i=o.length>1?(o[1]-o[0])*n:12*n,this.interval=i},e.prototype.get_ticks_no_defaults=function(t,e,r,n){var s,a,l,u,c,_,p,d;return d=o(t,e),c=this.months,_=function(t){return c.map(function(e){var r;return r=i(t),r.setUTCMonth(e),r})},u=h.concat(function(){var t,e,r;for(r=[],t=0,e=d.length;t0&&M.length>0){for(m=c/b,v=function(){var t,e,r;for(r=[],u=t=0,e=b;0<=e?te;u=0<=e?++t:--t)r.push(u*m);return r}(),w=v.slice(1,+v.length+1||9e9),_=0,d=w.length;_50))return t.constructor===Array?Array.prototype.push.apply(this.images,t):this.images.push(t)},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(49);r.ImageSource=function(t){function e(t){null==t&&(t={}),e.__super__.constructor.apply(this,arguments),this.images={},this.normalize_case()}return n(e,t),e.prototype.type=\"ImageSource\",e.define({url:[o.String,\"\"],extra_url_vars:[o.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,n,i;n=t;for(r in e)i=e[r],n=n.replace(\"{\"+r+\"}\",i.toString());return n},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,n,i,o){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}\",n).replace(\"{WIDTH}\",o).replace(\"{HEIGHT}\",i)},e}(s.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(192);r.BBoxTileSource=n.BBoxTileSource;var i=t(193);r.DynamicImageRenderer=i.DynamicImageRenderer;var o=t(195);r.ImageSource=o.ImageSource;var s=t(197);r.MercatorTileSource=s.MercatorTileSource;var a=t(198);r.QUADKEYTileSource=a.QUADKEYTileSource;var l=t(199);r.TileRenderer=l.TileRenderer;var u=t(200);r.TileSource=u.TileSource;var c=t(202);r.TMSTileSource=c.TMSTileSource;var _=t(203);r.WMTSTileSource=_.WMTSTileSource},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;e=n;r=e<=n?++t:--t)i.push(this.get_resolution(r));return i}.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,n,i,o,s,a;i=t.quadkey,n=i.length,r=n+3,o=this.tiles,s=[];for(e in o)a=o[e],0===a.quadkey.indexOf(i)&&a.quadkey.length>n&&a.quadkey.length<=r?s.push(a.retain=!0):s.push(void 0);return s},e.prototype.retain_neighbors=function(t){var e,r,n,i,s,a,l,u,c,_,h,p,d,f,y;r=4,s=t.tile_coords,h=s[0],p=s[1],d=s[2],n=function(){var t,e,n,i;for(i=[],f=t=e=h-r,n=h+r;e<=n?t<=n:t>=n;f=e<=n?++t:--t)i.push(f);return i}(),i=function(){var t,e,n,i;for(i=[],y=t=e=p-r,n=p+r;e<=n?t<=n:t>=n;y=e<=n?++t:--t)i.push(y);return i}(),a=this.tiles,c=[];for(e in a)_=a[e],_.tile_coords[2]===d&&(l=_.tile_coords[0],o.call(n,l)>=0)&&(u=_.tile_coords[1],o.call(i,u)>=0)?c.push(_.retain=!0):c.push(void 0);return c},e.prototype.retain_parents=function(t){var e,r,n,i,o;r=t.quadkey,n=this.tiles,i=[];for(e in n)o=n[e],i.push(o.retain=0===r.indexOf(o.quadkey));return i},e.prototype.children_by_tile_xyz=function(t,e,r){var n,i,o,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=[],o=s=0;s<=3;o=s+=1)u=this.quadkey_to_tile_xyz(a+o.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]),n=this.get_tile_meter_bounds(t,e,r),null!=n&&i.push([t,e,r,n]);return i},e.prototype.parent_by_tile_xyz=function(t,e,r){var n,i;return i=this.tile_xyz_to_quadkey(t,e,r),n=i.substring(0,i.length-1),this.quadkey_to_tile_xyz(n)},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 n,i;return n=(t[2]-t[0])/r,i=(t[3]-t[1])/e,[n,i]},e.prototype.get_level_by_extent=function(t,e,r){var n,i,o,s,a,l,u,c;for(u=(t[2]-t[0])/r,c=(t[3]-t[1])/e,l=Math.max(u,c),n=0,a=this._resolutions,i=0,o=a.length;is){if(0===n)return 0;if(n>0)return n-1}n+=1}},e.prototype.get_closest_level_by_extent=function(t,e,r){var n,i,o,s,a;return s=(t[2]-t[0])/r,a=(t[3]-t[1])/e,i=Math.max(s,a),o=this._resolutions,n=this._resolutions.reduce(function(t,e){return Math.abs(e-i)=l;f=n+=-1)for(h=i=u=d,c=p;i<=c;h=i+=1)this.is_valid_tile(h,f,e)&&_.push([h,f,e,this.get_tile_meter_bounds(h,f,e)]);return _=this.sort_tiles_from_center(_,[d,m,p,y])},e.prototype.quadkey_to_tile_xyz=function(t){\"Computes tile x, y and z values based on quadKey.\";var e,r,n,i,o,s,a,l;for(o=0,s=0,a=t.length,e=r=i=a;r>0;e=r+=-1)switch(l=t.charAt(a-e),n=1<0;i=o+=-1)n=0,s=1<0;)if(n=n.substring(0,n.length-1),o=this.quadkey_to_tile_xyz(n),t=o[0],e=o[1],r=o[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 n;return this.wrap_around?(n=Math.pow(2,r),[(t%n+n)%n,e,r]):[t,e,r]},e.prototype.denormalize_xyz=function(t,e,r,n){return[t+n*Math.pow(2,r),e,r]},e.prototype.denormalize_meters=function(t,e,r,n){return[t+2*n*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)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(197);r.QUADKEYTileSource=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.type=\"QUADKEYTileSource\",e.prototype.get_image_url=function(t,e,r){var n,i,o;return n=this.string_lookup_replace(this.url,this.extra_url_vars),o=this.tms_to_wmts(t,e,r),t=o[0],e=o[1],r=o[2],i=this.tile_xyz_to_quadkey(t,e,r),n.replace(\"{Q}\",i)},e}(o.MercatorTileSource)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=[].indexOf||function(t){for(var e=0,r=this.length;e0)return null==this.attributionEl&&(i=this.plot_model.canvas._right.value-this.plot_model.frame._right.value,e=this.plot_model.frame._bottom.value,r=this.map_frame._width.value,this.attributionEl=c.div({\"class\":\"bk-tile-attribution\",style:{position:\"absolute\",bottom:e+\"px\",right:i+\"px\",\"max-width\":r+\"px\",padding:\"2px\",\"background-color\":\"rgba(255,255,255,0.8)\",\"font-size\":\"9pt\",\"font-family\":\"sans-serif\"}}),n=this.plot_view.canvas_view.events_el,n.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,n,i){var o,s,a;return null==i&&(i=!1),o=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:o,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:n,loaded:!1,finished:!1,x_coord:n[0],y_coord:n[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,o),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(),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,n,i;if(!e.__super__.has_finished.call(this))return!1;if(0===this._tiles.length)return!1;for(n=this._tiles,t=0,r=n.length;tg&&(c=this.extent,B=g,A=!0),A&&(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=[],o=[],h=0,y=C.length;h=n?(u=[1,p/n],g=u[0],b=u[1]):(c=[n/p,1],g=c[0],b=c[1]),t[0]<=e[0]?(l=t[0],_=t[0]+m*g,_>s&&(_=s)):(_=t[0],l=t[0]-m*g,ld&&(h=d)):(h=t[1],i=t[1]-m/n,in.end&&(a=n.end),as.end&&(l=s.end),ln.end)&&(this.v_axis_only=!0),(si.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,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T,O,P;i=this.plot_view.frame,l=t-this.last_dx,u=e-this.last_dy,o=i.h_range,w=o.start-l,b=o.end-l,T=i.v_range,S=T.start-u,M=T.end-u,r=this.model.dimensions,\"width\"!==r&&\"both\"!==r||this.v_axis_only?(v=o.start,g=o.end,f=0):(v=w,g=b,f=-l),\"height\"!==r&&\"both\"!==r||this.h_axis_only?(x=T.start,k=T.end,y=0):(x=S,k=M,y=u),this.last_dx=t,this.last_dy=e,O={},c=i.xscales;for(a in c)d=c[a],_=d.v_invert([v,g]),m=_[0],n=_[1],O[a]={start:m,end:n};P={},h=i.yscales;for(a in h)d=h[a],p=d.v_invert([x,k]),m=p[0],n=p[1],P[a]={start:m,end:n};return this.pan_info={xrs:O,yrs:P,sdx:f,sdy:y},this.plot_view.update_range(this.pan_info,s=!0),null},e}(o.GestureToolView),r.PanTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(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}(o.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(219),a=t(61),l=t(14),u=t(21);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._do_select(this.data.vx,this.data.vy,!0,e),this.plot_view.push_state(\"poly_select\",{selection:this.plot_view.get_selection()}),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,n;return e=this.plot_view.canvas,r=e.sx_to_vx(t.bokeh.sx),n=e.sy_to_vy(t.bokeh.sy),this.data.vx.push(r),this.data.vy.push(n),this.model.overlay.update({xs:u.copy(this.data.vx),ys:u.copy(this.data.vy)})},e.prototype._do_select=function(t,e,r,n){var i;return i={type:\"poly\",vx:t,vy:e},this._select(i,r,n)},e.prototype._emit_callback=function(t){var e,r,n,i,o;n=this.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_vx_to_sx(t.vy),i=r.xscales[n.x_range_name],o=r.yscales[n.y_range_name],t.x=i.v_invert(t.vx),t.y=i.v_invert(t.vy),this.model.callback.execute(this.model,{geometry:t})},e}(s.SelectToolView),n=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({callback:[l.Instance],overlay:[l.Instance,n]}),e}(s.SelectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(215),s=t(158),a=t(159),l=t(13),u=t(14),c=t(29),_=t(3);r.SelectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.getters({computed_renderers:function(){var t,e,r,n;return n=this.model.renderers,e=this.model.names,0===n.length&&(t=this.plot_model.plot.renderers,n=function(){var e,n,i;for(i=[],e=0,n=t.length;e0&&(n=function(){var t,i,o;for(o=[],t=0,i=n.length;t=0&&o.push(r);return o}()),n}}),e.prototype._computed_renderers_by_data_source=function(){var t,e,r,n,i,o;for(i={},n=this.computed_renderers,t=0,e=n.length;to;n=0<=o?++i:--i)r.x[n]=s.invert(r.vx[n]),r.y[n]=a.invert(r.vy[n]);break;default:l.logger.debug(\"Unrecognized selection geometry type: '\"+r.type+\"'\")}return this.plot_model.plot.trigger_event(new _.SelectionGeometry({geometry:r,\"final\":e}))},e}(o.GestureToolView),r.SelectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({renderers:[u.Array,[]],names:[u.Array,[]]}),e.internal({multi_select_modifier:[u.String,\"shift\"]}),e}(o.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(219),s=t(14),a=t(41);r.TapToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._tap=function(t){var e,r,n,i,o;return r=this.plot_view.canvas,i=r.sx_to_vx(t.bokeh.sx),o=r.sy_to_vy(t.bokeh.sy),e=null!=(n=t.srcEvent.shiftKey)&&n,this._select(i,o,!0,e)},e.prototype._select=function(t,e,r,n){var i,o,s,l,u,c,_,h,p,d,f,y,m;if(u={type:\"point\",vx:t,vy:e},o=this.model.callback,s={geometries:u},\"select\"===this.model.behavior){y=this._computed_renderers_by_data_source();for(i in y)f=y[i],m=f[0].get_selection_manager(),p=function(){var t,e,r;for(r=[],t=0,e=f.length;t.9?e=.9:e<-.9&&(e=-.9),this._update_ranges(e)},e.prototype._update_ranges=function(t){var e,r,n,i,o,s,a,l,u,c,_,h,p,d,f,y,m,v,g,b,w,x,k,M,S,T;switch(r=this.plot_model.frame,n=r.h_range,v=r.v_range,s=[n.start,n.end],b=s[0],g=s[1],a=[v.start,v.end],k=a[0],x=a[1],this.model.dimension){case\"height\":M=Math.abs(x-k),d=b,f=g,y=k+M*t,m=x+M*t;break;case\"width\":w=Math.abs(g-b),d=b-w*t,f=g-w*t,y=k,m=x}S={},l=r.xscales;for(i in l)h=l[i],u=h.v_invert([d,f]),p=u[0],e=u[1],S[i]={start:p,end:e};T={},c=r.yscales;for(i in c)h=c[i],_=h.v_invert([y,m]),p=_[0],e=_[1],T[i]={start:p,end:e};return o={xrs:S,yrs:T,factor:t},this.plot_view.push_state(\"wheel_pan\",{range:o}),this.plot_view.update_range(o,!1,!0),this.plot_view.interactive_timestamp=Date.now(),null},e}(o.GestureToolView),r.WheelPanTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(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}(o.GestureTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(215),a=t(43),l=t(14);\"undefined\"!=typeof n&&null!==n||(n={}),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,n,i,o,s,l,u,c,_;return n=this.plot_model.frame,o=n.h_range,l=n.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)&&o.min0?\"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)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(204);r.ActionTool=n.ActionTool;var i=t(205);r.HelpTool=i.HelpTool;var o=t(206);r.RedoTool=o.RedoTool;var s=t(207);r.ResetTool=s.ResetTool;var a=t(208);r.SaveTool=a.SaveTool;var l=t(209);r.UndoTool=l.UndoTool;var u=t(210);r.ZoomInTool=u.ZoomInTool;var c=t(211);r.ZoomOutTool=c.ZoomOutTool;var _=t(212);r.ButtonTool=_.ButtonTool;var h=t(213);r.BoxSelectTool=h.BoxSelectTool;var p=t(214);r.BoxZoomTool=p.BoxZoomTool;var d=t(215);r.GestureTool=d.GestureTool;var f=t(216);r.LassoSelectTool=f.LassoSelectTool;var y=t(217);r.PanTool=y.PanTool;var m=t(218);r.PolySelectTool=m.PolySelectTool;var v=t(219);r.SelectTool=v.SelectTool;var g=t(220);r.TapTool=g.TapTool;var b=t(221);r.WheelPanTool=b.WheelPanTool;var w=t(222);r.WheelZoomTool=w.WheelZoomTool;var x=t(224);r.CrosshairTool=x.CrosshairTool;var k=t(225);r.HoverTool=k.HoverTool;var M=t(226);r.InspectTool=M.InspectTool;var S=t(228);r.Tool=S.Tool;var T=t(229);r.ToolProxy=T.ToolProxy;var O=t(230);r.Toolbar=O.Toolbar;var P=t(231);r.ToolbarBase=P.ToolbarBase;var A=t(232);r.ToolbarBoxToolbar=A.ToolbarBoxToolbar;var E=t(232);r.ToolbarBox=E.ToolbarBox},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(226),s=t(62),a=t(14),l=t(29);r.CrosshairToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype._move=function(t){var e,r,n,i;if(this.model.active)return r=this.plot_model.frame,e=this.plot_model.canvas,n=e.sx_to_vx(t.bokeh.sx),i=e.sy_to_vy(t.bokeh.sy),r.contains(n,i)||(n=i=null),this._update_spans(n,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}(o.InspectToolView),r.CrosshairTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(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}(o.InspectTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n,i=function(t,e){function r(){this.constructor=t}for(var n in e)o.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},o={}.hasOwnProperty,s=t(226),a=t(65),l=t(158),u=t(159),c=t(9),_=t(38),h=t(5),p=t(14),d=t(29),f=t(41),y=t(4);n=function(t){var e,r,n,i,o;return\"#\"===t.substr(0,1)?t:(r=/(.*?)rgb\\((\\d+), (\\d+), (\\d+)\\)/.exec(t),i=parseInt(r[2]),n=parseInt(r[3]),e=parseInt(r[4]),o=e|n<<8|i<<16,r[1]+\"#\"+o.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 y.remove_views(this.ttviews),e.__super__.remove.call(this)},e.prototype.connect_signals=function(){var t,r,n,i;for(e.__super__.connect_signals.call(this),i=this.computed_renderers,t=0,r=i.length;t0&&(n=function(){var t,i,o;for(o=[],t=0,i=n.length;t=0&&o.push(r);return o}()),n},e.prototype._compute_ttmodels=function(){var t,e,r,n,i,o,s,c,_,h,p;if(h={},_=this.model.tooltips,null!=_)for(s=this.computed_renderers,t=0,r=s.length;t=0){if(g=M.match(/\\$color(\\[.*\\])?:(\\w*)/),y=g[0],m=g[1],o=g[2],a=t.get_column(o),null==a){l=h.span({},o+\" unknown\"),i.appendChild(l);continue}if(u=(null!=m?m.indexOf(\"hex\"):void 0)>=0,x=(null!=m?m.indexOf(\"swatch\"):void 0)>=0,s=a[e],null==s){l=h.span({},\"(null)\"),i.appendChild(l);continue}u&&(s=n(s)),l=h.span({},s),i.appendChild(l),x&&(l=h.span({\"class\":\"bk-tooltip-color-block\",style:{backgroundColor:s}},\" \"),i.appendChild(l))}else M=M.replace(\"$~\",\"$data_\"),l=h.span(),l.innerHTML=_.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)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(212);r.InspectToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e}(s.ButtonToolView),r.InspectTool=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.event_type=\"move\",e.define({toggleable:[o.Bool,!0]}),e.override({active:!0}),e}(s.ButtonTool)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(212);r.OnOffButtonView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(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}(o.ButtonToolButtonView)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(44),a=t(21),l=t(49);r.ToolView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(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 n(e,t),e.getters({synthetic_renderers:function(){return[]}}),e.internal({active:[o.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,n){var i,o,s,l,u,c,_,h;return s=t[0],c=t[1],l=e[0],_=e[1],i=r.h_range,\"width\"===n||\"both\"===n?(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],o=r.v_range,\"height\"===n||\"both\"===n?(h=[a.min([c,_]),a.max([c,_])],h=[a.max([h[0],o.min]),a.min([h[1],o.max])]):h=[o.min,o.max],[u,h]},e}(l.Model)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(14),s=t(19),a=t(49);r.ToolProxy=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(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,n;for(r=this.tools,t=0,e=r.length;t0&&(x=g(C),this.gestures[n].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(g(C));this.inspectors=[];for(z in c)C=c[z],C.length>0&&this.inspectors.push(g(C,e=!0));E=[];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?E.push(this.gestures[r].tools[0].active=!0):E.push(void 0));return E},e}(h.ToolbarBase),r.ToolbarBoxView=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(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 n(e,t),e.prototype.type=\"ToolbarBox\",e.prototype.default_view=r.ToolbarBoxView,e.prototype.initialize=function(t){var n;return e.__super__.initialize.call(this,t),this._toolbar=new r.ToolbarBoxToolbar(t),this._horizontal=\"left\"===(n=this.toolbar_location)||\"right\"===n,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)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].slice,s=t(240),a=t(14),l=t(29);r.CustomJSTransform=function(e){function i(){return i.__super__.constructor.apply(this,arguments)}return n(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,o.call(this.values).concat([e],[t],[r]))},i.prototype.v_compute=function(e){return this.vector_transform.apply(this,o.call(this.values).concat([e],[t],[r]))},i.prototype._make_transform=function(t,e){return function(t,e,r){r.prototype=t.prototype;var n=new r,i=t.apply(n,e);return Object(i)===i?i:n}(Function,o.call(Object.keys(this.args)).concat([t],[\"require\"],[\"exports\"],[e]),function(){})},i.prototype._make_values=function(){return l.values(this.args)},i}(s.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(240),s=t(14);r.Dodge=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({value:[s.Number,0],range:[s.Instance]}),e.prototype.compute=function(t,e){var r;return null==e&&(e=!0),null!=(null!=(r=this.range)?r.synthetic:void 0)&&e&&(t=this.range.synthetic(t)),t+this.value},e}(o.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(233);r.CustomJSTransform=n.CustomJSTransform;var i=t(234);r.Dodge=i.Dodge;var o=t(236);r.Interpolator=o.Interpolator;var s=t(237);r.Jitter=s.Jitter;var a=t(238);r.LinearInterpolator=a.LinearInterpolator;var l=t(239);r.StepInterpolator=l.StepInterpolator;var u=t(240);r.Transform=u.Transform},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=[].indexOf||function(t){for(var e=0,r=this.length;ee.x)?r:-{1:null!=(n=t.x===e.x)?n:{0:1}}}),s=n=0,c=a.length;0<=c?nc;s=0<=c?++n:--n)this._x_sorted[s]=a[s].x,this._y_sorted[s]=a[s].y;return this._sorted_dirty=!1}},e}(s.Transform)},function(t,e,r){\"use strict\";\n",
" Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(240),s=t(14),a=t(28);r.Jitter=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.define({mean:[s.Number,0],width:[s.Number,1],distribution:[s.Distribution,\"uniform\"],range:[s.Instance]}),e.prototype.compute=function(t,e){var r;return null==e&&(e=!0),null!=(null!=(r=this.range)?r.synthetic:void 0)&&e&&(t=this.range.synthetic(t)),\"uniform\"===this.distribution?t+this.mean+(a.random()-.5)*this.width:\"normal\"===this.distribution?t+a.rnorm(this.mean,this.width):void 0},e}(o.Transform)},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=function(t,e){function r(){this.constructor=t}for(var n in e)i.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},i={}.hasOwnProperty,o=t(21),s=t(236);r.LinearInterpolator=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return n(e,t),e.prototype.compute=function(t){var e,r,n,i,s,a,l;if(this.sort(e=!1),this.clip===!0){if(tthis._x_sorted[this._x_sorted.length-1])return null}else{if(tthis._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=o.findLastIndex(this._x_sorted,function(e){return ethis._x_sorted[this._x_sorted.length-1])return null}else{if(tthis._x_sorted[this._x_sorted.length-1])return this._y_sorted[this._y_sorted.length-1]}return n=-1,\"after\"===this.mode&&(n=a.findLastIndex(this._x_sorted,function(e){return t>=e})),\"before\"===this.mode&&(n=a.findIndex(this._x_sorted,function(e){return t<=e})),\"center\"===this.mode&&(r=function(){var e,r,n,i;for(n=this._x_sorted,i=[],e=0,r=n.length;e=1<<28)throw new RangeError(\"repeat count must not overflow maximum string size\");for(var r=\"\";1==(1&t)&&(r+=e),t>>>=1,0!=t;)e+=e;return r})},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(36);r.Message=function(){function t(t,e,r){this.header=t,this.metadata=e,this.content=r,this.buffers=[]}return t.assemble=function(e,r,n){var i,o,s;return o=JSON.parse(e),s=JSON.parse(r),i=JSON.parse(n),new t(o,s,i)},t.prototype.assemble_buffer=function(t,e){var r;if(r=null!=this.header.num_buffers?this.header.num_buffers:0,r<=this.buffers.length)throw new Error(\"too many buffers received, expecting \"+r);return this.buffers.push([t,e])},t.create=function(e,r,n){var i;return null==n&&(n={}),i=t.create_header(e),new t(i,r,n)},t.create_header=function(t){return{msgid:n.uniqueId(),msgtype:t}},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.send=function(t){var e,r,n,i;if(i=null!=this.header.num_buffers?this.header.num_buffers:0,i>0)throw new Error(\"BokehJS only supports receiving buffers, not sending\");return r=JSON.stringify(this.header),n=JSON.stringify(this.metadata),e=JSON.stringify(this.content),t.send(r),t.send(n),t.send(e)},t.prototype.msgid=function(){return this.header.msgid},t.prototype.msgtype=function(){return this.header.msgtype},t.prototype.reqid=function(){return this.header.reqid},t.prototype.problem=function(){return\"msgid\"in this.header?\"msgtype\"in this.header?null:\"No msgtype in header\":\"No msgid in header\"},t}()},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0});var n=t(242);r.Receiver=function(){function t(){this.message=null,this._current_consumer=this._HEADER}return t.prototype.consume=function(t){return this._current_consumer(t),null},t.prototype._HEADER=function(t){return this._assume_text(t),this.message=null,this._partial=null,this._fragments=[t],this._buf_header=null,this._current_consumer=this._METADATA,null},t.prototype._METADATA=function(t){return this._assume_text(t),this._fragments.push(t),this._current_consumer=this._CONTENT,null},t.prototype._CONTENT=function(t){var e,r,i,o;return this._assume_text(t),this._fragments.push(t),o=this._fragments.slice(0,3),r=o[0],i=o[1],e=o[2],this._partial=n.Message.assemble(r,i,e),this._check_complete(),null},t.prototype._BUFFER_HEADER=function(t){return this._assume_text(t),this._buf_header=t,this._current_consumer=this._BUFFER_PAYLOAD,null},t.prototype._BUFFER_PAYLOAD=function(t){return this._assume_binary(t),this._partial.assemble_buffer(this._buf_header,t),this._check_complete(),null},t.prototype._assume_text=function(t){if(t instanceof ArrayBuffer)throw new Error(\"Expected text fragment but received binary fragment\")},t.prototype._assume_binary=function(t){if(!(t instanceof ArrayBuffer))throw new Error(\"Expected binary fragment but received text fragment\")},t.prototype._check_complete=function(){return this._partial.complete()?(this.message=this._partial,this._current_consumer=this._HEADER):this._current_consumer=this._BUFFER_HEADER,null},t}()},function(t,e,r){\"use strict\";function n(t){var e=document.createElement(\"div\");e.style.backgroundColor=\"#f2dede\",e.style.border=\"1px solid #a94442\",e.style.borderRadius=\"4px\",e.style.display=\"inline-block\",e.style.fontFamily=\"sans-serif\",e.style.marginTop=\"5px\",e.style.minWidth=\"200px\",e.style.padding=\"5px 5px 5px 10px\";var r=document.createElement(\"span\");r.style.backgroundColor=\"#a94442\",r.style.borderRadius=\"0px 4px 0px 0px\",r.style.color=\"white\",r.style.cursor=\"pointer\",r.style.cssFloat=\"right\",r.style.fontSize=\"0.8em\",r.style.margin=\"-6px -6px 0px 0px\",r.style.padding=\"2px 5px 4px 5px\",r.title=\"close\",r.setAttribute(\"aria-label\",\"close\"),r.appendChild(document.createTextNode(\"x\")),r.addEventListener(\"click\",function(){return o.removeChild(e)});var n=document.createElement(\"h3\");n.style.color=\"#a94442\",n.style.margin=\"8px 0px 0px 0px\",n.style.padding=\"0px\",n.appendChild(document.createTextNode(\"Bokeh Error\"));var i=document.createElement(\"pre\");i.style.whiteSpace=\"unset\",i.style.overflowX=\"auto\",i.appendChild(document.createTextNode(t.message||t)),e.appendChild(r),e.appendChild(n),e.appendChild(i);var o=document.getElementsByTagName(\"body\")[0];o.insertBefore(e,o.firstChild)}function i(t,e){void 0===e&&(e=!1);try{return t()}catch(r){if(n(r),e)return;throw r}}Object.defineProperty(r,\"__esModule\",{value:!0}),r.safely=i},function(t,e,r){\"use strict\";Object.defineProperty(r,\"__esModule\",{value:!0}),r.version=\"0.12.10\"},function(t,e,r){!function(){\"use strict\";function t(t,e){var r,n=Object.keys(e);for(r=0;r1?(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 n,i,o=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",t),s=Object.keys(e);for(r&&(o.setAttribute(\"fill\",\"none\"),o.setAttribute(\"stroke\",\"none\")),n=0;n0){\"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 n=this.__currentElement.getAttribute(\"transform\");n?n+=\" \":n=\"\",n+=t,this.__currentElement.setAttribute(\"transform\",n)},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,n,i,o,s){this.__addTransform(t(\"matrix({a},{b},{c},{d},{e},{f})\",{a:e,b:r,c:n,d:i,e:o,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,n,i,o,s){this.__currentPosition={x:o,y:s},this.__addPathCommand(t(\"C {cp1x} {cp1y} {cp2x} {cp2y} {x} {y}\",{cp1x:e,cp1y:r,cp2x:n,cp2y:i,x:o,y:s}))},a.prototype.quadraticCurveTo=function(e,r,n,i){this.__currentPosition={x:n,y:i},this.__addPathCommand(t(\"Q {cpx} {cpy} {x} {y}\",{cpx:e,cpy:r,x:n,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,n,i){var o=this.__currentPosition&&this.__currentPosition.x,s=this.__currentPosition&&this.__currentPosition.y;if(\"undefined\"!=typeof o&&\"undefined\"!=typeof s){if(i<0)throw new Error(\"IndexSizeError: The radius provided (\"+i+\") is negative.\");if(o===t&&s===e||t===r&&e===n||0===i)return void this.lineTo(t,e);var a=_([o-t,s-e]),l=_([r-t,n-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)),h=_([a[0]+l[0],a[1]+l[1]]),p=i/Math.sin(c/2),d=t+p*h[0],f=e+p*h[1],y=[-a[1],a[0]],m=[l[1],-l[0]],v=function(t){var e=t[0],r=t[1];return r>=0?Math.acos(e):-Math.acos(e)},g=v(y),b=v(m);this.lineTo(d+y[0]*i,f+y[1]*i),this.arc(d,f,i,g,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,n){\"path\"!==this.__currentElement.nodeName&&this.beginPath(),this.moveTo(t,e),this.lineTo(t+r,e),this.lineTo(t+r,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.closePath()},a.prototype.fillRect=function(t,e,r,n){var i,o;i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:n},!0),o=this.__closestGroupOrSvg(),o.appendChild(i),this.__currentElement=i,this.__applyStyleToCurrentElement(\"fill\")},a.prototype.strokeRect=function(t,e,r,n){var i,o;i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:n},!0),o=this.__closestGroupOrSvg(),o.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],n=r.childNodes,i=n.length-1;i>=0;i--)n[i]&&r.removeChild(n[i]);this.__currentElement=r,this.__groupStack=[],e&&this.__addTransform(e)},a.prototype.clearRect=function(t,e,r,n){if(0===t&&0===e&&r===this.width&&n===this.height)return void this.__clearCanvas();var i,o=this.__closestGroupOrSvg();i=this.__createElement(\"rect\",{x:t,y:e,width:r,height:n,fill:\"#FFFFFF\"},!0),o.appendChild(i)},a.prototype.createLinearGradient=function(t,e,n,i){var o=this.__createElement(\"linearGradient\",{id:r(this.__ids),x1:t+\"px\",x2:n+\"px\",y1:e+\"px\",y2:i+\"px\",gradientUnits:\"userSpaceOnUse\"},!1);return this.__defs.appendChild(o),new l(o,this)},a.prototype.createRadialGradient=function(t,e,n,i,o,s){var a=this.__createElement(\"radialGradient\",{id:r(this.__ids),cx:i+\"px\",cy:o+\"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,n){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\":o(this.textBaseline)},!0);l.appendChild(this.__document.createTextNode(t)),this.__currentElement=l,this.__applyStyleToCurrentElement(n),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,n,i,o,s){if(i!==o){i%=2*Math.PI,o%=2*Math.PI,i===o&&(o=(o+2*Math.PI-.001*(s?-1:1))%(2*Math.PI));var a=e+n*Math.cos(o),l=r+n*Math.sin(o),u=e+n*Math.cos(i),c=r+n*Math.sin(i),_=s?0:1,h=0,p=o-i;p<0&&(p+=2*Math.PI),h=s?p>Math.PI?0:1:p>Math.PI?1:0,this.lineTo(u,c),this.__addPathCommand(t(\"A {rx} {ry} {xAxisRotation} {largeArcFlag} {sweepFlag} {endX} {endY}\",{rx:n,ry:n,xAxisRotation:0,largeArcFlag:h,sweepFlag:_,endX:a,endY:l})),this.__currentPosition={x:a,y:l}}},a.prototype.clip=function(){var e=this.__closestGroupOrSvg(),n=this.__createElement(\"clipPath\"),i=r(this.__ids),o=this.__createElement(\"g\");this.__applyCurrentDefaultPath(),e.removeChild(this.__currentElement),n.setAttribute(\"id\",i),n.appendChild(this.__currentElement),this.__defs.appendChild(n),e.setAttribute(\"clip-path\",t(\"url(#{id})\",{id:i})),e.appendChild(o),this.__currentElement=o},a.prototype.drawImage=function(){var t,e,r,n,i,o,s,l,u,c,_,h,p,d,f,y=Array.prototype.slice.call(arguments),m=y[0],v=0,g=0;if(3===y.length)t=y[1],e=y[2],i=m.width,o=m.height,r=i,n=o;else if(5===y.length)t=y[1],e=y[2],r=y[3],n=y[4],i=m.width,o=m.height;else{if(9!==y.length)throw new Error(\"Inavlid number of arguments passed to drawImage: \"+arguments.length);v=y[1],g=y[2],i=y[3],o=y[4],t=y[5],e=y[6],r=y[7],n=y[8]}s=this.__closestGroupOrSvg(),_=this.__currentElement;var b=\"translate(\"+t+\", \"+e+\")\";if(m instanceof a){if(l=m.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\"===m.nodeName?(h=this.__createElement(\"image\"),h.setAttribute(\"width\",r),h.setAttribute(\"height\",n),h.setAttribute(\"preserveAspectRatio\",\"none\"),(v||g||i!==m.width||o!==m.height)&&(p=this.__document.createElement(\"canvas\"),p.width=r,p.height=n,d=p.getContext(\"2d\"),d.drawImage(m,v,g,i,o,0,0,r,n),m=p),h.setAttribute(\"transform\",b),h.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===m.nodeName?m.toDataURL():m.getAttribute(\"src\")),s.appendChild(h)):\"CANVAS\"===m.nodeName&&(h=this.__createElement(\"image\"),h.setAttribute(\"width\",r),h.setAttribute(\"height\",n),h.setAttribute(\"preserveAspectRatio\",\"none\"),p=this.__document.createElement(\"canvas\"),p.width=r,p.height=n,d=p.getContext(\"2d\"),d.imageSmoothingEnabled=!1,d.mozImageSmoothingEnabled=!1,d.oImageSmoothingEnabled=!1,d.webkitImageSmoothingEnabled=!1,d.drawImage(m,v,g,i,o,0,0,r,n),m=p,h.setAttribute(\"transform\",b),h.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",m.toDataURL()),s.appendChild(h))},a.prototype.createPattern=function(t,e){var n,i=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"pattern\"),o=r(this.__ids);return i.setAttribute(\"id\",o),i.setAttribute(\"width\",t.width),i.setAttribute(\"height\",t.height),\"CANVAS\"===t.nodeName||\"IMG\"===t.nodeName?(n=this.__document.createElementNS(\"http://www.w3.org/2000/svg\",\"image\"),n.setAttribute(\"width\",t.width),n.setAttribute(\"height\",t.height),n.setAttributeNS(\"http://www.w3.org/1999/xlink\",\"xlink:href\",\"CANVAS\"===t.nodeName?t.toDataURL():t.getAttribute(\"src\")),i.appendChild(n),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)}()},function(t,e,r){\"use strict\";var n,i=t(270),o=t(280),s=t(284),a=t(279),l=t(284),u=t(286),c=Function.prototype.bind,_=Object.defineProperty,h=Object.prototype.hasOwnProperty;n=function(t,e,r){var n,o=u(e)&&l(e.value);return n=i(e),delete n.writable,delete n.value,n.get=function(){return!r.overwriteDefinition&&h.call(this,t)?o:(e.value=c.call(o,r.resolveContext?r.resolveContext(this):this),_(this,t,e),this[t])},n},e.exports=function(t){var e=o(arguments[1]);return null!=e.resolveContext&&s(e.resolveContext),a(t,function(t,r){return n(r,t,e)})}},function(t,e,r){\"use strict\";var n,i=t(267),o=t(280),s=t(273),a=t(287);n=e.exports=function(t,e){var r,n,s,l,u;return arguments.length<2||\"string\"!=typeof t?(l=e,e=t,t=null):l=arguments[2],null==t?(r=s=!0,n=!1):(r=a.call(t,\"c\"),n=a.call(t,\"e\"),s=a.call(t,\"w\")),u={value:e,configurable:r,enumerable:n,writable:s},l?i(o(l),u):u},n.gs=function(t,e,r){var n,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?(n=!0,l=!1):(n=a.call(t,\"c\"),l=a.call(t,\"e\")),c={get:e,set:r,configurable:n,enumerable:l},u?i(o(u),c):c}},function(t,e,r){\"use strict\";var n=t(286);e.exports=function(){return n(this).length=0,this}},function(t,e,r){\"use strict\";var n=t(261),i=t(265),o=t(286),s=Array.prototype.indexOf,a=Object.prototype.hasOwnProperty,l=Math.abs,u=Math.floor;e.exports=function(t){var e,r,c,_;if(!n(t))return s.apply(this,arguments);for(r=i(o(this).length),c=arguments[1],c=isNaN(c)?0:c>=0?u(c):i(this.length)-u(l(c)),e=c;e=55296&&v<=56319&&(x+=t[++r])),x=k?h.call(k,M,x,f):x,e?(p.value=x,d(y,f,p)):y[f]=x,++f;m=f}if(void 0===m)for(m=s(t.length),e&&(y=new e(m)),r=0;r0?1:-1}},function(t,e,r){\"use strict\";e.exports=t(262)()?Number.isNaN:t(263)},function(t,e,r){\"use strict\";e.exports=function(){var t=Number.isNaN;return\"function\"==typeof t&&(!t({})&&t(NaN)&&!t(34))}},function(t,e,r){\"use strict\";e.exports=function(t){return t!==t}},function(t,e,r){\"use strict\";var n=t(258),i=Math.abs,o=Math.floor;e.exports=function(t){return isNaN(t)?0:(t=Number(t),0!==t&&isFinite(t)?n(t)*o(i(t)):t)}},function(t,e,r){\"use strict\";var n=t(264),i=Math.max;e.exports=function(t){return i(0,n(t))}},function(t,e,r){\"use strict\";var n=t(284),i=t(286),o=Function.prototype.bind,s=Function.prototype.call,a=Object.keys,l=Object.prototype.propertyIsEnumerable;\n",
" e.exports=function(t,e){return function(r,u){var c,_=arguments[2],h=arguments[3];return r=Object(i(r)),n(u),c=a(r),h&&c.sort(\"function\"==typeof h?o.call(h,r):void 0),\"function\"!=typeof t&&(t=c[t]),s.call(t,c,function(t,n){return l.call(r,t)?s.call(u,_,r[t],t,r,n):e})}}},function(t,e,r){\"use strict\";e.exports=t(268)()?Object.assign:t(269)},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\")}},function(t,e,r){\"use strict\";var n=t(276),i=t(286),o=Math.max;e.exports=function(t,e){var r,s,a,l=o(arguments.length,2);for(t=Object(i(t)),a=function(n){try{t[n]=e[n]}catch(i){r||(r=i)}},s=1;s-1}},function(t,e,r){\"use strict\";var n=Object.prototype.toString,i=n.call(\"\");e.exports=function(t){return\"string\"==typeof t||t&&\"object\"==typeof t&&(t instanceof String||n.call(t)===i)||!1}},function(t,e,r){\"use strict\";var n=Object.create(null),i=Math.random;e.exports=function(){var t;do t=i().toString(36).slice(2);while(n[t]);return t}},function(t,e,r){\"use strict\";var n,i=t(281),o=t(287),s=t(248),a=t(295),l=Object.defineProperty;n=e.exports=function(t,e){return this instanceof n?(a.call(this,t),e=e?o.call(e,\"key+value\")?\"key+value\":o.call(e,\"key\")?\"key\":\"value\":\"value\",void l(this,\"__kind__\",s(\"\",e))):new n(t,e)},i&&i(n,a),n.prototype=Object.create(a.prototype,{constructor:s(n),_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]\"})})},function(t,e,r){\"use strict\";var n=t(254),i=t(284),o=t(290),s=t(294),a=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;e.exports=function(t,e){var r,c,_,h,p,d,f,y,m=arguments[2];if(a(t)||n(t)?r=\"array\":o(t)?r=\"string\":t=s(t),i(e),_=function(){h=!0},\"array\"===r)return void u.call(t,function(t){if(l.call(e,m,t,_),h)return!0});if(\"string\"!==r)for(c=t.next();!c.done;){if(l.call(e,m,c.value,_),h)return;c=t.next()}else for(d=t.length,p=0;p=55296&&y<=56319&&(f+=t[++p])),l.call(e,m,f,_),!h);++p);}},function(t,e,r){\"use strict\";var n=t(254),i=t(290),o=t(292),s=t(297),a=t(298),l=t(305).iterator;e.exports=function(t){return\"function\"==typeof a(t)[l]?t[l]():n(t)?new o(t):i(t)?new s(t):new o(t)}},function(t,e,r){\"use strict\";var n,i=t(249),o=t(267),s=t(284),a=t(286),l=t(248),u=t(247),c=t(305),_=Object.defineProperty,h=Object.defineProperties;e.exports=n=function(t,e){return this instanceof n?(h(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 n(t,e)},h(n.prototype,o({constructor:l(n),_next:l(function(){var t;if(this.__list__)return this.__redo__&&(t=this.__redo__.shift(),void 0!==t)?t:this.__nextIndex__=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})}))),_(n.prototype,c.iterator,l(function(){return this})),_(n.prototype,c.toStringTag,l(\"\",\"Iterator\"))},function(t,e,r){\"use strict\";var n=t(254),i=t(290),o=t(305).iterator,s=Array.isArray;e.exports=function(t){return null!=t&&(!!s(t)||(!!i(t)||(!!n(t)||\"function\"==typeof t[o])))}},function(t,e,r){\"use strict\";var n,i=t(281),o=t(248),s=t(295),a=Object.defineProperty;n=e.exports=function(t){return this instanceof n?(t=String(t),s.call(this,t),void a(this,\"__length__\",o(\"\",t.length))):new n(t)},i&&i(n,s),n.prototype=Object.create(s.prototype,{constructor:o(n),_next:o(function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r)}),toString:o(function(){return\"[object String Iterator]\"})})},function(t,e,r){\"use strict\";var n=t(296);e.exports=function(t){if(!n(t))throw new TypeError(t+\" is not iterable\");return t}},function(e,r,n){/*!\n",
" * @overview es6-promise - a tiny implementation of Promises/A+.\n",
" * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n",
" * @license Licensed under MIT license\n",
" * See https://raw.githubusercontent.com/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 i(t){return\"function\"==typeof t}function o(t){return\"object\"==typeof t&&null!==t}function s(t){q=t}function a(t){H=t}function l(){return function(){process.nextTick(p)}}function u(){return function(){U(p)}}function c(){var t=0,e=new $(p),r=document.createTextNode(\"\");return e.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}function _(){var t=new MessageChannel;return t.port1.onmessage=p,function(){t.port2.postMessage(0)}}function h(){return function(){setTimeout(p,1)}}function p(){for(var t=0;t\\s*\\(/gm,\"{anonymous}()@\"):\"Unknown Stack Trace\",o=e.console&&(e.console.warn||e.console.log);return o&&o.call(e.console,i,n),t.apply(this,arguments)}}function c(t,e,r){var n,i=e.prototype;n=t.prototype=Object.create(i),n.constructor=t,n._super=i,r&&pt(n,r)}function _(t,e){return function(){return t.apply(e,arguments)}}function h(t,e){return typeof t==yt?t.apply(e?e[0]||o:o,e):t}function p(t,e){return t===o?e:t}function d(t,e,r){l(v(e),function(e){t.addEventListener(e,r,!1)})}function f(t,e,r){l(v(e),function(e){t.removeEventListener(e,r,!1)})}function y(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function m(t,e){return t.indexOf(e)>-1}function v(t){return t.trim().split(/\\s+/g)}function g(t,e,r){if(t.indexOf&&!r)return t.indexOf(e);for(var n=0;nr[e]}):n.sort()),n}function x(t,e){for(var r,n,i=e[0].toUpperCase()+e.slice(1),s=0;s1&&!r.firstMultiple?r.firstMultiple=j(e):1===i&&(r.firstMultiple=!1);var o=r.firstInput,s=r.firstMultiple,a=s?s.center:o.center,l=e.center=z(n);e.timeStamp=gt(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=F(a,l),e.distance=D(a,l),A(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=vt(u.x)>vt(u.y)?u.x:u.y,e.scale=s?B(s.pointers,n):1,e.rotation=s?I(s.pointers,n):0,e.maxPointers=r.prevInput?e.pointers.length>r.prevInput.maxPointers?e.pointers.length:r.prevInput.maxPointers:e.pointers.length,E(r,e);var c=t.element;y(e.srcEvent.target,c)&&(c=e.srcEvent.target),e.target=c}function A(t,e){var r=e.center,n=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};e.eventType!==zt&&o.eventType!==Nt||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=t.offsetDelta={x:r.x,y:r.y}),e.deltaX=i.x+(r.x-n.x),e.deltaY=i.y+(r.y-n.y)}function E(t,e){var r,n,i,s,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(e.eventType!=Dt&&(l>jt||a.velocity===o)){var u=e.deltaX-a.deltaX,c=e.deltaY-a.deltaY,_=C(l,u,c);n=_.x,i=_.y,r=vt(_.x)>vt(_.y)?_.x:_.y,s=N(u,c),t.lastInterval=e}else r=a.velocity,n=a.velocityX,i=a.velocityY,s=a.direction;e.velocity=r,e.velocityX=n,e.velocityY=i,e.direction=s}function j(t){for(var e=[],r=0;r=vt(e)?t<0?It:Bt:e<0?Rt:Lt}function D(t,e,r){r||(r=qt);var n=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return Math.sqrt(n*n+i*i)}function F(t,e,r){r||(r=qt);var n=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return 180*Math.atan2(i,n)/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 R(){this.evEl=Wt,this.evWin=Ht,this.pressed=!1,S.apply(this,arguments)}function L(){this.evEl=$t,this.evWin=Zt,S.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function V(){this.evTarget=te,this.evWin=ee,this.started=!1,S.apply(this,arguments)}function G(t,e){var r=b(t.touches),n=b(t.changedTouches);return e&(Nt|Dt)&&(r=w(r.concat(n),\"identifier\",!0)),[r,n]}function U(){this.evTarget=ne,this.targetIds={},S.apply(this,arguments)}function q(t,e){var r=b(t.touches),n=this.targetIds;if(e&(zt|Ct)&&1===r.length)return n[r[0].identifier]=!0,[r,r];var i,o,s=b(t.changedTouches),a=[],l=this.target;if(o=r.filter(function(t){return y(t.target,l)}),e===zt)for(i=0;i-1&&n.splice(t,1)};setTimeout(i,ie)}}function H(t){for(var e=t.srcEvent.clientX,r=t.srcEvent.clientY,n=0;n-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,n=this.state;n=ve&&e(r.options.event+K(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=we)},canEmit:function(){for(var t=0;te.threshold&&i&e.direction},attrTest:function(t){return rt.prototype.attrTest.call(this,t)&&(this.state&ye||!(this.state&ye)&&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&ye)},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(ot,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,n=t.distancee.time;if(this._input=t,!n||!r||t.eventType&(Nt|Dt)&&!i)this.reset();else if(t.eventType&zt)this.reset(),this._timer=s(function(){this.state=ge,this.tryEmit()},e.time,this);else if(t.eventType&Nt)return ge;return we},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===ge&&(t&&t.eventType&Nt?this.manager.emit(this.options.event+\"up\",t):(this._input.timeStamp=gt(),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&ye)}}),c(at,rt,{defaults:{event:\"swipe\",threshold:10,velocity:.3,direction:Vt|Gt,pointers:1},getTouchAction:function(){return nt.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&&vt(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,n=t.distance=\";case n.Eq:return\"==\"}};return this._expression+\" \"+e()+\" 0\"},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=o;var s=0},function(t,e,r){\"use strict\";function n(t){for(var e=0,r=function(){return 0},n=s.createMap(o.Variable.Compare),i=0,a=t.length;i=0?\" + \"+l+a:\" - \"+-l+a}var u=this.constant;return u<0?r+=\" - \"+-u:u>0&&(r+=\" + \"+u),r},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},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 n(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}Object.defineProperty(r,\"__esModule\",{value:!0}),n(t(328)),n(t(317)),n(t(316)),n(t(321)),n(t(320))},function(t,e,r){\"use strict\";function n(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(325);r.createMap=n},function(t,e,r){\"use strict\";function n(t){var e=1e-8;return t<0?-t0&&a.type()!==f.Dummy){var u=this._objective.coefficientFor(a),c=u/l;c0;)n=s>>1,i=o+n,r(t[i],e)<0?(o=i+1,s-=n+1):s=n;return o}function i(t,e,r){var i=n(t,e,r);if(i===t.length)return-1;var o=t[i];return 0!==r(o,e)?-1:i}function o(t,e,r){var i=n(t,e,r);if(i!==t.length){var o=t[i];if(0===r(o,e))return o}}function s(t,e){var r=p.asArray(t),n=r.length;if(n<=1)return r;r.sort(e);for(var i=[r[0]],o=1,s=0;o0))return!1;++i}}return!0}function l(t,e,r){var n=t.length,i=e.length;if(n>i)return!1;for(var o=0,s=0;o0?++s:(++o,++s)}return!(o0?(a.push(u),++i):(a.push(l),++n,++i)}for(;n0?++i:(a.push(l),++n,++i)}return a}function _(t,e,r){for(var n=0,i=0,o=t.length,s=e.length,a=[];n0?++i:(++n,++i)}for(;n0?(a.push(u),++i):(++n,++i)}for(;n0?(a.push(u.copy()),++i):(a.push(u.copy()),++n,++i)}for(;n=0},e.prototype.find=function(t){return l.binaryFind(this._array,t,this._wrapped)},e.prototype.setDefault=function(t,e){var r=this._array,n=l.lowerBound(r,t,this._wrapped);if(n===r.length){var i=new s.Pair(t,e());return r.push(i),i}var o=r[n];if(0!==this._compare(o.first,t)){var i=new s.Pair(t,e());return r.splice(n,0,i),i}return o},e.prototype.insert=function(t,e){var r=this._array,n=l.lowerBound(r,t,this._wrapped);if(n===r.length){var i=new s.Pair(t,e);return r.push(i),i}var o=r[n];if(0!==this._compare(o.first,t)){var i=new s.Pair(t,e);return r.splice(n,0,i),i}return o.second=e,o},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,n=this._array,i=0,o=n.length;i