]> zoso.dev Git - nemo-wallet.git/commitdiff
Save zxing-wasm so it can be used offline.
authorChris Duncan <chris@zoso.dev>
Wed, 6 Nov 2024 22:44:07 +0000 (14:44 -0800)
committerChris Duncan <chris@zoso.dev>
Wed, 6 Nov 2024 22:44:07 +0000 (14:44 -0800)
LICENSES/MIT.txt [new file with mode: 0644]
nemo-wallet.html
zxing-wasm.js [new file with mode: 0644]

diff --git a/LICENSES/MIT.txt b/LICENSES/MIT.txt
new file mode 100644 (file)
index 0000000..2071b23
--- /dev/null
@@ -0,0 +1,9 @@
+MIT License
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
index d03db15fc86550f97fb201dbe144cb75ec8e2dd7..ba2699de9e5992edcb8e1830e6f09cdf42b8b99e 100644 (file)
@@ -4,7 +4,7 @@
        <meta charset="utf-8" />
        <meta lang="en" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
-       <script src="https://cdn.jsdelivr.net/npm/zxing-wasm@1.3.2/dist/iife/full/index.js"></script>
+       <script src="./zxing-wasm.js"></script>
        <script type="module">
                import { Buffer } from 'https://esm.run/buffer-browser@6.0.4/index.js'
                globalThis.Buffer = Buffer
diff --git a/zxing-wasm.js b/zxing-wasm.js
new file mode 100644 (file)
index 0000000..008b2a6
--- /dev/null
@@ -0,0 +1,7 @@
+// SPDX-FileCopyrightText: 2024 Ze-Zheng Wu <zezhengwu@proton.me>
+// SPDX-License-Identifier: MIT
+// zxing-wasm@1.3.3
+// ZXing-C++ WebAssembly as an ES/CJS module with types
+// https://github.com/Sec-ant/zxing-wasm
+var ZXingWASM=function(A){"use strict";const Dr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataBarLimited","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function nt(v){return v.join("|")}function it(v){const h=ae(v);let C=0,k=Dr.length-1;for(;C<=k;){const c=Math.floor((C+k)/2),I=Dr[c],j=ae(I);if(j===h)return I;j<h?C=c+1:k=c-1}return"None"}function ae(v){return v.toLowerCase().replace(/_-\[\]/g,"")}const at=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function ot(v,h){return v.Binarizer[h]}const st=["Unknown","ASCII","ISO8859_1","ISO8859_2","ISO8859_3","ISO8859_4","ISO8859_5","ISO8859_6","ISO8859_7","ISO8859_8","ISO8859_9","ISO8859_10","ISO8859_11","ISO8859_13","ISO8859_14","ISO8859_15","ISO8859_16","Cp437","Cp1250","Cp1251","Cp1252","Cp1256","Shift_JIS","Big5","GB2312","GB18030","EUC_JP","EUC_KR","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function oe(v,h){return v.CharacterSet[h]}const se=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function ut(v){return se[v.value]}const ct=["Ignore","Read","Require"];function lt(v,h){return v.EanAddOnSymbol[h]}const ft=["Plain","ECI","HRI","Hex","Escaped"];function vt(v,h){return v.TextMode[h]}const rr={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ue(v,h){return{...h,formats:nt(h.formats),binarizer:ot(v,h.binarizer),eanAddOnSymbol:lt(v,h.eanAddOnSymbol),textMode:vt(v,h.textMode),characterSet:oe(v,h.characterSet)}}const dt=[-1,0,1,2,3,4,5,6,7,8],ht=["L","M","Q","H"],Mr={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function pt(v,h){return{...h,characterSet:oe(v,h.characterSet)}}function ce(v){return{...v,format:it(v.format),eccLevel:v.eccLevel,contentType:ut(v.contentType)}}function _t(v){const{image:h,error:C}=v;return h?{image:new Blob([new Uint8Array(h)],{type:"image/png"}),error:""}:{image:null,error:C}}const gt={locateFile:(v,h)=>{const C=v.match(/_(.+?)\.wasm$/);return C?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.3.2/dist/${C[1]}/${v}`:h+v}};let gr=new WeakMap;function mr(v,h){var I;const C=gr.get(v);if(C!=null&&C.modulePromise&&(h===void 0||Object.is(h,C.moduleOverrides)))return C.modulePromise;const k=(I=h!=null?h:C==null?void 0:C.moduleOverrides)!=null?I:gt,c=v({...k});return gr.set(v,{moduleOverrides:k,modulePromise:c}),c}function mt(){gr=new WeakMap}function yt(v,h){gr.set(v,{moduleOverrides:h})}async function $t(v,h,C=rr){const k={...rr,...C},c=await mr(v),{size:I}=h,j=new Uint8Array(await h.arrayBuffer()),G=c._malloc(I);c.HEAPU8.set(j,G);const er=c.readBarcodesFromImage(G,I,ue(c,k));c._free(G);const Z=[];for(let M=0;M<er.size();++M)Z.push(ce(er.get(M)));return Z}async function bt(v,h,C=rr){const k={...rr,...C},c=await mr(v),{data:I,width:j,height:G,data:{byteLength:er}}=h,Z=c._malloc(er);c.HEAPU8.set(I,Z);const M=c.readBarcodesFromPixmap(Z,j,G,ue(c,k));c._free(Z);const ur=[];for(let tr=0;tr<M.size();++tr)ur.push(ce(M.get(tr)));return ur}async function wt(v,h,C=Mr){const k={...Mr,...C},c=await mr(v),I=c.writeBarcodeToImage(h,pt(c,k));return _t(I)}var sr=(()=>{var h;var v=typeof document<"u"&&((h=document.currentScript)==null?void 0:h.tagName.toUpperCase())==="SCRIPT"?document.currentScript.src:void 0;return function(C={}){var k,c=C,I,j,G=new Promise((r,e)=>{I=r,j=e}),er=typeof window=="object",Z=typeof Bun<"u",M=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var ur=Object.assign({},c),tr="./this.program",B="";function St(r){return c.locateFile?c.locateFile(r,B):B+r}var ve,Br;if(er||M||Z){var Hr;M?B=self.location.href:typeof document<"u"&&((Hr=document.currentScript)===null||Hr===void 0?void 0:Hr.tagName.toUpperCase())==="SCRIPT"&&(B=document.currentScript.src),v&&(B=v),B.startsWith("blob:")?B="":B=B.substr(0,B.replace(/[?#].*/,"").lastIndexOf("/")+1),M&&(Br=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),ve=r=>fetch(r,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url)))}var Ft=c.print||console.log.bind(console),nr=c.printErr||console.error.bind(console);Object.assign(c,ur),ur=null,c.arguments&&c.arguments,c.thisProgram&&(tr=c.thisProgram);var yr=c.wasmBinary,$r,de=!1,H,O,ir,cr,Q,w,he,pe;function _e(){var r=$r.buffer;c.HEAP8=H=new Int8Array(r),c.HEAP16=ir=new Int16Array(r),c.HEAPU8=O=new Uint8Array(r),c.HEAPU16=cr=new Uint16Array(r),c.HEAP32=Q=new Int32Array(r),c.HEAPU32=w=new Uint32Array(r),c.HEAPF32=he=new Float32Array(r),c.HEAPF64=pe=new Float64Array(r)}var ge=[],me=[],ye=[];function Rt(){var r=c.preRun;r&&(typeof r=="function"&&(r=[r]),r.forEach(It)),Vr(ge)}function Ot(){Vr(me)}function kt(){var r=c.postRun;r&&(typeof r=="function"&&(r=[r]),r.forEach(jt)),Vr(ye)}function It(r){ge.unshift(r)}function Wt(r){me.unshift(r)}function jt(r){ye.unshift(r)}var q=0,lr=null;function Ut(r){var e;q++,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,q)}function Dt(r){var e;if(q--,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,q),q==0&&lr){var t=lr;lr=null,t()}}function xr(r){var e;(e=c.onAbort)===null||e===void 0||e.call(c,r),r="Aborted("+r+")",nr(r),de=!0,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw j(t),t}var Mt="data:application/octet-stream;base64,",$e=r=>r.startsWith(Mt);function Bt(){var r="zxing_full.wasm";return $e(r)?r:St(r)}var br;function be(r){if(r==br&&yr)return new Uint8Array(yr);if(Br)return Br(r);throw"both async and sync fetching of the wasm failed"}function Ht(r){return yr?Promise.resolve().then(()=>be(r)):ve(r).then(e=>new Uint8Array(e),()=>be(r))}function we(r,e,t){return Ht(r).then(n=>WebAssembly.instantiate(n,e)).then(t,n=>{nr(`failed to asynchronously prepare wasm: ${n}`),xr(n)})}function xt(r,e,t,n){return!r&&typeof WebAssembly.instantiateStreaming=="function"&&!$e(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(i=>{var a=WebAssembly.instantiateStreaming(i,t);return a.then(n,function(s){return nr(`wasm streaming compile failed: ${s}`),nr("falling back to ArrayBuffer instantiation"),we(e,t,n)})}):we(e,t,n)}function Vt(){return{a:ki}}function Lt(){var r,e=Vt();function t(i,a){return P=i.exports,$r=P.za,_e(),ke=P.Da,Wt(P.Aa),Dt(),P}Ut();function n(i){t(i.instance)}if(c.instantiateWasm)try{return c.instantiateWasm(e,t)}catch(i){nr(`Module.instantiateWasm callback failed with error: ${i}`),j(i)}return(r=br)!==null&&r!==void 0||(br=Bt()),xt(yr,br,e,n).catch(j),{}}var Vr=r=>{r.forEach(e=>e(c))};c.noExitRuntime;var g=r=>Ne(r),m=()=>ze(),wr=[],Cr=0,Nt=r=>{var e=new Lr(r);return e.get_caught()||(e.set_caught(!0),Cr--),e.set_rethrown(!1),wr.push(e),Ze(r),Ve(r)},V=0,zt=()=>{p(0,0);var r=wr.pop();Xe(r.excPtr),V=0};class Lr{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){w[this.ptr+4>>2]=e}get_type(){return w[this.ptr+4>>2]}set_destructor(e){w[this.ptr+8>>2]=e}get_destructor(){return w[this.ptr+8>>2]}set_caught(e){e=e?1:0,H[this.ptr+12]=e}get_caught(){return H[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,H[this.ptr+13]=e}get_rethrown(){return H[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){w[this.ptr+16>>2]=e}get_adjusted_ptr(){return w[this.ptr+16>>2]}}var Xt=r=>{throw V||(V=r),V},Tr=r=>Le(r),Nr=r=>{var e=V;if(!e)return Tr(0),0;var t=new Lr(e);t.set_adjusted_ptr(e);var n=t.get_type();if(!n)return Tr(0),e;for(var i of r){if(i===0||i===n)break;var a=t.ptr+16;if(Ge(i,n,a))return Tr(i),e}return Tr(n),e},Zt=()=>Nr([]),Gt=r=>Nr([r]),Qt=(r,e)=>Nr([r,e]),qt=()=>{var r=wr.pop();r||xr("no exception to throw");var e=r.excPtr;throw r.get_rethrown()||(wr.push(r),r.set_rethrown(!0),r.set_caught(!1),Cr++),V=e,V},Jt=(r,e,t)=>{var n=new Lr(r);throw n.init(e,t),V=r,Cr++,V},Kt=()=>Cr,Yt=()=>{xr("")},Pr={},zr=r=>{for(;r.length;){var e=r.pop(),t=r.pop();t(e)}};function fr(r){return this.fromWireType(w[r>>2])}var ar={},J={},Ar={},Ce,Er=r=>{throw new Ce(r)},K=(r,e,t)=>{r.forEach(o=>Ar[o]=e);function n(o){var u=t(o);u.length!==r.length&&Er("Mismatched type converter count");for(var l=0;l<r.length;++l)U(r[l],u[l])}var i=new Array(e.length),a=[],s=0;e.forEach((o,u)=>{J.hasOwnProperty(o)?i[u]=J[o]:(a.push(o),ar.hasOwnProperty(o)||(ar[o]=[]),ar[o].push(()=>{i[u]=J[o],++s,s===a.length&&n(i)}))}),a.length===0&&n(i)},rn=r=>{var e=Pr[r];delete Pr[r];var t=e.rawConstructor,n=e.rawDestructor,i=e.fields,a=i.map(s=>s.getterReturnType).concat(i.map(s=>s.setterArgumentType));K([r],a,s=>{var o={};return i.forEach((u,l)=>{var f=u.fieldName,d=s[l],_=u.getter,b=u.getterContext,T=s[l+i.length],F=u.setter,E=u.setterContext;o[f]={read:S=>d.fromWireType(_(b,S)),write:(S,Y)=>{var W=[];F(E,S,T.toWireType(W,Y)),zr(W)}}}),[{name:e.name,fromWireType:u=>{var l={};for(var f in o)l[f]=o[f].read(u);return n(u),l},toWireType:(u,l)=>{for(var f in o)if(!(f in l))throw new TypeError(`Missing field: "${f}"`);var d=t();for(f in o)o[f].write(d,l[f]);return u!==null&&u.push(n,d),d},argPackAdvance:x,readValueFromPointer:fr,destructorFunction:n}]})},en=(r,e,t,n,i)=>{},tn=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);Te=r},Te,R=r=>{for(var e="",t=r;O[t];)e+=Te[O[t++]];return e},or,$=r=>{throw new or(r)};function nn(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(r||$(`type "${n}" must have a positive integer typeid pointer`),J.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;$(`Cannot register type '${n}' twice`)}if(J[r]=e,delete Ar[r],ar.hasOwnProperty(r)){var i=ar[r];delete ar[r],i.forEach(a=>a())}}function U(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return nn(r,e,t)}var x=8,an=(r,e,t,n)=>{e=R(e),U(r,{name:e,fromWireType:function(i){return!!i},toWireType:function(i,a){return a?t:n},argPackAdvance:x,readValueFromPointer:function(i){return this.fromWireType(O[i])},destructorFunction:null})},on=r=>({count:r.count,deleteScheduled:r.deleteScheduled,preservePointerOnDelete:r.preservePointerOnDelete,ptr:r.ptr,ptrType:r.ptrType,smartPtr:r.smartPtr,smartPtrType:r.smartPtrType}),Xr=r=>{function e(t){return t.$$.ptrType.registeredClass.name}$(e(r)+" instance already deleted")},Zr=!1,Pe=r=>{},sn=r=>{r.smartPtr?r.smartPtrType.rawDestructor(r.smartPtr):r.ptrType.registeredClass.rawDestructor(r.ptr)},Ae=r=>{r.count.value-=1;var e=r.count.value===0;e&&sn(r)},Ee=(r,e,t)=>{if(e===t)return r;if(t.baseClass===void 0)return null;var n=Ee(r,e,t.baseClass);return n===null?null:t.downcast(n)},Se={},un={},cn=(r,e)=>{for(e===void 0&&$("ptr should not be undefined");r.baseClass;)e=r.upcast(e),r=r.baseClass;return e},ln=(r,e)=>(e=cn(r,e),un[e]),Sr=(r,e)=>{(!e.ptrType||!e.ptr)&&Er("makeClassHandle requires ptr and ptrType");var t=!!e.smartPtrType,n=!!e.smartPtr;return t!==n&&Er("Both smartPtrType and smartPtr must be specified"),e.count={value:1},vr(Object.create(r,{$$:{value:e,writable:!0}}))};function fn(r){var e=this.getPointee(r);if(!e)return this.destructor(r),null;var t=ln(this.registeredClass,e);if(t!==void 0){if(t.$$.count.value===0)return t.$$.ptr=e,t.$$.smartPtr=r,t.clone();var n=t.clone();return this.destructor(r),n}function i(){return this.isSmartPointer?Sr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:r}):Sr(this.registeredClass.instancePrototype,{ptrType:this,ptr:r})}var a=this.registeredClass.getActualType(e),s=Se[a];if(!s)return i.call(this);var o;this.isConst?o=s.constPointerType:o=s.pointerType;var u=Ee(e,this.registeredClass,o.registeredClass);return u===null?i.call(this):this.isSmartPointer?Sr(o.registeredClass.instancePrototype,{ptrType:o,ptr:u,smartPtrType:this,smartPtr:r}):Sr(o.registeredClass.instancePrototype,{ptrType:o,ptr:u})}var vr=r=>typeof FinalizationRegistry>"u"?(vr=e=>e,r):(Zr=new FinalizationRegistry(e=>{Ae(e.$$)}),vr=e=>{var t=e.$$,n=!!t.smartPtr;if(n){var i={$$:t};Zr.register(e,i,e)}return e},Pe=e=>Zr.unregister(e),vr(r)),Fr=[],vn=()=>{for(;Fr.length;){var r=Fr.pop();r.$$.deleteScheduled=!1,r.delete()}},Fe,dn=()=>{Object.assign(Rr.prototype,{isAliasOf(r){if(!(this instanceof Rr)||!(r instanceof Rr))return!1;var e=this.$$.ptrType.registeredClass,t=this.$$.ptr;r.$$=r.$$;for(var n=r.$$.ptrType.registeredClass,i=r.$$.ptr;e.baseClass;)t=e.upcast(t),e=e.baseClass;for(;n.baseClass;)i=n.upcast(i),n=n.baseClass;return e===n&&t===i},clone(){if(this.$$.ptr||Xr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=vr(Object.create(Object.getPrototypeOf(this),{$$:{value:on(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||Xr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$("Object already scheduled for deletion"),Pe(this),Ae(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Xr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$("Object already scheduled for deletion"),Fr.push(this),Fr.length===1&&Fe&&Fe(vn),this.$$.deleteScheduled=!0,this}})};function Rr(){}var dr=(r,e)=>Object.defineProperty(e,"name",{value:r}),Re=(r,e,t)=>{if(r[e].overloadTable===void 0){var n=r[e];r[e]=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r[e].overloadTable.hasOwnProperty(a.length)||$(`Function '${t}' called with an invalid number of arguments (${a.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[a.length].apply(this,a)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Gr=(r,e,t)=>{c.hasOwnProperty(r)?((t===void 0||c[r].overloadTable!==void 0&&c[r].overloadTable[t]!==void 0)&&$(`Cannot register public name '${r}' twice`),Re(c,r,r),c.hasOwnProperty(t)&&$(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),c[r].overloadTable[t]=e):(c[r]=e,t!==void 0&&(c[r].numArguments=t))},hn=48,pn=57,_n=r=>{r=r.replace(/[^a-zA-Z0-9_]/g,"$");var e=r.charCodeAt(0);return e>=hn&&e<=pn?`_${r}`:r};function gn(r,e,t,n,i,a,s,o){this.name=r,this.constructor=e,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=i,this.getActualType=a,this.upcast=s,this.downcast=o,this.pureVirtualFunctions=[]}var Qr=(r,e,t)=>{for(;e!==t;)e.upcast||$(`Expected null or instance of ${t.name}, got an instance of ${e.name}`),r=e.upcast(r),e=e.baseClass;return r};function mn(r,e){if(e===null)return this.isReference&&$(`null is not a valid ${this.name}`),0;e.$$||$(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||$(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=e.$$.ptrType.registeredClass,n=Qr(e.$$.ptr,t,this.registeredClass);return n}function yn(r,e){var t;if(e===null)return this.isReference&&$(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),r!==null&&r.push(this.rawDestructor,t),t):0;(!e||!e.$$)&&$(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||$(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&$(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(t=Qr(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&$("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?t=e.$$.smartPtr:$(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)t=e.$$.smartPtr;else{var i=e.clone();t=this.rawShare(t,N.toHandle(()=>i.delete())),r!==null&&r.push(this.rawDestructor,t)}break;default:$("Unsupporting sharing policy")}return t}function $n(r,e){if(e===null)return this.isReference&&$(`null is not a valid ${this.name}`),0;e.$$||$(`Cannot pass "${ee(e)}" as a ${this.name}`),e.$$.ptr||$(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&$(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var t=e.$$.ptrType.registeredClass,n=Qr(e.$$.ptr,t,this.registeredClass);return n}var bn=()=>{Object.assign(Or.prototype,{getPointee(r){return this.rawGetPointee&&(r=this.rawGetPointee(r)),r},destructor(r){var e;(e=this.rawDestructor)===null||e===void 0||e.call(this,r)},argPackAdvance:x,readValueFromPointer:fr,fromWireType:fn})};function Or(r,e,t,n,i,a,s,o,u,l,f){this.name=r,this.registeredClass=e,this.isReference=t,this.isConst=n,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=s,this.rawGetPointee=o,this.rawConstructor=u,this.rawShare=l,this.rawDestructor=f,!i&&e.baseClass===void 0?n?(this.toWireType=mn,this.destructorFunction=null):(this.toWireType=$n,this.destructorFunction=null):this.toWireType=yn}var Oe=(r,e,t)=>{c.hasOwnProperty(r)||Er("Replacing nonexistent public symbol"),c[r].overloadTable!==void 0&&t!==void 0?c[r].overloadTable[t]=e:(c[r]=e,c[r].argCount=t)},wn=(r,e,t)=>{r=r.replace(/p/g,"i");var n=c["dynCall_"+r];return n(e,...t)},kr=[],ke,y=r=>{var e=kr[r];return e||(r>=kr.length&&(kr.length=r+1),kr[r]=e=ke.get(r)),e},Cn=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.includes("j"))return wn(r,e,t);var n=y(e)(...t);return n},Tn=(r,e)=>function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return Cn(r,e,n)},D=(r,e)=>{r=R(r);function t(){return r.includes("j")?Tn(r,e):y(e)}var n=t();return typeof n!="function"&&$(`unknown function pointer with signature ${r}: ${e}`),n},Pn=(r,e)=>{var t=dr(e,function(n){this.name=e,this.message=n;var i=new Error(n).stack;i!==void 0&&(this.stack=this.toString()+`
+`+i.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},t},Ie,We=r=>{var e=xe(r),t=R(e);return z(e),t},Ir=(r,e)=>{var t=[],n={};function i(a){if(!n[a]&&!J[a]){if(Ar[a]){Ar[a].forEach(i);return}t.push(a),n[a]=!0}}throw e.forEach(i),new Ie(`${r}: `+t.map(We).join([", "]))},An=(r,e,t,n,i,a,s,o,u,l,f,d,_)=>{f=R(f),a=D(i,a),o&&(o=D(s,o)),l&&(l=D(u,l)),_=D(d,_);var b=_n(f);Gr(b,function(){Ir(`Cannot construct ${f} due to unbound types`,[n])}),K([r,e,t],n?[n]:[],T=>{T=T[0];var F,E;n?(F=T.registeredClass,E=F.instancePrototype):E=Rr.prototype;var S=dr(f,function(){if(Object.getPrototypeOf(this)!==Y)throw new or("Use 'new' to construct "+f);if(W.constructor_body===void 0)throw new or(f+" has no accessible constructor");for(var et=arguments.length,jr=new Array(et),Ur=0;Ur<et;Ur++)jr[Ur]=arguments[Ur];var tt=W.constructor_body[jr.length];if(tt===void 0)throw new or(`Tried to invoke ctor of ${f} with invalid number of parameters (${jr.length}) - expected (${Object.keys(W.constructor_body).toString()}) parameters instead!`);return tt.apply(this,jr)}),Y=Object.create(E,{constructor:{value:S}});S.prototype=Y;var W=new gn(f,S,Y,_,F,a,o,l);if(W.baseClass){var X,_r;(_r=(X=W.baseClass).__derivedClasses)!==null&&_r!==void 0||(X.__derivedClasses=[]),W.baseClass.__derivedClasses.push(W)}var da=new Or(f,W,!0,!1,!1),Ye=new Or(f+"*",W,!1,!1,!1),rt=new Or(f+" const*",W,!1,!0,!1);return Se[r]={pointerType:Ye,constPointerType:rt},Oe(b,S),[da,Ye,rt]})},qr=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(w[e+n*4>>2]);return t};function En(r){for(var e=1;e<r.length;++e)if(r[e]!==null&&r[e].destructorFunction===void 0)return!0;return!1}function Jr(r,e,t,n,i,a){var s=e.length;s<2&&$("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=e[1]!==null&&t!==null,u=En(e),l=e[0].name!=="void",f=s-2,d=new Array(f),_=[],b=[],T=function(){b.length=0;var F;_.length=o?2:1,_[0]=i,o&&(F=e[1].toWireType(b,this),_[1]=F);for(var E=0;E<f;++E)d[E]=e[E+2].toWireType(b,E<0||arguments.length<=E?void 0:arguments[E]),_.push(d[E]);var S=n(..._);function Y(W){if(u)zr(b);else for(var X=o?1:2;X<e.length;X++){var _r=X===1?F:d[X-2];e[X].destructorFunction!==null&&e[X].destructorFunction(_r)}if(l)return e[0].fromWireType(W)}return Y(S)};return dr(r,T)}var Sn=(r,e,t,n,i,a)=>{var s=qr(e,t);i=D(n,i),K([],[r],o=>{o=o[0];var u=`constructor ${o.name}`;if(o.registeredClass.constructor_body===void 0&&(o.registeredClass.constructor_body=[]),o.registeredClass.constructor_body[e-1]!==void 0)throw new or(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${o.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return o.registeredClass.constructor_body[e-1]=()=>{Ir(`Cannot construct ${o.name} due to unbound types`,s)},K([],s,l=>(l.splice(1,0,null),o.registeredClass.constructor_body[e-1]=Jr(u,l,null,i,a),[])),[]})},je=r=>{r=r.trim();const e=r.indexOf("(");return e!==-1?r.substr(0,e):r},Fn=(r,e,t,n,i,a,s,o,u,l)=>{var f=qr(t,n);e=R(e),e=je(e),a=D(i,a),K([],[r],d=>{d=d[0];var _=`${d.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),o&&d.registeredClass.pureVirtualFunctions.push(e);function b(){Ir(`Cannot call ${_} due to unbound types`,f)}var T=d.registeredClass.instancePrototype,F=T[e];return F===void 0||F.overloadTable===void 0&&F.className!==d.name&&F.argCount===t-2?(b.argCount=t-2,b.className=d.name,T[e]=b):(Re(T,e,_),T[e].overloadTable[t-2]=b),K([],f,E=>{var S=Jr(_,E,d,a,s);return T[e].overloadTable===void 0?(S.argCount=t-2,T[e]=S):T[e].overloadTable[t-2]=S,[]}),[]})},Kr=[],L=[],Yr=r=>{r>9&&--L[r+1]===0&&(L[r]=void 0,Kr.push(r))},Rn=()=>L.length/2-5-Kr.length,On=()=>{L.push(0,1,void 0,1,null,1,!0,1,!1,1),c.count_emval_handles=Rn},N={toValue:r=>(r||$("Cannot use deleted val. handle = "+r),L[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=Kr.pop()||L.length;return L[e]=r,L[e+1]=1,e}}}},Ue={name:"emscripten::val",fromWireType:r=>{var e=N.toValue(r);return Yr(r),e},toWireType:(r,e)=>N.toHandle(e),argPackAdvance:x,readValueFromPointer:fr,destructorFunction:null},kn=r=>U(r,Ue),In=(r,e,t)=>{switch(e){case 1:return t?function(n){return this.fromWireType(H[n])}:function(n){return this.fromWireType(O[n])};case 2:return t?function(n){return this.fromWireType(ir[n>>1])}:function(n){return this.fromWireType(cr[n>>1])};case 4:return t?function(n){return this.fromWireType(Q[n>>2])}:function(n){return this.fromWireType(w[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},Wn=(r,e,t,n)=>{e=R(e);function i(){}i.values={},U(r,{name:e,constructor:i,fromWireType:function(a){return this.constructor.values[a]},toWireType:(a,s)=>s.value,argPackAdvance:x,readValueFromPointer:In(e,t,n),destructorFunction:null}),Gr(e,i)},re=(r,e)=>{var t=J[r];return t===void 0&&$(`${e} has unknown type ${We(r)}`),t},jn=(r,e,t)=>{var n=re(r,"enum");e=R(e);var i=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:dr(`${n.name}_${e}`,function(){})}});i.values[t]=a,i[e]=a},ee=r=>{if(r===null)return"null";var e=typeof r;return e==="object"||e==="array"||e==="function"?r.toString():""+r},Un=(r,e)=>{switch(e){case 4:return function(t){return this.fromWireType(he[t>>2])};case 8:return function(t){return this.fromWireType(pe[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},Dn=(r,e,t)=>{e=R(e),U(r,{name:e,fromWireType:n=>n,toWireType:(n,i)=>i,argPackAdvance:x,readValueFromPointer:Un(e,t),destructorFunction:null})},Mn=(r,e,t,n,i,a,s,o)=>{var u=qr(e,t);r=R(r),r=je(r),i=D(n,i),Gr(r,function(){Ir(`Cannot call ${r} due to unbound types`,u)},e-1),K([],u,l=>{var f=[l[0],null].concat(l.slice(1));return Oe(r,Jr(r,f,null,i,a),e-1),[]})},Bn=(r,e,t)=>{switch(e){case 1:return t?n=>H[n]:n=>O[n];case 2:return t?n=>ir[n>>1]:n=>cr[n>>1];case 4:return t?n=>Q[n>>2]:n=>w[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},Hn=(r,e,t,n,i)=>{e=R(e);var a=f=>f;if(n===0){var s=32-8*t;a=f=>f<<s>>>s}var o=e.includes("unsigned"),u=(f,d)=>{},l;o?l=function(f,d){return u(d,this.name),d>>>0}:l=function(f,d){return u(d,this.name),d},U(r,{name:e,fromWireType:a,toWireType:l,argPackAdvance:x,readValueFromPointer:Bn(e,t,n!==0),destructorFunction:null})},xn=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],i=n[e];function a(s){var o=w[s>>2],u=w[s+4>>2];return new i(H.buffer,u,o)}t=R(t),U(r,{name:t,fromWireType:a,argPackAdvance:x,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},Vn=Object.assign({optional:!0},Ue),Ln=(r,e)=>{U(r,Vn)},Nn=(r,e,t,n)=>{if(!(n>0))return 0;for(var i=t,a=t+n-1,s=0;s<r.length;++s){var o=r.charCodeAt(s);if(o>=55296&&o<=57343){var u=r.charCodeAt(++s);o=65536+((o&1023)<<10)|u&1023}if(o<=127){if(t>=a)break;e[t++]=o}else if(o<=2047){if(t+1>=a)break;e[t++]=192|o>>6,e[t++]=128|o&63}else if(o<=65535){if(t+2>=a)break;e[t++]=224|o>>12,e[t++]=128|o>>6&63,e[t++]=128|o&63}else{if(t+3>=a)break;e[t++]=240|o>>18,e[t++]=128|o>>12&63,e[t++]=128|o>>6&63,e[t++]=128|o&63}}return e[t]=0,t-i},hr=(r,e,t)=>Nn(r,O,e,t),zn=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},De=typeof TextDecoder<"u"?new TextDecoder:void 0,Me=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN;for(var n=e+t,i=e;r[i]&&!(i>=n);)++i;if(i-e>16&&r.buffer&&De)return De.decode(r.subarray(e,i));for(var a="";e<i;){var s=r[e++];if(!(s&128)){a+=String.fromCharCode(s);continue}var o=r[e++]&63;if((s&224)==192){a+=String.fromCharCode((s&31)<<6|o);continue}var u=r[e++]&63;if((s&240)==224?s=(s&15)<<12|o<<6|u:s=(s&7)<<18|o<<12|u<<6|r[e++]&63,s<65536)a+=String.fromCharCode(s);else{var l=s-65536;a+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return a},Xn=(r,e)=>r?Me(O,r,e):"",Zn=(r,e)=>{e=R(e);var t=e==="std::string";U(r,{name:e,fromWireType(n){var i=w[n>>2],a=n+4,s;if(t)for(var o=a,u=0;u<=i;++u){var l=a+u;if(u==i||O[l]==0){var f=l-o,d=Xn(o,f);s===void 0?s=d:(s+="\0",s+=d),o=l+1}}else{for(var _=new Array(i),u=0;u<i;++u)_[u]=String.fromCharCode(O[a+u]);s=_.join("")}return z(n),s},toWireType(n,i){i instanceof ArrayBuffer&&(i=new Uint8Array(i));var a,s=typeof i=="string";s||i instanceof Uint8Array||i instanceof Uint8ClampedArray||i instanceof Int8Array||$("Cannot pass non-string to std::string"),t&&s?a=zn(i):a=i.length;var o=ie(4+a+1),u=o+4;if(w[o>>2]=a,t&&s)hr(i,u,a+1);else if(s)for(var l=0;l<a;++l){var f=i.charCodeAt(l);f>255&&(z(u),$("String has UTF-16 code units that do not fit in 8 bits")),O[u+l]=f}else for(var l=0;l<a;++l)O[u+l]=i[l];return n!==null&&n.push(z,o),o},argPackAdvance:x,readValueFromPointer:fr,destructorFunction(n){z(n)}})},Be=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Gn=(r,e)=>{for(var t=r,n=t>>1,i=n+e/2;!(n>=i)&&cr[n];)++n;if(t=n<<1,t-r>32&&Be)return Be.decode(O.subarray(r,t));for(var a="",s=0;!(s>=e/2);++s){var o=ir[r+s*2>>1];if(o==0)break;a+=String.fromCharCode(o)}return a},Qn=(r,e,t)=>{var n;if((n=t)!==null&&n!==void 0||(t=2147483647),t<2)return 0;t-=2;for(var i=e,a=t<r.length*2?t/2:r.length,s=0;s<a;++s){var o=r.charCodeAt(s);ir[e>>1]=o,e+=2}return ir[e>>1]=0,e-i},qn=r=>r.length*2,Jn=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var i=Q[r+t*4>>2];if(i==0)break;if(++t,i>=65536){var a=i-65536;n+=String.fromCharCode(55296|a>>10,56320|a&1023)}else n+=String.fromCharCode(i)}return n},Kn=(r,e,t)=>{var n;if((n=t)!==null&&n!==void 0||(t=2147483647),t<4)return 0;for(var i=e,a=i+t-4,s=0;s<r.length;++s){var o=r.charCodeAt(s);if(o>=55296&&o<=57343){var u=r.charCodeAt(++s);o=65536+((o&1023)<<10)|u&1023}if(Q[e>>2]=o,e+=4,e+4>a)break}return Q[e>>2]=0,e-i},Yn=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},ri=(r,e,t)=>{t=R(t);var n,i,a,s;e===2?(n=Gn,i=Qn,s=qn,a=o=>cr[o>>1]):e===4&&(n=Jn,i=Kn,s=Yn,a=o=>w[o>>2]),U(r,{name:t,fromWireType:o=>{for(var u=w[o>>2],l,f=o+4,d=0;d<=u;++d){var _=o+4+d*e;if(d==u||a(_)==0){var b=_-f,T=n(f,b);l===void 0?l=T:(l+="\0",l+=T),f=_+e}}return z(o),l},toWireType:(o,u)=>{typeof u!="string"&&$(`Cannot pass non-string to C++ string type ${t}`);var l=s(u),f=ie(4+l+e);return w[f>>2]=l/e,i(u,f+4,l+e),o!==null&&o.push(z,f),f},argPackAdvance:x,readValueFromPointer:fr,destructorFunction(o){z(o)}})},ei=(r,e,t,n,i,a)=>{Pr[r]={name:R(e),rawConstructor:D(t,n),rawDestructor:D(i,a),fields:[]}},ti=(r,e,t,n,i,a,s,o,u,l)=>{Pr[r].fields.push({fieldName:R(e),getterReturnType:t,getter:D(n,i),getterContext:a,setterArgumentType:s,setter:D(o,u),setterContext:l})},ni=(r,e)=>{e=R(e),U(r,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(t,n)=>{}})},ii=(r,e,t)=>O.copyWithin(r,e,e+t),te=[],ai=(r,e,t,n)=>(r=te[r],e=N.toValue(e),r(null,e,t,n)),oi={},si=r=>{var e=oi[r];return e===void 0?R(r):e},He=()=>{if(typeof globalThis=="object")return globalThis;function r(e){e.$$$embind_global$$$=e;var t=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return t||delete e.$$$embind_global$$$,t}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&r(global)?$$$embind_global$$$=global:typeof self=="object"&&r(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},ui=r=>r===0?N.toHandle(He()):(r=si(r),N.toHandle(He()[r])),ci=r=>{var e=te.length;return te.push(r),e},li=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=re(w[e+n*4>>2],"parameter "+n);return t},fi=Reflect.construct,vi=(r,e,t)=>{var n=[],i=r.toWireType(n,t);return n.length&&(w[e>>2]=N.toHandle(n)),i},di=(r,e,t)=>{var n=li(r,e),i=n.shift();r--;var a=new Array(r),s=(u,l,f,d)=>{for(var _=0,b=0;b<r;++b)a[b]=n[b].readValueFromPointer(d+_),_+=n[b].argPackAdvance;var T=t===1?fi(l,a):l.apply(u,a);return vi(i,f,T)},o=`methodCaller<(${n.map(u=>u.name).join(", ")}) => ${i.name}>`;return ci(dr(o,s))},hi=r=>{r>9&&(L[r+1]+=1)},pi=r=>{var e=N.toValue(r);zr(e),Yr(r)},_i=(r,e)=>{r=re(r,"_emval_take_value");var t=r.readValueFromPointer(e);return N.toHandle(t)},gi=(r,e,t,n)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),s=new Date(i,6,1),o=a.getTimezoneOffset(),u=s.getTimezoneOffset(),l=Math.max(o,u);w[r>>2]=l*60,Q[e>>2]=+(o!=u);var f=b=>{var T=b>=0?"-":"+",F=Math.abs(b),E=String(Math.floor(F/60)).padStart(2,"0"),S=String(F%60).padStart(2,"0");return`UTC${T}${E}${S}`},d=f(o),_=f(u);u<o?(hr(d,t,17),hr(_,n,17)):(hr(d,n,17),hr(_,t,17))},mi=()=>2147483648,yi=(r,e)=>Math.ceil(r/e)*e,$i=r=>{var e=$r.buffer,t=(r-e.byteLength+65535)/65536|0;try{return $r.grow(t),_e(),1}catch{}},bi=r=>{var e=O.length;r>>>=0;var t=mi();if(r>t)return!1;for(var n=1;n<=4;n*=2){var i=e*(1+.2/n);i=Math.min(i,r+100663296);var a=Math.min(t,yi(Math.max(r,i),65536)),s=$i(a);if(s)return!0}return!1},ne={},wi=()=>tr||"./this.program",pr=()=>{if(!pr.strings){var r=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:wi()};for(var t in ne)ne[t]===void 0?delete e[t]:e[t]=ne[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);pr.strings=n}return pr.strings},Ci=(r,e)=>{for(var t=0;t<r.length;++t)H[e++]=r.charCodeAt(t);H[e]=0},Ti=(r,e)=>{var t=0;return pr().forEach((n,i)=>{var a=e+t;w[r+i*4>>2]=a,Ci(n,a),t+=n.length+1}),0},Pi=(r,e)=>{var t=pr();w[r>>2]=t.length;var n=0;return t.forEach(i=>n+=i.length+1),w[e>>2]=n,0},Ai=r=>52;function Ei(r,e,t,n,i){return 70}var Si=[null,[],[]],Fi=(r,e)=>{var t=Si[r];e===0||e===10?((r===1?Ft:nr)(Me(t)),t.length=0):t.push(e)},Ri=(r,e,t,n)=>{for(var i=0,a=0;a<t;a++){var s=w[e>>2],o=w[e+4>>2];e+=8;for(var u=0;u<o;u++)Fi(r,O[s+u]);i+=o}return w[n>>2]=i,0},Oi=r=>r;Ce=c.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},tn(),or=c.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},dn(),bn(),Ie=c.UnboundTypeError=Pn(Error,"UnboundTypeError"),On();var ki={t:Nt,x:zt,a:Zt,j:Gt,k:Qt,Q:qt,r:Jt,ia:Kt,d:Xt,ea:Yt,wa:rn,da:en,qa:an,ua:An,ta:Sn,G:Fn,pa:kn,H:Wn,q:jn,Y:Dn,S:Mn,z:Hn,v:xn,va:Ln,W:Zn,R:ri,E:ei,xa:ti,ra:ni,la:ii,V:ai,ya:Yr,_:ui,X:di,Z:hi,$:pi,sa:_i,fa:gi,ja:bi,ga:Ti,ha:Pi,ka:Ai,ba:Ei,U:Ri,L:Yi,D:ea,N:Di,T:ua,s:Qi,b:Ii,F:Ki,na,c:Bi,ma:ia,i:Ui,h:Ni,n:zi,P:Ji,w:Xi,K:oa,M:qi,B:ta,J:ca,ca:fa,aa:va,m:Hi,g:Mi,e:ji,f:Wi,O:sa,l:Vi,oa:ra,o:xi,u:Zi,y:Gi,C:aa,p:Li,I:la,A:Oi},P=Lt(),xe=r=>(xe=P.Ba)(r),z=c._free=r=>(z=c._free=P.Ca)(r),ie=c._malloc=r=>(ie=c._malloc=P.Ea)(r),Ve=r=>(Ve=P.Fa)(r),p=(r,e)=>(p=P.Ga)(r,e),Le=r=>(Le=P.Ha)(r),Ne=r=>(Ne=P.Ia)(r),ze=()=>(ze=P.Ja)(),Xe=r=>(Xe=P.Ka)(r),Ze=r=>(Ze=P.La)(r),Ge=(r,e,t)=>(Ge=P.Ma)(r,e,t);c.dynCall_viijii=(r,e,t,n,i,a,s)=>(c.dynCall_viijii=P.Na)(r,e,t,n,i,a,s);var Qe=c.dynCall_jiii=(r,e,t,n)=>(Qe=c.dynCall_jiii=P.Oa)(r,e,t,n);c.dynCall_jiji=(r,e,t,n,i)=>(c.dynCall_jiji=P.Pa)(r,e,t,n,i);var qe=c.dynCall_jiiii=(r,e,t,n,i)=>(qe=c.dynCall_jiiii=P.Qa)(r,e,t,n,i);c.dynCall_iiiiij=(r,e,t,n,i,a,s)=>(c.dynCall_iiiiij=P.Ra)(r,e,t,n,i,a,s),c.dynCall_iiiiijj=(r,e,t,n,i,a,s,o,u)=>(c.dynCall_iiiiijj=P.Sa)(r,e,t,n,i,a,s,o,u),c.dynCall_iiiiiijj=(r,e,t,n,i,a,s,o,u,l)=>(c.dynCall_iiiiiijj=P.Ta)(r,e,t,n,i,a,s,o,u,l);function Ii(r,e){var t=m();try{return y(r)(e)}catch(n){if(g(t),n!==n+0)throw n;p(1,0)}}function Wi(r,e,t,n){var i=m();try{y(r)(e,t,n)}catch(a){if(g(i),a!==a+0)throw a;p(1,0)}}function ji(r,e,t){var n=m();try{y(r)(e,t)}catch(i){if(g(n),i!==i+0)throw i;p(1,0)}}function Ui(r,e,t,n){var i=m();try{return y(r)(e,t,n)}catch(a){if(g(i),a!==a+0)throw a;p(1,0)}}function Di(r,e,t,n,i){var a=m();try{return y(r)(e,t,n,i)}catch(s){if(g(a),s!==s+0)throw s;p(1,0)}}function Mi(r,e){var t=m();try{y(r)(e)}catch(n){if(g(t),n!==n+0)throw n;p(1,0)}}function Bi(r,e,t){var n=m();try{return y(r)(e,t)}catch(i){if(g(n),i!==i+0)throw i;p(1,0)}}function Hi(r){var e=m();try{y(r)()}catch(t){if(g(e),t!==t+0)throw t;p(1,0)}}function xi(r,e,t,n,i,a){var s=m();try{y(r)(e,t,n,i,a)}catch(o){if(g(s),o!==o+0)throw o;p(1,0)}}function Vi(r,e,t,n,i){var a=m();try{y(r)(e,t,n,i)}catch(s){if(g(a),s!==s+0)throw s;p(1,0)}}function Li(r,e,t,n,i,a,s,o,u,l,f){var d=m();try{y(r)(e,t,n,i,a,s,o,u,l,f)}catch(_){if(g(d),_!==_+0)throw _;p(1,0)}}function Ni(r,e,t,n,i){var a=m();try{return y(r)(e,t,n,i)}catch(s){if(g(a),s!==s+0)throw s;p(1,0)}}function zi(r,e,t,n,i,a){var s=m();try{return y(r)(e,t,n,i,a)}catch(o){if(g(s),o!==o+0)throw o;p(1,0)}}function Xi(r,e,t,n,i,a,s){var o=m();try{return y(r)(e,t,n,i,a,s)}catch(u){if(g(o),u!==u+0)throw u;p(1,0)}}function Zi(r,e,t,n,i,a,s,o){var u=m();try{y(r)(e,t,n,i,a,s,o)}catch(l){if(g(u),l!==l+0)throw l;p(1,0)}}function Gi(r,e,t,n,i,a,s,o,u){var l=m();try{y(r)(e,t,n,i,a,s,o,u)}catch(f){if(g(l),f!==f+0)throw f;p(1,0)}}function Qi(r){var e=m();try{return y(r)()}catch(t){if(g(e),t!==t+0)throw t;p(1,0)}}function qi(r,e,t,n,i,a,s,o,u){var l=m();try{return y(r)(e,t,n,i,a,s,o,u)}catch(f){if(g(l),f!==f+0)throw f;p(1,0)}}function Ji(r,e,t,n,i,a,s){var o=m();try{return y(r)(e,t,n,i,a,s)}catch(u){if(g(o),u!==u+0)throw u;p(1,0)}}function Ki(r,e,t,n){var i=m();try{return y(r)(e,t,n)}catch(a){if(g(i),a!==a+0)throw a;p(1,0)}}function Yi(r,e,t,n){var i=m();try{return y(r)(e,t,n)}catch(a){if(g(i),a!==a+0)throw a;p(1,0)}}function ra(r,e,t,n,i,a,s,o){var u=m();try{y(r)(e,t,n,i,a,s,o)}catch(l){if(g(u),l!==l+0)throw l;p(1,0)}}function ea(r,e,t,n,i,a){var s=m();try{return y(r)(e,t,n,i,a)}catch(o){if(g(s),o!==o+0)throw o;p(1,0)}}function ta(r,e,t,n,i,a,s,o,u,l){var f=m();try{return y(r)(e,t,n,i,a,s,o,u,l)}catch(d){if(g(f),d!==d+0)throw d;p(1,0)}}function na(r,e,t){var n=m();try{return y(r)(e,t)}catch(i){if(g(n),i!==i+0)throw i;p(1,0)}}function ia(r,e,t,n,i){var a=m();try{return y(r)(e,t,n,i)}catch(s){if(g(a),s!==s+0)throw s;p(1,0)}}function aa(r,e,t,n,i,a,s,o,u,l){var f=m();try{y(r)(e,t,n,i,a,s,o,u,l)}catch(d){if(g(f),d!==d+0)throw d;p(1,0)}}function oa(r,e,t,n,i,a,s,o){var u=m();try{return y(r)(e,t,n,i,a,s,o)}catch(l){if(g(u),l!==l+0)throw l;p(1,0)}}function sa(r,e,t,n,i,a,s){var o=m();try{y(r)(e,t,n,i,a,s)}catch(u){if(g(o),u!==u+0)throw u;p(1,0)}}function ua(r,e,t,n){var i=m();try{return y(r)(e,t,n)}catch(a){if(g(i),a!==a+0)throw a;p(1,0)}}function ca(r,e,t,n,i,a,s,o,u,l,f,d){var _=m();try{return y(r)(e,t,n,i,a,s,o,u,l,f,d)}catch(b){if(g(_),b!==b+0)throw b;p(1,0)}}function la(r,e,t,n,i,a,s,o,u,l,f,d,_,b,T,F){var E=m();try{y(r)(e,t,n,i,a,s,o,u,l,f,d,_,b,T,F)}catch(S){if(g(E),S!==S+0)throw S;p(1,0)}}function fa(r,e,t,n){var i=m();try{return Qe(r,e,t,n)}catch(a){if(g(i),a!==a+0)throw a;p(1,0)}}function va(r,e,t,n,i){var a=m();try{return qe(r,e,t,n,i)}catch(s){if(g(a),s!==s+0)throw s;p(1,0)}}var Wr,Je;lr=function r(){Wr||Ke(),Wr||(lr=r)};function Ke(){if(q>0||!Je&&(Je=1,Rt(),q>0))return;function r(){var e;Wr||(Wr=1,c.calledRun=1,!de&&(Ot(),I(c),(e=c.onRuntimeInitialized)===null||e===void 0||e.call(c),kt()))}c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1),r()},1)):r()}if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();return Ke(),k=G,k}})();const le={...rr,formats:[...rr.formats]},fe={...Mr};function Ct(v){return mr(sr,v)}function Tt(v){return yt(sr,v)}async function Pt(v,h){return $t(sr,v,h)}async function At(v,h){return bt(sr,v,h)}async function Et(v,h){return wt(sr,v,h)}return A.barcodeFormats=Dr,A.binarizers=at,A.characterSets=st,A.contentTypes=se,A.defaultDecodeHints=le,A.defaultEncodeHints=fe,A.defaultReaderOptions=le,A.defaultWriterOptions=fe,A.eanAddOnSymbols=ct,A.getZXingModule=Ct,A.purgeZXingModule=mt,A.readBarcodesFromImageData=At,A.readBarcodesFromImageFile=Pt,A.readOutputEccLevels=ht,A.setZXingModuleOverrides=Tt,A.textModes=ft,A.writeBarcodeToImageFile=Et,A.writeInputEccLevels=dt,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),A}({});