vizzu
Version:
Vizzu is a free, open-source Javascript/C++ library utilizing a generic dataviz engine that generates many types of charts and seamlessly animates between them. It can be used to create static charts but more importantly it is designed for building animat
1 lines • 116 kB
JavaScript
class Render{init(e,t,r){this.polygonFirstPoint=!1,this.offscreenCanvas=document.createElement("CANVAS"),this.offscreenContext=this.offscreenCanvas.getContext("2d"),this.update=e,this.mainCanvas=t,this.mainCanvas.font="Roboto Condensed",this.mainCanvas.textAlign="left",this.mainCanvas.textBaseline="top",this.context=t.getContext("2d"),this.log=r,this.updateCanvasSize(),this.prevUpdateHash=""}canvas(){return this.mainCanvas}dc(){return this.offscreenContext}clientRect(){return this.mainCanvas.getBoundingClientRect()}frameBegin(){this.currentLineWidth=1,this.offscreenContext.clearRect(0,0,this.mainCanvas.width,this.mainCanvas.height)}frameEnd(){this.context.clearRect(0,0,this.mainCanvas.width,this.mainCanvas.height),this.context.drawImage(this.offscreenCanvas,0,0)}lineWidthNotification(e){this.currentLineWidth=e}noneZeroLineWidth(){return 0!=this.currentLineWidth}startPolygonNotification(){var e=this.polygonFirstPoint;return this.polygonFirstPoint=!0,!e}endPolygonNotification(){this.polygonFirstPoint=!1}updateCanvasSize(){this.scaleFactor=window.devicePixelRatio,this.cssWidth=+getComputedStyle(this.mainCanvas).width.slice(0,-2),this.cssHeight=+getComputedStyle(this.mainCanvas).height.slice(0,-2);var e=`${this.scaleFactor}:${this.cssWidth}:${this.cssHeight}`;e!=this.prevUpdateHash&&(this.mainCanvas.width=this.cssWidth*this.scaleFactor,this.mainCanvas.height=this.cssHeight*this.scaleFactor,this.offscreenCanvas.width=this.cssWidth*this.scaleFactor,this.offscreenCanvas.height=this.cssHeight*this.scaleFactor,this.offscreenContext.translate(.5,.5),this.offscreenContext.scale(this.scaleFactor,this.scaleFactor)),this.prevUpdateHash=e}updateFrame(e){var t=performance.now();this.updateCanvasSize(),0<this.mainCanvas.width&&0<this.mainCanvas.height&&this.update(this.scaleFactor,this.cssWidth,this.cssHeight,e);t=performance.now()-t;this.log&&1<t&&console.log("Render.updateFrame: "+t.toFixed(2)+"ms")}}class Events{constructor(e){this.vizzu=e,this.module=e.module,this.eventHandlers=new Map}add(e,t){if("string"!=typeof e&&!(e instanceof String))throw new Error("first parameter should be string");e=this.vizzu.toCString(e);try{var r=this.vizzu.call(this.module._addEventListener)(e);this.eventHandlers.set(r,t)}finally{this.module._free(e)}}remove(e,n){let o=this.vizzu.toCString(e);if("string"!=typeof e&&!(e instanceof String))throw new Error("first parameter should be string");try{if(void 0===n)this.vizzu.call(this.module._removeEventListener)(o,0);else{let r=!1;if(this.eventHandlers.forEach((e,t)=>{e==n&&(r=!0,this.vizzu.call(this.module._removeEventListener)(o,t))}),!r)throw new Error("unknown event handler")}}finally{this.eventHandlers.delete(n),this.module._free(o)}}invoke(t,r){try{if(this.eventHandlers.has(t)){let e=JSON.parse(this.vizzu.fromCString(r));e.preventDefault=()=>{this.vizzu.call(this.module._event_preventDefault)()},e.event.endsWith("-draw")&&(e.renderingContext=this.vizzu.render.dc()),this.eventHandlers.get(t)(e)}}catch(e){console.log("exception in event handler: "+e)}}}const assert=(e,t)=>{if(!e)throw new Error("Assert failed: "+t)},assertArray=(t,e,r)=>{assert(Array.isArray(e),"array is not a list");try{if(e.length!==t.dimensions[r].values.length)throw new Error("Assert failed")}catch(e){assert(!1,"dimensions are not the same")}e.forEach(e=>{Array.isArray(e)&&assertArray(t,e,r-1)})};class UnPivot{static isPivot(e){return void 0!==e.dimensions||void 0!==e.measures}static convert(o){assert("object"==typeof o&&null!==o&&!Array.isArray(o),"data is not an object"),assert("dimensions"in o,"data.dimensions is requreid"),assert("measures"in o,"data.measures is requreid"),o.series=[];let i=1;assert(Array.isArray(o.dimensions),"data.dimensions is not a list");for(let e=0;e<o.dimensions.length;e++){var t=o.dimensions[e];assert("object"==typeof t&&null!==t&&!Array.isArray(t),"data.dimensions.item is not an object"),assert("name"in t,"data.dimensions.item.name is requreid"),assert(void 0===t.type||"dimension"===t.type,"data.dimensions.item.type is invalid"),assert("values"in t,"data.dimensions.item.values is requreid"),assert(Array.isArray(t.values),"data.dimensions.item.values is not a list"),assert(0!==t.values.length,"data.dimensions.item.values length is zero"),i*=t.values.length}let s=1;for(let n=0;n<o.dimensions.length;n++){let e=o.dimensions[n],t=[],r=[];e.values.forEach(t=>{for(let e=1;e<=s;e++)r.push(t)}),s*=e.values.length;for(let e=1;e<=i/s;e++)t=t.concat(r);var a={name:e.name,type:e.type||"dimension",values:t};o.series.push(a)}assert("object"==typeof o.measures&&null!==o.measures,"data.measures is not a list or an object"),Array.isArray(o.measures)||(o.measures=[o.measures]);for(let r=0;r<o.measures.length;r++){let e=o.measures[r];assert("object"==typeof e&&null!==e&&!Array.isArray(e),"data.measures.item is not an object"),assert("name"in e,"data.measures.item.name is requreid"),assert("values"in e,"data.measures.item.values is requreid"),assert(Array.isArray(e.values),"data.measures.item.values is not a list"),assertArray(o,e.values,o.dimensions.length-1);let t={name:e.name,type:e.type,values:e.values.flat(1/0)};void 0===t.type&&delete t.type,assert(t.values.length===i,"dimensions are not the same"),o.series.push(t)}}}class DataRecord{constructor(e,t){return this.chart=e,this.record=t,new Proxy(this,{get:(e,t)=>e.getValue(t)})}getValue(e){e=this.chart.toCString(e);let t,r;try{t=this.chart.call(this.chart.module._record_getValue)(this.record,e,!0),r=t?this.chart.fromCString(t):(t=this.chart.call(this.chart.module._record_getValue)(this.record,e,!1),this.chart.module.getValue(t,"double"))}finally{this.chart.module._free(e)}return r}}class Data{constructor(e){this.chart=e}set(e){if(null!=e){if(UnPivot.isPivot(e)){if(this.is1NF(e))throw new Error("inconsistent data form: series/records and dimensions/measures are both set.");UnPivot.convert(e)}if(void 0!==e.series){if(null===e.series||!Array.isArray(e.series))throw new Error("data series field is not an array");for(const t of e.series)this.setSeries(t)}if(void 0!==e.records){if(null===e.records||!Array.isArray(e.records))throw new Error("data records field is not an array");for(const r of e.records)this.addRecord(r)}void 0!==e.filter&&this.setFilter(e.filter)}}addRecord(t){if(null===t||!Array.isArray(t))throw new Error("data record is not an array");let r=new Uint32Array(t.length);for(let e=0;e<t.length;e++){var n=this.chart.toCString(String(t[e]).toString());r[e]=n}var e=4*t.length,o=this.chart.module._malloc(e);new Uint8Array(this.chart.module.HEAPU8.buffer,o,e).set(new Uint8Array(r.buffer));try{this.chart.call(this.chart.module._data_addRecord)(o,t.length)}finally{for(var i of r)this.chart.module._free(i);this.chart.module._free(o)}}setSeries(e){if(void 0===e.name)throw new Error("missing series name");if(void 0===e.values&&(e.values=[]),void 0===e.type&&(e.type=this.detectType(e.values)),"dimension"===e.type)this.addDimension(e.name,e.values);else{if("measure"!==e.type)throw new Error("invalid series type: "+e.type);this.addMeasure(e.name,e.values)}}detectType(e){return e instanceof Array&&1<=e.length?"number"==typeof e[0]?"measure":"string"==typeof e[0]||e[0]instanceof String?"dimension":void 0:void 0}addDimension(e,t){if("string"!=typeof e&&!(e instanceof String))throw new Error("first parameter should be string");if(!(t instanceof Array))throw new Error("second parameter should be an array");let r=new Uint32Array(t.length);for(let e=0;e<t.length;e++){if("string"!=typeof t[e]&&!(t[e]instanceof String))throw new Error("array element should be string");var n=this.chart.toCString(t[e]);r[e]=n}var o=4*t.length,i=this.chart.module._malloc(o);new Uint8Array(this.chart.module.HEAPU8.buffer,i,o).set(new Uint8Array(r.buffer));e=this.chart.toCString(e);try{this.chart.call(this.chart.module._data_addDimension)(e,i,t.length)}finally{this.chart.module._free(e);for(var s of r)this.chart.module._free(s);this.chart.module._free(i)}}addMeasure(e,t){if("string"!=typeof e&&!(e instanceof String))throw new Error("first parameter should be string");if(!(t instanceof Array))throw new Error("second parameter should be an array");var r=new Float64Array(t),n=8*t.length,o=this.chart.module._malloc(n);new Uint8Array(this.chart.module.HEAPU8.buffer,o,n).set(new Uint8Array(r.buffer));e=this.chart.toCString(e);try{this.chart.call(this.chart.module._data_addMeasure)(e,o,t.length)}finally{this.chart.module._free(e),this.chart.module._free(o)}}setFilter(t){if("function"==typeof t){var e=this.chart.module.addFunction(e=>t(new DataRecord(this.chart,e)),"ii");this.chart.call(this.chart.module._chart_setFilter)(e)}else{if(null!==t)throw new Error("data filter is not a function or null");this.chart.call(this.chart.module._chart_setFilter)(0)}}is1NF(e){return void 0!==e.series||void 0!==e.records}}class AnimControl{constructor(e){this.chart=e}seek(e){this.animControl("seek",e)}pause(){this.animControl("pause")}play(){this.animControl("play")}stop(){this.animControl("stop")}reverse(){this.animControl("reverse")}animControl(e,t=""){e=this.chart.toCString(e),t=this.chart.toCString(t);try{this.chart.call(this.chart.module._anim_control)(e,t)}finally{this.chart.module._free(t),this.chart.module._free(e)}}}class Tooltip{constructor(e){this.set=!1,this.chart=e,this.id=0,this.animating=!1,this.lastMarkerId=null,this.lastMove=new Date,this.mouseMoveHandler=e=>{this.mousemove(e)},this.mouseOnHandler=e=>{this.mouseon(e)},this.enabled=!1}enable(e){e!==this.set&&(e?(this.chart.on("mousemove",this.mouseMoveHandler),this.chart.on("mouseon",this.mouseOnHandler)):(this.chart.off("mousemove",this.mouseMoveHandler),this.chart.off("mouseon",this.mouseOnHandler),this.id++,setTimeout(()=>{this.out(this.id)},200)),this.set=e)}mousemove(){this.lastMove=new Date}mouseon(e){this.id++;let t=this.id;void 0===e.data.marker?setTimeout(()=>{this.out(t)},200):setTimeout(()=>{this.in(t,e.data.marker.id)},0)}in(e,t){this.id==e&&(this.animating?setTimeout(()=>{this.in(e,t)},100):(this.lastMarkerId=t,this.animating=!0,this.chart.animate({config:{tooltip:t}},void 0!==this.lastMarkerId?"100ms":"250ms").then(()=>{this.animating=!1})))}out(e){var t;this.id==e&&(t=new Date-this.lastMove,!this.animating&&200<t?(this.lastMarkerId=null,this.animating=!0,this.chart.animate({config:{tooltip:null}},"250ms").then(()=>{this.animating=!1})):setTimeout(()=>{this.out(e)},200-t))}}var VizzuModule=function(){var Be=import.meta.url;return function(e){var r,n,d=void 0!==(e=e||{})?e:{};d.ready=new Promise(function(e,t){r=e,n=t}),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_init")||(Object.defineProperty(d.ready,"_vizzu_init",{configurable:!0,get:function(){ue("You are getting _vizzu_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_init",{configurable:!0,set:function(){ue("You are setting _vizzu_init on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_poll")||(Object.defineProperty(d.ready,"_vizzu_poll",{configurable:!0,get:function(){ue("You are getting _vizzu_poll on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_poll",{configurable:!0,set:function(){ue("You are setting _vizzu_poll on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_mouseDown")||(Object.defineProperty(d.ready,"_vizzu_mouseDown",{configurable:!0,get:function(){ue("You are getting _vizzu_mouseDown on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_mouseDown",{configurable:!0,set:function(){ue("You are setting _vizzu_mouseDown on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_mouseUp")||(Object.defineProperty(d.ready,"_vizzu_mouseUp",{configurable:!0,get:function(){ue("You are getting _vizzu_mouseUp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_mouseUp",{configurable:!0,set:function(){ue("You are setting _vizzu_mouseUp on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_mouseMove")||(Object.defineProperty(d.ready,"_vizzu_mouseMove",{configurable:!0,get:function(){ue("You are getting _vizzu_mouseMove on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_mouseMove",{configurable:!0,set:function(){ue("You are setting _vizzu_mouseMove on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_mouseLeave")||(Object.defineProperty(d.ready,"_vizzu_mouseLeave",{configurable:!0,get:function(){ue("You are getting _vizzu_mouseLeave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_mouseLeave",{configurable:!0,set:function(){ue("You are setting _vizzu_mouseLeave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_keyPress")||(Object.defineProperty(d.ready,"_vizzu_keyPress",{configurable:!0,get:function(){ue("You are getting _vizzu_keyPress on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_keyPress",{configurable:!0,set:function(){ue("You are setting _vizzu_keyPress on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_update")||(Object.defineProperty(d.ready,"_vizzu_update",{configurable:!0,get:function(){ue("You are getting _vizzu_update on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_update",{configurable:!0,set:function(){ue("You are setting _vizzu_update on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_setLogging")||(Object.defineProperty(d.ready,"_vizzu_setLogging",{configurable:!0,get:function(){ue("You are getting _vizzu_setLogging on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_setLogging",{configurable:!0,set:function(){ue("You are setting _vizzu_setLogging on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_errorMessage")||(Object.defineProperty(d.ready,"_vizzu_errorMessage",{configurable:!0,get:function(){ue("You are getting _vizzu_errorMessage on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_errorMessage",{configurable:!0,set:function(){ue("You are setting _vizzu_errorMessage on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_vizzu_version")||(Object.defineProperty(d.ready,"_vizzu_version",{configurable:!0,get:function(){ue("You are getting _vizzu_version on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_vizzu_version",{configurable:!0,set:function(){ue("You are setting _vizzu_version on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_data_addDimension")||(Object.defineProperty(d.ready,"_data_addDimension",{configurable:!0,get:function(){ue("You are getting _data_addDimension on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_data_addDimension",{configurable:!0,set:function(){ue("You are setting _data_addDimension on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_data_addMeasure")||(Object.defineProperty(d.ready,"_data_addMeasure",{configurable:!0,get:function(){ue("You are getting _data_addMeasure on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_data_addMeasure",{configurable:!0,set:function(){ue("You are setting _data_addMeasure on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_data_addRecord")||(Object.defineProperty(d.ready,"_data_addRecord",{configurable:!0,get:function(){ue("You are getting _data_addRecord on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_data_addRecord",{configurable:!0,set:function(){ue("You are setting _data_addRecord on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_record_getValue")||(Object.defineProperty(d.ready,"_record_getValue",{configurable:!0,get:function(){ue("You are getting _record_getValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_record_getValue",{configurable:!0,set:function(){ue("You are setting _record_getValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_chart_store")||(Object.defineProperty(d.ready,"_chart_store",{configurable:!0,get:function(){ue("You are getting _chart_store on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_chart_store",{configurable:!0,set:function(){ue("You are setting _chart_store on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_chart_restore")||(Object.defineProperty(d.ready,"_chart_restore",{configurable:!0,get:function(){ue("You are getting _chart_restore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_chart_restore",{configurable:!0,set:function(){ue("You are setting _chart_restore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_chart_free")||(Object.defineProperty(d.ready,"_chart_free",{configurable:!0,get:function(){ue("You are getting _chart_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_chart_free",{configurable:!0,set:function(){ue("You are setting _chart_free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_style_getList")||(Object.defineProperty(d.ready,"_style_getList",{configurable:!0,get:function(){ue("You are getting _style_getList on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_style_getList",{configurable:!0,set:function(){ue("You are setting _style_getList on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_style_setValue")||(Object.defineProperty(d.ready,"_style_setValue",{configurable:!0,get:function(){ue("You are getting _style_setValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_style_setValue",{configurable:!0,set:function(){ue("You are setting _style_setValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_style_getValue")||(Object.defineProperty(d.ready,"_style_getValue",{configurable:!0,get:function(){ue("You are getting _style_getValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_style_getValue",{configurable:!0,set:function(){ue("You are setting _style_getValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_chart_getList")||(Object.defineProperty(d.ready,"_chart_getList",{configurable:!0,get:function(){ue("You are getting _chart_getList on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_chart_getList",{configurable:!0,set:function(){ue("You are setting _chart_getList on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_chart_getValue")||(Object.defineProperty(d.ready,"_chart_getValue",{configurable:!0,get:function(){ue("You are getting _chart_getValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_chart_getValue",{configurable:!0,set:function(){ue("You are setting _chart_getValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_chart_setValue")||(Object.defineProperty(d.ready,"_chart_setValue",{configurable:!0,get:function(){ue("You are getting _chart_setValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_chart_setValue",{configurable:!0,set:function(){ue("You are setting _chart_setValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_chart_setFilter")||(Object.defineProperty(d.ready,"_chart_setFilter",{configurable:!0,get:function(){ue("You are getting _chart_setFilter on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_chart_setFilter",{configurable:!0,set:function(){ue("You are setting _chart_setFilter on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_addEventListener")||(Object.defineProperty(d.ready,"_addEventListener",{configurable:!0,get:function(){ue("You are getting _addEventListener on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_addEventListener",{configurable:!0,set:function(){ue("You are setting _addEventListener on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_removeEventListener")||(Object.defineProperty(d.ready,"_removeEventListener",{configurable:!0,get:function(){ue("You are getting _removeEventListener on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_removeEventListener",{configurable:!0,set:function(){ue("You are setting _removeEventListener on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_event_preventDefault")||(Object.defineProperty(d.ready,"_event_preventDefault",{configurable:!0,get:function(){ue("You are getting _event_preventDefault on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_event_preventDefault",{configurable:!0,set:function(){ue("You are setting _event_preventDefault on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_chart_animate")||(Object.defineProperty(d.ready,"_chart_animate",{configurable:!0,get:function(){ue("You are getting _chart_animate on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_chart_animate",{configurable:!0,set:function(){ue("You are setting _chart_animate on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_anim_control")||(Object.defineProperty(d.ready,"_anim_control",{configurable:!0,get:function(){ue("You are getting _anim_control on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_anim_control",{configurable:!0,set:function(){ue("You are setting _anim_control on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_anim_setValue")||(Object.defineProperty(d.ready,"_anim_setValue",{configurable:!0,get:function(){ue("You are getting _anim_setValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_anim_setValue",{configurable:!0,set:function(){ue("You are setting _anim_setValue on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_malloc")||(Object.defineProperty(d.ready,"_malloc",{configurable:!0,get:function(){ue("You are getting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_malloc",{configurable:!0,set:function(){ue("You are setting _malloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_free")||(Object.defineProperty(d.ready,"_free",{configurable:!0,get:function(){ue("You are getting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_free",{configurable:!0,set:function(){ue("You are setting _free on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_stackSave")||(Object.defineProperty(d.ready,"_stackSave",{configurable:!0,get:function(){ue("You are getting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_stackSave",{configurable:!0,set:function(){ue("You are setting _stackSave on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_stackRestore")||(Object.defineProperty(d.ready,"_stackRestore",{configurable:!0,get:function(){ue("You are getting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_stackRestore",{configurable:!0,set:function(){ue("You are setting _stackRestore on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_stackAlloc")||(Object.defineProperty(d.ready,"_stackAlloc",{configurable:!0,get:function(){ue("You are getting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_stackAlloc",{configurable:!0,set:function(){ue("You are setting _stackAlloc on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"___data_end")||(Object.defineProperty(d.ready,"___data_end",{configurable:!0,get:function(){ue("You are getting ___data_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"___data_end",{configurable:!0,set:function(){ue("You are setting ___data_end on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"___wasm_call_ctors")||(Object.defineProperty(d.ready,"___wasm_call_ctors",{configurable:!0,get:function(){ue("You are getting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"___wasm_call_ctors",{configurable:!0,set:function(){ue("You are setting ___wasm_call_ctors on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"___errno_location")||(Object.defineProperty(d.ready,"___errno_location",{configurable:!0,get:function(){ue("You are getting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"___errno_location",{configurable:!0,set:function(){ue("You are setting ___errno_location on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"_setThrew")||(Object.defineProperty(d.ready,"_setThrew",{configurable:!0,get:function(){ue("You are getting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"_setThrew",{configurable:!0,set:function(){ue("You are setting _setThrew on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}})),Object.getOwnPropertyDescriptor(d.ready,"onRuntimeInitialized")||(Object.defineProperty(d.ready,"onRuntimeInitialized",{configurable:!0,get:function(){ue("You are getting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}),Object.defineProperty(d.ready,"onRuntimeInitialized",{configurable:!0,set:function(){ue("You are setting onRuntimeInitialized on the Promise object, instead of the instance. Use .then() to get called back with the instance, see the MODULARIZE docs in src/settings.js")}}));var t,o={};for(t in d)d.hasOwnProperty(t)&&(o[t]=d[t]);var s=!0;if(d.ENVIRONMENT)throw new Error("Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -s ENVIRONMENT=web or -s ENVIRONMENT=node)");var i,a="";if(document.currentScript&&(a=document.currentScript.src),a=0!==(a=Be?Be:a).indexOf("blob:")?a.substr(0,a.lastIndexOf("/")+1):"","object"!=typeof window&&"function"!=typeof importScripts)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var c=d.print||console.log.bind(console),l=d.printErr||console.warn.bind(console);for(t in o)o.hasOwnProperty(t)&&(d[t]=o[t]);function u(e){u.shown||(u.shown={}),u.shown[e]||(u.shown[e]=1,l(e))}o=null,d.arguments,Object.getOwnPropertyDescriptor(d,"arguments")||Object.defineProperty(d,"arguments",{configurable:!0,get:function(){ue("Module.arguments has been replaced with plain arguments_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),d.thisProgram,Object.getOwnPropertyDescriptor(d,"thisProgram")||Object.defineProperty(d,"thisProgram",{configurable:!0,get:function(){ue("Module.thisProgram has been replaced with plain thisProgram (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),d.quit,Object.getOwnPropertyDescriptor(d,"quit")||Object.defineProperty(d,"quit",{configurable:!0,get:function(){ue("Module.quit has been replaced with plain quit_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),b(void 0===d.memoryInitializerPrefixURL,"Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead"),b(void 0===d.pthreadMainPrefixURL,"Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead"),b(void 0===d.cdInitializerPrefixURL,"Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead"),b(void 0===d.filePackagePrefixURL,"Module.filePackagePrefixURL option was removed, use Module.locateFile instead"),b(void 0===d.read,"Module.read option was removed (modify read_ in JS)"),b(void 0===d.readAsync,"Module.readAsync option was removed (modify readAsync in JS)"),b(void 0===d.readBinary,"Module.readBinary option was removed (modify readBinary in JS)"),b(void 0===d.setWindowTitle,"Module.setWindowTitle option was removed (modify setWindowTitle in JS)"),b(void 0===d.TOTAL_MEMORY,"Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY"),Object.getOwnPropertyDescriptor(d,"read")||Object.defineProperty(d,"read",{configurable:!0,get:function(){ue("Module.read has been replaced with plain read_ (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(d,"readAsync")||Object.defineProperty(d,"readAsync",{configurable:!0,get:function(){ue("Module.readAsync has been replaced with plain readAsync (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(d,"readBinary")||Object.defineProperty(d,"readBinary",{configurable:!0,get:function(){ue("Module.readBinary has been replaced with plain readBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),Object.getOwnPropertyDescriptor(d,"setWindowTitle")||Object.defineProperty(d,"setWindowTitle",{configurable:!0,get:function(){ue("Module.setWindowTitle has been replaced with plain setWindowTitle (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}});var h,_,p,E=[];function f(t,r){var n,o=T;if(!h){h=new WeakMap;for(var e=0;e<o.length;e++){var i=o.get(e);i&&h.set(i,e)}}if(h.has(t))return h.get(t);if(E.length)n=E.pop();else{n=o.length;try{o.grow(1)}catch(e){if(!(e instanceof RangeError))throw e;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}}try{o.set(n,t)}catch(e){if(!(e instanceof TypeError))throw e;b(void 0!==r,"Missing signature argument to addFunction");r=function(e,t){if("function"==typeof WebAssembly.Function){for(var r={i:"i32",j:"i64",f:"f32",d:"f64"},n={parameters:[],results:"v"==t[0]?[]:[r[t[0]]]},o=1;o<t.length;++o)n.parameters.push(r[t[o]]);return new WebAssembly.Function(n,e)}var i=[1,0,1,96],s=t.slice(0,1),a=t.slice(1),c={i:127,j:126,f:125,d:124};for(i.push(a.length),o=0;o<a.length;++o)i.push(c[a[o]]);return"v"==s?i.push(0):i=i.concat([1,c[s]]),i[1]=i.length-2,s=new Uint8Array([0,97,115,109,1,0,0,0].concat(i,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0])),s=new WebAssembly.Module(s),new WebAssembly.Instance(s,{e:{f:e}}).exports.f}(t,r);o.set(n,r)}return h.set(t,n),n}function g(e,t,r,n){switch(r="*"===(r=r||"i8").charAt(r.length-1)?"i32":r){case"i1":case"i8":F[e>>0]=t;break;case"i16":x[e>>1]=t;break;case"i32":L[e>>2]=t;break;case"i64":fe=[t>>>0,1<=+ne(fe=t)?0<fe?(0|se(+ie(fe/4294967296),4294967295))>>>0:~~+oe((fe-(~~fe>>>0))/4294967296)>>>0:0],L[e>>2]=fe[0],L[e+4>>2]=fe[1];break;case"float":H[e>>2]=t;break;case"double":z[e>>3]=t;break;default:ue("invalid type for setValue: "+r)}}function O(e,t,r){switch(t="*"===(t=t||"i8").charAt(t.length-1)?"i32":t){case"i1":case"i8":return F[e>>0];case"i16":return x[e>>1];case"i32":case"i64":return L[e>>2];case"float":return H[e>>2];case"double":return z[e>>3];default:ue("invalid type for getValue: "+t)}return null}d.wasmBinary&&(_=d.wasmBinary),Object.getOwnPropertyDescriptor(d,"wasmBinary")||Object.defineProperty(d,"wasmBinary",{configurable:!0,get:function(){ue("Module.wasmBinary has been replaced with plain wasmBinary (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),d.noExitRuntime,Object.getOwnPropertyDescriptor(d,"noExitRuntime")||Object.defineProperty(d,"noExitRuntime",{configurable:!0,get:function(){ue("Module.noExitRuntime has been replaced with plain noExitRuntime (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),"object"!=typeof WebAssembly&&ue("no native wasm support detected");var T=new WebAssembly.Table({initial:1144,element:"anyfunc"}),y=!1;function b(e,t){e||ue("Assertion failed: "+t)}var R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function w(e,t,r){for(var n=t+r,o=t;e[o]&&!(n<=o);)++o;if(16<o-t&&e.subarray&&R)return R.decode(e.subarray(t,o));for(var i="";t<o;){var s,a,c=e[t++];128&c?(s=63&e[t++],192!=(224&c)?(a=63&e[t++],(c=224==(240&c)?(15&c)<<12|s<<6|a:(240!=(248&c)&&u("Invalid UTF-8 leading byte 0x"+c.toString(16)+" encountered when deserializing a UTF-8 string on the asm.js/wasm heap to a JS string!"),(7&c)<<18|s<<12|a<<6|63&e[t++]))<65536?i+=String.fromCharCode(c):(a=c-65536,i+=String.fromCharCode(55296|a>>10,56320|1023&a))):i+=String.fromCharCode((31&c)<<6|s)):i+=String.fromCharCode(c)}return i}function D(e,t){return e?w(X,e,t):""}function m(e,t,r){return b("number"==typeof r,"stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),function(e,t,r,n){if(!(0<n))return 0;for(var o=r,i=r+n-1,s=0;s<e.length;++s){var a=e.charCodeAt(s);if((a=55296<=a&&a<=57343?65536+((1023&a)<<10)|1023&e.charCodeAt(++s):a)<=127){if(i<=r)break;t[r++]=a}else if(a<=2047){if(i<=r+1)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(i<=r+2)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(i<=r+3)break;2097152<=a&&u("Invalid Unicode code point 0x"+a.toString(16)+" encountered when serializing a JS string to an UTF-8 string on the asm.js/wasm heap! (Valid unicode code points should be in range 0-0x1FFFFF)."),t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-o}(e,X,t,r)}var P="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function A(e,t){b(e%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");for(var r,n=e>>1,o=n+t/2;!(o<=n)&&N[n];)++n;if(32<(r=n<<1)-e&&P)return P.decode(X.subarray(e,r));for(var i=0,s="";;){var a=x[e+2*i>>1];if(0==a||i==t/2)return s;++i,s+=String.fromCharCode(a)}}function M(e,t,r){if(b(t%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!"),b("number"==typeof r,"stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),(r=void 0===r?2147483647:r)<2)return 0;for(var n=t,o=(r-=2)<2*e.length?r/2:e.length,i=0;i<o;++i){var s=e.charCodeAt(i);x[t>>1]=s,t+=2}return x[t>>1]=0,t-n}function v(e){return 2*e.length}function j(e,t){b(e%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");for(var r=0,n="";!(t/4<=r);){var o,i=L[e+4*r>>2];if(0==i)break;++r,65536<=i?(o=i-65536,n+=String.fromCharCode(55296|o>>10,56320|1023&o)):n+=String.fromCharCode(i)}return n}function S(e,t,r){if(b(t%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!"),b("number"==typeof r,"stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!"),(r=void 0===r?2147483647:r)<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(55296<=s&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),L[t>>2]=s,o<(t+=4)+4)break}return L[t>>2]=0,t-n}function I(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);55296<=n&&n<=57343&&++r,t+=4}return t}var U,F,X,x,N,L,C,H,z,k=65536;function Q(e){U=e,d.HEAP8=F=new Int8Array(e),d.HEAP16=x=new Int16Array(e),d.HEAP32=L=new Int32Array(e),d.HEAPU8=X=new Uint8Array(e),d.HEAPU16=N=new Uint16Array(e),d.HEAPU32=C=new Uint32Array(e),d.HEAPF32=H=new Float32Array(e),d.HEAPF64=z=new Float64Array(e)}var Y=57824;b(!0,"stack must start aligned"),b(!0,"heap must start aligned");var W=5242880;d.TOTAL_STACK&&b(W===d.TOTAL_STACK,"the stack size can no longer be determined at runtime");var V=d.INITIAL_MEMORY||16777216;function Z(){b(0==(3&Y)),C[1+(Y>>2)]=34821223,C[2+(Y>>2)]=2310721022,L[0]=1668509029}function B(){var e=C[1+(Y>>2)],t=C[2+(Y>>2)];34821223==e&&2310721022==t||ue("Stack overflow! Stack cookie has been overwritten, expected hex dwords 0x89BACDFE and 0x2135467, but received 0x"+t.toString(16)+" "+e.toString(16)),1668509029!==L[0]&&ue("Runtime error: The application has corrupted its heap memory area (address zero)!")}function G(e){for(;0<e.length;){var t,r=e.shift();"function"!=typeof r?"number"==typeof(t=r.func)?void 0===r.arg?d.dynCall_v(t):d.dynCall_vi(t,r.arg):t(void 0===r.arg?null:r.arg):r(d)}}Object.getOwnPropertyDescriptor(d,"INITIAL_MEMORY")||Object.defineProperty(d,"INITIAL_MEMORY",{configurable:!0,get:function(){ue("Module.INITIAL_MEMORY has been replaced with plain INITIAL_INITIAL_MEMORY (the initial value can be provided on Module, but after startup the value is only looked for on a local variable of that name)")}}),b(W<=V,"INITIAL_MEMORY should be larger than TOTAL_STACK, was "+V+"! (TOTAL_STACK="+W+")"),b("undefined"!=typeof Int32Array&&"undefined"!=typeof Float64Array&&void 0!==Int32Array.prototype.subarray&&void 0!==Int32Array.prototype.set,"JS engine does not provide full typed array support"),p=d.wasmMemory||new WebAssembly.Memory({initial:V/k,maximum:32768}),b((V=(U=p?p.buffer:U).byteLength)%k==0),b(!0),Q(U),L[14416]=5300704,function(){var e=new Int16Array(1),t=new Int8Array(e.buffer);if(e[0]=25459,115!==t[0]||99!==t[1])throw"Runtime error: expected the system to be little-endian!"}();var q=[],J=[],K=[],$=[],ee=!1;function te(){if(d.preRun)for("function"==typeof d.preRun&&(d.preRun=[d.preRun]);d.preRun.length;)e=d.preRun.shift(),q.unshift(e);var e;G(q)}function re(){if(B(),d.postRun)for("function"==typeof d.postRun&&(d.postRun=[d.postRun]);d.postRun.length;)e=d.postRun.shift(),$.unshift(e);var e;G($)}b(Math.imul,"This browser does not support Math.imul(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),b(Math.fround,"This browser does not support Math.fround(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),b(Math.clz32,"This browser does not support Math.clz32(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill"),b(Math.trunc,"This browser does not support Math.trunc(), build with LEGACY_VM_SUPPORT or POLYFILL_OLD_MATH_FUNCTIONS to add in a polyfill");var ne=Math.abs,oe=Math.ceil,ie=Math.floor,se=Math.min,ae=0,ce=null,de=null,le={};function ue(e){d.onAbort&&d.onAbort(e),l(e+=""),y=!0,e="abort("+e+") at "+function(){var e=function(){var t=new Error;if(!t.stack){try{throw new Error}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}();d.extraStackTrace&&(e+="\n"+d.extraStackTrace());return function(e){return e.replace(/\b_Z[\w\d_]+/g,function(e){var t,t=(t=e,u("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),t);return e===t?e:t+" ["+e+"]"})}(e)}();e=new WebAssembly.RuntimeError(e);throw n(e),e}d.preloadedImages={},d.preloadedAudios={};var he={error:function(){ue("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -s FORCE_FILESYSTEM=1")},init:function(){he.error()},createDataFile:function(){he.error()},createPreloadedFile:function(){he.error()},createLazyFile:function(){he.error()},open:function(){he.error()},mkdev:function(){he.error()},registerDevice:function(){he.error()},analyzePath:function(){he.error()},loadFilesFromDB:function(){he.error()},ErrnoError:function(){he.error()}};d.FS_createDataFile=he.createDataFile,d.FS_createPreloadedFile=he.createPreloadedFile;function _e(e){return t=e,e="data:application/octet-stream;base64,",String.prototype.startsWith?t.startsWith(e):0===t.indexOf(e);var t}function pe(r,n){return function(){var e=r,t=n;return n||(t=d.asm),b(ee,"native function `"+e+"` called before runtime initialization"),b(!0,"native function `"+e+"` called after runtime exit (use NO_EXIT_RUNTIME to keep it alive after main() exits)"),t[r]||b(t[r],"exported native function `"+e+"` not found"),t[r].apply(null,arguments)}}var Ee,fe,ge="cvizzu.wasm";function Oe(){try{if(_)return new Uint8Array(_);if(!i)throw"both async and sync fetching of the wasm failed"}catch(e){ue(e)}}_e(ge)||(Ee=ge,ge=d.locateFile?d.locateFile(Ee,a):a+Ee),J.push({func:function(){ke()}});var Te={};function ye(e){switch(e){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+e)}}var be=void 0;function Re(e){for(var t="",r=e;X[r];)t+=be[X[r++]];return t}var we={},De={},me={},Pe=48,Ae=57;function Me(e,t){return e=function(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return Pe<=t&&t<=Ae?"_"+e:e}(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function ve(e,t){var r=Me(t,function(e){this.name=t,this.message=e;e=new Error(e).stack;void 0!==e&&(this.stack=this.toString()+"\n"+e.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(e.prototype),(r.prototype.constructor=r).prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var j