| 12345678 |
- var _e=Object.defineProperty;var Ut=Object.getOwnPropertySymbols;var Se=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable;var Ft=(o,i,r)=>i in o?_e(o,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[i]=r,xt=(o,i)=>{for(var r in i||(i={}))Se.call(i,r)&&Ft(o,r,i[r]);if(Ut)for(var r of Ut(i))Te.call(i,r)&&Ft(o,r,i[r]);return o};var lt=(o,i,r)=>new Promise((e,t)=>{var n=a=>{try{u(r.next(a))}catch(c){t(c)}},s=a=>{try{u(r.throw(a))}catch(c){t(c)}},u=a=>a.done?e(a.value):Promise.resolve(a.value).then(n,s);u((r=r.apply(o,i)).next())});import{i as Ae,c as Ie,s as H,t as K,v as Pe,b as zt}from"./element-plus-B-YefleC.js";import{p as rt,b as Ne,k as Vt,_ as Me,u as De,c as Le}from"./index-XQEkcq4y.js";import{v as ye,r as Dt,c as Lt,w as qe,S as ke,y as Ht,J as Ee,L as Ue,I as Kt,u as B,B as k,M as N,P as x,G as Fe,Q as xe,ap as ze,x as it,ad as Ve,n as He,K as D}from"./vue-chunks-COp0tDkU.js";import{_ as Ke}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BQQVoJIW.js";/* empty css *//* empty css */import{_ as Ot}from"./logo-LbKsNqzq.js";/* empty css */var Z={},ct,Jt;function Oe(){return Jt||(Jt=1,ct=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then}),ct}var ft={},Y={},jt;function G(){if(jt)return Y;jt=1;let o;const i=[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];return Y.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},Y.getSymbolTotalCodewords=function(e){return i[e]},Y.getBCHDigit=function(r){let e=0;for(;r!==0;)e++,r>>>=1;return e},Y.setToSJISFunction=function(e){if(typeof e!="function")throw new Error('"toSJISFunc" is not a valid function.');o=e},Y.isKanjiModeEnabled=function(){return typeof o!="undefined"},Y.toSJIS=function(e){return o(e)},Y}var dt={},Yt;function qt(){return Yt||(Yt=1,function(o){o.L={bit:1},o.M={bit:0},o.Q={bit:3},o.H={bit:2};function i(r){if(typeof r!="string")throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return o.L;case"m":case"medium":return o.M;case"q":case"quartile":return o.Q;case"h":case"high":return o.H;default:throw new Error("Unknown EC Level: "+r)}}o.isValid=function(e){return e&&typeof e.bit!="undefined"&&e.bit>=0&&e.bit<4},o.from=function(e,t){if(o.isValid(e))return e;try{return i(e)}catch(n){return t}}}(dt)),dt}var gt,Qt;function Je(){if(Qt)return gt;Qt=1;function o(){this.buffer=[],this.length=0}return o.prototype={get:function(i){const r=Math.floor(i/8);return(this.buffer[r]>>>7-i%8&1)===1},put:function(i,r){for(let e=0;e<r;e++)this.putBit((i>>>r-e-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(i){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),i&&(this.buffer[r]|=128>>>this.length%8),this.length++}},gt=o,gt}var ht,Gt;function je(){if(Gt)return ht;Gt=1;function o(i){if(!i||i<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=i,this.data=new Uint8Array(i*i),this.reservedBit=new Uint8Array(i*i)}return o.prototype.set=function(i,r,e,t){const n=i*this.size+r;this.data[n]=e,t&&(this.reservedBit[n]=!0)},o.prototype.get=function(i,r){return this.data[i*this.size+r]},o.prototype.xor=function(i,r,e){this.data[i*this.size+r]^=e},o.prototype.isReserved=function(i,r){return this.reservedBit[i*this.size+r]},ht=o,ht}var mt={},$t;function Ye(){return $t||($t=1,function(o){const i=G().getSymbolSize;o.getRowColCoords=function(e){if(e===1)return[];const t=Math.floor(e/7)+2,n=i(e),s=n===145?26:Math.ceil((n-13)/(2*t-2))*2,u=[n-7];for(let a=1;a<t-1;a++)u[a]=u[a-1]-s;return u.push(6),u.reverse()},o.getPositions=function(e){const t=[],n=o.getRowColCoords(e),s=n.length;for(let u=0;u<s;u++)for(let a=0;a<s;a++)u===0&&a===0||u===0&&a===s-1||u===s-1&&a===0||t.push([n[u],n[a]]);return t}}(mt)),mt}var wt={},Wt;function Qe(){if(Wt)return wt;Wt=1;const o=G().getSymbolSize,i=7;return wt.getPositions=function(e){const t=o(e);return[[0,0],[t-i,0],[0,t-i]]},wt}var Ct={},Xt;function Ge(){return Xt||(Xt=1,function(o){o.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const i={N1:3,N2:3,N3:40,N4:10};o.isValid=function(t){return t!=null&&t!==""&&!isNaN(t)&&t>=0&&t<=7},o.from=function(t){return o.isValid(t)?parseInt(t,10):void 0},o.getPenaltyN1=function(t){const n=t.size;let s=0,u=0,a=0,c=null,h=null;for(let R=0;R<n;R++){u=a=0,c=h=null;for(let E=0;E<n;E++){let m=t.get(R,E);m===c?u++:(u>=5&&(s+=i.N1+(u-5)),c=m,u=1),m=t.get(E,R),m===h?a++:(a>=5&&(s+=i.N1+(a-5)),h=m,a=1)}u>=5&&(s+=i.N1+(u-5)),a>=5&&(s+=i.N1+(a-5))}return s},o.getPenaltyN2=function(t){const n=t.size;let s=0;for(let u=0;u<n-1;u++)for(let a=0;a<n-1;a++){const c=t.get(u,a)+t.get(u,a+1)+t.get(u+1,a)+t.get(u+1,a+1);(c===4||c===0)&&s++}return s*i.N2},o.getPenaltyN3=function(t){const n=t.size;let s=0,u=0,a=0;for(let c=0;c<n;c++){u=a=0;for(let h=0;h<n;h++)u=u<<1&2047|t.get(c,h),h>=10&&(u===1488||u===93)&&s++,a=a<<1&2047|t.get(h,c),h>=10&&(a===1488||a===93)&&s++}return s*i.N3},o.getPenaltyN4=function(t){let n=0;const s=t.data.length;for(let a=0;a<s;a++)n+=t.data[a];return Math.abs(Math.ceil(n*100/s/5)-10)*i.N4};function r(e,t,n){switch(e){case o.Patterns.PATTERN000:return(t+n)%2===0;case o.Patterns.PATTERN001:return t%2===0;case o.Patterns.PATTERN010:return n%3===0;case o.Patterns.PATTERN011:return(t+n)%3===0;case o.Patterns.PATTERN100:return(Math.floor(t/2)+Math.floor(n/3))%2===0;case o.Patterns.PATTERN101:return t*n%2+t*n%3===0;case o.Patterns.PATTERN110:return(t*n%2+t*n%3)%2===0;case o.Patterns.PATTERN111:return(t*n%3+(t+n)%2)%2===0;default:throw new Error("bad maskPattern:"+e)}}o.applyMask=function(t,n){const s=n.size;for(let u=0;u<s;u++)for(let a=0;a<s;a++)n.isReserved(a,u)||n.xor(a,u,r(t,a,u))},o.getBestMask=function(t,n){const s=Object.keys(o.Patterns).length;let u=0,a=1/0;for(let c=0;c<s;c++){n(c),o.applyMask(c,t);const h=o.getPenaltyN1(t)+o.getPenaltyN2(t)+o.getPenaltyN3(t)+o.getPenaltyN4(t);o.applyMask(c,t),h<a&&(a=h,u=c)}return u}}(Ct)),Ct}var ot={},Zt;function Be(){if(Zt)return ot;Zt=1;const o=qt(),i=[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],r=[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];return ot.getBlocksCount=function(t,n){switch(n){case o.L:return i[(t-1)*4+0];case o.M:return i[(t-1)*4+1];case o.Q:return i[(t-1)*4+2];case o.H:return i[(t-1)*4+3];default:return}},ot.getTotalCodewordsCount=function(t,n){switch(n){case o.L:return r[(t-1)*4+0];case o.M:return r[(t-1)*4+1];case o.Q:return r[(t-1)*4+2];case o.H:return r[(t-1)*4+3];default:return}},ot}var pt={},et={},te;function $e(){if(te)return et;te=1;const o=new Uint8Array(512),i=new Uint8Array(256);return function(){let e=1;for(let t=0;t<255;t++)o[t]=e,i[e]=t,e<<=1,e&256&&(e^=285);for(let t=255;t<512;t++)o[t]=o[t-255]}(),et.log=function(e){if(e<1)throw new Error("log("+e+")");return i[e]},et.exp=function(e){return o[e]},et.mul=function(e,t){return e===0||t===0?0:o[i[e]+i[t]]},et}var ee;function We(){return ee||(ee=1,function(o){const i=$e();o.mul=function(e,t){const n=new Uint8Array(e.length+t.length-1);for(let s=0;s<e.length;s++)for(let u=0;u<t.length;u++)n[s+u]^=i.mul(e[s],t[u]);return n},o.mod=function(e,t){let n=new Uint8Array(e);for(;n.length-t.length>=0;){const s=n[0];for(let a=0;a<t.length;a++)n[a]^=i.mul(t[a],s);let u=0;for(;u<n.length&&n[u]===0;)u++;n=n.slice(u)}return n},o.generateECPolynomial=function(e){let t=new Uint8Array([1]);for(let n=0;n<e;n++)t=o.mul(t,new Uint8Array([1,i.exp(n)]));return t}}(pt)),pt}var yt,ne;function Xe(){if(ne)return yt;ne=1;const o=We();function i(r){this.genPoly=void 0,this.degree=r,this.degree&&this.initialize(this.degree)}return i.prototype.initialize=function(e){this.degree=e,this.genPoly=o.generateECPolynomial(this.degree)},i.prototype.encode=function(e){if(!this.genPoly)throw new Error("Encoder not initialized");const t=new Uint8Array(e.length+this.degree);t.set(e);const n=o.mod(t,this.genPoly),s=this.degree-n.length;if(s>0){const u=new Uint8Array(this.degree);return u.set(n,s),u}return n},yt=i,yt}var Et={},Bt={},bt={},re;function be(){return re||(re=1,bt.isValid=function(i){return!isNaN(i)&&i>=1&&i<=40}),bt}var F={},oe;function ve(){if(oe)return F;oe=1;const o="[0-9]+",i="[A-Z $%*+\\-./:]+";let r="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";r=r.replace(/u/g,"\\u");const e="(?:(?![A-Z0-9 $%*+\\-./:]|"+r+`)(?:.|[\r
- ]))+`;F.KANJI=new RegExp(r,"g"),F.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),F.BYTE=new RegExp(e,"g"),F.NUMERIC=new RegExp(o,"g"),F.ALPHANUMERIC=new RegExp(i,"g");const t=new RegExp("^"+r+"$"),n=new RegExp("^"+o+"$"),s=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");return F.testKanji=function(a){return t.test(a)},F.testNumeric=function(a){return n.test(a)},F.testAlphanumeric=function(a){return s.test(a)},F}var ie;function $(){return ie||(ie=1,function(o){const i=be(),r=ve();o.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},o.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},o.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},o.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},o.MIXED={bit:-1},o.getCharCountIndicator=function(n,s){if(!n.ccBits)throw new Error("Invalid mode: "+n);if(!i.isValid(s))throw new Error("Invalid version: "+s);return s>=1&&s<10?n.ccBits[0]:s<27?n.ccBits[1]:n.ccBits[2]},o.getBestModeForData=function(n){return r.testNumeric(n)?o.NUMERIC:r.testAlphanumeric(n)?o.ALPHANUMERIC:r.testKanji(n)?o.KANJI:o.BYTE},o.toString=function(n){if(n&&n.id)return n.id;throw new Error("Invalid mode")},o.isValid=function(n){return n&&n.bit&&n.ccBits};function e(t){if(typeof t!="string")throw new Error("Param is not a string");switch(t.toLowerCase()){case"numeric":return o.NUMERIC;case"alphanumeric":return o.ALPHANUMERIC;case"kanji":return o.KANJI;case"byte":return o.BYTE;default:throw new Error("Unknown mode: "+t)}}o.from=function(n,s){if(o.isValid(n))return n;try{return e(n)}catch(u){return s}}}(Bt)),Bt}var se;function Ze(){return se||(se=1,function(o){const i=G(),r=Be(),e=qt(),t=$(),n=be(),s=7973,u=i.getBCHDigit(s);function a(E,m,T){for(let A=1;A<=40;A++)if(m<=o.getCapacity(A,T,E))return A}function c(E,m){return t.getCharCountIndicator(E,m)+4}function h(E,m){let T=0;return E.forEach(function(A){const M=c(A.mode,m);T+=M+A.getBitsLength()}),T}function R(E,m){for(let T=1;T<=40;T++)if(h(E,T)<=o.getCapacity(T,m,t.MIXED))return T}o.from=function(m,T){return n.isValid(m)?parseInt(m,10):T},o.getCapacity=function(m,T,A){if(!n.isValid(m))throw new Error("Invalid QR Code version");typeof A=="undefined"&&(A=t.BYTE);const M=i.getSymbolTotalCodewords(m),S=r.getTotalCodewordsCount(m,T),P=(M-S)*8;if(A===t.MIXED)return P;const l=P-c(A,m);switch(A){case t.NUMERIC:return Math.floor(l/10*3);case t.ALPHANUMERIC:return Math.floor(l/11*2);case t.KANJI:return Math.floor(l/13);case t.BYTE:default:return Math.floor(l/8)}},o.getBestVersionForData=function(m,T){let A;const M=e.from(T,e.M);if(Array.isArray(m)){if(m.length>1)return R(m,M);if(m.length===0)return 1;A=m[0]}else A=m;return a(A.mode,A.getLength(),M)},o.getEncodedBits=function(m){if(!n.isValid(m)||m<7)throw new Error("Invalid QR Code version");let T=m<<12;for(;i.getBCHDigit(T)-u>=0;)T^=s<<i.getBCHDigit(T)-u;return m<<12|T}}(Et)),Et}var vt={},ae;function tn(){if(ae)return vt;ae=1;const o=G(),i=1335,r=21522,e=o.getBCHDigit(i);return vt.getEncodedBits=function(n,s){const u=n.bit<<3|s;let a=u<<10;for(;o.getBCHDigit(a)-e>=0;)a^=i<<o.getBCHDigit(a)-e;return(u<<10|a)^r},vt}var Rt={},_t,ue;function en(){if(ue)return _t;ue=1;const o=$();function i(r){this.mode=o.NUMERIC,this.data=r.toString()}return i.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(e){let t,n,s;for(t=0;t+3<=this.data.length;t+=3)n=this.data.substr(t,3),s=parseInt(n,10),e.put(s,10);const u=this.data.length-t;u>0&&(n=this.data.substr(t),s=parseInt(n,10),e.put(s,u*3+1))},_t=i,_t}var St,le;function nn(){if(le)return St;le=1;const o=$(),i=["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 r(e){this.mode=o.ALPHANUMERIC,this.data=e}return r.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(t){let n;for(n=0;n+2<=this.data.length;n+=2){let s=i.indexOf(this.data[n])*45;s+=i.indexOf(this.data[n+1]),t.put(s,11)}this.data.length%2&&t.put(i.indexOf(this.data[n]),6)},St=r,St}var Tt,ce;function rn(){if(ce)return Tt;ce=1;const o=$();function i(r){this.mode=o.BYTE,typeof r=="string"?this.data=new TextEncoder().encode(r):this.data=new Uint8Array(r)}return i.getBitsLength=function(e){return e*8},i.prototype.getLength=function(){return this.data.length},i.prototype.getBitsLength=function(){return i.getBitsLength(this.data.length)},i.prototype.write=function(r){for(let e=0,t=this.data.length;e<t;e++)r.put(this.data[e],8)},Tt=i,Tt}var At,fe;function on(){if(fe)return At;fe=1;const o=$(),i=G();function r(e){this.mode=o.KANJI,this.data=e}return r.getBitsLength=function(t){return t*13},r.prototype.getLength=function(){return this.data.length},r.prototype.getBitsLength=function(){return r.getBitsLength(this.data.length)},r.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let n=i.toSJIS(this.data[t]);if(n>=33088&&n<=40956)n-=33088;else if(n>=57408&&n<=60351)n-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
- Make sure your charset is UTF-8`);n=(n>>>8&255)*192+(n&255),e.put(n,13)}},At=r,At}var It={exports:{}},de;function sn(){return de||(de=1,function(o){var i={single_source_shortest_paths:function(r,e,t){var n={},s={};s[e]=0;var u=i.PriorityQueue.make();u.push(e,0);for(var a,c,h,R,E,m,T,A,M;!u.empty();){a=u.pop(),c=a.value,R=a.cost,E=r[c]||{};for(h in E)E.hasOwnProperty(h)&&(m=E[h],T=R+m,A=s[h],M=typeof s[h]=="undefined",(M||A>T)&&(s[h]=T,u.push(h,T),n[h]=c))}if(typeof t!="undefined"&&typeof s[t]=="undefined"){var S=["Could not find a path from ",e," to ",t,"."].join("");throw new Error(S)}return n},extract_shortest_path_from_predecessor_list:function(r,e){for(var t=[],n=e;n;)t.push(n),r[n],n=r[n];return t.reverse(),t},find_path:function(r,e,t){var n=i.single_source_shortest_paths(r,e,t);return i.extract_shortest_path_from_predecessor_list(n,t)},PriorityQueue:{make:function(r){var e=i.PriorityQueue,t={},n;r=r||{};for(n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t.queue=[],t.sorter=r.sorter||e.default_sorter,t},default_sorter:function(r,e){return r.cost-e.cost},push:function(r,e){var t={value:r,cost:e};this.queue.push(t),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};o.exports=i}(It)),It.exports}var ge;function an(){return ge||(ge=1,function(o){const i=$(),r=en(),e=nn(),t=rn(),n=on(),s=ve(),u=G(),a=sn();function c(S){return unescape(encodeURIComponent(S)).length}function h(S,P,l){const d=[];let I;for(;(I=S.exec(l))!==null;)d.push({data:I[0],index:I.index,mode:P,length:I[0].length});return d}function R(S){const P=h(s.NUMERIC,i.NUMERIC,S),l=h(s.ALPHANUMERIC,i.ALPHANUMERIC,S);let d,I;return u.isKanjiModeEnabled()?(d=h(s.BYTE,i.BYTE,S),I=h(s.KANJI,i.KANJI,S)):(d=h(s.BYTE_KANJI,i.BYTE,S),I=[]),P.concat(l,d,I).sort(function(p,w){return p.index-w.index}).map(function(p){return{data:p.data,mode:p.mode,length:p.length}})}function E(S,P){switch(P){case i.NUMERIC:return r.getBitsLength(S);case i.ALPHANUMERIC:return e.getBitsLength(S);case i.KANJI:return n.getBitsLength(S);case i.BYTE:return t.getBitsLength(S)}}function m(S){return S.reduce(function(P,l){const d=P.length-1>=0?P[P.length-1]:null;return d&&d.mode===l.mode?(P[P.length-1].data+=l.data,P):(P.push(l),P)},[])}function T(S){const P=[];for(let l=0;l<S.length;l++){const d=S[l];switch(d.mode){case i.NUMERIC:P.push([d,{data:d.data,mode:i.ALPHANUMERIC,length:d.length},{data:d.data,mode:i.BYTE,length:d.length}]);break;case i.ALPHANUMERIC:P.push([d,{data:d.data,mode:i.BYTE,length:d.length}]);break;case i.KANJI:P.push([d,{data:d.data,mode:i.BYTE,length:c(d.data)}]);break;case i.BYTE:P.push([{data:d.data,mode:i.BYTE,length:c(d.data)}])}}return P}function A(S,P){const l={},d={start:{}};let I=["start"];for(let f=0;f<S.length;f++){const p=S[f],w=[];for(let g=0;g<p.length;g++){const _=p[g],y=""+f+g;w.push(y),l[y]={node:_,lastCount:0},d[y]={};for(let b=0;b<I.length;b++){const C=I[b];l[C]&&l[C].node.mode===_.mode?(d[C][y]=E(l[C].lastCount+_.length,_.mode)-E(l[C].lastCount,_.mode),l[C].lastCount+=_.length):(l[C]&&(l[C].lastCount=_.length),d[C][y]=E(_.length,_.mode)+4+i.getCharCountIndicator(_.mode,P))}}I=w}for(let f=0;f<I.length;f++)d[I[f]].end=0;return{map:d,table:l}}function M(S,P){let l;const d=i.getBestModeForData(S);if(l=i.from(P,d),l!==i.BYTE&&l.bit<d.bit)throw new Error('"'+S+'" cannot be encoded with mode '+i.toString(l)+`.
- Suggested mode is: `+i.toString(d));switch(l===i.KANJI&&!u.isKanjiModeEnabled()&&(l=i.BYTE),l){case i.NUMERIC:return new r(S);case i.ALPHANUMERIC:return new e(S);case i.KANJI:return new n(S);case i.BYTE:return new t(S)}}o.fromArray=function(P){return P.reduce(function(l,d){return typeof d=="string"?l.push(M(d,null)):d.data&&l.push(M(d.data,d.mode)),l},[])},o.fromString=function(P,l){const d=R(P,u.isKanjiModeEnabled()),I=T(d),f=A(I,l),p=a.find_path(f.map,"start","end"),w=[];for(let g=1;g<p.length-1;g++)w.push(f.table[p[g]].node);return o.fromArray(m(w))},o.rawSplit=function(P){return o.fromArray(R(P,u.isKanjiModeEnabled()))}}(Rt)),Rt}var he;function un(){if(he)return ft;he=1;const o=G(),i=qt(),r=Je(),e=je(),t=Ye(),n=Qe(),s=Ge(),u=Be(),a=Xe(),c=Ze(),h=tn(),R=$(),E=an();function m(f,p){const w=f.size,g=n.getPositions(p);for(let _=0;_<g.length;_++){const y=g[_][0],b=g[_][1];for(let C=-1;C<=7;C++)if(!(y+C<=-1||w<=y+C))for(let v=-1;v<=7;v++)b+v<=-1||w<=b+v||(C>=0&&C<=6&&(v===0||v===6)||v>=0&&v<=6&&(C===0||C===6)||C>=2&&C<=4&&v>=2&&v<=4?f.set(y+C,b+v,!0,!0):f.set(y+C,b+v,!1,!0))}}function T(f){const p=f.size;for(let w=8;w<p-8;w++){const g=w%2===0;f.set(w,6,g,!0),f.set(6,w,g,!0)}}function A(f,p){const w=t.getPositions(p);for(let g=0;g<w.length;g++){const _=w[g][0],y=w[g][1];for(let b=-2;b<=2;b++)for(let C=-2;C<=2;C++)b===-2||b===2||C===-2||C===2||b===0&&C===0?f.set(_+b,y+C,!0,!0):f.set(_+b,y+C,!1,!0)}}function M(f,p){const w=f.size,g=c.getEncodedBits(p);let _,y,b;for(let C=0;C<18;C++)_=Math.floor(C/3),y=C%3+w-8-3,b=(g>>C&1)===1,f.set(_,y,b,!0),f.set(y,_,b,!0)}function S(f,p,w){const g=f.size,_=h.getEncodedBits(p,w);let y,b;for(y=0;y<15;y++)b=(_>>y&1)===1,y<6?f.set(y,8,b,!0):y<8?f.set(y+1,8,b,!0):f.set(g-15+y,8,b,!0),y<8?f.set(8,g-y-1,b,!0):y<9?f.set(8,15-y-1+1,b,!0):f.set(8,15-y-1,b,!0);f.set(g-8,8,1,!0)}function P(f,p){const w=f.size;let g=-1,_=w-1,y=7,b=0;for(let C=w-1;C>0;C-=2)for(C===6&&C--;;){for(let v=0;v<2;v++)if(!f.isReserved(_,C-v)){let q=!1;b<p.length&&(q=(p[b]>>>y&1)===1),f.set(_,C-v,q),y--,y===-1&&(b++,y=7)}if(_+=g,_<0||w<=_){_-=g,g=-g;break}}}function l(f,p,w){const g=new r;w.forEach(function(v){g.put(v.mode.bit,4),g.put(v.getLength(),R.getCharCountIndicator(v.mode,f)),v.write(g)});const _=o.getSymbolTotalCodewords(f),y=u.getTotalCodewordsCount(f,p),b=(_-y)*8;for(g.getLengthInBits()+4<=b&&g.put(0,4);g.getLengthInBits()%8!==0;)g.putBit(0);const C=(b-g.getLengthInBits())/8;for(let v=0;v<C;v++)g.put(v%2?17:236,8);return d(g,f,p)}function d(f,p,w){const g=o.getSymbolTotalCodewords(p),_=u.getTotalCodewordsCount(p,w),y=g-_,b=u.getBlocksCount(p,w),C=g%b,v=b-C,q=Math.floor(g/b),J=Math.floor(y/b),L=J+1,j=q-J,st=new a(j);let tt=0;const U=new Array(b),Q=new Array(b);let W=0;const nt=new Uint8Array(f.buffer);for(let X=0;X<b;X++){const ut=X<v?J:L;U[X]=nt.slice(tt,tt+ut),Q[X]=st.encode(U[X]),tt+=ut,W=Math.max(W,ut)}const at=new Uint8Array(g);let kt=0,z,V;for(z=0;z<W;z++)for(V=0;V<b;V++)z<U[V].length&&(at[kt++]=U[V][z]);for(z=0;z<j;z++)for(V=0;V<b;V++)at[kt++]=Q[V][z];return at}function I(f,p,w,g){let _;if(Array.isArray(f))_=E.fromArray(f);else if(typeof f=="string"){let q=p;if(!q){const J=E.rawSplit(f);q=c.getBestVersionForData(J,w)}_=E.fromString(f,q||40)}else throw new Error("Invalid data");const y=c.getBestVersionForData(_,w);if(!y)throw new Error("The amount of data is too big to be stored in a QR Code");if(!p)p=y;else if(p<y)throw new Error(`
- The chosen QR Code version cannot contain this amount of data.
- Minimum version required to store current data is: `+y+`.
- `);const b=l(p,w,_),C=o.getSymbolSize(p),v=new e(C);return m(v,p),T(v),A(v,p),S(v,w,0),p>=7&&M(v,p),P(v,b),isNaN(g)&&(g=s.getBestMask(v,S.bind(null,v,w))),s.applyMask(g,v),S(v,w,g),{modules:v,version:p,errorCorrectionLevel:w,maskPattern:g,segments:_}}return ft.create=function(p,w){if(typeof p=="undefined"||p==="")throw new Error("No input text");let g=i.M,_,y;return typeof w!="undefined"&&(g=i.from(w.errorCorrectionLevel,i.M),_=c.from(w.version),y=s.from(w.maskPattern),w.toSJISFunc&&o.setToSJISFunction(w.toSJISFunc)),I(p,_,g,y)},ft}var Pt={},Nt={},me;function Re(){return me||(me=1,function(o){function i(r){if(typeof r=="number"&&(r=r.toString()),typeof r!="string")throw new Error("Color should be defined as hex string");let e=r.slice().replace("#","").split("");if(e.length<3||e.length===5||e.length>8)throw new Error("Invalid hex color: "+r);(e.length===3||e.length===4)&&(e=Array.prototype.concat.apply([],e.map(function(n){return[n,n]}))),e.length===6&&e.push("F","F");const t=parseInt(e.join(""),16);return{r:t>>24&255,g:t>>16&255,b:t>>8&255,a:t&255,hex:"#"+e.slice(0,6).join("")}}o.getOptions=function(e){e||(e={}),e.color||(e.color={});const t=typeof e.margin=="undefined"||e.margin===null||e.margin<0?4:e.margin,n=e.width&&e.width>=21?e.width:void 0,s=e.scale||4;return{width:n,scale:n?4:s,margin:t,color:{dark:i(e.color.dark||"#000000ff"),light:i(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},o.getScale=function(e,t){return t.width&&t.width>=e+t.margin*2?t.width/(e+t.margin*2):t.scale},o.getImageWidth=function(e,t){const n=o.getScale(e,t);return Math.floor((e+t.margin*2)*n)},o.qrToImageData=function(e,t,n){const s=t.modules.size,u=t.modules.data,a=o.getScale(s,n),c=Math.floor((s+n.margin*2)*a),h=n.margin*a,R=[n.color.light,n.color.dark];for(let E=0;E<c;E++)for(let m=0;m<c;m++){let T=(E*c+m)*4,A=n.color.light;if(E>=h&&m>=h&&E<c-h&&m<c-h){const M=Math.floor((E-h)/a),S=Math.floor((m-h)/a);A=R[u[M*s+S]?1:0]}e[T++]=A.r,e[T++]=A.g,e[T++]=A.b,e[T]=A.a}}}(Nt)),Nt}var we;function ln(){return we||(we=1,function(o){const i=Re();function r(t,n,s){t.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 e(){try{return document.createElement("canvas")}catch(t){throw new Error("You need to specify a canvas element")}}o.render=function(n,s,u){let a=u,c=s;typeof a=="undefined"&&(!s||!s.getContext)&&(a=s,s=void 0),s||(c=e()),a=i.getOptions(a);const h=i.getImageWidth(n.modules.size,a),R=c.getContext("2d"),E=R.createImageData(h,h);return i.qrToImageData(E.data,n,a),r(R,c,h),R.putImageData(E,0,0),c},o.renderToDataURL=function(n,s,u){let a=u;typeof a=="undefined"&&(!s||!s.getContext)&&(a=s,s=void 0),a||(a={});const c=o.render(n,s,a),h=a.type||"image/png",R=a.rendererOpts||{};return c.toDataURL(h,R.quality)}}(Pt)),Pt}var Mt={},Ce;function cn(){if(Ce)return Mt;Ce=1;const o=Re();function i(t,n){const s=t.a/255,u=n+'="'+t.hex+'"';return s<1?u+" "+n+'-opacity="'+s.toFixed(2).slice(1)+'"':u}function r(t,n,s){let u=t+n;return typeof s!="undefined"&&(u+=" "+s),u}function e(t,n,s){let u="",a=0,c=!1,h=0;for(let R=0;R<t.length;R++){const E=Math.floor(R%n),m=Math.floor(R/n);!E&&!c&&(c=!0),t[R]?(h++,R>0&&E>0&&t[R-1]||(u+=c?r("M",E+s,.5+m+s):r("m",a,0),a=0,c=!1),E+1<n&&t[R+1]||(u+=r("h",h),h=0)):a++}return u}return Mt.render=function(n,s,u){const a=o.getOptions(s),c=n.modules.size,h=n.modules.data,R=c+a.margin*2,E=a.color.light.a?"<path "+i(a.color.light,"fill")+' d="M0 0h'+R+"v"+R+'H0z"/>':"",m="<path "+i(a.color.dark,"stroke")+' d="'+e(h,c,a.margin)+'"/>',T='viewBox="0 0 '+R+" "+R+'"',M='<svg xmlns="http://www.w3.org/2000/svg" '+(a.width?'width="'+a.width+'" height="'+a.width+'" ':"")+T+' shape-rendering="crispEdges">'+E+m+`</svg>
- `;return typeof u=="function"&&u(null,M),M},Mt}var pe;function fn(){if(pe)return Z;pe=1;const o=Oe(),i=un(),r=ln(),e=cn();function t(n,s,u,a,c){const h=[].slice.call(arguments,1),R=h.length,E=typeof h[R-1]=="function";if(!E&&!o())throw new Error("Callback required as last argument");if(E){if(R<2)throw new Error("Too few arguments provided");R===2?(c=u,u=s,s=a=void 0):R===3&&(s.getContext&&typeof c=="undefined"?(c=a,a=void 0):(c=a,a=u,u=s,s=void 0))}else{if(R<1)throw new Error("Too few arguments provided");return R===1?(u=s,s=a=void 0):R===2&&!s.getContext&&(a=u,u=s,s=void 0),new Promise(function(m,T){try{const A=i.create(u,a);m(n(A,s,a))}catch(A){T(A)}})}try{const m=i.create(u,a);c(null,n(m,s,a))}catch(m){c(m)}}return Z.create=i.create,Z.toCanvas=t.bind(null,r.render),Z.toDataURL=t.bind(null,r.renderToDataURL),Z.toString=t.bind(null,function(n,s,u){return e.render(n,u)}),Z}var dn=fn();const gn=Ae(dn),hn={class:"absolute top-[50%] left-[50%] font-bold"},mn=ye({__name:"Qrcode",props:{tag:rt.string.validate(o=>["canvas","img"].includes(o)).def("canvas"),text:{type:[String,Array],default:null},options:{type:Object,default:()=>({})},width:rt.number.def(200),logo:{type:[String,Object],default:""},disabled:rt.bool.def(!1),disabledText:rt.string.def("")},emits:["done","click","disabled-click"],setup(o,{emit:i}){const r=o,e=i,{getPrefixCls:t}=Ne(),n=t("qrcode"),{toCanvas:s,toDataURL:u}=gn,a=Dt(!0),c=Dt(null),h=Lt(()=>String(r.text)),R=Lt(()=>({width:r.width+"px",height:r.width+"px"})),E=()=>lt(this,null,function*(){yield He();const l=Ie(r.options||{});if(r.tag==="canvas"){l.errorCorrectionLevel=l.errorCorrectionLevel||A(B(h));const d=yield T(B(h),l);l.scale=r.width===0?void 0:r.width/d*4;const I=yield s(B(c),B(h),l);if(r.logo){const f=yield m(I);e("done",f),a.value=!1}else e("done",I.toDataURL()),a.value=!1}else{const d=yield u(h.value,xt({errorCorrectionLevel:"H",width:r.width},l));B(c).src=d,e("done",d),a.value=!1}});qe(()=>h.value,l=>{l&&E()},{deep:!0,immediate:!0});const m=l=>{const d=l.width,I=Object.assign({logoSize:.15,bgColor:"#ffffff",borderSize:.05,crossOrigin:"anonymous",borderRadius:8,logoRadius:0},Vt(r.logo)?{}:r.logo),{logoSize:f=.15,bgColor:p="#ffffff",borderSize:w=.05,crossOrigin:g="anonymous",borderRadius:_=8,logoRadius:y=0}=I,b=Vt(r.logo)?r.logo:r.logo.src,C=d*f,v=d*(1-f)/2,q=d*(f+w),J=d*(1-f-w)/2,L=l.getContext("2d");if(!L)return;M(L)(J,J,q,q,_),L.fillStyle=p,L.fill();const j=new Image;(g||y)&&j.setAttribute("crossOrigin",g),j.src=b;const st=U=>{L.drawImage(U,v,v,C,C)},tt=U=>{const Q=document.createElement("canvas");Q.width=v+C,Q.height=v+C;const W=Q.getContext("2d");if(!W||!L||(W.drawImage(U,v,v,C,C),M(L)(v,v,C,C,y),!L))return;const nt=L.createPattern(Q,"no-repeat");nt&&(L.fillStyle=nt,L.fill())};return new Promise(U=>{j.onload=()=>{y?tt(j):st(j),U(l.toDataURL())}})},T=(l,d)=>lt(this,null,function*(){const I=document.createElement("canvas");return yield s(I,l,d),I.width}),A=l=>l.length>36?"M":l.length>16?"Q":"H",M=l=>(d,I,f,p,w)=>{const g=Math.min(f,p);return w>g/2&&(w=g/2),l.beginPath(),l.moveTo(d+w,I),l.arcTo(d+f,I,d+f,I+p,w),l.arcTo(d+f,I+p,d,I+p,w),l.arcTo(d,I+p,d,I,w),l.arcTo(d,I,d+f,I,w),l.closePath(),l},S=()=>{e("click")},P=()=>{e("disabled-click")};return(l,d)=>{const I=Ve("Icon"),f=ze("loading");return ke((it(),Ht("div",{class:Kt([B(n),"relative inline-block"]),style:xe(R.value)},[(it(),Ee(Ue(o.tag),{ref_key:"wrapRef",ref:c,onClick:S},null,512)),o.disabled?(it(),Ht("div",{key:0,class:Kt([`${B(n)}--disabled`,"absolute top-0 left-0 flex w-full h-full items-center justify-center"]),onClick:P},[k("div",hn,[N(I,{icon:"vi-ep:refresh-right",size:30,color:"var(--el-color-primary)"}),k("div",null,x(o.disabledText),1)])],2)):Fe("",!0)],6)),[[f,a.value]])}}}),O=Me(mn,[["__scopeId","data-v-195692f1"]]),wn={class:"font-bold"},Cn={class:"font-bold"},pn={class:"font-bold"},yn={class:"font-bold"},En={class:"font-bold"},Bn={class:"font-bold"},bn={class:"font-bold"},vn={class:"font-bold"},Rn={class:"font-bold"},Ln=ye({__name:"Qrcode",setup(o){const i=De(),{t:r}=Le(),e=Lt(()=>i.getTitle),t=Dt("");setTimeout(()=>{t.value=B(e)},3e3);const n=()=>{zt.info(r("qrcodeDemo.click"))},s=()=>{zt.info(r("qrcodeDemo.invalid"))};return(u,a)=>(it(),Ee(B(Ke),{title:B(r)("qrcodeDemo.qrcode"),message:B(r)("qrcodeDemo.qrcodeDes")},{default:D(()=>[N(B(Pe),{gutter:20,justify:"space-between"},{default:D(()=>[N(B(H),{xl:6,lg:6,md:12,sm:24,xs:24},{default:D(()=>[N(B(K),{shadow:"hover",class:"mb-10px text-center"},{default:D(()=>[k("div",wn,x(B(r)("qrcodeDemo.basicUsage")),1),N(B(O),{text:e.value},null,8,["text"])]),_:1})]),_:1}),N(B(H),{xl:6,lg:6,md:12,sm:24,xs:24},{default:D(()=>[N(B(K),{shadow:"hover",class:"mb-10px text-center"},{default:D(()=>[k("div",Cn,x(B(r)("qrcodeDemo.imgTag")),1),N(B(O),{text:e.value,tag:"img"},null,8,["text"])]),_:1})]),_:1}),N(B(H),{xl:6,lg:6,md:12,sm:24,xs:24},{default:D(()=>[N(B(K),{shadow:"hover",class:"mb-10px text-center"},{default:D(()=>[k("div",pn,x(B(r)("qrcodeDemo.style")),1),N(B(O),{text:e.value,options:{color:{dark:"#55D187",light:"#2d8cf0"}}},null,8,["text"])]),_:1})]),_:1}),N(B(H),{xl:6,lg:6,md:12,sm:24,xs:24},{default:D(()=>[N(B(K),{shadow:"hover",class:"mb-10px text-center"},{default:D(()=>[k("div",yn,x(B(r)("qrcodeDemo.click")),1),N(B(O),{text:e.value,onClick:n},null,8,["text"])]),_:1})]),_:1}),N(B(H),{xl:6,lg:6,md:12,sm:24,xs:24},{default:D(()=>[N(B(K),{shadow:"hover",class:"mb-10px text-center"},{default:D(()=>[k("div",En,x(B(r)("qrcodeDemo.asynchronousContent")),1),N(B(O),{text:t.value},null,8,["text"])]),_:1})]),_:1}),N(B(H),{xl:6,lg:6,md:12,sm:24,xs:24},{default:D(()=>[N(B(K),{shadow:"hover",class:"mb-10px text-center"},{default:D(()=>[k("div",Bn,x(B(r)("qrcodeDemo.invalid")),1),N(B(O),{text:e.value,disabled:"",onDisabledClick:s},null,8,["text"])]),_:1})]),_:1}),N(B(H),{xl:6,lg:6,md:12,sm:24,xs:24},{default:D(()=>[N(B(K),{shadow:"hover",class:"mb-10px text-center"},{default:D(()=>[k("div",bn,x(B(r)("qrcodeDemo.logoConfig")),1),N(B(O),{text:e.value,logo:B(Ot)},null,8,["text","logo"])]),_:1})]),_:1}),N(B(H),{xl:6,lg:6,md:12,sm:24,xs:24},{default:D(()=>[N(B(K),{shadow:"hover",class:"mb-10px text-center"},{default:D(()=>[k("div",vn,x(B(r)("qrcodeDemo.logoStyle")),1),N(B(O),{text:e.value,logo:{src:B(Ot),logoSize:.2,borderSize:.05,borderRadius:50,bgColor:"blue"}},null,8,["text","logo"])]),_:1})]),_:1}),N(B(H),{xl:6,lg:6,md:12,sm:24,xs:24},{default:D(()=>[N(B(K),{shadow:"hover",class:"mb-10px text-center"},{default:D(()=>[k("div",Rn,x(B(r)("qrcodeDemo.size")),1),N(B(O),{text:e.value,width:100},null,8,["text"])]),_:1})]),_:1})]),_:1})]),_:1},8,["title","message"]))}});export{Ln as default};
|