barcode-detector 3.0.8 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
1
1
  import type { ReadInputBarcodeFormat, ReadOutputBarcodeFormat } from "zxing-wasm/reader";
2
2
  export type CanvasImageSourceWebCodecs = HTMLOrSVGImageElement | HTMLVideoElement | HTMLCanvasElement | ImageBitmap | OffscreenCanvas | VideoFrame;
3
3
  export type ImageBitmapSourceWebCodecs = CanvasImageSourceWebCodecs | Blob | ImageData;
4
- export declare const BARCODE_FORMATS: ("aztec" | "code_128" | "code_39" | "code_93" | "codabar" | "databar" | "databar_expanded" | "databar_limited" | "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" | "any" | "unknown")[];
4
+ export declare const BARCODE_FORMATS: ("aztec" | "aztec_code" | "aztec_rune" | "code_128" | "code_39" | "code_39_standard" | "code_39_extended" | "code_32" | "pzn" | "code_93" | "codabar" | "databar" | "databar_omni" | "databar_stacked" | "databar_stacked_omni" | "databar_expanded" | "databar_expanded_stacked" | "databar_limited" | "data_matrix" | "dx_film_edge" | "ean_13" | "ean_upc" | "isbn" | "ean_8" | "itf" | "itf_14" | "maxi_code" | "micro_qr_code" | "pdf417" | "compact_pdf417" | "qr_code" | "qr_code_model_1" | "qr_code_model_2" | "rm_qr_code" | "upc_a" | "upc_e" | "other_barcode" | "linear_codes" | "matrix_codes" | "gs1_codes" | "retail_codes" | "industrial_codes" | "any" | "unknown")[];
5
5
  export type BarcodeFormat = (typeof BARCODE_FORMATS)[number];
6
- export type ReadResultBarcodeFormat = Exclude<BarcodeFormat, "linear_codes" | "matrix_codes" | "any">;
7
- export declare const formatMap: Map<"aztec" | "code_128" | "code_39" | "code_93" | "codabar" | "databar" | "databar_expanded" | "databar_limited" | "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" | "any" | "unknown", ReadInputBarcodeFormat>;
6
+ export type ReadResultBarcodeFormat = Exclude<BarcodeFormat, "linear_codes" | "matrix_codes" | "gs1_codes" | "retail_codes" | "industrial_codes" | "any">;
7
+ export declare const formatMap: Map<"aztec" | "aztec_code" | "aztec_rune" | "code_128" | "code_39" | "code_39_standard" | "code_39_extended" | "code_32" | "pzn" | "code_93" | "codabar" | "databar" | "databar_omni" | "databar_stacked" | "databar_stacked_omni" | "databar_expanded" | "databar_expanded_stacked" | "databar_limited" | "data_matrix" | "dx_film_edge" | "ean_13" | "ean_upc" | "isbn" | "ean_8" | "itf" | "itf_14" | "maxi_code" | "micro_qr_code" | "pdf417" | "compact_pdf417" | "qr_code" | "qr_code_model_1" | "qr_code_model_2" | "rm_qr_code" | "upc_a" | "upc_e" | "other_barcode" | "linear_codes" | "matrix_codes" | "gs1_codes" | "retail_codes" | "industrial_codes" | "any" | "unknown", ReadInputBarcodeFormat>;
8
8
  export declare function convertFormat(target: ReadOutputBarcodeFormat): ReadResultBarcodeFormat;
9
9
  export declare function isBlob(image: ImageBitmapSourceWebCodecs): image is Blob;
10
10
  export declare function getImageDataOrBlobFromImageBitmapSource(image: ImageBitmapSourceWebCodecs): Promise<ImageData | Blob | null>;
@@ -1 +1 @@
1
- var BarcodeDetectionAPI=(function(E){"use strict";var nr=E=>{throw TypeError(E)};var ar=(E,M,F)=>M.has(E)||nr("Cannot "+F);var or=(E,M,F)=>(ar(E,M,"read from private field"),F?F.call(E):M.get(E)),ir=(E,M,F)=>M.has(E)?nr("Cannot add the same private member more than once"):M instanceof WeakSet?M.add(E):M.set(E,F),sr=(E,M,F,yt)=>(ar(E,M,"write to private field"),yt?yt.call(E,F):M.set(E,F),F);var it,pe;const M=[["Aztec","M"],["Codabar","L"],["Code39","L"],["Code93","L"],["Code128","L"],["DataBar","L"],["DataBarExpanded","L"],["DataMatrix","M"],["EAN-8","L"],["EAN-13","L"],["ITF","L"],["MaxiCode","M"],["PDF417","M"],["QRCode","M"],["UPC-A","L"],["UPC-E","L"],["MicroQRCode","M"],["rMQRCode","M"],["DXFilmEdge","L"],["DataBarLimited","L"]],F=M.map(([i])=>i),yt=F.filter((i,f)=>M[f][1]==="L"),ur=F.filter((i,f)=>M[f][1]==="M");function Rt(i){switch(i){case"Linear-Codes":return yt.reduce((f,h)=>f|Rt(h),0);case"Matrix-Codes":return ur.reduce((f,h)=>f|Rt(h),0);case"Any":return(1<<M.length)-1;case"None":return 0;default:return 1<<F.indexOf(i)}}function cr(i){if(i===0)return"None";const f=31-Math.clz32(i);return F[f]}function lr(i){return i.reduce((f,h)=>f|Rt(h),0)}const fr=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function dr(i){return fr.indexOf(i)}const te=["Unknown","ASCII","ISO8859_1","ISO8859_2","ISO8859_3","ISO8859_4","ISO8859_5","ISO8859_6","ISO8859_7","ISO8859_8","ISO8859_9","ISO8859_10","ISO8859_11","ISO8859_13","ISO8859_14","ISO8859_15","ISO8859_16","Cp437","Cp1250","Cp1251","Cp1252","Cp1256","Shift_JIS","Big5","GB2312","GB18030","EUC_JP","EUC_KR","UTF16BE","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function hr(i){return i==="UnicodeBig"?te.indexOf("UTF16BE"):te.indexOf(i)}const pr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function yr(i){return pr[i]}const vr=["Ignore","Read","Require"];function mr(i){return vr.indexOf(i)}const gr=["Plain","ECI","HRI","Hex","Escaped"];function wr(i){return gr.indexOf(i)}const vt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown"};function ee(i){return{...i,formats:lr(i.formats),binarizer:dr(i.binarizer),eanAddOnSymbol:mr(i.eanAddOnSymbol),textMode:wr(i.textMode),characterSet:hr(i.characterSet)}}function br(i){return{...i,format:cr(i.format),contentType:yr(i.contentType),eccLevel:i.ecLevel}}const $r="2.2.4",Cr="fba4e9503fee4518ca2e89510baeea9bcc36dc8d",Tr={locateFile:(i,f)=>{const h=i.match(/_(.+?)\.wasm$/);return h?`https://fastly.jsdelivr.net/npm/zxing-wasm@2.2.4/dist/${h[1]}/${i}`:f+i}},mt=new WeakMap;function Pr(i,f){return Object.is(i,f)||Object.keys(i).length===Object.keys(f).length&&Object.keys(i).every(h=>Object.hasOwn(f,h)&&i[h]===f[h])}function re(i,{overrides:f,equalityFn:h=Pr,fireImmediately:C=!1}={}){var l;const[x,A]=(l=mt.get(i))!=null?l:[Tr],R=f!=null?f:x;let S;if(C){if(A&&(S=h(x,R)))return A;const B=i({...R});return mt.set(i,[R,B]),B}(S!=null?S:h(x,R))||mt.set(i,[R])}function Er(i){mt.delete(i)}async function Or(i,f,h=vt){const C={...vt,...h},l=await re(i,{fireImmediately:!0});let x,A;if("width"in f&&"height"in f&&"data"in f){const{data:S,data:{byteLength:B},width:H,height:Y}=f;A=l._malloc(B),l.HEAPU8.set(S,A),x=l.readBarcodesFromPixmap(A,H,Y,ee(C))}else{let S,B;if("buffer"in f)[S,B]=[f.byteLength,f];else if("byteLength"in f)[S,B]=[f.byteLength,new Uint8Array(f)];else if("size"in f)[S,B]=[f.size,new Uint8Array(await f.arrayBuffer())];else throw new TypeError("Invalid input type");A=l._malloc(S),l.HEAPU8.set(B,A),x=l.readBarcodesFromImage(A,S,ee(C))}l._free(A);const R=[];for(let S=0;S<x.size();++S)R.push(br(x.get(S)));return R}({...vt,formats:[...vt.formats]});async function Bt(i={}){var f,h,C,l=i,x=!!globalThis.window,A=typeof Bun<"u",R=!!globalThis.WorkerGlobalScope;!((h=globalThis.process)===null||h===void 0||(h=h.versions)===null||h===void 0)&&h.node&&((C=globalThis.process)===null||C===void 0?void 0:C.type)!="renderer";var S="./this.program",B,H="";function Y(t){return l.locateFile?l.locateFile(t,H):H+t}var nt,Z;if(x||R||A){try{H=new URL(".",B).href}catch{}R&&(Z=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),nt=async t=>{var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)}}var st=console.log.bind(console),k=console.error.bind(console),Q,gt=!1,ye,ve,J,N,wt,ut,ct,T,me,ge,we=!1;function be(){var t=xt.buffer;J=new Int8Array(t),wt=new Int16Array(t),l.HEAPU8=N=new Uint8Array(t),ut=new Uint16Array(t),ct=new Int32Array(t),T=new Uint32Array(t),me=new Float32Array(t),ge=new Float64Array(t)}function Xr(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)an(l.preRun.shift());$e(Te)}function qr(){we=!0,pt.xa()}function Yr(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)nn(l.postRun.shift());$e(Ce)}function Ut(t){var e,r;(e=l.onAbort)===null||e===void 0||e.call(l,t),t="Aborted("+t+")",k(t),gt=!0,t+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(t);throw(r=ve)===null||r===void 0||r(n),n}var bt;function Zr(){return Y("zxing_reader.wasm")}function Qr(t){if(t==bt&&Q)return new Uint8Array(Q);if(Z)return Z(t);throw"both async and sync fetching of the wasm failed"}async function Jr(t){if(!Q)try{var e=await nt(t);return new Uint8Array(e)}catch{}return Qr(t)}async function Kr(t,e){try{var r=await Jr(t),n=await WebAssembly.instantiate(r,e);return n}catch(a){k(`failed to asynchronously prepare wasm: ${a}`),Ut(a)}}async function tn(t,e,r){if(!t&&WebAssembly.instantiateStreaming)try{var n=fetch(e,{credentials:"same-origin"}),a=await WebAssembly.instantiateStreaming(n,r);return a}catch(o){k(`wasm streaming compile failed: ${o}`),k("falling back to ArrayBuffer instantiation")}return Kr(e,r)}function en(){var t={a:ja};return t}async function rn(){function t(o,s){return pt=o.exports,Ba(pt),be(),pt}function e(o){return t(o.instance)}var r=en();if(l.instantiateWasm)return new Promise((o,s)=>{l.instantiateWasm(r,(u,c)=>{o(t(u))})});bt!=null||(bt=Zr());var n=await tn(Q,bt,r),a=e(n);return a}var $e=t=>{for(;t.length>0;)t.shift()(l)},Ce=[],nn=t=>Ce.push(t),Te=[],an=t=>Te.push(t),m=t=>ze(t),g=()=>Ge(),$t=[],Ct=0,on=t=>{var e=new Vt(t);return e.get_caught()||(e.set_caught(!0),Ct--),e.set_rethrown(!1),$t.push(e),qe(t),ke(t)},z=0,sn=()=>{v(0,0);var t=$t.pop();Xe(t.excPtr),z=0};class Vt{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){T[this.ptr+4>>2]=e}get_type(){return T[this.ptr+4>>2]}set_destructor(e){T[this.ptr+8>>2]=e}get_destructor(){return T[this.ptr+8>>2]}set_caught(e){e=e?1:0,J[this.ptr+12]=e}get_caught(){return J[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,J[this.ptr+13]=e}get_rethrown(){return J[this.ptr+13]!=0}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){T[this.ptr+16>>2]=e}get_adjusted_ptr(){return T[this.ptr+16>>2]}}var Tt=t=>Ne(t),Wt=t=>{var e=z;if(!e)return Tt(0),0;var r=new Vt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a of t){if(a===0||a===n)break;var o=r.ptr+16;if(Ye(a,n,o))return Tt(a),e}return Tt(n),e},un=()=>Wt([]),cn=t=>Wt([t]),ln=(t,e)=>Wt([t,e]),fn=()=>{var t=$t.pop();t||Ut("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||($t.push(t),t.set_rethrown(!0),t.set_caught(!1),Ct++),z=e,z},dn=(t,e,r)=>{var n=new Vt(t);throw n.init(e,r),z=t,Ct++,z},hn=()=>Ct,pn=t=>{throw z||(z=t),z},yn=()=>Ut(""),Pt={},Ht=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function lt(t){return this.fromWireType(T[t>>2])}var at={},K={},Et={},vn=class extends Error{constructor(t){super(t),this.name="InternalError"}},Ot=t=>{throw new vn(t)},tt=(t,e,r)=>{t.forEach(u=>Et[u]=e);function n(u){var c=r(u);c.length!==t.length&&Ot("Mismatched type converter count");for(var d=0;d<t.length;++d)V(t[d],c[d])}var a=new Array(e.length),o=[],s=0;{const u=e;for(let c=0;c<u.length;++c){const d=u[c];K.hasOwnProperty(d)?a[c]=K[d]:(o.push(d),at.hasOwnProperty(d)||(at[d]=[]),at[d].push(()=>{a[c]=K[d],++s,s===o.length&&n(a)}))}}o.length===0&&n(a)},mn=t=>{var e=Pt[t];delete Pt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));tt([t],o,s=>{var u={};{const c=a;for(let d=0;d<c.length;++d){const p=c[d],y=s[d],$=p.getter,O=p.getterContext,I=s[d+a.length],D=p.setter,_=p.setterContext;u[p.fieldName]={read:P=>y.fromWireType($(O,P)),write:(P,rt)=>{var L=[];D(_,P,I.toWireType(L,rt)),Ht(L)},optional:y.optional}}}return[{name:e.name,fromWireType:c=>{var d={};for(var p in u)d[p]=u[p].read(c);return n(c),d},toWireType:(c,d)=>{for(var p in u)if(!(p in d)&&!u[p].optional)throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in u)u[p].write(y,d[p]);return c!==null&&c.push(n,y),y},readValueFromPointer:lt,destructorFunction:n}]})},gn=(t,e,r,n,a)=>{},j=t=>{for(var e="";;){var r=N[t++];if(!r)return e;e+=String.fromCharCode(r)}},ft=class extends Error{constructor(t){super(t),this.name="BindingError"}},b=t=>{throw new ft(t)};function wn(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(t||b(`type "${n}" must have a positive integer typeid pointer`),K.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;b(`Cannot register type '${n}' twice`)}if(K[t]=e,delete Et[t],at.hasOwnProperty(t)){var a=at[t];delete at[t],a.forEach(o=>o())}}function V(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return wn(t,e,r)}var bn=(t,e,r,n)=>{e=j(e),V(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},readValueFromPointer:function(a){return this.fromWireType(N[a])},destructorFunction:null})},$n=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),kt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}b(e(t)+" instance already deleted")},Nt=!1,Pe=t=>{},Cn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Ee=t=>{t.count.value-=1;var e=t.count.value===0;e&&Cn(t)},dt=t=>globalThis.FinalizationRegistry?(Nt=new FinalizationRegistry(e=>{Ee(e.$$)}),dt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Nt.register(e,a,e)}return e},Pe=e=>Nt.unregister(e),dt(t)):(dt=e=>e,t),Tn=()=>{let t=_t.prototype;Object.assign(t,{isAliasOf(r){if(!(this instanceof _t)||!(r instanceof _t))return!1;var n=this.$$.ptrType.registeredClass,a=this.$$.ptr;r.$$=r.$$;for(var o=r.$$.ptrType.registeredClass,s=r.$$.ptr;n.baseClass;)a=n.upcast(a),n=n.baseClass;for(;o.baseClass;)s=o.upcast(s),o=o.baseClass;return n===o&&a===s},clone(){if(this.$$.ptr||kt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=dt(Object.create(Object.getPrototypeOf(this),{$$:{value:$n(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&b("Object already scheduled for deletion"),Pe(this),Ee(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&b("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});const e=Symbol.dispose;e&&(t[e]=t.delete)};function _t(){}var zt=(t,e)=>Object.defineProperty(e,"name",{value:t}),Oe={},_e=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return t[e].overloadTable.hasOwnProperty(o.length)||b(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[o.length].apply(this,o)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Se=(t,e,r)=>{l.hasOwnProperty(t)?((r===void 0||l[t].overloadTable!==void 0&&l[t].overloadTable[r]!==void 0)&&b(`Cannot register public name '${t}' twice`),_e(l,t,t),l[t].overloadTable.hasOwnProperty(r)&&b(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),l[t].overloadTable[r]=e):(l[t]=e,l[t].argCount=r)},Pn=48,En=57,On=t=>{t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Pn&&e<=En?`_${t}`:t};function _n(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 Gt=(t,e,r)=>{for(;e!==r;)e.upcast||b(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t},Xt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t};function Sn(t,e){if(e===null)return this.isReference&&b(`null is not a valid ${this.name}`),0;e.$$||b(`Cannot pass "${Xt(e)}" as a ${this.name}`),e.$$.ptr||b(`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 Dn(t,e){var r;if(e===null)return this.isReference&&b(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&b(`Cannot pass "${Xt(e)}" as a ${this.name}`),e.$$.ptr||b(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&b(`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&&b("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:b(`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,W.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:b("Unsupporting sharing policy")}return r}function In(t,e){if(e===null)return this.isReference&&b(`null is not a valid ${this.name}`),0;e.$$||b(`Cannot pass "${Xt(e)}" as a ${this.name}`),e.$$.ptr||b(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&b(`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}var De=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=De(t,e,r.baseClass);return n===null?null:r.downcast(n)},xn={},Mn=(t,e)=>{for(e===void 0&&b("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},An=(t,e)=>(e=Mn(t,e),xn[e]),St=(t,e)=>{(!e.ptrType||!e.ptr)&&Ot("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ot("Both smartPtrType and smartPtr must be specified"),e.count={value:1},dt(Object.create(t,{$$:{value:e,writable:!0}}))};function Fn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=An(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=Oe[o];if(!s)return a.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var c=De(e,this.registeredClass,u.registeredClass);return c===null?a.call(this):this.isSmartPointer?St(u.registeredClass.instancePrototype,{ptrType:u,ptr:c,smartPtrType:this,smartPtr:t}):St(u.registeredClass.instancePrototype,{ptrType:u,ptr:c})}var Rn=()=>{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)},readValueFromPointer:lt,fromWireType:Fn})};function Dt(t,e,r,n,a,o,s,u,c,d,p){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=c,this.rawShare=d,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=Sn,this.destructorFunction=null):(this.toWireType=In,this.destructorFunction=null):this.toWireType=Dn}var Ie=(t,e,r)=>{l.hasOwnProperty(t)||Ot("Replacing nonexistent public symbol"),l[t].overloadTable!==void 0&&r!==void 0?l[t].overloadTable[r]=e:(l[t]=e,l[t].argCount=r)},X={},Bn=(t,e,r)=>{t=t.replace(/p/g,"i");var n=X[t];return n(e,...r)},xe=[],w=t=>{var e=xe[t];return e||(xe[t]=e=Je.get(t)),e},jn=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t.includes("j"))return Bn(t,e,r);var n=w(e),a=n(...r);return a},Ln=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return jn(t,e,a,r)}},U=function(t,e){t=j(t);function r(){if(t.includes("j"))return Ln(t,e);var a=w(e);return a}var n=r();return typeof n!="function"&&b(`unknown function pointer with signature ${t}: ${e}`),n};class Un extends Error{}var Me=t=>{var e=He(t),r=j(e);return q(e),r},It=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!K[o]){if(Et[o]){Et[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Un(`${t}: `+r.map(Me).join([", "]))},Vn=(t,e,r,n,a,o,s,u,c,d,p,y,$)=>{p=j(p),o=U(a,o),u&&(u=U(s,u)),d&&(d=U(c,d)),$=U(y,$);var O=On(p);Se(O,function(){It(`Cannot construct ${p} due to unbound types`,[n])}),tt([t,e,r],n?[n]:[],I=>{I=I[0];var D,_;n?(D=I.registeredClass,_=D.instancePrototype):_=_t.prototype;var P=zt(p,function(){if(Object.getPrototypeOf(this)!==rt)throw new ft(`Use 'new' to construct ${p}`);if(L.constructor_body===void 0)throw new ft(`${p} has no accessible constructor`);for(var er=arguments.length,At=new Array(er),Ft=0;Ft<er;Ft++)At[Ft]=arguments[Ft];var rr=L.constructor_body[At.length];if(rr===void 0)throw new ft(`Tried to invoke ctor of ${p} with invalid number of parameters (${At.length}) - expected (${Object.keys(L.constructor_body).toString()}) parameters instead!`);return rr.apply(this,At)}),rt=Object.create(_,{constructor:{value:P}});P.prototype=rt;var L=new _n(p,P,rt,$,D,o,u,d);if(L.baseClass){var G,Mt;(Mt=(G=L.baseClass).__derivedClasses)!==null&&Mt!==void 0||(G.__derivedClasses=[]),L.baseClass.__derivedClasses.push(L)}var $o=new Dt(p,L,!0,!1,!1),Ke=new Dt(p+"*",L,!1,!1,!1),tr=new Dt(p+" const*",L,!1,!0,!1);return Oe[t]={pointerType:Ke,constPointerType:tr},Ie(O,P),[$o,Ke,tr]})},qt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(T[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 Yt(t,e,r,n,a,o){var s=e.length;s<2&&b("argTypes array size mismatch! Must at least get return value and 'this' types!");var u=e[1]!==null&&r!==null,c=Wn(e),d=!e[0].isVoid,p=s-2,y=new Array(p),$=[],O=[],I=function(){O.length=0;var D;$.length=u?2:1,$[0]=a,u&&(D=e[1].toWireType(O,this),$[1]=D);for(var _=0;_<p;++_)y[_]=e[_+2].toWireType(O,_<0||arguments.length<=_?void 0:arguments[_]),$.push(y[_]);var P=n(...$);function rt(L){if(c)Ht(O);else for(var G=u?1:2;G<e.length;G++){var Mt=G===1?D:y[G-2];e[G].destructorFunction!==null&&e[G].destructorFunction(Mt)}if(d)return e[0].fromWireType(L)}return rt(P)};return zt(t,I)}var Hn=(t,e,r,n,a,o)=>{var s=qt(e,r);a=U(n,a),tt([],[t],u=>{u=u[0];var c=`constructor ${u.name}`;if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[e-1]!==void 0)throw new ft(`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]=()=>{It(`Cannot construct ${u.name} due to unbound types`,s)},tt([],s,d=>(d.splice(1,0,null),u.registeredClass.constructor_body[e-1]=Yt(c,d,null,a,o),[])),[]})},Ae=t=>{t=t.trim();const e=t.indexOf("(");return e===-1?t:t.slice(0,e)},kn=(t,e,r,n,a,o,s,u,c,d)=>{var p=qt(r,n);e=j(e),e=Ae(e),o=U(a,o),tt([],[t],y=>{y=y[0];var $=`${y.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&y.registeredClass.pureVirtualFunctions.push(e);function O(){It(`Cannot call ${$} due to unbound types`,p)}var I=y.registeredClass.instancePrototype,D=I[e];return D===void 0||D.overloadTable===void 0&&D.className!==y.name&&D.argCount===r-2?(O.argCount=r-2,O.className=y.name,I[e]=O):(_e(I,e,$),I[e].overloadTable[r-2]=O),tt([],p,_=>{var P=Yt($,_,y,o,s);return I[e].overloadTable===void 0?(P.argCount=r-2,I[e]=P):I[e].overloadTable[r-2]=P,[]}),[]})},Fe=[],et=[0,1,,1,null,1,!0,1,!1,1],Zt=t=>{t>9&&--et[t+1]===0&&(et[t]=void 0,Fe.push(t))},W={toValue:t=>(t||b(`Cannot use deleted val. handle = ${t}`),et[t]),toHandle:t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=Fe.pop()||et.length;return et[e]=t,et[e+1]=1,e}}}},Re={name:"emscripten::val",fromWireType:t=>{var e=W.toValue(t);return Zt(t),e},toWireType:(t,e)=>W.toHandle(e),readValueFromPointer:lt,destructorFunction:null},Nn=t=>V(t,Re),zn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(me[r>>2])};case 8:return function(r){return this.fromWireType(ge[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Gn=(t,e,r)=>{e=j(e),V(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,readValueFromPointer:zn(e,r),destructorFunction:null})},Xn=(t,e,r,n,a,o,s,u)=>{var c=qt(e,r);t=j(t),t=Ae(t),a=U(n,a),Se(t,function(){It(`Cannot call ${t} due to unbound types`,c)},e-1),tt([],c,d=>{var p=[d[0],null].concat(d.slice(1));return Ie(t,Yt(t,p,null,a,o),e-1),[]})},qn=(t,e,r)=>{switch(e){case 1:return r?n=>J[n]:n=>N[n];case 2:return r?n=>wt[n>>1]:n=>ut[n>>1];case 4:return r?n=>ct[n>>2]:n=>T[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Yn=(t,e,r,n,a)=>{e=j(e);const o=n===0;let s=c=>c;if(o){var u=32-8*r;s=c=>c<<u>>>u,a=s(a)}V(t,{name:e,fromWireType:s,toWireType:(c,d)=>d,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],c=T[s+4>>2];return new a(J.buffer,c,u)}r=j(r),V(t,{name:r,fromWireType:o,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Qn=Object.assign({optional:!0},Re),Jn=(t,e)=>{V(t,Qn)},Kn=(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.codePointAt(s);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,s++}}return e[r]=0,r-a},ot=(t,e,r)=>Kn(t,N,e,r),Be=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},je=globalThis.TextDecoder&&new TextDecoder,Le=(t,e,r,n)=>{var a=e+r;if(n)return a;for(;t[e]&&!(e>=a);)++e;return e},Ue=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;var a=Le(t,e,r,n);if(a-e>16&&t.buffer&&je)return je.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 c=t[e++]&63;if((s&240)==224?s=(s&15)<<12|u<<6|c:s=(s&7)<<18|u<<12|c<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var d=s-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},ta=(t,e,r)=>t?Ue(N,t,e,r):"",ea=(t,e)=>{e=j(e),V(t,{name:e,fromWireType(r){var n=T[r>>2],a=r+4,o;return o=ta(a,n,!0),q(r),o},toWireType(r,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var a,o=typeof n=="string";o||ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT==1||b("Cannot pass non-string to std::string"),o?a=Be(n):a=n.length;var s=Kt(4+a+1),u=s+4;return T[s>>2]=a,o?ot(n,u,a+1):N.set(n,u),r!==null&&r.push(q,s),s},readValueFromPointer:lt,destructorFunction(r){q(r)}})},Ve=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,ra=(t,e,r)=>{var n=t>>1,a=Le(ut,n,e/2,r);if(a-n>16&&Ve)return Ve.decode(ut.subarray(n,a));for(var o="",s=n;s<a;++s){var u=ut[s];o+=String.fromCharCode(u)}return o},na=(t,e,r)=>{if(r!=null||(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var s=t.charCodeAt(o);wt[e>>1]=s,e+=2}return wt[e>>1]=0,e-n},aa=t=>t.length*2,oa=(t,e,r)=>{for(var n="",a=t>>2,o=0;!(o>=e/4);o++){var s=T[a+o];if(!s&&!r)break;n+=String.fromCodePoint(s)}return n},ia=(t,e,r)=>{if(r!=null||(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var s=t.codePointAt(o);if(s>65535&&o++,ct[e>>2]=s,e+=4,e+4>a)break}return ct[e>>2]=0,e-n},sa=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.codePointAt(r);n>65535&&r++,e+=4}return e},ua=(t,e,r)=>{r=j(r);var n,a,o;e===2?(n=ra,a=na,o=aa):(n=oa,a=ia,o=sa),V(t,{name:r,fromWireType:s=>{var u=T[s>>2],c=n(s+4,u*e,!0);return q(s),c},toWireType:(s,u)=>{typeof u!="string"&&b(`Cannot pass non-string to C++ string type ${r}`);var c=o(u),d=Kt(4+c+e);return T[d>>2]=c/e,a(u,d+4,c+e),s!==null&&s.push(q,d),d},readValueFromPointer:lt,destructorFunction(s){q(s)}})},ca=(t,e,r,n,a,o)=>{Pt[t]={name:j(e),rawConstructor:U(r,n),rawDestructor:U(a,o),fields:[]}},la=(t,e,r,n,a,o,s,u,c,d)=>{Pt[t].fields.push({fieldName:j(e),getterReturnType:r,getter:U(n,a),getterContext:o,setterArgumentType:s,setter:U(u,c),setterContext:d})},fa=(t,e)=>{e=j(e),V(t,{isVoid:!0,name:e,fromWireType:()=>{},toWireType:(r,n)=>{}})},Qt=[],da=t=>{var e=Qt.length;return Qt.push(t),e},ha=(t,e)=>{var r=K[t];return r===void 0&&b(`${e} has unknown type ${Me(t)}`),r},pa=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=ha(T[e+n*4>>2],`parameter ${n}`);return r},ya=(t,e,r)=>{var n=[],a=t(n,r);return n.length&&(T[e>>2]=W.toHandle(n)),a},va={},We=t=>{var e=va[t];return e===void 0?j(t):e},ma=(t,e,r)=>{var n=8,[a,...o]=pa(t,e),s=a.toWireType.bind(a),u=o.map(y=>y.readValueFromPointer.bind(y));t--;var c=new Array(t),d=(y,$,O,I)=>{for(var D=0,_=0;_<t;++_)c[_]=u[_](I+D),D+=n;var P;switch(r){case 0:P=W.toValue(y).apply(null,c);break;case 2:P=Reflect.construct(W.toValue(y),c);break;case 3:P=c[0];break;case 1:P=W.toValue(y)[We($)](...c);break}return ya(s,O,P)},p=`methodCaller<(${o.map(y=>y.name)}) => ${a.name}>`;return da(zt(p,d))},ga=t=>t?(t=We(t),W.toHandle(globalThis[t])):W.toHandle(globalThis),wa=t=>{t>9&&(et[t+1]+=1)},ba=(t,e,r,n,a)=>Qt[t](e,r,n,a),$a=t=>{var e=W.toValue(t);Ht(e),Zt(t)},Ca=(t,e,r,n)=>{var a=new Date().getFullYear(),o=new Date(a,0,1),s=new Date(a,6,1),u=o.getTimezoneOffset(),c=s.getTimezoneOffset(),d=Math.max(u,c);T[t>>2]=d*60,ct[e>>2]=+(u!=c);var p=O=>{var I=O>=0?"-":"+",D=Math.abs(O),_=String(Math.floor(D/60)).padStart(2,"0"),P=String(D%60).padStart(2,"0");return`UTC${I}${_}${P}`},y=p(u),$=p(c);c<u?(ot(y,r,17),ot($,n,17)):(ot(y,n,17),ot($,r,17))},Ta=()=>2147483648,Pa=(t,e)=>Math.ceil(t/e)*e,Ea=t=>{var e=xt.buffer.byteLength,r=(t-e+65535)/65536|0;try{return xt.grow(r),be(),1}catch{}},Oa=t=>{var e=N.length;t>>>=0;var r=Ta();if(t>r)return!1;for(var n=1;n<=4;n*=2){var a=e*(1+.2/n);a=Math.min(a,t+100663296);var o=Math.min(r,Pa(Math.max(t,a),65536)),s=Ea(o);if(s)return!0}return!1},Jt={},_a=()=>S||"./this.program",ht=()=>{if(!ht.strings){var t=(typeof navigator=="object"&&navigator.language||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:_a()};for(var r in Jt)Jt[r]===void 0?delete e[r]:e[r]=Jt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);ht.strings=n}return ht.strings},Sa=(t,e)=>{var r=0,n=0;for(var a of ht()){var o=e+r;T[t+n>>2]=o,r+=ot(a,o,1/0)+1,n+=4}return 0},Da=(t,e)=>{var r=ht();T[t>>2]=r.length;var n=0;for(var a of r)n+=Be(a)+1;return T[e>>2]=n,0},Ia=t=>52;function xa(t,e,r,n,a){return 70}var Ma=[null,[],[]],Aa=(t,e)=>{var r=Ma[t];e===0||e===10?((t===1?st:k)(Ue(r)),r.length=0):r.push(e)},Fa=(t,e,r,n)=>{for(var a=0,o=0;o<r;o++){var s=T[e>>2],u=T[e+4>>2];e+=8;for(var c=0;c<u;c++)Aa(t,N[s+c]);a+=u}return T[n>>2]=a,0},Ra=t=>t;if(Tn(),Rn(),l.noExitRuntime&&l.noExitRuntime,l.print&&(st=l.print),l.printErr&&(k=l.printErr),l.wasmBinary&&(Q=l.wasmBinary),l.arguments&&l.arguments,l.thisProgram&&(S=l.thisProgram),l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.shift()();var He,q,Kt,ke,v,Ne,ze,Ge,Xe,qe,Ye,Ze,Qe,xt,Je;function Ba(t){He=t.ya,q=l._free=t.za,Kt=l._malloc=t.Ba,ke=t.Ca,v=t.Da,Ne=t.Ea,ze=t.Fa,Ge=t.Ga,Xe=t.Ha,qe=t.Ia,Ye=t.Ja,X.viijii=t.Ka,Ze=X.iiijj=t.La,X.jiji=t.Ma,Qe=X.jiiii=t.Na,X.iiiiij=t.Oa,X.iiiiijj=t.Pa,X.iiiiiijj=t.Qa,xt=t.wa,Je=t.Aa}var ja={s:on,w:sn,a:un,j:cn,m:ln,Q:fn,p:dn,U:hn,d:pn,ca:yn,ta:mn,ba:gn,oa:bn,ra:Vn,qa:Hn,H:kn,ma:Nn,X:Gn,Y:Xn,x:Yn,t:Zn,sa:Jn,na:ea,R:ua,I:ca,ua:la,pa:fa,N:ma,va:Zt,D:ga,S:wa,M:ba,ia:$a,da:Ca,ga:Oa,ea:Sa,fa:Da,ha:Ia,$:xa,V:Fa,K:io,C:co,Z:Na,T:vo,r:ro,b:Ha,E:oo,ka:fo,c:za,ja:ho,h:ka,i:qa,q:Ja,P:ao,v:to,F:eo,L:no,z:lo,J:mo,aa:go,_:wo,f:Ga,l:La,e:Wa,g:Va,O:yo,k:Ua,la:so,o:Ka,B:Ya,u:uo,W:Qa,A:po,n:Xa,G:Za,y:Ra};function La(t,e){var r=g();try{w(t)(e)}catch(n){if(m(r),n!==n+0)throw n;v(1,0)}}function Ua(t,e,r,n,a){var o=g();try{w(t)(e,r,n,a)}catch(s){if(m(o),s!==s+0)throw s;v(1,0)}}function Va(t,e,r,n){var a=g();try{w(t)(e,r,n)}catch(o){if(m(a),o!==o+0)throw o;v(1,0)}}function Wa(t,e,r){var n=g();try{w(t)(e,r)}catch(a){if(m(n),a!==a+0)throw a;v(1,0)}}function Ha(t,e){var r=g();try{return w(t)(e)}catch(n){if(m(r),n!==n+0)throw n;v(1,0)}}function ka(t,e,r,n){var a=g();try{return w(t)(e,r,n)}catch(o){if(m(a),o!==o+0)throw o;v(1,0)}}function Na(t,e,r,n,a,o){var s=g();try{return w(t)(e,r,n,a,o)}catch(u){if(m(s),u!==u+0)throw u;v(1,0)}}function za(t,e,r){var n=g();try{return w(t)(e,r)}catch(a){if(m(n),a!==a+0)throw a;v(1,0)}}function Ga(t){var e=g();try{w(t)()}catch(r){if(m(e),r!==r+0)throw r;v(1,0)}}function Xa(t,e,r,n,a,o,s,u,c,d,p){var y=g();try{w(t)(e,r,n,a,o,s,u,c,d,p)}catch($){if(m(y),$!==$+0)throw $;v(1,0)}}function qa(t,e,r,n,a){var o=g();try{return w(t)(e,r,n,a)}catch(s){if(m(o),s!==s+0)throw s;v(1,0)}}function Ya(t,e,r,n,a,o,s){var u=g();try{w(t)(e,r,n,a,o,s)}catch(c){if(m(u),c!==c+0)throw c;v(1,0)}}function Za(t,e,r,n,a,o,s,u,c,d,p,y,$,O,I,D){var _=g();try{w(t)(e,r,n,a,o,s,u,c,d,p,y,$,O,I,D)}catch(P){if(m(_),P!==P+0)throw P;v(1,0)}}function Qa(t,e,r,n,a,o,s,u,c){var d=g();try{w(t)(e,r,n,a,o,s,u,c)}catch(p){if(m(d),p!==p+0)throw p;v(1,0)}}function Ja(t,e,r,n,a,o){var s=g();try{return w(t)(e,r,n,a,o)}catch(u){if(m(s),u!==u+0)throw u;v(1,0)}}function Ka(t,e,r,n,a,o){var s=g();try{w(t)(e,r,n,a,o)}catch(u){if(m(s),u!==u+0)throw u;v(1,0)}}function to(t,e,r,n,a,o,s){var u=g();try{return w(t)(e,r,n,a,o,s)}catch(c){if(m(u),c!==c+0)throw c;v(1,0)}}function eo(t,e,r,n,a,o,s,u){var c=g();try{return w(t)(e,r,n,a,o,s,u)}catch(d){if(m(c),d!==d+0)throw d;v(1,0)}}function ro(t){var e=g();try{return w(t)()}catch(r){if(m(e),r!==r+0)throw r;v(1,0)}}function no(t,e,r,n,a,o,s,u,c){var d=g();try{return w(t)(e,r,n,a,o,s,u,c)}catch(p){if(m(d),p!==p+0)throw p;v(1,0)}}function ao(t,e,r,n,a,o,s){var u=g();try{return w(t)(e,r,n,a,o,s)}catch(c){if(m(u),c!==c+0)throw c;v(1,0)}}function oo(t,e,r,n){var a=g();try{return w(t)(e,r,n)}catch(o){if(m(a),o!==o+0)throw o;v(1,0)}}function io(t,e,r,n){var a=g();try{return w(t)(e,r,n)}catch(o){if(m(a),o!==o+0)throw o;v(1,0)}}function so(t,e,r,n,a,o,s,u){var c=g();try{w(t)(e,r,n,a,o,s,u)}catch(d){if(m(c),d!==d+0)throw d;v(1,0)}}function uo(t,e,r,n,a,o,s,u){var c=g();try{w(t)(e,r,n,a,o,s,u)}catch(d){if(m(c),d!==d+0)throw d;v(1,0)}}function co(t,e,r,n,a,o){var s=g();try{return w(t)(e,r,n,a,o)}catch(u){if(m(s),u!==u+0)throw u;v(1,0)}}function lo(t,e,r,n,a,o,s,u,c,d){var p=g();try{return w(t)(e,r,n,a,o,s,u,c,d)}catch(y){if(m(p),y!==y+0)throw y;v(1,0)}}function fo(t,e,r){var n=g();try{return w(t)(e,r)}catch(a){if(m(n),a!==a+0)throw a;v(1,0)}}function ho(t,e,r,n,a){var o=g();try{return w(t)(e,r,n,a)}catch(s){if(m(o),s!==s+0)throw s;v(1,0)}}function po(t,e,r,n,a,o,s,u,c,d){var p=g();try{w(t)(e,r,n,a,o,s,u,c,d)}catch(y){if(m(p),y!==y+0)throw y;v(1,0)}}function yo(t,e,r,n,a,o,s){var u=g();try{w(t)(e,r,n,a,o,s)}catch(c){if(m(u),c!==c+0)throw c;v(1,0)}}function vo(t,e,r,n){var a=g();try{return w(t)(e,r,n)}catch(o){if(m(a),o!==o+0)throw o;v(1,0)}}function mo(t,e,r,n,a,o,s,u,c,d,p,y){var $=g();try{return w(t)(e,r,n,a,o,s,u,c,d,p,y)}catch(O){if(m($),O!==O+0)throw O;v(1,0)}}function go(t,e,r,n,a,o,s){var u=g();try{return Ze(t,e,r,n,a,o,s)}catch(c){if(m(u),c!==c+0)throw c;v(1,0)}}function wo(t,e,r,n,a){var o=g();try{return Qe(t,e,r,n,a)}catch(s){if(m(o),s!==s+0)throw s;v(1,0)}}function bo(){Xr();function t(){var e,r;l.calledRun=!0,!gt&&(qr(),(e=ye)===null||e===void 0||e(l),(r=l.onRuntimeInitialized)===null||r===void 0||r.call(l),Yr())}l.setStatus?(l.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>l.setStatus(""),1),t()},1)):t()}var pt;return pt=await rn(),bo(),we?f=l:f=new Promise((t,e)=>{ye=t,ve=e}),f}function jt(i){return re(Bt,i)}function _r(){return Er(Bt)}function Sr(i){jt({overrides:i,equalityFn:Object.is,fireImmediately:!1})}async function Dr(i,f){return Or(Bt,i,f)}const Ir="85d46f55d7c86a4d09bb04273367408b19c324f582d040d018aecb25a9a82942",ne=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["databar_limited","DataBarLimited"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"],["any","Any"]],xr=[...ne,["unknown"]].map(i=>i[0]),Lt=new Map(ne);function Mr(i){for(const[f,h]of Lt)if(i===h)return f;return"unknown"}function Ar(i){if(ae(i))return{width:i.naturalWidth,height:i.naturalHeight};if(oe(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ie(i))return{width:i.videoWidth,height:i.videoHeight};if(ue(i))return{width:i.width,height:i.height};if(le(i))return{width:i.displayWidth,height:i.displayHeight};if(se(i))return{width:i.width,height:i.height};if(ce(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 ae(i){var f,h;try{return i instanceof((h=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:h.HTMLImageElement)}catch{return!1}}function oe(i){var f,h;try{return i instanceof((h=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:h.SVGImageElement)}catch{return!1}}function ie(i){var f,h;try{return i instanceof((h=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:h.HTMLVideoElement)}catch{return!1}}function se(i){var f,h;try{return i instanceof((h=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:h.HTMLCanvasElement)}catch{return!1}}function ue(i){try{return i instanceof ImageBitmap||Object.prototype.toString.call(i)==="[object ImageBitmap]"}catch{return!1}}function ce(i){try{return i instanceof OffscreenCanvas||Object.prototype.toString.call(i)==="[object OffscreenCanvas]"}catch{return!1}}function le(i){try{return i instanceof VideoFrame||Object.prototype.toString.call(i)==="[object VideoFrame]"}catch{return!1}}function Fr(i){try{return i instanceof Blob||Object.prototype.toString.call(i)==="[object Blob]"}catch{return!1}}function Rr(i){try{return i instanceof ImageData||Object.prototype.toString.call(i)==="[object ImageData]"}catch{return!1}}function Br(i,f){try{const h=new OffscreenCanvas(i,f);if(h.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return h;throw void 0}catch{const h=document.createElement("canvas");return h.width=i,h.height=f,h}}async function fe(i){if(ae(i)&&!await Vr(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(oe(i)&&!await Wr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(le(i)&&Hr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ie(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ue(i)&&Nr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:h}=Ar(i);if(f===0||h===0)return null;const l=Br(f,h).getContext("2d");l.drawImage(i,0,0);try{return l.getImageData(0,0,f,h)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function jr(i){let f;try{f=await createImageBitmap(i)}catch{try{if(globalThis.Image){f=new Image;let l="";try{l=URL.createObjectURL(i),f.src=l,await f.decode()}finally{URL.revokeObjectURL(l)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await fe(f)}function Lr(i){const{width:f,height:h}=i;if(f===0||h===0)return null;const C=i.getContext("2d");try{return C.getImageData(0,0,f,h)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ur(i){if(Fr(i))return await jr(i);if(Rr(i)){if(kr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return se(i)||ce(i)?Lr(i):await fe(i)}async function Vr(i){try{return await i.decode(),!0}catch{return!1}}async function Wr(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function Hr(i){return i.format===null}function kr(i){return i.data.buffer.byteLength===0}function Nr(i){return i.width===0&&i.height===0}function de(i,f){return zr(i)?new DOMException(`${f}: ${i.message}`,i.name):Gr(i)?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}function zr(i){return i instanceof DOMException||Object.prototype.toString.call(i)==="[object DOMException]"}function Gr(i){return i instanceof Error||Object.prototype.toString.call(i)==="[object Error]"}class he{constructor(f={}){ir(this,it);var h;try{const C=(h=f==null?void 0:f.formats)==null?void 0:h.filter(l=>l!=="unknown");if((C==null?void 0:C.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const l of C!=null?C:[])if(!Lt.has(l))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${l}' is not a valid enum value of type BarcodeFormat.`);sr(this,it,C!=null?C:[]),jt({fireImmediately:!0}).catch(()=>{})}catch(C){throw de(C,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return xr.filter(f=>f!=="unknown")}async detect(f){try{const h=await Ur(f);if(h===null)return[];let C;const l={tryCode39ExtendedMode:!1,textMode:"Plain",formats:or(this,it).map(x=>Lt.get(x))};try{C=await Dr(h,l)}catch(x){throw console.error(x),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return C.map(x=>{const{topLeft:{x:A,y:R},topRight:{x:S,y:B},bottomLeft:{x:H,y:Y},bottomRight:{x:nt,y:Z}}=x.position,st=Math.min(A,S,H,nt),k=Math.min(R,B,Y,Z),Q=Math.max(A,S,H,nt),gt=Math.max(R,B,Y,Z);return{boundingBox:new DOMRectReadOnly(st,k,Q-st,gt-k),rawValue:x.text,format:Mr(x.format),cornerPoints:[{x:A,y:R},{x:S,y:B},{x:nt,y:Z},{x:H,y:Y}]}})}catch(h){throw de(h,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return it=new WeakMap,(pe=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=he),E.BarcodeDetector=he,E.ZXING_CPP_COMMIT=Cr,E.ZXING_WASM_SHA256=Ir,E.ZXING_WASM_VERSION=$r,E.prepareZXingModule=jt,E.purgeZXingModule=_r,E.setZXingModuleOverrides=Sr,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),E})({});
1
+ var BarcodeDetectionAPI=(function(P){"use strict";var rr=P=>{throw TypeError(P)};var nr=(P,O,L)=>O.has(P)||rr("Cannot "+L);var ar=(P,O,L)=>(nr(P,O,"read from private field"),L?L.call(P):O.get(P)),or=(P,O,L)=>O.has(P)?rr("Cannot add the same private member more than once"):O instanceof WeakSet?O.add(P):O.set(P,L),ir=(P,O,L,Mt)=>(nr(P,O,"write to private field"),Mt?Mt.call(P,L):O.set(P,L),L);var it,he;const O=[["All","*","*"," ",0,"All"],["AllReadable","*","r"," ",0,"All Readable"],["AllCreatable","*","w"," ",0,"All Creatable"],["AllLinear","*","l"," ",0,"All Linear"],["AllMatrix","*","m"," ",0,"All Matrix"],["AllGS1","*","G"," ",0,"All GS1"],["AllRetail","*","R"," ",0,"All Retail"],["AllIndustrial","*","I"," ",0,"All Industrial"],["Codabar","F"," ","lrw ",18,"Codabar"],["Code39","A"," ","lrw I",8,"Code 39"],["Code39Std","A","s","lrw I",8,"Code 39 Standard"],["Code39Ext","A","e","lr I",9,"Code 39 Extended"],["Code32","A","2","lr I",129,"Code 32"],["PZN","A","p","lr I",52,"Pharmazentralnummer"],["Code93","G"," ","lrw I",25,"Code 93"],["Code128","C"," ","lrwGI",20,"Code 128"],["ITF","I"," ","lrw I",3,"ITF"],["ITF14","I","4","lr I",89,"ITF-14"],["DataBar","e"," ","lr GR",29,"DataBar"],["DataBarOmni","e","o","lr GR",29,"DataBar Omni"],["DataBarStk","e","s","lr GR",79,"DataBar Stacked"],["DataBarStkOmni","e","O","lr GR",80,"DataBar Stacked Omni"],["DataBarLtd","e","l","lr GR",30,"DataBar Limited"],["DataBarExp","e","e","lr GR",31,"DataBar Expanded"],["DataBarExpStk","e","E","lr GR",81,"DataBar Expanded Stacked"],["EANUPC","E"," ","lr R",15,"EAN/UPC"],["EAN13","E","1","lrw R",15,"EAN-13"],["EAN8","E","8","lrw R",10,"EAN-8"],["EAN5","E","5","l R",12,"EAN-5"],["EAN2","E","2","l R",11,"EAN-2"],["ISBN","E","i","lr R",69,"ISBN"],["UPCA","E","a","lrw R",34,"UPC-A"],["UPCE","E","e","lrw R",37,"UPC-E"],["OtherBarcode","X"," "," r ",0,"Other barcode"],["DXFilmEdge","X","x","lr ",147,"DX Film Edge"],["PDF417","L"," ","mrw ",55,"PDF417"],["CompactPDF417","L","c","mr ",56,"Compact PDF417"],["MicroPDF417","L","m","m ",84,"MicroPDF417"],["Aztec","z"," ","mr G ",92,"Aztec"],["AztecCode","z","c","mrwG ",92,"Aztec Code"],["AztecRune","z","r","mr ",128,"Aztec Rune"],["QRCode","Q"," ","mrwG ",58,"QR Code"],["QRCodeModel1","Q","1","mr ",0,"QR Code Model 1"],["QRCodeModel2","Q","2","mr ",58,"QR Code Model 2"],["MicroQRCode","Q","m","mr ",97,"Micro QR Code"],["RMQRCode","Q","r","mr G ",145,"rMQR Code"],["DataMatrix","d"," ","mrwG ",71,"Data Matrix"],["MaxiCode","U"," ","mr ",57,"MaxiCode"]],L={DataBarExpanded:"DataBarExp",DataBarLimited:"DataBarLtd","Linear-Codes":"AllLinear","Matrix-Codes":"AllMatrix",Any:"All",rMQRCode:"RMQRCode"};O.map(a=>a[5]),O.filter(a=>a[1]==="*").map(a=>a[0]),O.filter(a=>a[1]!=="*").map(a=>a[0]),O.filter(a=>a[2]===" ").map(a=>a[0]),O.filter(a=>a[3][0]==="l").map(a=>a[0]),O.filter(a=>a[3][0]==="m").map(a=>a[0]),O.filter(a=>a[3][1]==="r").map(a=>a[0]),O.filter(a=>a[3][2]==="w"||a[4]!==0).map(a=>a[0]),O.filter(a=>a[3][3]==="G").map(a=>a[0]),O.filter(a=>a[3][4]==="R").map(a=>a[0]),O.filter(a=>a[3][4]==="I").map(a=>a[0]);function sr(a){var d;return(d=L[a])!=null?d:a}function ur(a){return a.map(sr).join(",")}const lr=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function cr(a){return lr.indexOf(a)}const Kt=["Unknown","ASCII","ISO8859_1","ISO8859_2","ISO8859_3","ISO8859_4","ISO8859_5","ISO8859_6","ISO8859_7","ISO8859_8","ISO8859_9","ISO8859_10","ISO8859_11","ISO8859_13","ISO8859_14","ISO8859_15","ISO8859_16","Cp437","Cp1250","Cp1251","Cp1252","Cp1256","Shift_JIS","Big5","GB2312","GB18030","EUC_JP","EUC_KR","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function dr(a){return a==="UnicodeBig"?Kt.indexOf("UTF16BE"):Kt.indexOf(a)}const fr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function hr(a){return fr[a]}const pr=["Ignore","Read","Require"];function mr(a){return pr.indexOf(a)}const yr=["Plain","ECI","HRI","Escaped","Hex","HexECI"];function vr(a){return yr.indexOf(a)}const mt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,validateOptionalChecksum:!1,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown",tryCode39ExtendedMode:!0};function te(a){var d;return{...a,formats:ur(a.formats),binarizer:cr(a.binarizer),eanAddOnSymbol:mr(a.eanAddOnSymbol),textMode:vr(a.textMode),characterSet:dr(a.characterSet),tryCode39ExtendedMode:(d=a.tryCode39ExtendedMode)!=null?d:!0}}function gr(a){return{...a,format:a.format,symbology:a.symbology,contentType:hr(a.contentType)}}const wr="3.0.1",br="eb8c15ef7827ee277bd8a9b093fa1d97bd98cf67",Cr={locateFile:(a,d)=>{const p=a.match(/_(.+?)\.wasm$/);return p?`https://fastly.jsdelivr.net/npm/zxing-wasm@3.0.1/dist/${p[1]}/${a}`:d+a}},yt=new WeakMap;function $r(a,d){return Object.is(a,d)||Object.keys(a).length===Object.keys(d).length&&Object.keys(a).every(p=>Object.hasOwn(d,p)&&a[p]===d[p])}function ee(a,{overrides:d,equalityFn:p=$r,fireImmediately:b=!1}={}){var c;const[x,R]=(c=yt.get(a))!=null?c:[Cr],M=d!=null?d:x;let S;if(b){if(R&&(S=p(x,M)))return R;const F=a({...M});return yt.set(a,[M,F]),F}(S!=null?S:p(x,M))||yt.set(a,[M])}function Tr(a){yt.delete(a)}function Er(a){const d=a.byteLength>>2,p=new Uint8Array(d);for(let b=0;b<d;b++){const c=b<<2;p[b]=306*a[c]+601*a[c+1]+117*a[c+2]+512>>10}return p}async function _r(a,d,p=mt){const b={...mt,...p},c=await ee(a,{fireImmediately:!0});let x,R;if("width"in d&&"height"in d&&"data"in d){const{data:S,width:F,height:G}=d,q=Er(S),H=q.byteLength;if(R=c._malloc(H),!R)throw new Error(`Failed to allocate ${H} bytes in WASM memory`);try{c.HEAPU8.set(q,R),x=c.readBarcodesFromPixmap(R,F,G,te(b))}finally{c._free(R)}}else{let S,F;if("buffer"in d)[S,F]=[d.byteLength,d];else if("byteLength"in d)[S,F]=[d.byteLength,new Uint8Array(d)];else if("size"in d)[S,F]=[d.size,new Uint8Array(await d.arrayBuffer())];else throw new TypeError("Invalid input type");if(R=c._malloc(S),!R)throw new Error(`Failed to allocate ${S} bytes in WASM memory`);try{c.HEAPU8.set(F,R),x=c.readBarcodesFromImage(R,S,te(b))}finally{c._free(R)}}const M=[];for(let S=0;S<x.size();++S)M.push(gr(x.get(S)));return M}({...mt,formats:[...mt.formats]});async function Ft(a={}){var d,p,b,c=a,x=!!globalThis.window,R=typeof Bun<"u",M=!!globalThis.WorkerGlobalScope;!((p=globalThis.process)===null||p===void 0||(p=p.versions)===null||p===void 0)&&p.node&&((b=globalThis.process)===null||b===void 0?void 0:b.type)!="renderer";var S="./this.program",F,G="";function q(t){return c.locateFile?c.locateFile(t,G):G+t}var H,J;if(x||M||R){try{G=new URL(".",F).href}catch{}M&&(J=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),H=async t=>{var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)}}var st=console.log.bind(console),z=console.error.bind(console),K,vt=!1,pe,me,tt,N,gt,ut,lt,A,ye,ve,ge=!1;function we(){var t=St.buffer;tt=new Int8Array(t),gt=new Int16Array(t),c.HEAPU8=N=new Uint8Array(t),ut=new Uint16Array(t),lt=new Int32Array(t),A=new Uint32Array(t),ye=new Float32Array(t),ve=new Float64Array(t)}function Nr(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)nn(c.preRun.shift());be($e)}function Qr(){ge=!0,pt.xa()}function Xr(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)rn(c.postRun.shift());be(Ce)}function Lt(t){var e,r;(e=c.onAbort)===null||e===void 0||e.call(c,t),t="Aborted("+t+")",z(t),vt=!0,t+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(t);throw(r=me)===null||r===void 0||r(n),n}var wt;function qr(){return q("zxing_reader.wasm")}function Zr(t){if(t==wt&&K)return new Uint8Array(K);if(J)return J(t);throw"both async and sync fetching of the wasm failed"}async function Yr(t){if(!K)try{var e=await H(t);return new Uint8Array(e)}catch{}return Zr(t)}async function Jr(t,e){try{var r=await Yr(t),n=await WebAssembly.instantiate(r,e);return n}catch(o){z(`failed to asynchronously prepare wasm: ${o}`),Lt(o)}}async function Kr(t,e,r){if(!t&&WebAssembly.instantiateStreaming)try{var n=fetch(e,{credentials:"same-origin"}),o=await WebAssembly.instantiateStreaming(n,r);return o}catch(i){z(`wasm streaming compile failed: ${i}`),z("falling back to ArrayBuffer instantiation")}return Jr(e,r)}function tn(){var t={a:Ba};return t}async function en(){function t(i,s){return pt=i.exports,Fa(pt),we(),pt}function e(i){return t(i.instance)}var r=tn();if(c.instantiateWasm)return new Promise((i,s)=>{c.instantiateWasm(r,(u,l)=>{i(t(u))})});wt!=null||(wt=qr());var n=await Kr(K,wt,r),o=e(n);return o}var be=t=>{for(;t.length>0;)t.shift()(c)},Ce=[],rn=t=>Ce.push(t),$e=[],nn=t=>$e.push(t),v=t=>He(t),g=()=>ze(),bt=[],Ct=0,an=t=>{var e=new Ut(t);return e.get_caught()||(e.set_caught(!0),Ct--),e.set_rethrown(!1),bt.push(e),Qe(t),Ve(t)},Q=0,on=()=>{y(0,0);var t=bt.pop();Ne(t.excPtr),Q=0};class Ut{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){A[this.ptr+4>>2]=e}get_type(){return A[this.ptr+4>>2]}set_destructor(e){A[this.ptr+8>>2]=e}get_destructor(){return A[this.ptr+8>>2]}set_caught(e){e=e?1:0,tt[this.ptr+12]=e}get_caught(){return tt[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,tt[this.ptr+13]=e}get_rethrown(){return tt[this.ptr+13]!=0}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){A[this.ptr+16>>2]=e}get_adjusted_ptr(){return A[this.ptr+16>>2]}}var $t=t=>Ge(t),Wt=t=>{var e=Q;if(!e)return $t(0),0;var r=new Ut(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return $t(0),e;for(var o of t){if(o===0||o===n)break;var i=r.ptr+16;if(Xe(o,n,i))return $t(o),e}return $t(n),e},sn=()=>Wt([]),un=t=>Wt([t]),ln=(t,e)=>Wt([t,e]),cn=()=>{var t=bt.pop();t||Lt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(bt.push(t),t.set_rethrown(!0),t.set_caught(!1),Ct++),Q=e,Q},dn=(t,e,r)=>{var n=new Ut(t);throw n.init(e,r),Q=t,Ct++,Q},fn=()=>Ct,hn=t=>{throw Q||(Q=t),Q},pn=()=>Lt(""),Tt={},kt=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function ct(t){return this.fromWireType(A[t>>2])}var at={},et={},Et={},mn=class extends Error{constructor(t){super(t),this.name="InternalError"}},_t=t=>{throw new mn(t)},rt=(t,e,r)=>{t.forEach(u=>Et[u]=e);function n(u){var l=r(u);l.length!==t.length&&_t("Mismatched type converter count");for(var f=0;f<t.length;++f)k(t[f],l[f])}var o=new Array(e.length),i=[],s=0;{const u=e;for(let l=0;l<u.length;++l){const f=u[l];et.hasOwnProperty(f)?o[l]=et[f]:(i.push(f),at.hasOwnProperty(f)||(at[f]=[]),at[f].push(()=>{o[l]=et[f],++s,s===i.length&&n(o)}))}}i.length===0&&n(o)},yn=t=>{var e=Tt[t];delete Tt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields,i=o.map(s=>s.getterReturnType).concat(o.map(s=>s.setterArgumentType));rt([t],i,s=>{var u={};{const l=o;for(let f=0;f<l.length;++f){const h=l[f],m=s[f],$=h.getter,E=h.getterContext,I=s[f+o.length],D=h.setter,_=h.setterContext;u[h.fieldName]={read:T=>m.fromWireType($(E,T)),write:(T,W)=>{var j=[];D(_,T,I.toWireType(j,W)),kt(j)},optional:m.optional}}}return[{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)&&!u[h].optional)throw new TypeError(`Missing field: "${h}"`);var m=r();for(h in u)u[h].write(m,f[h]);return l!==null&&l.push(n,m),m},readValueFromPointer:ct,destructorFunction:n}]})},vn=(t,e,r,n,o)=>{},B=t=>{for(var e="";;){var r=N[t++];if(!r)return e;e+=String.fromCharCode(r)}},dt=class extends Error{constructor(t){super(t),this.name="BindingError"}},C=t=>{throw new dt(t)};function gn(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`),et.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(et[t]=e,delete Et[t],at.hasOwnProperty(t)){var o=at[t];delete at[t],o.forEach(i=>i())}}function k(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return gn(t,e,r)}var wn=(t,e,r,n)=>{e=B(e),k(t,{name:e,fromWireType:function(o){return!!o},toWireType:function(o,i){return i?r:n},readValueFromPointer:function(o){return this.fromWireType(N[o])},destructorFunction:null})},bn=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")},Gt=!1,Te=t=>{},Cn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Ee=t=>{t.count.value-=1;var e=t.count.value===0;e&&Cn(t)},ft=t=>globalThis.FinalizationRegistry?(Gt=new FinalizationRegistry(e=>{Ee(e.$$)}),ft=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var o={$$:r};Gt.register(e,o,e)}return e},Te=e=>Gt.unregister(e),ft(t)):(ft=e=>e,t),$n=()=>{let t=At.prototype;Object.assign(t,{isAliasOf(r){if(!(this instanceof At)||!(r instanceof At))return!1;var n=this.$$.ptrType.registeredClass,o=this.$$.ptr;r.$$=r.$$;for(var i=r.$$.ptrType.registeredClass,s=r.$$.ptr;n.baseClass;)o=n.upcast(o),n=n.baseClass;for(;i.baseClass;)s=i.upcast(s),i=i.baseClass;return n===i&&o===s},clone(){if(this.$$.ptr||Vt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=ft(Object.create(Object.getPrototypeOf(this),{$$:{value:bn(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||Vt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),Te(this),Ee(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"),this.$$.deleteScheduled=!0,this}});const e=Symbol.dispose;e&&(t[e]=t.delete)};function At(){}var Ht=(t,e)=>Object.defineProperty(e,"name",{value:t}),_e={},Ae=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return t[e].overloadTable.hasOwnProperty(i.length)||C(`Function '${r}' called with an invalid number of arguments (${i.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[i.length].apply(this,i)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Pe=(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`),Ae(c,t,t),c[t].overloadTable.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,c[t].argCount=r)},Tn=48,En=57,_n=t=>{t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Tn&&e<=En?`_${t}`:t};function An(t,e,r,n,o,i,s,u){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,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},Nt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t};function Pn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${Nt(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 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 "${Nt(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 o=e.clone();r=this.rawShare(r,V.toHandle(()=>o.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 "${Nt(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}var Oe=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Oe(t,e,r.baseClass);return n===null?null:r.downcast(n)},Sn={},In=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},xn=(t,e)=>(e=In(t,e),Sn[e]),Pt=(t,e)=>{(!e.ptrType||!e.ptr)&&_t("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&_t("Both smartPtrType and smartPtr must be specified"),e.count={value:1},ft(Object.create(t,{$$:{value:e,writable:!0}}))};function Rn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=xn(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 o(){return this.isSmartPointer?Pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i=this.registeredClass.getActualType(e),s=_e[i];if(!s)return o.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var l=Oe(e,this.registeredClass,u.registeredClass);return l===null?o.call(this):this.isSmartPointer?Pt(u.registeredClass.instancePrototype,{ptrType:u,ptr:l,smartPtrType:this,smartPtr:t}):Pt(u.registeredClass.instancePrototype,{ptrType:u,ptr:l})}var Mn=()=>{Object.assign(Ot.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)},readValueFromPointer:ct,fromWireType:Rn})};function Ot(t,e,r,n,o,i,s,u,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=s,this.rawGetPointee=u,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!o&&e.baseClass===void 0?n?(this.toWireType=Pn,this.destructorFunction=null):(this.toWireType=Dn,this.destructorFunction=null):this.toWireType=On}var De=(t,e,r)=>{c.hasOwnProperty(t)||_t("Replacing nonexistent public symbol"),c[t].overloadTable!==void 0&&r!==void 0?c[t].overloadTable[r]=e:(c[t]=e,c[t].argCount=r)},Z={},Fn=(t,e,r)=>{t=t.replace(/p/g,"i");var n=Z[t];return n(e,...r)},Se=[],w=t=>{var e=Se[t];return e||(Se[t]=e=Ye.get(t)),e},Bn=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t.includes("j"))return Fn(t,e,r);var n=w(e),o=n(...r);return o},jn=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Bn(t,e,o,r)}},U=function(t,e){t=B(t);function r(){if(t.includes("j"))return jn(t,e);var o=w(e);return o}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n};class Ln extends Error{}var Ie=t=>{var e=ke(t),r=B(e);return Y(e),r},Dt=(t,e)=>{var r=[],n={};function o(i){if(!n[i]&&!et[i]){if(Et[i]){Et[i].forEach(o);return}r.push(i),n[i]=!0}}throw e.forEach(o),new Ln(`${t}: `+r.map(Ie).join([", "]))},Un=(t,e,r,n,o,i,s,u,l,f,h,m,$)=>{h=B(h),i=U(o,i),u&&(u=U(s,u)),f&&(f=U(l,f)),$=U(m,$);var E=_n(h);Pe(E,function(){Dt(`Cannot construct ${h} due to unbound types`,[n])}),rt([t,e,r],n?[n]:[],I=>{I=I[0];var D,_;n?(D=I.registeredClass,_=D.instancePrototype):_=At.prototype;var T=Ht(h,function(){if(Object.getPrototypeOf(this)!==W)throw new dt(`Use 'new' to construct ${h}`);if(j.constructor_body===void 0)throw new dt(`${h} has no accessible constructor`);for(var tr=arguments.length,xt=new Array(tr),Rt=0;Rt<tr;Rt++)xt[Rt]=arguments[Rt];var er=j.constructor_body[xt.length];if(er===void 0)throw new dt(`Tried to invoke ctor of ${h} with invalid number of parameters (${xt.length}) - expected (${Object.keys(j.constructor_body).toString()}) parameters instead!`);return er.apply(this,xt)}),W=Object.create(_,{constructor:{value:T}});T.prototype=W;var j=new An(h,T,W,$,D,i,u,f);if(j.baseClass){var X,It;(It=(X=j.baseClass).__derivedClasses)!==null&&It!==void 0||(X.__derivedClasses=[]),j.baseClass.__derivedClasses.push(j)}var bo=new Ot(h,j,!0,!1,!1),Je=new Ot(h+"*",j,!1,!1,!1),Ke=new Ot(h+" const*",j,!1,!0,!1);return _e[t]={pointerType:Je,constPointerType:Ke},De(E,T),[bo,Je,Ke]})},Qt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(A[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 Xt(t,e,r,n,o,i){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].isVoid,h=s-2,m=new Array(h),$=[],E=[],I=function(){E.length=0;var D;$.length=u?2:1,$[0]=o,u&&(D=e[1].toWireType(E,this),$[1]=D);for(var _=0;_<h;++_)m[_]=e[_+2].toWireType(E,_<0||arguments.length<=_?void 0:arguments[_]),$.push(m[_]);var T=n(...$);function W(j){if(l)kt(E);else for(var X=u?1:2;X<e.length;X++){var It=X===1?D:m[X-2];e[X].destructorFunction!==null&&e[X].destructorFunction(It)}if(f)return e[0].fromWireType(j)}return W(T)};return Ht(t,I)}var kn=(t,e,r,n,o,i)=>{var s=Qt(e,r);o=U(n,o),rt([],[t],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 dt(`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]=()=>{Dt(`Cannot construct ${u.name} due to unbound types`,s)},rt([],s,f=>(f.splice(1,0,null),u.registeredClass.constructor_body[e-1]=Xt(l,f,null,o,i),[])),[]})},xe=t=>{t=t.trim();const e=t.indexOf("(");return e===-1?t:t.slice(0,e)},Vn=(t,e,r,n,o,i,s,u,l,f)=>{var h=Qt(r,n);e=B(e),e=xe(e),i=U(o,i),rt([],[t],m=>{m=m[0];var $=`${m.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&m.registeredClass.pureVirtualFunctions.push(e);function E(){Dt(`Cannot call ${$} due to unbound types`,h)}var I=m.registeredClass.instancePrototype,D=I[e];return D===void 0||D.overloadTable===void 0&&D.className!==m.name&&D.argCount===r-2?(E.argCount=r-2,E.className=m.name,I[e]=E):(Ae(I,e,$),I[e].overloadTable[r-2]=E),rt([],h,_=>{var T=Xt($,_,m,i,s);return I[e].overloadTable===void 0?(T.argCount=r-2,I[e]=T):I[e].overloadTable[r-2]=T,[]}),[]})},Re=[],nt=[0,1,,1,null,1,!0,1,!1,1],qt=t=>{t>9&&--nt[t+1]===0&&(nt[t]=void 0,Re.push(t))},V={toValue:t=>(t||C(`Cannot use deleted val. handle = ${t}`),nt[t]),toHandle:t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=Re.pop()||nt.length;return nt[e]=t,nt[e+1]=1,e}}}},Me={name:"emscripten::val",fromWireType:t=>{var e=V.toValue(t);return qt(t),e},toWireType:(t,e)=>V.toHandle(e),readValueFromPointer:ct,destructorFunction:null},Gn=t=>k(t,Me),Hn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ye[r>>2])};case 8:return function(r){return this.fromWireType(ve[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},zn=(t,e,r)=>{e=B(e),k(t,{name:e,fromWireType:n=>n,toWireType:(n,o)=>o,readValueFromPointer:Hn(e,r),destructorFunction:null})},Nn=(t,e,r,n,o,i,s,u)=>{var l=Qt(e,r);t=B(t),t=xe(t),o=U(n,o),Pe(t,function(){Dt(`Cannot call ${t} due to unbound types`,l)},e-1),rt([],l,f=>{var h=[f[0],null].concat(f.slice(1));return De(t,Xt(t,h,null,o,i),e-1),[]})},Qn=(t,e,r)=>{switch(e){case 1:return r?n=>tt[n]:n=>N[n];case 2:return r?n=>gt[n>>1]:n=>ut[n>>1];case 4:return r?n=>lt[n>>2]:n=>A[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Xn=(t,e,r,n,o)=>{e=B(e);const i=n===0;let s=l=>l;if(i){var u=32-8*r;s=l=>l<<u>>>u,o=s(o)}k(t,{name:e,fromWireType:s,toWireType:(l,f)=>f,readValueFromPointer:Qn(e,r,n!==0),destructorFunction:null})},qn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],o=n[e];function i(s){var u=A[s>>2],l=A[s+4>>2];return new o(tt.buffer,l,u)}r=B(r),k(t,{name:r,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Zn=Object.assign({optional:!0},Me),Yn=(t,e)=>{k(t,Zn)},Jn=(t,e,r,n)=>{if(!(n>0))return 0;for(var o=r,i=r+n-1,s=0;s<t.length;++s){var u=t.codePointAt(s);if(u<=127){if(r>=i)break;e[r++]=u}else if(u<=2047){if(r+1>=i)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(u<=65535){if(r+2>=i)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=i)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63,s++}}return e[r]=0,r-o},ot=(t,e,r)=>Jn(t,N,e,r),Fe=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},Be=globalThis.TextDecoder&&new TextDecoder,je=(t,e,r,n)=>{var o=e+r;if(n)return o;for(;t[e]&&!(e>=o);)++e;return e},Le=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;var o=je(t,e,r,n);if(o-e>16&&t.buffer&&Be)return Be.decode(t.subarray(e,o));for(var i="";e<o;){var s=t[e++];if(!(s&128)){i+=String.fromCharCode(s);continue}var u=t[e++]&63;if((s&224)==192){i+=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)i+=String.fromCharCode(s);else{var f=s-65536;i+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return i},Kn=(t,e,r)=>t?Le(N,t,e,r):"",ta=(t,e)=>{e=B(e),k(t,{name:e,fromWireType(r){var n=A[r>>2],o=r+4,i;return i=Kn(o,n,!0),Y(r),i},toWireType(r,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var o,i=typeof n=="string";i||ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT==1||C("Cannot pass non-string to std::string"),i?o=Fe(n):o=n.length;var s=Jt(4+o+1),u=s+4;return A[s>>2]=o,i?ot(n,u,o+1):N.set(n,u),r!==null&&r.push(Y,s),s},readValueFromPointer:ct,destructorFunction(r){Y(r)}})},Ue=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,ea=(t,e,r)=>{var n=t>>1,o=je(ut,n,e/2,r);if(o-n>16&&Ue)return Ue.decode(ut.subarray(n,o));for(var i="",s=n;s<o;++s){var u=ut[s];i+=String.fromCharCode(u)}return i},ra=(t,e,r)=>{if(r!=null||(r=2147483647),r<2)return 0;r-=2;for(var n=e,o=r<t.length*2?r/2:t.length,i=0;i<o;++i){var s=t.charCodeAt(i);gt[e>>1]=s,e+=2}return gt[e>>1]=0,e-n},na=t=>t.length*2,aa=(t,e,r)=>{for(var n="",o=t>>2,i=0;!(i>=e/4);i++){var s=A[o+i];if(!s&&!r)break;n+=String.fromCodePoint(s)}return n},oa=(t,e,r)=>{if(r!=null||(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var s=t.codePointAt(i);if(s>65535&&i++,lt[e>>2]=s,e+=4,e+4>o)break}return lt[e>>2]=0,e-n},ia=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.codePointAt(r);n>65535&&r++,e+=4}return e},sa=(t,e,r)=>{r=B(r);var n,o,i;e===2?(n=ea,o=ra,i=na):(n=aa,o=oa,i=ia),k(t,{name:r,fromWireType:s=>{var u=A[s>>2],l=n(s+4,u*e,!0);return Y(s),l},toWireType:(s,u)=>{typeof u!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var l=i(u),f=Jt(4+l+e);return A[f>>2]=l/e,o(u,f+4,l+e),s!==null&&s.push(Y,f),f},readValueFromPointer:ct,destructorFunction(s){Y(s)}})},ua=(t,e,r,n,o,i)=>{Tt[t]={name:B(e),rawConstructor:U(r,n),rawDestructor:U(o,i),fields:[]}},la=(t,e,r,n,o,i,s,u,l,f)=>{Tt[t].fields.push({fieldName:B(e),getterReturnType:r,getter:U(n,o),getterContext:i,setterArgumentType:s,setter:U(u,l),setterContext:f})},ca=(t,e)=>{e=B(e),k(t,{isVoid:!0,name:e,fromWireType:()=>{},toWireType:(r,n)=>{}})},Zt=[],da=t=>{var e=Zt.length;return Zt.push(t),e},fa=(t,e)=>{var r=et[t];return r===void 0&&C(`${e} has unknown type ${Ie(t)}`),r},ha=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=fa(A[e+n*4>>2],`parameter ${n}`);return r},pa=(t,e,r)=>{var n=[],o=t(n,r);return n.length&&(A[e>>2]=V.toHandle(n)),o},ma={},We=t=>{var e=ma[t];return e===void 0?B(t):e},ya=(t,e,r)=>{var n=8,[o,...i]=ha(t,e),s=o.toWireType.bind(o),u=i.map(m=>m.readValueFromPointer.bind(m));t--;var l=new Array(t),f=(m,$,E,I)=>{for(var D=0,_=0;_<t;++_)l[_]=u[_](I+D),D+=n;var T;switch(r){case 0:T=V.toValue(m).apply(null,l);break;case 2:T=Reflect.construct(V.toValue(m),l);break;case 3:T=l[0];break;case 1:T=V.toValue(m)[We($)](...l);break}return pa(s,E,T)},h=`methodCaller<(${i.map(m=>m.name)}) => ${o.name}>`;return da(Ht(h,f))},va=t=>t?(t=We(t),V.toHandle(globalThis[t])):V.toHandle(globalThis),ga=t=>{t>9&&(nt[t+1]+=1)},wa=(t,e,r,n,o)=>Zt[t](e,r,n,o),ba=t=>{var e=V.toValue(t);kt(e),qt(t)},Ca=(t,e,r,n)=>{var o=new Date().getFullYear(),i=new Date(o,0,1),s=new Date(o,6,1),u=i.getTimezoneOffset(),l=s.getTimezoneOffset(),f=Math.max(u,l);A[t>>2]=f*60,lt[e>>2]=+(u!=l);var h=E=>{var I=E>=0?"-":"+",D=Math.abs(E),_=String(Math.floor(D/60)).padStart(2,"0"),T=String(D%60).padStart(2,"0");return`UTC${I}${_}${T}`},m=h(u),$=h(l);l<u?(ot(m,r,17),ot($,n,17)):(ot(m,n,17),ot($,r,17))},$a=()=>2147483648,Ta=(t,e)=>Math.ceil(t/e)*e,Ea=t=>{var e=St.buffer.byteLength,r=(t-e+65535)/65536|0;try{return St.grow(r),we(),1}catch{}},_a=t=>{var e=N.length;t>>>=0;var r=$a();if(t>r)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,t+100663296);var i=Math.min(r,Ta(Math.max(t,o),65536)),s=Ea(i);if(s)return!0}return!1},Yt={},Aa=()=>S||"./this.program",ht=()=>{if(!ht.strings){var t=(typeof navigator=="object"&&navigator.language||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Aa()};for(var r in Yt)Yt[r]===void 0?delete e[r]:e[r]=Yt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);ht.strings=n}return ht.strings},Pa=(t,e)=>{var r=0,n=0;for(var o of ht()){var i=e+r;A[t+n>>2]=i,r+=ot(o,i,1/0)+1,n+=4}return 0},Oa=(t,e)=>{var r=ht();A[t>>2]=r.length;var n=0;for(var o of r)n+=Fe(o)+1;return A[e>>2]=n,0},Da=t=>52;function Sa(t,e,r,n,o){return 70}var Ia=[null,[],[]],xa=(t,e)=>{var r=Ia[t];e===0||e===10?((t===1?st:z)(Le(r)),r.length=0):r.push(e)},Ra=(t,e,r,n)=>{for(var o=0,i=0;i<r;i++){var s=A[e>>2],u=A[e+4>>2];e+=8;for(var l=0;l<u;l++)xa(t,N[s+l]);o+=u}return A[n>>2]=o,0},Ma=t=>t;if($n(),Mn(),c.noExitRuntime&&c.noExitRuntime,c.print&&(st=c.print),c.printErr&&(z=c.printErr),c.wasmBinary&&(K=c.wasmBinary),c.arguments&&c.arguments,c.thisProgram&&(S=c.thisProgram),c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.shift()();var ke,Y,Jt,Ve,y,Ge,He,ze,Ne,Qe,Xe,qe,Ze,St,Ye;function Fa(t){ke=t.ya,Y=c._free=t.za,Jt=c._malloc=t.Ba,Ve=t.Ca,y=t.Da,Ge=t.Ea,He=t.Fa,ze=t.Ga,Ne=t.Ha,Qe=t.Ia,Xe=t.Ja,Z.viijii=t.Ka,qe=Z.iiijj=t.La,Z.jiji=t.Ma,Ze=Z.jiiii=t.Na,Z.iiiiij=t.Oa,Z.iiiiijj=t.Pa,Z.iiiiiijj=t.Qa,St=t.wa,Ye=t.Aa}var Ba={s:an,x:on,a:sn,j:un,m:ln,P:cn,q:dn,U:fn,d:hn,ba:pn,ta:yn,aa:vn,oa:wn,ra:Un,qa:kn,F:Vn,ma:Gn,W:zn,X:Nn,z:Xn,t:qn,sa:Yn,na:ta,R:sa,G:ua,ua:la,pa:ca,M:ya,va:qt,C:va,S:ga,L:wa,ha:ba,ca:Ca,fa:_a,da:Pa,ea:Oa,ga:Da,_:Sa,V:Ra,J:io,B:uo,Y:Ha,T:po,r:ro,b:Ua,D:oo,ja:co,c:ka,ia:fo,h:Ga,i:Za,p:Ja,O:ao,w:to,E:eo,K:no,I:mo,$:vo,Z:go,f:za,l:ja,e:Wa,g:Va,N:ho,k:La,ka:so,o:Ka,y:Qa,u:Ya,Q:qa,v:lo,n:Na,H:yo,la:Xa,A:Ma};function ja(t,e){var r=g();try{w(t)(e)}catch(n){if(v(r),n!==n+0)throw n;y(1,0)}}function La(t,e,r,n,o){var i=g();try{w(t)(e,r,n,o)}catch(s){if(v(i),s!==s+0)throw s;y(1,0)}}function Ua(t,e){var r=g();try{return w(t)(e)}catch(n){if(v(r),n!==n+0)throw n;y(1,0)}}function Wa(t,e,r){var n=g();try{w(t)(e,r)}catch(o){if(v(n),o!==o+0)throw o;y(1,0)}}function ka(t,e,r){var n=g();try{return w(t)(e,r)}catch(o){if(v(n),o!==o+0)throw o;y(1,0)}}function Va(t,e,r,n){var o=g();try{w(t)(e,r,n)}catch(i){if(v(o),i!==i+0)throw i;y(1,0)}}function Ga(t,e,r,n){var o=g();try{return w(t)(e,r,n)}catch(i){if(v(o),i!==i+0)throw i;y(1,0)}}function Ha(t,e,r,n,o,i){var s=g();try{return w(t)(e,r,n,o,i)}catch(u){if(v(s),u!==u+0)throw u;y(1,0)}}function za(t){var e=g();try{w(t)()}catch(r){if(v(e),r!==r+0)throw r;y(1,0)}}function Na(t,e,r,n,o,i,s,u,l,f,h){var m=g();try{w(t)(e,r,n,o,i,s,u,l,f,h)}catch($){if(v(m),$!==$+0)throw $;y(1,0)}}function Qa(t,e,r,n,o,i,s){var u=g();try{w(t)(e,r,n,o,i,s)}catch(l){if(v(u),l!==l+0)throw l;y(1,0)}}function Xa(t,e,r,n,o,i,s,u,l,f,h,m,$,E,I,D,_){var T=g();try{w(t)(e,r,n,o,i,s,u,l,f,h,m,$,E,I,D,_)}catch(W){if(v(T),W!==W+0)throw W;y(1,0)}}function qa(t,e,r,n,o,i,s,u,l){var f=g();try{w(t)(e,r,n,o,i,s,u,l)}catch(h){if(v(f),h!==h+0)throw h;y(1,0)}}function Za(t,e,r,n,o){var i=g();try{return w(t)(e,r,n,o)}catch(s){if(v(i),s!==s+0)throw s;y(1,0)}}function Ya(t,e,r,n,o,i,s,u){var l=g();try{w(t)(e,r,n,o,i,s,u)}catch(f){if(v(l),f!==f+0)throw f;y(1,0)}}function Ja(t,e,r,n,o,i){var s=g();try{return w(t)(e,r,n,o,i)}catch(u){if(v(s),u!==u+0)throw u;y(1,0)}}function Ka(t,e,r,n,o,i){var s=g();try{w(t)(e,r,n,o,i)}catch(u){if(v(s),u!==u+0)throw u;y(1,0)}}function to(t,e,r,n,o,i,s){var u=g();try{return w(t)(e,r,n,o,i,s)}catch(l){if(v(u),l!==l+0)throw l;y(1,0)}}function eo(t,e,r,n,o,i,s,u){var l=g();try{return w(t)(e,r,n,o,i,s,u)}catch(f){if(v(l),f!==f+0)throw f;y(1,0)}}function ro(t){var e=g();try{return w(t)()}catch(r){if(v(e),r!==r+0)throw r;y(1,0)}}function no(t,e,r,n,o,i,s,u,l){var f=g();try{return w(t)(e,r,n,o,i,s,u,l)}catch(h){if(v(f),h!==h+0)throw h;y(1,0)}}function ao(t,e,r,n,o,i,s){var u=g();try{return w(t)(e,r,n,o,i,s)}catch(l){if(v(u),l!==l+0)throw l;y(1,0)}}function oo(t,e,r,n){var o=g();try{return w(t)(e,r,n)}catch(i){if(v(o),i!==i+0)throw i;y(1,0)}}function io(t,e,r,n){var o=g();try{return w(t)(e,r,n)}catch(i){if(v(o),i!==i+0)throw i;y(1,0)}}function so(t,e,r,n,o,i,s,u){var l=g();try{w(t)(e,r,n,o,i,s,u)}catch(f){if(v(l),f!==f+0)throw f;y(1,0)}}function uo(t,e,r,n,o,i){var s=g();try{return w(t)(e,r,n,o,i)}catch(u){if(v(s),u!==u+0)throw u;y(1,0)}}function lo(t,e,r,n,o,i,s,u,l,f){var h=g();try{w(t)(e,r,n,o,i,s,u,l,f)}catch(m){if(v(h),m!==m+0)throw m;y(1,0)}}function co(t,e,r){var n=g();try{return w(t)(e,r)}catch(o){if(v(n),o!==o+0)throw o;y(1,0)}}function fo(t,e,r,n,o){var i=g();try{return w(t)(e,r,n,o)}catch(s){if(v(i),s!==s+0)throw s;y(1,0)}}function ho(t,e,r,n,o,i,s){var u=g();try{w(t)(e,r,n,o,i,s)}catch(l){if(v(u),l!==l+0)throw l;y(1,0)}}function po(t,e,r,n){var o=g();try{return w(t)(e,r,n)}catch(i){if(v(o),i!==i+0)throw i;y(1,0)}}function mo(t,e,r,n,o,i,s,u,l,f,h,m){var $=g();try{return w(t)(e,r,n,o,i,s,u,l,f,h,m)}catch(E){if(v($),E!==E+0)throw E;y(1,0)}}function yo(t,e,r,n,o,i,s,u,l,f,h,m,$,E,I,D){var _=g();try{w(t)(e,r,n,o,i,s,u,l,f,h,m,$,E,I,D)}catch(T){if(v(_),T!==T+0)throw T;y(1,0)}}function vo(t,e,r,n,o,i,s){var u=g();try{return qe(t,e,r,n,o,i,s)}catch(l){if(v(u),l!==l+0)throw l;y(1,0)}}function go(t,e,r,n,o){var i=g();try{return Ze(t,e,r,n,o)}catch(s){if(v(i),s!==s+0)throw s;y(1,0)}}function wo(){Nr();function t(){var e,r;c.calledRun=!0,!vt&&(Qr(),(e=pe)===null||e===void 0||e(c),(r=c.onRuntimeInitialized)===null||r===void 0||r.call(c),Xr())}c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1),t()},1)):t()}var pt;return pt=await en(),wo(),ge?d=c:d=new Promise((t,e)=>{pe=t,me=e}),d}function Bt(a){return ee(Ft,a)}function Ar(){return Tr(Ft)}function Pr(a){Bt({overrides:a,equalityFn:Object.is,fireImmediately:!1})}async function Or(a,d){return _r(Ft,a,d)}const Dr="8f2a99b0c9fdf8123d0152ba4761fc7dbf58c7de7e4937d1e134aae17e2ad795",re=[["aztec","Aztec"],["aztec_code","AztecCode"],["aztec_rune","AztecRune"],["code_128","Code128"],["code_39","Code39"],["code_39_standard","Code39Std"],["code_39_extended","Code39Ext"],["code_32","Code32"],["pzn","PZN"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_omni","DataBarOmni"],["databar_stacked","DataBarStk"],["databar_stacked_omni","DataBarStkOmni"],["databar_expanded","DataBarExp"],["databar_expanded_stacked","DataBarExpStk"],["databar_limited","DataBarLtd"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN13"],["ean_upc","EANUPC"],["isbn","ISBN"],["ean_8","EAN8"],["itf","ITF"],["itf_14","ITF14"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["compact_pdf417","CompactPDF417"],["qr_code","QRCode"],["qr_code_model_1","QRCodeModel1"],["qr_code_model_2","QRCodeModel2"],["rm_qr_code","RMQRCode"],["upc_a","UPCA"],["upc_e","UPCE"],["other_barcode","OtherBarcode"],["linear_codes","AllLinear"],["matrix_codes","AllMatrix"],["gs1_codes","AllGS1"],["retail_codes","AllRetail"],["industrial_codes","AllIndustrial"],["any","All"]],Sr=[...re,["unknown"]].map(a=>a[0]),jt=new Map(re);function Ir(a){for(const[d,p]of jt)if(a===p)return d;return"unknown"}function xr(a){if(ne(a))return{width:a.naturalWidth,height:a.naturalHeight};if(ae(a))return{width:a.width.baseVal.value,height:a.height.baseVal.value};if(oe(a))return{width:a.videoWidth,height:a.videoHeight};if(se(a))return{width:a.width,height:a.height};if(le(a))return{width:a.displayWidth,height:a.displayHeight};if(ie(a))return{width:a.width,height:a.height};if(ue(a))return{width:a.width,height:a.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 ne(a){var d,p;try{return a instanceof((p=(d=a==null?void 0:a.ownerDocument)==null?void 0:d.defaultView)==null?void 0:p.HTMLImageElement)}catch{return!1}}function ae(a){var d,p;try{return a instanceof((p=(d=a==null?void 0:a.ownerDocument)==null?void 0:d.defaultView)==null?void 0:p.SVGImageElement)}catch{return!1}}function oe(a){var d,p;try{return a instanceof((p=(d=a==null?void 0:a.ownerDocument)==null?void 0:d.defaultView)==null?void 0:p.HTMLVideoElement)}catch{return!1}}function ie(a){var d,p;try{return a instanceof((p=(d=a==null?void 0:a.ownerDocument)==null?void 0:d.defaultView)==null?void 0:p.HTMLCanvasElement)}catch{return!1}}function se(a){try{return a instanceof ImageBitmap||Object.prototype.toString.call(a)==="[object ImageBitmap]"}catch{return!1}}function ue(a){try{return a instanceof OffscreenCanvas||Object.prototype.toString.call(a)==="[object OffscreenCanvas]"}catch{return!1}}function le(a){try{return a instanceof VideoFrame||Object.prototype.toString.call(a)==="[object VideoFrame]"}catch{return!1}}function Rr(a){try{return a instanceof Blob||Object.prototype.toString.call(a)==="[object Blob]"}catch{return!1}}function Mr(a){try{return a instanceof ImageData||Object.prototype.toString.call(a)==="[object ImageData]"}catch{return!1}}function Fr(a,d){try{const p=new OffscreenCanvas(a,d);if(p.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return p;throw void 0}catch{const p=document.createElement("canvas");return p.width=a,p.height=d,p}}async function ce(a){if(ne(a)&&!await Ur(a))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ae(a)&&!await Wr(a))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(le(a)&&kr(a))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(oe(a)&&(a.readyState===0||a.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(se(a)&&Gr(a))throw new DOMException("The image source is detached.","InvalidStateError");const{width:d,height:p}=xr(a);if(d===0||p===0)return null;const c=Fr(d,p).getContext("2d");c.drawImage(a,0,0);try{return c.getImageData(0,0,d,p)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Br(a){let d;try{d=await createImageBitmap(a)}catch{try{if(globalThis.Image){d=new Image;let c="";try{c=URL.createObjectURL(a),d.src=c,await d.decode()}finally{URL.revokeObjectURL(c)}}else return a}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await ce(d)}function jr(a){const{width:d,height:p}=a;if(d===0||p===0)return null;const b=a.getContext("2d");try{return b.getImageData(0,0,d,p)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Lr(a){if(Rr(a))return await Br(a);if(Mr(a)){if(Vr(a))throw new DOMException("The image data has been detached.","InvalidStateError");return a}return ie(a)||ue(a)?jr(a):await ce(a)}async function Ur(a){try{return await a.decode(),!0}catch{return!1}}async function Wr(a){var d;try{return await((d=a.decode)==null?void 0:d.call(a)),!0}catch{return!1}}function kr(a){return a.format===null}function Vr(a){return a.data.buffer.byteLength===0}function Gr(a){return a.width===0&&a.height===0}function de(a,d){return Hr(a)?new DOMException(`${d}: ${a.message}`,a.name):zr(a)?new a.constructor(`${d}: ${a.message}`):new Error(`${d}: ${a}`)}function Hr(a){return a instanceof DOMException||Object.prototype.toString.call(a)==="[object DOMException]"}function zr(a){return a instanceof Error||Object.prototype.toString.call(a)==="[object Error]"}class fe{constructor(d={}){or(this,it);var p;try{const b=(p=d==null?void 0:d.formats)==null?void 0:p.filter(c=>c!=="unknown");if((b==null?void 0:b.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const c of b!=null?b:[])if(!jt.has(c))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${c}' is not a valid enum value of type BarcodeFormat.`);ir(this,it,b!=null?b:[]),Bt({fireImmediately:!0}).catch(()=>{})}catch(b){throw de(b,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Sr.filter(d=>d!=="unknown")}async detect(d){try{const p=await Lr(d);if(p===null)return[];let b;const c={textMode:"Plain",formats:ar(this,it).map(x=>jt.get(x))};try{b=await Or(p,c)}catch(x){throw console.error(x),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return b.map(x=>{const{topLeft:{x:R,y:M},topRight:{x:S,y:F},bottomLeft:{x:G,y:q},bottomRight:{x:H,y:J}}=x.position,st=Math.min(R,S,G,H),z=Math.min(M,F,q,J),K=Math.max(R,S,G,H),vt=Math.max(M,F,q,J);return{boundingBox:new DOMRectReadOnly(st,z,K-st,vt-z),rawValue:x.text,format:Ir(x.format),cornerPoints:[{x:R,y:M},{x:S,y:F},{x:H,y:J},{x:G,y:q}]}})}catch(p){throw de(p,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return it=new WeakMap,(he=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=fe),P.BarcodeDetector=fe,P.ZXING_CPP_COMMIT=br,P.ZXING_WASM_SHA256=Dr,P.ZXING_WASM_VERSION=wr,P.prepareZXingModule=Bt,P.purgeZXingModule=Ar,P.setZXingModuleOverrides=Pr,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),P})({});
@@ -1 +1 @@
1
- var BarcodeDetectionAPI=(function(_){"use strict";var rr=_=>{throw TypeError(_)};var nr=(_,M,F)=>M.has(_)||rr("Cannot "+F);var ar=(_,M,F)=>(nr(_,M,"read from private field"),F?F.call(_):M.get(_)),or=(_,M,F)=>M.has(_)?rr("Cannot add the same private member more than once"):M instanceof WeakSet?M.add(_):M.set(_,F),ir=(_,M,F,yt)=>(nr(_,M,"write to private field"),yt?yt.call(_,F):M.set(_,F),F);var it,he;const M=[["Aztec","M"],["Codabar","L"],["Code39","L"],["Code93","L"],["Code128","L"],["DataBar","L"],["DataBarExpanded","L"],["DataMatrix","M"],["EAN-8","L"],["EAN-13","L"],["ITF","L"],["MaxiCode","M"],["PDF417","M"],["QRCode","M"],["UPC-A","L"],["UPC-E","L"],["MicroQRCode","M"],["rMQRCode","M"],["DXFilmEdge","L"],["DataBarLimited","L"]],F=M.map(([i])=>i),yt=F.filter((i,f)=>M[f][1]==="L"),sr=F.filter((i,f)=>M[f][1]==="M");function Rt(i){switch(i){case"Linear-Codes":return yt.reduce((f,h)=>f|Rt(h),0);case"Matrix-Codes":return sr.reduce((f,h)=>f|Rt(h),0);case"Any":return(1<<M.length)-1;case"None":return 0;default:return 1<<F.indexOf(i)}}function ur(i){if(i===0)return"None";const f=31-Math.clz32(i);return F[f]}function cr(i){return i.reduce((f,h)=>f|Rt(h),0)}const lr=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function fr(i){return lr.indexOf(i)}const te=["Unknown","ASCII","ISO8859_1","ISO8859_2","ISO8859_3","ISO8859_4","ISO8859_5","ISO8859_6","ISO8859_7","ISO8859_8","ISO8859_9","ISO8859_10","ISO8859_11","ISO8859_13","ISO8859_14","ISO8859_15","ISO8859_16","Cp437","Cp1250","Cp1251","Cp1252","Cp1256","Shift_JIS","Big5","GB2312","GB18030","EUC_JP","EUC_KR","UTF16BE","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function dr(i){return i==="UnicodeBig"?te.indexOf("UTF16BE"):te.indexOf(i)}const hr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function pr(i){return hr[i]}const yr=["Ignore","Read","Require"];function vr(i){return yr.indexOf(i)}const mr=["Plain","ECI","HRI","Hex","Escaped"];function gr(i){return mr.indexOf(i)}const vt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown"};function ee(i){return{...i,formats:cr(i.formats),binarizer:fr(i.binarizer),eanAddOnSymbol:vr(i.eanAddOnSymbol),textMode:gr(i.textMode),characterSet:dr(i.characterSet)}}function wr(i){return{...i,format:ur(i.format),contentType:pr(i.contentType),eccLevel:i.ecLevel}}const br="2.2.4",$r="fba4e9503fee4518ca2e89510baeea9bcc36dc8d",Cr={locateFile:(i,f)=>{const h=i.match(/_(.+?)\.wasm$/);return h?`https://fastly.jsdelivr.net/npm/zxing-wasm@2.2.4/dist/${h[1]}/${i}`:f+i}},mt=new WeakMap;function Tr(i,f){return Object.is(i,f)||Object.keys(i).length===Object.keys(f).length&&Object.keys(i).every(h=>Object.hasOwn(f,h)&&i[h]===f[h])}function re(i,{overrides:f,equalityFn:h=Tr,fireImmediately:C=!1}={}){var l;const[D,A]=(l=mt.get(i))!=null?l:[Cr],R=f!=null?f:D;let S;if(C){if(A&&(S=h(D,R)))return A;const B=i({...R});return mt.set(i,[R,B]),B}(S!=null?S:h(D,R))||mt.set(i,[R])}function Pr(i){mt.delete(i)}async function Er(i,f,h=vt){const C={...vt,...h},l=await re(i,{fireImmediately:!0});let D,A;if("width"in f&&"height"in f&&"data"in f){const{data:S,data:{byteLength:B},width:H,height:Y}=f;A=l._malloc(B),l.HEAPU8.set(S,A),D=l.readBarcodesFromPixmap(A,H,Y,ee(C))}else{let S,B;if("buffer"in f)[S,B]=[f.byteLength,f];else if("byteLength"in f)[S,B]=[f.byteLength,new Uint8Array(f)];else if("size"in f)[S,B]=[f.size,new Uint8Array(await f.arrayBuffer())];else throw new TypeError("Invalid input type");A=l._malloc(S),l.HEAPU8.set(B,A),D=l.readBarcodesFromImage(A,S,ee(C))}l._free(A);const R=[];for(let S=0;S<D.size();++S)R.push(wr(D.get(S)));return R}({...vt,formats:[...vt.formats]});async function Bt(i={}){var f,h,C,l=i,D=!!globalThis.window,A=typeof Bun<"u",R=!!globalThis.WorkerGlobalScope;!((h=globalThis.process)===null||h===void 0||(h=h.versions)===null||h===void 0)&&h.node&&((C=globalThis.process)===null||C===void 0?void 0:C.type)!="renderer";var S="./this.program",B,H="";function Y(t){return l.locateFile?l.locateFile(t,H):H+t}var nt,Z;if(D||R||A){try{H=new URL(".",B).href}catch{}R&&(Z=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),nt=async t=>{var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)}}var st=console.log.bind(console),k=console.error.bind(console),Q,gt=!1,pe,ye,J,N,wt,ut,ct,T,ve,me,ge=!1;function we(){var t=Dt.buffer;J=new Int8Array(t),wt=new Int16Array(t),l.HEAPU8=N=new Uint8Array(t),ut=new Uint16Array(t),ct=new Int32Array(t),T=new Uint32Array(t),ve=new Float32Array(t),me=new Float64Array(t)}function Xr(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)an(l.preRun.shift());be(Ce)}function qr(){ge=!0,pt.xa()}function Yr(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)nn(l.postRun.shift());be($e)}function Ut(t){var e,r;(e=l.onAbort)===null||e===void 0||e.call(l,t),t="Aborted("+t+")",k(t),gt=!0,t+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(t);throw(r=ye)===null||r===void 0||r(n),n}var bt;function Zr(){return Y("zxing_reader.wasm")}function Qr(t){if(t==bt&&Q)return new Uint8Array(Q);if(Z)return Z(t);throw"both async and sync fetching of the wasm failed"}async function Jr(t){if(!Q)try{var e=await nt(t);return new Uint8Array(e)}catch{}return Qr(t)}async function Kr(t,e){try{var r=await Jr(t),n=await WebAssembly.instantiate(r,e);return n}catch(a){k(`failed to asynchronously prepare wasm: ${a}`),Ut(a)}}async function tn(t,e,r){if(!t&&WebAssembly.instantiateStreaming)try{var n=fetch(e,{credentials:"same-origin"}),a=await WebAssembly.instantiateStreaming(n,r);return a}catch(o){k(`wasm streaming compile failed: ${o}`),k("falling back to ArrayBuffer instantiation")}return Kr(e,r)}function en(){var t={a:ja};return t}async function rn(){function t(o,s){return pt=o.exports,Ba(pt),we(),pt}function e(o){return t(o.instance)}var r=en();if(l.instantiateWasm)return new Promise((o,s)=>{l.instantiateWasm(r,(u,c)=>{o(t(u))})});bt!=null||(bt=Zr());var n=await tn(Q,bt,r),a=e(n);return a}var be=t=>{for(;t.length>0;)t.shift()(l)},$e=[],nn=t=>$e.push(t),Ce=[],an=t=>Ce.push(t),m=t=>Ne(t),g=()=>ze(),$t=[],Ct=0,on=t=>{var e=new Vt(t);return e.get_caught()||(e.set_caught(!0),Ct--),e.set_rethrown(!1),$t.push(e),Xe(t),He(t)},z=0,sn=()=>{v(0,0);var t=$t.pop();Ge(t.excPtr),z=0};class Vt{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){T[this.ptr+4>>2]=e}get_type(){return T[this.ptr+4>>2]}set_destructor(e){T[this.ptr+8>>2]=e}get_destructor(){return T[this.ptr+8>>2]}set_caught(e){e=e?1:0,J[this.ptr+12]=e}get_caught(){return J[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,J[this.ptr+13]=e}get_rethrown(){return J[this.ptr+13]!=0}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){T[this.ptr+16>>2]=e}get_adjusted_ptr(){return T[this.ptr+16>>2]}}var Tt=t=>ke(t),Wt=t=>{var e=z;if(!e)return Tt(0),0;var r=new Vt(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a of t){if(a===0||a===n)break;var o=r.ptr+16;if(qe(a,n,o))return Tt(a),e}return Tt(n),e},un=()=>Wt([]),cn=t=>Wt([t]),ln=(t,e)=>Wt([t,e]),fn=()=>{var t=$t.pop();t||Ut("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||($t.push(t),t.set_rethrown(!0),t.set_caught(!1),Ct++),z=e,z},dn=(t,e,r)=>{var n=new Vt(t);throw n.init(e,r),z=t,Ct++,z},hn=()=>Ct,pn=t=>{throw z||(z=t),z},yn=()=>Ut(""),Pt={},Ht=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function lt(t){return this.fromWireType(T[t>>2])}var at={},K={},Et={},vn=class extends Error{constructor(t){super(t),this.name="InternalError"}},Ot=t=>{throw new vn(t)},tt=(t,e,r)=>{t.forEach(u=>Et[u]=e);function n(u){var c=r(u);c.length!==t.length&&Ot("Mismatched type converter count");for(var d=0;d<t.length;++d)V(t[d],c[d])}var a=new Array(e.length),o=[],s=0;{const u=e;for(let c=0;c<u.length;++c){const d=u[c];K.hasOwnProperty(d)?a[c]=K[d]:(o.push(d),at.hasOwnProperty(d)||(at[d]=[]),at[d].push(()=>{a[c]=K[d],++s,s===o.length&&n(a)}))}}o.length===0&&n(a)},mn=t=>{var e=Pt[t];delete Pt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(s=>s.getterReturnType).concat(a.map(s=>s.setterArgumentType));tt([t],o,s=>{var u={};{const c=a;for(let d=0;d<c.length;++d){const p=c[d],y=s[d],$=p.getter,E=p.getterContext,I=s[d+a.length],x=p.setter,O=p.setterContext;u[p.fieldName]={read:P=>y.fromWireType($(E,P)),write:(P,rt)=>{var L=[];x(O,P,I.toWireType(L,rt)),Ht(L)},optional:y.optional}}}return[{name:e.name,fromWireType:c=>{var d={};for(var p in u)d[p]=u[p].read(c);return n(c),d},toWireType:(c,d)=>{for(var p in u)if(!(p in d)&&!u[p].optional)throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in u)u[p].write(y,d[p]);return c!==null&&c.push(n,y),y},readValueFromPointer:lt,destructorFunction:n}]})},gn=(t,e,r,n,a)=>{},j=t=>{for(var e="";;){var r=N[t++];if(!r)return e;e+=String.fromCharCode(r)}},ft=class extends Error{constructor(t){super(t),this.name="BindingError"}},b=t=>{throw new ft(t)};function wn(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(t||b(`type "${n}" must have a positive integer typeid pointer`),K.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;b(`Cannot register type '${n}' twice`)}if(K[t]=e,delete Et[t],at.hasOwnProperty(t)){var a=at[t];delete at[t],a.forEach(o=>o())}}function V(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return wn(t,e,r)}var bn=(t,e,r,n)=>{e=j(e),V(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},readValueFromPointer:function(a){return this.fromWireType(N[a])},destructorFunction:null})},$n=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),kt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}b(e(t)+" instance already deleted")},Nt=!1,Te=t=>{},Cn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Pe=t=>{t.count.value-=1;var e=t.count.value===0;e&&Cn(t)},dt=t=>globalThis.FinalizationRegistry?(Nt=new FinalizationRegistry(e=>{Pe(e.$$)}),dt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Nt.register(e,a,e)}return e},Te=e=>Nt.unregister(e),dt(t)):(dt=e=>e,t),Tn=()=>{let t=_t.prototype;Object.assign(t,{isAliasOf(r){if(!(this instanceof _t)||!(r instanceof _t))return!1;var n=this.$$.ptrType.registeredClass,a=this.$$.ptr;r.$$=r.$$;for(var o=r.$$.ptrType.registeredClass,s=r.$$.ptr;n.baseClass;)a=n.upcast(a),n=n.baseClass;for(;o.baseClass;)s=o.upcast(s),o=o.baseClass;return n===o&&a===s},clone(){if(this.$$.ptr||kt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=dt(Object.create(Object.getPrototypeOf(this),{$$:{value:$n(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&b("Object already scheduled for deletion"),Te(this),Pe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&b("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});const e=Symbol.dispose;e&&(t[e]=t.delete)};function _t(){}var zt=(t,e)=>Object.defineProperty(e,"name",{value:t}),Ee={},Oe=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){for(var a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];return t[e].overloadTable.hasOwnProperty(o.length)||b(`Function '${r}' called with an invalid number of arguments (${o.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[o.length].apply(this,o)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},_e=(t,e,r)=>{l.hasOwnProperty(t)?((r===void 0||l[t].overloadTable!==void 0&&l[t].overloadTable[r]!==void 0)&&b(`Cannot register public name '${t}' twice`),Oe(l,t,t),l[t].overloadTable.hasOwnProperty(r)&&b(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),l[t].overloadTable[r]=e):(l[t]=e,l[t].argCount=r)},Pn=48,En=57,On=t=>{t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Pn&&e<=En?`_${t}`:t};function _n(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 Gt=(t,e,r)=>{for(;e!==r;)e.upcast||b(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t},Xt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t};function Sn(t,e){if(e===null)return this.isReference&&b(`null is not a valid ${this.name}`),0;e.$$||b(`Cannot pass "${Xt(e)}" as a ${this.name}`),e.$$.ptr||b(`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 xn(t,e){var r;if(e===null)return this.isReference&&b(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;(!e||!e.$$)&&b(`Cannot pass "${Xt(e)}" as a ${this.name}`),e.$$.ptr||b(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&b(`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&&b("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:b(`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,W.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:b("Unsupporting sharing policy")}return r}function In(t,e){if(e===null)return this.isReference&&b(`null is not a valid ${this.name}`),0;e.$$||b(`Cannot pass "${Xt(e)}" as a ${this.name}`),e.$$.ptr||b(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&b(`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}var Se=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Se(t,e,r.baseClass);return n===null?null:r.downcast(n)},Dn={},Mn=(t,e)=>{for(e===void 0&&b("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},An=(t,e)=>(e=Mn(t,e),Dn[e]),St=(t,e)=>{(!e.ptrType||!e.ptr)&&Ot("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ot("Both smartPtrType and smartPtr must be specified"),e.count={value:1},dt(Object.create(t,{$$:{value:e,writable:!0}}))};function Fn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=An(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=Ee[o];if(!s)return a.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var c=Se(e,this.registeredClass,u.registeredClass);return c===null?a.call(this):this.isSmartPointer?St(u.registeredClass.instancePrototype,{ptrType:u,ptr:c,smartPtrType:this,smartPtr:t}):St(u.registeredClass.instancePrototype,{ptrType:u,ptr:c})}var Rn=()=>{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)},readValueFromPointer:lt,fromWireType:Fn})};function xt(t,e,r,n,a,o,s,u,c,d,p){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=c,this.rawShare=d,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=Sn,this.destructorFunction=null):(this.toWireType=In,this.destructorFunction=null):this.toWireType=xn}var xe=(t,e,r)=>{l.hasOwnProperty(t)||Ot("Replacing nonexistent public symbol"),l[t].overloadTable!==void 0&&r!==void 0?l[t].overloadTable[r]=e:(l[t]=e,l[t].argCount=r)},X={},Bn=(t,e,r)=>{t=t.replace(/p/g,"i");var n=X[t];return n(e,...r)},Ie=[],w=t=>{var e=Ie[t];return e||(Ie[t]=e=Qe.get(t)),e},jn=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t.includes("j"))return Bn(t,e,r);var n=w(e),a=n(...r);return a},Ln=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){for(var n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return jn(t,e,a,r)}},U=function(t,e){t=j(t);function r(){if(t.includes("j"))return Ln(t,e);var a=w(e);return a}var n=r();return typeof n!="function"&&b(`unknown function pointer with signature ${t}: ${e}`),n};class Un extends Error{}var De=t=>{var e=We(t),r=j(e);return q(e),r},It=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!K[o]){if(Et[o]){Et[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Un(`${t}: `+r.map(De).join([", "]))},Vn=(t,e,r,n,a,o,s,u,c,d,p,y,$)=>{p=j(p),o=U(a,o),u&&(u=U(s,u)),d&&(d=U(c,d)),$=U(y,$);var E=On(p);_e(E,function(){It(`Cannot construct ${p} due to unbound types`,[n])}),tt([t,e,r],n?[n]:[],I=>{I=I[0];var x,O;n?(x=I.registeredClass,O=x.instancePrototype):O=_t.prototype;var P=zt(p,function(){if(Object.getPrototypeOf(this)!==rt)throw new ft(`Use 'new' to construct ${p}`);if(L.constructor_body===void 0)throw new ft(`${p} has no accessible constructor`);for(var tr=arguments.length,At=new Array(tr),Ft=0;Ft<tr;Ft++)At[Ft]=arguments[Ft];var er=L.constructor_body[At.length];if(er===void 0)throw new ft(`Tried to invoke ctor of ${p} with invalid number of parameters (${At.length}) - expected (${Object.keys(L.constructor_body).toString()}) parameters instead!`);return er.apply(this,At)}),rt=Object.create(O,{constructor:{value:P}});P.prototype=rt;var L=new _n(p,P,rt,$,x,o,u,d);if(L.baseClass){var G,Mt;(Mt=(G=L.baseClass).__derivedClasses)!==null&&Mt!==void 0||(G.__derivedClasses=[]),L.baseClass.__derivedClasses.push(L)}var $o=new xt(p,L,!0,!1,!1),Je=new xt(p+"*",L,!1,!1,!1),Ke=new xt(p+" const*",L,!1,!0,!1);return Ee[t]={pointerType:Je,constPointerType:Ke},xe(E,P),[$o,Je,Ke]})},qt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(T[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 Yt(t,e,r,n,a,o){var s=e.length;s<2&&b("argTypes array size mismatch! Must at least get return value and 'this' types!");var u=e[1]!==null&&r!==null,c=Wn(e),d=!e[0].isVoid,p=s-2,y=new Array(p),$=[],E=[],I=function(){E.length=0;var x;$.length=u?2:1,$[0]=a,u&&(x=e[1].toWireType(E,this),$[1]=x);for(var O=0;O<p;++O)y[O]=e[O+2].toWireType(E,O<0||arguments.length<=O?void 0:arguments[O]),$.push(y[O]);var P=n(...$);function rt(L){if(c)Ht(E);else for(var G=u?1:2;G<e.length;G++){var Mt=G===1?x:y[G-2];e[G].destructorFunction!==null&&e[G].destructorFunction(Mt)}if(d)return e[0].fromWireType(L)}return rt(P)};return zt(t,I)}var Hn=(t,e,r,n,a,o)=>{var s=qt(e,r);a=U(n,a),tt([],[t],u=>{u=u[0];var c=`constructor ${u.name}`;if(u.registeredClass.constructor_body===void 0&&(u.registeredClass.constructor_body=[]),u.registeredClass.constructor_body[e-1]!==void 0)throw new ft(`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]=()=>{It(`Cannot construct ${u.name} due to unbound types`,s)},tt([],s,d=>(d.splice(1,0,null),u.registeredClass.constructor_body[e-1]=Yt(c,d,null,a,o),[])),[]})},Me=t=>{t=t.trim();const e=t.indexOf("(");return e===-1?t:t.slice(0,e)},kn=(t,e,r,n,a,o,s,u,c,d)=>{var p=qt(r,n);e=j(e),e=Me(e),o=U(a,o),tt([],[t],y=>{y=y[0];var $=`${y.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&y.registeredClass.pureVirtualFunctions.push(e);function E(){It(`Cannot call ${$} due to unbound types`,p)}var I=y.registeredClass.instancePrototype,x=I[e];return x===void 0||x.overloadTable===void 0&&x.className!==y.name&&x.argCount===r-2?(E.argCount=r-2,E.className=y.name,I[e]=E):(Oe(I,e,$),I[e].overloadTable[r-2]=E),tt([],p,O=>{var P=Yt($,O,y,o,s);return I[e].overloadTable===void 0?(P.argCount=r-2,I[e]=P):I[e].overloadTable[r-2]=P,[]}),[]})},Ae=[],et=[0,1,,1,null,1,!0,1,!1,1],Zt=t=>{t>9&&--et[t+1]===0&&(et[t]=void 0,Ae.push(t))},W={toValue:t=>(t||b(`Cannot use deleted val. handle = ${t}`),et[t]),toHandle:t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=Ae.pop()||et.length;return et[e]=t,et[e+1]=1,e}}}},Fe={name:"emscripten::val",fromWireType:t=>{var e=W.toValue(t);return Zt(t),e},toWireType:(t,e)=>W.toHandle(e),readValueFromPointer:lt,destructorFunction:null},Nn=t=>V(t,Fe),zn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ve[r>>2])};case 8:return function(r){return this.fromWireType(me[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Gn=(t,e,r)=>{e=j(e),V(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,readValueFromPointer:zn(e,r),destructorFunction:null})},Xn=(t,e,r,n,a,o,s,u)=>{var c=qt(e,r);t=j(t),t=Me(t),a=U(n,a),_e(t,function(){It(`Cannot call ${t} due to unbound types`,c)},e-1),tt([],c,d=>{var p=[d[0],null].concat(d.slice(1));return xe(t,Yt(t,p,null,a,o),e-1),[]})},qn=(t,e,r)=>{switch(e){case 1:return r?n=>J[n]:n=>N[n];case 2:return r?n=>wt[n>>1]:n=>ut[n>>1];case 4:return r?n=>ct[n>>2]:n=>T[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Yn=(t,e,r,n,a)=>{e=j(e);const o=n===0;let s=c=>c;if(o){var u=32-8*r;s=c=>c<<u>>>u,a=s(a)}V(t,{name:e,fromWireType:s,toWireType:(c,d)=>d,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],c=T[s+4>>2];return new a(J.buffer,c,u)}r=j(r),V(t,{name:r,fromWireType:o,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Qn=Object.assign({optional:!0},Fe),Jn=(t,e)=>{V(t,Qn)},Kn=(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.codePointAt(s);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,s++}}return e[r]=0,r-a},ot=(t,e,r)=>Kn(t,N,e,r),Re=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},Be=globalThis.TextDecoder&&new TextDecoder,je=(t,e,r,n)=>{var a=e+r;if(n)return a;for(;t[e]&&!(e>=a);)++e;return e},Le=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;var a=je(t,e,r,n);if(a-e>16&&t.buffer&&Be)return Be.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 c=t[e++]&63;if((s&240)==224?s=(s&15)<<12|u<<6|c:s=(s&7)<<18|u<<12|c<<6|t[e++]&63,s<65536)o+=String.fromCharCode(s);else{var d=s-65536;o+=String.fromCharCode(55296|d>>10,56320|d&1023)}}return o},ta=(t,e,r)=>t?Le(N,t,e,r):"",ea=(t,e)=>{e=j(e),V(t,{name:e,fromWireType(r){var n=T[r>>2],a=r+4,o;return o=ta(a,n,!0),q(r),o},toWireType(r,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var a,o=typeof n=="string";o||ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT==1||b("Cannot pass non-string to std::string"),o?a=Re(n):a=n.length;var s=Kt(4+a+1),u=s+4;return T[s>>2]=a,o?ot(n,u,a+1):N.set(n,u),r!==null&&r.push(q,s),s},readValueFromPointer:lt,destructorFunction(r){q(r)}})},Ue=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,ra=(t,e,r)=>{var n=t>>1,a=je(ut,n,e/2,r);if(a-n>16&&Ue)return Ue.decode(ut.subarray(n,a));for(var o="",s=n;s<a;++s){var u=ut[s];o+=String.fromCharCode(u)}return o},na=(t,e,r)=>{if(r!=null||(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var s=t.charCodeAt(o);wt[e>>1]=s,e+=2}return wt[e>>1]=0,e-n},aa=t=>t.length*2,oa=(t,e,r)=>{for(var n="",a=t>>2,o=0;!(o>=e/4);o++){var s=T[a+o];if(!s&&!r)break;n+=String.fromCodePoint(s)}return n},ia=(t,e,r)=>{if(r!=null||(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var s=t.codePointAt(o);if(s>65535&&o++,ct[e>>2]=s,e+=4,e+4>a)break}return ct[e>>2]=0,e-n},sa=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.codePointAt(r);n>65535&&r++,e+=4}return e},ua=(t,e,r)=>{r=j(r);var n,a,o;e===2?(n=ra,a=na,o=aa):(n=oa,a=ia,o=sa),V(t,{name:r,fromWireType:s=>{var u=T[s>>2],c=n(s+4,u*e,!0);return q(s),c},toWireType:(s,u)=>{typeof u!="string"&&b(`Cannot pass non-string to C++ string type ${r}`);var c=o(u),d=Kt(4+c+e);return T[d>>2]=c/e,a(u,d+4,c+e),s!==null&&s.push(q,d),d},readValueFromPointer:lt,destructorFunction(s){q(s)}})},ca=(t,e,r,n,a,o)=>{Pt[t]={name:j(e),rawConstructor:U(r,n),rawDestructor:U(a,o),fields:[]}},la=(t,e,r,n,a,o,s,u,c,d)=>{Pt[t].fields.push({fieldName:j(e),getterReturnType:r,getter:U(n,a),getterContext:o,setterArgumentType:s,setter:U(u,c),setterContext:d})},fa=(t,e)=>{e=j(e),V(t,{isVoid:!0,name:e,fromWireType:()=>{},toWireType:(r,n)=>{}})},Qt=[],da=t=>{var e=Qt.length;return Qt.push(t),e},ha=(t,e)=>{var r=K[t];return r===void 0&&b(`${e} has unknown type ${De(t)}`),r},pa=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=ha(T[e+n*4>>2],`parameter ${n}`);return r},ya=(t,e,r)=>{var n=[],a=t(n,r);return n.length&&(T[e>>2]=W.toHandle(n)),a},va={},Ve=t=>{var e=va[t];return e===void 0?j(t):e},ma=(t,e,r)=>{var n=8,[a,...o]=pa(t,e),s=a.toWireType.bind(a),u=o.map(y=>y.readValueFromPointer.bind(y));t--;var c=new Array(t),d=(y,$,E,I)=>{for(var x=0,O=0;O<t;++O)c[O]=u[O](I+x),x+=n;var P;switch(r){case 0:P=W.toValue(y).apply(null,c);break;case 2:P=Reflect.construct(W.toValue(y),c);break;case 3:P=c[0];break;case 1:P=W.toValue(y)[Ve($)](...c);break}return ya(s,E,P)},p=`methodCaller<(${o.map(y=>y.name)}) => ${a.name}>`;return da(zt(p,d))},ga=t=>t?(t=Ve(t),W.toHandle(globalThis[t])):W.toHandle(globalThis),wa=t=>{t>9&&(et[t+1]+=1)},ba=(t,e,r,n,a)=>Qt[t](e,r,n,a),$a=t=>{var e=W.toValue(t);Ht(e),Zt(t)},Ca=(t,e,r,n)=>{var a=new Date().getFullYear(),o=new Date(a,0,1),s=new Date(a,6,1),u=o.getTimezoneOffset(),c=s.getTimezoneOffset(),d=Math.max(u,c);T[t>>2]=d*60,ct[e>>2]=+(u!=c);var p=E=>{var I=E>=0?"-":"+",x=Math.abs(E),O=String(Math.floor(x/60)).padStart(2,"0"),P=String(x%60).padStart(2,"0");return`UTC${I}${O}${P}`},y=p(u),$=p(c);c<u?(ot(y,r,17),ot($,n,17)):(ot(y,n,17),ot($,r,17))},Ta=()=>2147483648,Pa=(t,e)=>Math.ceil(t/e)*e,Ea=t=>{var e=Dt.buffer.byteLength,r=(t-e+65535)/65536|0;try{return Dt.grow(r),we(),1}catch{}},Oa=t=>{var e=N.length;t>>>=0;var r=Ta();if(t>r)return!1;for(var n=1;n<=4;n*=2){var a=e*(1+.2/n);a=Math.min(a,t+100663296);var o=Math.min(r,Pa(Math.max(t,a),65536)),s=Ea(o);if(s)return!0}return!1},Jt={},_a=()=>S||"./this.program",ht=()=>{if(!ht.strings){var t=(typeof navigator=="object"&&navigator.language||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:_a()};for(var r in Jt)Jt[r]===void 0?delete e[r]:e[r]=Jt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);ht.strings=n}return ht.strings},Sa=(t,e)=>{var r=0,n=0;for(var a of ht()){var o=e+r;T[t+n>>2]=o,r+=ot(a,o,1/0)+1,n+=4}return 0},xa=(t,e)=>{var r=ht();T[t>>2]=r.length;var n=0;for(var a of r)n+=Re(a)+1;return T[e>>2]=n,0},Ia=t=>52;function Da(t,e,r,n,a){return 70}var Ma=[null,[],[]],Aa=(t,e)=>{var r=Ma[t];e===0||e===10?((t===1?st:k)(Le(r)),r.length=0):r.push(e)},Fa=(t,e,r,n)=>{for(var a=0,o=0;o<r;o++){var s=T[e>>2],u=T[e+4>>2];e+=8;for(var c=0;c<u;c++)Aa(t,N[s+c]);a+=u}return T[n>>2]=a,0},Ra=t=>t;if(Tn(),Rn(),l.noExitRuntime&&l.noExitRuntime,l.print&&(st=l.print),l.printErr&&(k=l.printErr),l.wasmBinary&&(Q=l.wasmBinary),l.arguments&&l.arguments,l.thisProgram&&(S=l.thisProgram),l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.shift()();var We,q,Kt,He,v,ke,Ne,ze,Ge,Xe,qe,Ye,Ze,Dt,Qe;function Ba(t){We=t.ya,q=l._free=t.za,Kt=l._malloc=t.Ba,He=t.Ca,v=t.Da,ke=t.Ea,Ne=t.Fa,ze=t.Ga,Ge=t.Ha,Xe=t.Ia,qe=t.Ja,X.viijii=t.Ka,Ye=X.iiijj=t.La,X.jiji=t.Ma,Ze=X.jiiii=t.Na,X.iiiiij=t.Oa,X.iiiiijj=t.Pa,X.iiiiiijj=t.Qa,Dt=t.wa,Qe=t.Aa}var ja={s:on,w:sn,a:un,j:cn,m:ln,Q:fn,p:dn,U:hn,d:pn,ca:yn,ta:mn,ba:gn,oa:bn,ra:Vn,qa:Hn,H:kn,ma:Nn,X:Gn,Y:Xn,x:Yn,t:Zn,sa:Jn,na:ea,R:ua,I:ca,ua:la,pa:fa,N:ma,va:Zt,D:ga,S:wa,M:ba,ia:$a,da:Ca,ga:Oa,ea:Sa,fa:xa,ha:Ia,$:Da,V:Fa,K:io,C:co,Z:Na,T:vo,r:ro,b:Ha,E:oo,ka:fo,c:za,ja:ho,h:ka,i:qa,q:Ja,P:ao,v:to,F:eo,L:no,z:lo,J:mo,aa:go,_:wo,f:Ga,l:La,e:Wa,g:Va,O:yo,k:Ua,la:so,o:Ka,B:Ya,u:uo,W:Qa,A:po,n:Xa,G:Za,y:Ra};function La(t,e){var r=g();try{w(t)(e)}catch(n){if(m(r),n!==n+0)throw n;v(1,0)}}function Ua(t,e,r,n,a){var o=g();try{w(t)(e,r,n,a)}catch(s){if(m(o),s!==s+0)throw s;v(1,0)}}function Va(t,e,r,n){var a=g();try{w(t)(e,r,n)}catch(o){if(m(a),o!==o+0)throw o;v(1,0)}}function Wa(t,e,r){var n=g();try{w(t)(e,r)}catch(a){if(m(n),a!==a+0)throw a;v(1,0)}}function Ha(t,e){var r=g();try{return w(t)(e)}catch(n){if(m(r),n!==n+0)throw n;v(1,0)}}function ka(t,e,r,n){var a=g();try{return w(t)(e,r,n)}catch(o){if(m(a),o!==o+0)throw o;v(1,0)}}function Na(t,e,r,n,a,o){var s=g();try{return w(t)(e,r,n,a,o)}catch(u){if(m(s),u!==u+0)throw u;v(1,0)}}function za(t,e,r){var n=g();try{return w(t)(e,r)}catch(a){if(m(n),a!==a+0)throw a;v(1,0)}}function Ga(t){var e=g();try{w(t)()}catch(r){if(m(e),r!==r+0)throw r;v(1,0)}}function Xa(t,e,r,n,a,o,s,u,c,d,p){var y=g();try{w(t)(e,r,n,a,o,s,u,c,d,p)}catch($){if(m(y),$!==$+0)throw $;v(1,0)}}function qa(t,e,r,n,a){var o=g();try{return w(t)(e,r,n,a)}catch(s){if(m(o),s!==s+0)throw s;v(1,0)}}function Ya(t,e,r,n,a,o,s){var u=g();try{w(t)(e,r,n,a,o,s)}catch(c){if(m(u),c!==c+0)throw c;v(1,0)}}function Za(t,e,r,n,a,o,s,u,c,d,p,y,$,E,I,x){var O=g();try{w(t)(e,r,n,a,o,s,u,c,d,p,y,$,E,I,x)}catch(P){if(m(O),P!==P+0)throw P;v(1,0)}}function Qa(t,e,r,n,a,o,s,u,c){var d=g();try{w(t)(e,r,n,a,o,s,u,c)}catch(p){if(m(d),p!==p+0)throw p;v(1,0)}}function Ja(t,e,r,n,a,o){var s=g();try{return w(t)(e,r,n,a,o)}catch(u){if(m(s),u!==u+0)throw u;v(1,0)}}function Ka(t,e,r,n,a,o){var s=g();try{w(t)(e,r,n,a,o)}catch(u){if(m(s),u!==u+0)throw u;v(1,0)}}function to(t,e,r,n,a,o,s){var u=g();try{return w(t)(e,r,n,a,o,s)}catch(c){if(m(u),c!==c+0)throw c;v(1,0)}}function eo(t,e,r,n,a,o,s,u){var c=g();try{return w(t)(e,r,n,a,o,s,u)}catch(d){if(m(c),d!==d+0)throw d;v(1,0)}}function ro(t){var e=g();try{return w(t)()}catch(r){if(m(e),r!==r+0)throw r;v(1,0)}}function no(t,e,r,n,a,o,s,u,c){var d=g();try{return w(t)(e,r,n,a,o,s,u,c)}catch(p){if(m(d),p!==p+0)throw p;v(1,0)}}function ao(t,e,r,n,a,o,s){var u=g();try{return w(t)(e,r,n,a,o,s)}catch(c){if(m(u),c!==c+0)throw c;v(1,0)}}function oo(t,e,r,n){var a=g();try{return w(t)(e,r,n)}catch(o){if(m(a),o!==o+0)throw o;v(1,0)}}function io(t,e,r,n){var a=g();try{return w(t)(e,r,n)}catch(o){if(m(a),o!==o+0)throw o;v(1,0)}}function so(t,e,r,n,a,o,s,u){var c=g();try{w(t)(e,r,n,a,o,s,u)}catch(d){if(m(c),d!==d+0)throw d;v(1,0)}}function uo(t,e,r,n,a,o,s,u){var c=g();try{w(t)(e,r,n,a,o,s,u)}catch(d){if(m(c),d!==d+0)throw d;v(1,0)}}function co(t,e,r,n,a,o){var s=g();try{return w(t)(e,r,n,a,o)}catch(u){if(m(s),u!==u+0)throw u;v(1,0)}}function lo(t,e,r,n,a,o,s,u,c,d){var p=g();try{return w(t)(e,r,n,a,o,s,u,c,d)}catch(y){if(m(p),y!==y+0)throw y;v(1,0)}}function fo(t,e,r){var n=g();try{return w(t)(e,r)}catch(a){if(m(n),a!==a+0)throw a;v(1,0)}}function ho(t,e,r,n,a){var o=g();try{return w(t)(e,r,n,a)}catch(s){if(m(o),s!==s+0)throw s;v(1,0)}}function po(t,e,r,n,a,o,s,u,c,d){var p=g();try{w(t)(e,r,n,a,o,s,u,c,d)}catch(y){if(m(p),y!==y+0)throw y;v(1,0)}}function yo(t,e,r,n,a,o,s){var u=g();try{w(t)(e,r,n,a,o,s)}catch(c){if(m(u),c!==c+0)throw c;v(1,0)}}function vo(t,e,r,n){var a=g();try{return w(t)(e,r,n)}catch(o){if(m(a),o!==o+0)throw o;v(1,0)}}function mo(t,e,r,n,a,o,s,u,c,d,p,y){var $=g();try{return w(t)(e,r,n,a,o,s,u,c,d,p,y)}catch(E){if(m($),E!==E+0)throw E;v(1,0)}}function go(t,e,r,n,a,o,s){var u=g();try{return Ye(t,e,r,n,a,o,s)}catch(c){if(m(u),c!==c+0)throw c;v(1,0)}}function wo(t,e,r,n,a){var o=g();try{return Ze(t,e,r,n,a)}catch(s){if(m(o),s!==s+0)throw s;v(1,0)}}function bo(){Xr();function t(){var e,r;l.calledRun=!0,!gt&&(qr(),(e=pe)===null||e===void 0||e(l),(r=l.onRuntimeInitialized)===null||r===void 0||r.call(l),Yr())}l.setStatus?(l.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>l.setStatus(""),1),t()},1)):t()}var pt;return pt=await rn(),bo(),ge?f=l:f=new Promise((t,e)=>{pe=t,ye=e}),f}function jt(i){return re(Bt,i)}function Or(){return Pr(Bt)}function _r(i){jt({overrides:i,equalityFn:Object.is,fireImmediately:!1})}async function Sr(i,f){return Er(Bt,i,f)}const xr="85d46f55d7c86a4d09bb04273367408b19c324f582d040d018aecb25a9a82942",ne=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["databar_limited","DataBarLimited"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"],["any","Any"]],Ir=[...ne,["unknown"]].map(i=>i[0]),Lt=new Map(ne);function Dr(i){for(const[f,h]of Lt)if(i===h)return f;return"unknown"}function Mr(i){if(ae(i))return{width:i.naturalWidth,height:i.naturalHeight};if(oe(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(ie(i))return{width:i.videoWidth,height:i.videoHeight};if(ue(i))return{width:i.width,height:i.height};if(le(i))return{width:i.displayWidth,height:i.displayHeight};if(se(i))return{width:i.width,height:i.height};if(ce(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 ae(i){var f,h;try{return i instanceof((h=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:h.HTMLImageElement)}catch{return!1}}function oe(i){var f,h;try{return i instanceof((h=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:h.SVGImageElement)}catch{return!1}}function ie(i){var f,h;try{return i instanceof((h=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:h.HTMLVideoElement)}catch{return!1}}function se(i){var f,h;try{return i instanceof((h=(f=i==null?void 0:i.ownerDocument)==null?void 0:f.defaultView)==null?void 0:h.HTMLCanvasElement)}catch{return!1}}function ue(i){try{return i instanceof ImageBitmap||Object.prototype.toString.call(i)==="[object ImageBitmap]"}catch{return!1}}function ce(i){try{return i instanceof OffscreenCanvas||Object.prototype.toString.call(i)==="[object OffscreenCanvas]"}catch{return!1}}function le(i){try{return i instanceof VideoFrame||Object.prototype.toString.call(i)==="[object VideoFrame]"}catch{return!1}}function Ar(i){try{return i instanceof Blob||Object.prototype.toString.call(i)==="[object Blob]"}catch{return!1}}function Fr(i){try{return i instanceof ImageData||Object.prototype.toString.call(i)==="[object ImageData]"}catch{return!1}}function Rr(i,f){try{const h=new OffscreenCanvas(i,f);if(h.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return h;throw void 0}catch{const h=document.createElement("canvas");return h.width=i,h.height=f,h}}async function fe(i){if(ae(i)&&!await Ur(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(oe(i)&&!await Vr(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(le(i)&&Wr(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ie(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ue(i)&&kr(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:h}=Mr(i);if(f===0||h===0)return null;const l=Rr(f,h).getContext("2d");l.drawImage(i,0,0);try{return l.getImageData(0,0,f,h)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Br(i){let f;try{f=await createImageBitmap(i)}catch{try{if(globalThis.Image){f=new Image;let l="";try{l=URL.createObjectURL(i),f.src=l,await f.decode()}finally{URL.revokeObjectURL(l)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await fe(f)}function jr(i){const{width:f,height:h}=i;if(f===0||h===0)return null;const C=i.getContext("2d");try{return C.getImageData(0,0,f,h)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Lr(i){if(Ar(i))return await Br(i);if(Fr(i)){if(Hr(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return se(i)||ce(i)?jr(i):await fe(i)}async function Ur(i){try{return await i.decode(),!0}catch{return!1}}async function Vr(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function Wr(i){return i.format===null}function Hr(i){return i.data.buffer.byteLength===0}function kr(i){return i.width===0&&i.height===0}function de(i,f){return Nr(i)?new DOMException(`${f}: ${i.message}`,i.name):zr(i)?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}function Nr(i){return i instanceof DOMException||Object.prototype.toString.call(i)==="[object DOMException]"}function zr(i){return i instanceof Error||Object.prototype.toString.call(i)==="[object Error]"}class Gr{constructor(f={}){or(this,it);var h;try{const C=(h=f==null?void 0:f.formats)==null?void 0:h.filter(l=>l!=="unknown");if((C==null?void 0:C.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const l of C!=null?C:[])if(!Lt.has(l))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${l}' is not a valid enum value of type BarcodeFormat.`);ir(this,it,C!=null?C:[]),jt({fireImmediately:!0}).catch(()=>{})}catch(C){throw de(C,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Ir.filter(f=>f!=="unknown")}async detect(f){try{const h=await Lr(f);if(h===null)return[];let C;const l={tryCode39ExtendedMode:!1,textMode:"Plain",formats:ar(this,it).map(D=>Lt.get(D))};try{C=await Sr(h,l)}catch(D){throw console.error(D),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return C.map(D=>{const{topLeft:{x:A,y:R},topRight:{x:S,y:B},bottomLeft:{x:H,y:Y},bottomRight:{x:nt,y:Z}}=D.position,st=Math.min(A,S,H,nt),k=Math.min(R,B,Y,Z),Q=Math.max(A,S,H,nt),gt=Math.max(R,B,Y,Z);return{boundingBox:new DOMRectReadOnly(st,k,Q-st,gt-k),rawValue:D.text,format:Dr(D.format),cornerPoints:[{x:A,y:R},{x:S,y:B},{x:nt,y:Z},{x:H,y:Y}]}})}catch(h){throw de(h,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return it=new WeakMap,(he=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=Gr),_.ZXING_CPP_COMMIT=$r,_.ZXING_WASM_SHA256=xr,_.ZXING_WASM_VERSION=br,_.prepareZXingModule=jt,_.purgeZXingModule=Or,_.setZXingModuleOverrides=_r,Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),_})({});
1
+ var BarcodeDetectionAPI=(function(P){"use strict";var er=P=>{throw TypeError(P)};var rr=(P,O,L)=>O.has(P)||er("Cannot "+L);var nr=(P,O,L)=>(rr(P,O,"read from private field"),L?L.call(P):O.get(P)),ar=(P,O,L)=>O.has(P)?er("Cannot add the same private member more than once"):O instanceof WeakSet?O.add(P):O.set(P,L),or=(P,O,L,Mt)=>(rr(P,O,"write to private field"),Mt?Mt.call(P,L):O.set(P,L),L);var it,fe;const O=[["All","*","*"," ",0,"All"],["AllReadable","*","r"," ",0,"All Readable"],["AllCreatable","*","w"," ",0,"All Creatable"],["AllLinear","*","l"," ",0,"All Linear"],["AllMatrix","*","m"," ",0,"All Matrix"],["AllGS1","*","G"," ",0,"All GS1"],["AllRetail","*","R"," ",0,"All Retail"],["AllIndustrial","*","I"," ",0,"All Industrial"],["Codabar","F"," ","lrw ",18,"Codabar"],["Code39","A"," ","lrw I",8,"Code 39"],["Code39Std","A","s","lrw I",8,"Code 39 Standard"],["Code39Ext","A","e","lr I",9,"Code 39 Extended"],["Code32","A","2","lr I",129,"Code 32"],["PZN","A","p","lr I",52,"Pharmazentralnummer"],["Code93","G"," ","lrw I",25,"Code 93"],["Code128","C"," ","lrwGI",20,"Code 128"],["ITF","I"," ","lrw I",3,"ITF"],["ITF14","I","4","lr I",89,"ITF-14"],["DataBar","e"," ","lr GR",29,"DataBar"],["DataBarOmni","e","o","lr GR",29,"DataBar Omni"],["DataBarStk","e","s","lr GR",79,"DataBar Stacked"],["DataBarStkOmni","e","O","lr GR",80,"DataBar Stacked Omni"],["DataBarLtd","e","l","lr GR",30,"DataBar Limited"],["DataBarExp","e","e","lr GR",31,"DataBar Expanded"],["DataBarExpStk","e","E","lr GR",81,"DataBar Expanded Stacked"],["EANUPC","E"," ","lr R",15,"EAN/UPC"],["EAN13","E","1","lrw R",15,"EAN-13"],["EAN8","E","8","lrw R",10,"EAN-8"],["EAN5","E","5","l R",12,"EAN-5"],["EAN2","E","2","l R",11,"EAN-2"],["ISBN","E","i","lr R",69,"ISBN"],["UPCA","E","a","lrw R",34,"UPC-A"],["UPCE","E","e","lrw R",37,"UPC-E"],["OtherBarcode","X"," "," r ",0,"Other barcode"],["DXFilmEdge","X","x","lr ",147,"DX Film Edge"],["PDF417","L"," ","mrw ",55,"PDF417"],["CompactPDF417","L","c","mr ",56,"Compact PDF417"],["MicroPDF417","L","m","m ",84,"MicroPDF417"],["Aztec","z"," ","mr G ",92,"Aztec"],["AztecCode","z","c","mrwG ",92,"Aztec Code"],["AztecRune","z","r","mr ",128,"Aztec Rune"],["QRCode","Q"," ","mrwG ",58,"QR Code"],["QRCodeModel1","Q","1","mr ",0,"QR Code Model 1"],["QRCodeModel2","Q","2","mr ",58,"QR Code Model 2"],["MicroQRCode","Q","m","mr ",97,"Micro QR Code"],["RMQRCode","Q","r","mr G ",145,"rMQR Code"],["DataMatrix","d"," ","mrwG ",71,"Data Matrix"],["MaxiCode","U"," ","mr ",57,"MaxiCode"]],L={DataBarExpanded:"DataBarExp",DataBarLimited:"DataBarLtd","Linear-Codes":"AllLinear","Matrix-Codes":"AllMatrix",Any:"All",rMQRCode:"RMQRCode"};O.map(a=>a[5]),O.filter(a=>a[1]==="*").map(a=>a[0]),O.filter(a=>a[1]!=="*").map(a=>a[0]),O.filter(a=>a[2]===" ").map(a=>a[0]),O.filter(a=>a[3][0]==="l").map(a=>a[0]),O.filter(a=>a[3][0]==="m").map(a=>a[0]),O.filter(a=>a[3][1]==="r").map(a=>a[0]),O.filter(a=>a[3][2]==="w"||a[4]!==0).map(a=>a[0]),O.filter(a=>a[3][3]==="G").map(a=>a[0]),O.filter(a=>a[3][4]==="R").map(a=>a[0]),O.filter(a=>a[3][4]==="I").map(a=>a[0]);function ir(a){var d;return(d=L[a])!=null?d:a}function sr(a){return a.map(ir).join(",")}const ur=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function lr(a){return ur.indexOf(a)}const Kt=["Unknown","ASCII","ISO8859_1","ISO8859_2","ISO8859_3","ISO8859_4","ISO8859_5","ISO8859_6","ISO8859_7","ISO8859_8","ISO8859_9","ISO8859_10","ISO8859_11","ISO8859_13","ISO8859_14","ISO8859_15","ISO8859_16","Cp437","Cp1250","Cp1251","Cp1252","Cp1256","Shift_JIS","Big5","GB2312","GB18030","EUC_JP","EUC_KR","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function cr(a){return a==="UnicodeBig"?Kt.indexOf("UTF16BE"):Kt.indexOf(a)}const dr=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function fr(a){return dr[a]}const hr=["Ignore","Read","Require"];function pr(a){return hr.indexOf(a)}const mr=["Plain","ECI","HRI","Escaped","Hex","HexECI"];function yr(a){return mr.indexOf(a)}const mt={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,validateOptionalChecksum:!1,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown",tryCode39ExtendedMode:!0};function te(a){var d;return{...a,formats:sr(a.formats),binarizer:lr(a.binarizer),eanAddOnSymbol:pr(a.eanAddOnSymbol),textMode:yr(a.textMode),characterSet:cr(a.characterSet),tryCode39ExtendedMode:(d=a.tryCode39ExtendedMode)!=null?d:!0}}function vr(a){return{...a,format:a.format,symbology:a.symbology,contentType:fr(a.contentType)}}const gr="3.0.1",wr="eb8c15ef7827ee277bd8a9b093fa1d97bd98cf67",br={locateFile:(a,d)=>{const p=a.match(/_(.+?)\.wasm$/);return p?`https://fastly.jsdelivr.net/npm/zxing-wasm@3.0.1/dist/${p[1]}/${a}`:d+a}},yt=new WeakMap;function Cr(a,d){return Object.is(a,d)||Object.keys(a).length===Object.keys(d).length&&Object.keys(a).every(p=>Object.hasOwn(d,p)&&a[p]===d[p])}function ee(a,{overrides:d,equalityFn:p=Cr,fireImmediately:b=!1}={}){var c;const[x,R]=(c=yt.get(a))!=null?c:[br],M=d!=null?d:x;let S;if(b){if(R&&(S=p(x,M)))return R;const F=a({...M});return yt.set(a,[M,F]),F}(S!=null?S:p(x,M))||yt.set(a,[M])}function $r(a){yt.delete(a)}function Tr(a){const d=a.byteLength>>2,p=new Uint8Array(d);for(let b=0;b<d;b++){const c=b<<2;p[b]=306*a[c]+601*a[c+1]+117*a[c+2]+512>>10}return p}async function Er(a,d,p=mt){const b={...mt,...p},c=await ee(a,{fireImmediately:!0});let x,R;if("width"in d&&"height"in d&&"data"in d){const{data:S,width:F,height:G}=d,q=Tr(S),H=q.byteLength;if(R=c._malloc(H),!R)throw new Error(`Failed to allocate ${H} bytes in WASM memory`);try{c.HEAPU8.set(q,R),x=c.readBarcodesFromPixmap(R,F,G,te(b))}finally{c._free(R)}}else{let S,F;if("buffer"in d)[S,F]=[d.byteLength,d];else if("byteLength"in d)[S,F]=[d.byteLength,new Uint8Array(d)];else if("size"in d)[S,F]=[d.size,new Uint8Array(await d.arrayBuffer())];else throw new TypeError("Invalid input type");if(R=c._malloc(S),!R)throw new Error(`Failed to allocate ${S} bytes in WASM memory`);try{c.HEAPU8.set(F,R),x=c.readBarcodesFromImage(R,S,te(b))}finally{c._free(R)}}const M=[];for(let S=0;S<x.size();++S)M.push(vr(x.get(S)));return M}({...mt,formats:[...mt.formats]});async function Ft(a={}){var d,p,b,c=a,x=!!globalThis.window,R=typeof Bun<"u",M=!!globalThis.WorkerGlobalScope;!((p=globalThis.process)===null||p===void 0||(p=p.versions)===null||p===void 0)&&p.node&&((b=globalThis.process)===null||b===void 0?void 0:b.type)!="renderer";var S="./this.program",F,G="";function q(t){return c.locateFile?c.locateFile(t,G):G+t}var H,J;if(x||M||R){try{G=new URL(".",F).href}catch{}M&&(J=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),H=async t=>{var e=await fetch(t,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)}}var st=console.log.bind(console),z=console.error.bind(console),K,vt=!1,he,pe,tt,N,gt,ut,lt,A,me,ye,ve=!1;function ge(){var t=St.buffer;tt=new Int8Array(t),gt=new Int16Array(t),c.HEAPU8=N=new Uint8Array(t),ut=new Uint16Array(t),lt=new Int32Array(t),A=new Uint32Array(t),me=new Float32Array(t),ye=new Float64Array(t)}function Nr(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)nn(c.preRun.shift());we(Ce)}function Qr(){ve=!0,pt.xa()}function Xr(){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)rn(c.postRun.shift());we(be)}function Lt(t){var e,r;(e=c.onAbort)===null||e===void 0||e.call(c,t),t="Aborted("+t+")",z(t),vt=!0,t+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(t);throw(r=pe)===null||r===void 0||r(n),n}var wt;function qr(){return q("zxing_reader.wasm")}function Zr(t){if(t==wt&&K)return new Uint8Array(K);if(J)return J(t);throw"both async and sync fetching of the wasm failed"}async function Yr(t){if(!K)try{var e=await H(t);return new Uint8Array(e)}catch{}return Zr(t)}async function Jr(t,e){try{var r=await Yr(t),n=await WebAssembly.instantiate(r,e);return n}catch(o){z(`failed to asynchronously prepare wasm: ${o}`),Lt(o)}}async function Kr(t,e,r){if(!t&&WebAssembly.instantiateStreaming)try{var n=fetch(e,{credentials:"same-origin"}),o=await WebAssembly.instantiateStreaming(n,r);return o}catch(i){z(`wasm streaming compile failed: ${i}`),z("falling back to ArrayBuffer instantiation")}return Jr(e,r)}function tn(){var t={a:Ba};return t}async function en(){function t(i,s){return pt=i.exports,Fa(pt),ge(),pt}function e(i){return t(i.instance)}var r=tn();if(c.instantiateWasm)return new Promise((i,s)=>{c.instantiateWasm(r,(u,l)=>{i(t(u))})});wt!=null||(wt=qr());var n=await Kr(K,wt,r),o=e(n);return o}var we=t=>{for(;t.length>0;)t.shift()(c)},be=[],rn=t=>be.push(t),Ce=[],nn=t=>Ce.push(t),v=t=>Ge(t),g=()=>He(),bt=[],Ct=0,an=t=>{var e=new Ut(t);return e.get_caught()||(e.set_caught(!0),Ct--),e.set_rethrown(!1),bt.push(e),Ne(t),ke(t)},Q=0,on=()=>{y(0,0);var t=bt.pop();ze(t.excPtr),Q=0};class Ut{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){A[this.ptr+4>>2]=e}get_type(){return A[this.ptr+4>>2]}set_destructor(e){A[this.ptr+8>>2]=e}get_destructor(){return A[this.ptr+8>>2]}set_caught(e){e=e?1:0,tt[this.ptr+12]=e}get_caught(){return tt[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,tt[this.ptr+13]=e}get_rethrown(){return tt[this.ptr+13]!=0}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){A[this.ptr+16>>2]=e}get_adjusted_ptr(){return A[this.ptr+16>>2]}}var $t=t=>Ve(t),Wt=t=>{var e=Q;if(!e)return $t(0),0;var r=new Ut(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return $t(0),e;for(var o of t){if(o===0||o===n)break;var i=r.ptr+16;if(Qe(o,n,i))return $t(o),e}return $t(n),e},sn=()=>Wt([]),un=t=>Wt([t]),ln=(t,e)=>Wt([t,e]),cn=()=>{var t=bt.pop();t||Lt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(bt.push(t),t.set_rethrown(!0),t.set_caught(!1),Ct++),Q=e,Q},dn=(t,e,r)=>{var n=new Ut(t);throw n.init(e,r),Q=t,Ct++,Q},fn=()=>Ct,hn=t=>{throw Q||(Q=t),Q},pn=()=>Lt(""),Tt={},kt=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function ct(t){return this.fromWireType(A[t>>2])}var at={},et={},Et={},mn=class extends Error{constructor(t){super(t),this.name="InternalError"}},_t=t=>{throw new mn(t)},rt=(t,e,r)=>{t.forEach(u=>Et[u]=e);function n(u){var l=r(u);l.length!==t.length&&_t("Mismatched type converter count");for(var f=0;f<t.length;++f)k(t[f],l[f])}var o=new Array(e.length),i=[],s=0;{const u=e;for(let l=0;l<u.length;++l){const f=u[l];et.hasOwnProperty(f)?o[l]=et[f]:(i.push(f),at.hasOwnProperty(f)||(at[f]=[]),at[f].push(()=>{o[l]=et[f],++s,s===i.length&&n(o)}))}}i.length===0&&n(o)},yn=t=>{var e=Tt[t];delete Tt[t];var r=e.rawConstructor,n=e.rawDestructor,o=e.fields,i=o.map(s=>s.getterReturnType).concat(o.map(s=>s.setterArgumentType));rt([t],i,s=>{var u={};{const l=o;for(let f=0;f<l.length;++f){const h=l[f],m=s[f],$=h.getter,E=h.getterContext,I=s[f+o.length],D=h.setter,_=h.setterContext;u[h.fieldName]={read:T=>m.fromWireType($(E,T)),write:(T,W)=>{var j=[];D(_,T,I.toWireType(j,W)),kt(j)},optional:m.optional}}}return[{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)&&!u[h].optional)throw new TypeError(`Missing field: "${h}"`);var m=r();for(h in u)u[h].write(m,f[h]);return l!==null&&l.push(n,m),m},readValueFromPointer:ct,destructorFunction:n}]})},vn=(t,e,r,n,o)=>{},B=t=>{for(var e="";;){var r=N[t++];if(!r)return e;e+=String.fromCharCode(r)}},dt=class extends Error{constructor(t){super(t),this.name="BindingError"}},C=t=>{throw new dt(t)};function gn(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`),et.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(et[t]=e,delete Et[t],at.hasOwnProperty(t)){var o=at[t];delete at[t],o.forEach(i=>i())}}function k(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return gn(t,e,r)}var wn=(t,e,r,n)=>{e=B(e),k(t,{name:e,fromWireType:function(o){return!!o},toWireType:function(o,i){return i?r:n},readValueFromPointer:function(o){return this.fromWireType(N[o])},destructorFunction:null})},bn=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")},Gt=!1,$e=t=>{},Cn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Te=t=>{t.count.value-=1;var e=t.count.value===0;e&&Cn(t)},ft=t=>globalThis.FinalizationRegistry?(Gt=new FinalizationRegistry(e=>{Te(e.$$)}),ft=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var o={$$:r};Gt.register(e,o,e)}return e},$e=e=>Gt.unregister(e),ft(t)):(ft=e=>e,t),$n=()=>{let t=At.prototype;Object.assign(t,{isAliasOf(r){if(!(this instanceof At)||!(r instanceof At))return!1;var n=this.$$.ptrType.registeredClass,o=this.$$.ptr;r.$$=r.$$;for(var i=r.$$.ptrType.registeredClass,s=r.$$.ptr;n.baseClass;)o=n.upcast(o),n=n.baseClass;for(;i.baseClass;)s=i.upcast(s),i=i.baseClass;return n===i&&o===s},clone(){if(this.$$.ptr||Vt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var r=ft(Object.create(Object.getPrototypeOf(this),{$$:{value:bn(this.$$)}}));return r.$$.count.value+=1,r.$$.deleteScheduled=!1,r},delete(){this.$$.ptr||Vt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),$e(this),Te(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"),this.$$.deleteScheduled=!0,this}});const e=Symbol.dispose;e&&(t[e]=t.delete)};function At(){}var Ht=(t,e)=>Object.defineProperty(e,"name",{value:t}),Ee={},_e=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return t[e].overloadTable.hasOwnProperty(i.length)||C(`Function '${r}' called with an invalid number of arguments (${i.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[i.length].apply(this,i)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Ae=(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`),_e(c,t,t),c[t].overloadTable.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,c[t].argCount=r)},Tn=48,En=57,_n=t=>{t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Tn&&e<=En?`_${t}`:t};function An(t,e,r,n,o,i,s,u){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=o,this.getActualType=i,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},Nt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t};function Pn(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${Nt(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 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 "${Nt(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 o=e.clone();r=this.rawShare(r,V.toHandle(()=>o.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 "${Nt(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}var Pe=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Pe(t,e,r.baseClass);return n===null?null:r.downcast(n)},Sn={},In=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},xn=(t,e)=>(e=In(t,e),Sn[e]),Pt=(t,e)=>{(!e.ptrType||!e.ptr)&&_t("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&_t("Both smartPtrType and smartPtr must be specified"),e.count={value:1},ft(Object.create(t,{$$:{value:e,writable:!0}}))};function Rn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=xn(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 o(){return this.isSmartPointer?Pt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Pt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var i=this.registeredClass.getActualType(e),s=Ee[i];if(!s)return o.call(this);var u;this.isConst?u=s.constPointerType:u=s.pointerType;var l=Pe(e,this.registeredClass,u.registeredClass);return l===null?o.call(this):this.isSmartPointer?Pt(u.registeredClass.instancePrototype,{ptrType:u,ptr:l,smartPtrType:this,smartPtr:t}):Pt(u.registeredClass.instancePrototype,{ptrType:u,ptr:l})}var Mn=()=>{Object.assign(Ot.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)},readValueFromPointer:ct,fromWireType:Rn})};function Ot(t,e,r,n,o,i,s,u,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=o,this.pointeeType=i,this.sharingPolicy=s,this.rawGetPointee=u,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!o&&e.baseClass===void 0?n?(this.toWireType=Pn,this.destructorFunction=null):(this.toWireType=Dn,this.destructorFunction=null):this.toWireType=On}var Oe=(t,e,r)=>{c.hasOwnProperty(t)||_t("Replacing nonexistent public symbol"),c[t].overloadTable!==void 0&&r!==void 0?c[t].overloadTable[r]=e:(c[t]=e,c[t].argCount=r)},Z={},Fn=(t,e,r)=>{t=t.replace(/p/g,"i");var n=Z[t];return n(e,...r)},De=[],w=t=>{var e=De[t];return e||(De[t]=e=Ze.get(t)),e},Bn=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(t.includes("j"))return Fn(t,e,r);var n=w(e),o=n(...r);return o},jn=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Bn(t,e,o,r)}},U=function(t,e){t=B(t);function r(){if(t.includes("j"))return jn(t,e);var o=w(e);return o}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n};class Ln extends Error{}var Se=t=>{var e=We(t),r=B(e);return Y(e),r},Dt=(t,e)=>{var r=[],n={};function o(i){if(!n[i]&&!et[i]){if(Et[i]){Et[i].forEach(o);return}r.push(i),n[i]=!0}}throw e.forEach(o),new Ln(`${t}: `+r.map(Se).join([", "]))},Un=(t,e,r,n,o,i,s,u,l,f,h,m,$)=>{h=B(h),i=U(o,i),u&&(u=U(s,u)),f&&(f=U(l,f)),$=U(m,$);var E=_n(h);Ae(E,function(){Dt(`Cannot construct ${h} due to unbound types`,[n])}),rt([t,e,r],n?[n]:[],I=>{I=I[0];var D,_;n?(D=I.registeredClass,_=D.instancePrototype):_=At.prototype;var T=Ht(h,function(){if(Object.getPrototypeOf(this)!==W)throw new dt(`Use 'new' to construct ${h}`);if(j.constructor_body===void 0)throw new dt(`${h} has no accessible constructor`);for(var Ke=arguments.length,xt=new Array(Ke),Rt=0;Rt<Ke;Rt++)xt[Rt]=arguments[Rt];var tr=j.constructor_body[xt.length];if(tr===void 0)throw new dt(`Tried to invoke ctor of ${h} with invalid number of parameters (${xt.length}) - expected (${Object.keys(j.constructor_body).toString()}) parameters instead!`);return tr.apply(this,xt)}),W=Object.create(_,{constructor:{value:T}});T.prototype=W;var j=new An(h,T,W,$,D,i,u,f);if(j.baseClass){var X,It;(It=(X=j.baseClass).__derivedClasses)!==null&&It!==void 0||(X.__derivedClasses=[]),j.baseClass.__derivedClasses.push(j)}var bo=new Ot(h,j,!0,!1,!1),Ye=new Ot(h+"*",j,!1,!1,!1),Je=new Ot(h+" const*",j,!1,!0,!1);return Ee[t]={pointerType:Ye,constPointerType:Je},Oe(E,T),[bo,Ye,Je]})},Qt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(A[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 Xt(t,e,r,n,o,i){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].isVoid,h=s-2,m=new Array(h),$=[],E=[],I=function(){E.length=0;var D;$.length=u?2:1,$[0]=o,u&&(D=e[1].toWireType(E,this),$[1]=D);for(var _=0;_<h;++_)m[_]=e[_+2].toWireType(E,_<0||arguments.length<=_?void 0:arguments[_]),$.push(m[_]);var T=n(...$);function W(j){if(l)kt(E);else for(var X=u?1:2;X<e.length;X++){var It=X===1?D:m[X-2];e[X].destructorFunction!==null&&e[X].destructorFunction(It)}if(f)return e[0].fromWireType(j)}return W(T)};return Ht(t,I)}var kn=(t,e,r,n,o,i)=>{var s=Qt(e,r);o=U(n,o),rt([],[t],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 dt(`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]=()=>{Dt(`Cannot construct ${u.name} due to unbound types`,s)},rt([],s,f=>(f.splice(1,0,null),u.registeredClass.constructor_body[e-1]=Xt(l,f,null,o,i),[])),[]})},Ie=t=>{t=t.trim();const e=t.indexOf("(");return e===-1?t:t.slice(0,e)},Vn=(t,e,r,n,o,i,s,u,l,f)=>{var h=Qt(r,n);e=B(e),e=Ie(e),i=U(o,i),rt([],[t],m=>{m=m[0];var $=`${m.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),u&&m.registeredClass.pureVirtualFunctions.push(e);function E(){Dt(`Cannot call ${$} due to unbound types`,h)}var I=m.registeredClass.instancePrototype,D=I[e];return D===void 0||D.overloadTable===void 0&&D.className!==m.name&&D.argCount===r-2?(E.argCount=r-2,E.className=m.name,I[e]=E):(_e(I,e,$),I[e].overloadTable[r-2]=E),rt([],h,_=>{var T=Xt($,_,m,i,s);return I[e].overloadTable===void 0?(T.argCount=r-2,I[e]=T):I[e].overloadTable[r-2]=T,[]}),[]})},xe=[],nt=[0,1,,1,null,1,!0,1,!1,1],qt=t=>{t>9&&--nt[t+1]===0&&(nt[t]=void 0,xe.push(t))},V={toValue:t=>(t||C(`Cannot use deleted val. handle = ${t}`),nt[t]),toHandle:t=>{switch(t){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=xe.pop()||nt.length;return nt[e]=t,nt[e+1]=1,e}}}},Re={name:"emscripten::val",fromWireType:t=>{var e=V.toValue(t);return qt(t),e},toWireType:(t,e)=>V.toHandle(e),readValueFromPointer:ct,destructorFunction:null},Gn=t=>k(t,Re),Hn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(me[r>>2])};case 8:return function(r){return this.fromWireType(ye[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},zn=(t,e,r)=>{e=B(e),k(t,{name:e,fromWireType:n=>n,toWireType:(n,o)=>o,readValueFromPointer:Hn(e,r),destructorFunction:null})},Nn=(t,e,r,n,o,i,s,u)=>{var l=Qt(e,r);t=B(t),t=Ie(t),o=U(n,o),Ae(t,function(){Dt(`Cannot call ${t} due to unbound types`,l)},e-1),rt([],l,f=>{var h=[f[0],null].concat(f.slice(1));return Oe(t,Xt(t,h,null,o,i),e-1),[]})},Qn=(t,e,r)=>{switch(e){case 1:return r?n=>tt[n]:n=>N[n];case 2:return r?n=>gt[n>>1]:n=>ut[n>>1];case 4:return r?n=>lt[n>>2]:n=>A[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Xn=(t,e,r,n,o)=>{e=B(e);const i=n===0;let s=l=>l;if(i){var u=32-8*r;s=l=>l<<u>>>u,o=s(o)}k(t,{name:e,fromWireType:s,toWireType:(l,f)=>f,readValueFromPointer:Qn(e,r,n!==0),destructorFunction:null})},qn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],o=n[e];function i(s){var u=A[s>>2],l=A[s+4>>2];return new o(tt.buffer,l,u)}r=B(r),k(t,{name:r,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Zn=Object.assign({optional:!0},Re),Yn=(t,e)=>{k(t,Zn)},Jn=(t,e,r,n)=>{if(!(n>0))return 0;for(var o=r,i=r+n-1,s=0;s<t.length;++s){var u=t.codePointAt(s);if(u<=127){if(r>=i)break;e[r++]=u}else if(u<=2047){if(r+1>=i)break;e[r++]=192|u>>6,e[r++]=128|u&63}else if(u<=65535){if(r+2>=i)break;e[r++]=224|u>>12,e[r++]=128|u>>6&63,e[r++]=128|u&63}else{if(r+3>=i)break;e[r++]=240|u>>18,e[r++]=128|u>>12&63,e[r++]=128|u>>6&63,e[r++]=128|u&63,s++}}return e[r]=0,r-o},ot=(t,e,r)=>Jn(t,N,e,r),Me=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=globalThis.TextDecoder&&new TextDecoder,Be=(t,e,r,n)=>{var o=e+r;if(n)return o;for(;t[e]&&!(e>=o);)++e;return e},je=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;var o=Be(t,e,r,n);if(o-e>16&&t.buffer&&Fe)return Fe.decode(t.subarray(e,o));for(var i="";e<o;){var s=t[e++];if(!(s&128)){i+=String.fromCharCode(s);continue}var u=t[e++]&63;if((s&224)==192){i+=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)i+=String.fromCharCode(s);else{var f=s-65536;i+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return i},Kn=(t,e,r)=>t?je(N,t,e,r):"",ta=(t,e)=>{e=B(e),k(t,{name:e,fromWireType(r){var n=A[r>>2],o=r+4,i;return i=Kn(o,n,!0),Y(r),i},toWireType(r,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var o,i=typeof n=="string";i||ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT==1||C("Cannot pass non-string to std::string"),i?o=Me(n):o=n.length;var s=Jt(4+o+1),u=s+4;return A[s>>2]=o,i?ot(n,u,o+1):N.set(n,u),r!==null&&r.push(Y,s),s},readValueFromPointer:ct,destructorFunction(r){Y(r)}})},Le=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,ea=(t,e,r)=>{var n=t>>1,o=Be(ut,n,e/2,r);if(o-n>16&&Le)return Le.decode(ut.subarray(n,o));for(var i="",s=n;s<o;++s){var u=ut[s];i+=String.fromCharCode(u)}return i},ra=(t,e,r)=>{if(r!=null||(r=2147483647),r<2)return 0;r-=2;for(var n=e,o=r<t.length*2?r/2:t.length,i=0;i<o;++i){var s=t.charCodeAt(i);gt[e>>1]=s,e+=2}return gt[e>>1]=0,e-n},na=t=>t.length*2,aa=(t,e,r)=>{for(var n="",o=t>>2,i=0;!(i>=e/4);i++){var s=A[o+i];if(!s&&!r)break;n+=String.fromCodePoint(s)}return n},oa=(t,e,r)=>{if(r!=null||(r=2147483647),r<4)return 0;for(var n=e,o=n+r-4,i=0;i<t.length;++i){var s=t.codePointAt(i);if(s>65535&&i++,lt[e>>2]=s,e+=4,e+4>o)break}return lt[e>>2]=0,e-n},ia=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.codePointAt(r);n>65535&&r++,e+=4}return e},sa=(t,e,r)=>{r=B(r);var n,o,i;e===2?(n=ea,o=ra,i=na):(n=aa,o=oa,i=ia),k(t,{name:r,fromWireType:s=>{var u=A[s>>2],l=n(s+4,u*e,!0);return Y(s),l},toWireType:(s,u)=>{typeof u!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var l=i(u),f=Jt(4+l+e);return A[f>>2]=l/e,o(u,f+4,l+e),s!==null&&s.push(Y,f),f},readValueFromPointer:ct,destructorFunction(s){Y(s)}})},ua=(t,e,r,n,o,i)=>{Tt[t]={name:B(e),rawConstructor:U(r,n),rawDestructor:U(o,i),fields:[]}},la=(t,e,r,n,o,i,s,u,l,f)=>{Tt[t].fields.push({fieldName:B(e),getterReturnType:r,getter:U(n,o),getterContext:i,setterArgumentType:s,setter:U(u,l),setterContext:f})},ca=(t,e)=>{e=B(e),k(t,{isVoid:!0,name:e,fromWireType:()=>{},toWireType:(r,n)=>{}})},Zt=[],da=t=>{var e=Zt.length;return Zt.push(t),e},fa=(t,e)=>{var r=et[t];return r===void 0&&C(`${e} has unknown type ${Se(t)}`),r},ha=(t,e)=>{for(var r=new Array(t),n=0;n<t;++n)r[n]=fa(A[e+n*4>>2],`parameter ${n}`);return r},pa=(t,e,r)=>{var n=[],o=t(n,r);return n.length&&(A[e>>2]=V.toHandle(n)),o},ma={},Ue=t=>{var e=ma[t];return e===void 0?B(t):e},ya=(t,e,r)=>{var n=8,[o,...i]=ha(t,e),s=o.toWireType.bind(o),u=i.map(m=>m.readValueFromPointer.bind(m));t--;var l=new Array(t),f=(m,$,E,I)=>{for(var D=0,_=0;_<t;++_)l[_]=u[_](I+D),D+=n;var T;switch(r){case 0:T=V.toValue(m).apply(null,l);break;case 2:T=Reflect.construct(V.toValue(m),l);break;case 3:T=l[0];break;case 1:T=V.toValue(m)[Ue($)](...l);break}return pa(s,E,T)},h=`methodCaller<(${i.map(m=>m.name)}) => ${o.name}>`;return da(Ht(h,f))},va=t=>t?(t=Ue(t),V.toHandle(globalThis[t])):V.toHandle(globalThis),ga=t=>{t>9&&(nt[t+1]+=1)},wa=(t,e,r,n,o)=>Zt[t](e,r,n,o),ba=t=>{var e=V.toValue(t);kt(e),qt(t)},Ca=(t,e,r,n)=>{var o=new Date().getFullYear(),i=new Date(o,0,1),s=new Date(o,6,1),u=i.getTimezoneOffset(),l=s.getTimezoneOffset(),f=Math.max(u,l);A[t>>2]=f*60,lt[e>>2]=+(u!=l);var h=E=>{var I=E>=0?"-":"+",D=Math.abs(E),_=String(Math.floor(D/60)).padStart(2,"0"),T=String(D%60).padStart(2,"0");return`UTC${I}${_}${T}`},m=h(u),$=h(l);l<u?(ot(m,r,17),ot($,n,17)):(ot(m,n,17),ot($,r,17))},$a=()=>2147483648,Ta=(t,e)=>Math.ceil(t/e)*e,Ea=t=>{var e=St.buffer.byteLength,r=(t-e+65535)/65536|0;try{return St.grow(r),ge(),1}catch{}},_a=t=>{var e=N.length;t>>>=0;var r=$a();if(t>r)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,t+100663296);var i=Math.min(r,Ta(Math.max(t,o),65536)),s=Ea(i);if(s)return!0}return!1},Yt={},Aa=()=>S||"./this.program",ht=()=>{if(!ht.strings){var t=(typeof navigator=="object"&&navigator.language||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:Aa()};for(var r in Yt)Yt[r]===void 0?delete e[r]:e[r]=Yt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);ht.strings=n}return ht.strings},Pa=(t,e)=>{var r=0,n=0;for(var o of ht()){var i=e+r;A[t+n>>2]=i,r+=ot(o,i,1/0)+1,n+=4}return 0},Oa=(t,e)=>{var r=ht();A[t>>2]=r.length;var n=0;for(var o of r)n+=Me(o)+1;return A[e>>2]=n,0},Da=t=>52;function Sa(t,e,r,n,o){return 70}var Ia=[null,[],[]],xa=(t,e)=>{var r=Ia[t];e===0||e===10?((t===1?st:z)(je(r)),r.length=0):r.push(e)},Ra=(t,e,r,n)=>{for(var o=0,i=0;i<r;i++){var s=A[e>>2],u=A[e+4>>2];e+=8;for(var l=0;l<u;l++)xa(t,N[s+l]);o+=u}return A[n>>2]=o,0},Ma=t=>t;if($n(),Mn(),c.noExitRuntime&&c.noExitRuntime,c.print&&(st=c.print),c.printErr&&(z=c.printErr),c.wasmBinary&&(K=c.wasmBinary),c.arguments&&c.arguments,c.thisProgram&&(S=c.thisProgram),c.preInit)for(typeof c.preInit=="function"&&(c.preInit=[c.preInit]);c.preInit.length>0;)c.preInit.shift()();var We,Y,Jt,ke,y,Ve,Ge,He,ze,Ne,Qe,Xe,qe,St,Ze;function Fa(t){We=t.ya,Y=c._free=t.za,Jt=c._malloc=t.Ba,ke=t.Ca,y=t.Da,Ve=t.Ea,Ge=t.Fa,He=t.Ga,ze=t.Ha,Ne=t.Ia,Qe=t.Ja,Z.viijii=t.Ka,Xe=Z.iiijj=t.La,Z.jiji=t.Ma,qe=Z.jiiii=t.Na,Z.iiiiij=t.Oa,Z.iiiiijj=t.Pa,Z.iiiiiijj=t.Qa,St=t.wa,Ze=t.Aa}var Ba={s:an,x:on,a:sn,j:un,m:ln,P:cn,q:dn,U:fn,d:hn,ba:pn,ta:yn,aa:vn,oa:wn,ra:Un,qa:kn,F:Vn,ma:Gn,W:zn,X:Nn,z:Xn,t:qn,sa:Yn,na:ta,R:sa,G:ua,ua:la,pa:ca,M:ya,va:qt,C:va,S:ga,L:wa,ha:ba,ca:Ca,fa:_a,da:Pa,ea:Oa,ga:Da,_:Sa,V:Ra,J:io,B:uo,Y:Ha,T:po,r:ro,b:Ua,D:oo,ja:co,c:ka,ia:fo,h:Ga,i:Za,p:Ja,O:ao,w:to,E:eo,K:no,I:mo,$:vo,Z:go,f:za,l:ja,e:Wa,g:Va,N:ho,k:La,ka:so,o:Ka,y:Qa,u:Ya,Q:qa,v:lo,n:Na,H:yo,la:Xa,A:Ma};function ja(t,e){var r=g();try{w(t)(e)}catch(n){if(v(r),n!==n+0)throw n;y(1,0)}}function La(t,e,r,n,o){var i=g();try{w(t)(e,r,n,o)}catch(s){if(v(i),s!==s+0)throw s;y(1,0)}}function Ua(t,e){var r=g();try{return w(t)(e)}catch(n){if(v(r),n!==n+0)throw n;y(1,0)}}function Wa(t,e,r){var n=g();try{w(t)(e,r)}catch(o){if(v(n),o!==o+0)throw o;y(1,0)}}function ka(t,e,r){var n=g();try{return w(t)(e,r)}catch(o){if(v(n),o!==o+0)throw o;y(1,0)}}function Va(t,e,r,n){var o=g();try{w(t)(e,r,n)}catch(i){if(v(o),i!==i+0)throw i;y(1,0)}}function Ga(t,e,r,n){var o=g();try{return w(t)(e,r,n)}catch(i){if(v(o),i!==i+0)throw i;y(1,0)}}function Ha(t,e,r,n,o,i){var s=g();try{return w(t)(e,r,n,o,i)}catch(u){if(v(s),u!==u+0)throw u;y(1,0)}}function za(t){var e=g();try{w(t)()}catch(r){if(v(e),r!==r+0)throw r;y(1,0)}}function Na(t,e,r,n,o,i,s,u,l,f,h){var m=g();try{w(t)(e,r,n,o,i,s,u,l,f,h)}catch($){if(v(m),$!==$+0)throw $;y(1,0)}}function Qa(t,e,r,n,o,i,s){var u=g();try{w(t)(e,r,n,o,i,s)}catch(l){if(v(u),l!==l+0)throw l;y(1,0)}}function Xa(t,e,r,n,o,i,s,u,l,f,h,m,$,E,I,D,_){var T=g();try{w(t)(e,r,n,o,i,s,u,l,f,h,m,$,E,I,D,_)}catch(W){if(v(T),W!==W+0)throw W;y(1,0)}}function qa(t,e,r,n,o,i,s,u,l){var f=g();try{w(t)(e,r,n,o,i,s,u,l)}catch(h){if(v(f),h!==h+0)throw h;y(1,0)}}function Za(t,e,r,n,o){var i=g();try{return w(t)(e,r,n,o)}catch(s){if(v(i),s!==s+0)throw s;y(1,0)}}function Ya(t,e,r,n,o,i,s,u){var l=g();try{w(t)(e,r,n,o,i,s,u)}catch(f){if(v(l),f!==f+0)throw f;y(1,0)}}function Ja(t,e,r,n,o,i){var s=g();try{return w(t)(e,r,n,o,i)}catch(u){if(v(s),u!==u+0)throw u;y(1,0)}}function Ka(t,e,r,n,o,i){var s=g();try{w(t)(e,r,n,o,i)}catch(u){if(v(s),u!==u+0)throw u;y(1,0)}}function to(t,e,r,n,o,i,s){var u=g();try{return w(t)(e,r,n,o,i,s)}catch(l){if(v(u),l!==l+0)throw l;y(1,0)}}function eo(t,e,r,n,o,i,s,u){var l=g();try{return w(t)(e,r,n,o,i,s,u)}catch(f){if(v(l),f!==f+0)throw f;y(1,0)}}function ro(t){var e=g();try{return w(t)()}catch(r){if(v(e),r!==r+0)throw r;y(1,0)}}function no(t,e,r,n,o,i,s,u,l){var f=g();try{return w(t)(e,r,n,o,i,s,u,l)}catch(h){if(v(f),h!==h+0)throw h;y(1,0)}}function ao(t,e,r,n,o,i,s){var u=g();try{return w(t)(e,r,n,o,i,s)}catch(l){if(v(u),l!==l+0)throw l;y(1,0)}}function oo(t,e,r,n){var o=g();try{return w(t)(e,r,n)}catch(i){if(v(o),i!==i+0)throw i;y(1,0)}}function io(t,e,r,n){var o=g();try{return w(t)(e,r,n)}catch(i){if(v(o),i!==i+0)throw i;y(1,0)}}function so(t,e,r,n,o,i,s,u){var l=g();try{w(t)(e,r,n,o,i,s,u)}catch(f){if(v(l),f!==f+0)throw f;y(1,0)}}function uo(t,e,r,n,o,i){var s=g();try{return w(t)(e,r,n,o,i)}catch(u){if(v(s),u!==u+0)throw u;y(1,0)}}function lo(t,e,r,n,o,i,s,u,l,f){var h=g();try{w(t)(e,r,n,o,i,s,u,l,f)}catch(m){if(v(h),m!==m+0)throw m;y(1,0)}}function co(t,e,r){var n=g();try{return w(t)(e,r)}catch(o){if(v(n),o!==o+0)throw o;y(1,0)}}function fo(t,e,r,n,o){var i=g();try{return w(t)(e,r,n,o)}catch(s){if(v(i),s!==s+0)throw s;y(1,0)}}function ho(t,e,r,n,o,i,s){var u=g();try{w(t)(e,r,n,o,i,s)}catch(l){if(v(u),l!==l+0)throw l;y(1,0)}}function po(t,e,r,n){var o=g();try{return w(t)(e,r,n)}catch(i){if(v(o),i!==i+0)throw i;y(1,0)}}function mo(t,e,r,n,o,i,s,u,l,f,h,m){var $=g();try{return w(t)(e,r,n,o,i,s,u,l,f,h,m)}catch(E){if(v($),E!==E+0)throw E;y(1,0)}}function yo(t,e,r,n,o,i,s,u,l,f,h,m,$,E,I,D){var _=g();try{w(t)(e,r,n,o,i,s,u,l,f,h,m,$,E,I,D)}catch(T){if(v(_),T!==T+0)throw T;y(1,0)}}function vo(t,e,r,n,o,i,s){var u=g();try{return Xe(t,e,r,n,o,i,s)}catch(l){if(v(u),l!==l+0)throw l;y(1,0)}}function go(t,e,r,n,o){var i=g();try{return qe(t,e,r,n,o)}catch(s){if(v(i),s!==s+0)throw s;y(1,0)}}function wo(){Nr();function t(){var e,r;c.calledRun=!0,!vt&&(Qr(),(e=he)===null||e===void 0||e(c),(r=c.onRuntimeInitialized)===null||r===void 0||r.call(c),Xr())}c.setStatus?(c.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>c.setStatus(""),1),t()},1)):t()}var pt;return pt=await en(),wo(),ve?d=c:d=new Promise((t,e)=>{he=t,pe=e}),d}function Bt(a){return ee(Ft,a)}function _r(){return $r(Ft)}function Ar(a){Bt({overrides:a,equalityFn:Object.is,fireImmediately:!1})}async function Pr(a,d){return Er(Ft,a,d)}const Or="8f2a99b0c9fdf8123d0152ba4761fc7dbf58c7de7e4937d1e134aae17e2ad795",re=[["aztec","Aztec"],["aztec_code","AztecCode"],["aztec_rune","AztecRune"],["code_128","Code128"],["code_39","Code39"],["code_39_standard","Code39Std"],["code_39_extended","Code39Ext"],["code_32","Code32"],["pzn","PZN"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_omni","DataBarOmni"],["databar_stacked","DataBarStk"],["databar_stacked_omni","DataBarStkOmni"],["databar_expanded","DataBarExp"],["databar_expanded_stacked","DataBarExpStk"],["databar_limited","DataBarLtd"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN13"],["ean_upc","EANUPC"],["isbn","ISBN"],["ean_8","EAN8"],["itf","ITF"],["itf_14","ITF14"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["compact_pdf417","CompactPDF417"],["qr_code","QRCode"],["qr_code_model_1","QRCodeModel1"],["qr_code_model_2","QRCodeModel2"],["rm_qr_code","RMQRCode"],["upc_a","UPCA"],["upc_e","UPCE"],["other_barcode","OtherBarcode"],["linear_codes","AllLinear"],["matrix_codes","AllMatrix"],["gs1_codes","AllGS1"],["retail_codes","AllRetail"],["industrial_codes","AllIndustrial"],["any","All"]],Dr=[...re,["unknown"]].map(a=>a[0]),jt=new Map(re);function Sr(a){for(const[d,p]of jt)if(a===p)return d;return"unknown"}function Ir(a){if(ne(a))return{width:a.naturalWidth,height:a.naturalHeight};if(ae(a))return{width:a.width.baseVal.value,height:a.height.baseVal.value};if(oe(a))return{width:a.videoWidth,height:a.videoHeight};if(se(a))return{width:a.width,height:a.height};if(le(a))return{width:a.displayWidth,height:a.displayHeight};if(ie(a))return{width:a.width,height:a.height};if(ue(a))return{width:a.width,height:a.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 ne(a){var d,p;try{return a instanceof((p=(d=a==null?void 0:a.ownerDocument)==null?void 0:d.defaultView)==null?void 0:p.HTMLImageElement)}catch{return!1}}function ae(a){var d,p;try{return a instanceof((p=(d=a==null?void 0:a.ownerDocument)==null?void 0:d.defaultView)==null?void 0:p.SVGImageElement)}catch{return!1}}function oe(a){var d,p;try{return a instanceof((p=(d=a==null?void 0:a.ownerDocument)==null?void 0:d.defaultView)==null?void 0:p.HTMLVideoElement)}catch{return!1}}function ie(a){var d,p;try{return a instanceof((p=(d=a==null?void 0:a.ownerDocument)==null?void 0:d.defaultView)==null?void 0:p.HTMLCanvasElement)}catch{return!1}}function se(a){try{return a instanceof ImageBitmap||Object.prototype.toString.call(a)==="[object ImageBitmap]"}catch{return!1}}function ue(a){try{return a instanceof OffscreenCanvas||Object.prototype.toString.call(a)==="[object OffscreenCanvas]"}catch{return!1}}function le(a){try{return a instanceof VideoFrame||Object.prototype.toString.call(a)==="[object VideoFrame]"}catch{return!1}}function xr(a){try{return a instanceof Blob||Object.prototype.toString.call(a)==="[object Blob]"}catch{return!1}}function Rr(a){try{return a instanceof ImageData||Object.prototype.toString.call(a)==="[object ImageData]"}catch{return!1}}function Mr(a,d){try{const p=new OffscreenCanvas(a,d);if(p.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return p;throw void 0}catch{const p=document.createElement("canvas");return p.width=a,p.height=d,p}}async function ce(a){if(ne(a)&&!await Lr(a))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ae(a)&&!await Ur(a))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(le(a)&&Wr(a))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(oe(a)&&(a.readyState===0||a.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(se(a)&&Vr(a))throw new DOMException("The image source is detached.","InvalidStateError");const{width:d,height:p}=Ir(a);if(d===0||p===0)return null;const c=Mr(d,p).getContext("2d");c.drawImage(a,0,0);try{return c.getImageData(0,0,d,p)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Fr(a){let d;try{d=await createImageBitmap(a)}catch{try{if(globalThis.Image){d=new Image;let c="";try{c=URL.createObjectURL(a),d.src=c,await d.decode()}finally{URL.revokeObjectURL(c)}}else return a}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}}return await ce(d)}function Br(a){const{width:d,height:p}=a;if(d===0||p===0)return null;const b=a.getContext("2d");try{return b.getImageData(0,0,d,p)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function jr(a){if(xr(a))return await Fr(a);if(Rr(a)){if(kr(a))throw new DOMException("The image data has been detached.","InvalidStateError");return a}return ie(a)||ue(a)?Br(a):await ce(a)}async function Lr(a){try{return await a.decode(),!0}catch{return!1}}async function Ur(a){var d;try{return await((d=a.decode)==null?void 0:d.call(a)),!0}catch{return!1}}function Wr(a){return a.format===null}function kr(a){return a.data.buffer.byteLength===0}function Vr(a){return a.width===0&&a.height===0}function de(a,d){return Gr(a)?new DOMException(`${d}: ${a.message}`,a.name):Hr(a)?new a.constructor(`${d}: ${a.message}`):new Error(`${d}: ${a}`)}function Gr(a){return a instanceof DOMException||Object.prototype.toString.call(a)==="[object DOMException]"}function Hr(a){return a instanceof Error||Object.prototype.toString.call(a)==="[object Error]"}class zr{constructor(d={}){ar(this,it);var p;try{const b=(p=d==null?void 0:d.formats)==null?void 0:p.filter(c=>c!=="unknown");if((b==null?void 0:b.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const c of b!=null?b:[])if(!jt.has(c))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${c}' is not a valid enum value of type BarcodeFormat.`);or(this,it,b!=null?b:[]),Bt({fireImmediately:!0}).catch(()=>{})}catch(b){throw de(b,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Dr.filter(d=>d!=="unknown")}async detect(d){try{const p=await jr(d);if(p===null)return[];let b;const c={textMode:"Plain",formats:nr(this,it).map(x=>jt.get(x))};try{b=await Pr(p,c)}catch(x){throw console.error(x),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return b.map(x=>{const{topLeft:{x:R,y:M},topRight:{x:S,y:F},bottomLeft:{x:G,y:q},bottomRight:{x:H,y:J}}=x.position,st=Math.min(R,S,G,H),z=Math.min(M,F,q,J),K=Math.max(R,S,G,H),vt=Math.max(M,F,q,J);return{boundingBox:new DOMRectReadOnly(st,z,K-st,vt-z),rawValue:x.text,format:Sr(x.format),cornerPoints:[{x:R,y:M},{x:S,y:F},{x:H,y:J},{x:G,y:q}]}})}catch(p){throw de(p,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return it=new WeakMap,(fe=globalThis.BarcodeDetector)!=null||(globalThis.BarcodeDetector=zr),P.ZXING_CPP_COMMIT=wr,P.ZXING_WASM_SHA256=Or,P.ZXING_WASM_VERSION=gr,P.prepareZXingModule=Bt,P.purgeZXingModule=_r,P.setZXingModuleOverrides=Ar,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),P})({});