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