barcode-detector 3.0.2 → 3.0.4

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.
@@ -1 +1 @@
1
- var BarcodeDetectionAPI=function(E){"use strict";var Xe=E=>{throw TypeError(E)};var qe=(E,M,j)=>M.has(E)||Xe("Cannot "+j);var Ye=(E,M,j)=>(qe(E,M,"read from private field"),j?j.call(E):M.get(E)),Ze=(E,M,j)=>M.has(E)?Xe("Cannot add the same private member more than once"):M instanceof WeakSet?M.add(E):M.set(E,j),Qe=(E,M,j,Q)=>(qe(E,M,"write to private field"),Q?Q.call(E,j):M.set(E,j),j);var ft,ve;var M=typeof document<"u"?document.currentScript:null;const j=[["Aztec","M"],["Codabar","L"],["Code39","L"],["Code93","L"],["Code128","L"],["DataBar","L"],["DataBarExpanded","L"],["DataMatrix","M"],["EAN-8","L"],["EAN-13","L"],["ITF","L"],["MaxiCode","M"],["PDF417","M"],["QRCode","M"],["UPC-A","L"],["UPC-E","L"],["MicroQRCode","M"],["rMQRCode","M"],["DXFilmEdge","L"],["DataBarLimited","L"]],Q=j.map(([i])=>i),Je=Q.filter((i,f)=>j[f][1]==="L"),Ke=Q.filter((i,f)=>j[f][1]==="M");function jt(i){switch(i){case"Linear-Codes":return Je.reduce((f,c)=>f|jt(c),0);case"Matrix-Codes":return Ke.reduce((f,c)=>f|jt(c),0);case"Any":return(1<<j.length)-1;case"None":return 0;default:return 1<<Q.indexOf(i)}}function tr(i){if(i===0)return"None";const f=31-Math.clz32(i);return Q[f]}function er(i){return i.reduce((f,c)=>f|jt(c),0)}const rr=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function nr(i){return rr.indexOf(i)}const ee=["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","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function ar(i){return i==="UnicodeBig"?ee.indexOf("UTF16BE"):ee.indexOf(i)}const or=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function ir(i){return or[i]}const sr=["Ignore","Read","Require"];function ur(i){return sr.indexOf(i)}const cr=["Plain","ECI","HRI","Hex","Escaped"];function lr(i){return cr.indexOf(i)}const wt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown"};function re(i){return{...i,formats:er(i.formats),binarizer:nr(i.binarizer),eanAddOnSymbol:ur(i.eanAddOnSymbol),textMode:lr(i.textMode),characterSet:ar(i.characterSet)}}function fr(i){return{...i,format:tr(i.format),contentType:ir(i.contentType),eccLevel:i.ecLevel}}const dr="2.1.1",hr="559471ac8fe0d119db538bb43c0a58ce9e67fccf",pr={locateFile:(i,f)=>{const c=i.match(/_(.+?)\.wasm$/);return c?`https://fastly.jsdelivr.net/npm/zxing-wasm@2.1.1/dist/${c[1]}/${i}`:f+i}},$t=new WeakMap;function vr(i,f){return Object.is(i,f)||Object.keys(i).length===Object.keys(f).length&&Object.keys(i).every(c=>Object.prototype.hasOwnProperty.call(f,c)&&i[c]===f[c])}function ne(i,{overrides:f,equalityFn:c=vr,fireImmediately:T=!1}={}){var $;const[A,F]=($=$t.get(i))!=null?$:[pr],W=f!=null?f:A;let S;if(T){if(F&&(S=c(A,W)))return F;const R=i({...W});return $t.set(i,[W,R]),R}(S!=null?S:c(A,W))||$t.set(i,[W])}function yr(i){$t.delete(i)}async function mr(i,f,c=wt){const T={...wt,...c},$=await ne(i,{fireImmediately:!0});let A,F;if("width"in f&&"height"in f&&"data"in f){const{data:S,data:{byteLength:R},width:B,height:J}=f;F=$._malloc(R),$.HEAPU8.set(S,F),A=$.readBarcodesFromPixmap(F,B,J,re(T))}else{let S,R;if("buffer"in f)[S,R]=[f.byteLength,f];else if("byteLength"in f)[S,R]=[f.byteLength,new Uint8Array(f)];else if("size"in f)[S,R]=[f.size,new Uint8Array(await f.arrayBuffer())];else throw new TypeError("Invalid input type");F=$._malloc(S),$.HEAPU8.set(R,F),A=$.readBarcodesFromImage(F,S,re(T))}$._free(F);const W=[];for(let S=0;S<A.size();++S)W.push(fr(A.get(S)));return W}({...wt,formats:[...wt.formats]});var Bt=async function(i={}){var f,c=i,T,$,A=new Promise((e,t)=>{T=e,$=t}),F=typeof window=="object",W=typeof Bun<"u",S=typeof WorkerGlobalScope<"u";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var R="./this.program",B="";function J(e){return c.locateFile?c.locateFile(e,B):B+e}var it,K;(F||S||W)&&(S?B=self.location.href:typeof document<"u"&&document.currentScript&&(B=document.currentScript.src),B.startsWith("blob:")?B="":B=B.slice(0,B.replace(/[?#].*/,"").lastIndexOf("/")+1),S&&(K=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),it=async e=>{var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)});var dt=console.log.bind(console),z=console.error.bind(console),tt,st,ye=!1,et,V,ht,bt,ut,P,me,ge;function we(){var e=st.buffer;et=new Int8Array(e),ht=new Int16Array(e),c.HEAPU8=V=new Uint8Array(e),bt=new Uint16Array(e),ut=new Int32Array(e),P=new Uint32Array(e),me=new Float32Array(e),ge=new Float64Array(e)}function Lr(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)Qr(c.preRun.shift());$e(Ce)}function Wr(){_.ya()}function Ur(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)Zr(c.postRun.shift());$e(be)}var rt=0,pt=null;function Vr(e){var t;rt++,(t=c.monitorRunDependencies)===null||t===void 0||t.call(c,rt)}function kr(e){var t;if(rt--,(t=c.monitorRunDependencies)===null||t===void 0||t.call(c,rt),rt==0&&pt){var r=pt;pt=null,r()}}function Ut(e){var t;(t=c.onAbort)===null||t===void 0||t.call(c,e),e="Aborted("+e+")",z(e),ye=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw $(r),r}var Ct;function Hr(){return c.locateFile?J("zxing_reader.wasm"):new URL("../../reader/zxing_reader.wasm",M&&M.tagName.toUpperCase()==="SCRIPT"&&M.src||new URL("index.js",document.baseURI).href).href}function Nr(e){if(e==Ct&&tt)return new Uint8Array(tt);if(K)return K(e);throw"both async and sync fetching of the wasm failed"}async function zr(e){if(!tt)try{var t=await it(e);return new Uint8Array(t)}catch{}return Nr(e)}async function Gr(e,t){try{var r=await zr(e),n=await WebAssembly.instantiate(r,t);return n}catch(a){z(`failed to asynchronously prepare wasm: ${a}`),Ut(a)}}async function Xr(e,t,r){if(!e&&typeof WebAssembly.instantiateStreaming=="function")try{var n=fetch(t,{credentials:"same-origin"}),a=await WebAssembly.instantiateStreaming(n,r);return a}catch(o){z(`wasm streaming compile failed: ${o}`),z("falling back to ArrayBuffer instantiation")}return Gr(t,r)}function qr(){return{a:Ma}}async function Yr(){function e(o,u){return _=o.exports,st=_.xa,we(),De=_.Ba,kr(),_}Vr();function t(o){return e(o.instance)}var r=qr();if(c.instantiateWasm)return new Promise((o,u)=>{c.instantiateWasm(r,(s,l)=>{o(e(s))})});Ct!=null||(Ct=Hr());try{var n=await Xr(tt,Ct,r),a=t(n);return a}catch(o){return $(o),Promise.reject(o)}}var $e=e=>{for(;e.length>0;)e.shift()(c)},be=[],Zr=e=>be.push(e),Ce=[],Qr=e=>Ce.push(e),y=e=>Ba(e),m=()=>La(),Tt=[],Pt=0,Jr=e=>{var t=new Vt(e);return t.get_caught()||(t.set_caught(!0),Pt--),t.set_rethrown(!1),Tt.push(t),Ua(e),Ra(e)},G=0,Kr=()=>{v(0,0);var e=Tt.pop();Wa(e.excPtr),G=0};class Vt{constructor(t){this.excPtr=t,this.ptr=t-24}set_type(t){P[this.ptr+4>>2]=t}get_type(){return P[this.ptr+4>>2]}set_destructor(t){P[this.ptr+8>>2]=t}get_destructor(){return P[this.ptr+8>>2]}set_caught(t){t=t?1:0,et[this.ptr+12]=t}get_caught(){return et[this.ptr+12]!=0}set_rethrown(t){t=t?1:0,et[this.ptr+13]=t}get_rethrown(){return et[this.ptr+13]!=0}init(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r)}set_adjusted_ptr(t){P[this.ptr+16>>2]=t}get_adjusted_ptr(){return P[this.ptr+16>>2]}}var Et=e=>ja(e),kt=e=>{var t=G;if(!t)return Et(0),0;var r=new Vt(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return Et(0),t;for(var a of e){if(a===0||a===n)break;var o=r.ptr+16;if(Va(a,n,o))return Et(a),t}return Et(n),t},tn=()=>kt([]),en=e=>kt([e]),rn=(e,t)=>kt([e,t]),nn=()=>{var e=Tt.pop();e||Ut("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Tt.push(e),e.set_rethrown(!0),e.set_caught(!1),Pt++),G=t,G},an=(e,t,r)=>{var n=new Vt(e);throw n.init(t,r),G=e,Pt++,G},on=()=>Pt,sn=e=>{throw G||(G=e),G},un=()=>Ut(""),_t={},Ht=e=>{for(;e.length;){var t=e.pop(),r=e.pop();r(t)}};function vt(e){return this.fromWireType(P[e>>2])}var ct={},nt={},Ot={},cn=c.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},St=e=>{throw new cn(e)},at=(e,t,r)=>{e.forEach(s=>Ot[s]=t);function n(s){var l=r(s);l.length!==e.length&&St("Mismatched type converter count");for(var d=0;d<e.length;++d)N(e[d],l[d])}var a=new Array(t.length),o=[],u=0;t.forEach((s,l)=>{nt.hasOwnProperty(s)?a[l]=nt[s]:(o.push(s),ct.hasOwnProperty(s)||(ct[s]=[]),ct[s].push(()=>{a[l]=nt[s],++u,u===o.length&&n(a)}))}),o.length===0&&n(a)},ln=e=>{var t=_t[e];delete _t[e];var r=t.rawConstructor,n=t.rawDestructor,a=t.fields,o=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));at([e],o,u=>{var s={};return a.forEach((l,d)=>{var h=l.fieldName,p=u[d],w=u[d].optional,b=l.getter,O=l.getterContext,x=u[d+a.length],I=l.setter,D=l.setterContext;s[h]={read:Z=>p.fromWireType(b(O,Z)),write:(Z,U)=>{var k=[];I(D,Z,x.toWireType(k,U)),Ht(k)},optional:w}}),[{name:t.name,fromWireType:l=>{var d={};for(var h in s)d[h]=s[h].read(l);return n(l),d},toWireType:(l,d)=>{for(var h in s)if(!(h in d)&&!s[h].optional)throw new TypeError(`Missing field: "${h}"`);var p=r();for(h in s)s[h].write(p,d[h]);return l!==null&&l.push(n,p),p},argPackAdvance:X,readValueFromPointer:vt,destructorFunction:n}]})},fn=(e,t,r,n,a)=>{},dn=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Te=e},Te,L=e=>{for(var t="",r=e;V[r];)t+=Te[V[r++]];return t},yt=c.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},C=e=>{throw new yt(e)};function hn(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=t.name;if(e||C(`type "${n}" must have a positive integer typeid pointer`),nt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(nt[e]=t,delete Ot[e],ct.hasOwnProperty(e)){var a=ct[e];delete ct[e],a.forEach(o=>o())}}function N(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return hn(e,t,r)}var X=8,pn=(e,t,r,n)=>{t=L(t),N(e,{name:t,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:X,readValueFromPointer:function(a){return this.fromWireType(V[a])},destructorFunction:null})},vn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Nt=e=>{function t(r){return r.$$.ptrType.registeredClass.name}C(t(e)+" instance already deleted")},zt=!1,Pe=e=>{},yn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Ee=e=>{e.count.value-=1;var t=e.count.value===0;t&&yn(e)},mt=e=>typeof FinalizationRegistry>"u"?(mt=t=>t,e):(zt=new FinalizationRegistry(t=>{Ee(t.$$)}),mt=t=>{var r=t.$$,n=!!r.smartPtr;if(n){var a={$$:r};zt.register(t,a,t)}return t},Pe=t=>zt.unregister(t),mt(e)),mn=()=>{let e=At.prototype;Object.assign(e,{isAliasOf(r){if(!(this instanceof At)||!(r instanceof At))return!1;var n=this.$$.ptrType.registeredClass,a=this.$$.ptr;r.$$=r.$$;for(var o=r.$$.ptrType.registeredClass,u=r.$$.ptr;n.baseClass;)a=n.upcast(a),n=n.baseClass;for(;o.baseClass;)u=o.upcast(u),o=o.baseClass;return n===o&&a===u},clone(){if(this.$$.ptr||Nt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=mt(Object.create(Object.getPrototypeOf(this),{$$:{value:vn(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Pe(this),Ee(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});const t=Symbol.dispose;t&&(e[t]=e.delete)};function At(){}var Gt=(e,t)=>Object.defineProperty(t,"name",{value:e}),_e={},Oe=(e,t,r)=>{if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(){for(var a=arguments.length,o=new Array(a),u=0;u<a;u++)o[u]=arguments[u];return e[t].overloadTable.hasOwnProperty(o.length)||C(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[o.length].apply(this,o)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},Se=(e,t,r)=>{c.hasOwnProperty(e)?((r===void 0||c[e].overloadTable!==void 0&&c[e].overloadTable[r]!==void 0)&&C(`Cannot register public name '${e}' twice`),Oe(c,e,e),c[e].overloadTable.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[e].overloadTable[r]=t):(c[e]=t,c[e].argCount=r)},gn=48,wn=57,$n=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=gn&&t<=wn?`_${e}`:e};function bn(e,t,r,n,a,o,u,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=u,this.downcast=s,this.pureVirtualFunctions=[]}var Xt=(e,t,r)=>{for(;t!==r;)t.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Cn(e,t){if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;t.$$||C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Xt(t.$$.ptr,r,this.registeredClass);return n}function Tn(e,t){var r;if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;(!t||!t.$$)&&C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&C(`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=Xt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:C(`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 a=t.clone();r=this.rawShare(r,Y.toHandle(()=>a.delete())),e!==null&&e.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function Pn(e,t){if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;t.$$||C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&C(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Xt(t.$$.ptr,r,this.registeredClass);return n}var Ae=(e,t,r)=>{if(t===r)return e;if(r.baseClass===void 0)return null;var n=Ae(e,t,r.baseClass);return n===null?null:r.downcast(n)},En={},_n=(e,t)=>{for(t===void 0&&C("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},On=(e,t)=>(t=_n(e,t),En[t]),It=(e,t)=>{(!t.ptrType||!t.ptr)&&St("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,n=!!t.smartPtr;return r!==n&&St("Both smartPtrType and smartPtr must be specified"),t.count={value:1},mt(Object.create(e,{$$:{value:t,writable:!0}}))};function Sn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=On(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?It(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):It(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o=this.registeredClass.getActualType(t),u=_e[o];if(!u)return a.call(this);var s;this.isConst?s=u.constPointerType:s=u.pointerType;var l=Ae(t,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?It(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):It(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var An=()=>{Object.assign(xt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:X,readValueFromPointer:vt,fromWireType:Sn})};function xt(e,t,r,n,a,o,u,s,l,d,h){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=h,!a&&t.baseClass===void 0?n?(this.toWireType=Cn,this.destructorFunction=null):(this.toWireType=Pn,this.destructorFunction=null):this.toWireType=Tn}var Ie=(e,t,r)=>{c.hasOwnProperty(e)||St("Replacing nonexistent public symbol"),c[e].overloadTable!==void 0&&r!==void 0?c[e].overloadTable[r]=t:(c[e]=t,c[e].argCount=r)},xe=[],De,g=e=>{var t=xe[e];return t||(xe[e]=t=De.get(e)),t},In=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.includes("j"))return dynCallLegacy(e,t,r);var n=g(t),a=n(...r);return a},xn=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return In(e,t,a,r)}},H=function(e,t){e=L(e);function r(){if(e.includes("j"))return xn(e,t);var a=g(t);return a}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${e}: ${t}`),n};class Dn extends Error{}var Me=e=>{var t=Fa(e),r=L(t);return ot(t),r},Dt=(e,t)=>{var r=[],n={};function a(o){if(!n[o]&&!nt[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw t.forEach(a),new Dn(`${e}: `+r.map(Me).join([", "]))},Mn=(e,t,r,n,a,o,u,s,l,d,h,p,w)=>{h=L(h),o=H(a,o),s&&(s=H(u,s)),d&&(d=H(l,d)),w=H(p,w);var b=$n(h);Se(b,function(){Dt(`Cannot construct ${h} due to unbound types`,[n])}),at([e,t,r],n?[n]:[],O=>{O=O[0];var x,I;n?(x=O.registeredClass,I=x.instancePrototype):I=At.prototype;var D=Gt(h,function(){if(Object.getPrototypeOf(this)!==Z)throw new yt(`Use 'new' to construct ${h}`);if(U.constructor_body===void 0)throw new yt(`${h} has no accessible constructor`);for(var ze=arguments.length,Ft=new Array(ze),Rt=0;Rt<ze;Rt++)Ft[Rt]=arguments[Rt];var Ge=U.constructor_body[Ft.length];if(Ge===void 0)throw new yt(`Tried to invoke ctor of ${h} with invalid number of parameters (${Ft.length}) - expected (${Object.keys(U.constructor_body).toString()}) parameters instead!`);return Ge.apply(this,Ft)}),Z=Object.create(I,{constructor:{value:D}});D.prototype=Z;var U=new bn(h,D,Z,w,x,o,s,d);if(U.baseClass){var k,Mt;(Mt=(k=U.baseClass).__derivedClasses)!==null&&Mt!==void 0||(k.__derivedClasses=[]),U.baseClass.__derivedClasses.push(U)}var Oo=new xt(h,U,!0,!1,!1),He=new xt(h+"*",U,!1,!1,!1),Ne=new xt(h+" const*",U,!1,!0,!1);return _e[e]={pointerType:He,constPointerType:Ne},Ie(b,D),[Oo,He,Ne]})},qt=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(P[t+n*4>>2]);return r};function Fn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Yt(e,t,r,n,a,o){var u=t.length;u<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=t[1]!==null&&r!==null,l=Fn(t),d=t[0].name!=="void",h=u-2,p=new Array(h),w=[],b=[],O=function(){b.length=0;var x;w.length=s?2:1,w[0]=a,s&&(x=t[1].toWireType(b,this),w[1]=x);for(var I=0;I<h;++I)p[I]=t[I+2].toWireType(b,I<0||arguments.length<=I?void 0:arguments[I]),w.push(p[I]);var D=n(...w);function Z(U){if(l)Ht(b);else for(var k=s?1:2;k<t.length;k++){var Mt=k===1?x:p[k-2];t[k].destructorFunction!==null&&t[k].destructorFunction(Mt)}if(d)return t[0].fromWireType(U)}return Z(D)};return Gt(e,O)}var Rn=(e,t,r,n,a,o)=>{var u=qt(t,r);a=H(n,a),at([],[e],s=>{s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[t-1]!==void 0)throw new yt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[t-1]=()=>{Dt(`Cannot construct ${s.name} due to unbound types`,u)},at([],u,d=>(d.splice(1,0,null),s.registeredClass.constructor_body[t-1]=Yt(l,d,null,a,o),[])),[]})},Fe=e=>{e=e.trim();const t=e.indexOf("(");return t===-1?e:e.slice(0,t)},jn=(e,t,r,n,a,o,u,s,l,d)=>{var h=qt(r,n);t=L(t),t=Fe(t),o=H(a,o),at([],[e],p=>{p=p[0];var w=`${p.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&p.registeredClass.pureVirtualFunctions.push(t);function b(){Dt(`Cannot call ${w} due to unbound types`,h)}var O=p.registeredClass.instancePrototype,x=O[t];return x===void 0||x.overloadTable===void 0&&x.className!==p.name&&x.argCount===r-2?(b.argCount=r-2,b.className=p.name,O[t]=b):(Oe(O,t,w),O[t].overloadTable[r-2]=b),at([],h,I=>{var D=Yt(w,I,p,o,u);return O[t].overloadTable===void 0?(D.argCount=r-2,O[t]=D):O[t].overloadTable[r-2]=D,[]}),[]})},Zt=[],q=[],Qt=e=>{e>9&&--q[e+1]===0&&(q[e]=void 0,Zt.push(e))},Bn=()=>q.length/2-5-Zt.length,Ln=()=>{q.push(0,1,void 0,1,null,1,!0,1,!1,1),c.count_emval_handles=Bn},Y={toValue:e=>(e||C(`Cannot use deleted val. handle = ${e}`),q[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=Zt.pop()||q.length;return q[t]=e,q[t+1]=1,t}}}},Re={name:"emscripten::val",fromWireType:e=>{var t=Y.toValue(e);return Qt(e),t},toWireType:(e,t)=>Y.toHandle(t),argPackAdvance:X,readValueFromPointer:vt,destructorFunction:null},Wn=e=>N(e,Re),Un=(e,t)=>{switch(t){case 4:return function(r){return this.fromWireType(me[r>>2])};case 8:return function(r){return this.fromWireType(ge[r>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Vn=(e,t,r)=>{t=L(t),N(e,{name:t,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:X,readValueFromPointer:Un(t,r),destructorFunction:null})},kn=(e,t,r,n,a,o,u,s)=>{var l=qt(t,r);e=L(e),e=Fe(e),a=H(n,a),Se(e,function(){Dt(`Cannot call ${e} due to unbound types`,l)},t-1),at([],l,d=>{var h=[d[0],null].concat(d.slice(1));return Ie(e,Yt(e,h,null,a,o),t-1),[]})},Hn=(e,t,r)=>{switch(t){case 1:return r?n=>et[n]:n=>V[n];case 2:return r?n=>ht[n>>1]:n=>bt[n>>1];case 4:return r?n=>ut[n>>2]:n=>P[n>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Nn=(e,t,r,n,a)=>{t=L(t);var o=h=>h;if(n===0){var u=32-8*r;o=h=>h<<u>>>u}var s=t.includes("unsigned"),l=(h,p)=>{},d;s?d=function(h,p){return l(p,this.name),p>>>0}:d=function(h,p){return l(p,this.name),p},N(e,{name:t,fromWireType:o,toWireType:d,argPackAdvance:X,readValueFromPointer:Hn(t,r,n!==0),destructorFunction:null})},zn=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[t];function o(u){var s=P[u>>2],l=P[u+4>>2];return new a(et.buffer,l,s)}r=L(r),N(e,{name:r,fromWireType:o,argPackAdvance:X,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Gn=Object.assign({optional:!0},Re),Xn=(e,t)=>{N(e,Gn)},qn=(e,t,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,u=0;u<e.length;++u){var s=e.charCodeAt(u);if(s>=55296&&s<=57343){var l=e.charCodeAt(++u);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|s&63}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|s&63}}return t[r]=0,r-a},lt=(e,t,r)=>qn(e,V,t,r),je=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},Be=typeof TextDecoder<"u"?new TextDecoder:void 0,Le=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN;for(var n=t+r,a=t;e[a]&&!(a>=n);)++a;if(a-t>16&&e.buffer&&Be)return Be.decode(e.subarray(t,a));for(var o="";t<a;){var u=e[t++];if(!(u&128)){o+=String.fromCharCode(u);continue}var s=e[t++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|s);continue}var l=e[t++]&63;if((u&240)==224?u=(u&15)<<12|s<<6|l:u=(u&7)<<18|s<<12|l<<6|e[t++]&63,u<65536)o+=String.fromCharCode(u);else{var d=u-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},Yn=(e,t)=>e?Le(V,e,t):"",Zn=(e,t)=>{t=L(t),N(e,{name:t,fromWireType(r){for(var n=P[r>>2],a=r+4,o,s,u=a,s=0;s<=n;++s){var l=a+s;if(s==n||V[l]==0){var d=l-u,h=Yn(u,d);o===void 0?o=h:(o+="\0",o+=h),u=l+1}}return ot(r),o},toWireType(r,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var a,o=typeof n=="string";o||ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT==1||C("Cannot pass non-string to std::string"),o?a=je(n):a=n.length;var u=ke(4+a+1),s=u+4;return P[u>>2]=a,o?lt(n,s,a+1):V.set(n,s),r!==null&&r.push(ot,u),u},argPackAdvance:X,readValueFromPointer:vt,destructorFunction(r){ot(r)}})},We=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Qn=(e,t)=>{for(var r=e,n=r>>1,a=n+t/2;!(n>=a)&&bt[n];)++n;if(r=n<<1,r-e>32&&We)return We.decode(V.subarray(e,r));for(var o="",u=0;!(u>=t/2);++u){var s=ht[e+u*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Jn=(e,t,r)=>{if(r!=null||(r=2147483647),r<2)return 0;r-=2;for(var n=t,a=r<e.length*2?r/2:e.length,o=0;o<a;++o){var u=e.charCodeAt(o);ht[t>>1]=u,t+=2}return ht[t>>1]=0,t-n},Kn=e=>e.length*2,ta=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var a=ut[e+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},ea=(e,t,r)=>{if(r!=null||(r=2147483647),r<4)return 0;for(var n=t,a=n+r-4,o=0;o<e.length;++o){var u=e.charCodeAt(o);if(u>=55296&&u<=57343){var s=e.charCodeAt(++o);u=65536+((u&1023)<<10)|s&1023}if(ut[t>>2]=u,t+=4,t+4>a)break}return ut[t>>2]=0,t-n},ra=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},na=(e,t,r)=>{r=L(r);var n,a,o,u;t===2?(n=Qn,a=Jn,u=Kn,o=s=>bt[s>>1]):t===4&&(n=ta,a=ea,u=ra,o=s=>P[s>>2]),N(e,{name:r,fromWireType:s=>{for(var l=P[s>>2],d,h=s+4,p=0;p<=l;++p){var w=s+4+p*t;if(p==l||o(w)==0){var b=w-h,O=n(h,b);d===void 0?d=O:(d+="\0",d+=O),h=w+t}}return ot(s),d},toWireType:(s,l)=>{typeof l!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var d=u(l),h=ke(4+d+t);return P[h>>2]=d/t,a(l,h+4,d+t),s!==null&&s.push(ot,h),h},argPackAdvance:X,readValueFromPointer:vt,destructorFunction(s){ot(s)}})},aa=(e,t,r,n,a,o)=>{_t[e]={name:L(t),rawConstructor:H(r,n),rawDestructor:H(a,o),fields:[]}},oa=(e,t,r,n,a,o,u,s,l,d)=>{_t[e].fields.push({fieldName:L(t),getterReturnType:r,getter:H(n,a),getterContext:o,setterArgumentType:u,setter:H(s,l),setterContext:d})},ia=(e,t)=>{t=L(t),N(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Jt=[],sa=(e,t,r,n)=>(e=Jt[e],t=Y.toValue(t),e(null,t,r,n)),ua={},ca=e=>{var t=ua[e];return t===void 0?L(e):t},Ue=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var r=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return r||delete t.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},la=e=>e===0?Y.toHandle(Ue()):(e=ca(e),Y.toHandle(Ue()[e])),fa=e=>{var t=Jt.length;return Jt.push(e),t},Ve=(e,t)=>{var r=nt[e];return r===void 0&&C(`${t} has unknown type ${Me(e)}`),r},da=(e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Ve(P[t+n*4>>2],`parameter ${n}`);return r},ha=(e,t,r)=>{var n=[],a=e.toWireType(n,r);return n.length&&(P[t>>2]=Y.toHandle(n)),a},pa=Reflect.construct,va=(e,t,r)=>{var n=da(e,t),a=n.shift();e--;var o=new Array(e),u=(l,d,h,p)=>{for(var w=0,b=0;b<e;++b)o[b]=n[b].readValueFromPointer(p+w),w+=n[b].argPackAdvance;var O=r===1?pa(d,o):d.apply(l,o);return ha(a,h,O)},s=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return fa(Gt(s,u))},ya=e=>{e>9&&(q[e+1]+=1)},ma=e=>{var t=Y.toValue(e);Ht(t),Qt(e)},ga=(e,t)=>{e=Ve(e,"_emval_take_value");var r=e.readValueFromPointer(t);return Y.toHandle(r)},wa=(e,t,r,n)=>{var a=new Date().getFullYear(),o=new Date(a,0,1),u=new Date(a,6,1),s=o.getTimezoneOffset(),l=u.getTimezoneOffset(),d=Math.max(s,l);P[e>>2]=d*60,ut[t>>2]=+(s!=l);var h=b=>{var O=b>=0?"-":"+",x=Math.abs(b),I=String(Math.floor(x/60)).padStart(2,"0"),D=String(x%60).padStart(2,"0");return`UTC${O}${I}${D}`},p=h(s),w=h(l);l<s?(lt(p,r,17),lt(w,n,17)):(lt(p,n,17),lt(w,r,17))},$a=()=>2147483648,ba=(e,t)=>Math.ceil(e/t)*t,Ca=e=>{var t=st.buffer,r=(e-t.byteLength+65535)/65536|0;try{return st.grow(r),we(),1}catch{}},Ta=e=>{var t=V.length;e>>>=0;var r=$a();if(e>r)return!1;for(var n=1;n<=4;n*=2){var a=t*(1+.2/n);a=Math.min(a,e+100663296);var o=Math.min(r,ba(Math.max(e,a),65536)),u=Ca(o);if(u)return!0}return!1},Kt={},Pa=()=>R||"./this.program",gt=()=>{if(!gt.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Pa()};for(var r in Kt)Kt[r]===void 0?delete t[r]:t[r]=Kt[r];var n=[];for(var r in t)n.push(`${r}=${t[r]}`);gt.strings=n}return gt.strings},Ea=(e,t)=>{var r=0,n=0;for(var a of gt()){var o=t+r;P[e+n>>2]=o,r+=lt(a,o,1/0)+1,n+=4}return 0},_a=(e,t)=>{var r=gt();P[e>>2]=r.length;var n=0;for(var a of r)n+=je(a)+1;return P[t>>2]=n,0},Oa=e=>52;function Sa(e,t,r,n,a){return 70}var Aa=[null,[],[]],Ia=(e,t)=>{var r=Aa[e];t===0||t===10?((e===1?dt:z)(Le(r)),r.length=0):r.push(t)},xa=(e,t,r,n)=>{for(var a=0,o=0;o<r;o++){var u=P[t>>2],s=P[t+4>>2];t+=8;for(var l=0;l<s;l++)Ia(e,V[u+l]);a+=s}return P[n>>2]=a,0},Da=e=>e;dn(),mn(),An(),Ln(),c.noExitRuntime&&c.noExitRuntime,c.print&&(dt=c.print),c.printErr&&(z=c.printErr),c.wasmBinary&&(tt=c.wasmBinary),c.arguments&&c.arguments,c.thisProgram&&(R=c.thisProgram);var Ma={s:Jr,w:Kr,a:tn,j:en,m:rn,N:nn,p:an,da:on,d:sn,_:un,sa:ln,Z:fn,na:pn,qa:Mn,pa:Rn,F:jn,la:Wn,R:Vn,S:kn,y:Nn,t:zn,ra:Xn,ma:Zn,O:na,K:aa,ta:oa,oa:ia,V:sa,ua:Qt,wa:la,$:va,T:ya,va:ma,ka:ga,aa:wa,ea:Ta,ba:Ea,ca:_a,fa:Oa,X:Sa,Q:xa,I:fo,C:po,U:Ya,P:bo,q:so,b:za,D:lo,ia:yo,c:Xa,ha:mo,h:qa,i:to,r:ro,M:co,v:ao,E:io,J:uo,A:vo,H:Co,W:Eo,k:Qa,f:Za,e:Ga,g:Na,L:$o,l:Ka,ja:ho,o:no,x:eo,u:oo,ga:wo,B:go,n:Ja,G:To,Y:Po,z:Da},_=await Yr();_.ya;var Fa=_.za,ot=c._free=_.Aa,ke=c._malloc=_.Ca,Ra=_.Da,v=_.Ea,ja=_.Fa,Ba=_.Ga,La=_.Ha,Wa=_.Ia,Ua=_.Ja,Va=_.Ka;c.dynCall_viijii=_.La;var ka=c.dynCall_vij=_.Ma;c.dynCall_jiji=_.Na;var Ha=c.dynCall_jiiii=_.Oa;c.dynCall_iiiiij=_.Pa,c.dynCall_iiiiijj=_.Qa,c.dynCall_iiiiiijj=_.Ra;function Na(e,t,r,n){var a=m();try{g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function za(e,t){var r=m();try{return g(e)(t)}catch(n){if(y(r),n!==n+0)throw n;v(1,0)}}function Ga(e,t,r){var n=m();try{g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function Xa(e,t,r){var n=m();try{return g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function qa(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function Ya(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function Za(e,t){var r=m();try{g(e)(t)}catch(n){if(y(r),n!==n+0)throw n;v(1,0)}}function Qa(e){var t=m();try{g(e)()}catch(r){if(y(t),r!==r+0)throw r;v(1,0)}}function Ja(e,t,r,n,a,o,u,s,l,d,h){var p=m();try{g(e)(t,r,n,a,o,u,s,l,d,h)}catch(w){if(y(p),w!==w+0)throw w;v(1,0)}}function Ka(e,t,r,n,a){var o=m();try{g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function to(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function eo(e,t,r,n,a,o,u){var s=m();try{g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function ro(e,t,r,n,a,o){var u=m();try{return g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function no(e,t,r,n,a,o){var u=m();try{g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function ao(e,t,r,n,a,o,u){var s=m();try{return g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function oo(e,t,r,n,a,o,u,s){var l=m();try{g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function io(e,t,r,n,a,o,u,s){var l=m();try{return g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function so(e){var t=m();try{return g(e)()}catch(r){if(y(t),r!==r+0)throw r;v(1,0)}}function uo(e,t,r,n,a,o,u,s,l){var d=m();try{return g(e)(t,r,n,a,o,u,s,l)}catch(h){if(y(d),h!==h+0)throw h;v(1,0)}}function co(e,t,r,n,a,o,u){var s=m();try{return g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function lo(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function fo(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function ho(e,t,r,n,a,o,u,s){var l=m();try{g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function po(e,t,r,n,a,o){var u=m();try{return g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function vo(e,t,r,n,a,o,u,s,l,d){var h=m();try{return g(e)(t,r,n,a,o,u,s,l,d)}catch(p){if(y(h),p!==p+0)throw p;v(1,0)}}function yo(e,t,r){var n=m();try{return g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function mo(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function go(e,t,r,n,a,o,u,s,l,d){var h=m();try{g(e)(t,r,n,a,o,u,s,l,d)}catch(p){if(y(h),p!==p+0)throw p;v(1,0)}}function wo(e,t,r,n,a,o,u,s,l){var d=m();try{g(e)(t,r,n,a,o,u,s,l)}catch(h){if(y(d),h!==h+0)throw h;v(1,0)}}function $o(e,t,r,n,a,o,u){var s=m();try{g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function bo(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function Co(e,t,r,n,a,o,u,s,l,d,h,p){var w=m();try{return g(e)(t,r,n,a,o,u,s,l,d,h,p)}catch(b){if(y(w),b!==b+0)throw b;v(1,0)}}function To(e,t,r,n,a,o,u,s,l,d,h,p,w,b,O,x){var I=m();try{g(e)(t,r,n,a,o,u,s,l,d,h,p,w,b,O,x)}catch(D){if(y(I),D!==D+0)throw D;v(1,0)}}function Po(e,t,r,n){var a=m();try{ka(e,t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function Eo(e,t,r,n,a){var o=m();try{return Ha(e,t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function te(){if(rt>0){pt=te;return}if(Lr(),rt>0){pt=te;return}function e(){var t;c.calledRun=!0,!ye&&(Wr(),T(c),(t=c.onRuntimeInitialized)===null||t===void 0||t.call(c),Ur())}c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1),e()},1)):e()}function _o(){if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.shift()()}return _o(),te(),f=A,f};function Lt(i){return ne(Bt,i)}function gr(){return yr(Bt)}function wr(i){Lt({overrides:i,equalityFn:Object.is,fireImmediately:!1})}async function $r(i,f){return mr(Bt,i,f)}const br="d19de7bfefeb04bb38eb7a8fab3aa3a08c34f6ec502775d379e1d6da71f9865e",ae=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["databar_limited","DataBarLimited"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"],["any","Any"]],Cr=[...ae,["unknown"]].map(i=>i[0]),Wt=new Map(ae);function Tr(i){for(const[f,c]of Wt)if(i===c)return f;return"unknown"}function Pr(i){if(oe(i))return{width:i.naturalWidth,height:i.naturalHeight};if(ie(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(se(i))return{width:i.videoWidth,height:i.videoHeight};if(ce(i))return{width:i.width,height:i.height};if(fe(i))return{width:i.displayWidth,height:i.displayHeight};if(ue(i))return{width:i.width,height:i.height};if(le(i))return{width:i.width,height:i.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function oe(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLImageElement)}catch{return!1}}function ie(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.SVGImageElement)}catch{return!1}}function se(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLVideoElement)}catch{return!1}}function ue(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLCanvasElement)}catch{return!1}}function ce(i){try{return i instanceof ImageBitmap||Object.prototype.toString.call(i)==="[object ImageBitmap]"}catch{return!1}}function le(i){try{return i instanceof OffscreenCanvas||Object.prototype.toString.call(i)==="[object OffscreenCanvas]"}catch{return!1}}function fe(i){try{return i instanceof VideoFrame||Object.prototype.toString.call(i)==="[object VideoFrame]"}catch{return!1}}function Er(i){try{return i instanceof Blob||Object.prototype.toString.call(i)==="[object Blob]"}catch{return!1}}function _r(i){try{return i instanceof ImageData||Object.prototype.toString.call(i)==="[object ImageData]"}catch{return!1}}function Or(i,f){try{const c=new OffscreenCanvas(i,f);if(c.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return c;throw void 0}catch{const c=document.createElement("canvas");return c.width=i,c.height=f,c}}async function de(i){if(oe(i)&&!await xr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ie(i)&&!await Dr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(fe(i)&&Mr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(se(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ce(i)&&Rr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:c}=Pr(i);if(f===0||c===0)return null;const $=Or(f,c).getContext("2d");$.drawImage(i,0,0);try{return $.getImageData(0,0,f,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Sr(i){let f;try{f=await createImageBitmap(i)}catch{try{if(globalThis.Image){f=new Image;let $="";try{$=URL.createObjectURL(i),f.src=$,await f.decode()}finally{URL.revokeObjectURL($)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await de(f)}function Ar(i){const{width:f,height:c}=i;if(f===0||c===0)return null;const T=i.getContext("2d");try{return T.getImageData(0,0,f,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ir(i){if(Er(i))return await Sr(i);if(_r(i)){if(Fr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ue(i)||le(i)?Ar(i):await de(i)}async function xr(i){try{return await i.decode(),!0}catch{return!1}}async function Dr(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function Mr(i){return i.format===null}function Fr(i){return i.data.buffer.byteLength===0}function Rr(i){return i.width===0&&i.height===0}function he(i,f){return jr(i)?new DOMException(`${f}: ${i.message}`,i.name):Br(i)?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}function jr(i){return i instanceof DOMException||Object.prototype.toString.call(i)==="[object DOMException]"}function Br(i){return i instanceof Error||Object.prototype.toString.call(i)==="[object Error]"}class pe{constructor(f={}){Ze(this,ft);var c;try{const T=(c=f==null?void 0:f.formats)==null?void 0:c.filter($=>$!=="unknown");if((T==null?void 0:T.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const $ of T!=null?T:[])if(!Wt.has($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`);Qe(this,ft,T!=null?T:[]),Lt({fireImmediately:!0}).catch(()=>{})}catch(T){throw he(T,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Cr.filter(f=>f!=="unknown")}async detect(f){try{const c=await Ir(f);if(c===null)return[];let T;const $={tryCode39ExtendedMode:!1,textMode:"Plain",formats:Ye(this,ft).map(A=>Wt.get(A))};try{T=await $r(c,$)}catch(A){throw console.error(A),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return T.map(A=>{const{topLeft:{x:F,y:W},topRight:{x:S,y:R},bottomLeft:{x:B,y:J},bottomRight:{x:it,y:K}}=A.position,dt=Math.min(F,S,B,it),z=Math.min(W,R,J,K),tt=Math.max(F,S,B,it),st=Math.max(W,R,J,K);return{boundingBox:new DOMRectReadOnly(dt,z,tt-dt,st-z),rawValue:A.text,format:Tr(A.format),cornerPoints:[{x:F,y:W},{x:S,y:R},{x:it,y:K},{x:B,y:J}]}})}catch(c){throw he(c,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ft=new WeakMap,(ve=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=pe),E.BarcodeDetector=pe,E.ZXING_CPP_COMMIT=hr,E.ZXING_WASM_SHA256=br,E.ZXING_WASM_VERSION=dr,E.prepareZXingModule=Lt,E.purgeZXingModule=gr,E.setZXingModuleOverrides=wr,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),E}({});
1
+ var BarcodeDetectionAPI=function(E){"use strict";var Xe=E=>{throw TypeError(E)};var qe=(E,M,R)=>M.has(E)||Xe("Cannot "+R);var Ye=(E,M,R)=>(qe(E,M,"read from private field"),R?R.call(E):M.get(E)),Ze=(E,M,R)=>M.has(E)?Xe("Cannot add the same private member more than once"):M instanceof WeakSet?M.add(E):M.set(E,R),Qe=(E,M,R,gt)=>(qe(E,M,"write to private field"),gt?gt.call(E,R):M.set(E,R),R);var lt,ve;const M=[["Aztec","M"],["Codabar","L"],["Code39","L"],["Code93","L"],["Code128","L"],["DataBar","L"],["DataBarExpanded","L"],["DataMatrix","M"],["EAN-8","L"],["EAN-13","L"],["ITF","L"],["MaxiCode","M"],["PDF417","M"],["QRCode","M"],["UPC-A","L"],["UPC-E","L"],["MicroQRCode","M"],["rMQRCode","M"],["DXFilmEdge","L"],["DataBarLimited","L"]],R=M.map(([i])=>i),gt=R.filter((i,f)=>M[f][1]==="L"),Je=R.filter((i,f)=>M[f][1]==="M");function Rt(i){switch(i){case"Linear-Codes":return gt.reduce((f,c)=>f|Rt(c),0);case"Matrix-Codes":return Je.reduce((f,c)=>f|Rt(c),0);case"Any":return(1<<M.length)-1;case"None":return 0;default:return 1<<R.indexOf(i)}}function Ke(i){if(i===0)return"None";const f=31-Math.clz32(i);return R[f]}function tr(i){return i.reduce((f,c)=>f|Rt(c),0)}const er=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function rr(i){return er.indexOf(i)}const ee=["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","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function nr(i){return i==="UnicodeBig"?ee.indexOf("UTF16BE"):ee.indexOf(i)}const ar=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function or(i){return ar[i]}const ir=["Ignore","Read","Require"];function sr(i){return ir.indexOf(i)}const ur=["Plain","ECI","HRI","Hex","Escaped"];function cr(i){return ur.indexOf(i)}const wt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown"};function re(i){return{...i,formats:tr(i.formats),binarizer:rr(i.binarizer),eanAddOnSymbol:sr(i.eanAddOnSymbol),textMode:cr(i.textMode),characterSet:nr(i.characterSet)}}function lr(i){return{...i,format:Ke(i.format),contentType:or(i.contentType),eccLevel:i.ecLevel}}const fr="2.1.2",dr="a1516b34167cff504bf3c83698ea841e13a8f7f1",hr={locateFile:(i,f)=>{const c=i.match(/_(.+?)\.wasm$/);return c?`https://fastly.jsdelivr.net/npm/zxing-wasm@2.1.2/dist/${c[1]}/${i}`:f+i}},$t=new WeakMap;function pr(i,f){return Object.is(i,f)||Object.keys(i).length===Object.keys(f).length&&Object.keys(i).every(c=>Object.prototype.hasOwnProperty.call(f,c)&&i[c]===f[c])}function ne(i,{overrides:f,equalityFn:c=pr,fireImmediately:T=!1}={}){var $;const[S,F]=($=$t.get(i))!=null?$:[hr],W=f!=null?f:S;let A;if(T){if(F&&(A=c(S,W)))return F;const j=i({...W});return $t.set(i,[W,j]),j}(A!=null?A:c(S,W))||$t.set(i,[W])}function vr(i){$t.delete(i)}async function yr(i,f,c=wt){const T={...wt,...c},$=await ne(i,{fireImmediately:!0});let S,F;if("width"in f&&"height"in f&&"data"in f){const{data:A,data:{byteLength:j},width:B,height:Q}=f;F=$._malloc(j),$.HEAPU8.set(A,F),S=$.readBarcodesFromPixmap(F,B,Q,re(T))}else{let A,j;if("buffer"in f)[A,j]=[f.byteLength,f];else if("byteLength"in f)[A,j]=[f.byteLength,new Uint8Array(f)];else if("size"in f)[A,j]=[f.size,new Uint8Array(await f.arrayBuffer())];else throw new TypeError("Invalid input type");F=$._malloc(A),$.HEAPU8.set(j,F),S=$.readBarcodesFromImage(F,A,re(T))}$._free(F);const W=[];for(let A=0;A<S.size();++A)W.push(lr(S.get(A)));return W}({...wt,formats:[...wt.formats]});var Bt=async function(i={}){var f,c=i,T,$,S=new Promise((e,t)=>{T=e,$=t}),F=typeof window=="object",W=typeof Bun<"u",A=typeof WorkerGlobalScope<"u";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var j="./this.program",B="";function Q(e){return c.locateFile?c.locateFile(e,B):B+e}var ot,J;(F||A||W)&&(A?B=self.location.href:typeof document<"u"&&document.currentScript&&(B=document.currentScript.src),B.startsWith("blob:")?B="":B=B.slice(0,B.replace(/[?#].*/,"").lastIndexOf("/")+1),A&&(J=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),ot=async e=>{var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)});var ft=console.log.bind(console),z=console.error.bind(console),K,it,ye=!1,tt,V,dt,bt,st,P,me,ge;function we(){var e=it.buffer;tt=new Int8Array(e),dt=new Int16Array(e),c.HEAPU8=V=new Uint8Array(e),bt=new Uint16Array(e),st=new Int32Array(e),P=new Uint32Array(e),me=new Float32Array(e),ge=new Float64Array(e)}function Br(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)Zr(c.preRun.shift());$e(Ce)}function Lr(){_.ya()}function Wr(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)Yr(c.postRun.shift());$e(be)}var et=0,ht=null;function Ur(e){var t;et++,(t=c.monitorRunDependencies)===null||t===void 0||t.call(c,et)}function Vr(e){var t;if(et--,(t=c.monitorRunDependencies)===null||t===void 0||t.call(c,et),et==0&&ht){var r=ht;ht=null,r()}}function Ut(e){var t;(t=c.onAbort)===null||t===void 0||t.call(c,e),e="Aborted("+e+")",z(e),ye=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw $(r),r}var Ct;function kr(){return Q("zxing_reader.wasm")}function Hr(e){if(e==Ct&&K)return new Uint8Array(K);if(J)return J(e);throw"both async and sync fetching of the wasm failed"}async function Nr(e){if(!K)try{var t=await ot(e);return new Uint8Array(t)}catch{}return Hr(e)}async function zr(e,t){try{var r=await Nr(e),n=await WebAssembly.instantiate(r,t);return n}catch(a){z(`failed to asynchronously prepare wasm: ${a}`),Ut(a)}}async function Gr(e,t,r){if(!e&&typeof WebAssembly.instantiateStreaming=="function")try{var n=fetch(t,{credentials:"same-origin"}),a=await WebAssembly.instantiateStreaming(n,r);return a}catch(o){z(`wasm streaming compile failed: ${o}`),z("falling back to ArrayBuffer instantiation")}return zr(t,r)}function Xr(){return{a:xa}}async function qr(){function e(o,u){return _=o.exports,it=_.xa,we(),xe=_.Ba,Vr(),_}Ur();function t(o){return e(o.instance)}var r=Xr();if(c.instantiateWasm)return new Promise((o,u)=>{c.instantiateWasm(r,(s,l)=>{o(e(s))})});Ct!=null||(Ct=kr());try{var n=await Gr(K,Ct,r),a=t(n);return a}catch(o){return $(o),Promise.reject(o)}}var $e=e=>{for(;e.length>0;)e.shift()(c)},be=[],Yr=e=>be.push(e),Ce=[],Zr=e=>Ce.push(e),y=e=>Ra(e),m=()=>Ba(),Tt=[],Pt=0,Qr=e=>{var t=new Vt(e);return t.get_caught()||(t.set_caught(!0),Pt--),t.set_rethrown(!1),Tt.push(t),Wa(e),Fa(e)},G=0,Jr=()=>{v(0,0);var e=Tt.pop();La(e.excPtr),G=0};class Vt{constructor(t){this.excPtr=t,this.ptr=t-24}set_type(t){P[this.ptr+4>>2]=t}get_type(){return P[this.ptr+4>>2]}set_destructor(t){P[this.ptr+8>>2]=t}get_destructor(){return P[this.ptr+8>>2]}set_caught(t){t=t?1:0,tt[this.ptr+12]=t}get_caught(){return tt[this.ptr+12]!=0}set_rethrown(t){t=t?1:0,tt[this.ptr+13]=t}get_rethrown(){return tt[this.ptr+13]!=0}init(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r)}set_adjusted_ptr(t){P[this.ptr+16>>2]=t}get_adjusted_ptr(){return P[this.ptr+16>>2]}}var Et=e=>ja(e),kt=e=>{var t=G;if(!t)return Et(0),0;var r=new Vt(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return Et(0),t;for(var a of e){if(a===0||a===n)break;var o=r.ptr+16;if(Ua(a,n,o))return Et(a),t}return Et(n),t},Kr=()=>kt([]),tn=e=>kt([e]),en=(e,t)=>kt([e,t]),rn=()=>{var e=Tt.pop();e||Ut("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Tt.push(e),e.set_rethrown(!0),e.set_caught(!1),Pt++),G=t,G},nn=(e,t,r)=>{var n=new Vt(e);throw n.init(t,r),G=e,Pt++,G},an=()=>Pt,on=e=>{throw G||(G=e),G},sn=()=>Ut(""),_t={},Ht=e=>{for(;e.length;){var t=e.pop(),r=e.pop();r(t)}};function pt(e){return this.fromWireType(P[e>>2])}var ut={},rt={},Ot={},un=c.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},At=e=>{throw new un(e)},nt=(e,t,r)=>{e.forEach(s=>Ot[s]=t);function n(s){var l=r(s);l.length!==e.length&&At("Mismatched type converter count");for(var d=0;d<e.length;++d)N(e[d],l[d])}var a=new Array(t.length),o=[],u=0;t.forEach((s,l)=>{rt.hasOwnProperty(s)?a[l]=rt[s]:(o.push(s),ut.hasOwnProperty(s)||(ut[s]=[]),ut[s].push(()=>{a[l]=rt[s],++u,u===o.length&&n(a)}))}),o.length===0&&n(a)},cn=e=>{var t=_t[e];delete _t[e];var r=t.rawConstructor,n=t.rawDestructor,a=t.fields,o=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));nt([e],o,u=>{var s={};return a.forEach((l,d)=>{var h=l.fieldName,p=u[d],w=u[d].optional,b=l.getter,O=l.getterContext,D=u[d+a.length],I=l.setter,x=l.setterContext;s[h]={read:Z=>p.fromWireType(b(O,Z)),write:(Z,U)=>{var k=[];I(x,Z,D.toWireType(k,U)),Ht(k)},optional:w}}),[{name:t.name,fromWireType:l=>{var d={};for(var h in s)d[h]=s[h].read(l);return n(l),d},toWireType:(l,d)=>{for(var h in s)if(!(h in d)&&!s[h].optional)throw new TypeError(`Missing field: "${h}"`);var p=r();for(h in s)s[h].write(p,d[h]);return l!==null&&l.push(n,p),p},argPackAdvance:X,readValueFromPointer:pt,destructorFunction:n}]})},ln=(e,t,r,n,a)=>{},fn=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Te=e},Te,L=e=>{for(var t="",r=e;V[r];)t+=Te[V[r++]];return t},vt=c.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},C=e=>{throw new vt(e)};function dn(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=t.name;if(e||C(`type "${n}" must have a positive integer typeid pointer`),rt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(rt[e]=t,delete Ot[e],ut.hasOwnProperty(e)){var a=ut[e];delete ut[e],a.forEach(o=>o())}}function N(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return dn(e,t,r)}var X=8,hn=(e,t,r,n)=>{t=L(t),N(e,{name:t,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:X,readValueFromPointer:function(a){return this.fromWireType(V[a])},destructorFunction:null})},pn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Nt=e=>{function t(r){return r.$$.ptrType.registeredClass.name}C(t(e)+" instance already deleted")},zt=!1,Pe=e=>{},vn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Ee=e=>{e.count.value-=1;var t=e.count.value===0;t&&vn(e)},yt=e=>typeof FinalizationRegistry>"u"?(yt=t=>t,e):(zt=new FinalizationRegistry(t=>{Ee(t.$$)}),yt=t=>{var r=t.$$,n=!!r.smartPtr;if(n){var a={$$:r};zt.register(t,a,t)}return t},Pe=t=>zt.unregister(t),yt(e)),yn=()=>{let e=St.prototype;Object.assign(e,{isAliasOf(r){if(!(this instanceof St)||!(r instanceof St))return!1;var n=this.$$.ptrType.registeredClass,a=this.$$.ptr;r.$$=r.$$;for(var o=r.$$.ptrType.registeredClass,u=r.$$.ptr;n.baseClass;)a=n.upcast(a),n=n.baseClass;for(;o.baseClass;)u=o.upcast(u),o=o.baseClass;return n===o&&a===u},clone(){if(this.$$.ptr||Nt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=yt(Object.create(Object.getPrototypeOf(this),{$$:{value:pn(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Pe(this),Ee(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});const t=Symbol.dispose;t&&(e[t]=e.delete)};function St(){}var Gt=(e,t)=>Object.defineProperty(t,"name",{value:e}),_e={},Oe=(e,t,r)=>{if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(){for(var a=arguments.length,o=new Array(a),u=0;u<a;u++)o[u]=arguments[u];return e[t].overloadTable.hasOwnProperty(o.length)||C(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[o.length].apply(this,o)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},Ae=(e,t,r)=>{c.hasOwnProperty(e)?((r===void 0||c[e].overloadTable!==void 0&&c[e].overloadTable[r]!==void 0)&&C(`Cannot register public name '${e}' twice`),Oe(c,e,e),c[e].overloadTable.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[e].overloadTable[r]=t):(c[e]=t,c[e].argCount=r)},mn=48,gn=57,wn=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=mn&&t<=gn?`_${e}`:e};function $n(e,t,r,n,a,o,u,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=u,this.downcast=s,this.pureVirtualFunctions=[]}var Xt=(e,t,r)=>{for(;t!==r;)t.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function bn(e,t){if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;t.$$||C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Xt(t.$$.ptr,r,this.registeredClass);return n}function Cn(e,t){var r;if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;(!t||!t.$$)&&C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&C(`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=Xt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:C(`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 a=t.clone();r=this.rawShare(r,Y.toHandle(()=>a.delete())),e!==null&&e.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function Tn(e,t){if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;t.$$||C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&C(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Xt(t.$$.ptr,r,this.registeredClass);return n}var Se=(e,t,r)=>{if(t===r)return e;if(r.baseClass===void 0)return null;var n=Se(e,t,r.baseClass);return n===null?null:r.downcast(n)},Pn={},En=(e,t)=>{for(t===void 0&&C("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},_n=(e,t)=>(t=En(e,t),Pn[t]),It=(e,t)=>{(!t.ptrType||!t.ptr)&&At("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,n=!!t.smartPtr;return r!==n&&At("Both smartPtrType and smartPtr must be specified"),t.count={value:1},yt(Object.create(e,{$$:{value:t,writable:!0}}))};function On(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=_n(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?It(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):It(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o=this.registeredClass.getActualType(t),u=_e[o];if(!u)return a.call(this);var s;this.isConst?s=u.constPointerType:s=u.pointerType;var l=Se(t,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?It(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):It(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var An=()=>{Object.assign(Dt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:X,readValueFromPointer:pt,fromWireType:On})};function Dt(e,t,r,n,a,o,u,s,l,d,h){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=h,!a&&t.baseClass===void 0?n?(this.toWireType=bn,this.destructorFunction=null):(this.toWireType=Tn,this.destructorFunction=null):this.toWireType=Cn}var Ie=(e,t,r)=>{c.hasOwnProperty(e)||At("Replacing nonexistent public symbol"),c[e].overloadTable!==void 0&&r!==void 0?c[e].overloadTable[r]=t:(c[e]=t,c[e].argCount=r)},De=[],xe,g=e=>{var t=De[e];return t||(De[e]=t=xe.get(e)),t},Sn=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.includes("j"))return dynCallLegacy(e,t,r);var n=g(t),a=n(...r);return a},In=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return Sn(e,t,a,r)}},H=function(e,t){e=L(e);function r(){if(e.includes("j"))return In(e,t);var a=g(t);return a}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${e}: ${t}`),n};class Dn extends Error{}var Me=e=>{var t=Ma(e),r=L(t);return at(t),r},xt=(e,t)=>{var r=[],n={};function a(o){if(!n[o]&&!rt[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw t.forEach(a),new Dn(`${e}: `+r.map(Me).join([", "]))},xn=(e,t,r,n,a,o,u,s,l,d,h,p,w)=>{h=L(h),o=H(a,o),s&&(s=H(u,s)),d&&(d=H(l,d)),w=H(p,w);var b=wn(h);Ae(b,function(){xt(`Cannot construct ${h} due to unbound types`,[n])}),nt([e,t,r],n?[n]:[],O=>{O=O[0];var D,I;n?(D=O.registeredClass,I=D.instancePrototype):I=St.prototype;var x=Gt(h,function(){if(Object.getPrototypeOf(this)!==Z)throw new vt(`Use 'new' to construct ${h}`);if(U.constructor_body===void 0)throw new vt(`${h} has no accessible constructor`);for(var ze=arguments.length,Ft=new Array(ze),jt=0;jt<ze;jt++)Ft[jt]=arguments[jt];var Ge=U.constructor_body[Ft.length];if(Ge===void 0)throw new vt(`Tried to invoke ctor of ${h} with invalid number of parameters (${Ft.length}) - expected (${Object.keys(U.constructor_body).toString()}) parameters instead!`);return Ge.apply(this,Ft)}),Z=Object.create(I,{constructor:{value:x}});x.prototype=Z;var U=new $n(h,x,Z,w,D,o,s,d);if(U.baseClass){var k,Mt;(Mt=(k=U.baseClass).__derivedClasses)!==null&&Mt!==void 0||(k.__derivedClasses=[]),U.baseClass.__derivedClasses.push(U)}var _o=new Dt(h,U,!0,!1,!1),He=new Dt(h+"*",U,!1,!1,!1),Ne=new Dt(h+" const*",U,!1,!0,!1);return _e[e]={pointerType:He,constPointerType:Ne},Ie(b,x),[_o,He,Ne]})},qt=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(P[t+n*4>>2]);return r};function Mn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Yt(e,t,r,n,a,o){var u=t.length;u<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=t[1]!==null&&r!==null,l=Mn(t),d=t[0].name!=="void",h=u-2,p=new Array(h),w=[],b=[],O=function(){b.length=0;var D;w.length=s?2:1,w[0]=a,s&&(D=t[1].toWireType(b,this),w[1]=D);for(var I=0;I<h;++I)p[I]=t[I+2].toWireType(b,I<0||arguments.length<=I?void 0:arguments[I]),w.push(p[I]);var x=n(...w);function Z(U){if(l)Ht(b);else for(var k=s?1:2;k<t.length;k++){var Mt=k===1?D:p[k-2];t[k].destructorFunction!==null&&t[k].destructorFunction(Mt)}if(d)return t[0].fromWireType(U)}return Z(x)};return Gt(e,O)}var Fn=(e,t,r,n,a,o)=>{var u=qt(t,r);a=H(n,a),nt([],[e],s=>{s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[t-1]!==void 0)throw new vt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[t-1]=()=>{xt(`Cannot construct ${s.name} due to unbound types`,u)},nt([],u,d=>(d.splice(1,0,null),s.registeredClass.constructor_body[t-1]=Yt(l,d,null,a,o),[])),[]})},Fe=e=>{e=e.trim();const t=e.indexOf("(");return t===-1?e:e.slice(0,t)},jn=(e,t,r,n,a,o,u,s,l,d)=>{var h=qt(r,n);t=L(t),t=Fe(t),o=H(a,o),nt([],[e],p=>{p=p[0];var w=`${p.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&p.registeredClass.pureVirtualFunctions.push(t);function b(){xt(`Cannot call ${w} due to unbound types`,h)}var O=p.registeredClass.instancePrototype,D=O[t];return D===void 0||D.overloadTable===void 0&&D.className!==p.name&&D.argCount===r-2?(b.argCount=r-2,b.className=p.name,O[t]=b):(Oe(O,t,w),O[t].overloadTable[r-2]=b),nt([],h,I=>{var x=Yt(w,I,p,o,u);return O[t].overloadTable===void 0?(x.argCount=r-2,O[t]=x):O[t].overloadTable[r-2]=x,[]}),[]})},Zt=[],q=[],Qt=e=>{e>9&&--q[e+1]===0&&(q[e]=void 0,Zt.push(e))},Rn=()=>q.length/2-5-Zt.length,Bn=()=>{q.push(0,1,void 0,1,null,1,!0,1,!1,1),c.count_emval_handles=Rn},Y={toValue:e=>(e||C(`Cannot use deleted val. handle = ${e}`),q[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=Zt.pop()||q.length;return q[t]=e,q[t+1]=1,t}}}},je={name:"emscripten::val",fromWireType:e=>{var t=Y.toValue(e);return Qt(e),t},toWireType:(e,t)=>Y.toHandle(t),argPackAdvance:X,readValueFromPointer:pt,destructorFunction:null},Ln=e=>N(e,je),Wn=(e,t)=>{switch(t){case 4:return function(r){return this.fromWireType(me[r>>2])};case 8:return function(r){return this.fromWireType(ge[r>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Un=(e,t,r)=>{t=L(t),N(e,{name:t,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:X,readValueFromPointer:Wn(t,r),destructorFunction:null})},Vn=(e,t,r,n,a,o,u,s)=>{var l=qt(t,r);e=L(e),e=Fe(e),a=H(n,a),Ae(e,function(){xt(`Cannot call ${e} due to unbound types`,l)},t-1),nt([],l,d=>{var h=[d[0],null].concat(d.slice(1));return Ie(e,Yt(e,h,null,a,o),t-1),[]})},kn=(e,t,r)=>{switch(t){case 1:return r?n=>tt[n]:n=>V[n];case 2:return r?n=>dt[n>>1]:n=>bt[n>>1];case 4:return r?n=>st[n>>2]:n=>P[n>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Hn=(e,t,r,n,a)=>{t=L(t);var o=h=>h;if(n===0){var u=32-8*r;o=h=>h<<u>>>u}var s=t.includes("unsigned"),l=(h,p)=>{},d;s?d=function(h,p){return l(p,this.name),p>>>0}:d=function(h,p){return l(p,this.name),p},N(e,{name:t,fromWireType:o,toWireType:d,argPackAdvance:X,readValueFromPointer:kn(t,r,n!==0),destructorFunction:null})},Nn=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[t];function o(u){var s=P[u>>2],l=P[u+4>>2];return new a(tt.buffer,l,s)}r=L(r),N(e,{name:r,fromWireType:o,argPackAdvance:X,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},zn=Object.assign({optional:!0},je),Gn=(e,t)=>{N(e,zn)},Xn=(e,t,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,u=0;u<e.length;++u){var s=e.charCodeAt(u);if(s>=55296&&s<=57343){var l=e.charCodeAt(++u);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|s&63}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|s&63}}return t[r]=0,r-a},ct=(e,t,r)=>Xn(e,V,t,r),Re=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},Be=typeof TextDecoder<"u"?new TextDecoder:void 0,Le=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN;for(var n=t+r,a=t;e[a]&&!(a>=n);)++a;if(a-t>16&&e.buffer&&Be)return Be.decode(e.subarray(t,a));for(var o="";t<a;){var u=e[t++];if(!(u&128)){o+=String.fromCharCode(u);continue}var s=e[t++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|s);continue}var l=e[t++]&63;if((u&240)==224?u=(u&15)<<12|s<<6|l:u=(u&7)<<18|s<<12|l<<6|e[t++]&63,u<65536)o+=String.fromCharCode(u);else{var d=u-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},qn=(e,t)=>e?Le(V,e,t):"",Yn=(e,t)=>{t=L(t),N(e,{name:t,fromWireType(r){for(var n=P[r>>2],a=r+4,o,s,u=a,s=0;s<=n;++s){var l=a+s;if(s==n||V[l]==0){var d=l-u,h=qn(u,d);o===void 0?o=h:(o+="\0",o+=h),u=l+1}}return at(r),o},toWireType(r,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var a,o=typeof n=="string";o||ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT==1||C("Cannot pass non-string to std::string"),o?a=Re(n):a=n.length;var u=ke(4+a+1),s=u+4;return P[u>>2]=a,o?ct(n,s,a+1):V.set(n,s),r!==null&&r.push(at,u),u},argPackAdvance:X,readValueFromPointer:pt,destructorFunction(r){at(r)}})},We=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Zn=(e,t)=>{for(var r=e,n=r>>1,a=n+t/2;!(n>=a)&&bt[n];)++n;if(r=n<<1,r-e>32&&We)return We.decode(V.subarray(e,r));for(var o="",u=0;!(u>=t/2);++u){var s=dt[e+u*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Qn=(e,t,r)=>{if(r!=null||(r=2147483647),r<2)return 0;r-=2;for(var n=t,a=r<e.length*2?r/2:e.length,o=0;o<a;++o){var u=e.charCodeAt(o);dt[t>>1]=u,t+=2}return dt[t>>1]=0,t-n},Jn=e=>e.length*2,Kn=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var a=st[e+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},ta=(e,t,r)=>{if(r!=null||(r=2147483647),r<4)return 0;for(var n=t,a=n+r-4,o=0;o<e.length;++o){var u=e.charCodeAt(o);if(u>=55296&&u<=57343){var s=e.charCodeAt(++o);u=65536+((u&1023)<<10)|s&1023}if(st[t>>2]=u,t+=4,t+4>a)break}return st[t>>2]=0,t-n},ea=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},ra=(e,t,r)=>{r=L(r);var n,a,o,u;t===2?(n=Zn,a=Qn,u=Jn,o=s=>bt[s>>1]):t===4&&(n=Kn,a=ta,u=ea,o=s=>P[s>>2]),N(e,{name:r,fromWireType:s=>{for(var l=P[s>>2],d,h=s+4,p=0;p<=l;++p){var w=s+4+p*t;if(p==l||o(w)==0){var b=w-h,O=n(h,b);d===void 0?d=O:(d+="\0",d+=O),h=w+t}}return at(s),d},toWireType:(s,l)=>{typeof l!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var d=u(l),h=ke(4+d+t);return P[h>>2]=d/t,a(l,h+4,d+t),s!==null&&s.push(at,h),h},argPackAdvance:X,readValueFromPointer:pt,destructorFunction(s){at(s)}})},na=(e,t,r,n,a,o)=>{_t[e]={name:L(t),rawConstructor:H(r,n),rawDestructor:H(a,o),fields:[]}},aa=(e,t,r,n,a,o,u,s,l,d)=>{_t[e].fields.push({fieldName:L(t),getterReturnType:r,getter:H(n,a),getterContext:o,setterArgumentType:u,setter:H(s,l),setterContext:d})},oa=(e,t)=>{t=L(t),N(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Jt=[],ia=(e,t,r,n)=>(e=Jt[e],t=Y.toValue(t),e(null,t,r,n)),sa={},ua=e=>{var t=sa[e];return t===void 0?L(e):t},Ue=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var r=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return r||delete t.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},ca=e=>e===0?Y.toHandle(Ue()):(e=ua(e),Y.toHandle(Ue()[e])),la=e=>{var t=Jt.length;return Jt.push(e),t},Ve=(e,t)=>{var r=rt[e];return r===void 0&&C(`${t} has unknown type ${Me(e)}`),r},fa=(e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Ve(P[t+n*4>>2],`parameter ${n}`);return r},da=(e,t,r)=>{var n=[],a=e.toWireType(n,r);return n.length&&(P[t>>2]=Y.toHandle(n)),a},ha=Reflect.construct,pa=(e,t,r)=>{var n=fa(e,t),a=n.shift();e--;var o=new Array(e),u=(l,d,h,p)=>{for(var w=0,b=0;b<e;++b)o[b]=n[b].readValueFromPointer(p+w),w+=n[b].argPackAdvance;var O=r===1?ha(d,o):d.apply(l,o);return da(a,h,O)},s=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return la(Gt(s,u))},va=e=>{e>9&&(q[e+1]+=1)},ya=e=>{var t=Y.toValue(e);Ht(t),Qt(e)},ma=(e,t)=>{e=Ve(e,"_emval_take_value");var r=e.readValueFromPointer(t);return Y.toHandle(r)},ga=(e,t,r,n)=>{var a=new Date().getFullYear(),o=new Date(a,0,1),u=new Date(a,6,1),s=o.getTimezoneOffset(),l=u.getTimezoneOffset(),d=Math.max(s,l);P[e>>2]=d*60,st[t>>2]=+(s!=l);var h=b=>{var O=b>=0?"-":"+",D=Math.abs(b),I=String(Math.floor(D/60)).padStart(2,"0"),x=String(D%60).padStart(2,"0");return`UTC${O}${I}${x}`},p=h(s),w=h(l);l<s?(ct(p,r,17),ct(w,n,17)):(ct(p,n,17),ct(w,r,17))},wa=()=>2147483648,$a=(e,t)=>Math.ceil(e/t)*t,ba=e=>{var t=it.buffer,r=(e-t.byteLength+65535)/65536|0;try{return it.grow(r),we(),1}catch{}},Ca=e=>{var t=V.length;e>>>=0;var r=wa();if(e>r)return!1;for(var n=1;n<=4;n*=2){var a=t*(1+.2/n);a=Math.min(a,e+100663296);var o=Math.min(r,$a(Math.max(e,a),65536)),u=ba(o);if(u)return!0}return!1},Kt={},Ta=()=>j||"./this.program",mt=()=>{if(!mt.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Ta()};for(var r in Kt)Kt[r]===void 0?delete t[r]:t[r]=Kt[r];var n=[];for(var r in t)n.push(`${r}=${t[r]}`);mt.strings=n}return mt.strings},Pa=(e,t)=>{var r=0,n=0;for(var a of mt()){var o=t+r;P[e+n>>2]=o,r+=ct(a,o,1/0)+1,n+=4}return 0},Ea=(e,t)=>{var r=mt();P[e>>2]=r.length;var n=0;for(var a of r)n+=Re(a)+1;return P[t>>2]=n,0},_a=e=>52;function Oa(e,t,r,n,a){return 70}var Aa=[null,[],[]],Sa=(e,t)=>{var r=Aa[e];t===0||t===10?((e===1?ft:z)(Le(r)),r.length=0):r.push(t)},Ia=(e,t,r,n)=>{for(var a=0,o=0;o<r;o++){var u=P[t>>2],s=P[t+4>>2];t+=8;for(var l=0;l<s;l++)Sa(e,V[u+l]);a+=s}return P[n>>2]=a,0},Da=e=>e;fn(),yn(),An(),Bn(),c.noExitRuntime&&c.noExitRuntime,c.print&&(ft=c.print),c.printErr&&(z=c.printErr),c.wasmBinary&&(K=c.wasmBinary),c.arguments&&c.arguments,c.thisProgram&&(j=c.thisProgram);var xa={s:Qr,w:Jr,a:Kr,j:tn,m:en,N:rn,p:nn,da:an,d:on,_:sn,sa:cn,Z:ln,na:hn,qa:xn,pa:Fn,F:jn,la:Ln,R:Un,S:Vn,y:Hn,t:Nn,ra:Gn,ma:Yn,O:ra,K:na,ta:aa,oa,V:ia,ua:Qt,wa:ca,$:pa,T:va,va:ya,ka:ma,aa:ga,ea:Ca,ba:Pa,ca:Ea,fa:_a,X:Oa,Q:Ia,I:lo,C:ho,U:qa,P:$o,q:io,b:Na,D:co,ia:vo,c:Ga,ha:yo,h:Xa,i:Ka,r:eo,M:uo,v:no,E:oo,J:so,A:po,H:bo,W:Po,k:Za,f:Ya,e:za,g:Ha,L:wo,l:Ja,ja:fo,o:ro,x:to,u:ao,ga:go,B:mo,n:Qa,G:Co,Y:To,z:Da},_=await qr();_.ya;var Ma=_.za,at=c._free=_.Aa,ke=c._malloc=_.Ca,Fa=_.Da,v=_.Ea,ja=_.Fa,Ra=_.Ga,Ba=_.Ha,La=_.Ia,Wa=_.Ja,Ua=_.Ka;c.dynCall_viijii=_.La;var Va=c.dynCall_vij=_.Ma;c.dynCall_jiji=_.Na;var ka=c.dynCall_jiiii=_.Oa;c.dynCall_iiiiij=_.Pa,c.dynCall_iiiiijj=_.Qa,c.dynCall_iiiiiijj=_.Ra;function Ha(e,t,r,n){var a=m();try{g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function Na(e,t){var r=m();try{return g(e)(t)}catch(n){if(y(r),n!==n+0)throw n;v(1,0)}}function za(e,t,r){var n=m();try{g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function Ga(e,t,r){var n=m();try{return g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function Xa(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function qa(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function Ya(e,t){var r=m();try{g(e)(t)}catch(n){if(y(r),n!==n+0)throw n;v(1,0)}}function Za(e){var t=m();try{g(e)()}catch(r){if(y(t),r!==r+0)throw r;v(1,0)}}function Qa(e,t,r,n,a,o,u,s,l,d,h){var p=m();try{g(e)(t,r,n,a,o,u,s,l,d,h)}catch(w){if(y(p),w!==w+0)throw w;v(1,0)}}function Ja(e,t,r,n,a){var o=m();try{g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function Ka(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function to(e,t,r,n,a,o,u){var s=m();try{g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function eo(e,t,r,n,a,o){var u=m();try{return g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function ro(e,t,r,n,a,o){var u=m();try{g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function no(e,t,r,n,a,o,u){var s=m();try{return g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function ao(e,t,r,n,a,o,u,s){var l=m();try{g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function oo(e,t,r,n,a,o,u,s){var l=m();try{return g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function io(e){var t=m();try{return g(e)()}catch(r){if(y(t),r!==r+0)throw r;v(1,0)}}function so(e,t,r,n,a,o,u,s,l){var d=m();try{return g(e)(t,r,n,a,o,u,s,l)}catch(h){if(y(d),h!==h+0)throw h;v(1,0)}}function uo(e,t,r,n,a,o,u){var s=m();try{return g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function co(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function lo(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function fo(e,t,r,n,a,o,u,s){var l=m();try{g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function ho(e,t,r,n,a,o){var u=m();try{return g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function po(e,t,r,n,a,o,u,s,l,d){var h=m();try{return g(e)(t,r,n,a,o,u,s,l,d)}catch(p){if(y(h),p!==p+0)throw p;v(1,0)}}function vo(e,t,r){var n=m();try{return g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function yo(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function mo(e,t,r,n,a,o,u,s,l,d){var h=m();try{g(e)(t,r,n,a,o,u,s,l,d)}catch(p){if(y(h),p!==p+0)throw p;v(1,0)}}function go(e,t,r,n,a,o,u,s,l){var d=m();try{g(e)(t,r,n,a,o,u,s,l)}catch(h){if(y(d),h!==h+0)throw h;v(1,0)}}function wo(e,t,r,n,a,o,u){var s=m();try{g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function $o(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function bo(e,t,r,n,a,o,u,s,l,d,h,p){var w=m();try{return g(e)(t,r,n,a,o,u,s,l,d,h,p)}catch(b){if(y(w),b!==b+0)throw b;v(1,0)}}function Co(e,t,r,n,a,o,u,s,l,d,h,p,w,b,O,D){var I=m();try{g(e)(t,r,n,a,o,u,s,l,d,h,p,w,b,O,D)}catch(x){if(y(I),x!==x+0)throw x;v(1,0)}}function To(e,t,r,n){var a=m();try{Va(e,t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function Po(e,t,r,n,a){var o=m();try{return ka(e,t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function te(){if(et>0){ht=te;return}if(Br(),et>0){ht=te;return}function e(){var t;c.calledRun=!0,!ye&&(Lr(),T(c),(t=c.onRuntimeInitialized)===null||t===void 0||t.call(c),Wr())}c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1),e()},1)):e()}function Eo(){if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.shift()()}return Eo(),te(),f=S,f};function Lt(i){return ne(Bt,i)}function mr(){return vr(Bt)}function gr(i){Lt({overrides:i,equalityFn:Object.is,fireImmediately:!1})}async function wr(i,f){return yr(Bt,i,f)}const $r="3c07027dbfd6da47330ac18e74e6924019d9ac9a4c1e161b800666f9e3c925ca",ae=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["databar_limited","DataBarLimited"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"],["any","Any"]],br=[...ae,["unknown"]].map(i=>i[0]),Wt=new Map(ae);function Cr(i){for(const[f,c]of Wt)if(i===c)return f;return"unknown"}function Tr(i){if(oe(i))return{width:i.naturalWidth,height:i.naturalHeight};if(ie(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(se(i))return{width:i.videoWidth,height:i.videoHeight};if(ce(i))return{width:i.width,height:i.height};if(fe(i))return{width:i.displayWidth,height:i.displayHeight};if(ue(i))return{width:i.width,height:i.height};if(le(i))return{width:i.width,height:i.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function oe(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLImageElement)}catch{return!1}}function ie(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.SVGImageElement)}catch{return!1}}function se(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLVideoElement)}catch{return!1}}function ue(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLCanvasElement)}catch{return!1}}function ce(i){try{return i instanceof ImageBitmap||Object.prototype.toString.call(i)==="[object ImageBitmap]"}catch{return!1}}function le(i){try{return i instanceof OffscreenCanvas||Object.prototype.toString.call(i)==="[object OffscreenCanvas]"}catch{return!1}}function fe(i){try{return i instanceof VideoFrame||Object.prototype.toString.call(i)==="[object VideoFrame]"}catch{return!1}}function Pr(i){try{return i instanceof Blob||Object.prototype.toString.call(i)==="[object Blob]"}catch{return!1}}function Er(i){try{return i instanceof ImageData||Object.prototype.toString.call(i)==="[object ImageData]"}catch{return!1}}function _r(i,f){try{const c=new OffscreenCanvas(i,f);if(c.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return c;throw void 0}catch{const c=document.createElement("canvas");return c.width=i,c.height=f,c}}async function de(i){if(oe(i)&&!await Ir(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ie(i)&&!await Dr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(fe(i)&&xr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(se(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ce(i)&&Fr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:c}=Tr(i);if(f===0||c===0)return null;const $=_r(f,c).getContext("2d");$.drawImage(i,0,0);try{return $.getImageData(0,0,f,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Or(i){let f;try{f=await createImageBitmap(i)}catch{try{if(globalThis.Image){f=new Image;let $="";try{$=URL.createObjectURL(i),f.src=$,await f.decode()}finally{URL.revokeObjectURL($)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await de(f)}function Ar(i){const{width:f,height:c}=i;if(f===0||c===0)return null;const T=i.getContext("2d");try{return T.getImageData(0,0,f,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Sr(i){if(Pr(i))return await Or(i);if(Er(i)){if(Mr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ue(i)||le(i)?Ar(i):await de(i)}async function Ir(i){try{return await i.decode(),!0}catch{return!1}}async function Dr(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function xr(i){return i.format===null}function Mr(i){return i.data.buffer.byteLength===0}function Fr(i){return i.width===0&&i.height===0}function he(i,f){return jr(i)?new DOMException(`${f}: ${i.message}`,i.name):Rr(i)?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}function jr(i){return i instanceof DOMException||Object.prototype.toString.call(i)==="[object DOMException]"}function Rr(i){return i instanceof Error||Object.prototype.toString.call(i)==="[object Error]"}class pe{constructor(f={}){Ze(this,lt);var c;try{const T=(c=f==null?void 0:f.formats)==null?void 0:c.filter($=>$!=="unknown");if((T==null?void 0:T.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const $ of T!=null?T:[])if(!Wt.has($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`);Qe(this,lt,T!=null?T:[]),Lt({fireImmediately:!0}).catch(()=>{})}catch(T){throw he(T,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return br.filter(f=>f!=="unknown")}async detect(f){try{const c=await Sr(f);if(c===null)return[];let T;const $={tryCode39ExtendedMode:!1,textMode:"Plain",formats:Ye(this,lt).map(S=>Wt.get(S))};try{T=await wr(c,$)}catch(S){throw console.error(S),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return T.map(S=>{const{topLeft:{x:F,y:W},topRight:{x:A,y:j},bottomLeft:{x:B,y:Q},bottomRight:{x:ot,y:J}}=S.position,ft=Math.min(F,A,B,ot),z=Math.min(W,j,Q,J),K=Math.max(F,A,B,ot),it=Math.max(W,j,Q,J);return{boundingBox:new DOMRectReadOnly(ft,z,K-ft,it-z),rawValue:S.text,format:Cr(S.format),cornerPoints:[{x:F,y:W},{x:A,y:j},{x:ot,y:J},{x:B,y:Q}]}})}catch(c){throw he(c,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return lt=new WeakMap,(ve=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=pe),E.BarcodeDetector=pe,E.ZXING_CPP_COMMIT=dr,E.ZXING_WASM_SHA256=$r,E.ZXING_WASM_VERSION=fr,E.prepareZXingModule=Lt,E.purgeZXingModule=mr,E.setZXingModuleOverrides=gr,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),E}({});
@@ -1 +1 @@
1
- var BarcodeDetectionAPI=function(E){"use strict";var Ge=E=>{throw TypeError(E)};var Xe=(E,M,j)=>M.has(E)||Ge("Cannot "+j);var qe=(E,M,j)=>(Xe(E,M,"read from private field"),j?j.call(E):M.get(E)),Ye=(E,M,j)=>M.has(E)?Ge("Cannot add the same private member more than once"):M instanceof WeakSet?M.add(E):M.set(E,j),Ze=(E,M,j,Q)=>(Xe(E,M,"write to private field"),Q?Q.call(E,j):M.set(E,j),j);var ft,pe;var M=typeof document<"u"?document.currentScript:null;const j=[["Aztec","M"],["Codabar","L"],["Code39","L"],["Code93","L"],["Code128","L"],["DataBar","L"],["DataBarExpanded","L"],["DataMatrix","M"],["EAN-8","L"],["EAN-13","L"],["ITF","L"],["MaxiCode","M"],["PDF417","M"],["QRCode","M"],["UPC-A","L"],["UPC-E","L"],["MicroQRCode","M"],["rMQRCode","M"],["DXFilmEdge","L"],["DataBarLimited","L"]],Q=j.map(([i])=>i),Qe=Q.filter((i,f)=>j[f][1]==="L"),Je=Q.filter((i,f)=>j[f][1]==="M");function jt(i){switch(i){case"Linear-Codes":return Qe.reduce((f,c)=>f|jt(c),0);case"Matrix-Codes":return Je.reduce((f,c)=>f|jt(c),0);case"Any":return(1<<j.length)-1;case"None":return 0;default:return 1<<Q.indexOf(i)}}function Ke(i){if(i===0)return"None";const f=31-Math.clz32(i);return Q[f]}function tr(i){return i.reduce((f,c)=>f|jt(c),0)}const er=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function rr(i){return er.indexOf(i)}const ee=["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","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function nr(i){return i==="UnicodeBig"?ee.indexOf("UTF16BE"):ee.indexOf(i)}const ar=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function or(i){return ar[i]}const ir=["Ignore","Read","Require"];function sr(i){return ir.indexOf(i)}const ur=["Plain","ECI","HRI","Hex","Escaped"];function cr(i){return ur.indexOf(i)}const wt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown"};function re(i){return{...i,formats:tr(i.formats),binarizer:rr(i.binarizer),eanAddOnSymbol:sr(i.eanAddOnSymbol),textMode:cr(i.textMode),characterSet:nr(i.characterSet)}}function lr(i){return{...i,format:Ke(i.format),contentType:or(i.contentType),eccLevel:i.ecLevel}}const fr="2.1.1",dr="559471ac8fe0d119db538bb43c0a58ce9e67fccf",hr={locateFile:(i,f)=>{const c=i.match(/_(.+?)\.wasm$/);return c?`https://fastly.jsdelivr.net/npm/zxing-wasm@2.1.1/dist/${c[1]}/${i}`:f+i}},$t=new WeakMap;function pr(i,f){return Object.is(i,f)||Object.keys(i).length===Object.keys(f).length&&Object.keys(i).every(c=>Object.prototype.hasOwnProperty.call(f,c)&&i[c]===f[c])}function ne(i,{overrides:f,equalityFn:c=pr,fireImmediately:T=!1}={}){var $;const[A,F]=($=$t.get(i))!=null?$:[hr],W=f!=null?f:A;let S;if(T){if(F&&(S=c(A,W)))return F;const R=i({...W});return $t.set(i,[W,R]),R}(S!=null?S:c(A,W))||$t.set(i,[W])}function vr(i){$t.delete(i)}async function yr(i,f,c=wt){const T={...wt,...c},$=await ne(i,{fireImmediately:!0});let A,F;if("width"in f&&"height"in f&&"data"in f){const{data:S,data:{byteLength:R},width:L,height:J}=f;F=$._malloc(R),$.HEAPU8.set(S,F),A=$.readBarcodesFromPixmap(F,L,J,re(T))}else{let S,R;if("buffer"in f)[S,R]=[f.byteLength,f];else if("byteLength"in f)[S,R]=[f.byteLength,new Uint8Array(f)];else if("size"in f)[S,R]=[f.size,new Uint8Array(await f.arrayBuffer())];else throw new TypeError("Invalid input type");F=$._malloc(S),$.HEAPU8.set(R,F),A=$.readBarcodesFromImage(F,S,re(T))}$._free(F);const W=[];for(let S=0;S<A.size();++S)W.push(lr(A.get(S)));return W}({...wt,formats:[...wt.formats]});var Lt=async function(i={}){var f,c=i,T,$,A=new Promise((e,t)=>{T=e,$=t}),F=typeof window=="object",W=typeof Bun<"u",S=typeof WorkerGlobalScope<"u";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var R="./this.program",L="";function J(e){return c.locateFile?c.locateFile(e,L):L+e}var it,K;(F||S||W)&&(S?L=self.location.href:typeof document<"u"&&document.currentScript&&(L=document.currentScript.src),L.startsWith("blob:")?L="":L=L.slice(0,L.replace(/[?#].*/,"").lastIndexOf("/")+1),S&&(K=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),it=async e=>{var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)});var dt=console.log.bind(console),z=console.error.bind(console),tt,st,ve=!1,et,V,ht,bt,ut,P,ye,me;function ge(){var e=st.buffer;et=new Int8Array(e),ht=new Int16Array(e),c.HEAPU8=V=new Uint8Array(e),bt=new Uint16Array(e),ut=new Int32Array(e),P=new Uint32Array(e),ye=new Float32Array(e),me=new Float64Array(e)}function Br(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)Qr(c.preRun.shift());we(be)}function Wr(){_.ya()}function Ur(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)Zr(c.postRun.shift());we($e)}var rt=0,pt=null;function Vr(e){var t;rt++,(t=c.monitorRunDependencies)===null||t===void 0||t.call(c,rt)}function kr(e){var t;if(rt--,(t=c.monitorRunDependencies)===null||t===void 0||t.call(c,rt),rt==0&&pt){var r=pt;pt=null,r()}}function Ut(e){var t;(t=c.onAbort)===null||t===void 0||t.call(c,e),e="Aborted("+e+")",z(e),ve=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw $(r),r}var Ct;function Hr(){return c.locateFile?J("zxing_reader.wasm"):new URL("../../reader/zxing_reader.wasm",M&&M.tagName.toUpperCase()==="SCRIPT"&&M.src||new URL("polyfill.js",document.baseURI).href).href}function Nr(e){if(e==Ct&&tt)return new Uint8Array(tt);if(K)return K(e);throw"both async and sync fetching of the wasm failed"}async function zr(e){if(!tt)try{var t=await it(e);return new Uint8Array(t)}catch{}return Nr(e)}async function Gr(e,t){try{var r=await zr(e),n=await WebAssembly.instantiate(r,t);return n}catch(a){z(`failed to asynchronously prepare wasm: ${a}`),Ut(a)}}async function Xr(e,t,r){if(!e&&typeof WebAssembly.instantiateStreaming=="function")try{var n=fetch(t,{credentials:"same-origin"}),a=await WebAssembly.instantiateStreaming(n,r);return a}catch(o){z(`wasm streaming compile failed: ${o}`),z("falling back to ArrayBuffer instantiation")}return Gr(t,r)}function qr(){return{a:Ma}}async function Yr(){function e(o,u){return _=o.exports,st=_.xa,ge(),xe=_.Ba,kr(),_}Vr();function t(o){return e(o.instance)}var r=qr();if(c.instantiateWasm)return new Promise((o,u)=>{c.instantiateWasm(r,(s,l)=>{o(e(s))})});Ct!=null||(Ct=Hr());try{var n=await Xr(tt,Ct,r),a=t(n);return a}catch(o){return $(o),Promise.reject(o)}}var we=e=>{for(;e.length>0;)e.shift()(c)},$e=[],Zr=e=>$e.push(e),be=[],Qr=e=>be.push(e),y=e=>La(e),m=()=>Ba(),Tt=[],Pt=0,Jr=e=>{var t=new Vt(e);return t.get_caught()||(t.set_caught(!0),Pt--),t.set_rethrown(!1),Tt.push(t),Ua(e),Ra(e)},G=0,Kr=()=>{v(0,0);var e=Tt.pop();Wa(e.excPtr),G=0};class Vt{constructor(t){this.excPtr=t,this.ptr=t-24}set_type(t){P[this.ptr+4>>2]=t}get_type(){return P[this.ptr+4>>2]}set_destructor(t){P[this.ptr+8>>2]=t}get_destructor(){return P[this.ptr+8>>2]}set_caught(t){t=t?1:0,et[this.ptr+12]=t}get_caught(){return et[this.ptr+12]!=0}set_rethrown(t){t=t?1:0,et[this.ptr+13]=t}get_rethrown(){return et[this.ptr+13]!=0}init(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r)}set_adjusted_ptr(t){P[this.ptr+16>>2]=t}get_adjusted_ptr(){return P[this.ptr+16>>2]}}var Et=e=>ja(e),kt=e=>{var t=G;if(!t)return Et(0),0;var r=new Vt(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return Et(0),t;for(var a of e){if(a===0||a===n)break;var o=r.ptr+16;if(Va(a,n,o))return Et(a),t}return Et(n),t},tn=()=>kt([]),en=e=>kt([e]),rn=(e,t)=>kt([e,t]),nn=()=>{var e=Tt.pop();e||Ut("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Tt.push(e),e.set_rethrown(!0),e.set_caught(!1),Pt++),G=t,G},an=(e,t,r)=>{var n=new Vt(e);throw n.init(t,r),G=e,Pt++,G},on=()=>Pt,sn=e=>{throw G||(G=e),G},un=()=>Ut(""),_t={},Ht=e=>{for(;e.length;){var t=e.pop(),r=e.pop();r(t)}};function vt(e){return this.fromWireType(P[e>>2])}var ct={},nt={},Ot={},cn=c.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},St=e=>{throw new cn(e)},at=(e,t,r)=>{e.forEach(s=>Ot[s]=t);function n(s){var l=r(s);l.length!==e.length&&St("Mismatched type converter count");for(var d=0;d<e.length;++d)N(e[d],l[d])}var a=new Array(t.length),o=[],u=0;t.forEach((s,l)=>{nt.hasOwnProperty(s)?a[l]=nt[s]:(o.push(s),ct.hasOwnProperty(s)||(ct[s]=[]),ct[s].push(()=>{a[l]=nt[s],++u,u===o.length&&n(a)}))}),o.length===0&&n(a)},ln=e=>{var t=_t[e];delete _t[e];var r=t.rawConstructor,n=t.rawDestructor,a=t.fields,o=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));at([e],o,u=>{var s={};return a.forEach((l,d)=>{var h=l.fieldName,p=u[d],w=u[d].optional,b=l.getter,O=l.getterContext,x=u[d+a.length],I=l.setter,D=l.setterContext;s[h]={read:Z=>p.fromWireType(b(O,Z)),write:(Z,U)=>{var k=[];I(D,Z,x.toWireType(k,U)),Ht(k)},optional:w}}),[{name:t.name,fromWireType:l=>{var d={};for(var h in s)d[h]=s[h].read(l);return n(l),d},toWireType:(l,d)=>{for(var h in s)if(!(h in d)&&!s[h].optional)throw new TypeError(`Missing field: "${h}"`);var p=r();for(h in s)s[h].write(p,d[h]);return l!==null&&l.push(n,p),p},argPackAdvance:X,readValueFromPointer:vt,destructorFunction:n}]})},fn=(e,t,r,n,a)=>{},dn=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ce=e},Ce,B=e=>{for(var t="",r=e;V[r];)t+=Ce[V[r++]];return t},yt=c.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},C=e=>{throw new yt(e)};function hn(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=t.name;if(e||C(`type "${n}" must have a positive integer typeid pointer`),nt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(nt[e]=t,delete Ot[e],ct.hasOwnProperty(e)){var a=ct[e];delete ct[e],a.forEach(o=>o())}}function N(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return hn(e,t,r)}var X=8,pn=(e,t,r,n)=>{t=B(t),N(e,{name:t,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:X,readValueFromPointer:function(a){return this.fromWireType(V[a])},destructorFunction:null})},vn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Nt=e=>{function t(r){return r.$$.ptrType.registeredClass.name}C(t(e)+" instance already deleted")},zt=!1,Te=e=>{},yn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Pe=e=>{e.count.value-=1;var t=e.count.value===0;t&&yn(e)},mt=e=>typeof FinalizationRegistry>"u"?(mt=t=>t,e):(zt=new FinalizationRegistry(t=>{Pe(t.$$)}),mt=t=>{var r=t.$$,n=!!r.smartPtr;if(n){var a={$$:r};zt.register(t,a,t)}return t},Te=t=>zt.unregister(t),mt(e)),mn=()=>{let e=At.prototype;Object.assign(e,{isAliasOf(r){if(!(this instanceof At)||!(r instanceof At))return!1;var n=this.$$.ptrType.registeredClass,a=this.$$.ptr;r.$$=r.$$;for(var o=r.$$.ptrType.registeredClass,u=r.$$.ptr;n.baseClass;)a=n.upcast(a),n=n.baseClass;for(;o.baseClass;)u=o.upcast(u),o=o.baseClass;return n===o&&a===u},clone(){if(this.$$.ptr||Nt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=mt(Object.create(Object.getPrototypeOf(this),{$$:{value:vn(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Te(this),Pe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});const t=Symbol.dispose;t&&(e[t]=e.delete)};function At(){}var Gt=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ee={},_e=(e,t,r)=>{if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(){for(var a=arguments.length,o=new Array(a),u=0;u<a;u++)o[u]=arguments[u];return e[t].overloadTable.hasOwnProperty(o.length)||C(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[o.length].apply(this,o)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},Oe=(e,t,r)=>{c.hasOwnProperty(e)?((r===void 0||c[e].overloadTable!==void 0&&c[e].overloadTable[r]!==void 0)&&C(`Cannot register public name '${e}' twice`),_e(c,e,e),c[e].overloadTable.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[e].overloadTable[r]=t):(c[e]=t,c[e].argCount=r)},gn=48,wn=57,$n=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=gn&&t<=wn?`_${e}`:e};function bn(e,t,r,n,a,o,u,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=u,this.downcast=s,this.pureVirtualFunctions=[]}var Xt=(e,t,r)=>{for(;t!==r;)t.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Cn(e,t){if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;t.$$||C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Xt(t.$$.ptr,r,this.registeredClass);return n}function Tn(e,t){var r;if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;(!t||!t.$$)&&C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&C(`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=Xt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:C(`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 a=t.clone();r=this.rawShare(r,Y.toHandle(()=>a.delete())),e!==null&&e.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function Pn(e,t){if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;t.$$||C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&C(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Xt(t.$$.ptr,r,this.registeredClass);return n}var Se=(e,t,r)=>{if(t===r)return e;if(r.baseClass===void 0)return null;var n=Se(e,t,r.baseClass);return n===null?null:r.downcast(n)},En={},_n=(e,t)=>{for(t===void 0&&C("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},On=(e,t)=>(t=_n(e,t),En[t]),It=(e,t)=>{(!t.ptrType||!t.ptr)&&St("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,n=!!t.smartPtr;return r!==n&&St("Both smartPtrType and smartPtr must be specified"),t.count={value:1},mt(Object.create(e,{$$:{value:t,writable:!0}}))};function Sn(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=On(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?It(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):It(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o=this.registeredClass.getActualType(t),u=Ee[o];if(!u)return a.call(this);var s;this.isConst?s=u.constPointerType:s=u.pointerType;var l=Se(t,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?It(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):It(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var An=()=>{Object.assign(xt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:X,readValueFromPointer:vt,fromWireType:Sn})};function xt(e,t,r,n,a,o,u,s,l,d,h){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=h,!a&&t.baseClass===void 0?n?(this.toWireType=Cn,this.destructorFunction=null):(this.toWireType=Pn,this.destructorFunction=null):this.toWireType=Tn}var Ae=(e,t,r)=>{c.hasOwnProperty(e)||St("Replacing nonexistent public symbol"),c[e].overloadTable!==void 0&&r!==void 0?c[e].overloadTable[r]=t:(c[e]=t,c[e].argCount=r)},Ie=[],xe,g=e=>{var t=Ie[e];return t||(Ie[e]=t=xe.get(e)),t},In=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.includes("j"))return dynCallLegacy(e,t,r);var n=g(t),a=n(...r);return a},xn=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return In(e,t,a,r)}},H=function(e,t){e=B(e);function r(){if(e.includes("j"))return xn(e,t);var a=g(t);return a}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${e}: ${t}`),n};class Dn extends Error{}var De=e=>{var t=Fa(e),r=B(t);return ot(t),r},Dt=(e,t)=>{var r=[],n={};function a(o){if(!n[o]&&!nt[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw t.forEach(a),new Dn(`${e}: `+r.map(De).join([", "]))},Mn=(e,t,r,n,a,o,u,s,l,d,h,p,w)=>{h=B(h),o=H(a,o),s&&(s=H(u,s)),d&&(d=H(l,d)),w=H(p,w);var b=$n(h);Oe(b,function(){Dt(`Cannot construct ${h} due to unbound types`,[n])}),at([e,t,r],n?[n]:[],O=>{O=O[0];var x,I;n?(x=O.registeredClass,I=x.instancePrototype):I=At.prototype;var D=Gt(h,function(){if(Object.getPrototypeOf(this)!==Z)throw new yt(`Use 'new' to construct ${h}`);if(U.constructor_body===void 0)throw new yt(`${h} has no accessible constructor`);for(var Ne=arguments.length,Ft=new Array(Ne),Rt=0;Rt<Ne;Rt++)Ft[Rt]=arguments[Rt];var ze=U.constructor_body[Ft.length];if(ze===void 0)throw new yt(`Tried to invoke ctor of ${h} with invalid number of parameters (${Ft.length}) - expected (${Object.keys(U.constructor_body).toString()}) parameters instead!`);return ze.apply(this,Ft)}),Z=Object.create(I,{constructor:{value:D}});D.prototype=Z;var U=new bn(h,D,Z,w,x,o,s,d);if(U.baseClass){var k,Mt;(Mt=(k=U.baseClass).__derivedClasses)!==null&&Mt!==void 0||(k.__derivedClasses=[]),U.baseClass.__derivedClasses.push(U)}var Oo=new xt(h,U,!0,!1,!1),ke=new xt(h+"*",U,!1,!1,!1),He=new xt(h+" const*",U,!1,!0,!1);return Ee[e]={pointerType:ke,constPointerType:He},Ae(b,D),[Oo,ke,He]})},qt=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(P[t+n*4>>2]);return r};function Fn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Yt(e,t,r,n,a,o){var u=t.length;u<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=t[1]!==null&&r!==null,l=Fn(t),d=t[0].name!=="void",h=u-2,p=new Array(h),w=[],b=[],O=function(){b.length=0;var x;w.length=s?2:1,w[0]=a,s&&(x=t[1].toWireType(b,this),w[1]=x);for(var I=0;I<h;++I)p[I]=t[I+2].toWireType(b,I<0||arguments.length<=I?void 0:arguments[I]),w.push(p[I]);var D=n(...w);function Z(U){if(l)Ht(b);else for(var k=s?1:2;k<t.length;k++){var Mt=k===1?x:p[k-2];t[k].destructorFunction!==null&&t[k].destructorFunction(Mt)}if(d)return t[0].fromWireType(U)}return Z(D)};return Gt(e,O)}var Rn=(e,t,r,n,a,o)=>{var u=qt(t,r);a=H(n,a),at([],[e],s=>{s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[t-1]!==void 0)throw new yt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[t-1]=()=>{Dt(`Cannot construct ${s.name} due to unbound types`,u)},at([],u,d=>(d.splice(1,0,null),s.registeredClass.constructor_body[t-1]=Yt(l,d,null,a,o),[])),[]})},Me=e=>{e=e.trim();const t=e.indexOf("(");return t===-1?e:e.slice(0,t)},jn=(e,t,r,n,a,o,u,s,l,d)=>{var h=qt(r,n);t=B(t),t=Me(t),o=H(a,o),at([],[e],p=>{p=p[0];var w=`${p.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&p.registeredClass.pureVirtualFunctions.push(t);function b(){Dt(`Cannot call ${w} due to unbound types`,h)}var O=p.registeredClass.instancePrototype,x=O[t];return x===void 0||x.overloadTable===void 0&&x.className!==p.name&&x.argCount===r-2?(b.argCount=r-2,b.className=p.name,O[t]=b):(_e(O,t,w),O[t].overloadTable[r-2]=b),at([],h,I=>{var D=Yt(w,I,p,o,u);return O[t].overloadTable===void 0?(D.argCount=r-2,O[t]=D):O[t].overloadTable[r-2]=D,[]}),[]})},Zt=[],q=[],Qt=e=>{e>9&&--q[e+1]===0&&(q[e]=void 0,Zt.push(e))},Ln=()=>q.length/2-5-Zt.length,Bn=()=>{q.push(0,1,void 0,1,null,1,!0,1,!1,1),c.count_emval_handles=Ln},Y={toValue:e=>(e||C(`Cannot use deleted val. handle = ${e}`),q[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=Zt.pop()||q.length;return q[t]=e,q[t+1]=1,t}}}},Fe={name:"emscripten::val",fromWireType:e=>{var t=Y.toValue(e);return Qt(e),t},toWireType:(e,t)=>Y.toHandle(t),argPackAdvance:X,readValueFromPointer:vt,destructorFunction:null},Wn=e=>N(e,Fe),Un=(e,t)=>{switch(t){case 4:return function(r){return this.fromWireType(ye[r>>2])};case 8:return function(r){return this.fromWireType(me[r>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Vn=(e,t,r)=>{t=B(t),N(e,{name:t,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:X,readValueFromPointer:Un(t,r),destructorFunction:null})},kn=(e,t,r,n,a,o,u,s)=>{var l=qt(t,r);e=B(e),e=Me(e),a=H(n,a),Oe(e,function(){Dt(`Cannot call ${e} due to unbound types`,l)},t-1),at([],l,d=>{var h=[d[0],null].concat(d.slice(1));return Ae(e,Yt(e,h,null,a,o),t-1),[]})},Hn=(e,t,r)=>{switch(t){case 1:return r?n=>et[n]:n=>V[n];case 2:return r?n=>ht[n>>1]:n=>bt[n>>1];case 4:return r?n=>ut[n>>2]:n=>P[n>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Nn=(e,t,r,n,a)=>{t=B(t);var o=h=>h;if(n===0){var u=32-8*r;o=h=>h<<u>>>u}var s=t.includes("unsigned"),l=(h,p)=>{},d;s?d=function(h,p){return l(p,this.name),p>>>0}:d=function(h,p){return l(p,this.name),p},N(e,{name:t,fromWireType:o,toWireType:d,argPackAdvance:X,readValueFromPointer:Hn(t,r,n!==0),destructorFunction:null})},zn=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[t];function o(u){var s=P[u>>2],l=P[u+4>>2];return new a(et.buffer,l,s)}r=B(r),N(e,{name:r,fromWireType:o,argPackAdvance:X,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Gn=Object.assign({optional:!0},Fe),Xn=(e,t)=>{N(e,Gn)},qn=(e,t,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,u=0;u<e.length;++u){var s=e.charCodeAt(u);if(s>=55296&&s<=57343){var l=e.charCodeAt(++u);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|s&63}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|s&63}}return t[r]=0,r-a},lt=(e,t,r)=>qn(e,V,t,r),Re=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},je=typeof TextDecoder<"u"?new TextDecoder:void 0,Le=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN;for(var n=t+r,a=t;e[a]&&!(a>=n);)++a;if(a-t>16&&e.buffer&&je)return je.decode(e.subarray(t,a));for(var o="";t<a;){var u=e[t++];if(!(u&128)){o+=String.fromCharCode(u);continue}var s=e[t++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|s);continue}var l=e[t++]&63;if((u&240)==224?u=(u&15)<<12|s<<6|l:u=(u&7)<<18|s<<12|l<<6|e[t++]&63,u<65536)o+=String.fromCharCode(u);else{var d=u-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},Yn=(e,t)=>e?Le(V,e,t):"",Zn=(e,t)=>{t=B(t),N(e,{name:t,fromWireType(r){for(var n=P[r>>2],a=r+4,o,s,u=a,s=0;s<=n;++s){var l=a+s;if(s==n||V[l]==0){var d=l-u,h=Yn(u,d);o===void 0?o=h:(o+="\0",o+=h),u=l+1}}return ot(r),o},toWireType(r,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var a,o=typeof n=="string";o||ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT==1||C("Cannot pass non-string to std::string"),o?a=Re(n):a=n.length;var u=Ve(4+a+1),s=u+4;return P[u>>2]=a,o?lt(n,s,a+1):V.set(n,s),r!==null&&r.push(ot,u),u},argPackAdvance:X,readValueFromPointer:vt,destructorFunction(r){ot(r)}})},Be=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Qn=(e,t)=>{for(var r=e,n=r>>1,a=n+t/2;!(n>=a)&&bt[n];)++n;if(r=n<<1,r-e>32&&Be)return Be.decode(V.subarray(e,r));for(var o="",u=0;!(u>=t/2);++u){var s=ht[e+u*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Jn=(e,t,r)=>{if(r!=null||(r=2147483647),r<2)return 0;r-=2;for(var n=t,a=r<e.length*2?r/2:e.length,o=0;o<a;++o){var u=e.charCodeAt(o);ht[t>>1]=u,t+=2}return ht[t>>1]=0,t-n},Kn=e=>e.length*2,ta=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var a=ut[e+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},ea=(e,t,r)=>{if(r!=null||(r=2147483647),r<4)return 0;for(var n=t,a=n+r-4,o=0;o<e.length;++o){var u=e.charCodeAt(o);if(u>=55296&&u<=57343){var s=e.charCodeAt(++o);u=65536+((u&1023)<<10)|s&1023}if(ut[t>>2]=u,t+=4,t+4>a)break}return ut[t>>2]=0,t-n},ra=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},na=(e,t,r)=>{r=B(r);var n,a,o,u;t===2?(n=Qn,a=Jn,u=Kn,o=s=>bt[s>>1]):t===4&&(n=ta,a=ea,u=ra,o=s=>P[s>>2]),N(e,{name:r,fromWireType:s=>{for(var l=P[s>>2],d,h=s+4,p=0;p<=l;++p){var w=s+4+p*t;if(p==l||o(w)==0){var b=w-h,O=n(h,b);d===void 0?d=O:(d+="\0",d+=O),h=w+t}}return ot(s),d},toWireType:(s,l)=>{typeof l!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var d=u(l),h=Ve(4+d+t);return P[h>>2]=d/t,a(l,h+4,d+t),s!==null&&s.push(ot,h),h},argPackAdvance:X,readValueFromPointer:vt,destructorFunction(s){ot(s)}})},aa=(e,t,r,n,a,o)=>{_t[e]={name:B(t),rawConstructor:H(r,n),rawDestructor:H(a,o),fields:[]}},oa=(e,t,r,n,a,o,u,s,l,d)=>{_t[e].fields.push({fieldName:B(t),getterReturnType:r,getter:H(n,a),getterContext:o,setterArgumentType:u,setter:H(s,l),setterContext:d})},ia=(e,t)=>{t=B(t),N(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Jt=[],sa=(e,t,r,n)=>(e=Jt[e],t=Y.toValue(t),e(null,t,r,n)),ua={},ca=e=>{var t=ua[e];return t===void 0?B(e):t},We=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var r=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return r||delete t.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},la=e=>e===0?Y.toHandle(We()):(e=ca(e),Y.toHandle(We()[e])),fa=e=>{var t=Jt.length;return Jt.push(e),t},Ue=(e,t)=>{var r=nt[e];return r===void 0&&C(`${t} has unknown type ${De(e)}`),r},da=(e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Ue(P[t+n*4>>2],`parameter ${n}`);return r},ha=(e,t,r)=>{var n=[],a=e.toWireType(n,r);return n.length&&(P[t>>2]=Y.toHandle(n)),a},pa=Reflect.construct,va=(e,t,r)=>{var n=da(e,t),a=n.shift();e--;var o=new Array(e),u=(l,d,h,p)=>{for(var w=0,b=0;b<e;++b)o[b]=n[b].readValueFromPointer(p+w),w+=n[b].argPackAdvance;var O=r===1?pa(d,o):d.apply(l,o);return ha(a,h,O)},s=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return fa(Gt(s,u))},ya=e=>{e>9&&(q[e+1]+=1)},ma=e=>{var t=Y.toValue(e);Ht(t),Qt(e)},ga=(e,t)=>{e=Ue(e,"_emval_take_value");var r=e.readValueFromPointer(t);return Y.toHandle(r)},wa=(e,t,r,n)=>{var a=new Date().getFullYear(),o=new Date(a,0,1),u=new Date(a,6,1),s=o.getTimezoneOffset(),l=u.getTimezoneOffset(),d=Math.max(s,l);P[e>>2]=d*60,ut[t>>2]=+(s!=l);var h=b=>{var O=b>=0?"-":"+",x=Math.abs(b),I=String(Math.floor(x/60)).padStart(2,"0"),D=String(x%60).padStart(2,"0");return`UTC${O}${I}${D}`},p=h(s),w=h(l);l<s?(lt(p,r,17),lt(w,n,17)):(lt(p,n,17),lt(w,r,17))},$a=()=>2147483648,ba=(e,t)=>Math.ceil(e/t)*t,Ca=e=>{var t=st.buffer,r=(e-t.byteLength+65535)/65536|0;try{return st.grow(r),ge(),1}catch{}},Ta=e=>{var t=V.length;e>>>=0;var r=$a();if(e>r)return!1;for(var n=1;n<=4;n*=2){var a=t*(1+.2/n);a=Math.min(a,e+100663296);var o=Math.min(r,ba(Math.max(e,a),65536)),u=Ca(o);if(u)return!0}return!1},Kt={},Pa=()=>R||"./this.program",gt=()=>{if(!gt.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Pa()};for(var r in Kt)Kt[r]===void 0?delete t[r]:t[r]=Kt[r];var n=[];for(var r in t)n.push(`${r}=${t[r]}`);gt.strings=n}return gt.strings},Ea=(e,t)=>{var r=0,n=0;for(var a of gt()){var o=t+r;P[e+n>>2]=o,r+=lt(a,o,1/0)+1,n+=4}return 0},_a=(e,t)=>{var r=gt();P[e>>2]=r.length;var n=0;for(var a of r)n+=Re(a)+1;return P[t>>2]=n,0},Oa=e=>52;function Sa(e,t,r,n,a){return 70}var Aa=[null,[],[]],Ia=(e,t)=>{var r=Aa[e];t===0||t===10?((e===1?dt:z)(Le(r)),r.length=0):r.push(t)},xa=(e,t,r,n)=>{for(var a=0,o=0;o<r;o++){var u=P[t>>2],s=P[t+4>>2];t+=8;for(var l=0;l<s;l++)Ia(e,V[u+l]);a+=s}return P[n>>2]=a,0},Da=e=>e;dn(),mn(),An(),Bn(),c.noExitRuntime&&c.noExitRuntime,c.print&&(dt=c.print),c.printErr&&(z=c.printErr),c.wasmBinary&&(tt=c.wasmBinary),c.arguments&&c.arguments,c.thisProgram&&(R=c.thisProgram);var Ma={s:Jr,w:Kr,a:tn,j:en,m:rn,N:nn,p:an,da:on,d:sn,_:un,sa:ln,Z:fn,na:pn,qa:Mn,pa:Rn,F:jn,la:Wn,R:Vn,S:kn,y:Nn,t:zn,ra:Xn,ma:Zn,O:na,K:aa,ta:oa,oa:ia,V:sa,ua:Qt,wa:la,$:va,T:ya,va:ma,ka:ga,aa:wa,ea:Ta,ba:Ea,ca:_a,fa:Oa,X:Sa,Q:xa,I:fo,C:po,U:Ya,P:bo,q:so,b:za,D:lo,ia:yo,c:Xa,ha:mo,h:qa,i:to,r:ro,M:co,v:ao,E:io,J:uo,A:vo,H:Co,W:Eo,k:Qa,f:Za,e:Ga,g:Na,L:$o,l:Ka,ja:ho,o:no,x:eo,u:oo,ga:wo,B:go,n:Ja,G:To,Y:Po,z:Da},_=await Yr();_.ya;var Fa=_.za,ot=c._free=_.Aa,Ve=c._malloc=_.Ca,Ra=_.Da,v=_.Ea,ja=_.Fa,La=_.Ga,Ba=_.Ha,Wa=_.Ia,Ua=_.Ja,Va=_.Ka;c.dynCall_viijii=_.La;var ka=c.dynCall_vij=_.Ma;c.dynCall_jiji=_.Na;var Ha=c.dynCall_jiiii=_.Oa;c.dynCall_iiiiij=_.Pa,c.dynCall_iiiiijj=_.Qa,c.dynCall_iiiiiijj=_.Ra;function Na(e,t,r,n){var a=m();try{g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function za(e,t){var r=m();try{return g(e)(t)}catch(n){if(y(r),n!==n+0)throw n;v(1,0)}}function Ga(e,t,r){var n=m();try{g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function Xa(e,t,r){var n=m();try{return g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function qa(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function Ya(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function Za(e,t){var r=m();try{g(e)(t)}catch(n){if(y(r),n!==n+0)throw n;v(1,0)}}function Qa(e){var t=m();try{g(e)()}catch(r){if(y(t),r!==r+0)throw r;v(1,0)}}function Ja(e,t,r,n,a,o,u,s,l,d,h){var p=m();try{g(e)(t,r,n,a,o,u,s,l,d,h)}catch(w){if(y(p),w!==w+0)throw w;v(1,0)}}function Ka(e,t,r,n,a){var o=m();try{g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function to(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function eo(e,t,r,n,a,o,u){var s=m();try{g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function ro(e,t,r,n,a,o){var u=m();try{return g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function no(e,t,r,n,a,o){var u=m();try{g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function ao(e,t,r,n,a,o,u){var s=m();try{return g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function oo(e,t,r,n,a,o,u,s){var l=m();try{g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function io(e,t,r,n,a,o,u,s){var l=m();try{return g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function so(e){var t=m();try{return g(e)()}catch(r){if(y(t),r!==r+0)throw r;v(1,0)}}function uo(e,t,r,n,a,o,u,s,l){var d=m();try{return g(e)(t,r,n,a,o,u,s,l)}catch(h){if(y(d),h!==h+0)throw h;v(1,0)}}function co(e,t,r,n,a,o,u){var s=m();try{return g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function lo(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function fo(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function ho(e,t,r,n,a,o,u,s){var l=m();try{g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function po(e,t,r,n,a,o){var u=m();try{return g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function vo(e,t,r,n,a,o,u,s,l,d){var h=m();try{return g(e)(t,r,n,a,o,u,s,l,d)}catch(p){if(y(h),p!==p+0)throw p;v(1,0)}}function yo(e,t,r){var n=m();try{return g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function mo(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function go(e,t,r,n,a,o,u,s,l,d){var h=m();try{g(e)(t,r,n,a,o,u,s,l,d)}catch(p){if(y(h),p!==p+0)throw p;v(1,0)}}function wo(e,t,r,n,a,o,u,s,l){var d=m();try{g(e)(t,r,n,a,o,u,s,l)}catch(h){if(y(d),h!==h+0)throw h;v(1,0)}}function $o(e,t,r,n,a,o,u){var s=m();try{g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function bo(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function Co(e,t,r,n,a,o,u,s,l,d,h,p){var w=m();try{return g(e)(t,r,n,a,o,u,s,l,d,h,p)}catch(b){if(y(w),b!==b+0)throw b;v(1,0)}}function To(e,t,r,n,a,o,u,s,l,d,h,p,w,b,O,x){var I=m();try{g(e)(t,r,n,a,o,u,s,l,d,h,p,w,b,O,x)}catch(D){if(y(I),D!==D+0)throw D;v(1,0)}}function Po(e,t,r,n){var a=m();try{ka(e,t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function Eo(e,t,r,n,a){var o=m();try{return Ha(e,t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function te(){if(rt>0){pt=te;return}if(Br(),rt>0){pt=te;return}function e(){var t;c.calledRun=!0,!ve&&(Wr(),T(c),(t=c.onRuntimeInitialized)===null||t===void 0||t.call(c),Ur())}c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1),e()},1)):e()}function _o(){if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.shift()()}return _o(),te(),f=A,f};function Bt(i){return ne(Lt,i)}function mr(){return vr(Lt)}function gr(i){Bt({overrides:i,equalityFn:Object.is,fireImmediately:!1})}async function wr(i,f){return yr(Lt,i,f)}const $r="d19de7bfefeb04bb38eb7a8fab3aa3a08c34f6ec502775d379e1d6da71f9865e",ae=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["databar_limited","DataBarLimited"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"],["any","Any"]],br=[...ae,["unknown"]].map(i=>i[0]),Wt=new Map(ae);function Cr(i){for(const[f,c]of Wt)if(i===c)return f;return"unknown"}function Tr(i){if(oe(i))return{width:i.naturalWidth,height:i.naturalHeight};if(ie(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(se(i))return{width:i.videoWidth,height:i.videoHeight};if(ce(i))return{width:i.width,height:i.height};if(fe(i))return{width:i.displayWidth,height:i.displayHeight};if(ue(i))return{width:i.width,height:i.height};if(le(i))return{width:i.width,height:i.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function oe(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLImageElement)}catch{return!1}}function ie(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.SVGImageElement)}catch{return!1}}function se(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLVideoElement)}catch{return!1}}function ue(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLCanvasElement)}catch{return!1}}function ce(i){try{return i instanceof ImageBitmap||Object.prototype.toString.call(i)==="[object ImageBitmap]"}catch{return!1}}function le(i){try{return i instanceof OffscreenCanvas||Object.prototype.toString.call(i)==="[object OffscreenCanvas]"}catch{return!1}}function fe(i){try{return i instanceof VideoFrame||Object.prototype.toString.call(i)==="[object VideoFrame]"}catch{return!1}}function Pr(i){try{return i instanceof Blob||Object.prototype.toString.call(i)==="[object Blob]"}catch{return!1}}function Er(i){try{return i instanceof ImageData||Object.prototype.toString.call(i)==="[object ImageData]"}catch{return!1}}function _r(i,f){try{const c=new OffscreenCanvas(i,f);if(c.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return c;throw void 0}catch{const c=document.createElement("canvas");return c.width=i,c.height=f,c}}async function de(i){if(oe(i)&&!await Ir(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ie(i)&&!await xr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(fe(i)&&Dr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(se(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ce(i)&&Fr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:c}=Tr(i);if(f===0||c===0)return null;const $=_r(f,c).getContext("2d");$.drawImage(i,0,0);try{return $.getImageData(0,0,f,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Or(i){let f;try{f=await createImageBitmap(i)}catch{try{if(globalThis.Image){f=new Image;let $="";try{$=URL.createObjectURL(i),f.src=$,await f.decode()}finally{URL.revokeObjectURL($)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await de(f)}function Sr(i){const{width:f,height:c}=i;if(f===0||c===0)return null;const T=i.getContext("2d");try{return T.getImageData(0,0,f,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ar(i){if(Pr(i))return await Or(i);if(Er(i)){if(Mr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ue(i)||le(i)?Sr(i):await de(i)}async function Ir(i){try{return await i.decode(),!0}catch{return!1}}async function xr(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function Dr(i){return i.format===null}function Mr(i){return i.data.buffer.byteLength===0}function Fr(i){return i.width===0&&i.height===0}function he(i,f){return Rr(i)?new DOMException(`${f}: ${i.message}`,i.name):jr(i)?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}function Rr(i){return i instanceof DOMException||Object.prototype.toString.call(i)==="[object DOMException]"}function jr(i){return i instanceof Error||Object.prototype.toString.call(i)==="[object Error]"}class Lr{constructor(f={}){Ye(this,ft);var c;try{const T=(c=f==null?void 0:f.formats)==null?void 0:c.filter($=>$!=="unknown");if((T==null?void 0:T.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const $ of T!=null?T:[])if(!Wt.has($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`);Ze(this,ft,T!=null?T:[]),Bt({fireImmediately:!0}).catch(()=>{})}catch(T){throw he(T,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return br.filter(f=>f!=="unknown")}async detect(f){try{const c=await Ar(f);if(c===null)return[];let T;const $={tryCode39ExtendedMode:!1,textMode:"Plain",formats:qe(this,ft).map(A=>Wt.get(A))};try{T=await wr(c,$)}catch(A){throw console.error(A),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return T.map(A=>{const{topLeft:{x:F,y:W},topRight:{x:S,y:R},bottomLeft:{x:L,y:J},bottomRight:{x:it,y:K}}=A.position,dt=Math.min(F,S,L,it),z=Math.min(W,R,J,K),tt=Math.max(F,S,L,it),st=Math.max(W,R,J,K);return{boundingBox:new DOMRectReadOnly(dt,z,tt-dt,st-z),rawValue:A.text,format:Cr(A.format),cornerPoints:[{x:F,y:W},{x:S,y:R},{x:it,y:K},{x:L,y:J}]}})}catch(c){throw he(c,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ft=new WeakMap,(pe=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=Lr),E.ZXING_CPP_COMMIT=dr,E.ZXING_WASM_SHA256=$r,E.ZXING_WASM_VERSION=fr,E.prepareZXingModule=Bt,E.purgeZXingModule=mr,E.setZXingModuleOverrides=gr,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),E}({});
1
+ var BarcodeDetectionAPI=function(E){"use strict";var Ge=E=>{throw TypeError(E)};var Xe=(E,M,R)=>M.has(E)||Ge("Cannot "+R);var qe=(E,M,R)=>(Xe(E,M,"read from private field"),R?R.call(E):M.get(E)),Ye=(E,M,R)=>M.has(E)?Ge("Cannot add the same private member more than once"):M instanceof WeakSet?M.add(E):M.set(E,R),Ze=(E,M,R,gt)=>(Xe(E,M,"write to private field"),gt?gt.call(E,R):M.set(E,R),R);var lt,pe;const M=[["Aztec","M"],["Codabar","L"],["Code39","L"],["Code93","L"],["Code128","L"],["DataBar","L"],["DataBarExpanded","L"],["DataMatrix","M"],["EAN-8","L"],["EAN-13","L"],["ITF","L"],["MaxiCode","M"],["PDF417","M"],["QRCode","M"],["UPC-A","L"],["UPC-E","L"],["MicroQRCode","M"],["rMQRCode","M"],["DXFilmEdge","L"],["DataBarLimited","L"]],R=M.map(([i])=>i),gt=R.filter((i,f)=>M[f][1]==="L"),Qe=R.filter((i,f)=>M[f][1]==="M");function Rt(i){switch(i){case"Linear-Codes":return gt.reduce((f,c)=>f|Rt(c),0);case"Matrix-Codes":return Qe.reduce((f,c)=>f|Rt(c),0);case"Any":return(1<<M.length)-1;case"None":return 0;default:return 1<<R.indexOf(i)}}function Je(i){if(i===0)return"None";const f=31-Math.clz32(i);return R[f]}function Ke(i){return i.reduce((f,c)=>f|Rt(c),0)}const tr=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function er(i){return tr.indexOf(i)}const ee=["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","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function rr(i){return i==="UnicodeBig"?ee.indexOf("UTF16BE"):ee.indexOf(i)}const nr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function ar(i){return nr[i]}const or=["Ignore","Read","Require"];function ir(i){return or.indexOf(i)}const sr=["Plain","ECI","HRI","Hex","Escaped"];function ur(i){return sr.indexOf(i)}const wt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown"};function re(i){return{...i,formats:Ke(i.formats),binarizer:er(i.binarizer),eanAddOnSymbol:ir(i.eanAddOnSymbol),textMode:ur(i.textMode),characterSet:rr(i.characterSet)}}function cr(i){return{...i,format:Je(i.format),contentType:ar(i.contentType),eccLevel:i.ecLevel}}const lr="2.1.2",fr="a1516b34167cff504bf3c83698ea841e13a8f7f1",dr={locateFile:(i,f)=>{const c=i.match(/_(.+?)\.wasm$/);return c?`https://fastly.jsdelivr.net/npm/zxing-wasm@2.1.2/dist/${c[1]}/${i}`:f+i}},$t=new WeakMap;function hr(i,f){return Object.is(i,f)||Object.keys(i).length===Object.keys(f).length&&Object.keys(i).every(c=>Object.prototype.hasOwnProperty.call(f,c)&&i[c]===f[c])}function ne(i,{overrides:f,equalityFn:c=hr,fireImmediately:T=!1}={}){var $;const[S,F]=($=$t.get(i))!=null?$:[dr],W=f!=null?f:S;let A;if(T){if(F&&(A=c(S,W)))return F;const j=i({...W});return $t.set(i,[W,j]),j}(A!=null?A:c(S,W))||$t.set(i,[W])}function pr(i){$t.delete(i)}async function vr(i,f,c=wt){const T={...wt,...c},$=await ne(i,{fireImmediately:!0});let S,F;if("width"in f&&"height"in f&&"data"in f){const{data:A,data:{byteLength:j},width:B,height:Q}=f;F=$._malloc(j),$.HEAPU8.set(A,F),S=$.readBarcodesFromPixmap(F,B,Q,re(T))}else{let A,j;if("buffer"in f)[A,j]=[f.byteLength,f];else if("byteLength"in f)[A,j]=[f.byteLength,new Uint8Array(f)];else if("size"in f)[A,j]=[f.size,new Uint8Array(await f.arrayBuffer())];else throw new TypeError("Invalid input type");F=$._malloc(A),$.HEAPU8.set(j,F),S=$.readBarcodesFromImage(F,A,re(T))}$._free(F);const W=[];for(let A=0;A<S.size();++A)W.push(cr(S.get(A)));return W}({...wt,formats:[...wt.formats]});var Bt=async function(i={}){var f,c=i,T,$,S=new Promise((e,t)=>{T=e,$=t}),F=typeof window=="object",W=typeof Bun<"u",A=typeof WorkerGlobalScope<"u";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var j="./this.program",B="";function Q(e){return c.locateFile?c.locateFile(e,B):B+e}var ot,J;(F||A||W)&&(A?B=self.location.href:typeof document<"u"&&document.currentScript&&(B=document.currentScript.src),B.startsWith("blob:")?B="":B=B.slice(0,B.replace(/[?#].*/,"").lastIndexOf("/")+1),A&&(J=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),ot=async e=>{var t=await fetch(e,{credentials:"same-origin"});if(t.ok)return t.arrayBuffer();throw new Error(t.status+" : "+t.url)});var ft=console.log.bind(console),z=console.error.bind(console),K,it,ve=!1,tt,V,dt,bt,st,P,ye,me;function ge(){var e=it.buffer;tt=new Int8Array(e),dt=new Int16Array(e),c.HEAPU8=V=new Uint8Array(e),bt=new Uint16Array(e),st=new Int32Array(e),P=new Uint32Array(e),ye=new Float32Array(e),me=new Float64Array(e)}function Br(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)Zr(c.preRun.shift());we(be)}function Lr(){_.ya()}function Wr(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)Yr(c.postRun.shift());we($e)}var et=0,ht=null;function Ur(e){var t;et++,(t=c.monitorRunDependencies)===null||t===void 0||t.call(c,et)}function Vr(e){var t;if(et--,(t=c.monitorRunDependencies)===null||t===void 0||t.call(c,et),et==0&&ht){var r=ht;ht=null,r()}}function Ut(e){var t;(t=c.onAbort)===null||t===void 0||t.call(c,e),e="Aborted("+e+")",z(e),ve=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw $(r),r}var Ct;function kr(){return Q("zxing_reader.wasm")}function Hr(e){if(e==Ct&&K)return new Uint8Array(K);if(J)return J(e);throw"both async and sync fetching of the wasm failed"}async function Nr(e){if(!K)try{var t=await ot(e);return new Uint8Array(t)}catch{}return Hr(e)}async function zr(e,t){try{var r=await Nr(e),n=await WebAssembly.instantiate(r,t);return n}catch(a){z(`failed to asynchronously prepare wasm: ${a}`),Ut(a)}}async function Gr(e,t,r){if(!e&&typeof WebAssembly.instantiateStreaming=="function")try{var n=fetch(t,{credentials:"same-origin"}),a=await WebAssembly.instantiateStreaming(n,r);return a}catch(o){z(`wasm streaming compile failed: ${o}`),z("falling back to ArrayBuffer instantiation")}return zr(t,r)}function Xr(){return{a:Da}}async function qr(){function e(o,u){return _=o.exports,it=_.xa,ge(),xe=_.Ba,Vr(),_}Ur();function t(o){return e(o.instance)}var r=Xr();if(c.instantiateWasm)return new Promise((o,u)=>{c.instantiateWasm(r,(s,l)=>{o(e(s))})});Ct!=null||(Ct=kr());try{var n=await Gr(K,Ct,r),a=t(n);return a}catch(o){return $(o),Promise.reject(o)}}var we=e=>{for(;e.length>0;)e.shift()(c)},$e=[],Yr=e=>$e.push(e),be=[],Zr=e=>be.push(e),y=e=>Ra(e),m=()=>Ba(),Tt=[],Pt=0,Qr=e=>{var t=new Vt(e);return t.get_caught()||(t.set_caught(!0),Pt--),t.set_rethrown(!1),Tt.push(t),Wa(e),Fa(e)},G=0,Jr=()=>{v(0,0);var e=Tt.pop();La(e.excPtr),G=0};class Vt{constructor(t){this.excPtr=t,this.ptr=t-24}set_type(t){P[this.ptr+4>>2]=t}get_type(){return P[this.ptr+4>>2]}set_destructor(t){P[this.ptr+8>>2]=t}get_destructor(){return P[this.ptr+8>>2]}set_caught(t){t=t?1:0,tt[this.ptr+12]=t}get_caught(){return tt[this.ptr+12]!=0}set_rethrown(t){t=t?1:0,tt[this.ptr+13]=t}get_rethrown(){return tt[this.ptr+13]!=0}init(t,r){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(r)}set_adjusted_ptr(t){P[this.ptr+16>>2]=t}get_adjusted_ptr(){return P[this.ptr+16>>2]}}var Et=e=>ja(e),kt=e=>{var t=G;if(!t)return Et(0),0;var r=new Vt(t);r.set_adjusted_ptr(t);var n=r.get_type();if(!n)return Et(0),t;for(var a of e){if(a===0||a===n)break;var o=r.ptr+16;if(Ua(a,n,o))return Et(a),t}return Et(n),t},Kr=()=>kt([]),tn=e=>kt([e]),en=(e,t)=>kt([e,t]),rn=()=>{var e=Tt.pop();e||Ut("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Tt.push(e),e.set_rethrown(!0),e.set_caught(!1),Pt++),G=t,G},nn=(e,t,r)=>{var n=new Vt(e);throw n.init(t,r),G=e,Pt++,G},an=()=>Pt,on=e=>{throw G||(G=e),G},sn=()=>Ut(""),_t={},Ht=e=>{for(;e.length;){var t=e.pop(),r=e.pop();r(t)}};function pt(e){return this.fromWireType(P[e>>2])}var ut={},rt={},Ot={},un=c.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},At=e=>{throw new un(e)},nt=(e,t,r)=>{e.forEach(s=>Ot[s]=t);function n(s){var l=r(s);l.length!==e.length&&At("Mismatched type converter count");for(var d=0;d<e.length;++d)N(e[d],l[d])}var a=new Array(t.length),o=[],u=0;t.forEach((s,l)=>{rt.hasOwnProperty(s)?a[l]=rt[s]:(o.push(s),ut.hasOwnProperty(s)||(ut[s]=[]),ut[s].push(()=>{a[l]=rt[s],++u,u===o.length&&n(a)}))}),o.length===0&&n(a)},cn=e=>{var t=_t[e];delete _t[e];var r=t.rawConstructor,n=t.rawDestructor,a=t.fields,o=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));nt([e],o,u=>{var s={};return a.forEach((l,d)=>{var h=l.fieldName,p=u[d],w=u[d].optional,b=l.getter,O=l.getterContext,x=u[d+a.length],I=l.setter,D=l.setterContext;s[h]={read:Z=>p.fromWireType(b(O,Z)),write:(Z,U)=>{var k=[];I(D,Z,x.toWireType(k,U)),Ht(k)},optional:w}}),[{name:t.name,fromWireType:l=>{var d={};for(var h in s)d[h]=s[h].read(l);return n(l),d},toWireType:(l,d)=>{for(var h in s)if(!(h in d)&&!s[h].optional)throw new TypeError(`Missing field: "${h}"`);var p=r();for(h in s)s[h].write(p,d[h]);return l!==null&&l.push(n,p),p},argPackAdvance:X,readValueFromPointer:pt,destructorFunction:n}]})},ln=(e,t,r,n,a)=>{},fn=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);Ce=e},Ce,L=e=>{for(var t="",r=e;V[r];)t+=Ce[V[r++]];return t},vt=c.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},C=e=>{throw new vt(e)};function dn(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=t.name;if(e||C(`type "${n}" must have a positive integer typeid pointer`),rt.hasOwnProperty(e)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(rt[e]=t,delete Ot[e],ut.hasOwnProperty(e)){var a=ut[e];delete ut[e],a.forEach(o=>o())}}function N(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return dn(e,t,r)}var X=8,hn=(e,t,r,n)=>{t=L(t),N(e,{name:t,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:X,readValueFromPointer:function(a){return this.fromWireType(V[a])},destructorFunction:null})},pn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Nt=e=>{function t(r){return r.$$.ptrType.registeredClass.name}C(t(e)+" instance already deleted")},zt=!1,Te=e=>{},vn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Pe=e=>{e.count.value-=1;var t=e.count.value===0;t&&vn(e)},yt=e=>typeof FinalizationRegistry>"u"?(yt=t=>t,e):(zt=new FinalizationRegistry(t=>{Pe(t.$$)}),yt=t=>{var r=t.$$,n=!!r.smartPtr;if(n){var a={$$:r};zt.register(t,a,t)}return t},Te=t=>zt.unregister(t),yt(e)),yn=()=>{let e=St.prototype;Object.assign(e,{isAliasOf(r){if(!(this instanceof St)||!(r instanceof St))return!1;var n=this.$$.ptrType.registeredClass,a=this.$$.ptr;r.$$=r.$$;for(var o=r.$$.ptrType.registeredClass,u=r.$$.ptr;n.baseClass;)a=n.upcast(a),n=n.baseClass;for(;o.baseClass;)u=o.upcast(u),o=o.baseClass;return n===o&&a===u},clone(){if(this.$$.ptr||Nt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=yt(Object.create(Object.getPrototypeOf(this),{$$:{value:pn(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Te(this),Pe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});const t=Symbol.dispose;t&&(e[t]=e.delete)};function St(){}var Gt=(e,t)=>Object.defineProperty(t,"name",{value:e}),Ee={},_e=(e,t,r)=>{if(e[t].overloadTable===void 0){var n=e[t];e[t]=function(){for(var a=arguments.length,o=new Array(a),u=0;u<a;u++)o[u]=arguments[u];return e[t].overloadTable.hasOwnProperty(o.length)||C(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[o.length].apply(this,o)},e[t].overloadTable=[],e[t].overloadTable[n.argCount]=n}},Oe=(e,t,r)=>{c.hasOwnProperty(e)?((r===void 0||c[e].overloadTable!==void 0&&c[e].overloadTable[r]!==void 0)&&C(`Cannot register public name '${e}' twice`),_e(c,e,e),c[e].overloadTable.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[e].overloadTable[r]=t):(c[e]=t,c[e].argCount=r)},mn=48,gn=57,wn=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=mn&&t<=gn?`_${e}`:e};function $n(e,t,r,n,a,o,u,s){this.name=e,this.constructor=t,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=u,this.downcast=s,this.pureVirtualFunctions=[]}var Xt=(e,t,r)=>{for(;t!==r;)t.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function bn(e,t){if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;t.$$||C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Xt(t.$$.ptr,r,this.registeredClass);return n}function Cn(e,t){var r;if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,r),r):0;(!t||!t.$$)&&C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&C(`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=Xt(t.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?r=t.$$.smartPtr:C(`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 a=t.clone();r=this.rawShare(r,Y.toHandle(()=>a.delete())),e!==null&&e.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function Tn(e,t){if(t===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;t.$$||C(`Cannot pass "${embindRepr(t)}" as a ${this.name}`),t.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&C(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass,n=Xt(t.$$.ptr,r,this.registeredClass);return n}var Ae=(e,t,r)=>{if(t===r)return e;if(r.baseClass===void 0)return null;var n=Ae(e,t,r.baseClass);return n===null?null:r.downcast(n)},Pn={},En=(e,t)=>{for(t===void 0&&C("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},_n=(e,t)=>(t=En(e,t),Pn[t]),It=(e,t)=>{(!t.ptrType||!t.ptr)&&At("makeClassHandle requires ptr and ptrType");var r=!!t.smartPtrType,n=!!t.smartPtr;return r!==n&&At("Both smartPtrType and smartPtr must be specified"),t.count={value:1},yt(Object.create(e,{$$:{value:t,writable:!0}}))};function On(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var r=_n(this.registeredClass,t);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=t,r.$$.smartPtr=e,r.clone();var n=r.clone();return this.destructor(e),n}function a(){return this.isSmartPointer?It(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):It(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var o=this.registeredClass.getActualType(t),u=Ee[o];if(!u)return a.call(this);var s;this.isConst?s=u.constPointerType:s=u.pointerType;var l=Ae(t,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?It(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:e}):It(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var An=()=>{Object.assign(xt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:X,readValueFromPointer:pt,fromWireType:On})};function xt(e,t,r,n,a,o,u,s,l,d,h){this.name=e,this.registeredClass=t,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=d,this.rawDestructor=h,!a&&t.baseClass===void 0?n?(this.toWireType=bn,this.destructorFunction=null):(this.toWireType=Tn,this.destructorFunction=null):this.toWireType=Cn}var Se=(e,t,r)=>{c.hasOwnProperty(e)||At("Replacing nonexistent public symbol"),c[e].overloadTable!==void 0&&r!==void 0?c[e].overloadTable[r]=t:(c[e]=t,c[e].argCount=r)},Ie=[],xe,g=e=>{var t=Ie[e];return t||(Ie[e]=t=xe.get(e)),t},Sn=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.includes("j"))return dynCallLegacy(e,t,r);var n=g(t),a=n(...r);return a},In=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return Sn(e,t,a,r)}},H=function(e,t){e=L(e);function r(){if(e.includes("j"))return In(e,t);var a=g(t);return a}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${e}: ${t}`),n};class xn extends Error{}var De=e=>{var t=Ma(e),r=L(t);return at(t),r},Dt=(e,t)=>{var r=[],n={};function a(o){if(!n[o]&&!rt[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw t.forEach(a),new xn(`${e}: `+r.map(De).join([", "]))},Dn=(e,t,r,n,a,o,u,s,l,d,h,p,w)=>{h=L(h),o=H(a,o),s&&(s=H(u,s)),d&&(d=H(l,d)),w=H(p,w);var b=wn(h);Oe(b,function(){Dt(`Cannot construct ${h} due to unbound types`,[n])}),nt([e,t,r],n?[n]:[],O=>{O=O[0];var x,I;n?(x=O.registeredClass,I=x.instancePrototype):I=St.prototype;var D=Gt(h,function(){if(Object.getPrototypeOf(this)!==Z)throw new vt(`Use 'new' to construct ${h}`);if(U.constructor_body===void 0)throw new vt(`${h} has no accessible constructor`);for(var Ne=arguments.length,Ft=new Array(Ne),jt=0;jt<Ne;jt++)Ft[jt]=arguments[jt];var ze=U.constructor_body[Ft.length];if(ze===void 0)throw new vt(`Tried to invoke ctor of ${h} with invalid number of parameters (${Ft.length}) - expected (${Object.keys(U.constructor_body).toString()}) parameters instead!`);return ze.apply(this,Ft)}),Z=Object.create(I,{constructor:{value:D}});D.prototype=Z;var U=new $n(h,D,Z,w,x,o,s,d);if(U.baseClass){var k,Mt;(Mt=(k=U.baseClass).__derivedClasses)!==null&&Mt!==void 0||(k.__derivedClasses=[]),U.baseClass.__derivedClasses.push(U)}var _o=new xt(h,U,!0,!1,!1),ke=new xt(h+"*",U,!1,!1,!1),He=new xt(h+" const*",U,!1,!0,!1);return Ee[e]={pointerType:ke,constPointerType:He},Se(b,D),[_o,ke,He]})},qt=(e,t)=>{for(var r=[],n=0;n<e;n++)r.push(P[t+n*4>>2]);return r};function Mn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function Yt(e,t,r,n,a,o){var u=t.length;u<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var s=t[1]!==null&&r!==null,l=Mn(t),d=t[0].name!=="void",h=u-2,p=new Array(h),w=[],b=[],O=function(){b.length=0;var x;w.length=s?2:1,w[0]=a,s&&(x=t[1].toWireType(b,this),w[1]=x);for(var I=0;I<h;++I)p[I]=t[I+2].toWireType(b,I<0||arguments.length<=I?void 0:arguments[I]),w.push(p[I]);var D=n(...w);function Z(U){if(l)Ht(b);else for(var k=s?1:2;k<t.length;k++){var Mt=k===1?x:p[k-2];t[k].destructorFunction!==null&&t[k].destructorFunction(Mt)}if(d)return t[0].fromWireType(U)}return Z(D)};return Gt(e,O)}var Fn=(e,t,r,n,a,o)=>{var u=qt(t,r);a=H(n,a),nt([],[e],s=>{s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[t-1]!==void 0)throw new vt(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[t-1]=()=>{Dt(`Cannot construct ${s.name} due to unbound types`,u)},nt([],u,d=>(d.splice(1,0,null),s.registeredClass.constructor_body[t-1]=Yt(l,d,null,a,o),[])),[]})},Me=e=>{e=e.trim();const t=e.indexOf("(");return t===-1?e:e.slice(0,t)},jn=(e,t,r,n,a,o,u,s,l,d)=>{var h=qt(r,n);t=L(t),t=Me(t),o=H(a,o),nt([],[e],p=>{p=p[0];var w=`${p.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&p.registeredClass.pureVirtualFunctions.push(t);function b(){Dt(`Cannot call ${w} due to unbound types`,h)}var O=p.registeredClass.instancePrototype,x=O[t];return x===void 0||x.overloadTable===void 0&&x.className!==p.name&&x.argCount===r-2?(b.argCount=r-2,b.className=p.name,O[t]=b):(_e(O,t,w),O[t].overloadTable[r-2]=b),nt([],h,I=>{var D=Yt(w,I,p,o,u);return O[t].overloadTable===void 0?(D.argCount=r-2,O[t]=D):O[t].overloadTable[r-2]=D,[]}),[]})},Zt=[],q=[],Qt=e=>{e>9&&--q[e+1]===0&&(q[e]=void 0,Zt.push(e))},Rn=()=>q.length/2-5-Zt.length,Bn=()=>{q.push(0,1,void 0,1,null,1,!0,1,!1,1),c.count_emval_handles=Rn},Y={toValue:e=>(e||C(`Cannot use deleted val. handle = ${e}`),q[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const t=Zt.pop()||q.length;return q[t]=e,q[t+1]=1,t}}}},Fe={name:"emscripten::val",fromWireType:e=>{var t=Y.toValue(e);return Qt(e),t},toWireType:(e,t)=>Y.toHandle(t),argPackAdvance:X,readValueFromPointer:pt,destructorFunction:null},Ln=e=>N(e,Fe),Wn=(e,t)=>{switch(t){case 4:return function(r){return this.fromWireType(ye[r>>2])};case 8:return function(r){return this.fromWireType(me[r>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},Un=(e,t,r)=>{t=L(t),N(e,{name:t,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:X,readValueFromPointer:Wn(t,r),destructorFunction:null})},Vn=(e,t,r,n,a,o,u,s)=>{var l=qt(t,r);e=L(e),e=Me(e),a=H(n,a),Oe(e,function(){Dt(`Cannot call ${e} due to unbound types`,l)},t-1),nt([],l,d=>{var h=[d[0],null].concat(d.slice(1));return Se(e,Yt(e,h,null,a,o),t-1),[]})},kn=(e,t,r)=>{switch(t){case 1:return r?n=>tt[n]:n=>V[n];case 2:return r?n=>dt[n>>1]:n=>bt[n>>1];case 4:return r?n=>st[n>>2]:n=>P[n>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},Hn=(e,t,r,n,a)=>{t=L(t);var o=h=>h;if(n===0){var u=32-8*r;o=h=>h<<u>>>u}var s=t.includes("unsigned"),l=(h,p)=>{},d;s?d=function(h,p){return l(p,this.name),p>>>0}:d=function(h,p){return l(p,this.name),p},N(e,{name:t,fromWireType:o,toWireType:d,argPackAdvance:X,readValueFromPointer:kn(t,r,n!==0),destructorFunction:null})},Nn=(e,t,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[t];function o(u){var s=P[u>>2],l=P[u+4>>2];return new a(tt.buffer,l,s)}r=L(r),N(e,{name:r,fromWireType:o,argPackAdvance:X,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},zn=Object.assign({optional:!0},Fe),Gn=(e,t)=>{N(e,zn)},Xn=(e,t,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,u=0;u<e.length;++u){var s=e.charCodeAt(u);if(s>=55296&&s<=57343){var l=e.charCodeAt(++u);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;t[r++]=s}else if(s<=2047){if(r+1>=o)break;t[r++]=192|s>>6,t[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|s&63}else{if(r+3>=o)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|s&63}}return t[r]=0,r-a},ct=(e,t,r)=>Xn(e,V,t,r),je=e=>{for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t},Re=typeof TextDecoder<"u"?new TextDecoder:void 0,Be=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN;for(var n=t+r,a=t;e[a]&&!(a>=n);)++a;if(a-t>16&&e.buffer&&Re)return Re.decode(e.subarray(t,a));for(var o="";t<a;){var u=e[t++];if(!(u&128)){o+=String.fromCharCode(u);continue}var s=e[t++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|s);continue}var l=e[t++]&63;if((u&240)==224?u=(u&15)<<12|s<<6|l:u=(u&7)<<18|s<<12|l<<6|e[t++]&63,u<65536)o+=String.fromCharCode(u);else{var d=u-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},qn=(e,t)=>e?Be(V,e,t):"",Yn=(e,t)=>{t=L(t),N(e,{name:t,fromWireType(r){for(var n=P[r>>2],a=r+4,o,s,u=a,s=0;s<=n;++s){var l=a+s;if(s==n||V[l]==0){var d=l-u,h=qn(u,d);o===void 0?o=h:(o+="\0",o+=h),u=l+1}}return at(r),o},toWireType(r,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var a,o=typeof n=="string";o||ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT==1||C("Cannot pass non-string to std::string"),o?a=je(n):a=n.length;var u=Ve(4+a+1),s=u+4;return P[u>>2]=a,o?ct(n,s,a+1):V.set(n,s),r!==null&&r.push(at,u),u},argPackAdvance:X,readValueFromPointer:pt,destructorFunction(r){at(r)}})},Le=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Zn=(e,t)=>{for(var r=e,n=r>>1,a=n+t/2;!(n>=a)&&bt[n];)++n;if(r=n<<1,r-e>32&&Le)return Le.decode(V.subarray(e,r));for(var o="",u=0;!(u>=t/2);++u){var s=dt[e+u*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Qn=(e,t,r)=>{if(r!=null||(r=2147483647),r<2)return 0;r-=2;for(var n=t,a=r<e.length*2?r/2:e.length,o=0;o<a;++o){var u=e.charCodeAt(o);dt[t>>1]=u,t+=2}return dt[t>>1]=0,t-n},Jn=e=>e.length*2,Kn=(e,t)=>{for(var r=0,n="";!(r>=t/4);){var a=st[e+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},ta=(e,t,r)=>{if(r!=null||(r=2147483647),r<4)return 0;for(var n=t,a=n+r-4,o=0;o<e.length;++o){var u=e.charCodeAt(o);if(u>=55296&&u<=57343){var s=e.charCodeAt(++o);u=65536+((u&1023)<<10)|s&1023}if(st[t>>2]=u,t+=4,t+4>a)break}return st[t>>2]=0,t-n},ea=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},ra=(e,t,r)=>{r=L(r);var n,a,o,u;t===2?(n=Zn,a=Qn,u=Jn,o=s=>bt[s>>1]):t===4&&(n=Kn,a=ta,u=ea,o=s=>P[s>>2]),N(e,{name:r,fromWireType:s=>{for(var l=P[s>>2],d,h=s+4,p=0;p<=l;++p){var w=s+4+p*t;if(p==l||o(w)==0){var b=w-h,O=n(h,b);d===void 0?d=O:(d+="\0",d+=O),h=w+t}}return at(s),d},toWireType:(s,l)=>{typeof l!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var d=u(l),h=Ve(4+d+t);return P[h>>2]=d/t,a(l,h+4,d+t),s!==null&&s.push(at,h),h},argPackAdvance:X,readValueFromPointer:pt,destructorFunction(s){at(s)}})},na=(e,t,r,n,a,o)=>{_t[e]={name:L(t),rawConstructor:H(r,n),rawDestructor:H(a,o),fields:[]}},aa=(e,t,r,n,a,o,u,s,l,d)=>{_t[e].fields.push({fieldName:L(t),getterReturnType:r,getter:H(n,a),getterContext:o,setterArgumentType:u,setter:H(s,l),setterContext:d})},oa=(e,t)=>{t=L(t),N(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Jt=[],ia=(e,t,r,n)=>(e=Jt[e],t=Y.toValue(t),e(null,t,r,n)),sa={},ua=e=>{var t=sa[e];return t===void 0?L(e):t},We=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var r=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return r||delete t.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},ca=e=>e===0?Y.toHandle(We()):(e=ua(e),Y.toHandle(We()[e])),la=e=>{var t=Jt.length;return Jt.push(e),t},Ue=(e,t)=>{var r=rt[e];return r===void 0&&C(`${t} has unknown type ${De(e)}`),r},fa=(e,t)=>{for(var r=new Array(e),n=0;n<e;++n)r[n]=Ue(P[t+n*4>>2],`parameter ${n}`);return r},da=(e,t,r)=>{var n=[],a=e.toWireType(n,r);return n.length&&(P[t>>2]=Y.toHandle(n)),a},ha=Reflect.construct,pa=(e,t,r)=>{var n=fa(e,t),a=n.shift();e--;var o=new Array(e),u=(l,d,h,p)=>{for(var w=0,b=0;b<e;++b)o[b]=n[b].readValueFromPointer(p+w),w+=n[b].argPackAdvance;var O=r===1?ha(d,o):d.apply(l,o);return da(a,h,O)},s=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return la(Gt(s,u))},va=e=>{e>9&&(q[e+1]+=1)},ya=e=>{var t=Y.toValue(e);Ht(t),Qt(e)},ma=(e,t)=>{e=Ue(e,"_emval_take_value");var r=e.readValueFromPointer(t);return Y.toHandle(r)},ga=(e,t,r,n)=>{var a=new Date().getFullYear(),o=new Date(a,0,1),u=new Date(a,6,1),s=o.getTimezoneOffset(),l=u.getTimezoneOffset(),d=Math.max(s,l);P[e>>2]=d*60,st[t>>2]=+(s!=l);var h=b=>{var O=b>=0?"-":"+",x=Math.abs(b),I=String(Math.floor(x/60)).padStart(2,"0"),D=String(x%60).padStart(2,"0");return`UTC${O}${I}${D}`},p=h(s),w=h(l);l<s?(ct(p,r,17),ct(w,n,17)):(ct(p,n,17),ct(w,r,17))},wa=()=>2147483648,$a=(e,t)=>Math.ceil(e/t)*t,ba=e=>{var t=it.buffer,r=(e-t.byteLength+65535)/65536|0;try{return it.grow(r),ge(),1}catch{}},Ca=e=>{var t=V.length;e>>>=0;var r=wa();if(e>r)return!1;for(var n=1;n<=4;n*=2){var a=t*(1+.2/n);a=Math.min(a,e+100663296);var o=Math.min(r,$a(Math.max(e,a),65536)),u=ba(o);if(u)return!0}return!1},Kt={},Ta=()=>j||"./this.program",mt=()=>{if(!mt.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Ta()};for(var r in Kt)Kt[r]===void 0?delete t[r]:t[r]=Kt[r];var n=[];for(var r in t)n.push(`${r}=${t[r]}`);mt.strings=n}return mt.strings},Pa=(e,t)=>{var r=0,n=0;for(var a of mt()){var o=t+r;P[e+n>>2]=o,r+=ct(a,o,1/0)+1,n+=4}return 0},Ea=(e,t)=>{var r=mt();P[e>>2]=r.length;var n=0;for(var a of r)n+=je(a)+1;return P[t>>2]=n,0},_a=e=>52;function Oa(e,t,r,n,a){return 70}var Aa=[null,[],[]],Sa=(e,t)=>{var r=Aa[e];t===0||t===10?((e===1?ft:z)(Be(r)),r.length=0):r.push(t)},Ia=(e,t,r,n)=>{for(var a=0,o=0;o<r;o++){var u=P[t>>2],s=P[t+4>>2];t+=8;for(var l=0;l<s;l++)Sa(e,V[u+l]);a+=s}return P[n>>2]=a,0},xa=e=>e;fn(),yn(),An(),Bn(),c.noExitRuntime&&c.noExitRuntime,c.print&&(ft=c.print),c.printErr&&(z=c.printErr),c.wasmBinary&&(K=c.wasmBinary),c.arguments&&c.arguments,c.thisProgram&&(j=c.thisProgram);var Da={s:Qr,w:Jr,a:Kr,j:tn,m:en,N:rn,p:nn,da:an,d:on,_:sn,sa:cn,Z:ln,na:hn,qa:Dn,pa:Fn,F:jn,la:Ln,R:Un,S:Vn,y:Hn,t:Nn,ra:Gn,ma:Yn,O:ra,K:na,ta:aa,oa,V:ia,ua:Qt,wa:ca,$:pa,T:va,va:ya,ka:ma,aa:ga,ea:Ca,ba:Pa,ca:Ea,fa:_a,X:Oa,Q:Ia,I:lo,C:ho,U:qa,P:$o,q:io,b:Na,D:co,ia:vo,c:Ga,ha:yo,h:Xa,i:Ka,r:eo,M:uo,v:no,E:oo,J:so,A:po,H:bo,W:Po,k:Za,f:Ya,e:za,g:Ha,L:wo,l:Ja,ja:fo,o:ro,x:to,u:ao,ga:go,B:mo,n:Qa,G:Co,Y:To,z:xa},_=await qr();_.ya;var Ma=_.za,at=c._free=_.Aa,Ve=c._malloc=_.Ca,Fa=_.Da,v=_.Ea,ja=_.Fa,Ra=_.Ga,Ba=_.Ha,La=_.Ia,Wa=_.Ja,Ua=_.Ka;c.dynCall_viijii=_.La;var Va=c.dynCall_vij=_.Ma;c.dynCall_jiji=_.Na;var ka=c.dynCall_jiiii=_.Oa;c.dynCall_iiiiij=_.Pa,c.dynCall_iiiiijj=_.Qa,c.dynCall_iiiiiijj=_.Ra;function Ha(e,t,r,n){var a=m();try{g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function Na(e,t){var r=m();try{return g(e)(t)}catch(n){if(y(r),n!==n+0)throw n;v(1,0)}}function za(e,t,r){var n=m();try{g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function Ga(e,t,r){var n=m();try{return g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function Xa(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function qa(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function Ya(e,t){var r=m();try{g(e)(t)}catch(n){if(y(r),n!==n+0)throw n;v(1,0)}}function Za(e){var t=m();try{g(e)()}catch(r){if(y(t),r!==r+0)throw r;v(1,0)}}function Qa(e,t,r,n,a,o,u,s,l,d,h){var p=m();try{g(e)(t,r,n,a,o,u,s,l,d,h)}catch(w){if(y(p),w!==w+0)throw w;v(1,0)}}function Ja(e,t,r,n,a){var o=m();try{g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function Ka(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function to(e,t,r,n,a,o,u){var s=m();try{g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function eo(e,t,r,n,a,o){var u=m();try{return g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function ro(e,t,r,n,a,o){var u=m();try{g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function no(e,t,r,n,a,o,u){var s=m();try{return g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function ao(e,t,r,n,a,o,u,s){var l=m();try{g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function oo(e,t,r,n,a,o,u,s){var l=m();try{return g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function io(e){var t=m();try{return g(e)()}catch(r){if(y(t),r!==r+0)throw r;v(1,0)}}function so(e,t,r,n,a,o,u,s,l){var d=m();try{return g(e)(t,r,n,a,o,u,s,l)}catch(h){if(y(d),h!==h+0)throw h;v(1,0)}}function uo(e,t,r,n,a,o,u){var s=m();try{return g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function co(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function lo(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function fo(e,t,r,n,a,o,u,s){var l=m();try{g(e)(t,r,n,a,o,u,s)}catch(d){if(y(l),d!==d+0)throw d;v(1,0)}}function ho(e,t,r,n,a,o){var u=m();try{return g(e)(t,r,n,a,o)}catch(s){if(y(u),s!==s+0)throw s;v(1,0)}}function po(e,t,r,n,a,o,u,s,l,d){var h=m();try{return g(e)(t,r,n,a,o,u,s,l,d)}catch(p){if(y(h),p!==p+0)throw p;v(1,0)}}function vo(e,t,r){var n=m();try{return g(e)(t,r)}catch(a){if(y(n),a!==a+0)throw a;v(1,0)}}function yo(e,t,r,n,a){var o=m();try{return g(e)(t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function mo(e,t,r,n,a,o,u,s,l,d){var h=m();try{g(e)(t,r,n,a,o,u,s,l,d)}catch(p){if(y(h),p!==p+0)throw p;v(1,0)}}function go(e,t,r,n,a,o,u,s,l){var d=m();try{g(e)(t,r,n,a,o,u,s,l)}catch(h){if(y(d),h!==h+0)throw h;v(1,0)}}function wo(e,t,r,n,a,o,u){var s=m();try{g(e)(t,r,n,a,o,u)}catch(l){if(y(s),l!==l+0)throw l;v(1,0)}}function $o(e,t,r,n){var a=m();try{return g(e)(t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function bo(e,t,r,n,a,o,u,s,l,d,h,p){var w=m();try{return g(e)(t,r,n,a,o,u,s,l,d,h,p)}catch(b){if(y(w),b!==b+0)throw b;v(1,0)}}function Co(e,t,r,n,a,o,u,s,l,d,h,p,w,b,O,x){var I=m();try{g(e)(t,r,n,a,o,u,s,l,d,h,p,w,b,O,x)}catch(D){if(y(I),D!==D+0)throw D;v(1,0)}}function To(e,t,r,n){var a=m();try{Va(e,t,r,n)}catch(o){if(y(a),o!==o+0)throw o;v(1,0)}}function Po(e,t,r,n,a){var o=m();try{return ka(e,t,r,n,a)}catch(u){if(y(o),u!==u+0)throw u;v(1,0)}}function te(){if(et>0){ht=te;return}if(Br(),et>0){ht=te;return}function e(){var t;c.calledRun=!0,!ve&&(Lr(),T(c),(t=c.onRuntimeInitialized)===null||t===void 0||t.call(c),Wr())}c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1),e()},1)):e()}function Eo(){if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.shift()()}return Eo(),te(),f=S,f};function Lt(i){return ne(Bt,i)}function yr(){return pr(Bt)}function mr(i){Lt({overrides:i,equalityFn:Object.is,fireImmediately:!1})}async function gr(i,f){return vr(Bt,i,f)}const wr="3c07027dbfd6da47330ac18e74e6924019d9ac9a4c1e161b800666f9e3c925ca",ae=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["databar_limited","DataBarLimited"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"],["any","Any"]],$r=[...ae,["unknown"]].map(i=>i[0]),Wt=new Map(ae);function br(i){for(const[f,c]of Wt)if(i===c)return f;return"unknown"}function Cr(i){if(oe(i))return{width:i.naturalWidth,height:i.naturalHeight};if(ie(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(se(i))return{width:i.videoWidth,height:i.videoHeight};if(ce(i))return{width:i.width,height:i.height};if(fe(i))return{width:i.displayWidth,height:i.displayHeight};if(ue(i))return{width:i.width,height:i.height};if(le(i))return{width:i.width,height:i.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function oe(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLImageElement)}catch{return!1}}function ie(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.SVGImageElement)}catch{return!1}}function se(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLVideoElement)}catch{return!1}}function ue(i){var f,c;try{return i instanceof((c=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:c.HTMLCanvasElement)}catch{return!1}}function ce(i){try{return i instanceof ImageBitmap||Object.prototype.toString.call(i)==="[object ImageBitmap]"}catch{return!1}}function le(i){try{return i instanceof OffscreenCanvas||Object.prototype.toString.call(i)==="[object OffscreenCanvas]"}catch{return!1}}function fe(i){try{return i instanceof VideoFrame||Object.prototype.toString.call(i)==="[object VideoFrame]"}catch{return!1}}function Tr(i){try{return i instanceof Blob||Object.prototype.toString.call(i)==="[object Blob]"}catch{return!1}}function Pr(i){try{return i instanceof ImageData||Object.prototype.toString.call(i)==="[object ImageData]"}catch{return!1}}function Er(i,f){try{const c=new OffscreenCanvas(i,f);if(c.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return c;throw void 0}catch{const c=document.createElement("canvas");return c.width=i,c.height=f,c}}async function de(i){if(oe(i)&&!await Sr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ie(i)&&!await Ir(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(fe(i)&&xr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(se(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ce(i)&&Mr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:c}=Cr(i);if(f===0||c===0)return null;const $=Er(f,c).getContext("2d");$.drawImage(i,0,0);try{return $.getImageData(0,0,f,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function _r(i){let f;try{f=await createImageBitmap(i)}catch{try{if(globalThis.Image){f=new Image;let $="";try{$=URL.createObjectURL(i),f.src=$,await f.decode()}finally{URL.revokeObjectURL($)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await de(f)}function Or(i){const{width:f,height:c}=i;if(f===0||c===0)return null;const T=i.getContext("2d");try{return T.getImageData(0,0,f,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ar(i){if(Tr(i))return await _r(i);if(Pr(i)){if(Dr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ue(i)||le(i)?Or(i):await de(i)}async function Sr(i){try{return await i.decode(),!0}catch{return!1}}async function Ir(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function xr(i){return i.format===null}function Dr(i){return i.data.buffer.byteLength===0}function Mr(i){return i.width===0&&i.height===0}function he(i,f){return Fr(i)?new DOMException(`${f}: ${i.message}`,i.name):jr(i)?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}function Fr(i){return i instanceof DOMException||Object.prototype.toString.call(i)==="[object DOMException]"}function jr(i){return i instanceof Error||Object.prototype.toString.call(i)==="[object Error]"}class Rr{constructor(f={}){Ye(this,lt);var c;try{const T=(c=f==null?void 0:f.formats)==null?void 0:c.filter($=>$!=="unknown");if((T==null?void 0:T.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const $ of T!=null?T:[])if(!Wt.has($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`);Ze(this,lt,T!=null?T:[]),Lt({fireImmediately:!0}).catch(()=>{})}catch(T){throw he(T,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return $r.filter(f=>f!=="unknown")}async detect(f){try{const c=await Ar(f);if(c===null)return[];let T;const $={tryCode39ExtendedMode:!1,textMode:"Plain",formats:qe(this,lt).map(S=>Wt.get(S))};try{T=await gr(c,$)}catch(S){throw console.error(S),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return T.map(S=>{const{topLeft:{x:F,y:W},topRight:{x:A,y:j},bottomLeft:{x:B,y:Q},bottomRight:{x:ot,y:J}}=S.position,ft=Math.min(F,A,B,ot),z=Math.min(W,j,Q,J),K=Math.max(F,A,B,ot),it=Math.max(W,j,Q,J);return{boundingBox:new DOMRectReadOnly(ft,z,K-ft,it-z),rawValue:S.text,format:br(S.format),cornerPoints:[{x:F,y:W},{x:A,y:j},{x:ot,y:J},{x:B,y:Q}]}})}catch(c){throw he(c,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return lt=new WeakMap,(pe=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=Rr),E.ZXING_CPP_COMMIT=fr,E.ZXING_WASM_SHA256=wr,E.ZXING_WASM_VERSION=lr,E.prepareZXingModule=Lt,E.purgeZXingModule=yr,E.setZXingModuleOverrides=mr,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),E}({});