filesbox/web/dist/js/reqrcode.js

2 lines
42 KiB
JavaScript
Raw Permalink Normal View History

2024-07-26 06:10:54 +00:00
var _aa={};_aa._ab=function(h,t){for(var n=qrcode.width,r=qrcode.height,i=!0,s=0;s<t.length&&i;s+=2){var e=Math.floor(t[s]),a=Math.floor(t[s+1]);if(e<-1||e>n||a<-1||a>r)throw"Error._ab ";i=!1,e==-1?(t[s]=0,i=!0):e==n&&(t[s]=n-1,i=!0),a==-1?(t[s+1]=0,i=!0):a==r&&(t[s+1]=r-1,i=!0)}i=!0;for(var s=t.length-2;s>=0&&i;s-=2){var e=Math.floor(t[s]),a=Math.floor(t[s+1]);if(e<-1||e>n||a<-1||a>r)throw"Error._ab ";i=!1,e==-1?(t[s]=0,i=!0):e==n&&(t[s]=n-1,i=!0),a==-1?(t[s+1]=0,i=!0):a==r&&(t[s+1]=r-1,i=!0)}},_aa._af=function(h,t,n){for(var r=new _ac(t),i=new Array(t<<1),s=0;s<t;s++){for(var e=i.length,a=s+.5,o=0;o<e;o+=2)i[o]=(o>>1)+.5,i[o+1]=a;n._ad(i),_aa._ab(h,i);try{for(var o=0;o<e;o+=2){var w=h[Math.floor(i[o])+qrcode.width*Math.floor(i[o+1])];w&&r._dq(o>>1,s)}}catch(_){throw"Error._ab"}}return r},_aa._ah=function(h,t,n,r,i,s,e,a,o,w,_,f,v,u,c,d,l,g){var y=_ae._ag(n,r,i,s,e,a,o,w,_,f,v,u,c,d,l,g);return _aa._af(h,t,y)};function _a1(h,t){this.count=h,this._fc=t,this.__defineGetter__("Count",function(){return this.count}),this.__defineGetter__("_dm",function(){return this._fc})}function _a2(h,t,n){this._bm=h,n?this._do=new Array(t,n):this._do=new Array(t),this.__defineGetter__("_bo",function(){return this._bm}),this.__defineGetter__("_dn",function(){return this._bm*this._fo}),this.__defineGetter__("_fo",function(){for(var r=0,i=0;i<this._do.length;i++)r+=this._do[i].length;return r}),this._fb=function(){return this._do}}function _a3(h,t,n,r,i,s){this._bs=h,this._ar=t,this._do=new Array(n,r,i,s);for(var e=0,a=n._bo,o=n._fb(),w=0;w<o.length;w++){var _=o[w];e+=_.Count*(_._dm+a)}this._br=e,this.__defineGetter__("_fd",function(){return this._bs}),this.__defineGetter__("_as",function(){return this._ar}),this.__defineGetter__("_dp",function(){return this._br}),this.__defineGetter__("_cr",function(){return 17+4*this._bs}),this._aq=function(){var f=this._cr,v=new _ac(f);v._bq(0,0,9,9),v._bq(f-8,0,8,9),v._bq(0,f-8,9,8);for(var u=this._ar.length,c=0;c<u;c++)for(var d=this._ar[c]-2,l=0;l<u;l++)c==0&&(l==0||l==u-1)||c==u-1&&l==0||v._bq(this._ar[l]-2,d,5,5);return v._bq(6,9,1,f-17),v._bq(9,6,f-17,1),this._bs>6&&(v._bq(f-11,0,3,6),v._bq(0,f-11,6,3)),v},this._bu=function(f){return this._do[f.ordinal()]}}_a3._bv=new Array(31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017),_a3.VERSIONS=_ay(),_a3._av=function(h){if(h<1||h>40)throw"bad arguments";return _a3.VERSIONS[h-1]},_a3._at=function(h){if(h%4!=1)throw"Error _at";try{return _a3._av(h-17>>2)}catch(t){throw"Error _av"}},_a3._aw=function(h){for(var t=4294967295,n=0,r=0;r<_a3._bv.length;r++){var i=_a3._bv[r];if(i==h)return this._av(r+7);var s=_ax._gj(h,i);s<t&&(n=r+7,t=s)}return t<=3?this._av(n):null};function _ay(){return new Array(new _a3(1,new Array,new _a2(7,new _a1(1,19)),new _a2(10,new _a1(1,16)),new _a2(13,new _a1(1,13)),new _a2(17,new _a1(1,9))),new _a3(2,new Array(6,18),new _a2(10,new _a1(1,34)),new _a2(16,new _a1(1,28)),new _a2(22,new _a1(1,22)),new _a2(28,new _a1(1,16))),new _a3(3,new Array(6,22),new _a2(15,new _a1(1,55)),new _a2(26,new _a1(1,44)),new _a2(18,new _a1(2,17)),new _a2(22,new _a1(2,13))),new _a3(4,new Array(6,26),new _a2(20,new _a1(1,80)),new _a2(18,new _a1(2,32)),new _a2(26,new _a1(2,24)),new _a2(16,new _a1(4,9))),new _a3(5,new Array(6,30),new _a2(26,new _a1(1,108)),new _a2(24,new _a1(2,43)),new _a2(18,new _a1(2,15),new _a1(2,16)),new _a2(22,new _a1(2,11),new _a1(2,12))),new _a3(6,new Array(6,34),new _a2(18,new _a1(2,68)),new _a2(16,new _a1(4,27)),new _a2(24,new _a1(4,19)),new _a2(28,new _a1(4,15))),new _a3(7,new Array(6,22,38),new _a2(20,new _a1(2,78)),new _a2(18,new _a1(4,31)),new _a2(18,new _a1(2,14),new _a1(4,15)),new _a2(26,new _a1(4,13),new _a1(1,14))),new _a3(8,new Array(6,24,42),new _a2(24,new _a1(2,97)),new _a2(22,new _a1(2,38),new _a1(2,39)),new _a2(22,new _a1(4,18),new _a1(2,19)),new _a2(26,new _a1(4,14),new _a1(2,15))),new _a3(9,new Array(6,26,46),new _a2(30,new _a1(2,116)),new _a2(22,new _a1(3,