barcode-detector 2.2.11 → 2.3.0

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