@work-zhanguo/light-file-preview 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/{DocxRenderer-B8Ed3qFw.js → DocxRenderer-D0ngcG2T.js} +2 -2
- package/dist/{PdfRenderer-CYtwJLrP.js → PdfRenderer-SICIjXYT.js} +2 -2
- package/dist/{SheetRenderer-C9AKQiKN.js → SheetRenderer-D4Y1dYZX.js} +2 -2
- package/dist/{TextRenderer-W4uPsa5O.js → TextRenderer-KUhpnf63.js} +14 -14
- package/dist/{UnsupportedRenderer-BpyBTIIE.js → UnsupportedRenderer-Y2AgN0-l.js} +1 -1
- package/dist/{docx-preview-B2OPGnfm.js → docx-preview-D_8kC8vU.js} +666 -652
- package/dist/{index-BlBE9ZR-.js → index-DZOrV9D_.js} +86 -85
- package/dist/light-file-preview.js +1 -1
- package/dist/light-file-preview.umd.cjs +29 -29
- package/dist/{marked.esm-toXckLRC.js → marked.esm-CRmQbSOC.js} +15 -15
- package/dist/{pdf-B2JYpzlX.js → pdf-CV932zwQ.js} +1863 -1849
- package/dist/{purify.es-D5dazAgD.js → purify.es-CCmmh-Lt.js} +10 -10
- package/dist/standalone/light-file-preview.iife.js +68 -68
- package/dist/standalone/style.css +1 -1
- package/dist/style.css +1 -1
- package/dist/{text-CcxmtFce.js → text-Bqxn_tMI.js} +5 -5
- package/dist/vue2/{DocxRenderer-IkLQeCjg.js → DocxRenderer-D-MItvaP.js} +3 -3
- package/dist/vue2/{PdfRenderer-DmgMRpqS.js → PdfRenderer-rw-3PY9w.js} +3 -3
- package/dist/vue2/{SheetRenderer-CuAyFgj9.js → SheetRenderer-BxfF54Q3.js} +3 -3
- package/dist/vue2/{TextRenderer-Bxqs7APd.js → TextRenderer-DOzgi4YR.js} +14 -14
- package/dist/vue2/{UnsupportedRenderer-Cs2uPl_6.js → UnsupportedRenderer-VozD1bVb.js} +1 -1
- package/dist/vue2/{docx-preview-B2OPGnfm.js → docx-preview-D_8kC8vU.js} +666 -652
- package/dist/vue2/light-file-preview-vue2.js +1 -1
- package/dist/vue2/light-file-preview-vue2.umd.cjs +76 -76
- package/dist/vue2/{marked.esm-toXckLRC.js → marked.esm-CRmQbSOC.js} +15 -15
- package/dist/vue2/{pdf-B2JYpzlX.js → pdf-CV932zwQ.js} +1863 -1849
- package/dist/vue2/{purify.es-D5dazAgD.js → purify.es-CCmmh-Lt.js} +10 -10
- package/dist/vue2/{text-CcxmtFce.js → text-Bqxn_tMI.js} +5 -5
- package/dist/vue2/{vue2-CzAkhodr.js → vue2-rrMAk2-n.js} +119 -118
- package/dist/vue2/{xlsx-CZNBZqms.js → xlsx-j9Zzywas.js} +82 -82
- package/dist/{xlsx-CZNBZqms.js → xlsx-j9Zzywas.js} +82 -82
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Mt = typeof globalThis
|
|
1
|
+
var Mt = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
|
|
2
2
|
function _e(c) {
|
|
3
3
|
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
4
4
|
}
|
|
@@ -24,53 +24,53 @@ function we() {
|
|
|
24
24
|
c.exports = t();
|
|
25
25
|
})(function() {
|
|
26
26
|
return (function t(r, n, a) {
|
|
27
|
-
function o(
|
|
28
|
-
if (!n[
|
|
29
|
-
if (!r[
|
|
27
|
+
function o(b, y) {
|
|
28
|
+
if (!n[b]) {
|
|
29
|
+
if (!r[b]) {
|
|
30
30
|
var _ = typeof Rt == "function" && Rt;
|
|
31
|
-
if (!
|
|
32
|
-
if (i) return i(
|
|
33
|
-
var
|
|
34
|
-
throw
|
|
31
|
+
if (!y && _) return _(b, !0);
|
|
32
|
+
if (i) return i(b, !0);
|
|
33
|
+
var w = new Error("Cannot find module '" + b + "'");
|
|
34
|
+
throw w.code = "MODULE_NOT_FOUND", w;
|
|
35
35
|
}
|
|
36
|
-
var d = n[
|
|
37
|
-
r[
|
|
38
|
-
var u = r[
|
|
39
|
-
return o(u ||
|
|
36
|
+
var d = n[b] = { exports: {} };
|
|
37
|
+
r[b][0].call(d.exports, function(k) {
|
|
38
|
+
var u = r[b][1][k];
|
|
39
|
+
return o(u || k);
|
|
40
40
|
}, d, d.exports, t, r, n, a);
|
|
41
41
|
}
|
|
42
|
-
return n[
|
|
42
|
+
return n[b].exports;
|
|
43
43
|
}
|
|
44
44
|
for (var i = typeof Rt == "function" && Rt, h = 0; h < a.length; h++) o(a[h]);
|
|
45
45
|
return o;
|
|
46
46
|
})({ 1: [function(t, r, n) {
|
|
47
47
|
var a = t("./utils"), o = t("./support"), i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
48
48
|
n.encode = function(h) {
|
|
49
|
-
for (var
|
|
49
|
+
for (var b, y, _, w, d, k, u, m = [], f = 0, v = h.length, x = v, A = a.getTypeOf(h) !== "string"; f < h.length; ) x = v - f, _ = A ? (b = h[f++], y = f < v ? h[f++] : 0, f < v ? h[f++] : 0) : (b = h.charCodeAt(f++), y = f < v ? h.charCodeAt(f++) : 0, f < v ? h.charCodeAt(f++) : 0), w = b >> 2, d = (3 & b) << 4 | y >> 4, k = 1 < x ? (15 & y) << 2 | _ >> 6 : 64, u = 2 < x ? 63 & _ : 64, m.push(i.charAt(w) + i.charAt(d) + i.charAt(k) + i.charAt(u));
|
|
50
50
|
return m.join("");
|
|
51
51
|
}, n.decode = function(h) {
|
|
52
|
-
var
|
|
52
|
+
var b, y, _, w, d, k, u = 0, m = 0, f = "data:";
|
|
53
53
|
if (h.substr(0, f.length) === f) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
54
|
-
var
|
|
54
|
+
var v, x = 3 * (h = h.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
55
55
|
if (h.charAt(h.length - 1) === i.charAt(64) && x--, h.charAt(h.length - 2) === i.charAt(64) && x--, x % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
56
|
-
for (
|
|
57
|
-
return
|
|
56
|
+
for (v = o.uint8array ? new Uint8Array(0 | x) : new Array(0 | x); u < h.length; ) b = i.indexOf(h.charAt(u++)) << 2 | (w = i.indexOf(h.charAt(u++))) >> 4, y = (15 & w) << 4 | (d = i.indexOf(h.charAt(u++))) >> 2, _ = (3 & d) << 6 | (k = i.indexOf(h.charAt(u++))), v[m++] = b, d !== 64 && (v[m++] = y), k !== 64 && (v[m++] = _);
|
|
57
|
+
return v;
|
|
58
58
|
};
|
|
59
59
|
}, { "./support": 30, "./utils": 32 }], 2: [function(t, r, n) {
|
|
60
60
|
var a = t("./external"), o = t("./stream/DataWorker"), i = t("./stream/Crc32Probe"), h = t("./stream/DataLengthProbe");
|
|
61
|
-
function y
|
|
62
|
-
this.compressedSize =
|
|
61
|
+
function b(y, _, w, d, k) {
|
|
62
|
+
this.compressedSize = y, this.uncompressedSize = _, this.crc32 = w, this.compression = d, this.compressedContent = k;
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
var
|
|
66
|
-
return
|
|
64
|
+
b.prototype = { getContentWorker: function() {
|
|
65
|
+
var y = new o(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")), _ = this;
|
|
66
|
+
return y.on("end", function() {
|
|
67
67
|
if (this.streamInfo.data_length !== _.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
|
|
68
|
-
}),
|
|
68
|
+
}), y;
|
|
69
69
|
}, getCompressedWorker: function() {
|
|
70
70
|
return new o(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
71
|
-
} },
|
|
72
|
-
return
|
|
73
|
-
}, r.exports =
|
|
71
|
+
} }, b.createWorkerFrom = function(y, _, w) {
|
|
72
|
+
return y.pipe(new i()).pipe(new h("uncompressedSize")).pipe(_.compressWorker(w)).pipe(new h("compressedSize")).withStreamInfo("compression", _);
|
|
73
|
+
}, r.exports = b;
|
|
74
74
|
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(t, r, n) {
|
|
75
75
|
var a = t("./stream/GenericWorker");
|
|
76
76
|
n.STORE = { magic: "\0\0", compressWorker: function() {
|
|
@@ -80,148 +80,148 @@ function we() {
|
|
|
80
80
|
} }, n.DEFLATE = t("./flate");
|
|
81
81
|
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(t, r, n) {
|
|
82
82
|
var a = t("./utils"), o = (function() {
|
|
83
|
-
for (var i, h = [],
|
|
84
|
-
i =
|
|
85
|
-
for (var
|
|
86
|
-
h[
|
|
83
|
+
for (var i, h = [], b = 0; b < 256; b++) {
|
|
84
|
+
i = b;
|
|
85
|
+
for (var y = 0; y < 8; y++) i = 1 & i ? 3988292384 ^ i >>> 1 : i >>> 1;
|
|
86
|
+
h[b] = i;
|
|
87
87
|
}
|
|
88
88
|
return h;
|
|
89
89
|
})();
|
|
90
90
|
r.exports = function(i, h) {
|
|
91
|
-
return i !== void 0 && i.length ? a.getTypeOf(i) !== "string" ? (function(
|
|
92
|
-
var d = o,
|
|
93
|
-
|
|
94
|
-
for (var u =
|
|
95
|
-
return -1 ^
|
|
96
|
-
})(0 | h, i, i.length, 0) : (function(
|
|
97
|
-
var d = o,
|
|
98
|
-
|
|
99
|
-
for (var u =
|
|
100
|
-
return -1 ^
|
|
91
|
+
return i !== void 0 && i.length ? a.getTypeOf(i) !== "string" ? (function(b, y, _, w) {
|
|
92
|
+
var d = o, k = w + _;
|
|
93
|
+
b ^= -1;
|
|
94
|
+
for (var u = w; u < k; u++) b = b >>> 8 ^ d[255 & (b ^ y[u])];
|
|
95
|
+
return -1 ^ b;
|
|
96
|
+
})(0 | h, i, i.length, 0) : (function(b, y, _, w) {
|
|
97
|
+
var d = o, k = w + _;
|
|
98
|
+
b ^= -1;
|
|
99
|
+
for (var u = w; u < k; u++) b = b >>> 8 ^ d[255 & (b ^ y.charCodeAt(u))];
|
|
100
|
+
return -1 ^ b;
|
|
101
101
|
})(0 | h, i, i.length, 0) : 0;
|
|
102
102
|
};
|
|
103
103
|
}, { "./utils": 32 }], 5: [function(t, r, n) {
|
|
104
104
|
n.base64 = !1, n.binary = !1, n.dir = !1, n.createFolders = !0, n.date = null, n.compression = null, n.compressionOptions = null, n.comment = null, n.unixPermissions = null, n.dosPermissions = null;
|
|
105
105
|
}, {}], 6: [function(t, r, n) {
|
|
106
106
|
var a = null;
|
|
107
|
-
a = typeof Promise
|
|
107
|
+
a = typeof Promise != "undefined" ? Promise : t("lie"), r.exports = { Promise: a };
|
|
108
108
|
}, { lie: 37 }], 7: [function(t, r, n) {
|
|
109
|
-
var a = typeof Uint8Array
|
|
110
|
-
function
|
|
111
|
-
h.call(this, "FlateWorker/" + _), this._pako = null, this._pakoAction = _, this._pakoOptions =
|
|
109
|
+
var a = typeof Uint8Array != "undefined" && typeof Uint16Array != "undefined" && typeof Uint32Array != "undefined", o = t("pako"), i = t("./utils"), h = t("./stream/GenericWorker"), b = a ? "uint8array" : "array";
|
|
110
|
+
function y(_, w) {
|
|
111
|
+
h.call(this, "FlateWorker/" + _), this._pako = null, this._pakoAction = _, this._pakoOptions = w, this.meta = {};
|
|
112
112
|
}
|
|
113
|
-
n.magic = "\b\0", i.inherits(
|
|
114
|
-
this.meta = _.meta, this._pako === null && this._createPako(), this._pako.push(i.transformTo(
|
|
115
|
-
},
|
|
113
|
+
n.magic = "\b\0", i.inherits(y, h), y.prototype.processChunk = function(_) {
|
|
114
|
+
this.meta = _.meta, this._pako === null && this._createPako(), this._pako.push(i.transformTo(b, _.data), !1);
|
|
115
|
+
}, y.prototype.flush = function() {
|
|
116
116
|
h.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
|
|
117
|
-
},
|
|
117
|
+
}, y.prototype.cleanUp = function() {
|
|
118
118
|
h.prototype.cleanUp.call(this), this._pako = null;
|
|
119
|
-
},
|
|
119
|
+
}, y.prototype._createPako = function() {
|
|
120
120
|
this._pako = new o[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
|
|
121
121
|
var _ = this;
|
|
122
|
-
this._pako.onData = function(
|
|
123
|
-
_.push({ data:
|
|
122
|
+
this._pako.onData = function(w) {
|
|
123
|
+
_.push({ data: w, meta: _.meta });
|
|
124
124
|
};
|
|
125
125
|
}, n.compressWorker = function(_) {
|
|
126
|
-
return new
|
|
126
|
+
return new y("Deflate", _);
|
|
127
127
|
}, n.uncompressWorker = function() {
|
|
128
|
-
return new
|
|
128
|
+
return new y("Inflate", {});
|
|
129
129
|
};
|
|
130
130
|
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(t, r, n) {
|
|
131
|
-
function a(d,
|
|
131
|
+
function a(d, k) {
|
|
132
132
|
var u, m = "";
|
|
133
|
-
for (u = 0; u <
|
|
133
|
+
for (u = 0; u < k; u++) m += String.fromCharCode(255 & d), d >>>= 8;
|
|
134
134
|
return m;
|
|
135
135
|
}
|
|
136
|
-
function o(d,
|
|
137
|
-
var x, A, P = d.file, D = d.compression, F =
|
|
138
|
-
|
|
136
|
+
function o(d, k, u, m, f, v) {
|
|
137
|
+
var x, A, P = d.file, D = d.compression, F = v !== b.utf8encode, W = i.transformTo("string", v(P.name)), T = i.transformTo("string", b.utf8encode(P.name)), V = P.comment, Q = i.transformTo("string", v(V)), S = i.transformTo("string", b.utf8encode(V)), I = T.length !== P.name.length, l = S.length !== V.length, L = "", et = "", $ = "", rt = P.dir, H = P.date, tt = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
138
|
+
k && !u || (tt.crc32 = d.crc32, tt.compressedSize = d.compressedSize, tt.uncompressedSize = d.uncompressedSize);
|
|
139
139
|
var M = 0;
|
|
140
|
-
|
|
140
|
+
k && (M |= 8), F || !I && !l || (M |= 2048);
|
|
141
141
|
var z = 0, J = 0;
|
|
142
142
|
rt && (z |= 16), f === "UNIX" ? (J = 798, z |= (function(X, ct) {
|
|
143
143
|
var mt = X;
|
|
144
144
|
return X || (mt = ct ? 16893 : 33204), (65535 & mt) << 16;
|
|
145
145
|
})(P.unixPermissions, rt)) : (J = 20, z |= (function(X) {
|
|
146
146
|
return 63 & (X || 0);
|
|
147
|
-
})(P.dosPermissions)), x = H.getUTCHours(), x <<= 6, x |= H.getUTCMinutes(), x <<= 5, x |= H.getUTCSeconds() / 2, A = H.getUTCFullYear() - 1980, A <<= 4, A |= H.getUTCMonth() + 1, A <<= 5, A |= H.getUTCDate(), I && (et = a(1, 1) + a(
|
|
147
|
+
})(P.dosPermissions)), x = H.getUTCHours(), x <<= 6, x |= H.getUTCMinutes(), x <<= 5, x |= H.getUTCSeconds() / 2, A = H.getUTCFullYear() - 1980, A <<= 4, A |= H.getUTCMonth() + 1, A <<= 5, A |= H.getUTCDate(), I && (et = a(1, 1) + a(y(W), 4) + T, L += "up" + a(et.length, 2) + et), l && ($ = a(1, 1) + a(y(Q), 4) + S, L += "uc" + a($.length, 2) + $);
|
|
148
148
|
var q = "";
|
|
149
149
|
return q += `
|
|
150
150
|
\0`, q += a(M, 2), q += D.magic, q += a(x, 2), q += a(A, 2), q += a(tt.crc32, 4), q += a(tt.compressedSize, 4), q += a(tt.uncompressedSize, 4), q += a(W.length, 2), q += a(L.length, 2), { fileRecord: _.LOCAL_FILE_HEADER + q + W + L, dirRecord: _.CENTRAL_FILE_HEADER + a(J, 2) + q + a(Q.length, 2) + "\0\0\0\0" + a(z, 4) + a(m, 4) + W + L + Q };
|
|
151
151
|
}
|
|
152
|
-
var i = t("../utils"), h = t("../stream/GenericWorker"),
|
|
153
|
-
function
|
|
154
|
-
h.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment =
|
|
152
|
+
var i = t("../utils"), h = t("../stream/GenericWorker"), b = t("../utf8"), y = t("../crc32"), _ = t("../signature");
|
|
153
|
+
function w(d, k, u, m) {
|
|
154
|
+
h.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = k, this.zipPlatform = u, this.encodeFileName = m, this.streamFiles = d, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
155
155
|
}
|
|
156
|
-
i.inherits(
|
|
157
|
-
var
|
|
158
|
-
this.accumulate ? this.contentBuffer.push(d) : (this.bytesWritten += d.data.length, h.prototype.push.call(this, { data: d.data, meta: { currentFile: this.currentFile, percent: u ? (
|
|
159
|
-
},
|
|
156
|
+
i.inherits(w, h), w.prototype.push = function(d) {
|
|
157
|
+
var k = d.meta.percent || 0, u = this.entriesCount, m = this._sources.length;
|
|
158
|
+
this.accumulate ? this.contentBuffer.push(d) : (this.bytesWritten += d.data.length, h.prototype.push.call(this, { data: d.data, meta: { currentFile: this.currentFile, percent: u ? (k + 100 * (u - m - 1)) / u : 100 } }));
|
|
159
|
+
}, w.prototype.openedSource = function(d) {
|
|
160
160
|
this.currentSourceOffset = this.bytesWritten, this.currentFile = d.file.name;
|
|
161
|
-
var
|
|
162
|
-
if (
|
|
163
|
-
var u = o(d,
|
|
161
|
+
var k = this.streamFiles && !d.file.dir;
|
|
162
|
+
if (k) {
|
|
163
|
+
var u = o(d, k, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
164
164
|
this.push({ data: u.fileRecord, meta: { percent: 0 } });
|
|
165
165
|
} else this.accumulate = !0;
|
|
166
|
-
},
|
|
166
|
+
}, w.prototype.closedSource = function(d) {
|
|
167
167
|
this.accumulate = !1;
|
|
168
|
-
var
|
|
169
|
-
if (this.dirRecords.push(u.dirRecord),
|
|
168
|
+
var k = this.streamFiles && !d.file.dir, u = o(d, k, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
169
|
+
if (this.dirRecords.push(u.dirRecord), k) this.push({ data: (function(m) {
|
|
170
170
|
return _.DATA_DESCRIPTOR + a(m.crc32, 4) + a(m.compressedSize, 4) + a(m.uncompressedSize, 4);
|
|
171
171
|
})(d), meta: { percent: 100 } });
|
|
172
172
|
else for (this.push({ data: u.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift());
|
|
173
173
|
this.currentFile = null;
|
|
174
|
-
},
|
|
175
|
-
for (var d = this.bytesWritten,
|
|
176
|
-
var u = this.bytesWritten - d, m = (function(f,
|
|
174
|
+
}, w.prototype.flush = function() {
|
|
175
|
+
for (var d = this.bytesWritten, k = 0; k < this.dirRecords.length; k++) this.push({ data: this.dirRecords[k], meta: { percent: 100 } });
|
|
176
|
+
var u = this.bytesWritten - d, m = (function(f, v, x, A, P) {
|
|
177
177
|
var D = i.transformTo("string", P(A));
|
|
178
|
-
return _.CENTRAL_DIRECTORY_END + "\0\0\0\0" + a(f, 2) + a(f, 2) + a(
|
|
178
|
+
return _.CENTRAL_DIRECTORY_END + "\0\0\0\0" + a(f, 2) + a(f, 2) + a(v, 4) + a(x, 4) + a(D.length, 2) + D;
|
|
179
179
|
})(this.dirRecords.length, u, d, this.zipComment, this.encodeFileName);
|
|
180
180
|
this.push({ data: m, meta: { percent: 100 } });
|
|
181
|
-
},
|
|
181
|
+
}, w.prototype.prepareNextSource = function() {
|
|
182
182
|
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
|
|
183
|
-
},
|
|
183
|
+
}, w.prototype.registerPrevious = function(d) {
|
|
184
184
|
this._sources.push(d);
|
|
185
|
-
var
|
|
185
|
+
var k = this;
|
|
186
186
|
return d.on("data", function(u) {
|
|
187
|
-
|
|
187
|
+
k.processChunk(u);
|
|
188
188
|
}), d.on("end", function() {
|
|
189
|
-
|
|
189
|
+
k.closedSource(k.previous.streamInfo), k._sources.length ? k.prepareNextSource() : k.end();
|
|
190
190
|
}), d.on("error", function(u) {
|
|
191
|
-
|
|
191
|
+
k.error(u);
|
|
192
192
|
}), this;
|
|
193
|
-
},
|
|
193
|
+
}, w.prototype.resume = function() {
|
|
194
194
|
return !!h.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
|
|
195
|
-
},
|
|
196
|
-
var
|
|
195
|
+
}, w.prototype.error = function(d) {
|
|
196
|
+
var k = this._sources;
|
|
197
197
|
if (!h.prototype.error.call(this, d)) return !1;
|
|
198
|
-
for (var u = 0; u <
|
|
199
|
-
|
|
200
|
-
} catch {
|
|
198
|
+
for (var u = 0; u < k.length; u++) try {
|
|
199
|
+
k[u].error(d);
|
|
200
|
+
} catch (m) {
|
|
201
201
|
}
|
|
202
202
|
return !0;
|
|
203
|
-
},
|
|
203
|
+
}, w.prototype.lock = function() {
|
|
204
204
|
h.prototype.lock.call(this);
|
|
205
|
-
for (var d = this._sources,
|
|
206
|
-
}, r.exports =
|
|
205
|
+
for (var d = this._sources, k = 0; k < d.length; k++) d[k].lock();
|
|
206
|
+
}, r.exports = w;
|
|
207
207
|
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(t, r, n) {
|
|
208
208
|
var a = t("../compressions"), o = t("./ZipFileWorker");
|
|
209
|
-
n.generateWorker = function(i, h,
|
|
210
|
-
var
|
|
209
|
+
n.generateWorker = function(i, h, b) {
|
|
210
|
+
var y = new o(h.streamFiles, b, h.platform, h.encodeFileName), _ = 0;
|
|
211
211
|
try {
|
|
212
|
-
i.forEach(function(
|
|
212
|
+
i.forEach(function(w, d) {
|
|
213
213
|
_++;
|
|
214
|
-
var
|
|
215
|
-
var A =
|
|
214
|
+
var k = (function(v, x) {
|
|
215
|
+
var A = v || x, P = a[A];
|
|
216
216
|
if (!P) throw new Error(A + " is not a valid compression method !");
|
|
217
217
|
return P;
|
|
218
218
|
})(d.options.compression, h.compression), u = d.options.compressionOptions || h.compressionOptions || {}, m = d.dir, f = d.date;
|
|
219
|
-
d._compressWorker(
|
|
220
|
-
}),
|
|
221
|
-
} catch (
|
|
222
|
-
|
|
219
|
+
d._compressWorker(k, u).withStreamInfo("file", { name: w, dir: m, date: f, comment: d.comment || "", unixPermissions: d.unixPermissions, dosPermissions: d.dosPermissions }).pipe(y);
|
|
220
|
+
}), y.entriesCount = _;
|
|
221
|
+
} catch (w) {
|
|
222
|
+
y.error(w);
|
|
223
223
|
}
|
|
224
|
-
return
|
|
224
|
+
return y;
|
|
225
225
|
};
|
|
226
226
|
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(t, r, n) {
|
|
227
227
|
function a() {
|
|
@@ -237,47 +237,47 @@ function we() {
|
|
|
237
237
|
return new a().loadAsync(o, i);
|
|
238
238
|
}, a.external = t("./external"), r.exports = a;
|
|
239
239
|
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(t, r, n) {
|
|
240
|
-
var a = t("./utils"), o = t("./external"), i = t("./utf8"), h = t("./zipEntries"),
|
|
241
|
-
function _(
|
|
242
|
-
return new o.Promise(function(d,
|
|
243
|
-
var u =
|
|
240
|
+
var a = t("./utils"), o = t("./external"), i = t("./utf8"), h = t("./zipEntries"), b = t("./stream/Crc32Probe"), y = t("./nodejsUtils");
|
|
241
|
+
function _(w) {
|
|
242
|
+
return new o.Promise(function(d, k) {
|
|
243
|
+
var u = w.decompressed.getContentWorker().pipe(new b());
|
|
244
244
|
u.on("error", function(m) {
|
|
245
|
-
|
|
245
|
+
k(m);
|
|
246
246
|
}).on("end", function() {
|
|
247
|
-
u.streamInfo.crc32 !==
|
|
247
|
+
u.streamInfo.crc32 !== w.decompressed.crc32 ? k(new Error("Corrupted zip : CRC32 mismatch")) : d();
|
|
248
248
|
}).resume();
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
|
-
r.exports = function(
|
|
252
|
-
var
|
|
253
|
-
return d = a.extend(d || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: i.utf8decode }),
|
|
251
|
+
r.exports = function(w, d) {
|
|
252
|
+
var k = this;
|
|
253
|
+
return d = a.extend(d || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: i.utf8decode }), y.isNode && y.isStream(w) ? o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : a.prepareContent("the loaded zip file", w, !0, d.optimizedBinaryString, d.base64).then(function(u) {
|
|
254
254
|
var m = new h(d);
|
|
255
255
|
return m.load(u), m;
|
|
256
256
|
}).then(function(u) {
|
|
257
257
|
var m = [o.Promise.resolve(u)], f = u.files;
|
|
258
|
-
if (d.checkCRC32) for (var
|
|
258
|
+
if (d.checkCRC32) for (var v = 0; v < f.length; v++) m.push(_(f[v]));
|
|
259
259
|
return o.Promise.all(m);
|
|
260
260
|
}).then(function(u) {
|
|
261
|
-
for (var m = u.shift(), f = m.files,
|
|
262
|
-
var x = f[
|
|
263
|
-
|
|
261
|
+
for (var m = u.shift(), f = m.files, v = 0; v < f.length; v++) {
|
|
262
|
+
var x = f[v], A = x.fileNameStr, P = a.resolve(x.fileNameStr);
|
|
263
|
+
k.file(P, x.decompressed, { binary: !0, optimizedBinaryString: !0, date: x.date, dir: x.dir, comment: x.fileCommentStr.length ? x.fileCommentStr : null, unixPermissions: x.unixPermissions, dosPermissions: x.dosPermissions, createFolders: d.createFolders }), x.dir || (k.file(P).unsafeOriginalName = A);
|
|
264
264
|
}
|
|
265
|
-
return m.zipComment.length && (
|
|
265
|
+
return m.zipComment.length && (k.comment = m.zipComment), k;
|
|
266
266
|
});
|
|
267
267
|
};
|
|
268
268
|
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(t, r, n) {
|
|
269
269
|
var a = t("../utils"), o = t("../stream/GenericWorker");
|
|
270
|
-
function i(h,
|
|
271
|
-
o.call(this, "Nodejs stream input adapter for " + h), this._upstreamEnded = !1, this._bindStream(
|
|
270
|
+
function i(h, b) {
|
|
271
|
+
o.call(this, "Nodejs stream input adapter for " + h), this._upstreamEnded = !1, this._bindStream(b);
|
|
272
272
|
}
|
|
273
273
|
a.inherits(i, o), i.prototype._bindStream = function(h) {
|
|
274
|
-
var
|
|
275
|
-
(this._stream = h).pause(), h.on("data", function(
|
|
276
|
-
|
|
277
|
-
}).on("error", function(
|
|
278
|
-
|
|
274
|
+
var b = this;
|
|
275
|
+
(this._stream = h).pause(), h.on("data", function(y) {
|
|
276
|
+
b.push({ data: y, meta: { percent: 0 } });
|
|
277
|
+
}).on("error", function(y) {
|
|
278
|
+
b.isPaused ? this.generatedError = y : b.error(y);
|
|
279
279
|
}).on("end", function() {
|
|
280
|
-
|
|
280
|
+
b.isPaused ? b._upstreamEnded = !0 : b.end();
|
|
281
281
|
});
|
|
282
282
|
}, i.prototype.pause = function() {
|
|
283
283
|
return !!o.prototype.pause.call(this) && (this._stream.pause(), !0);
|
|
@@ -286,22 +286,22 @@ function we() {
|
|
|
286
286
|
}, r.exports = i;
|
|
287
287
|
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(t, r, n) {
|
|
288
288
|
var a = t("readable-stream").Readable;
|
|
289
|
-
function o(i, h,
|
|
289
|
+
function o(i, h, b) {
|
|
290
290
|
a.call(this, h), this._helper = i;
|
|
291
|
-
var
|
|
292
|
-
i.on("data", function(_,
|
|
293
|
-
|
|
291
|
+
var y = this;
|
|
292
|
+
i.on("data", function(_, w) {
|
|
293
|
+
y.push(_) || y._helper.pause(), b && b(w);
|
|
294
294
|
}).on("error", function(_) {
|
|
295
|
-
|
|
295
|
+
y.emit("error", _);
|
|
296
296
|
}).on("end", function() {
|
|
297
|
-
|
|
297
|
+
y.push(null);
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
300
|
t("../utils").inherits(o, a), o.prototype._read = function() {
|
|
301
301
|
this._helper.resume();
|
|
302
302
|
}, r.exports = o;
|
|
303
303
|
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(t, r, n) {
|
|
304
|
-
r.exports = { isNode: typeof Buffer
|
|
304
|
+
r.exports = { isNode: typeof Buffer != "undefined", newBufferFrom: function(a, o) {
|
|
305
305
|
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(a, o);
|
|
306
306
|
if (typeof a == "number") throw new Error('The "data" argument must not be a number');
|
|
307
307
|
return new Buffer(a, o);
|
|
@@ -316,23 +316,23 @@ function we() {
|
|
|
316
316
|
} };
|
|
317
317
|
}, {}], 15: [function(t, r, n) {
|
|
318
318
|
function a(P, D, F) {
|
|
319
|
-
var W, T = i.getTypeOf(D), V = i.extend(F || {},
|
|
320
|
-
V.date = V.date || /* @__PURE__ */ new Date(), V.compression !== null && (V.compression = V.compression.toUpperCase()), typeof V.unixPermissions == "string" && (V.unixPermissions = parseInt(V.unixPermissions, 8)), V.unixPermissions && 16384 & V.unixPermissions && (V.dir = !0), V.dosPermissions && 16 & V.dosPermissions && (V.dir = !0), V.dir && (P = f(P)), V.createFolders && (W = m(P)) &&
|
|
319
|
+
var W, T = i.getTypeOf(D), V = i.extend(F || {}, y);
|
|
320
|
+
V.date = V.date || /* @__PURE__ */ new Date(), V.compression !== null && (V.compression = V.compression.toUpperCase()), typeof V.unixPermissions == "string" && (V.unixPermissions = parseInt(V.unixPermissions, 8)), V.unixPermissions && 16384 & V.unixPermissions && (V.dir = !0), V.dosPermissions && 16 & V.dosPermissions && (V.dir = !0), V.dir && (P = f(P)), V.createFolders && (W = m(P)) && v.call(this, W, !0);
|
|
321
321
|
var Q = T === "string" && V.binary === !1 && V.base64 === !1;
|
|
322
322
|
F && F.binary !== void 0 || (V.binary = !Q), (D instanceof _ && D.uncompressedSize === 0 || V.dir || !D || D.length === 0) && (V.base64 = !1, V.binary = !0, D = "", V.compression = "STORE", T = "string");
|
|
323
323
|
var S = null;
|
|
324
|
-
S = D instanceof _ || D instanceof h ? D :
|
|
325
|
-
var I = new
|
|
324
|
+
S = D instanceof _ || D instanceof h ? D : k.isNode && k.isStream(D) ? new u(P, D) : i.prepareContent(P, D, V.binary, V.optimizedBinaryString, V.base64);
|
|
325
|
+
var I = new w(P, S, V);
|
|
326
326
|
this.files[P] = I;
|
|
327
327
|
}
|
|
328
|
-
var o = t("./utf8"), i = t("./utils"), h = t("./stream/GenericWorker"),
|
|
328
|
+
var o = t("./utf8"), i = t("./utils"), h = t("./stream/GenericWorker"), b = t("./stream/StreamHelper"), y = t("./defaults"), _ = t("./compressedObject"), w = t("./zipObject"), d = t("./generate"), k = t("./nodejsUtils"), u = t("./nodejs/NodejsStreamInputAdapter"), m = function(P) {
|
|
329
329
|
P.slice(-1) === "/" && (P = P.substring(0, P.length - 1));
|
|
330
330
|
var D = P.lastIndexOf("/");
|
|
331
331
|
return 0 < D ? P.substring(0, D) : "";
|
|
332
332
|
}, f = function(P) {
|
|
333
333
|
return P.slice(-1) !== "/" && (P += "/"), P;
|
|
334
|
-
},
|
|
335
|
-
return D = D !== void 0 ? D :
|
|
334
|
+
}, v = function(P, D) {
|
|
335
|
+
return D = D !== void 0 ? D : y.createFolders, P = f(P), this.files[P] || a.call(this, P, null, { dir: !0, createFolders: D }), this.files[P];
|
|
336
336
|
};
|
|
337
337
|
function x(P) {
|
|
338
338
|
return Object.prototype.toString.call(P) === "[object RegExp]";
|
|
@@ -362,7 +362,7 @@ function we() {
|
|
|
362
362
|
if (x(P)) return this.filter(function(T, V) {
|
|
363
363
|
return V.dir && P.test(T);
|
|
364
364
|
});
|
|
365
|
-
var D = this.root + P, F =
|
|
365
|
+
var D = this.root + P, F = v.call(this, D), W = this.clone();
|
|
366
366
|
return W.root = F.name, W;
|
|
367
367
|
}, remove: function(P) {
|
|
368
368
|
P = this.root + P;
|
|
@@ -384,7 +384,7 @@ function we() {
|
|
|
384
384
|
} catch (T) {
|
|
385
385
|
(D = new h("error")).error(T);
|
|
386
386
|
}
|
|
387
|
-
return new
|
|
387
|
+
return new b(D, F.type || "string", F.mimeType);
|
|
388
388
|
}, generateAsync: function(P, D) {
|
|
389
389
|
return this.generateInternalStream(P).accumulate(D);
|
|
390
390
|
}, generateNodeStream: function(P, D) {
|
|
@@ -402,11 +402,11 @@ function we() {
|
|
|
402
402
|
t("../utils").inherits(o, a), o.prototype.byteAt = function(i) {
|
|
403
403
|
return this.data[this.zero + i];
|
|
404
404
|
}, o.prototype.lastIndexOfSignature = function(i) {
|
|
405
|
-
for (var h = i.charCodeAt(0),
|
|
405
|
+
for (var h = i.charCodeAt(0), b = i.charCodeAt(1), y = i.charCodeAt(2), _ = i.charCodeAt(3), w = this.length - 4; 0 <= w; --w) if (this.data[w] === h && this.data[w + 1] === b && this.data[w + 2] === y && this.data[w + 3] === _) return w - this.zero;
|
|
406
406
|
return -1;
|
|
407
407
|
}, o.prototype.readAndCheckSignature = function(i) {
|
|
408
|
-
var h = i.charCodeAt(0),
|
|
409
|
-
return h ===
|
|
408
|
+
var h = i.charCodeAt(0), b = i.charCodeAt(1), y = i.charCodeAt(2), _ = i.charCodeAt(3), w = this.readData(4);
|
|
409
|
+
return h === w[0] && b === w[1] && y === w[2] && _ === w[3];
|
|
410
410
|
}, o.prototype.readData = function(i) {
|
|
411
411
|
if (this.checkOffset(i), i === 0) return [];
|
|
412
412
|
var h = this.data.slice(this.zero + this.index, this.zero + this.index + i);
|
|
@@ -427,9 +427,9 @@ function we() {
|
|
|
427
427
|
this.setIndex(this.index + i);
|
|
428
428
|
}, byteAt: function() {
|
|
429
429
|
}, readInt: function(i) {
|
|
430
|
-
var h,
|
|
431
|
-
for (this.checkOffset(i), h = this.index + i - 1; h >= this.index; h--)
|
|
432
|
-
return this.index += i,
|
|
430
|
+
var h, b = 0;
|
|
431
|
+
for (this.checkOffset(i), h = this.index + i - 1; h >= this.index; h--) b = (b << 8) + this.byteAt(h);
|
|
432
|
+
return this.index += i, b;
|
|
433
433
|
}, readString: function(i) {
|
|
434
434
|
return a.transformTo("string", this.readData(i));
|
|
435
435
|
}, readData: function() {
|
|
@@ -476,10 +476,10 @@ function we() {
|
|
|
476
476
|
return this.index += i, h;
|
|
477
477
|
}, r.exports = o;
|
|
478
478
|
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(t, r, n) {
|
|
479
|
-
var a = t("../utils"), o = t("../support"), i = t("./ArrayReader"), h = t("./StringReader"),
|
|
479
|
+
var a = t("../utils"), o = t("../support"), i = t("./ArrayReader"), h = t("./StringReader"), b = t("./NodeBufferReader"), y = t("./Uint8ArrayReader");
|
|
480
480
|
r.exports = function(_) {
|
|
481
|
-
var
|
|
482
|
-
return a.checkSupport(
|
|
481
|
+
var w = a.getTypeOf(_);
|
|
482
|
+
return a.checkSupport(w), w !== "string" || o.uint8array ? w === "nodebuffer" ? new b(_) : o.uint8array ? new y(a.transformTo("uint8array", _)) : new i(a.transformTo("array", _)) : new h(_);
|
|
483
483
|
};
|
|
484
484
|
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(t, r, n) {
|
|
485
485
|
n.LOCAL_FILE_HEADER = "PK", n.CENTRAL_FILE_HEADER = "PK", n.CENTRAL_DIRECTORY_END = "PK", n.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", n.ZIP64_CENTRAL_DIRECTORY_END = "PK", n.DATA_DESCRIPTOR = "PK\x07\b";
|
|
@@ -506,8 +506,8 @@ function we() {
|
|
|
506
506
|
}
|
|
507
507
|
a.inherits(i, o), i.prototype.processChunk = function(h) {
|
|
508
508
|
if (h) {
|
|
509
|
-
var
|
|
510
|
-
this.streamInfo[this.propName] =
|
|
509
|
+
var b = this.streamInfo[this.propName] || 0;
|
|
510
|
+
this.streamInfo[this.propName] = b + h.data.length;
|
|
511
511
|
}
|
|
512
512
|
o.prototype.processChunk.call(this, h);
|
|
513
513
|
}, r.exports = i;
|
|
@@ -515,11 +515,11 @@ function we() {
|
|
|
515
515
|
var a = t("../utils"), o = t("./GenericWorker");
|
|
516
516
|
function i(h) {
|
|
517
517
|
o.call(this, "DataWorker");
|
|
518
|
-
var
|
|
519
|
-
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, h.then(function(
|
|
520
|
-
|
|
521
|
-
}, function(
|
|
522
|
-
|
|
518
|
+
var b = this;
|
|
519
|
+
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, h.then(function(y) {
|
|
520
|
+
b.dataIsReady = !0, b.data = y, b.max = y && y.length || 0, b.type = a.getTypeOf(y), b.isPaused || b._tickAndRepeat();
|
|
521
|
+
}, function(y) {
|
|
522
|
+
b.error(y);
|
|
523
523
|
});
|
|
524
524
|
}
|
|
525
525
|
a.inherits(i, o), i.prototype.cleanUp = function() {
|
|
@@ -530,20 +530,20 @@ function we() {
|
|
|
530
530
|
this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (a.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
|
|
531
531
|
}, i.prototype._tick = function() {
|
|
532
532
|
if (this.isPaused || this.isFinished) return !1;
|
|
533
|
-
var h = null,
|
|
533
|
+
var h = null, b = Math.min(this.max, this.index + 16384);
|
|
534
534
|
if (this.index >= this.max) return this.end();
|
|
535
535
|
switch (this.type) {
|
|
536
536
|
case "string":
|
|
537
|
-
h = this.data.substring(this.index,
|
|
537
|
+
h = this.data.substring(this.index, b);
|
|
538
538
|
break;
|
|
539
539
|
case "uint8array":
|
|
540
|
-
h = this.data.subarray(this.index,
|
|
540
|
+
h = this.data.subarray(this.index, b);
|
|
541
541
|
break;
|
|
542
542
|
case "array":
|
|
543
543
|
case "nodebuffer":
|
|
544
|
-
h = this.data.slice(this.index,
|
|
544
|
+
h = this.data.slice(this.index, b);
|
|
545
545
|
}
|
|
546
|
-
return this.index =
|
|
546
|
+
return this.index = b, this.push({ data: h, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
547
547
|
}, r.exports = i;
|
|
548
548
|
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(t, r, n) {
|
|
549
549
|
function a(o) {
|
|
@@ -602,18 +602,18 @@ function we() {
|
|
|
602
602
|
return this.previous ? this.previous + " -> " + o : o;
|
|
603
603
|
} }, r.exports = a;
|
|
604
604
|
}, {}], 29: [function(t, r, n) {
|
|
605
|
-
var a = t("../utils"), o = t("./ConvertWorker"), i = t("./GenericWorker"), h = t("../base64"),
|
|
606
|
-
if (
|
|
605
|
+
var a = t("../utils"), o = t("./ConvertWorker"), i = t("./GenericWorker"), h = t("../base64"), b = t("../support"), y = t("../external"), _ = null;
|
|
606
|
+
if (b.nodestream) try {
|
|
607
607
|
_ = t("../nodejs/NodejsStreamOutputAdapter");
|
|
608
|
-
} catch {
|
|
608
|
+
} catch (k) {
|
|
609
609
|
}
|
|
610
|
-
function k
|
|
611
|
-
return new
|
|
612
|
-
var
|
|
613
|
-
|
|
614
|
-
|
|
610
|
+
function w(k, u) {
|
|
611
|
+
return new y.Promise(function(m, f) {
|
|
612
|
+
var v = [], x = k._internalType, A = k._outputType, P = k._mimeType;
|
|
613
|
+
k.on("data", function(D, F) {
|
|
614
|
+
v.push(D), u && u(F);
|
|
615
615
|
}).on("error", function(D) {
|
|
616
|
-
|
|
616
|
+
v = [], f(D);
|
|
617
617
|
}).on("end", function() {
|
|
618
618
|
try {
|
|
619
619
|
var D = (function(F, W, T) {
|
|
@@ -641,16 +641,16 @@ function we() {
|
|
|
641
641
|
default:
|
|
642
642
|
throw new Error("concat : unsupported type '" + F + "'");
|
|
643
643
|
}
|
|
644
|
-
})(x,
|
|
644
|
+
})(x, v), P);
|
|
645
645
|
m(D);
|
|
646
646
|
} catch (F) {
|
|
647
647
|
f(F);
|
|
648
648
|
}
|
|
649
|
-
|
|
649
|
+
v = [];
|
|
650
650
|
}).resume();
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
|
-
function d(
|
|
653
|
+
function d(k, u, m) {
|
|
654
654
|
var f = u;
|
|
655
655
|
switch (u) {
|
|
656
656
|
case "blob":
|
|
@@ -661,101 +661,101 @@ function we() {
|
|
|
661
661
|
f = "string";
|
|
662
662
|
}
|
|
663
663
|
try {
|
|
664
|
-
this._internalType = f, this._outputType = u, this._mimeType = m, a.checkSupport(f), this._worker =
|
|
665
|
-
} catch (
|
|
666
|
-
this._worker = new i("error"), this._worker.error(
|
|
664
|
+
this._internalType = f, this._outputType = u, this._mimeType = m, a.checkSupport(f), this._worker = k.pipe(new o(f)), k.lock();
|
|
665
|
+
} catch (v) {
|
|
666
|
+
this._worker = new i("error"), this._worker.error(v);
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
|
-
d.prototype = { accumulate: function(
|
|
670
|
-
return
|
|
671
|
-
}, on: function(
|
|
669
|
+
d.prototype = { accumulate: function(k) {
|
|
670
|
+
return w(this, k);
|
|
671
|
+
}, on: function(k, u) {
|
|
672
672
|
var m = this;
|
|
673
|
-
return
|
|
673
|
+
return k === "data" ? this._worker.on(k, function(f) {
|
|
674
674
|
u.call(m, f.data, f.meta);
|
|
675
|
-
}) : this._worker.on(
|
|
675
|
+
}) : this._worker.on(k, function() {
|
|
676
676
|
a.delay(u, arguments, m);
|
|
677
677
|
}), this;
|
|
678
678
|
}, resume: function() {
|
|
679
679
|
return a.delay(this._worker.resume, [], this._worker), this;
|
|
680
680
|
}, pause: function() {
|
|
681
681
|
return this._worker.pause(), this;
|
|
682
|
-
}, toNodejsStream: function(
|
|
682
|
+
}, toNodejsStream: function(k) {
|
|
683
683
|
if (a.checkSupport("nodestream"), this._outputType !== "nodebuffer") throw new Error(this._outputType + " is not supported by this method");
|
|
684
|
-
return new _(this, { objectMode: this._outputType !== "nodebuffer" },
|
|
684
|
+
return new _(this, { objectMode: this._outputType !== "nodebuffer" }, k);
|
|
685
685
|
} }, r.exports = d;
|
|
686
686
|
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(t, r, n) {
|
|
687
|
-
if (n.base64 = !0, n.array = !0, n.string = !0, n.arraybuffer = typeof ArrayBuffer
|
|
687
|
+
if (n.base64 = !0, n.array = !0, n.string = !0, n.arraybuffer = typeof ArrayBuffer != "undefined" && typeof Uint8Array != "undefined", n.nodebuffer = typeof Buffer != "undefined", n.uint8array = typeof Uint8Array != "undefined", typeof ArrayBuffer == "undefined") n.blob = !1;
|
|
688
688
|
else {
|
|
689
689
|
var a = new ArrayBuffer(0);
|
|
690
690
|
try {
|
|
691
691
|
n.blob = new Blob([a], { type: "application/zip" }).size === 0;
|
|
692
|
-
} catch {
|
|
692
|
+
} catch (i) {
|
|
693
693
|
try {
|
|
694
694
|
var o = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
695
695
|
o.append(a), n.blob = o.getBlob("application/zip").size === 0;
|
|
696
|
-
} catch {
|
|
696
|
+
} catch (h) {
|
|
697
697
|
n.blob = !1;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
701
|
try {
|
|
702
702
|
n.nodestream = !!t("readable-stream").Readable;
|
|
703
|
-
} catch {
|
|
703
|
+
} catch (i) {
|
|
704
704
|
n.nodestream = !1;
|
|
705
705
|
}
|
|
706
706
|
}, { "readable-stream": 16 }], 31: [function(t, r, n) {
|
|
707
|
-
for (var a = t("./utils"), o = t("./support"), i = t("./nodejsUtils"), h = t("./stream/GenericWorker"),
|
|
708
|
-
|
|
707
|
+
for (var a = t("./utils"), o = t("./support"), i = t("./nodejsUtils"), h = t("./stream/GenericWorker"), b = new Array(256), y = 0; y < 256; y++) b[y] = 252 <= y ? 6 : 248 <= y ? 5 : 240 <= y ? 4 : 224 <= y ? 3 : 192 <= y ? 2 : 1;
|
|
708
|
+
b[254] = b[254] = 1;
|
|
709
709
|
function _() {
|
|
710
710
|
h.call(this, "utf-8 decode"), this.leftOver = null;
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function w() {
|
|
713
713
|
h.call(this, "utf-8 encode");
|
|
714
714
|
}
|
|
715
715
|
n.utf8encode = function(d) {
|
|
716
|
-
return o.nodebuffer ? i.newBufferFrom(d, "utf-8") : (function(
|
|
717
|
-
var u, m, f,
|
|
718
|
-
for (
|
|
719
|
-
for (u = o.uint8array ? new Uint8Array(P) : new Array(P),
|
|
716
|
+
return o.nodebuffer ? i.newBufferFrom(d, "utf-8") : (function(k) {
|
|
717
|
+
var u, m, f, v, x, A = k.length, P = 0;
|
|
718
|
+
for (v = 0; v < A; v++) (64512 & (m = k.charCodeAt(v))) == 55296 && v + 1 < A && (64512 & (f = k.charCodeAt(v + 1))) == 56320 && (m = 65536 + (m - 55296 << 10) + (f - 56320), v++), P += m < 128 ? 1 : m < 2048 ? 2 : m < 65536 ? 3 : 4;
|
|
719
|
+
for (u = o.uint8array ? new Uint8Array(P) : new Array(P), v = x = 0; x < P; v++) (64512 & (m = k.charCodeAt(v))) == 55296 && v + 1 < A && (64512 & (f = k.charCodeAt(v + 1))) == 56320 && (m = 65536 + (m - 55296 << 10) + (f - 56320), v++), m < 128 ? u[x++] = m : (m < 2048 ? u[x++] = 192 | m >>> 6 : (m < 65536 ? u[x++] = 224 | m >>> 12 : (u[x++] = 240 | m >>> 18, u[x++] = 128 | m >>> 12 & 63), u[x++] = 128 | m >>> 6 & 63), u[x++] = 128 | 63 & m);
|
|
720
720
|
return u;
|
|
721
721
|
})(d);
|
|
722
722
|
}, n.utf8decode = function(d) {
|
|
723
|
-
return o.nodebuffer ? a.transformTo("nodebuffer", d).toString("utf-8") : (function(
|
|
724
|
-
var u, m, f,
|
|
725
|
-
for (u = m = 0; u < x; ) if ((f =
|
|
726
|
-
else if (4 < (
|
|
723
|
+
return o.nodebuffer ? a.transformTo("nodebuffer", d).toString("utf-8") : (function(k) {
|
|
724
|
+
var u, m, f, v, x = k.length, A = new Array(2 * x);
|
|
725
|
+
for (u = m = 0; u < x; ) if ((f = k[u++]) < 128) A[m++] = f;
|
|
726
|
+
else if (4 < (v = b[f])) A[m++] = 65533, u += v - 1;
|
|
727
727
|
else {
|
|
728
|
-
for (f &=
|
|
729
|
-
1 <
|
|
728
|
+
for (f &= v === 2 ? 31 : v === 3 ? 15 : 7; 1 < v && u < x; ) f = f << 6 | 63 & k[u++], v--;
|
|
729
|
+
1 < v ? A[m++] = 65533 : f < 65536 ? A[m++] = f : (f -= 65536, A[m++] = 55296 | f >> 10 & 1023, A[m++] = 56320 | 1023 & f);
|
|
730
730
|
}
|
|
731
731
|
return A.length !== m && (A.subarray ? A = A.subarray(0, m) : A.length = m), a.applyFromCharCode(A);
|
|
732
732
|
})(d = a.transformTo(o.uint8array ? "uint8array" : "array", d));
|
|
733
733
|
}, a.inherits(_, h), _.prototype.processChunk = function(d) {
|
|
734
|
-
var
|
|
734
|
+
var k = a.transformTo(o.uint8array ? "uint8array" : "array", d.data);
|
|
735
735
|
if (this.leftOver && this.leftOver.length) {
|
|
736
736
|
if (o.uint8array) {
|
|
737
|
-
var u =
|
|
738
|
-
(
|
|
739
|
-
} else
|
|
737
|
+
var u = k;
|
|
738
|
+
(k = new Uint8Array(u.length + this.leftOver.length)).set(this.leftOver, 0), k.set(u, this.leftOver.length);
|
|
739
|
+
} else k = this.leftOver.concat(k);
|
|
740
740
|
this.leftOver = null;
|
|
741
741
|
}
|
|
742
|
-
var m = (function(
|
|
742
|
+
var m = (function(v, x) {
|
|
743
743
|
var A;
|
|
744
|
-
for ((x = x ||
|
|
745
|
-
return A < 0 || A === 0 ? x : A +
|
|
746
|
-
})(
|
|
747
|
-
m !==
|
|
744
|
+
for ((x = x || v.length) > v.length && (x = v.length), A = x - 1; 0 <= A && (192 & v[A]) == 128; ) A--;
|
|
745
|
+
return A < 0 || A === 0 ? x : A + b[v[A]] > x ? A : x;
|
|
746
|
+
})(k), f = k;
|
|
747
|
+
m !== k.length && (o.uint8array ? (f = k.subarray(0, m), this.leftOver = k.subarray(m, k.length)) : (f = k.slice(0, m), this.leftOver = k.slice(m, k.length))), this.push({ data: n.utf8decode(f), meta: d.meta });
|
|
748
748
|
}, _.prototype.flush = function() {
|
|
749
749
|
this.leftOver && this.leftOver.length && (this.push({ data: n.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
750
|
-
}, n.Utf8DecodeWorker = _, a.inherits(
|
|
750
|
+
}, n.Utf8DecodeWorker = _, a.inherits(w, h), w.prototype.processChunk = function(d) {
|
|
751
751
|
this.push({ data: n.utf8encode(d.data), meta: d.meta });
|
|
752
|
-
}, n.Utf8EncodeWorker =
|
|
752
|
+
}, n.Utf8EncodeWorker = w;
|
|
753
753
|
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(t, r, n) {
|
|
754
754
|
var a = t("./support"), o = t("./base64"), i = t("./nodejsUtils"), h = t("./external");
|
|
755
|
-
function
|
|
755
|
+
function b(u) {
|
|
756
756
|
return u;
|
|
757
757
|
}
|
|
758
|
-
function
|
|
758
|
+
function y(u, m) {
|
|
759
759
|
for (var f = 0; f < u.length; ++f) m[f] = 255 & u.charCodeAt(f);
|
|
760
760
|
return m;
|
|
761
761
|
}
|
|
@@ -763,41 +763,41 @@ function we() {
|
|
|
763
763
|
n.checkSupport("blob");
|
|
764
764
|
try {
|
|
765
765
|
return new Blob([u], { type: m });
|
|
766
|
-
} catch {
|
|
766
|
+
} catch (v) {
|
|
767
767
|
try {
|
|
768
768
|
var f = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
769
769
|
return f.append(u), f.getBlob(m);
|
|
770
|
-
} catch {
|
|
770
|
+
} catch (x) {
|
|
771
771
|
throw new Error("Bug : can't construct the Blob.");
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
};
|
|
775
775
|
var _ = { stringifyByChunk: function(u, m, f) {
|
|
776
|
-
var
|
|
776
|
+
var v = [], x = 0, A = u.length;
|
|
777
777
|
if (A <= f) return String.fromCharCode.apply(null, u);
|
|
778
|
-
for (; x < A; ) m === "array" || m === "nodebuffer" ?
|
|
779
|
-
return
|
|
778
|
+
for (; x < A; ) m === "array" || m === "nodebuffer" ? v.push(String.fromCharCode.apply(null, u.slice(x, Math.min(x + f, A)))) : v.push(String.fromCharCode.apply(null, u.subarray(x, Math.min(x + f, A)))), x += f;
|
|
779
|
+
return v.join("");
|
|
780
780
|
}, stringifyByChar: function(u) {
|
|
781
781
|
for (var m = "", f = 0; f < u.length; f++) m += String.fromCharCode(u[f]);
|
|
782
782
|
return m;
|
|
783
783
|
}, applyCanBeUsed: { uint8array: (function() {
|
|
784
784
|
try {
|
|
785
785
|
return a.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
|
|
786
|
-
} catch {
|
|
786
|
+
} catch (u) {
|
|
787
787
|
return !1;
|
|
788
788
|
}
|
|
789
789
|
})(), nodebuffer: (function() {
|
|
790
790
|
try {
|
|
791
791
|
return a.nodebuffer && String.fromCharCode.apply(null, i.allocBuffer(1)).length === 1;
|
|
792
|
-
} catch {
|
|
792
|
+
} catch (u) {
|
|
793
793
|
return !1;
|
|
794
794
|
}
|
|
795
795
|
})() } };
|
|
796
|
-
function
|
|
797
|
-
var m = 65536, f = n.getTypeOf(u),
|
|
798
|
-
if (f === "uint8array" ?
|
|
796
|
+
function w(u) {
|
|
797
|
+
var m = 65536, f = n.getTypeOf(u), v = !0;
|
|
798
|
+
if (f === "uint8array" ? v = _.applyCanBeUsed.uint8array : f === "nodebuffer" && (v = _.applyCanBeUsed.nodebuffer), v) for (; 1 < m; ) try {
|
|
799
799
|
return _.stringifyByChunk(u, f, m);
|
|
800
|
-
} catch {
|
|
800
|
+
} catch (x) {
|
|
801
801
|
m = Math.floor(m / 2);
|
|
802
802
|
}
|
|
803
803
|
return _.stringifyByChar(u);
|
|
@@ -806,51 +806,51 @@ function we() {
|
|
|
806
806
|
for (var f = 0; f < u.length; f++) m[f] = u[f];
|
|
807
807
|
return m;
|
|
808
808
|
}
|
|
809
|
-
n.applyFromCharCode =
|
|
810
|
-
var
|
|
811
|
-
|
|
812
|
-
return
|
|
809
|
+
n.applyFromCharCode = w;
|
|
810
|
+
var k = {};
|
|
811
|
+
k.string = { string: b, array: function(u) {
|
|
812
|
+
return y(u, new Array(u.length));
|
|
813
813
|
}, arraybuffer: function(u) {
|
|
814
|
-
return
|
|
814
|
+
return k.string.uint8array(u).buffer;
|
|
815
815
|
}, uint8array: function(u) {
|
|
816
|
-
return
|
|
816
|
+
return y(u, new Uint8Array(u.length));
|
|
817
817
|
}, nodebuffer: function(u) {
|
|
818
|
-
return
|
|
819
|
-
} },
|
|
818
|
+
return y(u, i.allocBuffer(u.length));
|
|
819
|
+
} }, k.array = { string: w, array: b, arraybuffer: function(u) {
|
|
820
820
|
return new Uint8Array(u).buffer;
|
|
821
821
|
}, uint8array: function(u) {
|
|
822
822
|
return new Uint8Array(u);
|
|
823
823
|
}, nodebuffer: function(u) {
|
|
824
824
|
return i.newBufferFrom(u);
|
|
825
|
-
} },
|
|
826
|
-
return
|
|
825
|
+
} }, k.arraybuffer = { string: function(u) {
|
|
826
|
+
return w(new Uint8Array(u));
|
|
827
827
|
}, array: function(u) {
|
|
828
828
|
return d(new Uint8Array(u), new Array(u.byteLength));
|
|
829
|
-
}, arraybuffer:
|
|
829
|
+
}, arraybuffer: b, uint8array: function(u) {
|
|
830
830
|
return new Uint8Array(u);
|
|
831
831
|
}, nodebuffer: function(u) {
|
|
832
832
|
return i.newBufferFrom(new Uint8Array(u));
|
|
833
|
-
} },
|
|
833
|
+
} }, k.uint8array = { string: w, array: function(u) {
|
|
834
834
|
return d(u, new Array(u.length));
|
|
835
835
|
}, arraybuffer: function(u) {
|
|
836
836
|
return u.buffer;
|
|
837
|
-
}, uint8array:
|
|
837
|
+
}, uint8array: b, nodebuffer: function(u) {
|
|
838
838
|
return i.newBufferFrom(u);
|
|
839
|
-
} },
|
|
839
|
+
} }, k.nodebuffer = { string: w, array: function(u) {
|
|
840
840
|
return d(u, new Array(u.length));
|
|
841
841
|
}, arraybuffer: function(u) {
|
|
842
|
-
return
|
|
842
|
+
return k.nodebuffer.uint8array(u).buffer;
|
|
843
843
|
}, uint8array: function(u) {
|
|
844
844
|
return d(u, new Uint8Array(u.length));
|
|
845
|
-
}, nodebuffer:
|
|
845
|
+
}, nodebuffer: b }, n.transformTo = function(u, m) {
|
|
846
846
|
if (m = m || "", !u) return m;
|
|
847
847
|
n.checkSupport(u);
|
|
848
848
|
var f = n.getTypeOf(m);
|
|
849
|
-
return
|
|
849
|
+
return k[f][u](m);
|
|
850
850
|
}, n.resolve = function(u) {
|
|
851
|
-
for (var m = u.split("/"), f = [],
|
|
852
|
-
var x = m[
|
|
853
|
-
x === "." || x === "" &&
|
|
851
|
+
for (var m = u.split("/"), f = [], v = 0; v < m.length; v++) {
|
|
852
|
+
var x = m[v];
|
|
853
|
+
x === "." || x === "" && v !== 0 && v !== m.length - 1 || (x === ".." ? f.pop() : f.push(x));
|
|
854
854
|
}
|
|
855
855
|
return f.join("/");
|
|
856
856
|
}, n.getTypeOf = function(u) {
|
|
@@ -858,9 +858,9 @@ function we() {
|
|
|
858
858
|
}, n.checkSupport = function(u) {
|
|
859
859
|
if (!a[u.toLowerCase()]) throw new Error(u + " is not supported by this platform");
|
|
860
860
|
}, n.MAX_VALUE_16BITS = 65535, n.MAX_VALUE_32BITS = -1, n.pretty = function(u) {
|
|
861
|
-
var m, f,
|
|
862
|
-
for (f = 0; f < (u || "").length; f++)
|
|
863
|
-
return
|
|
861
|
+
var m, f, v = "";
|
|
862
|
+
for (f = 0; f < (u || "").length; f++) v += "\\x" + ((m = u.charCodeAt(f)) < 16 ? "0" : "") + m.toString(16).toUpperCase();
|
|
863
|
+
return v;
|
|
864
864
|
}, n.delay = function(u, m, f) {
|
|
865
865
|
setImmediate(function() {
|
|
866
866
|
u.apply(f || null, m || []);
|
|
@@ -873,9 +873,9 @@ function we() {
|
|
|
873
873
|
var u, m, f = {};
|
|
874
874
|
for (u = 0; u < arguments.length; u++) for (m in arguments[u]) Object.prototype.hasOwnProperty.call(arguments[u], m) && f[m] === void 0 && (f[m] = arguments[u][m]);
|
|
875
875
|
return f;
|
|
876
|
-
}, n.prepareContent = function(u, m, f,
|
|
876
|
+
}, n.prepareContent = function(u, m, f, v, x) {
|
|
877
877
|
return h.Promise.resolve(m).then(function(A) {
|
|
878
|
-
return a.blob && (A instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(A)) !== -1) && typeof FileReader
|
|
878
|
+
return a.blob && (A instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(A)) !== -1) && typeof FileReader != "undefined" ? new h.Promise(function(P, D) {
|
|
879
879
|
var F = new FileReader();
|
|
880
880
|
F.onload = function(W) {
|
|
881
881
|
P(W.target.result);
|
|
@@ -885,39 +885,39 @@ function we() {
|
|
|
885
885
|
}) : A;
|
|
886
886
|
}).then(function(A) {
|
|
887
887
|
var P = n.getTypeOf(A);
|
|
888
|
-
return P ? (P === "arraybuffer" ? A = n.transformTo("uint8array", A) : P === "string" && (x ? A = o.decode(A) : f &&
|
|
889
|
-
return
|
|
888
|
+
return P ? (P === "arraybuffer" ? A = n.transformTo("uint8array", A) : P === "string" && (x ? A = o.decode(A) : f && v !== !0 && (A = (function(D) {
|
|
889
|
+
return y(D, a.uint8array ? new Uint8Array(D.length) : new Array(D.length));
|
|
890
890
|
})(A))), A) : h.Promise.reject(new Error("Can't read the data of '" + u + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
891
891
|
});
|
|
892
892
|
};
|
|
893
893
|
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(t, r, n) {
|
|
894
|
-
var a = t("./reader/readerFor"), o = t("./utils"), i = t("./signature"), h = t("./zipEntry"),
|
|
895
|
-
function
|
|
894
|
+
var a = t("./reader/readerFor"), o = t("./utils"), i = t("./signature"), h = t("./zipEntry"), b = t("./support");
|
|
895
|
+
function y(_) {
|
|
896
896
|
this.files = [], this.loadOptions = _;
|
|
897
897
|
}
|
|
898
|
-
|
|
898
|
+
y.prototype = { checkSignature: function(_) {
|
|
899
899
|
if (!this.reader.readAndCheckSignature(_)) {
|
|
900
900
|
this.reader.index -= 4;
|
|
901
|
-
var
|
|
902
|
-
throw new Error("Corrupted zip or bug: unexpected signature (" + o.pretty(
|
|
901
|
+
var w = this.reader.readString(4);
|
|
902
|
+
throw new Error("Corrupted zip or bug: unexpected signature (" + o.pretty(w) + ", expected " + o.pretty(_) + ")");
|
|
903
903
|
}
|
|
904
|
-
}, isSignature: function(_,
|
|
904
|
+
}, isSignature: function(_, w) {
|
|
905
905
|
var d = this.reader.index;
|
|
906
906
|
this.reader.setIndex(_);
|
|
907
|
-
var
|
|
908
|
-
return this.reader.setIndex(d),
|
|
907
|
+
var k = this.reader.readString(4) === w;
|
|
908
|
+
return this.reader.setIndex(d), k;
|
|
909
909
|
}, readBlockEndOfCentral: function() {
|
|
910
910
|
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);
|
|
911
|
-
var _ = this.reader.readData(this.zipCommentLength),
|
|
911
|
+
var _ = this.reader.readData(this.zipCommentLength), w = b.uint8array ? "uint8array" : "array", d = o.transformTo(w, _);
|
|
912
912
|
this.zipComment = this.loadOptions.decodeFileName(d);
|
|
913
913
|
}, readBlockZip64EndOfCentral: function() {
|
|
914
914
|
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 = {};
|
|
915
|
-
for (var _,
|
|
915
|
+
for (var _, w, d, k = this.zip64EndOfCentralSize - 44; 0 < k; ) _ = this.reader.readInt(2), w = this.reader.readInt(4), d = this.reader.readData(w), this.zip64ExtensibleData[_] = { id: _, length: w, value: d };
|
|
916
916
|
}, readBlockZip64EndOfCentralLocator: function() {
|
|
917
917
|
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");
|
|
918
918
|
}, readLocalFiles: function() {
|
|
919
|
-
var _,
|
|
920
|
-
for (_ = 0; _ < this.files.length; _++)
|
|
919
|
+
var _, w;
|
|
920
|
+
for (_ = 0; _ < this.files.length; _++) w = this.files[_], this.reader.setIndex(w.localHeaderOffset), this.checkSignature(i.LOCAL_FILE_HEADER), w.readLocalPart(this.reader), w.handleUTF8(), w.processAttributes();
|
|
921
921
|
}, readCentralDir: function() {
|
|
922
922
|
var _;
|
|
923
923
|
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER); ) (_ = new h({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(_);
|
|
@@ -926,7 +926,7 @@ function we() {
|
|
|
926
926
|
var _ = this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);
|
|
927
927
|
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");
|
|
928
928
|
this.reader.setIndex(_);
|
|
929
|
-
var
|
|
929
|
+
var w = _;
|
|
930
930
|
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) {
|
|
931
931
|
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");
|
|
932
932
|
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");
|
|
@@ -934,36 +934,36 @@ function we() {
|
|
|
934
934
|
}
|
|
935
935
|
var d = this.centralDirOffset + this.centralDirSize;
|
|
936
936
|
this.zip64 && (d += 20, d += 12 + this.zip64EndOfCentralSize);
|
|
937
|
-
var
|
|
938
|
-
if (0 <
|
|
939
|
-
else if (
|
|
937
|
+
var k = w - d;
|
|
938
|
+
if (0 < k) this.isSignature(w, i.CENTRAL_FILE_HEADER) || (this.reader.zero = k);
|
|
939
|
+
else if (k < 0) throw new Error("Corrupted zip: missing " + Math.abs(k) + " bytes.");
|
|
940
940
|
}, prepareReader: function(_) {
|
|
941
941
|
this.reader = a(_);
|
|
942
942
|
}, load: function(_) {
|
|
943
943
|
this.prepareReader(_), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
944
|
-
} }, r.exports =
|
|
944
|
+
} }, r.exports = y;
|
|
945
945
|
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(t, r, n) {
|
|
946
|
-
var a = t("./reader/readerFor"), o = t("./utils"), i = t("./compressedObject"), h = t("./crc32"),
|
|
947
|
-
function
|
|
948
|
-
this.options = d, this.loadOptions =
|
|
946
|
+
var a = t("./reader/readerFor"), o = t("./utils"), i = t("./compressedObject"), h = t("./crc32"), b = t("./utf8"), y = t("./compressions"), _ = t("./support");
|
|
947
|
+
function w(d, k) {
|
|
948
|
+
this.options = d, this.loadOptions = k;
|
|
949
949
|
}
|
|
950
|
-
|
|
950
|
+
w.prototype = { isEncrypted: function() {
|
|
951
951
|
return (1 & this.bitFlag) == 1;
|
|
952
952
|
}, useUTF8: function() {
|
|
953
953
|
return (2048 & this.bitFlag) == 2048;
|
|
954
954
|
}, readLocalPart: function(d) {
|
|
955
|
-
var
|
|
955
|
+
var k, u;
|
|
956
956
|
if (d.skip(22), this.fileNameLength = d.readInt(2), u = d.readInt(2), this.fileName = d.readData(this.fileNameLength), d.skip(u), 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)");
|
|
957
|
-
if ((
|
|
958
|
-
for (var f in
|
|
957
|
+
if ((k = (function(m) {
|
|
958
|
+
for (var f in y) if (Object.prototype.hasOwnProperty.call(y, f) && y[f].magic === m) return y[f];
|
|
959
959
|
return null;
|
|
960
960
|
})(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " + o.pretty(this.compressionMethod) + " unknown (inner file : " + o.transformTo("string", this.fileName) + ")");
|
|
961
|
-
this.decompressed = new i(this.compressedSize, this.uncompressedSize, this.crc32,
|
|
961
|
+
this.decompressed = new i(this.compressedSize, this.uncompressedSize, this.crc32, k, d.readData(this.compressedSize));
|
|
962
962
|
}, readCentralPart: function(d) {
|
|
963
963
|
this.versionMadeBy = d.readInt(2), d.skip(2), this.bitFlag = d.readInt(2), this.compressionMethod = d.readString(2), this.date = d.readDate(), this.crc32 = d.readInt(4), this.compressedSize = d.readInt(4), this.uncompressedSize = d.readInt(4);
|
|
964
|
-
var
|
|
964
|
+
var k = d.readInt(2);
|
|
965
965
|
if (this.extraFieldsLength = d.readInt(2), this.fileCommentLength = d.readInt(2), this.diskNumberStart = d.readInt(2), this.internalFileAttributes = d.readInt(2), this.externalFileAttributes = d.readInt(4), this.localHeaderOffset = d.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
|
|
966
|
-
d.skip(
|
|
966
|
+
d.skip(k), this.readExtraFields(d), this.parseZIP64ExtraField(d), this.fileComment = d.readData(this.fileCommentLength);
|
|
967
967
|
}, processAttributes: function() {
|
|
968
968
|
this.unixPermissions = null, this.dosPermissions = null;
|
|
969
969
|
var d = this.versionMadeBy >> 8;
|
|
@@ -974,15 +974,15 @@ function we() {
|
|
|
974
974
|
this.uncompressedSize === o.MAX_VALUE_32BITS && (this.uncompressedSize = d.readInt(8)), this.compressedSize === o.MAX_VALUE_32BITS && (this.compressedSize = d.readInt(8)), this.localHeaderOffset === o.MAX_VALUE_32BITS && (this.localHeaderOffset = d.readInt(8)), this.diskNumberStart === o.MAX_VALUE_32BITS && (this.diskNumberStart = d.readInt(4));
|
|
975
975
|
}
|
|
976
976
|
}, readExtraFields: function(d) {
|
|
977
|
-
var
|
|
978
|
-
for (this.extraFields || (this.extraFields = {}); d.index + 4 < f; )
|
|
977
|
+
var k, u, m, f = d.index + this.extraFieldsLength;
|
|
978
|
+
for (this.extraFields || (this.extraFields = {}); d.index + 4 < f; ) k = d.readInt(2), u = d.readInt(2), m = d.readData(u), this.extraFields[k] = { id: k, length: u, value: m };
|
|
979
979
|
d.setIndex(f);
|
|
980
980
|
}, handleUTF8: function() {
|
|
981
981
|
var d = _.uint8array ? "uint8array" : "array";
|
|
982
|
-
if (this.useUTF8()) this.fileNameStr =
|
|
982
|
+
if (this.useUTF8()) this.fileNameStr = b.utf8decode(this.fileName), this.fileCommentStr = b.utf8decode(this.fileComment);
|
|
983
983
|
else {
|
|
984
|
-
var
|
|
985
|
-
if (
|
|
984
|
+
var k = this.findExtraFieldUnicodePath();
|
|
985
|
+
if (k !== null) this.fileNameStr = k;
|
|
986
986
|
else {
|
|
987
987
|
var u = o.transformTo(d, this.fileName);
|
|
988
988
|
this.fileNameStr = this.loadOptions.decodeFileName(u);
|
|
@@ -997,74 +997,74 @@ function we() {
|
|
|
997
997
|
}, findExtraFieldUnicodePath: function() {
|
|
998
998
|
var d = this.extraFields[28789];
|
|
999
999
|
if (d) {
|
|
1000
|
-
var
|
|
1001
|
-
return
|
|
1000
|
+
var k = a(d.value);
|
|
1001
|
+
return k.readInt(1) !== 1 || h(this.fileName) !== k.readInt(4) ? null : b.utf8decode(k.readData(d.length - 5));
|
|
1002
1002
|
}
|
|
1003
1003
|
return null;
|
|
1004
1004
|
}, findExtraFieldUnicodeComment: function() {
|
|
1005
1005
|
var d = this.extraFields[25461];
|
|
1006
1006
|
if (d) {
|
|
1007
|
-
var
|
|
1008
|
-
return
|
|
1007
|
+
var k = a(d.value);
|
|
1008
|
+
return k.readInt(1) !== 1 || h(this.fileComment) !== k.readInt(4) ? null : b.utf8decode(k.readData(d.length - 5));
|
|
1009
1009
|
}
|
|
1010
1010
|
return null;
|
|
1011
|
-
} }, r.exports =
|
|
1011
|
+
} }, r.exports = w;
|
|
1012
1012
|
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(t, r, n) {
|
|
1013
|
-
function a(
|
|
1014
|
-
this.name =
|
|
1013
|
+
function a(k, u, m) {
|
|
1014
|
+
this.name = k, this.dir = m.dir, this.date = m.date, this.comment = m.comment, this.unixPermissions = m.unixPermissions, this.dosPermissions = m.dosPermissions, this._data = u, this._dataBinary = m.binary, this.options = { compression: m.compression, compressionOptions: m.compressionOptions };
|
|
1015
1015
|
}
|
|
1016
|
-
var o = t("./stream/StreamHelper"), i = t("./stream/DataWorker"), h = t("./utf8"),
|
|
1017
|
-
a.prototype = { internalStream: function(
|
|
1016
|
+
var o = t("./stream/StreamHelper"), i = t("./stream/DataWorker"), h = t("./utf8"), b = t("./compressedObject"), y = t("./stream/GenericWorker");
|
|
1017
|
+
a.prototype = { internalStream: function(k) {
|
|
1018
1018
|
var u = null, m = "string";
|
|
1019
1019
|
try {
|
|
1020
|
-
if (!
|
|
1021
|
-
var f = (m =
|
|
1020
|
+
if (!k) throw new Error("No output type specified.");
|
|
1021
|
+
var f = (m = k.toLowerCase()) === "string" || m === "text";
|
|
1022
1022
|
m !== "binarystring" && m !== "text" || (m = "string"), u = this._decompressWorker();
|
|
1023
|
-
var
|
|
1024
|
-
|
|
1023
|
+
var v = !this._dataBinary;
|
|
1024
|
+
v && !f && (u = u.pipe(new h.Utf8EncodeWorker())), !v && f && (u = u.pipe(new h.Utf8DecodeWorker()));
|
|
1025
1025
|
} catch (x) {
|
|
1026
|
-
(u = new
|
|
1026
|
+
(u = new y("error")).error(x);
|
|
1027
1027
|
}
|
|
1028
1028
|
return new o(u, m, "");
|
|
1029
|
-
}, async: function(
|
|
1030
|
-
return this.internalStream(
|
|
1031
|
-
}, nodeStream: function(
|
|
1032
|
-
return this.internalStream(
|
|
1033
|
-
}, _compressWorker: function(
|
|
1034
|
-
if (this._data instanceof
|
|
1029
|
+
}, async: function(k, u) {
|
|
1030
|
+
return this.internalStream(k).accumulate(u);
|
|
1031
|
+
}, nodeStream: function(k, u) {
|
|
1032
|
+
return this.internalStream(k || "nodebuffer").toNodejsStream(u);
|
|
1033
|
+
}, _compressWorker: function(k, u) {
|
|
1034
|
+
if (this._data instanceof b && this._data.compression.magic === k.magic) return this._data.getCompressedWorker();
|
|
1035
1035
|
var m = this._decompressWorker();
|
|
1036
|
-
return this._dataBinary || (m = m.pipe(new h.Utf8EncodeWorker())),
|
|
1036
|
+
return this._dataBinary || (m = m.pipe(new h.Utf8EncodeWorker())), b.createWorkerFrom(m, k, u);
|
|
1037
1037
|
}, _decompressWorker: function() {
|
|
1038
|
-
return this._data instanceof
|
|
1038
|
+
return this._data instanceof b ? this._data.getContentWorker() : this._data instanceof y ? this._data : new i(this._data);
|
|
1039
1039
|
} };
|
|
1040
|
-
for (var _ = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"],
|
|
1040
|
+
for (var _ = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], w = function() {
|
|
1041
1041
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
1042
|
-
}, d = 0; d < _.length; d++) a.prototype[_[d]] =
|
|
1042
|
+
}, d = 0; d < _.length; d++) a.prototype[_[d]] = w;
|
|
1043
1043
|
r.exports = a;
|
|
1044
1044
|
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(t, r, n) {
|
|
1045
1045
|
(function(a) {
|
|
1046
1046
|
var o, i, h = a.MutationObserver || a.WebKitMutationObserver;
|
|
1047
1047
|
if (h) {
|
|
1048
|
-
var
|
|
1049
|
-
|
|
1050
|
-
_.data =
|
|
1048
|
+
var b = 0, y = new h(k), _ = a.document.createTextNode("");
|
|
1049
|
+
y.observe(_, { characterData: !0 }), o = function() {
|
|
1050
|
+
_.data = b = ++b % 2;
|
|
1051
1051
|
};
|
|
1052
1052
|
} else if (a.setImmediate || a.MessageChannel === void 0) o = "document" in a && "onreadystatechange" in a.document.createElement("script") ? function() {
|
|
1053
1053
|
var u = a.document.createElement("script");
|
|
1054
1054
|
u.onreadystatechange = function() {
|
|
1055
|
-
|
|
1055
|
+
k(), u.onreadystatechange = null, u.parentNode.removeChild(u), u = null;
|
|
1056
1056
|
}, a.document.documentElement.appendChild(u);
|
|
1057
1057
|
} : function() {
|
|
1058
|
-
setTimeout(
|
|
1058
|
+
setTimeout(k, 0);
|
|
1059
1059
|
};
|
|
1060
1060
|
else {
|
|
1061
|
-
var
|
|
1062
|
-
|
|
1063
|
-
|
|
1061
|
+
var w = new a.MessageChannel();
|
|
1062
|
+
w.port1.onmessage = k, o = function() {
|
|
1063
|
+
w.port2.postMessage(0);
|
|
1064
1064
|
};
|
|
1065
1065
|
}
|
|
1066
1066
|
var d = [];
|
|
1067
|
-
function
|
|
1067
|
+
function k() {
|
|
1068
1068
|
var u, m;
|
|
1069
1069
|
i = !0;
|
|
1070
1070
|
for (var f = d.length; f; ) {
|
|
@@ -1076,37 +1076,37 @@ function we() {
|
|
|
1076
1076
|
r.exports = function(u) {
|
|
1077
1077
|
d.push(u) !== 1 || i || o();
|
|
1078
1078
|
};
|
|
1079
|
-
}).call(this, typeof Mt
|
|
1079
|
+
}).call(this, typeof Mt != "undefined" ? Mt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
1080
1080
|
}, {}], 37: [function(t, r, n) {
|
|
1081
1081
|
var a = t("immediate");
|
|
1082
1082
|
function o() {
|
|
1083
1083
|
}
|
|
1084
|
-
var i = {}, h = ["REJECTED"],
|
|
1084
|
+
var i = {}, h = ["REJECTED"], b = ["FULFILLED"], y = ["PENDING"];
|
|
1085
1085
|
function _(f) {
|
|
1086
1086
|
if (typeof f != "function") throw new TypeError("resolver must be a function");
|
|
1087
|
-
this.state =
|
|
1087
|
+
this.state = y, this.queue = [], this.outcome = void 0, f !== o && u(this, f);
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1090
|
-
this.promise = f, typeof
|
|
1089
|
+
function w(f, v, x) {
|
|
1090
|
+
this.promise = f, typeof v == "function" && (this.onFulfilled = v, this.callFulfilled = this.otherCallFulfilled), typeof x == "function" && (this.onRejected = x, this.callRejected = this.otherCallRejected);
|
|
1091
1091
|
}
|
|
1092
|
-
function d(f,
|
|
1092
|
+
function d(f, v, x) {
|
|
1093
1093
|
a(function() {
|
|
1094
1094
|
var A;
|
|
1095
1095
|
try {
|
|
1096
|
-
A =
|
|
1096
|
+
A = v(x);
|
|
1097
1097
|
} catch (P) {
|
|
1098
1098
|
return i.reject(f, P);
|
|
1099
1099
|
}
|
|
1100
1100
|
A === f ? i.reject(f, new TypeError("Cannot resolve promise with itself")) : i.resolve(f, A);
|
|
1101
1101
|
});
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1104
|
-
var
|
|
1105
|
-
if (f && (typeof f == "object" || typeof f == "function") && typeof
|
|
1106
|
-
|
|
1103
|
+
function k(f) {
|
|
1104
|
+
var v = f && f.then;
|
|
1105
|
+
if (f && (typeof f == "object" || typeof f == "function") && typeof v == "function") return function() {
|
|
1106
|
+
v.apply(f, arguments);
|
|
1107
1107
|
};
|
|
1108
1108
|
}
|
|
1109
|
-
function u(f,
|
|
1109
|
+
function u(f, v) {
|
|
1110
1110
|
var x = !1;
|
|
1111
1111
|
function A(F) {
|
|
1112
1112
|
x || (x = !0, i.reject(f, F));
|
|
@@ -1115,14 +1115,14 @@ function we() {
|
|
|
1115
1115
|
x || (x = !0, i.resolve(f, F));
|
|
1116
1116
|
}
|
|
1117
1117
|
var D = m(function() {
|
|
1118
|
-
|
|
1118
|
+
v(P, A);
|
|
1119
1119
|
});
|
|
1120
1120
|
D.status === "error" && A(D.value);
|
|
1121
1121
|
}
|
|
1122
|
-
function m(f,
|
|
1122
|
+
function m(f, v) {
|
|
1123
1123
|
var x = {};
|
|
1124
1124
|
try {
|
|
1125
|
-
x.value = f(
|
|
1125
|
+
x.value = f(v), x.status = "success";
|
|
1126
1126
|
} catch (A) {
|
|
1127
1127
|
x.status = "error", x.value = A;
|
|
1128
1128
|
}
|
|
@@ -1130,69 +1130,69 @@ function we() {
|
|
|
1130
1130
|
}
|
|
1131
1131
|
(r.exports = _).prototype.finally = function(f) {
|
|
1132
1132
|
if (typeof f != "function") return this;
|
|
1133
|
-
var
|
|
1133
|
+
var v = this.constructor;
|
|
1134
1134
|
return this.then(function(x) {
|
|
1135
|
-
return
|
|
1135
|
+
return v.resolve(f()).then(function() {
|
|
1136
1136
|
return x;
|
|
1137
1137
|
});
|
|
1138
1138
|
}, function(x) {
|
|
1139
|
-
return
|
|
1139
|
+
return v.resolve(f()).then(function() {
|
|
1140
1140
|
throw x;
|
|
1141
1141
|
});
|
|
1142
1142
|
});
|
|
1143
1143
|
}, _.prototype.catch = function(f) {
|
|
1144
1144
|
return this.then(null, f);
|
|
1145
|
-
}, _.prototype.then = function(f,
|
|
1146
|
-
if (typeof f != "function" && this.state ===
|
|
1145
|
+
}, _.prototype.then = function(f, v) {
|
|
1146
|
+
if (typeof f != "function" && this.state === b || typeof v != "function" && this.state === h) return this;
|
|
1147
1147
|
var x = new this.constructor(o);
|
|
1148
|
-
return this.state !==
|
|
1149
|
-
},
|
|
1148
|
+
return this.state !== y ? d(x, this.state === b ? f : v, this.outcome) : this.queue.push(new w(x, f, v)), x;
|
|
1149
|
+
}, w.prototype.callFulfilled = function(f) {
|
|
1150
1150
|
i.resolve(this.promise, f);
|
|
1151
|
-
},
|
|
1151
|
+
}, w.prototype.otherCallFulfilled = function(f) {
|
|
1152
1152
|
d(this.promise, this.onFulfilled, f);
|
|
1153
|
-
},
|
|
1153
|
+
}, w.prototype.callRejected = function(f) {
|
|
1154
1154
|
i.reject(this.promise, f);
|
|
1155
|
-
},
|
|
1155
|
+
}, w.prototype.otherCallRejected = function(f) {
|
|
1156
1156
|
d(this.promise, this.onRejected, f);
|
|
1157
|
-
}, i.resolve = function(f,
|
|
1158
|
-
var x = m(
|
|
1157
|
+
}, i.resolve = function(f, v) {
|
|
1158
|
+
var x = m(k, v);
|
|
1159
1159
|
if (x.status === "error") return i.reject(f, x.value);
|
|
1160
1160
|
var A = x.value;
|
|
1161
1161
|
if (A) u(f, A);
|
|
1162
1162
|
else {
|
|
1163
|
-
f.state =
|
|
1164
|
-
for (var P = -1, D = f.queue.length; ++P < D; ) f.queue[P].callFulfilled(
|
|
1163
|
+
f.state = b, f.outcome = v;
|
|
1164
|
+
for (var P = -1, D = f.queue.length; ++P < D; ) f.queue[P].callFulfilled(v);
|
|
1165
1165
|
}
|
|
1166
1166
|
return f;
|
|
1167
|
-
}, i.reject = function(f,
|
|
1168
|
-
f.state = h, f.outcome =
|
|
1169
|
-
for (var x = -1, A = f.queue.length; ++x < A; ) f.queue[x].callRejected(
|
|
1167
|
+
}, i.reject = function(f, v) {
|
|
1168
|
+
f.state = h, f.outcome = v;
|
|
1169
|
+
for (var x = -1, A = f.queue.length; ++x < A; ) f.queue[x].callRejected(v);
|
|
1170
1170
|
return f;
|
|
1171
1171
|
}, _.resolve = function(f) {
|
|
1172
1172
|
return f instanceof this ? f : i.resolve(new this(o), f);
|
|
1173
1173
|
}, _.reject = function(f) {
|
|
1174
|
-
var
|
|
1175
|
-
return i.reject(
|
|
1174
|
+
var v = new this(o);
|
|
1175
|
+
return i.reject(v, f);
|
|
1176
1176
|
}, _.all = function(f) {
|
|
1177
|
-
var
|
|
1177
|
+
var v = this;
|
|
1178
1178
|
if (Object.prototype.toString.call(f) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1179
1179
|
var x = f.length, A = !1;
|
|
1180
1180
|
if (!x) return this.resolve([]);
|
|
1181
1181
|
for (var P = new Array(x), D = 0, F = -1, W = new this(o); ++F < x; ) T(f[F], F);
|
|
1182
1182
|
return W;
|
|
1183
1183
|
function T(V, Q) {
|
|
1184
|
-
|
|
1184
|
+
v.resolve(V).then(function(S) {
|
|
1185
1185
|
P[Q] = S, ++D !== x || A || (A = !0, i.resolve(W, P));
|
|
1186
1186
|
}, function(S) {
|
|
1187
1187
|
A || (A = !0, i.reject(W, S));
|
|
1188
1188
|
});
|
|
1189
1189
|
}
|
|
1190
1190
|
}, _.race = function(f) {
|
|
1191
|
-
var
|
|
1191
|
+
var v = this;
|
|
1192
1192
|
if (Object.prototype.toString.call(f) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1193
1193
|
var x = f.length, A = !1;
|
|
1194
1194
|
if (!x) return this.resolve([]);
|
|
1195
|
-
for (var P = -1, D = new this(o); ++P < x; ) F = f[P],
|
|
1195
|
+
for (var P = -1, D = new this(o); ++P < x; ) F = f[P], v.resolve(F).then(function(W) {
|
|
1196
1196
|
A || (A = !0, i.resolve(D, W));
|
|
1197
1197
|
}, function(W) {
|
|
1198
1198
|
A || (A = !0, i.reject(D, W));
|
|
@@ -1204,29 +1204,29 @@ function we() {
|
|
|
1204
1204
|
var a = {};
|
|
1205
1205
|
(0, t("./lib/utils/common").assign)(a, t("./lib/deflate"), t("./lib/inflate"), t("./lib/zlib/constants")), r.exports = a;
|
|
1206
1206
|
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(t, r, n) {
|
|
1207
|
-
var a = t("./zlib/deflate"), o = t("./utils/common"), i = t("./utils/strings"), h = t("./zlib/messages"),
|
|
1207
|
+
var a = t("./zlib/deflate"), o = t("./utils/common"), i = t("./utils/strings"), h = t("./zlib/messages"), b = t("./zlib/zstream"), y = Object.prototype.toString, _ = 0, w = -1, d = 0, k = 8;
|
|
1208
1208
|
function u(f) {
|
|
1209
1209
|
if (!(this instanceof u)) return new u(f);
|
|
1210
|
-
this.options = o.assign({ level:
|
|
1211
|
-
var
|
|
1212
|
-
|
|
1213
|
-
var x = a.deflateInit2(this.strm,
|
|
1210
|
+
this.options = o.assign({ level: w, method: k, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: d, to: "" }, f || {});
|
|
1211
|
+
var v = this.options;
|
|
1212
|
+
v.raw && 0 < v.windowBits ? v.windowBits = -v.windowBits : v.gzip && 0 < v.windowBits && v.windowBits < 16 && (v.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new b(), this.strm.avail_out = 0;
|
|
1213
|
+
var x = a.deflateInit2(this.strm, v.level, v.method, v.windowBits, v.memLevel, v.strategy);
|
|
1214
1214
|
if (x !== _) throw new Error(h[x]);
|
|
1215
|
-
if (
|
|
1215
|
+
if (v.header && a.deflateSetHeader(this.strm, v.header), v.dictionary) {
|
|
1216
1216
|
var A;
|
|
1217
|
-
if (A = typeof
|
|
1217
|
+
if (A = typeof v.dictionary == "string" ? i.string2buf(v.dictionary) : y.call(v.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(v.dictionary) : v.dictionary, (x = a.deflateSetDictionary(this.strm, A)) !== _) throw new Error(h[x]);
|
|
1218
1218
|
this._dict_set = !0;
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
|
-
function m(f,
|
|
1222
|
-
var x = new u(
|
|
1221
|
+
function m(f, v) {
|
|
1222
|
+
var x = new u(v);
|
|
1223
1223
|
if (x.push(f, !0), x.err) throw x.msg || h[x.err];
|
|
1224
1224
|
return x.result;
|
|
1225
1225
|
}
|
|
1226
|
-
u.prototype.push = function(f,
|
|
1226
|
+
u.prototype.push = function(f, v) {
|
|
1227
1227
|
var x, A, P = this.strm, D = this.options.chunkSize;
|
|
1228
1228
|
if (this.ended) return !1;
|
|
1229
|
-
A =
|
|
1229
|
+
A = v === ~~v ? v : v === !0 ? 4 : 0, typeof f == "string" ? P.input = i.string2buf(f) : y.call(f) === "[object ArrayBuffer]" ? P.input = new Uint8Array(f) : P.input = f, P.next_in = 0, P.avail_in = P.input.length;
|
|
1230
1230
|
do {
|
|
1231
1231
|
if (P.avail_out === 0 && (P.output = new o.Buf8(D), P.next_out = 0, P.avail_out = D), (x = a.deflate(P, A)) !== 1 && x !== _) return this.onEnd(x), !(this.ended = !0);
|
|
1232
1232
|
P.avail_out !== 0 && (P.avail_in !== 0 || A !== 4 && A !== 2) || (this.options.to === "string" ? this.onData(i.buf2binstring(o.shrinkBuf(P.output, P.next_out))) : this.onData(o.shrinkBuf(P.output, P.next_out)));
|
|
@@ -1236,67 +1236,67 @@ function we() {
|
|
|
1236
1236
|
this.chunks.push(f);
|
|
1237
1237
|
}, u.prototype.onEnd = function(f) {
|
|
1238
1238
|
f === _ && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = f, this.msg = this.strm.msg;
|
|
1239
|
-
}, n.Deflate = u, n.deflate = m, n.deflateRaw = function(f,
|
|
1240
|
-
return (
|
|
1241
|
-
}, n.gzip = function(f,
|
|
1242
|
-
return (
|
|
1239
|
+
}, n.Deflate = u, n.deflate = m, n.deflateRaw = function(f, v) {
|
|
1240
|
+
return (v = v || {}).raw = !0, m(f, v);
|
|
1241
|
+
}, n.gzip = function(f, v) {
|
|
1242
|
+
return (v = v || {}).gzip = !0, m(f, v);
|
|
1243
1243
|
};
|
|
1244
1244
|
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(t, r, n) {
|
|
1245
|
-
var a = t("./zlib/inflate"), o = t("./utils/common"), i = t("./utils/strings"), h = t("./zlib/constants"),
|
|
1245
|
+
var a = t("./zlib/inflate"), o = t("./utils/common"), i = t("./utils/strings"), h = t("./zlib/constants"), b = t("./zlib/messages"), y = t("./zlib/zstream"), _ = t("./zlib/gzheader"), w = Object.prototype.toString;
|
|
1246
1246
|
function d(u) {
|
|
1247
1247
|
if (!(this instanceof d)) return new d(u);
|
|
1248
1248
|
this.options = o.assign({ chunkSize: 16384, windowBits: 0, to: "" }, u || {});
|
|
1249
1249
|
var m = this.options;
|
|
1250
|
-
m.raw && 0 <= m.windowBits && m.windowBits < 16 && (m.windowBits = -m.windowBits, m.windowBits === 0 && (m.windowBits = -15)), !(0 <= m.windowBits && m.windowBits < 16) || u && u.windowBits || (m.windowBits += 32), 15 < m.windowBits && m.windowBits < 48 && (15 & m.windowBits) == 0 && (m.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new
|
|
1250
|
+
m.raw && 0 <= m.windowBits && m.windowBits < 16 && (m.windowBits = -m.windowBits, m.windowBits === 0 && (m.windowBits = -15)), !(0 <= m.windowBits && m.windowBits < 16) || u && u.windowBits || (m.windowBits += 32), 15 < m.windowBits && m.windowBits < 48 && (15 & m.windowBits) == 0 && (m.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new y(), this.strm.avail_out = 0;
|
|
1251
1251
|
var f = a.inflateInit2(this.strm, m.windowBits);
|
|
1252
|
-
if (f !== h.Z_OK) throw new Error(
|
|
1252
|
+
if (f !== h.Z_OK) throw new Error(b[f]);
|
|
1253
1253
|
this.header = new _(), a.inflateGetHeader(this.strm, this.header);
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function k(u, m) {
|
|
1256
1256
|
var f = new d(m);
|
|
1257
|
-
if (f.push(u, !0), f.err) throw f.msg ||
|
|
1257
|
+
if (f.push(u, !0), f.err) throw f.msg || b[f.err];
|
|
1258
1258
|
return f.result;
|
|
1259
1259
|
}
|
|
1260
1260
|
d.prototype.push = function(u, m) {
|
|
1261
|
-
var f,
|
|
1261
|
+
var f, v, x, A, P, D, F = this.strm, W = this.options.chunkSize, T = this.options.dictionary, V = !1;
|
|
1262
1262
|
if (this.ended) return !1;
|
|
1263
|
-
|
|
1263
|
+
v = m === ~~m ? m : m === !0 ? h.Z_FINISH : h.Z_NO_FLUSH, typeof u == "string" ? F.input = i.binstring2buf(u) : w.call(u) === "[object ArrayBuffer]" ? F.input = new Uint8Array(u) : F.input = u, F.next_in = 0, F.avail_in = F.input.length;
|
|
1264
1264
|
do {
|
|
1265
|
-
if (F.avail_out === 0 && (F.output = new o.Buf8(W), F.next_out = 0, F.avail_out = W), (f = a.inflate(F, h.Z_NO_FLUSH)) === h.Z_NEED_DICT && T && (D = typeof T == "string" ? i.string2buf(T) :
|
|
1266
|
-
F.next_out && (F.avail_out !== 0 && f !== h.Z_STREAM_END && (F.avail_in !== 0 ||
|
|
1265
|
+
if (F.avail_out === 0 && (F.output = new o.Buf8(W), F.next_out = 0, F.avail_out = W), (f = a.inflate(F, h.Z_NO_FLUSH)) === h.Z_NEED_DICT && T && (D = typeof T == "string" ? i.string2buf(T) : w.call(T) === "[object ArrayBuffer]" ? new Uint8Array(T) : T, f = a.inflateSetDictionary(this.strm, D)), f === h.Z_BUF_ERROR && V === !0 && (f = h.Z_OK, V = !1), f !== h.Z_STREAM_END && f !== h.Z_OK) return this.onEnd(f), !(this.ended = !0);
|
|
1266
|
+
F.next_out && (F.avail_out !== 0 && f !== h.Z_STREAM_END && (F.avail_in !== 0 || v !== h.Z_FINISH && v !== h.Z_SYNC_FLUSH) || (this.options.to === "string" ? (x = i.utf8border(F.output, F.next_out), A = F.next_out - x, P = i.buf2string(F.output, x), F.next_out = A, F.avail_out = W - A, A && o.arraySet(F.output, F.output, x, A, 0), this.onData(P)) : this.onData(o.shrinkBuf(F.output, F.next_out)))), F.avail_in === 0 && F.avail_out === 0 && (V = !0);
|
|
1267
1267
|
} while ((0 < F.avail_in || F.avail_out === 0) && f !== h.Z_STREAM_END);
|
|
1268
|
-
return f === h.Z_STREAM_END && (
|
|
1268
|
+
return f === h.Z_STREAM_END && (v = h.Z_FINISH), v === h.Z_FINISH ? (f = a.inflateEnd(this.strm), this.onEnd(f), this.ended = !0, f === h.Z_OK) : v !== h.Z_SYNC_FLUSH || (this.onEnd(h.Z_OK), !(F.avail_out = 0));
|
|
1269
1269
|
}, d.prototype.onData = function(u) {
|
|
1270
1270
|
this.chunks.push(u);
|
|
1271
1271
|
}, d.prototype.onEnd = function(u) {
|
|
1272
1272
|
u === h.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = o.flattenChunks(this.chunks)), this.chunks = [], this.err = u, this.msg = this.strm.msg;
|
|
1273
|
-
}, n.Inflate = d, n.inflate =
|
|
1274
|
-
return (m = m || {}).raw = !0,
|
|
1275
|
-
}, n.ungzip =
|
|
1273
|
+
}, n.Inflate = d, n.inflate = k, n.inflateRaw = function(u, m) {
|
|
1274
|
+
return (m = m || {}).raw = !0, k(u, m);
|
|
1275
|
+
}, n.ungzip = k;
|
|
1276
1276
|
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(t, r, n) {
|
|
1277
|
-
var a = typeof Uint8Array
|
|
1277
|
+
var a = typeof Uint8Array != "undefined" && typeof Uint16Array != "undefined" && typeof Int32Array != "undefined";
|
|
1278
1278
|
n.assign = function(h) {
|
|
1279
|
-
for (var
|
|
1280
|
-
var
|
|
1281
|
-
if (
|
|
1282
|
-
if (typeof
|
|
1283
|
-
for (var _ in
|
|
1279
|
+
for (var b = Array.prototype.slice.call(arguments, 1); b.length; ) {
|
|
1280
|
+
var y = b.shift();
|
|
1281
|
+
if (y) {
|
|
1282
|
+
if (typeof y != "object") throw new TypeError(y + "must be non-object");
|
|
1283
|
+
for (var _ in y) y.hasOwnProperty(_) && (h[_] = y[_]);
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
1286
|
return h;
|
|
1287
|
-
}, n.shrinkBuf = function(h,
|
|
1288
|
-
return h.length ===
|
|
1287
|
+
}, n.shrinkBuf = function(h, b) {
|
|
1288
|
+
return h.length === b ? h : h.subarray ? h.subarray(0, b) : (h.length = b, h);
|
|
1289
1289
|
};
|
|
1290
|
-
var o = { arraySet: function(h,
|
|
1291
|
-
if (
|
|
1292
|
-
else for (var d = 0; d < _; d++) h[
|
|
1290
|
+
var o = { arraySet: function(h, b, y, _, w) {
|
|
1291
|
+
if (b.subarray && h.subarray) h.set(b.subarray(y, y + _), w);
|
|
1292
|
+
else for (var d = 0; d < _; d++) h[w + d] = b[y + d];
|
|
1293
1293
|
}, flattenChunks: function(h) {
|
|
1294
|
-
var
|
|
1295
|
-
for (
|
|
1296
|
-
for (
|
|
1297
|
-
return
|
|
1298
|
-
} }, i = { arraySet: function(h,
|
|
1299
|
-
for (var d = 0; d < _; d++) h[
|
|
1294
|
+
var b, y, _, w, d, k;
|
|
1295
|
+
for (b = _ = 0, y = h.length; b < y; b++) _ += h[b].length;
|
|
1296
|
+
for (k = new Uint8Array(_), b = w = 0, y = h.length; b < y; b++) d = h[b], k.set(d, w), w += d.length;
|
|
1297
|
+
return k;
|
|
1298
|
+
} }, i = { arraySet: function(h, b, y, _, w) {
|
|
1299
|
+
for (var d = 0; d < _; d++) h[w + d] = b[y + d];
|
|
1300
1300
|
}, flattenChunks: function(h) {
|
|
1301
1301
|
return [].concat.apply([], h);
|
|
1302
1302
|
} };
|
|
@@ -1307,51 +1307,51 @@ function we() {
|
|
|
1307
1307
|
var a = t("./common"), o = !0, i = !0;
|
|
1308
1308
|
try {
|
|
1309
1309
|
String.fromCharCode.apply(null, [0]);
|
|
1310
|
-
} catch {
|
|
1310
|
+
} catch (_) {
|
|
1311
1311
|
o = !1;
|
|
1312
1312
|
}
|
|
1313
1313
|
try {
|
|
1314
1314
|
String.fromCharCode.apply(null, new Uint8Array(1));
|
|
1315
|
-
} catch {
|
|
1315
|
+
} catch (_) {
|
|
1316
1316
|
i = !1;
|
|
1317
1317
|
}
|
|
1318
|
-
for (var h = new a.Buf8(256),
|
|
1319
|
-
function
|
|
1320
|
-
if (
|
|
1321
|
-
for (var d = "",
|
|
1318
|
+
for (var h = new a.Buf8(256), b = 0; b < 256; b++) h[b] = 252 <= b ? 6 : 248 <= b ? 5 : 240 <= b ? 4 : 224 <= b ? 3 : 192 <= b ? 2 : 1;
|
|
1319
|
+
function y(_, w) {
|
|
1320
|
+
if (w < 65537 && (_.subarray && i || !_.subarray && o)) return String.fromCharCode.apply(null, a.shrinkBuf(_, w));
|
|
1321
|
+
for (var d = "", k = 0; k < w; k++) d += String.fromCharCode(_[k]);
|
|
1322
1322
|
return d;
|
|
1323
1323
|
}
|
|
1324
1324
|
h[254] = h[254] = 1, n.string2buf = function(_) {
|
|
1325
|
-
var
|
|
1326
|
-
for (u = 0; u < f; u++) (64512 & (d = _.charCodeAt(u))) == 55296 && u + 1 < f && (64512 & (
|
|
1327
|
-
for (
|
|
1328
|
-
return
|
|
1325
|
+
var w, d, k, u, m, f = _.length, v = 0;
|
|
1326
|
+
for (u = 0; u < f; u++) (64512 & (d = _.charCodeAt(u))) == 55296 && u + 1 < f && (64512 & (k = _.charCodeAt(u + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (k - 56320), u++), v += d < 128 ? 1 : d < 2048 ? 2 : d < 65536 ? 3 : 4;
|
|
1327
|
+
for (w = new a.Buf8(v), u = m = 0; m < v; u++) (64512 & (d = _.charCodeAt(u))) == 55296 && u + 1 < f && (64512 & (k = _.charCodeAt(u + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (k - 56320), u++), d < 128 ? w[m++] = d : (d < 2048 ? w[m++] = 192 | d >>> 6 : (d < 65536 ? w[m++] = 224 | d >>> 12 : (w[m++] = 240 | d >>> 18, w[m++] = 128 | d >>> 12 & 63), w[m++] = 128 | d >>> 6 & 63), w[m++] = 128 | 63 & d);
|
|
1328
|
+
return w;
|
|
1329
1329
|
}, n.buf2binstring = function(_) {
|
|
1330
|
-
return
|
|
1330
|
+
return y(_, _.length);
|
|
1331
1331
|
}, n.binstring2buf = function(_) {
|
|
1332
|
-
for (var
|
|
1333
|
-
return
|
|
1334
|
-
}, n.buf2string = function(_,
|
|
1335
|
-
var d,
|
|
1336
|
-
for (d =
|
|
1337
|
-
else if (4 < (m = h[u]))
|
|
1332
|
+
for (var w = new a.Buf8(_.length), d = 0, k = w.length; d < k; d++) w[d] = _.charCodeAt(d);
|
|
1333
|
+
return w;
|
|
1334
|
+
}, n.buf2string = function(_, w) {
|
|
1335
|
+
var d, k, u, m, f = w || _.length, v = new Array(2 * f);
|
|
1336
|
+
for (d = k = 0; d < f; ) if ((u = _[d++]) < 128) v[k++] = u;
|
|
1337
|
+
else if (4 < (m = h[u])) v[k++] = 65533, d += m - 1;
|
|
1338
1338
|
else {
|
|
1339
1339
|
for (u &= m === 2 ? 31 : m === 3 ? 15 : 7; 1 < m && d < f; ) u = u << 6 | 63 & _[d++], m--;
|
|
1340
|
-
1 < m ?
|
|
1340
|
+
1 < m ? v[k++] = 65533 : u < 65536 ? v[k++] = u : (u -= 65536, v[k++] = 55296 | u >> 10 & 1023, v[k++] = 56320 | 1023 & u);
|
|
1341
1341
|
}
|
|
1342
|
-
return
|
|
1343
|
-
}, n.utf8border = function(_,
|
|
1342
|
+
return y(v, k);
|
|
1343
|
+
}, n.utf8border = function(_, w) {
|
|
1344
1344
|
var d;
|
|
1345
|
-
for ((
|
|
1346
|
-
return d < 0 || d === 0 ?
|
|
1345
|
+
for ((w = w || _.length) > _.length && (w = _.length), d = w - 1; 0 <= d && (192 & _[d]) == 128; ) d--;
|
|
1346
|
+
return d < 0 || d === 0 ? w : d + h[_[d]] > w ? d : w;
|
|
1347
1347
|
};
|
|
1348
1348
|
}, { "./common": 41 }], 43: [function(t, r, n) {
|
|
1349
1349
|
r.exports = function(a, o, i, h) {
|
|
1350
|
-
for (var
|
|
1351
|
-
for (i -= _ = 2e3 < i ? 2e3 : i;
|
|
1352
|
-
|
|
1350
|
+
for (var b = 65535 & a | 0, y = a >>> 16 & 65535 | 0, _ = 0; i !== 0; ) {
|
|
1351
|
+
for (i -= _ = 2e3 < i ? 2e3 : i; y = y + (b = b + o[h++] | 0) | 0, --_; ) ;
|
|
1352
|
+
b %= 65521, y %= 65521;
|
|
1353
1353
|
}
|
|
1354
|
-
return
|
|
1354
|
+
return b | y << 16 | 0;
|
|
1355
1355
|
};
|
|
1356
1356
|
}, {}], 44: [function(t, r, n) {
|
|
1357
1357
|
r.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 };
|
|
@@ -1359,21 +1359,21 @@ function we() {
|
|
|
1359
1359
|
var a = (function() {
|
|
1360
1360
|
for (var o, i = [], h = 0; h < 256; h++) {
|
|
1361
1361
|
o = h;
|
|
1362
|
-
for (var
|
|
1362
|
+
for (var b = 0; b < 8; b++) o = 1 & o ? 3988292384 ^ o >>> 1 : o >>> 1;
|
|
1363
1363
|
i[h] = o;
|
|
1364
1364
|
}
|
|
1365
1365
|
return i;
|
|
1366
1366
|
})();
|
|
1367
|
-
r.exports = function(o, i, h,
|
|
1368
|
-
var
|
|
1367
|
+
r.exports = function(o, i, h, b) {
|
|
1368
|
+
var y = a, _ = b + h;
|
|
1369
1369
|
o ^= -1;
|
|
1370
|
-
for (var
|
|
1370
|
+
for (var w = b; w < _; w++) o = o >>> 8 ^ y[255 & (o ^ i[w])];
|
|
1371
1371
|
return -1 ^ o;
|
|
1372
1372
|
};
|
|
1373
1373
|
}, {}], 46: [function(t, r, n) {
|
|
1374
|
-
var a, o = t("../utils/common"), i = t("./trees"), h = t("./adler32"),
|
|
1374
|
+
var a, o = t("../utils/common"), i = t("./trees"), h = t("./adler32"), b = t("./crc32"), y = t("./messages"), _ = 0, w = 4, d = 0, k = -2, u = -1, m = 4, f = 2, v = 8, x = 9, A = 286, P = 30, D = 19, F = 2 * A + 1, W = 15, T = 3, V = 258, Q = V + T + 1, S = 42, I = 113, l = 1, L = 2, et = 3, $ = 4;
|
|
1375
1375
|
function rt(s, O) {
|
|
1376
|
-
return s.msg =
|
|
1376
|
+
return s.msg = y[O], O;
|
|
1377
1377
|
}
|
|
1378
1378
|
function H(s) {
|
|
1379
1379
|
return (s << 1) - (4 < s ? 9 : 0);
|
|
@@ -1420,7 +1420,7 @@ function we() {
|
|
|
1420
1420
|
p += G;
|
|
1421
1421
|
}
|
|
1422
1422
|
if (s.strm.avail_in === 0) break;
|
|
1423
|
-
if (j = s.strm, U = s.window, N = s.strstart + s.lookahead, Z = p, K = void 0, K = j.avail_in, Z < K && (K = Z), R = K === 0 ? 0 : (j.avail_in -= K, o.arraySet(U, j.input, j.next_in, K, N), j.state.wrap === 1 ? j.adler = h(j.adler, U, K, N) : j.state.wrap === 2 && (j.adler =
|
|
1423
|
+
if (j = s.strm, U = s.window, N = s.strstart + s.lookahead, Z = p, K = void 0, K = j.avail_in, Z < K && (K = Z), R = K === 0 ? 0 : (j.avail_in -= K, o.arraySet(U, j.input, j.next_in, K, N), j.state.wrap === 1 ? j.adler = h(j.adler, U, K, N) : j.state.wrap === 2 && (j.adler = b(j.adler, U, K, N)), j.next_in += K, j.total_in += K, K), s.lookahead += R, s.lookahead + s.insert >= T) for (E = s.strstart - s.insert, s.ins_h = s.window[E], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[E + 1]) & s.hash_mask; s.insert && (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[E + T - 1]) & s.hash_mask, s.prev[E & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = E, E++, s.insert--, !(s.lookahead + s.insert < T)); ) ;
|
|
1424
1424
|
} while (s.lookahead < Q && s.strm.avail_in !== 0);
|
|
1425
1425
|
}
|
|
1426
1426
|
function mt(s, O) {
|
|
@@ -1436,7 +1436,7 @@ function we() {
|
|
|
1436
1436
|
else g = i._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;
|
|
1437
1437
|
if (g && (z(s, !1), s.strm.avail_out === 0)) return l;
|
|
1438
1438
|
}
|
|
1439
|
-
return s.insert = s.strstart < T - 1 ? s.strstart : T - 1, O ===
|
|
1439
|
+
return s.insert = s.strstart < T - 1 ? s.strstart : T - 1, O === w ? (z(s, !0), s.strm.avail_out === 0 ? et : $) : s.last_lit && (z(s, !1), s.strm.avail_out === 0) ? l : L;
|
|
1440
1440
|
}
|
|
1441
1441
|
function at(s, O) {
|
|
1442
1442
|
for (var R, g, p; ; ) {
|
|
@@ -1451,17 +1451,17 @@ function we() {
|
|
|
1451
1451
|
if ((g = i._tr_tally(s, 0, s.window[s.strstart - 1])) && z(s, !1), s.strstart++, s.lookahead--, s.strm.avail_out === 0) return l;
|
|
1452
1452
|
} else s.match_available = 1, s.strstart++, s.lookahead--;
|
|
1453
1453
|
}
|
|
1454
|
-
return s.match_available && (g = i._tr_tally(s, 0, s.window[s.strstart - 1]), s.match_available = 0), s.insert = s.strstart < T - 1 ? s.strstart : T - 1, O ===
|
|
1454
|
+
return s.match_available && (g = i._tr_tally(s, 0, s.window[s.strstart - 1]), s.match_available = 0), s.insert = s.strstart < T - 1 ? s.strstart : T - 1, O === w ? (z(s, !0), s.strm.avail_out === 0 ? et : $) : s.last_lit && (z(s, !1), s.strm.avail_out === 0) ? l : L;
|
|
1455
1455
|
}
|
|
1456
1456
|
function it(s, O, R, g, p) {
|
|
1457
1457
|
this.good_length = s, this.max_lazy = O, this.nice_length = R, this.max_chain = g, this.func = p;
|
|
1458
1458
|
}
|
|
1459
1459
|
function pt() {
|
|
1460
|
-
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 =
|
|
1460
|
+
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 = v, 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 * F), this.dyn_dtree = new o.Buf16(2 * (2 * P + 1)), this.bl_tree = new o.Buf16(2 * (2 * D + 1)), tt(this.dyn_ltree), tt(this.dyn_dtree), tt(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new o.Buf16(W + 1), this.heap = new o.Buf16(2 * A + 1), tt(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new o.Buf16(2 * A + 1), tt(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;
|
|
1461
1461
|
}
|
|
1462
1462
|
function ht(s) {
|
|
1463
1463
|
var O;
|
|
1464
|
-
return s && s.state ? (s.total_in = s.total_out = 0, s.data_type = f, (O = s.state).pending = 0, O.pending_out = 0, O.wrap < 0 && (O.wrap = -O.wrap), O.status = O.wrap ? S : I, s.adler = O.wrap === 2 ? 0 : 1, O.last_flush = _, i._tr_init(O), d) : rt(s,
|
|
1464
|
+
return s && s.state ? (s.total_in = s.total_out = 0, s.data_type = f, (O = s.state).pending = 0, O.pending_out = 0, O.wrap < 0 && (O.wrap = -O.wrap), O.status = O.wrap ? S : I, s.adler = O.wrap === 2 ? 0 : 1, O.last_flush = _, i._tr_init(O), d) : rt(s, k);
|
|
1465
1465
|
}
|
|
1466
1466
|
function kt(s) {
|
|
1467
1467
|
var O = ht(s);
|
|
@@ -1470,9 +1470,9 @@ function we() {
|
|
|
1470
1470
|
})(s.state), O;
|
|
1471
1471
|
}
|
|
1472
1472
|
function vt(s, O, R, g, p, E) {
|
|
1473
|
-
if (!s) return
|
|
1473
|
+
if (!s) return k;
|
|
1474
1474
|
var j = 1;
|
|
1475
|
-
if (O === u && (O = 6), g < 0 ? (j = 0, g = -g) : 15 < g && (j = 2, g -= 16), p < 1 || x < p || R !==
|
|
1475
|
+
if (O === u && (O = 6), g < 0 ? (j = 0, g = -g) : 15 < g && (j = 2, g -= 16), p < 1 || x < p || R !== v || g < 8 || 15 < g || O < 0 || 9 < O || E < 0 || m < E) return rt(s, k);
|
|
1476
1476
|
g === 8 && (g = 9);
|
|
1477
1477
|
var U = new pt();
|
|
1478
1478
|
return (s.state = U).strm = s, U.wrap = j, U.gzhead = null, U.w_bits = g, U.w_size = 1 << U.w_bits, U.w_mask = U.w_size - 1, U.hash_bits = p + 7, U.hash_size = 1 << U.hash_bits, U.hash_mask = U.hash_size - 1, U.hash_shift = ~~((U.hash_bits + T - 1) / T), U.window = new o.Buf8(2 * U.w_size), U.head = new o.Buf16(U.hash_size), U.prev = new o.Buf16(U.w_size), U.lit_bufsize = 1 << p + 6, U.pending_buf_size = 4 * U.lit_bufsize, U.pending_buf = new o.Buf8(U.pending_buf_size), U.d_buf = 1 * U.lit_bufsize, U.l_buf = 3 * U.lit_bufsize, U.level = O, U.strategy = E, U.method = R, kt(s);
|
|
@@ -1488,49 +1488,49 @@ function we() {
|
|
|
1488
1488
|
var g = s.block_start + R;
|
|
1489
1489
|
if ((s.strstart === 0 || s.strstart >= g) && (s.lookahead = s.strstart - g, s.strstart = g, z(s, !1), s.strm.avail_out === 0) || s.strstart - s.block_start >= s.w_size - Q && (z(s, !1), s.strm.avail_out === 0)) return l;
|
|
1490
1490
|
}
|
|
1491
|
-
return s.insert = 0, O ===
|
|
1491
|
+
return s.insert = 0, O === w ? (z(s, !0), s.strm.avail_out === 0 ? et : $) : (s.strstart > s.block_start && (z(s, !1), s.strm.avail_out), l);
|
|
1492
1492
|
}), new it(4, 4, 8, 4, mt), new it(4, 5, 16, 8, mt), new it(4, 6, 32, 32, mt), new it(4, 4, 16, 16, at), new it(8, 16, 32, 32, at), new it(8, 16, 128, 128, at), new it(8, 32, 128, 256, at), new it(32, 128, 258, 1024, at), new it(32, 258, 258, 4096, at)], n.deflateInit = function(s, O) {
|
|
1493
|
-
return vt(s, O,
|
|
1493
|
+
return vt(s, O, v, 15, 8, 0);
|
|
1494
1494
|
}, n.deflateInit2 = vt, n.deflateReset = kt, n.deflateResetKeep = ht, n.deflateSetHeader = function(s, O) {
|
|
1495
|
-
return s && s.state ? s.state.wrap !== 2 ?
|
|
1495
|
+
return s && s.state ? s.state.wrap !== 2 ? k : (s.state.gzhead = O, d) : k;
|
|
1496
1496
|
}, n.deflate = function(s, O) {
|
|
1497
1497
|
var R, g, p, E;
|
|
1498
|
-
if (!s || !s.state || 5 < O || O < 0) return s ? rt(s,
|
|
1499
|
-
if (g = s.state, !s.output || !s.input && s.avail_in !== 0 || g.status === 666 && O !==
|
|
1500
|
-
if (g.strm = s, R = g.last_flush, g.last_flush = O, g.status === S) if (g.wrap === 2) s.adler = 0, J(g, 31), J(g, 139), J(g, 8), g.gzhead ? (J(g, (g.gzhead.text ? 1 : 0) + (g.gzhead.hcrc ? 2 : 0) + (g.gzhead.extra ? 4 : 0) + (g.gzhead.name ? 8 : 0) + (g.gzhead.comment ? 16 : 0)), J(g, 255 & g.gzhead.time), J(g, g.gzhead.time >> 8 & 255), J(g, g.gzhead.time >> 16 & 255), J(g, g.gzhead.time >> 24 & 255), J(g, g.level === 9 ? 2 : 2 <= g.strategy || g.level < 2 ? 4 : 0), J(g, 255 & g.gzhead.os), g.gzhead.extra && g.gzhead.extra.length && (J(g, 255 & g.gzhead.extra.length), J(g, g.gzhead.extra.length >> 8 & 255)), g.gzhead.hcrc && (s.adler =
|
|
1498
|
+
if (!s || !s.state || 5 < O || O < 0) return s ? rt(s, k) : k;
|
|
1499
|
+
if (g = s.state, !s.output || !s.input && s.avail_in !== 0 || g.status === 666 && O !== w) return rt(s, s.avail_out === 0 ? -5 : k);
|
|
1500
|
+
if (g.strm = s, R = g.last_flush, g.last_flush = O, g.status === S) if (g.wrap === 2) s.adler = 0, J(g, 31), J(g, 139), J(g, 8), g.gzhead ? (J(g, (g.gzhead.text ? 1 : 0) + (g.gzhead.hcrc ? 2 : 0) + (g.gzhead.extra ? 4 : 0) + (g.gzhead.name ? 8 : 0) + (g.gzhead.comment ? 16 : 0)), J(g, 255 & g.gzhead.time), J(g, g.gzhead.time >> 8 & 255), J(g, g.gzhead.time >> 16 & 255), J(g, g.gzhead.time >> 24 & 255), J(g, g.level === 9 ? 2 : 2 <= g.strategy || g.level < 2 ? 4 : 0), J(g, 255 & g.gzhead.os), g.gzhead.extra && g.gzhead.extra.length && (J(g, 255 & g.gzhead.extra.length), J(g, g.gzhead.extra.length >> 8 & 255)), g.gzhead.hcrc && (s.adler = b(s.adler, g.pending_buf, g.pending, 0)), g.gzindex = 0, g.status = 69) : (J(g, 0), J(g, 0), J(g, 0), J(g, 0), J(g, 0), J(g, g.level === 9 ? 2 : 2 <= g.strategy || g.level < 2 ? 4 : 0), J(g, 3), g.status = I);
|
|
1501
1501
|
else {
|
|
1502
|
-
var j =
|
|
1502
|
+
var j = v + (g.w_bits - 8 << 4) << 8;
|
|
1503
1503
|
j |= (2 <= g.strategy || g.level < 2 ? 0 : g.level < 6 ? 1 : g.level === 6 ? 2 : 3) << 6, g.strstart !== 0 && (j |= 32), j += 31 - j % 31, g.status = I, q(g, j), g.strstart !== 0 && (q(g, s.adler >>> 16), q(g, 65535 & s.adler)), s.adler = 1;
|
|
1504
1504
|
}
|
|
1505
1505
|
if (g.status === 69) if (g.gzhead.extra) {
|
|
1506
|
-
for (p = g.pending; g.gzindex < (65535 & g.gzhead.extra.length) && (g.pending !== g.pending_buf_size || (g.gzhead.hcrc && g.pending > p && (s.adler =
|
|
1507
|
-
g.gzhead.hcrc && g.pending > p && (s.adler =
|
|
1506
|
+
for (p = g.pending; g.gzindex < (65535 & g.gzhead.extra.length) && (g.pending !== g.pending_buf_size || (g.gzhead.hcrc && g.pending > p && (s.adler = b(s.adler, g.pending_buf, g.pending - p, p)), M(s), p = g.pending, g.pending !== g.pending_buf_size)); ) J(g, 255 & g.gzhead.extra[g.gzindex]), g.gzindex++;
|
|
1507
|
+
g.gzhead.hcrc && g.pending > p && (s.adler = b(s.adler, g.pending_buf, g.pending - p, p)), g.gzindex === g.gzhead.extra.length && (g.gzindex = 0, g.status = 73);
|
|
1508
1508
|
} else g.status = 73;
|
|
1509
1509
|
if (g.status === 73) if (g.gzhead.name) {
|
|
1510
1510
|
p = g.pending;
|
|
1511
1511
|
do {
|
|
1512
|
-
if (g.pending === g.pending_buf_size && (g.gzhead.hcrc && g.pending > p && (s.adler =
|
|
1512
|
+
if (g.pending === g.pending_buf_size && (g.gzhead.hcrc && g.pending > p && (s.adler = b(s.adler, g.pending_buf, g.pending - p, p)), M(s), p = g.pending, g.pending === g.pending_buf_size)) {
|
|
1513
1513
|
E = 1;
|
|
1514
1514
|
break;
|
|
1515
1515
|
}
|
|
1516
1516
|
E = g.gzindex < g.gzhead.name.length ? 255 & g.gzhead.name.charCodeAt(g.gzindex++) : 0, J(g, E);
|
|
1517
1517
|
} while (E !== 0);
|
|
1518
|
-
g.gzhead.hcrc && g.pending > p && (s.adler =
|
|
1518
|
+
g.gzhead.hcrc && g.pending > p && (s.adler = b(s.adler, g.pending_buf, g.pending - p, p)), E === 0 && (g.gzindex = 0, g.status = 91);
|
|
1519
1519
|
} else g.status = 91;
|
|
1520
1520
|
if (g.status === 91) if (g.gzhead.comment) {
|
|
1521
1521
|
p = g.pending;
|
|
1522
1522
|
do {
|
|
1523
|
-
if (g.pending === g.pending_buf_size && (g.gzhead.hcrc && g.pending > p && (s.adler =
|
|
1523
|
+
if (g.pending === g.pending_buf_size && (g.gzhead.hcrc && g.pending > p && (s.adler = b(s.adler, g.pending_buf, g.pending - p, p)), M(s), p = g.pending, g.pending === g.pending_buf_size)) {
|
|
1524
1524
|
E = 1;
|
|
1525
1525
|
break;
|
|
1526
1526
|
}
|
|
1527
1527
|
E = g.gzindex < g.gzhead.comment.length ? 255 & g.gzhead.comment.charCodeAt(g.gzindex++) : 0, J(g, E);
|
|
1528
1528
|
} while (E !== 0);
|
|
1529
|
-
g.gzhead.hcrc && g.pending > p && (s.adler =
|
|
1529
|
+
g.gzhead.hcrc && g.pending > p && (s.adler = b(s.adler, g.pending_buf, g.pending - p, p)), E === 0 && (g.status = 103);
|
|
1530
1530
|
} else g.status = 103;
|
|
1531
1531
|
if (g.status === 103 && (g.gzhead.hcrc ? (g.pending + 2 > g.pending_buf_size && M(s), g.pending + 2 <= g.pending_buf_size && (J(g, 255 & s.adler), J(g, s.adler >> 8 & 255), s.adler = 0, g.status = I)) : g.status = I), g.pending !== 0) {
|
|
1532
1532
|
if (M(s), s.avail_out === 0) return g.last_flush = -1, d;
|
|
1533
|
-
} else if (s.avail_in === 0 && H(O) <= H(R) && O !==
|
|
1533
|
+
} else if (s.avail_in === 0 && H(O) <= H(R) && O !== w) return rt(s, -5);
|
|
1534
1534
|
if (g.status === 666 && s.avail_in !== 0) return rt(s, -5);
|
|
1535
1535
|
if (s.avail_in !== 0 || g.lookahead !== 0 || O !== _ && g.status !== 666) {
|
|
1536
1536
|
var U = g.strategy === 2 ? (function(N, Z) {
|
|
@@ -1541,7 +1541,7 @@ function we() {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
if (N.match_length = 0, K = i._tr_tally(N, 0, N.window[N.strstart]), N.lookahead--, N.strstart++, K && (z(N, !1), N.strm.avail_out === 0)) return l;
|
|
1543
1543
|
}
|
|
1544
|
-
return N.insert = 0, Z ===
|
|
1544
|
+
return N.insert = 0, Z === w ? (z(N, !0), N.strm.avail_out === 0 ? et : $) : N.last_lit && (z(N, !1), N.strm.avail_out === 0) ? l : L;
|
|
1545
1545
|
})(g, O) : g.strategy === 3 ? (function(N, Z) {
|
|
1546
1546
|
for (var K, G, Y, lt, st = N.window; ; ) {
|
|
1547
1547
|
if (N.lookahead <= V) {
|
|
@@ -1557,18 +1557,18 @@ function we() {
|
|
|
1557
1557
|
}
|
|
1558
1558
|
if (N.match_length >= T ? (K = i._tr_tally(N, 1, N.match_length - T), N.lookahead -= N.match_length, N.strstart += N.match_length, N.match_length = 0) : (K = i._tr_tally(N, 0, N.window[N.strstart]), N.lookahead--, N.strstart++), K && (z(N, !1), N.strm.avail_out === 0)) return l;
|
|
1559
1559
|
}
|
|
1560
|
-
return N.insert = 0, Z ===
|
|
1560
|
+
return N.insert = 0, Z === w ? (z(N, !0), N.strm.avail_out === 0 ? et : $) : N.last_lit && (z(N, !1), N.strm.avail_out === 0) ? l : L;
|
|
1561
1561
|
})(g, O) : a[g.level].func(g, O);
|
|
1562
1562
|
if (U !== et && U !== $ || (g.status = 666), U === l || U === et) return s.avail_out === 0 && (g.last_flush = -1), d;
|
|
1563
1563
|
if (U === L && (O === 1 ? i._tr_align(g) : O !== 5 && (i._tr_stored_block(g, 0, 0, !1), O === 3 && (tt(g.head), g.lookahead === 0 && (g.strstart = 0, g.block_start = 0, g.insert = 0))), M(s), s.avail_out === 0)) return g.last_flush = -1, d;
|
|
1564
1564
|
}
|
|
1565
|
-
return O !==
|
|
1565
|
+
return O !== w ? d : g.wrap <= 0 ? 1 : (g.wrap === 2 ? (J(g, 255 & s.adler), J(g, s.adler >> 8 & 255), J(g, s.adler >> 16 & 255), J(g, s.adler >> 24 & 255), J(g, 255 & s.total_in), J(g, s.total_in >> 8 & 255), J(g, s.total_in >> 16 & 255), J(g, s.total_in >> 24 & 255)) : (q(g, s.adler >>> 16), q(g, 65535 & s.adler)), M(s), 0 < g.wrap && (g.wrap = -g.wrap), g.pending !== 0 ? d : 1);
|
|
1566
1566
|
}, n.deflateEnd = function(s) {
|
|
1567
1567
|
var O;
|
|
1568
|
-
return s && s.state ? (O = s.state.status) !== S && O !== 69 && O !== 73 && O !== 91 && O !== 103 && O !== I && O !== 666 ? rt(s,
|
|
1568
|
+
return s && s.state ? (O = s.state.status) !== S && O !== 69 && O !== 73 && O !== 91 && O !== 103 && O !== I && O !== 666 ? rt(s, k) : (s.state = null, O === I ? rt(s, -3) : d) : k;
|
|
1569
1569
|
}, n.deflateSetDictionary = function(s, O) {
|
|
1570
1570
|
var R, g, p, E, j, U, N, Z, K = O.length;
|
|
1571
|
-
if (!s || !s.state || (E = (R = s.state).wrap) === 2 || E === 1 && R.status !== S || R.lookahead) return
|
|
1571
|
+
if (!s || !s.state || (E = (R = s.state).wrap) === 2 || E === 1 && R.status !== S || R.lookahead) return k;
|
|
1572
1572
|
for (E === 1 && (s.adler = h(s.adler, O, K, 0)), R.wrap = 0, K >= R.w_size && (E === 0 && (tt(R.head), R.strstart = 0, R.block_start = 0, R.insert = 0), Z = new o.Buf8(R.w_size), o.arraySet(Z, O, K - R.w_size, R.w_size, 0), O = Z, K = R.w_size), j = s.avail_in, U = s.next_in, N = s.input, s.avail_in = K, s.next_in = 0, s.input = O, ct(R); R.lookahead >= T; ) {
|
|
1573
1573
|
for (g = R.strstart, p = R.lookahead - (T - 1); R.ins_h = (R.ins_h << R.hash_shift ^ R.window[g + T - 1]) & R.hash_mask, R.prev[g & R.w_mask] = R.head[R.ins_h], R.head[R.ins_h] = g, g++, --p; ) ;
|
|
1574
1574
|
R.strstart = g, R.lookahead = T - 1, ct(R);
|
|
@@ -1581,16 +1581,16 @@ function we() {
|
|
|
1581
1581
|
};
|
|
1582
1582
|
}, {}], 48: [function(t, r, n) {
|
|
1583
1583
|
r.exports = function(a, o) {
|
|
1584
|
-
var i, h,
|
|
1585
|
-
i = a.state, h = a.next_in, l = a.input,
|
|
1584
|
+
var i, h, b, y, _, w, d, k, u, m, f, v, x, A, P, D, F, W, T, V, Q, S, I, l, L;
|
|
1585
|
+
i = a.state, h = a.next_in, l = a.input, b = h + (a.avail_in - 5), y = a.next_out, L = a.output, _ = y - (o - a.avail_out), w = y + (a.avail_out - 257), d = i.dmax, k = i.wsize, u = i.whave, m = i.wnext, f = i.window, v = i.hold, x = i.bits, A = i.lencode, P = i.distcode, D = (1 << i.lenbits) - 1, F = (1 << i.distbits) - 1;
|
|
1586
1586
|
t: do {
|
|
1587
|
-
x < 15 && (
|
|
1587
|
+
x < 15 && (v += l[h++] << x, x += 8, v += l[h++] << x, x += 8), W = A[v & D];
|
|
1588
1588
|
e: for (; ; ) {
|
|
1589
|
-
if (
|
|
1589
|
+
if (v >>>= T = W >>> 24, x -= T, (T = W >>> 16 & 255) === 0) L[y++] = 65535 & W;
|
|
1590
1590
|
else {
|
|
1591
1591
|
if (!(16 & T)) {
|
|
1592
1592
|
if ((64 & T) == 0) {
|
|
1593
|
-
W = A[(65535 & W) + (
|
|
1593
|
+
W = A[(65535 & W) + (v & (1 << T) - 1)];
|
|
1594
1594
|
continue e;
|
|
1595
1595
|
}
|
|
1596
1596
|
if (32 & T) {
|
|
@@ -1600,67 +1600,67 @@ function we() {
|
|
|
1600
1600
|
a.msg = "invalid literal/length code", i.mode = 30;
|
|
1601
1601
|
break t;
|
|
1602
1602
|
}
|
|
1603
|
-
V = 65535 & W, (T &= 15) && (x < T && (
|
|
1603
|
+
V = 65535 & W, (T &= 15) && (x < T && (v += l[h++] << x, x += 8), V += v & (1 << T) - 1, v >>>= T, x -= T), x < 15 && (v += l[h++] << x, x += 8, v += l[h++] << x, x += 8), W = P[v & F];
|
|
1604
1604
|
r: for (; ; ) {
|
|
1605
|
-
if (
|
|
1605
|
+
if (v >>>= T = W >>> 24, x -= T, !(16 & (T = W >>> 16 & 255))) {
|
|
1606
1606
|
if ((64 & T) == 0) {
|
|
1607
|
-
W = P[(65535 & W) + (
|
|
1607
|
+
W = P[(65535 & W) + (v & (1 << T) - 1)];
|
|
1608
1608
|
continue r;
|
|
1609
1609
|
}
|
|
1610
1610
|
a.msg = "invalid distance code", i.mode = 30;
|
|
1611
1611
|
break t;
|
|
1612
1612
|
}
|
|
1613
|
-
if (Q = 65535 & W, x < (T &= 15) && (
|
|
1613
|
+
if (Q = 65535 & W, x < (T &= 15) && (v += l[h++] << x, (x += 8) < T && (v += l[h++] << x, x += 8)), d < (Q += v & (1 << T) - 1)) {
|
|
1614
1614
|
a.msg = "invalid distance too far back", i.mode = 30;
|
|
1615
1615
|
break t;
|
|
1616
1616
|
}
|
|
1617
|
-
if (
|
|
1617
|
+
if (v >>>= T, x -= T, (T = y - _) < Q) {
|
|
1618
1618
|
if (u < (T = Q - T) && i.sane) {
|
|
1619
1619
|
a.msg = "invalid distance too far back", i.mode = 30;
|
|
1620
1620
|
break t;
|
|
1621
1621
|
}
|
|
1622
1622
|
if (I = f, (S = 0) === m) {
|
|
1623
|
-
if (S +=
|
|
1624
|
-
for (V -= T; L[
|
|
1625
|
-
S =
|
|
1623
|
+
if (S += k - T, T < V) {
|
|
1624
|
+
for (V -= T; L[y++] = f[S++], --T; ) ;
|
|
1625
|
+
S = y - Q, I = L;
|
|
1626
1626
|
}
|
|
1627
1627
|
} else if (m < T) {
|
|
1628
|
-
if (S +=
|
|
1629
|
-
for (V -= T; L[
|
|
1628
|
+
if (S += k + m - T, (T -= m) < V) {
|
|
1629
|
+
for (V -= T; L[y++] = f[S++], --T; ) ;
|
|
1630
1630
|
if (S = 0, m < V) {
|
|
1631
|
-
for (V -= T = m; L[
|
|
1632
|
-
S =
|
|
1631
|
+
for (V -= T = m; L[y++] = f[S++], --T; ) ;
|
|
1632
|
+
S = y - Q, I = L;
|
|
1633
1633
|
}
|
|
1634
1634
|
}
|
|
1635
1635
|
} else if (S += m - T, T < V) {
|
|
1636
|
-
for (V -= T; L[
|
|
1637
|
-
S =
|
|
1636
|
+
for (V -= T; L[y++] = f[S++], --T; ) ;
|
|
1637
|
+
S = y - Q, I = L;
|
|
1638
1638
|
}
|
|
1639
|
-
for (; 2 < V; ) L[
|
|
1640
|
-
V && (L[
|
|
1639
|
+
for (; 2 < V; ) L[y++] = I[S++], L[y++] = I[S++], L[y++] = I[S++], V -= 3;
|
|
1640
|
+
V && (L[y++] = I[S++], 1 < V && (L[y++] = I[S++]));
|
|
1641
1641
|
} else {
|
|
1642
|
-
for (S =
|
|
1643
|
-
V && (L[
|
|
1642
|
+
for (S = y - Q; L[y++] = L[S++], L[y++] = L[S++], L[y++] = L[S++], 2 < (V -= 3); ) ;
|
|
1643
|
+
V && (L[y++] = L[S++], 1 < V && (L[y++] = L[S++]));
|
|
1644
1644
|
}
|
|
1645
1645
|
break;
|
|
1646
1646
|
}
|
|
1647
1647
|
}
|
|
1648
1648
|
break;
|
|
1649
1649
|
}
|
|
1650
|
-
} while (h <
|
|
1651
|
-
h -= V = x >> 3,
|
|
1650
|
+
} while (h < b && y < w);
|
|
1651
|
+
h -= V = x >> 3, v &= (1 << (x -= V << 3)) - 1, a.next_in = h, a.next_out = y, a.avail_in = h < b ? b - h + 5 : 5 - (h - b), a.avail_out = y < w ? w - y + 257 : 257 - (y - w), i.hold = v, i.bits = x;
|
|
1652
1652
|
};
|
|
1653
1653
|
}, {}], 49: [function(t, r, n) {
|
|
1654
|
-
var a = t("../utils/common"), o = t("./adler32"), i = t("./crc32"), h = t("./inffast"),
|
|
1654
|
+
var a = t("../utils/common"), o = t("./adler32"), i = t("./crc32"), h = t("./inffast"), b = t("./inftrees"), y = 1, _ = 2, w = 0, d = -2, k = 1, u = 852, m = 592;
|
|
1655
1655
|
function f(S) {
|
|
1656
1656
|
return (S >>> 24 & 255) + (S >>> 8 & 65280) + ((65280 & S) << 8) + ((255 & S) << 24);
|
|
1657
1657
|
}
|
|
1658
|
-
function
|
|
1658
|
+
function v() {
|
|
1659
1659
|
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 a.Buf16(320), this.work = new a.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
1660
1660
|
}
|
|
1661
1661
|
function x(S) {
|
|
1662
1662
|
var I;
|
|
1663
|
-
return S && S.state ? (I = S.state, S.total_in = S.total_out = I.total = 0, S.msg = "", I.wrap && (S.adler = 1 & I.wrap), I.mode =
|
|
1663
|
+
return S && S.state ? (I = S.state, S.total_in = S.total_out = I.total = 0, S.msg = "", I.wrap && (S.adler = 1 & I.wrap), I.mode = k, I.last = 0, I.havedict = 0, I.dmax = 32768, I.head = null, I.hold = 0, I.bits = 0, I.lencode = I.lendyn = new a.Buf32(u), I.distcode = I.distdyn = new a.Buf32(m), I.sane = 1, I.back = -1, w) : d;
|
|
1664
1664
|
}
|
|
1665
1665
|
function A(S) {
|
|
1666
1666
|
var I;
|
|
@@ -1672,7 +1672,7 @@ function we() {
|
|
|
1672
1672
|
}
|
|
1673
1673
|
function D(S, I) {
|
|
1674
1674
|
var l, L;
|
|
1675
|
-
return S ? (L = new
|
|
1675
|
+
return S ? (L = new v(), (S.state = L).window = null, (l = P(S, I)) !== w && (S.state = null), l) : d;
|
|
1676
1676
|
}
|
|
1677
1677
|
var F, W, T = !0;
|
|
1678
1678
|
function V(S) {
|
|
@@ -1682,8 +1682,8 @@ function we() {
|
|
|
1682
1682
|
for (; I < 256; ) S.lens[I++] = 9;
|
|
1683
1683
|
for (; I < 280; ) S.lens[I++] = 7;
|
|
1684
1684
|
for (; I < 288; ) S.lens[I++] = 8;
|
|
1685
|
-
for (y
|
|
1686
|
-
|
|
1685
|
+
for (b(y, S.lens, 0, 288, F, 0, S.work, { bits: 9 }), I = 0; I < 32; ) S.lens[I++] = 5;
|
|
1686
|
+
b(_, S.lens, 0, 32, W, 0, S.work, { bits: 5 }), T = !1;
|
|
1687
1687
|
}
|
|
1688
1688
|
S.lencode = F, S.lenbits = 9, S.distcode = W, S.distbits = 5;
|
|
1689
1689
|
}
|
|
@@ -1696,9 +1696,9 @@ function we() {
|
|
|
1696
1696
|
}, n.inflateInit2 = D, n.inflate = function(S, I) {
|
|
1697
1697
|
var l, L, et, $, rt, H, tt, M, z, J, q, X, ct, mt, at, it, pt, ht, kt, vt, s, O, R, g, p = 0, E = new a.Buf8(4), j = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
1698
1698
|
if (!S || !S.state || !S.output || !S.input && S.avail_in !== 0) return d;
|
|
1699
|
-
(l = S.state).mode === 12 && (l.mode = 13), rt = S.next_out, et = S.output, tt = S.avail_out, $ = S.next_in, L = S.input, H = S.avail_in, M = l.hold, z = l.bits, J = H, q = tt, O =
|
|
1699
|
+
(l = S.state).mode === 12 && (l.mode = 13), rt = S.next_out, et = S.output, tt = S.avail_out, $ = S.next_in, L = S.input, H = S.avail_in, M = l.hold, z = l.bits, J = H, q = tt, O = w;
|
|
1700
1700
|
t: for (; ; ) switch (l.mode) {
|
|
1701
|
-
case
|
|
1701
|
+
case k:
|
|
1702
1702
|
if (l.wrap === 0) {
|
|
1703
1703
|
l.mode = 13;
|
|
1704
1704
|
break;
|
|
@@ -1867,7 +1867,7 @@ function we() {
|
|
|
1867
1867
|
l.lens[j[l.have++]] = 7 & M, M >>>= 3, z -= 3;
|
|
1868
1868
|
}
|
|
1869
1869
|
for (; l.have < 19; ) l.lens[j[l.have++]] = 0;
|
|
1870
|
-
if (l.lencode = l.lendyn, l.lenbits = 7, R = { bits: l.lenbits }, O =
|
|
1870
|
+
if (l.lencode = l.lendyn, l.lenbits = 7, R = { bits: l.lenbits }, O = b(0, l.lens, 0, 19, l.lencode, 0, l.work, R), l.lenbits = R.bits, O) {
|
|
1871
1871
|
S.msg = "invalid code lengths set", l.mode = 30;
|
|
1872
1872
|
break;
|
|
1873
1873
|
}
|
|
@@ -1915,11 +1915,11 @@ function we() {
|
|
|
1915
1915
|
S.msg = "invalid code -- missing end-of-block", l.mode = 30;
|
|
1916
1916
|
break;
|
|
1917
1917
|
}
|
|
1918
|
-
if (l.lenbits = 9, R = { bits: l.lenbits }, O = y
|
|
1918
|
+
if (l.lenbits = 9, R = { bits: l.lenbits }, O = b(y, l.lens, 0, l.nlen, l.lencode, 0, l.work, R), l.lenbits = R.bits, O) {
|
|
1919
1919
|
S.msg = "invalid literal/lengths set", l.mode = 30;
|
|
1920
1920
|
break;
|
|
1921
1921
|
}
|
|
1922
|
-
if (l.distbits = 6, l.distcode = l.distdyn, R = { bits: l.distbits }, O =
|
|
1922
|
+
if (l.distbits = 6, l.distcode = l.distdyn, R = { bits: l.distbits }, O = b(_, l.lens, l.nlen, l.ndist, l.distcode, 0, l.work, R), l.distbits = R.bits, O) {
|
|
1923
1923
|
S.msg = "invalid distances set", l.mode = 30;
|
|
1924
1924
|
break;
|
|
1925
1925
|
}
|
|
@@ -2048,46 +2048,46 @@ function we() {
|
|
|
2048
2048
|
default:
|
|
2049
2049
|
return d;
|
|
2050
2050
|
}
|
|
2051
|
-
return S.next_out = rt, S.avail_out = tt, S.next_in = $, S.avail_in = H, l.hold = M, l.bits = z, (l.wsize || q !== S.avail_out && l.mode < 30 && (l.mode < 27 || I !== 4)) && Q(S, S.output, S.next_out, q - S.avail_out) ? (l.mode = 31, -4) : (J -= S.avail_in, q -= S.avail_out, S.total_in += J, S.total_out += q, l.total += q, l.wrap && q && (S.adler = l.check = l.flags ? i(l.check, et, q, S.next_out - q) : o(l.check, et, q, S.next_out - q)), S.data_type = l.bits + (l.last ? 64 : 0) + (l.mode === 12 ? 128 : 0) + (l.mode === 20 || l.mode === 15 ? 256 : 0), (J == 0 && q === 0 || I === 4) && O ===
|
|
2051
|
+
return S.next_out = rt, S.avail_out = tt, S.next_in = $, S.avail_in = H, l.hold = M, l.bits = z, (l.wsize || q !== S.avail_out && l.mode < 30 && (l.mode < 27 || I !== 4)) && Q(S, S.output, S.next_out, q - S.avail_out) ? (l.mode = 31, -4) : (J -= S.avail_in, q -= S.avail_out, S.total_in += J, S.total_out += q, l.total += q, l.wrap && q && (S.adler = l.check = l.flags ? i(l.check, et, q, S.next_out - q) : o(l.check, et, q, S.next_out - q)), S.data_type = l.bits + (l.last ? 64 : 0) + (l.mode === 12 ? 128 : 0) + (l.mode === 20 || l.mode === 15 ? 256 : 0), (J == 0 && q === 0 || I === 4) && O === w && (O = -5), O);
|
|
2052
2052
|
}, n.inflateEnd = function(S) {
|
|
2053
2053
|
if (!S || !S.state) return d;
|
|
2054
2054
|
var I = S.state;
|
|
2055
|
-
return I.window && (I.window = null), S.state = null,
|
|
2055
|
+
return I.window && (I.window = null), S.state = null, w;
|
|
2056
2056
|
}, n.inflateGetHeader = function(S, I) {
|
|
2057
2057
|
var l;
|
|
2058
|
-
return S && S.state ? (2 & (l = S.state).wrap) == 0 ? d : ((l.head = I).done = !1,
|
|
2058
|
+
return S && S.state ? (2 & (l = S.state).wrap) == 0 ? d : ((l.head = I).done = !1, w) : d;
|
|
2059
2059
|
}, n.inflateSetDictionary = function(S, I) {
|
|
2060
2060
|
var l, L = I.length;
|
|
2061
|
-
return S && S.state ? (l = S.state).wrap !== 0 && l.mode !== 11 ? d : l.mode === 11 && o(1, I, L, 0) !== l.check ? -3 : Q(S, I, L, L) ? (l.mode = 31, -4) : (l.havedict = 1,
|
|
2061
|
+
return S && S.state ? (l = S.state).wrap !== 0 && l.mode !== 11 ? d : l.mode === 11 && o(1, I, L, 0) !== l.check ? -3 : Q(S, I, L, L) ? (l.mode = 31, -4) : (l.havedict = 1, w) : d;
|
|
2062
2062
|
}, n.inflateInfo = "pako inflate (from Nodeca project)";
|
|
2063
2063
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(t, r, n) {
|
|
2064
|
-
var a = t("../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], h = [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],
|
|
2065
|
-
r.exports = function(
|
|
2066
|
-
var
|
|
2064
|
+
var a = t("../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], h = [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], b = [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];
|
|
2065
|
+
r.exports = function(y, _, w, d, k, u, m, f) {
|
|
2066
|
+
var v, x, A, P, D, F, W, T, V, Q = f.bits, S = 0, I = 0, l = 0, L = 0, et = 0, $ = 0, rt = 0, H = 0, tt = 0, M = 0, z = null, J = 0, q = new a.Buf16(16), X = new a.Buf16(16), ct = null, mt = 0;
|
|
2067
2067
|
for (S = 0; S <= 15; S++) q[S] = 0;
|
|
2068
|
-
for (I = 0; I < d; I++) q[_[
|
|
2068
|
+
for (I = 0; I < d; I++) q[_[w + I]]++;
|
|
2069
2069
|
for (et = Q, L = 15; 1 <= L && q[L] === 0; L--) ;
|
|
2070
|
-
if (L < et && (et = L), L === 0) return
|
|
2070
|
+
if (L < et && (et = L), L === 0) return k[u++] = 20971520, k[u++] = 20971520, f.bits = 1, 0;
|
|
2071
2071
|
for (l = 1; l < L && q[l] === 0; l++) ;
|
|
2072
2072
|
for (et < l && (et = l), S = H = 1; S <= 15; S++) if (H <<= 1, (H -= q[S]) < 0) return -1;
|
|
2073
|
-
if (0 < H && (
|
|
2073
|
+
if (0 < H && (y === 0 || L !== 1)) return -1;
|
|
2074
2074
|
for (X[1] = 0, S = 1; S < 15; S++) X[S + 1] = X[S] + q[S];
|
|
2075
|
-
for (I = 0; I < d; I++) _[
|
|
2076
|
-
if (F =
|
|
2075
|
+
for (I = 0; I < d; I++) _[w + I] !== 0 && (m[X[_[w + I]]++] = I);
|
|
2076
|
+
if (F = y === 0 ? (z = ct = m, 19) : y === 1 ? (z = o, J -= 257, ct = i, mt -= 257, 256) : (z = h, ct = b, -1), S = l, D = u, rt = I = M = 0, A = -1, P = (tt = 1 << ($ = et)) - 1, y === 1 && 852 < tt || y === 2 && 592 < tt) return 1;
|
|
2077
2077
|
for (; ; ) {
|
|
2078
|
-
for (W = S - rt, V = m[I] < F ? (T = 0, m[I]) : m[I] > F ? (T = ct[mt + m[I]], z[J + m[I]]) : (T = 96, 0),
|
|
2079
|
-
for (
|
|
2080
|
-
if (
|
|
2078
|
+
for (W = S - rt, V = m[I] < F ? (T = 0, m[I]) : m[I] > F ? (T = ct[mt + m[I]], z[J + m[I]]) : (T = 96, 0), v = 1 << S - rt, l = x = 1 << $; k[D + (M >> rt) + (x -= v)] = W << 24 | T << 16 | V | 0, x !== 0; ) ;
|
|
2079
|
+
for (v = 1 << S - 1; M & v; ) v >>= 1;
|
|
2080
|
+
if (v !== 0 ? (M &= v - 1, M += v) : M = 0, I++, --q[S] == 0) {
|
|
2081
2081
|
if (S === L) break;
|
|
2082
|
-
S = _[
|
|
2082
|
+
S = _[w + m[I]];
|
|
2083
2083
|
}
|
|
2084
2084
|
if (et < S && (M & P) !== A) {
|
|
2085
2085
|
for (rt === 0 && (rt = et), D += l, H = 1 << ($ = S - rt); $ + rt < L && !((H -= q[$ + rt]) <= 0); ) $++, H <<= 1;
|
|
2086
|
-
if (tt += 1 << $,
|
|
2087
|
-
|
|
2086
|
+
if (tt += 1 << $, y === 1 && 852 < tt || y === 2 && 592 < tt) return 1;
|
|
2087
|
+
k[A = M & P] = et << 24 | $ << 16 | D - u | 0;
|
|
2088
2088
|
}
|
|
2089
2089
|
}
|
|
2090
|
-
return M !== 0 && (
|
|
2090
|
+
return M !== 0 && (k[D + M] = S - rt << 24 | 64 << 16 | 0), f.bits = et, 0;
|
|
2091
2091
|
};
|
|
2092
2092
|
}, { "../utils/common": 41 }], 51: [function(t, r, n) {
|
|
2093
2093
|
r.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" };
|
|
@@ -2096,7 +2096,7 @@ function we() {
|
|
|
2096
2096
|
function h(p) {
|
|
2097
2097
|
for (var E = p.length; 0 <= --E; ) p[E] = 0;
|
|
2098
2098
|
}
|
|
2099
|
-
var
|
|
2099
|
+
var b = 0, y = 29, _ = 256, w = _ + 1 + y, d = 30, k = 19, u = 2 * w + 1, m = 15, f = 16, v = 7, x = 256, A = 16, P = 17, D = 18, F = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], W = [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], T = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], V = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], Q = new Array(2 * (w + 2));
|
|
2100
2100
|
h(Q);
|
|
2101
2101
|
var S = new Array(2 * d);
|
|
2102
2102
|
h(S);
|
|
@@ -2104,7 +2104,7 @@ function we() {
|
|
|
2104
2104
|
h(I);
|
|
2105
2105
|
var l = new Array(256);
|
|
2106
2106
|
h(l);
|
|
2107
|
-
var L = new Array(
|
|
2107
|
+
var L = new Array(y);
|
|
2108
2108
|
h(L);
|
|
2109
2109
|
var et, $, rt, H = new Array(d);
|
|
2110
2110
|
function tt(p, E, j, U, N) {
|
|
@@ -2139,9 +2139,9 @@ function we() {
|
|
|
2139
2139
|
}
|
|
2140
2140
|
function at(p) {
|
|
2141
2141
|
var E;
|
|
2142
|
-
for (E = 0; E <
|
|
2142
|
+
for (E = 0; E < w; E++) p.dyn_ltree[2 * E] = 0;
|
|
2143
2143
|
for (E = 0; E < d; E++) p.dyn_dtree[2 * E] = 0;
|
|
2144
|
-
for (E = 0; E <
|
|
2144
|
+
for (E = 0; E < k; E++) p.bl_tree[2 * E] = 0;
|
|
2145
2145
|
p.dyn_ltree[2 * x] = 1, p.opt_len = p.static_len = 0, p.last_lit = p.matches = 0;
|
|
2146
2146
|
}
|
|
2147
2147
|
function it(p) {
|
|
@@ -2194,14 +2194,14 @@ function we() {
|
|
|
2194
2194
|
h(H);
|
|
2195
2195
|
var R = !1;
|
|
2196
2196
|
function g(p, E, j, U) {
|
|
2197
|
-
q(p, (
|
|
2197
|
+
q(p, (b << 1) + (U ? 1 : 0), 3), (function(N, Z, K, G) {
|
|
2198
2198
|
it(N), J(N, K), J(N, ~K), a.arraySet(N.pending_buf, N.window, Z, K, N.pending), N.pending += K;
|
|
2199
2199
|
})(p, E, j);
|
|
2200
2200
|
}
|
|
2201
2201
|
n._tr_init = function(p) {
|
|
2202
2202
|
R || ((function() {
|
|
2203
2203
|
var E, j, U, N, Z, K = new Array(m + 1);
|
|
2204
|
-
for (N = U = 0; N <
|
|
2204
|
+
for (N = U = 0; N < y - 1; N++) for (L[N] = U, E = 0; E < 1 << F[N]; E++) l[U++] = N;
|
|
2205
2205
|
for (l[U - 1] = N, N = Z = 0; N < 16; N++) for (H[N] = Z, E = 0; E < 1 << W[N]; E++) I[Z++] = N;
|
|
2206
2206
|
for (Z >>= 7; N < d; N++) for (H[N] = Z << 7, E = 0; E < 1 << W[N] - 7; E++) I[256 + Z++] = N;
|
|
2207
2207
|
for (j = 0; j <= m; j++) K[j] = 0;
|
|
@@ -2209,8 +2209,8 @@ function we() {
|
|
|
2209
2209
|
for (; E <= 255; ) Q[2 * E + 1] = 9, E++, K[9]++;
|
|
2210
2210
|
for (; E <= 279; ) Q[2 * E + 1] = 7, E++, K[7]++;
|
|
2211
2211
|
for (; E <= 287; ) Q[2 * E + 1] = 8, E++, K[8]++;
|
|
2212
|
-
for (mt(Q,
|
|
2213
|
-
et = new tt(Q, F, _ + 1,
|
|
2212
|
+
for (mt(Q, w + 1, K), E = 0; E < d; E++) S[2 * E + 1] = 5, S[2 * E] = ct(E, 5);
|
|
2213
|
+
et = new tt(Q, F, _ + 1, w, m), $ = new tt(S, W, 0, d, m), rt = new tt(new Array(0), T, 0, k, v);
|
|
2214
2214
|
})(), R = !0), p.l_desc = new M(p.dyn_ltree, et), p.d_desc = new M(p.dyn_dtree, $), p.bl_desc = new M(p.bl_tree, rt), p.bi_buf = 0, p.bi_valid = 0, at(p);
|
|
2215
2215
|
}, n._tr_stored_block = g, n._tr_flush_block = function(p, E, j, U) {
|
|
2216
2216
|
var N, Z, K = 0;
|
|
@@ -2222,7 +2222,7 @@ function we() {
|
|
|
2222
2222
|
return o;
|
|
2223
2223
|
})(p)), vt(p, p.l_desc), vt(p, p.d_desc), K = (function(G) {
|
|
2224
2224
|
var Y;
|
|
2225
|
-
for (s(G, G.dyn_ltree, G.l_desc.max_code), s(G, G.dyn_dtree, G.d_desc.max_code), vt(G, G.bl_desc), Y =
|
|
2225
|
+
for (s(G, G.dyn_ltree, G.l_desc.max_code), s(G, G.dyn_dtree, G.d_desc.max_code), vt(G, G.bl_desc), Y = k - 1; 3 <= Y && G.bl_tree[2 * V[Y] + 1] === 0; Y--) ;
|
|
2226
2226
|
return G.opt_len += 3 * (Y + 1) + 5 + 5 + 4, Y;
|
|
2227
2227
|
})(p), N = p.opt_len + 3 + 7 >>> 3, (Z = p.static_len + 3 + 7 >>> 3) <= N && (N = Z)) : N = Z = j + 5, j + 4 <= N && E !== -1 ? g(p, E, j, U) : p.strategy === 4 || Z === N ? (q(p, 2 + (U ? 1 : 0), 3), kt(p, Q, S)) : (q(p, 4 + (U ? 1 : 0), 3), (function(G, Y, lt, st) {
|
|
2228
2228
|
var bt;
|
|
@@ -2244,10 +2244,10 @@ function we() {
|
|
|
2244
2244
|
(function(a) {
|
|
2245
2245
|
(function(o, i) {
|
|
2246
2246
|
if (!o.setImmediate) {
|
|
2247
|
-
var h,
|
|
2247
|
+
var h, b, y, _, w = 1, d = {}, k = !1, u = o.document, m = Object.getPrototypeOf && Object.getPrototypeOf(o);
|
|
2248
2248
|
m = m && m.setTimeout ? m : o, h = {}.toString.call(o.process) === "[object process]" ? function(A) {
|
|
2249
2249
|
process.nextTick(function() {
|
|
2250
|
-
|
|
2250
|
+
v(A);
|
|
2251
2251
|
});
|
|
2252
2252
|
} : (function() {
|
|
2253
2253
|
if (o.postMessage && !o.importScripts) {
|
|
@@ -2258,33 +2258,33 @@ function we() {
|
|
|
2258
2258
|
}
|
|
2259
2259
|
})() ? (_ = "setImmediate$" + Math.random() + "$", o.addEventListener ? o.addEventListener("message", x, !1) : o.attachEvent("onmessage", x), function(A) {
|
|
2260
2260
|
o.postMessage(_ + A, "*");
|
|
2261
|
-
}) : o.MessageChannel ? ((
|
|
2262
|
-
|
|
2261
|
+
}) : o.MessageChannel ? ((y = new MessageChannel()).port1.onmessage = function(A) {
|
|
2262
|
+
v(A.data);
|
|
2263
2263
|
}, function(A) {
|
|
2264
|
-
|
|
2265
|
-
}) : u && "onreadystatechange" in u.createElement("script") ? (
|
|
2264
|
+
y.port2.postMessage(A);
|
|
2265
|
+
}) : u && "onreadystatechange" in u.createElement("script") ? (b = u.documentElement, function(A) {
|
|
2266
2266
|
var P = u.createElement("script");
|
|
2267
2267
|
P.onreadystatechange = function() {
|
|
2268
|
-
|
|
2269
|
-
},
|
|
2268
|
+
v(A), P.onreadystatechange = null, b.removeChild(P), P = null;
|
|
2269
|
+
}, b.appendChild(P);
|
|
2270
2270
|
}) : function(A) {
|
|
2271
|
-
setTimeout(
|
|
2271
|
+
setTimeout(v, 0, A);
|
|
2272
2272
|
}, m.setImmediate = function(A) {
|
|
2273
2273
|
typeof A != "function" && (A = new Function("" + A));
|
|
2274
2274
|
for (var P = new Array(arguments.length - 1), D = 0; D < P.length; D++) P[D] = arguments[D + 1];
|
|
2275
2275
|
var F = { callback: A, args: P };
|
|
2276
|
-
return d[
|
|
2276
|
+
return d[w] = F, h(w), w++;
|
|
2277
2277
|
}, m.clearImmediate = f;
|
|
2278
2278
|
}
|
|
2279
2279
|
function f(A) {
|
|
2280
2280
|
delete d[A];
|
|
2281
2281
|
}
|
|
2282
|
-
function
|
|
2283
|
-
if (
|
|
2282
|
+
function v(A) {
|
|
2283
|
+
if (k) setTimeout(v, 0, A);
|
|
2284
2284
|
else {
|
|
2285
2285
|
var P = d[A];
|
|
2286
2286
|
if (P) {
|
|
2287
|
-
|
|
2287
|
+
k = !0;
|
|
2288
2288
|
try {
|
|
2289
2289
|
(function(D) {
|
|
2290
2290
|
var F = D.callback, W = D.args;
|
|
@@ -2306,16 +2306,16 @@ function we() {
|
|
|
2306
2306
|
}
|
|
2307
2307
|
})(P);
|
|
2308
2308
|
} finally {
|
|
2309
|
-
f(A),
|
|
2309
|
+
f(A), k = !1;
|
|
2310
2310
|
}
|
|
2311
2311
|
}
|
|
2312
2312
|
}
|
|
2313
2313
|
}
|
|
2314
2314
|
function x(A) {
|
|
2315
|
-
A.source === o && typeof A.data == "string" && A.data.indexOf(_) === 0 &&
|
|
2315
|
+
A.source === o && typeof A.data == "string" && A.data.indexOf(_) === 0 && v(+A.data.slice(_.length));
|
|
2316
2316
|
}
|
|
2317
|
-
})(typeof self
|
|
2318
|
-
}).call(this, typeof Mt
|
|
2317
|
+
})(typeof self == "undefined" ? a === void 0 ? this : a : self);
|
|
2318
|
+
}).call(this, typeof Mt != "undefined" ? Mt : typeof self != "undefined" ? self : typeof window != "undefined" ? window : {});
|
|
2319
2319
|
}, {}] }, {}, [10])(10);
|
|
2320
2320
|
});
|
|
2321
2321
|
})(Lt)), Lt.exports;
|
|
@@ -2354,7 +2354,7 @@ function jt(c, e) {
|
|
|
2354
2354
|
try {
|
|
2355
2355
|
const t = "http://docx/";
|
|
2356
2356
|
return new URL(c, t + e).toString().substring(t.length);
|
|
2357
|
-
} catch {
|
|
2357
|
+
} catch (t) {
|
|
2358
2358
|
return `${e}${c}`;
|
|
2359
2359
|
}
|
|
2360
2360
|
}
|
|
@@ -2374,16 +2374,17 @@ function Ae(c) {
|
|
|
2374
2374
|
return typeof c == "string" || c instanceof String;
|
|
2375
2375
|
}
|
|
2376
2376
|
function Ot(c, ...e) {
|
|
2377
|
+
var r;
|
|
2377
2378
|
if (!e.length)
|
|
2378
2379
|
return c;
|
|
2379
2380
|
const t = e.shift();
|
|
2380
2381
|
if (Ut(c) && Ut(t))
|
|
2381
|
-
for (const
|
|
2382
|
-
if (Ut(t[
|
|
2383
|
-
const
|
|
2384
|
-
Ot(
|
|
2382
|
+
for (const n in t)
|
|
2383
|
+
if (Ut(t[n])) {
|
|
2384
|
+
const a = (r = c[n]) != null ? r : c[n] = {};
|
|
2385
|
+
Ot(a, t[n]);
|
|
2385
2386
|
} else
|
|
2386
|
-
c[
|
|
2387
|
+
c[n] = t[n];
|
|
2387
2388
|
return Ot(c, ...e);
|
|
2388
2389
|
}
|
|
2389
2390
|
function At(c) {
|
|
@@ -2573,8 +2574,9 @@ class Ht {
|
|
|
2573
2574
|
this._zip = e, this.options = t, this.xmlParser = new le();
|
|
2574
2575
|
}
|
|
2575
2576
|
get(e) {
|
|
2577
|
+
var r;
|
|
2576
2578
|
const t = je(e);
|
|
2577
|
-
return this._zip.files[t]
|
|
2579
|
+
return (r = this._zip.files[t]) != null ? r : this._zip.files[t.replace(/\//g, "\\")];
|
|
2578
2580
|
}
|
|
2579
2581
|
update(e, t) {
|
|
2580
2582
|
this._zip.file(e, t);
|
|
@@ -2587,8 +2589,8 @@ class Ht {
|
|
|
2587
2589
|
return this._zip.generateAsync({ type: e });
|
|
2588
2590
|
}
|
|
2589
2591
|
load(e, t = "string") {
|
|
2590
|
-
var r;
|
|
2591
|
-
return ((r = this.get(e)) == null ? void 0 : r.async(t))
|
|
2592
|
+
var r, n;
|
|
2593
|
+
return (n = (r = this.get(e)) == null ? void 0 : r.async(t)) != null ? n : Promise.resolve(null);
|
|
2592
2594
|
}
|
|
2593
2595
|
async loadRelationships(e = null) {
|
|
2594
2596
|
let t = "_rels/.rels";
|
|
@@ -2648,47 +2650,48 @@ var Kt;
|
|
|
2648
2650
|
c.Continuous = "continuous", c.NextPage = "nextPage", c.NextColumn = "nextColumn", c.EvenPage = "evenPage", c.OddPage = "oddPage";
|
|
2649
2651
|
})(Kt || (Kt = {}));
|
|
2650
2652
|
function ce(c, e = C) {
|
|
2653
|
+
var r, n;
|
|
2651
2654
|
var t = {};
|
|
2652
|
-
for (let
|
|
2653
|
-
switch (
|
|
2655
|
+
for (let a of e.elements(c))
|
|
2656
|
+
switch (a.localName) {
|
|
2654
2657
|
case "pgSz":
|
|
2655
2658
|
t.pageSize = {
|
|
2656
|
-
width: e.lengthAttr(
|
|
2657
|
-
height: e.lengthAttr(
|
|
2658
|
-
orientation: e.attr(
|
|
2659
|
+
width: e.lengthAttr(a, "w"),
|
|
2660
|
+
height: e.lengthAttr(a, "h"),
|
|
2661
|
+
orientation: e.attr(a, "orient")
|
|
2659
2662
|
};
|
|
2660
2663
|
break;
|
|
2661
2664
|
case "type":
|
|
2662
|
-
t.type = e.attr(
|
|
2665
|
+
t.type = e.attr(a, "val");
|
|
2663
2666
|
break;
|
|
2664
2667
|
case "pgMar":
|
|
2665
2668
|
t.pageMargins = {
|
|
2666
|
-
left: e.lengthAttr(
|
|
2667
|
-
right: e.lengthAttr(
|
|
2668
|
-
top: e.lengthAttr(
|
|
2669
|
-
bottom: e.lengthAttr(
|
|
2670
|
-
header: e.lengthAttr(
|
|
2671
|
-
footer: e.lengthAttr(
|
|
2672
|
-
gutter: e.lengthAttr(
|
|
2669
|
+
left: e.lengthAttr(a, "left"),
|
|
2670
|
+
right: e.lengthAttr(a, "right"),
|
|
2671
|
+
top: e.lengthAttr(a, "top"),
|
|
2672
|
+
bottom: e.lengthAttr(a, "bottom"),
|
|
2673
|
+
header: e.lengthAttr(a, "header"),
|
|
2674
|
+
footer: e.lengthAttr(a, "footer"),
|
|
2675
|
+
gutter: e.lengthAttr(a, "gutter")
|
|
2673
2676
|
};
|
|
2674
2677
|
break;
|
|
2675
2678
|
case "cols":
|
|
2676
|
-
t.columns = We(
|
|
2679
|
+
t.columns = We(a, e);
|
|
2677
2680
|
break;
|
|
2678
2681
|
case "headerReference":
|
|
2679
|
-
(t.headerRefs
|
|
2682
|
+
((r = t.headerRefs) != null ? r : t.headerRefs = []).push(Yt(a, e));
|
|
2680
2683
|
break;
|
|
2681
2684
|
case "footerReference":
|
|
2682
|
-
(t.footerRefs
|
|
2685
|
+
((n = t.footerRefs) != null ? n : t.footerRefs = []).push(Yt(a, e));
|
|
2683
2686
|
break;
|
|
2684
2687
|
case "titlePg":
|
|
2685
|
-
t.titlePage = e.boolAttr(
|
|
2688
|
+
t.titlePage = e.boolAttr(a, "val", !0);
|
|
2686
2689
|
break;
|
|
2687
2690
|
case "pgBorders":
|
|
2688
|
-
t.pageBorders = $e(
|
|
2691
|
+
t.pageBorders = $e(a, e);
|
|
2689
2692
|
break;
|
|
2690
2693
|
case "pgNumType":
|
|
2691
|
-
t.pageNumber = He(
|
|
2694
|
+
t.pageNumber = He(a, e);
|
|
2692
2695
|
break;
|
|
2693
2696
|
}
|
|
2694
2697
|
return t;
|
|
@@ -3012,7 +3015,7 @@ function ir(c, e) {
|
|
|
3012
3015
|
return t;
|
|
3013
3016
|
}
|
|
3014
3017
|
function Nt(c) {
|
|
3015
|
-
if (
|
|
3018
|
+
if (typeof c != "undefined")
|
|
3016
3019
|
return parseInt(c);
|
|
3017
3020
|
}
|
|
3018
3021
|
class or extends gt {
|
|
@@ -3240,7 +3243,8 @@ class Vt {
|
|
|
3240
3243
|
static async load(e, t, r) {
|
|
3241
3244
|
var n = new Vt();
|
|
3242
3245
|
return n._options = r, n._parser = t, n._package = await Ht.load(e, r), n.rels = await n._package.loadRelationships(), await Promise.all(xr.map((a) => {
|
|
3243
|
-
|
|
3246
|
+
var i;
|
|
3247
|
+
const o = (i = n.rels.find((h) => h.type === a.type)) != null ? i : a;
|
|
3244
3248
|
return n.loadRelationshipPart(o.target, o.type);
|
|
3245
3249
|
})), n;
|
|
3246
3250
|
}
|
|
@@ -3310,7 +3314,7 @@ class Vt {
|
|
|
3310
3314
|
return r;
|
|
3311
3315
|
}
|
|
3312
3316
|
async loadDocumentImage(e, t) {
|
|
3313
|
-
const r = await this.loadResource(t
|
|
3317
|
+
const r = await this.loadResource(t != null ? t : this.documentPart, e, "blob");
|
|
3314
3318
|
return this.blobToURL(r);
|
|
3315
3319
|
}
|
|
3316
3320
|
async loadNumberingImage(e) {
|
|
@@ -3322,13 +3326,14 @@ class Vt {
|
|
|
3322
3326
|
return r && this.blobToURL(new Blob([Er(r, t)]));
|
|
3323
3327
|
}
|
|
3324
3328
|
async loadAltChunk(e, t) {
|
|
3325
|
-
return await this.loadResource(t
|
|
3329
|
+
return await this.loadResource(t != null ? t : this.documentPart, e, "string");
|
|
3326
3330
|
}
|
|
3327
3331
|
blobToURL(e) {
|
|
3328
3332
|
return e ? this._options.useBase64URL ? Pe(e) : URL.createObjectURL(e) : null;
|
|
3329
3333
|
}
|
|
3330
3334
|
findPartByRelId(e, t = null) {
|
|
3331
|
-
var
|
|
3335
|
+
var a;
|
|
3336
|
+
var r = ((a = t.rels) != null ? a : this.rels).find((o) => o.id == e);
|
|
3332
3337
|
const n = t ? Ft(t.path)[0] : "";
|
|
3333
3338
|
return r ? this.partsMap[jt(r.target, n)] : null;
|
|
3334
3339
|
}
|
|
@@ -3432,9 +3437,10 @@ function ge(c, e) {
|
|
|
3432
3437
|
return t;
|
|
3433
3438
|
}
|
|
3434
3439
|
function zr(c) {
|
|
3440
|
+
var e;
|
|
3435
3441
|
return {
|
|
3436
3442
|
stroke: C.attr(c, "color"),
|
|
3437
|
-
"stroke-width": C.lengthAttr(c, "weight", ft.Emu)
|
|
3443
|
+
"stroke-width": (e = C.lengthAttr(c, "weight", ft.Emu)) != null ? e : "1px"
|
|
3438
3444
|
};
|
|
3439
3445
|
}
|
|
3440
3446
|
function Br(c) {
|
|
@@ -3803,17 +3809,17 @@ class Or {
|
|
|
3803
3809
|
return r ? t(r) : [];
|
|
3804
3810
|
}
|
|
3805
3811
|
parseInserted(e, t) {
|
|
3806
|
-
var r;
|
|
3812
|
+
var r, n;
|
|
3807
3813
|
return {
|
|
3808
3814
|
type: B.Inserted,
|
|
3809
|
-
children: ((r = t(e)) == null ? void 0 : r.children)
|
|
3815
|
+
children: (n = (r = t(e)) == null ? void 0 : r.children) != null ? n : []
|
|
3810
3816
|
};
|
|
3811
3817
|
}
|
|
3812
3818
|
parseDeleted(e, t) {
|
|
3813
|
-
var r;
|
|
3819
|
+
var r, n;
|
|
3814
3820
|
return {
|
|
3815
3821
|
type: B.Deleted,
|
|
3816
|
-
children: ((r = t(e)) == null ? void 0 : r.children)
|
|
3822
|
+
children: (n = (r = t(e)) == null ? void 0 : r.children) != null ? n : []
|
|
3817
3823
|
};
|
|
3818
3824
|
}
|
|
3819
3825
|
parseAltChunk(e) {
|
|
@@ -4082,6 +4088,7 @@ class Or {
|
|
|
4082
4088
|
}
|
|
4083
4089
|
}
|
|
4084
4090
|
parseDrawingWrapper(e) {
|
|
4091
|
+
var w;
|
|
4085
4092
|
var t = { type: B.Drawing, children: [], cssStyle: {} }, r = e.localName == "anchor";
|
|
4086
4093
|
let n = null, a = C.boolAttr(e, "simplePos");
|
|
4087
4094
|
C.boolAttr(e, "behindDoc");
|
|
@@ -4097,9 +4104,9 @@ class Or {
|
|
|
4097
4104
|
case "positionH":
|
|
4098
4105
|
case "positionV":
|
|
4099
4106
|
if (!a) {
|
|
4100
|
-
let
|
|
4101
|
-
var
|
|
4102
|
-
|
|
4107
|
+
let d = h.localName == "positionH" ? o : i;
|
|
4108
|
+
var b = C.element(h, "align"), y = C.element(h, "posOffset");
|
|
4109
|
+
d.relative = (w = C.attr(h, "relativeFrom")) != null ? w : d.relative, b && (d.align = b.textContent), y && (d.offset = ie(y.textContent, ft.Emu));
|
|
4103
4110
|
}
|
|
4104
4111
|
break;
|
|
4105
4112
|
case "wrapTopAndBottom":
|
|
@@ -4264,12 +4271,13 @@ class Or {
|
|
|
4264
4271
|
}
|
|
4265
4272
|
parseTableCellProperties(e, t) {
|
|
4266
4273
|
t.cssStyle = this.parseDefaultProperties(e, {}, null, (r) => {
|
|
4274
|
+
var n;
|
|
4267
4275
|
switch (r.localName) {
|
|
4268
4276
|
case "gridSpan":
|
|
4269
4277
|
t.span = C.intAttr(r, "val", null);
|
|
4270
4278
|
break;
|
|
4271
4279
|
case "vMerge":
|
|
4272
|
-
t.verticalMerge = C.attr(r, "val")
|
|
4280
|
+
t.verticalMerge = (n = C.attr(r, "val")) != null ? n : "continue";
|
|
4273
4281
|
break;
|
|
4274
4282
|
case "cnfStyle":
|
|
4275
4283
|
t.className = ot.classNameOfCnfStyle(r);
|
|
@@ -4723,22 +4731,22 @@ function jr(c = document.body) {
|
|
|
4723
4731
|
return c.removeChild(e), t;
|
|
4724
4732
|
}
|
|
4725
4733
|
function Ur(c, e, t, r = 72 / 96) {
|
|
4726
|
-
const n = c.closest("p"), a = c.getBoundingClientRect(), o = n.getBoundingClientRect(), i = getComputedStyle(n), h = (e == null ? void 0 : e.length) > 0 ? e.map((
|
|
4727
|
-
pos: ne(
|
|
4728
|
-
leader:
|
|
4729
|
-
style:
|
|
4730
|
-
})).sort((
|
|
4731
|
-
let
|
|
4732
|
-
if (
|
|
4733
|
-
for (;
|
|
4734
|
-
h.push({ ...re, pos:
|
|
4735
|
-
const d = parseFloat(i.marginLeft),
|
|
4734
|
+
const n = c.closest("p"), a = c.getBoundingClientRect(), o = n.getBoundingClientRect(), i = getComputedStyle(n), h = (e == null ? void 0 : e.length) > 0 ? e.map((v) => ({
|
|
4735
|
+
pos: ne(v.position),
|
|
4736
|
+
leader: v.leader,
|
|
4737
|
+
style: v.style
|
|
4738
|
+
})).sort((v, x) => v.pos - x.pos) : [re], b = h[h.length - 1], y = o.width * r, _ = ne(t);
|
|
4739
|
+
let w = b.pos + _;
|
|
4740
|
+
if (w < y)
|
|
4741
|
+
for (; w < y && h.length < Lr; w += _)
|
|
4742
|
+
h.push({ ...re, pos: w });
|
|
4743
|
+
const d = parseFloat(i.marginLeft), k = o.left + d, u = (a.left - k) * r, m = h.find((v) => v.style != "clear" && v.pos > u);
|
|
4736
4744
|
if (m == null)
|
|
4737
4745
|
return;
|
|
4738
4746
|
let f = 1;
|
|
4739
4747
|
if (m.style == "right" || m.style == "center") {
|
|
4740
|
-
const
|
|
4741
|
-
A.setStart(c, 1), x <
|
|
4748
|
+
const v = Array.from(n.querySelectorAll(`.${c.className}`)), x = v.indexOf(c) + 1, A = document.createRange();
|
|
4749
|
+
A.setStart(c, 1), x < v.length ? A.setEndBefore(v[x]) : A.setEndAfter(n);
|
|
4742
4750
|
const P = m.style == "center" ? 0.5 : 1, D = A.getBoundingClientRect(), F = D.left + P * D.width - (o.left - d);
|
|
4743
4751
|
f = m.pos - F * r;
|
|
4744
4752
|
} else
|
|
@@ -4778,8 +4786,8 @@ class $r {
|
|
|
4778
4786
|
n && (n.majorFont && (r["--docx-majorHAnsi-font"] = n.majorFont.latinTypeface), n.minorFont && (r["--docx-minorHAnsi-font"] = n.minorFont.latinTypeface));
|
|
4779
4787
|
const a = (h = e.theme) == null ? void 0 : h.colorScheme;
|
|
4780
4788
|
if (a)
|
|
4781
|
-
for (let [
|
|
4782
|
-
r[`--docx-${
|
|
4789
|
+
for (let [b, y] of Object.entries(a.colors))
|
|
4790
|
+
r[`--docx-${b}-color`] = `#${y}`;
|
|
4783
4791
|
const o = this.styleToString(`.${this.className}`, r);
|
|
4784
4792
|
t.appendChild(this.createStyleElement(o));
|
|
4785
4793
|
}
|
|
@@ -4864,24 +4872,25 @@ class $r {
|
|
|
4864
4872
|
let a = null;
|
|
4865
4873
|
for (let i = 0, h = n.length; i < h; i++) {
|
|
4866
4874
|
this.currentFootnoteIds = [];
|
|
4867
|
-
let
|
|
4868
|
-
const _ = this.createPageElement(this.className,
|
|
4869
|
-
this.renderStyleValues(e.cssStyle, _), this.options.renderHeaders && this.renderHeaderFooter(
|
|
4870
|
-
for (const
|
|
4871
|
-
var o = this.createSectionContent(
|
|
4872
|
-
this.renderElements(
|
|
4875
|
+
let y = n[i][0].sectProps;
|
|
4876
|
+
const _ = this.createPageElement(this.className, y);
|
|
4877
|
+
this.renderStyleValues(e.cssStyle, _), this.options.renderHeaders && this.renderHeaderFooter(y.headerRefs, y, t.length, a != y, _);
|
|
4878
|
+
for (const w of n[i]) {
|
|
4879
|
+
var o = this.createSectionContent(w.sectProps);
|
|
4880
|
+
this.renderElements(w.elements, o), _.appendChild(o), y = w.sectProps;
|
|
4873
4881
|
}
|
|
4874
|
-
this.options.renderFootnotes && this.renderNotes(this.currentFootnoteIds, this.footnoteMap, _), this.options.renderEndnotes && i == h - 1 && this.renderNotes(this.currentEndnoteIds, this.endnoteMap, _), this.options.renderFooters && this.renderHeaderFooter(
|
|
4882
|
+
this.options.renderFootnotes && this.renderNotes(this.currentFootnoteIds, this.footnoteMap, _), this.options.renderEndnotes && i == h - 1 && this.renderNotes(this.currentEndnoteIds, this.endnoteMap, _), this.options.renderFooters && this.renderHeaderFooter(y.footerRefs, y, t.length, a != y, _), t.push(_), a = y;
|
|
4875
4883
|
}
|
|
4876
4884
|
return t;
|
|
4877
4885
|
}
|
|
4878
4886
|
renderHeaderFooter(e, t, r, n, a) {
|
|
4887
|
+
var h, b;
|
|
4879
4888
|
if (e) {
|
|
4880
|
-
var o = (t.titlePage && n ? e.find((
|
|
4889
|
+
var o = (b = (h = t.titlePage && n ? e.find((y) => y.type == "first") : null) != null ? h : r % 2 == 1 ? e.find((y) => y.type == "even") : null) != null ? b : e.find((y) => y.type == "default"), i = o && this.document.findPartByRelId(o.id, this.document.documentPart);
|
|
4881
4890
|
if (i) {
|
|
4882
4891
|
this.currentPart = i, this.usedHederFooterParts.includes(i.path) || (this.processElement(i.rootElement), this.usedHederFooterParts.push(i.path));
|
|
4883
|
-
const [
|
|
4884
|
-
t != null && t.pageMargins && (i.rootElement.type === B.Header ? (
|
|
4892
|
+
const [y] = this.renderElements([i.rootElement], a);
|
|
4893
|
+
t != null && t.pageMargins && (i.rootElement.type === B.Header ? (y.style.marginTop = `calc(${t.pageMargins.header} - ${t.pageMargins.top})`, y.style.minHeight = `calc(${t.pageMargins.top} - ${t.pageMargins.header})`) : i.rootElement.type === B.Footer && (y.style.marginBottom = `calc(${t.pageMargins.footer} - ${t.pageMargins.bottom})`, y.style.minHeight = `calc(${t.pageMargins.bottom} - ${t.pageMargins.footer})`)), this.currentPart = null;
|
|
4885
4894
|
}
|
|
4886
4895
|
}
|
|
4887
4896
|
}
|
|
@@ -4895,32 +4904,32 @@ class $r {
|
|
|
4895
4904
|
splitBySection(e, t) {
|
|
4896
4905
|
var _;
|
|
4897
4906
|
var r = { sectProps: null, elements: [], pageBreak: !1 }, n = [r];
|
|
4898
|
-
for (let
|
|
4899
|
-
if (
|
|
4900
|
-
const d = this.findStyle(
|
|
4907
|
+
for (let w of e) {
|
|
4908
|
+
if (w.type == B.Paragraph) {
|
|
4909
|
+
const d = this.findStyle(w.styleName);
|
|
4901
4910
|
(_ = d == null ? void 0 : d.paragraphProps) != null && _.pageBreakBefore && (r.sectProps = a, r.pageBreak = !0, r = { sectProps: null, elements: [], pageBreak: !1 }, n.push(r));
|
|
4902
4911
|
}
|
|
4903
|
-
if (r.elements.push(
|
|
4904
|
-
const d =
|
|
4912
|
+
if (r.elements.push(w), w.type == B.Paragraph) {
|
|
4913
|
+
const d = w;
|
|
4905
4914
|
var a = d.sectionProps, o = -1, i = -1;
|
|
4906
|
-
if (this.options.breakPages && d.children && (o = d.children.findIndex((
|
|
4907
|
-
var u;
|
|
4908
|
-
return i = ((u =
|
|
4915
|
+
if (this.options.breakPages && d.children && (o = d.children.findIndex((k) => {
|
|
4916
|
+
var u, m;
|
|
4917
|
+
return i = (m = (u = k.children) == null ? void 0 : u.findIndex(this.isPageBreakElement.bind(this))) != null ? m : -1, i != -1;
|
|
4909
4918
|
})), (a || o != -1) && (r.sectProps = a, r.pageBreak = o != -1, r = { sectProps: null, elements: [], pageBreak: !1 }, n.push(r)), o != -1) {
|
|
4910
|
-
let
|
|
4919
|
+
let k = d.children[o], u = i < k.children.length - 1;
|
|
4911
4920
|
if (o < d.children.length - 1 || u) {
|
|
4912
|
-
var h =
|
|
4913
|
-
if (
|
|
4914
|
-
let m =
|
|
4915
|
-
|
|
4921
|
+
var h = w.children, b = { ...w, children: h.slice(o) };
|
|
4922
|
+
if (w.children = h.slice(0, o), r.elements.push(b), u) {
|
|
4923
|
+
let m = k.children, f = { ...k, children: m.slice(0, i) };
|
|
4924
|
+
w.children.push(f), k.children = m.slice(i);
|
|
4916
4925
|
}
|
|
4917
4926
|
}
|
|
4918
4927
|
}
|
|
4919
4928
|
}
|
|
4920
4929
|
}
|
|
4921
|
-
let
|
|
4922
|
-
for (let
|
|
4923
|
-
n[
|
|
4930
|
+
let y = null;
|
|
4931
|
+
for (let w = n.length - 1; w >= 0; w--)
|
|
4932
|
+
n[w].sectProps == null ? n[w].sectProps = y != null ? y : t : y = n[w].sectProps;
|
|
4924
4933
|
return n;
|
|
4925
4934
|
}
|
|
4926
4935
|
groupByPageBreaks(e) {
|
|
@@ -4967,16 +4976,16 @@ section.${e}>footer { z-index: 1; }
|
|
|
4967
4976
|
content: "' '",
|
|
4968
4977
|
display: "inline-block",
|
|
4969
4978
|
background: `var(${h})`
|
|
4970
|
-
}, a.bullet.style), this.tasks.push(this.document.loadNumberingImage(a.bullet.src).then((
|
|
4971
|
-
var
|
|
4972
|
-
t.appendChild(this.createStyleElement(
|
|
4979
|
+
}, a.bullet.style), this.tasks.push(this.document.loadNumberingImage(a.bullet.src).then((b) => {
|
|
4980
|
+
var y = `${this.rootSelector} { ${h}: url(${b}) }`;
|
|
4981
|
+
t.appendChild(this.createStyleElement(y));
|
|
4973
4982
|
}));
|
|
4974
4983
|
} else if (a.levelText) {
|
|
4975
4984
|
let h = this.numberingCounter(a.id, a.level);
|
|
4976
|
-
const
|
|
4985
|
+
const b = h + " " + (a.start - 1);
|
|
4977
4986
|
a.level > 0 && (r += this.styleToString(`p.${this.numberingClass(a.id, a.level - 1)}`, {
|
|
4978
|
-
"counter-set":
|
|
4979
|
-
})), n.push(
|
|
4987
|
+
"counter-set": b
|
|
4988
|
+
})), n.push(b), r += this.styleToString(`${o}:before`, {
|
|
4980
4989
|
content: this.levelTextToContent(a.levelText, a.suff, a.id, this.numFormatToCssValue(a.format)),
|
|
4981
4990
|
"counter-increment": h,
|
|
4982
4991
|
...a.rStyle
|
|
@@ -4995,17 +5004,18 @@ section.${e}>footer { z-index: 1; }
|
|
|
4995
5004
|
})), this.createStyleElement(r);
|
|
4996
5005
|
}
|
|
4997
5006
|
renderStyles(e) {
|
|
5007
|
+
var h;
|
|
4998
5008
|
var t = "";
|
|
4999
|
-
const r = this.styleMap, n = wt(e.filter((
|
|
5000
|
-
for (const
|
|
5001
|
-
var a =
|
|
5002
|
-
if (
|
|
5003
|
-
var o =
|
|
5004
|
-
o ? a = a.concat(o.styles) : this.options.debug && console.warn(`Can't find linked style ${
|
|
5009
|
+
const r = this.styleMap, n = wt(e.filter((b) => b.isDefault), (b) => b.target);
|
|
5010
|
+
for (const b of e) {
|
|
5011
|
+
var a = b.styles;
|
|
5012
|
+
if (b.linked) {
|
|
5013
|
+
var o = b.linked && r[b.linked];
|
|
5014
|
+
o ? a = a.concat(o.styles) : this.options.debug && console.warn(`Can't find linked style ${b.linked}`);
|
|
5005
5015
|
}
|
|
5006
5016
|
for (const y of a) {
|
|
5007
|
-
var i = `${h.target
|
|
5008
|
-
|
|
5017
|
+
var i = `${(h = b.target) != null ? h : ""}.${b.cssName}`;
|
|
5018
|
+
b.target != y.target && (i += ` ${y.target}`), n[b.target] == b && (i = `.${this.className} ${b.target}, ` + i), t += this.styleToString(i, y.values);
|
|
5009
5019
|
}
|
|
5010
5020
|
}
|
|
5011
5021
|
return this.createStyleElement(t);
|
|
@@ -5144,11 +5154,11 @@ section.${e}>footer { z-index: 1; }
|
|
|
5144
5154
|
return this.createElementNS(t, r, n, this.renderElements(e.children));
|
|
5145
5155
|
}
|
|
5146
5156
|
renderParagraph(e) {
|
|
5147
|
-
var a, o;
|
|
5157
|
+
var a, o, i, h;
|
|
5148
5158
|
var t = this.renderContainer(e, "p");
|
|
5149
5159
|
const r = this.findStyle(e.styleName);
|
|
5150
|
-
e.tabs
|
|
5151
|
-
const n = e.numbering
|
|
5160
|
+
(o = e.tabs) != null || (e.tabs = (a = r == null ? void 0 : r.paragraphProps) == null ? void 0 : a.tabs), this.renderClass(e, t), this.renderStyleValues(e.cssStyle, t), this.renderCommonProperties(t.style, e);
|
|
5161
|
+
const n = (h = e.numbering) != null ? h : (i = r == null ? void 0 : r.paragraphProps) == null ? void 0 : i.numbering;
|
|
5152
5162
|
return n && t.classList.add(this.numberingClass(n.id, n.level)), t;
|
|
5153
5163
|
}
|
|
5154
5164
|
renderRunProperties(e, t) {
|
|
@@ -5158,12 +5168,13 @@ section.${e}>footer { z-index: 1; }
|
|
|
5158
5168
|
t != null && (t.color && (e.color = t.color), t.fontSize && (e["font-size"] = t.fontSize));
|
|
5159
5169
|
}
|
|
5160
5170
|
renderHyperlink(e) {
|
|
5171
|
+
var n;
|
|
5161
5172
|
var t = this.renderContainer(e, "a");
|
|
5162
5173
|
this.renderStyleValues(e.cssStyle, t);
|
|
5163
5174
|
let r = "";
|
|
5164
5175
|
if (e.id) {
|
|
5165
|
-
const
|
|
5166
|
-
r = (n == null ? void 0 :
|
|
5176
|
+
const a = this.document.documentPart.rels.find((o) => o.id == e.id && o.targetMode === "External");
|
|
5177
|
+
r = (n = a == null ? void 0 : a.target) != null ? n : r;
|
|
5167
5178
|
}
|
|
5168
5179
|
return e.anchor && (r += `#${e.anchor}`), t.href = r, t;
|
|
5169
5180
|
}
|
|
@@ -5213,12 +5224,12 @@ section.${e}>footer { z-index: 1; }
|
|
|
5213
5224
|
renderImage(e) {
|
|
5214
5225
|
var h;
|
|
5215
5226
|
let t = this.createElement("img"), r = (h = e.cssStyle) == null ? void 0 : h.transform;
|
|
5216
|
-
if (this.renderStyleValues(e.cssStyle, t), e.srcRect && e.srcRect.some((
|
|
5227
|
+
if (this.renderStyleValues(e.cssStyle, t), e.srcRect && e.srcRect.some((b) => b != 0)) {
|
|
5217
5228
|
var [n, a, o, i] = e.srcRect;
|
|
5218
5229
|
r = `scale(${1 / (1 - n - o)}, ${1 / (1 - a - i)})`, t.style["clip-path"] = `rect(${(100 * a).toFixed(2)}% ${(100 * (1 - o)).toFixed(2)}% ${(100 * (1 - i)).toFixed(2)}% ${(100 * n).toFixed(2)}%)`;
|
|
5219
5230
|
}
|
|
5220
|
-
return e.rotation && (r = `rotate(${e.rotation}deg) ${r
|
|
5221
|
-
t.src =
|
|
5231
|
+
return e.rotation && (r = `rotate(${e.rotation}deg) ${r != null ? r : ""}`), t.style.transform = r == null ? void 0 : r.trim(), this.document && this.tasks.push(this.document.loadDocumentImage(e.src, this.currentPart).then((b) => {
|
|
5232
|
+
t.src = b;
|
|
5222
5233
|
})), t;
|
|
5223
5234
|
}
|
|
5224
5235
|
renderText(e) {
|
|
@@ -5326,16 +5337,17 @@ section.${e}>footer { z-index: 1; }
|
|
|
5326
5337
|
return this.createElementNS(nt.mathML, "mroot", null, this.renderElements([t, r]));
|
|
5327
5338
|
}
|
|
5328
5339
|
renderMmlDelimiter(e) {
|
|
5340
|
+
var r, n;
|
|
5329
5341
|
const t = [];
|
|
5330
|
-
return t.push(this.createElementNS(nt.mathML, "mo", null, [e.props.beginChar
|
|
5342
|
+
return t.push(this.createElementNS(nt.mathML, "mo", null, [(r = e.props.beginChar) != null ? r : "("])), t.push(...this.renderElements(e.children)), t.push(this.createElementNS(nt.mathML, "mo", null, [(n = e.props.endChar) != null ? n : ")"])), this.createElementNS(nt.mathML, "mrow", null, t);
|
|
5331
5343
|
}
|
|
5332
5344
|
renderMmlNary(e) {
|
|
5333
|
-
var y;
|
|
5334
|
-
const t = [], r = wt(e.children, (
|
|
5345
|
+
var b, y;
|
|
5346
|
+
const t = [], r = wt(e.children, (_) => _.type), n = r[B.MmlSuperArgument], a = r[B.MmlSubArgument], o = n ? this.createElementNS(nt.mathML, "mo", null, At(this.renderElement(n))) : null, i = a ? this.createElementNS(nt.mathML, "mo", null, At(this.renderElement(a))) : null, h = this.createElementNS(nt.mathML, "mo", null, [(y = (b = e.props) == null ? void 0 : b.char) != null ? y : "∫"]);
|
|
5335
5347
|
return o || i ? t.push(this.createElementNS(nt.mathML, "munderover", null, [h, i, o])) : o ? t.push(this.createElementNS(nt.mathML, "mover", null, [h, o])) : i ? t.push(this.createElementNS(nt.mathML, "munder", null, [h, i])) : t.push(h), t.push(...this.renderElements(r[B.MmlBase].children)), this.createElementNS(nt.mathML, "mrow", null, t);
|
|
5336
5348
|
}
|
|
5337
5349
|
renderMmlPreSubSuper(e) {
|
|
5338
|
-
const t = [], r = wt(e.children, (
|
|
5350
|
+
const t = [], r = wt(e.children, (b) => b.type), n = r[B.MmlSuperArgument], a = r[B.MmlSubArgument], o = n ? this.createElementNS(nt.mathML, "mo", null, At(this.renderElement(n))) : null, i = a ? this.createElementNS(nt.mathML, "mo", null, At(this.renderElement(a))) : null, h = this.createElementNS(nt.mathML, "mo", null);
|
|
5339
5351
|
return t.push(this.createElementNS(nt.mathML, "msubsup", null, [h, i, o])), t.push(...this.renderElements(r[B.MmlBase].children)), this.createElementNS(nt.mathML, "mrow", null, t);
|
|
5340
5352
|
}
|
|
5341
5353
|
renderMmlGroupChar(e) {
|
|
@@ -5397,17 +5409,19 @@ section.${e}>footer { z-index: 1; }
|
|
|
5397
5409
|
return `${this.className}-num-${e}-${t}`;
|
|
5398
5410
|
}
|
|
5399
5411
|
levelTextToContent(e, t, r, n) {
|
|
5412
|
+
var i;
|
|
5400
5413
|
const a = {
|
|
5401
5414
|
tab: "\\9",
|
|
5402
5415
|
space: "\\a0"
|
|
5403
5416
|
};
|
|
5404
|
-
var o = e.replace(/%\d*/g, (
|
|
5405
|
-
let
|
|
5406
|
-
return `"counter(${this.numberingCounter(r,
|
|
5417
|
+
var o = e.replace(/%\d*/g, (h) => {
|
|
5418
|
+
let b = parseInt(h.substring(1), 10) - 1;
|
|
5419
|
+
return `"counter(${this.numberingCounter(r, b)}, ${n})"`;
|
|
5407
5420
|
});
|
|
5408
|
-
return `"${o}${a[t]
|
|
5421
|
+
return `"${o}${(i = a[t]) != null ? i : ""}"`;
|
|
5409
5422
|
}
|
|
5410
5423
|
numFormatToCssValue(e) {
|
|
5424
|
+
var r;
|
|
5411
5425
|
var t = {
|
|
5412
5426
|
none: "none",
|
|
5413
5427
|
bullet: "disc",
|
|
@@ -5444,7 +5458,7 @@ section.${e}>footer { z-index: 1; }
|
|
|
5444
5458
|
taiwaneseCountingThousand: "cjk-ideographic",
|
|
5445
5459
|
taiwaneseDigital: "cjk-decimal"
|
|
5446
5460
|
};
|
|
5447
|
-
return t[e]
|
|
5461
|
+
return (r = t[e]) != null ? r : e;
|
|
5448
5462
|
}
|
|
5449
5463
|
refreshTabStops() {
|
|
5450
5464
|
this.options.experimental && setTimeout(() => {
|