MeshCentral/public/scripts/zlib-inflate-min.js

1 line
26 KiB
JavaScript
Raw Normal View History

2021-05-28 01:55:06 +03:00
"undefined"==typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js"),function(){var R=11,B=29,z=852,C=592,i=z+C,T=0,y=1,M=2,K=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],D=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],F=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],N=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function k(t,a){for(var i,s,o,l,b,e,v,p,n,d,r,h,c,f,u,_,m,k,g,w,x=t.next,Z=a==M?t.distbits:t.lenbits,I=t.work,L=t.lens,R=a==M?t.nlen:0,B=t.codes,E=a==y?t.nlen:a==M?t.ndist:19,A=new Array(16),S=new Array(16),O=0;O<=15;O++)A[O]=0;for(i=0;i<E;i++)A[L[R+i]]++;for(l=Z,o=15;1<=o&&0==A[o];o--);if(o<l&&(l=o),0==o)return f={op:64,bits:1,val:0},B[x++]=f,B[x++]=f,a==M?t.distbits=1:t.lenbits=1,t.next=x,0;for(s=1;s<o&&0==A[s];s++);for(l<s&&(l=s),O=v=1;O<=15;O++)if(v<<=1,(v-=A[O])<0)return-1;if(0<v&&(a==T||1!=o))return t.next=x,-1;for(S[1]=0,O=1;O<15;O++)S[O+1]=S[O]+A[O];for(i=0;i<E;i++)0!=L[R+i]&&(I[S[L[R+i]]++]=i);switch(a){case T:_=k=I,g=m=0,w=19;break;case y:_=K,k=D,g=m=-257,w=256;break;default:_=F,k=N,g=m=0,w=-1}if(O=s,u=x,e=i=n=0,h=-1,c=(p=1<<(b=l))-1,a==y&&z<=p||a==M&&C<=p)return t.next=x,1;for(;;){for(f={op:0,bits:O-e,val:0},I[i]<w?f.val=I[i]:I[i]>w?(f.op=k[g+I[i]],f.val=_[m+I[i]]):f.op=96,d=1<<O-e,r=1<<b,s=r;B[u+(n>>>e)+(r-=d)]=f,0!=r;);for(d=1<<O-1;n&d;)d>>>=1;if(0!=d?(n&=d-1,n+=d):n=0,i++,0==--A[O]){if(O==o)break;O=L[R+I[i]]}if(l<O&&(n&c)!=h){for(u+=s,v=1<<(b=O-(e=0==e?l:e));b+e<o&&!((v-=A[b+e])<=0);)b++,v<<=1;if(p+=1<<b,a==y&&z<=p||a==M&&C<=p)return t.next=x,1;B[x+(h=n&c)]={op:b,bits:l,val:u-x}}}return 0!=n&&(B[u+n]={op:64,bits:O-e,val:0}),t.next=x+p,a==M?t.distbits=l:t.lenbits=l,0}function s(t){for(var a=new Array(t),i=0;i<t;i++)a[i]=0;return a}function l(t,a,i){return t&&a in t?t[a]:i}function o(){return 0}function b(){this.mode=0,this.last=0,this.wrap=0,this.havedict=0,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=0,this.distcode=0,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=0,this.lens=s(320),this.work=s(288),this.codes=new Array(i);for(var t={op:0,bits:0,val:0},a=0;a<i;a++)this.codes[a]=t;this.sane=0,this.back=0,this.was=0}ZLIB.inflate_copyright=" inflate 1.2.6 Copyright 1995-2012 Mark Adler ",ZLIB.inflateResetKeep=function(t){var a;return t&&t.state?(a=t.state,t.total_in=t.total_out=a.total=0,t.msg=null,a.wrap&&(t.adler=1&a.wrap),a.mode=0,a.last=0,a.havedict=0,a.dmax=32768,a.head=null,a.hold=0,a.bits=0,a.lencode=0,a.distcode=0,a.next=0,a.sane=1,a.back=-1,ZLIB.Z_OK):ZLIB.Z_STREAM_ERROR},ZLIB.inflateReset=function(t,a){var i,s;return t&&t.state?(s=t.state,(a=void 0===a?15:a)<0?(i=0,a=-a):(i=1+(a>>>4),a<48&&(a&=15)),1==i&&"function"==typeof ZLIB.adler32?t.checksum_function=ZLIB.adler32:2==i&&"function"==typeof ZLIB.crc32?t.checksum_function=ZLIB.crc32:t.checksum_function=o,a&&(a<8||15<a)?ZLIB.Z_STREAM_ERROR:(s.window&&s.wbits!=a&&(s.window=null),s.wrap=i,s.wbits=a,s.wsize=0,s.whave=0,s.wnext=0,ZLIB.inflateResetKeep(t))):ZLIB.Z_STREAM_ERROR},ZLIB.inflateInit=function(t){var a=new ZLIB.z_stream;return a.state=new b,ZLIB.inflateReset(a,t),a},ZLIB.inflatePrime=function(t,a,i){return t&&t.state?(t=t.state,a<0?(t.hold=0,t.bits=0,ZLIB.Z_OK):16<a||32<t.bits+a?ZLIB.Z_STREAM_ERROR:(i&=(1<<a)-1,t.hold+=i<<t.bits,t.bits+=a,ZLIB.Z_OK)):ZLIB.Z_STREAM_ERROR};var g=null,w=null;function x(t,a){a=[255&a,a>>>8&255];t.state.check=t.checksum_function(t.state.check,a,0,2)}function Z(t,a){return a.strm=t,a.left=t.avail_out,a.next=t.next_in,a.have=t.avail_in,a.hold=t.state.hold,a.bits=t.state.bits,a}function I(t){var a=t.strm;a.next_in=t.next,a.avail_out=t.left,a.avail_in=t.have,a.state.hold=t.hold,a.state.bits=t.bits}function L(t){t.hold=0,t.bits=0}function E(t){return 0!=t.have&&(t.