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
17 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[397],{10397:function(Ne,V,w){w.d(V,{Z:function(){return ve}});var C=w(67294),K=w(87462),J=w(82947),q=w(93771),ee=function(r,u){return C.createElement(q.Z,(0,K.Z)({},r,{ref:u,icon:J.Z}))},te=C.forwardRef(ee),ne=w(93967),oe=w.n(ne),re=Object.defineProperty,b=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,D=(l,r,u)=>r in l?re(l,r,{enumerable:!0,configurable:!0,writable:!0,value:u}):l[r]=u,O=(l,r)=>{for(var u in r||(r={}))F.call(r,u)&&D(l,u,r[u]);if(b)for(var u of b(r))z.call(r,u)&&D(l,u,r[u]);return l},T=(l,r)=>{var u={};for(var i in l)F.call(l,i)&&r.indexOf(i)<0&&(u[i]=l[i]);if(l!=null&&b)for(var i of b(l))r.indexOf(i)<0&&z.call(l,i)&&(u[i]=l[i]);return u};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 c=this.addEccAndInterleave(n);if(this.drawCodewords(c),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)}}h(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,c=!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=M.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])c&&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)}h(g.length==E);const P=r.getNumDataCodewords(a,t)*8;h(g.length<=P),i(0,Math.min(4,P-g.length),g),i(0,(8-g.length%8)%8,g),h(g.length%8==0);for(let m=236;g.length<P;m^=253)i(m,8,g);let v=[];for(;v.length*8<g.length;)v.push(0);return g.forEach((m,R)=>v[R>>>3]|=m<<7-(R&7)),new r(a,t,v,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;h(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;h(t>>>18==0);for(let n=0;n<18;n++){const o=f(t,n),s=this.size-11+n%3,c=Math.floor(n/3);this.setFunctionModule(s,c,o),this.setFunctionModule(c,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)),c=e+o,a=t+n;0<=c&&c<this.size&&0<=a&&a<this.size&&this.setFunctionModule(c,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],c=Math.floor(r.getNumRawDataModules(t)/8),a=o-c%o,E=Math.floor(c/o);let g=[];const P=r.reedSolomonComputeDivisor(s);for(let m=0,R=0;m<o;m++){let p=e.slice(R,R+E-s+(m<a?0:1));R+=p.length;const y=r.reedSolomonComputeRemainder(p,P);m<a&&p.push(0),g.push(p.concat(y))}let v=[];for(let m=0;m<g[0].length;m++)g.forEach((R,p)=>{(m!=E-s||p>=a)&&v.push(R[m])});return h(v.length==c),v}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 c=n-s,E=(n+1&2)==0?this.size-1-o:o;!this.isFunction[E][c]&&t<e.length*8&&(this.modules[E][c]=f(e[t>>>3],7-(t&7)),t++)}}h(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 c=!1,a=0,E=[0,0,0,0,0,0,0];for(let g=0;g<this.size;g++)this.modules[s][g]==c?(a++,a==5?e+=r.PENALTY_N1:a>5&&e++):(this.finderPenaltyAddHistory(a,E),c||(e+=this.finderPenaltyCountPatterns(E)*r.PENALTY_N3),c=this.modules[s][g],a=1);e+=this.finderPenaltyTerminateAndCount(c,a,E)*r.PENALTY_N3}for(let s=0;s<this.size;s++){let c=!1,a=0,E=[0,0,0,0,0,0,0];for(let g=0;g<this.size;g++)this.modules[g][s]==c?(a++,a==5?e+=r.PENALTY_N1:a>5&&e++):(this.finderPenaltyAddHistory(a,E),c||(e+=this.finderPenaltyCountPatterns(E)*r.PENALTY_N3),c=this.modules[g][s],a=1);e+=this.finderPenaltyTerminateAndCount(c,a,E)*r.PENALTY_N3}for(let s=0;s<this.size-1;s++)for(let c=0;c<this.size-1;c++){const a=this.modules[s][c];a==this.modules[s][c+1]&&a==this.modules[s+1][c]&&a==this.modules[s+1][c+1]&&(e+=r.PENALTY_N2)}let t=0;for(const s of this.modules)t=s.reduce((c,a)=>c+(a?1:0),t);const n=this.size*this.size,o=Math.ceil(Math.abs(t*20-n*10)/n)-1;return h(0<=o&&o<=9),e+=o*r.PENALTY_N4,h(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 h(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((c,a)=>n[a]^=r.reedSolomonMultiply(c,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 h(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];h(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 u=r;u.MIN_VERSION=1,u.MAX_VERSION=40,u.PENALTY_N1=3,u.PENALTY_N2=3,u.PENALTY_N3=40,u.PENALTY_N4=10,u.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]],u.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=u;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 h(e){if(!e)throw new Error("Assertion error")}const d=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 d(d.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!d.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 d(d.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!d.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=d.ALPHANUMERIC_CHARSET.indexOf(e.charAt(n))*45;o+=d.ALPHANUMERIC_CHARSET.indexOf(e.charAt(n+1)),i(o,11,t)}return n<e.length&&i(d.ALPHANUMERIC_CHARSET.indexOf(e.charAt(n)),6,t),new d(d.Mode.ALPHANUMERIC,e.length,t)}static makeSegments(e){return e==""?[]:d.isNumeric(e)?[d.makeNumeric(e)]:d.isAlphanumeric(e)?[d.makeAlphanumeric(e)]:[d.makeBytes(d.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 d(d.Mode.ECI,0,t)}static isNumeric(e){return d.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return d.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 M=d;M.NUMERIC_REGEX=/^[0-9]*$/,M.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,M.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",l.QrSegment=M})(S||(S={})),(l=>{let r;(u=>{const i=class{constructor(h,d){this.ordinal=h,this.formatBits=d}};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),u.Ecc=f})(r=l.QrCode||(l.QrCode={}))})(S||(S={})),(l=>{let r;(u=>{const i=class{constructor(h,d){this.modeBits=h,this.numBitsCharCount=d}numCharCountBits(h){return this.numBitsCharCount[Math.floor((h+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]),u.Mode=f})(r=l.QrSegment||(l.QrSegment={}))})(S||(S={}));var I=S;var Q={L:I.QrCode.Ecc.LOW,M:I.QrCode.Ecc.MEDIUM,Q:I.QrCode.Ecc.QUARTILE,H:I.QrCode.Ecc.HIGH},x=128,U="L",$="#FFFFFF",H="#000000",_=!1,B=4,se=.1;function k(l,r=0){const u=[];return l.forEach(function(i,f){let h=null;i.forEach(function(d,M){if(!d&&h!==null){u.push(`M${h+r} ${f+r}h${M-h}v1H${h+r}z`),h=null;return}if(M===i.length-1){if(!d)return;h===null?u.push(`M${M+r},${f+r} h1v1H${M+r}z`):u.push(`M${h+r},${f+r} h${M+1-h}v1H${h+r}z`);return}d&&h===null&&(h=M)})}),u.join("")}function Y(l,r){return l.slice().map((u,i)=>i<r.y||i>=r.y+r.h?u:u.map((f,h)=>h<r.x||h>=r.x+r.w?f:!1))}function j(l,r,u,i){if(i==null)return null;const f=u?B:0,h=l.length+f*2,d=Math.floor(r*se),M=h/r,e=(i.width||d)*M,t=(i.height||d)*M,n=i.x==null?l.length/2-e/2:i.x*M,o=i.y==null?l.length/2-t/2:i.y*M;let s=null;if(i.excavate){let c=Math.floor(n),a=Math.floor(o),E=Math.ceil(e+n-c),g=Math.ceil(t+o-a);s={x:c,y:a,w:E,h:g}}return{x:n,y:o,h:t,w:e,excavation:s}}var ie=function(){try{new Path2D().addPath(new Path2D)}catch(l){return!1}return!0}();function G(l){const r=l,{value:u,size:i=x,level:f=U,bgColor:h=$,fgColor:d=H,includeMargin:M=_,style:e,imageSettings:t}=r,n=T(r,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),o=t==null?void 0:t.src,s=(0,C.useRef)(null),c=(0,C.useRef)(null),[a,E]=(0,C.useState)(!1);(0,C.useEffect)(()=>{if(s.current!=null){const v=s.current,m=v.getContext("2d");if(!m)return;let R=I.QrCode.encodeText(u,Q[f]).getModules();const p=M?B:0,y=R.length+p*2,N=j(R,i,M,t),A=c.current,L=N!=null&&A!==null&&A.complete&&A.naturalHeight!==0&&A.naturalWidth!==0;L&&N.excavation!=null&&(R=Y(R,N.excavation));const X=window.devicePixelRatio||1;v.height=v.width=i*X;const Z=i/y*X;m.scale(Z,Z),m.fillStyle=h,m.fillRect(0,0,y,y),m.fillStyle=d,ie?m.fill(new Path2D(k(R,p))):R.forEach(function(we,pe){we.forEach(function(Ae,Pe){Ae&&m.fillRect(Pe+p,pe+p,1,1)})}),L&&m.drawImage(A,N.x+p,N.y+p,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:c})),C.createElement(C.Fragment,null,C.createElement("canvas",O({style:g,height:i,width:i,ref:s},n)),P)}function W(l){const r=l,{value:u,size:i=x,level:f=U,bgColor:h=$,fgColor:d=H,includeMargin:M=_,imageSettings:e}=r,t=T(r,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]);let n=I.QrCode.encodeText(u,Q[f]).getModules();const o=M?B:0,s=n.length+o*2,c=j(n,i,M,e);let a=null;e!=null&&c!=null&&(c.excavation!=null&&(n=Y(n,c.excavation)),a=C.createElement("image",{xlinkHref:e.src,height:c.h,width:c.w,x:c.x+o,y:c.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:h,d:`M0,0 h${s}v${s}H0z`,shapeRendering:"crispEdges"}),C.createElement("path",{fill:d,d:E,shapeRendering:"crispEdges"}),a)}var Se=l=>{const r=l,{renderAs:u}=r,i=T(r,["renderAs"]);return u==="svg"?React.createElement(W,O({},i)):React.createElement(G,O({},i))},le=w(14726),ae=w(53124),ce=w(10110),ue=w(75081),he=w(29691),de=w(54548),fe=w(10274),ge=w(14747),me=w(91945),Ee=w(45503);const Ce=l=>{const{componentCls:r,lineWidth:u,lineType:i,colorSplit:f}=l;return{[r]:Object.assign(Object.assign({},(0,ge.Wf)(l)),{display:"flex",justifyContent:"center",alignItems:"center",padding:l.paddingSM,backgroundColor:l.colorWhite,borderRadius:l.borderRadiusLG,border:`${(0,de.bf)(u)} ${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"}}},Me=l=>({QRCodeMaskBackgroundColor:new fe.C(l.colorBgContainer).setAlpha(.96).toRgbString()});var Re=(0,me.I$)("QRCode",l=>{const r=(0,Ee.TS)(l,{QRCodeTextColor:l.colorText});return Ce(r)},Me),ve=l=>{const[,r]=(0,he.ZP)(),{value:u,type:i="canvas",icon:f="",size:h=160,iconSize:d=40,color:M=r.colorText,errorLevel:e="M",status:t="active",bordered:n=!0,onRefresh:o,style:s,className:c,rootClassName:a,prefixCls:E,bgColor:g="transparent"}=l,{getPrefixCls:P}=(0,C.useContext)(ae.E_),v=P("qrcode",E),[m,R,p]=Re(v),N={value:u,size:h,level:e,bgColor:g,fgColor:M,style:{width:void 0,height:void 0},imageSettings:f?{src:f,x:void 0,y:void 0,height:d,width:d,excavate:!0}:void 0},[A]=(0,ce.Z)("QRCode");if(!u)return null;const L=oe()(v,c,a,R,p,{[`${v}-borderless`]:!n});return m(C.createElement("div",{className:L,style:Object.assign(Object.assign({},s),{width:h,height:h,backgroundColor:g})},t!=="active"&&C.createElement("div",{className:`${v}-mask`},t==="loading"&&C.createElement(ue.Z,null),t==="expired"&&C.createElement(C.Fragment,null,C.createElement("p",{className:`${v}-expired`},A==null?void 0:A.expired),o&&C.createElement(le.ZP,{type:"link",icon:C.createElement(te,null),onClick:o},A==null?void 0:A.refresh)),t==="scanned"&&C.createElement("p",{className:`${v}-scanned`},A==null?void 0:A.scanned)),i==="canvas"?C.createElement(G,Object.assign({},N)):C.createElement(W,Object.assign({},N))))}}}]);