diff --git a/dist/js/field.js b/dist/js/field.js index 0686f7a..87cf897 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1,2 +1,2 @@ /*! For license information please see field.js.LICENSE.txt */ -(()=>{var t,e={270:(t,e,r)=>{"use strict";const n=Vue;const o=["src"];function i(t){return""===t?t:"true"===t||"1"==t}const s=function(t,e){return new Promise(((e,r)=>{var n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsArrayBuffer(n.response)},n.open("GET",t),n.send()}))};var a=r(155);function l(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function h(t,e){for(var r,n="",o=0,i=-1,s=0,a=0;a<=t.length;++a){if(a2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",o=0):o=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=a,s=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=a,s=0;continue}e&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var u={resolve:function(){for(var t,e="",r=!1,n=arguments.length-1;n>=-1&&!r;n--){var o;n>=0?o=arguments[n]:(void 0===t&&(t=a.cwd()),o=t),l(o),0!==o.length&&(e=o+"/"+e,r=47===o.charCodeAt(0))}return e=h(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(l(t),0===t.length)return".";var e=47===t.charCodeAt(0),r=47===t.charCodeAt(t.length-1);return 0!==(t=h(t,!e)).length||e||(t="."),t.length>0&&r&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return l(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e0&&(void 0===t?t=r:t+="/"+r)}return void 0===t?".":u.normalize(t)},relative:function(t,e){if(l(t),l(e),t===e)return"";if((t=u.resolve(t))===(e=u.resolve(e)))return"";for(var r=1;ra){if(47===e.charCodeAt(i+c))return e.slice(i+c+1);if(0===c)return e.slice(i+c)}else o>a&&(47===t.charCodeAt(r+c)?h=c:0===c&&(h=0));break}var f=t.charCodeAt(r+c);if(f!==e.charCodeAt(i+c))break;47===f&&(h=c)}var g="";for(c=r+h+1;c<=n;++c)c!==n&&47!==t.charCodeAt(c)||(0===g.length?g+="..":g+="/..");return g.length>0?g+e.slice(i+h):(i+=h,47===e.charCodeAt(i)&&++i,e.slice(i))},_makeLong:function(t){return t},dirname:function(t){if(l(t),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,o=!0,i=t.length-1;i>=1;--i)if(47===(e=t.charCodeAt(i))){if(!o){n=i;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"//":t.slice(0,n)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');l(t);var r,n=0,o=-1,i=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,a=-1;for(r=t.length-1;r>=0;--r){var h=t.charCodeAt(r);if(47===h){if(!i){n=r+1;break}}else-1===a&&(i=!1,a=r+1),s>=0&&(h===e.charCodeAt(s)?-1==--s&&(o=r):(s=-1,o=a))}return n===o?o=a:-1===o&&(o=t.length),t.slice(n,o)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!i){n=r+1;break}}else-1===o&&(i=!1,o=r+1);return-1===o?"":t.slice(n,o)},extname:function(t){l(t);for(var e=-1,r=0,n=-1,o=!0,i=0,s=t.length-1;s>=0;--s){var a=t.charCodeAt(s);if(47!==a)-1===n&&(o=!1,n=s+1),46===a?-1===e?e=s:1!==i&&(i=1):-1!==e&&(i=-1);else if(!o){r=s+1;break}}return-1===e||-1===n||0===i||1===i&&e===n-1&&e===r+1?"":t.slice(e,n)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+t+n:n}("/",t)},parse:function(t){l(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var r,n=t.charCodeAt(0),o=47===n;o?(e.root="/",r=1):r=0;for(var i=-1,s=0,a=-1,h=!0,u=t.length-1,c=0;u>=r;--u)if(47!==(n=t.charCodeAt(u)))-1===a&&(h=!1,a=u+1),46===n?-1===i?i=u:1!==c&&(c=1):-1!==i&&(c=-1);else if(!h){s=u+1;break}return-1===i||-1===a||0===c||1===c&&i===a-1&&i===s+1?-1!==a&&(e.base=e.name=0===s&&o?t.slice(1,a):t.slice(s,a)):(0===s&&o?(e.name=t.slice(1,i),e.base=t.slice(1,a)):(e.name=t.slice(s,i),e.base=t.slice(s,a)),e.ext=t.slice(i,a)),s>0?e.dir=t.slice(0,s-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};u.posix=u;const c=u.extname,f=u.basename;class g{constructor(){let t=void 0===r.g,e="image/png",n="image/jpeg",o="image/jpeg",i="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:n,jpeg:o,webp:i}:{png:e,jpg:n,jpeg:o,pdf:s,svg:a},mimes:t?{[e]:"png",[n]:"jpg",[i]:"webp"}:{[e]:"png",[n]:"jpg",[s]:"pdf",[a]:"svg"}})}toMime(t){return this.formats[(t||"").replace(/^\./,"").toLowerCase()]}fromMime(t){return this.mimes[t]}}class d{static for(t){return(new d).append(t).get()}constructor(){this.crc=-1}get(){return~this.crc}append(t){for(var e=0|this.crc,r=this.table,n=0,o=0|t.length;n>>8^r[255&(e^t[n])];return this.crc=e,this}}function p(t){let e=new Uint8Array(t),r=new DataView(e.buffer),n={array:e,view:r,size:t,set8:(t,e)=>(r.setUint8(t,e),n),set16:(t,e)=>(r.setUint16(t,e,!0),n),set32:(t,e)=>(r.setUint32(t,e,!0),n),bytes:(t,r)=>(e.set(r,t),n)};return n}d.prototype.table=(()=>{var t,e,r,n=[];for(t=0;t<256;t++){for(r=t,e=0;e<8;e++)r=1&r?r>>>1^3988292384:r>>>1;n[t]=r}return n})();class m{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,n=m.encoder.encode(`${this.directory}/${r?"":t}`),o=new Uint8Array(r?0:await e.arrayBuffer()),i=30+n.length,s=i+o.length,{offset:a}=this,l=p(26).set32(0,134742036).set16(6,this.time).set16(8,this.date).set32(10,d.for(o)).set32(14,o.length).set32(18,o.length).set16(22,n.length);a+=i;let h=p(i+o.length+16).set32(0,67324752).bytes(4,l.array).bytes(30,n).bytes(i,o);a+=o.length,h.set32(s,134695760).bytes(s+4,l.array.slice(10,22)),a+=16,this.files.push({offset:a,folder:r,name:n,header:l,payload:h}),this.offset=a}toBuffer(){let t=this.files.reduce(((t,{name:e})=>46+e.length+t),0),e=p(t+22),r=0;for(var{offset:n,name:o,header:i,folder:s}of this.files)e.set32(r,33639248).set16(r+4,20).bytes(r+6,i.array).set8(r+38,s?16:0).set32(r+42,n).bytes(r+46,o),r+=46+o.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 a=new Uint8Array(this.offset+e.size),l=0;for(var{payload:h}of this.files)a.set(h.array,l),l+=h.size;return a.set(e.array,l),a}get blob(){return new Blob([this.toBuffer()],{type:"application/zip"})}}m.encoder=new TextEncoder;const y=(t,e,r,n)=>{if(n){let{width:e,height:r}=t,o=Object.assign(document.createElement("canvas"),{width:e,height:r}),i=o.getContext("2d");i.fillStyle=n,i.fillRect(0,0,e,r),i.drawImage(t,0,0),t=o}return new Promise(((n,o)=>t.toBlob(n,e,r)))},w=(t,e)=>{const r=window.URL.createObjectURL(e),n=document.createElement("a");n.style.display="none",n.href=r,n.setAttribute("download",t),void 0===n.download&&n.setAttribute("target","_blank"),document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout((()=>window.URL.revokeObjectURL(r)),100)},v={asBuffer:(...t)=>y(...t).then((t=>t.arrayBuffer())),asDownload:async(t,e,r,n,o)=>{w(o,await y(t,e,r,n))},asZipDownload:async(t,e,r,n,o,i,s)=>{let a=f(o,".zip")||"archive",l=new m(a);await Promise.all(t.map((async(t,o)=>{let a=(t=>i.replace("{}",String(t+1).padStart(s,"0")))(o);await l.add(a,await y(t,e,r,n))}))),w(`${a}.zip`,l.blob)},atScale:(t,e,r)=>t.map((t=>{if(1==e&&!r)return t.canvas;let n=document.createElement("canvas"),o=n.getContext("2d"),i=t.canvas?t.canvas:t;return n.width=i.width*e,n.height=i.height*e,r&&(o.fillStyle=r,o.fillRect(0,0,n.width,n.height)),o.scale(e,e),o.drawImage(i,0,0),n})),options:function(t,{filename:e="",extension:r="",format:n,page:o,quality:i,matte:s,density:a,outline:l,archive:h}={}){var{fromMime:u,toMime:d,expected:p}=new g,m=(h=h||"canvas",n||r.replace(/@\d+x$/i,"")||c(e)),y=(n=u(d(m)||m),d(n)),w=t.length;if(!m)throw new Error("Cannot determine image format (use a filename extension or 'format' argument)");if(!n)throw new Error(`Unsupported file format "${m}" (expected ${p})`);if(!w)throw new RangeError("Canvas has no associated contexts (try calling getContext or newPage first)");let v,b,A=e.replace(/{(\d*)}/g,((t,e)=>(b=!0,e=parseInt(e,10),v=isFinite(e)?e:isFinite(v)?v:-1,"{}"))),C=o>0?o-1:o<0?w+o:void 0;if(isFinite(C)&&C<0||C>=w)throw new RangeError(1==w?`Canvas only has a ‘page 1’ (${C} is out of bounds)`:`Canvas has pages 1–${w} (${C} is out of bounds)`);if(t=isFinite(C)?[t[C]]:b||"pdf"==n?t:t.slice(-1),void 0===i)i=.92;else if("number"!=typeof i||!isFinite(i)||i<0||i>1)throw new TypeError("The quality option must be an number in the 0.0–1.0 range");if(void 0===a){let t=(r||f(e,m)).match(/@(\d+)x$/i);a=t?parseInt(t[1],10):1}else if("number"!=typeof a||!Number.isInteger(a)||a<1)throw new TypeError("The density option must be a non-negative integer");return void 0===l?l=!0:"svg"==n&&(l=!!l),{filename:e,pattern:A,format:n,mime:y,pages:t,padding:v,quality:i,matte:s,density:a,outline:l,archive:h}}},b=v,{asBuffer:A,asDownload:C,asZipDownload:E,atScale:T,options:P}=b,B=Symbol.for("toDataURL");const{CanvasRenderingContext2D:R,CanvasGradient:x,CanvasPattern:S,Image:_,ImageData:D,Path2D:k,DOMMatrix:L,DOMRect:I,DOMPoint:M}=window,O={Canvas:class{constructor(t,e){let r=document.createElement("canvas"),n=[];for(var[o,i]of(Object.defineProperty(r,"async",{value:!0,writable:!1,enumerable:!0}),Object.entries({png:()=>A(r,"image/png"),jpg:()=>A(r,"image/jpeg"),pages:()=>n.concat(r).map((t=>t.getContext("2d")))})))Object.defineProperty(r,o,{get:i});return Object.assign(r,{width:t,height:e,newPage(...t){var{width:e,height:o}=r,i=Object.assign(document.createElement("canvas"),{width:e,height:o});i.getContext("2d").drawImage(r,0,0),n.push(i);var[e,o]=t.length?t:[e,o];return Object.assign(r,{width:e,height:o}).getContext("2d")},saveAs(t,e){e="number"==typeof e?{quality:e}:e;let r=P(this.pages,{filename:t,...e}),{pattern:n,padding:o,mime:i,quality:s,matte:a,density:l,archive:h}=r,u=T(r.pages,l);return null==o?C(u[0],i,s,a,t):E(u,i,s,a,h,n,o)},toBuffer(t="png",e={}){e="number"==typeof e?{quality:e}:e;let r=P(this.pages,{extension:t,...e}),{mime:n,quality:o,matte:i,pages:s,density:a}=r,l=T(s,a,i)[0];return A(l,n,o,i)},[B]:r.toDataURL.bind(r),toDataURL(t="png",e={}){e="number"==typeof e?{quality:e}:e;let n=P(this.pages,{extension:t,...e}),{mime:o,quality:i,matte:s,pages:a,density:l}=n,h=T(a,l,s)[0],u=h[h===r?B:"toDataURL"](o,i);return Promise.resolve(u)}})}},loadImage:t=>new Promise(((e,r)=>Object.assign(new _,{crossOrigin:"Anonymous",onload:e,onerror:r,src:t}))),CanvasRenderingContext2D:R,CanvasGradient:x,CanvasPattern:S,Image:_,ImageData:D,Path2D:k,DOMMatrix:L,DOMRect:I,DOMPoint:M},U=(t,e,r={},n=r)=>{if(Array.isArray(e))e.forEach((e=>U(t,e,r,n)));else if("function"==typeof e)e(t,r,n,U);else{const o=Object.keys(e)[0];Array.isArray(e[o])?(n[o]={},U(t,e[o],r,n[o])):n[o]=e[o](t,r,n,U)}return r},N=(t,e)=>(r,n,o,i)=>{e(r,n,o)&&i(r,t,n,o)},j=(t=0)=>e=>e.data[e.pos+t],z=t=>e=>e.data.subarray(e.pos,e.pos+=t),F=t=>e=>e.data.subarray(e.pos,e.pos+t),Y=t=>e=>Array.from(z(t)(e)).map((t=>String.fromCharCode(t))).join(""),q=t=>e=>{const r=z(2)(e);return t?(r[1]<<8)+r[0]:(r[0]<<8)+r[1]},$=(t,e)=>(r,n,o)=>{const i="function"==typeof e?e(r,n,o):e,s=z(t),a=new Array(i);for(var l=0;le=>{const r=(t=>t.data[t.pos++])(e),n=new Array(8);for(var o=0;o<8;o++)n[7-o]=!!(r&1<{const o=t[r];return o.length?e[r]=((t,e,r)=>{for(var n=0,o=0;o{const e=[],r=t.data.length;for(var n=0,o=(t=>t.data[t.pos++])(t);0!==o&&o;o=(t=>t.data[t.pos++])(t)){if(t.pos+o>=r){const o=r-t.pos;e.push(z(o)(t)),n+=o;break}e.push(z(o)(t)),n+=o}const i=new Uint8Array(n);for(var s=0,a=0;at.data[t.pos++]},{extras:G({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:q(!0)},{transparentColorIndex:t=>t.data[t.pos++]},{terminator:t=>t.data[t.pos++]}]},(t=>{var e=F(2)(t);return 33===e[0]&&249===e[1]})),Z=N({image:[{code:t=>t.data[t.pos++]},{descriptor:[{left:q(!0)},{top:q(!0)},{width:q(!0)},{height:q(!0)},{lct:G({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},N({lct:$(3,((t,e,r)=>Math.pow(2,r.descriptor.lct.size+1)))},((t,e,r)=>r.descriptor.lct.exists)),{data:[{minCodeSize:t=>t.data[t.pos++]},H]}]},(t=>44===j()(t))),K=N({text:[{codes:z(2)},{blockSize:t=>t.data[t.pos++]},{preData:(t,e,r)=>z(r.text.blockSize)(t)},H]},(t=>{var e=F(2)(t);return 33===e[0]&&1===e[1]})),X=N({application:[{codes:z(2)},{blockSize:t=>t.data[t.pos++]},{id:(t,e,r)=>Y(r.blockSize)(t)},H]},(t=>{var e=F(2)(t);return 33===e[0]&&255===e[1]})),V=N({comment:[{codes:z(2)},H]},(t=>{var e=F(2)(t);return 33===e[0]&&254===e[1]})),J=[{header:[{signature:Y(3)},{version:Y(3)}]},{lsd:[{width:q(!0)},{height:q(!0)},{gct:G({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:t=>t.data[t.pos++]},{pixelAspectRatio:t=>t.data[t.pos++]}]},N({gct:$(3,((t,e)=>Math.pow(2,e.lsd.gct.size+1)))},((t,e)=>e.lsd.gct.exists)),{frames:((t,e)=>(r,n,o,i)=>{const s=[];let a=r.pos;for(;e(r,n,o);){const e={};if(i(r,t,n,e),r.pos===a)break;a=r.pos,s.push(e)}return s})([Q,X,V,Z,K],(t=>{var e=j()(t);return 33===e||44===e}))}],W=J,tt=t=>{const e=new Uint8Array(t);return U({data:e,pos:0},W)},et=(t,e,r)=>{if(!t.image)return void console.warn("gif frame does not have associated image.");const{image:n}=t,o=n.descriptor.width*n.descriptor.height;var i=((t,e,r)=>{const n=4096,o=r;var i,s,a,l,h,u,c,f,g,d;const p=new Array(r),m=new Array(n),y=new Array(n),w=new Array(4097);for(h=1+(s=1<<(d=t)),i=s+2,c=-1,a=(1<<(l=d+1))-1,f=0;f>=l,b-=l,f>i||f==h)break;if(f==s){a=(1<<(l=d+1))-1,i=s+2,c=-1;continue}if(-1==c){w[C++]=y[f],c=f,A=f;continue}for(u=f,f==i&&(w[C++]=A,f=c);f>s;)w[C++]=y[f],f=m[f];A=255&y[f],w[C++]=A,i{const r=new Array(t.length),n=t.length/e,o=function(n,o){const i=t.slice(o*e,(o+1)*e);r.splice.apply(r,[n*e,e].concat(i))},i=[0,4,2,1],s=[8,8,4,2];for(var a=0,l=0;l<4;l++)for(var h=i[l];h{const e=t.pixels.length,r=new Uint8ClampedArray(4*e);for(var n=0;n65536?(r[0]=240|(1835008&n)>>>18,r[1]=128|(258048&n)>>>12,r[2]=128|(4032&n)>>>6,r[3]=128|63&n):n>2048?(r[0]=224|(61440&n)>>>12,r[1]=128|(4032&n)>>>6,r[2]=128|63&n):n>128?(r[0]=192|(1984&n)>>>6,r[1]=128|63&n):r[0]=n,e.push(r)}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;egt.length)throw new Error("Too long data");return r}(t,this.errorCorrectLevel);else{if(this.typeNumber>40)throw new Error(`Invalid QR version: ${this.typeNumber}`);if(!function(t,e,r){const n=rt(e),o=t-1;let i=0;switch(r){case it.L:i=gt[o][0];break;case it.M:i=gt[o][1];break;case it.Q:i=gt[o][2];break;case it.H:i=gt[o][3]}return n<=i}(this.typeNumber,t,this.errorCorrectLevel))throw new Error(`Data is too long for QR version: ${this.typeNumber}`)}const e=new nt(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=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(let t=0;t=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=ot.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 n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(this.modules[t+r][e+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)}getBestMaskPattern(){if(Number.isInteger(this.maskPattern)&&Object.values(at).includes(this.maskPattern))return this.maskPattern;let t=0,e=0;for(let r=0;r<8;r++){this.makeImpl(!0,r);const n=lt.getLostPoint(this);(0==r||t>n)&&(t=n,e=r)}return e}setupTimingPattern(){for(let t=8;t>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++){n=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}}setupTypeInfo(t,e){const r=this.errorCorrectLevel<<3|e,n=lt.getBCHTypeInfo(r);for(var o=0;o<15;o++){var i=!t&&1==(n>>o&1);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!t&&1==(n>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let r=-1,n=this.moduleCount-1,o=7,i=0;for(let s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(let r=0;r<2;r++)if(null==this.modules[n][s-r]){let a=!1;i>>o&1));lt.getMask(e,n,s-r)&&(a=!a),this.modules[n][s-r]=a,o--,-1==o&&(i++,o=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}static createData(t,e,r){const n=ct.getRSBlocks(t,e),o=new ft;for(var i=0;i8*s)throw new Error(`code length overflow. (${o.getLengthInBits()}>${8*s})`);for(o.getLengthInBits()+4<=8*s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*s||(o.put(ot.PAD0,8),o.getLengthInBits()>=8*s));)o.put(ot.PAD1,8);return ot.createBytes(o,n)}static createBytes(t,e){let r=0,n=0,o=0;const i=new Array(e.length),s=new Array(e.length);for(var a=0;a=0?f.get(t):0}}let h=0;for(l=0;l=0;)e^=lt.G15<=0;)e^=lt.G18<>>=1;return e}static getPatternPosition(t){return lt.PATTERN_POSITION_TABLE[t-1]}static getMask(t,e,r){switch(t){case at.PATTERN000:return(e+r)%2==0;case at.PATTERN001:return e%2==0;case at.PATTERN010:return r%3==0;case at.PATTERN011:return(e+r)%3==0;case at.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case at.PATTERN101:return e*r%2+e*r%3==0;case at.PATTERN110:return(e*r%2+e*r%3)%2==0;case at.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error(`bad maskPattern:${t}`)}}static getErrorCorrectPolynomial(t){let e=new ut([1],0);for(let r=0;r5&&(r+=3+i-5)}for(n=0;n=256;)t-=255;return ht.EXP_TABLE[t]}}ht.EXP_TABLE=new Array(256),ht.LOG_TABLE=new Array(256),ht._constructor=function(){for(var t=0;t<8;t++)ht.EXP_TABLE[t]=1<>>7-t%8&1)}put(t,e){for(let r=0;r>>e-r-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 gt=[[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 dt=256,pt=1024,mt=1<<18;const yt=function(t,e){var r,n,o,i,s;function a(t,e,n,o,i){r[e][0]-=t*(r[e][0]-n)/pt,r[e][1]-=t*(r[e][1]-o)/pt,r[e][2]-=t*(r[e][2]-i)/pt}function l(t,e,n,o,i){for(var a,l,h=Math.abs(e-t),u=Math.min(e+t,dt),c=e+1,f=e-1,g=1;ch;)l=s[g++],ch&&((a=r[f--])[0]-=l*(a[0]-n)/mt,a[1]-=l*(a[1]-o)/mt,a[2]-=l*(a[2]-i)/mt)}function h(t,e,n){var s,a,l,h,u,c=~(1<<31),f=c,g=-1,d=g;for(s=0;s>12))>10,i[s]-=u,o[s]+=u<<10;return i[g]+=64,o[g]-=65536,d}this.buildColormap=function(){!function(){var t,e;for(r=[],n=new Int32Array(256),o=new Int32Array(dt),i=new Int32Array(dt),s=new Int32Array(32),t=0;t>6;for(w<=1&&(w=0),r=0;r=f&&(v-=f),0===p&&(p=1),++r%p==0)for(m-=m/g,(w=(y-=y/30)>>6)<=1&&(w=0),c=0;c>=4,r[t][1]>>=4,r[t][2]>>=4,r[t][3]=t}(),function(){var t,e,o,i,s,a,l=0,h=0;for(t=0;t>1,e=l+1;e>1,e=l+1;e<256;e++)n[e]=255}()},this.getColormap=function(){for(var t=[],e=[],n=0;n=0;)u=l?u=dt:(u++,a<0&&(a=-a),(i=s[0]-t)<0&&(i=-i),(a+=i)=0&&((a=e-(s=r[c])[1])>=l?c=-1:(c--,a<0&&(a=-a),(i=s[0]-t)<0&&(i=-i),(a+=i)=254&&E(e)}function A(t){C(wt),w=l+2,v=!0,B(l,t)}function C(t){for(var e=0;e0&&(t.writeByte(i),t.writeBytes(d,0,i),i=0)}function T(t){return(1<0?o|=t<=8;)b(255&o,e),o>>=8,y-=8;if((w>s||v)&&(v?(s=T(f=a),v=!1):(++f,s=12==f?4096:T(f))),t==h){for(;y>0;)b(255&o,e),o>>=8,y-=8;E(e)}}this.encode=function(r){r.writeByte(g),u=t*e,c=0,function(t,e){var r,n,o,u,c,g,d;for(v=!1,s=T(f=a=t),h=1+(l=1<=0){c=g-o,0===o&&(c=1);do{if((o-=c)<0&&(o+=g),p[o]===r){u=m[o];continue t}}while(p[o]>=0)}B(u,e),u=n,w<4096?(m[o]=w++,p[o]=r):A(e)}else u=m[o];B(u,e),B(h,e)}(g+1,r),r.writeByte(0)}};function At(){this.page=-1,this.pages=[],this.newPage()}At.pageSize=4096,At.charMap={};for(var Ct=0;Ct<256;Ct++)At.charMap[Ct]=String.fromCharCode(Ct);function Et(t,e){this.width=~~t,this.height=~~e,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 At}At.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(At.pageSize),this.cursor=0},At.prototype.getData=function(){for(var t="",e=0;et+e.length),0));return t.reduce(((t,e)=>(r.set(e,t),t+e.length)),0),r},At.prototype.writeByte=function(t){this.cursor>=At.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=t},At.prototype.writeUTFBytes=function(t){for(var e=t.length,r=0;r=0&&(this.dispose=t)},Et.prototype.setRepeat=function(t){this.repeat=t},Et.prototype.setTransparent=function(t){this.transparent=t},Et.prototype.addFrame=function(t){this.image=t,this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null,this.getImagePixels(),this.analyzePixels(),!0===this.globalPalette&&(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},Et.prototype.finish=function(){this.out.writeByte(59)},Et.prototype.setQuality=function(t){t<1&&(t=1),this.sample=t},Et.prototype.setDither=function(t){!0===t&&(t="FloydSteinberg"),this.dither=t},Et.prototype.setGlobalPalette=function(t){this.globalPalette=t},Et.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette},Et.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")},Et.prototype.analyzePixels=function(){this.colorTab||(this.neuQuant=new yt(this.pixels,this.sample),this.neuQuant.buildColormap(),this.colorTab=this.neuQuant.getColormap()),this.dither?this.ditherPixels(this.dither.replace("-serpentine",""),null!==this.dither.match(/-serpentine/)):this.indexPixels(),this.pixels=null,this.colorDepth=8,this.palSize=7,null!==this.transparent&&(this.transIndex=this.findClosest(this.transparent,!0))},Et.prototype.indexPixels=function(t){var e=this.pixels.length/3;this.indexedPixels=new Uint8Array(e);for(var r=0,n=0;n=0&&A+u=0&&C+h>16,(65280&t)>>8,255&t,e)},Et.prototype.findClosestRGB=function(t,e,r,n){if(null===this.colorTab)return-1;if(this.neuQuant&&!n)return this.neuQuant.lookupRGB(t,e,r);for(var o=0,i=16777216,s=this.colorTab.length,a=0,l=0;a=0&&(e=7&this.dispose),e<<=2,this.out.writeByte(0|e|t),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},Et.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)},Et.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)},Et.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)},Et.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);for(var t=768-this.colorTab.length,e=0;e>8&255)},Et.prototype.writePixels=function(){new bt(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this.out)},Et.prototype.stream=function(){return this.out};const Tt=Et;var Pt=r(764).lW,Bt=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{l(n.next(t))}catch(t){i(t)}}function a(t){try{l(n.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};const{Canvas:Rt}=O,xt=.4;function St(t){if(t)return new Promise((function(r,n){if("data"==t.slice(0,4)){let o=new Image;return o.onload=function(){r(o),e(o)},o.onerror=function(){n("Image load error"),e(o)},void(o.src=t)}let o=new Image;o.setAttribute("crossOrigin","Anonymous"),o.onload=function(){r(o)},o.onerror=function(){n("Image load error")},o.src=t}));function e(t){t.onload=null,t.onerror=null}}class _t{constructor(t){const e=Object.assign({},t);if(Object.keys(_t.defaultOptions).forEach((t=>{t in e||Object.defineProperty(e,t,{value:_t.defaultOptions[t],enumerable:!0,writable:!0})})),e.components?"object"==typeof e.components&&Object.keys(_t.defaultComponentOptions).forEach((t=>{t in e.components?Object.defineProperty(e.components,t,{value:Object.assign(Object.assign({},_t.defaultComponentOptions[t]),e.components[t]),enumerable:!0,writable:!0}):Object.defineProperty(e.components,t,{value:_t.defaultComponentOptions[t],enumerable:!0,writable:!0})})):e.components=_t.defaultComponentOptions,null!==e.dotScale&&void 0!==e.dotScale){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 Rt(t.size,t.size),this.canvasContext=this.canvas.getContext("2d"),this.qrCode=new ot(-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,n,o,i){t.beginPath(),t.moveTo(e,r),t.arcTo(e+n,r,e+n,r+o,i),t.arcTo(e+n,r+o,e,r+o,i),t.arcTo(e,r+o,e,r,i),t.arcTo(e,r,e+n,r,i),t.closePath()}static _getAverageRGB(t){const e={r:0,g:0,b:0};let r,n,o=-4;const i={r:0,g:0,b:0};let s=0;n=t.naturalHeight||t.height,r=t.naturalWidth||t.width;const a=new Rt(r,n).getContext("2d");if(!a)return e;let l;a.drawImage(t,0,0);try{l=a.getImageData(0,0,r,n)}catch(t){return e}for(;(o+=20)200||l.data[o+1]>200||l.data[o+2]>200||(++s,i.r+=l.data[o],i.g+=l.data[o+1],i.b+=l.data[o+2]);return i.r=~~(i.r/s),i.g=~~(i.g/s),i.b=~~(i.b/s),i}static _drawDot(t,e,r,n,o=0,i=1){t.fillRect((e+o)*n,(r+o)*n,i*n,i*n)}static _drawAlignProtector(t,e,r,n){t.clearRect((e-2)*n,(r-2)*n,5*n,5*n),t.fillRect((e-2)*n,(r-2)*n,5*n,5*n)}static _drawAlign(t,e,r,n,o=0,i=1,s,a){const l=t.fillStyle;t.fillStyle=s,new Array(4).fill(0).map(((s,a)=>{_t._drawDot(t,e-2+a,r-2,n,o,i),_t._drawDot(t,e+2,r-2+a,n,o,i),_t._drawDot(t,e+2-a,r+2,n,o,i),_t._drawDot(t,e-2,r+2-a,n,o,i)})),_t._drawDot(t,e,r,n,o,i),a||(t.fillStyle="rgba(255, 255, 255, 0.6)",new Array(2).fill(0).map(((s,a)=>{_t._drawDot(t,e-1+a,r-1,n,o,i),_t._drawDot(t,e+1,r-1+a,n,o,i),_t._drawDot(t,e+1-a,r+1,n,o,i),_t._drawDot(t,e-1,r+1-a,n,o,i)}))),t.fillStyle=l}_draw(){var t,e,r,n,o,i,s,a,l,h,u,c,f,g,d,p,m,y,w;return Bt(this,void 0,void 0,(function*(){const v=null===(t=this.qrCode)||void 0===t?void 0:t.moduleCount,b=this.options.size;let A=this.options.margin;(A<0||2*A>=b)&&(A=0);const C=Math.ceil(A),E=b-2*A,T=this.options.whiteMargin,P=this.options.backgroundDimming,B=Math.ceil(E/v),R=B*v,x=R+2*C,S=new Rt(x,x),_=S.getContext("2d");this._clear(),_.save(),_.translate(C,C);const D=new Rt(x,x),k=D.getContext("2d");let L=null,I=[];if(this.options.gifBackground){const t=tt(this.options.gifBackground);if(L=t,O=!0,I=(M=t).frames.filter((t=>t.image)).map((t=>et(t,M.gct,O))),this.options.autoColor){let t=0,e=0,r=0,n=0;for(let o=0;o200||i[1]>200||i[2]>200||(0===i[0]&&0===i[1]&&0===i[2]||(n++,t+=i[0],e+=i[1],r+=i[2]))}t=~~(t/n),e=~~(e/n),r=~~(r/n),this.options.colorDark=`rgb(${t},${e},${r})`}}else if(this.options.backgroundImage){const t=yield St(this.options.backgroundImage);if(this.options.autoColor){const e=_t._getAverageRGB(t);this.options.colorDark=`rgb(${e.r},${e.g},${e.b})`}k.drawImage(t,0,0,t.width,t.height,0,0,x,x),k.rect(0,0,x,x),k.fillStyle=P,k.fill()}else k.rect(0,0,x,x),k.fillStyle=this.options.colorLight,k.fill();var M,O;const U=lt.getPatternPosition(this.qrCode.typeNumber),N=(null===(r=null===(e=this.options.components)||void 0===e?void 0:e.data)||void 0===r?void 0:r.scale)||xt,j=.5*(1-N);for(let t=0;t=v-8)||e>=v-8&&t<8,o=6==t&&e>=8&&e<=v-8||6==e&&t>=8&&t<=v-8;let i=n||o;for(let r=1;r=U[r]-2&&t<=U[r]+2&&e>=U[r]-2&&e<=U[r]+2;const s=e*B+(i?0:j*B),a=t*B+(i?0:j*B);if(_.strokeStyle=r?this.options.colorDark:this.options.colorLight,_.lineWidth=.5,_.fillStyle=r?this.options.colorDark:this.options.colorLight,0===U.length)i||_.fillRect(s,a,(i?1:N)*B,(i?1:N)*B);else{const r=e=v-4-5&&t=v-4-5;i||r||_.fillRect(s,a,(i?1:N)*B,(i?1:N)*B)}}const z=U[U.length-1],F=this.options.colorLight;if(_.fillStyle=F,_.fillRect(0,0,8*B,8*B),_.fillRect(0,(v-8)*B,8*B,8*B),_.fillRect((v-8)*B,0,8*B,8*B),(null===(o=null===(n=this.options.components)||void 0===n?void 0:n.timing)||void 0===o?void 0:o.protectors)&&(_.fillRect(8*B,6*B,(v-8-8)*B,B),_.fillRect(6*B,8*B,B,(v-8-8)*B)),(null===(s=null===(i=this.options.components)||void 0===i?void 0:i.cornerAlignment)||void 0===s?void 0:s.protectors)&&_t._drawAlignProtector(_,z,z,B),null===(l=null===(a=this.options.components)||void 0===a?void 0:a.alignment)||void 0===l?void 0:l.protectors)for(let t=0;t=1)&&(e=.2),r<0&&(r=0),n<0&&(n=0);const o=R*e,i=.5*(x-o),s=i;_.restore(),_.fillStyle=this.options.logoBackgroundColor,_.save(),_t._prepareRoundedCornerClip(_,i-r,s-r,o+2*r,o+2*r,n+r),_.clip();const a=_.globalCompositeOperation;_.globalCompositeOperation="destination-out",_.fill(),_.globalCompositeOperation=a,_.restore(),_.save(),_t._prepareRoundedCornerClip(_,i,s,o,o,n),_.clip(),_.drawImage(t,i,s,o,o),_.restore(),_.save(),_.translate(C,C)}if(L){let t,e,r,n,o,i;if(I.forEach((function(s){t||(t=new Tt(b,b),t.setDelay(s.delay),t.setRepeat(0));const{width:a,height:l}=s.dims;e||(e=new Rt(a,l),r=e.getContext("2d"),r.rect(0,0,e.width,e.height),r.fillStyle="#ffffff",r.fill()),n&&i&&a===n.width&&l===n.height||(n=new Rt(a,l),o=n.getContext("2d"),i=o.createImageData(a,l)),i.data.set(s.patch),o.putImageData(i,0,0),r.drawImage(n.getContext("2d").canvas,s.dims.left,s.dims.top);const h=new Rt(x,x),u=h.getContext("2d");u.drawImage(e.getContext("2d").canvas,0,0,x,x),u.rect(0,0,x,x),u.fillStyle=P,u.fill(),u.drawImage(S.getContext("2d").canvas,0,0,x,x);const c=new Rt(b,b),f=c.getContext("2d");f.drawImage(h.getContext("2d").canvas,0,0,b,b),t.addFrame(f.getImageData(0,0,c.width,c.height).data)})),!t)throw new Error("No frames.");if(t.finish(),Dt(this.canvas)){const e=t.stream().toFlattenUint8Array().reduce(((t,e)=>t+String.fromCharCode(e)),"");return Promise.resolve(`data:image/gif;base64,${window.btoa(e)}`)}return Promise.resolve(Pt.from(t.stream().toFlattenUint8Array()))}{k.drawImage(S.getContext("2d").canvas,0,0,x,x),_.drawImage(D.getContext("2d").canvas,-C,-C,x,x);const t=new Rt(b,b);t.getContext("2d").drawImage(S.getContext("2d").canvas,0,0,b,b),this.canvas=t;const e=this.options.gifBackground?"gif":"png";return Dt(this.canvas)?Promise.resolve(this.canvas.toDataURL(e)):Promise.resolve(this.canvas.toBuffer(e))}}))}}function Dt(t){try{return t instanceof HTMLElement}catch(e){return"object"==typeof t&&1===t.nodeType&&"object"==typeof t.style&&"object"==typeof t.ownerDocument}}_t.CorrectLevel=it,_t.defaultComponentOptions={data:{scale:.4},timing:{scale:.5,protectors:!1},alignment:{scale:.5,protectors:!1},cornerAlignment:{scale:.5,protectors:!0}},_t.defaultOptions={text:"",size:400,margin:20,colorDark:"#000000",colorLight:"rgba(255, 255, 255, 0.6)",correctLevel:it.M,backgroundImage:void 0,backgroundDimming:"rgba(0,0,0,0)",logoImage:void 0,logoScale:.2,logoMargin:4,logoCornerRadius:8,whiteMargin:!0,components:_t.defaultComponentOptions,autoColor:!0,logoBackgroundColor:"#ffffff",backgroundColor:"#ffffff"};const kt={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:()=>({imgUrl:""}),watch:{$props:{deep:!0,handler(){this.main()}}},mounted(){this.main()},methods:{async main(){if(this.gifBgSrc){const t=await s(this.gifBgSrc),e=this.logoSrc;return void this.render(void 0,e,t)}const t=this.bgSrc,e=this.logoSrc;this.render(t,e)},async render(t,e,r){const n=this;new _t({gifBackground:r,text:n.text,size:n.size,margin:n.margin,colorDark:n.colorDark,colorLight:n.colorLight,backgroundColor:n.backgroundColor,backgroundImage:t,backgroundDimming:n.backgroundDimming,logoImage:e,logoScale:n.logoScale,logoBackgroundColor:n.logoBackgroundColor,correctLevel:n.correctLevel,logoMargin:n.logoMargin,logoCornerRadius:n.logoCornerRadius,whiteMargin:i(n.whiteMargin),dotScale:n.dotScale,autoColor:i(n.autoColor),binarize:i(n.binarize),binarizeThreshold:n.binarizeThreshold,components:n.components}).draw().then((t=>{this.imgUrl=t,n.callback&&n.callback(t,n.qid)}))}}};var Lt=r(744);const It=(0,Lt.Z)(kt,[["render",function(t,e,r,i,s,a){return r.bindElement?((0,n.openBlock)(),(0,n.createElementBlock)("img",{key:0,style:{display:"inline-block"},src:s.imgUrl},null,8,o)):(0,n.createCommentVNode)("",!0)}]]),Mt={props:["resourceName","field"],components:{VueQr:It}};var Ot=r(379),Ut=r.n(Ot),Nt=r(372),jt={insert:"head",singleton:!1};Ut()(Nt.Z,jt);Nt.Z.locals;const zt=(0,Lt.Z)(Mt,[["render",function(t,e,r,o,i,s){var a=(0,n.resolveComponent)("vue-qr");return(0,n.openBlock)(),(0,n.createElementBlock)("span",null,[(0,n.createVNode)(a,{class:"qr-item",text:this.field.value,size:this.field.indexSize,bgSrc:this.field.background,logoSrc:this.field.logo,margin:0},null,8,["text","size","bgSrc","logoSrc"])])}]]);const Ft={props:["index","resource","resourceName","resourceId","field"],components:{VueQr:It}};var Yt=r(86),qt={insert:"head",singleton:!1};Ut()(Yt.Z,qt);Yt.Z.locals;const $t=(0,Lt.Z)(Ft,[["render",function(t,e,r,o,i,s){var a=(0,n.resolveComponent)("vue-qr"),l=(0,n.resolveComponent)("PanelItem");return(0,n.openBlock)(),(0,n.createBlock)(l,{index:r.index,field:r.field},{value:(0,n.withCtx)((function(){return[(0,n.createVNode)(a,{class:"qr-item",text:r.field.value,size:r.field.detailSize,bgSrc:r.field.background,logoSrc:r.field.logo,margin:0},null,8,["text","size","bgSrc","logoSrc"])]})),_:1},8,["index","field"])}]]);Nova.booting((function(t,e){t.component("index-qrcode",zt),t.component("detail-qrcode",$t)}))},742:(t,e)=>{"use strict";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=l(t),s=i[0],a=i[1],h=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),u=0,c=a>0?s-4:s;for(r=0;r>16&255,h[u++]=e>>8&255,h[u++]=255&e;2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[u++]=255&e);1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[u++]=e>>8&255,h[u++]=255&e);return h},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=16383,a=0,l=n-o;al?l:a+s));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,n){for(var o,i,s=[],a=e;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},764:(t,e,r)=>{"use strict";var n=r(742),o=r(645),i=r(826);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function p(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return _(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return P(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,o);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){var i,s=1,a=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,l/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var u=-1;for(i=r;ia&&(r=a-l),i=r;i>=0;i--){for(var c=!0,f=0;fo&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function P(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function B(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:h>223?3:h>191?2:1;if(o+c<=r)switch(c){case 1:h<128&&(u=h);break;case 2:128==(192&(i=t[o+1]))&&(l=(31&h)<<6|63&i)>127&&(u=l);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(l=(15&h)<<12|(63&i)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(l=(15&h)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,c=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=c}return function(t){var e=t.length;if(e<=R)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},l.prototype.compare=function(t,e,r,n,o){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(i,s),h=this.slice(n,o),u=t.slice(e,r),c=0;co)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return A(this,t,e,r);case"latin1":case"binary":return C(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function x(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,o,i){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function M(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function O(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,i){return i||O(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,i){return i||O(t,0,r,8),o.write(t,e,r,n,52,8),r+8}l.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(o*=256);)n+=this[t+--e]*o;return n},l.prototype.readUInt8=function(t,e){return e||k(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||k(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||k(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readInt8=function(t,e){return e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||k(t,4,this.length),o.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||k(t,4,this.length),o.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||k(t,8,this.length),o.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||k(t,8,this.length),o.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},l.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);L(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},l.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);L(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Y(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function q(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}},86:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(879),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".qr-item img{border:thin solid #ddd;padding:5px}",""]);const i=o},372:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(879),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".qr-item{margin-top:5px}.qr-item img{border:thin solid #ddd;padding:2px}",""]);const i=o},879:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var i=0;i{e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,l=(1<>1,u=-7,c=r?o-1:0,f=r?-1:1,g=t[e+c];for(c+=f,i=g&(1<<-u)-1,g>>=-u,u+=a;u>0;i=256*i+t[e+c],c+=f,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+t[e+c],c+=f,u-=8);if(0===i)i=1-h;else{if(i===l)return s?NaN:1/0*(g?-1:1);s+=Math.pow(2,n),i-=h}return(g?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,l,h=8*i-o-1,u=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:i-1,d=n?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+c>=1?f/l:f*Math.pow(2,1-c))*l>=2&&(s++,l/=2),s+c>=u?(a=0,s=u):s+c>=1?(a=(e*l-1)*Math.pow(2,o),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,o),s=0));o>=8;t[r+g]=255&a,g+=d,a/=256,o-=8);for(s=s<0;t[r+g]=255&s,g+=d,s/=256,h-=8);t[r+g-d]|=128*p}},826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},381:()=>{},155:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var a,l=[],h=!1,u=-1;function c(){h&&a&&(h=!1,a.length?l=a.concat(l):u=-1,l.length&&f())}function f(){if(!h){var t=s(c);h=!0;for(var e=l.length;e;){for(a=l,l=[];++u1)for(var r=1;r{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),s=[];function a(t){for(var e=-1,r=0;r{"use strict";e.Z=(t,e)=>{const r=t.__vccOpts||t;for(const[t,n]of e)r[t]=n;return r}}},r={};function n(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={id:t,exports:{}};return e[t](i,i.exports,n),i.exports}n.m=e,t=[],n.O=(e,r,o,i)=>{if(!r){var s=1/0;for(u=0;u=i)&&Object.keys(n.O).every((t=>n.O[t](r[l])))?r.splice(l--,1):(a=!1,i0&&t[u-1][2]>i;u--)t[u]=t[u-1];t[u]=[r,o,i]},n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t={175:0,546:0};n.O.j=e=>0===t[e];var e=(e,r)=>{var o,i,[s,a,l]=r,h=0;if(s.some((e=>0!==t[e]))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);if(l)var u=l(n)}for(e&&e(r);hn(270)));var o=n.O(void 0,[546],(()=>n(381)));o=n.O(o)})(); \ No newline at end of file +(()=>{var t={742:(t,e)=>{"use strict";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=l(t),s=i[0],a=i[1],h=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),u=0,c=a>0?s-4:s;for(r=0;r>16&255,h[u++]=e>>8&255,h[u++]=255&e;2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[u++]=255&e);1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[u++]=e>>8&255,h[u++]=255&e);return h},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],s=16383,a=0,l=n-o;al?l:a+s));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,n){for(var o,i,s=[],a=e;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},764:(t,e,r)=>{"use strict";var n=r(742),o=r(645),i=r(826);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function p(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return _(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return S(this,e,r);case"base64":return P(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=l.from(e,n)),l.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,o);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,o){var i,s=1,a=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,l/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(o){var u=-1;for(i=r;ia&&(r=a-l),i=r;i>=0;i--){for(var c=!0,f=0;fo&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var s=0;s>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function P(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function B(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:h>223?3:h>191?2:1;if(o+c<=r)switch(c){case 1:h<128&&(u=h);break;case 2:128==(192&(i=t[o+1]))&&(l=(31&h)<<6|63&i)>127&&(u=l);break;case 3:i=t[o+1],s=t[o+2],128==(192&i)&&128==(192&s)&&(l=(15&h)<<12|(63&i)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=t[o+1],s=t[o+2],a=t[o+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(l=(15&h)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,c=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=c}return function(t){var e=t.length;if(e<=R)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},l.prototype.compare=function(t,e,r,n,o){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(i,s),h=this.slice(n,o),u=t.slice(e,r),c=0;co)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":return A(this,t,e,r);case"latin1":case"binary":return C(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function x(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,o,i){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function I(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function M(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function O(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,i){return i||O(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,i){return i||O(t,0,r,8),o.write(t,e,r,n,52,8),r+8}l.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(o*=256);)n+=this[t+--e]*o;return n},l.prototype.readUInt8=function(t,e){return e||k(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||k(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||k(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||k(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||k(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},l.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||k(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readInt8=function(t,e){return e||k(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||k(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt16BE=function(t,e){e||k(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},l.prototype.readInt32LE=function(t,e){return e||k(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||k(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||k(t,4,this.length),o.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||k(t,4,this.length),o.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||k(t,8,this.length),o.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||k(t,8,this.length),o.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},l.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);L(this,t,e,r,o-1,-o)}var i=0,s=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+r},l.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);L(this,t,e,r,o-1,-o)}var i=r-1,s=1,a=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/s>>0)-a&255;return e+r},l.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},l.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},l.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},l.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},l.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function Y(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function $(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}},623:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(879),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".qr-item img{border:thin solid #ddd;padding:5px}",""]);const i=o},227:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(879),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,".qr-item{margin-top:5px}.qr-item img{border:thin solid #ddd;padding:2px}",""]);const i=o},879:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var i=0;i{e.read=function(t,e,r,n,o){var i,s,a=8*o-n-1,l=(1<>1,u=-7,c=r?o-1:0,f=r?-1:1,g=t[e+c];for(c+=f,i=g&(1<<-u)-1,g>>=-u,u+=a;u>0;i=256*i+t[e+c],c+=f,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+t[e+c],c+=f,u-=8);if(0===i)i=1-h;else{if(i===l)return s?NaN:1/0*(g?-1:1);s+=Math.pow(2,n),i-=h}return(g?-1:1)*s*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var s,a,l,h=8*i-o-1,u=(1<>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:i-1,d=n?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),(e+=s+c>=1?f/l:f*Math.pow(2,1-c))*l>=2&&(s++,l/=2),s+c>=u?(a=0,s=u):s+c>=1?(a=(e*l-1)*Math.pow(2,o),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,o),s=0));o>=8;t[r+g]=255&a,g+=d,a/=256,o-=8);for(s=s<0;t[r+g]=255&s,g+=d,s/=256,h-=8);t[r+g-d]|=128*p}},826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},155:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var a,l=[],h=!1,u=-1;function c(){h&&a&&(h=!1,a.length?l=a.concat(l):u=-1,l.length&&f())}function f(){if(!h){var t=s(c);h=!0;for(var e=l.length;e;){for(a=l,l=[];++u1)for(var r=1;r{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),s=[];function a(t){for(var e=-1,r=0;r{"use strict";e.Z=(t,e)=>{const r=t.__vccOpts||t;for(const[t,n]of e)r[t]=n;return r}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.nc=void 0,(()=>{"use strict";const t=Vue;const e=["src"];function n(t){return""===t?t:"true"===t||"1"==t}const o=function(t,e){return new Promise(((e,r)=>{var n=new XMLHttpRequest;n.responseType="blob",n.onload=function(){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsArrayBuffer(n.response)},n.open("GET",t),n.send()}))};var i=r(155);function s(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function a(t,e){for(var r,n="",o=0,i=-1,s=0,a=0;a<=t.length;++a){if(a2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",o=0):o=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),i=a,s=0;continue}}else if(2===n.length||1===n.length){n="",o=0,i=a,s=0;continue}e&&(n.length>0?n+="/..":n="..",o=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),o=a-i-1;i=a,s=0}else 46===r&&-1!==s?++s:s=-1}return n}var l={resolve:function(){for(var t,e="",r=!1,n=arguments.length-1;n>=-1&&!r;n--){var o;n>=0?o=arguments[n]:(void 0===t&&(t=i.cwd()),o=t),s(o),0!==o.length&&(e=o+"/"+e,r=47===o.charCodeAt(0))}return e=a(e,!r),r?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(s(t),0===t.length)return".";var e=47===t.charCodeAt(0),r=47===t.charCodeAt(t.length-1);return 0!==(t=a(t,!e)).length||e||(t="."),t.length>0&&r&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return s(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e0&&(void 0===t?t=r:t+="/"+r)}return void 0===t?".":l.normalize(t)},relative:function(t,e){if(s(t),s(e),t===e)return"";if((t=l.resolve(t))===(e=l.resolve(e)))return"";for(var r=1;rh){if(47===e.charCodeAt(i+c))return e.slice(i+c+1);if(0===c)return e.slice(i+c)}else o>h&&(47===t.charCodeAt(r+c)?u=c:0===c&&(u=0));break}var f=t.charCodeAt(r+c);if(f!==e.charCodeAt(i+c))break;47===f&&(u=c)}var g="";for(c=r+u+1;c<=n;++c)c!==n&&47!==t.charCodeAt(c)||(0===g.length?g+="..":g+="/..");return g.length>0?g+e.slice(i+u):(i+=u,47===e.charCodeAt(i)&&++i,e.slice(i))},_makeLong:function(t){return t},dirname:function(t){if(s(t),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,o=!0,i=t.length-1;i>=1;--i)if(47===(e=t.charCodeAt(i))){if(!o){n=i;break}}else o=!1;return-1===n?r?"/":".":r&&1===n?"//":t.slice(0,n)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');s(t);var r,n=0,o=-1,i=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var a=e.length-1,l=-1;for(r=t.length-1;r>=0;--r){var h=t.charCodeAt(r);if(47===h){if(!i){n=r+1;break}}else-1===l&&(i=!1,l=r+1),a>=0&&(h===e.charCodeAt(a)?-1==--a&&(o=r):(a=-1,o=l))}return n===o?o=l:-1===o&&(o=t.length),t.slice(n,o)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!i){n=r+1;break}}else-1===o&&(i=!1,o=r+1);return-1===o?"":t.slice(n,o)},extname:function(t){s(t);for(var e=-1,r=0,n=-1,o=!0,i=0,a=t.length-1;a>=0;--a){var l=t.charCodeAt(a);if(47!==l)-1===n&&(o=!1,n=a+1),46===l?-1===e?e=a:1!==i&&(i=1):-1!==e&&(i=-1);else if(!o){r=a+1;break}}return-1===e||-1===n||0===i||1===i&&e===n-1&&e===r+1?"":t.slice(e,n)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+t+n:n}("/",t)},parse:function(t){s(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var r,n=t.charCodeAt(0),o=47===n;o?(e.root="/",r=1):r=0;for(var i=-1,a=0,l=-1,h=!0,u=t.length-1,c=0;u>=r;--u)if(47!==(n=t.charCodeAt(u)))-1===l&&(h=!1,l=u+1),46===n?-1===i?i=u:1!==c&&(c=1):-1!==i&&(c=-1);else if(!h){a=u+1;break}return-1===i||-1===l||0===c||1===c&&i===l-1&&i===a+1?-1!==l&&(e.base=e.name=0===a&&o?t.slice(1,l):t.slice(a,l)):(0===a&&o?(e.name=t.slice(1,i),e.base=t.slice(1,l)):(e.name=t.slice(a,i),e.base=t.slice(a,l)),e.ext=t.slice(i,l)),a>0?e.dir=t.slice(0,a-1):o&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l;const h=l.extname,u=l.basename;class c{constructor(){let t=void 0===r.g,e="image/png",n="image/jpeg",o="image/jpeg",i="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:n,jpeg:o,webp:i}:{png:e,jpg:n,jpeg:o,pdf:s,svg:a},mimes:t?{[e]:"png",[n]:"jpg",[i]:"webp"}:{[e]:"png",[n]:"jpg",[s]:"pdf",[a]:"svg"}})}toMime(t){return this.formats[(t||"").replace(/^\./,"").toLowerCase()]}fromMime(t){return this.mimes[t]}}class f{static for(t){return(new f).append(t).get()}constructor(){this.crc=-1}get(){return~this.crc}append(t){for(var e=0|this.crc,r=this.table,n=0,o=0|t.length;n>>8^r[255&(e^t[n])];return this.crc=e,this}}function g(t){let e=new Uint8Array(t),r=new DataView(e.buffer),n={array:e,view:r,size:t,set8:(t,e)=>(r.setUint8(t,e),n),set16:(t,e)=>(r.setUint16(t,e,!0),n),set32:(t,e)=>(r.setUint32(t,e,!0),n),bytes:(t,r)=>(e.set(r,t),n)};return n}f.prototype.table=(()=>{var t,e,r,n=[];for(t=0;t<256;t++){for(r=t,e=0;e<8;e++)r=1&r?r>>>1^3988292384:r>>>1;n[t]=r}return n})();class d{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,n=d.encoder.encode(`${this.directory}/${r?"":t}`),o=new Uint8Array(r?0:await e.arrayBuffer()),i=30+n.length,s=i+o.length,{offset:a}=this,l=g(26).set32(0,134742036).set16(6,this.time).set16(8,this.date).set32(10,f.for(o)).set32(14,o.length).set32(18,o.length).set16(22,n.length);a+=i;let h=g(i+o.length+16).set32(0,67324752).bytes(4,l.array).bytes(30,n).bytes(i,o);a+=o.length,h.set32(s,134695760).bytes(s+4,l.array.slice(10,22)),a+=16,this.files.push({offset:a,folder:r,name:n,header:l,payload:h}),this.offset=a}toBuffer(){let t=this.files.reduce(((t,{name:e})=>46+e.length+t),0),e=g(t+22),r=0;for(var{offset:n,name:o,header:i,folder:s}of this.files)e.set32(r,33639248).set16(r+4,20).bytes(r+6,i.array).set8(r+38,s?16:0).set32(r+42,n).bytes(r+46,o),r+=46+o.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 a=new Uint8Array(this.offset+e.size),l=0;for(var{payload:h}of this.files)a.set(h.array,l),l+=h.size;return a.set(e.array,l),a}get blob(){return new Blob([this.toBuffer()],{type:"application/zip"})}}d.encoder=new TextEncoder;const p=(t,e,r,n)=>{if(n){let{width:e,height:r}=t,o=Object.assign(document.createElement("canvas"),{width:e,height:r}),i=o.getContext("2d");i.fillStyle=n,i.fillRect(0,0,e,r),i.drawImage(t,0,0),t=o}return new Promise(((n,o)=>t.toBlob(n,e,r)))},m=(t,e)=>{const r=window.URL.createObjectURL(e),n=document.createElement("a");n.style.display="none",n.href=r,n.setAttribute("download",t),void 0===n.download&&n.setAttribute("target","_blank"),document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout((()=>window.URL.revokeObjectURL(r)),100)},y={asBuffer:(...t)=>p(...t).then((t=>t.arrayBuffer())),asDownload:async(t,e,r,n,o)=>{m(o,await p(t,e,r,n))},asZipDownload:async(t,e,r,n,o,i,s)=>{let a=u(o,".zip")||"archive",l=new d(a);await Promise.all(t.map((async(t,o)=>{let a=(t=>i.replace("{}",String(t+1).padStart(s,"0")))(o);await l.add(a,await p(t,e,r,n))}))),m(`${a}.zip`,l.blob)},atScale:(t,e,r)=>t.map((t=>{if(1==e&&!r)return t.canvas;let n=document.createElement("canvas"),o=n.getContext("2d"),i=t.canvas?t.canvas:t;return n.width=i.width*e,n.height=i.height*e,r&&(o.fillStyle=r,o.fillRect(0,0,n.width,n.height)),o.scale(e,e),o.drawImage(i,0,0),n})),options:function(t,{filename:e="",extension:r="",format:n,page:o,quality:i,matte:s,density:a,outline:l,archive:f}={}){var{fromMime:g,toMime:d,expected:p}=new c,m=(f=f||"canvas",n||r.replace(/@\d+x$/i,"")||h(e)),y=(n=g(d(m)||m),d(n)),w=t.length;if(!m)throw new Error("Cannot determine image format (use a filename extension or 'format' argument)");if(!n)throw new Error(`Unsupported file format "${m}" (expected ${p})`);if(!w)throw new RangeError("Canvas has no associated contexts (try calling getContext or newPage first)");let v,b,A=e.replace(/{(\d*)}/g,((t,e)=>(b=!0,e=parseInt(e,10),v=isFinite(e)?e:isFinite(v)?v:-1,"{}"))),C=o>0?o-1:o<0?w+o:void 0;if(isFinite(C)&&C<0||C>=w)throw new RangeError(1==w?`Canvas only has a ‘page 1’ (${C} is out of bounds)`:`Canvas has pages 1–${w} (${C} is out of bounds)`);if(t=isFinite(C)?[t[C]]:b||"pdf"==n?t:t.slice(-1),void 0===i)i=.92;else if("number"!=typeof i||!isFinite(i)||i<0||i>1)throw new TypeError("The quality option must be an number in the 0.0–1.0 range");if(void 0===a){let t=(r||u(e,m)).match(/@(\d+)x$/i);a=t?parseInt(t[1],10):1}else if("number"!=typeof a||!Number.isInteger(a)||a<1)throw new TypeError("The density option must be a non-negative integer");return void 0===l?l=!0:"svg"==n&&(l=!!l),{filename:e,pattern:A,format:n,mime:y,pages:t,padding:v,quality:i,matte:s,density:a,outline:l,archive:f}}},w=y,{asBuffer:v,asDownload:b,asZipDownload:A,atScale:C,options:E}=w,T=Symbol.for("toDataURL");const{CanvasRenderingContext2D:P,CanvasGradient:B,CanvasPattern:R,Image:x,ImageData:S,Path2D:_,DOMMatrix:D,DOMRect:k,DOMPoint:L}=window,I={Canvas:class{constructor(t,e){let r=document.createElement("canvas"),n=[];for(var[o,i]of(Object.defineProperty(r,"async",{value:!0,writable:!1,enumerable:!0}),Object.entries({png:()=>v(r,"image/png"),jpg:()=>v(r,"image/jpeg"),pages:()=>n.concat(r).map((t=>t.getContext("2d")))})))Object.defineProperty(r,o,{get:i});return Object.assign(r,{width:t,height:e,newPage(...t){var{width:e,height:o}=r,i=Object.assign(document.createElement("canvas"),{width:e,height:o});i.getContext("2d").drawImage(r,0,0),n.push(i);var[e,o]=t.length?t:[e,o];return Object.assign(r,{width:e,height:o}).getContext("2d")},saveAs(t,e){e="number"==typeof e?{quality:e}:e;let r=E(this.pages,{filename:t,...e}),{pattern:n,padding:o,mime:i,quality:s,matte:a,density:l,archive:h}=r,u=C(r.pages,l);return null==o?b(u[0],i,s,a,t):A(u,i,s,a,h,n,o)},toBuffer(t="png",e={}){e="number"==typeof e?{quality:e}:e;let r=E(this.pages,{extension:t,...e}),{mime:n,quality:o,matte:i,pages:s,density:a}=r,l=C(s,a,i)[0];return v(l,n,o,i)},[T]:r.toDataURL.bind(r),toDataURL(t="png",e={}){e="number"==typeof e?{quality:e}:e;let n=E(this.pages,{extension:t,...e}),{mime:o,quality:i,matte:s,pages:a,density:l}=n,h=C(a,l,s)[0],u=h[h===r?T:"toDataURL"](o,i);return Promise.resolve(u)}})}},loadImage:t=>new Promise(((e,r)=>Object.assign(new x,{crossOrigin:"Anonymous",onload:e,onerror:r,src:t}))),CanvasRenderingContext2D:P,CanvasGradient:B,CanvasPattern:R,Image:x,ImageData:S,Path2D:_,DOMMatrix:D,DOMRect:k,DOMPoint:L},M=(t,e,r={},n=r)=>{if(Array.isArray(e))e.forEach((e=>M(t,e,r,n)));else if("function"==typeof e)e(t,r,n,M);else{const o=Object.keys(e)[0];Array.isArray(e[o])?(n[o]={},M(t,e[o],r,n[o])):n[o]=e[o](t,r,n,M)}return r},O=(t,e)=>(r,n,o,i)=>{e(r,n,o)&&i(r,t,n,o)},U=(t=0)=>e=>e.data[e.pos+t],N=t=>e=>e.data.subarray(e.pos,e.pos+=t),j=t=>e=>e.data.subarray(e.pos,e.pos+t),z=t=>e=>Array.from(N(t)(e)).map((t=>String.fromCharCode(t))).join(""),F=t=>e=>{const r=N(2)(e);return t?(r[1]<<8)+r[0]:(r[0]<<8)+r[1]},Y=(t,e)=>(r,n,o)=>{const i="function"==typeof e?e(r,n,o):e,s=N(t),a=new Array(i);for(var l=0;le=>{const r=(t=>t.data[t.pos++])(e),n=new Array(8);for(var o=0;o<8;o++)n[7-o]=!!(r&1<{const o=t[r];return o.length?e[r]=((t,e,r)=>{for(var n=0,o=0;o{const e=[],r=t.data.length;for(var n=0,o=(t=>t.data[t.pos++])(t);0!==o&&o;o=(t=>t.data[t.pos++])(t)){if(t.pos+o>=r){const o=r-t.pos;e.push(N(o)(t)),n+=o;break}e.push(N(o)(t)),n+=o}const i=new Uint8Array(n);for(var s=0,a=0;at.data[t.pos++]},{extras:$({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:F(!0)},{transparentColorIndex:t=>t.data[t.pos++]},{terminator:t=>t.data[t.pos++]}]},(t=>{var e=j(2)(t);return 33===e[0]&&249===e[1]})),H=O({image:[{code:t=>t.data[t.pos++]},{descriptor:[{left:F(!0)},{top:F(!0)},{width:F(!0)},{height:F(!0)},{lct:$({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},O({lct:Y(3,((t,e,r)=>Math.pow(2,r.descriptor.lct.size+1)))},((t,e,r)=>r.descriptor.lct.exists)),{data:[{minCodeSize:t=>t.data[t.pos++]},q]}]},(t=>44===U()(t))),Q=O({text:[{codes:N(2)},{blockSize:t=>t.data[t.pos++]},{preData:(t,e,r)=>N(r.text.blockSize)(t)},q]},(t=>{var e=j(2)(t);return 33===e[0]&&1===e[1]})),Z=O({application:[{codes:N(2)},{blockSize:t=>t.data[t.pos++]},{id:(t,e,r)=>z(r.blockSize)(t)},q]},(t=>{var e=j(2)(t);return 33===e[0]&&255===e[1]})),K=O({comment:[{codes:N(2)},q]},(t=>{var e=j(2)(t);return 33===e[0]&&254===e[1]})),X=[{header:[{signature:z(3)},{version:z(3)}]},{lsd:[{width:F(!0)},{height:F(!0)},{gct:$({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:t=>t.data[t.pos++]},{pixelAspectRatio:t=>t.data[t.pos++]}]},O({gct:Y(3,((t,e)=>Math.pow(2,e.lsd.gct.size+1)))},((t,e)=>e.lsd.gct.exists)),{frames:((t,e)=>(r,n,o,i)=>{const s=[];let a=r.pos;for(;e(r,n,o);){const e={};if(i(r,t,n,e),r.pos===a)break;a=r.pos,s.push(e)}return s})([G,Z,K,H,Q],(t=>{var e=U()(t);return 33===e||44===e}))}],V=X,J=t=>{const e=new Uint8Array(t);return M({data:e,pos:0},V)},W=(t,e,r)=>{if(!t.image)return void console.warn("gif frame does not have associated image.");const{image:n}=t,o=n.descriptor.width*n.descriptor.height;var i=((t,e,r)=>{const n=4096,o=r;var i,s,a,l,h,u,c,f,g,d;const p=new Array(r),m=new Array(n),y=new Array(n),w=new Array(4097);for(h=1+(s=1<<(d=t)),i=s+2,c=-1,a=(1<<(l=d+1))-1,f=0;f>=l,b-=l,f>i||f==h)break;if(f==s){a=(1<<(l=d+1))-1,i=s+2,c=-1;continue}if(-1==c){w[C++]=y[f],c=f,A=f;continue}for(u=f,f==i&&(w[C++]=A,f=c);f>s;)w[C++]=y[f],f=m[f];A=255&y[f],w[C++]=A,i{const r=new Array(t.length),n=t.length/e,o=function(n,o){const i=t.slice(o*e,(o+1)*e);r.splice.apply(r,[n*e,e].concat(i))},i=[0,4,2,1],s=[8,8,4,2];for(var a=0,l=0;l<4;l++)for(var h=i[l];h{const e=t.pixels.length,r=new Uint8ClampedArray(4*e);for(var n=0;n65536?(r[0]=240|(1835008&n)>>>18,r[1]=128|(258048&n)>>>12,r[2]=128|(4032&n)>>>6,r[3]=128|63&n):n>2048?(r[0]=224|(61440&n)>>>12,r[1]=128|(4032&n)>>>6,r[2]=128|63&n):n>128?(r[0]=192|(1984&n)>>>6,r[1]=128|63&n):r[0]=n,e.push(r)}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;ect.length)throw new Error("Too long data");return r}(t,this.errorCorrectLevel);else{if(this.typeNumber>40)throw new Error(`Invalid QR version: ${this.typeNumber}`);if(!function(t,e,r){const n=tt(e),o=t-1;let i=0;switch(r){case nt.L:i=ct[o][0];break;case nt.M:i=ct[o][1];break;case nt.Q:i=ct[o][2];break;case nt.H:i=ct[o][3]}return n<=i}(this.typeNumber,t,this.errorCorrectLevel))throw new Error(`Data is too long for QR version: ${this.typeNumber}`)}const e=new et(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=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(let t=0;t=7&&this.setupTypeNumber(t),null==this.dataCache&&(this.dataCache=rt.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 n=-1;n<=7;n++)e+n<=-1||this.moduleCount<=e+n||(this.modules[t+r][e+n]=0<=r&&r<=6&&(0==n||6==n)||0<=n&&n<=6&&(0==r||6==r)||2<=r&&r<=4&&2<=n&&n<=4)}getBestMaskPattern(){if(Number.isInteger(this.maskPattern)&&Object.values(it).includes(this.maskPattern))return this.maskPattern;let t=0,e=0;for(let r=0;r<8;r++){this.makeImpl(!0,r);const n=st.getLostPoint(this);(0==r||t>n)&&(t=n,e=r)}return e}setupTimingPattern(){for(let t=8;t>r&1);this.modules[Math.floor(r/3)][r%3+this.moduleCount-8-3]=n}for(r=0;r<18;r++){n=!t&&1==(e>>r&1);this.modules[r%3+this.moduleCount-8-3][Math.floor(r/3)]=n}}setupTypeInfo(t,e){const r=this.errorCorrectLevel<<3|e,n=st.getBCHTypeInfo(r);for(var o=0;o<15;o++){var i=!t&&1==(n>>o&1);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!t&&1==(n>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!t}mapData(t,e){let r=-1,n=this.moduleCount-1,o=7,i=0;for(let s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(let r=0;r<2;r++)if(null==this.modules[n][s-r]){let a=!1;i>>o&1));st.getMask(e,n,s-r)&&(a=!a),this.modules[n][s-r]=a,o--,-1==o&&(i++,o=7)}if(n+=r,n<0||this.moduleCount<=n){n-=r,r=-r;break}}}static createData(t,e,r){const n=ht.getRSBlocks(t,e),o=new ut;for(var i=0;i8*s)throw new Error(`code length overflow. (${o.getLengthInBits()}>${8*s})`);for(o.getLengthInBits()+4<=8*s&&o.put(0,4);o.getLengthInBits()%8!=0;)o.putBit(!1);for(;!(o.getLengthInBits()>=8*s||(o.put(rt.PAD0,8),o.getLengthInBits()>=8*s));)o.put(rt.PAD1,8);return rt.createBytes(o,n)}static createBytes(t,e){let r=0,n=0,o=0;const i=new Array(e.length),s=new Array(e.length);for(var a=0;a=0?f.get(t):0}}let h=0;for(l=0;l=0;)e^=st.G15<=0;)e^=st.G18<>>=1;return e}static getPatternPosition(t){return st.PATTERN_POSITION_TABLE[t-1]}static getMask(t,e,r){switch(t){case it.PATTERN000:return(e+r)%2==0;case it.PATTERN001:return e%2==0;case it.PATTERN010:return r%3==0;case it.PATTERN011:return(e+r)%3==0;case it.PATTERN100:return(Math.floor(e/2)+Math.floor(r/3))%2==0;case it.PATTERN101:return e*r%2+e*r%3==0;case it.PATTERN110:return(e*r%2+e*r%3)%2==0;case it.PATTERN111:return(e*r%3+(e+r)%2)%2==0;default:throw new Error(`bad maskPattern:${t}`)}}static getErrorCorrectPolynomial(t){let e=new lt([1],0);for(let r=0;r5&&(r+=3+i-5)}for(n=0;n=256;)t-=255;return at.EXP_TABLE[t]}}at.EXP_TABLE=new Array(256),at.LOG_TABLE=new Array(256),at._constructor=function(){for(var t=0;t<8;t++)at.EXP_TABLE[t]=1<>>7-t%8&1)}put(t,e){for(let r=0;r>>e-r-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 ct=[[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 ft=100,gt=256,dt=gt-1,pt=4,mt=16,yt=1<>vt,At=yt<>3)*(1<h;)l=s[g++],ch&&((a=r[f--])[0]-=l*(a[0]-n)/Rt,a[1]-=l*(a[1]-o)/Rt,a[2]-=l*(a[2]-i)/Rt)}function h(t,e,n){var s,a,l,h,u,c=~(1<<31),f=c,g=-1,d=g;for(s=0;s>mt-pt))>vt,i[s]-=u,o[s]+=u<>3),t=0;t>Ct;for(w<=1&&(w=0),r=0;r=f&&(v-=f),0===p&&(p=1),++r%p==0)for(m-=m/g,(w=(y-=y/Tt)>>Ct)<=1&&(w=0),c=0;c>=pt,r[t][1]>>=pt,r[t][2]>>=pt,r[t][3]=t}(),function(){var t,e,o,i,s,a,l=0,h=0;for(t=0;t>1,e=l+1;e>1,e=l+1;e<256;e++)n[e]=dt}()},this.getColormap=function(){for(var t=[],e=[],n=0;n=0;)u=l?u=gt:(u++,a<0&&(a=-a),(i=s[0]-t)<0&&(i=-i),(a+=i)=0&&((a=e-(s=r[c])[1])>=l?c=-1:(c--,a<0&&(a=-a),(i=s[0]-t)<0&&(i=-i),(a+=i)=254&&E(e)}function A(t){C(Ot),w=l+2,v=!0,B(l,t)}function C(t){for(var e=0;e0&&(t.writeByte(i),t.writeBytes(d,0,i),i=0)}function T(t){return(1<0?o|=t<=8;)b(255&o,e),o>>=8,y-=8;if((w>s||v)&&(v?(s=T(f=a),v=!1):(++f,s=f==Mt?1<0;)b(255&o,e),o>>=8,y-=8;E(e)}}this.encode=function(r){r.writeByte(g),u=t*e,c=0,function(t,e){var r,n,o,u,c,g,d;for(v=!1,s=T(f=a=t),h=1+(l=1<=0){c=g-o,0===o&&(c=1);do{if((o-=c)<0&&(o+=g),p[o]===r){u=m[o];continue t}}while(p[o]>=0)}B(u,e),u=n,w<1<t+e.length),0));return t.reduce(((t,e)=>(r.set(e,t),t+e.length)),0),r},jt.prototype.writeByte=function(t){this.cursor>=jt.pageSize&&this.newPage(),this.pages[this.page][this.cursor++]=t},jt.prototype.writeUTFBytes=function(t){for(var e=t.length,r=0;r=0&&(this.dispose=t)},Ft.prototype.setRepeat=function(t){this.repeat=t},Ft.prototype.setTransparent=function(t){this.transparent=t},Ft.prototype.addFrame=function(t){this.image=t,this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null,this.getImagePixels(),this.analyzePixels(),!0===this.globalPalette&&(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},Ft.prototype.finish=function(){this.out.writeByte(59)},Ft.prototype.setQuality=function(t){t<1&&(t=1),this.sample=t},Ft.prototype.setDither=function(t){!0===t&&(t="FloydSteinberg"),this.dither=t},Ft.prototype.setGlobalPalette=function(t){this.globalPalette=t},Ft.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette},Ft.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")},Ft.prototype.analyzePixels=function(){this.colorTab||(this.neuQuant=new Lt(this.pixels,this.sample),this.neuQuant.buildColormap(),this.colorTab=this.neuQuant.getColormap()),this.dither?this.ditherPixels(this.dither.replace("-serpentine",""),null!==this.dither.match(/-serpentine/)):this.indexPixels(),this.pixels=null,this.colorDepth=8,this.palSize=7,null!==this.transparent&&(this.transIndex=this.findClosest(this.transparent,!0))},Ft.prototype.indexPixels=function(t){var e=this.pixels.length/3;this.indexedPixels=new Uint8Array(e);for(var r=0,n=0;n=0&&A+u=0&&C+h>16,(65280&t)>>8,255&t,e)},Ft.prototype.findClosestRGB=function(t,e,r,n){if(null===this.colorTab)return-1;if(this.neuQuant&&!n)return this.neuQuant.lookupRGB(t,e,r);for(var o=0,i=16777216,s=this.colorTab.length,a=0,l=0;a=0&&(e=7&this.dispose),e<<=2,this.out.writeByte(0|e|t),this.writeShort(this.delay),this.out.writeByte(this.transIndex),this.out.writeByte(0)},Ft.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)},Ft.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)},Ft.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)},Ft.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);for(var t=768-this.colorTab.length,e=0;e>8&255)},Ft.prototype.writePixels=function(){new Nt(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this.out)},Ft.prototype.stream=function(){return this.out};const Yt=Ft;var $t=r(764).lW,qt=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function s(t){try{l(n.next(t))}catch(t){i(t)}}function a(t){try{l(n.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(s,a)}l((n=n.apply(t,e||[])).next())}))};const{Canvas:Gt}=I,Ht=.4;function Qt(t){if(t)return new Promise((function(r,n){if("data"==t.slice(0,4)){let o=new Image;return o.onload=function(){r(o),e(o)},o.onerror=function(){n("Image load error"),e(o)},void(o.src=t)}let o=new Image;o.setAttribute("crossOrigin","Anonymous"),o.onload=function(){r(o)},o.onerror=function(){n("Image load error")},o.src=t}));function e(t){t.onload=null,t.onerror=null}}class Zt{constructor(t){const e=Object.assign({},t);if(Object.keys(Zt.defaultOptions).forEach((t=>{t in e||Object.defineProperty(e,t,{value:Zt.defaultOptions[t],enumerable:!0,writable:!0})})),e.components?"object"==typeof e.components&&Object.keys(Zt.defaultComponentOptions).forEach((t=>{t in e.components?Object.defineProperty(e.components,t,{value:Object.assign(Object.assign({},Zt.defaultComponentOptions[t]),e.components[t]),enumerable:!0,writable:!0}):Object.defineProperty(e.components,t,{value:Zt.defaultComponentOptions[t],enumerable:!0,writable:!0})})):e.components=Zt.defaultComponentOptions,null!==e.dotScale&&void 0!==e.dotScale){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 Gt(t.size,t.size),this.canvasContext=this.canvas.getContext("2d"),this.qrCode=new rt(-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,n,o,i){t.beginPath(),t.moveTo(e,r),t.arcTo(e+n,r,e+n,r+o,i),t.arcTo(e+n,r+o,e,r+o,i),t.arcTo(e,r+o,e,r,i),t.arcTo(e,r,e+n,r,i),t.closePath()}static _getAverageRGB(t){const e={r:0,g:0,b:0};let r,n,o=-4;const i={r:0,g:0,b:0};let s=0;n=t.naturalHeight||t.height,r=t.naturalWidth||t.width;const a=new Gt(r,n).getContext("2d");if(!a)return e;let l;a.drawImage(t,0,0);try{l=a.getImageData(0,0,r,n)}catch(t){return e}for(;(o+=20)200||l.data[o+1]>200||l.data[o+2]>200||(++s,i.r+=l.data[o],i.g+=l.data[o+1],i.b+=l.data[o+2]);return i.r=~~(i.r/s),i.g=~~(i.g/s),i.b=~~(i.b/s),i}static _drawDot(t,e,r,n,o=0,i=1){t.fillRect((e+o)*n,(r+o)*n,i*n,i*n)}static _drawAlignProtector(t,e,r,n){t.clearRect((e-2)*n,(r-2)*n,5*n,5*n),t.fillRect((e-2)*n,(r-2)*n,5*n,5*n)}static _drawAlign(t,e,r,n,o=0,i=1,s,a){const l=t.fillStyle;t.fillStyle=s,new Array(4).fill(0).map(((s,a)=>{Zt._drawDot(t,e-2+a,r-2,n,o,i),Zt._drawDot(t,e+2,r-2+a,n,o,i),Zt._drawDot(t,e+2-a,r+2,n,o,i),Zt._drawDot(t,e-2,r+2-a,n,o,i)})),Zt._drawDot(t,e,r,n,o,i),a||(t.fillStyle="rgba(255, 255, 255, 0.6)",new Array(2).fill(0).map(((s,a)=>{Zt._drawDot(t,e-1+a,r-1,n,o,i),Zt._drawDot(t,e+1,r-1+a,n,o,i),Zt._drawDot(t,e+1-a,r+1,n,o,i),Zt._drawDot(t,e-1,r+1-a,n,o,i)}))),t.fillStyle=l}_draw(){var t,e,r,n,o,i,s,a,l,h,u,c,f,g,d,p,m,y,w;return qt(this,void 0,void 0,(function*(){const v=null===(t=this.qrCode)||void 0===t?void 0:t.moduleCount,b=this.options.size;let A=this.options.margin;(A<0||2*A>=b)&&(A=0);const C=Math.ceil(A),E=b-2*A,T=this.options.whiteMargin,P=this.options.backgroundDimming,B=Math.ceil(E/v),R=B*v,x=R+2*C,S=new Gt(x,x),_=S.getContext("2d");this._clear(),_.save(),_.translate(C,C);const D=new Gt(x,x),k=D.getContext("2d");let L=null,I=[];if(this.options.gifBackground){const t=J(this.options.gifBackground);if(L=t,O=!0,I=(M=t).frames.filter((t=>t.image)).map((t=>W(t,M.gct,O))),this.options.autoColor){let t=0,e=0,r=0,n=0;for(let o=0;o200||i[1]>200||i[2]>200||(0===i[0]&&0===i[1]&&0===i[2]||(n++,t+=i[0],e+=i[1],r+=i[2]))}t=~~(t/n),e=~~(e/n),r=~~(r/n),this.options.colorDark=`rgb(${t},${e},${r})`}}else if(this.options.backgroundImage){const t=yield Qt(this.options.backgroundImage);if(this.options.autoColor){const e=Zt._getAverageRGB(t);this.options.colorDark=`rgb(${e.r},${e.g},${e.b})`}k.drawImage(t,0,0,t.width,t.height,0,0,x,x),k.rect(0,0,x,x),k.fillStyle=P,k.fill()}else k.rect(0,0,x,x),k.fillStyle=this.options.colorLight,k.fill();var M,O;const U=st.getPatternPosition(this.qrCode.typeNumber),N=(null===(r=null===(e=this.options.components)||void 0===e?void 0:e.data)||void 0===r?void 0:r.scale)||Ht,j=.5*(1-N);for(let t=0;t=v-8)||e>=v-8&&t<8;let o=n||(6==t&&e>=8&&e<=v-8||6==e&&t>=8&&t<=v-8);for(let r=1;r=U[r]-2&&t<=U[r]+2&&e>=U[r]-2&&e<=U[r]+2;const i=e*B+(o?0:j*B),s=t*B+(o?0:j*B);if(_.strokeStyle=r?this.options.colorDark:this.options.colorLight,_.lineWidth=.5,_.fillStyle=r?this.options.colorDark:this.options.colorLight,0===U.length)o||_.fillRect(i,s,(o?1:N)*B,(o?1:N)*B);else{o||e=v-4-5&&t=v-4-5||_.fillRect(i,s,(o?1:N)*B,(o?1:N)*B)}}const z=U[U.length-1],F=this.options.colorLight;if(_.fillStyle=F,_.fillRect(0,0,8*B,8*B),_.fillRect(0,(v-8)*B,8*B,8*B),_.fillRect((v-8)*B,0,8*B,8*B),(null===(o=null===(n=this.options.components)||void 0===n?void 0:n.timing)||void 0===o?void 0:o.protectors)&&(_.fillRect(8*B,6*B,(v-8-8)*B,B),_.fillRect(6*B,8*B,B,(v-8-8)*B)),(null===(s=null===(i=this.options.components)||void 0===i?void 0:i.cornerAlignment)||void 0===s?void 0:s.protectors)&&Zt._drawAlignProtector(_,z,z,B),null===(l=null===(a=this.options.components)||void 0===a?void 0:a.alignment)||void 0===l?void 0:l.protectors)for(let t=0;t=1)&&(e=.2),r<0&&(r=0),n<0&&(n=0);const o=R*e,i=.5*(x-o),s=i;_.restore(),_.fillStyle=this.options.logoBackgroundColor,_.save(),Zt._prepareRoundedCornerClip(_,i-r,s-r,o+2*r,o+2*r,n+r),_.clip();const a=_.globalCompositeOperation;_.globalCompositeOperation="destination-out",_.fill(),_.globalCompositeOperation=a,_.restore(),_.save(),Zt._prepareRoundedCornerClip(_,i,s,o,o,n),_.clip(),_.drawImage(t,i,s,o,o),_.restore(),_.save(),_.translate(C,C)}if(L){let t,e,r,n,o,i;if(I.forEach((function(s){t||(t=new Yt(b,b),t.setDelay(s.delay),t.setRepeat(0));const{width:a,height:l}=s.dims;e||(e=new Gt(a,l),r=e.getContext("2d"),r.rect(0,0,e.width,e.height),r.fillStyle="#ffffff",r.fill()),n&&i&&a===n.width&&l===n.height||(n=new Gt(a,l),o=n.getContext("2d"),i=o.createImageData(a,l)),i.data.set(s.patch),o.putImageData(i,0,0),r.drawImage(n.getContext("2d").canvas,s.dims.left,s.dims.top);const h=new Gt(x,x),u=h.getContext("2d");u.drawImage(e.getContext("2d").canvas,0,0,x,x),u.rect(0,0,x,x),u.fillStyle=P,u.fill(),u.drawImage(S.getContext("2d").canvas,0,0,x,x);const c=new Gt(b,b),f=c.getContext("2d");f.drawImage(h.getContext("2d").canvas,0,0,b,b),t.addFrame(f.getImageData(0,0,c.width,c.height).data)})),!t)throw new Error("No frames.");if(t.finish(),Kt(this.canvas)){const e=t.stream().toFlattenUint8Array().reduce(((t,e)=>t+String.fromCharCode(e)),"");return Promise.resolve(`data:image/gif;base64,${window.btoa(e)}`)}return Promise.resolve($t.from(t.stream().toFlattenUint8Array()))}{k.drawImage(S.getContext("2d").canvas,0,0,x,x),_.drawImage(D.getContext("2d").canvas,-C,-C,x,x);const t=new Gt(b,b);t.getContext("2d").drawImage(S.getContext("2d").canvas,0,0,b,b),this.canvas=t;const e=this.options.gifBackground?"gif":"png";return Kt(this.canvas)?Promise.resolve(this.canvas.toDataURL(e)):Promise.resolve(this.canvas.toBuffer(e))}}))}}function Kt(t){try{return t instanceof HTMLElement}catch(e){return"object"==typeof t&&1===t.nodeType&&"object"==typeof t.style&&"object"==typeof t.ownerDocument}}Zt.CorrectLevel=nt,Zt.defaultComponentOptions={data:{scale:.4},timing:{scale:.5,protectors:!1},alignment:{scale:.5,protectors:!1},cornerAlignment:{scale:.5,protectors:!0}},Zt.defaultOptions={text:"",size:400,margin:20,colorDark:"#000000",colorLight:"rgba(255, 255, 255, 0.6)",correctLevel:nt.M,backgroundImage:void 0,backgroundDimming:"rgba(0,0,0,0)",logoImage:void 0,logoScale:.2,logoMargin:4,logoCornerRadius:8,whiteMargin:!0,components:Zt.defaultComponentOptions,autoColor:!0,logoBackgroundColor:"#ffffff",backgroundColor:"#ffffff"};const Xt={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:()=>({imgUrl:""}),watch:{$props:{deep:!0,handler(){this.main()}}},mounted(){this.main()},methods:{async main(){if(this.gifBgSrc){const t=await o(this.gifBgSrc),e=this.logoSrc;return void this.render(void 0,e,t)}const t=this.bgSrc,e=this.logoSrc;this.render(t,e)},async render(t,e,r){const o=this;new Zt({gifBackground:r,text:o.text,size:o.size,margin:o.margin,colorDark:o.colorDark,colorLight:o.colorLight,backgroundColor:o.backgroundColor,backgroundImage:t,backgroundDimming:o.backgroundDimming,logoImage:e,logoScale:o.logoScale,logoBackgroundColor:o.logoBackgroundColor,correctLevel:o.correctLevel,logoMargin:o.logoMargin,logoCornerRadius:o.logoCornerRadius,whiteMargin:n(o.whiteMargin),dotScale:o.dotScale,autoColor:n(o.autoColor),binarize:n(o.binarize),binarizeThreshold:o.binarizeThreshold,components:o.components}).draw().then((t=>{this.imgUrl=t,o.callback&&o.callback(t,o.qid)}))}}};var Vt=r(744);const Jt=(0,Vt.Z)(Xt,[["render",function(r,n,o,i,s,a){return o.bindElement?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,style:{display:"inline-block"},src:s.imgUrl},null,8,e)):(0,t.createCommentVNode)("",!0)}]]),Wt={props:["resourceName","field"],components:{VueQr:Jt}};var te=r(379),ee=r.n(te),re=r(227),ne={insert:"head",singleton:!1};ee()(re.Z,ne);re.Z.locals;const oe=(0,Vt.Z)(Wt,[["render",function(e,r,n,o,i,s){var a=(0,t.resolveComponent)("vue-qr");return(0,t.openBlock)(),(0,t.createElementBlock)("span",null,[(0,t.createVNode)(a,{class:"qr-item",text:this.field.value,size:this.field.indexSize,bgSrc:this.field.background,logoSrc:this.field.logo,margin:this.field.margin},null,8,["text","size","bgSrc","logoSrc","margin"])])}]]);const ie={props:["index","resource","resourceName","resourceId","field"],components:{VueQr:Jt}};var se=r(623),ae={insert:"head",singleton:!1};ee()(se.Z,ae);se.Z.locals;const le=(0,Vt.Z)(ie,[["render",function(e,r,n,o,i,s){var a=(0,t.resolveComponent)("vue-qr"),l=(0,t.resolveComponent)("PanelItem");return(0,t.openBlock)(),(0,t.createBlock)(l,{index:n.index,field:n.field},{value:(0,t.withCtx)((function(){return[(0,t.createVNode)(a,{class:"qr-item",text:n.field.value,size:n.field.detailSize,bgSrc:n.field.background,logoSrc:n.field.logo,margin:n.field.margin},null,8,["text","size","bgSrc","logoSrc","margin"])]})),_:1},8,["index","field"])}]]);Nova.booting((function(t,e){t.component("index-qrcode",oe),t.component("detail-qrcode",le)}))})()})(); \ No newline at end of file diff --git a/dist/mix-manifest.json b/dist/mix-manifest.json index 507a525..580164f 100644 --- a/dist/mix-manifest.json +++ b/dist/mix-manifest.json @@ -1,4 +1,3 @@ { - "/js/field.js": "/js/field.js", - "/css/field.css": "/css/field.css" + "/js/field.js": "/js/field.js" }