function QR8bitByte(a){this.mode=QRMode.MODE_8BIT_BYTE;this.data=a}QR8bitByte.prototype={getLength:function(a){return this.data.length},write:function(a){for(var c=0;ca||this.moduleCount<=a||0>c||this.moduleCount<=c)throw Error(a+","+c);return this.modules[a][c]},getModuleCount:function(){return this.moduleCount},make:function(){if(1>this.typeNumber){var a;for(a=1;40>a;a++){for(var c=QRRSBlock.getRSBlocks(a,this.errorCorrectLevel),d=new QRBitBuffer,b=0,e=0;e=d;d++)if(!(-1>=a+d||this.moduleCount<=a+d))for(var b=-1;7>=b;b++)-1>=c+b||this.moduleCount<=c+b||(this.modules[a+d][c+b]=0<=d&&6>=d&&(0==b||6==b)||0<=b&&6>= b&&(0==d||6==d)||2<=d&&4>=d&&2<=b&&4>=b?!0:!1)},getBestMaskPattern:function(){for(var a=0,c=0,d=0;8>d;d++){this.makeImpl(!0,d);var b=QRUtil.getLostPoint(this);if(0==d||a>b)a=b,c=d}return c},createMovieClip:function(a,c,d){a=a.createEmptyMovieClip(c,d);this.make();for(c=0;c=f;f++)for(var k=-2;2>=k;k++)this.modules[b+f][e+k]=-2==f||2==f||-2==k||2==k||0==f&&0==k?!0:!1}},setupTypeNumber:function(a){for(var c= QRUtil.getBCHTypeNumber(this.typeNumber),d=0;18>d;d++){var b=!a&&1==(c>>d&1);this.modules[Math.floor(d/3)][d%3+this.moduleCount-8-3]=b}for(d=0;18>d;d++)b=!a&&1==(c>>d&1),this.modules[d%3+this.moduleCount-8-3][Math.floor(d/3)]=b},setupTypeInfo:function(a,c){for(var d=QRUtil.getBCHTypeInfo(this.errorCorrectLevel<<3|c),b=0;15>b;b++){var e=!a&&1==(d>>b&1);6>b?this.modules[b][8]=e:8>b?this.modules[b+1][8]=e:this.modules[this.moduleCount-15+b][8]=e}for(b=0;15>b;b++)e=!a&&1==(d>>b&1),8>b?this.modules[8][this.moduleCount- b-1]=e:9>b?this.modules[8][15-b-1+1]=e:this.modules[8][15-b-1]=e;this.modules[this.moduleCount-8][8]=!a},mapData:function(a,c){for(var d=-1,b=this.moduleCount-1,e=7,f=0,k=this.moduleCount-1;0g;g++)if(null==this.modules[b][k-g]){var l=!1;f>>e&1));QRUtil.getMask(c,b,k-g)&&(l=!l);this.modules[b][k-g]=l;e--; -1==e&&(f++,e=7)}b+=d;if(0>b||this.moduleCount<=b){b-=d;d=-d;break}}}};QRCode.PAD0=236;QRCode.PAD1=17; QRCode.createData=function(a,c,d){c=QRRSBlock.getRSBlocks(a,c);for(var b=new QRBitBuffer,e=0;e8*a)throw Error("code length overflow. ("+b.getLengthInBits()+">"+8*a+")");for(b.getLengthInBits()+4<=8*a&&b.put(0,4);0!=b.getLengthInBits()%8;)b.putBit(!1);for(;!(b.getLengthInBits()>=8*a);){b.put(QRCode.PAD0,8);if(b.getLengthInBits()>= 8*a)break;b.put(QRCode.PAD1,8)}return QRCode.createBytes(b,c)}; QRCode.createBytes=function(a,c){for(var d=0,b=0,e=0,f=Array(c.length),k=Array(c.length),g=0;g>>=1;return c},getPatternPosition:function(a){return QRUtil.PATTERN_POSITION_TABLE[a-1]},getMask:function(a,c,d){switch(a){case QRMaskPattern.PATTERN000:return 0==(c+d)% 2;case QRMaskPattern.PATTERN001:return 0==c%2;case QRMaskPattern.PATTERN010:return 0==d%3;case QRMaskPattern.PATTERN011:return 0==(c+d)%3;case QRMaskPattern.PATTERN100:return 0==(Math.floor(c/2)+Math.floor(d/3))%2;case QRMaskPattern.PATTERN101:return 0==c*d%2+c*d%3;case QRMaskPattern.PATTERN110:return 0==(c*d%2+c*d%3)%2;case QRMaskPattern.PATTERN111:return 0==(c*d%3+(c+d)%2)%2;default:throw Error("bad maskPattern:"+a);}},getErrorCorrectPolynomial:function(a){for(var c=new QRPolynomial([1],0),d=0;d< a;d++)c=c.multiply(new QRPolynomial([1,QRMath.gexp(d)],0));return c},getLengthInBits:function(a,c){if(1<=c&&10>c)switch(a){case QRMode.MODE_NUMBER:return 10;case QRMode.MODE_ALPHA_NUM:return 9;case QRMode.MODE_8BIT_BYTE:return 8;case QRMode.MODE_KANJI:return 8;default:throw Error("mode:"+a);}else if(27>c)switch(a){case QRMode.MODE_NUMBER:return 12;case QRMode.MODE_ALPHA_NUM:return 11;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 10;default:throw Error("mode:"+a);}else if(41>c)switch(a){case QRMode.MODE_NUMBER:return 14; case QRMode.MODE_ALPHA_NUM:return 13;case QRMode.MODE_8BIT_BYTE:return 16;case QRMode.MODE_KANJI:return 12;default:throw Error("mode:"+a);}else throw Error("type:"+c);},getLostPoint:function(a){for(var c=a.getModuleCount(),d=0,b=0;b=g;g++)if(!(0>b+g||c<=b+g))for(var l=-1;1>=l;l++)0>e+l||c<=e+l||0==g&&0==l||k!=a.isDark(b+g,e+l)||f++;5a)throw Error("glog("+ a+")");return QRMath.LOG_TABLE[a]},gexp:function(a){for(;0>a;)a+=255;for(;256<=a;)a-=255;return QRMath.EXP_TABLE[a]},EXP_TABLE:Array(256),LOG_TABLE:Array(256)},i=0;8>i;i++)QRMath.EXP_TABLE[i]=1<i;i++)QRMath.EXP_TABLE[i]=QRMath.EXP_TABLE[i-4]^QRMath.EXP_TABLE[i-5]^QRMath.EXP_TABLE[i-6]^QRMath.EXP_TABLE[i-8];for(i=0;255>i;i++)QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]]=i; function QRPolynomial(a,c){if(void 0==a.length)throw Error(a.length+"/"+c);for(var d=0;dthis.getLength()-a.getLength())return this;for(var c=QRMath.glog(this.get(0))-QRMath.glog(a.get(0)),d=Array(this.getLength()),b=0;b>>7-a%8&1)},put:function(a,c){for(var d=0;d>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(a){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0);a&&(this.buffer[c]|=128>>>this.length%8);this.length++}}; // V1.0.0.310 //# sourceMappingURL=c:/qrcode.min.map