var BASIS=function(){var Pt="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return"undefined"!=typeof __filename&&(Pt=Pt||__filename),function(e){var r,i,a=void 0!==(e=e||{})?e:{};a.ready=new Promise(function(e,t){r=e,readyPromiseRejectza=t});var t,n={};for(t in a)a.hasOwnProperty(t)&&(n[t]=a[t]);var o,u,s,c,f,l=!1,p=!1,l="object"==typeof window,p="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h=!l&&!d&&!p,y="";d?(y=p?require("path").dirname(y)+"/":__dirname+"/",o=function(e,t){return c=c||require("fs"),e=(f=f||require("path")).normalize(e),c.readFileSync(e,t?null:"utf8")},s=function(e){e=o(e,!0);return T((e=!e.buffer?new Uint8Array(e):e).buffer),e},1>10,56320|1023&u))):i+=String.fromCharCode((31&s)<<6|a)):i+=String.fromCharCode(s)}return i}function P(e,t){return e?$(W,e,t):""}function A(e,t,r){return function(e,t,r,n){if(!(0>6,t[r++]=128|63&u}else if(u<=65535){if(i<=r+2)break;t[r++]=224|u>>12,t[r++]=128|u>>6&63,t[r++]=128|63&u}else{if(i<=r+3)break;t[r++]=240|u>>18,t[r++]=128|u>>12&63,t[r++]=128|u>>6&63,t[r++]=128|63&u}}return t[r]=0,r-o}(e,W,t,r)}var _,S,W,E,F,k,O,j,R,I="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function x(e,t){for(var r,n=e>>1,o=n+t/2;!(o<=n)&&F[n];)++n;if(32<(r=n<<1)-e&&I)return I.decode(W.subarray(e,r));for(var i="",a=0;!(t/2<=a);++a){var u=E[e+2*a>>1];if(0==u)break;i+=String.fromCharCode(u)}return i}function D(e,t,r){if((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>1]=a,t+=2}return E[t>>1]=0,t-n}function U(e){return 2*e.length}function B(e,t){for(var r=0,n="";!(t/4<=r);){var o,i=k[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 M(e,t,r){if((r=void 0===r?2147483647:r)<4)return 0;for(var n=t,o=n+r-4,i=0;i>2]=a,o<(t+=4)+4)break}return k[t>>2]=0,t-n}function V(e){for(var t=0,r=0;r>2])}var pe={},de={},he={},ye=48,ve=57;function me(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return ye<=t&&t<=ve?"_"+e:e}function ge(e,t){return e=me(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function we(e,t){var r=ge(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 be=void 0;function Te(e){throw new be(e)}function Ce(n,t,o){function r(e){var t=o(e);t.length!==n.length&&Te("Mismatched type converter count");for(var r=0;r>2)+n]);return r}function nt(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=ge(e.name||"unknownFunctionName",function(){});r.prototype=e.prototype;r=new r,t=e.apply(r,t);return t instanceof Object?t:r}function ot(e,t,r,n,o){var i=t.length;i<2&&Se("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,u=!1,s=1;s>2]},getStr:function(e){return P(e)},get64:function(e,t){return e}};be=a.InternalError=we(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Pe=e}(),_e=a.BindingError=we(Error,"BindingError"),De.prototype.isAliasOf=function(e){if(!(this instanceof De))return!1;if(!(e instanceof De))return!1;for(var t=this.$$.ptrType.registeredClass,r=this.$$.ptr,n=e.$$.ptrType.registeredClass,o=e.$$.ptr;t.baseClass;)r=t.upcast(r),t=t.baseClass;for(;n.baseClass;)o=n.upcast(o),n=n.baseClass;return t===n&&r===o},De.prototype.clone=function(){if(this.$$.ptr||Ee(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=je(Object.create(Object.getPrototypeOf(this),{$$:{value:{count:(e=this.$$).count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},De.prototype.delete=function(){this.$$.ptr||Ee(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Se("Object already scheduled for deletion"),ke(this),Oe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},De.prototype.isDeleted=function(){return!this.$$.ptr},De.prototype.deleteLater=function(){return this.$$.ptr||Ee(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Se("Object already scheduled for deletion"),Ie.push(this),1===Ie.length&&Re&&Re(xe),this.$$.deleteScheduled=!0,this},Je.prototype.getPointee=function(e){return e=this.rawGetPointee?this.rawGetPointee(e):e},Je.prototype.destructor=function(e){this.rawDestructor&&this.rawDestructor(e)},Je.prototype.argPackAdvance=8,Je.prototype.readValueFromPointer=le,Je.prototype.deleteObject=function(e){null!==e&&e.delete()},Je.prototype.fromWireType=function(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=Le(this.registeredClass,t);if(void 0===r)return r=this.registeredClass.getActualType(t),(o=Ue[r])?(r=this.isConst?o.constPointerType:o.pointerType,null===(o=function e(t,r,n){if(r===n)return t;if(void 0===n.baseClass)return null;r=e(t,r,n.baseClass);return null===r?null:n.downcast(r)}(t,this.registeredClass,r.registeredClass))?n.call(this):this.isSmartPointer?Xe(r.registeredClass.instancePrototype,{ptrType:r,ptr:o,smartPtrType:this,smartPtr:e}):Xe(r.registeredClass.instancePrototype,{ptrType:r,ptr:o})):n.call(this);function n(){return this.isSmartPointer?Xe(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Xe(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var o=r.clone();return this.destructor(e),o},a.getInheritedInstanceCount=function(){return Object.keys(Ge).length},a.getLiveInheritedInstances=function(){var e,t=[];for(e in Ge)Ge.hasOwnProperty(e)&&t.push(Ge[e]);return t},a.flushPendingDeletes=xe,a.setDelayFunction=function(e){Re=e,Ie.length&&Re&&Re(xe)},Ze=a.UnboundTypeError=we(Error,"UnboundTypeError"),a.count_emval_handles=function(){for(var e=0,t=5;t>a])},destructorFunction:null})},x:function(a,e,t,u,r,s,n,c,o,f,l,i,p){l=Ae(l),s=Ye(r,s),c=c&&Ye(n,c),f=f&&Ye(o,f),p=Ye(i,p);var d=me(l);Me(d,function(){tt("Cannot construct "+l+" due to unbound types",[u])}),Ce([a,e,t],u?[u]:[],function(e){e=e[0];var t=u?(i=e.registeredClass).instancePrototype:De.prototype,r=ge(d,function(){if(Object.getPrototypeOf(this)!==n)throw new _e("Use 'new' to construct "+l);if(void 0===o.constructor_body)throw new _e(l+" has no accessible constructor");var e=o.constructor_body[arguments.length];if(void 0===e)throw new _e("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(o.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)}),n=Object.create(t,{constructor:{value:r}});r.prototype=n;var o=new Ve(l,r,n,p,i,s,c,f),e=new Je(l,o,!0,!1,!1),t=new Je(l+"*",o,!1,!1,!1),i=new Je(l+" const*",o,!1,!0,!1);return Ue[a]={pointerType:t,constPointerType:i},Ke(d,r),[e,t,i]})},w:function(e,o,t,r,i,n){T(0>1])};case 2:return function(e){var t=r?k:O;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}(t,r,n),destructorFunction:null}),Me(t,o)},a:function(e,t,r){var n=ct(e,"enum");t=Ae(t),e=n.constructor,n=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:ge(n.name+"_"+t,function(){})}}),e.values[r]=n,e[t]=n},A:function(e,t,r){r=$e(r),We(e,{name:t=Ae(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+ft(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:function(e,t){switch(t){case 2:return function(e){return this.fromWireType(j[e>>2])};case 3:return function(e){return this.fromWireType(R[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}(t,r),destructorFunction:null})},i:function(t,r,e,n,o,i){var a=rt(r,e);t=Ae(t),o=Ye(n,o),Me(t,function(){tt("Cannot call "+t+" due to unbound types",a)},r-1),Ce([],a,function(e){e=[e[0],null].concat(e.slice(1));return Ke(t,ot(t,e,null,o,i),r-1),[]})},j:function(e,r,t,n,o){r=Ae(r),-1===o&&(o=4294967295);var i,a=$e(t),u=function(e){return e};0===n&&(i=32-8*t,u=function(e){return e<>>i});var s=-1!=r.indexOf("unsigned");We(e,{name:r,fromWireType:u,toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+ft(t)+'" to '+this.name);if(t>>0:0|t},argPackAdvance:8,readValueFromPointer:function(e,t,r){switch(t){case 0:return r?function(e){return S[e]}:function(e){return W[e]};case 1:return r?function(e){return E[e>>1]}:function(e){return F[e>>1]};case 2:return r?function(e){return k[e>>2]}:function(e){return O[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}(r,a,0!==n),destructorFunction:null})},h:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=O,r=t[e>>=2],e=t[e+1];return new n(_,e,r)}We(e,{name:r=Ae(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},B:function(e,t){var s="std::string"===(t=Ae(t));We(e,{name:t,fromWireType:function(e){var t,r=O[e>>2];if(s)for(var n=e+4,o=0;o<=r;++o){var i,a=e+4+o;o!=r&&0!=W[a]||(i=P(n,a-n),void 0===t?t=i:(t+=String.fromCharCode(0),t+=i),n=a+1)}else{for(var u=new Array(r),o=0;o>2]=n,s&&r)A(t,o+4,n+1);else if(r)for(var i=0;i>2],n=f(),o=e+4,i=0;i<=r;++i){var a,u=e+4+i*s;i!=r&&0!=n[u>>l]||(a=c(o,u-o),void 0===t?t=a:(t+=String.fromCharCode(0),t+=a),o=u+s)}return Tt(e),t},toWireType:function(e,t){"string"!=typeof t&&Se("Cannot pass non-string to C++ string type "+o);var r=a(t),n=bt(4+r+s);return O[n>>2]=r>>l,i(t,n+4,r+s),null!==e&&e.push(Tt,n),n},argPackAdvance:8,readValueFromPointer:le,destructorFunction:function(e){Tt(e)}})},u:function(e,t,r,n,o,i){ce[e]={name:Ae(t),rawConstructor:Ye(r,n),rawDestructor:Ye(o,i),fields:[]}},c:function(e,t,r,n,o,i,a,u,s,c){ce[e].fields.push({fieldName:Ae(t),getterReturnType:r,getter:Ye(n,o),getterContext:i,setterArgumentType:a,setter:Ye(u,s),setterContext:c})},J:function(e,t){We(e,{isVoid:!0,name:t=Ae(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},m:function(e,t,r){e=lt(e),t=ct(t,"emval::as");var n=[],o=st(n);return k[r>>2]=o,t.toWireType(n,e)},s:function(e,t,r,n){(e=ht[e])(t=lt(t),r=dt(r),null,n)},b:ut,y:function(e){return 0===e?st(yt()):(e=dt(e),st(yt()[e]))},p:function(e,t){for(var r=function(e,t){for(var r=new Array(e),n=0;n>2)+n],"parameter "+n);return r}(e,t),n=r[0],t=n.name+"_$"+r.slice(1).map(function(e){return e.name}).join("_")+"$",o=["retType"],i=[n],a="",u=0;u>> 2) + "+r+'], "parameter '+r+'");\nvar arg'+r+" = argType"+r+".readValueFromPointer(args);\nargs += argType"+r+"['argPackAdvance'];\n";return n+="var obj = new constructor("+t+");\nreturn __emval_register(obj);\n}\n",new Function("requireRegisteredType","Module","__emval_register",n)(ct,a,st)}(t),vt[t]=o),o(e,r,n)},f:function(e){return st(dt(e))},l:function(e){fe(at[e].value),ut(e)},o:function(){Z()},E:function(e,t,r){W.copyWithin(e,t,t+r)},F:function(e){var t=W.length,r=2147483648;if(r<(e>>>=0))return!1;for(var n,o=1;o<=4;o*=2){var i=t*(1+.2/o),i=Math.min(i,e+100663296);if(function(e){try{return w.grow(e-_.byteLength+65535>>>16),H(w.buffer),1}catch(e){}}(Math.min(r,(0<(n=Math.max(e,i))%(i=65536)&&(n+=i-n%i),n))))return!0}return!1},G:function(e){return 0},C:function(e,t,r,n,o){},z:function(e,t,r,n){for(var o=0,i=0;i>2],u=k[t+(8*i+4)>>2],s=0;s>2]=o,0},D:function(e){0}},bt=(function(){var t={a:wt};function r(e,t){e=e.exports;a.asm=e,H((w=a.asm.K).buffer),q=a.asm.O,e=a.asm.L,N.unshift(e),K--,a.monitorRunDependencies&&a.monitorRunDependencies(K),0==K&&(null!==Q&&(clearInterval(Q),Q=null),Y&&(e=Y,Y=null,e()))}function n(e){r(e.instance)}function o(e){return function(){if(!g&&(l||p)){if("function"==typeof fetch&&!oe(ae))return fetch(ae,{credentials:"same-origin"}).then(function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ae+"'";return e.arrayBuffer()}).catch(function(){return ue(ae)});if(u)return new Promise(function(t,e){u(ae,function(e){t(new Uint8Array(e))},e)})}return Promise.resolve().then(function(){return ue(ae)})}().then(function(e){return WebAssembly.instantiate(e,t)}).then(e,function(e){m("failed to asynchronously prepare wasm: "+e),Z(e)})}if(K++,a.monitorRunDependencies&&a.monitorRunDependencies(K),a.instantiateWasm)try{return a.instantiateWasm(t,r)}catch(e){return m("Module.instantiateWasm callback failed with error: "+e)}(g||"function"!=typeof WebAssembly.instantiateStreaming||re(ae)||oe(ae)||"function"!=typeof fetch?o(n):fetch(ae,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,t).then(n,function(e){return m("wasm streaming compile failed: "+e),m("falling back to ArrayBuffer instantiation"),o(n)})})).catch(i)}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.L).apply(null,arguments)},a._malloc=function(){return(bt=a._malloc=a.asm.M).apply(null,arguments)}),Tt=a._free=function(){return(Tt=a._free=a.asm.N).apply(null,arguments)},Ct=a.___getTypeName=function(){return(Ct=a.___getTypeName=a.asm.P).apply(null,arguments)};a.___embind_register_native_and_builtin_types=function(){return(a.___embind_register_native_and_builtin_types=a.asm.Q).apply(null,arguments)},a.dynCall_jiji=function(){return(a.dynCall_jiji=a.asm.R).apply(null,arguments)};function $t(e){function t(){gt||(gt=!0,a.calledRun=!0,b||(se(N),se(G),r(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),J()))}0