| 123 |
- import{d as kr,r as te,w as He,o as go,J as wo,a as ut,j as Ce,b as _e,e as X,$ as bo,h as lt,v as Co,W as _o,C as st,a0 as Cr,F as Lt,z as Ht,x as Ne,c as To,y as So,a1 as $o,p as Po,n as Eo,_ as Oo}from"./index-dfe95a46.js";var Dr=(r,i,a)=>{if(!i.has(r))throw TypeError("Cannot "+a)},_r=(r,i,a)=>(Dr(r,i,"read from private field"),a?a.call(r):i.get(r)),xo=(r,i,a)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,a)},Mo=(r,i,a,c)=>(Dr(r,i,"write to private field"),i.set(r,a),a);const jr=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],Ao=[...jr,["unknown"]].map(r=>r[0]),dt=new Map(jr);function ko(r){for(const[i,a]of dt)if(r===a)return i;return"unknown"}function Do(r){if(Rr(r))return{width:r.naturalWidth,height:r.naturalHeight};if(Fr(r))return{width:r.width.baseVal.value,height:r.height.baseVal.value};if(Ir(r))return{width:r.videoWidth,height:r.videoHeight};if(Ur(r))return{width:r.width,height:r.height};if(Hr(r))return{width:r.displayWidth,height:r.displayHeight};if(Wr(r))return{width:r.width,height:r.height};if(Lr(r))return{width:r.width,height:r.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 Rr(r){try{return r instanceof HTMLImageElement}catch{return!1}}function Fr(r){try{return r instanceof SVGImageElement}catch{return!1}}function Ir(r){try{return r instanceof HTMLVideoElement}catch{return!1}}function Wr(r){try{return r instanceof HTMLCanvasElement}catch{return!1}}function Ur(r){try{return r instanceof ImageBitmap}catch{return!1}}function Lr(r){try{return r instanceof OffscreenCanvas}catch{return!1}}function Hr(r){try{return r instanceof VideoFrame}catch{return!1}}function Nr(r){try{return r instanceof Blob}catch{return!1}}function jo(r){try{return r instanceof ImageData}catch{return!1}}function Ro(r,i){try{const a=new OffscreenCanvas(r,i);if(a.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return a;throw void 0}catch{const c=document.createElement("canvas");return c.width=r,c.height=i,c}}async function Vr(r){if(Rr(r)&&!await Uo(r))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Fr(r)&&!await Lo(r))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Hr(r)&&Ho(r))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Ir(r)&&(r.readyState===0||r.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Ur(r)&&Vo(r))throw new DOMException("The image source is detached.","InvalidStateError");const{width:i,height:a}=Do(r);if(i===0||a===0)return null;const c=Ro(i,a).getContext("2d");c.drawImage(r,0,0);try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Fo(r){let i;try{if(globalThis.createImageBitmap)i=await createImageBitmap(r);else if(globalThis.Image){i=new Image;let a="";try{a=URL.createObjectURL(r),i.src=a,await i.decode()}finally{URL.revokeObjectURL(a)}}else return r}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Vr(i)}function Io(r){const{width:i,height:a}=r;if(i===0||a===0)return null;const c=r.getContext("2d");try{return c.getImageData(0,0,i,a)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Wo(r){if(Nr(r))return await Fo(r);if(jo(r)){if(No(r))throw new DOMException("The image data has been detached.","InvalidStateError");return r}return Wr(r)||Lr(r)?Io(r):await Vr(r)}async function Uo(r){try{return await r.decode(),!0}catch{return!1}}async function Lo(r){var i;try{return await((i=r.decode)==null?void 0:i.call(r)),!0}catch{return!1}}function Ho(r){return r.format===null}function No(r){return r.data.buffer.byteLength===0}function Vo(r){return r.width===0&&r.height===0}function Tr(r,i){return r instanceof DOMException?new DOMException(`${i}: ${r.message}`,r.name):r instanceof Error?new r.constructor(`${i}: ${r.message}`):new Error(`${i}: ${r}`)}const Sr=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function Bo(r){return r.join("|")}function zo(r){const i=$r(r);let a=0,c=Sr.length-1;for(;a<=c;){const f=Math.floor((a+c)/2),p=Sr[f],m=$r(p);if(m===i)return p;m<i?a=f+1:c=f-1}return"None"}function $r(r){return r.toLowerCase().replace(/_-\[\]/g,"")}function qo(r,i){return r.Binarizer[i]}function Jo(r,i){return r.CharacterSet[i]}const Yo=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Go(r){return Yo[r.value]}function Qo(r,i){return r.EanAddOnSymbol[i]}function Xo(r,i){return r.TextMode[i]}const Me={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function Br(r,i){return{...i,formats:Bo(i.formats),binarizer:qo(r,i.binarizer),eanAddOnSymbol:Qo(r,i.eanAddOnSymbol),textMode:Xo(r,i.textMode),characterSet:Jo(r,i.characterSet)}}function zr(r){return{...r,format:zo(r.format),eccLevel:r.eccLevel,contentType:Go(r.contentType)}}const Ko={locateFile:(r,i)=>{const a=r.match(/_(.+?)\.wasm$/);return a?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.1.3/dist/${a[1]}/${r}`:i+r}};let Pr=new WeakMap;function Vt(r,i){var a;const c=Pr.get(r);if(c!=null&&c.modulePromise&&i===void 0)return c.modulePromise;const f=(a=c==null?void 0:c.moduleOverrides)!=null?a:Ko,p=r({...f});return Pr.set(r,{moduleOverrides:f,modulePromise:p}),p}async function Zo(r,i,a=Me){const c={...Me,...a},f=await Vt(r),{size:p}=i,m=new Uint8Array(await i.arrayBuffer()),S=f._malloc(p);f.HEAPU8.set(m,S);const h=f.readBarcodesFromImage(S,p,Br(f,c));f._free(S);const w=[];for(let C=0;C<h.size();++C)w.push(zr(h.get(C)));return w}async function ei(r,i,a=Me){const c={...Me,...a},f=await Vt(r),{data:p,width:m,height:S,data:{byteLength:h}}=i,w=f._malloc(h);f.HEAPU8.set(p,w);const C=f.readBarcodesFromPixmap(w,m,S,Br(f,c));f._free(w);const b=[];for(let R=0;R<C.size();++R)b.push(zr(C.get(R)));return b}({...Me,formats:[...Me.formats]});var Bt=(()=>{var r=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(i={}){var a=i,c,f;a.ready=new Promise((e,t)=>{c=e,f=t});var p=Object.assign({},a),m="./this.program",S=typeof window=="object",h=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var w="";function C(e){return a.locateFile?a.locateFile(e,w):w+e}var b;(S||h)&&(h?w=self.location.href:typeof document<"u"&&document.currentScript&&(w=document.currentScript.src),r&&(w=r),w.indexOf("blob:")!==0?w=w.substr(0,w.replace(/[?#].*/,"").lastIndexOf("/")+1):w="",h&&(b=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),a.print||console.log.bind(console);var R=a.printErr||console.error.bind(console);Object.assign(a,p),p=null,a.arguments&&a.arguments,a.thisProgram&&(m=a.thisProgram),a.quit&&a.quit;var F;a.wasmBinary&&(F=a.wasmBinary),typeof WebAssembly!="object"&&ee("no native wasm support detected");var k,W=!1,x,$,j,A,P,E,K,ne;function Te(){var e=k.buffer;a.HEAP8=x=new Int8Array(e),a.HEAP16=j=new Int16Array(e),a.HEAPU8=$=new Uint8Array(e),a.HEAPU16=A=new Uint16Array(e),a.HEAP32=P=new Int32Array(e),a.HEAPU32=E=new Uint32Array(e),a.HEAPF32=K=new Float32Array(e),a.HEAPF64=ne=new Float64Array(e)}var Se=[],Ae=[],ke=[];function Be(){if(a.preRun)for(typeof a.preRun=="function"&&(a.preRun=[a.preRun]);a.preRun.length;)mt(a.preRun.shift());Ct(Se)}function pt(){Ct(Ae)}function vt(){if(a.postRun)for(typeof a.postRun=="function"&&(a.postRun=[a.postRun]);a.postRun.length;)De(a.postRun.shift());Ct(ke)}function mt(e){Se.unshift(e)}function yt(e){Ae.unshift(e)}function De(e){ke.unshift(e)}var oe=0,ge=null;function gt(e){var t;oe++,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,oe)}function he(e){var t;if(oe--,(t=a.monitorRunDependencies)===null||t===void 0||t.call(a,oe),oe==0&&ge){var n=ge;ge=null,n()}}function ee(e){var t;(t=a.onAbort)===null||t===void 0||t.call(a,e),e="Aborted("+e+")",R(e),W=!0,e+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(e);throw f(n),n}var wt="data:application/octet-stream;base64,",ze=e=>e.startsWith(wt),pe;pe="zxing_reader.wasm",ze(pe)||(pe=C(pe));function qe(e){if(e==pe&&F)return new Uint8Array(F);if(b)return b(e);throw"both async and sync fetching of the wasm failed"}function bt(e){return!F&&(S||h)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()}).catch(()=>qe(e)):Promise.resolve().then(()=>qe(e))}function Je(e,t,n){return bt(e).then(o=>WebAssembly.instantiate(o,t)).then(o=>o).then(n,o=>{R(`failed to asynchronously prepare wasm: ${o}`),ee(o)})}function sn(e,t,n,o){return!e&&typeof WebAssembly.instantiateStreaming=="function"&&!ze(t)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(s=>{var u=WebAssembly.instantiateStreaming(s,n);return u.then(o,function(l){return R(`wasm streaming compile failed: ${l}`),R("falling back to ArrayBuffer instantiation"),Je(t,n,o)})}):Je(t,n,o)}function cn(){var e={a:Ga};function t(o,s){return J=o.exports,k=J.ia,Te(),er=J.ma,yt(J.ja),he(),J}gt();function n(o){t(o.instance)}if(a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(o){R(`Module.instantiateWasm callback failed with error: ${o}`),f(o)}return sn(F,pe,e,n).catch(f),{}}var Ct=e=>{for(;e.length>0;)e.shift()(a)};a.noExitRuntime;var Ye=[],Ge=0,un=e=>{var t=new _t(e);return t.get_caught()||(t.set_caught(!0),Ge--),t.set_rethrown(!1),Ye.push(t),pr(t.excPtr),t.get_exception_ptr()},ue=0,ln=()=>{L(0,0);var e=Ye.pop();hr(e.excPtr),ue=0};function _t(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(t){E[this.ptr+4>>2]=t},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(t){E[this.ptr+8>>2]=t},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_caught=function(t){t=t?1:0,x[this.ptr+12>>0]=t},this.get_caught=function(){return x[this.ptr+12>>0]!=0},this.set_rethrown=function(t){t=t?1:0,x[this.ptr+13>>0]=t},this.get_rethrown=function(){return x[this.ptr+13>>0]!=0},this.init=function(t,n){this.set_adjusted_ptr(0),this.set_type(t),this.set_destructor(n)},this.set_adjusted_ptr=function(t){E[this.ptr+16>>2]=t},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){var t=mr(this.get_type());if(t)return E[this.excPtr>>2];var n=this.get_adjusted_ptr();return n!==0?n:this.excPtr}}var dn=e=>{throw ue||(ue=e),ue},Tt=e=>{var t=ue;if(!t)return Le(0),0;var n=new _t(t);n.set_adjusted_ptr(t);var o=n.get_type();if(!o)return Le(0),t;for(var s in e){var u=e[s];if(u===0||u===o)break;var l=n.ptr+16;if(vr(u,o,l))return Le(u),t}return Le(o),t},fn=()=>Tt([]),hn=e=>Tt([e]),pn=(e,t)=>Tt([e,t]),vn=()=>{var e=Ye.pop();e||ee("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(Ye.push(e),e.set_rethrown(!0),e.set_caught(!1),Ge++),ue=t,ue},mn=(e,t,n)=>{var o=new _t(e);throw o.init(t,n),ue=e,Ge++,ue},yn=()=>Ge,Qe={},St=e=>{for(;e.length;){var t=e.pop(),n=e.pop();n(t)}};function $t(e){return this.fromWireType(P[e>>2])}var $e={},we={},Xe={},zt,Ke=e=>{throw new zt(e)},be=(e,t,n)=>{e.forEach(function(d){Xe[d]=t});function o(d){var v=n(d);v.length!==e.length&&Ke("Mismatched type converter count");for(var g=0;g<e.length;++g)ie(e[g],v[g])}var s=new Array(t.length),u=[],l=0;t.forEach((d,v)=>{we.hasOwnProperty(d)?s[v]=we[d]:(u.push(d),$e.hasOwnProperty(d)||($e[d]=[]),$e[d].push(()=>{s[v]=we[d],++l,l===u.length&&o(s)}))}),u.length===0&&o(s)},gn=e=>{var t=Qe[e];delete Qe[e];var n=t.rawConstructor,o=t.rawDestructor,s=t.fields,u=s.map(l=>l.getterReturnType).concat(s.map(l=>l.setterArgumentType));be([e],u,l=>{var d={};return s.forEach((v,g)=>{var _=v.fieldName,O=l[g],M=v.getter,D=v.getterContext,H=l[g+s.length],z=v.setter,U=v.setterContext;d[_]={read:Q=>O.fromWireType(M(D,Q)),write:(Q,y)=>{var T=[];z(U,Q,H.toWireType(T,y)),St(T)}}}),[{name:t.name,fromWireType:v=>{var g={};for(var _ in d)g[_]=d[_].read(v);return o(v),g},toWireType:(v,g)=>{for(var _ in d)if(!(_ in g))throw new TypeError(`Missing field: "${_}"`);var O=n();for(_ in d)d[_].write(O,g[_]);return v!==null&&v.push(o,O),O},argPackAdvance:se,readValueFromPointer:$t,destructorFunction:o}]})},wn=(e,t,n,o,s)=>{},bn=()=>{for(var e=new Array(256),t=0;t<256;++t)e[t]=String.fromCharCode(t);qt=e},qt,G=e=>{for(var t="",n=e;$[n];)t+=qt[$[n++]];return t},Pe,I=e=>{throw new Pe(e)};function Cn(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var o=t.name;if(e||I(`type "${o}" must have a positive integer typeid pointer`),we.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;I(`Cannot register type '${o}' twice`)}if(we[e]=t,delete Xe[e],$e.hasOwnProperty(e)){var s=$e[e];delete $e[e],s.forEach(u=>u())}}function ie(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Cn(e,t,n)}var se=8,_n=(e,t,n,o)=>{t=G(t),ie(e,{name:t,fromWireType:function(s){return!!s},toWireType:function(s,u){return u?n:o},argPackAdvance:se,readValueFromPointer:function(s){return this.fromWireType($[s])},destructorFunction:null})},Tn=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Pt=e=>{function t(n){return n.$$.ptrType.registeredClass.name}I(t(e)+" instance already deleted")},Et=!1,Jt=e=>{},Sn=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Yt=e=>{e.count.value-=1;var t=e.count.value===0;t&&Sn(e)},Gt=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var o=Gt(e,t,n.baseClass);return o===null?null:n.downcast(o)},Qt={},$n=()=>Object.keys(Fe).length,Pn=()=>{var e=[];for(var t in Fe)Fe.hasOwnProperty(t)&&e.push(Fe[t]);return e},je=[],Ot=()=>{for(;je.length;){var e=je.pop();e.$$.deleteScheduled=!1,e.delete()}},Re,En=e=>{Re=e,je.length&&Re&&Re(Ot)},On=()=>{a.getInheritedInstanceCount=$n,a.getLiveInheritedInstances=Pn,a.flushPendingDeletes=Ot,a.setDelayFunction=En},Fe={},xn=(e,t)=>{for(t===void 0&&I("ptr should not be undefined");e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},Mn=(e,t)=>(t=xn(e,t),Fe[t]),Ze=(e,t)=>{(!t.ptrType||!t.ptr)&&Ke("makeClassHandle requires ptr and ptrType");var n=!!t.smartPtrType,o=!!t.smartPtr;return n!==o&&Ke("Both smartPtrType and smartPtr must be specified"),t.count={value:1},Ie(Object.create(e,{$$:{value:t,writable:!0}}))};function An(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=Mn(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var o=n.clone();return this.destructor(e),o}function s(){return this.isSmartPointer?Ze(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):Ze(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var u=this.registeredClass.getActualType(t),l=Qt[u];if(!l)return s.call(this);var d;this.isConst?d=l.constPointerType:d=l.pointerType;var v=Gt(t,this.registeredClass,d.registeredClass);return v===null?s.call(this):this.isSmartPointer?Ze(d.registeredClass.instancePrototype,{ptrType:d,ptr:v,smartPtrType:this,smartPtr:e}):Ze(d.registeredClass.instancePrototype,{ptrType:d,ptr:v})}var Ie=e=>typeof FinalizationRegistry>"u"?(Ie=t=>t,e):(Et=new FinalizationRegistry(t=>{Yt(t.$$)}),Ie=t=>{var n=t.$$,o=!!n.smartPtr;if(o){var s={$$:n};Et.register(t,s,t)}return t},Jt=t=>Et.unregister(t),Ie(e)),kn=()=>{Object.assign(et.prototype,{isAliasOf(e){if(!(this instanceof et)||!(e instanceof et))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var o=e.$$.ptrType.registeredClass,s=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;o.baseClass;)s=o.upcast(s),o=o.baseClass;return t===o&&n===s},clone(){if(this.$$.ptr||Pt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=Ie(Object.create(Object.getPrototypeOf(this),{$$:{value:Tn(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&I("Object already scheduled for deletion"),Jt(this),Yt(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Pt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&I("Object already scheduled for deletion"),je.push(this),je.length===1&&Re&&Re(Ot),this.$$.deleteScheduled=!0,this}})};function et(){}var We=(e,t)=>Object.defineProperty(t,"name",{value:e}),Xt=(e,t,n)=>{if(e[t].overloadTable===void 0){var o=e[t];e[t]=function(){return e[t].overloadTable.hasOwnProperty(arguments.length)||I(`Function '${n}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[arguments.length].apply(this,arguments)},e[t].overloadTable=[],e[t].overloadTable[o.argCount]=o}},xt=(e,t,n)=>{a.hasOwnProperty(e)?((n===void 0||a[e].overloadTable!==void 0&&a[e].overloadTable[n]!==void 0)&&I(`Cannot register public name '${e}' twice`),Xt(a,e,e),a.hasOwnProperty(n)&&I(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),a[e].overloadTable[n]=t):(a[e]=t,n!==void 0&&(a[e].numArguments=n))},Dn=48,jn=57,Rn=e=>{if(e===void 0)return"_unknown";e=e.replace(/[^a-zA-Z0-9_]/g,"$");var t=e.charCodeAt(0);return t>=Dn&&t<=jn?`_${e}`:e};function Fn(e,t,n,o,s,u,l,d){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=o,this.baseClass=s,this.getActualType=u,this.upcast=l,this.downcast=d,this.pureVirtualFunctions=[]}var Mt=(e,t,n)=>{for(;t!==n;)t.upcast||I(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e};function In(e,t){if(t===null)return this.isReference&&I(`null is not a valid ${this.name}`),0;t.$$||I(`Cannot pass "${Rt(t)}" as a ${this.name}`),t.$$.ptr||I(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Mt(t.$$.ptr,n,this.registeredClass);return o}function Wn(e,t){var n;if(t===null)return this.isReference&&I(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;(!t||!t.$$)&&I(`Cannot pass "${Rt(t)}" as a ${this.name}`),t.$$.ptr||I(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&I(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var o=t.$$.ptrType.registeredClass;if(n=Mt(t.$$.ptr,o,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&I("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:I(`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 s=t.clone();n=this.rawShare(n,le.toHandle(()=>s.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:I("Unsupporting sharing policy")}return n}function Un(e,t){if(t===null)return this.isReference&&I(`null is not a valid ${this.name}`),0;t.$$||I(`Cannot pass "${Rt(t)}" as a ${this.name}`),t.$$.ptr||I(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&I(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass,o=Mt(t.$$.ptr,n,this.registeredClass);return o}function Kt(e){return this.fromWireType(E[e>>2])}var Ln=()=>{Object.assign(tt.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var t;(t=this.rawDestructor)===null||t===void 0||t.call(this,e)},argPackAdvance:se,readValueFromPointer:Kt,deleteObject(e){e!==null&&e.delete()},fromWireType:An})};function tt(e,t,n,o,s,u,l,d,v,g,_){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=o,this.isSmartPointer=s,this.pointeeType=u,this.sharingPolicy=l,this.rawGetPointee=d,this.rawConstructor=v,this.rawShare=g,this.rawDestructor=_,!s&&t.baseClass===void 0?o?(this.toWireType=In,this.destructorFunction=null):(this.toWireType=Un,this.destructorFunction=null):this.toWireType=Wn}var Zt=(e,t,n)=>{a.hasOwnProperty(e)||Ke("Replacing nonexistant public symbol"),a[e].overloadTable!==void 0&&n!==void 0?a[e].overloadTable[n]=t:(a[e]=t,a[e].argCount=n)},Hn=(e,t,n)=>{var o=a["dynCall_"+e];return n&&n.length?o.apply(null,[t].concat(n)):o.call(null,t)},rt=[],er,N=e=>{var t=rt[e];return t||(e>=rt.length&&(rt.length=e+1),rt[e]=t=er.get(e)),t},Nn=(e,t,n)=>{if(e.includes("j"))return Hn(e,t,n);var o=N(t).apply(null,n);return o},Vn=(e,t)=>{var n=[];return function(){return n.length=0,Object.assign(n,arguments),Nn(e,t,n)}},ae=(e,t)=>{e=G(e);function n(){return e.includes("j")?Vn(e,t):N(t)}var o=n();return typeof o!="function"&&I(`unknown function pointer with signature ${e}: ${t}`),o},Bn=(e,t)=>{var n=We(t,function(o){this.name=t,this.message=o;var s=new Error(o).stack;s!==void 0&&(this.stack=this.toString()+`
- `+s.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},n},tr,rr=e=>{var t=fr(e),n=G(t);return de(t),n},nt=(e,t)=>{var n=[],o={};function s(u){if(!o[u]&&!we[u]){if(Xe[u]){Xe[u].forEach(s);return}n.push(u),o[u]=!0}}throw t.forEach(s),new tr(`${e}: `+n.map(rr).join([", "]))},zn=(e,t,n,o,s,u,l,d,v,g,_,O,M)=>{_=G(_),u=ae(s,u),d&&(d=ae(l,d)),g&&(g=ae(v,g)),M=ae(O,M);var D=Rn(_);xt(D,function(){nt(`Cannot construct ${_} due to unbound types`,[o])}),be([e,t,n],o?[o]:[],function(H){H=H[0];var z,U;o?(z=H.registeredClass,U=z.instancePrototype):U=et.prototype;var Q=We(_,function(){if(Object.getPrototypeOf(this)!==y)throw new Pe("Use 'new' to construct "+_);if(T.constructor_body===void 0)throw new Pe(_+" has no accessible constructor");var br=T.constructor_body[arguments.length];if(br===void 0)throw new Pe(`Tried to invoke ctor of ${_} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(T.constructor_body).toString()}) parameters instead!`);return br.apply(this,arguments)}),y=Object.create(U,{constructor:{value:Q}});Q.prototype=y;var T=new Fn(_,Q,y,M,z,u,d,g);if(T.baseClass){var q,Y;(Y=(q=T.baseClass).__derivedClasses)!==null&&Y!==void 0||(q.__derivedClasses=[]),T.baseClass.__derivedClasses.push(T)}var Ee=new tt(_,T,!0,!1,!1),it=new tt(_+"*",T,!1,!1,!1),wr=new tt(_+" const*",T,!1,!0,!1);return Qt[e]={pointerType:it,constPointerType:wr},Zt(D,Q),[Ee,it,wr]})},At=(e,t)=>{for(var n=[],o=0;o<e;o++)n.push(E[t+o*4>>2]);return n};function qn(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function kt(e,t,n,o,s,u){var l=t.length;l<2&&I("argTypes array size mismatch! Must at least get return value and 'this' types!");var d=t[1]!==null&&n!==null,v=qn(t),g=t[0].name!=="void",_=l-2,O=new Array(_),M=[],D=[],H=function(){arguments.length!==_&&I(`function ${e} called with ${arguments.length} arguments, expected ${_}`),D.length=0;var z;M.length=d?2:1,M[0]=s,d&&(z=t[1].toWireType(D,this),M[1]=z);for(var U=0;U<_;++U)O[U]=t[U+2].toWireType(D,arguments[U]),M.push(O[U]);var Q=o.apply(null,M);function y(T){if(v)St(D);else for(var q=d?1:2;q<t.length;q++){var Y=q===1?z:O[q-2];t[q].destructorFunction!==null&&t[q].destructorFunction(Y)}if(g)return t[0].fromWireType(T)}return y(Q)};return We(e,H)}var Jn=(e,t,n,o,s,u)=>{var l=At(t,n);s=ae(o,s),be([],[e],function(d){d=d[0];var v=`constructor ${d.name}`;if(d.registeredClass.constructor_body===void 0&&(d.registeredClass.constructor_body=[]),d.registeredClass.constructor_body[t-1]!==void 0)throw new Pe(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${d.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return d.registeredClass.constructor_body[t-1]=()=>{nt(`Cannot construct ${d.name} due to unbound types`,l)},be([],l,g=>(g.splice(1,0,null),d.registeredClass.constructor_body[t-1]=kt(v,g,null,s,u),[])),[]})},nr=e=>{e=e.trim();const t=e.indexOf("(");return t!==-1?e.substr(0,t):e},Yn=(e,t,n,o,s,u,l,d,v)=>{var g=At(n,o);t=G(t),t=nr(t),u=ae(s,u),be([],[e],function(_){_=_[0];var O=`${_.name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),d&&_.registeredClass.pureVirtualFunctions.push(t);function M(){nt(`Cannot call ${O} due to unbound types`,g)}var D=_.registeredClass.instancePrototype,H=D[t];return H===void 0||H.overloadTable===void 0&&H.className!==_.name&&H.argCount===n-2?(M.argCount=n-2,M.className=_.name,D[t]=M):(Xt(D,t,O),D[t].overloadTable[n-2]=M),be([],g,function(z){var U=kt(O,z,_,u,l);return D[t].overloadTable===void 0?(U.argCount=n-2,D[t]=U):D[t].overloadTable[n-2]=U,[]}),[]})};function Gn(){Object.assign(ar.prototype,{get(e){return this.allocated[e]},has(e){return this.allocated[e]!==void 0},allocate(e){var t=this.freelist.pop()||this.allocated.length;return this.allocated[t]=e,t},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function ar(){this.allocated=[void 0],this.freelist=[]}var re=new ar,Dt=e=>{e>=re.reserved&&--re.get(e).refcount===0&&re.free(e)},Qn=()=>{for(var e=0,t=re.reserved;t<re.allocated.length;++t)re.allocated[t]!==void 0&&++e;return e},Xn=()=>{re.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),re.reserved=re.allocated.length,a.count_emval_handles=Qn},le={toValue:e=>(e||I("Cannot use deleted val. handle = "+e),re.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return re.allocate({refcount:1,value:e})}}},Kn=(e,t)=>{t=G(t),ie(e,{name:t,fromWireType:n=>{var o=le.toValue(n);return Dt(n),o},toWireType:(n,o)=>le.toHandle(o),argPackAdvance:se,readValueFromPointer:$t,destructorFunction:null})},Zn=(e,t,n)=>{switch(t){case 1:return n?function(o){return this.fromWireType(x[o>>0])}:function(o){return this.fromWireType($[o>>0])};case 2:return n?function(o){return this.fromWireType(j[o>>1])}:function(o){return this.fromWireType(A[o>>1])};case 4:return n?function(o){return this.fromWireType(P[o>>2])}:function(o){return this.fromWireType(E[o>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},ea=(e,t,n,o)=>{t=G(t);function s(){}s.values={},ie(e,{name:t,constructor:s,fromWireType:function(u){return this.constructor.values[u]},toWireType:(u,l)=>l.value,argPackAdvance:se,readValueFromPointer:Zn(t,n,o),destructorFunction:null}),xt(t,s)},jt=(e,t)=>{var n=we[e];return n===void 0&&I(t+" has unknown type "+rr(e)),n},ta=(e,t,n)=>{var o=jt(e,"enum");t=G(t);var s=o.constructor,u=Object.create(o.constructor.prototype,{value:{value:n},constructor:{value:We(`${o.name}_${t}`,function(){})}});s.values[n]=u,s[t]=u},Rt=e=>{if(e===null)return"null";var t=typeof e;return t==="object"||t==="array"||t==="function"?e.toString():""+e},ra=(e,t)=>{switch(t){case 4:return function(n){return this.fromWireType(K[n>>2])};case 8:return function(n){return this.fromWireType(ne[n>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},na=(e,t,n)=>{t=G(t),ie(e,{name:t,fromWireType:o=>o,toWireType:(o,s)=>s,argPackAdvance:se,readValueFromPointer:ra(t,n),destructorFunction:null})},aa=(e,t,n,o,s,u,l)=>{var d=At(t,n);e=G(e),e=nr(e),s=ae(o,s),xt(e,function(){nt(`Cannot call ${e} due to unbound types`,d)},t-1),be([],d,function(v){var g=[v[0],null].concat(v.slice(1));return Zt(e,kt(e,g,null,s,u),t-1),[]})},oa=(e,t,n)=>{switch(t){case 1:return n?o=>x[o>>0]:o=>$[o>>0];case 2:return n?o=>j[o>>1]:o=>A[o>>1];case 4:return n?o=>P[o>>2]:o=>E[o>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},ia=(e,t,n,o,s)=>{t=G(t);var u=_=>_;if(o===0){var l=32-8*n;u=_=>_<<l>>>l}var d=t.includes("unsigned"),v=(_,O)=>{},g;d?g=function(_,O){return v(O,this.name),O>>>0}:g=function(_,O){return v(O,this.name),O},ie(e,{name:t,fromWireType:u,toWireType:g,argPackAdvance:se,readValueFromPointer:oa(t,n,o!==0),destructorFunction:null})},sa=(e,t,n)=>{var o=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],s=o[t];function u(l){var d=E[l>>2],v=E[l+4>>2];return new s(x.buffer,v,d)}n=G(n),ie(e,{name:n,fromWireType:u,argPackAdvance:se,readValueFromPointer:u},{ignoreDuplicateRegistrations:!0})},or=(e,t,n,o)=>{if(!(o>0))return 0;for(var s=n,u=n+o-1,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var v=e.charCodeAt(++l);d=65536+((d&1023)<<10)|v&1023}if(d<=127){if(n>=u)break;t[n++]=d}else if(d<=2047){if(n+1>=u)break;t[n++]=192|d>>6,t[n++]=128|d&63}else if(d<=65535){if(n+2>=u)break;t[n++]=224|d>>12,t[n++]=128|d>>6&63,t[n++]=128|d&63}else{if(n+3>=u)break;t[n++]=240|d>>18,t[n++]=128|d>>12&63,t[n++]=128|d>>6&63,t[n++]=128|d&63}}return t[n]=0,n-s},ca=(e,t,n)=>or(e,$,t,n),ir=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o<=127?t++:o<=2047?t+=2:o>=55296&&o<=57343?(t+=4,++n):t+=3}return t},sr=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,ua=(e,t,n)=>{for(var o=t+n,s=t;e[s]&&!(s>=o);)++s;if(s-t>16&&e.buffer&&sr)return sr.decode(e.subarray(t,s));for(var u="";t<s;){var l=e[t++];if(!(l&128)){u+=String.fromCharCode(l);continue}var d=e[t++]&63;if((l&224)==192){u+=String.fromCharCode((l&31)<<6|d);continue}var v=e[t++]&63;if((l&240)==224?l=(l&15)<<12|d<<6|v:l=(l&7)<<18|d<<12|v<<6|e[t++]&63,l<65536)u+=String.fromCharCode(l);else{var g=l-65536;u+=String.fromCharCode(55296|g>>10,56320|g&1023)}}return u},Ft=(e,t)=>e?ua($,e,t):"",la=(e,t)=>{t=G(t);var n=t==="std::string";ie(e,{name:t,fromWireType(o){var s=E[o>>2],u=o+4,l;if(n)for(var d=u,v=0;v<=s;++v){var g=u+v;if(v==s||$[g]==0){var _=g-d,O=Ft(d,_);l===void 0?l=O:(l+="\0",l+=O),d=g+1}}else{for(var M=new Array(s),v=0;v<s;++v)M[v]=String.fromCharCode($[u+v]);l=M.join("")}return de(o),l},toWireType(o,s){s instanceof ArrayBuffer&&(s=new Uint8Array(s));var u,l=typeof s=="string";l||s instanceof Uint8Array||s instanceof Uint8ClampedArray||s instanceof Int8Array||I("Cannot pass non-string to std::string"),n&&l?u=ir(s):u=s.length;var d=Ut(4+u+1),v=d+4;if(E[d>>2]=u,n&&l)ca(s,v,u+1);else if(l)for(var g=0;g<u;++g){var _=s.charCodeAt(g);_>255&&(de(v),I("String has UTF-16 code units that do not fit in 8 bits")),$[v+g]=_}else for(var g=0;g<u;++g)$[v+g]=s[g];return o!==null&&o.push(de,d),d},argPackAdvance:se,readValueFromPointer:Kt,destructorFunction(o){de(o)}})},cr=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,da=(e,t)=>{for(var n=e,o=n>>1,s=o+t/2;!(o>=s)&&A[o];)++o;if(n=o<<1,n-e>32&&cr)return cr.decode($.subarray(e,n));for(var u="",l=0;!(l>=t/2);++l){var d=j[e+l*2>>1];if(d==0)break;u+=String.fromCharCode(d)}return u},fa=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<2)return 0;n-=2;for(var s=t,u=n<e.length*2?n/2:e.length,l=0;l<u;++l){var d=e.charCodeAt(l);j[t>>1]=d,t+=2}return j[t>>1]=0,t-s},ha=e=>e.length*2,pa=(e,t)=>{for(var n=0,o="";!(n>=t/4);){var s=P[e+n*4>>2];if(s==0)break;if(++n,s>=65536){var u=s-65536;o+=String.fromCharCode(55296|u>>10,56320|u&1023)}else o+=String.fromCharCode(s)}return o},va=(e,t,n)=>{var o;if((o=n)!==null&&o!==void 0||(n=2147483647),n<4)return 0;for(var s=t,u=s+n-4,l=0;l<e.length;++l){var d=e.charCodeAt(l);if(d>=55296&&d<=57343){var v=e.charCodeAt(++l);d=65536+((d&1023)<<10)|v&1023}if(P[t>>2]=d,t+=4,t+4>u)break}return P[t>>2]=0,t-s},ma=e=>{for(var t=0,n=0;n<e.length;++n){var o=e.charCodeAt(n);o>=55296&&o<=57343&&++n,t+=4}return t},ya=(e,t,n)=>{n=G(n);var o,s,u,l,d;t===2?(o=da,s=fa,l=ha,u=()=>A,d=1):t===4&&(o=pa,s=va,l=ma,u=()=>E,d=2),ie(e,{name:n,fromWireType:v=>{for(var g=E[v>>2],_=u(),O,M=v+4,D=0;D<=g;++D){var H=v+4+D*t;if(D==g||_[H>>d]==0){var z=H-M,U=o(M,z);O===void 0?O=U:(O+="\0",O+=U),M=H+t}}return de(v),O},toWireType:(v,g)=>{typeof g!="string"&&I(`Cannot pass non-string to C++ string type ${n}`);var _=l(g),O=Ut(4+_+t);return E[O>>2]=_>>d,s(g,O+4,_+t),v!==null&&v.push(de,O),O},argPackAdvance:se,readValueFromPointer:$t,destructorFunction(v){de(v)}})},ga=(e,t,n,o,s,u)=>{Qe[e]={name:G(t),rawConstructor:ae(n,o),rawDestructor:ae(s,u),fields:[]}},wa=(e,t,n,o,s,u,l,d,v,g)=>{Qe[e].fields.push({fieldName:G(t),getterReturnType:n,getter:ae(o,s),getterContext:u,setterArgumentType:l,setter:ae(d,v),setterContext:g})},ba=(e,t)=>{t=G(t),ie(e,{isVoid:!0,name:t,argPackAdvance:0,fromWireType:()=>{},toWireType:(n,o)=>{}})},It=[],Ca=(e,t,n,o)=>(e=It[e],t=le.toValue(t),e(null,t,n,o)),_a={},Ta=e=>{var t=_a[e];return t===void 0?G(e):t},ur=()=>{if(typeof globalThis=="object")return globalThis;function e(t){t.$$$embind_global$$$=t;var n=typeof $$$embind_global$$$=="object"&&t.$$$embind_global$$$==t;return n||delete t.$$$embind_global$$$,n}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Sa=e=>e===0?le.toHandle(ur()):(e=Ta(e),le.toHandle(ur()[e])),$a=e=>{var t=It.length;return It.push(e),t},Pa=(e,t)=>{for(var n=new Array(e),o=0;o<e;++o)n[o]=jt(E[t+o*4>>2],"parameter "+o);return n},Ea=Reflect.construct,Oa=(e,t,n)=>{var o=[],s=e.toWireType(o,n);return o.length&&(E[t>>2]=le.toHandle(o)),s},xa=(e,t,n)=>{var o=Pa(e,t),s=o.shift();e--;var u=new Array(e),l=(v,g,_,O)=>{for(var M=0,D=0;D<e;++D)u[D]=o[D].readValueFromPointer(O+M),M+=o[D].argPackAdvance;for(var H=n===1?Ea(g,u):g.apply(v,u),D=0;D<e;++D){var z,U;(z=(U=o[D]).deleteObject)===null||z===void 0||z.call(U,u[D])}return Oa(s,_,H)},d=`methodCaller<(${o.map(v=>v.name).join(", ")}) => ${s.name}>`;return $a(We(d,l))},Ma=e=>{e>4&&(re.get(e).refcount+=1)},Aa=e=>{var t=le.toValue(e);St(t),Dt(e)},ka=(e,t)=>{e=jt(e,"_emval_take_value");var n=e.readValueFromPointer(t);return le.toHandle(n)},Da=()=>{ee("")},ja=(e,t,n)=>$.copyWithin(e,t,t+n),Ra=()=>2147483648,Fa=e=>{var t=k.buffer,n=(e-t.byteLength+65535)/65536;try{return k.grow(n),Te(),1}catch{}},Ia=e=>{var t=$.length;e>>>=0;var n=Ra();if(e>n)return!1;for(var o=(v,g)=>v+(g-v%g)%g,s=1;s<=4;s*=2){var u=t*(1+.2/s);u=Math.min(u,e+100663296);var l=Math.min(n,o(Math.max(e,u),65536)),d=Fa(l);if(d)return!0}return!1},Wt={},Wa=()=>m||"./this.program",Ue=()=>{if(!Ue.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Wa()};for(var n in Wt)Wt[n]===void 0?delete t[n]:t[n]=Wt[n];var o=[];for(var n in t)o.push(`${n}=${t[n]}`);Ue.strings=o}return Ue.strings},Ua=(e,t)=>{for(var n=0;n<e.length;++n)x[t++>>0]=e.charCodeAt(n);x[t>>0]=0},La=(e,t)=>{var n=0;return Ue().forEach((o,s)=>{var u=t+n;E[e+s*4>>2]=u,Ua(o,u),n+=o.length+1}),0},Ha=(e,t)=>{var n=Ue();E[e>>2]=n.length;var o=0;return n.forEach(s=>o+=s.length+1),E[t>>2]=o,0},Na=e=>e,at=e=>e%4===0&&(e%100!==0||e%400===0),Va=(e,t)=>{for(var n=0,o=0;o<=t;n+=e[o++]);return n},lr=[31,29,31,30,31,30,31,31,30,31,30,31],dr=[31,28,31,30,31,30,31,31,30,31,30,31],Ba=(e,t)=>{for(var n=new Date(e.getTime());t>0;){var o=at(n.getFullYear()),s=n.getMonth(),u=(o?lr:dr)[s];if(t>u-n.getDate())t-=u-n.getDate()+1,n.setDate(1),s<11?n.setMonth(s+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1));else return n.setDate(n.getDate()+t),n}return n};function za(e,t,n){var o=ir(e)+1,s=new Array(o);return or(e,s,0,s.length),s}var qa=(e,t)=>{x.set(e,t)},Ja=(e,t,n,o)=>{var s=E[o+40>>2],u={tm_sec:P[o>>2],tm_min:P[o+4>>2],tm_hour:P[o+8>>2],tm_mday:P[o+12>>2],tm_mon:P[o+16>>2],tm_year:P[o+20>>2],tm_wday:P[o+24>>2],tm_yday:P[o+28>>2],tm_isdst:P[o+32>>2],tm_gmtoff:P[o+36>>2],tm_zone:s?Ft(s):""},l=Ft(n),d={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var v in d)l=l.replace(new RegExp(v,"g"),d[v]);var g=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_=["January","February","March","April","May","June","July","August","September","October","November","December"];function O(y,T,q){for(var Y=typeof y=="number"?y.toString():y||"";Y.length<T;)Y=q[0]+Y;return Y}function M(y,T){return O(y,T,"0")}function D(y,T){function q(Ee){return Ee<0?-1:Ee>0?1:0}var Y;return(Y=q(y.getFullYear()-T.getFullYear()))===0&&(Y=q(y.getMonth()-T.getMonth()))===0&&(Y=q(y.getDate()-T.getDate())),Y}function H(y){switch(y.getDay()){case 0:return new Date(y.getFullYear()-1,11,29);case 1:return y;case 2:return new Date(y.getFullYear(),0,3);case 3:return new Date(y.getFullYear(),0,2);case 4:return new Date(y.getFullYear(),0,1);case 5:return new Date(y.getFullYear()-1,11,31);case 6:return new Date(y.getFullYear()-1,11,30)}}function z(y){var T=Ba(new Date(y.tm_year+1900,0,1),y.tm_yday),q=new Date(T.getFullYear(),0,4),Y=new Date(T.getFullYear()+1,0,4),Ee=H(q),it=H(Y);return D(Ee,T)<=0?D(it,T)<=0?T.getFullYear()+1:T.getFullYear():T.getFullYear()-1}var U={"%a":y=>g[y.tm_wday].substring(0,3),"%A":y=>g[y.tm_wday],"%b":y=>_[y.tm_mon].substring(0,3),"%B":y=>_[y.tm_mon],"%C":y=>{var T=y.tm_year+1900;return M(T/100|0,2)},"%d":y=>M(y.tm_mday,2),"%e":y=>O(y.tm_mday,2," "),"%g":y=>z(y).toString().substring(2),"%G":y=>z(y),"%H":y=>M(y.tm_hour,2),"%I":y=>{var T=y.tm_hour;return T==0?T=12:T>12&&(T-=12),M(T,2)},"%j":y=>M(y.tm_mday+Va(at(y.tm_year+1900)?lr:dr,y.tm_mon-1),3),"%m":y=>M(y.tm_mon+1,2),"%M":y=>M(y.tm_min,2),"%n":()=>`
- `,"%p":y=>y.tm_hour>=0&&y.tm_hour<12?"AM":"PM","%S":y=>M(y.tm_sec,2),"%t":()=>" ","%u":y=>y.tm_wday||7,"%U":y=>{var T=y.tm_yday+7-y.tm_wday;return M(Math.floor(T/7),2)},"%V":y=>{var T=Math.floor((y.tm_yday+7-(y.tm_wday+6)%7)/7);if((y.tm_wday+371-y.tm_yday-2)%7<=2&&T++,T){if(T==53){var q=(y.tm_wday+371-y.tm_yday)%7;q!=4&&(q!=3||!at(y.tm_year))&&(T=1)}}else{T=52;var Y=(y.tm_wday+7-y.tm_yday-1)%7;(Y==4||Y==5&&at(y.tm_year%400-1))&&T++}return M(T,2)},"%w":y=>y.tm_wday,"%W":y=>{var T=y.tm_yday+7-(y.tm_wday+6)%7;return M(Math.floor(T/7),2)},"%y":y=>(y.tm_year+1900).toString().substring(2),"%Y":y=>y.tm_year+1900,"%z":y=>{var T=y.tm_gmtoff,q=T>=0;return T=Math.abs(T)/60,T=T/60*100+T%60,(q?"+":"-")+("0000"+T).slice(-4)},"%Z":y=>y.tm_zone,"%%":()=>"%"};l=l.replace(/%%/g,"\0\0");for(var v in U)l.includes(v)&&(l=l.replace(new RegExp(v,"g"),U[v](u)));l=l.replace(/\0\0/g,"%");var Q=za(l);return Q.length>t?0:(qa(Q,e),Q.length-1)},Ya=(e,t,n,o,s)=>Ja(e,t,n,o);zt=a.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},bn(),Pe=a.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},kn(),On(),Ln(),tr=a.UnboundTypeError=Bn(Error,"UnboundTypeError"),Gn(),Xn();var Ga={s:un,u:ln,b:fn,g:hn,q:pn,J:vn,f:mn,V:yn,d:dn,da:gn,Q:wn,_:_n,ca:zn,ba:Jn,w:Yn,Y:Kn,x:ea,h:ta,L:na,M:aa,t:ia,o:sa,K:la,C:ya,A:ga,ea:wa,$:ba,R:Ca,ha:Dt,fa:Sa,Z:xa,N:Ma,O:Aa,aa:ka,B:Da,X:ja,W:Ia,T:La,U:Ha,E:fo,D:eo,F:lo,n:ho,a:Qa,e:ro,m:Za,k:ao,H:co,v:io,G:uo,z:vo,P:yo,l:no,j:to,c:Ka,p:Xa,I:so,r:po,i:oo,y:mo,ga:Na,S:Ya},J=cn(),de=a._free=e=>(de=a._free=J.ka)(e),Ut=a._malloc=e=>(Ut=a._malloc=J.la)(e),fr=e=>(fr=J.na)(e),L=(e,t)=>(L=J.oa)(e,t),Le=e=>(Le=J.pa)(e),V=()=>(V=J.qa)(),B=e=>(B=J.ra)(e),hr=e=>(hr=J.sa)(e),pr=e=>(pr=J.ta)(e),vr=(e,t,n)=>(vr=J.ua)(e,t,n),mr=e=>(mr=J.va)(e);a.dynCall_viijii=(e,t,n,o,s,u,l)=>(a.dynCall_viijii=J.wa)(e,t,n,o,s,u,l);var yr=a.dynCall_jiiii=(e,t,n,o,s)=>(yr=a.dynCall_jiiii=J.xa)(e,t,n,o,s);a.dynCall_iiiiij=(e,t,n,o,s,u,l)=>(a.dynCall_iiiiij=J.ya)(e,t,n,o,s,u,l),a.dynCall_iiiiijj=(e,t,n,o,s,u,l,d,v)=>(a.dynCall_iiiiijj=J.za)(e,t,n,o,s,u,l,d,v),a.dynCall_iiiiiijj=(e,t,n,o,s,u,l,d,v,g)=>(a.dynCall_iiiiiijj=J.Aa)(e,t,n,o,s,u,l,d,v,g);function Qa(e,t){var n=V();try{return N(e)(t)}catch(o){if(B(n),o!==o+0)throw o;L(1,0)}}function Xa(e,t,n,o){var s=V();try{N(e)(t,n,o)}catch(u){if(B(s),u!==u+0)throw u;L(1,0)}}function Ka(e,t,n){var o=V();try{N(e)(t,n)}catch(s){if(B(o),s!==s+0)throw s;L(1,0)}}function Za(e,t,n,o){var s=V();try{return N(e)(t,n,o)}catch(u){if(B(s),u!==u+0)throw u;L(1,0)}}function eo(e,t,n,o,s){var u=V();try{return N(e)(t,n,o,s)}catch(l){if(B(u),l!==l+0)throw l;L(1,0)}}function to(e,t){var n=V();try{N(e)(t)}catch(o){if(B(n),o!==o+0)throw o;L(1,0)}}function ro(e,t,n){var o=V();try{return N(e)(t,n)}catch(s){if(B(o),s!==s+0)throw s;L(1,0)}}function no(e){var t=V();try{N(e)()}catch(n){if(B(t),n!==n+0)throw n;L(1,0)}}function ao(e,t,n,o,s){var u=V();try{return N(e)(t,n,o,s)}catch(l){if(B(u),l!==l+0)throw l;L(1,0)}}function oo(e,t,n,o,s,u,l,d,v,g,_){var O=V();try{N(e)(t,n,o,s,u,l,d,v,g,_)}catch(M){if(B(O),M!==M+0)throw M;L(1,0)}}function io(e,t,n,o,s,u,l){var d=V();try{return N(e)(t,n,o,s,u,l)}catch(v){if(B(d),v!==v+0)throw v;L(1,0)}}function so(e,t,n,o,s){var u=V();try{N(e)(t,n,o,s)}catch(l){if(B(u),l!==l+0)throw l;L(1,0)}}function co(e,t,n,o,s,u){var l=V();try{return N(e)(t,n,o,s,u)}catch(d){if(B(l),d!==d+0)throw d;L(1,0)}}function uo(e,t,n,o,s,u,l,d){var v=V();try{return N(e)(t,n,o,s,u,l,d)}catch(g){if(B(v),g!==g+0)throw g;L(1,0)}}function lo(e,t,n,o){var s=V();try{return N(e)(t,n,o)}catch(u){if(B(s),u!==u+0)throw u;L(1,0)}}function fo(e,t,n,o){var s=V();try{return N(e)(t,n,o)}catch(u){if(B(s),u!==u+0)throw u;L(1,0)}}function ho(e){var t=V();try{return N(e)()}catch(n){if(B(t),n!==n+0)throw n;L(1,0)}}function po(e,t,n,o,s,u,l,d){var v=V();try{N(e)(t,n,o,s,u,l,d)}catch(g){if(B(v),g!==g+0)throw g;L(1,0)}}function vo(e,t,n,o,s,u,l,d,v,g,_,O){var M=V();try{return N(e)(t,n,o,s,u,l,d,v,g,_,O)}catch(D){if(B(M),D!==D+0)throw D;L(1,0)}}function mo(e,t,n,o,s,u,l,d,v,g,_,O,M,D,H,z){var U=V();try{N(e)(t,n,o,s,u,l,d,v,g,_,O,M,D,H,z)}catch(Q){if(B(U),Q!==Q+0)throw Q;L(1,0)}}function yo(e,t,n,o,s){var u=V();try{return yr(e,t,n,o,s)}catch(l){if(B(u),l!==l+0)throw l;L(1,0)}}var ot;ge=function e(){ot||gr(),ot||(ge=e)};function gr(){if(oe>0||(Be(),oe>0))return;function e(){ot||(ot=!0,a.calledRun=!0,!W&&(pt(),c(a),a.onRuntimeInitialized&&a.onRuntimeInitialized(),vt()))}a.setStatus?(a.setStatus("Running..."),setTimeout(function(){setTimeout(function(){a.setStatus("")},1),e()},1)):e()}if(a.preInit)for(typeof a.preInit=="function"&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();return gr(),i.ready}})();function ti(r){return Vt(Bt,r)}async function ri(r,i){return Zo(Bt,r,i)}async function ni(r,i){return ei(Bt,r,i)}var Ve;class qr extends EventTarget{constructor(i={}){var a;super(),xo(this,Ve,void 0);try{const c=(a=i==null?void 0:i.formats)==null?void 0:a.filter(f=>f!=="unknown");if((c==null?void 0:c.length)===0)throw new TypeError("Hint option provided, but is empty.");c==null||c.forEach(f=>{if(!dt.has(f))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${f}' is not a valid enum value of type BarcodeFormat.`)}),Mo(this,Ve,c??[]),ti().then(f=>{this.dispatchEvent(new CustomEvent("load",{detail:f}))}).catch(f=>{this.dispatchEvent(new CustomEvent("error",{detail:f}))})}catch(c){throw Tr(c,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Ao.filter(i=>i!=="unknown")}async detect(i){try{const a=await Wo(i);if(a===null)return[];let c;try{Nr(a)?c=await ri(a,{tryHarder:!0,formats:_r(this,Ve).map(f=>dt.get(f))}):c=await ni(a,{tryHarder:!0,formats:_r(this,Ve).map(f=>dt.get(f))})}catch(f){throw console.error(f),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return c.map(f=>{const{topLeft:{x:p,y:m},topRight:{x:S,y:h},bottomLeft:{x:w,y:C},bottomRight:{x:b,y:R}}=f.position,F=Math.min(p,S,w,b),k=Math.min(m,h,C,R),W=Math.max(p,S,w,b),x=Math.max(m,h,C,R);return{boundingBox:new DOMRectReadOnly(F,k,W-F,x-k),rawValue:f.text,format:ko(f.format),cornerPoints:[{x:p,y:m},{x:S,y:h},{x:b,y:R},{x:w,y:C}]}})}catch(a){throw Tr(a,"Failed to execute 'detect' on 'BarcodeDetector'")}}}Ve=new WeakMap;const Jr=(r,i,a="error")=>{let c,f;const p=new Promise((m,S)=>{c=m,f=S,r.addEventListener(i,c),r.addEventListener(a,f)});return p.finally(()=>{r.removeEventListener(i,c),r.removeEventListener(a,f)}),p},Er=r=>new Promise(i=>setTimeout(i,r));class Yr extends Error{constructor(){super("this browser has no Stream API support"),this.name="StreamApiNotSupportedError"}}class ai extends Error{constructor(){super("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP."),this.name="InsecureContextError"}}class oi extends Error{constructor(){super("Loading camera stream timed out after 6 seconds. If you are on iOS in PWA mode, this is a known issue (see https://github.com/gruhn/vue-qrcode-reader/issues/298)"),this.name="StreamLoadTimeoutError"}}let Nt;const ii=r=>{Nt=new qr({formats:r})},si=async(r,{detectHandler:i,locateHandler:a,minDelay:c,formats:f})=>{console.debug("[vue-qrcode-reader] start scanning"),Nt=new qr({formats:f});const p=m=>async S=>{if(r.readyState===0)console.debug("[vue-qrcode-reader] stop scanning: video element readyState is 0");else{const{lastScanned:h,contentBefore:w,lastScanHadContent:C}=m;if(S-h<c)window.requestAnimationFrame(p(m));else{const b=await Nt.detect(r),R=b.some(W=>!w.includes(W.rawValue));R&&i(b);const F=b.length>0;F&&a(b),!F&&C&&a(b);const k={lastScanned:S,lastScanHadContent:F,contentBefore:R?b.map(W=>W.rawValue):w};window.requestAnimationFrame(p(k))}}};p({lastScanned:performance.now(),contentBefore:[],lastScanHadContent:!1})(performance.now())};var Gr={},Z={};Object.defineProperty(Z,"__esModule",{value:!0});Z.compactObject=Kr;Z.deprecated=mi;var ci=Z.detectBrowser=yi;Z.disableLog=hi;Z.disableWarnings=pi;Z.extractVersion=ft;Z.filterStats=gi;Z.log=vi;Z.walkStats=ht;Z.wrapPeerConnectionEvent=fi;function ui(r,i,a){return i=li(i),i in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,r}function li(r){var i=di(r,"string");return me(i)==="symbol"?i:String(i)}function di(r,i){if(me(r)!=="object"||r===null)return r;var a=r[Symbol.toPrimitive];if(a!==void 0){var c=a.call(r,i||"default");if(me(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(r)}function me(r){"@babel/helpers - typeof";return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},me(r)}var Qr=!0,Xr=!0;function ft(r,i,a){var c=r.match(i);return c&&c.length>=a&&parseInt(c[a],10)}function fi(r,i,a){if(r.RTCPeerConnection){var c=r.RTCPeerConnection.prototype,f=c.addEventListener;c.addEventListener=function(m,S){if(m!==i)return f.apply(this,arguments);var h=function(w){var C=a(w);C&&(S.handleEvent?S.handleEvent(C):S(C))};return this._eventMap=this._eventMap||{},this._eventMap[i]||(this._eventMap[i]=new Map),this._eventMap[i].set(S,h),f.apply(this,[m,h])};var p=c.removeEventListener;c.removeEventListener=function(m,S){if(m!==i||!this._eventMap||!this._eventMap[i])return p.apply(this,arguments);if(!this._eventMap[i].has(S))return p.apply(this,arguments);var h=this._eventMap[i].get(S);return this._eventMap[i].delete(S),this._eventMap[i].size===0&&delete this._eventMap[i],Object.keys(this._eventMap).length===0&&delete this._eventMap,p.apply(this,[m,h])},Object.defineProperty(c,"on"+i,{get:function(){return this["_on"+i]},set:function(m){this["_on"+i]&&(this.removeEventListener(i,this["_on"+i]),delete this["_on"+i]),m&&this.addEventListener(i,this["_on"+i]=m)},enumerable:!0,configurable:!0})}}function hi(r){return typeof r!="boolean"?new Error("Argument type: "+me(r)+". Please use a boolean."):(Qr=r,r?"adapter.js logging disabled":"adapter.js logging enabled")}function pi(r){return typeof r!="boolean"?new Error("Argument type: "+me(r)+". Please use a boolean."):(Xr=!r,"adapter.js deprecation warnings "+(r?"disabled":"enabled"))}function vi(){if((typeof window>"u"?"undefined":me(window))==="object"){if(Qr)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function mi(r,i){Xr&&console.warn(r+" is deprecated, please use "+i+" instead.")}function yi(r){var i={browser:null,version:null};if(typeof r>"u"||!r.navigator||!r.navigator.userAgent)return i.browser="Not a browser.",i;var a=r.navigator;if(a.mozGetUserMedia)i.browser="firefox",i.version=ft(a.userAgent,/Firefox\/(\d+)\./,1);else if(a.webkitGetUserMedia||r.isSecureContext===!1&&r.webkitRTCPeerConnection)i.browser="chrome",i.version=ft(a.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(r.RTCPeerConnection&&a.userAgent.match(/AppleWebKit\/(\d+)\./))i.browser="safari",i.version=ft(a.userAgent,/AppleWebKit\/(\d+)\./,1),i.supportsUnifiedPlan=r.RTCRtpTransceiver&&"currentDirection"in r.RTCRtpTransceiver.prototype;else return i.browser="Not a supported browser.",i;return i}function Or(r){return Object.prototype.toString.call(r)==="[object Object]"}function Kr(r){return Or(r)?Object.keys(r).reduce(function(i,a){var c=Or(r[a]),f=c?Kr(r[a]):r[a],p=c&&!Object.keys(f).length;return f===void 0||p?i:Object.assign(i,ui({},a,f))},{}):r}function ht(r,i,a){!i||a.has(i.id)||(a.set(i.id,i),Object.keys(i).forEach(function(c){c.endsWith("Id")?ht(r,r.get(i[c]),a):c.endsWith("Ids")&&i[c].forEach(function(f){ht(r,r.get(f),a)})}))}function gi(r,i,a){var c=a?"outbound-rtp":"inbound-rtp",f=new Map;if(i===null)return f;var p=[];return r.forEach(function(m){m.type==="track"&&m.trackIdentifier===i.id&&p.push(m)}),p.forEach(function(m){r.forEach(function(S){S.type===c&&S.trackId===m.id&&ht(r,S,f)})}),f}Object.defineProperty(Gr,"__esModule",{value:!0});var wi=Gr.shimGetUserMedia=_i,bi=Ci(Z);function Zr(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(Zr=function(c){return c?a:i})(r)}function Ci(r,i){if(r&&r.__esModule)return r;if(r===null||ve(r)!=="object"&&typeof r!="function")return{default:r};var a=Zr(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var m=f?Object.getOwnPropertyDescriptor(r,p):null;m&&(m.get||m.set)?Object.defineProperty(c,p,m):c[p]=r[p]}return c.default=r,a&&a.set(r,c),c}function ve(r){"@babel/helpers - typeof";return ve=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ve(r)}var xr=bi.log;function _i(r,i){var a=r&&r.navigator;if(a.mediaDevices){var c=function(h){if(ve(h)!=="object"||h.mandatory||h.optional)return h;var w={};return Object.keys(h).forEach(function(C){if(!(C==="require"||C==="advanced"||C==="mediaSource")){var b=ve(h[C])==="object"?h[C]:{ideal:h[C]};b.exact!==void 0&&typeof b.exact=="number"&&(b.min=b.max=b.exact);var R=function(k,W){return k?k+W.charAt(0).toUpperCase()+W.slice(1):W==="deviceId"?"sourceId":W};if(b.ideal!==void 0){w.optional=w.optional||[];var F={};typeof b.ideal=="number"?(F[R("min",C)]=b.ideal,w.optional.push(F),F={},F[R("max",C)]=b.ideal,w.optional.push(F)):(F[R("",C)]=b.ideal,w.optional.push(F))}b.exact!==void 0&&typeof b.exact!="number"?(w.mandatory=w.mandatory||{},w.mandatory[R("",C)]=b.exact):["min","max"].forEach(function(k){b[k]!==void 0&&(w.mandatory=w.mandatory||{},w.mandatory[R(k,C)]=b[k])})}}),h.advanced&&(w.optional=(w.optional||[]).concat(h.advanced)),w},f=function(h,w){if(i.version>=61)return w(h);if(h=JSON.parse(JSON.stringify(h)),h&&ve(h.audio)==="object"){var C=function(k,W,x){W in k&&!(x in k)&&(k[x]=k[W],delete k[W])};h=JSON.parse(JSON.stringify(h)),C(h.audio,"autoGainControl","googAutoGainControl"),C(h.audio,"noiseSuppression","googNoiseSuppression"),h.audio=c(h.audio)}if(h&&ve(h.video)==="object"){var b=h.video.facingMode;b=b&&(ve(b)==="object"?b:{ideal:b});var R=i.version<66;if(b&&(b.exact==="user"||b.exact==="environment"||b.ideal==="user"||b.ideal==="environment")&&!(a.mediaDevices.getSupportedConstraints&&a.mediaDevices.getSupportedConstraints().facingMode&&!R)){delete h.video.facingMode;var F;if(b.exact==="environment"||b.ideal==="environment"?F=["back","rear"]:(b.exact==="user"||b.ideal==="user")&&(F=["front"]),F)return a.mediaDevices.enumerateDevices().then(function(k){k=k.filter(function(x){return x.kind==="videoinput"});var W=k.find(function(x){return F.some(function($){return x.label.toLowerCase().includes($)})});return!W&&k.length&&F.includes("back")&&(W=k[k.length-1]),W&&(h.video.deviceId=b.exact?{exact:W.deviceId}:{ideal:W.deviceId}),h.video=c(h.video),xr("chrome: "+JSON.stringify(h)),w(h)})}h.video=c(h.video)}return xr("chrome: "+JSON.stringify(h)),w(h)},p=function(h){return i.version>=64?h:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[h.name]||h.name,message:h.message,constraint:h.constraint||h.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},m=function(h,w,C){f(h,function(b){a.webkitGetUserMedia(b,w,function(R){C&&C(p(R))})})};if(a.getUserMedia=m.bind(a),a.mediaDevices.getUserMedia){var S=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(h){return f(h,function(w){return S(w).then(function(C){if(w.audio&&!C.getAudioTracks().length||w.video&&!C.getVideoTracks().length)throw C.getTracks().forEach(function(b){b.stop()}),new DOMException("","NotFoundError");return C},function(C){return Promise.reject(p(C))})})}}}}var en={};Object.defineProperty(en,"__esModule",{value:!0});var Ti=en.shimGetUserMedia=Pi,Si=$i(Z);function tn(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(tn=function(c){return c?a:i})(r)}function $i(r,i){if(r&&r.__esModule)return r;if(r===null||Oe(r)!=="object"&&typeof r!="function")return{default:r};var a=tn(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var m=f?Object.getOwnPropertyDescriptor(r,p):null;m&&(m.get||m.set)?Object.defineProperty(c,p,m):c[p]=r[p]}return c.default=r,a&&a.set(r,c),c}function Oe(r){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Oe(r)}function Pi(r,i){var a=r&&r.navigator,c=r&&r.MediaStreamTrack;if(a.getUserMedia=function(h,w,C){Si.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),a.mediaDevices.getUserMedia(h).then(w,C)},!(i.version>55&&"autoGainControl"in a.mediaDevices.getSupportedConstraints())){var f=function(h,w,C){w in h&&!(C in h)&&(h[C]=h[w],delete h[w])},p=a.mediaDevices.getUserMedia.bind(a.mediaDevices);if(a.mediaDevices.getUserMedia=function(h){return Oe(h)==="object"&&Oe(h.audio)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h.audio,"autoGainControl","mozAutoGainControl"),f(h.audio,"noiseSuppression","mozNoiseSuppression")),p(h)},c&&c.prototype.getSettings){var m=c.prototype.getSettings;c.prototype.getSettings=function(){var h=m.apply(this,arguments);return f(h,"mozAutoGainControl","autoGainControl"),f(h,"mozNoiseSuppression","noiseSuppression"),h}}if(c&&c.prototype.applyConstraints){var S=c.prototype.applyConstraints;c.prototype.applyConstraints=function(h){return this.kind==="audio"&&Oe(h)==="object"&&(h=JSON.parse(JSON.stringify(h)),f(h,"autoGainControl","mozAutoGainControl"),f(h,"noiseSuppression","mozNoiseSuppression")),S.apply(this,[h])}}}}var ce={};Object.defineProperty(ce,"__esModule",{value:!0});ce.shimAudioContext=Fi;ce.shimCallbacksAPI=Ai;ce.shimConstraints=an;ce.shimCreateOfferLegacy=Ri;var Ei=ce.shimGetUserMedia=ki;ce.shimLocalStreamsAPI=xi;ce.shimRTCIceServerUrls=Di;ce.shimRemoteStreamsAPI=Mi;ce.shimTrackEventTransceiver=ji;var rn=Oi(Z);function nn(r){if(typeof WeakMap!="function")return null;var i=new WeakMap,a=new WeakMap;return(nn=function(c){return c?a:i})(r)}function Oi(r,i){if(r&&r.__esModule)return r;if(r===null||ye(r)!=="object"&&typeof r!="function")return{default:r};var a=nn(i);if(a&&a.has(r))return a.get(r);var c={},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var p in r)if(p!=="default"&&Object.prototype.hasOwnProperty.call(r,p)){var m=f?Object.getOwnPropertyDescriptor(r,p):null;m&&(m.get||m.set)?Object.defineProperty(c,p,m):c[p]=r[p]}return c.default=r,a&&a.set(r,c),c}function ye(r){"@babel/helpers - typeof";return ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ye(r)}function xi(r){if(!(ye(r)!=="object"||!r.RTCPeerConnection)){if("getLocalStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in r.RTCPeerConnection.prototype)){var i=r.RTCPeerConnection.prototype.addTrack;r.RTCPeerConnection.prototype.addStream=function(a){var c=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(a)||this._localStreams.push(a),a.getAudioTracks().forEach(function(f){return i.call(c,f,a)}),a.getVideoTracks().forEach(function(f){return i.call(c,f,a)})},r.RTCPeerConnection.prototype.addTrack=function(a){for(var c=this,f=arguments.length,p=new Array(f>1?f-1:0),m=1;m<f;m++)p[m-1]=arguments[m];return p&&p.forEach(function(S){c._localStreams?c._localStreams.includes(S)||c._localStreams.push(S):c._localStreams=[S]}),i.apply(this,arguments)}}"removeStream"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.removeStream=function(a){var c=this;this._localStreams||(this._localStreams=[]);var f=this._localStreams.indexOf(a);if(f!==-1){this._localStreams.splice(f,1);var p=a.getTracks();this.getSenders().forEach(function(m){p.includes(m.track)&&c.removeTrack(m)})}})}}function Mi(r){if(!(ye(r)!=="object"||!r.RTCPeerConnection)&&("getRemoteStreams"in r.RTCPeerConnection.prototype||(r.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in r.RTCPeerConnection.prototype))){Object.defineProperty(r.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(a){var c=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=a),this.addEventListener("track",this._onaddstreampoly=function(f){f.streams.forEach(function(p){if(c._remoteStreams||(c._remoteStreams=[]),!c._remoteStreams.includes(p)){c._remoteStreams.push(p);var m=new Event("addstream");m.stream=p,c.dispatchEvent(m)}})})}});var i=r.RTCPeerConnection.prototype.setRemoteDescription;r.RTCPeerConnection.prototype.setRemoteDescription=function(){var a=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(c){c.streams.forEach(function(f){if(a._remoteStreams||(a._remoteStreams=[]),!(a._remoteStreams.indexOf(f)>=0)){a._remoteStreams.push(f);var p=new Event("addstream");p.stream=f,a.dispatchEvent(p)}})}),i.apply(a,arguments)}}}function Ai(r){if(!(ye(r)!=="object"||!r.RTCPeerConnection)){var i=r.RTCPeerConnection.prototype,a=i.createOffer,c=i.createAnswer,f=i.setLocalDescription,p=i.setRemoteDescription,m=i.addIceCandidate;i.createOffer=function(h,w){var C=arguments.length>=2?arguments[2]:arguments[0],b=a.apply(this,[C]);return w?(b.then(h,w),Promise.resolve()):b},i.createAnswer=function(h,w){var C=arguments.length>=2?arguments[2]:arguments[0],b=c.apply(this,[C]);return w?(b.then(h,w),Promise.resolve()):b};var S=function(h,w,C){var b=f.apply(this,[h]);return C?(b.then(w,C),Promise.resolve()):b};i.setLocalDescription=S,S=function(h,w,C){var b=p.apply(this,[h]);return C?(b.then(w,C),Promise.resolve()):b},i.setRemoteDescription=S,S=function(h,w,C){var b=m.apply(this,[h]);return C?(b.then(w,C),Promise.resolve()):b},i.addIceCandidate=S}}function ki(r){var i=r&&r.navigator;if(i.mediaDevices&&i.mediaDevices.getUserMedia){var a=i.mediaDevices,c=a.getUserMedia.bind(a);i.mediaDevices.getUserMedia=function(f){return c(an(f))}}!i.getUserMedia&&i.mediaDevices&&i.mediaDevices.getUserMedia&&(i.getUserMedia=(function(f,p,m){i.mediaDevices.getUserMedia(f).then(p,m)}).bind(i))}function an(r){return r&&r.video!==void 0?Object.assign({},r,{video:rn.compactObject(r.video)}):r}function Di(r){if(r.RTCPeerConnection){var i=r.RTCPeerConnection;r.RTCPeerConnection=function(a,c){if(a&&a.iceServers){for(var f=[],p=0;p<a.iceServers.length;p++){var m=a.iceServers[p];m.urls===void 0&&m.url?(rn.deprecated("RTCIceServer.url","RTCIceServer.urls"),m=JSON.parse(JSON.stringify(m)),m.urls=m.url,delete m.url,f.push(m)):f.push(a.iceServers[p])}a.iceServers=f}return new i(a,c)},r.RTCPeerConnection.prototype=i.prototype,"generateCertificate"in i&&Object.defineProperty(r.RTCPeerConnection,"generateCertificate",{get:function(){return i.generateCertificate}})}}function ji(r){ye(r)==="object"&&r.RTCTrackEvent&&"receiver"in r.RTCTrackEvent.prototype&&!("transceiver"in r.RTCTrackEvent.prototype)&&Object.defineProperty(r.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function Ri(r){var i=r.RTCPeerConnection.prototype.createOffer;r.RTCPeerConnection.prototype.createOffer=function(a){if(a){typeof a.offerToReceiveAudio<"u"&&(a.offerToReceiveAudio=!!a.offerToReceiveAudio);var c=this.getTransceivers().find(function(p){return p.receiver.track.kind==="audio"});a.offerToReceiveAudio===!1&&c?c.direction==="sendrecv"?c.setDirection?c.setDirection("sendonly"):c.direction="sendonly":c.direction==="recvonly"&&(c.setDirection?c.setDirection("inactive"):c.direction="inactive"):a.offerToReceiveAudio===!0&&!c&&this.addTransceiver("audio",{direction:"recvonly"}),typeof a.offerToReceiveVideo<"u"&&(a.offerToReceiveVideo=!!a.offerToReceiveVideo);var f=this.getTransceivers().find(function(p){return p.receiver.track.kind==="video"});a.offerToReceiveVideo===!1&&f?f.direction==="sendrecv"?f.setDirection?f.setDirection("sendonly"):f.direction="sendonly":f.direction==="recvonly"&&(f.setDirection?f.setDirection("inactive"):f.direction="inactive"):a.offerToReceiveVideo===!0&&!f&&this.addTransceiver("video",{direction:"recvonly"})}return i.apply(this,arguments)}}function Fi(r){ye(r)!=="object"||r.AudioContext||(r.AudioContext=r.webkitAudioContext)}const Ii=r=>{let i=!1,a;return(...c)=>(i||(a=r(c),i=!0),a)};function fe(r,i){if(r===!1)throw new Error(i??"assertion failure")}function Mr(r){throw new Error("this code should be unreachable")}const Wi=Ii(()=>{const r=ci(window);switch(r.browser){case"chrome":wi(window,r);break;case"firefox":Ti(window,r);break;case"safari":Ei(window,r);break;default:throw new Yr}});let xe=Promise.resolve({type:"stop",data:{}});async function Ar(r,i,a){var c,f,p;if(console.debug("[vue-qrcode-reader] starting camera with constraints: ",JSON.stringify(i)),window.isSecureContext!==!0)throw new ai;if(((c=navigator==null?void 0:navigator.mediaDevices)==null?void 0:c.getUserMedia)===void 0)throw new Yr;Wi(),console.debug("[vue-qrcode-reader] calling getUserMedia");const m=await navigator.mediaDevices.getUserMedia({audio:!1,video:i});r.srcObject!==void 0?r.srcObject=m:r.mozSrcObject!==void 0?r.mozSrcObject=m:window.URL.createObjectURL?r.src=window.URL.createObjectURL(m):window.webkitURL?r.src=window.webkitURL.createObjectURL(m):r.src=m.id,r.play(),console.debug("[vue-qrcode-reader] waiting for video element to load"),await Promise.race([Jr(r,"loadeddata"),Er(6e3).then(()=>{throw new oi})]),console.debug("[vue-qrcode-reader] video element loaded"),await Er(500);const[S]=m.getVideoTracks(),h=(p=(f=S==null?void 0:S.getCapabilities)==null?void 0:f.call(S))!=null?p:{};let w=!1;return a&&h.torch&&(await S.applyConstraints({advanced:[{torch:!0}]}),w=!0),console.debug("[vue-qrcode-reader] camera ready"),{type:"start",data:{videoEl:r,stream:m,capabilities:h,constraints:i,isTorchOn:w}}}async function Ui(r,{constraints:i,torch:a,restart:c=!1}){xe=xe.then(p=>{if(p.type==="start"){const{data:{videoEl:m,stream:S,constraints:h,isTorchOn:w}}=p;return!c&&r===m&&i===h&&a===w?p:on(m,S,w).then(()=>Ar(r,i,a))}else if(p.type==="stop"||p.type==="failed")return Ar(r,i,a);Mr()}).catch(p=>(console.debug(`[vue-qrcode-reader] starting camera failed with "${p}"`),{type:"failed",error:p}));const f=await xe;if(f.type==="stop")throw new Error("Something went wrong with the camera task queue (start task).");if(f.type==="failed")throw f.error;if(f.type==="start")return f.data.capabilities;Mr()}async function on(r,i,a){console.debug("[vue-qrcode-reader] stopping camera"),r.src="",r.srcObject=null,r.load(),await Jr(r,"error");for(const c of i.getTracks())a!=null||await c.applyConstraints({advanced:[{torch:!1}]}),i.removeTrack(c),c.stop();return{type:"stop",data:{}}}async function ct(){if(xe=xe.then(r=>{if(r.type==="stop"||r.type==="failed")return r;const{data:{videoEl:i,stream:a,isTorchOn:c}}=r;return on(i,a,c)}),(await xe).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")}const Li=kr({__name:"QrcodeStream",props:{constraints:{type:Object,default(){return{facingMode:"environment"}}},formats:{type:Array,default:()=>["qr_code"]},paused:{type:Boolean,default:!1},torch:{type:Boolean,default:!1},track:{type:Function}},emits:["detect","camera-on","camera-off","error"],setup(r,{emit:i}){const a=r,c=i,f=te(a.constraints),p=te(a.formats);He(()=>a.constraints,(A,P)=>{JSON.stringify(A)!==JSON.stringify(P)&&(f.value=A)},{deep:!0}),He(()=>a.formats,(A,P)=>{JSON.stringify(A)!==JSON.stringify(P)&&(p.value=A)},{deep:!0});const m=te(),S=te(),h=te(),w=te(!1),C=te(!1);go(()=>{C.value=!0}),wo(()=>{ct()});const b=ut(()=>({torch:a.torch,constraints:f.value,shouldStream:C.value&&!a.paused}));He(b,async A=>{const P=h.value;fe(P!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus video element should always be defined.");const E=m.value;fe(E!==void 0,"cameraSettings watcher should never be triggered when component is not mounted. Thus canvas should always be defined.");const K=E.getContext("2d");if(fe(K!==null,"if cavnas is defined, canvas 2d context should also be non-null"),A.shouldStream){ct(),w.value=!1;try{const ne=await Ui(P,A);C.value?(w.value=!0,c("camera-on",ne)):await ct()}catch(ne){c("error",ne)}}else E.width=P.videoWidth,E.height=P.videoHeight,K.drawImage(P,0,0,P.videoWidth,P.videoHeight),ct(),w.value=!1,c("camera-off")},{deep:!0}),He(p,A=>{C.value&&ii(A)});const R=ut(()=>b.value.shouldStream&&w.value);He(R,A=>{if(A){fe(m.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus pause frame canvas is defined"),F(m.value),fe(S.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus tracking canvas is defined"),F(S.value);const P=()=>a.track===void 0?500:40;fe(h.value!==void 0,"shouldScan watcher should only be triggered when component is mounted. Thus video element is defined"),si(h.value,{detectHandler:E=>c("detect",E),formats:p.value,locateHandler:k,minDelay:P()})}});const F=A=>{const P=A.getContext("2d");fe(P!==null,"canvas 2d context should always be non-null"),P.clearRect(0,0,A.width,A.height)},k=A=>{const P=S.value;fe(P!==void 0,"onLocate handler should only be called when component is mounted. Thus tracking canvas is always defined.");const E=h.value;if(fe(E!==void 0,"onLocate handler should only be called when component is mounted. Thus video element is always defined."),A.length===0||a.track===void 0)F(P);else{const K=E.offsetWidth,ne=E.offsetHeight,Te=E.videoWidth,Se=E.videoHeight,Ae=Math.max(K/Te,ne/Se),ke=Te*Ae,Be=Se*Ae,pt=ke/Te,vt=Be/Se,mt=(K-ke)/2,yt=(ne-Be)/2,De=({x:he,y:ee})=>({x:Math.floor(he*pt),y:Math.floor(ee*vt)}),oe=({x:he,y:ee})=>({x:Math.floor(he+mt),y:Math.floor(ee+yt)}),ge=A.map(he=>{const{boundingBox:ee,cornerPoints:wt}=he,{x:ze,y:pe}=oe(De({x:ee.x,y:ee.y})),{x:qe,y:bt}=De({x:ee.width,y:ee.height});return{...he,cornerPoints:wt.map(Je=>oe(De(Je))),boundingBox:DOMRectReadOnly.fromRect({x:ze,y:pe,width:qe,height:bt})}});P.width=E.offsetWidth,P.height=E.offsetHeight;const gt=P.getContext("2d");a.track(ge,gt)}},W={width:"100%",height:"100%",position:"relative","z-index":"0"},x={width:"100%",height:"100%",position:"absolute",top:"0",left:"0"},$={width:"100%",height:"100%","object-fit":"cover"},j=ut(()=>R.value?$:{...$,visibility:"hidden",position:"absolute"});return(A,P)=>(Ce(),_e("div",{style:W},[X("video",{ref_key:"videoRef",ref:h,style:bo(j.value),autoplay:"",muted:"",playsinline:""},null,4),lt(X("canvas",{id:"qrcode-stream-pause-frame",ref_key:"pauseFrameRef",ref:m,style:$},null,512),[[Co,!R.value]]),X("canvas",{id:"qrcode-stream-tracking-layer",ref_key:"trackingLayerRef",ref:S,style:x},null,512),X("div",{style:x},[_o(A.$slots,"default")])]))}}),Hi=r=>(Po("data-v-7c1f2a40"),r=r(),Eo(),r),Ni=["value"],Vi=["value"],Bi=Hi(()=>X("br",null,null,-1)),zi=["onUpdate:modelValue","id"],qi=["for"],Ji={class:"error"},Yi={class:"decode-result"},Gi=kr({__name:"Index3",setup(r){const i=te("");function a(x){console.log(x),i.value=JSON.stringify(x.map($=>$.rawValue))}const c=te({facingMode:"environment"}),f=[{label:"rear camera",constraints:{facingMode:"environment"}},{label:"front camera",constraints:{facingMode:"user"}}],p=te(f);async function m(){const $=(await navigator.mediaDevices.enumerateDevices()).filter(({kind:j})=>j==="videoinput");p.value=[...f,...$.map(({deviceId:j,label:A})=>({label:`${A} (ID: ${j})`,constraints:{deviceId:j}}))],k.value=""}function S(x,$){for(const j of x){const[A,...P]=j.cornerPoints;$.strokeStyle="red",$.beginPath(),$.moveTo(A.x,A.y);for(const{x:E,y:K}of P)$.lineTo(E,K);$.lineTo(A.x,A.y),$.closePath(),$.stroke()}}function h(x,$){for(const j of x){const{boundingBox:{x:A,y:P,width:E,height:K}}=j;$.lineWidth=2,$.strokeStyle="#007bff",$.strokeRect(A,P,E,K)}}function w(x,$){for(const j of x){const{boundingBox:A,rawValue:P}=j,E=A.x+A.width/2,K=A.y+A.height/2,ne=Math.max(12,50*A.width/$.canvas.width);$.font=`bold ${ne}px sans-serif`,$.textAlign="center",$.lineWidth=3,$.strokeStyle="#35495e",$.strokeText(j.rawValue,E,K),$.fillStyle="#5cb984",$.fillText(P,E,K)}}const C=[{text:"nothing (default)",value:void 0},{text:"outline",value:S},{text:"centered text",value:w},{text:"bounding box",value:h}],b=te(C[1]),R=te({aztec:!1,code_128:!1,code_39:!1,code_93:!1,codabar:!1,databar:!1,databar_expanded:!1,data_matrix:!1,dx_film_edge:!1,ean_13:!1,ean_8:!1,itf:!1,maxi_code:!1,micro_qr_code:!1,pdf417:!1,qr_code:!0,rm_qr_code:!1,upc_a:!1,upc_e:!1,linear_codes:!1,matrix_codes:!1}),F=ut(()=>Object.keys(R.value).filter(x=>R.value[x])),k=te("");function W(x){k.value=`[${x.name}]: `,x.name==="NotAllowedError"?k.value+="you need to grant camera access permission":x.name==="NotFoundError"?k.value+="no camera on this device":x.name==="NotSupportedError"?k.value+="secure context required (HTTPS, localhost)":x.name==="NotReadableError"?k.value+="is the camera already in use?":x.name==="OverconstrainedError"?k.value+="installed cameras are not suitable":x.name==="StreamApiNotSupportedError"?k.value+="Stream API is not supported in this browser":x.name==="InsecureContextError"?k.value+="Camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.":k.value+=x.message}return(x,$)=>(Ce(),_e("div",null,[X("p",null,[st(" Modern mobile phones often have a variety of different cameras installed (e.g. front, rear, wide-angle, infrared, desk-view). The one picked by default is sometimes not the best choice. For more fine-grained control, you can select a camera by device constraints or by the device ID: "),lt(X("select",{"onUpdate:modelValue":$[0]||($[0]=j=>c.value=j)},[(Ce(!0),_e(Lt,null,Ht(p.value,j=>(Ce(),_e("option",{key:j.label,value:j.constraints},Ne(j.label),9,Ni))),128))],512),[[Cr,c.value]])]),X("p",null,[st(" Detected codes are visually highlighted in real-time. Use the following dropdown to change the flavor: "),lt(X("select",{"onUpdate:modelValue":$[1]||($[1]=j=>b.value=j)},[(Ce(),_e(Lt,null,Ht(C,j=>X("option",{key:j.text,value:j},Ne(j.text),9,Vi)),64))],512),[[Cr,b.value]])]),X("p",null,[st(" By default only QR-codes are detected but a variety of other barcode formats are also supported. You can select one or multiple but the more you select the more expensive scanning becomes: "),Bi,(Ce(!0),_e(Lt,null,Ht(Object.keys(R.value),j=>(Ce(),_e("span",{key:j,class:"barcode-format-checkbox"},[lt(X("input",{type:"checkbox","onUpdate:modelValue":A=>R.value[j]=A,id:j},null,8,zi),[[$o,R.value[j]]]),X("label",{for:j},Ne(j),9,qi)]))),128))]),X("p",Ji,Ne(k.value),1),X("p",Yi,[st(" Last result: "),X("b",null,Ne(i.value),1)]),X("div",null,[To(So(Li),{constraints:c.value,track:b.value.value,formats:F.value,onError:W,onDetect:a,onCameraOn:m},null,8,["constraints","track","formats"])])]))}});const Xi=Oo(Gi,[["__scopeId","data-v-7c1f2a40"]]);export{Xi as default};
|