scanbot-web-sdk 2.5.1 → 2.5.2-beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,7 @@ declare class DocumentScannerProps extends ScanbotCameraProps {
11
11
  configuration: DocumentScannerConfiguration;
12
12
  }
13
13
  export default class DocumentScannerView extends ScannerView<DocumentScannerProps, DocumentScannerState> {
14
+ static DEFAULT_DETECTION_RESOLUTION: number;
14
15
  outline: DocumentOutline | null;
15
16
  button: ShutterButton | null;
16
17
  autoCaptureToken: any;
@@ -19,6 +19,7 @@ import { BarcodeFormat } from "./model/barcode/barcode-format";
19
19
  import { MrzScannerConfiguration } from "./model/configuration/mrz-scanner-configuration";
20
20
  import { IMrzScannerHandle } from "./interfaces/i-mrz-scanner-handle";
21
21
  import SimpleMrzRecognizer from "./service/simple-mrz-recognizer";
22
+ import OcrEngine from "./service/ocr-engine";
22
23
  export default class ScanbotSDK {
23
24
  bridge: WorkerBridge;
24
25
  initialized: boolean;
@@ -42,6 +43,7 @@ export default class ScanbotSDK {
42
43
  detectDocument(imageBuffer: ArrayBuffer, acceptedAngleScore?: number, acceptedSizeScore?: number): Promise<DocumentDetectionResult>;
43
44
  detectBarcodes(base64: string, engineMode?: EngineMode, barcodeFormats?: BarcodeFormat[]): Promise<BarcodeResult>;
44
45
  createSimpleMRZRecognizer(): Promise<SimpleMrzRecognizer>;
46
+ createOcrEngine(languages: Array<string>): Promise<OcrEngine>;
45
47
  /**
46
48
  * Misc. Features
47
49
  */
@@ -0,0 +1,20 @@
1
+ import ScanbotSDK from '../scanbot-sdk';
2
+ export interface Rect {
3
+ x: number;
4
+ y: number;
5
+ height: number;
6
+ width: number;
7
+ }
8
+ export interface OcrData {
9
+ test: string;
10
+ confidence: number;
11
+ boundingBox: Rect;
12
+ }
13
+ export default class OcrEngine {
14
+ _OcrEngineToken: string;
15
+ _sdk: ScanbotSDK;
16
+ constructor(sdk: ScanbotSDK, OcrEngineToken: string);
17
+ performOcr(imageData: ImageData): Promise<OcrData[]>;
18
+ recognizeURL(imageURL: string): Promise<any>;
19
+ release(): Promise<void>;
20
+ }
@@ -22,6 +22,10 @@ export default class ScanbotCameraView extends React.Component<ScanbotCameraView
22
22
  save: boolean;
23
23
  saveExtractedData(): void;
24
24
  createImageData(maxSmallerSize?: number): ImageData;
25
+ calculateClientVideoConstraints(): {
26
+ clientVideoWidth: number;
27
+ clientVideoHeight: number;
28
+ };
25
29
  calculateFrameSize(maxSmallerSize: number, videoWidth: number, videoHeight: number): Size;
26
30
  getCanvas(): HTMLCanvasElement;
27
31
  componentWillUnmount(): void;
@@ -1 +1 @@
1
- !function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";var r=n(1);let i;const a={};function o(t){const e=Math.random().toString(36);return a[e]=t,e}function u(t){if(!a.hasOwnProperty(t))throw new Error(`Object ${t} does not exist`);return a[t]}function s(t){const e=u(t);e.delete&&e.delete(),delete a[t]}function c(t,e){for(let n in e){if(t===e[n])return n}}const l={initialize:async function(t,e,a,o){const u=n(3),s={locateFile:function(t,n){let i;return i=e?function(t){return t.startsWith("http:")||t.startsWith("https:")}(e)?e:"":o+r.Constants.DEFAULT_WASM_FOLDER,i+"ScanbotSDK.Asm.wasm"}};return await u(s),i=s,i.initialize(t||"",a)},getLicenseInfo:function(){return i.getLicenseInfo()},applyFilter:function(t,e){return d(i.applyFilter(t,e),p)},rotateImageCcw:function(t,e){return d(i.rotateImageCcw(t,e),p)},cropAndRotateImageCcw:function(t,e,n){const r=function(t){const e=[];for(let n=0;n<t.length;++n)e.push(t[n].x,t[n].y);return e}(e);return d(i.cropAndRotateImageCcw(t,r,n),p)},detectDocument:async function(t,e,n){const r=m(t);return await f(i.detectDocumentOnRawImage(r.buffer,r.width,r.height,e,n))},detectDocumentOnImage:async function(t,e,n){return await f(i.detectDocumentOnImage(t,e,n))},detectAndCropDocument:async function(t){const e=m(t);return await f(i.detectAndCropDocument(e.buffer,e.width,e.height))},recognizeBarcodes:async function(t,e){const n=m(t);let r;if(r="LEGACY"===e.engineMode?i.recognizeBarcodes(n.buffer,n.width,n.height,e):i.recognizeBarcodesNextGen(n.buffer,n.width,n.height,e),!r)return null;if(!r.length)return[];const a=r.map((t=>({format:c(t.format,i.BarcodeFormat),text:t.text,rawBytes:t.rawBytes.data.slice()})));return r.forEach((t=>t.delete())),a},beginPdf:async function(t){return o(new i.PdfGenerationContext(t||{}))},addPageToPdf:async function(t,e){d(u(t).addPage(e))},completePdf:async function(t){const e=d(u(t).complete(),p);return s(t),e},beginTiff:async function(t){const e=new i.TiffGenerationContext(t);return d(e.begin()),o(e)},addPageToTiff:async function(t,e){d(u(t).addPage(e))},completeTiff:async function(t){try{const e=u(t).complete();return d(e,p)}finally{s(t)}},createSimpleMRZRecognizer:async function(){return o(new i.SimpleMrzRecognizerContext)},recognizeSimpleMRZ:async function(t,e){const n=u(t),r=m(e);return n.recognize(r.buffer,r.width,r.height)},releaseObject:async function(t){s(t)}};async function f(t){if(!t)return{success:!1,detectionStatus:"Error_License"};const e=(n=t.detectionResult,g[n]?g[n]:n>=200?"Error_Unknown":"OK");var n;const r={detectionStatus:e,success:_(e)};return r.original=p(t.originalImageJpegData),r.success&&(r.cropped=p(t.croppedImageJpegData),r.polygon=function(t){if(t.length%2!=0)throw Error("pointCoords size is not even.");const e=[];for(let n=0;n<t.length;n+=2)e.push({x:t[n],y:t[n+1]});return e}(t.polygon.data),r.horizontalLines=h(t.horizontalLines.data),r.verticalLines=h(t.verticalLines.data)),t.delete(),r}function p(t){return t&&t.data&&t.data.slice()}function d(t,e){try{if(t.errorMessage){throw new Error(t.errorMessage)}return(e||(t=>t))(t.result)}finally{t.delete()}}function _(t){return"OK"===t.substr(0,2)}function h(t){const e=[];if(!t)return e;if(t.length%4!=0)throw Error("lineCoords size invalid.");for(let n=0;n<t.length;n+=4)e.push({p1:{x:t[n],y:t[n+1]},p2:{x:t[n+2],y:t[n+3]}});return e}function m(t){const{width:e,height:n,data:r}=t,a=i._malloc(4*e*n);return i.HEAPU8.set(r,a),{buffer:a,width:e,height:n}}const g={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(t){const{command:e,args:n,ticket:r}=t.data;if(!i&&"initialize"!==e)throw Error("WASM module not loaded yet.");(async()=>await l[e].apply(null,n))().then((t=>self.postMessage({ticket:r,result:t}))).catch((t=>{const e="number"==typeof t?i.stringFromException(t):t;console.error(e),self.postMessage({ticket:r,error:e.toString()})}))}},function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Constants=void 0;const i=r(n(2));var a="undefined"!=typeof SCANBOT_WEBSDK_VERSION?SCANBOT_WEBSDK_VERSION:i.default;class o{}e.Constants=o,o.VERSION=a,o.CDN_PATH=a&&`https://cdn.jsdelivr.net/npm/scanbot-web-sdk@${a}/bundle/`,o.DEFAULT_WASM_FOLDER="bin/complete/"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=""},function(t,e,n){"use strict";var r,i=(r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(t){var e,n,i=void 0!==(t=t||{})?t:{};i.ready=new Promise((function(t,r){e=t,n=r}));var a,o={};for(a in i)i.hasOwnProperty(a)&&(o[a]=i[a]);var u,s=[],c="./this.program",l=function(t,e){throw e},f="";f=self.location.href,r&&(f=r),f=0!==f.indexOf("blob:")?f.substr(0,f.lastIndexOf("/")+1):"",u=function(t){var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)};var p=i.print||console.log.bind(console),d=i.printErr||console.warn.bind(console);for(a in o)o.hasOwnProperty(a)&&(i[a]=o[a]);o=null,i.arguments&&(s=i.arguments),i.thisProgram&&(c=i.thisProgram),i.quit&&(l=i.quit);var _,h,m,g,y=0,v=function(t){y=t};i.wasmBinary&&(_=i.wasmBinary),i.noExitRuntime&&(h=i.noExitRuntime),"object"!=typeof WebAssembly&&et("no native wasm support detected");var w=!1;function b(t,e){t||et("Assertion failed: "+e)}var C="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function T(t,e,n){for(var r=e+n,i=e;t[i]&&!(i>=r);)++i;if(i-e>16&&t.subarray&&C)return C.decode(t.subarray(e,i));for(var a="";e<i;){var o=t[e++];if(128&o){var u=63&t[e++];if(192!=(224&o)){var s=63&t[e++];if((o=224==(240&o)?(15&o)<<12|u<<6|s:(7&o)<<18|u<<12|s<<6|63&t[e++])<65536)a+=String.fromCharCode(o);else{var c=o-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&o)<<6|u)}else a+=String.fromCharCode(o)}return a}function j(t,e){return t?T(k,t,e):""}function P(t,e,n,r){if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<t.length;++o){var u=t.charCodeAt(o);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&t.charCodeAt(++o)),u<=127){if(n>=a)break;e[n++]=u}else if(u<=2047){if(n+1>=a)break;e[n++]=192|u>>6,e[n++]=128|63&u}else if(u<=65535){if(n+2>=a)break;e[n++]=224|u>>12,e[n++]=128|u>>6&63,e[n++]=128|63&u}else{if(n+3>=a)break;e[n++]=240|u>>18,e[n++]=128|u>>12&63,e[n++]=128|u>>6&63,e[n++]=128|63&u}}return e[n]=0,n-i}function W(t,e,n){return P(t,k,e,n)}function S(t){for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);r>=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&t.charCodeAt(++n)),r<=127?++e:e+=r<=2047?2:r<=65535?3:4}return e}var $,A,k,O,D,x,F,E,R,M="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function I(t,e){for(var n=t,r=n>>1,i=r+e/2;!(r>=i)&&D[r];)++r;if((n=r<<1)-t>32&&M)return M.decode(k.subarray(t,n));for(var a=0,o="";;){var u=O[t+2*a>>1];if(0==u||a==e/2)return o;++a,o+=String.fromCharCode(u)}}function z(t,e,n){if(void 0===n&&(n=2147483647),n<2)return 0;for(var r=e,i=(n-=2)<2*t.length?n/2:t.length,a=0;a<i;++a){var o=t.charCodeAt(a);O[e>>1]=o,e+=2}return O[e>>1]=0,e-r}function U(t){return 2*t.length}function G(t,e){for(var n=0,r="";!(n>=e/4);){var i=x[t+4*n>>2];if(0==i)break;if(++n,i>=65536){var a=i-65536;r+=String.fromCharCode(55296|a>>10,56320|1023&a)}else r+=String.fromCharCode(i)}return r}function Y(t,e,n){if(void 0===n&&(n=2147483647),n<4)return 0;for(var r=e,i=r+n-4,a=0;a<t.length;++a){var o=t.charCodeAt(a);if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&t.charCodeAt(++a)),x[e>>2]=o,(e+=4)+4>i)break}return x[e>>2]=0,e-r}function B(t){for(var e=0,n=0;n<t.length;++n){var r=t.charCodeAt(n);r>=55296&&r<=57343&&++n,e+=4}return e}function L(t){var e=S(t)+1,n=hn(e);return n&&P(t,A,n,e),n}function V(t,e){A.set(t,e)}function N(t){$=t,i.HEAP8=A=new Int8Array(t),i.HEAP16=O=new Int16Array(t),i.HEAP32=x=new Int32Array(t),i.HEAPU8=k=new Uint8Array(t),i.HEAPU16=D=new Uint16Array(t),i.HEAPU32=F=new Uint32Array(t),i.HEAPF32=E=new Float32Array(t),i.HEAPF64=R=new Float64Array(t)}var H=i.INITIAL_MEMORY||16777216;(m=i.wasmMemory?i.wasmMemory:new WebAssembly.Memory({initial:H/65536,maximum:32768}))&&($=m.buffer),H=$.byteLength,N($);var K=[],q=[],J=[],Q=[],X=0,Z=null,tt=null;function et(t){i.onAbort&&i.onAbort(t),d(t+=""),w=!0,t="abort("+t+"). Build with -s ASSERTIONS=1 for more info.";var e=new WebAssembly.RuntimeError(t);throw n(e),e}function nt(t){return e=t,n="data:application/octet-stream;base64,",String.prototype.startsWith?e.startsWith(n):0===e.indexOf(n);var e,n}i.preloadedImages={},i.preloadedAudios={};var rt,it="ScanbotSDK.Asm.wasm";function at(){try{if(_)return new Uint8Array(_);if(u)return u(it);throw"both async and sync fetching of the wasm failed"}catch(t){et(t)}}nt(it)||(rt=it,it=i.locateFile?i.locateFile(rt,f):f+rt);var ot,ut={40544:function(t){return L(function(){return this[j(t)].toString()}.apply((0,eval)("(()=>this)()")))}};function st(t){for(;t.length>0;){var e=t.shift();if("function"!=typeof e){var n=e.func;"number"==typeof n?void 0===e.arg?g.get(n)():g.get(n)(e.arg):n(void 0===e.arg?null:e.arg)}else e(i)}}function ct(t,e,n){return-1!=t.indexOf("j")?function(t,e,n){return n&&n.length?i["dynCall_"+t].apply(null,[e].concat(n)):i["dynCall_"+t].call(null,e)}(t,e,n):g.get(e).apply(null,n)}function lt(t){return x[gn()>>2]=t,t}function ft(t,e){var n;if(0===t)n=Date.now();else{if(1!==t&&4!==t)return lt(28),-1;n=ot()}return x[e>>2]=n/1e3|0,x[e+4>>2]=n%1e3*1e3*1e3|0,0}ot=function(){return performance.now()};var pt=0,dt=4,_t=8,ht=12,mt=13,gt=16;function yt(t,e){}function vt(t){this.excPtr=t,this.ptr=t-gt,this.set_type=function(t){x[this.ptr+_t>>2]=t},this.get_type=function(){return x[this.ptr+_t>>2]},this.set_destructor=function(t){x[this.ptr+pt>>2]=t},this.get_destructor=function(){return x[this.ptr+pt>>2]},this.set_refcount=function(t){x[this.ptr+dt>>2]=t},this.set_caught=function(t){t=t?1:0,A[this.ptr+ht>>0]=t},this.get_caught=function(){return 0!=A[this.ptr+ht>>0]},this.set_rethrown=function(t){t=t?1:0,A[this.ptr+mt>>0]=t},this.get_rethrown=function(){return 0!=A[this.ptr+mt>>0]},this.init=function(t,e){this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=x[this.ptr+dt>>2];x[this.ptr+dt>>2]=t+1},this.release_ref=function(){var t=x[this.ptr+dt>>2];return x[this.ptr+dt>>2]=t-1,1===t}}function wt(t){this.free=function(){mn(this.ptr),this.ptr=0},this.set_base_ptr=function(t){x[this.ptr>>2]=t},this.get_base_ptr=function(){return x[this.ptr>>2]},this.set_adjusted_ptr=function(t){x[this.ptr+4>>2]=t},this.get_adjusted_ptr=function(){return x[this.ptr+4>>2]},this.get_exception_ptr=function(){if(___cxa_is_pointer_type(this.get_exception_info().get_type()))return x[this.get_base_ptr()>>2];var t=this.get_adjusted_ptr();return 0!==t?t:this.get_base_ptr()},this.get_exception_info=function(){return new vt(this.get_base_ptr())},void 0===t?(this.ptr=hn(8),this.set_adjusted_ptr(0)):this.ptr=t}var bt=[];function Ct(){return Ct.uncaught_exceptions>0}function Tt(t){return mn(new vt(t).ptr)}function jt(t){if(t.release_ref()&&!t.get_rethrown()){var e=t.get_destructor();e&&g.get(e)(t.excPtr),Tt(t.excPtr)}}var Pt=0;function Wt(){if(!Wt.called){Wt.called=!0,x[bn()>>2]=60*(new Date).getTimezoneOffset();var t=(new Date).getFullYear(),e=new Date(t,0,1),n=new Date(t,6,1);x[wn()>>2]=Number(e.getTimezoneOffset()!=n.getTimezoneOffset());var r=u(e),i=u(n),a=L(r),o=L(i);n.getTimezoneOffset()<e.getTimezoneOffset()?(x[vn()>>2]=a,x[vn()+4>>2]=o):(x[vn()>>2]=o,x[vn()+4>>2]=a)}function u(t){var e=t.toTimeString().match(/\(([A-Za-z ]+)\)$/);return e?e[1]:"GMT"}}function St(t,e){Wt();var n=new Date(1e3*x[t>>2]);x[e>>2]=n.getSeconds(),x[e+4>>2]=n.getMinutes(),x[e+8>>2]=n.getHours(),x[e+12>>2]=n.getDate(),x[e+16>>2]=n.getMonth(),x[e+20>>2]=n.getFullYear()-1900,x[e+24>>2]=n.getDay();var r=new Date(n.getFullYear(),0,1),i=(n.getTime()-r.getTime())/864e5|0;x[e+28>>2]=i,x[e+36>>2]=-60*n.getTimezoneOffset();var a=new Date(n.getFullYear(),6,1).getTimezoneOffset(),o=r.getTimezoneOffset(),u=0|(a!=o&&n.getTimezoneOffset()==Math.min(o,a));x[e+32>>2]=u;var s=x[vn()+(u?4:0)>>2];return x[e+40>>2]=s,e}var $t={mappings:{},buffers:[null,[],[]],printChar:function(t,e){var n=$t.buffers[t];0===e||10===e?((1===t?p:d)(T(n,0)),n.length=0):n.push(e)},varargs:void 0,get:function(){return $t.varargs+=4,x[$t.varargs-4>>2]},getStr:function(t){return j(t)},get64:function(t,e){return t}},At={};function kt(t){for(;t.length;){var e=t.pop();t.pop()(e)}}function Ot(t){return this.fromWireType(F[t>>2])}var Dt={},xt={},Ft={};function Et(t){if(void 0===t)return"_unknown";var e=(t=t.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return e>=48&&e<=57?"_"+t:t}function Rt(t,e){return t=Et(t),new Function("body","return function "+t+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function Mt(t,e){var n=Rt(e,(function(t){this.name=e,this.message=t;var n=new Error(t).stack;void 0!==n&&(this.stack=this.toString()+"\n"+n.replace(/^Error(:[^\n]*)?\n/,""))}));return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},n}var It=void 0;function zt(t){throw new It(t)}function Ut(t,e,n){function r(e){var r=n(e);r.length!==t.length&&zt("Mismatched type converter count");for(var i=0;i<t.length;++i)Ht(t[i],r[i])}t.forEach((function(t){Ft[t]=e}));var i=new Array(e.length),a=[],o=0;e.forEach((function(t,e){xt.hasOwnProperty(t)?i[e]=xt[t]:(a.push(t),Dt.hasOwnProperty(t)||(Dt[t]=[]),Dt[t].push((function(){i[e]=xt[t],++o===a.length&&r(i)})))})),0===a.length&&r(i)}var Gt={};function Yt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+t)}}var Bt=void 0;function Lt(t){for(var e="",n=t;k[n];)e+=Bt[k[n++]];return e}var Vt=void 0;function Nt(t){throw new Vt(t)}function Ht(t,e,n){if(n=n||{},!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var r=e.name;if(t||Nt('type "'+r+'" must have a positive integer typeid pointer'),xt.hasOwnProperty(t)){if(n.ignoreDuplicateRegistrations)return;Nt("Cannot register type '"+r+"' twice")}if(xt[t]=e,delete Ft[t],Dt.hasOwnProperty(t)){var i=Dt[t];delete Dt[t],i.forEach((function(t){t()}))}}function Kt(t){if(!(this instanceof ue))return!1;if(!(t instanceof ue))return!1;for(var e=this.$$.ptrType.registeredClass,n=this.$$.ptr,r=t.$$.ptrType.registeredClass,i=t.$$.ptr;e.baseClass;)n=e.upcast(n),e=e.baseClass;for(;r.baseClass;)i=r.upcast(i),r=r.baseClass;return e===r&&n===i}function qt(t){Nt(t.$$.ptrType.registeredClass.name+" instance already deleted")}var Jt=!1;function Qt(t){}function Xt(t){t.count.value-=1,0===t.count.value&&function(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}(t)}function Zt(t){return"undefined"==typeof FinalizationGroup?(Zt=function(t){return t},t):(Jt=new FinalizationGroup((function(t){for(var e=t.next();!e.done;e=t.next()){var n=e.value;n.ptr?Xt(n):console.warn("object already deleted: "+n.ptr)}})),Qt=function(t){Jt.unregister(t.$$)},(Zt=function(t){return Jt.register(t,t.$$,t.$$),t})(t))}function te(){if(this.$$.ptr||qt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t,e=Zt(Object.create(Object.getPrototypeOf(this),{$$:{value:(t=this.$$,{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType})}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e}function ee(){this.$$.ptr||qt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Nt("Object already scheduled for deletion"),Qt(this),Xt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function ne(){return!this.$$.ptr}var re=void 0,ie=[];function ae(){for(;ie.length;){var t=ie.pop();t.$$.deleteScheduled=!1,t.delete()}}function oe(){return this.$$.ptr||qt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&Nt("Object already scheduled for deletion"),ie.push(this),1===ie.length&&re&&re(ae),this.$$.deleteScheduled=!0,this}function ue(){}var se={};function ce(t,e,n){if(void 0===t[e].overloadTable){var r=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||Nt("Function '"+n+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+t[e].overloadTable+")!"),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[r.argCount]=r}}function le(t,e,n){i.hasOwnProperty(t)?((void 0===n||void 0!==i[t].overloadTable&&void 0!==i[t].overloadTable[n])&&Nt("Cannot register public name '"+t+"' twice"),ce(i,t,t),i.hasOwnProperty(n)&&Nt("Cannot register multiple overloads of a function with the same number of arguments ("+n+")!"),i[t].overloadTable[n]=e):(i[t]=e,void 0!==n&&(i[t].numArguments=n))}function fe(t,e,n,r,i,a,o,u){this.name=t,this.constructor=e,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=i,this.getActualType=a,this.upcast=o,this.downcast=u,this.pureVirtualFunctions=[]}function pe(t,e,n){for(;e!==n;)e.upcast||Nt("Expected null or instance of "+n.name+", got an instance of "+e.name),t=e.upcast(t),e=e.baseClass;return t}function de(t,e){if(null===e)return this.isReference&&Nt("null is not a valid "+this.name),0;e.$$||Nt('Cannot pass "'+Ve(e)+'" as a '+this.name),e.$$.ptr||Nt("Cannot pass deleted object as a pointer of type "+this.name);var n=e.$$.ptrType.registeredClass;return pe(e.$$.ptr,n,this.registeredClass)}function _e(t,e){var n;if(null===e)return this.isReference&&Nt("null is not a valid "+this.name),this.isSmartPointer?(n=this.rawConstructor(),null!==t&&t.push(this.rawDestructor,n),n):0;e.$$||Nt('Cannot pass "'+Ve(e)+'" as a '+this.name),e.$$.ptr||Nt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&e.$$.ptrType.isConst&&Nt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);var r=e.$$.ptrType.registeredClass;if(n=pe(e.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(void 0===e.$$.smartPtr&&Nt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?n=e.$$.smartPtr:Nt("Cannot convert argument of type "+(e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:n=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)n=e.$$.smartPtr;else{var i=e.clone();n=this.rawShare(n,Ye((function(){i.delete()}))),null!==t&&t.push(this.rawDestructor,n)}break;default:Nt("Unsupporting sharing policy")}return n}function he(t,e){if(null===e)return this.isReference&&Nt("null is not a valid "+this.name),0;e.$$||Nt('Cannot pass "'+Ve(e)+'" as a '+this.name),e.$$.ptr||Nt("Cannot pass deleted object as a pointer of type "+this.name),e.$$.ptrType.isConst&&Nt("Cannot convert argument of type "+e.$$.ptrType.name+" to parameter type "+this.name);var n=e.$$.ptrType.registeredClass;return pe(e.$$.ptr,n,this.registeredClass)}function me(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function ge(t){this.rawDestructor&&this.rawDestructor(t)}function ye(t){null!==t&&t.delete()}function ve(t,e,n){if(e===n)return t;if(void 0===n.baseClass)return null;var r=ve(t,e,n.baseClass);return null===r?null:n.downcast(r)}function we(){return Object.keys(Te).length}function be(){var t=[];for(var e in Te)Te.hasOwnProperty(e)&&t.push(Te[e]);return t}function Ce(t){re=t,ie.length&&re&&re(ae)}var Te={};function je(t,e){return e=function(t,e){for(void 0===e&&Nt("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}(t,e),Te[e]}function Pe(t,e){return e.ptrType&&e.ptr||zt("makeClassHandle requires ptr and ptrType"),!!e.smartPtrType!=!!e.smartPtr&&zt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Zt(Object.create(t,{$$:{value:e}}))}function We(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var n=je(this.registeredClass,e);if(void 0!==n){if(0===n.$$.count.value)return n.$$.ptr=e,n.$$.smartPtr=t,n.clone();var r=n.clone();return this.destructor(t),r}function i(){return this.isSmartPointer?Pe(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Pe(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var a,o=this.registeredClass.getActualType(e),u=se[o];if(!u)return i.call(this);a=this.isConst?u.constPointerType:u.pointerType;var s=ve(e,this.registeredClass,a.registeredClass);return null===s?i.call(this):this.isSmartPointer?Pe(a.registeredClass.instancePrototype,{ptrType:a,ptr:s,smartPtrType:this,smartPtr:t}):Pe(a.registeredClass.instancePrototype,{ptrType:a,ptr:s})}function Se(t,e,n,r,i,a,o,u,s,c,l){this.name=t,this.registeredClass=e,this.isReference=n,this.isConst=r,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=u,this.rawConstructor=s,this.rawShare=c,this.rawDestructor=l,i||void 0!==e.baseClass?this.toWireType=_e:r?(this.toWireType=de,this.destructorFunction=null):(this.toWireType=he,this.destructorFunction=null)}function $e(t,e,n){i.hasOwnProperty(t)||zt("Replacing nonexistant public symbol"),void 0!==i[t].overloadTable&&void 0!==n?i[t].overloadTable[n]=e:(i[t]=e,i[t].argCount=n)}function Ae(t,e){var n=-1!=(t=Lt(t)).indexOf("j")?function(t,e){b(t.indexOf("j")>=0,"getDynCaller should only be called with i64 sigs");var n=[];return function(){n.length=arguments.length;for(var r=0;r<arguments.length;r++)n[r]=arguments[r];return ct(t,e,n)}}(t,e):g.get(e);return"function"!=typeof n&&Nt("unknown function pointer with signature "+t+": "+e),n}var ke=void 0;function Oe(t){var e=yn(t),n=Lt(e);return mn(e),n}function De(t,e){var n=[],r={};throw e.forEach((function t(e){r[e]||xt[e]||(Ft[e]?Ft[e].forEach(t):(n.push(e),r[e]=!0))})),new ke(t+": "+n.map(Oe).join([", "]))}function xe(t,e){for(var n=[],r=0;r<t;r++)n.push(x[(e>>2)+r]);return n}function Fe(t,e){if(!(t instanceof Function))throw new TypeError("new_ called with constructor type "+typeof t+" which is not a function");var n=Rt(t.name||"unknownFunctionName",(function(){}));n.prototype=t.prototype;var r=new n,i=t.apply(r,e);return i instanceof Object?i:r}function Ee(t,e,n,r,i){var a=e.length;a<2&&Nt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var o=null!==e[1]&&null!==n,u=!1,s=1;s<e.length;++s)if(null!==e[s]&&void 0===e[s].destructorFunction){u=!0;break}var c="void"!==e[0].name,l="",f="";for(s=0;s<a-2;++s)l+=(0!==s?", ":"")+"arg"+s,f+=(0!==s?", ":"")+"arg"+s+"Wired";var p="return function "+Et(t)+"("+l+") {\nif (arguments.length !== "+(a-2)+") {\nthrowBindingError('function "+t+" called with ' + arguments.length + ' arguments, expected "+(a-2)+" args!');\n}\n";u&&(p+="var destructors = [];\n");var d=u?"destructors":"null",_=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],h=[Nt,r,i,kt,e[0],e[1]];for(o&&(p+="var thisWired = classParam.toWireType("+d+", this);\n"),s=0;s<a-2;++s)p+="var arg"+s+"Wired = argType"+s+".toWireType("+d+", arg"+s+"); // "+e[s+2].name+"\n",_.push("argType"+s),h.push(e[s+2]);if(o&&(f="thisWired"+(f.length>0?", ":"")+f),p+=(c?"var rv = ":"")+"invoker(fn"+(f.length>0?", ":"")+f+");\n",u)p+="runDestructors(destructors);\n";else for(s=o?1:2;s<e.length;++s){var m=1===s?"thisWired":"arg"+(s-2)+"Wired";null!==e[s].destructorFunction&&(p+=m+"_dtor("+m+"); // "+e[s].name+"\n",_.push(m+"_dtor"),h.push(e[s].destructorFunction))}return c&&(p+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),p+="}\n",_.push(p),Fe(Function,_).apply(null,h)}function Re(t,e,n){return t instanceof Object||Nt(n+' with invalid "this": '+t),t instanceof e.registeredClass.constructor||Nt(n+' incompatible with "this" of type '+t.constructor.name),t.$$.ptr||Nt("cannot call emscripten binding method "+n+" on deleted object"),pe(t.$$.ptr,t.$$.ptrType.registeredClass,e.registeredClass)}var Me=[],Ie=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function ze(t){t>4&&0==--Ie[t].refcount&&(Ie[t]=void 0,Me.push(t))}function Ue(){for(var t=0,e=5;e<Ie.length;++e)void 0!==Ie[e]&&++t;return t}function Ge(){for(var t=5;t<Ie.length;++t)if(void 0!==Ie[t])return Ie[t];return null}function Ye(t){switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var e=Me.length?Me.pop():Ie.length;return Ie[e]={refcount:1,value:t},e}}function Be(t,e,n){switch(e){case 0:return function(t){var e=n?A:k;return this.fromWireType(e[t])};case 1:return function(t){var e=n?O:D;return this.fromWireType(e[t>>1])};case 2:return function(t){var e=n?x:F;return this.fromWireType(e[t>>2])};default:throw new TypeError("Unknown integer type: "+t)}}function Le(t,e){var n=xt[t];return void 0===n&&Nt(e+" has unknown type "+Oe(t)),n}function Ve(t){if(null===t)return"null";var e=typeof t;return"object"===e||"array"===e||"function"===e?t.toString():""+t}function Ne(t,e){switch(e){case 2:return function(t){return this.fromWireType(E[t>>2])};case 3:return function(t){return this.fromWireType(R[t>>3])};default:throw new TypeError("Unknown float type: "+t)}}function He(t,e,n){switch(e){case 0:return n?function(t){return A[t]}:function(t){return k[t]};case 1:return n?function(t){return O[t>>1]}:function(t){return D[t>>1]};case 2:return n?function(t){return x[t>>2]}:function(t){return F[t>>2]};default:throw new TypeError("Unknown integer type: "+t)}}function Ke(t){return t||Nt("Cannot use deleted val. handle = "+t),Ie[t].value}var qe={};function Je(t){var e=qe[t];return void 0===e?Lt(t):e}var Qe=[];function Xe(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Ze(t,e){throw Pn(t,e||1),"longjmp"}function tn(t){try{return m.grow(t-$.byteLength+65535>>>16),N(m.buffer),1}catch(t){}}var en={};function nn(){if(!nn.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:c||"./this.program"};for(var e in en)t[e]=en[e];var n=[];for(var e in t)n.push(e+"="+t[e]);nn.strings=n}return nn.strings}function rn(t){return t%4==0&&(t%100!=0||t%400==0)}function an(t,e){for(var n=0,r=0;r<=e;n+=t[r++]);return n}var on=[31,29,31,30,31,30,31,31,30,31,30,31],un=[31,28,31,30,31,30,31,31,30,31,30,31];function sn(t,e){for(var n=new Date(t.getTime());e>0;){var r=rn(n.getFullYear()),i=n.getMonth(),a=(r?on:un)[i];if(!(e>a-n.getDate()))return n.setDate(n.getDate()+e),n;e-=a-n.getDate()+1,n.setDate(1),i<11?n.setMonth(i+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1))}return n}function cn(t,e,n,r){var i=x[r+40>>2],a={tm_sec:x[r>>2],tm_min:x[r+4>>2],tm_hour:x[r+8>>2],tm_mday:x[r+12>>2],tm_mon:x[r+16>>2],tm_year:x[r+20>>2],tm_wday:x[r+24>>2],tm_yday:x[r+28>>2],tm_isdst:x[r+32>>2],tm_gmtoff:x[r+36>>2],tm_zone:i?j(i):""},o=j(n),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var s in u)o=o.replace(new RegExp(s,"g"),u[s]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(t,e,n){for(var r="number"==typeof t?t.toString():t||"";r.length<e;)r=n[0]+r;return r}function p(t,e){return f(t,e,"0")}function d(t,e){function n(t){return t<0?-1:t>0?1:0}var r;return 0===(r=n(t.getFullYear()-e.getFullYear()))&&0===(r=n(t.getMonth()-e.getMonth()))&&(r=n(t.getDate()-e.getDate())),r}function _(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function h(t){var e=sn(new Date(t.tm_year+1900,0,1),t.tm_yday),n=new Date(e.getFullYear(),0,4),r=new Date(e.getFullYear()+1,0,4),i=_(n),a=_(r);return d(i,e)<=0?d(a,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var m={"%a":function(t){return c[t.tm_wday].substring(0,3)},"%A":function(t){return c[t.tm_wday]},"%b":function(t){return l[t.tm_mon].substring(0,3)},"%B":function(t){return l[t.tm_mon]},"%C":function(t){return p((t.tm_year+1900)/100|0,2)},"%d":function(t){return p(t.tm_mday,2)},"%e":function(t){return f(t.tm_mday,2," ")},"%g":function(t){return h(t).toString().substring(2)},"%G":function(t){return h(t)},"%H":function(t){return p(t.tm_hour,2)},"%I":function(t){var e=t.tm_hour;return 0==e?e=12:e>12&&(e-=12),p(e,2)},"%j":function(t){return p(t.tm_mday+an(rn(t.tm_year+1900)?on:un,t.tm_mon-1),3)},"%m":function(t){return p(t.tm_mon+1,2)},"%M":function(t){return p(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return p(t.tm_sec,2)},"%t":function(){return"\t"},"%u":function(t){return t.tm_wday||7},"%U":function(t){var e=new Date(t.tm_year+1900,0,1),n=0===e.getDay()?e:sn(e,7-e.getDay()),r=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(d(n,r)<0){var i=an(rn(r.getFullYear())?on:un,r.getMonth()-1)-31,a=31-n.getDate()+i+r.getDate();return p(Math.ceil(a/7),2)}return 0===d(n,e)?"01":"00"},"%V":function(t){var e,n=new Date(t.tm_year+1900,0,4),r=new Date(t.tm_year+1901,0,4),i=_(n),a=_(r),o=sn(new Date(t.tm_year+1900,0,1),t.tm_yday);return d(o,i)<0?"53":d(a,o)<=0?"01":(e=i.getFullYear()<t.tm_year+1900?t.tm_yday+32-i.getDate():t.tm_yday+1-i.getDate(),p(Math.ceil(e/7),2))},"%w":function(t){return t.tm_wday},"%W":function(t){var e=new Date(t.tm_year,0,1),n=1===e.getDay()?e:sn(e,0===e.getDay()?1:7-e.getDay()+1),r=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(d(n,r)<0){var i=an(rn(r.getFullYear())?on:un,r.getMonth()-1)-31,a=31-n.getDate()+i+r.getDate();return p(Math.ceil(a/7),2)}return 0===d(n,e)?"01":"00"},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var e=t.tm_gmtoff,n=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(n?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};for(var s in m)o.indexOf(s)>=0&&(o=o.replace(new RegExp(s,"g"),m[s](a)));var g,y,v,w,b,C,T=(g=o,y=!1,w=v>0?v:S(g)+1,b=new Array(w),C=P(g,b,0,b.length),y&&(b.length=C),b);return T.length>e?0:(V(T,t),T.length-1)}var ln=[];It=i.InternalError=Mt(Error,"InternalError"),function(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Bt=t}(),Vt=i.BindingError=Mt(Error,"BindingError"),ue.prototype.isAliasOf=Kt,ue.prototype.clone=te,ue.prototype.delete=ee,ue.prototype.isDeleted=ne,ue.prototype.deleteLater=oe,Se.prototype.getPointee=me,Se.prototype.destructor=ge,Se.prototype.argPackAdvance=8,Se.prototype.readValueFromPointer=Ot,Se.prototype.deleteObject=ye,Se.prototype.fromWireType=We,i.getInheritedInstanceCount=we,i.getLiveInheritedInstances=be,i.flushPendingDeletes=ae,i.setDelayFunction=Ce,ke=i.UnboundTypeError=Mt(Error,"UnboundTypeError"),i.count_emval_handles=Ue,i.get_first_emval=Ge,q.push({func:function(){dn()}});var fn,pn={__clock_gettime:function(t,e){return ft(t,e)},__cxa_allocate_exception:function(t){return hn(t+gt)+gt},__cxa_atexit:function(t,e){},__cxa_begin_catch:function(t){var e=new wt(t),n=e.get_exception_info();return n.get_caught()||(n.set_caught(!0),Ct.uncaught_exceptions--),n.set_rethrown(!1),bt.push(e),function(t){t.add_ref()}(n),e.get_exception_ptr()},__cxa_decrement_exception_refcount:function(t){t&&jt(new vt(t))},__cxa_end_catch:function(){Pn(0);var t=bt.pop();jt(t.get_exception_info()),t.free(),Pt=0},__cxa_find_matching_catch_2:function(){var t=Pt;if(!t)return 0|(v(0),0);var e=new vt(t),n=e.get_type(),r=new wt;if(r.set_base_ptr(t),!n)return 0|(v(0),r.ptr);var i=Array.prototype.slice.call(arguments),a=Cn(),o=jn(4);x[o>>2]=t;for(var u=0;u<i.length;u++){var s=i[u];if(0===s||s===n)break;if(___cxa_can_catch(s,n,o)){var c=x[o>>2];return t!==c&&r.set_adjusted_ptr(c),0|(v(s),r.ptr)}}return Tn(a),0|(v(n),r.ptr)},__cxa_find_matching_catch_3:function(){var t=Pt;if(!t)return 0|(v(0),0);var e=new vt(t),n=e.get_type(),r=new wt;if(r.set_base_ptr(t),!n)return 0|(v(0),r.ptr);var i=Array.prototype.slice.call(arguments),a=Cn(),o=jn(4);x[o>>2]=t;for(var u=0;u<i.length;u++){var s=i[u];if(0===s||s===n)break;if(___cxa_can_catch(s,n,o)){var c=x[o>>2];return t!==c&&r.set_adjusted_ptr(c),0|(v(s),r.ptr)}}return Tn(a),0|(v(n),r.ptr)},__cxa_free_exception:Tt,__cxa_rethrow:function(){var t=bt.pop(),e=t.get_exception_info(),n=t.get_base_ptr();throw e.get_rethrown()?t.free():(bt.push(t),e.set_rethrown(!0)),Pt=n,n},__cxa_thread_atexit:function(t,e){},__cxa_throw:function(t,e,n){throw new vt(t).init(e,n),Pt=t,"uncaught_exception"in Ct?Ct.uncaught_exceptions++:Ct.uncaught_exceptions=1,t},__cxa_uncaught_exceptions:function(){return Ct.uncaught_exceptions},__localtime_r:function(t,e){return St(t,e)},__resumeException:function(t){var e=new wt(t),n=e.get_base_ptr();throw Pt||(Pt=n),e.free(),n},__sys__newselect:function(t,e,n,r,i){},__sys_fcntl64:function(t,e,n){return $t.varargs=n,0},__sys_fstat64:function(t,e){},__sys_getpid:function(){return 42},__sys_getuid32:function(){return 0},__sys_ioctl:function(t,e,n){return $t.varargs=n,0},__sys_mmap2:function(t,e,n,r,i,a){return function(t,e,n,r,i,a){var o;a<<=12;var u=!1;return 0!=(16&r)&&t%16384!=0?-28:0==(32&r)?-52:(o=Wn(16384,e))?(_n(o,0,e),u=!0,$t.mappings[o]={malloc:o,len:e,allocated:u,fd:i,prot:n,flags:r,offset:a},o):-48}(t,e,n,r,i,a)},__sys_munmap:function(t,e){return function(t,e){if(-1==(0|t)||0===e)return-28;var n=$t.mappings[t];return n?(e===n.len&&($t.mappings[t]=null,n.allocated&&mn(n.malloc)),0):0}(t,e)},__sys_open:function(t,e,n){$t.varargs=n},__sys_read:function(t,e,n){},__sys_rmdir:function(t){},__sys_stat64:function(t,e){},__sys_unlink:function(t){},_embind_finalize_value_array:function(t){var e=At[t];delete At[t];var n=e.elements,r=n.length,i=n.map((function(t){return t.getterReturnType})).concat(n.map((function(t){return t.setterArgumentType}))),a=e.rawConstructor,o=e.rawDestructor;Ut([t],i,(function(t){return n.forEach((function(e,n){var i=t[n],a=e.getter,o=e.getterContext,u=t[n+r],s=e.setter,c=e.setterContext;e.read=function(t){return i.fromWireType(a(o,t))},e.write=function(t,e){var n=[];s(c,t,u.toWireType(n,e)),kt(n)}})),[{name:e.name,fromWireType:function(t){for(var e=new Array(r),i=0;i<r;++i)e[i]=n[i].read(t);return o(t),e},toWireType:function(t,i){if(r!==i.length)throw new TypeError("Incorrect number of tuple elements for "+e.name+": expected="+r+", actual="+i.length);for(var u=a(),s=0;s<r;++s)n[s].write(u,i[s]);return null!==t&&t.push(o,u),u},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:o}]}))},_embind_finalize_value_object:function(t){var e=Gt[t];delete Gt[t];var n=e.rawConstructor,r=e.rawDestructor,i=e.fields;Ut([t],i.map((function(t){return t.getterReturnType})).concat(i.map((function(t){return t.setterArgumentType}))),(function(t){var a={};return i.forEach((function(e,n){var r=e.fieldName,o=t[n],u=e.getter,s=e.getterContext,c=t[n+i.length],l=e.setter,f=e.setterContext;a[r]={read:function(t){return o.fromWireType(u(s,t))},write:function(t,e){var n=[];l(f,t,c.toWireType(n,e)),kt(n)}}})),[{name:e.name,fromWireType:function(t){var e={};for(var n in a)e[n]=a[n].read(t);return r(t),e},toWireType:function(t,e){for(var i in a)if(!(i in e))throw new TypeError('Missing field: "'+i+'"');var o=n();for(i in a)a[i].write(o,e[i]);return null!==t&&t.push(r,o),o},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:r}]}))},_embind_register_bool:function(t,e,n,r,i){var a=Yt(n);Ht(t,{name:e=Lt(e),fromWireType:function(t){return!!t},toWireType:function(t,e){return e?r:i},argPackAdvance:8,readValueFromPointer:function(t){var r;if(1===n)r=A;else if(2===n)r=O;else{if(4!==n)throw new TypeError("Unknown boolean type size: "+e);r=x}return this.fromWireType(r[t>>a])},destructorFunction:null})},_embind_register_class:function(t,e,n,r,i,a,o,u,s,c,l,f,p){l=Lt(l),a=Ae(i,a),u&&(u=Ae(o,u)),c&&(c=Ae(s,c)),p=Ae(f,p);var d=Et(l);le(d,(function(){De("Cannot construct "+l+" due to unbound types",[r])})),Ut([t,e,n],r?[r]:[],(function(e){var n,i;e=e[0],i=r?(n=e.registeredClass).instancePrototype:ue.prototype;var o=Rt(d,(function(){if(Object.getPrototypeOf(this)!==s)throw new Vt("Use 'new' to construct "+l);if(void 0===f.constructor_body)throw new Vt(l+" has no accessible constructor");var t=f.constructor_body[arguments.length];if(void 0===t)throw new Vt("Tried to invoke ctor of "+l+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(f.constructor_body).toString()+") parameters instead!");return t.apply(this,arguments)})),s=Object.create(i,{constructor:{value:o}});o.prototype=s;var f=new fe(l,o,s,p,n,a,u,c),_=new Se(l,f,!0,!1,!1),h=new Se(l+"*",f,!1,!1,!1),m=new Se(l+" const*",f,!1,!0,!1);return se[t]={pointerType:h,constPointerType:m},$e(d,o),[_,h,m]}))},_embind_register_class_constructor:function(t,e,n,r,i,a){b(e>0);var o=xe(e,n);i=Ae(r,i);var u=[a],s=[];Ut([],[t],(function(t){var n="constructor "+(t=t[0]).name;if(void 0===t.registeredClass.constructor_body&&(t.registeredClass.constructor_body=[]),void 0!==t.registeredClass.constructor_body[e-1])throw new Vt("Cannot register multiple constructors with identical number of parameters ("+(e-1)+") for class '"+t.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return t.registeredClass.constructor_body[e-1]=function(){De("Cannot construct "+t.name+" due to unbound types",o)},Ut([],o,(function(r){return t.registeredClass.constructor_body[e-1]=function(){arguments.length!==e-1&&Nt(n+" called with "+arguments.length+" arguments, expected "+(e-1)),s.length=0,u.length=e;for(var t=1;t<e;++t)u[t]=r[t].toWireType(s,arguments[t-1]);var a=i.apply(null,u);return kt(s),r[0].fromWireType(a)},[]})),[]}))},_embind_register_class_function:function(t,e,n,r,i,a,o,u){var s=xe(n,r);e=Lt(e),a=Ae(i,a),Ut([],[t],(function(t){var r=(t=t[0]).name+"."+e;function i(){De("Cannot call "+r+" due to unbound types",s)}u&&t.registeredClass.pureVirtualFunctions.push(e);var c=t.registeredClass.instancePrototype,l=c[e];return void 0===l||void 0===l.overloadTable&&l.className!==t.name&&l.argCount===n-2?(i.argCount=n-2,i.className=t.name,c[e]=i):(ce(c,e,r),c[e].overloadTable[n-2]=i),Ut([],s,(function(i){var u=Ee(r,i,t,a,o);return void 0===c[e].overloadTable?(u.argCount=n-2,c[e]=u):c[e].overloadTable[n-2]=u,[]})),[]}))},_embind_register_class_property:function(t,e,n,r,i,a,o,u,s,c){e=Lt(e),i=Ae(r,i),Ut([],[t],(function(t){var r=(t=t[0]).name+"."+e,l={get:function(){De("Cannot access "+r+" due to unbound types",[n,o])},enumerable:!0,configurable:!0};return l.set=s?function(){De("Cannot access "+r+" due to unbound types",[n,o])}:function(t){Nt(r+" is a read-only property")},Object.defineProperty(t.registeredClass.instancePrototype,e,l),Ut([],s?[n,o]:[n],(function(n){var o=n[0],l={get:function(){var e=Re(this,t,r+" getter");return o.fromWireType(i(a,e))},enumerable:!0};if(s){s=Ae(u,s);var f=n[1];l.set=function(e){var n=Re(this,t,r+" setter"),i=[];s(c,n,f.toWireType(i,e)),kt(i)}}return Object.defineProperty(t.registeredClass.instancePrototype,e,l),[]})),[]}))},_embind_register_emval:function(t,e){Ht(t,{name:e=Lt(e),fromWireType:function(t){var e=Ie[t].value;return ze(t),e},toWireType:function(t,e){return Ye(e)},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:null})},_embind_register_enum:function(t,e,n,r){var i=Yt(n);function a(){}e=Lt(e),a.values={},Ht(t,{name:e,constructor:a,fromWireType:function(t){return this.constructor.values[t]},toWireType:function(t,e){return e.value},argPackAdvance:8,readValueFromPointer:Be(e,i,r),destructorFunction:null}),le(e,a)},_embind_register_enum_value:function(t,e,n){var r=Le(t,"enum");e=Lt(e);var i=r.constructor,a=Object.create(r.constructor.prototype,{value:{value:n},constructor:{value:Rt(r.name+"_"+e,(function(){}))}});i.values[n]=a,i[e]=a},_embind_register_float:function(t,e,n){var r=Yt(n);Ht(t,{name:e=Lt(e),fromWireType:function(t){return t},toWireType:function(t,e){if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+Ve(e)+'" to '+this.name);return e},argPackAdvance:8,readValueFromPointer:Ne(e,r),destructorFunction:null})},_embind_register_function:function(t,e,n,r,i,a){var o=xe(e,n);t=Lt(t),i=Ae(r,i),le(t,(function(){De("Cannot call "+t+" due to unbound types",o)}),e-1),Ut([],o,(function(n){var r=[n[0],null].concat(n.slice(1));return $e(t,Ee(t,r,null,i,a),e-1),[]}))},_embind_register_integer:function(t,e,n,r,i){e=Lt(e),-1===i&&(i=4294967295);var a=Yt(n),o=function(t){return t};if(0===r){var u=32-8*n;o=function(t){return t<<u>>>u}}var s=-1!=e.indexOf("unsigned");Ht(t,{name:e,fromWireType:o,toWireType:function(t,n){if("number"!=typeof n&&"boolean"!=typeof n)throw new TypeError('Cannot convert "'+Ve(n)+'" to '+this.name);if(n<r||n>i)throw new TypeError('Passing a number "'+Ve(n)+'" from JS side to C/C++ side to an argument of type "'+e+'", which is outside the valid range ['+r+", "+i+"]!");return s?n>>>0:0|n},argPackAdvance:8,readValueFromPointer:He(e,a,0!==r),destructorFunction:null})},_embind_register_memory_view:function(t,e,n){var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function i(t){var e=F,n=e[t>>=2],i=e[t+1];return new r($,i,n)}Ht(t,{name:n=Lt(n),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:function(t,e){var n="std::string"===(e=Lt(e));Ht(t,{name:e,fromWireType:function(t){var e,r=F[t>>2];if(n)for(var i=t+4,a=0;a<=r;++a){var o=t+4+a;if(a==r||0==k[o]){var u=j(i,o-i);void 0===e?e=u:(e+=String.fromCharCode(0),e+=u),i=o+1}}else{var s=new Array(r);for(a=0;a<r;++a)s[a]=String.fromCharCode(k[t+4+a]);e=s.join("")}return mn(t),e},toWireType:function(t,e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var r="string"==typeof e;r||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||Nt("Cannot pass non-string to std::string");var i=(n&&r?function(){return S(e)}:function(){return e.length})(),a=hn(4+i+1);if(F[a>>2]=i,n&&r)W(e,a+4,i+1);else if(r)for(var o=0;o<i;++o){var u=e.charCodeAt(o);u>255&&(mn(a),Nt("String has UTF-16 code units that do not fit in 8 bits")),k[a+4+o]=u}else for(o=0;o<i;++o)k[a+4+o]=e[o];return null!==t&&t.push(mn,a),a},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:function(t){mn(t)}})},_embind_register_std_wstring:function(t,e,n){var r,i,a,o,u;n=Lt(n),2===e?(r=I,i=z,o=U,a=function(){return D},u=1):4===e&&(r=G,i=Y,o=B,a=function(){return F},u=2),Ht(t,{name:n,fromWireType:function(t){for(var n,i=F[t>>2],o=a(),s=t+4,c=0;c<=i;++c){var l=t+4+c*e;if(c==i||0==o[l>>u]){var f=r(s,l-s);void 0===n?n=f:(n+=String.fromCharCode(0),n+=f),s=l+e}}return mn(t),n},toWireType:function(t,r){"string"!=typeof r&&Nt("Cannot pass non-string to C++ string type "+n);var a=o(r),s=hn(4+a+e);return F[s>>2]=a>>u,i(r,s+4,a+e),null!==t&&t.push(mn,s),s},argPackAdvance:8,readValueFromPointer:Ot,destructorFunction:function(t){mn(t)}})},_embind_register_value_array:function(t,e,n,r,i,a){At[t]={name:Lt(e),rawConstructor:Ae(n,r),rawDestructor:Ae(i,a),elements:[]}},_embind_register_value_array_element:function(t,e,n,r,i,a,o,u,s){At[t].elements.push({getterReturnType:e,getter:Ae(n,r),getterContext:i,setterArgumentType:a,setter:Ae(o,u),setterContext:s})},_embind_register_value_object:function(t,e,n,r,i,a){Gt[t]={name:Lt(e),rawConstructor:Ae(n,r),rawDestructor:Ae(i,a),fields:[]}},_embind_register_value_object_field:function(t,e,n,r,i,a,o,u,s,c){Gt[t].fields.push({fieldName:Lt(e),getterReturnType:n,getter:Ae(r,i),getterContext:a,setterArgumentType:o,setter:Ae(u,s),setterContext:c})},_embind_register_void:function(t,e){Ht(t,{isVoid:!0,name:e=Lt(e),argPackAdvance:0,fromWireType:function(){},toWireType:function(t,e){}})},_emval_as:function(t,e,n){t=Ke(t),e=Le(e,"emval::as");var r=[],i=Ye(r);return x[n>>2]=i,e.toWireType(r,t)},_emval_call_method:function(t,e,n,r,i){return(t=Qe[t])(e=Ke(e),n=Je(n),function(t){var e=[];return x[t>>2]=Ye(e),e}(r),i)},_emval_call_void_method:function(t,e,n,r){(t=Qe[t])(e=Ke(e),n=Je(n),null,r)},_emval_decref:ze,_emval_get_global:function(t){return 0===t?Ye(Xe()):(t=Je(t),Ye(Xe()[t]))},_emval_get_method_caller:function(t,e){for(var n=function(t,e){for(var n=new Array(t),r=0;r<t;++r)n[r]=Le(x[(e>>2)+r],"parameter "+r);return n}(t,e),r=n[0],i=r.name+"_$"+n.slice(1).map((function(t){return t.name})).join("_")+"$",a=["retType"],o=[r],u="",s=0;s<t-1;++s)u+=(0!==s?", ":"")+"arg"+s,a.push("argType"+s),o.push(n[1+s]);var c="return function "+Et("methodCaller_"+i)+"(handle, name, destructors, args) {\n",l=0;for(s=0;s<t-1;++s)c+=" var arg"+s+" = argType"+s+".readValueFromPointer(args"+(l?"+"+l:"")+");\n",l+=n[s+1].argPackAdvance;for(c+=" var rv = handle[name]("+u+");\n",s=0;s<t-1;++s)n[s+1].deleteObject&&(c+=" argType"+s+".deleteObject(arg"+s+");\n");r.isVoid||(c+=" return retType.toWireType(destructors, rv);\n"),c+="};\n",a.push(c);var f,p,d=Fe(Function,a).apply(null,o);return f=d,p=Qe.length,Qe.push(f),p},_emval_get_property:function(t,e){return Ye((t=Ke(t))[e=Ke(e)])},_emval_incref:function(t){t>4&&(Ie[t].refcount+=1)},_emval_instanceof:function(t,e){return(t=Ke(t))instanceof(e=Ke(e))},_emval_is_number:function(t){return"number"==typeof(t=Ke(t))},_emval_is_string:function(t){return"string"==typeof(t=Ke(t))},_emval_new_array:function(){return Ye([])},_emval_new_cstring:function(t){return Ye(Je(t))},_emval_run_destructors:function(t){kt(Ie[t].value),ze(t)},_emval_take_value:function(t,e){return Ye((t=Le(t,"_emval_take_value")).readValueFromPointer(e))},abort:function(){et()},atexit:yt,clock:function t(){return void 0===t.start&&(t.start=Date.now()),1e3*(Date.now()-t.start)|0},clock_gettime:ft,dlopen:function(t,e){et("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")},dlsym:function(t,e){et("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")},emscripten_asm_const_int:function(t,e,n){var r=function(t,e){var n;for(ln.length=0,e>>=2;n=k[t++];){var r=n<105;r&&1&e&&e++,ln.push(r?R[e++>>1]:x[e]),++e}return ln}(e,n);return ut[t].apply(null,r)},emscripten_longjmp:function(t,e){return Ze(t,e)},emscripten_longjmp_jmpbuf:function(t,e){return Ze(t,e)},emscripten_memcpy_big:function(t,e,n){k.copyWithin(t,e,e+n)},emscripten_resize_heap:function(t){t>>>=0;var e=k.length,n=2147483648;if(t>n)return!1;for(var r,i,a=1;a<=4;a*=2){var o=e*(1+.2/a);if(o=Math.min(o,t+100663296),tn(Math.min(n,((r=Math.max(16777216,t,o))%(i=65536)>0&&(r+=i-r%i),r))))return!0}return!1},environ_get:function(t,e){var n=0;return nn().forEach((function(r,i){var a=e+n;x[t+4*i>>2]=a,function(t,e,n){for(var r=0;r<t.length;++r)A[e++>>0]=t.charCodeAt(r);n||(A[e>>0]=0)}(r,a),n+=r.length+1})),0},environ_sizes_get:function(t,e){var n=nn();x[t>>2]=n.length;var r=0;return n.forEach((function(t){r+=t.length+1})),x[e>>2]=r,0},exit:function(t){!function(t,e){e&&h&&0===t||(h||(i.onExit&&i.onExit(t),w=!0),l(t,new On(t)))}(t)},fd_close:function(t){return 0},fd_fdstat_get:function(t,e){var n=1==t||2==t?2:et();return A[e>>0]=n,0},fd_read:function(t,e,n,r){var i=$t.getStreamFromFD(t),a=$t.doReadv(i,e,n);return x[r>>2]=a,0},fd_seek:function(t,e,n,r,i){},fd_write:function(t,e,n,r){for(var i=0,a=0;a<n;a++){for(var o=x[e+8*a>>2],u=x[e+(8*a+4)>>2],s=0;s<u;s++)$t.printChar(t,k[o+s]);i+=u}return x[r>>2]=i,0},getSelf:function(){return L(location.toString())},getTempRet0:function(){return 0|y},gettimeofday:function(t){var e=Date.now();return x[t>>2]=e/1e3|0,x[t+4>>2]=e%1e3*1e3|0,0},gmtime_r:function t(e,n){var r=new Date(1e3*x[e>>2]);x[n>>2]=r.getUTCSeconds(),x[n+4>>2]=r.getUTCMinutes(),x[n+8>>2]=r.getUTCHours(),x[n+12>>2]=r.getUTCDate(),x[n+16>>2]=r.getUTCMonth(),x[n+20>>2]=r.getUTCFullYear()-1900,x[n+24>>2]=r.getUTCDay(),x[n+36>>2]=0,x[n+32>>2]=0;var i=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),a=(r.getTime()-i)/864e5|0;return x[n+28>>2]=a,t.GMTString||(t.GMTString=L("GMT")),x[n+40>>2]=t.GMTString,n},initializeOpenGL:function(){return L((t=Fn,self[t(125,"RXbV")][t(131,"Bw*8")]()));var t},invoke_diii:function(t,e,n,r){var i=Cn();try{return g.get(t)(e,n,r)}catch(t){if(Tn(i),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_fiii:function(t,e,n,r){var i=Cn();try{return g.get(t)(e,n,r)}catch(t){if(Tn(i),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_i:function(t){var e=Cn();try{return g.get(t)()}catch(t){if(Tn(e),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_ii:function(t,e){var n=Cn();try{return g.get(t)(e)}catch(t){if(Tn(n),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iii:function(t,e,n){var r=Cn();try{return g.get(t)(e,n)}catch(t){if(Tn(r),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iiii:function(t,e,n,r){var i=Cn();try{return g.get(t)(e,n,r)}catch(t){if(Tn(i),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iiiii:function(t,e,n,r,i){var a=Cn();try{return g.get(t)(e,n,r,i)}catch(t){if(Tn(a),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iiiiid:function(t,e,n,r,i,a){var o=Cn();try{return g.get(t)(e,n,r,i,a)}catch(t){if(Tn(o),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iiiiii:function(t,e,n,r,i,a){var o=Cn();try{return g.get(t)(e,n,r,i,a)}catch(t){if(Tn(o),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iiiiiii:function(t,e,n,r,i,a,o){var u=Cn();try{return g.get(t)(e,n,r,i,a,o)}catch(t){if(Tn(u),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iiiiiiii:function(t,e,n,r,i,a,o,u){var s=Cn();try{return g.get(t)(e,n,r,i,a,o,u)}catch(t){if(Tn(s),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iiiiiiiiiii:function(t,e,n,r,i,a,o,u,s,c,l){var f=Cn();try{return g.get(t)(e,n,r,i,a,o,u,s,c,l)}catch(t){if(Tn(f),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iiiiiiiiiiii:function(t,e,n,r,i,a,o,u,s,c,l,f){var p=Cn();try{return g.get(t)(e,n,r,i,a,o,u,s,c,l,f)}catch(t){if(Tn(p),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iiiiiiiiiiiii:function(t,e,n,r,i,a,o,u,s,c,l,f,p){var d=Cn();try{return g.get(t)(e,n,r,i,a,o,u,s,c,l,f,p)}catch(t){if(Tn(d),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_iiiiij:function(t,e,n,r,i,a,o){var u=Cn();try{return An(t,e,n,r,i,a,o)}catch(t){if(Tn(u),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_jii:function(t,e,n){var r=Cn();try{return $n(t,e,n)}catch(t){if(Tn(r),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_jiiii:function(t,e,n,r,i){var a=Cn();try{return kn(t,e,n,r,i)}catch(t){if(Tn(a),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_v:function(t){var e=Cn();try{g.get(t)()}catch(t){if(Tn(e),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_vi:function(t,e){var n=Cn();try{g.get(t)(e)}catch(t){if(Tn(n),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_vii:function(t,e,n){var r=Cn();try{g.get(t)(e,n)}catch(t){if(Tn(r),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_viii:function(t,e,n,r){var i=Cn();try{g.get(t)(e,n,r)}catch(t){if(Tn(i),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_viiii:function(t,e,n,r,i){var a=Cn();try{g.get(t)(e,n,r,i)}catch(t){if(Tn(a),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_viiiii:function(t,e,n,r,i,a){var o=Cn();try{g.get(t)(e,n,r,i,a)}catch(t){if(Tn(o),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_viiiiii:function(t,e,n,r,i,a,o){var u=Cn();try{g.get(t)(e,n,r,i,a,o)}catch(t){if(Tn(u),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_viiiiiii:function(t,e,n,r,i,a,o,u){var s=Cn();try{g.get(t)(e,n,r,i,a,o,u)}catch(t){if(Tn(s),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_viiiiiiiiii:function(t,e,n,r,i,a,o,u,s,c,l){var f=Cn();try{g.get(t)(e,n,r,i,a,o,u,s,c,l)}catch(t){if(Tn(f),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_viiiiiiiiiiiiiii:function(t,e,n,r,i,a,o,u,s,c,l,f,p,d,_,h){var m=Cn();try{g.get(t)(e,n,r,i,a,o,u,s,c,l,f,p,d,_,h)}catch(t){if(Tn(m),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},invoke_viijii:function(t,e,n,r,i,a,o){var u=Cn();try{Sn(t,e,n,r,i,a,o)}catch(t){if(Tn(u),t!==t+0&&"longjmp"!==t)throw t;Pn(1,0)}},memory:m,nanosleep:function(t,e){if(0===t)return lt(28),-1;var n=x[t>>2],r=x[t+4>>2];return r<0||r>999999999||n<0?(lt(28),-1):(0!==e&&(x[e>>2]=0,x[e+4>>2]=0),function(t){for(var e=ot();ot()-e<t/1e3;);}(1e6*n+r/1e3))},pthread_create:function(){return 6},pthread_detach:function(){},pthread_join:function(){},pthread_mutexattr_destroy:function(){},pthread_mutexattr_init:function(){},pthread_mutexattr_settype:function(){},sem_destroy:function(){},sem_init:function(){},sem_post:function(){},sem_wait:function(){},setTempRet0:function(t){v(0|t)},strftime:cn,strftime_l:function(t,e,n,r){return cn(t,e,n,r)},sysconf:function(t){switch(t){case 30:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return lt(28),-1},time:function(t){var e=Date.now()/1e3|0;return t&&(x[t>>2]=e),e}},dn=(function(){var t={env:pn,wasi_snapshot_preview1:pn};function e(t,e){var n=t.exports;i.asm=n,g=i.asm.__indirect_function_table,function(t){if(X--,i.monitorRunDependencies&&i.monitorRunDependencies(X),0==X&&(null!==Z&&(clearInterval(Z),Z=null),tt)){var e=tt;tt=null,e()}}()}function n(t){e(t.instance)}function r(e){return(_||"function"!=typeof fetch?Promise.resolve().then(at):fetch(it,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+it+"'";return t.arrayBuffer()})).catch((function(){return at()}))).then((function(e){return WebAssembly.instantiate(e,t)})).then(e,(function(t){d("failed to asynchronously prepare wasm: "+t),et(t)}))}if(X++,i.monitorRunDependencies&&i.monitorRunDependencies(X),i.instantiateWasm)try{return i.instantiateWasm(t,e)}catch(t){return d("Module.instantiateWasm callback failed with error: "+t),!1}!function(){if(_||"function"!=typeof WebAssembly.instantiateStreaming||nt(it)||"function"!=typeof fetch)return r(n);fetch(it,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,t).then(n,(function(t){return d("wasm streaming compile failed: "+t),d("falling back to ArrayBuffer instantiation"),r(n)}))}))}()}(),i.___wasm_call_ctors=function(){return(dn=i.___wasm_call_ctors=i.asm.__wasm_call_ctors).apply(null,arguments)}),_n=i._memset=function(){return(_n=i._memset=i.asm.memset).apply(null,arguments)},hn=i._malloc=function(){return(hn=i._malloc=i.asm.malloc).apply(null,arguments)},mn=i._free=function(){return(mn=i._free=i.asm.free).apply(null,arguments)},gn=i.___errno_location=function(){return(gn=i.___errno_location=i.asm.__errno_location).apply(null,arguments)},yn=(i.___em_js__getSelf=function(){return(i.___em_js__getSelf=i.asm.__em_js__getSelf).apply(null,arguments)},i.___em_js__initializeOpenGL=function(){return(i.___em_js__initializeOpenGL=i.asm.__em_js__initializeOpenGL).apply(null,arguments)},i._testSetjmp=function(){return(i._testSetjmp=i.asm.testSetjmp).apply(null,arguments)},i._saveSetjmp=function(){return(i._saveSetjmp=i.asm.saveSetjmp).apply(null,arguments)},i._realloc=function(){return(i._realloc=i.asm.realloc).apply(null,arguments)},i.___getTypeName=function(){return(yn=i.___getTypeName=i.asm.__getTypeName).apply(null,arguments)}),vn=(i.___embind_register_native_and_builtin_types=function(){return(i.___embind_register_native_and_builtin_types=i.asm.__embind_register_native_and_builtin_types).apply(null,arguments)},i.__get_tzname=function(){return(vn=i.__get_tzname=i.asm._get_tzname).apply(null,arguments)}),wn=i.__get_daylight=function(){return(wn=i.__get_daylight=i.asm._get_daylight).apply(null,arguments)},bn=i.__get_timezone=function(){return(bn=i.__get_timezone=i.asm._get_timezone).apply(null,arguments)},Cn=i.stackSave=function(){return(Cn=i.stackSave=i.asm.stackSave).apply(null,arguments)},Tn=i.stackRestore=function(){return(Tn=i.stackRestore=i.asm.stackRestore).apply(null,arguments)},jn=i.stackAlloc=function(){return(jn=i.stackAlloc=i.asm.stackAlloc).apply(null,arguments)},Pn=i._setThrew=function(){return(Pn=i._setThrew=i.asm.setThrew).apply(null,arguments)},Wn=i._memalign=function(){return(Wn=i._memalign=i.asm.memalign).apply(null,arguments)},Sn=(i._emscripten_main_thread_process_queued_calls=function(){return(i._emscripten_main_thread_process_queued_calls=i.asm.emscripten_main_thread_process_queued_calls).apply(null,arguments)},i.dynCall_viijii=function(){return(Sn=i.dynCall_viijii=i.asm.dynCall_viijii).apply(null,arguments)}),$n=(i.dynCall_jiji=function(){return(i.dynCall_jiji=i.asm.dynCall_jiji).apply(null,arguments)},i.dynCall_ji=function(){return(i.dynCall_ji=i.asm.dynCall_ji).apply(null,arguments)},i.dynCall_viij=function(){return(i.dynCall_viij=i.asm.dynCall_viij).apply(null,arguments)},i.dynCall_viji=function(){return(i.dynCall_viji=i.asm.dynCall_viji).apply(null,arguments)},i.dynCall_vijiii=function(){return(i.dynCall_vijiii=i.asm.dynCall_vijiii).apply(null,arguments)},i.dynCall_viiiiij=function(){return(i.dynCall_viiiiij=i.asm.dynCall_viiiiij).apply(null,arguments)},i.dynCall_jii=function(){return($n=i.dynCall_jii=i.asm.dynCall_jii).apply(null,arguments)}),An=(i.dynCall_jiiiiii=function(){return(i.dynCall_jiiiiii=i.asm.dynCall_jiiiiii).apply(null,arguments)},i.dynCall_iijj=function(){return(i.dynCall_iijj=i.asm.dynCall_iijj).apply(null,arguments)},i.dynCall_jjj=function(){return(i.dynCall_jjj=i.asm.dynCall_jjj).apply(null,arguments)},i.dynCall_iiiiij=function(){return(An=i.dynCall_iiiiij=i.asm.dynCall_iiiiij).apply(null,arguments)}),kn=i.dynCall_jiiii=function(){return(kn=i.dynCall_jiiii=i.asm.dynCall_jiiii).apply(null,arguments)};function On(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}function Dn(t){function n(){fn||(fn=!0,i.calledRun=!0,w||(st(q),st(J),e(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)t=i.postRun.shift(),Q.unshift(t);var t;st(Q)}()))}t=t||s,X>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)t=i.preRun.shift(),K.unshift(t);var t;st(K)}(),X>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),n()}),1)):n()))}if(i.dynCall_iiiiijj=function(){return(i.dynCall_iiiiijj=i.asm.dynCall_iiiiijj).apply(null,arguments)},i.dynCall_iiiiiijj=function(){return(i.dynCall_iiiiiijj=i.asm.dynCall_iiiiiijj).apply(null,arguments)},i.___growWasmMemory=function(){return(i.___growWasmMemory=i.asm.__growWasmMemory).apply(null,arguments)},i.UTF8ToString=j,i.stringToUTF8=W,i.lengthBytesUTF8=S,i.allocateUTF8=L,tt=function t(){fn||Dn(),fn||(tt=t)},i.run=Dn,i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();function xn(){var t=["eCo4r8o7WReTW5zSW7LZWOv5","W7tcMmkArSo0W5XEWRJdHh92e3G","rmoDWP7dJSo8W6xcP8oaECojW75UAG","WOfeWRFdUSkbW4D9hqK","lSkqWQ9SwCkbkW3cMW","W7VcSConW6ZdPNniWOX4peu","W7ZcNmkqs8o5W5GkWQxdVfHiga","rmkLf8kJW7XZW5Tq","umoPwmkcCmoMWR3cQSoVW43cNW","Fa8nwSkQx8kmhmkxW4XxWO0m","WRfVWO0tWRVdML4xyW","W4LKWRGgBSoFF8kqchJdLG","WOfiWRxcVConW6nnpWFdUX4","WRhdGCoWbSkYWOygWPa","fmoblGlcOgPafSoj","WRvSWOzIW53cRc0GAhldRdhdIa","WROClxK2gSkeWQbWW7yxWP00","W4BcSmopWRldGGKsW7BdP2fuusHQ","WRaPBmkdnseMmmoaWRHpWPddKZe","zJpcVSk+EGJcJmkrW4OAkCoRWQ8"];return(xn=function(){return t})()}function Fn(t,e){var n=xn();return(Fn=function(e,r){var i=n[e-=124];if(void 0===Fn.loMYDG){var a=function(t){for(var e,n,r="",i="",a=0,o=0;n=t.charAt(o++);~n&&(e=a%4?64*e+n:n,a++%4)?r+=String.fromCharCode(255&e>>(-2*a&6)):0)n="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(n);for(var u=0,s=r.length;u<s;u++)i+="%"+("00"+r.charCodeAt(u).toString(16)).slice(-2);return decodeURIComponent(i)},o=function(t,e){var n,r,i=[],o=0,u="";for(t=a(t),r=0;r<256;r++)i[r]=r;for(r=0;r<256;r++)o=(o+i[r]+e.charCodeAt(r%e.length))%256,n=i[r],i[r]=i[o],i[o]=n;r=0,o=0;for(var s=0;s<t.length;s++)o=(o+i[r=(r+1)%256])%256,n=i[r],i[r]=i[o],i[o]=n,u+=String.fromCharCode(t.charCodeAt(s)^i[(i[r]+i[o])%256]);return u};Fn.shftjQ=o,t=arguments,Fn.loMYDG=!0}var u=n[0],s=e+u,c=t[s];return c?i=c:(void 0===Fn.HNsKNv&&(Fn.HNsKNv=!0),i=Fn.shftjQ(i,r),t[s]=i),i})(t,e)}h=!0,Dn(),function(t,e){for(var n=Fn,r=t();;)try{if(895141==parseInt(n(138,"RXbV"))/1+parseInt(n(143,"Q5Ih"))/2*(-parseInt(n(128,"&DDy"))/3)+parseInt(n(139,"Bw*8"))/4+-parseInt(n(137,"t(xl"))/5+-parseInt(n(142,"xgu7"))/6*(parseInt(n(126,"LPEP"))/7)+parseInt(n(135,"y2tJ"))/8+parseInt(n(134,"@j@Q"))/9)break;r.push(r.shift())}catch(t){r.push(r.shift())}}(xn);var ighnua,En=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup})(this,(function(){var t=function(){return!t.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(En)};return t()}));return En(),t.ready});t.exports=i}]);
1
+ !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){"use strict";var n=r(1);let o;const i="/tessdata",a={};function s(e){const t=Math.random().toString(36);return a[t]=e,t}function u(e){if(!a.hasOwnProperty(e))throw new Error(`Object ${e} does not exist`);return a[e]}function c(e){const t=u(e);t.delete&&t.delete(),delete a[e]}function f(e,t){for(let r in t){if(e===t[r])return r}}const l={initialize:async function(e,t,i,a){const s=r(3),u={locateFile:function(e,r){let o;return o=t?function(e){return e.startsWith("http:")||e.startsWith("https:")}(t)?t:"":a+n.Constants.DEFAULT_WASM_FOLDER,o+e}};return await s(u),o=u,o.initialize(e||"",i)},getLicenseInfo:function(){return o.getLicenseInfo()},applyFilter:function(e,t){return h(o.applyFilter(e,t),p)},rotateImageCcw:function(e,t){return h(o.rotateImageCcw(e,t),p)},cropAndRotateImageCcw:function(e,t,r){const n=function(e){const t=[];for(let r=0;r<e.length;++r)t.push(e[r].x,e[r].y);return t}(t);return h(o.cropAndRotateImageCcw(e,n,r),p)},detectDocument:async function(e,t,r){const n=g(e);return await d(o.detectDocumentOnRawImage(n.buffer,n.width,n.height,t,r))},detectDocumentOnImage:async function(e,t,r){return await d(o.detectDocumentOnImage(e,t,r))},detectAndCropDocument:async function(e){const t=g(e);return await d(o.detectAndCropDocument(t.buffer,t.width,t.height))},recognizeBarcodes:async function(e,t){const r=g(e);let n;if(n="LEGACY"===t.engineMode?o.recognizeBarcodes(r.buffer,r.width,r.height,t):o.recognizeBarcodesNextGen(r.buffer,r.width,r.height,t),!n)return null;if(!n.length)return[];const i=n.map((e=>({format:f(e.format,o.BarcodeFormat),text:e.text,rawBytes:e.rawBytes.data.slice()})));return n.forEach((e=>e.delete())),i},beginPdf:async function(e){return s(new o.PdfGenerationContext(e||{}))},addPageToPdf:async function(e,t){h(u(e).addPage(t))},completePdf:async function(e){const t=h(u(e).complete(),p);return c(e),t},beginTiff:async function(e){const t=new o.TiffGenerationContext(e);return h(t.begin()),s(t)},addPageToTiff:async function(e,t){h(u(e).addPage(t))},completeTiff:async function(e){try{const t=u(e).complete();return h(t,p)}finally{c(e)}},createSimpleMRZRecognizer:async function(){return s(new o.SimpleMrzRecognizerContext)},recognizeSimpleMRZ:async function(e,t){const r=u(e),n=g(t);return r.recognize(n.buffer,n.width,n.height)},releaseObject:async function(e){c(e)},createOcrEngine:async function(e){if(!(e instanceof Array))throw new Error('languages must be an array of valid language codes, e.g. ["eng", "deu"]');o.FS.analyzePath(i).exists||o.FS.mkdir(i),e.forEach((function(e){if(!o.FS.analyzePath("/tessdata/"+e+".traineddata").exists){let t=o.locateFile(`tessdata/${e}.traineddata`);o.FS.createLazyFile(i,e+".traineddata",t,!0,!1)}}));return s(new o.TesseractOcrContext(i,e.join("+")))},performOcr:async function(e,t){const r=u(e),n=g(t);return r.performOcr(n.buffer,n.width,n.height)}};async function d(e){if(!e)return{success:!1,detectionStatus:"Error_License"};const t=(r=e.detectionResult,_[r]?_[r]:r>=200?"Error_Unknown":"OK");var r;const n={detectionStatus:t,success:m(t)};return n.original=p(e.originalImageJpegData),n.success&&(n.cropped=p(e.croppedImageJpegData),n.polygon=function(e){if(e.length%2!=0)throw Error("pointCoords size is not even.");const t=[];for(let r=0;r<e.length;r+=2)t.push({x:e[r],y:e[r+1]});return t}(e.polygon.data),n.horizontalLines=v(e.horizontalLines.data),n.verticalLines=v(e.verticalLines.data)),e.delete(),n}function p(e){return e&&e.data&&e.data.slice()}function h(e,t){try{if(e.errorMessage){throw new Error(e.errorMessage)}return(t||(e=>e))(e.result)}finally{e.delete()}}function m(e){return"OK"===e.substr(0,2)}function v(e){const t=[];if(!e)return t;if(e.length%4!=0)throw Error("lineCoords size invalid.");for(let r=0;r<e.length;r+=4)t.push({p1:{x:e[r],y:e[r+1]},p2:{x:e[r+2],y:e[r+3]}});return t}function g(e){const{width:t,height:r,data:n}=e,i=o._malloc(4*t*r);return o.HEAPU8.set(n,i),{buffer:i,width:t,height:r}}const _={0:"NotAcquired",100:"OK",101:"OK_SmallSize",102:"OK_BadAngles",103:"OK_BadAspectRatio",104:"OK_OffCenter",200:"Error_NothingDetected",201:"Error_Brightness",202:"Error_Noise"};onmessage=function(e){const{command:t,args:r,ticket:n}=e.data;if(!o&&"initialize"!==t)throw Error("WASM module not loaded yet.");(async()=>await l[t].apply(null,r))().then((e=>self.postMessage({ticket:n,result:e}))).catch((e=>{const t="number"==typeof e?o.stringFromException(e):e;console.error(t),self.postMessage({ticket:n,error:t.toString()})}))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Constants=void 0;const o=n(r(2));var i="undefined"!=typeof SCANBOT_WEBSDK_VERSION?SCANBOT_WEBSDK_VERSION:o.default;class a{}t.Constants=a,a.VERSION=i,a.CDN_PATH=i&&`https://cdn.jsdelivr.net/npm/scanbot-web-sdk@${i}/bundle/`,a.DEFAULT_WASM_FOLDER="bin/complete/"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=""},function(e,t,r){"use strict";var n,o=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var t,r,o=void 0!==(e=e||{})?e:{};o.ready=new Promise((function(e,n){t=e,r=n}));var i,a={};for(i in o)o.hasOwnProperty(i)&&(a[i]=o[i]);var s,u,c=[],f="./this.program",l=function(e,t){throw t},d="";d=self.location.href,n&&(d=n),d=0!==d.indexOf("blob:")?d.substr(0,d.lastIndexOf("/")+1):"",s=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},u=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)};var p=o.print||console.log.bind(console),h=o.printErr||console.warn.bind(console);for(i in a)a.hasOwnProperty(i)&&(o[i]=a[i]);a=null,o.arguments&&(c=o.arguments),o.thisProgram&&(f=o.thisProgram),o.quit&&(l=o.quit);var m,v,g,_,y=0,w=function(e){y=e};o.wasmBinary&&(m=o.wasmBinary),o.noExitRuntime&&(v=o.noExitRuntime),"object"!=typeof WebAssembly&&oe("no native wasm support detected");var k=!1;function E(e,t){e||oe("Assertion failed: "+t)}var b="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function j(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.subarray&&b)return b.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)i+=String.fromCharCode(a);else{var c=a-65536;i+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function C(e,t){return e?j(x,e,t):""}function S(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function T(e,t,r){return S(e,x,t,r)}function D(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&e.charCodeAt(++r)),n<=127?++t:t+=n<=2047?2:n<=65535?3:4}return t}var P,F,x,A,O,M,W,$,R,z="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function N(e,t){for(var r=e,n=r>>1,o=n+t/2;!(n>=o)&&O[n];)++n;if((r=n<<1)-e>32&&z)return z.decode(x.subarray(e,r));for(var i=0,a="";;){var s=A[e+2*i>>1];if(0==s||i==t/2)return a;++i,a+=String.fromCharCode(s)}}function I(e,t,r){if(void 0===r&&(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 a=e.charCodeAt(i);A[t>>1]=a,t+=2}return A[t>>1]=0,t-n}function B(e){return 2*e.length}function L(e,t){for(var r=0,n="";!(r>=t/4);){var o=M[e+4*r>>2];if(0==o)break;if(++r,o>=65536){var i=o-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(o)}return n}function U(e,t,r){if(void 0===r&&(r=2147483647),r<4)return 0;for(var n=t,o=n+r-4,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),M[t>>2]=a,(t+=4)+4>o)break}return M[t>>2]=0,t-n}function G(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n>=55296&&n<=57343&&++r,t+=4}return t}function H(e){var t=D(e)+1,r=Yr(t);return r&&S(e,F,r,t),r}function q(e,t){F.set(e,t)}function V(e){P=e,o.HEAP8=F=new Int8Array(e),o.HEAP16=A=new Int16Array(e),o.HEAP32=M=new Int32Array(e),o.HEAPU8=x=new Uint8Array(e),o.HEAPU16=O=new Uint16Array(e),o.HEAPU32=W=new Uint32Array(e),o.HEAPF32=$=new Float32Array(e),o.HEAPF64=R=new Float64Array(e)}var Y=o.INITIAL_MEMORY||16777216;(g=o.wasmMemory?o.wasmMemory:new WebAssembly.Memory({initial:Y/65536,maximum:32768}))&&(P=g.buffer),Y=P.byteLength,V(P);var K=[],Z=[],X=[],Q=[],J=0,ee=null,te=null;function re(e){J++,o.monitorRunDependencies&&o.monitorRunDependencies(J)}function ne(e){if(J--,o.monitorRunDependencies&&o.monitorRunDependencies(J),0==J&&(null!==ee&&(clearInterval(ee),ee=null),te)){var t=te;te=null,t()}}function oe(e){o.onAbort&&o.onAbort(e),h(e+=""),k=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.";var t=new WebAssembly.RuntimeError(e);throw r(t),t}function ie(e){return t=e,r="data:application/octet-stream;base64,",String.prototype.startsWith?t.startsWith(r):0===t.indexOf(r);var t,r}o.preloadedImages={},o.preloadedAudios={};var ae,se,ue,ce="ScanbotSDK.Asm.wasm";function fe(){try{if(m)return new Uint8Array(m);if(u)return u(ce);throw"both async and sync fetching of the wasm failed"}catch(e){oe(e)}}ie(ce)||(ae=ce,ce=o.locateFile?o.locateFile(ae,d):d+ae);var le,de={50044:function(e){return H(function(){return this[C(e)].toString()}.apply((0,eval)("(()=>this)()")))}};function pe(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var r=t.func;"number"==typeof r?void 0===t.arg?_.get(r)():_.get(r)(t.arg):r(void 0===t.arg?null:t.arg)}else t(o)}}function he(e,t,r){return-1!=e.indexOf("j")?function(e,t,r){return r&&r.length?o["dynCall_"+e].apply(null,[t].concat(r)):o["dynCall_"+e].call(null,t)}(e,t,r):_.get(t).apply(null,r)}function me(){var e=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}();return o.extraStackTrace&&(e+="\n"+o.extraStackTrace()),e.replace(/\b_Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))}function ve(e){return M[Xr()>>2]=e,e}function ge(e,t){var r;if(0===e)r=Date.now();else{if(1!==e&&4!==e)return ve(28),-1;r=le()}return M[t>>2]=r/1e3|0,M[t+4>>2]=r%1e3*1e3*1e3|0,0}le=function(){return performance.now()};var _e=0,ye=4,we=8,ke=12,Ee=13,be=16;function je(e,t){}function Ce(e){this.excPtr=e,this.ptr=e-be,this.set_type=function(e){M[this.ptr+we>>2]=e},this.get_type=function(){return M[this.ptr+we>>2]},this.set_destructor=function(e){M[this.ptr+_e>>2]=e},this.get_destructor=function(){return M[this.ptr+_e>>2]},this.set_refcount=function(e){M[this.ptr+ye>>2]=e},this.set_caught=function(e){e=e?1:0,F[this.ptr+ke>>0]=e},this.get_caught=function(){return 0!=F[this.ptr+ke>>0]},this.set_rethrown=function(e){e=e?1:0,F[this.ptr+Ee>>0]=e},this.get_rethrown=function(){return 0!=F[this.ptr+Ee>>0]},this.init=function(e,t){this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=M[this.ptr+ye>>2];M[this.ptr+ye>>2]=e+1},this.release_ref=function(){var e=M[this.ptr+ye>>2];return M[this.ptr+ye>>2]=e-1,1===e}}function Se(e){this.free=function(){Zr(this.ptr),this.ptr=0},this.set_base_ptr=function(e){M[this.ptr>>2]=e},this.get_base_ptr=function(){return M[this.ptr>>2]},this.set_adjusted_ptr=function(e){M[this.ptr+4>>2]=e},this.get_adjusted_ptr=function(){return M[this.ptr+4>>2]},this.get_exception_ptr=function(){if(dn(this.get_exception_info().get_type()))return M[this.get_base_ptr()>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.get_base_ptr()},this.get_exception_info=function(){return new Ce(this.get_base_ptr())},void 0===e?(this.ptr=Yr(8),this.set_adjusted_ptr(0)):this.ptr=e}var Te=[];function De(e){e.add_ref()}function Pe(e){return Zr(new Ce(e).ptr)}function Fe(e){if(e.release_ref()&&!e.get_rethrown()){var t=e.get_destructor();t&&_.get(t)(e.excPtr),Pe(e.excPtr)}}var xe=0;function Ae(){var e=Te.pop(),t=e.get_exception_info(),r=e.get_base_ptr();throw t.get_rethrown()?e.free():(Te.push(e),t.set_rethrown(!0)),xe=r,r}function Oe(){if(!Oe.called){Oe.called=!0,M[on()>>2]=60*(new Date).getTimezoneOffset();var e=(new Date).getFullYear(),t=new Date(e,0,1),r=new Date(e,6,1);M[nn()>>2]=Number(t.getTimezoneOffset()!=r.getTimezoneOffset());var n=s(t),o=s(r),i=H(n),a=H(o);r.getTimezoneOffset()<t.getTimezoneOffset()?(M[rn()>>2]=i,M[rn()+4>>2]=a):(M[rn()>>2]=a,M[rn()+4>>2]=i)}function s(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}}var Me={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),r="/"===e.substr(-1);return(e=Me.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=Me.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:function(e){if("/"===e)return"/";var t=(e=(e=Me.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return Me.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return Me.normalize(e.join("/"))},join2:function(e,t){return Me.normalize(e+"/"+t)}},We={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:Ne.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t="/"===n.charAt(0)}return(t?"/":"")+(e=Me.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=We.resolve(e).substr(1),t=We.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}},$e={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){$e.ttys[e]={input:[],output:[],ops:t},Ne.registerDevice(e,$e.stream_ops)},stream_ops:{open:function(e){var t=$e.ttys[e.node.rdev];if(!t)throw new Ne.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.flush(e.tty)},flush:function(e){e.tty.ops.flush(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Ne.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new Ne.ErrnoError(29)}if(void 0===s&&0===i)throw new Ne.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new Ne.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new Ne.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=Gr(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(p(j(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(p(j(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(h(j(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(h(j(e.output,0)),e.output=[])}}};function Re(e){for(var t=function(e,t){return t||(t=16),Math.ceil(e/t)*t}(e,16384),r=Yr(t);e<t;)F[r+e++]=0;return r}var ze={ops_table:null,mount:function(e){return ze.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(Ne.isBlkdev(r)||Ne.isFIFO(r))throw new Ne.ErrnoError(63);ze.ops_table||(ze.ops_table={dir:{node:{getattr:ze.node_ops.getattr,setattr:ze.node_ops.setattr,lookup:ze.node_ops.lookup,mknod:ze.node_ops.mknod,rename:ze.node_ops.rename,unlink:ze.node_ops.unlink,rmdir:ze.node_ops.rmdir,readdir:ze.node_ops.readdir,symlink:ze.node_ops.symlink},stream:{llseek:ze.stream_ops.llseek}},file:{node:{getattr:ze.node_ops.getattr,setattr:ze.node_ops.setattr},stream:{llseek:ze.stream_ops.llseek,read:ze.stream_ops.read,write:ze.stream_ops.write,allocate:ze.stream_ops.allocate,mmap:ze.stream_ops.mmap,msync:ze.stream_ops.msync}},link:{node:{getattr:ze.node_ops.getattr,setattr:ze.node_ops.setattr,readlink:ze.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ze.node_ops.getattr,setattr:ze.node_ops.setattr},stream:Ne.chrdev_stream_ops}});var o=Ne.createNode(e,t,r,n);return Ne.isDir(o.mode)?(o.node_ops=ze.ops_table.dir.node,o.stream_ops=ze.ops_table.dir.stream,o.contents={}):Ne.isFile(o.mode)?(o.node_ops=ze.ops_table.file.node,o.stream_ops=ze.ops_table.file.stream,o.usedBytes=0,o.contents=null):Ne.isLink(o.mode)?(o.node_ops=ze.ops_table.link.node,o.stream_ops=ze.ops_table.link.stream):Ne.isChrdev(o.mode)&&(o.node_ops=ze.ops_table.chrdev.node,o.stream_ops=ze.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o),o},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],r=0;r<e.usedBytes;++r)t.push(e.contents[r]);return t}return e.contents},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var r=e.contents;return e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t)}if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length<t;)e.contents.push(0);e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=Ne.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,Ne.isDir(e.mode)?t.size=4096:Ne.isFile(e.mode)?t.size=e.usedBytes:Ne.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&ze.resizeFileStorage(e,t.size)},lookup:function(e,t){throw Ne.genericErrors[44]},mknod:function(e,t,r,n){return ze.createNode(e,t,r,n)},rename:function(e,t,r){if(Ne.isDir(e.mode)){var n;try{n=Ne.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new Ne.ErrnoError(55)}delete e.parent.contents[e.name],e.name=r,t.contents[r]=e,e.parent=t},unlink:function(e,t){delete e.contents[t]},rmdir:function(e,t){var r=Ne.lookupNode(e,t);for(var n in r.contents)throw new Ne.ErrnoError(55);delete e.contents[t]},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=ze.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!Ne.isLink(e.mode))throw new Ne.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write:function(e,t,r,n,o,i){if(t.buffer===F.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(ze.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&Ne.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Ne.ErrnoError(28);return n},allocate:function(e,t,r){ze.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o,i){if(E(0===t),!Ne.isFile(e.node.mode))throw new Ne.ErrnoError(43);var a,s,u=e.node.contents;if(2&i||u.buffer!==P){if((n>0||n+r<u.length)&&(u=u.subarray?u.subarray(n,n+r):Array.prototype.slice.call(u,n,n+r)),s=!0,!(a=Re(r)))throw new Ne.ErrnoError(48);F.set(u,a)}else s=!1,a=u.byteOffset;return{ptr:a,allocated:s}},msync:function(e,t,r,n,o){if(!Ne.isFile(e.node.mode))throw new Ne.ErrnoError(43);return 2&o||ze.stream_ops.write(e,t,0,n,r,!1),0}}},Ne={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(e){if(!(e instanceof Ne.ErrnoError))throw e+" : "+me();return ve(e.errno)},lookupPath:function(e,t){if(t=t||{},!(e=We.resolve(Ne.cwd(),e)))return{path:"",node:null};var r={follow_mount:!0,recurse_count:0};for(var n in r)void 0===t[n]&&(t[n]=r[n]);if(t.recurse_count>8)throw new Ne.ErrnoError(32);for(var o=Me.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),i=Ne.root,a="/",s=0;s<o.length;s++){var u=s===o.length-1;if(u&&t.parent)break;if(i=Ne.lookupNode(i,o[s]),a=Me.join2(a,o[s]),Ne.isMountpoint(i)&&(!u||u&&t.follow_mount)&&(i=i.mounted.root),!u||t.follow)for(var c=0;Ne.isLink(i.mode);){var f=Ne.readlink(a);if(a=We.resolve(Me.dirname(a),f),i=Ne.lookupPath(a,{recurse_count:t.recurse_count}).node,c++>40)throw new Ne.ErrnoError(32)}}return{path:a,node:i}},getPath:function(e){for(var t;;){if(Ne.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%Ne.nameTable.length},hashAddNode:function(e){var t=Ne.hashName(e.parent.id,e.name);e.name_next=Ne.nameTable[t],Ne.nameTable[t]=e},hashRemoveNode:function(e){var t=Ne.hashName(e.parent.id,e.name);if(Ne.nameTable[t]===e)Ne.nameTable[t]=e.name_next;else for(var r=Ne.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:function(e,t){var r=Ne.mayLookup(e);if(r)throw new Ne.ErrnoError(r,e);for(var n=Ne.hashName(e.id,t),o=Ne.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return Ne.lookup(e,t)},createNode:function(e,t,r,n){var o=new Ne.FSNode(e,t,r,n);return Ne.hashAddNode(o),o},destroyNode:function(e){Ne.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var t=Ne.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return Ne.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=Ne.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return Ne.lookupNode(e,t),20}catch(e){}return Ne.nodePermissions(e,"wx")},mayDelete:function(e,t,r){var n;try{n=Ne.lookupNode(e,t)}catch(e){return e.errno}var o=Ne.nodePermissions(e,"wx");if(o)return o;if(r){if(!Ne.isDir(n.mode))return 54;if(Ne.isRoot(n)||Ne.getPath(n)===Ne.cwd())return 10}else if(Ne.isDir(n.mode))return 31;return 0},mayOpen:function(e,t){return e?Ne.isLink(e.mode)?32:Ne.isDir(e.mode)&&("r"!==Ne.flagsToPermissionString(t)||512&t)?31:Ne.nodePermissions(e,Ne.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||Ne.MAX_OPEN_FDS;for(var r=e;r<=t;r++)if(!Ne.streams[r])return r;throw new Ne.ErrnoError(33)},getStream:function(e){return Ne.streams[e]},createStream:function(e,t,r){Ne.FSStream||(Ne.FSStream=function(){},Ne.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var n=new Ne.FSStream;for(var o in e)n[o]=e[o];e=n;var i=Ne.nextfd(t,r);return e.fd=i,Ne.streams[i]=e,e},closeStream:function(e){Ne.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=Ne.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new Ne.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){Ne.devices[e]={stream_ops:t}},getDevice:function(e){return Ne.devices[e]},getMounts:function(e){for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),Ne.syncFSRequests++,Ne.syncFSRequests>1&&h("warning: "+Ne.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=Ne.getMounts(Ne.root.mount),n=0;function o(e){return Ne.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((function(t){if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:function(e,t,r){var n,o="/"===r,i=!r;if(o&&Ne.root)throw new Ne.ErrnoError(10);if(!o&&!i){var a=Ne.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,Ne.isMountpoint(n))throw new Ne.ErrnoError(10);if(!Ne.isDir(n.mode))throw new Ne.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?Ne.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:function(e){var t=Ne.lookupPath(e,{follow_mount:!1});if(!Ne.isMountpoint(t.node))throw new Ne.ErrnoError(28);var r=t.node,n=r.mounted,o=Ne.getMounts(n);Object.keys(Ne.nameTable).forEach((function(e){for(var t=Ne.nameTable[e];t;){var r=t.name_next;-1!==o.indexOf(t.mount)&&Ne.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,r){var n=Ne.lookupPath(e,{parent:!0}).node,o=Me.basename(e);if(!o||"."===o||".."===o)throw new Ne.ErrnoError(28);var i=Ne.mayCreate(n,o);if(i)throw new Ne.ErrnoError(i);if(!n.node_ops.mknod)throw new Ne.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,Ne.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,Ne.mknod(e,t,0)},mkdirTree:function(e,t){for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{Ne.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:function(e,t,r){return void 0===r&&(r=t,t=438),t|=8192,Ne.mknod(e,t,r)},symlink:function(e,t){if(!We.resolve(e))throw new Ne.ErrnoError(44);var r=Ne.lookupPath(t,{parent:!0}).node;if(!r)throw new Ne.ErrnoError(44);var n=Me.basename(t),o=Ne.mayCreate(r,n);if(o)throw new Ne.ErrnoError(o);if(!r.node_ops.symlink)throw new Ne.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:function(e,t){var r,n,o=Me.dirname(e),i=Me.dirname(t),a=Me.basename(e),s=Me.basename(t);if(r=Ne.lookupPath(e,{parent:!0}).node,n=Ne.lookupPath(t,{parent:!0}).node,!r||!n)throw new Ne.ErrnoError(44);if(r.mount!==n.mount)throw new Ne.ErrnoError(75);var u,c=Ne.lookupNode(r,a),f=We.relative(e,i);if("."!==f.charAt(0))throw new Ne.ErrnoError(28);if("."!==(f=We.relative(t,o)).charAt(0))throw new Ne.ErrnoError(55);try{u=Ne.lookupNode(n,s)}catch(e){}if(c!==u){var l=Ne.isDir(c.mode),d=Ne.mayDelete(r,a,l);if(d)throw new Ne.ErrnoError(d);if(d=u?Ne.mayDelete(n,s,l):Ne.mayCreate(n,s))throw new Ne.ErrnoError(d);if(!r.node_ops.rename)throw new Ne.ErrnoError(63);if(Ne.isMountpoint(c)||u&&Ne.isMountpoint(u))throw new Ne.ErrnoError(10);if(n!==r&&(d=Ne.nodePermissions(r,"w")))throw new Ne.ErrnoError(d);try{Ne.trackingDelegate.willMovePath&&Ne.trackingDelegate.willMovePath(e,t)}catch(r){h("FS.trackingDelegate['willMovePath']('"+e+"', '"+t+"') threw an exception: "+r.message)}Ne.hashRemoveNode(c);try{r.node_ops.rename(c,n,s)}catch(e){throw e}finally{Ne.hashAddNode(c)}try{Ne.trackingDelegate.onMovePath&&Ne.trackingDelegate.onMovePath(e,t)}catch(r){h("FS.trackingDelegate['onMovePath']('"+e+"', '"+t+"') threw an exception: "+r.message)}}},rmdir:function(e){var t=Ne.lookupPath(e,{parent:!0}).node,r=Me.basename(e),n=Ne.lookupNode(t,r),o=Ne.mayDelete(t,r,!0);if(o)throw new Ne.ErrnoError(o);if(!t.node_ops.rmdir)throw new Ne.ErrnoError(63);if(Ne.isMountpoint(n))throw new Ne.ErrnoError(10);try{Ne.trackingDelegate.willDeletePath&&Ne.trackingDelegate.willDeletePath(e)}catch(t){h("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}t.node_ops.rmdir(t,r),Ne.destroyNode(n);try{Ne.trackingDelegate.onDeletePath&&Ne.trackingDelegate.onDeletePath(e)}catch(t){h("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}},readdir:function(e){var t=Ne.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new Ne.ErrnoError(54);return t.node_ops.readdir(t)},unlink:function(e){var t=Ne.lookupPath(e,{parent:!0}).node,r=Me.basename(e),n=Ne.lookupNode(t,r),o=Ne.mayDelete(t,r,!1);if(o)throw new Ne.ErrnoError(o);if(!t.node_ops.unlink)throw new Ne.ErrnoError(63);if(Ne.isMountpoint(n))throw new Ne.ErrnoError(10);try{Ne.trackingDelegate.willDeletePath&&Ne.trackingDelegate.willDeletePath(e)}catch(t){h("FS.trackingDelegate['willDeletePath']('"+e+"') threw an exception: "+t.message)}t.node_ops.unlink(t,r),Ne.destroyNode(n);try{Ne.trackingDelegate.onDeletePath&&Ne.trackingDelegate.onDeletePath(e)}catch(t){h("FS.trackingDelegate['onDeletePath']('"+e+"') threw an exception: "+t.message)}},readlink:function(e){var t=Ne.lookupPath(e).node;if(!t)throw new Ne.ErrnoError(44);if(!t.node_ops.readlink)throw new Ne.ErrnoError(28);return We.resolve(Ne.getPath(t.parent),t.node_ops.readlink(t))},stat:function(e,t){var r=Ne.lookupPath(e,{follow:!t}).node;if(!r)throw new Ne.ErrnoError(44);if(!r.node_ops.getattr)throw new Ne.ErrnoError(63);return r.node_ops.getattr(r)},lstat:function(e){return Ne.stat(e,!0)},chmod:function(e,t,r){var n;if(!(n="string"==typeof e?Ne.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new Ne.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:function(e,t){Ne.chmod(e,t,!0)},fchmod:function(e,t){var r=Ne.getStream(e);if(!r)throw new Ne.ErrnoError(8);Ne.chmod(r.node,t)},chown:function(e,t,r,n){var o;if(!(o="string"==typeof e?Ne.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Ne.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:function(e,t,r){Ne.chown(e,t,r,!0)},fchown:function(e,t,r){var n=Ne.getStream(e);if(!n)throw new Ne.ErrnoError(8);Ne.chown(n.node,t,r)},truncate:function(e,t){if(t<0)throw new Ne.ErrnoError(28);var r;if(!(r="string"==typeof e?Ne.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Ne.ErrnoError(63);if(Ne.isDir(r.mode))throw new Ne.ErrnoError(31);if(!Ne.isFile(r.mode))throw new Ne.ErrnoError(28);var n=Ne.nodePermissions(r,"w");if(n)throw new Ne.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:function(e,t){var r=Ne.getStream(e);if(!r)throw new Ne.ErrnoError(8);if(0==(2097155&r.flags))throw new Ne.ErrnoError(28);Ne.truncate(r.node,t)},utime:function(e,t,r){var n=Ne.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:function(e,t,r,n,i){if(""===e)throw new Ne.ErrnoError(44);var a;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?Ne.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)a=e;else{e=Me.normalize(e);try{a=Ne.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var s=!1;if(64&t)if(a){if(128&t)throw new Ne.ErrnoError(20)}else a=Ne.mknod(e,r,0),s=!0;if(!a)throw new Ne.ErrnoError(44);if(Ne.isChrdev(a.mode)&&(t&=-513),65536&t&&!Ne.isDir(a.mode))throw new Ne.ErrnoError(54);if(!s){var u=Ne.mayOpen(a,t);if(u)throw new Ne.ErrnoError(u)}512&t&&Ne.truncate(a,0),t&=-131713;var c=Ne.createStream({node:a,path:Ne.getPath(a),flags:t,seekable:!0,position:0,stream_ops:a.stream_ops,ungotten:[],error:!1},n,i);c.stream_ops.open&&c.stream_ops.open(c),!o.logReadFiles||1&t||(Ne.readFiles||(Ne.readFiles={}),e in Ne.readFiles||(Ne.readFiles[e]=1,h("FS.trackingDelegate error on read file: "+e)));try{if(Ne.trackingDelegate.onOpenFile){var f=0;1!=(2097155&t)&&(f|=Ne.tracking.openFlags.READ),0!=(2097155&t)&&(f|=Ne.tracking.openFlags.WRITE),Ne.trackingDelegate.onOpenFile(e,f)}}catch(t){h("FS.trackingDelegate['onOpenFile']('"+e+"', flags) threw an exception: "+t.message)}return c},close:function(e){if(Ne.isClosed(e))throw new Ne.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{Ne.closeStream(e.fd)}e.fd=null},isClosed:function(e){return null===e.fd},llseek:function(e,t,r){if(Ne.isClosed(e))throw new Ne.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Ne.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new Ne.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:function(e,t,r,n,o){if(n<0||o<0)throw new Ne.ErrnoError(28);if(Ne.isClosed(e))throw new Ne.ErrnoError(8);if(1==(2097155&e.flags))throw new Ne.ErrnoError(8);if(Ne.isDir(e.node.mode))throw new Ne.ErrnoError(31);if(!e.stream_ops.read)throw new Ne.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new Ne.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:function(e,t,r,n,o,i){if(n<0||o<0)throw new Ne.ErrnoError(28);if(Ne.isClosed(e))throw new Ne.ErrnoError(8);if(0==(2097155&e.flags))throw new Ne.ErrnoError(8);if(Ne.isDir(e.node.mode))throw new Ne.ErrnoError(31);if(!e.stream_ops.write)throw new Ne.ErrnoError(28);e.seekable&&1024&e.flags&&Ne.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new Ne.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);a||(e.position+=s);try{e.path&&Ne.trackingDelegate.onWriteToFile&&Ne.trackingDelegate.onWriteToFile(e.path)}catch(t){h("FS.trackingDelegate['onWriteToFile']('"+e.path+"') threw an exception: "+t.message)}return s},allocate:function(e,t,r){if(Ne.isClosed(e))throw new Ne.ErrnoError(8);if(t<0||r<=0)throw new Ne.ErrnoError(28);if(0==(2097155&e.flags))throw new Ne.ErrnoError(8);if(!Ne.isFile(e.node.mode)&&!Ne.isDir(e.node.mode))throw new Ne.ErrnoError(43);if(!e.stream_ops.allocate)throw new Ne.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:function(e,t,r,n,o,i){if(0!=(2&o)&&0==(2&i)&&2!=(2097155&e.flags))throw new Ne.ErrnoError(2);if(1==(2097155&e.flags))throw new Ne.ErrnoError(2);if(!e.stream_ops.mmap)throw new Ne.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o,i)},msync:function(e,t,r,n,o){return e&&e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0},munmap:function(e){return 0},ioctl:function(e,t,r){if(!e.stream_ops.ioctl)throw new Ne.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:function(e,t){if((t=t||{}).flags=t.flags||"r",t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=Ne.open(e,t.flags),o=Ne.stat(e).size,i=new Uint8Array(o);return Ne.read(n,i,0,o,0),"utf8"===t.encoding?r=j(i,0):"binary"===t.encoding&&(r=i),Ne.close(n),r},writeFile:function(e,t,r){(r=r||{}).flags=r.flags||"w";var n=Ne.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(D(t)+1),i=S(t,o,0,o.length);Ne.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");Ne.write(n,t,0,t.byteLength,void 0,r.canOwn)}Ne.close(n)},cwd:function(){return Ne.currentPath},chdir:function(e){var t=Ne.lookupPath(e,{follow:!0});if(null===t.node)throw new Ne.ErrnoError(44);if(!Ne.isDir(t.node.mode))throw new Ne.ErrnoError(54);var r=Ne.nodePermissions(t.node,"x");if(r)throw new Ne.ErrnoError(r);Ne.currentPath=t.path},createDefaultDirectories:function(){Ne.mkdir("/tmp"),Ne.mkdir("/home"),Ne.mkdir("/home/web_user")},createDefaultDevices:function(){Ne.mkdir("/dev"),Ne.registerDevice(Ne.makedev(1,3),{read:function(){return 0},write:function(e,t,r,n,o){return n}}),Ne.mkdev("/dev/null",Ne.makedev(1,3)),$e.register(Ne.makedev(5,0),$e.default_tty_ops),$e.register(Ne.makedev(6,0),$e.default_tty1_ops),Ne.mkdev("/dev/tty",Ne.makedev(5,0)),Ne.mkdev("/dev/tty1",Ne.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return function(){return crypto.getRandomValues(e),e[0]}}return function(){oe("randomDevice")}}();Ne.createDevice("/dev","random",e),Ne.createDevice("/dev","urandom",e),Ne.mkdir("/dev/shm"),Ne.mkdir("/dev/shm/tmp")},createSpecialDirectories:function(){Ne.mkdir("/proc"),Ne.mkdir("/proc/self"),Ne.mkdir("/proc/self/fd"),Ne.mount({mount:function(){var e=Ne.createNode("/proc/self","fd",16895,73);return e.node_ops={lookup:function(e,t){var r=+t,n=Ne.getStream(r);if(!n)throw new Ne.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function(){return n.path}}};return o.parent=o,o}},e}},{},"/proc/self/fd")},createStandardStreams:function(){o.stdin?Ne.createDevice("/dev","stdin",o.stdin):Ne.symlink("/dev/tty","/dev/stdin"),o.stdout?Ne.createDevice("/dev","stdout",null,o.stdout):Ne.symlink("/dev/tty","/dev/stdout"),o.stderr?Ne.createDevice("/dev","stderr",null,o.stderr):Ne.symlink("/dev/tty1","/dev/stderr"),Ne.open("/dev/stdin","r"),Ne.open("/dev/stdout","w"),Ne.open("/dev/stderr","w")},ensureErrnoError:function(){Ne.ErrnoError||(Ne.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Ne.ErrnoError.prototype=new Error,Ne.ErrnoError.prototype.constructor=Ne.ErrnoError,[44].forEach((function(e){Ne.genericErrors[e]=new Ne.ErrnoError(e),Ne.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:function(){Ne.ensureErrnoError(),Ne.nameTable=new Array(4096),Ne.mount(ze,{},"/"),Ne.createDefaultDirectories(),Ne.createDefaultDevices(),Ne.createSpecialDirectories(),Ne.filesystems={MEMFS:ze}},init:function(e,t,r){Ne.init.initialized=!0,Ne.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=t||o.stdout,o.stderr=r||o.stderr,Ne.createStandardStreams()},quit:function(){Ne.init.initialized=!1;var e=o._fflush;e&&e(0);for(var t=0;t<Ne.streams.length;t++){var r=Ne.streams[t];r&&Ne.close(r)}},getMode:function(e,t){var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:function(e,t){var r=Ne.analyzePath(e,t);return r.exists?r.object:(ve(r.error),null)},analyzePath:function(e,t){try{e=(n=Ne.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=Ne.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=Me.basename(e),n=Ne.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:function(e,t,r,n){e="string"==typeof e?e:Ne.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=Me.join2(e,i);try{Ne.mkdir(a)}catch(e){}e=a}}return a},createFile:function(e,t,r,n,o){var i=Me.join2("string"==typeof e?e:Ne.getPath(e),t),a=Ne.getMode(n,o);return Ne.create(i,a)},createDataFile:function(e,t,r,n,o,i){var a=t?Me.join2("string"==typeof e?e:Ne.getPath(e),t):e,s=Ne.getMode(n,o),u=Ne.create(a,s);if(r){if("string"==typeof r){for(var c=new Array(r.length),f=0,l=r.length;f<l;++f)c[f]=r.charCodeAt(f);r=c}Ne.chmod(u,146|s);var d=Ne.open(u,"w");Ne.write(d,r,0,r.length,0,i),Ne.close(d),Ne.chmod(u,s)}return u},createDevice:function(e,t,r,n){var o=Me.join2("string"==typeof e?e:Ne.getPath(e),t),i=Ne.getMode(!!r,!!n);Ne.createDevice.major||(Ne.createDevice.major=64);var a=Ne.makedev(Ne.createDevice.major++,0);return Ne.registerDevice(a,{open:function(e){e.seekable=!1},close:function(e){n&&n.buffer&&n.buffer.length&&n(10)},read:function(e,t,n,o,i){for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(e){throw new Ne.ErrnoError(29)}if(void 0===u&&0===a)throw new Ne.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write:function(e,t,r,o,i){for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new Ne.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),Ne.mkdev(o,i,a)},forceLoadFile:function(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;var t=!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!s)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=Gr(s(e.url),!0),e.usedBytes=e.contents.length}catch(e){t=!1}return t||ve(29),t},createLazyFile:function(e,t,r,n,o){function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((function(e){var t=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(o.responseType="arraybuffer"),o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Gr(o.responseText||"",!0)}(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,p("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var u=Ne.createFile(e,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var c={};return Object.keys(u.stream_ops).forEach((function(e){var t=u.stream_ops[e];c[e]=function(){if(!Ne.forceLoadFile(u))throw new Ne.ErrnoError(29);return t.apply(null,arguments)}})),c.read=function(e,t,r,n,o){if(!Ne.forceLoadFile(u))throw new Ne.ErrnoError(29);var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)t[r+s]=i[o+s];else for(s=0;s<a;s++)t[r+s]=i.get(o+s);return a},u.stream_ops=c,u},createPreloadedFile:function(e,t,r,n,i,a,s,u,c,f){Browser.init();var l=t?We.resolve(Me.join2(e,t)):e;function d(r){function d(r){f&&f(),u||Ne.createDataFile(e,t,r,n,i,c),a&&a(),ne()}var p=!1;o.preloadPlugins.forEach((function(e){p||e.canHandle(l)&&(e.handle(r,l,d,(function(){s&&s(),ne()})),p=!0)})),p||d(r)}re(),"string"==typeof r?Browser.asyncLoad(r,(function(e){d(e)}),s):d(r)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},DB_NAME:function(){return"EM_FS_"+window.location.pathname},DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:function(e,t,r){t=t||function(){},r=r||function(){};var n=Ne.indexedDB();try{var o=n.open(Ne.DB_NAME(),Ne.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=function(){p("creating db"),o.result.createObjectStore(Ne.DB_STORE_NAME)},o.onsuccess=function(){var n=o.result.transaction([Ne.DB_STORE_NAME],"readwrite"),i=n.objectStore(Ne.DB_STORE_NAME),a=0,s=0,u=e.length;function c(){0==s?t():r()}e.forEach((function(e){var t=i.put(Ne.analyzePath(e).object.contents,e);t.onsuccess=function(){++a+s==u&&c()},t.onerror=function(){s++,a+s==u&&c()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:function(e,t,r){t=t||function(){},r=r||function(){};var n=Ne.indexedDB();try{var o=n.open(Ne.DB_NAME(),Ne.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=function(){var n=o.result;try{var i=n.transaction([Ne.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(Ne.DB_STORE_NAME),s=0,u=0,c=e.length;function f(){0==u?t():r()}e.forEach((function(e){var t=a.get(e);t.onsuccess=function(){Ne.analyzePath(e).exists&&Ne.unlink(e),Ne.createDataFile(Me.dirname(e),Me.basename(e),t.result,!0,!0,!0),++s+u==c&&f()},t.onerror=function(){u++,s+u==c&&f()}})),i.onerror=r},o.onerror=r}},Ie={mappings:{},DEFAULT_POLLMASK:5,umask:511,calculateAt:function(e,t){if("/"!==t[0]){var r;if(-100===e)r=Ne.cwd();else{var n=Ne.getStream(e);if(!n)throw new Ne.ErrnoError(8);r=n.path}t=Me.join2(r,t)}return t},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&Me.normalize(t)!==Me.normalize(Ne.getPath(e.node)))return-54;throw e}return M[r>>2]=n.dev,M[r+4>>2]=0,M[r+8>>2]=n.ino,M[r+12>>2]=n.mode,M[r+16>>2]=n.nlink,M[r+20>>2]=n.uid,M[r+24>>2]=n.gid,M[r+28>>2]=n.rdev,M[r+32>>2]=0,ue=[n.size>>>0,(se=n.size,+Math.abs(se)>=1?se>0?(0|Math.min(+Math.floor(se/4294967296),4294967295))>>>0:~~+Math.ceil((se-+(~~se>>>0))/4294967296)>>>0:0)],M[r+40>>2]=ue[0],M[r+44>>2]=ue[1],M[r+48>>2]=4096,M[r+52>>2]=n.blocks,M[r+56>>2]=n.atime.getTime()/1e3|0,M[r+60>>2]=0,M[r+64>>2]=n.mtime.getTime()/1e3|0,M[r+68>>2]=0,M[r+72>>2]=n.ctime.getTime()/1e3|0,M[r+76>>2]=0,ue=[n.ino>>>0,(se=n.ino,+Math.abs(se)>=1?se>0?(0|Math.min(+Math.floor(se/4294967296),4294967295))>>>0:~~+Math.ceil((se-+(~~se>>>0))/4294967296)>>>0:0)],M[r+80>>2]=ue[0],M[r+84>>2]=ue[1],0},doMsync:function(e,t,r,n,o){var i=x.slice(e,e+r);Ne.msync(t,i,o,r,n)},doMkdir:function(e,t){return"/"===(e=Me.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),Ne.mkdir(e,t,0),0},doMknod:function(e,t,r){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return Ne.mknod(e,t,r),0},doReadlink:function(e,t,r){if(r<=0)return-28;var n=Ne.readlink(e),o=Math.min(r,D(n)),i=F[t+o];return T(n,t,r+1),F[t+o]=i,o},doAccess:function(e,t){if(-8&t)return-28;var r;if(!(r=Ne.lookupPath(e,{follow:!0}).node))return-44;var n="";return 4&t&&(n+="r"),2&t&&(n+="w"),1&t&&(n+="x"),n&&Ne.nodePermissions(r,n)?-2:0},doDup:function(e,t,r){var n=Ne.getStream(r);return n&&Ne.close(n),Ne.open(e,t,0,r,r).fd},doReadv:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=M[t+8*i>>2],s=M[t+(8*i+4)>>2],u=Ne.read(e,F,a,s,n);if(u<0)return-1;if(o+=u,u<s)break}return o},doWritev:function(e,t,r,n){for(var o=0,i=0;i<r;i++){var a=M[t+8*i>>2],s=M[t+(8*i+4)>>2],u=Ne.write(e,F,a,s,n);if(u<0)return-1;o+=u}return o},varargs:void 0,get:function(){return Ie.varargs+=4,M[Ie.varargs-4>>2]},getStr:function(e){return C(e)},getStreamFromFD:function(e){var t=Ne.getStream(e);if(!t)throw new Ne.ErrnoError(8);return t},get64:function(e,t){return e}},Be=6,Le=28,Ue=138,Ge=14,He=23,qe=26,Ve=7,Ye=17,Ke=30,Ze=53,Xe={mount:function(e){return o.websocket=o.websocket&&"object"==typeof o.websocket?o.websocket:{},o.websocket._callbacks={},o.websocket.on=function(e,t){return"function"==typeof t&&(this._callbacks[e]=t),this},o.websocket.emit=function(e,t){"function"==typeof this._callbacks[e]&&this._callbacks[e].call(this,t)},Ne.createNode(null,"/",16895,0)},createSocket:function(e,t,r){t&=-526337,r&&E(1==t==(6==r));var n={family:e,type:t,protocol:r,server:null,error:null,peers:{},pending:[],recv_queue:[],sock_ops:Xe.websocket_sock_ops},o=Xe.nextname(),i=Ne.createNode(Xe.root,o,49152,0);i.sock=n;var a=Ne.createStream({path:o,node:i,flags:Ne.modeStringToFlags("r+"),seekable:!1,stream_ops:Xe.stream_ops});return n.stream=a,n},getSocket:function(e){var t=Ne.getStream(e);return t&&Ne.isSocket(t.node.mode)?t.node.sock:null},stream_ops:{poll:function(e){var t=e.node.sock;return t.sock_ops.poll(t)},ioctl:function(e,t,r){var n=e.node.sock;return n.sock_ops.ioctl(n,t,r)},read:function(e,t,r,n,o){var i=e.node.sock,a=i.sock_ops.recvmsg(i,n);return a?(t.set(a.buffer,r),a.buffer.length):0},write:function(e,t,r,n,o){var i=e.node.sock;return i.sock_ops.sendmsg(i,t,r,n)},close:function(e){var t=e.node.sock;t.sock_ops.close(t)}},nextname:function(){return Xe.nextname.current||(Xe.nextname.current=0),"socket["+Xe.nextname.current+++"]"},websocket_sock_ops:{createPeer:function(e,t,r){var n;if("object"==typeof t&&(n=t,t=null,r=null),n)if(n._socket)t=n._socket.remoteAddress,r=n._socket.remotePort;else{var i=/ws[s]?:\/\/([^:]+):(\d+)/.exec(n.url);if(!i)throw new Error("WebSocket URL must be in the format ws(s)://address:port");t=i[1],r=parseInt(i[2],10)}else try{var a=o.websocket&&"object"==typeof o.websocket,s="ws:#".replace("#","//");if(a&&"string"==typeof o.websocket.url&&(s=o.websocket.url),"ws://"===s||"wss://"===s){var u=t.split("/");s=s+u[0]+":"+r+"/"+u.slice(1).join("/")}var c="binary";a&&"string"==typeof o.websocket.subprotocol&&(c=o.websocket.subprotocol);var f=void 0;"null"!==c&&(f=c=c.replace(/^ +| +$/g,"").split(/ *, */)),a&&null===o.websocket.subprotocol&&(c="null",f=void 0),(n=new WebSocket(s,f)).binaryType="arraybuffer"}catch(e){throw new Ne.ErrnoError(He)}var l={addr:t,port:r,socket:n,dgram_send_queue:[]};return Xe.websocket_sock_ops.addPeer(e,l),Xe.websocket_sock_ops.handlePeerEvents(e,l),2===e.type&&void 0!==e.sport&&l.dgram_send_queue.push(new Uint8Array([255,255,255,255,"p".charCodeAt(0),"o".charCodeAt(0),"r".charCodeAt(0),"t".charCodeAt(0),(65280&e.sport)>>8,255&e.sport])),l},getPeer:function(e,t,r){return e.peers[t+":"+r]},addPeer:function(e,t){e.peers[t.addr+":"+t.port]=t},removePeer:function(e,t){delete e.peers[t.addr+":"+t.port]},handlePeerEvents:function(e,t){var r=!0,n=function(){o.websocket.emit("open",e.stream.fd);try{for(var r=t.dgram_send_queue.shift();r;)t.socket.send(r),r=t.dgram_send_queue.shift()}catch(e){t.socket.close()}};function i(n){if("string"==typeof n)n=(new TextEncoder).encode(n);else{if(E(void 0!==n.byteLength),0==n.byteLength)return;n=new Uint8Array(n)}var i=r;if(r=!1,i&&10===n.length&&255===n[0]&&255===n[1]&&255===n[2]&&255===n[3]&&n[4]==="p".charCodeAt(0)&&n[5]==="o".charCodeAt(0)&&n[6]==="r".charCodeAt(0)&&n[7]==="t".charCodeAt(0)){var a=n[8]<<8|n[9];return Xe.websocket_sock_ops.removePeer(e,t),t.port=a,void Xe.websocket_sock_ops.addPeer(e,t)}e.recv_queue.push({addr:t.addr,port:t.port,data:n}),o.websocket.emit("message",e.stream.fd)}t.socket.onopen=n,t.socket.onclose=function(){o.websocket.emit("close",e.stream.fd)},t.socket.onmessage=function(e){i(e.data)},t.socket.onerror=function(t){e.error=Ge,o.websocket.emit("error",[e.stream.fd,e.error,"ECONNREFUSED: Connection refused"])}},poll:function(e){if(1===e.type&&e.server)return e.pending.length?65:0;var t=0,r=1===e.type?Xe.websocket_sock_ops.getPeer(e,e.daddr,e.dport):null;return(e.recv_queue.length||!r||r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(t|=65),(!r||r&&r.socket.readyState===r.socket.OPEN)&&(t|=4),(r&&r.socket.readyState===r.socket.CLOSING||r&&r.socket.readyState===r.socket.CLOSED)&&(t|=16),t},ioctl:function(e,t,r){switch(t){case 21531:var n=0;return e.recv_queue.length&&(n=e.recv_queue[0].data.length),M[r>>2]=n,0;default:return Le}},close:function(e){if(e.server){try{e.server.close()}catch(e){}e.server=null}for(var t=Object.keys(e.peers),r=0;r<t.length;r++){var n=e.peers[t[r]];try{n.socket.close()}catch(e){}Xe.websocket_sock_ops.removePeer(e,n)}return 0},bind:function(e,t,r){if(void 0!==e.saddr||void 0!==e.sport)throw new Ne.ErrnoError(Le);if(e.saddr=t,e.sport=r,2===e.type){e.server&&(e.server.close(),e.server=null);try{e.sock_ops.listen(e,0)}catch(e){if(!(e instanceof Ne.ErrnoError))throw e;if(e.errno!==Ue)throw e}}},connect:function(e,t,r){if(e.server)throw new Ne.ErrnoError(Ue);if(void 0!==e.daddr&&void 0!==e.dport){var n=Xe.websocket_sock_ops.getPeer(e,e.daddr,e.dport);if(n)throw n.socket.readyState===n.socket.CONNECTING?new Ne.ErrnoError(Ve):new Ne.ErrnoError(Ke)}var o=Xe.websocket_sock_ops.createPeer(e,t,r);throw e.daddr=o.addr,e.dport=o.port,new Ne.ErrnoError(qe)},listen:function(e,t){throw new Ne.ErrnoError(Ue)},accept:function(e){if(!e.server)throw new Ne.ErrnoError(Le);var t=e.pending.shift();return t.stream.flags=e.stream.flags,t},getname:function(e,t){var r,n;if(t){if(void 0===e.daddr||void 0===e.dport)throw new Ne.ErrnoError(Ze);r=e.daddr,n=e.dport}else r=e.saddr||0,n=e.sport||0;return{addr:r,port:n}},sendmsg:function(e,t,r,n,o,i){if(2===e.type){if(void 0!==o&&void 0!==i||(o=e.daddr,i=e.dport),void 0===o||void 0===i)throw new Ne.ErrnoError(Ye)}else o=e.daddr,i=e.dport;var a,s=Xe.websocket_sock_ops.getPeer(e,o,i);if(1===e.type){if(!s||s.socket.readyState===s.socket.CLOSING||s.socket.readyState===s.socket.CLOSED)throw new Ne.ErrnoError(Ze);if(s.socket.readyState===s.socket.CONNECTING)throw new Ne.ErrnoError(Be)}if(ArrayBuffer.isView(t)&&(r+=t.byteOffset,t=t.buffer),a=t.slice(r,r+n),2===e.type&&(!s||s.socket.readyState!==s.socket.OPEN))return s&&s.socket.readyState!==s.socket.CLOSING&&s.socket.readyState!==s.socket.CLOSED||(s=Xe.websocket_sock_ops.createPeer(e,o,i)),s.dgram_send_queue.push(a),n;try{return s.socket.send(a),n}catch(e){throw new Ne.ErrnoError(Le)}},recvmsg:function(e,t){if(1===e.type&&e.server)throw new Ne.ErrnoError(Ze);var r=e.recv_queue.shift();if(!r){if(1===e.type){var n=Xe.websocket_sock_ops.getPeer(e,e.daddr,e.dport);if(n){if(n.socket.readyState===n.socket.CLOSING||n.socket.readyState===n.socket.CLOSED)return null;throw new Ne.ErrnoError(Be)}throw new Ne.ErrnoError(Ze)}throw new Ne.ErrnoError(Be)}var o=r.data.byteLength||r.data.length,i=r.data.byteOffset||0,a=r.data.buffer||r.data,s=Math.min(t,o),u={buffer:new Uint8Array(a,i,s),addr:r.addr,port:r.port};if(1===e.type&&s<o){var c=o-s;r.data=new Uint8Array(a,i+s,c),e.recv_queue.unshift(r)}return u}}};function Qe(e){for(var t=e.split("."),r=0;r<4;r++){var n=Number(t[r]);if(isNaN(n))return null;t[r]=n}return(t[0]|t[1]<<8|t[2]<<16|t[3]<<24)>>>0}function Je(e){return parseInt(e)}function et(e){var t,r,n,o,i=[];if(!/^((?=.*::)(?!.*::.+::)(::)?([\dA-F]{1,4}:(:|\b)|){5}|([\dA-F]{1,4}:){6})((([\dA-F]{1,4}((?!\3)::|:\b|$))|(?!\2\3)){2}|(((2[0-4]|1\d|[1-9])?\d|25[0-5])\.?\b){4})$/i.test(e))return null;if("::"===e)return[0,0,0,0,0,0,0,0];for((e=0===e.indexOf("::")?e.replace("::","Z:"):e.replace("::",":Z:")).indexOf(".")>0?((t=(e=e.replace(new RegExp("[.]","g"),":")).split(":"))[t.length-4]=Je(t[t.length-4])+256*Je(t[t.length-3]),t[t.length-3]=Je(t[t.length-2])+256*Je(t[t.length-1]),t=t.slice(0,t.length-2)):t=e.split(":"),n=0,o=0,r=0;r<t.length;r++)if("string"==typeof t[r])if("Z"===t[r]){for(o=0;o<8-t.length+1;o++)i[r+o]=0;n=o-1}else i[r+n]=en(parseInt(t[r],16));else i[r+n]=t[r];return[i[1]<<16|i[0],i[3]<<16|i[2],i[5]<<16|i[4],i[7]<<16|i[6]]}var tt={address_map:{id:1,addrs:{},names:{}},lookup_name:function(e){var t,r=Qe(e);if(null!==r)return e;if(null!==(r=et(e)))return e;if(tt.address_map.addrs[e])t=tt.address_map.addrs[e];else{var n=tt.address_map.id++;E(n<65535,"exceeded max address mappings of 65535"),t="172.29."+(255&n)+"."+(65280&n),tt.address_map.names[t]=e,tt.address_map.addrs[e]=t}return t},lookup_addr:function(e){return tt.address_map.names[e]?tt.address_map.names[e]:null}};function rt(e){return(255&e)+"."+(e>>8&255)+"."+(e>>16&255)+"."+(e>>24&255)}function nt(e){var t="",r=0,n=0,o=0,i=0,a=0,s=0,u=[65535&e[0],e[0]>>16,65535&e[1],e[1]>>16,65535&e[2],e[2]>>16,65535&e[3],e[3]>>16],c=!0,f="";for(s=0;s<5;s++)if(0!==u[s]){c=!1;break}if(c){if(f=rt(u[6]|u[7]<<16),-1===u[5])return t="::ffff:",t+=f;if(0===u[5])return t="::","0.0.0.0"===f&&(f=""),"0.0.0.1"===f&&(f="1"),t+=f}for(r=0;r<8;r++)0===u[r]&&(r-o>1&&(a=0),o=r,a++),a>n&&(i=r-(n=a)+1);for(r=0;r<8;r++)n>1&&0===u[r]&&r>=i&&r<i+n?r===i&&(t+=":",0===i&&(t+=":")):(t+=Number(tn(65535&u[r])).toString(16),t+=r<7?":":"");return t}function ot(e,t){var r,n=A[e>>1],o=tn(O[e+2>>1]);switch(n){case 2:if(16!==t)return{errno:28};r=rt(r=M[e+4>>2]);break;case 10:if(28!==t)return{errno:28};r=nt(r=[M[e+8>>2],M[e+12>>2],M[e+16>>2],M[e+20>>2]]);break;default:return{errno:5}}return{family:n,addr:r,port:o}}function it(e,t,r,n){switch(t){case 2:r=Qe(r),A[e>>1]=t,M[e+4>>2]=r,A[e+2>>1]=en(n);break;case 10:r=et(r),M[e>>2]=t,M[e+8>>2]=r[0],M[e+12>>2]=r[1],M[e+16>>2]=r[2],M[e+20>>2]=r[3],A[e+2>>1]=en(n),M[e+4>>2]=0,M[e+24>>2]=0;break;default:return{errno:5}}return{}}var at={};function st(e){for(;e.length;){var t=e.pop();e.pop()(t)}}function ut(e){return this.fromWireType(W[e>>2])}var ct={},ft={},lt={};function dt(e){if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return t>=48&&t<=57?"_"+e:e}function pt(e,t){return e=dt(e),new Function("body","return function "+e+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(t)}function ht(e,t){var r=pt(t,(function(e){this.name=t,this.message=e;var r=new Error(e).stack;void 0!==r&&(this.stack=this.toString()+"\n"+r.replace(/^Error(:[^\n]*)?\n/,""))}));return r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},r}var mt=void 0;function vt(e){throw new mt(e)}function gt(e,t,r){function n(t){var n=r(t);n.length!==e.length&&vt("Mismatched type converter count");for(var o=0;o<e.length;++o)jt(e[o],n[o])}e.forEach((function(e){lt[e]=t}));var o=new Array(t.length),i=[],a=0;t.forEach((function(e,t){ft.hasOwnProperty(e)?o[t]=ft[e]:(i.push(e),ct.hasOwnProperty(e)||(ct[e]=[]),ct[e].push((function(){o[t]=ft[e],++a===i.length&&n(o)})))})),0===i.length&&n(o)}var _t={};function yt(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 wt=void 0;function kt(e){for(var t="",r=e;x[r];)t+=wt[x[r++]];return t}var Et=void 0;function bt(e){throw new Et(e)}function jt(e,t,r){if(r=r||{},!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");var n=t.name;if(e||bt('type "'+n+'" must have a positive integer typeid pointer'),ft.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;bt("Cannot register type '"+n+"' twice")}if(ft[e]=t,delete lt[e],ct.hasOwnProperty(e)){var o=ct[e];delete ct[e],o.forEach((function(e){e()}))}}function Ct(e){if(!(this instanceof zt))return!1;if(!(e instanceof zt))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}function St(e){bt(e.$$.ptrType.registeredClass.name+" instance already deleted")}var Tt=!1;function Dt(e){}function Pt(e){e.count.value-=1,0===e.count.value&&function(e){e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)}(e)}function Ft(e){return"undefined"==typeof FinalizationGroup?(Ft=function(e){return e},e):(Tt=new FinalizationGroup((function(e){for(var t=e.next();!t.done;t=e.next()){var r=t.value;r.ptr?Pt(r):console.warn("object already deleted: "+r.ptr)}})),Dt=function(e){Tt.unregister(e.$$)},(Ft=function(e){return Tt.register(e,e.$$,e.$$),e})(e))}function xt(){if(this.$$.ptr||St(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e,t=Ft(Object.create(Object.getPrototypeOf(this),{$$:{value:(e=this.$$,{count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType})}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function At(){this.$$.ptr||St(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),Dt(this),Pt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Ot(){return!this.$$.ptr}var Mt=void 0,Wt=[];function $t(){for(;Wt.length;){var e=Wt.pop();e.$$.deleteScheduled=!1,e.delete()}}function Rt(){return this.$$.ptr||St(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&bt("Object already scheduled for deletion"),Wt.push(this),1===Wt.length&&Mt&&Mt($t),this.$$.deleteScheduled=!0,this}function zt(){}var Nt={};function It(e,t,r){if(void 0===e[t].overloadTable){var n=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||bt("Function '"+r+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+e[t].overloadTable+")!"),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}}function Bt(e,t,r){o.hasOwnProperty(e)?((void 0===r||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[r])&&bt("Cannot register public name '"+e+"' twice"),It(o,e,e),o.hasOwnProperty(r)&&bt("Cannot register multiple overloads of a function with the same number of arguments ("+r+")!"),o[e].overloadTable[r]=t):(o[e]=t,void 0!==r&&(o[e].numArguments=r))}function Lt(e,t,r,n,o,i,a,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,this.upcast=a,this.downcast=s,this.pureVirtualFunctions=[]}function Ut(e,t,r){for(;t!==r;)t.upcast||bt("Expected null or instance of "+r.name+", got an instance of "+t.name),e=t.upcast(e),t=t.baseClass;return e}function Gt(e,t){if(null===t)return this.isReference&&bt("null is not a valid "+this.name),0;t.$$||bt('Cannot pass "'+Er(t)+'" as a '+this.name),t.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name);var r=t.$$.ptrType.registeredClass;return Ut(t.$$.ptr,r,this.registeredClass)}function Ht(e,t){var r;if(null===t)return this.isReference&&bt("null is not a valid "+this.name),this.isSmartPointer?(r=this.rawConstructor(),null!==e&&e.push(this.rawDestructor,r),r):0;t.$$||bt('Cannot pass "'+Er(t)+'" as a '+this.name),t.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name),!this.isConst&&t.$$.ptrType.isConst&&bt("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);var n=t.$$.ptrType.registeredClass;if(r=Ut(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(void 0===t.$$.smartPtr&&bt("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:bt("Cannot convert argument of type "+(t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name)+" to parameter type "+this.name);break;case 1:r=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)r=t.$$.smartPtr;else{var o=t.clone();r=this.rawShare(r,yr((function(){o.delete()}))),null!==e&&e.push(this.rawDestructor,r)}break;default:bt("Unsupporting sharing policy")}return r}function qt(e,t){if(null===t)return this.isReference&&bt("null is not a valid "+this.name),0;t.$$||bt('Cannot pass "'+Er(t)+'" as a '+this.name),t.$$.ptr||bt("Cannot pass deleted object as a pointer of type "+this.name),t.$$.ptrType.isConst&&bt("Cannot convert argument of type "+t.$$.ptrType.name+" to parameter type "+this.name);var r=t.$$.ptrType.registeredClass;return Ut(t.$$.ptr,r,this.registeredClass)}function Vt(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e}function Yt(e){this.rawDestructor&&this.rawDestructor(e)}function Kt(e){null!==e&&e.delete()}function Zt(e,t,r){if(t===r)return e;if(void 0===r.baseClass)return null;var n=Zt(e,t,r.baseClass);return null===n?null:r.downcast(n)}function Xt(){return Object.keys(er).length}function Qt(){var e=[];for(var t in er)er.hasOwnProperty(t)&&e.push(er[t]);return e}function Jt(e){Mt=e,Wt.length&&Mt&&Mt($t)}var er={};function tr(e,t){return t=function(e,t){for(void 0===t&&bt("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t}(e,t),er[t]}function rr(e,t){return t.ptrType&&t.ptr||vt("makeClassHandle requires ptr and ptrType"),!!t.smartPtrType!=!!t.smartPtr&&vt("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ft(Object.create(e,{$$:{value:t}}))}function nr(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=tr(this.registeredClass,t);if(void 0!==r){if(0===r.$$.count.value)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function o(){return this.isSmartPointer?rr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):rr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var i,a=this.registeredClass.getActualType(t),s=Nt[a];if(!s)return o.call(this);i=this.isConst?s.constPointerType:s.pointerType;var u=Zt(t,this.registeredClass,i.registeredClass);return null===u?o.call(this):this.isSmartPointer?rr(i.registeredClass.instancePrototype,{ptrType:i,ptr:u,smartPtrType:this,smartPtr:e}):rr(i.registeredClass.instancePrototype,{ptrType:i,ptr:u})}function or(e,t,r,n,o,i,a,s,u,c,f){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=a,this.rawGetPointee=s,this.rawConstructor=u,this.rawShare=c,this.rawDestructor=f,o||void 0!==t.baseClass?this.toWireType=Ht:n?(this.toWireType=Gt,this.destructorFunction=null):(this.toWireType=qt,this.destructorFunction=null)}function ir(e,t,r){o.hasOwnProperty(e)||vt("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==r?o[e].overloadTable[r]=t:(o[e]=t,o[e].argCount=r)}function ar(e,t){var r=-1!=(e=kt(e)).indexOf("j")?function(e,t){E(e.indexOf("j")>=0,"getDynCaller should only be called with i64 sigs");var r=[];return function(){r.length=arguments.length;for(var n=0;n<arguments.length;n++)r[n]=arguments[n];return he(e,t,r)}}(e,t):_.get(t);return"function"!=typeof r&&bt("unknown function pointer with signature "+e+": "+t),r}var sr=void 0;function ur(e){var t=Qr(e),r=kt(t);return Zr(t),r}function cr(e,t){var r=[],n={};throw t.forEach((function e(t){n[t]||ft[t]||(lt[t]?lt[t].forEach(e):(r.push(t),n[t]=!0))})),new sr(e+": "+r.map(ur).join([", "]))}function fr(e,t){for(var r=[],n=0;n<e;n++)r.push(M[(t>>2)+n]);return r}function lr(e,t){if(!(e instanceof Function))throw new TypeError("new_ called with constructor type "+typeof e+" which is not a function");var r=pt(e.name||"unknownFunctionName",(function(){}));r.prototype=e.prototype;var n=new r,o=e.apply(n,t);return o instanceof Object?o:n}function dr(e,t,r,n,o){var i=t.length;i<2&&bt("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var a=null!==t[1]&&null!==r,s=!1,u=1;u<t.length;++u)if(null!==t[u]&&void 0===t[u].destructorFunction){s=!0;break}var c="void"!==t[0].name,f="",l="";for(u=0;u<i-2;++u)f+=(0!==u?", ":"")+"arg"+u,l+=(0!==u?", ":"")+"arg"+u+"Wired";var d="return function "+dt(e)+"("+f+") {\nif (arguments.length !== "+(i-2)+") {\nthrowBindingError('function "+e+" called with ' + arguments.length + ' arguments, expected "+(i-2)+" args!');\n}\n";s&&(d+="var destructors = [];\n");var p=s?"destructors":"null",h=["throwBindingError","invoker","fn","runDestructors","retType","classParam"],m=[bt,n,o,st,t[0],t[1]];for(a&&(d+="var thisWired = classParam.toWireType("+p+", this);\n"),u=0;u<i-2;++u)d+="var arg"+u+"Wired = argType"+u+".toWireType("+p+", arg"+u+"); // "+t[u+2].name+"\n",h.push("argType"+u),m.push(t[u+2]);if(a&&(l="thisWired"+(l.length>0?", ":"")+l),d+=(c?"var rv = ":"")+"invoker(fn"+(l.length>0?", ":"")+l+");\n",s)d+="runDestructors(destructors);\n";else for(u=a?1:2;u<t.length;++u){var v=1===u?"thisWired":"arg"+(u-2)+"Wired";null!==t[u].destructorFunction&&(d+=v+"_dtor("+v+"); // "+t[u].name+"\n",h.push(v+"_dtor"),m.push(t[u].destructorFunction))}return c&&(d+="var ret = retType.fromWireType(rv);\nreturn ret;\n"),d+="}\n",h.push(d),lr(Function,h).apply(null,m)}function pr(e,t,r){return e instanceof Object||bt(r+' with invalid "this": '+e),e instanceof t.registeredClass.constructor||bt(r+' incompatible with "this" of type '+e.constructor.name),e.$$.ptr||bt("cannot call emscripten binding method "+r+" on deleted object"),Ut(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass)}var hr=[],mr=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function vr(e){e>4&&0==--mr[e].refcount&&(mr[e]=void 0,hr.push(e))}function gr(){for(var e=0,t=5;t<mr.length;++t)void 0!==mr[t]&&++e;return e}function _r(){for(var e=5;e<mr.length;++e)if(void 0!==mr[e])return mr[e];return null}function yr(e){switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var t=hr.length?hr.pop():mr.length;return mr[t]={refcount:1,value:e},t}}function wr(e,t,r){switch(t){case 0:return function(e){var t=r?F:x;return this.fromWireType(t[e])};case 1:return function(e){var t=r?A:O;return this.fromWireType(t[e>>1])};case 2:return function(e){var t=r?M:W;return this.fromWireType(t[e>>2])};default:throw new TypeError("Unknown integer type: "+e)}}function kr(e,t){var r=ft[e];return void 0===r&&bt(t+" has unknown type "+ur(e)),r}function Er(e){if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e}function br(e,t){switch(t){case 2:return function(e){return this.fromWireType($[e>>2])};case 3:return function(e){return this.fromWireType(R[e>>3])};default:throw new TypeError("Unknown float type: "+e)}}function jr(e,t,r){switch(t){case 0:return r?function(e){return F[e]}:function(e){return x[e]};case 1:return r?function(e){return A[e>>1]}:function(e){return O[e>>1]};case 2:return r?function(e){return M[e>>2]}:function(e){return W[e>>2]};default:throw new TypeError("Unknown integer type: "+e)}}function Cr(e){return e||bt("Cannot use deleted val. handle = "+e),mr[e].value}var Sr={};function Tr(e){var t=Sr[e];return void 0===t?kt(e):t}var Dr=[];function Pr(){return"object"==typeof globalThis?globalThis:Function("return this")()}function Fr(e,t){throw cn(e,t||1),"longjmp"}function xr(e){try{return g.grow(e-P.byteLength+65535>>>16),V(g.buffer),1}catch(e){}}var Ar={};function Or(){if(!Or.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:f||"./this.program"};for(var t in Ar)e[t]=Ar[t];var r=[];for(var t in e)r.push(t+"="+e[t]);Or.strings=r}return Or.strings}function Mr(e){return e%4==0&&(e%100!=0||e%400==0)}function Wr(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}var $r=[31,29,31,30,31,30,31,31,30,31,30,31],Rr=[31,28,31,30,31,30,31,31,30,31,30,31];function zr(e,t){for(var r=new Date(e.getTime());t>0;){var n=Mr(r.getFullYear()),o=r.getMonth(),i=(n?$r:Rr)[o];if(!(t>i-r.getDate()))return r.setDate(r.getDate()+t),r;t-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}function Nr(e,t,r,n){var o=M[n+40>>2],i={tm_sec:M[n>>2],tm_min:M[n+4>>2],tm_hour:M[n+8>>2],tm_mday:M[n+12>>2],tm_mon:M[n+16>>2],tm_year:M[n+20>>2],tm_wday:M[n+24>>2],tm_yday:M[n+28>>2],tm_isdst:M[n+32>>2],tm_gmtoff:M[n+36>>2],tm_zone:o?C(o):""},a=C(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"];function l(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function d(e,t){return l(e,t,"0")}function p(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function h(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=zr(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=h(r),i=h(n);return p(o,t)<=0?p(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var v={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return f[e.tm_mon].substring(0,3)},"%B":function(e){return f[e.tm_mon]},"%C":function(e){return d((e.tm_year+1900)/100|0,2)},"%d":function(e){return d(e.tm_mday,2)},"%e":function(e){return l(e.tm_mday,2," ")},"%g":function(e){return m(e).toString().substring(2)},"%G":function(e){return m(e)},"%H":function(e){return d(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),d(t,2)},"%j":function(e){return d(e.tm_mday+Wr(Mr(e.tm_year+1900)?$r:Rr,e.tm_mon-1),3)},"%m":function(e){return d(e.tm_mon+1,2)},"%M":function(e){return d(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return d(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),r=0===t.getDay()?t:zr(t,7-t.getDay()),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(p(r,n)<0){var o=Wr(Mr(n.getFullYear())?$r:Rr,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===p(r,t)?"01":"00"},"%V":function(e){var t,r=new Date(e.tm_year+1900,0,4),n=new Date(e.tm_year+1901,0,4),o=h(r),i=h(n),a=zr(new Date(e.tm_year+1900,0,1),e.tm_yday);return p(a,o)<0?"53":p(i,a)<=0?"01":(t=o.getFullYear()<e.tm_year+1900?e.tm_yday+32-o.getDate():e.tm_yday+1-o.getDate(),d(Math.ceil(t/7),2))},"%w":function(e){return e.tm_wday},"%W":function(e){var t=new Date(e.tm_year,0,1),r=1===t.getDay()?t:zr(t,0===t.getDay()?1:7-t.getDay()+1),n=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(p(r,n)<0){var o=Wr(Mr(n.getFullYear())?$r:Rr,n.getMonth()-1)-31,i=31-r.getDate()+o+n.getDate();return d(Math.ceil(i/7),2)}return 0===p(r,t)?"01":"00"},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in v)a.indexOf(u)>=0&&(a=a.replace(new RegExp(u,"g"),v[u](i)));var g=Gr(a,!1);return g.length>t?0:(q(g,e),g.length-1)}var Ir=[],Br=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Ne.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n},Lr=365,Ur=146;function Gr(e,t,r){var n=r>0?r:D(e)+1,o=new Array(n),i=S(e,o,0,o.length);return t&&(o.length=i),o}Object.defineProperties(Br.prototype,{read:{get:function(){return(this.mode&Lr)===Lr},set:function(e){e?this.mode|=Lr:this.mode&=-366}},write:{get:function(){return(this.mode&Ur)===Ur},set:function(e){e?this.mode|=Ur:this.mode&=-147}},isFolder:{get:function(){return Ne.isDir(this.mode)}},isDevice:{get:function(){return Ne.isChrdev(this.mode)}}}),Ne.FSNode=Br,Ne.staticInit(),mt=o.InternalError=ht(Error,"InternalError"),function(){for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);wt=e}(),Et=o.BindingError=ht(Error,"BindingError"),zt.prototype.isAliasOf=Ct,zt.prototype.clone=xt,zt.prototype.delete=At,zt.prototype.isDeleted=Ot,zt.prototype.deleteLater=Rt,or.prototype.getPointee=Vt,or.prototype.destructor=Yt,or.prototype.argPackAdvance=8,or.prototype.readValueFromPointer=ut,or.prototype.deleteObject=Kt,or.prototype.fromWireType=nr,o.getInheritedInstanceCount=Xt,o.getLiveInheritedInstances=Qt,o.flushPendingDeletes=$t,o.setDelayFunction=Jt,sr=o.UnboundTypeError=ht(Error,"UnboundTypeError"),o.count_emval_handles=gr,o.get_first_emval=_r,Z.push({func:function(){Vr()}});var Hr,qr={__assert_fail:function(e,t,r,n){oe("Assertion failed: "+C(e)+", at: "+[t?C(t):"unknown filename",r,n?C(n):"unknown function"])},__clock_gettime:function(e,t){return ge(e,t)},__cxa_allocate_exception:function(e){return Yr(e+be)+be},__cxa_atexit:function(e,t){},__cxa_begin_catch:function(e){var t=new Se(e),r=t.get_exception_info();return r.get_caught()||(r.set_caught(!0),fn.uncaught_exceptions--),r.set_rethrown(!1),Te.push(t),De(r),t.get_exception_ptr()},__cxa_current_primary_exception:function(){if(!Te.length)return 0;var e=Te[Te.length-1];return De(e.get_exception_info()),e.get_base_ptr()},__cxa_decrement_exception_refcount:function(e){e&&Fe(new Ce(e))},__cxa_end_catch:function(){cn(0);var e=Te.pop();Fe(e.get_exception_info()),e.free(),xe=0},__cxa_find_matching_catch_2:function(){var e=xe;if(!e)return 0|(w(0),0);var t=new Ce(e),r=t.get_type(),n=new Se;if(n.set_base_ptr(e),!r)return 0|(w(0),n.ptr);var o=Array.prototype.slice.call(arguments),i=an(),a=un(4);M[a>>2]=e;for(var s=0;s<o.length;s++){var u=o[s];if(0===u||u===r)break;if(ln(u,r,a)){var c=M[a>>2];return e!==c&&n.set_adjusted_ptr(c),0|(w(u),n.ptr)}}return sn(i),0|(w(r),n.ptr)},__cxa_find_matching_catch_3:function(){var e=xe;if(!e)return 0|(w(0),0);var t=new Ce(e),r=t.get_type(),n=new Se;if(n.set_base_ptr(e),!r)return 0|(w(0),n.ptr);var o=Array.prototype.slice.call(arguments),i=an(),a=un(4);M[a>>2]=e;for(var s=0;s<o.length;s++){var u=o[s];if(0===u||u===r)break;if(ln(u,r,a)){var c=M[a>>2];return e!==c&&n.set_adjusted_ptr(c),0|(w(u),n.ptr)}}return sn(i),0|(w(r),n.ptr)},__cxa_find_matching_catch_4:function(){var e=xe;if(!e)return 0|(w(0),0);var t=new Ce(e),r=t.get_type(),n=new Se;if(n.set_base_ptr(e),!r)return 0|(w(0),n.ptr);var o=Array.prototype.slice.call(arguments),i=an(),a=un(4);M[a>>2]=e;for(var s=0;s<o.length;s++){var u=o[s];if(0===u||u===r)break;if(ln(u,r,a)){var c=M[a>>2];return e!==c&&n.set_adjusted_ptr(c),0|(w(u),n.ptr)}}return sn(i),0|(w(r),n.ptr)},__cxa_free_exception:Pe,__cxa_increment_exception_refcount:function(e){e&&De(new Ce(e))},__cxa_rethrow:Ae,__cxa_rethrow_primary_exception:function(e){if(e){var t=new Se;t.set_base_ptr(e);var r=t.get_exception_info();Te.push(t),r.set_rethrown(!0),Ae()}},__cxa_thread_atexit:function(e,t){},__cxa_throw:function(e,t,r){throw new Ce(e).init(t,r),xe=e,"uncaught_exception"in fn?fn.uncaught_exceptions++:fn.uncaught_exceptions=1,e},__cxa_uncaught_exceptions:function(){return fn.uncaught_exceptions},__localtime_r:function(e,t){return function(e,t){Oe();var r=new Date(1e3*M[e>>2]);M[t>>2]=r.getSeconds(),M[t+4>>2]=r.getMinutes(),M[t+8>>2]=r.getHours(),M[t+12>>2]=r.getDate(),M[t+16>>2]=r.getMonth(),M[t+20>>2]=r.getFullYear()-1900,M[t+24>>2]=r.getDay();var n=new Date(r.getFullYear(),0,1),o=(r.getTime()-n.getTime())/864e5|0;M[t+28>>2]=o,M[t+36>>2]=-60*r.getTimezoneOffset();var i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),a=n.getTimezoneOffset(),s=0|(i!=a&&r.getTimezoneOffset()==Math.min(a,i));M[t+32>>2]=s;var u=M[rn()+(s?4:0)>>2];return M[t+40>>2]=u,t}(e,t)},__resumeException:function(e){var t=new Se(e),r=t.get_base_ptr();throw xe||(xe=r),t.free(),r},__sys__newselect:function(e,t,r,n,o){try{for(var i=0,a=t?M[t>>2]:0,s=t?M[t+4>>2]:0,u=r?M[r>>2]:0,c=r?M[r+4>>2]:0,f=n?M[n>>2]:0,l=n?M[n+4>>2]:0,d=0,p=0,h=0,m=0,v=0,g=0,_=(t?M[t>>2]:0)|(r?M[r>>2]:0)|(n?M[n>>2]:0),y=(t?M[t+4>>2]:0)|(r?M[r+4>>2]:0)|(n?M[n+4>>2]:0),w=function(e,t,r,n){return e<32?t&n:r&n},k=0;k<e;k++){var E=1<<k%32;if(w(k,_,y,E)){var b=Ne.getStream(k);if(!b)throw new Ne.ErrnoError(8);var j=Ie.DEFAULT_POLLMASK;b.stream_ops.poll&&(j=b.stream_ops.poll(b)),1&j&&w(k,a,s,E)&&(k<32?d|=E:p|=E,i++),4&j&&w(k,u,c,E)&&(k<32?h|=E:m|=E,i++),2&j&&w(k,f,l,E)&&(k<32?v|=E:g|=E,i++)}}return t&&(M[t>>2]=d,M[t+4>>2]=p),r&&(M[r>>2]=h,M[r+4>>2]=m),n&&(M[n>>2]=v,M[n+4>>2]=g),i}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_fcntl64:function(e,t,r){Ie.varargs=r;try{var n=Ie.getStreamFromFD(e);switch(t){case 0:return(o=Ie.get())<0?-28:Ne.open(n.path,n.flags,0,o).fd;case 1:case 2:return 0;case 3:return n.flags;case 4:var o=Ie.get();return n.flags|=o,0;case 12:return o=Ie.get(),A[o+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return ve(28),-1;default:return-28}}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_fstat64:function(e,t){try{var r=Ie.getStreamFromFD(e);return Ie.doStat(Ne.stat,r.path,t)}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_getcwd:function(e,t){try{if(0===t)return-28;var r=Ne.cwd();return t<D(r)+1?-68:(T(r,e,t),e)}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_getpid:function(){return 42},__sys_getuid32:function(){return 0},__sys_ioctl:function(e,t,r){Ie.varargs=r;try{var n=Ie.getStreamFromFD(e);switch(t){case 21509:case 21505:return n.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=Ie.get();return M[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=Ie.get(),Ne.ioctl(n,t,o);case 21523:case 21524:return n.tty?0:-59;default:oe("bad ioctl syscall "+t)}}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_mmap2:function(e,t,r,n,o,i){try{return function(e,t,r,n,o,i){var a;i<<=12;var s=!1;if(0!=(16&n)&&e%16384!=0)return-28;if(0!=(32&n)){if(!(a=pn(16384,t)))return-48;Kr(a,0,t),s=!0}else{var u=Ne.getStream(o);if(!u)return-8;var c=Ne.mmap(u,e,t,i,r,n);a=c.ptr,s=c.allocated}return Ie.mappings[a]={malloc:a,len:t,allocated:s,fd:o,prot:r,flags:n,offset:i},a}(e,t,r,n,o,i)}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_munmap:function(e,t){try{return function(e,t){if(-1==(0|e)||0===t)return-28;var r=Ie.mappings[e];if(!r)return 0;if(t===r.len){var n=Ne.getStream(r.fd);2&r.prot&&Ie.doMsync(e,n,t,r.flags,r.offset),Ne.munmap(n),Ie.mappings[e]=null,r.allocated&&Zr(r.malloc)}return 0}(e,t)}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_open:function(e,t,r){Ie.varargs=r;try{var n=Ie.getStr(e),o=Ie.get();return Ne.open(n,t,o).fd}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_read:function(e,t,r){try{var n=Ie.getStreamFromFD(e);return Ne.read(n,F,t,r)}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_rmdir:function(e){try{return e=Ie.getStr(e),Ne.rmdir(e),0}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_socketcall:function(e,t){try{Ie.varargs=t;var r=function(){var e=Xe.getSocket(Ie.get());if(!e)throw new Ne.ErrnoError(8);return e},n=function(e){var t=Ie.get(),r=Ie.get();if(e&&0===t)return null;var n=ot(t,r);if(n.errno)throw new Ne.ErrnoError(n.errno);return n.addr=tt.lookup_addr(n.addr)||n.addr,n};switch(e){case 1:var o=Ie.get(),i=Ie.get(),a=Ie.get();return(s=Xe.createSocket(o,i,a)).stream.fd;case 2:var s=r(),u=n();return s.sock_ops.bind(s,u.addr,u.port),0;case 3:return s=r(),u=n(),s.sock_ops.connect(s,u.addr,u.port),0;case 4:s=r();var c=Ie.get();return s.sock_ops.listen(s,c),0;case 5:s=r();var f=Ie.get(),l=(Ie.get(),s.sock_ops.accept(s));return f&&it(f,l.family,tt.lookup_name(l.daddr),l.dport),l.stream.fd;case 6:return s=r(),f=Ie.get(),Ie.get(),it(f,s.family,tt.lookup_name(s.saddr||"0.0.0.0"),s.sport),0;case 7:return s=r(),f=Ie.get(),Ie.get(),s.daddr?(it(f,s.family,tt.lookup_name(s.daddr),s.dport),0):-53;case 11:s=r();var d=Ie.get(),p=Ie.get(),h=(Ie.get(),n(!0));return h?s.sock_ops.sendmsg(s,F,d,p,h.addr,h.port):Ne.write(s.stream,F,d,p);case 12:s=r();var m=Ie.get(),v=Ie.get();return Ie.get(),f=Ie.get(),Ie.get(),($=s.sock_ops.recvmsg(s,v))?(f&&it(f,s.family,tt.lookup_name($.addr),$.port),x.set($.buffer,m),$.buffer.byteLength):0;case 14:return-50;case 15:s=r();var g=Ie.get(),_=Ie.get(),y=Ie.get(),w=Ie.get();return 1===g&&4===_?(M[y>>2]=s.error,M[w>>2]=4,s.error=null,0):-50;case 16:s=r(),d=Ie.get(),Ie.get();var k,E=M[d+8>>2],b=M[d+12>>2],j=M[d>>2],C=M[d+4>>2];if(j){if((u=ot(j,C)).errno)return-u.errno;k=u.port,f=tt.lookup_addr(u.addr)||u.addr}for(var S=0,T=0;T<b;T++)S+=M[E+(8*T+4)>>2];var D=new Uint8Array(S),P=0;for(T=0;T<b;T++)for(var A=M[E+(8*T+0)>>2],O=M[E+(8*T+4)>>2],W=0;W<O;W++)D[P++]=F[A+W>>0];return s.sock_ops.sendmsg(s,D,0,S,f,k);case 17:for(s=r(),d=Ie.get(),Ie.get(),E=M[d+8>>2],b=M[d+12>>2],S=0,T=0;T<b;T++)S+=M[E+(8*T+4)>>2];var $;if(!($=s.sock_ops.recvmsg(s,S)))return 0;(j=M[d>>2])&&it(j,s.family,tt.lookup_name($.addr),$.port);var R=0,z=$.buffer.byteLength;for(T=0;z>0&&T<b;T++)A=M[E+(8*T+0)>>2],(O=M[E+(8*T+4)>>2])&&(p=Math.min(O,z),m=$.buffer.subarray(R,R+p),x.set(m,A+R),R+=p,z-=p);return R;default:return-52}}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_stat64:function(e,t){try{return e=Ie.getStr(e),Ie.doStat(Ne.stat,e,t)}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},__sys_unlink:function(e){try{return e=Ie.getStr(e),Ne.unlink(e),0}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),-e.errno}},_embind_finalize_value_array:function(e){var t=at[e];delete at[e];var r=t.elements,n=r.length,o=r.map((function(e){return e.getterReturnType})).concat(r.map((function(e){return e.setterArgumentType}))),i=t.rawConstructor,a=t.rawDestructor;gt([e],o,(function(e){return r.forEach((function(t,r){var o=e[r],i=t.getter,a=t.getterContext,s=e[r+n],u=t.setter,c=t.setterContext;t.read=function(e){return o.fromWireType(i(a,e))},t.write=function(e,t){var r=[];u(c,e,s.toWireType(r,t)),st(r)}})),[{name:t.name,fromWireType:function(e){for(var t=new Array(n),o=0;o<n;++o)t[o]=r[o].read(e);return a(e),t},toWireType:function(e,o){if(n!==o.length)throw new TypeError("Incorrect number of tuple elements for "+t.name+": expected="+n+", actual="+o.length);for(var s=i(),u=0;u<n;++u)r[u].write(s,o[u]);return null!==e&&e.push(a,s),s},argPackAdvance:8,readValueFromPointer:ut,destructorFunction:a}]}))},_embind_finalize_value_object:function(e){var t=_t[e];delete _t[e];var r=t.rawConstructor,n=t.rawDestructor,o=t.fields;gt([e],o.map((function(e){return e.getterReturnType})).concat(o.map((function(e){return e.setterArgumentType}))),(function(e){var i={};return o.forEach((function(t,r){var n=t.fieldName,a=e[r],s=t.getter,u=t.getterContext,c=e[r+o.length],f=t.setter,l=t.setterContext;i[n]={read:function(e){return a.fromWireType(s(u,e))},write:function(e,t){var r=[];f(l,e,c.toWireType(r,t)),st(r)}}})),[{name:t.name,fromWireType:function(e){var t={};for(var r in i)t[r]=i[r].read(e);return n(e),t},toWireType:function(e,t){for(var o in i)if(!(o in t))throw new TypeError('Missing field: "'+o+'"');var a=r();for(o in i)i[o].write(a,t[o]);return null!==e&&e.push(n,a),a},argPackAdvance:8,readValueFromPointer:ut,destructorFunction:n}]}))},_embind_register_bool:function(e,t,r,n,o){var i=yt(r);jt(e,{name:t=kt(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:o},argPackAdvance:8,readValueFromPointer:function(e){var n;if(1===r)n=F;else if(2===r)n=A;else{if(4!==r)throw new TypeError("Unknown boolean type size: "+t);n=M}return this.fromWireType(n[e>>i])},destructorFunction:null})},_embind_register_class:function(e,t,r,n,o,i,a,s,u,c,f,l,d){f=kt(f),i=ar(o,i),s&&(s=ar(a,s)),c&&(c=ar(u,c)),d=ar(l,d);var p=dt(f);Bt(p,(function(){cr("Cannot construct "+f+" due to unbound types",[n])})),gt([e,t,r],n?[n]:[],(function(t){var r,o;t=t[0],o=n?(r=t.registeredClass).instancePrototype:zt.prototype;var a=pt(p,(function(){if(Object.getPrototypeOf(this)!==u)throw new Et("Use 'new' to construct "+f);if(void 0===l.constructor_body)throw new Et(f+" has no accessible constructor");var e=l.constructor_body[arguments.length];if(void 0===e)throw new Et("Tried to invoke ctor of "+f+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(l.constructor_body).toString()+") parameters instead!");return e.apply(this,arguments)})),u=Object.create(o,{constructor:{value:a}});a.prototype=u;var l=new Lt(f,a,u,d,r,i,s,c),h=new or(f,l,!0,!1,!1),m=new or(f+"*",l,!1,!1,!1),v=new or(f+" const*",l,!1,!0,!1);return Nt[e]={pointerType:m,constPointerType:v},ir(p,a),[h,m,v]}))},_embind_register_class_constructor:function(e,t,r,n,o,i){E(t>0);var a=fr(t,r);o=ar(n,o);var s=[i],u=[];gt([],[e],(function(e){var r="constructor "+(e=e[0]).name;if(void 0===e.registeredClass.constructor_body&&(e.registeredClass.constructor_body=[]),void 0!==e.registeredClass.constructor_body[t-1])throw new Et("Cannot register multiple constructors with identical number of parameters ("+(t-1)+") for class '"+e.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");return e.registeredClass.constructor_body[t-1]=function(){cr("Cannot construct "+e.name+" due to unbound types",a)},gt([],a,(function(n){return e.registeredClass.constructor_body[t-1]=function(){arguments.length!==t-1&&bt(r+" called with "+arguments.length+" arguments, expected "+(t-1)),u.length=0,s.length=t;for(var e=1;e<t;++e)s[e]=n[e].toWireType(u,arguments[e-1]);var i=o.apply(null,s);return st(u),n[0].fromWireType(i)},[]})),[]}))},_embind_register_class_function:function(e,t,r,n,o,i,a,s){var u=fr(r,n);t=kt(t),i=ar(o,i),gt([],[e],(function(e){var n=(e=e[0]).name+"."+t;function o(){cr("Cannot call "+n+" due to unbound types",u)}s&&e.registeredClass.pureVirtualFunctions.push(t);var c=e.registeredClass.instancePrototype,f=c[t];return void 0===f||void 0===f.overloadTable&&f.className!==e.name&&f.argCount===r-2?(o.argCount=r-2,o.className=e.name,c[t]=o):(It(c,t,n),c[t].overloadTable[r-2]=o),gt([],u,(function(o){var s=dr(n,o,e,i,a);return void 0===c[t].overloadTable?(s.argCount=r-2,c[t]=s):c[t].overloadTable[r-2]=s,[]})),[]}))},_embind_register_class_property:function(e,t,r,n,o,i,a,s,u,c){t=kt(t),o=ar(n,o),gt([],[e],(function(e){var n=(e=e[0]).name+"."+t,f={get:function(){cr("Cannot access "+n+" due to unbound types",[r,a])},enumerable:!0,configurable:!0};return f.set=u?function(){cr("Cannot access "+n+" due to unbound types",[r,a])}:function(e){bt(n+" is a read-only property")},Object.defineProperty(e.registeredClass.instancePrototype,t,f),gt([],u?[r,a]:[r],(function(r){var a=r[0],f={get:function(){var t=pr(this,e,n+" getter");return a.fromWireType(o(i,t))},enumerable:!0};if(u){u=ar(s,u);var l=r[1];f.set=function(t){var r=pr(this,e,n+" setter"),o=[];u(c,r,l.toWireType(o,t)),st(o)}}return Object.defineProperty(e.registeredClass.instancePrototype,t,f),[]})),[]}))},_embind_register_emval:function(e,t){jt(e,{name:t=kt(t),fromWireType:function(e){var t=mr[e].value;return vr(e),t},toWireType:function(e,t){return yr(t)},argPackAdvance:8,readValueFromPointer:ut,destructorFunction:null})},_embind_register_enum:function(e,t,r,n){var o=yt(r);function i(){}t=kt(t),i.values={},jt(e,{name:t,constructor:i,fromWireType:function(e){return this.constructor.values[e]},toWireType:function(e,t){return t.value},argPackAdvance:8,readValueFromPointer:wr(t,o,n),destructorFunction:null}),Bt(t,i)},_embind_register_enum_value:function(e,t,r){var n=kr(e,"enum");t=kt(t);var o=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:pt(n.name+"_"+t,(function(){}))}});o.values[r]=i,o[t]=i},_embind_register_float:function(e,t,r){var n=yt(r);jt(e,{name:t=kt(t),fromWireType:function(e){return e},toWireType:function(e,t){if("number"!=typeof t&&"boolean"!=typeof t)throw new TypeError('Cannot convert "'+Er(t)+'" to '+this.name);return t},argPackAdvance:8,readValueFromPointer:br(t,n),destructorFunction:null})},_embind_register_function:function(e,t,r,n,o,i){var a=fr(t,r);e=kt(e),o=ar(n,o),Bt(e,(function(){cr("Cannot call "+e+" due to unbound types",a)}),t-1),gt([],a,(function(r){var n=[r[0],null].concat(r.slice(1));return ir(e,dr(e,n,null,o,i),t-1),[]}))},_embind_register_integer:function(e,t,r,n,o){t=kt(t),-1===o&&(o=4294967295);var i=yt(r),a=function(e){return e};if(0===n){var s=32-8*r;a=function(e){return e<<s>>>s}}var u=-1!=t.indexOf("unsigned");jt(e,{name:t,fromWireType:a,toWireType:function(e,r){if("number"!=typeof r&&"boolean"!=typeof r)throw new TypeError('Cannot convert "'+Er(r)+'" to '+this.name);if(r<n||r>o)throw new TypeError('Passing a number "'+Er(r)+'" from JS side to C/C++ side to an argument of type "'+t+'", which is outside the valid range ['+n+", "+o+"]!");return u?r>>>0:0|r},argPackAdvance:8,readValueFromPointer:jr(t,i,0!==n),destructorFunction:null})},_embind_register_memory_view:function(e,t,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];function o(e){var t=W,r=t[e>>=2],o=t[e+1];return new n(P,o,r)}jt(e,{name:r=kt(r),fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},_embind_register_std_string:function(e,t){var r="std::string"===(t=kt(t));jt(e,{name:t,fromWireType:function(e){var t,n=W[e>>2];if(r)for(var o=e+4,i=0;i<=n;++i){var a=e+4+i;if(i==n||0==x[a]){var s=C(o,a-o);void 0===t?t=s:(t+=String.fromCharCode(0),t+=s),o=a+1}}else{var u=new Array(n);for(i=0;i<n;++i)u[i]=String.fromCharCode(x[e+4+i]);t=u.join("")}return Zr(e),t},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n="string"==typeof t;n||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array||bt("Cannot pass non-string to std::string");var o=(r&&n?function(){return D(t)}:function(){return t.length})(),i=Yr(4+o+1);if(W[i>>2]=o,r&&n)T(t,i+4,o+1);else if(n)for(var a=0;a<o;++a){var s=t.charCodeAt(a);s>255&&(Zr(i),bt("String has UTF-16 code units that do not fit in 8 bits")),x[i+4+a]=s}else for(a=0;a<o;++a)x[i+4+a]=t[a];return null!==e&&e.push(Zr,i),i},argPackAdvance:8,readValueFromPointer:ut,destructorFunction:function(e){Zr(e)}})},_embind_register_std_wstring:function(e,t,r){var n,o,i,a,s;r=kt(r),2===t?(n=N,o=I,a=B,i=function(){return O},s=1):4===t&&(n=L,o=U,a=G,i=function(){return W},s=2),jt(e,{name:r,fromWireType:function(e){for(var r,o=W[e>>2],a=i(),u=e+4,c=0;c<=o;++c){var f=e+4+c*t;if(c==o||0==a[f>>s]){var l=n(u,f-u);void 0===r?r=l:(r+=String.fromCharCode(0),r+=l),u=f+t}}return Zr(e),r},toWireType:function(e,n){"string"!=typeof n&&bt("Cannot pass non-string to C++ string type "+r);var i=a(n),u=Yr(4+i+t);return W[u>>2]=i>>s,o(n,u+4,i+t),null!==e&&e.push(Zr,u),u},argPackAdvance:8,readValueFromPointer:ut,destructorFunction:function(e){Zr(e)}})},_embind_register_value_array:function(e,t,r,n,o,i){at[e]={name:kt(t),rawConstructor:ar(r,n),rawDestructor:ar(o,i),elements:[]}},_embind_register_value_array_element:function(e,t,r,n,o,i,a,s,u){at[e].elements.push({getterReturnType:t,getter:ar(r,n),getterContext:o,setterArgumentType:i,setter:ar(a,s),setterContext:u})},_embind_register_value_object:function(e,t,r,n,o,i){_t[e]={name:kt(t),rawConstructor:ar(r,n),rawDestructor:ar(o,i),fields:[]}},_embind_register_value_object_field:function(e,t,r,n,o,i,a,s,u,c){_t[e].fields.push({fieldName:kt(t),getterReturnType:r,getter:ar(n,o),getterContext:i,setterArgumentType:a,setter:ar(s,u),setterContext:c})},_embind_register_void:function(e,t){jt(e,{isVoid:!0,name:t=kt(t),argPackAdvance:0,fromWireType:function(){},toWireType:function(e,t){}})},_emval_as:function(e,t,r){e=Cr(e),t=kr(t,"emval::as");var n=[],o=yr(n);return M[r>>2]=o,t.toWireType(n,e)},_emval_call_method:function(e,t,r,n,o){return(e=Dr[e])(t=Cr(t),r=Tr(r),function(e){var t=[];return M[e>>2]=yr(t),t}(n),o)},_emval_call_void_method:function(e,t,r,n){(e=Dr[e])(t=Cr(t),r=Tr(r),null,n)},_emval_decref:vr,_emval_get_global:function(e){return 0===e?yr(Pr()):(e=Tr(e),yr(Pr()[e]))},_emval_get_method_caller:function(e,t){for(var r=function(e,t){for(var r=new Array(e),n=0;n<e;++n)r[n]=kr(M[(t>>2)+n],"parameter "+n);return r}(e,t),n=r[0],o=n.name+"_$"+r.slice(1).map((function(e){return e.name})).join("_")+"$",i=["retType"],a=[n],s="",u=0;u<e-1;++u)s+=(0!==u?", ":"")+"arg"+u,i.push("argType"+u),a.push(r[1+u]);var c="return function "+dt("methodCaller_"+o)+"(handle, name, destructors, args) {\n",f=0;for(u=0;u<e-1;++u)c+=" var arg"+u+" = argType"+u+".readValueFromPointer(args"+(f?"+"+f:"")+");\n",f+=r[u+1].argPackAdvance;for(c+=" var rv = handle[name]("+s+");\n",u=0;u<e-1;++u)r[u+1].deleteObject&&(c+=" argType"+u+".deleteObject(arg"+u+");\n");n.isVoid||(c+=" return retType.toWireType(destructors, rv);\n"),c+="};\n",i.push(c);var l,d,p=lr(Function,i).apply(null,a);return l=p,d=Dr.length,Dr.push(l),d},_emval_get_property:function(e,t){return yr((e=Cr(e))[t=Cr(t)])},_emval_incref:function(e){e>4&&(mr[e].refcount+=1)},_emval_instanceof:function(e,t){return(e=Cr(e))instanceof(t=Cr(t))},_emval_is_number:function(e){return"number"==typeof(e=Cr(e))},_emval_is_string:function(e){return"string"==typeof(e=Cr(e))},_emval_new_array:function(){return yr([])},_emval_new_cstring:function(e){return yr(Tr(e))},_emval_run_destructors:function(e){st(mr[e].value),vr(e)},_emval_take_value:function(e,t){return yr((e=kr(e,"_emval_take_value")).readValueFromPointer(t))},abort:function(){oe()},atexit:je,clock:function e(){return void 0===e.start&&(e.start=Date.now()),1e3*(Date.now()-e.start)|0},clock_gettime:ge,difftime:function(e,t){return e-t},dlopen:function(e,t){oe("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")},dlsym:function(e,t){oe("To use dlopen, you need to use Emscripten's linking support, see https://github.com/emscripten-core/emscripten/wiki/Linking")},emscripten_asm_const_int:function(e,t,r){var n=function(e,t){var r;for(Ir.length=0,t>>=2;r=x[e++];){var n=r<105;n&&1&t&&t++,Ir.push(n?R[t++>>1]:M[t]),++t}return Ir}(t,r);return de[e].apply(null,n)},emscripten_longjmp:function(e,t){return Fr(e,t)},emscripten_longjmp_jmpbuf:function(e,t){return Fr(e,t)},emscripten_memcpy_big:function(e,t,r){x.copyWithin(e,t,t+r)},emscripten_resize_heap:function(e){e>>>=0;var t=x.length,r=2147483648;if(e>r)return!1;for(var n,o,i=1;i<=4;i*=2){var a=t*(1+.2/i);if(a=Math.min(a,e+100663296),xr(Math.min(r,((n=Math.max(16777216,e,a))%(o=65536)>0&&(n+=o-n%o),n))))return!0}return!1},environ_get:function(e,t){var r=0;return Or().forEach((function(n,o){var i=t+r;M[e+4*o>>2]=i,function(e,t,r){for(var n=0;n<e.length;++n)F[t++>>0]=e.charCodeAt(n);r||(F[t>>0]=0)}(n,i),r+=n.length+1})),0},environ_sizes_get:function(e,t){var r=Or();M[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),M[t>>2]=n,0},execve:function(e,t,r){return ve(45),-1},exit:function(e){!function(e,t){t&&v&&0===e||(v||(o.onExit&&o.onExit(e),k=!0),l(e,new kn(e)))}(e)},fd_close:function(e){try{var t=Ie.getStreamFromFD(e);return Ne.close(t),0}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),e.errno}},fd_fdstat_get:function(e,t){try{var r=Ie.getStreamFromFD(e),n=r.tty?2:Ne.isDir(r.mode)?3:Ne.isLink(r.mode)?7:4;return F[t>>0]=n,0}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),e.errno}},fd_read:function(e,t,r,n){try{var o=Ie.getStreamFromFD(e),i=Ie.doReadv(o,t,r);return M[n>>2]=i,0}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),e.errno}},fd_seek:function(e,t,r,n,o){try{var i=Ie.getStreamFromFD(e),a=4294967296*r+(t>>>0),s=9007199254740992;return a<=-s||a>=s?-61:(Ne.llseek(i,a,n),ue=[i.position>>>0,(se=i.position,+Math.abs(se)>=1?se>0?(0|Math.min(+Math.floor(se/4294967296),4294967295))>>>0:~~+Math.ceil((se-+(~~se>>>0))/4294967296)>>>0:0)],M[o>>2]=ue[0],M[o+4>>2]=ue[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0)}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),e.errno}},fd_write:function(e,t,r,n){try{var o=Ie.getStreamFromFD(e),i=Ie.doWritev(o,t,r);return M[n>>2]=i,0}catch(e){return void 0!==Ne&&e instanceof Ne.ErrnoError||oe(e),e.errno}},fork:function(){return ve(6),-1},getSelf:function(){return H(location.toString())},getTempRet0:function(){return 0|y},getaddrinfo:function(e,t,r,n){var o,i=0,a=0,s=0,u=0,c=0,f=0;function l(e,t,r,n,o,i){var a,s,u;return s=10===e?28:16,o=10===e?nt(o):rt(o),E(!it(a=Yr(s),e,o,i).errno),u=Yr(32),M[u+4>>2]=e,M[u+8>>2]=t,M[u+12>>2]=r,M[u+24>>2]=n,M[u+20>>2]=a,M[u+16>>2]=10===e?28:16,M[u+28>>2]=0,u}if(r&&(s=M[r>>2],u=M[r+4>>2],c=M[r+8>>2],f=M[r+12>>2]),c&&!f&&(f=2===c?17:6),!c&&f&&(c=17===f?2:1),0===f&&(f=6),0===c&&(c=1),!e&&!t)return-2;if(-1088&s)return-1;if(0!==r&&2&M[r>>2]&&!e)return-1;if(32&s)return-2;if(0!==c&&1!==c&&2!==c)return-7;if(0!==u&&2!==u&&10!==u)return-6;if(t&&(t=C(t),a=parseInt(t,10),isNaN(a)))return 1024&s?-2:-8;if(!e)return 0===u&&(u=2),0==(1&s)&&(i=2===u?Jr(2130706433):[0,0,0,1]),o=l(u,c,f,null,i,a),M[n>>2]=o,0;if(null!==(i=Qe(e=C(e))))if(0===u||2===u)u=2;else{if(!(10===u&&8&s))return-2;i=[0,0,Jr(65535),i],u=10}else if(null!==(i=et(e))){if(0!==u&&10!==u)return-2;u=10}return null!=i?(o=l(u,c,f,e,i,a),M[n>>2]=o,0):4&s?-2:(i=Qe(e=tt.lookup_name(e)),0===u?u=2:10===u&&(i=[0,0,Jr(65535),i]),o=l(u,c,f,null,i,a),M[n>>2]=o,0)},gettimeofday:function(e){var t=Date.now();return M[e>>2]=t/1e3|0,M[e+4>>2]=t%1e3*1e3|0,0},gmtime_r:function e(t,r){var n=new Date(1e3*M[t>>2]);M[r>>2]=n.getUTCSeconds(),M[r+4>>2]=n.getUTCMinutes(),M[r+8>>2]=n.getUTCHours(),M[r+12>>2]=n.getUTCDate(),M[r+16>>2]=n.getUTCMonth(),M[r+20>>2]=n.getUTCFullYear()-1900,M[r+24>>2]=n.getUTCDay(),M[r+36>>2]=0,M[r+32>>2]=0;var o=Date.UTC(n.getUTCFullYear(),0,1,0,0,0,0),i=(n.getTime()-o)/864e5|0;return M[r+28>>2]=i,e.GMTString||(e.GMTString=H("GMT")),M[r+40>>2]=e.GMTString,r},initializeOpenGL:function(){return H((e=bn,self[e(134,"WNB0")][e(127,"K1cv")]()));var e},invoke_di:function(e,t){var r=an();try{return _.get(e)(t)}catch(e){if(sn(r),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_dii:function(e,t,r){var n=an();try{return _.get(e)(t,r)}catch(e){if(sn(n),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_diiddi:function(e,t,r,n,o,i){var a=an();try{return _.get(e)(t,r,n,o,i)}catch(e){if(sn(a),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_diii:function(e,t,r,n){var o=an();try{return _.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_diiii:function(e,t,r,n,o){var i=an();try{return _.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_diiiiiii:function(e,t,r,n,o,i,a,s){var u=an();try{return _.get(e)(t,r,n,o,i,a,s)}catch(e){if(sn(u),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_fd:function(e,t){var r=an();try{return _.get(e)(t)}catch(e){if(sn(r),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_fi:function(e,t){var r=an();try{return _.get(e)(t)}catch(e){if(sn(r),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_fii:function(e,t,r){var n=an();try{return _.get(e)(t,r)}catch(e){if(sn(n),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_fiif:function(e,t,r,n){var o=an();try{return _.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_fiii:function(e,t,r,n){var o=an();try{return _.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_fiiii:function(e,t,r,n,o){var i=an();try{return _.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_i:function(e){var t=an();try{return _.get(e)()}catch(e){if(sn(t),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_id:function(e,t){var r=an();try{return _.get(e)(t)}catch(e){if(sn(r),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_ii:function(e,t){var r=an();try{return _.get(e)(t)}catch(e){if(sn(r),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iid:function(e,t,r){var n=an();try{return _.get(e)(t,r)}catch(e){if(sn(n),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iidddd:function(e,t,r,n,o,i){var a=an();try{return _.get(e)(t,r,n,o,i)}catch(e){if(sn(a),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iidi:function(e,t,r,n){var o=an();try{return _.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iidid:function(e,t,r,n,o){var i=an();try{return _.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiffi:function(e,t,r,n,o){var i=an();try{return _.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iii:function(e,t,r){var n=an();try{return _.get(e)(t,r)}catch(e){if(sn(n),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiif:function(e,t,r,n){var o=an();try{return _.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiffii:function(e,t,r,n,o,i,a){var s=an();try{return _.get(e)(t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiii:function(e,t,r,n){var o=an();try{return _.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiid:function(e,t,r,n,o){var i=an();try{return _.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiif:function(e,t,r,n,o){var i=an();try{return _.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiifiiii:function(e,t,r,n,o,i,a,s,u){var c=an();try{return _.get(e)(t,r,n,o,i,a,s,u)}catch(e){if(sn(c),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiii:function(e,t,r,n,o){var i=an();try{return _.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiid:function(e,t,r,n,o,i){var a=an();try{return _.get(e)(t,r,n,o,i)}catch(e){if(sn(a),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiif:function(e,t,r,n,o,i){var a=an();try{return _.get(e)(t,r,n,o,i)}catch(e){if(sn(a),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiii:function(e,t,r,n,o,i){var a=an();try{return _.get(e)(t,r,n,o,i)}catch(e){if(sn(a),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiiii:function(e,t,r,n,o,i,a){var s=an();try{return _.get(e)(t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiiiii:function(e,t,r,n,o,i,a,s){var u=an();try{return _.get(e)(t,r,n,o,i,a,s)}catch(e){if(sn(u),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiiiiii:function(e,t,r,n,o,i,a,s,u){var c=an();try{return _.get(e)(t,r,n,o,i,a,s,u)}catch(e){if(sn(c),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiiiiiii:function(e,t,r,n,o,i,a,s,u,c){var f=an();try{return _.get(e)(t,r,n,o,i,a,s,u,c)}catch(e){if(sn(f),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiiiiiiii:function(e,t,r,n,o,i,a,s,u,c,f){var l=an();try{return _.get(e)(t,r,n,o,i,a,s,u,c,f)}catch(e){if(sn(l),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiiiiiiiii:function(e,t,r,n,o,i,a,s,u,c,f,l){var d=an();try{return _.get(e)(t,r,n,o,i,a,s,u,c,f,l)}catch(e){if(sn(d),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiiiiiiiiii:function(e,t,r,n,o,i,a,s,u,c,f,l,d){var p=an();try{return _.get(e)(t,r,n,o,i,a,s,u,c,f,l,d)}catch(e){if(sn(p),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iiiiij:function(e,t,r,n,o,i,a){var s=an();try{return yn(e,t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_iij:function(e,t,r,n){var o=an();try{return mn(e,t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_ij:function(e,t,r){var n=an();try{return gn(e,t,r)}catch(e){if(sn(n),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_ji:function(e,t){var r=an();try{return vn(e,t)}catch(e){if(sn(r),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_jii:function(e,t,r){var n=an();try{return _n(e,t,r)}catch(e){if(sn(n),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_jiiii:function(e,t,r,n,o){var i=an();try{return wn(e,t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_v:function(e){var t=an();try{_.get(e)()}catch(e){if(sn(t),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_vi:function(e,t){var r=an();try{_.get(e)(t)}catch(e){if(sn(r),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_vid:function(e,t,r){var n=an();try{_.get(e)(t,r)}catch(e){if(sn(n),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_vidd:function(e,t,r,n){var o=an();try{_.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_vidi:function(e,t,r,n){var o=an();try{_.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_vididdii:function(e,t,r,n,o,i,a,s){var u=an();try{_.get(e)(t,r,n,o,i,a,s)}catch(e){if(sn(u),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_vif:function(e,t,r){var n=an();try{_.get(e)(t,r)}catch(e){if(sn(n),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_vii:function(e,t,r){var n=an();try{_.get(e)(t,r)}catch(e){if(sn(n),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viid:function(e,t,r,n){var o=an();try{_.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viidd:function(e,t,r,n,o){var i=an();try{_.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiddii:function(e,t,r,n,o,i,a){var s=an();try{_.get(e)(t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiddiii:function(e,t,r,n,o,i,a,s){var u=an();try{_.get(e)(t,r,n,o,i,a,s)}catch(e){if(sn(u),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viidi:function(e,t,r,n,o){var i=an();try{_.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viidiiid:function(e,t,r,n,o,i,a,s){var u=an();try{_.get(e)(t,r,n,o,i,a,s)}catch(e){if(sn(u),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viif:function(e,t,r,n){var o=an();try{_.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiff:function(e,t,r,n,o){var i=an();try{_.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viifi:function(e,t,r,n,o){var i=an();try{_.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viifii:function(e,t,r,n,o,i){var a=an();try{_.get(e)(t,r,n,o,i)}catch(e){if(sn(a),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viii:function(e,t,r,n){var o=an();try{_.get(e)(t,r,n)}catch(e){if(sn(o),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiidd:function(e,t,r,n,o,i){var a=an();try{_.get(e)(t,r,n,o,i)}catch(e){if(sn(a),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiddd:function(e,t,r,n,o,i,a){var s=an();try{_.get(e)(t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiddi:function(e,t,r,n,o,i,a){var s=an();try{_.get(e)(t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiif:function(e,t,r,n,o){var i=an();try{_.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiffi:function(e,t,r,n,o,i,a){var s=an();try{_.get(e)(t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiffii:function(e,t,r,n,o,i,a,s){var u=an();try{_.get(e)(t,r,n,o,i,a,s)}catch(e){if(sn(u),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiifi:function(e,t,r,n,o,i){var a=an();try{_.get(e)(t,r,n,o,i)}catch(e){if(sn(a),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiifii:function(e,t,r,n,o,i,a){var s=an();try{_.get(e)(t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiii:function(e,t,r,n,o){var i=an();try{_.get(e)(t,r,n,o)}catch(e){if(sn(i),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiif:function(e,t,r,n,o,i){var a=an();try{_.get(e)(t,r,n,o,i)}catch(e){if(sn(a),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiii:function(e,t,r,n,o,i){var a=an();try{_.get(e)(t,r,n,o,i)}catch(e){if(sn(a),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiiddi:function(e,t,r,n,o,i,a,s,u){var c=an();try{_.get(e)(t,r,n,o,i,a,s,u)}catch(e){if(sn(c),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiidi:function(e,t,r,n,o,i,a,s){var u=an();try{_.get(e)(t,r,n,o,i,a,s)}catch(e){if(sn(u),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiif:function(e,t,r,n,o,i,a){var s=an();try{_.get(e)(t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiifi:function(e,t,r,n,o,i,a,s){var u=an();try{_.get(e)(t,r,n,o,i,a,s)}catch(e){if(sn(u),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiii:function(e,t,r,n,o,i,a){var s=an();try{_.get(e)(t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiiiddi:function(e,t,r,n,o,i,a,s,u,c){var f=an();try{_.get(e)(t,r,n,o,i,a,s,u,c)}catch(e){if(sn(f),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiiiffii:function(e,t,r,n,o,i,a,s,u,c,f){var l=an();try{_.get(e)(t,r,n,o,i,a,s,u,c,f)}catch(e){if(sn(l),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiiifii:function(e,t,r,n,o,i,a,s,u,c){var f=an();try{_.get(e)(t,r,n,o,i,a,s,u,c)}catch(e){if(sn(f),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiiii:function(e,t,r,n,o,i,a,s){var u=an();try{_.get(e)(t,r,n,o,i,a,s)}catch(e){if(sn(u),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiiiii:function(e,t,r,n,o,i,a,s,u){var c=an();try{_.get(e)(t,r,n,o,i,a,s,u)}catch(e){if(sn(c),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiiiiii:function(e,t,r,n,o,i,a,s,u,c){var f=an();try{_.get(e)(t,r,n,o,i,a,s,u,c)}catch(e){if(sn(f),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiiiiiii:function(e,t,r,n,o,i,a,s,u,c,f){var l=an();try{_.get(e)(t,r,n,o,i,a,s,u,c,f)}catch(e){if(sn(l),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viiiiiiiiiiiiiii:function(e,t,r,n,o,i,a,s,u,c,f,l,d,p,h,m){var v=an();try{_.get(e)(t,r,n,o,i,a,s,u,c,f,l,d,p,h,m)}catch(e){if(sn(v),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},invoke_viijii:function(e,t,r,n,o,i,a){var s=an();try{hn(e,t,r,n,o,i,a)}catch(e){if(sn(s),e!==e+0&&"longjmp"!==e)throw e;cn(1,0)}},llvm_eh_typeid_for:function(e){return e},memory:g,mktime:function(e){Oe();var t=new Date(M[e+20>>2]+1900,M[e+16>>2],M[e+12>>2],M[e+8>>2],M[e+4>>2],M[e>>2],0),r=M[e+32>>2],n=t.getTimezoneOffset(),o=new Date(t.getFullYear(),0,1),i=new Date(t.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=Math.min(a,i);if(r<0)M[e+32>>2]=Number(i!=a&&s==n);else if(r>0!=(s==n)){var u=Math.max(a,i),c=r>0?s:u;t.setTime(t.getTime()+6e4*(c-n))}M[e+24>>2]=t.getDay();var f=(t.getTime()-o.getTime())/864e5|0;return M[e+28>>2]=f,t.getTime()/1e3|0},nanosleep:function(e,t){if(0===e)return ve(28),-1;var r=M[e>>2],n=M[e+4>>2];return n<0||n>999999999||r<0?(ve(28),-1):(0!==t&&(M[t>>2]=0,M[t+4>>2]=0),function(e){for(var t=le();le()-t<e/1e3;);}(1e6*r+n/1e3))},pthread_attr_init:function(e){return 0},pthread_attr_setdetachstate:function(){},pthread_create:function(){return 6},pthread_detach:function(){},pthread_join:function(){},pthread_mutexattr_destroy:function(){},pthread_mutexattr_init:function(){},pthread_mutexattr_settype:function(){},sem_destroy:function(){},sem_init:function(){},sem_post:function(){},sem_wait:function(){},setTempRet0:function(e){w(0|e)},strftime:Nr,strftime_l:function(e,t,r,n){return Nr(e,t,r,n)},sysconf:function(e){switch(e){case 30:return 16384;case 85:return 131072;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:case 79:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1e3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return"object"==typeof navigator&&navigator.hardwareConcurrency||1}return ve(28),-1},time:function(e){var t=Date.now()/1e3|0;return e&&(M[e>>2]=t),t}},Vr=(function(){var e={env:qr,wasi_snapshot_preview1:qr};function t(e,t){var r=e.exports;o.asm=r,_=o.asm.__indirect_function_table,ne()}function r(e){t(e.instance)}function n(t){return(m||"function"!=typeof fetch?Promise.resolve().then(fe):fetch(ce,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ce+"'";return e.arrayBuffer()})).catch((function(){return fe()}))).then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){h("failed to asynchronously prepare wasm: "+e),oe(e)}))}if(re(),o.instantiateWasm)try{return o.instantiateWasm(e,t)}catch(e){return h("Module.instantiateWasm callback failed with error: "+e),!1}!function(){if(m||"function"!=typeof WebAssembly.instantiateStreaming||ie(ce)||"function"!=typeof fetch)return n(r);fetch(ce,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return h("wasm streaming compile failed: "+e),h("falling back to ArrayBuffer instantiation"),n(r)}))}))}()}(),o.___wasm_call_ctors=function(){return(Vr=o.___wasm_call_ctors=o.asm.__wasm_call_ctors).apply(null,arguments)}),Yr=o._malloc=function(){return(Yr=o._malloc=o.asm.malloc).apply(null,arguments)},Kr=o._memset=function(){return(Kr=o._memset=o.asm.memset).apply(null,arguments)},Zr=o._free=function(){return(Zr=o._free=o.asm.free).apply(null,arguments)},Xr=o.___errno_location=function(){return(Xr=o.___errno_location=o.asm.__errno_location).apply(null,arguments)},Qr=(o.___em_js__getSelf=function(){return(o.___em_js__getSelf=o.asm.__em_js__getSelf).apply(null,arguments)},o.___em_js__initializeOpenGL=function(){return(o.___em_js__initializeOpenGL=o.asm.__em_js__initializeOpenGL).apply(null,arguments)},o._testSetjmp=function(){return(o._testSetjmp=o.asm.testSetjmp).apply(null,arguments)},o._saveSetjmp=function(){return(o._saveSetjmp=o.asm.saveSetjmp).apply(null,arguments)},o._realloc=function(){return(o._realloc=o.asm.realloc).apply(null,arguments)},o.___getTypeName=function(){return(Qr=o.___getTypeName=o.asm.__getTypeName).apply(null,arguments)}),Jr=(o.___embind_register_native_and_builtin_types=function(){return(o.___embind_register_native_and_builtin_types=o.asm.__embind_register_native_and_builtin_types).apply(null,arguments)},o._htonl=function(){return(Jr=o._htonl=o.asm.htonl).apply(null,arguments)}),en=o._htons=function(){return(en=o._htons=o.asm.htons).apply(null,arguments)},tn=o._ntohs=function(){return(tn=o._ntohs=o.asm.ntohs).apply(null,arguments)},rn=o.__get_tzname=function(){return(rn=o.__get_tzname=o.asm._get_tzname).apply(null,arguments)},nn=o.__get_daylight=function(){return(nn=o.__get_daylight=o.asm._get_daylight).apply(null,arguments)},on=o.__get_timezone=function(){return(on=o.__get_timezone=o.asm._get_timezone).apply(null,arguments)},an=o.stackSave=function(){return(an=o.stackSave=o.asm.stackSave).apply(null,arguments)},sn=o.stackRestore=function(){return(sn=o.stackRestore=o.asm.stackRestore).apply(null,arguments)},un=o.stackAlloc=function(){return(un=o.stackAlloc=o.asm.stackAlloc).apply(null,arguments)},cn=o._setThrew=function(){return(cn=o._setThrew=o.asm.setThrew).apply(null,arguments)},fn=o.__ZSt18uncaught_exceptionv=function(){return(fn=o.__ZSt18uncaught_exceptionv=o.asm._ZSt18uncaught_exceptionv).apply(null,arguments)},ln=o.___cxa_can_catch=function(){return(ln=o.___cxa_can_catch=o.asm.__cxa_can_catch).apply(null,arguments)},dn=o.___cxa_is_pointer_type=function(){return(dn=o.___cxa_is_pointer_type=o.asm.__cxa_is_pointer_type).apply(null,arguments)},pn=o._memalign=function(){return(pn=o._memalign=o.asm.memalign).apply(null,arguments)},hn=(o._emscripten_main_thread_process_queued_calls=function(){return(o._emscripten_main_thread_process_queued_calls=o.asm.emscripten_main_thread_process_queued_calls).apply(null,arguments)},o.dynCall_viijii=function(){return(hn=o.dynCall_viijii=o.asm.dynCall_viijii).apply(null,arguments)}),mn=o.dynCall_iij=function(){return(mn=o.dynCall_iij=o.asm.dynCall_iij).apply(null,arguments)},vn=(o.dynCall_jiji=function(){return(o.dynCall_jiji=o.asm.dynCall_jiji).apply(null,arguments)},o.dynCall_ji=function(){return(vn=o.dynCall_ji=o.asm.dynCall_ji).apply(null,arguments)}),gn=(o.dynCall_viij=function(){return(o.dynCall_viij=o.asm.dynCall_viij).apply(null,arguments)},o.dynCall_ij=function(){return(gn=o.dynCall_ij=o.asm.dynCall_ij).apply(null,arguments)}),_n=(o.dynCall_viji=function(){return(o.dynCall_viji=o.asm.dynCall_viji).apply(null,arguments)},o.dynCall_vijiii=function(){return(o.dynCall_vijiii=o.asm.dynCall_vijiii).apply(null,arguments)},o.dynCall_viiiiij=function(){return(o.dynCall_viiiiij=o.asm.dynCall_viiiiij).apply(null,arguments)},o.dynCall_jii=function(){return(_n=o.dynCall_jii=o.asm.dynCall_jii).apply(null,arguments)}),yn=(o.dynCall_jiiiiii=function(){return(o.dynCall_jiiiiii=o.asm.dynCall_jiiiiii).apply(null,arguments)},o.dynCall_iijj=function(){return(o.dynCall_iijj=o.asm.dynCall_iijj).apply(null,arguments)},o.dynCall_jjj=function(){return(o.dynCall_jjj=o.asm.dynCall_jjj).apply(null,arguments)},o.dynCall_jijii=function(){return(o.dynCall_jijii=o.asm.dynCall_jijii).apply(null,arguments)},o.dynCall_vijii=function(){return(o.dynCall_vijii=o.asm.dynCall_vijii).apply(null,arguments)},o.dynCall_jij=function(){return(o.dynCall_jij=o.asm.dynCall_jij).apply(null,arguments)},o.dynCall_iiiiij=function(){return(yn=o.dynCall_iiiiij=o.asm.dynCall_iiiiij).apply(null,arguments)}),wn=o.dynCall_jiiii=function(){return(wn=o.dynCall_jiiii=o.asm.dynCall_jiiii).apply(null,arguments)};function kn(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function En(e){function r(){Hr||(Hr=!0,o.calledRun=!0,k||(o.noFSInit||Ne.init.initialized||Ne.init(),$e.init(),Xe.root=Ne.mount(Xe,{},null),pe(Z),Ne.ignorePermissions=!1,pe(X),t(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),function(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)e=o.postRun.shift(),Q.unshift(e);var e;pe(Q)}()))}e=e||c,J>0||(function(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)e=o.preRun.shift(),K.unshift(e);var e;pe(K)}(),J>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),r()}),1)):r()))}if(o.dynCall_iiiiijj=function(){return(o.dynCall_iiiiijj=o.asm.dynCall_iiiiijj).apply(null,arguments)},o.dynCall_iiiiiijj=function(){return(o.dynCall_iiiiiijj=o.asm.dynCall_iiiiiijj).apply(null,arguments)},o.___growWasmMemory=function(){return(o.___growWasmMemory=o.asm.__growWasmMemory).apply(null,arguments)},o.UTF8ToString=C,o.stringToUTF8=T,o.lengthBytesUTF8=D,o.FS=Ne,o.allocateUTF8=H,te=function e(){Hr||En(),Hr||(te=e)},o.run=En,o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();function bn(e,t){var r=jn();return(bn=function(t,n){var o=r[t-=120];if(void 0===bn.zrZAZu){var i=function(e){for(var t,r,n="",o="",i=0,a=0;r=e.charAt(a++);~r&&(t=i%4?64*t+r:r,i++%4)?n+=String.fromCharCode(255&t>>(-2*i&6)):0)r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=".indexOf(r);for(var s=0,u=n.length;s<u;s++)o+="%"+("00"+n.charCodeAt(s).toString(16)).slice(-2);return decodeURIComponent(o)},a=function(e,t){var r,n,o=[],a=0,s="";for(e=i(e),n=0;n<256;n++)o[n]=n;for(n=0;n<256;n++)a=(a+o[n]+t.charCodeAt(n%t.length))%256,r=o[n],o[n]=o[a],o[a]=r;n=0,a=0;for(var u=0;u<e.length;u++)a=(a+o[n=(n+1)%256])%256,r=o[n],o[n]=o[a],o[a]=r,s+=String.fromCharCode(e.charCodeAt(u)^o[(o[n]+o[a])%256]);return s};bn.GubglC=a,e=arguments,bn.zrZAZu=!0}var s=r[0],u=t+s,c=e[u];return c?o=c:(void 0===bn.czEGsb&&(bn.czEGsb=!0),o=bn.GubglC(o,n),e[u]=o),o})(e,t)}function jn(){var e=["AmkfW4TXWP7dPM7dQYdcS8oX","hSo0WOBcPCk8u0JcR8ofc8kOtG","AHnRamo0WRyRW5SwECoPASku","EgraWOuJqCkOWQPMWQm","WRpcOxTQWPbocSkQW6pdVsddKSoj","u8kVzmkHWR1RW4/cTa4GdmoGAq","CXDyWQWSpgS","FJ3dHxfdW7jY","v8kWWOuVW73dGcdcGSoPW7vMWP4u","W4dcT8o/W7dcHN9FvmoSWQCBcG","qaqRr3BcJSkTgCopo30","CwvbWOX9dCkTWQjEWP/cSYK","edBdMmk2WRnEW7O","DSoUCg4RWQaxWOxdTIPmWRVdRW","WOvVW63cH8oRW7hdQCk/WOjRusW","WRfsW63cMbFdPNfO","sCoVW5ejW73dPNznW6O","quldK2RdQ8kVWRScwNK","WPHuWO0Nwfau","WQzLW5q3W4ZdGSkhDSkYt1nTsW","qfbEyq5CWR7cHgimfd/dQa","W7amWO3dM1hcVs1zWOZdLmkDW4ddRa","CH0tDbdcSSkHoG"];return(jn=function(){return e})()}v=!0,En(),function(e,t){for(var r=bn,n=e();;)try{if(651182==-parseInt(r(136,"$G1#"))/1+-parseInt(r(125,"8Kl)"))/2+-parseInt(r(121,"KO!6"))/3*(parseInt(r(128,"Pjrq"))/4)+-parseInt(r(132,"JDvi"))/5+-parseInt(r(139,"ZK)f"))/6*(-parseInt(r(142,"!XrX"))/7)+parseInt(r(130,"NKA]"))/8*(parseInt(r(131,"mxB["))/9)+-parseInt(r(138,"5pOz"))/10*(-parseInt(r(122,"gDmO"))/11))break;n.push(n.shift())}catch(e){n.push(n.shift())}}(jn);var ighnua,Cn=(ighnua=!0,function(ovjrup,Euvnak){var Ovjrup=ighnua?function(){if(Euvnak){var Ighnua=Euvnak.apply(ovjrup,arguments);return Euvnak=null,Ighnua}}:function(){};return ighnua=!1,Ovjrup})(this,(function(){var e=function(){return!e.constructor('return /" + this + "/')().constructor("^([^ ]+( +[^ ]+)+)+[^ ]}").test(Cn)};return e()}));return Cn(),e.ready});e.exports=o}]);