{“ast”:null,“code”:“'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adlern// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsinn//n// This software is provided 'as-is', without any express or impliedn// warranty. In no event will the authors be held liable for any damagesn// arising from the use of this software.n//n// Permission is granted to anyone to use this software for any purpose,n// including commercial applications, and to alter it and redistribute itn// freely, subject to the following restrictions:n//n// 1. The origin of this software must not be misrepresented; you must notn// claim that you wrote the original software. If you use this softwaren// in a product, an acknowledgment in the product documentation would ben// appreciated but is not required.n// 2. Altered source versions must be plainly marked as such, and must not ben// misrepresented as being the original software.n// 3. This notice may not be removed or altered from any source distribution.n// See state defs from inflate.jsnnvar BAD = 30;n/* got a data error – remain here until reset */nnvar TYPE = 12;n/* i: waiting for type bits, including last-flag bit */nn/*n Decode literal, length, and distance codes and write out the resultingn literal and match bytes until either not enough input or output isn available, an end-of-block is encountered, or a data error is encountered.n When large enough input and output buffers are supplied to inflate(), forn example, a 16K input buffer and a 64K output buffer, more than 95% of then inflate execution time is spent in this routine.nn Entry assumptions:nn state.mode === LENn strm.avail_in >= 6n strm.avail_out >= 258n start >= strm.avail_outn state.bits < 8nn On return, state.mode is one of:nn LEN – ran out of enough output space or enough available inputn TYPE – reached end of block code, inflate() to interpret next blockn BAD – error in block datann Notes:nn - The maximum input bits used by a length/distance pair is 15 bits for then length code, 5 bits for the length extra, 15 bits for the distance code,n and 13 bits for the distance extra. This totals 48 bits, or six bytes.n Therefore if strm.avail_in >= 6, then there is enough input to avoidn checking for available input while decoding.nn - The maximum bytes that a single length/distance pair can output is 258n bytes, which is the maximum length that can be coded. inflate_fast()n requires strm.avail_out >= 258 for each loop to avoid checking forn output space.n */nnmodule.exports = function inflate_fast(strm, start) {n var state;nn var _in;n /* local strm.input */nnn var last;n /* have enough input while in < last */nn var _out;n /* local strm.output */nnn var beg;n /* inflate()'s initial strm.output */nn var end;n /* while out < end, enough space available */n //#ifdef INFLATE_STRICTnn var dmax;n /* maximum distance from zlib header */n //#endifnn var wsize;n /* window size or zero if not using window */nn var whave;n /* valid bytes in the window */nn var wnext;n /* window write index */n // Use `s_window` instead `window`, avoid conflict with instrumentation toolsnn var s_window;n /* allocated sliding window, if wsize != 0 */nn var hold;n /* local strm.hold */nn var bits;n /* local strm.bits */nn var lcode;n /* local strm.lencode */nn var dcode;n /* local strm.distcode */nn var lmask;n /* mask for first level of length codes */nn var dmask;n /* mask for first level of distance codes */nn var here;n /* retrieved table entry */nn var op;n /* code bits, operation, extra bits, or */nn /* window position, window bytes to copy */nn var len;n /* match length, unused bytes */nn var dist;n /* match distance */nn var from;n /* where to copy match from */nn var from_source;n var input, output; // JS specific, because we have no pointersnn /* copy state to local variables */nn state = strm.state; //here = state.here;nn _in = strm.next_in;n input = strm.input;n last = _in + (strm.avail_in - 5);n _out = strm.next_out;n output = strm.output;n beg = _out - (start - strm.avail_out);n end = _out + (strm.avail_out - 257); //#ifdef INFLATE_STRICTnn dmax = state.dmax; //#endifnn wsize = state.wsize;n whave = state.whave;n wnext = state.wnext;n s_window = state.window;n hold = state.hold;n bits = state.bits;n lcode = state.lencode;n dcode = state.distcode;n lmask = (1 << state.lenbits) - 1;n dmask = (1 << state.distbits) - 1;n /* decode literals and length/distances until end-of-block or not enoughn input data or output space */nn top: do {n if (bits < 15) {n hold += input << bits;n bits += 8;n hold += input << bits;n bits += 8;n }nn here = lcode[hold & lmask];nn dolen: for (;;) {n // Goto emulationn op = here >>> 24n /here.bits/n ;n hold >>>= op;n bits -= op;n op = here >>> 16 & 0xffn /here.op/n ;nn if (op === 0) {n /* literal */n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?n // "inflate: literal '%c'\n" :n // "inflate: literal 0x%02x\n", here.val));n output = here & 0xffffn /here.val/n ;n } else if (op & 16) {n /* length base */n len = here & 0xffffn /here.val/n ;n op &= 15;n /* number of extra bits */nn if (op) {n if (bits < op) {n hold += input << bits;n bits += 8;n }nn len += hold & (1 << op) - 1;n hold >>>= op;n bits -= op;n } //Tracevv((stderr, "inflate: length %u\n", len));nnn if (bits < 15) {n hold += input << bits;n bits += 8;n hold += input << bits;n bits += 8;n }nn here = dcode[hold & dmask];nn dodist: for (;;) {n // goto emulationn op = here >>> 24n /here.bits/n ;n hold >>>= op;n bits -= op;n op = here >>> 16 & 0xffn /here.op/n ;nn if (op & 16) {n /* distance base */n dist = here & 0xffffn /here.val/n ;n op &= 15;n /* number of extra bits */nn if (bits < op) {n hold += input << bits;n bits += 8;nn if (bits < op) {n hold += input << bits;n bits += 8;n }n }nn dist += hold & (1 << op) - 1; //#ifdef INFLATE_STRICTnn if (dist > dmax) {n strm.msg = 'invalid distance too far back';n state.mode = BAD;n break top;n } //#endifnnn hold >>>= op;n bits -= op; //Tracevv((stderr, "inflate: distance %u\n", dist));nn op = _out - beg;n /* max distance in output */nn if (dist > op) {n /* see if copy from window */n op = dist - op;n /* distance back in window */nn if (op > whave) {n if (state.sane) {n strm.msg = 'invalid distance too far back';n state.mode = BAD;n break top;n } // (!) This block is disabled in zlib defaults,n // don't enable it for binary compatibilityn //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRRn // if (len <= op - whave) {n // do {n // output = 0;n // } while (–len);n // continue top;n // }n // len -= op - whave;n // do {n // output = 0;n // } while (–op > whave);n // if (op === 0) {n // from = _out - dist;n // do {n // output = output;n // } while (–len);n // continue top;n // }n //#endifnn }nn from = 0; // window indexnn from_source = s_window;nn if (wnext === 0) {n /* very common case */n from += wsize - op;nn if (op < len) {n /* some from window */n len -= op;nn do {n output = s_window;n } while (–op);nn from = _out - dist;n /* rest from output */nn from_source = output;n }n } else if (wnext < op) {n /* wrap around window */n from += wsize + wnext - op;n op -= wnext;nn if (op < len) {n /* some from end of window */n len -= op;nn do {n output = s_window;n } while (–op);nn from = 0;nn if (wnext < len) {n /* some from start of window */n op = wnext;n len -= op;nn do {n output = s_window;n } while (–op);nn from = _out - dist;n /* rest from output */nn from_source = output;n }n }n } else {n /* contiguous in window */n from += wnext - op;nn if (op < len) {n /* some from window */n len -= op;nn do {n output = s_window;n } while (–op);nn from = _out - dist;n /* rest from output */nn from_source = output;n }n }nn while (len > 2) {n output = from_source;n output = from_source;n output = from_source;n len -= 3;n }nn if (len) {n output = from_source;nn if (len > 1) {n output = from_source;n }n }n } else {n from = _out - dist;n /* copy direct from output */nn do {n /* minimum length is three */n output = output;n output = output;n output = output;n len -= 3;n } while (len > 2);nn if (len) {n output = output;nn if (len > 1) {n output = output;n }n }n }n } else if ((op & 64) === 0) {n /* 2nd level distance code */n here = dcode[(here & 0xffff) + (n /here.val/n hold & (1 << op) - 1)];n continue dodist;n } else {n strm.msg = 'invalid distance code';n state.mode = BAD;n break top;n }nn break; // need to emulate goto via "continue"n }n } else if ((op & 64) === 0) {n /* 2nd level length code */n here = lcode[(here & 0xffff) + (n /here.val/n hold & (1 << op) - 1)];n continue dolen;n } else if (op & 32) {n /* end-of-block */n //Tracevv((stderr, "inflate: end of block\n"));n state.mode = TYPE;n break top;n } else {n strm.msg = 'invalid literal/length code';n state.mode = BAD;n break top;n }nn break; // need to emulate goto via "continue"n }n } while (_in < last && _out < end);n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */nnn len = bits >> 3;n _in -= len;n bits -= len << 3;n hold &= (1 << bits) - 1;n /* update state and return */nn strm.next_in = _in;n strm.next_out = _out;n strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last);n strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end);n state.hold = hold;n state.bits = bits;n return;n};”,“map”:null,“metadata”:{},“sourceType”:“module”}