import{a as Ht,r as Rt,I as Ot,w as ye,f as P,Z as me,a7 as pe,u as N,aj as we,F as Kt,Y as be,a$ as Ce,b0 as Lt,aw as ve,ad as Ee,b as Dt,c as Te,e as Be,h as x,m as Ae,p as jt,x as Se}from"./index.ecc6b905.js";import{M as ht,u as Ie}from"./user.a12080ba.js";/*! * is-plain-object * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */function Ft(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ne(t){var e,r;return Ft(t)===!1?!1:(e=t.constructor,e===void 0?!0:(r=e.prototype,!(Ft(r)===!1||r.hasOwnProperty("isPrototypeOf")===!1)))}function X(){return X=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(i[r]=t[r]);return i}const Pe={silent:!1,logLevel:"warn"},_e=["validator"],Jt=Object.prototype,qt=Jt.toString,Me=Jt.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 o=r.toString().match(Qt);return o?o[1]:""}return""}const U=Ne,Re=t=>t;let I=Re;const z=(t,e)=>Me.call(t,e),Oe=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"),Gt=t=>U(t)&&(z(t,"type")||["_vueTypes_name","validator","default","required"].some(e=>z(t,e)));function Bt(t,e){return Object.defineProperty(t.bind(e),"__original",{value:t})}function k(t,e,r=!1){let o,i=!0,n="";o=U(t)?t:{type:t};const s=st(o)?o._vueTypes_name+" - ":"";if(Gt(o)&&o.type!==null){if(o.type===void 0||o.type===!0||!o.required&&e===void 0)return i;V(o.type)?(i=o.type.some(u=>k(u,e,!0)===!0),n=o.type.map(u=>Ut(u)).join(" or ")):(n=Ut(o),i=n==="Array"?V(e):n==="Object"?U(e):n==="String"||n==="Number"||n==="Boolean"||n==="Function"?function(u){if(u==null)return"";const a=u.constructor.toString().match(Qt);return a?a[1]:""}(e)===n:e instanceof o.type)}if(!i){const u=`${s}value "${e}" should be of type "${n}"`;return r===!1?(I(u),!1):u}if(z(o,"validator")&&H(o.validator)){const u=I,a=[];if(I=l=>{a.push(l)},i=o.validator(e),I=u,!i){const l=(a.length>1?"* ":"")+a.join(` * `);return a.length=0,r===!1?(I(l),i):l}}return i}function M(t,e){const r=Object.defineProperties(e,{_vueTypes_name:{value:t,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(i){return i===void 0?(z(this,"default")&&delete this.default,this):H(i)||k(this,i,!0)===!0?(this.default=V(i)?()=>[...i]:U(i)?()=>Object.assign({},i):i,this):(I(`${this._vueTypes_name} - invalid default value: "${i}"`),this)}}}),{validator:o}=r;return H(o)&&(r.validator=Bt(o,r)),r}function O(t,e){const r=M(t,e);return Object.defineProperty(r,"validate",{value(o){return H(this.validator)&&I(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info: ${JSON.stringify(this)}`),this.validator=Bt(o,this),this}})}function kt(t,e,r){const o=function(a){const l={};return Object.getOwnPropertyNames(a).forEach(c=>{l[c]=Object.getOwnPropertyDescriptor(a,c)}),Object.defineProperties({},l)}(e);if(o._vueTypes_name=t,!U(r))return o;const{validator:i}=r,n=Yt(r,_e);if(H(i)){let{validator:a}=o;a&&(a=(u=(s=a).__original)!==null&&u!==void 0?u:s),o.validator=Bt(a?function(l){return a.call(this,l)&&i.call(this,l)}:i,o)}var s,u;return Object.assign(o,n)}function lt(t){return t.replace(/^(?!\s*$)/gm," ")}const Le=()=>O("any",{}),De=()=>O("function",{type:Function}),je=()=>O("boolean",{type:Boolean}),Fe=()=>O("string",{type:String}),Ue=()=>O("number",{type:Number}),ke=()=>O("array",{type:Array}),$e=()=>O("object",{type:Object}),ze=()=>M("integer",{type:Number,validator:t=>Oe(t)}),Ve=()=>M("symbol",{validator:t=>typeof t=="symbol"});function He(t,e="custom validation failed"){if(typeof t!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return M(t.name||"<>",{type:null,validator(r){const o=t(r);return o||I(`${this._vueTypes_name} - ${e}`),o}})}function Ke(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((o,i)=>{if(i!=null){const n=i.constructor;o.indexOf(n)===-1&&o.push(n)}return o},[]);return M("oneOf",{type:r.length>0?r:void 0,validator(o){const i=t.indexOf(o)!==-1;return i||I(e),i}})}function Ye(t){if(!V(t))throw new TypeError("[VueTypes error]: You must provide an array as argument");let e=!1,r=[];for(let i=0;ir.indexOf(i)===n);const o=r.length>0?r:null;return M("oneOfType",e?{type:o,validator(i){const n=[],s=t.some(u=>{const a=k(st(u)&&u._vueTypes_name==="oneOf"?u.type||null:u,i,!0);return typeof a=="string"&&n.push(a),a===!0});return s||I(`oneOfType - provided value does not match any of the ${n.length} passed-in validators: ${lt(n.join(` `))}`),s}}:{type:o})}function Je(t){return M("arrayOf",{type:Array,validator(e){let r="";const o=e.every(i=>(r=k(t,i,!0),r===!0));return o||I(`arrayOf - value validation error: ${lt(r)}`),o}})}function qe(t){return M("instanceOf",{type:t})}function Qe(t){return M("objectOf",{type:Object,validator(e){let r="";const o=Object.keys(e).every(i=>(r=k(t,e[i],!0),r===!0));return o||I(`objectOf - value validation error: ${lt(r)}`),o}})}function Ge(t){const e=Object.keys(t),r=e.filter(i=>{var n;return!((n=t[i])===null||n===void 0||!n.required)}),o=M("shape",{type:Object,validator(i){if(!U(i))return!1;const n=Object.keys(i);if(r.length>0&&r.some(s=>n.indexOf(s)===-1)){const s=r.filter(u=>n.indexOf(u)===-1);return I(s.length===1?`shape - required property "${s[0]}" is not defined.`:`shape - required properties "${s.join('", "')}" are not defined.`),!1}return n.every(s=>{if(e.indexOf(s)===-1)return this._vueTypes_isLoose===!0||(I(`shape - shape definition does not include a "${s}" property. Allowed keys: "${e.join('", "')}".`),!1);const u=k(t[s],i[s],!0);return typeof u=="string"&&I(`shape - "${s}" property validation error: ${lt(u)}`),u===!0})}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),o}const xe=["name","validate","getter"],We=(()=>{var t;return(t=class{static get any(){return Le()}static get func(){return De().def(this.defaults.func)}static get bool(){return je().def(this.defaults.bool)}static get string(){return Fe().def(this.defaults.string)}static get number(){return Ue().def(this.defaults.number)}static get array(){return ke().def(this.defaults.array)}static get object(){return $e().def(this.defaults.object)}static get integer(){return ze().def(this.defaults.integer)}static get symbol(){return Ve()}static get nullable(){return{type:null}}static extend(e){if(V(e))return e.forEach(a=>this.extend(a)),this;const{name:r,validate:o=!1,getter:i=!1}=e,n=Yt(e,xe);if(z(this,r))throw new TypeError(`[VueTypes error]: Type "${r}" already defined`);const{type:s}=n;if(st(s))return delete n.type,Object.defineProperty(this,r,i?{get:()=>kt(r,s,n)}:{value(...a){const l=kt(r,s,n);return l.validator&&(l.validator=l.validator.bind(l,...a)),l}});let u;return u=i?{get(){const a=Object.assign({},n);return o?O(r,a):M(r,a)},enumerable:!0}:{value(...a){const l=Object.assign({},n);let c;return c=o?O(r,l):M(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=Pe,t.custom=He,t.oneOf=Ke,t.instanceOf=qe,t.oneOfType=Ye,t.arrayOf=Je,t.objectOf=Qe,t.shape=Ge,t.utils={validate:(e,r)=>k(r,e,!0)===!0,toType:(e,r,o=!1)=>o?O(e,r):M(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 X({},this.defaults)}static set sensibleDefaults(r){this.defaults=r!==!1?X({},r!==!0?r:t):{}}}).defaults=X({},t),e}class Qn extends xt(){}const W=xt({func:void 0,bool:void 0,string:void 0,number:void 0,object:void 0,integer:void 0});W.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},Wt={},R={};let At;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];R.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};R.getSymbolTotalCodewords=function(e){return Ze[e]};R.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};R.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');At=e};R.isKanjiModeEnabled=function(){return typeof At<"u"};R.toSJIS=function(e){return At(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(o){return o&&typeof o.bit<"u"&&o.bit>=0&&o.bit<4},t.from=function(o,i){if(t.isValid(o))return o;try{return e(o)}catch{return i}}})(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 tn=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,o){const i=t*this.size+e;this.data[i]=r,o&&(this.reservedBit[i]=!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 en=nt,Zt={};(function(t){const e=R.getSymbolSize;t.getRowColCoords=function(o){if(o===1)return[];const i=Math.floor(o/7)+2,n=e(o),s=n===145?26:Math.ceil((n-13)/(2*i-2))*2,u=[n-7];for(let a=1;a=0&&i<=7},t.from=function(i){return t.isValid(i)?parseInt(i,10):void 0},t.getPenaltyN1=function(i){const n=i.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=i.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(i){const n=i.size;let s=0;for(let u=0;u=10&&(u===1488||u===93)&&s++,a=a<<1&2047|i.get(c,l),c>=10&&(a===1488||a===93)&&s++}return s*e.N3},t.getPenaltyN4=function(i){let n=0;const s=i.data.length;for(let a=0;a=0;){const s=n[0];for(let a=0;a0){const n=new Uint8Array(this.degree);return n.set(o,i),n}return o};var rn=St,oe={},F={},It={};It.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var L={};const ie="[0-9]+",on="[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 sn="(?:(?![A-Z0-9 $%*+\\-./:]|"+tt+`)(?:.|[\r ]))+`;L.KANJI=new RegExp(tt,"g");L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");L.BYTE=new RegExp(sn,"g");L.NUMERIC=new RegExp(ie,"g");L.ALPHANUMERIC=new RegExp(on,"g");const an=new RegExp("^"+tt+"$"),un=new RegExp("^"+ie+"$"),ln=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");L.testKanji=function(e){return an.test(e)};L.testNumeric=function(e){return un.test(e)};L.testAlphanumeric=function(e){return ln.test(e)};(function(t){const e=It,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(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!e.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?n.ccBits[0]:s<27?n.ccBits[1]:n.ccBits[2]},t.getBestModeForData=function(n){return r.testNumeric(n)?t.NUMERIC:r.testAlphanumeric(n)?t.ALPHANUMERIC:r.testKanji(n)?t.KANJI:t.BYTE},t.toString=function(n){if(n&&n.id)return n.id;throw new Error("Invalid mode")},t.isValid=function(n){return n&&n.bit&&n.ccBits};function o(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.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: "+i)}}t.from=function(n,s){if(t.isValid(n))return n;try{return o(n)}catch{return s}}})(F);(function(t){const e=R,r=ft,o=ct,i=F,n=It,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 i.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,i.MIXED))return w}t.from=function(y,w){return n.isValid(y)?parseInt(y,10):w},t.getCapacity=function(y,w,f){if(!n.isValid(y))throw new Error("Invalid QR Code version");typeof f>"u"&&(f=i.BYTE);const b=e.getSymbolTotalCodewords(y),d=r.getTotalCodewordsCount(y,w),m=(b-d)*8;if(f===i.MIXED)return m;const h=m-l(f,y);switch(f){case i.NUMERIC:return Math.floor(h/10*3);case i.ALPHANUMERIC:return Math.floor(h/11*2);case i.KANJI:return Math.floor(h/13);case i.BYTE:default:return Math.floor(h/8)}},t.getBestVersionForData=function(y,w){let f;const b=o.from(w,o.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(!n.isValid(y)||y<7)throw new Error("Invalid QR Code version");let w=y<<12;for(;e.getBCHDigit(w)-u>=0;)w^=s<=0;)i^=ae<0&&(o=this.data.substr(r),i=parseInt(o,10),e.put(i,n*3+1))};var dn=K;const gn=F,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 Y(t){this.mode=gn.ALPHANUMERIC,this.data=t}Y.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};Y.prototype.getLength=function(){return this.data.length};Y.prototype.getBitsLength=function(){return Y.getBitsLength(this.data.length)};Y.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let o=yt.indexOf(this.data[r])*45;o+=yt.indexOf(this.data[r+1]),e.put(o,11)}this.data.length%2&&e.put(yt.indexOf(this.data[r]),6)};var hn=Y,yn=function(e){for(var r=[],o=e.length,i=0;i=55296&&n<=56319&&o>i+1){var s=e.charCodeAt(i+1);s>=56320&&s<=57343&&(n=(n-55296)*1024+s-56320+65536,i+=1)}if(n<128){r.push(n);continue}if(n<2048){r.push(n>>6|192),r.push(n&63|128);continue}if(n<55296||n>=57344&&n<65536){r.push(n>>12|224),r.push(n>>6&63|128),r.push(n&63|128);continue}if(n>=65536&&n<=1114111){r.push(n>>18|240),r.push(n>>12&63|128),r.push(n>>6&63|128),r.push(n&63|128);continue}r.push(239,191,189)}return new Uint8Array(r).buffer};const mn=yn,pn=F;function J(t){this.mode=pn.BYTE,typeof t=="string"&&(t=mn(t)),this.data=new Uint8Array(t)}J.getBitsLength=function(e){return e*8};J.prototype.getLength=function(){return this.data.length};J.prototype.getBitsLength=function(){return J.getBitsLength(this.data.length)};J.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 vn=q,le={exports:{}};(function(t){var e={single_source_shortest_paths:function(r,o,i){var n={},s={};s[o]=0;var u=e.PriorityQueue.make();u.push(o,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]>"u",(b||f>w)&&(s[c]=w,u.push(c,w),n[c]=l))}if(typeof i<"u"&&typeof s[i]>"u"){var d=["Could not find a path from ",o," to ",i,"."].join("");throw new Error(d)}return n},extract_shortest_path_from_predecessor_list:function(r,o){for(var i=[],n=o;n;)i.push(n),r[n],n=r[n];return i.reverse(),i},find_path:function(r,o,i){var n=e.single_source_shortest_paths(r,o,i);return e.extract_shortest_path_from_predecessor_list(n,i)},PriorityQueue:{make:function(r){var o=e.PriorityQueue,i={},n;r=r||{};for(n in o)o.hasOwnProperty(n)&&(i[n]=o[n]);return i.queue=[],i.sorter=r.sorter||o.default_sorter,i},default_sorter:function(r,o){return r.cost-o.cost},push:function(r,o){var i={value:r,cost:o};this.queue.push(i),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};t.exports=e})(le);(function(t){const e=F,r=dn,o=hn,i=wn,n=vn,s=L,u=R,a=le.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(T,_){return T.index-_.index}).map(function(T){return{data:T.data,mode:T.mode,length:T.length}})}function p(d,m){switch(m){case e.NUMERIC:return r.getBitsLength(d);case e.ALPHANUMERIC:return o.getBitsLength(d);case e.KANJI:return n.getBitsLength(d);case e.BYTE:return i.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(n+u,s+a,!0,!0):t.set(n+u,s+a,!1,!0))}}function _n(t){const e=t.size;for(let r=8;r>u&1)===1,t.set(i,n,s,!0),t.set(n,i,s,!0)}function wt(t,e,r){const o=t.size,i=In.getEncodedBits(e,r);let n,s;for(n=0;n<15;n++)s=(i>>n&1)===1,n<6?t.set(n,8,s,!0):n<8?t.set(n+1,8,s,!0):t.set(o-15+n,8,s,!0),n<8?t.set(8,o-n-1,s,!0):n<9?t.set(8,15-n-1+1,s,!0):t.set(8,15-n-1,s,!0);t.set(o-8,8,1,!0)}function On(t,e){const r=t.size;let o=-1,i=r-1,n=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(i,u-a)){let l=!1;s>>n&1)===1),t.set(i,u-a,l),n--,n===-1&&(s++,n=7)}if(i+=o,i<0||r<=i){i-=o,o=-o;break}}}function Ln(t,e,r){const o=new En;r.forEach(function(a){o.put(a.mode.bit,4),o.put(a.getLength(),Nn.getCharCountIndicator(a.mode,t)),a.write(o)});const i=gt.getSymbolTotalCodewords(t),n=Et.getTotalCodewordsCount(t,e),s=(i-n)*8;for(o.getLengthInBits()+4<=s&&o.put(0,4);o.getLengthInBits()%8!==0;)o.putBit(0);const u=(s-o.getLengthInBits())/8;for(let a=0;a=7&&Rn(a,e),On(a,s),isNaN(o)&&(o=vt.getBestMask(a,wt.bind(null,a,r))),vt.applyMask(o,a),wt(a,r,o),{modules:a,version:e,errorCorrectionLevel:r,maskPattern:o,segments:i}}Wt.create=function(e,r){if(typeof e>"u"||e==="")throw new Error("No input text");let o=mt.M,i,n;return typeof r<"u"&&(o=mt.from(r.errorCorrectionLevel,mt.M),i=ut.from(r.version),n=vt.from(r.maskPattern),r.toSJISFunc&>.setToSJISFunction(r.toSJISFunc)),jn(e,i,o,n)};var ce={},Nt={};(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 o=r.slice().replace("#","").split("");if(o.length<3||o.length===5||o.length>8)throw new Error("Invalid hex color: "+r);(o.length===3||o.length===4)&&(o=Array.prototype.concat.apply([],o.map(function(n){return[n,n]}))),o.length===6&&o.push("F","F");const i=parseInt(o.join(""),16);return{r:i>>24&255,g:i>>16&255,b:i>>8&255,a:i&255,hex:"#"+o.slice(0,6).join("")}}t.getOptions=function(o){o||(o={}),o.color||(o.color={});const i=typeof o.margin>"u"||o.margin===null||o.margin<0?4:o.margin,n=o.width&&o.width>=21?o.width:void 0,s=o.scale||4;return{width:n,scale:n?4:s,margin:i,color:{dark:e(o.color.dark||"#000000ff"),light:e(o.color.light||"#ffffffff")},type:o.type,rendererOpts:o.rendererOpts||{}}},t.getScale=function(o,i){return i.width&&i.width>=o+i.margin*2?i.width/(o+i.margin*2):i.scale},t.getImageWidth=function(o,i){const n=t.getScale(o,i);return Math.floor((o+i.margin*2)*n)},t.qrToImageData=function(o,i,n){const s=i.modules.size,u=i.modules.data,a=t.getScale(s,n),l=Math.floor((s+n.margin*2)*a),c=n.margin*a,v=[n.color.light,n.color.dark];for(let p=0;p=c&&y>=c&&p"u"&&(!s||!s.getContext)&&(a=s,s=void 0),s||(l=o()),a=e.getOptions(a);const c=e.getImageWidth(n.modules.size,a),v=l.getContext("2d"),p=v.createImageData(c,c);return e.qrToImageData(p.data,n,a),r(v,l,c),v.putImageData(p,0,0),l},t.renderToDataURL=function(n,s,u){let a=u;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),a||(a={});const l=t.render(n,s,a),c=a.type||"image/png",v=a.rendererOpts||{};return l.toDataURL(c,v.quality)}})(ce);var fe={};const Fn=Nt;function Vt(t,e){const r=t.a/255,o=e+'="'+t.hex+'"';return r<1?o+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':o}function bt(t,e,r){let o=t+e;return typeof r<"u"&&(o+=" "+r),o}function Un(t,e,r){let o="",i=0,n=!1,s=0;for(let u=0;u0&&a>0&&t[u-1]||(o+=n?bt("M",a+r,.5+l+r):bt("m",i,0),i=0,n=!1),a+1':"",l="',c='viewBox="0 0 '+u+" "+u+'"',v=i.width?'width="'+i.width+'" height="'+i.width+'" ':"",p=''+a+l+` `;return typeof o=="function"&&o(null,p),p};const kn=Xe,Tt=Wt,de=ce,$n=fe;function Pt(t,e,r,o,i){const n=[].slice.call(arguments,1),s=n.length,u=typeof n[s-1]=="function";if(!u&&!kn())throw new Error("Callback required as last argument");if(u){if(s<2)throw new Error("Too few arguments provided");s===2?(i=r,r=e,e=o=void 0):s===3&&(e.getContext&&typeof i>"u"?(i=o,o=void 0):(i=o,o=r,r=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(r=e,e=o=void 0):s===2&&!e.getContext&&(o=r,r=e,e=void 0),new Promise(function(a,l){try{const c=Tt.create(r,o);a(t(c,e,o))}catch(c){l(c)}})}try{const a=Tt.create(r,o);i(null,t(a,e,o))}catch(a){i(a)}}et.create=Tt.create;et.toCanvas=Pt.bind(null,de.render);et.toDataURL=Pt.bind(null,de.renderToDataURL);et.toString=Pt.bind(null,function(t,e,r){return $n.render(t,r)});const zn={tag:W.string.validate(t=>["canvas","img"].includes(t)).def("canvas"),text:{type:[String,Array],default:null},options:{type:Object,default:()=>({})},width:W.number.def(200),logo:{type:[String,Object],default:()=>""},disabled:W.bool.def(!1),disabledText:W.string.def("")},Vn=Ht({name:"ReQrcode",props:zn,emits:["done","click","disabled-click"],setup(t,{emit:e}){const{toCanvas:r,toDataURL:o}=et,i=Rt(!0),n=Rt(null),s=Ot(()=>String(t.text)),u=Ot(()=>({width:t.width+"px",height:t.width+"px"})),a=async()=>{await be();const f=Ce(t.options||{});if(t.tag==="canvas"){f.errorCorrectionLevel=f.errorCorrectionLevel||v(N(s));const b=await c(N(s),f);f.scale=t.width===0?void 0:t.width/b*4;const d=await r(N(n),N(s),f);if(t.logo){const m=await l(d);e("done",m),i.value=!1}else e("done",d.toDataURL()),i.value=!1}else{const b=await o(s.value,{errorCorrectionLevel:"H",width:t.width,...f});N(n).src=b,e("done",b),i.value=!1}};ye(()=>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},Lt(t.logo)?{}:t.logo),{logoSize:m=.15,bgColor:h="#ffffff",borderSize:g=.05,crossOrigin:C="anonymous",borderRadius:E=8,logoRadius:T=0}=d,_=Lt(t.logo)?t.logo:t.logo.src,S=b*m,A=b*(1-m)/2,D=b*(m+g),$=b*(1-m-g)/2,B=f.getContext("2d");if(!B)return;p(B)($,$,D,D,E),B.fillStyle=h,B.fill();const Q=new Image;(C||T)&&Q.setAttribute("crossOrigin",C),Q.src=_;const ge=G=>{B.drawImage(G,A,A,S,S)},he=G=>{const rt=document.createElement("canvas");rt.width=A+S,rt.height=A+S;const _t=rt.getContext("2d");if(!_t||!B||(_t.drawImage(G,A,A,S,S),p(B)(A,A,S,S,T),!B))return;const Mt=B.createPattern(rt,"no-repeat");Mt&&(B.fillStyle=Mt,B.fill())};return new Promise(G=>{Q.onload=()=>{T?he(Q):ge(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(Kt,null,[me(P("div",{class:"qrcode relative inline-block",style:N(u)},[t.tag==="canvas"?P("canvas",{ref:n,onClick:y},null):P("img",{ref:n,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(we,{class:"cursor-pointer",icon:"refresh-right",width:"30",color:"var(--el-color-primary)"},null),P("div",null,[t.disabledText])])])]),[[pe("loading"),N(i)]])])}}),Hn=ve(Vn),Kn=Hn,Yn={class:"text-gray-500 text-xs"},Gn=Ht({__name:"qrCode",setup(t){const{t:e}=Ee();return(r,o)=>{const i=Dt("el-divider"),n=Dt("el-button");return Te(),Be(Kt,null,[P(N(ht),{class:"-mt-2 -mb-2"},{default:x(()=>[P(N(Kn),{text:N(e)("login.test")},null,8,["text"])]),_:1}),P(N(ht),{delay:100},{default:x(()=>[P(i,null,{default:x(()=>[Ae("p",Yn,jt(N(e)("login.tip")),1)]),_:1})]),_:1}),P(N(ht),{delay:150},{default:x(()=>[P(n,{class:"w-full mt-4",onClick:o[0]||(o[0]=s=>N(Ie)().SET_CURRENTPAGE(0))},{default:x(()=>[Se(jt(N(e)("login.back")),1)]),_:1})]),_:1})],64)}}});export{Gn as default};