@expofp/loader 1.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/downloadZip-DwDnK9eb.js +2325 -0
- package/dist/downloadZip-DwDnK9eb.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +503 -0
- package/dist/index.js.map +1 -0
- package/dist/loadAndWait.d.ts +13 -0
- package/dist/makeOffline-bamiAsgC.js +155 -0
- package/dist/makeOffline-bamiAsgC.js.map +1 -0
- package/dist/makeOfflineBundle-CDWAdTIW.js +58 -0
- package/dist/makeOfflineBundle-CDWAdTIW.js.map +1 -0
- package/dist/offline/downloadZip copy.d.ts +1 -0
- package/dist/offline/downloadZip.d.ts +1 -0
- package/dist/offline/hashString.d.ts +1 -0
- package/dist/offline/index.d.ts +5 -0
- package/dist/offline/makeOffline.d.ts +3 -0
- package/dist/offline/makeOfflineBundle copy.d.ts +1 -0
- package/dist/offline/makeOfflineBundle.d.ts +4 -0
- package/dist/offline/slugify.d.ts +1 -0
- package/dist/offline/tools.d.ts +2 -0
- package/dist/resolve.d.ts +21 -0
- package/dist/resolvers/_OLD_expoResolver.d.ts +1 -0
- package/dist/resolvers/assetResolver.d.ts +6 -0
- package/dist/resolvers/bundleAssetsResolver.d.ts +2 -0
- package/dist/resolvers/expoRuntimeBranchResolver.d.ts +2 -0
- package/dist/resolvers/expoRuntimeGetBranchResolver.d.ts +2 -0
- package/dist/resolvers/expoRuntimeResolver.d.ts +2 -0
- package/dist/resolvers/httpResolver.d.ts +5 -0
- package/dist/resolvers/index.d.ts +2 -0
- package/dist/resolvers/legacyDataResolver.d.ts +5 -0
- package/dist/shared.d.ts +7 -0
- package/dist/types.d.ts +20 -0
- package/package.json +43 -0
|
@@ -0,0 +1,2325 @@
|
|
|
1
|
+
import { makeOfflineBundle as Ot } from "./makeOfflineBundle-CDWAdTIW.js";
|
|
2
|
+
var vt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
|
+
function Bt(ht) {
|
|
4
|
+
return ht && ht.__esModule && Object.prototype.hasOwnProperty.call(ht, "default") ? ht.default : ht;
|
|
5
|
+
}
|
|
6
|
+
function yt(ht) {
|
|
7
|
+
throw new Error('Could not dynamically require "' + ht + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
8
|
+
}
|
|
9
|
+
var xt = { exports: {} };
|
|
10
|
+
var Ct;
|
|
11
|
+
function Rt() {
|
|
12
|
+
return Ct || (Ct = 1, (function(ht, wt) {
|
|
13
|
+
(function(b) {
|
|
14
|
+
ht.exports = b();
|
|
15
|
+
})(function() {
|
|
16
|
+
return (function b(U, w, l) {
|
|
17
|
+
function o(_, y) {
|
|
18
|
+
if (!w[_]) {
|
|
19
|
+
if (!U[_]) {
|
|
20
|
+
var p = typeof yt == "function" && yt;
|
|
21
|
+
if (!y && p) return p(_, !0);
|
|
22
|
+
if (n) return n(_, !0);
|
|
23
|
+
var g = new Error("Cannot find module '" + _ + "'");
|
|
24
|
+
throw g.code = "MODULE_NOT_FOUND", g;
|
|
25
|
+
}
|
|
26
|
+
var i = w[_] = { exports: {} };
|
|
27
|
+
U[_][0].call(i.exports, function(d) {
|
|
28
|
+
var r = U[_][1][d];
|
|
29
|
+
return o(r || d);
|
|
30
|
+
}, i, i.exports, b, U, w, l);
|
|
31
|
+
}
|
|
32
|
+
return w[_].exports;
|
|
33
|
+
}
|
|
34
|
+
for (var n = typeof yt == "function" && yt, u = 0; u < l.length; u++) o(l[u]);
|
|
35
|
+
return o;
|
|
36
|
+
})({ 1: [function(b, U, w) {
|
|
37
|
+
var l = b("./utils"), o = b("./support"), n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
38
|
+
w.encode = function(u) {
|
|
39
|
+
for (var _, y, p, g, i, d, r, h = [], a = 0, c = u.length, v = c, S = l.getTypeOf(u) !== "string"; a < u.length; ) v = c - a, p = S ? (_ = u[a++], y = a < c ? u[a++] : 0, a < c ? u[a++] : 0) : (_ = u.charCodeAt(a++), y = a < c ? u.charCodeAt(a++) : 0, a < c ? u.charCodeAt(a++) : 0), g = _ >> 2, i = (3 & _) << 4 | y >> 4, d = 1 < v ? (15 & y) << 2 | p >> 6 : 64, r = 2 < v ? 63 & p : 64, h.push(n.charAt(g) + n.charAt(i) + n.charAt(d) + n.charAt(r));
|
|
40
|
+
return h.join("");
|
|
41
|
+
}, w.decode = function(u) {
|
|
42
|
+
var _, y, p, g, i, d, r = 0, h = 0, a = "data:";
|
|
43
|
+
if (u.substr(0, a.length) === a) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
44
|
+
var c, v = 3 * (u = u.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
45
|
+
if (u.charAt(u.length - 1) === n.charAt(64) && v--, u.charAt(u.length - 2) === n.charAt(64) && v--, v % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
46
|
+
for (c = o.uint8array ? new Uint8Array(0 | v) : new Array(0 | v); r < u.length; ) _ = n.indexOf(u.charAt(r++)) << 2 | (g = n.indexOf(u.charAt(r++))) >> 4, y = (15 & g) << 4 | (i = n.indexOf(u.charAt(r++))) >> 2, p = (3 & i) << 6 | (d = n.indexOf(u.charAt(r++))), c[h++] = _, i !== 64 && (c[h++] = y), d !== 64 && (c[h++] = p);
|
|
47
|
+
return c;
|
|
48
|
+
};
|
|
49
|
+
}, { "./support": 30, "./utils": 32 }], 2: [function(b, U, w) {
|
|
50
|
+
var l = b("./external"), o = b("./stream/DataWorker"), n = b("./stream/Crc32Probe"), u = b("./stream/DataLengthProbe");
|
|
51
|
+
function _(y, p, g, i, d) {
|
|
52
|
+
this.compressedSize = y, this.uncompressedSize = p, this.crc32 = g, this.compression = i, this.compressedContent = d;
|
|
53
|
+
}
|
|
54
|
+
_.prototype = { getContentWorker: function() {
|
|
55
|
+
var y = new o(l.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")), p = this;
|
|
56
|
+
return y.on("end", function() {
|
|
57
|
+
if (this.streamInfo.data_length !== p.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
|
|
58
|
+
}), y;
|
|
59
|
+
}, getCompressedWorker: function() {
|
|
60
|
+
return new o(l.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
61
|
+
} }, _.createWorkerFrom = function(y, p, g) {
|
|
62
|
+
return y.pipe(new n()).pipe(new u("uncompressedSize")).pipe(p.compressWorker(g)).pipe(new u("compressedSize")).withStreamInfo("compression", p);
|
|
63
|
+
}, U.exports = _;
|
|
64
|
+
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(b, U, w) {
|
|
65
|
+
var l = b("./stream/GenericWorker");
|
|
66
|
+
w.STORE = { magic: "\0\0", compressWorker: function() {
|
|
67
|
+
return new l("STORE compression");
|
|
68
|
+
}, uncompressWorker: function() {
|
|
69
|
+
return new l("STORE decompression");
|
|
70
|
+
} }, w.DEFLATE = b("./flate");
|
|
71
|
+
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(b, U, w) {
|
|
72
|
+
var l = b("./utils"), o = (function() {
|
|
73
|
+
for (var n, u = [], _ = 0; _ < 256; _++) {
|
|
74
|
+
n = _;
|
|
75
|
+
for (var y = 0; y < 8; y++) n = 1 & n ? 3988292384 ^ n >>> 1 : n >>> 1;
|
|
76
|
+
u[_] = n;
|
|
77
|
+
}
|
|
78
|
+
return u;
|
|
79
|
+
})();
|
|
80
|
+
U.exports = function(n, u) {
|
|
81
|
+
return n !== void 0 && n.length ? l.getTypeOf(n) !== "string" ? (function(_, y, p, g) {
|
|
82
|
+
var i = o, d = g + p;
|
|
83
|
+
_ ^= -1;
|
|
84
|
+
for (var r = g; r < d; r++) _ = _ >>> 8 ^ i[255 & (_ ^ y[r])];
|
|
85
|
+
return -1 ^ _;
|
|
86
|
+
})(0 | u, n, n.length, 0) : (function(_, y, p, g) {
|
|
87
|
+
var i = o, d = g + p;
|
|
88
|
+
_ ^= -1;
|
|
89
|
+
for (var r = g; r < d; r++) _ = _ >>> 8 ^ i[255 & (_ ^ y.charCodeAt(r))];
|
|
90
|
+
return -1 ^ _;
|
|
91
|
+
})(0 | u, n, n.length, 0) : 0;
|
|
92
|
+
};
|
|
93
|
+
}, { "./utils": 32 }], 5: [function(b, U, w) {
|
|
94
|
+
w.base64 = !1, w.binary = !1, w.dir = !1, w.createFolders = !0, w.date = null, w.compression = null, w.compressionOptions = null, w.comment = null, w.unixPermissions = null, w.dosPermissions = null;
|
|
95
|
+
}, {}], 6: [function(b, U, w) {
|
|
96
|
+
var l = null;
|
|
97
|
+
l = typeof Promise < "u" ? Promise : b("lie"), U.exports = { Promise: l };
|
|
98
|
+
}, { lie: 37 }], 7: [function(b, U, w) {
|
|
99
|
+
var l = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", o = b("pako"), n = b("./utils"), u = b("./stream/GenericWorker"), _ = l ? "uint8array" : "array";
|
|
100
|
+
function y(p, g) {
|
|
101
|
+
u.call(this, "FlateWorker/" + p), this._pako = null, this._pakoAction = p, this._pakoOptions = g, this.meta = {};
|
|
102
|
+
}
|
|
103
|
+
w.magic = "\b\0", n.inherits(y, u), y.prototype.processChunk = function(p) {
|
|
104
|
+
this.meta = p.meta, this._pako === null && this._createPako(), this._pako.push(n.transformTo(_, p.data), !1);
|
|
105
|
+
}, y.prototype.flush = function() {
|
|
106
|
+
u.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
|
|
107
|
+
}, y.prototype.cleanUp = function() {
|
|
108
|
+
u.prototype.cleanUp.call(this), this._pako = null;
|
|
109
|
+
}, y.prototype._createPako = function() {
|
|
110
|
+
this._pako = new o[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
|
|
111
|
+
var p = this;
|
|
112
|
+
this._pako.onData = function(g) {
|
|
113
|
+
p.push({ data: g, meta: p.meta });
|
|
114
|
+
};
|
|
115
|
+
}, w.compressWorker = function(p) {
|
|
116
|
+
return new y("Deflate", p);
|
|
117
|
+
}, w.uncompressWorker = function() {
|
|
118
|
+
return new y("Inflate", {});
|
|
119
|
+
};
|
|
120
|
+
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(b, U, w) {
|
|
121
|
+
function l(i, d) {
|
|
122
|
+
var r, h = "";
|
|
123
|
+
for (r = 0; r < d; r++) h += String.fromCharCode(255 & i), i >>>= 8;
|
|
124
|
+
return h;
|
|
125
|
+
}
|
|
126
|
+
function o(i, d, r, h, a, c) {
|
|
127
|
+
var v, S, x = i.file, D = i.compression, O = c !== _.utf8encode, L = n.transformTo("string", c(x.name)), I = n.transformTo("string", _.utf8encode(x.name)), W = x.comment, q = n.transformTo("string", c(W)), m = n.transformTo("string", _.utf8encode(W)), B = I.length !== x.name.length, e = m.length !== W.length, T = "", J = "", P = "", $ = x.dir, j = x.date, V = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
128
|
+
d && !r || (V.crc32 = i.crc32, V.compressedSize = i.compressedSize, V.uncompressedSize = i.uncompressedSize);
|
|
129
|
+
var E = 0;
|
|
130
|
+
d && (E |= 8), O || !B && !e || (E |= 2048);
|
|
131
|
+
var C = 0, X = 0;
|
|
132
|
+
$ && (C |= 16), a === "UNIX" ? (X = 798, C |= (function(H, nt) {
|
|
133
|
+
var ot = H;
|
|
134
|
+
return H || (ot = nt ? 16893 : 33204), (65535 & ot) << 16;
|
|
135
|
+
})(x.unixPermissions, $)) : (X = 20, C |= (function(H) {
|
|
136
|
+
return 63 & (H || 0);
|
|
137
|
+
})(x.dosPermissions)), v = j.getUTCHours(), v <<= 6, v |= j.getUTCMinutes(), v <<= 5, v |= j.getUTCSeconds() / 2, S = j.getUTCFullYear() - 1980, S <<= 4, S |= j.getUTCMonth() + 1, S <<= 5, S |= j.getUTCDate(), B && (J = l(1, 1) + l(y(L), 4) + I, T += "up" + l(J.length, 2) + J), e && (P = l(1, 1) + l(y(q), 4) + m, T += "uc" + l(P.length, 2) + P);
|
|
138
|
+
var G = "";
|
|
139
|
+
return G += `
|
|
140
|
+
\0`, G += l(E, 2), G += D.magic, G += l(v, 2), G += l(S, 2), G += l(V.crc32, 4), G += l(V.compressedSize, 4), G += l(V.uncompressedSize, 4), G += l(L.length, 2), G += l(T.length, 2), { fileRecord: p.LOCAL_FILE_HEADER + G + L + T, dirRecord: p.CENTRAL_FILE_HEADER + l(X, 2) + G + l(q.length, 2) + "\0\0\0\0" + l(C, 4) + l(h, 4) + L + T + q };
|
|
141
|
+
}
|
|
142
|
+
var n = b("../utils"), u = b("../stream/GenericWorker"), _ = b("../utf8"), y = b("../crc32"), p = b("../signature");
|
|
143
|
+
function g(i, d, r, h) {
|
|
144
|
+
u.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = d, this.zipPlatform = r, this.encodeFileName = h, this.streamFiles = i, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
145
|
+
}
|
|
146
|
+
n.inherits(g, u), g.prototype.push = function(i) {
|
|
147
|
+
var d = i.meta.percent || 0, r = this.entriesCount, h = this._sources.length;
|
|
148
|
+
this.accumulate ? this.contentBuffer.push(i) : (this.bytesWritten += i.data.length, u.prototype.push.call(this, { data: i.data, meta: { currentFile: this.currentFile, percent: r ? (d + 100 * (r - h - 1)) / r : 100 } }));
|
|
149
|
+
}, g.prototype.openedSource = function(i) {
|
|
150
|
+
this.currentSourceOffset = this.bytesWritten, this.currentFile = i.file.name;
|
|
151
|
+
var d = this.streamFiles && !i.file.dir;
|
|
152
|
+
if (d) {
|
|
153
|
+
var r = o(i, d, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
154
|
+
this.push({ data: r.fileRecord, meta: { percent: 0 } });
|
|
155
|
+
} else this.accumulate = !0;
|
|
156
|
+
}, g.prototype.closedSource = function(i) {
|
|
157
|
+
this.accumulate = !1;
|
|
158
|
+
var d = this.streamFiles && !i.file.dir, r = o(i, d, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
159
|
+
if (this.dirRecords.push(r.dirRecord), d) this.push({ data: (function(h) {
|
|
160
|
+
return p.DATA_DESCRIPTOR + l(h.crc32, 4) + l(h.compressedSize, 4) + l(h.uncompressedSize, 4);
|
|
161
|
+
})(i), meta: { percent: 100 } });
|
|
162
|
+
else for (this.push({ data: r.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift());
|
|
163
|
+
this.currentFile = null;
|
|
164
|
+
}, g.prototype.flush = function() {
|
|
165
|
+
for (var i = this.bytesWritten, d = 0; d < this.dirRecords.length; d++) this.push({ data: this.dirRecords[d], meta: { percent: 100 } });
|
|
166
|
+
var r = this.bytesWritten - i, h = (function(a, c, v, S, x) {
|
|
167
|
+
var D = n.transformTo("string", x(S));
|
|
168
|
+
return p.CENTRAL_DIRECTORY_END + "\0\0\0\0" + l(a, 2) + l(a, 2) + l(c, 4) + l(v, 4) + l(D.length, 2) + D;
|
|
169
|
+
})(this.dirRecords.length, r, i, this.zipComment, this.encodeFileName);
|
|
170
|
+
this.push({ data: h, meta: { percent: 100 } });
|
|
171
|
+
}, g.prototype.prepareNextSource = function() {
|
|
172
|
+
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
|
|
173
|
+
}, g.prototype.registerPrevious = function(i) {
|
|
174
|
+
this._sources.push(i);
|
|
175
|
+
var d = this;
|
|
176
|
+
return i.on("data", function(r) {
|
|
177
|
+
d.processChunk(r);
|
|
178
|
+
}), i.on("end", function() {
|
|
179
|
+
d.closedSource(d.previous.streamInfo), d._sources.length ? d.prepareNextSource() : d.end();
|
|
180
|
+
}), i.on("error", function(r) {
|
|
181
|
+
d.error(r);
|
|
182
|
+
}), this;
|
|
183
|
+
}, g.prototype.resume = function() {
|
|
184
|
+
return !!u.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
|
|
185
|
+
}, g.prototype.error = function(i) {
|
|
186
|
+
var d = this._sources;
|
|
187
|
+
if (!u.prototype.error.call(this, i)) return !1;
|
|
188
|
+
for (var r = 0; r < d.length; r++) try {
|
|
189
|
+
d[r].error(i);
|
|
190
|
+
} catch {
|
|
191
|
+
}
|
|
192
|
+
return !0;
|
|
193
|
+
}, g.prototype.lock = function() {
|
|
194
|
+
u.prototype.lock.call(this);
|
|
195
|
+
for (var i = this._sources, d = 0; d < i.length; d++) i[d].lock();
|
|
196
|
+
}, U.exports = g;
|
|
197
|
+
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(b, U, w) {
|
|
198
|
+
var l = b("../compressions"), o = b("./ZipFileWorker");
|
|
199
|
+
w.generateWorker = function(n, u, _) {
|
|
200
|
+
var y = new o(u.streamFiles, _, u.platform, u.encodeFileName), p = 0;
|
|
201
|
+
try {
|
|
202
|
+
n.forEach(function(g, i) {
|
|
203
|
+
p++;
|
|
204
|
+
var d = (function(c, v) {
|
|
205
|
+
var S = c || v, x = l[S];
|
|
206
|
+
if (!x) throw new Error(S + " is not a valid compression method !");
|
|
207
|
+
return x;
|
|
208
|
+
})(i.options.compression, u.compression), r = i.options.compressionOptions || u.compressionOptions || {}, h = i.dir, a = i.date;
|
|
209
|
+
i._compressWorker(d, r).withStreamInfo("file", { name: g, dir: h, date: a, comment: i.comment || "", unixPermissions: i.unixPermissions, dosPermissions: i.dosPermissions }).pipe(y);
|
|
210
|
+
}), y.entriesCount = p;
|
|
211
|
+
} catch (g) {
|
|
212
|
+
y.error(g);
|
|
213
|
+
}
|
|
214
|
+
return y;
|
|
215
|
+
};
|
|
216
|
+
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(b, U, w) {
|
|
217
|
+
function l() {
|
|
218
|
+
if (!(this instanceof l)) return new l();
|
|
219
|
+
if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
220
|
+
this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
|
|
221
|
+
var o = new l();
|
|
222
|
+
for (var n in this) typeof this[n] != "function" && (o[n] = this[n]);
|
|
223
|
+
return o;
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
(l.prototype = b("./object")).loadAsync = b("./load"), l.support = b("./support"), l.defaults = b("./defaults"), l.version = "3.10.1", l.loadAsync = function(o, n) {
|
|
227
|
+
return new l().loadAsync(o, n);
|
|
228
|
+
}, l.external = b("./external"), U.exports = l;
|
|
229
|
+
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(b, U, w) {
|
|
230
|
+
var l = b("./utils"), o = b("./external"), n = b("./utf8"), u = b("./zipEntries"), _ = b("./stream/Crc32Probe"), y = b("./nodejsUtils");
|
|
231
|
+
function p(g) {
|
|
232
|
+
return new o.Promise(function(i, d) {
|
|
233
|
+
var r = g.decompressed.getContentWorker().pipe(new _());
|
|
234
|
+
r.on("error", function(h) {
|
|
235
|
+
d(h);
|
|
236
|
+
}).on("end", function() {
|
|
237
|
+
r.streamInfo.crc32 !== g.decompressed.crc32 ? d(new Error("Corrupted zip : CRC32 mismatch")) : i();
|
|
238
|
+
}).resume();
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
U.exports = function(g, i) {
|
|
242
|
+
var d = this;
|
|
243
|
+
return i = l.extend(i || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: n.utf8decode }), y.isNode && y.isStream(g) ? o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : l.prepareContent("the loaded zip file", g, !0, i.optimizedBinaryString, i.base64).then(function(r) {
|
|
244
|
+
var h = new u(i);
|
|
245
|
+
return h.load(r), h;
|
|
246
|
+
}).then(function(r) {
|
|
247
|
+
var h = [o.Promise.resolve(r)], a = r.files;
|
|
248
|
+
if (i.checkCRC32) for (var c = 0; c < a.length; c++) h.push(p(a[c]));
|
|
249
|
+
return o.Promise.all(h);
|
|
250
|
+
}).then(function(r) {
|
|
251
|
+
for (var h = r.shift(), a = h.files, c = 0; c < a.length; c++) {
|
|
252
|
+
var v = a[c], S = v.fileNameStr, x = l.resolve(v.fileNameStr);
|
|
253
|
+
d.file(x, v.decompressed, { binary: !0, optimizedBinaryString: !0, date: v.date, dir: v.dir, comment: v.fileCommentStr.length ? v.fileCommentStr : null, unixPermissions: v.unixPermissions, dosPermissions: v.dosPermissions, createFolders: i.createFolders }), v.dir || (d.file(x).unsafeOriginalName = S);
|
|
254
|
+
}
|
|
255
|
+
return h.zipComment.length && (d.comment = h.zipComment), d;
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(b, U, w) {
|
|
259
|
+
var l = b("../utils"), o = b("../stream/GenericWorker");
|
|
260
|
+
function n(u, _) {
|
|
261
|
+
o.call(this, "Nodejs stream input adapter for " + u), this._upstreamEnded = !1, this._bindStream(_);
|
|
262
|
+
}
|
|
263
|
+
l.inherits(n, o), n.prototype._bindStream = function(u) {
|
|
264
|
+
var _ = this;
|
|
265
|
+
(this._stream = u).pause(), u.on("data", function(y) {
|
|
266
|
+
_.push({ data: y, meta: { percent: 0 } });
|
|
267
|
+
}).on("error", function(y) {
|
|
268
|
+
_.isPaused ? this.generatedError = y : _.error(y);
|
|
269
|
+
}).on("end", function() {
|
|
270
|
+
_.isPaused ? _._upstreamEnded = !0 : _.end();
|
|
271
|
+
});
|
|
272
|
+
}, n.prototype.pause = function() {
|
|
273
|
+
return !!o.prototype.pause.call(this) && (this._stream.pause(), !0);
|
|
274
|
+
}, n.prototype.resume = function() {
|
|
275
|
+
return !!o.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
|
|
276
|
+
}, U.exports = n;
|
|
277
|
+
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(b, U, w) {
|
|
278
|
+
var l = b("readable-stream").Readable;
|
|
279
|
+
function o(n, u, _) {
|
|
280
|
+
l.call(this, u), this._helper = n;
|
|
281
|
+
var y = this;
|
|
282
|
+
n.on("data", function(p, g) {
|
|
283
|
+
y.push(p) || y._helper.pause(), _ && _(g);
|
|
284
|
+
}).on("error", function(p) {
|
|
285
|
+
y.emit("error", p);
|
|
286
|
+
}).on("end", function() {
|
|
287
|
+
y.push(null);
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
b("../utils").inherits(o, l), o.prototype._read = function() {
|
|
291
|
+
this._helper.resume();
|
|
292
|
+
}, U.exports = o;
|
|
293
|
+
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(b, U, w) {
|
|
294
|
+
U.exports = { isNode: typeof Buffer < "u", newBufferFrom: function(l, o) {
|
|
295
|
+
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(l, o);
|
|
296
|
+
if (typeof l == "number") throw new Error('The "data" argument must not be a number');
|
|
297
|
+
return new Buffer(l, o);
|
|
298
|
+
}, allocBuffer: function(l) {
|
|
299
|
+
if (Buffer.alloc) return Buffer.alloc(l);
|
|
300
|
+
var o = new Buffer(l);
|
|
301
|
+
return o.fill(0), o;
|
|
302
|
+
}, isBuffer: function(l) {
|
|
303
|
+
return Buffer.isBuffer(l);
|
|
304
|
+
}, isStream: function(l) {
|
|
305
|
+
return l && typeof l.on == "function" && typeof l.pause == "function" && typeof l.resume == "function";
|
|
306
|
+
} };
|
|
307
|
+
}, {}], 15: [function(b, U, w) {
|
|
308
|
+
function l(x, D, O) {
|
|
309
|
+
var L, I = n.getTypeOf(D), W = n.extend(O || {}, y);
|
|
310
|
+
W.date = W.date || /* @__PURE__ */ new Date(), W.compression !== null && (W.compression = W.compression.toUpperCase()), typeof W.unixPermissions == "string" && (W.unixPermissions = parseInt(W.unixPermissions, 8)), W.unixPermissions && 16384 & W.unixPermissions && (W.dir = !0), W.dosPermissions && 16 & W.dosPermissions && (W.dir = !0), W.dir && (x = a(x)), W.createFolders && (L = h(x)) && c.call(this, L, !0);
|
|
311
|
+
var q = I === "string" && W.binary === !1 && W.base64 === !1;
|
|
312
|
+
O && O.binary !== void 0 || (W.binary = !q), (D instanceof p && D.uncompressedSize === 0 || W.dir || !D || D.length === 0) && (W.base64 = !1, W.binary = !0, D = "", W.compression = "STORE", I = "string");
|
|
313
|
+
var m = null;
|
|
314
|
+
m = D instanceof p || D instanceof u ? D : d.isNode && d.isStream(D) ? new r(x, D) : n.prepareContent(x, D, W.binary, W.optimizedBinaryString, W.base64);
|
|
315
|
+
var B = new g(x, m, W);
|
|
316
|
+
this.files[x] = B;
|
|
317
|
+
}
|
|
318
|
+
var o = b("./utf8"), n = b("./utils"), u = b("./stream/GenericWorker"), _ = b("./stream/StreamHelper"), y = b("./defaults"), p = b("./compressedObject"), g = b("./zipObject"), i = b("./generate"), d = b("./nodejsUtils"), r = b("./nodejs/NodejsStreamInputAdapter"), h = function(x) {
|
|
319
|
+
x.slice(-1) === "/" && (x = x.substring(0, x.length - 1));
|
|
320
|
+
var D = x.lastIndexOf("/");
|
|
321
|
+
return 0 < D ? x.substring(0, D) : "";
|
|
322
|
+
}, a = function(x) {
|
|
323
|
+
return x.slice(-1) !== "/" && (x += "/"), x;
|
|
324
|
+
}, c = function(x, D) {
|
|
325
|
+
return D = D !== void 0 ? D : y.createFolders, x = a(x), this.files[x] || l.call(this, x, null, { dir: !0, createFolders: D }), this.files[x];
|
|
326
|
+
};
|
|
327
|
+
function v(x) {
|
|
328
|
+
return Object.prototype.toString.call(x) === "[object RegExp]";
|
|
329
|
+
}
|
|
330
|
+
var S = { load: function() {
|
|
331
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
332
|
+
}, forEach: function(x) {
|
|
333
|
+
var D, O, L;
|
|
334
|
+
for (D in this.files) L = this.files[D], (O = D.slice(this.root.length, D.length)) && D.slice(0, this.root.length) === this.root && x(O, L);
|
|
335
|
+
}, filter: function(x) {
|
|
336
|
+
var D = [];
|
|
337
|
+
return this.forEach(function(O, L) {
|
|
338
|
+
x(O, L) && D.push(L);
|
|
339
|
+
}), D;
|
|
340
|
+
}, file: function(x, D, O) {
|
|
341
|
+
if (arguments.length !== 1) return x = this.root + x, l.call(this, x, D, O), this;
|
|
342
|
+
if (v(x)) {
|
|
343
|
+
var L = x;
|
|
344
|
+
return this.filter(function(W, q) {
|
|
345
|
+
return !q.dir && L.test(W);
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
var I = this.files[this.root + x];
|
|
349
|
+
return I && !I.dir ? I : null;
|
|
350
|
+
}, folder: function(x) {
|
|
351
|
+
if (!x) return this;
|
|
352
|
+
if (v(x)) return this.filter(function(I, W) {
|
|
353
|
+
return W.dir && x.test(I);
|
|
354
|
+
});
|
|
355
|
+
var D = this.root + x, O = c.call(this, D), L = this.clone();
|
|
356
|
+
return L.root = O.name, L;
|
|
357
|
+
}, remove: function(x) {
|
|
358
|
+
x = this.root + x;
|
|
359
|
+
var D = this.files[x];
|
|
360
|
+
if (D || (x.slice(-1) !== "/" && (x += "/"), D = this.files[x]), D && !D.dir) delete this.files[x];
|
|
361
|
+
else for (var O = this.filter(function(I, W) {
|
|
362
|
+
return W.name.slice(0, x.length) === x;
|
|
363
|
+
}), L = 0; L < O.length; L++) delete this.files[O[L].name];
|
|
364
|
+
return this;
|
|
365
|
+
}, generate: function() {
|
|
366
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
367
|
+
}, generateInternalStream: function(x) {
|
|
368
|
+
var D, O = {};
|
|
369
|
+
try {
|
|
370
|
+
if ((O = n.extend(x || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: o.utf8encode })).type = O.type.toLowerCase(), O.compression = O.compression.toUpperCase(), O.type === "binarystring" && (O.type = "string"), !O.type) throw new Error("No output type specified.");
|
|
371
|
+
n.checkSupport(O.type), O.platform !== "darwin" && O.platform !== "freebsd" && O.platform !== "linux" && O.platform !== "sunos" || (O.platform = "UNIX"), O.platform === "win32" && (O.platform = "DOS");
|
|
372
|
+
var L = O.comment || this.comment || "";
|
|
373
|
+
D = i.generateWorker(this, O, L);
|
|
374
|
+
} catch (I) {
|
|
375
|
+
(D = new u("error")).error(I);
|
|
376
|
+
}
|
|
377
|
+
return new _(D, O.type || "string", O.mimeType);
|
|
378
|
+
}, generateAsync: function(x, D) {
|
|
379
|
+
return this.generateInternalStream(x).accumulate(D);
|
|
380
|
+
}, generateNodeStream: function(x, D) {
|
|
381
|
+
return (x = x || {}).type || (x.type = "nodebuffer"), this.generateInternalStream(x).toNodejsStream(D);
|
|
382
|
+
} };
|
|
383
|
+
U.exports = S;
|
|
384
|
+
}, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(b, U, w) {
|
|
385
|
+
U.exports = b("stream");
|
|
386
|
+
}, { stream: void 0 }], 17: [function(b, U, w) {
|
|
387
|
+
var l = b("./DataReader");
|
|
388
|
+
function o(n) {
|
|
389
|
+
l.call(this, n);
|
|
390
|
+
for (var u = 0; u < this.data.length; u++) n[u] = 255 & n[u];
|
|
391
|
+
}
|
|
392
|
+
b("../utils").inherits(o, l), o.prototype.byteAt = function(n) {
|
|
393
|
+
return this.data[this.zero + n];
|
|
394
|
+
}, o.prototype.lastIndexOfSignature = function(n) {
|
|
395
|
+
for (var u = n.charCodeAt(0), _ = n.charCodeAt(1), y = n.charCodeAt(2), p = n.charCodeAt(3), g = this.length - 4; 0 <= g; --g) if (this.data[g] === u && this.data[g + 1] === _ && this.data[g + 2] === y && this.data[g + 3] === p) return g - this.zero;
|
|
396
|
+
return -1;
|
|
397
|
+
}, o.prototype.readAndCheckSignature = function(n) {
|
|
398
|
+
var u = n.charCodeAt(0), _ = n.charCodeAt(1), y = n.charCodeAt(2), p = n.charCodeAt(3), g = this.readData(4);
|
|
399
|
+
return u === g[0] && _ === g[1] && y === g[2] && p === g[3];
|
|
400
|
+
}, o.prototype.readData = function(n) {
|
|
401
|
+
if (this.checkOffset(n), n === 0) return [];
|
|
402
|
+
var u = this.data.slice(this.zero + this.index, this.zero + this.index + n);
|
|
403
|
+
return this.index += n, u;
|
|
404
|
+
}, U.exports = o;
|
|
405
|
+
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(b, U, w) {
|
|
406
|
+
var l = b("../utils");
|
|
407
|
+
function o(n) {
|
|
408
|
+
this.data = n, this.length = n.length, this.index = 0, this.zero = 0;
|
|
409
|
+
}
|
|
410
|
+
o.prototype = { checkOffset: function(n) {
|
|
411
|
+
this.checkIndex(this.index + n);
|
|
412
|
+
}, checkIndex: function(n) {
|
|
413
|
+
if (this.length < this.zero + n || n < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + n + "). Corrupted zip ?");
|
|
414
|
+
}, setIndex: function(n) {
|
|
415
|
+
this.checkIndex(n), this.index = n;
|
|
416
|
+
}, skip: function(n) {
|
|
417
|
+
this.setIndex(this.index + n);
|
|
418
|
+
}, byteAt: function() {
|
|
419
|
+
}, readInt: function(n) {
|
|
420
|
+
var u, _ = 0;
|
|
421
|
+
for (this.checkOffset(n), u = this.index + n - 1; u >= this.index; u--) _ = (_ << 8) + this.byteAt(u);
|
|
422
|
+
return this.index += n, _;
|
|
423
|
+
}, readString: function(n) {
|
|
424
|
+
return l.transformTo("string", this.readData(n));
|
|
425
|
+
}, readData: function() {
|
|
426
|
+
}, lastIndexOfSignature: function() {
|
|
427
|
+
}, readAndCheckSignature: function() {
|
|
428
|
+
}, readDate: function() {
|
|
429
|
+
var n = this.readInt(4);
|
|
430
|
+
return new Date(Date.UTC(1980 + (n >> 25 & 127), (n >> 21 & 15) - 1, n >> 16 & 31, n >> 11 & 31, n >> 5 & 63, (31 & n) << 1));
|
|
431
|
+
} }, U.exports = o;
|
|
432
|
+
}, { "../utils": 32 }], 19: [function(b, U, w) {
|
|
433
|
+
var l = b("./Uint8ArrayReader");
|
|
434
|
+
function o(n) {
|
|
435
|
+
l.call(this, n);
|
|
436
|
+
}
|
|
437
|
+
b("../utils").inherits(o, l), o.prototype.readData = function(n) {
|
|
438
|
+
this.checkOffset(n);
|
|
439
|
+
var u = this.data.slice(this.zero + this.index, this.zero + this.index + n);
|
|
440
|
+
return this.index += n, u;
|
|
441
|
+
}, U.exports = o;
|
|
442
|
+
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(b, U, w) {
|
|
443
|
+
var l = b("./DataReader");
|
|
444
|
+
function o(n) {
|
|
445
|
+
l.call(this, n);
|
|
446
|
+
}
|
|
447
|
+
b("../utils").inherits(o, l), o.prototype.byteAt = function(n) {
|
|
448
|
+
return this.data.charCodeAt(this.zero + n);
|
|
449
|
+
}, o.prototype.lastIndexOfSignature = function(n) {
|
|
450
|
+
return this.data.lastIndexOf(n) - this.zero;
|
|
451
|
+
}, o.prototype.readAndCheckSignature = function(n) {
|
|
452
|
+
return n === this.readData(4);
|
|
453
|
+
}, o.prototype.readData = function(n) {
|
|
454
|
+
this.checkOffset(n);
|
|
455
|
+
var u = this.data.slice(this.zero + this.index, this.zero + this.index + n);
|
|
456
|
+
return this.index += n, u;
|
|
457
|
+
}, U.exports = o;
|
|
458
|
+
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(b, U, w) {
|
|
459
|
+
var l = b("./ArrayReader");
|
|
460
|
+
function o(n) {
|
|
461
|
+
l.call(this, n);
|
|
462
|
+
}
|
|
463
|
+
b("../utils").inherits(o, l), o.prototype.readData = function(n) {
|
|
464
|
+
if (this.checkOffset(n), n === 0) return new Uint8Array(0);
|
|
465
|
+
var u = this.data.subarray(this.zero + this.index, this.zero + this.index + n);
|
|
466
|
+
return this.index += n, u;
|
|
467
|
+
}, U.exports = o;
|
|
468
|
+
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(b, U, w) {
|
|
469
|
+
var l = b("../utils"), o = b("../support"), n = b("./ArrayReader"), u = b("./StringReader"), _ = b("./NodeBufferReader"), y = b("./Uint8ArrayReader");
|
|
470
|
+
U.exports = function(p) {
|
|
471
|
+
var g = l.getTypeOf(p);
|
|
472
|
+
return l.checkSupport(g), g !== "string" || o.uint8array ? g === "nodebuffer" ? new _(p) : o.uint8array ? new y(l.transformTo("uint8array", p)) : new n(l.transformTo("array", p)) : new u(p);
|
|
473
|
+
};
|
|
474
|
+
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(b, U, w) {
|
|
475
|
+
w.LOCAL_FILE_HEADER = "PK", w.CENTRAL_FILE_HEADER = "PK", w.CENTRAL_DIRECTORY_END = "PK", w.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", w.ZIP64_CENTRAL_DIRECTORY_END = "PK", w.DATA_DESCRIPTOR = "PK\x07\b";
|
|
476
|
+
}, {}], 24: [function(b, U, w) {
|
|
477
|
+
var l = b("./GenericWorker"), o = b("../utils");
|
|
478
|
+
function n(u) {
|
|
479
|
+
l.call(this, "ConvertWorker to " + u), this.destType = u;
|
|
480
|
+
}
|
|
481
|
+
o.inherits(n, l), n.prototype.processChunk = function(u) {
|
|
482
|
+
this.push({ data: o.transformTo(this.destType, u.data), meta: u.meta });
|
|
483
|
+
}, U.exports = n;
|
|
484
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(b, U, w) {
|
|
485
|
+
var l = b("./GenericWorker"), o = b("../crc32");
|
|
486
|
+
function n() {
|
|
487
|
+
l.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
|
|
488
|
+
}
|
|
489
|
+
b("../utils").inherits(n, l), n.prototype.processChunk = function(u) {
|
|
490
|
+
this.streamInfo.crc32 = o(u.data, this.streamInfo.crc32 || 0), this.push(u);
|
|
491
|
+
}, U.exports = n;
|
|
492
|
+
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(b, U, w) {
|
|
493
|
+
var l = b("../utils"), o = b("./GenericWorker");
|
|
494
|
+
function n(u) {
|
|
495
|
+
o.call(this, "DataLengthProbe for " + u), this.propName = u, this.withStreamInfo(u, 0);
|
|
496
|
+
}
|
|
497
|
+
l.inherits(n, o), n.prototype.processChunk = function(u) {
|
|
498
|
+
if (u) {
|
|
499
|
+
var _ = this.streamInfo[this.propName] || 0;
|
|
500
|
+
this.streamInfo[this.propName] = _ + u.data.length;
|
|
501
|
+
}
|
|
502
|
+
o.prototype.processChunk.call(this, u);
|
|
503
|
+
}, U.exports = n;
|
|
504
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(b, U, w) {
|
|
505
|
+
var l = b("../utils"), o = b("./GenericWorker");
|
|
506
|
+
function n(u) {
|
|
507
|
+
o.call(this, "DataWorker");
|
|
508
|
+
var _ = this;
|
|
509
|
+
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, u.then(function(y) {
|
|
510
|
+
_.dataIsReady = !0, _.data = y, _.max = y && y.length || 0, _.type = l.getTypeOf(y), _.isPaused || _._tickAndRepeat();
|
|
511
|
+
}, function(y) {
|
|
512
|
+
_.error(y);
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
l.inherits(n, o), n.prototype.cleanUp = function() {
|
|
516
|
+
o.prototype.cleanUp.call(this), this.data = null;
|
|
517
|
+
}, n.prototype.resume = function() {
|
|
518
|
+
return !!o.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, l.delay(this._tickAndRepeat, [], this)), !0);
|
|
519
|
+
}, n.prototype._tickAndRepeat = function() {
|
|
520
|
+
this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (l.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
|
|
521
|
+
}, n.prototype._tick = function() {
|
|
522
|
+
if (this.isPaused || this.isFinished) return !1;
|
|
523
|
+
var u = null, _ = Math.min(this.max, this.index + 16384);
|
|
524
|
+
if (this.index >= this.max) return this.end();
|
|
525
|
+
switch (this.type) {
|
|
526
|
+
case "string":
|
|
527
|
+
u = this.data.substring(this.index, _);
|
|
528
|
+
break;
|
|
529
|
+
case "uint8array":
|
|
530
|
+
u = this.data.subarray(this.index, _);
|
|
531
|
+
break;
|
|
532
|
+
case "array":
|
|
533
|
+
case "nodebuffer":
|
|
534
|
+
u = this.data.slice(this.index, _);
|
|
535
|
+
}
|
|
536
|
+
return this.index = _, this.push({ data: u, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
537
|
+
}, U.exports = n;
|
|
538
|
+
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(b, U, w) {
|
|
539
|
+
function l(o) {
|
|
540
|
+
this.name = o || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = { data: [], end: [], error: [] }, this.previous = null;
|
|
541
|
+
}
|
|
542
|
+
l.prototype = { push: function(o) {
|
|
543
|
+
this.emit("data", o);
|
|
544
|
+
}, end: function() {
|
|
545
|
+
if (this.isFinished) return !1;
|
|
546
|
+
this.flush();
|
|
547
|
+
try {
|
|
548
|
+
this.emit("end"), this.cleanUp(), this.isFinished = !0;
|
|
549
|
+
} catch (o) {
|
|
550
|
+
this.emit("error", o);
|
|
551
|
+
}
|
|
552
|
+
return !0;
|
|
553
|
+
}, error: function(o) {
|
|
554
|
+
return !this.isFinished && (this.isPaused ? this.generatedError = o : (this.isFinished = !0, this.emit("error", o), this.previous && this.previous.error(o), this.cleanUp()), !0);
|
|
555
|
+
}, on: function(o, n) {
|
|
556
|
+
return this._listeners[o].push(n), this;
|
|
557
|
+
}, cleanUp: function() {
|
|
558
|
+
this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
|
|
559
|
+
}, emit: function(o, n) {
|
|
560
|
+
if (this._listeners[o]) for (var u = 0; u < this._listeners[o].length; u++) this._listeners[o][u].call(this, n);
|
|
561
|
+
}, pipe: function(o) {
|
|
562
|
+
return o.registerPrevious(this);
|
|
563
|
+
}, registerPrevious: function(o) {
|
|
564
|
+
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
565
|
+
this.streamInfo = o.streamInfo, this.mergeStreamInfo(), this.previous = o;
|
|
566
|
+
var n = this;
|
|
567
|
+
return o.on("data", function(u) {
|
|
568
|
+
n.processChunk(u);
|
|
569
|
+
}), o.on("end", function() {
|
|
570
|
+
n.end();
|
|
571
|
+
}), o.on("error", function(u) {
|
|
572
|
+
n.error(u);
|
|
573
|
+
}), this;
|
|
574
|
+
}, pause: function() {
|
|
575
|
+
return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
|
|
576
|
+
}, resume: function() {
|
|
577
|
+
if (!this.isPaused || this.isFinished) return !1;
|
|
578
|
+
var o = this.isPaused = !1;
|
|
579
|
+
return this.generatedError && (this.error(this.generatedError), o = !0), this.previous && this.previous.resume(), !o;
|
|
580
|
+
}, flush: function() {
|
|
581
|
+
}, processChunk: function(o) {
|
|
582
|
+
this.push(o);
|
|
583
|
+
}, withStreamInfo: function(o, n) {
|
|
584
|
+
return this.extraStreamInfo[o] = n, this.mergeStreamInfo(), this;
|
|
585
|
+
}, mergeStreamInfo: function() {
|
|
586
|
+
for (var o in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, o) && (this.streamInfo[o] = this.extraStreamInfo[o]);
|
|
587
|
+
}, lock: function() {
|
|
588
|
+
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
589
|
+
this.isLocked = !0, this.previous && this.previous.lock();
|
|
590
|
+
}, toString: function() {
|
|
591
|
+
var o = "Worker " + this.name;
|
|
592
|
+
return this.previous ? this.previous + " -> " + o : o;
|
|
593
|
+
} }, U.exports = l;
|
|
594
|
+
}, {}], 29: [function(b, U, w) {
|
|
595
|
+
var l = b("../utils"), o = b("./ConvertWorker"), n = b("./GenericWorker"), u = b("../base64"), _ = b("../support"), y = b("../external"), p = null;
|
|
596
|
+
if (_.nodestream) try {
|
|
597
|
+
p = b("../nodejs/NodejsStreamOutputAdapter");
|
|
598
|
+
} catch {
|
|
599
|
+
}
|
|
600
|
+
function g(d, r) {
|
|
601
|
+
return new y.Promise(function(h, a) {
|
|
602
|
+
var c = [], v = d._internalType, S = d._outputType, x = d._mimeType;
|
|
603
|
+
d.on("data", function(D, O) {
|
|
604
|
+
c.push(D), r && r(O);
|
|
605
|
+
}).on("error", function(D) {
|
|
606
|
+
c = [], a(D);
|
|
607
|
+
}).on("end", function() {
|
|
608
|
+
try {
|
|
609
|
+
var D = (function(O, L, I) {
|
|
610
|
+
switch (O) {
|
|
611
|
+
case "blob":
|
|
612
|
+
return l.newBlob(l.transformTo("arraybuffer", L), I);
|
|
613
|
+
case "base64":
|
|
614
|
+
return u.encode(L);
|
|
615
|
+
default:
|
|
616
|
+
return l.transformTo(O, L);
|
|
617
|
+
}
|
|
618
|
+
})(S, (function(O, L) {
|
|
619
|
+
var I, W = 0, q = null, m = 0;
|
|
620
|
+
for (I = 0; I < L.length; I++) m += L[I].length;
|
|
621
|
+
switch (O) {
|
|
622
|
+
case "string":
|
|
623
|
+
return L.join("");
|
|
624
|
+
case "array":
|
|
625
|
+
return Array.prototype.concat.apply([], L);
|
|
626
|
+
case "uint8array":
|
|
627
|
+
for (q = new Uint8Array(m), I = 0; I < L.length; I++) q.set(L[I], W), W += L[I].length;
|
|
628
|
+
return q;
|
|
629
|
+
case "nodebuffer":
|
|
630
|
+
return Buffer.concat(L);
|
|
631
|
+
default:
|
|
632
|
+
throw new Error("concat : unsupported type '" + O + "'");
|
|
633
|
+
}
|
|
634
|
+
})(v, c), x);
|
|
635
|
+
h(D);
|
|
636
|
+
} catch (O) {
|
|
637
|
+
a(O);
|
|
638
|
+
}
|
|
639
|
+
c = [];
|
|
640
|
+
}).resume();
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
function i(d, r, h) {
|
|
644
|
+
var a = r;
|
|
645
|
+
switch (r) {
|
|
646
|
+
case "blob":
|
|
647
|
+
case "arraybuffer":
|
|
648
|
+
a = "uint8array";
|
|
649
|
+
break;
|
|
650
|
+
case "base64":
|
|
651
|
+
a = "string";
|
|
652
|
+
}
|
|
653
|
+
try {
|
|
654
|
+
this._internalType = a, this._outputType = r, this._mimeType = h, l.checkSupport(a), this._worker = d.pipe(new o(a)), d.lock();
|
|
655
|
+
} catch (c) {
|
|
656
|
+
this._worker = new n("error"), this._worker.error(c);
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
i.prototype = { accumulate: function(d) {
|
|
660
|
+
return g(this, d);
|
|
661
|
+
}, on: function(d, r) {
|
|
662
|
+
var h = this;
|
|
663
|
+
return d === "data" ? this._worker.on(d, function(a) {
|
|
664
|
+
r.call(h, a.data, a.meta);
|
|
665
|
+
}) : this._worker.on(d, function() {
|
|
666
|
+
l.delay(r, arguments, h);
|
|
667
|
+
}), this;
|
|
668
|
+
}, resume: function() {
|
|
669
|
+
return l.delay(this._worker.resume, [], this._worker), this;
|
|
670
|
+
}, pause: function() {
|
|
671
|
+
return this._worker.pause(), this;
|
|
672
|
+
}, toNodejsStream: function(d) {
|
|
673
|
+
if (l.checkSupport("nodestream"), this._outputType !== "nodebuffer") throw new Error(this._outputType + " is not supported by this method");
|
|
674
|
+
return new p(this, { objectMode: this._outputType !== "nodebuffer" }, d);
|
|
675
|
+
} }, U.exports = i;
|
|
676
|
+
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(b, U, w) {
|
|
677
|
+
if (w.base64 = !0, w.array = !0, w.string = !0, w.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", w.nodebuffer = typeof Buffer < "u", w.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u") w.blob = !1;
|
|
678
|
+
else {
|
|
679
|
+
var l = new ArrayBuffer(0);
|
|
680
|
+
try {
|
|
681
|
+
w.blob = new Blob([l], { type: "application/zip" }).size === 0;
|
|
682
|
+
} catch {
|
|
683
|
+
try {
|
|
684
|
+
var o = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
685
|
+
o.append(l), w.blob = o.getBlob("application/zip").size === 0;
|
|
686
|
+
} catch {
|
|
687
|
+
w.blob = !1;
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
try {
|
|
692
|
+
w.nodestream = !!b("readable-stream").Readable;
|
|
693
|
+
} catch {
|
|
694
|
+
w.nodestream = !1;
|
|
695
|
+
}
|
|
696
|
+
}, { "readable-stream": 16 }], 31: [function(b, U, w) {
|
|
697
|
+
for (var l = b("./utils"), o = b("./support"), n = b("./nodejsUtils"), u = b("./stream/GenericWorker"), _ = new Array(256), y = 0; y < 256; y++) _[y] = 252 <= y ? 6 : 248 <= y ? 5 : 240 <= y ? 4 : 224 <= y ? 3 : 192 <= y ? 2 : 1;
|
|
698
|
+
_[254] = _[254] = 1;
|
|
699
|
+
function p() {
|
|
700
|
+
u.call(this, "utf-8 decode"), this.leftOver = null;
|
|
701
|
+
}
|
|
702
|
+
function g() {
|
|
703
|
+
u.call(this, "utf-8 encode");
|
|
704
|
+
}
|
|
705
|
+
w.utf8encode = function(i) {
|
|
706
|
+
return o.nodebuffer ? n.newBufferFrom(i, "utf-8") : (function(d) {
|
|
707
|
+
var r, h, a, c, v, S = d.length, x = 0;
|
|
708
|
+
for (c = 0; c < S; c++) (64512 & (h = d.charCodeAt(c))) == 55296 && c + 1 < S && (64512 & (a = d.charCodeAt(c + 1))) == 56320 && (h = 65536 + (h - 55296 << 10) + (a - 56320), c++), x += h < 128 ? 1 : h < 2048 ? 2 : h < 65536 ? 3 : 4;
|
|
709
|
+
for (r = o.uint8array ? new Uint8Array(x) : new Array(x), c = v = 0; v < x; c++) (64512 & (h = d.charCodeAt(c))) == 55296 && c + 1 < S && (64512 & (a = d.charCodeAt(c + 1))) == 56320 && (h = 65536 + (h - 55296 << 10) + (a - 56320), c++), h < 128 ? r[v++] = h : (h < 2048 ? r[v++] = 192 | h >>> 6 : (h < 65536 ? r[v++] = 224 | h >>> 12 : (r[v++] = 240 | h >>> 18, r[v++] = 128 | h >>> 12 & 63), r[v++] = 128 | h >>> 6 & 63), r[v++] = 128 | 63 & h);
|
|
710
|
+
return r;
|
|
711
|
+
})(i);
|
|
712
|
+
}, w.utf8decode = function(i) {
|
|
713
|
+
return o.nodebuffer ? l.transformTo("nodebuffer", i).toString("utf-8") : (function(d) {
|
|
714
|
+
var r, h, a, c, v = d.length, S = new Array(2 * v);
|
|
715
|
+
for (r = h = 0; r < v; ) if ((a = d[r++]) < 128) S[h++] = a;
|
|
716
|
+
else if (4 < (c = _[a])) S[h++] = 65533, r += c - 1;
|
|
717
|
+
else {
|
|
718
|
+
for (a &= c === 2 ? 31 : c === 3 ? 15 : 7; 1 < c && r < v; ) a = a << 6 | 63 & d[r++], c--;
|
|
719
|
+
1 < c ? S[h++] = 65533 : a < 65536 ? S[h++] = a : (a -= 65536, S[h++] = 55296 | a >> 10 & 1023, S[h++] = 56320 | 1023 & a);
|
|
720
|
+
}
|
|
721
|
+
return S.length !== h && (S.subarray ? S = S.subarray(0, h) : S.length = h), l.applyFromCharCode(S);
|
|
722
|
+
})(i = l.transformTo(o.uint8array ? "uint8array" : "array", i));
|
|
723
|
+
}, l.inherits(p, u), p.prototype.processChunk = function(i) {
|
|
724
|
+
var d = l.transformTo(o.uint8array ? "uint8array" : "array", i.data);
|
|
725
|
+
if (this.leftOver && this.leftOver.length) {
|
|
726
|
+
if (o.uint8array) {
|
|
727
|
+
var r = d;
|
|
728
|
+
(d = new Uint8Array(r.length + this.leftOver.length)).set(this.leftOver, 0), d.set(r, this.leftOver.length);
|
|
729
|
+
} else d = this.leftOver.concat(d);
|
|
730
|
+
this.leftOver = null;
|
|
731
|
+
}
|
|
732
|
+
var h = (function(c, v) {
|
|
733
|
+
var S;
|
|
734
|
+
for ((v = v || c.length) > c.length && (v = c.length), S = v - 1; 0 <= S && (192 & c[S]) == 128; ) S--;
|
|
735
|
+
return S < 0 || S === 0 ? v : S + _[c[S]] > v ? S : v;
|
|
736
|
+
})(d), a = d;
|
|
737
|
+
h !== d.length && (o.uint8array ? (a = d.subarray(0, h), this.leftOver = d.subarray(h, d.length)) : (a = d.slice(0, h), this.leftOver = d.slice(h, d.length))), this.push({ data: w.utf8decode(a), meta: i.meta });
|
|
738
|
+
}, p.prototype.flush = function() {
|
|
739
|
+
this.leftOver && this.leftOver.length && (this.push({ data: w.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
740
|
+
}, w.Utf8DecodeWorker = p, l.inherits(g, u), g.prototype.processChunk = function(i) {
|
|
741
|
+
this.push({ data: w.utf8encode(i.data), meta: i.meta });
|
|
742
|
+
}, w.Utf8EncodeWorker = g;
|
|
743
|
+
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(b, U, w) {
|
|
744
|
+
var l = b("./support"), o = b("./base64"), n = b("./nodejsUtils"), u = b("./external");
|
|
745
|
+
function _(r) {
|
|
746
|
+
return r;
|
|
747
|
+
}
|
|
748
|
+
function y(r, h) {
|
|
749
|
+
for (var a = 0; a < r.length; ++a) h[a] = 255 & r.charCodeAt(a);
|
|
750
|
+
return h;
|
|
751
|
+
}
|
|
752
|
+
b("setimmediate"), w.newBlob = function(r, h) {
|
|
753
|
+
w.checkSupport("blob");
|
|
754
|
+
try {
|
|
755
|
+
return new Blob([r], { type: h });
|
|
756
|
+
} catch {
|
|
757
|
+
try {
|
|
758
|
+
var a = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
759
|
+
return a.append(r), a.getBlob(h);
|
|
760
|
+
} catch {
|
|
761
|
+
throw new Error("Bug : can't construct the Blob.");
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
};
|
|
765
|
+
var p = { stringifyByChunk: function(r, h, a) {
|
|
766
|
+
var c = [], v = 0, S = r.length;
|
|
767
|
+
if (S <= a) return String.fromCharCode.apply(null, r);
|
|
768
|
+
for (; v < S; ) h === "array" || h === "nodebuffer" ? c.push(String.fromCharCode.apply(null, r.slice(v, Math.min(v + a, S)))) : c.push(String.fromCharCode.apply(null, r.subarray(v, Math.min(v + a, S)))), v += a;
|
|
769
|
+
return c.join("");
|
|
770
|
+
}, stringifyByChar: function(r) {
|
|
771
|
+
for (var h = "", a = 0; a < r.length; a++) h += String.fromCharCode(r[a]);
|
|
772
|
+
return h;
|
|
773
|
+
}, applyCanBeUsed: { uint8array: (function() {
|
|
774
|
+
try {
|
|
775
|
+
return l.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
|
|
776
|
+
} catch {
|
|
777
|
+
return !1;
|
|
778
|
+
}
|
|
779
|
+
})(), nodebuffer: (function() {
|
|
780
|
+
try {
|
|
781
|
+
return l.nodebuffer && String.fromCharCode.apply(null, n.allocBuffer(1)).length === 1;
|
|
782
|
+
} catch {
|
|
783
|
+
return !1;
|
|
784
|
+
}
|
|
785
|
+
})() } };
|
|
786
|
+
function g(r) {
|
|
787
|
+
var h = 65536, a = w.getTypeOf(r), c = !0;
|
|
788
|
+
if (a === "uint8array" ? c = p.applyCanBeUsed.uint8array : a === "nodebuffer" && (c = p.applyCanBeUsed.nodebuffer), c) for (; 1 < h; ) try {
|
|
789
|
+
return p.stringifyByChunk(r, a, h);
|
|
790
|
+
} catch {
|
|
791
|
+
h = Math.floor(h / 2);
|
|
792
|
+
}
|
|
793
|
+
return p.stringifyByChar(r);
|
|
794
|
+
}
|
|
795
|
+
function i(r, h) {
|
|
796
|
+
for (var a = 0; a < r.length; a++) h[a] = r[a];
|
|
797
|
+
return h;
|
|
798
|
+
}
|
|
799
|
+
w.applyFromCharCode = g;
|
|
800
|
+
var d = {};
|
|
801
|
+
d.string = { string: _, array: function(r) {
|
|
802
|
+
return y(r, new Array(r.length));
|
|
803
|
+
}, arraybuffer: function(r) {
|
|
804
|
+
return d.string.uint8array(r).buffer;
|
|
805
|
+
}, uint8array: function(r) {
|
|
806
|
+
return y(r, new Uint8Array(r.length));
|
|
807
|
+
}, nodebuffer: function(r) {
|
|
808
|
+
return y(r, n.allocBuffer(r.length));
|
|
809
|
+
} }, d.array = { string: g, array: _, arraybuffer: function(r) {
|
|
810
|
+
return new Uint8Array(r).buffer;
|
|
811
|
+
}, uint8array: function(r) {
|
|
812
|
+
return new Uint8Array(r);
|
|
813
|
+
}, nodebuffer: function(r) {
|
|
814
|
+
return n.newBufferFrom(r);
|
|
815
|
+
} }, d.arraybuffer = { string: function(r) {
|
|
816
|
+
return g(new Uint8Array(r));
|
|
817
|
+
}, array: function(r) {
|
|
818
|
+
return i(new Uint8Array(r), new Array(r.byteLength));
|
|
819
|
+
}, arraybuffer: _, uint8array: function(r) {
|
|
820
|
+
return new Uint8Array(r);
|
|
821
|
+
}, nodebuffer: function(r) {
|
|
822
|
+
return n.newBufferFrom(new Uint8Array(r));
|
|
823
|
+
} }, d.uint8array = { string: g, array: function(r) {
|
|
824
|
+
return i(r, new Array(r.length));
|
|
825
|
+
}, arraybuffer: function(r) {
|
|
826
|
+
return r.buffer;
|
|
827
|
+
}, uint8array: _, nodebuffer: function(r) {
|
|
828
|
+
return n.newBufferFrom(r);
|
|
829
|
+
} }, d.nodebuffer = { string: g, array: function(r) {
|
|
830
|
+
return i(r, new Array(r.length));
|
|
831
|
+
}, arraybuffer: function(r) {
|
|
832
|
+
return d.nodebuffer.uint8array(r).buffer;
|
|
833
|
+
}, uint8array: function(r) {
|
|
834
|
+
return i(r, new Uint8Array(r.length));
|
|
835
|
+
}, nodebuffer: _ }, w.transformTo = function(r, h) {
|
|
836
|
+
if (h = h || "", !r) return h;
|
|
837
|
+
w.checkSupport(r);
|
|
838
|
+
var a = w.getTypeOf(h);
|
|
839
|
+
return d[a][r](h);
|
|
840
|
+
}, w.resolve = function(r) {
|
|
841
|
+
for (var h = r.split("/"), a = [], c = 0; c < h.length; c++) {
|
|
842
|
+
var v = h[c];
|
|
843
|
+
v === "." || v === "" && c !== 0 && c !== h.length - 1 || (v === ".." ? a.pop() : a.push(v));
|
|
844
|
+
}
|
|
845
|
+
return a.join("/");
|
|
846
|
+
}, w.getTypeOf = function(r) {
|
|
847
|
+
return typeof r == "string" ? "string" : Object.prototype.toString.call(r) === "[object Array]" ? "array" : l.nodebuffer && n.isBuffer(r) ? "nodebuffer" : l.uint8array && r instanceof Uint8Array ? "uint8array" : l.arraybuffer && r instanceof ArrayBuffer ? "arraybuffer" : void 0;
|
|
848
|
+
}, w.checkSupport = function(r) {
|
|
849
|
+
if (!l[r.toLowerCase()]) throw new Error(r + " is not supported by this platform");
|
|
850
|
+
}, w.MAX_VALUE_16BITS = 65535, w.MAX_VALUE_32BITS = -1, w.pretty = function(r) {
|
|
851
|
+
var h, a, c = "";
|
|
852
|
+
for (a = 0; a < (r || "").length; a++) c += "\\x" + ((h = r.charCodeAt(a)) < 16 ? "0" : "") + h.toString(16).toUpperCase();
|
|
853
|
+
return c;
|
|
854
|
+
}, w.delay = function(r, h, a) {
|
|
855
|
+
setImmediate(function() {
|
|
856
|
+
r.apply(a || null, h || []);
|
|
857
|
+
});
|
|
858
|
+
}, w.inherits = function(r, h) {
|
|
859
|
+
function a() {
|
|
860
|
+
}
|
|
861
|
+
a.prototype = h.prototype, r.prototype = new a();
|
|
862
|
+
}, w.extend = function() {
|
|
863
|
+
var r, h, a = {};
|
|
864
|
+
for (r = 0; r < arguments.length; r++) for (h in arguments[r]) Object.prototype.hasOwnProperty.call(arguments[r], h) && a[h] === void 0 && (a[h] = arguments[r][h]);
|
|
865
|
+
return a;
|
|
866
|
+
}, w.prepareContent = function(r, h, a, c, v) {
|
|
867
|
+
return u.Promise.resolve(h).then(function(S) {
|
|
868
|
+
return l.blob && (S instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(S)) !== -1) && typeof FileReader < "u" ? new u.Promise(function(x, D) {
|
|
869
|
+
var O = new FileReader();
|
|
870
|
+
O.onload = function(L) {
|
|
871
|
+
x(L.target.result);
|
|
872
|
+
}, O.onerror = function(L) {
|
|
873
|
+
D(L.target.error);
|
|
874
|
+
}, O.readAsArrayBuffer(S);
|
|
875
|
+
}) : S;
|
|
876
|
+
}).then(function(S) {
|
|
877
|
+
var x = w.getTypeOf(S);
|
|
878
|
+
return x ? (x === "arraybuffer" ? S = w.transformTo("uint8array", S) : x === "string" && (v ? S = o.decode(S) : a && c !== !0 && (S = (function(D) {
|
|
879
|
+
return y(D, l.uint8array ? new Uint8Array(D.length) : new Array(D.length));
|
|
880
|
+
})(S))), S) : u.Promise.reject(new Error("Can't read the data of '" + r + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
881
|
+
});
|
|
882
|
+
};
|
|
883
|
+
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(b, U, w) {
|
|
884
|
+
var l = b("./reader/readerFor"), o = b("./utils"), n = b("./signature"), u = b("./zipEntry"), _ = b("./support");
|
|
885
|
+
function y(p) {
|
|
886
|
+
this.files = [], this.loadOptions = p;
|
|
887
|
+
}
|
|
888
|
+
y.prototype = { checkSignature: function(p) {
|
|
889
|
+
if (!this.reader.readAndCheckSignature(p)) {
|
|
890
|
+
this.reader.index -= 4;
|
|
891
|
+
var g = this.reader.readString(4);
|
|
892
|
+
throw new Error("Corrupted zip or bug: unexpected signature (" + o.pretty(g) + ", expected " + o.pretty(p) + ")");
|
|
893
|
+
}
|
|
894
|
+
}, isSignature: function(p, g) {
|
|
895
|
+
var i = this.reader.index;
|
|
896
|
+
this.reader.setIndex(p);
|
|
897
|
+
var d = this.reader.readString(4) === g;
|
|
898
|
+
return this.reader.setIndex(i), d;
|
|
899
|
+
}, readBlockEndOfCentral: function() {
|
|
900
|
+
this.diskNumber = this.reader.readInt(2), this.diskWithCentralDirStart = this.reader.readInt(2), this.centralDirRecordsOnThisDisk = this.reader.readInt(2), this.centralDirRecords = this.reader.readInt(2), this.centralDirSize = this.reader.readInt(4), this.centralDirOffset = this.reader.readInt(4), this.zipCommentLength = this.reader.readInt(2);
|
|
901
|
+
var p = this.reader.readData(this.zipCommentLength), g = _.uint8array ? "uint8array" : "array", i = o.transformTo(g, p);
|
|
902
|
+
this.zipComment = this.loadOptions.decodeFileName(i);
|
|
903
|
+
}, readBlockZip64EndOfCentral: function() {
|
|
904
|
+
this.zip64EndOfCentralSize = this.reader.readInt(8), this.reader.skip(4), this.diskNumber = this.reader.readInt(4), this.diskWithCentralDirStart = this.reader.readInt(4), this.centralDirRecordsOnThisDisk = this.reader.readInt(8), this.centralDirRecords = this.reader.readInt(8), this.centralDirSize = this.reader.readInt(8), this.centralDirOffset = this.reader.readInt(8), this.zip64ExtensibleData = {};
|
|
905
|
+
for (var p, g, i, d = this.zip64EndOfCentralSize - 44; 0 < d; ) p = this.reader.readInt(2), g = this.reader.readInt(4), i = this.reader.readData(g), this.zip64ExtensibleData[p] = { id: p, length: g, value: i };
|
|
906
|
+
}, readBlockZip64EndOfCentralLocator: function() {
|
|
907
|
+
if (this.diskWithZip64CentralDirStart = this.reader.readInt(4), this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8), this.disksCount = this.reader.readInt(4), 1 < this.disksCount) throw new Error("Multi-volumes zip are not supported");
|
|
908
|
+
}, readLocalFiles: function() {
|
|
909
|
+
var p, g;
|
|
910
|
+
for (p = 0; p < this.files.length; p++) g = this.files[p], this.reader.setIndex(g.localHeaderOffset), this.checkSignature(n.LOCAL_FILE_HEADER), g.readLocalPart(this.reader), g.handleUTF8(), g.processAttributes();
|
|
911
|
+
}, readCentralDir: function() {
|
|
912
|
+
var p;
|
|
913
|
+
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(n.CENTRAL_FILE_HEADER); ) (p = new u({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(p);
|
|
914
|
+
if (this.centralDirRecords !== this.files.length && this.centralDirRecords !== 0 && this.files.length === 0) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
915
|
+
}, readEndOfCentral: function() {
|
|
916
|
+
var p = this.reader.lastIndexOfSignature(n.CENTRAL_DIRECTORY_END);
|
|
917
|
+
if (p < 0) throw this.isSignature(0, n.LOCAL_FILE_HEADER) ? new Error("Corrupted zip: can't find end of central directory") : new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");
|
|
918
|
+
this.reader.setIndex(p);
|
|
919
|
+
var g = p;
|
|
920
|
+
if (this.checkSignature(n.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === o.MAX_VALUE_16BITS || this.diskWithCentralDirStart === o.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === o.MAX_VALUE_16BITS || this.centralDirRecords === o.MAX_VALUE_16BITS || this.centralDirSize === o.MAX_VALUE_32BITS || this.centralDirOffset === o.MAX_VALUE_32BITS) {
|
|
921
|
+
if (this.zip64 = !0, (p = this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
922
|
+
if (this.reader.setIndex(p), this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, n.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(n.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
|
|
923
|
+
this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(n.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
|
|
924
|
+
}
|
|
925
|
+
var i = this.centralDirOffset + this.centralDirSize;
|
|
926
|
+
this.zip64 && (i += 20, i += 12 + this.zip64EndOfCentralSize);
|
|
927
|
+
var d = g - i;
|
|
928
|
+
if (0 < d) this.isSignature(g, n.CENTRAL_FILE_HEADER) || (this.reader.zero = d);
|
|
929
|
+
else if (d < 0) throw new Error("Corrupted zip: missing " + Math.abs(d) + " bytes.");
|
|
930
|
+
}, prepareReader: function(p) {
|
|
931
|
+
this.reader = l(p);
|
|
932
|
+
}, load: function(p) {
|
|
933
|
+
this.prepareReader(p), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
934
|
+
} }, U.exports = y;
|
|
935
|
+
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(b, U, w) {
|
|
936
|
+
var l = b("./reader/readerFor"), o = b("./utils"), n = b("./compressedObject"), u = b("./crc32"), _ = b("./utf8"), y = b("./compressions"), p = b("./support");
|
|
937
|
+
function g(i, d) {
|
|
938
|
+
this.options = i, this.loadOptions = d;
|
|
939
|
+
}
|
|
940
|
+
g.prototype = { isEncrypted: function() {
|
|
941
|
+
return (1 & this.bitFlag) == 1;
|
|
942
|
+
}, useUTF8: function() {
|
|
943
|
+
return (2048 & this.bitFlag) == 2048;
|
|
944
|
+
}, readLocalPart: function(i) {
|
|
945
|
+
var d, r;
|
|
946
|
+
if (i.skip(22), this.fileNameLength = i.readInt(2), r = i.readInt(2), this.fileName = i.readData(this.fileNameLength), i.skip(r), this.compressedSize === -1 || this.uncompressedSize === -1) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
|
|
947
|
+
if ((d = (function(h) {
|
|
948
|
+
for (var a in y) if (Object.prototype.hasOwnProperty.call(y, a) && y[a].magic === h) return y[a];
|
|
949
|
+
return null;
|
|
950
|
+
})(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " + o.pretty(this.compressionMethod) + " unknown (inner file : " + o.transformTo("string", this.fileName) + ")");
|
|
951
|
+
this.decompressed = new n(this.compressedSize, this.uncompressedSize, this.crc32, d, i.readData(this.compressedSize));
|
|
952
|
+
}, readCentralPart: function(i) {
|
|
953
|
+
this.versionMadeBy = i.readInt(2), i.skip(2), this.bitFlag = i.readInt(2), this.compressionMethod = i.readString(2), this.date = i.readDate(), this.crc32 = i.readInt(4), this.compressedSize = i.readInt(4), this.uncompressedSize = i.readInt(4);
|
|
954
|
+
var d = i.readInt(2);
|
|
955
|
+
if (this.extraFieldsLength = i.readInt(2), this.fileCommentLength = i.readInt(2), this.diskNumberStart = i.readInt(2), this.internalFileAttributes = i.readInt(2), this.externalFileAttributes = i.readInt(4), this.localHeaderOffset = i.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
|
|
956
|
+
i.skip(d), this.readExtraFields(i), this.parseZIP64ExtraField(i), this.fileComment = i.readData(this.fileCommentLength);
|
|
957
|
+
}, processAttributes: function() {
|
|
958
|
+
this.unixPermissions = null, this.dosPermissions = null;
|
|
959
|
+
var i = this.versionMadeBy >> 8;
|
|
960
|
+
this.dir = !!(16 & this.externalFileAttributes), i == 0 && (this.dosPermissions = 63 & this.externalFileAttributes), i == 3 && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || this.fileNameStr.slice(-1) !== "/" || (this.dir = !0);
|
|
961
|
+
}, parseZIP64ExtraField: function() {
|
|
962
|
+
if (this.extraFields[1]) {
|
|
963
|
+
var i = l(this.extraFields[1].value);
|
|
964
|
+
this.uncompressedSize === o.MAX_VALUE_32BITS && (this.uncompressedSize = i.readInt(8)), this.compressedSize === o.MAX_VALUE_32BITS && (this.compressedSize = i.readInt(8)), this.localHeaderOffset === o.MAX_VALUE_32BITS && (this.localHeaderOffset = i.readInt(8)), this.diskNumberStart === o.MAX_VALUE_32BITS && (this.diskNumberStart = i.readInt(4));
|
|
965
|
+
}
|
|
966
|
+
}, readExtraFields: function(i) {
|
|
967
|
+
var d, r, h, a = i.index + this.extraFieldsLength;
|
|
968
|
+
for (this.extraFields || (this.extraFields = {}); i.index + 4 < a; ) d = i.readInt(2), r = i.readInt(2), h = i.readData(r), this.extraFields[d] = { id: d, length: r, value: h };
|
|
969
|
+
i.setIndex(a);
|
|
970
|
+
}, handleUTF8: function() {
|
|
971
|
+
var i = p.uint8array ? "uint8array" : "array";
|
|
972
|
+
if (this.useUTF8()) this.fileNameStr = _.utf8decode(this.fileName), this.fileCommentStr = _.utf8decode(this.fileComment);
|
|
973
|
+
else {
|
|
974
|
+
var d = this.findExtraFieldUnicodePath();
|
|
975
|
+
if (d !== null) this.fileNameStr = d;
|
|
976
|
+
else {
|
|
977
|
+
var r = o.transformTo(i, this.fileName);
|
|
978
|
+
this.fileNameStr = this.loadOptions.decodeFileName(r);
|
|
979
|
+
}
|
|
980
|
+
var h = this.findExtraFieldUnicodeComment();
|
|
981
|
+
if (h !== null) this.fileCommentStr = h;
|
|
982
|
+
else {
|
|
983
|
+
var a = o.transformTo(i, this.fileComment);
|
|
984
|
+
this.fileCommentStr = this.loadOptions.decodeFileName(a);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
}, findExtraFieldUnicodePath: function() {
|
|
988
|
+
var i = this.extraFields[28789];
|
|
989
|
+
if (i) {
|
|
990
|
+
var d = l(i.value);
|
|
991
|
+
return d.readInt(1) !== 1 || u(this.fileName) !== d.readInt(4) ? null : _.utf8decode(d.readData(i.length - 5));
|
|
992
|
+
}
|
|
993
|
+
return null;
|
|
994
|
+
}, findExtraFieldUnicodeComment: function() {
|
|
995
|
+
var i = this.extraFields[25461];
|
|
996
|
+
if (i) {
|
|
997
|
+
var d = l(i.value);
|
|
998
|
+
return d.readInt(1) !== 1 || u(this.fileComment) !== d.readInt(4) ? null : _.utf8decode(d.readData(i.length - 5));
|
|
999
|
+
}
|
|
1000
|
+
return null;
|
|
1001
|
+
} }, U.exports = g;
|
|
1002
|
+
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(b, U, w) {
|
|
1003
|
+
function l(d, r, h) {
|
|
1004
|
+
this.name = d, this.dir = h.dir, this.date = h.date, this.comment = h.comment, this.unixPermissions = h.unixPermissions, this.dosPermissions = h.dosPermissions, this._data = r, this._dataBinary = h.binary, this.options = { compression: h.compression, compressionOptions: h.compressionOptions };
|
|
1005
|
+
}
|
|
1006
|
+
var o = b("./stream/StreamHelper"), n = b("./stream/DataWorker"), u = b("./utf8"), _ = b("./compressedObject"), y = b("./stream/GenericWorker");
|
|
1007
|
+
l.prototype = { internalStream: function(d) {
|
|
1008
|
+
var r = null, h = "string";
|
|
1009
|
+
try {
|
|
1010
|
+
if (!d) throw new Error("No output type specified.");
|
|
1011
|
+
var a = (h = d.toLowerCase()) === "string" || h === "text";
|
|
1012
|
+
h !== "binarystring" && h !== "text" || (h = "string"), r = this._decompressWorker();
|
|
1013
|
+
var c = !this._dataBinary;
|
|
1014
|
+
c && !a && (r = r.pipe(new u.Utf8EncodeWorker())), !c && a && (r = r.pipe(new u.Utf8DecodeWorker()));
|
|
1015
|
+
} catch (v) {
|
|
1016
|
+
(r = new y("error")).error(v);
|
|
1017
|
+
}
|
|
1018
|
+
return new o(r, h, "");
|
|
1019
|
+
}, async: function(d, r) {
|
|
1020
|
+
return this.internalStream(d).accumulate(r);
|
|
1021
|
+
}, nodeStream: function(d, r) {
|
|
1022
|
+
return this.internalStream(d || "nodebuffer").toNodejsStream(r);
|
|
1023
|
+
}, _compressWorker: function(d, r) {
|
|
1024
|
+
if (this._data instanceof _ && this._data.compression.magic === d.magic) return this._data.getCompressedWorker();
|
|
1025
|
+
var h = this._decompressWorker();
|
|
1026
|
+
return this._dataBinary || (h = h.pipe(new u.Utf8EncodeWorker())), _.createWorkerFrom(h, d, r);
|
|
1027
|
+
}, _decompressWorker: function() {
|
|
1028
|
+
return this._data instanceof _ ? this._data.getContentWorker() : this._data instanceof y ? this._data : new n(this._data);
|
|
1029
|
+
} };
|
|
1030
|
+
for (var p = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], g = function() {
|
|
1031
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
1032
|
+
}, i = 0; i < p.length; i++) l.prototype[p[i]] = g;
|
|
1033
|
+
U.exports = l;
|
|
1034
|
+
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(b, U, w) {
|
|
1035
|
+
(function(l) {
|
|
1036
|
+
var o, n, u = l.MutationObserver || l.WebKitMutationObserver;
|
|
1037
|
+
if (u) {
|
|
1038
|
+
var _ = 0, y = new u(d), p = l.document.createTextNode("");
|
|
1039
|
+
y.observe(p, { characterData: !0 }), o = function() {
|
|
1040
|
+
p.data = _ = ++_ % 2;
|
|
1041
|
+
};
|
|
1042
|
+
} else if (l.setImmediate || l.MessageChannel === void 0) o = "document" in l && "onreadystatechange" in l.document.createElement("script") ? function() {
|
|
1043
|
+
var r = l.document.createElement("script");
|
|
1044
|
+
r.onreadystatechange = function() {
|
|
1045
|
+
d(), r.onreadystatechange = null, r.parentNode.removeChild(r), r = null;
|
|
1046
|
+
}, l.document.documentElement.appendChild(r);
|
|
1047
|
+
} : function() {
|
|
1048
|
+
setTimeout(d, 0);
|
|
1049
|
+
};
|
|
1050
|
+
else {
|
|
1051
|
+
var g = new l.MessageChannel();
|
|
1052
|
+
g.port1.onmessage = d, o = function() {
|
|
1053
|
+
g.port2.postMessage(0);
|
|
1054
|
+
};
|
|
1055
|
+
}
|
|
1056
|
+
var i = [];
|
|
1057
|
+
function d() {
|
|
1058
|
+
var r, h;
|
|
1059
|
+
n = !0;
|
|
1060
|
+
for (var a = i.length; a; ) {
|
|
1061
|
+
for (h = i, i = [], r = -1; ++r < a; ) h[r]();
|
|
1062
|
+
a = i.length;
|
|
1063
|
+
}
|
|
1064
|
+
n = !1;
|
|
1065
|
+
}
|
|
1066
|
+
U.exports = function(r) {
|
|
1067
|
+
i.push(r) !== 1 || n || o();
|
|
1068
|
+
};
|
|
1069
|
+
}).call(this, typeof vt < "u" ? vt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1070
|
+
}, {}], 37: [function(b, U, w) {
|
|
1071
|
+
var l = b("immediate");
|
|
1072
|
+
function o() {
|
|
1073
|
+
}
|
|
1074
|
+
var n = {}, u = ["REJECTED"], _ = ["FULFILLED"], y = ["PENDING"];
|
|
1075
|
+
function p(a) {
|
|
1076
|
+
if (typeof a != "function") throw new TypeError("resolver must be a function");
|
|
1077
|
+
this.state = y, this.queue = [], this.outcome = void 0, a !== o && r(this, a);
|
|
1078
|
+
}
|
|
1079
|
+
function g(a, c, v) {
|
|
1080
|
+
this.promise = a, typeof c == "function" && (this.onFulfilled = c, this.callFulfilled = this.otherCallFulfilled), typeof v == "function" && (this.onRejected = v, this.callRejected = this.otherCallRejected);
|
|
1081
|
+
}
|
|
1082
|
+
function i(a, c, v) {
|
|
1083
|
+
l(function() {
|
|
1084
|
+
var S;
|
|
1085
|
+
try {
|
|
1086
|
+
S = c(v);
|
|
1087
|
+
} catch (x) {
|
|
1088
|
+
return n.reject(a, x);
|
|
1089
|
+
}
|
|
1090
|
+
S === a ? n.reject(a, new TypeError("Cannot resolve promise with itself")) : n.resolve(a, S);
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
function d(a) {
|
|
1094
|
+
var c = a && a.then;
|
|
1095
|
+
if (a && (typeof a == "object" || typeof a == "function") && typeof c == "function") return function() {
|
|
1096
|
+
c.apply(a, arguments);
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
function r(a, c) {
|
|
1100
|
+
var v = !1;
|
|
1101
|
+
function S(O) {
|
|
1102
|
+
v || (v = !0, n.reject(a, O));
|
|
1103
|
+
}
|
|
1104
|
+
function x(O) {
|
|
1105
|
+
v || (v = !0, n.resolve(a, O));
|
|
1106
|
+
}
|
|
1107
|
+
var D = h(function() {
|
|
1108
|
+
c(x, S);
|
|
1109
|
+
});
|
|
1110
|
+
D.status === "error" && S(D.value);
|
|
1111
|
+
}
|
|
1112
|
+
function h(a, c) {
|
|
1113
|
+
var v = {};
|
|
1114
|
+
try {
|
|
1115
|
+
v.value = a(c), v.status = "success";
|
|
1116
|
+
} catch (S) {
|
|
1117
|
+
v.status = "error", v.value = S;
|
|
1118
|
+
}
|
|
1119
|
+
return v;
|
|
1120
|
+
}
|
|
1121
|
+
(U.exports = p).prototype.finally = function(a) {
|
|
1122
|
+
if (typeof a != "function") return this;
|
|
1123
|
+
var c = this.constructor;
|
|
1124
|
+
return this.then(function(v) {
|
|
1125
|
+
return c.resolve(a()).then(function() {
|
|
1126
|
+
return v;
|
|
1127
|
+
});
|
|
1128
|
+
}, function(v) {
|
|
1129
|
+
return c.resolve(a()).then(function() {
|
|
1130
|
+
throw v;
|
|
1131
|
+
});
|
|
1132
|
+
});
|
|
1133
|
+
}, p.prototype.catch = function(a) {
|
|
1134
|
+
return this.then(null, a);
|
|
1135
|
+
}, p.prototype.then = function(a, c) {
|
|
1136
|
+
if (typeof a != "function" && this.state === _ || typeof c != "function" && this.state === u) return this;
|
|
1137
|
+
var v = new this.constructor(o);
|
|
1138
|
+
return this.state !== y ? i(v, this.state === _ ? a : c, this.outcome) : this.queue.push(new g(v, a, c)), v;
|
|
1139
|
+
}, g.prototype.callFulfilled = function(a) {
|
|
1140
|
+
n.resolve(this.promise, a);
|
|
1141
|
+
}, g.prototype.otherCallFulfilled = function(a) {
|
|
1142
|
+
i(this.promise, this.onFulfilled, a);
|
|
1143
|
+
}, g.prototype.callRejected = function(a) {
|
|
1144
|
+
n.reject(this.promise, a);
|
|
1145
|
+
}, g.prototype.otherCallRejected = function(a) {
|
|
1146
|
+
i(this.promise, this.onRejected, a);
|
|
1147
|
+
}, n.resolve = function(a, c) {
|
|
1148
|
+
var v = h(d, c);
|
|
1149
|
+
if (v.status === "error") return n.reject(a, v.value);
|
|
1150
|
+
var S = v.value;
|
|
1151
|
+
if (S) r(a, S);
|
|
1152
|
+
else {
|
|
1153
|
+
a.state = _, a.outcome = c;
|
|
1154
|
+
for (var x = -1, D = a.queue.length; ++x < D; ) a.queue[x].callFulfilled(c);
|
|
1155
|
+
}
|
|
1156
|
+
return a;
|
|
1157
|
+
}, n.reject = function(a, c) {
|
|
1158
|
+
a.state = u, a.outcome = c;
|
|
1159
|
+
for (var v = -1, S = a.queue.length; ++v < S; ) a.queue[v].callRejected(c);
|
|
1160
|
+
return a;
|
|
1161
|
+
}, p.resolve = function(a) {
|
|
1162
|
+
return a instanceof this ? a : n.resolve(new this(o), a);
|
|
1163
|
+
}, p.reject = function(a) {
|
|
1164
|
+
var c = new this(o);
|
|
1165
|
+
return n.reject(c, a);
|
|
1166
|
+
}, p.all = function(a) {
|
|
1167
|
+
var c = this;
|
|
1168
|
+
if (Object.prototype.toString.call(a) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1169
|
+
var v = a.length, S = !1;
|
|
1170
|
+
if (!v) return this.resolve([]);
|
|
1171
|
+
for (var x = new Array(v), D = 0, O = -1, L = new this(o); ++O < v; ) I(a[O], O);
|
|
1172
|
+
return L;
|
|
1173
|
+
function I(W, q) {
|
|
1174
|
+
c.resolve(W).then(function(m) {
|
|
1175
|
+
x[q] = m, ++D !== v || S || (S = !0, n.resolve(L, x));
|
|
1176
|
+
}, function(m) {
|
|
1177
|
+
S || (S = !0, n.reject(L, m));
|
|
1178
|
+
});
|
|
1179
|
+
}
|
|
1180
|
+
}, p.race = function(a) {
|
|
1181
|
+
var c = this;
|
|
1182
|
+
if (Object.prototype.toString.call(a) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1183
|
+
var v = a.length, S = !1;
|
|
1184
|
+
if (!v) return this.resolve([]);
|
|
1185
|
+
for (var x = -1, D = new this(o); ++x < v; ) O = a[x], c.resolve(O).then(function(L) {
|
|
1186
|
+
S || (S = !0, n.resolve(D, L));
|
|
1187
|
+
}, function(L) {
|
|
1188
|
+
S || (S = !0, n.reject(D, L));
|
|
1189
|
+
});
|
|
1190
|
+
var O;
|
|
1191
|
+
return D;
|
|
1192
|
+
};
|
|
1193
|
+
}, { immediate: 36 }], 38: [function(b, U, w) {
|
|
1194
|
+
var l = {};
|
|
1195
|
+
(0, b("./lib/utils/common").assign)(l, b("./lib/deflate"), b("./lib/inflate"), b("./lib/zlib/constants")), U.exports = l;
|
|
1196
|
+
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(b, U, w) {
|
|
1197
|
+
var l = b("./zlib/deflate"), o = b("./utils/common"), n = b("./utils/strings"), u = b("./zlib/messages"), _ = b("./zlib/zstream"), y = Object.prototype.toString, p = 0, g = -1, i = 0, d = 8;
|
|
1198
|
+
function r(a) {
|
|
1199
|
+
if (!(this instanceof r)) return new r(a);
|
|
1200
|
+
this.options = o.assign({ level: g, method: d, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: i, to: "" }, a || {});
|
|
1201
|
+
var c = this.options;
|
|
1202
|
+
c.raw && 0 < c.windowBits ? c.windowBits = -c.windowBits : c.gzip && 0 < c.windowBits && c.windowBits < 16 && (c.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new _(), this.strm.avail_out = 0;
|
|
1203
|
+
var v = l.deflateInit2(this.strm, c.level, c.method, c.windowBits, c.memLevel, c.strategy);
|
|
1204
|
+
if (v !== p) throw new Error(u[v]);
|
|
1205
|
+
if (c.header && l.deflateSetHeader(this.strm, c.header), c.dictionary) {
|
|
1206
|
+
var S;
|
|
1207
|
+
if (S = typeof c.dictionary == "string" ? n.string2buf(c.dictionary) : y.call(c.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(c.dictionary) : c.dictionary, (v = l.deflateSetDictionary(this.strm, S)) !== p) throw new Error(u[v]);
|
|
1208
|
+
this._dict_set = !0;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
function h(a, c) {
|
|
1212
|
+
var v = new r(c);
|
|
1213
|
+
if (v.push(a, !0), v.err) throw v.msg || u[v.err];
|
|
1214
|
+
return v.result;
|
|
1215
|
+
}
|
|
1216
|
+
r.prototype.push = function(a, c) {
|
|
1217
|
+
var v, S, x = this.strm, D = this.options.chunkSize;
|
|
1218
|
+
if (this.ended) return !1;
|
|
1219
|
+
S = c === ~~c ? c : c === !0 ? 4 : 0, typeof a == "string" ? x.input = n.string2buf(a) : y.call(a) === "[object ArrayBuffer]" ? x.input = new Uint8Array(a) : x.input = a, x.next_in = 0, x.avail_in = x.input.length;
|
|
1220
|
+
do {
|
|
1221
|
+
if (x.avail_out === 0 && (x.output = new o.Buf8(D), x.next_out = 0, x.avail_out = D), (v = l.deflate(x, S)) !== 1 && v !== p) return this.onEnd(v), !(this.ended = !0);
|
|
1222
|
+
x.avail_out !== 0 && (x.avail_in !== 0 || S !== 4 && S !== 2) || (this.options.to === "string" ? this.onData(n.buf2binstring(o.shrinkBuf(x.output, x.next_out))) : this.onData(o.shrinkBuf(x.output, x.next_out)));
|
|
1223
|
+
} while ((0 < x.avail_in || x.avail_out === 0) && v !== 1);
|
|
1224
|
+
return S === 4 ? (v = l.deflateEnd(this.strm), this.onEnd(v), this.ended = !0, v === p) : S !== 2 || (this.onEnd(p), !(x.avail_out = 0));
|
|
1225
|
+
}, r.prototype.onData = function(a) {
|
|
1226
|
+
this.chunks.push(a);
|
|
1227
|
+
}, r.prototype.onEnd = function(a) {
|
|
1228
|
+
a === p && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = a, this.msg = this.strm.msg;
|
|
1229
|
+
}, w.Deflate = r, w.deflate = h, w.deflateRaw = function(a, c) {
|
|
1230
|
+
return (c = c || {}).raw = !0, h(a, c);
|
|
1231
|
+
}, w.gzip = function(a, c) {
|
|
1232
|
+
return (c = c || {}).gzip = !0, h(a, c);
|
|
1233
|
+
};
|
|
1234
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(b, U, w) {
|
|
1235
|
+
var l = b("./zlib/inflate"), o = b("./utils/common"), n = b("./utils/strings"), u = b("./zlib/constants"), _ = b("./zlib/messages"), y = b("./zlib/zstream"), p = b("./zlib/gzheader"), g = Object.prototype.toString;
|
|
1236
|
+
function i(r) {
|
|
1237
|
+
if (!(this instanceof i)) return new i(r);
|
|
1238
|
+
this.options = o.assign({ chunkSize: 16384, windowBits: 0, to: "" }, r || {});
|
|
1239
|
+
var h = this.options;
|
|
1240
|
+
h.raw && 0 <= h.windowBits && h.windowBits < 16 && (h.windowBits = -h.windowBits, h.windowBits === 0 && (h.windowBits = -15)), !(0 <= h.windowBits && h.windowBits < 16) || r && r.windowBits || (h.windowBits += 32), 15 < h.windowBits && h.windowBits < 48 && (15 & h.windowBits) == 0 && (h.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new y(), this.strm.avail_out = 0;
|
|
1241
|
+
var a = l.inflateInit2(this.strm, h.windowBits);
|
|
1242
|
+
if (a !== u.Z_OK) throw new Error(_[a]);
|
|
1243
|
+
this.header = new p(), l.inflateGetHeader(this.strm, this.header);
|
|
1244
|
+
}
|
|
1245
|
+
function d(r, h) {
|
|
1246
|
+
var a = new i(h);
|
|
1247
|
+
if (a.push(r, !0), a.err) throw a.msg || _[a.err];
|
|
1248
|
+
return a.result;
|
|
1249
|
+
}
|
|
1250
|
+
i.prototype.push = function(r, h) {
|
|
1251
|
+
var a, c, v, S, x, D, O = this.strm, L = this.options.chunkSize, I = this.options.dictionary, W = !1;
|
|
1252
|
+
if (this.ended) return !1;
|
|
1253
|
+
c = h === ~~h ? h : h === !0 ? u.Z_FINISH : u.Z_NO_FLUSH, typeof r == "string" ? O.input = n.binstring2buf(r) : g.call(r) === "[object ArrayBuffer]" ? O.input = new Uint8Array(r) : O.input = r, O.next_in = 0, O.avail_in = O.input.length;
|
|
1254
|
+
do {
|
|
1255
|
+
if (O.avail_out === 0 && (O.output = new o.Buf8(L), O.next_out = 0, O.avail_out = L), (a = l.inflate(O, u.Z_NO_FLUSH)) === u.Z_NEED_DICT && I && (D = typeof I == "string" ? n.string2buf(I) : g.call(I) === "[object ArrayBuffer]" ? new Uint8Array(I) : I, a = l.inflateSetDictionary(this.strm, D)), a === u.Z_BUF_ERROR && W === !0 && (a = u.Z_OK, W = !1), a !== u.Z_STREAM_END && a !== u.Z_OK) return this.onEnd(a), !(this.ended = !0);
|
|
1256
|
+
O.next_out && (O.avail_out !== 0 && a !== u.Z_STREAM_END && (O.avail_in !== 0 || c !== u.Z_FINISH && c !== u.Z_SYNC_FLUSH) || (this.options.to === "string" ? (v = n.utf8border(O.output, O.next_out), S = O.next_out - v, x = n.buf2string(O.output, v), O.next_out = S, O.avail_out = L - S, S && o.arraySet(O.output, O.output, v, S, 0), this.onData(x)) : this.onData(o.shrinkBuf(O.output, O.next_out)))), O.avail_in === 0 && O.avail_out === 0 && (W = !0);
|
|
1257
|
+
} while ((0 < O.avail_in || O.avail_out === 0) && a !== u.Z_STREAM_END);
|
|
1258
|
+
return a === u.Z_STREAM_END && (c = u.Z_FINISH), c === u.Z_FINISH ? (a = l.inflateEnd(this.strm), this.onEnd(a), this.ended = !0, a === u.Z_OK) : c !== u.Z_SYNC_FLUSH || (this.onEnd(u.Z_OK), !(O.avail_out = 0));
|
|
1259
|
+
}, i.prototype.onData = function(r) {
|
|
1260
|
+
this.chunks.push(r);
|
|
1261
|
+
}, i.prototype.onEnd = function(r) {
|
|
1262
|
+
r === u.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = r, this.msg = this.strm.msg;
|
|
1263
|
+
}, w.Inflate = i, w.inflate = d, w.inflateRaw = function(r, h) {
|
|
1264
|
+
return (h = h || {}).raw = !0, d(r, h);
|
|
1265
|
+
}, w.ungzip = d;
|
|
1266
|
+
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(b, U, w) {
|
|
1267
|
+
var l = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
|
|
1268
|
+
w.assign = function(u) {
|
|
1269
|
+
for (var _ = Array.prototype.slice.call(arguments, 1); _.length; ) {
|
|
1270
|
+
var y = _.shift();
|
|
1271
|
+
if (y) {
|
|
1272
|
+
if (typeof y != "object") throw new TypeError(y + "must be non-object");
|
|
1273
|
+
for (var p in y) y.hasOwnProperty(p) && (u[p] = y[p]);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
return u;
|
|
1277
|
+
}, w.shrinkBuf = function(u, _) {
|
|
1278
|
+
return u.length === _ ? u : u.subarray ? u.subarray(0, _) : (u.length = _, u);
|
|
1279
|
+
};
|
|
1280
|
+
var o = { arraySet: function(u, _, y, p, g) {
|
|
1281
|
+
if (_.subarray && u.subarray) u.set(_.subarray(y, y + p), g);
|
|
1282
|
+
else for (var i = 0; i < p; i++) u[g + i] = _[y + i];
|
|
1283
|
+
}, flattenChunks: function(u) {
|
|
1284
|
+
var _, y, p, g, i, d;
|
|
1285
|
+
for (_ = p = 0, y = u.length; _ < y; _++) p += u[_].length;
|
|
1286
|
+
for (d = new Uint8Array(p), _ = g = 0, y = u.length; _ < y; _++) i = u[_], d.set(i, g), g += i.length;
|
|
1287
|
+
return d;
|
|
1288
|
+
} }, n = { arraySet: function(u, _, y, p, g) {
|
|
1289
|
+
for (var i = 0; i < p; i++) u[g + i] = _[y + i];
|
|
1290
|
+
}, flattenChunks: function(u) {
|
|
1291
|
+
return [].concat.apply([], u);
|
|
1292
|
+
} };
|
|
1293
|
+
w.setTyped = function(u) {
|
|
1294
|
+
u ? (w.Buf8 = Uint8Array, w.Buf16 = Uint16Array, w.Buf32 = Int32Array, w.assign(w, o)) : (w.Buf8 = Array, w.Buf16 = Array, w.Buf32 = Array, w.assign(w, n));
|
|
1295
|
+
}, w.setTyped(l);
|
|
1296
|
+
}, {}], 42: [function(b, U, w) {
|
|
1297
|
+
var l = b("./common"), o = !0, n = !0;
|
|
1298
|
+
try {
|
|
1299
|
+
String.fromCharCode.apply(null, [0]);
|
|
1300
|
+
} catch {
|
|
1301
|
+
o = !1;
|
|
1302
|
+
}
|
|
1303
|
+
try {
|
|
1304
|
+
String.fromCharCode.apply(null, new Uint8Array(1));
|
|
1305
|
+
} catch {
|
|
1306
|
+
n = !1;
|
|
1307
|
+
}
|
|
1308
|
+
for (var u = new l.Buf8(256), _ = 0; _ < 256; _++) u[_] = 252 <= _ ? 6 : 248 <= _ ? 5 : 240 <= _ ? 4 : 224 <= _ ? 3 : 192 <= _ ? 2 : 1;
|
|
1309
|
+
function y(p, g) {
|
|
1310
|
+
if (g < 65537 && (p.subarray && n || !p.subarray && o)) return String.fromCharCode.apply(null, l.shrinkBuf(p, g));
|
|
1311
|
+
for (var i = "", d = 0; d < g; d++) i += String.fromCharCode(p[d]);
|
|
1312
|
+
return i;
|
|
1313
|
+
}
|
|
1314
|
+
u[254] = u[254] = 1, w.string2buf = function(p) {
|
|
1315
|
+
var g, i, d, r, h, a = p.length, c = 0;
|
|
1316
|
+
for (r = 0; r < a; r++) (64512 & (i = p.charCodeAt(r))) == 55296 && r + 1 < a && (64512 & (d = p.charCodeAt(r + 1))) == 56320 && (i = 65536 + (i - 55296 << 10) + (d - 56320), r++), c += i < 128 ? 1 : i < 2048 ? 2 : i < 65536 ? 3 : 4;
|
|
1317
|
+
for (g = new l.Buf8(c), r = h = 0; h < c; r++) (64512 & (i = p.charCodeAt(r))) == 55296 && r + 1 < a && (64512 & (d = p.charCodeAt(r + 1))) == 56320 && (i = 65536 + (i - 55296 << 10) + (d - 56320), r++), i < 128 ? g[h++] = i : (i < 2048 ? g[h++] = 192 | i >>> 6 : (i < 65536 ? g[h++] = 224 | i >>> 12 : (g[h++] = 240 | i >>> 18, g[h++] = 128 | i >>> 12 & 63), g[h++] = 128 | i >>> 6 & 63), g[h++] = 128 | 63 & i);
|
|
1318
|
+
return g;
|
|
1319
|
+
}, w.buf2binstring = function(p) {
|
|
1320
|
+
return y(p, p.length);
|
|
1321
|
+
}, w.binstring2buf = function(p) {
|
|
1322
|
+
for (var g = new l.Buf8(p.length), i = 0, d = g.length; i < d; i++) g[i] = p.charCodeAt(i);
|
|
1323
|
+
return g;
|
|
1324
|
+
}, w.buf2string = function(p, g) {
|
|
1325
|
+
var i, d, r, h, a = g || p.length, c = new Array(2 * a);
|
|
1326
|
+
for (i = d = 0; i < a; ) if ((r = p[i++]) < 128) c[d++] = r;
|
|
1327
|
+
else if (4 < (h = u[r])) c[d++] = 65533, i += h - 1;
|
|
1328
|
+
else {
|
|
1329
|
+
for (r &= h === 2 ? 31 : h === 3 ? 15 : 7; 1 < h && i < a; ) r = r << 6 | 63 & p[i++], h--;
|
|
1330
|
+
1 < h ? c[d++] = 65533 : r < 65536 ? c[d++] = r : (r -= 65536, c[d++] = 55296 | r >> 10 & 1023, c[d++] = 56320 | 1023 & r);
|
|
1331
|
+
}
|
|
1332
|
+
return y(c, d);
|
|
1333
|
+
}, w.utf8border = function(p, g) {
|
|
1334
|
+
var i;
|
|
1335
|
+
for ((g = g || p.length) > p.length && (g = p.length), i = g - 1; 0 <= i && (192 & p[i]) == 128; ) i--;
|
|
1336
|
+
return i < 0 || i === 0 ? g : i + u[p[i]] > g ? i : g;
|
|
1337
|
+
};
|
|
1338
|
+
}, { "./common": 41 }], 43: [function(b, U, w) {
|
|
1339
|
+
U.exports = function(l, o, n, u) {
|
|
1340
|
+
for (var _ = 65535 & l | 0, y = l >>> 16 & 65535 | 0, p = 0; n !== 0; ) {
|
|
1341
|
+
for (n -= p = 2e3 < n ? 2e3 : n; y = y + (_ = _ + o[u++] | 0) | 0, --p; ) ;
|
|
1342
|
+
_ %= 65521, y %= 65521;
|
|
1343
|
+
}
|
|
1344
|
+
return _ | y << 16 | 0;
|
|
1345
|
+
};
|
|
1346
|
+
}, {}], 44: [function(b, U, w) {
|
|
1347
|
+
U.exports = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8 };
|
|
1348
|
+
}, {}], 45: [function(b, U, w) {
|
|
1349
|
+
var l = (function() {
|
|
1350
|
+
for (var o, n = [], u = 0; u < 256; u++) {
|
|
1351
|
+
o = u;
|
|
1352
|
+
for (var _ = 0; _ < 8; _++) o = 1 & o ? 3988292384 ^ o >>> 1 : o >>> 1;
|
|
1353
|
+
n[u] = o;
|
|
1354
|
+
}
|
|
1355
|
+
return n;
|
|
1356
|
+
})();
|
|
1357
|
+
U.exports = function(o, n, u, _) {
|
|
1358
|
+
var y = l, p = _ + u;
|
|
1359
|
+
o ^= -1;
|
|
1360
|
+
for (var g = _; g < p; g++) o = o >>> 8 ^ y[255 & (o ^ n[g])];
|
|
1361
|
+
return -1 ^ o;
|
|
1362
|
+
};
|
|
1363
|
+
}, {}], 46: [function(b, U, w) {
|
|
1364
|
+
var l, o = b("../utils/common"), n = b("./trees"), u = b("./adler32"), _ = b("./crc32"), y = b("./messages"), p = 0, g = 4, i = 0, d = -2, r = -1, h = 4, a = 2, c = 8, v = 9, S = 286, x = 30, D = 19, O = 2 * S + 1, L = 15, I = 3, W = 258, q = W + I + 1, m = 42, B = 113, e = 1, T = 2, J = 3, P = 4;
|
|
1365
|
+
function $(t, R) {
|
|
1366
|
+
return t.msg = y[R], R;
|
|
1367
|
+
}
|
|
1368
|
+
function j(t) {
|
|
1369
|
+
return (t << 1) - (4 < t ? 9 : 0);
|
|
1370
|
+
}
|
|
1371
|
+
function V(t) {
|
|
1372
|
+
for (var R = t.length; 0 <= --R; ) t[R] = 0;
|
|
1373
|
+
}
|
|
1374
|
+
function E(t) {
|
|
1375
|
+
var R = t.state, A = R.pending;
|
|
1376
|
+
A > t.avail_out && (A = t.avail_out), A !== 0 && (o.arraySet(t.output, R.pending_buf, R.pending_out, A, t.next_out), t.next_out += A, R.pending_out += A, t.total_out += A, t.avail_out -= A, R.pending -= A, R.pending === 0 && (R.pending_out = 0));
|
|
1377
|
+
}
|
|
1378
|
+
function C(t, R) {
|
|
1379
|
+
n._tr_flush_block(t, 0 <= t.block_start ? t.block_start : -1, t.strstart - t.block_start, R), t.block_start = t.strstart, E(t.strm);
|
|
1380
|
+
}
|
|
1381
|
+
function X(t, R) {
|
|
1382
|
+
t.pending_buf[t.pending++] = R;
|
|
1383
|
+
}
|
|
1384
|
+
function G(t, R) {
|
|
1385
|
+
t.pending_buf[t.pending++] = R >>> 8 & 255, t.pending_buf[t.pending++] = 255 & R;
|
|
1386
|
+
}
|
|
1387
|
+
function H(t, R) {
|
|
1388
|
+
var A, f, s = t.max_chain_length, k = t.strstart, F = t.prev_length, N = t.nice_match, z = t.strstart > t.w_size - q ? t.strstart - (t.w_size - q) : 0, Z = t.window, K = t.w_mask, M = t.prev, Y = t.strstart + W, rt = Z[k + F - 1], tt = Z[k + F];
|
|
1389
|
+
t.prev_length >= t.good_match && (s >>= 2), N > t.lookahead && (N = t.lookahead);
|
|
1390
|
+
do
|
|
1391
|
+
if (Z[(A = R) + F] === tt && Z[A + F - 1] === rt && Z[A] === Z[k] && Z[++A] === Z[k + 1]) {
|
|
1392
|
+
k += 2, A++;
|
|
1393
|
+
do
|
|
1394
|
+
;
|
|
1395
|
+
while (Z[++k] === Z[++A] && Z[++k] === Z[++A] && Z[++k] === Z[++A] && Z[++k] === Z[++A] && Z[++k] === Z[++A] && Z[++k] === Z[++A] && Z[++k] === Z[++A] && Z[++k] === Z[++A] && k < Y);
|
|
1396
|
+
if (f = W - (Y - k), k = Y - W, F < f) {
|
|
1397
|
+
if (t.match_start = R, N <= (F = f)) break;
|
|
1398
|
+
rt = Z[k + F - 1], tt = Z[k + F];
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
while ((R = M[R & K]) > z && --s != 0);
|
|
1402
|
+
return F <= t.lookahead ? F : t.lookahead;
|
|
1403
|
+
}
|
|
1404
|
+
function nt(t) {
|
|
1405
|
+
var R, A, f, s, k, F, N, z, Z, K, M = t.w_size;
|
|
1406
|
+
do {
|
|
1407
|
+
if (s = t.window_size - t.lookahead - t.strstart, t.strstart >= M + (M - q)) {
|
|
1408
|
+
for (o.arraySet(t.window, t.window, M, M, 0), t.match_start -= M, t.strstart -= M, t.block_start -= M, R = A = t.hash_size; f = t.head[--R], t.head[R] = M <= f ? f - M : 0, --A; ) ;
|
|
1409
|
+
for (R = A = M; f = t.prev[--R], t.prev[R] = M <= f ? f - M : 0, --A; ) ;
|
|
1410
|
+
s += M;
|
|
1411
|
+
}
|
|
1412
|
+
if (t.strm.avail_in === 0) break;
|
|
1413
|
+
if (F = t.strm, N = t.window, z = t.strstart + t.lookahead, Z = s, K = void 0, K = F.avail_in, Z < K && (K = Z), A = K === 0 ? 0 : (F.avail_in -= K, o.arraySet(N, F.input, F.next_in, K, z), F.state.wrap === 1 ? F.adler = u(F.adler, N, K, z) : F.state.wrap === 2 && (F.adler = _(F.adler, N, K, z)), F.next_in += K, F.total_in += K, K), t.lookahead += A, t.lookahead + t.insert >= I) for (k = t.strstart - t.insert, t.ins_h = t.window[k], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[k + 1]) & t.hash_mask; t.insert && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[k + I - 1]) & t.hash_mask, t.prev[k & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = k, k++, t.insert--, !(t.lookahead + t.insert < I)); ) ;
|
|
1414
|
+
} while (t.lookahead < q && t.strm.avail_in !== 0);
|
|
1415
|
+
}
|
|
1416
|
+
function ot(t, R) {
|
|
1417
|
+
for (var A, f; ; ) {
|
|
1418
|
+
if (t.lookahead < q) {
|
|
1419
|
+
if (nt(t), t.lookahead < q && R === p) return e;
|
|
1420
|
+
if (t.lookahead === 0) break;
|
|
1421
|
+
}
|
|
1422
|
+
if (A = 0, t.lookahead >= I && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + I - 1]) & t.hash_mask, A = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), A !== 0 && t.strstart - A <= t.w_size - q && (t.match_length = H(t, A)), t.match_length >= I) if (f = n._tr_tally(t, t.strstart - t.match_start, t.match_length - I), t.lookahead -= t.match_length, t.match_length <= t.max_lazy_match && t.lookahead >= I) {
|
|
1423
|
+
for (t.match_length--; t.strstart++, t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + I - 1]) & t.hash_mask, A = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart, --t.match_length != 0; ) ;
|
|
1424
|
+
t.strstart++;
|
|
1425
|
+
} else t.strstart += t.match_length, t.match_length = 0, t.ins_h = t.window[t.strstart], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + 1]) & t.hash_mask;
|
|
1426
|
+
else f = n._tr_tally(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++;
|
|
1427
|
+
if (f && (C(t, !1), t.strm.avail_out === 0)) return e;
|
|
1428
|
+
}
|
|
1429
|
+
return t.insert = t.strstart < I - 1 ? t.strstart : I - 1, R === g ? (C(t, !0), t.strm.avail_out === 0 ? J : P) : t.last_lit && (C(t, !1), t.strm.avail_out === 0) ? e : T;
|
|
1430
|
+
}
|
|
1431
|
+
function Q(t, R) {
|
|
1432
|
+
for (var A, f, s; ; ) {
|
|
1433
|
+
if (t.lookahead < q) {
|
|
1434
|
+
if (nt(t), t.lookahead < q && R === p) return e;
|
|
1435
|
+
if (t.lookahead === 0) break;
|
|
1436
|
+
}
|
|
1437
|
+
if (A = 0, t.lookahead >= I && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + I - 1]) & t.hash_mask, A = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), t.prev_length = t.match_length, t.prev_match = t.match_start, t.match_length = I - 1, A !== 0 && t.prev_length < t.max_lazy_match && t.strstart - A <= t.w_size - q && (t.match_length = H(t, A), t.match_length <= 5 && (t.strategy === 1 || t.match_length === I && 4096 < t.strstart - t.match_start) && (t.match_length = I - 1)), t.prev_length >= I && t.match_length <= t.prev_length) {
|
|
1438
|
+
for (s = t.strstart + t.lookahead - I, f = n._tr_tally(t, t.strstart - 1 - t.prev_match, t.prev_length - I), t.lookahead -= t.prev_length - 1, t.prev_length -= 2; ++t.strstart <= s && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + I - 1]) & t.hash_mask, A = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), --t.prev_length != 0; ) ;
|
|
1439
|
+
if (t.match_available = 0, t.match_length = I - 1, t.strstart++, f && (C(t, !1), t.strm.avail_out === 0)) return e;
|
|
1440
|
+
} else if (t.match_available) {
|
|
1441
|
+
if ((f = n._tr_tally(t, 0, t.window[t.strstart - 1])) && C(t, !1), t.strstart++, t.lookahead--, t.strm.avail_out === 0) return e;
|
|
1442
|
+
} else t.match_available = 1, t.strstart++, t.lookahead--;
|
|
1443
|
+
}
|
|
1444
|
+
return t.match_available && (f = n._tr_tally(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart < I - 1 ? t.strstart : I - 1, R === g ? (C(t, !0), t.strm.avail_out === 0 ? J : P) : t.last_lit && (C(t, !1), t.strm.avail_out === 0) ? e : T;
|
|
1445
|
+
}
|
|
1446
|
+
function et(t, R, A, f, s) {
|
|
1447
|
+
this.good_length = t, this.max_lazy = R, this.nice_length = A, this.max_chain = f, this.func = s;
|
|
1448
|
+
}
|
|
1449
|
+
function st() {
|
|
1450
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = c, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new o.Buf16(2 * O), this.dyn_dtree = new o.Buf16(2 * (2 * x + 1)), this.bl_tree = new o.Buf16(2 * (2 * D + 1)), V(this.dyn_ltree), V(this.dyn_dtree), V(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new o.Buf16(L + 1), this.heap = new o.Buf16(2 * S + 1), V(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new o.Buf16(2 * S + 1), V(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
1451
|
+
}
|
|
1452
|
+
function it(t) {
|
|
1453
|
+
var R;
|
|
1454
|
+
return t && t.state ? (t.total_in = t.total_out = 0, t.data_type = a, (R = t.state).pending = 0, R.pending_out = 0, R.wrap < 0 && (R.wrap = -R.wrap), R.status = R.wrap ? m : B, t.adler = R.wrap === 2 ? 0 : 1, R.last_flush = p, n._tr_init(R), i) : $(t, d);
|
|
1455
|
+
}
|
|
1456
|
+
function ft(t) {
|
|
1457
|
+
var R = it(t);
|
|
1458
|
+
return R === i && (function(A) {
|
|
1459
|
+
A.window_size = 2 * A.w_size, V(A.head), A.max_lazy_match = l[A.level].max_lazy, A.good_match = l[A.level].good_length, A.nice_match = l[A.level].nice_length, A.max_chain_length = l[A.level].max_chain, A.strstart = 0, A.block_start = 0, A.lookahead = 0, A.insert = 0, A.match_length = A.prev_length = I - 1, A.match_available = 0, A.ins_h = 0;
|
|
1460
|
+
})(t.state), R;
|
|
1461
|
+
}
|
|
1462
|
+
function lt(t, R, A, f, s, k) {
|
|
1463
|
+
if (!t) return d;
|
|
1464
|
+
var F = 1;
|
|
1465
|
+
if (R === r && (R = 6), f < 0 ? (F = 0, f = -f) : 15 < f && (F = 2, f -= 16), s < 1 || v < s || A !== c || f < 8 || 15 < f || R < 0 || 9 < R || k < 0 || h < k) return $(t, d);
|
|
1466
|
+
f === 8 && (f = 9);
|
|
1467
|
+
var N = new st();
|
|
1468
|
+
return (t.state = N).strm = t, N.wrap = F, N.gzhead = null, N.w_bits = f, N.w_size = 1 << N.w_bits, N.w_mask = N.w_size - 1, N.hash_bits = s + 7, N.hash_size = 1 << N.hash_bits, N.hash_mask = N.hash_size - 1, N.hash_shift = ~~((N.hash_bits + I - 1) / I), N.window = new o.Buf8(2 * N.w_size), N.head = new o.Buf16(N.hash_size), N.prev = new o.Buf16(N.w_size), N.lit_bufsize = 1 << s + 6, N.pending_buf_size = 4 * N.lit_bufsize, N.pending_buf = new o.Buf8(N.pending_buf_size), N.d_buf = 1 * N.lit_bufsize, N.l_buf = 3 * N.lit_bufsize, N.level = R, N.strategy = k, N.method = A, ft(t);
|
|
1469
|
+
}
|
|
1470
|
+
l = [new et(0, 0, 0, 0, function(t, R) {
|
|
1471
|
+
var A = 65535;
|
|
1472
|
+
for (A > t.pending_buf_size - 5 && (A = t.pending_buf_size - 5); ; ) {
|
|
1473
|
+
if (t.lookahead <= 1) {
|
|
1474
|
+
if (nt(t), t.lookahead === 0 && R === p) return e;
|
|
1475
|
+
if (t.lookahead === 0) break;
|
|
1476
|
+
}
|
|
1477
|
+
t.strstart += t.lookahead, t.lookahead = 0;
|
|
1478
|
+
var f = t.block_start + A;
|
|
1479
|
+
if ((t.strstart === 0 || t.strstart >= f) && (t.lookahead = t.strstart - f, t.strstart = f, C(t, !1), t.strm.avail_out === 0) || t.strstart - t.block_start >= t.w_size - q && (C(t, !1), t.strm.avail_out === 0)) return e;
|
|
1480
|
+
}
|
|
1481
|
+
return t.insert = 0, R === g ? (C(t, !0), t.strm.avail_out === 0 ? J : P) : (t.strstart > t.block_start && (C(t, !1), t.strm.avail_out), e);
|
|
1482
|
+
}), new et(4, 4, 8, 4, ot), new et(4, 5, 16, 8, ot), new et(4, 6, 32, 32, ot), new et(4, 4, 16, 16, Q), new et(8, 16, 32, 32, Q), new et(8, 16, 128, 128, Q), new et(8, 32, 128, 256, Q), new et(32, 128, 258, 1024, Q), new et(32, 258, 258, 4096, Q)], w.deflateInit = function(t, R) {
|
|
1483
|
+
return lt(t, R, c, 15, 8, 0);
|
|
1484
|
+
}, w.deflateInit2 = lt, w.deflateReset = ft, w.deflateResetKeep = it, w.deflateSetHeader = function(t, R) {
|
|
1485
|
+
return t && t.state ? t.state.wrap !== 2 ? d : (t.state.gzhead = R, i) : d;
|
|
1486
|
+
}, w.deflate = function(t, R) {
|
|
1487
|
+
var A, f, s, k;
|
|
1488
|
+
if (!t || !t.state || 5 < R || R < 0) return t ? $(t, d) : d;
|
|
1489
|
+
if (f = t.state, !t.output || !t.input && t.avail_in !== 0 || f.status === 666 && R !== g) return $(t, t.avail_out === 0 ? -5 : d);
|
|
1490
|
+
if (f.strm = t, A = f.last_flush, f.last_flush = R, f.status === m) if (f.wrap === 2) t.adler = 0, X(f, 31), X(f, 139), X(f, 8), f.gzhead ? (X(f, (f.gzhead.text ? 1 : 0) + (f.gzhead.hcrc ? 2 : 0) + (f.gzhead.extra ? 4 : 0) + (f.gzhead.name ? 8 : 0) + (f.gzhead.comment ? 16 : 0)), X(f, 255 & f.gzhead.time), X(f, f.gzhead.time >> 8 & 255), X(f, f.gzhead.time >> 16 & 255), X(f, f.gzhead.time >> 24 & 255), X(f, f.level === 9 ? 2 : 2 <= f.strategy || f.level < 2 ? 4 : 0), X(f, 255 & f.gzhead.os), f.gzhead.extra && f.gzhead.extra.length && (X(f, 255 & f.gzhead.extra.length), X(f, f.gzhead.extra.length >> 8 & 255)), f.gzhead.hcrc && (t.adler = _(t.adler, f.pending_buf, f.pending, 0)), f.gzindex = 0, f.status = 69) : (X(f, 0), X(f, 0), X(f, 0), X(f, 0), X(f, 0), X(f, f.level === 9 ? 2 : 2 <= f.strategy || f.level < 2 ? 4 : 0), X(f, 3), f.status = B);
|
|
1491
|
+
else {
|
|
1492
|
+
var F = c + (f.w_bits - 8 << 4) << 8;
|
|
1493
|
+
F |= (2 <= f.strategy || f.level < 2 ? 0 : f.level < 6 ? 1 : f.level === 6 ? 2 : 3) << 6, f.strstart !== 0 && (F |= 32), F += 31 - F % 31, f.status = B, G(f, F), f.strstart !== 0 && (G(f, t.adler >>> 16), G(f, 65535 & t.adler)), t.adler = 1;
|
|
1494
|
+
}
|
|
1495
|
+
if (f.status === 69) if (f.gzhead.extra) {
|
|
1496
|
+
for (s = f.pending; f.gzindex < (65535 & f.gzhead.extra.length) && (f.pending !== f.pending_buf_size || (f.gzhead.hcrc && f.pending > s && (t.adler = _(t.adler, f.pending_buf, f.pending - s, s)), E(t), s = f.pending, f.pending !== f.pending_buf_size)); ) X(f, 255 & f.gzhead.extra[f.gzindex]), f.gzindex++;
|
|
1497
|
+
f.gzhead.hcrc && f.pending > s && (t.adler = _(t.adler, f.pending_buf, f.pending - s, s)), f.gzindex === f.gzhead.extra.length && (f.gzindex = 0, f.status = 73);
|
|
1498
|
+
} else f.status = 73;
|
|
1499
|
+
if (f.status === 73) if (f.gzhead.name) {
|
|
1500
|
+
s = f.pending;
|
|
1501
|
+
do {
|
|
1502
|
+
if (f.pending === f.pending_buf_size && (f.gzhead.hcrc && f.pending > s && (t.adler = _(t.adler, f.pending_buf, f.pending - s, s)), E(t), s = f.pending, f.pending === f.pending_buf_size)) {
|
|
1503
|
+
k = 1;
|
|
1504
|
+
break;
|
|
1505
|
+
}
|
|
1506
|
+
k = f.gzindex < f.gzhead.name.length ? 255 & f.gzhead.name.charCodeAt(f.gzindex++) : 0, X(f, k);
|
|
1507
|
+
} while (k !== 0);
|
|
1508
|
+
f.gzhead.hcrc && f.pending > s && (t.adler = _(t.adler, f.pending_buf, f.pending - s, s)), k === 0 && (f.gzindex = 0, f.status = 91);
|
|
1509
|
+
} else f.status = 91;
|
|
1510
|
+
if (f.status === 91) if (f.gzhead.comment) {
|
|
1511
|
+
s = f.pending;
|
|
1512
|
+
do {
|
|
1513
|
+
if (f.pending === f.pending_buf_size && (f.gzhead.hcrc && f.pending > s && (t.adler = _(t.adler, f.pending_buf, f.pending - s, s)), E(t), s = f.pending, f.pending === f.pending_buf_size)) {
|
|
1514
|
+
k = 1;
|
|
1515
|
+
break;
|
|
1516
|
+
}
|
|
1517
|
+
k = f.gzindex < f.gzhead.comment.length ? 255 & f.gzhead.comment.charCodeAt(f.gzindex++) : 0, X(f, k);
|
|
1518
|
+
} while (k !== 0);
|
|
1519
|
+
f.gzhead.hcrc && f.pending > s && (t.adler = _(t.adler, f.pending_buf, f.pending - s, s)), k === 0 && (f.status = 103);
|
|
1520
|
+
} else f.status = 103;
|
|
1521
|
+
if (f.status === 103 && (f.gzhead.hcrc ? (f.pending + 2 > f.pending_buf_size && E(t), f.pending + 2 <= f.pending_buf_size && (X(f, 255 & t.adler), X(f, t.adler >> 8 & 255), t.adler = 0, f.status = B)) : f.status = B), f.pending !== 0) {
|
|
1522
|
+
if (E(t), t.avail_out === 0) return f.last_flush = -1, i;
|
|
1523
|
+
} else if (t.avail_in === 0 && j(R) <= j(A) && R !== g) return $(t, -5);
|
|
1524
|
+
if (f.status === 666 && t.avail_in !== 0) return $(t, -5);
|
|
1525
|
+
if (t.avail_in !== 0 || f.lookahead !== 0 || R !== p && f.status !== 666) {
|
|
1526
|
+
var N = f.strategy === 2 ? (function(z, Z) {
|
|
1527
|
+
for (var K; ; ) {
|
|
1528
|
+
if (z.lookahead === 0 && (nt(z), z.lookahead === 0)) {
|
|
1529
|
+
if (Z === p) return e;
|
|
1530
|
+
break;
|
|
1531
|
+
}
|
|
1532
|
+
if (z.match_length = 0, K = n._tr_tally(z, 0, z.window[z.strstart]), z.lookahead--, z.strstart++, K && (C(z, !1), z.strm.avail_out === 0)) return e;
|
|
1533
|
+
}
|
|
1534
|
+
return z.insert = 0, Z === g ? (C(z, !0), z.strm.avail_out === 0 ? J : P) : z.last_lit && (C(z, !1), z.strm.avail_out === 0) ? e : T;
|
|
1535
|
+
})(f, R) : f.strategy === 3 ? (function(z, Z) {
|
|
1536
|
+
for (var K, M, Y, rt, tt = z.window; ; ) {
|
|
1537
|
+
if (z.lookahead <= W) {
|
|
1538
|
+
if (nt(z), z.lookahead <= W && Z === p) return e;
|
|
1539
|
+
if (z.lookahead === 0) break;
|
|
1540
|
+
}
|
|
1541
|
+
if (z.match_length = 0, z.lookahead >= I && 0 < z.strstart && (M = tt[Y = z.strstart - 1]) === tt[++Y] && M === tt[++Y] && M === tt[++Y]) {
|
|
1542
|
+
rt = z.strstart + W;
|
|
1543
|
+
do
|
|
1544
|
+
;
|
|
1545
|
+
while (M === tt[++Y] && M === tt[++Y] && M === tt[++Y] && M === tt[++Y] && M === tt[++Y] && M === tt[++Y] && M === tt[++Y] && M === tt[++Y] && Y < rt);
|
|
1546
|
+
z.match_length = W - (rt - Y), z.match_length > z.lookahead && (z.match_length = z.lookahead);
|
|
1547
|
+
}
|
|
1548
|
+
if (z.match_length >= I ? (K = n._tr_tally(z, 1, z.match_length - I), z.lookahead -= z.match_length, z.strstart += z.match_length, z.match_length = 0) : (K = n._tr_tally(z, 0, z.window[z.strstart]), z.lookahead--, z.strstart++), K && (C(z, !1), z.strm.avail_out === 0)) return e;
|
|
1549
|
+
}
|
|
1550
|
+
return z.insert = 0, Z === g ? (C(z, !0), z.strm.avail_out === 0 ? J : P) : z.last_lit && (C(z, !1), z.strm.avail_out === 0) ? e : T;
|
|
1551
|
+
})(f, R) : l[f.level].func(f, R);
|
|
1552
|
+
if (N !== J && N !== P || (f.status = 666), N === e || N === J) return t.avail_out === 0 && (f.last_flush = -1), i;
|
|
1553
|
+
if (N === T && (R === 1 ? n._tr_align(f) : R !== 5 && (n._tr_stored_block(f, 0, 0, !1), R === 3 && (V(f.head), f.lookahead === 0 && (f.strstart = 0, f.block_start = 0, f.insert = 0))), E(t), t.avail_out === 0)) return f.last_flush = -1, i;
|
|
1554
|
+
}
|
|
1555
|
+
return R !== g ? i : f.wrap <= 0 ? 1 : (f.wrap === 2 ? (X(f, 255 & t.adler), X(f, t.adler >> 8 & 255), X(f, t.adler >> 16 & 255), X(f, t.adler >> 24 & 255), X(f, 255 & t.total_in), X(f, t.total_in >> 8 & 255), X(f, t.total_in >> 16 & 255), X(f, t.total_in >> 24 & 255)) : (G(f, t.adler >>> 16), G(f, 65535 & t.adler)), E(t), 0 < f.wrap && (f.wrap = -f.wrap), f.pending !== 0 ? i : 1);
|
|
1556
|
+
}, w.deflateEnd = function(t) {
|
|
1557
|
+
var R;
|
|
1558
|
+
return t && t.state ? (R = t.state.status) !== m && R !== 69 && R !== 73 && R !== 91 && R !== 103 && R !== B && R !== 666 ? $(t, d) : (t.state = null, R === B ? $(t, -3) : i) : d;
|
|
1559
|
+
}, w.deflateSetDictionary = function(t, R) {
|
|
1560
|
+
var A, f, s, k, F, N, z, Z, K = R.length;
|
|
1561
|
+
if (!t || !t.state || (k = (A = t.state).wrap) === 2 || k === 1 && A.status !== m || A.lookahead) return d;
|
|
1562
|
+
for (k === 1 && (t.adler = u(t.adler, R, K, 0)), A.wrap = 0, K >= A.w_size && (k === 0 && (V(A.head), A.strstart = 0, A.block_start = 0, A.insert = 0), Z = new o.Buf8(A.w_size), o.arraySet(Z, R, K - A.w_size, A.w_size, 0), R = Z, K = A.w_size), F = t.avail_in, N = t.next_in, z = t.input, t.avail_in = K, t.next_in = 0, t.input = R, nt(A); A.lookahead >= I; ) {
|
|
1563
|
+
for (f = A.strstart, s = A.lookahead - (I - 1); A.ins_h = (A.ins_h << A.hash_shift ^ A.window[f + I - 1]) & A.hash_mask, A.prev[f & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = f, f++, --s; ) ;
|
|
1564
|
+
A.strstart = f, A.lookahead = I - 1, nt(A);
|
|
1565
|
+
}
|
|
1566
|
+
return A.strstart += A.lookahead, A.block_start = A.strstart, A.insert = A.lookahead, A.lookahead = 0, A.match_length = A.prev_length = I - 1, A.match_available = 0, t.next_in = N, t.input = z, t.avail_in = F, A.wrap = k, i;
|
|
1567
|
+
}, w.deflateInfo = "pako deflate (from Nodeca project)";
|
|
1568
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(b, U, w) {
|
|
1569
|
+
U.exports = function() {
|
|
1570
|
+
this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
|
|
1571
|
+
};
|
|
1572
|
+
}, {}], 48: [function(b, U, w) {
|
|
1573
|
+
U.exports = function(l, o) {
|
|
1574
|
+
var n, u, _, y, p, g, i, d, r, h, a, c, v, S, x, D, O, L, I, W, q, m, B, e, T;
|
|
1575
|
+
n = l.state, u = l.next_in, e = l.input, _ = u + (l.avail_in - 5), y = l.next_out, T = l.output, p = y - (o - l.avail_out), g = y + (l.avail_out - 257), i = n.dmax, d = n.wsize, r = n.whave, h = n.wnext, a = n.window, c = n.hold, v = n.bits, S = n.lencode, x = n.distcode, D = (1 << n.lenbits) - 1, O = (1 << n.distbits) - 1;
|
|
1576
|
+
t: do {
|
|
1577
|
+
v < 15 && (c += e[u++] << v, v += 8, c += e[u++] << v, v += 8), L = S[c & D];
|
|
1578
|
+
e: for (; ; ) {
|
|
1579
|
+
if (c >>>= I = L >>> 24, v -= I, (I = L >>> 16 & 255) === 0) T[y++] = 65535 & L;
|
|
1580
|
+
else {
|
|
1581
|
+
if (!(16 & I)) {
|
|
1582
|
+
if ((64 & I) == 0) {
|
|
1583
|
+
L = S[(65535 & L) + (c & (1 << I) - 1)];
|
|
1584
|
+
continue e;
|
|
1585
|
+
}
|
|
1586
|
+
if (32 & I) {
|
|
1587
|
+
n.mode = 12;
|
|
1588
|
+
break t;
|
|
1589
|
+
}
|
|
1590
|
+
l.msg = "invalid literal/length code", n.mode = 30;
|
|
1591
|
+
break t;
|
|
1592
|
+
}
|
|
1593
|
+
W = 65535 & L, (I &= 15) && (v < I && (c += e[u++] << v, v += 8), W += c & (1 << I) - 1, c >>>= I, v -= I), v < 15 && (c += e[u++] << v, v += 8, c += e[u++] << v, v += 8), L = x[c & O];
|
|
1594
|
+
r: for (; ; ) {
|
|
1595
|
+
if (c >>>= I = L >>> 24, v -= I, !(16 & (I = L >>> 16 & 255))) {
|
|
1596
|
+
if ((64 & I) == 0) {
|
|
1597
|
+
L = x[(65535 & L) + (c & (1 << I) - 1)];
|
|
1598
|
+
continue r;
|
|
1599
|
+
}
|
|
1600
|
+
l.msg = "invalid distance code", n.mode = 30;
|
|
1601
|
+
break t;
|
|
1602
|
+
}
|
|
1603
|
+
if (q = 65535 & L, v < (I &= 15) && (c += e[u++] << v, (v += 8) < I && (c += e[u++] << v, v += 8)), i < (q += c & (1 << I) - 1)) {
|
|
1604
|
+
l.msg = "invalid distance too far back", n.mode = 30;
|
|
1605
|
+
break t;
|
|
1606
|
+
}
|
|
1607
|
+
if (c >>>= I, v -= I, (I = y - p) < q) {
|
|
1608
|
+
if (r < (I = q - I) && n.sane) {
|
|
1609
|
+
l.msg = "invalid distance too far back", n.mode = 30;
|
|
1610
|
+
break t;
|
|
1611
|
+
}
|
|
1612
|
+
if (B = a, (m = 0) === h) {
|
|
1613
|
+
if (m += d - I, I < W) {
|
|
1614
|
+
for (W -= I; T[y++] = a[m++], --I; ) ;
|
|
1615
|
+
m = y - q, B = T;
|
|
1616
|
+
}
|
|
1617
|
+
} else if (h < I) {
|
|
1618
|
+
if (m += d + h - I, (I -= h) < W) {
|
|
1619
|
+
for (W -= I; T[y++] = a[m++], --I; ) ;
|
|
1620
|
+
if (m = 0, h < W) {
|
|
1621
|
+
for (W -= I = h; T[y++] = a[m++], --I; ) ;
|
|
1622
|
+
m = y - q, B = T;
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
} else if (m += h - I, I < W) {
|
|
1626
|
+
for (W -= I; T[y++] = a[m++], --I; ) ;
|
|
1627
|
+
m = y - q, B = T;
|
|
1628
|
+
}
|
|
1629
|
+
for (; 2 < W; ) T[y++] = B[m++], T[y++] = B[m++], T[y++] = B[m++], W -= 3;
|
|
1630
|
+
W && (T[y++] = B[m++], 1 < W && (T[y++] = B[m++]));
|
|
1631
|
+
} else {
|
|
1632
|
+
for (m = y - q; T[y++] = T[m++], T[y++] = T[m++], T[y++] = T[m++], 2 < (W -= 3); ) ;
|
|
1633
|
+
W && (T[y++] = T[m++], 1 < W && (T[y++] = T[m++]));
|
|
1634
|
+
}
|
|
1635
|
+
break;
|
|
1636
|
+
}
|
|
1637
|
+
}
|
|
1638
|
+
break;
|
|
1639
|
+
}
|
|
1640
|
+
} while (u < _ && y < g);
|
|
1641
|
+
u -= W = v >> 3, c &= (1 << (v -= W << 3)) - 1, l.next_in = u, l.next_out = y, l.avail_in = u < _ ? _ - u + 5 : 5 - (u - _), l.avail_out = y < g ? g - y + 257 : 257 - (y - g), n.hold = c, n.bits = v;
|
|
1642
|
+
};
|
|
1643
|
+
}, {}], 49: [function(b, U, w) {
|
|
1644
|
+
var l = b("../utils/common"), o = b("./adler32"), n = b("./crc32"), u = b("./inffast"), _ = b("./inftrees"), y = 1, p = 2, g = 0, i = -2, d = 1, r = 852, h = 592;
|
|
1645
|
+
function a(m) {
|
|
1646
|
+
return (m >>> 24 & 255) + (m >>> 8 & 65280) + ((65280 & m) << 8) + ((255 & m) << 24);
|
|
1647
|
+
}
|
|
1648
|
+
function c() {
|
|
1649
|
+
this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new l.Buf16(320), this.work = new l.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
1650
|
+
}
|
|
1651
|
+
function v(m) {
|
|
1652
|
+
var B;
|
|
1653
|
+
return m && m.state ? (B = m.state, m.total_in = m.total_out = B.total = 0, m.msg = "", B.wrap && (m.adler = 1 & B.wrap), B.mode = d, B.last = 0, B.havedict = 0, B.dmax = 32768, B.head = null, B.hold = 0, B.bits = 0, B.lencode = B.lendyn = new l.Buf32(r), B.distcode = B.distdyn = new l.Buf32(h), B.sane = 1, B.back = -1, g) : i;
|
|
1654
|
+
}
|
|
1655
|
+
function S(m) {
|
|
1656
|
+
var B;
|
|
1657
|
+
return m && m.state ? ((B = m.state).wsize = 0, B.whave = 0, B.wnext = 0, v(m)) : i;
|
|
1658
|
+
}
|
|
1659
|
+
function x(m, B) {
|
|
1660
|
+
var e, T;
|
|
1661
|
+
return m && m.state ? (T = m.state, B < 0 ? (e = 0, B = -B) : (e = 1 + (B >> 4), B < 48 && (B &= 15)), B && (B < 8 || 15 < B) ? i : (T.window !== null && T.wbits !== B && (T.window = null), T.wrap = e, T.wbits = B, S(m))) : i;
|
|
1662
|
+
}
|
|
1663
|
+
function D(m, B) {
|
|
1664
|
+
var e, T;
|
|
1665
|
+
return m ? (T = new c(), (m.state = T).window = null, (e = x(m, B)) !== g && (m.state = null), e) : i;
|
|
1666
|
+
}
|
|
1667
|
+
var O, L, I = !0;
|
|
1668
|
+
function W(m) {
|
|
1669
|
+
if (I) {
|
|
1670
|
+
var B;
|
|
1671
|
+
for (O = new l.Buf32(512), L = new l.Buf32(32), B = 0; B < 144; ) m.lens[B++] = 8;
|
|
1672
|
+
for (; B < 256; ) m.lens[B++] = 9;
|
|
1673
|
+
for (; B < 280; ) m.lens[B++] = 7;
|
|
1674
|
+
for (; B < 288; ) m.lens[B++] = 8;
|
|
1675
|
+
for (_(y, m.lens, 0, 288, O, 0, m.work, { bits: 9 }), B = 0; B < 32; ) m.lens[B++] = 5;
|
|
1676
|
+
_(p, m.lens, 0, 32, L, 0, m.work, { bits: 5 }), I = !1;
|
|
1677
|
+
}
|
|
1678
|
+
m.lencode = O, m.lenbits = 9, m.distcode = L, m.distbits = 5;
|
|
1679
|
+
}
|
|
1680
|
+
function q(m, B, e, T) {
|
|
1681
|
+
var J, P = m.state;
|
|
1682
|
+
return P.window === null && (P.wsize = 1 << P.wbits, P.wnext = 0, P.whave = 0, P.window = new l.Buf8(P.wsize)), T >= P.wsize ? (l.arraySet(P.window, B, e - P.wsize, P.wsize, 0), P.wnext = 0, P.whave = P.wsize) : (T < (J = P.wsize - P.wnext) && (J = T), l.arraySet(P.window, B, e - T, J, P.wnext), (T -= J) ? (l.arraySet(P.window, B, e - T, T, 0), P.wnext = T, P.whave = P.wsize) : (P.wnext += J, P.wnext === P.wsize && (P.wnext = 0), P.whave < P.wsize && (P.whave += J))), 0;
|
|
1683
|
+
}
|
|
1684
|
+
w.inflateReset = S, w.inflateReset2 = x, w.inflateResetKeep = v, w.inflateInit = function(m) {
|
|
1685
|
+
return D(m, 15);
|
|
1686
|
+
}, w.inflateInit2 = D, w.inflate = function(m, B) {
|
|
1687
|
+
var e, T, J, P, $, j, V, E, C, X, G, H, nt, ot, Q, et, st, it, ft, lt, t, R, A, f, s = 0, k = new l.Buf8(4), F = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
1688
|
+
if (!m || !m.state || !m.output || !m.input && m.avail_in !== 0) return i;
|
|
1689
|
+
(e = m.state).mode === 12 && (e.mode = 13), $ = m.next_out, J = m.output, V = m.avail_out, P = m.next_in, T = m.input, j = m.avail_in, E = e.hold, C = e.bits, X = j, G = V, R = g;
|
|
1690
|
+
t: for (; ; ) switch (e.mode) {
|
|
1691
|
+
case d:
|
|
1692
|
+
if (e.wrap === 0) {
|
|
1693
|
+
e.mode = 13;
|
|
1694
|
+
break;
|
|
1695
|
+
}
|
|
1696
|
+
for (; C < 16; ) {
|
|
1697
|
+
if (j === 0) break t;
|
|
1698
|
+
j--, E += T[P++] << C, C += 8;
|
|
1699
|
+
}
|
|
1700
|
+
if (2 & e.wrap && E === 35615) {
|
|
1701
|
+
k[e.check = 0] = 255 & E, k[1] = E >>> 8 & 255, e.check = n(e.check, k, 2, 0), C = E = 0, e.mode = 2;
|
|
1702
|
+
break;
|
|
1703
|
+
}
|
|
1704
|
+
if (e.flags = 0, e.head && (e.head.done = !1), !(1 & e.wrap) || (((255 & E) << 8) + (E >> 8)) % 31) {
|
|
1705
|
+
m.msg = "incorrect header check", e.mode = 30;
|
|
1706
|
+
break;
|
|
1707
|
+
}
|
|
1708
|
+
if ((15 & E) != 8) {
|
|
1709
|
+
m.msg = "unknown compression method", e.mode = 30;
|
|
1710
|
+
break;
|
|
1711
|
+
}
|
|
1712
|
+
if (C -= 4, t = 8 + (15 & (E >>>= 4)), e.wbits === 0) e.wbits = t;
|
|
1713
|
+
else if (t > e.wbits) {
|
|
1714
|
+
m.msg = "invalid window size", e.mode = 30;
|
|
1715
|
+
break;
|
|
1716
|
+
}
|
|
1717
|
+
e.dmax = 1 << t, m.adler = e.check = 1, e.mode = 512 & E ? 10 : 12, C = E = 0;
|
|
1718
|
+
break;
|
|
1719
|
+
case 2:
|
|
1720
|
+
for (; C < 16; ) {
|
|
1721
|
+
if (j === 0) break t;
|
|
1722
|
+
j--, E += T[P++] << C, C += 8;
|
|
1723
|
+
}
|
|
1724
|
+
if (e.flags = E, (255 & e.flags) != 8) {
|
|
1725
|
+
m.msg = "unknown compression method", e.mode = 30;
|
|
1726
|
+
break;
|
|
1727
|
+
}
|
|
1728
|
+
if (57344 & e.flags) {
|
|
1729
|
+
m.msg = "unknown header flags set", e.mode = 30;
|
|
1730
|
+
break;
|
|
1731
|
+
}
|
|
1732
|
+
e.head && (e.head.text = E >> 8 & 1), 512 & e.flags && (k[0] = 255 & E, k[1] = E >>> 8 & 255, e.check = n(e.check, k, 2, 0)), C = E = 0, e.mode = 3;
|
|
1733
|
+
case 3:
|
|
1734
|
+
for (; C < 32; ) {
|
|
1735
|
+
if (j === 0) break t;
|
|
1736
|
+
j--, E += T[P++] << C, C += 8;
|
|
1737
|
+
}
|
|
1738
|
+
e.head && (e.head.time = E), 512 & e.flags && (k[0] = 255 & E, k[1] = E >>> 8 & 255, k[2] = E >>> 16 & 255, k[3] = E >>> 24 & 255, e.check = n(e.check, k, 4, 0)), C = E = 0, e.mode = 4;
|
|
1739
|
+
case 4:
|
|
1740
|
+
for (; C < 16; ) {
|
|
1741
|
+
if (j === 0) break t;
|
|
1742
|
+
j--, E += T[P++] << C, C += 8;
|
|
1743
|
+
}
|
|
1744
|
+
e.head && (e.head.xflags = 255 & E, e.head.os = E >> 8), 512 & e.flags && (k[0] = 255 & E, k[1] = E >>> 8 & 255, e.check = n(e.check, k, 2, 0)), C = E = 0, e.mode = 5;
|
|
1745
|
+
case 5:
|
|
1746
|
+
if (1024 & e.flags) {
|
|
1747
|
+
for (; C < 16; ) {
|
|
1748
|
+
if (j === 0) break t;
|
|
1749
|
+
j--, E += T[P++] << C, C += 8;
|
|
1750
|
+
}
|
|
1751
|
+
e.length = E, e.head && (e.head.extra_len = E), 512 & e.flags && (k[0] = 255 & E, k[1] = E >>> 8 & 255, e.check = n(e.check, k, 2, 0)), C = E = 0;
|
|
1752
|
+
} else e.head && (e.head.extra = null);
|
|
1753
|
+
e.mode = 6;
|
|
1754
|
+
case 6:
|
|
1755
|
+
if (1024 & e.flags && (j < (H = e.length) && (H = j), H && (e.head && (t = e.head.extra_len - e.length, e.head.extra || (e.head.extra = new Array(e.head.extra_len)), l.arraySet(e.head.extra, T, P, H, t)), 512 & e.flags && (e.check = n(e.check, T, H, P)), j -= H, P += H, e.length -= H), e.length)) break t;
|
|
1756
|
+
e.length = 0, e.mode = 7;
|
|
1757
|
+
case 7:
|
|
1758
|
+
if (2048 & e.flags) {
|
|
1759
|
+
if (j === 0) break t;
|
|
1760
|
+
for (H = 0; t = T[P + H++], e.head && t && e.length < 65536 && (e.head.name += String.fromCharCode(t)), t && H < j; ) ;
|
|
1761
|
+
if (512 & e.flags && (e.check = n(e.check, T, H, P)), j -= H, P += H, t) break t;
|
|
1762
|
+
} else e.head && (e.head.name = null);
|
|
1763
|
+
e.length = 0, e.mode = 8;
|
|
1764
|
+
case 8:
|
|
1765
|
+
if (4096 & e.flags) {
|
|
1766
|
+
if (j === 0) break t;
|
|
1767
|
+
for (H = 0; t = T[P + H++], e.head && t && e.length < 65536 && (e.head.comment += String.fromCharCode(t)), t && H < j; ) ;
|
|
1768
|
+
if (512 & e.flags && (e.check = n(e.check, T, H, P)), j -= H, P += H, t) break t;
|
|
1769
|
+
} else e.head && (e.head.comment = null);
|
|
1770
|
+
e.mode = 9;
|
|
1771
|
+
case 9:
|
|
1772
|
+
if (512 & e.flags) {
|
|
1773
|
+
for (; C < 16; ) {
|
|
1774
|
+
if (j === 0) break t;
|
|
1775
|
+
j--, E += T[P++] << C, C += 8;
|
|
1776
|
+
}
|
|
1777
|
+
if (E !== (65535 & e.check)) {
|
|
1778
|
+
m.msg = "header crc mismatch", e.mode = 30;
|
|
1779
|
+
break;
|
|
1780
|
+
}
|
|
1781
|
+
C = E = 0;
|
|
1782
|
+
}
|
|
1783
|
+
e.head && (e.head.hcrc = e.flags >> 9 & 1, e.head.done = !0), m.adler = e.check = 0, e.mode = 12;
|
|
1784
|
+
break;
|
|
1785
|
+
case 10:
|
|
1786
|
+
for (; C < 32; ) {
|
|
1787
|
+
if (j === 0) break t;
|
|
1788
|
+
j--, E += T[P++] << C, C += 8;
|
|
1789
|
+
}
|
|
1790
|
+
m.adler = e.check = a(E), C = E = 0, e.mode = 11;
|
|
1791
|
+
case 11:
|
|
1792
|
+
if (e.havedict === 0) return m.next_out = $, m.avail_out = V, m.next_in = P, m.avail_in = j, e.hold = E, e.bits = C, 2;
|
|
1793
|
+
m.adler = e.check = 1, e.mode = 12;
|
|
1794
|
+
case 12:
|
|
1795
|
+
if (B === 5 || B === 6) break t;
|
|
1796
|
+
case 13:
|
|
1797
|
+
if (e.last) {
|
|
1798
|
+
E >>>= 7 & C, C -= 7 & C, e.mode = 27;
|
|
1799
|
+
break;
|
|
1800
|
+
}
|
|
1801
|
+
for (; C < 3; ) {
|
|
1802
|
+
if (j === 0) break t;
|
|
1803
|
+
j--, E += T[P++] << C, C += 8;
|
|
1804
|
+
}
|
|
1805
|
+
switch (e.last = 1 & E, C -= 1, 3 & (E >>>= 1)) {
|
|
1806
|
+
case 0:
|
|
1807
|
+
e.mode = 14;
|
|
1808
|
+
break;
|
|
1809
|
+
case 1:
|
|
1810
|
+
if (W(e), e.mode = 20, B !== 6) break;
|
|
1811
|
+
E >>>= 2, C -= 2;
|
|
1812
|
+
break t;
|
|
1813
|
+
case 2:
|
|
1814
|
+
e.mode = 17;
|
|
1815
|
+
break;
|
|
1816
|
+
case 3:
|
|
1817
|
+
m.msg = "invalid block type", e.mode = 30;
|
|
1818
|
+
}
|
|
1819
|
+
E >>>= 2, C -= 2;
|
|
1820
|
+
break;
|
|
1821
|
+
case 14:
|
|
1822
|
+
for (E >>>= 7 & C, C -= 7 & C; C < 32; ) {
|
|
1823
|
+
if (j === 0) break t;
|
|
1824
|
+
j--, E += T[P++] << C, C += 8;
|
|
1825
|
+
}
|
|
1826
|
+
if ((65535 & E) != (E >>> 16 ^ 65535)) {
|
|
1827
|
+
m.msg = "invalid stored block lengths", e.mode = 30;
|
|
1828
|
+
break;
|
|
1829
|
+
}
|
|
1830
|
+
if (e.length = 65535 & E, C = E = 0, e.mode = 15, B === 6) break t;
|
|
1831
|
+
case 15:
|
|
1832
|
+
e.mode = 16;
|
|
1833
|
+
case 16:
|
|
1834
|
+
if (H = e.length) {
|
|
1835
|
+
if (j < H && (H = j), V < H && (H = V), H === 0) break t;
|
|
1836
|
+
l.arraySet(J, T, P, H, $), j -= H, P += H, V -= H, $ += H, e.length -= H;
|
|
1837
|
+
break;
|
|
1838
|
+
}
|
|
1839
|
+
e.mode = 12;
|
|
1840
|
+
break;
|
|
1841
|
+
case 17:
|
|
1842
|
+
for (; C < 14; ) {
|
|
1843
|
+
if (j === 0) break t;
|
|
1844
|
+
j--, E += T[P++] << C, C += 8;
|
|
1845
|
+
}
|
|
1846
|
+
if (e.nlen = 257 + (31 & E), E >>>= 5, C -= 5, e.ndist = 1 + (31 & E), E >>>= 5, C -= 5, e.ncode = 4 + (15 & E), E >>>= 4, C -= 4, 286 < e.nlen || 30 < e.ndist) {
|
|
1847
|
+
m.msg = "too many length or distance symbols", e.mode = 30;
|
|
1848
|
+
break;
|
|
1849
|
+
}
|
|
1850
|
+
e.have = 0, e.mode = 18;
|
|
1851
|
+
case 18:
|
|
1852
|
+
for (; e.have < e.ncode; ) {
|
|
1853
|
+
for (; C < 3; ) {
|
|
1854
|
+
if (j === 0) break t;
|
|
1855
|
+
j--, E += T[P++] << C, C += 8;
|
|
1856
|
+
}
|
|
1857
|
+
e.lens[F[e.have++]] = 7 & E, E >>>= 3, C -= 3;
|
|
1858
|
+
}
|
|
1859
|
+
for (; e.have < 19; ) e.lens[F[e.have++]] = 0;
|
|
1860
|
+
if (e.lencode = e.lendyn, e.lenbits = 7, A = { bits: e.lenbits }, R = _(0, e.lens, 0, 19, e.lencode, 0, e.work, A), e.lenbits = A.bits, R) {
|
|
1861
|
+
m.msg = "invalid code lengths set", e.mode = 30;
|
|
1862
|
+
break;
|
|
1863
|
+
}
|
|
1864
|
+
e.have = 0, e.mode = 19;
|
|
1865
|
+
case 19:
|
|
1866
|
+
for (; e.have < e.nlen + e.ndist; ) {
|
|
1867
|
+
for (; et = (s = e.lencode[E & (1 << e.lenbits) - 1]) >>> 16 & 255, st = 65535 & s, !((Q = s >>> 24) <= C); ) {
|
|
1868
|
+
if (j === 0) break t;
|
|
1869
|
+
j--, E += T[P++] << C, C += 8;
|
|
1870
|
+
}
|
|
1871
|
+
if (st < 16) E >>>= Q, C -= Q, e.lens[e.have++] = st;
|
|
1872
|
+
else {
|
|
1873
|
+
if (st === 16) {
|
|
1874
|
+
for (f = Q + 2; C < f; ) {
|
|
1875
|
+
if (j === 0) break t;
|
|
1876
|
+
j--, E += T[P++] << C, C += 8;
|
|
1877
|
+
}
|
|
1878
|
+
if (E >>>= Q, C -= Q, e.have === 0) {
|
|
1879
|
+
m.msg = "invalid bit length repeat", e.mode = 30;
|
|
1880
|
+
break;
|
|
1881
|
+
}
|
|
1882
|
+
t = e.lens[e.have - 1], H = 3 + (3 & E), E >>>= 2, C -= 2;
|
|
1883
|
+
} else if (st === 17) {
|
|
1884
|
+
for (f = Q + 3; C < f; ) {
|
|
1885
|
+
if (j === 0) break t;
|
|
1886
|
+
j--, E += T[P++] << C, C += 8;
|
|
1887
|
+
}
|
|
1888
|
+
C -= Q, t = 0, H = 3 + (7 & (E >>>= Q)), E >>>= 3, C -= 3;
|
|
1889
|
+
} else {
|
|
1890
|
+
for (f = Q + 7; C < f; ) {
|
|
1891
|
+
if (j === 0) break t;
|
|
1892
|
+
j--, E += T[P++] << C, C += 8;
|
|
1893
|
+
}
|
|
1894
|
+
C -= Q, t = 0, H = 11 + (127 & (E >>>= Q)), E >>>= 7, C -= 7;
|
|
1895
|
+
}
|
|
1896
|
+
if (e.have + H > e.nlen + e.ndist) {
|
|
1897
|
+
m.msg = "invalid bit length repeat", e.mode = 30;
|
|
1898
|
+
break;
|
|
1899
|
+
}
|
|
1900
|
+
for (; H--; ) e.lens[e.have++] = t;
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
if (e.mode === 30) break;
|
|
1904
|
+
if (e.lens[256] === 0) {
|
|
1905
|
+
m.msg = "invalid code -- missing end-of-block", e.mode = 30;
|
|
1906
|
+
break;
|
|
1907
|
+
}
|
|
1908
|
+
if (e.lenbits = 9, A = { bits: e.lenbits }, R = _(y, e.lens, 0, e.nlen, e.lencode, 0, e.work, A), e.lenbits = A.bits, R) {
|
|
1909
|
+
m.msg = "invalid literal/lengths set", e.mode = 30;
|
|
1910
|
+
break;
|
|
1911
|
+
}
|
|
1912
|
+
if (e.distbits = 6, e.distcode = e.distdyn, A = { bits: e.distbits }, R = _(p, e.lens, e.nlen, e.ndist, e.distcode, 0, e.work, A), e.distbits = A.bits, R) {
|
|
1913
|
+
m.msg = "invalid distances set", e.mode = 30;
|
|
1914
|
+
break;
|
|
1915
|
+
}
|
|
1916
|
+
if (e.mode = 20, B === 6) break t;
|
|
1917
|
+
case 20:
|
|
1918
|
+
e.mode = 21;
|
|
1919
|
+
case 21:
|
|
1920
|
+
if (6 <= j && 258 <= V) {
|
|
1921
|
+
m.next_out = $, m.avail_out = V, m.next_in = P, m.avail_in = j, e.hold = E, e.bits = C, u(m, G), $ = m.next_out, J = m.output, V = m.avail_out, P = m.next_in, T = m.input, j = m.avail_in, E = e.hold, C = e.bits, e.mode === 12 && (e.back = -1);
|
|
1922
|
+
break;
|
|
1923
|
+
}
|
|
1924
|
+
for (e.back = 0; et = (s = e.lencode[E & (1 << e.lenbits) - 1]) >>> 16 & 255, st = 65535 & s, !((Q = s >>> 24) <= C); ) {
|
|
1925
|
+
if (j === 0) break t;
|
|
1926
|
+
j--, E += T[P++] << C, C += 8;
|
|
1927
|
+
}
|
|
1928
|
+
if (et && (240 & et) == 0) {
|
|
1929
|
+
for (it = Q, ft = et, lt = st; et = (s = e.lencode[lt + ((E & (1 << it + ft) - 1) >> it)]) >>> 16 & 255, st = 65535 & s, !(it + (Q = s >>> 24) <= C); ) {
|
|
1930
|
+
if (j === 0) break t;
|
|
1931
|
+
j--, E += T[P++] << C, C += 8;
|
|
1932
|
+
}
|
|
1933
|
+
E >>>= it, C -= it, e.back += it;
|
|
1934
|
+
}
|
|
1935
|
+
if (E >>>= Q, C -= Q, e.back += Q, e.length = st, et === 0) {
|
|
1936
|
+
e.mode = 26;
|
|
1937
|
+
break;
|
|
1938
|
+
}
|
|
1939
|
+
if (32 & et) {
|
|
1940
|
+
e.back = -1, e.mode = 12;
|
|
1941
|
+
break;
|
|
1942
|
+
}
|
|
1943
|
+
if (64 & et) {
|
|
1944
|
+
m.msg = "invalid literal/length code", e.mode = 30;
|
|
1945
|
+
break;
|
|
1946
|
+
}
|
|
1947
|
+
e.extra = 15 & et, e.mode = 22;
|
|
1948
|
+
case 22:
|
|
1949
|
+
if (e.extra) {
|
|
1950
|
+
for (f = e.extra; C < f; ) {
|
|
1951
|
+
if (j === 0) break t;
|
|
1952
|
+
j--, E += T[P++] << C, C += 8;
|
|
1953
|
+
}
|
|
1954
|
+
e.length += E & (1 << e.extra) - 1, E >>>= e.extra, C -= e.extra, e.back += e.extra;
|
|
1955
|
+
}
|
|
1956
|
+
e.was = e.length, e.mode = 23;
|
|
1957
|
+
case 23:
|
|
1958
|
+
for (; et = (s = e.distcode[E & (1 << e.distbits) - 1]) >>> 16 & 255, st = 65535 & s, !((Q = s >>> 24) <= C); ) {
|
|
1959
|
+
if (j === 0) break t;
|
|
1960
|
+
j--, E += T[P++] << C, C += 8;
|
|
1961
|
+
}
|
|
1962
|
+
if ((240 & et) == 0) {
|
|
1963
|
+
for (it = Q, ft = et, lt = st; et = (s = e.distcode[lt + ((E & (1 << it + ft) - 1) >> it)]) >>> 16 & 255, st = 65535 & s, !(it + (Q = s >>> 24) <= C); ) {
|
|
1964
|
+
if (j === 0) break t;
|
|
1965
|
+
j--, E += T[P++] << C, C += 8;
|
|
1966
|
+
}
|
|
1967
|
+
E >>>= it, C -= it, e.back += it;
|
|
1968
|
+
}
|
|
1969
|
+
if (E >>>= Q, C -= Q, e.back += Q, 64 & et) {
|
|
1970
|
+
m.msg = "invalid distance code", e.mode = 30;
|
|
1971
|
+
break;
|
|
1972
|
+
}
|
|
1973
|
+
e.offset = st, e.extra = 15 & et, e.mode = 24;
|
|
1974
|
+
case 24:
|
|
1975
|
+
if (e.extra) {
|
|
1976
|
+
for (f = e.extra; C < f; ) {
|
|
1977
|
+
if (j === 0) break t;
|
|
1978
|
+
j--, E += T[P++] << C, C += 8;
|
|
1979
|
+
}
|
|
1980
|
+
e.offset += E & (1 << e.extra) - 1, E >>>= e.extra, C -= e.extra, e.back += e.extra;
|
|
1981
|
+
}
|
|
1982
|
+
if (e.offset > e.dmax) {
|
|
1983
|
+
m.msg = "invalid distance too far back", e.mode = 30;
|
|
1984
|
+
break;
|
|
1985
|
+
}
|
|
1986
|
+
e.mode = 25;
|
|
1987
|
+
case 25:
|
|
1988
|
+
if (V === 0) break t;
|
|
1989
|
+
if (H = G - V, e.offset > H) {
|
|
1990
|
+
if ((H = e.offset - H) > e.whave && e.sane) {
|
|
1991
|
+
m.msg = "invalid distance too far back", e.mode = 30;
|
|
1992
|
+
break;
|
|
1993
|
+
}
|
|
1994
|
+
nt = H > e.wnext ? (H -= e.wnext, e.wsize - H) : e.wnext - H, H > e.length && (H = e.length), ot = e.window;
|
|
1995
|
+
} else ot = J, nt = $ - e.offset, H = e.length;
|
|
1996
|
+
for (V < H && (H = V), V -= H, e.length -= H; J[$++] = ot[nt++], --H; ) ;
|
|
1997
|
+
e.length === 0 && (e.mode = 21);
|
|
1998
|
+
break;
|
|
1999
|
+
case 26:
|
|
2000
|
+
if (V === 0) break t;
|
|
2001
|
+
J[$++] = e.length, V--, e.mode = 21;
|
|
2002
|
+
break;
|
|
2003
|
+
case 27:
|
|
2004
|
+
if (e.wrap) {
|
|
2005
|
+
for (; C < 32; ) {
|
|
2006
|
+
if (j === 0) break t;
|
|
2007
|
+
j--, E |= T[P++] << C, C += 8;
|
|
2008
|
+
}
|
|
2009
|
+
if (G -= V, m.total_out += G, e.total += G, G && (m.adler = e.check = e.flags ? n(e.check, J, G, $ - G) : o(e.check, J, G, $ - G)), G = V, (e.flags ? E : a(E)) !== e.check) {
|
|
2010
|
+
m.msg = "incorrect data check", e.mode = 30;
|
|
2011
|
+
break;
|
|
2012
|
+
}
|
|
2013
|
+
C = E = 0;
|
|
2014
|
+
}
|
|
2015
|
+
e.mode = 28;
|
|
2016
|
+
case 28:
|
|
2017
|
+
if (e.wrap && e.flags) {
|
|
2018
|
+
for (; C < 32; ) {
|
|
2019
|
+
if (j === 0) break t;
|
|
2020
|
+
j--, E += T[P++] << C, C += 8;
|
|
2021
|
+
}
|
|
2022
|
+
if (E !== (4294967295 & e.total)) {
|
|
2023
|
+
m.msg = "incorrect length check", e.mode = 30;
|
|
2024
|
+
break;
|
|
2025
|
+
}
|
|
2026
|
+
C = E = 0;
|
|
2027
|
+
}
|
|
2028
|
+
e.mode = 29;
|
|
2029
|
+
case 29:
|
|
2030
|
+
R = 1;
|
|
2031
|
+
break t;
|
|
2032
|
+
case 30:
|
|
2033
|
+
R = -3;
|
|
2034
|
+
break t;
|
|
2035
|
+
case 31:
|
|
2036
|
+
return -4;
|
|
2037
|
+
case 32:
|
|
2038
|
+
default:
|
|
2039
|
+
return i;
|
|
2040
|
+
}
|
|
2041
|
+
return m.next_out = $, m.avail_out = V, m.next_in = P, m.avail_in = j, e.hold = E, e.bits = C, (e.wsize || G !== m.avail_out && e.mode < 30 && (e.mode < 27 || B !== 4)) && q(m, m.output, m.next_out, G - m.avail_out) ? (e.mode = 31, -4) : (X -= m.avail_in, G -= m.avail_out, m.total_in += X, m.total_out += G, e.total += G, e.wrap && G && (m.adler = e.check = e.flags ? n(e.check, J, G, m.next_out - G) : o(e.check, J, G, m.next_out - G)), m.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === 12 ? 128 : 0) + (e.mode === 20 || e.mode === 15 ? 256 : 0), (X == 0 && G === 0 || B === 4) && R === g && (R = -5), R);
|
|
2042
|
+
}, w.inflateEnd = function(m) {
|
|
2043
|
+
if (!m || !m.state) return i;
|
|
2044
|
+
var B = m.state;
|
|
2045
|
+
return B.window && (B.window = null), m.state = null, g;
|
|
2046
|
+
}, w.inflateGetHeader = function(m, B) {
|
|
2047
|
+
var e;
|
|
2048
|
+
return m && m.state ? (2 & (e = m.state).wrap) == 0 ? i : ((e.head = B).done = !1, g) : i;
|
|
2049
|
+
}, w.inflateSetDictionary = function(m, B) {
|
|
2050
|
+
var e, T = B.length;
|
|
2051
|
+
return m && m.state ? (e = m.state).wrap !== 0 && e.mode !== 11 ? i : e.mode === 11 && o(1, B, T, 0) !== e.check ? -3 : q(m, B, T, T) ? (e.mode = 31, -4) : (e.havedict = 1, g) : i;
|
|
2052
|
+
}, w.inflateInfo = "pako inflate (from Nodeca project)";
|
|
2053
|
+
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(b, U, w) {
|
|
2054
|
+
var l = b("../utils/common"), o = [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], n = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], u = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], _ = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
2055
|
+
U.exports = function(y, p, g, i, d, r, h, a) {
|
|
2056
|
+
var c, v, S, x, D, O, L, I, W, q = a.bits, m = 0, B = 0, e = 0, T = 0, J = 0, P = 0, $ = 0, j = 0, V = 0, E = 0, C = null, X = 0, G = new l.Buf16(16), H = new l.Buf16(16), nt = null, ot = 0;
|
|
2057
|
+
for (m = 0; m <= 15; m++) G[m] = 0;
|
|
2058
|
+
for (B = 0; B < i; B++) G[p[g + B]]++;
|
|
2059
|
+
for (J = q, T = 15; 1 <= T && G[T] === 0; T--) ;
|
|
2060
|
+
if (T < J && (J = T), T === 0) return d[r++] = 20971520, d[r++] = 20971520, a.bits = 1, 0;
|
|
2061
|
+
for (e = 1; e < T && G[e] === 0; e++) ;
|
|
2062
|
+
for (J < e && (J = e), m = j = 1; m <= 15; m++) if (j <<= 1, (j -= G[m]) < 0) return -1;
|
|
2063
|
+
if (0 < j && (y === 0 || T !== 1)) return -1;
|
|
2064
|
+
for (H[1] = 0, m = 1; m < 15; m++) H[m + 1] = H[m] + G[m];
|
|
2065
|
+
for (B = 0; B < i; B++) p[g + B] !== 0 && (h[H[p[g + B]]++] = B);
|
|
2066
|
+
if (O = y === 0 ? (C = nt = h, 19) : y === 1 ? (C = o, X -= 257, nt = n, ot -= 257, 256) : (C = u, nt = _, -1), m = e, D = r, $ = B = E = 0, S = -1, x = (V = 1 << (P = J)) - 1, y === 1 && 852 < V || y === 2 && 592 < V) return 1;
|
|
2067
|
+
for (; ; ) {
|
|
2068
|
+
for (L = m - $, W = h[B] < O ? (I = 0, h[B]) : h[B] > O ? (I = nt[ot + h[B]], C[X + h[B]]) : (I = 96, 0), c = 1 << m - $, e = v = 1 << P; d[D + (E >> $) + (v -= c)] = L << 24 | I << 16 | W | 0, v !== 0; ) ;
|
|
2069
|
+
for (c = 1 << m - 1; E & c; ) c >>= 1;
|
|
2070
|
+
if (c !== 0 ? (E &= c - 1, E += c) : E = 0, B++, --G[m] == 0) {
|
|
2071
|
+
if (m === T) break;
|
|
2072
|
+
m = p[g + h[B]];
|
|
2073
|
+
}
|
|
2074
|
+
if (J < m && (E & x) !== S) {
|
|
2075
|
+
for ($ === 0 && ($ = J), D += e, j = 1 << (P = m - $); P + $ < T && !((j -= G[P + $]) <= 0); ) P++, j <<= 1;
|
|
2076
|
+
if (V += 1 << P, y === 1 && 852 < V || y === 2 && 592 < V) return 1;
|
|
2077
|
+
d[S = E & x] = J << 24 | P << 16 | D - r | 0;
|
|
2078
|
+
}
|
|
2079
|
+
}
|
|
2080
|
+
return E !== 0 && (d[D + E] = m - $ << 24 | 64 << 16 | 0), a.bits = J, 0;
|
|
2081
|
+
};
|
|
2082
|
+
}, { "../utils/common": 41 }], 51: [function(b, U, w) {
|
|
2083
|
+
U.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
|
|
2084
|
+
}, {}], 52: [function(b, U, w) {
|
|
2085
|
+
var l = b("../utils/common"), o = 0, n = 1;
|
|
2086
|
+
function u(s) {
|
|
2087
|
+
for (var k = s.length; 0 <= --k; ) s[k] = 0;
|
|
2088
|
+
}
|
|
2089
|
+
var _ = 0, y = 29, p = 256, g = p + 1 + y, i = 30, d = 19, r = 2 * g + 1, h = 15, a = 16, c = 7, v = 256, S = 16, x = 17, D = 18, O = [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 = [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 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], W = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], q = new Array(2 * (g + 2));
|
|
2090
|
+
u(q);
|
|
2091
|
+
var m = new Array(2 * i);
|
|
2092
|
+
u(m);
|
|
2093
|
+
var B = new Array(512);
|
|
2094
|
+
u(B);
|
|
2095
|
+
var e = new Array(256);
|
|
2096
|
+
u(e);
|
|
2097
|
+
var T = new Array(y);
|
|
2098
|
+
u(T);
|
|
2099
|
+
var J, P, $, j = new Array(i);
|
|
2100
|
+
function V(s, k, F, N, z) {
|
|
2101
|
+
this.static_tree = s, this.extra_bits = k, this.extra_base = F, this.elems = N, this.max_length = z, this.has_stree = s && s.length;
|
|
2102
|
+
}
|
|
2103
|
+
function E(s, k) {
|
|
2104
|
+
this.dyn_tree = s, this.max_code = 0, this.stat_desc = k;
|
|
2105
|
+
}
|
|
2106
|
+
function C(s) {
|
|
2107
|
+
return s < 256 ? B[s] : B[256 + (s >>> 7)];
|
|
2108
|
+
}
|
|
2109
|
+
function X(s, k) {
|
|
2110
|
+
s.pending_buf[s.pending++] = 255 & k, s.pending_buf[s.pending++] = k >>> 8 & 255;
|
|
2111
|
+
}
|
|
2112
|
+
function G(s, k, F) {
|
|
2113
|
+
s.bi_valid > a - F ? (s.bi_buf |= k << s.bi_valid & 65535, X(s, s.bi_buf), s.bi_buf = k >> a - s.bi_valid, s.bi_valid += F - a) : (s.bi_buf |= k << s.bi_valid & 65535, s.bi_valid += F);
|
|
2114
|
+
}
|
|
2115
|
+
function H(s, k, F) {
|
|
2116
|
+
G(s, F[2 * k], F[2 * k + 1]);
|
|
2117
|
+
}
|
|
2118
|
+
function nt(s, k) {
|
|
2119
|
+
for (var F = 0; F |= 1 & s, s >>>= 1, F <<= 1, 0 < --k; ) ;
|
|
2120
|
+
return F >>> 1;
|
|
2121
|
+
}
|
|
2122
|
+
function ot(s, k, F) {
|
|
2123
|
+
var N, z, Z = new Array(h + 1), K = 0;
|
|
2124
|
+
for (N = 1; N <= h; N++) Z[N] = K = K + F[N - 1] << 1;
|
|
2125
|
+
for (z = 0; z <= k; z++) {
|
|
2126
|
+
var M = s[2 * z + 1];
|
|
2127
|
+
M !== 0 && (s[2 * z] = nt(Z[M]++, M));
|
|
2128
|
+
}
|
|
2129
|
+
}
|
|
2130
|
+
function Q(s) {
|
|
2131
|
+
var k;
|
|
2132
|
+
for (k = 0; k < g; k++) s.dyn_ltree[2 * k] = 0;
|
|
2133
|
+
for (k = 0; k < i; k++) s.dyn_dtree[2 * k] = 0;
|
|
2134
|
+
for (k = 0; k < d; k++) s.bl_tree[2 * k] = 0;
|
|
2135
|
+
s.dyn_ltree[2 * v] = 1, s.opt_len = s.static_len = 0, s.last_lit = s.matches = 0;
|
|
2136
|
+
}
|
|
2137
|
+
function et(s) {
|
|
2138
|
+
8 < s.bi_valid ? X(s, s.bi_buf) : 0 < s.bi_valid && (s.pending_buf[s.pending++] = s.bi_buf), s.bi_buf = 0, s.bi_valid = 0;
|
|
2139
|
+
}
|
|
2140
|
+
function st(s, k, F, N) {
|
|
2141
|
+
var z = 2 * k, Z = 2 * F;
|
|
2142
|
+
return s[z] < s[Z] || s[z] === s[Z] && N[k] <= N[F];
|
|
2143
|
+
}
|
|
2144
|
+
function it(s, k, F) {
|
|
2145
|
+
for (var N = s.heap[F], z = F << 1; z <= s.heap_len && (z < s.heap_len && st(k, s.heap[z + 1], s.heap[z], s.depth) && z++, !st(k, N, s.heap[z], s.depth)); ) s.heap[F] = s.heap[z], F = z, z <<= 1;
|
|
2146
|
+
s.heap[F] = N;
|
|
2147
|
+
}
|
|
2148
|
+
function ft(s, k, F) {
|
|
2149
|
+
var N, z, Z, K, M = 0;
|
|
2150
|
+
if (s.last_lit !== 0) for (; N = s.pending_buf[s.d_buf + 2 * M] << 8 | s.pending_buf[s.d_buf + 2 * M + 1], z = s.pending_buf[s.l_buf + M], M++, N === 0 ? H(s, z, k) : (H(s, (Z = e[z]) + p + 1, k), (K = O[Z]) !== 0 && G(s, z -= T[Z], K), H(s, Z = C(--N), F), (K = L[Z]) !== 0 && G(s, N -= j[Z], K)), M < s.last_lit; ) ;
|
|
2151
|
+
H(s, v, k);
|
|
2152
|
+
}
|
|
2153
|
+
function lt(s, k) {
|
|
2154
|
+
var F, N, z, Z = k.dyn_tree, K = k.stat_desc.static_tree, M = k.stat_desc.has_stree, Y = k.stat_desc.elems, rt = -1;
|
|
2155
|
+
for (s.heap_len = 0, s.heap_max = r, F = 0; F < Y; F++) Z[2 * F] !== 0 ? (s.heap[++s.heap_len] = rt = F, s.depth[F] = 0) : Z[2 * F + 1] = 0;
|
|
2156
|
+
for (; s.heap_len < 2; ) Z[2 * (z = s.heap[++s.heap_len] = rt < 2 ? ++rt : 0)] = 1, s.depth[z] = 0, s.opt_len--, M && (s.static_len -= K[2 * z + 1]);
|
|
2157
|
+
for (k.max_code = rt, F = s.heap_len >> 1; 1 <= F; F--) it(s, Z, F);
|
|
2158
|
+
for (z = Y; F = s.heap[1], s.heap[1] = s.heap[s.heap_len--], it(s, Z, 1), N = s.heap[1], s.heap[--s.heap_max] = F, s.heap[--s.heap_max] = N, Z[2 * z] = Z[2 * F] + Z[2 * N], s.depth[z] = (s.depth[F] >= s.depth[N] ? s.depth[F] : s.depth[N]) + 1, Z[2 * F + 1] = Z[2 * N + 1] = z, s.heap[1] = z++, it(s, Z, 1), 2 <= s.heap_len; ) ;
|
|
2159
|
+
s.heap[--s.heap_max] = s.heap[1], (function(tt, ut) {
|
|
2160
|
+
var pt, dt, mt, at, gt, kt, ct = ut.dyn_tree, St = ut.max_code, Et = ut.stat_desc.static_tree, At = ut.stat_desc.has_stree, It = ut.stat_desc.extra_bits, zt = ut.stat_desc.extra_base, _t = ut.stat_desc.max_length, bt = 0;
|
|
2161
|
+
for (at = 0; at <= h; at++) tt.bl_count[at] = 0;
|
|
2162
|
+
for (ct[2 * tt.heap[tt.heap_max] + 1] = 0, pt = tt.heap_max + 1; pt < r; pt++) _t < (at = ct[2 * ct[2 * (dt = tt.heap[pt]) + 1] + 1] + 1) && (at = _t, bt++), ct[2 * dt + 1] = at, St < dt || (tt.bl_count[at]++, gt = 0, zt <= dt && (gt = It[dt - zt]), kt = ct[2 * dt], tt.opt_len += kt * (at + gt), At && (tt.static_len += kt * (Et[2 * dt + 1] + gt)));
|
|
2163
|
+
if (bt !== 0) {
|
|
2164
|
+
do {
|
|
2165
|
+
for (at = _t - 1; tt.bl_count[at] === 0; ) at--;
|
|
2166
|
+
tt.bl_count[at]--, tt.bl_count[at + 1] += 2, tt.bl_count[_t]--, bt -= 2;
|
|
2167
|
+
} while (0 < bt);
|
|
2168
|
+
for (at = _t; at !== 0; at--) for (dt = tt.bl_count[at]; dt !== 0; ) St < (mt = tt.heap[--pt]) || (ct[2 * mt + 1] !== at && (tt.opt_len += (at - ct[2 * mt + 1]) * ct[2 * mt], ct[2 * mt + 1] = at), dt--);
|
|
2169
|
+
}
|
|
2170
|
+
})(s, k), ot(Z, rt, s.bl_count);
|
|
2171
|
+
}
|
|
2172
|
+
function t(s, k, F) {
|
|
2173
|
+
var N, z, Z = -1, K = k[1], M = 0, Y = 7, rt = 4;
|
|
2174
|
+
for (K === 0 && (Y = 138, rt = 3), k[2 * (F + 1) + 1] = 65535, N = 0; N <= F; N++) z = K, K = k[2 * (N + 1) + 1], ++M < Y && z === K || (M < rt ? s.bl_tree[2 * z] += M : z !== 0 ? (z !== Z && s.bl_tree[2 * z]++, s.bl_tree[2 * S]++) : M <= 10 ? s.bl_tree[2 * x]++ : s.bl_tree[2 * D]++, Z = z, rt = (M = 0) === K ? (Y = 138, 3) : z === K ? (Y = 6, 3) : (Y = 7, 4));
|
|
2175
|
+
}
|
|
2176
|
+
function R(s, k, F) {
|
|
2177
|
+
var N, z, Z = -1, K = k[1], M = 0, Y = 7, rt = 4;
|
|
2178
|
+
for (K === 0 && (Y = 138, rt = 3), N = 0; N <= F; N++) if (z = K, K = k[2 * (N + 1) + 1], !(++M < Y && z === K)) {
|
|
2179
|
+
if (M < rt) for (; H(s, z, s.bl_tree), --M != 0; ) ;
|
|
2180
|
+
else z !== 0 ? (z !== Z && (H(s, z, s.bl_tree), M--), H(s, S, s.bl_tree), G(s, M - 3, 2)) : M <= 10 ? (H(s, x, s.bl_tree), G(s, M - 3, 3)) : (H(s, D, s.bl_tree), G(s, M - 11, 7));
|
|
2181
|
+
Z = z, rt = (M = 0) === K ? (Y = 138, 3) : z === K ? (Y = 6, 3) : (Y = 7, 4);
|
|
2182
|
+
}
|
|
2183
|
+
}
|
|
2184
|
+
u(j);
|
|
2185
|
+
var A = !1;
|
|
2186
|
+
function f(s, k, F, N) {
|
|
2187
|
+
G(s, (_ << 1) + (N ? 1 : 0), 3), (function(z, Z, K, M) {
|
|
2188
|
+
et(z), X(z, K), X(z, ~K), l.arraySet(z.pending_buf, z.window, Z, K, z.pending), z.pending += K;
|
|
2189
|
+
})(s, k, F);
|
|
2190
|
+
}
|
|
2191
|
+
w._tr_init = function(s) {
|
|
2192
|
+
A || ((function() {
|
|
2193
|
+
var k, F, N, z, Z, K = new Array(h + 1);
|
|
2194
|
+
for (z = N = 0; z < y - 1; z++) for (T[z] = N, k = 0; k < 1 << O[z]; k++) e[N++] = z;
|
|
2195
|
+
for (e[N - 1] = z, z = Z = 0; z < 16; z++) for (j[z] = Z, k = 0; k < 1 << L[z]; k++) B[Z++] = z;
|
|
2196
|
+
for (Z >>= 7; z < i; z++) for (j[z] = Z << 7, k = 0; k < 1 << L[z] - 7; k++) B[256 + Z++] = z;
|
|
2197
|
+
for (F = 0; F <= h; F++) K[F] = 0;
|
|
2198
|
+
for (k = 0; k <= 143; ) q[2 * k + 1] = 8, k++, K[8]++;
|
|
2199
|
+
for (; k <= 255; ) q[2 * k + 1] = 9, k++, K[9]++;
|
|
2200
|
+
for (; k <= 279; ) q[2 * k + 1] = 7, k++, K[7]++;
|
|
2201
|
+
for (; k <= 287; ) q[2 * k + 1] = 8, k++, K[8]++;
|
|
2202
|
+
for (ot(q, g + 1, K), k = 0; k < i; k++) m[2 * k + 1] = 5, m[2 * k] = nt(k, 5);
|
|
2203
|
+
J = new V(q, O, p + 1, g, h), P = new V(m, L, 0, i, h), $ = new V(new Array(0), I, 0, d, c);
|
|
2204
|
+
})(), A = !0), s.l_desc = new E(s.dyn_ltree, J), s.d_desc = new E(s.dyn_dtree, P), s.bl_desc = new E(s.bl_tree, $), s.bi_buf = 0, s.bi_valid = 0, Q(s);
|
|
2205
|
+
}, w._tr_stored_block = f, w._tr_flush_block = function(s, k, F, N) {
|
|
2206
|
+
var z, Z, K = 0;
|
|
2207
|
+
0 < s.level ? (s.strm.data_type === 2 && (s.strm.data_type = (function(M) {
|
|
2208
|
+
var Y, rt = 4093624447;
|
|
2209
|
+
for (Y = 0; Y <= 31; Y++, rt >>>= 1) if (1 & rt && M.dyn_ltree[2 * Y] !== 0) return o;
|
|
2210
|
+
if (M.dyn_ltree[18] !== 0 || M.dyn_ltree[20] !== 0 || M.dyn_ltree[26] !== 0) return n;
|
|
2211
|
+
for (Y = 32; Y < p; Y++) if (M.dyn_ltree[2 * Y] !== 0) return n;
|
|
2212
|
+
return o;
|
|
2213
|
+
})(s)), lt(s, s.l_desc), lt(s, s.d_desc), K = (function(M) {
|
|
2214
|
+
var Y;
|
|
2215
|
+
for (t(M, M.dyn_ltree, M.l_desc.max_code), t(M, M.dyn_dtree, M.d_desc.max_code), lt(M, M.bl_desc), Y = d - 1; 3 <= Y && M.bl_tree[2 * W[Y] + 1] === 0; Y--) ;
|
|
2216
|
+
return M.opt_len += 3 * (Y + 1) + 5 + 5 + 4, Y;
|
|
2217
|
+
})(s), z = s.opt_len + 3 + 7 >>> 3, (Z = s.static_len + 3 + 7 >>> 3) <= z && (z = Z)) : z = Z = F + 5, F + 4 <= z && k !== -1 ? f(s, k, F, N) : s.strategy === 4 || Z === z ? (G(s, 2 + (N ? 1 : 0), 3), ft(s, q, m)) : (G(s, 4 + (N ? 1 : 0), 3), (function(M, Y, rt, tt) {
|
|
2218
|
+
var ut;
|
|
2219
|
+
for (G(M, Y - 257, 5), G(M, rt - 1, 5), G(M, tt - 4, 4), ut = 0; ut < tt; ut++) G(M, M.bl_tree[2 * W[ut] + 1], 3);
|
|
2220
|
+
R(M, M.dyn_ltree, Y - 1), R(M, M.dyn_dtree, rt - 1);
|
|
2221
|
+
})(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, K + 1), ft(s, s.dyn_ltree, s.dyn_dtree)), Q(s), N && et(s);
|
|
2222
|
+
}, w._tr_tally = function(s, k, F) {
|
|
2223
|
+
return s.pending_buf[s.d_buf + 2 * s.last_lit] = k >>> 8 & 255, s.pending_buf[s.d_buf + 2 * s.last_lit + 1] = 255 & k, s.pending_buf[s.l_buf + s.last_lit] = 255 & F, s.last_lit++, k === 0 ? s.dyn_ltree[2 * F]++ : (s.matches++, k--, s.dyn_ltree[2 * (e[F] + p + 1)]++, s.dyn_dtree[2 * C(k)]++), s.last_lit === s.lit_bufsize - 1;
|
|
2224
|
+
}, w._tr_align = function(s) {
|
|
2225
|
+
G(s, 2, 3), H(s, v, q), (function(k) {
|
|
2226
|
+
k.bi_valid === 16 ? (X(k, k.bi_buf), k.bi_buf = 0, k.bi_valid = 0) : 8 <= k.bi_valid && (k.pending_buf[k.pending++] = 255 & k.bi_buf, k.bi_buf >>= 8, k.bi_valid -= 8);
|
|
2227
|
+
})(s);
|
|
2228
|
+
};
|
|
2229
|
+
}, { "../utils/common": 41 }], 53: [function(b, U, w) {
|
|
2230
|
+
U.exports = function() {
|
|
2231
|
+
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
|
|
2232
|
+
};
|
|
2233
|
+
}, {}], 54: [function(b, U, w) {
|
|
2234
|
+
(function(l) {
|
|
2235
|
+
(function(o, n) {
|
|
2236
|
+
if (!o.setImmediate) {
|
|
2237
|
+
var u, _, y, p, g = 1, i = {}, d = !1, r = o.document, h = Object.getPrototypeOf && Object.getPrototypeOf(o);
|
|
2238
|
+
h = h && h.setTimeout ? h : o, u = {}.toString.call(o.process) === "[object process]" ? function(S) {
|
|
2239
|
+
process.nextTick(function() {
|
|
2240
|
+
c(S);
|
|
2241
|
+
});
|
|
2242
|
+
} : (function() {
|
|
2243
|
+
if (o.postMessage && !o.importScripts) {
|
|
2244
|
+
var S = !0, x = o.onmessage;
|
|
2245
|
+
return o.onmessage = function() {
|
|
2246
|
+
S = !1;
|
|
2247
|
+
}, o.postMessage("", "*"), o.onmessage = x, S;
|
|
2248
|
+
}
|
|
2249
|
+
})() ? (p = "setImmediate$" + Math.random() + "$", o.addEventListener ? o.addEventListener("message", v, !1) : o.attachEvent("onmessage", v), function(S) {
|
|
2250
|
+
o.postMessage(p + S, "*");
|
|
2251
|
+
}) : o.MessageChannel ? ((y = new MessageChannel()).port1.onmessage = function(S) {
|
|
2252
|
+
c(S.data);
|
|
2253
|
+
}, function(S) {
|
|
2254
|
+
y.port2.postMessage(S);
|
|
2255
|
+
}) : r && "onreadystatechange" in r.createElement("script") ? (_ = r.documentElement, function(S) {
|
|
2256
|
+
var x = r.createElement("script");
|
|
2257
|
+
x.onreadystatechange = function() {
|
|
2258
|
+
c(S), x.onreadystatechange = null, _.removeChild(x), x = null;
|
|
2259
|
+
}, _.appendChild(x);
|
|
2260
|
+
}) : function(S) {
|
|
2261
|
+
setTimeout(c, 0, S);
|
|
2262
|
+
}, h.setImmediate = function(S) {
|
|
2263
|
+
typeof S != "function" && (S = new Function("" + S));
|
|
2264
|
+
for (var x = new Array(arguments.length - 1), D = 0; D < x.length; D++) x[D] = arguments[D + 1];
|
|
2265
|
+
var O = { callback: S, args: x };
|
|
2266
|
+
return i[g] = O, u(g), g++;
|
|
2267
|
+
}, h.clearImmediate = a;
|
|
2268
|
+
}
|
|
2269
|
+
function a(S) {
|
|
2270
|
+
delete i[S];
|
|
2271
|
+
}
|
|
2272
|
+
function c(S) {
|
|
2273
|
+
if (d) setTimeout(c, 0, S);
|
|
2274
|
+
else {
|
|
2275
|
+
var x = i[S];
|
|
2276
|
+
if (x) {
|
|
2277
|
+
d = !0;
|
|
2278
|
+
try {
|
|
2279
|
+
(function(D) {
|
|
2280
|
+
var O = D.callback, L = D.args;
|
|
2281
|
+
switch (L.length) {
|
|
2282
|
+
case 0:
|
|
2283
|
+
O();
|
|
2284
|
+
break;
|
|
2285
|
+
case 1:
|
|
2286
|
+
O(L[0]);
|
|
2287
|
+
break;
|
|
2288
|
+
case 2:
|
|
2289
|
+
O(L[0], L[1]);
|
|
2290
|
+
break;
|
|
2291
|
+
case 3:
|
|
2292
|
+
O(L[0], L[1], L[2]);
|
|
2293
|
+
break;
|
|
2294
|
+
default:
|
|
2295
|
+
O.apply(n, L);
|
|
2296
|
+
}
|
|
2297
|
+
})(x);
|
|
2298
|
+
} finally {
|
|
2299
|
+
a(S), d = !1;
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
function v(S) {
|
|
2305
|
+
S.source === o && typeof S.data == "string" && S.data.indexOf(p) === 0 && c(+S.data.slice(p.length));
|
|
2306
|
+
}
|
|
2307
|
+
})(typeof self > "u" ? l === void 0 ? this : l : self);
|
|
2308
|
+
}).call(this, typeof vt < "u" ? vt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2309
|
+
}, {}] }, {}, [10])(10);
|
|
2310
|
+
});
|
|
2311
|
+
})(xt)), xt.exports;
|
|
2312
|
+
}
|
|
2313
|
+
var Tt = Rt();
|
|
2314
|
+
const Dt = /* @__PURE__ */ Bt(Tt);
|
|
2315
|
+
async function Nt(ht) {
|
|
2316
|
+
const wt = new Dt(), b = await Ot(ht);
|
|
2317
|
+
for await (const l of b)
|
|
2318
|
+
wt.file(l.path, l.data);
|
|
2319
|
+
const U = await wt.generateAsync({ type: "blob" }), w = document.createElement("a");
|
|
2320
|
+
w.href = URL.createObjectURL(U), w.download = "offline.zip", w.click(), URL.revokeObjectURL(w.href);
|
|
2321
|
+
}
|
|
2322
|
+
export {
|
|
2323
|
+
Nt as downloadZip
|
|
2324
|
+
};
|
|
2325
|
+
//# sourceMappingURL=downloadZip-DwDnK9eb.js.map
|