zxing-wasm
Version:
ZXing-C++ WebAssembly as an ES/CJS module with types
2 lines (1 loc) • 20.9 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const F=require("../share.js");async function hr(C={}){var X,j,ir,f=C,re=!!globalThis.window,ee=typeof Bun<"u",yr=!!globalThis.WorkerGlobalScope;!((j=globalThis.process)===null||j===void 0||(j=j.versions)===null||j===void 0)&&j.node&&((ir=globalThis.process)===null||ir===void 0?void 0:ir.type)!="renderer";var mr="./this.program",te,ar="";function ne(r){return f.locateFile?f.locateFile(r,ar):ar+r}var wr,or;if(re||yr||ee){try{ar=new URL(".",te).href}catch{}yr&&(or=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),wr=async r=>{var e=await fetch(r,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)}}var br=console.log.bind(console),N=console.error.bind(console),Z,Tr=!1,Ar,Rr,O,P,Y,x,z,d,Fr,Cr,Pr=!1;function Sr(){var r=nr.buffer;O=new Int8Array(r),Y=new Int16Array(r),f.HEAPU8=P=new Uint8Array(r),x=new Uint16Array(r),z=new Int32Array(r),d=new Uint32Array(r),Fr=new Float32Array(r),Cr=new Float64Array(r)}function ie(){if(f.preRun)for(typeof f.preRun=="function"&&(f.preRun=[f.preRun]);f.preRun.length;)ge(f.preRun.shift());Er(Mr)}function ae(){Pr=!0,q.na()}function oe(){if(f.postRun)for(typeof f.postRun=="function"&&(f.postRun=[f.postRun]);f.postRun.length;)_e(f.postRun.shift());Er(kr)}function sr(r){var e,t;(e=f.onAbort)===null||e===void 0||e.call(f,r),r="Aborted("+r+")",N(r),Tr=!0,r+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(r);throw(t=Rr)===null||t===void 0||t(n),n}var B;function se(){return ne("zxing_writer.wasm")}function ue(r){if(r==B&&Z)return new Uint8Array(Z);if(or)return or(r);throw"both async and sync fetching of the wasm failed"}async function fe(r){if(!Z)try{var e=await wr(r);return new Uint8Array(e)}catch{}return ue(r)}async function ve(r,e){try{var t=await fe(r),n=await WebAssembly.instantiate(t,e);return n}catch(i){N(`failed to asynchronously prepare wasm: ${i}`),sr(i)}}async function ce(r,e,t){if(!r&&WebAssembly.instantiateStreaming)try{var n=fetch(e,{credentials:"same-origin"}),i=await WebAssembly.instantiateStreaming(n,t);return i}catch(a){N(`wasm streaming compile failed: ${a}`),N("falling back to ArrayBuffer instantiation")}return ve(e,t)}function le(){var r={a:Ht};return r}async function de(){function r(a,o){return q=a.exports,Dt(q),Sr(),q}function e(a){return r(a.instance)}var t=le();if(f.instantiateWasm)return new Promise((a,o)=>{f.instantiateWasm(t,(s,u)=>{a(r(s))})});B!=null||(B=se());var n=await ce(Z,B,t),i=e(n);return i}var Er=r=>{for(;r.length>0;)r.shift()(f)},kr=[],_e=r=>kr.push(r),Mr=[],ge=r=>Mr.push(r),h=r=>zr(r),p=()=>Gr(),K=[],J=0,he=r=>{var e=new ur(r);return e.get_caught()||(e.set_caught(!0),J--),e.set_rethrown(!1),K.push(e),qr(r),Kr(r)},S=0,pe=()=>{_(0,0);var r=K.pop();Lr(r.excPtr),S=0};class ur{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){d[this.ptr+4>>2]=e}get_type(){return d[this.ptr+4>>2]}set_destructor(e){d[this.ptr+8>>2]=e}get_destructor(){return d[this.ptr+8>>2]}set_caught(e){e=e?1:0,O[this.ptr+12]=e}get_caught(){return O[this.ptr+12]!=0}set_rethrown(e){e=e?1:0,O[this.ptr+13]=e}get_rethrown(){return O[this.ptr+13]!=0}init(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)}set_adjusted_ptr(e){d[this.ptr+16>>2]=e}get_adjusted_ptr(){return d[this.ptr+16>>2]}}var Q=r=>xr(r),fr=r=>{var e=S;if(!e)return Q(0),0;var t=new ur(e);t.set_adjusted_ptr(e);var n=t.get_type();if(!n)return Q(0),e;for(var i of r){if(i===0||i===n)break;var a=t.ptr+16;if(Yr(i,n,a))return Q(i),e}return Q(n),e},ye=()=>fr([]),me=r=>fr([r]),we=(r,e)=>fr([r,e]),be=()=>{var r=K.pop();r||sr("no exception to throw");var e=r.excPtr;throw r.get_rethrown()||(K.push(r),r.set_rethrown(!0),r.set_caught(!1),J++),S=e,S},Te=(r,e,t)=>{var n=new ur(r);throw n.init(e,t),S=r,J++,S},Ae=()=>J,Re=r=>{throw S||(S=r),S},Wr=globalThis.TextDecoder&&new TextDecoder,Ur=(r,e,t,n)=>{var i=e+t;if(n)return i;for(;r[e]&&!(e>=i);)++e;return e},Or=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0;var i=Ur(r,e,t,n);if(i-e>16&&r.buffer&&Wr)return Wr.decode(r.subarray(e,i));for(var a="";e<i;){var o=r[e++];if(!(o&128)){a+=String.fromCharCode(o);continue}var s=r[e++]&63;if((o&224)==192){a+=String.fromCharCode((o&31)<<6|s);continue}var u=r[e++]&63;if((o&240)==224?o=(o&15)<<12|s<<6|u:o=(o&7)<<18|s<<12|u<<6|r[e++]&63,o<65536)a+=String.fromCharCode(o);else{var v=o-65536;a+=String.fromCharCode(55296|v>>10,56320|v&1023)}}return a},Fe=(r,e,t)=>r?Or(P,r,e,t):"";function Ce(r,e,t){return 0}function Pe(r,e,t){return 0}var Se=(r,e,t)=>{};function Ee(r,e,t,n){}var ke=(r,e)=>{},Me=()=>sr(""),rr={},vr=r=>{for(;r.length;){var e=r.pop(),t=r.pop();t(e)}};function er(r){return this.fromWireType(d[r>>2])}var D={},$={},tr={},We=class extends Error{constructor(e){super(e),this.name="InternalError"}},$r=r=>{throw new We(r)},Ir=(r,e,t)=>{r.forEach(s=>tr[s]=e);function n(s){var u=t(s);u.length!==r.length&&$r("Mismatched type converter count");for(var v=0;v<r.length;++v)E(r[v],u[v])}var i=new Array(e.length),a=[],o=0;{const s=e;for(let u=0;u<s.length;++u){const v=s[u];$.hasOwnProperty(v)?i[u]=$[v]:(a.push(v),D.hasOwnProperty(v)||(D[v]=[]),D[v].push(()=>{i[u]=$[v],++o,o===a.length&&n(i)}))}}a.length===0&&n(i)},Ue=r=>{var e=rr[r];delete rr[r];var t=e.rawConstructor,n=e.rawDestructor,i=e.fields,a=i.map(o=>o.getterReturnType).concat(i.map(o=>o.setterArgumentType));Ir([r],a,o=>{var s={};{const u=i;for(let v=0;v<u.length;++v){const c=u[v],l=o[v],y=c.getter,b=c.getterContext,M=o[v+i.length],m=c.setter,A=c.setterContext;s[c.fieldName]={read:w=>l.fromWireType(y(b,w)),write:(w,gr)=>{var W=[];m(A,w,M.toWireType(W,gr)),vr(W)},optional:l.optional}}}return[{name:e.name,fromWireType:u=>{var v={};for(var c in s)v[c]=s[c].read(u);return n(u),v},toWireType:(u,v)=>{for(var c in s)if(!(c in v)&&!s[c].optional)throw new TypeError(`Missing field: "${c}"`);var l=t();for(c in s)s[c].write(l,v[c]);return u!==null&&u.push(n,l),l},readValueFromPointer:er,destructorFunction:n}]})},Oe=(r,e,t,n,i)=>{},T=r=>{for(var e="";;){var t=P[r++];if(!t)return e;e+=String.fromCharCode(t)}},$e=class extends Error{constructor(e){super(e),this.name="BindingError"}},R=r=>{throw new $e(r)};function Ie(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=e.name;if(r||R(`type "${n}" must have a positive integer typeid pointer`),$.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;R(`Cannot register type '${n}' twice`)}if($[r]=e,delete tr[r],D.hasOwnProperty(r)){var i=D[r];delete D[r],i.forEach(a=>a())}}function E(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ie(r,e,t)}var Ve=(r,e,t,n)=>{e=T(e),E(r,{name:e,fromWireType:function(i){return!!i},toWireType:function(i,a){return a?t:n},readValueFromPointer:function(i){return this.fromWireType(P[i])},destructorFunction:null})},Vr=[],I=[0,1,,1,null,1,!0,1,!1,1],cr=r=>{r>9&&--I[r+1]===0&&(I[r]=void 0,Vr.push(r))},k={toValue:r=>(r||R(`Cannot use deleted val. handle = ${r}`),I[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=Vr.pop()||I.length;return I[e]=r,I[e+1]=1,e}}}},je={name:"emscripten::val",fromWireType:r=>{var e=k.toValue(r);return cr(r),e},toWireType:(r,e)=>k.toHandle(e),readValueFromPointer:er,destructorFunction:null},Ne=r=>E(r,je),Be=(r,e)=>{switch(e){case 4:return function(t){return this.fromWireType(Fr[t>>2])};case 8:return function(t){return this.fromWireType(Cr[t>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},De=(r,e,t)=>{e=T(e),E(r,{name:e,fromWireType:n=>n,toWireType:(n,i)=>i,readValueFromPointer:Be(e,t),destructorFunction:null})},jr=(r,e)=>Object.defineProperty(e,"name",{value:r});function He(r){for(var e=1;e<r.length;++e)if(r[e]!==null&&r[e].destructorFunction===void 0)return!0;return!1}function Xe(r,e,t,n,i,a){var o=e.length;o<2&&R("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];var s=He(e),u=!e[0].isVoid,v=o-2,c=new Array(v),l=[],y=[],b=function(){y.length=0;var M;l.length=1,l[0]=i;for(var m=0;m<v;++m)c[m]=e[m+2].toWireType(y,m<0||arguments.length<=m?void 0:arguments[m]),l.push(c[m]);var A=n(...l);function w(gr){if(s)vr(y);else for(var W=2;W<e.length;W++){var _n=W===1?M:c[W-2];e[W].destructorFunction!==null&&e[W].destructorFunction(_n)}if(u)return e[0].fromWireType(gr)}return w(A)};return jr(r,b)}var Ze=(r,e,t)=>{if(r[e].overloadTable===void 0){var n=r[e];r[e]=function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return r[e].overloadTable.hasOwnProperty(a.length)||R(`Function '${t}' called with an invalid number of arguments (${a.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[a.length].apply(this,a)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},xe=(r,e,t)=>{f.hasOwnProperty(r)?((t===void 0||f[r].overloadTable!==void 0&&f[r].overloadTable[t]!==void 0)&&R(`Cannot register public name '${r}' twice`),Ze(f,r,r),f[r].overloadTable.hasOwnProperty(t)&&R(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),f[r].overloadTable[t]=e):(f[r]=e,f[r].argCount=t)},ze=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(d[e+n*4>>2]);return t},Ge=(r,e,t)=>{f.hasOwnProperty(r)||$r("Replacing nonexistent public symbol"),f[r].overloadTable!==void 0&&t!==void 0?f[r].overloadTable[t]=e:(f[r]=e,f[r].argCount=t)},V={},Le=(r,e,t)=>{r=r.replace(/p/g,"i");var n=V[r];return n(e,...t)},Nr=[],g=r=>{var e=Nr[r];return e||(Nr[r]=e=Qr.get(r)),e},qe=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.includes("j"))return Le(r,e,t);var n=g(e),i=n(...t);function a(o){return o}return i},Ye=function(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return qe(r,e,i,t)}},G=function(r,e){r=T(r);function t(){if(r.includes("j"))return Ye(r,e);var i=g(e);return i}var n=t();return typeof n!="function"&&R(`unknown function pointer with signature ${r}: ${e}`),n};class Ke extends Error{}var Br=r=>{var e=Zr(r),t=T(e);return U(e),t},Je=(r,e)=>{var t=[],n={};function i(a){if(!n[a]&&!$[a]){if(tr[a]){tr[a].forEach(i);return}t.push(a),n[a]=!0}}throw e.forEach(i),new Ke(`${r}: `+t.map(Br).join([", "]))},Qe=r=>{r=r.trim();const e=r.indexOf("(");return e===-1?r:r.slice(0,e)},rt=(r,e,t,n,i,a,o,s)=>{var u=ze(e,t);r=T(r),r=Qe(r),i=G(n,i),xe(r,function(){Je(`Cannot call ${r} due to unbound types`,u)},e-1),Ir([],u,v=>{var c=[v[0],null].concat(v.slice(1));return Ge(r,Xe(r,c,null,i,a),e-1),[]})},et=(r,e,t)=>{switch(e){case 1:return t?n=>O[n]:n=>P[n];case 2:return t?n=>Y[n>>1]:n=>x[n>>1];case 4:return t?n=>z[n>>2]:n=>d[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},tt=(r,e,t,n,i)=>{e=T(e);const a=n===0;let o=u=>u;if(a){var s=32-8*t;o=u=>u<<s>>>s,i=o(i)}E(r,{name:e,fromWireType:o,toWireType:(u,v)=>v,readValueFromPointer:et(e,t,n!==0),destructorFunction:null})},nt=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],i=n[e];function a(o){var s=d[o>>2],u=d[o+4>>2];return new i(O.buffer,u,s)}t=T(t),E(r,{name:t,fromWireType:a,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},it=(r,e,t,n)=>{if(!(n>0))return 0;for(var i=t,a=t+n-1,o=0;o<r.length;++o){var s=r.codePointAt(o);if(s<=127){if(t>=a)break;e[t++]=s}else if(s<=2047){if(t+1>=a)break;e[t++]=192|s>>6,e[t++]=128|s&63}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|s&63}else{if(t+3>=a)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|s&63,o++}}return e[t]=0,t-i},H=(r,e,t)=>it(r,P,e,t),Dr=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},at=(r,e)=>{e=T(e),E(r,{name:e,fromWireType(t){var n=d[t>>2],i=t+4,a;return a=Fe(i,n,!0),U(t),a},toWireType(t,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var i,a=typeof n=="string";a||ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT==1||R("Cannot pass non-string to std::string"),a?i=Dr(n):i=n.length;var o=_r(4+i+1),s=o+4;return d[o>>2]=i,a?H(n,s,i+1):P.set(n,s),t!==null&&t.push(U,o),o},readValueFromPointer:er,destructorFunction(t){U(t)}})},Hr=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,ot=(r,e,t)=>{var n=r>>1,i=Ur(x,n,e/2,t);if(i-n>16&&Hr)return Hr.decode(x.subarray(n,i));for(var a="",o=n;o<i;++o){var s=x[o];a+=String.fromCharCode(s)}return a},st=(r,e,t)=>{if(t!=null||(t=2147483647),t<2)return 0;t-=2;for(var n=e,i=t<r.length*2?t/2:r.length,a=0;a<i;++a){var o=r.charCodeAt(a);Y[e>>1]=o,e+=2}return Y[e>>1]=0,e-n},ut=r=>r.length*2,ft=(r,e,t)=>{for(var n="",i=r>>2,a=0;!(a>=e/4);a++){var o=d[i+a];if(!o&&!t)break;n+=String.fromCodePoint(o)}return n},vt=(r,e,t)=>{if(t!=null||(t=2147483647),t<4)return 0;for(var n=e,i=n+t-4,a=0;a<r.length;++a){var o=r.codePointAt(a);if(o>65535&&a++,z[e>>2]=o,e+=4,e+4>i)break}return z[e>>2]=0,e-n},ct=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.codePointAt(t);n>65535&&t++,e+=4}return e},lt=(r,e,t)=>{t=T(t);var n,i,a;e===2?(n=ot,i=st,a=ut):(n=ft,i=vt,a=ct),E(r,{name:t,fromWireType:o=>{var s=d[o>>2],u=n(o+4,s*e,!0);return U(o),u},toWireType:(o,s)=>{typeof s!="string"&&R(`Cannot pass non-string to C++ string type ${t}`);var u=a(s),v=_r(4+u+e);return d[v>>2]=u/e,i(s,v+4,u+e),o!==null&&o.push(U,v),v},readValueFromPointer:er,destructorFunction(o){U(o)}})},dt=(r,e,t,n,i,a)=>{rr[r]={name:T(e),rawConstructor:G(t,n),rawDestructor:G(i,a),fields:[]}},_t=(r,e,t,n,i,a,o,s,u,v)=>{rr[r].fields.push({fieldName:T(e),getterReturnType:t,getter:G(n,i),getterContext:a,setterArgumentType:o,setter:G(s,u),setterContext:v})},gt=(r,e)=>{e=T(e),E(r,{isVoid:!0,name:e,fromWireType:()=>{},toWireType:(t,n)=>{}})},lr=[],ht=r=>{var e=lr.length;return lr.push(r),e},pt=(r,e)=>{var t=$[r];return t===void 0&&R(`${e} has unknown type ${Br(r)}`),t},yt=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=pt(d[e+n*4>>2],`parameter ${n}`);return t},mt=(r,e,t)=>{var n=[],i=r(n,t);return n.length&&(d[e>>2]=k.toHandle(n)),i},wt={},Xr=r=>{var e=wt[r];return e===void 0?T(r):e},bt=(r,e,t)=>{var n=8,[i,...a]=yt(r,e),o=i.toWireType.bind(i),s=a.map(l=>l.readValueFromPointer.bind(l));r--;var u=new Array(r),v=(l,y,b,M)=>{for(var m=0,A=0;A<r;++A)u[A]=s[A](M+m),m+=n;var w;switch(t){case 0:w=k.toValue(l).apply(null,u);break;case 2:w=Reflect.construct(k.toValue(l),u);break;case 3:w=u[0];break;case 1:w=k.toValue(l)[Xr(y)](...u);break}return mt(o,b,w)},c=`methodCaller<(${a.map(l=>l.name)}) => ${i.name}>`;return ht(jr(c,v))},Tt=r=>r?(r=Xr(r),k.toHandle(globalThis[r])):k.toHandle(globalThis),At=r=>{r>9&&(I[r+1]+=1)},Rt=(r,e,t,n,i)=>lr[r](e,t,n,i),Ft=r=>{var e=k.toValue(r);vr(e),cr(r)},Ct=(r,e,t,n)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),o=new Date(i,6,1),s=a.getTimezoneOffset(),u=o.getTimezoneOffset(),v=Math.max(s,u);d[r>>2]=v*60,z[e>>2]=+(s!=u);var c=b=>{var M=b>=0?"-":"+",m=Math.abs(b),A=String(Math.floor(m/60)).padStart(2,"0"),w=String(m%60).padStart(2,"0");return`UTC${M}${A}${w}`},l=c(s),y=c(u);u<s?(H(l,t,17),H(y,n,17)):(H(l,n,17),H(y,t,17))},Pt=()=>2147483648,St=(r,e)=>Math.ceil(r/e)*e,Et=r=>{var e=nr.buffer.byteLength,t=(r-e+65535)/65536|0;try{return nr.grow(t),Sr(),1}catch{}},kt=r=>{var e=P.length;r>>>=0;var t=Pt();if(r>t)return!1;for(var n=1;n<=4;n*=2){var i=e*(1+.2/n);i=Math.min(i,r+100663296);var a=Math.min(t,St(Math.max(r,i),65536)),o=Et(a);if(o)return!0}return!1},dr={},Mt=()=>mr||"./this.program",L=()=>{if(!L.strings){var r=(typeof navigator=="object"&&navigator.language||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:r,_:Mt()};for(var t in dr)dr[t]===void 0?delete e[t]:e[t]=dr[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);L.strings=n}return L.strings},Wt=(r,e)=>{var t=0,n=0;for(var i of L()){var a=e+t;d[r+n>>2]=a,t+=H(i,a,1/0)+1,n+=4}return 0},Ut=(r,e)=>{var t=L();d[r>>2]=t.length;var n=0;for(var i of t)n+=Dr(i)+1;return d[e>>2]=n,0},Ot=r=>52,$t=(r,e,t,n)=>52;function It(r,e,t,n,i){return 70}var Vt=[null,[],[]],jt=(r,e)=>{var t=Vt[r];e===0||e===10?((r===1?br:N)(Or(t)),t.length=0):t.push(e)},Nt=(r,e,t,n)=>{for(var i=0,a=0;a<t;a++){var o=d[e>>2],s=d[e+4>>2];e+=8;for(var u=0;u<s;u++)jt(r,P[o+u]);i+=s}return d[n>>2]=i,0},Bt=r=>r;if(f.noExitRuntime&&f.noExitRuntime,f.print&&(br=f.print),f.printErr&&(N=f.printErr),f.wasmBinary&&(Z=f.wasmBinary),f.arguments&&f.arguments,f.thisProgram&&(mr=f.thisProgram),f.preInit)for(typeof f.preInit=="function"&&(f.preInit=[f.preInit]);f.preInit.length>0;)f.preInit.shift()();var Zr,_r,U,_,xr,zr,Gr,Lr,qr,Yr,Kr,Jr,nr,Qr;function Dt(r){Zr=r.oa,_r=f._malloc=r.qa,U=f._free=r.ra,_=r.sa,xr=r.ta,zr=r.ua,Gr=r.va,Lr=r.wa,qr=r.xa,Yr=r.ya,Kr=r.za,V.jiji=r.Aa,V.viijii=r.Ba,Jr=V.jiiii=r.Ca,V.iiiiij=r.Da,V.iiiiijj=r.Ea,V.iiiiiijj=r.Fa,nr=r.ma,Qr=r.pa}var Ht={r:he,w:pe,a:ye,f:me,n:we,da:be,q:Te,Y:Ae,d:Re,K:Ce,ba:Pe,$:Se,ca:Ee,_:ke,T:Me,ja:Ue,S:Oe,ha:Ve,fa:Ne,L:De,M:rt,t:tt,o:nt,ga:at,D:lt,F:dt,ka:_t,ia:gt,C:bt,la:cr,P:Tt,E:At,A:Rt,W:Ft,U:Ct,Z:kt,V:Wt,X:Ut,I:Ot,aa:$t,R:It,J:Nt,G:un,O:Lt,H:sn,m:fn,b:Kt,e:qt,h:Gt,j:Qt,v:tn,s:an,B:on,x:cn,Q:ln,k:Yt,i:Xt,c:xt,g:zt,u:Zt,y:nn,ea:rn,p:vn,l:Jt,z:en,N:Bt};function Xt(r,e){var t=p();try{g(r)(e)}catch(n){if(h(t),n!==n+0)throw n;_(1,0)}}function Zt(r,e,t,n,i){var a=p();try{g(r)(e,t,n,i)}catch(o){if(h(a),o!==o+0)throw o;_(1,0)}}function xt(r,e,t){var n=p();try{g(r)(e,t)}catch(i){if(h(n),i!==i+0)throw i;_(1,0)}}function zt(r,e,t,n){var i=p();try{g(r)(e,t,n)}catch(a){if(h(i),a!==a+0)throw a;_(1,0)}}function Gt(r,e,t,n){var i=p();try{return g(r)(e,t,n)}catch(a){if(h(i),a!==a+0)throw a;_(1,0)}}function Lt(r,e,t,n,i,a){var o=p();try{return g(r)(e,t,n,i,a)}catch(s){if(h(o),s!==s+0)throw s;_(1,0)}}function qt(r,e,t){var n=p();try{return g(r)(e,t)}catch(i){if(h(n),i!==i+0)throw i;_(1,0)}}function Yt(r){var e=p();try{g(r)()}catch(t){if(h(e),t!==t+0)throw t;_(1,0)}}function Kt(r,e){var t=p();try{return g(r)(e)}catch(n){if(h(t),n!==n+0)throw n;_(1,0)}}function Jt(r,e,t,n,i,a,o,s,u,v,c){var l=p();try{g(r)(e,t,n,i,a,o,s,u,v,c)}catch(y){if(h(l),y!==y+0)throw y;_(1,0)}}function Qt(r,e,t,n,i){var a=p();try{return g(r)(e,t,n,i)}catch(o){if(h(a),o!==o+0)throw o;_(1,0)}}function rn(r,e,t,n,i,a,o){var s=p();try{g(r)(e,t,n,i,a,o)}catch(u){if(h(s),u!==u+0)throw u;_(1,0)}}function en(r,e,t,n,i,a,o,s,u,v,c,l,y,b,M,m){var A=p();try{g(r)(e,t,n,i,a,o,s,u,v,c,l,y,b,M,m)}catch(w){if(h(A),w!==w+0)throw w;_(1,0)}}function tn(r,e,t,n,i,a){var o=p();try{return g(r)(e,t,n,i,a)}catch(s){if(h(o),s!==s+0)throw s;_(1,0)}}function nn(r,e,t,n,i,a){var o=p();try{g(r)(e,t,n,i,a)}catch(s){if(h(o),s!==s+0)throw s;_(1,0)}}function an(r,e,t,n,i,a,o){var s=p();try{return g(r)(e,t,n,i,a,o)}catch(u){if(h(s),u!==u+0)throw u;_(1,0)}}function on(r,e,t,n,i,a,o,s){var u=p();try{return g(r)(e,t,n,i,a,o,s)}catch(v){if(h(u),v!==v+0)throw v;_(1,0)}}function sn(r,e,t,n){var i=p();try{return g(r)(e,t,n)}catch(a){if(h(i),a!==a+0)throw a;_(1,0)}}function un(r,e,t,n){var i=p();try{return g(r)(e,t,n)}catch(a){if(h(i),a!==a+0)throw a;_(1,0)}}function fn(r){var e=p();try{return g(r)()}catch(t){if(h(e),t!==t+0)throw t;_(1,0)}}function vn(r,e,t,n,i,a,o,s){var u=p();try{g(r)(e,t,n,i,a,o,s)}catch(v){if(h(u),v!==v+0)throw v;_(1,0)}}function cn(r,e,t,n,i,a,o,s,u,v,c,l){var y=p();try{return g(r)(e,t,n,i,a,o,s,u,v,c,l)}catch(b){if(h(y),b!==b+0)throw b;_(1,0)}}function ln(r,e,t,n,i){var a=p();try{return Jr(r,e,t,n,i)}catch(o){if(h(a),o!==o+0)throw o;_(1,0)}}function dn(){ie();function r(){var e,t;f.calledRun=!0,!Tr&&(ae(),(e=Ar)===null||e===void 0||e(f),(t=f.onRuntimeInitialized)===null||t===void 0||t.call(f),oe())}f.setStatus?(f.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>f.setStatus(""),1),r()},1)):r()}var q;return q=await de(),dn(),Pr?X=f:X=new Promise((r,e)=>{Ar=r,Rr=e}),X}function pr(C){return F.prepareZXingModuleWithFactory(hr,C)}function gn(){return F.purgeZXingModuleWithFactory(hr)}function hn(C){return pr({overrides:C,equalityFn:Object.is,fireImmediately:!0})}function pn(C){pr({overrides:C,equalityFn:Object.is,fireImmediately:!1})}async function yn(C,X){return F.writeBarcodeWithFactory(hr,C,X)}const mn="d93a8850fdccb687c5a7334d449d2f19fc58864afc0b7beaef944c67d8755c71";exports.ZXING_CPP_COMMIT=F.ZXING_CPP_COMMIT;exports.ZXING_WASM_VERSION=F.ZXING_WASM_VERSION;exports.barcodeFormats=F.barcodeFormats;exports.characterSets=F.characterSets;exports.defaultWriterOptions=F.defaultWriterOptions;exports.linearBarcodeFormats=F.linearBarcodeFormats;exports.matrixBarcodeFormats=F.matrixBarcodeFormats;exports.ZXING_WASM_SHA256=mn;exports.getZXingModule=hn;exports.prepareZXingModule=pr;exports.purgeZXingModule=gn;exports.setZXingModuleOverrides=pn;exports.writeBarcode=yn;