import{d as Ht,m as Ot,a2 as Lt,w as me,f as P,B as pe,ao as we,h as R,aE as be,F as Jt,p as Ce,b8 as ve,c3 as Dt,aw as Ee,_ as Be,r as jt,o as Te,c as Ae,x as W,e as Se,au as Ne,H as Pe}from"./index.js";import{M as ht}from"./motion.cd0ccb33.js";/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */function kt(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ie(t){var e,r;return kt(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(kt(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function Z(){return Z=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(o[r]=t[r]);return o}const Ct={silent:!1,logLevel:"warn"},_e=["validator"],Yt=Object.prototype,qt=Yt.toString,Me=Yt.hasOwnProperty,Qt=/^\s*function (\w+)/;function Ut(t){var e;const r=(e=t==null?void 0:t.type)!==null&&e!==void 0?e:t;if(r){const n=r.toString().match(Qt);return n?n[1]:""}return""}const U=Ie,Gt=t=>t;let N=Gt;N=typeof console!="undefined"?function(e,r=Ct.logLevel){Ct.silent===!1&&console[r](`[VueTypes warn]: ${e}`)}:Gt;const z=(t,e)=>Me.call(t,e),Re=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t},V=Array.isArray||function(t){return qt.call(t)==="[object Array]"},H=t=>qt.call(t)==="[object Function]",st=t=>U(t)&&z(t,"_vueTypes_name"),Wt=t=>U(t)&&(z(t,"type")||["_vueTypes_name","validator","default","required"].some(e=>z(t,e)));function At(t,e){return Object.defineProperty(t.bind(e),"__original",{value:t})}function F(t,e,r=!1){let n,o=!0,i="";n=U(t)?t:{type:t};const s=st(n)?n._vueTypes_name+" - ":"";if(Wt(n)&&n.type!==null){if(n.type===void 0||n.type===!0||!n.required&&e===void 0)return o;V(n.type)?(o=n.type.some(u=>F(u,e,!0)===!0),i=n.type.map(u=>Ut(u)).join(" or ")):(i=Ut(n),o=i==="Array"?V(e):i==="Object"?U(e):i==="String"||i==="Number"||i==="Boolean"||i==="Function"?function(u){if(u==null)return"";const a=u.constructor.toString().match(Qt);return a?a[1]:""}(e)===i:e instanceof n.type)}if(!o){const u=`${s}value "${e}" should be of type "${i}"`;return r===!1?(N(u),!1):u}if(z(n,"validator")&&H(n.validator)){const u=N,a=[];if(N=l=>{a.push(l)},o=n.validator(e),N=u,!o){const l=(a.length>1?"* ":"")+a.join(` * `);return a.length=0,r===!1?(N(l),o):l}}return o}function _(t,e){const r=Object.defineProperties(e,{_vueTypes_name:{value:t,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(o){return o===void 0?(z(this,"default")&&delete this.default,this):H(o)||F(this,o,!0)===!0?(this.default=V(o)?()=>[...o]:U(o)?()=>Object.assign({},o):o,this):(N(`${this._vueTypes_name} - invalid default value: "${o}"`),this)}}}),{validator:n}=r;return H(n)&&(r.validator=At(n,r)),r}function O(t,e){const r=_(t,e);return Object.defineProperty(r,"validate",{value(n){return H(this.validator)&&N(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info: ${JSON.stringify(this)}`),this.validator=At(n,this),this}})}function Ft(t,e,r){const n=function(a){const l={};return Object.getOwnPropertyNames(a).forEach(c=>{l[c]=Object.getOwnPropertyDescriptor(a,c)}),Object.defineProperties({},l)}(e);if(n._vueTypes_name=t,!U(r))return n;const{validator:o}=r,i=Kt(r,_e);if(H(o)){let{validator:a}=n;a&&(a=(u=(s=a).__original)!==null&&u!==void 0?u:s),n.validator=At(a?function(l){return a.call(this,l)&&o.call(this,l)}:o,n)}var s,u;return Object.assign(n,i)}function lt(t){return t.replace(/^(?!\s*$)/gm," ")}const Oe=()=>O("any",{}),Le=()=>O("function",{type:Function}),De=()=>O("boolean",{type:Boolean}),je=()=>O("string",{type:String}),ke=()=>O("number",{type:Number}),Ue=()=>O("array",{type:Array}),Fe=()=>O("object",{type:Object}),$e=()=>_("integer",{type:Number,validator:t=>Re(t)}),ze=()=>_("symbol",{validator:t=>typeof t=="symbol"});function Ve(t,e="custom validation failed"){if(typeof t!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return _(t.name||"<>",{type:null,validator(r){const n=t(r);return n||N(`${this._vueTypes_name} - ${e}`),n}})}function He(t){if(!V(t))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const e=`oneOf - value should be one of "${t.join('", "')}".`,r=t.reduce((n,o)=>{if(o!=null){const i=o.constructor;n.indexOf(i)===-1&&n.push(i)}return n},[]);return _("oneOf",{type:r.length>0?r:void 0,validator(n){const o=t.indexOf(n)!==-1;return o||N(e),o}})}function Je(t){if(!V(t))throw new TypeError("[VueTypes error]: You must provide an array as argument");let e=!1,r=[];for(let o=0;or.indexOf(o)===i);const n=r.length>0?r:null;return _("oneOfType",e?{type:n,validator(o){const i=[],s=t.some(u=>{const a=F(st(u)&&u._vueTypes_name==="oneOf"?u.type||null:u,o,!0);return typeof a=="string"&&i.push(a),a===!0});return s||N(`oneOfType - provided value does not match any of the ${i.length} passed-in validators: ${lt(i.join(` `))}`),s}}:{type:n})}function Ke(t){return _("arrayOf",{type:Array,validator(e){let r="";const n=e.every(o=>(r=F(t,o,!0),r===!0));return n||N(`arrayOf - value validation error: ${lt(r)}`),n}})}function Ye(t){return _("instanceOf",{type:t})}function qe(t){return _("objectOf",{type:Object,validator(e){let r="";const n=Object.keys(e).every(o=>(r=F(t,e[o],!0),r===!0));return n||N(`objectOf - value validation error: ${lt(r)}`),n}})}function Qe(t){const e=Object.keys(t),r=e.filter(o=>{var i;return!((i=t[o])===null||i===void 0||!i.required)}),n=_("shape",{type:Object,validator(o){if(!U(o))return!1;const i=Object.keys(o);if(r.length>0&&r.some(s=>i.indexOf(s)===-1)){const s=r.filter(u=>i.indexOf(u)===-1);return N(s.length===1?`shape - required property "${s[0]}" is not defined.`:`shape - required properties "${s.join('", "')}" are not defined.`),!1}return i.every(s=>{if(e.indexOf(s)===-1)return this._vueTypes_isLoose===!0||(N(`shape - shape definition does not include a "${s}" property. Allowed keys: "${e.join('", "')}".`),!1);const u=F(t[s],o[s],!0);return typeof u=="string"&&N(`shape - "${s}" property validation error: ${lt(u)}`),u===!0})}});return Object.defineProperty(n,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(n,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),n}const Ge=["name","validate","getter"],We=(()=>{var t;return(t=class{static get any(){return Oe()}static get func(){return Le().def(this.defaults.func)}static get bool(){return De().def(this.defaults.bool)}static get string(){return je().def(this.defaults.string)}static get number(){return ke().def(this.defaults.number)}static get array(){return Ue().def(this.defaults.array)}static get object(){return Fe().def(this.defaults.object)}static get integer(){return $e().def(this.defaults.integer)}static get symbol(){return ze()}static get nullable(){return{type:null}}static extend(e){if(V(e))return e.forEach(a=>this.extend(a)),this;const{name:r,validate:n=!1,getter:o=!1}=e,i=Kt(e,Ge);if(z(this,r))throw new TypeError(`[VueTypes error]: Type "${r}" already defined`);const{type:s}=i;if(st(s))return delete i.type,Object.defineProperty(this,r,o?{get:()=>Ft(r,s,i)}:{value(...a){const l=Ft(r,s,i);return l.validator&&(l.validator=l.validator.bind(l,...a)),l}});let u;return u=o?{get(){const a=Object.assign({},i);return n?O(r,a):_(r,a)},enumerable:!0}:{value(...a){const l=Object.assign({},i);let c;return c=n?O(r,l):_(r,l),l.validator&&(c.validator=l.validator.bind(c,...a)),c},enumerable:!0},Object.defineProperty(this,r,u)}}).defaults={},t.sensibleDefaults=void 0,t.config=Ct,t.custom=Ve,t.oneOf=He,t.instanceOf=Ye,t.oneOfType=Je,t.arrayOf=Ke,t.objectOf=qe,t.shape=Qe,t.utils={validate:(e,r)=>F(r,e,!0)===!0,toType:(e,r,n=!1)=>n?O(e,r):_(e,r)},t})();function Xt(t={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var e;return(e=class extends We{static get sensibleDefaults(){return Z({},this.defaults)}static set sensibleDefaults(r){this.defaults=r!==!1?Z({},r!==!0?r:t):{}}}).defaults=Z({},t),e}class Jn extends Xt(){}const X=Xt({func:void 0,bool:void 0,string:void 0,number:void 0,object:void 0,integer:void 0});X.extend([{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VNodeChild",getter:!0,type:void 0}]);var et={},Xe=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Zt={},M={};let St;const Ze=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];M.getSymbolSize=function(e){if(!e)throw new Error('"version" cannot be null or undefined');if(e<1||e>40)throw new Error('"version" should be in range from 1 to 40');return e*4+17};M.getSymbolTotalCodewords=function(e){return Ze[e]};M.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};M.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');St=e};M.isKanjiModeEnabled=function(){return typeof St!="undefined"};M.toSJIS=function(e){return St(e)};var ct={};(function(t){t.L={bit:1},t.M={bit:0},t.Q={bit:3},t.H={bit:2};function e(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw new Error("Unknown EC Level: "+r)}}t.isValid=function(n){return n&&typeof n.bit!="undefined"&&n.bit>=0&&n.bit<4},t.from=function(n,o){if(t.isValid(n))return n;try{return e(n)}catch{return o}}})(ct);function xt(){this.buffer=[],this.length=0}xt.prototype={get:function(t){const e=Math.floor(t/8);return(this.buffer[e]>>>7-t%8&1)===1},put:function(t,e){for(let r=0;r>>e-r-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(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++}};var xe=xt;function nt(t){if(!t||t<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=t,this.data=new Uint8Array(t*t),this.reservedBit=new Uint8Array(t*t)}nt.prototype.set=function(t,e,r,n){const o=t*this.size+e;this.data[o]=r,n&&(this.reservedBit[o]=!0)};nt.prototype.get=function(t,e){return this.data[t*this.size+e]};nt.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};nt.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var tn=nt,te={};(function(t){const e=M.getSymbolSize;t.getRowColCoords=function(n){if(n===1)return[];const o=Math.floor(n/7)+2,i=e(n),s=i===145?26:Math.ceil((i-13)/(2*o-2))*2,u=[i-7];for(let a=1;a=0&&o<=7},t.from=function(o){return t.isValid(o)?parseInt(o,10):void 0},t.getPenaltyN1=function(o){const i=o.size;let s=0,u=0,a=0,l=null,c=null;for(let v=0;v=5&&(s+=e.N1+(u-5)),l=y,u=1),y=o.get(p,v),y===c?a++:(a>=5&&(s+=e.N1+(a-5)),c=y,a=1)}u>=5&&(s+=e.N1+(u-5)),a>=5&&(s+=e.N1+(a-5))}return s},t.getPenaltyN2=function(o){const i=o.size;let s=0;for(let u=0;u=10&&(u===1488||u===93)&&s++,a=a<<1&2047|o.get(c,l),c>=10&&(a===1488||a===93)&&s++}return s*e.N3},t.getPenaltyN4=function(o){let i=0;const s=o.data.length;for(let a=0;a=0;){const s=i[0];for(let a=0;a0){const i=new Uint8Array(this.degree);return i.set(n,o),i}return n};var nn=Nt,ie={},k={},Pt={};Pt.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var L={};const se="[0-9]+",rn="[A-Z $%*+\\-./:]+";let tt="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";tt=tt.replace(/u/g,"\\u");const on="(?:(?![A-Z0-9 $%*+\\-./:]|"+tt+`)(?:.|[\r ]))+`;L.KANJI=new RegExp(tt,"g");L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");L.BYTE=new RegExp(on,"g");L.NUMERIC=new RegExp(se,"g");L.ALPHANUMERIC=new RegExp(rn,"g");const sn=new RegExp("^"+tt+"$"),an=new RegExp("^"+se+"$"),un=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");L.testKanji=function(e){return sn.test(e)};L.testNumeric=function(e){return an.test(e)};L.testAlphanumeric=function(e){return un.test(e)};(function(t){const e=Pt,r=L;t.NUMERIC={id:"Numeric",bit:1<<0,ccBits:[10,12,14]},t.ALPHANUMERIC={id:"Alphanumeric",bit:1<<1,ccBits:[9,11,13]},t.BYTE={id:"Byte",bit:1<<2,ccBits:[8,16,16]},t.KANJI={id:"Kanji",bit:1<<3,ccBits:[8,10,12]},t.MIXED={bit:-1},t.getCharCountIndicator=function(i,s){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?i.ccBits[0]:s<27?i.ccBits[1]:i.ccBits[2]},t.getBestModeForData=function(i){return r.testNumeric(i)?t.NUMERIC:r.testAlphanumeric(i)?t.ALPHANUMERIC:r.testKanji(i)?t.KANJI:t.BYTE},t.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},t.isValid=function(i){return i&&i.bit&&i.ccBits};function n(o){if(typeof o!="string")throw new Error("Param is not a string");switch(o.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw new Error("Unknown mode: "+o)}}t.from=function(i,s){if(t.isValid(i))return i;try{return n(i)}catch{return s}}})(k);(function(t){const e=M,r=ft,n=ct,o=k,i=Pt,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,u=e.getBCHDigit(s);function a(p,y,w){for(let f=1;f<=40;f++)if(y<=t.getCapacity(f,w,p))return f}function l(p,y){return o.getCharCountIndicator(p,y)+4}function c(p,y){let w=0;return p.forEach(function(f){w+=l(f.mode,y)+f.getBitsLength()}),w}function v(p,y){for(let w=1;w<=40;w++)if(c(p,w)<=t.getCapacity(w,y,o.MIXED))return w}t.from=function(y,w){return i.isValid(y)?parseInt(y,10):w},t.getCapacity=function(y,w,f){if(!i.isValid(y))throw new Error("Invalid QR Code version");typeof f=="undefined"&&(f=o.BYTE);const b=e.getSymbolTotalCodewords(y),d=r.getTotalCodewordsCount(y,w),m=(b-d)*8;if(f===o.MIXED)return m;const h=m-l(f,y);switch(f){case o.NUMERIC:return Math.floor(h/10*3);case o.ALPHANUMERIC:return Math.floor(h/11*2);case o.KANJI:return Math.floor(h/13);case o.BYTE:default:return Math.floor(h/8)}},t.getBestVersionForData=function(y,w){let f;const b=n.from(w,n.M);if(Array.isArray(y)){if(y.length>1)return v(y,b);if(y.length===0)return 1;f=y[0]}else f=y;return a(f.mode,f.getLength(),b)},t.getEncodedBits=function(y){if(!i.isValid(y)||y<7)throw new Error("Invalid QR Code version");let w=y<<12;for(;e.getBCHDigit(w)-u>=0;)w^=s<=0;)o^=ue<0&&(n=this.data.substr(r),o=parseInt(n,10),e.put(o,i*3+1))};var fn=J;const dn=k,yt=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function K(t){this.mode=dn.ALPHANUMERIC,this.data=t}K.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};K.prototype.getLength=function(){return this.data.length};K.prototype.getBitsLength=function(){return K.getBitsLength(this.data.length)};K.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let n=yt.indexOf(this.data[r])*45;n+=yt.indexOf(this.data[r+1]),e.put(n,11)}this.data.length%2&&e.put(yt.indexOf(this.data[r]),6)};var gn=K;const hn=k;function Y(t){this.mode=hn.BYTE,typeof t=="string"?this.data=new TextEncoder().encode(t):this.data=new Uint8Array(t)}Y.getBitsLength=function(e){return e*8};Y.prototype.getLength=function(){return this.data.length};Y.prototype.getBitsLength=function(){return Y.getBitsLength(this.data.length)};Y.prototype.write=function(t){for(let e=0,r=this.data.length;e=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw new Error("Invalid SJIS character: "+this.data[e]+` Make sure your charset is UTF-8`);r=(r>>>8&255)*192+(r&255),t.put(r,13)}};var wn=q,ce={exports:{}};(function(t){var e={single_source_shortest_paths:function(r,n,o){var i={},s={};s[n]=0;var u=e.PriorityQueue.make();u.push(n,0);for(var a,l,c,v,p,y,w,f,b;!u.empty();){a=u.pop(),l=a.value,v=a.cost,p=r[l]||{};for(c in p)p.hasOwnProperty(c)&&(y=p[c],w=v+y,f=s[c],b=typeof s[c]=="undefined",(b||f>w)&&(s[c]=w,u.push(c,w),i[c]=l))}if(typeof o!="undefined"&&typeof s[o]=="undefined"){var d=["Could not find a path from ",n," to ",o,"."].join("");throw new Error(d)}return i},extract_shortest_path_from_predecessor_list:function(r,n){for(var o=[],i=n;i;)o.push(i),r[i],i=r[i];return o.reverse(),o},find_path:function(r,n,o){var i=e.single_source_shortest_paths(r,n,o);return e.extract_shortest_path_from_predecessor_list(i,o)},PriorityQueue:{make:function(r){var n=e.PriorityQueue,o={},i;r=r||{};for(i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);return o.queue=[],o.sorter=r.sorter||n.default_sorter,o},default_sorter:function(r,n){return r.cost-n.cost},push:function(r,n){var o={value:r,cost:n};this.queue.push(o),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(ce);(function(t){const e=k,r=fn,n=gn,o=yn,i=wn,s=L,u=M,a=ce.exports;function l(d){return unescape(encodeURIComponent(d)).length}function c(d,m,h){const g=[];let C;for(;(C=d.exec(h))!==null;)g.push({data:C[0],index:C.index,mode:m,length:C[0].length});return g}function v(d){const m=c(s.NUMERIC,e.NUMERIC,d),h=c(s.ALPHANUMERIC,e.ALPHANUMERIC,d);let g,C;return u.isKanjiModeEnabled()?(g=c(s.BYTE,e.BYTE,d),C=c(s.KANJI,e.KANJI,d)):(g=c(s.BYTE_KANJI,e.BYTE,d),C=[]),m.concat(h,g,C).sort(function(B,I){return B.index-I.index}).map(function(B){return{data:B.data,mode:B.mode,length:B.length}})}function p(d,m){switch(m){case e.NUMERIC:return r.getBitsLength(d);case e.ALPHANUMERIC:return n.getBitsLength(d);case e.KANJI:return i.getBitsLength(d);case e.BYTE:return o.getBitsLength(d)}}function y(d){return d.reduce(function(m,h){const g=m.length-1>=0?m[m.length-1]:null;return g&&g.mode===h.mode?(m[m.length-1].data+=h.data,m):(m.push(h),m)},[])}function w(d){const m=[];for(let h=0;h=0&&u<=6&&(a===0||a===6)||a>=0&&a<=6&&(u===0||u===6)||u>=2&&u<=4&&a>=2&&a<=4?t.set(i+u,s+a,!0,!0):t.set(i+u,s+a,!1,!0))}}function Nn(t){const e=t.size;for(let r=8;r>u&1)===1,t.set(o,i,s,!0),t.set(i,o,s,!0)}function wt(t,e,r){const n=t.size,o=Tn.getEncodedBits(e,r);let i,s;for(i=0;i<15;i++)s=(o>>i&1)===1,i<6?t.set(i,8,s,!0):i<8?t.set(i+1,8,s,!0):t.set(n-15+i,8,s,!0),i<8?t.set(8,n-i-1,s,!0):i<9?t.set(8,15-i-1+1,s,!0):t.set(8,15-i-1,s,!0);t.set(n-8,8,1,!0)}function _n(t,e){const r=t.size;let n=-1,o=r-1,i=7,s=0;for(let u=r-1;u>0;u-=2)for(u===6&&u--;;){for(let a=0;a<2;a++)if(!t.isReserved(o,u-a)){let l=!1;s>>i&1)===1),t.set(o,u-a,l),i--,i===-1&&(s++,i=7)}if(o+=n,o<0||r<=o){o-=n,n=-n;break}}}function Mn(t,e,r){const n=new bn;r.forEach(function(a){n.put(a.mode.bit,4),n.put(a.getLength(),An.getCharCountIndicator(a.mode,t)),a.write(n)});const o=gt.getSymbolTotalCodewords(t),i=Bt.getTotalCodewordsCount(t,e),s=(o-i)*8;for(n.getLengthInBits()+4<=s&&n.put(0,4);n.getLengthInBits()%8!==0;)n.putBit(0);const u=(s-n.getLengthInBits())/8;for(let a=0;a=7&&In(a,e),_n(a,s),isNaN(n)&&(n=Et.getBestMask(a,wt.bind(null,a,r))),Et.applyMask(n,a),wt(a,r,n),{modules:a,version:e,errorCorrectionLevel:r,maskPattern:n,segments:o}}Zt.create=function(e,r){if(typeof e=="undefined"||e==="")throw new Error("No input text");let n=mt.M,o,i;return typeof r!="undefined"&&(n=mt.from(r.errorCorrectionLevel,mt.M),o=ut.from(r.version),i=Et.from(r.maskPattern),r.toSJISFunc&>.setToSJISFunction(r.toSJISFunc)),On(e,o,n,i)};var fe={},It={};(function(t){function e(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let n=r.slice().replace("#","").split("");if(n.length<3||n.length===5||n.length>8)throw new Error("Invalid hex color: "+r);(n.length===3||n.length===4)&&(n=Array.prototype.concat.apply([],n.map(function(i){return[i,i]}))),n.length===6&&n.push("F","F");const o=parseInt(n.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+n.slice(0,6).join("")}}t.getOptions=function(n){n||(n={}),n.color||(n.color={});const o=typeof n.margin=="undefined"||n.margin===null||n.margin<0?4:n.margin,i=n.width&&n.width>=21?n.width:void 0,s=n.scale||4;return{width:i,scale:i?4:s,margin:o,color:{dark:e(n.color.dark||"#000000ff"),light:e(n.color.light||"#ffffffff")},type:n.type,rendererOpts:n.rendererOpts||{}}},t.getScale=function(n,o){return o.width&&o.width>=n+o.margin*2?o.width/(n+o.margin*2):o.scale},t.getImageWidth=function(n,o){const i=t.getScale(n,o);return Math.floor((n+o.margin*2)*i)},t.qrToImageData=function(n,o,i){const s=o.modules.size,u=o.modules.data,a=t.getScale(s,i),l=Math.floor((s+i.margin*2)*a),c=i.margin*a,v=[i.color.light,i.color.dark];for(let p=0;p=c&&y>=c&&p0&&a>0&&t[u-1]||(n+=i?bt("M",a+r,.5+l+r):bt("m",o,0),o=0,i=!1),a+1':"",l="',c='viewBox="0 0 '+u+" "+u+'"',v=o.width?'width="'+o.width+'" height="'+o.width+'" ':"",p=''+a+l+` `;return typeof n=="function"&&n(null,p),p};const jn=Xe,Tt=Zt,ge=fe,kn=de;function _t(t,e,r,n,o){const i=[].slice.call(arguments,1),s=i.length,u=typeof i[s-1]=="function";if(!u&&!jn())throw new Error("Callback required as last argument");if(u){if(s<2)throw new Error("Too few arguments provided");s===2?(o=r,r=e,e=n=void 0):s===3&&(e.getContext&&typeof o=="undefined"?(o=n,n=void 0):(o=n,n=r,r=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(r=e,e=n=void 0):s===2&&!e.getContext&&(n=r,r=e,e=void 0),new Promise(function(a,l){try{const c=Tt.create(r,n);a(t(c,e,n))}catch(c){l(c)}})}try{const a=Tt.create(r,n);o(null,t(a,e,n))}catch(a){o(a)}}et.create=Tt.create;et.toCanvas=_t.bind(null,ge.render);et.toDataURL=_t.bind(null,ge.renderToDataURL);et.toString=_t.bind(null,function(t,e,r){return kn.render(t,r)});const Un={tag:X.string.validate(t=>["canvas","img"].includes(t)).def("canvas"),text:{type:[String,Array],default:null},options:{type:Object,default:()=>({})},width:X.number.def(200),logo:{type:[String,Object],default:()=>""},disabled:X.bool.def(!1),disabledText:X.string.def("")};var Fn=Ht({name:"ReQrcode",props:Un,emits:["done","click","disabled-click"],setup(t,{emit:e}){const{toCanvas:r,toDataURL:n}=et,o=Ot(!0),i=Ot(null),s=Lt(()=>String(t.text)),u=Lt(()=>({width:t.width+"px",height:t.width+"px"})),a=async()=>{await Ce();const f=ve(t.options||{});if(t.tag==="canvas"){f.errorCorrectionLevel=f.errorCorrectionLevel||v(R(s));const b=await c(R(s),f);f.scale=t.width===0?void 0:t.width/b*4;const d=await r(R(i),R(s),f);if(t.logo){const m=await l(d);e("done",m),o.value=!1}else e("done",d.toDataURL()),o.value=!1}else{const b=await n(s.value,{errorCorrectionLevel:"H",width:t.width,...f});R(i).src=b,e("done",b),o.value=!1}};me(()=>s.value,f=>{!f||a()},{deep:!0,immediate:!0});const l=f=>{const b=f.width,d=Object.assign({logoSize:.15,bgColor:"#ffffff",borderSize:.05,crossOrigin:"anonymous",borderRadius:8,logoRadius:0},Dt(t.logo)?{}:t.logo),{logoSize:m=.15,bgColor:h="#ffffff",borderSize:g=.05,crossOrigin:C="anonymous",borderRadius:E=8,logoRadius:B=0}=d,I=Dt(t.logo)?t.logo:t.logo.src,S=b*m,A=b*(1-m)/2,D=b*(m+g),$=b*(1-m-g)/2,T=f.getContext("2d");if(!T)return;p(T)($,$,D,D,E),T.fillStyle=h,T.fill();const Q=new Image;(C||B)&&Q.setAttribute("crossOrigin",C),Q.src=I;const he=G=>{T.drawImage(G,A,A,S,S)},ye=G=>{const rt=document.createElement("canvas");rt.width=A+S,rt.height=A+S;const Mt=rt.getContext("2d");if(!Mt||!T||(Mt.drawImage(G,A,A,S,S),p(T)(A,A,S,S,B),!T))return;const Rt=T.createPattern(rt,"no-repeat");Rt&&(T.fillStyle=Rt,T.fill())};return new Promise(G=>{Q.onload=()=>{B?ye(Q):he(Q),G(f.toDataURL())}})},c=async(f,b)=>{const d=document.createElement("canvas");return await r(d,f,b),d.width},v=f=>f.length>36?"M":f.length>16?"Q":"H",p=f=>(b,d,m,h,g)=>{const C=Math.min(m,h);return g>C/2&&(g=C/2),f.beginPath(),f.moveTo(b+g,d),f.arcTo(b+m,d,b+m,d+h,g),f.arcTo(b+m,d+h,b,d+h,g),f.arcTo(b,d+h,b,d,g),f.arcTo(b,d,b+m,d,g),f.closePath(),f},y=()=>{e("click")},w=()=>{e("disabled-click")};return()=>P(Jt,null,[pe(P("div",{class:"qrcode relative inline-block",style:R(u)},[t.tag==="canvas"?P("canvas",{ref:i,onClick:y},null):P("img",{ref:i,onClick:y},null),t.disabled&&P("div",{class:"qrcode--disabled absolute top-0 left-0 flex w-full h-full items-center justify-center",onClick:w},[P("div",{class:"absolute top-[50%] left-[50%] font-bold"},[P(be,{class:"cursor-pointer",icon:"refresh-right",width:"30",color:"var(--el-color-primary)"},null),P("div",null,[t.disabledText])])])]),[[we("loading"),R(o)]])])}});const $n=Ee(Fn),zn=Ht({__name:"qrCode",setup(t){return(e,r)=>{const n=jt("el-divider"),o=jt("el-button");return Te(),Ae(Jt,null,[P(R(ht),{class:"-mt-2 -mb-2"},{default:W(()=>[P(R($n),{text:"\u6A21\u62DF\u6D4B\u8BD5"})]),_:1}),P(R(ht),{delay:100},{default:W(()=>[P(n,null,{default:W(()=>r[1]||(r[1]=[Se("p",{class:"text-gray-500 text-xs"},'\u626B\u7801\u540E\u70B9\u51FB"\u786E\u8BA4"\uFF0C\u5373\u53EF\u5B8C\u6210\u767B\u5F55',-1)])),_:1})]),_:1}),P(R(ht),{delay:150},{default:W(()=>[P(o,{class:"w-full mt-4",onClick:r[0]||(r[0]=i=>R(Ne)().SET_CURRENTPAGE(0))},{default:W(()=>r[2]||(r[2]=[Pe(" \u8FD4\u56DE ")])),_:1})]),_:1})],64)}}});var Kn=Be(zn,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/login/components/qrCode.vue"]]);export{Kn as default};