vendor: 16,218 bytes, line 1
1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1508],{71508:function(e,t,r){r.d(t,{t:function(){return N}});var n,i,o=r(67294),l=Object.defineProperty,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,u=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,c=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&u(e,r,t[r]);if(s)for(var r of s(t))h.call(t,r)&&u(e,r,t[r]);return e},d=(e,t)=>{var r={};for(var n in e)a.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&s)for(var n of s(e))0>t.indexOf(n)&&h.call(e,n)&&(r[n]=e[n]);return r};(e=>{let t=class t{constructor(e,r,n,o){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version value out of range");if(o<-1||o>7)throw RangeError("Mask value out of range");this.size=4*e+17;let l=[];for(let s=0;s<this.size;s++)l.push(!1);for(let a=0;a<this.size;a++)this.modules.push(l.slice()),this.isFunction.push(l.slice());this.drawFunctionPatterns();let h=this.addEccAndInterleave(n);if(this.drawCodewords(h),-1==o){let u=1e9;for(let c=0;c<8;c++){this.applyMask(c),this.drawFormatBits(c);let d=this.getPenaltyScore();d<u&&(o=c,u=d),this.applyMask(c)}}i(0<=o&&o<=7),this.mask=o,this.applyMask(o),this.drawFormatBits(o),this.isFunction=[]}static encodeText(r,n){let i=e.QrSegment.makeSegments(r);return t.encodeSegments(i,n)}static encodeBinary(r,n){let i=e.QrSegment.makeBytes(r);return t.encodeSegments([i],n)}static encodeSegments(e,n,o=1,s=40,a=-1,h=!0){if(!(t.MIN_VERSION<=o&&o<=s&&s<=t.MAX_VERSION)||a<-1||a>7)throw RangeError("Invalid value");let u,c;for(u=o;;u++){let d=8*t.getNumDataCodewords(u,n),f=l.getTotalBits(e,u);if(f<=d){c=f;break}if(u>=s)throw RangeError("Data too long")}for(let m of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])h&&c<=8*t.getNumDataCodewords(u,m)&&(n=m);let g=[];for(let E of e)for(let M of(r(E.mode.modeBits,4,g),r(E.numChars,E.mode.numCharCountBits(u),g),E.getData()))g.push(M);i(g.length==c);let C=8*t.getNumDataCodewords(u,n);i(g.length<=C),r(0,Math.min(4,C-g.length),g),r(0,(8-g.length%8)%8,g),i(g.length%8==0);for(let R=236;g.length<C;R^=253)r(R,8,g);let w=[];for(;8*w.length<g.length;)w.push(0);return g.forEach((e,t)=>w[t>>>3]|=e<<7-(7&t)),new t(u,n,w,a)}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 e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let t=this.getAlignmentPatternPositions(),r=t.length;for(let n=0;n<r;n++)for(let i=0;i<r;i++)0==n&&0==i||0==n&&i==r-1||n==r-1&&0==i||this.drawAlignmentPattern(t[n],t[i]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,r=t;for(let o=0;o<10;o++)r=r<<1^(r>>>9)*1335;let l=(t<<10|r)^21522;i(l>>>15==0);for(let s=0;s<=5;s++)this.setFunctionModule(8,s,n(l,s));this.setFunctionModule(8,7,n(l,6)),this.setFunctionModule(8,8,n(l,7)),this.setFunctionModule(7,8,n(l,8));for(let a=9;a<15;a++)this.setFunctionModule(14-a,8,n(l,a));for(let h=0;h<8;h++)this.setFunctionModule(this.size-1-h,8,n(l,h));for(let u=8;u<15;u++)this.setFunctionModule(8,this.size-15+u,n(l,u));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let r=this.version<<12|e;i(r>>>18==0);for(let o=0;o<18;o++){let l=n(r,o),s=this.size-11+o%3,a=Math.floor(o/3);this.setFunctionModule(s,a,l),this.setFunctionModule(a,s,l)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){let i=Math.max(Math.abs(n),Math.abs(r)),o=e+n,l=t+r;0<=o&&o<this.size&&0<=l&&l<this.size&&this.setFunctionModule(o,l,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){let r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw RangeError("Invalid argument");let o=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],l=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],s=Math.floor(t.getNumRawDataModules(r)/8),a=o-s%o,h=Math.floor(s/o),u=[],c=t.reedSolomonComputeDivisor(l);for(let d=0,f=0;d<o;d++){let m=e.slice(f,f+h-l+(d<a?0:1));f+=m.length;let g=t.reedSolomonComputeRemainder(m,c);d<a&&m.push(0),u.push(m.concat(g))}let E=[];for(let M=0;M<u[0].length;M++)u.forEach((e,t)=>{(M!=h-l||t>=a)&&E.push(e[M])});return i(E.length==s),E}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError("Invalid argument");let r=0;for(let o=this.size-1;o>=1;o-=2){6==o&&(o=5);for(let l=0;l<this.size;l++)for(let s=0;s<2;s++){let a=o-s,h=(o+1&2)==0,u=h?this.size-1-l:l;!this.isFunction[u][a]&&r<8*e.length&&(this.modules[u][a]=n(e[r>>>3],7-(7&r)),r++)}}i(r==8*e.length)}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let n=!1,o=0,l=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[r][s]==n?5==++o?e+=t.PENALTY_N1:o>5&&e++:(this.finderPenaltyAddHistory(o,l),n||(e+=this.finderPenaltyCountPatterns(l)*t.PENALTY_N3),n=this.modules[r][s],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,l)*t.PENALTY_N3}for(let a=0;a<this.size;a++){let h=!1,u=0,c=[0,0,0,0,0,0,0];for(let d=0;d<this.size;d++)this.modules[d][a]==h?5==++u?e+=t.PENALTY_N1:u>5&&e++:(this.finderPenaltyAddHistory(u,c),h||(e+=this.finderPenaltyCountPatterns(c)*t.PENALTY_N3),h=this.modules[d][a],u=1);e+=this.finderPenaltyTerminateAndCount(h,u,c)*t.PENALTY_N3}for(let f=0;f<this.size-1;f++)for(let m=0;m<this.size-1;m++){let g=this.modules[f][m];g==this.modules[f][m+1]&&g==this.modules[f+1][m]&&g==this.modules[f+1][m+1]&&(e+=t.PENALTY_N2)}let E=0;for(let M of this.modules)E=M.reduce((e,t)=>e+(t?1:0),E);let C=this.size*this.size,R=Math.ceil(Math.abs(20*E-10*C)/C)-1;return i(0<=R&&R<=9),i(0<=(e+=R*t.PENALTY_N4)&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{let e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){let n=Math.floor(e/7)+2;r-=(25*n-10)*n-55,e>=7&&(r-=36)}return i(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError("Degree out of range");let r=[];for(let n=0;n<e-1;n++)r.push(0);r.push(1);let i=1;for(let o=0;o<e;o++){for(let l=0;l<r.length;l++)r[l]=t.reedSolomonMultiply(r[l],i),l+1<r.length&&(r[l]^=r[l+1]);i=t.reedSolomonMultiply(i,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map(e=>0);for(let i of e){let o=i^n.shift();n.push(0),r.forEach((e,r)=>n[r]^=t.reedSolomonMultiply(e,o))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285,r^=(t>>>n&1)*e;return i(r>>>8==0),r}finderPenaltyCountPatterns(e){let t=e[1];i(t<=3*this.size);let r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function r(e,t,r){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function n(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.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]],t.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]],e.QrCode=t;let o=class e{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let n=[];for(let i of t)r(i,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError("String contains non-numeric characters");let n=[];for(let i=0;i<t.length;){let o=Math.min(t.length-i,3);r(parseInt(t.substring(i,i+o),10),3*o+1,n),i+=o}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw RangeError("String contains unencodable characters in alphanumeric mode");let n=[],i;for(i=0;i+2<=t.length;i+=2){let o=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i));r(o+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i+1)),11,n)}return i<t.length&&r(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(i)),6,n),new e(e.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw RangeError("ECI assignment value out of range");if(t<128)r(t,8,n);else if(t<16384)r(2,2,n),r(t,14,n);else if(t<1e6)r(6,3,n),r(t,21,n);else throw RangeError("ECI assignment value out of range");return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(let n of e){let i=n.mode.numCharCountBits(t);if(n.numChars>=1<<i)return 1/0;r+=4+i+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substring(r+1,r+3),16)),r+=2);return t}};o.NUMERIC_REGEX=/^[0-9]*$/,o.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,o.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let l=o;e.QrSegment=o})(n||(n={})),(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})((i=n||(n={})).QrCode||(i.QrCode={})),(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})((w=n||(n={})).QrSegment||(w.QrSegment={}));var f=n,m={L:f.QrCode.Ecc.LOW,M:f.QrCode.Ecc.MEDIUM,Q:f.QrCode.Ecc.QUARTILE,H:f.QrCode.Ecc.HIGH},g="#FFFFFF",E="#000000";function M(e,t=0){let r=[];return e.forEach(function(e,n){let i=null;e.forEach(function(o,l){if(!o&&null!==i){r.push(`M${i+t} ${n+t}h${l-i}v1H${i+t}z`),i=null;return}if(l===e.length-1){if(!o)return;null===i?r.push(`M${l+t},${n+t} h1v1H${l+t}z`):r.push(`M${i+t},${n+t} h${l+1-i}v1H${i+t}z`);return}o&&null===i&&(i=l)})}),r.join("")}function C(e,t){return e.slice().map((e,r)=>r<t.y||r>=t.y+t.h?e:e.map((e,r)=>(r<t.x||r>=t.x+t.w)&&e))}function R({value:e,level:t,minVersion:r,includeMargin:n,marginSize:i,imageSettings:l,size:s,boostLevel:a}){let h=o.useMemo(()=>{let n=Array.isArray(e)?e:[e],i=n.reduce((e,t)=>(e.push(...f.QrSegment.makeSegments(t)),e),[]);return f.QrCode.encodeSegments(i,m[t],r,void 0,void 0,a)},[e,t,r,a]),{cells:u,margin:c,numCells:d,calculatedImageSettings:g}=o.useMemo(()=>{var e,t;let r=h.getModules(),o=null!=i?Math.max(Math.floor(i),0):n?4:0,a=r.length+2*o,u=function(e,t,r,n){if(null==n)return null;let i=e.length+2*r,o=Math.floor(.1*t),l=i/t,s=(n.width||o)*l,a=(n.height||o)*l,h=null==n.x?e.length/2-s/2:n.x*l,u=null==n.y?e.length/2-a/2:n.y*l,c=null==n.opacity?1:n.opacity,d=null;if(n.excavate){let f=Math.floor(h),m=Math.floor(u);d={x:f,y:m,w:Math.ceil(s+h-f),h:Math.ceil(a+u-m)}}let g=n.crossOrigin;return{x:h,y:u,h:a,w:s,excavation:d,opacity:c,crossOrigin:g}}(r,s,o,l);return{cells:r,margin:o,numCells:a,calculatedImageSettings:u}},[h,s,l,n,i]);return{qrcode:h,margin:c,cells:u,numCells:d,calculatedImageSettings:g}}var w,p=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}();o.forwardRef(function(e,t){let{value:r,size:n=128,level:i="L",bgColor:l=g,fgColor:s=E,includeMargin:a=!1,minVersion:h=1,boostLevel:u,marginSize:f,imageSettings:m}=e,w=d(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:N}=w,A=d(w,["style"]),y=null==m?void 0:m.src,v=o.useRef(null),P=o.useRef(null),I=o.useCallback(e=>{v.current=e,"function"==typeof t?t(e):t&&(t.current=e)},[t]),[S,_]=o.useState(!1),{margin:O,cells:L,numCells:b,calculatedImageSettings:z}=R({value:r,level:i,minVersion:h,boostLevel:u,includeMargin:a,marginSize:f,imageSettings:m,size:n});o.useEffect(()=>{if(null!=v.current){let e=v.current,t=e.getContext("2d");if(!t)return;let r=L,i=P.current,o=null!=z&&null!==i&&i.complete&&0!==i.naturalHeight&&0!==i.naturalWidth;o&&null!=z.excavation&&(r=C(L,z.excavation));let a=window.devicePixelRatio||1;e.height=e.width=n*a;let h=n/b*a;t.scale(h,h),t.fillStyle=l,t.fillRect(0,0,b,b),t.fillStyle=s,p?t.fill(new Path2D(M(r,O))):L.forEach(function(e,r){e.forEach(function(e,n){e&&t.fillRect(n+O,r+O,1,1)})}),z&&(t.globalAlpha=z.opacity),o&&t.drawImage(i,z.x+O,z.y+O,z.w,z.h)}}),o.useEffect(()=>{_(!1)},[y]);let F=c({height:n,width:n},N),k=null;return null!=y&&(k=o.createElement("img",{src:y,key:y,style:{display:"none"},onLoad(){_(!0)},ref:P,crossOrigin:null==z?void 0:z.crossOrigin})),o.createElement(o.Fragment,null,o.createElement("canvas",c({style:F,height:n,width:n,ref:I,role:"img"},A)),k)}).displayName="QRCodeCanvas";var N=o.forwardRef(function(e,t){let{value:r,size:n=128,level:i="L",bgColor:l=g,fgColor:s=E,includeMargin:a=!1,minVersion:h=1,boostLevel:u,title:f,marginSize:m,imageSettings:w}=e,p=d(e,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:N,cells:A,numCells:y,calculatedImageSettings:v}=R({value:r,level:i,minVersion:h,boostLevel:u,includeMargin:a,marginSize:m,imageSettings:w,size:n}),P=A,I=null;null!=w&&null!=v&&(null!=v.excavation&&(P=C(A,v.excavation)),I=o.createElement("image",{href:w.src,height:v.h,width:v.w,x:v.x+N,y:v.y+N,preserveAspectRatio:"none",opacity:v.opacity,crossOrigin:v.crossOrigin}));let S=M(P,N);return o.createElement("svg",c({height:n,width:n,viewBox:`0 0 ${y} ${y}`,ref:t,role:"img"},p),!!f&&o.createElement("title",null,f),o.createElement("path",{fill:l,d:`M0,0 h${y}v${y}H0z`,shapeRendering:"crispEdges"}),o.createElement("path",{fill:s,d:S,shapeRendering:"crispEdges"}),I)});N.displayName="QRCodeSVG"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.