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