@factorialco/f0-react 8.28.3 → 8.28.4
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/dist/{ChatDocxThumbnail-D5hDwmp7.js → ChatDocxThumbnail-DTpOzL9A.js} +7 -7
- package/dist/{ChatPdfThumbnail-Cf74m771.js → ChatPdfThumbnail-QKm8T1iP.js} +1 -1
- package/dist/{ChatPostComposerDialog-pRNELk68.js → ChatPostComposerDialog-DF5B8NLo.js} +3 -3
- package/dist/{ChatSheetThumbnail-D8aN1W_0.js → ChatSheetThumbnail-CyiwSdZJ.js} +1 -1
- package/dist/{DocumentToolbar-C4DUcWl7.js → DocumentToolbar-BAa5mh7x.js} +2 -2
- package/dist/{DocxViewer-M4FGdd_h.js → DocxViewer-CYBh46FI.js} +7 -7
- package/dist/{F0AiProcessingOverlay-Cpx37q3a.js → F0AiProcessingOverlay-3H79lgMd.js} +1 -1
- package/dist/{F0CanvasPanel-CRTe0CIF.js → F0CanvasPanel-DAEeI3lV.js} +199 -199
- package/dist/{F0Map-BywRoarL.js → F0Map-B7PwCmUl.js} +4 -4
- package/dist/{F0VideoPlayer-DUv08bcV.js → F0VideoPlayer-CNvEtJ9U.js} +18 -18
- package/dist/{MapProvider-CTtL5mc3.js → MapProvider-WM9ZFI_s.js} +2 -2
- package/dist/SheetViewer-CvQ24W5k.js +123 -0
- package/dist/{TextViewer-54DAaDA1.js → TextViewer-uZnjAB6W.js} +2 -2
- package/dist/ai.d.ts +6 -6
- package/dist/ai.js +2 -2
- package/dist/component-status.d.ts +6 -6
- package/dist/component-status.js +1 -1
- package/dist/{experimental-STLmChcB.js → experimental-Bzwkrec6.js} +179 -179
- package/dist/experimental.d.ts +6 -6
- package/dist/experimental.js +40 -40
- package/dist/f0.d.ts +6 -6
- package/dist/f0.js +10 -10
- package/dist/i18n-provider-defaults.d.ts +6 -6
- package/dist/{index-DFrzKaGA.js → index-98s6Ae16.js} +62 -62
- package/dist/{index-9MKvlApA.js → index-B1tQWotf.js} +28 -28
- package/dist/{index-BXS__6p-.js → index-BuHr35P1.js} +15 -15
- package/dist/{index-CKzBQYgd.js → index-Ck8-Kqxo.js} +2 -2
- package/dist/index-D4H-LP6r.js +4 -0
- package/dist/{pdfWorker-DACTjTuR.js → pdfWorker-C8Mu95m3.js} +2 -2
- package/dist/{docx-preview-BaRDMyPN.js → renderDocx-CVEzw9MK.js} +920 -901
- package/dist/sheetPreview-Bqj3xODH.js +51 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/SheetViewer-BK9NNMZ9.js +0 -111
- package/dist/index-D0rQW0DI.js +0 -4
- package/dist/sheetPreview-Djc-YyVs.js +0 -37
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
import { c as zt, g as _e } from "./_commonjsHelpers-ByX85dGu.js";
|
|
2
2
|
import { c as Rt } from "./_commonjs-dynamic-modules-BpilXLfW.js";
|
|
3
3
|
var jt = { exports: {} };
|
|
4
|
-
var
|
|
4
|
+
var Kt;
|
|
5
5
|
function we() {
|
|
6
|
-
return
|
|
6
|
+
return Kt || (Kt = 1, (function(l, e) {
|
|
7
7
|
(function(t) {
|
|
8
|
-
|
|
8
|
+
l.exports = t();
|
|
9
9
|
})(function() {
|
|
10
10
|
return (function t(r, a, n) {
|
|
11
|
-
function
|
|
11
|
+
function i(_, S) {
|
|
12
12
|
if (!a[_]) {
|
|
13
13
|
if (!r[_]) {
|
|
14
14
|
var v = typeof Rt == "function" && Rt;
|
|
15
15
|
if (!S && v) return v(_, !0);
|
|
16
|
-
if (
|
|
16
|
+
if (o) return o(_, !0);
|
|
17
17
|
var y = new Error("Cannot find module '" + _ + "'");
|
|
18
18
|
throw y.code = "MODULE_NOT_FOUND", y;
|
|
19
19
|
}
|
|
20
20
|
var d = a[_] = { exports: {} };
|
|
21
21
|
r[_][0].call(d.exports, function(k) {
|
|
22
22
|
var u = r[_][1][k];
|
|
23
|
-
return
|
|
23
|
+
return i(u || k);
|
|
24
24
|
}, d, d.exports, t, r, a, n);
|
|
25
25
|
}
|
|
26
26
|
return a[_].exports;
|
|
27
27
|
}
|
|
28
|
-
for (var
|
|
29
|
-
return
|
|
28
|
+
for (var o = typeof Rt == "function" && Rt, h = 0; h < n.length; h++) i(n[h]);
|
|
29
|
+
return i;
|
|
30
30
|
})({ 1: [function(t, r, a) {
|
|
31
|
-
var n = t("./utils"),
|
|
31
|
+
var n = t("./utils"), i = t("./support"), o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
32
32
|
a.encode = function(h) {
|
|
33
|
-
for (var _, S, v, y, d, k, u, m = [], f = 0, b = h.length, x = b, E = n.getTypeOf(h) !== "string"; f < h.length; ) x = b - f, v = E ? (_ = h[f++], S = f < b ? h[f++] : 0, f < b ? h[f++] : 0) : (_ = h.charCodeAt(f++), S = f < b ? h.charCodeAt(f++) : 0, f < b ? h.charCodeAt(f++) : 0), y = _ >> 2, d = (3 & _) << 4 | S >> 4, k = 1 < x ? (15 & S) << 2 | v >> 6 : 64, u = 2 < x ? 63 & v : 64, m.push(
|
|
33
|
+
for (var _, S, v, y, d, k, u, m = [], f = 0, b = h.length, x = b, E = n.getTypeOf(h) !== "string"; f < h.length; ) x = b - f, v = E ? (_ = h[f++], S = f < b ? h[f++] : 0, f < b ? h[f++] : 0) : (_ = h.charCodeAt(f++), S = f < b ? h.charCodeAt(f++) : 0, f < b ? h.charCodeAt(f++) : 0), y = _ >> 2, d = (3 & _) << 4 | S >> 4, k = 1 < x ? (15 & S) << 2 | v >> 6 : 64, u = 2 < x ? 63 & v : 64, m.push(o.charAt(y) + o.charAt(d) + o.charAt(k) + o.charAt(u));
|
|
34
34
|
return m.join("");
|
|
35
35
|
}, a.decode = function(h) {
|
|
36
36
|
var _, S, v, y, d, k, u = 0, m = 0, f = "data:";
|
|
37
37
|
if (h.substr(0, f.length) === f) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
38
38
|
var b, x = 3 * (h = h.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
39
|
-
if (h.charAt(h.length - 1) ===
|
|
40
|
-
for (b =
|
|
39
|
+
if (h.charAt(h.length - 1) === o.charAt(64) && x--, h.charAt(h.length - 2) === o.charAt(64) && x--, x % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
40
|
+
for (b = i.uint8array ? new Uint8Array(0 | x) : new Array(0 | x); u < h.length; ) _ = o.indexOf(h.charAt(u++)) << 2 | (y = o.indexOf(h.charAt(u++))) >> 4, S = (15 & y) << 4 | (d = o.indexOf(h.charAt(u++))) >> 2, v = (3 & d) << 6 | (k = o.indexOf(h.charAt(u++))), b[m++] = _, d !== 64 && (b[m++] = S), k !== 64 && (b[m++] = v);
|
|
41
41
|
return b;
|
|
42
42
|
};
|
|
43
43
|
}, { "./support": 30, "./utils": 32 }], 2: [function(t, r, a) {
|
|
44
|
-
var n = t("./external"),
|
|
44
|
+
var n = t("./external"), i = t("./stream/DataWorker"), o = t("./stream/Crc32Probe"), h = t("./stream/DataLengthProbe");
|
|
45
45
|
function _(S, v, y, d, k) {
|
|
46
46
|
this.compressedSize = S, this.uncompressedSize = v, this.crc32 = y, this.compression = d, this.compressedContent = k;
|
|
47
47
|
}
|
|
48
48
|
_.prototype = { getContentWorker: function() {
|
|
49
|
-
var S = new
|
|
49
|
+
var S = new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")), v = this;
|
|
50
50
|
return S.on("end", function() {
|
|
51
51
|
if (this.streamInfo.data_length !== v.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
|
|
52
52
|
}), S;
|
|
53
53
|
}, getCompressedWorker: function() {
|
|
54
|
-
return new
|
|
54
|
+
return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
55
55
|
} }, _.createWorkerFrom = function(S, v, y) {
|
|
56
|
-
return S.pipe(new
|
|
56
|
+
return S.pipe(new o()).pipe(new h("uncompressedSize")).pipe(v.compressWorker(y)).pipe(new h("compressedSize")).withStreamInfo("compression", v);
|
|
57
57
|
}, r.exports = _;
|
|
58
58
|
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(t, r, a) {
|
|
59
59
|
var n = t("./stream/GenericWorker");
|
|
@@ -63,26 +63,26 @@ function we() {
|
|
|
63
63
|
return new n("STORE decompression");
|
|
64
64
|
} }, a.DEFLATE = t("./flate");
|
|
65
65
|
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(t, r, a) {
|
|
66
|
-
var n = t("./utils"),
|
|
67
|
-
for (var
|
|
68
|
-
|
|
69
|
-
for (var S = 0; S < 8; S++)
|
|
70
|
-
h[_] =
|
|
66
|
+
var n = t("./utils"), i = (function() {
|
|
67
|
+
for (var o, h = [], _ = 0; _ < 256; _++) {
|
|
68
|
+
o = _;
|
|
69
|
+
for (var S = 0; S < 8; S++) o = 1 & o ? 3988292384 ^ o >>> 1 : o >>> 1;
|
|
70
|
+
h[_] = o;
|
|
71
71
|
}
|
|
72
72
|
return h;
|
|
73
73
|
})();
|
|
74
|
-
r.exports = function(
|
|
75
|
-
return
|
|
76
|
-
var d =
|
|
74
|
+
r.exports = function(o, h) {
|
|
75
|
+
return o !== void 0 && o.length ? n.getTypeOf(o) !== "string" ? (function(_, S, v, y) {
|
|
76
|
+
var d = i, k = y + v;
|
|
77
77
|
_ ^= -1;
|
|
78
78
|
for (var u = y; u < k; u++) _ = _ >>> 8 ^ d[255 & (_ ^ S[u])];
|
|
79
79
|
return -1 ^ _;
|
|
80
|
-
})(0 | h,
|
|
81
|
-
var d =
|
|
80
|
+
})(0 | h, o, o.length, 0) : (function(_, S, v, y) {
|
|
81
|
+
var d = i, k = y + v;
|
|
82
82
|
_ ^= -1;
|
|
83
83
|
for (var u = y; u < k; u++) _ = _ >>> 8 ^ d[255 & (_ ^ S.charCodeAt(u))];
|
|
84
84
|
return -1 ^ _;
|
|
85
|
-
})(0 | h,
|
|
85
|
+
})(0 | h, o, o.length, 0) : 0;
|
|
86
86
|
};
|
|
87
87
|
}, { "./utils": 32 }], 5: [function(t, r, a) {
|
|
88
88
|
a.base64 = !1, a.binary = !1, a.dir = !1, a.createFolders = !0, a.date = null, a.compression = null, a.compressionOptions = null, a.comment = null, a.unixPermissions = null, a.dosPermissions = null;
|
|
@@ -90,18 +90,18 @@ function we() {
|
|
|
90
90
|
var n = null;
|
|
91
91
|
n = typeof Promise < "u" ? Promise : t("lie"), r.exports = { Promise: n };
|
|
92
92
|
}, { lie: 37 }], 7: [function(t, r, a) {
|
|
93
|
-
var n = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u",
|
|
93
|
+
var n = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", i = t("pako"), o = t("./utils"), h = t("./stream/GenericWorker"), _ = n ? "uint8array" : "array";
|
|
94
94
|
function S(v, y) {
|
|
95
95
|
h.call(this, "FlateWorker/" + v), this._pako = null, this._pakoAction = v, this._pakoOptions = y, this.meta = {};
|
|
96
96
|
}
|
|
97
|
-
a.magic = "\b\0",
|
|
98
|
-
this.meta = v.meta, this._pako === null && this._createPako(), this._pako.push(
|
|
97
|
+
a.magic = "\b\0", o.inherits(S, h), S.prototype.processChunk = function(v) {
|
|
98
|
+
this.meta = v.meta, this._pako === null && this._createPako(), this._pako.push(o.transformTo(_, v.data), !1);
|
|
99
99
|
}, S.prototype.flush = function() {
|
|
100
100
|
h.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
|
|
101
101
|
}, S.prototype.cleanUp = function() {
|
|
102
102
|
h.prototype.cleanUp.call(this), this._pako = null;
|
|
103
103
|
}, S.prototype._createPako = function() {
|
|
104
|
-
this._pako = new
|
|
104
|
+
this._pako = new i[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
|
|
105
105
|
var v = this;
|
|
106
106
|
this._pako.onData = function(y) {
|
|
107
107
|
v.push({ data: y, meta: v.meta });
|
|
@@ -117,39 +117,39 @@ function we() {
|
|
|
117
117
|
for (u = 0; u < k; u++) m += String.fromCharCode(255 & d), d >>>= 8;
|
|
118
118
|
return m;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
var x, E, A = d.file, L = d.compression, F = b !== _.utf8encode, H =
|
|
120
|
+
function i(d, k, u, m, f, b) {
|
|
121
|
+
var x, E, A = d.file, L = d.compression, F = b !== _.utf8encode, H = o.transformTo("string", b(A.name)), T = o.transformTo("string", _.utf8encode(A.name)), V = A.comment, Q = o.transformTo("string", b(V)), w = o.transformTo("string", _.utf8encode(V)), I = T.length !== A.name.length, c = w.length !== V.length, D = "", et = "", $ = "", rt = A.dir, W = A.date, tt = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
122
122
|
k && !u || (tt.crc32 = d.crc32, tt.compressedSize = d.compressedSize, tt.uncompressedSize = d.uncompressedSize);
|
|
123
123
|
var z = 0;
|
|
124
|
-
k && (z |= 8), F || !I && !
|
|
124
|
+
k && (z |= 8), F || !I && !c || (z |= 2048);
|
|
125
125
|
var M = 0, J = 0;
|
|
126
126
|
rt && (M |= 16), f === "UNIX" ? (J = 798, M |= (function(X, ct) {
|
|
127
127
|
var mt = X;
|
|
128
128
|
return X || (mt = ct ? 16893 : 33204), (65535 & mt) << 16;
|
|
129
129
|
})(A.unixPermissions, rt)) : (J = 20, M |= (function(X) {
|
|
130
130
|
return 63 & (X || 0);
|
|
131
|
-
})(A.dosPermissions)), x = W.getUTCHours(), x <<= 6, x |= W.getUTCMinutes(), x <<= 5, x |= W.getUTCSeconds() / 2, E = W.getUTCFullYear() - 1980, E <<= 4, E |= W.getUTCMonth() + 1, E <<= 5, E |= W.getUTCDate(), I && (et = n(1, 1) + n(S(H), 4) + T, D += "up" + n(et.length, 2) + et),
|
|
132
|
-
var
|
|
133
|
-
return
|
|
134
|
-
\0`,
|
|
131
|
+
})(A.dosPermissions)), x = W.getUTCHours(), x <<= 6, x |= W.getUTCMinutes(), x <<= 5, x |= W.getUTCSeconds() / 2, E = W.getUTCFullYear() - 1980, E <<= 4, E |= W.getUTCMonth() + 1, E <<= 5, E |= W.getUTCDate(), I && (et = n(1, 1) + n(S(H), 4) + T, D += "up" + n(et.length, 2) + et), c && ($ = n(1, 1) + n(S(Q), 4) + w, D += "uc" + n($.length, 2) + $);
|
|
132
|
+
var q = "";
|
|
133
|
+
return q += `
|
|
134
|
+
\0`, q += n(z, 2), q += L.magic, q += n(x, 2), q += n(E, 2), q += n(tt.crc32, 4), q += n(tt.compressedSize, 4), q += n(tt.uncompressedSize, 4), q += n(H.length, 2), q += n(D.length, 2), { fileRecord: v.LOCAL_FILE_HEADER + q + H + D, dirRecord: v.CENTRAL_FILE_HEADER + n(J, 2) + q + n(Q.length, 2) + "\0\0\0\0" + n(M, 4) + n(m, 4) + H + D + Q };
|
|
135
135
|
}
|
|
136
|
-
var
|
|
136
|
+
var o = t("../utils"), h = t("../stream/GenericWorker"), _ = t("../utf8"), S = t("../crc32"), v = t("../signature");
|
|
137
137
|
function y(d, k, u, m) {
|
|
138
138
|
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 = [];
|
|
139
139
|
}
|
|
140
|
-
|
|
140
|
+
o.inherits(y, h), y.prototype.push = function(d) {
|
|
141
141
|
var k = d.meta.percent || 0, u = this.entriesCount, m = this._sources.length;
|
|
142
142
|
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 } }));
|
|
143
143
|
}, y.prototype.openedSource = function(d) {
|
|
144
144
|
this.currentSourceOffset = this.bytesWritten, this.currentFile = d.file.name;
|
|
145
145
|
var k = this.streamFiles && !d.file.dir;
|
|
146
146
|
if (k) {
|
|
147
|
-
var u =
|
|
147
|
+
var u = i(d, k, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
148
148
|
this.push({ data: u.fileRecord, meta: { percent: 0 } });
|
|
149
149
|
} else this.accumulate = !0;
|
|
150
150
|
}, y.prototype.closedSource = function(d) {
|
|
151
151
|
this.accumulate = !1;
|
|
152
|
-
var k = this.streamFiles && !d.file.dir, u =
|
|
152
|
+
var k = this.streamFiles && !d.file.dir, u = i(d, k, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
153
153
|
if (this.dirRecords.push(u.dirRecord), k) this.push({ data: (function(m) {
|
|
154
154
|
return v.DATA_DESCRIPTOR + n(m.crc32, 4) + n(m.compressedSize, 4) + n(m.uncompressedSize, 4);
|
|
155
155
|
})(d), meta: { percent: 100 } });
|
|
@@ -158,7 +158,7 @@ function we() {
|
|
|
158
158
|
}, y.prototype.flush = function() {
|
|
159
159
|
for (var d = this.bytesWritten, k = 0; k < this.dirRecords.length; k++) this.push({ data: this.dirRecords[k], meta: { percent: 100 } });
|
|
160
160
|
var u = this.bytesWritten - d, m = (function(f, b, x, E, A) {
|
|
161
|
-
var L =
|
|
161
|
+
var L = o.transformTo("string", A(E));
|
|
162
162
|
return v.CENTRAL_DIRECTORY_END + "\0\0\0\0" + n(f, 2) + n(f, 2) + n(b, 4) + n(x, 4) + n(L.length, 2) + L;
|
|
163
163
|
})(this.dirRecords.length, u, d, this.zipComment, this.encodeFileName);
|
|
164
164
|
this.push({ data: m, meta: { percent: 100 } });
|
|
@@ -189,11 +189,11 @@ function we() {
|
|
|
189
189
|
for (var d = this._sources, k = 0; k < d.length; k++) d[k].lock();
|
|
190
190
|
}, r.exports = y;
|
|
191
191
|
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(t, r, a) {
|
|
192
|
-
var n = t("../compressions"),
|
|
193
|
-
a.generateWorker = function(
|
|
194
|
-
var S = new
|
|
192
|
+
var n = t("../compressions"), i = t("./ZipFileWorker");
|
|
193
|
+
a.generateWorker = function(o, h, _) {
|
|
194
|
+
var S = new i(h.streamFiles, _, h.platform, h.encodeFileName), v = 0;
|
|
195
195
|
try {
|
|
196
|
-
|
|
196
|
+
o.forEach(function(y, d) {
|
|
197
197
|
v++;
|
|
198
198
|
var k = (function(b, x) {
|
|
199
199
|
var E = b || x, A = n[E];
|
|
@@ -212,18 +212,18 @@ function we() {
|
|
|
212
212
|
if (!(this instanceof n)) return new n();
|
|
213
213
|
if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
214
214
|
this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
|
|
215
|
-
var
|
|
216
|
-
for (var
|
|
217
|
-
return
|
|
215
|
+
var i = new n();
|
|
216
|
+
for (var o in this) typeof this[o] != "function" && (i[o] = this[o]);
|
|
217
|
+
return i;
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
(n.prototype = t("./object")).loadAsync = t("./load"), n.support = t("./support"), n.defaults = t("./defaults"), n.version = "3.10.1", n.loadAsync = function(
|
|
221
|
-
return new n().loadAsync(
|
|
220
|
+
(n.prototype = t("./object")).loadAsync = t("./load"), n.support = t("./support"), n.defaults = t("./defaults"), n.version = "3.10.1", n.loadAsync = function(i, o) {
|
|
221
|
+
return new n().loadAsync(i, o);
|
|
222
222
|
}, n.external = t("./external"), r.exports = n;
|
|
223
223
|
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(t, r, a) {
|
|
224
|
-
var n = t("./utils"),
|
|
224
|
+
var n = t("./utils"), i = t("./external"), o = t("./utf8"), h = t("./zipEntries"), _ = t("./stream/Crc32Probe"), S = t("./nodejsUtils");
|
|
225
225
|
function v(y) {
|
|
226
|
-
return new
|
|
226
|
+
return new i.Promise(function(d, k) {
|
|
227
227
|
var u = y.decompressed.getContentWorker().pipe(new _());
|
|
228
228
|
u.on("error", function(m) {
|
|
229
229
|
k(m);
|
|
@@ -234,13 +234,13 @@ function we() {
|
|
|
234
234
|
}
|
|
235
235
|
r.exports = function(y, d) {
|
|
236
236
|
var k = this;
|
|
237
|
-
return d = n.extend(d || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName:
|
|
237
|
+
return d = n.extend(d || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: o.utf8decode }), S.isNode && S.isStream(y) ? i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : n.prepareContent("the loaded zip file", y, !0, d.optimizedBinaryString, d.base64).then(function(u) {
|
|
238
238
|
var m = new h(d);
|
|
239
239
|
return m.load(u), m;
|
|
240
240
|
}).then(function(u) {
|
|
241
|
-
var m = [
|
|
241
|
+
var m = [i.Promise.resolve(u)], f = u.files;
|
|
242
242
|
if (d.checkCRC32) for (var b = 0; b < f.length; b++) m.push(v(f[b]));
|
|
243
|
-
return
|
|
243
|
+
return i.Promise.all(m);
|
|
244
244
|
}).then(function(u) {
|
|
245
245
|
for (var m = u.shift(), f = m.files, b = 0; b < f.length; b++) {
|
|
246
246
|
var x = f[b], E = x.fileNameStr, A = n.resolve(x.fileNameStr);
|
|
@@ -250,11 +250,11 @@ function we() {
|
|
|
250
250
|
});
|
|
251
251
|
};
|
|
252
252
|
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(t, r, a) {
|
|
253
|
-
var n = t("../utils"),
|
|
254
|
-
function
|
|
255
|
-
|
|
253
|
+
var n = t("../utils"), i = t("../stream/GenericWorker");
|
|
254
|
+
function o(h, _) {
|
|
255
|
+
i.call(this, "Nodejs stream input adapter for " + h), this._upstreamEnded = !1, this._bindStream(_);
|
|
256
256
|
}
|
|
257
|
-
n.inherits(
|
|
257
|
+
n.inherits(o, i), o.prototype._bindStream = function(h) {
|
|
258
258
|
var _ = this;
|
|
259
259
|
(this._stream = h).pause(), h.on("data", function(S) {
|
|
260
260
|
_.push({ data: S, meta: { percent: 0 } });
|
|
@@ -263,17 +263,17 @@ function we() {
|
|
|
263
263
|
}).on("end", function() {
|
|
264
264
|
_.isPaused ? _._upstreamEnded = !0 : _.end();
|
|
265
265
|
});
|
|
266
|
-
},
|
|
267
|
-
return !!
|
|
268
|
-
},
|
|
269
|
-
return !!
|
|
270
|
-
}, r.exports =
|
|
266
|
+
}, o.prototype.pause = function() {
|
|
267
|
+
return !!i.prototype.pause.call(this) && (this._stream.pause(), !0);
|
|
268
|
+
}, o.prototype.resume = function() {
|
|
269
|
+
return !!i.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
|
|
270
|
+
}, r.exports = o;
|
|
271
271
|
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(t, r, a) {
|
|
272
272
|
var n = t("readable-stream").Readable;
|
|
273
|
-
function o
|
|
274
|
-
n.call(this, h), this._helper =
|
|
273
|
+
function i(o, h, _) {
|
|
274
|
+
n.call(this, h), this._helper = o;
|
|
275
275
|
var S = this;
|
|
276
|
-
|
|
276
|
+
o.on("data", function(v, y) {
|
|
277
277
|
S.push(v) || S._helper.pause(), _ && _(y);
|
|
278
278
|
}).on("error", function(v) {
|
|
279
279
|
S.emit("error", v);
|
|
@@ -281,18 +281,18 @@ function we() {
|
|
|
281
281
|
S.push(null);
|
|
282
282
|
});
|
|
283
283
|
}
|
|
284
|
-
t("../utils").inherits(
|
|
284
|
+
t("../utils").inherits(i, n), i.prototype._read = function() {
|
|
285
285
|
this._helper.resume();
|
|
286
|
-
}, r.exports =
|
|
286
|
+
}, r.exports = i;
|
|
287
287
|
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(t, r, a) {
|
|
288
|
-
r.exports = { isNode: typeof Buffer < "u", newBufferFrom: function(n,
|
|
289
|
-
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(n,
|
|
288
|
+
r.exports = { isNode: typeof Buffer < "u", newBufferFrom: function(n, i) {
|
|
289
|
+
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(n, i);
|
|
290
290
|
if (typeof n == "number") throw new Error('The "data" argument must not be a number');
|
|
291
|
-
return new Buffer(n,
|
|
291
|
+
return new Buffer(n, i);
|
|
292
292
|
}, allocBuffer: function(n) {
|
|
293
293
|
if (Buffer.alloc) return Buffer.alloc(n);
|
|
294
|
-
var
|
|
295
|
-
return
|
|
294
|
+
var i = new Buffer(n);
|
|
295
|
+
return i.fill(0), i;
|
|
296
296
|
}, isBuffer: function(n) {
|
|
297
297
|
return Buffer.isBuffer(n);
|
|
298
298
|
}, isStream: function(n) {
|
|
@@ -300,16 +300,16 @@ function we() {
|
|
|
300
300
|
} };
|
|
301
301
|
}, {}], 15: [function(t, r, a) {
|
|
302
302
|
function n(A, L, F) {
|
|
303
|
-
var H, T =
|
|
303
|
+
var H, T = o.getTypeOf(L), V = o.extend(F || {}, S);
|
|
304
304
|
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 && (A = f(A)), V.createFolders && (H = m(A)) && b.call(this, H, !0);
|
|
305
305
|
var Q = T === "string" && V.binary === !1 && V.base64 === !1;
|
|
306
306
|
F && F.binary !== void 0 || (V.binary = !Q), (L instanceof v && L.uncompressedSize === 0 || V.dir || !L || L.length === 0) && (V.base64 = !1, V.binary = !0, L = "", V.compression = "STORE", T = "string");
|
|
307
307
|
var w = null;
|
|
308
|
-
w = L instanceof v || L instanceof h ? L : k.isNode && k.isStream(L) ? new u(A, L) :
|
|
308
|
+
w = L instanceof v || L instanceof h ? L : k.isNode && k.isStream(L) ? new u(A, L) : o.prepareContent(A, L, V.binary, V.optimizedBinaryString, V.base64);
|
|
309
309
|
var I = new y(A, w, V);
|
|
310
310
|
this.files[A] = I;
|
|
311
311
|
}
|
|
312
|
-
var
|
|
312
|
+
var i = t("./utf8"), o = t("./utils"), h = t("./stream/GenericWorker"), _ = t("./stream/StreamHelper"), S = t("./defaults"), v = t("./compressedObject"), y = t("./zipObject"), d = t("./generate"), k = t("./nodejsUtils"), u = t("./nodejs/NodejsStreamInputAdapter"), m = function(A) {
|
|
313
313
|
A.slice(-1) === "/" && (A = A.substring(0, A.length - 1));
|
|
314
314
|
var L = A.lastIndexOf("/");
|
|
315
315
|
return 0 < L ? A.substring(0, L) : "";
|
|
@@ -361,8 +361,8 @@ function we() {
|
|
|
361
361
|
}, generateInternalStream: function(A) {
|
|
362
362
|
var L, F = {};
|
|
363
363
|
try {
|
|
364
|
-
if ((F =
|
|
365
|
-
|
|
364
|
+
if ((F = o.extend(A || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: i.utf8encode })).type = F.type.toLowerCase(), F.compression = F.compression.toUpperCase(), F.type === "binarystring" && (F.type = "string"), !F.type) throw new Error("No output type specified.");
|
|
365
|
+
o.checkSupport(F.type), F.platform !== "darwin" && F.platform !== "freebsd" && F.platform !== "linux" && F.platform !== "sunos" || (F.platform = "UNIX"), F.platform === "win32" && (F.platform = "DOS");
|
|
366
366
|
var H = F.comment || this.comment || "";
|
|
367
367
|
L = d.generateWorker(this, F, H);
|
|
368
368
|
} catch (T) {
|
|
@@ -379,126 +379,126 @@ function we() {
|
|
|
379
379
|
r.exports = t("stream");
|
|
380
380
|
}, { stream: void 0 }], 17: [function(t, r, a) {
|
|
381
381
|
var n = t("./DataReader");
|
|
382
|
-
function o
|
|
383
|
-
n.call(this,
|
|
384
|
-
for (var h = 0; h < this.data.length; h++)
|
|
382
|
+
function i(o) {
|
|
383
|
+
n.call(this, o);
|
|
384
|
+
for (var h = 0; h < this.data.length; h++) o[h] = 255 & o[h];
|
|
385
385
|
}
|
|
386
|
-
t("../utils").inherits(
|
|
387
|
-
return this.data[this.zero +
|
|
388
|
-
},
|
|
389
|
-
for (var h =
|
|
386
|
+
t("../utils").inherits(i, n), i.prototype.byteAt = function(o) {
|
|
387
|
+
return this.data[this.zero + o];
|
|
388
|
+
}, i.prototype.lastIndexOfSignature = function(o) {
|
|
389
|
+
for (var h = o.charCodeAt(0), _ = o.charCodeAt(1), S = o.charCodeAt(2), v = o.charCodeAt(3), y = this.length - 4; 0 <= y; --y) if (this.data[y] === h && this.data[y + 1] === _ && this.data[y + 2] === S && this.data[y + 3] === v) return y - this.zero;
|
|
390
390
|
return -1;
|
|
391
|
-
},
|
|
392
|
-
var h =
|
|
391
|
+
}, i.prototype.readAndCheckSignature = function(o) {
|
|
392
|
+
var h = o.charCodeAt(0), _ = o.charCodeAt(1), S = o.charCodeAt(2), v = o.charCodeAt(3), y = this.readData(4);
|
|
393
393
|
return h === y[0] && _ === y[1] && S === y[2] && v === y[3];
|
|
394
|
-
},
|
|
395
|
-
if (this.checkOffset(
|
|
396
|
-
var h = this.data.slice(this.zero + this.index, this.zero + this.index +
|
|
397
|
-
return this.index +=
|
|
398
|
-
}, r.exports =
|
|
394
|
+
}, i.prototype.readData = function(o) {
|
|
395
|
+
if (this.checkOffset(o), o === 0) return [];
|
|
396
|
+
var h = this.data.slice(this.zero + this.index, this.zero + this.index + o);
|
|
397
|
+
return this.index += o, h;
|
|
398
|
+
}, r.exports = i;
|
|
399
399
|
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(t, r, a) {
|
|
400
400
|
var n = t("../utils");
|
|
401
|
-
function o
|
|
402
|
-
this.data =
|
|
401
|
+
function i(o) {
|
|
402
|
+
this.data = o, this.length = o.length, this.index = 0, this.zero = 0;
|
|
403
403
|
}
|
|
404
|
-
|
|
405
|
-
this.checkIndex(this.index +
|
|
406
|
-
}, checkIndex: function(
|
|
407
|
-
if (this.length < this.zero +
|
|
408
|
-
}, setIndex: function(
|
|
409
|
-
this.checkIndex(
|
|
410
|
-
}, skip: function(
|
|
411
|
-
this.setIndex(this.index +
|
|
404
|
+
i.prototype = { checkOffset: function(o) {
|
|
405
|
+
this.checkIndex(this.index + o);
|
|
406
|
+
}, checkIndex: function(o) {
|
|
407
|
+
if (this.length < this.zero + o || o < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + o + "). Corrupted zip ?");
|
|
408
|
+
}, setIndex: function(o) {
|
|
409
|
+
this.checkIndex(o), this.index = o;
|
|
410
|
+
}, skip: function(o) {
|
|
411
|
+
this.setIndex(this.index + o);
|
|
412
412
|
}, byteAt: function() {
|
|
413
|
-
}, readInt: function(
|
|
413
|
+
}, readInt: function(o) {
|
|
414
414
|
var h, _ = 0;
|
|
415
|
-
for (this.checkOffset(
|
|
416
|
-
return this.index +=
|
|
417
|
-
}, readString: function(
|
|
418
|
-
return n.transformTo("string", this.readData(
|
|
415
|
+
for (this.checkOffset(o), h = this.index + o - 1; h >= this.index; h--) _ = (_ << 8) + this.byteAt(h);
|
|
416
|
+
return this.index += o, _;
|
|
417
|
+
}, readString: function(o) {
|
|
418
|
+
return n.transformTo("string", this.readData(o));
|
|
419
419
|
}, readData: function() {
|
|
420
420
|
}, lastIndexOfSignature: function() {
|
|
421
421
|
}, readAndCheckSignature: function() {
|
|
422
422
|
}, readDate: function() {
|
|
423
|
-
var
|
|
424
|
-
return new Date(Date.UTC(1980 + (
|
|
425
|
-
} }, r.exports =
|
|
423
|
+
var o = this.readInt(4);
|
|
424
|
+
return new Date(Date.UTC(1980 + (o >> 25 & 127), (o >> 21 & 15) - 1, o >> 16 & 31, o >> 11 & 31, o >> 5 & 63, (31 & o) << 1));
|
|
425
|
+
} }, r.exports = i;
|
|
426
426
|
}, { "../utils": 32 }], 19: [function(t, r, a) {
|
|
427
427
|
var n = t("./Uint8ArrayReader");
|
|
428
|
-
function o
|
|
429
|
-
n.call(this,
|
|
428
|
+
function i(o) {
|
|
429
|
+
n.call(this, o);
|
|
430
430
|
}
|
|
431
|
-
t("../utils").inherits(
|
|
432
|
-
this.checkOffset(
|
|
433
|
-
var h = this.data.slice(this.zero + this.index, this.zero + this.index +
|
|
434
|
-
return this.index +=
|
|
435
|
-
}, r.exports =
|
|
431
|
+
t("../utils").inherits(i, n), i.prototype.readData = function(o) {
|
|
432
|
+
this.checkOffset(o);
|
|
433
|
+
var h = this.data.slice(this.zero + this.index, this.zero + this.index + o);
|
|
434
|
+
return this.index += o, h;
|
|
435
|
+
}, r.exports = i;
|
|
436
436
|
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(t, r, a) {
|
|
437
437
|
var n = t("./DataReader");
|
|
438
|
-
function o
|
|
439
|
-
n.call(this,
|
|
438
|
+
function i(o) {
|
|
439
|
+
n.call(this, o);
|
|
440
440
|
}
|
|
441
|
-
t("../utils").inherits(
|
|
442
|
-
return this.data.charCodeAt(this.zero +
|
|
443
|
-
},
|
|
444
|
-
return this.data.lastIndexOf(
|
|
445
|
-
},
|
|
446
|
-
return
|
|
447
|
-
},
|
|
448
|
-
this.checkOffset(
|
|
449
|
-
var h = this.data.slice(this.zero + this.index, this.zero + this.index +
|
|
450
|
-
return this.index +=
|
|
451
|
-
}, r.exports =
|
|
441
|
+
t("../utils").inherits(i, n), i.prototype.byteAt = function(o) {
|
|
442
|
+
return this.data.charCodeAt(this.zero + o);
|
|
443
|
+
}, i.prototype.lastIndexOfSignature = function(o) {
|
|
444
|
+
return this.data.lastIndexOf(o) - this.zero;
|
|
445
|
+
}, i.prototype.readAndCheckSignature = function(o) {
|
|
446
|
+
return o === this.readData(4);
|
|
447
|
+
}, i.prototype.readData = function(o) {
|
|
448
|
+
this.checkOffset(o);
|
|
449
|
+
var h = this.data.slice(this.zero + this.index, this.zero + this.index + o);
|
|
450
|
+
return this.index += o, h;
|
|
451
|
+
}, r.exports = i;
|
|
452
452
|
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(t, r, a) {
|
|
453
453
|
var n = t("./ArrayReader");
|
|
454
|
-
function o
|
|
455
|
-
n.call(this,
|
|
454
|
+
function i(o) {
|
|
455
|
+
n.call(this, o);
|
|
456
456
|
}
|
|
457
|
-
t("../utils").inherits(
|
|
458
|
-
if (this.checkOffset(
|
|
459
|
-
var h = this.data.subarray(this.zero + this.index, this.zero + this.index +
|
|
460
|
-
return this.index +=
|
|
461
|
-
}, r.exports =
|
|
457
|
+
t("../utils").inherits(i, n), i.prototype.readData = function(o) {
|
|
458
|
+
if (this.checkOffset(o), o === 0) return new Uint8Array(0);
|
|
459
|
+
var h = this.data.subarray(this.zero + this.index, this.zero + this.index + o);
|
|
460
|
+
return this.index += o, h;
|
|
461
|
+
}, r.exports = i;
|
|
462
462
|
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(t, r, a) {
|
|
463
|
-
var n = t("../utils"),
|
|
463
|
+
var n = t("../utils"), i = t("../support"), o = t("./ArrayReader"), h = t("./StringReader"), _ = t("./NodeBufferReader"), S = t("./Uint8ArrayReader");
|
|
464
464
|
r.exports = function(v) {
|
|
465
465
|
var y = n.getTypeOf(v);
|
|
466
|
-
return n.checkSupport(y), y !== "string" ||
|
|
466
|
+
return n.checkSupport(y), y !== "string" || i.uint8array ? y === "nodebuffer" ? new _(v) : i.uint8array ? new S(n.transformTo("uint8array", v)) : new o(n.transformTo("array", v)) : new h(v);
|
|
467
467
|
};
|
|
468
468
|
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(t, r, a) {
|
|
469
469
|
a.LOCAL_FILE_HEADER = "PK", a.CENTRAL_FILE_HEADER = "PK", a.CENTRAL_DIRECTORY_END = "PK", a.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", a.ZIP64_CENTRAL_DIRECTORY_END = "PK", a.DATA_DESCRIPTOR = "PK\x07\b";
|
|
470
470
|
}, {}], 24: [function(t, r, a) {
|
|
471
|
-
var n = t("./GenericWorker"),
|
|
472
|
-
function
|
|
471
|
+
var n = t("./GenericWorker"), i = t("../utils");
|
|
472
|
+
function o(h) {
|
|
473
473
|
n.call(this, "ConvertWorker to " + h), this.destType = h;
|
|
474
474
|
}
|
|
475
|
-
|
|
476
|
-
this.push({ data:
|
|
477
|
-
}, r.exports =
|
|
475
|
+
i.inherits(o, n), o.prototype.processChunk = function(h) {
|
|
476
|
+
this.push({ data: i.transformTo(this.destType, h.data), meta: h.meta });
|
|
477
|
+
}, r.exports = o;
|
|
478
478
|
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(t, r, a) {
|
|
479
|
-
var n = t("./GenericWorker"),
|
|
480
|
-
function
|
|
479
|
+
var n = t("./GenericWorker"), i = t("../crc32");
|
|
480
|
+
function o() {
|
|
481
481
|
n.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
|
|
482
482
|
}
|
|
483
|
-
t("../utils").inherits(
|
|
484
|
-
this.streamInfo.crc32 =
|
|
485
|
-
}, r.exports =
|
|
483
|
+
t("../utils").inherits(o, n), o.prototype.processChunk = function(h) {
|
|
484
|
+
this.streamInfo.crc32 = i(h.data, this.streamInfo.crc32 || 0), this.push(h);
|
|
485
|
+
}, r.exports = o;
|
|
486
486
|
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(t, r, a) {
|
|
487
|
-
var n = t("../utils"),
|
|
488
|
-
function
|
|
489
|
-
|
|
487
|
+
var n = t("../utils"), i = t("./GenericWorker");
|
|
488
|
+
function o(h) {
|
|
489
|
+
i.call(this, "DataLengthProbe for " + h), this.propName = h, this.withStreamInfo(h, 0);
|
|
490
490
|
}
|
|
491
|
-
n.inherits(
|
|
491
|
+
n.inherits(o, i), o.prototype.processChunk = function(h) {
|
|
492
492
|
if (h) {
|
|
493
493
|
var _ = this.streamInfo[this.propName] || 0;
|
|
494
494
|
this.streamInfo[this.propName] = _ + h.data.length;
|
|
495
495
|
}
|
|
496
|
-
|
|
497
|
-
}, r.exports =
|
|
496
|
+
i.prototype.processChunk.call(this, h);
|
|
497
|
+
}, r.exports = o;
|
|
498
498
|
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(t, r, a) {
|
|
499
|
-
var n = t("../utils"),
|
|
500
|
-
function
|
|
501
|
-
|
|
499
|
+
var n = t("../utils"), i = t("./GenericWorker");
|
|
500
|
+
function o(h) {
|
|
501
|
+
i.call(this, "DataWorker");
|
|
502
502
|
var _ = this;
|
|
503
503
|
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, h.then(function(S) {
|
|
504
504
|
_.dataIsReady = !0, _.data = S, _.max = S && S.length || 0, _.type = n.getTypeOf(S), _.isPaused || _._tickAndRepeat();
|
|
@@ -506,13 +506,13 @@ function we() {
|
|
|
506
506
|
_.error(S);
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
|
-
n.inherits(
|
|
510
|
-
|
|
511
|
-
},
|
|
512
|
-
return !!
|
|
513
|
-
},
|
|
509
|
+
n.inherits(o, i), o.prototype.cleanUp = function() {
|
|
510
|
+
i.prototype.cleanUp.call(this), this.data = null;
|
|
511
|
+
}, o.prototype.resume = function() {
|
|
512
|
+
return !!i.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, n.delay(this._tickAndRepeat, [], this)), !0);
|
|
513
|
+
}, o.prototype._tickAndRepeat = function() {
|
|
514
514
|
this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (n.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
|
|
515
|
-
},
|
|
515
|
+
}, o.prototype._tick = function() {
|
|
516
516
|
if (this.isPaused || this.isFinished) return !1;
|
|
517
517
|
var h = null, _ = Math.min(this.max, this.index + 16384);
|
|
518
518
|
if (this.index >= this.max) return this.end();
|
|
@@ -528,65 +528,65 @@ function we() {
|
|
|
528
528
|
h = this.data.slice(this.index, _);
|
|
529
529
|
}
|
|
530
530
|
return this.index = _, this.push({ data: h, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
531
|
-
}, r.exports =
|
|
531
|
+
}, r.exports = o;
|
|
532
532
|
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(t, r, a) {
|
|
533
|
-
function n(
|
|
534
|
-
this.name =
|
|
533
|
+
function n(i) {
|
|
534
|
+
this.name = i || "default", this.streamInfo = {}, this.generatedError = null, this.extraStreamInfo = {}, this.isPaused = !0, this.isFinished = !1, this.isLocked = !1, this._listeners = { data: [], end: [], error: [] }, this.previous = null;
|
|
535
535
|
}
|
|
536
|
-
n.prototype = { push: function(
|
|
537
|
-
this.emit("data",
|
|
536
|
+
n.prototype = { push: function(i) {
|
|
537
|
+
this.emit("data", i);
|
|
538
538
|
}, end: function() {
|
|
539
539
|
if (this.isFinished) return !1;
|
|
540
540
|
this.flush();
|
|
541
541
|
try {
|
|
542
542
|
this.emit("end"), this.cleanUp(), this.isFinished = !0;
|
|
543
|
-
} catch (
|
|
544
|
-
this.emit("error",
|
|
543
|
+
} catch (i) {
|
|
544
|
+
this.emit("error", i);
|
|
545
545
|
}
|
|
546
546
|
return !0;
|
|
547
|
-
}, error: function(
|
|
548
|
-
return !this.isFinished && (this.isPaused ? this.generatedError =
|
|
549
|
-
}, on: function(
|
|
550
|
-
return this._listeners[
|
|
547
|
+
}, error: function(i) {
|
|
548
|
+
return !this.isFinished && (this.isPaused ? this.generatedError = i : (this.isFinished = !0, this.emit("error", i), this.previous && this.previous.error(i), this.cleanUp()), !0);
|
|
549
|
+
}, on: function(i, o) {
|
|
550
|
+
return this._listeners[i].push(o), this;
|
|
551
551
|
}, cleanUp: function() {
|
|
552
552
|
this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
|
|
553
|
-
}, emit: function(
|
|
554
|
-
if (this._listeners[
|
|
555
|
-
}, pipe: function(
|
|
556
|
-
return
|
|
557
|
-
}, registerPrevious: function(
|
|
553
|
+
}, emit: function(i, o) {
|
|
554
|
+
if (this._listeners[i]) for (var h = 0; h < this._listeners[i].length; h++) this._listeners[i][h].call(this, o);
|
|
555
|
+
}, pipe: function(i) {
|
|
556
|
+
return i.registerPrevious(this);
|
|
557
|
+
}, registerPrevious: function(i) {
|
|
558
558
|
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
559
|
-
this.streamInfo =
|
|
560
|
-
var
|
|
561
|
-
return
|
|
562
|
-
|
|
563
|
-
}),
|
|
564
|
-
|
|
565
|
-
}),
|
|
566
|
-
|
|
559
|
+
this.streamInfo = i.streamInfo, this.mergeStreamInfo(), this.previous = i;
|
|
560
|
+
var o = this;
|
|
561
|
+
return i.on("data", function(h) {
|
|
562
|
+
o.processChunk(h);
|
|
563
|
+
}), i.on("end", function() {
|
|
564
|
+
o.end();
|
|
565
|
+
}), i.on("error", function(h) {
|
|
566
|
+
o.error(h);
|
|
567
567
|
}), this;
|
|
568
568
|
}, pause: function() {
|
|
569
569
|
return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
|
|
570
570
|
}, resume: function() {
|
|
571
571
|
if (!this.isPaused || this.isFinished) return !1;
|
|
572
|
-
var
|
|
573
|
-
return this.generatedError && (this.error(this.generatedError),
|
|
572
|
+
var i = this.isPaused = !1;
|
|
573
|
+
return this.generatedError && (this.error(this.generatedError), i = !0), this.previous && this.previous.resume(), !i;
|
|
574
574
|
}, flush: function() {
|
|
575
|
-
}, processChunk: function(
|
|
576
|
-
this.push(
|
|
577
|
-
}, withStreamInfo: function(
|
|
578
|
-
return this.extraStreamInfo[
|
|
575
|
+
}, processChunk: function(i) {
|
|
576
|
+
this.push(i);
|
|
577
|
+
}, withStreamInfo: function(i, o) {
|
|
578
|
+
return this.extraStreamInfo[i] = o, this.mergeStreamInfo(), this;
|
|
579
579
|
}, mergeStreamInfo: function() {
|
|
580
|
-
for (var
|
|
580
|
+
for (var i in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, i) && (this.streamInfo[i] = this.extraStreamInfo[i]);
|
|
581
581
|
}, lock: function() {
|
|
582
582
|
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
583
583
|
this.isLocked = !0, this.previous && this.previous.lock();
|
|
584
584
|
}, toString: function() {
|
|
585
|
-
var
|
|
586
|
-
return this.previous ? this.previous + " -> " +
|
|
585
|
+
var i = "Worker " + this.name;
|
|
586
|
+
return this.previous ? this.previous + " -> " + i : i;
|
|
587
587
|
} }, r.exports = n;
|
|
588
588
|
}, {}], 29: [function(t, r, a) {
|
|
589
|
-
var n = t("../utils"),
|
|
589
|
+
var n = t("../utils"), i = t("./ConvertWorker"), o = t("./GenericWorker"), h = t("../base64"), _ = t("../support"), S = t("../external"), v = null;
|
|
590
590
|
if (_.nodestream) try {
|
|
591
591
|
v = t("../nodejs/NodejsStreamOutputAdapter");
|
|
592
592
|
} catch {
|
|
@@ -645,9 +645,9 @@ function we() {
|
|
|
645
645
|
f = "string";
|
|
646
646
|
}
|
|
647
647
|
try {
|
|
648
|
-
this._internalType = f, this._outputType = u, this._mimeType = m, n.checkSupport(f), this._worker = k.pipe(new
|
|
648
|
+
this._internalType = f, this._outputType = u, this._mimeType = m, n.checkSupport(f), this._worker = k.pipe(new i(f)), k.lock();
|
|
649
649
|
} catch (b) {
|
|
650
|
-
this._worker = new
|
|
650
|
+
this._worker = new o("error"), this._worker.error(b);
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
653
|
d.prototype = { accumulate: function(k) {
|
|
@@ -675,8 +675,8 @@ function we() {
|
|
|
675
675
|
a.blob = new Blob([n], { type: "application/zip" }).size === 0;
|
|
676
676
|
} catch {
|
|
677
677
|
try {
|
|
678
|
-
var
|
|
679
|
-
|
|
678
|
+
var i = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
679
|
+
i.append(n), a.blob = i.getBlob("application/zip").size === 0;
|
|
680
680
|
} catch {
|
|
681
681
|
a.blob = !1;
|
|
682
682
|
}
|
|
@@ -688,7 +688,7 @@ function we() {
|
|
|
688
688
|
a.nodestream = !1;
|
|
689
689
|
}
|
|
690
690
|
}, { "readable-stream": 16 }], 31: [function(t, r, a) {
|
|
691
|
-
for (var n = t("./utils"),
|
|
691
|
+
for (var n = t("./utils"), i = t("./support"), o = t("./nodejsUtils"), h = t("./stream/GenericWorker"), _ = new Array(256), S = 0; S < 256; S++) _[S] = 252 <= S ? 6 : 248 <= S ? 5 : 240 <= S ? 4 : 224 <= S ? 3 : 192 <= S ? 2 : 1;
|
|
692
692
|
_[254] = _[254] = 1;
|
|
693
693
|
function v() {
|
|
694
694
|
h.call(this, "utf-8 decode"), this.leftOver = null;
|
|
@@ -697,14 +697,14 @@ function we() {
|
|
|
697
697
|
h.call(this, "utf-8 encode");
|
|
698
698
|
}
|
|
699
699
|
a.utf8encode = function(d) {
|
|
700
|
-
return
|
|
700
|
+
return i.nodebuffer ? o.newBufferFrom(d, "utf-8") : (function(k) {
|
|
701
701
|
var u, m, f, b, x, E = k.length, A = 0;
|
|
702
702
|
for (b = 0; b < E; b++) (64512 & (m = k.charCodeAt(b))) == 55296 && b + 1 < E && (64512 & (f = k.charCodeAt(b + 1))) == 56320 && (m = 65536 + (m - 55296 << 10) + (f - 56320), b++), A += m < 128 ? 1 : m < 2048 ? 2 : m < 65536 ? 3 : 4;
|
|
703
|
-
for (u =
|
|
703
|
+
for (u = i.uint8array ? new Uint8Array(A) : new Array(A), b = x = 0; x < A; b++) (64512 & (m = k.charCodeAt(b))) == 55296 && b + 1 < E && (64512 & (f = k.charCodeAt(b + 1))) == 56320 && (m = 65536 + (m - 55296 << 10) + (f - 56320), b++), 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);
|
|
704
704
|
return u;
|
|
705
705
|
})(d);
|
|
706
706
|
}, a.utf8decode = function(d) {
|
|
707
|
-
return
|
|
707
|
+
return i.nodebuffer ? n.transformTo("nodebuffer", d).toString("utf-8") : (function(k) {
|
|
708
708
|
var u, m, f, b, x = k.length, E = new Array(2 * x);
|
|
709
709
|
for (u = m = 0; u < x; ) if ((f = k[u++]) < 128) E[m++] = f;
|
|
710
710
|
else if (4 < (b = _[f])) E[m++] = 65533, u += b - 1;
|
|
@@ -713,11 +713,11 @@ function we() {
|
|
|
713
713
|
1 < b ? E[m++] = 65533 : f < 65536 ? E[m++] = f : (f -= 65536, E[m++] = 55296 | f >> 10 & 1023, E[m++] = 56320 | 1023 & f);
|
|
714
714
|
}
|
|
715
715
|
return E.length !== m && (E.subarray ? E = E.subarray(0, m) : E.length = m), n.applyFromCharCode(E);
|
|
716
|
-
})(d = n.transformTo(
|
|
716
|
+
})(d = n.transformTo(i.uint8array ? "uint8array" : "array", d));
|
|
717
717
|
}, n.inherits(v, h), v.prototype.processChunk = function(d) {
|
|
718
|
-
var k = n.transformTo(
|
|
718
|
+
var k = n.transformTo(i.uint8array ? "uint8array" : "array", d.data);
|
|
719
719
|
if (this.leftOver && this.leftOver.length) {
|
|
720
|
-
if (
|
|
720
|
+
if (i.uint8array) {
|
|
721
721
|
var u = k;
|
|
722
722
|
(k = new Uint8Array(u.length + this.leftOver.length)).set(this.leftOver, 0), k.set(u, this.leftOver.length);
|
|
723
723
|
} else k = this.leftOver.concat(k);
|
|
@@ -728,14 +728,14 @@ function we() {
|
|
|
728
728
|
for ((x = x || b.length) > b.length && (x = b.length), E = x - 1; 0 <= E && (192 & b[E]) == 128; ) E--;
|
|
729
729
|
return E < 0 || E === 0 ? x : E + _[b[E]] > x ? E : x;
|
|
730
730
|
})(k), f = k;
|
|
731
|
-
m !== k.length && (
|
|
731
|
+
m !== k.length && (i.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: a.utf8decode(f), meta: d.meta });
|
|
732
732
|
}, v.prototype.flush = function() {
|
|
733
733
|
this.leftOver && this.leftOver.length && (this.push({ data: a.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
734
734
|
}, a.Utf8DecodeWorker = v, n.inherits(y, h), y.prototype.processChunk = function(d) {
|
|
735
735
|
this.push({ data: a.utf8encode(d.data), meta: d.meta });
|
|
736
736
|
}, a.Utf8EncodeWorker = y;
|
|
737
737
|
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(t, r, a) {
|
|
738
|
-
var n = t("./support"),
|
|
738
|
+
var n = t("./support"), i = t("./base64"), o = t("./nodejsUtils"), h = t("./external");
|
|
739
739
|
function _(u) {
|
|
740
740
|
return u;
|
|
741
741
|
}
|
|
@@ -772,7 +772,7 @@ function we() {
|
|
|
772
772
|
}
|
|
773
773
|
})(), nodebuffer: (function() {
|
|
774
774
|
try {
|
|
775
|
-
return n.nodebuffer && String.fromCharCode.apply(null,
|
|
775
|
+
return n.nodebuffer && String.fromCharCode.apply(null, o.allocBuffer(1)).length === 1;
|
|
776
776
|
} catch {
|
|
777
777
|
return !1;
|
|
778
778
|
}
|
|
@@ -799,13 +799,13 @@ function we() {
|
|
|
799
799
|
}, uint8array: function(u) {
|
|
800
800
|
return S(u, new Uint8Array(u.length));
|
|
801
801
|
}, nodebuffer: function(u) {
|
|
802
|
-
return S(u,
|
|
802
|
+
return S(u, o.allocBuffer(u.length));
|
|
803
803
|
} }, k.array = { string: y, array: _, arraybuffer: function(u) {
|
|
804
804
|
return new Uint8Array(u).buffer;
|
|
805
805
|
}, uint8array: function(u) {
|
|
806
806
|
return new Uint8Array(u);
|
|
807
807
|
}, nodebuffer: function(u) {
|
|
808
|
-
return
|
|
808
|
+
return o.newBufferFrom(u);
|
|
809
809
|
} }, k.arraybuffer = { string: function(u) {
|
|
810
810
|
return y(new Uint8Array(u));
|
|
811
811
|
}, array: function(u) {
|
|
@@ -813,13 +813,13 @@ function we() {
|
|
|
813
813
|
}, arraybuffer: _, uint8array: function(u) {
|
|
814
814
|
return new Uint8Array(u);
|
|
815
815
|
}, nodebuffer: function(u) {
|
|
816
|
-
return
|
|
816
|
+
return o.newBufferFrom(new Uint8Array(u));
|
|
817
817
|
} }, k.uint8array = { string: y, array: function(u) {
|
|
818
818
|
return d(u, new Array(u.length));
|
|
819
819
|
}, arraybuffer: function(u) {
|
|
820
820
|
return u.buffer;
|
|
821
821
|
}, uint8array: _, nodebuffer: function(u) {
|
|
822
|
-
return
|
|
822
|
+
return o.newBufferFrom(u);
|
|
823
823
|
} }, k.nodebuffer = { string: y, array: function(u) {
|
|
824
824
|
return d(u, new Array(u.length));
|
|
825
825
|
}, arraybuffer: function(u) {
|
|
@@ -838,7 +838,7 @@ function we() {
|
|
|
838
838
|
}
|
|
839
839
|
return f.join("/");
|
|
840
840
|
}, a.getTypeOf = function(u) {
|
|
841
|
-
return typeof u == "string" ? "string" : Object.prototype.toString.call(u) === "[object Array]" ? "array" : n.nodebuffer &&
|
|
841
|
+
return typeof u == "string" ? "string" : Object.prototype.toString.call(u) === "[object Array]" ? "array" : n.nodebuffer && o.isBuffer(u) ? "nodebuffer" : n.uint8array && u instanceof Uint8Array ? "uint8array" : n.arraybuffer && u instanceof ArrayBuffer ? "arraybuffer" : void 0;
|
|
842
842
|
}, a.checkSupport = function(u) {
|
|
843
843
|
if (!n[u.toLowerCase()]) throw new Error(u + " is not supported by this platform");
|
|
844
844
|
}, a.MAX_VALUE_16BITS = 65535, a.MAX_VALUE_32BITS = -1, a.pretty = function(u) {
|
|
@@ -869,13 +869,13 @@ function we() {
|
|
|
869
869
|
}) : E;
|
|
870
870
|
}).then(function(E) {
|
|
871
871
|
var A = a.getTypeOf(E);
|
|
872
|
-
return A ? (A === "arraybuffer" ? E = a.transformTo("uint8array", E) : A === "string" && (x ? E =
|
|
872
|
+
return A ? (A === "arraybuffer" ? E = a.transformTo("uint8array", E) : A === "string" && (x ? E = i.decode(E) : f && b !== !0 && (E = (function(L) {
|
|
873
873
|
return S(L, n.uint8array ? new Uint8Array(L.length) : new Array(L.length));
|
|
874
874
|
})(E))), E) : h.Promise.reject(new Error("Can't read the data of '" + u + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
875
875
|
});
|
|
876
876
|
};
|
|
877
877
|
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(t, r, a) {
|
|
878
|
-
var n = t("./reader/readerFor"),
|
|
878
|
+
var n = t("./reader/readerFor"), i = t("./utils"), o = t("./signature"), h = t("./zipEntry"), _ = t("./support");
|
|
879
879
|
function S(v) {
|
|
880
880
|
this.files = [], this.loadOptions = v;
|
|
881
881
|
}
|
|
@@ -883,7 +883,7 @@ function we() {
|
|
|
883
883
|
if (!this.reader.readAndCheckSignature(v)) {
|
|
884
884
|
this.reader.index -= 4;
|
|
885
885
|
var y = this.reader.readString(4);
|
|
886
|
-
throw new Error("Corrupted zip or bug: unexpected signature (" +
|
|
886
|
+
throw new Error("Corrupted zip or bug: unexpected signature (" + i.pretty(y) + ", expected " + i.pretty(v) + ")");
|
|
887
887
|
}
|
|
888
888
|
}, isSignature: function(v, y) {
|
|
889
889
|
var d = this.reader.index;
|
|
@@ -892,7 +892,7 @@ function we() {
|
|
|
892
892
|
return this.reader.setIndex(d), k;
|
|
893
893
|
}, readBlockEndOfCentral: function() {
|
|
894
894
|
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);
|
|
895
|
-
var v = this.reader.readData(this.zipCommentLength), y = _.uint8array ? "uint8array" : "array", d =
|
|
895
|
+
var v = this.reader.readData(this.zipCommentLength), y = _.uint8array ? "uint8array" : "array", d = i.transformTo(y, v);
|
|
896
896
|
this.zipComment = this.loadOptions.decodeFileName(d);
|
|
897
897
|
}, readBlockZip64EndOfCentral: function() {
|
|
898
898
|
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 = {};
|
|
@@ -901,25 +901,25 @@ function we() {
|
|
|
901
901
|
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");
|
|
902
902
|
}, readLocalFiles: function() {
|
|
903
903
|
var v, y;
|
|
904
|
-
for (v = 0; v < this.files.length; v++) y = this.files[v], this.reader.setIndex(y.localHeaderOffset), this.checkSignature(
|
|
904
|
+
for (v = 0; v < this.files.length; v++) y = this.files[v], this.reader.setIndex(y.localHeaderOffset), this.checkSignature(o.LOCAL_FILE_HEADER), y.readLocalPart(this.reader), y.handleUTF8(), y.processAttributes();
|
|
905
905
|
}, readCentralDir: function() {
|
|
906
906
|
var v;
|
|
907
|
-
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(
|
|
907
|
+
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER); ) (v = new h({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(v);
|
|
908
908
|
if (this.centralDirRecords !== this.files.length && this.centralDirRecords !== 0 && this.files.length === 0) throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length);
|
|
909
909
|
}, readEndOfCentral: function() {
|
|
910
|
-
var v = this.reader.lastIndexOfSignature(
|
|
911
|
-
if (v < 0) throw this.isSignature(0,
|
|
910
|
+
var v = this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);
|
|
911
|
+
if (v < 0) throw this.isSignature(0, o.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");
|
|
912
912
|
this.reader.setIndex(v);
|
|
913
913
|
var y = v;
|
|
914
|
-
if (this.checkSignature(
|
|
915
|
-
if (this.zip64 = !0, (v = this.reader.lastIndexOfSignature(
|
|
916
|
-
if (this.reader.setIndex(v), this.checkSignature(
|
|
917
|
-
this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(
|
|
914
|
+
if (this.checkSignature(o.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === i.MAX_VALUE_16BITS || this.diskWithCentralDirStart === i.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === i.MAX_VALUE_16BITS || this.centralDirRecords === i.MAX_VALUE_16BITS || this.centralDirSize === i.MAX_VALUE_32BITS || this.centralDirOffset === i.MAX_VALUE_32BITS) {
|
|
915
|
+
if (this.zip64 = !0, (v = this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
916
|
+
if (this.reader.setIndex(v), this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, o.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
|
|
917
|
+
this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
|
|
918
918
|
}
|
|
919
919
|
var d = this.centralDirOffset + this.centralDirSize;
|
|
920
920
|
this.zip64 && (d += 20, d += 12 + this.zip64EndOfCentralSize);
|
|
921
921
|
var k = y - d;
|
|
922
|
-
if (0 < k) this.isSignature(y,
|
|
922
|
+
if (0 < k) this.isSignature(y, o.CENTRAL_FILE_HEADER) || (this.reader.zero = k);
|
|
923
923
|
else if (k < 0) throw new Error("Corrupted zip: missing " + Math.abs(k) + " bytes.");
|
|
924
924
|
}, prepareReader: function(v) {
|
|
925
925
|
this.reader = n(v);
|
|
@@ -927,7 +927,7 @@ function we() {
|
|
|
927
927
|
this.prepareReader(v), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
928
928
|
} }, r.exports = S;
|
|
929
929
|
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(t, r, a) {
|
|
930
|
-
var n = t("./reader/readerFor"),
|
|
930
|
+
var n = t("./reader/readerFor"), i = t("./utils"), o = t("./compressedObject"), h = t("./crc32"), _ = t("./utf8"), S = t("./compressions"), v = t("./support");
|
|
931
931
|
function y(d, k) {
|
|
932
932
|
this.options = d, this.loadOptions = k;
|
|
933
933
|
}
|
|
@@ -941,8 +941,8 @@ function we() {
|
|
|
941
941
|
if ((k = (function(m) {
|
|
942
942
|
for (var f in S) if (Object.prototype.hasOwnProperty.call(S, f) && S[f].magic === m) return S[f];
|
|
943
943
|
return null;
|
|
944
|
-
})(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " +
|
|
945
|
-
this.decompressed = new
|
|
944
|
+
})(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " + i.pretty(this.compressionMethod) + " unknown (inner file : " + i.transformTo("string", this.fileName) + ")");
|
|
945
|
+
this.decompressed = new o(this.compressedSize, this.uncompressedSize, this.crc32, k, d.readData(this.compressedSize));
|
|
946
946
|
}, readCentralPart: function(d) {
|
|
947
947
|
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);
|
|
948
948
|
var k = d.readInt(2);
|
|
@@ -955,7 +955,7 @@ function we() {
|
|
|
955
955
|
}, parseZIP64ExtraField: function() {
|
|
956
956
|
if (this.extraFields[1]) {
|
|
957
957
|
var d = n(this.extraFields[1].value);
|
|
958
|
-
this.uncompressedSize ===
|
|
958
|
+
this.uncompressedSize === i.MAX_VALUE_32BITS && (this.uncompressedSize = d.readInt(8)), this.compressedSize === i.MAX_VALUE_32BITS && (this.compressedSize = d.readInt(8)), this.localHeaderOffset === i.MAX_VALUE_32BITS && (this.localHeaderOffset = d.readInt(8)), this.diskNumberStart === i.MAX_VALUE_32BITS && (this.diskNumberStart = d.readInt(4));
|
|
959
959
|
}
|
|
960
960
|
}, readExtraFields: function(d) {
|
|
961
961
|
var k, u, m, f = d.index + this.extraFieldsLength;
|
|
@@ -968,13 +968,13 @@ function we() {
|
|
|
968
968
|
var k = this.findExtraFieldUnicodePath();
|
|
969
969
|
if (k !== null) this.fileNameStr = k;
|
|
970
970
|
else {
|
|
971
|
-
var u =
|
|
971
|
+
var u = i.transformTo(d, this.fileName);
|
|
972
972
|
this.fileNameStr = this.loadOptions.decodeFileName(u);
|
|
973
973
|
}
|
|
974
974
|
var m = this.findExtraFieldUnicodeComment();
|
|
975
975
|
if (m !== null) this.fileCommentStr = m;
|
|
976
976
|
else {
|
|
977
|
-
var f =
|
|
977
|
+
var f = i.transformTo(d, this.fileComment);
|
|
978
978
|
this.fileCommentStr = this.loadOptions.decodeFileName(f);
|
|
979
979
|
}
|
|
980
980
|
}
|
|
@@ -997,7 +997,7 @@ function we() {
|
|
|
997
997
|
function n(k, u, m) {
|
|
998
998
|
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 };
|
|
999
999
|
}
|
|
1000
|
-
var
|
|
1000
|
+
var i = t("./stream/StreamHelper"), o = t("./stream/DataWorker"), h = t("./utf8"), _ = t("./compressedObject"), S = t("./stream/GenericWorker");
|
|
1001
1001
|
n.prototype = { internalStream: function(k) {
|
|
1002
1002
|
var u = null, m = "string";
|
|
1003
1003
|
try {
|
|
@@ -1009,7 +1009,7 @@ function we() {
|
|
|
1009
1009
|
} catch (x) {
|
|
1010
1010
|
(u = new S("error")).error(x);
|
|
1011
1011
|
}
|
|
1012
|
-
return new
|
|
1012
|
+
return new i(u, m, "");
|
|
1013
1013
|
}, async: function(k, u) {
|
|
1014
1014
|
return this.internalStream(k).accumulate(u);
|
|
1015
1015
|
}, nodeStream: function(k, u) {
|
|
@@ -1019,7 +1019,7 @@ function we() {
|
|
|
1019
1019
|
var m = this._decompressWorker();
|
|
1020
1020
|
return this._dataBinary || (m = m.pipe(new h.Utf8EncodeWorker())), _.createWorkerFrom(m, k, u);
|
|
1021
1021
|
}, _decompressWorker: function() {
|
|
1022
|
-
return this._data instanceof _ ? this._data.getContentWorker() : this._data instanceof S ? this._data : new
|
|
1022
|
+
return this._data instanceof _ ? this._data.getContentWorker() : this._data instanceof S ? this._data : new o(this._data);
|
|
1023
1023
|
} };
|
|
1024
1024
|
for (var v = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], y = function() {
|
|
1025
1025
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
@@ -1027,13 +1027,13 @@ function we() {
|
|
|
1027
1027
|
r.exports = n;
|
|
1028
1028
|
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(t, r, a) {
|
|
1029
1029
|
(function(n) {
|
|
1030
|
-
var
|
|
1030
|
+
var i, o, h = n.MutationObserver || n.WebKitMutationObserver;
|
|
1031
1031
|
if (h) {
|
|
1032
1032
|
var _ = 0, S = new h(k), v = n.document.createTextNode("");
|
|
1033
|
-
S.observe(v, { characterData: !0 }),
|
|
1033
|
+
S.observe(v, { characterData: !0 }), i = function() {
|
|
1034
1034
|
v.data = _ = ++_ % 2;
|
|
1035
1035
|
};
|
|
1036
|
-
} else if (n.setImmediate || n.MessageChannel === void 0)
|
|
1036
|
+
} else if (n.setImmediate || n.MessageChannel === void 0) i = "document" in n && "onreadystatechange" in n.document.createElement("script") ? function() {
|
|
1037
1037
|
var u = n.document.createElement("script");
|
|
1038
1038
|
u.onreadystatechange = function() {
|
|
1039
1039
|
k(), u.onreadystatechange = null, u.parentNode.removeChild(u), u = null;
|
|
@@ -1043,32 +1043,32 @@ function we() {
|
|
|
1043
1043
|
};
|
|
1044
1044
|
else {
|
|
1045
1045
|
var y = new n.MessageChannel();
|
|
1046
|
-
y.port1.onmessage = k,
|
|
1046
|
+
y.port1.onmessage = k, i = function() {
|
|
1047
1047
|
y.port2.postMessage(0);
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
1050
|
var d = [];
|
|
1051
1051
|
function k() {
|
|
1052
1052
|
var u, m;
|
|
1053
|
-
|
|
1053
|
+
o = !0;
|
|
1054
1054
|
for (var f = d.length; f; ) {
|
|
1055
1055
|
for (m = d, d = [], u = -1; ++u < f; ) m[u]();
|
|
1056
1056
|
f = d.length;
|
|
1057
1057
|
}
|
|
1058
|
-
|
|
1058
|
+
o = !1;
|
|
1059
1059
|
}
|
|
1060
1060
|
r.exports = function(u) {
|
|
1061
|
-
d.push(u) !== 1 ||
|
|
1061
|
+
d.push(u) !== 1 || o || i();
|
|
1062
1062
|
};
|
|
1063
1063
|
}).call(this, typeof zt < "u" ? zt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1064
1064
|
}, {}], 37: [function(t, r, a) {
|
|
1065
1065
|
var n = t("immediate");
|
|
1066
|
-
function
|
|
1066
|
+
function i() {
|
|
1067
1067
|
}
|
|
1068
|
-
var
|
|
1068
|
+
var o = {}, h = ["REJECTED"], _ = ["FULFILLED"], S = ["PENDING"];
|
|
1069
1069
|
function v(f) {
|
|
1070
1070
|
if (typeof f != "function") throw new TypeError("resolver must be a function");
|
|
1071
|
-
this.state = S, this.queue = [], this.outcome = void 0, f !==
|
|
1071
|
+
this.state = S, this.queue = [], this.outcome = void 0, f !== i && u(this, f);
|
|
1072
1072
|
}
|
|
1073
1073
|
function y(f, b, x) {
|
|
1074
1074
|
this.promise = f, typeof b == "function" && (this.onFulfilled = b, this.callFulfilled = this.otherCallFulfilled), typeof x == "function" && (this.onRejected = x, this.callRejected = this.otherCallRejected);
|
|
@@ -1079,9 +1079,9 @@ function we() {
|
|
|
1079
1079
|
try {
|
|
1080
1080
|
E = b(x);
|
|
1081
1081
|
} catch (A) {
|
|
1082
|
-
return
|
|
1082
|
+
return o.reject(f, A);
|
|
1083
1083
|
}
|
|
1084
|
-
E === f ?
|
|
1084
|
+
E === f ? o.reject(f, new TypeError("Cannot resolve promise with itself")) : o.resolve(f, E);
|
|
1085
1085
|
});
|
|
1086
1086
|
}
|
|
1087
1087
|
function k(f) {
|
|
@@ -1093,10 +1093,10 @@ function we() {
|
|
|
1093
1093
|
function u(f, b) {
|
|
1094
1094
|
var x = !1;
|
|
1095
1095
|
function E(F) {
|
|
1096
|
-
x || (x = !0,
|
|
1096
|
+
x || (x = !0, o.reject(f, F));
|
|
1097
1097
|
}
|
|
1098
1098
|
function A(F) {
|
|
1099
|
-
x || (x = !0,
|
|
1099
|
+
x || (x = !0, o.resolve(f, F));
|
|
1100
1100
|
}
|
|
1101
1101
|
var L = m(function() {
|
|
1102
1102
|
b(A, E);
|
|
@@ -1128,19 +1128,19 @@ function we() {
|
|
|
1128
1128
|
return this.then(null, f);
|
|
1129
1129
|
}, v.prototype.then = function(f, b) {
|
|
1130
1130
|
if (typeof f != "function" && this.state === _ || typeof b != "function" && this.state === h) return this;
|
|
1131
|
-
var x = new this.constructor(
|
|
1131
|
+
var x = new this.constructor(i);
|
|
1132
1132
|
return this.state !== S ? d(x, this.state === _ ? f : b, this.outcome) : this.queue.push(new y(x, f, b)), x;
|
|
1133
1133
|
}, y.prototype.callFulfilled = function(f) {
|
|
1134
|
-
|
|
1134
|
+
o.resolve(this.promise, f);
|
|
1135
1135
|
}, y.prototype.otherCallFulfilled = function(f) {
|
|
1136
1136
|
d(this.promise, this.onFulfilled, f);
|
|
1137
1137
|
}, y.prototype.callRejected = function(f) {
|
|
1138
|
-
|
|
1138
|
+
o.reject(this.promise, f);
|
|
1139
1139
|
}, y.prototype.otherCallRejected = function(f) {
|
|
1140
1140
|
d(this.promise, this.onRejected, f);
|
|
1141
|
-
},
|
|
1141
|
+
}, o.resolve = function(f, b) {
|
|
1142
1142
|
var x = m(k, b);
|
|
1143
|
-
if (x.status === "error") return
|
|
1143
|
+
if (x.status === "error") return o.reject(f, x.value);
|
|
1144
1144
|
var E = x.value;
|
|
1145
1145
|
if (E) u(f, E);
|
|
1146
1146
|
else {
|
|
@@ -1148,27 +1148,27 @@ function we() {
|
|
|
1148
1148
|
for (var A = -1, L = f.queue.length; ++A < L; ) f.queue[A].callFulfilled(b);
|
|
1149
1149
|
}
|
|
1150
1150
|
return f;
|
|
1151
|
-
},
|
|
1151
|
+
}, o.reject = function(f, b) {
|
|
1152
1152
|
f.state = h, f.outcome = b;
|
|
1153
1153
|
for (var x = -1, E = f.queue.length; ++x < E; ) f.queue[x].callRejected(b);
|
|
1154
1154
|
return f;
|
|
1155
1155
|
}, v.resolve = function(f) {
|
|
1156
|
-
return f instanceof this ? f :
|
|
1156
|
+
return f instanceof this ? f : o.resolve(new this(i), f);
|
|
1157
1157
|
}, v.reject = function(f) {
|
|
1158
|
-
var b = new this(
|
|
1159
|
-
return
|
|
1158
|
+
var b = new this(i);
|
|
1159
|
+
return o.reject(b, f);
|
|
1160
1160
|
}, v.all = function(f) {
|
|
1161
1161
|
var b = this;
|
|
1162
1162
|
if (Object.prototype.toString.call(f) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1163
1163
|
var x = f.length, E = !1;
|
|
1164
1164
|
if (!x) return this.resolve([]);
|
|
1165
|
-
for (var A = new Array(x), L = 0, F = -1, H = new this(
|
|
1165
|
+
for (var A = new Array(x), L = 0, F = -1, H = new this(i); ++F < x; ) T(f[F], F);
|
|
1166
1166
|
return H;
|
|
1167
1167
|
function T(V, Q) {
|
|
1168
1168
|
b.resolve(V).then(function(w) {
|
|
1169
|
-
A[Q] = w, ++L !== x || E || (E = !0,
|
|
1169
|
+
A[Q] = w, ++L !== x || E || (E = !0, o.resolve(H, A));
|
|
1170
1170
|
}, function(w) {
|
|
1171
|
-
E || (E = !0,
|
|
1171
|
+
E || (E = !0, o.reject(H, w));
|
|
1172
1172
|
});
|
|
1173
1173
|
}
|
|
1174
1174
|
}, v.race = function(f) {
|
|
@@ -1176,10 +1176,10 @@ function we() {
|
|
|
1176
1176
|
if (Object.prototype.toString.call(f) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1177
1177
|
var x = f.length, E = !1;
|
|
1178
1178
|
if (!x) return this.resolve([]);
|
|
1179
|
-
for (var A = -1, L = new this(
|
|
1180
|
-
E || (E = !0,
|
|
1179
|
+
for (var A = -1, L = new this(i); ++A < x; ) F = f[A], b.resolve(F).then(function(H) {
|
|
1180
|
+
E || (E = !0, o.resolve(L, H));
|
|
1181
1181
|
}, function(H) {
|
|
1182
|
-
E || (E = !0,
|
|
1182
|
+
E || (E = !0, o.reject(L, H));
|
|
1183
1183
|
});
|
|
1184
1184
|
var F;
|
|
1185
1185
|
return L;
|
|
@@ -1188,17 +1188,17 @@ function we() {
|
|
|
1188
1188
|
var n = {};
|
|
1189
1189
|
(0, t("./lib/utils/common").assign)(n, t("./lib/deflate"), t("./lib/inflate"), t("./lib/zlib/constants")), r.exports = n;
|
|
1190
1190
|
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(t, r, a) {
|
|
1191
|
-
var n = t("./zlib/deflate"),
|
|
1191
|
+
var n = t("./zlib/deflate"), i = t("./utils/common"), o = t("./utils/strings"), h = t("./zlib/messages"), _ = t("./zlib/zstream"), S = Object.prototype.toString, v = 0, y = -1, d = 0, k = 8;
|
|
1192
1192
|
function u(f) {
|
|
1193
1193
|
if (!(this instanceof u)) return new u(f);
|
|
1194
|
-
this.options =
|
|
1194
|
+
this.options = i.assign({ level: y, method: k, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: d, to: "" }, f || {});
|
|
1195
1195
|
var b = this.options;
|
|
1196
1196
|
b.raw && 0 < b.windowBits ? b.windowBits = -b.windowBits : b.gzip && 0 < b.windowBits && b.windowBits < 16 && (b.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new _(), this.strm.avail_out = 0;
|
|
1197
1197
|
var x = n.deflateInit2(this.strm, b.level, b.method, b.windowBits, b.memLevel, b.strategy);
|
|
1198
1198
|
if (x !== v) throw new Error(h[x]);
|
|
1199
1199
|
if (b.header && n.deflateSetHeader(this.strm, b.header), b.dictionary) {
|
|
1200
1200
|
var E;
|
|
1201
|
-
if (E = typeof b.dictionary == "string" ?
|
|
1201
|
+
if (E = typeof b.dictionary == "string" ? o.string2buf(b.dictionary) : S.call(b.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(b.dictionary) : b.dictionary, (x = n.deflateSetDictionary(this.strm, E)) !== v) throw new Error(h[x]);
|
|
1202
1202
|
this._dict_set = !0;
|
|
1203
1203
|
}
|
|
1204
1204
|
}
|
|
@@ -1210,26 +1210,26 @@ function we() {
|
|
|
1210
1210
|
u.prototype.push = function(f, b) {
|
|
1211
1211
|
var x, E, A = this.strm, L = this.options.chunkSize;
|
|
1212
1212
|
if (this.ended) return !1;
|
|
1213
|
-
E = b === ~~b ? b : b === !0 ? 4 : 0, typeof f == "string" ? A.input =
|
|
1213
|
+
E = b === ~~b ? b : b === !0 ? 4 : 0, typeof f == "string" ? A.input = o.string2buf(f) : S.call(f) === "[object ArrayBuffer]" ? A.input = new Uint8Array(f) : A.input = f, A.next_in = 0, A.avail_in = A.input.length;
|
|
1214
1214
|
do {
|
|
1215
|
-
if (A.avail_out === 0 && (A.output = new
|
|
1216
|
-
A.avail_out !== 0 && (A.avail_in !== 0 || E !== 4 && E !== 2) || (this.options.to === "string" ? this.onData(
|
|
1215
|
+
if (A.avail_out === 0 && (A.output = new i.Buf8(L), A.next_out = 0, A.avail_out = L), (x = n.deflate(A, E)) !== 1 && x !== v) return this.onEnd(x), !(this.ended = !0);
|
|
1216
|
+
A.avail_out !== 0 && (A.avail_in !== 0 || E !== 4 && E !== 2) || (this.options.to === "string" ? this.onData(o.buf2binstring(i.shrinkBuf(A.output, A.next_out))) : this.onData(i.shrinkBuf(A.output, A.next_out)));
|
|
1217
1217
|
} while ((0 < A.avail_in || A.avail_out === 0) && x !== 1);
|
|
1218
1218
|
return E === 4 ? (x = n.deflateEnd(this.strm), this.onEnd(x), this.ended = !0, x === v) : E !== 2 || (this.onEnd(v), !(A.avail_out = 0));
|
|
1219
1219
|
}, u.prototype.onData = function(f) {
|
|
1220
1220
|
this.chunks.push(f);
|
|
1221
1221
|
}, u.prototype.onEnd = function(f) {
|
|
1222
|
-
f === v && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result =
|
|
1222
|
+
f === v && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = i.flattenChunks(this.chunks)), this.chunks = [], this.err = f, this.msg = this.strm.msg;
|
|
1223
1223
|
}, a.Deflate = u, a.deflate = m, a.deflateRaw = function(f, b) {
|
|
1224
1224
|
return (b = b || {}).raw = !0, m(f, b);
|
|
1225
1225
|
}, a.gzip = function(f, b) {
|
|
1226
1226
|
return (b = b || {}).gzip = !0, m(f, b);
|
|
1227
1227
|
};
|
|
1228
1228
|
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(t, r, a) {
|
|
1229
|
-
var n = t("./zlib/inflate"),
|
|
1229
|
+
var n = t("./zlib/inflate"), i = t("./utils/common"), o = t("./utils/strings"), h = t("./zlib/constants"), _ = t("./zlib/messages"), S = t("./zlib/zstream"), v = t("./zlib/gzheader"), y = Object.prototype.toString;
|
|
1230
1230
|
function d(u) {
|
|
1231
1231
|
if (!(this instanceof d)) return new d(u);
|
|
1232
|
-
this.options =
|
|
1232
|
+
this.options = i.assign({ chunkSize: 16384, windowBits: 0, to: "" }, u || {});
|
|
1233
1233
|
var m = this.options;
|
|
1234
1234
|
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 S(), this.strm.avail_out = 0;
|
|
1235
1235
|
var f = n.inflateInit2(this.strm, m.windowBits);
|
|
@@ -1244,16 +1244,16 @@ function we() {
|
|
|
1244
1244
|
d.prototype.push = function(u, m) {
|
|
1245
1245
|
var f, b, x, E, A, L, F = this.strm, H = this.options.chunkSize, T = this.options.dictionary, V = !1;
|
|
1246
1246
|
if (this.ended) return !1;
|
|
1247
|
-
b = m === ~~m ? m : m === !0 ? h.Z_FINISH : h.Z_NO_FLUSH, typeof u == "string" ? F.input =
|
|
1247
|
+
b = m === ~~m ? m : m === !0 ? h.Z_FINISH : h.Z_NO_FLUSH, typeof u == "string" ? F.input = o.binstring2buf(u) : y.call(u) === "[object ArrayBuffer]" ? F.input = new Uint8Array(u) : F.input = u, F.next_in = 0, F.avail_in = F.input.length;
|
|
1248
1248
|
do {
|
|
1249
|
-
if (F.avail_out === 0 && (F.output = new
|
|
1250
|
-
F.next_out && (F.avail_out !== 0 && f !== h.Z_STREAM_END && (F.avail_in !== 0 || b !== h.Z_FINISH && b !== h.Z_SYNC_FLUSH) || (this.options.to === "string" ? (x =
|
|
1249
|
+
if (F.avail_out === 0 && (F.output = new i.Buf8(H), F.next_out = 0, F.avail_out = H), (f = n.inflate(F, h.Z_NO_FLUSH)) === h.Z_NEED_DICT && T && (L = typeof T == "string" ? o.string2buf(T) : y.call(T) === "[object ArrayBuffer]" ? new Uint8Array(T) : T, f = n.inflateSetDictionary(this.strm, L)), 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);
|
|
1250
|
+
F.next_out && (F.avail_out !== 0 && f !== h.Z_STREAM_END && (F.avail_in !== 0 || b !== h.Z_FINISH && b !== h.Z_SYNC_FLUSH) || (this.options.to === "string" ? (x = o.utf8border(F.output, F.next_out), E = F.next_out - x, A = o.buf2string(F.output, x), F.next_out = E, F.avail_out = H - E, E && i.arraySet(F.output, F.output, x, E, 0), this.onData(A)) : this.onData(i.shrinkBuf(F.output, F.next_out)))), F.avail_in === 0 && F.avail_out === 0 && (V = !0);
|
|
1251
1251
|
} while ((0 < F.avail_in || F.avail_out === 0) && f !== h.Z_STREAM_END);
|
|
1252
1252
|
return f === h.Z_STREAM_END && (b = h.Z_FINISH), b === h.Z_FINISH ? (f = n.inflateEnd(this.strm), this.onEnd(f), this.ended = !0, f === h.Z_OK) : b !== h.Z_SYNC_FLUSH || (this.onEnd(h.Z_OK), !(F.avail_out = 0));
|
|
1253
1253
|
}, d.prototype.onData = function(u) {
|
|
1254
1254
|
this.chunks.push(u);
|
|
1255
1255
|
}, d.prototype.onEnd = function(u) {
|
|
1256
|
-
u === h.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result =
|
|
1256
|
+
u === h.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = i.flattenChunks(this.chunks)), this.chunks = [], this.err = u, this.msg = this.strm.msg;
|
|
1257
1257
|
}, a.Inflate = d, a.inflate = k, a.inflateRaw = function(u, m) {
|
|
1258
1258
|
return (m = m || {}).raw = !0, k(u, m);
|
|
1259
1259
|
}, a.ungzip = k;
|
|
@@ -1271,7 +1271,7 @@ function we() {
|
|
|
1271
1271
|
}, a.shrinkBuf = function(h, _) {
|
|
1272
1272
|
return h.length === _ ? h : h.subarray ? h.subarray(0, _) : (h.length = _, h);
|
|
1273
1273
|
};
|
|
1274
|
-
var
|
|
1274
|
+
var i = { arraySet: function(h, _, S, v, y) {
|
|
1275
1275
|
if (_.subarray && h.subarray) h.set(_.subarray(S, S + v), y);
|
|
1276
1276
|
else for (var d = 0; d < v; d++) h[y + d] = _[S + d];
|
|
1277
1277
|
}, flattenChunks: function(h) {
|
|
@@ -1279,29 +1279,29 @@ function we() {
|
|
|
1279
1279
|
for (_ = v = 0, S = h.length; _ < S; _++) v += h[_].length;
|
|
1280
1280
|
for (k = new Uint8Array(v), _ = y = 0, S = h.length; _ < S; _++) d = h[_], k.set(d, y), y += d.length;
|
|
1281
1281
|
return k;
|
|
1282
|
-
} },
|
|
1282
|
+
} }, o = { arraySet: function(h, _, S, v, y) {
|
|
1283
1283
|
for (var d = 0; d < v; d++) h[y + d] = _[S + d];
|
|
1284
1284
|
}, flattenChunks: function(h) {
|
|
1285
1285
|
return [].concat.apply([], h);
|
|
1286
1286
|
} };
|
|
1287
1287
|
a.setTyped = function(h) {
|
|
1288
|
-
h ? (a.Buf8 = Uint8Array, a.Buf16 = Uint16Array, a.Buf32 = Int32Array, a.assign(a,
|
|
1288
|
+
h ? (a.Buf8 = Uint8Array, a.Buf16 = Uint16Array, a.Buf32 = Int32Array, a.assign(a, i)) : (a.Buf8 = Array, a.Buf16 = Array, a.Buf32 = Array, a.assign(a, o));
|
|
1289
1289
|
}, a.setTyped(n);
|
|
1290
1290
|
}, {}], 42: [function(t, r, a) {
|
|
1291
|
-
var n = t("./common"),
|
|
1291
|
+
var n = t("./common"), i = !0, o = !0;
|
|
1292
1292
|
try {
|
|
1293
1293
|
String.fromCharCode.apply(null, [0]);
|
|
1294
1294
|
} catch {
|
|
1295
|
-
|
|
1295
|
+
i = !1;
|
|
1296
1296
|
}
|
|
1297
1297
|
try {
|
|
1298
1298
|
String.fromCharCode.apply(null, new Uint8Array(1));
|
|
1299
1299
|
} catch {
|
|
1300
|
-
|
|
1300
|
+
o = !1;
|
|
1301
1301
|
}
|
|
1302
1302
|
for (var h = new n.Buf8(256), _ = 0; _ < 256; _++) h[_] = 252 <= _ ? 6 : 248 <= _ ? 5 : 240 <= _ ? 4 : 224 <= _ ? 3 : 192 <= _ ? 2 : 1;
|
|
1303
1303
|
function S(v, y) {
|
|
1304
|
-
if (y < 65537 && (v.subarray &&
|
|
1304
|
+
if (y < 65537 && (v.subarray && o || !v.subarray && i)) return String.fromCharCode.apply(null, n.shrinkBuf(v, y));
|
|
1305
1305
|
for (var d = "", k = 0; k < y; k++) d += String.fromCharCode(v[k]);
|
|
1306
1306
|
return d;
|
|
1307
1307
|
}
|
|
@@ -1330,9 +1330,9 @@ function we() {
|
|
|
1330
1330
|
return d < 0 || d === 0 ? y : d + h[v[d]] > y ? d : y;
|
|
1331
1331
|
};
|
|
1332
1332
|
}, { "./common": 41 }], 43: [function(t, r, a) {
|
|
1333
|
-
r.exports = function(n,
|
|
1334
|
-
for (var _ = 65535 & n | 0, S = n >>> 16 & 65535 | 0, v = 0;
|
|
1335
|
-
for (
|
|
1333
|
+
r.exports = function(n, i, o, h) {
|
|
1334
|
+
for (var _ = 65535 & n | 0, S = n >>> 16 & 65535 | 0, v = 0; o !== 0; ) {
|
|
1335
|
+
for (o -= v = 2e3 < o ? 2e3 : o; S = S + (_ = _ + i[h++] | 0) | 0, --v; ) ;
|
|
1336
1336
|
_ %= 65521, S %= 65521;
|
|
1337
1337
|
}
|
|
1338
1338
|
return _ | S << 16 | 0;
|
|
@@ -1341,21 +1341,21 @@ function we() {
|
|
|
1341
1341
|
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 };
|
|
1342
1342
|
}, {}], 45: [function(t, r, a) {
|
|
1343
1343
|
var n = (function() {
|
|
1344
|
-
for (var
|
|
1345
|
-
|
|
1346
|
-
for (var _ = 0; _ < 8; _++)
|
|
1347
|
-
|
|
1344
|
+
for (var i, o = [], h = 0; h < 256; h++) {
|
|
1345
|
+
i = h;
|
|
1346
|
+
for (var _ = 0; _ < 8; _++) i = 1 & i ? 3988292384 ^ i >>> 1 : i >>> 1;
|
|
1347
|
+
o[h] = i;
|
|
1348
1348
|
}
|
|
1349
|
-
return
|
|
1349
|
+
return o;
|
|
1350
1350
|
})();
|
|
1351
|
-
r.exports = function(
|
|
1351
|
+
r.exports = function(i, o, h, _) {
|
|
1352
1352
|
var S = n, v = _ + h;
|
|
1353
|
-
|
|
1354
|
-
for (var y = _; y < v; y++)
|
|
1355
|
-
return -1 ^
|
|
1353
|
+
i ^= -1;
|
|
1354
|
+
for (var y = _; y < v; y++) i = i >>> 8 ^ S[255 & (i ^ o[y])];
|
|
1355
|
+
return -1 ^ i;
|
|
1356
1356
|
};
|
|
1357
1357
|
}, {}], 46: [function(t, r, a) {
|
|
1358
|
-
var n,
|
|
1358
|
+
var n, i = t("../utils/common"), o = t("./trees"), h = t("./adler32"), _ = t("./crc32"), S = t("./messages"), v = 0, y = 4, d = 0, k = -2, u = -1, m = 4, f = 2, b = 8, x = 9, E = 286, A = 30, L = 19, F = 2 * E + 1, H = 15, T = 3, V = 258, Q = V + T + 1, w = 42, I = 113, c = 1, D = 2, et = 3, $ = 4;
|
|
1359
1359
|
function rt(s, O) {
|
|
1360
1360
|
return s.msg = S[O], O;
|
|
1361
1361
|
}
|
|
@@ -1367,85 +1367,85 @@ function we() {
|
|
|
1367
1367
|
}
|
|
1368
1368
|
function z(s) {
|
|
1369
1369
|
var O = s.state, R = O.pending;
|
|
1370
|
-
R > s.avail_out && (R = s.avail_out), R !== 0 && (
|
|
1370
|
+
R > s.avail_out && (R = s.avail_out), R !== 0 && (i.arraySet(s.output, O.pending_buf, O.pending_out, R, s.next_out), s.next_out += R, O.pending_out += R, s.total_out += R, s.avail_out -= R, O.pending -= R, O.pending === 0 && (O.pending_out = 0));
|
|
1371
1371
|
}
|
|
1372
1372
|
function M(s, O) {
|
|
1373
|
-
|
|
1373
|
+
o._tr_flush_block(s, 0 <= s.block_start ? s.block_start : -1, s.strstart - s.block_start, O), s.block_start = s.strstart, z(s.strm);
|
|
1374
1374
|
}
|
|
1375
1375
|
function J(s, O) {
|
|
1376
1376
|
s.pending_buf[s.pending++] = O;
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function q(s, O) {
|
|
1379
1379
|
s.pending_buf[s.pending++] = O >>> 8 & 255, s.pending_buf[s.pending++] = 255 & O;
|
|
1380
1380
|
}
|
|
1381
1381
|
function X(s, O) {
|
|
1382
|
-
var R, g, p = s.max_chain_length, P = s.strstart, j = s.prev_length, U = s.nice_match, N = s.strstart > s.w_size - Q ? s.strstart - (s.w_size - Q) : 0, Z = s.window,
|
|
1382
|
+
var R, g, p = s.max_chain_length, P = s.strstart, j = s.prev_length, U = s.nice_match, N = s.strstart > s.w_size - Q ? s.strstart - (s.w_size - Q) : 0, Z = s.window, K = s.w_mask, G = s.prev, Y = s.strstart + V, lt = Z[P + j - 1], nt = Z[P + j];
|
|
1383
1383
|
s.prev_length >= s.good_match && (p >>= 2), U > s.lookahead && (U = s.lookahead);
|
|
1384
1384
|
do
|
|
1385
1385
|
if (Z[(R = O) + j] === nt && Z[R + j - 1] === lt && Z[R] === Z[P] && Z[++R] === Z[P + 1]) {
|
|
1386
1386
|
P += 2, R++;
|
|
1387
1387
|
do
|
|
1388
1388
|
;
|
|
1389
|
-
while (Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && P <
|
|
1390
|
-
if (g = V - (
|
|
1389
|
+
while (Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && Z[++P] === Z[++R] && P < Y);
|
|
1390
|
+
if (g = V - (Y - P), P = Y - V, j < g) {
|
|
1391
1391
|
if (s.match_start = O, U <= (j = g)) break;
|
|
1392
1392
|
lt = Z[P + j - 1], nt = Z[P + j];
|
|
1393
1393
|
}
|
|
1394
1394
|
}
|
|
1395
|
-
while ((O = G[O &
|
|
1395
|
+
while ((O = G[O & K]) > N && --p != 0);
|
|
1396
1396
|
return j <= s.lookahead ? j : s.lookahead;
|
|
1397
1397
|
}
|
|
1398
1398
|
function ct(s) {
|
|
1399
|
-
var O, R, g, p, P, j, U, N, Z,
|
|
1399
|
+
var O, R, g, p, P, j, U, N, Z, K, G = s.w_size;
|
|
1400
1400
|
do {
|
|
1401
1401
|
if (p = s.window_size - s.lookahead - s.strstart, s.strstart >= G + (G - Q)) {
|
|
1402
|
-
for (
|
|
1402
|
+
for (i.arraySet(s.window, s.window, G, G, 0), s.match_start -= G, s.strstart -= G, s.block_start -= G, O = R = s.hash_size; g = s.head[--O], s.head[O] = G <= g ? g - G : 0, --R; ) ;
|
|
1403
1403
|
for (O = R = G; g = s.prev[--O], s.prev[O] = G <= g ? g - G : 0, --R; ) ;
|
|
1404
1404
|
p += G;
|
|
1405
1405
|
}
|
|
1406
1406
|
if (s.strm.avail_in === 0) break;
|
|
1407
|
-
if (j = s.strm, U = s.window, N = s.strstart + s.lookahead, Z = p,
|
|
1407
|
+
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, i.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 = _(j.adler, U, K, N)), j.next_in += K, j.total_in += K, K), s.lookahead += R, s.lookahead + s.insert >= T) for (P = s.strstart - s.insert, s.ins_h = s.window[P], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[P + 1]) & s.hash_mask; s.insert && (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[P + T - 1]) & s.hash_mask, s.prev[P & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = P, P++, s.insert--, !(s.lookahead + s.insert < T)); ) ;
|
|
1408
1408
|
} while (s.lookahead < Q && s.strm.avail_in !== 0);
|
|
1409
1409
|
}
|
|
1410
1410
|
function mt(s, O) {
|
|
1411
1411
|
for (var R, g; ; ) {
|
|
1412
1412
|
if (s.lookahead < Q) {
|
|
1413
|
-
if (ct(s), s.lookahead < Q && O === v) return
|
|
1413
|
+
if (ct(s), s.lookahead < Q && O === v) return c;
|
|
1414
1414
|
if (s.lookahead === 0) break;
|
|
1415
1415
|
}
|
|
1416
|
-
if (R = 0, s.lookahead >= T && (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + T - 1]) & s.hash_mask, R = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart), R !== 0 && s.strstart - R <= s.w_size - Q && (s.match_length = X(s, R)), s.match_length >= T) if (g =
|
|
1416
|
+
if (R = 0, s.lookahead >= T && (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + T - 1]) & s.hash_mask, R = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart), R !== 0 && s.strstart - R <= s.w_size - Q && (s.match_length = X(s, R)), s.match_length >= T) if (g = o._tr_tally(s, s.strstart - s.match_start, s.match_length - T), s.lookahead -= s.match_length, s.match_length <= s.max_lazy_match && s.lookahead >= T) {
|
|
1417
1417
|
for (s.match_length--; s.strstart++, s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + T - 1]) & s.hash_mask, R = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart, --s.match_length != 0; ) ;
|
|
1418
1418
|
s.strstart++;
|
|
1419
1419
|
} else s.strstart += s.match_length, s.match_length = 0, s.ins_h = s.window[s.strstart], s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask;
|
|
1420
|
-
else g =
|
|
1421
|
-
if (g && (M(s, !1), s.strm.avail_out === 0)) return
|
|
1420
|
+
else g = o._tr_tally(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++;
|
|
1421
|
+
if (g && (M(s, !1), s.strm.avail_out === 0)) return c;
|
|
1422
1422
|
}
|
|
1423
|
-
return s.insert = s.strstart < T - 1 ? s.strstart : T - 1, O === y ? (M(s, !0), s.strm.avail_out === 0 ? et : $) : s.last_lit && (M(s, !1), s.strm.avail_out === 0) ?
|
|
1423
|
+
return s.insert = s.strstart < T - 1 ? s.strstart : T - 1, O === y ? (M(s, !0), s.strm.avail_out === 0 ? et : $) : s.last_lit && (M(s, !1), s.strm.avail_out === 0) ? c : D;
|
|
1424
1424
|
}
|
|
1425
1425
|
function at(s, O) {
|
|
1426
1426
|
for (var R, g, p; ; ) {
|
|
1427
1427
|
if (s.lookahead < Q) {
|
|
1428
|
-
if (ct(s), s.lookahead < Q && O === v) return
|
|
1428
|
+
if (ct(s), s.lookahead < Q && O === v) return c;
|
|
1429
1429
|
if (s.lookahead === 0) break;
|
|
1430
1430
|
}
|
|
1431
1431
|
if (R = 0, s.lookahead >= T && (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + T - 1]) & s.hash_mask, R = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart), s.prev_length = s.match_length, s.prev_match = s.match_start, s.match_length = T - 1, R !== 0 && s.prev_length < s.max_lazy_match && s.strstart - R <= s.w_size - Q && (s.match_length = X(s, R), s.match_length <= 5 && (s.strategy === 1 || s.match_length === T && 4096 < s.strstart - s.match_start) && (s.match_length = T - 1)), s.prev_length >= T && s.match_length <= s.prev_length) {
|
|
1432
|
-
for (p = s.strstart + s.lookahead - T, g =
|
|
1433
|
-
if (s.match_available = 0, s.match_length = T - 1, s.strstart++, g && (M(s, !1), s.strm.avail_out === 0)) return
|
|
1432
|
+
for (p = s.strstart + s.lookahead - T, g = o._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - T), s.lookahead -= s.prev_length - 1, s.prev_length -= 2; ++s.strstart <= p && (s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + T - 1]) & s.hash_mask, R = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h], s.head[s.ins_h] = s.strstart), --s.prev_length != 0; ) ;
|
|
1433
|
+
if (s.match_available = 0, s.match_length = T - 1, s.strstart++, g && (M(s, !1), s.strm.avail_out === 0)) return c;
|
|
1434
1434
|
} else if (s.match_available) {
|
|
1435
|
-
if ((g =
|
|
1435
|
+
if ((g = o._tr_tally(s, 0, s.window[s.strstart - 1])) && M(s, !1), s.strstart++, s.lookahead--, s.strm.avail_out === 0) return c;
|
|
1436
1436
|
} else s.match_available = 1, s.strstart++, s.lookahead--;
|
|
1437
1437
|
}
|
|
1438
|
-
return s.match_available && (g =
|
|
1438
|
+
return s.match_available && (g = o._tr_tally(s, 0, s.window[s.strstart - 1]), s.match_available = 0), s.insert = s.strstart < T - 1 ? s.strstart : T - 1, O === y ? (M(s, !0), s.strm.avail_out === 0 ? et : $) : s.last_lit && (M(s, !1), s.strm.avail_out === 0) ? c : D;
|
|
1439
1439
|
}
|
|
1440
1440
|
function st(s, O, R, g, p) {
|
|
1441
1441
|
this.good_length = s, this.max_lazy = O, this.nice_length = R, this.max_chain = g, this.func = p;
|
|
1442
1442
|
}
|
|
1443
1443
|
function pt() {
|
|
1444
|
-
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 = b, 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
|
|
1444
|
+
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 = b, 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 i.Buf16(2 * F), this.dyn_dtree = new i.Buf16(2 * (2 * A + 1)), this.bl_tree = new i.Buf16(2 * (2 * L + 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 i.Buf16(H + 1), this.heap = new i.Buf16(2 * E + 1), tt(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new i.Buf16(2 * E + 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;
|
|
1445
1445
|
}
|
|
1446
1446
|
function ht(s) {
|
|
1447
1447
|
var O;
|
|
1448
|
-
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 ? w : I, s.adler = O.wrap === 2 ? 0 : 1, O.last_flush = v,
|
|
1448
|
+
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 ? w : I, s.adler = O.wrap === 2 ? 0 : 1, O.last_flush = v, o._tr_init(O), d) : rt(s, k);
|
|
1449
1449
|
}
|
|
1450
1450
|
function kt(s) {
|
|
1451
1451
|
var O = ht(s);
|
|
@@ -1459,20 +1459,20 @@ function we() {
|
|
|
1459
1459
|
if (O === u && (O = 6), g < 0 ? (j = 0, g = -g) : 15 < g && (j = 2, g -= 16), p < 1 || x < p || R !== b || g < 8 || 15 < g || O < 0 || 9 < O || P < 0 || m < P) return rt(s, k);
|
|
1460
1460
|
g === 8 && (g = 9);
|
|
1461
1461
|
var U = new pt();
|
|
1462
|
-
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
|
|
1462
|
+
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 i.Buf8(2 * U.w_size), U.head = new i.Buf16(U.hash_size), U.prev = new i.Buf16(U.w_size), U.lit_bufsize = 1 << p + 6, U.pending_buf_size = 4 * U.lit_bufsize, U.pending_buf = new i.Buf8(U.pending_buf_size), U.d_buf = 1 * U.lit_bufsize, U.l_buf = 3 * U.lit_bufsize, U.level = O, U.strategy = P, U.method = R, kt(s);
|
|
1463
1463
|
}
|
|
1464
1464
|
n = [new st(0, 0, 0, 0, function(s, O) {
|
|
1465
1465
|
var R = 65535;
|
|
1466
1466
|
for (R > s.pending_buf_size - 5 && (R = s.pending_buf_size - 5); ; ) {
|
|
1467
1467
|
if (s.lookahead <= 1) {
|
|
1468
|
-
if (ct(s), s.lookahead === 0 && O === v) return
|
|
1468
|
+
if (ct(s), s.lookahead === 0 && O === v) return c;
|
|
1469
1469
|
if (s.lookahead === 0) break;
|
|
1470
1470
|
}
|
|
1471
1471
|
s.strstart += s.lookahead, s.lookahead = 0;
|
|
1472
1472
|
var g = s.block_start + R;
|
|
1473
|
-
if ((s.strstart === 0 || s.strstart >= g) && (s.lookahead = s.strstart - g, s.strstart = g, M(s, !1), s.strm.avail_out === 0) || s.strstart - s.block_start >= s.w_size - Q && (M(s, !1), s.strm.avail_out === 0)) return
|
|
1473
|
+
if ((s.strstart === 0 || s.strstart >= g) && (s.lookahead = s.strstart - g, s.strstart = g, M(s, !1), s.strm.avail_out === 0) || s.strstart - s.block_start >= s.w_size - Q && (M(s, !1), s.strm.avail_out === 0)) return c;
|
|
1474
1474
|
}
|
|
1475
|
-
return s.insert = 0, O === y ? (M(s, !0), s.strm.avail_out === 0 ? et : $) : (s.strstart > s.block_start && (M(s, !1), s.strm.avail_out),
|
|
1475
|
+
return s.insert = 0, O === y ? (M(s, !0), s.strm.avail_out === 0 ? et : $) : (s.strstart > s.block_start && (M(s, !1), s.strm.avail_out), c);
|
|
1476
1476
|
}), new st(4, 4, 8, 4, mt), new st(4, 5, 16, 8, mt), new st(4, 6, 32, 32, mt), new st(4, 4, 16, 16, at), new st(8, 16, 32, 32, at), new st(8, 16, 128, 128, at), new st(8, 32, 128, 256, at), new st(32, 128, 258, 1024, at), new st(32, 258, 258, 4096, at)], a.deflateInit = function(s, O) {
|
|
1477
1477
|
return vt(s, O, b, 15, 8, 0);
|
|
1478
1478
|
}, a.deflateInit2 = vt, a.deflateReset = kt, a.deflateResetKeep = ht, a.deflateSetHeader = function(s, O) {
|
|
@@ -1484,7 +1484,7 @@ function we() {
|
|
|
1484
1484
|
if (g.strm = s, R = g.last_flush, g.last_flush = O, g.status === w) 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 = _(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);
|
|
1485
1485
|
else {
|
|
1486
1486
|
var j = b + (g.w_bits - 8 << 4) << 8;
|
|
1487
|
-
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,
|
|
1487
|
+
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;
|
|
1488
1488
|
}
|
|
1489
1489
|
if (g.status === 69) if (g.gzhead.extra) {
|
|
1490
1490
|
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 = _(s.adler, g.pending_buf, g.pending - p, p)), z(s), p = g.pending, g.pending !== g.pending_buf_size)); ) J(g, 255 & g.gzhead.extra[g.gzindex]), g.gzindex++;
|
|
@@ -1518,42 +1518,42 @@ function we() {
|
|
|
1518
1518
|
if (g.status === 666 && s.avail_in !== 0) return rt(s, -5);
|
|
1519
1519
|
if (s.avail_in !== 0 || g.lookahead !== 0 || O !== v && g.status !== 666) {
|
|
1520
1520
|
var U = g.strategy === 2 ? (function(N, Z) {
|
|
1521
|
-
for (var
|
|
1521
|
+
for (var K; ; ) {
|
|
1522
1522
|
if (N.lookahead === 0 && (ct(N), N.lookahead === 0)) {
|
|
1523
|
-
if (Z === v) return
|
|
1523
|
+
if (Z === v) return c;
|
|
1524
1524
|
break;
|
|
1525
1525
|
}
|
|
1526
|
-
if (N.match_length = 0,
|
|
1526
|
+
if (N.match_length = 0, K = o._tr_tally(N, 0, N.window[N.strstart]), N.lookahead--, N.strstart++, K && (M(N, !1), N.strm.avail_out === 0)) return c;
|
|
1527
1527
|
}
|
|
1528
|
-
return N.insert = 0, Z === y ? (M(N, !0), N.strm.avail_out === 0 ? et : $) : N.last_lit && (M(N, !1), N.strm.avail_out === 0) ?
|
|
1528
|
+
return N.insert = 0, Z === y ? (M(N, !0), N.strm.avail_out === 0 ? et : $) : N.last_lit && (M(N, !1), N.strm.avail_out === 0) ? c : D;
|
|
1529
1529
|
})(g, O) : g.strategy === 3 ? (function(N, Z) {
|
|
1530
|
-
for (var
|
|
1530
|
+
for (var K, G, Y, lt, nt = N.window; ; ) {
|
|
1531
1531
|
if (N.lookahead <= V) {
|
|
1532
|
-
if (ct(N), N.lookahead <= V && Z === v) return
|
|
1532
|
+
if (ct(N), N.lookahead <= V && Z === v) return c;
|
|
1533
1533
|
if (N.lookahead === 0) break;
|
|
1534
1534
|
}
|
|
1535
|
-
if (N.match_length = 0, N.lookahead >= T && 0 < N.strstart && (G = nt[
|
|
1535
|
+
if (N.match_length = 0, N.lookahead >= T && 0 < N.strstart && (G = nt[Y = N.strstart - 1]) === nt[++Y] && G === nt[++Y] && G === nt[++Y]) {
|
|
1536
1536
|
lt = N.strstart + V;
|
|
1537
1537
|
do
|
|
1538
1538
|
;
|
|
1539
|
-
while (G === nt[++
|
|
1540
|
-
N.match_length = V - (lt -
|
|
1539
|
+
while (G === nt[++Y] && G === nt[++Y] && G === nt[++Y] && G === nt[++Y] && G === nt[++Y] && G === nt[++Y] && G === nt[++Y] && G === nt[++Y] && Y < lt);
|
|
1540
|
+
N.match_length = V - (lt - Y), N.match_length > N.lookahead && (N.match_length = N.lookahead);
|
|
1541
1541
|
}
|
|
1542
|
-
if (N.match_length >= T ? (
|
|
1542
|
+
if (N.match_length >= T ? (K = o._tr_tally(N, 1, N.match_length - T), N.lookahead -= N.match_length, N.strstart += N.match_length, N.match_length = 0) : (K = o._tr_tally(N, 0, N.window[N.strstart]), N.lookahead--, N.strstart++), K && (M(N, !1), N.strm.avail_out === 0)) return c;
|
|
1543
1543
|
}
|
|
1544
|
-
return N.insert = 0, Z === y ? (M(N, !0), N.strm.avail_out === 0 ? et : $) : N.last_lit && (M(N, !1), N.strm.avail_out === 0) ?
|
|
1544
|
+
return N.insert = 0, Z === y ? (M(N, !0), N.strm.avail_out === 0 ? et : $) : N.last_lit && (M(N, !1), N.strm.avail_out === 0) ? c : D;
|
|
1545
1545
|
})(g, O) : n[g.level].func(g, O);
|
|
1546
|
-
if (U !== et && U !== $ || (g.status = 666), U ===
|
|
1547
|
-
if (U === D && (O === 1 ?
|
|
1546
|
+
if (U !== et && U !== $ || (g.status = 666), U === c || U === et) return s.avail_out === 0 && (g.last_flush = -1), d;
|
|
1547
|
+
if (U === D && (O === 1 ? o._tr_align(g) : O !== 5 && (o._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))), z(s), s.avail_out === 0)) return g.last_flush = -1, d;
|
|
1548
1548
|
}
|
|
1549
|
-
return O !== y ? 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)) : (
|
|
1549
|
+
return O !== y ? 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)), z(s), 0 < g.wrap && (g.wrap = -g.wrap), g.pending !== 0 ? d : 1);
|
|
1550
1550
|
}, a.deflateEnd = function(s) {
|
|
1551
1551
|
var O;
|
|
1552
1552
|
return s && s.state ? (O = s.state.status) !== w && 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;
|
|
1553
1553
|
}, a.deflateSetDictionary = function(s, O) {
|
|
1554
|
-
var R, g, p, P, j, U, N, Z,
|
|
1554
|
+
var R, g, p, P, j, U, N, Z, K = O.length;
|
|
1555
1555
|
if (!s || !s.state || (P = (R = s.state).wrap) === 2 || P === 1 && R.status !== w || R.lookahead) return k;
|
|
1556
|
-
for (P === 1 && (s.adler = h(s.adler, O,
|
|
1556
|
+
for (P === 1 && (s.adler = h(s.adler, O, K, 0)), R.wrap = 0, K >= R.w_size && (P === 0 && (tt(R.head), R.strstart = 0, R.block_start = 0, R.insert = 0), Z = new i.Buf8(R.w_size), i.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; ) {
|
|
1557
1557
|
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; ) ;
|
|
1558
1558
|
R.strstart = g, R.lookahead = T - 1, ct(R);
|
|
1559
1559
|
}
|
|
@@ -1564,11 +1564,11 @@ function we() {
|
|
|
1564
1564
|
this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1;
|
|
1565
1565
|
};
|
|
1566
1566
|
}, {}], 48: [function(t, r, a) {
|
|
1567
|
-
r.exports = function(n,
|
|
1568
|
-
var
|
|
1569
|
-
|
|
1567
|
+
r.exports = function(n, i) {
|
|
1568
|
+
var o, h, _, S, v, y, d, k, u, m, f, b, x, E, A, L, F, H, T, V, Q, w, I, c, D;
|
|
1569
|
+
o = n.state, h = n.next_in, c = n.input, _ = h + (n.avail_in - 5), S = n.next_out, D = n.output, v = S - (i - n.avail_out), y = S + (n.avail_out - 257), d = o.dmax, k = o.wsize, u = o.whave, m = o.wnext, f = o.window, b = o.hold, x = o.bits, E = o.lencode, A = o.distcode, L = (1 << o.lenbits) - 1, F = (1 << o.distbits) - 1;
|
|
1570
1570
|
t: do {
|
|
1571
|
-
x < 15 && (b +=
|
|
1571
|
+
x < 15 && (b += c[h++] << x, x += 8, b += c[h++] << x, x += 8), H = E[b & L];
|
|
1572
1572
|
e: for (; ; ) {
|
|
1573
1573
|
if (b >>>= T = H >>> 24, x -= T, (T = H >>> 16 & 255) === 0) D[S++] = 65535 & H;
|
|
1574
1574
|
else {
|
|
@@ -1578,29 +1578,29 @@ function we() {
|
|
|
1578
1578
|
continue e;
|
|
1579
1579
|
}
|
|
1580
1580
|
if (32 & T) {
|
|
1581
|
-
|
|
1581
|
+
o.mode = 12;
|
|
1582
1582
|
break t;
|
|
1583
1583
|
}
|
|
1584
|
-
n.msg = "invalid literal/length code",
|
|
1584
|
+
n.msg = "invalid literal/length code", o.mode = 30;
|
|
1585
1585
|
break t;
|
|
1586
1586
|
}
|
|
1587
|
-
V = 65535 & H, (T &= 15) && (x < T && (b +=
|
|
1587
|
+
V = 65535 & H, (T &= 15) && (x < T && (b += c[h++] << x, x += 8), V += b & (1 << T) - 1, b >>>= T, x -= T), x < 15 && (b += c[h++] << x, x += 8, b += c[h++] << x, x += 8), H = A[b & F];
|
|
1588
1588
|
r: for (; ; ) {
|
|
1589
1589
|
if (b >>>= T = H >>> 24, x -= T, !(16 & (T = H >>> 16 & 255))) {
|
|
1590
1590
|
if ((64 & T) == 0) {
|
|
1591
1591
|
H = A[(65535 & H) + (b & (1 << T) - 1)];
|
|
1592
1592
|
continue r;
|
|
1593
1593
|
}
|
|
1594
|
-
n.msg = "invalid distance code",
|
|
1594
|
+
n.msg = "invalid distance code", o.mode = 30;
|
|
1595
1595
|
break t;
|
|
1596
1596
|
}
|
|
1597
|
-
if (Q = 65535 & H, x < (T &= 15) && (b +=
|
|
1598
|
-
n.msg = "invalid distance too far back",
|
|
1597
|
+
if (Q = 65535 & H, x < (T &= 15) && (b += c[h++] << x, (x += 8) < T && (b += c[h++] << x, x += 8)), d < (Q += b & (1 << T) - 1)) {
|
|
1598
|
+
n.msg = "invalid distance too far back", o.mode = 30;
|
|
1599
1599
|
break t;
|
|
1600
1600
|
}
|
|
1601
1601
|
if (b >>>= T, x -= T, (T = S - v) < Q) {
|
|
1602
|
-
if (u < (T = Q - T) &&
|
|
1603
|
-
n.msg = "invalid distance too far back",
|
|
1602
|
+
if (u < (T = Q - T) && o.sane) {
|
|
1603
|
+
n.msg = "invalid distance too far back", o.mode = 30;
|
|
1604
1604
|
break t;
|
|
1605
1605
|
}
|
|
1606
1606
|
if (I = f, (w = 0) === m) {
|
|
@@ -1632,10 +1632,10 @@ function we() {
|
|
|
1632
1632
|
break;
|
|
1633
1633
|
}
|
|
1634
1634
|
} while (h < _ && S < y);
|
|
1635
|
-
h -= V = x >> 3, b &= (1 << (x -= V << 3)) - 1, n.next_in = h, n.next_out = S, n.avail_in = h < _ ? _ - h + 5 : 5 - (h - _), n.avail_out = S < y ? y - S + 257 : 257 - (S - y),
|
|
1635
|
+
h -= V = x >> 3, b &= (1 << (x -= V << 3)) - 1, n.next_in = h, n.next_out = S, n.avail_in = h < _ ? _ - h + 5 : 5 - (h - _), n.avail_out = S < y ? y - S + 257 : 257 - (S - y), o.hold = b, o.bits = x;
|
|
1636
1636
|
};
|
|
1637
1637
|
}, {}], 49: [function(t, r, a) {
|
|
1638
|
-
var n = t("../utils/common"),
|
|
1638
|
+
var n = t("../utils/common"), i = t("./adler32"), o = t("./crc32"), h = t("./inffast"), _ = t("./inftrees"), S = 1, v = 2, y = 0, d = -2, k = 1, u = 852, m = 592;
|
|
1639
1639
|
function f(w) {
|
|
1640
1640
|
return (w >>> 24 & 255) + (w >>> 8 & 65280) + ((65280 & w) << 8) + ((255 & w) << 24);
|
|
1641
1641
|
}
|
|
@@ -1651,12 +1651,12 @@ function we() {
|
|
|
1651
1651
|
return w && w.state ? ((I = w.state).wsize = 0, I.whave = 0, I.wnext = 0, x(w)) : d;
|
|
1652
1652
|
}
|
|
1653
1653
|
function A(w, I) {
|
|
1654
|
-
var
|
|
1655
|
-
return w && w.state ? (D = w.state, I < 0 ? (
|
|
1654
|
+
var c, D;
|
|
1655
|
+
return w && w.state ? (D = w.state, I < 0 ? (c = 0, I = -I) : (c = 1 + (I >> 4), I < 48 && (I &= 15)), I && (I < 8 || 15 < I) ? d : (D.window !== null && D.wbits !== I && (D.window = null), D.wrap = c, D.wbits = I, E(w))) : d;
|
|
1656
1656
|
}
|
|
1657
1657
|
function L(w, I) {
|
|
1658
|
-
var
|
|
1659
|
-
return w ? (D = new b(), (w.state = D).window = null, (
|
|
1658
|
+
var c, D;
|
|
1659
|
+
return w ? (D = new b(), (w.state = D).window = null, (c = A(w, I)) !== y && (w.state = null), c) : d;
|
|
1660
1660
|
}
|
|
1661
1661
|
var F, H, T = !0;
|
|
1662
1662
|
function V(w) {
|
|
@@ -1671,144 +1671,144 @@ function we() {
|
|
|
1671
1671
|
}
|
|
1672
1672
|
w.lencode = F, w.lenbits = 9, w.distcode = H, w.distbits = 5;
|
|
1673
1673
|
}
|
|
1674
|
-
function Q(w, I,
|
|
1674
|
+
function Q(w, I, c, D) {
|
|
1675
1675
|
var et, $ = w.state;
|
|
1676
|
-
return $.window === null && ($.wsize = 1 << $.wbits, $.wnext = 0, $.whave = 0, $.window = new n.Buf8($.wsize)), D >= $.wsize ? (n.arraySet($.window, I,
|
|
1676
|
+
return $.window === null && ($.wsize = 1 << $.wbits, $.wnext = 0, $.whave = 0, $.window = new n.Buf8($.wsize)), D >= $.wsize ? (n.arraySet($.window, I, c - $.wsize, $.wsize, 0), $.wnext = 0, $.whave = $.wsize) : (D < (et = $.wsize - $.wnext) && (et = D), n.arraySet($.window, I, c - D, et, $.wnext), (D -= et) ? (n.arraySet($.window, I, c - D, D, 0), $.wnext = D, $.whave = $.wsize) : ($.wnext += et, $.wnext === $.wsize && ($.wnext = 0), $.whave < $.wsize && ($.whave += et))), 0;
|
|
1677
1677
|
}
|
|
1678
1678
|
a.inflateReset = E, a.inflateReset2 = A, a.inflateResetKeep = x, a.inflateInit = function(w) {
|
|
1679
1679
|
return L(w, 15);
|
|
1680
1680
|
}, a.inflateInit2 = L, a.inflate = function(w, I) {
|
|
1681
|
-
var
|
|
1681
|
+
var c, D, et, $, rt, W, tt, z, M, J, q, X, ct, mt, at, st, pt, ht, kt, vt, s, O, R, g, p = 0, P = new n.Buf8(4), j = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
1682
1682
|
if (!w || !w.state || !w.output || !w.input && w.avail_in !== 0) return d;
|
|
1683
|
-
(
|
|
1684
|
-
t: for (; ; ) switch (
|
|
1683
|
+
(c = w.state).mode === 12 && (c.mode = 13), rt = w.next_out, et = w.output, tt = w.avail_out, $ = w.next_in, D = w.input, W = w.avail_in, z = c.hold, M = c.bits, J = W, q = tt, O = y;
|
|
1684
|
+
t: for (; ; ) switch (c.mode) {
|
|
1685
1685
|
case k:
|
|
1686
|
-
if (
|
|
1687
|
-
|
|
1686
|
+
if (c.wrap === 0) {
|
|
1687
|
+
c.mode = 13;
|
|
1688
1688
|
break;
|
|
1689
1689
|
}
|
|
1690
1690
|
for (; M < 16; ) {
|
|
1691
1691
|
if (W === 0) break t;
|
|
1692
1692
|
W--, z += D[$++] << M, M += 8;
|
|
1693
1693
|
}
|
|
1694
|
-
if (2 &
|
|
1695
|
-
P[
|
|
1694
|
+
if (2 & c.wrap && z === 35615) {
|
|
1695
|
+
P[c.check = 0] = 255 & z, P[1] = z >>> 8 & 255, c.check = o(c.check, P, 2, 0), M = z = 0, c.mode = 2;
|
|
1696
1696
|
break;
|
|
1697
1697
|
}
|
|
1698
|
-
if (
|
|
1699
|
-
w.msg = "incorrect header check",
|
|
1698
|
+
if (c.flags = 0, c.head && (c.head.done = !1), !(1 & c.wrap) || (((255 & z) << 8) + (z >> 8)) % 31) {
|
|
1699
|
+
w.msg = "incorrect header check", c.mode = 30;
|
|
1700
1700
|
break;
|
|
1701
1701
|
}
|
|
1702
1702
|
if ((15 & z) != 8) {
|
|
1703
|
-
w.msg = "unknown compression method",
|
|
1703
|
+
w.msg = "unknown compression method", c.mode = 30;
|
|
1704
1704
|
break;
|
|
1705
1705
|
}
|
|
1706
|
-
if (M -= 4, s = 8 + (15 & (z >>>= 4)),
|
|
1707
|
-
else if (s >
|
|
1708
|
-
w.msg = "invalid window size",
|
|
1706
|
+
if (M -= 4, s = 8 + (15 & (z >>>= 4)), c.wbits === 0) c.wbits = s;
|
|
1707
|
+
else if (s > c.wbits) {
|
|
1708
|
+
w.msg = "invalid window size", c.mode = 30;
|
|
1709
1709
|
break;
|
|
1710
1710
|
}
|
|
1711
|
-
|
|
1711
|
+
c.dmax = 1 << s, w.adler = c.check = 1, c.mode = 512 & z ? 10 : 12, M = z = 0;
|
|
1712
1712
|
break;
|
|
1713
1713
|
case 2:
|
|
1714
1714
|
for (; M < 16; ) {
|
|
1715
1715
|
if (W === 0) break t;
|
|
1716
1716
|
W--, z += D[$++] << M, M += 8;
|
|
1717
1717
|
}
|
|
1718
|
-
if (
|
|
1719
|
-
w.msg = "unknown compression method",
|
|
1718
|
+
if (c.flags = z, (255 & c.flags) != 8) {
|
|
1719
|
+
w.msg = "unknown compression method", c.mode = 30;
|
|
1720
1720
|
break;
|
|
1721
1721
|
}
|
|
1722
|
-
if (57344 &
|
|
1723
|
-
w.msg = "unknown header flags set",
|
|
1722
|
+
if (57344 & c.flags) {
|
|
1723
|
+
w.msg = "unknown header flags set", c.mode = 30;
|
|
1724
1724
|
break;
|
|
1725
1725
|
}
|
|
1726
|
-
|
|
1726
|
+
c.head && (c.head.text = z >> 8 & 1), 512 & c.flags && (P[0] = 255 & z, P[1] = z >>> 8 & 255, c.check = o(c.check, P, 2, 0)), M = z = 0, c.mode = 3;
|
|
1727
1727
|
case 3:
|
|
1728
1728
|
for (; M < 32; ) {
|
|
1729
1729
|
if (W === 0) break t;
|
|
1730
1730
|
W--, z += D[$++] << M, M += 8;
|
|
1731
1731
|
}
|
|
1732
|
-
|
|
1732
|
+
c.head && (c.head.time = z), 512 & c.flags && (P[0] = 255 & z, P[1] = z >>> 8 & 255, P[2] = z >>> 16 & 255, P[3] = z >>> 24 & 255, c.check = o(c.check, P, 4, 0)), M = z = 0, c.mode = 4;
|
|
1733
1733
|
case 4:
|
|
1734
1734
|
for (; M < 16; ) {
|
|
1735
1735
|
if (W === 0) break t;
|
|
1736
1736
|
W--, z += D[$++] << M, M += 8;
|
|
1737
1737
|
}
|
|
1738
|
-
|
|
1738
|
+
c.head && (c.head.xflags = 255 & z, c.head.os = z >> 8), 512 & c.flags && (P[0] = 255 & z, P[1] = z >>> 8 & 255, c.check = o(c.check, P, 2, 0)), M = z = 0, c.mode = 5;
|
|
1739
1739
|
case 5:
|
|
1740
|
-
if (1024 &
|
|
1740
|
+
if (1024 & c.flags) {
|
|
1741
1741
|
for (; M < 16; ) {
|
|
1742
1742
|
if (W === 0) break t;
|
|
1743
1743
|
W--, z += D[$++] << M, M += 8;
|
|
1744
1744
|
}
|
|
1745
|
-
|
|
1746
|
-
} else
|
|
1747
|
-
|
|
1745
|
+
c.length = z, c.head && (c.head.extra_len = z), 512 & c.flags && (P[0] = 255 & z, P[1] = z >>> 8 & 255, c.check = o(c.check, P, 2, 0)), M = z = 0;
|
|
1746
|
+
} else c.head && (c.head.extra = null);
|
|
1747
|
+
c.mode = 6;
|
|
1748
1748
|
case 6:
|
|
1749
|
-
if (1024 &
|
|
1750
|
-
|
|
1749
|
+
if (1024 & c.flags && (W < (X = c.length) && (X = W), X && (c.head && (s = c.head.extra_len - c.length, c.head.extra || (c.head.extra = new Array(c.head.extra_len)), n.arraySet(c.head.extra, D, $, X, s)), 512 & c.flags && (c.check = o(c.check, D, X, $)), W -= X, $ += X, c.length -= X), c.length)) break t;
|
|
1750
|
+
c.length = 0, c.mode = 7;
|
|
1751
1751
|
case 7:
|
|
1752
|
-
if (2048 &
|
|
1752
|
+
if (2048 & c.flags) {
|
|
1753
1753
|
if (W === 0) break t;
|
|
1754
|
-
for (X = 0; s = D[$ + X++],
|
|
1755
|
-
if (512 &
|
|
1756
|
-
} else
|
|
1757
|
-
|
|
1754
|
+
for (X = 0; s = D[$ + X++], c.head && s && c.length < 65536 && (c.head.name += String.fromCharCode(s)), s && X < W; ) ;
|
|
1755
|
+
if (512 & c.flags && (c.check = o(c.check, D, X, $)), W -= X, $ += X, s) break t;
|
|
1756
|
+
} else c.head && (c.head.name = null);
|
|
1757
|
+
c.length = 0, c.mode = 8;
|
|
1758
1758
|
case 8:
|
|
1759
|
-
if (4096 &
|
|
1759
|
+
if (4096 & c.flags) {
|
|
1760
1760
|
if (W === 0) break t;
|
|
1761
|
-
for (X = 0; s = D[$ + X++],
|
|
1762
|
-
if (512 &
|
|
1763
|
-
} else
|
|
1764
|
-
|
|
1761
|
+
for (X = 0; s = D[$ + X++], c.head && s && c.length < 65536 && (c.head.comment += String.fromCharCode(s)), s && X < W; ) ;
|
|
1762
|
+
if (512 & c.flags && (c.check = o(c.check, D, X, $)), W -= X, $ += X, s) break t;
|
|
1763
|
+
} else c.head && (c.head.comment = null);
|
|
1764
|
+
c.mode = 9;
|
|
1765
1765
|
case 9:
|
|
1766
|
-
if (512 &
|
|
1766
|
+
if (512 & c.flags) {
|
|
1767
1767
|
for (; M < 16; ) {
|
|
1768
1768
|
if (W === 0) break t;
|
|
1769
1769
|
W--, z += D[$++] << M, M += 8;
|
|
1770
1770
|
}
|
|
1771
|
-
if (z !== (65535 &
|
|
1772
|
-
w.msg = "header crc mismatch",
|
|
1771
|
+
if (z !== (65535 & c.check)) {
|
|
1772
|
+
w.msg = "header crc mismatch", c.mode = 30;
|
|
1773
1773
|
break;
|
|
1774
1774
|
}
|
|
1775
1775
|
M = z = 0;
|
|
1776
1776
|
}
|
|
1777
|
-
|
|
1777
|
+
c.head && (c.head.hcrc = c.flags >> 9 & 1, c.head.done = !0), w.adler = c.check = 0, c.mode = 12;
|
|
1778
1778
|
break;
|
|
1779
1779
|
case 10:
|
|
1780
1780
|
for (; M < 32; ) {
|
|
1781
1781
|
if (W === 0) break t;
|
|
1782
1782
|
W--, z += D[$++] << M, M += 8;
|
|
1783
1783
|
}
|
|
1784
|
-
w.adler =
|
|
1784
|
+
w.adler = c.check = f(z), M = z = 0, c.mode = 11;
|
|
1785
1785
|
case 11:
|
|
1786
|
-
if (
|
|
1787
|
-
w.adler =
|
|
1786
|
+
if (c.havedict === 0) return w.next_out = rt, w.avail_out = tt, w.next_in = $, w.avail_in = W, c.hold = z, c.bits = M, 2;
|
|
1787
|
+
w.adler = c.check = 1, c.mode = 12;
|
|
1788
1788
|
case 12:
|
|
1789
1789
|
if (I === 5 || I === 6) break t;
|
|
1790
1790
|
case 13:
|
|
1791
|
-
if (
|
|
1792
|
-
z >>>= 7 & M, M -= 7 & M,
|
|
1791
|
+
if (c.last) {
|
|
1792
|
+
z >>>= 7 & M, M -= 7 & M, c.mode = 27;
|
|
1793
1793
|
break;
|
|
1794
1794
|
}
|
|
1795
1795
|
for (; M < 3; ) {
|
|
1796
1796
|
if (W === 0) break t;
|
|
1797
1797
|
W--, z += D[$++] << M, M += 8;
|
|
1798
1798
|
}
|
|
1799
|
-
switch (
|
|
1799
|
+
switch (c.last = 1 & z, M -= 1, 3 & (z >>>= 1)) {
|
|
1800
1800
|
case 0:
|
|
1801
|
-
|
|
1801
|
+
c.mode = 14;
|
|
1802
1802
|
break;
|
|
1803
1803
|
case 1:
|
|
1804
|
-
if (V(
|
|
1804
|
+
if (V(c), c.mode = 20, I !== 6) break;
|
|
1805
1805
|
z >>>= 2, M -= 2;
|
|
1806
1806
|
break t;
|
|
1807
1807
|
case 2:
|
|
1808
|
-
|
|
1808
|
+
c.mode = 17;
|
|
1809
1809
|
break;
|
|
1810
1810
|
case 3:
|
|
1811
|
-
w.msg = "invalid block type",
|
|
1811
|
+
w.msg = "invalid block type", c.mode = 30;
|
|
1812
1812
|
}
|
|
1813
1813
|
z >>>= 2, M -= 2;
|
|
1814
1814
|
break;
|
|
@@ -1818,62 +1818,62 @@ function we() {
|
|
|
1818
1818
|
W--, z += D[$++] << M, M += 8;
|
|
1819
1819
|
}
|
|
1820
1820
|
if ((65535 & z) != (z >>> 16 ^ 65535)) {
|
|
1821
|
-
w.msg = "invalid stored block lengths",
|
|
1821
|
+
w.msg = "invalid stored block lengths", c.mode = 30;
|
|
1822
1822
|
break;
|
|
1823
1823
|
}
|
|
1824
|
-
if (
|
|
1824
|
+
if (c.length = 65535 & z, M = z = 0, c.mode = 15, I === 6) break t;
|
|
1825
1825
|
case 15:
|
|
1826
|
-
|
|
1826
|
+
c.mode = 16;
|
|
1827
1827
|
case 16:
|
|
1828
|
-
if (X =
|
|
1828
|
+
if (X = c.length) {
|
|
1829
1829
|
if (W < X && (X = W), tt < X && (X = tt), X === 0) break t;
|
|
1830
|
-
n.arraySet(et, D, $, X, rt), W -= X, $ += X, tt -= X, rt += X,
|
|
1830
|
+
n.arraySet(et, D, $, X, rt), W -= X, $ += X, tt -= X, rt += X, c.length -= X;
|
|
1831
1831
|
break;
|
|
1832
1832
|
}
|
|
1833
|
-
|
|
1833
|
+
c.mode = 12;
|
|
1834
1834
|
break;
|
|
1835
1835
|
case 17:
|
|
1836
1836
|
for (; M < 14; ) {
|
|
1837
1837
|
if (W === 0) break t;
|
|
1838
1838
|
W--, z += D[$++] << M, M += 8;
|
|
1839
1839
|
}
|
|
1840
|
-
if (
|
|
1841
|
-
w.msg = "too many length or distance symbols",
|
|
1840
|
+
if (c.nlen = 257 + (31 & z), z >>>= 5, M -= 5, c.ndist = 1 + (31 & z), z >>>= 5, M -= 5, c.ncode = 4 + (15 & z), z >>>= 4, M -= 4, 286 < c.nlen || 30 < c.ndist) {
|
|
1841
|
+
w.msg = "too many length or distance symbols", c.mode = 30;
|
|
1842
1842
|
break;
|
|
1843
1843
|
}
|
|
1844
|
-
|
|
1844
|
+
c.have = 0, c.mode = 18;
|
|
1845
1845
|
case 18:
|
|
1846
|
-
for (;
|
|
1846
|
+
for (; c.have < c.ncode; ) {
|
|
1847
1847
|
for (; M < 3; ) {
|
|
1848
1848
|
if (W === 0) break t;
|
|
1849
1849
|
W--, z += D[$++] << M, M += 8;
|
|
1850
1850
|
}
|
|
1851
|
-
|
|
1851
|
+
c.lens[j[c.have++]] = 7 & z, z >>>= 3, M -= 3;
|
|
1852
1852
|
}
|
|
1853
|
-
for (;
|
|
1854
|
-
if (
|
|
1855
|
-
w.msg = "invalid code lengths set",
|
|
1853
|
+
for (; c.have < 19; ) c.lens[j[c.have++]] = 0;
|
|
1854
|
+
if (c.lencode = c.lendyn, c.lenbits = 7, R = { bits: c.lenbits }, O = _(0, c.lens, 0, 19, c.lencode, 0, c.work, R), c.lenbits = R.bits, O) {
|
|
1855
|
+
w.msg = "invalid code lengths set", c.mode = 30;
|
|
1856
1856
|
break;
|
|
1857
1857
|
}
|
|
1858
|
-
|
|
1858
|
+
c.have = 0, c.mode = 19;
|
|
1859
1859
|
case 19:
|
|
1860
|
-
for (;
|
|
1861
|
-
for (; st = (p =
|
|
1860
|
+
for (; c.have < c.nlen + c.ndist; ) {
|
|
1861
|
+
for (; st = (p = c.lencode[z & (1 << c.lenbits) - 1]) >>> 16 & 255, pt = 65535 & p, !((at = p >>> 24) <= M); ) {
|
|
1862
1862
|
if (W === 0) break t;
|
|
1863
1863
|
W--, z += D[$++] << M, M += 8;
|
|
1864
1864
|
}
|
|
1865
|
-
if (pt < 16) z >>>= at, M -= at,
|
|
1865
|
+
if (pt < 16) z >>>= at, M -= at, c.lens[c.have++] = pt;
|
|
1866
1866
|
else {
|
|
1867
1867
|
if (pt === 16) {
|
|
1868
1868
|
for (g = at + 2; M < g; ) {
|
|
1869
1869
|
if (W === 0) break t;
|
|
1870
1870
|
W--, z += D[$++] << M, M += 8;
|
|
1871
1871
|
}
|
|
1872
|
-
if (z >>>= at, M -= at,
|
|
1873
|
-
w.msg = "invalid bit length repeat",
|
|
1872
|
+
if (z >>>= at, M -= at, c.have === 0) {
|
|
1873
|
+
w.msg = "invalid bit length repeat", c.mode = 30;
|
|
1874
1874
|
break;
|
|
1875
1875
|
}
|
|
1876
|
-
s =
|
|
1876
|
+
s = c.lens[c.have - 1], X = 3 + (3 & z), z >>>= 2, M -= 2;
|
|
1877
1877
|
} else if (pt === 17) {
|
|
1878
1878
|
for (g = at + 3; M < g; ) {
|
|
1879
1879
|
if (W === 0) break t;
|
|
@@ -1887,139 +1887,139 @@ function we() {
|
|
|
1887
1887
|
}
|
|
1888
1888
|
M -= at, s = 0, X = 11 + (127 & (z >>>= at)), z >>>= 7, M -= 7;
|
|
1889
1889
|
}
|
|
1890
|
-
if (
|
|
1891
|
-
w.msg = "invalid bit length repeat",
|
|
1890
|
+
if (c.have + X > c.nlen + c.ndist) {
|
|
1891
|
+
w.msg = "invalid bit length repeat", c.mode = 30;
|
|
1892
1892
|
break;
|
|
1893
1893
|
}
|
|
1894
|
-
for (; X--; )
|
|
1894
|
+
for (; X--; ) c.lens[c.have++] = s;
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
|
-
if (
|
|
1898
|
-
if (
|
|
1899
|
-
w.msg = "invalid code -- missing end-of-block",
|
|
1897
|
+
if (c.mode === 30) break;
|
|
1898
|
+
if (c.lens[256] === 0) {
|
|
1899
|
+
w.msg = "invalid code -- missing end-of-block", c.mode = 30;
|
|
1900
1900
|
break;
|
|
1901
1901
|
}
|
|
1902
|
-
if (
|
|
1903
|
-
w.msg = "invalid literal/lengths set",
|
|
1902
|
+
if (c.lenbits = 9, R = { bits: c.lenbits }, O = _(S, c.lens, 0, c.nlen, c.lencode, 0, c.work, R), c.lenbits = R.bits, O) {
|
|
1903
|
+
w.msg = "invalid literal/lengths set", c.mode = 30;
|
|
1904
1904
|
break;
|
|
1905
1905
|
}
|
|
1906
|
-
if (
|
|
1907
|
-
w.msg = "invalid distances set",
|
|
1906
|
+
if (c.distbits = 6, c.distcode = c.distdyn, R = { bits: c.distbits }, O = _(v, c.lens, c.nlen, c.ndist, c.distcode, 0, c.work, R), c.distbits = R.bits, O) {
|
|
1907
|
+
w.msg = "invalid distances set", c.mode = 30;
|
|
1908
1908
|
break;
|
|
1909
1909
|
}
|
|
1910
|
-
if (
|
|
1910
|
+
if (c.mode = 20, I === 6) break t;
|
|
1911
1911
|
case 20:
|
|
1912
|
-
|
|
1912
|
+
c.mode = 21;
|
|
1913
1913
|
case 21:
|
|
1914
1914
|
if (6 <= W && 258 <= tt) {
|
|
1915
|
-
w.next_out = rt, w.avail_out = tt, w.next_in = $, w.avail_in = W,
|
|
1915
|
+
w.next_out = rt, w.avail_out = tt, w.next_in = $, w.avail_in = W, c.hold = z, c.bits = M, h(w, q), rt = w.next_out, et = w.output, tt = w.avail_out, $ = w.next_in, D = w.input, W = w.avail_in, z = c.hold, M = c.bits, c.mode === 12 && (c.back = -1);
|
|
1916
1916
|
break;
|
|
1917
1917
|
}
|
|
1918
|
-
for (
|
|
1918
|
+
for (c.back = 0; st = (p = c.lencode[z & (1 << c.lenbits) - 1]) >>> 16 & 255, pt = 65535 & p, !((at = p >>> 24) <= M); ) {
|
|
1919
1919
|
if (W === 0) break t;
|
|
1920
1920
|
W--, z += D[$++] << M, M += 8;
|
|
1921
1921
|
}
|
|
1922
1922
|
if (st && (240 & st) == 0) {
|
|
1923
|
-
for (ht = at, kt = st, vt = pt; st = (p =
|
|
1923
|
+
for (ht = at, kt = st, vt = pt; st = (p = c.lencode[vt + ((z & (1 << ht + kt) - 1) >> ht)]) >>> 16 & 255, pt = 65535 & p, !(ht + (at = p >>> 24) <= M); ) {
|
|
1924
1924
|
if (W === 0) break t;
|
|
1925
1925
|
W--, z += D[$++] << M, M += 8;
|
|
1926
1926
|
}
|
|
1927
|
-
z >>>= ht, M -= ht,
|
|
1927
|
+
z >>>= ht, M -= ht, c.back += ht;
|
|
1928
1928
|
}
|
|
1929
|
-
if (z >>>= at, M -= at,
|
|
1930
|
-
|
|
1929
|
+
if (z >>>= at, M -= at, c.back += at, c.length = pt, st === 0) {
|
|
1930
|
+
c.mode = 26;
|
|
1931
1931
|
break;
|
|
1932
1932
|
}
|
|
1933
1933
|
if (32 & st) {
|
|
1934
|
-
|
|
1934
|
+
c.back = -1, c.mode = 12;
|
|
1935
1935
|
break;
|
|
1936
1936
|
}
|
|
1937
1937
|
if (64 & st) {
|
|
1938
|
-
w.msg = "invalid literal/length code",
|
|
1938
|
+
w.msg = "invalid literal/length code", c.mode = 30;
|
|
1939
1939
|
break;
|
|
1940
1940
|
}
|
|
1941
|
-
|
|
1941
|
+
c.extra = 15 & st, c.mode = 22;
|
|
1942
1942
|
case 22:
|
|
1943
|
-
if (
|
|
1944
|
-
for (g =
|
|
1943
|
+
if (c.extra) {
|
|
1944
|
+
for (g = c.extra; M < g; ) {
|
|
1945
1945
|
if (W === 0) break t;
|
|
1946
1946
|
W--, z += D[$++] << M, M += 8;
|
|
1947
1947
|
}
|
|
1948
|
-
|
|
1948
|
+
c.length += z & (1 << c.extra) - 1, z >>>= c.extra, M -= c.extra, c.back += c.extra;
|
|
1949
1949
|
}
|
|
1950
|
-
|
|
1950
|
+
c.was = c.length, c.mode = 23;
|
|
1951
1951
|
case 23:
|
|
1952
|
-
for (; st = (p =
|
|
1952
|
+
for (; st = (p = c.distcode[z & (1 << c.distbits) - 1]) >>> 16 & 255, pt = 65535 & p, !((at = p >>> 24) <= M); ) {
|
|
1953
1953
|
if (W === 0) break t;
|
|
1954
1954
|
W--, z += D[$++] << M, M += 8;
|
|
1955
1955
|
}
|
|
1956
1956
|
if ((240 & st) == 0) {
|
|
1957
|
-
for (ht = at, kt = st, vt = pt; st = (p =
|
|
1957
|
+
for (ht = at, kt = st, vt = pt; st = (p = c.distcode[vt + ((z & (1 << ht + kt) - 1) >> ht)]) >>> 16 & 255, pt = 65535 & p, !(ht + (at = p >>> 24) <= M); ) {
|
|
1958
1958
|
if (W === 0) break t;
|
|
1959
1959
|
W--, z += D[$++] << M, M += 8;
|
|
1960
1960
|
}
|
|
1961
|
-
z >>>= ht, M -= ht,
|
|
1961
|
+
z >>>= ht, M -= ht, c.back += ht;
|
|
1962
1962
|
}
|
|
1963
|
-
if (z >>>= at, M -= at,
|
|
1964
|
-
w.msg = "invalid distance code",
|
|
1963
|
+
if (z >>>= at, M -= at, c.back += at, 64 & st) {
|
|
1964
|
+
w.msg = "invalid distance code", c.mode = 30;
|
|
1965
1965
|
break;
|
|
1966
1966
|
}
|
|
1967
|
-
|
|
1967
|
+
c.offset = pt, c.extra = 15 & st, c.mode = 24;
|
|
1968
1968
|
case 24:
|
|
1969
|
-
if (
|
|
1970
|
-
for (g =
|
|
1969
|
+
if (c.extra) {
|
|
1970
|
+
for (g = c.extra; M < g; ) {
|
|
1971
1971
|
if (W === 0) break t;
|
|
1972
1972
|
W--, z += D[$++] << M, M += 8;
|
|
1973
1973
|
}
|
|
1974
|
-
|
|
1974
|
+
c.offset += z & (1 << c.extra) - 1, z >>>= c.extra, M -= c.extra, c.back += c.extra;
|
|
1975
1975
|
}
|
|
1976
|
-
if (
|
|
1977
|
-
w.msg = "invalid distance too far back",
|
|
1976
|
+
if (c.offset > c.dmax) {
|
|
1977
|
+
w.msg = "invalid distance too far back", c.mode = 30;
|
|
1978
1978
|
break;
|
|
1979
1979
|
}
|
|
1980
|
-
|
|
1980
|
+
c.mode = 25;
|
|
1981
1981
|
case 25:
|
|
1982
1982
|
if (tt === 0) break t;
|
|
1983
|
-
if (X =
|
|
1984
|
-
if ((X =
|
|
1985
|
-
w.msg = "invalid distance too far back",
|
|
1983
|
+
if (X = q - tt, c.offset > X) {
|
|
1984
|
+
if ((X = c.offset - X) > c.whave && c.sane) {
|
|
1985
|
+
w.msg = "invalid distance too far back", c.mode = 30;
|
|
1986
1986
|
break;
|
|
1987
1987
|
}
|
|
1988
|
-
ct = X >
|
|
1989
|
-
} else mt = et, ct = rt -
|
|
1990
|
-
for (tt < X && (X = tt), tt -= X,
|
|
1991
|
-
|
|
1988
|
+
ct = X > c.wnext ? (X -= c.wnext, c.wsize - X) : c.wnext - X, X > c.length && (X = c.length), mt = c.window;
|
|
1989
|
+
} else mt = et, ct = rt - c.offset, X = c.length;
|
|
1990
|
+
for (tt < X && (X = tt), tt -= X, c.length -= X; et[rt++] = mt[ct++], --X; ) ;
|
|
1991
|
+
c.length === 0 && (c.mode = 21);
|
|
1992
1992
|
break;
|
|
1993
1993
|
case 26:
|
|
1994
1994
|
if (tt === 0) break t;
|
|
1995
|
-
et[rt++] =
|
|
1995
|
+
et[rt++] = c.length, tt--, c.mode = 21;
|
|
1996
1996
|
break;
|
|
1997
1997
|
case 27:
|
|
1998
|
-
if (
|
|
1998
|
+
if (c.wrap) {
|
|
1999
1999
|
for (; M < 32; ) {
|
|
2000
2000
|
if (W === 0) break t;
|
|
2001
2001
|
W--, z |= D[$++] << M, M += 8;
|
|
2002
2002
|
}
|
|
2003
|
-
if (
|
|
2004
|
-
w.msg = "incorrect data check",
|
|
2003
|
+
if (q -= tt, w.total_out += q, c.total += q, q && (w.adler = c.check = c.flags ? o(c.check, et, q, rt - q) : i(c.check, et, q, rt - q)), q = tt, (c.flags ? z : f(z)) !== c.check) {
|
|
2004
|
+
w.msg = "incorrect data check", c.mode = 30;
|
|
2005
2005
|
break;
|
|
2006
2006
|
}
|
|
2007
2007
|
M = z = 0;
|
|
2008
2008
|
}
|
|
2009
|
-
|
|
2009
|
+
c.mode = 28;
|
|
2010
2010
|
case 28:
|
|
2011
|
-
if (
|
|
2011
|
+
if (c.wrap && c.flags) {
|
|
2012
2012
|
for (; M < 32; ) {
|
|
2013
2013
|
if (W === 0) break t;
|
|
2014
2014
|
W--, z += D[$++] << M, M += 8;
|
|
2015
2015
|
}
|
|
2016
|
-
if (z !== (4294967295 &
|
|
2017
|
-
w.msg = "incorrect length check",
|
|
2016
|
+
if (z !== (4294967295 & c.total)) {
|
|
2017
|
+
w.msg = "incorrect length check", c.mode = 30;
|
|
2018
2018
|
break;
|
|
2019
2019
|
}
|
|
2020
2020
|
M = z = 0;
|
|
2021
2021
|
}
|
|
2022
|
-
|
|
2022
|
+
c.mode = 29;
|
|
2023
2023
|
case 29:
|
|
2024
2024
|
O = 1;
|
|
2025
2025
|
break t;
|
|
@@ -2031,41 +2031,41 @@ function we() {
|
|
|
2031
2031
|
default:
|
|
2032
2032
|
return d;
|
|
2033
2033
|
}
|
|
2034
|
-
return w.next_out = rt, w.avail_out = tt, w.next_in = $, w.avail_in = W,
|
|
2034
|
+
return w.next_out = rt, w.avail_out = tt, w.next_in = $, w.avail_in = W, c.hold = z, c.bits = M, (c.wsize || q !== w.avail_out && c.mode < 30 && (c.mode < 27 || I !== 4)) && Q(w, w.output, w.next_out, q - w.avail_out) ? (c.mode = 31, -4) : (J -= w.avail_in, q -= w.avail_out, w.total_in += J, w.total_out += q, c.total += q, c.wrap && q && (w.adler = c.check = c.flags ? o(c.check, et, q, w.next_out - q) : i(c.check, et, q, w.next_out - q)), w.data_type = c.bits + (c.last ? 64 : 0) + (c.mode === 12 ? 128 : 0) + (c.mode === 20 || c.mode === 15 ? 256 : 0), (J == 0 && q === 0 || I === 4) && O === y && (O = -5), O);
|
|
2035
2035
|
}, a.inflateEnd = function(w) {
|
|
2036
2036
|
if (!w || !w.state) return d;
|
|
2037
2037
|
var I = w.state;
|
|
2038
2038
|
return I.window && (I.window = null), w.state = null, y;
|
|
2039
2039
|
}, a.inflateGetHeader = function(w, I) {
|
|
2040
|
-
var
|
|
2041
|
-
return w && w.state ? (2 & (
|
|
2040
|
+
var c;
|
|
2041
|
+
return w && w.state ? (2 & (c = w.state).wrap) == 0 ? d : ((c.head = I).done = !1, y) : d;
|
|
2042
2042
|
}, a.inflateSetDictionary = function(w, I) {
|
|
2043
|
-
var
|
|
2044
|
-
return w && w.state ? (
|
|
2043
|
+
var c, D = I.length;
|
|
2044
|
+
return w && w.state ? (c = w.state).wrap !== 0 && c.mode !== 11 ? d : c.mode === 11 && i(1, I, D, 0) !== c.check ? -3 : Q(w, I, D, D) ? (c.mode = 31, -4) : (c.havedict = 1, y) : d;
|
|
2045
2045
|
}, a.inflateInfo = "pako inflate (from Nodeca project)";
|
|
2046
2046
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(t, r, a) {
|
|
2047
|
-
var n = t("../utils/common"),
|
|
2047
|
+
var n = t("../utils/common"), i = [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], o = [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], _ = [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];
|
|
2048
2048
|
r.exports = function(S, v, y, d, k, u, m, f) {
|
|
2049
|
-
var b, x, E, A, L, F, H, T, V, Q = f.bits, w = 0, I = 0,
|
|
2050
|
-
for (w = 0; w <= 15; w++)
|
|
2051
|
-
for (I = 0; I < d; I++)
|
|
2052
|
-
for (et = Q, D = 15; 1 <= D &&
|
|
2049
|
+
var b, x, E, A, L, F, H, T, V, Q = f.bits, w = 0, I = 0, c = 0, D = 0, et = 0, $ = 0, rt = 0, W = 0, tt = 0, z = 0, M = null, J = 0, q = new n.Buf16(16), X = new n.Buf16(16), ct = null, mt = 0;
|
|
2050
|
+
for (w = 0; w <= 15; w++) q[w] = 0;
|
|
2051
|
+
for (I = 0; I < d; I++) q[v[y + I]]++;
|
|
2052
|
+
for (et = Q, D = 15; 1 <= D && q[D] === 0; D--) ;
|
|
2053
2053
|
if (D < et && (et = D), D === 0) return k[u++] = 20971520, k[u++] = 20971520, f.bits = 1, 0;
|
|
2054
|
-
for (
|
|
2055
|
-
for (et <
|
|
2054
|
+
for (c = 1; c < D && q[c] === 0; c++) ;
|
|
2055
|
+
for (et < c && (et = c), w = W = 1; w <= 15; w++) if (W <<= 1, (W -= q[w]) < 0) return -1;
|
|
2056
2056
|
if (0 < W && (S === 0 || D !== 1)) return -1;
|
|
2057
|
-
for (X[1] = 0, w = 1; w < 15; w++) X[w + 1] = X[w] +
|
|
2057
|
+
for (X[1] = 0, w = 1; w < 15; w++) X[w + 1] = X[w] + q[w];
|
|
2058
2058
|
for (I = 0; I < d; I++) v[y + I] !== 0 && (m[X[v[y + I]]++] = I);
|
|
2059
|
-
if (F = S === 0 ? (M = ct = m, 19) : S === 1 ? (M =
|
|
2059
|
+
if (F = S === 0 ? (M = ct = m, 19) : S === 1 ? (M = i, J -= 257, ct = o, mt -= 257, 256) : (M = h, ct = _, -1), w = c, L = u, rt = I = z = 0, E = -1, A = (tt = 1 << ($ = et)) - 1, S === 1 && 852 < tt || S === 2 && 592 < tt) return 1;
|
|
2060
2060
|
for (; ; ) {
|
|
2061
|
-
for (H = w - rt, V = m[I] < F ? (T = 0, m[I]) : m[I] > F ? (T = ct[mt + m[I]], M[J + m[I]]) : (T = 96, 0), b = 1 << w - rt,
|
|
2061
|
+
for (H = w - rt, V = m[I] < F ? (T = 0, m[I]) : m[I] > F ? (T = ct[mt + m[I]], M[J + m[I]]) : (T = 96, 0), b = 1 << w - rt, c = x = 1 << $; k[L + (z >> rt) + (x -= b)] = H << 24 | T << 16 | V | 0, x !== 0; ) ;
|
|
2062
2062
|
for (b = 1 << w - 1; z & b; ) b >>= 1;
|
|
2063
|
-
if (b !== 0 ? (z &= b - 1, z += b) : z = 0, I++, --
|
|
2063
|
+
if (b !== 0 ? (z &= b - 1, z += b) : z = 0, I++, --q[w] == 0) {
|
|
2064
2064
|
if (w === D) break;
|
|
2065
2065
|
w = v[y + m[I]];
|
|
2066
2066
|
}
|
|
2067
2067
|
if (et < w && (z & A) !== E) {
|
|
2068
|
-
for (rt === 0 && (rt = et), L +=
|
|
2068
|
+
for (rt === 0 && (rt = et), L += c, W = 1 << ($ = w - rt); $ + rt < D && !((W -= q[$ + rt]) <= 0); ) $++, W <<= 1;
|
|
2069
2069
|
if (tt += 1 << $, S === 1 && 852 < tt || S === 2 && 592 < tt) return 1;
|
|
2070
2070
|
k[E = z & A] = et << 24 | $ << 16 | L - u | 0;
|
|
2071
2071
|
}
|
|
@@ -2075,7 +2075,7 @@ function we() {
|
|
|
2075
2075
|
}, { "../utils/common": 41 }], 51: [function(t, r, a) {
|
|
2076
2076
|
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" };
|
|
2077
2077
|
}, {}], 52: [function(t, r, a) {
|
|
2078
|
-
var n = t("../utils/common"),
|
|
2078
|
+
var n = t("../utils/common"), i = 0, o = 1;
|
|
2079
2079
|
function h(p) {
|
|
2080
2080
|
for (var P = p.length; 0 <= --P; ) p[P] = 0;
|
|
2081
2081
|
}
|
|
@@ -2085,8 +2085,8 @@ function we() {
|
|
|
2085
2085
|
h(w);
|
|
2086
2086
|
var I = new Array(512);
|
|
2087
2087
|
h(I);
|
|
2088
|
-
var
|
|
2089
|
-
h(
|
|
2088
|
+
var c = new Array(256);
|
|
2089
|
+
h(c);
|
|
2090
2090
|
var D = new Array(S);
|
|
2091
2091
|
h(D);
|
|
2092
2092
|
var et, $, rt, W = new Array(d);
|
|
@@ -2102,19 +2102,19 @@ function we() {
|
|
|
2102
2102
|
function J(p, P) {
|
|
2103
2103
|
p.pending_buf[p.pending++] = 255 & P, p.pending_buf[p.pending++] = P >>> 8 & 255;
|
|
2104
2104
|
}
|
|
2105
|
-
function
|
|
2105
|
+
function q(p, P, j) {
|
|
2106
2106
|
p.bi_valid > f - j ? (p.bi_buf |= P << p.bi_valid & 65535, J(p, p.bi_buf), p.bi_buf = P >> f - p.bi_valid, p.bi_valid += j - f) : (p.bi_buf |= P << p.bi_valid & 65535, p.bi_valid += j);
|
|
2107
2107
|
}
|
|
2108
2108
|
function X(p, P, j) {
|
|
2109
|
-
|
|
2109
|
+
q(p, j[2 * P], j[2 * P + 1]);
|
|
2110
2110
|
}
|
|
2111
2111
|
function ct(p, P) {
|
|
2112
2112
|
for (var j = 0; j |= 1 & p, p >>>= 1, j <<= 1, 0 < --P; ) ;
|
|
2113
2113
|
return j >>> 1;
|
|
2114
2114
|
}
|
|
2115
2115
|
function mt(p, P, j) {
|
|
2116
|
-
var U, N, Z = new Array(m + 1),
|
|
2117
|
-
for (U = 1; U <= m; U++) Z[U] =
|
|
2116
|
+
var U, N, Z = new Array(m + 1), K = 0;
|
|
2117
|
+
for (U = 1; U <= m; U++) Z[U] = K = K + j[U - 1] << 1;
|
|
2118
2118
|
for (N = 0; N <= P; N++) {
|
|
2119
2119
|
var G = p[2 * N + 1];
|
|
2120
2120
|
G !== 0 && (p[2 * N] = ct(Z[G]++, G));
|
|
@@ -2139,20 +2139,20 @@ function we() {
|
|
|
2139
2139
|
p.heap[j] = U;
|
|
2140
2140
|
}
|
|
2141
2141
|
function kt(p, P, j) {
|
|
2142
|
-
var U, N, Z,
|
|
2143
|
-
if (p.last_lit !== 0) for (; U = p.pending_buf[p.d_buf + 2 * G] << 8 | p.pending_buf[p.d_buf + 2 * G + 1], N = p.pending_buf[p.l_buf + G], G++, U === 0 ? X(p, N, P) : (X(p, (Z =
|
|
2142
|
+
var U, N, Z, K, G = 0;
|
|
2143
|
+
if (p.last_lit !== 0) for (; U = p.pending_buf[p.d_buf + 2 * G] << 8 | p.pending_buf[p.d_buf + 2 * G + 1], N = p.pending_buf[p.l_buf + G], G++, U === 0 ? X(p, N, P) : (X(p, (Z = c[N]) + v + 1, P), (K = F[Z]) !== 0 && q(p, N -= D[Z], K), X(p, Z = M(--U), j), (K = H[Z]) !== 0 && q(p, U -= W[Z], K)), G < p.last_lit; ) ;
|
|
2144
2144
|
X(p, x, P);
|
|
2145
2145
|
}
|
|
2146
2146
|
function vt(p, P) {
|
|
2147
|
-
var j, U, N, Z = P.dyn_tree,
|
|
2148
|
-
for (p.heap_len = 0, p.heap_max = u, j = 0; j <
|
|
2149
|
-
for (; p.heap_len < 2; ) Z[2 * (N = p.heap[++p.heap_len] = lt < 2 ? ++lt : 0)] = 1, p.depth[N] = 0, p.opt_len--, G && (p.static_len -=
|
|
2147
|
+
var j, U, N, Z = P.dyn_tree, K = P.stat_desc.static_tree, G = P.stat_desc.has_stree, Y = P.stat_desc.elems, lt = -1;
|
|
2148
|
+
for (p.heap_len = 0, p.heap_max = u, j = 0; j < Y; j++) Z[2 * j] !== 0 ? (p.heap[++p.heap_len] = lt = j, p.depth[j] = 0) : Z[2 * j + 1] = 0;
|
|
2149
|
+
for (; p.heap_len < 2; ) Z[2 * (N = p.heap[++p.heap_len] = lt < 2 ? ++lt : 0)] = 1, p.depth[N] = 0, p.opt_len--, G && (p.static_len -= K[2 * N + 1]);
|
|
2150
2150
|
for (P.max_code = lt, j = p.heap_len >> 1; 1 <= j; j--) ht(p, Z, j);
|
|
2151
|
-
for (N =
|
|
2151
|
+
for (N = Y; j = p.heap[1], p.heap[1] = p.heap[p.heap_len--], ht(p, Z, 1), U = p.heap[1], p.heap[--p.heap_max] = j, p.heap[--p.heap_max] = U, Z[2 * N] = Z[2 * j] + Z[2 * U], p.depth[N] = (p.depth[j] >= p.depth[U] ? p.depth[j] : p.depth[U]) + 1, Z[2 * j + 1] = Z[2 * U + 1] = N, p.heap[1] = N++, ht(p, Z, 1), 2 <= p.heap_len; ) ;
|
|
2152
2152
|
p.heap[--p.heap_max] = p.heap[1], (function(nt, bt) {
|
|
2153
|
-
var xt, yt, Pt, ut, Mt, Dt, _t = bt.dyn_tree, Xt = bt.max_code, ve = bt.stat_desc.static_tree, ke = bt.stat_desc.has_stree, ye = bt.stat_desc.extra_bits,
|
|
2153
|
+
var xt, yt, Pt, ut, Mt, Dt, _t = bt.dyn_tree, Xt = bt.max_code, ve = bt.stat_desc.static_tree, ke = bt.stat_desc.has_stree, ye = bt.stat_desc.extra_bits, qt = bt.stat_desc.extra_base, At = bt.stat_desc.max_length, Bt = 0;
|
|
2154
2154
|
for (ut = 0; ut <= m; ut++) nt.bl_count[ut] = 0;
|
|
2155
|
-
for (_t[2 * nt.heap[nt.heap_max] + 1] = 0, xt = nt.heap_max + 1; xt < u; xt++) At < (ut = _t[2 * _t[2 * (yt = nt.heap[xt]) + 1] + 1] + 1) && (ut = At, Bt++), _t[2 * yt + 1] = ut, Xt < yt || (nt.bl_count[ut]++, Mt = 0,
|
|
2155
|
+
for (_t[2 * nt.heap[nt.heap_max] + 1] = 0, xt = nt.heap_max + 1; xt < u; xt++) At < (ut = _t[2 * _t[2 * (yt = nt.heap[xt]) + 1] + 1] + 1) && (ut = At, Bt++), _t[2 * yt + 1] = ut, Xt < yt || (nt.bl_count[ut]++, Mt = 0, qt <= yt && (Mt = ye[yt - qt]), Dt = _t[2 * yt], nt.opt_len += Dt * (ut + Mt), ke && (nt.static_len += Dt * (ve[2 * yt + 1] + Mt)));
|
|
2156
2156
|
if (Bt !== 0) {
|
|
2157
2157
|
do {
|
|
2158
2158
|
for (ut = At - 1; nt.bl_count[ut] === 0; ) ut--;
|
|
@@ -2163,59 +2163,59 @@ function we() {
|
|
|
2163
2163
|
})(p, P), mt(Z, lt, p.bl_count);
|
|
2164
2164
|
}
|
|
2165
2165
|
function s(p, P, j) {
|
|
2166
|
-
var U, N, Z = -1,
|
|
2167
|
-
for (
|
|
2166
|
+
var U, N, Z = -1, K = P[1], G = 0, Y = 7, lt = 4;
|
|
2167
|
+
for (K === 0 && (Y = 138, lt = 3), P[2 * (j + 1) + 1] = 65535, U = 0; U <= j; U++) N = K, K = P[2 * (U + 1) + 1], ++G < Y && N === K || (G < lt ? p.bl_tree[2 * N] += G : N !== 0 ? (N !== Z && p.bl_tree[2 * N]++, p.bl_tree[2 * E]++) : G <= 10 ? p.bl_tree[2 * A]++ : p.bl_tree[2 * L]++, Z = N, lt = (G = 0) === K ? (Y = 138, 3) : N === K ? (Y = 6, 3) : (Y = 7, 4));
|
|
2168
2168
|
}
|
|
2169
2169
|
function O(p, P, j) {
|
|
2170
|
-
var U, N, Z = -1,
|
|
2171
|
-
for (
|
|
2170
|
+
var U, N, Z = -1, K = P[1], G = 0, Y = 7, lt = 4;
|
|
2171
|
+
for (K === 0 && (Y = 138, lt = 3), U = 0; U <= j; U++) if (N = K, K = P[2 * (U + 1) + 1], !(++G < Y && N === K)) {
|
|
2172
2172
|
if (G < lt) for (; X(p, N, p.bl_tree), --G != 0; ) ;
|
|
2173
|
-
else N !== 0 ? (N !== Z && (X(p, N, p.bl_tree), G--), X(p, E, p.bl_tree),
|
|
2174
|
-
Z = N, lt = (G = 0) ===
|
|
2173
|
+
else N !== 0 ? (N !== Z && (X(p, N, p.bl_tree), G--), X(p, E, p.bl_tree), q(p, G - 3, 2)) : G <= 10 ? (X(p, A, p.bl_tree), q(p, G - 3, 3)) : (X(p, L, p.bl_tree), q(p, G - 11, 7));
|
|
2174
|
+
Z = N, lt = (G = 0) === K ? (Y = 138, 3) : N === K ? (Y = 6, 3) : (Y = 7, 4);
|
|
2175
2175
|
}
|
|
2176
2176
|
}
|
|
2177
2177
|
h(W);
|
|
2178
2178
|
var R = !1;
|
|
2179
2179
|
function g(p, P, j, U) {
|
|
2180
|
-
|
|
2181
|
-
st(N), J(N,
|
|
2180
|
+
q(p, (_ << 1) + (U ? 1 : 0), 3), (function(N, Z, K, G) {
|
|
2181
|
+
st(N), J(N, K), J(N, ~K), n.arraySet(N.pending_buf, N.window, Z, K, N.pending), N.pending += K;
|
|
2182
2182
|
})(p, P, j);
|
|
2183
2183
|
}
|
|
2184
2184
|
a._tr_init = function(p) {
|
|
2185
2185
|
R || ((function() {
|
|
2186
|
-
var P, j, U, N, Z,
|
|
2187
|
-
for (N = U = 0; N < S - 1; N++) for (D[N] = U, P = 0; P < 1 << F[N]; P++)
|
|
2188
|
-
for (
|
|
2186
|
+
var P, j, U, N, Z, K = new Array(m + 1);
|
|
2187
|
+
for (N = U = 0; N < S - 1; N++) for (D[N] = U, P = 0; P < 1 << F[N]; P++) c[U++] = N;
|
|
2188
|
+
for (c[U - 1] = N, N = Z = 0; N < 16; N++) for (W[N] = Z, P = 0; P < 1 << H[N]; P++) I[Z++] = N;
|
|
2189
2189
|
for (Z >>= 7; N < d; N++) for (W[N] = Z << 7, P = 0; P < 1 << H[N] - 7; P++) I[256 + Z++] = N;
|
|
2190
|
-
for (j = 0; j <= m; j++)
|
|
2191
|
-
for (P = 0; P <= 143; ) Q[2 * P + 1] = 8, P++,
|
|
2192
|
-
for (; P <= 255; ) Q[2 * P + 1] = 9, P++,
|
|
2193
|
-
for (; P <= 279; ) Q[2 * P + 1] = 7, P++,
|
|
2194
|
-
for (; P <= 287; ) Q[2 * P + 1] = 8, P++,
|
|
2195
|
-
for (mt(Q, y + 1,
|
|
2190
|
+
for (j = 0; j <= m; j++) K[j] = 0;
|
|
2191
|
+
for (P = 0; P <= 143; ) Q[2 * P + 1] = 8, P++, K[8]++;
|
|
2192
|
+
for (; P <= 255; ) Q[2 * P + 1] = 9, P++, K[9]++;
|
|
2193
|
+
for (; P <= 279; ) Q[2 * P + 1] = 7, P++, K[7]++;
|
|
2194
|
+
for (; P <= 287; ) Q[2 * P + 1] = 8, P++, K[8]++;
|
|
2195
|
+
for (mt(Q, y + 1, K), P = 0; P < d; P++) w[2 * P + 1] = 5, w[2 * P] = ct(P, 5);
|
|
2196
2196
|
et = new tt(Q, F, v + 1, y, m), $ = new tt(w, H, 0, d, m), rt = new tt(new Array(0), T, 0, k, b);
|
|
2197
2197
|
})(), R = !0), p.l_desc = new z(p.dyn_ltree, et), p.d_desc = new z(p.dyn_dtree, $), p.bl_desc = new z(p.bl_tree, rt), p.bi_buf = 0, p.bi_valid = 0, at(p);
|
|
2198
2198
|
}, a._tr_stored_block = g, a._tr_flush_block = function(p, P, j, U) {
|
|
2199
|
-
var N, Z,
|
|
2199
|
+
var N, Z, K = 0;
|
|
2200
2200
|
0 < p.level ? (p.strm.data_type === 2 && (p.strm.data_type = (function(G) {
|
|
2201
|
-
var
|
|
2202
|
-
for (
|
|
2203
|
-
if (G.dyn_ltree[18] !== 0 || G.dyn_ltree[20] !== 0 || G.dyn_ltree[26] !== 0) return
|
|
2204
|
-
for (
|
|
2205
|
-
return
|
|
2206
|
-
})(p)), vt(p, p.l_desc), vt(p, p.d_desc),
|
|
2207
|
-
var
|
|
2208
|
-
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),
|
|
2209
|
-
return G.opt_len += 3 * (
|
|
2210
|
-
})(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 && P !== -1 ? g(p, P, j, U) : p.strategy === 4 || Z === N ? (
|
|
2201
|
+
var Y, lt = 4093624447;
|
|
2202
|
+
for (Y = 0; Y <= 31; Y++, lt >>>= 1) if (1 & lt && G.dyn_ltree[2 * Y] !== 0) return i;
|
|
2203
|
+
if (G.dyn_ltree[18] !== 0 || G.dyn_ltree[20] !== 0 || G.dyn_ltree[26] !== 0) return o;
|
|
2204
|
+
for (Y = 32; Y < v; Y++) if (G.dyn_ltree[2 * Y] !== 0) return o;
|
|
2205
|
+
return i;
|
|
2206
|
+
})(p)), vt(p, p.l_desc), vt(p, p.d_desc), K = (function(G) {
|
|
2207
|
+
var Y;
|
|
2208
|
+
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--) ;
|
|
2209
|
+
return G.opt_len += 3 * (Y + 1) + 5 + 5 + 4, Y;
|
|
2210
|
+
})(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 && P !== -1 ? g(p, P, j, U) : p.strategy === 4 || Z === N ? (q(p, 2 + (U ? 1 : 0), 3), kt(p, Q, w)) : (q(p, 4 + (U ? 1 : 0), 3), (function(G, Y, lt, nt) {
|
|
2211
2211
|
var bt;
|
|
2212
|
-
for (
|
|
2213
|
-
O(G, G.dyn_ltree,
|
|
2214
|
-
})(p, p.l_desc.max_code + 1, p.d_desc.max_code + 1,
|
|
2212
|
+
for (q(G, Y - 257, 5), q(G, lt - 1, 5), q(G, nt - 4, 4), bt = 0; bt < nt; bt++) q(G, G.bl_tree[2 * V[bt] + 1], 3);
|
|
2213
|
+
O(G, G.dyn_ltree, Y - 1), O(G, G.dyn_dtree, lt - 1);
|
|
2214
|
+
})(p, p.l_desc.max_code + 1, p.d_desc.max_code + 1, K + 1), kt(p, p.dyn_ltree, p.dyn_dtree)), at(p), U && st(p);
|
|
2215
2215
|
}, a._tr_tally = function(p, P, j) {
|
|
2216
|
-
return p.pending_buf[p.d_buf + 2 * p.last_lit] = P >>> 8 & 255, p.pending_buf[p.d_buf + 2 * p.last_lit + 1] = 255 & P, p.pending_buf[p.l_buf + p.last_lit] = 255 & j, p.last_lit++, P === 0 ? p.dyn_ltree[2 * j]++ : (p.matches++, P--, p.dyn_ltree[2 * (
|
|
2216
|
+
return p.pending_buf[p.d_buf + 2 * p.last_lit] = P >>> 8 & 255, p.pending_buf[p.d_buf + 2 * p.last_lit + 1] = 255 & P, p.pending_buf[p.l_buf + p.last_lit] = 255 & j, p.last_lit++, P === 0 ? p.dyn_ltree[2 * j]++ : (p.matches++, P--, p.dyn_ltree[2 * (c[j] + v + 1)]++, p.dyn_dtree[2 * M(P)]++), p.last_lit === p.lit_bufsize - 1;
|
|
2217
2217
|
}, a._tr_align = function(p) {
|
|
2218
|
-
|
|
2218
|
+
q(p, 2, 3), X(p, x, Q), (function(P) {
|
|
2219
2219
|
P.bi_valid === 16 ? (J(P, P.bi_buf), P.bi_buf = 0, P.bi_valid = 0) : 8 <= P.bi_valid && (P.pending_buf[P.pending++] = 255 & P.bi_buf, P.bi_buf >>= 8, P.bi_valid -= 8);
|
|
2220
2220
|
})(p);
|
|
2221
2221
|
};
|
|
@@ -2225,23 +2225,23 @@ function we() {
|
|
|
2225
2225
|
};
|
|
2226
2226
|
}, {}], 54: [function(t, r, a) {
|
|
2227
2227
|
(function(n) {
|
|
2228
|
-
(function(
|
|
2229
|
-
if (!
|
|
2230
|
-
var h, _, S, v, y = 1, d = {}, k = !1, u =
|
|
2231
|
-
m = m && m.setTimeout ? m :
|
|
2228
|
+
(function(i, o) {
|
|
2229
|
+
if (!i.setImmediate) {
|
|
2230
|
+
var h, _, S, v, y = 1, d = {}, k = !1, u = i.document, m = Object.getPrototypeOf && Object.getPrototypeOf(i);
|
|
2231
|
+
m = m && m.setTimeout ? m : i, h = {}.toString.call(i.process) === "[object process]" ? function(E) {
|
|
2232
2232
|
process.nextTick(function() {
|
|
2233
2233
|
b(E);
|
|
2234
2234
|
});
|
|
2235
2235
|
} : (function() {
|
|
2236
|
-
if (
|
|
2237
|
-
var E = !0, A =
|
|
2238
|
-
return
|
|
2236
|
+
if (i.postMessage && !i.importScripts) {
|
|
2237
|
+
var E = !0, A = i.onmessage;
|
|
2238
|
+
return i.onmessage = function() {
|
|
2239
2239
|
E = !1;
|
|
2240
|
-
},
|
|
2240
|
+
}, i.postMessage("", "*"), i.onmessage = A, E;
|
|
2241
2241
|
}
|
|
2242
|
-
})() ? (v = "setImmediate$" + Math.random() + "$",
|
|
2243
|
-
|
|
2244
|
-
}) :
|
|
2242
|
+
})() ? (v = "setImmediate$" + Math.random() + "$", i.addEventListener ? i.addEventListener("message", x, !1) : i.attachEvent("onmessage", x), function(E) {
|
|
2243
|
+
i.postMessage(v + E, "*");
|
|
2244
|
+
}) : i.MessageChannel ? ((S = new MessageChannel()).port1.onmessage = function(E) {
|
|
2245
2245
|
b(E.data);
|
|
2246
2246
|
}, function(E) {
|
|
2247
2247
|
S.port2.postMessage(E);
|
|
@@ -2285,7 +2285,7 @@ function we() {
|
|
|
2285
2285
|
F(H[0], H[1], H[2]);
|
|
2286
2286
|
break;
|
|
2287
2287
|
default:
|
|
2288
|
-
F.apply(
|
|
2288
|
+
F.apply(o, H);
|
|
2289
2289
|
}
|
|
2290
2290
|
})(A);
|
|
2291
2291
|
} finally {
|
|
@@ -2295,7 +2295,7 @@ function we() {
|
|
|
2295
2295
|
}
|
|
2296
2296
|
}
|
|
2297
2297
|
function x(E) {
|
|
2298
|
-
E.source ===
|
|
2298
|
+
E.source === i && typeof E.data == "string" && E.data.indexOf(v) === 0 && b(+E.data.slice(v.length));
|
|
2299
2299
|
}
|
|
2300
2300
|
})(typeof self > "u" ? n === void 0 ? this : n : self);
|
|
2301
2301
|
}).call(this, typeof zt < "u" ? zt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -2306,68 +2306,68 @@ function we() {
|
|
|
2306
2306
|
var Se = we();
|
|
2307
2307
|
const Ce = /* @__PURE__ */ _e(Se);
|
|
2308
2308
|
var dt;
|
|
2309
|
-
(function(
|
|
2310
|
-
|
|
2309
|
+
(function(l) {
|
|
2310
|
+
l.OfficeDocument = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", l.FontTable = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable", l.Image = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", l.Numbering = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering", l.Styles = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", l.StylesWithEffects = "http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects", l.Theme = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", l.Settings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings", l.WebSettings = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings", l.Hyperlink = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", l.Footnotes = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes", l.Endnotes = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes", l.Footer = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", l.Header = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", l.ExtendedProperties = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties", l.CoreProperties = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties", l.CustomProperties = "http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties", l.Comments = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", l.CommentsExtended = "http://schemas.microsoft.com/office/2011/relationships/commentsExtended", l.AltChunk = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk";
|
|
2311
2311
|
})(dt || (dt = {}));
|
|
2312
|
-
function xe(
|
|
2313
|
-
return e.elements(
|
|
2312
|
+
function xe(l, e) {
|
|
2313
|
+
return e.elements(l).map((t) => ({
|
|
2314
2314
|
id: e.attr(t, "Id"),
|
|
2315
2315
|
type: e.attr(t, "Type"),
|
|
2316
2316
|
target: e.attr(t, "Target"),
|
|
2317
2317
|
targetMode: e.attr(t, "TargetMode")
|
|
2318
2318
|
}));
|
|
2319
2319
|
}
|
|
2320
|
-
function Pe(
|
|
2321
|
-
return
|
|
2320
|
+
function Pe(l) {
|
|
2321
|
+
return l?.replace(/[ .]+/g, "-").replace(/[&]+/g, "and").toLowerCase();
|
|
2322
2322
|
}
|
|
2323
|
-
function Ht(
|
|
2324
|
-
return /^[^"'].*\s.*[^"']$/.test(
|
|
2323
|
+
function Ht(l) {
|
|
2324
|
+
return /^[^"'].*\s.*[^"']$/.test(l) ? `'${l}'` : l;
|
|
2325
2325
|
}
|
|
2326
|
-
function Ft(
|
|
2327
|
-
let e =
|
|
2326
|
+
function Ft(l) {
|
|
2327
|
+
let e = l.lastIndexOf("/") + 1, t = e == 0 ? "" : l.substring(0, e), r = e == 0 ? l : l.substring(e);
|
|
2328
2328
|
return [t, r];
|
|
2329
2329
|
}
|
|
2330
|
-
function Ut(
|
|
2330
|
+
function Ut(l, e) {
|
|
2331
2331
|
try {
|
|
2332
2332
|
const t = "http://docx/";
|
|
2333
|
-
return new URL(
|
|
2333
|
+
return new URL(l, t + e).toString().substring(t.length);
|
|
2334
2334
|
} catch {
|
|
2335
|
-
return `${e}${
|
|
2335
|
+
return `${e}${l}`;
|
|
2336
2336
|
}
|
|
2337
2337
|
}
|
|
2338
|
-
function wt(
|
|
2339
|
-
return
|
|
2338
|
+
function wt(l, e) {
|
|
2339
|
+
return l.reduce((t, r) => (t[e(r)] = r, t), {});
|
|
2340
2340
|
}
|
|
2341
|
-
function Ae(
|
|
2341
|
+
function Ae(l) {
|
|
2342
2342
|
return new Promise((e, t) => {
|
|
2343
2343
|
const r = new FileReader();
|
|
2344
|
-
r.onloadend = () => e(r.result), r.onerror = () => t(), r.readAsDataURL(
|
|
2344
|
+
r.onloadend = () => e(r.result), r.onerror = () => t(), r.readAsDataURL(l);
|
|
2345
2345
|
});
|
|
2346
2346
|
}
|
|
2347
|
-
function $t(
|
|
2348
|
-
return
|
|
2347
|
+
function $t(l) {
|
|
2348
|
+
return l && typeof l == "object" && !Array.isArray(l);
|
|
2349
2349
|
}
|
|
2350
|
-
function Wt(
|
|
2351
|
-
return typeof
|
|
2350
|
+
function Wt(l) {
|
|
2351
|
+
return typeof l == "string" || l instanceof String;
|
|
2352
2352
|
}
|
|
2353
|
-
function Ot(
|
|
2353
|
+
function Ot(l, ...e) {
|
|
2354
2354
|
if (!e.length)
|
|
2355
|
-
return
|
|
2355
|
+
return l;
|
|
2356
2356
|
const t = e.shift();
|
|
2357
|
-
if ($t(
|
|
2357
|
+
if ($t(l) && $t(t))
|
|
2358
2358
|
for (const r in t)
|
|
2359
2359
|
if ($t(t[r])) {
|
|
2360
|
-
const a =
|
|
2360
|
+
const a = l[r] ?? (l[r] = {});
|
|
2361
2361
|
Ot(a, t[r]);
|
|
2362
2362
|
} else
|
|
2363
|
-
|
|
2364
|
-
return Ot(
|
|
2363
|
+
l[r] = t[r];
|
|
2364
|
+
return Ot(l, ...e);
|
|
2365
2365
|
}
|
|
2366
|
-
function Et(
|
|
2367
|
-
return Array.isArray(
|
|
2366
|
+
function Et(l) {
|
|
2367
|
+
return Array.isArray(l) ? l : [l];
|
|
2368
2368
|
}
|
|
2369
|
-
function Ee(
|
|
2370
|
-
return e >
|
|
2369
|
+
function Ee(l, e, t) {
|
|
2370
|
+
return e > l ? e : t < l ? t : l;
|
|
2371
2371
|
}
|
|
2372
2372
|
const se = {
|
|
2373
2373
|
wordml: "http://schemas.openxmlformats.org/wordprocessingml/2006/main"
|
|
@@ -2379,14 +2379,14 @@ const se = {
|
|
|
2379
2379
|
Point: { mul: 1, unit: "pt" },
|
|
2380
2380
|
Percent: { mul: 0.02, unit: "%" }
|
|
2381
2381
|
};
|
|
2382
|
-
function ie(
|
|
2383
|
-
if (
|
|
2384
|
-
return
|
|
2385
|
-
var t = parseInt(
|
|
2382
|
+
function ie(l, e = ft.Dxa) {
|
|
2383
|
+
if (l == null || /.+(p[xt]|[%])$/.test(l))
|
|
2384
|
+
return l;
|
|
2385
|
+
var t = parseInt(l) * e.mul;
|
|
2386
2386
|
return e.min && e.max && (t = Ee(t, e.min, e.max)), `${t.toFixed(2)}${e.unit}`;
|
|
2387
2387
|
}
|
|
2388
|
-
function Ne(
|
|
2389
|
-
switch (
|
|
2388
|
+
function Ne(l, e = !1) {
|
|
2389
|
+
switch (l) {
|
|
2390
2390
|
case "1":
|
|
2391
2391
|
return !0;
|
|
2392
2392
|
case "0":
|
|
@@ -2403,43 +2403,43 @@ function Ne(c, e = !1) {
|
|
|
2403
2403
|
return e;
|
|
2404
2404
|
}
|
|
2405
2405
|
}
|
|
2406
|
-
function oe(
|
|
2407
|
-
if (
|
|
2406
|
+
function oe(l, e, t) {
|
|
2407
|
+
if (l.namespaceURI != se.wordml)
|
|
2408
2408
|
return !1;
|
|
2409
|
-
switch (
|
|
2409
|
+
switch (l.localName) {
|
|
2410
2410
|
case "color":
|
|
2411
|
-
e.color = t.attr(
|
|
2411
|
+
e.color = t.attr(l, "val");
|
|
2412
2412
|
break;
|
|
2413
2413
|
case "sz":
|
|
2414
|
-
e.fontSize = t.lengthAttr(
|
|
2414
|
+
e.fontSize = t.lengthAttr(l, "val", ft.FontSize);
|
|
2415
2415
|
break;
|
|
2416
2416
|
default:
|
|
2417
2417
|
return !1;
|
|
2418
2418
|
}
|
|
2419
2419
|
return !0;
|
|
2420
2420
|
}
|
|
2421
|
-
function Me(
|
|
2422
|
-
e && (
|
|
2423
|
-
const t = new DOMParser().parseFromString(
|
|
2421
|
+
function Me(l, e = !1) {
|
|
2422
|
+
e && (l = l.replace(/<[?].*[?]>/, "")), l = ze(l);
|
|
2423
|
+
const t = new DOMParser().parseFromString(l, "application/xml"), r = Be(t);
|
|
2424
2424
|
if (r)
|
|
2425
2425
|
throw new Error(r);
|
|
2426
2426
|
return t;
|
|
2427
2427
|
}
|
|
2428
|
-
function Be(
|
|
2429
|
-
return
|
|
2428
|
+
function Be(l) {
|
|
2429
|
+
return l.getElementsByTagName("parsererror")[0]?.textContent;
|
|
2430
2430
|
}
|
|
2431
|
-
function ze(
|
|
2432
|
-
return
|
|
2431
|
+
function ze(l) {
|
|
2432
|
+
return l.charCodeAt(0) === 65279 ? l.substring(1) : l;
|
|
2433
2433
|
}
|
|
2434
|
-
function Re(
|
|
2435
|
-
return new XMLSerializer().serializeToString(
|
|
2434
|
+
function Re(l) {
|
|
2435
|
+
return new XMLSerializer().serializeToString(l);
|
|
2436
2436
|
}
|
|
2437
2437
|
class le {
|
|
2438
2438
|
elements(e, t = null) {
|
|
2439
2439
|
const r = [];
|
|
2440
2440
|
for (let a = 0, n = e.childNodes.length; a < n; a++) {
|
|
2441
|
-
let
|
|
2442
|
-
|
|
2441
|
+
let i = e.childNodes.item(a);
|
|
2442
|
+
i.nodeType == Node.ELEMENT_NODE && (t == null || i.localName == t) && r.push(i);
|
|
2443
2443
|
}
|
|
2444
2444
|
return r;
|
|
2445
2445
|
}
|
|
@@ -2507,15 +2507,15 @@ const Te = {
|
|
|
2507
2507
|
embedItalic: "italic",
|
|
2508
2508
|
embedBoldItalic: "boldItalic"
|
|
2509
2509
|
};
|
|
2510
|
-
function Fe(
|
|
2511
|
-
return e.elements(
|
|
2510
|
+
function Fe(l, e) {
|
|
2511
|
+
return e.elements(l).map((t) => Ie(t, e));
|
|
2512
2512
|
}
|
|
2513
|
-
function Ie(
|
|
2513
|
+
function Ie(l, e) {
|
|
2514
2514
|
let t = {
|
|
2515
|
-
name: e.attr(
|
|
2515
|
+
name: e.attr(l, "name"),
|
|
2516
2516
|
embedFontRefs: []
|
|
2517
2517
|
};
|
|
2518
|
-
for (let r of e.elements(
|
|
2518
|
+
for (let r of e.elements(l))
|
|
2519
2519
|
switch (r.localName) {
|
|
2520
2520
|
case "family":
|
|
2521
2521
|
t.family = e.attr(r, "val");
|
|
@@ -2532,11 +2532,11 @@ function Ie(c, e) {
|
|
|
2532
2532
|
}
|
|
2533
2533
|
return t;
|
|
2534
2534
|
}
|
|
2535
|
-
function Oe(
|
|
2535
|
+
function Oe(l, e) {
|
|
2536
2536
|
return {
|
|
2537
|
-
id: e.attr(
|
|
2538
|
-
key: e.attr(
|
|
2539
|
-
type: Te[
|
|
2537
|
+
id: e.attr(l, "id"),
|
|
2538
|
+
key: e.attr(l, "fontKey"),
|
|
2539
|
+
type: Te[l.localName]
|
|
2540
2540
|
};
|
|
2541
2541
|
}
|
|
2542
2542
|
class Le extends gt {
|
|
@@ -2544,8 +2544,8 @@ class Le extends gt {
|
|
|
2544
2544
|
this.fonts = Fe(e, this._package.xmlParser);
|
|
2545
2545
|
}
|
|
2546
2546
|
}
|
|
2547
|
-
function De(
|
|
2548
|
-
return e.elements(
|
|
2547
|
+
function De(l, e) {
|
|
2548
|
+
return e.elements(l).map((t) => ({
|
|
2549
2549
|
extension: e.attr(t, "Extension"),
|
|
2550
2550
|
partName: e.attr(t, "PartName"),
|
|
2551
2551
|
contentType: e.attr(t, "ContentType")
|
|
@@ -2589,8 +2589,8 @@ class Zt {
|
|
|
2589
2589
|
return Me(e, this.options.trimXmlDeclaration);
|
|
2590
2590
|
}
|
|
2591
2591
|
}
|
|
2592
|
-
function je(
|
|
2593
|
-
return
|
|
2592
|
+
function je(l) {
|
|
2593
|
+
return l.startsWith("/") ? l.substr(1) : l;
|
|
2594
2594
|
}
|
|
2595
2595
|
class Ue extends gt {
|
|
2596
2596
|
constructor(e, t, r) {
|
|
@@ -2600,19 +2600,19 @@ class Ue extends gt {
|
|
|
2600
2600
|
this.body = this._documentParser.parseDocumentFile(e);
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
2603
|
-
function Tt(
|
|
2603
|
+
function Tt(l, e) {
|
|
2604
2604
|
return {
|
|
2605
|
-
type: e.attr(
|
|
2606
|
-
color: e.attr(
|
|
2607
|
-
size: e.lengthAttr(
|
|
2608
|
-
offset: e.lengthAttr(
|
|
2609
|
-
frame: e.boolAttr(
|
|
2610
|
-
shadow: e.boolAttr(
|
|
2605
|
+
type: e.attr(l, "val"),
|
|
2606
|
+
color: e.attr(l, "color"),
|
|
2607
|
+
size: e.lengthAttr(l, "sz", ft.Border),
|
|
2608
|
+
offset: e.lengthAttr(l, "space", ft.Point),
|
|
2609
|
+
frame: e.boolAttr(l, "frame"),
|
|
2610
|
+
shadow: e.boolAttr(l, "shadow")
|
|
2611
2611
|
};
|
|
2612
2612
|
}
|
|
2613
|
-
function $e(
|
|
2613
|
+
function $e(l, e) {
|
|
2614
2614
|
var t = {};
|
|
2615
|
-
for (let r of e.elements(
|
|
2615
|
+
for (let r of e.elements(l))
|
|
2616
2616
|
switch (r.localName) {
|
|
2617
2617
|
case "left":
|
|
2618
2618
|
t.left = Tt(r, e);
|
|
@@ -2629,13 +2629,13 @@ function $e(c, e) {
|
|
|
2629
2629
|
}
|
|
2630
2630
|
return t;
|
|
2631
2631
|
}
|
|
2632
|
-
var
|
|
2633
|
-
(function(
|
|
2634
|
-
|
|
2635
|
-
})(
|
|
2636
|
-
function ce(
|
|
2632
|
+
var Yt;
|
|
2633
|
+
(function(l) {
|
|
2634
|
+
l.Continuous = "continuous", l.NextPage = "nextPage", l.NextColumn = "nextColumn", l.EvenPage = "evenPage", l.OddPage = "oddPage";
|
|
2635
|
+
})(Yt || (Yt = {}));
|
|
2636
|
+
function ce(l, e = C) {
|
|
2637
2637
|
var t = {};
|
|
2638
|
-
for (let r of e.elements(
|
|
2638
|
+
for (let r of e.elements(l))
|
|
2639
2639
|
switch (r.localName) {
|
|
2640
2640
|
case "pgSz":
|
|
2641
2641
|
t.pageSize = {
|
|
@@ -2679,107 +2679,107 @@ function ce(c, e = C) {
|
|
|
2679
2679
|
}
|
|
2680
2680
|
return t;
|
|
2681
2681
|
}
|
|
2682
|
-
function He(
|
|
2682
|
+
function He(l, e) {
|
|
2683
2683
|
return {
|
|
2684
|
-
numberOfColumns: e.intAttr(
|
|
2685
|
-
space: e.lengthAttr(
|
|
2686
|
-
separator: e.boolAttr(
|
|
2687
|
-
equalWidth: e.boolAttr(
|
|
2688
|
-
columns: e.elements(
|
|
2684
|
+
numberOfColumns: e.intAttr(l, "num"),
|
|
2685
|
+
space: e.lengthAttr(l, "space"),
|
|
2686
|
+
separator: e.boolAttr(l, "sep"),
|
|
2687
|
+
equalWidth: e.boolAttr(l, "equalWidth", !0),
|
|
2688
|
+
columns: e.elements(l, "col").map((t) => ({
|
|
2689
2689
|
width: e.lengthAttr(t, "w"),
|
|
2690
2690
|
space: e.lengthAttr(t, "space")
|
|
2691
2691
|
}))
|
|
2692
2692
|
};
|
|
2693
2693
|
}
|
|
2694
|
-
function We(
|
|
2694
|
+
function We(l, e) {
|
|
2695
2695
|
return {
|
|
2696
|
-
chapSep: e.attr(
|
|
2697
|
-
chapStyle: e.attr(
|
|
2698
|
-
format: e.attr(
|
|
2699
|
-
start: e.intAttr(
|
|
2696
|
+
chapSep: e.attr(l, "chapSep"),
|
|
2697
|
+
chapStyle: e.attr(l, "chapStyle"),
|
|
2698
|
+
format: e.attr(l, "fmt"),
|
|
2699
|
+
start: e.intAttr(l, "start")
|
|
2700
2700
|
};
|
|
2701
2701
|
}
|
|
2702
|
-
function Jt(
|
|
2702
|
+
function Jt(l, e) {
|
|
2703
2703
|
return {
|
|
2704
|
-
id: e.attr(
|
|
2705
|
-
type: e.attr(
|
|
2704
|
+
id: e.attr(l, "id"),
|
|
2705
|
+
type: e.attr(l, "type")
|
|
2706
2706
|
};
|
|
2707
2707
|
}
|
|
2708
|
-
function Ze(
|
|
2708
|
+
function Ze(l, e) {
|
|
2709
2709
|
return {
|
|
2710
|
-
before: e.lengthAttr(
|
|
2711
|
-
after: e.lengthAttr(
|
|
2712
|
-
line: e.intAttr(
|
|
2713
|
-
lineRule: e.attr(
|
|
2710
|
+
before: e.lengthAttr(l, "before"),
|
|
2711
|
+
after: e.lengthAttr(l, "after"),
|
|
2712
|
+
line: e.intAttr(l, "line"),
|
|
2713
|
+
lineRule: e.attr(l, "lineRule")
|
|
2714
2714
|
};
|
|
2715
2715
|
}
|
|
2716
|
-
function Vt(
|
|
2716
|
+
function Vt(l, e) {
|
|
2717
2717
|
let t = {};
|
|
2718
|
-
for (let r of e.elements(
|
|
2718
|
+
for (let r of e.elements(l))
|
|
2719
2719
|
Ve(r, t, e);
|
|
2720
2720
|
return t;
|
|
2721
2721
|
}
|
|
2722
|
-
function Ve(
|
|
2723
|
-
return !!oe(
|
|
2722
|
+
function Ve(l, e, t) {
|
|
2723
|
+
return !!oe(l, e, t);
|
|
2724
2724
|
}
|
|
2725
|
-
function he(
|
|
2725
|
+
function he(l, e) {
|
|
2726
2726
|
let t = {};
|
|
2727
|
-
for (let r of e.elements(
|
|
2727
|
+
for (let r of e.elements(l))
|
|
2728
2728
|
ue(r, t, e);
|
|
2729
2729
|
return t;
|
|
2730
2730
|
}
|
|
2731
|
-
function ue(
|
|
2732
|
-
if (
|
|
2731
|
+
function ue(l, e, t) {
|
|
2732
|
+
if (l.namespaceURI != se.wordml)
|
|
2733
2733
|
return !1;
|
|
2734
|
-
if (oe(
|
|
2734
|
+
if (oe(l, e, t))
|
|
2735
2735
|
return !0;
|
|
2736
|
-
switch (
|
|
2736
|
+
switch (l.localName) {
|
|
2737
2737
|
case "tabs":
|
|
2738
|
-
e.tabs = Ge(
|
|
2738
|
+
e.tabs = Ge(l, t);
|
|
2739
2739
|
break;
|
|
2740
2740
|
case "sectPr":
|
|
2741
|
-
e.sectionProps = ce(
|
|
2741
|
+
e.sectionProps = ce(l, t);
|
|
2742
2742
|
break;
|
|
2743
2743
|
case "numPr":
|
|
2744
|
-
e.numbering = Xe(
|
|
2744
|
+
e.numbering = Xe(l, t);
|
|
2745
2745
|
break;
|
|
2746
2746
|
case "spacing":
|
|
2747
|
-
return e.lineSpacing = Ze(
|
|
2747
|
+
return e.lineSpacing = Ze(l, t), !1;
|
|
2748
2748
|
case "textAlignment":
|
|
2749
|
-
return e.textAlignment = t.attr(
|
|
2749
|
+
return e.textAlignment = t.attr(l, "val"), !1;
|
|
2750
2750
|
case "keepLines":
|
|
2751
|
-
e.keepLines = t.boolAttr(
|
|
2751
|
+
e.keepLines = t.boolAttr(l, "val", !0);
|
|
2752
2752
|
break;
|
|
2753
2753
|
case "keepNext":
|
|
2754
|
-
e.keepNext = t.boolAttr(
|
|
2754
|
+
e.keepNext = t.boolAttr(l, "val", !0);
|
|
2755
2755
|
break;
|
|
2756
2756
|
case "pageBreakBefore":
|
|
2757
|
-
e.pageBreakBefore = t.boolAttr(
|
|
2757
|
+
e.pageBreakBefore = t.boolAttr(l, "val", !0);
|
|
2758
2758
|
break;
|
|
2759
2759
|
case "outlineLvl":
|
|
2760
|
-
e.outlineLevel = t.intAttr(
|
|
2760
|
+
e.outlineLevel = t.intAttr(l, "val");
|
|
2761
2761
|
break;
|
|
2762
2762
|
case "pStyle":
|
|
2763
|
-
e.styleName = t.attr(
|
|
2763
|
+
e.styleName = t.attr(l, "val");
|
|
2764
2764
|
break;
|
|
2765
2765
|
case "rPr":
|
|
2766
|
-
e.runProps = Vt(
|
|
2766
|
+
e.runProps = Vt(l, t);
|
|
2767
2767
|
break;
|
|
2768
2768
|
default:
|
|
2769
2769
|
return !1;
|
|
2770
2770
|
}
|
|
2771
2771
|
return !0;
|
|
2772
2772
|
}
|
|
2773
|
-
function Ge(
|
|
2774
|
-
return e.elements(
|
|
2773
|
+
function Ge(l, e) {
|
|
2774
|
+
return e.elements(l, "tab").map((t) => ({
|
|
2775
2775
|
position: e.lengthAttr(t, "pos"),
|
|
2776
2776
|
leader: e.attr(t, "leader"),
|
|
2777
2777
|
style: e.attr(t, "val")
|
|
2778
2778
|
}));
|
|
2779
2779
|
}
|
|
2780
|
-
function Xe(
|
|
2780
|
+
function Xe(l, e) {
|
|
2781
2781
|
var t = {};
|
|
2782
|
-
for (let r of e.elements(
|
|
2782
|
+
for (let r of e.elements(l))
|
|
2783
2783
|
switch (r.localName) {
|
|
2784
2784
|
case "numId":
|
|
2785
2785
|
t.id = e.attr(r, "val");
|
|
@@ -2790,19 +2790,19 @@ function Xe(c, e) {
|
|
|
2790
2790
|
}
|
|
2791
2791
|
return t;
|
|
2792
2792
|
}
|
|
2793
|
-
function
|
|
2793
|
+
function qe(l, e) {
|
|
2794
2794
|
let t = {
|
|
2795
2795
|
numberings: [],
|
|
2796
2796
|
abstractNumberings: [],
|
|
2797
2797
|
bulletPictures: []
|
|
2798
2798
|
};
|
|
2799
|
-
for (let r of e.elements(
|
|
2799
|
+
for (let r of e.elements(l))
|
|
2800
2800
|
switch (r.localName) {
|
|
2801
2801
|
case "num":
|
|
2802
|
-
t.numberings.push(
|
|
2802
|
+
t.numberings.push(Ke(r, e));
|
|
2803
2803
|
break;
|
|
2804
2804
|
case "abstractNum":
|
|
2805
|
-
t.abstractNumberings.push(
|
|
2805
|
+
t.abstractNumberings.push(Ye(r, e));
|
|
2806
2806
|
break;
|
|
2807
2807
|
case "numPicBullet":
|
|
2808
2808
|
t.bulletPictures.push(Qe(r, e));
|
|
@@ -2810,12 +2810,12 @@ function Ke(c, e) {
|
|
|
2810
2810
|
}
|
|
2811
2811
|
return t;
|
|
2812
2812
|
}
|
|
2813
|
-
function
|
|
2813
|
+
function Ke(l, e) {
|
|
2814
2814
|
let t = {
|
|
2815
|
-
id: e.attr(
|
|
2815
|
+
id: e.attr(l, "numId"),
|
|
2816
2816
|
overrides: []
|
|
2817
2817
|
};
|
|
2818
|
-
for (let r of e.elements(
|
|
2818
|
+
for (let r of e.elements(l))
|
|
2819
2819
|
switch (r.localName) {
|
|
2820
2820
|
case "abstractNumId":
|
|
2821
2821
|
t.abstractId = e.attr(r, "val");
|
|
@@ -2826,12 +2826,12 @@ function Ye(c, e) {
|
|
|
2826
2826
|
}
|
|
2827
2827
|
return t;
|
|
2828
2828
|
}
|
|
2829
|
-
function
|
|
2829
|
+
function Ye(l, e) {
|
|
2830
2830
|
let t = {
|
|
2831
|
-
id: e.attr(
|
|
2831
|
+
id: e.attr(l, "abstractNumId"),
|
|
2832
2832
|
levels: []
|
|
2833
2833
|
};
|
|
2834
|
-
for (let r of e.elements(
|
|
2834
|
+
for (let r of e.elements(l))
|
|
2835
2835
|
switch (r.localName) {
|
|
2836
2836
|
case "name":
|
|
2837
2837
|
t.name = e.attr(r, "val");
|
|
@@ -2851,11 +2851,11 @@ function qe(c, e) {
|
|
|
2851
2851
|
}
|
|
2852
2852
|
return t;
|
|
2853
2853
|
}
|
|
2854
|
-
function de(
|
|
2854
|
+
function de(l, e) {
|
|
2855
2855
|
let t = {
|
|
2856
|
-
level: e.intAttr(
|
|
2856
|
+
level: e.intAttr(l, "ilvl")
|
|
2857
2857
|
};
|
|
2858
|
-
for (let r of e.elements(
|
|
2858
|
+
for (let r of e.elements(l))
|
|
2859
2859
|
switch (r.localName) {
|
|
2860
2860
|
case "start":
|
|
2861
2861
|
t.start = e.attr(r, "val");
|
|
@@ -2887,11 +2887,11 @@ function de(c, e) {
|
|
|
2887
2887
|
}
|
|
2888
2888
|
return t;
|
|
2889
2889
|
}
|
|
2890
|
-
function Je(
|
|
2890
|
+
function Je(l, e) {
|
|
2891
2891
|
let t = {
|
|
2892
|
-
level: e.intAttr(
|
|
2892
|
+
level: e.intAttr(l, "ilvl")
|
|
2893
2893
|
};
|
|
2894
|
-
for (let r of e.elements(
|
|
2894
|
+
for (let r of e.elements(l))
|
|
2895
2895
|
switch (r.localName) {
|
|
2896
2896
|
case "startOverride":
|
|
2897
2897
|
t.start = e.intAttr(r, "val");
|
|
@@ -2902,10 +2902,10 @@ function Je(c, e) {
|
|
|
2902
2902
|
}
|
|
2903
2903
|
return t;
|
|
2904
2904
|
}
|
|
2905
|
-
function Qe(
|
|
2906
|
-
var t = e.element(
|
|
2905
|
+
function Qe(l, e) {
|
|
2906
|
+
var t = e.element(l, "pict"), r = t && e.element(t, "shape"), a = r && e.element(r, "imagedata");
|
|
2907
2907
|
return a ? {
|
|
2908
|
-
id: e.attr(
|
|
2908
|
+
id: e.attr(l, "numPicBulletId"),
|
|
2909
2909
|
referenceId: e.attr(a, "id"),
|
|
2910
2910
|
style: e.attr(r, "style")
|
|
2911
2911
|
} : null;
|
|
@@ -2915,7 +2915,7 @@ class tr extends gt {
|
|
|
2915
2915
|
super(e, t), this._documentParser = r;
|
|
2916
2916
|
}
|
|
2917
2917
|
parseXml(e) {
|
|
2918
|
-
Object.assign(this,
|
|
2918
|
+
Object.assign(this, qe(e, this._package.xmlParser)), this.domNumberings = this._documentParser.parseNumberingFile(e);
|
|
2919
2919
|
}
|
|
2920
2920
|
}
|
|
2921
2921
|
class er extends gt {
|
|
@@ -2927,8 +2927,8 @@ class er extends gt {
|
|
|
2927
2927
|
}
|
|
2928
2928
|
}
|
|
2929
2929
|
var B;
|
|
2930
|
-
(function(
|
|
2931
|
-
|
|
2930
|
+
(function(l) {
|
|
2931
|
+
l.Document = "document", l.Paragraph = "paragraph", l.Run = "run", l.Break = "break", l.NoBreakHyphen = "noBreakHyphen", l.Table = "table", l.Row = "row", l.Cell = "cell", l.Hyperlink = "hyperlink", l.SmartTag = "smartTag", l.Drawing = "drawing", l.Image = "image", l.Text = "text", l.Tab = "tab", l.Symbol = "symbol", l.BookmarkStart = "bookmarkStart", l.BookmarkEnd = "bookmarkEnd", l.Footer = "footer", l.Header = "header", l.FootnoteReference = "footnoteReference", l.EndnoteReference = "endnoteReference", l.Footnote = "footnote", l.Endnote = "endnote", l.SimpleField = "simpleField", l.ComplexField = "complexField", l.Instruction = "instruction", l.VmlPicture = "vmlPicture", l.MmlMath = "mmlMath", l.MmlMathParagraph = "mmlMathParagraph", l.MmlFraction = "mmlFraction", l.MmlFunction = "mmlFunction", l.MmlFunctionName = "mmlFunctionName", l.MmlNumerator = "mmlNumerator", l.MmlDenominator = "mmlDenominator", l.MmlRadical = "mmlRadical", l.MmlBase = "mmlBase", l.MmlDegree = "mmlDegree", l.MmlSuperscript = "mmlSuperscript", l.MmlSubscript = "mmlSubscript", l.MmlPreSubSuper = "mmlPreSubSuper", l.MmlSubArgument = "mmlSubArgument", l.MmlSuperArgument = "mmlSuperArgument", l.MmlNary = "mmlNary", l.MmlDelimiter = "mmlDelimiter", l.MmlRun = "mmlRun", l.MmlEquationArray = "mmlEquationArray", l.MmlLimit = "mmlLimit", l.MmlLimitLower = "mmlLimitLower", l.MmlMatrix = "mmlMatrix", l.MmlMatrixRow = "mmlMatrixRow", l.MmlBox = "mmlBox", l.MmlBar = "mmlBar", l.MmlGroupChar = "mmlGroupChar", l.VmlElement = "vmlElement", l.Inserted = "inserted", l.Deleted = "deleted", l.DeletedText = "deletedText", l.Comment = "comment", l.CommentReference = "commentReference", l.CommentRangeStart = "commentRangeStart", l.CommentRangeEnd = "commentRangeEnd", l.AltChunk = "altChunk";
|
|
2932
2932
|
})(B || (B = {}));
|
|
2933
2933
|
class St {
|
|
2934
2934
|
constructor() {
|
|
@@ -2963,9 +2963,9 @@ class sr extends fe {
|
|
|
2963
2963
|
return new ar();
|
|
2964
2964
|
}
|
|
2965
2965
|
}
|
|
2966
|
-
function ir(
|
|
2966
|
+
function ir(l, e) {
|
|
2967
2967
|
const t = {};
|
|
2968
|
-
for (let r of e.elements(
|
|
2968
|
+
for (let r of e.elements(l))
|
|
2969
2969
|
switch (r.localName) {
|
|
2970
2970
|
case "Template":
|
|
2971
2971
|
t.template = r.textContent;
|
|
@@ -2997,18 +2997,18 @@ function ir(c, e) {
|
|
|
2997
2997
|
}
|
|
2998
2998
|
return t;
|
|
2999
2999
|
}
|
|
3000
|
-
function Nt(
|
|
3001
|
-
if (!(typeof
|
|
3002
|
-
return parseInt(
|
|
3000
|
+
function Nt(l) {
|
|
3001
|
+
if (!(typeof l > "u"))
|
|
3002
|
+
return parseInt(l);
|
|
3003
3003
|
}
|
|
3004
3004
|
class or extends gt {
|
|
3005
3005
|
parseXml(e) {
|
|
3006
3006
|
this.props = ir(e, this._package.xmlParser);
|
|
3007
3007
|
}
|
|
3008
3008
|
}
|
|
3009
|
-
function lr(
|
|
3009
|
+
function lr(l, e) {
|
|
3010
3010
|
const t = {};
|
|
3011
|
-
for (let r of e.elements(
|
|
3011
|
+
for (let r of e.elements(l))
|
|
3012
3012
|
switch (r.localName) {
|
|
3013
3013
|
case "title":
|
|
3014
3014
|
t.title = r.textContent;
|
|
@@ -3044,8 +3044,8 @@ class cr extends gt {
|
|
|
3044
3044
|
}
|
|
3045
3045
|
class hr {
|
|
3046
3046
|
}
|
|
3047
|
-
function ur(
|
|
3048
|
-
var t = new hr(), r = e.element(
|
|
3047
|
+
function ur(l, e) {
|
|
3048
|
+
var t = new hr(), r = e.element(l, "themeElements");
|
|
3049
3049
|
for (let a of e.elements(r))
|
|
3050
3050
|
switch (a.localName) {
|
|
3051
3051
|
case "clrScheme":
|
|
@@ -3057,22 +3057,22 @@ function ur(c, e) {
|
|
|
3057
3057
|
}
|
|
3058
3058
|
return t;
|
|
3059
3059
|
}
|
|
3060
|
-
function dr(
|
|
3060
|
+
function dr(l, e) {
|
|
3061
3061
|
var t = {
|
|
3062
|
-
name: e.attr(
|
|
3062
|
+
name: e.attr(l, "name"),
|
|
3063
3063
|
colors: {}
|
|
3064
3064
|
};
|
|
3065
|
-
for (let n of e.elements(
|
|
3065
|
+
for (let n of e.elements(l)) {
|
|
3066
3066
|
var r = e.element(n, "srgbClr"), a = e.element(n, "sysClr");
|
|
3067
3067
|
r ? t.colors[n.localName] = e.attr(r, "val") : a && (t.colors[n.localName] = e.attr(a, "lastClr"));
|
|
3068
3068
|
}
|
|
3069
3069
|
return t;
|
|
3070
3070
|
}
|
|
3071
|
-
function fr(
|
|
3071
|
+
function fr(l, e) {
|
|
3072
3072
|
var t = {
|
|
3073
|
-
name: e.attr(
|
|
3073
|
+
name: e.attr(l, "name")
|
|
3074
3074
|
};
|
|
3075
|
-
for (let r of e.elements(
|
|
3075
|
+
for (let r of e.elements(l))
|
|
3076
3076
|
switch (r.localName) {
|
|
3077
3077
|
case "majorFont":
|
|
3078
3078
|
t.majorFont = Qt(r, e);
|
|
@@ -3083,11 +3083,11 @@ function fr(c, e) {
|
|
|
3083
3083
|
}
|
|
3084
3084
|
return t;
|
|
3085
3085
|
}
|
|
3086
|
-
function Qt(
|
|
3086
|
+
function Qt(l, e) {
|
|
3087
3087
|
return {
|
|
3088
|
-
latinTypeface: e.elementAttr(
|
|
3089
|
-
eaTypeface: e.elementAttr(
|
|
3090
|
-
csTypeface: e.elementAttr(
|
|
3088
|
+
latinTypeface: e.elementAttr(l, "latin", "typeface"),
|
|
3089
|
+
eaTypeface: e.elementAttr(l, "ea", "typeface"),
|
|
3090
|
+
csTypeface: e.elementAttr(l, "cs", "typeface")
|
|
3091
3091
|
};
|
|
3092
3092
|
}
|
|
3093
3093
|
class pr extends gt {
|
|
@@ -3131,9 +3131,9 @@ class vr extends me {
|
|
|
3131
3131
|
this.notes = this._documentParser.parseNotes(e, "endnote", gr);
|
|
3132
3132
|
}
|
|
3133
3133
|
}
|
|
3134
|
-
function kr(
|
|
3134
|
+
function kr(l, e) {
|
|
3135
3135
|
var t = {};
|
|
3136
|
-
for (let r of e.elements(
|
|
3136
|
+
for (let r of e.elements(l))
|
|
3137
3137
|
switch (r.localName) {
|
|
3138
3138
|
case "defaultTabStop":
|
|
3139
3139
|
t.defaultTabStop = e.lengthAttr(r, "val");
|
|
@@ -3150,11 +3150,11 @@ function kr(c, e) {
|
|
|
3150
3150
|
}
|
|
3151
3151
|
return t;
|
|
3152
3152
|
}
|
|
3153
|
-
function te(
|
|
3153
|
+
function te(l, e) {
|
|
3154
3154
|
var t = {
|
|
3155
3155
|
defaultNoteIds: []
|
|
3156
3156
|
};
|
|
3157
|
-
for (let r of e.elements(
|
|
3157
|
+
for (let r of e.elements(l))
|
|
3158
3158
|
switch (r.localName) {
|
|
3159
3159
|
case "numFmt":
|
|
3160
3160
|
t.nummeringFormat = e.attr(r, "val");
|
|
@@ -3174,8 +3174,8 @@ class yr extends gt {
|
|
|
3174
3174
|
this.settings = kr(e, this._package.xmlParser);
|
|
3175
3175
|
}
|
|
3176
3176
|
}
|
|
3177
|
-
function _r(
|
|
3178
|
-
return e.elements(
|
|
3177
|
+
function _r(l, e) {
|
|
3178
|
+
return e.elements(l, "property").map((t) => {
|
|
3179
3179
|
const r = t.firstChild;
|
|
3180
3180
|
return {
|
|
3181
3181
|
formatId: e.attr(t, "fmtid"),
|
|
@@ -3226,8 +3226,8 @@ class Gt {
|
|
|
3226
3226
|
static async load(e, t, r) {
|
|
3227
3227
|
var a = new Gt();
|
|
3228
3228
|
return a._options = r, a._parser = t, a._package = await Zt.load(e, r), a.rels = await a._package.loadRelationships(), a.contentTypes = await a._package.loadContentTypes(), await Promise.all(xr.map((n) => {
|
|
3229
|
-
const
|
|
3230
|
-
return a.loadRelationshipPart(
|
|
3229
|
+
const i = a.rels.find((o) => o.type === n.type) ?? n;
|
|
3230
|
+
return a.loadRelationshipPart(i.target, i.type);
|
|
3231
3231
|
})), a;
|
|
3232
3232
|
}
|
|
3233
3233
|
save(e = "blob") {
|
|
@@ -3332,27 +3332,27 @@ class Gt {
|
|
|
3332
3332
|
return r ? Ut(r.target, a) : null;
|
|
3333
3333
|
}
|
|
3334
3334
|
}
|
|
3335
|
-
function Pr(
|
|
3335
|
+
function Pr(l, e) {
|
|
3336
3336
|
const r = e.replace(/{|}|-/g, ""), a = new Array(16);
|
|
3337
3337
|
for (let n = 0; n < 16; n++)
|
|
3338
3338
|
a[16 - n - 1] = parseInt(r.substring(n * 2, n * 2 + 2), 16);
|
|
3339
3339
|
for (let n = 0; n < 32; n++)
|
|
3340
|
-
|
|
3341
|
-
return
|
|
3340
|
+
l[n] = l[n] ^ a[n % 16];
|
|
3341
|
+
return l;
|
|
3342
3342
|
}
|
|
3343
|
-
function Ar(
|
|
3343
|
+
function Ar(l, e) {
|
|
3344
3344
|
return {
|
|
3345
3345
|
type: B.BookmarkStart,
|
|
3346
|
-
id: e.attr(
|
|
3347
|
-
name: e.attr(
|
|
3348
|
-
colFirst: e.intAttr(
|
|
3349
|
-
colLast: e.intAttr(
|
|
3346
|
+
id: e.attr(l, "id"),
|
|
3347
|
+
name: e.attr(l, "name"),
|
|
3348
|
+
colFirst: e.intAttr(l, "colFirst"),
|
|
3349
|
+
colLast: e.intAttr(l, "colLast")
|
|
3350
3350
|
};
|
|
3351
3351
|
}
|
|
3352
|
-
function Er(
|
|
3352
|
+
function Er(l, e) {
|
|
3353
3353
|
return {
|
|
3354
3354
|
type: B.BookmarkEnd,
|
|
3355
|
-
id: e.attr(
|
|
3355
|
+
id: e.attr(l, "id")
|
|
3356
3356
|
};
|
|
3357
3357
|
}
|
|
3358
3358
|
class Nr extends St {
|
|
@@ -3360,9 +3360,9 @@ class Nr extends St {
|
|
|
3360
3360
|
super(...arguments), this.type = B.VmlElement, this.attrs = {};
|
|
3361
3361
|
}
|
|
3362
3362
|
}
|
|
3363
|
-
function ge(
|
|
3363
|
+
function ge(l, e) {
|
|
3364
3364
|
var t = new Nr();
|
|
3365
|
-
switch (
|
|
3365
|
+
switch (l.localName) {
|
|
3366
3366
|
case "rect":
|
|
3367
3367
|
t.tagName = "rect", Object.assign(t.attrs, { width: "100%", height: "100%" });
|
|
3368
3368
|
break;
|
|
@@ -3381,7 +3381,7 @@ function ge(c, e) {
|
|
|
3381
3381
|
default:
|
|
3382
3382
|
return null;
|
|
3383
3383
|
}
|
|
3384
|
-
for (const r of C.attrs(
|
|
3384
|
+
for (const r of C.attrs(l))
|
|
3385
3385
|
switch (r.localName) {
|
|
3386
3386
|
case "style":
|
|
3387
3387
|
t.cssStyleText = r.value;
|
|
@@ -3394,11 +3394,11 @@ function ge(c, e) {
|
|
|
3394
3394
|
Object.assign(t.attrs, { x1: a, y1: n });
|
|
3395
3395
|
break;
|
|
3396
3396
|
case "to":
|
|
3397
|
-
const [
|
|
3398
|
-
Object.assign(t.attrs, { x2:
|
|
3397
|
+
const [i, o] = ee(r.value);
|
|
3398
|
+
Object.assign(t.attrs, { x2: i, y2: o });
|
|
3399
3399
|
break;
|
|
3400
3400
|
}
|
|
3401
|
-
for (const r of C.elements(
|
|
3401
|
+
for (const r of C.elements(l))
|
|
3402
3402
|
switch (r.localName) {
|
|
3403
3403
|
case "stroke":
|
|
3404
3404
|
Object.assign(t.attrs, Mr(r));
|
|
@@ -3422,17 +3422,17 @@ function ge(c, e) {
|
|
|
3422
3422
|
}
|
|
3423
3423
|
return t;
|
|
3424
3424
|
}
|
|
3425
|
-
function Mr(
|
|
3425
|
+
function Mr(l) {
|
|
3426
3426
|
return {
|
|
3427
|
-
stroke: C.attr(
|
|
3428
|
-
"stroke-width": C.lengthAttr(
|
|
3427
|
+
stroke: C.attr(l, "color"),
|
|
3428
|
+
"stroke-width": C.lengthAttr(l, "weight", ft.Emu) ?? "1px"
|
|
3429
3429
|
};
|
|
3430
3430
|
}
|
|
3431
|
-
function Br(
|
|
3431
|
+
function Br(l) {
|
|
3432
3432
|
return {};
|
|
3433
3433
|
}
|
|
3434
|
-
function ee(
|
|
3435
|
-
return
|
|
3434
|
+
function ee(l) {
|
|
3435
|
+
return l.split(",");
|
|
3436
3436
|
}
|
|
3437
3437
|
class zr extends St {
|
|
3438
3438
|
constructor() {
|
|
@@ -3498,8 +3498,8 @@ class Or {
|
|
|
3498
3498
|
parseNotes(e, t, r) {
|
|
3499
3499
|
var a = [];
|
|
3500
3500
|
for (let n of C.elements(e, t)) {
|
|
3501
|
-
const
|
|
3502
|
-
|
|
3501
|
+
const i = new r();
|
|
3502
|
+
i.id = C.attr(n, "id"), i.noteType = C.attr(n, "type"), i.children = this.parseBodyElements(n), a.push(i);
|
|
3503
3503
|
}
|
|
3504
3504
|
return a;
|
|
3505
3505
|
}
|
|
@@ -3687,20 +3687,20 @@ class Or {
|
|
|
3687
3687
|
default:
|
|
3688
3688
|
return [];
|
|
3689
3689
|
}
|
|
3690
|
-
for (const
|
|
3691
|
-
switch (
|
|
3690
|
+
for (const i of C.elements(e))
|
|
3691
|
+
switch (i.localName) {
|
|
3692
3692
|
case "pPr":
|
|
3693
3693
|
t.push({
|
|
3694
3694
|
target: `${a} p`,
|
|
3695
3695
|
mod: n,
|
|
3696
|
-
values: this.parseDefaultProperties(
|
|
3696
|
+
values: this.parseDefaultProperties(i, {})
|
|
3697
3697
|
});
|
|
3698
3698
|
break;
|
|
3699
3699
|
case "rPr":
|
|
3700
3700
|
t.push({
|
|
3701
3701
|
target: `${a} span`,
|
|
3702
3702
|
mod: n,
|
|
3703
|
-
values: this.parseDefaultProperties(
|
|
3703
|
+
values: this.parseDefaultProperties(i, {})
|
|
3704
3704
|
});
|
|
3705
3705
|
break;
|
|
3706
3706
|
case "tblPr":
|
|
@@ -3708,7 +3708,7 @@ class Or {
|
|
|
3708
3708
|
t.push({
|
|
3709
3709
|
target: a,
|
|
3710
3710
|
mod: n,
|
|
3711
|
-
values: this.parseDefaultProperties(
|
|
3711
|
+
values: this.parseDefaultProperties(i, {})
|
|
3712
3712
|
});
|
|
3713
3713
|
break;
|
|
3714
3714
|
}
|
|
@@ -3731,7 +3731,7 @@ class Or {
|
|
|
3731
3731
|
});
|
|
3732
3732
|
break;
|
|
3733
3733
|
}
|
|
3734
|
-
return r.flatMap((n) => t.filter((
|
|
3734
|
+
return r.flatMap((n) => t.filter((i) => n.abstractNumId == i.id).map((i) => ({ ...i, id: n.numId })));
|
|
3735
3735
|
}
|
|
3736
3736
|
parseNumberingPicBullet(e) {
|
|
3737
3737
|
var t = C.element(e, "pict"), r = t && C.element(t, "shape"), a = r && C.element(r, "imagedata");
|
|
@@ -3757,32 +3757,32 @@ class Or {
|
|
|
3757
3757
|
rStyle: {},
|
|
3758
3758
|
suff: "tab"
|
|
3759
3759
|
};
|
|
3760
|
-
for (const
|
|
3761
|
-
switch (
|
|
3760
|
+
for (const i of C.elements(t))
|
|
3761
|
+
switch (i.localName) {
|
|
3762
3762
|
case "start":
|
|
3763
|
-
a.start = C.intAttr(
|
|
3763
|
+
a.start = C.intAttr(i, "val");
|
|
3764
3764
|
break;
|
|
3765
3765
|
case "pPr":
|
|
3766
|
-
this.parseDefaultProperties(
|
|
3766
|
+
this.parseDefaultProperties(i, a.pStyle);
|
|
3767
3767
|
break;
|
|
3768
3768
|
case "rPr":
|
|
3769
|
-
this.parseDefaultProperties(
|
|
3769
|
+
this.parseDefaultProperties(i, a.rStyle);
|
|
3770
3770
|
break;
|
|
3771
3771
|
case "lvlPicBulletId":
|
|
3772
|
-
var n = C.intAttr(
|
|
3773
|
-
a.bullet = r.find((
|
|
3772
|
+
var n = C.intAttr(i, "val");
|
|
3773
|
+
a.bullet = r.find((o) => o?.id == n);
|
|
3774
3774
|
break;
|
|
3775
3775
|
case "lvlText":
|
|
3776
|
-
a.levelText = C.attr(
|
|
3776
|
+
a.levelText = C.attr(i, "val");
|
|
3777
3777
|
break;
|
|
3778
3778
|
case "pStyle":
|
|
3779
|
-
a.pStyleName = C.attr(
|
|
3779
|
+
a.pStyleName = C.attr(i, "val");
|
|
3780
3780
|
break;
|
|
3781
3781
|
case "numFmt":
|
|
3782
|
-
a.format = C.attr(
|
|
3782
|
+
a.format = C.attr(i, "val");
|
|
3783
3783
|
break;
|
|
3784
3784
|
case "suff":
|
|
3785
|
-
a.suff = C.attr(
|
|
3785
|
+
a.suff = C.attr(i, "val");
|
|
3786
3786
|
break;
|
|
3787
3787
|
}
|
|
3788
3788
|
return a;
|
|
@@ -3883,13 +3883,13 @@ class Or {
|
|
|
3883
3883
|
parseSmartTag(e, t) {
|
|
3884
3884
|
var r = { type: B.SmartTag, parent: t, children: [] }, a = C.attr(e, "uri"), n = C.attr(e, "element");
|
|
3885
3885
|
a && (r.uri = a), n && (r.element = n);
|
|
3886
|
-
for (const
|
|
3887
|
-
switch (
|
|
3886
|
+
for (const i of C.elements(e))
|
|
3887
|
+
switch (i.localName) {
|
|
3888
3888
|
case "r":
|
|
3889
|
-
r.children.push(this.parseRun(
|
|
3889
|
+
r.children.push(this.parseRun(i, r));
|
|
3890
3890
|
break;
|
|
3891
3891
|
case "smartTag":
|
|
3892
|
-
r.children.push(this.parseSmartTag(
|
|
3892
|
+
r.children.push(this.parseSmartTag(i, r));
|
|
3893
3893
|
break;
|
|
3894
3894
|
}
|
|
3895
3895
|
return r;
|
|
@@ -4067,11 +4067,11 @@ class Or {
|
|
|
4067
4067
|
var t = { type: B.Drawing, children: [], cssStyle: {} }, r = e.localName == "anchor";
|
|
4068
4068
|
let a = null, n = C.boolAttr(e, "simplePos");
|
|
4069
4069
|
C.boolAttr(e, "behindDoc");
|
|
4070
|
-
let
|
|
4070
|
+
let i = { relative: "page", align: "left", offset: "0" }, o = { relative: "page", align: "top", offset: "0" };
|
|
4071
4071
|
for (var h of C.elements(e))
|
|
4072
4072
|
switch (h.localName) {
|
|
4073
4073
|
case "simplePos":
|
|
4074
|
-
n && (
|
|
4074
|
+
n && (i.offset = C.lengthAttr(h, "x", ft.Emu), o.offset = C.lengthAttr(h, "y", ft.Emu));
|
|
4075
4075
|
break;
|
|
4076
4076
|
case "extent":
|
|
4077
4077
|
t.cssStyle.width = C.lengthAttr(h, "cx", ft.Emu), t.cssStyle.height = C.lengthAttr(h, "cy", ft.Emu);
|
|
@@ -4079,7 +4079,7 @@ class Or {
|
|
|
4079
4079
|
case "positionH":
|
|
4080
4080
|
case "positionV":
|
|
4081
4081
|
if (!n) {
|
|
4082
|
-
let y = h.localName == "positionH" ?
|
|
4082
|
+
let y = h.localName == "positionH" ? i : o;
|
|
4083
4083
|
var _ = C.element(h, "align"), S = C.element(h, "posOffset");
|
|
4084
4084
|
y.relative = C.attr(h, "relativeFrom") ?? y.relative, _ && (y.align = _.textContent), S && (y.offset = ie(S.textContent, ft.Emu));
|
|
4085
4085
|
}
|
|
@@ -4095,7 +4095,7 @@ class Or {
|
|
|
4095
4095
|
v && t.children.push(v);
|
|
4096
4096
|
break;
|
|
4097
4097
|
}
|
|
4098
|
-
return a == "wrapTopAndBottom" ? (t.cssStyle.display = "block",
|
|
4098
|
+
return a == "wrapTopAndBottom" ? (t.cssStyle.display = "block", i.align && (t.cssStyle["text-align"] = i.align, t.cssStyle.width = "100%")) : a == "wrapNone" ? (t.cssStyle.display = "block", t.cssStyle.position = "relative", t.cssStyle.width = "0px", t.cssStyle.height = "0px", i.offset && (t.cssStyle.left = i.offset), o.offset && (t.cssStyle.top = o.offset)) : r && (i.align == "left" || i.align == "right") && (t.cssStyle.float = i.align), t;
|
|
4099
4099
|
}
|
|
4100
4100
|
parseGraphic(e) {
|
|
4101
4101
|
var t = C.element(e, "graphicData");
|
|
@@ -4112,10 +4112,10 @@ class Or {
|
|
|
4112
4112
|
C.intAttr(n, "r", 0) / 1e5,
|
|
4113
4113
|
C.intAttr(n, "b", 0) / 1e5
|
|
4114
4114
|
]);
|
|
4115
|
-
var
|
|
4116
|
-
if (t.cssStyle.position = "relative",
|
|
4117
|
-
t.rotation = C.intAttr(
|
|
4118
|
-
for (var h of C.elements(
|
|
4115
|
+
var i = C.element(e, "spPr"), o = C.element(i, "xfrm");
|
|
4116
|
+
if (t.cssStyle.position = "relative", o) {
|
|
4117
|
+
t.rotation = C.intAttr(o, "rot", 0) / 6e4;
|
|
4118
|
+
for (var h of C.elements(o))
|
|
4119
4119
|
switch (h.localName) {
|
|
4120
4120
|
case "ext":
|
|
4121
4121
|
t.cssStyle.width = C.lengthAttr(h, "cx", ft.Emu), t.cssStyle.height = C.lengthAttr(h, "cy", ft.Emu);
|
|
@@ -4184,8 +4184,8 @@ class Or {
|
|
|
4184
4184
|
}
|
|
4185
4185
|
}
|
|
4186
4186
|
parseTablePosition(e, t) {
|
|
4187
|
-
var r = C.lengthAttr(e, "topFromText"), a = C.lengthAttr(e, "bottomFromText"), n = C.lengthAttr(e, "rightFromText"),
|
|
4188
|
-
t.cssStyle.float = "left", t.cssStyle["margin-bottom"] = ot.addSize(t.cssStyle["margin-bottom"], a), t.cssStyle["margin-left"] = ot.addSize(t.cssStyle["margin-left"],
|
|
4187
|
+
var r = C.lengthAttr(e, "topFromText"), a = C.lengthAttr(e, "bottomFromText"), n = C.lengthAttr(e, "rightFromText"), i = C.lengthAttr(e, "leftFromText");
|
|
4188
|
+
t.cssStyle.float = "left", t.cssStyle["margin-bottom"] = ot.addSize(t.cssStyle["margin-bottom"], a), t.cssStyle["margin-left"] = ot.addSize(t.cssStyle["margin-left"], i), t.cssStyle["margin-right"] = ot.addSize(t.cssStyle["margin-right"], n), t.cssStyle["margin-top"] = ot.addSize(t.cssStyle["margin-top"], r);
|
|
4189
4189
|
}
|
|
4190
4190
|
parseTableRow(e) {
|
|
4191
4191
|
var t = { type: B.Row, children: [] };
|
|
@@ -4273,8 +4273,8 @@ class Or {
|
|
|
4273
4273
|
};
|
|
4274
4274
|
for (const a of C.elements(e))
|
|
4275
4275
|
if (a.localName === "textDirection") {
|
|
4276
|
-
const n = C.attr(a, "val"),
|
|
4277
|
-
t.cssStyle["writing-mode"] =
|
|
4276
|
+
const n = C.attr(a, "val"), i = r[n] || { writingMode: "horizontal-tb" };
|
|
4277
|
+
t.cssStyle["writing-mode"] = i.writingMode, t.cssStyle.transform = i.transform;
|
|
4278
4278
|
}
|
|
4279
4279
|
}
|
|
4280
4280
|
parseDefaultProperties(e, t = null, r = null, a = null) {
|
|
@@ -4451,17 +4451,17 @@ class Or {
|
|
|
4451
4451
|
}
|
|
4452
4452
|
}
|
|
4453
4453
|
parseFont(e, t) {
|
|
4454
|
-
var r = C.attr(e, "ascii"), a = ot.themeValue(e, "asciiTheme"), n = C.attr(e, "eastAsia"),
|
|
4455
|
-
|
|
4454
|
+
var r = C.attr(e, "ascii"), a = ot.themeValue(e, "asciiTheme"), n = C.attr(e, "eastAsia"), i = [r, a, n].filter((o) => o).map((o) => Ht(o));
|
|
4455
|
+
i.length > 0 && (t["font-family"] = [...new Set(i)].join(", "));
|
|
4456
4456
|
}
|
|
4457
4457
|
parseIndentation(e, t) {
|
|
4458
|
-
var r = C.lengthAttr(e, "firstLine"), a = C.lengthAttr(e, "hanging"), n = C.lengthAttr(e, "left"),
|
|
4459
|
-
r && (t["text-indent"] = r), a && (t["text-indent"] = `-${a}`), (n ||
|
|
4458
|
+
var r = C.lengthAttr(e, "firstLine"), a = C.lengthAttr(e, "hanging"), n = C.lengthAttr(e, "left"), i = C.lengthAttr(e, "start"), o = C.lengthAttr(e, "right"), h = C.lengthAttr(e, "end");
|
|
4459
|
+
r && (t["text-indent"] = r), a && (t["text-indent"] = `-${a}`), (n || i) && (t["margin-inline-start"] = n || i), (o || h) && (t["margin-inline-end"] = o || h);
|
|
4460
4460
|
}
|
|
4461
4461
|
parseSpacing(e, t) {
|
|
4462
|
-
var r = C.lengthAttr(e, "before"), a = C.lengthAttr(e, "after"), n = C.intAttr(e, "line", null),
|
|
4462
|
+
var r = C.lengthAttr(e, "before"), a = C.lengthAttr(e, "after"), n = C.intAttr(e, "line", null), i = C.attr(e, "lineRule");
|
|
4463
4463
|
if (r && (t["margin-top"] = r), a && (t["margin-bottom"] = a), n !== null)
|
|
4464
|
-
switch (
|
|
4464
|
+
switch (i) {
|
|
4465
4465
|
case "auto":
|
|
4466
4466
|
t["line-height"] = `${(n / 240).toFixed(2)}`;
|
|
4467
4467
|
break;
|
|
@@ -4519,8 +4519,8 @@ class Ct {
|
|
|
4519
4519
|
var n = C.attr(e, t);
|
|
4520
4520
|
if (n)
|
|
4521
4521
|
return n == "auto" ? a : Lr.includes(n) ? n : `#${n}`;
|
|
4522
|
-
var
|
|
4523
|
-
return
|
|
4522
|
+
var i = C.attr(e, "themeColor");
|
|
4523
|
+
return i ? `var(--docx-${i}-color)` : r;
|
|
4524
4524
|
}
|
|
4525
4525
|
}
|
|
4526
4526
|
class ot {
|
|
@@ -4630,7 +4630,7 @@ class ot {
|
|
|
4630
4630
|
"sw-cell"
|
|
4631
4631
|
];
|
|
4632
4632
|
if (t)
|
|
4633
|
-
return r.filter((n,
|
|
4633
|
+
return r.filter((n, i) => t[i] == "1").join(" ");
|
|
4634
4634
|
const a = [
|
|
4635
4635
|
"firstRow",
|
|
4636
4636
|
"lastRow",
|
|
@@ -4645,7 +4645,7 @@ class ot {
|
|
|
4645
4645
|
"lastRowLastColumn",
|
|
4646
4646
|
"lastRowFirstColumn"
|
|
4647
4647
|
];
|
|
4648
|
-
return r.filter((n,
|
|
4648
|
+
return r.filter((n, i) => C.boolAttr(e, a[i])).join(" ");
|
|
4649
4649
|
}
|
|
4650
4650
|
static valueOfJc(e) {
|
|
4651
4651
|
var t = C.attr(e, "val");
|
|
@@ -4698,70 +4698,70 @@ class ot {
|
|
|
4698
4698
|
}
|
|
4699
4699
|
}
|
|
4700
4700
|
const ae = { pos: 0, leader: "none", style: "left" }, Dr = 50;
|
|
4701
|
-
function jr(
|
|
4701
|
+
function jr(l = document.body) {
|
|
4702
4702
|
const e = document.createElement("div");
|
|
4703
|
-
e.style.width = "100pt",
|
|
4703
|
+
e.style.width = "100pt", l.appendChild(e);
|
|
4704
4704
|
const t = 100 / e.offsetWidth;
|
|
4705
|
-
return
|
|
4705
|
+
return l.removeChild(e), t;
|
|
4706
4706
|
}
|
|
4707
|
-
function Ur(
|
|
4708
|
-
const a =
|
|
4707
|
+
function Ur(l, e, t, r = 72 / 96) {
|
|
4708
|
+
const a = l.closest("p"), n = l.getBoundingClientRect(), i = a.getBoundingClientRect(), o = getComputedStyle(a), h = e?.length > 0 ? e.map((b) => ({
|
|
4709
4709
|
pos: ne(b.position),
|
|
4710
4710
|
leader: b.leader,
|
|
4711
4711
|
style: b.style
|
|
4712
|
-
})).sort((b, x) => b.pos - x.pos) : [ae], _ = h[h.length - 1], S =
|
|
4712
|
+
})).sort((b, x) => b.pos - x.pos) : [ae], _ = h[h.length - 1], S = i.width * r, v = ne(t);
|
|
4713
4713
|
let y = _.pos + v;
|
|
4714
4714
|
if (y < S)
|
|
4715
4715
|
for (; y < S && h.length < Dr; y += v)
|
|
4716
4716
|
h.push({ ...ae, pos: y });
|
|
4717
|
-
const d = parseFloat(
|
|
4717
|
+
const d = parseFloat(o.marginLeft), k = i.left + d, u = (n.left - k) * r, m = h.find((b) => b.style != "clear" && b.pos > u);
|
|
4718
4718
|
if (m == null)
|
|
4719
4719
|
return;
|
|
4720
4720
|
let f = 1;
|
|
4721
4721
|
if (m.style == "right" || m.style == "center") {
|
|
4722
|
-
const b = Array.from(a.querySelectorAll(`.${
|
|
4723
|
-
E.setStart(
|
|
4724
|
-
const A = m.style == "center" ? 0.5 : 1, L = E.getBoundingClientRect(), F = L.left + A * L.width - (
|
|
4722
|
+
const b = Array.from(a.querySelectorAll(`.${l.className}`)), x = b.indexOf(l) + 1, E = document.createRange();
|
|
4723
|
+
E.setStart(l, 1), x < b.length ? E.setEndBefore(b[x]) : E.setEndAfter(a);
|
|
4724
|
+
const A = m.style == "center" ? 0.5 : 1, L = E.getBoundingClientRect(), F = L.left + A * L.width - (i.left - d);
|
|
4725
4725
|
f = m.pos - F * r;
|
|
4726
4726
|
} else
|
|
4727
4727
|
f = m.pos - u;
|
|
4728
|
-
switch (
|
|
4728
|
+
switch (l.innerHTML = " ", l.style.textDecoration = "inherit", l.style.wordSpacing = `${f.toFixed(0)}pt`, m.leader) {
|
|
4729
4729
|
case "dot":
|
|
4730
4730
|
case "middleDot":
|
|
4731
|
-
|
|
4731
|
+
l.style.textDecoration = "underline", l.style.textDecorationStyle = "dotted";
|
|
4732
4732
|
break;
|
|
4733
4733
|
case "hyphen":
|
|
4734
4734
|
case "heavy":
|
|
4735
4735
|
case "underscore":
|
|
4736
|
-
|
|
4736
|
+
l.style.textDecoration = "underline";
|
|
4737
4737
|
break;
|
|
4738
4738
|
}
|
|
4739
4739
|
}
|
|
4740
|
-
function ne(
|
|
4741
|
-
return parseFloat(
|
|
4740
|
+
function ne(l) {
|
|
4741
|
+
return parseFloat(l);
|
|
4742
4742
|
}
|
|
4743
4743
|
var it;
|
|
4744
|
-
(function(
|
|
4745
|
-
|
|
4744
|
+
(function(l) {
|
|
4745
|
+
l.html = "http://www.w3.org/1999/xhtml", l.svg = "http://www.w3.org/2000/svg", l.mathML = "http://www.w3.org/1998/Math/MathML";
|
|
4746
4746
|
})(it || (it = {}));
|
|
4747
|
-
function Lt(
|
|
4748
|
-
if (Wt(
|
|
4749
|
-
return document.createTextNode(
|
|
4750
|
-
if (
|
|
4751
|
-
return
|
|
4752
|
-
const { ns: e, tagName: t, className: r, style: a, children: n, ...
|
|
4747
|
+
function Lt(l) {
|
|
4748
|
+
if (Wt(l))
|
|
4749
|
+
return document.createTextNode(l);
|
|
4750
|
+
if (l instanceof Node)
|
|
4751
|
+
return l;
|
|
4752
|
+
const { ns: e, tagName: t, className: r, style: a, children: n, ...i } = l;
|
|
4753
4753
|
if (t === "#fragment")
|
|
4754
4754
|
return document.createDocumentFragment();
|
|
4755
4755
|
if (t === "#comment")
|
|
4756
4756
|
return document.createComment(n[0]);
|
|
4757
|
-
const
|
|
4758
|
-
if (r &&
|
|
4759
|
-
for (const [h, _] of Object.entries(
|
|
4760
|
-
_ !== void 0 && (
|
|
4761
|
-
return n && n.forEach((h) =>
|
|
4757
|
+
const o = e ? document.createElementNS(e, t) : document.createElement(t);
|
|
4758
|
+
if (r && o.setAttribute("class", r), a && (Wt(a) ? o.setAttribute("style", a) : Object.assign(o.style, a)), i)
|
|
4759
|
+
for (const [h, _] of Object.entries(i))
|
|
4760
|
+
_ !== void 0 && (o[h] = _);
|
|
4761
|
+
return n && n.forEach((h) => o.appendChild(Lt(h))), o;
|
|
4762
4762
|
}
|
|
4763
|
-
function $r(...
|
|
4764
|
-
return
|
|
4763
|
+
function $r(...l) {
|
|
4764
|
+
return l.filter(Boolean).join(" ");
|
|
4765
4765
|
}
|
|
4766
4766
|
class Hr {
|
|
4767
4767
|
constructor() {
|
|
@@ -4779,8 +4779,8 @@ class Hr {
|
|
|
4779
4779
|
r && (r.majorFont && (t["--docx-majorHAnsi-font"] = r.majorFont.latinTypeface), r.minorFont && (t["--docx-minorHAnsi-font"] = r.minorFont.latinTypeface));
|
|
4780
4780
|
const a = e.theme?.colorScheme;
|
|
4781
4781
|
if (a)
|
|
4782
|
-
for (let [
|
|
4783
|
-
t[`--docx-${
|
|
4782
|
+
for (let [i, o] of Object.entries(a.colors))
|
|
4783
|
+
t[`--docx-${i}-color`] = `#${o}`;
|
|
4784
4784
|
const n = this.styleToString(`.${this.className}`, t);
|
|
4785
4785
|
return [
|
|
4786
4786
|
this.h({ tagName: "#comment", children: ["docxjs document theme values"] }),
|
|
@@ -4792,11 +4792,11 @@ class Hr {
|
|
|
4792
4792
|
for (let r of e.fonts)
|
|
4793
4793
|
for (let a of r.embedFontRefs)
|
|
4794
4794
|
try {
|
|
4795
|
-
const n = await this.document.loadFont(a.id, a.key),
|
|
4795
|
+
const n = await this.document.loadFont(a.id, a.key), i = {
|
|
4796
4796
|
"font-family": Ht(r.name),
|
|
4797
4797
|
src: `url(${n})`
|
|
4798
4798
|
};
|
|
4799
|
-
(a.type == "bold" || a.type == "boldItalic") && (
|
|
4799
|
+
(a.type == "bold" || a.type == "boldItalic") && (i["font-weight"] = "bold"), (a.type == "italic" || a.type == "boldItalic") && (i["font-style"] = "italic"), t.push(this.h({ tagName: "#comment", children: [`docxjs ${r.name} font`] })), t.push(this.h({ tagName: "style", children: [this.styleToString("@font-face", i)] }));
|
|
4800
4800
|
} catch {
|
|
4801
4801
|
this.options.debug && console.warn(`Can't load font with id ${a.id} and key ${a.key}`);
|
|
4802
4802
|
}
|
|
@@ -4812,8 +4812,8 @@ class Hr {
|
|
|
4812
4812
|
if (r) {
|
|
4813
4813
|
a.paragraphProps = Ot(a.paragraphProps, r.paragraphProps), a.runProps = Ot(a.runProps, r.runProps);
|
|
4814
4814
|
for (const n of r.styles) {
|
|
4815
|
-
const
|
|
4816
|
-
|
|
4815
|
+
const i = a.styles.find((o) => o.target == n.target);
|
|
4816
|
+
i ? this.copyStyleProperties(n.values, i.values) : a.styles.push({ ...n, values: { ...n.values } });
|
|
4817
4817
|
}
|
|
4818
4818
|
} else this.options.debug && console.warn(`Can't find base style ${a.basedOn}`);
|
|
4819
4819
|
}
|
|
@@ -4867,20 +4867,20 @@ class Hr {
|
|
|
4867
4867
|
this.processElement(e);
|
|
4868
4868
|
const r = this.splitBySection(e.children, e.props), a = this.groupByPageBreaks(r);
|
|
4869
4869
|
let n = null;
|
|
4870
|
-
for (let
|
|
4870
|
+
for (let o = 0, h = a.length; o < h; o++) {
|
|
4871
4871
|
this.currentFootnoteIds = [];
|
|
4872
|
-
let S = a[
|
|
4872
|
+
let S = a[o][0].sectProps;
|
|
4873
4873
|
const v = this.createPageElement(this.className, S, e.cssStyle);
|
|
4874
4874
|
this.options.renderHeaders && this.renderHeaderFooter(S.headerRefs, S, t.length, n != S, v);
|
|
4875
|
-
for (const y of a[
|
|
4876
|
-
var
|
|
4877
|
-
this.renderElements(y.elements,
|
|
4875
|
+
for (const y of a[o]) {
|
|
4876
|
+
var i = this.createSectionContent(y.sectProps);
|
|
4877
|
+
this.renderElements(y.elements, i), v.appendChild(i), S = y.sectProps;
|
|
4878
4878
|
}
|
|
4879
4879
|
if (this.options.renderFootnotes) {
|
|
4880
4880
|
const y = this.renderNotes(this.currentFootnoteIds, this.footnoteMap);
|
|
4881
4881
|
y && v.appendChild(y);
|
|
4882
4882
|
}
|
|
4883
|
-
if (this.options.renderEndnotes &&
|
|
4883
|
+
if (this.options.renderEndnotes && o == h - 1) {
|
|
4884
4884
|
const y = this.renderNotes(this.currentEndnoteIds, this.endnoteMap);
|
|
4885
4885
|
y && v.appendChild(y);
|
|
4886
4886
|
}
|
|
@@ -4890,11 +4890,11 @@ class Hr {
|
|
|
4890
4890
|
}
|
|
4891
4891
|
renderHeaderFooter(e, t, r, a, n) {
|
|
4892
4892
|
if (e) {
|
|
4893
|
-
var
|
|
4894
|
-
if (
|
|
4895
|
-
this.currentPart =
|
|
4896
|
-
const [h] = this.renderElements([
|
|
4897
|
-
t?.pageMargins && (
|
|
4893
|
+
var i = (t.titlePage && a ? e.find((h) => h.type == "first") : null) ?? (r % 2 == 1 ? e.find((h) => h.type == "even") : null) ?? e.find((h) => h.type == "default"), o = i && this.document.findPartByRelId(i.id, this.document.documentPart);
|
|
4894
|
+
if (o) {
|
|
4895
|
+
this.currentPart = o, this.usedHederFooterParts.includes(o.path) || (this.processElement(o.rootElement), this.usedHederFooterParts.push(o.path));
|
|
4896
|
+
const [h] = this.renderElements([o.rootElement], n);
|
|
4897
|
+
t?.pageMargins && (o.rootElement.type === B.Header ? (h.style.marginTop = `calc(${t.pageMargins.header} - ${t.pageMargins.top})`, h.style.minHeight = `calc(${t.pageMargins.top} - ${t.pageMargins.header})`) : o.rootElement.type === B.Footer && (h.style.marginBottom = `calc(${t.pageMargins.footer} - ${t.pageMargins.bottom})`, h.style.minHeight = `calc(${t.pageMargins.bottom} - ${t.pageMargins.footer})`)), this.currentPart = null;
|
|
4898
4898
|
}
|
|
4899
4899
|
}
|
|
4900
4900
|
}
|
|
@@ -4909,14 +4909,14 @@ class Hr {
|
|
|
4909
4909
|
for (let v of e)
|
|
4910
4910
|
if (v.type == B.Paragraph && this.findStyle(v.styleName)?.paragraphProps?.pageBreakBefore && (r.sectProps = n, r.pageBreak = !0, r = { sectProps: null, elements: [], pageBreak: !1 }, a.push(r)), r.elements.push(v), v.type == B.Paragraph) {
|
|
4911
4911
|
const y = v;
|
|
4912
|
-
var n = y.sectionProps,
|
|
4913
|
-
if (this.options.breakPages && y.children && (
|
|
4914
|
-
let d = y.children[
|
|
4915
|
-
if (
|
|
4916
|
-
var h = v.children, _ = { ...v, children: h.slice(
|
|
4917
|
-
if (v.children = h.slice(0,
|
|
4918
|
-
let u = d.children, m = { ...d, children: u.slice(0,
|
|
4919
|
-
v.children.push(m), d.children = u.slice(
|
|
4912
|
+
var n = y.sectionProps, i = -1, o = -1;
|
|
4913
|
+
if (this.options.breakPages && y.children && (i = y.children.findIndex((d) => (o = d.children?.findIndex(this.isPageBreakElement.bind(this)) ?? -1, o != -1))), (n || i != -1) && (r.sectProps = n, r.pageBreak = i != -1, r = { sectProps: null, elements: [], pageBreak: !1 }, a.push(r)), i != -1) {
|
|
4914
|
+
let d = y.children[i], k = o < d.children.length - 1;
|
|
4915
|
+
if (i < y.children.length - 1 || k) {
|
|
4916
|
+
var h = v.children, _ = { ...v, children: h.slice(i) };
|
|
4917
|
+
if (v.children = h.slice(0, i), r.elements.push(_), k) {
|
|
4918
|
+
let u = d.children, m = { ...d, children: u.slice(0, o) };
|
|
4919
|
+
v.children.push(m), d.children = u.slice(o);
|
|
4920
4920
|
}
|
|
4921
4921
|
}
|
|
4922
4922
|
}
|
|
@@ -4966,36 +4966,36 @@ section.${e}>footer { z-index: 1; }
|
|
|
4966
4966
|
async renderNumbering(e) {
|
|
4967
4967
|
var t = "", r = [];
|
|
4968
4968
|
for (var a of e) {
|
|
4969
|
-
var n = `p.${this.numberingClass(a.id, a.level)}`,
|
|
4969
|
+
var n = `p.${this.numberingClass(a.id, a.level)}`, i = "none";
|
|
4970
4970
|
if (a.bullet) {
|
|
4971
|
-
let
|
|
4971
|
+
let o = `--${this.className}-${a.bullet.src}`.toLowerCase();
|
|
4972
4972
|
t += this.styleToString(`${n}:before`, {
|
|
4973
4973
|
content: "' '",
|
|
4974
4974
|
display: "inline-block",
|
|
4975
|
-
background: `var(${
|
|
4975
|
+
background: `var(${o})`
|
|
4976
4976
|
}, a.bullet.style);
|
|
4977
4977
|
try {
|
|
4978
4978
|
const h = await this.document.loadNumberingImage(a.bullet.src);
|
|
4979
|
-
t += `${this.rootSelector} { ${
|
|
4979
|
+
t += `${this.rootSelector} { ${o}: url(${h}) }`;
|
|
4980
4980
|
} catch {
|
|
4981
4981
|
this.options.debug && console.warn(`Can't load numbering image with src ${a.bullet.src}`);
|
|
4982
4982
|
}
|
|
4983
4983
|
} else if (a.levelText) {
|
|
4984
|
-
let
|
|
4985
|
-
const h =
|
|
4984
|
+
let o = this.numberingCounter(a.id, a.level);
|
|
4985
|
+
const h = o + " " + (a.start - 1);
|
|
4986
4986
|
a.level > 0 && (t += this.styleToString(`p.${this.numberingClass(a.id, a.level - 1)}`, {
|
|
4987
4987
|
"counter-set": h
|
|
4988
4988
|
})), r.push(h), t += this.styleToString(`${n}:before`, {
|
|
4989
4989
|
content: this.levelTextToContent(a.levelText, a.suff, a.id, this.numFormatToCssValue(a.format)),
|
|
4990
|
-
"counter-increment":
|
|
4990
|
+
"counter-increment": o,
|
|
4991
4991
|
...a.rStyle
|
|
4992
4992
|
});
|
|
4993
4993
|
} else
|
|
4994
|
-
|
|
4994
|
+
i = this.numFormatToCssValue(a.format);
|
|
4995
4995
|
t += this.styleToString(n, {
|
|
4996
4996
|
display: "list-item",
|
|
4997
4997
|
"list-style-position": "inside",
|
|
4998
|
-
"list-style-type":
|
|
4998
|
+
"list-style-type": i,
|
|
4999
4999
|
...a.pStyle
|
|
5000
5000
|
});
|
|
5001
5001
|
}
|
|
@@ -5012,12 +5012,12 @@ section.${e}>footer { z-index: 1; }
|
|
|
5012
5012
|
for (const h of e) {
|
|
5013
5013
|
var n = h.styles;
|
|
5014
5014
|
if (h.linked) {
|
|
5015
|
-
var
|
|
5016
|
-
|
|
5015
|
+
var i = h.linked && r[h.linked];
|
|
5016
|
+
i ? n = n.concat(i.styles) : this.options.debug && console.warn(`Can't find linked style ${h.linked}`);
|
|
5017
5017
|
}
|
|
5018
5018
|
for (const _ of n) {
|
|
5019
|
-
var
|
|
5020
|
-
h.target != _.target && (
|
|
5019
|
+
var o = `${h.target ?? ""}.${h.cssName}`;
|
|
5020
|
+
h.target != _.target && (o += ` ${_.target}`), a[h.target] == h && (o = `.${this.className} ${h.target}, ` + o), t += this.styleToString(o, _.values);
|
|
5021
5021
|
}
|
|
5022
5022
|
}
|
|
5023
5023
|
return [
|
|
@@ -5224,8 +5224,8 @@ section.${e}>footer { z-index: 1; }
|
|
|
5224
5224
|
renderImage(e) {
|
|
5225
5225
|
let t = this.toHTML(e, it.html, "img", []), r = e.cssStyle?.transform;
|
|
5226
5226
|
if (e.srcRect && e.srcRect.some((h) => h != 0)) {
|
|
5227
|
-
var [a, n,
|
|
5228
|
-
r = `scale(${1 / (1 - a -
|
|
5227
|
+
var [a, n, i, o] = e.srcRect;
|
|
5228
|
+
r = `scale(${1 / (1 - a - i)}, ${1 / (1 - n - o)})`, t.style["clip-path"] = `rect(${(100 * n).toFixed(2)}% ${(100 * (1 - i)).toFixed(2)}% ${(100 * (1 - o)).toFixed(2)}% ${(100 * a).toFixed(2)}%)`;
|
|
5229
5229
|
}
|
|
5230
5230
|
return e.rotation && (r = `rotate(${e.rotation}deg) ${r ?? ""}`), t.style.transform = r?.trim(), this.document && this.tasks.push(this.document.loadDocumentImage(e.src, this.currentPart).then((h) => {
|
|
5231
5231
|
t.src = h;
|
|
@@ -5332,12 +5332,12 @@ section.${e}>footer { z-index: 1; }
|
|
|
5332
5332
|
return t.push(this.createMathMLElement("mo", null, [e.props.beginChar ?? "("])), t.push(...this.renderElements(e.children)), t.push(this.createMathMLElement("mo", null, [e.props.endChar ?? ")"])), this.createMathMLElement("mrow", null, t);
|
|
5333
5333
|
}
|
|
5334
5334
|
renderMmlNary(e) {
|
|
5335
|
-
const t = [], r = wt(e.children, (_) => _.type), a = r[B.MmlSuperArgument], n = r[B.MmlSubArgument],
|
|
5336
|
-
return
|
|
5335
|
+
const t = [], r = wt(e.children, (_) => _.type), a = r[B.MmlSuperArgument], n = r[B.MmlSubArgument], i = a ? this.createMathMLElement("mo", null, Et(this.renderElement(a))) : null, o = n ? this.createMathMLElement("mo", null, Et(this.renderElement(n))) : null, h = this.createMathMLElement("mo", null, [e.props?.char ?? "∫"]);
|
|
5336
|
+
return i || o ? t.push(this.createMathMLElement("munderover", null, [h, o, i])) : i ? t.push(this.createMathMLElement("mover", null, [h, i])) : o ? t.push(this.createMathMLElement("munder", null, [h, o])) : t.push(h), t.push(...this.renderElements(r[B.MmlBase].children)), this.createMathMLElement("mrow", null, t);
|
|
5337
5337
|
}
|
|
5338
5338
|
renderMmlPreSubSuper(e) {
|
|
5339
|
-
const t = [], r = wt(e.children, (_) => _.type), a = r[B.MmlSuperArgument], n = r[B.MmlSubArgument],
|
|
5340
|
-
return t.push(this.createMathMLElement("msubsup", null, [h,
|
|
5339
|
+
const t = [], r = wt(e.children, (_) => _.type), a = r[B.MmlSuperArgument], n = r[B.MmlSubArgument], i = a ? this.createMathMLElement("mo", null, Et(this.renderElement(a))) : null, o = n ? this.createMathMLElement("mo", null, Et(this.renderElement(n))) : null, h = this.createMathMLElement("mo", null);
|
|
5340
|
+
return t.push(this.createMathMLElement("msubsup", null, [h, o, i])), t.push(...this.renderElements(r[B.MmlBase].children)), this.createMathMLElement("mrow", null, t);
|
|
5341
5341
|
}
|
|
5342
5342
|
renderMmlGroupChar(e) {
|
|
5343
5343
|
const t = e.props.verticalJustification === "bot" ? "mover" : "munder", r = this.renderContainerNS(e, it.mathML, t);
|
|
@@ -5365,8 +5365,8 @@ section.${e}>footer { z-index: 1; }
|
|
|
5365
5365
|
return this.toHTML(e, it.mathML, "mtable", t);
|
|
5366
5366
|
}
|
|
5367
5367
|
toH(e, t, r, a = null) {
|
|
5368
|
-
const { $lang: n, ...
|
|
5369
|
-
return { ns: t, tagName: r, className:
|
|
5368
|
+
const { $lang: n, ...i } = e.cssStyle ?? {}, o = $r(e.className, e.styleName && this.processStyleName(e.styleName));
|
|
5369
|
+
return { ns: t, tagName: r, className: o, lang: n, style: i, children: a ?? this.renderElements(e.children) };
|
|
5370
5370
|
}
|
|
5371
5371
|
toHTML(e, t, r, a = null) {
|
|
5372
5372
|
return this.h(this.toH(e, t, r, a));
|
|
@@ -5397,11 +5397,11 @@ section.${e}>footer { z-index: 1; }
|
|
|
5397
5397
|
tab: "\\9",
|
|
5398
5398
|
space: "\\a0"
|
|
5399
5399
|
};
|
|
5400
|
-
var
|
|
5401
|
-
let h = parseInt(
|
|
5400
|
+
var i = e.replace(/%\d*/g, (o) => {
|
|
5401
|
+
let h = parseInt(o.substring(1), 10) - 1;
|
|
5402
5402
|
return `"counter(${this.numberingCounter(r, h)}, ${a})"`;
|
|
5403
5403
|
});
|
|
5404
|
-
return `"${
|
|
5404
|
+
return `"${i}${n[t] ?? ""}"`;
|
|
5405
5405
|
}
|
|
5406
5406
|
numFormatToCssValue(e) {
|
|
5407
5407
|
var t = {
|
|
@@ -5465,8 +5465,8 @@ section.${e}>footer { z-index: 1; }
|
|
|
5465
5465
|
this.postRenderTasks.push(e);
|
|
5466
5466
|
}
|
|
5467
5467
|
}
|
|
5468
|
-
function Wr(
|
|
5469
|
-
for (var t =
|
|
5468
|
+
function Wr(l, e) {
|
|
5469
|
+
for (var t = l.parent; t != null && t.type != e; )
|
|
5470
5470
|
t = t.parent;
|
|
5471
5471
|
return t;
|
|
5472
5472
|
}
|
|
@@ -5492,21 +5492,40 @@ const be = {
|
|
|
5492
5492
|
renderAltChunks: !0,
|
|
5493
5493
|
h: Lt
|
|
5494
5494
|
};
|
|
5495
|
-
function Zr(
|
|
5495
|
+
function Zr(l, e) {
|
|
5496
5496
|
const t = { ...be, ...e };
|
|
5497
|
-
return Gt.load(
|
|
5497
|
+
return Gt.load(l, new Or(t), t);
|
|
5498
5498
|
}
|
|
5499
|
-
async function Vr(
|
|
5499
|
+
async function Vr(l, e) {
|
|
5500
5500
|
const t = { ...be, ...e };
|
|
5501
|
-
return await new Hr().render(
|
|
5501
|
+
return await new Hr().render(l, t);
|
|
5502
5502
|
}
|
|
5503
|
-
async function
|
|
5504
|
-
const a = await Zr(
|
|
5503
|
+
async function Gr(l, e, t, r) {
|
|
5504
|
+
const a = await Zr(l, r), n = await Vr(a, r);
|
|
5505
5505
|
t ?? (t = e), t.innerHTML = "", e.innerHTML = "";
|
|
5506
|
-
for (let
|
|
5507
|
-
(
|
|
5506
|
+
for (let i of n)
|
|
5507
|
+
(i.nodeName === "STYLE" ? t : e).appendChild(i);
|
|
5508
5508
|
return a;
|
|
5509
5509
|
}
|
|
5510
|
+
const Xr = /* @__PURE__ */ new Set(["http:", "https:", "mailto:"]), qr = "iframe, frame, object, embed, script", Kr = (l) => {
|
|
5511
|
+
if (l.startsWith("#"))
|
|
5512
|
+
return !0;
|
|
5513
|
+
try {
|
|
5514
|
+
return Xr.has(new URL(l, document.baseURI).protocol);
|
|
5515
|
+
} catch {
|
|
5516
|
+
return !1;
|
|
5517
|
+
}
|
|
5518
|
+
}, Qr = async (l, e, t) => {
|
|
5519
|
+
const r = document.createElement("div"), a = document.createElement("div");
|
|
5520
|
+
await Gr(l, a, r, {
|
|
5521
|
+
...t,
|
|
5522
|
+
renderAltChunks: !1
|
|
5523
|
+
}), a.querySelectorAll(qr).forEach((i) => {
|
|
5524
|
+
i.remove();
|
|
5525
|
+
}), a.querySelectorAll("a[href]").forEach((i) => {
|
|
5526
|
+
Kr(i.getAttribute("href") ?? "") || i.removeAttribute("href");
|
|
5527
|
+
}), (e.shadowRoot ?? e.attachShadow({ mode: "open" })).replaceChildren(r, a);
|
|
5528
|
+
};
|
|
5510
5529
|
export {
|
|
5511
|
-
|
|
5530
|
+
Qr as r
|
|
5512
5531
|
};
|