import{p as rr,s as or,b as ir}from"./js-binary-schema-parser-e8484cb3.js";import{aR as nr,ao as sr,an as ar}from"./@vue-8853d279.js";let St,oe,lr=(async()=>{(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[t]="fc283faa-728b-4ea4-a9c5-9d3efc537fab",i._sentryDebugIdIdentifier="sentry-dbid-fc283faa-728b-4ea4-a9c5-9d3efc537fab")}catch{}})(),St=(i,t)=>{const e=i.__vccOpts||i;for(const[r,o]of t)e[r]=o;return e};function bt(i){return i===""?i:i==="true"||i=="1"}function ie(i,t){return new Promise((e,r)=>{var o=new XMLHttpRequest;o.responseType="blob",o.onload=function(){var n=new FileReader;n.onloadend=function(){e(n.result)},n.readAsArrayBuffer(o.response)},o.open("GET",i),o.send()})}function tt(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function It(i,t){for(var e="",r=0,o=-1,n=0,s,a=0;a<=i.length;++a){if(a<i.length)s=i.charCodeAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||n===1))if(o!==a-1&&n===2){if(e.length<2||r!==2||e.charCodeAt(e.length-1)!==46||e.charCodeAt(e.length-2)!==46){if(e.length>2){var l=e.lastIndexOf("/");if(l!==e.length-1){l===-1?(e="",r=0):(e=e.slice(0,l),r=e.length-1-e.lastIndexOf("/")),o=a,n=0;continue}}else if(e.length===2||e.length===1){e="",r=0,o=a,n=0;continue}}t&&(e.length>0?e+="/..":e="..",r=2)}else e.length>0?e+="/"+i.slice(o+1,a):e=i.slice(o+1,a),r=a-o-1;o=a,n=0}else s===46&&n!==-1?++n:n=-1}return e}function ne(i,t){var e=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return e?e===t.root?e+r:e+i+r:r}var lt={resolve:function(){for(var i="",t=!1,e,r=arguments.length-1;r>=-1&&!t;r--){var o;r>=0?o=arguments[r]:(e===void 0&&(e=process.cwd()),o=e),tt(o),o.length!==0&&(i=o+"/"+i,t=o.charCodeAt(0)===47)}return i=It(i,!t),t?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(i){if(tt(i),i.length===0)return".";var t=i.charCodeAt(0)===47,e=i.charCodeAt(i.length-1)===47;return i=It(i,!t),i.length===0&&!t&&(i="."),i.length>0&&e&&(i+="/"),t?"/"+i:i},isAbsolute:function(i){return tt(i),i.length>0&&i.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var i,t=0;t<arguments.length;++t){var e=arguments[t];tt(e),e.length>0&&(i===void 0?i=e:i+="/"+e)}return i===void 0?".":lt.normalize(i)},relative:function(i,t){if(tt(i),tt(t),i===t||(i=lt.resolve(i),t=lt.resolve(t),i===t))return"";for(var e=1;e<i.length&&i.charCodeAt(e)===47;++e);for(var r=i.length,o=r-e,n=1;n<t.length&&t.charCodeAt(n)===47;++n);for(var s=t.length,a=s-n,l=o<a?o:a,h=-1,u=0;u<=l;++u){if(u===l){if(a>l){if(t.charCodeAt(n+u)===47)return t.slice(n+u+1);if(u===0)return t.slice(n+u)}else o>l&&(i.charCodeAt(e+u)===47?h=u:u===0&&(h=0));break}var f=i.charCodeAt(e+u),v=t.charCodeAt(n+u);if(f!==v)break;f===47&&(h=u)}var T="";for(u=e+h+1;u<=r;++u)(u===r||i.charCodeAt(u)===47)&&(T.length===0?T+="..":T+="/..");return T.length>0?T+t.slice(n+h):(n+=h,t.charCodeAt(n)===47&&++n,t.slice(n))},_makeLong:function(i){return i},dirname:function(i){if(tt(i),i.length===0)return".";for(var t=i.charCodeAt(0),e=t===47,r=-1,o=!0,n=i.length-1;n>=1;--n)if(t=i.charCodeAt(n),t===47){if(!o){r=n;break}}else o=!1;return r===-1?e?"/":".":e&&r===1?"//":i.slice(0,r)},basename:function(i,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');tt(i);var e=0,r=-1,o=!0,n;if(t!==void 0&&t.length>0&&t.length<=i.length){if(t.length===i.length&&t===i)return"";var s=t.length-1,a=-1;for(n=i.length-1;n>=0;--n){var l=i.charCodeAt(n);if(l===47){if(!o){e=n+1;break}}else a===-1&&(o=!1,a=n+1),s>=0&&(l===t.charCodeAt(s)?--s===-1&&(r=n):(s=-1,r=a))}return e===r?r=a:r===-1&&(r=i.length),i.slice(e,r)}else{for(n=i.length-1;n>=0;--n)if(i.charCodeAt(n)===47){if(!o){e=n+1;break}}else r===-1&&(o=!1,r=n+1);return r===-1?"":i.slice(e,r)}},extname:function(i){tt(i);for(var t=-1,e=0,r=-1,o=!0,n=0,s=i.length-1;s>=0;--s){var a=i.charCodeAt(s);if(a===47){if(!o){e=s+1;break}continue}r===-1&&(o=!1,r=s+1),a===46?t===-1?t=s:n!==1&&(n=1):t!==-1&&(n=-1)}return t===-1||r===-1||n===0||n===1&&t===r-1&&t===e+1?"":i.slice(t,r)},format:function(i){if(i===null||typeof i!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof i);return ne("/",i)},parse:function(i){tt(i);var t={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return t;var e=i.charCodeAt(0),r=e===47,o;r?(t.root="/",o=1):o=0;for(var n=-1,s=0,a=-1,l=!0,h=i.length-1,u=0;h>=o;--h){if(e=i.charCodeAt(h),e===47){if(!l){s=h+1;break}continue}a===-1&&(l=!1,a=h+1),e===46?n===-1?n=h:u!==1&&(u=1):n!==-1&&(u=-1)}return n===-1||a===-1||u===0||u===1&&n===a-1&&n===s+1?a!==-1&&(s===0&&r?t.base=t.name=i.slice(1,a):t.base=t.name=i.slice(s,a)):(s===0&&r?(t.name=i.slice(1,n),t.base=i.slice(1,a)):(t.name=i.slice(s,n),t.base=i.slice(s,a)),t.ext=i.slice(n,a)),s>0?t.dir=i.slice(0,s-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};lt.posix=lt;const se=lt.extname,Mt=lt.basename;class ae{constructor(){let t=(()=>typeof global>"u")(),e="image/png",r="image/jpeg",o="image/jpeg",n="image/webp",s="application/pdf",a="image/svg+xml";Object.assign(this,{toMime:this.toMime.bind(this),fromMime:this.fromMime.bind(this),expected:t?'"png", "jpg", or "webp"':'"png", "jpg", "pdf", or "svg"',formats:t?{png:e,jpg:r,jpeg:o,webp:n}:{png:e,jpg:r,jpeg:o,pdf:s,svg:a},mimes:t?{[e]:"png",[r]:"jpg",[n]:"webp"}:{[e]:"png",[r]:"jpg",[s]:"pdf",[a]:"svg"}})}toMime(t){return this.formats[(t||"").replace(/^\./,"").toLowerCase()]}fromMime(t){return this.mimes[t]}}function le(i,{filename:t="",extension:e="",format:E,page:o,quality:n,matte:s,density:a,outline:l,archive:T}={}){var{fromMime:u,toMime:f,expected:v}=new ae,T=T||"canvas",k=E||e.replace(/@\d+x$/i,"")||se(t),E=u(f(k)||k),U=f(E),d=i.length;if(!k)throw new Error("Cannot determine image format (use a filename extension or 'format' argument)");if(!E)throw new Error(`Unsupported file format "${k}" (expected ${v})`);if(!d)throw new RangeError("Canvas has no associated contexts (try calling getContext or newPage first)");let p,A,g=t.replace(/{(\d*)}/g,(m,C)=>(A=!0,C=parseInt(C,10),p=isFinite(C)?C:isFinite(p)?p:-1,"{}")),w=o>0?o-1:o<0?d+o:void 0;if(isFinite(w)&&w<0||w>=d)throw new RangeError(d==1?`Canvas only has a \u2018page 1\u2019 (${w} is out of bounds)`:`Canvas has pages 1\u2013${d} (${w} is out of bounds)`);if(i=isFinite(w)?[i[w]]:A||E=="pdf"?i:i.slice(-1),n===void 0)n=.92;else if(typeof n!="number"||!isFinite(n)||n<0||n>1)throw new TypeError("The quality option must be an number in the 0.0\u20131.0 range");if(a===void 0){let m=(e||Mt(t,k)).match(/@(\d+)x$/i);a=m?parseInt(m[1],10):1}else if(typeof a!="number"||!Number.isInteger(a)||a<1)throw new TypeError("The density option must be a non-negative integer");return l===void 0?l=!0:E=="svg"&&(l=!!l),{filename:t,pattern:g,format:E,mime:U,pages:i,padding:p,quality:n,matte:s,density:a,outline:l,archive:T}}class dt{static for(t){return new dt().append(t).get()}constructor(){this.crc=-1}get(){return~this.crc}append(t){for(var e=this.crc|0,r=this.table,o=0,n=t.length|0;o<n;o++)e=e>>>8^r[(e^t[o])&255];return this.crc=e,this}}dt.prototype.table=(()=>{var i,t,e,r=[];for(i=0;i<256;i++){for(e=i,t=0;t<8;t++)e=e&1?e>>>1^3988292384:e>>>1;r[i]=e}return r})();function Ct(i){let t=new Uint8Array(i),e=new DataView(t.buffer),r={array:t,view:e,size:i,set8(o,n){return e.setUint8(o,n),r},set16(o,n){return e.setUint16(o,n,!0),r},set32(o,n){return e.setUint32(o,n,!0),r},bytes(o,n){return t.set(n,o),r}};return r}class pt{constructor(t){let e=new Date;Object.assign(this,{directory:t,offset:0,files:[],time:(e.getHours()<<6|e.getMinutes())<<5|e.getSeconds()/2,date:(e.getFullYear()-1980<<4|e.getMonth()+1)<<5|e.getDate()}),this.add(t)}async add(t,e){let r=!e,o=pt.encoder.encode(`${this.directory}/${r?"":t}`),n=new Uint8Array(r?0:await e.arrayBuffer()),s=30+o.length,a=s+n.length,l=16,{offset:h}=this,u=Ct(26).set32(0,134742036).set16(6,this.time).set16(8,this.date).set32(10,dt.for(n)).set32(14,n.length).set32(18,n.length).set16(22,o.length);h+=s;let f=Ct(s+n.length+l).set32(0,67324752).bytes(4,u.array).bytes(30,o).bytes(s,n);h+=n.length,f.set32(a,134695760).bytes(a+4,u.array.slice(10,22)),h+=l,this.files.push({offset:h,folder:r,name:o,header:u,payload:f}),this.offset=h}toBuffer(){let t=this.files.reduce((f,{name:v})=>46+v.length+f,0),e=Ct(t+22),r=0;for(var{offset:o,name:n,header:s,folder:a}of this.files)e.set32(r,33639248).set16(r+4,20).bytes(r+6,s.array).set8(r+38,a?16:0).set32(r+42,o).bytes(r+46,n),r+=46+n.length;e.set32(r,101010256).set16(r+8,this.files.length).set16(r+10,this.files.length).set32(r+12,t).set32(r+16,this.offset);let l=new Uint8Array(this.offset+e.size),h=0;for(var{payload:u}of this.files)l.set(u.array,h),h+=u.size;return l.set(e.array,h),l}get blob(){return new Blob([this.toBuffer()],{type:"application/zip"})}}pt.encoder=new TextEncoder;const At=(i,t,e,r)=>{if(r){let{width:o,height:n}=i,s=Object.assign(document.createElement("canvas"),{width:o,height:n}),a=s.getContext("2d");a.fillStyle=r,a.fillRect(0,0,o,n),a.drawImage(i,0,0),i=s}return new Promise((o,n)=>i.toBlob(o,t,e))},he=(...i)=>At(...i).then(t=>t.arrayBuffer()),ce=async(i,t,e,r,o)=>{Lt(o,await At(i,t,e,r))},ue=async(i,t,e,r,o,n,s)=>{let a=u=>n.replace("{}",String(u+1).padStart(s,"0")),l=Mt(o,".zip")||"archive",h=new pt(l);await Promise.all(i.map(async(u,f)=>{let v=a(f);await h.add(v,await At(u,t,e,r))})),Lt(`${l}.zip`,h.blob)},Lt=(i,t)=>{const e=window.URL.createObjectURL(t),r=document.createElement("a");r.style.display="none",r.href=e,r.setAttribute("download",i),typeof r.download>"u"&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),document.body.removeChild(r),setTimeout(()=>window.URL.revokeObjectURL(e),100)},ge=(i,t,e)=>i.map(r=>{if(t==1&&!e)return r.canvas;let o=document.createElement("canvas"),n=o.getContext("2d"),s=r.canvas?r.canvas:r;return o.width=s.width*t,o.height=s.height*t,e&&(n.fillStyle=e,n.fillRect(0,0,o.width,o.height)),n.scale(t,t),n.drawImage(s,0,0),o}),fe={asBuffer:he,asDownload:ce,asZipDownload:ue,atScale:ge,options:le},{asBuffer:Dt,asDownload:de,asZipDownload:pe,atScale:Bt,options:Pt}=fe,Nt=Symbol.for("toDataURL"),me=i=>new Promise((t,e)=>Object.assign(new Ot,{crossOrigin:"Anonymous",onload:t,onerror:e,src:i}));class we{constructor(t,e){let r=document.createElement("canvas"),o=[];Object.defineProperty(r,"async",{value:!0,writable:!1,enumerable:!0});for(var[n,s]of Object.entries({png:()=>Dt(r,"image/png"),jpg:()=>Dt(r,"image/jpeg"),pages:()=>o.concat(r).map(a=>a.getContext("2d"))}))Object.defineProperty(r,n,{get:s});return Object.assign(r,{width:t,height:e,newPage(...a){var{width:h,height:u}=r,l=Object.assign(document.createElement("canvas"),{width:h,height:u});l.getContext("2d").drawImage(r,0,0),o.push(l);var[h,u]=a.length?a:[h,u];return Object.assign(r,{width:h,height:u}).getContext("2d")},saveAs(a,l){l=typeof l=="number"?{quality:l}:l;let h=Pt(this.pages,{filename:a,...l}),{pattern:u,padding:f,mime:v,quality:T,matte:k,density:E,archive:U}=h,d=Bt(h.pages,E);return f==null?de(d[0],v,T,k,a):pe(d,v,T,k,U,u,f)},toBuffer(a="png",l={}){l=typeof l=="number"?{quality:l}:l;let h=Pt(this.pages,{extension:a,...l}),{mime:u,quality:f,matte:v,pages:T,density:k}=h,E=Bt(T,k,v)[0];return Dt(E,u,f,v)},[Nt]:r.toDataURL.bind(r),toDataURL(a="png",l={}){l=typeof l=="number"?{quality:l}:l;let h=Pt(this.pages,{extension:a,...l}),{mime:u,quality:f,matte:v,pages:T,density:k}=h,E=Bt(T,k,v)[0],U=E[E===r?Nt:"toDataURL"](u,f);return Promise.resolve(U)}})}}const{CanvasRenderingContext2D:ye,CanvasGradient:ve,CanvasPattern:be,Image:Ot,ImageData:Ce,Path2D:Ae,DOMMatrix:De,DOMRect:Be,DOMPoint:Pe}=window,Te={Canvas:we,loadImage:me,CanvasRenderingContext2D:ye,CanvasGradient:ve,CanvasPattern:be,Image:Ot,ImageData:Ce,Path2D:Ae,DOMMatrix:De,DOMRect:Be,DOMPoint:Pe},Ee=(i,t)=>{const e=new Array(i.length),r=i.length/t,o=function(u,f){const v=i.slice(f*t,(f+1)*t);e.splice.apply(e,[u*t,t].concat(v))},n=[0,4,2,1],s=[8,8,4,2];for(var a=0,l=0;l<4;l++)for(var h=n[l];h<r;h+=s[l])o(h,a),a++;return e},xe=(i,t,e)=>{const r=e;var o,n,s,a,l,h,u,A,f,v,p,T,g,w,C,m;const k=new Array(e),E=new Array(4096),U=new Array(4096),d=new Array(4096+1);for(T=i,n=1<<T,l=n+1,o=n+2,u=-1,a=T+1,s=(1<<a)-1,f=0;f<n;f++)E[f]=0,U[f]=f;var p,A,g,w,m,C;for(p=A=g=w=m=C=0,v=0;v<r;){if(w===0){if(A<a){p+=t[C]<<A,A+=8,C++;continue}if(f=p&s,p>>=a,A-=a,f>o||f==l)break;if(f==n){a=T+1,s=(1<<a)-1,o=n+2,u=-1;continue}if(u==-1){d[w++]=U[f],u=f,g=f;continue}for(h=f,f==o&&(d[w++]=g,f=u);f>n;)d[w++]=U[f],f=E[f];g=U[f]&255,d[w++]=g,o<4096&&(E[o]=u,U[o]=g,o++,(o&s)===0&&o<4096&&(a++,s+=o)),u=h}w--,k[m++]=d[w],v++}for(v=m;v<r;v++)k[v]=0;return k},ke=i=>{const t=new Uint8Array(i);return rr(ir(t),or)},Re=i=>{const t=i.pixels.length,e=new Uint8ClampedArray(t*4);for(var r=0;r<t;r++){const o=r*4,n=i.pixels[r],s=i.colorTable[n];e[o]=s[0],e[o+1]=s[1],e[o+2]=s[2],e[o+3]=n!==i.transparentIndex?255:0}return e},Se=(i,t,e)=>{if(!i.image){console.warn("gif frame does not have associated image.");return}const{image:r}=i,o=r.descriptor.width*r.descriptor.height;var n=xe(r.data.minCodeSize,r.data.blocks,o);r.descriptor.lct.interlaced&&(n=Ee(n,r.descriptor.width));const s={pixels:n,dims:{top:i.image.descriptor.top,left:i.image.descriptor.left,width:i.image.descriptor.width,height:i.image.descriptor.height}};return r.descriptor.lct&&r.descriptor.lct.exists?s.colorTable=r.lct:s.colorTable=t,i.gce&&(s.delay=(i.gce.delay||10)*10,s.disposalType=i.gce.extras.disposal,i.gce.extras.transparentColorGiven&&(s.transparentIndex=i.gce.transparentColorIndex)),e&&(s.patch=Re(s)),s},Ie=(i,t)=>i.frames.filter(e=>e.image).map(e=>Se(e,i.gct,t));function Me(i,t,e){const r=jt(t),o=i-1;let n=0;switch(e){case _.L:n=et[o][0];break;case _.M:n=et[o][1];break;case _.Q:n=et[o][2];break;case _.H:n=et[o][3];break}return r<=n}function Le(i,t){for(var e=1,r=jt(i),o=0,n=et.length;o<n;o++){var s=0;switch(t){case _.L:s=et[o][0];break;case _.M:s=et[o][1];break;case _.Q:s=et[o][2];break;case _.H:s=et[o][3];break}if(r<=s)break;e++}if(e>et.length)throw new Error("Too long data");return e}function jt(i){var t=encodeURI(i).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=Number(i)?3:0)}class Ne{constructor(t){this.mode=Y.MODE_8BIT_BYTE,this.parsedData=[],this.data=t;const e=[];for(let r=0,o=this.data.length;r<o;r++){const n=[],s=this.data.charCodeAt(r);s>65536?(n[0]=240|(s&1835008)>>>18,n[1]=128|(s&258048)>>>12,n[2]=128|(s&4032)>>>6,n[3]=128|s&63):s>2048?(n[0]=224|(s&61440)>>>12,n[1]=128|(s&4032)>>>6,n[2]=128|s&63):s>128?(n[0]=192|(s&1984)>>>6,n[1]=128|s&63):n[0]=s,e.push(n)}this.parsedData=Array.prototype.concat.apply([],e),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}getLength(){return this.parsedData.length}write(t){for(let e=0,r=this.parsedData.length;e<r;e++)t.put(this.parsedData[e],8)}}class nt{constructor(t=-1,e=_.L){this.moduleCount=0,this.dataList=[],this.typeNumber=t,this.errorCorrectLevel=e,this.moduleCount=0,this.dataList=[]}addData(t){if(this.typeNumber<=0)this.typeNumber=Le(t,this.errorCorrectLevel);else{if(this.typeNumber>40)throw new Error(`Invalid QR version: ${this.typeNumber}`);if(!Me(this.typeNumber,t,this.errorCorrectLevel))throw new Error(`Data is too long for QR version: ${this.typeNumber}`)}const e=new Ne(t);this.dataList.push(e),this.dataCache=void 0}isDark(t,e){if(t<0||this.moduleCount<=t||e<0||this.moduleCount<=e)throw new Error(`${t},${e}`);return this.modules[t][e]}getModuleCount(){return this.moduleCount}make(){this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(t,e){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let r=0;r<this.moduleCount;r++){this.modules[r]=new Array(this.moduleCount);for(let o=0;o<this.moduleCount;o++)this.modules[r][o]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(t,e),this.typeNumber>=7&&this.setupTypeNumber(t),this.dataCache==null&&(this.dataCache=nt.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,e)}setupPositionProbePattern(t,e){for(let r=-1;r<=7;r++)if(!(t+r<=-1||this.moduleCount<=t+r))for(let o=-1;o<=7;o++)e+o<=-1||this.moduleCount<=e+o||(0<=r&&r<=6&&(o==0||o==6)||0<=o&&o<=6&&(r==0||r==6)||2<=r&&r<=4&&2<=o&&o<=4?this.modules[t+r][e+o]=!0:this.modules[t+r][e+o]=!1)}getBestMaskPattern(){if(Number.isInteger(this.maskPattern)&&Object.values(rt).includes(this.maskPattern))return this.maskPattern;let t=0,e=0;for(let r=0;r<8;r++){this.makeImpl(!0,r);const o=M.getLostPoint(this);(r==0||t>o)&&(t=o,e=r)}return e}setupTimingPattern(){for(let t=8;t<this.moduleCount-8;t++)this.modules[t][6]==null&&(this.modules[t][6]=t%2==0);for(let t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)}setupPositionAdjustPattern(){const t=M.getPatternPosition(this.typeNumber);for(let e=0;e<t.length;e++)for(let r=0;r<t.length;r++){const o=t[e],n=t[r];if(this.modules[o][n]==null)for(let s=-2;s<=2;s++)for(let a=-2;a<=2;a++)s==-2||s==2||a==-2||a==2||s==0&&a==0?this.modules[o+s][n+a]=!0:this.modules[o+s][n+a]=!1}}setupTypeNumber(t){const e=M.getBCHTypeNumber(this.typeNumber);for(var r=0;r<18;r++){var o=!t&&(e>>r&1)==1;this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=o}for(var r=0;r<18;r++){var o=!t&&(e>>r&1)==1;this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=o}}setupTypeInfo(t,e){const r=this.errorCorrectLevel<<3|e,o=M.getBCHTypeInfo(r);for(var n=0;n<15;n++){var s=!t&&(o>>n&1)==1;n<6?this.modules[n][8]=s:n<8?this.modules[n+1][8]=s:this.modules[this.moduleCount-15+n][8]=s}for(var n=0;n<15;n++){var s=!t&&(o>>n&1)==1;n<8?this.modules[8][this.moduleCount-n-1]=s:n<9?this.modules[8][15-n-1+1]=s:this.modules[8][15-n-1]=s}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let r=-1,o=this.moduleCount-1,n=7,s=0;for(let a=this.moduleCount-1;a>0;a-=2)for(a==6&&a--;;){for(let l=0;l<2;l++)if(this.modules[o][a-l]==null){let h=!1;s<t.length&&(h=(t[s]>>>n&1)==1),M.getMask(e,o,a-l)&&(h=!h),this.modules[o][a-l]=h,n--,n==-1&&(s++,n=7)}if(o+=r,o<0||this.moduleCount<=o){o-=r,r=-r;break}}}static createData(t,e,r){const o=ot.getRSBlocks(t,e),n=new Oe;for(var s=0;s<r.length;s++){const l=r[s];n.put(l.mode,4),n.put(l.getLength(),M.getLengthInBits(l.mode,t)),l.write(n)}let a=0;for(var s=0;s<o.length;s++)a+=o[s].dataCount;if(n.getLengthInBits()>a*8)throw new Error(`code length overflow. (${n.getLengthInBits()}>${a*8})`);for(n.getLengthInBits()+4<=a*8&&n.put(0,4);n.getLengthInBits()%8!=0;)n.putBit(!1);for(;!(n.getLengthInBits()>=a*8||(n.put(nt.PAD0,8),n.getLengthInBits()>=a*8));)n.put(nt.PAD1,8);return nt.createBytes(n,o)}static createBytes(t,e){let r=0,o=0,n=0;const s=new Array(e.length),a=new Array(e.length);for(var l=0;l<e.length;l++){const T=e[l].dataCount,k=e[l].totalCount-T;o=Math.max(o,T),n=Math.max(n,k),s[l]=new Array(T);for(var h=0;h<s[l].length;h++)s[l][h]=255&t.buffer[h+r];r+=T;const E=M.getErrorCorrectPolynomial(k),U=new ct(s[l],E.getLength()-1).mod(E);a[l]=new Array(E.getLength()-1);for(var h=0;h<a[l].length;h++){const p=h+U.getLength()-a[l].length;a[l][h]=p>=0?U.get(p):0}}let u=0;for(var h=0;h<e.length;h++)u+=e[h].totalCount;const f=new Array(u);let v=0;for(var h=0;h<o;h++)for(var l=0;l<e.length;l++)h<s[l].length&&(f[v++]=s[l][h]);for(var h=0;h<n;h++)for(var l=0;l<e.length;l++)h<a[l].length&&(f[v++]=a[l][h]);return f}}nt.PAD0=236,nt.PAD1=17;const _={L:1,M:0,Q:3,H:2},Y={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3},rt={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};class M{static getBCHTypeInfo(t){let e=t<<10;for(;M.getBCHDigit(e)-M.getBCHDigit(M.G15)>=0;)e^=M.G15<<M.getBCHDigit(e)-M.getBCHDigit(M.G15);return(t<<10|e)^M.G15_MASK}static getBCHTypeNumber(t){let e=t<<12;for(;M.getBCHDigit(e)-M.getBCHDigit(M.G18)>=0;)e^=M.G18<<M.getBCHDigit(e)-M.getBCHDigit(M.G18);return t<<12|e}static getBCHDigit(t){let e=0;for(;t!=0;)e++,t>>>=1;return e}static getPatternPosition(t){return M.PATTERN_POSITION_TABLE[t-1]}static getMask(t,e,r){switch(t){case rt.PATTERN000:return(e+r)%2==0;case rt.PATTERN001:return e%2==0;case rt.PATTERN010:return r%3==0;case rt.PATTERN011:return(e+r)%3==0;case rt.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case rt.PATTERN101:return e*r%2+e*r%3==0;case rt.PATTERN110:return(e*r%2+e*r%3)%2==0;case rt.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error(`bad maskPattern:${t}`)}}static getErrorCorrectPolynomial(t){let e=new ct([1],0);for(let r=0;r<t;r++)e=e.multiply(new ct([1,z.gexp(r)],0));return e}static getLengthInBits(t,e){if(1<=e&&e<10)switch(t){case Y.MODE_NUMBER:return 10;case Y.MODE_ALPHA_NUM:return 9;case Y.MODE_8BIT_BYTE:return 8;case Y.MODE_KANJI:return 8;default:throw new Error(`mode:${t}`)}else if(e<27)switch(t){case Y.MODE_NUMBER:return 12;case Y.MODE_ALPHA_NUM:return 11;case Y.MODE_8BIT_BYTE:return 16;case Y.MODE_KANJI:return 10;default:throw new Error(`mode:${t}`)}else if(e<41)switch(t){case Y.MODE_NUMBER:return 14;case Y.MODE_ALPHA_NUM:return 13;case Y.MODE_8BIT_BYTE:return 16;case Y.MODE_KANJI:return 12;default:throw new Error(`mode:${t}`)}else throw new Error(`type:${e}`)}static getLostPoint(t){const e=t.getModuleCount();let r=0;for(var o=0;o<e;o++)for(var n=0;n<e;n++){let a=0;const l=t.isDark(o,n);for(let h=-1;h<=1;h++)if(!(o+h<0||e<=o+h))for(let u=-1;u<=1;u++)n+u<0||e<=n+u||h==0&&u==0||l==t.isDark(o+h,n+u)&&a++;a>5&&(r+=3+a-5)}for(var o=0;o<e-1;o++)for(var n=0;n<e-1;n++){let h=0;t.isDark(o,n)&&h++,t.isDark(o+1,n)&&h++,t.isDark(o,n+1)&&h++,t.isDark(o+1,n+1)&&h++,(h==0||h==4)&&(r+=3)}for(var o=0;o<e;o++)for(var n=0;n<e-6;n++)t.isDark(o,n)&&!t.isDark(o,n+1)&&t.isDark(o,n+2)&&t.isDark(o,n+3)&&t.isDark(o,n+4)&&!t.isDark(o,n+5)&&t.isDark(o,n+6)&&(r+=40);for(var n=0;n<e;n++)for(var o=0;o<e-6;o++)t.isDark(o,n)&&!t.isDark(o+1,n)&&t.isDark(o+2,n)&&t.isDark(o+3,n)&&t.isDark(o+4,n)&&!t.isDark(o+5,n)&&t.isDark(o+6,n)&&(r+=40);let s=0;for(var n=0;n<e;n++)for(var o=0;o<e;o++)t.isDark(o,n)&&s++;return r+=Math.abs(100*s/e/e-50)/5*10,r}}M.PATTERN_POSITION_TABLE=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],M.G15=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,M.G18=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,M.G15_MASK=1<<14|1<<12|1<<10|1<<4|1<<1;class z{static glog(t){if(t<1)throw new Error(`glog(${t})`);return z.LOG_TABLE[t]}static gexp(t){for(;t<0;)t+=255;for(;t>=256;)t-=255;return z.EXP_TABLE[t]}}z.EXP_TABLE=new Array(256),z.LOG_TABLE=new Array(256),z._constructor=function(){for(var i=0;i<8;i++)z.EXP_TABLE[i]=1<<i;for(var i=8;i<256;i++)z.EXP_TABLE[i]=z.EXP_TABLE[i-4]^z.EXP_TABLE[i-5]^z.EXP_TABLE[i-6]^z.EXP_TABLE[i-8];for(var i=0;i<255;i++)z.LOG_TABLE[z.EXP_TABLE[i]]=i}();class ct{constructor(t,e){if(t.length==null)throw new Error(`${t.length}/${e}`);let r=0;for(;r<t.length&&t[r]==0;)r++;this.num=new Array(t.length-r+e);for(let o=0;o<t.length-r;o++)this.num[o]=t[o+r]}get(t){return this.num[t]}getLength(){return this.num.length}multiply(t){const e=new Array(this.getLength()+t.getLength()-1);for(let r=0;r<this.getLength();r++)for(let o=0;o<t.getLength();o++)e[r+o]^=z.gexp(z.glog(this.get(r))+z.glog(t.get(o)));return new ct(e,0)}mod(t){if(this.getLength()-t.getLength()<0)return this;const e=z.glog(this.get(0))-z.glog(t.get(0)),r=new Array(this.getLength());for(var o=0;o<this.getLength();o++)r[o]=this.get(o);for(var o=0;o<t.getLength();o++)r[o]^=z.gexp(z.glog(t.get(o))+e);return new ct(r,0).mod(t)}}class ot{constructor(t,e){this.totalCount=t,this.dataCount=e}static getRSBlocks(t,e){const r=ot.getRsBlockTable(t,e);if(r==null)throw new Error(`bad rs block @ typeNumber:${t}/errorCorrectLevel:${e}`);const o=r.length/3,n=[];for(let s=0;s<o;s++){const a=r[s*3+0],l=r[s*3+1],h=r[s*3+2];for(let u=0;u<a;u++)n.push(new ot(l,h))}return n}static getRsBlockTable(t,e){switch(e){case _.L:return ot.RS_BLOCK_TABLE[(t-1)*4+0];case _.M:return ot.RS_BLOCK_TABLE[(t-1)*4+1];case _.Q:return ot.RS_BLOCK_TABLE[(t-1)*4+2];case _.H:return ot.RS_BLOCK_TABLE[(t-1)*4+3];default:return}}}ot.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];class Oe{constructor(){this.buffer=[],this.length=0}get(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)==1}put(t,e){for(let r=0;r<e;r++)this.putBit((t>>>e-r-1&1)==1)}getLengthInBits(){return this.length}putBit(t){const e=Math.floor(this.length/8);this.buffer.length<=e&&this.buffer.push(0),t&&(this.buffer[e]|=128>>>this.length%8),this.length++}}const et=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];var je=100,q=256,Ut=q-1,st=4,Ft=16,Tt=1<<Ft,Gt=10,Et=10,Ue=Tt>>Et,Fe=Tt<<Gt-Et,Ge=q>>3,xt=6,ze=1<<xt,$e=Ge*ze,He=30,zt=10,mt=1<<zt,$t=8,Ht=1<<$t,qe=zt+$t,ut=1<<qe,qt=499,Qt=491,_t=487,Xt=503,Qe=3*Xt;function _e(i,t){var e,r,o,n,s;function a(){e=[],r=new Int32Array(256),o=new Int32Array(q),n=new Int32Array(q),s=new Int32Array(q>>3);var d,p;for(d=0;d<q;d++)p=(d<<st+8)/q,e[d]=new Float64Array([p,p,p,0]),n[d]=Tt/q,o[d]=0}function l(){for(var d=0;d<q;d++)e[d][0]>>=st,e[d][1]>>=st,e[d][2]>>=st,e[d][3]=d}function h(d,p,A,g,w){e[p][0]-=d*(e[p][0]-A)/mt,e[p][1]-=d*(e[p][1]-g)/mt,e[p][2]-=d*(e[p][2]-w)/mt}function u(d,p,A,g,w){for(var m=Math.abs(p-d),C=Math.min(p+d,q),B=p+1,R=p-1,L=1,c,O;B<C||R>m;)O=s[L++],B<C&&(c=e[B++],c[0]-=O*(c[0]-A)/ut,c[1]-=O*(c[1]-g)/ut,c[2]-=O*(c[2]-w)/ut),R>m&&(c=e[R--],c[0]-=O*(c[0]-A)/ut,c[1]-=O*(c[1]-g)/ut,c[2]-=O*(c[2]-w)/ut)}function f(d,p,A){var g=2147483647,w=g,m=-1,C=m,B,R,L,c,O;for(B=0;B<q;B++)R=e[B],L=Math.abs(R[0]-d)+Math.abs(R[1]-p)+Math.abs(R[2]-A),L<g&&(g=L,m=B),c=L-(o[B]>>Ft-st),c<w&&(w=c,C=B),O=n[B]>>Et,n[B]-=O,o[B]+=O<<Gt;return n[m]+=Ue,o[m]-=Fe,C}function v(){var d,p,A,g,w,m,C=0,B=0;for(d=0;d<q;d++){for(A=e[d],w=d,m=A[1],p=d+1;p<q;p++)g=e[p],g[1]<m&&(w=p,m=g[1]);if(g=e[w],d!=w&&(p=g[0],g[0]=A[0],A[0]=p,p=g[1],g[1]=A[1],A[1]=p,p=g[2],g[2]=A[2],A[2]=p,p=g[3],g[3]=A[3],A[3]=p),m!=C){for(r[C]=B+d>>1,p=C+1;p<m;p++)r[p]=d;C=m,B=d}}for(r[C]=B+Ut>>1,p=C+1;p<256;p++)r[p]=Ut}function T(d,p,A){for(var g,w,m,C=1e3,B=-1,R=r[p],L=R-1;R<q||L>=0;)R<q&&(w=e[R],m=w[1]-p,m>=C?R=q:(R++,m<0&&(m=-m),g=w[0]-d,g<0&&(g=-g),m+=g,m<C&&(g=w[2]-A,g<0&&(g=-g),m+=g,m<C&&(C=m,B=w[3])))),L>=0&&(w=e[L],m=p-w[1],m>=C?L=-1:(L--,m<0&&(m=-m),g=w[0]-d,g<0&&(g=-g),m+=g,m<C&&(g=w[2]-A,g<0&&(g=-g),m+=g,m<C&&(C=m,B=w[3]))));return B}function k(){var d,p=i.length,A=30+(t-1)/3,g=p/(3*t),w=~~(g/je),m=mt,C=$e,B=C>>xt;for(B<=1&&(B=0),d=0;d<B;d++)s[d]=m*((B*B-d*d)*Ht/(B*B));var R;p<Qe?(t=1,R=3):p%qt!==0?R=3*qt:p%Qt!==0?R=3*Qt:p%_t!==0?R=3*_t:R=3*Xt;var L,c,O,b,j=0;for(d=0;d<g;)if(L=(i[j]&255)<<st,c=(i[j+1]&255)<<st,O=(i[j+2]&255)<<st,b=f(L,c,O),h(m,b,L,c,O),B!==0&&u(B,b,L,c,O),j+=R,j>=p&&(j-=p),d++,w===0&&(w=1),d%w===0)for(m-=m/A,C-=C/He,B=C>>xt,B<=1&&(B=0),b=0;b<B;b++)s[b]=m*((B*B-b*b)*Ht/(B*B))}function E(){a(),k(),l(),v()}this.buildColormap=E;function U(){for(var d=[],p=[],A=0;A<q;A++)p[e[A][3]]=A;for(var g=0,w=0;w<q;w++){var m=p[w];d[g++]=e[m][0],d[g++]=e[m][1],d[g++]=e[m][2]}return d}this.getColormap=U,this.lookupRGB=T}var Kt=-1,wt=12,gt=5003,Xe=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function Ke(i,t,e,r){var o=Math.max(2,r),n=new Uint8Array(256),s=new Int32Array(gt),a=new Int32Array(gt),l,h=0,u,f=0,v,T=!1,k,E,U,d,p,A;function g(b,j){n[u++]=b,u>=254&&R(j)}function w(b){m(gt),f=E+2,T=!0,O(E,b)}function m(b){for(var j=0;j<b;++j)s[j]=-1}function C(b,j){var y,ht,$,W,at,H,Z;for(k=b,T=!1,A=k,v=L(A),E=1<<b-1,U=E+1,f=E+2,u=0,W=c(),Z=0,y=gt;y<65536;y*=2)++Z;Z=8-Z,H=gt,m(H),O(E,j);t:for(;(ht=c())!=Kt;){if(y=(ht<<wt)+W,$=ht<<Z^W,s[$]===y){W=a[$];continue}else if(s[$]>=0){at=H-$,$===0&&(at=1);do if(($-=at)<0&&($+=H),s[$]===y){W=a[$];continue t}while(s[$]>=0)}O(W,j),W=ht,f<1<<wt?(a[$]=f++,s[$]=y):w(j)}O(W,j),O(U,j)}function B(b){b.writeByte(o),d=i*t,p=0,C(o+1,b),b.writeByte(0)}function R(b){u>0&&(b.writeByte(u),b.writeBytes(n,0,u),u=0)}function L(b){return(1<<b)-1}function c(){if(d===0)return Kt;--d;var b=e[p++];return b&255}function O(b,j){for(l&=Xe[h],h>0?l|=b<<h:l=b,h+=A;h>=8;)g(l&255,j),l>>=8,h-=8;if((f>v||T)&&(T?(v=L(A=k),T=!1):(++A,A==wt?v=1<<wt:v=L(A))),b==U){for(;h>0;)g(l&255,j),l>>=8,h-=8;R(j)}}this.encode=B}function K(){this.page=-1,this.pages=[],this.newPage()}K.pageSize=4096,K.charMap={};for(var yt=0;yt<256;yt++)K.charMap[yt]=String.fromCharCode(yt);K.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(K.pageSize),this.cursor=0},K.prototype.getData=function(){for(var i="",t=0;t<this.pages.length;t++)for(var e=0;e<K.pageSize;e++)i+=K.charMap[this.pages[t][e]];return i},K.prototype.toFlattenUint8Array=function(){const i=[];for(var t=0;t<this.pages.length;t++)if(t===this.pages.length-1){const r=Uint8Array.from(this.pages[t].slice(0,this.cursor));i.push(r)}else i.push(this.pages[t]);const e=new Uint8Array(i.reduce((r,o)=>r+o.length,0));return i.reduce((r,o)=>(e.set(o,r),r+o.length),0),e},K.prototype.writeByte=function(i){this.cursor>=K.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=i},K.prototype.writeUTFBytes=function(i){for(var t=i.length,e=0;e<t;e++)this.writeByte(i.charCodeAt(e))},K.prototype.writeBytes=function(i,t,e){for(var r=e||i.length,o=t||0;o<r;o++)this.writeByte(i[o])};function N(i,t){this.width=~~i,this.height=~~t,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.image=null,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.neuQuant=null,this.usedEntry=new Array,this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10,this.dither=!1,this.globalPalette=!1,this.out=new K}N.prototype.setDelay=function(i){this.delay=Math.round(i/10)},N.prototype.setFrameRate=function(i){this.delay=Math.round(100/i)},N.prototype.setDispose=function(i){i>=0&&(this.dispose=i)},N.prototype.setRepeat=function(i){this.repeat=i},N.prototype.setTransparent=function(i){this.transparent=i},N.prototype.addFrame=function(i){this.image=i,this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null,this.getImagePixels(),this.analyzePixels(),this.globalPalette===!0&&(this.globalPalette=this.colorTab),this.firstFrame&&(this.writeHeader(),this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),!this.firstFrame&&!this.globalPalette&&this.writePalette(),this.writePixels(),this.firstFrame=!1},N.prototype.finish=function(){this.out.writeByte(59)},N.prototype.setQuality=function(i){i<1&&(i=1),this.sample=i},N.prototype.setDither=function(i){i===!0&&(i="FloydSteinberg"),this.dither=i},N.prototype.setGlobalPalette=function(i){this.globalPalette=i},N.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette},N.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")},N.prototype.analyzePixels=function(){this.colorTab||(this.neuQuant=new _e(this.pixels,this.sample),this.neuQuant.buildColormap(),this.colorTab=this.neuQuant.getColormap()),this.dither?this.ditherPixels(this.dither.replace("-serpentine",""),this.dither.match(/-serpentine/)!==null):this.indexPixels(),this.pixels=null,this.colorDepth=8,this.palSize=7,this.transparent!==null&&(this.transIndex=this.findClosest(this.transparent,!0))},N.prototype.indexPixels=function(i){var t=this.pixels.length/3;this.indexedPixels=new Uint8Array(t);for(var e=0,r=0;r<t;r++){var o=this.findClosestRGB(this.pixels[e++]&255,this.pixels[e++]&255,this.pixels[e++]&255);this.usedEntry[o]=!0,this.indexedPixels[r]=o}},N.prototype.ditherPixels=function(i,t){var e={FalseFloydSteinberg:[[.375,1,0],[.375,0,1],[.25,1,1]],FloydSteinberg:[[.4375,1,0],[.1875,-1,1],[.3125,0,1],[.0625,1,1]],Stucki:[[.1904761904761905,1,0],[.09523809523809525,2,0],[.047619047619047616,-2,1],[.09523809523809525,-1,1],[.1904761904761905,0,1],[.09523809523809525,1,1],[.047619047619047616,2,1],[.023809523809523808,-2,2],[.047619047619047616,-1,2],[.09523809523809525,0,2],[.047619047619047616,1,2],[.023809523809523808,2,2]],Atkinson:[[.125,1,0],[.125,2,0],[.125,-1,1],[.125,0,1],[.125,1,1],[.125,0,2]]};if(!i||!e[i])throw"Unknown dithering kernel: "+i;var r=e[i],o=0,n=this.height,s=this.width,a=this.pixels,l=t?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var h=0;h<n;h++){t&&(l=l*-1);for(var u=l==1?0:s-1,f=l==1?s:0;u!==f;u+=l){o=h*s+u;var v=o*3,T=a[v],k=a[v+1],E=a[v+2];v=this.findClosestRGB(T,k,E),this.usedEntry[v]=!0,this.indexedPixels[o]=v,v*=3;for(var U=this.colorTab[v],d=this.colorTab[v+1],p=this.colorTab[v+2],A=T-U,g=k-d,w=E-p,m=l==1?0:r.length-1,C=l==1?r.length:0;m!==C;m+=l){var B=r[m][1],R=r[m][2];if(B+u>=0&&B+u<s&&R+h>=0&&R+h<n){var L=r[m][0];v=o+B+R*s,v*=3,a[v]=Math.max(0,Math.min(255,a[v]+A*L)),a[v+1]=Math.max(0,Math.min(255,a[v+1]+g*L)),a[v+2]=Math.max(0,Math.min(255,a[v+2]+w*L))}}}}},N.prototype.findClosest=function(i,t){return this.findClosestRGB((i&16711680)>>16,(i&65280)>>8,i&255,t)},N.prototype.findClosestRGB=function(i,t,e,r){if(this.colorTab===null)return-1;if(this.neuQuant&&!r)return this.neuQuant.lookupRGB(i,t,e);for(var o=0,n=256*256*256,s=this.colorTab.length,a=0,l=0;a<s;l++){var h=i-(this.colorTab[a++]&255),u=t-(this.colorTab[a++]&255),f=e-(this.colorTab[a++]&255),v=h*h+u*u+f*f;(!r||this.usedEntry[l])&&v<n&&(n=v,o=l)}return o},N.prototype.getImagePixels=function(){var i=this.width,t=this.height;this.pixels=new Uint8Array(i*t*3);for(var e=this.image,r=0,o=0,n=0;n<t;n++)for(var s=0;s<i;s++)this.pixels[o++]=e[r++],this.pixels[o++]=e[r++],this.pixels[o++]=e[r++],r++},N.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33),this.out.writeByte(249),this.out.writeByte(4);var i,t;this.transparent===null?(i=0,t=0):(i=1,t=2),this.dispose>=0&&(t=this.dispose&7),t<<=2,this.out.writeByte(0|t|0|i),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},N.prototype.writeImageDesc=function(){this.out.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame||this.globalPalette?this.out.writeByte(0):this.out.writeByte(128|this.palSize)},N.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.out.writeByte(240|this.palSize),this.out.writeByte(0),this.out.writeByte(0)},N.prototype.writeNetscapeExt=function(){this.out.writeByte(33),this.out.writeByte(255),this.out.writeByte(11),this.out.writeUTFBytes("NETSCAPE2.0"),this.out.writeByte(3),this.out.writeByte(1),this.writeShort(this.repeat),this.out.writeByte(0)},N.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);for(var i=3*256-this.colorTab.length,t=0;t<i;t++)this.out.writeByte(0)},N.prototype.writeShort=function(i){this.out.writeByte(i&255),this.out.writeByte(i>>8&255)},N.prototype.writePixels=function(){var i=new Ke(this.width,this.height,this.indexedPixels,this.colorDepth);i.encode(this.out)},N.prototype.stream=function(){return this.out};var Ye=globalThis&&globalThis.__awaiter||function(i,t,e,r){function o(n){return n instanceof e?n:new e(function(s){s(n)})}return new(e||(e=Promise))(function(n,s){function a(u){try{h(r.next(u))}catch(f){s(f)}}function l(u){try{h(r.throw(u))}catch(f){s(f)}}function h(u){u.done?n(u.value):o(u.value).then(a,l)}h((r=r.apply(i,t||[])).next())})};const{Canvas:it}=Te,vt=.4;function Yt(i){if(!i)return;function t(e){e.onload=null,e.onerror=null}return new Promise(function(e,r){if(i.slice(0,4)=="data"){let n=new Image;n.onload=function(){e(n),t(n)},n.onerror=function(){r("Image load error"),t(n)},n.src=i;return}let o=new Image;o.setAttribute("crossOrigin","Anonymous"),o.onload=function(){e(o)},o.onerror=function(){r("Image load error")},o.src=i})}class S{constructor(t){const e=Object.assign({},t);if(Object.keys(S.defaultOptions).forEach(r=>{r in e||Object.defineProperty(e,r,{value:S.defaultOptions[r],enumerable:!0,writable:!0})}),e.components?typeof e.components=="object"&&Object.keys(S.defaultComponentOptions).forEach(r=>{r in e.components?Object.defineProperty(e.components,r,{value:Object.assign(Object.assign({},S.defaultComponentOptions[r]),e.components[r]),enumerable:!0,writable:!0}):Object.defineProperty(e.components,r,{value:S.defaultComponentOptions[r],enumerable:!0,writable:!0})}):e.components=S.defaultComponentOptions,e.dotScale!==null&&e.dotScale!==void 0){if(e.dotScale<=0||e.dotScale>1)throw new Error("dotScale should be in range (0, 1].");e.components.data.scale=e.dotScale,e.components.timing.scale=e.dotScale,e.components.alignment.scale=e.dotScale}this.options=e,this.canvas=new it(t.size,t.size),this.canvasContext=this.canvas.getContext("2d"),this.qrCode=new nt(-1,this.options.correctLevel),Number.isInteger(this.options.maskPattern)&&(this.qrCode.maskPattern=this.options.maskPattern),Number.isInteger(this.options.version)&&(this.qrCode.typeNumber=this.options.version),this.qrCode.addData(this.options.text),this.qrCode.make()}draw(){return new Promise(t=>this._draw().then(t))}_clear(){this.canvasContext.clearRect(0,0,this.canvas.width,this.canvas.height)}static _prepareRoundedCornerClip(t,e,r,o,n,s){t.beginPath(),t.moveTo(e,r),t.arcTo(e+o,r,e+o,r+n,s),t.arcTo(e+o,r+n,e,r+n,s),t.arcTo(e,r+n,e,r,s),t.arcTo(e,r,e+o,r,s),t.closePath()}static _getAverageRGB(t){const e={r:0,g:0,b:0};let r,o,n=-4;const s={r:0,g:0,b:0};let a=0;o=t.naturalHeight||t.height,r=t.naturalWidth||t.width;const l=new it(r,o).getContext("2d");if(!l)return e;l.drawImage(t,0,0);let h;try{h=l.getImageData(0,0,r,o)}catch{return e}for(;(n+=5*4)<h.data.length;)h.data[n]>200||h.data[n+1]>200||h.data[n+2]>200||(++a,s.r+=h.data[n],s.g+=h.data[n+1],s.b+=h.data[n+2]);return s.r=~~(s.r/a),s.g=~~(s.g/a),s.b=~~(s.b/a),s}static _drawDot(t,e,r,o,n=0,s=1){t.fillRect((e+n)*o,(r+n)*o,s*o,s*o)}static _drawAlignProtector(t,e,r,o){t.clearRect((e-2)*o,(r-2)*o,5*o,5*o),t.fillRect((e-2)*o,(r-2)*o,5*o,5*o)}static _drawAlign(t,e,r,o,n=0,s=1,a,l){const h=t.fillStyle;t.fillStyle=a,new Array(4).fill(0).map((u,f)=>{S._drawDot(t,e-2+f,r-2,o,n,s),S._drawDot(t,e+2,r-2+f,o,n,s),S._drawDot(t,e+2-f,r+2,o,n,s),S._drawDot(t,e-2,r+2-f,o,n,s)}),S._drawDot(t,e,r,o,n,s),l||(t.fillStyle="rgba(255, 255, 255, 0.6)",new Array(2).fill(0).map((u,f)=>{S._drawDot(t,e-1+f,r-1,o,n,s),S._drawDot(t,e+1,r-1+f,o,n,s),S._drawDot(t,e+1-f,r+1,o,n,s),S._drawDot(t,e-1,r+1-f,o,n,s)})),t.fillStyle=h}_draw(){var t,e,r,o,n,s,a,l,h,u,f,v,T,k,E,U,d,p,A;return Ye(this,void 0,void 0,function*(){const g=(t=this.qrCode)===null||t===void 0?void 0:t.moduleCount,w=this.options.size;let m=this.options.margin;(m<0||m*2>=w)&&(m=0);const C=Math.ceil(m),B=w-2*m,R=this.options.whiteMargin,L=this.options.backgroundDimming,c=Math.ceil(B/g),O=c*g,b=O+2*C,j=new it(b,b),y=j.getContext("2d");this._clear(),y.save(),y.translate(C,C);const ht=new it(b,b),$=ht.getContext("2d");let W=null,at=[];if(this.options.gifBackground){const D=ke(this.options.gifBackground);if(W=D,at=Ie(D,!0),this.options.autoColor){let P=0,x=0,I=0,Q=0;for(let F=0;F<at[0].colorTable.length;F++){const G=at[0].colorTable[F];G[0]>200||G[1]>200||G[2]>200||G[0]===0&&G[1]===0&&G[2]===0||(Q++,P+=G[0],x+=G[1],I+=G[2])}P=~~(P/Q),x=~~(x/Q),I=~~(I/Q),this.options.colorDark=`rgb(${P},${x},${I})`}}else if(this.options.backgroundImage){const D=yield Yt(this.options.backgroundImage);if(this.options.autoColor){const P=S._getAverageRGB(D);this.options.colorDark=`rgb(${P.r},${P.g},${P.b})`}$.drawImage(D,0,0,D.width,D.height,0,0,b,b),$.rect(0,0,b,b),$.fillStyle=L,$.fill()}else $.rect(0,0,b,b),$.fillStyle=this.options.colorLight,$.fill();const H=M.getPatternPosition(this.qrCode.typeNumber),Z=((r=(e=this.options.components)===null||e===void 0?void 0:e.data)===null||r===void 0?void 0:r.scale)||vt,Wt=(1-Z)*.5;for(let D=0;D<g;D++)for(let P=0;P<g;P++){const x=this.qrCode.isDark(D,P),I=P<8&&(D<8||D>=g-8)||P>=g-8&&D<8,Q=D==6&&P>=8&&P<=g-8||P==6&&D>=8&&D<=g-8;let F=I||Q;for(let X=1;X<H.length-1;X++)F=F||D>=H[X]-2&&D<=H[X]+2&&P>=H[X]-2&&P<=H[X]+2;const G=P*c+(F?0:Wt*c),V=D*c+(F?0:Wt*c);if(y.strokeStyle=x?this.options.colorDark:this.options.colorLight,y.lineWidth=.5,y.fillStyle=x?this.options.colorDark:this.options.colorLight,H.length===0)F||y.fillRect(G,V,(F?1:Z)*c,(F?1:Z)*c);else{const X=P<g-4&&P>=g-4-5&&D<g-4&&D>=g-4-5;!F&&!X&&y.fillRect(G,V,(F?1:Z)*c,(F?1:Z)*c)}}const J=H[H.length-1],Ve=this.options.colorLight;if(y.fillStyle=Ve,y.fillRect(0,0,8*c,8*c),y.fillRect(0,(g-8)*c,8*c,8*c),y.fillRect((g-8)*c,0,8*c,8*c),!((n=(o=this.options.components)===null||o===void 0?void 0:o.timing)===null||n===void 0)&&n.protectors&&(y.fillRect(8*c,6*c,(g-8-8)*c,c),y.fillRect(6*c,8*c,c,(g-8-8)*c)),!((a=(s=this.options.components)===null||s===void 0?void 0:s.cornerAlignment)===null||a===void 0)&&a.protectors&&S._drawAlignProtector(y,J,J,c),!((h=(l=this.options.components)===null||l===void 0?void 0:l.alignment)===null||h===void 0)&&h.protectors)for(let D=0;D<H.length;D++)for(let P=0;P<H.length;P++){const x=H[P],I=H[D];if(!(x===6&&(I===6||I===J))){if(I===6&&(x===6||x===J)||x===J&&I===J)continue;S._drawAlignProtector(y,x,I,c)}}y.fillStyle=this.options.colorDark,y.fillRect(0,0,7*c,c),y.fillRect((g-7)*c,0,7*c,c),y.fillRect(0,6*c,7*c,c),y.fillRect((g-7)*c,6*c,7*c,c),y.fillRect(0,(g-7)*c,7*c,c),y.fillRect(0,(g-7+6)*c,7*c,c),y.fillRect(0,0,c,7*c),y.fillRect(6*c,0,c,7*c),y.fillRect((g-7)*c,0,c,7*c),y.fillRect((g-7+6)*c,0,c,7*c),y.fillRect(0,(g-7)*c,c,7*c),y.fillRect(6*c,(g-7)*c,c,7*c),y.fillRect(2*c,2*c,3*c,3*c),y.fillRect((g-7+2)*c,2*c,3*c,3*c),y.fillRect(2*c,(g-7+2)*c,3*c,3*c);const kt=((f=(u=this.options.components)===null||u===void 0?void 0:u.timing)===null||f===void 0?void 0:f.scale)||vt,Zt=(1-kt)*.5;for(let D=0;D<g-8;D+=2)S._drawDot(y,8+D,6,c,Zt,kt),S._drawDot(y,6,8+D,c,Zt,kt);const Vt=((T=(v=this.options.components)===null||v===void 0?void 0:v.cornerAlignment)===null||T===void 0?void 0:T.scale)||vt,tr=(1-Vt)*.5;S._drawAlign(y,J,J,c,tr,Vt,this.options.colorDark,((E=(k=this.options.components)===null||k===void 0?void 0:k.cornerAlignment)===null||E===void 0?void 0:E.protectors)||!1);const te=((d=(U=this.options.components)===null||U===void 0?void 0:U.alignment)===null||d===void 0?void 0:d.scale)||vt,er=(1-te)*.5;for(let D=0;D<H.length;D++)for(let P=0;P<H.length;P++){const x=H[P],I=H[D];if(!(x===6&&(I===6||I===J))){if(I===6&&(x===6||x===J)||x===J&&I===J)continue;S._drawAlign(y,x,I,c,er,te,this.options.colorDark,((A=(p=this.options.components)===null||p===void 0?void 0:p.alignment)===null||A===void 0?void 0:A.protectors)||!1)}}if(R&&(y.fillStyle=this.options.backgroundColor,y.fillRect(-C,-C,b,C),y.fillRect(-C,O,b,C),y.fillRect(O,-C,C,b),y.fillRect(-C,-C,C,b)),this.options.logoImage){const D=yield Yt(this.options.logoImage);let P=this.options.logoScale,x=this.options.logoMargin,I=this.options.logoCornerRadius;(P<=0||P>=1)&&(P=.2),x<0&&(x=0),I<0&&(I=0);const Q=O*P,F=.5*(b-Q),G=F;y.restore(),y.fillStyle=this.options.logoBackgroundColor,y.save(),S._prepareRoundedCornerClip(y,F-x,G-x,Q+2*x,Q+2*x,I+x),y.clip();const V=y.globalCompositeOperation;y.globalCompositeOperation="destination-out",y.fill(),y.globalCompositeOperation=V,y.restore(),y.save(),S._prepareRoundedCornerClip(y,F,G,Q,Q,I),y.clip(),y.drawImage(D,F,G,Q,Q),y.restore(),y.save(),y.translate(C,C)}if(W){let D,P,x,I,Q,F;if(at.forEach(function(G){D||(D=new N(w,w),D.setDelay(G.delay),D.setRepeat(0));const{width:V,height:X}=G.dims;P||(P=new it(V,X),x=P.getContext("2d"),x.rect(0,0,P.width,P.height),x.fillStyle="#ffffff",x.fill()),(!I||!F||V!==I.width||X!==I.height)&&(I=new it(V,X),Q=I.getContext("2d"),F=Q.createImageData(V,X)),F.data.set(G.patch),Q.putImageData(F,0,0),x.drawImage(I.getContext("2d").canvas,G.dims.left,G.dims.top);const ee=new it(b,b),ft=ee.getContext("2d");ft.drawImage(P.getContext("2d").canvas,0,0,b,b),ft.rect(0,0,b,b),ft.fillStyle=L,ft.fill(),ft.drawImage(j.getContext("2d").canvas,0,0,b,b);const Rt=new it(w,w),re=Rt.getContext("2d");re.drawImage(ee.getContext("2d").canvas,0,0,w,w),D.addFrame(re.getImageData(0,0,Rt.width,Rt.height).data)}),!D)throw new Error("No frames.");if(D.finish(),Jt(this.canvas)){const G=D.stream().toFlattenUint8Array().reduce((V,X)=>V+String.fromCharCode(X),"");return Promise.resolve(`data:image/gif;base64,${window.btoa(G)}`)}return Promise.resolve(Buffer.from(D.stream().toFlattenUint8Array()))}else{$.drawImage(j.getContext("2d").canvas,0,0,b,b),y.drawImage(ht.getContext("2d").canvas,-C,-C,b,b);const D=new it(w,w);D.getContext("2d").drawImage(j.getContext("2d").canvas,0,0,w,w),this.canvas=D;const P=this.options.gifBackground?"gif":"png";return Jt(this.canvas)?Promise.resolve(this.canvas.toDataURL(P)):Promise.resolve(this.canvas.toBuffer(P))}})}}S.CorrectLevel=_,S.defaultComponentOptions={data:{scale:.4},timing:{scale:.5,protectors:!1},alignment:{scale:.5,protectors:!1},cornerAlignment:{scale:.5,protectors:!0}},S.defaultOptions={text:"",size:400,margin:20,colorDark:"#000000",colorLight:"rgba(255, 255, 255, 0.6)",correctLevel:_.M,backgroundImage:void 0,backgroundDimming:"rgba(0,0,0,0)",logoImage:void 0,logoScale:.2,logoMargin:4,logoCornerRadius:8,whiteMargin:!0,components:S.defaultComponentOptions,autoColor:!0,logoBackgroundColor:"#ffffff",backgroundColor:"#ffffff"};function Jt(i){try{return i instanceof HTMLElement}catch{return typeof i=="object"&&i.nodeType===1&&typeof i.style=="object"&&typeof i.ownerDocument=="object"}}const Je={props:{text:{type:String,required:!0},qid:{type:String},correctLevel:{type:Number,default:1},size:{type:Number,default:200},margin:{type:Number,default:20},colorDark:{type:String,default:"#000000"},colorLight:{type:String,default:"#FFFFFF"},bgSrc:{type:String,default:void 0},background:{type:String,default:"rgba(0,0,0,0)"},backgroundDimming:{type:String,default:"rgba(0,0,0,0)"},logoSrc:{type:String,default:void 0},logoBackgroundColor:{type:String,default:"rgba(255,255,255,1)"},gifBgSrc:{type:String,default:void 0},logoScale:{type:Number,default:.2},logoMargin:{type:Number,default:0},logoCornerRadius:{type:Number,default:8},whiteMargin:{type:[Boolean,String],default:!0},dotScale:{type:Number,default:1},autoColor:{type:[Boolean,String],default:!0},binarize:{type:[Boolean,String],default:!1},binarizeThreshold:{type:Number,default:128},callback:{type:Function,default:function(){}},bindElement:{type:Boolean,default:!0},backgroundColor:{type:String,default:"#FFFFFF"},components:{default:function(){return{data:{scale:1},timing:{scale:1,protectors:!1},alignment:{scale:1,protectors:!1},cornerAlignment:{scale:1,protectors:!0}}}}},name:"vue-qr",data(){return{imgUrl:""}},watch:{$props:{deep:!0,handler(){this.main()}}},mounted(){this.main()},methods:{async main(){if(this.gifBgSrc){const e=await ie(this.gifBgSrc),r=this.logoSrc;this.render(void 0,r,e);return}const i=this.bgSrc,t=this.logoSrc;this.render(i,t)},async render(i,t,e){const r=this;new S({gifBackground:e,text:r.text,size:r.size,margin:r.margin,colorDark:r.colorDark,colorLight:r.colorLight,backgroundColor:r.backgroundColor,backgroundImage:i,backgroundDimming:r.backgroundDimming,logoImage:t,logoScale:r.logoScale,logoBackgroundColor:r.logoBackgroundColor,correctLevel:r.correctLevel,logoMargin:r.logoMargin,logoCornerRadius:r.logoCornerRadius,whiteMargin:bt(r.whiteMargin),dotScale:r.dotScale,autoColor:bt(r.autoColor),binarize:bt(r.binarize),binarizeThreshold:r.binarizeThreshold,components:r.components}).draw().then(o=>{this.imgUrl=o,r.callback&&r.callback(o,r.qid)})}}},We=["src"];function Ze(i,t,e,r,o,n){return e.bindElement?(nr(),sr("img",{key:0,style:{display:"inline-block"},src:o.imgUrl},null,8,We)):ar("",!0)}oe=St(Je,[["render",Ze]])})();export{St as _,lr as __tla,oe as v};
