From 27663ae2a7dc592cab9dfe63b0d05161c9523901 Mon Sep 17 00:00:00 2001 From: Gildas Date: Thu, 11 Mar 2021 02:03:03 +0100 Subject: [PATCH] bump version --- dist/zip-fs-full.js | 554 +++++++++++++++--------------- dist/zip-fs-full.min.js | 2 +- dist/zip-fs.js | 152 ++++---- dist/zip-fs.min.js | 2 +- dist/zip-full.js | 526 ++++++++++++++-------------- dist/zip-full.min.js | 2 +- dist/zip-no-worker-deflate.min.js | 2 +- dist/zip-no-worker.min.js | 2 +- dist/zip.js | 142 ++++---- dist/zip.min.js | 2 +- lib/z-worker-inline.js | 2 +- package.json | 2 +- 12 files changed, 715 insertions(+), 675 deletions(-) diff --git a/dist/zip-fs-full.js b/dist/zip-fs-full.js index a300416e..2c36703a 100644 --- a/dist/zip-fs-full.js +++ b/dist/zip-fs-full.js @@ -34,7 +34,7 @@ // Global - const MAX_BITS = 15; + const MAX_BITS$1 = 15; const D_CODES = 30; const BL_CODES = 19; @@ -71,17 +71,17 @@ const Z_HUFFMAN_ONLY = 2; const Z_DEFAULT_STRATEGY = 0; - const Z_NO_FLUSH = 0; + const Z_NO_FLUSH$1 = 0; const Z_PARTIAL_FLUSH = 1; const Z_FULL_FLUSH = 3; - const Z_FINISH = 4; + const Z_FINISH$1 = 4; - const Z_OK = 0; - const Z_STREAM_END = 1; - const Z_NEED_DICT = 2; - const Z_STREAM_ERROR = -2; - const Z_DATA_ERROR = -3; - const Z_BUF_ERROR = -5; + const Z_OK$1 = 0; + const Z_STREAM_END$1 = 1; + const Z_NEED_DICT$1 = 2; + const Z_STREAM_ERROR$1 = -2; + const Z_DATA_ERROR$1 = -3; + const Z_BUF_ERROR$1 = -5; // Tree @@ -124,7 +124,7 @@ let f; // frequency let overflow = 0; // number of elements with bit length too large - for (bits = 0; bits <= MAX_BITS; bits++) + for (bits = 0; bits <= MAX_BITS$1; bits++) s.bl_count[bits] = 0; // In a first pass, compute the optimal bit lengths (which may @@ -220,7 +220,7 @@ // The distribution counts are first used to generate the code values // without bit reversal. - for (bits = 1; bits <= MAX_BITS; bits++) { + for (bits = 1; bits <= MAX_BITS$1; bits++) { next_code[bits] = code = ((code + bl_count[bits - 1]) << 1); } @@ -384,9 +384,9 @@ StaticTree.static_dtree = [0, 5, 16, 5, 8, 5, 24, 5, 4, 5, 20, 5, 12, 5, 28, 5, 2, 5, 18, 5, 10, 5, 26, 5, 6, 5, 22, 5, 14, 5, 30, 5, 1, 5, 17, 5, 9, 5, 25, 5, 5, 5, 21, 5, 13, 5, 29, 5, 3, 5, 19, 5, 11, 5, 27, 5, 7, 5, 23, 5]; - StaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + StaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS$1); - StaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS); + StaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS$1); StaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS); @@ -404,11 +404,11 @@ that.func = func; } - const STORED = 0; + const STORED$1 = 0; const FAST = 1; const SLOW = 2; const config_table = [ - new Config(0, 0, 0, 0, STORED), + new Config(0, 0, 0, 0, STORED$1), new Config(4, 4, 8, 4, FAST), new Config(4, 5, 16, 8, FAST), new Config(4, 6, 32, 32, FAST), @@ -445,14 +445,14 @@ const FinishDone = 3; // preset dictionary flag in zlib header - const PRESET_DICT = 0x20; + const PRESET_DICT$1 = 0x20; const INIT_STATE = 42; const BUSY_STATE = 113; const FINISH_STATE = 666; // The deflate compression method - const Z_DEFLATED = 8; + const Z_DEFLATED$1 = 8; const STORED_BLOCK = 0; const STATIC_TREES = 1; @@ -468,7 +468,7 @@ return (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m])); } - function Deflate() { + function Deflate$1() { const that = this; let strm; // pointer back to this zlib stream @@ -1245,7 +1245,7 @@ // Fill the window as much as possible: if (lookahead <= 1) { fill_window(); - if (lookahead === 0 && flush == Z_NO_FLUSH) + if (lookahead === 0 && flush == Z_NO_FLUSH$1) return NeedMore; if (lookahead === 0) break; // flush the current block @@ -1276,11 +1276,11 @@ } } - flush_block_only(flush == Z_FINISH); + flush_block_only(flush == Z_FINISH$1); if (strm.avail_out === 0) - return (flush == Z_FINISH) ? FinishStarted : NeedMore; + return (flush == Z_FINISH$1) ? FinishStarted : NeedMore; - return flush == Z_FINISH ? FinishDone : BlockDone; + return flush == Z_FINISH$1 ? FinishDone : BlockDone; } function longest_match(cur_match) { @@ -1378,7 +1378,7 @@ // string following the next match. if (lookahead < MIN_LOOKAHEAD) { fill_window(); - if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) { return NeedMore; } if (lookahead === 0) @@ -1457,14 +1457,14 @@ } } - flush_block_only(flush == Z_FINISH); + flush_block_only(flush == Z_FINISH$1); if (strm.avail_out === 0) { - if (flush == Z_FINISH) + if (flush == Z_FINISH$1) return FinishStarted; else return NeedMore; } - return flush == Z_FINISH ? FinishDone : BlockDone; + return flush == Z_FINISH$1 ? FinishDone : BlockDone; } // Same as above, but achieves better compression. We use a lazy @@ -1486,7 +1486,7 @@ if (lookahead < MIN_LOOKAHEAD) { fill_window(); - if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) { return NeedMore; } if (lookahead === 0) @@ -1590,16 +1590,16 @@ bflush = _tr_tally(0, window[strstart - 1] & 0xff); match_available = 0; } - flush_block_only(flush == Z_FINISH); + flush_block_only(flush == Z_FINISH$1); if (strm.avail_out === 0) { - if (flush == Z_FINISH) + if (flush == Z_FINISH$1) return FinishStarted; else return NeedMore; } - return flush == Z_FINISH ? FinishDone : BlockDone; + return flush == Z_FINISH$1 ? FinishDone : BlockDone; } function deflateReset(strm) { @@ -1611,16 +1611,16 @@ status = BUSY_STATE; - last_flush = Z_NO_FLUSH; + last_flush = Z_NO_FLUSH$1; tr_init(); lm_init(); - return Z_OK; + return Z_OK$1; } that.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) { if (!_method) - _method = Z_DEFLATED; + _method = Z_DEFLATED$1; if (!memLevel) memLevel = DEF_MEM_LEVEL; if (!_strategy) @@ -1639,9 +1639,9 @@ if (_level == Z_DEFAULT_COMPRESSION) _level = 6; - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0 + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED$1 || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; } strm.dstate = that; @@ -1678,7 +1678,7 @@ that.deflateEnd = function () { if (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) { - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; } // Deallocate in reverse order of allocations: that.pending_buf = null; @@ -1687,17 +1687,17 @@ window = null; // free that.dstate = null; - return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; + return status == BUSY_STATE ? Z_DATA_ERROR$1 : Z_OK$1; }; that.deflateParams = function (strm, _level, _strategy) { - let err = Z_OK; + let err = Z_OK$1; if (_level == Z_DEFAULT_COMPRESSION) { _level = 6; } if (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; } if (config_table[level].func != config_table[_level].func && strm.total_in !== 0) { @@ -1721,10 +1721,10 @@ let n, index = 0; if (!dictionary || status != INIT_STATE) - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; if (length < MIN_MATCH) - return Z_OK; + return Z_OK$1; if (length > w_size - MIN_LOOKAHEAD) { length = w_size - MIN_LOOKAHEAD; index = dictLength - length; // use the tail of the dictionary @@ -1746,23 +1746,23 @@ prev[n & w_mask] = head[ins_h]; head[ins_h] = n; } - return Z_OK; + return Z_OK$1; }; that.deflate = function (_strm, flush) { let i, header, level_flags, old_flush, bstate; - if (flush > Z_FINISH || flush < 0) { - return Z_STREAM_ERROR; + if (flush > Z_FINISH$1 || flush < 0) { + return Z_STREAM_ERROR$1; } - if (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) { - _strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)]; - return Z_STREAM_ERROR; + if (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH$1)) { + _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_STREAM_ERROR$1)]; + return Z_STREAM_ERROR$1; } if (_strm.avail_out === 0) { - _strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)]; - return Z_BUF_ERROR; + _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; + return Z_BUF_ERROR$1; } strm = _strm; // just in case @@ -1771,14 +1771,14 @@ // Write the zlib header if (status == INIT_STATE) { - header = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8; + header = (Z_DEFLATED$1 + ((w_bits - 8) << 4)) << 8; level_flags = ((level - 1) & 0xff) >> 1; if (level_flags > 3) level_flags = 3; header |= (level_flags << 6); if (strstart !== 0) - header |= PRESET_DICT; + header |= PRESET_DICT$1; header += 31 - (header % 31); status = BUSY_STATE; @@ -1796,29 +1796,29 @@ // but this is not an error situation so make sure we // return OK instead of BUF_ERROR at next call of deflate: last_flush = -1; - return Z_OK; + return Z_OK$1; } // Make sure there is something to do and avoid duplicate // consecutive // flushes. For repeated and useless calls with Z_FINISH, we keep // returning Z_STREAM_END instead of Z_BUFF_ERROR. - } else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) { - strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)]; - return Z_BUF_ERROR; + } else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH$1) { + strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; + return Z_BUF_ERROR$1; } // User must not provide more input after the first FINISH: if (status == FINISH_STATE && strm.avail_in !== 0) { - _strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)]; - return Z_BUF_ERROR; + _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; + return Z_BUF_ERROR$1; } // Start a new block or continue the current one. - if (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) { + if (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH$1 && status != FINISH_STATE)) { bstate = -1; switch (config_table[level].func) { - case STORED: + case STORED$1: bstate = deflate_stored(flush); break; case FAST: @@ -1836,7 +1836,7 @@ if (strm.avail_out === 0) { last_flush = -1; // avoid BUF_ERROR next call, see above } - return Z_OK; + return Z_OK$1; // If flush != Z_NO_FLUSH && avail_out === 0, the next call // of deflate should use the same flush parameter to make sure // that the flush is complete. So we don't have to output an @@ -1862,20 +1862,20 @@ strm.flush_pending(); if (strm.avail_out === 0) { last_flush = -1; // avoid BUF_ERROR at next call, see above - return Z_OK; + return Z_OK$1; } } } - if (flush != Z_FINISH) - return Z_OK; - return Z_STREAM_END; + if (flush != Z_FINISH$1) + return Z_OK$1; + return Z_STREAM_END$1; }; } // ZStream - function ZStream() { + function ZStream$1() { const that = this; that.next_in_index = 0; that.next_out_index = 0; @@ -1889,19 +1889,19 @@ // that.dstate; } - ZStream.prototype = { + ZStream$1.prototype = { deflateInit: function (level, bits) { const that = this; - that.dstate = new Deflate(); + that.dstate = new Deflate$1(); if (!bits) - bits = MAX_BITS; + bits = MAX_BITS$1; return that.dstate.deflateInit(that, level, bits); }, deflate: function (flush) { const that = this; if (!that.dstate) { - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; } return that.dstate.deflate(that, flush); }, @@ -1909,7 +1909,7 @@ deflateEnd: function () { const that = this; if (!that.dstate) - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; const ret = that.dstate.deflateEnd(); that.dstate = null; return ret; @@ -1918,14 +1918,14 @@ deflateParams: function (level, strategy) { const that = this; if (!that.dstate) - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; return that.dstate.deflateParams(that, level, strategy); }, deflateSetDictionary: function (dictionary, dictLength) { const that = this; if (!that.dstate) - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; return that.dstate.deflateSetDictionary(that, dictionary, dictLength); }, @@ -1986,9 +1986,9 @@ function ZipDeflate(options) { const that = this; - const z = new ZStream(); + const z = new ZStream$1(); const bufsize = 512; - const flush = Z_NO_FLUSH; + const flush = Z_NO_FLUSH$1; const buf = new Uint8Array(bufsize); let level = options ? options.level : Z_DEFAULT_COMPRESSION; if (typeof level == "undefined") @@ -2008,7 +2008,7 @@ z.next_out_index = 0; z.avail_out = bufsize; err = z.deflate(flush); - if (err != Z_OK) + if (err != Z_OK$1) throw new Error("deflating: " + z.msg); if (z.next_out_index) if (z.next_out_index == bufsize) @@ -2034,8 +2034,8 @@ do { z.next_out_index = 0; z.avail_out = bufsize; - err = z.deflate(Z_FINISH); - if (err != Z_STREAM_END && err != Z_OK) + err = z.deflate(Z_FINISH$1); + if (err != Z_STREAM_END$1 && err != Z_OK$1) throw new Error("deflating: " + z.msg); if (bufsize - z.avail_out > 0) buffers.push(new Uint8Array(buf.subarray(0, z.next_out_index))); @@ -2080,15 +2080,15 @@ */ // Global - const MAX_BITS$1 = 15; + const MAX_BITS = 15; - const Z_OK$1 = 0; - const Z_STREAM_END$1 = 1; - const Z_NEED_DICT$1 = 2; - const Z_STREAM_ERROR$1 = -2; - const Z_DATA_ERROR$1 = -3; + const Z_OK = 0; + const Z_STREAM_END = 1; + const Z_NEED_DICT = 2; + const Z_STREAM_ERROR = -2; + const Z_DATA_ERROR = -3; const Z_MEM_ERROR = -4; - const Z_BUF_ERROR$1 = -5; + const Z_BUF_ERROR = -5; const inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff]; @@ -2096,8 +2096,8 @@ const MANY = 1440; // JZlib version : "1.0.2" - const Z_NO_FLUSH$1 = 0; - const Z_FINISH$1 = 4; + const Z_NO_FLUSH = 0; + const Z_FINISH = 4; // InfTree const fixed_bl = 9; @@ -2222,7 +2222,7 @@ if (c[0] == n) { // null input--all zero length codes t[0] = -1; m[0] = 0; - return Z_OK$1; + return Z_OK; } // Find minimum and maximum length, bound *m by those @@ -2247,11 +2247,11 @@ // Adjust last length count to fill out codes, if needed for (y = 1 << j; j < i; j++, y <<= 1) { if ((y -= c[j]) < 0) { - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; } } if ((y -= c[i]) < 0) { - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; } c[i] += y; @@ -2314,7 +2314,7 @@ // allocate new table if (hn[0] + z > MANY) { // (note: doesn't matter for fixed) - return Z_DATA_ERROR$1; // overflow of MANY + return Z_DATA_ERROR; // overflow of MANY } u[h] = q = /* hp+ */hn[0]; // DEBUG hn[0] += z; @@ -2371,7 +2371,7 @@ } } // Return Z_BUF_ERROR if we were given an incomplete table - return y !== 0 && g != 1 ? Z_BUF_ERROR$1 : Z_OK$1; + return y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK; } function initWorkArea(vsize) { @@ -2413,11 +2413,11 @@ hn[0] = 0; result = huft_build(c, 0, 19, 19, null, null, tb, bb, hp, hn, v); - if (result == Z_DATA_ERROR$1) { + if (result == Z_DATA_ERROR) { z.msg = "oversubscribed dynamic bit lengths tree"; - } else if (result == Z_BUF_ERROR$1 || bb[0] === 0) { + } else if (result == Z_BUF_ERROR || bb[0] === 0) { z.msg = "incomplete dynamic bit lengths tree"; - result = Z_DATA_ERROR$1; + result = Z_DATA_ERROR; } return result; }; @@ -2438,12 +2438,12 @@ initWorkArea(288); hn[0] = 0; result = huft_build(c, 0, nl, 257, cplens, cplext, tl, bl, hp, hn, v); - if (result != Z_OK$1 || bl[0] === 0) { - if (result == Z_DATA_ERROR$1) { + if (result != Z_OK || bl[0] === 0) { + if (result == Z_DATA_ERROR) { z.msg = "oversubscribed literal/length tree"; } else if (result != Z_MEM_ERROR) { z.msg = "incomplete literal/length tree"; - result = Z_DATA_ERROR$1; + result = Z_DATA_ERROR; } return result; } @@ -2452,20 +2452,20 @@ initWorkArea(288); result = huft_build(c, nl, nd, 0, cpdist, cpdext, td, bd, hp, hn, v); - if (result != Z_OK$1 || (bd[0] === 0 && nl > 257)) { - if (result == Z_DATA_ERROR$1) { + if (result != Z_OK || (bd[0] === 0 && nl > 257)) { + if (result == Z_DATA_ERROR) { z.msg = "oversubscribed distance tree"; - } else if (result == Z_BUF_ERROR$1) { + } else if (result == Z_BUF_ERROR) { z.msg = "incomplete distance tree"; - result = Z_DATA_ERROR$1; + result = Z_DATA_ERROR; } else if (result != Z_MEM_ERROR) { z.msg = "empty distance tree with lengths"; - result = Z_DATA_ERROR$1; + result = Z_DATA_ERROR; } return result; } - return Z_OK$1; + return Z_OK; }; } @@ -2479,7 +2479,7 @@ bd[0] = fixed_bd; tl[0] = fixed_tl; td[0] = fixed_td; - return Z_OK$1; + return Z_OK; }; // InfCodes @@ -2702,7 +2702,7 @@ z.next_in_index = p; s.write = q; - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; } // eslint-disable-next-line no-constant-condition } while (true); @@ -2737,7 +2737,7 @@ z.next_in_index = p; s.write = q; - return Z_STREAM_END$1; + return Z_STREAM_END; } else { z.msg = "invalid literal/length code"; @@ -2754,7 +2754,7 @@ z.next_in_index = p; s.write = q; - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; } // eslint-disable-next-line no-constant-condition } while (true); @@ -2774,7 +2774,7 @@ z.next_in_index = p; s.write = q; - return Z_OK$1; + return Z_OK; } that.init = function (bl, bd, tl, tl_index, td, td_index) { @@ -2831,8 +2831,8 @@ q = s.write; m = q < s.read ? s.read - q - 1 : s.end - q; - if (r != Z_OK$1) { - mode = r == Z_STREAM_END$1 ? WASH : BADCODE; + if (r != Z_OK) { + mode = r == Z_STREAM_END ? WASH : BADCODE; break; } } @@ -2847,7 +2847,7 @@ while (k < (j)) { if (n !== 0) - r = Z_OK$1; + r = Z_OK; else { s.bitb = b; @@ -2892,7 +2892,7 @@ } mode = BADCODE; // invalid code z.msg = "invalid literal/length code"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; s.bitb = b; s.bitk = k; @@ -2907,7 +2907,7 @@ while (k < (j)) { if (n !== 0) - r = Z_OK$1; + r = Z_OK; else { s.bitb = b; @@ -2938,7 +2938,7 @@ while (k < (j)) { if (n !== 0) - r = Z_OK$1; + r = Z_OK; else { s.bitb = b; @@ -2973,7 +2973,7 @@ } mode = BADCODE; // invalid code z.msg = "invalid distance code"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; s.bitb = b; s.bitk = k; @@ -2988,7 +2988,7 @@ while (k < (j)) { if (n !== 0) - r = Z_OK$1; + r = Z_OK; else { s.bitb = b; @@ -3082,7 +3082,7 @@ } } } - r = Z_OK$1; + r = Z_OK; s.window[q++] = /* (byte) */lit; m--; @@ -3113,7 +3113,7 @@ mode = END; /* falls through */ case END: - r = Z_STREAM_END$1; + r = Z_STREAM_END; s.bitb = b; s.bitk = k; z.avail_in = n; @@ -3124,7 +3124,7 @@ case BADCODE: // x: got error - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; s.bitb = b; s.bitk = k; @@ -3135,7 +3135,7 @@ return s.inflate_flush(z, r); default: - r = Z_STREAM_ERROR$1; + r = Z_STREAM_ERROR; s.bitb = b; s.bitk = k; @@ -3162,7 +3162,7 @@ const TYPE = 0; // get type bits (3, including end bit) const LENS = 1; // get lengths for stored - const STORED$1 = 2;// processing stored block + const STORED = 2;// processing stored block const TABLE = 3; // get table lengths const BTREE = 4; // get bit lengths tree for a dynamic // block @@ -3231,8 +3231,8 @@ n = /* (int) */((q <= that.write ? that.write : that.end) - q); if (n > z.avail_out) n = z.avail_out; - if (n !== 0 && r == Z_BUF_ERROR$1) - r = Z_OK$1; + if (n !== 0 && r == Z_BUF_ERROR) + r = Z_OK; // update counters z.avail_out -= n; @@ -3254,8 +3254,8 @@ n = that.write - q; if (n > z.avail_out) n = z.avail_out; - if (n !== 0 && r == Z_BUF_ERROR$1) - r = Z_OK$1; + if (n !== 0 && r == Z_BUF_ERROR) + r = Z_OK; // update counters z.avail_out -= n; @@ -3308,7 +3308,7 @@ while (k < (3)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3374,7 +3374,7 @@ // } mode = BADBLOCKS; z.msg = "invalid block type"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; that.bitb = b; that.bitk = k; @@ -3389,7 +3389,7 @@ while (k < (32)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3407,7 +3407,7 @@ if ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) { mode = BADBLOCKS; z.msg = "invalid stored block lengths"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; that.bitb = b; that.bitk = k; @@ -3419,9 +3419,9 @@ } left = (b & 0xffff); b = k = 0; // dump bits - mode = left !== 0 ? STORED$1 : (last !== 0 ? DRY : TYPE); + mode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE); break; - case STORED$1: + case STORED: if (n === 0) { that.bitb = b; that.bitk = k; @@ -3457,7 +3457,7 @@ } } } - r = Z_OK$1; + r = Z_OK; t = left; if (t > n) @@ -3477,7 +3477,7 @@ while (k < (14)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3497,7 +3497,7 @@ if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) { mode = BADBLOCKS; z.msg = "too many length or distance symbols"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; that.bitb = b; that.bitk = k; @@ -3528,7 +3528,7 @@ while (index < 4 + (table >>> 10)) { while (k < (3)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3557,9 +3557,9 @@ bb[0] = 7; t = inftree.inflate_trees_bits(blens, bb, tb, hufts, z); - if (t != Z_OK$1) { + if (t != Z_OK) { r = t; - if (r == Z_DATA_ERROR$1) { + if (r == Z_DATA_ERROR) { blens = null; mode = BADBLOCKS; } @@ -3590,7 +3590,7 @@ while (k < (t)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3622,7 +3622,7 @@ while (k < (t + i)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3651,7 +3651,7 @@ blens = null; mode = BADBLOCKS; z.msg = "invalid bit length repeat"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; that.bitb = b; that.bitk = k; @@ -3682,8 +3682,8 @@ t = table; t = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z); - if (t != Z_OK$1) { - if (t == Z_DATA_ERROR$1) { + if (t != Z_OK) { + if (t == Z_DATA_ERROR) { blens = null; mode = BADBLOCKS; } @@ -3709,10 +3709,10 @@ z.next_in_index = p; that.write = q; - if ((r = codes.proc(that, z, r)) != Z_STREAM_END$1) { + if ((r = codes.proc(that, z, r)) != Z_STREAM_END) { return that.inflate_flush(z, r); } - r = Z_OK$1; + r = Z_OK; codes.free(z); p = z.next_in_index; @@ -3745,7 +3745,7 @@ mode = DONELOCKS; /* falls through */ case DONELOCKS: - r = Z_STREAM_END$1; + r = Z_STREAM_END; that.bitb = b; that.bitk = k; @@ -3755,7 +3755,7 @@ that.write = q; return that.inflate_flush(z, r); case BADBLOCKS: - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; that.bitb = b; that.bitk = k; @@ -3766,7 +3766,7 @@ return that.inflate_flush(z, r); default: - r = Z_STREAM_ERROR$1; + r = Z_STREAM_ERROR; that.bitb = b; that.bitk = k; @@ -3802,9 +3802,9 @@ // Inflate // preset dictionary flag in zlib header - const PRESET_DICT$1 = 0x20; + const PRESET_DICT = 0x20; - const Z_DEFLATED$1 = 8; + const Z_DEFLATED = 8; const METHOD = 0; // waiting for method byte const FLAG = 1; // waiting for flag byte @@ -3819,7 +3819,7 @@ const mark = [0, 0, 0xff, 0xff]; - function Inflate() { + function Inflate$1() { const that = this; that.mode = 0; // current inflate mode @@ -3841,13 +3841,13 @@ function inflateReset(z) { if (!z || !z.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; z.total_in = z.total_out = 0; z.msg = null; z.istate.mode = BLOCKS; z.istate.blocks.reset(z, null); - return Z_OK$1; + return Z_OK; } that.inflateEnd = function (z) { @@ -3855,7 +3855,7 @@ that.blocks.free(z); that.blocks = null; // ZFREE(z, z->state); - return Z_OK$1; + return Z_OK; }; that.inflateInit = function (z, w) { @@ -3865,7 +3865,7 @@ // set window size if (w < 8 || w > 15) { that.inflateEnd(z); - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; } that.wbits = w; @@ -3873,7 +3873,7 @@ // reset state inflateReset(z); - return Z_OK$1; + return Z_OK; }; that.inflate = function (z, f) { @@ -3881,10 +3881,10 @@ let b; if (!z || !z.istate || !z.next_in) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; const istate = z.istate; - f = f == Z_FINISH$1 ? Z_BUF_ERROR$1 : Z_OK$1; - r = Z_BUF_ERROR$1; + f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; + r = Z_BUF_ERROR; // eslint-disable-next-line no-constant-condition while (true) { switch (istate.mode) { @@ -3896,7 +3896,7 @@ z.avail_in--; z.total_in++; - if (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED$1) { + if (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) { istate.mode = BAD; z.msg = "unknown compression method"; istate.marker = 5; // can't try inflateSync @@ -3927,7 +3927,7 @@ break; } - if ((b & PRESET_DICT$1) === 0) { + if ((b & PRESET_DICT) === 0) { istate.mode = BLOCKS; break; } @@ -3976,24 +3976,24 @@ z.total_in++; istate.need += (z.read_byte(z.next_in_index++) & 0xff); istate.mode = DICT0; - return Z_NEED_DICT$1; + return Z_NEED_DICT; case DICT0: istate.mode = BAD; z.msg = "need dictionary"; istate.marker = 0; // can try inflateSync - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; case BLOCKS: r = istate.blocks.proc(z, r); - if (r == Z_DATA_ERROR$1) { + if (r == Z_DATA_ERROR) { istate.mode = BAD; istate.marker = 0; // can try inflateSync break; } - if (r == Z_OK$1) { + if (r == Z_OK) { r = f; } - if (r != Z_STREAM_END$1) { + if (r != Z_STREAM_END) { return r; } r = f; @@ -4001,11 +4001,11 @@ istate.mode = DONE; /* falls through */ case DONE: - return Z_STREAM_END$1; + return Z_STREAM_END; case BAD: - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; default: - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; } } }; @@ -4013,7 +4013,7 @@ that.inflateSetDictionary = function (z, dictionary, dictLength) { let index = 0, length = dictLength; if (!z || !z.istate || z.istate.mode != DICT0) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; const istate = z.istate; if (length >= (1 << istate.wbits)) { length = (1 << istate.wbits) - 1; @@ -4021,7 +4021,7 @@ } istate.blocks.set_dictionary(dictionary, index, length); istate.mode = BLOCKS; - return Z_OK$1; + return Z_OK; }; that.inflateSync = function (z) { @@ -4032,14 +4032,14 @@ // set up if (!z || !z.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; const istate = z.istate; if (istate.mode != BAD) { istate.mode = BAD; istate.marker = 0; } if ((n = z.avail_in) === 0) - return Z_BUF_ERROR$1; + return Z_BUF_ERROR; p = z.next_in_index; m = istate.marker; @@ -4064,7 +4064,7 @@ // return no joy or set up to restart on a new block if (m != 4) { - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; } r = z.total_in; w = z.total_out; @@ -4072,7 +4072,7 @@ z.total_in = r; z.total_out = w; istate.mode = BLOCKS; - return Z_OK$1; + return Z_OK; }; // Returns true if inflate is currently at the end of a block generated @@ -4084,36 +4084,36 @@ // waiting for these length bytes. that.inflateSyncPoint = function (z) { if (!z || !z.istate || !z.istate.blocks) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; return z.istate.blocks.sync_point(); }; } // ZStream - function ZStream$1() { + function ZStream() { } - ZStream$1.prototype = { + ZStream.prototype = { inflateInit: function (bits) { const that = this; - that.istate = new Inflate(); + that.istate = new Inflate$1(); if (!bits) - bits = MAX_BITS$1; + bits = MAX_BITS; return that.istate.inflateInit(that, bits); }, inflate: function (f) { const that = this; if (!that.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; return that.istate.inflate(that, f); }, inflateEnd: function () { const that = this; if (!that.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; const ret = that.istate.inflateEnd(that); that.istate = null; return ret; @@ -4122,13 +4122,13 @@ inflateSync: function () { const that = this; if (!that.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; return that.istate.inflateSync(that); }, inflateSetDictionary: function (dictionary, dictLength) { const that = this; if (!that.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; return that.istate.inflateSetDictionary(that, dictionary, dictLength); }, read_byte: function (start) { @@ -4145,9 +4145,9 @@ function ZipInflate() { const that = this; - const z = new ZStream$1(); + const z = new ZStream(); const bufsize = 512; - const flush = Z_NO_FLUSH$1; + const flush = Z_NO_FLUSH; const buf = new Uint8Array(bufsize); let nomoreinput = false; @@ -4170,12 +4170,12 @@ nomoreinput = true; } err = z.inflate(flush); - if (nomoreinput && (err === Z_BUF_ERROR$1)) { + if (nomoreinput && (err === Z_BUF_ERROR)) { if (z.avail_in !== 0) throw new Error("inflating: bad input"); - } else if (err !== Z_OK$1 && err !== Z_STREAM_END$1) + } else if (err !== Z_OK && err !== Z_STREAM_END) throw new Error("inflating: " + z.msg); - if ((nomoreinput || err === Z_STREAM_END$1) && (z.avail_in === data.length)) + if ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length)) throw new Error("inflating: bad input"); if (z.next_out_index) if (z.next_out_index === bufsize) @@ -4307,7 +4307,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - const table = { + const table$1 = { "application": { "andrew-inset": "ez", "annodex": "anx", @@ -5255,13 +5255,13 @@ const mimeTypes = (() => { const mimeTypes = {}; - for (let type in table) { + for (let type in table$1) { // eslint-disable-next-line no-prototype-builtins - if (table.hasOwnProperty(type)) { - for (let subtype in table[type]) { + if (table$1.hasOwnProperty(type)) { + for (let subtype in table$1[type]) { // eslint-disable-next-line no-prototype-builtins - if (table[type].hasOwnProperty(subtype)) { - const value = table[type][subtype]; + if (table$1[type].hasOwnProperty(subtype)) { + const value = table$1[type][subtype]; if (typeof value == "string") { mimeTypes[value] = type + "/" + subtype; } else { @@ -5281,7 +5281,7 @@ return filename && mimeTypes[filename.split(".").pop().toLowerCase()] || defaultValue; } - var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n;}class e{constructor(t){this.crc=t||-1;}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n;}get(){return ~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},a={name:"AES-CTR"},r=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},a),d=["deriveBits"],_=["sign"],u=[8,12,16],f=[16,24,32],c=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=y(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await p(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2);}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=y(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);r=new Uint8Array(t);}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=a[t]&&(s=!1);}return {valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=y(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await p(t,e,n,["encrypt"]),y(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=y(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=y(this.output,t);}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return {data:y(t,n),signature:n}}}async function p(t,e,n,i){t.counter=new Uint8Array(c);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,r,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),b=new Uint8Array(w);t.keys={key:await h.importKey("raw",b.subarray(0,f[t.strength]),a,!0,i),authentication:await h.importKey("raw",b.subarray(f[t.strength],2*f[t.strength]),o,!1,_),passwordVerification:b.subarray(2*f[t.strength])};}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0;}}function y(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t);}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return k(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function E(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function C(t){return 4294967295&t}class z{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new b(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const M={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),V=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new z(t,e):void 0}(n,e);},append:async t=>({data:await V.append(t.data)}),flush:()=>V.flush()};let V;function O(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=M[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data]);}catch(e){postMessage(t);}else postMessage(t);}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}});}}));const D=[0,1,2,3].concat(...O([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function K(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1;}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1);}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],_=n[2*n[2*l+1]+1]+1,_>s&&(_=s,c++),n[2*l+1]=_,l>t.max_code||(e.bl_count[_]++,u=0,l>=r&&(u=a[l-r]),f=n[2*l],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(l=e.bl_count[_];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),l--);}}(n),function(t,n,i){const a=[];let r,s,o,l=0;for(r=1;r<=15;r++)a[r]=l=l+i[r-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(a[o]++,o));}(i,t.max_code,n.bl_count);};}function R(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a;}function T(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a;}K._length_code=[0,1,2,3,4,5,6,7].concat(...O([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),K.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],K.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],K.d_code=function(t){return t<256?D[t]:D[256+(t>>>7)]},K.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],K.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],K.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],R.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],R.static_l_desc=new R(R.static_ltree,K.extra_lbits,257,286,15),R.static_d_desc=new R(R.static_dtree,K.extra_dbits,0,30,15),R.static_bl_desc=new R(null,K.extra_blbits,0,19,7);const B=[new T(0,0,0,0,0),new T(4,4,8,4,1),new T(4,5,16,8,1),new T(4,6,32,32,1),new T(4,4,16,16,2),new T(8,16,32,32,2),new T(8,16,128,128,2),new T(8,32,128,256,2),new T(32,128,258,1024,2),new T(32,258,258,4096,2)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function P(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255);}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8);}function at(e,n){let i,a,r;if(t.pending_buf[F+2*H]=e>>>8&255,t.pending_buf[F+2*H+1]=255&e,t.pending_buf[q+H]=255&n,H++,0===e?j[2*n]++:(G++,e--,j[2*(K._length_code[n]+256+1)]++,M[2*K.d_code(e)]++),0==(8191&H)&&E>2){for(i=8*H,a=m-p,r=0;r<30;r++)i+=M[2*r]*(5+K.extra_dbits[r]);if(i>>>=3,G8?$(N):Q>0&&Z(255&N),N=0,Q=0;}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function lt(e,n,i){let a,r,s=0;E>0?(O.build_tree(t),D.build_tree(t),s=function(){let e;for(Y(j,O.max_code),Y(M,D.max_code),T.build_tree(t),e=18;e>=3&&0===V[2*K.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?ot(e,n,i):r==a?(tt(2+(i?1:0),3),rt(R.static_ltree,R.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?p:-1,m-p,t),p=m,e.flush_pending();}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){l.set(l.subarray(r,r+r),0),v-=r,m-=r,p-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(l,m+k,a),k+=t,k>=3&&(f=255&l[m],f=(f<r-262?m-(r-262):0;let u=z;const f=o,c=m+258;let h=l[a+s-1],w=l[a+s];A>=C&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&l[e+s-1]==h&&l[e]==l[a]&&l[++e]==l[a+1]){a+=2,e++;do{}while(l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&as){if(v=t,s=n,n>=u)break;h=l[a+s-1],w=l[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,O.dyn_tree=j,O.stat_desc=R.static_l_desc,D.dyn_tree=M,D.stat_desc=R.static_d_desc,T.dyn_tree=V,T.stat_desc=R.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||a<9||a>15||n<0||n>9||p<0||p>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(B[E].func!=B[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=B[E].max_lazy,C=B[E].good_length,z=B[E].nice_length,U=B[E].max_chain),S=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,p=s,f=255&l[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=L[4],-2;if(0===d.avail_out)return d.msg=L[7],-5;var V;if(e=d,j=a,a=h,42==n&&(C=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),C|=z<<6,0!==m&&(C|=32),C+=31-C%31,n=113,Z((V=C)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return d.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,B[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=p+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-p>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,l),l+=t.length;})),s}},this.flush=function(){let t,a,r=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length;})),a};}W.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new q,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return -2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0));}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],G=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],J=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],N=[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],Q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],X=[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],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Z(){let t,e,n,i,a,r;function s(t,e,s,o,l,d,_,u,f,c,h){let w,b,p,x,y,g,m,v,k,A,U,I,E,S,C;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,S=1<I+v;){if(x++,I+=v,C=p-I,C=C>v?v:C,(b=1<<(g=m-I))>w+1&&(b-=w+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=C,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function $(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,d=0,_=0,u=0,f=0,c=0,h=0;function w(t,e,n,i,a,r,s,o){let l,d,_,u,f,c,h,w,b,p,x,y,g,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,c=s.bitk,b=s.write,p=b>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)w--,f|=(255&o.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,p-=g,b>=m)v=b-m,b-v>0&&2>b-v?(s.window[b++]=s.window[v++],s.window[b++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),b),b+=2,v+=2,g-=2);else {v=b-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,b-v>0&&u>b-v)do{s.window[b++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),b),b+=u,v+=u,u=0;v=0;}}if(b-v>0&&g>b-v)do{s.window[b++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),b),b+=g,v+=g,g=0;break}if(0!=(64&u))return o.msg="invalid distance code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3;l+=d[k+2],l+=f&F[u],k=3*(_+l),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,1):(o.msg="invalid literal/length code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3);if(l+=d[k+2],l+=f&F[u],k=3*(_+l),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;break}}else f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;}while(p>=258&&w>=10);return g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,0}t.init=function(t,r,s,o,l,d){e=0,u=t,f=r,i=s,c=o,a=l,h=d,n=null;},t.proc=function(t,b,p){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,p=w(u,f,i,c,a,h,t,b),E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){l=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,b.msg="invalid literal/length code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 2:for(x=d;I>=x,I-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}return e=9,b.msg="invalid distance code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,p=t.inflate_flush(b,p),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,w,b,p,x,y,g,m;for(p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y>>1){case 0:w>>>=3,b-=3,h=7&b,w>>>=h,b-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Z.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,b-=3,a=6;break;case 2:w>>>=3,b-=3,a=3;break;case 3:return w>>>=3,b-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;b<32;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>16&65535)!=(65535&w))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);r=65535&w,w=b=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(p,h),y),p+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;b<14;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,b-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;b<3;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>=3,b-=3;}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=c.inflate_trees_bits(i,l,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,_;for(h=l[0];b>>=h,b-=h,i[o++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;b>>=h,b-=h,r+=w&F[m],w>>>=m,b-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);o=m;}}if(d[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return -3;default:return -2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return -2;const r=t.istate;return a>=1<0&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(_),r.forEach((function(t){o.set(t,d),d+=t.length;})),o}},this.flush=function(){t.inflateEnd();};}at.prototype={inflateInit:function(t){const e=this;return e.istate=new it,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return -2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=rt;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; + var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n;}class e{constructor(t){this.crc=t||-1;}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n;}get(){return ~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],a=n.getPartial(i);return 32===a?t.concat(e):n._shiftRight(e,a,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(i),i=0;if(0===e)return a.concat(t);for(let n=0;n>>e),i=t[n]<<32-e;const r=t.length?t[t.length-1]:0,s=n.getPartial(r);return a.push(n.partial(e+s&31,e+s>32?i:a.pop(),1)),a}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let a;for(let n=0;n>>24,a<<=8;return i},toBits(t){const e=[];let i,a=0;for(i=0;i>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],r%a==0&&(t=t<<8^t>>>24^o<<24,o=o<<1^283*(o>>7))),s[r]=s[r-a]^t;}for(let t=0;r;t++,r--){const e=s[3&t?r:r-4];l[t]=r<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]];}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],a=[],r=[];let s,l,o,d;for(let t=0;t<256;t++)r[(a[t]=t<<1^283*(t>>7))^t]=t;for(let _=s=0;!n[_];_^=l||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[_]=r,i[r]=_,d=a[o=a[l=a[_]]];let u=16843009*d^65537*o^257*l^16843008*_,f=257*a[r]^16843008*r;for(let n=0;n<4;n++)t[n][_]=f=f<<24^f>>>8,e[n][r]=u=u<<24^u>>>8;}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0);}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,a=[0,0,0,0],r=this._tables[e],s=r[0],l=r[1],o=r[2],d=r[3],_=r[4];let u,f,c,h=t[0]^n[0],b=t[e?3:1]^n[1],p=t[2]^n[2],w=t[e?1:3]^n[3],x=4;for(let t=0;t>>24]^l[b>>16&255]^o[p>>8&255]^d[255&w]^n[x],f=s[b>>>24]^l[p>>16&255]^o[w>>8&255]^d[255&h]^n[x+1],c=s[p>>>24]^l[w>>16&255]^o[h>>8&255]^d[255&b]^n[x+2],w=s[w>>>24]^l[h>>16&255]^o[b>>8&255]^d[255&p]^n[x+3],x+=4,h=u,b=f,p=c;for(let t=0;t<4;t++)a[e?3&-t:t]=_[h>>>24]<<24^_[b>>16&255]<<16^_[p>>8&255]<<8^_[255&w]^n[x++],u=h,h=b,b=p,p=w,w=u;return a}},r=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e;}reset(){this._iv=this._initIv;}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i;}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]));}calculate(t,e,i){let a;if(!(a=e.length))return [];const r=n.bitLength(e);for(let n=0;nt.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,I(this,t);}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return A(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,I(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function C(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function z(t){return 4294967295&t}class B{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class M{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new x(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const V={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),D=function(t,e){return e.codecType.startsWith("deflate")?new M(t,e):e.codecType.startsWith("inflate")?new B(t,e):void 0}(n,e);},append:async t=>({data:await D.append(t.data)}),flush:()=>D.flush()};let D;function K(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=V[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data]);}catch(e){postMessage(t);}else postMessage(t);}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}});}}));const P=[0,1,2,3].concat(...K([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function j(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1;}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,l,o,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);o=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=l,i[2*o]=i[2*s]+i[2*l],n.depth[o]=Math.max(n.depth[s],n.depth[l])+1,i[2*s+1]=i[2*l+1]=o,n.heap[1]=o++,n.pqdownheap(i,1);}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,o,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)o=e.heap[l],_=n[2*n[2*o+1]+1]+1,_>s&&(_=s,c++),n[2*o+1]=_,o>t.max_code||(e.bl_count[_]++,u=0,o>=r&&(u=a[o-r]),f=n[2*o],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*o+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(o=e.bl_count[_];0!==o;)d=e.heap[--l],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),o--);}}(n),function(t,n,i){const a=[];let r,s,l,o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(s=0;s<=n;s++)l=t[2*s+1],0!==l&&(t[2*s]=e(a[l]++,l));}(i,t.max_code,n.bl_count);};}function L(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a;}function R(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a;}j._length_code=[0,1,2,3,4,5,6,7].concat(...K([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),j.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],j.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],j.d_code=function(t){return t<256?P[t]:P[256+(t>>>7)]},j.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],j.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],j.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],L.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],L.static_l_desc=new L(L.static_ltree,j.extra_lbits,257,286,15),L.static_d_desc=new L(L.static_dtree,j.extra_dbits,0,30,15),L.static_bl_desc=new L(null,j.extra_blbits,0,19,7);const W=[new R(0,0,0,0,0),new R(4,4,8,4,1),new R(4,5,16,8,1),new R(4,6,32,32,1),new R(4,4,16,16,2),new R(8,16,32,32,2),new R(8,16,128,128,2),new R(8,32,128,256,2),new R(32,128,258,1024,2),new R(32,258,258,4096,2)],G=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function O(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255);}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8);}function at(e,n){let i,a,r;if(t.pending_buf[H+2*q]=e>>>8&255,t.pending_buf[H+2*q+1]=255&e,t.pending_buf[R+q]=255&n,q++,0===e?B[2*n]++:(F++,e--,B[2*(j._length_code[n]+256+1)]++,M[2*j.d_code(e)]++),0==(8191&q)&&E>2){for(i=8*q,a=m-w,r=0;r<30;r++)i+=M[2*r]*(5+j.extra_dbits[r]);if(i>>>=3,F8?$(N):Q>0&&Z(255&N),N=0,Q=0;}function lt(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(o.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function ot(e,n,i){let a,r,s=0;E>0?(D.build_tree(t),K.build_tree(t),s=function(){let e;for(Y(B,D.max_code),Y(M,K.max_code),P.build_tree(t),e=18;e>=3&&0===V[2*j.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?lt(e,n,i):r==a?(tt(2+(i?1:0),3),rt(L.static_ltree,L.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?w:-1,m-w,t),w=m,e.flush_pending();}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){o.set(o.subarray(r,r+r),0),v-=r,m-=r,w-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(o,m+k,a),k+=t,k>=3&&(f=255&o[m],f=(f<r-262?m-(r-262):0;let u=z;const f=l,c=m+258;let h=o[a+s-1],b=o[a+s];A>=S&&(i>>=2),u>k&&(u=k);do{if(e=t,o[e+s]==b&&o[e+s-1]==h&&o[e]==o[a]&&o[++e]==o[a+1]){a+=2,e++;do{}while(o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&as){if(v=t,s=n,n>=u)break;h=o[a+s-1],b=o[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,D.dyn_tree=B,D.stat_desc=L.static_l_desc,K.dyn_tree=M,K.stat_desc=L.static_d_desc,P.dyn_tree=V,P.stat_desc=L.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||a<9||a>15||n<0||n>9||w<0||w>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(W[E].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=W[E].max_lazy,S=W[E].good_length,z=W[E].nice_length,U=W[E].max_chain),C=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),o.set(e.subarray(d,d+s),0),m=s,w=s,f=255&o[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=G[4],-2;if(0===d.avail_out)return d.msg=G[7],-5;var V;if(e=d,B=a,a=h,42==n&&(S=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),S|=z<<6,0!==m&&(S|=32),S+=31-S%31,n=113,Z((V=S)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=B&&4!=h)return e.msg=G[7],-5;if(666==n&&0!==e.avail_in)return d.msg=G[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,W[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=w+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-w>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,o),o+=t.length;})),s}},this.flush=function(){let t,a,r=0,s=0;const l=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&l.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),l.forEach((function(t){a.set(t,r),r+=t.length;})),a};}q.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new T,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return -2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0));}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],J=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],N=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Q=[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],X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Y=[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],Z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function $(){let t,e,n,i,a,r;function s(t,e,s,l,o,d,_,u,f,c,h){let b,p,w,x,y,g,m,v,k,A,U,I,E,C,S;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,C=1<I+v;){if(x++,I+=v,S=w-I,S=S>v?v:S,(p=1<<(g=m-I))>b+1&&(p-=b+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=S,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function tt(){const t=this;let e,n,i,a,r=0,s=0,l=0,o=0,d=0,_=0,u=0,f=0,c=0,h=0;function b(t,e,n,i,a,r,s,l){let o,d,_,u,f,c,h,b,p,w,x,y,g,m,v,k;h=l.next_in_index,b=l.avail_in,f=s.bitb,c=s.bitk,p=s.write,w=p>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)b--,f|=(255&l.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,w-=g,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,g-=2);else {v=p-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0;}}if(p-v>0&&g>p-v)do{s.window[p++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),p),p+=g,v+=g,g=0;break}if(0!=(64&u))return l.msg="invalid distance code",g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3;o+=d[k+2],o+=f&F[u],k=3*(_+o),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,1):(l.msg="invalid literal/length code",g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3);if(o+=d[k+2],o+=f&F[u],k=3*(_+o),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--;break}}else f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--;}while(w>=258&&b>=10);return g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,0}t.init=function(t,r,s,l,o,d){e=0,u=t,f=r,i=s,c=l,a=o,h=d,n=null;},t.proc=function(t,p,w){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,w=b(u,f,i,c,a,h,t,p),E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){o=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,p.msg="invalid literal/length code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 2:for(x=d;I>=x,I-=x,l=f,n=a,s=h,e=3;case 3:for(x=l;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}return e=9,p.msg="invalid distance code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,w=t.inflate_flush(p,w),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,p,w,x,y,g,m;for(w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y>>1){case 0:b>>>=3,p-=3,h=7&p,b>>>=h,p-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],$.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),b>>>=3,p-=3,a=6;break;case 2:b>>>=3,p-=3,a=3;break;case 3:return b>>>=3,p-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);r=65535&b,b=p=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(w,h),y),w+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;p<14;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,l=0,a=4;case 4:for(;l<4+(s>>>10);){for(;p<3;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<>>=3,p-=3;}for(;l<19;)i[et[l++]]=0;if(o[0]=7,h=c.inflate_trees_bits(i,o,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);l=0,a=5;case 5:for(;h=s,!(l>=258+(31&h)+(h>>5&31));){let r,_;for(h=o[0];p>>=h,p-=h,i[l++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;p>>=h,p-=h,r+=b&F[m],b>>>=m,p-=m,m=l,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);l=m;}}if(d[0]=-1,I=[],E=[],C=[],S=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,C,S,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,C[0],f,S[0]),a=6;case 6:if(n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new nt(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return -3;default:return -2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return -2;const r=t.istate;return a>=1<0&&t.next_in_index!=o&&(a(t.next_in_index),o=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(_),r.forEach((function(t){l.set(t,d),d+=t.length;})),l}},this.flush=function(){t.inflateEnd();};}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new at,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return -2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=st;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; var streamCodecShim = (library, options = {}, registerDataHandler) => { return { @@ -5880,7 +5880,7 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - const table$1 = []; + const table = []; for (let i = 0; i < 256; i++) { let t = i; for (let j = 0; j < 8; j++) { @@ -5890,7 +5890,7 @@ t = t >>> 1; } } - table$1[i] = t; + table[i] = t; } class Crc32 { @@ -5902,7 +5902,7 @@ append(data) { let crc = this.crc | 0; for (let offset = 0, length = data.length | 0; offset < length; offset++) { - crc = (crc >>> 8) ^ table$1[(crc ^ data[offset]) & 0xFF]; + crc = (crc >>> 8) ^ table[(crc ^ data[offset]) & 0xFF]; } this.crc = crc; } @@ -6578,7 +6578,7 @@ } async function createDecryptionKeys(decrypt, preambuleArray, password) { - await createKeys(decrypt, password, preambuleArray.subarray(0, SALT_LENGTH[decrypt.strength])); + await createKeys$1(decrypt, password, preambuleArray.subarray(0, SALT_LENGTH[decrypt.strength])); const passwordVerification = preambuleArray.subarray(SALT_LENGTH[decrypt.strength]); const passwordVerificationKey = decrypt.keys.passwordVerification; if (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) { @@ -6588,11 +6588,11 @@ async function createEncryptionKeys(encrypt, password) { const salt = crypto.getRandomValues(new Uint8Array(SALT_LENGTH[encrypt.strength])); - await createKeys(encrypt, password, salt); + await createKeys$1(encrypt, password, salt); return concat(salt, encrypt.keys.passwordVerification); } - async function createKeys(target, password, salt) { + async function createKeys$1(target, password, salt) { const encodedPassword = (new TextEncoder()).encode(password); const basekey = await subtle.importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE); const derivedBits = await subtle.deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), basekey, 8 * ((KEY_LENGTH[target.strength] * 2) + 2)); @@ -6658,7 +6658,7 @@ constructor(password, passwordVerification) { this.password = password; this.passwordVerification = passwordVerification; - createKeys$1(this, password); + createKeys(this, password); } async append(input) { @@ -6686,7 +6686,7 @@ constructor(password, passwordVerification) { this.passwordVerification = passwordVerification; this.password = password; - createKeys$1(this, password); + createKeys(this, password); } async append(input) { @@ -6732,7 +6732,7 @@ return output; } - function createKeys$1(target, password) { + function createKeys(target, password) { target.keys = [0x12345678, 0x23456789, 0x34567890]; target.crcKey0 = new Crc32(target.keys[0]); target.crcKey2 = new Crc32(target.keys[2]); @@ -6795,7 +6795,7 @@ const CODEC_INFLATE = "inflate"; const ERR_INVALID_SIGNATURE = "Invalid signature"; - class Inflate$1 { + class Inflate { constructor(codecConstructor, options) { this.signature = options.signature; @@ -6850,7 +6850,7 @@ } } - class Deflate$1 { + class Deflate { constructor(codecConstructor, options) { this.encrypted = options.encrypted; @@ -6900,11 +6900,11 @@ } } - function createCodec(codecConstructor, options) { + function createCodec$1(codecConstructor, options) { if (options.codecType.startsWith(CODEC_DEFLATE)) { - return new Deflate$1(codecConstructor, options); + return new Deflate(codecConstructor, options); } else if (options.codecType.startsWith(CODEC_INFLATE)) { - return new Inflate$1(codecConstructor, options); + return new Inflate(codecConstructor, options); } } @@ -6958,7 +6958,7 @@ }; function createWorkerInterface(workerData) { - const interfaceCodec = createCodec(workerData.codecConstructor, workerData.options); + const interfaceCodec = createCodec$1(workerData.codecConstructor, workerData.options); return { async append(data) { try { @@ -7081,7 +7081,7 @@ let pool = []; let pendingRequests = []; - function createCodec$1(codecConstructor, options, config) { + function createCodec(codecConstructor, options, config) { const streamCopy = !options.compressed && !options.signed && !options.encrypted; const webWorker = !streamCopy && (options.useWebWorkers || (options.useWebWorkers === undefined && config.useWebWorkers)); const scripts = webWorker && config.workerScripts ? config.workerScripts[options.codecType] : []; @@ -7335,7 +7335,7 @@ } const entries = []; for (let indexFile = 0; indexFile < filesLength; indexFile++) { - const fileEntry = new ZipEntry(this.reader, this.config, this.options); + const fileEntry = new ZipEntry$1(this.reader, this.config, this.options); if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) { throw new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND); } @@ -7346,7 +7346,7 @@ fileEntry.directory = (getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK; fileEntry.offset = getUint32(directoryView, offset + 42) + prependedBytesLength; fileEntry.rawFilename = directoryArray.subarray(offset + 46, offset + 46 + fileEntry.filenameLength); - const filenameEncoding = getOptionValue(this, options, "filenameEncoding"); + const filenameEncoding = getOptionValue$1(this, options, "filenameEncoding"); fileEntry.filenameUTF8 = fileEntry.commentUTF8 = Boolean(fileEntry.bitFlag.languageEncodingFlag); fileEntry.filename = decodeString(fileEntry.rawFilename, fileEntry.filenameUTF8 ? CHARSET_UTF8 : filenameEncoding); if (!fileEntry.directory && fileEntry.filename.endsWith(DIRECTORY_SIGNATURE)) { @@ -7355,7 +7355,7 @@ fileEntry.rawExtraField = directoryArray.subarray(offset + 46 + fileEntry.filenameLength, offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength); fileEntry.rawComment = directoryArray.subarray(offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength, offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength + fileEntry.commentLength); - const commentEncoding = getOptionValue(this, options, "commentEncoding"); + const commentEncoding = getOptionValue$1(this, options, "commentEncoding"); fileEntry.comment = decodeString(fileEntry.rawComment, fileEntry.commentUTF8 ? CHARSET_UTF8 : commentEncoding); readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6); const entry = new Entry(fileEntry); @@ -7370,7 +7370,7 @@ } } - class ZipEntry { + class ZipEntry$1 { constructor(reader, config, options) { this.reader = reader; @@ -7391,7 +7391,7 @@ const config = this.config; const bitFlag = this.bitFlag; const signature = this.signature; - let password = getOptionValue(this, options, "password"); + let password = getOptionValue$1(this, options, "password"); password = password && password.length && password; if (extraFieldAES) { if (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) { @@ -7418,22 +7418,22 @@ throw new Error(ERR_ENCRYPTED); } } - const codec = await createCodec$1(config.Inflate, { + const codec = await createCodec(config.Inflate, { codecType: CODEC_INFLATE, password, zipCrypto, encryptionStrength: extraFieldAES && extraFieldAES.strength, - signed: getOptionValue(this, options, "checkSignature"), + signed: getOptionValue$1(this, options, "checkSignature"), passwordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((this.rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)), signature, compressed: compressionMethod != 0, encrypted, - useWebWorkers: getOptionValue(this, options, "useWebWorkers") + useWebWorkers: getOptionValue$1(this, options, "useWebWorkers") }, config); if (!writer.initialized) { await writer.init(); } - await processData(codec, reader, writer, dataOffset, this.compressedSize, config, { onprogress: options.onprogress, signal: getOptionValue(this, options, "signal") }); + await processData(codec, reader, writer, dataOffset, this.compressedSize, config, { onprogress: options.onprogress, signal: getOptionValue$1(this, options, "signal") }); return writer.getData(); } } @@ -7554,7 +7554,7 @@ async function seekSignature(reader, signature, minimumBytes, maximumLength) { const signatureArray = new Uint8Array(4); const signatureView = new DataView(signatureArray.buffer); - setUint32(signatureView, 0, signature); + setUint32$1(signatureView, 0, signature); const maximumBytes = minimumBytes + maximumLength; return (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, reader.size)); @@ -7573,7 +7573,7 @@ } } - function getOptionValue(zipReader, options, name) { + function getOptionValue$1(zipReader, options, name) { return options[name] === undefined ? zipReader.options[name] : options[name]; } @@ -7610,7 +7610,7 @@ return Number(view.getBigUint64(offset, true)); } - function setUint32(view, offset, value) { + function setUint32$1(view, offset, value) { view.setUint32(offset, value, true); } @@ -7663,6 +7663,7 @@ this.config = getConfiguration(); this.files = new Map(); this.offset = writer.size; + this.maxOutputSize = 0; } async add(name = "", reader, options = {}) { @@ -7692,9 +7693,9 @@ if (lastModDate < MIN_DATE || lastModDate > MAX_DATE) { throw new Error(ERR_INVALID_DATE); } - const password = getOptionValue$1(this, options, "password"); - const encryptionStrength = getOptionValue$1(this, options, "encryptionStrength") || 3; - const zipCrypto = getOptionValue$1(this, options, "zipCrypto"); + const password = getOptionValue(this, options, "password"); + const encryptionStrength = getOptionValue(this, options, "encryptionStrength") || 3; + const zipCrypto = getOptionValue(this, options, "zipCrypto"); if (password !== undefined && encryptionStrength !== undefined && (encryptionStrength < 1 || encryptionStrength > 3)) { throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH); } @@ -7721,17 +7722,22 @@ offset += 4 + data.length; }); } - const outputSize = reader ? reader.size * 1.05 : 0; - const zip64 = options.zip64 || this.options.zip64 || this.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || this.offset + outputSize >= MAX_32_BITS; - const level = getOptionValue$1(this, options, "level"); - const useWebWorkers = getOptionValue$1(this, options, "useWebWorkers"); - const bufferedWrite = getOptionValue$1(this, options, "bufferedWrite"); - const keepOrder = getOptionValue$1(this, options, "keepOrder"); - let dataDescriptor = getOptionValue$1(this, options, "dataDescriptor"); - const signal = getOptionValue$1(this, options, "signal"); + const outputSize = reader ? Math.floor(reader.size * 1.05) : 0; + this.maxOutputSize += outputSize; + await Promise.resolve(); + const zip64 = options.zip64 || this.options.zip64 || this.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || this.offset + this.maxOutputSize >= MAX_32_BITS; + const level = getOptionValue(this, options, "level"); + const useWebWorkers = getOptionValue(this, options, "useWebWorkers"); + const bufferedWrite = getOptionValue(this, options, "bufferedWrite"); + let keepOrder = getOptionValue(this, options, "keepOrder"); + let dataDescriptor = getOptionValue(this, options, "dataDescriptor"); + const signal = getOptionValue(this, options, "signal"); if (dataDescriptor === undefined) { dataDescriptor = true; } + if (keepOrder === undefined) { + keepOrder = true; + } const fileEntry = await addFile(this, name, reader, Object.assign({}, options, { rawFilename, rawComment, @@ -7749,6 +7755,7 @@ dataDescriptor, signal })); + this.maxOutputSize -= outputSize; Object.assign(fileEntry, { name, comment, extraField }); return new Entry(fileEntry); } @@ -7783,7 +7790,7 @@ const rawExtraFieldZip64 = fileEntry.rawExtraFieldZip64; const rawExtraFieldAES = fileEntry.rawExtraFieldAES; const extraFieldLength = rawExtraFieldZip64.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length; - setUint32$1(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE); + setUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE); setUint16(directoryView, offset + 4, fileEntry.version); directoryArray.set(fileEntry.headerArray, offset + 6); setUint16(directoryView, offset + 30, extraFieldLength); @@ -7792,9 +7799,9 @@ setUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK); } if (fileEntry.zip64) { - setUint32$1(directoryView, offset + 42, MAX_32_BITS); + setUint32(directoryView, offset + 42, MAX_32_BITS); } else { - setUint32$1(directoryView, offset + 42, fileEntry.offset); + setUint32(directoryView, offset + 42, fileEntry.offset); } directoryArray.set(rawFilename, offset + 46); directoryArray.set(rawExtraFieldZip64, offset + 46 + rawFilename.length); @@ -7804,7 +7811,7 @@ offset += 46 + rawFilename.length + extraFieldLength + fileEntry.rawComment.length; } if (zip64) { - setUint32$1(directoryView, offset, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE); + setUint32(directoryView, offset, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE); setBigUint64(directoryView, offset + 4, BigInt(44)); setUint16(directoryView, offset + 12, 45); setUint16(directoryView, offset + 14, 45); @@ -7812,19 +7819,19 @@ setBigUint64(directoryView, offset + 32, BigInt(filesLength)); setBigUint64(directoryView, offset + 40, BigInt(directoryDataLength)); setBigUint64(directoryView, offset + 48, BigInt(directoryOffset)); - setUint32$1(directoryView, offset + 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE); + setUint32(directoryView, offset + 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE); setBigUint64(directoryView, offset + 64, BigInt(directoryOffset) + BigInt(directoryDataLength)); - setUint32$1(directoryView, offset + 72, ZIP64_TOTAL_NUMBER_OF_DISKS); + setUint32(directoryView, offset + 72, ZIP64_TOTAL_NUMBER_OF_DISKS); filesLength = MAX_16_BITS; directoryOffset = MAX_32_BITS; directoryDataLength = MAX_32_BITS; offset += 76; } - setUint32$1(directoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE); + setUint32(directoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE); setUint16(directoryView, offset + 8, filesLength); setUint16(directoryView, offset + 10, filesLength); - setUint32$1(directoryView, offset + 12, directoryDataLength); - setUint32$1(directoryView, offset + 16, directoryOffset); + setUint32(directoryView, offset + 12, directoryDataLength); + setUint32(directoryView, offset + 16, directoryOffset); await writer.writeUint8Array(directoryArray); if (comment.length) { await writer.writeUint8Array(comment); @@ -7876,14 +7883,14 @@ if (!options.dataDescriptor) { const arrayBufferView = new DataView(arrayBuffer); if (!fileEntry.encrypted || options.zipCrypto) { - setUint32$1(arrayBufferView, 14, fileEntry.signature); + setUint32(arrayBufferView, 14, fileEntry.signature); } if (fileEntry.zip64) { - setUint32$1(arrayBufferView, 18, MAX_32_BITS); - setUint32$1(arrayBufferView, 22, MAX_32_BITS); + setUint32(arrayBufferView, 18, MAX_32_BITS); + setUint32(arrayBufferView, 22, MAX_32_BITS); } else { - setUint32$1(arrayBufferView, 18, fileEntry.compressedSize); - setUint32$1(arrayBufferView, 22, fileEntry.uncompressedSize); + setUint32(arrayBufferView, 18, fileEntry.compressedSize); + setUint32(arrayBufferView, 22, fileEntry.uncompressedSize); } } await writer.writeUint8Array(new Uint8Array(arrayBuffer)); @@ -7968,20 +7975,23 @@ setUint16(dateView, 0, (((lastModDate.getHours() << 6) | lastModDate.getMinutes()) << 5) | lastModDate.getSeconds() / 2); setUint16(dateView, 2, ((((lastModDate.getFullYear() - 1980) << 4) | (lastModDate.getMonth() + 1)) << 5) | lastModDate.getDate()); const rawLastModDate = dateArray[0]; - setUint32$1(headerView, 6, rawLastModDate); + setUint32(headerView, 6, rawLastModDate); setUint16(headerView, 22, rawFilename.length); setUint16(headerView, 24, 0); - const fileDataArray = new Uint8Array(30 + rawFilename.length); - const fileDataView = new DataView(fileDataArray.buffer); - setUint32$1(fileDataView, 0, LOCAL_FILE_HEADER_SIGNATURE); - fileDataArray.set(headerArray, 4); - fileDataArray.set(rawFilename, 30); + setUint16(headerView, 24, rawExtraFieldAES.length + fileEntry.rawExtraField.length); + const footerArray = new Uint8Array(30 + rawFilename.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length); + const footerView = new DataView(footerArray.buffer); + setUint32(footerView, 0, LOCAL_FILE_HEADER_SIGNATURE); + footerArray.set(headerArray, 4); + footerArray.set(rawFilename, 30); + footerArray.set(rawExtraFieldAES, 30 + rawFilename.length); + footerArray.set(fileEntry.rawExtraField, 30 + rawFilename.length + rawExtraFieldAES.length); let result; let uncompressedSize = 0; let compressedSize = 0; if (reader) { uncompressedSize = reader.size; - const codec = await createCodec$1(config.Deflate, { + const codec = await createCodec(config.Deflate, { codecType: CODEC_DEFLATE, level, password, @@ -7993,57 +8003,57 @@ encrypted, useWebWorkers: options.useWebWorkers }, config); - await writer.writeUint8Array(fileDataArray); + await writer.writeUint8Array(footerArray); result = await processData(codec, reader, writer, 0, uncompressedSize, config, { onprogress: options.onprogress, signal: options.signal }); compressedSize = result.length; } else { - await writer.writeUint8Array(fileDataArray); + await writer.writeUint8Array(footerArray); } let dataDescriptorArray = new Uint8Array(0); let dataDescriptorView; if (options.dataDescriptor) { dataDescriptorArray = new Uint8Array(zip64 ? 24 : 16); dataDescriptorView = new DataView(dataDescriptorArray.buffer); - setUint32$1(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE); + setUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE); } if (reader) { if ((!encrypted || options.zipCrypto) && result.signature !== undefined) { - setUint32$1(headerView, 10, result.signature); + setUint32(headerView, 10, result.signature); fileEntry.signature = result.signature; if (options.dataDescriptor) { - setUint32$1(dataDescriptorView, 4, result.signature); + setUint32(dataDescriptorView, 4, result.signature); } } if (zip64) { const rawExtraFieldZip64View = new DataView(fileEntry.rawExtraFieldZip64.buffer); setUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64); setUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64); - setUint32$1(headerView, 14, MAX_32_BITS); + setUint32(headerView, 14, MAX_32_BITS); setBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize)); - setUint32$1(headerView, 18, MAX_32_BITS); + setUint32(headerView, 18, MAX_32_BITS); setBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize)); if (options.dataDescriptor) { setBigUint64(dataDescriptorView, 8, BigInt(compressedSize)); setBigUint64(dataDescriptorView, 16, BigInt(uncompressedSize)); } } else { - setUint32$1(headerView, 14, compressedSize); - setUint32$1(headerView, 18, uncompressedSize); + setUint32(headerView, 14, compressedSize); + setUint32(headerView, 18, uncompressedSize); if (options.dataDescriptor) { - setUint32$1(dataDescriptorView, 8, compressedSize); - setUint32$1(dataDescriptorView, 12, uncompressedSize); + setUint32(dataDescriptorView, 8, compressedSize); + setUint32(dataDescriptorView, 12, uncompressedSize); } } } if (options.dataDescriptor) { await writer.writeUint8Array(dataDescriptorArray); } - const length = fileDataArray.length + (result ? result.length : 0) + dataDescriptorArray.length; + const length = footerArray.length + (result ? result.length : 0) + dataDescriptorArray.length; Object.assign(fileEntry, { compressedSize, uncompressedSize, lastModDate, rawLastModDate, encrypted, length }); return fileEntry; } - function getOptionValue$1(zipWriter, options, name) { + function getOptionValue(zipWriter, options, name) { return options[name] === undefined ? zipWriter.options[name] : options[name]; } @@ -8055,7 +8065,7 @@ view.setUint16(offset, value, true); } - function setUint32$1(view, offset, value) { + function setUint32(view, offset, value) { view.setUint32(offset, value, true); } @@ -8093,7 +8103,7 @@ const CHUNK_SIZE = 512 * 1024; - class ZipEntry$1 { + class ZipEntry { constructor(fs, name, params, parent) { if (fs.root && parent && parent.getChildByName(name)) { @@ -8143,7 +8153,7 @@ } } - class ZipFileEntry extends ZipEntry$1 { + class ZipFileEntry extends ZipEntry { constructor(fs, name, params, parent) { super(fs, name, params, parent); @@ -8213,7 +8223,7 @@ } } - class ZipDirectoryEntry extends ZipEntry$1 { + class ZipDirectoryEntry extends ZipEntry { constructor(fs, name, params, parent) { super(fs, name, params, parent); diff --git a/dist/zip-fs-full.min.js b/dist/zip-fs-full.min.js index 55a16e2f..b17b8b5b 100644 --- a/dist/zip-fs-full.min.js +++ b/dist/zip-fs-full.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function o(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,d,l=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);d=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*d]=i[2*s]+i[2*o],n.depth[d]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=d,n.heap[1]=d++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,d,l,c,f,u,p=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)d=e.heap[o],c=n[2*n[2*d+1]+1]+1,c>s&&(c=s,p++),n[2*d+1]=c,d>t.max_code||(e.bl_count[c]++,f=0,d>=a&&(f=r[d-a]),u=n[2*d],e.opt_len+=u*(c+f),i&&(e.static_len+=u*(i[2*d+1]+f)));if(0!==p){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(c=s;0!==c;c--)for(d=e.bl_count[c];0!==d;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=c&&(e.opt_len+=(c-n[2*l+1])*n[2*l],n[2*l+1]=c),d--)}}(n),function(t,n,i){const r=[];let a,s,o,d=0;for(a=1;a<=15;a++)r[a]=d=d+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function d(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),o.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],o.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],d.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],d.static_l_desc=new d(d.static_ltree,o.extra_lbits,257,286,15),d.static_d_desc=new d(d.static_dtree,o.extra_dbits,0,30,15),d.static_bl_desc=new d(null,o.extra_blbits,0,19,7);function l(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],f=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],u=113,p=666,h=258,m=262;function x(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function dt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ut(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[X+Q]=255&i,Q++,0===n?P[2*i]++:(tt++,n--,P[2*(o._length_code[i]+e+1)]++,H[2*o.d_code(n)]++),0==(8191&Q)&&O>2){for(r=8*Q,a=C-I,s=0;s<30;s++)r+=H[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function mt(e,n,i){dt(0+(i?1:0),3),function(e,n,i){ht(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(v.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function xt(e,n,i){let r,a,s=0;O>0?(K.build_tree(t),G.build_tree(t),s=function(){let e;for(at(P,K.max_code),at(H,G.max_code),Y.build_tree(t),e=18;e>=3&&0===Z[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?mt(e,n,i):a==r?(dt(2+(i?1:0),3),pt(d.static_ltree,d.static_dtree)):(dt(4+(i?1:0),3),function(t,e,n){let i;for(dt(t-257,5),dt(e-1,5),dt(n-4,4),i=0;i=0?I:-1,C-I,t),I=C,a.flush_pending()}function wt(){let t,e,n,i;do{if(i=y-B-C,0===i&&0===C&&0===B)i=w;else if(-1==i)i--;else if(C>=w+w-m){v.set(v.subarray(w,w+w),0),T-=w,C-=w,I-=w,t=z,n=t;do{e=65535&A[--n],A[n]=e>=w?e-w:0}while(0!=--t);t=w,n=t;do{e=65535&k[--n],k[n]=e>=w?e-w:0}while(0!=--t);i+=w}if(0===a.avail_in)return;t=a.read_buf(v,C+B,i),B+=t,B>=3&&(U=255&v[C],U=(U<w-m?C-(w-m):0;let o=N;const d=b,l=C+h;let c=v[r+a-1],f=v[r+a];q>=V&&(i>>=2),o>B&&(o=B);do{if(e=t,v[e+a]==f&&v[e+a-1]==c&&v[e]==v[r]&&v[++e]==v[r+1]){r+=2,e++;do{}while(v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&ra){if(T=t,a=n,n>=o)break;c=v[r+a-1],f=v[r+a]}}}while((t=65535&k[t&d])>s&&0!=--i);return a<=B?a:B}function bt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=u,_=0,K.dyn_tree=P,K.stat_desc=d.static_l_desc,G.dyn_tree=H,G.stat_desc=d.static_d_desc,Y.dyn_tree=Z,Y.stat_desc=d.static_bl_desc,nt=0,it=0,et=8,rt(),function(){y=2*w,A[z-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,g=r,w=1<9||n<0||n>2?i:(c[O].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),O!=e&&(O=e,W=c[O].max_lazy,V=c[O].good_length,N=c[O].nice_length,M=c[O].max_chain),L=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>w-m&&(a=w-m,o=n-a),v.set(e.subarray(o,o+a),0),C=a,I=a,U=255&v[0],U=(U<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==p&&4!=o)return e.msg=f[4],i;if(0===e.avail_out)return e.msg=f[7],r;var V;if(a=e,E=_,_=o,42==s&&(x=8+(g-8<<4)<<8,y=(O-1&255)>>1,y>3&&(y=3),x|=y<<6,0!==C&&(x|=32),x+=31-x%31,s=u,st((V=x)>>8&255),st(255&V)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return _=-1,0}else if(0===a.avail_in&&o<=E&&4!=o)return a.msg=f[7],r;if(s==p&&0!==a.avail_in)return e.msg=f[7],r;if(0!==a.avail_in||0!==B||0!=o&&s!=p){switch(M=-1,c[O].func){case 0:M=function(t){let e,n=65535;for(n>l-5&&(n=l-5);;){if(B<=1){if(wt(),0===B&&0==t)return 0;if(0===B)break}if(C+=B,B=0,e=I+n,(0===C||C>=e)&&(B=C-e,C=e,_t(!1),0===a.avail_out))return 0;if(C-I>=w-m&&(_t(!1),0===a.avail_out))return 0}return _t(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:M=function(t){let e,n=0;for(;;){if(B=3&&(U=(U<=3)if(e=ut(C-T,j-3),B-=j,j<=W&&B>=3){j--;do{C++,U=(U<=3&&(U=(U<4096)&&(j=2)),q>=3&&j<=q){n=C+B-3,e=ut(C-1-S,q-3),B-=q-1,q-=2;do{++C<=n&&(U=(U<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const g=-2,b=-3,v=-5,y=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],A=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],U=[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],z=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],E=[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],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],D=15;function I(){let t,e,n,i,r,a;function s(t,e,s,o,d,l,c,f,u,p,h){let m,x,_,w,g,y,k,A,U,z,E,R,I,j,S;z=0,g=s;do{n[t[e+z]]++,z++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,f[0]=0,0;for(A=f[0],y=1;y<=D&&0===n[y];y++);for(k=y,Ag&&(A=g),f[0]=A,j=1<R+A;){if(w++,R+=A,S=_-R,S=S>A?A:S,(x=1<<(y=k-R))>m+1&&(x-=m+1,I=k,y1440)return b;r[w]=E=p[0],p[0]+=S,0!==w?(a[w]=g,i[0]=y,i[1]=A,y=g>>>R-A,i[2]=E-r[w-1]-y,u.set(i,3*(r[w-1]+y))):c[0]=E}for(i[1]=k-R,z>=s?i[0]=192:h[z]>>R;y>>=1)g^=y;for(g^=y,U=(1<257?(p==b?u.msg="oversubscribed distance tree":p==v?(u.msg="incomplete distance tree",p=b):-4!=p&&(u.msg="empty distance tree with lengths",p=b),p):0)}}I.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=k,i[0]=A,0};function j(){const t=this;let e,n,i,r,a=0,s=0,o=0,d=0,l=0,c=0,f=0,u=0,p=0,h=0;function m(t,e,n,i,r,a,s,o){let d,l,c,f,u,p,h,m,x,_,w,g,v,k,A,U;h=o.next_in_index,m=o.avail_in,u=s.bitb,p=s.bitk,x=s.write,_=x>=l[U+1],p-=l[U+1],0!=(16&f)){for(f&=15,v=l[U+2]+(u&y[f]),u>>=f,p-=f;p<15;)m--,u|=(255&o.read_byte(h++))<>=l[U+1],p-=l[U+1],0!=(16&f)){for(f&=15;p>=f,p-=f,_-=v,x>=k)A=x-k,x-A>0&&2>x-A?(s.window[x++]=s.window[A++],s.window[x++]=s.window[A++],v-=2):(s.window.set(s.window.subarray(A,A+2),x),x+=2,A+=2,v-=2);else{A=x-k;do{A+=s.end}while(A<0);if(f=s.end-A,v>f){if(v-=f,x-A>0&&f>x-A)do{s.window[x++]=s.window[A++]}while(0!=--f);else s.window.set(s.window.subarray(A,A+f),x),x+=f,A+=f,f=0;A=0}}if(x-A>0&&v>x-A)do{s.window[x++]=s.window[A++]}while(0!=--v);else s.window.set(s.window.subarray(A,A+v),x),x+=v,A+=v,v=0;break}if(0!=(64&f))return o.msg="invalid distance code",v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,b;d+=l[U+2],d+=u&y[f],U=3*(c+d),f=l[U]}break}if(0!=(64&f))return 0!=(32&f)?(v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,1):(o.msg="invalid literal/length code",v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,b);if(d+=l[U+2],d+=u&y[f],U=3*(c+d),0===(f=l[U])){u>>=l[U+1],p-=l[U+1],s.window[x++]=l[U+2],_--;break}}else u>>=l[U+1],p-=l[U+1],s.window[x++]=l[U+2],_--}while(_>=258&&m>=10);return v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,0}t.init=function(t,a,s,o,d,l){e=0,f=t,u=a,i=s,p=o,r=d,h=l,n=null},t.proc=function(t,x,_){let w,v,k,A,U,z,E,R=0,D=0,I=0;for(I=x.next_in_index,A=x.avail_in,R=t.bitb,D=t.bitk,U=t.write,z=U=258&&A>=10&&(t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=U,_=m(f,u,i,p,r,h,t,x),I=x.next_in_index,A=x.avail_in,R=t.bitb,D=t.bitk,U=t.write,z=U>>=n[v+1],D-=n[v+1],k=n[v],0===k){d=n[v+2],e=6;break}if(0!=(16&k)){l=15&k,a=n[v+2],e=2;break}if(0==(64&k)){o=k,s=v/3+n[v+2];break}if(0!=(32&k)){e=7;break}return e=9,x.msg="invalid literal/length code",_=b,t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=U,t.inflate_flush(x,_);case 2:for(w=l;D>=w,D-=w,o=u,n=r,s=h,e=3;case 3:for(w=o;D>=n[v+1],D-=n[v+1],k=n[v],0!=(16&k)){l=15&k,c=n[v+2],e=4;break}if(0==(64&k)){o=k,s=v/3+n[v+2];break}return e=9,x.msg="invalid distance code",_=b,t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=U,t.inflate_flush(x,_);case 4:for(w=l;D>=w,D-=w,e=5;case 5:for(E=U-c;E<0;)E+=t.end;for(;0!==a;){if(0===z&&(U==t.end&&0!==t.read&&(U=0,z=U7&&(D-=8,A++,I--),t.write=U,_=t.inflate_flush(x,_),U=t.write,z=Ut.avail_out&&(i=t.avail_out),0!==i&&e==v&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==v&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,m,x,_,w,v,k,A;for(_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,v=n.write,k=v>>1){case 0:m>>>=3,x-=3,h=7&x,m>>>=h,x-=h,r=1;break;case 1:U=[],z=[],E=[[]],R=[[]],I.inflate_trees_fixed(U,z,E,R),c.init(U[0],z[0],E[0],0,R[0],0),m>>>=3,x-=3,r=6;break;case 2:m>>>=3,x-=3,r=3;break;case 3:return m>>>=3,x-=3,r=9,t.msg="invalid block type",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e)}break;case 1:for(;x<32;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>16&65535)!=(65535&m))return r=9,t.msg="invalid stored block lengths",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);a=65535&m,m=x=0,r=0!==a?2:0!==f?7:0;break;case 2:if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);if(0===k&&(v==n.end&&0!==n.read&&(v=0,k=vw&&(h=w),h>k&&(h=k),n.window.set(t.read_buf(_,h),v),_+=h,w-=h,v+=h,k-=h,0!=(a-=h))break;r=0!==f?7:0;break;case 3:for(;x<14;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,x-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;x<3;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>=3,x-=3}for(;o<19;)i[S[o++]]=0;if(d[0]=7,h=p.inflate_trees_bits(i,d,l,u,t),0!=h)return(e=h)==b&&(i=null,r=9),n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=d[0];x>>=h,x-=h,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;x>>=h,x-=h,a+=m&y[A],m>>>=A,x-=A,A=o,h=s,A+a>258+(31&h)+(h>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(l[0]=-1,D=[],j=[],F=[],C=[],D[0]=9,j[0]=6,h=s,h=p.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,D,j,F,C,u,t),0!=h)return h==b&&(i=null,r=9),e=h,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);c.init(D[0],j[0],u,F[0],u,C[0]),r=6;case 6:if(n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,v=n.write,k=v15?(t.inflateEnd(n),g):(t.wbits=i,n.istate.blocks=new F(n,1<>4)>r.wbits){r.mode=C,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=C,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=C,t.msg="need dictionary",r.marker=0,g;case 7:if(n=r.blocks.proc(t,n),n==b){r.mode=C,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case C:return b;default:return g}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return g;const a=t.istate;return r>=1<{const t={};for(let e in V)if(V.hasOwnProperty(e))for(let n in V[e])if(V[e].hasOwnProperty(n)){const i=V[e][n];if("string"==typeof i)t[i]=e+"/"+n;else for(let r=0;r{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),i(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),i(this)}};function i(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const H="HTTP error ",Z="HTTP Range not supported",K="text/plain",G="Content-Length",Y="Accept-Ranges",X="HEAD",J="GET",Q="bytes";class ${constructor(){this.size=0}init(){this.initialized=!0}}class tt extends ${}class et extends ${writeUint8Array(t){this.size+=t.length}}class nt extends tt{constructor(t){super(),this.blobReader=new st(new Blob([t],{type:K}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}}class it extends et{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:K})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:K})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}}class rt extends tt{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}}class st extends tt{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class ot extends et{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class dt extends tt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),_t(this.url)&&!this.preventHeadRequest){const t=await ct(X,this.url,this.options);if(this.size=Number(t.headers.get(G)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(Y)!=Q)throw new Error(Z);void 0===this.size&&await lt(this,this.options)}else await lt(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await ct(J,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(Z);return new Uint8Array(await n.arrayBuffer())}return this.data||await lt(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function lt(t,e){const n=await ct(J,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function ct(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(H+(r.statusText||r.status))}class ft extends tt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),_t(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>pt(X,this.url,(n=>{this.size=Number(n.getResponseHeader(G)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(Y)==Q?t():e(new Error(Z)):void 0===this.size?ut(this,this.url).then((()=>t())).catch(e):t()}),e)));await ut(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await ut(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>pt(J,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(Z)}}function ut(t,e){return new Promise(((n,i)=>pt(J,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function pt(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(H+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class ht extends tt{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new ft(t,e):this.reader=new dt(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class mt extends tt{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}}class xt extends et{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}}function _t(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const wt=4294967295,gt=65535,bt=67324752,vt=134695760,yt=33639248,kt=101010256,At=101075792,Ut=117853008,zt=39169,Et=2048,Rt="/",Dt=new Date(2107,11,31),It=new Date(1980,0,1),jt="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const St=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;St[t]=e}class Ft{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^St[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Ct={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=Ct.getPartial(n);return 32===i?t.concat(e):Ct._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+Ct.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=Ct.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=Ct.getPartial(r);return i.push(Ct.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},Tt={bytes:{fromBits(t){const e=Ct.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^d<<24,d=d<<1^283*(d>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,d,l;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let c=s=0;!n[c];c^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[c]=a,i[a]=c,l=r[d=r[o=r[c]]];let f=16843009*l^65537*d^257*o^16843008*c,u=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][c]=u=u<<24^u>>>8,e[n][a]=f=f<<24^f>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],d=a[2],l=a[3],c=a[4];let f,u,p,h=t[0]^n[0],m=t[e?3:1]^n[1],x=t[2]^n[2],_=t[e?1:3]^n[3],w=4;for(let t=0;t>>24]^o[m>>16&255]^d[x>>8&255]^l[255&_]^n[w],u=s[m>>>24]^o[x>>16&255]^d[_>>8&255]^l[255&h]^n[w+1],p=s[x>>>24]^o[_>>16&255]^d[h>>8&255]^l[255&m]^n[w+2],_=s[_>>>24]^o[h>>16&255]^d[m>>8&255]^l[255&x]^n[w+3],w+=4,h=f,m=u,x=p;for(let t=0;t<4;t++)r[e?3&-t:t]=c[h>>>24]<<24^c[m>>16&255]<<16^c[x>>8&255]<<8^c[255&_]^n[w++],f=h,h=m,m=x,x=_,_=f;return r}}},qt={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=Ct.bitLength(e);for(let r=0;rt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const re=12;class ae{constructor(t,e){this.password=t,this.passwordVerification=e,le(this,t)}async append(t){if(this.password){const e=oe(this,t.subarray(0,re));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Mt);t=t.subarray(re)}return oe(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class se{constructor(t,e){this.passwordVerification=e,this.password=t,le(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(re));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(de(this,i),0),n=re}else e=new Uint8Array(t.length),n=0;return e.set(de(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function oe(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function fe(t){const e=2|t.keys[2];return ue(Math.imul(e,1^e)>>>8)}function ue(t){return 255&t}function pe(t){return 4294967295&t}const he="deflate",me="inflate",xe="Invalid signature";class _e{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Ft,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new ae(e.password,e.passwordVerification):new $t(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(xe);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(xe)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class we{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Ft,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new se(e.password,e.passwordVerification):new te(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const ge="init",be="append",ve="flush",ye="message";var ke=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-fs-full.min.js",document.baseURI).href)),t.worker.addEventListener(ye,r,!1),t.interface={append:t=>n({type:be,data:t}),flush:()=>n({type:ve})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:ge,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==ge||r==ve||r==be){const n=i.data;r==ve?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(he)?new we(t,e):e.codecType.startsWith(me)?new _e(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Ae=[],Ue=[];function ze(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Ae.length!t.busy));return n?ke(n,t,e,Ee,i,r):new Promise((n=>Ue.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Ee(t){const e=!Ue.length;if(e)Ae=Ae.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Ue.splice(0,1);e(ke(t,n,i,Ee,r,a))}return e}const Re="Abort error";async function De(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(d=0,l=0){const c=s.signal;if(dthis[e]=t[e]))}}const Ce="File format is not recognized",Te="End of central directory not found",Be="End of Zip64 central directory not found",qe="End of Zip64 central directory locator not found",Me="Central directory header not found",We="Local file header not found",Oe="Zip64 extra field not found",Le="File contains encrypted entry",Ve="Encryption method not supported",Ne="Compression method not supported",Pe="utf-8",He=["uncompressedSize","compressedSize","offset"];class Ze{constructor(t,e={}){this.reader=t,this.options=e,this.config=O()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ce);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,kt,22,1048560);if(!n)throw new Error(Te);const i=new DataView(n.buffer);let r=en(i,12),a=en(i,16),s=tn(i,8),o=0;if(a==wt||r==wt||s==gt){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(en(i,0)!=Ut)throw new Error(Be);a=nn(i,8);let d=await e.readUint8Array(a,56),l=new DataView(d.buffer);const c=n.offset-20-56;if(en(l,0)!=At&&a!=c){const t=a;a=c,o=a-t,d=await e.readUint8Array(a,56),l=new DataView(d.buffer)}if(en(l,0)!=At)throw new Error(qe);s=nn(l,24),r=nn(i,4),a-=nn(l,40)}if(a<0||a>=e.size)throw new Error(Ce);let d=0,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer);const f=n.offset-r;if(en(c,d)!=yt&&a!=f){const t=a;a=f,o=a-t,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer)}if(a<0||a>=e.size)throw new Error(Ce);const u=[];for(let e=0;ee.getData(t,n),u.push(r),d+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return u}async close(){}}class Ke{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,o=this.compressionMethod,d=this.config,l=this.bitFlag,c=this.signature;let f=Je(this,e,"password");if(f=f&&f.length&&f,s&&99!=s.originalCompressionMethod)throw new Error(Ne);if(0!=o&&8!=o)throw new Error(Ne);if(en(a,0)!=bt)throw new Error(We);const u=this.localDirectory={};Ge(u,a,4),u.rawExtraField=r.subarray(i+30+u.filenameLength,i+30+u.filenameLength+u.extraFieldLength),Ye(this,u,a,4);const p=i+30+u.filenameLength+u.extraFieldLength,h=l.encrypted&&u.bitFlag.encrypted,m=h&&!s;if(h){if(!m&&void 0===s.strength)throw new Error(Ve);if(!f)throw new Error(Le)}const x=await ze(d.Inflate,{codecType:me,password:f,zipCrypto:m,encryptionStrength:s&&s.strength,signed:Je(this,e,"checkSignature"),passwordVerification:m&&(l.dataDescriptor?this.rawLastModDate>>>8&255:c>>>24&255),signature:c,compressed:0!=o,encrypted:h,useWebWorkers:Je(this,e,"useWebWorkers")},d);return t.initialized||await t.init(),await De(x,n,t,p,this.compressedSize,d,{onprogress:e.onprogress,signal:Je(this,e,"signal")}),t.getData()}}function Ge(t,e,n){t.version=tn(e,n);const i=t.rawBitFlag=tn(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&Et)==Et},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=en(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=tn(e,n+22),t.extraFieldLength=tn(e,n+24)}function Ye(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==wt));for(let e=0;e{if(e[n]==wt){if(!t||void 0===t[n])throw new Error(Oe);e[n]=t[n]}}))}(l,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Xe(c,"filename","rawFilename",e,t);const f=e.extraFieldUnicodeComment=a.get(25461);f&&Xe(f,"comment","rawComment",e,t);const u=e.extraFieldAES=a.get(39169);u?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=$e(i,0),t.vendorId=$e(i,2);const r=$e(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=tn(i,5)}else e.compressionMethod=n}(u,e,d):e.compressionMethod=d,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Xe(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=$e(a,0),t.signature=en(a,1);const s=new Ft;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==en(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Je(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Qe(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;ngt)throw new Error(on);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>gt)throw new Error(sn);const s=this.options.version||n.version||0;if(s>gt)throw new Error(dn);const o=n.lastModDate||new Date;if(oDt)throw new Error(ln);const d=mn(this,n,"password"),l=mn(this,n,"encryptionStrength")||3,c=mn(this,n,"zipCrypto");if(void 0!==d&&void 0!==l&&(l<1||l>3))throw new Error(cn);e&&!e.initialized&&await e.init();let f=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),f=new Uint8Array(t),u.forEach(((t,n)=>{if(n>gt)throw new Error(fn);if(t.length>gt)throw new Error(un);f.set(new Uint16Array([n]),e),f.set(new Uint16Array([t.length]),e+2),f.set(t,e+4),e+=4+t.length}))}const p=e?1.05*e.size:0,h=n.zip64||this.options.zip64||this.offset>=wt||p>=wt||this.offset+p>=wt,m=mn(this,n,"level"),x=mn(this,n,"useWebWorkers"),_=mn(this,n,"bufferedWrite"),w=mn(this,n,"keepOrder");let g=mn(this,n,"dataDescriptor");const b=mn(this,n,"signal");void 0===g&&(g=!0);const v=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,d;r.set(e,null);try{let l,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>d=t))),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(l=new ot,await l.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),l=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),d=i.level,l=0!==d&&!i.directory,c=i.zip64;let f,u;if(o&&!i.zipCrypto){f=new Uint8Array(pn.length+2);const t=new DataView(f.buffer);_n(t,0,zt),f.set(pn,2),u=i.encryptionStrength,xn(t,8,u)}else f=new Uint8Array(0);const p={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:f,rawExtraField:i.rawExtraField};let h=Et;i.dataDescriptor&&(h|=8);let m=0;l&&(m=8);c&&(p.version=p.version>45?p.version:45);o&&(h|=1,i.zipCrypto||(p.version=p.version>51?p.version:51,m=99,l&&(p.rawExtraFieldAES[9]=8)));const x=p.headerArray=new Uint8Array(26),_=new DataView(x.buffer);_n(_,0,p.version),_n(_,2,h),_n(_,4,m);const w=new Uint32Array(1),g=new DataView(w.buffer);_n(g,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),_n(g,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const b=w[0];wn(_,6,b),_n(_,22,r.length),_n(_,24,0);const v=new Uint8Array(30+r.length);let y;wn(new DataView(v.buffer),0,bt),v.set(x,4),v.set(r,30);let k=0,A=0;if(t){k=t.size;const r=await ze(n.Deflate,{codecType:he,level:d,password:s,encryptionStrength:u,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&b>>8&255,signed:!0,compressed:l,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(v),y=await De(r,t,e,0,k,n,{onprogress:i.onprogress,signal:i.signal}),A=y.length}else await e.writeUint8Array(v);let U,z=new Uint8Array(0);i.dataDescriptor&&(z=new Uint8Array(c?24:16),U=new DataView(z.buffer),wn(U,0,vt));if(t)if(o&&!i.zipCrypto||void 0===y.signature||(wn(_,10,y.signature),p.signature=y.signature,i.dataDescriptor&&wn(U,4,y.signature)),c){const t=new DataView(p.rawExtraFieldZip64.buffer);_n(t,0,1),_n(t,2,24),wn(_,14,wt),gn(t,12,BigInt(A)),wn(_,18,wt),gn(t,4,BigInt(k)),i.dataDescriptor&&(gn(U,8,BigInt(A)),gn(U,16,BigInt(k)))}else wn(_,14,A),wn(_,18,k),i.dataDescriptor&&(wn(U,8,A),wn(U,12,k));i.dataDescriptor&&await e.writeUint8Array(z);const E=v.length+(y?y.length:0)+z.length;return Object.assign(p,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:b,encrypted:o,length:E}),p}(n,l,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),l!=a){const e=l.getData(),n=new FileReader,r=new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)})),[s]=await Promise.all([r,t.lockWrite,o]);if(!i.dataDescriptor){const t=new DataView(s);c.encrypted&&!i.zipCrypto||wn(t,14,c.signature),c.zip64?(wn(t,18,wt),wn(t,22,wt)):(wn(t,18,c.compressedSize),wn(t,22,c.uncompressedSize))}await a.writeUint8Array(new Uint8Array(s))}if(c.offset=t.offset,c.zip64){gn(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{d&&d(),s&&s()}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:f,zip64:h,password:d,level:m,useWebWorkers:x,encryptionStrength:l,zipCrypto:c,bufferedWrite:_,keepOrder:w,dataDescriptor:g,signal:b}));return Object.assign(v,{name:t,comment:r,extraField:u}),new Fe(v)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=wt||r>=wt||s>=gt,d=new Uint8Array(r+(o?98:22)),l=new DataView(d.buffer);if(t.length){if(!(t.length<=gt))throw new Error(an);_n(l,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;wn(l,i,yt),_n(l,i+4,t.version),d.set(t.headerArray,i+6),_n(l,i+30,a),_n(l,i+32,t.rawComment.length),t.directory&&xn(l,i+38,16),t.zip64?wn(l,i+42,wt):wn(l,i+42,t.offset),d.set(e,i+46),d.set(n,i+46+e.length),d.set(r,i+46+e.length+n.length),d.set(t.rawExtraField,46+e.length+n.length+r.length),d.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(wn(l,i,At),gn(l,i+4,BigInt(44)),_n(l,i+12,45),_n(l,i+14,45),gn(l,i+24,BigInt(s)),gn(l,i+32,BigInt(s)),gn(l,i+40,BigInt(r)),gn(l,i+48,BigInt(a)),wn(l,i+56,Ut),gn(l,i+64,BigInt(a)+BigInt(r)),wn(l,i+72,1),s=gt,a=wt,r=wt,i+=76),wn(l,i,kt),_n(l,i+8,s),_n(l,i+10,s),wn(l,i+12,r),wn(l,i+16,a),await e.writeUint8Array(d),t.length&&await e.writeUint8Array(t),e.getData()}}function mn(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function xn(t,e,n){t.setUint8(e,n)}function _n(t,e,n){t.setUint16(e,n,!0)}function wn(t,e,n){t.setUint32(e,n,!0)}function gn(t,e,n){t.setBigUint64(e,n,!0)}const bn=524288;class vn{constructor(t,e,n,i){if(t.root&&i&&i.getChildByName(e))throw new Error("Entry filename already exists");n||(n={}),this.fs=t,this.name=e,this.data=n.data,this.id=t.entries.length,this.parent=i,this.children=[],this.uncompressedSize=0,t.entries.push(this),i&&this.parent.children.push(this)}moveTo(t){this.fs.move(this,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}}class yn extends vn{constructor(t,e,n,i){super(t,e,n,i),this.Reader=n.Reader,this.Writer=n.Writer,n.getData&&(this.getData=n.getData)}async getData(t,e={}){return!t||t.constructor==this.Writer&&this.data?this.data:(this.reader=new this.Reader(this.data,e),await this.reader.init(),t.initialized||await t.init(),this.uncompressedSize=this.reader.size,async function(t,e){return n();async function n(i=0){const r=i*bn;if(re.file((i=>n(t.addBlob(e.name,i))),i)));async function n(t,e){const r=await i(e);for(const e of r)e.isDirectory?await n(t.addDirectory(e.name),e):await new Promise(((n,i)=>{e.file((i=>{const r=t.addBlob(e.name,i);r.uncompressedSize=i.size,n(r)}),i)}))}function i(t){return new Promise(((e,n)=>{let i=[];function r(t){t.readEntries((n=>{n.length?(i=i.concat(n),r(t)):e(i)}),n)}t.isDirectory&&r(t.createReader()),t.isFile&&e(i)}))}}(this,t)}async addData(t,e){return Dn(this,t,e)}async importBlob(t,e={}){await this.importZip(new st(t),e)}async importData64URI(t,e={}){await this.importZip(new rt(t),e)}async importUint8Array(t,e={}){await this.importZip(new mt(t),e)}async importHttpContent(t,e={}){await this.importZip(new ht(t,e),e)}async exportBlob(t={}){return this.exportZip(new ot("application/zip"),t)}async exportData64URI(t={}){return this.exportZip(new at("application/zip"),t)}async exportUint8Array(t={}){return this.exportZip(new xt,t)}async importZip(t,e){t.initialized||await t.init();const n=new Ze(t,e);(await n.getEntries()).forEach((t=>{let n=this;const i=t.filename.split("/"),r=i.pop();i.forEach((t=>n=n.getChildByName(t)||new kn(this.fs,t,null,n))),t.directory||Dn(n,r,{data:t,Reader:Un(Object.assign({},e))})}))}async exportZip(t,e){await zn(this),await t.init();const n=new hn(t,e);return await async function(t,e,n,i){const r=e,a=new Map;async function s(t,e){async function o(){if(i.bufferedWrite)await Promise.all(e.children.map(d));else for(const t of e.children)await d(t)}async function d(e){const o=i.relativePath?e.getRelativeName(r):e.getFullname();await t.add(o,e.reader,Object.assign({directory:e.directory},Object.assign({},i,{onprogress:t=>{if(i.onprogress){a.set(o,t);try{i.onprogress(Array.from(a.values()).reduce(((t,e)=>t+e)),n)}catch(t){}}}}))),await s(t,e)}await o()}await s(t,e)}(n,this,function(t,e){let n=0;return t.forEach(i),n;function i(t){n+=t[e],t.children&&t.children.forEach(i)}}([this],"uncompressedSize"),e),await n.close(),t.getData()}getChildByName(t){for(let e=0;e{n.id==t.id&&e.splice(i,1)}))}function Rn(t){t.entries=[],t.root=new kn(t)}function Dn(t,e,n,i){if(t.directory)return i?new kn(t.fs,e,n,t):new yn(t.fs,e,n,t);throw new Error("Parent entry is not a directory")}(()=>{if("function"==typeof URL.createObjectURL){const t=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),d=Object.assign({length:16},r),l=["deriveBits"],c=["sign"],f=[8,12,16],u=[16,24,32],p=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class m{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await h.decrypt(Object.assign({counter:this.counter},d),this.keys.key,t);return w(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=g(this.input,t)),n};if(this.password){const e=t.subarray(0,f[this.strength]+2);await async function(t,e,n){await _(t,n,e.subarray(0,f[t.strength]),["decrypt"]);const i=e.subarray(f[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(f[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=g(this.pendingInput,t),n=b(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},d),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class x{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await h.encrypt(Object.assign({counter:this.counter},d),this.keys.key,a);return w(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=g(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(f[t.strength]));return await _(t,e,n,["encrypt"]),g(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=g(this.pendingInput,t),i=b(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},d),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=g(this.output,t)}const e=await h.sign(i,this.keys.authentication,this.output.subarray(f[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:g(t,n),signature:n}}}async function _(t,e,n,i){t.counter=new Uint8Array(p);const d=(new TextEncoder).encode(e),f=await h.importKey("raw",d,a,!1,l),m=await h.deriveBits(Object.assign({salt:n},s),f,8*(2*u[t.strength]+2)),x=new Uint8Array(m);t.keys={key:await h.importKey("raw",x.subarray(0,u[t.strength]),r,!0,i),authentication:await h.importKey("raw",x.subarray(u[t.strength],2*u[t.strength]),o,!1,c),passwordVerification:x.subarray(2*u[t.strength])}}function w(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function g(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function b(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return k(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class y{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function E(t){const e=2|t.keys[2];return R(Math.imul(e,1^e)>>>8)}function R(t){return 255&t}function D(t){return 4294967295&t}class I{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new m(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new y(n.password,n.passwordVerification):new x(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const S={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),F=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new I(t,e):void 0}(n,e)},append:async t=>({data:await F.append(t.data)}),flush:()=>F.flush()};let F;function C(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=S[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const T=[0,1,2,3].concat(...C([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function B(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,d,l=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);d=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*d]=i[2*s]+i[2*o],n.depth[d]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=d,n.heap[1]=d++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,d,l,c,f,u,p=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)d=e.heap[o],c=n[2*n[2*d+1]+1]+1,c>s&&(c=s,p++),n[2*d+1]=c,d>t.max_code||(e.bl_count[c]++,f=0,d>=a&&(f=r[d-a]),u=n[2*d],e.opt_len+=u*(c+f),i&&(e.static_len+=u*(i[2*d+1]+f)));if(0!==p){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(c=s;0!==c;c--)for(d=e.bl_count[c];0!==d;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=c&&(e.opt_len+=(c-n[2*l+1])*n[2*l],n[2*l+1]=c),d--)}}(n),function(t,n,i){const r=[];let a,s,o,d=0;for(a=1;a<=15;a++)r[a]=d=d+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function q(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function M(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}B._length_code=[0,1,2,3,4,5,6,7].concat(...C([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),B.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],B.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],B.d_code=function(t){return t<256?T[t]:T[256+(t>>>7)]},B.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],B.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],B.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],B.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],q.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],q.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],q.static_l_desc=new q(q.static_ltree,B.extra_lbits,257,286,15),q.static_d_desc=new q(q.static_dtree,B.extra_dbits,0,30,15),q.static_bl_desc=new q(null,B.extra_blbits,0,19,7);const W=[new M(0,0,0,0,0),new M(4,4,8,4,1),new M(4,5,16,8,1),new M(4,6,32,32,1),new M(4,4,16,16,2),new M(8,16,32,32,2),new M(8,16,128,128,2),new M(8,32,128,256,2),new M(32,128,258,1024,2),new M(32,258,258,4096,2)],O=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function L(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;Y>16-i?(n=t,G|=n<>>16-Y,Y+=i-16):(G|=t<=8&&(Q(255&G),G>>>=8,Y-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[H+2*P]=e>>>8&255,t.pending_buf[H+2*P+1]=255&e,t.pending_buf[V+P]=255&n,P++,0===e?j[2*n]++:(Z++,e--,j[2*(B._length_code[n]+256+1)]++,S[2*B.d_code(e)]++),0==(8191&P)&&E>2){for(i=8*P,r=v-_,a=0;a<30;a++)i+=S[2*a]*(5+B.extra_dbits[a]);if(i>>>=3,Z8?$(G):Y>0&&Q(255&G),G=0,Y=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),K=8,$(n),$(~n),t.pending_buf.set(d.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function dt(e,n,i){let r,a,s=0;E>0?(C.build_tree(t),T.build_tree(t),s=function(){let e;for(J(j,C.max_code),J(S,T.max_code),M.build_tree(t),e=18;e>=3&&0===F[2*B.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(q.static_ltree,q.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?_:-1,v-_,t),_=v,e.flush_pending()}function ct(){let t,n,i,r;do{if(r=l-k-v,0===r&&0===v&&0===k)r=a;else if(-1==r)r--;else if(v>=a+a-262){d.set(d.subarray(a,a+a),0),y-=a,v-=a,_-=a,t=p,i=t;do{n=65535&f[--i],f[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&c[--i],c[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(d,v+k,r),k+=t,k>=3&&(u=255&d[v],u=(u<a-262?v-(a-262):0;let f=I;const u=o,p=v+258;let h=d[r+s-1],m=d[r+s];A>=D&&(i>>=2),f>k&&(f=k);do{if(e=t,d[e+s]==m&&d[e+s-1]==h&&d[e]==d[r]&&d[++e]==d[r+1]){r+=2,e++;do{}while(d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&rs){if(y=t,s=n,n>=f)break;h=d[r+s-1],m=d[r+s]}}}while((t=65535&c[t&u])>l&&0!=--i);return s<=k?s:k}function ut(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,C.dyn_tree=j,C.stat_desc=q.static_l_desc,T.dyn_tree=S,T.stat_desc=q.static_d_desc,M.dyn_tree=F,M.stat_desc=q.static_bl_desc,G=0,Y=0,K=8,X(),function(){l=2*a,f[p-1]=0;for(let t=0;t9||8!=l||r<9||r>15||n<0||n>9||_<0||_>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(W[E].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,z=W[E].max_lazy,D=W[E].good_length,I=W[E].nice_length,U=W[E].max_chain),R=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,l=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,l=i-s),d.set(e.subarray(l,l+s),0),v=s,_=s,u=255&d[0],u=(u<4||h<0)return-2;if(!l.next_out||!l.next_in&&0!==l.avail_in||666==n&&4!=h)return l.msg=O[4],-2;if(0===l.avail_out)return l.msg=O[7],-5;var F;if(e=l,j=r,r=h,42==n&&(D=8+(s-8<<4)<<8,I=(E-1&255)>>1,I>3&&(I=3),D|=I<<6,0!==v&&(D|=32),D+=31-D%31,n=113,Q((F=D)>>8&255),Q(255&F)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=O[7],-5;if(666==n&&0!==e.avail_in)return l.msg=O[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(S=-1,W[E].func){case 0:S=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(ct(),0===k&&0==t)return 0;if(0===k)break}if(v+=k,k=0,n=_+r,(0===v||v>=n)&&(k=v-n,v=n,lt(!1),0===e.avail_out))return 0;if(v-_>=a-262&&(lt(!1),0===e.avail_out))return 0}return lt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:S=function(t){let n,i=0;for(;;){if(k<262){if(ct(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(u=(u<=3)if(n=rt(v-y,w-3),k-=w,w<=z&&k>=3){w--;do{v++,u=(u<=3&&(u=(u<4096)&&(w=2)),A>=3&&w<=A){i=v+k-3,n=rt(v-1-g,A-3),k-=A-1,A-=2;do{++v<=i&&(u=(u<0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(l),c.forEach((function(t){s.set(t,d),d+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}N.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new V,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const H=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Z=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],K=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],G=[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],Y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],X=[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],J=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Q(){let t,e,n,i,r,a;function s(t,e,s,o,d,l,c,f,u,p,h){let m,x,_,w,g,b,v,y,k,A,U,z,E,R,D;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,f[0]=0,0;for(y=f[0],b=1;b<=15&&0===n[b];b++);for(v=b,yg&&(y=g),f[0]=y,R=1<z+y;){if(w++,z+=y,D=_-z,D=D>y?y:D,(x=1<<(b=v-z))>m+1&&(x-=m+1,E=v,b1440)return-3;r[w]=U=p[0],p[0]+=D,0!==w?(a[w]=g,i[0]=b,i[1]=y,b=g>>>z-y,i[2]=U-r[w-1]-b,u.set(i,3*(r[w-1]+b))):c[0]=U}for(i[1]=v-z,A>=s?i[0]=192:h[A]>>z;b>>=1)g^=b;for(g^=b,k=(1<257?(-3==p?u.msg="oversubscribed distance tree":-5==p?(u.msg="incomplete distance tree",p=-3):-4!=p&&(u.msg="empty distance tree with lengths",p=-3),p):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,d=0,l=0,c=0,f=0,u=0,p=0,h=0;function m(t,e,n,i,r,a,s,o){let d,l,c,f,u,p,h,m,x,_,w,g,b,v,y,k;h=o.next_in_index,m=o.avail_in,u=s.bitb,p=s.bitk,x=s.write,_=x>=l[k+1],p-=l[k+1],0!=(16&f)){for(f&=15,b=l[k+2]+(u&H[f]),u>>=f,p-=f;p<15;)m--,u|=(255&o.read_byte(h++))<>=l[k+1],p-=l[k+1],0!=(16&f)){for(f&=15;p>=f,p-=f,_-=b,x>=v)y=x-v,x-y>0&&2>x-y?(s.window[x++]=s.window[y++],s.window[x++]=s.window[y++],b-=2):(s.window.set(s.window.subarray(y,y+2),x),x+=2,y+=2,b-=2);else{y=x-v;do{y+=s.end}while(y<0);if(f=s.end-y,b>f){if(b-=f,x-y>0&&f>x-y)do{s.window[x++]=s.window[y++]}while(0!=--f);else s.window.set(s.window.subarray(y,y+f),x),x+=f,y+=f,f=0;y=0}}if(x-y>0&&b>x-y)do{s.window[x++]=s.window[y++]}while(0!=--b);else s.window.set(s.window.subarray(y,y+b),x),x+=b,y+=b,b=0;break}if(0!=(64&f))return o.msg="invalid distance code",b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,-3;d+=l[k+2],d+=u&H[f],k=3*(c+d),f=l[k]}break}if(0!=(64&f))return 0!=(32&f)?(b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,1):(o.msg="invalid literal/length code",b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,-3);if(d+=l[k+2],d+=u&H[f],k=3*(c+d),0===(f=l[k])){u>>=l[k+1],p-=l[k+1],s.window[x++]=l[k+2],_--;break}}else u>>=l[k+1],p-=l[k+1],s.window[x++]=l[k+2],_--}while(_>=258&&m>=10);return b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,0}t.init=function(t,a,s,o,d,l){e=0,f=t,u=a,i=s,p=o,r=d,h=l,n=null},t.proc=function(t,x,_){let w,g,b,v,y,k,A,U=0,z=0,E=0;for(E=x.next_in_index,v=x.avail_in,U=t.bitb,z=t.bitk,y=t.write,k=y=258&&v>=10&&(t.bitb=U,t.bitk=z,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,_=m(f,u,i,p,r,h,t,x),E=x.next_in_index,v=x.avail_in,U=t.bitb,z=t.bitk,y=t.write,k=y>>=n[g+1],z-=n[g+1],b=n[g],0===b){d=n[g+2],e=6;break}if(0!=(16&b)){l=15&b,a=n[g+2],e=2;break}if(0==(64&b)){o=b,s=g/3+n[g+2];break}if(0!=(32&b)){e=7;break}return e=9,x.msg="invalid literal/length code",_=-3,t.bitb=U,t.bitk=z,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,t.inflate_flush(x,_);case 2:for(w=l;z>=w,z-=w,o=u,n=r,s=h,e=3;case 3:for(w=o;z>=n[g+1],z-=n[g+1],b=n[g],0!=(16&b)){l=15&b,c=n[g+2],e=4;break}if(0==(64&b)){o=b,s=g/3+n[g+2];break}return e=9,x.msg="invalid distance code",_=-3,t.bitb=U,t.bitk=z,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,t.inflate_flush(x,_);case 4:for(w=l;z>=w,z-=w,e=5;case 5:for(A=y-c;A<0;)A+=t.end;for(;0!==a;){if(0===k&&(y==t.end&&0!==t.read&&(y=0,k=y7&&(z-=8,v++,E--),t.write=y,_=t.inflate_flush(x,_),y=t.write,k=yt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,m,x,_,w,g,b,v;for(_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,g=n.write,b=g>>1){case 0:m>>>=3,x-=3,h=7&x,m>>>=h,x-=h,r=1;break;case 1:y=[],k=[],A=[[]],U=[[]],Q.inflate_trees_fixed(y,k,A,U),c.init(y[0],k[0],A[0],0,U[0],0),m>>>=3,x-=3,r=6;break;case 2:m>>>=3,x-=3,r=3;break;case 3:return m>>>=3,x-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;x<32;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>16&65535)!=(65535&m))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);a=65535&m,m=x=0,r=0!==a?2:0!==f?7:0;break;case 2:if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);if(0===b&&(g==n.end&&0!==n.read&&(g=0,b=gw&&(h=w),h>b&&(h=b),n.window.set(t.read_buf(_,h),g),_+=h,w-=h,g+=h,b-=h,0!=(a-=h))break;r=0!==f?7:0;break;case 3:for(;x<14;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,x-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;x<3;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>=3,x-=3}for(;o<19;)i[tt[o++]]=0;if(d[0]=7,h=p.inflate_trees_bits(i,d,l,u,t),0!=h)return-3==(e=h)&&(i=null,r=9),n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=d[0];x>>=h,x-=h,i[o++]=c;else{for(v=18==c?7:c-14,a=18==c?11:3;x>>=h,x-=h,a+=m&H[v],m>>>=v,x-=v,v=o,h=s,v+a>258+(31&h)+(h>>5&31)||16==c&&v<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);c=16==c?i[v-1]:0;do{i[v++]=c}while(0!=--a);o=v}}if(l[0]=-1,z=[],E=[],R=[],D=[],z[0]=9,E[0]=6,h=s,h=p.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,z,E,R,D,u,t),0!=h)return-3==h&&(i=null,r=9),e=h,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);c.init(z[0],E[0],u,R[0],u,D[0]),r=6;case 6:if(n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,g=n.write,b=g15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=d&&(r(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,l),l+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=P,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));L({workerScripts:{inflate:[e],deflate:[e]}})}})(),L({Deflate:function(t){const e=new w,n=512,i=new Uint8Array(n);let r=t?t.level:-1;void 0===r&&(r=-1),e.deflateInit(r),e.next_out=i,this.append=function(t,r){let a,s,o=0,d=0,l=0;const c=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,a=e.deflate(0),0!=a)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?c.push(new Uint8Array(i)):c.push(new Uint8Array(i.subarray(0,e.next_out_index)))),l+=e.next_out_index,r&&e.next_in_index>0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(l),c.forEach((function(t){s.set(t,d),d+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new q,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,d=0,l=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===v){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=d&&(r(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,l),l+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=st,t.BlobWriter=ot,t.Data64URIReader=rt,t.Data64URIWriter=at,t.ERR_ABORT=Re,t.ERR_BAD_FORMAT=Ce,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Me,t.ERR_DUPLICATED_NAME=rn,t.ERR_ENCRYPTED=Le,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=qe,t.ERR_EOCDR_NOT_FOUND=Te,t.ERR_EOCDR_ZIP64_NOT_FOUND=Be,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Oe,t.ERR_HTTP_RANGE=Z,t.ERR_INVALID_COMMENT=an,t.ERR_INVALID_DATE=ln,t.ERR_INVALID_ENCRYPTION_STRENGTH=cn,t.ERR_INVALID_ENTRY_COMMENT=sn,t.ERR_INVALID_ENTRY_NAME=on,t.ERR_INVALID_EXTRAFIELD_DATA=un,t.ERR_INVALID_EXTRAFIELD_TYPE=fn,t.ERR_INVALID_PASSWORD=Mt,t.ERR_INVALID_SIGNATURE=xe,t.ERR_INVALID_VERSION=dn,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=We,t.ERR_UNSUPPORTED_COMPRESSION=Ne,t.ERR_UNSUPPORTED_ENCRYPTION=Ve,t.HttpRangeReader=class extends ht{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=ht,t.Reader=tt,t.TextReader=nt,t.TextWriter=it,t.Uint8ArrayReader=mt,t.Uint8ArrayWriter=xt,t.Writer=et,t.ZipReader=Ze,t.ZipWriter=hn,t.configure=L,t.fs=An,t.getMimeType=function(t){return t&&N[t.split(".").pop().toLowerCase()]||"application/octet-stream"},t.initShimAsyncCodec=(t,e={},n)=>({Deflate:P(t.Deflate,e.deflate,n),Inflate:P(t.Inflate,e.inflate,n)}),Object.defineProperty(t,"__esModule",{value:!0})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function o(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,d,l=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);d=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*d]=i[2*s]+i[2*o],n.depth[d]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=d,n.heap[1]=d++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,d,l,c,f,u,p=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)d=e.heap[o],c=n[2*n[2*d+1]+1]+1,c>s&&(c=s,p++),n[2*d+1]=c,d>t.max_code||(e.bl_count[c]++,f=0,d>=a&&(f=r[d-a]),u=n[2*d],e.opt_len+=u*(c+f),i&&(e.static_len+=u*(i[2*d+1]+f)));if(0!==p){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(c=s;0!==c;c--)for(d=e.bl_count[c];0!==d;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=c&&(e.opt_len+=(c-n[2*l+1])*n[2*l],n[2*l+1]=c),d--)}}(n),function(t,n,i){const r=[];let a,s,o,d=0;for(a=1;a<=15;a++)r[a]=d=d+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function d(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),o.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],o.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],d.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],d.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],d.static_l_desc=new d(d.static_ltree,o.extra_lbits,257,286,15),d.static_d_desc=new d(d.static_dtree,o.extra_dbits,0,30,15),d.static_bl_desc=new d(null,o.extra_blbits,0,19,7);function l(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],f=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],u=113,p=666,h=258,m=262;function x(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function dt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ut(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[X+Q]=255&i,Q++,0===n?N[2*i]++:(tt++,n--,N[2*(o._length_code[i]+e+1)]++,H[2*o.d_code(n)]++),0==(8191&Q)&&O>2){for(r=8*Q,a=j-I,s=0;s<30;s++)r+=H[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function mt(e,n,i){dt(0+(i?1:0),3),function(e,n,i){ht(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(v.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function xt(e,n,i){let r,a,s=0;O>0?(K.build_tree(t),G.build_tree(t),s=function(){let e;for(at(N,K.max_code),at(H,G.max_code),Y.build_tree(t),e=18;e>=3&&0===Z[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?mt(e,n,i):a==r?(dt(2+(i?1:0),3),pt(d.static_ltree,d.static_dtree)):(dt(4+(i?1:0),3),function(t,e,n){let i;for(dt(t-257,5),dt(e-1,5),dt(n-4,4),i=0;i=0?I:-1,j-I,t),I=j,a.flush_pending()}function wt(){let t,e,n,i;do{if(i=y-T-j,0===i&&0===j&&0===T)i=w;else if(-1==i)i--;else if(j>=w+w-m){v.set(v.subarray(w,w+w),0),B-=w,j-=w,I-=w,t=U,n=t;do{e=65535&A[--n],A[n]=e>=w?e-w:0}while(0!=--t);t=w,n=t;do{e=65535&k[--n],k[n]=e>=w?e-w:0}while(0!=--t);i+=w}if(0===a.avail_in)return;t=a.read_buf(v,j+T,i),T+=t,T>=3&&(z=255&v[j],z=(z<w-m?j-(w-m):0;let o=P;const d=b,l=j+h;let c=v[r+a-1],f=v[r+a];M>=V&&(i>>=2),o>T&&(o=T);do{if(e=t,v[e+a]==f&&v[e+a-1]==c&&v[e]==v[r]&&v[++e]==v[r+1]){r+=2,e++;do{}while(v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&v[++r]==v[++e]&&ra){if(B=t,a=n,n>=o)break;c=v[r+a-1],f=v[r+a]}}}while((t=65535&k[t&d])>s&&0!=--i);return a<=T?a:T}function bt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=u,_=0,K.dyn_tree=N,K.stat_desc=d.static_l_desc,G.dyn_tree=H,G.stat_desc=d.static_d_desc,Y.dyn_tree=Z,Y.stat_desc=d.static_bl_desc,nt=0,it=0,et=8,rt(),function(){y=2*w,A[U-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,g=r,w=1<9||n<0||n>2?i:(c[O].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),O!=e&&(O=e,q=c[O].max_lazy,V=c[O].good_length,P=c[O].nice_length,W=c[O].max_chain),L=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>w-m&&(a=w-m,o=n-a),v.set(e.subarray(o,o+a),0),j=a,I=a,z=255&v[0],z=(z<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==p&&4!=o)return e.msg=f[4],i;if(0===e.avail_out)return e.msg=f[7],r;var V;if(a=e,E=_,_=o,42==s&&(x=8+(g-8<<4)<<8,y=(O-1&255)>>1,y>3&&(y=3),x|=y<<6,0!==j&&(x|=32),x+=31-x%31,s=u,st((V=x)>>8&255),st(255&V)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return _=-1,0}else if(0===a.avail_in&&o<=E&&4!=o)return a.msg=f[7],r;if(s==p&&0!==a.avail_in)return e.msg=f[7],r;if(0!==a.avail_in||0!==T||0!=o&&s!=p){switch(W=-1,c[O].func){case 0:W=function(t){let e,n=65535;for(n>l-5&&(n=l-5);;){if(T<=1){if(wt(),0===T&&0==t)return 0;if(0===T)break}if(j+=T,T=0,e=I+n,(0===j||j>=e)&&(T=j-e,j=e,_t(!1),0===a.avail_out))return 0;if(j-I>=w-m&&(_t(!1),0===a.avail_out))return 0}return _t(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:W=function(t){let e,n=0;for(;;){if(T=3&&(z=(z<=3)if(e=ut(j-B,S-3),T-=S,S<=q&&T>=3){S--;do{j++,z=(z<=3&&(z=(z<4096)&&(S=2)),M>=3&&S<=M){n=j+T-3,e=ut(j-1-C,M-3),T-=M-1,M-=2;do{++j<=n&&(z=(z<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const g=-2,b=-3,v=-5,y=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],A=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],z=[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],U=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],E=[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],R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],D=15;function I(){let t,e,n,i,r,a;function s(t,e,s,o,d,l,c,f,u,p,h){let m,x,_,w,g,y,k,A,z,U,E,R,I,S,C;U=0,g=s;do{n[t[e+U]]++,U++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,f[0]=0,0;for(A=f[0],y=1;y<=D&&0===n[y];y++);for(k=y,Ag&&(A=g),f[0]=A,S=1<R+A;){if(w++,R+=A,C=_-R,C=C>A?A:C,(x=1<<(y=k-R))>m+1&&(x-=m+1,I=k,y1440)return b;r[w]=E=p[0],p[0]+=C,0!==w?(a[w]=g,i[0]=y,i[1]=A,y=g>>>R-A,i[2]=E-r[w-1]-y,u.set(i,3*(r[w-1]+y))):c[0]=E}for(i[1]=k-R,U>=s?i[0]=192:h[U]>>R;y>>=1)g^=y;for(g^=y,z=(1<257?(p==b?u.msg="oversubscribed distance tree":p==v?(u.msg="incomplete distance tree",p=b):-4!=p&&(u.msg="empty distance tree with lengths",p=b),p):0)}}I.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=k,i[0]=A,0};function S(){const t=this;let e,n,i,r,a=0,s=0,o=0,d=0,l=0,c=0,f=0,u=0,p=0,h=0;function m(t,e,n,i,r,a,s,o){let d,l,c,f,u,p,h,m,x,_,w,g,v,k,A,z;h=o.next_in_index,m=o.avail_in,u=s.bitb,p=s.bitk,x=s.write,_=x>=l[z+1],p-=l[z+1],0!=(16&f)){for(f&=15,v=l[z+2]+(u&y[f]),u>>=f,p-=f;p<15;)m--,u|=(255&o.read_byte(h++))<>=l[z+1],p-=l[z+1],0!=(16&f)){for(f&=15;p>=f,p-=f,_-=v,x>=k)A=x-k,x-A>0&&2>x-A?(s.window[x++]=s.window[A++],s.window[x++]=s.window[A++],v-=2):(s.window.set(s.window.subarray(A,A+2),x),x+=2,A+=2,v-=2);else{A=x-k;do{A+=s.end}while(A<0);if(f=s.end-A,v>f){if(v-=f,x-A>0&&f>x-A)do{s.window[x++]=s.window[A++]}while(0!=--f);else s.window.set(s.window.subarray(A,A+f),x),x+=f,A+=f,f=0;A=0}}if(x-A>0&&v>x-A)do{s.window[x++]=s.window[A++]}while(0!=--v);else s.window.set(s.window.subarray(A,A+v),x),x+=v,A+=v,v=0;break}if(0!=(64&f))return o.msg="invalid distance code",v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,b;d+=l[z+2],d+=u&y[f],z=3*(c+d),f=l[z]}break}if(0!=(64&f))return 0!=(32&f)?(v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,1):(o.msg="invalid literal/length code",v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,b);if(d+=l[z+2],d+=u&y[f],z=3*(c+d),0===(f=l[z])){u>>=l[z+1],p-=l[z+1],s.window[x++]=l[z+2],_--;break}}else u>>=l[z+1],p-=l[z+1],s.window[x++]=l[z+2],_--}while(_>=258&&m>=10);return v=o.avail_in-m,v=p>>3>3:v,m+=v,h-=v,p-=v<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,0}t.init=function(t,a,s,o,d,l){e=0,f=t,u=a,i=s,p=o,r=d,h=l,n=null},t.proc=function(t,x,_){let w,v,k,A,z,U,E,R=0,D=0,I=0;for(I=x.next_in_index,A=x.avail_in,R=t.bitb,D=t.bitk,z=t.write,U=z=258&&A>=10&&(t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=z,_=m(f,u,i,p,r,h,t,x),I=x.next_in_index,A=x.avail_in,R=t.bitb,D=t.bitk,z=t.write,U=z>>=n[v+1],D-=n[v+1],k=n[v],0===k){d=n[v+2],e=6;break}if(0!=(16&k)){l=15&k,a=n[v+2],e=2;break}if(0==(64&k)){o=k,s=v/3+n[v+2];break}if(0!=(32&k)){e=7;break}return e=9,x.msg="invalid literal/length code",_=b,t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=z,t.inflate_flush(x,_);case 2:for(w=l;D>=w,D-=w,o=u,n=r,s=h,e=3;case 3:for(w=o;D>=n[v+1],D-=n[v+1],k=n[v],0!=(16&k)){l=15&k,c=n[v+2],e=4;break}if(0==(64&k)){o=k,s=v/3+n[v+2];break}return e=9,x.msg="invalid distance code",_=b,t.bitb=R,t.bitk=D,x.avail_in=A,x.total_in+=I-x.next_in_index,x.next_in_index=I,t.write=z,t.inflate_flush(x,_);case 4:for(w=l;D>=w,D-=w,e=5;case 5:for(E=z-c;E<0;)E+=t.end;for(;0!==a;){if(0===U&&(z==t.end&&0!==t.read&&(z=0,U=z7&&(D-=8,A++,I--),t.write=z,_=t.inflate_flush(x,_),z=t.write,U=zt.avail_out&&(i=t.avail_out),0!==i&&e==v&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==v&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,m,x,_,w,v,k,A;for(_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,v=n.write,k=v>>1){case 0:m>>>=3,x-=3,h=7&x,m>>>=h,x-=h,r=1;break;case 1:z=[],U=[],E=[[]],R=[[]],I.inflate_trees_fixed(z,U,E,R),c.init(z[0],U[0],E[0],0,R[0],0),m>>>=3,x-=3,r=6;break;case 2:m>>>=3,x-=3,r=3;break;case 3:return m>>>=3,x-=3,r=9,t.msg="invalid block type",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e)}break;case 1:for(;x<32;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>16&65535)!=(65535&m))return r=9,t.msg="invalid stored block lengths",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);a=65535&m,m=x=0,r=0!==a?2:0!==f?7:0;break;case 2:if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);if(0===k&&(v==n.end&&0!==n.read&&(v=0,k=vw&&(h=w),h>k&&(h=k),n.window.set(t.read_buf(_,h),v),_+=h,w-=h,v+=h,k-=h,0!=(a-=h))break;r=0!==f?7:0;break;case 3:for(;x<14;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,x-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;x<3;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>=3,x-=3}for(;o<19;)i[C[o++]]=0;if(d[0]=7,h=p.inflate_trees_bits(i,d,l,u,t),0!=h)return(e=h)==b&&(i=null,r=9),n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=d[0];x>>=h,x-=h,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;x>>=h,x-=h,a+=m&y[A],m>>>=A,x-=A,A=o,h=s,A+a>258+(31&h)+(h>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=b,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(l[0]=-1,D=[],S=[],F=[],j=[],D[0]=9,S[0]=6,h=s,h=p.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,D,S,F,j,u,t),0!=h)return h==b&&(i=null,r=9),e=h,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,n.inflate_flush(t,e);c.init(D[0],S[0],u,F[0],u,j[0]),r=6;case 6:if(n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=v,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,v=n.write,k=v15?(t.inflateEnd(n),g):(t.wbits=i,n.istate.blocks=new F(n,1<>4)>r.wbits){r.mode=j,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=j,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=j,t.msg="need dictionary",r.marker=0,g;case 7:if(n=r.blocks.proc(t,n),n==b){r.mode=j,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case j:return b;default:return g}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return g;const a=t.istate;return r>=1<{const t={};for(let e in V)if(V.hasOwnProperty(e))for(let n in V[e])if(V[e].hasOwnProperty(n)){const i=V[e][n];if("string"==typeof i)t[i]=e+"/"+n;else for(let r=0;r{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),i(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),i(this)}};function i(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const H="HTTP error ",Z="HTTP Range not supported",K="text/plain",G="Content-Length",Y="Accept-Ranges",X="HEAD",J="GET",Q="bytes";class ${constructor(){this.size=0}init(){this.initialized=!0}}class tt extends ${}class et extends ${writeUint8Array(t){this.size+=t.length}}class nt extends tt{constructor(t){super(),this.blobReader=new st(new Blob([t],{type:K}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}}class it extends et{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:K})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:K})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}}class rt extends tt{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}}class st extends tt{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class ot extends et{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class dt extends tt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),_t(this.url)&&!this.preventHeadRequest){const t=await ct(X,this.url,this.options);if(this.size=Number(t.headers.get(G)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(Y)!=Q)throw new Error(Z);void 0===this.size&&await lt(this,this.options)}else await lt(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await ct(J,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(Z);return new Uint8Array(await n.arrayBuffer())}return this.data||await lt(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function lt(t,e){const n=await ct(J,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function ct(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(H+(r.statusText||r.status))}class ft extends tt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),_t(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>pt(X,this.url,(n=>{this.size=Number(n.getResponseHeader(G)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(Y)==Q?t():e(new Error(Z)):void 0===this.size?ut(this,this.url).then((()=>t())).catch(e):t()}),e)));await ut(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await ut(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>pt(J,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(Z)}}function ut(t,e){return new Promise(((n,i)=>pt(J,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function pt(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(H+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class ht extends tt{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new ft(t,e):this.reader=new dt(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class mt extends tt{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}}class xt extends et{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}}function _t(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const wt=4294967295,gt=65535,bt=67324752,vt=134695760,yt=33639248,kt=101010256,At=101075792,zt=117853008,Ut=39169,Et=2048,Rt="/",Dt=new Date(2107,11,31),It=new Date(1980,0,1),St="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Ct=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;Ct[t]=e}class Ft{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Ct[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const jt={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=jt.getPartial(n);return 32===i?t.concat(e):jt._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+jt.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=jt.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=jt.getPartial(r);return i.push(jt.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},Bt={bytes:{fromBits(t){const e=jt.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^d<<24,d=d<<1^283*(d>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,d,l;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let c=s=0;!n[c];c^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[c]=a,i[a]=c,l=r[d=r[o=r[c]]];let f=16843009*l^65537*d^257*o^16843008*c,u=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][c]=u=u<<24^u>>>8,e[n][a]=f=f<<24^f>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],d=a[2],l=a[3],c=a[4];let f,u,p,h=t[0]^n[0],m=t[e?3:1]^n[1],x=t[2]^n[2],_=t[e?1:3]^n[3],w=4;for(let t=0;t>>24]^o[m>>16&255]^d[x>>8&255]^l[255&_]^n[w],u=s[m>>>24]^o[x>>16&255]^d[_>>8&255]^l[255&h]^n[w+1],p=s[x>>>24]^o[_>>16&255]^d[h>>8&255]^l[255&m]^n[w+2],_=s[_>>>24]^o[h>>16&255]^d[m>>8&255]^l[255&x]^n[w+3],w+=4,h=f,m=u,x=p;for(let t=0;t<4;t++)r[e?3&-t:t]=c[h>>>24]<<24^c[m>>16&255]<<16^c[x>>8&255]<<8^c[255&_]^n[w++],f=h,h=m,m=x,x=_,_=f;return r}}},Mt={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=jt.bitLength(e);for(let r=0;rt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const re=12;class ae{constructor(t,e){this.password=t,this.passwordVerification=e,le(this,t)}async append(t){if(this.password){const e=oe(this,t.subarray(0,re));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Wt);t=t.subarray(re)}return oe(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class se{constructor(t,e){this.passwordVerification=e,this.password=t,le(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(re));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(de(this,i),0),n=re}else e=new Uint8Array(t.length),n=0;return e.set(de(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function oe(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function fe(t){const e=2|t.keys[2];return ue(Math.imul(e,1^e)>>>8)}function ue(t){return 255&t}function pe(t){return 4294967295&t}const he="deflate",me="inflate",xe="Invalid signature";class _e{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Ft,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new ae(e.password,e.passwordVerification):new $t(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(xe);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(xe)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class we{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Ft,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new se(e.password,e.passwordVerification):new te(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const ge="init",be="append",ve="flush",ye="message";var ke=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-fs-full.min.js",document.baseURI).href)),t.worker.addEventListener(ye,r,!1),t.interface={append:t=>n({type:be,data:t}),flush:()=>n({type:ve})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:ge,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==ge||r==ve||r==be){const n=i.data;r==ve?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(he)?new we(t,e):e.codecType.startsWith(me)?new _e(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Ae=[],ze=[];function Ue(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Ae.length!t.busy));return n?ke(n,t,e,Ee,i,r):new Promise((n=>ze.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Ee(t){const e=!ze.length;if(e)Ae=Ae.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=ze.splice(0,1);e(ke(t,n,i,Ee,r,a))}return e}const Re="Abort error";async function De(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(d=0,l=0){const c=s.signal;if(dthis[e]=t[e]))}}const je="File format is not recognized",Be="End of central directory not found",Te="End of Zip64 central directory not found",Me="End of Zip64 central directory locator not found",We="Central directory header not found",qe="Local file header not found",Oe="Zip64 extra field not found",Le="File contains encrypted entry",Ve="Encryption method not supported",Pe="Compression method not supported",Ne="utf-8",He=["uncompressedSize","compressedSize","offset"];class Ze{constructor(t,e={}){this.reader=t,this.options=e,this.config=O()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(je);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,kt,22,1048560);if(!n)throw new Error(Be);const i=new DataView(n.buffer);let r=en(i,12),a=en(i,16),s=tn(i,8),o=0;if(a==wt||r==wt||s==gt){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(en(i,0)!=zt)throw new Error(Te);a=nn(i,8);let d=await e.readUint8Array(a,56),l=new DataView(d.buffer);const c=n.offset-20-56;if(en(l,0)!=At&&a!=c){const t=a;a=c,o=a-t,d=await e.readUint8Array(a,56),l=new DataView(d.buffer)}if(en(l,0)!=At)throw new Error(Me);s=nn(l,24),r=nn(i,4),a-=nn(l,40)}if(a<0||a>=e.size)throw new Error(je);let d=0,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer);const f=n.offset-r;if(en(c,d)!=yt&&a!=f){const t=a;a=f,o=a-t,l=await e.readUint8Array(a,e.size-a),c=new DataView(l.buffer)}if(a<0||a>=e.size)throw new Error(je);const u=[];for(let e=0;ee.getData(t,n),u.push(r),d+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return u}async close(){}}class Ke{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,o=this.compressionMethod,d=this.config,l=this.bitFlag,c=this.signature;let f=Je(this,e,"password");if(f=f&&f.length&&f,s&&99!=s.originalCompressionMethod)throw new Error(Pe);if(0!=o&&8!=o)throw new Error(Pe);if(en(a,0)!=bt)throw new Error(qe);const u=this.localDirectory={};Ge(u,a,4),u.rawExtraField=r.subarray(i+30+u.filenameLength,i+30+u.filenameLength+u.extraFieldLength),Ye(this,u,a,4);const p=i+30+u.filenameLength+u.extraFieldLength,h=l.encrypted&&u.bitFlag.encrypted,m=h&&!s;if(h){if(!m&&void 0===s.strength)throw new Error(Ve);if(!f)throw new Error(Le)}const x=await Ue(d.Inflate,{codecType:me,password:f,zipCrypto:m,encryptionStrength:s&&s.strength,signed:Je(this,e,"checkSignature"),passwordVerification:m&&(l.dataDescriptor?this.rawLastModDate>>>8&255:c>>>24&255),signature:c,compressed:0!=o,encrypted:h,useWebWorkers:Je(this,e,"useWebWorkers")},d);return t.initialized||await t.init(),await De(x,n,t,p,this.compressedSize,d,{onprogress:e.onprogress,signal:Je(this,e,"signal")}),t.getData()}}function Ge(t,e,n){t.version=tn(e,n);const i=t.rawBitFlag=tn(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&Et)==Et},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=en(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=tn(e,n+22),t.extraFieldLength=tn(e,n+24)}function Ye(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==wt));for(let e=0;e{if(e[n]==wt){if(!t||void 0===t[n])throw new Error(Oe);e[n]=t[n]}}))}(l,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Xe(c,"filename","rawFilename",e,t);const f=e.extraFieldUnicodeComment=a.get(25461);f&&Xe(f,"comment","rawComment",e,t);const u=e.extraFieldAES=a.get(39169);u?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=$e(i,0),t.vendorId=$e(i,2);const r=$e(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=tn(i,5)}else e.compressionMethod=n}(u,e,d):e.compressionMethod=d,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Xe(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=$e(a,0),t.signature=en(a,1);const s=new Ft;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==en(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Je(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Qe(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;ngt)throw new Error(on);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>gt)throw new Error(sn);const s=this.options.version||n.version||0;if(s>gt)throw new Error(dn);const o=n.lastModDate||new Date;if(oDt)throw new Error(ln);const d=mn(this,n,"password"),l=mn(this,n,"encryptionStrength")||3,c=mn(this,n,"zipCrypto");if(void 0!==d&&void 0!==l&&(l<1||l>3))throw new Error(cn);e&&!e.initialized&&await e.init();let f=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),f=new Uint8Array(t),u.forEach(((t,n)=>{if(n>gt)throw new Error(fn);if(t.length>gt)throw new Error(un);f.set(new Uint16Array([n]),e),f.set(new Uint16Array([t.length]),e+2),f.set(t,e+4),e+=4+t.length}))}const p=e?Math.floor(1.05*e.size):0;this.maxOutputSize+=p,await Promise.resolve();const h=n.zip64||this.options.zip64||this.offset>=wt||p>=wt||this.offset+this.maxOutputSize>=wt,m=mn(this,n,"level"),x=mn(this,n,"useWebWorkers"),_=mn(this,n,"bufferedWrite");let w=mn(this,n,"keepOrder"),g=mn(this,n,"dataDescriptor");const b=mn(this,n,"signal");void 0===g&&(g=!0),void 0===w&&(w=!0);const v=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,d;r.set(e,null);try{let l,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>d=t))),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(l=new ot,await l.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),l=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),d=i.level,l=0!==d&&!i.directory,c=i.zip64;let f,u;if(o&&!i.zipCrypto){f=new Uint8Array(pn.length+2);const t=new DataView(f.buffer);_n(t,0,Ut),f.set(pn,2),u=i.encryptionStrength,xn(t,8,u)}else f=new Uint8Array(0);const p={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:f,rawExtraField:i.rawExtraField};let h=Et;i.dataDescriptor&&(h|=8);let m=0;l&&(m=8);c&&(p.version=p.version>45?p.version:45);o&&(h|=1,i.zipCrypto||(p.version=p.version>51?p.version:51,m=99,l&&(p.rawExtraFieldAES[9]=8)));const x=p.headerArray=new Uint8Array(26),_=new DataView(x.buffer);_n(_,0,p.version),_n(_,2,h),_n(_,4,m);const w=new Uint32Array(1),g=new DataView(w.buffer);_n(g,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),_n(g,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const b=w[0];wn(_,6,b),_n(_,22,r.length),_n(_,24,0),_n(_,24,f.length+p.rawExtraField.length);const v=new Uint8Array(30+r.length+f.length+p.rawExtraField.length);let y;wn(new DataView(v.buffer),0,bt),v.set(x,4),v.set(r,30),v.set(f,30+r.length),v.set(p.rawExtraField,30+r.length+f.length);let k=0,A=0;if(t){k=t.size;const r=await Ue(n.Deflate,{codecType:he,level:d,password:s,encryptionStrength:u,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&b>>8&255,signed:!0,compressed:l,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(v),y=await De(r,t,e,0,k,n,{onprogress:i.onprogress,signal:i.signal}),A=y.length}else await e.writeUint8Array(v);let z,U=new Uint8Array(0);i.dataDescriptor&&(U=new Uint8Array(c?24:16),z=new DataView(U.buffer),wn(z,0,vt));if(t)if(o&&!i.zipCrypto||void 0===y.signature||(wn(_,10,y.signature),p.signature=y.signature,i.dataDescriptor&&wn(z,4,y.signature)),c){const t=new DataView(p.rawExtraFieldZip64.buffer);_n(t,0,1),_n(t,2,24),wn(_,14,wt),gn(t,12,BigInt(A)),wn(_,18,wt),gn(t,4,BigInt(k)),i.dataDescriptor&&(gn(z,8,BigInt(A)),gn(z,16,BigInt(k)))}else wn(_,14,A),wn(_,18,k),i.dataDescriptor&&(wn(z,8,A),wn(z,12,k));i.dataDescriptor&&await e.writeUint8Array(U);const E=v.length+(y?y.length:0)+U.length;return Object.assign(p,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:b,encrypted:o,length:E}),p}(n,l,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),l!=a){const e=l.getData(),n=new FileReader,r=new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)})),[s]=await Promise.all([r,t.lockWrite,o]);if(!i.dataDescriptor){const t=new DataView(s);c.encrypted&&!i.zipCrypto||wn(t,14,c.signature),c.zip64?(wn(t,18,wt),wn(t,22,wt)):(wn(t,18,c.compressedSize),wn(t,22,c.uncompressedSize))}await a.writeUint8Array(new Uint8Array(s))}if(c.offset=t.offset,c.zip64){gn(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{d&&d(),s&&s()}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:f,zip64:h,password:d,level:m,useWebWorkers:x,encryptionStrength:l,zipCrypto:c,bufferedWrite:_,keepOrder:w,dataDescriptor:g,signal:b}));return this.maxOutputSize-=p,Object.assign(v,{name:t,comment:r,extraField:u}),new Fe(v)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=wt||r>=wt||s>=gt,d=new Uint8Array(r+(o?98:22)),l=new DataView(d.buffer);if(t.length){if(!(t.length<=gt))throw new Error(an);_n(l,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;wn(l,i,yt),_n(l,i+4,t.version),d.set(t.headerArray,i+6),_n(l,i+30,a),_n(l,i+32,t.rawComment.length),t.directory&&xn(l,i+38,16),t.zip64?wn(l,i+42,wt):wn(l,i+42,t.offset),d.set(e,i+46),d.set(n,i+46+e.length),d.set(r,i+46+e.length+n.length),d.set(t.rawExtraField,46+e.length+n.length+r.length),d.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(wn(l,i,At),gn(l,i+4,BigInt(44)),_n(l,i+12,45),_n(l,i+14,45),gn(l,i+24,BigInt(s)),gn(l,i+32,BigInt(s)),gn(l,i+40,BigInt(r)),gn(l,i+48,BigInt(a)),wn(l,i+56,zt),gn(l,i+64,BigInt(a)+BigInt(r)),wn(l,i+72,1),s=gt,a=wt,r=wt,i+=76),wn(l,i,kt),_n(l,i+8,s),_n(l,i+10,s),wn(l,i+12,r),wn(l,i+16,a),await e.writeUint8Array(d),t.length&&await e.writeUint8Array(t),e.getData()}}function mn(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function xn(t,e,n){t.setUint8(e,n)}function _n(t,e,n){t.setUint16(e,n,!0)}function wn(t,e,n){t.setUint32(e,n,!0)}function gn(t,e,n){t.setBigUint64(e,n,!0)}const bn=524288;class vn{constructor(t,e,n,i){if(t.root&&i&&i.getChildByName(e))throw new Error("Entry filename already exists");n||(n={}),this.fs=t,this.name=e,this.data=n.data,this.id=t.entries.length,this.parent=i,this.children=[],this.uncompressedSize=0,t.entries.push(this),i&&this.parent.children.push(this)}moveTo(t){this.fs.move(this,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}}class yn extends vn{constructor(t,e,n,i){super(t,e,n,i),this.Reader=n.Reader,this.Writer=n.Writer,n.getData&&(this.getData=n.getData)}async getData(t,e={}){return!t||t.constructor==this.Writer&&this.data?this.data:(this.reader=new this.Reader(this.data,e),await this.reader.init(),t.initialized||await t.init(),this.uncompressedSize=this.reader.size,async function(t,e){return n();async function n(i=0){const r=i*bn;if(re.file((i=>n(t.addBlob(e.name,i))),i)));async function n(t,e){const r=await i(e);for(const e of r)e.isDirectory?await n(t.addDirectory(e.name),e):await new Promise(((n,i)=>{e.file((i=>{const r=t.addBlob(e.name,i);r.uncompressedSize=i.size,n(r)}),i)}))}function i(t){return new Promise(((e,n)=>{let i=[];function r(t){t.readEntries((n=>{n.length?(i=i.concat(n),r(t)):e(i)}),n)}t.isDirectory&&r(t.createReader()),t.isFile&&e(i)}))}}(this,t)}async addData(t,e){return Dn(this,t,e)}async importBlob(t,e={}){await this.importZip(new st(t),e)}async importData64URI(t,e={}){await this.importZip(new rt(t),e)}async importUint8Array(t,e={}){await this.importZip(new mt(t),e)}async importHttpContent(t,e={}){await this.importZip(new ht(t,e),e)}async exportBlob(t={}){return this.exportZip(new ot("application/zip"),t)}async exportData64URI(t={}){return this.exportZip(new at("application/zip"),t)}async exportUint8Array(t={}){return this.exportZip(new xt,t)}async importZip(t,e){t.initialized||await t.init();const n=new Ze(t,e);(await n.getEntries()).forEach((t=>{let n=this;const i=t.filename.split("/"),r=i.pop();i.forEach((t=>n=n.getChildByName(t)||new kn(this.fs,t,null,n))),t.directory||Dn(n,r,{data:t,Reader:zn(Object.assign({},e))})}))}async exportZip(t,e){await Un(this),await t.init();const n=new hn(t,e);return await async function(t,e,n,i){const r=e,a=new Map;async function s(t,e){async function o(){if(i.bufferedWrite)await Promise.all(e.children.map(d));else for(const t of e.children)await d(t)}async function d(e){const o=i.relativePath?e.getRelativeName(r):e.getFullname();await t.add(o,e.reader,Object.assign({directory:e.directory},Object.assign({},i,{onprogress:t=>{if(i.onprogress){a.set(o,t);try{i.onprogress(Array.from(a.values()).reduce(((t,e)=>t+e)),n)}catch(t){}}}}))),await s(t,e)}await o()}await s(t,e)}(n,this,function(t,e){let n=0;return t.forEach(i),n;function i(t){n+=t[e],t.children&&t.children.forEach(i)}}([this],"uncompressedSize"),e),await n.close(),t.getData()}getChildByName(t){for(let e=0;e{n.id==t.id&&e.splice(i,1)}))}function Rn(t){t.entries=[],t.root=new kn(t)}function Dn(t,e,n,i){if(t.directory)return i?new kn(t.fs,e,n,t):new yn(t.fs,e,n,t);throw new Error("Parent entry is not a directory")}(()=>{if("function"==typeof URL.createObjectURL){const t=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],r=n.getPartial(i);return 32===r?t.concat(e):n._shiftRight(e,r,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(i),i=0;if(0===e)return r.concat(t);for(let n=0;n>>e),i=t[n]<<32-e;const a=t.length?t[t.length-1]:0,s=n.getPartial(a);return r.push(n.partial(e+s&31,e+s>32?i:r.pop(),1)),r}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let r;for(let n=0;n>>24,r<<=8;return i},toBits(t){const e=[];let i,r=0;for(i=0;i>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^d<<24,d=d<<1^283*(d>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,d,l;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let c=s=0;!n[c];c^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[c]=a,i[a]=c,l=r[d=r[o=r[c]]];let f=16843009*l^65537*d^257*o^16843008*c,u=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][c]=u=u<<24^u>>>8,e[n][a]=f=f<<24^f>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],d=a[2],l=a[3],c=a[4];let f,u,p,h=t[0]^n[0],m=t[e?3:1]^n[1],x=t[2]^n[2],_=t[e?1:3]^n[3],w=4;for(let t=0;t>>24]^o[m>>16&255]^d[x>>8&255]^l[255&_]^n[w],u=s[m>>>24]^o[x>>16&255]^d[_>>8&255]^l[255&h]^n[w+1],p=s[x>>>24]^o[_>>16&255]^d[h>>8&255]^l[255&m]^n[w+2],_=s[_>>>24]^o[h>>16&255]^d[m>>8&255]^l[255&x]^n[w+3],w+=4,h=f,m=u,x=p;for(let t=0;t<4;t++)r[e?3&-t:t]=c[h>>>24]<<24^c[m>>16&255]<<16^c[x>>8&255]<<8^c[255&_]^n[w++],f=h,h=m,m=x,x=_,_=f;return r}},a=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,i){let r;if(!(r=e.length))return[];const a=n.bitLength(e);for(let n=0;nt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class y{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return A(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(z(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(z(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function R(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function I(t){return 4294967295&t}class S{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new y(n.password,n.passwordVerification):new _(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class C{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new w(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const F={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),j=function(t,e){return e.codecType.startsWith("deflate")?new C(t,e):e.codecType.startsWith("inflate")?new S(t,e):void 0}(n,e)},append:async t=>({data:await j.append(t.data)}),flush:()=>j.flush()};let j;function B(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=F[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const T=[0,1,2,3].concat(...B([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function M(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,d,l=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);d=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*d]=i[2*s]+i[2*o],n.depth[d]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=d,n.heap[1]=d++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,d,l,c,f,u,p=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)d=e.heap[o],c=n[2*n[2*d+1]+1]+1,c>s&&(c=s,p++),n[2*d+1]=c,d>t.max_code||(e.bl_count[c]++,f=0,d>=a&&(f=r[d-a]),u=n[2*d],e.opt_len+=u*(c+f),i&&(e.static_len+=u*(i[2*d+1]+f)));if(0!==p){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,p-=2}while(p>0);for(c=s;0!==c;c--)for(d=e.bl_count[c];0!==d;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=c&&(e.opt_len+=(c-n[2*l+1])*n[2*l],n[2*l+1]=c),d--)}}(n),function(t,n,i){const r=[];let a,s,o,d=0;for(a=1;a<=15;a++)r[a]=d=d+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function W(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function q(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}M._length_code=[0,1,2,3,4,5,6,7].concat(...B([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),M.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],M.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],M.d_code=function(t){return t<256?T[t]:T[256+(t>>>7)]},M.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],M.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],M.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],W.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],W.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],W.static_l_desc=new W(W.static_ltree,M.extra_lbits,257,286,15),W.static_d_desc=new W(W.static_dtree,M.extra_dbits,0,30,15),W.static_bl_desc=new W(null,M.extra_blbits,0,19,7);const O=[new q(0,0,0,0,0),new q(4,4,8,4,1),new q(4,5,16,8,1),new q(4,6,32,32,1),new q(4,4,16,16,2),new q(8,16,32,32,2),new q(8,16,128,128,2),new q(8,32,128,256,2),new q(32,128,258,1024,2),new q(32,258,258,4096,2)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function V(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;Y>16-i?(n=t,G|=n<>>16-Y,Y+=i-16):(G|=t<=8&&(Q(255&G),G>>>=8,Y-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[H+2*N]=e>>>8&255,t.pending_buf[H+2*N+1]=255&e,t.pending_buf[q+N]=255&n,N++,0===e?S[2*n]++:(Z++,e--,S[2*(M._length_code[n]+256+1)]++,C[2*M.d_code(e)]++),0==(8191&N)&&E>2){for(i=8*N,r=v-_,a=0;a<30;a++)i+=C[2*a]*(5+M.extra_dbits[a]);if(i>>>=3,Z8?$(G):Y>0&&Q(255&G),G=0,Y=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),K=8,$(n),$(~n),t.pending_buf.set(d.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function dt(e,n,i){let r,a,s=0;E>0?(j.build_tree(t),B.build_tree(t),s=function(){let e;for(J(S,j.max_code),J(C,B.max_code),T.build_tree(t),e=18;e>=3&&0===F[2*M.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(W.static_ltree,W.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?_:-1,v-_,t),_=v,e.flush_pending()}function ct(){let t,n,i,r;do{if(r=l-k-v,0===r&&0===v&&0===k)r=a;else if(-1==r)r--;else if(v>=a+a-262){d.set(d.subarray(a,a+a),0),y-=a,v-=a,_-=a,t=p,i=t;do{n=65535&f[--i],f[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&c[--i],c[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(d,v+k,r),k+=t,k>=3&&(u=255&d[v],u=(u<a-262?v-(a-262):0;let f=I;const u=o,p=v+258;let h=d[r+s-1],m=d[r+s];A>=D&&(i>>=2),f>k&&(f=k);do{if(e=t,d[e+s]==m&&d[e+s-1]==h&&d[e]==d[r]&&d[++e]==d[r+1]){r+=2,e++;do{}while(d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&d[++r]==d[++e]&&rs){if(y=t,s=n,n>=f)break;h=d[r+s-1],m=d[r+s]}}}while((t=65535&c[t&u])>l&&0!=--i);return s<=k?s:k}function ut(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,j.dyn_tree=S,j.stat_desc=W.static_l_desc,B.dyn_tree=C,B.stat_desc=W.static_d_desc,T.dyn_tree=F,T.stat_desc=W.static_bl_desc,G=0,Y=0,K=8,X(),function(){l=2*a,f[p-1]=0;for(let t=0;t9||8!=l||r<9||r>15||n<0||n>9||_<0||_>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(O[E].func!=O[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,U=O[E].max_lazy,D=O[E].good_length,I=O[E].nice_length,z=O[E].max_chain),R=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,l=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,l=i-s),d.set(e.subarray(l,l+s),0),v=s,_=s,u=255&d[0],u=(u<4||h<0)return-2;if(!l.next_out||!l.next_in&&0!==l.avail_in||666==n&&4!=h)return l.msg=L[4],-2;if(0===l.avail_out)return l.msg=L[7],-5;var F;if(e=l,S=r,r=h,42==n&&(D=8+(s-8<<4)<<8,I=(E-1&255)>>1,I>3&&(I=3),D|=I<<6,0!==v&&(D|=32),D+=31-D%31,n=113,Q((F=D)>>8&255),Q(255&F)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&h<=S&&4!=h)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return l.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(C=-1,O[E].func){case 0:C=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(ct(),0===k&&0==t)return 0;if(0===k)break}if(v+=k,k=0,n=_+r,(0===v||v>=n)&&(k=v-n,v=n,lt(!1),0===e.avail_out))return 0;if(v-_>=a-262&&(lt(!1),0===e.avail_out))return 0}return lt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:C=function(t){let n,i=0;for(;;){if(k<262){if(ct(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(u=(u<=3)if(n=rt(v-y,w-3),k-=w,w<=U&&k>=3){w--;do{v++,u=(u<=3&&(u=(u<4096)&&(w=2)),A>=3&&w<=A){i=v+k-3,n=rt(v-1-g,A-3),k-=A-1,A-=2;do{++v<=i&&(u=(u<0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(l),c.forEach((function(t){s.set(t,d),d+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}N.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new P,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const Z=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],K=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],G=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Y=[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],X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],J=[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],Q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function $(){let t,e,n,i,r,a;function s(t,e,s,o,d,l,c,f,u,p,h){let m,x,_,w,g,b,v,y,k,A,z,U,E,R,D;A=0,g=s;do{n[t[e+A]]++,A++,g--}while(0!==g);if(n[0]==s)return c[0]=-1,f[0]=0,0;for(y=f[0],b=1;b<=15&&0===n[b];b++);for(v=b,yg&&(y=g),f[0]=y,R=1<U+y;){if(w++,U+=y,D=_-U,D=D>y?y:D,(x=1<<(b=v-U))>m+1&&(x-=m+1,E=v,b1440)return-3;r[w]=z=p[0],p[0]+=D,0!==w?(a[w]=g,i[0]=b,i[1]=y,b=g>>>U-y,i[2]=z-r[w-1]-b,u.set(i,3*(r[w-1]+b))):c[0]=z}for(i[1]=v-U,A>=s?i[0]=192:h[A]>>U;b>>=1)g^=b;for(g^=b,k=(1<257?(-3==p?u.msg="oversubscribed distance tree":-5==p?(u.msg="incomplete distance tree",p=-3):-4!=p&&(u.msg="empty distance tree with lengths",p=-3),p):0)}}function tt(){const t=this;let e,n,i,r,a=0,s=0,o=0,d=0,l=0,c=0,f=0,u=0,p=0,h=0;function m(t,e,n,i,r,a,s,o){let d,l,c,f,u,p,h,m,x,_,w,g,b,v,y,k;h=o.next_in_index,m=o.avail_in,u=s.bitb,p=s.bitk,x=s.write,_=x>=l[k+1],p-=l[k+1],0!=(16&f)){for(f&=15,b=l[k+2]+(u&Z[f]),u>>=f,p-=f;p<15;)m--,u|=(255&o.read_byte(h++))<>=l[k+1],p-=l[k+1],0!=(16&f)){for(f&=15;p>=f,p-=f,_-=b,x>=v)y=x-v,x-y>0&&2>x-y?(s.window[x++]=s.window[y++],s.window[x++]=s.window[y++],b-=2):(s.window.set(s.window.subarray(y,y+2),x),x+=2,y+=2,b-=2);else{y=x-v;do{y+=s.end}while(y<0);if(f=s.end-y,b>f){if(b-=f,x-y>0&&f>x-y)do{s.window[x++]=s.window[y++]}while(0!=--f);else s.window.set(s.window.subarray(y,y+f),x),x+=f,y+=f,f=0;y=0}}if(x-y>0&&b>x-y)do{s.window[x++]=s.window[y++]}while(0!=--b);else s.window.set(s.window.subarray(y,y+b),x),x+=b,y+=b,b=0;break}if(0!=(64&f))return o.msg="invalid distance code",b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,-3;d+=l[k+2],d+=u&Z[f],k=3*(c+d),f=l[k]}break}if(0!=(64&f))return 0!=(32&f)?(b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,1):(o.msg="invalid literal/length code",b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,-3);if(d+=l[k+2],d+=u&Z[f],k=3*(c+d),0===(f=l[k])){u>>=l[k+1],p-=l[k+1],s.window[x++]=l[k+2],_--;break}}else u>>=l[k+1],p-=l[k+1],s.window[x++]=l[k+2],_--}while(_>=258&&m>=10);return b=o.avail_in-m,b=p>>3>3:b,m+=b,h-=b,p-=b<<3,s.bitb=u,s.bitk=p,o.avail_in=m,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=x,0}t.init=function(t,a,s,o,d,l){e=0,f=t,u=a,i=s,p=o,r=d,h=l,n=null},t.proc=function(t,x,_){let w,g,b,v,y,k,A,z=0,U=0,E=0;for(E=x.next_in_index,v=x.avail_in,z=t.bitb,U=t.bitk,y=t.write,k=y=258&&v>=10&&(t.bitb=z,t.bitk=U,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,_=m(f,u,i,p,r,h,t,x),E=x.next_in_index,v=x.avail_in,z=t.bitb,U=t.bitk,y=t.write,k=y>>=n[g+1],U-=n[g+1],b=n[g],0===b){d=n[g+2],e=6;break}if(0!=(16&b)){l=15&b,a=n[g+2],e=2;break}if(0==(64&b)){o=b,s=g/3+n[g+2];break}if(0!=(32&b)){e=7;break}return e=9,x.msg="invalid literal/length code",_=-3,t.bitb=z,t.bitk=U,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,t.inflate_flush(x,_);case 2:for(w=l;U>=w,U-=w,o=u,n=r,s=h,e=3;case 3:for(w=o;U>=n[g+1],U-=n[g+1],b=n[g],0!=(16&b)){l=15&b,c=n[g+2],e=4;break}if(0==(64&b)){o=b,s=g/3+n[g+2];break}return e=9,x.msg="invalid distance code",_=-3,t.bitb=z,t.bitk=U,x.avail_in=v,x.total_in+=E-x.next_in_index,x.next_in_index=E,t.write=y,t.inflate_flush(x,_);case 4:for(w=l;U>=w,U-=w,e=5;case 5:for(A=y-c;A<0;)A+=t.end;for(;0!==a;){if(0===k&&(y==t.end&&0!==t.read&&(y=0,k=y7&&(U-=8,v++,E--),t.write=y,_=t.inflate_flush(x,_),y=t.write,k=yt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,m,x,_,w,g,b,v;for(_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,g=n.write,b=g>>1){case 0:m>>>=3,x-=3,h=7&x,m>>>=h,x-=h,r=1;break;case 1:y=[],k=[],A=[[]],z=[[]],$.inflate_trees_fixed(y,k,A,z),c.init(y[0],k[0],A[0],0,z[0],0),m>>>=3,x-=3,r=6;break;case 2:m>>>=3,x-=3,r=3;break;case 3:return m>>>=3,x-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e)}break;case 1:for(;x<32;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>16&65535)!=(65535&m))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);a=65535&m,m=x=0,r=0!==a?2:0!==f?7:0;break;case 2:if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);if(0===b&&(g==n.end&&0!==n.read&&(g=0,b=gw&&(h=w),h>b&&(h=b),n.window.set(t.read_buf(_,h),g),_+=h,w-=h,g+=h,b-=h,0!=(a-=h))break;r=0!==f?7:0;break;case 3:for(;x<14;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,x-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;x<3;){if(0===w)return n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);e=0,w--,m|=(255&t.read_byte(_++))<>>=3,x-=3}for(;o<19;)i[et[o++]]=0;if(d[0]=7,h=p.inflate_trees_bits(i,d,l,u,t),0!=h)return-3==(e=h)&&(i=null,r=9),n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=d[0];x>>=h,x-=h,i[o++]=c;else{for(v=18==c?7:c-14,a=18==c?11:3;x>>=h,x-=h,a+=m&Z[v],m>>>=v,x-=v,v=o,h=s,v+a>258+(31&h)+(h>>5&31)||16==c&&v<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);c=16==c?i[v-1]:0;do{i[v++]=c}while(0!=--a);o=v}}if(l[0]=-1,U=[],E=[],R=[],D=[],U[0]=9,E[0]=6,h=s,h=p.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,U,E,R,D,u,t),0!=h)return-3==h&&(i=null,r=9),e=h,n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,n.inflate_flush(t,e);c.init(U[0],E[0],u,R[0],u,D[0]),r=6;case 6:if(n.bitb=m,n.bitk=x,t.avail_in=w,t.total_in+=_-t.next_in_index,t.next_in_index=_,n.write=g,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),_=t.next_in_index,w=t.avail_in,m=n.bitb,x=n.bitk,g=n.write,b=g15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new nt(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=d&&(r(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,l),l+=t.length})),o}},this.flush=function(){t.inflateEnd()}}at.prototype={inflateInit:function(t){const e=this;return e.istate=new rt,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=st}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));L({workerScripts:{inflate:[e],deflate:[e]}})}})(),L({Deflate:function(t){const e=new w,n=512,i=new Uint8Array(n);let r=t?t.level:-1;void 0===r&&(r=-1),e.deflateInit(r),e.next_out=i,this.append=function(t,r){let a,s,o=0,d=0,l=0;const c=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,a=e.deflate(0),0!=a)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?c.push(new Uint8Array(i)):c.push(new Uint8Array(i.subarray(0,e.next_out_index)))),l+=e.next_out_index,r&&e.next_in_index>0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(l),c.forEach((function(t){s.set(t,d),d+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new M,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,d=0,l=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===v){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=d&&(r(t.next_in_index),d=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,l),l+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=st,t.BlobWriter=ot,t.Data64URIReader=rt,t.Data64URIWriter=at,t.ERR_ABORT=Re,t.ERR_BAD_FORMAT=je,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=We,t.ERR_DUPLICATED_NAME=rn,t.ERR_ENCRYPTED=Le,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Me,t.ERR_EOCDR_NOT_FOUND=Be,t.ERR_EOCDR_ZIP64_NOT_FOUND=Te,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Oe,t.ERR_HTTP_RANGE=Z,t.ERR_INVALID_COMMENT=an,t.ERR_INVALID_DATE=ln,t.ERR_INVALID_ENCRYPTION_STRENGTH=cn,t.ERR_INVALID_ENTRY_COMMENT=sn,t.ERR_INVALID_ENTRY_NAME=on,t.ERR_INVALID_EXTRAFIELD_DATA=un,t.ERR_INVALID_EXTRAFIELD_TYPE=fn,t.ERR_INVALID_PASSWORD=Wt,t.ERR_INVALID_SIGNATURE=xe,t.ERR_INVALID_VERSION=dn,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=qe,t.ERR_UNSUPPORTED_COMPRESSION=Pe,t.ERR_UNSUPPORTED_ENCRYPTION=Ve,t.HttpRangeReader=class extends ht{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=ht,t.Reader=tt,t.TextReader=nt,t.TextWriter=it,t.Uint8ArrayReader=mt,t.Uint8ArrayWriter=xt,t.Writer=et,t.ZipReader=Ze,t.ZipWriter=hn,t.configure=L,t.fs=An,t.getMimeType=function(t){return t&&P[t.split(".").pop().toLowerCase()]||"application/octet-stream"},t.initShimAsyncCodec=(t,e={},n)=>({Deflate:N(t.Deflate,e.deflate,n),Inflate:N(t.Inflate,e.inflate,n)}),Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/zip-fs.js b/dist/zip-fs.js index fc4c3921..9e8c22b1 100644 --- a/dist/zip-fs.js +++ b/dist/zip-fs.js @@ -83,7 +83,7 @@ } } - var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n;}class e{constructor(t){this.crc=t||-1;}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n;}get(){return ~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},a={name:"AES-CTR"},r=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},a),d=["deriveBits"],_=["sign"],u=[8,12,16],f=[16,24,32],c=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=y(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await p(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2);}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=y(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);r=new Uint8Array(t);}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=a[t]&&(s=!1);}return {valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=y(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await p(t,e,n,["encrypt"]),y(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=y(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=y(this.output,t);}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return {data:y(t,n),signature:n}}}async function p(t,e,n,i){t.counter=new Uint8Array(c);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,r,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),b=new Uint8Array(w);t.keys={key:await h.importKey("raw",b.subarray(0,f[t.strength]),a,!0,i),authentication:await h.importKey("raw",b.subarray(f[t.strength],2*f[t.strength]),o,!1,_),passwordVerification:b.subarray(2*f[t.strength])};}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0;}}function y(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t);}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return k(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function E(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function C(t){return 4294967295&t}class z{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new b(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const M={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),V=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new z(t,e):void 0}(n,e);},append:async t=>({data:await V.append(t.data)}),flush:()=>V.flush()};let V;function O(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=M[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data]);}catch(e){postMessage(t);}else postMessage(t);}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}});}}));const D=[0,1,2,3].concat(...O([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function K(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1;}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1);}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],_=n[2*n[2*l+1]+1]+1,_>s&&(_=s,c++),n[2*l+1]=_,l>t.max_code||(e.bl_count[_]++,u=0,l>=r&&(u=a[l-r]),f=n[2*l],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(l=e.bl_count[_];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),l--);}}(n),function(t,n,i){const a=[];let r,s,o,l=0;for(r=1;r<=15;r++)a[r]=l=l+i[r-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(a[o]++,o));}(i,t.max_code,n.bl_count);};}function R(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a;}function T(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a;}K._length_code=[0,1,2,3,4,5,6,7].concat(...O([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),K.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],K.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],K.d_code=function(t){return t<256?D[t]:D[256+(t>>>7)]},K.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],K.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],K.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],R.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],R.static_l_desc=new R(R.static_ltree,K.extra_lbits,257,286,15),R.static_d_desc=new R(R.static_dtree,K.extra_dbits,0,30,15),R.static_bl_desc=new R(null,K.extra_blbits,0,19,7);const B=[new T(0,0,0,0,0),new T(4,4,8,4,1),new T(4,5,16,8,1),new T(4,6,32,32,1),new T(4,4,16,16,2),new T(8,16,32,32,2),new T(8,16,128,128,2),new T(8,32,128,256,2),new T(32,128,258,1024,2),new T(32,258,258,4096,2)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function P(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255);}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8);}function at(e,n){let i,a,r;if(t.pending_buf[F+2*H]=e>>>8&255,t.pending_buf[F+2*H+1]=255&e,t.pending_buf[q+H]=255&n,H++,0===e?j[2*n]++:(G++,e--,j[2*(K._length_code[n]+256+1)]++,M[2*K.d_code(e)]++),0==(8191&H)&&E>2){for(i=8*H,a=m-p,r=0;r<30;r++)i+=M[2*r]*(5+K.extra_dbits[r]);if(i>>>=3,G8?$(N):Q>0&&Z(255&N),N=0,Q=0;}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function lt(e,n,i){let a,r,s=0;E>0?(O.build_tree(t),D.build_tree(t),s=function(){let e;for(Y(j,O.max_code),Y(M,D.max_code),T.build_tree(t),e=18;e>=3&&0===V[2*K.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?ot(e,n,i):r==a?(tt(2+(i?1:0),3),rt(R.static_ltree,R.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?p:-1,m-p,t),p=m,e.flush_pending();}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){l.set(l.subarray(r,r+r),0),v-=r,m-=r,p-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(l,m+k,a),k+=t,k>=3&&(f=255&l[m],f=(f<r-262?m-(r-262):0;let u=z;const f=o,c=m+258;let h=l[a+s-1],w=l[a+s];A>=C&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&l[e+s-1]==h&&l[e]==l[a]&&l[++e]==l[a+1]){a+=2,e++;do{}while(l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&as){if(v=t,s=n,n>=u)break;h=l[a+s-1],w=l[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,O.dyn_tree=j,O.stat_desc=R.static_l_desc,D.dyn_tree=M,D.stat_desc=R.static_d_desc,T.dyn_tree=V,T.stat_desc=R.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||a<9||a>15||n<0||n>9||p<0||p>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(B[E].func!=B[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=B[E].max_lazy,C=B[E].good_length,z=B[E].nice_length,U=B[E].max_chain),S=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,p=s,f=255&l[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=L[4],-2;if(0===d.avail_out)return d.msg=L[7],-5;var V;if(e=d,j=a,a=h,42==n&&(C=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),C|=z<<6,0!==m&&(C|=32),C+=31-C%31,n=113,Z((V=C)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return d.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,B[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=p+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-p>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,l),l+=t.length;})),s}},this.flush=function(){let t,a,r=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length;})),a};}W.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new q,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return -2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0));}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],G=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],J=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],N=[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],Q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],X=[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],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Z(){let t,e,n,i,a,r;function s(t,e,s,o,l,d,_,u,f,c,h){let w,b,p,x,y,g,m,v,k,A,U,I,E,S,C;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,S=1<I+v;){if(x++,I+=v,C=p-I,C=C>v?v:C,(b=1<<(g=m-I))>w+1&&(b-=w+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=C,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function $(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,d=0,_=0,u=0,f=0,c=0,h=0;function w(t,e,n,i,a,r,s,o){let l,d,_,u,f,c,h,w,b,p,x,y,g,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,c=s.bitk,b=s.write,p=b>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)w--,f|=(255&o.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,p-=g,b>=m)v=b-m,b-v>0&&2>b-v?(s.window[b++]=s.window[v++],s.window[b++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),b),b+=2,v+=2,g-=2);else {v=b-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,b-v>0&&u>b-v)do{s.window[b++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),b),b+=u,v+=u,u=0;v=0;}}if(b-v>0&&g>b-v)do{s.window[b++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),b),b+=g,v+=g,g=0;break}if(0!=(64&u))return o.msg="invalid distance code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3;l+=d[k+2],l+=f&F[u],k=3*(_+l),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,1):(o.msg="invalid literal/length code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3);if(l+=d[k+2],l+=f&F[u],k=3*(_+l),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;break}}else f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;}while(p>=258&&w>=10);return g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,0}t.init=function(t,r,s,o,l,d){e=0,u=t,f=r,i=s,c=o,a=l,h=d,n=null;},t.proc=function(t,b,p){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,p=w(u,f,i,c,a,h,t,b),E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){l=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,b.msg="invalid literal/length code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 2:for(x=d;I>=x,I-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}return e=9,b.msg="invalid distance code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,p=t.inflate_flush(b,p),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,w,b,p,x,y,g,m;for(p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y>>1){case 0:w>>>=3,b-=3,h=7&b,w>>>=h,b-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Z.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,b-=3,a=6;break;case 2:w>>>=3,b-=3,a=3;break;case 3:return w>>>=3,b-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;b<32;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>16&65535)!=(65535&w))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);r=65535&w,w=b=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(p,h),y),p+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;b<14;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,b-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;b<3;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>=3,b-=3;}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=c.inflate_trees_bits(i,l,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,_;for(h=l[0];b>>=h,b-=h,i[o++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;b>>=h,b-=h,r+=w&F[m],w>>>=m,b-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);o=m;}}if(d[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return -3;default:return -2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return -2;const r=t.istate;return a>=1<0&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(_),r.forEach((function(t){o.set(t,d),d+=t.length;})),o}},this.flush=function(){t.inflateEnd();};}at.prototype={inflateInit:function(t){const e=this;return e.istate=new it,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return -2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=rt;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; + var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n;}class e{constructor(t){this.crc=t||-1;}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n;}get(){return ~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],a=n.getPartial(i);return 32===a?t.concat(e):n._shiftRight(e,a,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(i),i=0;if(0===e)return a.concat(t);for(let n=0;n>>e),i=t[n]<<32-e;const r=t.length?t[t.length-1]:0,s=n.getPartial(r);return a.push(n.partial(e+s&31,e+s>32?i:a.pop(),1)),a}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let a;for(let n=0;n>>24,a<<=8;return i},toBits(t){const e=[];let i,a=0;for(i=0;i>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],r%a==0&&(t=t<<8^t>>>24^o<<24,o=o<<1^283*(o>>7))),s[r]=s[r-a]^t;}for(let t=0;r;t++,r--){const e=s[3&t?r:r-4];l[t]=r<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]];}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],a=[],r=[];let s,l,o,d;for(let t=0;t<256;t++)r[(a[t]=t<<1^283*(t>>7))^t]=t;for(let _=s=0;!n[_];_^=l||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[_]=r,i[r]=_,d=a[o=a[l=a[_]]];let u=16843009*d^65537*o^257*l^16843008*_,f=257*a[r]^16843008*r;for(let n=0;n<4;n++)t[n][_]=f=f<<24^f>>>8,e[n][r]=u=u<<24^u>>>8;}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0);}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,a=[0,0,0,0],r=this._tables[e],s=r[0],l=r[1],o=r[2],d=r[3],_=r[4];let u,f,c,h=t[0]^n[0],b=t[e?3:1]^n[1],p=t[2]^n[2],w=t[e?1:3]^n[3],x=4;for(let t=0;t>>24]^l[b>>16&255]^o[p>>8&255]^d[255&w]^n[x],f=s[b>>>24]^l[p>>16&255]^o[w>>8&255]^d[255&h]^n[x+1],c=s[p>>>24]^l[w>>16&255]^o[h>>8&255]^d[255&b]^n[x+2],w=s[w>>>24]^l[h>>16&255]^o[b>>8&255]^d[255&p]^n[x+3],x+=4,h=u,b=f,p=c;for(let t=0;t<4;t++)a[e?3&-t:t]=_[h>>>24]<<24^_[b>>16&255]<<16^_[p>>8&255]<<8^_[255&w]^n[x++],u=h,h=b,b=p,p=w,w=u;return a}},r=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e;}reset(){this._iv=this._initIv;}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i;}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]));}calculate(t,e,i){let a;if(!(a=e.length))return [];const r=n.bitLength(e);for(let n=0;nt.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,I(this,t);}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return A(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,I(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function C(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function z(t){return 4294967295&t}class B{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class M{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new x(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const V={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),D=function(t,e){return e.codecType.startsWith("deflate")?new M(t,e):e.codecType.startsWith("inflate")?new B(t,e):void 0}(n,e);},append:async t=>({data:await D.append(t.data)}),flush:()=>D.flush()};let D;function K(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=V[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data]);}catch(e){postMessage(t);}else postMessage(t);}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}});}}));const P=[0,1,2,3].concat(...K([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function j(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1;}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,l,o,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);o=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=l,i[2*o]=i[2*s]+i[2*l],n.depth[o]=Math.max(n.depth[s],n.depth[l])+1,i[2*s+1]=i[2*l+1]=o,n.heap[1]=o++,n.pqdownheap(i,1);}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,o,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)o=e.heap[l],_=n[2*n[2*o+1]+1]+1,_>s&&(_=s,c++),n[2*o+1]=_,o>t.max_code||(e.bl_count[_]++,u=0,o>=r&&(u=a[o-r]),f=n[2*o],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*o+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(o=e.bl_count[_];0!==o;)d=e.heap[--l],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),o--);}}(n),function(t,n,i){const a=[];let r,s,l,o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(s=0;s<=n;s++)l=t[2*s+1],0!==l&&(t[2*s]=e(a[l]++,l));}(i,t.max_code,n.bl_count);};}function L(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a;}function R(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a;}j._length_code=[0,1,2,3,4,5,6,7].concat(...K([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),j.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],j.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],j.d_code=function(t){return t<256?P[t]:P[256+(t>>>7)]},j.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],j.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],j.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],L.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],L.static_l_desc=new L(L.static_ltree,j.extra_lbits,257,286,15),L.static_d_desc=new L(L.static_dtree,j.extra_dbits,0,30,15),L.static_bl_desc=new L(null,j.extra_blbits,0,19,7);const W=[new R(0,0,0,0,0),new R(4,4,8,4,1),new R(4,5,16,8,1),new R(4,6,32,32,1),new R(4,4,16,16,2),new R(8,16,32,32,2),new R(8,16,128,128,2),new R(8,32,128,256,2),new R(32,128,258,1024,2),new R(32,258,258,4096,2)],G=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function O(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255);}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8);}function at(e,n){let i,a,r;if(t.pending_buf[H+2*q]=e>>>8&255,t.pending_buf[H+2*q+1]=255&e,t.pending_buf[R+q]=255&n,q++,0===e?B[2*n]++:(F++,e--,B[2*(j._length_code[n]+256+1)]++,M[2*j.d_code(e)]++),0==(8191&q)&&E>2){for(i=8*q,a=m-w,r=0;r<30;r++)i+=M[2*r]*(5+j.extra_dbits[r]);if(i>>>=3,F8?$(N):Q>0&&Z(255&N),N=0,Q=0;}function lt(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(o.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function ot(e,n,i){let a,r,s=0;E>0?(D.build_tree(t),K.build_tree(t),s=function(){let e;for(Y(B,D.max_code),Y(M,K.max_code),P.build_tree(t),e=18;e>=3&&0===V[2*j.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?lt(e,n,i):r==a?(tt(2+(i?1:0),3),rt(L.static_ltree,L.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?w:-1,m-w,t),w=m,e.flush_pending();}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){o.set(o.subarray(r,r+r),0),v-=r,m-=r,w-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(o,m+k,a),k+=t,k>=3&&(f=255&o[m],f=(f<r-262?m-(r-262):0;let u=z;const f=l,c=m+258;let h=o[a+s-1],b=o[a+s];A>=S&&(i>>=2),u>k&&(u=k);do{if(e=t,o[e+s]==b&&o[e+s-1]==h&&o[e]==o[a]&&o[++e]==o[a+1]){a+=2,e++;do{}while(o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&as){if(v=t,s=n,n>=u)break;h=o[a+s-1],b=o[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,D.dyn_tree=B,D.stat_desc=L.static_l_desc,K.dyn_tree=M,K.stat_desc=L.static_d_desc,P.dyn_tree=V,P.stat_desc=L.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||a<9||a>15||n<0||n>9||w<0||w>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(W[E].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=W[E].max_lazy,S=W[E].good_length,z=W[E].nice_length,U=W[E].max_chain),C=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),o.set(e.subarray(d,d+s),0),m=s,w=s,f=255&o[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=G[4],-2;if(0===d.avail_out)return d.msg=G[7],-5;var V;if(e=d,B=a,a=h,42==n&&(S=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),S|=z<<6,0!==m&&(S|=32),S+=31-S%31,n=113,Z((V=S)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=B&&4!=h)return e.msg=G[7],-5;if(666==n&&0!==e.avail_in)return d.msg=G[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,W[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=w+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-w>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,o),o+=t.length;})),s}},this.flush=function(){let t,a,r=0,s=0;const l=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&l.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),l.forEach((function(t){a.set(t,r),r+=t.length;})),a};}q.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new T,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return -2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0));}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],J=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],N=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Q=[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],X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Y=[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],Z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function $(){let t,e,n,i,a,r;function s(t,e,s,l,o,d,_,u,f,c,h){let b,p,w,x,y,g,m,v,k,A,U,I,E,C,S;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,C=1<I+v;){if(x++,I+=v,S=w-I,S=S>v?v:S,(p=1<<(g=m-I))>b+1&&(p-=b+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=S,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function tt(){const t=this;let e,n,i,a,r=0,s=0,l=0,o=0,d=0,_=0,u=0,f=0,c=0,h=0;function b(t,e,n,i,a,r,s,l){let o,d,_,u,f,c,h,b,p,w,x,y,g,m,v,k;h=l.next_in_index,b=l.avail_in,f=s.bitb,c=s.bitk,p=s.write,w=p>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)b--,f|=(255&l.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,w-=g,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,g-=2);else {v=p-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0;}}if(p-v>0&&g>p-v)do{s.window[p++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),p),p+=g,v+=g,g=0;break}if(0!=(64&u))return l.msg="invalid distance code",g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3;o+=d[k+2],o+=f&F[u],k=3*(_+o),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,1):(l.msg="invalid literal/length code",g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3);if(o+=d[k+2],o+=f&F[u],k=3*(_+o),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--;break}}else f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--;}while(w>=258&&b>=10);return g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,0}t.init=function(t,r,s,l,o,d){e=0,u=t,f=r,i=s,c=l,a=o,h=d,n=null;},t.proc=function(t,p,w){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,w=b(u,f,i,c,a,h,t,p),E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){o=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,p.msg="invalid literal/length code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 2:for(x=d;I>=x,I-=x,l=f,n=a,s=h,e=3;case 3:for(x=l;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}return e=9,p.msg="invalid distance code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,w=t.inflate_flush(p,w),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,p,w,x,y,g,m;for(w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y>>1){case 0:b>>>=3,p-=3,h=7&p,b>>>=h,p-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],$.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),b>>>=3,p-=3,a=6;break;case 2:b>>>=3,p-=3,a=3;break;case 3:return b>>>=3,p-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);r=65535&b,b=p=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(w,h),y),w+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;p<14;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,l=0,a=4;case 4:for(;l<4+(s>>>10);){for(;p<3;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<>>=3,p-=3;}for(;l<19;)i[et[l++]]=0;if(o[0]=7,h=c.inflate_trees_bits(i,o,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);l=0,a=5;case 5:for(;h=s,!(l>=258+(31&h)+(h>>5&31));){let r,_;for(h=o[0];p>>=h,p-=h,i[l++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;p>>=h,p-=h,r+=b&F[m],b>>>=m,p-=m,m=l,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);l=m;}}if(d[0]=-1,I=[],E=[],C=[],S=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,C,S,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,C[0],f,S[0]),a=6;case 6:if(n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new nt(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return -3;default:return -2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return -2;const r=t.istate;return a>=1<0&&t.next_in_index!=o&&(a(t.next_in_index),o=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(_),r.forEach((function(t){l.set(t,d),d+=t.length;})),l}},this.flush=function(){t.inflateEnd();};}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new at,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return -2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=st;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -1412,7 +1412,7 @@ } async function createDecryptionKeys(decrypt, preambuleArray, password) { - await createKeys(decrypt, password, preambuleArray.subarray(0, SALT_LENGTH[decrypt.strength])); + await createKeys$1(decrypt, password, preambuleArray.subarray(0, SALT_LENGTH[decrypt.strength])); const passwordVerification = preambuleArray.subarray(SALT_LENGTH[decrypt.strength]); const passwordVerificationKey = decrypt.keys.passwordVerification; if (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) { @@ -1422,11 +1422,11 @@ async function createEncryptionKeys(encrypt, password) { const salt = crypto.getRandomValues(new Uint8Array(SALT_LENGTH[encrypt.strength])); - await createKeys(encrypt, password, salt); + await createKeys$1(encrypt, password, salt); return concat(salt, encrypt.keys.passwordVerification); } - async function createKeys(target, password, salt) { + async function createKeys$1(target, password, salt) { const encodedPassword = (new TextEncoder()).encode(password); const basekey = await subtle.importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE); const derivedBits = await subtle.deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), basekey, 8 * ((KEY_LENGTH[target.strength] * 2) + 2)); @@ -1492,7 +1492,7 @@ constructor(password, passwordVerification) { this.password = password; this.passwordVerification = passwordVerification; - createKeys$1(this, password); + createKeys(this, password); } async append(input) { @@ -1520,7 +1520,7 @@ constructor(password, passwordVerification) { this.passwordVerification = passwordVerification; this.password = password; - createKeys$1(this, password); + createKeys(this, password); } async append(input) { @@ -1566,7 +1566,7 @@ return output; } - function createKeys$1(target, password) { + function createKeys(target, password) { target.keys = [0x12345678, 0x23456789, 0x34567890]; target.crcKey0 = new Crc32(target.keys[0]); target.crcKey2 = new Crc32(target.keys[2]); @@ -1734,7 +1734,7 @@ } } - function createCodec(codecConstructor, options) { + function createCodec$1(codecConstructor, options) { if (options.codecType.startsWith(CODEC_DEFLATE)) { return new Deflate(codecConstructor, options); } else if (options.codecType.startsWith(CODEC_INFLATE)) { @@ -1792,7 +1792,7 @@ }; function createWorkerInterface(workerData) { - const interfaceCodec = createCodec(workerData.codecConstructor, workerData.options); + const interfaceCodec = createCodec$1(workerData.codecConstructor, workerData.options); return { async append(data) { try { @@ -1915,7 +1915,7 @@ let pool = []; let pendingRequests = []; - function createCodec$1(codecConstructor, options, config) { + function createCodec(codecConstructor, options, config) { const streamCopy = !options.compressed && !options.signed && !options.encrypted; const webWorker = !streamCopy && (options.useWebWorkers || (options.useWebWorkers === undefined && config.useWebWorkers)); const scripts = webWorker && config.workerScripts ? config.workerScripts[options.codecType] : []; @@ -2169,7 +2169,7 @@ } const entries = []; for (let indexFile = 0; indexFile < filesLength; indexFile++) { - const fileEntry = new ZipEntry(this.reader, this.config, this.options); + const fileEntry = new ZipEntry$1(this.reader, this.config, this.options); if (getUint32(directoryView, offset) != CENTRAL_FILE_HEADER_SIGNATURE) { throw new Error(ERR_CENTRAL_DIRECTORY_NOT_FOUND); } @@ -2180,7 +2180,7 @@ fileEntry.directory = (getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK; fileEntry.offset = getUint32(directoryView, offset + 42) + prependedBytesLength; fileEntry.rawFilename = directoryArray.subarray(offset + 46, offset + 46 + fileEntry.filenameLength); - const filenameEncoding = getOptionValue(this, options, "filenameEncoding"); + const filenameEncoding = getOptionValue$1(this, options, "filenameEncoding"); fileEntry.filenameUTF8 = fileEntry.commentUTF8 = Boolean(fileEntry.bitFlag.languageEncodingFlag); fileEntry.filename = decodeString(fileEntry.rawFilename, fileEntry.filenameUTF8 ? CHARSET_UTF8 : filenameEncoding); if (!fileEntry.directory && fileEntry.filename.endsWith(DIRECTORY_SIGNATURE)) { @@ -2189,7 +2189,7 @@ fileEntry.rawExtraField = directoryArray.subarray(offset + 46 + fileEntry.filenameLength, offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength); fileEntry.rawComment = directoryArray.subarray(offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength, offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength + fileEntry.commentLength); - const commentEncoding = getOptionValue(this, options, "commentEncoding"); + const commentEncoding = getOptionValue$1(this, options, "commentEncoding"); fileEntry.comment = decodeString(fileEntry.rawComment, fileEntry.commentUTF8 ? CHARSET_UTF8 : commentEncoding); readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6); const entry = new Entry(fileEntry); @@ -2204,7 +2204,7 @@ } } - class ZipEntry { + class ZipEntry$1 { constructor(reader, config, options) { this.reader = reader; @@ -2225,7 +2225,7 @@ const config = this.config; const bitFlag = this.bitFlag; const signature = this.signature; - let password = getOptionValue(this, options, "password"); + let password = getOptionValue$1(this, options, "password"); password = password && password.length && password; if (extraFieldAES) { if (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) { @@ -2252,22 +2252,22 @@ throw new Error(ERR_ENCRYPTED); } } - const codec = await createCodec$1(config.Inflate, { + const codec = await createCodec(config.Inflate, { codecType: CODEC_INFLATE, password, zipCrypto, encryptionStrength: extraFieldAES && extraFieldAES.strength, - signed: getOptionValue(this, options, "checkSignature"), + signed: getOptionValue$1(this, options, "checkSignature"), passwordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((this.rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)), signature, compressed: compressionMethod != 0, encrypted, - useWebWorkers: getOptionValue(this, options, "useWebWorkers") + useWebWorkers: getOptionValue$1(this, options, "useWebWorkers") }, config); if (!writer.initialized) { await writer.init(); } - await processData(codec, reader, writer, dataOffset, this.compressedSize, config, { onprogress: options.onprogress, signal: getOptionValue(this, options, "signal") }); + await processData(codec, reader, writer, dataOffset, this.compressedSize, config, { onprogress: options.onprogress, signal: getOptionValue$1(this, options, "signal") }); return writer.getData(); } } @@ -2388,7 +2388,7 @@ async function seekSignature(reader, signature, minimumBytes, maximumLength) { const signatureArray = new Uint8Array(4); const signatureView = new DataView(signatureArray.buffer); - setUint32(signatureView, 0, signature); + setUint32$1(signatureView, 0, signature); const maximumBytes = minimumBytes + maximumLength; return (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, reader.size)); @@ -2407,7 +2407,7 @@ } } - function getOptionValue(zipReader, options, name) { + function getOptionValue$1(zipReader, options, name) { return options[name] === undefined ? zipReader.options[name] : options[name]; } @@ -2444,7 +2444,7 @@ return Number(view.getBigUint64(offset, true)); } - function setUint32(view, offset, value) { + function setUint32$1(view, offset, value) { view.setUint32(offset, value, true); } @@ -2497,6 +2497,7 @@ this.config = getConfiguration(); this.files = new Map(); this.offset = writer.size; + this.maxOutputSize = 0; } async add(name = "", reader, options = {}) { @@ -2526,9 +2527,9 @@ if (lastModDate < MIN_DATE || lastModDate > MAX_DATE) { throw new Error(ERR_INVALID_DATE); } - const password = getOptionValue$1(this, options, "password"); - const encryptionStrength = getOptionValue$1(this, options, "encryptionStrength") || 3; - const zipCrypto = getOptionValue$1(this, options, "zipCrypto"); + const password = getOptionValue(this, options, "password"); + const encryptionStrength = getOptionValue(this, options, "encryptionStrength") || 3; + const zipCrypto = getOptionValue(this, options, "zipCrypto"); if (password !== undefined && encryptionStrength !== undefined && (encryptionStrength < 1 || encryptionStrength > 3)) { throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH); } @@ -2555,17 +2556,22 @@ offset += 4 + data.length; }); } - const outputSize = reader ? reader.size * 1.05 : 0; - const zip64 = options.zip64 || this.options.zip64 || this.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || this.offset + outputSize >= MAX_32_BITS; - const level = getOptionValue$1(this, options, "level"); - const useWebWorkers = getOptionValue$1(this, options, "useWebWorkers"); - const bufferedWrite = getOptionValue$1(this, options, "bufferedWrite"); - const keepOrder = getOptionValue$1(this, options, "keepOrder"); - let dataDescriptor = getOptionValue$1(this, options, "dataDescriptor"); - const signal = getOptionValue$1(this, options, "signal"); + const outputSize = reader ? Math.floor(reader.size * 1.05) : 0; + this.maxOutputSize += outputSize; + await Promise.resolve(); + const zip64 = options.zip64 || this.options.zip64 || this.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || this.offset + this.maxOutputSize >= MAX_32_BITS; + const level = getOptionValue(this, options, "level"); + const useWebWorkers = getOptionValue(this, options, "useWebWorkers"); + const bufferedWrite = getOptionValue(this, options, "bufferedWrite"); + let keepOrder = getOptionValue(this, options, "keepOrder"); + let dataDescriptor = getOptionValue(this, options, "dataDescriptor"); + const signal = getOptionValue(this, options, "signal"); if (dataDescriptor === undefined) { dataDescriptor = true; } + if (keepOrder === undefined) { + keepOrder = true; + } const fileEntry = await addFile(this, name, reader, Object.assign({}, options, { rawFilename, rawComment, @@ -2583,6 +2589,7 @@ dataDescriptor, signal })); + this.maxOutputSize -= outputSize; Object.assign(fileEntry, { name, comment, extraField }); return new Entry(fileEntry); } @@ -2617,7 +2624,7 @@ const rawExtraFieldZip64 = fileEntry.rawExtraFieldZip64; const rawExtraFieldAES = fileEntry.rawExtraFieldAES; const extraFieldLength = rawExtraFieldZip64.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length; - setUint32$1(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE); + setUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE); setUint16(directoryView, offset + 4, fileEntry.version); directoryArray.set(fileEntry.headerArray, offset + 6); setUint16(directoryView, offset + 30, extraFieldLength); @@ -2626,9 +2633,9 @@ setUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK); } if (fileEntry.zip64) { - setUint32$1(directoryView, offset + 42, MAX_32_BITS); + setUint32(directoryView, offset + 42, MAX_32_BITS); } else { - setUint32$1(directoryView, offset + 42, fileEntry.offset); + setUint32(directoryView, offset + 42, fileEntry.offset); } directoryArray.set(rawFilename, offset + 46); directoryArray.set(rawExtraFieldZip64, offset + 46 + rawFilename.length); @@ -2638,7 +2645,7 @@ offset += 46 + rawFilename.length + extraFieldLength + fileEntry.rawComment.length; } if (zip64) { - setUint32$1(directoryView, offset, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE); + setUint32(directoryView, offset, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE); setBigUint64(directoryView, offset + 4, BigInt(44)); setUint16(directoryView, offset + 12, 45); setUint16(directoryView, offset + 14, 45); @@ -2646,19 +2653,19 @@ setBigUint64(directoryView, offset + 32, BigInt(filesLength)); setBigUint64(directoryView, offset + 40, BigInt(directoryDataLength)); setBigUint64(directoryView, offset + 48, BigInt(directoryOffset)); - setUint32$1(directoryView, offset + 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE); + setUint32(directoryView, offset + 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE); setBigUint64(directoryView, offset + 64, BigInt(directoryOffset) + BigInt(directoryDataLength)); - setUint32$1(directoryView, offset + 72, ZIP64_TOTAL_NUMBER_OF_DISKS); + setUint32(directoryView, offset + 72, ZIP64_TOTAL_NUMBER_OF_DISKS); filesLength = MAX_16_BITS; directoryOffset = MAX_32_BITS; directoryDataLength = MAX_32_BITS; offset += 76; } - setUint32$1(directoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE); + setUint32(directoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE); setUint16(directoryView, offset + 8, filesLength); setUint16(directoryView, offset + 10, filesLength); - setUint32$1(directoryView, offset + 12, directoryDataLength); - setUint32$1(directoryView, offset + 16, directoryOffset); + setUint32(directoryView, offset + 12, directoryDataLength); + setUint32(directoryView, offset + 16, directoryOffset); await writer.writeUint8Array(directoryArray); if (comment.length) { await writer.writeUint8Array(comment); @@ -2710,14 +2717,14 @@ if (!options.dataDescriptor) { const arrayBufferView = new DataView(arrayBuffer); if (!fileEntry.encrypted || options.zipCrypto) { - setUint32$1(arrayBufferView, 14, fileEntry.signature); + setUint32(arrayBufferView, 14, fileEntry.signature); } if (fileEntry.zip64) { - setUint32$1(arrayBufferView, 18, MAX_32_BITS); - setUint32$1(arrayBufferView, 22, MAX_32_BITS); + setUint32(arrayBufferView, 18, MAX_32_BITS); + setUint32(arrayBufferView, 22, MAX_32_BITS); } else { - setUint32$1(arrayBufferView, 18, fileEntry.compressedSize); - setUint32$1(arrayBufferView, 22, fileEntry.uncompressedSize); + setUint32(arrayBufferView, 18, fileEntry.compressedSize); + setUint32(arrayBufferView, 22, fileEntry.uncompressedSize); } } await writer.writeUint8Array(new Uint8Array(arrayBuffer)); @@ -2802,20 +2809,23 @@ setUint16(dateView, 0, (((lastModDate.getHours() << 6) | lastModDate.getMinutes()) << 5) | lastModDate.getSeconds() / 2); setUint16(dateView, 2, ((((lastModDate.getFullYear() - 1980) << 4) | (lastModDate.getMonth() + 1)) << 5) | lastModDate.getDate()); const rawLastModDate = dateArray[0]; - setUint32$1(headerView, 6, rawLastModDate); + setUint32(headerView, 6, rawLastModDate); setUint16(headerView, 22, rawFilename.length); setUint16(headerView, 24, 0); - const fileDataArray = new Uint8Array(30 + rawFilename.length); - const fileDataView = new DataView(fileDataArray.buffer); - setUint32$1(fileDataView, 0, LOCAL_FILE_HEADER_SIGNATURE); - fileDataArray.set(headerArray, 4); - fileDataArray.set(rawFilename, 30); + setUint16(headerView, 24, rawExtraFieldAES.length + fileEntry.rawExtraField.length); + const footerArray = new Uint8Array(30 + rawFilename.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length); + const footerView = new DataView(footerArray.buffer); + setUint32(footerView, 0, LOCAL_FILE_HEADER_SIGNATURE); + footerArray.set(headerArray, 4); + footerArray.set(rawFilename, 30); + footerArray.set(rawExtraFieldAES, 30 + rawFilename.length); + footerArray.set(fileEntry.rawExtraField, 30 + rawFilename.length + rawExtraFieldAES.length); let result; let uncompressedSize = 0; let compressedSize = 0; if (reader) { uncompressedSize = reader.size; - const codec = await createCodec$1(config.Deflate, { + const codec = await createCodec(config.Deflate, { codecType: CODEC_DEFLATE, level, password, @@ -2827,57 +2837,57 @@ encrypted, useWebWorkers: options.useWebWorkers }, config); - await writer.writeUint8Array(fileDataArray); + await writer.writeUint8Array(footerArray); result = await processData(codec, reader, writer, 0, uncompressedSize, config, { onprogress: options.onprogress, signal: options.signal }); compressedSize = result.length; } else { - await writer.writeUint8Array(fileDataArray); + await writer.writeUint8Array(footerArray); } let dataDescriptorArray = new Uint8Array(0); let dataDescriptorView; if (options.dataDescriptor) { dataDescriptorArray = new Uint8Array(zip64 ? 24 : 16); dataDescriptorView = new DataView(dataDescriptorArray.buffer); - setUint32$1(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE); + setUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE); } if (reader) { if ((!encrypted || options.zipCrypto) && result.signature !== undefined) { - setUint32$1(headerView, 10, result.signature); + setUint32(headerView, 10, result.signature); fileEntry.signature = result.signature; if (options.dataDescriptor) { - setUint32$1(dataDescriptorView, 4, result.signature); + setUint32(dataDescriptorView, 4, result.signature); } } if (zip64) { const rawExtraFieldZip64View = new DataView(fileEntry.rawExtraFieldZip64.buffer); setUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64); setUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64); - setUint32$1(headerView, 14, MAX_32_BITS); + setUint32(headerView, 14, MAX_32_BITS); setBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize)); - setUint32$1(headerView, 18, MAX_32_BITS); + setUint32(headerView, 18, MAX_32_BITS); setBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize)); if (options.dataDescriptor) { setBigUint64(dataDescriptorView, 8, BigInt(compressedSize)); setBigUint64(dataDescriptorView, 16, BigInt(uncompressedSize)); } } else { - setUint32$1(headerView, 14, compressedSize); - setUint32$1(headerView, 18, uncompressedSize); + setUint32(headerView, 14, compressedSize); + setUint32(headerView, 18, uncompressedSize); if (options.dataDescriptor) { - setUint32$1(dataDescriptorView, 8, compressedSize); - setUint32$1(dataDescriptorView, 12, uncompressedSize); + setUint32(dataDescriptorView, 8, compressedSize); + setUint32(dataDescriptorView, 12, uncompressedSize); } } } if (options.dataDescriptor) { await writer.writeUint8Array(dataDescriptorArray); } - const length = fileDataArray.length + (result ? result.length : 0) + dataDescriptorArray.length; + const length = footerArray.length + (result ? result.length : 0) + dataDescriptorArray.length; Object.assign(fileEntry, { compressedSize, uncompressedSize, lastModDate, rawLastModDate, encrypted, length }); return fileEntry; } - function getOptionValue$1(zipWriter, options, name) { + function getOptionValue(zipWriter, options, name) { return options[name] === undefined ? zipWriter.options[name] : options[name]; } @@ -2889,7 +2899,7 @@ view.setUint16(offset, value, true); } - function setUint32$1(view, offset, value) { + function setUint32(view, offset, value) { view.setUint32(offset, value, true); } @@ -2927,7 +2937,7 @@ const CHUNK_SIZE = 512 * 1024; - class ZipEntry$1 { + class ZipEntry { constructor(fs, name, params, parent) { if (fs.root && parent && parent.getChildByName(name)) { @@ -2977,7 +2987,7 @@ } } - class ZipFileEntry extends ZipEntry$1 { + class ZipFileEntry extends ZipEntry { constructor(fs, name, params, parent) { super(fs, name, params, parent); @@ -3047,7 +3057,7 @@ } } - class ZipDirectoryEntry extends ZipEntry$1 { + class ZipDirectoryEntry extends ZipEntry { constructor(fs, name, params, parent) { super(fs, name, params, parent); diff --git a/dist/zip-fs.min.js b/dist/zip-fs.min.js index fefea3c0..38abd079 100644 --- a/dist/zip-fs.min.js +++ b/dist/zip-fs.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},n=Object.assign({},e);function i(){return n}function r(t){if(void 0!==t.chunkSize&&(n.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(n.maxWorkers=t.maxWorkers),void 0!==t.useWebWorkers&&(n.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(n.Deflate=t.Deflate),void 0!==t.Inflate&&(n.Inflate=t.Inflate),void 0!==t.workerScripts){if(t.workerScripts.deflate){if(!Array.isArray(t.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");n.workerScripts||(n.workerScripts={}),n.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");n.workerScripts||(n.workerScripts={}),n.workerScripts.inflate=t.workerScripts.inflate}}}function a(t,e,n){return class{constructor(i){this.codec=new t(Object.assign({},e,i)),n(this.codec,(t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),i(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),i(this)}};function i(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const s="HTTP error ",o="HTTP Range not supported",l="text/plain",c="Content-Length",d="Accept-Ranges",h="HEAD",u="GET",f="bytes";class p{constructor(){this.size=0}init(){this.initialized=!0}}class w extends p{}class _ extends p{writeUint8Array(t){this.size+=t.length}}class y extends w{constructor(t){super(),this.blobReader=new m(new Blob([t],{type:l}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}}class g extends _{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:l})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:l})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}}class b extends w{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}}class m extends w{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class v extends _{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class A extends w{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),C(this.url)&&!this.preventHeadRequest){const t=await U(h,this.url,this.options);if(this.size=Number(t.headers.get(c)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(d)!=f)throw new Error(o);void 0===this.size&&await k(this,this.options)}else await k(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await U(u,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(o);return new Uint8Array(await n.arrayBuffer())}return this.data||await k(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function k(t,e){const n=await U(u,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function U(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(s+(r.statusText||r.status))}class E extends w{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),C(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>D(h,this.url,(n=>{this.size=Number(n.getResponseHeader(c)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(d)==f?t():e(new Error(o)):void 0===this.size?R(this,this.url).then((()=>t())).catch(e):t()}),e)));await R(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await R(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>D(u,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(o)}}function R(t,e){return new Promise(((n,i)=>D(u,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function D(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(s+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class z extends w{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new E(t,e):this.reader=new A(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class I extends w{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}}class F extends _{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}}function C(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const S=4294967295,T=65535,B=67324752,W=134695760,O=33639248,M=101010256,L=101075792,V=117853008,N=39169,P=2048,H="/",j=new Date(2107,11,31),Z=new Date(1980,0,1),K="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const q=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;q[t]=e}class G{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^q[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Y={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=Y.getPartial(n);return 32===i?t.concat(e):Y._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+Y.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=Y.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=Y.getPartial(r);return i.push(Y.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},X={bytes:{fromBits(t){const e=Y.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,c;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let h=16843009*c^65537*l^257*o^16843008*d,u=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][d]=u=u<<24^u>>>8,e[n][a]=h=h<<24^h>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let h,u,f,p=t[0]^n[0],w=t[e?3:1]^n[1],_=t[2]^n[2],y=t[e?1:3]^n[3],g=4;for(let t=0;t>>24]^o[w>>16&255]^l[_>>8&255]^c[255&y]^n[g],u=s[w>>>24]^o[_>>16&255]^l[y>>8&255]^c[255&p]^n[g+1],f=s[_>>>24]^o[y>>16&255]^l[p>>8&255]^c[255&w]^n[g+2],y=s[y>>>24]^o[p>>16&255]^l[w>>8&255]^c[255&_]^n[g+3],g+=4,p=h,w=u,_=f;for(let t=0;t<4;t++)r[e?3&-t:t]=d[p>>>24]<<24^d[w>>16&255]<<16^d[_>>8&255]<<8^d[255&y]^n[g++],h=p,p=w,w=_,_=y,y=h;return r}}},Q={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=Y.bitLength(e);for(let r=0;rt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const bt=12;class xt{constructor(t,e){this.password=t,this.passwordVerification=e,kt(this,t)}async append(t){if(this.password){const e=vt(this,t.subarray(0,bt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error($);t=t.subarray(bt)}return vt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class mt{constructor(t,e){this.passwordVerification=e,this.password=t,kt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(bt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(At(this,i),0),n=bt}else e=new Uint8Array(t.length),n=0;return e.set(At(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function vt(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function Et(t){const e=2|t.keys[2];return Rt(Math.imul(e,1^e)>>>8)}function Rt(t){return 255&t}function Dt(t){return 4294967295&t}const zt="deflate",It="inflate",Ft="Invalid signature";class Ct{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new G,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new xt(e.password,e.passwordVerification):new pt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(Ft);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(Ft)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class St{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new G,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new mt(e.password,e.passwordVerification):new wt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Tt="init",Bt="append",Wt="flush",Ot="message";var Mt=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-fs.min.js",document.baseURI).href)),t.worker.addEventListener(Ot,r,!1),t.interface={append:t=>n({type:Bt,data:t}),flush:()=>n({type:Wt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:Tt,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==Tt||r==Wt||r==Bt){const n=i.data;r==Wt?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(zt)?new St(t,e):e.codecType.startsWith(It)?new Ct(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Lt=[],Vt=[];function Nt(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Lt.length!t.busy));return n?Mt(n,t,e,Pt,i,r):new Promise((n=>Vt.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Pt(t){const e=!Vt.length;if(e)Lt=Lt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Vt.splice(0,1);e(Mt(t,n,i,Pt,r,a))}return e}const Ht="Abort error";async function jt(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,c=0){const d=s.signal;if(lthis[e]=t[e]))}}const Yt="File format is not recognized",Xt="End of central directory not found",Jt="End of Zip64 central directory not found",Qt="End of Zip64 central directory locator not found",$t="Central directory header not found",te="Local file header not found",ee="Zip64 extra field not found",ne="File contains encrypted entry",ie="Encryption method not supported",re="Compression method not supported",ae="utf-8",se=["uncompressedSize","compressedSize","offset"];class oe{constructor(t,e={}){this.reader=t,this.options=e,this.config=i()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Yt);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,M,22,1048560);if(!n)throw new Error(Xt);const i=new DataView(n.buffer);let r=_e(i,12),a=_e(i,16),s=we(i,8),o=0;if(a==S||r==S||s==T){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(_e(i,0)!=V)throw new Error(Jt);a=ye(i,8);let l=await e.readUint8Array(a,56),c=new DataView(l.buffer);const d=n.offset-20-56;if(_e(c,0)!=L&&a!=d){const t=a;a=d,o=a-t,l=await e.readUint8Array(a,56),c=new DataView(l.buffer)}if(_e(c,0)!=L)throw new Error(Qt);s=ye(c,24),r=ye(i,4),a-=ye(c,40)}if(a<0||a>=e.size)throw new Error(Yt);let l=0,c=await e.readUint8Array(a,e.size-a),d=new DataView(c.buffer);const h=n.offset-r;if(_e(d,l)!=O&&a!=h){const t=a;a=h,o=a-t,c=await e.readUint8Array(a,e.size-a),d=new DataView(c.buffer)}if(a<0||a>=e.size)throw new Error(Yt);const u=[];for(let e=0;ee.getData(t,n),u.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return u}async close(){}}class le{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,o=this.compressionMethod,l=this.config,c=this.bitFlag,d=this.signature;let h=ue(this,e,"password");if(h=h&&h.length&&h,s&&99!=s.originalCompressionMethod)throw new Error(re);if(0!=o&&8!=o)throw new Error(re);if(_e(a,0)!=B)throw new Error(te);const u=this.localDirectory={};ce(u,a,4),u.rawExtraField=r.subarray(i+30+u.filenameLength,i+30+u.filenameLength+u.extraFieldLength),de(this,u,a,4);const f=i+30+u.filenameLength+u.extraFieldLength,p=c.encrypted&&u.bitFlag.encrypted,w=p&&!s;if(p){if(!w&&void 0===s.strength)throw new Error(ie);if(!h)throw new Error(ne)}const _=await Nt(l.Inflate,{codecType:It,password:h,zipCrypto:w,encryptionStrength:s&&s.strength,signed:ue(this,e,"checkSignature"),passwordVerification:w&&(c.dataDescriptor?this.rawLastModDate>>>8&255:d>>>24&255),signature:d,compressed:0!=o,encrypted:p,useWebWorkers:ue(this,e,"useWebWorkers")},l);return t.initialized||await t.init(),await jt(_,n,t,f,this.compressedSize,l,{onprogress:e.onprogress,signal:ue(this,e,"signal")}),t.getData()}}function ce(t,e,n){t.version=we(e,n);const i=t.rawBitFlag=we(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&P)==P},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=_e(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=we(e,n+22),t.extraFieldLength=we(e,n+24)}function de(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==S));for(let e=0;e{if(e[n]==S){if(!t||void 0===t[n])throw new Error(ee);e[n]=t[n]}}))}(c,e);const d=e.extraFieldUnicodePath=a.get(28789);d&&he(d,"filename","rawFilename",e,t);const h=e.extraFieldUnicodeComment=a.get(25461);h&&he(h,"comment","rawComment",e,t);const u=e.extraFieldAES=a.get(39169);u?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=pe(i,0),t.vendorId=pe(i,2);const r=pe(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=we(i,5)}else e.compressionMethod=n}(u,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function he(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=pe(a,0),t.signature=_e(a,1);const s=new G;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==_e(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function ue(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function fe(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;nT)throw new Error(me);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>T)throw new Error(xe);const s=this.options.version||n.version||0;if(s>T)throw new Error(ve);const o=n.lastModDate||new Date;if(oj)throw new Error(Ae);const l=ze(this,n,"password"),c=ze(this,n,"encryptionStrength")||3,d=ze(this,n,"zipCrypto");if(void 0!==l&&void 0!==c&&(c<1||c>3))throw new Error(ke);e&&!e.initialized&&await e.init();let h=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),h=new Uint8Array(t),u.forEach(((t,n)=>{if(n>T)throw new Error(Ue);if(t.length>T)throw new Error(Ee);h.set(new Uint16Array([n]),e),h.set(new Uint16Array([t.length]),e+2),h.set(t,e+4),e+=4+t.length}))}const f=e?1.05*e.size:0,p=n.zip64||this.options.zip64||this.offset>=S||f>=S||this.offset+f>=S,w=ze(this,n,"level"),_=ze(this,n,"useWebWorkers"),y=ze(this,n,"bufferedWrite"),g=ze(this,n,"keepOrder");let b=ze(this,n,"dataDescriptor");const x=ze(this,n,"signal");void 0===b&&(b=!0);const m=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,l;r.set(e,null);try{let c,d;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>l=t))),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(c=new v,await c.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),c=a),d=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,c=0!==l&&!i.directory,d=i.zip64;let h,u;if(o&&!i.zipCrypto){h=new Uint8Array(Re.length+2);const t=new DataView(h.buffer);Fe(t,0,N),h.set(Re,2),u=i.encryptionStrength,Ie(t,8,u)}else h=new Uint8Array(0);const f={version:i.version||20,zip64:d,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:d?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:h,rawExtraField:i.rawExtraField};let p=P;i.dataDescriptor&&(p|=8);let w=0;c&&(w=8);d&&(f.version=f.version>45?f.version:45);o&&(p|=1,i.zipCrypto||(f.version=f.version>51?f.version:51,w=99,c&&(f.rawExtraFieldAES[9]=8)));const _=f.headerArray=new Uint8Array(26),y=new DataView(_.buffer);Fe(y,0,f.version),Fe(y,2,p),Fe(y,4,w);const g=new Uint32Array(1),b=new DataView(g.buffer);Fe(b,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),Fe(b,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=g[0];Ce(y,6,x),Fe(y,22,r.length),Fe(y,24,0);const m=new Uint8Array(30+r.length);let v;Ce(new DataView(m.buffer),0,B),m.set(_,4),m.set(r,30);let A=0,k=0;if(t){A=t.size;const r=await Nt(n.Deflate,{codecType:zt,level:l,password:s,encryptionStrength:u,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:c,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),v=await jt(r,t,e,0,A,n,{onprogress:i.onprogress,signal:i.signal}),k=v.length}else await e.writeUint8Array(m);let U,E=new Uint8Array(0);i.dataDescriptor&&(E=new Uint8Array(d?24:16),U=new DataView(E.buffer),Ce(U,0,W));if(t)if(o&&!i.zipCrypto||void 0===v.signature||(Ce(y,10,v.signature),f.signature=v.signature,i.dataDescriptor&&Ce(U,4,v.signature)),d){const t=new DataView(f.rawExtraFieldZip64.buffer);Fe(t,0,1),Fe(t,2,24),Ce(y,14,S),Se(t,12,BigInt(k)),Ce(y,18,S),Se(t,4,BigInt(A)),i.dataDescriptor&&(Se(U,8,BigInt(k)),Se(U,16,BigInt(A)))}else Ce(y,14,k),Ce(y,18,A),i.dataDescriptor&&(Ce(U,8,k),Ce(U,12,A));i.dataDescriptor&&await e.writeUint8Array(E);const R=m.length+(v?v.length:0)+E.length;return Object.assign(f,{compressedSize:k,uncompressedSize:A,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),f}(n,c,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,d),c!=a){const e=c.getData(),n=new FileReader,r=new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)})),[s]=await Promise.all([r,t.lockWrite,o]);if(!i.dataDescriptor){const t=new DataView(s);d.encrypted&&!i.zipCrypto||Ce(t,14,d.signature),d.zip64?(Ce(t,18,S),Ce(t,22,S)):(Ce(t,18,d.compressedSize),Ce(t,22,d.uncompressedSize))}await a.writeUint8Array(new Uint8Array(s))}if(d.offset=t.offset,d.zip64){Se(new DataView(d.rawExtraFieldZip64.buffer),20,BigInt(d.offset))}return t.offset+=d.length,d}finally{l&&l(),s&&s()}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:h,zip64:p,password:l,level:w,useWebWorkers:_,encryptionStrength:c,zipCrypto:d,bufferedWrite:y,keepOrder:g,dataDescriptor:b,signal:x}));return Object.assign(m,{name:t,comment:r,extraField:u}),new Gt(m)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=S||r>=S||s>=T,l=new Uint8Array(r+(o?98:22)),c=new DataView(l.buffer);if(t.length){if(!(t.length<=T))throw new Error(be);Fe(c,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;Ce(c,i,O),Fe(c,i+4,t.version),l.set(t.headerArray,i+6),Fe(c,i+30,a),Fe(c,i+32,t.rawComment.length),t.directory&&Ie(c,i+38,16),t.zip64?Ce(c,i+42,S):Ce(c,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(Ce(c,i,L),Se(c,i+4,BigInt(44)),Fe(c,i+12,45),Fe(c,i+14,45),Se(c,i+24,BigInt(s)),Se(c,i+32,BigInt(s)),Se(c,i+40,BigInt(r)),Se(c,i+48,BigInt(a)),Ce(c,i+56,V),Se(c,i+64,BigInt(a)+BigInt(r)),Ce(c,i+72,1),s=T,a=S,r=S,i+=76),Ce(c,i,M),Fe(c,i+8,s),Fe(c,i+10,s),Ce(c,i+12,r),Ce(c,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}}function ze(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Ie(t,e,n){t.setUint8(e,n)}function Fe(t,e,n){t.setUint16(e,n,!0)}function Ce(t,e,n){t.setUint32(e,n,!0)}function Se(t,e,n){t.setBigUint64(e,n,!0)}const Te=524288;class Be{constructor(t,e,n,i){if(t.root&&i&&i.getChildByName(e))throw new Error("Entry filename already exists");n||(n={}),this.fs=t,this.name=e,this.data=n.data,this.id=t.entries.length,this.parent=i,this.children=[],this.uncompressedSize=0,t.entries.push(this),i&&this.parent.children.push(this)}moveTo(t){this.fs.move(this,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}}class We extends Be{constructor(t,e,n,i){super(t,e,n,i),this.Reader=n.Reader,this.Writer=n.Writer,n.getData&&(this.getData=n.getData)}async getData(t,e={}){return!t||t.constructor==this.Writer&&this.data?this.data:(this.reader=new this.Reader(this.data,e),await this.reader.init(),t.initialized||await t.init(),this.uncompressedSize=this.reader.size,async function(t,e){return n();async function n(i=0){const r=i*Te;if(re.file((i=>n(t.addBlob(e.name,i))),i)));async function n(t,e){const r=await i(e);for(const e of r)e.isDirectory?await n(t.addDirectory(e.name),e):await new Promise(((n,i)=>{e.file((i=>{const r=t.addBlob(e.name,i);r.uncompressedSize=i.size,n(r)}),i)}))}function i(t){return new Promise(((e,n)=>{let i=[];function r(t){t.readEntries((n=>{n.length?(i=i.concat(n),r(t)):e(i)}),n)}t.isDirectory&&r(t.createReader()),t.isFile&&e(i)}))}}(this,t)}async addData(t,e){return He(this,t,e)}async importBlob(t,e={}){await this.importZip(new m(t),e)}async importData64URI(t,e={}){await this.importZip(new b(t),e)}async importUint8Array(t,e={}){await this.importZip(new I(t),e)}async importHttpContent(t,e={}){await this.importZip(new z(t,e),e)}async exportBlob(t={}){return this.exportZip(new v("application/zip"),t)}async exportData64URI(t={}){return this.exportZip(new x("application/zip"),t)}async exportUint8Array(t={}){return this.exportZip(new F,t)}async importZip(t,e){t.initialized||await t.init();const n=new oe(t,e);(await n.getEntries()).forEach((t=>{let n=this;const i=t.filename.split("/"),r=i.pop();i.forEach((t=>n=n.getChildByName(t)||new Oe(this.fs,t,null,n))),t.directory||He(n,r,{data:t,Reader:Le(Object.assign({},e))})}))}async exportZip(t,e){await Ve(this),await t.init();const n=new De(t,e);return await async function(t,e,n,i){const r=e,a=new Map;async function s(t,e){async function o(){if(i.bufferedWrite)await Promise.all(e.children.map(l));else for(const t of e.children)await l(t)}async function l(e){const o=i.relativePath?e.getRelativeName(r):e.getFullname();await t.add(o,e.reader,Object.assign({directory:e.directory},Object.assign({},i,{onprogress:t=>{if(i.onprogress){a.set(o,t);try{i.onprogress(Array.from(a.values()).reduce(((t,e)=>t+e)),n)}catch(t){}}}}))),await s(t,e)}await o()}await s(t,e)}(n,this,function(t,e){let n=0;return t.forEach(i),n;function i(t){n+=t[e],t.children&&t.children.forEach(i)}}([this],"uncompressedSize"),e),await n.close(),t.getData()}getChildByName(t){for(let e=0;e{n.id==t.id&&e.splice(i,1)}))}function Pe(t){t.entries=[],t.root=new Oe(t)}function He(t,e,n,i){if(t.directory)return i?new Oe(t.fs,e,n,t):new We(t.fs,e,n,t);throw new Error("Parent entry is not a directory")}(()=>{if("function"==typeof URL.createObjectURL){const t=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},r),c=["deriveBits"],d=["sign"],h=[8,12,16],u=[16,24,32],f=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],p=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await p.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return g(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=b(this.input,t)),n};if(this.password){const e=t.subarray(0,h[this.strength]+2);await async function(t,e,n){await y(t,n,e.subarray(0,h[t.strength]),["decrypt"]);const i=e.subarray(h[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(h[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=b(this.pendingInput,t),n=x(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await p.decrypt(Object.assign({counter:this.counter},l),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await p.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class _{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await p.encrypt(Object.assign({counter:this.counter},l),this.keys.key,a);return g(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=b(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(h[t.strength]));return await y(t,e,n,["encrypt"]),b(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=b(this.pendingInput,t),i=x(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await p.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=b(this.output,t)}const e=await p.sign(i,this.keys.authentication,this.output.subarray(h[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:b(t,n),signature:n}}}async function y(t,e,n,i){t.counter=new Uint8Array(f);const l=(new TextEncoder).encode(e),h=await p.importKey("raw",l,a,!1,c),w=await p.deriveBits(Object.assign({salt:n},s),h,8*(2*u[t.strength]+2)),_=new Uint8Array(w);t.keys={key:await p.importKey("raw",_.subarray(0,u[t.strength]),r,!0,i),authentication:await p.importKey("raw",_.subarray(u[t.strength],2*u[t.strength]),o,!1,d),passwordVerification:_.subarray(2*u[t.strength])}}function g(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function b(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function x(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return A(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(k(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(k(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function R(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function z(t){return 4294967295&t}class I{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class F{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new _(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const C={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),S=function(t,e){return e.codecType.startsWith("deflate")?new F(t,e):e.codecType.startsWith("inflate")?new I(t,e):void 0}(n,e)},append:async t=>({data:await S.append(t.data)}),flush:()=>S.flush()};let S;function T(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=C[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const B=[0,1,2,3].concat(...T([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function W(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,c=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,c,d,h,u,f=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],d=n[2*n[2*l+1]+1]+1,d>s&&(d=s,f++),n[2*l+1]=d,l>t.max_code||(e.bl_count[d]++,h=0,l>=a&&(h=r[l-a]),u=n[2*l],e.opt_len+=u*(d+h),i&&(e.static_len+=u*(i[2*l+1]+h)));if(0!==f){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(l=e.bl_count[d];0!==l;)c=e.heap[--o],c>t.max_code||(n[2*c+1]!=d&&(e.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function O(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function M(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}W._length_code=[0,1,2,3,4,5,6,7].concat(...T([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),W.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],W.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],W.d_code=function(t){return t<256?B[t]:B[256+(t>>>7)]},W.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],W.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],W.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],W.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],O.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],O.static_l_desc=new O(O.static_ltree,W.extra_lbits,257,286,15),O.static_d_desc=new O(O.static_dtree,W.extra_dbits,0,30,15),O.static_bl_desc=new O(null,W.extra_blbits,0,19,7);const L=[new M(0,0,0,0,0),new M(4,4,8,4,1),new M(4,5,16,8,1),new M(4,6,32,32,1),new M(4,4,16,16,2),new M(8,16,32,32,2),new M(8,16,128,128,2),new M(8,32,128,256,2),new M(32,128,258,1024,2),new M(32,258,258,4096,2)],V=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function N(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;Y>16-i?(n=t,G|=n<>>16-Y,Y+=i-16):(G|=t<=8&&(Q(255&G),G>>>=8,Y-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[Z+2*j]=e>>>8&255,t.pending_buf[Z+2*j+1]=255&e,t.pending_buf[P+j]=255&n,j++,0===e?F[2*n]++:(K++,e--,F[2*(W._length_code[n]+256+1)]++,C[2*W.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=m-y,a=0;a<30;a++)i+=C[2*a]*(5+W.extra_dbits[a]);if(i>>>=3,K8?$(G):Y>0&&Q(255&G),G=0,Y=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),q=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),B.build_tree(t),s=function(){let e;for(J(F,T.max_code),J(C,B.max_code),M.build_tree(t),e=18;e>=3&&0===S[2*W.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(O.static_ltree,O.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?y:-1,m-y,t),y=m,e.flush_pending()}function dt(){let t,n,i,r;do{if(r=c-A-m,0===r&&0===m&&0===A)r=a;else if(-1==r)r--;else if(m>=a+a-262){l.set(l.subarray(a,a+a),0),v-=a,m-=a,y-=a,t=f,i=t;do{n=65535&h[--i],h[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&d[--i],d[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(l,m+A,r),A+=t,A>=3&&(u=255&l[m],u=(u<<_^255&l[m+1])&w)}while(A<262&&0!==e.avail_in)}function ht(t){let e,n,i=U,r=m,s=k;const c=m>a-262?m-(a-262):0;let h=I;const u=o,f=m+258;let p=l[r+s-1],w=l[r+s];k>=z&&(i>>=2),h>A&&(h=A);do{if(e=t,l[e+s]==w&&l[e+s-1]==p&&l[e]==l[r]&&l[++e]==l[r+1]){r+=2,e++;do{}while(l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&rs){if(v=t,s=n,n>=h)break;p=l[r+s-1],w=l[r+s]}}}while((t=65535&d[t&u])>c&&0!=--i);return s<=A?s:A}function ut(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=F,T.stat_desc=O.static_l_desc,B.dyn_tree=C,B.stat_desc=O.static_d_desc,M.dyn_tree=S,M.stat_desc=O.static_bl_desc,G=0,Y=0,q=8,X(),function(){c=2*a,h[f-1]=0;for(let t=0;t9||8!=c||r<9||r>15||n<0||n>9||y<0||y>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(L[R].func!=L[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=L[R].max_lazy,z=L[R].good_length,I=L[R].nice_length,U=L[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,c=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,c=i-s),l.set(e.subarray(c,c+s),0),m=s,y=s,u=255&l[0],u=(u<<_^255&l[1])&w,r=0;r<=s-3;r++)u=(u<<_^255&l[r+2])&w,d[r&o]=h[u],h[u]=r;return 0},t.deflate=function(c,p){let U,z,I,F,C;if(p>4||p<0)return-2;if(!c.next_out||!c.next_in&&0!==c.avail_in||666==n&&4!=p)return c.msg=V[4],-2;if(0===c.avail_out)return c.msg=V[7],-5;var S;if(e=c,F=r,r=p,42==n&&(z=8+(s-8<<4)<<8,I=(R-1&255)>>1,I>3&&(I=3),z|=I<<6,0!==m&&(z|=32),z+=31-z%31,n=113,Q((S=z)>>8&255),Q(255&S)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&p<=F&&4!=p)return e.msg=V[7],-5;if(666==n&&0!==e.avail_in)return c.msg=V[7],-5;if(0!==e.avail_in||0!==A||0!=p&&666!=n){switch(C=-1,L[R].func){case 0:C=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(A<=1){if(dt(),0===A&&0==t)return 0;if(0===A)break}if(m+=A,A=0,n=y+r,(0===m||m>=n)&&(A=m-n,m=n,ct(!1),0===e.avail_out))return 0;if(m-y>=a-262&&(ct(!1),0===e.avail_out))return 0}return ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p);break;case 1:C=function(t){let n,i=0;for(;;){if(A<262){if(dt(),A<262&&0==t)return 0;if(0===A)break}if(A>=3&&(u=(u<<_^255&l[m+2])&w,i=65535&h[u],d[m&o]=h[u],h[u]=m),0!==i&&(m-i&65535)<=a-262&&2!=D&&(g=ht(i)),g>=3)if(n=rt(m-v,g-3),A-=g,g<=E&&A>=3){g--;do{m++,u=(u<<_^255&l[m+2])&w,i=65535&h[u],d[m&o]=h[u],h[u]=m}while(0!=--g);m++}else m+=g,g=0,u=255&l[m],u=(u<<_^255&l[m+1])&w;else n=rt(0,255&l[m]),A--,m++;if(n&&(ct(!1),0===e.avail_out))return 0}return ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p);break;case 2:C=function(t){let n,i,r=0;for(;;){if(A<262){if(dt(),A<262&&0==t)return 0;if(0===A)break}if(A>=3&&(u=(u<<_^255&l[m+2])&w,r=65535&h[u],d[m&o]=h[u],h[u]=m),k=g,b=v,g=2,0!==r&&k4096)&&(g=2)),k>=3&&g<=k){i=m+A-3,n=rt(m-1-b,k-3),A-=k-1,k-=2;do{++m<=i&&(u=(u<<_^255&l[m+2])&w,r=65535&h[u],d[m&o]=h[u],h[u]=m)}while(0!=--k);if(x=0,g=2,m++,n&&(ct(!1),0===e.avail_out))return 0}else if(0!==x){if(n=rt(0,255&l[m-1]),n&&ct(!1),m++,A--,0===e.avail_out)return 0}else x=1,m++,A--}return 0!==x&&(n=rt(0,255&l[m-1]),x=0),ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p)}if(2!=C&&3!=C||(n=666),0==C||2==C)return 0===e.avail_out&&(r=-1),0;if(1==C){if(1==p)tt(2,3),et(256,O.static_ltree),it(),1+q+10-Y<9&&(tt(2,3),et(256,O.static_ltree),it()),q=7;else if(ot(0,0,!1),3==p)for(U=0;U0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(c),d.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}H.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new P,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const Z=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],K=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],q=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],G=[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],Y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],X=[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],J=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Q(){let t,e,n,i,r,a;function s(t,e,s,o,l,c,d,h,u,f,p){let w,_,y,g,b,x,m,v,A,k,U,E,R,D,z;k=0,b=s;do{n[t[e+k]]++,k++,b--}while(0!==b);if(n[0]==s)return d[0]=-1,h[0]=0,0;for(v=h[0],x=1;x<=15&&0===n[x];x++);for(m=x,vb&&(v=b),h[0]=v,D=1<E+v;){if(g++,E+=v,z=y-E,z=z>v?v:z,(_=1<<(x=m-E))>w+1&&(_-=w+1,R=m,x1440)return-3;r[g]=U=f[0],f[0]+=z,0!==g?(a[g]=b,i[0]=x,i[1]=v,x=b>>>E-v,i[2]=U-r[g-1]-x,u.set(i,3*(r[g-1]+x))):d[0]=U}for(i[1]=m-E,k>=s?i[0]=192:p[k]>>E;x>>=1)b^=x;for(b^=x,A=(1<257?(-3==f?u.msg="oversubscribed distance tree":-5==f?(u.msg="incomplete distance tree",f=-3):-4!=f&&(u.msg="empty distance tree with lengths",f=-3),f):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,c=0,d=0,h=0,u=0,f=0,p=0;function w(t,e,n,i,r,a,s,o){let l,c,d,h,u,f,p,w,_,y,g,b,x,m,v,A;p=o.next_in_index,w=o.avail_in,u=s.bitb,f=s.bitk,_=s.write,y=_>=c[A+1],f-=c[A+1],0!=(16&h)){for(h&=15,x=c[A+2]+(u&Z[h]),u>>=h,f-=h;f<15;)w--,u|=(255&o.read_byte(p++))<>=c[A+1],f-=c[A+1],0!=(16&h)){for(h&=15;f>=h,f-=h,y-=x,_>=m)v=_-m,_-v>0&&2>_-v?(s.window[_++]=s.window[v++],s.window[_++]=s.window[v++],x-=2):(s.window.set(s.window.subarray(v,v+2),_),_+=2,v+=2,x-=2);else{v=_-m;do{v+=s.end}while(v<0);if(h=s.end-v,x>h){if(x-=h,_-v>0&&h>_-v)do{s.window[_++]=s.window[v++]}while(0!=--h);else s.window.set(s.window.subarray(v,v+h),_),_+=h,v+=h,h=0;v=0}}if(_-v>0&&x>_-v)do{s.window[_++]=s.window[v++]}while(0!=--x);else s.window.set(s.window.subarray(v,v+x),_),_+=x,v+=x,x=0;break}if(0!=(64&h))return o.msg="invalid distance code",x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,-3;l+=c[A+2],l+=u&Z[h],A=3*(d+l),h=c[A]}break}if(0!=(64&h))return 0!=(32&h)?(x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,1):(o.msg="invalid literal/length code",x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,-3);if(l+=c[A+2],l+=u&Z[h],A=3*(d+l),0===(h=c[A])){u>>=c[A+1],f-=c[A+1],s.window[_++]=c[A+2],y--;break}}else u>>=c[A+1],f-=c[A+1],s.window[_++]=c[A+2],y--}while(y>=258&&w>=10);return x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,0}t.init=function(t,a,s,o,l,c){e=0,h=t,u=a,i=s,f=o,r=l,p=c,n=null},t.proc=function(t,_,y){let g,b,x,m,v,A,k,U=0,E=0,R=0;for(R=_.next_in_index,m=_.avail_in,U=t.bitb,E=t.bitk,v=t.write,A=v=258&&m>=10&&(t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=v,y=w(h,u,i,f,r,p,t,_),R=_.next_in_index,m=_.avail_in,U=t.bitb,E=t.bitk,v=t.write,A=v>>=n[b+1],E-=n[b+1],x=n[b],0===x){l=n[b+2],e=6;break}if(0!=(16&x)){c=15&x,a=n[b+2],e=2;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}if(0!=(32&x)){e=7;break}return e=9,_.msg="invalid literal/length code",y=-3,t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=v,t.inflate_flush(_,y);case 2:for(g=c;E>=g,E-=g,o=u,n=r,s=p,e=3;case 3:for(g=o;E>=n[b+1],E-=n[b+1],x=n[b],0!=(16&x)){c=15&x,d=n[b+2],e=4;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}return e=9,_.msg="invalid distance code",y=-3,t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=v,t.inflate_flush(_,y);case 4:for(g=c;E>=g,E-=g,e=5;case 5:for(k=v-d;k<0;)k+=t.end;for(;0!==a;){if(0===A&&(v==t.end&&0!==t.read&&(v=0,A=v7&&(E-=8,m++,R--),t.write=v,y=t.inflate_flush(_,y),v=t.write,A=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let p,w,_,y,g,b,x,m;for(y=t.next_in_index,g=t.avail_in,w=n.bitb,_=n.bitk,b=n.write,x=b>>1){case 0:w>>>=3,_-=3,p=7&_,w>>>=p,_-=p,r=1;break;case 1:v=[],A=[],k=[[]],U=[[]],Q.inflate_trees_fixed(v,A,k,U),d.init(v[0],A[0],k[0],0,U[0],0),w>>>=3,_-=3,r=6;break;case 2:w>>>=3,_-=3,r=3;break;case 3:return w>>>=3,_-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e)}break;case 1:for(;_<32;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}if((~w>>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);a=65535&w,w=_=0,r=0!==a?2:0!==h?7:0;break;case 2:if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(0===x&&(b==n.end&&0!==n.read&&(b=0,x=bg&&(p=g),p>x&&(p=x),n.window.set(t.read_buf(y,p),b),y+=p,g-=p,b+=p,x-=p,0!=(a-=p))break;r=0!==h?7:0;break;case 3:for(;_<14;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}if(s=p=16383&w,(31&p)>29||(p>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(p=258+(31&p)+(p>>5&31),!i||i.length>>=14,_-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;_<3;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}i[tt[o++]]=7&w,w>>>=3,_-=3}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,p=f.inflate_trees_bits(i,l,c,u,t),0!=p)return-3==(e=p)&&(i=null,r=9),n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);o=0,r=5;case 5:for(;p=s,!(o>=258+(31&p)+(p>>5&31));){let a,d;for(p=l[0];_>>=p,_-=p,i[o++]=d;else{for(m=18==d?7:d-14,a=18==d?11:3;_>>=p,_-=p,a+=w&Z[m],w>>>=m,_-=m,m=o,p=s,m+a>258+(31&p)+(p>>5&31)||16==d&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);d=16==d?i[m-1]:0;do{i[m++]=d}while(0!=--a);o=m}}if(c[0]=-1,E=[],R=[],D=[],z=[],E[0]=9,R[0]=6,p=s,p=f.inflate_trees_dynamic(257+(31&p),1+(p>>5&31),i,E,R,D,z,u,t),0!=p)return-3==p&&(i=null,r=9),e=p,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);d.init(E[0],R[0],u,D[0],u,z[0]),r=6;case 6:if(n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),y=t.next_in_index,g=t.avail_in,w=n.bitb,_=n.bitk,b=n.write,x=b15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(d),a.forEach((function(t){o.set(t,c),c+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=j,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));r({workerScripts:{inflate:[e],deflate:[e]}})}})(),t.BlobReader=m,t.BlobWriter=v,t.Data64URIReader=b,t.Data64URIWriter=x,t.ERR_ABORT=Ht,t.ERR_BAD_FORMAT=Yt,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=$t,t.ERR_DUPLICATED_NAME=ge,t.ERR_ENCRYPTED=ne,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Qt,t.ERR_EOCDR_NOT_FOUND=Xt,t.ERR_EOCDR_ZIP64_NOT_FOUND=Jt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=ee,t.ERR_HTTP_RANGE=o,t.ERR_INVALID_COMMENT=be,t.ERR_INVALID_DATE=Ae,t.ERR_INVALID_ENCRYPTION_STRENGTH=ke,t.ERR_INVALID_ENTRY_COMMENT=xe,t.ERR_INVALID_ENTRY_NAME=me,t.ERR_INVALID_EXTRAFIELD_DATA=Ee,t.ERR_INVALID_EXTRAFIELD_TYPE=Ue,t.ERR_INVALID_PASSWORD=$,t.ERR_INVALID_SIGNATURE=Ft,t.ERR_INVALID_VERSION=ve,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=te,t.ERR_UNSUPPORTED_COMPRESSION=re,t.ERR_UNSUPPORTED_ENCRYPTION=ie,t.HttpRangeReader=class extends z{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=z,t.Reader=w,t.TextReader=y,t.TextWriter=g,t.Uint8ArrayReader=I,t.Uint8ArrayWriter=F,t.Writer=_,t.ZipReader=oe,t.ZipWriter=De,t.configure=r,t.fs=Me,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={},n)=>({Deflate:a(t.Deflate,e.deflate,n),Inflate:a(t.Inflate,e.inflate,n)}),Object.defineProperty(t,"__esModule",{value:!0})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},n=Object.assign({},e);function i(){return n}function r(t){if(void 0!==t.chunkSize&&(n.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(n.maxWorkers=t.maxWorkers),void 0!==t.useWebWorkers&&(n.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(n.Deflate=t.Deflate),void 0!==t.Inflate&&(n.Inflate=t.Inflate),void 0!==t.workerScripts){if(t.workerScripts.deflate){if(!Array.isArray(t.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");n.workerScripts||(n.workerScripts={}),n.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");n.workerScripts||(n.workerScripts={}),n.workerScripts.inflate=t.workerScripts.inflate}}}function a(t,e,n){return class{constructor(i){this.codec=new t(Object.assign({},e,i)),n(this.codec,(t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),i(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),i(this)}};function i(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const s="HTTP error ",o="HTTP Range not supported",l="text/plain",c="Content-Length",d="Accept-Ranges",h="HEAD",u="GET",f="bytes";class p{constructor(){this.size=0}init(){this.initialized=!0}}class w extends p{}class _ extends p{writeUint8Array(t){this.size+=t.length}}class y extends w{constructor(t){super(),this.blobReader=new x(new Blob([t],{type:l}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}}class g extends _{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:l})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:l})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}}class b extends w{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}}class x extends w{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((i,r)=>{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class v extends _{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class A extends w{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),C(this.url)&&!this.preventHeadRequest){const t=await U(h,this.url,this.options);if(this.size=Number(t.headers.get(c)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(d)!=f)throw new Error(o);void 0===this.size&&await k(this,this.options)}else await k(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await U(u,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(o);return new Uint8Array(await n.arrayBuffer())}return this.data||await k(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function k(t,e){const n=await U(u,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function U(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(s+(r.statusText||r.status))}class E extends w{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),C(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>D(h,this.url,(n=>{this.size=Number(n.getResponseHeader(c)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(d)==f?t():e(new Error(o)):void 0===this.size?R(this,this.url).then((()=>t())).catch(e):t()}),e)));await R(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await R(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>D(u,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(o)}}function R(t,e){return new Promise(((n,i)=>D(u,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function D(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(s+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class z extends w{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new E(t,e):this.reader=new A(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}class I extends w{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}}class F extends _{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}}function C(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const S=4294967295,B=65535,T=67324752,W=134695760,M=33639248,O=101010256,L=101075792,V=117853008,N=39169,P=2048,H="/",j=new Date(2107,11,31),Z=new Date(1980,0,1),q="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const K=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;K[t]=e}class G{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^K[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Y={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=Y.getPartial(n);return 32===i?t.concat(e):Y._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+Y.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=Y.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=Y.getPartial(r);return i.push(Y.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},X={bytes:{fromBits(t){const e=Y.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,c;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let h=16843009*c^65537*l^257*o^16843008*d,u=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][d]=u=u<<24^u>>>8,e[n][a]=h=h<<24^h>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let h,u,f,p=t[0]^n[0],w=t[e?3:1]^n[1],_=t[2]^n[2],y=t[e?1:3]^n[3],g=4;for(let t=0;t>>24]^o[w>>16&255]^l[_>>8&255]^c[255&y]^n[g],u=s[w>>>24]^o[_>>16&255]^l[y>>8&255]^c[255&p]^n[g+1],f=s[_>>>24]^o[y>>16&255]^l[p>>8&255]^c[255&w]^n[g+2],y=s[y>>>24]^o[p>>16&255]^l[w>>8&255]^c[255&_]^n[g+3],g+=4,p=h,w=u,_=f;for(let t=0;t<4;t++)r[e?3&-t:t]=d[p>>>24]<<24^d[w>>16&255]<<16^d[_>>8&255]<<8^d[255&y]^n[g++],h=p,p=w,w=_,_=y,y=h;return r}}},Q={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=Y.bitLength(e);for(let r=0;rt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const bt=12;class mt{constructor(t,e){this.password=t,this.passwordVerification=e,kt(this,t)}async append(t){if(this.password){const e=vt(this,t.subarray(0,bt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error($);t=t.subarray(bt)}return vt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class xt{constructor(t,e){this.passwordVerification=e,this.password=t,kt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(bt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(At(this,i),0),n=bt}else e=new Uint8Array(t.length),n=0;return e.set(At(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function vt(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function Et(t){const e=2|t.keys[2];return Rt(Math.imul(e,1^e)>>>8)}function Rt(t){return 255&t}function Dt(t){return 4294967295&t}const zt="deflate",It="inflate",Ft="Invalid signature";class Ct{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new G,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new mt(e.password,e.passwordVerification):new pt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(Ft);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(Ft)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class St{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new G,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new xt(e.password,e.passwordVerification):new wt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Bt="init",Tt="append",Wt="flush",Mt="message";var Ot=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-fs.min.js",document.baseURI).href)),t.worker.addEventListener(Mt,r,!1),t.interface={append:t=>n({type:Tt,data:t}),flush:()=>n({type:Wt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:Bt,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==Bt||r==Wt||r==Tt){const n=i.data;r==Wt?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(zt)?new St(t,e):e.codecType.startsWith(It)?new Ct(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Lt=[],Vt=[];function Nt(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Lt.length!t.busy));return n?Ot(n,t,e,Pt,i,r):new Promise((n=>Vt.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Pt(t){const e=!Vt.length;if(e)Lt=Lt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Vt.splice(0,1);e(Ot(t,n,i,Pt,r,a))}return e}const Ht="Abort error";async function jt(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,c=0){const d=s.signal;if(lthis[e]=t[e]))}}const Yt="File format is not recognized",Xt="End of central directory not found",Jt="End of Zip64 central directory not found",Qt="End of Zip64 central directory locator not found",$t="Central directory header not found",te="Local file header not found",ee="Zip64 extra field not found",ne="File contains encrypted entry",ie="Encryption method not supported",re="Compression method not supported",ae="utf-8",se=["uncompressedSize","compressedSize","offset"];class oe{constructor(t,e={}){this.reader=t,this.options=e,this.config=i()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Yt);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,O,22,1048560);if(!n)throw new Error(Xt);const i=new DataView(n.buffer);let r=_e(i,12),a=_e(i,16),s=we(i,8),o=0;if(a==S||r==S||s==B){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(_e(i,0)!=V)throw new Error(Jt);a=ye(i,8);let l=await e.readUint8Array(a,56),c=new DataView(l.buffer);const d=n.offset-20-56;if(_e(c,0)!=L&&a!=d){const t=a;a=d,o=a-t,l=await e.readUint8Array(a,56),c=new DataView(l.buffer)}if(_e(c,0)!=L)throw new Error(Qt);s=ye(c,24),r=ye(i,4),a-=ye(c,40)}if(a<0||a>=e.size)throw new Error(Yt);let l=0,c=await e.readUint8Array(a,e.size-a),d=new DataView(c.buffer);const h=n.offset-r;if(_e(d,l)!=M&&a!=h){const t=a;a=h,o=a-t,c=await e.readUint8Array(a,e.size-a),d=new DataView(c.buffer)}if(a<0||a>=e.size)throw new Error(Yt);const u=[];for(let e=0;ee.getData(t,n),u.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return u}async close(){}}class le{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,o=this.compressionMethod,l=this.config,c=this.bitFlag,d=this.signature;let h=ue(this,e,"password");if(h=h&&h.length&&h,s&&99!=s.originalCompressionMethod)throw new Error(re);if(0!=o&&8!=o)throw new Error(re);if(_e(a,0)!=T)throw new Error(te);const u=this.localDirectory={};ce(u,a,4),u.rawExtraField=r.subarray(i+30+u.filenameLength,i+30+u.filenameLength+u.extraFieldLength),de(this,u,a,4);const f=i+30+u.filenameLength+u.extraFieldLength,p=c.encrypted&&u.bitFlag.encrypted,w=p&&!s;if(p){if(!w&&void 0===s.strength)throw new Error(ie);if(!h)throw new Error(ne)}const _=await Nt(l.Inflate,{codecType:It,password:h,zipCrypto:w,encryptionStrength:s&&s.strength,signed:ue(this,e,"checkSignature"),passwordVerification:w&&(c.dataDescriptor?this.rawLastModDate>>>8&255:d>>>24&255),signature:d,compressed:0!=o,encrypted:p,useWebWorkers:ue(this,e,"useWebWorkers")},l);return t.initialized||await t.init(),await jt(_,n,t,f,this.compressedSize,l,{onprogress:e.onprogress,signal:ue(this,e,"signal")}),t.getData()}}function ce(t,e,n){t.version=we(e,n);const i=t.rawBitFlag=we(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&P)==P},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=_e(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=we(e,n+22),t.extraFieldLength=we(e,n+24)}function de(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==S));for(let e=0;e{if(e[n]==S){if(!t||void 0===t[n])throw new Error(ee);e[n]=t[n]}}))}(c,e);const d=e.extraFieldUnicodePath=a.get(28789);d&&he(d,"filename","rawFilename",e,t);const h=e.extraFieldUnicodeComment=a.get(25461);h&&he(h,"comment","rawComment",e,t);const u=e.extraFieldAES=a.get(39169);u?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=pe(i,0),t.vendorId=pe(i,2);const r=pe(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=we(i,5)}else e.compressionMethod=n}(u,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function he(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=pe(a,0),t.signature=_e(a,1);const s=new G;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==_e(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function ue(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function fe(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;nB)throw new Error(xe);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>B)throw new Error(me);const s=this.options.version||n.version||0;if(s>B)throw new Error(ve);const o=n.lastModDate||new Date;if(oj)throw new Error(Ae);const l=ze(this,n,"password"),c=ze(this,n,"encryptionStrength")||3,d=ze(this,n,"zipCrypto");if(void 0!==l&&void 0!==c&&(c<1||c>3))throw new Error(ke);e&&!e.initialized&&await e.init();let h=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),h=new Uint8Array(t),u.forEach(((t,n)=>{if(n>B)throw new Error(Ue);if(t.length>B)throw new Error(Ee);h.set(new Uint16Array([n]),e),h.set(new Uint16Array([t.length]),e+2),h.set(t,e+4),e+=4+t.length}))}const f=e?Math.floor(1.05*e.size):0;this.maxOutputSize+=f,await Promise.resolve();const p=n.zip64||this.options.zip64||this.offset>=S||f>=S||this.offset+this.maxOutputSize>=S,w=ze(this,n,"level"),_=ze(this,n,"useWebWorkers"),y=ze(this,n,"bufferedWrite");let g=ze(this,n,"keepOrder"),b=ze(this,n,"dataDescriptor");const m=ze(this,n,"signal");void 0===b&&(b=!0),void 0===g&&(g=!0);const x=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,l;r.set(e,null);try{let c,d;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>l=t))),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(c=new v,await c.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),c=a),d=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,c=0!==l&&!i.directory,d=i.zip64;let h,u;if(o&&!i.zipCrypto){h=new Uint8Array(Re.length+2);const t=new DataView(h.buffer);Fe(t,0,N),h.set(Re,2),u=i.encryptionStrength,Ie(t,8,u)}else h=new Uint8Array(0);const f={version:i.version||20,zip64:d,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:d?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:h,rawExtraField:i.rawExtraField};let p=P;i.dataDescriptor&&(p|=8);let w=0;c&&(w=8);d&&(f.version=f.version>45?f.version:45);o&&(p|=1,i.zipCrypto||(f.version=f.version>51?f.version:51,w=99,c&&(f.rawExtraFieldAES[9]=8)));const _=f.headerArray=new Uint8Array(26),y=new DataView(_.buffer);Fe(y,0,f.version),Fe(y,2,p),Fe(y,4,w);const g=new Uint32Array(1),b=new DataView(g.buffer);Fe(b,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),Fe(b,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const m=g[0];Ce(y,6,m),Fe(y,22,r.length),Fe(y,24,0),Fe(y,24,h.length+f.rawExtraField.length);const x=new Uint8Array(30+r.length+h.length+f.rawExtraField.length);let v;Ce(new DataView(x.buffer),0,T),x.set(_,4),x.set(r,30),x.set(h,30+r.length),x.set(f.rawExtraField,30+r.length+h.length);let A=0,k=0;if(t){A=t.size;const r=await Nt(n.Deflate,{codecType:zt,level:l,password:s,encryptionStrength:u,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&m>>8&255,signed:!0,compressed:c,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(x),v=await jt(r,t,e,0,A,n,{onprogress:i.onprogress,signal:i.signal}),k=v.length}else await e.writeUint8Array(x);let U,E=new Uint8Array(0);i.dataDescriptor&&(E=new Uint8Array(d?24:16),U=new DataView(E.buffer),Ce(U,0,W));if(t)if(o&&!i.zipCrypto||void 0===v.signature||(Ce(y,10,v.signature),f.signature=v.signature,i.dataDescriptor&&Ce(U,4,v.signature)),d){const t=new DataView(f.rawExtraFieldZip64.buffer);Fe(t,0,1),Fe(t,2,24),Ce(y,14,S),Se(t,12,BigInt(k)),Ce(y,18,S),Se(t,4,BigInt(A)),i.dataDescriptor&&(Se(U,8,BigInt(k)),Se(U,16,BigInt(A)))}else Ce(y,14,k),Ce(y,18,A),i.dataDescriptor&&(Ce(U,8,k),Ce(U,12,A));i.dataDescriptor&&await e.writeUint8Array(E);const R=x.length+(v?v.length:0)+E.length;return Object.assign(f,{compressedSize:k,uncompressedSize:A,lastModDate:a,rawLastModDate:m,encrypted:o,length:R}),f}(n,c,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,d),c!=a){const e=c.getData(),n=new FileReader,r=new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)})),[s]=await Promise.all([r,t.lockWrite,o]);if(!i.dataDescriptor){const t=new DataView(s);d.encrypted&&!i.zipCrypto||Ce(t,14,d.signature),d.zip64?(Ce(t,18,S),Ce(t,22,S)):(Ce(t,18,d.compressedSize),Ce(t,22,d.uncompressedSize))}await a.writeUint8Array(new Uint8Array(s))}if(d.offset=t.offset,d.zip64){Se(new DataView(d.rawExtraFieldZip64.buffer),20,BigInt(d.offset))}return t.offset+=d.length,d}finally{l&&l(),s&&s()}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:h,zip64:p,password:l,level:w,useWebWorkers:_,encryptionStrength:c,zipCrypto:d,bufferedWrite:y,keepOrder:g,dataDescriptor:b,signal:m}));return this.maxOutputSize-=f,Object.assign(x,{name:t,comment:r,extraField:u}),new Gt(x)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=S||r>=S||s>=B,l=new Uint8Array(r+(o?98:22)),c=new DataView(l.buffer);if(t.length){if(!(t.length<=B))throw new Error(be);Fe(c,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;Ce(c,i,M),Fe(c,i+4,t.version),l.set(t.headerArray,i+6),Fe(c,i+30,a),Fe(c,i+32,t.rawComment.length),t.directory&&Ie(c,i+38,16),t.zip64?Ce(c,i+42,S):Ce(c,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(Ce(c,i,L),Se(c,i+4,BigInt(44)),Fe(c,i+12,45),Fe(c,i+14,45),Se(c,i+24,BigInt(s)),Se(c,i+32,BigInt(s)),Se(c,i+40,BigInt(r)),Se(c,i+48,BigInt(a)),Ce(c,i+56,V),Se(c,i+64,BigInt(a)+BigInt(r)),Ce(c,i+72,1),s=B,a=S,r=S,i+=76),Ce(c,i,O),Fe(c,i+8,s),Fe(c,i+10,s),Ce(c,i+12,r),Ce(c,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}}function ze(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Ie(t,e,n){t.setUint8(e,n)}function Fe(t,e,n){t.setUint16(e,n,!0)}function Ce(t,e,n){t.setUint32(e,n,!0)}function Se(t,e,n){t.setBigUint64(e,n,!0)}const Be=524288;class Te{constructor(t,e,n,i){if(t.root&&i&&i.getChildByName(e))throw new Error("Entry filename already exists");n||(n={}),this.fs=t,this.name=e,this.data=n.data,this.id=t.entries.length,this.parent=i,this.children=[],this.uncompressedSize=0,t.entries.push(this),i&&this.parent.children.push(this)}moveTo(t){this.fs.move(this,t)}getFullname(){return this.getRelativeName()}getRelativeName(t=this.fs.root){let e=this.name,n=this.parent;for(;n&&n!=t;)e=(n.name?n.name+"/":"")+e,n=n.parent;return e}isDescendantOf(t){let e=this.parent;for(;e&&e.id!=t.id;)e=e.parent;return Boolean(e)}}class We extends Te{constructor(t,e,n,i){super(t,e,n,i),this.Reader=n.Reader,this.Writer=n.Writer,n.getData&&(this.getData=n.getData)}async getData(t,e={}){return!t||t.constructor==this.Writer&&this.data?this.data:(this.reader=new this.Reader(this.data,e),await this.reader.init(),t.initialized||await t.init(),this.uncompressedSize=this.reader.size,async function(t,e){return n();async function n(i=0){const r=i*Be;if(re.file((i=>n(t.addBlob(e.name,i))),i)));async function n(t,e){const r=await i(e);for(const e of r)e.isDirectory?await n(t.addDirectory(e.name),e):await new Promise(((n,i)=>{e.file((i=>{const r=t.addBlob(e.name,i);r.uncompressedSize=i.size,n(r)}),i)}))}function i(t){return new Promise(((e,n)=>{let i=[];function r(t){t.readEntries((n=>{n.length?(i=i.concat(n),r(t)):e(i)}),n)}t.isDirectory&&r(t.createReader()),t.isFile&&e(i)}))}}(this,t)}async addData(t,e){return He(this,t,e)}async importBlob(t,e={}){await this.importZip(new x(t),e)}async importData64URI(t,e={}){await this.importZip(new b(t),e)}async importUint8Array(t,e={}){await this.importZip(new I(t),e)}async importHttpContent(t,e={}){await this.importZip(new z(t,e),e)}async exportBlob(t={}){return this.exportZip(new v("application/zip"),t)}async exportData64URI(t={}){return this.exportZip(new m("application/zip"),t)}async exportUint8Array(t={}){return this.exportZip(new F,t)}async importZip(t,e){t.initialized||await t.init();const n=new oe(t,e);(await n.getEntries()).forEach((t=>{let n=this;const i=t.filename.split("/"),r=i.pop();i.forEach((t=>n=n.getChildByName(t)||new Me(this.fs,t,null,n))),t.directory||He(n,r,{data:t,Reader:Le(Object.assign({},e))})}))}async exportZip(t,e){await Ve(this),await t.init();const n=new De(t,e);return await async function(t,e,n,i){const r=e,a=new Map;async function s(t,e){async function o(){if(i.bufferedWrite)await Promise.all(e.children.map(l));else for(const t of e.children)await l(t)}async function l(e){const o=i.relativePath?e.getRelativeName(r):e.getFullname();await t.add(o,e.reader,Object.assign({directory:e.directory},Object.assign({},i,{onprogress:t=>{if(i.onprogress){a.set(o,t);try{i.onprogress(Array.from(a.values()).reduce(((t,e)=>t+e)),n)}catch(t){}}}}))),await s(t,e)}await o()}await s(t,e)}(n,this,function(t,e){let n=0;return t.forEach(i),n;function i(t){n+=t[e],t.children&&t.children.forEach(i)}}([this],"uncompressedSize"),e),await n.close(),t.getData()}getChildByName(t){for(let e=0;e{n.id==t.id&&e.splice(i,1)}))}function Pe(t){t.entries=[],t.root=new Me(t)}function He(t,e,n,i){if(t.directory)return i?new Me(t.fs,e,n,t):new We(t.fs,e,n,t);throw new Error("Parent entry is not a directory")}(()=>{if("function"==typeof URL.createObjectURL){const t=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],r=n.getPartial(i);return 32===r?t.concat(e):n._shiftRight(e,r,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(i),i=0;if(0===e)return r.concat(t);for(let n=0;n>>e),i=t[n]<<32-e;const a=t.length?t[t.length-1]:0,s=n.getPartial(a);return r.push(n.partial(e+s&31,e+s>32?i:r.pop(),1)),r}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let r;for(let n=0;n>>24,r<<=8;return i},toBits(t){const e=[];let i,r=0;for(i=0;i>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,c;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let h=16843009*c^65537*l^257*o^16843008*d,u=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][d]=u=u<<24^u>>>8,e[n][a]=h=h<<24^h>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let h,u,f,p=t[0]^n[0],w=t[e?3:1]^n[1],_=t[2]^n[2],y=t[e?1:3]^n[3],g=4;for(let t=0;t>>24]^o[w>>16&255]^l[_>>8&255]^c[255&y]^n[g],u=s[w>>>24]^o[_>>16&255]^l[y>>8&255]^c[255&p]^n[g+1],f=s[_>>>24]^o[y>>16&255]^l[p>>8&255]^c[255&w]^n[g+2],y=s[y>>>24]^o[p>>16&255]^l[w>>8&255]^c[255&_]^n[g+3],g+=4,p=h,w=u,_=f;for(let t=0;t<4;t++)r[e?3&-t:t]=d[p>>>24]<<24^d[w>>16&255]<<16^d[_>>8&255]<<8^d[255&y]^n[g++],h=p,p=w,w=_,_=y,y=h;return r}},a=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,i){let r;if(!(r=e.length))return[];const a=n.bitLength(e);for(let n=0;nt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,E(this,t)}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return k(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class A{constructor(t,e){this.passwordVerification=e,this.password=t,E(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function D(t){const e=2|t.keys[2];return z(Math.imul(e,1^e)>>>8)}function z(t){return 255&t}function I(t){return 4294967295&t}class F{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new y(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class C{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new A(n.password,n.passwordVerification):new g(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const S={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),B=function(t,e){return e.codecType.startsWith("deflate")?new C(t,e):e.codecType.startsWith("inflate")?new F(t,e):void 0}(n,e)},append:async t=>({data:await B.append(t.data)}),flush:()=>B.flush()};let B;function T(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=S[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const W=[0,1,2,3].concat(...T([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function M(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,c=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,c,d,h,u,f=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],d=n[2*n[2*l+1]+1]+1,d>s&&(d=s,f++),n[2*l+1]=d,l>t.max_code||(e.bl_count[d]++,h=0,l>=a&&(h=r[l-a]),u=n[2*l],e.opt_len+=u*(d+h),i&&(e.static_len+=u*(i[2*l+1]+h)));if(0!==f){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(l=e.bl_count[d];0!==l;)c=e.heap[--o],c>t.max_code||(n[2*c+1]!=d&&(e.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function O(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function L(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}M._length_code=[0,1,2,3,4,5,6,7].concat(...T([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),M.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],M.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],M.d_code=function(t){return t<256?W[t]:W[256+(t>>>7)]},M.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],M.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],M.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],O.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],O.static_l_desc=new O(O.static_ltree,M.extra_lbits,257,286,15),O.static_d_desc=new O(O.static_dtree,M.extra_dbits,0,30,15),O.static_bl_desc=new O(null,M.extra_blbits,0,19,7);const V=[new L(0,0,0,0,0),new L(4,4,8,4,1),new L(4,5,16,8,1),new L(4,6,32,32,1),new L(4,4,16,16,2),new L(8,16,32,32,2),new L(8,16,128,128,2),new L(8,32,128,256,2),new L(32,128,258,1024,2),new L(32,258,258,4096,2)],N=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function P(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;Y>16-i?(n=t,G|=n<>>16-Y,Y+=i-16):(G|=t<=8&&(Q(255&G),G>>>=8,Y-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[Z+2*j]=e>>>8&255,t.pending_buf[Z+2*j+1]=255&e,t.pending_buf[L+j]=255&n,j++,0===e?F[2*n]++:(q++,e--,F[2*(M._length_code[n]+256+1)]++,C[2*M.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=x-y,a=0;a<30;a++)i+=C[2*a]*(5+M.extra_dbits[a]);if(i>>>=3,q8?$(G):Y>0&&Q(255&G),G=0,Y=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),K=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let r,a,s=0;R>0?(B.build_tree(t),T.build_tree(t),s=function(){let e;for(J(F,B.max_code),J(C,T.max_code),W.build_tree(t),e=18;e>=3&&0===S[2*M.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(O.static_ltree,O.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?y:-1,x-y,t),y=x,e.flush_pending()}function dt(){let t,n,i,r;do{if(r=c-A-x,0===r&&0===x&&0===A)r=a;else if(-1==r)r--;else if(x>=a+a-262){l.set(l.subarray(a,a+a),0),v-=a,x-=a,y-=a,t=f,i=t;do{n=65535&h[--i],h[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&d[--i],d[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(l,x+A,r),A+=t,A>=3&&(u=255&l[x],u=(u<<_^255&l[x+1])&w)}while(A<262&&0!==e.avail_in)}function ht(t){let e,n,i=U,r=x,s=k;const c=x>a-262?x-(a-262):0;let h=I;const u=o,f=x+258;let p=l[r+s-1],w=l[r+s];k>=z&&(i>>=2),h>A&&(h=A);do{if(e=t,l[e+s]==w&&l[e+s-1]==p&&l[e]==l[r]&&l[++e]==l[r+1]){r+=2,e++;do{}while(l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&rs){if(v=t,s=n,n>=h)break;p=l[r+s-1],w=l[r+s]}}}while((t=65535&d[t&u])>c&&0!=--i);return s<=A?s:A}function ut(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,B.dyn_tree=F,B.stat_desc=O.static_l_desc,T.dyn_tree=C,T.stat_desc=O.static_d_desc,W.dyn_tree=S,W.stat_desc=O.static_bl_desc,G=0,Y=0,K=8,X(),function(){c=2*a,h[f-1]=0;for(let t=0;t9||8!=c||r<9||r>15||n<0||n>9||y<0||y>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(V[R].func!=V[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=V[R].max_lazy,z=V[R].good_length,I=V[R].nice_length,U=V[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,c=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,c=i-s),l.set(e.subarray(c,c+s),0),x=s,y=s,u=255&l[0],u=(u<<_^255&l[1])&w,r=0;r<=s-3;r++)u=(u<<_^255&l[r+2])&w,d[r&o]=h[u],h[u]=r;return 0},t.deflate=function(c,p){let U,z,I,F,C;if(p>4||p<0)return-2;if(!c.next_out||!c.next_in&&0!==c.avail_in||666==n&&4!=p)return c.msg=N[4],-2;if(0===c.avail_out)return c.msg=N[7],-5;var S;if(e=c,F=r,r=p,42==n&&(z=8+(s-8<<4)<<8,I=(R-1&255)>>1,I>3&&(I=3),z|=I<<6,0!==x&&(z|=32),z+=31-z%31,n=113,Q((S=z)>>8&255),Q(255&S)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&p<=F&&4!=p)return e.msg=N[7],-5;if(666==n&&0!==e.avail_in)return c.msg=N[7],-5;if(0!==e.avail_in||0!==A||0!=p&&666!=n){switch(C=-1,V[R].func){case 0:C=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(A<=1){if(dt(),0===A&&0==t)return 0;if(0===A)break}if(x+=A,A=0,n=y+r,(0===x||x>=n)&&(A=x-n,x=n,ct(!1),0===e.avail_out))return 0;if(x-y>=a-262&&(ct(!1),0===e.avail_out))return 0}return ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p);break;case 1:C=function(t){let n,i=0;for(;;){if(A<262){if(dt(),A<262&&0==t)return 0;if(0===A)break}if(A>=3&&(u=(u<<_^255&l[x+2])&w,i=65535&h[u],d[x&o]=h[u],h[u]=x),0!==i&&(x-i&65535)<=a-262&&2!=D&&(g=ht(i)),g>=3)if(n=rt(x-v,g-3),A-=g,g<=E&&A>=3){g--;do{x++,u=(u<<_^255&l[x+2])&w,i=65535&h[u],d[x&o]=h[u],h[u]=x}while(0!=--g);x++}else x+=g,g=0,u=255&l[x],u=(u<<_^255&l[x+1])&w;else n=rt(0,255&l[x]),A--,x++;if(n&&(ct(!1),0===e.avail_out))return 0}return ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p);break;case 2:C=function(t){let n,i,r=0;for(;;){if(A<262){if(dt(),A<262&&0==t)return 0;if(0===A)break}if(A>=3&&(u=(u<<_^255&l[x+2])&w,r=65535&h[u],d[x&o]=h[u],h[u]=x),k=g,b=v,g=2,0!==r&&k4096)&&(g=2)),k>=3&&g<=k){i=x+A-3,n=rt(x-1-b,k-3),A-=k-1,k-=2;do{++x<=i&&(u=(u<<_^255&l[x+2])&w,r=65535&h[u],d[x&o]=h[u],h[u]=x)}while(0!=--k);if(m=0,g=2,x++,n&&(ct(!1),0===e.avail_out))return 0}else if(0!==m){if(n=rt(0,255&l[x-1]),n&&ct(!1),x++,A--,0===e.avail_out)return 0}else m=1,x++,A--}return 0!==m&&(n=rt(0,255&l[x-1]),m=0),ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p)}if(2!=C&&3!=C||(n=666),0==C||2==C)return 0===e.avail_out&&(r=-1),0;if(1==C){if(1==p)tt(2,3),et(256,O.static_ltree),it(),1+K+10-Y<9&&(tt(2,3),et(256,O.static_ltree),it()),K=7;else if(ot(0,0,!1),3==p)for(U=0;U0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(c),d.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}j.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new H,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const q=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],K=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],G=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Y=[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],X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],J=[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],Q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function $(){let t,e,n,i,r,a;function s(t,e,s,o,l,c,d,h,u,f,p){let w,_,y,g,b,m,x,v,A,k,U,E,R,D,z;k=0,b=s;do{n[t[e+k]]++,k++,b--}while(0!==b);if(n[0]==s)return d[0]=-1,h[0]=0,0;for(v=h[0],m=1;m<=15&&0===n[m];m++);for(x=m,vb&&(v=b),h[0]=v,D=1<E+v;){if(g++,E+=v,z=y-E,z=z>v?v:z,(_=1<<(m=x-E))>w+1&&(_-=w+1,R=x,m1440)return-3;r[g]=U=f[0],f[0]+=z,0!==g?(a[g]=b,i[0]=m,i[1]=v,m=b>>>E-v,i[2]=U-r[g-1]-m,u.set(i,3*(r[g-1]+m))):d[0]=U}for(i[1]=x-E,k>=s?i[0]=192:p[k]>>E;m>>=1)b^=m;for(b^=m,A=(1<257?(-3==f?u.msg="oversubscribed distance tree":-5==f?(u.msg="incomplete distance tree",f=-3):-4!=f&&(u.msg="empty distance tree with lengths",f=-3),f):0)}}function tt(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,c=0,d=0,h=0,u=0,f=0,p=0;function w(t,e,n,i,r,a,s,o){let l,c,d,h,u,f,p,w,_,y,g,b,m,x,v,A;p=o.next_in_index,w=o.avail_in,u=s.bitb,f=s.bitk,_=s.write,y=_>=c[A+1],f-=c[A+1],0!=(16&h)){for(h&=15,m=c[A+2]+(u&q[h]),u>>=h,f-=h;f<15;)w--,u|=(255&o.read_byte(p++))<>=c[A+1],f-=c[A+1],0!=(16&h)){for(h&=15;f>=h,f-=h,y-=m,_>=x)v=_-x,_-v>0&&2>_-v?(s.window[_++]=s.window[v++],s.window[_++]=s.window[v++],m-=2):(s.window.set(s.window.subarray(v,v+2),_),_+=2,v+=2,m-=2);else{v=_-x;do{v+=s.end}while(v<0);if(h=s.end-v,m>h){if(m-=h,_-v>0&&h>_-v)do{s.window[_++]=s.window[v++]}while(0!=--h);else s.window.set(s.window.subarray(v,v+h),_),_+=h,v+=h,h=0;v=0}}if(_-v>0&&m>_-v)do{s.window[_++]=s.window[v++]}while(0!=--m);else s.window.set(s.window.subarray(v,v+m),_),_+=m,v+=m,m=0;break}if(0!=(64&h))return o.msg="invalid distance code",m=o.avail_in-w,m=f>>3>3:m,w+=m,p-=m,f-=m<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,-3;l+=c[A+2],l+=u&q[h],A=3*(d+l),h=c[A]}break}if(0!=(64&h))return 0!=(32&h)?(m=o.avail_in-w,m=f>>3>3:m,w+=m,p-=m,f-=m<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,1):(o.msg="invalid literal/length code",m=o.avail_in-w,m=f>>3>3:m,w+=m,p-=m,f-=m<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,-3);if(l+=c[A+2],l+=u&q[h],A=3*(d+l),0===(h=c[A])){u>>=c[A+1],f-=c[A+1],s.window[_++]=c[A+2],y--;break}}else u>>=c[A+1],f-=c[A+1],s.window[_++]=c[A+2],y--}while(y>=258&&w>=10);return m=o.avail_in-w,m=f>>3>3:m,w+=m,p-=m,f-=m<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,0}t.init=function(t,a,s,o,l,c){e=0,h=t,u=a,i=s,f=o,r=l,p=c,n=null},t.proc=function(t,_,y){let g,b,m,x,v,A,k,U=0,E=0,R=0;for(R=_.next_in_index,x=_.avail_in,U=t.bitb,E=t.bitk,v=t.write,A=v=258&&x>=10&&(t.bitb=U,t.bitk=E,_.avail_in=x,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=v,y=w(h,u,i,f,r,p,t,_),R=_.next_in_index,x=_.avail_in,U=t.bitb,E=t.bitk,v=t.write,A=v>>=n[b+1],E-=n[b+1],m=n[b],0===m){l=n[b+2],e=6;break}if(0!=(16&m)){c=15&m,a=n[b+2],e=2;break}if(0==(64&m)){o=m,s=b/3+n[b+2];break}if(0!=(32&m)){e=7;break}return e=9,_.msg="invalid literal/length code",y=-3,t.bitb=U,t.bitk=E,_.avail_in=x,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=v,t.inflate_flush(_,y);case 2:for(g=c;E>=g,E-=g,o=u,n=r,s=p,e=3;case 3:for(g=o;E>=n[b+1],E-=n[b+1],m=n[b],0!=(16&m)){c=15&m,d=n[b+2],e=4;break}if(0==(64&m)){o=m,s=b/3+n[b+2];break}return e=9,_.msg="invalid distance code",y=-3,t.bitb=U,t.bitk=E,_.avail_in=x,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=v,t.inflate_flush(_,y);case 4:for(g=c;E>=g,E-=g,e=5;case 5:for(k=v-d;k<0;)k+=t.end;for(;0!==a;){if(0===A&&(v==t.end&&0!==t.read&&(v=0,A=v7&&(E-=8,x++,R--),t.write=v,y=t.inflate_flush(_,y),v=t.write,A=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let p,w,_,y,g,b,m,x;for(y=t.next_in_index,g=t.avail_in,w=n.bitb,_=n.bitk,b=n.write,m=b>>1){case 0:w>>>=3,_-=3,p=7&_,w>>>=p,_-=p,r=1;break;case 1:v=[],A=[],k=[[]],U=[[]],$.inflate_trees_fixed(v,A,k,U),d.init(v[0],A[0],k[0],0,U[0],0),w>>>=3,_-=3,r=6;break;case 2:w>>>=3,_-=3,r=3;break;case 3:return w>>>=3,_-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e)}break;case 1:for(;_<32;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}if((~w>>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);a=65535&w,w=_=0,r=0!==a?2:0!==h?7:0;break;case 2:if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(0===m&&(b==n.end&&0!==n.read&&(b=0,m=bg&&(p=g),p>m&&(p=m),n.window.set(t.read_buf(y,p),b),y+=p,g-=p,b+=p,m-=p,0!=(a-=p))break;r=0!==h?7:0;break;case 3:for(;_<14;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}if(s=p=16383&w,(31&p)>29||(p>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(p=258+(31&p)+(p>>5&31),!i||i.length>>=14,_-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;_<3;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}i[et[o++]]=7&w,w>>>=3,_-=3}for(;o<19;)i[et[o++]]=0;if(l[0]=7,p=f.inflate_trees_bits(i,l,c,u,t),0!=p)return-3==(e=p)&&(i=null,r=9),n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);o=0,r=5;case 5:for(;p=s,!(o>=258+(31&p)+(p>>5&31));){let a,d;for(p=l[0];_>>=p,_-=p,i[o++]=d;else{for(x=18==d?7:d-14,a=18==d?11:3;_>>=p,_-=p,a+=w&q[x],w>>>=x,_-=x,x=o,p=s,x+a>258+(31&p)+(p>>5&31)||16==d&&x<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);d=16==d?i[x-1]:0;do{i[x++]=d}while(0!=--a);o=x}}if(c[0]=-1,E=[],R=[],D=[],z=[],E[0]=9,R[0]=6,p=s,p=f.inflate_trees_dynamic(257+(31&p),1+(p>>5&31),i,E,R,D,z,u,t),0!=p)return-3==p&&(i=null,r=9),e=p,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);d.init(E[0],R[0],u,D[0],u,z[0]),r=6;case 6:if(n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),y=t.next_in_index,g=t.avail_in,w=n.bitb,_=n.bitk,b=n.write,m=b15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new nt(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(d),a.forEach((function(t){o.set(t,c),c+=t.length})),o}},this.flush=function(){t.inflateEnd()}}at.prototype={inflateInit:function(t){const e=this;return e.istate=new rt,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=Z,self.Inflate=st}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));r({workerScripts:{inflate:[e],deflate:[e]}})}})(),t.BlobReader=x,t.BlobWriter=v,t.Data64URIReader=b,t.Data64URIWriter=m,t.ERR_ABORT=Ht,t.ERR_BAD_FORMAT=Yt,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=$t,t.ERR_DUPLICATED_NAME=ge,t.ERR_ENCRYPTED=ne,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Qt,t.ERR_EOCDR_NOT_FOUND=Xt,t.ERR_EOCDR_ZIP64_NOT_FOUND=Jt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=ee,t.ERR_HTTP_RANGE=o,t.ERR_INVALID_COMMENT=be,t.ERR_INVALID_DATE=Ae,t.ERR_INVALID_ENCRYPTION_STRENGTH=ke,t.ERR_INVALID_ENTRY_COMMENT=me,t.ERR_INVALID_ENTRY_NAME=xe,t.ERR_INVALID_EXTRAFIELD_DATA=Ee,t.ERR_INVALID_EXTRAFIELD_TYPE=Ue,t.ERR_INVALID_PASSWORD=$,t.ERR_INVALID_SIGNATURE=Ft,t.ERR_INVALID_VERSION=ve,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=te,t.ERR_UNSUPPORTED_COMPRESSION=re,t.ERR_UNSUPPORTED_ENCRYPTION=ie,t.HttpRangeReader=class extends z{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=z,t.Reader=w,t.TextReader=y,t.TextWriter=g,t.Uint8ArrayReader=I,t.Uint8ArrayWriter=F,t.Writer=_,t.ZipReader=oe,t.ZipWriter=De,t.configure=r,t.fs=Oe,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={},n)=>({Deflate:a(t.Deflate,e.deflate,n),Inflate:a(t.Inflate,e.inflate,n)}),Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/zip-full.js b/dist/zip-full.js index b3fa9eb3..48656d56 100644 --- a/dist/zip-full.js +++ b/dist/zip-full.js @@ -34,7 +34,7 @@ // Global - const MAX_BITS = 15; + const MAX_BITS$1 = 15; const D_CODES = 30; const BL_CODES = 19; @@ -71,17 +71,17 @@ const Z_HUFFMAN_ONLY = 2; const Z_DEFAULT_STRATEGY = 0; - const Z_NO_FLUSH = 0; + const Z_NO_FLUSH$1 = 0; const Z_PARTIAL_FLUSH = 1; const Z_FULL_FLUSH = 3; - const Z_FINISH = 4; + const Z_FINISH$1 = 4; - const Z_OK = 0; - const Z_STREAM_END = 1; - const Z_NEED_DICT = 2; - const Z_STREAM_ERROR = -2; - const Z_DATA_ERROR = -3; - const Z_BUF_ERROR = -5; + const Z_OK$1 = 0; + const Z_STREAM_END$1 = 1; + const Z_NEED_DICT$1 = 2; + const Z_STREAM_ERROR$1 = -2; + const Z_DATA_ERROR$1 = -3; + const Z_BUF_ERROR$1 = -5; // Tree @@ -124,7 +124,7 @@ let f; // frequency let overflow = 0; // number of elements with bit length too large - for (bits = 0; bits <= MAX_BITS; bits++) + for (bits = 0; bits <= MAX_BITS$1; bits++) s.bl_count[bits] = 0; // In a first pass, compute the optimal bit lengths (which may @@ -220,7 +220,7 @@ // The distribution counts are first used to generate the code values // without bit reversal. - for (bits = 1; bits <= MAX_BITS; bits++) { + for (bits = 1; bits <= MAX_BITS$1; bits++) { next_code[bits] = code = ((code + bl_count[bits - 1]) << 1); } @@ -384,9 +384,9 @@ StaticTree.static_dtree = [0, 5, 16, 5, 8, 5, 24, 5, 4, 5, 20, 5, 12, 5, 28, 5, 2, 5, 18, 5, 10, 5, 26, 5, 6, 5, 22, 5, 14, 5, 30, 5, 1, 5, 17, 5, 9, 5, 25, 5, 5, 5, 21, 5, 13, 5, 29, 5, 3, 5, 19, 5, 11, 5, 27, 5, 7, 5, 23, 5]; - StaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + StaticTree.static_l_desc = new StaticTree(StaticTree.static_ltree, Tree.extra_lbits, LITERALS + 1, L_CODES, MAX_BITS$1); - StaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS); + StaticTree.static_d_desc = new StaticTree(StaticTree.static_dtree, Tree.extra_dbits, 0, D_CODES, MAX_BITS$1); StaticTree.static_bl_desc = new StaticTree(null, Tree.extra_blbits, 0, BL_CODES, MAX_BL_BITS); @@ -404,11 +404,11 @@ that.func = func; } - const STORED = 0; + const STORED$1 = 0; const FAST = 1; const SLOW = 2; const config_table = [ - new Config(0, 0, 0, 0, STORED), + new Config(0, 0, 0, 0, STORED$1), new Config(4, 4, 8, 4, FAST), new Config(4, 5, 16, 8, FAST), new Config(4, 6, 32, 32, FAST), @@ -445,14 +445,14 @@ const FinishDone = 3; // preset dictionary flag in zlib header - const PRESET_DICT = 0x20; + const PRESET_DICT$1 = 0x20; const INIT_STATE = 42; const BUSY_STATE = 113; const FINISH_STATE = 666; // The deflate compression method - const Z_DEFLATED = 8; + const Z_DEFLATED$1 = 8; const STORED_BLOCK = 0; const STATIC_TREES = 1; @@ -468,7 +468,7 @@ return (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m])); } - function Deflate() { + function Deflate$1() { const that = this; let strm; // pointer back to this zlib stream @@ -1245,7 +1245,7 @@ // Fill the window as much as possible: if (lookahead <= 1) { fill_window(); - if (lookahead === 0 && flush == Z_NO_FLUSH) + if (lookahead === 0 && flush == Z_NO_FLUSH$1) return NeedMore; if (lookahead === 0) break; // flush the current block @@ -1276,11 +1276,11 @@ } } - flush_block_only(flush == Z_FINISH); + flush_block_only(flush == Z_FINISH$1); if (strm.avail_out === 0) - return (flush == Z_FINISH) ? FinishStarted : NeedMore; + return (flush == Z_FINISH$1) ? FinishStarted : NeedMore; - return flush == Z_FINISH ? FinishDone : BlockDone; + return flush == Z_FINISH$1 ? FinishDone : BlockDone; } function longest_match(cur_match) { @@ -1378,7 +1378,7 @@ // string following the next match. if (lookahead < MIN_LOOKAHEAD) { fill_window(); - if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) { return NeedMore; } if (lookahead === 0) @@ -1457,14 +1457,14 @@ } } - flush_block_only(flush == Z_FINISH); + flush_block_only(flush == Z_FINISH$1); if (strm.avail_out === 0) { - if (flush == Z_FINISH) + if (flush == Z_FINISH$1) return FinishStarted; else return NeedMore; } - return flush == Z_FINISH ? FinishDone : BlockDone; + return flush == Z_FINISH$1 ? FinishDone : BlockDone; } // Same as above, but achieves better compression. We use a lazy @@ -1486,7 +1486,7 @@ if (lookahead < MIN_LOOKAHEAD) { fill_window(); - if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + if (lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH$1) { return NeedMore; } if (lookahead === 0) @@ -1590,16 +1590,16 @@ bflush = _tr_tally(0, window[strstart - 1] & 0xff); match_available = 0; } - flush_block_only(flush == Z_FINISH); + flush_block_only(flush == Z_FINISH$1); if (strm.avail_out === 0) { - if (flush == Z_FINISH) + if (flush == Z_FINISH$1) return FinishStarted; else return NeedMore; } - return flush == Z_FINISH ? FinishDone : BlockDone; + return flush == Z_FINISH$1 ? FinishDone : BlockDone; } function deflateReset(strm) { @@ -1611,16 +1611,16 @@ status = BUSY_STATE; - last_flush = Z_NO_FLUSH; + last_flush = Z_NO_FLUSH$1; tr_init(); lm_init(); - return Z_OK; + return Z_OK$1; } that.deflateInit = function (strm, _level, bits, _method, memLevel, _strategy) { if (!_method) - _method = Z_DEFLATED; + _method = Z_DEFLATED$1; if (!memLevel) memLevel = DEF_MEM_LEVEL; if (!_strategy) @@ -1639,9 +1639,9 @@ if (_level == Z_DEFAULT_COMPRESSION) _level = 6; - if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0 + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || _method != Z_DEFLATED$1 || bits < 9 || bits > 15 || _level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; } strm.dstate = that; @@ -1678,7 +1678,7 @@ that.deflateEnd = function () { if (status != INIT_STATE && status != BUSY_STATE && status != FINISH_STATE) { - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; } // Deallocate in reverse order of allocations: that.pending_buf = null; @@ -1687,17 +1687,17 @@ window = null; // free that.dstate = null; - return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; + return status == BUSY_STATE ? Z_DATA_ERROR$1 : Z_OK$1; }; that.deflateParams = function (strm, _level, _strategy) { - let err = Z_OK; + let err = Z_OK$1; if (_level == Z_DEFAULT_COMPRESSION) { _level = 6; } if (_level < 0 || _level > 9 || _strategy < 0 || _strategy > Z_HUFFMAN_ONLY) { - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; } if (config_table[level].func != config_table[_level].func && strm.total_in !== 0) { @@ -1721,10 +1721,10 @@ let n, index = 0; if (!dictionary || status != INIT_STATE) - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; if (length < MIN_MATCH) - return Z_OK; + return Z_OK$1; if (length > w_size - MIN_LOOKAHEAD) { length = w_size - MIN_LOOKAHEAD; index = dictLength - length; // use the tail of the dictionary @@ -1746,23 +1746,23 @@ prev[n & w_mask] = head[ins_h]; head[ins_h] = n; } - return Z_OK; + return Z_OK$1; }; that.deflate = function (_strm, flush) { let i, header, level_flags, old_flush, bstate; - if (flush > Z_FINISH || flush < 0) { - return Z_STREAM_ERROR; + if (flush > Z_FINISH$1 || flush < 0) { + return Z_STREAM_ERROR$1; } - if (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH)) { - _strm.msg = z_errmsg[Z_NEED_DICT - (Z_STREAM_ERROR)]; - return Z_STREAM_ERROR; + if (!_strm.next_out || (!_strm.next_in && _strm.avail_in !== 0) || (status == FINISH_STATE && flush != Z_FINISH$1)) { + _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_STREAM_ERROR$1)]; + return Z_STREAM_ERROR$1; } if (_strm.avail_out === 0) { - _strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)]; - return Z_BUF_ERROR; + _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; + return Z_BUF_ERROR$1; } strm = _strm; // just in case @@ -1771,14 +1771,14 @@ // Write the zlib header if (status == INIT_STATE) { - header = (Z_DEFLATED + ((w_bits - 8) << 4)) << 8; + header = (Z_DEFLATED$1 + ((w_bits - 8) << 4)) << 8; level_flags = ((level - 1) & 0xff) >> 1; if (level_flags > 3) level_flags = 3; header |= (level_flags << 6); if (strstart !== 0) - header |= PRESET_DICT; + header |= PRESET_DICT$1; header += 31 - (header % 31); status = BUSY_STATE; @@ -1796,29 +1796,29 @@ // but this is not an error situation so make sure we // return OK instead of BUF_ERROR at next call of deflate: last_flush = -1; - return Z_OK; + return Z_OK$1; } // Make sure there is something to do and avoid duplicate // consecutive // flushes. For repeated and useless calls with Z_FINISH, we keep // returning Z_STREAM_END instead of Z_BUFF_ERROR. - } else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH) { - strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)]; - return Z_BUF_ERROR; + } else if (strm.avail_in === 0 && flush <= old_flush && flush != Z_FINISH$1) { + strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; + return Z_BUF_ERROR$1; } // User must not provide more input after the first FINISH: if (status == FINISH_STATE && strm.avail_in !== 0) { - _strm.msg = z_errmsg[Z_NEED_DICT - (Z_BUF_ERROR)]; - return Z_BUF_ERROR; + _strm.msg = z_errmsg[Z_NEED_DICT$1 - (Z_BUF_ERROR$1)]; + return Z_BUF_ERROR$1; } // Start a new block or continue the current one. - if (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH && status != FINISH_STATE)) { + if (strm.avail_in !== 0 || lookahead !== 0 || (flush != Z_NO_FLUSH$1 && status != FINISH_STATE)) { bstate = -1; switch (config_table[level].func) { - case STORED: + case STORED$1: bstate = deflate_stored(flush); break; case FAST: @@ -1836,7 +1836,7 @@ if (strm.avail_out === 0) { last_flush = -1; // avoid BUF_ERROR next call, see above } - return Z_OK; + return Z_OK$1; // If flush != Z_NO_FLUSH && avail_out === 0, the next call // of deflate should use the same flush parameter to make sure // that the flush is complete. So we don't have to output an @@ -1862,20 +1862,20 @@ strm.flush_pending(); if (strm.avail_out === 0) { last_flush = -1; // avoid BUF_ERROR at next call, see above - return Z_OK; + return Z_OK$1; } } } - if (flush != Z_FINISH) - return Z_OK; - return Z_STREAM_END; + if (flush != Z_FINISH$1) + return Z_OK$1; + return Z_STREAM_END$1; }; } // ZStream - function ZStream() { + function ZStream$1() { const that = this; that.next_in_index = 0; that.next_out_index = 0; @@ -1889,19 +1889,19 @@ // that.dstate; } - ZStream.prototype = { + ZStream$1.prototype = { deflateInit: function (level, bits) { const that = this; - that.dstate = new Deflate(); + that.dstate = new Deflate$1(); if (!bits) - bits = MAX_BITS; + bits = MAX_BITS$1; return that.dstate.deflateInit(that, level, bits); }, deflate: function (flush) { const that = this; if (!that.dstate) { - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; } return that.dstate.deflate(that, flush); }, @@ -1909,7 +1909,7 @@ deflateEnd: function () { const that = this; if (!that.dstate) - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; const ret = that.dstate.deflateEnd(); that.dstate = null; return ret; @@ -1918,14 +1918,14 @@ deflateParams: function (level, strategy) { const that = this; if (!that.dstate) - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; return that.dstate.deflateParams(that, level, strategy); }, deflateSetDictionary: function (dictionary, dictLength) { const that = this; if (!that.dstate) - return Z_STREAM_ERROR; + return Z_STREAM_ERROR$1; return that.dstate.deflateSetDictionary(that, dictionary, dictLength); }, @@ -1986,9 +1986,9 @@ function ZipDeflate(options) { const that = this; - const z = new ZStream(); + const z = new ZStream$1(); const bufsize = 512; - const flush = Z_NO_FLUSH; + const flush = Z_NO_FLUSH$1; const buf = new Uint8Array(bufsize); let level = options ? options.level : Z_DEFAULT_COMPRESSION; if (typeof level == "undefined") @@ -2008,7 +2008,7 @@ z.next_out_index = 0; z.avail_out = bufsize; err = z.deflate(flush); - if (err != Z_OK) + if (err != Z_OK$1) throw new Error("deflating: " + z.msg); if (z.next_out_index) if (z.next_out_index == bufsize) @@ -2034,8 +2034,8 @@ do { z.next_out_index = 0; z.avail_out = bufsize; - err = z.deflate(Z_FINISH); - if (err != Z_STREAM_END && err != Z_OK) + err = z.deflate(Z_FINISH$1); + if (err != Z_STREAM_END$1 && err != Z_OK$1) throw new Error("deflating: " + z.msg); if (bufsize - z.avail_out > 0) buffers.push(new Uint8Array(buf.subarray(0, z.next_out_index))); @@ -2080,15 +2080,15 @@ */ // Global - const MAX_BITS$1 = 15; + const MAX_BITS = 15; - const Z_OK$1 = 0; - const Z_STREAM_END$1 = 1; - const Z_NEED_DICT$1 = 2; - const Z_STREAM_ERROR$1 = -2; - const Z_DATA_ERROR$1 = -3; + const Z_OK = 0; + const Z_STREAM_END = 1; + const Z_NEED_DICT = 2; + const Z_STREAM_ERROR = -2; + const Z_DATA_ERROR = -3; const Z_MEM_ERROR = -4; - const Z_BUF_ERROR$1 = -5; + const Z_BUF_ERROR = -5; const inflate_mask = [0x00000000, 0x00000001, 0x00000003, 0x00000007, 0x0000000f, 0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff, 0x000001ff, 0x000003ff, 0x000007ff, 0x00000fff, 0x00001fff, 0x00003fff, 0x00007fff, 0x0000ffff]; @@ -2096,8 +2096,8 @@ const MANY = 1440; // JZlib version : "1.0.2" - const Z_NO_FLUSH$1 = 0; - const Z_FINISH$1 = 4; + const Z_NO_FLUSH = 0; + const Z_FINISH = 4; // InfTree const fixed_bl = 9; @@ -2222,7 +2222,7 @@ if (c[0] == n) { // null input--all zero length codes t[0] = -1; m[0] = 0; - return Z_OK$1; + return Z_OK; } // Find minimum and maximum length, bound *m by those @@ -2247,11 +2247,11 @@ // Adjust last length count to fill out codes, if needed for (y = 1 << j; j < i; j++, y <<= 1) { if ((y -= c[j]) < 0) { - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; } } if ((y -= c[i]) < 0) { - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; } c[i] += y; @@ -2314,7 +2314,7 @@ // allocate new table if (hn[0] + z > MANY) { // (note: doesn't matter for fixed) - return Z_DATA_ERROR$1; // overflow of MANY + return Z_DATA_ERROR; // overflow of MANY } u[h] = q = /* hp+ */hn[0]; // DEBUG hn[0] += z; @@ -2371,7 +2371,7 @@ } } // Return Z_BUF_ERROR if we were given an incomplete table - return y !== 0 && g != 1 ? Z_BUF_ERROR$1 : Z_OK$1; + return y !== 0 && g != 1 ? Z_BUF_ERROR : Z_OK; } function initWorkArea(vsize) { @@ -2413,11 +2413,11 @@ hn[0] = 0; result = huft_build(c, 0, 19, 19, null, null, tb, bb, hp, hn, v); - if (result == Z_DATA_ERROR$1) { + if (result == Z_DATA_ERROR) { z.msg = "oversubscribed dynamic bit lengths tree"; - } else if (result == Z_BUF_ERROR$1 || bb[0] === 0) { + } else if (result == Z_BUF_ERROR || bb[0] === 0) { z.msg = "incomplete dynamic bit lengths tree"; - result = Z_DATA_ERROR$1; + result = Z_DATA_ERROR; } return result; }; @@ -2438,12 +2438,12 @@ initWorkArea(288); hn[0] = 0; result = huft_build(c, 0, nl, 257, cplens, cplext, tl, bl, hp, hn, v); - if (result != Z_OK$1 || bl[0] === 0) { - if (result == Z_DATA_ERROR$1) { + if (result != Z_OK || bl[0] === 0) { + if (result == Z_DATA_ERROR) { z.msg = "oversubscribed literal/length tree"; } else if (result != Z_MEM_ERROR) { z.msg = "incomplete literal/length tree"; - result = Z_DATA_ERROR$1; + result = Z_DATA_ERROR; } return result; } @@ -2452,20 +2452,20 @@ initWorkArea(288); result = huft_build(c, nl, nd, 0, cpdist, cpdext, td, bd, hp, hn, v); - if (result != Z_OK$1 || (bd[0] === 0 && nl > 257)) { - if (result == Z_DATA_ERROR$1) { + if (result != Z_OK || (bd[0] === 0 && nl > 257)) { + if (result == Z_DATA_ERROR) { z.msg = "oversubscribed distance tree"; - } else if (result == Z_BUF_ERROR$1) { + } else if (result == Z_BUF_ERROR) { z.msg = "incomplete distance tree"; - result = Z_DATA_ERROR$1; + result = Z_DATA_ERROR; } else if (result != Z_MEM_ERROR) { z.msg = "empty distance tree with lengths"; - result = Z_DATA_ERROR$1; + result = Z_DATA_ERROR; } return result; } - return Z_OK$1; + return Z_OK; }; } @@ -2479,7 +2479,7 @@ bd[0] = fixed_bd; tl[0] = fixed_tl; td[0] = fixed_td; - return Z_OK$1; + return Z_OK; }; // InfCodes @@ -2702,7 +2702,7 @@ z.next_in_index = p; s.write = q; - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; } // eslint-disable-next-line no-constant-condition } while (true); @@ -2737,7 +2737,7 @@ z.next_in_index = p; s.write = q; - return Z_STREAM_END$1; + return Z_STREAM_END; } else { z.msg = "invalid literal/length code"; @@ -2754,7 +2754,7 @@ z.next_in_index = p; s.write = q; - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; } // eslint-disable-next-line no-constant-condition } while (true); @@ -2774,7 +2774,7 @@ z.next_in_index = p; s.write = q; - return Z_OK$1; + return Z_OK; } that.init = function (bl, bd, tl, tl_index, td, td_index) { @@ -2831,8 +2831,8 @@ q = s.write; m = q < s.read ? s.read - q - 1 : s.end - q; - if (r != Z_OK$1) { - mode = r == Z_STREAM_END$1 ? WASH : BADCODE; + if (r != Z_OK) { + mode = r == Z_STREAM_END ? WASH : BADCODE; break; } } @@ -2847,7 +2847,7 @@ while (k < (j)) { if (n !== 0) - r = Z_OK$1; + r = Z_OK; else { s.bitb = b; @@ -2892,7 +2892,7 @@ } mode = BADCODE; // invalid code z.msg = "invalid literal/length code"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; s.bitb = b; s.bitk = k; @@ -2907,7 +2907,7 @@ while (k < (j)) { if (n !== 0) - r = Z_OK$1; + r = Z_OK; else { s.bitb = b; @@ -2938,7 +2938,7 @@ while (k < (j)) { if (n !== 0) - r = Z_OK$1; + r = Z_OK; else { s.bitb = b; @@ -2973,7 +2973,7 @@ } mode = BADCODE; // invalid code z.msg = "invalid distance code"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; s.bitb = b; s.bitk = k; @@ -2988,7 +2988,7 @@ while (k < (j)) { if (n !== 0) - r = Z_OK$1; + r = Z_OK; else { s.bitb = b; @@ -3082,7 +3082,7 @@ } } } - r = Z_OK$1; + r = Z_OK; s.window[q++] = /* (byte) */lit; m--; @@ -3113,7 +3113,7 @@ mode = END; /* falls through */ case END: - r = Z_STREAM_END$1; + r = Z_STREAM_END; s.bitb = b; s.bitk = k; z.avail_in = n; @@ -3124,7 +3124,7 @@ case BADCODE: // x: got error - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; s.bitb = b; s.bitk = k; @@ -3135,7 +3135,7 @@ return s.inflate_flush(z, r); default: - r = Z_STREAM_ERROR$1; + r = Z_STREAM_ERROR; s.bitb = b; s.bitk = k; @@ -3162,7 +3162,7 @@ const TYPE = 0; // get type bits (3, including end bit) const LENS = 1; // get lengths for stored - const STORED$1 = 2;// processing stored block + const STORED = 2;// processing stored block const TABLE = 3; // get table lengths const BTREE = 4; // get bit lengths tree for a dynamic // block @@ -3231,8 +3231,8 @@ n = /* (int) */((q <= that.write ? that.write : that.end) - q); if (n > z.avail_out) n = z.avail_out; - if (n !== 0 && r == Z_BUF_ERROR$1) - r = Z_OK$1; + if (n !== 0 && r == Z_BUF_ERROR) + r = Z_OK; // update counters z.avail_out -= n; @@ -3254,8 +3254,8 @@ n = that.write - q; if (n > z.avail_out) n = z.avail_out; - if (n !== 0 && r == Z_BUF_ERROR$1) - r = Z_OK$1; + if (n !== 0 && r == Z_BUF_ERROR) + r = Z_OK; // update counters z.avail_out -= n; @@ -3308,7 +3308,7 @@ while (k < (3)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3374,7 +3374,7 @@ // } mode = BADBLOCKS; z.msg = "invalid block type"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; that.bitb = b; that.bitk = k; @@ -3389,7 +3389,7 @@ while (k < (32)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3407,7 +3407,7 @@ if ((((~b) >>> 16) & 0xffff) != (b & 0xffff)) { mode = BADBLOCKS; z.msg = "invalid stored block lengths"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; that.bitb = b; that.bitk = k; @@ -3419,9 +3419,9 @@ } left = (b & 0xffff); b = k = 0; // dump bits - mode = left !== 0 ? STORED$1 : (last !== 0 ? DRY : TYPE); + mode = left !== 0 ? STORED : (last !== 0 ? DRY : TYPE); break; - case STORED$1: + case STORED: if (n === 0) { that.bitb = b; that.bitk = k; @@ -3457,7 +3457,7 @@ } } } - r = Z_OK$1; + r = Z_OK; t = left; if (t > n) @@ -3477,7 +3477,7 @@ while (k < (14)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3497,7 +3497,7 @@ if ((t & 0x1f) > 29 || ((t >> 5) & 0x1f) > 29) { mode = BADBLOCKS; z.msg = "too many length or distance symbols"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; that.bitb = b; that.bitk = k; @@ -3528,7 +3528,7 @@ while (index < 4 + (table >>> 10)) { while (k < (3)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3557,9 +3557,9 @@ bb[0] = 7; t = inftree.inflate_trees_bits(blens, bb, tb, hufts, z); - if (t != Z_OK$1) { + if (t != Z_OK) { r = t; - if (r == Z_DATA_ERROR$1) { + if (r == Z_DATA_ERROR) { blens = null; mode = BADBLOCKS; } @@ -3590,7 +3590,7 @@ while (k < (t)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3622,7 +3622,7 @@ while (k < (t + i)) { if (n !== 0) { - r = Z_OK$1; + r = Z_OK; } else { that.bitb = b; that.bitk = k; @@ -3651,7 +3651,7 @@ blens = null; mode = BADBLOCKS; z.msg = "invalid bit length repeat"; - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; that.bitb = b; that.bitk = k; @@ -3682,8 +3682,8 @@ t = table; t = inftree.inflate_trees_dynamic(257 + (t & 0x1f), 1 + ((t >> 5) & 0x1f), blens, bl_, bd_, tl_, td_, hufts, z); - if (t != Z_OK$1) { - if (t == Z_DATA_ERROR$1) { + if (t != Z_OK) { + if (t == Z_DATA_ERROR) { blens = null; mode = BADBLOCKS; } @@ -3709,10 +3709,10 @@ z.next_in_index = p; that.write = q; - if ((r = codes.proc(that, z, r)) != Z_STREAM_END$1) { + if ((r = codes.proc(that, z, r)) != Z_STREAM_END) { return that.inflate_flush(z, r); } - r = Z_OK$1; + r = Z_OK; codes.free(z); p = z.next_in_index; @@ -3745,7 +3745,7 @@ mode = DONELOCKS; /* falls through */ case DONELOCKS: - r = Z_STREAM_END$1; + r = Z_STREAM_END; that.bitb = b; that.bitk = k; @@ -3755,7 +3755,7 @@ that.write = q; return that.inflate_flush(z, r); case BADBLOCKS: - r = Z_DATA_ERROR$1; + r = Z_DATA_ERROR; that.bitb = b; that.bitk = k; @@ -3766,7 +3766,7 @@ return that.inflate_flush(z, r); default: - r = Z_STREAM_ERROR$1; + r = Z_STREAM_ERROR; that.bitb = b; that.bitk = k; @@ -3802,9 +3802,9 @@ // Inflate // preset dictionary flag in zlib header - const PRESET_DICT$1 = 0x20; + const PRESET_DICT = 0x20; - const Z_DEFLATED$1 = 8; + const Z_DEFLATED = 8; const METHOD = 0; // waiting for method byte const FLAG = 1; // waiting for flag byte @@ -3819,7 +3819,7 @@ const mark = [0, 0, 0xff, 0xff]; - function Inflate() { + function Inflate$1() { const that = this; that.mode = 0; // current inflate mode @@ -3841,13 +3841,13 @@ function inflateReset(z) { if (!z || !z.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; z.total_in = z.total_out = 0; z.msg = null; z.istate.mode = BLOCKS; z.istate.blocks.reset(z, null); - return Z_OK$1; + return Z_OK; } that.inflateEnd = function (z) { @@ -3855,7 +3855,7 @@ that.blocks.free(z); that.blocks = null; // ZFREE(z, z->state); - return Z_OK$1; + return Z_OK; }; that.inflateInit = function (z, w) { @@ -3865,7 +3865,7 @@ // set window size if (w < 8 || w > 15) { that.inflateEnd(z); - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; } that.wbits = w; @@ -3873,7 +3873,7 @@ // reset state inflateReset(z); - return Z_OK$1; + return Z_OK; }; that.inflate = function (z, f) { @@ -3881,10 +3881,10 @@ let b; if (!z || !z.istate || !z.next_in) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; const istate = z.istate; - f = f == Z_FINISH$1 ? Z_BUF_ERROR$1 : Z_OK$1; - r = Z_BUF_ERROR$1; + f = f == Z_FINISH ? Z_BUF_ERROR : Z_OK; + r = Z_BUF_ERROR; // eslint-disable-next-line no-constant-condition while (true) { switch (istate.mode) { @@ -3896,7 +3896,7 @@ z.avail_in--; z.total_in++; - if (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED$1) { + if (((istate.method = z.read_byte(z.next_in_index++)) & 0xf) != Z_DEFLATED) { istate.mode = BAD; z.msg = "unknown compression method"; istate.marker = 5; // can't try inflateSync @@ -3927,7 +3927,7 @@ break; } - if ((b & PRESET_DICT$1) === 0) { + if ((b & PRESET_DICT) === 0) { istate.mode = BLOCKS; break; } @@ -3976,24 +3976,24 @@ z.total_in++; istate.need += (z.read_byte(z.next_in_index++) & 0xff); istate.mode = DICT0; - return Z_NEED_DICT$1; + return Z_NEED_DICT; case DICT0: istate.mode = BAD; z.msg = "need dictionary"; istate.marker = 0; // can try inflateSync - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; case BLOCKS: r = istate.blocks.proc(z, r); - if (r == Z_DATA_ERROR$1) { + if (r == Z_DATA_ERROR) { istate.mode = BAD; istate.marker = 0; // can try inflateSync break; } - if (r == Z_OK$1) { + if (r == Z_OK) { r = f; } - if (r != Z_STREAM_END$1) { + if (r != Z_STREAM_END) { return r; } r = f; @@ -4001,11 +4001,11 @@ istate.mode = DONE; /* falls through */ case DONE: - return Z_STREAM_END$1; + return Z_STREAM_END; case BAD: - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; default: - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; } } }; @@ -4013,7 +4013,7 @@ that.inflateSetDictionary = function (z, dictionary, dictLength) { let index = 0, length = dictLength; if (!z || !z.istate || z.istate.mode != DICT0) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; const istate = z.istate; if (length >= (1 << istate.wbits)) { length = (1 << istate.wbits) - 1; @@ -4021,7 +4021,7 @@ } istate.blocks.set_dictionary(dictionary, index, length); istate.mode = BLOCKS; - return Z_OK$1; + return Z_OK; }; that.inflateSync = function (z) { @@ -4032,14 +4032,14 @@ // set up if (!z || !z.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; const istate = z.istate; if (istate.mode != BAD) { istate.mode = BAD; istate.marker = 0; } if ((n = z.avail_in) === 0) - return Z_BUF_ERROR$1; + return Z_BUF_ERROR; p = z.next_in_index; m = istate.marker; @@ -4064,7 +4064,7 @@ // return no joy or set up to restart on a new block if (m != 4) { - return Z_DATA_ERROR$1; + return Z_DATA_ERROR; } r = z.total_in; w = z.total_out; @@ -4072,7 +4072,7 @@ z.total_in = r; z.total_out = w; istate.mode = BLOCKS; - return Z_OK$1; + return Z_OK; }; // Returns true if inflate is currently at the end of a block generated @@ -4084,36 +4084,36 @@ // waiting for these length bytes. that.inflateSyncPoint = function (z) { if (!z || !z.istate || !z.istate.blocks) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; return z.istate.blocks.sync_point(); }; } // ZStream - function ZStream$1() { + function ZStream() { } - ZStream$1.prototype = { + ZStream.prototype = { inflateInit: function (bits) { const that = this; - that.istate = new Inflate(); + that.istate = new Inflate$1(); if (!bits) - bits = MAX_BITS$1; + bits = MAX_BITS; return that.istate.inflateInit(that, bits); }, inflate: function (f) { const that = this; if (!that.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; return that.istate.inflate(that, f); }, inflateEnd: function () { const that = this; if (!that.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; const ret = that.istate.inflateEnd(that); that.istate = null; return ret; @@ -4122,13 +4122,13 @@ inflateSync: function () { const that = this; if (!that.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; return that.istate.inflateSync(that); }, inflateSetDictionary: function (dictionary, dictLength) { const that = this; if (!that.istate) - return Z_STREAM_ERROR$1; + return Z_STREAM_ERROR; return that.istate.inflateSetDictionary(that, dictionary, dictLength); }, read_byte: function (start) { @@ -4145,9 +4145,9 @@ function ZipInflate() { const that = this; - const z = new ZStream$1(); + const z = new ZStream(); const bufsize = 512; - const flush = Z_NO_FLUSH$1; + const flush = Z_NO_FLUSH; const buf = new Uint8Array(bufsize); let nomoreinput = false; @@ -4170,12 +4170,12 @@ nomoreinput = true; } err = z.inflate(flush); - if (nomoreinput && (err === Z_BUF_ERROR$1)) { + if (nomoreinput && (err === Z_BUF_ERROR)) { if (z.avail_in !== 0) throw new Error("inflating: bad input"); - } else if (err !== Z_OK$1 && err !== Z_STREAM_END$1) + } else if (err !== Z_OK && err !== Z_STREAM_END) throw new Error("inflating: " + z.msg); - if ((nomoreinput || err === Z_STREAM_END$1) && (z.avail_in === data.length)) + if ((nomoreinput || err === Z_STREAM_END) && (z.avail_in === data.length)) throw new Error("inflating: bad input"); if (z.next_out_index) if (z.next_out_index === bufsize) @@ -4279,7 +4279,7 @@ } } - var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n;}class e{constructor(t){this.crc=t||-1;}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n;}get(){return ~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},a={name:"AES-CTR"},r=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},a),d=["deriveBits"],_=["sign"],u=[8,12,16],f=[16,24,32],c=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=y(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await p(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2);}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=y(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);r=new Uint8Array(t);}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=a[t]&&(s=!1);}return {valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=y(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await p(t,e,n,["encrypt"]),y(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=y(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=y(this.output,t);}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return {data:y(t,n),signature:n}}}async function p(t,e,n,i){t.counter=new Uint8Array(c);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,r,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),b=new Uint8Array(w);t.keys={key:await h.importKey("raw",b.subarray(0,f[t.strength]),a,!0,i),authentication:await h.importKey("raw",b.subarray(f[t.strength],2*f[t.strength]),o,!1,_),passwordVerification:b.subarray(2*f[t.strength])};}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0;}}function y(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t);}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return k(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function E(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function C(t){return 4294967295&t}class z{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new b(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const M={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),V=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new z(t,e):void 0}(n,e);},append:async t=>({data:await V.append(t.data)}),flush:()=>V.flush()};let V;function O(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=M[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data]);}catch(e){postMessage(t);}else postMessage(t);}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}});}}));const D=[0,1,2,3].concat(...O([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function K(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1;}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1);}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],_=n[2*n[2*l+1]+1]+1,_>s&&(_=s,c++),n[2*l+1]=_,l>t.max_code||(e.bl_count[_]++,u=0,l>=r&&(u=a[l-r]),f=n[2*l],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(l=e.bl_count[_];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),l--);}}(n),function(t,n,i){const a=[];let r,s,o,l=0;for(r=1;r<=15;r++)a[r]=l=l+i[r-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(a[o]++,o));}(i,t.max_code,n.bl_count);};}function R(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a;}function T(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a;}K._length_code=[0,1,2,3,4,5,6,7].concat(...O([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),K.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],K.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],K.d_code=function(t){return t<256?D[t]:D[256+(t>>>7)]},K.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],K.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],K.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],R.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],R.static_l_desc=new R(R.static_ltree,K.extra_lbits,257,286,15),R.static_d_desc=new R(R.static_dtree,K.extra_dbits,0,30,15),R.static_bl_desc=new R(null,K.extra_blbits,0,19,7);const B=[new T(0,0,0,0,0),new T(4,4,8,4,1),new T(4,5,16,8,1),new T(4,6,32,32,1),new T(4,4,16,16,2),new T(8,16,32,32,2),new T(8,16,128,128,2),new T(8,32,128,256,2),new T(32,128,258,1024,2),new T(32,258,258,4096,2)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function P(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255);}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8);}function at(e,n){let i,a,r;if(t.pending_buf[F+2*H]=e>>>8&255,t.pending_buf[F+2*H+1]=255&e,t.pending_buf[q+H]=255&n,H++,0===e?j[2*n]++:(G++,e--,j[2*(K._length_code[n]+256+1)]++,M[2*K.d_code(e)]++),0==(8191&H)&&E>2){for(i=8*H,a=m-p,r=0;r<30;r++)i+=M[2*r]*(5+K.extra_dbits[r]);if(i>>>=3,G8?$(N):Q>0&&Z(255&N),N=0,Q=0;}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function lt(e,n,i){let a,r,s=0;E>0?(O.build_tree(t),D.build_tree(t),s=function(){let e;for(Y(j,O.max_code),Y(M,D.max_code),T.build_tree(t),e=18;e>=3&&0===V[2*K.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?ot(e,n,i):r==a?(tt(2+(i?1:0),3),rt(R.static_ltree,R.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?p:-1,m-p,t),p=m,e.flush_pending();}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){l.set(l.subarray(r,r+r),0),v-=r,m-=r,p-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(l,m+k,a),k+=t,k>=3&&(f=255&l[m],f=(f<r-262?m-(r-262):0;let u=z;const f=o,c=m+258;let h=l[a+s-1],w=l[a+s];A>=C&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&l[e+s-1]==h&&l[e]==l[a]&&l[++e]==l[a+1]){a+=2,e++;do{}while(l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&as){if(v=t,s=n,n>=u)break;h=l[a+s-1],w=l[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,O.dyn_tree=j,O.stat_desc=R.static_l_desc,D.dyn_tree=M,D.stat_desc=R.static_d_desc,T.dyn_tree=V,T.stat_desc=R.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||a<9||a>15||n<0||n>9||p<0||p>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(B[E].func!=B[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=B[E].max_lazy,C=B[E].good_length,z=B[E].nice_length,U=B[E].max_chain),S=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,p=s,f=255&l[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=L[4],-2;if(0===d.avail_out)return d.msg=L[7],-5;var V;if(e=d,j=a,a=h,42==n&&(C=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),C|=z<<6,0!==m&&(C|=32),C+=31-C%31,n=113,Z((V=C)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return d.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,B[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=p+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-p>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,l),l+=t.length;})),s}},this.flush=function(){let t,a,r=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length;})),a};}W.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new q,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return -2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0));}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],G=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],J=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],N=[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],Q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],X=[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],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Z(){let t,e,n,i,a,r;function s(t,e,s,o,l,d,_,u,f,c,h){let w,b,p,x,y,g,m,v,k,A,U,I,E,S,C;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,S=1<I+v;){if(x++,I+=v,C=p-I,C=C>v?v:C,(b=1<<(g=m-I))>w+1&&(b-=w+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=C,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function $(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,d=0,_=0,u=0,f=0,c=0,h=0;function w(t,e,n,i,a,r,s,o){let l,d,_,u,f,c,h,w,b,p,x,y,g,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,c=s.bitk,b=s.write,p=b>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)w--,f|=(255&o.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,p-=g,b>=m)v=b-m,b-v>0&&2>b-v?(s.window[b++]=s.window[v++],s.window[b++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),b),b+=2,v+=2,g-=2);else {v=b-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,b-v>0&&u>b-v)do{s.window[b++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),b),b+=u,v+=u,u=0;v=0;}}if(b-v>0&&g>b-v)do{s.window[b++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),b),b+=g,v+=g,g=0;break}if(0!=(64&u))return o.msg="invalid distance code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3;l+=d[k+2],l+=f&F[u],k=3*(_+l),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,1):(o.msg="invalid literal/length code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3);if(l+=d[k+2],l+=f&F[u],k=3*(_+l),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;break}}else f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;}while(p>=258&&w>=10);return g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,0}t.init=function(t,r,s,o,l,d){e=0,u=t,f=r,i=s,c=o,a=l,h=d,n=null;},t.proc=function(t,b,p){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,p=w(u,f,i,c,a,h,t,b),E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){l=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,b.msg="invalid literal/length code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 2:for(x=d;I>=x,I-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}return e=9,b.msg="invalid distance code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,p=t.inflate_flush(b,p),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,w,b,p,x,y,g,m;for(p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y>>1){case 0:w>>>=3,b-=3,h=7&b,w>>>=h,b-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Z.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,b-=3,a=6;break;case 2:w>>>=3,b-=3,a=3;break;case 3:return w>>>=3,b-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;b<32;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>16&65535)!=(65535&w))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);r=65535&w,w=b=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(p,h),y),p+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;b<14;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,b-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;b<3;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>=3,b-=3;}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=c.inflate_trees_bits(i,l,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,_;for(h=l[0];b>>=h,b-=h,i[o++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;b>>=h,b-=h,r+=w&F[m],w>>>=m,b-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);o=m;}}if(d[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return -3;default:return -2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return -2;const r=t.istate;return a>=1<0&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(_),r.forEach((function(t){o.set(t,d),d+=t.length;})),o}},this.flush=function(){t.inflateEnd();};}at.prototype={inflateInit:function(t){const e=this;return e.istate=new it,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return -2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=rt;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; + var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n;}class e{constructor(t){this.crc=t||-1;}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n;}get(){return ~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],a=n.getPartial(i);return 32===a?t.concat(e):n._shiftRight(e,a,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(i),i=0;if(0===e)return a.concat(t);for(let n=0;n>>e),i=t[n]<<32-e;const r=t.length?t[t.length-1]:0,s=n.getPartial(r);return a.push(n.partial(e+s&31,e+s>32?i:a.pop(),1)),a}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let a;for(let n=0;n>>24,a<<=8;return i},toBits(t){const e=[];let i,a=0;for(i=0;i>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],r%a==0&&(t=t<<8^t>>>24^o<<24,o=o<<1^283*(o>>7))),s[r]=s[r-a]^t;}for(let t=0;r;t++,r--){const e=s[3&t?r:r-4];l[t]=r<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]];}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],a=[],r=[];let s,l,o,d;for(let t=0;t<256;t++)r[(a[t]=t<<1^283*(t>>7))^t]=t;for(let _=s=0;!n[_];_^=l||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[_]=r,i[r]=_,d=a[o=a[l=a[_]]];let u=16843009*d^65537*o^257*l^16843008*_,f=257*a[r]^16843008*r;for(let n=0;n<4;n++)t[n][_]=f=f<<24^f>>>8,e[n][r]=u=u<<24^u>>>8;}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0);}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,a=[0,0,0,0],r=this._tables[e],s=r[0],l=r[1],o=r[2],d=r[3],_=r[4];let u,f,c,h=t[0]^n[0],b=t[e?3:1]^n[1],p=t[2]^n[2],w=t[e?1:3]^n[3],x=4;for(let t=0;t>>24]^l[b>>16&255]^o[p>>8&255]^d[255&w]^n[x],f=s[b>>>24]^l[p>>16&255]^o[w>>8&255]^d[255&h]^n[x+1],c=s[p>>>24]^l[w>>16&255]^o[h>>8&255]^d[255&b]^n[x+2],w=s[w>>>24]^l[h>>16&255]^o[b>>8&255]^d[255&p]^n[x+3],x+=4,h=u,b=f,p=c;for(let t=0;t<4;t++)a[e?3&-t:t]=_[h>>>24]<<24^_[b>>16&255]<<16^_[p>>8&255]<<8^_[255&w]^n[x++],u=h,h=b,b=p,p=w,w=u;return a}},r=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e;}reset(){this._iv=this._initIv;}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i;}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]));}calculate(t,e,i){let a;if(!(a=e.length))return [];const r=n.bitLength(e);for(let n=0;nt.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,I(this,t);}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return A(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,I(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function C(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function z(t){return 4294967295&t}class B{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class M{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new x(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const V={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),D=function(t,e){return e.codecType.startsWith("deflate")?new M(t,e):e.codecType.startsWith("inflate")?new B(t,e):void 0}(n,e);},append:async t=>({data:await D.append(t.data)}),flush:()=>D.flush()};let D;function K(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=V[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data]);}catch(e){postMessage(t);}else postMessage(t);}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}});}}));const P=[0,1,2,3].concat(...K([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function j(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1;}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,l,o,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);o=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=l,i[2*o]=i[2*s]+i[2*l],n.depth[o]=Math.max(n.depth[s],n.depth[l])+1,i[2*s+1]=i[2*l+1]=o,n.heap[1]=o++,n.pqdownheap(i,1);}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,o,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)o=e.heap[l],_=n[2*n[2*o+1]+1]+1,_>s&&(_=s,c++),n[2*o+1]=_,o>t.max_code||(e.bl_count[_]++,u=0,o>=r&&(u=a[o-r]),f=n[2*o],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*o+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(o=e.bl_count[_];0!==o;)d=e.heap[--l],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),o--);}}(n),function(t,n,i){const a=[];let r,s,l,o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(s=0;s<=n;s++)l=t[2*s+1],0!==l&&(t[2*s]=e(a[l]++,l));}(i,t.max_code,n.bl_count);};}function L(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a;}function R(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a;}j._length_code=[0,1,2,3,4,5,6,7].concat(...K([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),j.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],j.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],j.d_code=function(t){return t<256?P[t]:P[256+(t>>>7)]},j.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],j.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],j.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],L.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],L.static_l_desc=new L(L.static_ltree,j.extra_lbits,257,286,15),L.static_d_desc=new L(L.static_dtree,j.extra_dbits,0,30,15),L.static_bl_desc=new L(null,j.extra_blbits,0,19,7);const W=[new R(0,0,0,0,0),new R(4,4,8,4,1),new R(4,5,16,8,1),new R(4,6,32,32,1),new R(4,4,16,16,2),new R(8,16,32,32,2),new R(8,16,128,128,2),new R(8,32,128,256,2),new R(32,128,258,1024,2),new R(32,258,258,4096,2)],G=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function O(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255);}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8);}function at(e,n){let i,a,r;if(t.pending_buf[H+2*q]=e>>>8&255,t.pending_buf[H+2*q+1]=255&e,t.pending_buf[R+q]=255&n,q++,0===e?B[2*n]++:(F++,e--,B[2*(j._length_code[n]+256+1)]++,M[2*j.d_code(e)]++),0==(8191&q)&&E>2){for(i=8*q,a=m-w,r=0;r<30;r++)i+=M[2*r]*(5+j.extra_dbits[r]);if(i>>>=3,F8?$(N):Q>0&&Z(255&N),N=0,Q=0;}function lt(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(o.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function ot(e,n,i){let a,r,s=0;E>0?(D.build_tree(t),K.build_tree(t),s=function(){let e;for(Y(B,D.max_code),Y(M,K.max_code),P.build_tree(t),e=18;e>=3&&0===V[2*j.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?lt(e,n,i):r==a?(tt(2+(i?1:0),3),rt(L.static_ltree,L.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?w:-1,m-w,t),w=m,e.flush_pending();}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){o.set(o.subarray(r,r+r),0),v-=r,m-=r,w-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(o,m+k,a),k+=t,k>=3&&(f=255&o[m],f=(f<r-262?m-(r-262):0;let u=z;const f=l,c=m+258;let h=o[a+s-1],b=o[a+s];A>=S&&(i>>=2),u>k&&(u=k);do{if(e=t,o[e+s]==b&&o[e+s-1]==h&&o[e]==o[a]&&o[++e]==o[a+1]){a+=2,e++;do{}while(o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&as){if(v=t,s=n,n>=u)break;h=o[a+s-1],b=o[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,D.dyn_tree=B,D.stat_desc=L.static_l_desc,K.dyn_tree=M,K.stat_desc=L.static_d_desc,P.dyn_tree=V,P.stat_desc=L.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||a<9||a>15||n<0||n>9||w<0||w>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(W[E].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=W[E].max_lazy,S=W[E].good_length,z=W[E].nice_length,U=W[E].max_chain),C=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),o.set(e.subarray(d,d+s),0),m=s,w=s,f=255&o[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=G[4],-2;if(0===d.avail_out)return d.msg=G[7],-5;var V;if(e=d,B=a,a=h,42==n&&(S=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),S|=z<<6,0!==m&&(S|=32),S+=31-S%31,n=113,Z((V=S)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=B&&4!=h)return e.msg=G[7],-5;if(666==n&&0!==e.avail_in)return d.msg=G[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,W[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=w+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-w>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,o),o+=t.length;})),s}},this.flush=function(){let t,a,r=0,s=0;const l=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&l.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),l.forEach((function(t){a.set(t,r),r+=t.length;})),a};}q.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new T,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return -2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0));}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],J=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],N=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Q=[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],X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Y=[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],Z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function $(){let t,e,n,i,a,r;function s(t,e,s,l,o,d,_,u,f,c,h){let b,p,w,x,y,g,m,v,k,A,U,I,E,C,S;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,C=1<I+v;){if(x++,I+=v,S=w-I,S=S>v?v:S,(p=1<<(g=m-I))>b+1&&(p-=b+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=S,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function tt(){const t=this;let e,n,i,a,r=0,s=0,l=0,o=0,d=0,_=0,u=0,f=0,c=0,h=0;function b(t,e,n,i,a,r,s,l){let o,d,_,u,f,c,h,b,p,w,x,y,g,m,v,k;h=l.next_in_index,b=l.avail_in,f=s.bitb,c=s.bitk,p=s.write,w=p>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)b--,f|=(255&l.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,w-=g,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,g-=2);else {v=p-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0;}}if(p-v>0&&g>p-v)do{s.window[p++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),p),p+=g,v+=g,g=0;break}if(0!=(64&u))return l.msg="invalid distance code",g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3;o+=d[k+2],o+=f&F[u],k=3*(_+o),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,1):(l.msg="invalid literal/length code",g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3);if(o+=d[k+2],o+=f&F[u],k=3*(_+o),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--;break}}else f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--;}while(w>=258&&b>=10);return g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,0}t.init=function(t,r,s,l,o,d){e=0,u=t,f=r,i=s,c=l,a=o,h=d,n=null;},t.proc=function(t,p,w){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,w=b(u,f,i,c,a,h,t,p),E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){o=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,p.msg="invalid literal/length code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 2:for(x=d;I>=x,I-=x,l=f,n=a,s=h,e=3;case 3:for(x=l;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}return e=9,p.msg="invalid distance code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,w=t.inflate_flush(p,w),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,p,w,x,y,g,m;for(w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y>>1){case 0:b>>>=3,p-=3,h=7&p,b>>>=h,p-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],$.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),b>>>=3,p-=3,a=6;break;case 2:b>>>=3,p-=3,a=3;break;case 3:return b>>>=3,p-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);r=65535&b,b=p=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(w,h),y),w+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;p<14;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,l=0,a=4;case 4:for(;l<4+(s>>>10);){for(;p<3;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<>>=3,p-=3;}for(;l<19;)i[et[l++]]=0;if(o[0]=7,h=c.inflate_trees_bits(i,o,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);l=0,a=5;case 5:for(;h=s,!(l>=258+(31&h)+(h>>5&31));){let r,_;for(h=o[0];p>>=h,p-=h,i[l++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;p>>=h,p-=h,r+=b&F[m],b>>>=m,p-=m,m=l,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);l=m;}}if(d[0]=-1,I=[],E=[],C=[],S=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,C,S,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,C[0],f,S[0]),a=6;case 6:if(n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new nt(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return -3;default:return -2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return -2;const r=t.istate;return a>=1<0&&t.next_in_index!=o&&(a(t.next_in_index),o=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(_),r.forEach((function(t){l.set(t,d),d+=t.length;})),l}},this.flush=function(){t.inflateEnd();};}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new at,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return -2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=st;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -5682,7 +5682,7 @@ } async function createDecryptionKeys(decrypt, preambuleArray, password) { - await createKeys(decrypt, password, preambuleArray.subarray(0, SALT_LENGTH[decrypt.strength])); + await createKeys$1(decrypt, password, preambuleArray.subarray(0, SALT_LENGTH[decrypt.strength])); const passwordVerification = preambuleArray.subarray(SALT_LENGTH[decrypt.strength]); const passwordVerificationKey = decrypt.keys.passwordVerification; if (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) { @@ -5692,11 +5692,11 @@ async function createEncryptionKeys(encrypt, password) { const salt = crypto.getRandomValues(new Uint8Array(SALT_LENGTH[encrypt.strength])); - await createKeys(encrypt, password, salt); + await createKeys$1(encrypt, password, salt); return concat(salt, encrypt.keys.passwordVerification); } - async function createKeys(target, password, salt) { + async function createKeys$1(target, password, salt) { const encodedPassword = (new TextEncoder()).encode(password); const basekey = await subtle.importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE); const derivedBits = await subtle.deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), basekey, 8 * ((KEY_LENGTH[target.strength] * 2) + 2)); @@ -5762,7 +5762,7 @@ constructor(password, passwordVerification) { this.password = password; this.passwordVerification = passwordVerification; - createKeys$1(this, password); + createKeys(this, password); } async append(input) { @@ -5790,7 +5790,7 @@ constructor(password, passwordVerification) { this.passwordVerification = passwordVerification; this.password = password; - createKeys$1(this, password); + createKeys(this, password); } async append(input) { @@ -5836,7 +5836,7 @@ return output; } - function createKeys$1(target, password) { + function createKeys(target, password) { target.keys = [0x12345678, 0x23456789, 0x34567890]; target.crcKey0 = new Crc32(target.keys[0]); target.crcKey2 = new Crc32(target.keys[2]); @@ -5899,7 +5899,7 @@ const CODEC_INFLATE = "inflate"; const ERR_INVALID_SIGNATURE = "Invalid signature"; - class Inflate$1 { + class Inflate { constructor(codecConstructor, options) { this.signature = options.signature; @@ -5954,7 +5954,7 @@ } } - class Deflate$1 { + class Deflate { constructor(codecConstructor, options) { this.encrypted = options.encrypted; @@ -6004,11 +6004,11 @@ } } - function createCodec(codecConstructor, options) { + function createCodec$1(codecConstructor, options) { if (options.codecType.startsWith(CODEC_DEFLATE)) { - return new Deflate$1(codecConstructor, options); + return new Deflate(codecConstructor, options); } else if (options.codecType.startsWith(CODEC_INFLATE)) { - return new Inflate$1(codecConstructor, options); + return new Inflate(codecConstructor, options); } } @@ -6062,7 +6062,7 @@ }; function createWorkerInterface(workerData) { - const interfaceCodec = createCodec(workerData.codecConstructor, workerData.options); + const interfaceCodec = createCodec$1(workerData.codecConstructor, workerData.options); return { async append(data) { try { @@ -6185,7 +6185,7 @@ let pool = []; let pendingRequests = []; - function createCodec$1(codecConstructor, options, config) { + function createCodec(codecConstructor, options, config) { const streamCopy = !options.compressed && !options.signed && !options.encrypted; const webWorker = !streamCopy && (options.useWebWorkers || (options.useWebWorkers === undefined && config.useWebWorkers)); const scripts = webWorker && config.workerScripts ? config.workerScripts[options.codecType] : []; @@ -6376,7 +6376,7 @@ fileEntry.directory = (getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK; fileEntry.offset = getUint32(directoryView, offset + 42) + prependedBytesLength; fileEntry.rawFilename = directoryArray.subarray(offset + 46, offset + 46 + fileEntry.filenameLength); - const filenameEncoding = getOptionValue(this, options, "filenameEncoding"); + const filenameEncoding = getOptionValue$1(this, options, "filenameEncoding"); fileEntry.filenameUTF8 = fileEntry.commentUTF8 = Boolean(fileEntry.bitFlag.languageEncodingFlag); fileEntry.filename = decodeString(fileEntry.rawFilename, fileEntry.filenameUTF8 ? CHARSET_UTF8 : filenameEncoding); if (!fileEntry.directory && fileEntry.filename.endsWith(DIRECTORY_SIGNATURE)) { @@ -6385,7 +6385,7 @@ fileEntry.rawExtraField = directoryArray.subarray(offset + 46 + fileEntry.filenameLength, offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength); fileEntry.rawComment = directoryArray.subarray(offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength, offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength + fileEntry.commentLength); - const commentEncoding = getOptionValue(this, options, "commentEncoding"); + const commentEncoding = getOptionValue$1(this, options, "commentEncoding"); fileEntry.comment = decodeString(fileEntry.rawComment, fileEntry.commentUTF8 ? CHARSET_UTF8 : commentEncoding); readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6); const entry = new Entry(fileEntry); @@ -6421,7 +6421,7 @@ const config = this.config; const bitFlag = this.bitFlag; const signature = this.signature; - let password = getOptionValue(this, options, "password"); + let password = getOptionValue$1(this, options, "password"); password = password && password.length && password; if (extraFieldAES) { if (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) { @@ -6448,22 +6448,22 @@ throw new Error(ERR_ENCRYPTED); } } - const codec = await createCodec$1(config.Inflate, { + const codec = await createCodec(config.Inflate, { codecType: CODEC_INFLATE, password, zipCrypto, encryptionStrength: extraFieldAES && extraFieldAES.strength, - signed: getOptionValue(this, options, "checkSignature"), + signed: getOptionValue$1(this, options, "checkSignature"), passwordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((this.rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)), signature, compressed: compressionMethod != 0, encrypted, - useWebWorkers: getOptionValue(this, options, "useWebWorkers") + useWebWorkers: getOptionValue$1(this, options, "useWebWorkers") }, config); if (!writer.initialized) { await writer.init(); } - await processData(codec, reader, writer, dataOffset, this.compressedSize, config, { onprogress: options.onprogress, signal: getOptionValue(this, options, "signal") }); + await processData(codec, reader, writer, dataOffset, this.compressedSize, config, { onprogress: options.onprogress, signal: getOptionValue$1(this, options, "signal") }); return writer.getData(); } } @@ -6584,7 +6584,7 @@ async function seekSignature(reader, signature, minimumBytes, maximumLength) { const signatureArray = new Uint8Array(4); const signatureView = new DataView(signatureArray.buffer); - setUint32(signatureView, 0, signature); + setUint32$1(signatureView, 0, signature); const maximumBytes = minimumBytes + maximumLength; return (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, reader.size)); @@ -6603,7 +6603,7 @@ } } - function getOptionValue(zipReader, options, name) { + function getOptionValue$1(zipReader, options, name) { return options[name] === undefined ? zipReader.options[name] : options[name]; } @@ -6640,7 +6640,7 @@ return Number(view.getBigUint64(offset, true)); } - function setUint32(view, offset, value) { + function setUint32$1(view, offset, value) { view.setUint32(offset, value, true); } @@ -6693,6 +6693,7 @@ this.config = getConfiguration(); this.files = new Map(); this.offset = writer.size; + this.maxOutputSize = 0; } async add(name = "", reader, options = {}) { @@ -6722,9 +6723,9 @@ if (lastModDate < MIN_DATE || lastModDate > MAX_DATE) { throw new Error(ERR_INVALID_DATE); } - const password = getOptionValue$1(this, options, "password"); - const encryptionStrength = getOptionValue$1(this, options, "encryptionStrength") || 3; - const zipCrypto = getOptionValue$1(this, options, "zipCrypto"); + const password = getOptionValue(this, options, "password"); + const encryptionStrength = getOptionValue(this, options, "encryptionStrength") || 3; + const zipCrypto = getOptionValue(this, options, "zipCrypto"); if (password !== undefined && encryptionStrength !== undefined && (encryptionStrength < 1 || encryptionStrength > 3)) { throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH); } @@ -6751,17 +6752,22 @@ offset += 4 + data.length; }); } - const outputSize = reader ? reader.size * 1.05 : 0; - const zip64 = options.zip64 || this.options.zip64 || this.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || this.offset + outputSize >= MAX_32_BITS; - const level = getOptionValue$1(this, options, "level"); - const useWebWorkers = getOptionValue$1(this, options, "useWebWorkers"); - const bufferedWrite = getOptionValue$1(this, options, "bufferedWrite"); - const keepOrder = getOptionValue$1(this, options, "keepOrder"); - let dataDescriptor = getOptionValue$1(this, options, "dataDescriptor"); - const signal = getOptionValue$1(this, options, "signal"); + const outputSize = reader ? Math.floor(reader.size * 1.05) : 0; + this.maxOutputSize += outputSize; + await Promise.resolve(); + const zip64 = options.zip64 || this.options.zip64 || this.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || this.offset + this.maxOutputSize >= MAX_32_BITS; + const level = getOptionValue(this, options, "level"); + const useWebWorkers = getOptionValue(this, options, "useWebWorkers"); + const bufferedWrite = getOptionValue(this, options, "bufferedWrite"); + let keepOrder = getOptionValue(this, options, "keepOrder"); + let dataDescriptor = getOptionValue(this, options, "dataDescriptor"); + const signal = getOptionValue(this, options, "signal"); if (dataDescriptor === undefined) { dataDescriptor = true; } + if (keepOrder === undefined) { + keepOrder = true; + } const fileEntry = await addFile(this, name, reader, Object.assign({}, options, { rawFilename, rawComment, @@ -6779,6 +6785,7 @@ dataDescriptor, signal })); + this.maxOutputSize -= outputSize; Object.assign(fileEntry, { name, comment, extraField }); return new Entry(fileEntry); } @@ -6813,7 +6820,7 @@ const rawExtraFieldZip64 = fileEntry.rawExtraFieldZip64; const rawExtraFieldAES = fileEntry.rawExtraFieldAES; const extraFieldLength = rawExtraFieldZip64.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length; - setUint32$1(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE); + setUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE); setUint16(directoryView, offset + 4, fileEntry.version); directoryArray.set(fileEntry.headerArray, offset + 6); setUint16(directoryView, offset + 30, extraFieldLength); @@ -6822,9 +6829,9 @@ setUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK); } if (fileEntry.zip64) { - setUint32$1(directoryView, offset + 42, MAX_32_BITS); + setUint32(directoryView, offset + 42, MAX_32_BITS); } else { - setUint32$1(directoryView, offset + 42, fileEntry.offset); + setUint32(directoryView, offset + 42, fileEntry.offset); } directoryArray.set(rawFilename, offset + 46); directoryArray.set(rawExtraFieldZip64, offset + 46 + rawFilename.length); @@ -6834,7 +6841,7 @@ offset += 46 + rawFilename.length + extraFieldLength + fileEntry.rawComment.length; } if (zip64) { - setUint32$1(directoryView, offset, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE); + setUint32(directoryView, offset, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE); setBigUint64(directoryView, offset + 4, BigInt(44)); setUint16(directoryView, offset + 12, 45); setUint16(directoryView, offset + 14, 45); @@ -6842,19 +6849,19 @@ setBigUint64(directoryView, offset + 32, BigInt(filesLength)); setBigUint64(directoryView, offset + 40, BigInt(directoryDataLength)); setBigUint64(directoryView, offset + 48, BigInt(directoryOffset)); - setUint32$1(directoryView, offset + 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE); + setUint32(directoryView, offset + 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE); setBigUint64(directoryView, offset + 64, BigInt(directoryOffset) + BigInt(directoryDataLength)); - setUint32$1(directoryView, offset + 72, ZIP64_TOTAL_NUMBER_OF_DISKS); + setUint32(directoryView, offset + 72, ZIP64_TOTAL_NUMBER_OF_DISKS); filesLength = MAX_16_BITS; directoryOffset = MAX_32_BITS; directoryDataLength = MAX_32_BITS; offset += 76; } - setUint32$1(directoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE); + setUint32(directoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE); setUint16(directoryView, offset + 8, filesLength); setUint16(directoryView, offset + 10, filesLength); - setUint32$1(directoryView, offset + 12, directoryDataLength); - setUint32$1(directoryView, offset + 16, directoryOffset); + setUint32(directoryView, offset + 12, directoryDataLength); + setUint32(directoryView, offset + 16, directoryOffset); await writer.writeUint8Array(directoryArray); if (comment.length) { await writer.writeUint8Array(comment); @@ -6906,14 +6913,14 @@ if (!options.dataDescriptor) { const arrayBufferView = new DataView(arrayBuffer); if (!fileEntry.encrypted || options.zipCrypto) { - setUint32$1(arrayBufferView, 14, fileEntry.signature); + setUint32(arrayBufferView, 14, fileEntry.signature); } if (fileEntry.zip64) { - setUint32$1(arrayBufferView, 18, MAX_32_BITS); - setUint32$1(arrayBufferView, 22, MAX_32_BITS); + setUint32(arrayBufferView, 18, MAX_32_BITS); + setUint32(arrayBufferView, 22, MAX_32_BITS); } else { - setUint32$1(arrayBufferView, 18, fileEntry.compressedSize); - setUint32$1(arrayBufferView, 22, fileEntry.uncompressedSize); + setUint32(arrayBufferView, 18, fileEntry.compressedSize); + setUint32(arrayBufferView, 22, fileEntry.uncompressedSize); } } await writer.writeUint8Array(new Uint8Array(arrayBuffer)); @@ -6998,20 +7005,23 @@ setUint16(dateView, 0, (((lastModDate.getHours() << 6) | lastModDate.getMinutes()) << 5) | lastModDate.getSeconds() / 2); setUint16(dateView, 2, ((((lastModDate.getFullYear() - 1980) << 4) | (lastModDate.getMonth() + 1)) << 5) | lastModDate.getDate()); const rawLastModDate = dateArray[0]; - setUint32$1(headerView, 6, rawLastModDate); + setUint32(headerView, 6, rawLastModDate); setUint16(headerView, 22, rawFilename.length); setUint16(headerView, 24, 0); - const fileDataArray = new Uint8Array(30 + rawFilename.length); - const fileDataView = new DataView(fileDataArray.buffer); - setUint32$1(fileDataView, 0, LOCAL_FILE_HEADER_SIGNATURE); - fileDataArray.set(headerArray, 4); - fileDataArray.set(rawFilename, 30); + setUint16(headerView, 24, rawExtraFieldAES.length + fileEntry.rawExtraField.length); + const footerArray = new Uint8Array(30 + rawFilename.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length); + const footerView = new DataView(footerArray.buffer); + setUint32(footerView, 0, LOCAL_FILE_HEADER_SIGNATURE); + footerArray.set(headerArray, 4); + footerArray.set(rawFilename, 30); + footerArray.set(rawExtraFieldAES, 30 + rawFilename.length); + footerArray.set(fileEntry.rawExtraField, 30 + rawFilename.length + rawExtraFieldAES.length); let result; let uncompressedSize = 0; let compressedSize = 0; if (reader) { uncompressedSize = reader.size; - const codec = await createCodec$1(config.Deflate, { + const codec = await createCodec(config.Deflate, { codecType: CODEC_DEFLATE, level, password, @@ -7023,57 +7033,57 @@ encrypted, useWebWorkers: options.useWebWorkers }, config); - await writer.writeUint8Array(fileDataArray); + await writer.writeUint8Array(footerArray); result = await processData(codec, reader, writer, 0, uncompressedSize, config, { onprogress: options.onprogress, signal: options.signal }); compressedSize = result.length; } else { - await writer.writeUint8Array(fileDataArray); + await writer.writeUint8Array(footerArray); } let dataDescriptorArray = new Uint8Array(0); let dataDescriptorView; if (options.dataDescriptor) { dataDescriptorArray = new Uint8Array(zip64 ? 24 : 16); dataDescriptorView = new DataView(dataDescriptorArray.buffer); - setUint32$1(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE); + setUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE); } if (reader) { if ((!encrypted || options.zipCrypto) && result.signature !== undefined) { - setUint32$1(headerView, 10, result.signature); + setUint32(headerView, 10, result.signature); fileEntry.signature = result.signature; if (options.dataDescriptor) { - setUint32$1(dataDescriptorView, 4, result.signature); + setUint32(dataDescriptorView, 4, result.signature); } } if (zip64) { const rawExtraFieldZip64View = new DataView(fileEntry.rawExtraFieldZip64.buffer); setUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64); setUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64); - setUint32$1(headerView, 14, MAX_32_BITS); + setUint32(headerView, 14, MAX_32_BITS); setBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize)); - setUint32$1(headerView, 18, MAX_32_BITS); + setUint32(headerView, 18, MAX_32_BITS); setBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize)); if (options.dataDescriptor) { setBigUint64(dataDescriptorView, 8, BigInt(compressedSize)); setBigUint64(dataDescriptorView, 16, BigInt(uncompressedSize)); } } else { - setUint32$1(headerView, 14, compressedSize); - setUint32$1(headerView, 18, uncompressedSize); + setUint32(headerView, 14, compressedSize); + setUint32(headerView, 18, uncompressedSize); if (options.dataDescriptor) { - setUint32$1(dataDescriptorView, 8, compressedSize); - setUint32$1(dataDescriptorView, 12, uncompressedSize); + setUint32(dataDescriptorView, 8, compressedSize); + setUint32(dataDescriptorView, 12, uncompressedSize); } } } if (options.dataDescriptor) { await writer.writeUint8Array(dataDescriptorArray); } - const length = fileDataArray.length + (result ? result.length : 0) + dataDescriptorArray.length; + const length = footerArray.length + (result ? result.length : 0) + dataDescriptorArray.length; Object.assign(fileEntry, { compressedSize, uncompressedSize, lastModDate, rawLastModDate, encrypted, length }); return fileEntry; } - function getOptionValue$1(zipWriter, options, name) { + function getOptionValue(zipWriter, options, name) { return options[name] === undefined ? zipWriter.options[name] : options[name]; } @@ -7085,7 +7095,7 @@ view.setUint16(offset, value, true); } - function setUint32$1(view, offset, value) { + function setUint32(view, offset, value) { view.setUint32(offset, value, true); } diff --git a/dist/zip-full.min.js b/dist/zip-full.min.js index 4dc9428c..dc442f34 100644 --- a/dist/zip-full.min.js +++ b/dist/zip-full.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function o(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,_=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,_++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==_){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,_-=2}while(_>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function l(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),o.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],o.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],l.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],l.static_l_desc=new l(l.static_ltree,o.extra_lbits,257,286,15),l.static_d_desc=new l(l.static_dtree,o.extra_dbits,0,30,15),l.static_bl_desc=new l(null,o.extra_blbits,0,19,7);function d(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new d(0,0,0,0,0),new d(4,4,8,4,1),new d(4,5,16,8,1),new d(4,6,32,32,1),new d(4,4,16,16,2),new d(8,16,32,32,2),new d(8,16,128,128,2),new d(8,32,128,256,2),new d(32,128,258,1024,2),new d(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],f=113,_=666,h=258,w=262;function p(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function lt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ft(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[X+Q]=255&i,Q++,0===n?j[2*i]++:(tt++,n--,j[2*(o._length_code[i]+e+1)]++,q[2*o.d_code(n)]++),0==(8191&Q)&&B>2){for(r=8*Q,a=T-z,s=0;s<30;s++)r+=q[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function wt(e,n,i){lt(0+(i?1:0),3),function(e,n,i){ht(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(m.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function pt(e,n,i){let r,a,s=0;B>0?(Z.build_tree(t),G.build_tree(t),s=function(){let e;for(at(j,Z.max_code),at(q,G.max_code),Y.build_tree(t),e=18;e>=3&&0===K[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?wt(e,n,i):a==r?(lt(2+(i?1:0),3),_t(l.static_ltree,l.static_dtree)):(lt(4+(i?1:0),3),function(t,e,n){let i;for(lt(t-257,5),lt(e-1,5),lt(n-4,4),i=0;i=0?z:-1,T-z,t),z=T,a.flush_pending()}function gt(){let t,e,n,i;do{if(i=v-L-T,0===i&&0===T&&0===L)i=g;else if(-1==i)i--;else if(T>=g+g-w){m.set(m.subarray(g,g+g),0),M-=g,T-=g,z-=g,t=E,n=t;do{e=65535&A[--n],A[n]=e>=g?e-g:0}while(0!=--t);t=g,n=t;do{e=65535&k[--n],k[n]=e>=g?e-g:0}while(0!=--t);i+=g}if(0===a.avail_in)return;t=a.read_buf(m,T+L,i),L+=t,L>=3&&(U=255&m[T],U=(U<g-w?T-(g-w):0;let o=H;const l=x,d=T+h;let c=m[r+a-1],u=m[r+a];O>=N&&(i>>=2),o>L&&(o=L);do{if(e=t,m[e+a]==u&&m[e+a-1]==c&&m[e]==m[r]&&m[++e]==m[r+1]){r+=2,e++;do{}while(m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&ra){if(M=t,a=n,n>=o)break;c=m[r+a-1],u=m[r+a]}}}while((t=65535&k[t&l])>s&&0!=--i);return a<=L?a:L}function xt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=f,b=0,Z.dyn_tree=j,Z.stat_desc=l.static_l_desc,G.dyn_tree=q,G.stat_desc=l.static_d_desc,Y.dyn_tree=K,Y.stat_desc=l.static_bl_desc,nt=0,it=0,et=8,rt(),function(){v=2*g,A[E-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,y=r,g=1<9||n<0||n>2?i:(c[B].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),B!=e&&(B=e,W=c[B].max_lazy,N=c[B].good_length,H=c[B].nice_length,V=c[B].max_chain),P=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>g-w&&(a=g-w,o=n-a),m.set(e.subarray(o,o+a),0),T=a,z=a,U=255&m[0],U=(U<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==_&&4!=o)return e.msg=u[4],i;if(0===e.avail_out)return e.msg=u[7],r;var N;if(a=e,R=b,b=o,42==s&&(p=8+(y-8<<4)<<8,v=(B-1&255)>>1,v>3&&(v=3),p|=v<<6,0!==T&&(p|=32),p+=31-p%31,s=f,st((N=p)>>8&255),st(255&N)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return b=-1,0}else if(0===a.avail_in&&o<=R&&4!=o)return a.msg=u[7],r;if(s==_&&0!==a.avail_in)return e.msg=u[7],r;if(0!==a.avail_in||0!==L||0!=o&&s!=_){switch(V=-1,c[B].func){case 0:V=function(t){let e,n=65535;for(n>d-5&&(n=d-5);;){if(L<=1){if(gt(),0===L&&0==t)return 0;if(0===L)break}if(T+=L,L=0,e=z+n,(0===T||T>=e)&&(L=T-e,T=e,bt(!1),0===a.avail_out))return 0;if(T-z>=g-w&&(bt(!1),0===a.avail_out))return 0}return bt(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:V=function(t){let e,n=0;for(;;){if(L=3&&(U=(U<=3)if(e=ft(T-M,F-3),L-=F,F<=W&&L>=3){F--;do{T++,U=(U<=3&&(U=(U<4096)&&(F=2)),O>=3&&F<=O){n=T+L-3,e=ft(T-1-S,O-3),L-=O-1,O-=2;do{++T<=n&&(U=(U<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const y=-2,x=-3,m=-5,v=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],A=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],U=[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],E=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],R=[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],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I=15;function z(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,_,h){let w,p,b,g,y,v,k,A,U,E,R,D,z,F,S;E=0,y=s;do{n[t[e+E]]++,E++,y--}while(0!==y);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(A=u[0],v=1;v<=I&&0===n[v];v++);for(k=v,Ay&&(A=y),u[0]=A,F=1<D+A;){if(g++,D+=A,S=b-D,S=S>A?A:S,(p=1<<(v=k-D))>w+1&&(p-=w+1,z=k,v1440)return x;r[g]=R=_[0],_[0]+=S,0!==g?(a[g]=y,i[0]=v,i[1]=A,v=y>>>D-A,i[2]=R-r[g-1]-v,f.set(i,3*(r[g-1]+v))):c[0]=R}for(i[1]=k-D,E>=s?i[0]=192:h[E]>>D;v>>=1)y^=v;for(y^=v,U=(1<257?(_==x?f.msg="oversubscribed distance tree":_==m?(f.msg="incomplete distance tree",_=x):-4!=_&&(f.msg="empty distance tree with lengths",_=x),_):0)}}z.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=k,i[0]=A,0};function F(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,_=0,h=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,_,h,w,p,b,g,y,m,k,A,U;h=o.next_in_index,w=o.avail_in,f=s.bitb,_=s.bitk,p=s.write,b=p>=d[U+1],_-=d[U+1],0!=(16&u)){for(u&=15,m=d[U+2]+(f&v[u]),f>>=u,_-=u;_<15;)w--,f|=(255&o.read_byte(h++))<<_,_+=8;for(l=f&y,d=r,c=a,U=3*(c+l),u=d[U];;){if(f>>=d[U+1],_-=d[U+1],0!=(16&u)){for(u&=15;_>=u,_-=u,b-=m,p>=k)A=p-k,p-A>0&&2>p-A?(s.window[p++]=s.window[A++],s.window[p++]=s.window[A++],m-=2):(s.window.set(s.window.subarray(A,A+2),p),p+=2,A+=2,m-=2);else{A=p-k;do{A+=s.end}while(A<0);if(u=s.end-A,m>u){if(m-=u,p-A>0&&u>p-A)do{s.window[p++]=s.window[A++]}while(0!=--u);else s.window.set(s.window.subarray(A,A+u),p),p+=u,A+=u,u=0;A=0}}if(p-A>0&&m>p-A)do{s.window[p++]=s.window[A++]}while(0!=--m);else s.window.set(s.window.subarray(A,A+m),p),p+=m,A+=m,m=0;break}if(0!=(64&u))return o.msg="invalid distance code",m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,x;l+=d[U+2],l+=f&v[u],U=3*(c+l),u=d[U]}break}if(0!=(64&u))return 0!=(32&u)?(m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,1):(o.msg="invalid literal/length code",m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,x);if(l+=d[U+2],l+=f&v[u],U=3*(c+l),0===(u=d[U])){f>>=d[U+1],_-=d[U+1],s.window[p++]=d[U+2],b--;break}}else f>>=d[U+1],_-=d[U+1],s.window[p++]=d[U+2],b--}while(b>=258&&w>=10);return m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,_=o,r=l,h=d,n=null},t.proc=function(t,p,b){let g,m,k,A,U,E,R,D=0,I=0,z=0;for(z=p.next_in_index,A=p.avail_in,D=t.bitb,I=t.bitk,U=t.write,E=U=258&&A>=10&&(t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=U,b=w(u,f,i,_,r,h,t,p),z=p.next_in_index,A=p.avail_in,D=t.bitb,I=t.bitk,U=t.write,E=U>>=n[m+1],I-=n[m+1],k=n[m],0===k){l=n[m+2],e=6;break}if(0!=(16&k)){d=15&k,a=n[m+2],e=2;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}if(0!=(32&k)){e=7;break}return e=9,p.msg="invalid literal/length code",b=x,t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=U,t.inflate_flush(p,b);case 2:for(g=d;I>=g,I-=g,o=f,n=r,s=h,e=3;case 3:for(g=o;I>=n[m+1],I-=n[m+1],k=n[m],0!=(16&k)){d=15&k,c=n[m+2],e=4;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}return e=9,p.msg="invalid distance code",b=x,t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=U,t.inflate_flush(p,b);case 4:for(g=d;I>=g,I-=g,e=5;case 5:for(R=U-c;R<0;)R+=t.end;for(;0!==a;){if(0===E&&(U==t.end&&0!==t.read&&(U=0,E=U7&&(I-=8,A++,z--),t.write=U,b=t.inflate_flush(p,b),U=t.write,E=Ut.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,w,p,b,g,m,k,A;for(b=t.next_in_index,g=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m>>1){case 0:w>>>=3,p-=3,h=7&p,w>>>=h,p-=h,r=1;break;case 1:U=[],E=[],R=[[]],D=[[]],z.inflate_trees_fixed(U,E,R,D),c.init(U[0],E[0],R[0],0,D[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=x,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=x,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);if(0===k&&(m==n.end&&0!==n.read&&(m=0,k=mg&&(h=g),h>k&&(h=k),n.window.set(t.read_buf(b,h),m),b+=h,g-=h,m+=h,k-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=x,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<>>=3,p-=3}for(;o<19;)i[S[o++]]=0;if(l[0]=7,h=_.inflate_trees_bits(i,l,d,f,t),0!=h)return(e=h)==x&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=l[0];p>>=h,p-=h,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;p>>=h,p-=h,a+=w&v[A],w>>>=A,p-=A,A=o,h=s,A+a>258+(31&h)+(h>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=x,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(d[0]=-1,I=[],F=[],C=[],T=[],I[0]=9,F[0]=6,h=s,h=_.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,F,C,T,f,t),0!=h)return h==x&&(i=null,r=9),e=h,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);c.init(I[0],F[0],f,C[0],f,T[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),b=t.next_in_index,g=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m15?(t.inflateEnd(n),y):(t.wbits=i,n.istate.blocks=new C(n,1<>4)>r.wbits){r.mode=T,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=T,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=T,t.msg="need dictionary",r.marker=0,y;case 7:if(n=r.blocks.proc(t,n),n==x){r.mode=T,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case T:return x;default:return y}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return y;const a=t.istate;return r>=1<{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),i(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),i(this)}};function i(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const H="Abort error";async function j(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,d=0){const c=s.signal;if(l{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class at extends it{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class st extends nt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),_t(this.url)&&!this.preventHeadRequest){const t=await lt(Q,this.url,this.options);if(this.size=Number(t.headers.get(X)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(J)!=tt)throw new Error(G);void 0===this.size&&await ot(this,this.options)}else await ot(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await lt($,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(G);return new Uint8Array(await n.arrayBuffer())}return this.data||await ot(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function ot(t,e){const n=await lt($,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function lt(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(Z+(r.statusText||r.status))}class dt extends nt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),_t(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>ut(Q,this.url,(n=>{this.size=Number(n.getResponseHeader(X)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(J)==tt?t():e(new Error(G)):void 0===this.size?ct(this,this.url).then((()=>t())).catch(e):t()}),e)));await ct(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await ct(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>ut($,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(G)}}function ct(t,e){return new Promise(((n,i)=>ut($,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function ut(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(Z+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class ft extends nt{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new dt(t,e):this.reader=new st(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function _t(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const ht=4294967295,wt=65535,pt=67324752,bt=134695760,gt=33639248,yt=101010256,xt=101075792,mt=117853008,vt=39169,kt=2048,At="/",Ut=new Date(2107,11,31),Et=new Date(1980,0,1),Rt="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Dt=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;Dt[t]=e}class It{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Dt[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const zt={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=zt.getPartial(n);return 32===i?t.concat(e):zt._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+zt.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=zt.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=zt.getPartial(r);return i.push(zt.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},Ft={bytes:{fromBits(t){const e=zt.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,d;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let c=s=0;!n[c];c^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[c]=a,i[a]=c,d=r[l=r[o=r[c]]];let u=16843009*d^65537*l^257*o^16843008*c,f=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][c]=f=f<<24^f>>>8,e[n][a]=u=u<<24^u>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],d=a[3],c=a[4];let u,f,_,h=t[0]^n[0],w=t[e?3:1]^n[1],p=t[2]^n[2],b=t[e?1:3]^n[3],g=4;for(let t=0;t>>24]^o[w>>16&255]^l[p>>8&255]^d[255&b]^n[g],f=s[w>>>24]^o[p>>16&255]^l[b>>8&255]^d[255&h]^n[g+1],_=s[p>>>24]^o[b>>16&255]^l[h>>8&255]^d[255&w]^n[g+2],b=s[b>>>24]^o[h>>16&255]^l[w>>8&255]^d[255&p]^n[g+3],g+=4,h=u,w=f,p=_;for(let t=0;t<4;t++)r[e?3&-t:t]=c[h>>>24]<<24^c[w>>16&255]<<16^c[p>>8&255]<<8^c[255&b]^n[g++],u=h,h=w,w=p,p=b,b=u;return r}}},Ct={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=zt.bitLength(e);for(let r=0;rt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const te=12;class ee{constructor(t,e){this.password=t,this.passwordVerification=e,ae(this,t)}async append(t){if(this.password){const e=ie(this,t.subarray(0,te));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Tt);t=t.subarray(te)}return ie(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class ne{constructor(t,e){this.passwordVerification=e,this.password=t,ae(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(te));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(re(this,i),0),n=te}else e=new Uint8Array(t.length),n=0;return e.set(re(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function ie(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function oe(t){const e=2|t.keys[2];return le(Math.imul(e,1^e)>>>8)}function le(t){return 255&t}function de(t){return 4294967295&t}const ce="deflate",ue="inflate",fe="Invalid signature";class _e{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new It,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new ee(e.password,e.passwordVerification):new Yt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(fe);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(fe)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class he{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new It,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new ne(e.password,e.passwordVerification):new Xt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const we="init",pe="append",be="flush",ge="message";var ye=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-full.min.js",document.baseURI).href)),t.worker.addEventListener(ge,r,!1),t.interface={append:t=>n({type:pe,data:t}),flush:()=>n({type:be})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:we,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==we||r==be||r==pe){const n=i.data;r==be?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(ce)?new he(t,e):e.codecType.startsWith(ue)?new _e(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let xe=[],me=[];function ve(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(xe.length!t.busy));return n?ye(n,t,e,ke,i,r):new Promise((n=>me.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function ke(t){const e=!me.length;if(e)xe=xe.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=me.splice(0,1);e(ye(t,n,i,ke,r,a))}return e}const Ae=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Ue{constructor(t){Ae.forEach((e=>this[e]=t[e]))}}const Ee="File format is not recognized",Re="End of central directory not found",De="End of Zip64 central directory not found",Ie="End of Zip64 central directory locator not found",ze="Central directory header not found",Fe="Local file header not found",Se="Zip64 extra field not found",Ce="File contains encrypted entry",Te="Encryption method not supported",Me="Compression method not supported",Le="utf-8",Oe=["uncompressedSize","compressedSize","offset"];class Ve{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,o=this.compressionMethod,l=this.config,d=this.bitFlag,c=this.signature;let u=Ne(this,e,"password");if(u=u&&u.length&&u,s&&99!=s.originalCompressionMethod)throw new Error(Me);if(0!=o&&8!=o)throw new Error(Me);if(Ke(a,0)!=pt)throw new Error(Fe);const f=this.localDirectory={};We(f,a,4),f.rawExtraField=r.subarray(i+30+f.filenameLength,i+30+f.filenameLength+f.extraFieldLength),Be(this,f,a,4);const _=i+30+f.filenameLength+f.extraFieldLength,h=d.encrypted&&f.bitFlag.encrypted,w=h&&!s;if(h){if(!w&&void 0===s.strength)throw new Error(Te);if(!u)throw new Error(Ce)}const p=await ve(l.Inflate,{codecType:ue,password:u,zipCrypto:w,encryptionStrength:s&&s.strength,signed:Ne(this,e,"checkSignature"),passwordVerification:w&&(d.dataDescriptor?this.rawLastModDate>>>8&255:c>>>24&255),signature:c,compressed:0!=o,encrypted:h,useWebWorkers:Ne(this,e,"useWebWorkers")},l);return t.initialized||await t.init(),await j(p,n,t,_,this.compressedSize,l,{onprogress:e.onprogress,signal:Ne(this,e,"signal")}),t.getData()}}function We(t,e,n){t.version=qe(e,n);const i=t.rawBitFlag=qe(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&kt)==kt},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=Ke(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=qe(e,n+22),t.extraFieldLength=qe(e,n+24)}function Be(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==ht));for(let e=0;e{if(e[n]==ht){if(!t||void 0===t[n])throw new Error(Se);e[n]=t[n]}}))}(d,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Pe(c,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&Pe(u,"comment","rawComment",e,t);const f=e.extraFieldAES=a.get(39169);f?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=je(i,0),t.vendorId=je(i,2);const r=je(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=qe(i,5)}else e.compressionMethod=n}(f,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Pe(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=je(a,0),t.signature=Ke(a,1);const s=new It;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==Ke(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Ne(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function He(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n{if("function"==typeof URL.createObjectURL){const t=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},r),d=["deriveBits"],c=["sign"],u=[8,12,16],f=[16,24,32],_=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return g(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=y(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await b(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=y(this.pendingInput,t),n=x(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class p{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,a);return g(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=y(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await b(t,e,n,["encrypt"]),y(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=y(this.pendingInput,t),i=x(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=y(this.output,t)}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:y(t,n),signature:n}}}async function b(t,e,n,i){t.counter=new Uint8Array(_);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,a,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),p=new Uint8Array(w);t.keys={key:await h.importKey("raw",p.subarray(0,f[t.strength]),r,!0,i),authentication:await h.importKey("raw",p.subarray(f[t.strength],2*f[t.strength]),o,!1,c),passwordVerification:p.subarray(2*f[t.strength])}}function g(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function y(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function x(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return k(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function R(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function I(t){return 4294967295&t}class z{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class F{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new p(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const S={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),C=function(t,e){return e.codecType.startsWith("deflate")?new F(t,e):e.codecType.startsWith("inflate")?new z(t,e):void 0}(n,e)},append:async t=>({data:await C.append(t.data)}),flush:()=>C.flush()};let C;function T(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=S[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const M=[0,1,2,3].concat(...T([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function L(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,_=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,_++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==_){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,_-=2}while(_>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function O(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function V(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}L._length_code=[0,1,2,3,4,5,6,7].concat(...T([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),L.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],L.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],L.d_code=function(t){return t<256?M[t]:M[256+(t>>>7)]},L.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],L.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],O.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],O.static_l_desc=new O(O.static_ltree,L.extra_lbits,257,286,15),O.static_d_desc=new O(O.static_dtree,L.extra_dbits,0,30,15),O.static_bl_desc=new O(null,L.extra_blbits,0,19,7);const W=[new V(0,0,0,0,0),new V(4,4,8,4,1),new V(4,5,16,8,1),new V(4,6,32,32,1),new V(4,4,16,16,2),new V(8,16,32,32,2),new V(8,16,128,128,2),new V(8,32,128,256,2),new V(32,128,258,1024,2),new V(32,258,258,4096,2)],B=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function P(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;Y>16-i?(n=t,G|=n<>>16-Y,Y+=i-16):(G|=t<=8&&(Q(255&G),G>>>=8,Y-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[q+2*j]=e>>>8&255,t.pending_buf[q+2*j+1]=255&e,t.pending_buf[N+j]=255&n,j++,0===e?F[2*n]++:(K++,e--,F[2*(L._length_code[n]+256+1)]++,S[2*L.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=m-b,a=0;a<30;a++)i+=S[2*a]*(5+L.extra_dbits[a]);if(i>>>=3,K8?$(G):Y>0&&Q(255&G),G=0,Y=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),Z=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),M.build_tree(t),s=function(){let e;for(J(F,T.max_code),J(S,M.max_code),V.build_tree(t),e=18;e>=3&&0===C[2*L.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(O.static_ltree,O.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?b:-1,m-b,t),b=m,e.flush_pending()}function ct(){let t,n,i,r;do{if(r=d-k-m,0===r&&0===m&&0===k)r=a;else if(-1==r)r--;else if(m>=a+a-262){l.set(l.subarray(a,a+a),0),v-=a,m-=a,b-=a,t=_,i=t;do{n=65535&u[--i],u[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&c[--i],c[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(l,m+k,r),k+=t,k>=3&&(f=255&l[m],f=(f<a-262?m-(a-262):0;let u=z;const f=o,_=m+258;let h=l[r+s-1],w=l[r+s];A>=I&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&l[e+s-1]==h&&l[e]==l[r]&&l[++e]==l[r+1]){r+=2,e++;do{}while(l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&r<_);if(n=258-(_-r),r=_-258,n>s){if(v=t,s=n,n>=u)break;h=l[r+s-1],w=l[r+s]}}}while((t=65535&c[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=F,T.stat_desc=O.static_l_desc,M.dyn_tree=S,M.stat_desc=O.static_d_desc,V.dyn_tree=C,V.stat_desc=O.static_bl_desc,G=0,Y=0,Z=8,X(),function(){d=2*a,u[_-1]=0;for(let t=0;t<_-1;t++)u[t]=0;E=W[R].max_lazy,I=W[R].good_length,z=W[R].nice_length,U=W[R].max_chain,m=0,b=0,k=0,g=A=2,x=0,f=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],F=[],S=[],C=[],t.pqdownheap=function(e,n){const i=t.heap,r=i[n];let a=n<<1;for(;a<=t.heap_len&&(a9||8!=d||r<9||r>15||n<0||n>9||b<0||b>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(W[R].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=W[R].max_lazy,I=W[R].good_length,z=W[R].nice_length,U=W[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,d=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,b=s,f=255&l[0],f=(f<4||h<0)return-2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=B[4],-2;if(0===d.avail_out)return d.msg=B[7],-5;var C;if(e=d,F=r,r=h,42==n&&(I=8+(s-8<<4)<<8,z=(R-1&255)>>1,z>3&&(z=3),I|=z<<6,0!==m&&(I|=32),I+=31-I%31,n=113,Q((C=I)>>8&255),Q(255&C)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&h<=F&&4!=h)return e.msg=B[7],-5;if(666==n&&0!==e.avail_in)return d.msg=B[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(S=-1,W[R].func){case 0:S=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(ct(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=b+r,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-b>=a-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:S=function(t){let n,i=0;for(;;){if(k<262){if(ct(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=rt(m-v,g-3),k-=g,g<=E&&k>=3){g--;do{m++,f=(f<=3&&(f=(f<4096)&&(g=2)),A>=3&&g<=A){i=m+k-3,n=rt(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}H.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new N,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const q=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],K=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Z=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],G=[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],Y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],X=[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],J=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Q(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,_,h){let w,p,b,g,y,x,m,v,k,A,U,E,R,D,I;A=0,y=s;do{n[t[e+A]]++,A++,y--}while(0!==y);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(v=u[0],x=1;x<=15&&0===n[x];x++);for(m=x,vy&&(v=y),u[0]=v,D=1<E+v;){if(g++,E+=v,I=b-E,I=I>v?v:I,(p=1<<(x=m-E))>w+1&&(p-=w+1,R=m,x1440)return-3;r[g]=U=_[0],_[0]+=I,0!==g?(a[g]=y,i[0]=x,i[1]=v,x=y>>>E-v,i[2]=U-r[g-1]-x,f.set(i,3*(r[g-1]+x))):c[0]=U}for(i[1]=m-E,A>=s?i[0]=192:h[A]>>E;x>>=1)y^=x;for(y^=x,k=(1<257?(-3==_?f.msg="oversubscribed distance tree":-5==_?(f.msg="incomplete distance tree",_=-3):-4!=_&&(f.msg="empty distance tree with lengths",_=-3),_):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,_=0,h=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,_,h,w,p,b,g,y,x,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,_=s.bitk,p=s.write,b=p>=d[k+1],_-=d[k+1],0!=(16&u)){for(u&=15,x=d[k+2]+(f&q[u]),f>>=u,_-=u;_<15;)w--,f|=(255&o.read_byte(h++))<<_,_+=8;for(l=f&y,d=r,c=a,k=3*(c+l),u=d[k];;){if(f>>=d[k+1],_-=d[k+1],0!=(16&u)){for(u&=15;_>=u,_-=u,b-=x,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],x-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,x-=2);else{v=p-m;do{v+=s.end}while(v<0);if(u=s.end-v,x>u){if(x-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++]}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0}}if(p-v>0&&x>p-v)do{s.window[p++]=s.window[v++]}while(0!=--x);else s.window.set(s.window.subarray(v,v+x),p),p+=x,v+=x,x=0;break}if(0!=(64&u))return o.msg="invalid distance code",x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,-3;l+=d[k+2],l+=f&q[u],k=3*(c+l),u=d[k]}break}if(0!=(64&u))return 0!=(32&u)?(x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,1):(o.msg="invalid literal/length code",x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,-3);if(l+=d[k+2],l+=f&q[u],k=3*(c+l),0===(u=d[k])){f>>=d[k+1],_-=d[k+1],s.window[p++]=d[k+2],b--;break}}else f>>=d[k+1],_-=d[k+1],s.window[p++]=d[k+2],b--}while(b>=258&&w>=10);return x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,_=o,r=l,h=d,n=null},t.proc=function(t,p,b){let g,y,x,m,v,k,A,U=0,E=0,R=0;for(R=p.next_in_index,m=p.avail_in,U=t.bitb,E=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,b=w(u,f,i,_,r,h,t,p),R=p.next_in_index,m=p.avail_in,U=t.bitb,E=t.bitk,v=t.write,k=v>>=n[y+1],E-=n[y+1],x=n[y],0===x){l=n[y+2],e=6;break}if(0!=(16&x)){d=15&x,a=n[y+2],e=2;break}if(0==(64&x)){o=x,s=y/3+n[y+2];break}if(0!=(32&x)){e=7;break}return e=9,p.msg="invalid literal/length code",b=-3,t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,t.inflate_flush(p,b);case 2:for(g=d;E>=g,E-=g,o=f,n=r,s=h,e=3;case 3:for(g=o;E>=n[y+1],E-=n[y+1],x=n[y],0!=(16&x)){d=15&x,c=n[y+2],e=4;break}if(0==(64&x)){o=x,s=y/3+n[y+2];break}return e=9,p.msg="invalid distance code",b=-3,t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,t.inflate_flush(p,b);case 4:for(g=d;E>=g,E-=g,e=5;case 5:for(A=v-c;A<0;)A+=t.end;for(;0!==a;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(E-=8,m++,R--),t.write=v,b=t.inflate_flush(p,b),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,w,p,b,g,y,x,m;for(b=t.next_in_index,g=t.avail_in,w=n.bitb,p=n.bitk,y=n.write,x=y>>1){case 0:w>>>=3,p-=3,h=7&p,w>>>=h,p-=h,r=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Q.inflate_trees_fixed(v,k,A,U),c.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);if(0===x&&(y==n.end&&0!==n.read&&(y=0,x=yg&&(h=g),h>x&&(h=x),n.window.set(t.read_buf(b,h),y),b+=h,g-=h,y+=h,x-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<>>=3,p-=3}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=_.inflate_trees_bits(i,l,d,f,t),0!=h)return-3==(e=h)&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=l[0];p>>=h,p-=h,i[o++]=c;else{for(m=18==c?7:c-14,a=18==c?11:3;p>>=h,p-=h,a+=w&q[m],w>>>=m,p-=m,m=o,h=s,m+a>258+(31&h)+(h>>5&31)||16==c&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);c=16==c?i[m-1]:0;do{i[m++]=c}while(0!=--a);o=m}}if(d[0]=-1,E=[],R=[],D=[],I=[],E[0]=9,R[0]=6,h=s,h=_.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,E,R,D,I,f,t),0!=h)return-3==h&&(i=null,r=9),e=h,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);c.init(E[0],R[0],f,D[0],f,I[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),b=t.next_in_index,g=t.avail_in,w=n.bitb,p=n.bitk,y=n.write,x=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=j,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));P({workerScripts:{inflate:[e],deflate:[e]}})}})(),P({Deflate:function(t){const e=new g,n=512,i=new Uint8Array(n);let r=t?t.level:-1;void 0===r&&(r=-1),e.deflateInit(r),e.next_out=i,this.append=function(t,r){let a,s,o=0,l=0,d=0;const c=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,a=e.deflate(0),0!=a)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?c.push(new Uint8Array(i)):c.push(new Uint8Array(i.subarray(0,e.next_out_index)))),d+=e.next_out_index,r&&e.next_in_index>0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new O,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,l=0,d=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===m){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=rt,t.BlobWriter=at,t.Data64URIReader=class extends nt{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_ABORT=H,t.ERR_BAD_FORMAT=Ee,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=ze,t.ERR_DUPLICATED_NAME=Ge,t.ERR_ENCRYPTED=Ce,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Ie,t.ERR_EOCDR_NOT_FOUND=Re,t.ERR_EOCDR_ZIP64_NOT_FOUND=De,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Se,t.ERR_HTTP_RANGE=G,t.ERR_INVALID_COMMENT=Ye,t.ERR_INVALID_DATE=$e,t.ERR_INVALID_ENCRYPTION_STRENGTH=tn,t.ERR_INVALID_ENTRY_COMMENT=Xe,t.ERR_INVALID_ENTRY_NAME=Je,t.ERR_INVALID_EXTRAFIELD_DATA=nn,t.ERR_INVALID_EXTRAFIELD_TYPE=en,t.ERR_INVALID_PASSWORD=Tt,t.ERR_INVALID_SIGNATURE=fe,t.ERR_INVALID_VERSION=Qe,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Fe,t.ERR_UNSUPPORTED_COMPRESSION=Me,t.ERR_UNSUPPORTED_ENCRYPTION=Te,t.HttpRangeReader=class extends ft{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=ft,t.Reader=nt,t.TextReader=class extends nt{constructor(t){super(),this.blobReader=new rt(new Blob([t],{type:Y}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends it{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:Y})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:Y})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends nt{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends it{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=it,t.ZipReader=class{constructor(t,e={}){this.reader=t,this.options=e,this.config=B()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ee);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,yt,22,1048560);if(!n)throw new Error(Re);const i=new DataView(n.buffer);let r=Ke(i,12),a=Ke(i,16),s=qe(i,8),o=0;if(a==ht||r==ht||s==wt){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(Ke(i,0)!=mt)throw new Error(De);a=Ze(i,8);let l=await e.readUint8Array(a,56),d=new DataView(l.buffer);const c=n.offset-20-56;if(Ke(d,0)!=xt&&a!=c){const t=a;a=c,o=a-t,l=await e.readUint8Array(a,56),d=new DataView(l.buffer)}if(Ke(d,0)!=xt)throw new Error(Ie);s=Ze(d,24),r=Ze(i,4),a-=Ze(d,40)}if(a<0||a>=e.size)throw new Error(Ee);let l=0,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer);const u=n.offset-r;if(Ke(c,l)!=gt&&a!=u){const t=a;a=u,o=a-t,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer)}if(a<0||a>=e.size)throw new Error(Ee);const f=[];for(let e=0;ee.getData(t,n),f.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return f}async close(){}},t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=B(),this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(At)?t+=At:n.directory=t.endsWith(At),this.files.has(t))throw new Error(Ge);const i=(new TextEncoder).encode(t);if(i.length>wt)throw new Error(Je);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>wt)throw new Error(Xe);const s=this.options.version||n.version||0;if(s>wt)throw new Error(Qe);const o=n.lastModDate||new Date;if(oUt)throw new Error($e);const l=an(this,n,"password"),d=an(this,n,"encryptionStrength")||3,c=an(this,n,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error(tn);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const f=n.extraField;if(f){let t=0,e=0;f.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),f.forEach(((t,n)=>{if(n>wt)throw new Error(en);if(t.length>wt)throw new Error(nn);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const _=e?1.05*e.size:0,h=n.zip64||this.options.zip64||this.offset>=ht||_>=ht||this.offset+_>=ht,w=an(this,n,"level"),p=an(this,n,"useWebWorkers"),b=an(this,n,"bufferedWrite"),g=an(this,n,"keepOrder");let y=an(this,n,"dataDescriptor");const x=an(this,n,"signal");void 0===y&&(y=!0);const m=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,l;r.set(e,null);try{let d,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>l=t))),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(d=new at,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,d=0!==l&&!i.directory,c=i.zip64;let u,f;if(o&&!i.zipCrypto){u=new Uint8Array(rn.length+2);const t=new DataView(u.buffer);on(t,0,vt),u.set(rn,2),f=i.encryptionStrength,sn(t,8,f)}else u=new Uint8Array(0);const _={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let h=kt;i.dataDescriptor&&(h|=8);let w=0;d&&(w=8);c&&(_.version=_.version>45?_.version:45);o&&(h|=1,i.zipCrypto||(_.version=_.version>51?_.version:51,w=99,d&&(_.rawExtraFieldAES[9]=8)));const p=_.headerArray=new Uint8Array(26),b=new DataView(p.buffer);on(b,0,_.version),on(b,2,h),on(b,4,w);const g=new Uint32Array(1),y=new DataView(g.buffer);on(y,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),on(y,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=g[0];ln(b,6,x),on(b,22,r.length),on(b,24,0);const m=new Uint8Array(30+r.length);let v;ln(new DataView(m.buffer),0,pt),m.set(p,4),m.set(r,30);let k=0,A=0;if(t){k=t.size;const r=await ve(n.Deflate,{codecType:ce,level:l,password:s,encryptionStrength:f,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:d,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),v=await j(r,t,e,0,k,n,{onprogress:i.onprogress,signal:i.signal}),A=v.length}else await e.writeUint8Array(m);let U,E=new Uint8Array(0);i.dataDescriptor&&(E=new Uint8Array(c?24:16),U=new DataView(E.buffer),ln(U,0,bt));if(t)if(o&&!i.zipCrypto||void 0===v.signature||(ln(b,10,v.signature),_.signature=v.signature,i.dataDescriptor&&ln(U,4,v.signature)),c){const t=new DataView(_.rawExtraFieldZip64.buffer);on(t,0,1),on(t,2,24),ln(b,14,ht),dn(t,12,BigInt(A)),ln(b,18,ht),dn(t,4,BigInt(k)),i.dataDescriptor&&(dn(U,8,BigInt(A)),dn(U,16,BigInt(k)))}else ln(b,14,A),ln(b,18,k),i.dataDescriptor&&(ln(U,8,A),ln(U,12,k));i.dataDescriptor&&await e.writeUint8Array(E);const R=m.length+(v?v.length:0)+E.length;return Object.assign(_,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),_}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),d!=a){const e=d.getData(),n=new FileReader,r=new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)})),[s]=await Promise.all([r,t.lockWrite,o]);if(!i.dataDescriptor){const t=new DataView(s);c.encrypted&&!i.zipCrypto||ln(t,14,c.signature),c.zip64?(ln(t,18,ht),ln(t,22,ht)):(ln(t,18,c.compressedSize),ln(t,22,c.uncompressedSize))}await a.writeUint8Array(new Uint8Array(s))}if(c.offset=t.offset,c.zip64){dn(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{l&&l(),s&&s()}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:u,zip64:h,password:l,level:w,useWebWorkers:p,encryptionStrength:d,zipCrypto:c,bufferedWrite:b,keepOrder:g,dataDescriptor:y,signal:x}));return Object.assign(m,{name:t,comment:r,extraField:f}),new Ue(m)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=ht||r>=ht||s>=wt,l=new Uint8Array(r+(o?98:22)),d=new DataView(l.buffer);if(t.length){if(!(t.length<=wt))throw new Error(Ye);on(d,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;ln(d,i,gt),on(d,i+4,t.version),l.set(t.headerArray,i+6),on(d,i+30,a),on(d,i+32,t.rawComment.length),t.directory&&sn(d,i+38,16),t.zip64?ln(d,i+42,ht):ln(d,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(ln(d,i,xt),dn(d,i+4,BigInt(44)),on(d,i+12,45),on(d,i+14,45),dn(d,i+24,BigInt(s)),dn(d,i+32,BigInt(s)),dn(d,i+40,BigInt(r)),dn(d,i+48,BigInt(a)),ln(d,i+56,mt),dn(d,i+64,BigInt(a)+BigInt(r)),ln(d,i+72,1),s=wt,a=ht,r=ht,i+=76),ln(d,i,yt),on(d,i+8,s),on(d,i+10,s),ln(d,i+12,r),ln(d,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=P,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={},n)=>({Deflate:N(t.Deflate,e.deflate,n),Inflate:N(t.Inflate,e.inflate,n)}),Object.defineProperty(t,"__esModule",{value:!0})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function o(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,_=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,_++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==_){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,_-=2}while(_>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function l(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),o.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],o.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],l.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],l.static_l_desc=new l(l.static_ltree,o.extra_lbits,257,286,15),l.static_d_desc=new l(l.static_dtree,o.extra_dbits,0,30,15),l.static_bl_desc=new l(null,o.extra_blbits,0,19,7);function d(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new d(0,0,0,0,0),new d(4,4,8,4,1),new d(4,5,16,8,1),new d(4,6,32,32,1),new d(4,4,16,16,2),new d(8,16,32,32,2),new d(8,16,128,128,2),new d(8,32,128,256,2),new d(32,128,258,1024,2),new d(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],f=113,_=666,h=258,w=262;function p(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function lt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ft(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[X+Q]=255&i,Q++,0===n?j[2*i]++:(tt++,n--,j[2*(o._length_code[i]+e+1)]++,q[2*o.d_code(n)]++),0==(8191&Q)&&O>2){for(r=8*Q,a=T-z,s=0;s<30;s++)r+=q[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function wt(e,n,i){lt(0+(i?1:0),3),function(e,n,i){ht(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(m.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function pt(e,n,i){let r,a,s=0;O>0?(G.build_tree(t),Z.build_tree(t),s=function(){let e;for(at(j,G.max_code),at(q,Z.max_code),Y.build_tree(t),e=18;e>=3&&0===K[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?wt(e,n,i):a==r?(lt(2+(i?1:0),3),_t(l.static_ltree,l.static_dtree)):(lt(4+(i?1:0),3),function(t,e,n){let i;for(lt(t-257,5),lt(e-1,5),lt(n-4,4),i=0;i=0?z:-1,T-z,t),z=T,a.flush_pending()}function gt(){let t,e,n,i;do{if(i=v-B-T,0===i&&0===T&&0===B)i=g;else if(-1==i)i--;else if(T>=g+g-w){m.set(m.subarray(g,g+g),0),M-=g,T-=g,z-=g,t=E,n=t;do{e=65535&A[--n],A[n]=e>=g?e-g:0}while(0!=--t);t=g,n=t;do{e=65535&k[--n],k[n]=e>=g?e-g:0}while(0!=--t);i+=g}if(0===a.avail_in)return;t=a.read_buf(m,T+B,i),B+=t,B>=3&&(U=255&m[T],U=(U<g-w?T-(g-w):0;let o=H;const l=x,d=T+h;let c=m[r+a-1],u=m[r+a];L>=N&&(i>>=2),o>B&&(o=B);do{if(e=t,m[e+a]==u&&m[e+a-1]==c&&m[e]==m[r]&&m[++e]==m[r+1]){r+=2,e++;do{}while(m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&ra){if(M=t,a=n,n>=o)break;c=m[r+a-1],u=m[r+a]}}}while((t=65535&k[t&l])>s&&0!=--i);return a<=B?a:B}function xt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=f,b=0,G.dyn_tree=j,G.stat_desc=l.static_l_desc,Z.dyn_tree=q,Z.stat_desc=l.static_d_desc,Y.dyn_tree=K,Y.stat_desc=l.static_bl_desc,nt=0,it=0,et=8,rt(),function(){v=2*g,A[E-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,y=r,g=1<9||n<0||n>2?i:(c[O].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),O!=e&&(O=e,V=c[O].max_lazy,N=c[O].good_length,H=c[O].nice_length,W=c[O].max_chain),P=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>g-w&&(a=g-w,o=n-a),m.set(e.subarray(o,o+a),0),T=a,z=a,U=255&m[0],U=(U<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==_&&4!=o)return e.msg=u[4],i;if(0===e.avail_out)return e.msg=u[7],r;var N;if(a=e,R=b,b=o,42==s&&(p=8+(y-8<<4)<<8,v=(O-1&255)>>1,v>3&&(v=3),p|=v<<6,0!==T&&(p|=32),p+=31-p%31,s=f,st((N=p)>>8&255),st(255&N)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return b=-1,0}else if(0===a.avail_in&&o<=R&&4!=o)return a.msg=u[7],r;if(s==_&&0!==a.avail_in)return e.msg=u[7],r;if(0!==a.avail_in||0!==B||0!=o&&s!=_){switch(W=-1,c[O].func){case 0:W=function(t){let e,n=65535;for(n>d-5&&(n=d-5);;){if(B<=1){if(gt(),0===B&&0==t)return 0;if(0===B)break}if(T+=B,B=0,e=z+n,(0===T||T>=e)&&(B=T-e,T=e,bt(!1),0===a.avail_out))return 0;if(T-z>=g-w&&(bt(!1),0===a.avail_out))return 0}return bt(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:W=function(t){let e,n=0;for(;;){if(B=3&&(U=(U<=3)if(e=ft(T-M,F-3),B-=F,F<=V&&B>=3){F--;do{T++,U=(U<=3&&(U=(U<4096)&&(F=2)),L>=3&&F<=L){n=T+B-3,e=ft(T-1-S,L-3),B-=L-1,L-=2;do{++T<=n&&(U=(U<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const y=-2,x=-3,m=-5,v=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],A=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],U=[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],E=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],R=[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],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],I=15;function z(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,_,h){let w,p,b,g,y,v,k,A,U,E,R,D,z,F,S;E=0,y=s;do{n[t[e+E]]++,E++,y--}while(0!==y);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(A=u[0],v=1;v<=I&&0===n[v];v++);for(k=v,Ay&&(A=y),u[0]=A,F=1<D+A;){if(g++,D+=A,S=b-D,S=S>A?A:S,(p=1<<(v=k-D))>w+1&&(p-=w+1,z=k,v1440)return x;r[g]=R=_[0],_[0]+=S,0!==g?(a[g]=y,i[0]=v,i[1]=A,v=y>>>D-A,i[2]=R-r[g-1]-v,f.set(i,3*(r[g-1]+v))):c[0]=R}for(i[1]=k-D,E>=s?i[0]=192:h[E]>>D;v>>=1)y^=v;for(y^=v,U=(1<257?(_==x?f.msg="oversubscribed distance tree":_==m?(f.msg="incomplete distance tree",_=x):-4!=_&&(f.msg="empty distance tree with lengths",_=x),_):0)}}z.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=k,i[0]=A,0};function F(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,_=0,h=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,_,h,w,p,b,g,y,m,k,A,U;h=o.next_in_index,w=o.avail_in,f=s.bitb,_=s.bitk,p=s.write,b=p>=d[U+1],_-=d[U+1],0!=(16&u)){for(u&=15,m=d[U+2]+(f&v[u]),f>>=u,_-=u;_<15;)w--,f|=(255&o.read_byte(h++))<<_,_+=8;for(l=f&y,d=r,c=a,U=3*(c+l),u=d[U];;){if(f>>=d[U+1],_-=d[U+1],0!=(16&u)){for(u&=15;_>=u,_-=u,b-=m,p>=k)A=p-k,p-A>0&&2>p-A?(s.window[p++]=s.window[A++],s.window[p++]=s.window[A++],m-=2):(s.window.set(s.window.subarray(A,A+2),p),p+=2,A+=2,m-=2);else{A=p-k;do{A+=s.end}while(A<0);if(u=s.end-A,m>u){if(m-=u,p-A>0&&u>p-A)do{s.window[p++]=s.window[A++]}while(0!=--u);else s.window.set(s.window.subarray(A,A+u),p),p+=u,A+=u,u=0;A=0}}if(p-A>0&&m>p-A)do{s.window[p++]=s.window[A++]}while(0!=--m);else s.window.set(s.window.subarray(A,A+m),p),p+=m,A+=m,m=0;break}if(0!=(64&u))return o.msg="invalid distance code",m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,x;l+=d[U+2],l+=f&v[u],U=3*(c+l),u=d[U]}break}if(0!=(64&u))return 0!=(32&u)?(m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,1):(o.msg="invalid literal/length code",m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,x);if(l+=d[U+2],l+=f&v[u],U=3*(c+l),0===(u=d[U])){f>>=d[U+1],_-=d[U+1],s.window[p++]=d[U+2],b--;break}}else f>>=d[U+1],_-=d[U+1],s.window[p++]=d[U+2],b--}while(b>=258&&w>=10);return m=o.avail_in-w,m=_>>3>3:m,w+=m,h-=m,_-=m<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,_=o,r=l,h=d,n=null},t.proc=function(t,p,b){let g,m,k,A,U,E,R,D=0,I=0,z=0;for(z=p.next_in_index,A=p.avail_in,D=t.bitb,I=t.bitk,U=t.write,E=U=258&&A>=10&&(t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=U,b=w(u,f,i,_,r,h,t,p),z=p.next_in_index,A=p.avail_in,D=t.bitb,I=t.bitk,U=t.write,E=U>>=n[m+1],I-=n[m+1],k=n[m],0===k){l=n[m+2],e=6;break}if(0!=(16&k)){d=15&k,a=n[m+2],e=2;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}if(0!=(32&k)){e=7;break}return e=9,p.msg="invalid literal/length code",b=x,t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=U,t.inflate_flush(p,b);case 2:for(g=d;I>=g,I-=g,o=f,n=r,s=h,e=3;case 3:for(g=o;I>=n[m+1],I-=n[m+1],k=n[m],0!=(16&k)){d=15&k,c=n[m+2],e=4;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}return e=9,p.msg="invalid distance code",b=x,t.bitb=D,t.bitk=I,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=U,t.inflate_flush(p,b);case 4:for(g=d;I>=g,I-=g,e=5;case 5:for(R=U-c;R<0;)R+=t.end;for(;0!==a;){if(0===E&&(U==t.end&&0!==t.read&&(U=0,E=U7&&(I-=8,A++,z--),t.write=U,b=t.inflate_flush(p,b),U=t.write,E=Ut.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,w,p,b,g,m,k,A;for(b=t.next_in_index,g=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m>>1){case 0:w>>>=3,p-=3,h=7&p,w>>>=h,p-=h,r=1;break;case 1:U=[],E=[],R=[[]],D=[[]],z.inflate_trees_fixed(U,E,R,D),c.init(U[0],E[0],R[0],0,D[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=x,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=x,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);if(0===k&&(m==n.end&&0!==n.read&&(m=0,k=mg&&(h=g),h>k&&(h=k),n.window.set(t.read_buf(b,h),m),b+=h,g-=h,m+=h,k-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=x,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<>>=3,p-=3}for(;o<19;)i[S[o++]]=0;if(l[0]=7,h=_.inflate_trees_bits(i,l,d,f,t),0!=h)return(e=h)==x&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=l[0];p>>=h,p-=h,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;p>>=h,p-=h,a+=w&v[A],w>>>=A,p-=A,A=o,h=s,A+a>258+(31&h)+(h>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=x,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(d[0]=-1,I=[],F=[],C=[],T=[],I[0]=9,F[0]=6,h=s,h=_.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,F,C,T,f,t),0!=h)return h==x&&(i=null,r=9),e=h,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,n.inflate_flush(t,e);c.init(I[0],F[0],f,C[0],f,T[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=m,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),b=t.next_in_index,g=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m15?(t.inflateEnd(n),y):(t.wbits=i,n.istate.blocks=new C(n,1<>4)>r.wbits){r.mode=T,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=T,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=T,t.msg="need dictionary",r.marker=0,y;case 7:if(n=r.blocks.proc(t,n),n==x){r.mode=T,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case T:return x;default:return y}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return y;const a=t.istate;return r>=1<{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),i(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),i(this)}};function i(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const H="Abort error";async function j(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(l=0,d=0){const c=s.signal;if(l{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class at extends it{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class st extends nt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),_t(this.url)&&!this.preventHeadRequest){const t=await lt(Q,this.url,this.options);if(this.size=Number(t.headers.get(X)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(J)!=tt)throw new Error(Z);void 0===this.size&&await ot(this,this.options)}else await ot(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await lt($,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(Z);return new Uint8Array(await n.arrayBuffer())}return this.data||await ot(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function ot(t,e){const n=await lt($,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function lt(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(G+(r.statusText||r.status))}class dt extends nt{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),_t(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>ut(Q,this.url,(n=>{this.size=Number(n.getResponseHeader(X)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(J)==tt?t():e(new Error(Z)):void 0===this.size?ct(this,this.url).then((()=>t())).catch(e):t()}),e)));await ct(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await ct(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>ut($,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(Z)}}function ct(t,e){return new Promise(((n,i)=>ut($,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function ut(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(G+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class ft extends nt{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new dt(t,e):this.reader=new st(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function _t(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const ht=4294967295,wt=65535,pt=67324752,bt=134695760,gt=33639248,yt=101010256,xt=101075792,mt=117853008,vt=39169,kt=2048,At="/",Ut=new Date(2107,11,31),Et=new Date(1980,0,1),Rt="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Dt=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;Dt[t]=e}class It{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Dt[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const zt={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=zt.getPartial(n);return 32===i?t.concat(e):zt._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+zt.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=zt.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=zt.getPartial(r);return i.push(zt.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},Ft={bytes:{fromBits(t){const e=zt.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,d;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let c=s=0;!n[c];c^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[c]=a,i[a]=c,d=r[l=r[o=r[c]]];let u=16843009*d^65537*l^257*o^16843008*c,f=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][c]=f=f<<24^f>>>8,e[n][a]=u=u<<24^u>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],d=a[3],c=a[4];let u,f,_,h=t[0]^n[0],w=t[e?3:1]^n[1],p=t[2]^n[2],b=t[e?1:3]^n[3],g=4;for(let t=0;t>>24]^o[w>>16&255]^l[p>>8&255]^d[255&b]^n[g],f=s[w>>>24]^o[p>>16&255]^l[b>>8&255]^d[255&h]^n[g+1],_=s[p>>>24]^o[b>>16&255]^l[h>>8&255]^d[255&w]^n[g+2],b=s[b>>>24]^o[h>>16&255]^l[w>>8&255]^d[255&p]^n[g+3],g+=4,h=u,w=f,p=_;for(let t=0;t<4;t++)r[e?3&-t:t]=c[h>>>24]<<24^c[w>>16&255]<<16^c[p>>8&255]<<8^c[255&b]^n[g++],u=h,h=w,w=p,p=b,b=u;return r}}},Ct={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=zt.bitLength(e);for(let r=0;rt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const te=12;class ee{constructor(t,e){this.password=t,this.passwordVerification=e,ae(this,t)}async append(t){if(this.password){const e=ie(this,t.subarray(0,te));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Tt);t=t.subarray(te)}return ie(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class ne{constructor(t,e){this.passwordVerification=e,this.password=t,ae(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(te));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(re(this,i),0),n=te}else e=new Uint8Array(t.length),n=0;return e.set(re(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function ie(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function oe(t){const e=2|t.keys[2];return le(Math.imul(e,1^e)>>>8)}function le(t){return 255&t}function de(t){return 4294967295&t}const ce="deflate",ue="inflate",fe="Invalid signature";class _e{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new It,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new ee(e.password,e.passwordVerification):new Yt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(fe);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(fe)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class he{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new It,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new ne(e.password,e.passwordVerification):new Xt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const we="init",pe="append",be="flush",ge="message";var ye=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-full.min.js",document.baseURI).href)),t.worker.addEventListener(ge,r,!1),t.interface={append:t=>n({type:pe,data:t}),flush:()=>n({type:be})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:we,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==we||r==be||r==pe){const n=i.data;r==be?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(ce)?new he(t,e):e.codecType.startsWith(ue)?new _e(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let xe=[],me=[];function ve(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(xe.length!t.busy));return n?ye(n,t,e,ke,i,r):new Promise((n=>me.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function ke(t){const e=!me.length;if(e)xe=xe.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=me.splice(0,1);e(ye(t,n,i,ke,r,a))}return e}const Ae=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Ue{constructor(t){Ae.forEach((e=>this[e]=t[e]))}}const Ee="File format is not recognized",Re="End of central directory not found",De="End of Zip64 central directory not found",Ie="End of Zip64 central directory locator not found",ze="Central directory header not found",Fe="Local file header not found",Se="Zip64 extra field not found",Ce="File contains encrypted entry",Te="Encryption method not supported",Me="Compression method not supported",Be="utf-8",Le=["uncompressedSize","compressedSize","offset"];class We{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,o=this.compressionMethod,l=this.config,d=this.bitFlag,c=this.signature;let u=Ne(this,e,"password");if(u=u&&u.length&&u,s&&99!=s.originalCompressionMethod)throw new Error(Me);if(0!=o&&8!=o)throw new Error(Me);if(Ke(a,0)!=pt)throw new Error(Fe);const f=this.localDirectory={};Ve(f,a,4),f.rawExtraField=r.subarray(i+30+f.filenameLength,i+30+f.filenameLength+f.extraFieldLength),Oe(this,f,a,4);const _=i+30+f.filenameLength+f.extraFieldLength,h=d.encrypted&&f.bitFlag.encrypted,w=h&&!s;if(h){if(!w&&void 0===s.strength)throw new Error(Te);if(!u)throw new Error(Ce)}const p=await ve(l.Inflate,{codecType:ue,password:u,zipCrypto:w,encryptionStrength:s&&s.strength,signed:Ne(this,e,"checkSignature"),passwordVerification:w&&(d.dataDescriptor?this.rawLastModDate>>>8&255:c>>>24&255),signature:c,compressed:0!=o,encrypted:h,useWebWorkers:Ne(this,e,"useWebWorkers")},l);return t.initialized||await t.init(),await j(p,n,t,_,this.compressedSize,l,{onprogress:e.onprogress,signal:Ne(this,e,"signal")}),t.getData()}}function Ve(t,e,n){t.version=qe(e,n);const i=t.rawBitFlag=qe(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&kt)==kt},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=Ke(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=qe(e,n+22),t.extraFieldLength=qe(e,n+24)}function Oe(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==ht));for(let e=0;e{if(e[n]==ht){if(!t||void 0===t[n])throw new Error(Se);e[n]=t[n]}}))}(d,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Pe(c,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&Pe(u,"comment","rawComment",e,t);const f=e.extraFieldAES=a.get(39169);f?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=je(i,0),t.vendorId=je(i,2);const r=je(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=qe(i,5)}else e.compressionMethod=n}(f,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Pe(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=je(a,0),t.signature=Ke(a,1);const s=new It;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==Ke(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Ne(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function He(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n{if("function"==typeof URL.createObjectURL){const t=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],r=n.getPartial(i);return 32===r?t.concat(e):n._shiftRight(e,r,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(i),i=0;if(0===e)return r.concat(t);for(let n=0;n>>e),i=t[n]<<32-e;const a=t.length?t[t.length-1]:0,s=n.getPartial(a);return r.push(n.partial(e+s&31,e+s>32?i:r.pop(),1)),r}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let r;for(let n=0;n>>24,r<<=8;return i},toBits(t){const e=[];let i,r=0;for(i=0;i>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,d;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let c=s=0;!n[c];c^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[c]=a,i[a]=c,d=r[l=r[o=r[c]]];let u=16843009*d^65537*l^257*o^16843008*c,f=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][c]=f=f<<24^f>>>8,e[n][a]=u=u<<24^u>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],d=a[3],c=a[4];let u,f,_,h=t[0]^n[0],w=t[e?3:1]^n[1],p=t[2]^n[2],b=t[e?1:3]^n[3],g=4;for(let t=0;t>>24]^o[w>>16&255]^l[p>>8&255]^d[255&b]^n[g],f=s[w>>>24]^o[p>>16&255]^l[b>>8&255]^d[255&h]^n[g+1],_=s[p>>>24]^o[b>>16&255]^l[h>>8&255]^d[255&w]^n[g+2],b=s[b>>>24]^o[h>>16&255]^l[w>>8&255]^d[255&p]^n[g+3],g+=4,h=u,w=f,p=_;for(let t=0;t<4;t++)r[e?3&-t:t]=c[h>>>24]<<24^c[w>>16&255]<<16^c[p>>8&255]<<8^c[255&b]^n[g++],u=h,h=w,w=p,p=b,b=u;return r}},a=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,i){let r;if(!(r=e.length))return[];const a=n.bitLength(e);for(let n=0;nt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,E(this,t)}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return A(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,E(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function D(t){const e=2|t.keys[2];return I(Math.imul(e,1^e)>>>8)}function I(t){return 255&t}function z(t){return 4294967295&t}class F{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new b(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class S{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new g(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const C={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),T=function(t,e){return e.codecType.startsWith("deflate")?new S(t,e):e.codecType.startsWith("inflate")?new F(t,e):void 0}(n,e)},append:async t=>({data:await T.append(t.data)}),flush:()=>T.flush()};let T;function M(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=C[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const B=[0,1,2,3].concat(...M([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function L(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,_=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,_++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==_){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,_-=2}while(_>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function W(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function V(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}L._length_code=[0,1,2,3,4,5,6,7].concat(...M([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),L.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],L.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],L.d_code=function(t){return t<256?B[t]:B[256+(t>>>7)]},L.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],L.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],W.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],W.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],W.static_l_desc=new W(W.static_ltree,L.extra_lbits,257,286,15),W.static_d_desc=new W(W.static_dtree,L.extra_dbits,0,30,15),W.static_bl_desc=new W(null,L.extra_blbits,0,19,7);const O=[new V(0,0,0,0,0),new V(4,4,8,4,1),new V(4,5,16,8,1),new V(4,6,32,32,1),new V(4,4,16,16,2),new V(8,16,32,32,2),new V(8,16,128,128,2),new V(8,32,128,256,2),new V(32,128,258,1024,2),new V(32,258,258,4096,2)],P=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function N(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;Y>16-i?(n=t,Z|=n<>>16-Y,Y+=i-16):(Z|=t<=8&&(Q(255&Z),Z>>>=8,Y-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[q+2*j]=e>>>8&255,t.pending_buf[q+2*j+1]=255&e,t.pending_buf[V+j]=255&n,j++,0===e?F[2*n]++:(K++,e--,F[2*(L._length_code[n]+256+1)]++,S[2*L.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=m-b,a=0;a<30;a++)i+=S[2*a]*(5+L.extra_dbits[a]);if(i>>>=3,K8?$(Z):Y>0&&Q(255&Z),Z=0,Y=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),G=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),M.build_tree(t),s=function(){let e;for(J(F,T.max_code),J(S,M.max_code),B.build_tree(t),e=18;e>=3&&0===C[2*L.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(W.static_ltree,W.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?b:-1,m-b,t),b=m,e.flush_pending()}function ct(){let t,n,i,r;do{if(r=d-k-m,0===r&&0===m&&0===k)r=a;else if(-1==r)r--;else if(m>=a+a-262){l.set(l.subarray(a,a+a),0),v-=a,m-=a,b-=a,t=_,i=t;do{n=65535&u[--i],u[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&c[--i],c[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(l,m+k,r),k+=t,k>=3&&(f=255&l[m],f=(f<a-262?m-(a-262):0;let u=z;const f=o,_=m+258;let h=l[r+s-1],w=l[r+s];A>=I&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&l[e+s-1]==h&&l[e]==l[r]&&l[++e]==l[r+1]){r+=2,e++;do{}while(l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&r<_);if(n=258-(_-r),r=_-258,n>s){if(v=t,s=n,n>=u)break;h=l[r+s-1],w=l[r+s]}}}while((t=65535&c[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=F,T.stat_desc=W.static_l_desc,M.dyn_tree=S,M.stat_desc=W.static_d_desc,B.dyn_tree=C,B.stat_desc=W.static_bl_desc,Z=0,Y=0,G=8,X(),function(){d=2*a,u[_-1]=0;for(let t=0;t<_-1;t++)u[t]=0;E=O[R].max_lazy,I=O[R].good_length,z=O[R].nice_length,U=O[R].max_chain,m=0,b=0,k=0,g=A=2,x=0,f=0}(),0}t.depth=[],t.bl_count=[],t.heap=[],F=[],S=[],C=[],t.pqdownheap=function(e,n){const i=t.heap,r=i[n];let a=n<<1;for(;a<=t.heap_len&&(a9||8!=d||r<9||r>15||n<0||n>9||b<0||b>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(O[R].func!=O[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=O[R].max_lazy,I=O[R].good_length,z=O[R].nice_length,U=O[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,d=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,b=s,f=255&l[0],f=(f<4||h<0)return-2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=P[4],-2;if(0===d.avail_out)return d.msg=P[7],-5;var C;if(e=d,F=r,r=h,42==n&&(I=8+(s-8<<4)<<8,z=(R-1&255)>>1,z>3&&(z=3),I|=z<<6,0!==m&&(I|=32),I+=31-I%31,n=113,Q((C=I)>>8&255),Q(255&C)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&h<=F&&4!=h)return e.msg=P[7],-5;if(666==n&&0!==e.avail_in)return d.msg=P[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(S=-1,O[R].func){case 0:S=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(ct(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=b+r,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-b>=a-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:S=function(t){let n,i=0;for(;;){if(k<262){if(ct(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=rt(m-v,g-3),k-=g,g<=E&&k>=3){g--;do{m++,f=(f<=3&&(f=(f<4096)&&(g=2)),A>=3&&g<=A){i=m+k-3,n=rt(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}j.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new H,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const K=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],G=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Z=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Y=[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],X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],J=[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],Q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function $(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,_,h){let w,p,b,g,y,x,m,v,k,A,U,E,R,D,I;A=0,y=s;do{n[t[e+A]]++,A++,y--}while(0!==y);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(v=u[0],x=1;x<=15&&0===n[x];x++);for(m=x,vy&&(v=y),u[0]=v,D=1<E+v;){if(g++,E+=v,I=b-E,I=I>v?v:I,(p=1<<(x=m-E))>w+1&&(p-=w+1,R=m,x1440)return-3;r[g]=U=_[0],_[0]+=I,0!==g?(a[g]=y,i[0]=x,i[1]=v,x=y>>>E-v,i[2]=U-r[g-1]-x,f.set(i,3*(r[g-1]+x))):c[0]=U}for(i[1]=m-E,A>=s?i[0]=192:h[A]>>E;x>>=1)y^=x;for(y^=x,k=(1<257?(-3==_?f.msg="oversubscribed distance tree":-5==_?(f.msg="incomplete distance tree",_=-3):-4!=_&&(f.msg="empty distance tree with lengths",_=-3),_):0)}}function tt(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,_=0,h=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,_,h,w,p,b,g,y,x,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,_=s.bitk,p=s.write,b=p>=d[k+1],_-=d[k+1],0!=(16&u)){for(u&=15,x=d[k+2]+(f&K[u]),f>>=u,_-=u;_<15;)w--,f|=(255&o.read_byte(h++))<<_,_+=8;for(l=f&y,d=r,c=a,k=3*(c+l),u=d[k];;){if(f>>=d[k+1],_-=d[k+1],0!=(16&u)){for(u&=15;_>=u,_-=u,b-=x,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],x-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,x-=2);else{v=p-m;do{v+=s.end}while(v<0);if(u=s.end-v,x>u){if(x-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++]}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0}}if(p-v>0&&x>p-v)do{s.window[p++]=s.window[v++]}while(0!=--x);else s.window.set(s.window.subarray(v,v+x),p),p+=x,v+=x,x=0;break}if(0!=(64&u))return o.msg="invalid distance code",x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,-3;l+=d[k+2],l+=f&K[u],k=3*(c+l),u=d[k]}break}if(0!=(64&u))return 0!=(32&u)?(x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,1):(o.msg="invalid literal/length code",x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,-3);if(l+=d[k+2],l+=f&K[u],k=3*(c+l),0===(u=d[k])){f>>=d[k+1],_-=d[k+1],s.window[p++]=d[k+2],b--;break}}else f>>=d[k+1],_-=d[k+1],s.window[p++]=d[k+2],b--}while(b>=258&&w>=10);return x=o.avail_in-w,x=_>>3>3:x,w+=x,h-=x,_-=x<<3,s.bitb=f,s.bitk=_,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,_=o,r=l,h=d,n=null},t.proc=function(t,p,b){let g,y,x,m,v,k,A,U=0,E=0,R=0;for(R=p.next_in_index,m=p.avail_in,U=t.bitb,E=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,b=w(u,f,i,_,r,h,t,p),R=p.next_in_index,m=p.avail_in,U=t.bitb,E=t.bitk,v=t.write,k=v>>=n[y+1],E-=n[y+1],x=n[y],0===x){l=n[y+2],e=6;break}if(0!=(16&x)){d=15&x,a=n[y+2],e=2;break}if(0==(64&x)){o=x,s=y/3+n[y+2];break}if(0!=(32&x)){e=7;break}return e=9,p.msg="invalid literal/length code",b=-3,t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,t.inflate_flush(p,b);case 2:for(g=d;E>=g,E-=g,o=f,n=r,s=h,e=3;case 3:for(g=o;E>=n[y+1],E-=n[y+1],x=n[y],0!=(16&x)){d=15&x,c=n[y+2],e=4;break}if(0==(64&x)){o=x,s=y/3+n[y+2];break}return e=9,p.msg="invalid distance code",b=-3,t.bitb=U,t.bitk=E,p.avail_in=m,p.total_in+=R-p.next_in_index,p.next_in_index=R,t.write=v,t.inflate_flush(p,b);case 4:for(g=d;E>=g,E-=g,e=5;case 5:for(A=v-c;A<0;)A+=t.end;for(;0!==a;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(E-=8,m++,R--),t.write=v,b=t.inflate_flush(p,b),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let h,w,p,b,g,y,x,m;for(b=t.next_in_index,g=t.avail_in,w=n.bitb,p=n.bitk,y=n.write,x=y>>1){case 0:w>>>=3,p-=3,h=7&p,w>>>=h,p-=h,r=1;break;case 1:v=[],k=[],A=[[]],U=[[]],$.inflate_trees_fixed(v,k,A,U),c.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);if(0===x&&(y==n.end&&0!==n.read&&(y=0,x=yg&&(h=g),h>x&&(h=x),n.window.set(t.read_buf(b,h),y),b+=h,g-=h,y+=h,x-=h,0!=(a-=h))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<29||(h>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===g)return n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(b++))<>>=3,p-=3}for(;o<19;)i[et[o++]]=0;if(l[0]=7,h=_.inflate_trees_bits(i,l,d,f,t),0!=h)return-3==(e=h)&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);o=0,r=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let a,c;for(h=l[0];p>>=h,p-=h,i[o++]=c;else{for(m=18==c?7:c-14,a=18==c?11:3;p>>=h,p-=h,a+=w&K[m],w>>>=m,p-=m,m=o,h=s,m+a>258+(31&h)+(h>>5&31)||16==c&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);c=16==c?i[m-1]:0;do{i[m++]=c}while(0!=--a);o=m}}if(d[0]=-1,E=[],R=[],D=[],I=[],E[0]=9,R[0]=6,h=s,h=_.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,E,R,D,I,f,t),0!=h)return-3==h&&(i=null,r=9),e=h,n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,n.inflate_flush(t,e);c.init(E[0],R[0],f,D[0],f,I[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=g,t.total_in+=b-t.next_in_index,t.next_in_index=b,n.write=y,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),b=t.next_in_index,g=t.avail_in,w=n.bitb,p=n.bitk,y=n.write,x=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new nt(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}at.prototype={inflateInit:function(t){const e=this;return e.istate=new rt,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=q,self.Inflate=st}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));P({workerScripts:{inflate:[e],deflate:[e]}})}})(),P({Deflate:function(t){const e=new g,n=512,i=new Uint8Array(n);let r=t?t.level:-1;void 0===r&&(r=-1),e.deflateInit(r),e.next_out=i,this.append=function(t,r){let a,s,o=0,l=0,d=0;const c=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,a=e.deflate(0),0!=a)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?c.push(new Uint8Array(i)):c.push(new Uint8Array(i.subarray(0,e.next_out_index)))),d+=e.next_out_index,r&&e.next_in_index>0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new L,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,l=0,d=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===m){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=rt,t.BlobWriter=at,t.Data64URIReader=class extends nt{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_ABORT=H,t.ERR_BAD_FORMAT=Ee,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=ze,t.ERR_DUPLICATED_NAME=Ze,t.ERR_ENCRYPTED=Ce,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Ie,t.ERR_EOCDR_NOT_FOUND=Re,t.ERR_EOCDR_ZIP64_NOT_FOUND=De,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Se,t.ERR_HTTP_RANGE=Z,t.ERR_INVALID_COMMENT=Ye,t.ERR_INVALID_DATE=$e,t.ERR_INVALID_ENCRYPTION_STRENGTH=tn,t.ERR_INVALID_ENTRY_COMMENT=Xe,t.ERR_INVALID_ENTRY_NAME=Je,t.ERR_INVALID_EXTRAFIELD_DATA=nn,t.ERR_INVALID_EXTRAFIELD_TYPE=en,t.ERR_INVALID_PASSWORD=Tt,t.ERR_INVALID_SIGNATURE=fe,t.ERR_INVALID_VERSION=Qe,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Fe,t.ERR_UNSUPPORTED_COMPRESSION=Me,t.ERR_UNSUPPORTED_ENCRYPTION=Te,t.HttpRangeReader=class extends ft{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=ft,t.Reader=nt,t.TextReader=class extends nt{constructor(t){super(),this.blobReader=new rt(new Blob([t],{type:Y}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends it{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:Y})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:Y})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends nt{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends it{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=it,t.ZipReader=class{constructor(t,e={}){this.reader=t,this.options=e,this.config=O()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ee);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,yt,22,1048560);if(!n)throw new Error(Re);const i=new DataView(n.buffer);let r=Ke(i,12),a=Ke(i,16),s=qe(i,8),o=0;if(a==ht||r==ht||s==wt){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(Ke(i,0)!=mt)throw new Error(De);a=Ge(i,8);let l=await e.readUint8Array(a,56),d=new DataView(l.buffer);const c=n.offset-20-56;if(Ke(d,0)!=xt&&a!=c){const t=a;a=c,o=a-t,l=await e.readUint8Array(a,56),d=new DataView(l.buffer)}if(Ke(d,0)!=xt)throw new Error(Ie);s=Ge(d,24),r=Ge(i,4),a-=Ge(d,40)}if(a<0||a>=e.size)throw new Error(Ee);let l=0,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer);const u=n.offset-r;if(Ke(c,l)!=gt&&a!=u){const t=a;a=u,o=a-t,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer)}if(a<0||a>=e.size)throw new Error(Ee);const f=[];for(let e=0;ee.getData(t,n),f.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return f}async close(){}},t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=O(),this.files=new Map,this.offset=t.size,this.maxOutputSize=0}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(At)?t+=At:n.directory=t.endsWith(At),this.files.has(t))throw new Error(Ze);const i=(new TextEncoder).encode(t);if(i.length>wt)throw new Error(Je);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>wt)throw new Error(Xe);const s=this.options.version||n.version||0;if(s>wt)throw new Error(Qe);const o=n.lastModDate||new Date;if(oUt)throw new Error($e);const l=an(this,n,"password"),d=an(this,n,"encryptionStrength")||3,c=an(this,n,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error(tn);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const f=n.extraField;if(f){let t=0,e=0;f.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),f.forEach(((t,n)=>{if(n>wt)throw new Error(en);if(t.length>wt)throw new Error(nn);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const _=e?Math.floor(1.05*e.size):0;this.maxOutputSize+=_,await Promise.resolve();const h=n.zip64||this.options.zip64||this.offset>=ht||_>=ht||this.offset+this.maxOutputSize>=ht,w=an(this,n,"level"),p=an(this,n,"useWebWorkers"),b=an(this,n,"bufferedWrite");let g=an(this,n,"keepOrder"),y=an(this,n,"dataDescriptor");const x=an(this,n,"signal");void 0===y&&(y=!0),void 0===g&&(g=!0);const m=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,l;r.set(e,null);try{let d,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>l=t))),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(d=new at,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,d=0!==l&&!i.directory,c=i.zip64;let u,f;if(o&&!i.zipCrypto){u=new Uint8Array(rn.length+2);const t=new DataView(u.buffer);on(t,0,vt),u.set(rn,2),f=i.encryptionStrength,sn(t,8,f)}else u=new Uint8Array(0);const _={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let h=kt;i.dataDescriptor&&(h|=8);let w=0;d&&(w=8);c&&(_.version=_.version>45?_.version:45);o&&(h|=1,i.zipCrypto||(_.version=_.version>51?_.version:51,w=99,d&&(_.rawExtraFieldAES[9]=8)));const p=_.headerArray=new Uint8Array(26),b=new DataView(p.buffer);on(b,0,_.version),on(b,2,h),on(b,4,w);const g=new Uint32Array(1),y=new DataView(g.buffer);on(y,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),on(y,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=g[0];ln(b,6,x),on(b,22,r.length),on(b,24,0),on(b,24,u.length+_.rawExtraField.length);const m=new Uint8Array(30+r.length+u.length+_.rawExtraField.length);let v;ln(new DataView(m.buffer),0,pt),m.set(p,4),m.set(r,30),m.set(u,30+r.length),m.set(_.rawExtraField,30+r.length+u.length);let k=0,A=0;if(t){k=t.size;const r=await ve(n.Deflate,{codecType:ce,level:l,password:s,encryptionStrength:f,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:d,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),v=await j(r,t,e,0,k,n,{onprogress:i.onprogress,signal:i.signal}),A=v.length}else await e.writeUint8Array(m);let U,E=new Uint8Array(0);i.dataDescriptor&&(E=new Uint8Array(c?24:16),U=new DataView(E.buffer),ln(U,0,bt));if(t)if(o&&!i.zipCrypto||void 0===v.signature||(ln(b,10,v.signature),_.signature=v.signature,i.dataDescriptor&&ln(U,4,v.signature)),c){const t=new DataView(_.rawExtraFieldZip64.buffer);on(t,0,1),on(t,2,24),ln(b,14,ht),dn(t,12,BigInt(A)),ln(b,18,ht),dn(t,4,BigInt(k)),i.dataDescriptor&&(dn(U,8,BigInt(A)),dn(U,16,BigInt(k)))}else ln(b,14,A),ln(b,18,k),i.dataDescriptor&&(ln(U,8,A),ln(U,12,k));i.dataDescriptor&&await e.writeUint8Array(E);const R=m.length+(v?v.length:0)+E.length;return Object.assign(_,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),_}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),d!=a){const e=d.getData(),n=new FileReader,r=new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)})),[s]=await Promise.all([r,t.lockWrite,o]);if(!i.dataDescriptor){const t=new DataView(s);c.encrypted&&!i.zipCrypto||ln(t,14,c.signature),c.zip64?(ln(t,18,ht),ln(t,22,ht)):(ln(t,18,c.compressedSize),ln(t,22,c.uncompressedSize))}await a.writeUint8Array(new Uint8Array(s))}if(c.offset=t.offset,c.zip64){dn(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{l&&l(),s&&s()}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:u,zip64:h,password:l,level:w,useWebWorkers:p,encryptionStrength:d,zipCrypto:c,bufferedWrite:b,keepOrder:g,dataDescriptor:y,signal:x}));return this.maxOutputSize-=_,Object.assign(m,{name:t,comment:r,extraField:f}),new Ue(m)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=ht||r>=ht||s>=wt,l=new Uint8Array(r+(o?98:22)),d=new DataView(l.buffer);if(t.length){if(!(t.length<=wt))throw new Error(Ye);on(d,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;ln(d,i,gt),on(d,i+4,t.version),l.set(t.headerArray,i+6),on(d,i+30,a),on(d,i+32,t.rawComment.length),t.directory&&sn(d,i+38,16),t.zip64?ln(d,i+42,ht):ln(d,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(ln(d,i,xt),dn(d,i+4,BigInt(44)),on(d,i+12,45),on(d,i+14,45),dn(d,i+24,BigInt(s)),dn(d,i+32,BigInt(s)),dn(d,i+40,BigInt(r)),dn(d,i+48,BigInt(a)),ln(d,i+56,mt),dn(d,i+64,BigInt(a)+BigInt(r)),ln(d,i+72,1),s=wt,a=ht,r=ht,i+=76),ln(d,i,yt),on(d,i+8,s),on(d,i+10,s),ln(d,i+12,r),ln(d,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=P,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={},n)=>({Deflate:N(t.Deflate,e.deflate,n),Inflate:N(t.Inflate,e.inflate,n)}),Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/zip-no-worker-deflate.min.js b/dist/zip-no-worker-deflate.min.js index d7c7636b..92b1bf63 100644 --- a/dist/zip-no-worker-deflate.min.js +++ b/dist/zip-no-worker-deflate.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e=256,n=256,r=-2,i=-5;function s(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const a=[0,1,2,3].concat(...s([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function o(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const r=t.dyn_tree,i=t.stat_desc.static_tree,s=t.stat_desc.elems;let a,o,c,l=-1;for(n.heap_len=0,n.heap_max=573,a=0;a=1;a--)n.pqdownheap(r,a);c=s;do{a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,r[2*c]=r[2*a]+r[2*o],n.depth[c]=Math.max(n.depth[a],n.depth[o])+1,r[2*a+1]=r[2*o+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,a=t.stat_desc.max_length;let o,c,l,h,d,u,f=0;for(h=0;h<=15;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)c=e.heap[o],h=n[2*n[2*c+1]+1]+1,h>a&&(h=a,f++),n[2*c+1]=h,c>t.max_code||(e.bl_count[h]++,d=0,c>=s&&(d=i[c-s]),u=n[2*c],e.opt_len+=u*(h+d),r&&(e.static_len+=u*(r[2*c+1]+d)));if(0!==f){do{for(h=a-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[a]--,f-=2}while(f>0);for(h=a;0!==h;h--)for(c=e.bl_count[h];0!==c;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=h&&(e.opt_len+=(h-n[2*l+1])*n[2*l],n[2*l+1]=h),c--)}}(n),function(t,n,r){const i=[];let s,a,o,c=0;for(s=1;s<=15;s++)i[s]=c=c+r[s-1]<<1;for(a=0;a<=n;a++)o=t[2*a+1],0!==o&&(t[2*a]=e(i[o]++,o))}(r,t.max_code,n.bl_count)}}function c(t,e,n,r,i){const s=this;s.static_tree=t,s.extra_bits=e,s.extra_base=n,s.elems=r,s.max_length=i}o._length_code=[0,1,2,3,4,5,6,7].concat(...s([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),o.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],o.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],o.d_code=function(t){return t<256?a[t]:a[256+(t>>>7)]},o.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],c.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],c.static_l_desc=new c(c.static_ltree,o.extra_lbits,257,286,15),c.static_d_desc=new c(c.static_dtree,o.extra_dbits,0,30,15),c.static_bl_desc=new c(null,o.extra_blbits,0,19,7);function l(t,e,n,r,i){const s=this;s.good_length=t,s.max_lazy=e,s.nice_length=n,s.max_chain=r,s.func=i}const h=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],d=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],u=113,f=666,p=258,w=262;function g(t,e,n,r){const i=t[2*e],s=t[2*n];return i>>8&255)}function ct(t,e){let n;const r=e;rt>16-r?(n=t,nt|=n<>>16-rt,rt+=r-16):(nt|=t<=8&&(at(255&nt),nt>>>=8,rt-=8)}function ut(n,r){let i,s,a;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[Y+Q]=255&r,Q++,0===n?O[2*r]++:(tt++,n--,O[2*(o._length_code[r]+e+1)]++,j[2*o.d_code(n)]++),0==(8191&Q)&&P>2){for(i=8*Q,s=T-I,a=0;a<30;a++)i+=j[2*a]*(5+o.extra_dbits[a]);if(i>>>=3,tt8?ot(nt):rt>0&&at(255&nt),nt=0,rt=0}function wt(e,n,r){ct(0+(r?1:0),3),function(e,n,r){pt(),et=8,r&&(ot(n),ot(~n)),t.pending_buf.set(x.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function gt(e,n,r){let i,s,a=0;P>0?(K.build_tree(t),Z.build_tree(t),a=function(){let e;for(st(O,K.max_code),st(j,Z.max_code),X.build_tree(t),e=18;e>=3&&0===G[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),i=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!=e?wt(e,n,r):s==i?(ct(2+(r?1:0),3),ft(c.static_ltree,c.static_dtree)):(ct(4+(r?1:0),3),function(t,e,n){let r;for(ct(t-257,5),ct(e-1,5),ct(n-4,4),r=0;r=0?I:-1,T-I,t),I=T,s.flush_pending()}function _t(){let t,e,n,r;do{if(r=A-B-T,0===r&&0===T&&0===B)r=_;else if(-1==r)r--;else if(T>=_+_-w){x.set(x.subarray(_,_+_),0),W-=_,T-=_,I-=_,t=k,n=t;do{e=65535&v[--n],v[n]=e>=_?e-_:0}while(0!=--t);t=_,n=t;do{e=65535&U[--n],U[n]=e>=_?e-_:0}while(0!=--t);r+=_}if(0===s.avail_in)return;t=s.read_buf(x,T+B,r),B+=t,B>=3&&(E=255&x[T],E=(E<_-w?T-(_-w):0;let o=N;const c=m,l=T+p;let h=x[i+s-1],d=x[i+s];M>=q&&(r>>=2),o>B&&(o=B);do{if(e=t,x[e+s]==d&&x[e+s-1]==h&&x[e]==x[i]&&x[++e]==x[i+1]){i+=2,e++;do{}while(x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&is){if(W=t,s=n,n>=o)break;h=x[i+s-1],d=x[i+s]}}}while((t=65535&U[t&c])>a&&0!=--r);return s<=B?s:B}function mt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,a=u,y=0,K.dyn_tree=O,K.stat_desc=c.static_l_desc,Z.dyn_tree=j,Z.stat_desc=c.static_d_desc,X.dyn_tree=G,X.stat_desc=c.static_bl_desc,nt=0,rt=0,et=8,it(),function(){A=2*_,v[k-1]=0;for(let t=0;t9||8!=s||i<9||i>15||n<0||n>9||o<0||o>2?r:(e.dstate=t,b=i,_=1<9||n<0||n>2?r:(h[P].func!=h[e].func&&0!==t.total_in&&(i=t.deflate(1)),P!=e&&(P=e,V=h[P].max_lazy,q=h[P].good_length,N=h[P].nice_length,H=h[P].max_chain),L=n,i)},t.deflateSetDictionary=function(t,e,n){let i,s=n,o=0;if(!e||42!=a)return r;if(s<3)return 0;for(s>_-w&&(s=_-w,o=n-s),x.set(e.subarray(o,o+s),0),T=s,I=s,E=255&x[0],E=(E<4||o<0)return r;if(!e.next_out||!e.next_in&&0!==e.avail_in||a==f&&4!=o)return e.msg=d[4],r;if(0===e.avail_out)return e.msg=d[7],i;var q;if(s=e,R=y,y=o,42==a&&(g=8+(b-8<<4)<<8,A=(P-1&255)>>1,A>3&&(A=3),g|=A<<6,0!==T&&(g|=32),g+=31-g%31,a=u,at((q=g)>>8&255),at(255&q)),0!==t.pending){if(s.flush_pending(),0===s.avail_out)return y=-1,0}else if(0===s.avail_in&&o<=R&&4!=o)return s.msg=d[7],i;if(a==f&&0!==s.avail_in)return e.msg=d[7],i;if(0!==s.avail_in||0!==B||0!=o&&a!=f){switch(H=-1,h[P].func){case 0:H=function(t){let e,n=65535;for(n>l-5&&(n=l-5);;){if(B<=1){if(_t(),0===B&&0==t)return 0;if(0===B)break}if(T+=B,B=0,e=I+n,(0===T||T>=e)&&(B=T-e,T=e,yt(!1),0===s.avail_out))return 0;if(T-I>=_-w&&(yt(!1),0===s.avail_out))return 0}return yt(4==t),0===s.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:H=function(t){let e,n=0;for(;;){if(B=3&&(E=(E<=3)if(e=ut(T-W,S-3),B-=S,S<=V&&B>=3){S--;do{T++,E=(E<=3&&(E=(E<4096)&&(S=2)),M>=3&&S<=M){n=T+B-3,e=ut(T-1-C,M-3),B-=M-1,M-=2;do{++T<=n&&(E=(E<n&&(i=n),0===i?0:(r.avail_in-=i,t.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),e),r.next_in_index+=i,r.total_in+=i,i)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const b={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},m=Object.assign({},b);function x(t){if(void 0!==t.chunkSize&&(m.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(m.maxWorkers=t.maxWorkers),void 0!==t.useWebWorkers&&(m.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(m.Deflate=t.Deflate),void 0!==t.Inflate&&(m.Inflate=t.Inflate),void 0!==t.workerScripts){if(t.workerScripts.deflate){if(!Array.isArray(t.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.inflate=t.workerScripts.inflate}}}const A="HTTP error ",U="HTTP Range not supported",v="text/plain",E="Content-Length",k="Accept-Ranges",R="HEAD",z="GET",D="bytes";class I{constructor(){this.size=0}init(){this.initialized=!0}}class S extends I{}class C extends I{writeUint8Array(t){this.size+=t.length}}class F extends S{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((r,i)=>{n.onload=t=>r(new Uint8Array(t.target.result)),n.onerror=i,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class T extends C{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class W extends S{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),q(this.url)&&!this.preventHeadRequest){const t=await M(R,this.url,this.options);if(this.size=Number(t.headers.get(E)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(k)!=D)throw new Error(U);void 0===this.size&&await B(this,this.options)}else await B(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await M(z,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(U);return new Uint8Array(await n.arrayBuffer())}return this.data||await B(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function B(t,e){const n=await M(z,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function M(t,e,n,r){r=Object.assign({},n.headers,r);const i=await fetch(e,Object.assign({},n,{method:t,headers:r}));if(i.status<400)return i;throw new Error(A+(i.statusText||i.status))}class H extends S{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),q(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>P(R,this.url,(n=>{this.size=Number(n.getResponseHeader(E)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(k)==D?t():e(new Error(U)):void 0===this.size?V(this,this.url).then((()=>t())).catch(e):t()}),e)));await V(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await V(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,r)=>P(z,this.url,(t=>n(new Uint8Array(t.response))),r,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(U)}}function V(t,e){return new Promise(((n,r)=>P(z,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),r)))}function P(t,e,n,r,i=[]){const s=new XMLHttpRequest;return s.addEventListener("load",(()=>{s.status<400?n(s):r(A+(s.statusText||s.status))}),!1),s.addEventListener("error",r,!1),s.open(t,e),i.forEach((t=>s.setRequestHeader(t[0],t[1]))),s.responseType="arraybuffer",s.send(),s}class L extends S{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new H(t,e):this.reader=new W(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function q(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const N=4294967295,O=65535,j=67324752,G=134695760,K=new Date(2107,11,31),Z=new Date(1980,0,1),X=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;X[t]=e}class Y{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,r=0|t.length;n>>8^X[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const J={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],r=J.getPartial(n);return 32===r?t.concat(e):J._shiftRight(e,r,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+J.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=J.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(let i=0;i>>e),n=t[i]<<32-e;const i=t.length?t[t.length-1]:0,s=J.getPartial(i);return r.push(J.partial(e+s&31,e+s>32?n:r.pop(),1)),r}},Q={bytes:{fromBits(t){const e=J.bitLength(t)/8,n=new Uint8Array(e);let r;for(let i=0;i>>24,r<<=8;return n},toBits(t){const e=[];let n,r=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],s%i==0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),a[s]=a[s-i]^t}for(let t=0;s;t++,s--){const e=a[3&t?s:s-4];o[t]=s<=4||t<4?e:r[0][n[e>>>24]]^r[1][n[e>>16&255]]^r[2][n[e>>8&255]]^r[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],r=e[4],i=[],s=[];let a,o,c,l;for(let t=0;t<256;t++)s[(i[t]=t<<1^283*(t>>7))^t]=t;for(let h=a=0;!n[h];h^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[h]=s,r[s]=h,l=i[c=i[o=i[h]]];let d=16843009*l^65537*c^257*o^16843008*h,u=257*i[s]^16843008*s;for(let n=0;n<4;n++)t[n][h]=u=u<<24^u>>>8,e[n][s]=d=d<<24^d>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],r=n.length/4-2,i=[0,0,0,0],s=this._tables[e],a=s[0],o=s[1],c=s[2],l=s[3],h=s[4];let d,u,f,p=t[0]^n[0],w=t[e?3:1]^n[1],g=t[2]^n[2],y=t[e?1:3]^n[3],_=4;for(let t=0;t>>24]^o[w>>16&255]^c[g>>8&255]^l[255&y]^n[_],u=a[w>>>24]^o[g>>16&255]^c[y>>8&255]^l[255&p]^n[_+1],f=a[g>>>24]^o[y>>16&255]^c[p>>8&255]^l[255&w]^n[_+2],y=a[y>>>24]^o[p>>16&255]^c[w>>8&255]^l[255&g]^n[_+3],_+=4,p=d,w=u,g=f;for(let t=0;t<4;t++)i[e?3&-t:t]=h[p>>>24]<<24^h[w>>16&255]<<16^h[g>>8&255]<<8^h[255&y]^n[_++],d=p,p=w,w=g,g=y,y=d;return i}}},tt={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let r;if(!(r=e.length))return[];const i=J.bitLength(e);for(let i=0;it.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const xt=12;class At{constructor(t,e){this.password=t,this.passwordVerification=e,kt(this,t)}async append(t){if(this.password){const e=vt(this,t.subarray(0,xt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(et);t=t.subarray(xt)}return vt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class Ut{constructor(t,e){this.passwordVerification=e,this.password=t,kt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const r=crypto.getRandomValues(new Uint8Array(xt));r[11]=this.passwordVerification,e=new Uint8Array(t.length+r.length),e.set(Et(this,r),0),n=xt}else e=new Uint8Array(t.length),n=0;return e.set(Et(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function vt(t,e){const n=new Uint8Array(e.length);for(let r=0;r>>24]),t.keys[2]=~t.crcKey2.get()}function zt(t){const e=2|t.keys[2];return Dt(Math.imul(e,1^e)>>>8)}function Dt(t){return 255&t}function It(t){return 4294967295&t}const St="deflate",Ct="Invalid signature";class Ft{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Y,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new At(e.password,e.passwordVerification):new gt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(Ct);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(Ct)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Tt{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Y,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new Ut(e.password,e.passwordVerification):new yt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const r=new Uint8Array(e.length+n.data.length);r.set(e,0),r.set(n.data,e.length),e=r}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Wt="init",Bt="append",Mt="flush",Ht="message";var Vt=(t,e,n,r,i,s)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=s,t.webWorker=i,t.onTaskFinished=()=>{t.busy=!1;r(t)&&t.worker&&t.worker.terminate()},i?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-deflate.min.js",document.baseURI).href)),t.worker.addEventListener(Ht,i,!1),t.interface={append:t=>n({type:Bt,data:t}),flush:()=>n({type:Mt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await r({scripts:n,type:Wt,options:e})}return r(n)}function r(n){const r=t.worker,i=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,r.postMessage(n,[n.data])}catch(t){r.postMessage(n)}else r.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return i}function i(n){const r=n.data;if(e){const n=r.error,i=r.type;if(n){const r=new Error(n.message);r.stack=n.stack,e.reject(r),e=null,t.onTaskFinished()}else if(i==Wt||i==Mt||i==Bt){const n=r.data;i==Mt?(e.resolve({data:new Uint8Array(n),signature:r.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(St)?new Tt(t,e):e.codecType.startsWith("inflate")?new Ft(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Pt=[],Lt=[];function qt(t){const e=!Lt.length;if(e)Pt=Pt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:r,webWorker:i,scripts:s}]=Lt.splice(0,1);e(Vt(t,n,r,qt,i,s))}return e}function Nt(t){if(t&&t.aborted)throw new Error("Abort error")}async function Ot(t,e){return e.length&&await t.writeUint8Array(e),e.length}const jt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Gt{constructor(t){jt.forEach((e=>this[e]=t[e]))}}const Kt="File already exists",Zt="Zip file comment exceeds 64KB",Xt="File entry comment exceeds 64KB",Yt="File entry name exceeds 64KB",Jt="Version exceeds 65535",Qt="The modification date must be between 1/1/1980 and 12/31/2107",$t="The strength must equal 1, 2, or 3",te="Extra field type exceeds 65535",ee="Extra field data exceeds 64KB",ne=new Uint8Array([7,0,2,0,65,69,3,0,0]);function re(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function ie(t,e,n){t.setUint8(e,n)}function se(t,e,n){t.setUint16(e,n,!0)}function ae(t,e,n){t.setUint32(e,n,!0)}function oe(t,e,n){t.setBigUint64(e,n,!0)}x({Deflate:function(t){const e=new _,n=512,r=new Uint8Array(n);let i=t?t.level:-1;void 0===i&&(i=-1),e.deflateInit(i),e.next_out=r,this.append=function(t,i){let s,a,o=0,c=0,l=0;const h=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,s=e.deflate(0),0!=s)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?h.push(new Uint8Array(r)):h.push(new Uint8Array(r.subarray(0,e.next_out_index)))),l+=e.next_out_index,i&&e.next_in_index>0&&e.next_in_index!=o&&(i(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return a=new Uint8Array(l),h.forEach((function(t){a.set(t,c),c+=t.length})),a}},this.flush=function(){let t,i,s=0,a=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(r.subarray(0,e.next_out_index))),a+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),i=new Uint8Array(a),o.forEach((function(t){i.set(t,s),s+=t.length})),i}}}),t.BlobReader=F,t.BlobWriter=T,t.Data64URIReader=class extends S{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),r=4*Math.floor(t/3),i=atob(this.dataURI.substring(r+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),s=t-3*Math.floor(r/4);for(let t=s;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_DUPLICATED_NAME=Kt,t.ERR_HTTP_RANGE=U,t.ERR_INVALID_COMMENT=Zt,t.ERR_INVALID_DATE=Qt,t.ERR_INVALID_ENCRYPTION_STRENGTH=$t,t.ERR_INVALID_ENTRY_COMMENT=Xt,t.ERR_INVALID_ENTRY_NAME=Yt,t.ERR_INVALID_EXTRAFIELD_DATA=ee,t.ERR_INVALID_EXTRAFIELD_TYPE=te,t.ERR_INVALID_VERSION=Jt,t.HttpRangeReader=class extends L{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=L,t.Reader=S,t.TextReader=class extends S{constructor(t){super(),this.blobReader=new F(new Blob([t],{type:v}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends C{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:v})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:v})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends S{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends C{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=C,t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=m,this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith("/")?t+="/":n.directory=t.endsWith("/"),this.files.has(t))throw new Error(Kt);const r=(new TextEncoder).encode(t);if(r.length>O)throw new Error(Yt);const i=n.comment||"",s=(new TextEncoder).encode(i);if(s.length>O)throw new Error(Xt);const a=this.options.version||n.version||0;if(a>O)throw new Error(Jt);const o=n.lastModDate||new Date;if(oK)throw new Error(Qt);const c=re(this,n,"password"),l=re(this,n,"encryptionStrength")||3,h=re(this,n,"zipCrypto");if(void 0!==c&&void 0!==l&&(l<1||l>3))throw new Error($t);e&&!e.initialized&&await e.init();let d=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),d=new Uint8Array(t),u.forEach(((t,n)=>{if(n>O)throw new Error(te);if(t.length>O)throw new Error(ee);d.set(new Uint16Array([n]),e),d.set(new Uint16Array([t.length]),e+2),d.set(t,e+4),e+=4+t.length}))}const f=e?1.05*e.size:0,p=n.zip64||this.options.zip64||this.offset>=N||f>=N||this.offset+f>=N,w=re(this,n,"level"),g=re(this,n,"useWebWorkers"),y=re(this,n,"bufferedWrite"),_=re(this,n,"keepOrder");let b=re(this,n,"dataDescriptor");const m=re(this,n,"signal");void 0===b&&(b=!0);const x=await async function(t,e,n,r){const i=t.files,s=t.writer;let a,o,c;i.set(e,null);try{let l,h;try{r.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>c=t))),r.bufferedWrite||t.lockWrite||!r.dataDescriptor?(l=new T,await l.init()):(t.lockWrite=new Promise((t=>a=t)),s.initialized||await s.init(),l=s),h=await async function(t,e,n,r){const i=r.rawFilename,s=r.lastModDate,a=r.password,o=Boolean(a&&a.length),c=r.level,l=0!==c&&!r.directory,h=r.zip64;let d,u;if(o&&!r.zipCrypto){d=new Uint8Array(ne.length+2);const t=new DataView(d.buffer);se(t,0,39169),d.set(ne,2),u=r.encryptionStrength,ie(t,8,u)}else d=new Uint8Array(0);const f={version:r.version||20,zip64:h,directory:Boolean(r.directory),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:r.rawComment,rawExtraFieldZip64:h?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:d,rawExtraField:r.rawExtraField};let p=2048;r.dataDescriptor&&(p|=8);let w=0;l&&(w=8);h&&(f.version=f.version>45?f.version:45);o&&(p|=1,r.zipCrypto||(f.version=f.version>51?f.version:51,w=99,l&&(f.rawExtraFieldAES[9]=8)));const g=f.headerArray=new Uint8Array(26),y=new DataView(g.buffer);se(y,0,f.version),se(y,2,p),se(y,4,w);const _=new Uint32Array(1),b=new DataView(_.buffer);se(b,0,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2),se(b,2,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate());const m=_[0];ae(y,6,m),se(y,22,i.length),se(y,24,0);const x=new Uint8Array(30+i.length);let A;ae(new DataView(x.buffer),0,j),x.set(g,4),x.set(i,30);let U=0,v=0;if(t){U=t.size;const i=await function(t,e,n){const r=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),i=r&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Pt.length!t.busy));return n?Vt(n,t,e,qt,r,i):new Promise((n=>Lt.push({resolve:n,codecConstructor:t,options:e,webWorker:r,scripts:i})))}}(n.Deflate,{codecType:St,level:c,password:a,encryptionStrength:u,zipCrypto:o&&r.zipCrypto,passwordVerification:o&&r.zipCrypto&&m>>8&255,signed:!0,compressed:l,encrypted:o,useWebWorkers:r.useWebWorkers},n);await e.writeUint8Array(x),A=await async function(t,e,n,r,i,s,a){const o=Math.max(s.chunkSize,64);return async function s(c=0,l=0){const h=a.signal;if(c{n.onload=e=>t(e.target.result),n.onerror=r,n.readAsArrayBuffer(e)})),[a]=await Promise.all([i,t.lockWrite,o]);if(!r.dataDescriptor){const t=new DataView(a);h.encrypted&&!r.zipCrypto||ae(t,14,h.signature),h.zip64?(ae(t,18,N),ae(t,22,N)):(ae(t,18,h.compressedSize),ae(t,22,h.uncompressedSize))}await s.writeUint8Array(new Uint8Array(a))}if(h.offset=t.offset,h.zip64){oe(new DataView(h.rawExtraFieldZip64.buffer),20,BigInt(h.offset))}return t.offset+=h.length,h}finally{c&&c(),a&&a()}}(this,t,e,Object.assign({},n,{rawFilename:r,rawComment:s,version:a,lastModDate:o,rawExtraField:d,zip64:p,password:c,level:w,useWebWorkers:g,encryptionStrength:l,zipCrypto:h,bufferedWrite:y,keepOrder:_,dataDescriptor:b,signal:m}));return Object.assign(x,{name:t,comment:i,extraField:u}),new Gt(x)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let r=0,i=0,s=this.offset,a=n.size;for(const[,t]of n)i+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||s>=N||i>=N||a>=O,c=new Uint8Array(i+(o?98:22)),l=new DataView(c.buffer);if(t.length){if(!(t.length<=O))throw new Error(Zt);se(l,r+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,i=t.rawExtraFieldAES,s=n.length+i.length+t.rawExtraField.length;ae(l,r,33639248),se(l,r+4,t.version),c.set(t.headerArray,r+6),se(l,r+30,s),se(l,r+32,t.rawComment.length),t.directory&&ie(l,r+38,16),t.zip64?ae(l,r+42,N):ae(l,r+42,t.offset),c.set(e,r+46),c.set(n,r+46+e.length),c.set(i,r+46+e.length+n.length),c.set(t.rawExtraField,46+e.length+n.length+i.length),c.set(t.rawComment,r+46+e.length+s),r+=46+e.length+s+t.rawComment.length}return o&&(ae(l,r,101075792),oe(l,r+4,BigInt(44)),se(l,r+12,45),se(l,r+14,45),oe(l,r+24,BigInt(a)),oe(l,r+32,BigInt(a)),oe(l,r+40,BigInt(i)),oe(l,r+48,BigInt(s)),ae(l,r+56,117853008),oe(l,r+64,BigInt(s)+BigInt(i)),ae(l,r+72,1),a=O,s=N,i=N,r+=76),ae(l,r,101010256),se(l,r+8,a),se(l,r+10,a),ae(l,r+12,i),ae(l,r+16,s),await e.writeUint8Array(c),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=x,t.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(t,"__esModule",{value:!0})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e=256,n=256,r=-2,i=-5;function s(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const a=[0,1,2,3].concat(...s([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function o(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const r=t.dyn_tree,i=t.stat_desc.static_tree,s=t.stat_desc.elems;let a,o,c,l=-1;for(n.heap_len=0,n.heap_max=573,a=0;a=1;a--)n.pqdownheap(r,a);c=s;do{a=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(r,1),o=n.heap[1],n.heap[--n.heap_max]=a,n.heap[--n.heap_max]=o,r[2*c]=r[2*a]+r[2*o],n.depth[c]=Math.max(n.depth[a],n.depth[o])+1,r[2*a+1]=r[2*o+1]=c,n.heap[1]=c++,n.pqdownheap(r,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,a=t.stat_desc.max_length;let o,c,l,h,d,u,f=0;for(h=0;h<=15;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)c=e.heap[o],h=n[2*n[2*c+1]+1]+1,h>a&&(h=a,f++),n[2*c+1]=h,c>t.max_code||(e.bl_count[h]++,d=0,c>=s&&(d=i[c-s]),u=n[2*c],e.opt_len+=u*(h+d),r&&(e.static_len+=u*(r[2*c+1]+d)));if(0!==f){do{for(h=a-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[a]--,f-=2}while(f>0);for(h=a;0!==h;h--)for(c=e.bl_count[h];0!==c;)l=e.heap[--o],l>t.max_code||(n[2*l+1]!=h&&(e.opt_len+=(h-n[2*l+1])*n[2*l],n[2*l+1]=h),c--)}}(n),function(t,n,r){const i=[];let s,a,o,c=0;for(s=1;s<=15;s++)i[s]=c=c+r[s-1]<<1;for(a=0;a<=n;a++)o=t[2*a+1],0!==o&&(t[2*a]=e(i[o]++,o))}(r,t.max_code,n.bl_count)}}function c(t,e,n,r,i){const s=this;s.static_tree=t,s.extra_bits=e,s.extra_base=n,s.elems=r,s.max_length=i}o._length_code=[0,1,2,3,4,5,6,7].concat(...s([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),o.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],o.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],o.d_code=function(t){return t<256?a[t]:a[256+(t>>>7)]},o.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],c.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],c.static_l_desc=new c(c.static_ltree,o.extra_lbits,257,286,15),c.static_d_desc=new c(c.static_dtree,o.extra_dbits,0,30,15),c.static_bl_desc=new c(null,o.extra_blbits,0,19,7);function l(t,e,n,r,i){const s=this;s.good_length=t,s.max_lazy=e,s.nice_length=n,s.max_chain=r,s.func=i}const h=[new l(0,0,0,0,0),new l(4,4,8,4,1),new l(4,5,16,8,1),new l(4,6,32,32,1),new l(4,4,16,16,2),new l(8,16,32,32,2),new l(8,16,128,128,2),new l(8,32,128,256,2),new l(32,128,258,1024,2),new l(32,258,258,4096,2)],d=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],u=113,f=666,p=258,w=262;function g(t,e,n,r){const i=t[2*e],s=t[2*n];return i>>8&255)}function ct(t,e){let n;const r=e;rt>16-r?(n=t,nt|=n<>>16-rt,rt+=r-16):(nt|=t<=8&&(at(255&nt),nt>>>=8,rt-=8)}function ut(n,r){let i,s,a;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[Y+Q]=255&r,Q++,0===n?N[2*r]++:(tt++,n--,N[2*(o._length_code[r]+e+1)]++,j[2*o.d_code(n)]++),0==(8191&Q)&&P>2){for(i=8*Q,s=T-I,a=0;a<30;a++)i+=j[2*a]*(5+o.extra_dbits[a]);if(i>>>=3,tt8?ot(nt):rt>0&&at(255&nt),nt=0,rt=0}function wt(e,n,r){ct(0+(r?1:0),3),function(e,n,r){pt(),et=8,r&&(ot(n),ot(~n)),t.pending_buf.set(x.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function gt(e,n,r){let i,s,a=0;P>0?(K.build_tree(t),Z.build_tree(t),a=function(){let e;for(st(N,K.max_code),st(j,Z.max_code),X.build_tree(t),e=18;e>=3&&0===G[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),i=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!=e?wt(e,n,r):s==i?(ct(2+(r?1:0),3),ft(c.static_ltree,c.static_dtree)):(ct(4+(r?1:0),3),function(t,e,n){let r;for(ct(t-257,5),ct(e-1,5),ct(n-4,4),r=0;r=0?I:-1,T-I,t),I=T,s.flush_pending()}function _t(){let t,e,n,r;do{if(r=A-B-T,0===r&&0===T&&0===B)r=_;else if(-1==r)r--;else if(T>=_+_-w){x.set(x.subarray(_,_+_),0),W-=_,T-=_,I-=_,t=k,n=t;do{e=65535&v[--n],v[n]=e>=_?e-_:0}while(0!=--t);t=_,n=t;do{e=65535&U[--n],U[n]=e>=_?e-_:0}while(0!=--t);r+=_}if(0===s.avail_in)return;t=s.read_buf(x,T+B,r),B+=t,B>=3&&(E=255&x[T],E=(E<_-w?T-(_-w):0;let o=q;const c=m,l=T+p;let h=x[i+s-1],d=x[i+s];M>=L&&(r>>=2),o>B&&(o=B);do{if(e=t,x[e+s]==d&&x[e+s-1]==h&&x[e]==x[i]&&x[++e]==x[i+1]){i+=2,e++;do{}while(x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&x[++i]==x[++e]&&is){if(W=t,s=n,n>=o)break;h=x[i+s-1],d=x[i+s]}}}while((t=65535&U[t&c])>a&&0!=--r);return s<=B?s:B}function mt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,a=u,y=0,K.dyn_tree=N,K.stat_desc=c.static_l_desc,Z.dyn_tree=j,Z.stat_desc=c.static_d_desc,X.dyn_tree=G,X.stat_desc=c.static_bl_desc,nt=0,rt=0,et=8,it(),function(){A=2*_,v[k-1]=0;for(let t=0;t9||8!=s||i<9||i>15||n<0||n>9||o<0||o>2?r:(e.dstate=t,b=i,_=1<9||n<0||n>2?r:(h[P].func!=h[e].func&&0!==t.total_in&&(i=t.deflate(1)),P!=e&&(P=e,V=h[P].max_lazy,L=h[P].good_length,q=h[P].nice_length,H=h[P].max_chain),O=n,i)},t.deflateSetDictionary=function(t,e,n){let i,s=n,o=0;if(!e||42!=a)return r;if(s<3)return 0;for(s>_-w&&(s=_-w,o=n-s),x.set(e.subarray(o,o+s),0),T=s,I=s,E=255&x[0],E=(E<4||o<0)return r;if(!e.next_out||!e.next_in&&0!==e.avail_in||a==f&&4!=o)return e.msg=d[4],r;if(0===e.avail_out)return e.msg=d[7],i;var L;if(s=e,R=y,y=o,42==a&&(g=8+(b-8<<4)<<8,A=(P-1&255)>>1,A>3&&(A=3),g|=A<<6,0!==T&&(g|=32),g+=31-g%31,a=u,at((L=g)>>8&255),at(255&L)),0!==t.pending){if(s.flush_pending(),0===s.avail_out)return y=-1,0}else if(0===s.avail_in&&o<=R&&4!=o)return s.msg=d[7],i;if(a==f&&0!==s.avail_in)return e.msg=d[7],i;if(0!==s.avail_in||0!==B||0!=o&&a!=f){switch(H=-1,h[P].func){case 0:H=function(t){let e,n=65535;for(n>l-5&&(n=l-5);;){if(B<=1){if(_t(),0===B&&0==t)return 0;if(0===B)break}if(T+=B,B=0,e=I+n,(0===T||T>=e)&&(B=T-e,T=e,yt(!1),0===s.avail_out))return 0;if(T-I>=_-w&&(yt(!1),0===s.avail_out))return 0}return yt(4==t),0===s.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:H=function(t){let e,n=0;for(;;){if(B=3&&(E=(E<=3)if(e=ut(T-W,S-3),B-=S,S<=V&&B>=3){S--;do{T++,E=(E<=3&&(E=(E<4096)&&(S=2)),M>=3&&S<=M){n=T+B-3,e=ut(T-1-F,M-3),B-=M-1,M-=2;do{++T<=n&&(E=(E<n&&(i=n),0===i?0:(r.avail_in-=i,t.set(r.next_in.subarray(r.next_in_index,r.next_in_index+i),e),r.next_in_index+=i,r.total_in+=i,i)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const b={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},m=Object.assign({},b);function x(t){if(void 0!==t.chunkSize&&(m.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(m.maxWorkers=t.maxWorkers),void 0!==t.useWebWorkers&&(m.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(m.Deflate=t.Deflate),void 0!==t.Inflate&&(m.Inflate=t.Inflate),void 0!==t.workerScripts){if(t.workerScripts.deflate){if(!Array.isArray(t.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");m.workerScripts||(m.workerScripts={}),m.workerScripts.inflate=t.workerScripts.inflate}}}const A="HTTP error ",U="HTTP Range not supported",v="text/plain",E="Content-Length",k="Accept-Ranges",R="HEAD",z="GET",D="bytes";class I{constructor(){this.size=0}init(){this.initialized=!0}}class S extends I{}class F extends I{writeUint8Array(t){this.size+=t.length}}class C extends S{constructor(t){super(),this.blob=t,this.size=t.size}async readUint8Array(t,e){const n=new FileReader;return new Promise(((r,i)=>{n.onload=t=>r(new Uint8Array(t.target.result)),n.onerror=i,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class T extends F{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class W extends S{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),L(this.url)&&!this.preventHeadRequest){const t=await M(R,this.url,this.options);if(this.size=Number(t.headers.get(E)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(k)!=D)throw new Error(U);void 0===this.size&&await B(this,this.options)}else await B(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await M(z,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(U);return new Uint8Array(await n.arrayBuffer())}return this.data||await B(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function B(t,e){const n=await M(z,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function M(t,e,n,r){r=Object.assign({},n.headers,r);const i=await fetch(e,Object.assign({},n,{method:t,headers:r}));if(i.status<400)return i;throw new Error(A+(i.statusText||i.status))}class H extends S{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),L(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>P(R,this.url,(n=>{this.size=Number(n.getResponseHeader(E)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(k)==D?t():e(new Error(U)):void 0===this.size?V(this,this.url).then((()=>t())).catch(e):t()}),e)));await V(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await V(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,r)=>P(z,this.url,(t=>n(new Uint8Array(t.response))),r,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(U)}}function V(t,e){return new Promise(((n,r)=>P(z,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),r)))}function P(t,e,n,r,i=[]){const s=new XMLHttpRequest;return s.addEventListener("load",(()=>{s.status<400?n(s):r(A+(s.statusText||s.status))}),!1),s.addEventListener("error",r,!1),s.open(t,e),i.forEach((t=>s.setRequestHeader(t[0],t[1]))),s.responseType="arraybuffer",s.send(),s}class O extends S{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new H(t,e):this.reader=new W(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function L(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const q=4294967295,N=65535,j=67324752,G=134695760,K=new Date(2107,11,31),Z=new Date(1980,0,1),X=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;X[t]=e}class Y{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,r=0|t.length;n>>8^X[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const J={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],r=J.getPartial(n);return 32===r?t.concat(e):J._shiftRight(e,r,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+J.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=J.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(n),n=0;if(0===e)return r.concat(t);for(let i=0;i>>e),n=t[i]<<32-e;const i=t.length?t[t.length-1]:0,s=J.getPartial(i);return r.push(J.partial(e+s&31,e+s>32?n:r.pop(),1)),r}},Q={bytes:{fromBits(t){const e=J.bitLength(t)/8,n=new Uint8Array(e);let r;for(let i=0;i>>24,r<<=8;return n},toBits(t){const e=[];let n,r=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],s%i==0&&(t=t<<8^t>>>24^c<<24,c=c<<1^283*(c>>7))),a[s]=a[s-i]^t}for(let t=0;s;t++,s--){const e=a[3&t?s:s-4];o[t]=s<=4||t<4?e:r[0][n[e>>>24]]^r[1][n[e>>16&255]]^r[2][n[e>>8&255]]^r[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],r=e[4],i=[],s=[];let a,o,c,l;for(let t=0;t<256;t++)s[(i[t]=t<<1^283*(t>>7))^t]=t;for(let h=a=0;!n[h];h^=o||1,a=s[a]||1){let s=a^a<<1^a<<2^a<<3^a<<4;s=s>>8^255&s^99,n[h]=s,r[s]=h,l=i[c=i[o=i[h]]];let d=16843009*l^65537*c^257*o^16843008*h,u=257*i[s]^16843008*s;for(let n=0;n<4;n++)t[n][h]=u=u<<24^u>>>8,e[n][s]=d=d<<24^d>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],r=n.length/4-2,i=[0,0,0,0],s=this._tables[e],a=s[0],o=s[1],c=s[2],l=s[3],h=s[4];let d,u,f,p=t[0]^n[0],w=t[e?3:1]^n[1],g=t[2]^n[2],y=t[e?1:3]^n[3],_=4;for(let t=0;t>>24]^o[w>>16&255]^c[g>>8&255]^l[255&y]^n[_],u=a[w>>>24]^o[g>>16&255]^c[y>>8&255]^l[255&p]^n[_+1],f=a[g>>>24]^o[y>>16&255]^c[p>>8&255]^l[255&w]^n[_+2],y=a[y>>>24]^o[p>>16&255]^c[w>>8&255]^l[255&g]^n[_+3],_+=4,p=d,w=u,g=f;for(let t=0;t<4;t++)i[e?3&-t:t]=h[p>>>24]<<24^h[w>>16&255]<<16^h[g>>8&255]<<8^h[255&y]^n[_++],d=p,p=w,w=g,g=y,y=d;return i}}},tt={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,r=255&t;255===e?(e=0,255===n?(n=0,255===r?r=0:++r):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=r}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let r;if(!(r=e.length))return[];const i=J.bitLength(e);for(let i=0;it.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const xt=12;class At{constructor(t,e){this.password=t,this.passwordVerification=e,kt(this,t)}async append(t){if(this.password){const e=vt(this,t.subarray(0,xt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(et);t=t.subarray(xt)}return vt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class Ut{constructor(t,e){this.passwordVerification=e,this.password=t,kt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const r=crypto.getRandomValues(new Uint8Array(xt));r[11]=this.passwordVerification,e=new Uint8Array(t.length+r.length),e.set(Et(this,r),0),n=xt}else e=new Uint8Array(t.length),n=0;return e.set(Et(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function vt(t,e){const n=new Uint8Array(e.length);for(let r=0;r>>24]),t.keys[2]=~t.crcKey2.get()}function zt(t){const e=2|t.keys[2];return Dt(Math.imul(e,1^e)>>>8)}function Dt(t){return 255&t}function It(t){return 4294967295&t}const St="deflate",Ft="Invalid signature";class Ct{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Y,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new At(e.password,e.passwordVerification):new gt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(Ft);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(Ft)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Tt{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Y,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new Ut(e.password,e.passwordVerification):new yt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const r=new Uint8Array(e.length+n.data.length);r.set(e,0),r.set(n.data,e.length),e=r}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Wt="init",Bt="append",Mt="flush",Ht="message";var Vt=(t,e,n,r,i,s)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=s,t.webWorker=i,t.onTaskFinished=()=>{t.busy=!1;r(t)&&t.worker&&t.worker.terminate()},i?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker-deflate.min.js",document.baseURI).href)),t.worker.addEventListener(Ht,i,!1),t.interface={append:t=>n({type:Bt,data:t}),flush:()=>n({type:Mt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await r({scripts:n,type:Wt,options:e})}return r(n)}function r(n){const r=t.worker,i=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,r.postMessage(n,[n.data])}catch(t){r.postMessage(n)}else r.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return i}function i(n){const r=n.data;if(e){const n=r.error,i=r.type;if(n){const r=new Error(n.message);r.stack=n.stack,e.reject(r),e=null,t.onTaskFinished()}else if(i==Wt||i==Mt||i==Bt){const n=r.data;i==Mt?(e.resolve({data:new Uint8Array(n),signature:r.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(St)?new Tt(t,e):e.codecType.startsWith("inflate")?new Ct(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Pt=[],Ot=[];function Lt(t){const e=!Ot.length;if(e)Pt=Pt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:r,webWorker:i,scripts:s}]=Ot.splice(0,1);e(Vt(t,n,r,Lt,i,s))}return e}function qt(t){if(t&&t.aborted)throw new Error("Abort error")}async function Nt(t,e){return e.length&&await t.writeUint8Array(e),e.length}const jt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Gt{constructor(t){jt.forEach((e=>this[e]=t[e]))}}const Kt="File already exists",Zt="Zip file comment exceeds 64KB",Xt="File entry comment exceeds 64KB",Yt="File entry name exceeds 64KB",Jt="Version exceeds 65535",Qt="The modification date must be between 1/1/1980 and 12/31/2107",$t="The strength must equal 1, 2, or 3",te="Extra field type exceeds 65535",ee="Extra field data exceeds 64KB",ne=new Uint8Array([7,0,2,0,65,69,3,0,0]);function re(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function ie(t,e,n){t.setUint8(e,n)}function se(t,e,n){t.setUint16(e,n,!0)}function ae(t,e,n){t.setUint32(e,n,!0)}function oe(t,e,n){t.setBigUint64(e,n,!0)}x({Deflate:function(t){const e=new _,n=512,r=new Uint8Array(n);let i=t?t.level:-1;void 0===i&&(i=-1),e.deflateInit(i),e.next_out=r,this.append=function(t,i){let s,a,o=0,c=0,l=0;const h=[];if(t.length){e.next_in_index=0,e.next_in=t,e.avail_in=t.length;do{if(e.next_out_index=0,e.avail_out=n,s=e.deflate(0),0!=s)throw new Error("deflating: "+e.msg);e.next_out_index&&(e.next_out_index==n?h.push(new Uint8Array(r)):h.push(new Uint8Array(r.subarray(0,e.next_out_index)))),l+=e.next_out_index,i&&e.next_in_index>0&&e.next_in_index!=o&&(i(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return a=new Uint8Array(l),h.forEach((function(t){a.set(t,c),c+=t.length})),a}},this.flush=function(){let t,i,s=0,a=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(r.subarray(0,e.next_out_index))),a+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),i=new Uint8Array(a),o.forEach((function(t){i.set(t,s),s+=t.length})),i}}}),t.BlobReader=C,t.BlobWriter=T,t.Data64URIReader=class extends S{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),r=4*Math.floor(t/3),i=atob(this.dataURI.substring(r+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),s=t-3*Math.floor(r/4);for(let t=s;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_DUPLICATED_NAME=Kt,t.ERR_HTTP_RANGE=U,t.ERR_INVALID_COMMENT=Zt,t.ERR_INVALID_DATE=Qt,t.ERR_INVALID_ENCRYPTION_STRENGTH=$t,t.ERR_INVALID_ENTRY_COMMENT=Xt,t.ERR_INVALID_ENTRY_NAME=Yt,t.ERR_INVALID_EXTRAFIELD_DATA=ee,t.ERR_INVALID_EXTRAFIELD_TYPE=te,t.ERR_INVALID_VERSION=Jt,t.HttpRangeReader=class extends O{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=O,t.Reader=S,t.TextReader=class extends S{constructor(t){super(),this.blobReader=new C(new Blob([t],{type:v}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends F{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:v})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:v})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends S{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends F{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=F,t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=m,this.files=new Map,this.offset=t.size,this.maxOutputSize=0}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith("/")?t+="/":n.directory=t.endsWith("/"),this.files.has(t))throw new Error(Kt);const r=(new TextEncoder).encode(t);if(r.length>N)throw new Error(Yt);const i=n.comment||"",s=(new TextEncoder).encode(i);if(s.length>N)throw new Error(Xt);const a=this.options.version||n.version||0;if(a>N)throw new Error(Jt);const o=n.lastModDate||new Date;if(oK)throw new Error(Qt);const c=re(this,n,"password"),l=re(this,n,"encryptionStrength")||3,h=re(this,n,"zipCrypto");if(void 0!==c&&void 0!==l&&(l<1||l>3))throw new Error($t);e&&!e.initialized&&await e.init();let d=new Uint8Array(0);const u=n.extraField;if(u){let t=0,e=0;u.forEach((e=>t+=4+e.length)),d=new Uint8Array(t),u.forEach(((t,n)=>{if(n>N)throw new Error(te);if(t.length>N)throw new Error(ee);d.set(new Uint16Array([n]),e),d.set(new Uint16Array([t.length]),e+2),d.set(t,e+4),e+=4+t.length}))}const f=e?Math.floor(1.05*e.size):0;this.maxOutputSize+=f,await Promise.resolve();const p=n.zip64||this.options.zip64||this.offset>=q||f>=q||this.offset+this.maxOutputSize>=q,w=re(this,n,"level"),g=re(this,n,"useWebWorkers"),y=re(this,n,"bufferedWrite");let _=re(this,n,"keepOrder"),b=re(this,n,"dataDescriptor");const m=re(this,n,"signal");void 0===b&&(b=!0),void 0===_&&(_=!0);const x=await async function(t,e,n,r){const i=t.files,s=t.writer;let a,o,c;i.set(e,null);try{let l,h;try{r.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>c=t))),r.bufferedWrite||t.lockWrite||!r.dataDescriptor?(l=new T,await l.init()):(t.lockWrite=new Promise((t=>a=t)),s.initialized||await s.init(),l=s),h=await async function(t,e,n,r){const i=r.rawFilename,s=r.lastModDate,a=r.password,o=Boolean(a&&a.length),c=r.level,l=0!==c&&!r.directory,h=r.zip64;let d,u;if(o&&!r.zipCrypto){d=new Uint8Array(ne.length+2);const t=new DataView(d.buffer);se(t,0,39169),d.set(ne,2),u=r.encryptionStrength,ie(t,8,u)}else d=new Uint8Array(0);const f={version:r.version||20,zip64:h,directory:Boolean(r.directory),filenameUTF8:!0,rawFilename:i,commentUTF8:!0,rawComment:r.rawComment,rawExtraFieldZip64:h?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:d,rawExtraField:r.rawExtraField};let p=2048;r.dataDescriptor&&(p|=8);let w=0;l&&(w=8);h&&(f.version=f.version>45?f.version:45);o&&(p|=1,r.zipCrypto||(f.version=f.version>51?f.version:51,w=99,l&&(f.rawExtraFieldAES[9]=8)));const g=f.headerArray=new Uint8Array(26),y=new DataView(g.buffer);se(y,0,f.version),se(y,2,p),se(y,4,w);const _=new Uint32Array(1),b=new DataView(_.buffer);se(b,0,(s.getHours()<<6|s.getMinutes())<<5|s.getSeconds()/2),se(b,2,(s.getFullYear()-1980<<4|s.getMonth()+1)<<5|s.getDate());const m=_[0];ae(y,6,m),se(y,22,i.length),se(y,24,0),se(y,24,d.length+f.rawExtraField.length);const x=new Uint8Array(30+i.length+d.length+f.rawExtraField.length);let A;ae(new DataView(x.buffer),0,j),x.set(g,4),x.set(i,30),x.set(d,30+i.length),x.set(f.rawExtraField,30+i.length+d.length);let U=0,v=0;if(t){U=t.size;const i=await function(t,e,n){const r=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),i=r&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Pt.length!t.busy));return n?Vt(n,t,e,Lt,r,i):new Promise((n=>Ot.push({resolve:n,codecConstructor:t,options:e,webWorker:r,scripts:i})))}}(n.Deflate,{codecType:St,level:c,password:a,encryptionStrength:u,zipCrypto:o&&r.zipCrypto,passwordVerification:o&&r.zipCrypto&&m>>8&255,signed:!0,compressed:l,encrypted:o,useWebWorkers:r.useWebWorkers},n);await e.writeUint8Array(x),A=await async function(t,e,n,r,i,s,a){const o=Math.max(s.chunkSize,64);return async function s(c=0,l=0){const h=a.signal;if(c{n.onload=e=>t(e.target.result),n.onerror=r,n.readAsArrayBuffer(e)})),[a]=await Promise.all([i,t.lockWrite,o]);if(!r.dataDescriptor){const t=new DataView(a);h.encrypted&&!r.zipCrypto||ae(t,14,h.signature),h.zip64?(ae(t,18,q),ae(t,22,q)):(ae(t,18,h.compressedSize),ae(t,22,h.uncompressedSize))}await s.writeUint8Array(new Uint8Array(a))}if(h.offset=t.offset,h.zip64){oe(new DataView(h.rawExtraFieldZip64.buffer),20,BigInt(h.offset))}return t.offset+=h.length,h}finally{c&&c(),a&&a()}}(this,t,e,Object.assign({},n,{rawFilename:r,rawComment:s,version:a,lastModDate:o,rawExtraField:d,zip64:p,password:c,level:w,useWebWorkers:g,encryptionStrength:l,zipCrypto:h,bufferedWrite:y,keepOrder:_,dataDescriptor:b,signal:m}));return this.maxOutputSize-=f,Object.assign(x,{name:t,comment:i,extraField:u}),new Gt(x)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let r=0,i=0,s=this.offset,a=n.size;for(const[,t]of n)i+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||s>=q||i>=q||a>=N,c=new Uint8Array(i+(o?98:22)),l=new DataView(c.buffer);if(t.length){if(!(t.length<=N))throw new Error(Zt);se(l,r+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,i=t.rawExtraFieldAES,s=n.length+i.length+t.rawExtraField.length;ae(l,r,33639248),se(l,r+4,t.version),c.set(t.headerArray,r+6),se(l,r+30,s),se(l,r+32,t.rawComment.length),t.directory&&ie(l,r+38,16),t.zip64?ae(l,r+42,q):ae(l,r+42,t.offset),c.set(e,r+46),c.set(n,r+46+e.length),c.set(i,r+46+e.length+n.length),c.set(t.rawExtraField,46+e.length+n.length+i.length),c.set(t.rawComment,r+46+e.length+s),r+=46+e.length+s+t.rawComment.length}return o&&(ae(l,r,101075792),oe(l,r+4,BigInt(44)),se(l,r+12,45),se(l,r+14,45),oe(l,r+24,BigInt(a)),oe(l,r+32,BigInt(a)),oe(l,r+40,BigInt(i)),oe(l,r+48,BigInt(s)),ae(l,r+56,117853008),oe(l,r+64,BigInt(s)+BigInt(i)),ae(l,r+72,1),a=N,s=q,i=q,r+=76),ae(l,r,101010256),se(l,r+8,a),se(l,r+10,a),ae(l,r+12,i),ae(l,r+16,s),await e.writeUint8Array(c),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=x,t.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/zip-no-worker.min.js b/dist/zip-no-worker.min.js index 8637cade..0ef560bd 100644 --- a/dist/zip-no-worker.min.js +++ b/dist/zip-no-worker.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function o(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,h=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,h++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==h){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,h-=2}while(h>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function l(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),o.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],o.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],l.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],l.static_l_desc=new l(l.static_ltree,o.extra_lbits,257,286,15),l.static_d_desc=new l(l.static_dtree,o.extra_dbits,0,30,15),l.static_bl_desc=new l(null,o.extra_blbits,0,19,7);function d(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new d(0,0,0,0,0),new d(4,4,8,4,1),new d(4,5,16,8,1),new d(4,6,32,32,1),new d(4,4,16,16,2),new d(8,16,32,32,2),new d(8,16,128,128,2),new d(8,32,128,256,2),new d(32,128,258,1024,2),new d(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],f=113,h=666,_=258,w=262;function p(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function lt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ft(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[X+Q]=255&i,Q++,0===n?q[2*i]++:(tt++,n--,q[2*(o._length_code[i]+e+1)]++,j[2*o.d_code(n)]++),0==(8191&Q)&&V>2){for(r=8*Q,a=C-z,s=0;s<30;s++)r+=j[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function wt(e,n,i){lt(0+(i?1:0),3),function(e,n,i){_t(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(m.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function pt(e,n,i){let r,a,s=0;V>0?(G.build_tree(t),K.build_tree(t),s=function(){let e;for(at(q,G.max_code),at(j,K.max_code),Y.build_tree(t),e=18;e>=3&&0===Z[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?wt(e,n,i):a==r?(lt(2+(i?1:0),3),ht(l.static_ltree,l.static_dtree)):(lt(4+(i?1:0),3),function(t,e,n){let i;for(lt(t-257,5),lt(e-1,5),lt(n-4,4),i=0;i=0?z:-1,C-z,t),z=C,a.flush_pending()}function bt(){let t,e,n,i;do{if(i=v-M-C,0===i&&0===C&&0===M)i=b;else if(-1==i)i--;else if(C>=b+b-w){m.set(m.subarray(b,b+b),0),L-=b,C-=b,z-=b,t=U,n=t;do{e=65535&A[--n],A[n]=e>=b?e-b:0}while(0!=--t);t=b,n=t;do{e=65535&k[--n],k[n]=e>=b?e-b:0}while(0!=--t);i+=b}if(0===a.avail_in)return;t=a.read_buf(m,C+M,i),M+=t,M>=3&&(E=255&m[C],E=(E<b-w?C-(b-w):0;let o=H;const l=x,d=C+_;let c=m[r+a-1],u=m[r+a];W>=P&&(i>>=2),o>M&&(o=M);do{if(e=t,m[e+a]==u&&m[e+a-1]==c&&m[e]==m[r]&&m[++e]==m[r+1]){r+=2,e++;do{}while(m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&ra){if(L=t,a=n,n>=o)break;c=m[r+a-1],u=m[r+a]}}}while((t=65535&k[t&l])>s&&0!=--i);return a<=M?a:M}function xt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=f,g=0,G.dyn_tree=q,G.stat_desc=l.static_l_desc,K.dyn_tree=j,K.stat_desc=l.static_d_desc,Y.dyn_tree=Z,Y.stat_desc=l.static_bl_desc,nt=0,it=0,et=8,rt(),function(){v=2*b,A[U-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,y=r,b=1<9||n<0||n>2?i:(c[V].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),V!=e&&(V=e,O=c[V].max_lazy,P=c[V].good_length,H=c[V].nice_length,B=c[V].max_chain),N=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>b-w&&(a=b-w,o=n-a),m.set(e.subarray(o,o+a),0),C=a,z=a,E=255&m[0],E=(E<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==h&&4!=o)return e.msg=u[4],i;if(0===e.avail_out)return e.msg=u[7],r;var P;if(a=e,R=g,g=o,42==s&&(p=8+(y-8<<4)<<8,v=(V-1&255)>>1,v>3&&(v=3),p|=v<<6,0!==C&&(p|=32),p+=31-p%31,s=f,st((P=p)>>8&255),st(255&P)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return g=-1,0}else if(0===a.avail_in&&o<=R&&4!=o)return a.msg=u[7],r;if(s==h&&0!==a.avail_in)return e.msg=u[7],r;if(0!==a.avail_in||0!==M||0!=o&&s!=h){switch(B=-1,c[V].func){case 0:B=function(t){let e,n=65535;for(n>d-5&&(n=d-5);;){if(M<=1){if(bt(),0===M&&0==t)return 0;if(0===M)break}if(C+=M,M=0,e=z+n,(0===C||C>=e)&&(M=C-e,C=e,gt(!1),0===a.avail_out))return 0;if(C-z>=b-w&&(gt(!1),0===a.avail_out))return 0}return gt(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:B=function(t){let e,n=0;for(;;){if(M=3&&(E=(E<=3)if(e=ft(C-L,I-3),M-=I,I<=O&&M>=3){I--;do{C++,E=(E<=3&&(E=(E<4096)&&(I=2)),W>=3&&I<=W){n=C+M-3,e=ft(C-1-S,W-3),M-=W-1,W-=2;do{++C<=n&&(E=(E<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const y=-2,x=-3,m=-5,v=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],A=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],E=[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],U=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],R=[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],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],F=15;function z(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,h,_){let w,p,g,b,y,v,k,A,E,U,R,D,z,I,S;U=0,y=s;do{n[t[e+U]]++,U++,y--}while(0!==y);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(A=u[0],v=1;v<=F&&0===n[v];v++);for(k=v,Ay&&(A=y),u[0]=A,I=1<D+A;){if(b++,D+=A,S=g-D,S=S>A?A:S,(p=1<<(v=k-D))>w+1&&(p-=w+1,z=k,v1440)return x;r[b]=R=h[0],h[0]+=S,0!==b?(a[b]=y,i[0]=v,i[1]=A,v=y>>>D-A,i[2]=R-r[b-1]-v,f.set(i,3*(r[b-1]+v))):c[0]=R}for(i[1]=k-D,U>=s?i[0]=192:_[U]>>D;v>>=1)y^=v;for(y^=v,E=(1<257?(h==x?f.msg="oversubscribed distance tree":h==m?(f.msg="incomplete distance tree",h=x):-4!=h&&(f.msg="empty distance tree with lengths",h=x),h):0)}}z.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=k,i[0]=A,0};function I(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,h=0,_=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,h,_,w,p,g,b,y,m,k,A,E;_=o.next_in_index,w=o.avail_in,f=s.bitb,h=s.bitk,p=s.write,g=p>=d[E+1],h-=d[E+1],0!=(16&u)){for(u&=15,m=d[E+2]+(f&v[u]),f>>=u,h-=u;h<15;)w--,f|=(255&o.read_byte(_++))<>=d[E+1],h-=d[E+1],0!=(16&u)){for(u&=15;h>=u,h-=u,g-=m,p>=k)A=p-k,p-A>0&&2>p-A?(s.window[p++]=s.window[A++],s.window[p++]=s.window[A++],m-=2):(s.window.set(s.window.subarray(A,A+2),p),p+=2,A+=2,m-=2);else{A=p-k;do{A+=s.end}while(A<0);if(u=s.end-A,m>u){if(m-=u,p-A>0&&u>p-A)do{s.window[p++]=s.window[A++]}while(0!=--u);else s.window.set(s.window.subarray(A,A+u),p),p+=u,A+=u,u=0;A=0}}if(p-A>0&&m>p-A)do{s.window[p++]=s.window[A++]}while(0!=--m);else s.window.set(s.window.subarray(A,A+m),p),p+=m,A+=m,m=0;break}if(0!=(64&u))return o.msg="invalid distance code",m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,x;l+=d[E+2],l+=f&v[u],E=3*(c+l),u=d[E]}break}if(0!=(64&u))return 0!=(32&u)?(m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,1):(o.msg="invalid literal/length code",m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,x);if(l+=d[E+2],l+=f&v[u],E=3*(c+l),0===(u=d[E])){f>>=d[E+1],h-=d[E+1],s.window[p++]=d[E+2],g--;break}}else f>>=d[E+1],h-=d[E+1],s.window[p++]=d[E+2],g--}while(g>=258&&w>=10);return m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,h=o,r=l,_=d,n=null},t.proc=function(t,p,g){let b,m,k,A,E,U,R,D=0,F=0,z=0;for(z=p.next_in_index,A=p.avail_in,D=t.bitb,F=t.bitk,E=t.write,U=E=258&&A>=10&&(t.bitb=D,t.bitk=F,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=E,g=w(u,f,i,h,r,_,t,p),z=p.next_in_index,A=p.avail_in,D=t.bitb,F=t.bitk,E=t.write,U=E>>=n[m+1],F-=n[m+1],k=n[m],0===k){l=n[m+2],e=6;break}if(0!=(16&k)){d=15&k,a=n[m+2],e=2;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}if(0!=(32&k)){e=7;break}return e=9,p.msg="invalid literal/length code",g=x,t.bitb=D,t.bitk=F,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=E,t.inflate_flush(p,g);case 2:for(b=d;F>=b,F-=b,o=f,n=r,s=_,e=3;case 3:for(b=o;F>=n[m+1],F-=n[m+1],k=n[m],0!=(16&k)){d=15&k,c=n[m+2],e=4;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}return e=9,p.msg="invalid distance code",g=x,t.bitb=D,t.bitk=F,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=E,t.inflate_flush(p,g);case 4:for(b=d;F>=b,F-=b,e=5;case 5:for(R=E-c;R<0;)R+=t.end;for(;0!==a;){if(0===U&&(E==t.end&&0!==t.read&&(E=0,U=E7&&(F-=8,A++,z--),t.write=E,g=t.inflate_flush(p,g),E=t.write,U=Et.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let _,w,p,g,b,m,k,A;for(g=t.next_in_index,b=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m>>1){case 0:w>>>=3,p-=3,_=7&p,w>>>=_,p-=_,r=1;break;case 1:E=[],U=[],R=[[]],D=[[]],z.inflate_trees_fixed(E,U,R,D),c.init(E[0],U[0],R[0],0,D[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=x,n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,b--,w|=(255&t.read_byte(g++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=x,n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);if(0===k&&(m==n.end&&0!==n.read&&(m=0,k=mb&&(_=b),_>k&&(_=k),n.window.set(t.read_buf(g,_),m),g+=_,b-=_,m+=_,k-=_,0!=(a-=_))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,b--,w|=(255&t.read_byte(g++))<29||(_>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=x,n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);if(_=258+(31&_)+(_>>5&31),!i||i.length<_)i=[];else for(A=0;A<_;A++)i[A]=0;w>>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,b--,w|=(255&t.read_byte(g++))<>>=3,p-=3}for(;o<19;)i[S[o++]]=0;if(l[0]=7,_=h.inflate_trees_bits(i,l,d,f,t),0!=_)return(e=_)==x&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);o=0,r=5;case 5:for(;_=s,!(o>=258+(31&_)+(_>>5&31));){let a,c;for(_=l[0];p<_;){if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,b--,w|=(255&t.read_byte(g++))<>>=_,p-=_,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;p<_+A;){if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,b--,w|=(255&t.read_byte(g++))<>>=_,p-=_,a+=w&v[A],w>>>=A,p-=A,A=o,_=s,A+a>258+(31&_)+(_>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=x,n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(d[0]=-1,F=[],I=[],T=[],C=[],F[0]=9,I[0]=6,_=s,_=h.inflate_trees_dynamic(257+(31&_),1+(_>>5&31),i,F,I,T,C,f,t),0!=_)return _==x&&(i=null,r=9),e=_,n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);c.init(F[0],I[0],f,T[0],f,C[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),g=t.next_in_index,b=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m15?(t.inflateEnd(n),y):(t.wbits=i,n.istate.blocks=new T(n,1<>4)>r.wbits){r.mode=C,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=C,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=C,t.msg="need dictionary",r.marker=0,y;case 7:if(n=r.blocks.proc(t,n),n==x){r.mode=C,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case C:return x;default:return y}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return y;const a=t.istate;return r>=1<{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class rt extends nt{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class at extends et{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),ft(this.url)&&!this.preventHeadRequest){const t=await ot(J,this.url,this.options);if(this.size=Number(t.headers.get(Y)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(X)!=$)throw new Error(G);void 0===this.size&&await st(this,this.options)}else await st(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await ot(Q,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(G);return new Uint8Array(await n.arrayBuffer())}return this.data||await st(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function st(t,e){const n=await ot(Q,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function ot(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(Z+(r.statusText||r.status))}class lt extends et{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),ft(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>ct(J,this.url,(n=>{this.size=Number(n.getResponseHeader(Y)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(X)==$?t():e(new Error(G)):void 0===this.size?dt(this,this.url).then((()=>t())).catch(e):t()}),e)));await dt(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await dt(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>ct(Q,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(G)}}function dt(t,e){return new Promise(((n,i)=>ct(Q,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function ct(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(Z+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class ut extends et{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new lt(t,e):this.reader=new at(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function ft(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const ht=4294967295,_t=65535,wt=67324752,pt=134695760,gt=33639248,bt=101010256,yt=101075792,xt=117853008,mt=39169,vt=2048,kt="/",At=new Date(2107,11,31),Et=new Date(1980,0,1),Ut="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Rt=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;Rt[t]=e}class Dt{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Rt[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Ft={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=Ft.getPartial(n);return 32===i?t.concat(e):Ft._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+Ft.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=Ft.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=Ft.getPartial(r);return i.push(Ft.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},zt={bytes:{fromBits(t){const e=Ft.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,d;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let c=s=0;!n[c];c^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[c]=a,i[a]=c,d=r[l=r[o=r[c]]];let u=16843009*d^65537*l^257*o^16843008*c,f=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][c]=f=f<<24^f>>>8,e[n][a]=u=u<<24^u>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],d=a[3],c=a[4];let u,f,h,_=t[0]^n[0],w=t[e?3:1]^n[1],p=t[2]^n[2],g=t[e?1:3]^n[3],b=4;for(let t=0;t>>24]^o[w>>16&255]^l[p>>8&255]^d[255&g]^n[b],f=s[w>>>24]^o[p>>16&255]^l[g>>8&255]^d[255&_]^n[b+1],h=s[p>>>24]^o[g>>16&255]^l[_>>8&255]^d[255&w]^n[b+2],g=s[g>>>24]^o[_>>16&255]^l[w>>8&255]^d[255&p]^n[b+3],b+=4,_=u,w=f,p=h;for(let t=0;t<4;t++)r[e?3&-t:t]=c[_>>>24]<<24^c[w>>16&255]<<16^c[p>>8&255]<<8^c[255&g]^n[b++],u=_,_=w,w=p,p=g,g=u;return r}}},St={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=Ft.bitLength(e);for(let r=0;rt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const $t=12;class te{constructor(t,e){this.password=t,this.passwordVerification=e,re(this,t)}async append(t){if(this.password){const e=ne(this,t.subarray(0,$t));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Tt);t=t.subarray($t)}return ne(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class ee{constructor(t,e){this.passwordVerification=e,this.password=t,re(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array($t));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(ie(this,i),0),n=$t}else e=new Uint8Array(t.length),n=0;return e.set(ie(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function ne(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function se(t){const e=2|t.keys[2];return oe(Math.imul(e,1^e)>>>8)}function oe(t){return 255&t}function le(t){return 4294967295&t}const de="deflate",ce="inflate",ue="Invalid signature";class fe{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Dt,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new te(e.password,e.passwordVerification):new Kt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(ue);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(ue)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class he{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Dt,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new ee(e.password,e.passwordVerification):new Yt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const _e="init",we="append",pe="flush",ge="message";var be=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker.min.js",document.baseURI).href)),t.worker.addEventListener(ge,r,!1),t.interface={append:t=>n({type:we,data:t}),flush:()=>n({type:pe})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:_e,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==_e||r==pe||r==we){const n=i.data;r==pe?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(de)?new he(t,e):e.codecType.startsWith(ce)?new fe(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let ye=[],xe=[];function me(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(ye.length!t.busy));return n?be(n,t,e,ve,i,r):new Promise((n=>xe.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function ve(t){const e=!xe.length;if(e)ye=ye.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=xe.splice(0,1);e(be(t,n,i,ve,r,a))}return e}const ke=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Ae{constructor(t){ke.forEach((e=>this[e]=t[e]))}}const Ee="File format is not recognized",Ue="End of central directory not found",Re="End of Zip64 central directory not found",De="End of Zip64 central directory locator not found",Fe="Central directory header not found",ze="Local file header not found",Ie="Zip64 extra field not found",Se="File contains encrypted entry",Te="Encryption method not supported",Ce="Compression method not supported",Le="utf-8",Me=["uncompressedSize","compressedSize","offset"];class We{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,o=this.compressionMethod,l=this.config,d=this.bitFlag,c=this.signature;let u=Ne(this,e,"password");if(u=u&&u.length&&u,s&&99!=s.originalCompressionMethod)throw new Error(Ce);if(0!=o&&8!=o)throw new Error(Ce);if(je(a,0)!=wt)throw new Error(ze);const f=this.localDirectory={};Be(f,a,4),f.rawExtraField=r.subarray(i+30+f.filenameLength,i+30+f.filenameLength+f.extraFieldLength),Oe(this,f,a,4);const h=i+30+f.filenameLength+f.extraFieldLength,_=d.encrypted&&f.bitFlag.encrypted,w=_&&!s;if(_){if(!w&&void 0===s.strength)throw new Error(Te);if(!u)throw new Error(Se)}const p=await me(l.Inflate,{codecType:ce,password:u,zipCrypto:w,encryptionStrength:s&&s.strength,signed:Ne(this,e,"checkSignature"),passwordVerification:w&&(d.dataDescriptor?this.rawLastModDate>>>8&255:c>>>24&255),signature:c,compressed:0!=o,encrypted:_,useWebWorkers:Ne(this,e,"useWebWorkers")},l);return t.initialized||await t.init(),await H(p,n,t,h,this.compressedSize,l,{onprogress:e.onprogress,signal:Ne(this,e,"signal")}),t.getData()}}function Be(t,e,n){t.version=qe(e,n);const i=t.rawBitFlag=qe(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&vt)==vt},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=je(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=qe(e,n+22),t.extraFieldLength=qe(e,n+24)}function Oe(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==ht));for(let e=0;e{if(e[n]==ht){if(!t||void 0===t[n])throw new Error(Ie);e[n]=t[n]}}))}(d,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Ve(c,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&Ve(u,"comment","rawComment",e,t);const f=e.extraFieldAES=a.get(39169);f?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=He(i,0),t.vendorId=He(i,2);const r=He(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=qe(i,5)}else e.compressionMethod=n}(f,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Ve(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=He(a,0),t.signature=je(a,1);const s=new Dt;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==je(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Ne(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Pe(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new W,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,l=0,d=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===m){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=it,t.BlobWriter=rt,t.Data64URIReader=class extends et{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_ABORT=P,t.ERR_BAD_FORMAT=Ee,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Fe,t.ERR_DUPLICATED_NAME=Ge,t.ERR_ENCRYPTED=Se,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=De,t.ERR_EOCDR_NOT_FOUND=Ue,t.ERR_EOCDR_ZIP64_NOT_FOUND=Re,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Ie,t.ERR_HTTP_RANGE=G,t.ERR_INVALID_COMMENT=Ke,t.ERR_INVALID_DATE=Qe,t.ERR_INVALID_ENCRYPTION_STRENGTH=$e,t.ERR_INVALID_ENTRY_COMMENT=Ye,t.ERR_INVALID_ENTRY_NAME=Xe,t.ERR_INVALID_EXTRAFIELD_DATA=en,t.ERR_INVALID_EXTRAFIELD_TYPE=tn,t.ERR_INVALID_PASSWORD=Tt,t.ERR_INVALID_SIGNATURE=ue,t.ERR_INVALID_VERSION=Je,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=ze,t.ERR_UNSUPPORTED_COMPRESSION=Ce,t.ERR_UNSUPPORTED_ENCRYPTION=Te,t.HttpRangeReader=class extends ut{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=ut,t.Reader=et,t.TextReader=class extends et{constructor(t){super(),this.blobReader=new it(new Blob([t],{type:K}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends nt{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:K})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:K})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends et{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends nt{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=nt,t.ZipReader=class{constructor(t,e={}){this.reader=t,this.options=e,this.config=V()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ee);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,bt,22,1048560);if(!n)throw new Error(Ue);const i=new DataView(n.buffer);let r=je(i,12),a=je(i,16),s=qe(i,8),o=0;if(a==ht||r==ht||s==_t){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(je(i,0)!=xt)throw new Error(Re);a=Ze(i,8);let l=await e.readUint8Array(a,56),d=new DataView(l.buffer);const c=n.offset-20-56;if(je(d,0)!=yt&&a!=c){const t=a;a=c,o=a-t,l=await e.readUint8Array(a,56),d=new DataView(l.buffer)}if(je(d,0)!=yt)throw new Error(De);s=Ze(d,24),r=Ze(i,4),a-=Ze(d,40)}if(a<0||a>=e.size)throw new Error(Ee);let l=0,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer);const u=n.offset-r;if(je(c,l)!=gt&&a!=u){const t=a;a=u,o=a-t,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer)}if(a<0||a>=e.size)throw new Error(Ee);const f=[];for(let e=0;ee.getData(t,n),f.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return f}async close(){}},t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=V(),this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(kt)?t+=kt:n.directory=t.endsWith(kt),this.files.has(t))throw new Error(Ge);const i=(new TextEncoder).encode(t);if(i.length>_t)throw new Error(Xe);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>_t)throw new Error(Ye);const s=this.options.version||n.version||0;if(s>_t)throw new Error(Je);const o=n.lastModDate||new Date;if(oAt)throw new Error(Qe);const l=rn(this,n,"password"),d=rn(this,n,"encryptionStrength")||3,c=rn(this,n,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error($e);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const f=n.extraField;if(f){let t=0,e=0;f.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),f.forEach(((t,n)=>{if(n>_t)throw new Error(tn);if(t.length>_t)throw new Error(en);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const h=e?1.05*e.size:0,_=n.zip64||this.options.zip64||this.offset>=ht||h>=ht||this.offset+h>=ht,w=rn(this,n,"level"),p=rn(this,n,"useWebWorkers"),g=rn(this,n,"bufferedWrite"),b=rn(this,n,"keepOrder");let y=rn(this,n,"dataDescriptor");const x=rn(this,n,"signal");void 0===y&&(y=!0);const m=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,l;r.set(e,null);try{let d,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>l=t))),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(d=new rt,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,d=0!==l&&!i.directory,c=i.zip64;let u,f;if(o&&!i.zipCrypto){u=new Uint8Array(nn.length+2);const t=new DataView(u.buffer);sn(t,0,mt),u.set(nn,2),f=i.encryptionStrength,an(t,8,f)}else u=new Uint8Array(0);const h={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let _=vt;i.dataDescriptor&&(_|=8);let w=0;d&&(w=8);c&&(h.version=h.version>45?h.version:45);o&&(_|=1,i.zipCrypto||(h.version=h.version>51?h.version:51,w=99,d&&(h.rawExtraFieldAES[9]=8)));const p=h.headerArray=new Uint8Array(26),g=new DataView(p.buffer);sn(g,0,h.version),sn(g,2,_),sn(g,4,w);const b=new Uint32Array(1),y=new DataView(b.buffer);sn(y,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),sn(y,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=b[0];on(g,6,x),sn(g,22,r.length),sn(g,24,0);const m=new Uint8Array(30+r.length);let v;on(new DataView(m.buffer),0,wt),m.set(p,4),m.set(r,30);let k=0,A=0;if(t){k=t.size;const r=await me(n.Deflate,{codecType:de,level:l,password:s,encryptionStrength:f,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:d,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),v=await H(r,t,e,0,k,n,{onprogress:i.onprogress,signal:i.signal}),A=v.length}else await e.writeUint8Array(m);let E,U=new Uint8Array(0);i.dataDescriptor&&(U=new Uint8Array(c?24:16),E=new DataView(U.buffer),on(E,0,pt));if(t)if(o&&!i.zipCrypto||void 0===v.signature||(on(g,10,v.signature),h.signature=v.signature,i.dataDescriptor&&on(E,4,v.signature)),c){const t=new DataView(h.rawExtraFieldZip64.buffer);sn(t,0,1),sn(t,2,24),on(g,14,ht),ln(t,12,BigInt(A)),on(g,18,ht),ln(t,4,BigInt(k)),i.dataDescriptor&&(ln(E,8,BigInt(A)),ln(E,16,BigInt(k)))}else on(g,14,A),on(g,18,k),i.dataDescriptor&&(on(E,8,A),on(E,12,k));i.dataDescriptor&&await e.writeUint8Array(U);const R=m.length+(v?v.length:0)+U.length;return Object.assign(h,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),h}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),d!=a){const e=d.getData(),n=new FileReader,r=new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)})),[s]=await Promise.all([r,t.lockWrite,o]);if(!i.dataDescriptor){const t=new DataView(s);c.encrypted&&!i.zipCrypto||on(t,14,c.signature),c.zip64?(on(t,18,ht),on(t,22,ht)):(on(t,18,c.compressedSize),on(t,22,c.uncompressedSize))}await a.writeUint8Array(new Uint8Array(s))}if(c.offset=t.offset,c.zip64){ln(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{l&&l(),s&&s()}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:u,zip64:_,password:l,level:w,useWebWorkers:p,encryptionStrength:d,zipCrypto:c,bufferedWrite:g,keepOrder:b,dataDescriptor:y,signal:x}));return Object.assign(m,{name:t,comment:r,extraField:f}),new Ae(m)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=ht||r>=ht||s>=_t,l=new Uint8Array(r+(o?98:22)),d=new DataView(l.buffer);if(t.length){if(!(t.length<=_t))throw new Error(Ke);sn(d,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;on(d,i,gt),sn(d,i+4,t.version),l.set(t.headerArray,i+6),sn(d,i+30,a),sn(d,i+32,t.rawComment.length),t.directory&&an(d,i+38,16),t.zip64?on(d,i+42,ht):on(d,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(on(d,i,yt),ln(d,i+4,BigInt(44)),sn(d,i+12,45),sn(d,i+14,45),ln(d,i+24,BigInt(s)),ln(d,i+32,BigInt(s)),ln(d,i+40,BigInt(r)),ln(d,i+48,BigInt(a)),on(d,i+56,xt),ln(d,i+64,BigInt(a)+BigInt(r)),on(d,i+72,1),s=_t,a=ht,r=ht,i+=76),on(d,i,bt),sn(d,i+8,s),sn(d,i+10,s),on(d,i+12,r),on(d,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=N,t.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(t,"__esModule",{value:!0})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e=256,n=256,i=-2,r=-5;function a(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}const s=[0,1,2,3].concat(...a([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function o(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,c,u,f,h=0;for(c=0;c<=15;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],c=n[2*n[2*l+1]+1]+1,c>s&&(c=s,h++),n[2*l+1]=c,l>t.max_code||(e.bl_count[c]++,u=0,l>=a&&(u=r[l-a]),f=n[2*l],e.opt_len+=f*(c+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==h){do{for(c=s-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[s]--,h-=2}while(h>0);for(c=s;0!==c;c--)for(l=e.bl_count[c];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=c&&(e.opt_len+=(c-n[2*d+1])*n[2*d],n[2*d+1]=c),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function l(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}o._length_code=[0,1,2,3,4,5,6,7].concat(...a([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),o.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],o.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],o.d_code=function(t){return t<256?s[t]:s[256+(t>>>7)]},o.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],o.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],o.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],o.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],l.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],l.static_l_desc=new l(l.static_ltree,o.extra_lbits,257,286,15),l.static_d_desc=new l(l.static_dtree,o.extra_dbits,0,30,15),l.static_bl_desc=new l(null,o.extra_blbits,0,19,7);function d(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}const c=[new d(0,0,0,0,0),new d(4,4,8,4,1),new d(4,5,16,8,1),new d(4,6,32,32,1),new d(4,4,16,16,2),new d(8,16,32,32,2),new d(8,16,128,128,2),new d(8,32,128,256,2),new d(32,128,258,1024,2),new d(32,258,258,4096,2)],u=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],f=113,h=666,_=258,w=262;function p(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function lt(t,e){let n;const i=e;it>16-i?(n=t,nt|=n<>>16-it,it+=i-16):(nt|=t<=8&&(st(255&nt),nt>>>=8,it-=8)}function ft(n,i){let r,a,s;if(t.pending_buf[$+2*Q]=n>>>8&255,t.pending_buf[$+2*Q+1]=255&n,t.pending_buf[X+Q]=255&i,Q++,0===n?q[2*i]++:(tt++,n--,q[2*(o._length_code[i]+e+1)]++,j[2*o.d_code(n)]++),0==(8191&Q)&&V>2){for(r=8*Q,a=C-z,s=0;s<30;s++)r+=j[2*s]*(5+o.extra_dbits[s]);if(r>>>=3,tt8?ot(nt):it>0&&st(255&nt),nt=0,it=0}function wt(e,n,i){lt(0+(i?1:0),3),function(e,n,i){_t(),et=8,i&&(ot(n),ot(~n)),t.pending_buf.set(m.subarray(e,e+n),t.pending),t.pending+=n}(e,n,!0)}function pt(e,n,i){let r,a,s=0;V>0?(G.build_tree(t),K.build_tree(t),s=function(){let e;for(at(q,G.max_code),at(j,K.max_code),Y.build_tree(t),e=18;e>=3&&0===Z[2*o.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?wt(e,n,i):a==r?(lt(2+(i?1:0),3),ht(l.static_ltree,l.static_dtree)):(lt(4+(i?1:0),3),function(t,e,n){let i;for(lt(t-257,5),lt(e-1,5),lt(n-4,4),i=0;i=0?z:-1,C-z,t),z=C,a.flush_pending()}function bt(){let t,e,n,i;do{if(i=v-L-C,0===i&&0===C&&0===L)i=b;else if(-1==i)i--;else if(C>=b+b-w){m.set(m.subarray(b,b+b),0),M-=b,C-=b,z-=b,t=U,n=t;do{e=65535&A[--n],A[n]=e>=b?e-b:0}while(0!=--t);t=b,n=t;do{e=65535&k[--n],k[n]=e>=b?e-b:0}while(0!=--t);i+=b}if(0===a.avail_in)return;t=a.read_buf(m,C+L,i),L+=t,L>=3&&(E=255&m[C],E=(E<b-w?C-(b-w):0;let o=H;const l=x,d=C+_;let c=m[r+a-1],u=m[r+a];W>=P&&(i>>=2),o>L&&(o=L);do{if(e=t,m[e+a]==u&&m[e+a-1]==c&&m[e]==m[r]&&m[++e]==m[r+1]){r+=2,e++;do{}while(m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&m[++r]==m[++e]&&ra){if(M=t,a=n,n>=o)break;c=m[r+a-1],u=m[r+a]}}}while((t=65535&k[t&l])>s&&0!=--i);return a<=L?a:L}function xt(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,s=f,g=0,G.dyn_tree=q,G.stat_desc=l.static_l_desc,K.dyn_tree=j,K.stat_desc=l.static_d_desc,Y.dyn_tree=Z,Y.stat_desc=l.static_bl_desc,nt=0,it=0,et=8,rt(),function(){v=2*b,A[U-1]=0;for(let t=0;t9||8!=a||r<9||r>15||n<0||n>9||o<0||o>2?i:(e.dstate=t,y=r,b=1<9||n<0||n>2?i:(c[V].func!=c[e].func&&0!==t.total_in&&(r=t.deflate(1)),V!=e&&(V=e,B=c[V].max_lazy,P=c[V].good_length,H=c[V].nice_length,O=c[V].max_chain),N=n,r)},t.deflateSetDictionary=function(t,e,n){let r,a=n,o=0;if(!e||42!=s)return i;if(a<3)return 0;for(a>b-w&&(a=b-w,o=n-a),m.set(e.subarray(o,o+a),0),C=a,z=a,E=255&m[0],E=(E<4||o<0)return i;if(!e.next_out||!e.next_in&&0!==e.avail_in||s==h&&4!=o)return e.msg=u[4],i;if(0===e.avail_out)return e.msg=u[7],r;var P;if(a=e,R=g,g=o,42==s&&(p=8+(y-8<<4)<<8,v=(V-1&255)>>1,v>3&&(v=3),p|=v<<6,0!==C&&(p|=32),p+=31-p%31,s=f,st((P=p)>>8&255),st(255&P)),0!==t.pending){if(a.flush_pending(),0===a.avail_out)return g=-1,0}else if(0===a.avail_in&&o<=R&&4!=o)return a.msg=u[7],r;if(s==h&&0!==a.avail_in)return e.msg=u[7],r;if(0!==a.avail_in||0!==L||0!=o&&s!=h){switch(O=-1,c[V].func){case 0:O=function(t){let e,n=65535;for(n>d-5&&(n=d-5);;){if(L<=1){if(bt(),0===L&&0==t)return 0;if(0===L)break}if(C+=L,L=0,e=z+n,(0===C||C>=e)&&(L=C-e,C=e,gt(!1),0===a.avail_out))return 0;if(C-z>=b-w&&(gt(!1),0===a.avail_out))return 0}return gt(4==t),0===a.avail_out?4==t?2:0:4==t?3:1}(o);break;case 1:O=function(t){let e,n=0;for(;;){if(L=3&&(E=(E<=3)if(e=ft(C-M,I-3),L-=I,I<=B&&L>=3){I--;do{C++,E=(E<=3&&(E=(E<4096)&&(I=2)),W>=3&&I<=W){n=C+L-3,e=ft(C-1-S,W-3),L-=W-1,W-=2;do{++C<=n&&(E=(E<n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const y=-2,x=-3,m=-5,v=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],k=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],A=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],E=[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],U=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],R=[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],D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],F=15;function z(){let t,e,n,i,r,a;function s(t,e,s,o,l,d,c,u,f,h,_){let w,p,g,b,y,v,k,A,E,U,R,D,z,I,S;U=0,y=s;do{n[t[e+U]]++,U++,y--}while(0!==y);if(n[0]==s)return c[0]=-1,u[0]=0,0;for(A=u[0],v=1;v<=F&&0===n[v];v++);for(k=v,Ay&&(A=y),u[0]=A,I=1<D+A;){if(b++,D+=A,S=g-D,S=S>A?A:S,(p=1<<(v=k-D))>w+1&&(p-=w+1,z=k,v1440)return x;r[b]=R=h[0],h[0]+=S,0!==b?(a[b]=y,i[0]=v,i[1]=A,v=y>>>D-A,i[2]=R-r[b-1]-v,f.set(i,3*(r[b-1]+v))):c[0]=R}for(i[1]=k-D,U>=s?i[0]=192:_[U]>>D;v>>=1)y^=v;for(y^=v,E=(1<257?(h==x?f.msg="oversubscribed distance tree":h==m?(f.msg="incomplete distance tree",h=x):-4!=h&&(f.msg="empty distance tree with lengths",h=x),h):0)}}z.inflate_trees_fixed=function(t,e,n,i){return t[0]=9,e[0]=5,n[0]=k,i[0]=A,0};function I(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,d=0,c=0,u=0,f=0,h=0,_=0;function w(t,e,n,i,r,a,s,o){let l,d,c,u,f,h,_,w,p,g,b,y,m,k,A,E;_=o.next_in_index,w=o.avail_in,f=s.bitb,h=s.bitk,p=s.write,g=p>=d[E+1],h-=d[E+1],0!=(16&u)){for(u&=15,m=d[E+2]+(f&v[u]),f>>=u,h-=u;h<15;)w--,f|=(255&o.read_byte(_++))<>=d[E+1],h-=d[E+1],0!=(16&u)){for(u&=15;h>=u,h-=u,g-=m,p>=k)A=p-k,p-A>0&&2>p-A?(s.window[p++]=s.window[A++],s.window[p++]=s.window[A++],m-=2):(s.window.set(s.window.subarray(A,A+2),p),p+=2,A+=2,m-=2);else{A=p-k;do{A+=s.end}while(A<0);if(u=s.end-A,m>u){if(m-=u,p-A>0&&u>p-A)do{s.window[p++]=s.window[A++]}while(0!=--u);else s.window.set(s.window.subarray(A,A+u),p),p+=u,A+=u,u=0;A=0}}if(p-A>0&&m>p-A)do{s.window[p++]=s.window[A++]}while(0!=--m);else s.window.set(s.window.subarray(A,A+m),p),p+=m,A+=m,m=0;break}if(0!=(64&u))return o.msg="invalid distance code",m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,x;l+=d[E+2],l+=f&v[u],E=3*(c+l),u=d[E]}break}if(0!=(64&u))return 0!=(32&u)?(m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,1):(o.msg="invalid literal/length code",m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,x);if(l+=d[E+2],l+=f&v[u],E=3*(c+l),0===(u=d[E])){f>>=d[E+1],h-=d[E+1],s.window[p++]=d[E+2],g--;break}}else f>>=d[E+1],h-=d[E+1],s.window[p++]=d[E+2],g--}while(g>=258&&w>=10);return m=o.avail_in-w,m=h>>3>3:m,w+=m,_-=m,h-=m<<3,s.bitb=f,s.bitk=h,o.avail_in=w,o.total_in+=_-o.next_in_index,o.next_in_index=_,s.write=p,0}t.init=function(t,a,s,o,l,d){e=0,u=t,f=a,i=s,h=o,r=l,_=d,n=null},t.proc=function(t,p,g){let b,m,k,A,E,U,R,D=0,F=0,z=0;for(z=p.next_in_index,A=p.avail_in,D=t.bitb,F=t.bitk,E=t.write,U=E=258&&A>=10&&(t.bitb=D,t.bitk=F,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=E,g=w(u,f,i,h,r,_,t,p),z=p.next_in_index,A=p.avail_in,D=t.bitb,F=t.bitk,E=t.write,U=E>>=n[m+1],F-=n[m+1],k=n[m],0===k){l=n[m+2],e=6;break}if(0!=(16&k)){d=15&k,a=n[m+2],e=2;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}if(0!=(32&k)){e=7;break}return e=9,p.msg="invalid literal/length code",g=x,t.bitb=D,t.bitk=F,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=E,t.inflate_flush(p,g);case 2:for(b=d;F>=b,F-=b,o=f,n=r,s=_,e=3;case 3:for(b=o;F>=n[m+1],F-=n[m+1],k=n[m],0!=(16&k)){d=15&k,c=n[m+2],e=4;break}if(0==(64&k)){o=k,s=m/3+n[m+2];break}return e=9,p.msg="invalid distance code",g=x,t.bitb=D,t.bitk=F,p.avail_in=A,p.total_in+=z-p.next_in_index,p.next_in_index=z,t.write=E,t.inflate_flush(p,g);case 4:for(b=d;F>=b,F-=b,e=5;case 5:for(R=E-c;R<0;)R+=t.end;for(;0!==a;){if(0===U&&(E==t.end&&0!==t.read&&(E=0,U=E7&&(F-=8,A++,z--),t.write=E,g=t.inflate_flush(p,g),E=t.write,U=Et.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&e==m&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let _,w,p,g,b,m,k,A;for(g=t.next_in_index,b=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m>>1){case 0:w>>>=3,p-=3,_=7&p,w>>>=_,p-=_,r=1;break;case 1:E=[],U=[],R=[[]],D=[[]],z.inflate_trees_fixed(E,U,R,D),c.init(E[0],U[0],R[0],0,D[0],0),w>>>=3,p-=3,r=6;break;case 2:w>>>=3,p-=3,r=3;break;case 3:return w>>>=3,p-=3,r=9,t.msg="invalid block type",e=x,n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,b--,w|=(255&t.read_byte(g++))<>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=x,n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);a=65535&w,w=p=0,r=0!==a?2:0!==u?7:0;break;case 2:if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);if(0===k&&(m==n.end&&0!==n.read&&(m=0,k=mb&&(_=b),_>k&&(_=k),n.window.set(t.read_buf(g,_),m),g+=_,b-=_,m+=_,k-=_,0!=(a-=_))break;r=0!==u?7:0;break;case 3:for(;p<14;){if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,b--,w|=(255&t.read_byte(g++))<29||(_>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=x,n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);if(_=258+(31&_)+(_>>5&31),!i||i.length<_)i=[];else for(A=0;A<_;A++)i[A]=0;w>>>=14,p-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;p<3;){if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,b--,w|=(255&t.read_byte(g++))<>>=3,p-=3}for(;o<19;)i[S[o++]]=0;if(l[0]=7,_=h.inflate_trees_bits(i,l,d,f,t),0!=_)return(e=_)==x&&(i=null,r=9),n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);o=0,r=5;case 5:for(;_=s,!(o>=258+(31&_)+(_>>5&31));){let a,c;for(_=l[0];p<_;){if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,b--,w|=(255&t.read_byte(g++))<>>=_,p-=_,i[o++]=c;else{for(A=18==c?7:c-14,a=18==c?11:3;p<_+A;){if(0===b)return n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);e=0,b--,w|=(255&t.read_byte(g++))<>>=_,p-=_,a+=w&v[A],w>>>=A,p-=A,A=o,_=s,A+a>258+(31&_)+(_>>5&31)||16==c&&A<1)return i=null,r=9,t.msg="invalid bit length repeat",e=x,n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);c=16==c?i[A-1]:0;do{i[A++]=c}while(0!=--a);o=A}}if(d[0]=-1,F=[],I=[],T=[],C=[],F[0]=9,I[0]=6,_=s,_=h.inflate_trees_dynamic(257+(31&_),1+(_>>5&31),i,F,I,T,C,f,t),0!=_)return _==x&&(i=null,r=9),e=_,n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,n.inflate_flush(t,e);c.init(F[0],I[0],f,T[0],f,C[0]),r=6;case 6:if(n.bitb=w,n.bitk=p,t.avail_in=b,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=m,1!=(e=c.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,c.free(t),g=t.next_in_index,b=t.avail_in,w=n.bitb,p=n.bitk,m=n.write,k=m15?(t.inflateEnd(n),y):(t.wbits=i,n.istate.blocks=new T(n,1<>4)>r.wbits){r.mode=C,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=C,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=C,t.msg="need dictionary",r.marker=0,y;case 7:if(n=r.blocks.proc(t,n),n==x){r.mode=C,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case C:return x;default:return y}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return y;const a=t.istate;return r>=1<{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class rt extends nt{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class at extends et{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),ft(this.url)&&!this.preventHeadRequest){const t=await ot(J,this.url,this.options);if(this.size=Number(t.headers.get(Y)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(X)!=$)throw new Error(G);void 0===this.size&&await st(this,this.options)}else await st(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await ot(Q,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(G);return new Uint8Array(await n.arrayBuffer())}return this.data||await st(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function st(t,e){const n=await ot(Q,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function ot(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(Z+(r.statusText||r.status))}class lt extends et{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),ft(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>ct(J,this.url,(n=>{this.size=Number(n.getResponseHeader(Y)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(X)==$?t():e(new Error(G)):void 0===this.size?dt(this,this.url).then((()=>t())).catch(e):t()}),e)));await dt(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await dt(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>ct(Q,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(G)}}function dt(t,e){return new Promise(((n,i)=>ct(Q,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function ct(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(Z+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class ut extends et{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new lt(t,e):this.reader=new at(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function ft(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const ht=4294967295,_t=65535,wt=67324752,pt=134695760,gt=33639248,bt=101010256,yt=101075792,xt=117853008,mt=39169,vt=2048,kt="/",At=new Date(2107,11,31),Et=new Date(1980,0,1),Ut="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const Rt=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;Rt[t]=e}class Dt{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^Rt[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Ft={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=Ft.getPartial(n);return 32===i?t.concat(e):Ft._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+Ft.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=Ft.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=Ft.getPartial(r);return i.push(Ft.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},zt={bytes:{fromBits(t){const e=Ft.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,d;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let c=s=0;!n[c];c^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[c]=a,i[a]=c,d=r[l=r[o=r[c]]];let u=16843009*d^65537*l^257*o^16843008*c,f=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][c]=f=f<<24^f>>>8,e[n][a]=u=u<<24^u>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],d=a[3],c=a[4];let u,f,h,_=t[0]^n[0],w=t[e?3:1]^n[1],p=t[2]^n[2],g=t[e?1:3]^n[3],b=4;for(let t=0;t>>24]^o[w>>16&255]^l[p>>8&255]^d[255&g]^n[b],f=s[w>>>24]^o[p>>16&255]^l[g>>8&255]^d[255&_]^n[b+1],h=s[p>>>24]^o[g>>16&255]^l[_>>8&255]^d[255&w]^n[b+2],g=s[g>>>24]^o[_>>16&255]^l[w>>8&255]^d[255&p]^n[b+3],b+=4,_=u,w=f,p=h;for(let t=0;t<4;t++)r[e?3&-t:t]=c[_>>>24]<<24^c[w>>16&255]<<16^c[p>>8&255]<<8^c[255&g]^n[b++],u=_,_=w,w=p,p=g,g=u;return r}}},St={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=Ft.bitLength(e);for(let r=0;rt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const $t=12;class te{constructor(t,e){this.password=t,this.passwordVerification=e,re(this,t)}async append(t){if(this.password){const e=ne(this,t.subarray(0,$t));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(Tt);t=t.subarray($t)}return ne(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class ee{constructor(t,e){this.passwordVerification=e,this.password=t,re(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array($t));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(ie(this,i),0),n=$t}else e=new Uint8Array(t.length),n=0;return e.set(ie(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function ne(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function se(t){const e=2|t.keys[2];return oe(Math.imul(e,1^e)>>>8)}function oe(t){return 255&t}function le(t){return 4294967295&t}const de="deflate",ce="inflate",ue="Invalid signature";class fe{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new Dt,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new te(e.password,e.passwordVerification):new Kt(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(ue);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(ue)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class he{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new Dt,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new ee(e.password,e.passwordVerification):new Yt(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const _e="init",we="append",pe="flush",ge="message";var be=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip-no-worker.min.js",document.baseURI).href)),t.worker.addEventListener(ge,r,!1),t.interface={append:t=>n({type:we,data:t}),flush:()=>n({type:pe})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:_e,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==_e||r==pe||r==we){const n=i.data;r==pe?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(de)?new he(t,e):e.codecType.startsWith(ce)?new fe(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let ye=[],xe=[];function me(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(ye.length!t.busy));return n?be(n,t,e,ve,i,r):new Promise((n=>xe.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function ve(t){const e=!xe.length;if(e)ye=ye.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=xe.splice(0,1);e(be(t,n,i,ve,r,a))}return e}const ke=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Ae{constructor(t){ke.forEach((e=>this[e]=t[e]))}}const Ee="File format is not recognized",Ue="End of central directory not found",Re="End of Zip64 central directory not found",De="End of Zip64 central directory locator not found",Fe="Central directory header not found",ze="Local file header not found",Ie="Zip64 extra field not found",Se="File contains encrypted entry",Te="Encryption method not supported",Ce="Compression method not supported",Me="utf-8",Le=["uncompressedSize","compressedSize","offset"];class We{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,o=this.compressionMethod,l=this.config,d=this.bitFlag,c=this.signature;let u=Ne(this,e,"password");if(u=u&&u.length&&u,s&&99!=s.originalCompressionMethod)throw new Error(Ce);if(0!=o&&8!=o)throw new Error(Ce);if(je(a,0)!=wt)throw new Error(ze);const f=this.localDirectory={};Oe(f,a,4),f.rawExtraField=r.subarray(i+30+f.filenameLength,i+30+f.filenameLength+f.extraFieldLength),Be(this,f,a,4);const h=i+30+f.filenameLength+f.extraFieldLength,_=d.encrypted&&f.bitFlag.encrypted,w=_&&!s;if(_){if(!w&&void 0===s.strength)throw new Error(Te);if(!u)throw new Error(Se)}const p=await me(l.Inflate,{codecType:ce,password:u,zipCrypto:w,encryptionStrength:s&&s.strength,signed:Ne(this,e,"checkSignature"),passwordVerification:w&&(d.dataDescriptor?this.rawLastModDate>>>8&255:c>>>24&255),signature:c,compressed:0!=o,encrypted:_,useWebWorkers:Ne(this,e,"useWebWorkers")},l);return t.initialized||await t.init(),await H(p,n,t,h,this.compressedSize,l,{onprogress:e.onprogress,signal:Ne(this,e,"signal")}),t.getData()}}function Oe(t,e,n){t.version=qe(e,n);const i=t.rawBitFlag=qe(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&vt)==vt},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=je(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=qe(e,n+22),t.extraFieldLength=qe(e,n+24)}function Be(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==ht));for(let e=0;e{if(e[n]==ht){if(!t||void 0===t[n])throw new Error(Ie);e[n]=t[n]}}))}(d,e);const c=e.extraFieldUnicodePath=a.get(28789);c&&Ve(c,"filename","rawFilename",e,t);const u=e.extraFieldUnicodeComment=a.get(25461);u&&Ve(u,"comment","rawComment",e,t);const f=e.extraFieldAES=a.get(39169);f?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=He(i,0),t.vendorId=He(i,2);const r=He(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=qe(i,5)}else e.compressionMethod=n}(f,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function Ve(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=He(a,0),t.signature=je(a,1);const s=new Dt;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==je(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function Ne(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function Pe(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),c.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}},Inflate:function(){const t=new W,e=new Uint8Array(512);let n=!1;t.inflateInit(),t.next_out=e,this.append=function(i,r){const a=[];let s,o,l=0,d=0,c=0;if(0!==i.length){t.next_in_index=0,t.next_in=i,t.avail_in=i.length;do{if(t.next_out_index=0,t.avail_out=512,0!==t.avail_in||n||(t.next_in_index=0,n=!0),s=t.inflate(0),n&&s===m){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((n||1===s)&&t.avail_in===i.length)throw new Error("inflating: bad input");t.next_out_index&&(512===t.next_out_index?a.push(new Uint8Array(e)):a.push(new Uint8Array(e.subarray(0,t.next_out_index)))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(c),a.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}}),t.BlobReader=it,t.BlobWriter=rt,t.Data64URIReader=class extends et{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_ABORT=P,t.ERR_BAD_FORMAT=Ee,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Fe,t.ERR_DUPLICATED_NAME=Ge,t.ERR_ENCRYPTED=Se,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=De,t.ERR_EOCDR_NOT_FOUND=Ue,t.ERR_EOCDR_ZIP64_NOT_FOUND=Re,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Ie,t.ERR_HTTP_RANGE=G,t.ERR_INVALID_COMMENT=Ke,t.ERR_INVALID_DATE=Qe,t.ERR_INVALID_ENCRYPTION_STRENGTH=$e,t.ERR_INVALID_ENTRY_COMMENT=Ye,t.ERR_INVALID_ENTRY_NAME=Xe,t.ERR_INVALID_EXTRAFIELD_DATA=en,t.ERR_INVALID_EXTRAFIELD_TYPE=tn,t.ERR_INVALID_PASSWORD=Tt,t.ERR_INVALID_SIGNATURE=ue,t.ERR_INVALID_VERSION=Je,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=ze,t.ERR_UNSUPPORTED_COMPRESSION=Ce,t.ERR_UNSUPPORTED_ENCRYPTION=Te,t.HttpRangeReader=class extends ut{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=ut,t.Reader=et,t.TextReader=class extends et{constructor(t){super(),this.blobReader=new it(new Blob([t],{type:K}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends nt{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:K})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:K})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends et{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends nt{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=nt,t.ZipReader=class{constructor(t,e={}){this.reader=t,this.options=e,this.config=V()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ee);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,bt,22,1048560);if(!n)throw new Error(Ue);const i=new DataView(n.buffer);let r=je(i,12),a=je(i,16),s=qe(i,8),o=0;if(a==ht||r==ht||s==_t){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(je(i,0)!=xt)throw new Error(Re);a=Ze(i,8);let l=await e.readUint8Array(a,56),d=new DataView(l.buffer);const c=n.offset-20-56;if(je(d,0)!=yt&&a!=c){const t=a;a=c,o=a-t,l=await e.readUint8Array(a,56),d=new DataView(l.buffer)}if(je(d,0)!=yt)throw new Error(De);s=Ze(d,24),r=Ze(i,4),a-=Ze(d,40)}if(a<0||a>=e.size)throw new Error(Ee);let l=0,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer);const u=n.offset-r;if(je(c,l)!=gt&&a!=u){const t=a;a=u,o=a-t,d=await e.readUint8Array(a,e.size-a),c=new DataView(d.buffer)}if(a<0||a>=e.size)throw new Error(Ee);const f=[];for(let e=0;ee.getData(t,n),f.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return f}async close(){}},t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=V(),this.files=new Map,this.offset=t.size,this.maxOutputSize=0}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(kt)?t+=kt:n.directory=t.endsWith(kt),this.files.has(t))throw new Error(Ge);const i=(new TextEncoder).encode(t);if(i.length>_t)throw new Error(Xe);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>_t)throw new Error(Ye);const s=this.options.version||n.version||0;if(s>_t)throw new Error(Je);const o=n.lastModDate||new Date;if(oAt)throw new Error(Qe);const l=rn(this,n,"password"),d=rn(this,n,"encryptionStrength")||3,c=rn(this,n,"zipCrypto");if(void 0!==l&&void 0!==d&&(d<1||d>3))throw new Error($e);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const f=n.extraField;if(f){let t=0,e=0;f.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),f.forEach(((t,n)=>{if(n>_t)throw new Error(tn);if(t.length>_t)throw new Error(en);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const h=e?Math.floor(1.05*e.size):0;this.maxOutputSize+=h,await Promise.resolve();const _=n.zip64||this.options.zip64||this.offset>=ht||h>=ht||this.offset+this.maxOutputSize>=ht,w=rn(this,n,"level"),p=rn(this,n,"useWebWorkers"),g=rn(this,n,"bufferedWrite");let b=rn(this,n,"keepOrder"),y=rn(this,n,"dataDescriptor");const x=rn(this,n,"signal");void 0===y&&(y=!0),void 0===b&&(b=!0);const m=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,o,l;r.set(e,null);try{let d,c;try{i.keepOrder&&(o=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>l=t))),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(d=new rt,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),c=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,o=Boolean(s&&s.length),l=i.level,d=0!==l&&!i.directory,c=i.zip64;let u,f;if(o&&!i.zipCrypto){u=new Uint8Array(nn.length+2);const t=new DataView(u.buffer);sn(t,0,mt),u.set(nn,2),f=i.encryptionStrength,an(t,8,f)}else u=new Uint8Array(0);const h={version:i.version||20,zip64:c,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:c?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let _=vt;i.dataDescriptor&&(_|=8);let w=0;d&&(w=8);c&&(h.version=h.version>45?h.version:45);o&&(_|=1,i.zipCrypto||(h.version=h.version>51?h.version:51,w=99,d&&(h.rawExtraFieldAES[9]=8)));const p=h.headerArray=new Uint8Array(26),g=new DataView(p.buffer);sn(g,0,h.version),sn(g,2,_),sn(g,4,w);const b=new Uint32Array(1),y=new DataView(b.buffer);sn(y,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),sn(y,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const x=b[0];on(g,6,x),sn(g,22,r.length),sn(g,24,0),sn(g,24,u.length+h.rawExtraField.length);const m=new Uint8Array(30+r.length+u.length+h.rawExtraField.length);let v;on(new DataView(m.buffer),0,wt),m.set(p,4),m.set(r,30),m.set(u,30+r.length),m.set(h.rawExtraField,30+r.length+u.length);let k=0,A=0;if(t){k=t.size;const r=await me(n.Deflate,{codecType:de,level:l,password:s,encryptionStrength:f,zipCrypto:o&&i.zipCrypto,passwordVerification:o&&i.zipCrypto&&x>>8&255,signed:!0,compressed:d,encrypted:o,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(m),v=await H(r,t,e,0,k,n,{onprogress:i.onprogress,signal:i.signal}),A=v.length}else await e.writeUint8Array(m);let E,U=new Uint8Array(0);i.dataDescriptor&&(U=new Uint8Array(c?24:16),E=new DataView(U.buffer),on(E,0,pt));if(t)if(o&&!i.zipCrypto||void 0===v.signature||(on(g,10,v.signature),h.signature=v.signature,i.dataDescriptor&&on(E,4,v.signature)),c){const t=new DataView(h.rawExtraFieldZip64.buffer);sn(t,0,1),sn(t,2,24),on(g,14,ht),ln(t,12,BigInt(A)),on(g,18,ht),ln(t,4,BigInt(k)),i.dataDescriptor&&(ln(E,8,BigInt(A)),ln(E,16,BigInt(k)))}else on(g,14,A),on(g,18,k),i.dataDescriptor&&(on(E,8,A),on(E,12,k));i.dataDescriptor&&await e.writeUint8Array(U);const R=m.length+(v?v.length:0)+U.length;return Object.assign(h,{compressedSize:A,uncompressedSize:k,lastModDate:a,rawLastModDate:x,encrypted:o,length:R}),h}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,c),d!=a){const e=d.getData(),n=new FileReader,r=new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)})),[s]=await Promise.all([r,t.lockWrite,o]);if(!i.dataDescriptor){const t=new DataView(s);c.encrypted&&!i.zipCrypto||on(t,14,c.signature),c.zip64?(on(t,18,ht),on(t,22,ht)):(on(t,18,c.compressedSize),on(t,22,c.uncompressedSize))}await a.writeUint8Array(new Uint8Array(s))}if(c.offset=t.offset,c.zip64){ln(new DataView(c.rawExtraFieldZip64.buffer),20,BigInt(c.offset))}return t.offset+=c.length,c}finally{l&&l(),s&&s()}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:o,rawExtraField:u,zip64:_,password:l,level:w,useWebWorkers:p,encryptionStrength:d,zipCrypto:c,bufferedWrite:g,keepOrder:b,dataDescriptor:y,signal:x}));return this.maxOutputSize-=h,Object.assign(m,{name:t,comment:r,extraField:f}),new Ae(m)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=ht||r>=ht||s>=_t,l=new Uint8Array(r+(o?98:22)),d=new DataView(l.buffer);if(t.length){if(!(t.length<=_t))throw new Error(Ke);sn(d,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;on(d,i,gt),sn(d,i+4,t.version),l.set(t.headerArray,i+6),sn(d,i+30,a),sn(d,i+32,t.rawComment.length),t.directory&&an(d,i+38,16),t.zip64?on(d,i+42,ht):on(d,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(on(d,i,yt),ln(d,i+4,BigInt(44)),sn(d,i+12,45),sn(d,i+14,45),ln(d,i+24,BigInt(s)),ln(d,i+32,BigInt(s)),ln(d,i+40,BigInt(r)),ln(d,i+48,BigInt(a)),on(d,i+56,xt),ln(d,i+64,BigInt(a)+BigInt(r)),on(d,i+72,1),s=_t,a=ht,r=ht,i+=76),on(d,i,bt),sn(d,i+8,s),sn(d,i+10,s),on(d,i+12,r),on(d,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=N,t.getMimeType=function(){return"application/octet-stream"},Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/dist/zip.js b/dist/zip.js index e3b1e75f..eb545fd1 100644 --- a/dist/zip.js +++ b/dist/zip.js @@ -83,7 +83,7 @@ } } - var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n;}class e{constructor(t){this.crc=t||-1;}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n;}get(){return ~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},a={name:"AES-CTR"},r=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},a),d=["deriveBits"],_=["sign"],u=[8,12,16],f=[16,24,32],c=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=y(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await p(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2);}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=y(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);r=new Uint8Array(t);}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=a[t]&&(s=!1);}return {valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0);}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=y(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await p(t,e,n,["encrypt"]),y(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=y(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=y(this.output,t);}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return {data:y(t,n),signature:n}}}async function p(t,e,n,i){t.counter=new Uint8Array(c);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,r,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),b=new Uint8Array(w);t.keys={key:await h.importKey("raw",b.subarray(0,f[t.strength]),a,!0,i),authentication:await h.importKey("raw",b.subarray(f[t.strength],2*f[t.strength]),o,!1,_),passwordVerification:b.subarray(2*f[t.strength])};}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0;}}function y(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t);}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return k(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function E(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function C(t){return 4294967295&t}class z{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new b(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const M={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),V=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new z(t,e):void 0}(n,e);},append:async t=>({data:await V.append(t.data)}),flush:()=>V.flush()};let V;function O(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=M[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data]);}catch(e){postMessage(t);}else postMessage(t);}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}});}}));const D=[0,1,2,3].concat(...O([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function K(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1;}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1);}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],_=n[2*n[2*l+1]+1]+1,_>s&&(_=s,c++),n[2*l+1]=_,l>t.max_code||(e.bl_count[_]++,u=0,l>=r&&(u=a[l-r]),f=n[2*l],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(l=e.bl_count[_];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),l--);}}(n),function(t,n,i){const a=[];let r,s,o,l=0;for(r=1;r<=15;r++)a[r]=l=l+i[r-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(a[o]++,o));}(i,t.max_code,n.bl_count);};}function R(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a;}function T(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a;}K._length_code=[0,1,2,3,4,5,6,7].concat(...O([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),K.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],K.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],K.d_code=function(t){return t<256?D[t]:D[256+(t>>>7)]},K.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],K.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],K.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],R.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],R.static_l_desc=new R(R.static_ltree,K.extra_lbits,257,286,15),R.static_d_desc=new R(R.static_dtree,K.extra_dbits,0,30,15),R.static_bl_desc=new R(null,K.extra_blbits,0,19,7);const B=[new T(0,0,0,0,0),new T(4,4,8,4,1),new T(4,5,16,8,1),new T(4,6,32,32,1),new T(4,4,16,16,2),new T(8,16,32,32,2),new T(8,16,128,128,2),new T(8,32,128,256,2),new T(32,128,258,1024,2),new T(32,258,258,4096,2)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function P(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255);}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8);}function at(e,n){let i,a,r;if(t.pending_buf[F+2*H]=e>>>8&255,t.pending_buf[F+2*H+1]=255&e,t.pending_buf[q+H]=255&n,H++,0===e?j[2*n]++:(G++,e--,j[2*(K._length_code[n]+256+1)]++,M[2*K.d_code(e)]++),0==(8191&H)&&E>2){for(i=8*H,a=m-p,r=0;r<30;r++)i+=M[2*r]*(5+K.extra_dbits[r]);if(i>>>=3,G8?$(N):Q>0&&Z(255&N),N=0,Q=0;}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function lt(e,n,i){let a,r,s=0;E>0?(O.build_tree(t),D.build_tree(t),s=function(){let e;for(Y(j,O.max_code),Y(M,D.max_code),T.build_tree(t),e=18;e>=3&&0===V[2*K.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?ot(e,n,i):r==a?(tt(2+(i?1:0),3),rt(R.static_ltree,R.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?p:-1,m-p,t),p=m,e.flush_pending();}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){l.set(l.subarray(r,r+r),0),v-=r,m-=r,p-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(l,m+k,a),k+=t,k>=3&&(f=255&l[m],f=(f<r-262?m-(r-262):0;let u=z;const f=o,c=m+258;let h=l[a+s-1],w=l[a+s];A>=C&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&l[e+s-1]==h&&l[e]==l[a]&&l[++e]==l[a+1]){a+=2,e++;do{}while(l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&as){if(v=t,s=n,n>=u)break;h=l[a+s-1],w=l[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,O.dyn_tree=j,O.stat_desc=R.static_l_desc,D.dyn_tree=M,D.stat_desc=R.static_d_desc,T.dyn_tree=V,T.stat_desc=R.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||a<9||a>15||n<0||n>9||p<0||p>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(B[E].func!=B[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=B[E].max_lazy,C=B[E].good_length,z=B[E].nice_length,U=B[E].max_chain),S=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,p=s,f=255&l[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=L[4],-2;if(0===d.avail_out)return d.msg=L[7],-5;var V;if(e=d,j=a,a=h,42==n&&(C=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),C|=z<<6,0!==m&&(C|=32),C+=31-C%31,n=113,Z((V=C)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return d.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,B[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=p+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-p>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,l),l+=t.length;})),s}},this.flush=function(){let t,a,r=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length;})),a};}W.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new q,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return -2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0));}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],G=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],J=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],N=[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],Q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],X=[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],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Z(){let t,e,n,i,a,r;function s(t,e,s,o,l,d,_,u,f,c,h){let w,b,p,x,y,g,m,v,k,A,U,I,E,S,C;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,S=1<I+v;){if(x++,I+=v,C=p-I,C=C>v?v:C,(b=1<<(g=m-I))>w+1&&(b-=w+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=C,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function $(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,d=0,_=0,u=0,f=0,c=0,h=0;function w(t,e,n,i,a,r,s,o){let l,d,_,u,f,c,h,w,b,p,x,y,g,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,c=s.bitk,b=s.write,p=b>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)w--,f|=(255&o.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,p-=g,b>=m)v=b-m,b-v>0&&2>b-v?(s.window[b++]=s.window[v++],s.window[b++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),b),b+=2,v+=2,g-=2);else {v=b-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,b-v>0&&u>b-v)do{s.window[b++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),b),b+=u,v+=u,u=0;v=0;}}if(b-v>0&&g>b-v)do{s.window[b++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),b),b+=g,v+=g,g=0;break}if(0!=(64&u))return o.msg="invalid distance code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3;l+=d[k+2],l+=f&F[u],k=3*(_+l),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,1):(o.msg="invalid literal/length code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3);if(l+=d[k+2],l+=f&F[u],k=3*(_+l),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;break}}else f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;}while(p>=258&&w>=10);return g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,0}t.init=function(t,r,s,o,l,d){e=0,u=t,f=r,i=s,c=o,a=l,h=d,n=null;},t.proc=function(t,b,p){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,p=w(u,f,i,c,a,h,t,b),E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){l=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,b.msg="invalid literal/length code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 2:for(x=d;I>=x,I-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}return e=9,b.msg="invalid distance code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,p=t.inflate_flush(b,p),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,w,b,p,x,y,g,m;for(p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y>>1){case 0:w>>>=3,b-=3,h=7&b,w>>>=h,b-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Z.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,b-=3,a=6;break;case 2:w>>>=3,b-=3,a=3;break;case 3:return w>>>=3,b-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;b<32;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>16&65535)!=(65535&w))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);r=65535&w,w=b=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(p,h),y),p+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;b<14;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,b-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;b<3;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>=3,b-=3;}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=c.inflate_trees_bits(i,l,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,_;for(h=l[0];b>>=h,b-=h,i[o++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;b>>=h,b-=h,r+=w&F[m],w>>>=m,b-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);o=m;}}if(d[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return -3;default:return -2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return -2;const r=t.istate;return a>=1<0&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(_),r.forEach((function(t){o.set(t,d),d+=t.length;})),o}},this.flush=function(){t.inflateEnd();};}at.prototype={inflateInit:function(t){const e=this;return e.istate=new it,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return -2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=rt;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; + var configureWebWorker = ()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n;}class e{constructor(t){this.crc=t||-1;}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n;}get(){return ~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],a=n.getPartial(i);return 32===a?t.concat(e):n._shiftRight(e,a,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(i),i=0;if(0===e)return a.concat(t);for(let n=0;n>>e),i=t[n]<<32-e;const r=t.length?t[t.length-1]:0,s=n.getPartial(r);return a.push(n.partial(e+s&31,e+s>32?i:a.pop(),1)),a}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let a;for(let n=0;n>>24,a<<=8;return i},toBits(t){const e=[];let i,a=0;for(i=0;i>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],r%a==0&&(t=t<<8^t>>>24^o<<24,o=o<<1^283*(o>>7))),s[r]=s[r-a]^t;}for(let t=0;r;t++,r--){const e=s[3&t?r:r-4];l[t]=r<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]];}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],a=[],r=[];let s,l,o,d;for(let t=0;t<256;t++)r[(a[t]=t<<1^283*(t>>7))^t]=t;for(let _=s=0;!n[_];_^=l||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[_]=r,i[r]=_,d=a[o=a[l=a[_]]];let u=16843009*d^65537*o^257*l^16843008*_,f=257*a[r]^16843008*r;for(let n=0;n<4;n++)t[n][_]=f=f<<24^f>>>8,e[n][r]=u=u<<24^u>>>8;}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0);}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,a=[0,0,0,0],r=this._tables[e],s=r[0],l=r[1],o=r[2],d=r[3],_=r[4];let u,f,c,h=t[0]^n[0],b=t[e?3:1]^n[1],p=t[2]^n[2],w=t[e?1:3]^n[3],x=4;for(let t=0;t>>24]^l[b>>16&255]^o[p>>8&255]^d[255&w]^n[x],f=s[b>>>24]^l[p>>16&255]^o[w>>8&255]^d[255&h]^n[x+1],c=s[p>>>24]^l[w>>16&255]^o[h>>8&255]^d[255&b]^n[x+2],w=s[w>>>24]^l[h>>16&255]^o[b>>8&255]^d[255&p]^n[x+3],x+=4,h=u,b=f,p=c;for(let t=0;t<4;t++)a[e?3&-t:t]=_[h>>>24]<<24^_[b>>16&255]<<16^_[p>>8&255]<<8^_[255&w]^n[x++],u=h,h=b,b=p,p=w,w=u;return a}},r=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e;}reset(){this._iv=this._initIv;}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i;}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]));}calculate(t,e,i){let a;if(!(a=e.length))return [];const r=n.bitLength(e);for(let n=0;nt.length){const n=t;(t=new Uint8Array(e)).set(n,0);}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,I(this,t);}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12);}return A(this,t)}async flush(){return {valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,I(this,t);}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12;}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return {data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get();}function C(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function z(t){return 4294967295&t}class B{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength);}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data;}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class M{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new x(n.password,n.encryptionStrength);}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i;}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const V={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),D=function(t,e){return e.codecType.startsWith("deflate")?new M(t,e):e.codecType.startsWith("inflate")?new B(t,e):void 0}(n,e);},append:async t=>({data:await D.append(t.data)}),flush:()=>D.flush()};let D;function K(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=V[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data]);}catch(e){postMessage(t);}else postMessage(t);}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}});}}));const P=[0,1,2,3].concat(...K([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function j(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1;}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,l,o,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);o=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=l,i[2*o]=i[2*s]+i[2*l],n.depth[o]=Math.max(n.depth[s],n.depth[l])+1,i[2*s+1]=i[2*l+1]=o,n.heap[1]=o++,n.pqdownheap(i,1);}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,o,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)o=e.heap[l],_=n[2*n[2*o+1]+1]+1,_>s&&(_=s,c++),n[2*o+1]=_,o>t.max_code||(e.bl_count[_]++,u=0,o>=r&&(u=a[o-r]),f=n[2*o],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*o+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2;}while(c>0);for(_=s;0!==_;_--)for(o=e.bl_count[_];0!==o;)d=e.heap[--l],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),o--);}}(n),function(t,n,i){const a=[];let r,s,l,o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(s=0;s<=n;s++)l=t[2*s+1],0!==l&&(t[2*s]=e(a[l]++,l));}(i,t.max_code,n.bl_count);};}function L(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a;}function R(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a;}j._length_code=[0,1,2,3,4,5,6,7].concat(...K([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),j.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],j.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],j.d_code=function(t){return t<256?P[t]:P[256+(t>>>7)]},j.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],j.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],j.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],L.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],L.static_l_desc=new L(L.static_ltree,j.extra_lbits,257,286,15),L.static_d_desc=new L(L.static_dtree,j.extra_dbits,0,30,15),L.static_bl_desc=new L(null,j.extra_blbits,0,19,7);const W=[new R(0,0,0,0,0),new R(4,4,8,4,1),new R(4,5,16,8,1),new R(4,6,32,32,1),new R(4,4,16,16,2),new R(8,16,32,32,2),new R(8,16,128,128,2),new R(8,32,128,256,2),new R(32,128,258,1024,2),new R(32,258,258,4096,2)],G=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function O(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255);}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8);}function at(e,n){let i,a,r;if(t.pending_buf[H+2*q]=e>>>8&255,t.pending_buf[H+2*q+1]=255&e,t.pending_buf[R+q]=255&n,q++,0===e?B[2*n]++:(F++,e--,B[2*(j._length_code[n]+256+1)]++,M[2*j.d_code(e)]++),0==(8191&q)&&E>2){for(i=8*q,a=m-w,r=0;r<30;r++)i+=M[2*r]*(5+j.extra_dbits[r]);if(i>>>=3,F8?$(N):Q>0&&Z(255&N),N=0,Q=0;}function lt(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(o.subarray(e,e+n),t.pending),t.pending+=n;}(e,n);}function ot(e,n,i){let a,r,s=0;E>0?(D.build_tree(t),K.build_tree(t),s=function(){let e;for(Y(B,D.max_code),Y(M,K.max_code),P.build_tree(t),e=18;e>=3&&0===V[2*j.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?lt(e,n,i):r==a?(tt(2+(i?1:0),3),rt(L.static_ltree,L.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?w:-1,m-w,t),w=m,e.flush_pending();}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){o.set(o.subarray(r,r+r),0),v-=r,m-=r,w-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0;}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0;}while(0!=--t);a+=r;}if(0===e.avail_in)return;t=e.read_buf(o,m+k,a),k+=t,k>=3&&(f=255&o[m],f=(f<r-262?m-(r-262):0;let u=z;const f=l,c=m+258;let h=o[a+s-1],b=o[a+s];A>=S&&(i>>=2),u>k&&(u=k);do{if(e=t,o[e+s]==b&&o[e+s-1]==h&&o[e]==o[a]&&o[++e]==o[a+1]){a+=2,e++;do{}while(o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&as){if(v=t,s=n,n>=u)break;h=o[a+s-1],b=o[a+s];}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,D.dyn_tree=B,D.stat_desc=L.static_l_desc,K.dyn_tree=M,K.stat_desc=L.static_d_desc,P.dyn_tree=V,P.stat_desc=L.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||a<9||a>15||n<0||n>9||w<0||w>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(W[E].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=W[E].max_lazy,S=W[E].good_length,z=W[E].nice_length,U=W[E].max_chain),C=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return -2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),o.set(e.subarray(d,d+s),0),m=s,w=s,f=255&o[0],f=(f<4||h<0)return -2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=G[4],-2;if(0===d.avail_out)return d.msg=G[7],-5;var V;if(e=d,B=a,a=h,42==n&&(S=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),S|=z<<6,0!==m&&(S|=32),S+=31-S%31,n=113,Z((V=S)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=B&&4!=h)return e.msg=G[7],-5;if(666==n&&0!==e.avail_in)return d.msg=G[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,W[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=w+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-w>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index);}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,o),o+=t.length;})),s}},this.flush=function(){let t,a,r=0,s=0;const l=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&l.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index;}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),l.forEach((function(t){a.set(t,r),r+=t.length;})),a};}q.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new T,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return -2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0));}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],J=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],N=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Q=[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],X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Y=[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],Z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function $(){let t,e,n,i,a,r;function s(t,e,s,l,o,d,_,u,f,c,h){let b,p,w,x,y,g,m,v,k,A,U,I,E,C,S;A=0,y=s;do{n[t[e+A]]++,A++,y--;}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,C=1<I+v;){if(x++,I+=v,S=w-I,S=S>v?v:S,(p=1<<(g=m-I))>b+1&&(p-=b+1,E=m,g1440)return -3;a[x]=U=c[0],c[0]+=S,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U;}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)};}function tt(){const t=this;let e,n,i,a,r=0,s=0,l=0,o=0,d=0,_=0,u=0,f=0,c=0,h=0;function b(t,e,n,i,a,r,s,l){let o,d,_,u,f,c,h,b,p,w,x,y,g,m,v,k;h=l.next_in_index,b=l.avail_in,f=s.bitb,c=s.bitk,p=s.write,w=p>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)b--,f|=(255&l.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,w-=g,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,g-=2);else {v=p-m;do{v+=s.end;}while(v<0);if(u=s.end-v,g>u){if(g-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++];}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0;}}if(p-v>0&&g>p-v)do{s.window[p++]=s.window[v++];}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),p),p+=g,v+=g,g=0;break}if(0!=(64&u))return l.msg="invalid distance code",g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3;o+=d[k+2],o+=f&F[u],k=3*(_+o),u=d[k];}break}if(0!=(64&u))return 0!=(32&u)?(g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,1):(l.msg="invalid literal/length code",g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3);if(o+=d[k+2],o+=f&F[u],k=3*(_+o),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--;break}}else f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--;}while(w>=258&&b>=10);return g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,0}t.init=function(t,r,s,l,o,d){e=0,u=t,f=r,i=s,c=l,a=o,h=d,n=null;},t.proc=function(t,p,w){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,w=b(u,f,i,c,a,h,t,p),E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){o=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,p.msg="invalid literal/length code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 2:for(x=d;I>=x,I-=x,l=f,n=a,s=h,e=3;case 3:for(x=l;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}return e=9,p.msg="invalid distance code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,w=t.inflate_flush(p,w),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,p,w,x,y,g,m;for(w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y>>1){case 0:b>>>=3,p-=3,h=7&p,b>>>=h,p-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],$.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),b>>>=3,p-=3,a=6;break;case 2:b>>>=3,p-=3,a=3;break;case 3:return b>>>=3,p-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);r=65535&b,b=p=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(w,h),y),w+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;p<14;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,l=0,a=4;case 4:for(;l<4+(s>>>10);){for(;p<3;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<>>=3,p-=3;}for(;l<19;)i[et[l++]]=0;if(o[0]=7,h=c.inflate_trees_bits(i,o,d,f,t),0!=h)return -3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);l=0,a=5;case 5:for(;h=s,!(l>=258+(31&h)+(h>>5&31));){let r,_;for(h=o[0];p>>=h,p-=h,i[l++]=_;else {for(m=18==_?7:_-14,r=18==_?11:3;p>>=h,p-=h,r+=b&F[m],b>>>=m,p-=m,m=l,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_;}while(0!=--r);l=m;}}if(d[0]=-1,I=[],E=[],C=[],S=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,C,S,f,t),0!=h)return -3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,C[0],f,S[0]),a=6;case 6:if(n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new nt(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return -3;default:return -2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return -2;const r=t.istate;return a>=1<0&&t.next_in_index!=o&&(a(t.next_in_index),o=t.next_in_index);}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(_),r.forEach((function(t){l.set(t,d),d+=t.length;})),l}},this.flush=function(){t.inflateEnd();};}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new at,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return -2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=st;};}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));configure({workerScripts:{inflate:[n],deflate:[n]}});}}; /* Copyright (c) 2021 Gildas Lormeau. All rights reserved. @@ -1486,7 +1486,7 @@ } async function createDecryptionKeys(decrypt, preambuleArray, password) { - await createKeys(decrypt, password, preambuleArray.subarray(0, SALT_LENGTH[decrypt.strength])); + await createKeys$1(decrypt, password, preambuleArray.subarray(0, SALT_LENGTH[decrypt.strength])); const passwordVerification = preambuleArray.subarray(SALT_LENGTH[decrypt.strength]); const passwordVerificationKey = decrypt.keys.passwordVerification; if (passwordVerificationKey[0] != passwordVerification[0] || passwordVerificationKey[1] != passwordVerification[1]) { @@ -1496,11 +1496,11 @@ async function createEncryptionKeys(encrypt, password) { const salt = crypto.getRandomValues(new Uint8Array(SALT_LENGTH[encrypt.strength])); - await createKeys(encrypt, password, salt); + await createKeys$1(encrypt, password, salt); return concat(salt, encrypt.keys.passwordVerification); } - async function createKeys(target, password, salt) { + async function createKeys$1(target, password, salt) { const encodedPassword = (new TextEncoder()).encode(password); const basekey = await subtle.importKey(RAW_FORMAT, encodedPassword, BASE_KEY_ALGORITHM, false, DERIVED_BITS_USAGE); const derivedBits = await subtle.deriveBits(Object.assign({ salt }, DERIVED_BITS_ALGORITHM), basekey, 8 * ((KEY_LENGTH[target.strength] * 2) + 2)); @@ -1566,7 +1566,7 @@ constructor(password, passwordVerification) { this.password = password; this.passwordVerification = passwordVerification; - createKeys$1(this, password); + createKeys(this, password); } async append(input) { @@ -1594,7 +1594,7 @@ constructor(password, passwordVerification) { this.passwordVerification = passwordVerification; this.password = password; - createKeys$1(this, password); + createKeys(this, password); } async append(input) { @@ -1640,7 +1640,7 @@ return output; } - function createKeys$1(target, password) { + function createKeys(target, password) { target.keys = [0x12345678, 0x23456789, 0x34567890]; target.crcKey0 = new Crc32(target.keys[0]); target.crcKey2 = new Crc32(target.keys[2]); @@ -1808,7 +1808,7 @@ } } - function createCodec(codecConstructor, options) { + function createCodec$1(codecConstructor, options) { if (options.codecType.startsWith(CODEC_DEFLATE)) { return new Deflate(codecConstructor, options); } else if (options.codecType.startsWith(CODEC_INFLATE)) { @@ -1866,7 +1866,7 @@ }; function createWorkerInterface(workerData) { - const interfaceCodec = createCodec(workerData.codecConstructor, workerData.options); + const interfaceCodec = createCodec$1(workerData.codecConstructor, workerData.options); return { async append(data) { try { @@ -1989,7 +1989,7 @@ let pool = []; let pendingRequests = []; - function createCodec$1(codecConstructor, options, config) { + function createCodec(codecConstructor, options, config) { const streamCopy = !options.compressed && !options.signed && !options.encrypted; const webWorker = !streamCopy && (options.useWebWorkers || (options.useWebWorkers === undefined && config.useWebWorkers)); const scripts = webWorker && config.workerScripts ? config.workerScripts[options.codecType] : []; @@ -2180,7 +2180,7 @@ fileEntry.directory = (getUint8(directoryView, offset + 38) & FILE_ATTR_MSDOS_DIR_MASK) == FILE_ATTR_MSDOS_DIR_MASK; fileEntry.offset = getUint32(directoryView, offset + 42) + prependedBytesLength; fileEntry.rawFilename = directoryArray.subarray(offset + 46, offset + 46 + fileEntry.filenameLength); - const filenameEncoding = getOptionValue(this, options, "filenameEncoding"); + const filenameEncoding = getOptionValue$1(this, options, "filenameEncoding"); fileEntry.filenameUTF8 = fileEntry.commentUTF8 = Boolean(fileEntry.bitFlag.languageEncodingFlag); fileEntry.filename = decodeString(fileEntry.rawFilename, fileEntry.filenameUTF8 ? CHARSET_UTF8 : filenameEncoding); if (!fileEntry.directory && fileEntry.filename.endsWith(DIRECTORY_SIGNATURE)) { @@ -2189,7 +2189,7 @@ fileEntry.rawExtraField = directoryArray.subarray(offset + 46 + fileEntry.filenameLength, offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength); fileEntry.rawComment = directoryArray.subarray(offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength, offset + 46 + fileEntry.filenameLength + fileEntry.extraFieldLength + fileEntry.commentLength); - const commentEncoding = getOptionValue(this, options, "commentEncoding"); + const commentEncoding = getOptionValue$1(this, options, "commentEncoding"); fileEntry.comment = decodeString(fileEntry.rawComment, fileEntry.commentUTF8 ? CHARSET_UTF8 : commentEncoding); readCommonFooter(fileEntry, fileEntry, directoryView, offset + 6); const entry = new Entry(fileEntry); @@ -2225,7 +2225,7 @@ const config = this.config; const bitFlag = this.bitFlag; const signature = this.signature; - let password = getOptionValue(this, options, "password"); + let password = getOptionValue$1(this, options, "password"); password = password && password.length && password; if (extraFieldAES) { if (extraFieldAES.originalCompressionMethod != COMPRESSION_METHOD_AES) { @@ -2252,22 +2252,22 @@ throw new Error(ERR_ENCRYPTED); } } - const codec = await createCodec$1(config.Inflate, { + const codec = await createCodec(config.Inflate, { codecType: CODEC_INFLATE, password, zipCrypto, encryptionStrength: extraFieldAES && extraFieldAES.strength, - signed: getOptionValue(this, options, "checkSignature"), + signed: getOptionValue$1(this, options, "checkSignature"), passwordVerification: zipCrypto && (bitFlag.dataDescriptor ? ((this.rawLastModDate >>> 8) & 0xFF) : ((signature >>> 24) & 0xFF)), signature, compressed: compressionMethod != 0, encrypted, - useWebWorkers: getOptionValue(this, options, "useWebWorkers") + useWebWorkers: getOptionValue$1(this, options, "useWebWorkers") }, config); if (!writer.initialized) { await writer.init(); } - await processData(codec, reader, writer, dataOffset, this.compressedSize, config, { onprogress: options.onprogress, signal: getOptionValue(this, options, "signal") }); + await processData(codec, reader, writer, dataOffset, this.compressedSize, config, { onprogress: options.onprogress, signal: getOptionValue$1(this, options, "signal") }); return writer.getData(); } } @@ -2388,7 +2388,7 @@ async function seekSignature(reader, signature, minimumBytes, maximumLength) { const signatureArray = new Uint8Array(4); const signatureView = new DataView(signatureArray.buffer); - setUint32(signatureView, 0, signature); + setUint32$1(signatureView, 0, signature); const maximumBytes = minimumBytes + maximumLength; return (await seek(minimumBytes)) || await seek(Math.min(maximumBytes, reader.size)); @@ -2407,7 +2407,7 @@ } } - function getOptionValue(zipReader, options, name) { + function getOptionValue$1(zipReader, options, name) { return options[name] === undefined ? zipReader.options[name] : options[name]; } @@ -2444,7 +2444,7 @@ return Number(view.getBigUint64(offset, true)); } - function setUint32(view, offset, value) { + function setUint32$1(view, offset, value) { view.setUint32(offset, value, true); } @@ -2497,6 +2497,7 @@ this.config = getConfiguration(); this.files = new Map(); this.offset = writer.size; + this.maxOutputSize = 0; } async add(name = "", reader, options = {}) { @@ -2526,9 +2527,9 @@ if (lastModDate < MIN_DATE || lastModDate > MAX_DATE) { throw new Error(ERR_INVALID_DATE); } - const password = getOptionValue$1(this, options, "password"); - const encryptionStrength = getOptionValue$1(this, options, "encryptionStrength") || 3; - const zipCrypto = getOptionValue$1(this, options, "zipCrypto"); + const password = getOptionValue(this, options, "password"); + const encryptionStrength = getOptionValue(this, options, "encryptionStrength") || 3; + const zipCrypto = getOptionValue(this, options, "zipCrypto"); if (password !== undefined && encryptionStrength !== undefined && (encryptionStrength < 1 || encryptionStrength > 3)) { throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH); } @@ -2555,17 +2556,22 @@ offset += 4 + data.length; }); } - const outputSize = reader ? reader.size * 1.05 : 0; - const zip64 = options.zip64 || this.options.zip64 || this.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || this.offset + outputSize >= MAX_32_BITS; - const level = getOptionValue$1(this, options, "level"); - const useWebWorkers = getOptionValue$1(this, options, "useWebWorkers"); - const bufferedWrite = getOptionValue$1(this, options, "bufferedWrite"); - const keepOrder = getOptionValue$1(this, options, "keepOrder"); - let dataDescriptor = getOptionValue$1(this, options, "dataDescriptor"); - const signal = getOptionValue$1(this, options, "signal"); + const outputSize = reader ? Math.floor(reader.size * 1.05) : 0; + this.maxOutputSize += outputSize; + await Promise.resolve(); + const zip64 = options.zip64 || this.options.zip64 || this.offset >= MAX_32_BITS || outputSize >= MAX_32_BITS || this.offset + this.maxOutputSize >= MAX_32_BITS; + const level = getOptionValue(this, options, "level"); + const useWebWorkers = getOptionValue(this, options, "useWebWorkers"); + const bufferedWrite = getOptionValue(this, options, "bufferedWrite"); + let keepOrder = getOptionValue(this, options, "keepOrder"); + let dataDescriptor = getOptionValue(this, options, "dataDescriptor"); + const signal = getOptionValue(this, options, "signal"); if (dataDescriptor === undefined) { dataDescriptor = true; } + if (keepOrder === undefined) { + keepOrder = true; + } const fileEntry = await addFile(this, name, reader, Object.assign({}, options, { rawFilename, rawComment, @@ -2583,6 +2589,7 @@ dataDescriptor, signal })); + this.maxOutputSize -= outputSize; Object.assign(fileEntry, { name, comment, extraField }); return new Entry(fileEntry); } @@ -2617,7 +2624,7 @@ const rawExtraFieldZip64 = fileEntry.rawExtraFieldZip64; const rawExtraFieldAES = fileEntry.rawExtraFieldAES; const extraFieldLength = rawExtraFieldZip64.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length; - setUint32$1(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE); + setUint32(directoryView, offset, CENTRAL_FILE_HEADER_SIGNATURE); setUint16(directoryView, offset + 4, fileEntry.version); directoryArray.set(fileEntry.headerArray, offset + 6); setUint16(directoryView, offset + 30, extraFieldLength); @@ -2626,9 +2633,9 @@ setUint8(directoryView, offset + 38, FILE_ATTR_MSDOS_DIR_MASK); } if (fileEntry.zip64) { - setUint32$1(directoryView, offset + 42, MAX_32_BITS); + setUint32(directoryView, offset + 42, MAX_32_BITS); } else { - setUint32$1(directoryView, offset + 42, fileEntry.offset); + setUint32(directoryView, offset + 42, fileEntry.offset); } directoryArray.set(rawFilename, offset + 46); directoryArray.set(rawExtraFieldZip64, offset + 46 + rawFilename.length); @@ -2638,7 +2645,7 @@ offset += 46 + rawFilename.length + extraFieldLength + fileEntry.rawComment.length; } if (zip64) { - setUint32$1(directoryView, offset, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE); + setUint32(directoryView, offset, ZIP64_END_OF_CENTRAL_DIR_SIGNATURE); setBigUint64(directoryView, offset + 4, BigInt(44)); setUint16(directoryView, offset + 12, 45); setUint16(directoryView, offset + 14, 45); @@ -2646,19 +2653,19 @@ setBigUint64(directoryView, offset + 32, BigInt(filesLength)); setBigUint64(directoryView, offset + 40, BigInt(directoryDataLength)); setBigUint64(directoryView, offset + 48, BigInt(directoryOffset)); - setUint32$1(directoryView, offset + 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE); + setUint32(directoryView, offset + 56, ZIP64_END_OF_CENTRAL_DIR_LOCATOR_SIGNATURE); setBigUint64(directoryView, offset + 64, BigInt(directoryOffset) + BigInt(directoryDataLength)); - setUint32$1(directoryView, offset + 72, ZIP64_TOTAL_NUMBER_OF_DISKS); + setUint32(directoryView, offset + 72, ZIP64_TOTAL_NUMBER_OF_DISKS); filesLength = MAX_16_BITS; directoryOffset = MAX_32_BITS; directoryDataLength = MAX_32_BITS; offset += 76; } - setUint32$1(directoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE); + setUint32(directoryView, offset, END_OF_CENTRAL_DIR_SIGNATURE); setUint16(directoryView, offset + 8, filesLength); setUint16(directoryView, offset + 10, filesLength); - setUint32$1(directoryView, offset + 12, directoryDataLength); - setUint32$1(directoryView, offset + 16, directoryOffset); + setUint32(directoryView, offset + 12, directoryDataLength); + setUint32(directoryView, offset + 16, directoryOffset); await writer.writeUint8Array(directoryArray); if (comment.length) { await writer.writeUint8Array(comment); @@ -2710,14 +2717,14 @@ if (!options.dataDescriptor) { const arrayBufferView = new DataView(arrayBuffer); if (!fileEntry.encrypted || options.zipCrypto) { - setUint32$1(arrayBufferView, 14, fileEntry.signature); + setUint32(arrayBufferView, 14, fileEntry.signature); } if (fileEntry.zip64) { - setUint32$1(arrayBufferView, 18, MAX_32_BITS); - setUint32$1(arrayBufferView, 22, MAX_32_BITS); + setUint32(arrayBufferView, 18, MAX_32_BITS); + setUint32(arrayBufferView, 22, MAX_32_BITS); } else { - setUint32$1(arrayBufferView, 18, fileEntry.compressedSize); - setUint32$1(arrayBufferView, 22, fileEntry.uncompressedSize); + setUint32(arrayBufferView, 18, fileEntry.compressedSize); + setUint32(arrayBufferView, 22, fileEntry.uncompressedSize); } } await writer.writeUint8Array(new Uint8Array(arrayBuffer)); @@ -2802,20 +2809,23 @@ setUint16(dateView, 0, (((lastModDate.getHours() << 6) | lastModDate.getMinutes()) << 5) | lastModDate.getSeconds() / 2); setUint16(dateView, 2, ((((lastModDate.getFullYear() - 1980) << 4) | (lastModDate.getMonth() + 1)) << 5) | lastModDate.getDate()); const rawLastModDate = dateArray[0]; - setUint32$1(headerView, 6, rawLastModDate); + setUint32(headerView, 6, rawLastModDate); setUint16(headerView, 22, rawFilename.length); setUint16(headerView, 24, 0); - const fileDataArray = new Uint8Array(30 + rawFilename.length); - const fileDataView = new DataView(fileDataArray.buffer); - setUint32$1(fileDataView, 0, LOCAL_FILE_HEADER_SIGNATURE); - fileDataArray.set(headerArray, 4); - fileDataArray.set(rawFilename, 30); + setUint16(headerView, 24, rawExtraFieldAES.length + fileEntry.rawExtraField.length); + const footerArray = new Uint8Array(30 + rawFilename.length + rawExtraFieldAES.length + fileEntry.rawExtraField.length); + const footerView = new DataView(footerArray.buffer); + setUint32(footerView, 0, LOCAL_FILE_HEADER_SIGNATURE); + footerArray.set(headerArray, 4); + footerArray.set(rawFilename, 30); + footerArray.set(rawExtraFieldAES, 30 + rawFilename.length); + footerArray.set(fileEntry.rawExtraField, 30 + rawFilename.length + rawExtraFieldAES.length); let result; let uncompressedSize = 0; let compressedSize = 0; if (reader) { uncompressedSize = reader.size; - const codec = await createCodec$1(config.Deflate, { + const codec = await createCodec(config.Deflate, { codecType: CODEC_DEFLATE, level, password, @@ -2827,57 +2837,57 @@ encrypted, useWebWorkers: options.useWebWorkers }, config); - await writer.writeUint8Array(fileDataArray); + await writer.writeUint8Array(footerArray); result = await processData(codec, reader, writer, 0, uncompressedSize, config, { onprogress: options.onprogress, signal: options.signal }); compressedSize = result.length; } else { - await writer.writeUint8Array(fileDataArray); + await writer.writeUint8Array(footerArray); } let dataDescriptorArray = new Uint8Array(0); let dataDescriptorView; if (options.dataDescriptor) { dataDescriptorArray = new Uint8Array(zip64 ? 24 : 16); dataDescriptorView = new DataView(dataDescriptorArray.buffer); - setUint32$1(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE); + setUint32(dataDescriptorView, 0, DATA_DESCRIPTOR_RECORD_SIGNATURE); } if (reader) { if ((!encrypted || options.zipCrypto) && result.signature !== undefined) { - setUint32$1(headerView, 10, result.signature); + setUint32(headerView, 10, result.signature); fileEntry.signature = result.signature; if (options.dataDescriptor) { - setUint32$1(dataDescriptorView, 4, result.signature); + setUint32(dataDescriptorView, 4, result.signature); } } if (zip64) { const rawExtraFieldZip64View = new DataView(fileEntry.rawExtraFieldZip64.buffer); setUint16(rawExtraFieldZip64View, 0, EXTRAFIELD_TYPE_ZIP64); setUint16(rawExtraFieldZip64View, 2, EXTRAFIELD_LENGTH_ZIP64); - setUint32$1(headerView, 14, MAX_32_BITS); + setUint32(headerView, 14, MAX_32_BITS); setBigUint64(rawExtraFieldZip64View, 12, BigInt(compressedSize)); - setUint32$1(headerView, 18, MAX_32_BITS); + setUint32(headerView, 18, MAX_32_BITS); setBigUint64(rawExtraFieldZip64View, 4, BigInt(uncompressedSize)); if (options.dataDescriptor) { setBigUint64(dataDescriptorView, 8, BigInt(compressedSize)); setBigUint64(dataDescriptorView, 16, BigInt(uncompressedSize)); } } else { - setUint32$1(headerView, 14, compressedSize); - setUint32$1(headerView, 18, uncompressedSize); + setUint32(headerView, 14, compressedSize); + setUint32(headerView, 18, uncompressedSize); if (options.dataDescriptor) { - setUint32$1(dataDescriptorView, 8, compressedSize); - setUint32$1(dataDescriptorView, 12, uncompressedSize); + setUint32(dataDescriptorView, 8, compressedSize); + setUint32(dataDescriptorView, 12, uncompressedSize); } } } if (options.dataDescriptor) { await writer.writeUint8Array(dataDescriptorArray); } - const length = fileDataArray.length + (result ? result.length : 0) + dataDescriptorArray.length; + const length = footerArray.length + (result ? result.length : 0) + dataDescriptorArray.length; Object.assign(fileEntry, { compressedSize, uncompressedSize, lastModDate, rawLastModDate, encrypted, length }); return fileEntry; } - function getOptionValue$1(zipWriter, options, name) { + function getOptionValue(zipWriter, options, name) { return options[name] === undefined ? zipWriter.options[name] : options[name]; } @@ -2889,7 +2899,7 @@ view.setUint16(offset, value, true); } - function setUint32$1(view, offset, value) { + function setUint32(view, offset, value) { view.setUint32(offset, value, true); } diff --git a/dist/zip.min.js b/dist/zip.min.js index a710cac7..42ed4d92 100644 --- a/dist/zip.min.js +++ b/dist/zip.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},n=Object.assign({},e);function i(){return n}function r(t){if(void 0!==t.chunkSize&&(n.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(n.maxWorkers=t.maxWorkers),void 0!==t.useWebWorkers&&(n.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(n.Deflate=t.Deflate),void 0!==t.Inflate&&(n.Inflate=t.Inflate),void 0!==t.workerScripts){if(t.workerScripts.deflate){if(!Array.isArray(t.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");n.workerScripts||(n.workerScripts={}),n.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");n.workerScripts||(n.workerScripts={}),n.workerScripts.inflate=t.workerScripts.inflate}}}function a(t,e,n){return class{constructor(i){this.codec=new t(Object.assign({},e,i)),n(this.codec,(t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),i(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),i(this)}};function i(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const s="Abort error";async function o(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(d=0,h=0){const u=s.signal;if(d{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class k extends x{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class v extends b{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),I(this.url)&&!this.preventHeadRequest){const t=await U(w,this.url,this.options);if(this.size=Number(t.headers.get(f)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(p)!=y)throw new Error(h);void 0===this.size&&await A(this,this.options)}else await A(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await U(_,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(h);return new Uint8Array(await n.arrayBuffer())}return this.data||await A(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function A(t,e){const n=await U(_,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function U(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(d+(r.statusText||r.status))}class E extends b{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),I(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>D(w,this.url,(n=>{this.size=Number(n.getResponseHeader(f)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(p)==y?t():e(new Error(h)):void 0===this.size?R(this,this.url).then((()=>t())).catch(e):t()}),e)));await R(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await R(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>D(_,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(h)}}function R(t,e){return new Promise(((n,i)=>D(_,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function D(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(d+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class z extends b{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new E(t,e):this.reader=new v(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function I(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const F=4294967295,C=65535,S=67324752,T=134695760,M=33639248,L=101010256,O=101075792,V=117853008,W=39169,B=2048,N="/",P=new Date(2107,11,31),H=new Date(1980,0,1),j="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const K=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;K[t]=e}class q{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^K[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const Z={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=Z.getPartial(n);return 32===i?t.concat(e):Z._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+Z.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=Z.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=Z.getPartial(r);return i.push(Z.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},G={bytes:{fromBits(t){const e=Z.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,c;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let h=16843009*c^65537*l^257*o^16843008*d,u=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][d]=u=u<<24^u>>>8,e[n][a]=h=h<<24^h>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let h,u,f,p=t[0]^n[0],w=t[e?3:1]^n[1],_=t[2]^n[2],y=t[e?1:3]^n[3],g=4;for(let t=0;t>>24]^o[w>>16&255]^l[_>>8&255]^c[255&y]^n[g],u=s[w>>>24]^o[_>>16&255]^l[y>>8&255]^c[255&p]^n[g+1],f=s[_>>>24]^o[y>>16&255]^l[p>>8&255]^c[255&w]^n[g+2],y=s[y>>>24]^o[p>>16&255]^l[w>>8&255]^c[255&_]^n[g+3],g+=4,p=h,w=u,_=f;for(let t=0;t<4;t++)r[e?3&-t:t]=d[p>>>24]<<24^d[w>>16&255]<<16^d[_>>8&255]<<8^d[255&y]^n[g++],h=p,p=w,w=_,_=y,y=h;return r}}},X={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=Z.bitLength(e);for(let r=0;rt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const yt=12;class gt{constructor(t,e){this.password=t,this.passwordVerification=e,kt(this,t)}async append(t){if(this.password){const e=xt(this,t.subarray(0,yt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(J);t=t.subarray(yt)}return xt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class bt{constructor(t,e){this.passwordVerification=e,this.password=t,kt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(yt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(mt(this,i),0),n=yt}else e=new Uint8Array(t.length),n=0;return e.set(mt(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function xt(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function At(t){const e=2|t.keys[2];return Ut(Math.imul(e,1^e)>>>8)}function Ut(t){return 255&t}function Et(t){return 4294967295&t}const Rt="deflate",Dt="inflate",zt="Invalid signature";class It{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new q,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new gt(e.password,e.passwordVerification):new ut(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(zt);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(zt)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Ft{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new q,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new bt(e.password,e.passwordVerification):new ft(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Ct="init",St="append",Tt="flush",Mt="message";var Lt=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip.min.js",document.baseURI).href)),t.worker.addEventListener(Mt,r,!1),t.interface={append:t=>n({type:St,data:t}),flush:()=>n({type:Tt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:Ct,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==Ct||r==Tt||r==St){const n=i.data;r==Tt?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(Rt)?new Ft(t,e):e.codecType.startsWith(Dt)?new It(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Ot=[],Vt=[];function Wt(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Ot.length!t.busy));return n?Lt(n,t,e,Bt,i,r):new Promise((n=>Vt.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Bt(t){const e=!Vt.length;if(e)Ot=Ot.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Vt.splice(0,1);e(Lt(t,n,i,Bt,r,a))}return e}const Nt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Pt{constructor(t){Nt.forEach((e=>this[e]=t[e]))}}const Ht="File format is not recognized",jt="End of central directory not found",Kt="End of Zip64 central directory not found",qt="End of Zip64 central directory locator not found",Zt="Central directory header not found",Gt="Local file header not found",Yt="Zip64 extra field not found",Xt="File contains encrypted entry",Jt="Encryption method not supported",Qt="Compression method not supported",$t="utf-8",te=["uncompressedSize","compressedSize","offset"];class ee{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,l=this.compressionMethod,c=this.config,d=this.bitFlag,h=this.signature;let u=ae(this,e,"password");if(u=u&&u.length&&u,s&&99!=s.originalCompressionMethod)throw new Error(Qt);if(0!=l&&8!=l)throw new Error(Qt);if(ce(a,0)!=S)throw new Error(Gt);const f=this.localDirectory={};ne(f,a,4),f.rawExtraField=r.subarray(i+30+f.filenameLength,i+30+f.filenameLength+f.extraFieldLength),ie(this,f,a,4);const p=i+30+f.filenameLength+f.extraFieldLength,w=d.encrypted&&f.bitFlag.encrypted,_=w&&!s;if(w){if(!_&&void 0===s.strength)throw new Error(Jt);if(!u)throw new Error(Xt)}const y=await Wt(c.Inflate,{codecType:Dt,password:u,zipCrypto:_,encryptionStrength:s&&s.strength,signed:ae(this,e,"checkSignature"),passwordVerification:_&&(d.dataDescriptor?this.rawLastModDate>>>8&255:h>>>24&255),signature:h,compressed:0!=l,encrypted:w,useWebWorkers:ae(this,e,"useWebWorkers")},c);return t.initialized||await t.init(),await o(y,n,t,p,this.compressedSize,c,{onprogress:e.onprogress,signal:ae(this,e,"signal")}),t.getData()}}function ne(t,e,n){t.version=le(e,n);const i=t.rawBitFlag=le(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&B)==B},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=ce(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=le(e,n+22),t.extraFieldLength=le(e,n+24)}function ie(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==F));for(let e=0;e{if(e[n]==F){if(!t||void 0===t[n])throw new Error(Yt);e[n]=t[n]}}))}(c,e);const d=e.extraFieldUnicodePath=a.get(28789);d&&re(d,"filename","rawFilename",e,t);const h=e.extraFieldUnicodeComment=a.get(25461);h&&re(h,"comment","rawComment",e,t);const u=e.extraFieldAES=a.get(39169);u?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=oe(i,0),t.vendorId=oe(i,2);const r=oe(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=le(i,5)}else e.compressionMethod=n}(u,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function re(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=oe(a,0),t.signature=ce(a,1);const s=new q;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==ce(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function ae(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function se(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n{if("function"==typeof URL.createObjectURL){const t=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},r={name:"AES-CTR"},a=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},r),c=["deriveBits"],d=["sign"],h=[8,12,16],u=[16,24,32],f=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],p=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=i.length-10){const t=i.subarray(r,r+16),a=await p.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return g(this.counter),n.set(new Uint8Array(a),r),e(r+16)}return this.pendingInput=i.subarray(r),this.signed&&(this.input=b(this.input,t)),n};if(this.password){const e=t.subarray(0,h[this.strength]+2);await async function(t,e,n){await y(t,n,e.subarray(0,h[t.strength]),["decrypt"]);const i=e.subarray(h[t.strength]),r=t.keys.passwordVerification;if(r[0]!=i[0]||r[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(h[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=b(this.pendingInput,t),n=x(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),r=t.subarray(t.length-10);let a=new Uint8Array(0);if(n.length){const t=await p.decrypt(Object.assign({counter:this.counter},l),e.key,n);a=new Uint8Array(t)}let s=!0;if(this.signed){const t=await p.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=r[t]&&(s=!1)}return{valid:s,data:a}}}class _{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(r=0)=>{if(r+16<=t.length){const a=t.subarray(r,r+16),s=await p.encrypt(Object.assign({counter:this.counter},l),this.keys.key,a);return g(this.counter),i.set(new Uint8Array(s),r+n.length),e(r+16)}return this.pendingInput=t.subarray(r),this.output=b(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(h[t.strength]));return await y(t,e,n,["encrypt"]),b(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=b(this.pendingInput,t),i=x(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await p.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=b(this.output,t)}const e=await p.sign(i,this.keys.authentication,this.output.subarray(h[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:b(t,n),signature:n}}}async function y(t,e,n,i){t.counter=new Uint8Array(f);const l=(new TextEncoder).encode(e),h=await p.importKey("raw",l,a,!1,c),w=await p.deriveBits(Object.assign({salt:n},s),h,8*(2*u[t.strength]+2)),_=new Uint8Array(w);t.keys={key:await p.importKey("raw",_.subarray(0,u[t.strength]),r,!0,i),authentication:await p.importKey("raw",_.subarray(u[t.strength],2*u[t.strength]),o,!1,d),passwordVerification:_.subarray(2*u[t.strength])}}function g(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function b(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function x(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=v(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return v(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function v(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function R(t){const e=2|t.keys[2];return D(Math.imul(e,1^e)>>>8)}function D(t){return 255&t}function z(t){return 4294967295&t}class I{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class F{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new _(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const C={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),S=function(t,e){return e.codecType.startsWith("deflate")?new F(t,e):e.codecType.startsWith("inflate")?new I(t,e):void 0}(n,e)},append:async t=>({data:await S.append(t.data)}),flush:()=>S.flush()};let S;function T(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=C[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const M=[0,1,2,3].concat(...T([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function L(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,c=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,c,d,h,u,f=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],d=n[2*n[2*l+1]+1]+1,d>s&&(d=s,f++),n[2*l+1]=d,l>t.max_code||(e.bl_count[d]++,h=0,l>=a&&(h=r[l-a]),u=n[2*l],e.opt_len+=u*(d+h),i&&(e.static_len+=u*(i[2*l+1]+h)));if(0!==f){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(l=e.bl_count[d];0!==l;)c=e.heap[--o],c>t.max_code||(n[2*c+1]!=d&&(e.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function O(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function V(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}L._length_code=[0,1,2,3,4,5,6,7].concat(...T([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),L.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],L.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],L.d_code=function(t){return t<256?M[t]:M[256+(t>>>7)]},L.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],L.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],O.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],O.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],O.static_l_desc=new O(O.static_ltree,L.extra_lbits,257,286,15),O.static_d_desc=new O(O.static_dtree,L.extra_dbits,0,30,15),O.static_bl_desc=new O(null,L.extra_blbits,0,19,7);const W=[new V(0,0,0,0,0),new V(4,4,8,4,1),new V(4,5,16,8,1),new V(4,6,32,32,1),new V(4,4,16,16,2),new V(8,16,32,32,2),new V(8,16,128,128,2),new V(8,32,128,256,2),new V(32,128,258,1024,2),new V(32,258,258,4096,2)],B=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function N(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;Y>16-i?(n=t,G|=n<>>16-Y,Y+=i-16):(G|=t<=8&&(Q(255&G),G>>>=8,Y-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[K+2*j]=e>>>8&255,t.pending_buf[K+2*j+1]=255&e,t.pending_buf[P+j]=255&n,j++,0===e?F[2*n]++:(q++,e--,F[2*(L._length_code[n]+256+1)]++,C[2*L.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=m-y,a=0;a<30;a++)i+=C[2*a]*(5+L.extra_dbits[a]);if(i>>>=3,q8?$(G):Y>0&&Q(255&G),G=0,Y=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),Z=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),M.build_tree(t),s=function(){let e;for(J(F,T.max_code),J(C,M.max_code),V.build_tree(t),e=18;e>=3&&0===S[2*L.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(O.static_ltree,O.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?y:-1,m-y,t),y=m,e.flush_pending()}function dt(){let t,n,i,r;do{if(r=c-v-m,0===r&&0===m&&0===v)r=a;else if(-1==r)r--;else if(m>=a+a-262){l.set(l.subarray(a,a+a),0),k-=a,m-=a,y-=a,t=f,i=t;do{n=65535&h[--i],h[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&d[--i],d[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(l,m+v,r),v+=t,v>=3&&(u=255&l[m],u=(u<<_^255&l[m+1])&w)}while(v<262&&0!==e.avail_in)}function ht(t){let e,n,i=U,r=m,s=A;const c=m>a-262?m-(a-262):0;let h=I;const u=o,f=m+258;let p=l[r+s-1],w=l[r+s];A>=z&&(i>>=2),h>v&&(h=v);do{if(e=t,l[e+s]==w&&l[e+s-1]==p&&l[e]==l[r]&&l[++e]==l[r+1]){r+=2,e++;do{}while(l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&rs){if(k=t,s=n,n>=h)break;p=l[r+s-1],w=l[r+s]}}}while((t=65535&d[t&u])>c&&0!=--i);return s<=v?s:v}function ut(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=F,T.stat_desc=O.static_l_desc,M.dyn_tree=C,M.stat_desc=O.static_d_desc,V.dyn_tree=S,V.stat_desc=O.static_bl_desc,G=0,Y=0,Z=8,X(),function(){c=2*a,h[f-1]=0;for(let t=0;t9||8!=c||r<9||r>15||n<0||n>9||y<0||y>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(W[R].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=W[R].max_lazy,z=W[R].good_length,I=W[R].nice_length,U=W[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,c=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,c=i-s),l.set(e.subarray(c,c+s),0),m=s,y=s,u=255&l[0],u=(u<<_^255&l[1])&w,r=0;r<=s-3;r++)u=(u<<_^255&l[r+2])&w,d[r&o]=h[u],h[u]=r;return 0},t.deflate=function(c,p){let U,z,I,F,C;if(p>4||p<0)return-2;if(!c.next_out||!c.next_in&&0!==c.avail_in||666==n&&4!=p)return c.msg=B[4],-2;if(0===c.avail_out)return c.msg=B[7],-5;var S;if(e=c,F=r,r=p,42==n&&(z=8+(s-8<<4)<<8,I=(R-1&255)>>1,I>3&&(I=3),z|=I<<6,0!==m&&(z|=32),z+=31-z%31,n=113,Q((S=z)>>8&255),Q(255&S)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&p<=F&&4!=p)return e.msg=B[7],-5;if(666==n&&0!==e.avail_in)return c.msg=B[7],-5;if(0!==e.avail_in||0!==v||0!=p&&666!=n){switch(C=-1,W[R].func){case 0:C=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(v<=1){if(dt(),0===v&&0==t)return 0;if(0===v)break}if(m+=v,v=0,n=y+r,(0===m||m>=n)&&(v=m-n,m=n,ct(!1),0===e.avail_out))return 0;if(m-y>=a-262&&(ct(!1),0===e.avail_out))return 0}return ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p);break;case 1:C=function(t){let n,i=0;for(;;){if(v<262){if(dt(),v<262&&0==t)return 0;if(0===v)break}if(v>=3&&(u=(u<<_^255&l[m+2])&w,i=65535&h[u],d[m&o]=h[u],h[u]=m),0!==i&&(m-i&65535)<=a-262&&2!=D&&(g=ht(i)),g>=3)if(n=rt(m-k,g-3),v-=g,g<=E&&v>=3){g--;do{m++,u=(u<<_^255&l[m+2])&w,i=65535&h[u],d[m&o]=h[u],h[u]=m}while(0!=--g);m++}else m+=g,g=0,u=255&l[m],u=(u<<_^255&l[m+1])&w;else n=rt(0,255&l[m]),v--,m++;if(n&&(ct(!1),0===e.avail_out))return 0}return ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p);break;case 2:C=function(t){let n,i,r=0;for(;;){if(v<262){if(dt(),v<262&&0==t)return 0;if(0===v)break}if(v>=3&&(u=(u<<_^255&l[m+2])&w,r=65535&h[u],d[m&o]=h[u],h[u]=m),A=g,b=k,g=2,0!==r&&A4096)&&(g=2)),A>=3&&g<=A){i=m+v-3,n=rt(m-1-b,A-3),v-=A-1,A-=2;do{++m<=i&&(u=(u<<_^255&l[m+2])&w,r=65535&h[u],d[m&o]=h[u],h[u]=m)}while(0!=--A);if(x=0,g=2,m++,n&&(ct(!1),0===e.avail_out))return 0}else if(0!==x){if(n=rt(0,255&l[m-1]),n&&ct(!1),m++,v--,0===e.avail_out)return 0}else x=1,m++,v--}return 0!==x&&(n=rt(0,255&l[m-1]),x=0),ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p)}if(2!=C&&3!=C||(n=666),0==C||2==C)return 0===e.avail_out&&(r=-1),0;if(1==C){if(1==p)tt(2,3),et(256,O.static_ltree),it(),1+Z+10-Y<9&&(tt(2,3),et(256,O.static_ltree),it()),Z=7;else if(ot(0,0,!1),3==p)for(U=0;U0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(c),d.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}H.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new P,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const K=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],q=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Z=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],G=[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],Y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],X=[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],J=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Q(){let t,e,n,i,r,a;function s(t,e,s,o,l,c,d,h,u,f,p){let w,_,y,g,b,x,m,k,v,A,U,E,R,D,z;A=0,b=s;do{n[t[e+A]]++,A++,b--}while(0!==b);if(n[0]==s)return d[0]=-1,h[0]=0,0;for(k=h[0],x=1;x<=15&&0===n[x];x++);for(m=x,kb&&(k=b),h[0]=k,D=1<E+k;){if(g++,E+=k,z=y-E,z=z>k?k:z,(_=1<<(x=m-E))>w+1&&(_-=w+1,R=m,x1440)return-3;r[g]=U=f[0],f[0]+=z,0!==g?(a[g]=b,i[0]=x,i[1]=k,x=b>>>E-k,i[2]=U-r[g-1]-x,u.set(i,3*(r[g-1]+x))):d[0]=U}for(i[1]=m-E,A>=s?i[0]=192:p[A]>>E;x>>=1)b^=x;for(b^=x,v=(1<257?(-3==f?u.msg="oversubscribed distance tree":-5==f?(u.msg="incomplete distance tree",f=-3):-4!=f&&(u.msg="empty distance tree with lengths",f=-3),f):0)}}function $(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,c=0,d=0,h=0,u=0,f=0,p=0;function w(t,e,n,i,r,a,s,o){let l,c,d,h,u,f,p,w,_,y,g,b,x,m,k,v;p=o.next_in_index,w=o.avail_in,u=s.bitb,f=s.bitk,_=s.write,y=_>=c[v+1],f-=c[v+1],0!=(16&h)){for(h&=15,x=c[v+2]+(u&K[h]),u>>=h,f-=h;f<15;)w--,u|=(255&o.read_byte(p++))<>=c[v+1],f-=c[v+1],0!=(16&h)){for(h&=15;f>=h,f-=h,y-=x,_>=m)k=_-m,_-k>0&&2>_-k?(s.window[_++]=s.window[k++],s.window[_++]=s.window[k++],x-=2):(s.window.set(s.window.subarray(k,k+2),_),_+=2,k+=2,x-=2);else{k=_-m;do{k+=s.end}while(k<0);if(h=s.end-k,x>h){if(x-=h,_-k>0&&h>_-k)do{s.window[_++]=s.window[k++]}while(0!=--h);else s.window.set(s.window.subarray(k,k+h),_),_+=h,k+=h,h=0;k=0}}if(_-k>0&&x>_-k)do{s.window[_++]=s.window[k++]}while(0!=--x);else s.window.set(s.window.subarray(k,k+x),_),_+=x,k+=x,x=0;break}if(0!=(64&h))return o.msg="invalid distance code",x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,-3;l+=c[v+2],l+=u&K[h],v=3*(d+l),h=c[v]}break}if(0!=(64&h))return 0!=(32&h)?(x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,1):(o.msg="invalid literal/length code",x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,-3);if(l+=c[v+2],l+=u&K[h],v=3*(d+l),0===(h=c[v])){u>>=c[v+1],f-=c[v+1],s.window[_++]=c[v+2],y--;break}}else u>>=c[v+1],f-=c[v+1],s.window[_++]=c[v+2],y--}while(y>=258&&w>=10);return x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,0}t.init=function(t,a,s,o,l,c){e=0,h=t,u=a,i=s,f=o,r=l,p=c,n=null},t.proc=function(t,_,y){let g,b,x,m,k,v,A,U=0,E=0,R=0;for(R=_.next_in_index,m=_.avail_in,U=t.bitb,E=t.bitk,k=t.write,v=k=258&&m>=10&&(t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=k,y=w(h,u,i,f,r,p,t,_),R=_.next_in_index,m=_.avail_in,U=t.bitb,E=t.bitk,k=t.write,v=k>>=n[b+1],E-=n[b+1],x=n[b],0===x){l=n[b+2],e=6;break}if(0!=(16&x)){c=15&x,a=n[b+2],e=2;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}if(0!=(32&x)){e=7;break}return e=9,_.msg="invalid literal/length code",y=-3,t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=k,t.inflate_flush(_,y);case 2:for(g=c;E>=g,E-=g,o=u,n=r,s=p,e=3;case 3:for(g=o;E>=n[b+1],E-=n[b+1],x=n[b],0!=(16&x)){c=15&x,d=n[b+2],e=4;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}return e=9,_.msg="invalid distance code",y=-3,t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=k,t.inflate_flush(_,y);case 4:for(g=c;E>=g,E-=g,e=5;case 5:for(A=k-d;A<0;)A+=t.end;for(;0!==a;){if(0===v&&(k==t.end&&0!==t.read&&(k=0,v=k7&&(E-=8,m++,R--),t.write=k,y=t.inflate_flush(_,y),k=t.write,v=kt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let p,w,_,y,g,b,x,m;for(y=t.next_in_index,g=t.avail_in,w=n.bitb,_=n.bitk,b=n.write,x=b>>1){case 0:w>>>=3,_-=3,p=7&_,w>>>=p,_-=p,r=1;break;case 1:k=[],v=[],A=[[]],U=[[]],Q.inflate_trees_fixed(k,v,A,U),d.init(k[0],v[0],A[0],0,U[0],0),w>>>=3,_-=3,r=6;break;case 2:w>>>=3,_-=3,r=3;break;case 3:return w>>>=3,_-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e)}break;case 1:for(;_<32;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}if((~w>>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);a=65535&w,w=_=0,r=0!==a?2:0!==h?7:0;break;case 2:if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(0===x&&(b==n.end&&0!==n.read&&(b=0,x=bg&&(p=g),p>x&&(p=x),n.window.set(t.read_buf(y,p),b),y+=p,g-=p,b+=p,x-=p,0!=(a-=p))break;r=0!==h?7:0;break;case 3:for(;_<14;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}if(s=p=16383&w,(31&p)>29||(p>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);if(p=258+(31&p)+(p>>5&31),!i||i.length>>=14,_-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;_<3;){if(0===g)return n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);e=0,g--,w|=(255&t.read_byte(y++))<<_,_+=8}i[tt[o++]]=7&w,w>>>=3,_-=3}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,p=f.inflate_trees_bits(i,l,c,u,t),0!=p)return-3==(e=p)&&(i=null,r=9),n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);o=0,r=5;case 5:for(;p=s,!(o>=258+(31&p)+(p>>5&31));){let a,d;for(p=l[0];_>>=p,_-=p,i[o++]=d;else{for(m=18==d?7:d-14,a=18==d?11:3;_>>=p,_-=p,a+=w&K[m],w>>>=m,_-=m,m=o,p=s,m+a>258+(31&p)+(p>>5&31)||16==d&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);d=16==d?i[m-1]:0;do{i[m++]=d}while(0!=--a);o=m}}if(c[0]=-1,E=[],R=[],D=[],z=[],E[0]=9,R[0]=6,p=s,p=f.inflate_trees_dynamic(257+(31&p),1+(p>>5&31),i,E,R,D,z,u,t),0!=p)return-3==p&&(i=null,r=9),e=p,n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,n.inflate_flush(t,e);d.init(E[0],R[0],u,D[0],u,z[0]),r=6;case 6:if(n.bitb=w,n.bitk=_,t.avail_in=g,t.total_in+=y-t.next_in_index,t.next_in_index=y,n.write=b,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),y=t.next_in_index,g=t.avail_in,w=n.bitb,_=n.bitk,b=n.write,x=b15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(d),a.forEach((function(t){o.set(t,c),c+=t.length})),o}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new it,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=j,self.Inflate=at}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));r({workerScripts:{inflate:[e],deflate:[e]}})}})(),t.BlobReader=m,t.BlobWriter=k,t.Data64URIReader=class extends b{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_ABORT=s,t.ERR_BAD_FORMAT=Ht,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Zt,t.ERR_DUPLICATED_NAME=he,t.ERR_ENCRYPTED=Xt,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=qt,t.ERR_EOCDR_NOT_FOUND=jt,t.ERR_EOCDR_ZIP64_NOT_FOUND=Kt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Yt,t.ERR_HTTP_RANGE=h,t.ERR_INVALID_COMMENT=ue,t.ERR_INVALID_DATE=_e,t.ERR_INVALID_ENCRYPTION_STRENGTH=ye,t.ERR_INVALID_ENTRY_COMMENT=fe,t.ERR_INVALID_ENTRY_NAME=pe,t.ERR_INVALID_EXTRAFIELD_DATA=be,t.ERR_INVALID_EXTRAFIELD_TYPE=ge,t.ERR_INVALID_PASSWORD=J,t.ERR_INVALID_SIGNATURE=zt,t.ERR_INVALID_VERSION=we,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Gt,t.ERR_UNSUPPORTED_COMPRESSION=Qt,t.ERR_UNSUPPORTED_ENCRYPTION=Jt,t.HttpRangeReader=class extends z{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=z,t.Reader=b,t.TextReader=class extends b{constructor(t){super(),this.blobReader=new m(new Blob([t],{type:u}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends x{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:u})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:u})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends b{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends x{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=x,t.ZipReader=class{constructor(t,e={}){this.reader=t,this.options=e,this.config=i()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ht);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,L,22,1048560);if(!n)throw new Error(jt);const i=new DataView(n.buffer);let r=ce(i,12),a=ce(i,16),s=le(i,8),o=0;if(a==F||r==F||s==C){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(ce(i,0)!=V)throw new Error(Kt);a=de(i,8);let l=await e.readUint8Array(a,56),c=new DataView(l.buffer);const d=n.offset-20-56;if(ce(c,0)!=O&&a!=d){const t=a;a=d,o=a-t,l=await e.readUint8Array(a,56),c=new DataView(l.buffer)}if(ce(c,0)!=O)throw new Error(qt);s=de(c,24),r=de(i,4),a-=de(c,40)}if(a<0||a>=e.size)throw new Error(Ht);let l=0,c=await e.readUint8Array(a,e.size-a),d=new DataView(c.buffer);const h=n.offset-r;if(ce(d,l)!=M&&a!=h){const t=a;a=h,o=a-t,c=await e.readUint8Array(a,e.size-a),d=new DataView(c.buffer)}if(a<0||a>=e.size)throw new Error(Ht);const u=[];for(let e=0;ee.getData(t,n),u.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return u}async close(){}},t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=i(),this.files=new Map,this.offset=t.size}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(N)?t+=N:n.directory=t.endsWith(N),this.files.has(t))throw new Error(he);const i=(new TextEncoder).encode(t);if(i.length>C)throw new Error(pe);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>C)throw new Error(fe);const s=this.options.version||n.version||0;if(s>C)throw new Error(we);const l=n.lastModDate||new Date;if(lP)throw new Error(_e);const c=me(this,n,"password"),d=me(this,n,"encryptionStrength")||3,h=me(this,n,"zipCrypto");if(void 0!==c&&void 0!==d&&(d<1||d>3))throw new Error(ye);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const f=n.extraField;if(f){let t=0,e=0;f.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),f.forEach(((t,n)=>{if(n>C)throw new Error(ge);if(t.length>C)throw new Error(be);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const p=e?1.05*e.size:0,w=n.zip64||this.options.zip64||this.offset>=F||p>=F||this.offset+p>=F,_=me(this,n,"level"),y=me(this,n,"useWebWorkers"),g=me(this,n,"bufferedWrite"),b=me(this,n,"keepOrder");let x=me(this,n,"dataDescriptor");const m=me(this,n,"signal");void 0===x&&(x=!0);const v=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,l,c;r.set(e,null);try{let d,h;try{i.keepOrder&&(l=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>c=t))),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(d=new k,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),h=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,l=Boolean(s&&s.length),c=i.level,d=0!==c&&!i.directory,h=i.zip64;let u,f;if(l&&!i.zipCrypto){u=new Uint8Array(xe.length+2);const t=new DataView(u.buffer);ve(t,0,W),u.set(xe,2),f=i.encryptionStrength,ke(t,8,f)}else u=new Uint8Array(0);const p={version:i.version||20,zip64:h,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:h?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let w=B;i.dataDescriptor&&(w|=8);let _=0;d&&(_=8);h&&(p.version=p.version>45?p.version:45);l&&(w|=1,i.zipCrypto||(p.version=p.version>51?p.version:51,_=99,d&&(p.rawExtraFieldAES[9]=8)));const y=p.headerArray=new Uint8Array(26),g=new DataView(y.buffer);ve(g,0,p.version),ve(g,2,w),ve(g,4,_);const b=new Uint32Array(1),x=new DataView(b.buffer);ve(x,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),ve(x,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const m=b[0];Ae(g,6,m),ve(g,22,r.length),ve(g,24,0);const k=new Uint8Array(30+r.length);let v;Ae(new DataView(k.buffer),0,S),k.set(y,4),k.set(r,30);let A=0,U=0;if(t){A=t.size;const r=await Wt(n.Deflate,{codecType:Rt,level:c,password:s,encryptionStrength:f,zipCrypto:l&&i.zipCrypto,passwordVerification:l&&i.zipCrypto&&m>>8&255,signed:!0,compressed:d,encrypted:l,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(k),v=await o(r,t,e,0,A,n,{onprogress:i.onprogress,signal:i.signal}),U=v.length}else await e.writeUint8Array(k);let E,R=new Uint8Array(0);i.dataDescriptor&&(R=new Uint8Array(h?24:16),E=new DataView(R.buffer),Ae(E,0,T));if(t)if(l&&!i.zipCrypto||void 0===v.signature||(Ae(g,10,v.signature),p.signature=v.signature,i.dataDescriptor&&Ae(E,4,v.signature)),h){const t=new DataView(p.rawExtraFieldZip64.buffer);ve(t,0,1),ve(t,2,24),Ae(g,14,F),Ue(t,12,BigInt(U)),Ae(g,18,F),Ue(t,4,BigInt(A)),i.dataDescriptor&&(Ue(E,8,BigInt(U)),Ue(E,16,BigInt(A)))}else Ae(g,14,U),Ae(g,18,A),i.dataDescriptor&&(Ae(E,8,U),Ae(E,12,A));i.dataDescriptor&&await e.writeUint8Array(R);const D=k.length+(v?v.length:0)+R.length;return Object.assign(p,{compressedSize:U,uncompressedSize:A,lastModDate:a,rawLastModDate:m,encrypted:l,length:D}),p}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,h),d!=a){const e=d.getData(),n=new FileReader,r=new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)})),[s]=await Promise.all([r,t.lockWrite,l]);if(!i.dataDescriptor){const t=new DataView(s);h.encrypted&&!i.zipCrypto||Ae(t,14,h.signature),h.zip64?(Ae(t,18,F),Ae(t,22,F)):(Ae(t,18,h.compressedSize),Ae(t,22,h.uncompressedSize))}await a.writeUint8Array(new Uint8Array(s))}if(h.offset=t.offset,h.zip64){Ue(new DataView(h.rawExtraFieldZip64.buffer),20,BigInt(h.offset))}return t.offset+=h.length,h}finally{c&&c(),s&&s()}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:l,rawExtraField:u,zip64:w,password:c,level:_,useWebWorkers:y,encryptionStrength:d,zipCrypto:h,bufferedWrite:g,keepOrder:b,dataDescriptor:x,signal:m}));return Object.assign(v,{name:t,comment:r,extraField:f}),new Pt(v)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=F||r>=F||s>=C,l=new Uint8Array(r+(o?98:22)),c=new DataView(l.buffer);if(t.length){if(!(t.length<=C))throw new Error(ue);ve(c,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;Ae(c,i,M),ve(c,i+4,t.version),l.set(t.headerArray,i+6),ve(c,i+30,a),ve(c,i+32,t.rawComment.length),t.directory&&ke(c,i+38,16),t.zip64?Ae(c,i+42,F):Ae(c,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(Ae(c,i,O),Ue(c,i+4,BigInt(44)),ve(c,i+12,45),ve(c,i+14,45),Ue(c,i+24,BigInt(s)),Ue(c,i+32,BigInt(s)),Ue(c,i+40,BigInt(r)),Ue(c,i+48,BigInt(a)),Ae(c,i+56,V),Ue(c,i+64,BigInt(a)+BigInt(r)),Ae(c,i+72,1),s=C,a=F,r=F,i+=76),Ae(c,i,L),ve(c,i+8,s),ve(c,i+10,s),Ae(c,i+12,r),Ae(c,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=r,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={},n)=>({Deflate:a(t.Deflate,e.deflate,n),Inflate:a(t.Inflate,e.inflate,n)}),Object.defineProperty(t,"__esModule",{value:!0})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).zip={})}(this,(function(t){"use strict";const e={chunkSize:524288,maxWorkers:"undefined"!=typeof navigator&&navigator.hardwareConcurrency||2,useWebWorkers:!0,workerScripts:void 0},n=Object.assign({},e);function i(){return n}function r(t){if(void 0!==t.chunkSize&&(n.chunkSize=t.chunkSize),void 0!==t.maxWorkers&&(n.maxWorkers=t.maxWorkers),void 0!==t.useWebWorkers&&(n.useWebWorkers=t.useWebWorkers),void 0!==t.Deflate&&(n.Deflate=t.Deflate),void 0!==t.Inflate&&(n.Inflate=t.Inflate),void 0!==t.workerScripts){if(t.workerScripts.deflate){if(!Array.isArray(t.workerScripts.deflate))throw new Error("workerScripts.deflate must be an array");n.workerScripts||(n.workerScripts={}),n.workerScripts.deflate=t.workerScripts.deflate}if(t.workerScripts.inflate){if(!Array.isArray(t.workerScripts.inflate))throw new Error("workerScripts.inflate must be an array");n.workerScripts||(n.workerScripts={}),n.workerScripts.inflate=t.workerScripts.inflate}}}function a(t,e,n){return class{constructor(i){this.codec=new t(Object.assign({},e,i)),n(this.codec,(t=>{if(this.pendingData){const e=this.pendingData;this.pendingData=new Uint8Array(e.length+t.length),this.pendingData.set(e,0),this.pendingData.set(t,e.length)}else this.pendingData=new Uint8Array(t)}))}async append(t){return this.codec.push(t),i(this)}async flush(){return this.codec.push(new Uint8Array(0),!0),i(this)}};function i(t){if(t.pendingData){const e=t.pendingData;return t.pendingData=null,e}return new Uint8Array(0)}}const s="Abort error";async function o(t,e,n,i,r,a,s){const o=Math.max(a.chunkSize,64);return async function a(d=0,h=0){const u=s.signal;if(d{n.onload=t=>i(new Uint8Array(t.target.result)),n.onerror=r,n.readAsArrayBuffer(this.blob.slice(t,t+e))}))}}class v extends x{constructor(t){super(),this.offset=0,this.contentType=t,this.blob=new Blob([],{type:t})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:this.contentType}),this.offset=this.blob.size}getData(){return this.blob}}class k extends b{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests,this.options=Object.assign({},e),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){if(super.init(),I(this.url)&&!this.preventHeadRequest){const t=await U(w,this.url,this.options);if(this.size=Number(t.headers.get(f)),!this.forceRangeRequests&&this.useRangeHeader&&t.headers.get(p)!=g)throw new Error(h);void 0===this.size&&await A(this,this.options)}else await A(this,this.options)}async readUint8Array(t,e){if(this.useRangeHeader){const n=await U(_,this.url,this.options,Object.assign({},this.options.headers,{HEADER_RANGE:"bytes="+t+"-"+(t+e-1)}));if(206!=n.status)throw new Error(h);return new Uint8Array(await n.arrayBuffer())}return this.data||await A(this,this.options),new Uint8Array(this.data.subarray(t,t+e))}}async function A(t,e){const n=await U(_,t.url,e);t.data=new Uint8Array(await n.arrayBuffer()),t.size||(t.size=t.data.length)}async function U(t,e,n,i){i=Object.assign({},n.headers,i);const r=await fetch(e,Object.assign({},n,{method:t,headers:i}));if(r.status<400)return r;throw new Error(d+(r.statusText||r.status))}class E extends b{constructor(t,e){super(),this.url=t,this.preventHeadRequest=e.preventHeadRequest,this.useRangeHeader=e.useRangeHeader,this.forceRangeRequests=e.forceRangeRequests}async init(){if(super.init(),I(this.url)&&!this.preventHeadRequest)return new Promise(((t,e)=>D(w,this.url,(n=>{this.size=Number(n.getResponseHeader(f)),this.useRangeHeader?this.forceRangeRequests||n.getResponseHeader(p)==g?t():e(new Error(h)):void 0===this.size?R(this,this.url).then((()=>t())).catch(e):t()}),e)));await R(this,this.url)}async readUint8Array(t,e){if(!this.useRangeHeader)return this.data||await R(this,this.url),new Uint8Array(this.data.subarray(t,t+e));if(206!=(await new Promise(((n,i)=>D(_,this.url,(t=>n(new Uint8Array(t.response))),i,[["Range","bytes="+t+"-"+(t+e-1)]])))).status)throw new Error(h)}}function R(t,e){return new Promise(((n,i)=>D(_,e,(e=>{t.data=new Uint8Array(e.response),t.size||(t.size=t.data.length),n()}),i)))}function D(t,e,n,i,r=[]){const a=new XMLHttpRequest;return a.addEventListener("load",(()=>{a.status<400?n(a):i(d+(a.statusText||a.status))}),!1),a.addEventListener("error",i,!1),a.open(t,e),r.forEach((t=>a.setRequestHeader(t[0],t[1]))),a.responseType="arraybuffer",a.send(),a}class z extends b{constructor(t,e={}){super(),this.url=t,e.useXHR?this.reader=new E(t,e):this.reader=new k(t,e)}set size(t){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(t,e){return this.reader.readUint8Array(t,e)}}function I(t){if("undefined"!=typeof document){const e=document.createElement("a");return e.href=t,"http:"==e.protocol||"https:"==e.protocol}return/^https?:\/\//i.test(t)}const F=4294967295,C=65535,S=67324752,T=134695760,B=33639248,M=101010256,L=101075792,W=117853008,V=39169,O=2048,P="/",N=new Date(2107,11,31),H=new Date(1980,0,1),j="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const q=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=e>>>1^3988292384:e>>>=1;q[t]=e}class K{constructor(t){this.crc=t||-1}append(t){let e=0|this.crc;for(let n=0,i=0|t.length;n>>8^q[255&(e^t[n])];this.crc=e}get(){return~this.crc}}const G={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const n=t[t.length-1],i=G.getPartial(n);return 32===i?t.concat(e):G._shiftRight(e,i,0|n,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const n=t[e-1];return 32*(e-1)+G.getPartial(n)},clamp(t,e){if(32*t.length0&&e&&(t[n-1]=G.partial(e,t[n-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,n,i){for(void 0===i&&(i=[]);e>=32;e-=32)i.push(n),n=0;if(0===e)return i.concat(t);for(let r=0;r>>e),n=t[r]<<32-e;const r=t.length?t[t.length-1]:0,a=G.getPartial(r);return i.push(G.partial(e+a&31,e+a>32?n:i.pop(),1)),i}},Z={bytes:{fromBits(t){const e=G.bitLength(t)/8,n=new Uint8Array(e);let i;for(let r=0;r>>24,i<<=8;return n},toBits(t){const e=[];let n,i=0;for(n=0;n>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,c;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let h=16843009*c^65537*l^257*o^16843008*d,u=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][d]=u=u<<24^u>>>8,e[n][a]=h=h<<24^h>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let h,u,f,p=t[0]^n[0],w=t[e?3:1]^n[1],_=t[2]^n[2],g=t[e?1:3]^n[3],y=4;for(let t=0;t>>24]^o[w>>16&255]^l[_>>8&255]^c[255&g]^n[y],u=s[w>>>24]^o[_>>16&255]^l[g>>8&255]^c[255&p]^n[y+1],f=s[_>>>24]^o[g>>16&255]^l[p>>8&255]^c[255&w]^n[y+2],g=s[g>>>24]^o[p>>16&255]^l[w>>8&255]^c[255&_]^n[y+3],y+=4,p=h,w=u,_=f;for(let t=0;t<4;t++)r[e?3&-t:t]=d[p>>>24]<<24^d[w>>16&255]<<16^d[_>>8&255]<<8^d[255&g]^n[y++],h=p,p=w,w=_,_=g,g=h;return r}}},X={ctrGladman:class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,n){let i;if(!(i=e.length))return[];const r=G.bitLength(e);for(let r=0;rt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}const gt=12;class yt{constructor(t,e){this.password=t,this.passwordVerification=e,vt(this,t)}async append(t){if(this.password){const e=xt(this,t.subarray(0,gt));if(this.password=null,e[11]!=this.passwordVerification)throw new Error(J);t=t.subarray(gt)}return xt(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class bt{constructor(t,e){this.passwordVerification=e,this.password=t,vt(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(gt));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(mt(this,i),0),n=gt}else e=new Uint8Array(t.length),n=0;return e.set(mt(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function xt(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function At(t){const e=2|t.keys[2];return Ut(Math.imul(e,1^e)>>>8)}function Ut(t){return 255&t}function Et(t){return 4294967295&t}const Rt="deflate",Dt="inflate",zt="Invalid signature";class It{constructor(t,e){this.signature=e.signature,this.encrypted=Boolean(e.password),this.signed=e.signed,this.compressed=e.compressed,this.inflate=e.compressed&&new t,this.crc32=e.signed&&new K,this.zipCrypto=e.zipCrypto,this.decrypt=this.encrypted&&e.zipCrypto?new yt(e.password,e.passwordVerification):new ut(e.password,e.signed,e.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error(zt);e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error(zt)}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class Ft{constructor(t,e){this.encrypted=e.encrypted,this.signed=e.signed,this.compressed=e.compressed,this.deflate=e.compressed&&new t({level:e.level||5}),this.crc32=e.signed&&new K,this.zipCrypto=e.zipCrypto,this.encrypt=this.encrypted&&e.zipCrypto?new bt(e.password,e.passwordVerification):new ft(e.password,e.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const Ct="init",St="append",Tt="flush",Bt="message";var Mt=(t,e,n,i,r,a)=>(t.busy=!0,t.codecConstructor=e,t.options=Object.assign({},n),t.scripts=a,t.webWorker=r,t.onTaskFinished=()=>{t.busy=!1;i(t)&&t.worker&&t.worker.terminate()},r?function(t){let e;t.interface||(t.worker=new Worker(new URL(t.scripts[0],"undefined"==typeof document?new(require("url").URL)("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("zip.min.js",document.baseURI).href)),t.worker.addEventListener(Bt,r,!1),t.interface={append:t=>n({type:St,data:t}),flush:()=>n({type:Tt})});return t.interface;async function n(n){if(!e){const e=t.options,n=t.scripts.slice(1);await i({scripts:n,type:Ct,options:e})}return i(n)}function i(n){const i=t.worker,r=new Promise(((t,n)=>e={resolve:t,reject:n}));try{if(n.data)try{n.data=n.data.buffer,i.postMessage(n,[n.data])}catch(t){i.postMessage(n)}else i.postMessage(n)}catch(n){e.reject(n),e=null,t.onTaskFinished()}return r}function r(n){const i=n.data;if(e){const n=i.error,r=i.type;if(n){const i=new Error(n.message);i.stack=n.stack,e.reject(i),e=null,t.onTaskFinished()}else if(r==Ct||r==Tt||r==St){const n=i.data;r==Tt?(e.resolve({data:new Uint8Array(n),signature:i.signature}),e=null,t.onTaskFinished()):e.resolve(n&&new Uint8Array(n))}}}}(t):function(t){const e=function(t,e){return e.codecType.startsWith(Rt)?new Ft(t,e):e.codecType.startsWith(Dt)?new It(t,e):void 0}(t.codecConstructor,t.options);return{async append(n){try{return await e.append(n)}catch(e){throw t.onTaskFinished(),e}},async flush(){try{return await e.flush()}finally{t.onTaskFinished()}}}}(t));let Lt=[],Wt=[];function Vt(t,e,n){const i=!(!e.compressed&&!e.signed&&!e.encrypted)&&(e.useWebWorkers||void 0===e.useWebWorkers&&n.useWebWorkers),r=i&&n.workerScripts?n.workerScripts[e.codecType]:[];if(Lt.length!t.busy));return n?Mt(n,t,e,Ot,i,r):new Promise((n=>Wt.push({resolve:n,codecConstructor:t,options:e,webWorker:i,scripts:r})))}}function Ot(t){const e=!Wt.length;if(e)Lt=Lt.filter((e=>e!=t));else{const[{resolve:e,codecConstructor:n,options:i,webWorker:r,scripts:a}]=Wt.splice(0,1);e(Mt(t,n,i,Ot,r,a))}return e}const Pt=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64"];class Nt{constructor(t){Pt.forEach((e=>this[e]=t[e]))}}const Ht="File format is not recognized",jt="End of central directory not found",qt="End of Zip64 central directory not found",Kt="End of Zip64 central directory locator not found",Gt="Central directory header not found",Zt="Local file header not found",Yt="Zip64 extra field not found",Xt="File contains encrypted entry",Jt="Encryption method not supported",Qt="Compression method not supported",$t="utf-8",te=["uncompressedSize","compressedSize","offset"];class ee{constructor(t,e,n){this.reader=t,this.config=e,this.options=n}async getData(t,e={}){const n=this.reader;n.initialized||await n.init();const i=this.offset,r=await n.readUint8Array(i,30),a=new DataView(r.buffer),s=this.extraFieldAES,l=this.compressionMethod,c=this.config,d=this.bitFlag,h=this.signature;let u=ae(this,e,"password");if(u=u&&u.length&&u,s&&99!=s.originalCompressionMethod)throw new Error(Qt);if(0!=l&&8!=l)throw new Error(Qt);if(ce(a,0)!=S)throw new Error(Zt);const f=this.localDirectory={};ne(f,a,4),f.rawExtraField=r.subarray(i+30+f.filenameLength,i+30+f.filenameLength+f.extraFieldLength),ie(this,f,a,4);const p=i+30+f.filenameLength+f.extraFieldLength,w=d.encrypted&&f.bitFlag.encrypted,_=w&&!s;if(w){if(!_&&void 0===s.strength)throw new Error(Jt);if(!u)throw new Error(Xt)}const g=await Vt(c.Inflate,{codecType:Dt,password:u,zipCrypto:_,encryptionStrength:s&&s.strength,signed:ae(this,e,"checkSignature"),passwordVerification:_&&(d.dataDescriptor?this.rawLastModDate>>>8&255:h>>>24&255),signature:h,compressed:0!=l,encrypted:w,useWebWorkers:ae(this,e,"useWebWorkers")},c);return t.initialized||await t.init(),await o(g,n,t,p,this.compressedSize,c,{onprogress:e.onprogress,signal:ae(this,e,"signal")}),t.getData()}}function ne(t,e,n){t.version=le(e,n);const i=t.rawBitFlag=le(e,n+2);t.bitFlag={encrypted:1==(1&i),level:(6&i)>>1,dataDescriptor:8==(8&i),languageEncodingFlag:(i&O)==O},t.encrypted=t.bitFlag.encrypted,t.rawLastModDate=ce(e,n+6),t.lastModDate=function(t){const e=(4294901760&t)>>16,n=65535&t;try{return new Date(1980+((65024&e)>>9),((480&e)>>5)-1,31&e,(63488&n)>>11,(2016&n)>>5,2*(31&n),0)}catch(t){}}(t.rawLastModDate),t.filenameLength=le(e,n+22),t.extraFieldLength=le(e,n+24)}function ie(t,e,n,i){const r=e.rawExtraField,a=e.extraField=new Map,s=new DataView(new Uint8Array(r).buffer);let o=0;try{for(;oe[t]==F));for(let e=0;e{if(e[n]==F){if(!t||void 0===t[n])throw new Error(Yt);e[n]=t[n]}}))}(c,e);const d=e.extraFieldUnicodePath=a.get(28789);d&&re(d,"filename","rawFilename",e,t);const h=e.extraFieldUnicodeComment=a.get(25461);h&&re(h,"comment","rawComment",e,t);const u=e.extraFieldAES=a.get(39169);u?function(t,e,n){if(t){const i=new DataView(t.data.buffer);t.vendorVersion=oe(i,0),t.vendorId=oe(i,2);const r=oe(i,4);t.strength=r,t.originalCompressionMethod=n,e.compressionMethod=t.compressionMethod=le(i,5)}else e.compressionMethod=n}(u,e,l):e.compressionMethod=l,8==e.compressionMethod&&(e.bitFlag.enhancedDeflating=16!=(16&e.rawBitFlag))}function re(t,e,n,i,r){const a=new DataView(t.data.buffer);t.version=oe(a,0),t.signature=ce(a,1);const s=new K;s.append(r[n]);const o=new DataView(new Uint8Array(4).buffer);o.setUint32(0,s.get(),!0),t[e]=(new TextDecoder).decode(t.data.subarray(5)),t.valid=!r.bitFlag.languageEncodingFlag&&t.signature==ce(o,0),t.valid&&(i[e]=t[e],i[e+"UTF8"]=!0)}function ae(t,e,n){return void 0===e[n]?t.options[n]:e[n]}function se(t,e){return e&&"cp437"!=e.trim().toLowerCase()?new TextDecoder(e).decode(t):(t=>{let e="";for(let n=0;n{if("function"==typeof URL.createObjectURL){const t=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,r=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],r=n.getPartial(i);return 32===r?t.concat(e):n._shiftRight(e,r,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,r){for(void 0===r&&(r=[]);e>=32;e-=32)r.push(i),i=0;if(0===e)return r.concat(t);for(let n=0;n>>e),i=t[n]<<32-e;const a=t.length?t[t.length-1]:0,s=n.getPartial(a);return r.push(n.partial(e+s&31,e+s>32?i:r.pop(),1)),r}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let r;for(let n=0;n>>24,r<<=8;return i},toBits(t){const e=[];let i,r=0;for(i=0;i>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],a%r==0&&(t=t<<8^t>>>24^l<<24,l=l<<1^283*(l>>7))),s[a]=s[a-r]^t}for(let t=0;a;t++,a--){const e=s[3&t?a:a-4];o[t]=a<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],r=[],a=[];let s,o,l,c;for(let t=0;t<256;t++)a[(r[t]=t<<1^283*(t>>7))^t]=t;for(let d=s=0;!n[d];d^=o||1,s=a[s]||1){let a=s^s<<1^s<<2^s<<3^s<<4;a=a>>8^255&a^99,n[d]=a,i[a]=d,c=r[l=r[o=r[d]]];let h=16843009*c^65537*l^257*o^16843008*d,u=257*r[a]^16843008*a;for(let n=0;n<4;n++)t[n][d]=u=u<<24^u>>>8,e[n][a]=h=h<<24^h>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,r=[0,0,0,0],a=this._tables[e],s=a[0],o=a[1],l=a[2],c=a[3],d=a[4];let h,u,f,p=t[0]^n[0],w=t[e?3:1]^n[1],_=t[2]^n[2],g=t[e?1:3]^n[3],y=4;for(let t=0;t>>24]^o[w>>16&255]^l[_>>8&255]^c[255&g]^n[y],u=s[w>>>24]^o[_>>16&255]^l[g>>8&255]^c[255&p]^n[y+1],f=s[_>>>24]^o[g>>16&255]^l[p>>8&255]^c[255&w]^n[y+2],g=s[g>>>24]^o[p>>16&255]^l[w>>8&255]^c[255&_]^n[y+3],y+=4,p=h,w=u,_=f;for(let t=0;t<4;t++)r[e?3&-t:t]=d[p>>>24]<<24^d[w>>16&255]<<16^d[_>>8&255]<<8^d[255&g]^n[y++],h=p,p=w,w=_,_=g,g=h;return r}},a=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,i){let r;if(!(r=e.length))return[];const a=n.bitLength(e);for(let n=0;nt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,E(this,t)}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return A(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,E(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function D(t){const e=2|t.keys[2];return z(Math.imul(e,1^e)>>>8)}function z(t){return 255&t}function I(t){return 4294967295&t}class F{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new g(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class C{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new y(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const S={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),T=function(t,e){return e.codecType.startsWith("deflate")?new C(t,e):e.codecType.startsWith("inflate")?new F(t,e):void 0}(n,e)},append:async t=>({data:await T.append(t.data)}),flush:()=>T.flush()};let T;function B(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=S[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const M=[0,1,2,3].concat(...B([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function L(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.elems;let s,o,l,c=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=a;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,r=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,c,d,h,u,f=0;for(d=0;d<=15;d++)e.bl_count[d]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],d=n[2*n[2*l+1]+1]+1,d>s&&(d=s,f++),n[2*l+1]=d,l>t.max_code||(e.bl_count[d]++,h=0,l>=a&&(h=r[l-a]),u=n[2*l],e.opt_len+=u*(d+h),i&&(e.static_len+=u*(i[2*l+1]+h)));if(0!==f){do{for(d=s-1;0===e.bl_count[d];)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[s]--,f-=2}while(f>0);for(d=s;0!==d;d--)for(l=e.bl_count[d];0!==l;)c=e.heap[--o],c>t.max_code||(n[2*c+1]!=d&&(e.opt_len+=(d-n[2*c+1])*n[2*c],n[2*c+1]=d),l--)}}(n),function(t,n,i){const r=[];let a,s,o,l=0;for(a=1;a<=15;a++)r[a]=l=l+i[a-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(r[o]++,o))}(i,t.max_code,n.bl_count)}}function W(t,e,n,i,r){const a=this;a.static_tree=t,a.extra_bits=e,a.extra_base=n,a.elems=i,a.max_length=r}function V(t,e,n,i,r){const a=this;a.good_length=t,a.max_lazy=e,a.nice_length=n,a.max_chain=i,a.func=r}L._length_code=[0,1,2,3,4,5,6,7].concat(...B([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),L.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],L.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],L.d_code=function(t){return t<256?M[t]:M[256+(t>>>7)]},L.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],L.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],L.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],L.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],W.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],W.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],W.static_l_desc=new W(W.static_ltree,L.extra_lbits,257,286,15),W.static_d_desc=new W(W.static_dtree,L.extra_dbits,0,30,15),W.static_bl_desc=new W(null,L.extra_blbits,0,19,7);const O=[new V(0,0,0,0,0),new V(4,4,8,4,1),new V(4,5,16,8,1),new V(4,6,32,32,1),new V(4,4,16,16,2),new V(8,16,32,32,2),new V(8,16,128,128,2),new V(8,32,128,256,2),new V(32,128,258,1024,2),new V(32,258,258,4096,2)],P=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function N(t,e,n,i){const r=t[2*e],a=t[2*n];return r>>8&255)}function tt(t,e){let n;const i=e;Y>16-i?(n=t,Z|=n<>>16-Y,Y+=i-16):(Z|=t<=8&&(Q(255&Z),Z>>>=8,Y-=8)}function rt(e,n){let i,r,a;if(t.pending_buf[q+2*j]=e>>>8&255,t.pending_buf[q+2*j+1]=255&e,t.pending_buf[V+j]=255&n,j++,0===e?F[2*n]++:(K++,e--,F[2*(L._length_code[n]+256+1)]++,C[2*L.d_code(e)]++),0==(8191&j)&&R>2){for(i=8*j,r=m-g,a=0;a<30;a++)i+=C[2*a]*(5+L.extra_dbits[a]);if(i>>>=3,K8?$(Z):Y>0&&Q(255&Z),Z=0,Y=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),G=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let r,a,s=0;R>0?(T.build_tree(t),B.build_tree(t),s=function(){let e;for(J(F,T.max_code),J(C,B.max_code),M.build_tree(t),e=18;e>=3&&0===S[2*L.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),r=t.opt_len+3+7>>>3,a=t.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&-1!=e?ot(e,n,i):a==r?(tt(2+(i?1:0),3),at(W.static_ltree,W.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?g:-1,m-g,t),g=m,e.flush_pending()}function dt(){let t,n,i,r;do{if(r=c-k-m,0===r&&0===m&&0===k)r=a;else if(-1==r)r--;else if(m>=a+a-262){l.set(l.subarray(a,a+a),0),v-=a,m-=a,g-=a,t=f,i=t;do{n=65535&h[--i],h[i]=n>=a?n-a:0}while(0!=--t);t=a,i=t;do{n=65535&d[--i],d[i]=n>=a?n-a:0}while(0!=--t);r+=a}if(0===e.avail_in)return;t=e.read_buf(l,m+k,r),k+=t,k>=3&&(u=255&l[m],u=(u<<_^255&l[m+1])&w)}while(k<262&&0!==e.avail_in)}function ht(t){let e,n,i=U,r=m,s=A;const c=m>a-262?m-(a-262):0;let h=I;const u=o,f=m+258;let p=l[r+s-1],w=l[r+s];A>=z&&(i>>=2),h>k&&(h=k);do{if(e=t,l[e+s]==w&&l[e+s-1]==p&&l[e]==l[r]&&l[++e]==l[r+1]){r+=2,e++;do{}while(l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&l[++r]==l[++e]&&rs){if(v=t,s=n,n>=h)break;p=l[r+s-1],w=l[r+s]}}}while((t=65535&d[t&u])>c&&0!=--i);return s<=k?s:k}function ut(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,r=0,T.dyn_tree=F,T.stat_desc=W.static_l_desc,B.dyn_tree=C,B.stat_desc=W.static_d_desc,M.dyn_tree=S,M.stat_desc=W.static_bl_desc,Z=0,Y=0,G=8,X(),function(){c=2*a,h[f-1]=0;for(let t=0;t9||8!=c||r<9||r>15||n<0||n>9||g<0||g>2?-2:(e.dstate=t,s=r,a=1<9||n<0||n>2?-2:(O[R].func!=O[e].func&&0!==t.total_in&&(i=t.deflate(1)),R!=e&&(R=e,E=O[R].max_lazy,z=O[R].good_length,I=O[R].nice_length,U=O[R].max_chain),D=n,i)},t.deflateSetDictionary=function(t,e,i){let r,s=i,c=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>a-262&&(s=a-262,c=i-s),l.set(e.subarray(c,c+s),0),m=s,g=s,u=255&l[0],u=(u<<_^255&l[1])&w,r=0;r<=s-3;r++)u=(u<<_^255&l[r+2])&w,d[r&o]=h[u],h[u]=r;return 0},t.deflate=function(c,p){let U,z,I,F,C;if(p>4||p<0)return-2;if(!c.next_out||!c.next_in&&0!==c.avail_in||666==n&&4!=p)return c.msg=P[4],-2;if(0===c.avail_out)return c.msg=P[7],-5;var S;if(e=c,F=r,r=p,42==n&&(z=8+(s-8<<4)<<8,I=(R-1&255)>>1,I>3&&(I=3),z|=I<<6,0!==m&&(z|=32),z+=31-z%31,n=113,Q((S=z)>>8&255),Q(255&S)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return r=-1,0}else if(0===e.avail_in&&p<=F&&4!=p)return e.msg=P[7],-5;if(666==n&&0!==e.avail_in)return c.msg=P[7],-5;if(0!==e.avail_in||0!==k||0!=p&&666!=n){switch(C=-1,O[R].func){case 0:C=function(t){let n,r=65535;for(r>i-5&&(r=i-5);;){if(k<=1){if(dt(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=g+r,(0===m||m>=n)&&(k=m-n,m=n,ct(!1),0===e.avail_out))return 0;if(m-g>=a-262&&(ct(!1),0===e.avail_out))return 0}return ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p);break;case 1:C=function(t){let n,i=0;for(;;){if(k<262){if(dt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(u=(u<<_^255&l[m+2])&w,i=65535&h[u],d[m&o]=h[u],h[u]=m),0!==i&&(m-i&65535)<=a-262&&2!=D&&(y=ht(i)),y>=3)if(n=rt(m-v,y-3),k-=y,y<=E&&k>=3){y--;do{m++,u=(u<<_^255&l[m+2])&w,i=65535&h[u],d[m&o]=h[u],h[u]=m}while(0!=--y);m++}else m+=y,y=0,u=255&l[m],u=(u<<_^255&l[m+1])&w;else n=rt(0,255&l[m]),k--,m++;if(n&&(ct(!1),0===e.avail_out))return 0}return ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p);break;case 2:C=function(t){let n,i,r=0;for(;;){if(k<262){if(dt(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(u=(u<<_^255&l[m+2])&w,r=65535&h[u],d[m&o]=h[u],h[u]=m),A=y,b=v,y=2,0!==r&&A4096)&&(y=2)),A>=3&&y<=A){i=m+k-3,n=rt(m-1-b,A-3),k-=A-1,A-=2;do{++m<=i&&(u=(u<<_^255&l[m+2])&w,r=65535&h[u],d[m&o]=h[u],h[u]=m)}while(0!=--A);if(x=0,y=2,m++,n&&(ct(!1),0===e.avail_out))return 0}else if(0!==x){if(n=rt(0,255&l[m-1]),n&&ct(!1),m++,k--,0===e.avail_out)return 0}else x=1,m++,k--}return 0!==x&&(n=rt(0,255&l[m-1]),x=0),ct(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(p)}if(2!=C&&3!=C||(n=666),0==C||2==C)return 0===e.avail_out&&(r=-1),0;if(1==C){if(1==p)tt(2,3),et(256,W.static_ltree),it(),1+G+10-Y<9&&(tt(2,3),et(256,W.static_ltree),it()),G=7;else if(ot(0,0,!1),3==p)for(U=0;U0&&e.next_in_index!=o&&(r(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(c),d.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,r,a=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),r=new Uint8Array(s),o.forEach((function(t){r.set(t,a),a+=t.length})),r}}j.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new H,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let r=i.avail_in;return r>n&&(r=n),0===r?0:(i.avail_in-=r,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+r),e),i.next_in_index+=r,i.total_in+=r,r)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const K=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],G=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],Z=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Y=[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],X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],J=[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],Q=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function $(){let t,e,n,i,r,a;function s(t,e,s,o,l,c,d,h,u,f,p){let w,_,g,y,b,x,m,v,k,A,U,E,R,D,z;A=0,b=s;do{n[t[e+A]]++,A++,b--}while(0!==b);if(n[0]==s)return d[0]=-1,h[0]=0,0;for(v=h[0],x=1;x<=15&&0===n[x];x++);for(m=x,vb&&(v=b),h[0]=v,D=1<E+v;){if(y++,E+=v,z=g-E,z=z>v?v:z,(_=1<<(x=m-E))>w+1&&(_-=w+1,R=m,x1440)return-3;r[y]=U=f[0],f[0]+=z,0!==y?(a[y]=b,i[0]=x,i[1]=v,x=b>>>E-v,i[2]=U-r[y-1]-x,u.set(i,3*(r[y-1]+x))):d[0]=U}for(i[1]=m-E,A>=s?i[0]=192:p[A]>>E;x>>=1)b^=x;for(b^=x,k=(1<257?(-3==f?u.msg="oversubscribed distance tree":-5==f?(u.msg="incomplete distance tree",f=-3):-4!=f&&(u.msg="empty distance tree with lengths",f=-3),f):0)}}function tt(){const t=this;let e,n,i,r,a=0,s=0,o=0,l=0,c=0,d=0,h=0,u=0,f=0,p=0;function w(t,e,n,i,r,a,s,o){let l,c,d,h,u,f,p,w,_,g,y,b,x,m,v,k;p=o.next_in_index,w=o.avail_in,u=s.bitb,f=s.bitk,_=s.write,g=_>=c[k+1],f-=c[k+1],0!=(16&h)){for(h&=15,x=c[k+2]+(u&K[h]),u>>=h,f-=h;f<15;)w--,u|=(255&o.read_byte(p++))<>=c[k+1],f-=c[k+1],0!=(16&h)){for(h&=15;f>=h,f-=h,g-=x,_>=m)v=_-m,_-v>0&&2>_-v?(s.window[_++]=s.window[v++],s.window[_++]=s.window[v++],x-=2):(s.window.set(s.window.subarray(v,v+2),_),_+=2,v+=2,x-=2);else{v=_-m;do{v+=s.end}while(v<0);if(h=s.end-v,x>h){if(x-=h,_-v>0&&h>_-v)do{s.window[_++]=s.window[v++]}while(0!=--h);else s.window.set(s.window.subarray(v,v+h),_),_+=h,v+=h,h=0;v=0}}if(_-v>0&&x>_-v)do{s.window[_++]=s.window[v++]}while(0!=--x);else s.window.set(s.window.subarray(v,v+x),_),_+=x,v+=x,x=0;break}if(0!=(64&h))return o.msg="invalid distance code",x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,-3;l+=c[k+2],l+=u&K[h],k=3*(d+l),h=c[k]}break}if(0!=(64&h))return 0!=(32&h)?(x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,1):(o.msg="invalid literal/length code",x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,-3);if(l+=c[k+2],l+=u&K[h],k=3*(d+l),0===(h=c[k])){u>>=c[k+1],f-=c[k+1],s.window[_++]=c[k+2],g--;break}}else u>>=c[k+1],f-=c[k+1],s.window[_++]=c[k+2],g--}while(g>=258&&w>=10);return x=o.avail_in-w,x=f>>3>3:x,w+=x,p-=x,f-=x<<3,s.bitb=u,s.bitk=f,o.avail_in=w,o.total_in+=p-o.next_in_index,o.next_in_index=p,s.write=_,0}t.init=function(t,a,s,o,l,c){e=0,h=t,u=a,i=s,f=o,r=l,p=c,n=null},t.proc=function(t,_,g){let y,b,x,m,v,k,A,U=0,E=0,R=0;for(R=_.next_in_index,m=_.avail_in,U=t.bitb,E=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=v,g=w(h,u,i,f,r,p,t,_),R=_.next_in_index,m=_.avail_in,U=t.bitb,E=t.bitk,v=t.write,k=v>>=n[b+1],E-=n[b+1],x=n[b],0===x){l=n[b+2],e=6;break}if(0!=(16&x)){c=15&x,a=n[b+2],e=2;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}if(0!=(32&x)){e=7;break}return e=9,_.msg="invalid literal/length code",g=-3,t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=v,t.inflate_flush(_,g);case 2:for(y=c;E>=y,E-=y,o=u,n=r,s=p,e=3;case 3:for(y=o;E>=n[b+1],E-=n[b+1],x=n[b],0!=(16&x)){c=15&x,d=n[b+2],e=4;break}if(0==(64&x)){o=x,s=b/3+n[b+2];break}return e=9,_.msg="invalid distance code",g=-3,t.bitb=U,t.bitk=E,_.avail_in=m,_.total_in+=R-_.next_in_index,_.next_in_index=R,t.write=v,t.inflate_flush(_,g);case 4:for(y=c;E>=y,E-=y,e=5;case 5:for(A=v-d;A<0;)A+=t.end;for(;0!==a;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(E-=8,m++,R--),t.write=v,g=t.inflate_flush(_,g),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i,a==n.end&&(a=0,n.write==n.end&&(n.write=0),i=n.write-a,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(a,a+i),r),r+=i,a+=i),t.next_out_index=r,n.read=a,e},n.proc=function(t,e){let p,w,_,g,y,b,x,m;for(g=t.next_in_index,y=t.avail_in,w=n.bitb,_=n.bitk,b=n.write,x=b>>1){case 0:w>>>=3,_-=3,p=7&_,w>>>=p,_-=p,r=1;break;case 1:v=[],k=[],A=[[]],U=[[]],$.inflate_trees_fixed(v,k,A,U),d.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,_-=3,r=6;break;case 2:w>>>=3,_-=3,r=3;break;case 3:return w>>>=3,_-=3,r=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,n.inflate_flush(t,e)}break;case 1:for(;_<32;){if(0===y)return n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(g++))<<_,_+=8}if((~w>>>16&65535)!=(65535&w))return r=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,n.inflate_flush(t,e);a=65535&w,w=_=0,r=0!==a?2:0!==h?7:0;break;case 2:if(0===y)return n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,n.inflate_flush(t,e);if(0===x&&(b==n.end&&0!==n.read&&(b=0,x=by&&(p=y),p>x&&(p=x),n.window.set(t.read_buf(g,p),b),g+=p,y-=p,b+=p,x-=p,0!=(a-=p))break;r=0!==h?7:0;break;case 3:for(;_<14;){if(0===y)return n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(g++))<<_,_+=8}if(s=p=16383&w,(31&p)>29||(p>>5&31)>29)return r=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,n.inflate_flush(t,e);if(p=258+(31&p)+(p>>5&31),!i||i.length>>=14,_-=14,o=0,r=4;case 4:for(;o<4+(s>>>10);){for(;_<3;){if(0===y)return n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,n.inflate_flush(t,e);e=0,y--,w|=(255&t.read_byte(g++))<<_,_+=8}i[et[o++]]=7&w,w>>>=3,_-=3}for(;o<19;)i[et[o++]]=0;if(l[0]=7,p=f.inflate_trees_bits(i,l,c,u,t),0!=p)return-3==(e=p)&&(i=null,r=9),n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,n.inflate_flush(t,e);o=0,r=5;case 5:for(;p=s,!(o>=258+(31&p)+(p>>5&31));){let a,d;for(p=l[0];_>>=p,_-=p,i[o++]=d;else{for(m=18==d?7:d-14,a=18==d?11:3;_>>=p,_-=p,a+=w&K[m],w>>>=m,_-=m,m=o,p=s,m+a>258+(31&p)+(p>>5&31)||16==d&&m<1)return i=null,r=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,n.inflate_flush(t,e);d=16==d?i[m-1]:0;do{i[m++]=d}while(0!=--a);o=m}}if(c[0]=-1,E=[],R=[],D=[],z=[],E[0]=9,R[0]=6,p=s,p=f.inflate_trees_dynamic(257+(31&p),1+(p>>5&31),i,E,R,D,z,u,t),0!=p)return-3==p&&(i=null,r=9),e=p,n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,n.inflate_flush(t,e);d.init(E[0],R[0],u,D[0],u,z[0]),r=6;case 6:if(n.bitb=w,n.bitk=_,t.avail_in=y,t.total_in+=g-t.next_in_index,t.next_in_index=g,n.write=b,1!=(e=d.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,d.free(t),g=t.next_in_index,y=t.avail_in,w=n.bitb,_=n.bitk,b=n.write,x=b15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new nt(n,1<>4)>r.wbits){r.mode=13,t.msg="invalid window size",r.marker=5;break}r.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((r.method<<8)+i)%31!=0){r.mode=13,t.msg="incorrect header check",r.marker=5;break}if(0==(32&i)){r.mode=7;break}r.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,r.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,r.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,r.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,r.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,r.need+=255&t.read_byte(t.next_in_index++),r.mode=6,2);case 6:return r.mode=13,t.msg="need dictionary",r.marker=0,-2;case 7:if(n=r.blocks.proc(t,n),-3==n){r.mode=13,r.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,r.blocks.reset(t,r.was),r.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,r=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const a=t.istate;return r>=1<0&&t.next_in_index!=l&&(r(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(d),a.forEach((function(t){o.set(t,c),c+=t.length})),o}},this.flush=function(){t.inflateEnd()}}at.prototype={inflateInit:function(t){const e=this;return e.istate=new rt,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=q,self.Inflate=st}}).toString(),e=URL.createObjectURL(new Blob(["("+t+")()"],{type:"text/javascript"}));r({workerScripts:{inflate:[e],deflate:[e]}})}})(),t.BlobReader=m,t.BlobWriter=v,t.Data64URIReader=class extends b{constructor(t){super(),this.dataURI=t;let e=t.length;for(;"="==t.charAt(e-1);)e--;this.dataStart=t.indexOf(",")+1,this.size=Math.floor(.75*(e-this.dataStart))}async readUint8Array(t,e){const n=new Uint8Array(e),i=4*Math.floor(t/3),r=atob(this.dataURI.substring(i+this.dataStart,4*Math.ceil((t+e)/3)+this.dataStart)),a=t-3*Math.floor(i/4);for(let t=a;t2?this.data+=btoa(n):this.pending=n}getData(){return this.data+btoa(this.pending)}},t.ERR_ABORT=s,t.ERR_BAD_FORMAT=Ht,t.ERR_CENTRAL_DIRECTORY_NOT_FOUND=Gt,t.ERR_DUPLICATED_NAME=he,t.ERR_ENCRYPTED=Xt,t.ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND=Kt,t.ERR_EOCDR_NOT_FOUND=jt,t.ERR_EOCDR_ZIP64_NOT_FOUND=qt,t.ERR_EXTRAFIELD_ZIP64_NOT_FOUND=Yt,t.ERR_HTTP_RANGE=h,t.ERR_INVALID_COMMENT=ue,t.ERR_INVALID_DATE=_e,t.ERR_INVALID_ENCRYPTION_STRENGTH=ge,t.ERR_INVALID_ENTRY_COMMENT=fe,t.ERR_INVALID_ENTRY_NAME=pe,t.ERR_INVALID_EXTRAFIELD_DATA=be,t.ERR_INVALID_EXTRAFIELD_TYPE=ye,t.ERR_INVALID_PASSWORD=J,t.ERR_INVALID_SIGNATURE=zt,t.ERR_INVALID_VERSION=we,t.ERR_LOCAL_FILE_HEADER_NOT_FOUND=Zt,t.ERR_UNSUPPORTED_COMPRESSION=Qt,t.ERR_UNSUPPORTED_ENCRYPTION=Jt,t.HttpRangeReader=class extends z{constructor(t,e={}){e.useRangeHeader=!0,super(t,e)}},t.HttpReader=z,t.Reader=b,t.TextReader=class extends b{constructor(t){super(),this.blobReader=new m(new Blob([t],{type:u}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(t,e){return this.blobReader.readUint8Array(t,e)}},t.TextWriter=class extends x{constructor(t){super(),this.encoding=t,this.blob=new Blob([],{type:u})}async writeUint8Array(t){super.writeUint8Array(t),this.blob=new Blob([this.blob,t.buffer],{type:u})}getData(){const t=new FileReader;return new Promise(((e,n)=>{t.onload=t=>e(t.target.result),t.onerror=n,t.readAsText(this.blob,this.encoding)}))}},t.Uint8ArrayReader=class extends b{constructor(t){super(),this.array=t,this.size=t.length}async readUint8Array(t,e){return this.array.slice(t,t+e)}},t.Uint8ArrayWriter=class extends x{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(t){super.writeUint8Array(t);const e=this.array;this.array=new Uint8Array(e.length+t.length),this.array.set(e),this.array.set(t,e.length)}getData(){return this.array}},t.Writer=x,t.ZipReader=class{constructor(t,e={}){this.reader=t,this.options=e,this.config=i()}async getEntries(t={}){const e=this.reader;if(e.initialized||await e.init(),e.size<22)throw new Error(Ht);const n=await async function(t,e,n,i){const r=new Uint8Array(4);!function(t,e,n){t.setUint32(e,n,!0)}(new DataView(r.buffer),0,e);const a=n+i;return await s(n)||await s(Math.min(a,t.size));async function s(e){const i=t.size-e,a=await t.readUint8Array(i,e);for(let t=a.length-n;t>=0;t--)if(a[t]==r[0]&&a[t+1]==r[1]&&a[t+2]==r[2]&&a[t+3]==r[3])return{offset:i+t,buffer:a.slice(t,t+n).buffer}}}(e,M,22,1048560);if(!n)throw new Error(jt);const i=new DataView(n.buffer);let r=ce(i,12),a=ce(i,16),s=le(i,8),o=0;if(a==F||r==F||s==C){const t=await e.readUint8Array(n.offset-20,20),i=new DataView(t.buffer);if(ce(i,0)!=W)throw new Error(qt);a=de(i,8);let l=await e.readUint8Array(a,56),c=new DataView(l.buffer);const d=n.offset-20-56;if(ce(c,0)!=L&&a!=d){const t=a;a=d,o=a-t,l=await e.readUint8Array(a,56),c=new DataView(l.buffer)}if(ce(c,0)!=L)throw new Error(Kt);s=de(c,24),r=de(i,4),a-=de(c,40)}if(a<0||a>=e.size)throw new Error(Ht);let l=0,c=await e.readUint8Array(a,e.size-a),d=new DataView(c.buffer);const h=n.offset-r;if(ce(d,l)!=B&&a!=h){const t=a;a=h,o=a-t,c=await e.readUint8Array(a,e.size-a),d=new DataView(c.buffer)}if(a<0||a>=e.size)throw new Error(Ht);const u=[];for(let e=0;ee.getData(t,n),u.push(r),l+=46+e.filenameLength+e.extraFieldLength+e.commentLength}return u}async close(){}},t.ZipWriter=class{constructor(t,e={}){this.writer=t,this.options=e,this.config=i(),this.files=new Map,this.offset=t.size,this.maxOutputSize=0}async add(t="",e,n={}){if(t=t.trim(),n.directory&&!t.endsWith(P)?t+=P:n.directory=t.endsWith(P),this.files.has(t))throw new Error(he);const i=(new TextEncoder).encode(t);if(i.length>C)throw new Error(pe);const r=n.comment||"",a=(new TextEncoder).encode(r);if(a.length>C)throw new Error(fe);const s=this.options.version||n.version||0;if(s>C)throw new Error(we);const l=n.lastModDate||new Date;if(lN)throw new Error(_e);const c=me(this,n,"password"),d=me(this,n,"encryptionStrength")||3,h=me(this,n,"zipCrypto");if(void 0!==c&&void 0!==d&&(d<1||d>3))throw new Error(ge);e&&!e.initialized&&await e.init();let u=new Uint8Array(0);const f=n.extraField;if(f){let t=0,e=0;f.forEach((e=>t+=4+e.length)),u=new Uint8Array(t),f.forEach(((t,n)=>{if(n>C)throw new Error(ye);if(t.length>C)throw new Error(be);u.set(new Uint16Array([n]),e),u.set(new Uint16Array([t.length]),e+2),u.set(t,e+4),e+=4+t.length}))}const p=e?Math.floor(1.05*e.size):0;this.maxOutputSize+=p,await Promise.resolve();const w=n.zip64||this.options.zip64||this.offset>=F||p>=F||this.offset+this.maxOutputSize>=F,_=me(this,n,"level"),g=me(this,n,"useWebWorkers"),y=me(this,n,"bufferedWrite");let b=me(this,n,"keepOrder"),x=me(this,n,"dataDescriptor");const m=me(this,n,"signal");void 0===x&&(x=!0),void 0===b&&(b=!0);const k=await async function(t,e,n,i){const r=t.files,a=t.writer;let s,l,c;r.set(e,null);try{let d,h;try{i.keepOrder&&(l=t.lockPreviousFile,t.lockPreviousFile=new Promise((t=>c=t))),i.bufferedWrite||t.lockWrite||!i.dataDescriptor?(d=new v,await d.init()):(t.lockWrite=new Promise((t=>s=t)),a.initialized||await a.init(),d=a),h=await async function(t,e,n,i){const r=i.rawFilename,a=i.lastModDate,s=i.password,l=Boolean(s&&s.length),c=i.level,d=0!==c&&!i.directory,h=i.zip64;let u,f;if(l&&!i.zipCrypto){u=new Uint8Array(xe.length+2);const t=new DataView(u.buffer);ke(t,0,V),u.set(xe,2),f=i.encryptionStrength,ve(t,8,f)}else u=new Uint8Array(0);const p={version:i.version||20,zip64:h,directory:Boolean(i.directory),filenameUTF8:!0,rawFilename:r,commentUTF8:!0,rawComment:i.rawComment,rawExtraFieldZip64:h?new Uint8Array(28):new Uint8Array(0),rawExtraFieldAES:u,rawExtraField:i.rawExtraField};let w=O;i.dataDescriptor&&(w|=8);let _=0;d&&(_=8);h&&(p.version=p.version>45?p.version:45);l&&(w|=1,i.zipCrypto||(p.version=p.version>51?p.version:51,_=99,d&&(p.rawExtraFieldAES[9]=8)));const g=p.headerArray=new Uint8Array(26),y=new DataView(g.buffer);ke(y,0,p.version),ke(y,2,w),ke(y,4,_);const b=new Uint32Array(1),x=new DataView(b.buffer);ke(x,0,(a.getHours()<<6|a.getMinutes())<<5|a.getSeconds()/2),ke(x,2,(a.getFullYear()-1980<<4|a.getMonth()+1)<<5|a.getDate());const m=b[0];Ae(y,6,m),ke(y,22,r.length),ke(y,24,0),ke(y,24,u.length+p.rawExtraField.length);const v=new Uint8Array(30+r.length+u.length+p.rawExtraField.length);let k;Ae(new DataView(v.buffer),0,S),v.set(g,4),v.set(r,30),v.set(u,30+r.length),v.set(p.rawExtraField,30+r.length+u.length);let A=0,U=0;if(t){A=t.size;const r=await Vt(n.Deflate,{codecType:Rt,level:c,password:s,encryptionStrength:f,zipCrypto:l&&i.zipCrypto,passwordVerification:l&&i.zipCrypto&&m>>8&255,signed:!0,compressed:d,encrypted:l,useWebWorkers:i.useWebWorkers},n);await e.writeUint8Array(v),k=await o(r,t,e,0,A,n,{onprogress:i.onprogress,signal:i.signal}),U=k.length}else await e.writeUint8Array(v);let E,R=new Uint8Array(0);i.dataDescriptor&&(R=new Uint8Array(h?24:16),E=new DataView(R.buffer),Ae(E,0,T));if(t)if(l&&!i.zipCrypto||void 0===k.signature||(Ae(y,10,k.signature),p.signature=k.signature,i.dataDescriptor&&Ae(E,4,k.signature)),h){const t=new DataView(p.rawExtraFieldZip64.buffer);ke(t,0,1),ke(t,2,24),Ae(y,14,F),Ue(t,12,BigInt(U)),Ae(y,18,F),Ue(t,4,BigInt(A)),i.dataDescriptor&&(Ue(E,8,BigInt(U)),Ue(E,16,BigInt(A)))}else Ae(y,14,U),Ae(y,18,A),i.dataDescriptor&&(Ae(E,8,U),Ae(E,12,A));i.dataDescriptor&&await e.writeUint8Array(R);const D=v.length+(k?k.length:0)+R.length;return Object.assign(p,{compressedSize:U,uncompressedSize:A,lastModDate:a,rawLastModDate:m,encrypted:l,length:D}),p}(n,d,t.config,i)}catch(t){throw r.delete(e),t}if(r.set(e,h),d!=a){const e=d.getData(),n=new FileReader,r=new Promise(((t,i)=>{n.onload=e=>t(e.target.result),n.onerror=i,n.readAsArrayBuffer(e)})),[s]=await Promise.all([r,t.lockWrite,l]);if(!i.dataDescriptor){const t=new DataView(s);h.encrypted&&!i.zipCrypto||Ae(t,14,h.signature),h.zip64?(Ae(t,18,F),Ae(t,22,F)):(Ae(t,18,h.compressedSize),Ae(t,22,h.uncompressedSize))}await a.writeUint8Array(new Uint8Array(s))}if(h.offset=t.offset,h.zip64){Ue(new DataView(h.rawExtraFieldZip64.buffer),20,BigInt(h.offset))}return t.offset+=h.length,h}finally{c&&c(),s&&s()}}(this,t,e,Object.assign({},n,{rawFilename:i,rawComment:a,version:s,lastModDate:l,rawExtraField:u,zip64:w,password:c,level:_,useWebWorkers:g,encryptionStrength:d,zipCrypto:h,bufferedWrite:y,keepOrder:b,dataDescriptor:x,signal:m}));return this.maxOutputSize-=p,Object.assign(k,{name:t,comment:r,extraField:f}),new Nt(k)}async close(t=new Uint8Array(0)){const e=this.writer,n=this.files;let i=0,r=0,a=this.offset,s=n.size;for(const[,t]of n)r+=46+t.rawFilename.length+t.rawComment.length+t.rawExtraFieldZip64.length+t.rawExtraFieldAES.length+t.rawExtraField.length;const o=this.options.zip64||a>=F||r>=F||s>=C,l=new Uint8Array(r+(o?98:22)),c=new DataView(l.buffer);if(t.length){if(!(t.length<=C))throw new Error(ue);ke(c,i+20,t.length)}for(const[,t]of n){const e=t.rawFilename,n=t.rawExtraFieldZip64,r=t.rawExtraFieldAES,a=n.length+r.length+t.rawExtraField.length;Ae(c,i,B),ke(c,i+4,t.version),l.set(t.headerArray,i+6),ke(c,i+30,a),ke(c,i+32,t.rawComment.length),t.directory&&ve(c,i+38,16),t.zip64?Ae(c,i+42,F):Ae(c,i+42,t.offset),l.set(e,i+46),l.set(n,i+46+e.length),l.set(r,i+46+e.length+n.length),l.set(t.rawExtraField,46+e.length+n.length+r.length),l.set(t.rawComment,i+46+e.length+a),i+=46+e.length+a+t.rawComment.length}return o&&(Ae(c,i,L),Ue(c,i+4,BigInt(44)),ke(c,i+12,45),ke(c,i+14,45),Ue(c,i+24,BigInt(s)),Ue(c,i+32,BigInt(s)),Ue(c,i+40,BigInt(r)),Ue(c,i+48,BigInt(a)),Ae(c,i+56,W),Ue(c,i+64,BigInt(a)+BigInt(r)),Ae(c,i+72,1),s=C,a=F,r=F,i+=76),Ae(c,i,M),ke(c,i+8,s),ke(c,i+10,s),Ae(c,i+12,r),Ae(c,i+16,a),await e.writeUint8Array(l),t.length&&await e.writeUint8Array(t),e.getData()}},t.configure=r,t.getMimeType=function(){return"application/octet-stream"},t.initShimAsyncCodec=(t,e={},n)=>({Deflate:a(t.Deflate,e.deflate,n),Inflate:a(t.Inflate,e.inflate,n)}),Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/lib/z-worker-inline.js b/lib/z-worker-inline.js index e23bee7f..4b32bd06 100644 --- a/lib/z-worker-inline.js +++ b/lib/z-worker-inline.js @@ -1 +1 @@ -import{configure as t}from"./core/configuration.js";export default()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={name:"PBKDF2"},i={name:"HMAC"},a={name:"AES-CTR"},r=Object.assign({hash:i},n),s=Object.assign({iterations:1e3,hash:{name:"SHA-1"}},n),o=Object.assign({hash:"SHA-1"},i),l=Object.assign({length:16},a),d=["deriveBits"],_=["sign"],u=[8,12,16],f=[16,24,32],c=[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=crypto.subtle;class w{constructor(t,e,n){this.password=t,this.signed=e,this.strength=n-1,this.input=e&&new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(a=0)=>{if(a+16<=i.length-10){const t=i.subarray(a,a+16),r=await h.decrypt(Object.assign({counter:this.counter},l),this.keys.key,t);return x(this.counter),n.set(new Uint8Array(r),a),e(a+16)}return this.pendingInput=i.subarray(a),this.signed&&(this.input=y(this.input,t)),n};if(this.password){const e=t.subarray(0,u[this.strength]+2);await async function(t,e,n){await p(t,n,e.subarray(0,u[t.strength]),["decrypt"]);const i=e.subarray(u[t.strength]),a=t.keys.passwordVerification;if(a[0]!=i[0]||a[1]!=i[1])throw new Error("Invalid pasword")}(this,e,this.password),this.password=null,t=t.subarray(u[this.strength]+2)}let n=new Uint8Array(t.length-10-(t.length-10)%16),i=t;return this.pendingInput.length&&(i=y(this.pendingInput,t),n=g(n,i.length-10-(i.length-10)%16)),e()}async flush(){const t=this.pendingInput,e=this.keys,n=t.subarray(0,t.length-10),a=t.subarray(t.length-10);let r=new Uint8Array(0);if(n.length){const t=await h.decrypt(Object.assign({counter:this.counter},l),e.key,n);r=new Uint8Array(t)}let s=!0;if(this.signed){const t=await h.sign(i,e.authentication,this.input.subarray(0,this.input.length-10)),n=new Uint8Array(t);this.input=null;for(let t=0;t<10;t++)n[t]!=a[t]&&(s=!1)}return{valid:s,data:r}}}class b{constructor(t,e){this.password=t,this.strength=e-1,this.output=new Uint8Array(0),this.pendingInput=new Uint8Array(0)}async append(t){const e=async(a=0)=>{if(a+16<=t.length){const r=t.subarray(a,a+16),s=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,r);return x(this.counter),i.set(new Uint8Array(s),a+n.length),e(a+16)}return this.pendingInput=t.subarray(a),this.output=y(this.output,i),i};let n=new Uint8Array(0);this.password&&(n=await async function(t,e){const n=crypto.getRandomValues(new Uint8Array(u[t.strength]));return await p(t,e,n,["encrypt"]),y(n,t.keys.passwordVerification)}(this,this.password),this.password=null);let i=new Uint8Array(n.length+t.length-t.length%16);return i.set(n,0),this.pendingInput.length&&(t=y(this.pendingInput,t),i=g(i,t.length-t.length%16)),e()}async flush(){let t=new Uint8Array(0);if(this.pendingInput.length){const e=await h.encrypt(Object.assign({counter:this.counter},l),this.keys.key,this.pendingInput);t=new Uint8Array(e),this.output=y(this.output,t)}const e=await h.sign(i,this.keys.authentication,this.output.subarray(u[this.strength]+2));this.output=null;const n=new Uint8Array(e).subarray(0,10);return{data:y(t,n),signature:n}}}async function p(t,e,n,i){t.counter=new Uint8Array(c);const l=(new TextEncoder).encode(e),u=await h.importKey("raw",l,r,!1,d),w=await h.deriveBits(Object.assign({salt:n},s),u,8*(2*f[t.strength]+2)),b=new Uint8Array(w);t.keys={key:await h.importKey("raw",b.subarray(0,f[t.strength]),a,!0,i),authentication:await h.importKey("raw",b.subarray(f[t.strength],2*f[t.strength]),o,!1,_),passwordVerification:b.subarray(2*f[t.strength])}}function x(t){for(let e=0;e<16;e++){if(255!=t[e]){t[e]++;break}t[e]=0}}function y(t,e){let n=t;return t.length+e.length&&(n=new Uint8Array(t.length+e.length),n.set(t,0),n.set(e,t.length)),n}function g(t,e){if(e&&e>t.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class m{constructor(t,e){this.password=t,this.passwordVerification=e,U(this,t)}async append(t){if(this.password){const e=k(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return k(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class v{constructor(t,e){this.passwordVerification=e,this.password=t,U(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(A(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(A(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function k(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function E(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function C(t){return 4294967295&t}class z{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new m(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class j{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new b(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const M={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),V=function(t,e){return e.codecType.startsWith("deflate")?new j(t,e):e.codecType.startsWith("inflate")?new z(t,e):void 0}(n,e)},append:async t=>({data:await V.append(t.data)}),flush:()=>V.flush()};let V;function O(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=M[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const D=[0,1,2,3].concat(...O([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function K(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,o,l,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);l=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),o=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=o,i[2*l]=i[2*s]+i[2*o],n.depth[l]=Math.max(n.depth[s],n.depth[o])+1,i[2*s+1]=i[2*o+1]=l,n.heap[1]=l++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let o,l,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,o=e.heap_max+1;o<573;o++)l=e.heap[o],_=n[2*n[2*l+1]+1]+1,_>s&&(_=s,c++),n[2*l+1]=_,l>t.max_code||(e.bl_count[_]++,u=0,l>=r&&(u=a[l-r]),f=n[2*l],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*l+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2}while(c>0);for(_=s;0!==_;_--)for(l=e.bl_count[_];0!==l;)d=e.heap[--o],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),l--)}}(n),function(t,n,i){const a=[];let r,s,o,l=0;for(r=1;r<=15;r++)a[r]=l=l+i[r-1]<<1;for(s=0;s<=n;s++)o=t[2*s+1],0!==o&&(t[2*s]=e(a[o]++,o))}(i,t.max_code,n.bl_count)}}function R(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a}function T(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a}K._length_code=[0,1,2,3,4,5,6,7].concat(...O([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),K.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],K.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],K.d_code=function(t){return t<256?D[t]:D[256+(t>>>7)]},K.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],K.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],K.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],K.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],R.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],R.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],R.static_l_desc=new R(R.static_ltree,K.extra_lbits,257,286,15),R.static_d_desc=new R(R.static_dtree,K.extra_dbits,0,30,15),R.static_bl_desc=new R(null,K.extra_blbits,0,19,7);const B=[new T(0,0,0,0,0),new T(4,4,8,4,1),new T(4,5,16,8,1),new T(4,6,32,32,1),new T(4,4,16,16,2),new T(8,16,32,32,2),new T(8,16,128,128,2),new T(8,32,128,256,2),new T(32,128,258,1024,2),new T(32,258,258,4096,2)],L=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function P(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255)}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8)}function at(e,n){let i,a,r;if(t.pending_buf[F+2*H]=e>>>8&255,t.pending_buf[F+2*H+1]=255&e,t.pending_buf[q+H]=255&n,H++,0===e?j[2*n]++:(G++,e--,j[2*(K._length_code[n]+256+1)]++,M[2*K.d_code(e)]++),0==(8191&H)&&E>2){for(i=8*H,a=m-p,r=0;r<30;r++)i+=M[2*r]*(5+K.extra_dbits[r]);if(i>>>=3,G8?$(N):Q>0&&Z(255&N),N=0,Q=0}function ot(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(l.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function lt(e,n,i){let a,r,s=0;E>0?(O.build_tree(t),D.build_tree(t),s=function(){let e;for(Y(j,O.max_code),Y(M,D.max_code),T.build_tree(t),e=18;e>=3&&0===V[2*K.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?ot(e,n,i):r==a?(tt(2+(i?1:0),3),rt(R.static_ltree,R.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?p:-1,m-p,t),p=m,e.flush_pending()}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){l.set(l.subarray(r,r+r),0),v-=r,m-=r,p-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0}while(0!=--t);a+=r}if(0===e.avail_in)return;t=e.read_buf(l,m+k,a),k+=t,k>=3&&(f=255&l[m],f=(f<r-262?m-(r-262):0;let u=z;const f=o,c=m+258;let h=l[a+s-1],w=l[a+s];A>=C&&(i>>=2),u>k&&(u=k);do{if(e=t,l[e+s]==w&&l[e+s-1]==h&&l[e]==l[a]&&l[++e]==l[a+1]){a+=2,e++;do{}while(l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&l[++a]==l[++e]&&as){if(v=t,s=n,n>=u)break;h=l[a+s-1],w=l[a+s]}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,O.dyn_tree=j,O.stat_desc=R.static_l_desc,D.dyn_tree=M,D.stat_desc=R.static_d_desc,T.dyn_tree=V,T.stat_desc=R.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||a<9||a>15||n<0||n>9||p<0||p>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(B[E].func!=B[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=B[E].max_lazy,C=B[E].good_length,z=B[E].nice_length,U=B[E].max_chain),S=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),l.set(e.subarray(d,d+s),0),m=s,p=s,f=255&l[0],f=(f<4||h<0)return-2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=L[4],-2;if(0===d.avail_out)return d.msg=L[7],-5;var V;if(e=d,j=a,a=h,42==n&&(C=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),C|=z<<6,0!==m&&(C|=32),C+=31-C%31,n=113,Z((V=C)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=j&&4!=h)return e.msg=L[7],-5;if(666==n&&0!==e.avail_in)return d.msg=L[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,B[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=p+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-p>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=o&&(a(e.next_in_index),o=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,l),l+=t.length})),s}},this.flush=function(){let t,a,r=0,s=0;const o=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&o.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),o.forEach((function(t){a.set(t,r),r+=t.length})),a}}W.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new q,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],G=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],J=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],N=[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],Q=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],X=[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],Y=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function Z(){let t,e,n,i,a,r;function s(t,e,s,o,l,d,_,u,f,c,h){let w,b,p,x,y,g,m,v,k,A,U,I,E,S,C;A=0,y=s;do{n[t[e+A]]++,A++,y--}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,S=1<I+v;){if(x++,I+=v,C=p-I,C=C>v?v:C,(b=1<<(g=m-I))>w+1&&(b-=w+1,E=m,g1440)return-3;a[x]=U=c[0],c[0]+=C,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)}}function $(){const t=this;let e,n,i,a,r=0,s=0,o=0,l=0,d=0,_=0,u=0,f=0,c=0,h=0;function w(t,e,n,i,a,r,s,o){let l,d,_,u,f,c,h,w,b,p,x,y,g,m,v,k;h=o.next_in_index,w=o.avail_in,f=s.bitb,c=s.bitk,b=s.write,p=b>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)w--,f|=(255&o.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,p-=g,b>=m)v=b-m,b-v>0&&2>b-v?(s.window[b++]=s.window[v++],s.window[b++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),b),b+=2,v+=2,g-=2);else{v=b-m;do{v+=s.end}while(v<0);if(u=s.end-v,g>u){if(g-=u,b-v>0&&u>b-v)do{s.window[b++]=s.window[v++]}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),b),b+=u,v+=u,u=0;v=0}}if(b-v>0&&g>b-v)do{s.window[b++]=s.window[v++]}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),b),b+=g,v+=g,g=0;break}if(0!=(64&u))return o.msg="invalid distance code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3;l+=d[k+2],l+=f&F[u],k=3*(_+l),u=d[k]}break}if(0!=(64&u))return 0!=(32&u)?(g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,1):(o.msg="invalid literal/length code",g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,-3);if(l+=d[k+2],l+=f&F[u],k=3*(_+l),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--;break}}else f>>=d[k+1],c-=d[k+1],s.window[b++]=d[k+2],p--}while(p>=258&&w>=10);return g=o.avail_in-w,g=c>>3>3:g,w+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,o.avail_in=w,o.total_in+=h-o.next_in_index,o.next_in_index=h,s.write=b,0}t.init=function(t,r,s,o,l,d){e=0,u=t,f=r,i=s,c=o,a=l,h=d,n=null},t.proc=function(t,b,p){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,p=w(u,f,i,c,a,h,t,b),E=b.next_in_index,m=b.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){l=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,b.msg="invalid literal/length code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 2:for(x=d;I>=x,I-=x,o=f,n=a,s=h,e=3;case 3:for(x=o;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){o=g,s=y/3+n[y+2];break}return e=9,b.msg="invalid distance code",p=-3,t.bitb=U,t.bitk=I,b.avail_in=m,b.total_in+=E-b.next_in_index,b.next_in_index=E,t.write=v,t.inflate_flush(b,p);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,p=t.inflate_flush(b,p),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,w,b,p,x,y,g,m;for(p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y>>1){case 0:w>>>=3,b-=3,h=7&b,w>>>=h,b-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],Z.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),w>>>=3,b-=3,a=6;break;case 2:w>>>=3,b-=3,a=3;break;case 3:return w>>>=3,b-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;b<32;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>16&65535)!=(65535&w))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);r=65535&w,w=b=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(p,h),y),p+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;b<14;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,b-=14,o=0,a=4;case 4:for(;o<4+(s>>>10);){for(;b<3;){if(0===x)return n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);e=0,x--,w|=(255&t.read_byte(p++))<>>=3,b-=3}for(;o<19;)i[tt[o++]]=0;if(l[0]=7,h=c.inflate_trees_bits(i,l,d,f,t),0!=h)return-3==(e=h)&&(i=null,a=9),n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);o=0,a=5;case 5:for(;h=s,!(o>=258+(31&h)+(h>>5&31));){let r,_;for(h=l[0];b>>=h,b-=h,i[o++]=_;else{for(m=18==_?7:_-14,r=18==_?11:3;b>>=h,b-=h,r+=w&F[m],w>>>=m,b-=m,m=o,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_}while(0!=--r);o=m}}if(d[0]=-1,I=[],E=[],S=[],C=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,S,C,f,t),0!=h)return-3==h&&(i=null,a=9),e=h,n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,S[0],f,C[0]),a=6;case 6:if(n.bitb=w,n.bitk=b,t.avail_in=x,t.total_in+=p-t.next_in_index,t.next_in_index=p,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),p=t.next_in_index,x=t.avail_in,w=n.bitb,b=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new et(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const r=t.istate;return a>=1<0&&t.next_in_index!=l&&(a(t.next_in_index),l=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o=new Uint8Array(_),r.forEach((function(t){o.set(t,d),d+=t.length})),o}},this.flush=function(){t.inflateEnd()}}at.prototype={inflateInit:function(t){const e=this;return e.istate=new it,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=rt}}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));t({workerScripts:{inflate:[n],deflate:[n]}})}}; +import{configure as t}from"./core/configuration.js";export default()=>{if("function"==typeof URL.createObjectURL){const e=(()=>{const t=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)1&n?n=n>>>1^3988292384:n>>>=1;t[e]=n}class e{constructor(t){this.crc=t||-1}append(e){let n=0|this.crc;for(let i=0,a=0|e.length;i>>8^t[255&(n^e[i])];this.crc=n}get(){return~this.crc}}const n={concat(t,e){if(0===t.length||0===e.length)return t.concat(e);const i=t[t.length-1],a=n.getPartial(i);return 32===a?t.concat(e):n._shiftRight(e,a,0|i,t.slice(0,t.length-1))},bitLength(t){const e=t.length;if(0===e)return 0;const i=t[e-1];return 32*(e-1)+n.getPartial(i)},clamp(t,e){if(32*t.length0&&e&&(t[i-1]=n.partial(e,t[i-1]&2147483648>>e-1,1)),t},partial:(t,e,n)=>32===t?e:(n?0|e:e<<32-t)+1099511627776*t,getPartial:t=>Math.round(t/1099511627776)||32,_shiftRight(t,e,i,a){for(void 0===a&&(a=[]);e>=32;e-=32)a.push(i),i=0;if(0===e)return a.concat(t);for(let n=0;n>>e),i=t[n]<<32-e;const r=t.length?t[t.length-1]:0,s=n.getPartial(r);return a.push(n.partial(e+s&31,e+s>32?i:a.pop(),1)),a}},i={bytes:{fromBits(t){const e=n.bitLength(t)/8,i=new Uint8Array(e);let a;for(let n=0;n>>24,a<<=8;return i},toBits(t){const e=[];let i,a=0;for(i=0;i>>24]<<24^n[t>>16&255]<<16^n[t>>8&255]<<8^n[255&t],r%a==0&&(t=t<<8^t>>>24^o<<24,o=o<<1^283*(o>>7))),s[r]=s[r-a]^t}for(let t=0;r;t++,r--){const e=s[3&t?r:r-4];l[t]=r<=4||t<4?e:i[0][n[e>>>24]]^i[1][n[e>>16&255]]^i[2][n[e>>8&255]]^i[3][n[255&e]]}}encrypt(t){return this._crypt(t,0)}decrypt(t){return this._crypt(t,1)}_precompute(){const t=this._tables[0],e=this._tables[1],n=t[4],i=e[4],a=[],r=[];let s,l,o,d;for(let t=0;t<256;t++)r[(a[t]=t<<1^283*(t>>7))^t]=t;for(let _=s=0;!n[_];_^=l||1,s=r[s]||1){let r=s^s<<1^s<<2^s<<3^s<<4;r=r>>8^255&r^99,n[_]=r,i[r]=_,d=a[o=a[l=a[_]]];let u=16843009*d^65537*o^257*l^16843008*_,f=257*a[r]^16843008*r;for(let n=0;n<4;n++)t[n][_]=f=f<<24^f>>>8,e[n][r]=u=u<<24^u>>>8}for(let n=0;n<5;n++)t[n]=t[n].slice(0),e[n]=e[n].slice(0)}_crypt(t,e){if(4!==t.length)throw new Error("invalid aes block size");const n=this._key[e],i=n.length/4-2,a=[0,0,0,0],r=this._tables[e],s=r[0],l=r[1],o=r[2],d=r[3],_=r[4];let u,f,c,h=t[0]^n[0],b=t[e?3:1]^n[1],p=t[2]^n[2],w=t[e?1:3]^n[3],x=4;for(let t=0;t>>24]^l[b>>16&255]^o[p>>8&255]^d[255&w]^n[x],f=s[b>>>24]^l[p>>16&255]^o[w>>8&255]^d[255&h]^n[x+1],c=s[p>>>24]^l[w>>16&255]^o[h>>8&255]^d[255&b]^n[x+2],w=s[w>>>24]^l[h>>16&255]^o[b>>8&255]^d[255&p]^n[x+3],x+=4,h=u,b=f,p=c;for(let t=0;t<4;t++)a[e?3&-t:t]=_[h>>>24]<<24^_[b>>16&255]<<16^_[p>>8&255]<<8^_[255&w]^n[x++],u=h,h=b,b=p,p=w,w=u;return a}},r=class{constructor(t,e){this._prf=t,this._initIv=e,this._iv=e}reset(){this._iv=this._initIv}update(t){return this.calculate(this._prf,t,this._iv)}incWord(t){if(255==(t>>24&255)){let e=t>>16&255,n=t>>8&255,i=255&t;255===e?(e=0,255===n?(n=0,255===i?i=0:++i):++n):++e,t=0,t+=e<<16,t+=n<<8,t+=i}else t+=1<<24;return t}incCounter(t){0===(t[0]=this.incWord(t[0]))&&(t[1]=this.incWord(t[1]))}calculate(t,e,i){let a;if(!(a=e.length))return[];const r=n.bitLength(e);for(let n=0;nt.length){const n=t;(t=new Uint8Array(e)).set(n,0)}return t}class v{constructor(t,e){this.password=t,this.passwordVerification=e,I(this,t)}async append(t){if(this.password){const e=A(this,t.subarray(0,12));if(this.password=null,e[11]!=this.passwordVerification)throw new Error("Invalid pasword");t=t.subarray(12)}return A(this,t)}async flush(){return{valid:!0,data:new Uint8Array(0)}}}class k{constructor(t,e){this.passwordVerification=e,this.password=t,I(this,t)}async append(t){let e,n;if(this.password){this.password=null;const i=crypto.getRandomValues(new Uint8Array(12));i[11]=this.passwordVerification,e=new Uint8Array(t.length+i.length),e.set(U(this,i),0),n=12}else e=new Uint8Array(t.length),n=0;return e.set(U(this,t),n),e}async flush(){return{data:new Uint8Array(0)}}}function A(t,e){const n=new Uint8Array(e.length);for(let i=0;i>>24]),t.keys[2]=~t.crcKey2.get()}function C(t){const e=2|t.keys[2];return S(Math.imul(e,1^e)>>>8)}function S(t){return 255&t}function z(t){return 4294967295&t}class B{constructor(t,n){this.signature=n.signature,this.encrypted=Boolean(n.password),this.signed=n.signed,this.compressed=n.compressed,this.inflate=n.compressed&&new t,this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.decrypt=this.encrypted&&n.zipCrypto?new v(n.password,n.passwordVerification):new w(n.password,n.signed,n.encryptionStrength)}async append(t){return this.encrypted&&t.length&&(t=await this.decrypt.append(t)),this.compressed&&t.length&&(t=await this.inflate.append(t)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),t}async flush(){let t,e=new Uint8Array(0);if(this.encrypted){const t=await this.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");e=t.data}if((!this.encrypted||this.zipCrypto)&&this.signed){const e=new DataView(new Uint8Array(4).buffer);if(t=this.crc32.get(),e.setUint32(0,t),this.signature!=e.getUint32(0,!1))throw new Error("Invalid signature")}return this.compressed&&(e=await this.inflate.append(e)||new Uint8Array(0),await this.inflate.flush()),{data:e,signature:t}}}class M{constructor(t,n){this.encrypted=n.encrypted,this.signed=n.signed,this.compressed=n.compressed,this.deflate=n.compressed&&new t({level:n.level||5}),this.crc32=n.signed&&new e,this.zipCrypto=n.zipCrypto,this.encrypt=this.encrypted&&n.zipCrypto?new k(n.password,n.passwordVerification):new x(n.password,n.encryptionStrength)}async append(t){let e=t;return this.compressed&&t.length&&(e=await this.deflate.append(t)),this.encrypted&&e.length&&(e=await this.encrypt.append(e)),(!this.encrypted||this.zipCrypto)&&this.signed&&t.length&&this.crc32.append(t),e}async flush(){let t,e=new Uint8Array(0);if(this.compressed&&(e=await this.deflate.flush()||new Uint8Array(0)),this.encrypted){e=await this.encrypt.append(e);const n=await this.encrypt.flush();t=n.signature;const i=new Uint8Array(e.length+n.data.length);i.set(e,0),i.set(n.data,e.length),e=i}return this.encrypted&&!this.zipCrypto||!this.signed||(t=this.crc32.get()),{data:e,signature:t}}}const V={init(t){t.scripts&&t.scripts.length&&importScripts.apply(void 0,t.scripts);const e=t.options;let n;self.initCodec&&self.initCodec(),e.codecType.startsWith("deflate")?n=self.Deflate:e.codecType.startsWith("inflate")&&(n=self.Inflate),D=function(t,e){return e.codecType.startsWith("deflate")?new M(t,e):e.codecType.startsWith("inflate")?new B(t,e):void 0}(n,e)},append:async t=>({data:await D.append(t.data)}),flush:()=>D.flush()};let D;function K(t){return t.map((([t,e])=>new Array(t).fill(e,0,t))).flat()}addEventListener("message",(async t=>{const e=t.data,n=e.type,i=V[n];if(i)try{e.data&&(e.data=new Uint8Array(e.data));const t=await i(e)||{};if(t.type=n,t.data)try{t.data=t.data.buffer,postMessage(t,[t.data])}catch(e){postMessage(t)}else postMessage(t)}catch(t){postMessage({type:n,error:{message:t.message,stack:t.stack}})}}));const P=[0,1,2,3].concat(...K([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function j(){const t=this;function e(t,e){let n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}t.build_tree=function(n){const i=t.dyn_tree,a=t.stat_desc.static_tree,r=t.stat_desc.elems;let s,l,o,d=-1;for(n.heap_len=0,n.heap_max=573,s=0;s=1;s--)n.pqdownheap(i,s);o=r;do{s=n.heap[1],n.heap[1]=n.heap[n.heap_len--],n.pqdownheap(i,1),l=n.heap[1],n.heap[--n.heap_max]=s,n.heap[--n.heap_max]=l,i[2*o]=i[2*s]+i[2*l],n.depth[o]=Math.max(n.depth[s],n.depth[l])+1,i[2*s+1]=i[2*l+1]=o,n.heap[1]=o++,n.pqdownheap(i,1)}while(n.heap_len>=2);n.heap[--n.heap_max]=n.heap[1],function(e){const n=t.dyn_tree,i=t.stat_desc.static_tree,a=t.stat_desc.extra_bits,r=t.stat_desc.extra_base,s=t.stat_desc.max_length;let l,o,d,_,u,f,c=0;for(_=0;_<=15;_++)e.bl_count[_]=0;for(n[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)o=e.heap[l],_=n[2*n[2*o+1]+1]+1,_>s&&(_=s,c++),n[2*o+1]=_,o>t.max_code||(e.bl_count[_]++,u=0,o>=r&&(u=a[o-r]),f=n[2*o],e.opt_len+=f*(_+u),i&&(e.static_len+=f*(i[2*o+1]+u)));if(0!==c){do{for(_=s-1;0===e.bl_count[_];)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[s]--,c-=2}while(c>0);for(_=s;0!==_;_--)for(o=e.bl_count[_];0!==o;)d=e.heap[--l],d>t.max_code||(n[2*d+1]!=_&&(e.opt_len+=(_-n[2*d+1])*n[2*d],n[2*d+1]=_),o--)}}(n),function(t,n,i){const a=[];let r,s,l,o=0;for(r=1;r<=15;r++)a[r]=o=o+i[r-1]<<1;for(s=0;s<=n;s++)l=t[2*s+1],0!==l&&(t[2*s]=e(a[l]++,l))}(i,t.max_code,n.bl_count)}}function L(t,e,n,i,a){const r=this;r.static_tree=t,r.extra_bits=e,r.extra_base=n,r.elems=i,r.max_length=a}function R(t,e,n,i,a){const r=this;r.good_length=t,r.max_lazy=e,r.nice_length=n,r.max_chain=i,r.func=a}j._length_code=[0,1,2,3,4,5,6,7].concat(...K([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),j.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],j.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],j.d_code=function(t){return t<256?P[t]:P[256+(t>>>7)]},j.extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],j.extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],j.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],j.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],L.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],L.static_l_desc=new L(L.static_ltree,j.extra_lbits,257,286,15),L.static_d_desc=new L(L.static_dtree,j.extra_dbits,0,30,15),L.static_bl_desc=new L(null,j.extra_blbits,0,19,7);const W=[new R(0,0,0,0,0),new R(4,4,8,4,1),new R(4,5,16,8,1),new R(4,6,32,32,1),new R(4,4,16,16,2),new R(8,16,32,32,2),new R(8,16,128,128,2),new R(8,32,128,256,2),new R(32,128,258,1024,2),new R(32,258,258,4096,2)],G=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function O(t,e,n,i){const a=t[2*e],r=t[2*n];return a>>8&255)}function tt(t,e){let n;const i=e;Q>16-i?(n=t,N|=n<>>16-Q,Q+=i-16):(N|=t<=8&&(Z(255&N),N>>>=8,Q-=8)}function at(e,n){let i,a,r;if(t.pending_buf[H+2*q]=e>>>8&255,t.pending_buf[H+2*q+1]=255&e,t.pending_buf[R+q]=255&n,q++,0===e?B[2*n]++:(F++,e--,B[2*(j._length_code[n]+256+1)]++,M[2*j.d_code(e)]++),0==(8191&q)&&E>2){for(i=8*q,a=m-w,r=0;r<30;r++)i+=M[2*r]*(5+j.extra_dbits[r]);if(i>>>=3,F8?$(N):Q>0&&Z(255&N),N=0,Q=0}function lt(e,n,i){tt(0+(i?1:0),3),function(e,n,i){st(),J=8,$(n),$(~n),t.pending_buf.set(o.subarray(e,e+n),t.pending),t.pending+=n}(e,n)}function ot(e,n,i){let a,r,s=0;E>0?(D.build_tree(t),K.build_tree(t),s=function(){let e;for(Y(B,D.max_code),Y(M,K.max_code),P.build_tree(t),e=18;e>=3&&0===V[2*j.bl_order[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(),a=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=a&&(a=r)):a=r=n+5,n+4<=a&&-1!=e?lt(e,n,i):r==a?(tt(2+(i?1:0),3),rt(L.static_ltree,L.static_dtree)):(tt(4+(i?1:0),3),function(t,e,n){let i;for(tt(t-257,5),tt(e-1,5),tt(n-4,4),i=0;i=0?w:-1,m-w,t),w=m,e.flush_pending()}function _t(){let t,n,i,a;do{if(a=d-k-m,0===a&&0===m&&0===k)a=r;else if(-1==a)a--;else if(m>=r+r-262){o.set(o.subarray(r,r+r),0),v-=r,m-=r,w-=r,t=c,i=t;do{n=65535&u[--i],u[i]=n>=r?n-r:0}while(0!=--t);t=r,i=t;do{n=65535&_[--i],_[i]=n>=r?n-r:0}while(0!=--t);a+=r}if(0===e.avail_in)return;t=e.read_buf(o,m+k,a),k+=t,k>=3&&(f=255&o[m],f=(f<r-262?m-(r-262):0;let u=z;const f=l,c=m+258;let h=o[a+s-1],b=o[a+s];A>=S&&(i>>=2),u>k&&(u=k);do{if(e=t,o[e+s]==b&&o[e+s-1]==h&&o[e]==o[a]&&o[++e]==o[a+1]){a+=2,e++;do{}while(o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&o[++a]==o[++e]&&as){if(v=t,s=n,n>=u)break;h=o[a+s-1],b=o[a+s]}}}while((t=65535&_[t&f])>d&&0!=--i);return s<=k?s:k}function ft(e){return e.total_in=e.total_out=0,e.msg=null,t.pending=0,t.pending_out=0,n=113,a=0,D.dyn_tree=B,D.stat_desc=L.static_l_desc,K.dyn_tree=M,K.stat_desc=L.static_d_desc,P.dyn_tree=V,P.stat_desc=L.static_bl_desc,N=0,Q=0,J=8,X(),function(){d=2*r,u[c-1]=0;for(let t=0;t9||8!=d||a<9||a>15||n<0||n>9||w<0||w>2?-2:(e.dstate=t,s=a,r=1<9||n<0||n>2?-2:(W[E].func!=W[e].func&&0!==t.total_in&&(i=t.deflate(1)),E!=e&&(E=e,I=W[E].max_lazy,S=W[E].good_length,z=W[E].nice_length,U=W[E].max_chain),C=n,i)},t.deflateSetDictionary=function(t,e,i){let a,s=i,d=0;if(!e||42!=n)return-2;if(s<3)return 0;for(s>r-262&&(s=r-262,d=i-s),o.set(e.subarray(d,d+s),0),m=s,w=s,f=255&o[0],f=(f<4||h<0)return-2;if(!d.next_out||!d.next_in&&0!==d.avail_in||666==n&&4!=h)return d.msg=G[4],-2;if(0===d.avail_out)return d.msg=G[7],-5;var V;if(e=d,B=a,a=h,42==n&&(S=8+(s-8<<4)<<8,z=(E-1&255)>>1,z>3&&(z=3),S|=z<<6,0!==m&&(S|=32),S+=31-S%31,n=113,Z((V=S)>>8&255),Z(255&V)),0!==t.pending){if(e.flush_pending(),0===e.avail_out)return a=-1,0}else if(0===e.avail_in&&h<=B&&4!=h)return e.msg=G[7],-5;if(666==n&&0!==e.avail_in)return d.msg=G[7],-5;if(0!==e.avail_in||0!==k||0!=h&&666!=n){switch(M=-1,W[E].func){case 0:M=function(t){let n,a=65535;for(a>i-5&&(a=i-5);;){if(k<=1){if(_t(),0===k&&0==t)return 0;if(0===k)break}if(m+=k,k=0,n=w+a,(0===m||m>=n)&&(k=m-n,m=n,dt(!1),0===e.avail_out))return 0;if(m-w>=r-262&&(dt(!1),0===e.avail_out))return 0}return dt(4==t),0===e.avail_out?4==t?2:0:4==t?3:1}(h);break;case 1:M=function(t){let n,i=0;for(;;){if(k<262){if(_t(),k<262&&0==t)return 0;if(0===k)break}if(k>=3&&(f=(f<=3)if(n=at(m-v,x-3),k-=x,x<=I&&k>=3){x--;do{m++,f=(f<=3&&(f=(f<4096)&&(x=2)),A>=3&&x<=A){i=m+k-3,n=at(m-1-y,A-3),k-=A-1,A-=2;do{++m<=i&&(f=(f<0&&e.next_in_index!=l&&(a(e.next_in_index),l=e.next_in_index)}while(e.avail_in>0||0===e.avail_out);return s=new Uint8Array(d),_.forEach((function(t){s.set(t,o),o+=t.length})),s}},this.flush=function(){let t,a,r=0,s=0;const l=[];do{if(e.next_out_index=0,e.avail_out=n,t=e.deflate(4),1!=t&&0!=t)throw new Error("deflating: "+e.msg);n-e.avail_out>0&&l.push(new Uint8Array(i.subarray(0,e.next_out_index))),s+=e.next_out_index}while(e.avail_in>0||0===e.avail_out);return e.deflateEnd(),a=new Uint8Array(s),l.forEach((function(t){a.set(t,r),r+=t.length})),a}}q.prototype={deflateInit:function(t,e){const n=this;return n.dstate=new T,e||(e=15),n.dstate.deflateInit(n,t,e)},deflate:function(t){const e=this;return e.dstate?e.dstate.deflate(e,t):-2},deflateEnd:function(){const t=this;if(!t.dstate)return-2;const e=t.dstate.deflateEnd();return t.dstate=null,e},deflateParams:function(t,e){const n=this;return n.dstate?n.dstate.deflateParams(n,t,e):-2},deflateSetDictionary:function(t,e){const n=this;return n.dstate?n.dstate.deflateSetDictionary(n,t,e):-2},read_buf:function(t,e,n){const i=this;let a=i.avail_in;return a>n&&(a=n),0===a?0:(i.avail_in-=a,t.set(i.next_in.subarray(i.next_in_index,i.next_in_index+a),e),i.next_in_index+=a,i.total_in+=a,a)},flush_pending:function(){const t=this;let e=t.dstate.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.next_out.set(t.dstate.pending_buf.subarray(t.dstate.pending_out,t.dstate.pending_out+e),t.next_out_index),t.next_out_index+=e,t.dstate.pending_out+=e,t.total_out+=e,t.avail_out-=e,t.dstate.pending-=e,0===t.dstate.pending&&(t.dstate.pending_out=0))}};const F=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],J=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],N=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],Q=[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],X=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,112,112],Y=[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],Z=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];function $(){let t,e,n,i,a,r;function s(t,e,s,l,o,d,_,u,f,c,h){let b,p,w,x,y,g,m,v,k,A,U,I,E,C,S;A=0,y=s;do{n[t[e+A]]++,A++,y--}while(0!==y);if(n[0]==s)return _[0]=-1,u[0]=0,0;for(v=u[0],g=1;g<=15&&0===n[g];g++);for(m=g,vy&&(v=y),u[0]=v,C=1<I+v;){if(x++,I+=v,S=w-I,S=S>v?v:S,(p=1<<(g=m-I))>b+1&&(p-=b+1,E=m,g1440)return-3;a[x]=U=c[0],c[0]+=S,0!==x?(r[x]=y,i[0]=g,i[1]=v,g=y>>>I-v,i[2]=U-a[x-1]-g,f.set(i,3*(a[x-1]+g))):_[0]=U}for(i[1]=m-I,A>=s?i[0]=192:h[A]>>I;g>>=1)y^=g;for(y^=g,k=(1<257?(-3==c?f.msg="oversubscribed distance tree":-5==c?(f.msg="incomplete distance tree",c=-3):-4!=c&&(f.msg="empty distance tree with lengths",c=-3),c):0)}}function tt(){const t=this;let e,n,i,a,r=0,s=0,l=0,o=0,d=0,_=0,u=0,f=0,c=0,h=0;function b(t,e,n,i,a,r,s,l){let o,d,_,u,f,c,h,b,p,w,x,y,g,m,v,k;h=l.next_in_index,b=l.avail_in,f=s.bitb,c=s.bitk,p=s.write,w=p>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15,g=d[k+2]+(f&F[u]),f>>=u,c-=u;c<15;)b--,f|=(255&l.read_byte(h++))<>=d[k+1],c-=d[k+1],0!=(16&u)){for(u&=15;c>=u,c-=u,w-=g,p>=m)v=p-m,p-v>0&&2>p-v?(s.window[p++]=s.window[v++],s.window[p++]=s.window[v++],g-=2):(s.window.set(s.window.subarray(v,v+2),p),p+=2,v+=2,g-=2);else{v=p-m;do{v+=s.end}while(v<0);if(u=s.end-v,g>u){if(g-=u,p-v>0&&u>p-v)do{s.window[p++]=s.window[v++]}while(0!=--u);else s.window.set(s.window.subarray(v,v+u),p),p+=u,v+=u,u=0;v=0}}if(p-v>0&&g>p-v)do{s.window[p++]=s.window[v++]}while(0!=--g);else s.window.set(s.window.subarray(v,v+g),p),p+=g,v+=g,g=0;break}if(0!=(64&u))return l.msg="invalid distance code",g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3;o+=d[k+2],o+=f&F[u],k=3*(_+o),u=d[k]}break}if(0!=(64&u))return 0!=(32&u)?(g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,1):(l.msg="invalid literal/length code",g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,-3);if(o+=d[k+2],o+=f&F[u],k=3*(_+o),0===(u=d[k])){f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--;break}}else f>>=d[k+1],c-=d[k+1],s.window[p++]=d[k+2],w--}while(w>=258&&b>=10);return g=l.avail_in-b,g=c>>3>3:g,b+=g,h-=g,c-=g<<3,s.bitb=f,s.bitk=c,l.avail_in=b,l.total_in+=h-l.next_in_index,l.next_in_index=h,s.write=p,0}t.init=function(t,r,s,l,o,d){e=0,u=t,f=r,i=s,c=l,a=o,h=d,n=null},t.proc=function(t,p,w){let x,y,g,m,v,k,A,U=0,I=0,E=0;for(E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v=258&&m>=10&&(t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,w=b(u,f,i,c,a,h,t,p),E=p.next_in_index,m=p.avail_in,U=t.bitb,I=t.bitk,v=t.write,k=v>>=n[y+1],I-=n[y+1],g=n[y],0===g){o=n[y+2],e=6;break}if(0!=(16&g)){d=15&g,r=n[y+2],e=2;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}if(0!=(32&g)){e=7;break}return e=9,p.msg="invalid literal/length code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 2:for(x=d;I>=x,I-=x,l=f,n=a,s=h,e=3;case 3:for(x=l;I>=n[y+1],I-=n[y+1],g=n[y],0!=(16&g)){d=15&g,_=n[y+2],e=4;break}if(0==(64&g)){l=g,s=y/3+n[y+2];break}return e=9,p.msg="invalid distance code",w=-3,t.bitb=U,t.bitk=I,p.avail_in=m,p.total_in+=E-p.next_in_index,p.next_in_index=E,t.write=v,t.inflate_flush(p,w);case 4:for(x=d;I>=x,I-=x,e=5;case 5:for(A=v-_;A<0;)A+=t.end;for(;0!==r;){if(0===k&&(v==t.end&&0!==t.read&&(v=0,k=v7&&(I-=8,m++,E--),t.write=v,w=t.inflate_flush(p,w),v=t.write,k=vt.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i,r==n.end&&(r=0,n.write==n.end&&(n.write=0),i=n.write-r,i>t.avail_out&&(i=t.avail_out),0!==i&&-5==e&&(e=0),t.avail_out-=i,t.total_out+=i,t.next_out.set(n.window.subarray(r,r+i),a),a+=i,r+=i),t.next_out_index=a,n.read=r,e},n.proc=function(t,e){let h,b,p,w,x,y,g,m;for(w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y>>1){case 0:b>>>=3,p-=3,h=7&p,b>>>=h,p-=h,a=1;break;case 1:v=[],k=[],A=[[]],U=[[]],$.inflate_trees_fixed(v,k,A,U),_.init(v[0],k[0],A[0],0,U[0],0),b>>>=3,p-=3,a=6;break;case 2:b>>>=3,p-=3,a=3;break;case 3:return b>>>=3,p-=3,a=9,t.msg="invalid block type",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e)}break;case 1:for(;p<32;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<>>16&65535)!=(65535&b))return a=9,t.msg="invalid stored block lengths",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);r=65535&b,b=p=0,a=0!==r?2:0!==u?7:0;break;case 2:if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(0===g&&(y==n.end&&0!==n.read&&(y=0,g=yx&&(h=x),h>g&&(h=g),n.window.set(t.read_buf(w,h),y),w+=h,x-=h,y+=h,g-=h,0!=(r-=h))break;a=0!==u?7:0;break;case 3:for(;p<14;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<29||(h>>5&31)>29)return a=9,t.msg="too many length or distance symbols",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);if(h=258+(31&h)+(h>>5&31),!i||i.length>>=14,p-=14,l=0,a=4;case 4:for(;l<4+(s>>>10);){for(;p<3;){if(0===x)return n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);e=0,x--,b|=(255&t.read_byte(w++))<>>=3,p-=3}for(;l<19;)i[et[l++]]=0;if(o[0]=7,h=c.inflate_trees_bits(i,o,d,f,t),0!=h)return-3==(e=h)&&(i=null,a=9),n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);l=0,a=5;case 5:for(;h=s,!(l>=258+(31&h)+(h>>5&31));){let r,_;for(h=o[0];p>>=h,p-=h,i[l++]=_;else{for(m=18==_?7:_-14,r=18==_?11:3;p>>=h,p-=h,r+=b&F[m],b>>>=m,p-=m,m=l,h=s,m+r>258+(31&h)+(h>>5&31)||16==_&&m<1)return i=null,a=9,t.msg="invalid bit length repeat",e=-3,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_=16==_?i[m-1]:0;do{i[m++]=_}while(0!=--r);l=m}}if(d[0]=-1,I=[],E=[],C=[],S=[],I[0]=9,E[0]=6,h=s,h=c.inflate_trees_dynamic(257+(31&h),1+(h>>5&31),i,I,E,C,S,f,t),0!=h)return-3==h&&(i=null,a=9),e=h,n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,n.inflate_flush(t,e);_.init(I[0],E[0],f,C[0],f,S[0]),a=6;case 6:if(n.bitb=b,n.bitk=p,t.avail_in=x,t.total_in+=w-t.next_in_index,t.next_in_index=w,n.write=y,1!=(e=_.proc(n,t,e)))return n.inflate_flush(t,e);if(e=0,_.free(t),w=t.next_in_index,x=t.avail_in,b=n.bitb,p=n.bitk,y=n.write,g=y15?(t.inflateEnd(n),-2):(t.wbits=i,n.istate.blocks=new nt(n,1<>4)>a.wbits){a.mode=13,t.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===t.avail_in)return n;if(n=e,t.avail_in--,t.total_in++,i=255&t.read_byte(t.next_in_index++),((a.method<<8)+i)%31!=0){a.mode=13,t.msg="incorrect header check",a.marker=5;break}if(0==(32&i)){a.mode=7;break}a.mode=2;case 2:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need=(255&t.read_byte(t.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===t.avail_in)return n;n=e,t.avail_in--,t.total_in++,a.need+=(255&t.read_byte(t.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===t.avail_in?n:(n=e,t.avail_in--,t.total_in++,a.need+=255&t.read_byte(t.next_in_index++),a.mode=6,2);case 6:return a.mode=13,t.msg="need dictionary",a.marker=0,-2;case 7:if(n=a.blocks.proc(t,n),-3==n){a.mode=13,a.marker=0;break}if(0==n&&(n=e),1!=n)return n;n=e,a.blocks.reset(t,a.was),a.mode=12;case 12:return 1;case 13:return-3;default:return-2}},t.inflateSetDictionary=function(t,e,n){let i=0,a=n;if(!t||!t.istate||6!=t.istate.mode)return-2;const r=t.istate;return a>=1<0&&t.next_in_index!=o&&(a(t.next_in_index),o=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return l=new Uint8Array(_),r.forEach((function(t){l.set(t,d),d+=t.length})),l}},this.flush=function(){t.inflateEnd()}}rt.prototype={inflateInit:function(t){const e=this;return e.istate=new at,t||(t=15),e.istate.inflateInit(e,t)},inflate:function(t){const e=this;return e.istate?e.istate.inflate(e,t):-2},inflateEnd:function(){const t=this;if(!t.istate)return-2;const e=t.istate.inflateEnd(t);return t.istate=null,e},inflateSync:function(){const t=this;return t.istate?t.istate.inflateSync(t):-2},inflateSetDictionary:function(t,e){const n=this;return n.istate?n.istate.inflateSetDictionary(n,t,e):-2},read_byte:function(t){return this.next_in.subarray(t,t+1)[0]},read_buf:function(t,e){return this.next_in.subarray(t,t+e)}},self.initCodec=()=>{self.Deflate=H,self.Inflate=st}}).toString(),n=URL.createObjectURL(new Blob(["("+e+")()"],{type:"text/javascript"}));t({workerScripts:{inflate:[n],deflate:[n]}})}}; diff --git a/package.json b/package.json index 8beb7473..b8d88c3d 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "A JavaScript library to zip and unzip files in the browser", "author": "Gildas Lormeau", "license": "BSD-3-Clause", - "version": "2.2.21", + "version": "2.2.22", "type": "module", "keywords": [ "zip",