(function(J){function A(){this.list=this.next=null}function C(){this.n=this.b=this.e=0;this.t=null}function n(a,d,i,c,b,q){this.BMAX=16;this.N_MAX=288;this.status=0;this.root=null;this.m=0;var t=new Uint32Array(this.BMAX+1),o,e,l,k,f,h,g,m=new Uint32Array(this.BMAX+1),r,n,y,v=new C,s=Array(this.BMAX);k=new Uint32Array(this.N_MAX);var w,p=new Uint32Array(this.BMAX+1),u,z,x;x=this.root=null;for(f=0;ff&&(q=f);for(u=1<(u-=t[h])){this.status=2;this.m=q;return}if(0>(u-=t[f]))this.status=2,this.m=q;else{t[f]+=u;p[1]=h=0;r=t;n=1;for(y=2;0<--f;)p[y++]=h+=r[n++];r=a;f=n=0;do if(0!=(h=r[n++]))k[p[h]++]=f;while(++fw+m[1+k];){w+=m[1+k];k++;z=(z=l-w)>q?q:z;if((e=1<<(h=g-w))>a+1){e-=a+1;for(y=g;++ho&&w>w-m[k],s[k-1][h].e=v.e,s[k-1][h].b=v.b,s[k-1][h].n=v.n,s[k-1][h].t=v.t)}v.b=g-w;n>=d?v.e=99:r[n]r[n]?16:15,v.n=r[n++]): (v.e=b[r[n]-i],v.n=c[r[n++]-i]);e=1<>w;h>=1)f^=h;for(f^=h;(f&(1<>=a;D-=a}function L(a,n,i){var c,b,q;if(0==i)return 0;for(q=0;;){d(u);b=x.list[g(u)];for(c=b.e;16b;b++)k[S[b]]=0;u=7;b=new n(k,19,19,null,null,u);if(0!=b.status)return-1;x=b.root;u=b.m;t=e+m;for(c=q=0;cb)k[c++]=q=b;else if(16==b){d(2);b=3+g(2);l(2);if(c+b>t)return-1;for(;0t)return-1;for(;0e;e++)o[e]=8;for(;256>e;e++)o[e]=9;for(;280>e;e++)o[e]=7;for(;288>e;e++)o[e]=8;P=7;e=new n(o,288,257,T,U,P);if(0!=e.status){alert("HufBuild error: "+e.status);b=-1;break a}O=e.root;P=e.m;for(e=0;30>e;e++)o[e]=5;zip_fixed_bd=5;e=new n(o,30, 0,V,W,zip_fixed_bd);if(1i.length){var g=new Uint8Array(2*i.length);g.set(i,0);i=g}i.set(c.subarray(0,b),q);q+=b}K=null;return i.subarray(0,q)};Q.inflateStream=function(a,d,i){var c,b;z();K=a;b=N=0;var g=ca.createWriteStream(d);c=new Uint8Array(1024);var p=0;g.on("drain", function(){p=s(g,c);0>9),(this.fileDate>>5&15)-1,this.fileDate&31,this.fileTime>>11,this.fileTime>>5&60)}};n.prototype=new C;n.prototype.data=null;n.prototype.header=null;n.prototype.inflate= function(){var a=this.data;return 0==this.method?a:JSInflate.inflate(a,this.fileSize)};n.Header=function(a){this.crc32=a.read_int();this.size=a.read_int();this.fileSize=this.read_int()};n.Header.prototype={crc32:0,size:0,fileSize:0};d.prototype=new C;d.prototype.extVersion=0;d.prototype.commentLength=null;d.prototype.comment=null;d.prototype.diskNumberStart=0;d.prototype.attributes=0;d.prototype.extAttributes=0;d.prototype.headerOffset=0;d.prototype.record=null;d.Record=function(a){this.diskNumber= a.read_int16();this.startNumber=a.read_int16();this.diskLength=a.read_int16();this.length=a.read_int16();this.directorySize=a.read_int();this.offset=a.read_int();this.commentLength=a.read_int16();this.comment=a.read_text(this.commentLength)};d.Record.prototype={diskNumber:0,startNumber:0,diskLength:0,length:0,directorySize:0,offset:0,commentLength:0,comment:null};g.prototype={position:0,eos:function(){return this.position>=this.length},read:function(a){var d=this.bytes.subarray(this.position,this.position+ a);this.position+=a;return d},read_ascii:function(a){return String.fromCharCode.apply(null,this.read(a))},read_text:function(a){a=this.read_ascii(a);return a.sjis2utf16?a.sjis2utf16():a},read_int:function(){var a=this.read(4);return a[0]|a[1]<<8|a[2]<<16|a[3]<<24},read_int16:function(){var a=this.read(2);return a[0]|a[1]<<8}}})(this);