From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <w.bumiller@proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id CB12D7E517 for <pve-devel@lists.proxmox.com>; Wed, 10 Nov 2021 13:49:42 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BA0AB1C0C8 for <pve-devel@lists.proxmox.com>; Wed, 10 Nov 2021 13:49:12 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 6AB681C06A for <pve-devel@lists.proxmox.com>; Wed, 10 Nov 2021 13:49:08 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 219DA44BAF for <pve-devel@lists.proxmox.com>; Wed, 10 Nov 2021 13:49:08 +0100 (CET) From: Wolfgang Bumiller <w.bumiller@proxmox.com> To: pve-devel@lists.proxmox.com Date: Wed, 10 Nov 2021 13:49:04 +0100 Message-Id: <20211110124904.164053-6-w.bumiller@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211110124904.164053-1-w.bumiller@proxmox.com> References: <20211110124904.164053-1-w.bumiller@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.380 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_SHORT 0.001 Use of a URL Shortener for very short URL PROLO_LEO1 0.1 Meta Catches all Leo drug variations so far PROLO_LEO3 0.1 Meta Catches all Leo drug variations so far SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [pveproxy.pm] Subject: [pve-devel] [PATCH manager] depend on and use libjs-qrcodejs X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> X-List-Received-Date: Wed, 10 Nov 2021 12:49:42 -0000 Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> --- PVE/Service/pveproxy.pm | 3 +++ debian/control | 1 + www/Makefile | 1 - www/index.html.tpl | 2 +- www/qrcode.min.js | 1 - 5 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 www/qrcode.min.js diff --git a/PVE/Service/pveproxy.pm b/PVE/Service/pveproxy.pm index d10c4fe9..31493dbf 100755 --- a/PVE/Service/pveproxy.pm +++ b/PVE/Service/pveproxy.pm @@ -120,6 +120,9 @@ sub init { '/proxmoxlib.js' =3D> { file =3D> "$basedirs->{widgettoolkit}/proxmoxlib.js", }, + '/qrcode.min.js' =3D> { + file =3D> '/usr/share/javascript/qrcodejs/qrcode.min.js', + }, }, dirs =3D> $dirs, }; diff --git a/debian/control b/debian/control index 04865acf..259043b4 100644 --- a/debian/control +++ b/debian/control @@ -45,6 +45,7 @@ Depends: apt-transport-https | apt (>=3D 1.5~), libfile-readbackwards-perl, libfilesys-df-perl, libjs-extjs (>=3D 7.0.0), + libjs-qrcodejs (>=3D 1.20201119), libjson-perl, liblwp-protocol-https-perl, libnet-dns-perl, diff --git a/www/Makefile b/www/Makefile index 639ad4b4..84abd027 100644 --- a/www/Makefile +++ b/www/Makefile @@ -9,7 +9,6 @@ install: install -m 0644 index.html.tpl ${WWWBASEDIR} install -d ${WWWJSDIR} install -m 0644 u2f-api.js ${WWWJSDIR} - install -m 0644 qrcode.min.js ${WWWJSDIR} =20 .PHONY: check check: diff --git a/www/index.html.tpl b/www/index.html.tpl index 7f07ea18..92491618 100644 --- a/www/index.html.tpl +++ b/www/index.html.tpl @@ -25,7 +25,7 @@ <script type=3D"text/javascript" src=3D"/pve2/ext6/charts.js?ver=3D7.0= .0"></script> [% END %] <script type=3D"text/javascript" src=3D"/pve2/js/u2f-api.js"></script> - <script type=3D"text/javascript" src=3D"/pve2/js/qrcode.min.js"></scri= pt> + <script type=3D"text/javascript" src=3D"/qrcode.min.js"></script> <script type=3D"text/javascript"> Proxmox =3D { Setup: { auth_cookie_name: 'PVEAuthCookie' }, diff --git a/www/qrcode.min.js b/www/qrcode.min.js deleted file mode 100644 index 993e88f3..00000000 --- a/www/qrcode.min.js +++ /dev/null @@ -1 +0,0 @@ -var QRCode;!function(){function a(a){this.mode=3Dc.MODE_8BIT_BYTE,this.dat= a=3Da,this.parsedData=3D[];for(var b=3D[],d=3D0,e=3Dthis.data.length;e>d;d+= +){var f=3Dthis.data.charCodeAt(d);f>65536?(b[0]=3D240|(1835008&f)>>>18,b[1= ]=3D128|(258048&f)>>>12,b[2]=3D128|(4032&f)>>>6,b[3]=3D128|63&f):f>2048?(b[= 0]=3D224|(61440&f)>>>12,b[1]=3D128|(4032&f)>>>6,b[2]=3D128|63&f):f>128?(b[0= ]=3D192|(1984&f)>>>6,b[1]=3D128|63&f):b[0]=3Df,this.parsedData=3Dthis.parse= dData.concat(b)}this.parsedData.length!=3Dthis.data.length&&(this.parsedDat= a.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}f= unction b(a,b){this.typeNumber=3Da,this.errorCorrectLevel=3Db,this.modules= =3Dnull,this.moduleCount=3D0,this.dataCache=3Dnull,this.dataList=3D[]}funct= ion i(a,b){if(void 0=3D=3Da.length)throw new Error(a.length+"/"+b);for(var = c=3D0;c<a.length&&0=3D=3Da[c];)c++;this.num=3Dnew Array(a.length-c+b);for(v= ar d=3D0;d<a.length-c;d++)this.num[d]=3Da[d+c]}function j(a,b){this.totalCo= unt=3Da,this.dataCount=3Db}function k(){this.buffer=3D[],this.length=3D0}fu= nction m(){return"undefined"!=3Dtypeof CanvasRenderingContext2D}function n(= ){var a=3D!1,b=3Dnavigator.userAgent;return/android/i.test(b)&&(a=3D!0,aMat= =3Db.toString().match(/android ([0-9]\.[0-9])/i),aMat&&aMat[1]&&(a=3DparseF= loat(aMat[1]))),a}function r(a,b){for(var c=3D1,e=3Ds(a),f=3D0,g=3Dl.length= ;g>=3Df;f++){var h=3D0;switch(b){case d.L:h=3Dl[f][0];break;case d.M:h=3Dl[= f][1];break;case d.Q:h=3Dl[f][2];break;case d.H:h=3Dl[f][3]}if(h>=3De)break= ;c++}if(c>l.length)throw new Error("Too long data");return c}function s(a){= var b=3DencodeURI(a).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return b.l= ength+(b.length!=3Da?3:0)}a.prototype=3D{getLength:function(){return this.p= arsedData.length},write:function(a){for(var b=3D0,c=3Dthis.parsedData.lengt= h;c>b;b++)a.put(this.parsedData[b],8)}},b.prototype=3D{addData:function(b){= var c=3Dnew a(b);this.dataList.push(c),this.dataCache=3Dnull},isDark:functi= on(a,b){if(0>a||this.moduleCount<=3Da||0>b||this.moduleCount<=3Db)throw new= Error(a+","+b);return this.modules[a][b]},getModuleCount:function(){return= this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern= ())},makeImpl:function(a,c){this.moduleCount=3D4*this.typeNumber+17,this.mo= dules=3Dnew Array(this.moduleCount);for(var d=3D0;d<this.moduleCount;d++){t= his.modules[d]=3Dnew Array(this.moduleCount);for(var e=3D0;e<this.moduleCou= nt;e++)this.modules[d][e]=3Dnull}this.setupPositionProbePattern(0,0),this.s= etupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePatte= rn(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTiming= Pattern(),this.setupTypeInfo(a,c),this.typeNumber>=3D7&&this.setupTypeNumbe= r(a),null=3D=3Dthis.dataCache&&(this.dataCache=3Db.createData(this.typeNumb= er,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,c)},s= etupPositionProbePattern:function(a,b){for(var c=3D-1;7>=3Dc;c++)if(!(-1>= =3Da+c||this.moduleCount<=3Da+c))for(var d=3D-1;7>=3Dd;d++)-1>=3Db+d||this.= moduleCount<=3Db+d||(this.modules[a+c][b+d]=3Dc>=3D0&&6>=3Dc&&(0=3D=3Dd||6= =3D=3Dd)||d>=3D0&&6>=3Dd&&(0=3D=3Dc||6=3D=3Dc)||c>=3D2&&4>=3Dc&&d>=3D2&&4>= =3Dd?!0:!1)},getBestMaskPattern:function(){for(var a=3D0,b=3D0,c=3D0;8>c;c+= +){this.makeImpl(!0,c);var d=3Df.getLostPoint(this);(0=3D=3Dc||a>d)&&(a=3Dd= ,b=3Dc)}return b},createMovieClip:function(a,b,c){var d=3Da.createEmptyMovi= eClip(b,c),e=3D1;this.make();for(var f=3D0;f<this.modules.length;f++)for(va= r g=3Df*e,h=3D0;h<this.modules[f].length;h++){var i=3Dh*e,j=3Dthis.modules[= f][h];j&&(d.beginFill(0,100),d.moveTo(i,g),d.lineTo(i+e,g),d.lineTo(i+e,g+e= ),d.lineTo(i,g+e),d.endFill())}return d},setupTimingPattern:function(){for(= var a=3D8;a<this.moduleCount-8;a++)null=3D=3Dthis.modules[a][6]&&(this.modu= les[a][6]=3D0=3D=3Da%2);for(var b=3D8;b<this.moduleCount-8;b++)null=3D=3Dth= is.modules[6][b]&&(this.modules[6][b]=3D0=3D=3Db%2)},setupPositionAdjustPat= tern:function(){for(var a=3Df.getPatternPosition(this.typeNumber),b=3D0;b<a= .length;b++)for(var c=3D0;c<a.length;c++){var d=3Da[b],e=3Da[c];if(null=3D= =3Dthis.modules[d][e])for(var g=3D-2;2>=3Dg;g++)for(var h=3D-2;2>=3Dh;h++)t= his.modules[d+g][e+h]=3D-2=3D=3Dg||2=3D=3Dg||-2=3D=3Dh||2=3D=3Dh||0=3D=3Dg&= &0=3D=3Dh?!0:!1}},setupTypeNumber:function(a){for(var b=3Df.getBCHTypeNumbe= r(this.typeNumber),c=3D0;18>c;c++){var d=3D!a&&1=3D=3D(1&b>>c);this.modules= [Math.floor(c/3)][c%3+this.moduleCount-8-3]=3Dd}for(var c=3D0;18>c;c++){var= d=3D!a&&1=3D=3D(1&b>>c);this.modules[c%3+this.moduleCount-8-3][Math.floor(= c/3)]=3Dd}},setupTypeInfo:function(a,b){for(var c=3Dthis.errorCorrectLevel<= <3|b,d=3Df.getBCHTypeInfo(c),e=3D0;15>e;e++){var g=3D!a&&1=3D=3D(1&d>>e);6>= e?this.modules[e][8]=3Dg:8>e?this.modules[e+1][8]=3Dg:this.modules[this.mod= uleCount-15+e][8]=3Dg}for(var e=3D0;15>e;e++){var g=3D!a&&1=3D=3D(1&d>>e);8= >e?this.modules[8][this.moduleCount-e-1]=3Dg:9>e?this.modules[8][15-e-1+1]= =3Dg:this.modules[8][15-e-1]=3Dg}this.modules[this.moduleCount-8][8]=3D!a},= mapData:function(a,b){for(var c=3D-1,d=3Dthis.moduleCount-1,e=3D7,g=3D0,h= =3Dthis.moduleCount-1;h>0;h-=3D2)for(6=3D=3Dh&&h--;;){for(var i=3D0;2>i;i++= )if(null=3D=3Dthis.modules[d][h-i]){var j=3D!1;g<a.length&&(j=3D1=3D=3D(1&a= [g]>>>e));var k=3Df.getMask(b,d,h-i);k&&(j=3D!j),this.modules[d][h-i]=3Dj,e= --,-1=3D=3De&&(g++,e=3D7)}if(d+=3Dc,0>d||this.moduleCount<=3Dd){d-=3Dc,c=3D= -c;break}}}},b.PAD0=3D236,b.PAD1=3D17,b.createData=3Dfunction(a,c,d){for(va= r e=3Dj.getRSBlocks(a,c),g=3Dnew k,h=3D0;h<d.length;h++){var i=3Dd[h];g.put= (i.mode,4),g.put(i.getLength(),f.getLengthInBits(i.mode,a)),i.write(g)}for(= var l=3D0,h=3D0;h<e.length;h++)l+=3De[h].dataCount;if(g.getLengthInBits()>8= *l)throw new Error("code length overflow. ("+g.getLengthInBits()+">"+8*l+")= ");for(g.getLengthInBits()+4<=3D8*l&&g.put(0,4);0!=3Dg.getLengthInBits()%8;= )g.putBit(!1);for(;;){if(g.getLengthInBits()>=3D8*l)break;if(g.put(b.PAD0,8= ),g.getLengthInBits()>=3D8*l)break;g.put(b.PAD1,8)}return b.createBytes(g,e= )},b.createBytes=3Dfunction(a,b){for(var c=3D0,d=3D0,e=3D0,g=3Dnew Array(b.= length),h=3Dnew Array(b.length),j=3D0;j<b.length;j++){var k=3Db[j].dataCoun= t,l=3Db[j].totalCount-k;d=3DMath.max(d,k),e=3DMath.max(e,l),g[j]=3Dnew Arra= y(k);for(var m=3D0;m<g[j].length;m++)g[j][m]=3D255&a.buffer[m+c];c+=3Dk;var= n=3Df.getErrorCorrectPolynomial(l),o=3Dnew i(g[j],n.getLength()-1),p=3Do.m= od(n);h[j]=3Dnew Array(n.getLength()-1);for(var m=3D0;m<h[j].length;m++){va= r q=3Dm+p.getLength()-h[j].length;h[j][m]=3Dq>=3D0?p.get(q):0}}for(var r=3D= 0,m=3D0;m<b.length;m++)r+=3Db[m].totalCount;for(var s=3Dnew Array(r),t=3D0,= m=3D0;d>m;m++)for(var j=3D0;j<b.length;j++)m<g[j].length&&(s[t++]=3Dg[j][m]= );for(var m=3D0;e>m;m++)for(var j=3D0;j<b.length;j++)m<h[j].length&&(s[t++]= =3Dh[j][m]);return s};for(var c=3D{MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT= _BYTE:4,MODE_KANJI:8},d=3D{L:1,M:0,Q:3,H:2},e=3D{PATTERN000:0,PATTERN001:1,= PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111= :7},f=3D{PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,2= 2,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,= 66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,= 62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6= ,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,= 54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,13= 8],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24= ,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26= ,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21= 522,getBCHTypeInfo:function(a){for(var b=3Da<<10;f.getBCHDigit(b)-f.getBCHD= igit(f.G15)>=3D0;)b^=3Df.G15<<f.getBCHDigit(b)-f.getBCHDigit(f.G15);return(= a<<10|b)^f.G15_MASK},getBCHTypeNumber:function(a){for(var b=3Da<<12;f.getBC= HDigit(b)-f.getBCHDigit(f.G18)>=3D0;)b^=3Df.G18<<f.getBCHDigit(b)-f.getBCHD= igit(f.G18);return a<<12|b},getBCHDigit:function(a){for(var b=3D0;0!=3Da;)b= ++,a>>>=3D1;return b},getPatternPosition:function(a){return f.PATTERN_POSIT= ION_TABLE[a-1]},getMask:function(a,b,c){switch(a){case e.PATTERN000:return = 0=3D=3D(b+c)%2;case e.PATTERN001:return 0=3D=3Db%2;case e.PATTERN010:return= 0=3D=3Dc%3;case e.PATTERN011:return 0=3D=3D(b+c)%3;case e.PATTERN100:retur= n 0=3D=3D(Math.floor(b/2)+Math.floor(c/3))%2;case e.PATTERN101:return 0=3D= =3Db*c%2+b*c%3;case e.PATTERN110:return 0=3D=3D(b*c%2+b*c%3)%2;case e.PATTE= RN111:return 0=3D=3D(b*c%3+(b+c)%2)%2;default:throw new Error("bad maskPatt= ern:"+a)}},getErrorCorrectPolynomial:function(a){for(var b=3Dnew i([1],0),c= =3D0;a>c;c++)b=3Db.multiply(new i([1,g.gexp(c)],0));return b},getLengthInBi= ts:function(a,b){if(b>=3D1&&10>b)switch(a){case c.MODE_NUMBER:return 10;cas= e c.MODE_ALPHA_NUM:return 9;case c.MODE_8BIT_BYTE:return 8;case c.MODE_KANJ= I:return 8;default:throw new Error("mode:"+a)}else if(27>b)switch(a){case c= .MODE_NUMBER:return 12;case c.MODE_ALPHA_NUM:return 11;case c.MODE_8BIT_BYT= E:return 16;case c.MODE_KANJI:return 10;default:throw new Error("mode:"+a)}= else{if(!(41>b))throw new Error("type:"+b);switch(a){case c.MODE_NUMBER:ret= urn 14;case c.MODE_ALPHA_NUM:return 13;case c.MODE_8BIT_BYTE:return 16;case= c.MODE_KANJI:return 12;default:throw new Error("mode:"+a)}}},getLostPoint:= function(a){for(var b=3Da.getModuleCount(),c=3D0,d=3D0;b>d;d++)for(var e=3D= 0;b>e;e++){for(var f=3D0,g=3Da.isDark(d,e),h=3D-1;1>=3Dh;h++)if(!(0>d+h||d+= h>=3Db))for(var i=3D-1;1>=3Di;i++)0>e+i||e+i>=3Db||(0!=3Dh||0!=3Di)&&g=3D= =3Da.isDark(d+h,e+i)&&f++;f>5&&(c+=3D3+f-5)}for(var d=3D0;b-1>d;d++)for(var= e=3D0;b-1>e;e++){var j=3D0;a.isDark(d,e)&&j++,a.isDark(d+1,e)&&j++,a.isDar= k(d,e+1)&&j++,a.isDark(d+1,e+1)&&j++,(0=3D=3Dj||4=3D=3Dj)&&(c+=3D3)}for(var= d=3D0;b>d;d++)for(var e=3D0;b-6>e;e++)a.isDark(d,e)&&!a.isDark(d,e+1)&&a.i= sDark(d,e+2)&&a.isDark(d,e+3)&&a.isDark(d,e+4)&&!a.isDark(d,e+5)&&a.isDark(= d,e+6)&&(c+=3D40);for(var e=3D0;b>e;e++)for(var d=3D0;b-6>d;d++)a.isDark(d,= e)&&!a.isDark(d+1,e)&&a.isDark(d+2,e)&&a.isDark(d+3,e)&&a.isDark(d+4,e)&&!a= .isDark(d+5,e)&&a.isDark(d+6,e)&&(c+=3D40);for(var k=3D0,e=3D0;b>e;e++)for(= var d=3D0;b>d;d++)a.isDark(d,e)&&k++;var l=3DMath.abs(100*k/b/b-50)/5;retur= n c+=3D10*l}},g=3D{glog:function(a){if(1>a)throw new Error("glog("+a+")");r= eturn g.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=3D255;for(;a>=3D256;)a-= =3D255;return g.EXP_TABLE[a]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(= 256)},h=3D0;8>h;h++)g.EXP_TABLE[h]=3D1<<h;for(var h=3D8;256>h;h++)g.EXP_TAB= LE[h]=3Dg.EXP_TABLE[h-4]^g.EXP_TABLE[h-5]^g.EXP_TABLE[h-6]^g.EXP_TABLE[h-8]= ;for(var h=3D0;255>h;h++)g.LOG_TABLE[g.EXP_TABLE[h]]=3Dh;i.prototype=3D{get= :function(a){return this.num[a]},getLength:function(){return this.num.lengt= h},multiply:function(a){for(var b=3Dnew Array(this.getLength()+a.getLength(= )-1),c=3D0;c<this.getLength();c++)for(var d=3D0;d<a.getLength();d++)b[c+d]^= =3Dg.gexp(g.glog(this.get(c))+g.glog(a.get(d)));return new i(b,0)},mod:func= tion(a){if(this.getLength()-a.getLength()<0)return this;for(var b=3Dg.glog(= this.get(0))-g.glog(a.get(0)),c=3Dnew Array(this.getLength()),d=3D0;d<this.= getLength();d++)c[d]=3Dthis.get(d);for(var d=3D0;d<a.getLength();d++)c[d]^= =3Dg.gexp(g.glog(a.get(d))+b);return new i(c,0).mod(a)}},j.RS_BLOCK_TABLE= =3D[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1= ,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,= 24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,8= 6,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[= 4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,= 41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2= ,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,10= 1,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117= ,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,5= 9,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4= ,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[= 5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,= 3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74= ,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9= ,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114]= ,[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,= 108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4= ,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140= ,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,= 47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],= [6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,= 107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,= 2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,= 122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3= ,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,= 16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,2= 6,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23= ,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,2= 5],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25]= ,[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,1= 9,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44= ,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,4= 8],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,= 34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29= ,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,= 123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,11= 7,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19= ,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46= ,16]],j.getRSBlocks=3Dfunction(a,b){var c=3Dj.getRsBlockTable(a,b);if(void = 0=3D=3Dc)throw new Error("bad rs block @ typeNumber:"+a+"/errorCorrectLevel= :"+b);for(var d=3Dc.length/3,e=3D[],f=3D0;d>f;f++)for(var g=3Dc[3*f+0],h=3D= c[3*f+1],i=3Dc[3*f+2],k=3D0;g>k;k++)e.push(new j(h,i));return e},j.getRsBlo= ckTable=3Dfunction(a,b){switch(b){case d.L:return j.RS_BLOCK_TABLE[4*(a-1)+= 0];case d.M:return j.RS_BLOCK_TABLE[4*(a-1)+1];case d.Q:return j.RS_BLOCK_T= ABLE[4*(a-1)+2];case d.H:return j.RS_BLOCK_TABLE[4*(a-1)+3];default:return = void 0}},k.prototype=3D{get:function(a){var b=3DMath.floor(a/8);return 1=3D= =3D(1&this.buffer[b]>>>7-a%8)},put:function(a,b){for(var c=3D0;b>c;c++)this= .putBit(1=3D=3D(1&a>>>b-c-1))},getLengthInBits:function(){return this.lengt= h},putBit:function(a){var b=3DMath.floor(this.length/8);this.buffer.length<= =3Db&&this.buffer.push(0),a&&(this.buffer[b]|=3D128>>>this.length%8),this.l= ength++}};var l=3D[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[= 106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130= ,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177= ],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[= 718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[100= 3,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[13= 67,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698= ],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,= 1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[= 2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331= ,1663,1273]],o=3Dfunction(){var a=3Dfunction(a,b){this._el=3Da,this._htOpti= on=3Db};return a.prototype.draw=3Dfunction(a){function g(a,b){var c=3Ddocum= ent.createElementNS("http://www.w3.org/2000/svg",a);for(var d in b)b.hasOwn= Property(d)&&c.setAttribute(d,b[d]);return c}var b=3Dthis._htOption,c=3Dthi= s._el,d=3Da.getModuleCount();Math.floor(b.width/d),Math.floor(b.height/d),t= his.clear();var h=3Dg("svg",{viewBox:"0 0 "+String(d)+" "+String(d),width:"= 100%",height:"100%",fill:b.colorLight});h.setAttributeNS("http://www.w3.org= /2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),c.appendChild(h= ),h.appendChild(g("rect",{fill:b.colorDark,width:"1",height:"1",id:"templat= e"}));for(var i=3D0;d>i;i++)for(var j=3D0;d>j;j++)if(a.isDark(i,j)){var k= =3Dg("use",{x:String(i),y:String(j)});k.setAttributeNS("http://www.w3.org/1= 999/xlink","href","#template"),h.appendChild(k)}},a.prototype.clear=3Dfunct= ion(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChil= d)},a}(),p=3D"svg"=3D=3D=3Ddocument.documentElement.tagName.toLowerCase(),q= =3Dp?o:m()?function(){function a(){this._elImage.src=3Dthis._elCanvas.toDat= aURL("image/png"),this._elImage.style.display=3D"block",this._elCanvas.styl= e.display=3D"none"}function d(a,b){var c=3Dthis;if(c._fFail=3Db,c._fSuccess= =3Da,null=3D=3D=3Dc._bSupportDataURI){var d=3Ddocument.createElement("img")= ,e=3Dfunction(){c._bSupportDataURI=3D!1,c._fFail&&_fFail.call(c)},f=3Dfunct= ion(){c._bSupportDataURI=3D!0,c._fSuccess&&c._fSuccess.call(c)};return d.on= abort=3De,d.onerror=3De,d.onload=3Df,d.src=3D"data:image/gif;base64,iVBORw0= KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgl= jNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=3D=3D",void 0}c._bSupportDataURI=3D=3D=3D!= 0&&c._fSuccess?c._fSuccess.call(c):c._bSupportDataURI=3D=3D=3D!1&&c._fFail&= &c._fFail.call(c)}if(this._android&&this._android<=3D2.1){var b=3D1/window.= devicePixelRatio,c=3DCanvasRenderingContext2D.prototype.drawImage;CanvasRen= deringContext2D.prototype.drawImage=3Dfunction(a,d,e,f,g,h,i,j){if("nodeNam= e"in a&&/img/i.test(a.nodeName))for(var l=3Darguments.length-1;l>=3D1;l--)a= rguments[l]=3Darguments[l]*b;else"undefined"=3D=3Dtypeof j&&(arguments[1]*= =3Db,arguments[2]*=3Db,arguments[3]*=3Db,arguments[4]*=3Db);c.apply(this,ar= guments)}}var e=3Dfunction(a,b){this._bIsPainted=3D!1,this._android=3Dn(),t= his._htOption=3Db,this._elCanvas=3Ddocument.createElement("canvas"),this._e= lCanvas.width=3Db.width,this._elCanvas.height=3Db.height,a.appendChild(this= ._elCanvas),this._el=3Da,this._oContext=3Dthis._elCanvas.getContext("2d"),t= his._bIsPainted=3D!1,this._elImage=3Ddocument.createElement("img"),this._el= Image.style.display=3D"none",this._el.appendChild(this._elImage),this._bSup= portDataURI=3Dnull};return e.prototype.draw=3Dfunction(a){var b=3Dthis._elI= mage,c=3Dthis._oContext,d=3Dthis._htOption,e=3Da.getModuleCount(),f=3Dd.wid= th/e,g=3Dd.height/e,h=3DMath.round(f),i=3DMath.round(g);b.style.display=3D"= none",this.clear();for(var j=3D0;e>j;j++)for(var k=3D0;e>k;k++){var l=3Da.i= sDark(j,k),m=3Dk*f,n=3Dj*g;c.strokeStyle=3Dl?d.colorDark:d.colorLight,c.lin= eWidth=3D1,c.fillStyle=3Dl?d.colorDark:d.colorLight,c.fillRect(m,n,f,g),c.s= trokeRect(Math.floor(m)+.5,Math.floor(n)+.5,h,i),c.strokeRect(Math.ceil(m)-= .5,Math.ceil(n)-.5,h,i)}this._bIsPainted=3D!0},e.prototype.makeImage=3Dfunc= tion(){this._bIsPainted&&d.call(this,a)},e.prototype.isPainted=3Dfunction()= {return this._bIsPainted},e.prototype.clear=3Dfunction(){this._oContext.cle= arRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=3D!= 1},e.prototype.round=3Dfunction(a){return a?Math.floor(1e3*a)/1e3:a},e}():f= unction(){var a=3Dfunction(a,b){this._el=3Da,this._htOption=3Db};return a.p= rototype.draw=3Dfunction(a){for(var b=3Dthis._htOption,c=3Dthis._el,d=3Da.g= etModuleCount(),e=3DMath.floor(b.width/d),f=3DMath.floor(b.height/d),g=3D['= <table style=3D"border:0;border-collapse:collapse;">'],h=3D0;d>h;h++){g.pus= h("<tr>");for(var i=3D0;d>i;i++)g.push('<td style=3D"border:0;border-collap= se:collapse;padding:0;margin:0;width:'+e+"px;height:"+f+"px;background-colo= r:"+(a.isDark(h,i)?b.colorDark:b.colorLight)+';"></td>');g.push("</tr>")}g.= push("</table>"),c.innerHTML=3Dg.join("");var j=3Dc.childNodes[0],k=3D(b.wi= dth-j.offsetWidth)/2,l=3D(b.height-j.offsetHeight)/2;k>0&&l>0&&(j.style.mar= gin=3Dl+"px "+k+"px")},a.prototype.clear=3Dfunction(){this._el.innerHTML=3D= ""},a}();QRCode=3Dfunction(a,b){if(this._htOption=3D{width:256,height:256,t= ypeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:d.H},"str= ing"=3D=3Dtypeof b&&(b=3D{text:b}),b)for(var c in b)this._htOption[c]=3Db[c= ];"string"=3D=3Dtypeof a&&(a=3Ddocument.getElementById(a)),this._android=3D= n(),this._el=3Da,this._oQRCode=3Dnull,this._oDrawing=3Dnew q(this._el,this.= _htOption),this._htOption.text&&this.makeCode(this._htOption.text)},QRCode.= prototype.makeCode=3Dfunction(a){this._oQRCode=3Dnew b(r(a,this._htOption.c= orrectLevel),this._htOption.correctLevel),this._oQRCode.addData(a),this._oQ= RCode.make(),this._el.title=3Da,this._oDrawing.draw(this._oQRCode),this.mak= eImage()},QRCode.prototype.makeImage=3Dfunction(){"function"=3D=3Dtypeof th= is._oDrawing.makeImage&&(!this._android||this._android>=3D3)&&this._oDrawin= g.makeImage()},QRCode.prototype.clear=3Dfunction(){this._oDrawing.clear()},= QRCode.CorrectLevel=3Dd}(); \ No newline at end of file --=20 2.30.2