Socket
Socket
Sign inDemoInstall

barcode-detector

Package Overview
Dependencies
3
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.2 to 2.2.3

6

dist/cjs/pure.js

@@ -1,3 +0,3 @@

"use strict";var Ye=(o,h,s)=>{if(!h.has(o))throw TypeError("Cannot "+s)};var re=(o,h,s)=>(Ye(o,h,"read from private field"),s?s.call(o):h.get(o)),ze=(o,h,s)=>{if(h.has(o))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(o):h.set(o,s)},Ne=(o,h,s,$)=>(Ye(o,h,"write to private field"),$?$.call(o,s):h.set(o,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Qe=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["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"]],Da=[...Qe,["unknown"]].map(o=>o[0]),It=new Map(Qe);function xa(o){for(const[h,s]of It)if(o===s)return h;return"unknown"}function Fa(o){if(Ze(o))return{width:o.naturalWidth,height:o.naturalHeight};if(Je(o))return{width:o.width.baseVal.value,height:o.height.baseVal.value};if(Ke(o))return{width:o.videoWidth,height:o.videoHeight};if(er(o))return{width:o.width,height:o.height};if(nr(o))return{width:o.displayWidth,height:o.displayHeight};if(tr(o))return{width:o.width,height:o.height};if(rr(o))return{width:o.width,height:o.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 Ze(o){try{return o instanceof HTMLImageElement}catch{return!1}}function Je(o){try{return o instanceof SVGImageElement}catch{return!1}}function Ke(o){try{return o instanceof HTMLVideoElement}catch{return!1}}function tr(o){try{return o instanceof HTMLCanvasElement}catch{return!1}}function er(o){try{return o instanceof ImageBitmap}catch{return!1}}function rr(o){try{return o instanceof OffscreenCanvas}catch{return!1}}function nr(o){try{return o instanceof VideoFrame}catch{return!1}}function ar(o){try{return o instanceof Blob}catch{return!1}}function Sa(o){try{return o instanceof ImageData}catch{return!1}}function Ma(o,h){try{const s=new OffscreenCanvas(o,h);if(s.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return s;throw void 0}catch{const s=document.createElement("canvas");return s.width=o,s.height=h,s}}async function or(o){if(Ze(o)&&!await Wa(o))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Je(o)&&!await ka(o))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(nr(o)&&Ha(o))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Ke(o)&&(o.readyState===0||o.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(er(o)&&Ua(o))throw new DOMException("The image source is detached.","InvalidStateError");const{width:h,height:s}=Fa(o);if(h===0||s===0)return null;const g=Ma(h,s).getContext("2d");g.drawImage(o,0,0);try{return g.getImageData(0,0,h,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function ja(o){let h;try{if(globalThis.createImageBitmap)h=await createImageBitmap(o);else if(globalThis.Image){h=new Image;let $="";try{$=URL.createObjectURL(o),h.src=$,await h.decode()}finally{URL.revokeObjectURL($)}}else return o}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await or(h)}function Ia(o){const{width:h,height:s}=o;if(h===0||s===0)return null;const $=o.getContext("2d");try{return $.getImageData(0,0,h,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ra(o){if(ar(o))return await ja(o);if(Sa(o)){if(Ba(o))throw new DOMException("The image data has been detached.","InvalidStateError");return o}return tr(o)||rr(o)?Ia(o):await or(o)}async function Wa(o){try{return await o.decode(),!0}catch{return!1}}async function ka(o){var h;try{return await((h=o.decode)==null?void 0:h.call(o)),!0}catch{return!1}}function Ha(o){return o.format===null}function Ba(o){return o.data.buffer.byteLength===0}function Ua(o){return o.width===0&&o.height===0}function Ge(o,h){return o instanceof DOMException?new DOMException(`${h}: ${o.message}`,o.name):o instanceof Error?new o.constructor(`${h}: ${o.message}`):new Error(`${h}: ${o}`)}const Xe=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Va(o){return o.join("|")}function La(o){const h=qe(o);let s=0,$=Xe.length-1;for(;s<=$;){const g=Math.floor((s+$)/2),b=Xe[g],H=qe(b);if(H===h)return b;H<h?s=g+1:$=g-1}return"None"}function qe(o){return o.toLowerCase().replace(/_-\[\]/g,"")}function Ya(o,h){return o.Binarizer[h]}function za(o,h){return o.CharacterSet[h]}const Na=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Ga(o){return Na[o.value]}function Xa(o,h){return o.EanAddOnSymbol[h]}function qa(o,h){return o.TextMode[h]}const lt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ir(o,h){return{...h,formats:Va(h.formats),binarizer:Ya(o,h.binarizer),eanAddOnSymbol:Xa(o,h.eanAddOnSymbol),textMode:qa(o,h.textMode),characterSet:za(o,h.characterSet)}}function sr(o){return{...o,format:La(o.format),eccLevel:o.eccLevel,contentType:Ga(o.contentType)}}const Qa={locateFile:(o,h)=>{const s=o.match(/_(.+?)\.wasm$/);return s?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${s[1]}/${o}`:h+o}};let ne=new WeakMap;function ae(o,h){var s;const $=ne.get(o);if($!=null&&$.modulePromise&&(h===void 0||Object.is(h,$.moduleOverrides)))return $.modulePromise;const g=(s=h!=null?h:$==null?void 0:$.moduleOverrides)!=null?s:Qa,b=o({...g});return ne.set(o,{moduleOverrides:g,modulePromise:b}),b}function Za(o,h){ne.set(o,{moduleOverrides:h})}async function Ja(o,h,s=lt){const $={...lt,...s},g=await ae(o),{size:b}=h,H=new Uint8Array(await h.arrayBuffer()),L=g._malloc(b);g.HEAPU8.set(H,L);const B=g.readBarcodesFromImage(L,b,ir(g,$));g._free(L);const S=[];for(let Y=0;Y<B.size();++Y)S.push(sr(B.get(Y)));return S}async function Ka(o,h,s=lt){const $={...lt,...s},g=await ae(o),{data:b,width:H,height:L,data:{byteLength:B}}=h,S=g._malloc(B);g.HEAPU8.set(b,S);const Y=g.readBarcodesFromPixmap(S,H,L,ir(g,$));g._free(S);const G=[];for(let U=0;U<Y.size();++U)G.push(sr(Y.get(U)));return G}({...lt,formats:[...lt.formats]});var Rt=(()=>{var o=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(h={}){var s=h,$,g;s.ready=new Promise((t,e)=>{$=t,g=e});var b=Object.assign({},s),H="./this.program",L=typeof window=="object",B=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var S="";function Y(t){return s.locateFile?s.locateFile(t,S):S+t}var G;(L||B)&&(B?S=self.location.href:typeof document<"u"&&document.currentScript&&(S=document.currentScript.src),o&&(S=o),S.indexOf("blob:")!==0?S=S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):S="",B&&(G=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),s.print||console.log.bind(console);var U=s.printErr||console.error.bind(console);Object.assign(s,b),b=null,s.arguments&&s.arguments,s.thisProgram&&(H=s.thisProgram),s.quit&&s.quit;var Q;s.wasmBinary&&(Q=s.wasmBinary),typeof WebAssembly!="object"&&bt("no native wasm support detected");var tt,dt=!1,V,W,at,ft,k,_,oe,ie;function se(){var t=tt.buffer;s.HEAP8=V=new Int8Array(t),s.HEAP16=at=new Int16Array(t),s.HEAPU8=W=new Uint8Array(t),s.HEAPU16=ft=new Uint16Array(t),s.HEAP32=k=new Int32Array(t),s.HEAPU32=_=new Uint32Array(t),s.HEAPF32=oe=new Float32Array(t),s.HEAPF64=ie=new Float64Array(t)}var ue=[],ce=[],le=[];function ur(){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)dr(s.preRun.shift());Wt(ue)}function cr(){Wt(ce)}function lr(){if(s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;)hr(s.postRun.shift());Wt(le)}function dr(t){ue.unshift(t)}function fr(t){ce.unshift(t)}function hr(t){le.unshift(t)}var et=0,ht=null;function pr(t){var e;et++,(e=s.monitorRunDependencies)===null||e===void 0||e.call(s,et)}function mr(t){var e;if(et--,(e=s.monitorRunDependencies)===null||e===void 0||e.call(s,et),et==0&&ht){var r=ht;ht=null,r()}}function bt(t){var e;(e=s.onAbort)===null||e===void 0||e.call(s,t),t="Aborted("+t+")",U(t),dt=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw g(r),r}var vr="data:application/octet-stream;base64,",de=t=>t.startsWith(vr),ot;ot="zxing_reader.wasm",de(ot)||(ot=Y(ot));function fe(t){if(t==ot&&Q)return new Uint8Array(Q);if(G)return G(t);throw"both async and sync fetching of the wasm failed"}function yr(t){return!Q&&(L||B)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>fe(t)):Promise.resolve().then(()=>fe(t))}function he(t,e,r){return yr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{U(`failed to asynchronously prepare wasm: ${n}`),bt(n)})}function gr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!de(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var i=WebAssembly.instantiateStreaming(a,r);return i.then(n,function(u){return U(`wasm streaming compile failed: ${u}`),U("falling back to ArrayBuffer instantiation"),he(e,r,n)})}):he(e,r,n)}function wr(){var t={a:sa};function e(n,a){return M=n.exports,tt=M.ia,se(),Te=M.ma,fr(M.ja),mr(),M}pr();function r(n){e(n.instance)}if(s.instantiateWasm)try{return s.instantiateWasm(t,e)}catch(n){U(`Module.instantiateWasm callback failed with error: ${n}`),g(n)}return gr(Q,ot,t,r).catch(g),{}}var Wt=t=>{for(;t.length>0;)t.shift()(s)};s.noExitRuntime;var Ct=[],Tt=0,$r=t=>{var e=new kt(t);return e.get_caught()||(e.set_caught(!0),Tt--),e.set_rethrown(!1),Ct.push(e),We(e.excPtr),e.get_exception_ptr()},Z=0,br=()=>{P(0,0);var t=Ct.pop();Re(t.excPtr),Z=0};function kt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,V[this.ptr+12>>0]=e},this.get_caught=function(){return V[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,V[this.ptr+13>>0]=e},this.get_rethrown=function(){return V[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=He(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Cr=t=>{throw Z||(Z=t),Z},Ht=t=>{var e=Z;if(!e)return $t(0),0;var r=new kt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return $t(0),e;for(var a in t){var i=t[a];if(i===0||i===n)break;var u=r.ptr+16;if(ke(i,n,u))return $t(i),e}return $t(n),e},Tr=()=>Ht([]),_r=t=>Ht([t]),Pr=(t,e)=>Ht([t,e]),Er=()=>{var t=Ct.pop();t||bt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Ct.push(t),t.set_rethrown(!0),t.set_caught(!1),Tt++),Z=e,Z},Ar=(t,e,r)=>{var n=new kt(t);throw n.init(e,r),Z=t,Tt++,Z},Or=()=>Tt,_t={},Bt=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Ut(t){return this.fromWireType(k[t>>2])}var it={},rt={},Pt={},pe,Et=t=>{throw new pe(t)},nt=(t,e,r)=>{t.forEach(function(c){Pt[c]=e});function n(c){var l=r(c);l.length!==t.length&&Et("Mismatched type converter count");for(var f=0;f<t.length;++f)X(t[f],l[f])}var a=new Array(e.length),i=[],u=0;e.forEach((c,l)=>{rt.hasOwnProperty(c)?a[l]=rt[c]:(i.push(c),it.hasOwnProperty(c)||(it[c]=[]),it[c].push(()=>{a[l]=rt[c],++u,u===i.length&&n(a)}))}),i.length===0&&n(a)},Dr=t=>{var e=_t[t];delete _t[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,i=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));nt([t],i,u=>{var c={};return a.forEach((l,f)=>{var p=l.fieldName,v=u[f],y=l.getter,w=l.getterContext,E=u[f+a.length],x=l.setter,T=l.setterContext;c[p]={read:R=>v.fromWireType(y(w,R)),write:(R,d)=>{var m=[];x(T,R,E.toWireType(m,d)),Bt(m)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var p in c)f[p]=c[p].read(l);return n(l),f},toWireType:(l,f)=>{for(var p in c)if(!(p in f))throw new TypeError(`Missing field: "${p}"`);var v=r();for(p in c)c[p].write(v,f[p]);return l!==null&&l.push(n,v),v},argPackAdvance:q,readValueFromPointer:Ut,destructorFunction:n}]})},xr=(t,e,r,n,a)=>{},Fr=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);me=t},me,I=t=>{for(var e="",r=t;W[r];)e+=me[W[r++]];return e},st,C=t=>{throw new st(t)};function Sr(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),rt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(rt[t]=e,delete Pt[t],it.hasOwnProperty(t)){var a=it[t];delete it[t],a.forEach(i=>i())}}function X(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Sr(t,e,r)}var q=8,Mr=(t,e,r,n)=>{e=I(e),X(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,i){return i?r:n},argPackAdvance:q,readValueFromPointer:function(a){return this.fromWireType(W[a])},destructorFunction:null})},jr=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Vt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Lt=!1,ve=t=>{},Ir=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},ye=t=>{t.count.value-=1;var e=t.count.value===0;e&&Ir(t)},ge=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=ge(t,e,r.baseClass);return n===null?null:r.downcast(n)},we={},Rr=()=>Object.keys(vt).length,Wr=()=>{var t=[];for(var e in vt)vt.hasOwnProperty(e)&&t.push(vt[e]);return t},pt=[],Yt=()=>{for(;pt.length;){var t=pt.pop();t.$$.deleteScheduled=!1,t.delete()}},mt,kr=t=>{mt=t,pt.length&&mt&&mt(Yt)},Hr=()=>{s.getInheritedInstanceCount=Rr,s.getLiveInheritedInstances=Wr,s.flushPendingDeletes=Yt,s.setDelayFunction=kr},vt={},Br=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},Ur=(t,e)=>(e=Br(t,e),vt[e]),At=(t,e)=>{(!e.ptrType||!e.ptr)&&Et("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Et("Both smartPtrType and smartPtr must be specified"),e.count={value:1},yt(Object.create(t,{$$:{value:e,writable:!0}}))};function Vr(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Ur(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?At(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):At(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i=this.registeredClass.getActualType(e),u=we[i];if(!u)return a.call(this);var c;this.isConst?c=u.constPointerType:c=u.pointerType;var l=ge(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?At(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):At(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var yt=t=>typeof FinalizationRegistry>"u"?(yt=e=>e,t):(Lt=new FinalizationRegistry(e=>{ye(e.$$)}),yt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Lt.register(e,a,e)}return e},ve=e=>Lt.unregister(e),yt(t)),Lr=()=>{Object.assign(Ot.prototype,{isAliasOf(t){if(!(this instanceof Ot)||!(t instanceof Ot))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Vt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=yt(Object.create(Object.getPrototypeOf(this),{$$:{value:jr(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Vt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),ve(this),ye(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Vt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),pt.push(this),pt.length===1&&mt&&mt(Yt),this.$$.deleteScheduled=!0,this}})};function Ot(){}var gt=(t,e)=>Object.defineProperty(e,"name",{value:t}),$e=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},zt=(t,e,r)=>{s.hasOwnProperty(t)?((r===void 0||s[t].overloadTable!==void 0&&s[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),$e(s,t,t),s.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),s[t].overloadTable[r]=e):(s[t]=e,r!==void 0&&(s[t].numArguments=r))},Yr=48,zr=57,Nr=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Yr&&e<=zr?`_${t}`:t};function Gr(t,e,r,n,a,i,u,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=i,this.upcast=u,this.downcast=c,this.pureVirtualFunctions=[]}var Nt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function Xr(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function qr(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&C(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,J.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function Qr(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function be(t){return this.fromWireType(_[t>>2])}var Zr=()=>{Object.assign(Dt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var e;(e=this.rawDestructor)===null||e===void 0||e.call(this,t)},argPackAdvance:q,readValueFromPointer:be,deleteObject(t){t!==null&&t.delete()},fromWireType:Vr})};function Dt(t,e,r,n,a,i,u,c,l,f,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=i,this.sharingPolicy=u,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=Xr,this.destructorFunction=null):(this.toWireType=Qr,this.destructorFunction=null):this.toWireType=qr}var Ce=(t,e,r)=>{s.hasOwnProperty(t)||Et("Replacing nonexistant public symbol"),s[t].overloadTable!==void 0&&r!==void 0?s[t].overloadTable[r]=e:(s[t]=e,s[t].argCount=r)},Jr=(t,e,r)=>{var n=s["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},xt=[],Te,A=t=>{var e=xt[t];return e||(t>=xt.length&&(xt.length=t+1),xt[t]=e=Te.get(t)),e},Kr=(t,e,r)=>{if(t.includes("j"))return Jr(t,e,r);var n=A(e).apply(null,r);return n},tn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Kr(t,e,r)}},N=(t,e)=>{t=I(t);function r(){return t.includes("j")?tn(t,e):A(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},en=(t,e)=>{var r=gt(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},_e,Pe=t=>{var e=Ie(t),r=I(e);return K(e),r},Ft=(t,e)=>{var r=[],n={};function a(i){if(!n[i]&&!rt[i]){if(Pt[i]){Pt[i].forEach(a);return}r.push(i),n[i]=!0}}throw e.forEach(a),new _e(`${t}: `+r.map(Pe).join([", "]))},rn=(t,e,r,n,a,i,u,c,l,f,p,v,y)=>{p=I(p),i=N(a,i),c&&(c=N(u,c)),f&&(f=N(l,f)),y=N(v,y);var w=Nr(p);zt(w,function(){Ft(`Cannot construct ${p} due to unbound types`,[n])}),nt([t,e,r],n?[n]:[],function(E){E=E[0];var x,T;n?(x=E.registeredClass,T=x.instancePrototype):T=Ot.prototype;var R=gt(p,function(){if(Object.getPrototypeOf(this)!==d)throw new st("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new st(p+" has no accessible constructor");var Le=m.constructor_body[arguments.length];if(Le===void 0)throw new st(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return Le.apply(this,arguments)}),d=Object.create(T,{constructor:{value:R}});R.prototype=d;var m=new Gr(p,R,d,y,x,i,c,f);if(m.baseClass){var F,j;(j=(F=m.baseClass).__derivedClasses)!==null&&j!==void 0||(F.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m)}var ut=new Dt(p,m,!0,!1,!1),jt=new Dt(p+"*",m,!1,!1,!1),Ve=new Dt(p+" const*",m,!1,!0,!1);return we[t]={pointerType:jt,constPointerType:Ve},Ce(w,R),[ut,jt,Ve]})},Gt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function nn(t){for(var e=1;e<t.length;++e)if(t[e]!==null&&t[e].destructorFunction===void 0)return!0;return!1}function Xt(t,e,r,n,a,i){var u=e.length;u<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var c=e[1]!==null&&r!==null,l=nn(e),f=e[0].name!=="void",p=u-2,v=new Array(p),y=[],w=[],E=function(){arguments.length!==p&&C(`function ${t} called with ${arguments.length} arguments, expected ${p}`),w.length=0;var x;y.length=c?2:1,y[0]=a,c&&(x=e[1].toWireType(w,this),y[1]=x);for(var T=0;T<p;++T)v[T]=e[T+2].toWireType(w,arguments[T]),y.push(v[T]);var R=n.apply(null,y);function d(m){if(l)Bt(w);else for(var F=c?1:2;F<e.length;F++){var j=F===1?x:v[F-2];e[F].destructorFunction!==null&&e[F].destructorFunction(j)}if(f)return e[0].fromWireType(m)}return d(R)};return gt(t,E)}var an=(t,e,r,n,a,i)=>{var u=Gt(e,r);a=N(n,a),nt([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new st(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{Ft(`Cannot construct ${c.name} due to unbound types`,u)},nt([],u,f=>(f.splice(1,0,null),c.registeredClass.constructor_body[e-1]=Xt(l,f,null,a,i),[])),[]})},Ee=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?t.substr(0,e):t},on=(t,e,r,n,a,i,u,c,l)=>{var f=Gt(r,n);e=I(e),e=Ee(e),i=N(a,i),nt([],[t],function(p){p=p[0];var v=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function y(){Ft(`Cannot call ${v} due to unbound types`,f)}var w=p.registeredClass.instancePrototype,E=w[e];return E===void 0||E.overloadTable===void 0&&E.className!==p.name&&E.argCount===r-2?(y.argCount=r-2,y.className=p.name,w[e]=y):($e(w,e,v),w[e].overloadTable[r-2]=y),nt([],f,function(x){var T=Xt(v,x,p,i,u);return w[e].overloadTable===void 0?(T.argCount=r-2,w[e]=T):w[e].overloadTable[r-2]=T,[]}),[]})};function sn(){Object.assign(Ae.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Ae(){this.allocated=[void 0],this.freelist=[]}var z=new Ae,qt=t=>{t>=z.reserved&&--z.get(t).refcount===0&&z.free(t)},un=()=>{for(var t=0,e=z.reserved;e<z.allocated.length;++e)z.allocated[e]!==void 0&&++t;return t},cn=()=>{z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),z.reserved=z.allocated.length,s.count_emval_handles=un},J={toValue:t=>(t||C("Cannot use deleted val. handle = "+t),z.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return z.allocate({refcount:1,value:t})}}},ln=(t,e)=>{e=I(e),X(t,{name:e,fromWireType:r=>{var n=J.toValue(r);return qt(r),n},toWireType:(r,n)=>J.toHandle(n),argPackAdvance:q,readValueFromPointer:Ut,destructorFunction:null})},dn=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(V[n>>0])}:function(n){return this.fromWireType(W[n>>0])};case 2:return r?function(n){return this.fromWireType(at[n>>1])}:function(n){return this.fromWireType(ft[n>>1])};case 4:return r?function(n){return this.fromWireType(k[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},fn=(t,e,r,n)=>{e=I(e);function a(){}a.values={},X(t,{name:e,constructor:a,fromWireType:function(i){return this.constructor.values[i]},toWireType:(i,u)=>u.value,argPackAdvance:q,readValueFromPointer:dn(e,r,n),destructorFunction:null}),zt(e,a)},Qt=(t,e)=>{var r=rt[t];return r===void 0&&C(e+" has unknown type "+Pe(t)),r},hn=(t,e,r)=>{var n=Qt(t,"enum");e=I(e);var a=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:gt(`${n.name}_${e}`,function(){})}});a.values[r]=i,a[e]=i},Zt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},pn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(oe[r>>2])};case 8:return function(r){return this.fromWireType(ie[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},mn=(t,e,r)=>{e=I(e),X(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:q,readValueFromPointer:pn(e,r),destructorFunction:null})},vn=(t,e,r,n,a,i,u)=>{var c=Gt(e,r);t=I(t),t=Ee(t),a=N(n,a),zt(t,function(){Ft(`Cannot call ${t} due to unbound types`,c)},e-1),nt([],c,function(l){var f=[l[0],null].concat(l.slice(1));return Ce(t,Xt(t,f,null,a,i),e-1),[]})},yn=(t,e,r)=>{switch(e){case 1:return r?n=>V[n>>0]:n=>W[n>>0];case 2:return r?n=>at[n>>1]:n=>ft[n>>1];case 4:return r?n=>k[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},gn=(t,e,r,n,a)=>{e=I(e);var i=p=>p;if(n===0){var u=32-8*r;i=p=>p<<u>>>u}var c=e.includes("unsigned"),l=(p,v)=>{},f;c?f=function(p,v){return l(v,this.name),v>>>0}:f=function(p,v){return l(v,this.name),v},X(t,{name:e,fromWireType:i,toWireType:f,argPackAdvance:q,readValueFromPointer:yn(e,r,n!==0),destructorFunction:null})},wn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function i(u){var c=_[u>>2],l=_[u+4>>2];return new a(V.buffer,l,c)}r=I(r),X(t,{name:r,fromWireType:i,argPackAdvance:q,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Oe=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,i=r+n-1,u=0;u<t.length;++u){var c=t.charCodeAt(u);if(c>=55296&&c<=57343){var l=t.charCodeAt(++u);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=i)break;e[r++]=c}else if(c<=2047){if(r+1>=i)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=i)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=i)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},$n=(t,e,r)=>Oe(t,W,e,r),De=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},xe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,bn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&xe)return xe.decode(t.subarray(e,a));for(var i="";e<a;){var u=t[e++];if(!(u&128)){i+=String.fromCharCode(u);continue}var c=t[e++]&63;if((u&224)==192){i+=String.fromCharCode((u&31)<<6|c);continue}var l=t[e++]&63;if((u&240)==224?u=(u&15)<<12|c<<6|l:u=(u&7)<<18|c<<12|l<<6|t[e++]&63,u<65536)i+=String.fromCharCode(u);else{var f=u-65536;i+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return i},Jt=(t,e)=>t?bn(W,t,e):"",Cn=(t,e)=>{e=I(e);var r=e==="std::string";X(t,{name:e,fromWireType(n){var a=_[n>>2],i=n+4,u;if(r)for(var c=i,l=0;l<=a;++l){var f=i+l;if(l==a||W[f]==0){var p=f-c,v=Jt(c,p);u===void 0?u=v:(u+="\0",u+=v),c=f+1}}else{for(var y=new Array(a),l=0;l<a;++l)y[l]=String.fromCharCode(W[i+l]);u=y.join("")}return K(n),u},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var i,u=typeof a=="string";u||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&u?i=De(a):i=a.length;var c=ee(4+i+1),l=c+4;if(_[c>>2]=i,r&&u)$n(a,l,i+1);else if(u)for(var f=0;f<i;++f){var p=a.charCodeAt(f);p>255&&(K(l),C("String has UTF-16 code units that do not fit in 8 bits")),W[l+f]=p}else for(var f=0;f<i;++f)W[l+f]=a[f];return n!==null&&n.push(K,c),c},argPackAdvance:q,readValueFromPointer:be,destructorFunction(n){K(n)}})},Fe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Tn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&ft[n];)++n;if(r=n<<1,r-t>32&&Fe)return Fe.decode(W.subarray(t,r));for(var i="",u=0;!(u>=e/2);++u){var c=at[t+u*2>>1];if(c==0)break;i+=String.fromCharCode(c)}return i},_n=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<2)return 0;r-=2;for(var a=e,i=r<t.length*2?r/2:t.length,u=0;u<i;++u){var c=t.charCodeAt(u);at[e>>1]=c,e+=2}return at[e>>1]=0,e-a},Pn=t=>t.length*2,En=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=k[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var i=a-65536;n+=String.fromCharCode(55296|i>>10,56320|i&1023)}else n+=String.fromCharCode(a)}return n},An=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<4)return 0;for(var a=e,i=a+r-4,u=0;u<t.length;++u){var c=t.charCodeAt(u);if(c>=55296&&c<=57343){var l=t.charCodeAt(++u);c=65536+((c&1023)<<10)|l&1023}if(k[e>>2]=c,e+=4,e+4>i)break}return k[e>>2]=0,e-a},On=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Dn=(t,e,r)=>{r=I(r);var n,a,i,u,c;e===2?(n=Tn,a=_n,u=Pn,i=()=>ft,c=1):e===4&&(n=En,a=An,u=On,i=()=>_,c=2),X(t,{name:r,fromWireType:l=>{for(var f=_[l>>2],p=i(),v,y=l+4,w=0;w<=f;++w){var E=l+4+w*e;if(w==f||p[E>>c]==0){var x=E-y,T=n(y,x);v===void 0?v=T:(v+="\0",v+=T),y=E+e}}return K(l),v},toWireType:(l,f)=>{typeof f!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=u(f),v=ee(4+p+e);return _[v>>2]=p>>c,a(f,v+4,p+e),l!==null&&l.push(K,v),v},argPackAdvance:q,readValueFromPointer:Ut,destructorFunction(l){K(l)}})},xn=(t,e,r,n,a,i)=>{_t[t]={name:I(e),rawConstructor:N(r,n),rawDestructor:N(a,i),fields:[]}},Fn=(t,e,r,n,a,i,u,c,l,f)=>{_t[t].fields.push({fieldName:I(e),getterReturnType:r,getter:N(n,a),getterContext:i,setterArgumentType:u,setter:N(c,l),setterContext:f})},Sn=(t,e)=>{e=I(e),X(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Kt=[],Mn=(t,e,r,n)=>(t=Kt[t],e=J.toValue(e),t(null,e,r,n)),jn={},In=t=>{var e=jn[t];return e===void 0?I(t):e},Se=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Rn=t=>t===0?J.toHandle(Se()):(t=In(t),J.toHandle(Se()[t])),Wn=t=>{var e=Kt.length;return Kt.push(t),e},kn=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=Qt(_[e+n*4>>2],"parameter "+n);return r},Hn=Reflect.construct,Bn=(t,e,r)=>{var n=[],a=t.toWireType(n,r);return n.length&&(_[e>>2]=J.toHandle(n)),a},Un=(t,e,r)=>{var n=kn(t,e),a=n.shift();t--;var i=new Array(t),u=(l,f,p,v)=>{for(var y=0,w=0;w<t;++w)i[w]=n[w].readValueFromPointer(v+y),y+=n[w].argPackAdvance;for(var E=r===1?Hn(f,i):f.apply(l,i),w=0;w<t;++w){var x,T;(x=(T=n[w]).deleteObject)===null||x===void 0||x.call(T,i[w])}return Bn(a,p,E)},c=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return Wn(gt(c,u))},Vn=t=>{t>4&&(z.get(t).refcount+=1)},Ln=t=>{var e=J.toValue(t);Bt(e),qt(t)},Yn=(t,e)=>{t=Qt(t,"_emval_take_value");var r=t.readValueFromPointer(e);return J.toHandle(r)},zn=()=>{bt("")},Nn=(t,e,r)=>W.copyWithin(t,e,e+r),Gn=()=>2147483648,Xn=t=>{var e=tt.buffer,r=(t-e.byteLength+65535)/65536;try{return tt.grow(r),se(),1}catch{}},qn=t=>{var e=W.length;t>>>=0;var r=Gn();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var i=e*(1+.2/a);i=Math.min(i,t+100663296);var u=Math.min(r,n(Math.max(t,i),65536)),c=Xn(u);if(c)return!0}return!1},te={},Qn=()=>H||"./this.program",wt=()=>{if(!wt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Qn()};for(var r in te)te[r]===void 0?delete e[r]:e[r]=te[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);wt.strings=n}return wt.strings},Zn=(t,e)=>{for(var r=0;r<t.length;++r)V[e++>>0]=t.charCodeAt(r);V[e>>0]=0},Jn=(t,e)=>{var r=0;return wt().forEach((n,a)=>{var i=e+r;_[t+a*4>>2]=i,Zn(n,i),r+=n.length+1}),0},Kn=(t,e)=>{var r=wt();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},ta=t=>t,St=t=>t%4===0&&(t%100!==0||t%400===0),ea=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Me=[31,29,31,30,31,30,31,31,30,31,30,31],je=[31,28,31,30,31,30,31,31,30,31,30,31],ra=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=St(r.getFullYear()),a=r.getMonth(),i=(n?Me:je)[a];if(e>i-r.getDate())e-=i-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function na(t,e,r){var n=r>0?r:De(t)+1,a=new Array(n),i=Oe(t,a,0,a.length);return e&&(a.length=i),a}var aa=(t,e)=>{V.set(t,e)},oa=(t,e,r,n)=>{var a=_[n+40>>2],i={tm_sec:k[n>>2],tm_min:k[n+4>>2],tm_hour:k[n+8>>2],tm_mday:k[n+12>>2],tm_mon:k[n+16>>2],tm_year:k[n+20>>2],tm_wday:k[n+24>>2],tm_yday:k[n+28>>2],tm_isdst:k[n+32>>2],tm_gmtoff:k[n+36>>2],tm_zone:a?Jt(a):""},u=Jt(r),c={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in c)u=u.replace(new RegExp(l,"g"),c[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function v(d,m,F){for(var j=typeof d=="number"?d.toString():d||"";j.length<m;)j=F[0]+j;return j}function y(d,m){return v(d,m,"0")}function w(d,m){function F(ut){return ut<0?-1:ut>0?1:0}var j;return(j=F(d.getFullYear()-m.getFullYear()))===0&&(j=F(d.getMonth()-m.getMonth()))===0&&(j=F(d.getDate()-m.getDate())),j}function E(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function x(d){var m=ra(new Date(d.tm_year+1900,0,1),d.tm_yday),F=new Date(m.getFullYear(),0,4),j=new Date(m.getFullYear()+1,0,4),ut=E(F),jt=E(j);return w(ut,m)<=0?w(jt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var T={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return y(m/100|0,2)},"%d":d=>y(d.tm_mday,2),"%e":d=>v(d.tm_mday,2," "),"%g":d=>x(d).toString().substring(2),"%G":d=>x(d),"%H":d=>y(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),y(m,2)},"%j":d=>y(d.tm_mday+ea(St(d.tm_year+1900)?Me:je,d.tm_mon-1),3),"%m":d=>y(d.tm_mon+1,2),"%M":d=>y(d.tm_min,2),"%n":()=>`
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>y(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return y(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var F=(d.tm_wday+371-d.tm_yday)%7;F!=4&&(F!=3||!St(d.tm_year))&&(m=1)}}else{m=52;var j=(d.tm_wday+7-d.tm_yday-1)%7;(j==4||j==5&&St(d.tm_year%400-1))&&m++}return y(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return y(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,F=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(F?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};u=u.replace(/%%/g,"\0\0");for(var l in T)u.includes(l)&&(u=u.replace(new RegExp(l,"g"),T[l](i)));u=u.replace(/\0\0/g,"%");var R=na(u,!1);return R.length>e?0:(aa(R,t),R.length-1)},ia=(t,e,r,n,a)=>oa(t,e,r,n);pe=s.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Fr(),st=s.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Lr(),Hr(),Zr(),_e=s.UnboundTypeError=en(Error,"UnboundTypeError"),sn(),cn();var sa={s:$r,u:br,b:Tr,g:_r,q:Pr,J:Er,f:Ar,V:Or,d:Cr,da:Dr,Q:xr,_:Mr,ca:rn,ba:an,w:on,Y:ln,x:fn,h:hn,L:mn,M:vn,t:gn,o:wn,K:Cn,C:Dn,A:xn,ea:Fn,$:Sn,R:Mn,ha:qt,fa:Rn,Z:Un,N:Vn,O:Ln,aa:Yn,B:zn,X:Nn,W:qn,T:Jn,U:Kn,E:Ta,D:fa,F:Ca,n:_a,a:ua,e:pa,m:da,k:va,H:$a,v:ga,G:ba,z:Ea,P:Oa,l:ma,j:ha,c:la,p:ca,I:wa,r:Pa,i:ya,y:Aa,ga:ta,S:ia},M=wr(),K=s._free=t=>(K=s._free=M.ka)(t),ee=s._malloc=t=>(ee=s._malloc=M.la)(t),Ie=t=>(Ie=M.na)(t),P=(t,e)=>(P=M.oa)(t,e),$t=t=>($t=M.pa)(t),O=()=>(O=M.qa)(),D=t=>(D=M.ra)(t),Re=t=>(Re=M.sa)(t),We=t=>(We=M.ta)(t),ke=(t,e,r)=>(ke=M.ua)(t,e,r),He=t=>(He=M.va)(t);s.dynCall_viijii=(t,e,r,n,a,i,u)=>(s.dynCall_viijii=M.wa)(t,e,r,n,a,i,u);var Be=s.dynCall_jiiii=(t,e,r,n,a)=>(Be=s.dynCall_jiiii=M.xa)(t,e,r,n,a);s.dynCall_iiiiij=(t,e,r,n,a,i,u)=>(s.dynCall_iiiiij=M.ya)(t,e,r,n,a,i,u),s.dynCall_iiiiijj=(t,e,r,n,a,i,u,c,l)=>(s.dynCall_iiiiijj=M.za)(t,e,r,n,a,i,u,c,l),s.dynCall_iiiiiijj=(t,e,r,n,a,i,u,c,l,f)=>(s.dynCall_iiiiiijj=M.Aa)(t,e,r,n,a,i,u,c,l,f);function ua(t,e){var r=O();try{return A(t)(e)}catch(n){if(D(r),n!==n+0)throw n;P(1,0)}}function ca(t,e,r,n){var a=O();try{A(t)(e,r,n)}catch(i){if(D(a),i!==i+0)throw i;P(1,0)}}function la(t,e,r){var n=O();try{A(t)(e,r)}catch(a){if(D(n),a!==a+0)throw a;P(1,0)}}function da(t,e,r,n){var a=O();try{return A(t)(e,r,n)}catch(i){if(D(a),i!==i+0)throw i;P(1,0)}}function fa(t,e,r,n,a){var i=O();try{return A(t)(e,r,n,a)}catch(u){if(D(i),u!==u+0)throw u;P(1,0)}}function ha(t,e){var r=O();try{A(t)(e)}catch(n){if(D(r),n!==n+0)throw n;P(1,0)}}function pa(t,e,r){var n=O();try{return A(t)(e,r)}catch(a){if(D(n),a!==a+0)throw a;P(1,0)}}function ma(t){var e=O();try{A(t)()}catch(r){if(D(e),r!==r+0)throw r;P(1,0)}}function va(t,e,r,n,a){var i=O();try{return A(t)(e,r,n,a)}catch(u){if(D(i),u!==u+0)throw u;P(1,0)}}function ya(t,e,r,n,a,i,u,c,l,f,p){var v=O();try{A(t)(e,r,n,a,i,u,c,l,f,p)}catch(y){if(D(v),y!==y+0)throw y;P(1,0)}}function ga(t,e,r,n,a,i,u){var c=O();try{return A(t)(e,r,n,a,i,u)}catch(l){if(D(c),l!==l+0)throw l;P(1,0)}}function wa(t,e,r,n,a){var i=O();try{A(t)(e,r,n,a)}catch(u){if(D(i),u!==u+0)throw u;P(1,0)}}function $a(t,e,r,n,a,i){var u=O();try{return A(t)(e,r,n,a,i)}catch(c){if(D(u),c!==c+0)throw c;P(1,0)}}function ba(t,e,r,n,a,i,u,c){var l=O();try{return A(t)(e,r,n,a,i,u,c)}catch(f){if(D(l),f!==f+0)throw f;P(1,0)}}function Ca(t,e,r,n){var a=O();try{return A(t)(e,r,n)}catch(i){if(D(a),i!==i+0)throw i;P(1,0)}}function Ta(t,e,r,n){var a=O();try{return A(t)(e,r,n)}catch(i){if(D(a),i!==i+0)throw i;P(1,0)}}function _a(t){var e=O();try{return A(t)()}catch(r){if(D(e),r!==r+0)throw r;P(1,0)}}function Pa(t,e,r,n,a,i,u,c){var l=O();try{A(t)(e,r,n,a,i,u,c)}catch(f){if(D(l),f!==f+0)throw f;P(1,0)}}function Ea(t,e,r,n,a,i,u,c,l,f,p,v){var y=O();try{return A(t)(e,r,n,a,i,u,c,l,f,p,v)}catch(w){if(D(y),w!==w+0)throw w;P(1,0)}}function Aa(t,e,r,n,a,i,u,c,l,f,p,v,y,w,E,x){var T=O();try{A(t)(e,r,n,a,i,u,c,l,f,p,v,y,w,E,x)}catch(R){if(D(T),R!==R+0)throw R;P(1,0)}}function Oa(t,e,r,n,a){var i=O();try{return Be(t,e,r,n,a)}catch(u){if(D(i),u!==u+0)throw u;P(1,0)}}var Mt;ht=function t(){Mt||Ue(),Mt||(ht=t)};function Ue(){if(et>0||(ur(),et>0))return;function t(){Mt||(Mt=!0,s.calledRun=!0,!dt&&(cr(),$(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),lr()))}s.setStatus?(s.setStatus("Running..."),setTimeout(function(){setTimeout(function(){s.setStatus("")},1),t()},1)):t()}if(s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return Ue(),h.ready}})();function to(o){return ae(Rt,o)}function eo(o){return Za(Rt,o)}async function ro(o,h){return Ja(Rt,o,h)}async function no(o,h){return Ka(Rt,o,h)}var ct;class ao extends EventTarget{constructor(s={}){var $;super();ze(this,ct,void 0);try{const g=($=s==null?void 0:s.formats)==null?void 0:$.filter(b=>b!=="unknown");if((g==null?void 0:g.length)===0)throw new TypeError("Hint option provided, but is empty.");g==null||g.forEach(b=>{if(!It.has(b))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${b}' is not a valid enum value of type BarcodeFormat.`)}),Ne(this,ct,g!=null?g:[]),to().then(b=>{this.dispatchEvent(new CustomEvent("load",{detail:b}))}).catch(b=>{this.dispatchEvent(new CustomEvent("error",{detail:b}))})}catch(g){throw Ge(g,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Da.filter(s=>s!=="unknown")}async detect(s){try{const $=await Ra(s);if($===null)return[];let g;try{ar($)?g=await ro($,{tryHarder:!0,formats:re(this,ct).map(b=>It.get(b))}):g=await no($,{tryHarder:!0,formats:re(this,ct).map(b=>It.get(b))})}catch(b){throw console.error(b),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return g.map(b=>{const{topLeft:{x:H,y:L},topRight:{x:B,y:S},bottomLeft:{x:Y,y:G},bottomRight:{x:U,y:Q}}=b.position,tt=Math.min(H,B,Y,U),dt=Math.min(L,S,G,Q),V=Math.max(H,B,Y,U),W=Math.max(L,S,G,Q);return{boundingBox:new DOMRectReadOnly(tt,dt,V-tt,W-dt),rawValue:b.text,format:xa(b.format),cornerPoints:[{x:H,y:L},{x:B,y:S},{x:U,y:Q},{x:Y,y:G}]}})}catch($){throw Ge($,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ct=new WeakMap;exports.BarcodeDetector=ao;exports.setZXingModuleOverrides=eo;
"use strict";var ze=(o,h,s)=>{if(!h.has(o))throw TypeError("Cannot "+s)};var ne=(o,h,s)=>(ze(o,h,"read from private field"),s?s.call(o):h.get(o)),Ne=(o,h,s)=>{if(h.has(o))throw TypeError("Cannot add the same private member more than once");h instanceof WeakSet?h.add(o):h.set(o,s)},Ge=(o,h,s,$)=>(ze(o,h,"write to private field"),$?$.call(o,s):h.set(o,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Xe=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function xa(o){return o.join("|")}function Fa(o){const h=qe(o);let s=0,$=Xe.length-1;for(;s<=$;){const g=Math.floor((s+$)/2),b=Xe[g],B=qe(b);if(B===h)return b;B<h?s=g+1:$=g-1}return"None"}function qe(o){return o.toLowerCase().replace(/_-\[\]/g,"")}function Sa(o,h){return o.Binarizer[h]}function Ma(o,h){return o.CharacterSet[h]}const ja=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Ia(o){return ja[o.value]}function Ra(o,h){return o.EanAddOnSymbol[h]}function Wa(o,h){return o.TextMode[h]}const dt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function Ze(o,h){return{...h,formats:xa(h.formats),binarizer:Sa(o,h.binarizer),eanAddOnSymbol:Ra(o,h.eanAddOnSymbol),textMode:Wa(o,h.textMode),characterSet:Ma(o,h.characterSet)}}function Je(o){return{...o,format:Fa(o.format),eccLevel:o.eccLevel,contentType:Ia(o.contentType)}}const ka={locateFile:(o,h)=>{const s=o.match(/_(.+?)\.wasm$/);return s?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.3/dist/${s[1]}/${o}`:h+o}};let ae=new WeakMap;function oe(o,h){var s;const $=ae.get(o);if($!=null&&$.modulePromise&&(h===void 0||Object.is(h,$.moduleOverrides)))return $.modulePromise;const g=(s=h!=null?h:$==null?void 0:$.moduleOverrides)!=null?s:ka,b=o({...g});return ae.set(o,{moduleOverrides:g,modulePromise:b}),b}function Ha(o,h){ae.set(o,{moduleOverrides:h})}async function Ba(o,h,s=dt){const $={...dt,...s},g=await oe(o),{size:b}=h,B=new Uint8Array(await h.arrayBuffer()),V=g._malloc(b);g.HEAPU8.set(B,V);const Y=g.readBarcodesFromImage(V,b,Ze(g,$));g._free(V);const k=[];for(let S=0;S<Y.size();++S)k.push(Je(Y.get(S)));return k}async function Ua(o,h,s=dt){const $={...dt,...s},g=await oe(o),{data:b,width:B,height:V,data:{byteLength:Y}}=h,k=g._malloc(Y);g.HEAPU8.set(b,k);const S=g.readBarcodesFromPixmap(k,B,V,Ze(g,$));g._free(k);const K=[];for(let z=0;z<S.size();++z)K.push(Je(S.get(z)));return K}({...dt,formats:[...dt.formats]});var Wt=(()=>{var o=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(h={}){var s=h,$,g;s.ready=new Promise((t,e)=>{$=t,g=e});var b=Object.assign({},s),B="./this.program",V=typeof window=="object",Y=typeof Bun<"u",k=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var S="";function K(t){return s.locateFile?s.locateFile(t,S):S+t}var z;(V||k||Y)&&(k?S=self.location.href:typeof document<"u"&&document.currentScript&&(S=document.currentScript.src),o&&(S=o),S.indexOf("blob:")!==0?S=S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):S="",k&&(z=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),s.print||console.log.bind(console);var q=s.printErr||console.error.bind(console);Object.assign(s,b),b=null,s.arguments&&s.arguments,s.thisProgram&&(B=s.thisProgram),s.quit&&s.quit;var tt;s.wasmBinary&&(tt=s.wasmBinary),typeof WebAssembly!="object"&&Ct("no native wasm support detected");var et,bt=!1,U,H,ot,ft,W,T,ie,se;function ue(){var t=et.buffer;s.HEAP8=U=new Int8Array(t),s.HEAP16=ot=new Int16Array(t),s.HEAPU8=H=new Uint8Array(t),s.HEAPU16=ft=new Uint16Array(t),s.HEAP32=W=new Int32Array(t),s.HEAPU32=T=new Uint32Array(t),s.HEAPF32=ie=new Float32Array(t),s.HEAPF64=se=new Float64Array(t)}var ce=[],le=[],de=[];function cr(){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)fr(s.preRun.shift());kt(ce)}function lr(){kt(le)}function dr(){if(s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;)pr(s.postRun.shift());kt(de)}function fr(t){ce.unshift(t)}function hr(t){le.unshift(t)}function pr(t){de.unshift(t)}var rt=0,ht=null;function mr(t){var e;rt++,(e=s.monitorRunDependencies)===null||e===void 0||e.call(s,rt)}function yr(t){var e;if(rt--,(e=s.monitorRunDependencies)===null||e===void 0||e.call(s,rt),rt==0&&ht){var r=ht;ht=null,r()}}function Ct(t){var e;(e=s.onAbort)===null||e===void 0||e.call(s,t),t="Aborted("+t+")",q(t),bt=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw g(r),r}var vr="data:application/octet-stream;base64,",fe=t=>t.startsWith(vr),it;it="zxing_reader.wasm",fe(it)||(it=K(it));function he(t){if(t==it&&tt)return new Uint8Array(tt);if(z)return z(t);throw"both async and sync fetching of the wasm failed"}function gr(t){return!tt&&(V||k||Y)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>he(t)):Promise.resolve().then(()=>he(t))}function pe(t,e,r){return gr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{q(`failed to asynchronously prepare wasm: ${n}`),Ct(n)})}function wr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!fe(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var i=WebAssembly.instantiateStreaming(a,r);return i.then(n,function(u){return q(`wasm streaming compile failed: ${u}`),q("falling back to ArrayBuffer instantiation"),pe(e,r,n)})}):pe(e,r,n)}function $r(){var t={a:ua};function e(n,a){return M=n.exports,et=M.ia,ue(),Te=M.ma,hr(M.ja),yr(),M}mr();function r(n){e(n.instance)}if(s.instantiateWasm)try{return s.instantiateWasm(t,e)}catch(n){q(`Module.instantiateWasm callback failed with error: ${n}`),g(n)}return wr(tt,it,t,r).catch(g),{}}var kt=t=>{for(;t.length>0;)t.shift()(s)};s.noExitRuntime;var _t=[],Tt=0,br=t=>{var e=new Ht(t);return e.get_caught()||(e.set_caught(!0),Tt--),e.set_rethrown(!1),_t.push(e),ke(e.excPtr),e.get_exception_ptr()},Q=0,Cr=()=>{P(0,0);var t=_t.pop();We(t.excPtr),Q=0};function Ht(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){T[this.ptr+4>>2]=e},this.get_type=function(){return T[this.ptr+4>>2]},this.set_destructor=function(e){T[this.ptr+8>>2]=e},this.get_destructor=function(){return T[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,U[this.ptr+12>>0]=e},this.get_caught=function(){return U[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,U[this.ptr+13>>0]=e},this.get_rethrown=function(){return U[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){T[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return T[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Be(this.get_type());if(e)return T[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var _r=t=>{throw Q||(Q=t),Q},Bt=t=>{var e=Q;if(!e)return $t(0),0;var r=new Ht(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return $t(0),e;for(var a in t){var i=t[a];if(i===0||i===n)break;var u=r.ptr+16;if(He(i,n,u))return $t(i),e}return $t(n),e},Tr=()=>Bt([]),Pr=t=>Bt([t]),Er=(t,e)=>Bt([t,e]),Ar=()=>{var t=_t.pop();t||Ct("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(_t.push(t),t.set_rethrown(!0),t.set_caught(!1),Tt++),Q=e,Q},Or=(t,e,r)=>{var n=new Ht(t);throw n.init(e,r),Q=t,Tt++,Q},Dr=()=>Tt,Pt={},Ut=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Vt(t){return this.fromWireType(W[t>>2])}var st={},nt={},Et={},me,At=t=>{throw new me(t)},at=(t,e,r)=>{t.forEach(function(c){Et[c]=e});function n(c){var l=r(c);l.length!==t.length&&At("Mismatched type converter count");for(var f=0;f<t.length;++f)G(t[f],l[f])}var a=new Array(e.length),i=[],u=0;e.forEach((c,l)=>{nt.hasOwnProperty(c)?a[l]=nt[c]:(i.push(c),st.hasOwnProperty(c)||(st[c]=[]),st[c].push(()=>{a[l]=nt[c],++u,u===i.length&&n(a)}))}),i.length===0&&n(a)},xr=t=>{var e=Pt[t];delete Pt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,i=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));at([t],i,u=>{var c={};return a.forEach((l,f)=>{var p=l.fieldName,y=u[f],v=l.getter,w=l.getterContext,E=u[f+a.length],x=l.setter,_=l.setterContext;c[p]={read:R=>y.fromWireType(v(w,R)),write:(R,d)=>{var m=[];x(_,R,E.toWireType(m,d)),Ut(m)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var p in c)f[p]=c[p].read(l);return n(l),f},toWireType:(l,f)=>{for(var p in c)if(!(p in f))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,f[p]);return l!==null&&l.push(n,y),y},argPackAdvance:X,readValueFromPointer:Vt,destructorFunction:n}]})},Fr=(t,e,r,n,a)=>{},Sr=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);ye=t},ye,I=t=>{for(var e="",r=t;H[r];)e+=ye[H[r++]];return e},ut,C=t=>{throw new ut(t)};function Mr(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),nt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(nt[t]=e,delete Et[t],st.hasOwnProperty(t)){var a=st[t];delete st[t],a.forEach(i=>i())}}function G(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Mr(t,e,r)}var X=8,jr=(t,e,r,n)=>{e=I(e),G(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,i){return i?r:n},argPackAdvance:X,readValueFromPointer:function(a){return this.fromWireType(H[a])},destructorFunction:null})},Ir=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Lt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Yt=!1,ve=t=>{},Rr=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},ge=t=>{t.count.value-=1;var e=t.count.value===0;e&&Rr(t)},we=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=we(t,e,r.baseClass);return n===null?null:r.downcast(n)},$e={},Wr=()=>Object.keys(yt).length,kr=()=>{var t=[];for(var e in yt)yt.hasOwnProperty(e)&&t.push(yt[e]);return t},pt=[],zt=()=>{for(;pt.length;){var t=pt.pop();t.$$.deleteScheduled=!1,t.delete()}},mt,Hr=t=>{mt=t,pt.length&&mt&&mt(zt)},Br=()=>{s.getInheritedInstanceCount=Wr,s.getLiveInheritedInstances=kr,s.flushPendingDeletes=zt,s.setDelayFunction=Hr},yt={},Ur=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},Vr=(t,e)=>(e=Ur(t,e),yt[e]),Ot=(t,e)=>{(!e.ptrType||!e.ptr)&&At("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&At("Both smartPtrType and smartPtr must be specified"),e.count={value:1},vt(Object.create(t,{$$:{value:e,writable:!0}}))};function Lr(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Vr(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?Ot(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ot(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i=this.registeredClass.getActualType(e),u=$e[i];if(!u)return a.call(this);var c;this.isConst?c=u.constPointerType:c=u.pointerType;var l=we(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ot(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):Ot(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var vt=t=>typeof FinalizationRegistry>"u"?(vt=e=>e,t):(Yt=new FinalizationRegistry(e=>{ge(e.$$)}),vt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Yt.register(e,a,e)}return e},ve=e=>Yt.unregister(e),vt(t)),Yr=()=>{Object.assign(Dt.prototype,{isAliasOf(t){if(!(this instanceof Dt)||!(t instanceof Dt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Lt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:Ir(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),ve(this),ge(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Lt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),pt.push(this),pt.length===1&&mt&&mt(zt),this.$$.deleteScheduled=!0,this}})};function Dt(){}var gt=(t,e)=>Object.defineProperty(e,"name",{value:t}),be=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Nt=(t,e,r)=>{s.hasOwnProperty(t)?((r===void 0||s[t].overloadTable!==void 0&&s[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),be(s,t,t),s.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),s[t].overloadTable[r]=e):(s[t]=e,r!==void 0&&(s[t].numArguments=r))},zr=48,Nr=57,Gr=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=zr&&e<=Nr?`_${t}`:t};function Xr(t,e,r,n,a,i,u,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=i,this.upcast=u,this.downcast=c,this.pureVirtualFunctions=[]}var Gt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function qr(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${Jt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Gt(e.$$.ptr,r,this.registeredClass);return n}function Qr(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&C(`Cannot pass "${Jt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Gt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,Z.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function Zr(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${Jt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Gt(e.$$.ptr,r,this.registeredClass);return n}function Ce(t){return this.fromWireType(T[t>>2])}var Jr=()=>{Object.assign(xt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var e;(e=this.rawDestructor)===null||e===void 0||e.call(this,t)},argPackAdvance:X,readValueFromPointer:Ce,deleteObject(t){t!==null&&t.delete()},fromWireType:Lr})};function xt(t,e,r,n,a,i,u,c,l,f,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=i,this.sharingPolicy=u,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=qr,this.destructorFunction=null):(this.toWireType=Zr,this.destructorFunction=null):this.toWireType=Qr}var _e=(t,e,r)=>{s.hasOwnProperty(t)||At("Replacing nonexistant public symbol"),s[t].overloadTable!==void 0&&r!==void 0?s[t].overloadTable[r]=e:(s[t]=e,s[t].argCount=r)},Kr=(t,e,r)=>{var n=s["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Ft=[],Te,A=t=>{var e=Ft[t];return e||(t>=Ft.length&&(Ft.length=t+1),Ft[t]=e=Te.get(t)),e},tn=(t,e,r)=>{if(t.includes("j"))return Kr(t,e,r);var n=A(e).apply(null,r);return n},en=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),tn(t,e,r)}},N=(t,e)=>{t=I(t);function r(){return t.includes("j")?en(t,e):A(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},rn=(t,e)=>{var r=gt(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Pe,Ee=t=>{var e=Re(t),r=I(e);return J(e),r},St=(t,e)=>{var r=[],n={};function a(i){if(!n[i]&&!nt[i]){if(Et[i]){Et[i].forEach(a);return}r.push(i),n[i]=!0}}throw e.forEach(a),new Pe(`${t}: `+r.map(Ee).join([", "]))},nn=(t,e,r,n,a,i,u,c,l,f,p,y,v)=>{p=I(p),i=N(a,i),c&&(c=N(u,c)),f&&(f=N(l,f)),v=N(y,v);var w=Gr(p);Nt(w,function(){St(`Cannot construct ${p} due to unbound types`,[n])}),at([t,e,r],n?[n]:[],function(E){E=E[0];var x,_;n?(x=E.registeredClass,_=x.instancePrototype):_=Dt.prototype;var R=gt(p,function(){if(Object.getPrototypeOf(this)!==d)throw new ut("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ut(p+" has no accessible constructor");var Ye=m.constructor_body[arguments.length];if(Ye===void 0)throw new ut(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return Ye.apply(this,arguments)}),d=Object.create(_,{constructor:{value:R}});R.prototype=d;var m=new Xr(p,R,d,v,x,i,c,f);if(m.baseClass){var F,j;(j=(F=m.baseClass).__derivedClasses)!==null&&j!==void 0||(F.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m)}var ct=new xt(p,m,!0,!1,!1),It=new xt(p+"*",m,!1,!1,!1),Le=new xt(p+" const*",m,!1,!0,!1);return $e[t]={pointerType:It,constPointerType:Le},_e(w,R),[ct,It,Le]})},Xt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(T[e+n*4>>2]);return r};function an(t){for(var e=1;e<t.length;++e)if(t[e]!==null&&t[e].destructorFunction===void 0)return!0;return!1}function qt(t,e,r,n,a,i){var u=e.length;u<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var c=e[1]!==null&&r!==null,l=an(e),f=e[0].name!=="void",p=u-2,y=new Array(p),v=[],w=[],E=function(){arguments.length!==p&&C(`function ${t} called with ${arguments.length} arguments, expected ${p}`),w.length=0;var x;v.length=c?2:1,v[0]=a,c&&(x=e[1].toWireType(w,this),v[1]=x);for(var _=0;_<p;++_)y[_]=e[_+2].toWireType(w,arguments[_]),v.push(y[_]);var R=n.apply(null,v);function d(m){if(l)Ut(w);else for(var F=c?1:2;F<e.length;F++){var j=F===1?x:y[F-2];e[F].destructorFunction!==null&&e[F].destructorFunction(j)}if(f)return e[0].fromWireType(m)}return d(R)};return gt(t,E)}var on=(t,e,r,n,a,i)=>{var u=Xt(e,r);a=N(n,a),at([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ut(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{St(`Cannot construct ${c.name} due to unbound types`,u)},at([],u,f=>(f.splice(1,0,null),c.registeredClass.constructor_body[e-1]=qt(l,f,null,a,i),[])),[]})},Ae=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?t.substr(0,e):t},sn=(t,e,r,n,a,i,u,c,l)=>{var f=Xt(r,n);e=I(e),e=Ae(e),i=N(a,i),at([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function v(){St(`Cannot call ${y} due to unbound types`,f)}var w=p.registeredClass.instancePrototype,E=w[e];return E===void 0||E.overloadTable===void 0&&E.className!==p.name&&E.argCount===r-2?(v.argCount=r-2,v.className=p.name,w[e]=v):(be(w,e,y),w[e].overloadTable[r-2]=v),at([],f,function(x){var _=qt(y,x,p,i,u);return w[e].overloadTable===void 0?(_.argCount=r-2,w[e]=_):w[e].overloadTable[r-2]=_,[]}),[]})};function un(){Object.assign(Oe.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Oe(){this.allocated=[void 0],this.freelist=[]}var L=new Oe,Qt=t=>{t>=L.reserved&&--L.get(t).refcount===0&&L.free(t)},cn=()=>{for(var t=0,e=L.reserved;e<L.allocated.length;++e)L.allocated[e]!==void 0&&++t;return t},ln=()=>{L.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),L.reserved=L.allocated.length,s.count_emval_handles=cn},Z={toValue:t=>(t||C("Cannot use deleted val. handle = "+t),L.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return L.allocate({refcount:1,value:t})}}},dn=(t,e)=>{e=I(e),G(t,{name:e,fromWireType:r=>{var n=Z.toValue(r);return Qt(r),n},toWireType:(r,n)=>Z.toHandle(n),argPackAdvance:X,readValueFromPointer:Vt,destructorFunction:null})},fn=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(U[n>>0])}:function(n){return this.fromWireType(H[n>>0])};case 2:return r?function(n){return this.fromWireType(ot[n>>1])}:function(n){return this.fromWireType(ft[n>>1])};case 4:return r?function(n){return this.fromWireType(W[n>>2])}:function(n){return this.fromWireType(T[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},hn=(t,e,r,n)=>{e=I(e);function a(){}a.values={},G(t,{name:e,constructor:a,fromWireType:function(i){return this.constructor.values[i]},toWireType:(i,u)=>u.value,argPackAdvance:X,readValueFromPointer:fn(e,r,n),destructorFunction:null}),Nt(e,a)},Zt=(t,e)=>{var r=nt[t];return r===void 0&&C(e+" has unknown type "+Ee(t)),r},pn=(t,e,r)=>{var n=Zt(t,"enum");e=I(e);var a=n.constructor,i=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:gt(`${n.name}_${e}`,function(){})}});a.values[r]=i,a[e]=i},Jt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},mn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ie[r>>2])};case 8:return function(r){return this.fromWireType(se[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},yn=(t,e,r)=>{e=I(e),G(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:X,readValueFromPointer:mn(e,r),destructorFunction:null})},vn=(t,e,r,n,a,i,u)=>{var c=Xt(e,r);t=I(t),t=Ae(t),a=N(n,a),Nt(t,function(){St(`Cannot call ${t} due to unbound types`,c)},e-1),at([],c,function(l){var f=[l[0],null].concat(l.slice(1));return _e(t,qt(t,f,null,a,i),e-1),[]})},gn=(t,e,r)=>{switch(e){case 1:return r?n=>U[n>>0]:n=>H[n>>0];case 2:return r?n=>ot[n>>1]:n=>ft[n>>1];case 4:return r?n=>W[n>>2]:n=>T[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},wn=(t,e,r,n,a)=>{e=I(e);var i=p=>p;if(n===0){var u=32-8*r;i=p=>p<<u>>>u}var c=e.includes("unsigned"),l=(p,y)=>{},f;c?f=function(p,y){return l(y,this.name),y>>>0}:f=function(p,y){return l(y,this.name),y},G(t,{name:e,fromWireType:i,toWireType:f,argPackAdvance:X,readValueFromPointer:gn(e,r,n!==0),destructorFunction:null})},$n=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function i(u){var c=T[u>>2],l=T[u+4>>2];return new a(U.buffer,l,c)}r=I(r),G(t,{name:r,fromWireType:i,argPackAdvance:X,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},De=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,i=r+n-1,u=0;u<t.length;++u){var c=t.charCodeAt(u);if(c>=55296&&c<=57343){var l=t.charCodeAt(++u);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=i)break;e[r++]=c}else if(c<=2047){if(r+1>=i)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=i)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=i)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},bn=(t,e,r)=>De(t,H,e,r),xe=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Fe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Cn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Fe)return Fe.decode(t.subarray(e,a));for(var i="";e<a;){var u=t[e++];if(!(u&128)){i+=String.fromCharCode(u);continue}var c=t[e++]&63;if((u&224)==192){i+=String.fromCharCode((u&31)<<6|c);continue}var l=t[e++]&63;if((u&240)==224?u=(u&15)<<12|c<<6|l:u=(u&7)<<18|c<<12|l<<6|t[e++]&63,u<65536)i+=String.fromCharCode(u);else{var f=u-65536;i+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return i},Kt=(t,e)=>t?Cn(H,t,e):"",_n=(t,e)=>{e=I(e);var r=e==="std::string";G(t,{name:e,fromWireType(n){var a=T[n>>2],i=n+4,u;if(r)for(var c=i,l=0;l<=a;++l){var f=i+l;if(l==a||H[f]==0){var p=f-c,y=Kt(c,p);u===void 0?u=y:(u+="\0",u+=y),c=f+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(H[i+l]);u=v.join("")}return J(n),u},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var i,u=typeof a=="string";u||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&u?i=xe(a):i=a.length;var c=re(4+i+1),l=c+4;if(T[c>>2]=i,r&&u)bn(a,l,i+1);else if(u)for(var f=0;f<i;++f){var p=a.charCodeAt(f);p>255&&(J(l),C("String has UTF-16 code units that do not fit in 8 bits")),H[l+f]=p}else for(var f=0;f<i;++f)H[l+f]=a[f];return n!==null&&n.push(J,c),c},argPackAdvance:X,readValueFromPointer:Ce,destructorFunction(n){J(n)}})},Se=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Tn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&ft[n];)++n;if(r=n<<1,r-t>32&&Se)return Se.decode(H.subarray(t,r));for(var i="",u=0;!(u>=e/2);++u){var c=ot[t+u*2>>1];if(c==0)break;i+=String.fromCharCode(c)}return i},Pn=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<2)return 0;r-=2;for(var a=e,i=r<t.length*2?r/2:t.length,u=0;u<i;++u){var c=t.charCodeAt(u);ot[e>>1]=c,e+=2}return ot[e>>1]=0,e-a},En=t=>t.length*2,An=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=W[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var i=a-65536;n+=String.fromCharCode(55296|i>>10,56320|i&1023)}else n+=String.fromCharCode(a)}return n},On=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<4)return 0;for(var a=e,i=a+r-4,u=0;u<t.length;++u){var c=t.charCodeAt(u);if(c>=55296&&c<=57343){var l=t.charCodeAt(++u);c=65536+((c&1023)<<10)|l&1023}if(W[e>>2]=c,e+=4,e+4>i)break}return W[e>>2]=0,e-a},Dn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},xn=(t,e,r)=>{r=I(r);var n,a,i,u,c;e===2?(n=Tn,a=Pn,u=En,i=()=>ft,c=1):e===4&&(n=An,a=On,u=Dn,i=()=>T,c=2),G(t,{name:r,fromWireType:l=>{for(var f=T[l>>2],p=i(),y,v=l+4,w=0;w<=f;++w){var E=l+4+w*e;if(w==f||p[E>>c]==0){var x=E-v,_=n(v,x);y===void 0?y=_:(y+="\0",y+=_),v=E+e}}return J(l),y},toWireType:(l,f)=>{typeof f!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=u(f),y=re(4+p+e);return T[y>>2]=p>>c,a(f,y+4,p+e),l!==null&&l.push(J,y),y},argPackAdvance:X,readValueFromPointer:Vt,destructorFunction(l){J(l)}})},Fn=(t,e,r,n,a,i)=>{Pt[t]={name:I(e),rawConstructor:N(r,n),rawDestructor:N(a,i),fields:[]}},Sn=(t,e,r,n,a,i,u,c,l,f)=>{Pt[t].fields.push({fieldName:I(e),getterReturnType:r,getter:N(n,a),getterContext:i,setterArgumentType:u,setter:N(c,l),setterContext:f})},Mn=(t,e)=>{e=I(e),G(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},te=[],jn=(t,e,r,n)=>(t=te[t],e=Z.toValue(e),t(null,e,r,n)),In={},Rn=t=>{var e=In[t];return e===void 0?I(t):e},Me=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Wn=t=>t===0?Z.toHandle(Me()):(t=Rn(t),Z.toHandle(Me()[t])),kn=t=>{var e=te.length;return te.push(t),e},Hn=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=Zt(T[e+n*4>>2],"parameter "+n);return r},Bn=Reflect.construct,Un=(t,e,r)=>{var n=[],a=t.toWireType(n,r);return n.length&&(T[e>>2]=Z.toHandle(n)),a},Vn=(t,e,r)=>{var n=Hn(t,e),a=n.shift();t--;var i=new Array(t),u=(l,f,p,y)=>{for(var v=0,w=0;w<t;++w)i[w]=n[w].readValueFromPointer(y+v),v+=n[w].argPackAdvance;for(var E=r===1?Bn(f,i):f.apply(l,i),w=0;w<t;++w){var x,_;(x=(_=n[w]).deleteObject)===null||x===void 0||x.call(_,i[w])}return Un(a,p,E)},c=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return kn(gt(c,u))},Ln=t=>{t>4&&(L.get(t).refcount+=1)},Yn=t=>{var e=Z.toValue(t);Ut(e),Qt(t)},zn=(t,e)=>{t=Zt(t,"_emval_take_value");var r=t.readValueFromPointer(e);return Z.toHandle(r)},Nn=()=>{Ct("")},Gn=(t,e,r)=>H.copyWithin(t,e,e+r),Xn=()=>2147483648,qn=t=>{var e=et.buffer,r=(t-e.byteLength+65535)/65536;try{return et.grow(r),ue(),1}catch{}},Qn=t=>{var e=H.length;t>>>=0;var r=Xn();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var i=e*(1+.2/a);i=Math.min(i,t+100663296);var u=Math.min(r,n(Math.max(t,i),65536)),c=qn(u);if(c)return!0}return!1},ee={},Zn=()=>B||"./this.program",wt=()=>{if(!wt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Zn()};for(var r in ee)ee[r]===void 0?delete e[r]:e[r]=ee[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);wt.strings=n}return wt.strings},Jn=(t,e)=>{for(var r=0;r<t.length;++r)U[e++>>0]=t.charCodeAt(r);U[e>>0]=0},Kn=(t,e)=>{var r=0;return wt().forEach((n,a)=>{var i=e+r;T[t+a*4>>2]=i,Jn(n,i),r+=n.length+1}),0},ta=(t,e)=>{var r=wt();T[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),T[e>>2]=n,0},ea=t=>t,Mt=t=>t%4===0&&(t%100!==0||t%400===0),ra=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},je=[31,29,31,30,31,30,31,31,30,31,30,31],Ie=[31,28,31,30,31,30,31,31,30,31,30,31],na=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Mt(r.getFullYear()),a=r.getMonth(),i=(n?je:Ie)[a];if(e>i-r.getDate())e-=i-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function aa(t,e,r){var n=r>0?r:xe(t)+1,a=new Array(n),i=De(t,a,0,a.length);return e&&(a.length=i),a}var oa=(t,e)=>{U.set(t,e)},ia=(t,e,r,n)=>{var a=T[n+40>>2],i={tm_sec:W[n>>2],tm_min:W[n+4>>2],tm_hour:W[n+8>>2],tm_mday:W[n+12>>2],tm_mon:W[n+16>>2],tm_year:W[n+20>>2],tm_wday:W[n+24>>2],tm_yday:W[n+28>>2],tm_isdst:W[n+32>>2],tm_gmtoff:W[n+36>>2],tm_zone:a?Kt(a):""},u=Kt(r),c={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in c)u=u.replace(new RegExp(l,"g"),c[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,F){for(var j=typeof d=="number"?d.toString():d||"";j.length<m;)j=F[0]+j;return j}function v(d,m){return y(d,m,"0")}function w(d,m){function F(ct){return ct<0?-1:ct>0?1:0}var j;return(j=F(d.getFullYear()-m.getFullYear()))===0&&(j=F(d.getMonth()-m.getMonth()))===0&&(j=F(d.getDate()-m.getDate())),j}function E(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function x(d){var m=na(new Date(d.tm_year+1900,0,1),d.tm_yday),F=new Date(m.getFullYear(),0,4),j=new Date(m.getFullYear()+1,0,4),ct=E(F),It=E(j);return w(ct,m)<=0?w(It,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var _={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return v(m/100|0,2)},"%d":d=>v(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>x(d).toString().substring(2),"%G":d=>x(d),"%H":d=>v(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),v(m,2)},"%j":d=>v(d.tm_mday+ra(Mt(d.tm_year+1900)?je:Ie,d.tm_mon-1),3),"%m":d=>v(d.tm_mon+1,2),"%M":d=>v(d.tm_min,2),"%n":()=>`
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>v(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return v(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var F=(d.tm_wday+371-d.tm_yday)%7;F!=4&&(F!=3||!Mt(d.tm_year))&&(m=1)}}else{m=52;var j=(d.tm_wday+7-d.tm_yday-1)%7;(j==4||j==5&&Mt(d.tm_year%400-1))&&m++}return v(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return v(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,F=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(F?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};u=u.replace(/%%/g,"\0\0");for(var l in _)u.includes(l)&&(u=u.replace(new RegExp(l,"g"),_[l](i)));u=u.replace(/\0\0/g,"%");var R=aa(u,!1);return R.length>e?0:(oa(R,t),R.length-1)},sa=(t,e,r,n,a)=>ia(t,e,r,n);me=s.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Sr(),ut=s.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Yr(),Br(),Jr(),Pe=s.UnboundTypeError=rn(Error,"UnboundTypeError"),un(),ln();var ua={s:br,u:Cr,b:Tr,g:Pr,q:Er,K:Ar,f:Or,W:Dr,d:_r,da:xr,S:Fr,_:jr,ca:nn,ba:on,w:sn,Z:dn,x:hn,h:pn,N:yn,O:vn,t:wn,o:$n,M:_n,C:xn,A:Fn,ea:Sn,$:Mn,E:jn,ga:Qt,ha:Wn,L:Vn,P:Ln,Q:Yn,aa:zn,B:Nn,Y:Gn,X:Qn,U:Kn,V:ta,F:Ta,D:ha,G:_a,n:Pa,a:ca,e:ma,m:fa,k:va,I:ba,v:wa,H:Ca,z:Aa,R:Da,l:ya,j:pa,c:da,p:la,J:$a,r:Ea,i:ga,y:Oa,fa:ea,T:sa},M=$r(),J=s._free=t=>(J=s._free=M.ka)(t),re=s._malloc=t=>(re=s._malloc=M.la)(t),Re=t=>(Re=M.na)(t),P=(t,e)=>(P=M.oa)(t,e),$t=t=>($t=M.pa)(t),O=()=>(O=M.qa)(),D=t=>(D=M.ra)(t),We=t=>(We=M.sa)(t),ke=t=>(ke=M.ta)(t),He=(t,e,r)=>(He=M.ua)(t,e,r),Be=t=>(Be=M.va)(t);s.dynCall_viijii=(t,e,r,n,a,i,u)=>(s.dynCall_viijii=M.wa)(t,e,r,n,a,i,u);var Ue=s.dynCall_jiiii=(t,e,r,n,a)=>(Ue=s.dynCall_jiiii=M.xa)(t,e,r,n,a);s.dynCall_iiiiij=(t,e,r,n,a,i,u)=>(s.dynCall_iiiiij=M.ya)(t,e,r,n,a,i,u),s.dynCall_iiiiijj=(t,e,r,n,a,i,u,c,l)=>(s.dynCall_iiiiijj=M.za)(t,e,r,n,a,i,u,c,l),s.dynCall_iiiiiijj=(t,e,r,n,a,i,u,c,l,f)=>(s.dynCall_iiiiiijj=M.Aa)(t,e,r,n,a,i,u,c,l,f);function ca(t,e){var r=O();try{return A(t)(e)}catch(n){if(D(r),n!==n+0)throw n;P(1,0)}}function la(t,e,r,n){var a=O();try{A(t)(e,r,n)}catch(i){if(D(a),i!==i+0)throw i;P(1,0)}}function da(t,e,r){var n=O();try{A(t)(e,r)}catch(a){if(D(n),a!==a+0)throw a;P(1,0)}}function fa(t,e,r,n){var a=O();try{return A(t)(e,r,n)}catch(i){if(D(a),i!==i+0)throw i;P(1,0)}}function ha(t,e,r,n,a){var i=O();try{return A(t)(e,r,n,a)}catch(u){if(D(i),u!==u+0)throw u;P(1,0)}}function pa(t,e){var r=O();try{A(t)(e)}catch(n){if(D(r),n!==n+0)throw n;P(1,0)}}function ma(t,e,r){var n=O();try{return A(t)(e,r)}catch(a){if(D(n),a!==a+0)throw a;P(1,0)}}function ya(t){var e=O();try{A(t)()}catch(r){if(D(e),r!==r+0)throw r;P(1,0)}}function va(t,e,r,n,a){var i=O();try{return A(t)(e,r,n,a)}catch(u){if(D(i),u!==u+0)throw u;P(1,0)}}function ga(t,e,r,n,a,i,u,c,l,f,p){var y=O();try{A(t)(e,r,n,a,i,u,c,l,f,p)}catch(v){if(D(y),v!==v+0)throw v;P(1,0)}}function wa(t,e,r,n,a,i,u){var c=O();try{return A(t)(e,r,n,a,i,u)}catch(l){if(D(c),l!==l+0)throw l;P(1,0)}}function $a(t,e,r,n,a){var i=O();try{A(t)(e,r,n,a)}catch(u){if(D(i),u!==u+0)throw u;P(1,0)}}function ba(t,e,r,n,a,i){var u=O();try{return A(t)(e,r,n,a,i)}catch(c){if(D(u),c!==c+0)throw c;P(1,0)}}function Ca(t,e,r,n,a,i,u,c){var l=O();try{return A(t)(e,r,n,a,i,u,c)}catch(f){if(D(l),f!==f+0)throw f;P(1,0)}}function _a(t,e,r,n){var a=O();try{return A(t)(e,r,n)}catch(i){if(D(a),i!==i+0)throw i;P(1,0)}}function Ta(t,e,r,n){var a=O();try{return A(t)(e,r,n)}catch(i){if(D(a),i!==i+0)throw i;P(1,0)}}function Pa(t){var e=O();try{return A(t)()}catch(r){if(D(e),r!==r+0)throw r;P(1,0)}}function Ea(t,e,r,n,a,i,u,c){var l=O();try{A(t)(e,r,n,a,i,u,c)}catch(f){if(D(l),f!==f+0)throw f;P(1,0)}}function Aa(t,e,r,n,a,i,u,c,l,f,p,y){var v=O();try{return A(t)(e,r,n,a,i,u,c,l,f,p,y)}catch(w){if(D(v),w!==w+0)throw w;P(1,0)}}function Oa(t,e,r,n,a,i,u,c,l,f,p,y,v,w,E,x){var _=O();try{A(t)(e,r,n,a,i,u,c,l,f,p,y,v,w,E,x)}catch(R){if(D(_),R!==R+0)throw R;P(1,0)}}function Da(t,e,r,n,a){var i=O();try{return Ue(t,e,r,n,a)}catch(u){if(D(i),u!==u+0)throw u;P(1,0)}}var jt;ht=function t(){jt||Ve(),jt||(ht=t)};function Ve(){if(rt>0||(cr(),rt>0))return;function t(){jt||(jt=!0,s.calledRun=!0,!bt&&(lr(),$(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),dr()))}s.setStatus?(s.setStatus("Running..."),setTimeout(function(){setTimeout(function(){s.setStatus("")},1),t()},1)):t()}if(s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return Ve(),h.ready}})();function Va(o){return oe(Wt,o)}function La(o){return Ha(Wt,o)}async function Ya(o,h){return Ba(Wt,o,h)}async function za(o,h){return Ua(Wt,o,h)}const Ke=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["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"]],Na=[...Ke,["unknown"]].map(o=>o[0]),Rt=new Map(Ke);function Ga(o){for(const[h,s]of Rt)if(o===s)return h;return"unknown"}function Xa(o){if(tr(o))return{width:o.naturalWidth,height:o.naturalHeight};if(er(o))return{width:o.width.baseVal.value,height:o.height.baseVal.value};if(rr(o))return{width:o.videoWidth,height:o.videoHeight};if(ar(o))return{width:o.width,height:o.height};if(ir(o))return{width:o.displayWidth,height:o.displayHeight};if(nr(o))return{width:o.width,height:o.height};if(or(o))return{width:o.width,height:o.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 tr(o){try{return o instanceof HTMLImageElement}catch{return!1}}function er(o){try{return o instanceof SVGImageElement}catch{return!1}}function rr(o){try{return o instanceof HTMLVideoElement}catch{return!1}}function nr(o){try{return o instanceof HTMLCanvasElement}catch{return!1}}function ar(o){try{return o instanceof ImageBitmap}catch{return!1}}function or(o){try{return o instanceof OffscreenCanvas}catch{return!1}}function ir(o){try{return o instanceof VideoFrame}catch{return!1}}function sr(o){try{return o instanceof Blob}catch{return!1}}function qa(o){try{return o instanceof ImageData}catch{return!1}}function Qa(o,h){try{const s=new OffscreenCanvas(o,h);if(s.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return s;throw void 0}catch{const s=document.createElement("canvas");return s.width=o,s.height=h,s}}async function ur(o){if(tr(o)&&!await to(o))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(er(o)&&!await eo(o))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ir(o)&&ro(o))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(rr(o)&&(o.readyState===0||o.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ar(o)&&ao(o))throw new DOMException("The image source is detached.","InvalidStateError");const{width:h,height:s}=Xa(o);if(h===0||s===0)return null;const g=Qa(h,s).getContext("2d");g.drawImage(o,0,0);try{return g.getImageData(0,0,h,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Za(o){let h;try{if(globalThis.createImageBitmap)h=await createImageBitmap(o);else if(globalThis.Image){h=new Image;let $="";try{$=URL.createObjectURL(o),h.src=$,await h.decode()}finally{URL.revokeObjectURL($)}}else return o}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ur(h)}function Ja(o){const{width:h,height:s}=o;if(h===0||s===0)return null;const $=o.getContext("2d");try{return $.getImageData(0,0,h,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ka(o){if(sr(o))return await Za(o);if(qa(o)){if(no(o))throw new DOMException("The image data has been detached.","InvalidStateError");return o}return nr(o)||or(o)?Ja(o):await ur(o)}async function to(o){try{return await o.decode(),!0}catch{return!1}}async function eo(o){var h;try{return await((h=o.decode)==null?void 0:h.call(o)),!0}catch{return!1}}function ro(o){return o.format===null}function no(o){return o.data.buffer.byteLength===0}function ao(o){return o.width===0&&o.height===0}function Qe(o,h){return o instanceof DOMException?new DOMException(`${h}: ${o.message}`,o.name):o instanceof Error?new o.constructor(`${h}: ${o.message}`):new Error(`${h}: ${o}`)}var lt;class oo extends EventTarget{constructor(s={}){var $;super();Ne(this,lt,void 0);try{const g=($=s==null?void 0:s.formats)==null?void 0:$.filter(b=>b!=="unknown");if((g==null?void 0:g.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const b of g!=null?g:[])if(!Rt.has(b))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${b}' is not a valid enum value of type BarcodeFormat.`);Ge(this,lt,g!=null?g:[]),Va().then(b=>{this.dispatchEvent(new CustomEvent("load",{detail:b}))}).catch(b=>{this.dispatchEvent(new CustomEvent("error",{detail:b}))})}catch(g){throw Qe(g,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Na.filter(s=>s!=="unknown")}async detect(s){try{const $=await Ka(s);if($===null)return[];let g;try{sr($)?g=await Ya($,{tryHarder:!0,formats:ne(this,lt).map(b=>Rt.get(b))}):g=await za($,{tryHarder:!0,formats:ne(this,lt).map(b=>Rt.get(b))})}catch(b){throw console.error(b),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return g.map(b=>{const{topLeft:{x:B,y:V},topRight:{x:Y,y:k},bottomLeft:{x:S,y:K},bottomRight:{x:z,y:q}}=b.position,tt=Math.min(B,Y,S,z),et=Math.min(V,k,K,q),bt=Math.max(B,Y,S,z),U=Math.max(V,k,K,q);return{boundingBox:new DOMRectReadOnly(tt,et,bt-tt,U-et),rawValue:b.text,format:Ga(b.format),cornerPoints:[{x:B,y:V},{x:Y,y:k},{x:z,y:q},{x:S,y:K}]}})}catch($){throw Qe($,"Failed to execute 'detect' on 'BarcodeDetector'")}}}lt=new WeakMap;exports.BarcodeDetector=oo;exports.setZXingModuleOverrides=La;
/// <reference types="dom-webcodecs" />
import { type ReadInputBarcodeFormat, type ReadOutputBarcodeFormat } from "zxing-wasm/reader";
import type { ReadInputBarcodeFormat, ReadOutputBarcodeFormat } from "zxing-wasm/reader";
export declare const BARCODE_FORMATS: ("aztec" | "code_128" | "code_39" | "code_93" | "codabar" | "databar" | "databar_expanded" | "data_matrix" | "dx_film_edge" | "ean_13" | "ean_8" | "itf" | "maxi_code" | "micro_qr_code" | "pdf417" | "qr_code" | "rm_qr_code" | "upc_a" | "upc_e" | "linear_codes" | "matrix_codes" | "unknown")[];

@@ -4,0 +4,0 @@ export type BarcodeFormat = (typeof BARCODE_FORMATS)[number];

/// <reference types="dom-webcodecs" />
import { type ReadInputBarcodeFormat, type ReadOutputBarcodeFormat } from "zxing-wasm/reader";
import type { ReadInputBarcodeFormat, ReadOutputBarcodeFormat } from "zxing-wasm/reader";
export declare const BARCODE_FORMATS: ("aztec" | "code_128" | "code_39" | "code_93" | "codabar" | "databar" | "databar_expanded" | "data_matrix" | "dx_film_edge" | "ean_13" | "ean_8" | "itf" | "maxi_code" | "micro_qr_code" | "pdf417" | "qr_code" | "rm_qr_code" | "upc_a" | "upc_e" | "linear_codes" | "matrix_codes" | "unknown")[];

@@ -4,0 +4,0 @@ export type BarcodeFormat = (typeof BARCODE_FORMATS)[number];

@@ -1,3 +0,3 @@

var BarcodeDetectionAPI=function(I){"use strict";var cr=(I,B,z)=>{if(!B.has(I))throw TypeError("Cannot "+z)};var se=(I,B,z)=>(cr(I,B,"read from private field"),z?z.call(I):B.get(I)),lr=(I,B,z)=>{if(B.has(I))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(I):B.set(I,z)},dr=(I,B,z,nt)=>(cr(I,B,"write to private field"),nt?nt.call(I,z):B.set(I,z),z);var ct,Te;const B=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["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"]],z=[...B,["unknown"]].map(i=>i[0]),nt=new Map(B);function fr(i){for(const[p,c]of nt)if(i===c)return p;return"unknown"}function hr(i){if(ue(i))return{width:i.naturalWidth,height:i.naturalHeight};if(ce(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(le(i))return{width:i.videoWidth,height:i.videoHeight};if(fe(i))return{width:i.width,height:i.height};if(pe(i))return{width:i.displayWidth,height:i.displayHeight};if(de(i))return{width:i.width,height:i.height};if(he(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 ue(i){try{return i instanceof HTMLImageElement}catch{return!1}}function ce(i){try{return i instanceof SVGImageElement}catch{return!1}}function le(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function de(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function fe(i){try{return i instanceof ImageBitmap}catch{return!1}}function he(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function pe(i){try{return i instanceof VideoFrame}catch{return!1}}function me(i){try{return i instanceof Blob}catch{return!1}}function pr(i){try{return i instanceof ImageData}catch{return!1}}function mr(i,p){try{const c=new OffscreenCanvas(i,p);if(c.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return c;throw void 0}catch{const c=document.createElement("canvas");return c.width=i,c.height=p,c}}async function ve(i){if(ue(i)&&!await wr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ce(i)&&!await $r(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(pe(i)&&br(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(le(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(fe(i)&&Tr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:p,height:c}=hr(i);if(p===0||c===0)return null;const g=mr(p,c).getContext("2d");g.drawImage(i,0,0);try{return g.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function vr(i){let p;try{if(globalThis.createImageBitmap)p=await createImageBitmap(i);else if(globalThis.Image){p=new Image;let $="";try{$=URL.createObjectURL(i),p.src=$,await p.decode()}finally{URL.revokeObjectURL($)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ve(p)}function yr(i){const{width:p,height:c}=i;if(p===0||c===0)return null;const $=i.getContext("2d");try{return $.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function gr(i){if(me(i))return await vr(i);if(pr(i)){if(Cr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return de(i)||he(i)?yr(i):await ve(i)}async function wr(i){try{return await i.decode(),!0}catch{return!1}}async function $r(i){var p;try{return await((p=i.decode)==null?void 0:p.call(i)),!0}catch{return!1}}function br(i){return i.format===null}function Cr(i){return i.data.buffer.byteLength===0}function Tr(i){return i.width===0&&i.height===0}function ye(i,p){return i instanceof DOMException?new DOMException(`${p}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${p}: ${i.message}`):new Error(`${p}: ${i}`)}const ge=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function _r(i){return i.join("|")}function Pr(i){const p=we(i);let c=0,$=ge.length-1;for(;c<=$;){const g=Math.floor((c+$)/2),b=ge[g],U=we(b);if(U===p)return b;U<p?c=g+1:$=g-1}return"None"}function we(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function Er(i,p){return i.Binarizer[p]}function Ar(i,p){return i.CharacterSet[p]}const Dr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Or(i){return Dr[i.value]}function Fr(i,p){return i.EanAddOnSymbol[p]}function xr(i,p){return i.TextMode[p]}const ut={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function $e(i,p){return{...p,formats:_r(p.formats),binarizer:Er(i,p.binarizer),eanAddOnSymbol:Fr(i,p.eanAddOnSymbol),textMode:xr(i,p.textMode),characterSet:Ar(i,p.characterSet)}}function be(i){return{...i,format:Pr(i.format),eccLevel:i.eccLevel,contentType:Or(i.contentType)}}const Sr={locateFile:(i,p)=>{const c=i.match(/_(.+?)\.wasm$/);return c?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${c[1]}/${i}`:p+i}};let Bt=new WeakMap;function Ut(i,p){var c;const $=Bt.get(i);if($!=null&&$.modulePromise&&(p===void 0||Object.is(p,$.moduleOverrides)))return $.modulePromise;const g=(c=p!=null?p:$==null?void 0:$.moduleOverrides)!=null?c:Sr,b=i({...g});return Bt.set(i,{moduleOverrides:g,modulePromise:b}),b}function Mr(i,p){Bt.set(i,{moduleOverrides:p})}async function jr(i,p,c=ut){const $={...ut,...c},g=await Ut(i),{size:b}=p,U=new Uint8Array(await p.arrayBuffer()),N=g._malloc(b);g.HEAPU8.set(U,N);const V=g.readBarcodesFromImage(N,b,$e(g,$));g._free(N);const S=[];for(let G=0;G<V.size();++G)S.push(be(V.get(G)));return S}async function Ir(i,p,c=ut){const $={...ut,...c},g=await Ut(i),{data:b,width:U,height:N,data:{byteLength:V}}=p,S=g._malloc(V);g.HEAPU8.set(b,S);const G=g.readBarcodesFromPixmap(S,U,N,$e(g,$));g._free(S);const Q=[];for(let L=0;L<G.size();++L)Q.push(be(G.get(L)));return Q}({...ut,formats:[...ut.formats]});var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(p={}){var c=p,$,g;c.ready=new Promise((t,e)=>{$=t,g=e});var b=Object.assign({},c),U="./this.program",N=typeof window=="object",V=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var S="";function G(t){return c.locateFile?c.locateFile(t,S):S+t}var Q;(N||V)&&(V?S=self.location.href:typeof document<"u"&&document.currentScript&&(S=document.currentScript.src),i&&(S=i),S.indexOf("blob:")!==0?S=S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):S="",V&&(Q=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),c.print||console.log.bind(console);var L=c.printErr||console.error.bind(console);Object.assign(c,b),b=null,c.arguments&&c.arguments,c.thisProgram&&(U=c.thisProgram),c.quit&&c.quit;var K;c.wasmBinary&&(K=c.wasmBinary),typeof WebAssembly!="object"&&Et("no native wasm support detected");var at,mt=!1,Y,k,lt,vt,H,_,_e,Pe;function Ee(){var t=at.buffer;c.HEAP8=Y=new Int8Array(t),c.HEAP16=lt=new Int16Array(t),c.HEAPU8=k=new Uint8Array(t),c.HEAPU16=vt=new Uint16Array(t),c.HEAP32=H=new Int32Array(t),c.HEAPU32=_=new Uint32Array(t),c.HEAPF32=_e=new Float32Array(t),c.HEAPF64=Pe=new Float64Array(t)}var Ae=[],De=[],Oe=[];function Br(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)Lr(c.preRun.shift());Vt(Ae)}function Ur(){Vt(De)}function Vr(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)zr(c.postRun.shift());Vt(Oe)}function Lr(t){Ae.unshift(t)}function Yr(t){De.unshift(t)}function zr(t){Oe.unshift(t)}var ot=0,yt=null;function Nr(t){var e;ot++,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot)}function Gr(t){var e;if(ot--,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot),ot==0&&yt){var r=yt;yt=null,r()}}function Et(t){var e;(e=c.onAbort)===null||e===void 0||e.call(c,t),t="Aborted("+t+")",L(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw g(r),r}var Xr="data:application/octet-stream;base64,",Fe=t=>t.startsWith(Xr),dt;dt="zxing_reader.wasm",Fe(dt)||(dt=G(dt));function xe(t){if(t==dt&&K)return new Uint8Array(K);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function qr(t){return!K&&(N||V)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>xe(t)):Promise.resolve().then(()=>xe(t))}function Se(t,e,r){return qr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L(`failed to asynchronously prepare wasm: ${n}`),Et(n)})}function Qr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Fe(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return L(`wasm streaming compile failed: ${s}`),L("falling back to ArrayBuffer instantiation"),Se(e,r,n)})}):Se(e,r,n)}function Zr(){var t={a:Ha};function e(n,a){return M=n.exports,at=M.ia,Ee(),Ve=M.ma,Yr(M.ja),Gr(),M}Nr();function r(n){e(n.instance)}if(c.instantiateWasm)try{return c.instantiateWasm(t,e)}catch(n){L(`Module.instantiateWasm callback failed with error: ${n}`),g(n)}return Qr(K,dt,t,r).catch(g),{}}var Vt=t=>{for(;t.length>0;)t.shift()(c)};c.noExitRuntime;var At=[],Dt=0,Jr=t=>{var e=new Lt(t);return e.get_caught()||(e.set_caught(!0),Dt--),e.set_rethrown(!1),At.push(e),rr(e.excPtr),e.get_exception_ptr()},tt=0,Kr=()=>{P(0,0);var t=At.pop();er(t.excPtr),tt=0};function Lt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Y[this.ptr+12>>0]=e},this.get_caught=function(){return Y[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Y[this.ptr+13>>0]=e},this.get_rethrown=function(){return Y[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ar(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var tn=t=>{throw tt||(tt=t),tt},Yt=t=>{var e=tt;if(!e)return _t(0),0;var r=new Lt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return _t(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(nr(o,n,s))return _t(o),e}return _t(n),e},en=()=>Yt([]),rn=t=>Yt([t]),nn=(t,e)=>Yt([t,e]),an=()=>{var t=At.pop();t||Et("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(At.push(t),t.set_rethrown(!0),t.set_caught(!1),Dt++),tt=e,tt},on=(t,e,r)=>{var n=new Lt(t);throw n.init(e,r),tt=t,Dt++,tt},sn=()=>Dt,Ot={},zt=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Nt(t){return this.fromWireType(H[t>>2])}var ft={},it={},Ft={},Me,xt=t=>{throw new Me(t)},st=(t,e,r)=>{t.forEach(function(u){Ft[u]=e});function n(u){var l=r(u);l.length!==t.length&&xt("Mismatched type converter count");for(var f=0;f<t.length;++f)Z(t[f],l[f])}var a=new Array(e.length),o=[],s=0;e.forEach((u,l)=>{it.hasOwnProperty(u)?a[l]=it[u]:(o.push(u),ft.hasOwnProperty(u)||(ft[u]=[]),ft[u].push(()=>{a[l]=it[u],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},un=t=>{var e=Ot[t];delete Ot[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));st([t],o,s=>{var u={};return a.forEach((l,f)=>{var h=l.fieldName,v=s[f],y=l.getter,w=l.getterContext,E=s[f+a.length],F=l.setter,T=l.setterContext;u[h]={read:W=>v.fromWireType(y(w,W)),write:(W,d)=>{var m=[];F(T,W,E.toWireType(m,d)),zt(m)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in u)f[h]=u[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in u)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var v=r();for(h in u)u[h].write(v,f[h]);return l!==null&&l.push(n,v),v},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:n}]})},cn=(t,e,r,n,a)=>{},ln=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);je=t},je,R=t=>{for(var e="",r=t;k[r];)e+=je[k[r++]];return e},ht,C=t=>{throw new ht(t)};function dn(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(it[t]=e,delete Ft[t],ft.hasOwnProperty(t)){var a=ft[t];delete ft[t],a.forEach(o=>o())}}function Z(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return dn(t,e,r)}var J=8,fn=(t,e,r,n)=>{e=R(e),Z(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:J,readValueFromPointer:function(a){return this.fromWireType(k[a])},destructorFunction:null})},hn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Gt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Xt=!1,Ie=t=>{},pn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Re=t=>{t.count.value-=1;var e=t.count.value===0;e&&pn(t)},We=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=We(t,e,r.baseClass);return n===null?null:r.downcast(n)},ke={},mn=()=>Object.keys($t).length,vn=()=>{var t=[];for(var e in $t)$t.hasOwnProperty(e)&&t.push($t[e]);return t},gt=[],qt=()=>{for(;gt.length;){var t=gt.pop();t.$$.deleteScheduled=!1,t.delete()}},wt,yn=t=>{wt=t,gt.length&&wt&&wt(qt)},gn=()=>{c.getInheritedInstanceCount=mn,c.getLiveInheritedInstances=vn,c.flushPendingDeletes=qt,c.setDelayFunction=yn},$t={},wn=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},$n=(t,e)=>(e=wn(t,e),$t[e]),St=(t,e)=>{(!e.ptrType||!e.ptr)&&xt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&xt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},bt(Object.create(t,{$$:{value:e,writable:!0}}))};function bn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=$n(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?St(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):St(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),s=ke[o];if(!s)return a.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var l=We(e,this.registeredClass,u.registeredClass);return l===null?a.call(this):this.isSmartPointer?St(u.registeredClass.instancePrototype,{ptrType:u,ptr:l,smartPtrType:this,smartPtr:t}):St(u.registeredClass.instancePrototype,{ptrType:u,ptr:l})}var bt=t=>typeof FinalizationRegistry>"u"?(bt=e=>e,t):(Xt=new FinalizationRegistry(e=>{Re(e.$$)}),bt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Xt.register(e,a,e)}return e},Ie=e=>Xt.unregister(e),bt(t)),Cn=()=>{Object.assign(Mt.prototype,{isAliasOf(t){if(!(this instanceof Mt)||!(t instanceof Mt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=bt(Object.create(Object.getPrototypeOf(this),{$$:{value:hn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Ie(this),Re(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),gt.push(this),gt.length===1&&wt&&wt(qt),this.$$.deleteScheduled=!0,this}})};function Mt(){}var Ct=(t,e)=>Object.defineProperty(e,"name",{value:t}),He=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Qt=(t,e,r)=>{c.hasOwnProperty(t)?((r===void 0||c[t].overloadTable!==void 0&&c[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),He(c,t,t),c.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[t].overloadTable[r]=e):(c[t]=e,r!==void 0&&(c[t].numArguments=r))},Tn=48,_n=57,Pn=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Tn&&e<=_n?`_${t}`:t};function En(t,e,r,n,a,o,s,u){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=u,this.pureVirtualFunctions=[]}var Zt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function An(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function Dn(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Zt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,et.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function On(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function Be(t){return this.fromWireType(_[t>>2])}var Fn=()=>{Object.assign(jt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var e;(e=this.rawDestructor)===null||e===void 0||e.call(this,t)},argPackAdvance:J,readValueFromPointer:Be,deleteObject(t){t!==null&&t.delete()},fromWireType:bn})};function jt(t,e,r,n,a,o,s,u,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=u,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=An,this.destructorFunction=null):(this.toWireType=On,this.destructorFunction=null):this.toWireType=Dn}var Ue=(t,e,r)=>{c.hasOwnProperty(t)||xt("Replacing nonexistant public symbol"),c[t].overloadTable!==void 0&&r!==void 0?c[t].overloadTable[r]=e:(c[t]=e,c[t].argCount=r)},xn=(t,e,r)=>{var n=c["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Ve,A=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Ve.get(t)),e},Sn=(t,e,r)=>{if(t.includes("j"))return xn(t,e,r);var n=A(e).apply(null,r);return n},Mn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Sn(t,e,r)}},q=(t,e)=>{t=R(t);function r(){return t.includes("j")?Mn(t,e):A(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},jn=(t,e)=>{var r=Ct(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Le,Ye=t=>{var e=tr(t),r=R(e);return rt(e),r},Rt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!it[o]){if(Ft[o]){Ft[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Le(`${t}: `+r.map(Ye).join([", "]))},In=(t,e,r,n,a,o,s,u,l,f,h,v,y)=>{h=R(h),o=q(a,o),u&&(u=q(s,u)),f&&(f=q(l,f)),y=q(v,y);var w=Pn(h);Qt(w,function(){Rt(`Cannot construct ${h} due to unbound types`,[n])}),st([t,e,r],n?[n]:[],function(E){E=E[0];var F,T;n?(F=E.registeredClass,T=F.instancePrototype):T=Mt.prototype;var W=Ct(h,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(m.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var ur=m.constructor_body[arguments.length];if(ur===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return ur.apply(this,arguments)}),d=Object.create(T,{constructor:{value:W}});W.prototype=d;var m=new En(h,W,d,y,F,o,u,f);if(m.baseClass){var x,j;(j=(x=m.baseClass).__derivedClasses)!==null&&j!==void 0||(x.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m)}var pt=new jt(h,m,!0,!1,!1),Ht=new jt(h+"*",m,!1,!1,!1),sr=new jt(h+" const*",m,!1,!0,!1);return ke[t]={pointerType:Ht,constPointerType:sr},Ue(w,W),[pt,Ht,sr]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Rn(t){for(var e=1;e<t.length;++e)if(t[e]!==null&&t[e].destructorFunction===void 0)return!0;return!1}function Kt(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var u=e[1]!==null&&r!==null,l=Rn(e),f=e[0].name!=="void",h=s-2,v=new Array(h),y=[],w=[],E=function(){arguments.length!==h&&C(`function ${t} called with ${arguments.length} arguments, expected ${h}`),w.length=0;var F;y.length=u?2:1,y[0]=a,u&&(F=e[1].toWireType(w,this),y[1]=F);for(var T=0;T<h;++T)v[T]=e[T+2].toWireType(w,arguments[T]),y.push(v[T]);var W=n.apply(null,y);function d(m){if(l)zt(w);else for(var x=u?1:2;x<e.length;x++){var j=x===1?F:v[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(j)}if(f)return e[0].fromWireType(m)}return d(W)};return Ct(t,E)}var Wn=(t,e,r,n,a,o)=>{var s=Jt(e,r);a=q(n,a),st([],[t],function(u){u=u[0];var l=`constructor ${u.name}`;if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return u.registeredClass.constructor_body[e-1]=()=>{Rt(`Cannot construct ${u.name} due to unbound types`,s)},st([],s,f=>(f.splice(1,0,null),u.registeredClass.constructor_body[e-1]=Kt(l,f,null,a,o),[])),[]})},ze=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?t.substr(0,e):t},kn=(t,e,r,n,a,o,s,u,l)=>{var f=Jt(r,n);e=R(e),e=ze(e),o=q(a,o),st([],[t],function(h){h=h[0];var v=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&h.registeredClass.pureVirtualFunctions.push(e);function y(){Rt(`Cannot call ${v} due to unbound types`,f)}var w=h.registeredClass.instancePrototype,E=w[e];return E===void 0||E.overloadTable===void 0&&E.className!==h.name&&E.argCount===r-2?(y.argCount=r-2,y.className=h.name,w[e]=y):(He(w,e,v),w[e].overloadTable[r-2]=y),st([],f,function(F){var T=Kt(v,F,h,o,s);return w[e].overloadTable===void 0?(T.argCount=r-2,w[e]=T):w[e].overloadTable[r-2]=T,[]}),[]})};function Hn(){Object.assign(Ne.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Ne(){this.allocated=[void 0],this.freelist=[]}var X=new Ne,te=t=>{t>=X.reserved&&--X.get(t).refcount===0&&X.free(t)},Bn=()=>{for(var t=0,e=X.reserved;e<X.allocated.length;++e)X.allocated[e]!==void 0&&++t;return t},Un=()=>{X.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),X.reserved=X.allocated.length,c.count_emval_handles=Bn},et={toValue:t=>(t||C("Cannot use deleted val. handle = "+t),X.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return X.allocate({refcount:1,value:t})}}},Vn=(t,e)=>{e=R(e),Z(t,{name:e,fromWireType:r=>{var n=et.toValue(r);return te(r),n},toWireType:(r,n)=>et.toHandle(n),argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:null})},Ln=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(Y[n>>0])}:function(n){return this.fromWireType(k[n>>0])};case 2:return r?function(n){return this.fromWireType(lt[n>>1])}:function(n){return this.fromWireType(vt[n>>1])};case 4:return r?function(n){return this.fromWireType(H[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Yn=(t,e,r,n)=>{e=R(e);function a(){}a.values={},Z(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:J,readValueFromPointer:Ln(e,r,n),destructorFunction:null}),Qt(e,a)},ee=(t,e)=>{var r=it[t];return r===void 0&&C(e+" has unknown type "+Ye(t)),r},zn=(t,e,r)=>{var n=ee(t,"enum");e=R(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Ct(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},re=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Nn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(_e[r>>2])};case 8:return function(r){return this.fromWireType(Pe[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Gn=(t,e,r)=>{e=R(e),Z(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:J,readValueFromPointer:Nn(e,r),destructorFunction:null})},Xn=(t,e,r,n,a,o,s)=>{var u=Jt(e,r);t=R(t),t=ze(t),a=q(n,a),Qt(t,function(){Rt(`Cannot call ${t} due to unbound types`,u)},e-1),st([],u,function(l){var f=[l[0],null].concat(l.slice(1));return Ue(t,Kt(t,f,null,a,o),e-1),[]})},qn=(t,e,r)=>{switch(e){case 1:return r?n=>Y[n>>0]:n=>k[n>>0];case 2:return r?n=>lt[n>>1]:n=>vt[n>>1];case 4:return r?n=>H[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Qn=(t,e,r,n,a)=>{e=R(e);var o=h=>h;if(n===0){var s=32-8*r;o=h=>h<<s>>>s}var u=e.includes("unsigned"),l=(h,v)=>{},f;u?f=function(h,v){return l(v,this.name),v>>>0}:f=function(h,v){return l(v,this.name),v},Z(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:J,readValueFromPointer:qn(e,r,n!==0),destructorFunction:null})},Zn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var u=_[s>>2],l=_[s+4>>2];return new a(Y.buffer,l,u)}r=R(r),Z(t,{name:r,fromWireType:o,argPackAdvance:J,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ge=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(u<=127){if(r>=o)break;e[r++]=u}else if(u<=2047){if(r+1>=o)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=o)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63}}return e[r]=0,r-a},Jn=(t,e,r)=>Ge(t,k,e,r),Xe=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},qe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Kn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&qe)return qe.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var u=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|u);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|u<<6|l:s=(s&7)<<18|u<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var f=s-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},ne=(t,e)=>t?Kn(k,t,e):"",ta=(t,e)=>{e=R(e);var r=e==="std::string";Z(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var u=o,l=0;l<=a;++l){var f=o+l;if(l==a||k[f]==0){var h=f-u,v=ne(u,h);s===void 0?s=v:(s+="\0",s+=v),u=f+1}}else{for(var y=new Array(a),l=0;l<a;++l)y[l]=String.fromCharCode(k[o+l]);s=y.join("")}return rt(n),s},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,s=typeof a=="string";s||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&s?o=Xe(a):o=a.length;var u=ie(4+o+1),l=u+4;if(_[u>>2]=o,r&&s)Jn(a,l,o+1);else if(s)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(rt(l),C("String has UTF-16 code units that do not fit in 8 bits")),k[l+f]=h}else for(var f=0;f<o;++f)k[l+f]=a[f];return n!==null&&n.push(rt,u),u},argPackAdvance:J,readValueFromPointer:Be,destructorFunction(n){rt(n)}})},Qe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ea=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&vt[n];)++n;if(r=n<<1,r-t>32&&Qe)return Qe.decode(k.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var u=lt[t+s*2>>1];if(u==0)break;o+=String.fromCharCode(u)}return o},ra=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<2)return 0;r-=2;for(var a=e,o=r<t.length*2?r/2:t.length,s=0;s<o;++s){var u=t.charCodeAt(s);lt[e>>1]=u,e+=2}return lt[e>>1]=0,e-a},na=t=>t.length*2,aa=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=H[t+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},oa=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<4)return 0;for(var a=e,o=a+r-4,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(H[e>>2]=u,e+=4,e+4>o)break}return H[e>>2]=0,e-a},ia=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},sa=(t,e,r)=>{r=R(r);var n,a,o,s,u;e===2?(n=ea,a=ra,s=na,o=()=>vt,u=1):e===4&&(n=aa,a=oa,s=ia,o=()=>_,u=2),Z(t,{name:r,fromWireType:l=>{for(var f=_[l>>2],h=o(),v,y=l+4,w=0;w<=f;++w){var E=l+4+w*e;if(w==f||h[E>>u]==0){var F=E-y,T=n(y,F);v===void 0?v=T:(v+="\0",v+=T),y=E+e}}return rt(l),v},toWireType:(l,f)=>{typeof f!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var h=s(f),v=ie(4+h+e);return _[v>>2]=h>>u,a(f,v+4,h+e),l!==null&&l.push(rt,v),v},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction(l){rt(l)}})},ua=(t,e,r,n,a,o)=>{Ot[t]={name:R(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},ca=(t,e,r,n,a,o,s,u,l,f)=>{Ot[t].fields.push({fieldName:R(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(u,l),setterContext:f})},la=(t,e)=>{e=R(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},ae=[],da=(t,e,r,n)=>(t=ae[t],e=et.toValue(e),t(null,e,r,n)),fa={},ha=t=>{var e=fa[t];return e===void 0?R(t):e},Ze=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},pa=t=>t===0?et.toHandle(Ze()):(t=ha(t),et.toHandle(Ze()[t])),ma=t=>{var e=ae.length;return ae.push(t),e},va=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=ee(_[e+n*4>>2],"parameter "+n);return r},ya=Reflect.construct,ga=(t,e,r)=>{var n=[],a=t.toWireType(n,r);return n.length&&(_[e>>2]=et.toHandle(n)),a},wa=(t,e,r)=>{var n=va(t,e),a=n.shift();t--;var o=new Array(t),s=(l,f,h,v)=>{for(var y=0,w=0;w<t;++w)o[w]=n[w].readValueFromPointer(v+y),y+=n[w].argPackAdvance;for(var E=r===1?ya(f,o):f.apply(l,o),w=0;w<t;++w){var F,T;(F=(T=n[w]).deleteObject)===null||F===void 0||F.call(T,o[w])}return ga(a,h,E)},u=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return ma(Ct(u,s))},$a=t=>{t>4&&(X.get(t).refcount+=1)},ba=t=>{var e=et.toValue(t);zt(e),te(t)},Ca=(t,e)=>{t=ee(t,"_emval_take_value");var r=t.readValueFromPointer(e);return et.toHandle(r)},Ta=()=>{Et("")},_a=(t,e,r)=>k.copyWithin(t,e,e+r),Pa=()=>2147483648,Ea=t=>{var e=at.buffer,r=(t-e.byteLength+65535)/65536;try{return at.grow(r),Ee(),1}catch{}},Aa=t=>{var e=k.length;t>>>=0;var r=Pa();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var s=Math.min(r,n(Math.max(t,o),65536)),u=Ea(s);if(u)return!0}return!1},oe={},Da=()=>U||"./this.program",Tt=()=>{if(!Tt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Da()};for(var r in oe)oe[r]===void 0?delete e[r]:e[r]=oe[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Tt.strings=n}return Tt.strings},Oa=(t,e)=>{for(var r=0;r<t.length;++r)Y[e++>>0]=t.charCodeAt(r);Y[e>>0]=0},Fa=(t,e)=>{var r=0;return Tt().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Oa(n,o),r+=n.length+1}),0},xa=(t,e)=>{var r=Tt();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Sa=t=>t,Wt=t=>t%4===0&&(t%100!==0||t%400===0),Ma=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Je=[31,29,31,30,31,30,31,31,30,31,30,31],Ke=[31,28,31,30,31,30,31,31,30,31,30,31],ja=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Je:Ke)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function Ia(t,e,r){var n=r>0?r:Xe(t)+1,a=new Array(n),o=Ge(t,a,0,a.length);return e&&(a.length=o),a}var Ra=(t,e)=>{Y.set(t,e)},Wa=(t,e,r,n)=>{var a=_[n+40>>2],o={tm_sec:H[n>>2],tm_min:H[n+4>>2],tm_hour:H[n+8>>2],tm_mday:H[n+12>>2],tm_mon:H[n+16>>2],tm_year:H[n+20>>2],tm_wday:H[n+24>>2],tm_yday:H[n+28>>2],tm_isdst:H[n+32>>2],tm_gmtoff:H[n+36>>2],tm_zone:a?ne(a):""},s=ne(r),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in u)s=s.replace(new RegExp(l,"g"),u[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function v(d,m,x){for(var j=typeof d=="number"?d.toString():d||"";j.length<m;)j=x[0]+j;return j}function y(d,m){return v(d,m,"0")}function w(d,m){function x(pt){return pt<0?-1:pt>0?1:0}var j;return(j=x(d.getFullYear()-m.getFullYear()))===0&&(j=x(d.getMonth()-m.getMonth()))===0&&(j=x(d.getDate()-m.getDate())),j}function E(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function F(d){var m=ja(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),j=new Date(m.getFullYear()+1,0,4),pt=E(x),Ht=E(j);return w(pt,m)<=0?w(Ht,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var T={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return y(m/100|0,2)},"%d":d=>y(d.tm_mday,2),"%e":d=>v(d.tm_mday,2," "),"%g":d=>F(d).toString().substring(2),"%G":d=>F(d),"%H":d=>y(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),y(m,2)},"%j":d=>y(d.tm_mday+Ma(Wt(d.tm_year+1900)?Je:Ke,d.tm_mon-1),3),"%m":d=>y(d.tm_mon+1,2),"%M":d=>y(d.tm_min,2),"%n":()=>`
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>y(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return y(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Wt(d.tm_year))&&(m=1)}}else{m=52;var j=(d.tm_wday+7-d.tm_yday-1)%7;(j==4||j==5&&Wt(d.tm_year%400-1))&&m++}return y(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return y(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in T)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),T[l](o)));s=s.replace(/\0\0/g,"%");var W=Ia(s,!1);return W.length>e?0:(Ra(W,t),W.length-1)},ka=(t,e,r,n,a)=>Wa(t,e,r,n);Me=c.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},ln(),ht=c.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Cn(),gn(),Fn(),Le=c.UnboundTypeError=jn(Error,"UnboundTypeError"),Hn(),Un();var Ha={s:Jr,u:Kr,b:en,g:rn,q:nn,J:an,f:on,V:sn,d:tn,da:un,Q:cn,_:fn,ca:In,ba:Wn,w:kn,Y:Vn,x:Yn,h:zn,L:Gn,M:Xn,t:Qn,o:Zn,K:ta,C:sa,A:ua,ea:ca,$:la,R:da,ha:te,fa:pa,Z:wa,N:$a,O:ba,aa:Ca,B:Ta,X:_a,W:Aa,T:Fa,U:xa,E:eo,D:Ya,F:to,n:ro,a:Ba,e:Na,m:La,k:Xa,H:Ja,v:Qa,G:Ka,z:ao,P:io,l:Ga,j:za,c:Va,p:Ua,I:Za,r:no,i:qa,y:oo,ga:Sa,S:ka},M=Zr(),rt=c._free=t=>(rt=c._free=M.ka)(t),ie=c._malloc=t=>(ie=c._malloc=M.la)(t),tr=t=>(tr=M.na)(t),P=(t,e)=>(P=M.oa)(t,e),_t=t=>(_t=M.pa)(t),D=()=>(D=M.qa)(),O=t=>(O=M.ra)(t),er=t=>(er=M.sa)(t),rr=t=>(rr=M.ta)(t),nr=(t,e,r)=>(nr=M.ua)(t,e,r),ar=t=>(ar=M.va)(t);c.dynCall_viijii=(t,e,r,n,a,o,s)=>(c.dynCall_viijii=M.wa)(t,e,r,n,a,o,s);var or=c.dynCall_jiiii=(t,e,r,n,a)=>(or=c.dynCall_jiiii=M.xa)(t,e,r,n,a);c.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(c.dynCall_iiiiij=M.ya)(t,e,r,n,a,o,s),c.dynCall_iiiiijj=(t,e,r,n,a,o,s,u,l)=>(c.dynCall_iiiiijj=M.za)(t,e,r,n,a,o,s,u,l),c.dynCall_iiiiiijj=(t,e,r,n,a,o,s,u,l,f)=>(c.dynCall_iiiiiijj=M.Aa)(t,e,r,n,a,o,s,u,l,f);function Ba(t,e){var r=D();try{return A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Ua(t,e,r,n){var a=D();try{A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function Va(t,e,r){var n=D();try{A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function La(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function Ya(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function za(t,e){var r=D();try{A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Na(t,e,r){var n=D();try{return A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function Ga(t){var e=D();try{A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function Xa(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function qa(t,e,r,n,a,o,s,u,l,f,h){var v=D();try{A(t)(e,r,n,a,o,s,u,l,f,h)}catch(y){if(O(v),y!==y+0)throw y;P(1,0)}}function Qa(t,e,r,n,a,o,s){var u=D();try{return A(t)(e,r,n,a,o,s)}catch(l){if(O(u),l!==l+0)throw l;P(1,0)}}function Za(t,e,r,n,a){var o=D();try{A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Ja(t,e,r,n,a,o){var s=D();try{return A(t)(e,r,n,a,o)}catch(u){if(O(s),u!==u+0)throw u;P(1,0)}}function Ka(t,e,r,n,a,o,s,u){var l=D();try{return A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function to(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function eo(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function ro(t){var e=D();try{return A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function no(t,e,r,n,a,o,s,u){var l=D();try{A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function ao(t,e,r,n,a,o,s,u,l,f,h,v){var y=D();try{return A(t)(e,r,n,a,o,s,u,l,f,h,v)}catch(w){if(O(y),w!==w+0)throw w;P(1,0)}}function oo(t,e,r,n,a,o,s,u,l,f,h,v,y,w,E,F){var T=D();try{A(t)(e,r,n,a,o,s,u,l,f,h,v,y,w,E,F)}catch(W){if(O(T),W!==W+0)throw W;P(1,0)}}function io(t,e,r,n,a){var o=D();try{return or(t,e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}var kt;yt=function t(){kt||ir(),kt||(yt=t)};function ir(){if(ot>0||(Br(),ot>0))return;function t(){kt||(kt=!0,c.calledRun=!0,!mt&&(Ur(),$(c),c.onRuntimeInitialized&&c.onRuntimeInitialized(),Vr()))}c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},1),t()},1)):t()}if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();return ir(),p.ready}})();function Rr(i){return Ut(Pt,i)}function Wr(i){return Mr(Pt,i)}async function kr(i,p){return jr(Pt,i,p)}async function Hr(i,p){return Ir(Pt,i,p)}class Ce extends EventTarget{constructor(c={}){var $;super();lr(this,ct,void 0);try{const g=($=c==null?void 0:c.formats)==null?void 0:$.filter(b=>b!=="unknown");if((g==null?void 0:g.length)===0)throw new TypeError("Hint option provided, but is empty.");g==null||g.forEach(b=>{if(!nt.has(b))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${b}' is not a valid enum value of type BarcodeFormat.`)}),dr(this,ct,g!=null?g:[]),Rr().then(b=>{this.dispatchEvent(new CustomEvent("load",{detail:b}))}).catch(b=>{this.dispatchEvent(new CustomEvent("error",{detail:b}))})}catch(g){throw ye(g,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return z.filter(c=>c!=="unknown")}async detect(c){try{const $=await gr(c);if($===null)return[];let g;try{me($)?g=await kr($,{tryHarder:!0,formats:se(this,ct).map(b=>nt.get(b))}):g=await Hr($,{tryHarder:!0,formats:se(this,ct).map(b=>nt.get(b))})}catch(b){throw console.error(b),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return g.map(b=>{const{topLeft:{x:U,y:N},topRight:{x:V,y:S},bottomLeft:{x:G,y:Q},bottomRight:{x:L,y:K}}=b.position,at=Math.min(U,V,G,L),mt=Math.min(N,S,Q,K),Y=Math.max(U,V,G,L),k=Math.max(N,S,Q,K);return{boundingBox:new DOMRectReadOnly(at,mt,Y-at,k-mt),rawValue:b.text,format:fr(b.format),cornerPoints:[{x:U,y:N},{x:V,y:S},{x:L,y:K},{x:G,y:Q}]}})}catch($){throw ye($,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ct=new WeakMap,(Te=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=Ce),I.BarcodeDetector=Ce,I.setZXingModuleOverrides=Wr,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),I}({});
var BarcodeDetectionAPI=function(I){"use strict";var dr=(I,B,Y)=>{if(!B.has(I))throw TypeError("Cannot "+Y)};var ce=(I,B,Y)=>(dr(I,B,"read from private field"),Y?Y.call(I):B.get(I)),fr=(I,B,Y)=>{if(B.has(I))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(I):B.set(I,Y)},hr=(I,B,Y,_t)=>(dr(I,B,"write to private field"),_t?_t.call(I,Y):B.set(I,Y),Y);var ct,Pe;const B=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Y(i){return i.join("|")}function _t(i){const p=le(i);let c=0,$=B.length-1;for(;c<=$;){const g=Math.floor((c+$)/2),b=B[g],V=le(b);if(V===p)return b;V<p?c=g+1:$=g-1}return"None"}function le(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function pr(i,p){return i.Binarizer[p]}function mr(i,p){return i.CharacterSet[p]}const vr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function yr(i){return vr[i.value]}function gr(i,p){return i.EanAddOnSymbol[p]}function wr(i,p){return i.TextMode[p]}const ut={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function de(i,p){return{...p,formats:Y(p.formats),binarizer:pr(i,p.binarizer),eanAddOnSymbol:gr(i,p.eanAddOnSymbol),textMode:wr(i,p.textMode),characterSet:mr(i,p.characterSet)}}function fe(i){return{...i,format:_t(i.format),eccLevel:i.eccLevel,contentType:yr(i.contentType)}}const $r={locateFile:(i,p)=>{const c=i.match(/_(.+?)\.wasm$/);return c?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.3/dist/${c[1]}/${i}`:p+i}};let Vt=new WeakMap;function Lt(i,p){var c;const $=Vt.get(i);if($!=null&&$.modulePromise&&(p===void 0||Object.is(p,$.moduleOverrides)))return $.modulePromise;const g=(c=p!=null?p:$==null?void 0:$.moduleOverrides)!=null?c:$r,b=i({...g});return Vt.set(i,{moduleOverrides:g,modulePromise:b}),b}function br(i,p){Vt.set(i,{moduleOverrides:p})}async function Cr(i,p,c=ut){const $={...ut,...c},g=await Lt(i),{size:b}=p,V=new Uint8Array(await p.arrayBuffer()),z=g._malloc(b);g.HEAPU8.set(V,z);const G=g.readBarcodesFromImage(z,b,de(g,$));g._free(z);const H=[];for(let S=0;S<G.size();++S)H.push(fe(G.get(S)));return H}async function Tr(i,p,c=ut){const $={...ut,...c},g=await Lt(i),{data:b,width:V,height:z,data:{byteLength:G}}=p,H=g._malloc(G);g.HEAPU8.set(b,H);const S=g.readBarcodesFromPixmap(H,V,z,de(g,$));g._free(H);const rt=[];for(let X=0;X<S.size();++X)rt.push(fe(S.get(X)));return rt}({...ut,formats:[...ut.formats]});var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(p={}){var c=p,$,g;c.ready=new Promise((t,e)=>{$=t,g=e});var b=Object.assign({},c),V="./this.program",z=typeof window=="object",G=typeof Bun<"u",H=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var S="";function rt(t){return c.locateFile?c.locateFile(t,S):S+t}var X;(z||H||G)&&(H?S=self.location.href:typeof document<"u"&&document.currentScript&&(S=document.currentScript.src),i&&(S=i),S.indexOf("blob:")!==0?S=S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):S="",H&&(X=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),c.print||console.log.bind(console);var J=c.printErr||console.error.bind(console);Object.assign(c,b),b=null,c.arguments&&c.arguments,c.thisProgram&&(V=c.thisProgram),c.quit&&c.quit;var nt;c.wasmBinary&&(nt=c.wasmBinary),typeof WebAssembly!="object"&&Dt("no native wasm support detected");var at,At=!1,L,U,lt,mt,k,_,Ee,Ae;function De(){var t=at.buffer;c.HEAP8=L=new Int8Array(t),c.HEAP16=lt=new Int16Array(t),c.HEAPU8=U=new Uint8Array(t),c.HEAPU16=mt=new Uint16Array(t),c.HEAP32=k=new Int32Array(t),c.HEAPU32=_=new Uint32Array(t),c.HEAPF32=Ee=new Float32Array(t),c.HEAPF64=Ae=new Float64Array(t)}var Oe=[],Fe=[],xe=[];function Ur(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)Yr(c.preRun.shift());Yt(Oe)}function Vr(){Yt(Fe)}function Lr(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)Nr(c.postRun.shift());Yt(xe)}function Yr(t){Oe.unshift(t)}function zr(t){Fe.unshift(t)}function Nr(t){xe.unshift(t)}var ot=0,vt=null;function Gr(t){var e;ot++,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot)}function Xr(t){var e;if(ot--,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot),ot==0&&vt){var r=vt;vt=null,r()}}function Dt(t){var e;(e=c.onAbort)===null||e===void 0||e.call(c,t),t="Aborted("+t+")",J(t),At=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw g(r),r}var qr="data:application/octet-stream;base64,",Se=t=>t.startsWith(qr),dt;dt="zxing_reader.wasm",Se(dt)||(dt=rt(dt));function Me(t){if(t==dt&&nt)return new Uint8Array(nt);if(X)return X(t);throw"both async and sync fetching of the wasm failed"}function Qr(t){return!nt&&(z||H||G)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Me(t)):Promise.resolve().then(()=>Me(t))}function je(t,e,r){return Qr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{J(`failed to asynchronously prepare wasm: ${n}`),Dt(n)})}function Zr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Se(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return J(`wasm streaming compile failed: ${s}`),J("falling back to ArrayBuffer instantiation"),je(e,r,n)})}):je(e,r,n)}function Jr(){var t={a:Ha};function e(n,a){return M=n.exports,at=M.ia,De(),Ye=M.ma,zr(M.ja),Xr(),M}Gr();function r(n){e(n.instance)}if(c.instantiateWasm)try{return c.instantiateWasm(t,e)}catch(n){J(`Module.instantiateWasm callback failed with error: ${n}`),g(n)}return Zr(nt,dt,t,r).catch(g),{}}var Yt=t=>{for(;t.length>0;)t.shift()(c)};c.noExitRuntime;var Ot=[],Ft=0,Kr=t=>{var e=new zt(t);return e.get_caught()||(e.set_caught(!0),Ft--),e.set_rethrown(!1),Ot.push(e),ar(e.excPtr),e.get_exception_ptr()},K=0,tn=()=>{P(0,0);var t=Ot.pop();nr(t.excPtr),K=0};function zt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,L[this.ptr+12>>0]=e},this.get_caught=function(){return L[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,L[this.ptr+13>>0]=e},this.get_rethrown=function(){return L[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ir(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var en=t=>{throw K||(K=t),K},Nt=t=>{var e=K;if(!e)return Tt(0),0;var r=new zt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(or(o,n,s))return Tt(o),e}return Tt(n),e},rn=()=>Nt([]),nn=t=>Nt([t]),an=(t,e)=>Nt([t,e]),on=()=>{var t=Ot.pop();t||Dt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Ot.push(t),t.set_rethrown(!0),t.set_caught(!1),Ft++),K=e,K},sn=(t,e,r)=>{var n=new zt(t);throw n.init(e,r),K=t,Ft++,K},un=()=>Ft,xt={},Gt=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Xt(t){return this.fromWireType(k[t>>2])}var ft={},it={},St={},Ie,Mt=t=>{throw new Ie(t)},st=(t,e,r)=>{t.forEach(function(u){St[u]=e});function n(u){var l=r(u);l.length!==t.length&&Mt("Mismatched type converter count");for(var f=0;f<t.length;++f)Q(t[f],l[f])}var a=new Array(e.length),o=[],s=0;e.forEach((u,l)=>{it.hasOwnProperty(u)?a[l]=it[u]:(o.push(u),ft.hasOwnProperty(u)||(ft[u]=[]),ft[u].push(()=>{a[l]=it[u],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},cn=t=>{var e=xt[t];delete xt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));st([t],o,s=>{var u={};return a.forEach((l,f)=>{var h=l.fieldName,v=s[f],y=l.getter,w=l.getterContext,E=s[f+a.length],F=l.setter,T=l.setterContext;u[h]={read:W=>v.fromWireType(y(w,W)),write:(W,d)=>{var m=[];F(T,W,E.toWireType(m,d)),Gt(m)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in u)f[h]=u[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in u)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var v=r();for(h in u)u[h].write(v,f[h]);return l!==null&&l.push(n,v),v},argPackAdvance:Z,readValueFromPointer:Xt,destructorFunction:n}]})},ln=(t,e,r,n,a)=>{},dn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Re=t},Re,R=t=>{for(var e="",r=t;U[r];)e+=Re[U[r++]];return e},ht,C=t=>{throw new ht(t)};function fn(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(it[t]=e,delete St[t],ft.hasOwnProperty(t)){var a=ft[t];delete ft[t],a.forEach(o=>o())}}function Q(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return fn(t,e,r)}var Z=8,hn=(t,e,r,n)=>{e=R(e),Q(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:Z,readValueFromPointer:function(a){return this.fromWireType(U[a])},destructorFunction:null})},pn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),qt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Qt=!1,We=t=>{},mn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},ke=t=>{t.count.value-=1;var e=t.count.value===0;e&&mn(t)},Be=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Be(t,e,r.baseClass);return n===null?null:r.downcast(n)},He={},vn=()=>Object.keys(wt).length,yn=()=>{var t=[];for(var e in wt)wt.hasOwnProperty(e)&&t.push(wt[e]);return t},yt=[],Zt=()=>{for(;yt.length;){var t=yt.pop();t.$$.deleteScheduled=!1,t.delete()}},gt,gn=t=>{gt=t,yt.length&&gt&&gt(Zt)},wn=()=>{c.getInheritedInstanceCount=vn,c.getLiveInheritedInstances=yn,c.flushPendingDeletes=Zt,c.setDelayFunction=gn},wt={},$n=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},bn=(t,e)=>(e=$n(t,e),wt[e]),jt=(t,e)=>{(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},$t(Object.create(t,{$$:{value:e,writable:!0}}))};function Cn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=bn(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),s=He[o];if(!s)return a.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var l=Be(e,this.registeredClass,u.registeredClass);return l===null?a.call(this):this.isSmartPointer?jt(u.registeredClass.instancePrototype,{ptrType:u,ptr:l,smartPtrType:this,smartPtr:t}):jt(u.registeredClass.instancePrototype,{ptrType:u,ptr:l})}var $t=t=>typeof FinalizationRegistry>"u"?($t=e=>e,t):(Qt=new FinalizationRegistry(e=>{ke(e.$$)}),$t=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Qt.register(e,a,e)}return e},We=e=>Qt.unregister(e),$t(t)),Tn=()=>{Object.assign(It.prototype,{isAliasOf(t){if(!(this instanceof It)||!(t instanceof It))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||qt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=$t(Object.create(Object.getPrototypeOf(this),{$$:{value:pn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||qt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),We(this),ke(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||qt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),yt.push(this),yt.length===1&&gt&&gt(Zt),this.$$.deleteScheduled=!0,this}})};function It(){}var bt=(t,e)=>Object.defineProperty(e,"name",{value:t}),Ue=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Jt=(t,e,r)=>{c.hasOwnProperty(t)?((r===void 0||c[t].overloadTable!==void 0&&c[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),Ue(c,t,t),c.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[t].overloadTable[r]=e):(c[t]=e,r!==void 0&&(c[t].numArguments=r))},_n=48,Pn=57,En=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=_n&&e<=Pn?`_${t}`:t};function An(t,e,r,n,a,o,s,u){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=u,this.pureVirtualFunctions=[]}var Kt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function Dn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ae(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Kt(e.$$.ptr,r,this.registeredClass);return n}function On(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&C(`Cannot pass "${ae(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Kt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,tt.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function Fn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ae(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Kt(e.$$.ptr,r,this.registeredClass);return n}function Ve(t){return this.fromWireType(_[t>>2])}var xn=()=>{Object.assign(Rt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var e;(e=this.rawDestructor)===null||e===void 0||e.call(this,t)},argPackAdvance:Z,readValueFromPointer:Ve,deleteObject(t){t!==null&&t.delete()},fromWireType:Cn})};function Rt(t,e,r,n,a,o,s,u,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=u,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=Dn,this.destructorFunction=null):(this.toWireType=Fn,this.destructorFunction=null):this.toWireType=On}var Le=(t,e,r)=>{c.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),c[t].overloadTable!==void 0&&r!==void 0?c[t].overloadTable[r]=e:(c[t]=e,c[t].argCount=r)},Sn=(t,e,r)=>{var n=c["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Wt=[],Ye,A=t=>{var e=Wt[t];return e||(t>=Wt.length&&(Wt.length=t+1),Wt[t]=e=Ye.get(t)),e},Mn=(t,e,r)=>{if(t.includes("j"))return Sn(t,e,r);var n=A(e).apply(null,r);return n},jn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Mn(t,e,r)}},q=(t,e)=>{t=R(t);function r(){return t.includes("j")?jn(t,e):A(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},In=(t,e)=>{var r=bt(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},ze,Ne=t=>{var e=rr(t),r=R(e);return et(e),r},kt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!it[o]){if(St[o]){St[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new ze(`${t}: `+r.map(Ne).join([", "]))},Rn=(t,e,r,n,a,o,s,u,l,f,h,v,y)=>{h=R(h),o=q(a,o),u&&(u=q(s,u)),f&&(f=q(l,f)),y=q(v,y);var w=En(h);Jt(w,function(){kt(`Cannot construct ${h} due to unbound types`,[n])}),st([t,e,r],n?[n]:[],function(E){E=E[0];var F,T;n?(F=E.registeredClass,T=F.instancePrototype):T=It.prototype;var W=bt(h,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(m.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var lr=m.constructor_body[arguments.length];if(lr===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return lr.apply(this,arguments)}),d=Object.create(T,{constructor:{value:W}});W.prototype=d;var m=new An(h,W,d,y,F,o,u,f);if(m.baseClass){var x,j;(j=(x=m.baseClass).__derivedClasses)!==null&&j!==void 0||(x.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m)}var pt=new Rt(h,m,!0,!1,!1),Ut=new Rt(h+"*",m,!1,!1,!1),cr=new Rt(h+" const*",m,!1,!0,!1);return He[t]={pointerType:Ut,constPointerType:cr},Le(w,W),[pt,Ut,cr]})},te=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Wn(t){for(var e=1;e<t.length;++e)if(t[e]!==null&&t[e].destructorFunction===void 0)return!0;return!1}function ee(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var u=e[1]!==null&&r!==null,l=Wn(e),f=e[0].name!=="void",h=s-2,v=new Array(h),y=[],w=[],E=function(){arguments.length!==h&&C(`function ${t} called with ${arguments.length} arguments, expected ${h}`),w.length=0;var F;y.length=u?2:1,y[0]=a,u&&(F=e[1].toWireType(w,this),y[1]=F);for(var T=0;T<h;++T)v[T]=e[T+2].toWireType(w,arguments[T]),y.push(v[T]);var W=n.apply(null,y);function d(m){if(l)Gt(w);else for(var x=u?1:2;x<e.length;x++){var j=x===1?F:v[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(j)}if(f)return e[0].fromWireType(m)}return d(W)};return bt(t,E)}var kn=(t,e,r,n,a,o)=>{var s=te(e,r);a=q(n,a),st([],[t],function(u){u=u[0];var l=`constructor ${u.name}`;if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return u.registeredClass.constructor_body[e-1]=()=>{kt(`Cannot construct ${u.name} due to unbound types`,s)},st([],s,f=>(f.splice(1,0,null),u.registeredClass.constructor_body[e-1]=ee(l,f,null,a,o),[])),[]})},Ge=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?t.substr(0,e):t},Bn=(t,e,r,n,a,o,s,u,l)=>{var f=te(r,n);e=R(e),e=Ge(e),o=q(a,o),st([],[t],function(h){h=h[0];var v=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&h.registeredClass.pureVirtualFunctions.push(e);function y(){kt(`Cannot call ${v} due to unbound types`,f)}var w=h.registeredClass.instancePrototype,E=w[e];return E===void 0||E.overloadTable===void 0&&E.className!==h.name&&E.argCount===r-2?(y.argCount=r-2,y.className=h.name,w[e]=y):(Ue(w,e,v),w[e].overloadTable[r-2]=y),st([],f,function(F){var T=ee(v,F,h,o,s);return w[e].overloadTable===void 0?(T.argCount=r-2,w[e]=T):w[e].overloadTable[r-2]=T,[]}),[]})};function Hn(){Object.assign(Xe.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Xe(){this.allocated=[void 0],this.freelist=[]}var N=new Xe,re=t=>{t>=N.reserved&&--N.get(t).refcount===0&&N.free(t)},Un=()=>{for(var t=0,e=N.reserved;e<N.allocated.length;++e)N.allocated[e]!==void 0&&++t;return t},Vn=()=>{N.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),N.reserved=N.allocated.length,c.count_emval_handles=Un},tt={toValue:t=>(t||C("Cannot use deleted val. handle = "+t),N.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return N.allocate({refcount:1,value:t})}}},Ln=(t,e)=>{e=R(e),Q(t,{name:e,fromWireType:r=>{var n=tt.toValue(r);return re(r),n},toWireType:(r,n)=>tt.toHandle(n),argPackAdvance:Z,readValueFromPointer:Xt,destructorFunction:null})},Yn=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(L[n>>0])}:function(n){return this.fromWireType(U[n>>0])};case 2:return r?function(n){return this.fromWireType(lt[n>>1])}:function(n){return this.fromWireType(mt[n>>1])};case 4:return r?function(n){return this.fromWireType(k[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},zn=(t,e,r,n)=>{e=R(e);function a(){}a.values={},Q(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:Z,readValueFromPointer:Yn(e,r,n),destructorFunction:null}),Jt(e,a)},ne=(t,e)=>{var r=it[t];return r===void 0&&C(e+" has unknown type "+Ne(t)),r},Nn=(t,e,r)=>{var n=ne(t,"enum");e=R(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:bt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},ae=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Gn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(Ee[r>>2])};case 8:return function(r){return this.fromWireType(Ae[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Xn=(t,e,r)=>{e=R(e),Q(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:Z,readValueFromPointer:Gn(e,r),destructorFunction:null})},qn=(t,e,r,n,a,o,s)=>{var u=te(e,r);t=R(t),t=Ge(t),a=q(n,a),Jt(t,function(){kt(`Cannot call ${t} due to unbound types`,u)},e-1),st([],u,function(l){var f=[l[0],null].concat(l.slice(1));return Le(t,ee(t,f,null,a,o),e-1),[]})},Qn=(t,e,r)=>{switch(e){case 1:return r?n=>L[n>>0]:n=>U[n>>0];case 2:return r?n=>lt[n>>1]:n=>mt[n>>1];case 4:return r?n=>k[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Zn=(t,e,r,n,a)=>{e=R(e);var o=h=>h;if(n===0){var s=32-8*r;o=h=>h<<s>>>s}var u=e.includes("unsigned"),l=(h,v)=>{},f;u?f=function(h,v){return l(v,this.name),v>>>0}:f=function(h,v){return l(v,this.name),v},Q(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:Z,readValueFromPointer:Qn(e,r,n!==0),destructorFunction:null})},Jn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var u=_[s>>2],l=_[s+4>>2];return new a(L.buffer,l,u)}r=R(r),Q(t,{name:r,fromWireType:o,argPackAdvance:Z,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},qe=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(u<=127){if(r>=o)break;e[r++]=u}else if(u<=2047){if(r+1>=o)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=o)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63}}return e[r]=0,r-a},Kn=(t,e,r)=>qe(t,U,e,r),Qe=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Ze=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,ta=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Ze)return Ze.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var u=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|u);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|u<<6|l:s=(s&7)<<18|u<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var f=s-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},oe=(t,e)=>t?ta(U,t,e):"",ea=(t,e)=>{e=R(e);var r=e==="std::string";Q(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var u=o,l=0;l<=a;++l){var f=o+l;if(l==a||U[f]==0){var h=f-u,v=oe(u,h);s===void 0?s=v:(s+="\0",s+=v),u=f+1}}else{for(var y=new Array(a),l=0;l<a;++l)y[l]=String.fromCharCode(U[o+l]);s=y.join("")}return et(n),s},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,s=typeof a=="string";s||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&s?o=Qe(a):o=a.length;var u=ue(4+o+1),l=u+4;if(_[u>>2]=o,r&&s)Kn(a,l,o+1);else if(s)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(et(l),C("String has UTF-16 code units that do not fit in 8 bits")),U[l+f]=h}else for(var f=0;f<o;++f)U[l+f]=a[f];return n!==null&&n.push(et,u),u},argPackAdvance:Z,readValueFromPointer:Ve,destructorFunction(n){et(n)}})},Je=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ra=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&mt[n];)++n;if(r=n<<1,r-t>32&&Je)return Je.decode(U.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var u=lt[t+s*2>>1];if(u==0)break;o+=String.fromCharCode(u)}return o},na=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<2)return 0;r-=2;for(var a=e,o=r<t.length*2?r/2:t.length,s=0;s<o;++s){var u=t.charCodeAt(s);lt[e>>1]=u,e+=2}return lt[e>>1]=0,e-a},aa=t=>t.length*2,oa=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=k[t+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},ia=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<4)return 0;for(var a=e,o=a+r-4,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(k[e>>2]=u,e+=4,e+4>o)break}return k[e>>2]=0,e-a},sa=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},ua=(t,e,r)=>{r=R(r);var n,a,o,s,u;e===2?(n=ra,a=na,s=aa,o=()=>mt,u=1):e===4&&(n=oa,a=ia,s=sa,o=()=>_,u=2),Q(t,{name:r,fromWireType:l=>{for(var f=_[l>>2],h=o(),v,y=l+4,w=0;w<=f;++w){var E=l+4+w*e;if(w==f||h[E>>u]==0){var F=E-y,T=n(y,F);v===void 0?v=T:(v+="\0",v+=T),y=E+e}}return et(l),v},toWireType:(l,f)=>{typeof f!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var h=s(f),v=ue(4+h+e);return _[v>>2]=h>>u,a(f,v+4,h+e),l!==null&&l.push(et,v),v},argPackAdvance:Z,readValueFromPointer:Xt,destructorFunction(l){et(l)}})},ca=(t,e,r,n,a,o)=>{xt[t]={name:R(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},la=(t,e,r,n,a,o,s,u,l,f)=>{xt[t].fields.push({fieldName:R(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(u,l),setterContext:f})},da=(t,e)=>{e=R(e),Q(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},ie=[],fa=(t,e,r,n)=>(t=ie[t],e=tt.toValue(e),t(null,e,r,n)),ha={},pa=t=>{var e=ha[t];return e===void 0?R(t):e},Ke=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},ma=t=>t===0?tt.toHandle(Ke()):(t=pa(t),tt.toHandle(Ke()[t])),va=t=>{var e=ie.length;return ie.push(t),e},ya=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=ne(_[e+n*4>>2],"parameter "+n);return r},ga=Reflect.construct,wa=(t,e,r)=>{var n=[],a=t.toWireType(n,r);return n.length&&(_[e>>2]=tt.toHandle(n)),a},$a=(t,e,r)=>{var n=ya(t,e),a=n.shift();t--;var o=new Array(t),s=(l,f,h,v)=>{for(var y=0,w=0;w<t;++w)o[w]=n[w].readValueFromPointer(v+y),y+=n[w].argPackAdvance;for(var E=r===1?ga(f,o):f.apply(l,o),w=0;w<t;++w){var F,T;(F=(T=n[w]).deleteObject)===null||F===void 0||F.call(T,o[w])}return wa(a,h,E)},u=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return va(bt(u,s))},ba=t=>{t>4&&(N.get(t).refcount+=1)},Ca=t=>{var e=tt.toValue(t);Gt(e),re(t)},Ta=(t,e)=>{t=ne(t,"_emval_take_value");var r=t.readValueFromPointer(e);return tt.toHandle(r)},_a=()=>{Dt("")},Pa=(t,e,r)=>U.copyWithin(t,e,e+r),Ea=()=>2147483648,Aa=t=>{var e=at.buffer,r=(t-e.byteLength+65535)/65536;try{return at.grow(r),De(),1}catch{}},Da=t=>{var e=U.length;t>>>=0;var r=Ea();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var s=Math.min(r,n(Math.max(t,o),65536)),u=Aa(s);if(u)return!0}return!1},se={},Oa=()=>V||"./this.program",Ct=()=>{if(!Ct.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Oa()};for(var r in se)se[r]===void 0?delete e[r]:e[r]=se[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Ct.strings=n}return Ct.strings},Fa=(t,e)=>{for(var r=0;r<t.length;++r)L[e++>>0]=t.charCodeAt(r);L[e>>0]=0},xa=(t,e)=>{var r=0;return Ct().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Fa(n,o),r+=n.length+1}),0},Sa=(t,e)=>{var r=Ct();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Ma=t=>t,Bt=t=>t%4===0&&(t%100!==0||t%400===0),ja=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},tr=[31,29,31,30,31,30,31,31,30,31,30,31],er=[31,28,31,30,31,30,31,31,30,31,30,31],Ia=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Bt(r.getFullYear()),a=r.getMonth(),o=(n?tr:er)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function Ra(t,e,r){var n=r>0?r:Qe(t)+1,a=new Array(n),o=qe(t,a,0,a.length);return e&&(a.length=o),a}var Wa=(t,e)=>{L.set(t,e)},ka=(t,e,r,n)=>{var a=_[n+40>>2],o={tm_sec:k[n>>2],tm_min:k[n+4>>2],tm_hour:k[n+8>>2],tm_mday:k[n+12>>2],tm_mon:k[n+16>>2],tm_year:k[n+20>>2],tm_wday:k[n+24>>2],tm_yday:k[n+28>>2],tm_isdst:k[n+32>>2],tm_gmtoff:k[n+36>>2],tm_zone:a?oe(a):""},s=oe(r),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in u)s=s.replace(new RegExp(l,"g"),u[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function v(d,m,x){for(var j=typeof d=="number"?d.toString():d||"";j.length<m;)j=x[0]+j;return j}function y(d,m){return v(d,m,"0")}function w(d,m){function x(pt){return pt<0?-1:pt>0?1:0}var j;return(j=x(d.getFullYear()-m.getFullYear()))===0&&(j=x(d.getMonth()-m.getMonth()))===0&&(j=x(d.getDate()-m.getDate())),j}function E(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function F(d){var m=Ia(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),j=new Date(m.getFullYear()+1,0,4),pt=E(x),Ut=E(j);return w(pt,m)<=0?w(Ut,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var T={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return y(m/100|0,2)},"%d":d=>y(d.tm_mday,2),"%e":d=>v(d.tm_mday,2," "),"%g":d=>F(d).toString().substring(2),"%G":d=>F(d),"%H":d=>y(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),y(m,2)},"%j":d=>y(d.tm_mday+ja(Bt(d.tm_year+1900)?tr:er,d.tm_mon-1),3),"%m":d=>y(d.tm_mon+1,2),"%M":d=>y(d.tm_min,2),"%n":()=>`
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>y(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return y(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Bt(d.tm_year))&&(m=1)}}else{m=52;var j=(d.tm_wday+7-d.tm_yday-1)%7;(j==4||j==5&&Bt(d.tm_year%400-1))&&m++}return y(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return y(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in T)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),T[l](o)));s=s.replace(/\0\0/g,"%");var W=Ra(s,!1);return W.length>e?0:(Wa(W,t),W.length-1)},Ba=(t,e,r,n,a)=>ka(t,e,r,n);Ie=c.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},dn(),ht=c.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Tn(),wn(),xn(),ze=c.UnboundTypeError=In(Error,"UnboundTypeError"),Hn(),Vn();var Ha={s:Kr,u:tn,b:rn,g:nn,q:an,K:on,f:sn,W:un,d:en,da:cn,S:ln,_:hn,ca:Rn,ba:kn,w:Bn,Z:Ln,x:zn,h:Nn,N:Xn,O:qn,t:Zn,o:Jn,M:ea,C:ua,A:ca,ea:la,$:da,E:fa,ga:re,ha:ma,L:$a,P:ba,Q:Ca,aa:Ta,B:_a,Y:Pa,X:Da,U:xa,V:Sa,F:ro,D:za,G:eo,n:no,a:Ua,e:Ga,m:Ya,k:qa,I:Ka,v:Za,H:to,z:oo,R:so,l:Xa,j:Na,c:La,p:Va,J:Ja,r:ao,i:Qa,y:io,fa:Ma,T:Ba},M=Jr(),et=c._free=t=>(et=c._free=M.ka)(t),ue=c._malloc=t=>(ue=c._malloc=M.la)(t),rr=t=>(rr=M.na)(t),P=(t,e)=>(P=M.oa)(t,e),Tt=t=>(Tt=M.pa)(t),D=()=>(D=M.qa)(),O=t=>(O=M.ra)(t),nr=t=>(nr=M.sa)(t),ar=t=>(ar=M.ta)(t),or=(t,e,r)=>(or=M.ua)(t,e,r),ir=t=>(ir=M.va)(t);c.dynCall_viijii=(t,e,r,n,a,o,s)=>(c.dynCall_viijii=M.wa)(t,e,r,n,a,o,s);var sr=c.dynCall_jiiii=(t,e,r,n,a)=>(sr=c.dynCall_jiiii=M.xa)(t,e,r,n,a);c.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(c.dynCall_iiiiij=M.ya)(t,e,r,n,a,o,s),c.dynCall_iiiiijj=(t,e,r,n,a,o,s,u,l)=>(c.dynCall_iiiiijj=M.za)(t,e,r,n,a,o,s,u,l),c.dynCall_iiiiiijj=(t,e,r,n,a,o,s,u,l,f)=>(c.dynCall_iiiiiijj=M.Aa)(t,e,r,n,a,o,s,u,l,f);function Ua(t,e){var r=D();try{return A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Va(t,e,r,n){var a=D();try{A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function La(t,e,r){var n=D();try{A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function Ya(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function za(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Na(t,e){var r=D();try{A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Ga(t,e,r){var n=D();try{return A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function Xa(t){var e=D();try{A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function qa(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Qa(t,e,r,n,a,o,s,u,l,f,h){var v=D();try{A(t)(e,r,n,a,o,s,u,l,f,h)}catch(y){if(O(v),y!==y+0)throw y;P(1,0)}}function Za(t,e,r,n,a,o,s){var u=D();try{return A(t)(e,r,n,a,o,s)}catch(l){if(O(u),l!==l+0)throw l;P(1,0)}}function Ja(t,e,r,n,a){var o=D();try{A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Ka(t,e,r,n,a,o){var s=D();try{return A(t)(e,r,n,a,o)}catch(u){if(O(s),u!==u+0)throw u;P(1,0)}}function to(t,e,r,n,a,o,s,u){var l=D();try{return A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function eo(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function ro(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function no(t){var e=D();try{return A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function ao(t,e,r,n,a,o,s,u){var l=D();try{A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function oo(t,e,r,n,a,o,s,u,l,f,h,v){var y=D();try{return A(t)(e,r,n,a,o,s,u,l,f,h,v)}catch(w){if(O(y),w!==w+0)throw w;P(1,0)}}function io(t,e,r,n,a,o,s,u,l,f,h,v,y,w,E,F){var T=D();try{A(t)(e,r,n,a,o,s,u,l,f,h,v,y,w,E,F)}catch(W){if(O(T),W!==W+0)throw W;P(1,0)}}function so(t,e,r,n,a){var o=D();try{return sr(t,e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}var Ht;vt=function t(){Ht||ur(),Ht||(vt=t)};function ur(){if(ot>0||(Ur(),ot>0))return;function t(){Ht||(Ht=!0,c.calledRun=!0,!At&&(Vr(),$(c),c.onRuntimeInitialized&&c.onRuntimeInitialized(),Lr()))}c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},1),t()},1)):t()}if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();return ur(),p.ready}})();function _r(i){return Lt(Pt,i)}function Pr(i){return br(Pt,i)}async function Er(i,p){return Cr(Pt,i,p)}async function Ar(i,p){return Tr(Pt,i,p)}const he=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["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"]],Dr=[...he,["unknown"]].map(i=>i[0]),Et=new Map(he);function Or(i){for(const[p,c]of Et)if(i===c)return p;return"unknown"}function Fr(i){if(pe(i))return{width:i.naturalWidth,height:i.naturalHeight};if(me(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ve(i))return{width:i.videoWidth,height:i.videoHeight};if(ge(i))return{width:i.width,height:i.height};if($e(i))return{width:i.displayWidth,height:i.displayHeight};if(ye(i))return{width:i.width,height:i.height};if(we(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 pe(i){try{return i instanceof HTMLImageElement}catch{return!1}}function me(i){try{return i instanceof SVGImageElement}catch{return!1}}function ve(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function ye(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function ge(i){try{return i instanceof ImageBitmap}catch{return!1}}function we(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function $e(i){try{return i instanceof VideoFrame}catch{return!1}}function be(i){try{return i instanceof Blob}catch{return!1}}function xr(i){try{return i instanceof ImageData}catch{return!1}}function Sr(i,p){try{const c=new OffscreenCanvas(i,p);if(c.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return c;throw void 0}catch{const c=document.createElement("canvas");return c.width=i,c.height=p,c}}async function Ce(i){if(pe(i)&&!await Rr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(me(i)&&!await Wr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if($e(i)&&kr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ve(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ge(i)&&Hr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:p,height:c}=Fr(i);if(p===0||c===0)return null;const g=Sr(p,c).getContext("2d");g.drawImage(i,0,0);try{return g.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Mr(i){let p;try{if(globalThis.createImageBitmap)p=await createImageBitmap(i);else if(globalThis.Image){p=new Image;let $="";try{$=URL.createObjectURL(i),p.src=$,await p.decode()}finally{URL.revokeObjectURL($)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Ce(p)}function jr(i){const{width:p,height:c}=i;if(p===0||c===0)return null;const $=i.getContext("2d");try{return $.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ir(i){if(be(i))return await Mr(i);if(xr(i)){if(Br(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ye(i)||we(i)?jr(i):await Ce(i)}async function Rr(i){try{return await i.decode(),!0}catch{return!1}}async function Wr(i){var p;try{return await((p=i.decode)==null?void 0:p.call(i)),!0}catch{return!1}}function kr(i){return i.format===null}function Br(i){return i.data.buffer.byteLength===0}function Hr(i){return i.width===0&&i.height===0}function Te(i,p){return i instanceof DOMException?new DOMException(`${p}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${p}: ${i.message}`):new Error(`${p}: ${i}`)}class _e extends EventTarget{constructor(c={}){var $;super();fr(this,ct,void 0);try{const g=($=c==null?void 0:c.formats)==null?void 0:$.filter(b=>b!=="unknown");if((g==null?void 0:g.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const b of g!=null?g:[])if(!Et.has(b))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${b}' is not a valid enum value of type BarcodeFormat.`);hr(this,ct,g!=null?g:[]),_r().then(b=>{this.dispatchEvent(new CustomEvent("load",{detail:b}))}).catch(b=>{this.dispatchEvent(new CustomEvent("error",{detail:b}))})}catch(g){throw Te(g,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Dr.filter(c=>c!=="unknown")}async detect(c){try{const $=await Ir(c);if($===null)return[];let g;try{be($)?g=await Er($,{tryHarder:!0,formats:ce(this,ct).map(b=>Et.get(b))}):g=await Ar($,{tryHarder:!0,formats:ce(this,ct).map(b=>Et.get(b))})}catch(b){throw console.error(b),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return g.map(b=>{const{topLeft:{x:V,y:z},topRight:{x:G,y:H},bottomLeft:{x:S,y:rt},bottomRight:{x:X,y:J}}=b.position,nt=Math.min(V,G,S,X),at=Math.min(z,H,rt,J),At=Math.max(V,G,S,X),L=Math.max(z,H,rt,J);return{boundingBox:new DOMRectReadOnly(nt,at,At-nt,L-at),rawValue:b.text,format:Or(b.format),cornerPoints:[{x:V,y:z},{x:G,y:H},{x:X,y:J},{x:S,y:rt}]}})}catch($){throw Te($,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ct=new WeakMap,(Pe=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=_e),I.BarcodeDetector=_e,I.setZXingModuleOverrides=Pr,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),I}({});

@@ -1,3 +0,3 @@

var BarcodeDetectionAPI=function(I){"use strict";var sr=(I,B,z)=>{if(!B.has(I))throw TypeError("Cannot "+z)};var se=(I,B,z)=>(sr(I,B,"read from private field"),z?z.call(I):B.get(I)),ur=(I,B,z)=>{if(B.has(I))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(I):B.set(I,z)},cr=(I,B,z,nt)=>(sr(I,B,"write to private field"),nt?nt.call(I,z):B.set(I,z),z);var ct;const B=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["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"]],z=[...B,["unknown"]].map(i=>i[0]),nt=new Map(B);function lr(i){for(const[p,c]of nt)if(i===c)return p;return"unknown"}function dr(i){if(ue(i))return{width:i.naturalWidth,height:i.naturalHeight};if(ce(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(le(i))return{width:i.videoWidth,height:i.videoHeight};if(fe(i))return{width:i.width,height:i.height};if(pe(i))return{width:i.displayWidth,height:i.displayHeight};if(de(i))return{width:i.width,height:i.height};if(he(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 ue(i){try{return i instanceof HTMLImageElement}catch{return!1}}function ce(i){try{return i instanceof SVGImageElement}catch{return!1}}function le(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function de(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function fe(i){try{return i instanceof ImageBitmap}catch{return!1}}function he(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function pe(i){try{return i instanceof VideoFrame}catch{return!1}}function me(i){try{return i instanceof Blob}catch{return!1}}function fr(i){try{return i instanceof ImageData}catch{return!1}}function hr(i,p){try{const c=new OffscreenCanvas(i,p);if(c.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return c;throw void 0}catch{const c=document.createElement("canvas");return c.width=i,c.height=p,c}}async function ve(i){if(ue(i)&&!await yr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ce(i)&&!await gr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(pe(i)&&wr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(le(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(fe(i)&&br(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:p,height:c}=dr(i);if(p===0||c===0)return null;const g=hr(p,c).getContext("2d");g.drawImage(i,0,0);try{return g.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function pr(i){let p;try{if(globalThis.createImageBitmap)p=await createImageBitmap(i);else if(globalThis.Image){p=new Image;let $="";try{$=URL.createObjectURL(i),p.src=$,await p.decode()}finally{URL.revokeObjectURL($)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ve(p)}function mr(i){const{width:p,height:c}=i;if(p===0||c===0)return null;const $=i.getContext("2d");try{return $.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function vr(i){if(me(i))return await pr(i);if(fr(i)){if($r(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return de(i)||he(i)?mr(i):await ve(i)}async function yr(i){try{return await i.decode(),!0}catch{return!1}}async function gr(i){var p;try{return await((p=i.decode)==null?void 0:p.call(i)),!0}catch{return!1}}function wr(i){return i.format===null}function $r(i){return i.data.buffer.byteLength===0}function br(i){return i.width===0&&i.height===0}function ye(i,p){return i instanceof DOMException?new DOMException(`${p}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${p}: ${i.message}`):new Error(`${p}: ${i}`)}const ge=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Cr(i){return i.join("|")}function Tr(i){const p=we(i);let c=0,$=ge.length-1;for(;c<=$;){const g=Math.floor((c+$)/2),b=ge[g],U=we(b);if(U===p)return b;U<p?c=g+1:$=g-1}return"None"}function we(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function _r(i,p){return i.Binarizer[p]}function Pr(i,p){return i.CharacterSet[p]}const Er=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Ar(i){return Er[i.value]}function Dr(i,p){return i.EanAddOnSymbol[p]}function Or(i,p){return i.TextMode[p]}const ut={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function $e(i,p){return{...p,formats:Cr(p.formats),binarizer:_r(i,p.binarizer),eanAddOnSymbol:Dr(i,p.eanAddOnSymbol),textMode:Or(i,p.textMode),characterSet:Pr(i,p.characterSet)}}function be(i){return{...i,format:Tr(i.format),eccLevel:i.eccLevel,contentType:Ar(i.contentType)}}const Fr={locateFile:(i,p)=>{const c=i.match(/_(.+?)\.wasm$/);return c?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${c[1]}/${i}`:p+i}};let Bt=new WeakMap;function Ut(i,p){var c;const $=Bt.get(i);if($!=null&&$.modulePromise&&(p===void 0||Object.is(p,$.moduleOverrides)))return $.modulePromise;const g=(c=p!=null?p:$==null?void 0:$.moduleOverrides)!=null?c:Fr,b=i({...g});return Bt.set(i,{moduleOverrides:g,modulePromise:b}),b}function xr(i,p){Bt.set(i,{moduleOverrides:p})}async function Sr(i,p,c=ut){const $={...ut,...c},g=await Ut(i),{size:b}=p,U=new Uint8Array(await p.arrayBuffer()),N=g._malloc(b);g.HEAPU8.set(U,N);const V=g.readBarcodesFromImage(N,b,$e(g,$));g._free(N);const S=[];for(let G=0;G<V.size();++G)S.push(be(V.get(G)));return S}async function Mr(i,p,c=ut){const $={...ut,...c},g=await Ut(i),{data:b,width:U,height:N,data:{byteLength:V}}=p,S=g._malloc(V);g.HEAPU8.set(b,S);const G=g.readBarcodesFromPixmap(S,U,N,$e(g,$));g._free(S);const Q=[];for(let L=0;L<G.size();++L)Q.push(be(G.get(L)));return Q}({...ut,formats:[...ut.formats]});var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(p={}){var c=p,$,g;c.ready=new Promise((t,e)=>{$=t,g=e});var b=Object.assign({},c),U="./this.program",N=typeof window=="object",V=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var S="";function G(t){return c.locateFile?c.locateFile(t,S):S+t}var Q;(N||V)&&(V?S=self.location.href:typeof document<"u"&&document.currentScript&&(S=document.currentScript.src),i&&(S=i),S.indexOf("blob:")!==0?S=S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):S="",V&&(Q=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),c.print||console.log.bind(console);var L=c.printErr||console.error.bind(console);Object.assign(c,b),b=null,c.arguments&&c.arguments,c.thisProgram&&(U=c.thisProgram),c.quit&&c.quit;var K;c.wasmBinary&&(K=c.wasmBinary),typeof WebAssembly!="object"&&Et("no native wasm support detected");var at,mt=!1,Y,k,lt,vt,H,_,Ce,Te;function _e(){var t=at.buffer;c.HEAP8=Y=new Int8Array(t),c.HEAP16=lt=new Int16Array(t),c.HEAPU8=k=new Uint8Array(t),c.HEAPU16=vt=new Uint16Array(t),c.HEAP32=H=new Int32Array(t),c.HEAPU32=_=new Uint32Array(t),c.HEAPF32=Ce=new Float32Array(t),c.HEAPF64=Te=new Float64Array(t)}var Pe=[],Ee=[],Ae=[];function Hr(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)Vr(c.preRun.shift());Vt(Pe)}function Br(){Vt(Ee)}function Ur(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)Yr(c.postRun.shift());Vt(Ae)}function Vr(t){Pe.unshift(t)}function Lr(t){Ee.unshift(t)}function Yr(t){Ae.unshift(t)}var ot=0,yt=null;function zr(t){var e;ot++,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot)}function Nr(t){var e;if(ot--,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot),ot==0&&yt){var r=yt;yt=null,r()}}function Et(t){var e;(e=c.onAbort)===null||e===void 0||e.call(c,t),t="Aborted("+t+")",L(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw g(r),r}var Gr="data:application/octet-stream;base64,",De=t=>t.startsWith(Gr),dt;dt="zxing_reader.wasm",De(dt)||(dt=G(dt));function Oe(t){if(t==dt&&K)return new Uint8Array(K);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function Xr(t){return!K&&(N||V)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Oe(t)):Promise.resolve().then(()=>Oe(t))}function Fe(t,e,r){return Xr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L(`failed to asynchronously prepare wasm: ${n}`),Et(n)})}function qr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!De(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return L(`wasm streaming compile failed: ${s}`),L("falling back to ArrayBuffer instantiation"),Fe(e,r,n)})}):Fe(e,r,n)}function Qr(){var t={a:ka};function e(n,a){return M=n.exports,at=M.ia,_e(),Be=M.ma,Lr(M.ja),Nr(),M}zr();function r(n){e(n.instance)}if(c.instantiateWasm)try{return c.instantiateWasm(t,e)}catch(n){L(`Module.instantiateWasm callback failed with error: ${n}`),g(n)}return qr(K,dt,t,r).catch(g),{}}var Vt=t=>{for(;t.length>0;)t.shift()(c)};c.noExitRuntime;var At=[],Dt=0,Zr=t=>{var e=new Lt(t);return e.get_caught()||(e.set_caught(!0),Dt--),e.set_rethrown(!1),At.push(e),tr(e.excPtr),e.get_exception_ptr()},tt=0,Jr=()=>{P(0,0);var t=At.pop();Ke(t.excPtr),tt=0};function Lt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Y[this.ptr+12>>0]=e},this.get_caught=function(){return Y[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Y[this.ptr+13>>0]=e},this.get_rethrown=function(){return Y[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=rr(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Kr=t=>{throw tt||(tt=t),tt},Yt=t=>{var e=tt;if(!e)return _t(0),0;var r=new Lt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return _t(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(er(o,n,s))return _t(o),e}return _t(n),e},tn=()=>Yt([]),en=t=>Yt([t]),rn=(t,e)=>Yt([t,e]),nn=()=>{var t=At.pop();t||Et("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(At.push(t),t.set_rethrown(!0),t.set_caught(!1),Dt++),tt=e,tt},an=(t,e,r)=>{var n=new Lt(t);throw n.init(e,r),tt=t,Dt++,tt},on=()=>Dt,Ot={},zt=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Nt(t){return this.fromWireType(H[t>>2])}var ft={},it={},Ft={},xe,xt=t=>{throw new xe(t)},st=(t,e,r)=>{t.forEach(function(u){Ft[u]=e});function n(u){var l=r(u);l.length!==t.length&&xt("Mismatched type converter count");for(var f=0;f<t.length;++f)Z(t[f],l[f])}var a=new Array(e.length),o=[],s=0;e.forEach((u,l)=>{it.hasOwnProperty(u)?a[l]=it[u]:(o.push(u),ft.hasOwnProperty(u)||(ft[u]=[]),ft[u].push(()=>{a[l]=it[u],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},sn=t=>{var e=Ot[t];delete Ot[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));st([t],o,s=>{var u={};return a.forEach((l,f)=>{var h=l.fieldName,v=s[f],y=l.getter,w=l.getterContext,E=s[f+a.length],F=l.setter,T=l.setterContext;u[h]={read:W=>v.fromWireType(y(w,W)),write:(W,d)=>{var m=[];F(T,W,E.toWireType(m,d)),zt(m)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in u)f[h]=u[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in u)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var v=r();for(h in u)u[h].write(v,f[h]);return l!==null&&l.push(n,v),v},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:n}]})},un=(t,e,r,n,a)=>{},cn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Se=t},Se,R=t=>{for(var e="",r=t;k[r];)e+=Se[k[r++]];return e},ht,C=t=>{throw new ht(t)};function ln(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(it[t]=e,delete Ft[t],ft.hasOwnProperty(t)){var a=ft[t];delete ft[t],a.forEach(o=>o())}}function Z(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return ln(t,e,r)}var J=8,dn=(t,e,r,n)=>{e=R(e),Z(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:J,readValueFromPointer:function(a){return this.fromWireType(k[a])},destructorFunction:null})},fn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Gt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Xt=!1,Me=t=>{},hn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},je=t=>{t.count.value-=1;var e=t.count.value===0;e&&hn(t)},Ie=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ie(t,e,r.baseClass);return n===null?null:r.downcast(n)},Re={},pn=()=>Object.keys($t).length,mn=()=>{var t=[];for(var e in $t)$t.hasOwnProperty(e)&&t.push($t[e]);return t},gt=[],qt=()=>{for(;gt.length;){var t=gt.pop();t.$$.deleteScheduled=!1,t.delete()}},wt,vn=t=>{wt=t,gt.length&&wt&&wt(qt)},yn=()=>{c.getInheritedInstanceCount=pn,c.getLiveInheritedInstances=mn,c.flushPendingDeletes=qt,c.setDelayFunction=vn},$t={},gn=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},wn=(t,e)=>(e=gn(t,e),$t[e]),St=(t,e)=>{(!e.ptrType||!e.ptr)&&xt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&xt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},bt(Object.create(t,{$$:{value:e,writable:!0}}))};function $n(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=wn(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?St(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):St(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),s=Re[o];if(!s)return a.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var l=Ie(e,this.registeredClass,u.registeredClass);return l===null?a.call(this):this.isSmartPointer?St(u.registeredClass.instancePrototype,{ptrType:u,ptr:l,smartPtrType:this,smartPtr:t}):St(u.registeredClass.instancePrototype,{ptrType:u,ptr:l})}var bt=t=>typeof FinalizationRegistry>"u"?(bt=e=>e,t):(Xt=new FinalizationRegistry(e=>{je(e.$$)}),bt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Xt.register(e,a,e)}return e},Me=e=>Xt.unregister(e),bt(t)),bn=()=>{Object.assign(Mt.prototype,{isAliasOf(t){if(!(this instanceof Mt)||!(t instanceof Mt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=bt(Object.create(Object.getPrototypeOf(this),{$$:{value:fn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Me(this),je(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),gt.push(this),gt.length===1&&wt&&wt(qt),this.$$.deleteScheduled=!0,this}})};function Mt(){}var Ct=(t,e)=>Object.defineProperty(e,"name",{value:t}),We=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Qt=(t,e,r)=>{c.hasOwnProperty(t)?((r===void 0||c[t].overloadTable!==void 0&&c[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),We(c,t,t),c.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[t].overloadTable[r]=e):(c[t]=e,r!==void 0&&(c[t].numArguments=r))},Cn=48,Tn=57,_n=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Cn&&e<=Tn?`_${t}`:t};function Pn(t,e,r,n,a,o,s,u){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=u,this.pureVirtualFunctions=[]}var Zt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function En(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function An(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Zt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,et.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function Dn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function ke(t){return this.fromWireType(_[t>>2])}var On=()=>{Object.assign(jt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var e;(e=this.rawDestructor)===null||e===void 0||e.call(this,t)},argPackAdvance:J,readValueFromPointer:ke,deleteObject(t){t!==null&&t.delete()},fromWireType:$n})};function jt(t,e,r,n,a,o,s,u,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=u,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=En,this.destructorFunction=null):(this.toWireType=Dn,this.destructorFunction=null):this.toWireType=An}var He=(t,e,r)=>{c.hasOwnProperty(t)||xt("Replacing nonexistant public symbol"),c[t].overloadTable!==void 0&&r!==void 0?c[t].overloadTable[r]=e:(c[t]=e,c[t].argCount=r)},Fn=(t,e,r)=>{var n=c["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Be,A=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Be.get(t)),e},xn=(t,e,r)=>{if(t.includes("j"))return Fn(t,e,r);var n=A(e).apply(null,r);return n},Sn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),xn(t,e,r)}},q=(t,e)=>{t=R(t);function r(){return t.includes("j")?Sn(t,e):A(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},Mn=(t,e)=>{var r=Ct(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ue,Ve=t=>{var e=Je(t),r=R(e);return rt(e),r},Rt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!it[o]){if(Ft[o]){Ft[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ue(`${t}: `+r.map(Ve).join([", "]))},jn=(t,e,r,n,a,o,s,u,l,f,h,v,y)=>{h=R(h),o=q(a,o),u&&(u=q(s,u)),f&&(f=q(l,f)),y=q(v,y);var w=_n(h);Qt(w,function(){Rt(`Cannot construct ${h} due to unbound types`,[n])}),st([t,e,r],n?[n]:[],function(E){E=E[0];var F,T;n?(F=E.registeredClass,T=F.instancePrototype):T=Mt.prototype;var W=Ct(h,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(m.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var ir=m.constructor_body[arguments.length];if(ir===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return ir.apply(this,arguments)}),d=Object.create(T,{constructor:{value:W}});W.prototype=d;var m=new Pn(h,W,d,y,F,o,u,f);if(m.baseClass){var x,j;(j=(x=m.baseClass).__derivedClasses)!==null&&j!==void 0||(x.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m)}var pt=new jt(h,m,!0,!1,!1),Ht=new jt(h+"*",m,!1,!1,!1),or=new jt(h+" const*",m,!1,!0,!1);return Re[t]={pointerType:Ht,constPointerType:or},He(w,W),[pt,Ht,or]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function In(t){for(var e=1;e<t.length;++e)if(t[e]!==null&&t[e].destructorFunction===void 0)return!0;return!1}function Kt(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var u=e[1]!==null&&r!==null,l=In(e),f=e[0].name!=="void",h=s-2,v=new Array(h),y=[],w=[],E=function(){arguments.length!==h&&C(`function ${t} called with ${arguments.length} arguments, expected ${h}`),w.length=0;var F;y.length=u?2:1,y[0]=a,u&&(F=e[1].toWireType(w,this),y[1]=F);for(var T=0;T<h;++T)v[T]=e[T+2].toWireType(w,arguments[T]),y.push(v[T]);var W=n.apply(null,y);function d(m){if(l)zt(w);else for(var x=u?1:2;x<e.length;x++){var j=x===1?F:v[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(j)}if(f)return e[0].fromWireType(m)}return d(W)};return Ct(t,E)}var Rn=(t,e,r,n,a,o)=>{var s=Jt(e,r);a=q(n,a),st([],[t],function(u){u=u[0];var l=`constructor ${u.name}`;if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return u.registeredClass.constructor_body[e-1]=()=>{Rt(`Cannot construct ${u.name} due to unbound types`,s)},st([],s,f=>(f.splice(1,0,null),u.registeredClass.constructor_body[e-1]=Kt(l,f,null,a,o),[])),[]})},Le=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?t.substr(0,e):t},Wn=(t,e,r,n,a,o,s,u,l)=>{var f=Jt(r,n);e=R(e),e=Le(e),o=q(a,o),st([],[t],function(h){h=h[0];var v=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&h.registeredClass.pureVirtualFunctions.push(e);function y(){Rt(`Cannot call ${v} due to unbound types`,f)}var w=h.registeredClass.instancePrototype,E=w[e];return E===void 0||E.overloadTable===void 0&&E.className!==h.name&&E.argCount===r-2?(y.argCount=r-2,y.className=h.name,w[e]=y):(We(w,e,v),w[e].overloadTable[r-2]=y),st([],f,function(F){var T=Kt(v,F,h,o,s);return w[e].overloadTable===void 0?(T.argCount=r-2,w[e]=T):w[e].overloadTable[r-2]=T,[]}),[]})};function kn(){Object.assign(Ye.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Ye(){this.allocated=[void 0],this.freelist=[]}var X=new Ye,te=t=>{t>=X.reserved&&--X.get(t).refcount===0&&X.free(t)},Hn=()=>{for(var t=0,e=X.reserved;e<X.allocated.length;++e)X.allocated[e]!==void 0&&++t;return t},Bn=()=>{X.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),X.reserved=X.allocated.length,c.count_emval_handles=Hn},et={toValue:t=>(t||C("Cannot use deleted val. handle = "+t),X.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return X.allocate({refcount:1,value:t})}}},Un=(t,e)=>{e=R(e),Z(t,{name:e,fromWireType:r=>{var n=et.toValue(r);return te(r),n},toWireType:(r,n)=>et.toHandle(n),argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:null})},Vn=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(Y[n>>0])}:function(n){return this.fromWireType(k[n>>0])};case 2:return r?function(n){return this.fromWireType(lt[n>>1])}:function(n){return this.fromWireType(vt[n>>1])};case 4:return r?function(n){return this.fromWireType(H[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Ln=(t,e,r,n)=>{e=R(e);function a(){}a.values={},Z(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:J,readValueFromPointer:Vn(e,r,n),destructorFunction:null}),Qt(e,a)},ee=(t,e)=>{var r=it[t];return r===void 0&&C(e+" has unknown type "+Ve(t)),r},Yn=(t,e,r)=>{var n=ee(t,"enum");e=R(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Ct(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},re=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},zn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(Ce[r>>2])};case 8:return function(r){return this.fromWireType(Te[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Nn=(t,e,r)=>{e=R(e),Z(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:J,readValueFromPointer:zn(e,r),destructorFunction:null})},Gn=(t,e,r,n,a,o,s)=>{var u=Jt(e,r);t=R(t),t=Le(t),a=q(n,a),Qt(t,function(){Rt(`Cannot call ${t} due to unbound types`,u)},e-1),st([],u,function(l){var f=[l[0],null].concat(l.slice(1));return He(t,Kt(t,f,null,a,o),e-1),[]})},Xn=(t,e,r)=>{switch(e){case 1:return r?n=>Y[n>>0]:n=>k[n>>0];case 2:return r?n=>lt[n>>1]:n=>vt[n>>1];case 4:return r?n=>H[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},qn=(t,e,r,n,a)=>{e=R(e);var o=h=>h;if(n===0){var s=32-8*r;o=h=>h<<s>>>s}var u=e.includes("unsigned"),l=(h,v)=>{},f;u?f=function(h,v){return l(v,this.name),v>>>0}:f=function(h,v){return l(v,this.name),v},Z(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:J,readValueFromPointer:Xn(e,r,n!==0),destructorFunction:null})},Qn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var u=_[s>>2],l=_[s+4>>2];return new a(Y.buffer,l,u)}r=R(r),Z(t,{name:r,fromWireType:o,argPackAdvance:J,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},ze=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(u<=127){if(r>=o)break;e[r++]=u}else if(u<=2047){if(r+1>=o)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=o)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63}}return e[r]=0,r-a},Zn=(t,e,r)=>ze(t,k,e,r),Ne=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Ge=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Jn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Ge)return Ge.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var u=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|u);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|u<<6|l:s=(s&7)<<18|u<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var f=s-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},ne=(t,e)=>t?Jn(k,t,e):"",Kn=(t,e)=>{e=R(e);var r=e==="std::string";Z(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var u=o,l=0;l<=a;++l){var f=o+l;if(l==a||k[f]==0){var h=f-u,v=ne(u,h);s===void 0?s=v:(s+="\0",s+=v),u=f+1}}else{for(var y=new Array(a),l=0;l<a;++l)y[l]=String.fromCharCode(k[o+l]);s=y.join("")}return rt(n),s},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,s=typeof a=="string";s||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&s?o=Ne(a):o=a.length;var u=ie(4+o+1),l=u+4;if(_[u>>2]=o,r&&s)Zn(a,l,o+1);else if(s)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(rt(l),C("String has UTF-16 code units that do not fit in 8 bits")),k[l+f]=h}else for(var f=0;f<o;++f)k[l+f]=a[f];return n!==null&&n.push(rt,u),u},argPackAdvance:J,readValueFromPointer:ke,destructorFunction(n){rt(n)}})},Xe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ta=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&vt[n];)++n;if(r=n<<1,r-t>32&&Xe)return Xe.decode(k.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var u=lt[t+s*2>>1];if(u==0)break;o+=String.fromCharCode(u)}return o},ea=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<2)return 0;r-=2;for(var a=e,o=r<t.length*2?r/2:t.length,s=0;s<o;++s){var u=t.charCodeAt(s);lt[e>>1]=u,e+=2}return lt[e>>1]=0,e-a},ra=t=>t.length*2,na=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=H[t+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},aa=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<4)return 0;for(var a=e,o=a+r-4,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(H[e>>2]=u,e+=4,e+4>o)break}return H[e>>2]=0,e-a},oa=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},ia=(t,e,r)=>{r=R(r);var n,a,o,s,u;e===2?(n=ta,a=ea,s=ra,o=()=>vt,u=1):e===4&&(n=na,a=aa,s=oa,o=()=>_,u=2),Z(t,{name:r,fromWireType:l=>{for(var f=_[l>>2],h=o(),v,y=l+4,w=0;w<=f;++w){var E=l+4+w*e;if(w==f||h[E>>u]==0){var F=E-y,T=n(y,F);v===void 0?v=T:(v+="\0",v+=T),y=E+e}}return rt(l),v},toWireType:(l,f)=>{typeof f!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var h=s(f),v=ie(4+h+e);return _[v>>2]=h>>u,a(f,v+4,h+e),l!==null&&l.push(rt,v),v},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction(l){rt(l)}})},sa=(t,e,r,n,a,o)=>{Ot[t]={name:R(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},ua=(t,e,r,n,a,o,s,u,l,f)=>{Ot[t].fields.push({fieldName:R(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(u,l),setterContext:f})},ca=(t,e)=>{e=R(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},ae=[],la=(t,e,r,n)=>(t=ae[t],e=et.toValue(e),t(null,e,r,n)),da={},fa=t=>{var e=da[t];return e===void 0?R(t):e},qe=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},ha=t=>t===0?et.toHandle(qe()):(t=fa(t),et.toHandle(qe()[t])),pa=t=>{var e=ae.length;return ae.push(t),e},ma=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=ee(_[e+n*4>>2],"parameter "+n);return r},va=Reflect.construct,ya=(t,e,r)=>{var n=[],a=t.toWireType(n,r);return n.length&&(_[e>>2]=et.toHandle(n)),a},ga=(t,e,r)=>{var n=ma(t,e),a=n.shift();t--;var o=new Array(t),s=(l,f,h,v)=>{for(var y=0,w=0;w<t;++w)o[w]=n[w].readValueFromPointer(v+y),y+=n[w].argPackAdvance;for(var E=r===1?va(f,o):f.apply(l,o),w=0;w<t;++w){var F,T;(F=(T=n[w]).deleteObject)===null||F===void 0||F.call(T,o[w])}return ya(a,h,E)},u=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return pa(Ct(u,s))},wa=t=>{t>4&&(X.get(t).refcount+=1)},$a=t=>{var e=et.toValue(t);zt(e),te(t)},ba=(t,e)=>{t=ee(t,"_emval_take_value");var r=t.readValueFromPointer(e);return et.toHandle(r)},Ca=()=>{Et("")},Ta=(t,e,r)=>k.copyWithin(t,e,e+r),_a=()=>2147483648,Pa=t=>{var e=at.buffer,r=(t-e.byteLength+65535)/65536;try{return at.grow(r),_e(),1}catch{}},Ea=t=>{var e=k.length;t>>>=0;var r=_a();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var s=Math.min(r,n(Math.max(t,o),65536)),u=Pa(s);if(u)return!0}return!1},oe={},Aa=()=>U||"./this.program",Tt=()=>{if(!Tt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Aa()};for(var r in oe)oe[r]===void 0?delete e[r]:e[r]=oe[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Tt.strings=n}return Tt.strings},Da=(t,e)=>{for(var r=0;r<t.length;++r)Y[e++>>0]=t.charCodeAt(r);Y[e>>0]=0},Oa=(t,e)=>{var r=0;return Tt().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Da(n,o),r+=n.length+1}),0},Fa=(t,e)=>{var r=Tt();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},xa=t=>t,Wt=t=>t%4===0&&(t%100!==0||t%400===0),Sa=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Qe=[31,29,31,30,31,30,31,31,30,31,30,31],Ze=[31,28,31,30,31,30,31,31,30,31,30,31],Ma=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Qe:Ze)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function ja(t,e,r){var n=r>0?r:Ne(t)+1,a=new Array(n),o=ze(t,a,0,a.length);return e&&(a.length=o),a}var Ia=(t,e)=>{Y.set(t,e)},Ra=(t,e,r,n)=>{var a=_[n+40>>2],o={tm_sec:H[n>>2],tm_min:H[n+4>>2],tm_hour:H[n+8>>2],tm_mday:H[n+12>>2],tm_mon:H[n+16>>2],tm_year:H[n+20>>2],tm_wday:H[n+24>>2],tm_yday:H[n+28>>2],tm_isdst:H[n+32>>2],tm_gmtoff:H[n+36>>2],tm_zone:a?ne(a):""},s=ne(r),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in u)s=s.replace(new RegExp(l,"g"),u[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function v(d,m,x){for(var j=typeof d=="number"?d.toString():d||"";j.length<m;)j=x[0]+j;return j}function y(d,m){return v(d,m,"0")}function w(d,m){function x(pt){return pt<0?-1:pt>0?1:0}var j;return(j=x(d.getFullYear()-m.getFullYear()))===0&&(j=x(d.getMonth()-m.getMonth()))===0&&(j=x(d.getDate()-m.getDate())),j}function E(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function F(d){var m=Ma(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),j=new Date(m.getFullYear()+1,0,4),pt=E(x),Ht=E(j);return w(pt,m)<=0?w(Ht,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var T={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return y(m/100|0,2)},"%d":d=>y(d.tm_mday,2),"%e":d=>v(d.tm_mday,2," "),"%g":d=>F(d).toString().substring(2),"%G":d=>F(d),"%H":d=>y(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),y(m,2)},"%j":d=>y(d.tm_mday+Sa(Wt(d.tm_year+1900)?Qe:Ze,d.tm_mon-1),3),"%m":d=>y(d.tm_mon+1,2),"%M":d=>y(d.tm_min,2),"%n":()=>`
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>y(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return y(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Wt(d.tm_year))&&(m=1)}}else{m=52;var j=(d.tm_wday+7-d.tm_yday-1)%7;(j==4||j==5&&Wt(d.tm_year%400-1))&&m++}return y(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return y(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in T)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),T[l](o)));s=s.replace(/\0\0/g,"%");var W=ja(s,!1);return W.length>e?0:(Ia(W,t),W.length-1)},Wa=(t,e,r,n,a)=>Ra(t,e,r,n);xe=c.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},cn(),ht=c.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},bn(),yn(),On(),Ue=c.UnboundTypeError=Mn(Error,"UnboundTypeError"),kn(),Bn();var ka={s:Zr,u:Jr,b:tn,g:en,q:rn,J:nn,f:an,V:on,d:Kr,da:sn,Q:un,_:dn,ca:jn,ba:Rn,w:Wn,Y:Un,x:Ln,h:Yn,L:Nn,M:Gn,t:qn,o:Qn,K:Kn,C:ia,A:sa,ea:ua,$:ca,R:la,ha:te,fa:ha,Z:ga,N:wa,O:$a,aa:ba,B:Ca,X:Ta,W:Ea,T:Oa,U:Fa,E:to,D:La,F:Ka,n:eo,a:Ha,e:za,m:Va,k:Ga,H:Za,v:qa,G:Ja,z:no,P:oo,l:Na,j:Ya,c:Ua,p:Ba,I:Qa,r:ro,i:Xa,y:ao,ga:xa,S:Wa},M=Qr(),rt=c._free=t=>(rt=c._free=M.ka)(t),ie=c._malloc=t=>(ie=c._malloc=M.la)(t),Je=t=>(Je=M.na)(t),P=(t,e)=>(P=M.oa)(t,e),_t=t=>(_t=M.pa)(t),D=()=>(D=M.qa)(),O=t=>(O=M.ra)(t),Ke=t=>(Ke=M.sa)(t),tr=t=>(tr=M.ta)(t),er=(t,e,r)=>(er=M.ua)(t,e,r),rr=t=>(rr=M.va)(t);c.dynCall_viijii=(t,e,r,n,a,o,s)=>(c.dynCall_viijii=M.wa)(t,e,r,n,a,o,s);var nr=c.dynCall_jiiii=(t,e,r,n,a)=>(nr=c.dynCall_jiiii=M.xa)(t,e,r,n,a);c.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(c.dynCall_iiiiij=M.ya)(t,e,r,n,a,o,s),c.dynCall_iiiiijj=(t,e,r,n,a,o,s,u,l)=>(c.dynCall_iiiiijj=M.za)(t,e,r,n,a,o,s,u,l),c.dynCall_iiiiiijj=(t,e,r,n,a,o,s,u,l,f)=>(c.dynCall_iiiiiijj=M.Aa)(t,e,r,n,a,o,s,u,l,f);function Ha(t,e){var r=D();try{return A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Ba(t,e,r,n){var a=D();try{A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function Ua(t,e,r){var n=D();try{A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function Va(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function La(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Ya(t,e){var r=D();try{A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function za(t,e,r){var n=D();try{return A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function Na(t){var e=D();try{A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function Ga(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Xa(t,e,r,n,a,o,s,u,l,f,h){var v=D();try{A(t)(e,r,n,a,o,s,u,l,f,h)}catch(y){if(O(v),y!==y+0)throw y;P(1,0)}}function qa(t,e,r,n,a,o,s){var u=D();try{return A(t)(e,r,n,a,o,s)}catch(l){if(O(u),l!==l+0)throw l;P(1,0)}}function Qa(t,e,r,n,a){var o=D();try{A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Za(t,e,r,n,a,o){var s=D();try{return A(t)(e,r,n,a,o)}catch(u){if(O(s),u!==u+0)throw u;P(1,0)}}function Ja(t,e,r,n,a,o,s,u){var l=D();try{return A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function Ka(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function to(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function eo(t){var e=D();try{return A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function ro(t,e,r,n,a,o,s,u){var l=D();try{A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function no(t,e,r,n,a,o,s,u,l,f,h,v){var y=D();try{return A(t)(e,r,n,a,o,s,u,l,f,h,v)}catch(w){if(O(y),w!==w+0)throw w;P(1,0)}}function ao(t,e,r,n,a,o,s,u,l,f,h,v,y,w,E,F){var T=D();try{A(t)(e,r,n,a,o,s,u,l,f,h,v,y,w,E,F)}catch(W){if(O(T),W!==W+0)throw W;P(1,0)}}function oo(t,e,r,n,a){var o=D();try{return nr(t,e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}var kt;yt=function t(){kt||ar(),kt||(yt=t)};function ar(){if(ot>0||(Hr(),ot>0))return;function t(){kt||(kt=!0,c.calledRun=!0,!mt&&(Br(),$(c),c.onRuntimeInitialized&&c.onRuntimeInitialized(),Ur()))}c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},1),t()},1)):t()}if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();return ar(),p.ready}})();function jr(i){return Ut(Pt,i)}function Ir(i){return xr(Pt,i)}async function Rr(i,p){return Sr(Pt,i,p)}async function Wr(i,p){return Mr(Pt,i,p)}class kr extends EventTarget{constructor(c={}){var $;super();ur(this,ct,void 0);try{const g=($=c==null?void 0:c.formats)==null?void 0:$.filter(b=>b!=="unknown");if((g==null?void 0:g.length)===0)throw new TypeError("Hint option provided, but is empty.");g==null||g.forEach(b=>{if(!nt.has(b))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${b}' is not a valid enum value of type BarcodeFormat.`)}),cr(this,ct,g!=null?g:[]),jr().then(b=>{this.dispatchEvent(new CustomEvent("load",{detail:b}))}).catch(b=>{this.dispatchEvent(new CustomEvent("error",{detail:b}))})}catch(g){throw ye(g,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return z.filter(c=>c!=="unknown")}async detect(c){try{const $=await vr(c);if($===null)return[];let g;try{me($)?g=await Rr($,{tryHarder:!0,formats:se(this,ct).map(b=>nt.get(b))}):g=await Wr($,{tryHarder:!0,formats:se(this,ct).map(b=>nt.get(b))})}catch(b){throw console.error(b),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return g.map(b=>{const{topLeft:{x:U,y:N},topRight:{x:V,y:S},bottomLeft:{x:G,y:Q},bottomRight:{x:L,y:K}}=b.position,at=Math.min(U,V,G,L),mt=Math.min(N,S,Q,K),Y=Math.max(U,V,G,L),k=Math.max(N,S,Q,K);return{boundingBox:new DOMRectReadOnly(at,mt,Y-at,k-mt),rawValue:b.text,format:lr(b.format),cornerPoints:[{x:U,y:N},{x:V,y:S},{x:L,y:K},{x:G,y:Q}]}})}catch($){throw ye($,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ct=new WeakMap,I.BarcodeDetector=kr,I.setZXingModuleOverrides=Ir,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),I}({});
var BarcodeDetectionAPI=function(I){"use strict";var cr=(I,H,Y)=>{if(!H.has(I))throw TypeError("Cannot "+Y)};var ce=(I,H,Y)=>(cr(I,H,"read from private field"),Y?Y.call(I):H.get(I)),lr=(I,H,Y)=>{if(H.has(I))throw TypeError("Cannot add the same private member more than once");H instanceof WeakSet?H.add(I):H.set(I,Y)},dr=(I,H,Y,Tt)=>(cr(I,H,"write to private field"),Tt?Tt.call(I,Y):H.set(I,Y),Y);var ct;const H=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Y(i){return i.join("|")}function Tt(i){const p=le(i);let c=0,$=H.length-1;for(;c<=$;){const g=Math.floor((c+$)/2),b=H[g],V=le(b);if(V===p)return b;V<p?c=g+1:$=g-1}return"None"}function le(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function fr(i,p){return i.Binarizer[p]}function hr(i,p){return i.CharacterSet[p]}const pr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function mr(i){return pr[i.value]}function vr(i,p){return i.EanAddOnSymbol[p]}function yr(i,p){return i.TextMode[p]}const ut={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function de(i,p){return{...p,formats:Y(p.formats),binarizer:fr(i,p.binarizer),eanAddOnSymbol:vr(i,p.eanAddOnSymbol),textMode:yr(i,p.textMode),characterSet:hr(i,p.characterSet)}}function fe(i){return{...i,format:Tt(i.format),eccLevel:i.eccLevel,contentType:mr(i.contentType)}}const gr={locateFile:(i,p)=>{const c=i.match(/_(.+?)\.wasm$/);return c?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.3/dist/${c[1]}/${i}`:p+i}};let Vt=new WeakMap;function Lt(i,p){var c;const $=Vt.get(i);if($!=null&&$.modulePromise&&(p===void 0||Object.is(p,$.moduleOverrides)))return $.modulePromise;const g=(c=p!=null?p:$==null?void 0:$.moduleOverrides)!=null?c:gr,b=i({...g});return Vt.set(i,{moduleOverrides:g,modulePromise:b}),b}function wr(i,p){Vt.set(i,{moduleOverrides:p})}async function $r(i,p,c=ut){const $={...ut,...c},g=await Lt(i),{size:b}=p,V=new Uint8Array(await p.arrayBuffer()),z=g._malloc(b);g.HEAPU8.set(V,z);const G=g.readBarcodesFromImage(z,b,de(g,$));g._free(z);const B=[];for(let S=0;S<G.size();++S)B.push(fe(G.get(S)));return B}async function br(i,p,c=ut){const $={...ut,...c},g=await Lt(i),{data:b,width:V,height:z,data:{byteLength:G}}=p,B=g._malloc(G);g.HEAPU8.set(b,B);const S=g.readBarcodesFromPixmap(B,V,z,de(g,$));g._free(B);const rt=[];for(let X=0;X<S.size();++X)rt.push(fe(S.get(X)));return rt}({...ut,formats:[...ut.formats]});var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(p={}){var c=p,$,g;c.ready=new Promise((t,e)=>{$=t,g=e});var b=Object.assign({},c),V="./this.program",z=typeof window=="object",G=typeof Bun<"u",B=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var S="";function rt(t){return c.locateFile?c.locateFile(t,S):S+t}var X;(z||B||G)&&(B?S=self.location.href:typeof document<"u"&&document.currentScript&&(S=document.currentScript.src),i&&(S=i),S.indexOf("blob:")!==0?S=S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):S="",B&&(X=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),c.print||console.log.bind(console);var J=c.printErr||console.error.bind(console);Object.assign(c,b),b=null,c.arguments&&c.arguments,c.thisProgram&&(V=c.thisProgram),c.quit&&c.quit;var nt;c.wasmBinary&&(nt=c.wasmBinary),typeof WebAssembly!="object"&&Dt("no native wasm support detected");var at,At=!1,L,U,lt,mt,k,T,Te,Pe;function Ee(){var t=at.buffer;c.HEAP8=L=new Int8Array(t),c.HEAP16=lt=new Int16Array(t),c.HEAPU8=U=new Uint8Array(t),c.HEAPU16=mt=new Uint16Array(t),c.HEAP32=k=new Int32Array(t),c.HEAPU32=T=new Uint32Array(t),c.HEAPF32=Te=new Float32Array(t),c.HEAPF64=Pe=new Float64Array(t)}var Ae=[],De=[],Oe=[];function Br(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)Lr(c.preRun.shift());Yt(Ae)}function Ur(){Yt(De)}function Vr(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)zr(c.postRun.shift());Yt(Oe)}function Lr(t){Ae.unshift(t)}function Yr(t){De.unshift(t)}function zr(t){Oe.unshift(t)}var ot=0,vt=null;function Nr(t){var e;ot++,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot)}function Gr(t){var e;if(ot--,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot),ot==0&&vt){var r=vt;vt=null,r()}}function Dt(t){var e;(e=c.onAbort)===null||e===void 0||e.call(c,t),t="Aborted("+t+")",J(t),At=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw g(r),r}var Xr="data:application/octet-stream;base64,",Fe=t=>t.startsWith(Xr),dt;dt="zxing_reader.wasm",Fe(dt)||(dt=rt(dt));function xe(t){if(t==dt&&nt)return new Uint8Array(nt);if(X)return X(t);throw"both async and sync fetching of the wasm failed"}function qr(t){return!nt&&(z||B||G)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>xe(t)):Promise.resolve().then(()=>xe(t))}function Se(t,e,r){return qr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{J(`failed to asynchronously prepare wasm: ${n}`),Dt(n)})}function Qr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Fe(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return J(`wasm streaming compile failed: ${s}`),J("falling back to ArrayBuffer instantiation"),Se(e,r,n)})}):Se(e,r,n)}function Zr(){var t={a:Ha};function e(n,a){return M=n.exports,at=M.ia,Ee(),Ve=M.ma,Yr(M.ja),Gr(),M}Nr();function r(n){e(n.instance)}if(c.instantiateWasm)try{return c.instantiateWasm(t,e)}catch(n){J(`Module.instantiateWasm callback failed with error: ${n}`),g(n)}return Qr(nt,dt,t,r).catch(g),{}}var Yt=t=>{for(;t.length>0;)t.shift()(c)};c.noExitRuntime;var Ot=[],Ft=0,Jr=t=>{var e=new zt(t);return e.get_caught()||(e.set_caught(!0),Ft--),e.set_rethrown(!1),Ot.push(e),rr(e.excPtr),e.get_exception_ptr()},K=0,Kr=()=>{P(0,0);var t=Ot.pop();er(t.excPtr),K=0};function zt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){T[this.ptr+4>>2]=e},this.get_type=function(){return T[this.ptr+4>>2]},this.set_destructor=function(e){T[this.ptr+8>>2]=e},this.get_destructor=function(){return T[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,L[this.ptr+12>>0]=e},this.get_caught=function(){return L[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,L[this.ptr+13>>0]=e},this.get_rethrown=function(){return L[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){T[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return T[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ar(this.get_type());if(e)return T[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var tn=t=>{throw K||(K=t),K},Nt=t=>{var e=K;if(!e)return _t(0),0;var r=new zt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return _t(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(nr(o,n,s))return _t(o),e}return _t(n),e},en=()=>Nt([]),rn=t=>Nt([t]),nn=(t,e)=>Nt([t,e]),an=()=>{var t=Ot.pop();t||Dt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Ot.push(t),t.set_rethrown(!0),t.set_caught(!1),Ft++),K=e,K},on=(t,e,r)=>{var n=new zt(t);throw n.init(e,r),K=t,Ft++,K},sn=()=>Ft,xt={},Gt=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Xt(t){return this.fromWireType(k[t>>2])}var ft={},it={},St={},Me,Mt=t=>{throw new Me(t)},st=(t,e,r)=>{t.forEach(function(u){St[u]=e});function n(u){var l=r(u);l.length!==t.length&&Mt("Mismatched type converter count");for(var f=0;f<t.length;++f)Q(t[f],l[f])}var a=new Array(e.length),o=[],s=0;e.forEach((u,l)=>{it.hasOwnProperty(u)?a[l]=it[u]:(o.push(u),ft.hasOwnProperty(u)||(ft[u]=[]),ft[u].push(()=>{a[l]=it[u],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},un=t=>{var e=xt[t];delete xt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));st([t],o,s=>{var u={};return a.forEach((l,f)=>{var h=l.fieldName,v=s[f],y=l.getter,w=l.getterContext,E=s[f+a.length],F=l.setter,_=l.setterContext;u[h]={read:W=>v.fromWireType(y(w,W)),write:(W,d)=>{var m=[];F(_,W,E.toWireType(m,d)),Gt(m)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in u)f[h]=u[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in u)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var v=r();for(h in u)u[h].write(v,f[h]);return l!==null&&l.push(n,v),v},argPackAdvance:Z,readValueFromPointer:Xt,destructorFunction:n}]})},cn=(t,e,r,n,a)=>{},ln=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);je=t},je,R=t=>{for(var e="",r=t;U[r];)e+=je[U[r++]];return e},ht,C=t=>{throw new ht(t)};function dn(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(it[t]=e,delete St[t],ft.hasOwnProperty(t)){var a=ft[t];delete ft[t],a.forEach(o=>o())}}function Q(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return dn(t,e,r)}var Z=8,fn=(t,e,r,n)=>{e=R(e),Q(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:Z,readValueFromPointer:function(a){return this.fromWireType(U[a])},destructorFunction:null})},hn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),qt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Qt=!1,Ie=t=>{},pn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Re=t=>{t.count.value-=1;var e=t.count.value===0;e&&pn(t)},We=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=We(t,e,r.baseClass);return n===null?null:r.downcast(n)},ke={},mn=()=>Object.keys(wt).length,vn=()=>{var t=[];for(var e in wt)wt.hasOwnProperty(e)&&t.push(wt[e]);return t},yt=[],Zt=()=>{for(;yt.length;){var t=yt.pop();t.$$.deleteScheduled=!1,t.delete()}},gt,yn=t=>{gt=t,yt.length&&gt&&gt(Zt)},gn=()=>{c.getInheritedInstanceCount=mn,c.getLiveInheritedInstances=vn,c.flushPendingDeletes=Zt,c.setDelayFunction=yn},wt={},wn=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},$n=(t,e)=>(e=wn(t,e),wt[e]),jt=(t,e)=>{(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},$t(Object.create(t,{$$:{value:e,writable:!0}}))};function bn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=$n(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),s=ke[o];if(!s)return a.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var l=We(e,this.registeredClass,u.registeredClass);return l===null?a.call(this):this.isSmartPointer?jt(u.registeredClass.instancePrototype,{ptrType:u,ptr:l,smartPtrType:this,smartPtr:t}):jt(u.registeredClass.instancePrototype,{ptrType:u,ptr:l})}var $t=t=>typeof FinalizationRegistry>"u"?($t=e=>e,t):(Qt=new FinalizationRegistry(e=>{Re(e.$$)}),$t=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Qt.register(e,a,e)}return e},Ie=e=>Qt.unregister(e),$t(t)),Cn=()=>{Object.assign(It.prototype,{isAliasOf(t){if(!(this instanceof It)||!(t instanceof It))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||qt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=$t(Object.create(Object.getPrototypeOf(this),{$$:{value:hn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||qt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Ie(this),Re(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||qt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),yt.push(this),yt.length===1&&gt&&gt(Zt),this.$$.deleteScheduled=!0,this}})};function It(){}var bt=(t,e)=>Object.defineProperty(e,"name",{value:t}),He=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Jt=(t,e,r)=>{c.hasOwnProperty(t)?((r===void 0||c[t].overloadTable!==void 0&&c[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),He(c,t,t),c.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[t].overloadTable[r]=e):(c[t]=e,r!==void 0&&(c[t].numArguments=r))},_n=48,Tn=57,Pn=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=_n&&e<=Tn?`_${t}`:t};function En(t,e,r,n,a,o,s,u){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=u,this.pureVirtualFunctions=[]}var Kt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function An(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ae(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Kt(e.$$.ptr,r,this.registeredClass);return n}function Dn(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&C(`Cannot pass "${ae(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Kt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,tt.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function On(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ae(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Kt(e.$$.ptr,r,this.registeredClass);return n}function Be(t){return this.fromWireType(T[t>>2])}var Fn=()=>{Object.assign(Rt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var e;(e=this.rawDestructor)===null||e===void 0||e.call(this,t)},argPackAdvance:Z,readValueFromPointer:Be,deleteObject(t){t!==null&&t.delete()},fromWireType:bn})};function Rt(t,e,r,n,a,o,s,u,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=u,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=An,this.destructorFunction=null):(this.toWireType=On,this.destructorFunction=null):this.toWireType=Dn}var Ue=(t,e,r)=>{c.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),c[t].overloadTable!==void 0&&r!==void 0?c[t].overloadTable[r]=e:(c[t]=e,c[t].argCount=r)},xn=(t,e,r)=>{var n=c["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Wt=[],Ve,A=t=>{var e=Wt[t];return e||(t>=Wt.length&&(Wt.length=t+1),Wt[t]=e=Ve.get(t)),e},Sn=(t,e,r)=>{if(t.includes("j"))return xn(t,e,r);var n=A(e).apply(null,r);return n},Mn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Sn(t,e,r)}},q=(t,e)=>{t=R(t);function r(){return t.includes("j")?Mn(t,e):A(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},jn=(t,e)=>{var r=bt(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Le,Ye=t=>{var e=tr(t),r=R(e);return et(e),r},kt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!it[o]){if(St[o]){St[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Le(`${t}: `+r.map(Ye).join([", "]))},In=(t,e,r,n,a,o,s,u,l,f,h,v,y)=>{h=R(h),o=q(a,o),u&&(u=q(s,u)),f&&(f=q(l,f)),y=q(v,y);var w=Pn(h);Jt(w,function(){kt(`Cannot construct ${h} due to unbound types`,[n])}),st([t,e,r],n?[n]:[],function(E){E=E[0];var F,_;n?(F=E.registeredClass,_=F.instancePrototype):_=It.prototype;var W=bt(h,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(m.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var ur=m.constructor_body[arguments.length];if(ur===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return ur.apply(this,arguments)}),d=Object.create(_,{constructor:{value:W}});W.prototype=d;var m=new En(h,W,d,y,F,o,u,f);if(m.baseClass){var x,j;(j=(x=m.baseClass).__derivedClasses)!==null&&j!==void 0||(x.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m)}var pt=new Rt(h,m,!0,!1,!1),Ut=new Rt(h+"*",m,!1,!1,!1),sr=new Rt(h+" const*",m,!1,!0,!1);return ke[t]={pointerType:Ut,constPointerType:sr},Ue(w,W),[pt,Ut,sr]})},te=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(T[e+n*4>>2]);return r};function Rn(t){for(var e=1;e<t.length;++e)if(t[e]!==null&&t[e].destructorFunction===void 0)return!0;return!1}function ee(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var u=e[1]!==null&&r!==null,l=Rn(e),f=e[0].name!=="void",h=s-2,v=new Array(h),y=[],w=[],E=function(){arguments.length!==h&&C(`function ${t} called with ${arguments.length} arguments, expected ${h}`),w.length=0;var F;y.length=u?2:1,y[0]=a,u&&(F=e[1].toWireType(w,this),y[1]=F);for(var _=0;_<h;++_)v[_]=e[_+2].toWireType(w,arguments[_]),y.push(v[_]);var W=n.apply(null,y);function d(m){if(l)Gt(w);else for(var x=u?1:2;x<e.length;x++){var j=x===1?F:v[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(j)}if(f)return e[0].fromWireType(m)}return d(W)};return bt(t,E)}var Wn=(t,e,r,n,a,o)=>{var s=te(e,r);a=q(n,a),st([],[t],function(u){u=u[0];var l=`constructor ${u.name}`;if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return u.registeredClass.constructor_body[e-1]=()=>{kt(`Cannot construct ${u.name} due to unbound types`,s)},st([],s,f=>(f.splice(1,0,null),u.registeredClass.constructor_body[e-1]=ee(l,f,null,a,o),[])),[]})},ze=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?t.substr(0,e):t},kn=(t,e,r,n,a,o,s,u,l)=>{var f=te(r,n);e=R(e),e=ze(e),o=q(a,o),st([],[t],function(h){h=h[0];var v=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&h.registeredClass.pureVirtualFunctions.push(e);function y(){kt(`Cannot call ${v} due to unbound types`,f)}var w=h.registeredClass.instancePrototype,E=w[e];return E===void 0||E.overloadTable===void 0&&E.className!==h.name&&E.argCount===r-2?(y.argCount=r-2,y.className=h.name,w[e]=y):(He(w,e,v),w[e].overloadTable[r-2]=y),st([],f,function(F){var _=ee(v,F,h,o,s);return w[e].overloadTable===void 0?(_.argCount=r-2,w[e]=_):w[e].overloadTable[r-2]=_,[]}),[]})};function Hn(){Object.assign(Ne.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Ne(){this.allocated=[void 0],this.freelist=[]}var N=new Ne,re=t=>{t>=N.reserved&&--N.get(t).refcount===0&&N.free(t)},Bn=()=>{for(var t=0,e=N.reserved;e<N.allocated.length;++e)N.allocated[e]!==void 0&&++t;return t},Un=()=>{N.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),N.reserved=N.allocated.length,c.count_emval_handles=Bn},tt={toValue:t=>(t||C("Cannot use deleted val. handle = "+t),N.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return N.allocate({refcount:1,value:t})}}},Vn=(t,e)=>{e=R(e),Q(t,{name:e,fromWireType:r=>{var n=tt.toValue(r);return re(r),n},toWireType:(r,n)=>tt.toHandle(n),argPackAdvance:Z,readValueFromPointer:Xt,destructorFunction:null})},Ln=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(L[n>>0])}:function(n){return this.fromWireType(U[n>>0])};case 2:return r?function(n){return this.fromWireType(lt[n>>1])}:function(n){return this.fromWireType(mt[n>>1])};case 4:return r?function(n){return this.fromWireType(k[n>>2])}:function(n){return this.fromWireType(T[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Yn=(t,e,r,n)=>{e=R(e);function a(){}a.values={},Q(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:Z,readValueFromPointer:Ln(e,r,n),destructorFunction:null}),Jt(e,a)},ne=(t,e)=>{var r=it[t];return r===void 0&&C(e+" has unknown type "+Ye(t)),r},zn=(t,e,r)=>{var n=ne(t,"enum");e=R(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:bt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},ae=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Nn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(Te[r>>2])};case 8:return function(r){return this.fromWireType(Pe[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Gn=(t,e,r)=>{e=R(e),Q(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:Z,readValueFromPointer:Nn(e,r),destructorFunction:null})},Xn=(t,e,r,n,a,o,s)=>{var u=te(e,r);t=R(t),t=ze(t),a=q(n,a),Jt(t,function(){kt(`Cannot call ${t} due to unbound types`,u)},e-1),st([],u,function(l){var f=[l[0],null].concat(l.slice(1));return Ue(t,ee(t,f,null,a,o),e-1),[]})},qn=(t,e,r)=>{switch(e){case 1:return r?n=>L[n>>0]:n=>U[n>>0];case 2:return r?n=>lt[n>>1]:n=>mt[n>>1];case 4:return r?n=>k[n>>2]:n=>T[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Qn=(t,e,r,n,a)=>{e=R(e);var o=h=>h;if(n===0){var s=32-8*r;o=h=>h<<s>>>s}var u=e.includes("unsigned"),l=(h,v)=>{},f;u?f=function(h,v){return l(v,this.name),v>>>0}:f=function(h,v){return l(v,this.name),v},Q(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:Z,readValueFromPointer:qn(e,r,n!==0),destructorFunction:null})},Zn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var u=T[s>>2],l=T[s+4>>2];return new a(L.buffer,l,u)}r=R(r),Q(t,{name:r,fromWireType:o,argPackAdvance:Z,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ge=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(u<=127){if(r>=o)break;e[r++]=u}else if(u<=2047){if(r+1>=o)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=o)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63}}return e[r]=0,r-a},Jn=(t,e,r)=>Ge(t,U,e,r),Xe=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},qe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Kn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&qe)return qe.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var u=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|u);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|u<<6|l:s=(s&7)<<18|u<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var f=s-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},oe=(t,e)=>t?Kn(U,t,e):"",ta=(t,e)=>{e=R(e);var r=e==="std::string";Q(t,{name:e,fromWireType(n){var a=T[n>>2],o=n+4,s;if(r)for(var u=o,l=0;l<=a;++l){var f=o+l;if(l==a||U[f]==0){var h=f-u,v=oe(u,h);s===void 0?s=v:(s+="\0",s+=v),u=f+1}}else{for(var y=new Array(a),l=0;l<a;++l)y[l]=String.fromCharCode(U[o+l]);s=y.join("")}return et(n),s},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,s=typeof a=="string";s||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&s?o=Xe(a):o=a.length;var u=ue(4+o+1),l=u+4;if(T[u>>2]=o,r&&s)Jn(a,l,o+1);else if(s)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(et(l),C("String has UTF-16 code units that do not fit in 8 bits")),U[l+f]=h}else for(var f=0;f<o;++f)U[l+f]=a[f];return n!==null&&n.push(et,u),u},argPackAdvance:Z,readValueFromPointer:Be,destructorFunction(n){et(n)}})},Qe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ea=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&mt[n];)++n;if(r=n<<1,r-t>32&&Qe)return Qe.decode(U.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var u=lt[t+s*2>>1];if(u==0)break;o+=String.fromCharCode(u)}return o},ra=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<2)return 0;r-=2;for(var a=e,o=r<t.length*2?r/2:t.length,s=0;s<o;++s){var u=t.charCodeAt(s);lt[e>>1]=u,e+=2}return lt[e>>1]=0,e-a},na=t=>t.length*2,aa=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=k[t+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},oa=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<4)return 0;for(var a=e,o=a+r-4,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(k[e>>2]=u,e+=4,e+4>o)break}return k[e>>2]=0,e-a},ia=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},sa=(t,e,r)=>{r=R(r);var n,a,o,s,u;e===2?(n=ea,a=ra,s=na,o=()=>mt,u=1):e===4&&(n=aa,a=oa,s=ia,o=()=>T,u=2),Q(t,{name:r,fromWireType:l=>{for(var f=T[l>>2],h=o(),v,y=l+4,w=0;w<=f;++w){var E=l+4+w*e;if(w==f||h[E>>u]==0){var F=E-y,_=n(y,F);v===void 0?v=_:(v+="\0",v+=_),y=E+e}}return et(l),v},toWireType:(l,f)=>{typeof f!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var h=s(f),v=ue(4+h+e);return T[v>>2]=h>>u,a(f,v+4,h+e),l!==null&&l.push(et,v),v},argPackAdvance:Z,readValueFromPointer:Xt,destructorFunction(l){et(l)}})},ua=(t,e,r,n,a,o)=>{xt[t]={name:R(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},ca=(t,e,r,n,a,o,s,u,l,f)=>{xt[t].fields.push({fieldName:R(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(u,l),setterContext:f})},la=(t,e)=>{e=R(e),Q(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},ie=[],da=(t,e,r,n)=>(t=ie[t],e=tt.toValue(e),t(null,e,r,n)),fa={},ha=t=>{var e=fa[t];return e===void 0?R(t):e},Ze=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},pa=t=>t===0?tt.toHandle(Ze()):(t=ha(t),tt.toHandle(Ze()[t])),ma=t=>{var e=ie.length;return ie.push(t),e},va=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=ne(T[e+n*4>>2],"parameter "+n);return r},ya=Reflect.construct,ga=(t,e,r)=>{var n=[],a=t.toWireType(n,r);return n.length&&(T[e>>2]=tt.toHandle(n)),a},wa=(t,e,r)=>{var n=va(t,e),a=n.shift();t--;var o=new Array(t),s=(l,f,h,v)=>{for(var y=0,w=0;w<t;++w)o[w]=n[w].readValueFromPointer(v+y),y+=n[w].argPackAdvance;for(var E=r===1?ya(f,o):f.apply(l,o),w=0;w<t;++w){var F,_;(F=(_=n[w]).deleteObject)===null||F===void 0||F.call(_,o[w])}return ga(a,h,E)},u=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return ma(bt(u,s))},$a=t=>{t>4&&(N.get(t).refcount+=1)},ba=t=>{var e=tt.toValue(t);Gt(e),re(t)},Ca=(t,e)=>{t=ne(t,"_emval_take_value");var r=t.readValueFromPointer(e);return tt.toHandle(r)},_a=()=>{Dt("")},Ta=(t,e,r)=>U.copyWithin(t,e,e+r),Pa=()=>2147483648,Ea=t=>{var e=at.buffer,r=(t-e.byteLength+65535)/65536;try{return at.grow(r),Ee(),1}catch{}},Aa=t=>{var e=U.length;t>>>=0;var r=Pa();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var s=Math.min(r,n(Math.max(t,o),65536)),u=Ea(s);if(u)return!0}return!1},se={},Da=()=>V||"./this.program",Ct=()=>{if(!Ct.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Da()};for(var r in se)se[r]===void 0?delete e[r]:e[r]=se[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Ct.strings=n}return Ct.strings},Oa=(t,e)=>{for(var r=0;r<t.length;++r)L[e++>>0]=t.charCodeAt(r);L[e>>0]=0},Fa=(t,e)=>{var r=0;return Ct().forEach((n,a)=>{var o=e+r;T[t+a*4>>2]=o,Oa(n,o),r+=n.length+1}),0},xa=(t,e)=>{var r=Ct();T[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),T[e>>2]=n,0},Sa=t=>t,Ht=t=>t%4===0&&(t%100!==0||t%400===0),Ma=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Je=[31,29,31,30,31,30,31,31,30,31,30,31],Ke=[31,28,31,30,31,30,31,31,30,31,30,31],ja=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ht(r.getFullYear()),a=r.getMonth(),o=(n?Je:Ke)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function Ia(t,e,r){var n=r>0?r:Xe(t)+1,a=new Array(n),o=Ge(t,a,0,a.length);return e&&(a.length=o),a}var Ra=(t,e)=>{L.set(t,e)},Wa=(t,e,r,n)=>{var a=T[n+40>>2],o={tm_sec:k[n>>2],tm_min:k[n+4>>2],tm_hour:k[n+8>>2],tm_mday:k[n+12>>2],tm_mon:k[n+16>>2],tm_year:k[n+20>>2],tm_wday:k[n+24>>2],tm_yday:k[n+28>>2],tm_isdst:k[n+32>>2],tm_gmtoff:k[n+36>>2],tm_zone:a?oe(a):""},s=oe(r),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in u)s=s.replace(new RegExp(l,"g"),u[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function v(d,m,x){for(var j=typeof d=="number"?d.toString():d||"";j.length<m;)j=x[0]+j;return j}function y(d,m){return v(d,m,"0")}function w(d,m){function x(pt){return pt<0?-1:pt>0?1:0}var j;return(j=x(d.getFullYear()-m.getFullYear()))===0&&(j=x(d.getMonth()-m.getMonth()))===0&&(j=x(d.getDate()-m.getDate())),j}function E(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function F(d){var m=ja(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),j=new Date(m.getFullYear()+1,0,4),pt=E(x),Ut=E(j);return w(pt,m)<=0?w(Ut,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var _={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return y(m/100|0,2)},"%d":d=>y(d.tm_mday,2),"%e":d=>v(d.tm_mday,2," "),"%g":d=>F(d).toString().substring(2),"%G":d=>F(d),"%H":d=>y(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),y(m,2)},"%j":d=>y(d.tm_mday+Ma(Ht(d.tm_year+1900)?Je:Ke,d.tm_mon-1),3),"%m":d=>y(d.tm_mon+1,2),"%M":d=>y(d.tm_min,2),"%n":()=>`
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>y(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return y(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Ht(d.tm_year))&&(m=1)}}else{m=52;var j=(d.tm_wday+7-d.tm_yday-1)%7;(j==4||j==5&&Ht(d.tm_year%400-1))&&m++}return y(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return y(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in _)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),_[l](o)));s=s.replace(/\0\0/g,"%");var W=Ia(s,!1);return W.length>e?0:(Ra(W,t),W.length-1)},ka=(t,e,r,n,a)=>Wa(t,e,r,n);Me=c.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},ln(),ht=c.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Cn(),gn(),Fn(),Le=c.UnboundTypeError=jn(Error,"UnboundTypeError"),Hn(),Un();var Ha={s:Jr,u:Kr,b:en,g:rn,q:nn,K:an,f:on,W:sn,d:tn,da:un,S:cn,_:fn,ca:In,ba:Wn,w:kn,Z:Vn,x:Yn,h:zn,N:Gn,O:Xn,t:Qn,o:Zn,M:ta,C:sa,A:ua,ea:ca,$:la,E:da,ga:re,ha:pa,L:wa,P:$a,Q:ba,aa:Ca,B:_a,Y:Ta,X:Aa,U:Fa,V:xa,F:eo,D:Ya,G:to,n:ro,a:Ba,e:Na,m:La,k:Xa,I:Ja,v:Qa,H:Ka,z:ao,R:io,l:Ga,j:za,c:Va,p:Ua,J:Za,r:no,i:qa,y:oo,fa:Sa,T:ka},M=Zr(),et=c._free=t=>(et=c._free=M.ka)(t),ue=c._malloc=t=>(ue=c._malloc=M.la)(t),tr=t=>(tr=M.na)(t),P=(t,e)=>(P=M.oa)(t,e),_t=t=>(_t=M.pa)(t),D=()=>(D=M.qa)(),O=t=>(O=M.ra)(t),er=t=>(er=M.sa)(t),rr=t=>(rr=M.ta)(t),nr=(t,e,r)=>(nr=M.ua)(t,e,r),ar=t=>(ar=M.va)(t);c.dynCall_viijii=(t,e,r,n,a,o,s)=>(c.dynCall_viijii=M.wa)(t,e,r,n,a,o,s);var or=c.dynCall_jiiii=(t,e,r,n,a)=>(or=c.dynCall_jiiii=M.xa)(t,e,r,n,a);c.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(c.dynCall_iiiiij=M.ya)(t,e,r,n,a,o,s),c.dynCall_iiiiijj=(t,e,r,n,a,o,s,u,l)=>(c.dynCall_iiiiijj=M.za)(t,e,r,n,a,o,s,u,l),c.dynCall_iiiiiijj=(t,e,r,n,a,o,s,u,l,f)=>(c.dynCall_iiiiiijj=M.Aa)(t,e,r,n,a,o,s,u,l,f);function Ba(t,e){var r=D();try{return A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Ua(t,e,r,n){var a=D();try{A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function Va(t,e,r){var n=D();try{A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function La(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function Ya(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function za(t,e){var r=D();try{A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Na(t,e,r){var n=D();try{return A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function Ga(t){var e=D();try{A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function Xa(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function qa(t,e,r,n,a,o,s,u,l,f,h){var v=D();try{A(t)(e,r,n,a,o,s,u,l,f,h)}catch(y){if(O(v),y!==y+0)throw y;P(1,0)}}function Qa(t,e,r,n,a,o,s){var u=D();try{return A(t)(e,r,n,a,o,s)}catch(l){if(O(u),l!==l+0)throw l;P(1,0)}}function Za(t,e,r,n,a){var o=D();try{A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Ja(t,e,r,n,a,o){var s=D();try{return A(t)(e,r,n,a,o)}catch(u){if(O(s),u!==u+0)throw u;P(1,0)}}function Ka(t,e,r,n,a,o,s,u){var l=D();try{return A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function to(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function eo(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function ro(t){var e=D();try{return A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function no(t,e,r,n,a,o,s,u){var l=D();try{A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function ao(t,e,r,n,a,o,s,u,l,f,h,v){var y=D();try{return A(t)(e,r,n,a,o,s,u,l,f,h,v)}catch(w){if(O(y),w!==w+0)throw w;P(1,0)}}function oo(t,e,r,n,a,o,s,u,l,f,h,v,y,w,E,F){var _=D();try{A(t)(e,r,n,a,o,s,u,l,f,h,v,y,w,E,F)}catch(W){if(O(_),W!==W+0)throw W;P(1,0)}}function io(t,e,r,n,a){var o=D();try{return or(t,e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}var Bt;vt=function t(){Bt||ir(),Bt||(vt=t)};function ir(){if(ot>0||(Br(),ot>0))return;function t(){Bt||(Bt=!0,c.calledRun=!0,!At&&(Ur(),$(c),c.onRuntimeInitialized&&c.onRuntimeInitialized(),Vr()))}c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},1),t()},1)):t()}if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();return ir(),p.ready}})();function Cr(i){return Lt(Pt,i)}function _r(i){return wr(Pt,i)}async function Tr(i,p){return $r(Pt,i,p)}async function Pr(i,p){return br(Pt,i,p)}const he=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["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"]],Er=[...he,["unknown"]].map(i=>i[0]),Et=new Map(he);function Ar(i){for(const[p,c]of Et)if(i===c)return p;return"unknown"}function Dr(i){if(pe(i))return{width:i.naturalWidth,height:i.naturalHeight};if(me(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ve(i))return{width:i.videoWidth,height:i.videoHeight};if(ge(i))return{width:i.width,height:i.height};if($e(i))return{width:i.displayWidth,height:i.displayHeight};if(ye(i))return{width:i.width,height:i.height};if(we(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 pe(i){try{return i instanceof HTMLImageElement}catch{return!1}}function me(i){try{return i instanceof SVGImageElement}catch{return!1}}function ve(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function ye(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function ge(i){try{return i instanceof ImageBitmap}catch{return!1}}function we(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function $e(i){try{return i instanceof VideoFrame}catch{return!1}}function be(i){try{return i instanceof Blob}catch{return!1}}function Or(i){try{return i instanceof ImageData}catch{return!1}}function Fr(i,p){try{const c=new OffscreenCanvas(i,p);if(c.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return c;throw void 0}catch{const c=document.createElement("canvas");return c.width=i,c.height=p,c}}async function Ce(i){if(pe(i)&&!await jr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(me(i)&&!await Ir(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if($e(i)&&Rr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ve(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ge(i)&&kr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:p,height:c}=Dr(i);if(p===0||c===0)return null;const g=Fr(p,c).getContext("2d");g.drawImage(i,0,0);try{return g.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function xr(i){let p;try{if(globalThis.createImageBitmap)p=await createImageBitmap(i);else if(globalThis.Image){p=new Image;let $="";try{$=URL.createObjectURL(i),p.src=$,await p.decode()}finally{URL.revokeObjectURL($)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Ce(p)}function Sr(i){const{width:p,height:c}=i;if(p===0||c===0)return null;const $=i.getContext("2d");try{return $.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Mr(i){if(be(i))return await xr(i);if(Or(i)){if(Wr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ye(i)||we(i)?Sr(i):await Ce(i)}async function jr(i){try{return await i.decode(),!0}catch{return!1}}async function Ir(i){var p;try{return await((p=i.decode)==null?void 0:p.call(i)),!0}catch{return!1}}function Rr(i){return i.format===null}function Wr(i){return i.data.buffer.byteLength===0}function kr(i){return i.width===0&&i.height===0}function _e(i,p){return i instanceof DOMException?new DOMException(`${p}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${p}: ${i.message}`):new Error(`${p}: ${i}`)}class Hr extends EventTarget{constructor(c={}){var $;super();lr(this,ct,void 0);try{const g=($=c==null?void 0:c.formats)==null?void 0:$.filter(b=>b!=="unknown");if((g==null?void 0:g.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const b of g!=null?g:[])if(!Et.has(b))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${b}' is not a valid enum value of type BarcodeFormat.`);dr(this,ct,g!=null?g:[]),Cr().then(b=>{this.dispatchEvent(new CustomEvent("load",{detail:b}))}).catch(b=>{this.dispatchEvent(new CustomEvent("error",{detail:b}))})}catch(g){throw _e(g,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Er.filter(c=>c!=="unknown")}async detect(c){try{const $=await Mr(c);if($===null)return[];let g;try{be($)?g=await Tr($,{tryHarder:!0,formats:ce(this,ct).map(b=>Et.get(b))}):g=await Pr($,{tryHarder:!0,formats:ce(this,ct).map(b=>Et.get(b))})}catch(b){throw console.error(b),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return g.map(b=>{const{topLeft:{x:V,y:z},topRight:{x:G,y:B},bottomLeft:{x:S,y:rt},bottomRight:{x:X,y:J}}=b.position,nt=Math.min(V,G,S,X),at=Math.min(z,B,rt,J),At=Math.max(V,G,S,X),L=Math.max(z,B,rt,J);return{boundingBox:new DOMRectReadOnly(nt,at,At-nt,L-at),rawValue:b.text,format:Ar(b.format),cornerPoints:[{x:V,y:z},{x:G,y:B},{x:X,y:J},{x:S,y:rt}]}})}catch($){throw _e($,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ct=new WeakMap,I.BarcodeDetector=Hr,I.setZXingModuleOverrides=_r,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"}),I}({});

@@ -1,3 +0,3 @@

var BarcodeDetectionAPI=function(W){"use strict";var ur=(W,B,z)=>{if(!B.has(W))throw TypeError("Cannot "+z)};var se=(W,B,z)=>(ur(W,B,"read from private field"),z?z.call(W):B.get(W)),cr=(W,B,z)=>{if(B.has(W))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(W):B.set(W,z)},lr=(W,B,z,nt)=>(ur(W,B,"write to private field"),nt?nt.call(W,z):B.set(W,z),z);var ct,Ce;const B=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["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"]],z=[...B,["unknown"]].map(i=>i[0]),nt=new Map(B);function dr(i){for(const[p,c]of nt)if(i===c)return p;return"unknown"}function fr(i){if(ue(i))return{width:i.naturalWidth,height:i.naturalHeight};if(ce(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(le(i))return{width:i.videoWidth,height:i.videoHeight};if(fe(i))return{width:i.width,height:i.height};if(pe(i))return{width:i.displayWidth,height:i.displayHeight};if(de(i))return{width:i.width,height:i.height};if(he(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 ue(i){try{return i instanceof HTMLImageElement}catch{return!1}}function ce(i){try{return i instanceof SVGImageElement}catch{return!1}}function le(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function de(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function fe(i){try{return i instanceof ImageBitmap}catch{return!1}}function he(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function pe(i){try{return i instanceof VideoFrame}catch{return!1}}function me(i){try{return i instanceof Blob}catch{return!1}}function hr(i){try{return i instanceof ImageData}catch{return!1}}function pr(i,p){try{const c=new OffscreenCanvas(i,p);if(c.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return c;throw void 0}catch{const c=document.createElement("canvas");return c.width=i,c.height=p,c}}async function ve(i){if(ue(i)&&!await gr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ce(i)&&!await wr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(pe(i)&&$r(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(le(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(fe(i)&&Cr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:p,height:c}=fr(i);if(p===0||c===0)return null;const g=pr(p,c).getContext("2d");g.drawImage(i,0,0);try{return g.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function mr(i){let p;try{if(globalThis.createImageBitmap)p=await createImageBitmap(i);else if(globalThis.Image){p=new Image;let $="";try{$=URL.createObjectURL(i),p.src=$,await p.decode()}finally{URL.revokeObjectURL($)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ve(p)}function vr(i){const{width:p,height:c}=i;if(p===0||c===0)return null;const $=i.getContext("2d");try{return $.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function yr(i){if(me(i))return await mr(i);if(hr(i)){if(br(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return de(i)||he(i)?vr(i):await ve(i)}async function gr(i){try{return await i.decode(),!0}catch{return!1}}async function wr(i){var p;try{return await((p=i.decode)==null?void 0:p.call(i)),!0}catch{return!1}}function $r(i){return i.format===null}function br(i){return i.data.buffer.byteLength===0}function Cr(i){return i.width===0&&i.height===0}function ye(i,p){return i instanceof DOMException?new DOMException(`${p}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${p}: ${i.message}`):new Error(`${p}: ${i}`)}const ge=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Tr(i){return i.join("|")}function _r(i){const p=we(i);let c=0,$=ge.length-1;for(;c<=$;){const g=Math.floor((c+$)/2),b=ge[g],U=we(b);if(U===p)return b;U<p?c=g+1:$=g-1}return"None"}function we(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function Pr(i,p){return i.Binarizer[p]}function Er(i,p){return i.CharacterSet[p]}const Ar=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Dr(i){return Ar[i.value]}function Or(i,p){return i.EanAddOnSymbol[p]}function Fr(i,p){return i.TextMode[p]}const ut={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function $e(i,p){return{...p,formats:Tr(p.formats),binarizer:Pr(i,p.binarizer),eanAddOnSymbol:Or(i,p.eanAddOnSymbol),textMode:Fr(i,p.textMode),characterSet:Er(i,p.characterSet)}}function be(i){return{...i,format:_r(i.format),eccLevel:i.eccLevel,contentType:Dr(i.contentType)}}const xr={locateFile:(i,p)=>{const c=i.match(/_(.+?)\.wasm$/);return c?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${c[1]}/${i}`:p+i}};let Bt=new WeakMap;function Ut(i,p){var c;const $=Bt.get(i);if($!=null&&$.modulePromise&&(p===void 0||Object.is(p,$.moduleOverrides)))return $.modulePromise;const g=(c=p!=null?p:$==null?void 0:$.moduleOverrides)!=null?c:xr,b=i({...g});return Bt.set(i,{moduleOverrides:g,modulePromise:b}),b}function Sr(i,p){Bt.set(i,{moduleOverrides:p})}async function Mr(i,p,c=ut){const $={...ut,...c},g=await Ut(i),{size:b}=p,U=new Uint8Array(await p.arrayBuffer()),N=g._malloc(b);g.HEAPU8.set(U,N);const V=g.readBarcodesFromImage(N,b,$e(g,$));g._free(N);const S=[];for(let G=0;G<V.size();++G)S.push(be(V.get(G)));return S}async function jr(i,p,c=ut){const $={...ut,...c},g=await Ut(i),{data:b,width:U,height:N,data:{byteLength:V}}=p,S=g._malloc(V);g.HEAPU8.set(b,S);const G=g.readBarcodesFromPixmap(S,U,N,$e(g,$));g._free(S);const Q=[];for(let L=0;L<G.size();++L)Q.push(be(G.get(L)));return Q}({...ut,formats:[...ut.formats]});var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(p={}){var c=p,$,g;c.ready=new Promise((t,e)=>{$=t,g=e});var b=Object.assign({},c),U="./this.program",N=typeof window=="object",V=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var S="";function G(t){return c.locateFile?c.locateFile(t,S):S+t}var Q;(N||V)&&(V?S=self.location.href:typeof document<"u"&&document.currentScript&&(S=document.currentScript.src),i&&(S=i),S.indexOf("blob:")!==0?S=S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):S="",V&&(Q=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),c.print||console.log.bind(console);var L=c.printErr||console.error.bind(console);Object.assign(c,b),b=null,c.arguments&&c.arguments,c.thisProgram&&(U=c.thisProgram),c.quit&&c.quit;var K;c.wasmBinary&&(K=c.wasmBinary),typeof WebAssembly!="object"&&Et("no native wasm support detected");var at,mt=!1,Y,k,lt,vt,H,_,Te,_e;function Pe(){var t=at.buffer;c.HEAP8=Y=new Int8Array(t),c.HEAP16=lt=new Int16Array(t),c.HEAPU8=k=new Uint8Array(t),c.HEAPU16=vt=new Uint16Array(t),c.HEAP32=H=new Int32Array(t),c.HEAPU32=_=new Uint32Array(t),c.HEAPF32=Te=new Float32Array(t),c.HEAPF64=_e=new Float64Array(t)}var Ee=[],Ae=[],De=[];function Br(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)Lr(c.preRun.shift());Vt(Ee)}function Ur(){Vt(Ae)}function Vr(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)zr(c.postRun.shift());Vt(De)}function Lr(t){Ee.unshift(t)}function Yr(t){Ae.unshift(t)}function zr(t){De.unshift(t)}var ot=0,yt=null;function Nr(t){var e;ot++,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot)}function Gr(t){var e;if(ot--,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot),ot==0&&yt){var r=yt;yt=null,r()}}function Et(t){var e;(e=c.onAbort)===null||e===void 0||e.call(c,t),t="Aborted("+t+")",L(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw g(r),r}var Xr="data:application/octet-stream;base64,",Oe=t=>t.startsWith(Xr),dt;dt="zxing_reader.wasm",Oe(dt)||(dt=G(dt));function Fe(t){if(t==dt&&K)return new Uint8Array(K);if(Q)return Q(t);throw"both async and sync fetching of the wasm failed"}function qr(t){return!K&&(N||V)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Fe(t)):Promise.resolve().then(()=>Fe(t))}function xe(t,e,r){return qr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L(`failed to asynchronously prepare wasm: ${n}`),Et(n)})}function Qr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Oe(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return L(`wasm streaming compile failed: ${s}`),L("falling back to ArrayBuffer instantiation"),xe(e,r,n)})}):xe(e,r,n)}function Zr(){var t={a:Ha};function e(n,a){return M=n.exports,at=M.ia,Pe(),Ue=M.ma,Yr(M.ja),Gr(),M}Nr();function r(n){e(n.instance)}if(c.instantiateWasm)try{return c.instantiateWasm(t,e)}catch(n){L(`Module.instantiateWasm callback failed with error: ${n}`),g(n)}return Qr(K,dt,t,r).catch(g),{}}var Vt=t=>{for(;t.length>0;)t.shift()(c)};c.noExitRuntime;var At=[],Dt=0,Jr=t=>{var e=new Lt(t);return e.get_caught()||(e.set_caught(!0),Dt--),e.set_rethrown(!1),At.push(e),er(e.excPtr),e.get_exception_ptr()},tt=0,Kr=()=>{P(0,0);var t=At.pop();tr(t.excPtr),tt=0};function Lt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Y[this.ptr+12>>0]=e},this.get_caught=function(){return Y[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Y[this.ptr+13>>0]=e},this.get_rethrown=function(){return Y[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=nr(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var tn=t=>{throw tt||(tt=t),tt},Yt=t=>{var e=tt;if(!e)return _t(0),0;var r=new Lt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return _t(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(rr(o,n,s))return _t(o),e}return _t(n),e},en=()=>Yt([]),rn=t=>Yt([t]),nn=(t,e)=>Yt([t,e]),an=()=>{var t=At.pop();t||Et("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(At.push(t),t.set_rethrown(!0),t.set_caught(!1),Dt++),tt=e,tt},on=(t,e,r)=>{var n=new Lt(t);throw n.init(e,r),tt=t,Dt++,tt},sn=()=>Dt,Ot={},zt=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Nt(t){return this.fromWireType(H[t>>2])}var ft={},it={},Ft={},Se,xt=t=>{throw new Se(t)},st=(t,e,r)=>{t.forEach(function(u){Ft[u]=e});function n(u){var l=r(u);l.length!==t.length&&xt("Mismatched type converter count");for(var f=0;f<t.length;++f)Z(t[f],l[f])}var a=new Array(e.length),o=[],s=0;e.forEach((u,l)=>{it.hasOwnProperty(u)?a[l]=it[u]:(o.push(u),ft.hasOwnProperty(u)||(ft[u]=[]),ft[u].push(()=>{a[l]=it[u],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},un=t=>{var e=Ot[t];delete Ot[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));st([t],o,s=>{var u={};return a.forEach((l,f)=>{var h=l.fieldName,v=s[f],y=l.getter,w=l.getterContext,E=s[f+a.length],F=l.setter,T=l.setterContext;u[h]={read:R=>v.fromWireType(y(w,R)),write:(R,d)=>{var m=[];F(T,R,E.toWireType(m,d)),zt(m)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in u)f[h]=u[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in u)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var v=r();for(h in u)u[h].write(v,f[h]);return l!==null&&l.push(n,v),v},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:n}]})},cn=(t,e,r,n,a)=>{},ln=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Me=t},Me,I=t=>{for(var e="",r=t;k[r];)e+=Me[k[r++]];return e},ht,C=t=>{throw new ht(t)};function dn(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(it[t]=e,delete Ft[t],ft.hasOwnProperty(t)){var a=ft[t];delete ft[t],a.forEach(o=>o())}}function Z(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return dn(t,e,r)}var J=8,fn=(t,e,r,n)=>{e=I(e),Z(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:J,readValueFromPointer:function(a){return this.fromWireType(k[a])},destructorFunction:null})},hn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Gt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Xt=!1,je=t=>{},pn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Ie=t=>{t.count.value-=1;var e=t.count.value===0;e&&pn(t)},Re=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Re(t,e,r.baseClass);return n===null?null:r.downcast(n)},We={},mn=()=>Object.keys($t).length,vn=()=>{var t=[];for(var e in $t)$t.hasOwnProperty(e)&&t.push($t[e]);return t},gt=[],qt=()=>{for(;gt.length;){var t=gt.pop();t.$$.deleteScheduled=!1,t.delete()}},wt,yn=t=>{wt=t,gt.length&&wt&&wt(qt)},gn=()=>{c.getInheritedInstanceCount=mn,c.getLiveInheritedInstances=vn,c.flushPendingDeletes=qt,c.setDelayFunction=yn},$t={},wn=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},$n=(t,e)=>(e=wn(t,e),$t[e]),St=(t,e)=>{(!e.ptrType||!e.ptr)&&xt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&xt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},bt(Object.create(t,{$$:{value:e,writable:!0}}))};function bn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=$n(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?St(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):St(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),s=We[o];if(!s)return a.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var l=Re(e,this.registeredClass,u.registeredClass);return l===null?a.call(this):this.isSmartPointer?St(u.registeredClass.instancePrototype,{ptrType:u,ptr:l,smartPtrType:this,smartPtr:t}):St(u.registeredClass.instancePrototype,{ptrType:u,ptr:l})}var bt=t=>typeof FinalizationRegistry>"u"?(bt=e=>e,t):(Xt=new FinalizationRegistry(e=>{Ie(e.$$)}),bt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Xt.register(e,a,e)}return e},je=e=>Xt.unregister(e),bt(t)),Cn=()=>{Object.assign(Mt.prototype,{isAliasOf(t){if(!(this instanceof Mt)||!(t instanceof Mt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=bt(Object.create(Object.getPrototypeOf(this),{$$:{value:hn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),je(this),Ie(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),gt.push(this),gt.length===1&&wt&&wt(qt),this.$$.deleteScheduled=!0,this}})};function Mt(){}var Ct=(t,e)=>Object.defineProperty(e,"name",{value:t}),ke=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Qt=(t,e,r)=>{c.hasOwnProperty(t)?((r===void 0||c[t].overloadTable!==void 0&&c[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),ke(c,t,t),c.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[t].overloadTable[r]=e):(c[t]=e,r!==void 0&&(c[t].numArguments=r))},Tn=48,_n=57,Pn=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Tn&&e<=_n?`_${t}`:t};function En(t,e,r,n,a,o,s,u){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=u,this.pureVirtualFunctions=[]}var Zt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function An(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function Dn(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Zt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,et.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function On(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${re(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Zt(e.$$.ptr,r,this.registeredClass);return n}function He(t){return this.fromWireType(_[t>>2])}var Fn=()=>{Object.assign(jt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var e;(e=this.rawDestructor)===null||e===void 0||e.call(this,t)},argPackAdvance:J,readValueFromPointer:He,deleteObject(t){t!==null&&t.delete()},fromWireType:bn})};function jt(t,e,r,n,a,o,s,u,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=u,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=An,this.destructorFunction=null):(this.toWireType=On,this.destructorFunction=null):this.toWireType=Dn}var Be=(t,e,r)=>{c.hasOwnProperty(t)||xt("Replacing nonexistant public symbol"),c[t].overloadTable!==void 0&&r!==void 0?c[t].overloadTable[r]=e:(c[t]=e,c[t].argCount=r)},xn=(t,e,r)=>{var n=c["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Ue,A=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Ue.get(t)),e},Sn=(t,e,r)=>{if(t.includes("j"))return xn(t,e,r);var n=A(e).apply(null,r);return n},Mn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Sn(t,e,r)}},q=(t,e)=>{t=I(t);function r(){return t.includes("j")?Mn(t,e):A(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},jn=(t,e)=>{var r=Ct(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ve,Le=t=>{var e=Ke(t),r=I(e);return rt(e),r},Rt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!it[o]){if(Ft[o]){Ft[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ve(`${t}: `+r.map(Le).join([", "]))},In=(t,e,r,n,a,o,s,u,l,f,h,v,y)=>{h=I(h),o=q(a,o),u&&(u=q(s,u)),f&&(f=q(l,f)),y=q(v,y);var w=Pn(h);Qt(w,function(){Rt(`Cannot construct ${h} due to unbound types`,[n])}),st([t,e,r],n?[n]:[],function(E){E=E[0];var F,T;n?(F=E.registeredClass,T=F.instancePrototype):T=Mt.prototype;var R=Ct(h,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(m.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var sr=m.constructor_body[arguments.length];if(sr===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return sr.apply(this,arguments)}),d=Object.create(T,{constructor:{value:R}});R.prototype=d;var m=new En(h,R,d,y,F,o,u,f);if(m.baseClass){var x,j;(j=(x=m.baseClass).__derivedClasses)!==null&&j!==void 0||(x.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m)}var pt=new jt(h,m,!0,!1,!1),Ht=new jt(h+"*",m,!1,!1,!1),ir=new jt(h+" const*",m,!1,!0,!1);return We[t]={pointerType:Ht,constPointerType:ir},Be(w,R),[pt,Ht,ir]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Rn(t){for(var e=1;e<t.length;++e)if(t[e]!==null&&t[e].destructorFunction===void 0)return!0;return!1}function Kt(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var u=e[1]!==null&&r!==null,l=Rn(e),f=e[0].name!=="void",h=s-2,v=new Array(h),y=[],w=[],E=function(){arguments.length!==h&&C(`function ${t} called with ${arguments.length} arguments, expected ${h}`),w.length=0;var F;y.length=u?2:1,y[0]=a,u&&(F=e[1].toWireType(w,this),y[1]=F);for(var T=0;T<h;++T)v[T]=e[T+2].toWireType(w,arguments[T]),y.push(v[T]);var R=n.apply(null,y);function d(m){if(l)zt(w);else for(var x=u?1:2;x<e.length;x++){var j=x===1?F:v[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(j)}if(f)return e[0].fromWireType(m)}return d(R)};return Ct(t,E)}var Wn=(t,e,r,n,a,o)=>{var s=Jt(e,r);a=q(n,a),st([],[t],function(u){u=u[0];var l=`constructor ${u.name}`;if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return u.registeredClass.constructor_body[e-1]=()=>{Rt(`Cannot construct ${u.name} due to unbound types`,s)},st([],s,f=>(f.splice(1,0,null),u.registeredClass.constructor_body[e-1]=Kt(l,f,null,a,o),[])),[]})},Ye=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?t.substr(0,e):t},kn=(t,e,r,n,a,o,s,u,l)=>{var f=Jt(r,n);e=I(e),e=Ye(e),o=q(a,o),st([],[t],function(h){h=h[0];var v=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&h.registeredClass.pureVirtualFunctions.push(e);function y(){Rt(`Cannot call ${v} due to unbound types`,f)}var w=h.registeredClass.instancePrototype,E=w[e];return E===void 0||E.overloadTable===void 0&&E.className!==h.name&&E.argCount===r-2?(y.argCount=r-2,y.className=h.name,w[e]=y):(ke(w,e,v),w[e].overloadTable[r-2]=y),st([],f,function(F){var T=Kt(v,F,h,o,s);return w[e].overloadTable===void 0?(T.argCount=r-2,w[e]=T):w[e].overloadTable[r-2]=T,[]}),[]})};function Hn(){Object.assign(ze.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function ze(){this.allocated=[void 0],this.freelist=[]}var X=new ze,te=t=>{t>=X.reserved&&--X.get(t).refcount===0&&X.free(t)},Bn=()=>{for(var t=0,e=X.reserved;e<X.allocated.length;++e)X.allocated[e]!==void 0&&++t;return t},Un=()=>{X.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),X.reserved=X.allocated.length,c.count_emval_handles=Bn},et={toValue:t=>(t||C("Cannot use deleted val. handle = "+t),X.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return X.allocate({refcount:1,value:t})}}},Vn=(t,e)=>{e=I(e),Z(t,{name:e,fromWireType:r=>{var n=et.toValue(r);return te(r),n},toWireType:(r,n)=>et.toHandle(n),argPackAdvance:J,readValueFromPointer:Nt,destructorFunction:null})},Ln=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(Y[n>>0])}:function(n){return this.fromWireType(k[n>>0])};case 2:return r?function(n){return this.fromWireType(lt[n>>1])}:function(n){return this.fromWireType(vt[n>>1])};case 4:return r?function(n){return this.fromWireType(H[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Yn=(t,e,r,n)=>{e=I(e);function a(){}a.values={},Z(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:J,readValueFromPointer:Ln(e,r,n),destructorFunction:null}),Qt(e,a)},ee=(t,e)=>{var r=it[t];return r===void 0&&C(e+" has unknown type "+Le(t)),r},zn=(t,e,r)=>{var n=ee(t,"enum");e=I(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Ct(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},re=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Nn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(Te[r>>2])};case 8:return function(r){return this.fromWireType(_e[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Gn=(t,e,r)=>{e=I(e),Z(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:J,readValueFromPointer:Nn(e,r),destructorFunction:null})},Xn=(t,e,r,n,a,o,s)=>{var u=Jt(e,r);t=I(t),t=Ye(t),a=q(n,a),Qt(t,function(){Rt(`Cannot call ${t} due to unbound types`,u)},e-1),st([],u,function(l){var f=[l[0],null].concat(l.slice(1));return Be(t,Kt(t,f,null,a,o),e-1),[]})},qn=(t,e,r)=>{switch(e){case 1:return r?n=>Y[n>>0]:n=>k[n>>0];case 2:return r?n=>lt[n>>1]:n=>vt[n>>1];case 4:return r?n=>H[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Qn=(t,e,r,n,a)=>{e=I(e);var o=h=>h;if(n===0){var s=32-8*r;o=h=>h<<s>>>s}var u=e.includes("unsigned"),l=(h,v)=>{},f;u?f=function(h,v){return l(v,this.name),v>>>0}:f=function(h,v){return l(v,this.name),v},Z(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:J,readValueFromPointer:qn(e,r,n!==0),destructorFunction:null})},Zn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var u=_[s>>2],l=_[s+4>>2];return new a(Y.buffer,l,u)}r=I(r),Z(t,{name:r,fromWireType:o,argPackAdvance:J,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ne=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(u<=127){if(r>=o)break;e[r++]=u}else if(u<=2047){if(r+1>=o)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=o)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63}}return e[r]=0,r-a},Jn=(t,e,r)=>Ne(t,k,e,r),Ge=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Xe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Kn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Xe)return Xe.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var u=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|u);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|u<<6|l:s=(s&7)<<18|u<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var f=s-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},ne=(t,e)=>t?Kn(k,t,e):"",ta=(t,e)=>{e=I(e);var r=e==="std::string";Z(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var u=o,l=0;l<=a;++l){var f=o+l;if(l==a||k[f]==0){var h=f-u,v=ne(u,h);s===void 0?s=v:(s+="\0",s+=v),u=f+1}}else{for(var y=new Array(a),l=0;l<a;++l)y[l]=String.fromCharCode(k[o+l]);s=y.join("")}return rt(n),s},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,s=typeof a=="string";s||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&s?o=Ge(a):o=a.length;var u=ie(4+o+1),l=u+4;if(_[u>>2]=o,r&&s)Jn(a,l,o+1);else if(s)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(rt(l),C("String has UTF-16 code units that do not fit in 8 bits")),k[l+f]=h}else for(var f=0;f<o;++f)k[l+f]=a[f];return n!==null&&n.push(rt,u),u},argPackAdvance:J,readValueFromPointer:He,destructorFunction(n){rt(n)}})},qe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ea=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&vt[n];)++n;if(r=n<<1,r-t>32&&qe)return qe.decode(k.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var u=lt[t+s*2>>1];if(u==0)break;o+=String.fromCharCode(u)}return o},ra=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<2)return 0;r-=2;for(var a=e,o=r<t.length*2?r/2:t.length,s=0;s<o;++s){var u=t.charCodeAt(s);lt[e>>1]=u,e+=2}return lt[e>>1]=0,e-a},na=t=>t.length*2,aa=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=H[t+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},oa=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<4)return 0;for(var a=e,o=a+r-4,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(H[e>>2]=u,e+=4,e+4>o)break}return H[e>>2]=0,e-a},ia=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},sa=(t,e,r)=>{r=I(r);var n,a,o,s,u;e===2?(n=ea,a=ra,s=na,o=()=>vt,u=1):e===4&&(n=aa,a=oa,s=ia,o=()=>_,u=2),Z(t,{name:r,fromWireType:l=>{for(var f=_[l>>2],h=o(),v,y=l+4,w=0;w<=f;++w){var E=l+4+w*e;if(w==f||h[E>>u]==0){var F=E-y,T=n(y,F);v===void 0?v=T:(v+="\0",v+=T),y=E+e}}return rt(l),v},toWireType:(l,f)=>{typeof f!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var h=s(f),v=ie(4+h+e);return _[v>>2]=h>>u,a(f,v+4,h+e),l!==null&&l.push(rt,v),v},argPackAdvance:J,readValueFromPointer:Nt,destructorFunction(l){rt(l)}})},ua=(t,e,r,n,a,o)=>{Ot[t]={name:I(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},ca=(t,e,r,n,a,o,s,u,l,f)=>{Ot[t].fields.push({fieldName:I(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(u,l),setterContext:f})},la=(t,e)=>{e=I(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},ae=[],da=(t,e,r,n)=>(t=ae[t],e=et.toValue(e),t(null,e,r,n)),fa={},ha=t=>{var e=fa[t];return e===void 0?I(t):e},Qe=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},pa=t=>t===0?et.toHandle(Qe()):(t=ha(t),et.toHandle(Qe()[t])),ma=t=>{var e=ae.length;return ae.push(t),e},va=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=ee(_[e+n*4>>2],"parameter "+n);return r},ya=Reflect.construct,ga=(t,e,r)=>{var n=[],a=t.toWireType(n,r);return n.length&&(_[e>>2]=et.toHandle(n)),a},wa=(t,e,r)=>{var n=va(t,e),a=n.shift();t--;var o=new Array(t),s=(l,f,h,v)=>{for(var y=0,w=0;w<t;++w)o[w]=n[w].readValueFromPointer(v+y),y+=n[w].argPackAdvance;for(var E=r===1?ya(f,o):f.apply(l,o),w=0;w<t;++w){var F,T;(F=(T=n[w]).deleteObject)===null||F===void 0||F.call(T,o[w])}return ga(a,h,E)},u=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return ma(Ct(u,s))},$a=t=>{t>4&&(X.get(t).refcount+=1)},ba=t=>{var e=et.toValue(t);zt(e),te(t)},Ca=(t,e)=>{t=ee(t,"_emval_take_value");var r=t.readValueFromPointer(e);return et.toHandle(r)},Ta=()=>{Et("")},_a=(t,e,r)=>k.copyWithin(t,e,e+r),Pa=()=>2147483648,Ea=t=>{var e=at.buffer,r=(t-e.byteLength+65535)/65536;try{return at.grow(r),Pe(),1}catch{}},Aa=t=>{var e=k.length;t>>>=0;var r=Pa();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var s=Math.min(r,n(Math.max(t,o),65536)),u=Ea(s);if(u)return!0}return!1},oe={},Da=()=>U||"./this.program",Tt=()=>{if(!Tt.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Da()};for(var r in oe)oe[r]===void 0?delete e[r]:e[r]=oe[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Tt.strings=n}return Tt.strings},Oa=(t,e)=>{for(var r=0;r<t.length;++r)Y[e++>>0]=t.charCodeAt(r);Y[e>>0]=0},Fa=(t,e)=>{var r=0;return Tt().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Oa(n,o),r+=n.length+1}),0},xa=(t,e)=>{var r=Tt();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Sa=t=>t,Wt=t=>t%4===0&&(t%100!==0||t%400===0),Ma=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ze=[31,29,31,30,31,30,31,31,30,31,30,31],Je=[31,28,31,30,31,30,31,31,30,31,30,31],ja=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Ze:Je)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function Ia(t,e,r){var n=r>0?r:Ge(t)+1,a=new Array(n),o=Ne(t,a,0,a.length);return e&&(a.length=o),a}var Ra=(t,e)=>{Y.set(t,e)},Wa=(t,e,r,n)=>{var a=_[n+40>>2],o={tm_sec:H[n>>2],tm_min:H[n+4>>2],tm_hour:H[n+8>>2],tm_mday:H[n+12>>2],tm_mon:H[n+16>>2],tm_year:H[n+20>>2],tm_wday:H[n+24>>2],tm_yday:H[n+28>>2],tm_isdst:H[n+32>>2],tm_gmtoff:H[n+36>>2],tm_zone:a?ne(a):""},s=ne(r),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in u)s=s.replace(new RegExp(l,"g"),u[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function v(d,m,x){for(var j=typeof d=="number"?d.toString():d||"";j.length<m;)j=x[0]+j;return j}function y(d,m){return v(d,m,"0")}function w(d,m){function x(pt){return pt<0?-1:pt>0?1:0}var j;return(j=x(d.getFullYear()-m.getFullYear()))===0&&(j=x(d.getMonth()-m.getMonth()))===0&&(j=x(d.getDate()-m.getDate())),j}function E(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function F(d){var m=ja(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),j=new Date(m.getFullYear()+1,0,4),pt=E(x),Ht=E(j);return w(pt,m)<=0?w(Ht,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var T={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return y(m/100|0,2)},"%d":d=>y(d.tm_mday,2),"%e":d=>v(d.tm_mday,2," "),"%g":d=>F(d).toString().substring(2),"%G":d=>F(d),"%H":d=>y(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),y(m,2)},"%j":d=>y(d.tm_mday+Ma(Wt(d.tm_year+1900)?Ze:Je,d.tm_mon-1),3),"%m":d=>y(d.tm_mon+1,2),"%M":d=>y(d.tm_min,2),"%n":()=>`
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>y(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return y(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Wt(d.tm_year))&&(m=1)}}else{m=52;var j=(d.tm_wday+7-d.tm_yday-1)%7;(j==4||j==5&&Wt(d.tm_year%400-1))&&m++}return y(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return y(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in T)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),T[l](o)));s=s.replace(/\0\0/g,"%");var R=Ia(s,!1);return R.length>e?0:(Ra(R,t),R.length-1)},ka=(t,e,r,n,a)=>Wa(t,e,r,n);Se=c.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},ln(),ht=c.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Cn(),gn(),Fn(),Ve=c.UnboundTypeError=jn(Error,"UnboundTypeError"),Hn(),Un();var Ha={s:Jr,u:Kr,b:en,g:rn,q:nn,J:an,f:on,V:sn,d:tn,da:un,Q:cn,_:fn,ca:In,ba:Wn,w:kn,Y:Vn,x:Yn,h:zn,L:Gn,M:Xn,t:Qn,o:Zn,K:ta,C:sa,A:ua,ea:ca,$:la,R:da,ha:te,fa:pa,Z:wa,N:$a,O:ba,aa:Ca,B:Ta,X:_a,W:Aa,T:Fa,U:xa,E:eo,D:Ya,F:to,n:ro,a:Ba,e:Na,m:La,k:Xa,H:Ja,v:Qa,G:Ka,z:ao,P:io,l:Ga,j:za,c:Va,p:Ua,I:Za,r:no,i:qa,y:oo,ga:Sa,S:ka},M=Zr(),rt=c._free=t=>(rt=c._free=M.ka)(t),ie=c._malloc=t=>(ie=c._malloc=M.la)(t),Ke=t=>(Ke=M.na)(t),P=(t,e)=>(P=M.oa)(t,e),_t=t=>(_t=M.pa)(t),D=()=>(D=M.qa)(),O=t=>(O=M.ra)(t),tr=t=>(tr=M.sa)(t),er=t=>(er=M.ta)(t),rr=(t,e,r)=>(rr=M.ua)(t,e,r),nr=t=>(nr=M.va)(t);c.dynCall_viijii=(t,e,r,n,a,o,s)=>(c.dynCall_viijii=M.wa)(t,e,r,n,a,o,s);var ar=c.dynCall_jiiii=(t,e,r,n,a)=>(ar=c.dynCall_jiiii=M.xa)(t,e,r,n,a);c.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(c.dynCall_iiiiij=M.ya)(t,e,r,n,a,o,s),c.dynCall_iiiiijj=(t,e,r,n,a,o,s,u,l)=>(c.dynCall_iiiiijj=M.za)(t,e,r,n,a,o,s,u,l),c.dynCall_iiiiiijj=(t,e,r,n,a,o,s,u,l,f)=>(c.dynCall_iiiiiijj=M.Aa)(t,e,r,n,a,o,s,u,l,f);function Ba(t,e){var r=D();try{return A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Ua(t,e,r,n){var a=D();try{A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function Va(t,e,r){var n=D();try{A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function La(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function Ya(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function za(t,e){var r=D();try{A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Na(t,e,r){var n=D();try{return A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function Ga(t){var e=D();try{A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function Xa(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function qa(t,e,r,n,a,o,s,u,l,f,h){var v=D();try{A(t)(e,r,n,a,o,s,u,l,f,h)}catch(y){if(O(v),y!==y+0)throw y;P(1,0)}}function Qa(t,e,r,n,a,o,s){var u=D();try{return A(t)(e,r,n,a,o,s)}catch(l){if(O(u),l!==l+0)throw l;P(1,0)}}function Za(t,e,r,n,a){var o=D();try{A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Ja(t,e,r,n,a,o){var s=D();try{return A(t)(e,r,n,a,o)}catch(u){if(O(s),u!==u+0)throw u;P(1,0)}}function Ka(t,e,r,n,a,o,s,u){var l=D();try{return A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function to(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function eo(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function ro(t){var e=D();try{return A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function no(t,e,r,n,a,o,s,u){var l=D();try{A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function ao(t,e,r,n,a,o,s,u,l,f,h,v){var y=D();try{return A(t)(e,r,n,a,o,s,u,l,f,h,v)}catch(w){if(O(y),w!==w+0)throw w;P(1,0)}}function oo(t,e,r,n,a,o,s,u,l,f,h,v,y,w,E,F){var T=D();try{A(t)(e,r,n,a,o,s,u,l,f,h,v,y,w,E,F)}catch(R){if(O(T),R!==R+0)throw R;P(1,0)}}function io(t,e,r,n,a){var o=D();try{return ar(t,e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}var kt;yt=function t(){kt||or(),kt||(yt=t)};function or(){if(ot>0||(Br(),ot>0))return;function t(){kt||(kt=!0,c.calledRun=!0,!mt&&(Ur(),$(c),c.onRuntimeInitialized&&c.onRuntimeInitialized(),Vr()))}c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},1),t()},1)):t()}if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();return or(),p.ready}})();function Ir(i){return Ut(Pt,i)}function Rr(i){return Sr(Pt,i)}async function Wr(i,p){return Mr(Pt,i,p)}async function kr(i,p){return jr(Pt,i,p)}class Hr extends EventTarget{constructor(c={}){var $;super();cr(this,ct,void 0);try{const g=($=c==null?void 0:c.formats)==null?void 0:$.filter(b=>b!=="unknown");if((g==null?void 0:g.length)===0)throw new TypeError("Hint option provided, but is empty.");g==null||g.forEach(b=>{if(!nt.has(b))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${b}' is not a valid enum value of type BarcodeFormat.`)}),lr(this,ct,g!=null?g:[]),Ir().then(b=>{this.dispatchEvent(new CustomEvent("load",{detail:b}))}).catch(b=>{this.dispatchEvent(new CustomEvent("error",{detail:b}))})}catch(g){throw ye(g,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return z.filter(c=>c!=="unknown")}async detect(c){try{const $=await yr(c);if($===null)return[];let g;try{me($)?g=await Wr($,{tryHarder:!0,formats:se(this,ct).map(b=>nt.get(b))}):g=await kr($,{tryHarder:!0,formats:se(this,ct).map(b=>nt.get(b))})}catch(b){throw console.error(b),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return g.map(b=>{const{topLeft:{x:U,y:N},topRight:{x:V,y:S},bottomLeft:{x:G,y:Q},bottomRight:{x:L,y:K}}=b.position,at=Math.min(U,V,G,L),mt=Math.min(N,S,Q,K),Y=Math.max(U,V,G,L),k=Math.max(N,S,Q,K);return{boundingBox:new DOMRectReadOnly(at,mt,Y-at,k-mt),rawValue:b.text,format:dr(b.format),cornerPoints:[{x:U,y:N},{x:V,y:S},{x:L,y:K},{x:G,y:Q}]}})}catch($){throw ye($,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ct=new WeakMap,(Ce=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=Hr),W.setZXingModuleOverrides=Rr,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"}),W}({});
var BarcodeDetectionAPI=function(W){"use strict";var lr=(W,H,Y)=>{if(!H.has(W))throw TypeError("Cannot "+Y)};var ce=(W,H,Y)=>(lr(W,H,"read from private field"),Y?Y.call(W):H.get(W)),dr=(W,H,Y)=>{if(H.has(W))throw TypeError("Cannot add the same private member more than once");H instanceof WeakSet?H.add(W):H.set(W,Y)},fr=(W,H,Y,_t)=>(lr(W,H,"write to private field"),_t?_t.call(W,Y):H.set(W,Y),Y);var ct,_e;const H=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Y(i){return i.join("|")}function _t(i){const p=le(i);let c=0,$=H.length-1;for(;c<=$;){const g=Math.floor((c+$)/2),b=H[g],V=le(b);if(V===p)return b;V<p?c=g+1:$=g-1}return"None"}function le(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function hr(i,p){return i.Binarizer[p]}function pr(i,p){return i.CharacterSet[p]}const mr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function vr(i){return mr[i.value]}function yr(i,p){return i.EanAddOnSymbol[p]}function gr(i,p){return i.TextMode[p]}const ut={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function de(i,p){return{...p,formats:Y(p.formats),binarizer:hr(i,p.binarizer),eanAddOnSymbol:yr(i,p.eanAddOnSymbol),textMode:gr(i,p.textMode),characterSet:pr(i,p.characterSet)}}function fe(i){return{...i,format:_t(i.format),eccLevel:i.eccLevel,contentType:vr(i.contentType)}}const wr={locateFile:(i,p)=>{const c=i.match(/_(.+?)\.wasm$/);return c?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.3/dist/${c[1]}/${i}`:p+i}};let Vt=new WeakMap;function Lt(i,p){var c;const $=Vt.get(i);if($!=null&&$.modulePromise&&(p===void 0||Object.is(p,$.moduleOverrides)))return $.modulePromise;const g=(c=p!=null?p:$==null?void 0:$.moduleOverrides)!=null?c:wr,b=i({...g});return Vt.set(i,{moduleOverrides:g,modulePromise:b}),b}function $r(i,p){Vt.set(i,{moduleOverrides:p})}async function br(i,p,c=ut){const $={...ut,...c},g=await Lt(i),{size:b}=p,V=new Uint8Array(await p.arrayBuffer()),z=g._malloc(b);g.HEAPU8.set(V,z);const G=g.readBarcodesFromImage(z,b,de(g,$));g._free(z);const B=[];for(let S=0;S<G.size();++S)B.push(fe(G.get(S)));return B}async function Cr(i,p,c=ut){const $={...ut,...c},g=await Lt(i),{data:b,width:V,height:z,data:{byteLength:G}}=p,B=g._malloc(G);g.HEAPU8.set(b,B);const S=g.readBarcodesFromPixmap(B,V,z,de(g,$));g._free(B);const rt=[];for(let X=0;X<S.size();++X)rt.push(fe(S.get(X)));return rt}({...ut,formats:[...ut.formats]});var Pt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(p={}){var c=p,$,g;c.ready=new Promise((t,e)=>{$=t,g=e});var b=Object.assign({},c),V="./this.program",z=typeof window=="object",G=typeof Bun<"u",B=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var S="";function rt(t){return c.locateFile?c.locateFile(t,S):S+t}var X;(z||B||G)&&(B?S=self.location.href:typeof document<"u"&&document.currentScript&&(S=document.currentScript.src),i&&(S=i),S.indexOf("blob:")!==0?S=S.substr(0,S.replace(/[?#].*/,"").lastIndexOf("/")+1):S="",B&&(X=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),c.print||console.log.bind(console);var J=c.printErr||console.error.bind(console);Object.assign(c,b),b=null,c.arguments&&c.arguments,c.thisProgram&&(V=c.thisProgram),c.quit&&c.quit;var nt;c.wasmBinary&&(nt=c.wasmBinary),typeof WebAssembly!="object"&&Dt("no native wasm support detected");var at,At=!1,L,U,lt,mt,k,_,Pe,Ee;function Ae(){var t=at.buffer;c.HEAP8=L=new Int8Array(t),c.HEAP16=lt=new Int16Array(t),c.HEAPU8=U=new Uint8Array(t),c.HEAPU16=mt=new Uint16Array(t),c.HEAP32=k=new Int32Array(t),c.HEAPU32=_=new Uint32Array(t),c.HEAPF32=Pe=new Float32Array(t),c.HEAPF64=Ee=new Float64Array(t)}var De=[],Oe=[],Fe=[];function Ur(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)Yr(c.preRun.shift());Yt(De)}function Vr(){Yt(Oe)}function Lr(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)Nr(c.postRun.shift());Yt(Fe)}function Yr(t){De.unshift(t)}function zr(t){Oe.unshift(t)}function Nr(t){Fe.unshift(t)}var ot=0,vt=null;function Gr(t){var e;ot++,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot)}function Xr(t){var e;if(ot--,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,ot),ot==0&&vt){var r=vt;vt=null,r()}}function Dt(t){var e;(e=c.onAbort)===null||e===void 0||e.call(c,t),t="Aborted("+t+")",J(t),At=!0,t+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(t);throw g(r),r}var qr="data:application/octet-stream;base64,",xe=t=>t.startsWith(qr),dt;dt="zxing_reader.wasm",xe(dt)||(dt=rt(dt));function Se(t){if(t==dt&&nt)return new Uint8Array(nt);if(X)return X(t);throw"both async and sync fetching of the wasm failed"}function Qr(t){return!nt&&(z||B||G)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Se(t)):Promise.resolve().then(()=>Se(t))}function Me(t,e,r){return Qr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{J(`failed to asynchronously prepare wasm: ${n}`),Dt(n)})}function Zr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!xe(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(s){return J(`wasm streaming compile failed: ${s}`),J("falling back to ArrayBuffer instantiation"),Me(e,r,n)})}):Me(e,r,n)}function Jr(){var t={a:Ba};function e(n,a){return M=n.exports,at=M.ia,Ae(),Le=M.ma,zr(M.ja),Xr(),M}Gr();function r(n){e(n.instance)}if(c.instantiateWasm)try{return c.instantiateWasm(t,e)}catch(n){J(`Module.instantiateWasm callback failed with error: ${n}`),g(n)}return Zr(nt,dt,t,r).catch(g),{}}var Yt=t=>{for(;t.length>0;)t.shift()(c)};c.noExitRuntime;var Ot=[],Ft=0,Kr=t=>{var e=new zt(t);return e.get_caught()||(e.set_caught(!0),Ft--),e.set_rethrown(!1),Ot.push(e),nr(e.excPtr),e.get_exception_ptr()},K=0,tn=()=>{P(0,0);var t=Ot.pop();rr(t.excPtr),K=0};function zt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,L[this.ptr+12>>0]=e},this.get_caught=function(){return L[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,L[this.ptr+13>>0]=e},this.get_rethrown=function(){return L[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=or(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var en=t=>{throw K||(K=t),K},Nt=t=>{var e=K;if(!e)return Tt(0),0;var r=new zt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var s=r.ptr+16;if(ar(o,n,s))return Tt(o),e}return Tt(n),e},rn=()=>Nt([]),nn=t=>Nt([t]),an=(t,e)=>Nt([t,e]),on=()=>{var t=Ot.pop();t||Dt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Ot.push(t),t.set_rethrown(!0),t.set_caught(!1),Ft++),K=e,K},sn=(t,e,r)=>{var n=new zt(t);throw n.init(e,r),K=t,Ft++,K},un=()=>Ft,xt={},Gt=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Xt(t){return this.fromWireType(k[t>>2])}var ft={},it={},St={},je,Mt=t=>{throw new je(t)},st=(t,e,r)=>{t.forEach(function(u){St[u]=e});function n(u){var l=r(u);l.length!==t.length&&Mt("Mismatched type converter count");for(var f=0;f<t.length;++f)Q(t[f],l[f])}var a=new Array(e.length),o=[],s=0;e.forEach((u,l)=>{it.hasOwnProperty(u)?a[l]=it[u]:(o.push(u),ft.hasOwnProperty(u)||(ft[u]=[]),ft[u].push(()=>{a[l]=it[u],++s,s===o.length&&n(a)}))}),o.length===0&&n(a)},cn=t=>{var e=xt[t];delete xt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));st([t],o,s=>{var u={};return a.forEach((l,f)=>{var h=l.fieldName,v=s[f],y=l.getter,w=l.getterContext,E=s[f+a.length],F=l.setter,T=l.setterContext;u[h]={read:R=>v.fromWireType(y(w,R)),write:(R,d)=>{var m=[];F(T,R,E.toWireType(m,d)),Gt(m)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in u)f[h]=u[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in u)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var v=r();for(h in u)u[h].write(v,f[h]);return l!==null&&l.push(n,v),v},argPackAdvance:Z,readValueFromPointer:Xt,destructorFunction:n}]})},ln=(t,e,r,n,a)=>{},dn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Ie=t},Ie,I=t=>{for(var e="",r=t;U[r];)e+=Ie[U[r++]];return e},ht,C=t=>{throw new ht(t)};function fn(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),it.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(it[t]=e,delete St[t],ft.hasOwnProperty(t)){var a=ft[t];delete ft[t],a.forEach(o=>o())}}function Q(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return fn(t,e,r)}var Z=8,hn=(t,e,r,n)=>{e=I(e),Q(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:Z,readValueFromPointer:function(a){return this.fromWireType(U[a])},destructorFunction:null})},pn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),qt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Qt=!1,Re=t=>{},mn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},We=t=>{t.count.value-=1;var e=t.count.value===0;e&&mn(t)},ke=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=ke(t,e,r.baseClass);return n===null?null:r.downcast(n)},He={},vn=()=>Object.keys(wt).length,yn=()=>{var t=[];for(var e in wt)wt.hasOwnProperty(e)&&t.push(wt[e]);return t},yt=[],Zt=()=>{for(;yt.length;){var t=yt.pop();t.$$.deleteScheduled=!1,t.delete()}},gt,gn=t=>{gt=t,yt.length&&gt&&gt(Zt)},wn=()=>{c.getInheritedInstanceCount=vn,c.getLiveInheritedInstances=yn,c.flushPendingDeletes=Zt,c.setDelayFunction=gn},wt={},$n=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},bn=(t,e)=>(e=$n(t,e),wt[e]),jt=(t,e)=>{(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},$t(Object.create(t,{$$:{value:e,writable:!0}}))};function Cn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=bn(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),s=He[o];if(!s)return a.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var l=ke(e,this.registeredClass,u.registeredClass);return l===null?a.call(this):this.isSmartPointer?jt(u.registeredClass.instancePrototype,{ptrType:u,ptr:l,smartPtrType:this,smartPtr:t}):jt(u.registeredClass.instancePrototype,{ptrType:u,ptr:l})}var $t=t=>typeof FinalizationRegistry>"u"?($t=e=>e,t):(Qt=new FinalizationRegistry(e=>{We(e.$$)}),$t=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Qt.register(e,a,e)}return e},Re=e=>Qt.unregister(e),$t(t)),Tn=()=>{Object.assign(It.prototype,{isAliasOf(t){if(!(this instanceof It)||!(t instanceof It))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||qt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=$t(Object.create(Object.getPrototypeOf(this),{$$:{value:pn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||qt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Re(this),We(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||qt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),yt.push(this),yt.length===1&&gt&&gt(Zt),this.$$.deleteScheduled=!0,this}})};function It(){}var bt=(t,e)=>Object.defineProperty(e,"name",{value:t}),Be=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Jt=(t,e,r)=>{c.hasOwnProperty(t)?((r===void 0||c[t].overloadTable!==void 0&&c[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),Be(c,t,t),c.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),c[t].overloadTable[r]=e):(c[t]=e,r!==void 0&&(c[t].numArguments=r))},_n=48,Pn=57,En=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=_n&&e<=Pn?`_${t}`:t};function An(t,e,r,n,a,o,s,u){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=s,this.downcast=u,this.pureVirtualFunctions=[]}var Kt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function Dn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ae(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Kt(e.$$.ptr,r,this.registeredClass);return n}function On(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&C(`Cannot pass "${ae(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Kt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,tt.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function Fn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${ae(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Kt(e.$$.ptr,r,this.registeredClass);return n}function Ue(t){return this.fromWireType(_[t>>2])}var xn=()=>{Object.assign(Rt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){var e;(e=this.rawDestructor)===null||e===void 0||e.call(this,t)},argPackAdvance:Z,readValueFromPointer:Ue,deleteObject(t){t!==null&&t.delete()},fromWireType:Cn})};function Rt(t,e,r,n,a,o,s,u,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=s,this.rawGetPointee=u,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=Dn,this.destructorFunction=null):(this.toWireType=Fn,this.destructorFunction=null):this.toWireType=On}var Ve=(t,e,r)=>{c.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),c[t].overloadTable!==void 0&&r!==void 0?c[t].overloadTable[r]=e:(c[t]=e,c[t].argCount=r)},Sn=(t,e,r)=>{var n=c["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Wt=[],Le,A=t=>{var e=Wt[t];return e||(t>=Wt.length&&(Wt.length=t+1),Wt[t]=e=Le.get(t)),e},Mn=(t,e,r)=>{if(t.includes("j"))return Sn(t,e,r);var n=A(e).apply(null,r);return n},jn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Mn(t,e,r)}},q=(t,e)=>{t=I(t);function r(){return t.includes("j")?jn(t,e):A(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},In=(t,e)=>{var r=bt(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ye,ze=t=>{var e=er(t),r=I(e);return et(e),r},kt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!it[o]){if(St[o]){St[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ye(`${t}: `+r.map(ze).join([", "]))},Rn=(t,e,r,n,a,o,s,u,l,f,h,v,y)=>{h=I(h),o=q(a,o),u&&(u=q(s,u)),f&&(f=q(l,f)),y=q(v,y);var w=En(h);Jt(w,function(){kt(`Cannot construct ${h} due to unbound types`,[n])}),st([t,e,r],n?[n]:[],function(E){E=E[0];var F,T;n?(F=E.registeredClass,T=F.instancePrototype):T=It.prototype;var R=bt(h,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(m.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var cr=m.constructor_body[arguments.length];if(cr===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return cr.apply(this,arguments)}),d=Object.create(T,{constructor:{value:R}});R.prototype=d;var m=new An(h,R,d,y,F,o,u,f);if(m.baseClass){var x,j;(j=(x=m.baseClass).__derivedClasses)!==null&&j!==void 0||(x.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m)}var pt=new Rt(h,m,!0,!1,!1),Ut=new Rt(h+"*",m,!1,!1,!1),ur=new Rt(h+" const*",m,!1,!0,!1);return He[t]={pointerType:Ut,constPointerType:ur},Ve(w,R),[pt,Ut,ur]})},te=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Wn(t){for(var e=1;e<t.length;++e)if(t[e]!==null&&t[e].destructorFunction===void 0)return!0;return!1}function ee(t,e,r,n,a,o){var s=e.length;s<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");var u=e[1]!==null&&r!==null,l=Wn(e),f=e[0].name!=="void",h=s-2,v=new Array(h),y=[],w=[],E=function(){arguments.length!==h&&C(`function ${t} called with ${arguments.length} arguments, expected ${h}`),w.length=0;var F;y.length=u?2:1,y[0]=a,u&&(F=e[1].toWireType(w,this),y[1]=F);for(var T=0;T<h;++T)v[T]=e[T+2].toWireType(w,arguments[T]),y.push(v[T]);var R=n.apply(null,y);function d(m){if(l)Gt(w);else for(var x=u?1:2;x<e.length;x++){var j=x===1?F:v[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(j)}if(f)return e[0].fromWireType(m)}return d(R)};return bt(t,E)}var kn=(t,e,r,n,a,o)=>{var s=te(e,r);a=q(n,a),st([],[t],function(u){u=u[0];var l=`constructor ${u.name}`;if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${u.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return u.registeredClass.constructor_body[e-1]=()=>{kt(`Cannot construct ${u.name} due to unbound types`,s)},st([],s,f=>(f.splice(1,0,null),u.registeredClass.constructor_body[e-1]=ee(l,f,null,a,o),[])),[]})},Ne=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?t.substr(0,e):t},Hn=(t,e,r,n,a,o,s,u,l)=>{var f=te(r,n);e=I(e),e=Ne(e),o=q(a,o),st([],[t],function(h){h=h[0];var v=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&h.registeredClass.pureVirtualFunctions.push(e);function y(){kt(`Cannot call ${v} due to unbound types`,f)}var w=h.registeredClass.instancePrototype,E=w[e];return E===void 0||E.overloadTable===void 0&&E.className!==h.name&&E.argCount===r-2?(y.argCount=r-2,y.className=h.name,w[e]=y):(Be(w,e,v),w[e].overloadTable[r-2]=y),st([],f,function(F){var T=ee(v,F,h,o,s);return w[e].overloadTable===void 0?(T.argCount=r-2,w[e]=T):w[e].overloadTable[r-2]=T,[]}),[]})};function Bn(){Object.assign(Ge.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Ge(){this.allocated=[void 0],this.freelist=[]}var N=new Ge,re=t=>{t>=N.reserved&&--N.get(t).refcount===0&&N.free(t)},Un=()=>{for(var t=0,e=N.reserved;e<N.allocated.length;++e)N.allocated[e]!==void 0&&++t;return t},Vn=()=>{N.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),N.reserved=N.allocated.length,c.count_emval_handles=Un},tt={toValue:t=>(t||C("Cannot use deleted val. handle = "+t),N.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return N.allocate({refcount:1,value:t})}}},Ln=(t,e)=>{e=I(e),Q(t,{name:e,fromWireType:r=>{var n=tt.toValue(r);return re(r),n},toWireType:(r,n)=>tt.toHandle(n),argPackAdvance:Z,readValueFromPointer:Xt,destructorFunction:null})},Yn=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(L[n>>0])}:function(n){return this.fromWireType(U[n>>0])};case 2:return r?function(n){return this.fromWireType(lt[n>>1])}:function(n){return this.fromWireType(mt[n>>1])};case 4:return r?function(n){return this.fromWireType(k[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},zn=(t,e,r,n)=>{e=I(e);function a(){}a.values={},Q(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,s)=>s.value,argPackAdvance:Z,readValueFromPointer:Yn(e,r,n),destructorFunction:null}),Jt(e,a)},ne=(t,e)=>{var r=it[t];return r===void 0&&C(e+" has unknown type "+ze(t)),r},Nn=(t,e,r)=>{var n=ne(t,"enum");e=I(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:bt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},ae=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Gn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(Pe[r>>2])};case 8:return function(r){return this.fromWireType(Ee[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Xn=(t,e,r)=>{e=I(e),Q(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:Z,readValueFromPointer:Gn(e,r),destructorFunction:null})},qn=(t,e,r,n,a,o,s)=>{var u=te(e,r);t=I(t),t=Ne(t),a=q(n,a),Jt(t,function(){kt(`Cannot call ${t} due to unbound types`,u)},e-1),st([],u,function(l){var f=[l[0],null].concat(l.slice(1));return Ve(t,ee(t,f,null,a,o),e-1),[]})},Qn=(t,e,r)=>{switch(e){case 1:return r?n=>L[n>>0]:n=>U[n>>0];case 2:return r?n=>lt[n>>1]:n=>mt[n>>1];case 4:return r?n=>k[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Zn=(t,e,r,n,a)=>{e=I(e);var o=h=>h;if(n===0){var s=32-8*r;o=h=>h<<s>>>s}var u=e.includes("unsigned"),l=(h,v)=>{},f;u?f=function(h,v){return l(v,this.name),v>>>0}:f=function(h,v){return l(v,this.name),v},Q(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:Z,readValueFromPointer:Qn(e,r,n!==0),destructorFunction:null})},Jn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(s){var u=_[s>>2],l=_[s+4>>2];return new a(L.buffer,l,u)}r=I(r),Q(t,{name:r,fromWireType:o,argPackAdvance:Z,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Xe=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(u<=127){if(r>=o)break;e[r++]=u}else if(u<=2047){if(r+1>=o)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(u<=65535){if(r+2>=o)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=o)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63}}return e[r]=0,r-a},Kn=(t,e,r)=>Xe(t,U,e,r),qe=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Qe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,ta=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Qe)return Qe.decode(t.subarray(e,a));for(var o="";e<a;){var s=t[e++];if(!(s&128)){o+=String.fromCharCode(s);continue}var u=t[e++]&63;if((s&224)==192){o+=String.fromCharCode((s&31)<<6|u);continue}var l=t[e++]&63;if((s&240)==224?s=(s&15)<<12|u<<6|l:s=(s&7)<<18|u<<12|l<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var f=s-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},oe=(t,e)=>t?ta(U,t,e):"",ea=(t,e)=>{e=I(e);var r=e==="std::string";Q(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,s;if(r)for(var u=o,l=0;l<=a;++l){var f=o+l;if(l==a||U[f]==0){var h=f-u,v=oe(u,h);s===void 0?s=v:(s+="\0",s+=v),u=f+1}}else{for(var y=new Array(a),l=0;l<a;++l)y[l]=String.fromCharCode(U[o+l]);s=y.join("")}return et(n),s},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,s=typeof a=="string";s||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&s?o=qe(a):o=a.length;var u=ue(4+o+1),l=u+4;if(_[u>>2]=o,r&&s)Kn(a,l,o+1);else if(s)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(et(l),C("String has UTF-16 code units that do not fit in 8 bits")),U[l+f]=h}else for(var f=0;f<o;++f)U[l+f]=a[f];return n!==null&&n.push(et,u),u},argPackAdvance:Z,readValueFromPointer:Ue,destructorFunction(n){et(n)}})},Ze=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,ra=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&mt[n];)++n;if(r=n<<1,r-t>32&&Ze)return Ze.decode(U.subarray(t,r));for(var o="",s=0;!(s>=e/2);++s){var u=lt[t+s*2>>1];if(u==0)break;o+=String.fromCharCode(u)}return o},na=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<2)return 0;r-=2;for(var a=e,o=r<t.length*2?r/2:t.length,s=0;s<o;++s){var u=t.charCodeAt(s);lt[e>>1]=u,e+=2}return lt[e>>1]=0,e-a},aa=t=>t.length*2,oa=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=k[t+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},ia=(t,e,r)=>{var n;if((n=r)!==null&&n!==void 0||(r=2147483647),r<4)return 0;for(var a=e,o=a+r-4,s=0;s<t.length;++s){var u=t.charCodeAt(s);if(u>=55296&&u<=57343){var l=t.charCodeAt(++s);u=65536+((u&1023)<<10)|l&1023}if(k[e>>2]=u,e+=4,e+4>o)break}return k[e>>2]=0,e-a},sa=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},ua=(t,e,r)=>{r=I(r);var n,a,o,s,u;e===2?(n=ra,a=na,s=aa,o=()=>mt,u=1):e===4&&(n=oa,a=ia,s=sa,o=()=>_,u=2),Q(t,{name:r,fromWireType:l=>{for(var f=_[l>>2],h=o(),v,y=l+4,w=0;w<=f;++w){var E=l+4+w*e;if(w==f||h[E>>u]==0){var F=E-y,T=n(y,F);v===void 0?v=T:(v+="\0",v+=T),y=E+e}}return et(l),v},toWireType:(l,f)=>{typeof f!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var h=s(f),v=ue(4+h+e);return _[v>>2]=h>>u,a(f,v+4,h+e),l!==null&&l.push(et,v),v},argPackAdvance:Z,readValueFromPointer:Xt,destructorFunction(l){et(l)}})},ca=(t,e,r,n,a,o)=>{xt[t]={name:I(e),rawConstructor:q(r,n),rawDestructor:q(a,o),fields:[]}},la=(t,e,r,n,a,o,s,u,l,f)=>{xt[t].fields.push({fieldName:I(e),getterReturnType:r,getter:q(n,a),getterContext:o,setterArgumentType:s,setter:q(u,l),setterContext:f})},da=(t,e)=>{e=I(e),Q(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},ie=[],fa=(t,e,r,n)=>(t=ie[t],e=tt.toValue(e),t(null,e,r,n)),ha={},pa=t=>{var e=ha[t];return e===void 0?I(t):e},Je=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},ma=t=>t===0?tt.toHandle(Je()):(t=pa(t),tt.toHandle(Je()[t])),va=t=>{var e=ie.length;return ie.push(t),e},ya=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=ne(_[e+n*4>>2],"parameter "+n);return r},ga=Reflect.construct,wa=(t,e,r)=>{var n=[],a=t.toWireType(n,r);return n.length&&(_[e>>2]=tt.toHandle(n)),a},$a=(t,e,r)=>{var n=ya(t,e),a=n.shift();t--;var o=new Array(t),s=(l,f,h,v)=>{for(var y=0,w=0;w<t;++w)o[w]=n[w].readValueFromPointer(v+y),y+=n[w].argPackAdvance;for(var E=r===1?ga(f,o):f.apply(l,o),w=0;w<t;++w){var F,T;(F=(T=n[w]).deleteObject)===null||F===void 0||F.call(T,o[w])}return wa(a,h,E)},u=`methodCaller<(${n.map(l=>l.name).join(", ")}) => ${a.name}>`;return va(bt(u,s))},ba=t=>{t>4&&(N.get(t).refcount+=1)},Ca=t=>{var e=tt.toValue(t);Gt(e),re(t)},Ta=(t,e)=>{t=ne(t,"_emval_take_value");var r=t.readValueFromPointer(e);return tt.toHandle(r)},_a=()=>{Dt("")},Pa=(t,e,r)=>U.copyWithin(t,e,e+r),Ea=()=>2147483648,Aa=t=>{var e=at.buffer,r=(t-e.byteLength+65535)/65536;try{return at.grow(r),Ae(),1}catch{}},Da=t=>{var e=U.length;t>>>=0;var r=Ea();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var s=Math.min(r,n(Math.max(t,o),65536)),u=Aa(s);if(u)return!0}return!1},se={},Oa=()=>V||"./this.program",Ct=()=>{if(!Ct.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Oa()};for(var r in se)se[r]===void 0?delete e[r]:e[r]=se[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Ct.strings=n}return Ct.strings},Fa=(t,e)=>{for(var r=0;r<t.length;++r)L[e++>>0]=t.charCodeAt(r);L[e>>0]=0},xa=(t,e)=>{var r=0;return Ct().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Fa(n,o),r+=n.length+1}),0},Sa=(t,e)=>{var r=Ct();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Ma=t=>t,Ht=t=>t%4===0&&(t%100!==0||t%400===0),ja=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ke=[31,29,31,30,31,30,31,31,30,31,30,31],tr=[31,28,31,30,31,30,31,31,30,31,30,31],Ia=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ht(r.getFullYear()),a=r.getMonth(),o=(n?Ke:tr)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function Ra(t,e,r){var n=r>0?r:qe(t)+1,a=new Array(n),o=Xe(t,a,0,a.length);return e&&(a.length=o),a}var Wa=(t,e)=>{L.set(t,e)},ka=(t,e,r,n)=>{var a=_[n+40>>2],o={tm_sec:k[n>>2],tm_min:k[n+4>>2],tm_hour:k[n+8>>2],tm_mday:k[n+12>>2],tm_mon:k[n+16>>2],tm_year:k[n+20>>2],tm_wday:k[n+24>>2],tm_yday:k[n+28>>2],tm_isdst:k[n+32>>2],tm_gmtoff:k[n+36>>2],tm_zone:a?oe(a):""},s=oe(r),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in u)s=s.replace(new RegExp(l,"g"),u[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function v(d,m,x){for(var j=typeof d=="number"?d.toString():d||"";j.length<m;)j=x[0]+j;return j}function y(d,m){return v(d,m,"0")}function w(d,m){function x(pt){return pt<0?-1:pt>0?1:0}var j;return(j=x(d.getFullYear()-m.getFullYear()))===0&&(j=x(d.getMonth()-m.getMonth()))===0&&(j=x(d.getDate()-m.getDate())),j}function E(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function F(d){var m=Ia(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),j=new Date(m.getFullYear()+1,0,4),pt=E(x),Ut=E(j);return w(pt,m)<=0?w(Ut,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var T={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return y(m/100|0,2)},"%d":d=>y(d.tm_mday,2),"%e":d=>v(d.tm_mday,2," "),"%g":d=>F(d).toString().substring(2),"%G":d=>F(d),"%H":d=>y(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),y(m,2)},"%j":d=>y(d.tm_mday+ja(Ht(d.tm_year+1900)?Ke:tr,d.tm_mon-1),3),"%m":d=>y(d.tm_mon+1,2),"%M":d=>y(d.tm_min,2),"%n":()=>`
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>y(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return y(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Ht(d.tm_year))&&(m=1)}}else{m=52;var j=(d.tm_wday+7-d.tm_yday-1)%7;(j==4||j==5&&Ht(d.tm_year%400-1))&&m++}return y(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return y(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};s=s.replace(/%%/g,"\0\0");for(var l in T)s.includes(l)&&(s=s.replace(new RegExp(l,"g"),T[l](o)));s=s.replace(/\0\0/g,"%");var R=Ra(s,!1);return R.length>e?0:(Wa(R,t),R.length-1)},Ha=(t,e,r,n,a)=>ka(t,e,r,n);je=c.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},dn(),ht=c.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Tn(),wn(),xn(),Ye=c.UnboundTypeError=In(Error,"UnboundTypeError"),Bn(),Vn();var Ba={s:Kr,u:tn,b:rn,g:nn,q:an,K:on,f:sn,W:un,d:en,da:cn,S:ln,_:hn,ca:Rn,ba:kn,w:Hn,Z:Ln,x:zn,h:Nn,N:Xn,O:qn,t:Zn,o:Jn,M:ea,C:ua,A:ca,ea:la,$:da,E:fa,ga:re,ha:ma,L:$a,P:ba,Q:Ca,aa:Ta,B:_a,Y:Pa,X:Da,U:xa,V:Sa,F:ro,D:za,G:eo,n:no,a:Ua,e:Ga,m:Ya,k:qa,I:Ka,v:Za,H:to,z:oo,R:so,l:Xa,j:Na,c:La,p:Va,J:Ja,r:ao,i:Qa,y:io,fa:Ma,T:Ha},M=Jr(),et=c._free=t=>(et=c._free=M.ka)(t),ue=c._malloc=t=>(ue=c._malloc=M.la)(t),er=t=>(er=M.na)(t),P=(t,e)=>(P=M.oa)(t,e),Tt=t=>(Tt=M.pa)(t),D=()=>(D=M.qa)(),O=t=>(O=M.ra)(t),rr=t=>(rr=M.sa)(t),nr=t=>(nr=M.ta)(t),ar=(t,e,r)=>(ar=M.ua)(t,e,r),or=t=>(or=M.va)(t);c.dynCall_viijii=(t,e,r,n,a,o,s)=>(c.dynCall_viijii=M.wa)(t,e,r,n,a,o,s);var ir=c.dynCall_jiiii=(t,e,r,n,a)=>(ir=c.dynCall_jiiii=M.xa)(t,e,r,n,a);c.dynCall_iiiiij=(t,e,r,n,a,o,s)=>(c.dynCall_iiiiij=M.ya)(t,e,r,n,a,o,s),c.dynCall_iiiiijj=(t,e,r,n,a,o,s,u,l)=>(c.dynCall_iiiiijj=M.za)(t,e,r,n,a,o,s,u,l),c.dynCall_iiiiiijj=(t,e,r,n,a,o,s,u,l,f)=>(c.dynCall_iiiiiijj=M.Aa)(t,e,r,n,a,o,s,u,l,f);function Ua(t,e){var r=D();try{return A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Va(t,e,r,n){var a=D();try{A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function La(t,e,r){var n=D();try{A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function Ya(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function za(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Na(t,e){var r=D();try{A(t)(e)}catch(n){if(O(r),n!==n+0)throw n;P(1,0)}}function Ga(t,e,r){var n=D();try{return A(t)(e,r)}catch(a){if(O(n),a!==a+0)throw a;P(1,0)}}function Xa(t){var e=D();try{A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function qa(t,e,r,n,a){var o=D();try{return A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Qa(t,e,r,n,a,o,s,u,l,f,h){var v=D();try{A(t)(e,r,n,a,o,s,u,l,f,h)}catch(y){if(O(v),y!==y+0)throw y;P(1,0)}}function Za(t,e,r,n,a,o,s){var u=D();try{return A(t)(e,r,n,a,o,s)}catch(l){if(O(u),l!==l+0)throw l;P(1,0)}}function Ja(t,e,r,n,a){var o=D();try{A(t)(e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}function Ka(t,e,r,n,a,o){var s=D();try{return A(t)(e,r,n,a,o)}catch(u){if(O(s),u!==u+0)throw u;P(1,0)}}function to(t,e,r,n,a,o,s,u){var l=D();try{return A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function eo(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function ro(t,e,r,n){var a=D();try{return A(t)(e,r,n)}catch(o){if(O(a),o!==o+0)throw o;P(1,0)}}function no(t){var e=D();try{return A(t)()}catch(r){if(O(e),r!==r+0)throw r;P(1,0)}}function ao(t,e,r,n,a,o,s,u){var l=D();try{A(t)(e,r,n,a,o,s,u)}catch(f){if(O(l),f!==f+0)throw f;P(1,0)}}function oo(t,e,r,n,a,o,s,u,l,f,h,v){var y=D();try{return A(t)(e,r,n,a,o,s,u,l,f,h,v)}catch(w){if(O(y),w!==w+0)throw w;P(1,0)}}function io(t,e,r,n,a,o,s,u,l,f,h,v,y,w,E,F){var T=D();try{A(t)(e,r,n,a,o,s,u,l,f,h,v,y,w,E,F)}catch(R){if(O(T),R!==R+0)throw R;P(1,0)}}function so(t,e,r,n,a){var o=D();try{return ir(t,e,r,n,a)}catch(s){if(O(o),s!==s+0)throw s;P(1,0)}}var Bt;vt=function t(){Bt||sr(),Bt||(vt=t)};function sr(){if(ot>0||(Ur(),ot>0))return;function t(){Bt||(Bt=!0,c.calledRun=!0,!At&&(Vr(),$(c),c.onRuntimeInitialized&&c.onRuntimeInitialized(),Lr()))}c.setStatus?(c.setStatus("Running..."),setTimeout(function(){setTimeout(function(){c.setStatus("")},1),t()},1)):t()}if(c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.pop()();return sr(),p.ready}})();function Tr(i){return Lt(Pt,i)}function _r(i){return $r(Pt,i)}async function Pr(i,p){return br(Pt,i,p)}async function Er(i,p){return Cr(Pt,i,p)}const he=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["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"]],Ar=[...he,["unknown"]].map(i=>i[0]),Et=new Map(he);function Dr(i){for(const[p,c]of Et)if(i===c)return p;return"unknown"}function Or(i){if(pe(i))return{width:i.naturalWidth,height:i.naturalHeight};if(me(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ve(i))return{width:i.videoWidth,height:i.videoHeight};if(ge(i))return{width:i.width,height:i.height};if($e(i))return{width:i.displayWidth,height:i.displayHeight};if(ye(i))return{width:i.width,height:i.height};if(we(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 pe(i){try{return i instanceof HTMLImageElement}catch{return!1}}function me(i){try{return i instanceof SVGImageElement}catch{return!1}}function ve(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function ye(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function ge(i){try{return i instanceof ImageBitmap}catch{return!1}}function we(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function $e(i){try{return i instanceof VideoFrame}catch{return!1}}function be(i){try{return i instanceof Blob}catch{return!1}}function Fr(i){try{return i instanceof ImageData}catch{return!1}}function xr(i,p){try{const c=new OffscreenCanvas(i,p);if(c.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return c;throw void 0}catch{const c=document.createElement("canvas");return c.width=i,c.height=p,c}}async function Ce(i){if(pe(i)&&!await Ir(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(me(i)&&!await Rr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if($e(i)&&Wr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ve(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ge(i)&&Hr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:p,height:c}=Or(i);if(p===0||c===0)return null;const g=xr(p,c).getContext("2d");g.drawImage(i,0,0);try{return g.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Sr(i){let p;try{if(globalThis.createImageBitmap)p=await createImageBitmap(i);else if(globalThis.Image){p=new Image;let $="";try{$=URL.createObjectURL(i),p.src=$,await p.decode()}finally{URL.revokeObjectURL($)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Ce(p)}function Mr(i){const{width:p,height:c}=i;if(p===0||c===0)return null;const $=i.getContext("2d");try{return $.getImageData(0,0,p,c)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function jr(i){if(be(i))return await Sr(i);if(Fr(i)){if(kr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return ye(i)||we(i)?Mr(i):await Ce(i)}async function Ir(i){try{return await i.decode(),!0}catch{return!1}}async function Rr(i){var p;try{return await((p=i.decode)==null?void 0:p.call(i)),!0}catch{return!1}}function Wr(i){return i.format===null}function kr(i){return i.data.buffer.byteLength===0}function Hr(i){return i.width===0&&i.height===0}function Te(i,p){return i instanceof DOMException?new DOMException(`${p}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${p}: ${i.message}`):new Error(`${p}: ${i}`)}class Br extends EventTarget{constructor(c={}){var $;super();dr(this,ct,void 0);try{const g=($=c==null?void 0:c.formats)==null?void 0:$.filter(b=>b!=="unknown");if((g==null?void 0:g.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const b of g!=null?g:[])if(!Et.has(b))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${b}' is not a valid enum value of type BarcodeFormat.`);fr(this,ct,g!=null?g:[]),Tr().then(b=>{this.dispatchEvent(new CustomEvent("load",{detail:b}))}).catch(b=>{this.dispatchEvent(new CustomEvent("error",{detail:b}))})}catch(g){throw Te(g,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Ar.filter(c=>c!=="unknown")}async detect(c){try{const $=await jr(c);if($===null)return[];let g;try{be($)?g=await Pr($,{tryHarder:!0,formats:ce(this,ct).map(b=>Et.get(b))}):g=await Er($,{tryHarder:!0,formats:ce(this,ct).map(b=>Et.get(b))})}catch(b){throw console.error(b),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return g.map(b=>{const{topLeft:{x:V,y:z},topRight:{x:G,y:B},bottomLeft:{x:S,y:rt},bottomRight:{x:X,y:J}}=b.position,nt=Math.min(V,G,S,X),at=Math.min(z,B,rt,J),At=Math.max(V,G,S,X),L=Math.max(z,B,rt,J);return{boundingBox:new DOMRectReadOnly(nt,at,At-nt,L-at),rawValue:b.text,format:Dr(b.format),cornerPoints:[{x:V,y:z},{x:G,y:B},{x:X,y:J},{x:S,y:rt}]}})}catch($){throw Te($,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ct=new WeakMap,(_e=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=Br),W.setZXingModuleOverrides=_r,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"}),W}({});

@@ -5,3 +5,3 @@ {

"private": false,
"version": "2.2.2",
"version": "2.2.3",
"type": "module",

@@ -37,3 +37,3 @@ "files": [

"url": "https://github.com/Sec-ant/barcode-detector/issues",
"email": "zzwu@zju.edu.cn"
"email": "zezhengwu@proton.me"
},

@@ -59,6 +59,14 @@ "keywords": [

"scripts": {
"lint": "eslint . --ext .ts",
"update-hooks": "simple-git-hooks",
"changeset": "changeset",
"bump": "changeset version 2>/dev/null | grep . && npm i; exit 0",
"lint": "biome lint .",
"type-check": "tsc --noEmit --emitDeclarationOnly false",
"format": "prettier . --write",
"prebuild": "npm run lint && npm run type-check && npm run format",
"format:prettier": "prettier . --write",
"format:biome": "biome format . --write",
"format": "conc \"npm:format:prettier\" \"npm:format:biome\"",
"check:biome": "biome check --apply .",
"check": "conc \"npm:format:prettier\" \"npm:check:biome\"",
"clear:dist": "rimraf dist",
"prebuild": "npm run check && npm run type-check && npm run clear:dist",
"build:es": "vite build",

@@ -70,2 +78,4 @@ "build:cjs": "tsx ./scripts/build-cjs.ts",

"postbuild:cjs": "tsc --declarationDir ./dist/cjs",
"prebuild:ci": "npm run type-check && npm run clear:dist",
"build:ci": "conc \"npm:build:es\" \"npm:build:cjs\" \"npm:build:iife\"",
"start": "vite preview --outDir ./tests --port $npm_package_config_port -l silent",

@@ -79,29 +89,33 @@ "pretest": "tsx ./scripts/list-dir.ts",

"prepublishOnly": "npm run build",
"ncu": "npx npm-check-updates --filterVersion \"/^[~^]/\" -u",
"ncu": "ncu",
"postncu": "npm i",
"bump-zxing-wasm": "npm i zxing-wasm@latest --save-exact"
"bump-zxing-wasm": "npm i zxing-wasm@latest --save-exact",
"bump-biome": "npm i @biomejs/biome@latest --save-exact"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"@vitest/browser": "^1.1.0",
"@vitest/coverage-istanbul": "^1.1.0",
"@vitest/ui": "^1.1.0",
"@biomejs/biome": "^1.5.3",
"@changesets/cli": "^2.27.1",
"@commitlint/cli": "^18.6.0",
"@commitlint/config-conventional": "^18.6.0",
"@vitest/browser": "^1.2.2",
"@vitest/coverage-istanbul": "^1.2.2",
"@vitest/ui": "^1.2.2",
"concurrently": "^8.2.2",
"eslint": "^8.56.0",
"http-server": "^14.1.1",
"npm-check-updates": "^16.14.12",
"playwright": "^1.40.1",
"prettier": "^3.1.1",
"lint-staged": "^15.2.1",
"npm-check-updates": "^16.14.14",
"playwright": "^1.41.1",
"prettier": "^3.2.4",
"rimraf": "^5.0.5",
"simple-git-hooks": "^2.9.0",
"start-server-and-test": "^2.0.3",
"tsx": "^4.7.0",
"typescript": "^5.3.3",
"vite": "^5.0.10",
"vitest": "^1.1.0"
"vite": "^5.0.12",
"vitest": "^1.2.2"
},
"dependencies": {
"@types/dom-webcodecs": "^0.1.11",
"zxing-wasm": "1.1.3"
"zxing-wasm": "1.2.3"
}
}

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc