zxing-wasm
Version:
ZXing-C++ WebAssembly as an ES/CJS module with types
1 lines • 32.6 kB
JavaScript
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../share.js");function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}async function n(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};var n,r,i=e,a=!!globalThis.window,o=!!globalThis.WorkerGlobalScope;(r=globalThis.process)!=null&&(n=r.versions)!=null&&n.node&&globalThis.process;var s=`./this.program`,c=(e,t)=>{throw t},l=void 0,u=``;function d(e){return i.locateFile?i.locateFile(e,u):u+e}var f,p;if(a||o||typeof fetch==`function`){try{u=new URL(`.`,l).href}catch{}o&&(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,v;class y{}class ee extends y{constructor(e){super(),this.excPtr=e}}function te(){return bn.buffer}function ne(){var e;if(!(b!=null&&(e=b.buffer)!=null&&e.resizable)){var t=te();b=new Int8Array(t),G=new Int16Array(t),i.HEAPU8=k=new Uint8Array(t),q=new Uint16Array(t),K=new Int32Array(t),w=new Uint32Array(t),Ct=new Float32Array(t),wt=new Float64Array(t)}}function re(){var e=i.preRun;e&&(typeof e==`function`&&(e=[e]),_e.push(...e)),he(_e)}function ie(){wn.Ia()}function ae(){var e=i.postRun;e&&(typeof e==`function`&&(e=[e]),ge.push(...e)),he(ge)}function oe(e){var t;throw(t=i.onAbort)==null||t.call(i,e),e=`Aborted(${e})`,h(e),_=!0,e+=`. Build with -sASSERTIONS for more info.`,new WebAssembly.RuntimeError(e)}var se;function ce(){return d(`zxing_full.wasm`)}function le(e){if(e==se&&g)return new Uint8Array(g);if(p)return p(e);throw`both async and sync fetching of the wasm failed`}async function ue(e){if(!g)try{return await f(e)}catch{}return le(e)}async function de(e,t){try{var n=await ue(e);return await WebAssembly.instantiate(n,t)}catch(e){h(`failed to asynchronously prepare wasm: ${e}`),oe(e)}}async function fe(e,t,n){if(!e)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 de(t,n)}function pe(){return{a:Cn}}class me{constructor(e){t(this,`name`,`ExitStatus`),this.message=`Program terminated with exit(${e})`,this.status=e}}var b,he=e=>{for(;e.length>0;)e.shift()(i)},ge=[],_e=[],ve=!0,x=e=>pn(e),S=()=>hn(),ye=[],C=e=>{var t=ye[e];return t||(ye[e]=t=xn.get(e)),t},w;class be{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,b[this.ptr+12]=e}get_caught(){return b[this.ptr+12]!=0}set_rethrown(e){e=+!!e,b[this.ptr+13]=e}get_rethrown(){return b[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]}constructor(e){this.excPtr=e,this.ptr=e-24}}var T=[],E=0,D=null,O=e=>fn(e),xe=e=>{var t=D==null?void 0:D.excPtr;if(!t)return O(0),0;var n=new be(t);n.set_adjusted_ptr(t);var r=n.get_type();if(!r)return O(0),t;for(var i of e){if(!i||i===r)break;var a=n.ptr+16;if(vn(i,r,a))return O(i),t}return O(r),t},Se=e=>{throw e},Ce=e=>{throw e},k,we=globalThis.TextDecoder&&new TextDecoder,Te=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},Ee=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=Te(e,t,n,r);if(i-t>16&&e.buffer&&we)return we.decode(e.subarray(t,i));for(var a=``;t<i;){var o=e[t++];if(!(o&128))a+=String.fromCharCode(o);else{var s=e[t++]&63;if((o&224)==192)a+=String.fromCharCode((o&31)<<6|s);else{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},De=(e,t,n)=>e?Ee(k,e,t,n):``;function A(e){return this.fromWireType(w[e>>2])}var Oe=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}},ke=e=>mn(e),Ae={},j={},M={};class N extends Error{constructor(e){super(e),this.name=`BindingError`}}var P=e=>{throw new N(e)},je={};function Me(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var r=t.name;if(e||P(`type "${r}" must have a positive integer typeid pointer`),M[e]){if(n.ignoreDuplicateRegistrations)return;P(`Cannot register type '${r}' twice`)}if(M[e]=t,delete je[e],j[e]){var i=j[e];delete j[e],i.forEach(e=>e())}}function F(e,t){return Me(e,t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{})}class Ne extends Error{constructor(e){super(e),this.name=`InternalError`}}var Pe=e=>{throw new Ne(e)},I=(e,t,n)=>{e.forEach(e=>je[e]=t);function r(t){var r=n(t);r.length!==e.length&&Pe(`Mismatched type converter count`);for(var i=0;i<e.length;++i)F(e[i],r[i])}var i=Array(t.length),a=[],o=0;for(let[e,n]of t.entries())if(M[n])i[e]=M[n];else{var s,c,l;a.push(n),((l=(s=j)[c=n])==null?s[c]=[]:l).push(()=>{i[e]=M[n],++o,o===a.length&&r(i)})}a.length===0&&r(i)},Fe=(e,t)=>k.fill(0,e,e+t),L=e=>{for(var t=``;;){var n=k[e++];if(!n)return t;t+=String.fromCharCode(n)}},Ie=!1,Le=()=>{},Re=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},ze=e=>{--e.count.value,e.count.value===0&&Re(e)},R=e=>globalThis.FinalizationRegistry?(Ie=new FinalizationRegistry(e=>{ze(e.$$)}),R=e=>{var t=e.$$;if(t.smartPtr){var n={$$:t};Ie.register(e,n,e)}return e},Le=e=>Ie.unregister(e),R(e)):(R=e=>e,e),Be=[],Ve=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),He=e=>{P(function(e){return e.$$.ptrType.registeredClass.name}(e)+` instance already deleted`)};function z(){}function Ue(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 We=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e},Ge=(e,t,n)=>{for(;t!==n;)t.upcast||P(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function Ke(e,t){if(t===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;t.$$||P(`Cannot pass "${We(t)}" as a ${this.name}`),t.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return Ge(t.$$.ptr,n,this.registeredClass)}var qe=[],B=[0,1,,1,null,1,!0,1,!1,1],V={toValue:e=>(e||P(`Cannot use deleted val. handle = ${e}`),B[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=qe.pop()||B.length;return B[t]=e,B[t+1]=1,t}}}};function Je(e,t){var n;if(t===null)return this.isReference&&P(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;t&&t.$$||P(`Cannot pass "${We(t)}" as a ${this.name}`),t.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&P(`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=Ge(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&P(`Passing raw pointer to smart pointer is illegal`),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:P(`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,V.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:P(`Unsupported sharing policy`)}return n}var Ye=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var r=Ye(e,t,n.baseClass);return r===null?null:n.downcast(r)},Xe=(e,t)=>{for(t===void 0&&P(`ptr should not be undefined`);e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Ze={},Qe=(e,t)=>(t=Xe(e,t),Ze[t]),$e=(e,t)=>(t.ptrType&&t.ptr||Pe(`makeClassHandle requires ptr and ptrType`),!!t.smartPtrType!=!!t.smartPtr&&Pe(`Both smartPtrType and smartPtr must be specified`),t.count={value:1},R(Object.create(e,{$$:{value:t,writable:!0}}))),et={};function tt(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=Qe(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?$e(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):$e(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=et[this.registeredClass.getActualType(t)];if(!a)return i.call(this);var o=this.isConst?a.constPointerType:a.pointerType,s=Ye(t,this.registeredClass,o.registeredClass);return s===null?i.call(this):this.isSmartPointer?$e(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:e}):$e(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}function nt(e,t){if(t===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;t.$$||P(`Cannot pass "${We(t)}" as a ${this.name}`),t.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&P(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return Ge(t.$$.ptr,n,this.registeredClass)}function rt(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=Ke,this.destructorFunction=null):(this.toWireType=nt,this.destructorFunction=null):this.toWireType=Je}var it=(e,t)=>Object.defineProperty(t,"name",{value:e}),H={},at=(e,t,n)=>{e=e.replace(/p/g,`i`);var r=H[e];return r(t,...n)},ot=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return e.includes(`j`)?at(e,t,n):function(e){return e}(C(t)(...n))},st=(e,t)=>function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return ot(e,t,r)},U=(e,t)=>{e=L(e);var n=function(){return e.includes(`j`)?st(e,t):C(t)}();return typeof n!=`function`&&P(`unknown function pointer with signature ${e}: ${t}`),n},ct=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(){for(var r=arguments.length,i=Array(r),a=0;a<r;a++)i[a]=arguments[a];return e[t].overloadTable[i.length]||P(`Function '${n}' called with an invalid number of arguments (${i.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[i.length].apply(this,i)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},lt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),ut=(e,t,n)=>{lt(i,e)?((n===void 0||i[e].overloadTable!==void 0&&i[e].overloadTable[n]!==void 0)&&P(`Cannot register public name '${e}' twice`),ct(i,e,e),i[e].overloadTable[n]&&P(`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)},dt=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return t>=48&&t<=57?`_${e}`:e},ft=(e,t,n)=>{lt(i,e)||Pe(`Replacing nonexistent public symbol`),i[e].overloadTable!==void 0&&n!==void 0?i[e].overloadTable[n]=t:(i[e]=t,i[e].argCount=n)};class pt extends Error{}var mt=e=>{var t=cn(e),n=L(t);return Q(t),n},W=(e,t)=>{var n=[],r={};throw t.forEach(function e(t){r[t]||M[t]||(je[t]?je[t].forEach(e):(n.push(t),r[t]=!0))}),new pt(`${e}: `+n.map(mt).join([`, `]))};function ht(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].argStackAlloc)return!0;return!1}function gt(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function _t(e,t,n,r,i,a){var o=t.length;o<2&&P(`argTypes array size mismatch! Must at least get return value and receiver (this) types!`);var s=t[1]!==null&&n!==null,c=gt(t),l=ht(t),u=l&&!a&&!c;l&&!u&&(c=!0);var d=!t[0].isVoid,f=o-2,p=Array(f),m=[],h=[];return it(e,function(){for(var e=arguments.length,n=Array(e),a=0;a<e;a++)n[a]=arguments[a];h.length=0;var o;u&&(o=S());var l;m.length=s?2:1,m[0]=i,s&&(l=t[1].toWireType(h,this),m[1]=l);for(var g=0;g<f;++g){var _=t[g+2];p[g]=_.toWireType(u&&_.argStackAlloc?null:h,n[g]),m.push(p[g])}var v=r(...m);return u&&x(o),function(e){if(c)Oe(h);else for(var n=s?1:2;n<t.length;n++){var r=n===1?l:p[n-2];t[n].destructorFunction!==null&&t[n].destructorFunction(r)}if(d)return t[0].fromWireType(e)}(v)})}var vt=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push(w[t+r*4>>2]);return n},yt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},bt=[],xt=e=>{if(e>9&&--B[e+1]===0){var t=B[e];B[e]=void 0;var n=bt[e];n&&(bt[e]=void 0,n(t)),qe.push(e)}},St={name:`emscripten::val`,fromWireType:e=>{var t=V.toValue(e);return xt(e),t},toWireType:(e,t)=>V.toHandle(t),readValueFromPointer:A,destructorFunction:null},Ct,wt,Tt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(Ct[e>>2])};case 8:return function(e){return this.fromWireType(wt[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},G,K,q,Et=(e,t,n)=>{switch(t){case 1:return n?e=>b[e]:e=>k[e];case 2:return n?e=>G[e>>1]:e=>q[e>>1];case 4:return n?e=>K[e>>2]:e=>w[e>>2];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Dt=(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(){let e=this[t]();return r(e,e=>this[n](e))})},Ot=Object.assign({optional:!0},St),kt=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.codePointAt(n);r<=127?t++:r<=2047?t+=2:r<=65535?t+=3:(t+=4,n++)}return t},At=(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},J=(e,t,n)=>At(e,k,t,n),jt=globalThis.TextDecoder?new TextDecoder(`utf-16le`):void 0,Mt=(e,t,n)=>{var r=e>>1,i=Te(q,r,t/2,n);if(i-r>16&&jt)return jt.decode(q.subarray(r,i));for(var a=``,o=r;o<i;++o){var s=q[o];a+=String.fromCharCode(s)}return a},Nt=(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},Pt=e=>e.length*2,Ft=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},It=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:2147483647;if(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);G[t>>1]=o,t+=2}return G[t>>1]=0,t-r},Lt=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:2147483647;if(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++,K[t>>2]=o,t+=4,t+4>i)break}return K[t>>2]=0,t-r},Rt=0,zt=[],Bt=e=>{var t=zt.length;return zt.push(e),t},Vt=(e,t)=>{var n=M[e];return n===void 0&&P(`${t} has unknown type ${mt(e)}`),n},Ht=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=Vt(w[t+r*4>>2],`parameter ${r}`);return n},Ut=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&(w[t>>2]=V.toHandle(r)),i},Wt={},Gt=e=>{var t=Wt[e];return t===void 0?L(e):t},Kt=e=>{if(e instanceof me||e==`unwind`)return v;c(0,e)},qt=()=>ve||Rt>0,Jt=e=>{if(v=e,!qt()){var t;(t=i.onExit)==null||t.call(i,e),_=!0}c(0,new me(e))},Yt=()=>{if(!qt())try{sn(v)}catch(e){Kt(e)}},Xt=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!_)try{return e(...n)}catch(e){Kt(e)}finally{Yt()}},Y={},Zt=()=>performance.now(),Qt=(e,t)=>Math.ceil(e/t)*t,$t=()=>2147483648,en=e=>{var t=(e-bn.buffer.byteLength+65535)/65536|0;try{return bn.grow(t),ne(),1}catch{}},tn={},nn=()=>s,X=()=>{if(!X.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`,_:nn()};for(var r in tn)tn[r]===void 0?delete n[r]:n[r]=tn[r];var i=[];for(var r in n)i.push(`${r}=${n[r]}`);X.strings=i}return X.strings},rn=(e,t)=>t+2097152>>>0<4194305-!!e?(e>>>0)+t*4294967296:NaN,an=[null,[],[]],on=(e,t)=>{var n=an[e];!t||t===10?((e===1?m:h)(Ee(n)),n.length=0):n.push(t)},sn=e=>{v=e,Jt(e)};(()=>{let e=z.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof z)||!(e instanceof z))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||He(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=R(Object.create(Object.getPrototypeOf(this),{$$:{value:Ve(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||He(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P(`Object already scheduled for deletion`),Le(this),ze(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||He(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P(`Object already scheduled for deletion`),Be.push(this),Be.length,this.$$.deleteScheduled=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)})(),Object.assign(rt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t,n;(t=(n=this).rawDestructor)==null||t.call(n,e)},readValueFromPointer:A,fromWireType:tt}),i.noExitRuntime&&(ve=i.noExitRuntime),i.print&&(m=i.print),i.printErr&&(h=i.printErr),i.wasmBinary&&(g=i.wasmBinary),i.arguments&&i.arguments,i.thisProgram&&(s=i.thisProgram);var Z=i.preInit;if(Z)for(typeof Z==`function`&&(i.preInit=Z=[Z]);Z.length>0;)Z.shift()();var cn,Q,ln,un,dn,$,fn,pn,mn,hn,gn,_n,vn,yn,bn,xn;function Sn(e){cn=e.Ja,Q=i._free=e.Ka,ln=i._malloc=e.La,un=e.Ma,dn=e.Oa,$=e.Pa,fn=e.Qa,pn=e.Ra,mn=e.Sa,hn=e.Ta,gn=e.Ua,_n=e.Va,vn=e.Wa,yn=H.iiij=e.Xa,H.jiji=e.Ya,H.viijii=e.Za,H.iiiiij=e._a,H.iiiiijj=e.$a,H.iiiiiijj=e.ab,bn=e.Ha,xn=e.Na}var Cn={qa:(e,t)=>C(e)(t),s:e=>{var t=new be(e);return t.get_caught()||(t.set_caught(!0),E--),t.set_rethrown(!1),T.push(t),un(e)},A:()=>{$(0,0);var e=T.pop();gn(e.excPtr),D=null},a:()=>xe([]),i:e=>xe([e]),m:(e,t)=>xe([e,t]),Y:()=>{T.length||oe(`no exception to throw`);var e=T[T.length-1],t=e.excPtr;e.set_rethrown(!0),e.set_caught(!1),E++,_n(t),t=D=new ee(t),Se(t)},r:(e,t,n)=>{new be(e).init(t,n),_n(e),e=D=new ee(e),E++,Se(e)},na:()=>E,d:e=>{e=D==null?D=new ee(e):D,Ce(e)},X:function(e,t,n){return 0},xa:function(e,t,n){return 0},ua:()=>{},ya:function(e,t,n,r){},pa:()=>{},ta:()=>oe(``),ea:e=>{var t=Ae[e];delete Ae[e];var n=t.rawConstructor,r=t.rawDestructor,i=t.valueSize,a=t.isTrivial,o=t.fields,s=o.map(e=>e.getterReturnTypeID).concat(o.map(e=>e.setterArgumentTypeID));I([e],s,e=>{var s={};for(var[c,l]of o.entries()){let t=e[c],n=l.getter,r=l.getterContext,i=e[c+o.length],a=l.setter,d=l.setterContext;var u=i.destructorFunction===null&&!i.argStackAlloc?(e,t)=>a(d,e,i.toWireType(null,t)):(e,t)=>{var n=[];a(d,e,i.toWireType(n,t)),Oe(n)};s[l.fieldName]={read:e=>t.fromWireType(n(r,e)),write:u,optional:t.optional}}return[{name:t.name,fromWireType:e=>{var t={};for(var n in s)t[n]=s[n].read(e);return r(e),t},toWireType:(e,t)=>{for(var o in s)if(!(o in t)&&!s[o].optional)throw TypeError(`Missing field: "${o}"`);var c;for(o in a&&!e?(c=ke(i),Fe(c,i)):(c=n(),e&&e.push(r,c)),s)s[o].write(c,t[o]);return c},readValueFromPointer:A,destructorFunction:a?null:r,argStackAlloc:a}]})},da:()=>{},Ba:(e,t,n,r)=>{t=L(t),F(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType(k[e])},destructorFunction:null})},Ga:(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=L(u),a=U(i,a),s&&(s=U(o,s)),l&&(l=U(c,l)),f=U(d,f);var p=dt(u);ut(p,function(){W(`Cannot construct ${u} due to unbound types`,[r])}),I([e,t,n],r?[r]:[],t=>{t=t[0];var n,i;r?(n=t.registeredClass,i=n.instancePrototype):i=z.prototype;var o=it(u,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(Object.getPrototypeOf(this)!==c)throw new N(`Use 'new' to construct ${u}`);if(d.constructor_body===void 0)throw new N(`${u} has no accessible constructor`);var r=d.constructor_body[t.length];if(r===void 0)throw new N(`Tried to invoke ctor of ${u} with invalid number of parameters (${t.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return r.apply(this,t)}),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new Ue(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 rt(u,d,!0,!1,!1),g=new rt(u+`*`,d,!1,!1,!1),_=new rt(u+` const*`,d,!1,!0,!1);return et[e]={pointerType:g,constPointerType:_},ft(p,o),[h,g,_]})},Fa:(e,t,n,r,i,a)=>{var o=vt(t,n);i=U(r,i),I([],[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 N(`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]=()=>{W(`Cannot construct ${e.name} due to unbound types`,o)},I([],o,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=_t(n,r,null,i,a),[])),[]})},I:(e,t,n,r,i,a,o,s,c)=>{var l=vt(n,r);t=L(t),t=yt(t),a=U(i,a),I([],[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(){W(`Cannot call ${r} due to unbound types`,l)}var u=e.registeredClass.instancePrototype,d=u[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,u[t]=i):(ct(u,t,r),u[t].overloadTable[n-2]=i),I([],l,i=>{var s=_t(r,i,e,a,o,c);return u[t].overloadTable===void 0?(s.argCount=n-2,u[t]=s):u[t].overloadTable[n-2]=s,[]}),[]})},za:e=>F(e,St),Z:(e,t,n)=>{t=L(t),F(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:Tt(t,n),destructorFunction:null})},P:(e,t,n,r,i,a,o)=>{var s=vt(t,n);e=L(e),e=yt(e),i=U(r,i),ut(e,function(){W(`Cannot call ${e} due to unbound types`,s)},t-1),I([],s,n=>{var r=[n[0],null].concat(n.slice(1));return ft(e,_t(e,r,null,i,a,o),t-1),[]})},C:(e,t,n,r,i)=>{t=L(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}F(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:Et(t,n,r!==0),destructorFunction:null})},Da:(e,t,n,r)=>{n=L(n),r=L(r),I([],[e,t],e=>{let t=e[0];return Dt(t.registeredClass.instancePrototype,n,r),[]})},v:(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(b.buffer,n,t)}n=L(n),F(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},aa:e=>{F(e,Ot)},Aa:(e,t)=>{t=L(t),F(e,{name:t,fromWireType(e){var t=w[e>>2],n=De(e+4,t,!0);return Q(e),n},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var n,r=typeof t==`string`;r||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||P(`Cannot pass non-string to std::string`),n=r?kt(t):t.length;var i=ln(4+n+1),a=i+4;return w[i>>2]=n,r?J(t,a,n+1):k.set(t,a),e!==null&&e.push(Q,i),i},readValueFromPointer:A,destructorFunction(e){Q(e)}})},R:(e,t,n)=>{n=L(n);var r,i,a;t===2?(r=Mt,i=It,a=Pt):(r=Nt,i=Lt,a=Ft),F(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`&&P(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=ln(4+o+t);return w[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push(Q,s),s},readValueFromPointer:A,destructorFunction(e){Q(e)}})},F:(e,t,n,r,i,a,o,s)=>{Ae[e]={name:L(t),rawConstructor:U(n,r),rawDestructor:U(i,a),valueSize:o,isTrivial:!!s,fields:[]}},ha:(e,t,n,r,i,a,o,s,c,l)=>{Ae[e].fields.push({fieldName:L(t),getterReturnTypeID:n,getter:U(r,i),getterContext:a,setterArgumentTypeID:o,setter:U(s,c),setterContext:l})},Ca:(e,t)=>{t=L(t),F(e,{isVoid:!0,name:t,fromWireType:()=>{},toWireType:()=>{}})},sa:()=>{ve=!1,Rt=0},$:(e,t,n)=>{var[r,...i]=Ht(e,t),a=r.toWireType.bind(r),o=i.map(e=>e.readValueFromPointer.bind(e));e--;var s=Array(e);return Bt(it(`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,(t,r,i,c)=>{for(var l=0,u=0;u<e;++u)s[u]=o[u](c+l),l+=8;var d;switch(n){case 0:d=V.toValue(t)(...s);break;case 2:d=Reflect.construct(V.toValue(t),s);break;case 3:d=s[0];break;case 1:d=V.toValue(t)[Gt(r)](...s)}return Ut(a,i,d)}))},wa:xt,G:e=>e?(e=Gt(e),V.toHandle(globalThis[e])):V.toHandle(globalThis),U:e=>{e>9&&(B[e+1]+=1)},_:(e,t,n,r,i)=>zt[e](t,n,r,i),Ea:e=>{Oe(V.toValue(e)),xt(e)},ja:(e,t)=>(Y[e]&&(clearTimeout(Y[e].id),delete Y[e]),t&&(Y[e]={id:setTimeout(()=>{delete Y[e],Xt(dn,e,Zt())},t),timeout_ms:t}),0),ka:(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,K[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?(J(d,n,17),J(f,r,17)):(J(d,r,17),J(f,n,17))},oa:e=>{var t=k.length;e>>>=0;var n=$t();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),en(Math.min(n,Qt(Math.max(e,i),65536))))return!0}return!1},la:(e,t)=>{var n=0,r=0;for(var i of X()){var a=t+n;w[e+r>>2]=a,n+=J(i,a,1/0)+1,r+=4}return 0},ma:(e,t)=>{var n=X();w[e>>2]=n.length;var r=0;for(var i of n)r+=kt(i)+1;return w[t>>2]=r,0},V:()=>52,va:()=>52,ca:function(e,t,n){return rn(t,n),70},W:(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++)on(e,k[o+c]);i+=s}return w[r>>2]=i,0},ia:function(e,t,n){var r=S();try{return C(e)(t,n)}catch(e){if(x(r),!(e instanceof y))throw e;$(1,0)}},O:function(e,t,n,r){var i=S();try{return C(e)(t,n,r)}catch(e){if(x(i),!(e instanceof y))throw e;$(1,0)}},D:function(e,t,n,r,i,a){var o=S();try{return C(e)(t,n,r,i,a)}catch(e){if(x(o),!(e instanceof y))throw e;$(1,0)}},S:function(e,t,n,r){var i=S();try{return C(e)(t,n,r)}catch(e){if(x(i),!(e instanceof y))throw e;$(1,0)}},w:function(e){var t=S();try{return C(e)()}catch(e){if(x(t),!(e instanceof y))throw e;$(1,0)}},b:function(e,t){var n=S();try{return C(e)(t)}catch(e){if(x(n),!(e instanceof y))throw e;$(1,0)}},E:function(e,t,n,r){var i=S();try{return C(e)(t,n,r)}catch(e){if(x(i),!(e instanceof y))throw e;$(1,0)}},c:function(e,t,n){var r=S();try{return C(e)(t,n)}catch(e){if(x(r),!(e instanceof y))throw e;$(1,0)}},H:function(e,t,n,r,i){var a=S();try{return C(e)(t,n,r,i)}catch(e){if(x(a),!(e instanceof y))throw e;$(1,0)}},h:function(e,t,n,r){var i=S();try{return C(e)(t,n,r)}catch(e){if(x(i),!(e instanceof y))throw e;$(1,0)}},k:function(e,t,n,r,i){var a=S();try{return C(e)(t,n,r,i)}catch(e){if(x(a),!(e instanceof y))throw e;$(1,0)}},n:function(e,t,n,r,i,a){var o=S();try{return C(e)(t,n,r,i,a)}catch(e){if(x(o),!(e instanceof y))throw e;$(1,0)}},Q:function(e,t,n,r,i,a,o){var s=S();try{return C(e)(t,n,r,i,a,o)}catch(e){if(x(s),!(e instanceof y))throw e;$(1,0)}},z:function(e,t,n,r,i,a,o){var s=S();try{return C(e)(t,n,r,i,a,o)}catch(e){if(x(s),!(e instanceof y))throw e;$(1,0)}},B:function(e,t,n,r,i,a,o,s){var c=S();try{return C(e)(t,n,r,i,a,o,s)}catch(e){if(x(c),!(e instanceof y))throw e;$(1,0)}},N:function(e,t,n,r,i,a,o,s,c){var l=S();try{return C(e)(t,n,r,i,a,o,s,c)}catch(e){if(x(l),!(e instanceof y))throw e;$(1,0)}},K:function(e,t,n,r,i,a,o,s,c,l,u,d){var f=S();try{return C(e)(t,n,r,i,a,o,s,c,l,u,d)}catch(e){if(x(f),!(e instanceof y))throw e;$(1,0)}},ba:function(e,t,n,r,i){var a=S();try{return yn(e,t,n,r,i)}catch(e){if(x(a),!(e instanceof y))throw e;$(1,0)}},g:function(e){var t=S();try{C(e)()}catch(e){if(x(t),!(e instanceof y))throw e;$(1,0)}},j:function(e,t){var n=S();try{C(e)(t)}catch(e){if(x(n),!(e instanceof y))throw e;$(1,0)}},fa:function(e,t,n){var r=S();try{C(e)(t,n)}catch(e){if(x(r),!(e instanceof y))throw e;$(1,0)}},f:function(e,t,n){var r=S();try{C(e)(t,n)}catch(e){if(x(r),!(e instanceof y))throw e;$(1,0)}},T:function(e,t,n,r,i,a,o,s,c){var l=S();try{C(e)(t,n,r,i,a,o,s,c)}catch(e){if(x(l),!(e instanceof y))throw e;$(1,0)}},M:function(e,t,n,r,i){var a=S();try{C(e)(t,n,r,i)}catch(e){if(x(a),!(e instanceof y))throw e;$(1,0)}},e:function(e,t,n,r){var i=S();try{C(e)(t,n,r)}catch(e){if(x(i),!(e instanceof y))throw e;$(1,0)}},L:function(e,t,n,r,i,a,o){var s=S();try{C(e)(t,n,r,i,a,o)}catch(e){if(x(s),!(e instanceof y))throw e;$(1,0)}},l:function(e,t,n,r,i){var a=S();try{C(e)(t,n,r,i)}catch(e){if(x(a),!(e instanceof y))throw e;$(1,0)}},ga:function(e,t,n,r,i,a,o,s){var c=S();try{C(e)(t,n,r,i,a,o,s)}catch(e){if(x(c),!(e instanceof y))throw e;$(1,0)}},o:function(e,t,n,r,i,a){var o=S();try{C(e)(t,n,r,i,a)}catch(e){if(x(o),!(e instanceof y))throw e;$(1,0)}},u:function(e,t,n,r,i,a,o){var s=S();try{C(e)(t,n,r,i,a,o)}catch(e){if(x(s),!(e instanceof y))throw e;$(1,0)}},t:function(e,t,n,r,i,a,o,s){var c=S();try{C(e)(t,n,r,i,a,o,s)}catch(e){if(x(c),!(e instanceof y))throw e;$(1,0)}},q:function(e,t,n,r,i,a,o,s,c){var l=S();try{C(e)(t,n,r,i,a,o,s,c)}catch(e){if(x(l),!(e instanceof y))throw e;$(1,0)}},x:function(e,t,n,r,i,a,o,s,c,l){var u=S();try{C(e)(t,n,r,i,a,o,s,c,l)}catch(e){if(x(u),!(e instanceof y))throw e;$(1,0)}},p:function(e,t,n,r,i,a,o,s,c,l,u){var d=S();try{C(e)(t,n,r,i,a,o,s,c,l,u)}catch(e){if(x(d),!(e instanceof y))throw e;$(1,0)}},J:function(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){var g=S();try{C(e)(t,n,r,i,a,o,s,c,l,u,d,f,p,m,h)}catch(e){if(x(g),!(e instanceof y))throw e;$(1,0)}},y:e=>e,ra:Jt},wn=await async function(){function e(e){return wn=e.exports,Sn(wn),ne(),wn}var t=pe(),n=i.instantiateWasm;return n?new Promise(r=>{n(t,t=>r(e(t)))}):(se!=null||(se=ce()),function(t){return e(t.instance)}(await fe(g,se,t)))}();return await async function(){var e;re();var t=i.setStatus;t&&(t(`Running...`),await new Promise(e=>setTimeout(e,1)),setTimeout(t,1,``)),_||(ie(),(e=i.onRuntimeInitialized)==null||e.call(i),ae())}(),i}function r(t){return e.a(n,t)}function i(){return e.o(n)}function a(e){return r({overrides:e,equalityFn:Object.is,fireImmediately:!0})}function o(e){r({overrides:e,equalityFn:Object.is,fireImmediately:!1})}async function s(t,r){return e.s(n,t,r)}async function c(e,t){return s(e,t)}async function l(e,t){return s(e,t)}async function u(t,r){return e.c(n,t,r)}var d=`eb2a74ef0287058399f5abe33871518af673970ee72695c8e25ecad03da5bcc7`;exports.BARCODE_FORMATS=e.y,exports.BARCODE_HRI_LABELS=e.b,exports.BARCODE_META_FORMATS=e.x,exports.BARCODE_SYMBOLOGIES=e.S,exports.BINARIZERS=e._,exports.CHARACTER_SETS=e.h,exports.CONTENT_TYPES=e.p,exports.CREATABLE_BARCODE_FORMATS=e.C,exports.EAN_ADD_ON_SYMBOLS=e.d,exports.GS1_BARCODE_FORMATS=e.w,exports.INDUSTRIAL_BARCODE_FORMATS=e.T,exports.LINEAR_BARCODE_FORMATS=e.E,exports.MATRIX_BARCODE_FORMATS=e.D,exports.READABLE_BARCODE_FORMATS=e.O,exports.RETAIL_BARCODE_FORMATS=e.k,exports.TEXT_MODES=e.l,exports.ZXING_CPP_COMMIT=e.r,exports.ZXING_WASM_SHA256=d,exports.ZXING_WASM_VERSION=e.i,exports.barcodeFormats=e.A,exports.binarizers=e.v,exports.characterSets=e.g,exports.contentTypes=e.m,exports.defaultReaderOptions=e.n,exports.defaultWriterOptions=e.t,exports.eanAddOnSymbols=e.f,exports.encodeFormat=e.j,exports.encodeFormats=e.M,exports.formatToLabel=e.N,exports.formatToSymbology=e.P,exports.getZXingModule=a,exports.linearBarcodeFormats=e.F,exports.matrixBarcodeFormats=e.I,exports.prepareZXingModule=r,exports.purgeZXingModule=i,exports.readBarcodes=s,exports.readBarcodesFromImageData=l,exports.readBarcodesFromImageFile=c,exports.setZXingModuleOverrides=o,exports.symbologyToFormats=e.L,exports.textModes=e.u,exports.writeBarcode=u;