mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-10 14:48:11 +00:00
9 lines
30 KiB
JavaScript
9 lines
30 KiB
JavaScript
import{t as Ye,E as je,_ as Oe}from"./test.1106c125.js";import{E as xe}from"./el-input.aad4d645.js";import{E as qe,a as Ge}from"./el-overlay.7cf62588.js";import{E as Qe}from"./el-button.2773bbbd.js";import{_ as Ze}from"./nuxt-link.0eb95204.js";import{a as We,r as J,S as Xe,X as et,s as Ee,D as tt,o as q,e as G,j as S,f as T,t as $,k as nt,F as ot,G as rt,u as A,w as M,Y as be,Z as Be,U as N,h as _e,$ as it,a0 as st,a1 as at,y as lt,J as ut,K as ct,a2 as ft,T as dt,a3 as gt}from"./entry.86379606.js";import{u as Ae}from"./useLogin.9e72b638.js";import{_ as ht}from"./_plugin-vue_export-helper.c27b6911.js";import"./throttle.c4698afb.js";import"./debounce.78272a2e.js";import"./system.4c787703.js";import"./use-form-item.9f8807ca.js";import"./index.2a3f4a08.js";import"./_initCloneObject.11332fb1.js";import"./vnode.18b2b700.js";var O={},mt=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},Se={},P={};let me;const pt=[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];P.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};P.getSymbolTotalCodewords=function(e){return pt[e]};P.getBCHDigit=function(t){let e=0;for(;t!==0;)e++,t>>>=1;return e};P.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');me=e};P.isKanjiModeEnabled=function(){return typeof me<"u"};P.toSJIS=function(e){return me(e)};var ee={};(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(i){return i&&typeof i.bit<"u"&&i.bit>=0&&i.bit<4},t.from=function(i,o){if(t.isValid(i))return i;try{return e(i)}catch{return o}}})(ee);function Pe(){this.buffer=[],this.length=0}Pe.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++)this.putBit((t>>>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 wt=Pe;function x(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)}x.prototype.set=function(t,e,r,i){const o=t*this.size+e;this.data[o]=r,i&&(this.reservedBit[o]=!0)};x.prototype.get=function(t,e){return this.data[t*this.size+e]};x.prototype.xor=function(t,e,r){this.data[t*this.size+e]^=r};x.prototype.isReserved=function(t,e){return this.reservedBit[t*this.size+e]};var yt=x,ve={};(function(t){const e=P.getSymbolSize;t.getRowColCoords=function(i){if(i===1)return[];const o=Math.floor(i/7)+2,n=e(i),s=n===145?26:Math.ceil((n-13)/(2*o-2))*2,l=[n-7];for(let a=1;a<o-1;a++)l[a]=l[a-1]-s;return l.push(6),l.reverse()},t.getPositions=function(i){const o=[],n=t.getRowColCoords(i),s=n.length;for(let l=0;l<s;l++)for(let a=0;a<s;a++)l===0&&a===0||l===0&&a===s-1||l===s-1&&a===0||o.push([n[l],n[a]]);return o}})(ve);var Me={};const Ct=P.getSymbolSize,Ie=7;Me.getPositions=function(e){const r=Ct(e);return[[0,0],[r-Ie,0],[0,r-Ie]]};var Le={};(function(t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const e={N1:3,N2:3,N3:40,N4:10};t.isValid=function(o){return o!=null&&o!==""&&!isNaN(o)&&o>=0&&o<=7},t.from=function(o){return t.isValid(o)?parseInt(o,10):void 0},t.getPenaltyN1=function(o){const n=o.size;let s=0,l=0,a=0,u=null,f=null;for(let B=0;B<n;B++){l=a=0,u=f=null;for(let w=0;w<n;w++){let h=o.get(B,w);h===u?l++:(l>=5&&(s+=e.N1+(l-5)),u=h,l=1),h=o.get(w,B),h===f?a++:(a>=5&&(s+=e.N1+(a-5)),f=h,a=1)}l>=5&&(s+=e.N1+(l-5)),a>=5&&(s+=e.N1+(a-5))}return s},t.getPenaltyN2=function(o){const n=o.size;let s=0;for(let l=0;l<n-1;l++)for(let a=0;a<n-1;a++){const u=o.get(l,a)+o.get(l,a+1)+o.get(l+1,a)+o.get(l+1,a+1);(u===4||u===0)&&s++}return s*e.N2},t.getPenaltyN3=function(o){const n=o.size;let s=0,l=0,a=0;for(let u=0;u<n;u++){l=a=0;for(let f=0;f<n;f++)l=l<<1&2047|o.get(u,f),f>=10&&(l===1488||l===93)&&s++,a=a<<1&2047|o.get(f,u),f>=10&&(a===1488||a===93)&&s++}return s*e.N3},t.getPenaltyN4=function(o){let n=0;const s=o.data.length;for(let a=0;a<s;a++)n+=o.data[a];return Math.abs(Math.ceil(n*100/s/5)-10)*e.N4};function r(i,o,n){switch(i){case t.Patterns.PATTERN000:return(o+n)%2===0;case t.Patterns.PATTERN001:return o%2===0;case t.Patterns.PATTERN010:return n%3===0;case t.Patterns.PATTERN011:return(o+n)%3===0;case t.Patterns.PATTERN100:return(Math.floor(o/2)+Math.floor(n/3))%2===0;case t.Patterns.PATTERN101:return o*n%2+o*n%3===0;case t.Patterns.PATTERN110:return(o*n%2+o*n%3)%2===0;case t.Patterns.PATTERN111:return(o*n%3+(o+n)%2)%2===0;default:throw new Error("bad maskPattern:"+i)}}t.applyMask=function(o,n){const s=n.size;for(let l=0;l<s;l++)for(let a=0;a<s;a++)n.isReserved(a,l)||n.xor(a,l,r(o,a,l))},t.getBestMask=function(o,n){const s=Object.keys(t.Patterns).length;let l=0,a=1/0;for(let u=0;u<s;u++){n(u),t.applyMask(u,o);const f=t.getPenaltyN1(o)+t.getPenaltyN2(o)+t.getPenaltyN3(o)+t.getPenaltyN4(o);t.applyMask(u,o),f<a&&(a=f,l=u)}return l}})(Le);var te={};const D=ee,Q=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],Z=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];te.getBlocksCount=function(e,r){switch(r){case D.L:return Q[(e-1)*4+0];case D.M:return Q[(e-1)*4+1];case D.Q:return Q[(e-1)*4+2];case D.H:return Q[(e-1)*4+3];default:return}};te.getTotalCodewordsCount=function(e,r){switch(r){case D.L:return Z[(e-1)*4+0];case D.M:return Z[(e-1)*4+1];case D.Q:return Z[(e-1)*4+2];case D.H:return Z[(e-1)*4+3];default:return}};var Re={},ne={};const Y=new Uint8Array(512),W=new Uint8Array(256);(function(){let e=1;for(let r=0;r<255;r++)Y[r]=e,W[e]=r,e<<=1,e&256&&(e^=285);for(let r=255;r<512;r++)Y[r]=Y[r-255]})();ne.log=function(e){if(e<1)throw new Error("log("+e+")");return W[e]};ne.exp=function(e){return Y[e]};ne.mul=function(e,r){return e===0||r===0?0:Y[W[e]+W[r]]};(function(t){const e=ne;t.mul=function(i,o){const n=new Uint8Array(i.length+o.length-1);for(let s=0;s<i.length;s++)for(let l=0;l<o.length;l++)n[s+l]^=e.mul(i[s],o[l]);return n},t.mod=function(i,o){let n=new Uint8Array(i);for(;n.length-o.length>=0;){const s=n[0];for(let a=0;a<o.length;a++)n[a]^=e.mul(o[a],s);let l=0;for(;l<n.length&&n[l]===0;)l++;n=n.slice(l)}return n},t.generateECPolynomial=function(i){let o=new Uint8Array([1]);for(let n=0;n<i;n++)o=t.mul(o,new Uint8Array([1,e.exp(n)]));return o}})(Re);const ke=Re;function pe(t){this.genPoly=void 0,this.degree=t,this.degree&&this.initialize(this.degree)}pe.prototype.initialize=function(e){this.degree=e,this.genPoly=ke.generateECPolynomial(this.degree)};pe.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const r=new Uint8Array(e.length+this.degree);r.set(e);const i=ke.mod(r,this.genPoly),o=this.degree-i.length;if(o>0){const n=new Uint8Array(this.degree);return n.set(i,o),n}return i};var Et=pe,De={},U={},we={};we.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40};var L={};const Ue="[0-9]+",bt="[A-Z $%*+\\-./:]+";let j="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";j=j.replace(/u/g,"\\u");const Bt="(?:(?![A-Z0-9 $%*+\\-./:]|"+j+`)(?:.|[\r
|
||
]))+`;L.KANJI=new RegExp(j,"g");L.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");L.BYTE=new RegExp(Bt,"g");L.NUMERIC=new RegExp(Ue,"g");L.ALPHANUMERIC=new RegExp(bt,"g");const _t=new RegExp("^"+j+"$"),At=new RegExp("^"+Ue+"$"),It=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");L.testKanji=function(e){return _t.test(e)};L.testNumeric=function(e){return At.test(e)};L.testAlphanumeric=function(e){return It.test(e)};(function(t){const e=we,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 i(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(n,s){if(t.isValid(n))return n;try{return i(n)}catch{return s}}})(U);(function(t){const e=P,r=te,i=ee,o=U,n=we,s=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,l=e.getBCHDigit(s);function a(w,h,y){for(let c=1;c<=40;c++)if(h<=t.getCapacity(c,y,w))return c}function u(w,h){return o.getCharCountIndicator(w,h)+4}function f(w,h){let y=0;return w.forEach(function(c){const C=u(c.mode,h);y+=C+c.getBitsLength()}),y}function B(w,h){for(let y=1;y<=40;y++)if(f(w,y)<=t.getCapacity(y,h,o.MIXED))return y}t.from=function(h,y){return n.isValid(h)?parseInt(h,10):y},t.getCapacity=function(h,y,c){if(!n.isValid(h))throw new Error("Invalid QR Code version");typeof c>"u"&&(c=o.BYTE);const C=e.getSymbolTotalCodewords(h),g=r.getTotalCodewordsCount(h,y),m=(C-g)*8;if(c===o.MIXED)return m;const d=m-u(c,h);switch(c){case o.NUMERIC:return Math.floor(d/10*3);case o.ALPHANUMERIC:return Math.floor(d/11*2);case o.KANJI:return Math.floor(d/13);case o.BYTE:default:return Math.floor(d/8)}},t.getBestVersionForData=function(h,y){let c;const C=i.from(y,i.M);if(Array.isArray(h)){if(h.length>1)return B(h,C);if(h.length===0)return 1;c=h[0]}else c=h;return a(c.mode,c.getLength(),C)},t.getEncodedBits=function(h){if(!n.isValid(h)||h<7)throw new Error("Invalid QR Code version");let y=h<<12;for(;e.getBCHDigit(y)-l>=0;)y^=s<<e.getBCHDigit(y)-l;return h<<12|y}})(De);var Fe={};const ce=P,Ve=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,Tt=1<<14|1<<12|1<<10|1<<4|1<<1,Te=ce.getBCHDigit(Ve);Fe.getEncodedBits=function(e,r){const i=e.bit<<3|r;let o=i<<10;for(;ce.getBCHDigit(o)-Te>=0;)o^=Ve<<ce.getBCHDigit(o)-Te;return(i<<10|o)^Tt};var ze={};const Nt=U;function F(t){this.mode=Nt.NUMERIC,this.data=t.toString()}F.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)};F.prototype.getLength=function(){return this.data.length};F.prototype.getBitsLength=function(){return F.getBitsLength(this.data.length)};F.prototype.write=function(e){let r,i,o;for(r=0;r+3<=this.data.length;r+=3)i=this.data.substr(r,3),o=parseInt(i,10),e.put(o,10);const n=this.data.length-r;n>0&&(i=this.data.substr(r),o=parseInt(i,10),e.put(o,n*3+1))};var St=F;const Pt=U,ie=["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 V(t){this.mode=Pt.ALPHANUMERIC,this.data=t}V.getBitsLength=function(e){return 11*Math.floor(e/2)+6*(e%2)};V.prototype.getLength=function(){return this.data.length};V.prototype.getBitsLength=function(){return V.getBitsLength(this.data.length)};V.prototype.write=function(e){let r;for(r=0;r+2<=this.data.length;r+=2){let i=ie.indexOf(this.data[r])*45;i+=ie.indexOf(this.data[r+1]),e.put(i,11)}this.data.length%2&&e.put(ie.indexOf(this.data[r]),6)};var vt=V,Mt=function(e){for(var r=[],i=e.length,o=0;o<i;o++){var n=e.charCodeAt(o);if(n>=55296&&n<=56319&&i>o+1){var s=e.charCodeAt(o+1);s>=56320&&s<=57343&&(n=(n-55296)*1024+s-56320+65536,o+=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 Lt=Mt,Rt=U;function z(t){this.mode=Rt.BYTE,typeof t=="string"&&(t=Lt(t)),this.data=new Uint8Array(t)}z.getBitsLength=function(e){return e*8};z.prototype.getLength=function(){return this.data.length};z.prototype.getBitsLength=function(){return z.getBitsLength(this.data.length)};z.prototype.write=function(t){for(let e=0,r=this.data.length;e<r;e++)t.put(this.data[e],8)};var kt=z;const Dt=U,Ut=P;function H(t){this.mode=Dt.KANJI,this.data=t}H.getBitsLength=function(e){return e*13};H.prototype.getLength=function(){return this.data.length};H.prototype.getBitsLength=function(){return H.getBitsLength(this.data.length)};H.prototype.write=function(t){let e;for(e=0;e<this.data.length;e++){let r=Ut.toSJIS(this.data[e]);if(r>=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 Ft=H,fe={},Vt={get exports(){return fe},set exports(t){fe=t}};(function(t){var e={single_source_shortest_paths:function(r,i,o){var n={},s={};s[i]=0;var l=e.PriorityQueue.make();l.push(i,0);for(var a,u,f,B,w,h,y,c,C;!l.empty();){a=l.pop(),u=a.value,B=a.cost,w=r[u]||{};for(f in w)w.hasOwnProperty(f)&&(h=w[f],y=B+h,c=s[f],C=typeof s[f]>"u",(C||c>y)&&(s[f]=y,l.push(f,y),n[f]=u))}if(typeof o<"u"&&typeof s[o]>"u"){var g=["Could not find a path from ",i," to ",o,"."].join("");throw new Error(g)}return n},extract_shortest_path_from_predecessor_list:function(r,i){for(var o=[],n=i;n;)o.push(n),r[n],n=r[n];return o.reverse(),o},find_path:function(r,i,o){var n=e.single_source_shortest_paths(r,i,o);return e.extract_shortest_path_from_predecessor_list(n,o)},PriorityQueue:{make:function(r){var i=e.PriorityQueue,o={},n;r=r||{};for(n in i)i.hasOwnProperty(n)&&(o[n]=i[n]);return o.queue=[],o.sorter=r.sorter||i.default_sorter,o},default_sorter:function(r,i){return r.cost-i.cost},push:function(r,i){var o={value:r,cost:i};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})(Vt);(function(t){const e=U,r=St,i=vt,o=kt,n=Ft,s=L,l=P,a=fe;function u(g){return unescape(encodeURIComponent(g)).length}function f(g,m,d){const p=[];let E;for(;(E=g.exec(d))!==null;)p.push({data:E[0],index:E.index,mode:m,length:E[0].length});return p}function B(g){const m=f(s.NUMERIC,e.NUMERIC,g),d=f(s.ALPHANUMERIC,e.ALPHANUMERIC,g);let p,E;return l.isKanjiModeEnabled()?(p=f(s.BYTE,e.BYTE,g),E=f(s.KANJI,e.KANJI,g)):(p=f(s.BYTE_KANJI,e.BYTE,g),E=[]),m.concat(d,p,E).sort(function(I,b){return I.index-b.index}).map(function(I){return{data:I.data,mode:I.mode,length:I.length}})}function w(g,m){switch(m){case e.NUMERIC:return r.getBitsLength(g);case e.ALPHANUMERIC:return i.getBitsLength(g);case e.KANJI:return n.getBitsLength(g);case e.BYTE:return o.getBitsLength(g)}}function h(g){return g.reduce(function(m,d){const p=m.length-1>=0?m[m.length-1]:null;return p&&p.mode===d.mode?(m[m.length-1].data+=d.data,m):(m.push(d),m)},[])}function y(g){const m=[];for(let d=0;d<g.length;d++){const p=g[d];switch(p.mode){case e.NUMERIC:m.push([p,{data:p.data,mode:e.ALPHANUMERIC,length:p.length},{data:p.data,mode:e.BYTE,length:p.length}]);break;case e.ALPHANUMERIC:m.push([p,{data:p.data,mode:e.BYTE,length:p.length}]);break;case e.KANJI:m.push([p,{data:p.data,mode:e.BYTE,length:u(p.data)}]);break;case e.BYTE:m.push([{data:p.data,mode:e.BYTE,length:u(p.data)}])}}return m}function c(g,m){const d={},p={start:{}};let E=["start"];for(let _=0;_<g.length;_++){const I=g[_],b=[];for(let R=0;R<I.length;R++){const v=I[R],K=""+_+R;b.push(K),d[K]={node:v,lastCount:0},p[K]={};for(let re=0;re<E.length;re++){const k=E[re];d[k]&&d[k].node.mode===v.mode?(p[k][K]=w(d[k].lastCount+v.length,v.mode)-w(d[k].lastCount,v.mode),d[k].lastCount+=v.length):(d[k]&&(d[k].lastCount=v.length),p[k][K]=w(v.length,v.mode)+4+e.getCharCountIndicator(v.mode,m))}}E=b}for(let _=0;_<E.length;_++)p[E[_]].end=0;return{map:p,table:d}}function C(g,m){let d;const p=e.getBestModeForData(g);if(d=e.from(m,p),d!==e.BYTE&&d.bit<p.bit)throw new Error('"'+g+'" cannot be encoded with mode '+e.toString(d)+`.
|
||
Suggested mode is: `+e.toString(p));switch(d===e.KANJI&&!l.isKanjiModeEnabled()&&(d=e.BYTE),d){case e.NUMERIC:return new r(g);case e.ALPHANUMERIC:return new i(g);case e.KANJI:return new n(g);case e.BYTE:return new o(g)}}t.fromArray=function(m){return m.reduce(function(d,p){return typeof p=="string"?d.push(C(p,null)):p.data&&d.push(C(p.data,p.mode)),d},[])},t.fromString=function(m,d){const p=B(m,l.isKanjiModeEnabled()),E=y(p),_=c(E,d),I=a.find_path(_.map,"start","end"),b=[];for(let R=1;R<I.length-1;R++)b.push(_.table[I[R]].node);return t.fromArray(h(b))},t.rawSplit=function(m){return t.fromArray(B(m,l.isKanjiModeEnabled()))}})(ze);const oe=P,se=ee,zt=wt,Ht=yt,Kt=ve,Jt=Me,de=Le,ge=te,$t=Et,X=De,Yt=Fe,jt=U,ae=ze;function Ot(t,e){const r=t.size,i=Jt.getPositions(e);for(let o=0;o<i.length;o++){const n=i[o][0],s=i[o][1];for(let l=-1;l<=7;l++)if(!(n+l<=-1||r<=n+l))for(let a=-1;a<=7;a++)s+a<=-1||r<=s+a||(l>=0&&l<=6&&(a===0||a===6)||a>=0&&a<=6&&(l===0||l===6)||l>=2&&l<=4&&a>=2&&a<=4?t.set(n+l,s+a,!0,!0):t.set(n+l,s+a,!1,!0))}}function xt(t){const e=t.size;for(let r=8;r<e-8;r++){const i=r%2===0;t.set(r,6,i,!0),t.set(6,r,i,!0)}}function qt(t,e){const r=Kt.getPositions(e);for(let i=0;i<r.length;i++){const o=r[i][0],n=r[i][1];for(let s=-2;s<=2;s++)for(let l=-2;l<=2;l++)s===-2||s===2||l===-2||l===2||s===0&&l===0?t.set(o+s,n+l,!0,!0):t.set(o+s,n+l,!1,!0)}}function Gt(t,e){const r=t.size,i=X.getEncodedBits(e);let o,n,s;for(let l=0;l<18;l++)o=Math.floor(l/3),n=l%3+r-8-3,s=(i>>l&1)===1,t.set(o,n,s,!0),t.set(n,o,s,!0)}function le(t,e,r){const i=t.size,o=Yt.getEncodedBits(e,r);let n,s;for(n=0;n<15;n++)s=(o>>n&1)===1,n<6?t.set(n,8,s,!0):n<8?t.set(n+1,8,s,!0):t.set(i-15+n,8,s,!0),n<8?t.set(8,i-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(i-8,8,1,!0)}function Qt(t,e){const r=t.size;let i=-1,o=r-1,n=7,s=0;for(let l=r-1;l>0;l-=2)for(l===6&&l--;;){for(let a=0;a<2;a++)if(!t.isReserved(o,l-a)){let u=!1;s<e.length&&(u=(e[s]>>>n&1)===1),t.set(o,l-a,u),n--,n===-1&&(s++,n=7)}if(o+=i,o<0||r<=o){o-=i,i=-i;break}}}function Zt(t,e,r){const i=new zt;r.forEach(function(a){i.put(a.mode.bit,4),i.put(a.getLength(),jt.getCharCountIndicator(a.mode,t)),a.write(i)});const o=oe.getSymbolTotalCodewords(t),n=ge.getTotalCodewordsCount(t,e),s=(o-n)*8;for(i.getLengthInBits()+4<=s&&i.put(0,4);i.getLengthInBits()%8!==0;)i.putBit(0);const l=(s-i.getLengthInBits())/8;for(let a=0;a<l;a++)i.put(a%2?17:236,8);return Wt(i,t,e)}function Wt(t,e,r){const i=oe.getSymbolTotalCodewords(e),o=ge.getTotalCodewordsCount(e,r),n=i-o,s=ge.getBlocksCount(e,r),l=i%s,a=s-l,u=Math.floor(i/s),f=Math.floor(n/s),B=f+1,w=u-f,h=new $t(w);let y=0;const c=new Array(s),C=new Array(s);let g=0;const m=new Uint8Array(t.buffer);for(let I=0;I<s;I++){const b=I<a?f:B;c[I]=m.slice(y,y+b),C[I]=h.encode(c[I]),y+=b,g=Math.max(g,b)}const d=new Uint8Array(i);let p=0,E,_;for(E=0;E<g;E++)for(_=0;_<s;_++)E<c[_].length&&(d[p++]=c[_][E]);for(E=0;E<w;E++)for(_=0;_<s;_++)d[p++]=C[_][E];return d}function Xt(t,e,r,i){let o;if(Array.isArray(t))o=ae.fromArray(t);else if(typeof t=="string"){let u=e;if(!u){const f=ae.rawSplit(t);u=X.getBestVersionForData(f,r)}o=ae.fromString(t,u||40)}else throw new Error("Invalid data");const n=X.getBestVersionForData(o,r);if(!n)throw new Error("The amount of data is too big to be stored in a QR Code");if(!e)e=n;else if(e<n)throw new Error(`
|
||
The chosen QR Code version cannot contain this amount of data.
|
||
Minimum version required to store current data is: `+n+`.
|
||
`);const s=Zt(e,r,o),l=oe.getSymbolSize(e),a=new Ht(l);return Ot(a,e),xt(a),qt(a,e),le(a,r,0),e>=7&&Gt(a,e),Qt(a,s),isNaN(i)&&(i=de.getBestMask(a,le.bind(null,a,r))),de.applyMask(i,a),le(a,r,i),{modules:a,version:e,errorCorrectionLevel:r,maskPattern:i,segments:o}}Se.create=function(e,r){if(typeof e>"u"||e==="")throw new Error("No input text");let i=se.M,o,n;return typeof r<"u"&&(i=se.from(r.errorCorrectionLevel,se.M),o=X.from(r.version),n=de.from(r.maskPattern),r.toSJISFunc&&oe.setToSJISFunction(r.toSJISFunc)),Xt(e,o,i,n)};var He={},ye={};(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 i=r.slice().replace("#","").split("");if(i.length<3||i.length===5||i.length>8)throw new Error("Invalid hex color: "+r);(i.length===3||i.length===4)&&(i=Array.prototype.concat.apply([],i.map(function(n){return[n,n]}))),i.length===6&&i.push("F","F");const o=parseInt(i.join(""),16);return{r:o>>24&255,g:o>>16&255,b:o>>8&255,a:o&255,hex:"#"+i.slice(0,6).join("")}}t.getOptions=function(i){i||(i={}),i.color||(i.color={});const o=typeof i.margin>"u"||i.margin===null||i.margin<0?4:i.margin,n=i.width&&i.width>=21?i.width:void 0,s=i.scale||4;return{width:n,scale:n?4:s,margin:o,color:{dark:e(i.color.dark||"#000000ff"),light:e(i.color.light||"#ffffffff")},type:i.type,rendererOpts:i.rendererOpts||{}}},t.getScale=function(i,o){return o.width&&o.width>=i+o.margin*2?o.width/(i+o.margin*2):o.scale},t.getImageWidth=function(i,o){const n=t.getScale(i,o);return Math.floor((i+o.margin*2)*n)},t.qrToImageData=function(i,o,n){const s=o.modules.size,l=o.modules.data,a=t.getScale(s,n),u=Math.floor((s+n.margin*2)*a),f=n.margin*a,B=[n.color.light,n.color.dark];for(let w=0;w<u;w++)for(let h=0;h<u;h++){let y=(w*u+h)*4,c=n.color.light;if(w>=f&&h>=f&&w<u-f&&h<u-f){const C=Math.floor((w-f)/a),g=Math.floor((h-f)/a);c=B[l[C*s+g]?1:0]}i[y++]=c.r,i[y++]=c.g,i[y++]=c.b,i[y]=c.a}}})(ye);(function(t){const e=ye;function r(o,n,s){o.clearRect(0,0,n.width,n.height),n.style||(n.style={}),n.height=s,n.width=s,n.style.height=s+"px",n.style.width=s+"px"}function i(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}t.render=function(n,s,l){let a=l,u=s;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),s||(u=i()),a=e.getOptions(a);const f=e.getImageWidth(n.modules.size,a),B=u.getContext("2d"),w=B.createImageData(f,f);return e.qrToImageData(w.data,n,a),r(B,u,f),B.putImageData(w,0,0),u},t.renderToDataURL=function(n,s,l){let a=l;typeof a>"u"&&(!s||!s.getContext)&&(a=s,s=void 0),a||(a={});const u=t.render(n,s,a),f=a.type||"image/png",B=a.rendererOpts||{};return u.toDataURL(f,B.quality)}})(He);var Ke={};const en=ye;function Ne(t,e){const r=t.a/255,i=e+'="'+t.hex+'"';return r<1?i+" "+e+'-opacity="'+r.toFixed(2).slice(1)+'"':i}function ue(t,e,r){let i=t+e;return typeof r<"u"&&(i+=" "+r),i}function tn(t,e,r){let i="",o=0,n=!1,s=0;for(let l=0;l<t.length;l++){const a=Math.floor(l%e),u=Math.floor(l/e);!a&&!n&&(n=!0),t[l]?(s++,l>0&&a>0&&t[l-1]||(i+=n?ue("M",a+r,.5+u+r):ue("m",o,0),o=0,n=!1),a+1<e&&t[l+1]||(i+=ue("h",s),s=0)):o++}return i}Ke.render=function(e,r,i){const o=en.getOptions(r),n=e.modules.size,s=e.modules.data,l=n+o.margin*2,a=o.color.light.a?"<path "+Ne(o.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",u="<path "+Ne(o.color.dark,"stroke")+' d="'+tn(s,n,o.margin)+'"/>',f='viewBox="0 0 '+l+" "+l+'"',w='<svg xmlns="http://www.w3.org/2000/svg" '+(o.width?'width="'+o.width+'" height="'+o.width+'" ':"")+f+' shape-rendering="crispEdges">'+a+u+`</svg>
|
||
`;return typeof i=="function"&&i(null,w),w};const nn=mt,he=Se,Je=He,on=Ke;function Ce(t,e,r,i,o){const n=[].slice.call(arguments,1),s=n.length,l=typeof n[s-1]=="function";if(!l&&!nn())throw new Error("Callback required as last argument");if(l){if(s<2)throw new Error("Too few arguments provided");s===2?(o=r,r=e,e=i=void 0):s===3&&(e.getContext&&typeof o>"u"?(o=i,i=void 0):(o=i,i=r,r=e,e=void 0))}else{if(s<1)throw new Error("Too few arguments provided");return s===1?(r=e,e=i=void 0):s===2&&!e.getContext&&(i=r,r=e,e=void 0),new Promise(function(a,u){try{const f=he.create(r,i);a(t(f,e,i))}catch(f){u(f)}})}try{const a=he.create(r,i);o(null,t(a,e,i))}catch(a){o(a)}}O.create=he.create;O.toCanvas=Ce.bind(null,Je.render);O.toDataURL=Ce.bind(null,Je.renderToDataURL);O.toString=Ce.bind(null,function(t,e,r){return on.render(t,r)});const $e=t=>(ut("data-v-b00420b4"),t=t(),ct(),t),rn={class:"w-full h-full bg-page flex items-center justify-center"},sn={class:"flex bg-white"},an={class:"flex flex-col items-center w-[330px] py-[100px] border-r"},ln=$e(()=>S("div",{class:"title font-bold text-xl"},"打开手机微信",-1)),un=$e(()=>S("div",{class:"tips text-sm mt-[5px]"},"点击右上角打开扫一扫",-1)),cn={class:"qrcode p-[10px] mt-[30px] border h-[120px] leading-none box-content"},fn={class:"relative"},dn={key:0,class:"flex flex-col justify-center items-center absolute inset-0 bg-gray-50"},gn={class:"text-xs text-gray-600"},hn={class:"bg-white w-[380px] p-[30px]"},mn={class:"flex items-end my-[30px]"},pn=["onClick"],wn={class:"flex justify-between leading-none"},yn=We({__name:"login",setup(t){const e=c=>{ft({key:c}).then(g=>{let m=g.data;switch(m.status){case"wait":setTimeout(()=>{e(r.value.key)},1e3);break;case"success":m.login_data.token?(o.setToken(m.login_data.token),Ae().handleLoginBack()):(dt("openId").value=m.login_data.openid,gt("/auth/bind"));break;case"fail":r.value.pastDueContent=m.fail_reason,r.value.pastDue=!0;break}}).catch(g=>{r.value.pastDue=!0,r.value.pastDueContent=g.msg})},r=J({url:"",key:"",pastDue:!1,pastDueContent:"二维码生成失败"}),i=async()=>{let c=await(await it()).data;r.value.key=c.key,O.toDataURL(c.url,{errorCorrectionLevel:"L",margin:0,width:100}).then(C=>{r.value.url=C}),r.value.pastDue=!1,setTimeout(()=>{e(r.value.key)},1e3)};i();const o=Xe(),n=et();n.getLoginConfig();const s=Ee(()=>{const c=[];return n.login.is_username&&c.push({type:"username",title:N("usernameLogin")}),n.login.is_mobile&&c.push({type:"mobile",title:N("mobileLogin")}),a.value=c[0]?c[0].type:"",c}),l=J(!1),a=J(""),u=tt({username:"",password:"",mobile:"",mobile_code:"",mobile_key:""}),f=J(),B=Ee(()=>({username:{required:a.value=="username",message:N("usernamePlaceholder"),trigger:["blur","change"]},password:{required:a.value=="username",message:N("passwordPlaceholder"),trigger:["blur","change"]},mobile:[{required:a.value=="mobile",message:N("mobilePlaceholder"),trigger:["blur","change"]},{validator(c,C,g){return a.value!="mobile"?!0:Ye.mobile(C)},message:N("mobileError"),trigger:["blur"]}],mobile_code:{required:a.value=="mobile",message:N("codePlaceholder"),trigger:["change"]}})),w=async()=>{var c;await((c=f.value)==null?void 0:c.validate(async(C,g)=>{if(C){if(l.value)return;l.value=!0,(a.value=="username"?st:at)(u).then(async d=>{await o.setToken(d.data.token),Ae().handleLoginBack()}).catch(()=>{l.value=!1})}}))},h=J(null),y=async()=>{var c;await((c=f.value)==null?void 0:c.validateField("mobile",async(C,g)=>{var m;C&&((m=h.value)==null||m.send())}))};return(c,C)=>{const g=je,m=xe,d=qe,p=Oe,E=Qe,_=Ze,I=Ge;return q(),G("div",rn,[S("div",sn,[S("div",an,[ln,un,S("div",cn,[S("div",fn,[T(g,{src:r.value.url,class:"w-[120px]"},null,8,["src"]),r.value.pastDue?(q(),G("div",dn,[S("span",gn,$(r.value.pastDueContent),1),S("span",{onClick:C[0]||(C[0]=b=>i()),class:"text-xs cursor-pointer text-color mt-2"},"点击刷新")])):nt("",!0)])])]),S("div",hn,[S("div",mn,[(q(!0),G(ot,null,rt(A(s),b=>(q(),G("div",{class:lt(["mr-[20px] text-base cursor-pointer leading-none",{"font-bold":a.value==b.type}]),onClick:R=>a.value=b.type},$(b.title),11,pn))),256))]),T(I,{model:A(u),ref_key:"formRef",ref:f,rules:A(B),"validate-on-rule-change":!1},{default:M(()=>[be(S("div",null,[T(d,{prop:"username"},{default:M(()=>[T(m,{modelValue:A(u).username,"onUpdate:modelValue":C[1]||(C[1]=b=>A(u).username=b),placeholder:("t"in c?c.t:A(N))("usernamePlaceholder"),clearable:"","inline-message":!0},null,8,["modelValue","placeholder"])]),_:1}),T(d,{prop:"password"},{default:M(()=>[T(m,{modelValue:A(u).password,"onUpdate:modelValue":C[2]||(C[2]=b=>A(u).password=b),placeholder:("t"in c?c.t:A(N))("passwordPlaceholder"),type:"password",clearable:"","show-password":!0},null,8,["modelValue","placeholder"])]),_:1})],512),[[Be,a.value=="username"]]),be(S("div",null,[T(d,{prop:"mobile"},{default:M(()=>[T(m,{modelValue:A(u).mobile,"onUpdate:modelValue":C[3]||(C[3]=b=>A(u).mobile=b),placeholder:("t"in c?c.t:A(N))("mobilePlaceholder"),clearable:""},null,8,["modelValue","placeholder"])]),_:1}),T(d,{prop:"mobile_code"},{default:M(()=>[T(m,{modelValue:A(u).mobile_code,"onUpdate:modelValue":C[5]||(C[5]=b=>A(u).mobile_code=b),placeholder:("t"in c?c.t:A(N))("codePlaceholder")},{suffix:M(()=>[T(p,{mobile:A(u).mobile,type:"login",modelValue:A(u).mobile_key,"onUpdate:modelValue":C[4]||(C[4]=b=>A(u).mobile_key=b),onClick:y,ref_key:"smsCodeRef",ref:h},null,8,["mobile","modelValue"])]),_:1},8,["modelValue","placeholder"])]),_:1})],512),[[Be,a.value=="mobile"]]),S("div",wn,[T(_,{to:"/auth/register"},{default:M(()=>[T(E,{type:"primary",link:""},{default:M(()=>[_e($(("t"in c?c.t:A(N))("noAccount"))+","+$(("t"in c?c.t:A(N))("toRegister")),1)]),_:1})]),_:1})]),T(d,null,{default:M(()=>[T(E,{type:"primary",class:"mt-[20px] w-full",size:"large",onClick:w,loading:l.value},{default:M(()=>[_e($(l.value?("t"in c?c.t:A(N))("logining"):("t"in c?c.t:A(N))("login")),1)]),_:1},8,["loading"])]),_:1})]),_:1},8,["model","rules"])])])])}}});const kn=ht(yn,[["__scopeId","data-v-b00420b4"]]);export{kn as default};
|