You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
19 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[557],{82947:function(J,B){var M={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};B.Z=M},10656:function(J,B,M){M.r(B),M.d(B,{default:function(){return ye}});var q=M(90930),ee=M(35312),te=M(4393),C=M(67294),ne=M(87462),oe=M(82947),re=M(93771),se=function(r,c){return C.createElement(re.Z,(0,ne.Z)({},r,{ref:c,icon:oe.Z}))},ie=C.forwardRef(se),le=M(93967),ae=M.n(le),ce=Object.defineProperty,L=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,Q=(l,r,c)=>r in l?ce(l,r,{enumerable:!0,configurable:!0,writable:!0,value:c}):l[r]=c,O=(l,r)=>{for(var c in r||(r={}))x.call(r,c)&&Q(l,c,r[c]);if(L)for(var c of L(r))D.call(r,c)&&Q(l,c,r[c]);return l},F=(l,r)=>{var c={};for(var i in l)x.call(l,i)&&r.indexOf(i)<0&&(c[i]=l[i]);if(l!=null&&L)for(var i of L(l))r.indexOf(i)<0&&D.call(l,i)&&(c[i]=l[i]);return c};var S;(l=>{const r=class{constructor(e,t,n,o){if(this.version=e,this.errorCorrectionLevel=t,this.modules=[],this.isFunction=[],e<r.MIN_VERSION||e>r.MAX_VERSION)throw new RangeError("Version value out of range");if(o<-1||o>7)throw new RangeError("Mask value out of range");this.size=e*4+17;let s=[];for(let a=0;a<this.size;a++)s.push(!1);for(let a=0;a<this.size;a++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const u=this.addEccAndInterleave(n);if(this.drawCodewords(u),o==-1){let a=1e9;for(let E=0;E<8;E++){this.applyMask(E),this.drawFormatBits(E);const g=this.getPenaltyScore();g<a&&(o=E,a=g),this.applyMask(E)}}d(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(e,t){const n=l.QrSegment.makeSegments(e);return r.encodeSegments(n,t)}static encodeBinary(e,t){const n=l.QrSegment.makeBytes(e);return r.encodeSegments([n],t)}static encodeSegments(e,t,n=1,o=40,s=-1,u=!0){if(!(r.MIN_VERSION<=n&&n<=o&&o<=r.MAX_VERSION)||s<-1||s>7)throw new RangeError("Invalid value");let a,E;for(a=n;;a++){const m=r.getNumDataCodewords(a,t)*8,R=v.getTotalBits(e,a);if(R<=m){E=R;break}if(a>=o)throw new RangeError("Data too long")}for(const m of[r.Ecc.MEDIUM,r.Ecc.QUARTILE,r.Ecc.HIGH])u&&E<=r.getNumDataCodewords(a,m)*8&&(t=m);let g=[];for(const m of e){i(m.mode.modeBits,4,g),i(m.numChars,m.mode.numCharCountBits(a),g);for(const R of m.getData())g.push(R)}d(g.length==E);const P=r.getNumDataCodewords(a,t)*8;d(g.length<=P),i(0,Math.min(4,P-g.length),g),i(0,(8-g.length%8)%8,g),d(g.length%8==0);for(let m=236;g.length<P;m^=253)i(m,8,g);let p=[];for(;p.length*8<g.length;)p.push(0);return g.forEach((m,R)=>p[R>>>3]|=m<<7-(R&7)),new r(a,t,p,s)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let n=0;n<this.size;n++)this.setFunctionModule(6,n,n%2==0),this.setFunctionModule(n,6,n%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let o=0;o<t;o++)n==0&&o==0||n==0&&o==t-1||n==t-1&&o==0||this.drawAlignmentPattern(e[n],e[o]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let s=0;s<10;s++)n=n<<1^(n>>>9)*1335;const o=(t<<10|n)^21522;d(o>>>15==0);for(let s=0;s<=5;s++)this.setFunctionModule(8,s,f(o,s));this.setFunctionModule(8,7,f(o,6)),this.setFunctionModule(8,8,f(o,7)),this.setFunctionModule(7,8,f(o,8));for(let s=9;s<15;s++)this.setFunctionModule(14-s,8,f(o,s));for(let s=0;s<8;s++)this.setFunctionModule(this.size-1-s,8,f(o,s));for(let s=8;s<15;s++)this.setFunctionModule(8,this.size-15+s,f(o,s));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let n=0;n<12;n++)e=e<<1^(e>>>11)*7973;const t=this.version<<12|e;d(t>>>18==0);for(let n=0;n<18;n++){const o=f(t,n),s=this.size-11+n%3,u=Math.floor(n/3);this.setFunctionModule(s,u,o),this.setFunctionModule(u,s,o)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let o=-4;o<=4;o++){const s=Math.max(Math.abs(o),Math.abs(n)),u=e+o,a=t+n;0<=u&&u<this.size&&0<=a&&a<this.size&&this.setFunctionModule(u,a,s!=2&&s!=4)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let o=-2;o<=2;o++)this.setFunctionModule(e+o,t+n,Math.max(Math.abs(o),Math.abs(n))!=1)}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const t=this.version,n=this.errorCorrectionLevel;if(e.length!=r.getNumDataCodewords(t,n))throw new RangeError("Invalid argument");const o=r.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t],s=r.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t],u=Math.floor(r.getNumRawDataModules(t)/8),a=o-u%o,E=Math.floor(u/o);let g=[];const P=r.reedSolomonComputeDivisor(s);for(let m=0,R=0;m<o;m++){let w=e.slice(R,R+E-s+(m<a?0:1));R+=w.length;const I=r.reedSolomonComputeRemainder(w,P);m<a&&w.push(0),g.push(w.concat(I))}let p=[];for(let m=0;m<g[0].length;m++)g.forEach((R,w)=>{(m!=E-s||w>=a)&&p.push(R[m])});return d(p.length==u),p}drawCodewords(e){if(e.length!=Math.floor(r.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let t=0;for(let n=this.size-1;n>=1;n-=2){n==6&&(n=5);for(let o=0;o<this.size;o++)for(let s=0;s<2;s++){const u=n-s,E=(n+1&2)==0?this.size-1-o:o;!this.isFunction[E][u]&&t<e.length*8&&(this.modules[E][u]=f(e[t>>>3],7-(t&7)),t++)}}d(t==e.length*8)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let o;switch(e){case 0:o=(n+t)%2==0;break;case 1:o=t%2==0;break;case 2:o=n%3==0;break;case 3:o=(n+t)%3==0;break;case 4:o=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:o=n*t%2+n*t%3==0;break;case 6:o=(n*t%2+n*t%3)%2==0;break;case 7:o=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&o&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let s=0;s<this.size;s++){let u=!1,a=0,E=[0,0,0,0,0,0,0];for(let g=0;g<this.size;g++)this.modules[s][g]==u?(a++,a==5?e+=r.PENALTY_N1:a>5&&e++):(this.finderPenaltyAddHistory(a,E),u||(e+=this.finderPenaltyCountPatterns(E)*r.PENALTY_N3),u=this.modules[s][g],a=1);e+=this.finderPenaltyTerminateAndCount(u,a,E)*r.PENALTY_N3}for(let s=0;s<this.size;s++){let u=!1,a=0,E=[0,0,0,0,0,0,0];for(let g=0;g<this.size;g++)this.modules[g][s]==u?(a++,a==5?e+=r.PENALTY_N1:a>5&&e++):(this.finderPenaltyAddHistory(a,E),u||(e+=this.finderPenaltyCountPatterns(E)*r.PENALTY_N3),u=this.modules[g][s],a=1);e+=this.finderPenaltyTerminateAndCount(u,a,E)*r.PENALTY_N3}for(let s=0;s<this.size-1;s++)for(let u=0;u<this.size-1;u++){const a=this.modules[s][u];a==this.modules[s][u+1]&&a==this.modules[s+1][u]&&a==this.modules[s+1][u+1]&&(e+=r.PENALTY_N2)}let t=0;for(const s of this.modules)t=s.reduce((u,a)=>u+(a?1:0),t);const n=this.size*this.size,o=Math.ceil(Math.abs(t*20-n*10)/n)-1;return d(0<=o&&o<=9),e+=o*r.PENALTY_N4,d(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(this.version==1)return[];{const e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2;let n=[6];for(let o=this.size-7;n.length<e;o-=t)n.splice(1,0,o);return n}}static getNumRawDataModules(e){if(e<r.MIN_VERSION||e>r.MAX_VERSION)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return d(208<=t&&t<=29648),t}static getNumDataCodewords(e,t){return Math.floor(r.getNumRawDataModules(e)/8)-r.ECC_CODEWORDS_PER_BLOCK[t.ordinal][e]*r.NUM_ERROR_CORRECTION_BLOCKS[t.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let t=[];for(let o=0;o<e-1;o++)t.push(0);t.push(1);let n=1;for(let o=0;o<e;o++){for(let s=0;s<t.length;s++)t[s]=r.reedSolomonMultiply(t[s],n),s+1<t.length&&(t[s]^=t[s+1]);n=r.reedSolomonMultiply(n,2)}return t}static reedSolomonComputeRemainder(e,t){let n=t.map(o=>0);for(const o of e){const s=o^n.shift();n.push(0),t.forEach((u,a)=>n[a]^=r.reedSolomonMultiply(u,s))}return n}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let n=0;for(let o=7;o>=0;o--)n=n<<1^(n>>>7)*285,n^=(t>>>o&1)*e;return d(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];d(t<=this.size*3);const n=t>0&&e[2]==t&&e[3]==t*3&&e[4]==t&&e[5]==t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]==0&&(e+=this.size),t.pop(),t.unshift(e)}};let c=r;c.MIN_VERSION=1,c.MAX_VERSION=40,c.PENALTY_N1=3,c.PENALTY_N2=3,c.PENALTY_N3=40,c.PENALTY_N4=10,c.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],c.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],l.QrCode=c;function i(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let o=t-1;o>=0;o--)n.push(e>>>o&1)}function f(e,t){return(e>>>t&1)!=0}function d(e){if(!e)throw new Error("Assertion error")}const h=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)i(n,8,t);return new h(h.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!h.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const o=Math.min(e.length-n,3);i(parseInt(e.substr(n,o),10),o*3+1,t),n+=o}return new h(h.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!h.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t=[],n;for(n=0;n+2<=e.length;n+=2){let o=h.ALPHANUMERIC_CHARSET.indexOf(e.charAt(n))*45;o+=h.ALPHANUMERIC_CHARSET.indexOf(e.charAt(n+1)),i(o,11,t)}return n<e.length&&i(h.ALPHANUMERIC_CHARSET.indexOf(e.charAt(n)),6,t),new h(h.Mode.ALPHANUMERIC,e.length,t)}static makeSegments(e){return e==""?[]:h.isNumeric(e)?[h.makeNumeric(e)]:h.isAlphanumeric(e)?[h.makeAlphanumeric(e)]:[h.makeBytes(h.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)i(e,8,t);else if(e<16384)i(2,2,t),i(e,14,t);else if(e<1e6)i(6,3,t),i(e,21,t);else throw new RangeError("ECI assignment value out of range");return new h(h.Mode.ECI,0,t)}static isNumeric(e){return h.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return h.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const o of e){const s=o.mode.numCharCountBits(t);if(o.numChars>=1<<s)return 1/0;n+=4+s+o.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)!="%"?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let v=h;v.NUMERIC_REGEX=/^[0-9]*$/,v.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,v.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",l.QrSegment=v})(S||(S={})),(l=>{let r;(c=>{const i=class{constructor(d,h){this.ordinal=d,this.formatBits=h}};let f=i;f.LOW=new i(0,1),f.MEDIUM=new i(1,0),f.QUARTILE=new i(2,3),f.HIGH=new i(3,2),c.Ecc=f})(r=l.QrCode||(l.QrCode={}))})(S||(S={})),(l=>{let r;(c=>{const i=class{constructor(d,h){this.modeBits=d,this.numBitsCharCount=h}numCharCountBits(d){return this.numBitsCharCount[Math.floor((d+7)/17)]}};let f=i;f.NUMERIC=new i(1,[10,12,14]),f.ALPHANUMERIC=new i(2,[9,11,13]),f.BYTE=new i(4,[8,16,16]),f.KANJI=new i(8,[8,10,12]),f.ECI=new i(7,[0,0,0]),c.Mode=f})(r=l.QrSegment||(l.QrSegment={}))})(S||(S={}));var y=S;var U={L:y.QrCode.Ecc.LOW,M:y.QrCode.Ecc.MEDIUM,Q:y.QrCode.Ecc.QUARTILE,H:y.QrCode.Ecc.HIGH},$=128,H="L",j="#FFFFFF",Y="#000000",G=!1,z=4,ue=.1;function k(l,r=0){const c=[];return l.forEach(function(i,f){let d=null;i.forEach(function(h,v){if(!h&&d!==null){c.push(`M${d+r} ${f+r}h${v-d}v1H${d+r}z`),d=null;return}if(v===i.length-1){if(!h)return;d===null?c.push(`M${v+r},${f+r} h1v1H${v+r}z`):c.push(`M${d+r},${f+r} h${v+1-d}v1H${d+r}z`);return}h&&d===null&&(d=v)})}),c.join("")}function Z(l,r){return l.slice().map((c,i)=>i<r.y||i>=r.y+r.h?c:c.map((f,d)=>d<r.x||d>=r.x+r.w?f:!1))}function W(l,r,c,i){if(i==null)return null;const f=c?z:0,d=l.length+f*2,h=Math.floor(r*ue),v=d/r,e=(i.width||h)*v,t=(i.height||h)*v,n=i.x==null?l.length/2-e/2:i.x*v,o=i.y==null?l.length/2-t/2:i.y*v;let s=null;if(i.excavate){let u=Math.floor(n),a=Math.floor(o),E=Math.ceil(e+n-u),g=Math.ceil(t+o-a);s={x:u,y:a,w:E,h:g}}return{x:n,y:o,h:t,w:e,excavation:s}}var de=function(){try{new Path2D().addPath(new Path2D)}catch(l){return!1}return!0}();function X(l){const r=l,{value:c,size:i=$,level:f=H,bgColor:d=j,fgColor:h=Y,includeMargin:v=G,style:e,imageSettings:t}=r,n=F(r,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),o=t==null?void 0:t.src,s=(0,C.useRef)(null),u=(0,C.useRef)(null),[a,E]=(0,C.useState)(!1);(0,C.useEffect)(()=>{if(s.current!=null){const p=s.current,m=p.getContext("2d");if(!m)return;let R=y.QrCode.encodeText(c,U[f]).getModules();const w=v?z:0,I=R.length+w*2,N=W(R,i,v,t),A=u.current,b=N!=null&&A!==null&&A.complete&&A.naturalHeight!==0&&A.naturalWidth!==0;b&&N.excavation!=null&&(R=Z(R,N.excavation));const K=window.devicePixelRatio||1;p.height=p.width=i*K;const _=i/I*K;m.scale(_,_),m.fillStyle=d,m.fillRect(0,0,I,I),m.fillStyle=h,de?m.fill(new Path2D(k(R,w))):R.forEach(function(Ie,Oe){Ie.forEach(function(Be,Le){Be&&m.fillRect(Le+w,Oe+w,1,1)})}),b&&m.drawImage(A,N.x+w,N.y+w,N.w,N.h)}}),(0,C.useEffect)(()=>{E(!1)},[o]);const g=O({height:i,width:i},e);let P=null;return o!=null&&(P=C.createElement("img",{src:o,key:o,style:{display:"none"},onLoad:()=>{E(!0)},ref:u})),C.createElement(C.Fragment,null,C.createElement("canvas",O({style:g,height:i,width:i,ref:s},n)),P)}function V(l){const r=l,{value:c,size:i=$,level:f=H,bgColor:d=j,fgColor:h=Y,includeMargin:v=G,imageSettings:e}=r,t=F(r,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let n=y.QrCode.encodeText(c,U[f]).getModules();const o=v?z:0,s=n.length+o*2,u=W(n,i,v,e);let a=null;e!=null&&u!=null&&(u.excavation!=null&&(n=Z(n,u.excavation)),a=C.createElement("image",{xlinkHref:e.src,height:u.h,width:u.w,x:u.x+o,y:u.y+o,preserveAspectRatio:"none"}));const E=k(n,o);return C.createElement("svg",O({height:i,width:i,viewBox:`0 0 ${s} ${s}`},t),C.createElement("path",{fill:d,d:`M0,0 h${s}v${s}H0z`,shapeRendering:"crispEdges"}),C.createElement("path",{fill:h,d:E,shapeRendering:"crispEdges"}),a)}var Te=l=>{const r=l,{renderAs:c}=r,i=F(r,["renderAs"]);return c==="svg"?React.createElement(V,O({},i)):React.createElement(X,O({},i))},he=M(14726),fe=M(53124),ge=M(10110),me=M(75081),Ee=M(29691),Ce=M(54548),ve=M(10274),Me=M(14747),Re=M(91945),pe=M(45503);const we=l=>{const{componentCls:r,lineWidth:c,lineType:i,colorSplit:f}=l;return{[r]:Object.assign(Object.assign({},(0,Me.Wf)(l)),{display:"flex",justifyContent:"center",alignItems:"center",padding:l.paddingSM,backgroundColor:l.colorWhite,borderRadius:l.borderRadiusLG,border:`${(0,Ce.bf)(c)} ${i} ${f}`,position:"relative",overflow:"hidden",[`& > ${r}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:l.colorText,lineHeight:l.lineHeight,background:l.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${r}-expired, & > ${r}-scanned`]:{color:l.QRCodeTextColor}},"> canvas":{alignSelf:"stretch",flex:"auto",minWidth:0},"&-icon":{marginBlockEnd:l.marginXS,fontSize:l.controlHeight}}),[`${r}-borderless`]:{borderColor:"transparent"}}},Ae=l=>({QRCodeMaskBackgroundColor:new ve.C(l.colorBgContainer).setAlpha(.96).toRgbString()});var Pe=(0,Re.I$)("QRCode",l=>{const r=(0,pe.TS)(l,{QRCodeTextColor:l.colorText});return we(r)},Ae),Ne=l=>{const[,r]=(0,Ee.ZP)(),{value:c,type:i="canvas",icon:f="",size:d=160,iconSize:h=40,color:v=r.colorText,errorLevel:e="M",status:t="active",bordered:n=!0,onRefresh:o,style:s,className:u,rootClassName:a,prefixCls:E,bgColor:g="transparent"}=l,{getPrefixCls:P}=(0,C.useContext)(fe.E_),p=P("qrcode",E),[m,R,w]=Pe(p),N={value:c,size:d,level:e,bgColor:g,fgColor:v,style:{width:void 0,height:void 0},imageSettings:f?{src:f,x:void 0,y:void 0,height:h,width:h,excavate:!0}:void 0},[A]=(0,ge.Z)("QRCode");if(!c)return null;const b=ae()(p,u,a,R,w,{[`${p}-borderless`]:!n});return m(C.createElement("div",{className:b,style:Object.assign(Object.assign({},s),{width:d,height:d,backgroundColor:g})},t!=="active"&&C.createElement("div",{className:`${p}-mask`},t==="loading"&&C.createElement(me.Z,null),t==="expired"&&C.createElement(C.Fragment,null,C.createElement("p",{className:`${p}-expired`},A==null?void 0:A.expired),o&&C.createElement(he.ZP,{type:"link",icon:C.createElement(ie,null),onClick:o},A==null?void 0:A.refresh)),t==="scanned"&&C.createElement("p",{className:`${p}-scanned`},A==null?void 0:A.scanned)),i==="canvas"?C.createElement(X,Object.assign({},N)):C.createElement(V,Object.assign({},N))))},T=M(85893),Se=function(){var r=(0,ee.useModel)("@@initialState"),c=r.initialState,i=c==null?void 0:c.currentUser;return(0,T.jsx)(q._z,{children:(0,T.jsxs)(te.Z,{children:[(0,T.jsx)(Ne,{style:{margin:"auto"},value:(i==null?void 0:i.name)||""}),(0,T.jsx)("p",{style:{textAlign:"center",marginTop:"20px"},children:"\u8BF7\u4F7F\u7528\u6E38\u620Fapp\u626B\u7801\u7ED1\u5B9A\u8BBE\u5907"})]})})},ye=Se}}]);