UNPKG

vue-bokeh

Version:

A wrapper around bokehjs embedded

2 lines 897 kB
window.Bokeh=Bokeh=function(){var t=void 0;return function e(t,r,n){function o(i){if(!r[i]){if(!t[i]){var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var a=r[i]={exports:{}},l=function(e){var r=t[i][1][e];return o(r?r:e)};l.modules=o.modules,t[i][0].call(a.exports,l,a,a.exports,e,t,r,n)}return r[i].exports}o.modules=t;for(var i=null,s=0;s<n.length;s++)i=o(n[s]);return i}({base:[function(t,e,r){var n,o,i,s,a,l,u,h,c,p={}.hasOwnProperty;o=t("underscore"),u=t("./core/logging").logger,t("./core/util/underscore").patch(),l=t("./common/models"),c={},h=function(t){var e,r,n,i,s,a,l,u,h;s={};for(n in t)if(a=t[n],o.isArray(a)){u=a[0],h=null!=(i=a[1])?i:"";for(l in u)e=u[l],r=l+h,s[r]=e}else s[n]=a;return s},s=null,i=function(){return null==s&&(s=h(l)),s},n=function(t){var e,r;if(r=i(),c[t])return c[t];if(e=r[t],null==e)throw new Error("Module `"+t+"' does not exists. The problem may be two fold. Either a model was requested that's available in an extra bundle, e.g. a widget, or a custom model was requested, but it wasn't registered before first usage.");return e.Model},n.register=function(t,e){return c[t]=e},n.unregister=function(t){return delete c[t]},n.register_locations=function(t,e,r){var n,o,s,a,l;null==e&&(e=!1),null==r&&(r=null),o=i(),n=h(t),l=[];for(a in n)p.call(n,a)&&(s=n[a],e||!o.hasOwnProperty(a)?l.push(o[a]=s):l.push("function"==typeof r?r(a):void 0));return l},n.registered_names=function(){return Object.keys(i())},a={},e.exports={overrides:c,index:a,Models:n}},{"./common/models":"common/models","./core/logging":"core/logging","./core/util/underscore":"core/util/underscore",underscore:"underscore"}],client:[function(t,e,r){var n,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y;d=t("underscore"),c=t("es6-promise").Promise,l=t("./core/has_props"),f=t("./core/logging").logger,y=t("./document"),a=y.Document,h=y.ModelChangedEvent,p=y.RootAddedEvent,_=y.RootRemovedEvent,i="ws://localhost:5006/ws",s="default",u=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 o,i,s,a,l;try{return a=JSON.parse(e),l=JSON.parse(r),o=JSON.parse(n),new t(a,l,o)}catch(s){throw i=s,f.error("Failure parsing json "+i+" "+e+" "+r+" "+n,i),i}},t.create_header=function(t,e){var r;return r={msgid:d.uniqueId(),msgtype:t},d.extend(r,e)},t.create=function(e,r,n){var o;return null==n&&(n={}),o=t.create_header(e,r),new t(o,{},n)},t.prototype.send=function(t){var e,r,n,o,i;try{return o=JSON.stringify(this.header),i=JSON.stringify(this.metadata),e=JSON.stringify(this.content),t.send(o),t.send(i),t.send(e)}catch(n){throw r=n,f.error("Error sending ",this,r),r}},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}(),m={"PATCH-DOC":function(t,e){return t._for_session(function(t){return t._handle_patch(e)})},OK:function(t,e){return f.debug("Unhandled OK reply to "+e.reqid())},ERROR:function(t,e){return f.error("Unhandled ERROR reply to "+e.reqid()+": "+e.content.text)}},n=function(){function t(e,r,n,o){this.url=e,this.id=r,this._on_have_session_hook=n,this._on_closed_permanently_hook=o,this._number=t._connection_count,t._connection_count=this._number+1,null==this.url&&(this.url=i),null==this.id&&(this.id=s),f.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 c.reject(new Error("Cannot connect() a closed ClientConnection"));if(null!=this.socket)return c.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!=window.MozWebSocket?this.socket=new MozWebSocket(r):this.socket=new WebSocket(r),new c(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(e){return t=e,f.error("websocket creation failed to url: "+this.url),f.error(" - "+t),c.reject(t)}},t.prototype.close=function(){if(!this.closed_permanently&&(f.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||f.info("Websocket connection "+t._number+" disconnected, will not attempt to reconnect")}}(this),setTimeout(e,t)},t.prototype.send=function(t){var e,r;try{if(null===this.socket)throw new Error("not connected so cannot send "+t);return t.send(this.socket)}catch(r){return e=r,f.error("Error sending message ",e,t)}},t.prototype.send_with_reply=function(t){var e;return e=new c(function(e){return function(r,n){return e._pending_replies[t.msgid()]=[r,n],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=u.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?f.debug("Pulling session for first time"):f.debug("Repulling session"),this._pull_doc_json().then(function(t){return function(e){var r,n,i;return null!==t.session?(t.session.document.replace_with_json(e),f.debug("Updated existing session with new pulled doc")):t.closed_permanently?f.debug("Got new document after connection was already closed"):(r=a.from_json(e),n=a._compute_patch_since_json(e,r),n.events.length>0&&(f.debug("Sending "+n.events.length+" changes from model construction back to server"),i=u.create("PATCH-DOC",{},n),t.send(i)),t.session=new o(t,r,t.id),f.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),f.error("Failed to repull session "+t)})},t.prototype._on_open=function(t,e){return f.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){var e,r;try{return this._on_message_unchecked(t)}catch(r){return e=r,f.error("Error handling message: "+e+", "+t)}},t.prototype._on_message_unchecked=function(t){var e,r;if(null==this._current_handler&&f.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=u.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(f.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(){var t,e,r;e=this._pending_replies;for(r in e)return t=e[r],delete this._pending_replies[r],t;return null},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 f.debug("Websocket error on socket "+this._number),t(new Error("Could not open websocket"))},t.prototype._close_bad_protocol=function(t){if(f.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 m?m[t.msgtype()](this,t):f.debug("Doing nothing with message "+t.msgtype())},t}(),o=function(){function t(t,e,r){this._connection=t,this.document=e,this.id=r,this._current_patch=null,this.document_listener=function(t){return function(e){return t._document_changed(e)}}(this),this.document.on_change(this.document_listener)}return t.prototype.close=function(){return this._connection.close()},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=u.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._should_suppress_on_change=function(t,e){var r,n,o,i,s,a,u,c,f,m,g,y,v,b;if(e instanceof h){for(g=t.content.events,n=0,a=g.length;n<a;n++)if(r=g[n],"ModelChanged"===r.kind&&r.model.id===e.model.id&&r.attr===e.attr)if(m=r["new"],e.new_ instanceof l){if("object"==typeof m&&"id"in m&&m.id===e.new_.id)return!0}else if(d.isEqual(m,e.new_))return!0}else if(e instanceof p){for(y=t.content.events,o=0,u=y.length;o<u;o++)if(r=y[o],"RootAdded"===r.kind&&r.model.id===e.model.id)return!0}else if(e instanceof _){for(v=t.content.events,i=0,c=v.length;i<c;i++)if(r=v[i],"RootRemoved"===r.kind&&r.model.id===e.model.id)return!0}else if(e instanceof TitleChangedEvent)for(b=t.content.events,s=0,f=b.length;s<f;s++)if(r=b[s],"TitleChanged"===r.kind&&r.title===e.title)return!0;return!1},t.prototype._document_changed=function(t){var e;if(!(null!=this._current_patch&&this._should_suppress_on_change(this._current_patch,t)||t instanceof h&&!(t.attr in t.model.serializable_attributes())))return e=u.create("PATCH-DOC",{},this.document.create_json_patch([t])),this._connection.send(e)},t.prototype._handle_patch=function(t){this._current_patch=t;try{return this.document.apply_json_patch(t.content)}finally{this._current_patch=null}},t}(),g=function(t,e){var r,o,i;return i=null,r=null,o=new c(function(o,i){return r=new n(t,e,function(t){var e,r;try{return o(t)}catch(r){throw e=r,f.error("Promise handler threw an error, closing session "+error),t.close(),e}},function(){return i(new Error("Connection was closed before we successfully pulled a session"))}),r.connect().then(function(t){},function(t){throw f.error("Failed to connect to Bokeh server "+t),t})}),o.close=function(){return r.close()},o},e.exports={pull_session:g,DEFAULT_SERVER_WEBSOCKET_URL:i,DEFAULT_SESSION_ID:s}},{"./core/has_props":"core/has_props","./core/logging":"core/logging","./document":"document","es6-promise":"es6-promise",underscore:"underscore"}],"common/build_views":[function(t,e,r){var n,o,i;n=t("underscore"),o=function(t,e,r,o){var s,a,l,u,h,c,p,_,d,f,m;for(null==o&&(o=[]),s=[],d=n.filter(e,function(e){return!n.has(t,e.id)}),l=a=0,c=d.length;a<c;l=++a)_=d[l],m=n.extend({},r,{model:_}),l<o.length?t[_.id]=new o[l](m):t[_.id]=new _.default_view(m),t[_.id].$el.find("*[class*='ui-']").each(function(t,e){return e.className=i(e)}),s.push(t[_.id]);for(f=n.difference(n.keys(t),n.pluck(e,"id")),u=0,p=f.length;u<p;u++)h=f[u],t[h].remove(),delete t[h];return s},i=function(t){var e,r;if(null!=t.className)return e=t.className.split(" "),r=n.map(e,function(t){return t=t.trim(),0===t.indexOf("ui-")?"bk-"+t:t}),r.join(" ")},o.jQueryUIPrefixer=i,e.exports=o=o},{underscore:"underscore"}],"common/hittest":[function(t,e,r){var n,o,i,s,a,l,u,h,c,p;h=function(t,e,r,n){var o,i,s,a,l,u,h,c;for(i=!1,l=r[r.length-1],h=n[n.length-1],o=s=0,a=r.length;0<=a?s<a:s>a;o=0<=a?++s:--s)u=r[o],c=n[o],h<e!=c<e&&l+(e-h)/(c-h)*(u-l)<t&&(i=!i),l=u,h=c;return i},u=function(){return null},n=function(){function t(){this["0d"]={glyph:null,get_view:u,indices:[]},this["1d"]={indices:[]},this["2d"]={}}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}(),i=function(){return new n},p=function(t,e){var r,n,o,i,s,a;return o=t[0],i=t[1],s=e[0],a=e[1],o>i&&(r=[i,o],o=r[0],i=r[1]),s>a&&(n=[a,s],s=n[0],a=n[1]),{minX:o,minY:s,maxX:i,maxY:a}},c=function(t){return t*t},s=function(t,e,r,n){return c(t-r)+c(e-n)},l=function(t,e,r){var n,o;return n=s(e.x,e.y,r.x,r.y),0===n?s(t.x,t.y,e.x,e.y):(o=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/n,o<0?s(t.x,t.y,e.x,e.y):o>1?s(t.x,t.y,r.x,r.y):s(t.x,t.y,e.x+o*(r.x-e.x),e.y+o*(r.y-e.y)))},a=function(t,e,r){return Math.sqrt(l(t,e,r))},o=function(t,e,r,n,o,i,s,a){var l,u,h,c,p,_,d;return h=(a-i)*(r-t)-(s-o)*(n-e),0===h?{hit:!1,x:null,y:null}:(l=e-i,u=t-o,c=(s-o)*l-(a-i)*u,p=(r-t)*l-(n-e)*u,l=c/h,u=p/h,_=t+l*(r-t),d=e+l*(n-e),{hit:l>0&&l<1&&u>0&&u<1,x:_,y:d})},e.exports={point_in_poly:h,HitTestResult:n,create_hit_test_result:i,dist_2_pts:s,dist_to_segment:a,check_2_segments_intersect:o,validate_bbox_coords:p}},{}],"common/models":[function(t,e,r){e.exports={SelectionManager:t("./selection_manager"),Selector:t("./selector"),ToolEvents:t("./tool_events"),Arrow:t("../models/annotations/arrow"),BoxAnnotation:t("../models/annotations/box_annotation"),ColorBar:t("../models/annotations/color_bar"),Label:t("../models/annotations/label"),LabelSet:t("../models/annotations/label_set"),Legend:t("../models/annotations/legend"),PolyAnnotation:t("../models/annotations/poly_annotation"),Span:t("../models/annotations/span"),Title:t("../models/annotations/title"),Tooltip:t("../models/annotations/tooltip"),OpenHead:t("../models/annotations/arrow_head").OpenHead,NormalHead:t("../models/annotations/arrow_head").NormalHead,VeeHead:t("../models/annotations/arrow_head").VeeHead,CategoricalAxis:t("../models/axes/categorical_axis"),DatetimeAxis:t("../models/axes/datetime_axis"),LinearAxis:t("../models/axes/linear_axis"),LogAxis:t("../models/axes/log_axis"),CustomJS:t("../models/callbacks/customjs"),OpenURL:t("../models/callbacks/open_url"),Canvas:t("../models/canvas/canvas"),CartesianFrame:t("../models/canvas/cartesian_frame"),BasicTickFormatter:t("../models/formatters/basic_tick_formatter"),CategoricalTickFormatter:t("../models/formatters/categorical_tick_formatter"),DatetimeTickFormatter:t("../models/formatters/datetime_tick_formatter"),LogTickFormatter:t("../models/formatters/log_tick_formatter"),FuncTickFormatter:t("../models/formatters/func_tick_formatter"),NumeralTickFormatter:t("../models/formatters/numeral_tick_formatter"),PrintfTickFormatter:t("../models/formatters/printf_tick_formatter"),AnnularWedge:t("../models/glyphs/annular_wedge"),Annulus:t("../models/glyphs/annulus"),Arc:t("../models/glyphs/arc"),Bezier:t("../models/glyphs/bezier"),Circle:t("../models/glyphs/circle"),Ellipse:t("../models/glyphs/ellipse"),Gear:t("../models/glyphs/gear"),HBar:t("../models/glyphs/hbar"),Image:t("../models/glyphs/image"),ImageRGBA:t("../models/glyphs/image_rgba"),ImageURL:t("../models/glyphs/image_url"),Line:t("../models/glyphs/line"),MultiLine:t("../models/glyphs/multi_line"),Oval:t("../models/glyphs/oval"),Patch:t("../models/glyphs/patch"),Patches:t("../models/glyphs/patches"),Quad:t("../models/glyphs/quad"),Quadratic:t("../models/glyphs/quadratic"),Ray:t("../models/glyphs/ray"),Rect:t("../models/glyphs/rect"),Segment:t("../models/glyphs/segment"),Text:t("../models/glyphs/text"),VBar:t("../models/glyphs/vbar"),Wedge:t("../models/glyphs/wedge"),Grid:t("../models/grids/grid"),Column:t("../models/layouts/column"),Row:t("../models/layouts/row"),Spacer:t("../models/layouts/spacer"),WidgetBox:t("../models/layouts/widget_box"),CategoricalMapper:t("../models/mappers/categorical_mapper"),GridMapper:t("../models/mappers/grid_mapper"),LinearColorMapper:t("../models/mappers/linear_color_mapper"),LinearMapper:t("../models/mappers/linear_mapper"),LogColorMapper:t("../models/mappers/log_color_mapper"),LogMapper:t("../models/mappers/log_mapper"),Transform:t("../models/transforms/transform"),Jitter:t("../models/transforms/jitter"),Interpolator:t("../models/transforms/interpolator"),LinearInterpolator:t("../models/transforms/linear_interpolator"),StepInterpolator:t("../models/transforms/step_interpolator"),Asterisk:t("../models/markers/index").Asterisk,CircleCross:t("../models/markers/index").CircleCross,CircleX:t("../models/markers/index").CircleX,Cross:t("../models/markers/index").Cross,Diamond:t("../models/markers/index").Diamond,DiamondCross:t("../models/markers/index").DiamondCross,InvertedTriangle:t("../models/markers/index").InvertedTriangle,Square:t("../models/markers/index").Square,SquareCross:t("../models/markers/index").SquareCross,SquareX:t("../models/markers/index").SquareX,Triangle:t("../models/markers/index").Triangle,X:t("../models/markers/index").X,Plot:t("../models/plots/plot"),GMapPlot:t("../models/plots/gmap_plot"),DataRange1d:t("../models/ranges/data_range1d"),FactorRange:t("../models/ranges/factor_range"),Range1d:t("../models/ranges/range1d"),GlyphRenderer:t("../models/renderers/glyph_renderer"),AjaxDataSource:t("../models/sources/ajax_data_source"),ColumnDataSource:t("../models/sources/column_data_source"),GeoJSONDataSource:t("../models/sources/geojson_data_source"),AdaptiveTicker:t("../models/tickers/adaptive_ticker"),BasicTicker:t("../models/tickers/basic_ticker"),CategoricalTicker:t("../models/tickers/categorical_ticker"),CompositeTicker:t("../models/tickers/composite_ticker"),ContinuousTicker:t("../models/tickers/continuous_ticker"),DatetimeTicker:t("../models/tickers/datetime_ticker"),DaysTicker:t("../models/tickers/days_ticker"),FixedTicker:t("../models/tickers/fixed_ticker"),LogTicker:t("../models/tickers/log_ticker"),MonthsTicker:t("../models/tickers/months_ticker"),SingleIntervalTicker:t("../models/tickers/single_interval_ticker"),YearsTicker:t("../models/tickers/years_ticker"),TileRenderer:t("../models/tiles/tile_renderer"),TileSource:t("../models/tiles/tile_source"),TMSTileSource:t("../models/tiles/tms_tile_source"),WMTSTileSource:t("../models/tiles/wmts_tile_source"),QUADKEYTileSource:t("../models/tiles/quadkey_tile_source"),BBoxTileSource:t("../models/tiles/bbox_tile_source"),DynamicImageRenderer:t("../models/tiles/dynamic_image_renderer"),ImageSource:t("../models/tiles/image_source"),Toolbar:t("../models/tools/toolbar"),ToolbarBox:t("../models/tools/toolbar_box"),ButtonTool:t("../models/tools/button_tool"),ActionTool:t("../models/tools/actions/action_tool"),SaveTool:t("../models/tools/actions/save_tool"),UndoTool:t("../models/tools/actions/undo_tool"),RedoTool:t("../models/tools/actions/redo_tool"),ResetTool:t("../models/tools/actions/reset_tool"),HelpTool:t("../models/tools/actions/help_tool"),BoxSelectTool:t("../models/tools/gestures/box_select_tool"),BoxZoomTool:t("../models/tools/gestures/box_zoom_tool"),GestureTool:t("../models/tools/gestures/gesture_tool"),LassoSelectTool:t("../models/tools/gestures/lasso_select_tool"),PanTool:t("../models/tools/gestures/pan_tool"),PolySelectTool:t("../models/tools/gestures/poly_select_tool"),SelectTool:t("../models/tools/gestures/select_tool"),ResizeTool:t("../models/tools/gestures/resize_tool"),TapTool:t("../models/tools/gestures/tap_tool"),WheelZoomTool:t("../models/tools/gestures/wheel_zoom_tool"),CrosshairTool:t("../models/tools/inspectors/crosshair_tool"),HoverTool:t("../models/tools/inspectors/hover_tool"),InspectTool:t("../models/tools/inspectors/inspect_tool")}},{"../models/annotations/arrow":"models/annotations/arrow","../models/annotations/arrow_head":"models/annotations/arrow_head","../models/annotations/box_annotation":"models/annotations/box_annotation","../models/annotations/color_bar":"models/annotations/color_bar","../models/annotations/label":"models/annotations/label","../models/annotations/label_set":"models/annotations/label_set","../models/annotations/legend":"models/annotations/legend","../models/annotations/poly_annotation":"models/annotations/poly_annotation","../models/annotations/span":"models/annotations/span","../models/annotations/title":"models/annotations/title","../models/annotations/tooltip":"models/annotations/tooltip","../models/axes/categorical_axis":"models/axes/categorical_axis","../models/axes/datetime_axis":"models/axes/datetime_axis","../models/axes/linear_axis":"models/axes/linear_axis","../models/axes/log_axis":"models/axes/log_axis","../models/callbacks/customjs":"models/callbacks/customjs","../models/callbacks/open_url":"models/callbacks/open_url","../models/canvas/canvas":"models/canvas/canvas","../models/canvas/cartesian_frame":"models/canvas/cartesian_frame","../models/formatters/basic_tick_formatter":"models/formatters/basic_tick_formatter","../models/formatters/categorical_tick_formatter":"models/formatters/categorical_tick_formatter","../models/formatters/datetime_tick_formatter":"models/formatters/datetime_tick_formatter","../models/formatters/func_tick_formatter":"models/formatters/func_tick_formatter","../models/formatters/log_tick_formatter":"models/formatters/log_tick_formatter","../models/formatters/numeral_tick_formatter":"models/formatters/numeral_tick_formatter","../models/formatters/printf_tick_formatter":"models/formatters/printf_tick_formatter","../models/glyphs/annular_wedge":"models/glyphs/annular_wedge","../models/glyphs/annulus":"models/glyphs/annulus","../models/glyphs/arc":"models/glyphs/arc","../models/glyphs/bezier":"models/glyphs/bezier","../models/glyphs/circle":"models/glyphs/circle","../models/glyphs/ellipse":"models/glyphs/ellipse","../models/glyphs/gear":"models/glyphs/gear","../models/glyphs/hbar":"models/glyphs/hbar","../models/glyphs/image":"models/glyphs/image","../models/glyphs/image_rgba":"models/glyphs/image_rgba","../models/glyphs/image_url":"models/glyphs/image_url","../models/glyphs/line":"models/glyphs/line","../models/glyphs/multi_line":"models/glyphs/multi_line","../models/glyphs/oval":"models/glyphs/oval","../models/glyphs/patch":"models/glyphs/patch","../models/glyphs/patches":"models/glyphs/patches","../models/glyphs/quad":"models/glyphs/quad","../models/glyphs/quadratic":"models/glyphs/quadratic","../models/glyphs/ray":"models/glyphs/ray","../models/glyphs/rect":"models/glyphs/rect","../models/glyphs/segment":"models/glyphs/segment","../models/glyphs/text":"models/glyphs/text","../models/glyphs/vbar":"models/glyphs/vbar","../models/glyphs/wedge":"models/glyphs/wedge","../models/grids/grid":"models/grids/grid","../models/layouts/column":"models/layouts/column","../models/layouts/row":"models/layouts/row","../models/layouts/spacer":"models/layouts/spacer","../models/layouts/widget_box":"models/layouts/widget_box","../models/mappers/categorical_mapper":"models/mappers/categorical_mapper","../models/mappers/grid_mapper":"models/mappers/grid_mapper","../models/mappers/linear_color_mapper":"models/mappers/linear_color_mapper","../models/mappers/linear_mapper":"models/mappers/linear_mapper","../models/mappers/log_color_mapper":"models/mappers/log_color_mapper","../models/mappers/log_mapper":"models/mappers/log_mapper","../models/markers/index":"models/markers/index","../models/plots/gmap_plot":"models/plots/gmap_plot","../models/plots/plot":"models/plots/plot","../models/ranges/data_range1d":"models/ranges/data_range1d","../models/ranges/factor_range":"models/ranges/factor_range","../models/ranges/range1d":"models/ranges/range1d","../models/renderers/glyph_renderer":"models/renderers/glyph_renderer","../models/sources/ajax_data_source":"models/sources/ajax_data_source","../models/sources/column_data_source":"models/sources/column_data_source","../models/sources/geojson_data_source":"models/sources/geojson_data_source","../models/tickers/adaptive_ticker":"models/tickers/adaptive_ticker","../models/tickers/basic_ticker":"models/tickers/basic_ticker","../models/tickers/categorical_ticker":"models/tickers/categorical_ticker","../models/tickers/composite_ticker":"models/tickers/composite_ticker","../models/tickers/continuous_ticker":"models/tickers/continuous_ticker","../models/tickers/datetime_ticker":"models/tickers/datetime_ticker","../models/tickers/days_ticker":"models/tickers/days_ticker","../models/tickers/fixed_ticker":"models/tickers/fixed_ticker","../models/tickers/log_ticker":"models/tickers/log_ticker","../models/tickers/months_ticker":"models/tickers/months_ticker","../models/tickers/single_interval_ticker":"models/tickers/single_interval_ticker","../models/tickers/years_ticker":"models/tickers/years_ticker","../models/tiles/bbox_tile_source":"models/tiles/bbox_tile_source","../models/tiles/dynamic_image_renderer":"models/tiles/dynamic_image_renderer","../models/tiles/image_source":"models/tiles/image_source","../models/tiles/quadkey_tile_source":"models/tiles/quadkey_tile_source","../models/tiles/tile_renderer":"models/tiles/tile_renderer","../models/tiles/tile_source":"models/tiles/tile_source","../models/tiles/tms_tile_source":"models/tiles/tms_tile_source","../models/tiles/wmts_tile_source":"models/tiles/wmts_tile_source","../models/tools/actions/action_tool":"models/tools/actions/action_tool","../models/tools/actions/help_tool":"models/tools/actions/help_tool","../models/tools/actions/redo_tool":"models/tools/actions/redo_tool","../models/tools/actions/reset_tool":"models/tools/actions/reset_tool","../models/tools/actions/save_tool":"models/tools/actions/save_tool","../models/tools/actions/undo_tool":"models/tools/actions/undo_tool","../models/tools/button_tool":"models/tools/button_tool","../models/tools/gestures/box_select_tool":"models/tools/gestures/box_select_tool","../models/tools/gestures/box_zoom_tool":"models/tools/gestures/box_zoom_tool","../models/tools/gestures/gesture_tool":"models/tools/gestures/gesture_tool","../models/tools/gestures/lasso_select_tool":"models/tools/gestures/lasso_select_tool","../models/tools/gestures/pan_tool":"models/tools/gestures/pan_tool","../models/tools/gestures/poly_select_tool":"models/tools/gestures/poly_select_tool","../models/tools/gestures/resize_tool":"models/tools/gestures/resize_tool","../models/tools/gestures/select_tool":"models/tools/gestures/select_tool","../models/tools/gestures/tap_tool":"models/tools/gestures/tap_tool","../models/tools/gestures/wheel_zoom_tool":"models/tools/gestures/wheel_zoom_tool","../models/tools/inspectors/crosshair_tool":"models/tools/inspectors/crosshair_tool","../models/tools/inspectors/hover_tool":"models/tools/inspectors/hover_tool","../models/tools/inspectors/inspect_tool":"models/tools/inspectors/inspect_tool","../models/tools/toolbar":"models/tools/toolbar","../models/tools/toolbar_box":"models/tools/toolbar_box","../models/transforms/interpolator":"models/transforms/interpolator","../models/transforms/jitter":"models/transforms/jitter","../models/transforms/linear_interpolator":"models/transforms/linear_interpolator","../models/transforms/step_interpolator":"models/transforms/step_interpolator","../models/transforms/transform":"models/transforms/transform","./selection_manager":"common/selection_manager","./selector":"common/selector","./tool_events":"common/tool_events"}],"common/selection_manager":[function(t,e,r){var n,o,i,s,a,l,u,h=function(t,e){function r(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},c={}.hasOwnProperty;s=t("underscore"),n=t("../core/has_props"),l=t("../core/logging").logger,i=t("./selector"),a=t("./hittest"),u=t("../core/properties"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(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.selectors={},this.inspectors={},this.last_inspection_was_empty={}},e.prototype.select=function(t,e,r,n,o){var i,s,a;return null==o&&(o=!1),a=this.get("source"),a!==e.mget("data_source")&&l.warn("select called with mis-matched data sources"),i=e.hit_test(r),null!=i&&(s=this._get_selector(e),s.update(i,n,o),this.get("source").set({selected:s.get("indices")}),a.trigger("select"),a.trigger("select-"+e.mget("id")),!i.is_empty())},e.prototype.inspect=function(t,e,r,n){var o,i,s,a;if(a=this.get("source"),a!==e.mget("data_source")&&l.warn("inspect called with mis-matched data sources"),o=e.hit_test(r),null!=o){if(s=e.model.id,o.is_empty()){if(null==this.last_inspection_was_empty[s]&&(this.last_inspection_was_empty[s]=!1),this.last_inspection_was_empty[s])return;this.last_inspection_was_empty[s]=!0}else this.last_inspection_was_empty[s]=!1;return i=this._get_inspector(e),i.update(o,!0,!1,!0),this.get("source").set({inspected:i.get("indices")},{silent:!0}),a.trigger("inspect",o,t,e,a,n),a.trigger("inspect"+e.mget("id"),o,t,e,a,n),!o.is_empty()}return!1},e.prototype.clear=function(t){var e,r,n,o;if(null!=t)o=this._get_selector(t),o.clear();else{r=this.selectors;for(e in r)n=r[e],n.clear()}return this.get("source").set({selected:a.create_hit_test_result()})},e.prototype._get_selector=function(t){return s.setdefault(this.selectors,t.model.id,new i),this.selectors[t.model.id]},e.prototype._get_inspector=function(t){return s.setdefault(this.inspectors,t.model.id,new i),this.inspectors[t.model.id]},e}(n),e.exports=o},{"../core/has_props":"core/has_props","../core/logging":"core/logging","../core/properties":"core/properties","./hittest":"common/hittest","./selector":"common/selector",underscore:"underscore"}],"common/selector":[function(t,e,r){var n,o,i,s,a,l,u=function(t,e){function r(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},h={}.hasOwnProperty;i=t("underscore"),n=t("../core/has_props"),s=t("./hittest"),a=t("../core/logging").logger,l=t("../core/properties"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="Selector",e.prototype.update=function(t,e,r,n){return null==n&&(n=!1),this.set("timestamp",new Date,{silent:n}),this.set("final",e,{silent:n}),r&&(t["0d"].indices=i.union(this.get("indices")["0d"].indices,t["0d"].indices), t["0d"].glyph=this.get("indices")["0d"].glyph||t["0d"].glyph,t["1d"].indices=i.union(this.get("indices")["1d"].indices,t["1d"].indices),t["2d"].indices=i.union(this.get("indices")["2d"].indices,t["2d"].indices)),this.set("indices",t,{silent:n})},e.prototype.clear=function(){return this.set("timestamp",new Date),this.set("final",!0),this.set("indices",s.create_hit_test_result())},e.internal({indices:[l.Any,function(){return s.create_hit_test_result()}],"final":[l.Boolean],timestamp:[l.Any]}),e}(n),e.exports=o},{"../core/has_props":"core/has_props","../core/logging":"core/logging","../core/properties":"core/properties","./hittest":"common/hittest",underscore:"underscore"}],"common/tool_events":[function(t,e,r){var n,o,i,s,a,l=function(t,e){function r(){this.constructor=t}for(var n in e)u.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},u={}.hasOwnProperty;i=t("underscore"),n=t("../model"),s=t("../core/logging").logger,a=t("../core/properties"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="ToolEvents",e.define({geometries:[a.Array,[]]}),e}(n),e.exports={Model:o}},{"../core/logging":"core/logging","../core/properties":"core/properties","../model":"model",underscore:"underscore"}],"common/ui_events":[function(t,e,r){var n,o,i,s,a,l,u=function(t,e){function r(){this.constructor=t}for(var n in e)h.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},h={}.hasOwnProperty;n=t("jquery"),o=t("backbone"),i=t("hammerjs"),l=t("jquery-mousewheel")(n),a=t("../core/logging").logger,s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.initialize=function(t,r){return e.__super__.initialize.call(this,t,r),this._hammer_element()},e.prototype._hammer_element=function(){var t;return t=this.get("hit_area"),this.hammer=new i(t[0]),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:i.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)),t.mousemove(function(t){return function(e){return t._mouse_move(e)}}(this)),t.mouseenter(function(t){return function(e){return t._mouse_enter(e)}}(this)),t.mouseleave(function(t){return function(e){return t._mouse_exit(e)}}(this)),t.mousewheel(function(t){return function(e,r){return t._mouse_wheel(e,r)}}(this)),n(document).keydown(function(t){return function(e){return t._key_down(e)}}(this)),n(document).keyup(function(t){return function(e){return t._key_up(e)}}(this))},e.prototype.register_tool=function(t){var e,r,n;return e=t.model.event_type,r=t.model.id,n=t.model.type,null==e?void a.debug("Button tool: "+n):("pan"===e||"pinch"===e||"rotate"===e?(a.debug("Registering tool: "+n+" for event '"+e+"'"),null!=t["_"+e+"_start"]&&t.listenTo(this,e+":start:"+r,t["_"+e+"_start"]),t["_"+e]&&t.listenTo(this,e+":"+r,t["_"+e]),t["_"+e+"_end"]&&t.listenTo(this,e+":end:"+r,t["_"+e+"_end"])):"move"===e?(a.debug("Registering tool: "+n+" for event '"+e+"'"),null!=t._move_enter&&t.listenTo(this,"move:enter",t._move_enter),t.listenTo(this,"move",t._move),null!=t._move_exit&&t.listenTo(this,"move:exit",t._move_exit)):(a.debug("Registering tool: "+n+" for event '"+e+"'"),t.listenTo(this,e+":"+r,t["_"+e])),null!=t._keydown&&(a.debug("Registering tool: "+n+" for event 'keydown'"),t.listenTo(this,"keydown",t._keydown)),null!=t._keyup&&(a.debug("Registering tool: "+n+" for event 'keyup'"),t.listenTo(this,"keyup",t._keyup)),null!=t._doubletap&&(a.debug("Registering tool: "+n+" for event 'doubletap'"),t.listenTo(this,"doubletap",t._doubletap)),("ontouchstart"in window||navigator.maxTouchPoints>0)&&"pinch"===e?(a.debug("Registering scroll on touch screen"),t.listenTo(this,"scroll:"+r,t._scroll)):void 0)},e.prototype._trigger=function(t,e){var r,n,o,i;if(i=this.get("toolbar"),n=t.split(":")[0],("ontouchstart"in window||navigator.maxTouchPoints>0)&&"scroll"===t&&(n="pinch"),o=i.get("gestures"),r=o[n].active,null!=r)return this._trigger_event(t,r,e)},e.prototype._trigger_event=function(t,e,r){if(e.get("active")===!0)return"scroll"===t&&(r.preventDefault(),r.stopPropagation()),this.trigger(t+":"+e.id,r)},e.prototype._bokify_hammer=function(t){var e,r,o,i,s,a,l;return"mouse"===t.pointerType?(a=t.srcEvent.pageX,l=t.srcEvent.pageY):(a=t.pointers[0].pageX,l=t.pointers[0].pageY),r=n(t.target).offset(),e=null!=(o=r.left)?o:0,s=null!=(i=r.top)?i:0,t.bokeh={sx:a-e,sy:l-s}},e.prototype._bokify_jq=function(t){var e,r,o,i,s;return r=n(t.currentTarget).offset(),e=null!=(o=r.left)?o:0,s=null!=(i=r.top)?i:0,t.bokeh={sx:t.pageX-e,sy:t.pageY-s}},e.prototype._tap=function(t){return this._bokify_hammer(t),this._trigger("tap",t)},e.prototype._doubletap=function(t){return this._bokify_hammer(t),this.trigger("doubletap",t)},e.prototype._press=function(t){return this._bokify_hammer(t),this._trigger("press",t)},e.prototype._pan_start=function(t){return this._bokify_hammer(t),t.bokeh.sx-=t.deltaX,t.bokeh.sy-=t.deltaY,this._trigger("pan:start",t)},e.prototype._pan=function(t){return this._bokify_hammer(t),this._trigger("pan",t)},e.prototype._pan_end=function(t){return this._bokify_hammer(t),this._trigger("pan:end",t)},e.prototype._pinch_start=function(t){return this._bokify_hammer(t),this._trigger("pinch:start",t)},e.prototype._pinch=function(t){return this._bokify_hammer(t),this._trigger("pinch",t)},e.prototype._pinch_end=function(t){return this._bokify_hammer(t),this._trigger("pinch:end",t)},e.prototype._rotate_start=function(t){return this._bokify_hammer(t),this._trigger("rotate:start",t)},e.prototype._rotate=function(t){return this._bokify_hammer(t),this._trigger("rotate",t)},e.prototype._rotate_end=function(t){return this._bokify_hammer(t),this._trigger("rotate:end",t)},e.prototype._mouse_enter=function(t){return this._bokify_jq(t),this.trigger("move:enter",t)},e.prototype._mouse_move=function(t){return this._bokify_jq(t),this.trigger("move",t)},e.prototype._mouse_exit=function(t){return this._bokify_jq(t),this.trigger("move:exit",t)},e.prototype._mouse_wheel=function(t,e){return this._bokify_jq(t),t.bokeh.delta=e,this._trigger("scroll",t)},e.prototype._key_down=function(t){return this.trigger("keydown",t)},e.prototype._key_up=function(t){return this.trigger("keyup",t)},e}(o.Model),e.exports=s},{"../core/logging":"core/logging",backbone:"backbone",hammerjs:"hammerjs/hammer",jquery:"jquery","jquery-mousewheel":"jquery-mousewheel"}],"core/bokeh_view":[function(t,e,r){var n,o,i,s=function(t,e){function r(){this.constructor=t}for(var n in e)a.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),n=t("backbone"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){if(!i.has(t,"id"))return this.id=i.uniqueId("BokehView")},e.prototype.bind_bokeh_events=function(){},e.prototype.remove=function(){var t,r,n;if(i.has(this,"eventers")){t=this.eventers;for(r in t)a.call(t,r)&&(n=t[r],n.off(null,null,this))}return this.trigger("remove",this),e.__super__.remove.call(this)},e.prototype.mget=function(){return this.model.get.apply(this.model,arguments)},e.prototype.mset=function(){return this.model.set.apply(this.model,arguments)},e}(n.View),e.exports=o},{backbone:"backbone",underscore:"underscore"}],"core/enums":[function(t,e,r){e.exports={AngleUnits:["deg","rad"],Dimension:["width","height"],Direction:["clock","anticlock"],FontStyle:["normal","italic","bold"],LineCap:["butt","round","square"],LineJoin:["miter","round","bevel"],Location:["above","below","left","right"],LegendLocation:["top_left","top_center","top_right","left_center","center","right_center","bottom_left","bottom_center","bottom_right"],Orientation:["vertical","horizontal"],RenderLevel:["image","underlay","glyph","annotation","overlay","tool"],RenderMode:["canvas","css"],Side:["left","right"],SpatialUnits:["screen","data"],StartEnd:["start","end"],TextAlign:["left","right","center"],TextBaseline:["top","middle","bottom","alphabetic","hanging","ideographic"],DistributionTypes:["uniform","normal"],TransformStepModes:["after","before","center"],SizingMode:["stretch_both","scale_width","scale_height","scale_both","fixed"]}},{}],"core/has_props":[function(t,e,r){var n,o,i,s,a,l,u,h=function(t,e){function r(){this.constructor=t}for(var n in e)c.call(e,n)&&(t[n]=e[n]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},c={}.hasOwnProperty,p=[].slice;n=t("jquery"),s=t("underscore"),o=t("backbone"),a=t("./logging").logger,l=t("./property_mixins"),u=t("./util/refs"),i=function(t){function e(t,e){var r,n,o,i,a,l;this.document=null,r=t||{},e||(e={}),this.cid=s.uniqueId("c"),this.attributes={},this.properties={},i=this.props;for(o in i){if(a=i[o],l=a.type,n=a.default_value,null==l)throw new Error("undefined property type for "+this.type+"."+o);this.properties[o]=new l({obj:this,attr:o,default_value:n})}e.parse&&(r=this.parse(r,e)||{}),this._set_after_defaults={},this.set(r,e),this.changed={},this._computed={},s.has(r,this.idAttribute)||(this.id=s.uniqueId(this.type),this.attributes[this.idAttribute]=this.id),e.defer_initialization||this.initialize.apply(this,arguments)}return h(e,t),e.prototype.props={},e.prototype.mixins=[],e.define=function(t){var e,r,n;n=[];for(e in t)r=t[e],n.push(function(t){return function(e,r){var n,o,i,a,l;if(null!=t.prototype.props[e])throw new Error("attempted to redefine property '"+t.name+"."+e+"'");if(null!=t.prototype[e]&&"url"!==e)throw new Error("attempted to redefine attribute '"+t.name+"."+e+"'");return Object.defineProperty(t.prototype,e,{get:function(){return this.get(e)},set:function(t){return this.set(e,t)}},{configurable:!1,enumerable:!0}),l=r[0],n=r[1],o=r[2],a={type:l,default_value:n,internal:null!=o&&o},i=s.clone(t.prototype.props),i[e]=a,t.prototype.props=i}}(this)(e,r));return n},e.internal=function(t){var e,r,n,o;e={},r=function(t){return function(t,r){var n,o;return o=r[0],n=r[1],e[t]=[o,n,!0]}}(this);for(n in t)o=t[n],r(n,o);return this.define(e)},e.mixin=function(){var t,e;return e=1<=arguments.length?p.call(arguments,0):[],this.define(l.create(e)),t=this.prototype.mixins.concat(e),this.prototype.mixins=t},e.mixins=function(t){return this.mixin.apply(this,t)},e.override=function(t,e){var r,n,o;s.isString(t)?(n={},n[r]=e):n=t,o=[];for(r in n)e=n[r],o.push(function(t){return function(e,r){var n,o;if(o=t.prototype.props[e],null==o)throw new Error("attempted to override nonexistent '"+t.name+"."+e+"'");return n=s.clone(t.prototype.props),n[e]=s.extend({},o,{default_value:r}),t.prototype.props=n}}(this)(r,e));return o},e.prototype.toString=function(){return this.type+"("+this.id+")"},e.prototype.destroy=function(t){return e.__super__.destroy.call(this,t),this.stopListening()},e.prototype.set=function(t,r,n){var o,i,a,l,u;s.isObject(t)||null===t?(o=t,n=r):(o={},o[t]=r);for(t in o)if(c.call(o,t)){if(u=o[t],a=t,"id"!==a&&!this.props[a])throw new Error(this.type+".set('"+a+"'): "+a+" wasn't declared");null!=n&&n.defaults||(this._set_after_defaults[t]=!0)}if(!s.isEmpty(o)){i={};for(t in o)r=o[t],i[t]=this.get(t);if(e.__super__.set.call(this,o,n),null==(null!=n?n.silent:void 0)){l=[];for(t in o)r=o[t],l.push(this._tell_document_about_change(t,i[t],this.get(t)));return l}}},e.prototype.add_dependencies=function(t,e,r){var n,o,i,a,l;for(s.isArray(r)||(r=[r]),a=this._computed[t],a.dependencies=a.dependencies.concat({obj:e,fields:r}),l=[],o=0,i=r.length;o<i;o++)n=r[o],l.push(this.listenTo(e,"change:"+n,a.callbacks.changedep));return l},e.prototype.define_computed_property=function(t,e,r){var n,o,i;if(null==r&&(r=!0),null!=this.props[t]&&console.log("attempted to redefine existing property "+this.type+"."+t),s.has(this._computed,t))throw new Error("attempted to redefine existing computed property "+this.type+"."+t);return n=function(e){return function(){return e.trigger("changedep:"+t)}}(this),i=function(e){return function(){var r,n,i;if(r=!0,o.use_cache&&(i=o.cache,o.cache=void 0,n=e.get(t),r=n!==i),r)return e.trigger("change:"+t,e,e.get(t)),e.trigger("change",e)}}(this),o={getter:e,dependencies:[],use_cache:r,callbacks:{changedep:n,propchange:i}},this._computed[t]=o,this.listenTo(this,"changedep:"+t,o.callbacks.propchange),o},e.prototype.override_computed_property=function(t,e,r){return null==r&&(r=!0),s.has(this._computed,t)&&this._remove_computed_property(t),this.define_computed_property(t,e,r)},e.prototype._remove_computed_property=function(t){var e,r,n,o,i,s,a,l,u,h;for(u=this._computed[t],r=u.dependencies,o=0,s=r.length;o<s;o++)for(e=r[o],l=e.obj,h=e.fields,i=0,a=h.length;i<a;i++)n=h[i],l.off("change:"+n,u.callbacks.changedep,this);return this.off("changedep:"+e),delete this._computed[t]},e.prototype.get=function(t){if(s.has(this._computed,t))return this._get_prop(t);if("id"!==t&&!this.props[t])throw new Error(this.type+".get('"+t+"'): "+t+" wasn't declared");return e.__super__.get.call(this,t)},e.prototype._get_prop=function(t){var e,r,n;return n=this._computed[t],n.use_cache&&n.cache?n.cache:(r=n.getter,e=r.apply(this,[t]),n.use_cache&&(n.cache=e),e)},e.prototype.ref=function(){return u.create_ref(this)},e.prototype.set_subtype=function(t){return this._subtype=t},e.prototype.sync=function(t,e,r){return r.success(e.attributes,null,{})},e.prototype.defaults=function(){throw new Error("don't use HasProps.defaults anymore")},e.prototype.attribute_is_serializable=function(t){var e;if("id"===t)return!0;if(e=this.props[t],null==e)throw new Error(this.type+".attribute_is_serializable('"+t+"'): "+t+" wasn't declared");return!e.internal},e.prototype.serializable_attributes=function(){var t,e,r,n;t={},r=this.attributes;for(e in r)n=r[e],this.attribute_is_serializable(e)&&(t[e]=n);return t},e.prototype.toJSON=function(t){throw new Error("bug: toJSON should not be called on "+this+", models require special serialization measures")},e._value_to_json=function(t,r,n){var o,i,a,l,u,h,p;if(r instanceof e)return r.ref();if(s.isArray(r)){for(l=[],o=i=0,a=r.length;i<a;o=++i)p=r[o],l.push(e._value_to_json(o,p,r));return l}if(s.isObject(r)){u={};for(h in r)c.call(r,h)&&(u[h]=e._value_to_json(h,r[h],r));return u}return r},e.prototype.attributes_as_json=function(t,r){var n,o,i,s;null==t&&(t=!0),null==r&&(r=e._value_to_json),n={},i=this.serializable_attributes();for(o in i)c.call(i,o)&&(s=i[o],t?n[o]=s:o in this._set_after_defaults&&(n[o]=s));return r("attributes",n,this)},e._json_record_references=function(t,r,n,o){var i,a,l,h,p,_,d;if(null===r);else if(u.is_ref(r)){if(!(r.id in n))return p=t.get_model_by_id(r.id),e._value_record_references(p,n,o)}else{if(s.isArray(r)){for(_=[],a=0,h=r.length;a<h;a++)i=r[a],_.push(e._json_record_references(t,i,n,o));return _}if(s.isObject(r)){d=[];for(l in r)c.call(r,l)&&(i=r[l],d.push(e._json_record_references(t,i,n,o)));return d}}},e._value_record_references=function(t,r,n){var o,i,a,l,u,h,p,_,d,f,m;if(null===t);else if(t instanceof e){if(!(t.id in r)&&(r[t.id]=t,n)){for(i=t._immediate_references(),d=[],a=0,h=i.length;a<h;a++)_=i[a],d.push(e._value_record_references(_,r,!0));return d}}else{if(s.isArray(t)){for(f=[],u=0,p=t.length;u<p;u++)o=t[u],f.push(e._value_record_references(o,r,n));return f}if(s.isObject(t)){m=[];for(l in t)c.call(t,l)&&(o=t[l],m.push(e._value_record_references(o,r,n)));return m}}},e.prototype._immediate_references=function(){var t,r,n,o;n={},t=this.serializable_attributes();for(r in t)o=t[r],e._value_record_references(o,n,!1);return s.values(n)},e.prototype.references=function(){var t;return t={},e._value_record_references(this,t,!0),s.values(t)},e.prototype.attach_document=function(t){var e,r,n;if(null!==this.document&&this.document!==t)throw new Error("models must be owned by only a single document");this.document=t,n=this.properties;for(e in n)r=n[e],r.update();if(null!=this._doc_attached)return this._doc_attached()},e.prototype.detach_document=function(){return this.document=null},e.prototype._tell_document_about_change=function(t,r,n){var o,i,s,a,l,u,h;if(this.attribute_is_serializable(t)&&null!==this.document){a={},e._value_record_references(n,a,!1),h={},e._value_record_references(r,h,!1),o=!1;for(i in a)if(s=a[i],!(i in h)){o=!0;break}if(!o)for(l in h)if(u=h[l],!(l in a)){o=!0;break}return o&&this.document._invalidate_all_models(),this.document._notify_change(this,t,r,n)}},e}(o.Model),e.exports=i},{"./logging":"core/logging","./property_mixins":"core/property_mixins","./util/refs":"core/util/refs",backbone:"backbone",jquery:"jquery",underscore:"underscore"}],"core/layout/layout_canvas":[function(t,e,r){var n,o,i,s,a,l,u,h,c,p=function(t,e){function r(){this.constructor=t}for(var n in e)_.call(e,n)&&(t[n]=e[n]);return r.prototype=e.pro