@fileverse-dev/dsheet 3.0.1-yjs-15 → 3.0.2-29July-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{constants-Cdz6oSCq.js → constants-Q8nzbvQO.js} +5 -3
- package/dist/constants.js +1 -1
- package/dist/editor/components/editor-workbook-sync.d.ts +1 -1
- package/dist/editor/constants/shared-constants.d.ts +2 -0
- package/dist/editor/hooks/use-xlsx-import-impl.d.ts +1 -2
- package/dist/editor/hooks/use-xlsx-import.d.ts +1 -2
- package/dist/editor/utils/apply-comment-markers.d.ts +22 -0
- package/dist/editor/utils/update-ydoc.d.ts +2 -2
- package/dist/{executeStringFunction-BHy-_q3d.js → executeStringFunction-C5hEkx9z.js} +9240 -14112
- package/dist/formula.js +1 -1
- package/dist/{index-OL2_pnvq.js → index-B5OjJYA0.js} +25764 -22624
- package/dist/index.es.js +39 -39
- package/dist/sheet-engine/core/api/cell.d.ts +20 -0
- package/dist/sheet-engine/core/api/common.d.ts +1 -2
- package/dist/sheet-engine/core/api/index.d.ts +0 -1
- package/dist/sheet-engine/core/api/sheet.d.ts +0 -5
- package/dist/sheet-engine/core/modules/formula-worker-bridge.d.ts +0 -1
- package/dist/sheet-engine/core/modules/sheet-metadata-hooks.d.ts +0 -4
- package/dist/sheet-engine/core/modules/sheet.d.ts +1 -17
- package/dist/sheet-engine/core/settings.d.ts +1 -1
- package/dist/sheet-engine/core/types.d.ts +0 -3
- package/dist/sheet-engine/react/components/Workbook/api.d.ts +1 -8
- package/dist/sheet-engine/react/components/Workbook/index.d.ts +1 -5
- package/dist/use-xlsx-import-impl-CevfOsNi.js +1556 -0
- package/dist/xlsx-export-impl-CiWHN8hx.js +3138 -0
- package/package.json +2 -2
- package/dist/editor/hooks/use-celldata-compaction.d.ts +0 -23
- package/dist/editor/utils/compact-committed-celldata.d.ts +0 -28
- package/dist/editor/utils/config-ydoc-update.d.ts +0 -20
- package/dist/sheet-engine/core/api/sheet-flowdata-lifecycle.d.ts +0 -17
- package/dist/sheet-engine/core/paste/paste-border-utils.d.ts +0 -23
- package/dist/sheet-engine/core/utils/border-config-utils.d.ts +0 -16
- package/dist/sheet-engine/core/utils/cell-persist-utils.d.ts +0 -10
- package/dist/sheet-engine/core/utils/range-format.d.ts +0 -71
- package/dist/sheet-engine/core/utils/ydoc-celldata-changes.d.ts +0 -40
- package/dist/use-xlsx-import-impl-Bvgo-6F2.js +0 -1554
- package/dist/xlsx-export-impl-CxyAa2j_.js +0 -3126
|
@@ -1,3126 +0,0 @@
|
|
|
1
|
-
import { utils as ht, write as Nt } from "xlsx-js-style";
|
|
2
|
-
import { Workbook as Pt } from "exceljs";
|
|
3
|
-
import { toast as Ut } from "@fileverse/ui";
|
|
4
|
-
import { addFortuneImagesToWorksheet as Lt } from "./xlsx-image-utils-Cvg0qxRA.js";
|
|
5
|
-
import { g as jt, c as xt, b as Wt } from "./executeStringFunction-BHy-_q3d.js";
|
|
6
|
-
import { c as Ct } from "./index-OL2_pnvq.js";
|
|
7
|
-
import { c as zt, g as Mt } from "./xlsx-hyperlink-inline-DzewAypN.js";
|
|
8
|
-
const Zt = {
|
|
9
|
-
1: "thin",
|
|
10
|
-
2: "hair",
|
|
11
|
-
3: "dotted",
|
|
12
|
-
4: "dashed",
|
|
13
|
-
5: "dashDot",
|
|
14
|
-
6: "dashDotDot",
|
|
15
|
-
7: "double",
|
|
16
|
-
8: "medium",
|
|
17
|
-
9: "mediumDashed",
|
|
18
|
-
10: "mediumDashDot",
|
|
19
|
-
11: "mediumDashDotDot",
|
|
20
|
-
12: "slantDashDot",
|
|
21
|
-
13: "thick"
|
|
22
|
-
}, $t = (L) => {
|
|
23
|
-
if (typeof L != "string") return "000000";
|
|
24
|
-
const K = L.replace("#", "").toUpperCase();
|
|
25
|
-
return K.length === 3 ? K.replace(/(.)/g, "$1$1") : K.length === 6 ? K : "000000";
|
|
26
|
-
}, vt = (L, K) => {
|
|
27
|
-
const s = Number(L);
|
|
28
|
-
if (s)
|
|
29
|
-
return {
|
|
30
|
-
style: Zt[s] ?? "thin",
|
|
31
|
-
color: { rgb: $t(K) }
|
|
32
|
-
};
|
|
33
|
-
}, _t = (L, K, s, S, c) => {
|
|
34
|
-
if (!c || !S.l && !S.r && !S.t && !S.b) return;
|
|
35
|
-
const o = ht.encode_cell({ r: K, c: s }), a = {
|
|
36
|
-
...L[o] || { t: "z" }
|
|
37
|
-
}, r = { ...a.s || {} }, l = { ...r.border || {} };
|
|
38
|
-
S.l && (l.left = c), S.r && (l.right = c), S.t && (l.top = c), S.b && (l.bottom = c), r.border = l, a.s = r, L[o] = a;
|
|
39
|
-
}, Ht = (L, K) => {
|
|
40
|
-
K.forEach((s) => {
|
|
41
|
-
if (s.rangeType === "cell") {
|
|
42
|
-
if (!s.value) return;
|
|
43
|
-
const { row_index: S, col_index: c } = s.value;
|
|
44
|
-
if (S == null || c == null) return;
|
|
45
|
-
const o = s.value, a = ht.encode_cell({ r: S, c }), r = {
|
|
46
|
-
...L[a] || { t: "z" }
|
|
47
|
-
}, l = { ...r.s || {} }, d = { ...l.border || {} };
|
|
48
|
-
o.l && (d.left = vt(o.l.style, o.l.color)), o.r && (d.right = vt(o.r.style, o.r.color)), o.t && (d.top = vt(o.t.style, o.t.color)), o.b && (d.bottom = vt(o.b.style, o.b.color)), l.border = d, r.s = l, L[a] = r;
|
|
49
|
-
} else if (s.rangeType === "range") {
|
|
50
|
-
const { borderType: S, style: c, color: o, range: a } = s;
|
|
51
|
-
if (S === "border-none" || !Array.isArray(a) || !c)
|
|
52
|
-
return;
|
|
53
|
-
const r = vt(c, o);
|
|
54
|
-
if (!r) return;
|
|
55
|
-
a.forEach((l) => {
|
|
56
|
-
const [d, w] = l.row, [g, y] = l.column;
|
|
57
|
-
for (let n = d; n <= w; n++)
|
|
58
|
-
for (let p = g; p <= y; p++)
|
|
59
|
-
switch (S) {
|
|
60
|
-
case "border-all":
|
|
61
|
-
_t(
|
|
62
|
-
L,
|
|
63
|
-
n,
|
|
64
|
-
p,
|
|
65
|
-
{ l: !0, r: !0, t: !0, b: !0 },
|
|
66
|
-
r
|
|
67
|
-
);
|
|
68
|
-
break;
|
|
69
|
-
case "border-outside":
|
|
70
|
-
_t(
|
|
71
|
-
L,
|
|
72
|
-
n,
|
|
73
|
-
p,
|
|
74
|
-
{ l: p === g, r: p === y, t: n === d, b: n === w },
|
|
75
|
-
r
|
|
76
|
-
);
|
|
77
|
-
break;
|
|
78
|
-
case "border-inside":
|
|
79
|
-
_t(
|
|
80
|
-
L,
|
|
81
|
-
n,
|
|
82
|
-
p,
|
|
83
|
-
{ r: p < y, b: n < w },
|
|
84
|
-
r
|
|
85
|
-
);
|
|
86
|
-
break;
|
|
87
|
-
case "border-horizontal":
|
|
88
|
-
_t(L, n, p, { b: n < w }, r);
|
|
89
|
-
break;
|
|
90
|
-
case "border-vertical":
|
|
91
|
-
_t(L, n, p, { r: p < y }, r);
|
|
92
|
-
break;
|
|
93
|
-
case "border-left":
|
|
94
|
-
p === g && _t(L, n, p, { l: !0 }, r);
|
|
95
|
-
break;
|
|
96
|
-
case "border-right":
|
|
97
|
-
p === y && _t(L, n, p, { r: !0 }, r);
|
|
98
|
-
break;
|
|
99
|
-
case "border-top":
|
|
100
|
-
n === d && _t(L, n, p, { t: !0 }, r);
|
|
101
|
-
break;
|
|
102
|
-
case "border-bottom":
|
|
103
|
-
n === w && _t(L, n, p, { b: !0 }, r);
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
function Et(L) {
|
|
111
|
-
if (!L || typeof L != "string") return null;
|
|
112
|
-
const K = L.trim();
|
|
113
|
-
if (K.startsWith("#")) {
|
|
114
|
-
const S = K.replace("#", "").toUpperCase();
|
|
115
|
-
return S.length === 3 ? "FF" + S.split("").map((c) => c + c).join("") : S.length === 6 ? "FF" + S : null;
|
|
116
|
-
}
|
|
117
|
-
const s = K.match(/rgba?\s*\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)/i);
|
|
118
|
-
if (s) {
|
|
119
|
-
const S = (c) => Math.min(255, Math.max(0, Math.round(c))).toString(16).padStart(2, "0").toUpperCase();
|
|
120
|
-
return "FF" + S(parseFloat(s[1])) + S(parseFloat(s[2])) + S(parseFloat(s[3]));
|
|
121
|
-
}
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
function Vt(L) {
|
|
125
|
-
const K = {}, s = {};
|
|
126
|
-
if (L.textColor && L.textColor.toLowerCase() !== "#000000") {
|
|
127
|
-
const c = Et(L.textColor);
|
|
128
|
-
c && (s.color = { argb: c });
|
|
129
|
-
}
|
|
130
|
-
L.bold && (s.bold = !0), L.italic && (s.italic = !0), L.underline && (s.underline = !0), L.strikethrough && (s.strike = !0), Object.keys(s).length > 0 && (K.font = s);
|
|
131
|
-
const S = L.cellColor;
|
|
132
|
-
if (S && S.toLowerCase() !== "#ffffff") {
|
|
133
|
-
const c = Et(S);
|
|
134
|
-
c && (K.fill = { type: "pattern", pattern: "solid", fgColor: { argb: c } });
|
|
135
|
-
}
|
|
136
|
-
return K;
|
|
137
|
-
}
|
|
138
|
-
function Gt(L) {
|
|
139
|
-
return !Array.isArray(L) || L.length === 0 ? "" : L.map((s) => {
|
|
140
|
-
const [S, c] = s.row, [o, a] = s.column, r = ht.encode_cell({ r: S, c: o }), l = ht.encode_cell({ r: c, c: a });
|
|
141
|
-
return r === l ? r : `${r}:${l}`;
|
|
142
|
-
}).filter(Boolean).join(" ");
|
|
143
|
-
}
|
|
144
|
-
function Yt(L, K, s) {
|
|
145
|
-
const { conditionName: S, conditionValue: c = [], format: o = {} } = L, a = Vt(o), r = (d) => d.replace(/"/g, '""'), l = K.split(/[\s:]/)[0];
|
|
146
|
-
switch (S) {
|
|
147
|
-
case "greaterThan":
|
|
148
|
-
case "greaterThanOrEqual":
|
|
149
|
-
case "lessThan":
|
|
150
|
-
case "lessThanOrEqual":
|
|
151
|
-
case "equal":
|
|
152
|
-
return c[0] ? {
|
|
153
|
-
type: "cellIs",
|
|
154
|
-
operator: S,
|
|
155
|
-
formulae: [c[0]],
|
|
156
|
-
priority: s,
|
|
157
|
-
style: a
|
|
158
|
-
} : null;
|
|
159
|
-
case "notEqual":
|
|
160
|
-
return c[0] ? {
|
|
161
|
-
type: "cellIs",
|
|
162
|
-
operator: "notEqual",
|
|
163
|
-
formulae: [c[0]],
|
|
164
|
-
priority: s,
|
|
165
|
-
style: a
|
|
166
|
-
} : null;
|
|
167
|
-
case "between":
|
|
168
|
-
return c.length < 2 ? null : {
|
|
169
|
-
type: "cellIs",
|
|
170
|
-
operator: "between",
|
|
171
|
-
formulae: [c[0], c[1]],
|
|
172
|
-
priority: s,
|
|
173
|
-
style: a
|
|
174
|
-
};
|
|
175
|
-
case "notBetween":
|
|
176
|
-
return c.length < 2 ? null : {
|
|
177
|
-
type: "cellIs",
|
|
178
|
-
operator: "notBetween",
|
|
179
|
-
formulae: [c[0], c[1]],
|
|
180
|
-
priority: s,
|
|
181
|
-
style: a
|
|
182
|
-
};
|
|
183
|
-
case "textContains": {
|
|
184
|
-
if (!c[0]) return null;
|
|
185
|
-
const d = c[0];
|
|
186
|
-
return {
|
|
187
|
-
type: "containsText",
|
|
188
|
-
operator: "containsText",
|
|
189
|
-
text: d,
|
|
190
|
-
formulae: [
|
|
191
|
-
`NOT(ISERROR(SEARCH("${r(d)}",${l})))`
|
|
192
|
-
],
|
|
193
|
-
priority: s,
|
|
194
|
-
style: a
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
case "containsText": {
|
|
198
|
-
if (!c[0]) return null;
|
|
199
|
-
const d = c[0];
|
|
200
|
-
return {
|
|
201
|
-
type: "containsText",
|
|
202
|
-
operator: "containsText",
|
|
203
|
-
text: d,
|
|
204
|
-
formulae: [
|
|
205
|
-
`NOT(ISERROR(SEARCH("${r(d)}",${l})))`
|
|
206
|
-
],
|
|
207
|
-
priority: s,
|
|
208
|
-
style: a
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
case "textDoesNotContain": {
|
|
212
|
-
if (!c[0]) return null;
|
|
213
|
-
const d = c[0];
|
|
214
|
-
return {
|
|
215
|
-
type: "notContainsText",
|
|
216
|
-
operator: "notContainsText",
|
|
217
|
-
text: d,
|
|
218
|
-
formulae: [`ISERROR(SEARCH("${r(d)}",${l}))`],
|
|
219
|
-
priority: s,
|
|
220
|
-
style: a
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
case "notContainsText":
|
|
224
|
-
case "notContains": {
|
|
225
|
-
if (!c[0]) return null;
|
|
226
|
-
const d = c[0];
|
|
227
|
-
return {
|
|
228
|
-
type: "notContainsText",
|
|
229
|
-
operator: "notContainsText",
|
|
230
|
-
text: d,
|
|
231
|
-
formulae: [`ISERROR(SEARCH("${r(d)}",${l}))`],
|
|
232
|
-
priority: s,
|
|
233
|
-
style: a
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
case "textStartsWith": {
|
|
237
|
-
if (!c[0]) return null;
|
|
238
|
-
const d = c[0];
|
|
239
|
-
return {
|
|
240
|
-
type: "beginsWith",
|
|
241
|
-
operator: "beginsWith",
|
|
242
|
-
text: d,
|
|
243
|
-
formulae: [
|
|
244
|
-
`LEFT(${l},${d.length})="${r(d)}"`
|
|
245
|
-
],
|
|
246
|
-
priority: s,
|
|
247
|
-
style: a
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
case "beginsWith": {
|
|
251
|
-
if (!c[0]) return null;
|
|
252
|
-
const d = c[0];
|
|
253
|
-
return {
|
|
254
|
-
type: "beginsWith",
|
|
255
|
-
operator: "beginsWith",
|
|
256
|
-
text: d,
|
|
257
|
-
formulae: [
|
|
258
|
-
`LEFT(${l},${d.length})="${r(d)}"`
|
|
259
|
-
],
|
|
260
|
-
priority: s,
|
|
261
|
-
style: a
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
case "textEndsWith": {
|
|
265
|
-
if (!c[0]) return null;
|
|
266
|
-
const d = c[0];
|
|
267
|
-
return {
|
|
268
|
-
type: "endsWith",
|
|
269
|
-
operator: "endsWith",
|
|
270
|
-
text: d,
|
|
271
|
-
formulae: [
|
|
272
|
-
`RIGHT(${l},${d.length})="${r(d)}"`
|
|
273
|
-
],
|
|
274
|
-
priority: s,
|
|
275
|
-
style: a
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
case "endsWith": {
|
|
279
|
-
if (!c[0]) return null;
|
|
280
|
-
const d = c[0];
|
|
281
|
-
return {
|
|
282
|
-
type: "endsWith",
|
|
283
|
-
operator: "endsWith",
|
|
284
|
-
text: d,
|
|
285
|
-
formulae: [
|
|
286
|
-
`RIGHT(${l},${d.length})="${r(d)}"`
|
|
287
|
-
],
|
|
288
|
-
priority: s,
|
|
289
|
-
style: a
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
case "textExactly": {
|
|
293
|
-
if (!c[0]) return null;
|
|
294
|
-
const d = c[0];
|
|
295
|
-
return {
|
|
296
|
-
// Keep this in the text-rule family so Google/OOXML readers preserve it
|
|
297
|
-
// similarly to other text CF rules.
|
|
298
|
-
type: "containsText",
|
|
299
|
-
operator: "equal",
|
|
300
|
-
text: d,
|
|
301
|
-
formulae: [`EXACT(${l},"${r(d)}")`],
|
|
302
|
-
priority: s,
|
|
303
|
-
style: a
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
case "empty":
|
|
307
|
-
return {
|
|
308
|
-
type: "containsText",
|
|
309
|
-
operator: "containsBlanks",
|
|
310
|
-
formulae: [`LEN(TRIM(${l}))=0`],
|
|
311
|
-
priority: s,
|
|
312
|
-
style: a
|
|
313
|
-
};
|
|
314
|
-
case "containsBlanks":
|
|
315
|
-
return {
|
|
316
|
-
type: "containsText",
|
|
317
|
-
operator: "containsBlanks",
|
|
318
|
-
formulae: [`LEN(TRIM(${l}))=0`],
|
|
319
|
-
priority: s,
|
|
320
|
-
style: a
|
|
321
|
-
};
|
|
322
|
-
case "notEmpty":
|
|
323
|
-
return {
|
|
324
|
-
type: "containsText",
|
|
325
|
-
operator: "notContainsBlanks",
|
|
326
|
-
formulae: [`LEN(TRIM(${l}))>0`],
|
|
327
|
-
priority: s,
|
|
328
|
-
style: a
|
|
329
|
-
};
|
|
330
|
-
case "notContainsBlanks":
|
|
331
|
-
return {
|
|
332
|
-
type: "containsText",
|
|
333
|
-
operator: "notContainsBlanks",
|
|
334
|
-
formulae: [`LEN(TRIM(${l}))>0`],
|
|
335
|
-
priority: s,
|
|
336
|
-
style: a
|
|
337
|
-
};
|
|
338
|
-
case "top10":
|
|
339
|
-
return {
|
|
340
|
-
type: "top10",
|
|
341
|
-
rank: parseInt(c[0] || "10", 10) || 10,
|
|
342
|
-
percent: !1,
|
|
343
|
-
bottom: !1,
|
|
344
|
-
priority: s,
|
|
345
|
-
style: a
|
|
346
|
-
};
|
|
347
|
-
case "top10Percent":
|
|
348
|
-
case "top10_percent":
|
|
349
|
-
return {
|
|
350
|
-
type: "top10",
|
|
351
|
-
rank: parseInt(c[0] || "10", 10) || 10,
|
|
352
|
-
percent: !0,
|
|
353
|
-
bottom: !1,
|
|
354
|
-
priority: s,
|
|
355
|
-
style: a
|
|
356
|
-
};
|
|
357
|
-
case "last10":
|
|
358
|
-
return {
|
|
359
|
-
type: "top10",
|
|
360
|
-
rank: parseInt(c[0] || "10", 10) || 10,
|
|
361
|
-
percent: !1,
|
|
362
|
-
bottom: !0,
|
|
363
|
-
priority: s,
|
|
364
|
-
style: a
|
|
365
|
-
};
|
|
366
|
-
case "last10Percent":
|
|
367
|
-
case "last10_percent":
|
|
368
|
-
return {
|
|
369
|
-
type: "top10",
|
|
370
|
-
rank: parseInt(c[0] || "10", 10) || 10,
|
|
371
|
-
percent: !0,
|
|
372
|
-
bottom: !0,
|
|
373
|
-
priority: s,
|
|
374
|
-
style: a
|
|
375
|
-
};
|
|
376
|
-
case "aboveAverage":
|
|
377
|
-
return { type: "aboveAverage", aboveAverage: !0, priority: s, style: a };
|
|
378
|
-
case "belowAverage":
|
|
379
|
-
return { type: "aboveAverage", aboveAverage: !1, priority: s, style: a };
|
|
380
|
-
case "date":
|
|
381
|
-
case "dateIs":
|
|
382
|
-
case "dateBefore":
|
|
383
|
-
case "dateAfter": {
|
|
384
|
-
const d = String(c[0] ?? ""), w = d.startsWith("preset:") ? d.slice(7) : d.toLowerCase();
|
|
385
|
-
return w === "today" || w === "tomorrow" || w === "yesterday" ? { type: "timePeriod", timePeriod: w, priority: s, style: a } : w === "pastWeek" ? { type: "timePeriod", timePeriod: "last7Days", priority: s, style: a } : w === "pastMonth" ? { type: "timePeriod", timePeriod: "lastMonth", priority: s, style: a } : w === "pastYear" ? { type: "timePeriod", timePeriod: "lastYear", priority: s, style: a } : null;
|
|
386
|
-
}
|
|
387
|
-
default:
|
|
388
|
-
return null;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
function Kt(L, K, s) {
|
|
392
|
-
var a;
|
|
393
|
-
const S = K.luckysheet_conditionformat_save, c = [];
|
|
394
|
-
if (!Array.isArray(S) || S.length === 0)
|
|
395
|
-
return { nextPriority: s, pendingDuplicateValues: c };
|
|
396
|
-
let o = s;
|
|
397
|
-
for (const r of S) {
|
|
398
|
-
if (r.type !== "default") continue;
|
|
399
|
-
const l = Gt(r.cellrange);
|
|
400
|
-
if (!l) continue;
|
|
401
|
-
if (r.conditionName === "duplicateValue") {
|
|
402
|
-
const w = String(((a = r.conditionValue) == null ? void 0 : a[0]) ?? "0") === "1" ? "uniqueValues" : "duplicateValues";
|
|
403
|
-
c.push({
|
|
404
|
-
ref: l,
|
|
405
|
-
format: r.format || {},
|
|
406
|
-
priority: o,
|
|
407
|
-
type: w
|
|
408
|
-
}), o++;
|
|
409
|
-
continue;
|
|
410
|
-
}
|
|
411
|
-
const d = Yt(r, l, o);
|
|
412
|
-
d && (L.addConditionalFormatting({ ref: l, rules: [d] }), o++);
|
|
413
|
-
}
|
|
414
|
-
return { nextPriority: o, pendingDuplicateValues: c };
|
|
415
|
-
}
|
|
416
|
-
var Ot = { exports: {} };
|
|
417
|
-
/*!
|
|
418
|
-
|
|
419
|
-
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
|
|
420
|
-
<http://stuartk.com/jszip>
|
|
421
|
-
|
|
422
|
-
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
|
|
423
|
-
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
|
|
424
|
-
|
|
425
|
-
JSZip uses the library pako released under the MIT license :
|
|
426
|
-
https://github.com/nodeca/pako/blob/main/LICENSE
|
|
427
|
-
*/
|
|
428
|
-
(function(L, K) {
|
|
429
|
-
(function(s) {
|
|
430
|
-
L.exports = s();
|
|
431
|
-
})(function() {
|
|
432
|
-
return function s(S, c, o) {
|
|
433
|
-
function a(d, w) {
|
|
434
|
-
if (!c[d]) {
|
|
435
|
-
if (!S[d]) {
|
|
436
|
-
var g = typeof Ct == "function" && Ct;
|
|
437
|
-
if (!w && g) return g(d, !0);
|
|
438
|
-
if (r) return r(d, !0);
|
|
439
|
-
var y = new Error("Cannot find module '" + d + "'");
|
|
440
|
-
throw y.code = "MODULE_NOT_FOUND", y;
|
|
441
|
-
}
|
|
442
|
-
var n = c[d] = { exports: {} };
|
|
443
|
-
S[d][0].call(n.exports, function(p) {
|
|
444
|
-
var i = S[d][1][p];
|
|
445
|
-
return a(i || p);
|
|
446
|
-
}, n, n.exports, s, S, c, o);
|
|
447
|
-
}
|
|
448
|
-
return c[d].exports;
|
|
449
|
-
}
|
|
450
|
-
for (var r = typeof Ct == "function" && Ct, l = 0; l < o.length; l++) a(o[l]);
|
|
451
|
-
return a;
|
|
452
|
-
}({ 1: [function(s, S, c) {
|
|
453
|
-
var o = s("./utils"), a = s("./support"), r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
454
|
-
c.encode = function(l) {
|
|
455
|
-
for (var d, w, g, y, n, p, i, h = [], u = 0, _ = l.length, k = _, A = o.getTypeOf(l) !== "string"; u < l.length; ) k = _ - u, g = A ? (d = l[u++], w = u < _ ? l[u++] : 0, u < _ ? l[u++] : 0) : (d = l.charCodeAt(u++), w = u < _ ? l.charCodeAt(u++) : 0, u < _ ? l.charCodeAt(u++) : 0), y = d >> 2, n = (3 & d) << 4 | w >> 4, p = 1 < k ? (15 & w) << 2 | g >> 6 : 64, i = 2 < k ? 63 & g : 64, h.push(r.charAt(y) + r.charAt(n) + r.charAt(p) + r.charAt(i));
|
|
456
|
-
return h.join("");
|
|
457
|
-
}, c.decode = function(l) {
|
|
458
|
-
var d, w, g, y, n, p, i = 0, h = 0, u = "data:";
|
|
459
|
-
if (l.substr(0, u.length) === u) throw new Error("Invalid base64 input, it looks like a data url.");
|
|
460
|
-
var _, k = 3 * (l = l.replace(/[^A-Za-z0-9+/=]/g, "")).length / 4;
|
|
461
|
-
if (l.charAt(l.length - 1) === r.charAt(64) && k--, l.charAt(l.length - 2) === r.charAt(64) && k--, k % 1 != 0) throw new Error("Invalid base64 input, bad content length.");
|
|
462
|
-
for (_ = a.uint8array ? new Uint8Array(0 | k) : new Array(0 | k); i < l.length; ) d = r.indexOf(l.charAt(i++)) << 2 | (y = r.indexOf(l.charAt(i++))) >> 4, w = (15 & y) << 4 | (n = r.indexOf(l.charAt(i++))) >> 2, g = (3 & n) << 6 | (p = r.indexOf(l.charAt(i++))), _[h++] = d, n !== 64 && (_[h++] = w), p !== 64 && (_[h++] = g);
|
|
463
|
-
return _;
|
|
464
|
-
};
|
|
465
|
-
}, { "./support": 30, "./utils": 32 }], 2: [function(s, S, c) {
|
|
466
|
-
var o = s("./external"), a = s("./stream/DataWorker"), r = s("./stream/Crc32Probe"), l = s("./stream/DataLengthProbe");
|
|
467
|
-
function d(w, g, y, n, p) {
|
|
468
|
-
this.compressedSize = w, this.uncompressedSize = g, this.crc32 = y, this.compression = n, this.compressedContent = p;
|
|
469
|
-
}
|
|
470
|
-
d.prototype = { getContentWorker: function() {
|
|
471
|
-
var w = new a(o.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new l("data_length")), g = this;
|
|
472
|
-
return w.on("end", function() {
|
|
473
|
-
if (this.streamInfo.data_length !== g.uncompressedSize) throw new Error("Bug : uncompressed data size mismatch");
|
|
474
|
-
}), w;
|
|
475
|
-
}, getCompressedWorker: function() {
|
|
476
|
-
return new a(o.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression);
|
|
477
|
-
} }, d.createWorkerFrom = function(w, g, y) {
|
|
478
|
-
return w.pipe(new r()).pipe(new l("uncompressedSize")).pipe(g.compressWorker(y)).pipe(new l("compressedSize")).withStreamInfo("compression", g);
|
|
479
|
-
}, S.exports = d;
|
|
480
|
-
}, { "./external": 6, "./stream/Crc32Probe": 25, "./stream/DataLengthProbe": 26, "./stream/DataWorker": 27 }], 3: [function(s, S, c) {
|
|
481
|
-
var o = s("./stream/GenericWorker");
|
|
482
|
-
c.STORE = { magic: "\0\0", compressWorker: function() {
|
|
483
|
-
return new o("STORE compression");
|
|
484
|
-
}, uncompressWorker: function() {
|
|
485
|
-
return new o("STORE decompression");
|
|
486
|
-
} }, c.DEFLATE = s("./flate");
|
|
487
|
-
}, { "./flate": 7, "./stream/GenericWorker": 28 }], 4: [function(s, S, c) {
|
|
488
|
-
var o = s("./utils"), a = function() {
|
|
489
|
-
for (var r, l = [], d = 0; d < 256; d++) {
|
|
490
|
-
r = d;
|
|
491
|
-
for (var w = 0; w < 8; w++) r = 1 & r ? 3988292384 ^ r >>> 1 : r >>> 1;
|
|
492
|
-
l[d] = r;
|
|
493
|
-
}
|
|
494
|
-
return l;
|
|
495
|
-
}();
|
|
496
|
-
S.exports = function(r, l) {
|
|
497
|
-
return r !== void 0 && r.length ? o.getTypeOf(r) !== "string" ? function(d, w, g, y) {
|
|
498
|
-
var n = a, p = y + g;
|
|
499
|
-
d ^= -1;
|
|
500
|
-
for (var i = y; i < p; i++) d = d >>> 8 ^ n[255 & (d ^ w[i])];
|
|
501
|
-
return -1 ^ d;
|
|
502
|
-
}(0 | l, r, r.length, 0) : function(d, w, g, y) {
|
|
503
|
-
var n = a, p = y + g;
|
|
504
|
-
d ^= -1;
|
|
505
|
-
for (var i = y; i < p; i++) d = d >>> 8 ^ n[255 & (d ^ w.charCodeAt(i))];
|
|
506
|
-
return -1 ^ d;
|
|
507
|
-
}(0 | l, r, r.length, 0) : 0;
|
|
508
|
-
};
|
|
509
|
-
}, { "./utils": 32 }], 5: [function(s, S, c) {
|
|
510
|
-
c.base64 = !1, c.binary = !1, c.dir = !1, c.createFolders = !0, c.date = null, c.compression = null, c.compressionOptions = null, c.comment = null, c.unixPermissions = null, c.dosPermissions = null;
|
|
511
|
-
}, {}], 6: [function(s, S, c) {
|
|
512
|
-
var o = null;
|
|
513
|
-
o = typeof Promise < "u" ? Promise : s("lie"), S.exports = { Promise: o };
|
|
514
|
-
}, { lie: 37 }], 7: [function(s, S, c) {
|
|
515
|
-
var o = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Uint32Array < "u", a = s("pako"), r = s("./utils"), l = s("./stream/GenericWorker"), d = o ? "uint8array" : "array";
|
|
516
|
-
function w(g, y) {
|
|
517
|
-
l.call(this, "FlateWorker/" + g), this._pako = null, this._pakoAction = g, this._pakoOptions = y, this.meta = {};
|
|
518
|
-
}
|
|
519
|
-
c.magic = "\b\0", r.inherits(w, l), w.prototype.processChunk = function(g) {
|
|
520
|
-
this.meta = g.meta, this._pako === null && this._createPako(), this._pako.push(r.transformTo(d, g.data), !1);
|
|
521
|
-
}, w.prototype.flush = function() {
|
|
522
|
-
l.prototype.flush.call(this), this._pako === null && this._createPako(), this._pako.push([], !0);
|
|
523
|
-
}, w.prototype.cleanUp = function() {
|
|
524
|
-
l.prototype.cleanUp.call(this), this._pako = null;
|
|
525
|
-
}, w.prototype._createPako = function() {
|
|
526
|
-
this._pako = new a[this._pakoAction]({ raw: !0, level: this._pakoOptions.level || -1 });
|
|
527
|
-
var g = this;
|
|
528
|
-
this._pako.onData = function(y) {
|
|
529
|
-
g.push({ data: y, meta: g.meta });
|
|
530
|
-
};
|
|
531
|
-
}, c.compressWorker = function(g) {
|
|
532
|
-
return new w("Deflate", g);
|
|
533
|
-
}, c.uncompressWorker = function() {
|
|
534
|
-
return new w("Inflate", {});
|
|
535
|
-
};
|
|
536
|
-
}, { "./stream/GenericWorker": 28, "./utils": 32, pako: 38 }], 8: [function(s, S, c) {
|
|
537
|
-
function o(n, p) {
|
|
538
|
-
var i, h = "";
|
|
539
|
-
for (i = 0; i < p; i++) h += String.fromCharCode(255 & n), n >>>= 8;
|
|
540
|
-
return h;
|
|
541
|
-
}
|
|
542
|
-
function a(n, p, i, h, u, _) {
|
|
543
|
-
var k, A, E = n.file, U = n.compression, B = _ !== d.utf8encode, D = r.transformTo("string", _(E.name)), R = r.transformTo("string", d.utf8encode(E.name)), Z = E.comment, Y = r.transformTo("string", _(Z)), b = r.transformTo("string", d.utf8encode(Z)), O = R.length !== E.name.length, e = b.length !== Z.length, F = "", Q = "", W = "", et = E.dir, I = E.date, q = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
544
|
-
p && !i || (q.crc32 = n.crc32, q.compressedSize = n.compressedSize, q.uncompressedSize = n.uncompressedSize);
|
|
545
|
-
var x = 0;
|
|
546
|
-
p && (x |= 8), B || !O && !e || (x |= 2048);
|
|
547
|
-
var v = 0, G = 0;
|
|
548
|
-
et && (v |= 16), u === "UNIX" ? (G = 798, v |= function($, rt) {
|
|
549
|
-
var at = $;
|
|
550
|
-
return $ || (at = rt ? 16893 : 33204), (65535 & at) << 16;
|
|
551
|
-
}(E.unixPermissions, et)) : (G = 20, v |= function($) {
|
|
552
|
-
return 63 & ($ || 0);
|
|
553
|
-
}(E.dosPermissions)), k = I.getUTCHours(), k <<= 6, k |= I.getUTCMinutes(), k <<= 5, k |= I.getUTCSeconds() / 2, A = I.getUTCFullYear() - 1980, A <<= 4, A |= I.getUTCMonth() + 1, A <<= 5, A |= I.getUTCDate(), O && (Q = o(1, 1) + o(w(D), 4) + R, F += "up" + o(Q.length, 2) + Q), e && (W = o(1, 1) + o(w(Y), 4) + b, F += "uc" + o(W.length, 2) + W);
|
|
554
|
-
var N = "";
|
|
555
|
-
return N += `
|
|
556
|
-
\0`, N += o(x, 2), N += U.magic, N += o(k, 2), N += o(A, 2), N += o(q.crc32, 4), N += o(q.compressedSize, 4), N += o(q.uncompressedSize, 4), N += o(D.length, 2), N += o(F.length, 2), { fileRecord: g.LOCAL_FILE_HEADER + N + D + F, dirRecord: g.CENTRAL_FILE_HEADER + o(G, 2) + N + o(Y.length, 2) + "\0\0\0\0" + o(v, 4) + o(h, 4) + D + F + Y };
|
|
557
|
-
}
|
|
558
|
-
var r = s("../utils"), l = s("../stream/GenericWorker"), d = s("../utf8"), w = s("../crc32"), g = s("../signature");
|
|
559
|
-
function y(n, p, i, h) {
|
|
560
|
-
l.call(this, "ZipFileWorker"), this.bytesWritten = 0, this.zipComment = p, this.zipPlatform = i, this.encodeFileName = h, this.streamFiles = n, this.accumulate = !1, this.contentBuffer = [], this.dirRecords = [], this.currentSourceOffset = 0, this.entriesCount = 0, this.currentFile = null, this._sources = [];
|
|
561
|
-
}
|
|
562
|
-
r.inherits(y, l), y.prototype.push = function(n) {
|
|
563
|
-
var p = n.meta.percent || 0, i = this.entriesCount, h = this._sources.length;
|
|
564
|
-
this.accumulate ? this.contentBuffer.push(n) : (this.bytesWritten += n.data.length, l.prototype.push.call(this, { data: n.data, meta: { currentFile: this.currentFile, percent: i ? (p + 100 * (i - h - 1)) / i : 100 } }));
|
|
565
|
-
}, y.prototype.openedSource = function(n) {
|
|
566
|
-
this.currentSourceOffset = this.bytesWritten, this.currentFile = n.file.name;
|
|
567
|
-
var p = this.streamFiles && !n.file.dir;
|
|
568
|
-
if (p) {
|
|
569
|
-
var i = a(n, p, !1, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
570
|
-
this.push({ data: i.fileRecord, meta: { percent: 0 } });
|
|
571
|
-
} else this.accumulate = !0;
|
|
572
|
-
}, y.prototype.closedSource = function(n) {
|
|
573
|
-
this.accumulate = !1;
|
|
574
|
-
var p = this.streamFiles && !n.file.dir, i = a(n, p, !0, this.currentSourceOffset, this.zipPlatform, this.encodeFileName);
|
|
575
|
-
if (this.dirRecords.push(i.dirRecord), p) this.push({ data: function(h) {
|
|
576
|
-
return g.DATA_DESCRIPTOR + o(h.crc32, 4) + o(h.compressedSize, 4) + o(h.uncompressedSize, 4);
|
|
577
|
-
}(n), meta: { percent: 100 } });
|
|
578
|
-
else for (this.push({ data: i.fileRecord, meta: { percent: 0 } }); this.contentBuffer.length; ) this.push(this.contentBuffer.shift());
|
|
579
|
-
this.currentFile = null;
|
|
580
|
-
}, y.prototype.flush = function() {
|
|
581
|
-
for (var n = this.bytesWritten, p = 0; p < this.dirRecords.length; p++) this.push({ data: this.dirRecords[p], meta: { percent: 100 } });
|
|
582
|
-
var i = this.bytesWritten - n, h = function(u, _, k, A, E) {
|
|
583
|
-
var U = r.transformTo("string", E(A));
|
|
584
|
-
return g.CENTRAL_DIRECTORY_END + "\0\0\0\0" + o(u, 2) + o(u, 2) + o(_, 4) + o(k, 4) + o(U.length, 2) + U;
|
|
585
|
-
}(this.dirRecords.length, i, n, this.zipComment, this.encodeFileName);
|
|
586
|
-
this.push({ data: h, meta: { percent: 100 } });
|
|
587
|
-
}, y.prototype.prepareNextSource = function() {
|
|
588
|
-
this.previous = this._sources.shift(), this.openedSource(this.previous.streamInfo), this.isPaused ? this.previous.pause() : this.previous.resume();
|
|
589
|
-
}, y.prototype.registerPrevious = function(n) {
|
|
590
|
-
this._sources.push(n);
|
|
591
|
-
var p = this;
|
|
592
|
-
return n.on("data", function(i) {
|
|
593
|
-
p.processChunk(i);
|
|
594
|
-
}), n.on("end", function() {
|
|
595
|
-
p.closedSource(p.previous.streamInfo), p._sources.length ? p.prepareNextSource() : p.end();
|
|
596
|
-
}), n.on("error", function(i) {
|
|
597
|
-
p.error(i);
|
|
598
|
-
}), this;
|
|
599
|
-
}, y.prototype.resume = function() {
|
|
600
|
-
return !!l.prototype.resume.call(this) && (!this.previous && this._sources.length ? (this.prepareNextSource(), !0) : this.previous || this._sources.length || this.generatedError ? void 0 : (this.end(), !0));
|
|
601
|
-
}, y.prototype.error = function(n) {
|
|
602
|
-
var p = this._sources;
|
|
603
|
-
if (!l.prototype.error.call(this, n)) return !1;
|
|
604
|
-
for (var i = 0; i < p.length; i++) try {
|
|
605
|
-
p[i].error(n);
|
|
606
|
-
} catch {
|
|
607
|
-
}
|
|
608
|
-
return !0;
|
|
609
|
-
}, y.prototype.lock = function() {
|
|
610
|
-
l.prototype.lock.call(this);
|
|
611
|
-
for (var n = this._sources, p = 0; p < n.length; p++) n[p].lock();
|
|
612
|
-
}, S.exports = y;
|
|
613
|
-
}, { "../crc32": 4, "../signature": 23, "../stream/GenericWorker": 28, "../utf8": 31, "../utils": 32 }], 9: [function(s, S, c) {
|
|
614
|
-
var o = s("../compressions"), a = s("./ZipFileWorker");
|
|
615
|
-
c.generateWorker = function(r, l, d) {
|
|
616
|
-
var w = new a(l.streamFiles, d, l.platform, l.encodeFileName), g = 0;
|
|
617
|
-
try {
|
|
618
|
-
r.forEach(function(y, n) {
|
|
619
|
-
g++;
|
|
620
|
-
var p = function(_, k) {
|
|
621
|
-
var A = _ || k, E = o[A];
|
|
622
|
-
if (!E) throw new Error(A + " is not a valid compression method !");
|
|
623
|
-
return E;
|
|
624
|
-
}(n.options.compression, l.compression), i = n.options.compressionOptions || l.compressionOptions || {}, h = n.dir, u = n.date;
|
|
625
|
-
n._compressWorker(p, i).withStreamInfo("file", { name: y, dir: h, date: u, comment: n.comment || "", unixPermissions: n.unixPermissions, dosPermissions: n.dosPermissions }).pipe(w);
|
|
626
|
-
}), w.entriesCount = g;
|
|
627
|
-
} catch (y) {
|
|
628
|
-
w.error(y);
|
|
629
|
-
}
|
|
630
|
-
return w;
|
|
631
|
-
};
|
|
632
|
-
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(s, S, c) {
|
|
633
|
-
function o() {
|
|
634
|
-
if (!(this instanceof o)) return new o();
|
|
635
|
-
if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
636
|
-
this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
|
|
637
|
-
var a = new o();
|
|
638
|
-
for (var r in this) typeof this[r] != "function" && (a[r] = this[r]);
|
|
639
|
-
return a;
|
|
640
|
-
};
|
|
641
|
-
}
|
|
642
|
-
(o.prototype = s("./object")).loadAsync = s("./load"), o.support = s("./support"), o.defaults = s("./defaults"), o.version = "3.10.1", o.loadAsync = function(a, r) {
|
|
643
|
-
return new o().loadAsync(a, r);
|
|
644
|
-
}, o.external = s("./external"), S.exports = o;
|
|
645
|
-
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(s, S, c) {
|
|
646
|
-
var o = s("./utils"), a = s("./external"), r = s("./utf8"), l = s("./zipEntries"), d = s("./stream/Crc32Probe"), w = s("./nodejsUtils");
|
|
647
|
-
function g(y) {
|
|
648
|
-
return new a.Promise(function(n, p) {
|
|
649
|
-
var i = y.decompressed.getContentWorker().pipe(new d());
|
|
650
|
-
i.on("error", function(h) {
|
|
651
|
-
p(h);
|
|
652
|
-
}).on("end", function() {
|
|
653
|
-
i.streamInfo.crc32 !== y.decompressed.crc32 ? p(new Error("Corrupted zip : CRC32 mismatch")) : n();
|
|
654
|
-
}).resume();
|
|
655
|
-
});
|
|
656
|
-
}
|
|
657
|
-
S.exports = function(y, n) {
|
|
658
|
-
var p = this;
|
|
659
|
-
return n = o.extend(n || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: r.utf8decode }), w.isNode && w.isStream(y) ? a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : o.prepareContent("the loaded zip file", y, !0, n.optimizedBinaryString, n.base64).then(function(i) {
|
|
660
|
-
var h = new l(n);
|
|
661
|
-
return h.load(i), h;
|
|
662
|
-
}).then(function(i) {
|
|
663
|
-
var h = [a.Promise.resolve(i)], u = i.files;
|
|
664
|
-
if (n.checkCRC32) for (var _ = 0; _ < u.length; _++) h.push(g(u[_]));
|
|
665
|
-
return a.Promise.all(h);
|
|
666
|
-
}).then(function(i) {
|
|
667
|
-
for (var h = i.shift(), u = h.files, _ = 0; _ < u.length; _++) {
|
|
668
|
-
var k = u[_], A = k.fileNameStr, E = o.resolve(k.fileNameStr);
|
|
669
|
-
p.file(E, k.decompressed, { binary: !0, optimizedBinaryString: !0, date: k.date, dir: k.dir, comment: k.fileCommentStr.length ? k.fileCommentStr : null, unixPermissions: k.unixPermissions, dosPermissions: k.dosPermissions, createFolders: n.createFolders }), k.dir || (p.file(E).unsafeOriginalName = A);
|
|
670
|
-
}
|
|
671
|
-
return h.zipComment.length && (p.comment = h.zipComment), p;
|
|
672
|
-
});
|
|
673
|
-
};
|
|
674
|
-
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(s, S, c) {
|
|
675
|
-
var o = s("../utils"), a = s("../stream/GenericWorker");
|
|
676
|
-
function r(l, d) {
|
|
677
|
-
a.call(this, "Nodejs stream input adapter for " + l), this._upstreamEnded = !1, this._bindStream(d);
|
|
678
|
-
}
|
|
679
|
-
o.inherits(r, a), r.prototype._bindStream = function(l) {
|
|
680
|
-
var d = this;
|
|
681
|
-
(this._stream = l).pause(), l.on("data", function(w) {
|
|
682
|
-
d.push({ data: w, meta: { percent: 0 } });
|
|
683
|
-
}).on("error", function(w) {
|
|
684
|
-
d.isPaused ? this.generatedError = w : d.error(w);
|
|
685
|
-
}).on("end", function() {
|
|
686
|
-
d.isPaused ? d._upstreamEnded = !0 : d.end();
|
|
687
|
-
});
|
|
688
|
-
}, r.prototype.pause = function() {
|
|
689
|
-
return !!a.prototype.pause.call(this) && (this._stream.pause(), !0);
|
|
690
|
-
}, r.prototype.resume = function() {
|
|
691
|
-
return !!a.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
|
|
692
|
-
}, S.exports = r;
|
|
693
|
-
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(s, S, c) {
|
|
694
|
-
var o = s("readable-stream").Readable;
|
|
695
|
-
function a(r, l, d) {
|
|
696
|
-
o.call(this, l), this._helper = r;
|
|
697
|
-
var w = this;
|
|
698
|
-
r.on("data", function(g, y) {
|
|
699
|
-
w.push(g) || w._helper.pause(), d && d(y);
|
|
700
|
-
}).on("error", function(g) {
|
|
701
|
-
w.emit("error", g);
|
|
702
|
-
}).on("end", function() {
|
|
703
|
-
w.push(null);
|
|
704
|
-
});
|
|
705
|
-
}
|
|
706
|
-
s("../utils").inherits(a, o), a.prototype._read = function() {
|
|
707
|
-
this._helper.resume();
|
|
708
|
-
}, S.exports = a;
|
|
709
|
-
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(s, S, c) {
|
|
710
|
-
S.exports = { isNode: typeof Buffer < "u", newBufferFrom: function(o, a) {
|
|
711
|
-
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(o, a);
|
|
712
|
-
if (typeof o == "number") throw new Error('The "data" argument must not be a number');
|
|
713
|
-
return new Buffer(o, a);
|
|
714
|
-
}, allocBuffer: function(o) {
|
|
715
|
-
if (Buffer.alloc) return Buffer.alloc(o);
|
|
716
|
-
var a = new Buffer(o);
|
|
717
|
-
return a.fill(0), a;
|
|
718
|
-
}, isBuffer: function(o) {
|
|
719
|
-
return Buffer.isBuffer(o);
|
|
720
|
-
}, isStream: function(o) {
|
|
721
|
-
return o && typeof o.on == "function" && typeof o.pause == "function" && typeof o.resume == "function";
|
|
722
|
-
} };
|
|
723
|
-
}, {}], 15: [function(s, S, c) {
|
|
724
|
-
function o(E, U, B) {
|
|
725
|
-
var D, R = r.getTypeOf(U), Z = r.extend(B || {}, w);
|
|
726
|
-
Z.date = Z.date || /* @__PURE__ */ new Date(), Z.compression !== null && (Z.compression = Z.compression.toUpperCase()), typeof Z.unixPermissions == "string" && (Z.unixPermissions = parseInt(Z.unixPermissions, 8)), Z.unixPermissions && 16384 & Z.unixPermissions && (Z.dir = !0), Z.dosPermissions && 16 & Z.dosPermissions && (Z.dir = !0), Z.dir && (E = u(E)), Z.createFolders && (D = h(E)) && _.call(this, D, !0);
|
|
727
|
-
var Y = R === "string" && Z.binary === !1 && Z.base64 === !1;
|
|
728
|
-
B && B.binary !== void 0 || (Z.binary = !Y), (U instanceof g && U.uncompressedSize === 0 || Z.dir || !U || U.length === 0) && (Z.base64 = !1, Z.binary = !0, U = "", Z.compression = "STORE", R = "string");
|
|
729
|
-
var b = null;
|
|
730
|
-
b = U instanceof g || U instanceof l ? U : p.isNode && p.isStream(U) ? new i(E, U) : r.prepareContent(E, U, Z.binary, Z.optimizedBinaryString, Z.base64);
|
|
731
|
-
var O = new y(E, b, Z);
|
|
732
|
-
this.files[E] = O;
|
|
733
|
-
}
|
|
734
|
-
var a = s("./utf8"), r = s("./utils"), l = s("./stream/GenericWorker"), d = s("./stream/StreamHelper"), w = s("./defaults"), g = s("./compressedObject"), y = s("./zipObject"), n = s("./generate"), p = s("./nodejsUtils"), i = s("./nodejs/NodejsStreamInputAdapter"), h = function(E) {
|
|
735
|
-
E.slice(-1) === "/" && (E = E.substring(0, E.length - 1));
|
|
736
|
-
var U = E.lastIndexOf("/");
|
|
737
|
-
return 0 < U ? E.substring(0, U) : "";
|
|
738
|
-
}, u = function(E) {
|
|
739
|
-
return E.slice(-1) !== "/" && (E += "/"), E;
|
|
740
|
-
}, _ = function(E, U) {
|
|
741
|
-
return U = U !== void 0 ? U : w.createFolders, E = u(E), this.files[E] || o.call(this, E, null, { dir: !0, createFolders: U }), this.files[E];
|
|
742
|
-
};
|
|
743
|
-
function k(E) {
|
|
744
|
-
return Object.prototype.toString.call(E) === "[object RegExp]";
|
|
745
|
-
}
|
|
746
|
-
var A = { load: function() {
|
|
747
|
-
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
748
|
-
}, forEach: function(E) {
|
|
749
|
-
var U, B, D;
|
|
750
|
-
for (U in this.files) D = this.files[U], (B = U.slice(this.root.length, U.length)) && U.slice(0, this.root.length) === this.root && E(B, D);
|
|
751
|
-
}, filter: function(E) {
|
|
752
|
-
var U = [];
|
|
753
|
-
return this.forEach(function(B, D) {
|
|
754
|
-
E(B, D) && U.push(D);
|
|
755
|
-
}), U;
|
|
756
|
-
}, file: function(E, U, B) {
|
|
757
|
-
if (arguments.length !== 1) return E = this.root + E, o.call(this, E, U, B), this;
|
|
758
|
-
if (k(E)) {
|
|
759
|
-
var D = E;
|
|
760
|
-
return this.filter(function(Z, Y) {
|
|
761
|
-
return !Y.dir && D.test(Z);
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
var R = this.files[this.root + E];
|
|
765
|
-
return R && !R.dir ? R : null;
|
|
766
|
-
}, folder: function(E) {
|
|
767
|
-
if (!E) return this;
|
|
768
|
-
if (k(E)) return this.filter(function(R, Z) {
|
|
769
|
-
return Z.dir && E.test(R);
|
|
770
|
-
});
|
|
771
|
-
var U = this.root + E, B = _.call(this, U), D = this.clone();
|
|
772
|
-
return D.root = B.name, D;
|
|
773
|
-
}, remove: function(E) {
|
|
774
|
-
E = this.root + E;
|
|
775
|
-
var U = this.files[E];
|
|
776
|
-
if (U || (E.slice(-1) !== "/" && (E += "/"), U = this.files[E]), U && !U.dir) delete this.files[E];
|
|
777
|
-
else for (var B = this.filter(function(R, Z) {
|
|
778
|
-
return Z.name.slice(0, E.length) === E;
|
|
779
|
-
}), D = 0; D < B.length; D++) delete this.files[B[D].name];
|
|
780
|
-
return this;
|
|
781
|
-
}, generate: function() {
|
|
782
|
-
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
783
|
-
}, generateInternalStream: function(E) {
|
|
784
|
-
var U, B = {};
|
|
785
|
-
try {
|
|
786
|
-
if ((B = r.extend(E || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: a.utf8encode })).type = B.type.toLowerCase(), B.compression = B.compression.toUpperCase(), B.type === "binarystring" && (B.type = "string"), !B.type) throw new Error("No output type specified.");
|
|
787
|
-
r.checkSupport(B.type), B.platform !== "darwin" && B.platform !== "freebsd" && B.platform !== "linux" && B.platform !== "sunos" || (B.platform = "UNIX"), B.platform === "win32" && (B.platform = "DOS");
|
|
788
|
-
var D = B.comment || this.comment || "";
|
|
789
|
-
U = n.generateWorker(this, B, D);
|
|
790
|
-
} catch (R) {
|
|
791
|
-
(U = new l("error")).error(R);
|
|
792
|
-
}
|
|
793
|
-
return new d(U, B.type || "string", B.mimeType);
|
|
794
|
-
}, generateAsync: function(E, U) {
|
|
795
|
-
return this.generateInternalStream(E).accumulate(U);
|
|
796
|
-
}, generateNodeStream: function(E, U) {
|
|
797
|
-
return (E = E || {}).type || (E.type = "nodebuffer"), this.generateInternalStream(E).toNodejsStream(U);
|
|
798
|
-
} };
|
|
799
|
-
S.exports = A;
|
|
800
|
-
}, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(s, S, c) {
|
|
801
|
-
S.exports = s("stream");
|
|
802
|
-
}, { stream: void 0 }], 17: [function(s, S, c) {
|
|
803
|
-
var o = s("./DataReader");
|
|
804
|
-
function a(r) {
|
|
805
|
-
o.call(this, r);
|
|
806
|
-
for (var l = 0; l < this.data.length; l++) r[l] = 255 & r[l];
|
|
807
|
-
}
|
|
808
|
-
s("../utils").inherits(a, o), a.prototype.byteAt = function(r) {
|
|
809
|
-
return this.data[this.zero + r];
|
|
810
|
-
}, a.prototype.lastIndexOfSignature = function(r) {
|
|
811
|
-
for (var l = r.charCodeAt(0), d = r.charCodeAt(1), w = r.charCodeAt(2), g = r.charCodeAt(3), y = this.length - 4; 0 <= y; --y) if (this.data[y] === l && this.data[y + 1] === d && this.data[y + 2] === w && this.data[y + 3] === g) return y - this.zero;
|
|
812
|
-
return -1;
|
|
813
|
-
}, a.prototype.readAndCheckSignature = function(r) {
|
|
814
|
-
var l = r.charCodeAt(0), d = r.charCodeAt(1), w = r.charCodeAt(2), g = r.charCodeAt(3), y = this.readData(4);
|
|
815
|
-
return l === y[0] && d === y[1] && w === y[2] && g === y[3];
|
|
816
|
-
}, a.prototype.readData = function(r) {
|
|
817
|
-
if (this.checkOffset(r), r === 0) return [];
|
|
818
|
-
var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
819
|
-
return this.index += r, l;
|
|
820
|
-
}, S.exports = a;
|
|
821
|
-
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(s, S, c) {
|
|
822
|
-
var o = s("../utils");
|
|
823
|
-
function a(r) {
|
|
824
|
-
this.data = r, this.length = r.length, this.index = 0, this.zero = 0;
|
|
825
|
-
}
|
|
826
|
-
a.prototype = { checkOffset: function(r) {
|
|
827
|
-
this.checkIndex(this.index + r);
|
|
828
|
-
}, checkIndex: function(r) {
|
|
829
|
-
if (this.length < this.zero + r || r < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + r + "). Corrupted zip ?");
|
|
830
|
-
}, setIndex: function(r) {
|
|
831
|
-
this.checkIndex(r), this.index = r;
|
|
832
|
-
}, skip: function(r) {
|
|
833
|
-
this.setIndex(this.index + r);
|
|
834
|
-
}, byteAt: function() {
|
|
835
|
-
}, readInt: function(r) {
|
|
836
|
-
var l, d = 0;
|
|
837
|
-
for (this.checkOffset(r), l = this.index + r - 1; l >= this.index; l--) d = (d << 8) + this.byteAt(l);
|
|
838
|
-
return this.index += r, d;
|
|
839
|
-
}, readString: function(r) {
|
|
840
|
-
return o.transformTo("string", this.readData(r));
|
|
841
|
-
}, readData: function() {
|
|
842
|
-
}, lastIndexOfSignature: function() {
|
|
843
|
-
}, readAndCheckSignature: function() {
|
|
844
|
-
}, readDate: function() {
|
|
845
|
-
var r = this.readInt(4);
|
|
846
|
-
return new Date(Date.UTC(1980 + (r >> 25 & 127), (r >> 21 & 15) - 1, r >> 16 & 31, r >> 11 & 31, r >> 5 & 63, (31 & r) << 1));
|
|
847
|
-
} }, S.exports = a;
|
|
848
|
-
}, { "../utils": 32 }], 19: [function(s, S, c) {
|
|
849
|
-
var o = s("./Uint8ArrayReader");
|
|
850
|
-
function a(r) {
|
|
851
|
-
o.call(this, r);
|
|
852
|
-
}
|
|
853
|
-
s("../utils").inherits(a, o), a.prototype.readData = function(r) {
|
|
854
|
-
this.checkOffset(r);
|
|
855
|
-
var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
856
|
-
return this.index += r, l;
|
|
857
|
-
}, S.exports = a;
|
|
858
|
-
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(s, S, c) {
|
|
859
|
-
var o = s("./DataReader");
|
|
860
|
-
function a(r) {
|
|
861
|
-
o.call(this, r);
|
|
862
|
-
}
|
|
863
|
-
s("../utils").inherits(a, o), a.prototype.byteAt = function(r) {
|
|
864
|
-
return this.data.charCodeAt(this.zero + r);
|
|
865
|
-
}, a.prototype.lastIndexOfSignature = function(r) {
|
|
866
|
-
return this.data.lastIndexOf(r) - this.zero;
|
|
867
|
-
}, a.prototype.readAndCheckSignature = function(r) {
|
|
868
|
-
return r === this.readData(4);
|
|
869
|
-
}, a.prototype.readData = function(r) {
|
|
870
|
-
this.checkOffset(r);
|
|
871
|
-
var l = this.data.slice(this.zero + this.index, this.zero + this.index + r);
|
|
872
|
-
return this.index += r, l;
|
|
873
|
-
}, S.exports = a;
|
|
874
|
-
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(s, S, c) {
|
|
875
|
-
var o = s("./ArrayReader");
|
|
876
|
-
function a(r) {
|
|
877
|
-
o.call(this, r);
|
|
878
|
-
}
|
|
879
|
-
s("../utils").inherits(a, o), a.prototype.readData = function(r) {
|
|
880
|
-
if (this.checkOffset(r), r === 0) return new Uint8Array(0);
|
|
881
|
-
var l = this.data.subarray(this.zero + this.index, this.zero + this.index + r);
|
|
882
|
-
return this.index += r, l;
|
|
883
|
-
}, S.exports = a;
|
|
884
|
-
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(s, S, c) {
|
|
885
|
-
var o = s("../utils"), a = s("../support"), r = s("./ArrayReader"), l = s("./StringReader"), d = s("./NodeBufferReader"), w = s("./Uint8ArrayReader");
|
|
886
|
-
S.exports = function(g) {
|
|
887
|
-
var y = o.getTypeOf(g);
|
|
888
|
-
return o.checkSupport(y), y !== "string" || a.uint8array ? y === "nodebuffer" ? new d(g) : a.uint8array ? new w(o.transformTo("uint8array", g)) : new r(o.transformTo("array", g)) : new l(g);
|
|
889
|
-
};
|
|
890
|
-
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(s, S, c) {
|
|
891
|
-
c.LOCAL_FILE_HEADER = "PK", c.CENTRAL_FILE_HEADER = "PK", c.CENTRAL_DIRECTORY_END = "PK", c.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", c.ZIP64_CENTRAL_DIRECTORY_END = "PK", c.DATA_DESCRIPTOR = "PK\x07\b";
|
|
892
|
-
}, {}], 24: [function(s, S, c) {
|
|
893
|
-
var o = s("./GenericWorker"), a = s("../utils");
|
|
894
|
-
function r(l) {
|
|
895
|
-
o.call(this, "ConvertWorker to " + l), this.destType = l;
|
|
896
|
-
}
|
|
897
|
-
a.inherits(r, o), r.prototype.processChunk = function(l) {
|
|
898
|
-
this.push({ data: a.transformTo(this.destType, l.data), meta: l.meta });
|
|
899
|
-
}, S.exports = r;
|
|
900
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(s, S, c) {
|
|
901
|
-
var o = s("./GenericWorker"), a = s("../crc32");
|
|
902
|
-
function r() {
|
|
903
|
-
o.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
|
|
904
|
-
}
|
|
905
|
-
s("../utils").inherits(r, o), r.prototype.processChunk = function(l) {
|
|
906
|
-
this.streamInfo.crc32 = a(l.data, this.streamInfo.crc32 || 0), this.push(l);
|
|
907
|
-
}, S.exports = r;
|
|
908
|
-
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(s, S, c) {
|
|
909
|
-
var o = s("../utils"), a = s("./GenericWorker");
|
|
910
|
-
function r(l) {
|
|
911
|
-
a.call(this, "DataLengthProbe for " + l), this.propName = l, this.withStreamInfo(l, 0);
|
|
912
|
-
}
|
|
913
|
-
o.inherits(r, a), r.prototype.processChunk = function(l) {
|
|
914
|
-
if (l) {
|
|
915
|
-
var d = this.streamInfo[this.propName] || 0;
|
|
916
|
-
this.streamInfo[this.propName] = d + l.data.length;
|
|
917
|
-
}
|
|
918
|
-
a.prototype.processChunk.call(this, l);
|
|
919
|
-
}, S.exports = r;
|
|
920
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(s, S, c) {
|
|
921
|
-
var o = s("../utils"), a = s("./GenericWorker");
|
|
922
|
-
function r(l) {
|
|
923
|
-
a.call(this, "DataWorker");
|
|
924
|
-
var d = this;
|
|
925
|
-
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, l.then(function(w) {
|
|
926
|
-
d.dataIsReady = !0, d.data = w, d.max = w && w.length || 0, d.type = o.getTypeOf(w), d.isPaused || d._tickAndRepeat();
|
|
927
|
-
}, function(w) {
|
|
928
|
-
d.error(w);
|
|
929
|
-
});
|
|
930
|
-
}
|
|
931
|
-
o.inherits(r, a), r.prototype.cleanUp = function() {
|
|
932
|
-
a.prototype.cleanUp.call(this), this.data = null;
|
|
933
|
-
}, r.prototype.resume = function() {
|
|
934
|
-
return !!a.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, o.delay(this._tickAndRepeat, [], this)), !0);
|
|
935
|
-
}, r.prototype._tickAndRepeat = function() {
|
|
936
|
-
this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (o.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
|
|
937
|
-
}, r.prototype._tick = function() {
|
|
938
|
-
if (this.isPaused || this.isFinished) return !1;
|
|
939
|
-
var l = null, d = Math.min(this.max, this.index + 16384);
|
|
940
|
-
if (this.index >= this.max) return this.end();
|
|
941
|
-
switch (this.type) {
|
|
942
|
-
case "string":
|
|
943
|
-
l = this.data.substring(this.index, d);
|
|
944
|
-
break;
|
|
945
|
-
case "uint8array":
|
|
946
|
-
l = this.data.subarray(this.index, d);
|
|
947
|
-
break;
|
|
948
|
-
case "array":
|
|
949
|
-
case "nodebuffer":
|
|
950
|
-
l = this.data.slice(this.index, d);
|
|
951
|
-
}
|
|
952
|
-
return this.index = d, this.push({ data: l, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
953
|
-
}, S.exports = r;
|
|
954
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(s, S, c) {
|
|
955
|
-
function o(a) {
|
|
956
|
-
this.name = a || "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;
|
|
957
|
-
}
|
|
958
|
-
o.prototype = { push: function(a) {
|
|
959
|
-
this.emit("data", a);
|
|
960
|
-
}, end: function() {
|
|
961
|
-
if (this.isFinished) return !1;
|
|
962
|
-
this.flush();
|
|
963
|
-
try {
|
|
964
|
-
this.emit("end"), this.cleanUp(), this.isFinished = !0;
|
|
965
|
-
} catch (a) {
|
|
966
|
-
this.emit("error", a);
|
|
967
|
-
}
|
|
968
|
-
return !0;
|
|
969
|
-
}, error: function(a) {
|
|
970
|
-
return !this.isFinished && (this.isPaused ? this.generatedError = a : (this.isFinished = !0, this.emit("error", a), this.previous && this.previous.error(a), this.cleanUp()), !0);
|
|
971
|
-
}, on: function(a, r) {
|
|
972
|
-
return this._listeners[a].push(r), this;
|
|
973
|
-
}, cleanUp: function() {
|
|
974
|
-
this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
|
|
975
|
-
}, emit: function(a, r) {
|
|
976
|
-
if (this._listeners[a]) for (var l = 0; l < this._listeners[a].length; l++) this._listeners[a][l].call(this, r);
|
|
977
|
-
}, pipe: function(a) {
|
|
978
|
-
return a.registerPrevious(this);
|
|
979
|
-
}, registerPrevious: function(a) {
|
|
980
|
-
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
981
|
-
this.streamInfo = a.streamInfo, this.mergeStreamInfo(), this.previous = a;
|
|
982
|
-
var r = this;
|
|
983
|
-
return a.on("data", function(l) {
|
|
984
|
-
r.processChunk(l);
|
|
985
|
-
}), a.on("end", function() {
|
|
986
|
-
r.end();
|
|
987
|
-
}), a.on("error", function(l) {
|
|
988
|
-
r.error(l);
|
|
989
|
-
}), this;
|
|
990
|
-
}, pause: function() {
|
|
991
|
-
return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
|
|
992
|
-
}, resume: function() {
|
|
993
|
-
if (!this.isPaused || this.isFinished) return !1;
|
|
994
|
-
var a = this.isPaused = !1;
|
|
995
|
-
return this.generatedError && (this.error(this.generatedError), a = !0), this.previous && this.previous.resume(), !a;
|
|
996
|
-
}, flush: function() {
|
|
997
|
-
}, processChunk: function(a) {
|
|
998
|
-
this.push(a);
|
|
999
|
-
}, withStreamInfo: function(a, r) {
|
|
1000
|
-
return this.extraStreamInfo[a] = r, this.mergeStreamInfo(), this;
|
|
1001
|
-
}, mergeStreamInfo: function() {
|
|
1002
|
-
for (var a in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, a) && (this.streamInfo[a] = this.extraStreamInfo[a]);
|
|
1003
|
-
}, lock: function() {
|
|
1004
|
-
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
1005
|
-
this.isLocked = !0, this.previous && this.previous.lock();
|
|
1006
|
-
}, toString: function() {
|
|
1007
|
-
var a = "Worker " + this.name;
|
|
1008
|
-
return this.previous ? this.previous + " -> " + a : a;
|
|
1009
|
-
} }, S.exports = o;
|
|
1010
|
-
}, {}], 29: [function(s, S, c) {
|
|
1011
|
-
var o = s("../utils"), a = s("./ConvertWorker"), r = s("./GenericWorker"), l = s("../base64"), d = s("../support"), w = s("../external"), g = null;
|
|
1012
|
-
if (d.nodestream) try {
|
|
1013
|
-
g = s("../nodejs/NodejsStreamOutputAdapter");
|
|
1014
|
-
} catch {
|
|
1015
|
-
}
|
|
1016
|
-
function y(p, i) {
|
|
1017
|
-
return new w.Promise(function(h, u) {
|
|
1018
|
-
var _ = [], k = p._internalType, A = p._outputType, E = p._mimeType;
|
|
1019
|
-
p.on("data", function(U, B) {
|
|
1020
|
-
_.push(U), i && i(B);
|
|
1021
|
-
}).on("error", function(U) {
|
|
1022
|
-
_ = [], u(U);
|
|
1023
|
-
}).on("end", function() {
|
|
1024
|
-
try {
|
|
1025
|
-
var U = function(B, D, R) {
|
|
1026
|
-
switch (B) {
|
|
1027
|
-
case "blob":
|
|
1028
|
-
return o.newBlob(o.transformTo("arraybuffer", D), R);
|
|
1029
|
-
case "base64":
|
|
1030
|
-
return l.encode(D);
|
|
1031
|
-
default:
|
|
1032
|
-
return o.transformTo(B, D);
|
|
1033
|
-
}
|
|
1034
|
-
}(A, function(B, D) {
|
|
1035
|
-
var R, Z = 0, Y = null, b = 0;
|
|
1036
|
-
for (R = 0; R < D.length; R++) b += D[R].length;
|
|
1037
|
-
switch (B) {
|
|
1038
|
-
case "string":
|
|
1039
|
-
return D.join("");
|
|
1040
|
-
case "array":
|
|
1041
|
-
return Array.prototype.concat.apply([], D);
|
|
1042
|
-
case "uint8array":
|
|
1043
|
-
for (Y = new Uint8Array(b), R = 0; R < D.length; R++) Y.set(D[R], Z), Z += D[R].length;
|
|
1044
|
-
return Y;
|
|
1045
|
-
case "nodebuffer":
|
|
1046
|
-
return Buffer.concat(D);
|
|
1047
|
-
default:
|
|
1048
|
-
throw new Error("concat : unsupported type '" + B + "'");
|
|
1049
|
-
}
|
|
1050
|
-
}(k, _), E);
|
|
1051
|
-
h(U);
|
|
1052
|
-
} catch (B) {
|
|
1053
|
-
u(B);
|
|
1054
|
-
}
|
|
1055
|
-
_ = [];
|
|
1056
|
-
}).resume();
|
|
1057
|
-
});
|
|
1058
|
-
}
|
|
1059
|
-
function n(p, i, h) {
|
|
1060
|
-
var u = i;
|
|
1061
|
-
switch (i) {
|
|
1062
|
-
case "blob":
|
|
1063
|
-
case "arraybuffer":
|
|
1064
|
-
u = "uint8array";
|
|
1065
|
-
break;
|
|
1066
|
-
case "base64":
|
|
1067
|
-
u = "string";
|
|
1068
|
-
}
|
|
1069
|
-
try {
|
|
1070
|
-
this._internalType = u, this._outputType = i, this._mimeType = h, o.checkSupport(u), this._worker = p.pipe(new a(u)), p.lock();
|
|
1071
|
-
} catch (_) {
|
|
1072
|
-
this._worker = new r("error"), this._worker.error(_);
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
n.prototype = { accumulate: function(p) {
|
|
1076
|
-
return y(this, p);
|
|
1077
|
-
}, on: function(p, i) {
|
|
1078
|
-
var h = this;
|
|
1079
|
-
return p === "data" ? this._worker.on(p, function(u) {
|
|
1080
|
-
i.call(h, u.data, u.meta);
|
|
1081
|
-
}) : this._worker.on(p, function() {
|
|
1082
|
-
o.delay(i, arguments, h);
|
|
1083
|
-
}), this;
|
|
1084
|
-
}, resume: function() {
|
|
1085
|
-
return o.delay(this._worker.resume, [], this._worker), this;
|
|
1086
|
-
}, pause: function() {
|
|
1087
|
-
return this._worker.pause(), this;
|
|
1088
|
-
}, toNodejsStream: function(p) {
|
|
1089
|
-
if (o.checkSupport("nodestream"), this._outputType !== "nodebuffer") throw new Error(this._outputType + " is not supported by this method");
|
|
1090
|
-
return new g(this, { objectMode: this._outputType !== "nodebuffer" }, p);
|
|
1091
|
-
} }, S.exports = n;
|
|
1092
|
-
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(s, S, c) {
|
|
1093
|
-
if (c.base64 = !0, c.array = !0, c.string = !0, c.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", c.nodebuffer = typeof Buffer < "u", c.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u") c.blob = !1;
|
|
1094
|
-
else {
|
|
1095
|
-
var o = new ArrayBuffer(0);
|
|
1096
|
-
try {
|
|
1097
|
-
c.blob = new Blob([o], { type: "application/zip" }).size === 0;
|
|
1098
|
-
} catch {
|
|
1099
|
-
try {
|
|
1100
|
-
var a = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
1101
|
-
a.append(o), c.blob = a.getBlob("application/zip").size === 0;
|
|
1102
|
-
} catch {
|
|
1103
|
-
c.blob = !1;
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
try {
|
|
1108
|
-
c.nodestream = !!s("readable-stream").Readable;
|
|
1109
|
-
} catch {
|
|
1110
|
-
c.nodestream = !1;
|
|
1111
|
-
}
|
|
1112
|
-
}, { "readable-stream": 16 }], 31: [function(s, S, c) {
|
|
1113
|
-
for (var o = s("./utils"), a = s("./support"), r = s("./nodejsUtils"), l = s("./stream/GenericWorker"), d = new Array(256), w = 0; w < 256; w++) d[w] = 252 <= w ? 6 : 248 <= w ? 5 : 240 <= w ? 4 : 224 <= w ? 3 : 192 <= w ? 2 : 1;
|
|
1114
|
-
d[254] = d[254] = 1;
|
|
1115
|
-
function g() {
|
|
1116
|
-
l.call(this, "utf-8 decode"), this.leftOver = null;
|
|
1117
|
-
}
|
|
1118
|
-
function y() {
|
|
1119
|
-
l.call(this, "utf-8 encode");
|
|
1120
|
-
}
|
|
1121
|
-
c.utf8encode = function(n) {
|
|
1122
|
-
return a.nodebuffer ? r.newBufferFrom(n, "utf-8") : function(p) {
|
|
1123
|
-
var i, h, u, _, k, A = p.length, E = 0;
|
|
1124
|
-
for (_ = 0; _ < A; _++) (64512 & (h = p.charCodeAt(_))) == 55296 && _ + 1 < A && (64512 & (u = p.charCodeAt(_ + 1))) == 56320 && (h = 65536 + (h - 55296 << 10) + (u - 56320), _++), E += h < 128 ? 1 : h < 2048 ? 2 : h < 65536 ? 3 : 4;
|
|
1125
|
-
for (i = a.uint8array ? new Uint8Array(E) : new Array(E), _ = k = 0; k < E; _++) (64512 & (h = p.charCodeAt(_))) == 55296 && _ + 1 < A && (64512 & (u = p.charCodeAt(_ + 1))) == 56320 && (h = 65536 + (h - 55296 << 10) + (u - 56320), _++), h < 128 ? i[k++] = h : (h < 2048 ? i[k++] = 192 | h >>> 6 : (h < 65536 ? i[k++] = 224 | h >>> 12 : (i[k++] = 240 | h >>> 18, i[k++] = 128 | h >>> 12 & 63), i[k++] = 128 | h >>> 6 & 63), i[k++] = 128 | 63 & h);
|
|
1126
|
-
return i;
|
|
1127
|
-
}(n);
|
|
1128
|
-
}, c.utf8decode = function(n) {
|
|
1129
|
-
return a.nodebuffer ? o.transformTo("nodebuffer", n).toString("utf-8") : function(p) {
|
|
1130
|
-
var i, h, u, _, k = p.length, A = new Array(2 * k);
|
|
1131
|
-
for (i = h = 0; i < k; ) if ((u = p[i++]) < 128) A[h++] = u;
|
|
1132
|
-
else if (4 < (_ = d[u])) A[h++] = 65533, i += _ - 1;
|
|
1133
|
-
else {
|
|
1134
|
-
for (u &= _ === 2 ? 31 : _ === 3 ? 15 : 7; 1 < _ && i < k; ) u = u << 6 | 63 & p[i++], _--;
|
|
1135
|
-
1 < _ ? A[h++] = 65533 : u < 65536 ? A[h++] = u : (u -= 65536, A[h++] = 55296 | u >> 10 & 1023, A[h++] = 56320 | 1023 & u);
|
|
1136
|
-
}
|
|
1137
|
-
return A.length !== h && (A.subarray ? A = A.subarray(0, h) : A.length = h), o.applyFromCharCode(A);
|
|
1138
|
-
}(n = o.transformTo(a.uint8array ? "uint8array" : "array", n));
|
|
1139
|
-
}, o.inherits(g, l), g.prototype.processChunk = function(n) {
|
|
1140
|
-
var p = o.transformTo(a.uint8array ? "uint8array" : "array", n.data);
|
|
1141
|
-
if (this.leftOver && this.leftOver.length) {
|
|
1142
|
-
if (a.uint8array) {
|
|
1143
|
-
var i = p;
|
|
1144
|
-
(p = new Uint8Array(i.length + this.leftOver.length)).set(this.leftOver, 0), p.set(i, this.leftOver.length);
|
|
1145
|
-
} else p = this.leftOver.concat(p);
|
|
1146
|
-
this.leftOver = null;
|
|
1147
|
-
}
|
|
1148
|
-
var h = function(_, k) {
|
|
1149
|
-
var A;
|
|
1150
|
-
for ((k = k || _.length) > _.length && (k = _.length), A = k - 1; 0 <= A && (192 & _[A]) == 128; ) A--;
|
|
1151
|
-
return A < 0 || A === 0 ? k : A + d[_[A]] > k ? A : k;
|
|
1152
|
-
}(p), u = p;
|
|
1153
|
-
h !== p.length && (a.uint8array ? (u = p.subarray(0, h), this.leftOver = p.subarray(h, p.length)) : (u = p.slice(0, h), this.leftOver = p.slice(h, p.length))), this.push({ data: c.utf8decode(u), meta: n.meta });
|
|
1154
|
-
}, g.prototype.flush = function() {
|
|
1155
|
-
this.leftOver && this.leftOver.length && (this.push({ data: c.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
1156
|
-
}, c.Utf8DecodeWorker = g, o.inherits(y, l), y.prototype.processChunk = function(n) {
|
|
1157
|
-
this.push({ data: c.utf8encode(n.data), meta: n.meta });
|
|
1158
|
-
}, c.Utf8EncodeWorker = y;
|
|
1159
|
-
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(s, S, c) {
|
|
1160
|
-
var o = s("./support"), a = s("./base64"), r = s("./nodejsUtils"), l = s("./external");
|
|
1161
|
-
function d(i) {
|
|
1162
|
-
return i;
|
|
1163
|
-
}
|
|
1164
|
-
function w(i, h) {
|
|
1165
|
-
for (var u = 0; u < i.length; ++u) h[u] = 255 & i.charCodeAt(u);
|
|
1166
|
-
return h;
|
|
1167
|
-
}
|
|
1168
|
-
s("setimmediate"), c.newBlob = function(i, h) {
|
|
1169
|
-
c.checkSupport("blob");
|
|
1170
|
-
try {
|
|
1171
|
-
return new Blob([i], { type: h });
|
|
1172
|
-
} catch {
|
|
1173
|
-
try {
|
|
1174
|
-
var u = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
1175
|
-
return u.append(i), u.getBlob(h);
|
|
1176
|
-
} catch {
|
|
1177
|
-
throw new Error("Bug : can't construct the Blob.");
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
};
|
|
1181
|
-
var g = { stringifyByChunk: function(i, h, u) {
|
|
1182
|
-
var _ = [], k = 0, A = i.length;
|
|
1183
|
-
if (A <= u) return String.fromCharCode.apply(null, i);
|
|
1184
|
-
for (; k < A; ) h === "array" || h === "nodebuffer" ? _.push(String.fromCharCode.apply(null, i.slice(k, Math.min(k + u, A)))) : _.push(String.fromCharCode.apply(null, i.subarray(k, Math.min(k + u, A)))), k += u;
|
|
1185
|
-
return _.join("");
|
|
1186
|
-
}, stringifyByChar: function(i) {
|
|
1187
|
-
for (var h = "", u = 0; u < i.length; u++) h += String.fromCharCode(i[u]);
|
|
1188
|
-
return h;
|
|
1189
|
-
}, applyCanBeUsed: { uint8array: function() {
|
|
1190
|
-
try {
|
|
1191
|
-
return o.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
|
|
1192
|
-
} catch {
|
|
1193
|
-
return !1;
|
|
1194
|
-
}
|
|
1195
|
-
}(), nodebuffer: function() {
|
|
1196
|
-
try {
|
|
1197
|
-
return o.nodebuffer && String.fromCharCode.apply(null, r.allocBuffer(1)).length === 1;
|
|
1198
|
-
} catch {
|
|
1199
|
-
return !1;
|
|
1200
|
-
}
|
|
1201
|
-
}() } };
|
|
1202
|
-
function y(i) {
|
|
1203
|
-
var h = 65536, u = c.getTypeOf(i), _ = !0;
|
|
1204
|
-
if (u === "uint8array" ? _ = g.applyCanBeUsed.uint8array : u === "nodebuffer" && (_ = g.applyCanBeUsed.nodebuffer), _) for (; 1 < h; ) try {
|
|
1205
|
-
return g.stringifyByChunk(i, u, h);
|
|
1206
|
-
} catch {
|
|
1207
|
-
h = Math.floor(h / 2);
|
|
1208
|
-
}
|
|
1209
|
-
return g.stringifyByChar(i);
|
|
1210
|
-
}
|
|
1211
|
-
function n(i, h) {
|
|
1212
|
-
for (var u = 0; u < i.length; u++) h[u] = i[u];
|
|
1213
|
-
return h;
|
|
1214
|
-
}
|
|
1215
|
-
c.applyFromCharCode = y;
|
|
1216
|
-
var p = {};
|
|
1217
|
-
p.string = { string: d, array: function(i) {
|
|
1218
|
-
return w(i, new Array(i.length));
|
|
1219
|
-
}, arraybuffer: function(i) {
|
|
1220
|
-
return p.string.uint8array(i).buffer;
|
|
1221
|
-
}, uint8array: function(i) {
|
|
1222
|
-
return w(i, new Uint8Array(i.length));
|
|
1223
|
-
}, nodebuffer: function(i) {
|
|
1224
|
-
return w(i, r.allocBuffer(i.length));
|
|
1225
|
-
} }, p.array = { string: y, array: d, arraybuffer: function(i) {
|
|
1226
|
-
return new Uint8Array(i).buffer;
|
|
1227
|
-
}, uint8array: function(i) {
|
|
1228
|
-
return new Uint8Array(i);
|
|
1229
|
-
}, nodebuffer: function(i) {
|
|
1230
|
-
return r.newBufferFrom(i);
|
|
1231
|
-
} }, p.arraybuffer = { string: function(i) {
|
|
1232
|
-
return y(new Uint8Array(i));
|
|
1233
|
-
}, array: function(i) {
|
|
1234
|
-
return n(new Uint8Array(i), new Array(i.byteLength));
|
|
1235
|
-
}, arraybuffer: d, uint8array: function(i) {
|
|
1236
|
-
return new Uint8Array(i);
|
|
1237
|
-
}, nodebuffer: function(i) {
|
|
1238
|
-
return r.newBufferFrom(new Uint8Array(i));
|
|
1239
|
-
} }, p.uint8array = { string: y, array: function(i) {
|
|
1240
|
-
return n(i, new Array(i.length));
|
|
1241
|
-
}, arraybuffer: function(i) {
|
|
1242
|
-
return i.buffer;
|
|
1243
|
-
}, uint8array: d, nodebuffer: function(i) {
|
|
1244
|
-
return r.newBufferFrom(i);
|
|
1245
|
-
} }, p.nodebuffer = { string: y, array: function(i) {
|
|
1246
|
-
return n(i, new Array(i.length));
|
|
1247
|
-
}, arraybuffer: function(i) {
|
|
1248
|
-
return p.nodebuffer.uint8array(i).buffer;
|
|
1249
|
-
}, uint8array: function(i) {
|
|
1250
|
-
return n(i, new Uint8Array(i.length));
|
|
1251
|
-
}, nodebuffer: d }, c.transformTo = function(i, h) {
|
|
1252
|
-
if (h = h || "", !i) return h;
|
|
1253
|
-
c.checkSupport(i);
|
|
1254
|
-
var u = c.getTypeOf(h);
|
|
1255
|
-
return p[u][i](h);
|
|
1256
|
-
}, c.resolve = function(i) {
|
|
1257
|
-
for (var h = i.split("/"), u = [], _ = 0; _ < h.length; _++) {
|
|
1258
|
-
var k = h[_];
|
|
1259
|
-
k === "." || k === "" && _ !== 0 && _ !== h.length - 1 || (k === ".." ? u.pop() : u.push(k));
|
|
1260
|
-
}
|
|
1261
|
-
return u.join("/");
|
|
1262
|
-
}, c.getTypeOf = function(i) {
|
|
1263
|
-
return typeof i == "string" ? "string" : Object.prototype.toString.call(i) === "[object Array]" ? "array" : o.nodebuffer && r.isBuffer(i) ? "nodebuffer" : o.uint8array && i instanceof Uint8Array ? "uint8array" : o.arraybuffer && i instanceof ArrayBuffer ? "arraybuffer" : void 0;
|
|
1264
|
-
}, c.checkSupport = function(i) {
|
|
1265
|
-
if (!o[i.toLowerCase()]) throw new Error(i + " is not supported by this platform");
|
|
1266
|
-
}, c.MAX_VALUE_16BITS = 65535, c.MAX_VALUE_32BITS = -1, c.pretty = function(i) {
|
|
1267
|
-
var h, u, _ = "";
|
|
1268
|
-
for (u = 0; u < (i || "").length; u++) _ += "\\x" + ((h = i.charCodeAt(u)) < 16 ? "0" : "") + h.toString(16).toUpperCase();
|
|
1269
|
-
return _;
|
|
1270
|
-
}, c.delay = function(i, h, u) {
|
|
1271
|
-
setImmediate(function() {
|
|
1272
|
-
i.apply(u || null, h || []);
|
|
1273
|
-
});
|
|
1274
|
-
}, c.inherits = function(i, h) {
|
|
1275
|
-
function u() {
|
|
1276
|
-
}
|
|
1277
|
-
u.prototype = h.prototype, i.prototype = new u();
|
|
1278
|
-
}, c.extend = function() {
|
|
1279
|
-
var i, h, u = {};
|
|
1280
|
-
for (i = 0; i < arguments.length; i++) for (h in arguments[i]) Object.prototype.hasOwnProperty.call(arguments[i], h) && u[h] === void 0 && (u[h] = arguments[i][h]);
|
|
1281
|
-
return u;
|
|
1282
|
-
}, c.prepareContent = function(i, h, u, _, k) {
|
|
1283
|
-
return l.Promise.resolve(h).then(function(A) {
|
|
1284
|
-
return o.blob && (A instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(A)) !== -1) && typeof FileReader < "u" ? new l.Promise(function(E, U) {
|
|
1285
|
-
var B = new FileReader();
|
|
1286
|
-
B.onload = function(D) {
|
|
1287
|
-
E(D.target.result);
|
|
1288
|
-
}, B.onerror = function(D) {
|
|
1289
|
-
U(D.target.error);
|
|
1290
|
-
}, B.readAsArrayBuffer(A);
|
|
1291
|
-
}) : A;
|
|
1292
|
-
}).then(function(A) {
|
|
1293
|
-
var E = c.getTypeOf(A);
|
|
1294
|
-
return E ? (E === "arraybuffer" ? A = c.transformTo("uint8array", A) : E === "string" && (k ? A = a.decode(A) : u && _ !== !0 && (A = function(U) {
|
|
1295
|
-
return w(U, o.uint8array ? new Uint8Array(U.length) : new Array(U.length));
|
|
1296
|
-
}(A))), A) : l.Promise.reject(new Error("Can't read the data of '" + i + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
1297
|
-
});
|
|
1298
|
-
};
|
|
1299
|
-
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(s, S, c) {
|
|
1300
|
-
var o = s("./reader/readerFor"), a = s("./utils"), r = s("./signature"), l = s("./zipEntry"), d = s("./support");
|
|
1301
|
-
function w(g) {
|
|
1302
|
-
this.files = [], this.loadOptions = g;
|
|
1303
|
-
}
|
|
1304
|
-
w.prototype = { checkSignature: function(g) {
|
|
1305
|
-
if (!this.reader.readAndCheckSignature(g)) {
|
|
1306
|
-
this.reader.index -= 4;
|
|
1307
|
-
var y = this.reader.readString(4);
|
|
1308
|
-
throw new Error("Corrupted zip or bug: unexpected signature (" + a.pretty(y) + ", expected " + a.pretty(g) + ")");
|
|
1309
|
-
}
|
|
1310
|
-
}, isSignature: function(g, y) {
|
|
1311
|
-
var n = this.reader.index;
|
|
1312
|
-
this.reader.setIndex(g);
|
|
1313
|
-
var p = this.reader.readString(4) === y;
|
|
1314
|
-
return this.reader.setIndex(n), p;
|
|
1315
|
-
}, readBlockEndOfCentral: function() {
|
|
1316
|
-
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);
|
|
1317
|
-
var g = this.reader.readData(this.zipCommentLength), y = d.uint8array ? "uint8array" : "array", n = a.transformTo(y, g);
|
|
1318
|
-
this.zipComment = this.loadOptions.decodeFileName(n);
|
|
1319
|
-
}, readBlockZip64EndOfCentral: function() {
|
|
1320
|
-
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 = {};
|
|
1321
|
-
for (var g, y, n, p = this.zip64EndOfCentralSize - 44; 0 < p; ) g = this.reader.readInt(2), y = this.reader.readInt(4), n = this.reader.readData(y), this.zip64ExtensibleData[g] = { id: g, length: y, value: n };
|
|
1322
|
-
}, readBlockZip64EndOfCentralLocator: function() {
|
|
1323
|
-
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");
|
|
1324
|
-
}, readLocalFiles: function() {
|
|
1325
|
-
var g, y;
|
|
1326
|
-
for (g = 0; g < this.files.length; g++) y = this.files[g], this.reader.setIndex(y.localHeaderOffset), this.checkSignature(r.LOCAL_FILE_HEADER), y.readLocalPart(this.reader), y.handleUTF8(), y.processAttributes();
|
|
1327
|
-
}, readCentralDir: function() {
|
|
1328
|
-
var g;
|
|
1329
|
-
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(r.CENTRAL_FILE_HEADER); ) (g = new l({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(g);
|
|
1330
|
-
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);
|
|
1331
|
-
}, readEndOfCentral: function() {
|
|
1332
|
-
var g = this.reader.lastIndexOfSignature(r.CENTRAL_DIRECTORY_END);
|
|
1333
|
-
if (g < 0) throw this.isSignature(0, r.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");
|
|
1334
|
-
this.reader.setIndex(g);
|
|
1335
|
-
var y = g;
|
|
1336
|
-
if (this.checkSignature(r.CENTRAL_DIRECTORY_END), this.readBlockEndOfCentral(), this.diskNumber === a.MAX_VALUE_16BITS || this.diskWithCentralDirStart === a.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === a.MAX_VALUE_16BITS || this.centralDirRecords === a.MAX_VALUE_16BITS || this.centralDirSize === a.MAX_VALUE_32BITS || this.centralDirOffset === a.MAX_VALUE_32BITS) {
|
|
1337
|
-
if (this.zip64 = !0, (g = this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
1338
|
-
if (this.reader.setIndex(g), this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, r.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(r.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
|
|
1339
|
-
this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(r.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
|
|
1340
|
-
}
|
|
1341
|
-
var n = this.centralDirOffset + this.centralDirSize;
|
|
1342
|
-
this.zip64 && (n += 20, n += 12 + this.zip64EndOfCentralSize);
|
|
1343
|
-
var p = y - n;
|
|
1344
|
-
if (0 < p) this.isSignature(y, r.CENTRAL_FILE_HEADER) || (this.reader.zero = p);
|
|
1345
|
-
else if (p < 0) throw new Error("Corrupted zip: missing " + Math.abs(p) + " bytes.");
|
|
1346
|
-
}, prepareReader: function(g) {
|
|
1347
|
-
this.reader = o(g);
|
|
1348
|
-
}, load: function(g) {
|
|
1349
|
-
this.prepareReader(g), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
1350
|
-
} }, S.exports = w;
|
|
1351
|
-
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(s, S, c) {
|
|
1352
|
-
var o = s("./reader/readerFor"), a = s("./utils"), r = s("./compressedObject"), l = s("./crc32"), d = s("./utf8"), w = s("./compressions"), g = s("./support");
|
|
1353
|
-
function y(n, p) {
|
|
1354
|
-
this.options = n, this.loadOptions = p;
|
|
1355
|
-
}
|
|
1356
|
-
y.prototype = { isEncrypted: function() {
|
|
1357
|
-
return (1 & this.bitFlag) == 1;
|
|
1358
|
-
}, useUTF8: function() {
|
|
1359
|
-
return (2048 & this.bitFlag) == 2048;
|
|
1360
|
-
}, readLocalPart: function(n) {
|
|
1361
|
-
var p, i;
|
|
1362
|
-
if (n.skip(22), this.fileNameLength = n.readInt(2), i = n.readInt(2), this.fileName = n.readData(this.fileNameLength), n.skip(i), this.compressedSize === -1 || this.uncompressedSize === -1) throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");
|
|
1363
|
-
if ((p = function(h) {
|
|
1364
|
-
for (var u in w) if (Object.prototype.hasOwnProperty.call(w, u) && w[u].magic === h) return w[u];
|
|
1365
|
-
return null;
|
|
1366
|
-
}(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " + a.pretty(this.compressionMethod) + " unknown (inner file : " + a.transformTo("string", this.fileName) + ")");
|
|
1367
|
-
this.decompressed = new r(this.compressedSize, this.uncompressedSize, this.crc32, p, n.readData(this.compressedSize));
|
|
1368
|
-
}, readCentralPart: function(n) {
|
|
1369
|
-
this.versionMadeBy = n.readInt(2), n.skip(2), this.bitFlag = n.readInt(2), this.compressionMethod = n.readString(2), this.date = n.readDate(), this.crc32 = n.readInt(4), this.compressedSize = n.readInt(4), this.uncompressedSize = n.readInt(4);
|
|
1370
|
-
var p = n.readInt(2);
|
|
1371
|
-
if (this.extraFieldsLength = n.readInt(2), this.fileCommentLength = n.readInt(2), this.diskNumberStart = n.readInt(2), this.internalFileAttributes = n.readInt(2), this.externalFileAttributes = n.readInt(4), this.localHeaderOffset = n.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
|
|
1372
|
-
n.skip(p), this.readExtraFields(n), this.parseZIP64ExtraField(n), this.fileComment = n.readData(this.fileCommentLength);
|
|
1373
|
-
}, processAttributes: function() {
|
|
1374
|
-
this.unixPermissions = null, this.dosPermissions = null;
|
|
1375
|
-
var n = this.versionMadeBy >> 8;
|
|
1376
|
-
this.dir = !!(16 & this.externalFileAttributes), n == 0 && (this.dosPermissions = 63 & this.externalFileAttributes), n == 3 && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || this.fileNameStr.slice(-1) !== "/" || (this.dir = !0);
|
|
1377
|
-
}, parseZIP64ExtraField: function() {
|
|
1378
|
-
if (this.extraFields[1]) {
|
|
1379
|
-
var n = o(this.extraFields[1].value);
|
|
1380
|
-
this.uncompressedSize === a.MAX_VALUE_32BITS && (this.uncompressedSize = n.readInt(8)), this.compressedSize === a.MAX_VALUE_32BITS && (this.compressedSize = n.readInt(8)), this.localHeaderOffset === a.MAX_VALUE_32BITS && (this.localHeaderOffset = n.readInt(8)), this.diskNumberStart === a.MAX_VALUE_32BITS && (this.diskNumberStart = n.readInt(4));
|
|
1381
|
-
}
|
|
1382
|
-
}, readExtraFields: function(n) {
|
|
1383
|
-
var p, i, h, u = n.index + this.extraFieldsLength;
|
|
1384
|
-
for (this.extraFields || (this.extraFields = {}); n.index + 4 < u; ) p = n.readInt(2), i = n.readInt(2), h = n.readData(i), this.extraFields[p] = { id: p, length: i, value: h };
|
|
1385
|
-
n.setIndex(u);
|
|
1386
|
-
}, handleUTF8: function() {
|
|
1387
|
-
var n = g.uint8array ? "uint8array" : "array";
|
|
1388
|
-
if (this.useUTF8()) this.fileNameStr = d.utf8decode(this.fileName), this.fileCommentStr = d.utf8decode(this.fileComment);
|
|
1389
|
-
else {
|
|
1390
|
-
var p = this.findExtraFieldUnicodePath();
|
|
1391
|
-
if (p !== null) this.fileNameStr = p;
|
|
1392
|
-
else {
|
|
1393
|
-
var i = a.transformTo(n, this.fileName);
|
|
1394
|
-
this.fileNameStr = this.loadOptions.decodeFileName(i);
|
|
1395
|
-
}
|
|
1396
|
-
var h = this.findExtraFieldUnicodeComment();
|
|
1397
|
-
if (h !== null) this.fileCommentStr = h;
|
|
1398
|
-
else {
|
|
1399
|
-
var u = a.transformTo(n, this.fileComment);
|
|
1400
|
-
this.fileCommentStr = this.loadOptions.decodeFileName(u);
|
|
1401
|
-
}
|
|
1402
|
-
}
|
|
1403
|
-
}, findExtraFieldUnicodePath: function() {
|
|
1404
|
-
var n = this.extraFields[28789];
|
|
1405
|
-
if (n) {
|
|
1406
|
-
var p = o(n.value);
|
|
1407
|
-
return p.readInt(1) !== 1 || l(this.fileName) !== p.readInt(4) ? null : d.utf8decode(p.readData(n.length - 5));
|
|
1408
|
-
}
|
|
1409
|
-
return null;
|
|
1410
|
-
}, findExtraFieldUnicodeComment: function() {
|
|
1411
|
-
var n = this.extraFields[25461];
|
|
1412
|
-
if (n) {
|
|
1413
|
-
var p = o(n.value);
|
|
1414
|
-
return p.readInt(1) !== 1 || l(this.fileComment) !== p.readInt(4) ? null : d.utf8decode(p.readData(n.length - 5));
|
|
1415
|
-
}
|
|
1416
|
-
return null;
|
|
1417
|
-
} }, S.exports = y;
|
|
1418
|
-
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(s, S, c) {
|
|
1419
|
-
function o(p, i, h) {
|
|
1420
|
-
this.name = p, this.dir = h.dir, this.date = h.date, this.comment = h.comment, this.unixPermissions = h.unixPermissions, this.dosPermissions = h.dosPermissions, this._data = i, this._dataBinary = h.binary, this.options = { compression: h.compression, compressionOptions: h.compressionOptions };
|
|
1421
|
-
}
|
|
1422
|
-
var a = s("./stream/StreamHelper"), r = s("./stream/DataWorker"), l = s("./utf8"), d = s("./compressedObject"), w = s("./stream/GenericWorker");
|
|
1423
|
-
o.prototype = { internalStream: function(p) {
|
|
1424
|
-
var i = null, h = "string";
|
|
1425
|
-
try {
|
|
1426
|
-
if (!p) throw new Error("No output type specified.");
|
|
1427
|
-
var u = (h = p.toLowerCase()) === "string" || h === "text";
|
|
1428
|
-
h !== "binarystring" && h !== "text" || (h = "string"), i = this._decompressWorker();
|
|
1429
|
-
var _ = !this._dataBinary;
|
|
1430
|
-
_ && !u && (i = i.pipe(new l.Utf8EncodeWorker())), !_ && u && (i = i.pipe(new l.Utf8DecodeWorker()));
|
|
1431
|
-
} catch (k) {
|
|
1432
|
-
(i = new w("error")).error(k);
|
|
1433
|
-
}
|
|
1434
|
-
return new a(i, h, "");
|
|
1435
|
-
}, async: function(p, i) {
|
|
1436
|
-
return this.internalStream(p).accumulate(i);
|
|
1437
|
-
}, nodeStream: function(p, i) {
|
|
1438
|
-
return this.internalStream(p || "nodebuffer").toNodejsStream(i);
|
|
1439
|
-
}, _compressWorker: function(p, i) {
|
|
1440
|
-
if (this._data instanceof d && this._data.compression.magic === p.magic) return this._data.getCompressedWorker();
|
|
1441
|
-
var h = this._decompressWorker();
|
|
1442
|
-
return this._dataBinary || (h = h.pipe(new l.Utf8EncodeWorker())), d.createWorkerFrom(h, p, i);
|
|
1443
|
-
}, _decompressWorker: function() {
|
|
1444
|
-
return this._data instanceof d ? this._data.getContentWorker() : this._data instanceof w ? this._data : new r(this._data);
|
|
1445
|
-
} };
|
|
1446
|
-
for (var g = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], y = function() {
|
|
1447
|
-
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
1448
|
-
}, n = 0; n < g.length; n++) o.prototype[g[n]] = y;
|
|
1449
|
-
S.exports = o;
|
|
1450
|
-
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(s, S, c) {
|
|
1451
|
-
(function(o) {
|
|
1452
|
-
var a, r, l = o.MutationObserver || o.WebKitMutationObserver;
|
|
1453
|
-
if (l) {
|
|
1454
|
-
var d = 0, w = new l(p), g = o.document.createTextNode("");
|
|
1455
|
-
w.observe(g, { characterData: !0 }), a = function() {
|
|
1456
|
-
g.data = d = ++d % 2;
|
|
1457
|
-
};
|
|
1458
|
-
} else if (o.setImmediate || o.MessageChannel === void 0) a = "document" in o && "onreadystatechange" in o.document.createElement("script") ? function() {
|
|
1459
|
-
var i = o.document.createElement("script");
|
|
1460
|
-
i.onreadystatechange = function() {
|
|
1461
|
-
p(), i.onreadystatechange = null, i.parentNode.removeChild(i), i = null;
|
|
1462
|
-
}, o.document.documentElement.appendChild(i);
|
|
1463
|
-
} : function() {
|
|
1464
|
-
setTimeout(p, 0);
|
|
1465
|
-
};
|
|
1466
|
-
else {
|
|
1467
|
-
var y = new o.MessageChannel();
|
|
1468
|
-
y.port1.onmessage = p, a = function() {
|
|
1469
|
-
y.port2.postMessage(0);
|
|
1470
|
-
};
|
|
1471
|
-
}
|
|
1472
|
-
var n = [];
|
|
1473
|
-
function p() {
|
|
1474
|
-
var i, h;
|
|
1475
|
-
r = !0;
|
|
1476
|
-
for (var u = n.length; u; ) {
|
|
1477
|
-
for (h = n, n = [], i = -1; ++i < u; ) h[i]();
|
|
1478
|
-
u = n.length;
|
|
1479
|
-
}
|
|
1480
|
-
r = !1;
|
|
1481
|
-
}
|
|
1482
|
-
S.exports = function(i) {
|
|
1483
|
-
n.push(i) !== 1 || r || a();
|
|
1484
|
-
};
|
|
1485
|
-
}).call(this, typeof xt < "u" ? xt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1486
|
-
}, {}], 37: [function(s, S, c) {
|
|
1487
|
-
var o = s("immediate");
|
|
1488
|
-
function a() {
|
|
1489
|
-
}
|
|
1490
|
-
var r = {}, l = ["REJECTED"], d = ["FULFILLED"], w = ["PENDING"];
|
|
1491
|
-
function g(u) {
|
|
1492
|
-
if (typeof u != "function") throw new TypeError("resolver must be a function");
|
|
1493
|
-
this.state = w, this.queue = [], this.outcome = void 0, u !== a && i(this, u);
|
|
1494
|
-
}
|
|
1495
|
-
function y(u, _, k) {
|
|
1496
|
-
this.promise = u, typeof _ == "function" && (this.onFulfilled = _, this.callFulfilled = this.otherCallFulfilled), typeof k == "function" && (this.onRejected = k, this.callRejected = this.otherCallRejected);
|
|
1497
|
-
}
|
|
1498
|
-
function n(u, _, k) {
|
|
1499
|
-
o(function() {
|
|
1500
|
-
var A;
|
|
1501
|
-
try {
|
|
1502
|
-
A = _(k);
|
|
1503
|
-
} catch (E) {
|
|
1504
|
-
return r.reject(u, E);
|
|
1505
|
-
}
|
|
1506
|
-
A === u ? r.reject(u, new TypeError("Cannot resolve promise with itself")) : r.resolve(u, A);
|
|
1507
|
-
});
|
|
1508
|
-
}
|
|
1509
|
-
function p(u) {
|
|
1510
|
-
var _ = u && u.then;
|
|
1511
|
-
if (u && (typeof u == "object" || typeof u == "function") && typeof _ == "function") return function() {
|
|
1512
|
-
_.apply(u, arguments);
|
|
1513
|
-
};
|
|
1514
|
-
}
|
|
1515
|
-
function i(u, _) {
|
|
1516
|
-
var k = !1;
|
|
1517
|
-
function A(B) {
|
|
1518
|
-
k || (k = !0, r.reject(u, B));
|
|
1519
|
-
}
|
|
1520
|
-
function E(B) {
|
|
1521
|
-
k || (k = !0, r.resolve(u, B));
|
|
1522
|
-
}
|
|
1523
|
-
var U = h(function() {
|
|
1524
|
-
_(E, A);
|
|
1525
|
-
});
|
|
1526
|
-
U.status === "error" && A(U.value);
|
|
1527
|
-
}
|
|
1528
|
-
function h(u, _) {
|
|
1529
|
-
var k = {};
|
|
1530
|
-
try {
|
|
1531
|
-
k.value = u(_), k.status = "success";
|
|
1532
|
-
} catch (A) {
|
|
1533
|
-
k.status = "error", k.value = A;
|
|
1534
|
-
}
|
|
1535
|
-
return k;
|
|
1536
|
-
}
|
|
1537
|
-
(S.exports = g).prototype.finally = function(u) {
|
|
1538
|
-
if (typeof u != "function") return this;
|
|
1539
|
-
var _ = this.constructor;
|
|
1540
|
-
return this.then(function(k) {
|
|
1541
|
-
return _.resolve(u()).then(function() {
|
|
1542
|
-
return k;
|
|
1543
|
-
});
|
|
1544
|
-
}, function(k) {
|
|
1545
|
-
return _.resolve(u()).then(function() {
|
|
1546
|
-
throw k;
|
|
1547
|
-
});
|
|
1548
|
-
});
|
|
1549
|
-
}, g.prototype.catch = function(u) {
|
|
1550
|
-
return this.then(null, u);
|
|
1551
|
-
}, g.prototype.then = function(u, _) {
|
|
1552
|
-
if (typeof u != "function" && this.state === d || typeof _ != "function" && this.state === l) return this;
|
|
1553
|
-
var k = new this.constructor(a);
|
|
1554
|
-
return this.state !== w ? n(k, this.state === d ? u : _, this.outcome) : this.queue.push(new y(k, u, _)), k;
|
|
1555
|
-
}, y.prototype.callFulfilled = function(u) {
|
|
1556
|
-
r.resolve(this.promise, u);
|
|
1557
|
-
}, y.prototype.otherCallFulfilled = function(u) {
|
|
1558
|
-
n(this.promise, this.onFulfilled, u);
|
|
1559
|
-
}, y.prototype.callRejected = function(u) {
|
|
1560
|
-
r.reject(this.promise, u);
|
|
1561
|
-
}, y.prototype.otherCallRejected = function(u) {
|
|
1562
|
-
n(this.promise, this.onRejected, u);
|
|
1563
|
-
}, r.resolve = function(u, _) {
|
|
1564
|
-
var k = h(p, _);
|
|
1565
|
-
if (k.status === "error") return r.reject(u, k.value);
|
|
1566
|
-
var A = k.value;
|
|
1567
|
-
if (A) i(u, A);
|
|
1568
|
-
else {
|
|
1569
|
-
u.state = d, u.outcome = _;
|
|
1570
|
-
for (var E = -1, U = u.queue.length; ++E < U; ) u.queue[E].callFulfilled(_);
|
|
1571
|
-
}
|
|
1572
|
-
return u;
|
|
1573
|
-
}, r.reject = function(u, _) {
|
|
1574
|
-
u.state = l, u.outcome = _;
|
|
1575
|
-
for (var k = -1, A = u.queue.length; ++k < A; ) u.queue[k].callRejected(_);
|
|
1576
|
-
return u;
|
|
1577
|
-
}, g.resolve = function(u) {
|
|
1578
|
-
return u instanceof this ? u : r.resolve(new this(a), u);
|
|
1579
|
-
}, g.reject = function(u) {
|
|
1580
|
-
var _ = new this(a);
|
|
1581
|
-
return r.reject(_, u);
|
|
1582
|
-
}, g.all = function(u) {
|
|
1583
|
-
var _ = this;
|
|
1584
|
-
if (Object.prototype.toString.call(u) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1585
|
-
var k = u.length, A = !1;
|
|
1586
|
-
if (!k) return this.resolve([]);
|
|
1587
|
-
for (var E = new Array(k), U = 0, B = -1, D = new this(a); ++B < k; ) R(u[B], B);
|
|
1588
|
-
return D;
|
|
1589
|
-
function R(Z, Y) {
|
|
1590
|
-
_.resolve(Z).then(function(b) {
|
|
1591
|
-
E[Y] = b, ++U !== k || A || (A = !0, r.resolve(D, E));
|
|
1592
|
-
}, function(b) {
|
|
1593
|
-
A || (A = !0, r.reject(D, b));
|
|
1594
|
-
});
|
|
1595
|
-
}
|
|
1596
|
-
}, g.race = function(u) {
|
|
1597
|
-
var _ = this;
|
|
1598
|
-
if (Object.prototype.toString.call(u) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1599
|
-
var k = u.length, A = !1;
|
|
1600
|
-
if (!k) return this.resolve([]);
|
|
1601
|
-
for (var E = -1, U = new this(a); ++E < k; ) B = u[E], _.resolve(B).then(function(D) {
|
|
1602
|
-
A || (A = !0, r.resolve(U, D));
|
|
1603
|
-
}, function(D) {
|
|
1604
|
-
A || (A = !0, r.reject(U, D));
|
|
1605
|
-
});
|
|
1606
|
-
var B;
|
|
1607
|
-
return U;
|
|
1608
|
-
};
|
|
1609
|
-
}, { immediate: 36 }], 38: [function(s, S, c) {
|
|
1610
|
-
var o = {};
|
|
1611
|
-
(0, s("./lib/utils/common").assign)(o, s("./lib/deflate"), s("./lib/inflate"), s("./lib/zlib/constants")), S.exports = o;
|
|
1612
|
-
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(s, S, c) {
|
|
1613
|
-
var o = s("./zlib/deflate"), a = s("./utils/common"), r = s("./utils/strings"), l = s("./zlib/messages"), d = s("./zlib/zstream"), w = Object.prototype.toString, g = 0, y = -1, n = 0, p = 8;
|
|
1614
|
-
function i(u) {
|
|
1615
|
-
if (!(this instanceof i)) return new i(u);
|
|
1616
|
-
this.options = a.assign({ level: y, method: p, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: n, to: "" }, u || {});
|
|
1617
|
-
var _ = this.options;
|
|
1618
|
-
_.raw && 0 < _.windowBits ? _.windowBits = -_.windowBits : _.gzip && 0 < _.windowBits && _.windowBits < 16 && (_.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new d(), this.strm.avail_out = 0;
|
|
1619
|
-
var k = o.deflateInit2(this.strm, _.level, _.method, _.windowBits, _.memLevel, _.strategy);
|
|
1620
|
-
if (k !== g) throw new Error(l[k]);
|
|
1621
|
-
if (_.header && o.deflateSetHeader(this.strm, _.header), _.dictionary) {
|
|
1622
|
-
var A;
|
|
1623
|
-
if (A = typeof _.dictionary == "string" ? r.string2buf(_.dictionary) : w.call(_.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(_.dictionary) : _.dictionary, (k = o.deflateSetDictionary(this.strm, A)) !== g) throw new Error(l[k]);
|
|
1624
|
-
this._dict_set = !0;
|
|
1625
|
-
}
|
|
1626
|
-
}
|
|
1627
|
-
function h(u, _) {
|
|
1628
|
-
var k = new i(_);
|
|
1629
|
-
if (k.push(u, !0), k.err) throw k.msg || l[k.err];
|
|
1630
|
-
return k.result;
|
|
1631
|
-
}
|
|
1632
|
-
i.prototype.push = function(u, _) {
|
|
1633
|
-
var k, A, E = this.strm, U = this.options.chunkSize;
|
|
1634
|
-
if (this.ended) return !1;
|
|
1635
|
-
A = _ === ~~_ ? _ : _ === !0 ? 4 : 0, typeof u == "string" ? E.input = r.string2buf(u) : w.call(u) === "[object ArrayBuffer]" ? E.input = new Uint8Array(u) : E.input = u, E.next_in = 0, E.avail_in = E.input.length;
|
|
1636
|
-
do {
|
|
1637
|
-
if (E.avail_out === 0 && (E.output = new a.Buf8(U), E.next_out = 0, E.avail_out = U), (k = o.deflate(E, A)) !== 1 && k !== g) return this.onEnd(k), !(this.ended = !0);
|
|
1638
|
-
E.avail_out !== 0 && (E.avail_in !== 0 || A !== 4 && A !== 2) || (this.options.to === "string" ? this.onData(r.buf2binstring(a.shrinkBuf(E.output, E.next_out))) : this.onData(a.shrinkBuf(E.output, E.next_out)));
|
|
1639
|
-
} while ((0 < E.avail_in || E.avail_out === 0) && k !== 1);
|
|
1640
|
-
return A === 4 ? (k = o.deflateEnd(this.strm), this.onEnd(k), this.ended = !0, k === g) : A !== 2 || (this.onEnd(g), !(E.avail_out = 0));
|
|
1641
|
-
}, i.prototype.onData = function(u) {
|
|
1642
|
-
this.chunks.push(u);
|
|
1643
|
-
}, i.prototype.onEnd = function(u) {
|
|
1644
|
-
u === g && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = a.flattenChunks(this.chunks)), this.chunks = [], this.err = u, this.msg = this.strm.msg;
|
|
1645
|
-
}, c.Deflate = i, c.deflate = h, c.deflateRaw = function(u, _) {
|
|
1646
|
-
return (_ = _ || {}).raw = !0, h(u, _);
|
|
1647
|
-
}, c.gzip = function(u, _) {
|
|
1648
|
-
return (_ = _ || {}).gzip = !0, h(u, _);
|
|
1649
|
-
};
|
|
1650
|
-
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(s, S, c) {
|
|
1651
|
-
var o = s("./zlib/inflate"), a = s("./utils/common"), r = s("./utils/strings"), l = s("./zlib/constants"), d = s("./zlib/messages"), w = s("./zlib/zstream"), g = s("./zlib/gzheader"), y = Object.prototype.toString;
|
|
1652
|
-
function n(i) {
|
|
1653
|
-
if (!(this instanceof n)) return new n(i);
|
|
1654
|
-
this.options = a.assign({ chunkSize: 16384, windowBits: 0, to: "" }, i || {});
|
|
1655
|
-
var h = this.options;
|
|
1656
|
-
h.raw && 0 <= h.windowBits && h.windowBits < 16 && (h.windowBits = -h.windowBits, h.windowBits === 0 && (h.windowBits = -15)), !(0 <= h.windowBits && h.windowBits < 16) || i && i.windowBits || (h.windowBits += 32), 15 < h.windowBits && h.windowBits < 48 && !(15 & h.windowBits) && (h.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new w(), this.strm.avail_out = 0;
|
|
1657
|
-
var u = o.inflateInit2(this.strm, h.windowBits);
|
|
1658
|
-
if (u !== l.Z_OK) throw new Error(d[u]);
|
|
1659
|
-
this.header = new g(), o.inflateGetHeader(this.strm, this.header);
|
|
1660
|
-
}
|
|
1661
|
-
function p(i, h) {
|
|
1662
|
-
var u = new n(h);
|
|
1663
|
-
if (u.push(i, !0), u.err) throw u.msg || d[u.err];
|
|
1664
|
-
return u.result;
|
|
1665
|
-
}
|
|
1666
|
-
n.prototype.push = function(i, h) {
|
|
1667
|
-
var u, _, k, A, E, U, B = this.strm, D = this.options.chunkSize, R = this.options.dictionary, Z = !1;
|
|
1668
|
-
if (this.ended) return !1;
|
|
1669
|
-
_ = h === ~~h ? h : h === !0 ? l.Z_FINISH : l.Z_NO_FLUSH, typeof i == "string" ? B.input = r.binstring2buf(i) : y.call(i) === "[object ArrayBuffer]" ? B.input = new Uint8Array(i) : B.input = i, B.next_in = 0, B.avail_in = B.input.length;
|
|
1670
|
-
do {
|
|
1671
|
-
if (B.avail_out === 0 && (B.output = new a.Buf8(D), B.next_out = 0, B.avail_out = D), (u = o.inflate(B, l.Z_NO_FLUSH)) === l.Z_NEED_DICT && R && (U = typeof R == "string" ? r.string2buf(R) : y.call(R) === "[object ArrayBuffer]" ? new Uint8Array(R) : R, u = o.inflateSetDictionary(this.strm, U)), u === l.Z_BUF_ERROR && Z === !0 && (u = l.Z_OK, Z = !1), u !== l.Z_STREAM_END && u !== l.Z_OK) return this.onEnd(u), !(this.ended = !0);
|
|
1672
|
-
B.next_out && (B.avail_out !== 0 && u !== l.Z_STREAM_END && (B.avail_in !== 0 || _ !== l.Z_FINISH && _ !== l.Z_SYNC_FLUSH) || (this.options.to === "string" ? (k = r.utf8border(B.output, B.next_out), A = B.next_out - k, E = r.buf2string(B.output, k), B.next_out = A, B.avail_out = D - A, A && a.arraySet(B.output, B.output, k, A, 0), this.onData(E)) : this.onData(a.shrinkBuf(B.output, B.next_out)))), B.avail_in === 0 && B.avail_out === 0 && (Z = !0);
|
|
1673
|
-
} while ((0 < B.avail_in || B.avail_out === 0) && u !== l.Z_STREAM_END);
|
|
1674
|
-
return u === l.Z_STREAM_END && (_ = l.Z_FINISH), _ === l.Z_FINISH ? (u = o.inflateEnd(this.strm), this.onEnd(u), this.ended = !0, u === l.Z_OK) : _ !== l.Z_SYNC_FLUSH || (this.onEnd(l.Z_OK), !(B.avail_out = 0));
|
|
1675
|
-
}, n.prototype.onData = function(i) {
|
|
1676
|
-
this.chunks.push(i);
|
|
1677
|
-
}, n.prototype.onEnd = function(i) {
|
|
1678
|
-
i === l.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = a.flattenChunks(this.chunks)), this.chunks = [], this.err = i, this.msg = this.strm.msg;
|
|
1679
|
-
}, c.Inflate = n, c.inflate = p, c.inflateRaw = function(i, h) {
|
|
1680
|
-
return (h = h || {}).raw = !0, p(i, h);
|
|
1681
|
-
}, c.ungzip = p;
|
|
1682
|
-
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(s, S, c) {
|
|
1683
|
-
var o = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
|
|
1684
|
-
c.assign = function(l) {
|
|
1685
|
-
for (var d = Array.prototype.slice.call(arguments, 1); d.length; ) {
|
|
1686
|
-
var w = d.shift();
|
|
1687
|
-
if (w) {
|
|
1688
|
-
if (typeof w != "object") throw new TypeError(w + "must be non-object");
|
|
1689
|
-
for (var g in w) w.hasOwnProperty(g) && (l[g] = w[g]);
|
|
1690
|
-
}
|
|
1691
|
-
}
|
|
1692
|
-
return l;
|
|
1693
|
-
}, c.shrinkBuf = function(l, d) {
|
|
1694
|
-
return l.length === d ? l : l.subarray ? l.subarray(0, d) : (l.length = d, l);
|
|
1695
|
-
};
|
|
1696
|
-
var a = { arraySet: function(l, d, w, g, y) {
|
|
1697
|
-
if (d.subarray && l.subarray) l.set(d.subarray(w, w + g), y);
|
|
1698
|
-
else for (var n = 0; n < g; n++) l[y + n] = d[w + n];
|
|
1699
|
-
}, flattenChunks: function(l) {
|
|
1700
|
-
var d, w, g, y, n, p;
|
|
1701
|
-
for (d = g = 0, w = l.length; d < w; d++) g += l[d].length;
|
|
1702
|
-
for (p = new Uint8Array(g), d = y = 0, w = l.length; d < w; d++) n = l[d], p.set(n, y), y += n.length;
|
|
1703
|
-
return p;
|
|
1704
|
-
} }, r = { arraySet: function(l, d, w, g, y) {
|
|
1705
|
-
for (var n = 0; n < g; n++) l[y + n] = d[w + n];
|
|
1706
|
-
}, flattenChunks: function(l) {
|
|
1707
|
-
return [].concat.apply([], l);
|
|
1708
|
-
} };
|
|
1709
|
-
c.setTyped = function(l) {
|
|
1710
|
-
l ? (c.Buf8 = Uint8Array, c.Buf16 = Uint16Array, c.Buf32 = Int32Array, c.assign(c, a)) : (c.Buf8 = Array, c.Buf16 = Array, c.Buf32 = Array, c.assign(c, r));
|
|
1711
|
-
}, c.setTyped(o);
|
|
1712
|
-
}, {}], 42: [function(s, S, c) {
|
|
1713
|
-
var o = s("./common"), a = !0, r = !0;
|
|
1714
|
-
try {
|
|
1715
|
-
String.fromCharCode.apply(null, [0]);
|
|
1716
|
-
} catch {
|
|
1717
|
-
a = !1;
|
|
1718
|
-
}
|
|
1719
|
-
try {
|
|
1720
|
-
String.fromCharCode.apply(null, new Uint8Array(1));
|
|
1721
|
-
} catch {
|
|
1722
|
-
r = !1;
|
|
1723
|
-
}
|
|
1724
|
-
for (var l = new o.Buf8(256), d = 0; d < 256; d++) l[d] = 252 <= d ? 6 : 248 <= d ? 5 : 240 <= d ? 4 : 224 <= d ? 3 : 192 <= d ? 2 : 1;
|
|
1725
|
-
function w(g, y) {
|
|
1726
|
-
if (y < 65537 && (g.subarray && r || !g.subarray && a)) return String.fromCharCode.apply(null, o.shrinkBuf(g, y));
|
|
1727
|
-
for (var n = "", p = 0; p < y; p++) n += String.fromCharCode(g[p]);
|
|
1728
|
-
return n;
|
|
1729
|
-
}
|
|
1730
|
-
l[254] = l[254] = 1, c.string2buf = function(g) {
|
|
1731
|
-
var y, n, p, i, h, u = g.length, _ = 0;
|
|
1732
|
-
for (i = 0; i < u; i++) (64512 & (n = g.charCodeAt(i))) == 55296 && i + 1 < u && (64512 & (p = g.charCodeAt(i + 1))) == 56320 && (n = 65536 + (n - 55296 << 10) + (p - 56320), i++), _ += n < 128 ? 1 : n < 2048 ? 2 : n < 65536 ? 3 : 4;
|
|
1733
|
-
for (y = new o.Buf8(_), i = h = 0; h < _; i++) (64512 & (n = g.charCodeAt(i))) == 55296 && i + 1 < u && (64512 & (p = g.charCodeAt(i + 1))) == 56320 && (n = 65536 + (n - 55296 << 10) + (p - 56320), i++), n < 128 ? y[h++] = n : (n < 2048 ? y[h++] = 192 | n >>> 6 : (n < 65536 ? y[h++] = 224 | n >>> 12 : (y[h++] = 240 | n >>> 18, y[h++] = 128 | n >>> 12 & 63), y[h++] = 128 | n >>> 6 & 63), y[h++] = 128 | 63 & n);
|
|
1734
|
-
return y;
|
|
1735
|
-
}, c.buf2binstring = function(g) {
|
|
1736
|
-
return w(g, g.length);
|
|
1737
|
-
}, c.binstring2buf = function(g) {
|
|
1738
|
-
for (var y = new o.Buf8(g.length), n = 0, p = y.length; n < p; n++) y[n] = g.charCodeAt(n);
|
|
1739
|
-
return y;
|
|
1740
|
-
}, c.buf2string = function(g, y) {
|
|
1741
|
-
var n, p, i, h, u = y || g.length, _ = new Array(2 * u);
|
|
1742
|
-
for (n = p = 0; n < u; ) if ((i = g[n++]) < 128) _[p++] = i;
|
|
1743
|
-
else if (4 < (h = l[i])) _[p++] = 65533, n += h - 1;
|
|
1744
|
-
else {
|
|
1745
|
-
for (i &= h === 2 ? 31 : h === 3 ? 15 : 7; 1 < h && n < u; ) i = i << 6 | 63 & g[n++], h--;
|
|
1746
|
-
1 < h ? _[p++] = 65533 : i < 65536 ? _[p++] = i : (i -= 65536, _[p++] = 55296 | i >> 10 & 1023, _[p++] = 56320 | 1023 & i);
|
|
1747
|
-
}
|
|
1748
|
-
return w(_, p);
|
|
1749
|
-
}, c.utf8border = function(g, y) {
|
|
1750
|
-
var n;
|
|
1751
|
-
for ((y = y || g.length) > g.length && (y = g.length), n = y - 1; 0 <= n && (192 & g[n]) == 128; ) n--;
|
|
1752
|
-
return n < 0 || n === 0 ? y : n + l[g[n]] > y ? n : y;
|
|
1753
|
-
};
|
|
1754
|
-
}, { "./common": 41 }], 43: [function(s, S, c) {
|
|
1755
|
-
S.exports = function(o, a, r, l) {
|
|
1756
|
-
for (var d = 65535 & o | 0, w = o >>> 16 & 65535 | 0, g = 0; r !== 0; ) {
|
|
1757
|
-
for (r -= g = 2e3 < r ? 2e3 : r; w = w + (d = d + a[l++] | 0) | 0, --g; ) ;
|
|
1758
|
-
d %= 65521, w %= 65521;
|
|
1759
|
-
}
|
|
1760
|
-
return d | w << 16 | 0;
|
|
1761
|
-
};
|
|
1762
|
-
}, {}], 44: [function(s, S, c) {
|
|
1763
|
-
S.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 };
|
|
1764
|
-
}, {}], 45: [function(s, S, c) {
|
|
1765
|
-
var o = function() {
|
|
1766
|
-
for (var a, r = [], l = 0; l < 256; l++) {
|
|
1767
|
-
a = l;
|
|
1768
|
-
for (var d = 0; d < 8; d++) a = 1 & a ? 3988292384 ^ a >>> 1 : a >>> 1;
|
|
1769
|
-
r[l] = a;
|
|
1770
|
-
}
|
|
1771
|
-
return r;
|
|
1772
|
-
}();
|
|
1773
|
-
S.exports = function(a, r, l, d) {
|
|
1774
|
-
var w = o, g = d + l;
|
|
1775
|
-
a ^= -1;
|
|
1776
|
-
for (var y = d; y < g; y++) a = a >>> 8 ^ w[255 & (a ^ r[y])];
|
|
1777
|
-
return -1 ^ a;
|
|
1778
|
-
};
|
|
1779
|
-
}, {}], 46: [function(s, S, c) {
|
|
1780
|
-
var o, a = s("../utils/common"), r = s("./trees"), l = s("./adler32"), d = s("./crc32"), w = s("./messages"), g = 0, y = 4, n = 0, p = -2, i = -1, h = 4, u = 2, _ = 8, k = 9, A = 286, E = 30, U = 19, B = 2 * A + 1, D = 15, R = 3, Z = 258, Y = Z + R + 1, b = 42, O = 113, e = 1, F = 2, Q = 3, W = 4;
|
|
1781
|
-
function et(t, P) {
|
|
1782
|
-
return t.msg = w[P], P;
|
|
1783
|
-
}
|
|
1784
|
-
function I(t) {
|
|
1785
|
-
return (t << 1) - (4 < t ? 9 : 0);
|
|
1786
|
-
}
|
|
1787
|
-
function q(t) {
|
|
1788
|
-
for (var P = t.length; 0 <= --P; ) t[P] = 0;
|
|
1789
|
-
}
|
|
1790
|
-
function x(t) {
|
|
1791
|
-
var P = t.state, T = P.pending;
|
|
1792
|
-
T > t.avail_out && (T = t.avail_out), T !== 0 && (a.arraySet(t.output, P.pending_buf, P.pending_out, T, t.next_out), t.next_out += T, P.pending_out += T, t.total_out += T, t.avail_out -= T, P.pending -= T, P.pending === 0 && (P.pending_out = 0));
|
|
1793
|
-
}
|
|
1794
|
-
function v(t, P) {
|
|
1795
|
-
r._tr_flush_block(t, 0 <= t.block_start ? t.block_start : -1, t.strstart - t.block_start, P), t.block_start = t.strstart, x(t.strm);
|
|
1796
|
-
}
|
|
1797
|
-
function G(t, P) {
|
|
1798
|
-
t.pending_buf[t.pending++] = P;
|
|
1799
|
-
}
|
|
1800
|
-
function N(t, P) {
|
|
1801
|
-
t.pending_buf[t.pending++] = P >>> 8 & 255, t.pending_buf[t.pending++] = 255 & P;
|
|
1802
|
-
}
|
|
1803
|
-
function $(t, P) {
|
|
1804
|
-
var T, m, f = t.max_chain_length, C = t.strstart, j = t.prev_length, M = t.nice_match, z = t.strstart > t.w_size - Y ? t.strstart - (t.w_size - Y) : 0, H = t.window, X = t.w_mask, V = t.prev, J = t.strstart + Z, lt = H[C + j - 1], it = H[C + j];
|
|
1805
|
-
t.prev_length >= t.good_match && (f >>= 2), M > t.lookahead && (M = t.lookahead);
|
|
1806
|
-
do
|
|
1807
|
-
if (H[(T = P) + j] === it && H[T + j - 1] === lt && H[T] === H[C] && H[++T] === H[C + 1]) {
|
|
1808
|
-
C += 2, T++;
|
|
1809
|
-
do
|
|
1810
|
-
;
|
|
1811
|
-
while (H[++C] === H[++T] && H[++C] === H[++T] && H[++C] === H[++T] && H[++C] === H[++T] && H[++C] === H[++T] && H[++C] === H[++T] && H[++C] === H[++T] && H[++C] === H[++T] && C < J);
|
|
1812
|
-
if (m = Z - (J - C), C = J - Z, j < m) {
|
|
1813
|
-
if (t.match_start = P, M <= (j = m)) break;
|
|
1814
|
-
lt = H[C + j - 1], it = H[C + j];
|
|
1815
|
-
}
|
|
1816
|
-
}
|
|
1817
|
-
while ((P = V[P & X]) > z && --f != 0);
|
|
1818
|
-
return j <= t.lookahead ? j : t.lookahead;
|
|
1819
|
-
}
|
|
1820
|
-
function rt(t) {
|
|
1821
|
-
var P, T, m, f, C, j, M, z, H, X, V = t.w_size;
|
|
1822
|
-
do {
|
|
1823
|
-
if (f = t.window_size - t.lookahead - t.strstart, t.strstart >= V + (V - Y)) {
|
|
1824
|
-
for (a.arraySet(t.window, t.window, V, V, 0), t.match_start -= V, t.strstart -= V, t.block_start -= V, P = T = t.hash_size; m = t.head[--P], t.head[P] = V <= m ? m - V : 0, --T; ) ;
|
|
1825
|
-
for (P = T = V; m = t.prev[--P], t.prev[P] = V <= m ? m - V : 0, --T; ) ;
|
|
1826
|
-
f += V;
|
|
1827
|
-
}
|
|
1828
|
-
if (t.strm.avail_in === 0) break;
|
|
1829
|
-
if (j = t.strm, M = t.window, z = t.strstart + t.lookahead, H = f, X = void 0, X = j.avail_in, H < X && (X = H), T = X === 0 ? 0 : (j.avail_in -= X, a.arraySet(M, j.input, j.next_in, X, z), j.state.wrap === 1 ? j.adler = l(j.adler, M, X, z) : j.state.wrap === 2 && (j.adler = d(j.adler, M, X, z)), j.next_in += X, j.total_in += X, X), t.lookahead += T, t.lookahead + t.insert >= R) for (C = t.strstart - t.insert, t.ins_h = t.window[C], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[C + 1]) & t.hash_mask; t.insert && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[C + R - 1]) & t.hash_mask, t.prev[C & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = C, C++, t.insert--, !(t.lookahead + t.insert < R)); ) ;
|
|
1830
|
-
} while (t.lookahead < Y && t.strm.avail_in !== 0);
|
|
1831
|
-
}
|
|
1832
|
-
function at(t, P) {
|
|
1833
|
-
for (var T, m; ; ) {
|
|
1834
|
-
if (t.lookahead < Y) {
|
|
1835
|
-
if (rt(t), t.lookahead < Y && P === g) return e;
|
|
1836
|
-
if (t.lookahead === 0) break;
|
|
1837
|
-
}
|
|
1838
|
-
if (T = 0, t.lookahead >= R && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + R - 1]) & t.hash_mask, T = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), T !== 0 && t.strstart - T <= t.w_size - Y && (t.match_length = $(t, T)), t.match_length >= R) if (m = r._tr_tally(t, t.strstart - t.match_start, t.match_length - R), t.lookahead -= t.match_length, t.match_length <= t.max_lazy_match && t.lookahead >= R) {
|
|
1839
|
-
for (t.match_length--; t.strstart++, t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + R - 1]) & t.hash_mask, T = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart, --t.match_length != 0; ) ;
|
|
1840
|
-
t.strstart++;
|
|
1841
|
-
} else t.strstart += t.match_length, t.match_length = 0, t.ins_h = t.window[t.strstart], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + 1]) & t.hash_mask;
|
|
1842
|
-
else m = r._tr_tally(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++;
|
|
1843
|
-
if (m && (v(t, !1), t.strm.avail_out === 0)) return e;
|
|
1844
|
-
}
|
|
1845
|
-
return t.insert = t.strstart < R - 1 ? t.strstart : R - 1, P === y ? (v(t, !0), t.strm.avail_out === 0 ? Q : W) : t.last_lit && (v(t, !1), t.strm.avail_out === 0) ? e : F;
|
|
1846
|
-
}
|
|
1847
|
-
function tt(t, P) {
|
|
1848
|
-
for (var T, m, f; ; ) {
|
|
1849
|
-
if (t.lookahead < Y) {
|
|
1850
|
-
if (rt(t), t.lookahead < Y && P === g) return e;
|
|
1851
|
-
if (t.lookahead === 0) break;
|
|
1852
|
-
}
|
|
1853
|
-
if (T = 0, t.lookahead >= R && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + R - 1]) & t.hash_mask, T = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), t.prev_length = t.match_length, t.prev_match = t.match_start, t.match_length = R - 1, T !== 0 && t.prev_length < t.max_lazy_match && t.strstart - T <= t.w_size - Y && (t.match_length = $(t, T), t.match_length <= 5 && (t.strategy === 1 || t.match_length === R && 4096 < t.strstart - t.match_start) && (t.match_length = R - 1)), t.prev_length >= R && t.match_length <= t.prev_length) {
|
|
1854
|
-
for (f = t.strstart + t.lookahead - R, m = r._tr_tally(t, t.strstart - 1 - t.prev_match, t.prev_length - R), t.lookahead -= t.prev_length - 1, t.prev_length -= 2; ++t.strstart <= f && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + R - 1]) & t.hash_mask, T = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), --t.prev_length != 0; ) ;
|
|
1855
|
-
if (t.match_available = 0, t.match_length = R - 1, t.strstart++, m && (v(t, !1), t.strm.avail_out === 0)) return e;
|
|
1856
|
-
} else if (t.match_available) {
|
|
1857
|
-
if ((m = r._tr_tally(t, 0, t.window[t.strstart - 1])) && v(t, !1), t.strstart++, t.lookahead--, t.strm.avail_out === 0) return e;
|
|
1858
|
-
} else t.match_available = 1, t.strstart++, t.lookahead--;
|
|
1859
|
-
}
|
|
1860
|
-
return t.match_available && (m = r._tr_tally(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart < R - 1 ? t.strstart : R - 1, P === y ? (v(t, !0), t.strm.avail_out === 0 ? Q : W) : t.last_lit && (v(t, !1), t.strm.avail_out === 0) ? e : F;
|
|
1861
|
-
}
|
|
1862
|
-
function nt(t, P, T, m, f) {
|
|
1863
|
-
this.good_length = t, this.max_lazy = P, this.nice_length = T, this.max_chain = m, this.func = f;
|
|
1864
|
-
}
|
|
1865
|
-
function ot() {
|
|
1866
|
-
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 = _, 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 a.Buf16(2 * B), this.dyn_dtree = new a.Buf16(2 * (2 * E + 1)), this.bl_tree = new a.Buf16(2 * (2 * U + 1)), q(this.dyn_ltree), q(this.dyn_dtree), q(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new a.Buf16(D + 1), this.heap = new a.Buf16(2 * A + 1), q(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new a.Buf16(2 * A + 1), q(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;
|
|
1867
|
-
}
|
|
1868
|
-
function st(t) {
|
|
1869
|
-
var P;
|
|
1870
|
-
return t && t.state ? (t.total_in = t.total_out = 0, t.data_type = u, (P = t.state).pending = 0, P.pending_out = 0, P.wrap < 0 && (P.wrap = -P.wrap), P.status = P.wrap ? b : O, t.adler = P.wrap === 2 ? 0 : 1, P.last_flush = g, r._tr_init(P), n) : et(t, p);
|
|
1871
|
-
}
|
|
1872
|
-
function ut(t) {
|
|
1873
|
-
var P = st(t);
|
|
1874
|
-
return P === n && function(T) {
|
|
1875
|
-
T.window_size = 2 * T.w_size, q(T.head), T.max_lazy_match = o[T.level].max_lazy, T.good_match = o[T.level].good_length, T.nice_match = o[T.level].nice_length, T.max_chain_length = o[T.level].max_chain, T.strstart = 0, T.block_start = 0, T.lookahead = 0, T.insert = 0, T.match_length = T.prev_length = R - 1, T.match_available = 0, T.ins_h = 0;
|
|
1876
|
-
}(t.state), P;
|
|
1877
|
-
}
|
|
1878
|
-
function dt(t, P, T, m, f, C) {
|
|
1879
|
-
if (!t) return p;
|
|
1880
|
-
var j = 1;
|
|
1881
|
-
if (P === i && (P = 6), m < 0 ? (j = 0, m = -m) : 15 < m && (j = 2, m -= 16), f < 1 || k < f || T !== _ || m < 8 || 15 < m || P < 0 || 9 < P || C < 0 || h < C) return et(t, p);
|
|
1882
|
-
m === 8 && (m = 9);
|
|
1883
|
-
var M = new ot();
|
|
1884
|
-
return (t.state = M).strm = t, M.wrap = j, M.gzhead = null, M.w_bits = m, M.w_size = 1 << M.w_bits, M.w_mask = M.w_size - 1, M.hash_bits = f + 7, M.hash_size = 1 << M.hash_bits, M.hash_mask = M.hash_size - 1, M.hash_shift = ~~((M.hash_bits + R - 1) / R), M.window = new a.Buf8(2 * M.w_size), M.head = new a.Buf16(M.hash_size), M.prev = new a.Buf16(M.w_size), M.lit_bufsize = 1 << f + 6, M.pending_buf_size = 4 * M.lit_bufsize, M.pending_buf = new a.Buf8(M.pending_buf_size), M.d_buf = 1 * M.lit_bufsize, M.l_buf = 3 * M.lit_bufsize, M.level = P, M.strategy = C, M.method = T, ut(t);
|
|
1885
|
-
}
|
|
1886
|
-
o = [new nt(0, 0, 0, 0, function(t, P) {
|
|
1887
|
-
var T = 65535;
|
|
1888
|
-
for (T > t.pending_buf_size - 5 && (T = t.pending_buf_size - 5); ; ) {
|
|
1889
|
-
if (t.lookahead <= 1) {
|
|
1890
|
-
if (rt(t), t.lookahead === 0 && P === g) return e;
|
|
1891
|
-
if (t.lookahead === 0) break;
|
|
1892
|
-
}
|
|
1893
|
-
t.strstart += t.lookahead, t.lookahead = 0;
|
|
1894
|
-
var m = t.block_start + T;
|
|
1895
|
-
if ((t.strstart === 0 || t.strstart >= m) && (t.lookahead = t.strstart - m, t.strstart = m, v(t, !1), t.strm.avail_out === 0) || t.strstart - t.block_start >= t.w_size - Y && (v(t, !1), t.strm.avail_out === 0)) return e;
|
|
1896
|
-
}
|
|
1897
|
-
return t.insert = 0, P === y ? (v(t, !0), t.strm.avail_out === 0 ? Q : W) : (t.strstart > t.block_start && (v(t, !1), t.strm.avail_out), e);
|
|
1898
|
-
}), new nt(4, 4, 8, 4, at), new nt(4, 5, 16, 8, at), new nt(4, 6, 32, 32, at), new nt(4, 4, 16, 16, tt), new nt(8, 16, 32, 32, tt), new nt(8, 16, 128, 128, tt), new nt(8, 32, 128, 256, tt), new nt(32, 128, 258, 1024, tt), new nt(32, 258, 258, 4096, tt)], c.deflateInit = function(t, P) {
|
|
1899
|
-
return dt(t, P, _, 15, 8, 0);
|
|
1900
|
-
}, c.deflateInit2 = dt, c.deflateReset = ut, c.deflateResetKeep = st, c.deflateSetHeader = function(t, P) {
|
|
1901
|
-
return t && t.state ? t.state.wrap !== 2 ? p : (t.state.gzhead = P, n) : p;
|
|
1902
|
-
}, c.deflate = function(t, P) {
|
|
1903
|
-
var T, m, f, C;
|
|
1904
|
-
if (!t || !t.state || 5 < P || P < 0) return t ? et(t, p) : p;
|
|
1905
|
-
if (m = t.state, !t.output || !t.input && t.avail_in !== 0 || m.status === 666 && P !== y) return et(t, t.avail_out === 0 ? -5 : p);
|
|
1906
|
-
if (m.strm = t, T = m.last_flush, m.last_flush = P, m.status === b) if (m.wrap === 2) t.adler = 0, G(m, 31), G(m, 139), G(m, 8), m.gzhead ? (G(m, (m.gzhead.text ? 1 : 0) + (m.gzhead.hcrc ? 2 : 0) + (m.gzhead.extra ? 4 : 0) + (m.gzhead.name ? 8 : 0) + (m.gzhead.comment ? 16 : 0)), G(m, 255 & m.gzhead.time), G(m, m.gzhead.time >> 8 & 255), G(m, m.gzhead.time >> 16 & 255), G(m, m.gzhead.time >> 24 & 255), G(m, m.level === 9 ? 2 : 2 <= m.strategy || m.level < 2 ? 4 : 0), G(m, 255 & m.gzhead.os), m.gzhead.extra && m.gzhead.extra.length && (G(m, 255 & m.gzhead.extra.length), G(m, m.gzhead.extra.length >> 8 & 255)), m.gzhead.hcrc && (t.adler = d(t.adler, m.pending_buf, m.pending, 0)), m.gzindex = 0, m.status = 69) : (G(m, 0), G(m, 0), G(m, 0), G(m, 0), G(m, 0), G(m, m.level === 9 ? 2 : 2 <= m.strategy || m.level < 2 ? 4 : 0), G(m, 3), m.status = O);
|
|
1907
|
-
else {
|
|
1908
|
-
var j = _ + (m.w_bits - 8 << 4) << 8;
|
|
1909
|
-
j |= (2 <= m.strategy || m.level < 2 ? 0 : m.level < 6 ? 1 : m.level === 6 ? 2 : 3) << 6, m.strstart !== 0 && (j |= 32), j += 31 - j % 31, m.status = O, N(m, j), m.strstart !== 0 && (N(m, t.adler >>> 16), N(m, 65535 & t.adler)), t.adler = 1;
|
|
1910
|
-
}
|
|
1911
|
-
if (m.status === 69) if (m.gzhead.extra) {
|
|
1912
|
-
for (f = m.pending; m.gzindex < (65535 & m.gzhead.extra.length) && (m.pending !== m.pending_buf_size || (m.gzhead.hcrc && m.pending > f && (t.adler = d(t.adler, m.pending_buf, m.pending - f, f)), x(t), f = m.pending, m.pending !== m.pending_buf_size)); ) G(m, 255 & m.gzhead.extra[m.gzindex]), m.gzindex++;
|
|
1913
|
-
m.gzhead.hcrc && m.pending > f && (t.adler = d(t.adler, m.pending_buf, m.pending - f, f)), m.gzindex === m.gzhead.extra.length && (m.gzindex = 0, m.status = 73);
|
|
1914
|
-
} else m.status = 73;
|
|
1915
|
-
if (m.status === 73) if (m.gzhead.name) {
|
|
1916
|
-
f = m.pending;
|
|
1917
|
-
do {
|
|
1918
|
-
if (m.pending === m.pending_buf_size && (m.gzhead.hcrc && m.pending > f && (t.adler = d(t.adler, m.pending_buf, m.pending - f, f)), x(t), f = m.pending, m.pending === m.pending_buf_size)) {
|
|
1919
|
-
C = 1;
|
|
1920
|
-
break;
|
|
1921
|
-
}
|
|
1922
|
-
C = m.gzindex < m.gzhead.name.length ? 255 & m.gzhead.name.charCodeAt(m.gzindex++) : 0, G(m, C);
|
|
1923
|
-
} while (C !== 0);
|
|
1924
|
-
m.gzhead.hcrc && m.pending > f && (t.adler = d(t.adler, m.pending_buf, m.pending - f, f)), C === 0 && (m.gzindex = 0, m.status = 91);
|
|
1925
|
-
} else m.status = 91;
|
|
1926
|
-
if (m.status === 91) if (m.gzhead.comment) {
|
|
1927
|
-
f = m.pending;
|
|
1928
|
-
do {
|
|
1929
|
-
if (m.pending === m.pending_buf_size && (m.gzhead.hcrc && m.pending > f && (t.adler = d(t.adler, m.pending_buf, m.pending - f, f)), x(t), f = m.pending, m.pending === m.pending_buf_size)) {
|
|
1930
|
-
C = 1;
|
|
1931
|
-
break;
|
|
1932
|
-
}
|
|
1933
|
-
C = m.gzindex < m.gzhead.comment.length ? 255 & m.gzhead.comment.charCodeAt(m.gzindex++) : 0, G(m, C);
|
|
1934
|
-
} while (C !== 0);
|
|
1935
|
-
m.gzhead.hcrc && m.pending > f && (t.adler = d(t.adler, m.pending_buf, m.pending - f, f)), C === 0 && (m.status = 103);
|
|
1936
|
-
} else m.status = 103;
|
|
1937
|
-
if (m.status === 103 && (m.gzhead.hcrc ? (m.pending + 2 > m.pending_buf_size && x(t), m.pending + 2 <= m.pending_buf_size && (G(m, 255 & t.adler), G(m, t.adler >> 8 & 255), t.adler = 0, m.status = O)) : m.status = O), m.pending !== 0) {
|
|
1938
|
-
if (x(t), t.avail_out === 0) return m.last_flush = -1, n;
|
|
1939
|
-
} else if (t.avail_in === 0 && I(P) <= I(T) && P !== y) return et(t, -5);
|
|
1940
|
-
if (m.status === 666 && t.avail_in !== 0) return et(t, -5);
|
|
1941
|
-
if (t.avail_in !== 0 || m.lookahead !== 0 || P !== g && m.status !== 666) {
|
|
1942
|
-
var M = m.strategy === 2 ? function(z, H) {
|
|
1943
|
-
for (var X; ; ) {
|
|
1944
|
-
if (z.lookahead === 0 && (rt(z), z.lookahead === 0)) {
|
|
1945
|
-
if (H === g) return e;
|
|
1946
|
-
break;
|
|
1947
|
-
}
|
|
1948
|
-
if (z.match_length = 0, X = r._tr_tally(z, 0, z.window[z.strstart]), z.lookahead--, z.strstart++, X && (v(z, !1), z.strm.avail_out === 0)) return e;
|
|
1949
|
-
}
|
|
1950
|
-
return z.insert = 0, H === y ? (v(z, !0), z.strm.avail_out === 0 ? Q : W) : z.last_lit && (v(z, !1), z.strm.avail_out === 0) ? e : F;
|
|
1951
|
-
}(m, P) : m.strategy === 3 ? function(z, H) {
|
|
1952
|
-
for (var X, V, J, lt, it = z.window; ; ) {
|
|
1953
|
-
if (z.lookahead <= Z) {
|
|
1954
|
-
if (rt(z), z.lookahead <= Z && H === g) return e;
|
|
1955
|
-
if (z.lookahead === 0) break;
|
|
1956
|
-
}
|
|
1957
|
-
if (z.match_length = 0, z.lookahead >= R && 0 < z.strstart && (V = it[J = z.strstart - 1]) === it[++J] && V === it[++J] && V === it[++J]) {
|
|
1958
|
-
lt = z.strstart + Z;
|
|
1959
|
-
do
|
|
1960
|
-
;
|
|
1961
|
-
while (V === it[++J] && V === it[++J] && V === it[++J] && V === it[++J] && V === it[++J] && V === it[++J] && V === it[++J] && V === it[++J] && J < lt);
|
|
1962
|
-
z.match_length = Z - (lt - J), z.match_length > z.lookahead && (z.match_length = z.lookahead);
|
|
1963
|
-
}
|
|
1964
|
-
if (z.match_length >= R ? (X = r._tr_tally(z, 1, z.match_length - R), z.lookahead -= z.match_length, z.strstart += z.match_length, z.match_length = 0) : (X = r._tr_tally(z, 0, z.window[z.strstart]), z.lookahead--, z.strstart++), X && (v(z, !1), z.strm.avail_out === 0)) return e;
|
|
1965
|
-
}
|
|
1966
|
-
return z.insert = 0, H === y ? (v(z, !0), z.strm.avail_out === 0 ? Q : W) : z.last_lit && (v(z, !1), z.strm.avail_out === 0) ? e : F;
|
|
1967
|
-
}(m, P) : o[m.level].func(m, P);
|
|
1968
|
-
if (M !== Q && M !== W || (m.status = 666), M === e || M === Q) return t.avail_out === 0 && (m.last_flush = -1), n;
|
|
1969
|
-
if (M === F && (P === 1 ? r._tr_align(m) : P !== 5 && (r._tr_stored_block(m, 0, 0, !1), P === 3 && (q(m.head), m.lookahead === 0 && (m.strstart = 0, m.block_start = 0, m.insert = 0))), x(t), t.avail_out === 0)) return m.last_flush = -1, n;
|
|
1970
|
-
}
|
|
1971
|
-
return P !== y ? n : m.wrap <= 0 ? 1 : (m.wrap === 2 ? (G(m, 255 & t.adler), G(m, t.adler >> 8 & 255), G(m, t.adler >> 16 & 255), G(m, t.adler >> 24 & 255), G(m, 255 & t.total_in), G(m, t.total_in >> 8 & 255), G(m, t.total_in >> 16 & 255), G(m, t.total_in >> 24 & 255)) : (N(m, t.adler >>> 16), N(m, 65535 & t.adler)), x(t), 0 < m.wrap && (m.wrap = -m.wrap), m.pending !== 0 ? n : 1);
|
|
1972
|
-
}, c.deflateEnd = function(t) {
|
|
1973
|
-
var P;
|
|
1974
|
-
return t && t.state ? (P = t.state.status) !== b && P !== 69 && P !== 73 && P !== 91 && P !== 103 && P !== O && P !== 666 ? et(t, p) : (t.state = null, P === O ? et(t, -3) : n) : p;
|
|
1975
|
-
}, c.deflateSetDictionary = function(t, P) {
|
|
1976
|
-
var T, m, f, C, j, M, z, H, X = P.length;
|
|
1977
|
-
if (!t || !t.state || (C = (T = t.state).wrap) === 2 || C === 1 && T.status !== b || T.lookahead) return p;
|
|
1978
|
-
for (C === 1 && (t.adler = l(t.adler, P, X, 0)), T.wrap = 0, X >= T.w_size && (C === 0 && (q(T.head), T.strstart = 0, T.block_start = 0, T.insert = 0), H = new a.Buf8(T.w_size), a.arraySet(H, P, X - T.w_size, T.w_size, 0), P = H, X = T.w_size), j = t.avail_in, M = t.next_in, z = t.input, t.avail_in = X, t.next_in = 0, t.input = P, rt(T); T.lookahead >= R; ) {
|
|
1979
|
-
for (m = T.strstart, f = T.lookahead - (R - 1); T.ins_h = (T.ins_h << T.hash_shift ^ T.window[m + R - 1]) & T.hash_mask, T.prev[m & T.w_mask] = T.head[T.ins_h], T.head[T.ins_h] = m, m++, --f; ) ;
|
|
1980
|
-
T.strstart = m, T.lookahead = R - 1, rt(T);
|
|
1981
|
-
}
|
|
1982
|
-
return T.strstart += T.lookahead, T.block_start = T.strstart, T.insert = T.lookahead, T.lookahead = 0, T.match_length = T.prev_length = R - 1, T.match_available = 0, t.next_in = M, t.input = z, t.avail_in = j, T.wrap = C, n;
|
|
1983
|
-
}, c.deflateInfo = "pako deflate (from Nodeca project)";
|
|
1984
|
-
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(s, S, c) {
|
|
1985
|
-
S.exports = function() {
|
|
1986
|
-
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;
|
|
1987
|
-
};
|
|
1988
|
-
}, {}], 48: [function(s, S, c) {
|
|
1989
|
-
S.exports = function(o, a) {
|
|
1990
|
-
var r, l, d, w, g, y, n, p, i, h, u, _, k, A, E, U, B, D, R, Z, Y, b, O, e, F;
|
|
1991
|
-
r = o.state, l = o.next_in, e = o.input, d = l + (o.avail_in - 5), w = o.next_out, F = o.output, g = w - (a - o.avail_out), y = w + (o.avail_out - 257), n = r.dmax, p = r.wsize, i = r.whave, h = r.wnext, u = r.window, _ = r.hold, k = r.bits, A = r.lencode, E = r.distcode, U = (1 << r.lenbits) - 1, B = (1 << r.distbits) - 1;
|
|
1992
|
-
t: do {
|
|
1993
|
-
k < 15 && (_ += e[l++] << k, k += 8, _ += e[l++] << k, k += 8), D = A[_ & U];
|
|
1994
|
-
e: for (; ; ) {
|
|
1995
|
-
if (_ >>>= R = D >>> 24, k -= R, (R = D >>> 16 & 255) === 0) F[w++] = 65535 & D;
|
|
1996
|
-
else {
|
|
1997
|
-
if (!(16 & R)) {
|
|
1998
|
-
if (!(64 & R)) {
|
|
1999
|
-
D = A[(65535 & D) + (_ & (1 << R) - 1)];
|
|
2000
|
-
continue e;
|
|
2001
|
-
}
|
|
2002
|
-
if (32 & R) {
|
|
2003
|
-
r.mode = 12;
|
|
2004
|
-
break t;
|
|
2005
|
-
}
|
|
2006
|
-
o.msg = "invalid literal/length code", r.mode = 30;
|
|
2007
|
-
break t;
|
|
2008
|
-
}
|
|
2009
|
-
Z = 65535 & D, (R &= 15) && (k < R && (_ += e[l++] << k, k += 8), Z += _ & (1 << R) - 1, _ >>>= R, k -= R), k < 15 && (_ += e[l++] << k, k += 8, _ += e[l++] << k, k += 8), D = E[_ & B];
|
|
2010
|
-
r: for (; ; ) {
|
|
2011
|
-
if (_ >>>= R = D >>> 24, k -= R, !(16 & (R = D >>> 16 & 255))) {
|
|
2012
|
-
if (!(64 & R)) {
|
|
2013
|
-
D = E[(65535 & D) + (_ & (1 << R) - 1)];
|
|
2014
|
-
continue r;
|
|
2015
|
-
}
|
|
2016
|
-
o.msg = "invalid distance code", r.mode = 30;
|
|
2017
|
-
break t;
|
|
2018
|
-
}
|
|
2019
|
-
if (Y = 65535 & D, k < (R &= 15) && (_ += e[l++] << k, (k += 8) < R && (_ += e[l++] << k, k += 8)), n < (Y += _ & (1 << R) - 1)) {
|
|
2020
|
-
o.msg = "invalid distance too far back", r.mode = 30;
|
|
2021
|
-
break t;
|
|
2022
|
-
}
|
|
2023
|
-
if (_ >>>= R, k -= R, (R = w - g) < Y) {
|
|
2024
|
-
if (i < (R = Y - R) && r.sane) {
|
|
2025
|
-
o.msg = "invalid distance too far back", r.mode = 30;
|
|
2026
|
-
break t;
|
|
2027
|
-
}
|
|
2028
|
-
if (O = u, (b = 0) === h) {
|
|
2029
|
-
if (b += p - R, R < Z) {
|
|
2030
|
-
for (Z -= R; F[w++] = u[b++], --R; ) ;
|
|
2031
|
-
b = w - Y, O = F;
|
|
2032
|
-
}
|
|
2033
|
-
} else if (h < R) {
|
|
2034
|
-
if (b += p + h - R, (R -= h) < Z) {
|
|
2035
|
-
for (Z -= R; F[w++] = u[b++], --R; ) ;
|
|
2036
|
-
if (b = 0, h < Z) {
|
|
2037
|
-
for (Z -= R = h; F[w++] = u[b++], --R; ) ;
|
|
2038
|
-
b = w - Y, O = F;
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
} else if (b += h - R, R < Z) {
|
|
2042
|
-
for (Z -= R; F[w++] = u[b++], --R; ) ;
|
|
2043
|
-
b = w - Y, O = F;
|
|
2044
|
-
}
|
|
2045
|
-
for (; 2 < Z; ) F[w++] = O[b++], F[w++] = O[b++], F[w++] = O[b++], Z -= 3;
|
|
2046
|
-
Z && (F[w++] = O[b++], 1 < Z && (F[w++] = O[b++]));
|
|
2047
|
-
} else {
|
|
2048
|
-
for (b = w - Y; F[w++] = F[b++], F[w++] = F[b++], F[w++] = F[b++], 2 < (Z -= 3); ) ;
|
|
2049
|
-
Z && (F[w++] = F[b++], 1 < Z && (F[w++] = F[b++]));
|
|
2050
|
-
}
|
|
2051
|
-
break;
|
|
2052
|
-
}
|
|
2053
|
-
}
|
|
2054
|
-
break;
|
|
2055
|
-
}
|
|
2056
|
-
} while (l < d && w < y);
|
|
2057
|
-
l -= Z = k >> 3, _ &= (1 << (k -= Z << 3)) - 1, o.next_in = l, o.next_out = w, o.avail_in = l < d ? d - l + 5 : 5 - (l - d), o.avail_out = w < y ? y - w + 257 : 257 - (w - y), r.hold = _, r.bits = k;
|
|
2058
|
-
};
|
|
2059
|
-
}, {}], 49: [function(s, S, c) {
|
|
2060
|
-
var o = s("../utils/common"), a = s("./adler32"), r = s("./crc32"), l = s("./inffast"), d = s("./inftrees"), w = 1, g = 2, y = 0, n = -2, p = 1, i = 852, h = 592;
|
|
2061
|
-
function u(b) {
|
|
2062
|
-
return (b >>> 24 & 255) + (b >>> 8 & 65280) + ((65280 & b) << 8) + ((255 & b) << 24);
|
|
2063
|
-
}
|
|
2064
|
-
function _() {
|
|
2065
|
-
this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new o.Buf16(320), this.work = new o.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
2066
|
-
}
|
|
2067
|
-
function k(b) {
|
|
2068
|
-
var O;
|
|
2069
|
-
return b && b.state ? (O = b.state, b.total_in = b.total_out = O.total = 0, b.msg = "", O.wrap && (b.adler = 1 & O.wrap), O.mode = p, O.last = 0, O.havedict = 0, O.dmax = 32768, O.head = null, O.hold = 0, O.bits = 0, O.lencode = O.lendyn = new o.Buf32(i), O.distcode = O.distdyn = new o.Buf32(h), O.sane = 1, O.back = -1, y) : n;
|
|
2070
|
-
}
|
|
2071
|
-
function A(b) {
|
|
2072
|
-
var O;
|
|
2073
|
-
return b && b.state ? ((O = b.state).wsize = 0, O.whave = 0, O.wnext = 0, k(b)) : n;
|
|
2074
|
-
}
|
|
2075
|
-
function E(b, O) {
|
|
2076
|
-
var e, F;
|
|
2077
|
-
return b && b.state ? (F = b.state, O < 0 ? (e = 0, O = -O) : (e = 1 + (O >> 4), O < 48 && (O &= 15)), O && (O < 8 || 15 < O) ? n : (F.window !== null && F.wbits !== O && (F.window = null), F.wrap = e, F.wbits = O, A(b))) : n;
|
|
2078
|
-
}
|
|
2079
|
-
function U(b, O) {
|
|
2080
|
-
var e, F;
|
|
2081
|
-
return b ? (F = new _(), (b.state = F).window = null, (e = E(b, O)) !== y && (b.state = null), e) : n;
|
|
2082
|
-
}
|
|
2083
|
-
var B, D, R = !0;
|
|
2084
|
-
function Z(b) {
|
|
2085
|
-
if (R) {
|
|
2086
|
-
var O;
|
|
2087
|
-
for (B = new o.Buf32(512), D = new o.Buf32(32), O = 0; O < 144; ) b.lens[O++] = 8;
|
|
2088
|
-
for (; O < 256; ) b.lens[O++] = 9;
|
|
2089
|
-
for (; O < 280; ) b.lens[O++] = 7;
|
|
2090
|
-
for (; O < 288; ) b.lens[O++] = 8;
|
|
2091
|
-
for (d(w, b.lens, 0, 288, B, 0, b.work, { bits: 9 }), O = 0; O < 32; ) b.lens[O++] = 5;
|
|
2092
|
-
d(g, b.lens, 0, 32, D, 0, b.work, { bits: 5 }), R = !1;
|
|
2093
|
-
}
|
|
2094
|
-
b.lencode = B, b.lenbits = 9, b.distcode = D, b.distbits = 5;
|
|
2095
|
-
}
|
|
2096
|
-
function Y(b, O, e, F) {
|
|
2097
|
-
var Q, W = b.state;
|
|
2098
|
-
return W.window === null && (W.wsize = 1 << W.wbits, W.wnext = 0, W.whave = 0, W.window = new o.Buf8(W.wsize)), F >= W.wsize ? (o.arraySet(W.window, O, e - W.wsize, W.wsize, 0), W.wnext = 0, W.whave = W.wsize) : (F < (Q = W.wsize - W.wnext) && (Q = F), o.arraySet(W.window, O, e - F, Q, W.wnext), (F -= Q) ? (o.arraySet(W.window, O, e - F, F, 0), W.wnext = F, W.whave = W.wsize) : (W.wnext += Q, W.wnext === W.wsize && (W.wnext = 0), W.whave < W.wsize && (W.whave += Q))), 0;
|
|
2099
|
-
}
|
|
2100
|
-
c.inflateReset = A, c.inflateReset2 = E, c.inflateResetKeep = k, c.inflateInit = function(b) {
|
|
2101
|
-
return U(b, 15);
|
|
2102
|
-
}, c.inflateInit2 = U, c.inflate = function(b, O) {
|
|
2103
|
-
var e, F, Q, W, et, I, q, x, v, G, N, $, rt, at, tt, nt, ot, st, ut, dt, t, P, T, m, f = 0, C = new o.Buf8(4), j = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
2104
|
-
if (!b || !b.state || !b.output || !b.input && b.avail_in !== 0) return n;
|
|
2105
|
-
(e = b.state).mode === 12 && (e.mode = 13), et = b.next_out, Q = b.output, q = b.avail_out, W = b.next_in, F = b.input, I = b.avail_in, x = e.hold, v = e.bits, G = I, N = q, P = y;
|
|
2106
|
-
t: for (; ; ) switch (e.mode) {
|
|
2107
|
-
case p:
|
|
2108
|
-
if (e.wrap === 0) {
|
|
2109
|
-
e.mode = 13;
|
|
2110
|
-
break;
|
|
2111
|
-
}
|
|
2112
|
-
for (; v < 16; ) {
|
|
2113
|
-
if (I === 0) break t;
|
|
2114
|
-
I--, x += F[W++] << v, v += 8;
|
|
2115
|
-
}
|
|
2116
|
-
if (2 & e.wrap && x === 35615) {
|
|
2117
|
-
C[e.check = 0] = 255 & x, C[1] = x >>> 8 & 255, e.check = r(e.check, C, 2, 0), v = x = 0, e.mode = 2;
|
|
2118
|
-
break;
|
|
2119
|
-
}
|
|
2120
|
-
if (e.flags = 0, e.head && (e.head.done = !1), !(1 & e.wrap) || (((255 & x) << 8) + (x >> 8)) % 31) {
|
|
2121
|
-
b.msg = "incorrect header check", e.mode = 30;
|
|
2122
|
-
break;
|
|
2123
|
-
}
|
|
2124
|
-
if ((15 & x) != 8) {
|
|
2125
|
-
b.msg = "unknown compression method", e.mode = 30;
|
|
2126
|
-
break;
|
|
2127
|
-
}
|
|
2128
|
-
if (v -= 4, t = 8 + (15 & (x >>>= 4)), e.wbits === 0) e.wbits = t;
|
|
2129
|
-
else if (t > e.wbits) {
|
|
2130
|
-
b.msg = "invalid window size", e.mode = 30;
|
|
2131
|
-
break;
|
|
2132
|
-
}
|
|
2133
|
-
e.dmax = 1 << t, b.adler = e.check = 1, e.mode = 512 & x ? 10 : 12, v = x = 0;
|
|
2134
|
-
break;
|
|
2135
|
-
case 2:
|
|
2136
|
-
for (; v < 16; ) {
|
|
2137
|
-
if (I === 0) break t;
|
|
2138
|
-
I--, x += F[W++] << v, v += 8;
|
|
2139
|
-
}
|
|
2140
|
-
if (e.flags = x, (255 & e.flags) != 8) {
|
|
2141
|
-
b.msg = "unknown compression method", e.mode = 30;
|
|
2142
|
-
break;
|
|
2143
|
-
}
|
|
2144
|
-
if (57344 & e.flags) {
|
|
2145
|
-
b.msg = "unknown header flags set", e.mode = 30;
|
|
2146
|
-
break;
|
|
2147
|
-
}
|
|
2148
|
-
e.head && (e.head.text = x >> 8 & 1), 512 & e.flags && (C[0] = 255 & x, C[1] = x >>> 8 & 255, e.check = r(e.check, C, 2, 0)), v = x = 0, e.mode = 3;
|
|
2149
|
-
case 3:
|
|
2150
|
-
for (; v < 32; ) {
|
|
2151
|
-
if (I === 0) break t;
|
|
2152
|
-
I--, x += F[W++] << v, v += 8;
|
|
2153
|
-
}
|
|
2154
|
-
e.head && (e.head.time = x), 512 & e.flags && (C[0] = 255 & x, C[1] = x >>> 8 & 255, C[2] = x >>> 16 & 255, C[3] = x >>> 24 & 255, e.check = r(e.check, C, 4, 0)), v = x = 0, e.mode = 4;
|
|
2155
|
-
case 4:
|
|
2156
|
-
for (; v < 16; ) {
|
|
2157
|
-
if (I === 0) break t;
|
|
2158
|
-
I--, x += F[W++] << v, v += 8;
|
|
2159
|
-
}
|
|
2160
|
-
e.head && (e.head.xflags = 255 & x, e.head.os = x >> 8), 512 & e.flags && (C[0] = 255 & x, C[1] = x >>> 8 & 255, e.check = r(e.check, C, 2, 0)), v = x = 0, e.mode = 5;
|
|
2161
|
-
case 5:
|
|
2162
|
-
if (1024 & e.flags) {
|
|
2163
|
-
for (; v < 16; ) {
|
|
2164
|
-
if (I === 0) break t;
|
|
2165
|
-
I--, x += F[W++] << v, v += 8;
|
|
2166
|
-
}
|
|
2167
|
-
e.length = x, e.head && (e.head.extra_len = x), 512 & e.flags && (C[0] = 255 & x, C[1] = x >>> 8 & 255, e.check = r(e.check, C, 2, 0)), v = x = 0;
|
|
2168
|
-
} else e.head && (e.head.extra = null);
|
|
2169
|
-
e.mode = 6;
|
|
2170
|
-
case 6:
|
|
2171
|
-
if (1024 & e.flags && (I < ($ = e.length) && ($ = I), $ && (e.head && (t = e.head.extra_len - e.length, e.head.extra || (e.head.extra = new Array(e.head.extra_len)), o.arraySet(e.head.extra, F, W, $, t)), 512 & e.flags && (e.check = r(e.check, F, $, W)), I -= $, W += $, e.length -= $), e.length)) break t;
|
|
2172
|
-
e.length = 0, e.mode = 7;
|
|
2173
|
-
case 7:
|
|
2174
|
-
if (2048 & e.flags) {
|
|
2175
|
-
if (I === 0) break t;
|
|
2176
|
-
for ($ = 0; t = F[W + $++], e.head && t && e.length < 65536 && (e.head.name += String.fromCharCode(t)), t && $ < I; ) ;
|
|
2177
|
-
if (512 & e.flags && (e.check = r(e.check, F, $, W)), I -= $, W += $, t) break t;
|
|
2178
|
-
} else e.head && (e.head.name = null);
|
|
2179
|
-
e.length = 0, e.mode = 8;
|
|
2180
|
-
case 8:
|
|
2181
|
-
if (4096 & e.flags) {
|
|
2182
|
-
if (I === 0) break t;
|
|
2183
|
-
for ($ = 0; t = F[W + $++], e.head && t && e.length < 65536 && (e.head.comment += String.fromCharCode(t)), t && $ < I; ) ;
|
|
2184
|
-
if (512 & e.flags && (e.check = r(e.check, F, $, W)), I -= $, W += $, t) break t;
|
|
2185
|
-
} else e.head && (e.head.comment = null);
|
|
2186
|
-
e.mode = 9;
|
|
2187
|
-
case 9:
|
|
2188
|
-
if (512 & e.flags) {
|
|
2189
|
-
for (; v < 16; ) {
|
|
2190
|
-
if (I === 0) break t;
|
|
2191
|
-
I--, x += F[W++] << v, v += 8;
|
|
2192
|
-
}
|
|
2193
|
-
if (x !== (65535 & e.check)) {
|
|
2194
|
-
b.msg = "header crc mismatch", e.mode = 30;
|
|
2195
|
-
break;
|
|
2196
|
-
}
|
|
2197
|
-
v = x = 0;
|
|
2198
|
-
}
|
|
2199
|
-
e.head && (e.head.hcrc = e.flags >> 9 & 1, e.head.done = !0), b.adler = e.check = 0, e.mode = 12;
|
|
2200
|
-
break;
|
|
2201
|
-
case 10:
|
|
2202
|
-
for (; v < 32; ) {
|
|
2203
|
-
if (I === 0) break t;
|
|
2204
|
-
I--, x += F[W++] << v, v += 8;
|
|
2205
|
-
}
|
|
2206
|
-
b.adler = e.check = u(x), v = x = 0, e.mode = 11;
|
|
2207
|
-
case 11:
|
|
2208
|
-
if (e.havedict === 0) return b.next_out = et, b.avail_out = q, b.next_in = W, b.avail_in = I, e.hold = x, e.bits = v, 2;
|
|
2209
|
-
b.adler = e.check = 1, e.mode = 12;
|
|
2210
|
-
case 12:
|
|
2211
|
-
if (O === 5 || O === 6) break t;
|
|
2212
|
-
case 13:
|
|
2213
|
-
if (e.last) {
|
|
2214
|
-
x >>>= 7 & v, v -= 7 & v, e.mode = 27;
|
|
2215
|
-
break;
|
|
2216
|
-
}
|
|
2217
|
-
for (; v < 3; ) {
|
|
2218
|
-
if (I === 0) break t;
|
|
2219
|
-
I--, x += F[W++] << v, v += 8;
|
|
2220
|
-
}
|
|
2221
|
-
switch (e.last = 1 & x, v -= 1, 3 & (x >>>= 1)) {
|
|
2222
|
-
case 0:
|
|
2223
|
-
e.mode = 14;
|
|
2224
|
-
break;
|
|
2225
|
-
case 1:
|
|
2226
|
-
if (Z(e), e.mode = 20, O !== 6) break;
|
|
2227
|
-
x >>>= 2, v -= 2;
|
|
2228
|
-
break t;
|
|
2229
|
-
case 2:
|
|
2230
|
-
e.mode = 17;
|
|
2231
|
-
break;
|
|
2232
|
-
case 3:
|
|
2233
|
-
b.msg = "invalid block type", e.mode = 30;
|
|
2234
|
-
}
|
|
2235
|
-
x >>>= 2, v -= 2;
|
|
2236
|
-
break;
|
|
2237
|
-
case 14:
|
|
2238
|
-
for (x >>>= 7 & v, v -= 7 & v; v < 32; ) {
|
|
2239
|
-
if (I === 0) break t;
|
|
2240
|
-
I--, x += F[W++] << v, v += 8;
|
|
2241
|
-
}
|
|
2242
|
-
if ((65535 & x) != (x >>> 16 ^ 65535)) {
|
|
2243
|
-
b.msg = "invalid stored block lengths", e.mode = 30;
|
|
2244
|
-
break;
|
|
2245
|
-
}
|
|
2246
|
-
if (e.length = 65535 & x, v = x = 0, e.mode = 15, O === 6) break t;
|
|
2247
|
-
case 15:
|
|
2248
|
-
e.mode = 16;
|
|
2249
|
-
case 16:
|
|
2250
|
-
if ($ = e.length) {
|
|
2251
|
-
if (I < $ && ($ = I), q < $ && ($ = q), $ === 0) break t;
|
|
2252
|
-
o.arraySet(Q, F, W, $, et), I -= $, W += $, q -= $, et += $, e.length -= $;
|
|
2253
|
-
break;
|
|
2254
|
-
}
|
|
2255
|
-
e.mode = 12;
|
|
2256
|
-
break;
|
|
2257
|
-
case 17:
|
|
2258
|
-
for (; v < 14; ) {
|
|
2259
|
-
if (I === 0) break t;
|
|
2260
|
-
I--, x += F[W++] << v, v += 8;
|
|
2261
|
-
}
|
|
2262
|
-
if (e.nlen = 257 + (31 & x), x >>>= 5, v -= 5, e.ndist = 1 + (31 & x), x >>>= 5, v -= 5, e.ncode = 4 + (15 & x), x >>>= 4, v -= 4, 286 < e.nlen || 30 < e.ndist) {
|
|
2263
|
-
b.msg = "too many length or distance symbols", e.mode = 30;
|
|
2264
|
-
break;
|
|
2265
|
-
}
|
|
2266
|
-
e.have = 0, e.mode = 18;
|
|
2267
|
-
case 18:
|
|
2268
|
-
for (; e.have < e.ncode; ) {
|
|
2269
|
-
for (; v < 3; ) {
|
|
2270
|
-
if (I === 0) break t;
|
|
2271
|
-
I--, x += F[W++] << v, v += 8;
|
|
2272
|
-
}
|
|
2273
|
-
e.lens[j[e.have++]] = 7 & x, x >>>= 3, v -= 3;
|
|
2274
|
-
}
|
|
2275
|
-
for (; e.have < 19; ) e.lens[j[e.have++]] = 0;
|
|
2276
|
-
if (e.lencode = e.lendyn, e.lenbits = 7, T = { bits: e.lenbits }, P = d(0, e.lens, 0, 19, e.lencode, 0, e.work, T), e.lenbits = T.bits, P) {
|
|
2277
|
-
b.msg = "invalid code lengths set", e.mode = 30;
|
|
2278
|
-
break;
|
|
2279
|
-
}
|
|
2280
|
-
e.have = 0, e.mode = 19;
|
|
2281
|
-
case 19:
|
|
2282
|
-
for (; e.have < e.nlen + e.ndist; ) {
|
|
2283
|
-
for (; nt = (f = e.lencode[x & (1 << e.lenbits) - 1]) >>> 16 & 255, ot = 65535 & f, !((tt = f >>> 24) <= v); ) {
|
|
2284
|
-
if (I === 0) break t;
|
|
2285
|
-
I--, x += F[W++] << v, v += 8;
|
|
2286
|
-
}
|
|
2287
|
-
if (ot < 16) x >>>= tt, v -= tt, e.lens[e.have++] = ot;
|
|
2288
|
-
else {
|
|
2289
|
-
if (ot === 16) {
|
|
2290
|
-
for (m = tt + 2; v < m; ) {
|
|
2291
|
-
if (I === 0) break t;
|
|
2292
|
-
I--, x += F[W++] << v, v += 8;
|
|
2293
|
-
}
|
|
2294
|
-
if (x >>>= tt, v -= tt, e.have === 0) {
|
|
2295
|
-
b.msg = "invalid bit length repeat", e.mode = 30;
|
|
2296
|
-
break;
|
|
2297
|
-
}
|
|
2298
|
-
t = e.lens[e.have - 1], $ = 3 + (3 & x), x >>>= 2, v -= 2;
|
|
2299
|
-
} else if (ot === 17) {
|
|
2300
|
-
for (m = tt + 3; v < m; ) {
|
|
2301
|
-
if (I === 0) break t;
|
|
2302
|
-
I--, x += F[W++] << v, v += 8;
|
|
2303
|
-
}
|
|
2304
|
-
v -= tt, t = 0, $ = 3 + (7 & (x >>>= tt)), x >>>= 3, v -= 3;
|
|
2305
|
-
} else {
|
|
2306
|
-
for (m = tt + 7; v < m; ) {
|
|
2307
|
-
if (I === 0) break t;
|
|
2308
|
-
I--, x += F[W++] << v, v += 8;
|
|
2309
|
-
}
|
|
2310
|
-
v -= tt, t = 0, $ = 11 + (127 & (x >>>= tt)), x >>>= 7, v -= 7;
|
|
2311
|
-
}
|
|
2312
|
-
if (e.have + $ > e.nlen + e.ndist) {
|
|
2313
|
-
b.msg = "invalid bit length repeat", e.mode = 30;
|
|
2314
|
-
break;
|
|
2315
|
-
}
|
|
2316
|
-
for (; $--; ) e.lens[e.have++] = t;
|
|
2317
|
-
}
|
|
2318
|
-
}
|
|
2319
|
-
if (e.mode === 30) break;
|
|
2320
|
-
if (e.lens[256] === 0) {
|
|
2321
|
-
b.msg = "invalid code -- missing end-of-block", e.mode = 30;
|
|
2322
|
-
break;
|
|
2323
|
-
}
|
|
2324
|
-
if (e.lenbits = 9, T = { bits: e.lenbits }, P = d(w, e.lens, 0, e.nlen, e.lencode, 0, e.work, T), e.lenbits = T.bits, P) {
|
|
2325
|
-
b.msg = "invalid literal/lengths set", e.mode = 30;
|
|
2326
|
-
break;
|
|
2327
|
-
}
|
|
2328
|
-
if (e.distbits = 6, e.distcode = e.distdyn, T = { bits: e.distbits }, P = d(g, e.lens, e.nlen, e.ndist, e.distcode, 0, e.work, T), e.distbits = T.bits, P) {
|
|
2329
|
-
b.msg = "invalid distances set", e.mode = 30;
|
|
2330
|
-
break;
|
|
2331
|
-
}
|
|
2332
|
-
if (e.mode = 20, O === 6) break t;
|
|
2333
|
-
case 20:
|
|
2334
|
-
e.mode = 21;
|
|
2335
|
-
case 21:
|
|
2336
|
-
if (6 <= I && 258 <= q) {
|
|
2337
|
-
b.next_out = et, b.avail_out = q, b.next_in = W, b.avail_in = I, e.hold = x, e.bits = v, l(b, N), et = b.next_out, Q = b.output, q = b.avail_out, W = b.next_in, F = b.input, I = b.avail_in, x = e.hold, v = e.bits, e.mode === 12 && (e.back = -1);
|
|
2338
|
-
break;
|
|
2339
|
-
}
|
|
2340
|
-
for (e.back = 0; nt = (f = e.lencode[x & (1 << e.lenbits) - 1]) >>> 16 & 255, ot = 65535 & f, !((tt = f >>> 24) <= v); ) {
|
|
2341
|
-
if (I === 0) break t;
|
|
2342
|
-
I--, x += F[W++] << v, v += 8;
|
|
2343
|
-
}
|
|
2344
|
-
if (nt && !(240 & nt)) {
|
|
2345
|
-
for (st = tt, ut = nt, dt = ot; nt = (f = e.lencode[dt + ((x & (1 << st + ut) - 1) >> st)]) >>> 16 & 255, ot = 65535 & f, !(st + (tt = f >>> 24) <= v); ) {
|
|
2346
|
-
if (I === 0) break t;
|
|
2347
|
-
I--, x += F[W++] << v, v += 8;
|
|
2348
|
-
}
|
|
2349
|
-
x >>>= st, v -= st, e.back += st;
|
|
2350
|
-
}
|
|
2351
|
-
if (x >>>= tt, v -= tt, e.back += tt, e.length = ot, nt === 0) {
|
|
2352
|
-
e.mode = 26;
|
|
2353
|
-
break;
|
|
2354
|
-
}
|
|
2355
|
-
if (32 & nt) {
|
|
2356
|
-
e.back = -1, e.mode = 12;
|
|
2357
|
-
break;
|
|
2358
|
-
}
|
|
2359
|
-
if (64 & nt) {
|
|
2360
|
-
b.msg = "invalid literal/length code", e.mode = 30;
|
|
2361
|
-
break;
|
|
2362
|
-
}
|
|
2363
|
-
e.extra = 15 & nt, e.mode = 22;
|
|
2364
|
-
case 22:
|
|
2365
|
-
if (e.extra) {
|
|
2366
|
-
for (m = e.extra; v < m; ) {
|
|
2367
|
-
if (I === 0) break t;
|
|
2368
|
-
I--, x += F[W++] << v, v += 8;
|
|
2369
|
-
}
|
|
2370
|
-
e.length += x & (1 << e.extra) - 1, x >>>= e.extra, v -= e.extra, e.back += e.extra;
|
|
2371
|
-
}
|
|
2372
|
-
e.was = e.length, e.mode = 23;
|
|
2373
|
-
case 23:
|
|
2374
|
-
for (; nt = (f = e.distcode[x & (1 << e.distbits) - 1]) >>> 16 & 255, ot = 65535 & f, !((tt = f >>> 24) <= v); ) {
|
|
2375
|
-
if (I === 0) break t;
|
|
2376
|
-
I--, x += F[W++] << v, v += 8;
|
|
2377
|
-
}
|
|
2378
|
-
if (!(240 & nt)) {
|
|
2379
|
-
for (st = tt, ut = nt, dt = ot; nt = (f = e.distcode[dt + ((x & (1 << st + ut) - 1) >> st)]) >>> 16 & 255, ot = 65535 & f, !(st + (tt = f >>> 24) <= v); ) {
|
|
2380
|
-
if (I === 0) break t;
|
|
2381
|
-
I--, x += F[W++] << v, v += 8;
|
|
2382
|
-
}
|
|
2383
|
-
x >>>= st, v -= st, e.back += st;
|
|
2384
|
-
}
|
|
2385
|
-
if (x >>>= tt, v -= tt, e.back += tt, 64 & nt) {
|
|
2386
|
-
b.msg = "invalid distance code", e.mode = 30;
|
|
2387
|
-
break;
|
|
2388
|
-
}
|
|
2389
|
-
e.offset = ot, e.extra = 15 & nt, e.mode = 24;
|
|
2390
|
-
case 24:
|
|
2391
|
-
if (e.extra) {
|
|
2392
|
-
for (m = e.extra; v < m; ) {
|
|
2393
|
-
if (I === 0) break t;
|
|
2394
|
-
I--, x += F[W++] << v, v += 8;
|
|
2395
|
-
}
|
|
2396
|
-
e.offset += x & (1 << e.extra) - 1, x >>>= e.extra, v -= e.extra, e.back += e.extra;
|
|
2397
|
-
}
|
|
2398
|
-
if (e.offset > e.dmax) {
|
|
2399
|
-
b.msg = "invalid distance too far back", e.mode = 30;
|
|
2400
|
-
break;
|
|
2401
|
-
}
|
|
2402
|
-
e.mode = 25;
|
|
2403
|
-
case 25:
|
|
2404
|
-
if (q === 0) break t;
|
|
2405
|
-
if ($ = N - q, e.offset > $) {
|
|
2406
|
-
if (($ = e.offset - $) > e.whave && e.sane) {
|
|
2407
|
-
b.msg = "invalid distance too far back", e.mode = 30;
|
|
2408
|
-
break;
|
|
2409
|
-
}
|
|
2410
|
-
rt = $ > e.wnext ? ($ -= e.wnext, e.wsize - $) : e.wnext - $, $ > e.length && ($ = e.length), at = e.window;
|
|
2411
|
-
} else at = Q, rt = et - e.offset, $ = e.length;
|
|
2412
|
-
for (q < $ && ($ = q), q -= $, e.length -= $; Q[et++] = at[rt++], --$; ) ;
|
|
2413
|
-
e.length === 0 && (e.mode = 21);
|
|
2414
|
-
break;
|
|
2415
|
-
case 26:
|
|
2416
|
-
if (q === 0) break t;
|
|
2417
|
-
Q[et++] = e.length, q--, e.mode = 21;
|
|
2418
|
-
break;
|
|
2419
|
-
case 27:
|
|
2420
|
-
if (e.wrap) {
|
|
2421
|
-
for (; v < 32; ) {
|
|
2422
|
-
if (I === 0) break t;
|
|
2423
|
-
I--, x |= F[W++] << v, v += 8;
|
|
2424
|
-
}
|
|
2425
|
-
if (N -= q, b.total_out += N, e.total += N, N && (b.adler = e.check = e.flags ? r(e.check, Q, N, et - N) : a(e.check, Q, N, et - N)), N = q, (e.flags ? x : u(x)) !== e.check) {
|
|
2426
|
-
b.msg = "incorrect data check", e.mode = 30;
|
|
2427
|
-
break;
|
|
2428
|
-
}
|
|
2429
|
-
v = x = 0;
|
|
2430
|
-
}
|
|
2431
|
-
e.mode = 28;
|
|
2432
|
-
case 28:
|
|
2433
|
-
if (e.wrap && e.flags) {
|
|
2434
|
-
for (; v < 32; ) {
|
|
2435
|
-
if (I === 0) break t;
|
|
2436
|
-
I--, x += F[W++] << v, v += 8;
|
|
2437
|
-
}
|
|
2438
|
-
if (x !== (4294967295 & e.total)) {
|
|
2439
|
-
b.msg = "incorrect length check", e.mode = 30;
|
|
2440
|
-
break;
|
|
2441
|
-
}
|
|
2442
|
-
v = x = 0;
|
|
2443
|
-
}
|
|
2444
|
-
e.mode = 29;
|
|
2445
|
-
case 29:
|
|
2446
|
-
P = 1;
|
|
2447
|
-
break t;
|
|
2448
|
-
case 30:
|
|
2449
|
-
P = -3;
|
|
2450
|
-
break t;
|
|
2451
|
-
case 31:
|
|
2452
|
-
return -4;
|
|
2453
|
-
case 32:
|
|
2454
|
-
default:
|
|
2455
|
-
return n;
|
|
2456
|
-
}
|
|
2457
|
-
return b.next_out = et, b.avail_out = q, b.next_in = W, b.avail_in = I, e.hold = x, e.bits = v, (e.wsize || N !== b.avail_out && e.mode < 30 && (e.mode < 27 || O !== 4)) && Y(b, b.output, b.next_out, N - b.avail_out) ? (e.mode = 31, -4) : (G -= b.avail_in, N -= b.avail_out, b.total_in += G, b.total_out += N, e.total += N, e.wrap && N && (b.adler = e.check = e.flags ? r(e.check, Q, N, b.next_out - N) : a(e.check, Q, N, b.next_out - N)), b.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === 12 ? 128 : 0) + (e.mode === 20 || e.mode === 15 ? 256 : 0), (G == 0 && N === 0 || O === 4) && P === y && (P = -5), P);
|
|
2458
|
-
}, c.inflateEnd = function(b) {
|
|
2459
|
-
if (!b || !b.state) return n;
|
|
2460
|
-
var O = b.state;
|
|
2461
|
-
return O.window && (O.window = null), b.state = null, y;
|
|
2462
|
-
}, c.inflateGetHeader = function(b, O) {
|
|
2463
|
-
var e;
|
|
2464
|
-
return b && b.state && 2 & (e = b.state).wrap ? ((e.head = O).done = !1, y) : n;
|
|
2465
|
-
}, c.inflateSetDictionary = function(b, O) {
|
|
2466
|
-
var e, F = O.length;
|
|
2467
|
-
return b && b.state ? (e = b.state).wrap !== 0 && e.mode !== 11 ? n : e.mode === 11 && a(1, O, F, 0) !== e.check ? -3 : Y(b, O, F, F) ? (e.mode = 31, -4) : (e.havedict = 1, y) : n;
|
|
2468
|
-
}, c.inflateInfo = "pako inflate (from Nodeca project)";
|
|
2469
|
-
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(s, S, c) {
|
|
2470
|
-
var o = s("../utils/common"), a = [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], r = [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], l = [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], d = [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];
|
|
2471
|
-
S.exports = function(w, g, y, n, p, i, h, u) {
|
|
2472
|
-
var _, k, A, E, U, B, D, R, Z, Y = u.bits, b = 0, O = 0, e = 0, F = 0, Q = 0, W = 0, et = 0, I = 0, q = 0, x = 0, v = null, G = 0, N = new o.Buf16(16), $ = new o.Buf16(16), rt = null, at = 0;
|
|
2473
|
-
for (b = 0; b <= 15; b++) N[b] = 0;
|
|
2474
|
-
for (O = 0; O < n; O++) N[g[y + O]]++;
|
|
2475
|
-
for (Q = Y, F = 15; 1 <= F && N[F] === 0; F--) ;
|
|
2476
|
-
if (F < Q && (Q = F), F === 0) return p[i++] = 20971520, p[i++] = 20971520, u.bits = 1, 0;
|
|
2477
|
-
for (e = 1; e < F && N[e] === 0; e++) ;
|
|
2478
|
-
for (Q < e && (Q = e), b = I = 1; b <= 15; b++) if (I <<= 1, (I -= N[b]) < 0) return -1;
|
|
2479
|
-
if (0 < I && (w === 0 || F !== 1)) return -1;
|
|
2480
|
-
for ($[1] = 0, b = 1; b < 15; b++) $[b + 1] = $[b] + N[b];
|
|
2481
|
-
for (O = 0; O < n; O++) g[y + O] !== 0 && (h[$[g[y + O]]++] = O);
|
|
2482
|
-
if (B = w === 0 ? (v = rt = h, 19) : w === 1 ? (v = a, G -= 257, rt = r, at -= 257, 256) : (v = l, rt = d, -1), b = e, U = i, et = O = x = 0, A = -1, E = (q = 1 << (W = Q)) - 1, w === 1 && 852 < q || w === 2 && 592 < q) return 1;
|
|
2483
|
-
for (; ; ) {
|
|
2484
|
-
for (D = b - et, Z = h[O] < B ? (R = 0, h[O]) : h[O] > B ? (R = rt[at + h[O]], v[G + h[O]]) : (R = 96, 0), _ = 1 << b - et, e = k = 1 << W; p[U + (x >> et) + (k -= _)] = D << 24 | R << 16 | Z | 0, k !== 0; ) ;
|
|
2485
|
-
for (_ = 1 << b - 1; x & _; ) _ >>= 1;
|
|
2486
|
-
if (_ !== 0 ? (x &= _ - 1, x += _) : x = 0, O++, --N[b] == 0) {
|
|
2487
|
-
if (b === F) break;
|
|
2488
|
-
b = g[y + h[O]];
|
|
2489
|
-
}
|
|
2490
|
-
if (Q < b && (x & E) !== A) {
|
|
2491
|
-
for (et === 0 && (et = Q), U += e, I = 1 << (W = b - et); W + et < F && !((I -= N[W + et]) <= 0); ) W++, I <<= 1;
|
|
2492
|
-
if (q += 1 << W, w === 1 && 852 < q || w === 2 && 592 < q) return 1;
|
|
2493
|
-
p[A = x & E] = Q << 24 | W << 16 | U - i | 0;
|
|
2494
|
-
}
|
|
2495
|
-
}
|
|
2496
|
-
return x !== 0 && (p[U + x] = b - et << 24 | 64 << 16 | 0), u.bits = Q, 0;
|
|
2497
|
-
};
|
|
2498
|
-
}, { "../utils/common": 41 }], 51: [function(s, S, c) {
|
|
2499
|
-
S.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" };
|
|
2500
|
-
}, {}], 52: [function(s, S, c) {
|
|
2501
|
-
var o = s("../utils/common"), a = 0, r = 1;
|
|
2502
|
-
function l(f) {
|
|
2503
|
-
for (var C = f.length; 0 <= --C; ) f[C] = 0;
|
|
2504
|
-
}
|
|
2505
|
-
var d = 0, w = 29, g = 256, y = g + 1 + w, n = 30, p = 19, i = 2 * y + 1, h = 15, u = 16, _ = 7, k = 256, A = 16, E = 17, U = 18, B = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], D = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], R = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], Z = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], Y = new Array(2 * (y + 2));
|
|
2506
|
-
l(Y);
|
|
2507
|
-
var b = new Array(2 * n);
|
|
2508
|
-
l(b);
|
|
2509
|
-
var O = new Array(512);
|
|
2510
|
-
l(O);
|
|
2511
|
-
var e = new Array(256);
|
|
2512
|
-
l(e);
|
|
2513
|
-
var F = new Array(w);
|
|
2514
|
-
l(F);
|
|
2515
|
-
var Q, W, et, I = new Array(n);
|
|
2516
|
-
function q(f, C, j, M, z) {
|
|
2517
|
-
this.static_tree = f, this.extra_bits = C, this.extra_base = j, this.elems = M, this.max_length = z, this.has_stree = f && f.length;
|
|
2518
|
-
}
|
|
2519
|
-
function x(f, C) {
|
|
2520
|
-
this.dyn_tree = f, this.max_code = 0, this.stat_desc = C;
|
|
2521
|
-
}
|
|
2522
|
-
function v(f) {
|
|
2523
|
-
return f < 256 ? O[f] : O[256 + (f >>> 7)];
|
|
2524
|
-
}
|
|
2525
|
-
function G(f, C) {
|
|
2526
|
-
f.pending_buf[f.pending++] = 255 & C, f.pending_buf[f.pending++] = C >>> 8 & 255;
|
|
2527
|
-
}
|
|
2528
|
-
function N(f, C, j) {
|
|
2529
|
-
f.bi_valid > u - j ? (f.bi_buf |= C << f.bi_valid & 65535, G(f, f.bi_buf), f.bi_buf = C >> u - f.bi_valid, f.bi_valid += j - u) : (f.bi_buf |= C << f.bi_valid & 65535, f.bi_valid += j);
|
|
2530
|
-
}
|
|
2531
|
-
function $(f, C, j) {
|
|
2532
|
-
N(f, j[2 * C], j[2 * C + 1]);
|
|
2533
|
-
}
|
|
2534
|
-
function rt(f, C) {
|
|
2535
|
-
for (var j = 0; j |= 1 & f, f >>>= 1, j <<= 1, 0 < --C; ) ;
|
|
2536
|
-
return j >>> 1;
|
|
2537
|
-
}
|
|
2538
|
-
function at(f, C, j) {
|
|
2539
|
-
var M, z, H = new Array(h + 1), X = 0;
|
|
2540
|
-
for (M = 1; M <= h; M++) H[M] = X = X + j[M - 1] << 1;
|
|
2541
|
-
for (z = 0; z <= C; z++) {
|
|
2542
|
-
var V = f[2 * z + 1];
|
|
2543
|
-
V !== 0 && (f[2 * z] = rt(H[V]++, V));
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2546
|
-
function tt(f) {
|
|
2547
|
-
var C;
|
|
2548
|
-
for (C = 0; C < y; C++) f.dyn_ltree[2 * C] = 0;
|
|
2549
|
-
for (C = 0; C < n; C++) f.dyn_dtree[2 * C] = 0;
|
|
2550
|
-
for (C = 0; C < p; C++) f.bl_tree[2 * C] = 0;
|
|
2551
|
-
f.dyn_ltree[2 * k] = 1, f.opt_len = f.static_len = 0, f.last_lit = f.matches = 0;
|
|
2552
|
-
}
|
|
2553
|
-
function nt(f) {
|
|
2554
|
-
8 < f.bi_valid ? G(f, f.bi_buf) : 0 < f.bi_valid && (f.pending_buf[f.pending++] = f.bi_buf), f.bi_buf = 0, f.bi_valid = 0;
|
|
2555
|
-
}
|
|
2556
|
-
function ot(f, C, j, M) {
|
|
2557
|
-
var z = 2 * C, H = 2 * j;
|
|
2558
|
-
return f[z] < f[H] || f[z] === f[H] && M[C] <= M[j];
|
|
2559
|
-
}
|
|
2560
|
-
function st(f, C, j) {
|
|
2561
|
-
for (var M = f.heap[j], z = j << 1; z <= f.heap_len && (z < f.heap_len && ot(C, f.heap[z + 1], f.heap[z], f.depth) && z++, !ot(C, M, f.heap[z], f.depth)); ) f.heap[j] = f.heap[z], j = z, z <<= 1;
|
|
2562
|
-
f.heap[j] = M;
|
|
2563
|
-
}
|
|
2564
|
-
function ut(f, C, j) {
|
|
2565
|
-
var M, z, H, X, V = 0;
|
|
2566
|
-
if (f.last_lit !== 0) for (; M = f.pending_buf[f.d_buf + 2 * V] << 8 | f.pending_buf[f.d_buf + 2 * V + 1], z = f.pending_buf[f.l_buf + V], V++, M === 0 ? $(f, z, C) : ($(f, (H = e[z]) + g + 1, C), (X = B[H]) !== 0 && N(f, z -= F[H], X), $(f, H = v(--M), j), (X = D[H]) !== 0 && N(f, M -= I[H], X)), V < f.last_lit; ) ;
|
|
2567
|
-
$(f, k, C);
|
|
2568
|
-
}
|
|
2569
|
-
function dt(f, C) {
|
|
2570
|
-
var j, M, z, H = C.dyn_tree, X = C.stat_desc.static_tree, V = C.stat_desc.has_stree, J = C.stat_desc.elems, lt = -1;
|
|
2571
|
-
for (f.heap_len = 0, f.heap_max = i, j = 0; j < J; j++) H[2 * j] !== 0 ? (f.heap[++f.heap_len] = lt = j, f.depth[j] = 0) : H[2 * j + 1] = 0;
|
|
2572
|
-
for (; f.heap_len < 2; ) H[2 * (z = f.heap[++f.heap_len] = lt < 2 ? ++lt : 0)] = 1, f.depth[z] = 0, f.opt_len--, V && (f.static_len -= X[2 * z + 1]);
|
|
2573
|
-
for (C.max_code = lt, j = f.heap_len >> 1; 1 <= j; j--) st(f, H, j);
|
|
2574
|
-
for (z = J; j = f.heap[1], f.heap[1] = f.heap[f.heap_len--], st(f, H, 1), M = f.heap[1], f.heap[--f.heap_max] = j, f.heap[--f.heap_max] = M, H[2 * z] = H[2 * j] + H[2 * M], f.depth[z] = (f.depth[j] >= f.depth[M] ? f.depth[j] : f.depth[M]) + 1, H[2 * j + 1] = H[2 * M + 1] = z, f.heap[1] = z++, st(f, H, 1), 2 <= f.heap_len; ) ;
|
|
2575
|
-
f.heap[--f.heap_max] = f.heap[1], function(it, ft) {
|
|
2576
|
-
var gt, pt, bt, ct, wt, At, mt = ft.dyn_tree, It = ft.max_code, Bt = ft.stat_desc.static_tree, Ft = ft.stat_desc.has_stree, Dt = ft.stat_desc.extra_bits, Tt = ft.stat_desc.extra_base, yt = ft.stat_desc.max_length, kt = 0;
|
|
2577
|
-
for (ct = 0; ct <= h; ct++) it.bl_count[ct] = 0;
|
|
2578
|
-
for (mt[2 * it.heap[it.heap_max] + 1] = 0, gt = it.heap_max + 1; gt < i; gt++) yt < (ct = mt[2 * mt[2 * (pt = it.heap[gt]) + 1] + 1] + 1) && (ct = yt, kt++), mt[2 * pt + 1] = ct, It < pt || (it.bl_count[ct]++, wt = 0, Tt <= pt && (wt = Dt[pt - Tt]), At = mt[2 * pt], it.opt_len += At * (ct + wt), Ft && (it.static_len += At * (Bt[2 * pt + 1] + wt)));
|
|
2579
|
-
if (kt !== 0) {
|
|
2580
|
-
do {
|
|
2581
|
-
for (ct = yt - 1; it.bl_count[ct] === 0; ) ct--;
|
|
2582
|
-
it.bl_count[ct]--, it.bl_count[ct + 1] += 2, it.bl_count[yt]--, kt -= 2;
|
|
2583
|
-
} while (0 < kt);
|
|
2584
|
-
for (ct = yt; ct !== 0; ct--) for (pt = it.bl_count[ct]; pt !== 0; ) It < (bt = it.heap[--gt]) || (mt[2 * bt + 1] !== ct && (it.opt_len += (ct - mt[2 * bt + 1]) * mt[2 * bt], mt[2 * bt + 1] = ct), pt--);
|
|
2585
|
-
}
|
|
2586
|
-
}(f, C), at(H, lt, f.bl_count);
|
|
2587
|
-
}
|
|
2588
|
-
function t(f, C, j) {
|
|
2589
|
-
var M, z, H = -1, X = C[1], V = 0, J = 7, lt = 4;
|
|
2590
|
-
for (X === 0 && (J = 138, lt = 3), C[2 * (j + 1) + 1] = 65535, M = 0; M <= j; M++) z = X, X = C[2 * (M + 1) + 1], ++V < J && z === X || (V < lt ? f.bl_tree[2 * z] += V : z !== 0 ? (z !== H && f.bl_tree[2 * z]++, f.bl_tree[2 * A]++) : V <= 10 ? f.bl_tree[2 * E]++ : f.bl_tree[2 * U]++, H = z, lt = (V = 0) === X ? (J = 138, 3) : z === X ? (J = 6, 3) : (J = 7, 4));
|
|
2591
|
-
}
|
|
2592
|
-
function P(f, C, j) {
|
|
2593
|
-
var M, z, H = -1, X = C[1], V = 0, J = 7, lt = 4;
|
|
2594
|
-
for (X === 0 && (J = 138, lt = 3), M = 0; M <= j; M++) if (z = X, X = C[2 * (M + 1) + 1], !(++V < J && z === X)) {
|
|
2595
|
-
if (V < lt) for (; $(f, z, f.bl_tree), --V != 0; ) ;
|
|
2596
|
-
else z !== 0 ? (z !== H && ($(f, z, f.bl_tree), V--), $(f, A, f.bl_tree), N(f, V - 3, 2)) : V <= 10 ? ($(f, E, f.bl_tree), N(f, V - 3, 3)) : ($(f, U, f.bl_tree), N(f, V - 11, 7));
|
|
2597
|
-
H = z, lt = (V = 0) === X ? (J = 138, 3) : z === X ? (J = 6, 3) : (J = 7, 4);
|
|
2598
|
-
}
|
|
2599
|
-
}
|
|
2600
|
-
l(I);
|
|
2601
|
-
var T = !1;
|
|
2602
|
-
function m(f, C, j, M) {
|
|
2603
|
-
N(f, (d << 1) + (M ? 1 : 0), 3), function(z, H, X, V) {
|
|
2604
|
-
nt(z), G(z, X), G(z, ~X), o.arraySet(z.pending_buf, z.window, H, X, z.pending), z.pending += X;
|
|
2605
|
-
}(f, C, j);
|
|
2606
|
-
}
|
|
2607
|
-
c._tr_init = function(f) {
|
|
2608
|
-
T || (function() {
|
|
2609
|
-
var C, j, M, z, H, X = new Array(h + 1);
|
|
2610
|
-
for (z = M = 0; z < w - 1; z++) for (F[z] = M, C = 0; C < 1 << B[z]; C++) e[M++] = z;
|
|
2611
|
-
for (e[M - 1] = z, z = H = 0; z < 16; z++) for (I[z] = H, C = 0; C < 1 << D[z]; C++) O[H++] = z;
|
|
2612
|
-
for (H >>= 7; z < n; z++) for (I[z] = H << 7, C = 0; C < 1 << D[z] - 7; C++) O[256 + H++] = z;
|
|
2613
|
-
for (j = 0; j <= h; j++) X[j] = 0;
|
|
2614
|
-
for (C = 0; C <= 143; ) Y[2 * C + 1] = 8, C++, X[8]++;
|
|
2615
|
-
for (; C <= 255; ) Y[2 * C + 1] = 9, C++, X[9]++;
|
|
2616
|
-
for (; C <= 279; ) Y[2 * C + 1] = 7, C++, X[7]++;
|
|
2617
|
-
for (; C <= 287; ) Y[2 * C + 1] = 8, C++, X[8]++;
|
|
2618
|
-
for (at(Y, y + 1, X), C = 0; C < n; C++) b[2 * C + 1] = 5, b[2 * C] = rt(C, 5);
|
|
2619
|
-
Q = new q(Y, B, g + 1, y, h), W = new q(b, D, 0, n, h), et = new q(new Array(0), R, 0, p, _);
|
|
2620
|
-
}(), T = !0), f.l_desc = new x(f.dyn_ltree, Q), f.d_desc = new x(f.dyn_dtree, W), f.bl_desc = new x(f.bl_tree, et), f.bi_buf = 0, f.bi_valid = 0, tt(f);
|
|
2621
|
-
}, c._tr_stored_block = m, c._tr_flush_block = function(f, C, j, M) {
|
|
2622
|
-
var z, H, X = 0;
|
|
2623
|
-
0 < f.level ? (f.strm.data_type === 2 && (f.strm.data_type = function(V) {
|
|
2624
|
-
var J, lt = 4093624447;
|
|
2625
|
-
for (J = 0; J <= 31; J++, lt >>>= 1) if (1 & lt && V.dyn_ltree[2 * J] !== 0) return a;
|
|
2626
|
-
if (V.dyn_ltree[18] !== 0 || V.dyn_ltree[20] !== 0 || V.dyn_ltree[26] !== 0) return r;
|
|
2627
|
-
for (J = 32; J < g; J++) if (V.dyn_ltree[2 * J] !== 0) return r;
|
|
2628
|
-
return a;
|
|
2629
|
-
}(f)), dt(f, f.l_desc), dt(f, f.d_desc), X = function(V) {
|
|
2630
|
-
var J;
|
|
2631
|
-
for (t(V, V.dyn_ltree, V.l_desc.max_code), t(V, V.dyn_dtree, V.d_desc.max_code), dt(V, V.bl_desc), J = p - 1; 3 <= J && V.bl_tree[2 * Z[J] + 1] === 0; J--) ;
|
|
2632
|
-
return V.opt_len += 3 * (J + 1) + 5 + 5 + 4, J;
|
|
2633
|
-
}(f), z = f.opt_len + 3 + 7 >>> 3, (H = f.static_len + 3 + 7 >>> 3) <= z && (z = H)) : z = H = j + 5, j + 4 <= z && C !== -1 ? m(f, C, j, M) : f.strategy === 4 || H === z ? (N(f, 2 + (M ? 1 : 0), 3), ut(f, Y, b)) : (N(f, 4 + (M ? 1 : 0), 3), function(V, J, lt, it) {
|
|
2634
|
-
var ft;
|
|
2635
|
-
for (N(V, J - 257, 5), N(V, lt - 1, 5), N(V, it - 4, 4), ft = 0; ft < it; ft++) N(V, V.bl_tree[2 * Z[ft] + 1], 3);
|
|
2636
|
-
P(V, V.dyn_ltree, J - 1), P(V, V.dyn_dtree, lt - 1);
|
|
2637
|
-
}(f, f.l_desc.max_code + 1, f.d_desc.max_code + 1, X + 1), ut(f, f.dyn_ltree, f.dyn_dtree)), tt(f), M && nt(f);
|
|
2638
|
-
}, c._tr_tally = function(f, C, j) {
|
|
2639
|
-
return f.pending_buf[f.d_buf + 2 * f.last_lit] = C >>> 8 & 255, f.pending_buf[f.d_buf + 2 * f.last_lit + 1] = 255 & C, f.pending_buf[f.l_buf + f.last_lit] = 255 & j, f.last_lit++, C === 0 ? f.dyn_ltree[2 * j]++ : (f.matches++, C--, f.dyn_ltree[2 * (e[j] + g + 1)]++, f.dyn_dtree[2 * v(C)]++), f.last_lit === f.lit_bufsize - 1;
|
|
2640
|
-
}, c._tr_align = function(f) {
|
|
2641
|
-
N(f, 2, 3), $(f, k, Y), function(C) {
|
|
2642
|
-
C.bi_valid === 16 ? (G(C, C.bi_buf), C.bi_buf = 0, C.bi_valid = 0) : 8 <= C.bi_valid && (C.pending_buf[C.pending++] = 255 & C.bi_buf, C.bi_buf >>= 8, C.bi_valid -= 8);
|
|
2643
|
-
}(f);
|
|
2644
|
-
};
|
|
2645
|
-
}, { "../utils/common": 41 }], 53: [function(s, S, c) {
|
|
2646
|
-
S.exports = function() {
|
|
2647
|
-
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
|
|
2648
|
-
};
|
|
2649
|
-
}, {}], 54: [function(s, S, c) {
|
|
2650
|
-
(function(o) {
|
|
2651
|
-
(function(a, r) {
|
|
2652
|
-
if (!a.setImmediate) {
|
|
2653
|
-
var l, d, w, g, y = 1, n = {}, p = !1, i = a.document, h = Object.getPrototypeOf && Object.getPrototypeOf(a);
|
|
2654
|
-
h = h && h.setTimeout ? h : a, l = {}.toString.call(a.process) === "[object process]" ? function(A) {
|
|
2655
|
-
process.nextTick(function() {
|
|
2656
|
-
_(A);
|
|
2657
|
-
});
|
|
2658
|
-
} : function() {
|
|
2659
|
-
if (a.postMessage && !a.importScripts) {
|
|
2660
|
-
var A = !0, E = a.onmessage;
|
|
2661
|
-
return a.onmessage = function() {
|
|
2662
|
-
A = !1;
|
|
2663
|
-
}, a.postMessage("", "*"), a.onmessage = E, A;
|
|
2664
|
-
}
|
|
2665
|
-
}() ? (g = "setImmediate$" + Math.random() + "$", a.addEventListener ? a.addEventListener("message", k, !1) : a.attachEvent("onmessage", k), function(A) {
|
|
2666
|
-
a.postMessage(g + A, "*");
|
|
2667
|
-
}) : a.MessageChannel ? ((w = new MessageChannel()).port1.onmessage = function(A) {
|
|
2668
|
-
_(A.data);
|
|
2669
|
-
}, function(A) {
|
|
2670
|
-
w.port2.postMessage(A);
|
|
2671
|
-
}) : i && "onreadystatechange" in i.createElement("script") ? (d = i.documentElement, function(A) {
|
|
2672
|
-
var E = i.createElement("script");
|
|
2673
|
-
E.onreadystatechange = function() {
|
|
2674
|
-
_(A), E.onreadystatechange = null, d.removeChild(E), E = null;
|
|
2675
|
-
}, d.appendChild(E);
|
|
2676
|
-
}) : function(A) {
|
|
2677
|
-
setTimeout(_, 0, A);
|
|
2678
|
-
}, h.setImmediate = function(A) {
|
|
2679
|
-
typeof A != "function" && (A = new Function("" + A));
|
|
2680
|
-
for (var E = new Array(arguments.length - 1), U = 0; U < E.length; U++) E[U] = arguments[U + 1];
|
|
2681
|
-
var B = { callback: A, args: E };
|
|
2682
|
-
return n[y] = B, l(y), y++;
|
|
2683
|
-
}, h.clearImmediate = u;
|
|
2684
|
-
}
|
|
2685
|
-
function u(A) {
|
|
2686
|
-
delete n[A];
|
|
2687
|
-
}
|
|
2688
|
-
function _(A) {
|
|
2689
|
-
if (p) setTimeout(_, 0, A);
|
|
2690
|
-
else {
|
|
2691
|
-
var E = n[A];
|
|
2692
|
-
if (E) {
|
|
2693
|
-
p = !0;
|
|
2694
|
-
try {
|
|
2695
|
-
(function(U) {
|
|
2696
|
-
var B = U.callback, D = U.args;
|
|
2697
|
-
switch (D.length) {
|
|
2698
|
-
case 0:
|
|
2699
|
-
B();
|
|
2700
|
-
break;
|
|
2701
|
-
case 1:
|
|
2702
|
-
B(D[0]);
|
|
2703
|
-
break;
|
|
2704
|
-
case 2:
|
|
2705
|
-
B(D[0], D[1]);
|
|
2706
|
-
break;
|
|
2707
|
-
case 3:
|
|
2708
|
-
B(D[0], D[1], D[2]);
|
|
2709
|
-
break;
|
|
2710
|
-
default:
|
|
2711
|
-
B.apply(r, D);
|
|
2712
|
-
}
|
|
2713
|
-
})(E);
|
|
2714
|
-
} finally {
|
|
2715
|
-
u(A), p = !1;
|
|
2716
|
-
}
|
|
2717
|
-
}
|
|
2718
|
-
}
|
|
2719
|
-
}
|
|
2720
|
-
function k(A) {
|
|
2721
|
-
A.source === a && typeof A.data == "string" && A.data.indexOf(g) === 0 && _(+A.data.slice(g.length));
|
|
2722
|
-
}
|
|
2723
|
-
})(typeof self > "u" ? o === void 0 ? this : o : self);
|
|
2724
|
-
}).call(this, typeof xt < "u" ? xt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2725
|
-
}, {}] }, {}, [10])(10);
|
|
2726
|
-
});
|
|
2727
|
-
})(Ot);
|
|
2728
|
-
var qt = Ot.exports;
|
|
2729
|
-
const Xt = /* @__PURE__ */ jt(qt);
|
|
2730
|
-
function Jt(L) {
|
|
2731
|
-
let K = "";
|
|
2732
|
-
const s = [];
|
|
2733
|
-
if (L.bold && s.push("<b/>"), L.italic && s.push("<i/>"), L.underline && s.push("<u/>"), L.strikethrough && s.push("<strike/>"), L.textColor && L.textColor.toLowerCase() !== "#000000") {
|
|
2734
|
-
const c = Et(L.textColor);
|
|
2735
|
-
c && s.push(`<color rgb="${c}"/>`);
|
|
2736
|
-
}
|
|
2737
|
-
s.length > 0 && (K += `<font>${s.join("")}</font>`);
|
|
2738
|
-
const S = L.cellColor;
|
|
2739
|
-
if (S && S.toLowerCase() !== "#ffffff") {
|
|
2740
|
-
const c = Et(S);
|
|
2741
|
-
c && (K += `<fill><patternFill patternType="solid"><fgColor rgb="${c}"/></patternFill></fill>`);
|
|
2742
|
-
}
|
|
2743
|
-
return `<dxf>${K}</dxf>`;
|
|
2744
|
-
}
|
|
2745
|
-
function Qt(L, K) {
|
|
2746
|
-
const s = L.match(/<dxfs count="(\d+)"/);
|
|
2747
|
-
if (s) {
|
|
2748
|
-
const S = parseInt(s[1], 10);
|
|
2749
|
-
return {
|
|
2750
|
-
xml: L.replace(/<dxfs count="\d+"/, `<dxfs count="${S + 1}"`).replace("</dxfs>", K + "</dxfs>"),
|
|
2751
|
-
dxfId: S
|
|
2752
|
-
};
|
|
2753
|
-
}
|
|
2754
|
-
return L.includes("<dxfs/>") ? {
|
|
2755
|
-
xml: L.replace("<dxfs/>", `<dxfs count="1">${K}</dxfs>`),
|
|
2756
|
-
dxfId: 0
|
|
2757
|
-
} : {
|
|
2758
|
-
xml: L.replace(
|
|
2759
|
-
"</styleSheet>",
|
|
2760
|
-
`<dxfs count="1">${K}</dxfs></styleSheet>`
|
|
2761
|
-
),
|
|
2762
|
-
dxfId: 0
|
|
2763
|
-
};
|
|
2764
|
-
}
|
|
2765
|
-
function te(L) {
|
|
2766
|
-
return L.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2767
|
-
}
|
|
2768
|
-
function ee(L, K, s) {
|
|
2769
|
-
const S = new RegExp(
|
|
2770
|
-
`(<conditionalFormatting[^>]*\\bsqref="${te(K)}"[^>]*>)`
|
|
2771
|
-
);
|
|
2772
|
-
if (S.test(L))
|
|
2773
|
-
return L.replace(S, `$1${s}`);
|
|
2774
|
-
const c = `<conditionalFormatting sqref="${K}">${s}</conditionalFormatting>`;
|
|
2775
|
-
for (const o of [
|
|
2776
|
-
"<pageMargins",
|
|
2777
|
-
"<pageSetup",
|
|
2778
|
-
"<headerFooter",
|
|
2779
|
-
"<drawing",
|
|
2780
|
-
"</worksheet>"
|
|
2781
|
-
])
|
|
2782
|
-
if (L.includes(o))
|
|
2783
|
-
return L.replace(o, c + o);
|
|
2784
|
-
return L + c;
|
|
2785
|
-
}
|
|
2786
|
-
function re(L) {
|
|
2787
|
-
return L.replace(
|
|
2788
|
-
/<cfRule([^>]*)type="containsText"([^>]*?)>([\s\S]*?)<\/cfRule>/g,
|
|
2789
|
-
(K, s, S, c) => {
|
|
2790
|
-
if (/\btext=/.test(s) || /\btext=/.test(S)) return K;
|
|
2791
|
-
const o = c.match(/<formula[^>]*>([\s\S]*?)<\/formula>/);
|
|
2792
|
-
if (!o) return K;
|
|
2793
|
-
const r = o[1].replace(/"/g, '"').replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").match(/SEARCH\s*\(\s*"([^"]*)"/i);
|
|
2794
|
-
if (!r) return K;
|
|
2795
|
-
const l = r[1].replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
2796
|
-
return `<cfRule${s}type="containsText"${S} text="${l}">${c}</cfRule>`;
|
|
2797
|
-
}
|
|
2798
|
-
);
|
|
2799
|
-
}
|
|
2800
|
-
async function ne(L, K) {
|
|
2801
|
-
var a;
|
|
2802
|
-
const s = await Xt.loadAsync(L), S = s.file("xl/styles.xml");
|
|
2803
|
-
let c = S ? await S.async("text") : "", o = !1;
|
|
2804
|
-
for (const [r, l] of Object.entries(s.files)) {
|
|
2805
|
-
if (l.dir) continue;
|
|
2806
|
-
const d = r.match(/^xl\/worksheets\/sheet(\d+)\.xml$/);
|
|
2807
|
-
if (!d) continue;
|
|
2808
|
-
const w = parseInt(d[1], 10) - 1;
|
|
2809
|
-
let g = await l.async("text"), y = !1;
|
|
2810
|
-
const n = re(g);
|
|
2811
|
-
n !== g && (g = n, y = !0);
|
|
2812
|
-
const p = ((a = K[w]) == null ? void 0 : a.duplicateValues) ?? [];
|
|
2813
|
-
for (const i of p) {
|
|
2814
|
-
const h = Jt(i.format), { xml: u, dxfId: _ } = Qt(c, h);
|
|
2815
|
-
c = u, o = !0;
|
|
2816
|
-
const k = `<cfRule type="${i.type}" dxfId="${_}" priority="${i.priority}"/>`;
|
|
2817
|
-
g = ee(g, i.ref, k), y = !0;
|
|
2818
|
-
}
|
|
2819
|
-
y && s.file(r, g);
|
|
2820
|
-
}
|
|
2821
|
-
return o && S && s.file("xl/styles.xml", c), s.generateAsync({ type: "arraybuffer", compression: "DEFLATE" });
|
|
2822
|
-
}
|
|
2823
|
-
const ie = (L) => {
|
|
2824
|
-
if (!L || typeof L != "string") return null;
|
|
2825
|
-
const K = L.trim().toLowerCase();
|
|
2826
|
-
if (K.startsWith("#")) {
|
|
2827
|
-
const c = K.replace("#", "").toUpperCase();
|
|
2828
|
-
return c.length === 3 ? c.split("").map((o) => o + o).join("").toUpperCase() : c.length === 6 ? c : null;
|
|
2829
|
-
}
|
|
2830
|
-
const s = /rgba?\s*\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+[\d.]+)?\s*\)/i, S = K.match(s);
|
|
2831
|
-
if (S) {
|
|
2832
|
-
const c = Math.min(255, Math.max(0, parseFloat(S[1]))), o = Math.min(255, Math.max(0, parseFloat(S[2]))), a = Math.min(255, Math.max(0, parseFloat(S[3])));
|
|
2833
|
-
return ((1 << 24) + (c << 16) + (o << 8) + a).toString(16).slice(1).toUpperCase();
|
|
2834
|
-
}
|
|
2835
|
-
return null;
|
|
2836
|
-
};
|
|
2837
|
-
function ae(L) {
|
|
2838
|
-
const K = {};
|
|
2839
|
-
if (L.bl === 1 && (K.bold = !0), L.it === 1 && (K.italic = !0), L.un === 1 && (K.underline = !0), L.cl === 1 && (K.strike = !0), L.fs && (K.size = Number(L.fs)), typeof L.ff == "string" && L.ff && (K.name = L.ff), L.fc) {
|
|
2840
|
-
const s = ie(L.fc);
|
|
2841
|
-
s && (K.color = { argb: `FF${s}` });
|
|
2842
|
-
}
|
|
2843
|
-
return Object.keys(K).length > 0 ? K : void 0;
|
|
2844
|
-
}
|
|
2845
|
-
function Rt(L) {
|
|
2846
|
-
if (!Array.isArray(L) || L.length === 0) return null;
|
|
2847
|
-
const K = [];
|
|
2848
|
-
for (const s of L) {
|
|
2849
|
-
const S = String(s.v ?? "");
|
|
2850
|
-
if (S === "" && !s.bl && !s.it && !s.un && !s.cl) continue;
|
|
2851
|
-
const c = ae(s), o = { text: S };
|
|
2852
|
-
c && (o.font = c), K.push(o);
|
|
2853
|
-
}
|
|
2854
|
-
return K.length === 0 || !K.some((s) => s.text !== "") ? null : { richText: K };
|
|
2855
|
-
}
|
|
2856
|
-
function se(L, K) {
|
|
2857
|
-
K.forEach((s, S) => {
|
|
2858
|
-
const c = L.getCell(S);
|
|
2859
|
-
c.value = s;
|
|
2860
|
-
});
|
|
2861
|
-
}
|
|
2862
|
-
function oe(L) {
|
|
2863
|
-
const K = L == null ? void 0 : L.filter, s = L == null ? void 0 : L.filter_select, S = !!(K && Object.keys(K).length > 0), c = !!s && (Array.isArray(s.row) || Array.isArray(s.column));
|
|
2864
|
-
return S || c;
|
|
2865
|
-
}
|
|
2866
|
-
const St = (L) => {
|
|
2867
|
-
if (!L || typeof L != "string") return null;
|
|
2868
|
-
const K = L.trim().toLowerCase();
|
|
2869
|
-
if (K.startsWith("#")) {
|
|
2870
|
-
const c = K.replace("#", "").toUpperCase();
|
|
2871
|
-
return c.length === 3 ? c.split("").map((o) => o + o).join("").toUpperCase() : c.length === 6 ? c : null;
|
|
2872
|
-
}
|
|
2873
|
-
const s = /rgba?\s*\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:[,\s/]+[\d.]+)?\s*\)/i, S = K.match(s);
|
|
2874
|
-
if (S) {
|
|
2875
|
-
const c = Math.min(255, Math.max(0, parseFloat(S[1]))), o = Math.min(255, Math.max(0, parseFloat(S[2]))), a = Math.min(255, Math.max(0, parseFloat(S[3])));
|
|
2876
|
-
return ((1 << 24) + (c << 16) + (o << 8) + a).toString(16).slice(1).toUpperCase();
|
|
2877
|
-
}
|
|
2878
|
-
return null;
|
|
2879
|
-
}, me = async (L, K, s, S) => {
|
|
2880
|
-
var c, o, a, r;
|
|
2881
|
-
if (!(!L.current || !K.current))
|
|
2882
|
-
try {
|
|
2883
|
-
const l = (o = (c = L.current).getWorkbookContext) == null ? void 0 : o.call(c), d = l == null ? void 0 : l.luckysheetfile;
|
|
2884
|
-
Array.isArray(d) && d.some(oe) && Ut({
|
|
2885
|
-
title: "Filters are not supported in Export",
|
|
2886
|
-
variant: "warning",
|
|
2887
|
-
showCloseButton: !0,
|
|
2888
|
-
duration: 30 * 1e3
|
|
2889
|
-
}), K.current.getArray(s);
|
|
2890
|
-
const g = L.current.getAllSheets(), y = ht.book_new(), n = g.map(() => /* @__PURE__ */ new Map());
|
|
2891
|
-
g.forEach((D, R) => {
|
|
2892
|
-
var e, F, Q, W, et;
|
|
2893
|
-
const Z = Wt(D), Y = ht.aoa_to_sheet(Z);
|
|
2894
|
-
Object.keys(Y).forEach((I) => {
|
|
2895
|
-
if (I.startsWith("!")) return;
|
|
2896
|
-
const q = Y[I];
|
|
2897
|
-
q && (q.t === "s" || q.t === void 0) && q.v !== "" && !isNaN(Number(q.v)) && (Y[I] = { ...q, v: Number(q.v), t: "n" });
|
|
2898
|
-
}), Y["!merges"] = [], (e = D.config) != null && e.merge && Object.values(D.config.merge).forEach((I) => {
|
|
2899
|
-
Y["!merges"].push({
|
|
2900
|
-
s: { r: I.r, c: I.c },
|
|
2901
|
-
e: { r: I.r + I.rs - 1, c: I.c + I.cs - 1 }
|
|
2902
|
-
});
|
|
2903
|
-
});
|
|
2904
|
-
{
|
|
2905
|
-
const q = Math.round(3437.714285714286) / 256, x = D.column || 36;
|
|
2906
|
-
Y["!cols"] = [];
|
|
2907
|
-
for (let v = 0; v < x; v++) {
|
|
2908
|
-
const G = (Q = (F = D.config) == null ? void 0 : F.columnlen) == null ? void 0 : Q[v];
|
|
2909
|
-
if (G !== void 0) {
|
|
2910
|
-
const N = Math.max(
|
|
2911
|
-
0,
|
|
2912
|
-
Math.round((Number(G) - 5) / 7 * 256) / 256
|
|
2913
|
-
);
|
|
2914
|
-
Y["!cols"][v] = { wch: N };
|
|
2915
|
-
} else
|
|
2916
|
-
Y["!cols"][v] = { wch: q };
|
|
2917
|
-
}
|
|
2918
|
-
}
|
|
2919
|
-
{
|
|
2920
|
-
const I = Math.round(60.48) / 4;
|
|
2921
|
-
Y.sheetFormat = {
|
|
2922
|
-
...Y.sheetFormat || {},
|
|
2923
|
-
defaultRowHeight: String(I)
|
|
2924
|
-
}, (W = D.config) != null && W.rowlen && (Y["!rows"] = [], Object.entries(D.config.rowlen).forEach(([q, x]) => {
|
|
2925
|
-
const v = Math.round(Number(x) * 0.72 * 4) / 4;
|
|
2926
|
-
Y["!rows"][Number(q)] = { hpt: v };
|
|
2927
|
-
}));
|
|
2928
|
-
}
|
|
2929
|
-
const b = /* @__PURE__ */ new Set();
|
|
2930
|
-
(D.celldata ?? []).forEach((I) => {
|
|
2931
|
-
var at, tt, nt, ot, st;
|
|
2932
|
-
const q = I.r, x = I.c, v = I.v || {}, G = ht.encode_cell({ r: q, c: x });
|
|
2933
|
-
let N = Y[G] || {};
|
|
2934
|
-
if (N = { ...N }, v.f && (N.f = v.f.replace(/^=/, "")), !v.f && ((at = v.ct) == null ? void 0 : at.t) === "inlineStr" && Array.isArray(v.ct.s) ? (N.v = zt(v.ct.s), N.t = "s") : N.v = v.v ?? ((ot = (nt = (tt = v == null ? void 0 : v.ct) == null ? void 0 : tt.s) == null ? void 0 : nt[0]) == null ? void 0 : ot.v), v.m && (N.w = v.m), !v.f && ((st = v.ct) == null ? void 0 : st.t) === "inlineStr" && Array.isArray(v.ct.s)) {
|
|
2935
|
-
const ut = Rt(v.ct.s);
|
|
2936
|
-
ut && n[R].set(G, ut);
|
|
2937
|
-
}
|
|
2938
|
-
if (v.ct && (v.ct.fa && (N.z = v.ct.fa), v.ct.t && v.ct.t !== "inlineStr" && (N.t = v.ct.t === "d" ? "n" : v.ct.t)), typeof N.v == "number" && !N.t && (N.t = "n"), N.s = N.s || {}, v.bg) {
|
|
2939
|
-
const ut = St(v.bg);
|
|
2940
|
-
ut && (N.s.fill = {
|
|
2941
|
-
patternType: "solid",
|
|
2942
|
-
fgColor: { rgb: ut }
|
|
2943
|
-
});
|
|
2944
|
-
}
|
|
2945
|
-
N.s.font = {
|
|
2946
|
-
...N.s.font || {},
|
|
2947
|
-
bold: v.bl === 1 || void 0,
|
|
2948
|
-
italic: v.it === 1 || void 0,
|
|
2949
|
-
strike: v.cl === 1 || void 0,
|
|
2950
|
-
underline: v.un === 1 || void 0,
|
|
2951
|
-
sz: v.fs ?? 10,
|
|
2952
|
-
name: v.ff ?? void 0,
|
|
2953
|
-
color: (() => {
|
|
2954
|
-
const ut = St(v.fc);
|
|
2955
|
-
return ut ? { rgb: ut } : void 0;
|
|
2956
|
-
})()
|
|
2957
|
-
};
|
|
2958
|
-
const $ = { 0: "center", 1: "left", 2: "right" }, rt = { 0: "center", 1: "top", 2: "bottom" };
|
|
2959
|
-
N.s.alignment = {
|
|
2960
|
-
...N.s.alignment || {},
|
|
2961
|
-
wrapText: v.tb === "1" || v.tb === "2" ? !0 : void 0,
|
|
2962
|
-
textRotation: v.tr !== void 0 ? v.tr : void 0
|
|
2963
|
-
}, N.s.alignment.horizontal = $[v.ht] || void 0, N.s.alignment.vertical = rt[v.vt] || void 0, v.tb !== void 0 && (N.s.alignment = N.s.alignment || {}, v.tb === "1" ? N.s.alignment.wrapText = !0 : v.tb === "2" && (N.s.alignment.shrinkToFit = !0)), b.add(G), Y[G] = N;
|
|
2964
|
-
}), Z.forEach((I, q) => {
|
|
2965
|
-
Array.isArray(I) && I.forEach((x, v) => {
|
|
2966
|
-
if (!x || typeof x != "object") return;
|
|
2967
|
-
const G = ht.encode_cell({ r: q, c: v });
|
|
2968
|
-
if (b.has(G)) return;
|
|
2969
|
-
const N = !!x.f, $ = x.bg || x.bl || x.it || x.cl || x.un || x.fs || x.ff || x.fc || x.ht !== void 0 || x.vt !== void 0 || x.tb !== void 0 || x.tr !== void 0;
|
|
2970
|
-
if (!N && !$) return;
|
|
2971
|
-
const rt = { ...Y[G] || {} };
|
|
2972
|
-
if (rt.s = rt.s || {}, N && (rt.f = x.f.replace(/^=/, "")), x.bg) {
|
|
2973
|
-
const nt = St(x.bg);
|
|
2974
|
-
nt && (rt.s.fill = { patternType: "solid", fgColor: { rgb: nt } });
|
|
2975
|
-
}
|
|
2976
|
-
rt.s.font = {
|
|
2977
|
-
...rt.s.font || {},
|
|
2978
|
-
bold: x.bl === 1 || void 0,
|
|
2979
|
-
italic: x.it === 1 || void 0,
|
|
2980
|
-
strike: x.cl === 1 || void 0,
|
|
2981
|
-
underline: x.un === 1 || void 0,
|
|
2982
|
-
sz: x.fs ?? 10,
|
|
2983
|
-
name: x.ff ?? void 0,
|
|
2984
|
-
color: (() => {
|
|
2985
|
-
const nt = St(x.fc);
|
|
2986
|
-
return nt ? { rgb: nt } : void 0;
|
|
2987
|
-
})()
|
|
2988
|
-
};
|
|
2989
|
-
const at = { 0: "center", 1: "left", 2: "right" }, tt = { 0: "center", 1: "top", 2: "bottom" };
|
|
2990
|
-
rt.s.alignment = {
|
|
2991
|
-
...rt.s.alignment || {},
|
|
2992
|
-
horizontal: at[x.ht] || void 0,
|
|
2993
|
-
vertical: tt[x.vt] || void 0,
|
|
2994
|
-
textRotation: x.tr !== void 0 ? x.tr : void 0
|
|
2995
|
-
}, x.tb === "1" ? rt.s.alignment.wrapText = !0 : x.tb === "2" && (rt.s.alignment.shrinkToFit = !0), Y[G] = rt;
|
|
2996
|
-
});
|
|
2997
|
-
}), Z.forEach((I, q) => {
|
|
2998
|
-
Array.isArray(I) && I.forEach((x, v) => {
|
|
2999
|
-
var rt;
|
|
3000
|
-
if (!x || ((rt = x.ct) == null ? void 0 : rt.t) !== "inlineStr" || !Array.isArray(x.ct.s)) return;
|
|
3001
|
-
const G = ht.encode_cell({ r: q, c: v }), N = zt(x.ct.s);
|
|
3002
|
-
Y[G] = {
|
|
3003
|
-
...Y[G] || {},
|
|
3004
|
-
v: N,
|
|
3005
|
-
t: "s"
|
|
3006
|
-
};
|
|
3007
|
-
const $ = Rt(x.ct.s);
|
|
3008
|
-
$ && n[R].set(G, $);
|
|
3009
|
-
});
|
|
3010
|
-
}), (et = D.config) != null && et.borderInfo && Ht(Y, D.config.borderInfo);
|
|
3011
|
-
const O = D.name.length > 30 ? D.name.slice(0, 30) : D.name;
|
|
3012
|
-
ht.book_append_sheet(y, Y, O);
|
|
3013
|
-
});
|
|
3014
|
-
const p = await (S == null ? void 0 : S(s)) || "Untitled", i = Nt(y, {
|
|
3015
|
-
bookType: "xlsx",
|
|
3016
|
-
type: "array",
|
|
3017
|
-
compression: !0
|
|
3018
|
-
}), h = new Pt();
|
|
3019
|
-
await h.xlsx.load(i);
|
|
3020
|
-
const u = h.model;
|
|
3021
|
-
(r = (a = u == null ? void 0 : u.styles) == null ? void 0 : a.fonts) != null && r[0] && (u.styles.fonts[0] = { ...u.styles.fonts[0], size: 10 });
|
|
3022
|
-
const _ = g.map(() => ({
|
|
3023
|
-
duplicateValues: []
|
|
3024
|
-
}));
|
|
3025
|
-
g.forEach((D, R) => {
|
|
3026
|
-
const Z = h.worksheets[R];
|
|
3027
|
-
if (!Z) return;
|
|
3028
|
-
se(Z, n[R]);
|
|
3029
|
-
const Y = D.data;
|
|
3030
|
-
Object.entries(D.hyperlink || {}).forEach(([W, et]) => {
|
|
3031
|
-
var at, tt, nt, ot;
|
|
3032
|
-
const I = Mt(et);
|
|
3033
|
-
if (!(I != null && I.linkAddress)) return;
|
|
3034
|
-
const [q, x] = W.split("_").map(Number);
|
|
3035
|
-
if (Number.isNaN(q) || Number.isNaN(x)) return;
|
|
3036
|
-
const v = ht.encode_cell({ r: q, c: x }), G = Z.getCell(v), N = (at = Y == null ? void 0 : Y[q]) == null ? void 0 : at[x];
|
|
3037
|
-
let $ = "";
|
|
3038
|
-
N && typeof N == "object" && ((tt = N.ct) == null ? void 0 : tt.t) === "inlineStr" && Array.isArray(N.ct.s) && ($ = zt(N.ct.s));
|
|
3039
|
-
const rt = $ || (typeof G.text == "string" && G.text.length > 0 ? G.text : ((nt = G.value) == null ? void 0 : nt.text) || (Array.isArray((ot = G.value) == null ? void 0 : ot.richText) ? G.value.richText.map((st) => st.text || "").join("") : "") || "");
|
|
3040
|
-
G.value = {
|
|
3041
|
-
text: rt || I.linkAddress,
|
|
3042
|
-
hyperlink: I.linkAddress
|
|
3043
|
-
};
|
|
3044
|
-
});
|
|
3045
|
-
const { nextPriority: b, pendingDuplicateValues: O } = Kt(Z, D, 1);
|
|
3046
|
-
_[R] = { duplicateValues: O };
|
|
3047
|
-
let e = b;
|
|
3048
|
-
if (!D.dataVerification) return;
|
|
3049
|
-
const F = Z;
|
|
3050
|
-
F.dataValidations || (F.dataValidations = { model: {} }), F.dataValidations.model || (F.dataValidations.model = {});
|
|
3051
|
-
const Q = F.dataValidations.model;
|
|
3052
|
-
Object.entries(D.dataVerification).forEach(([W, et]) => {
|
|
3053
|
-
const I = et;
|
|
3054
|
-
if (I.type !== "dropdown" && I.type !== "checkbox") return;
|
|
3055
|
-
const [q, x] = W.split("_").map(Number), v = ht.encode_cell({ r: q, c: x });
|
|
3056
|
-
if (I.type === "checkbox") {
|
|
3057
|
-
const N = (I.value1 || "TRUE").trim(), $ = (I.value2 || "FALSE").trim(), rt = [N, $].filter(Boolean);
|
|
3058
|
-
Q[v] = {
|
|
3059
|
-
type: "list",
|
|
3060
|
-
allowBlank: !0,
|
|
3061
|
-
formulae: [`"${rt.join(",")}"`],
|
|
3062
|
-
showInputMessage: !!I.hintShow,
|
|
3063
|
-
prompt: I.hintValue || "",
|
|
3064
|
-
showErrorMessage: !!I.prohibitInput
|
|
3065
|
-
};
|
|
3066
|
-
return;
|
|
3067
|
-
}
|
|
3068
|
-
const G = (I.value1 || "").split(",").map((N) => N.trim()).filter(Boolean);
|
|
3069
|
-
if (G.length !== 0 && (Q[v] = {
|
|
3070
|
-
type: "list",
|
|
3071
|
-
allowBlank: !0,
|
|
3072
|
-
formulae: [`"${G.join(",")}"`],
|
|
3073
|
-
showInputMessage: !!I.hintShow,
|
|
3074
|
-
prompt: I.hintValue || "",
|
|
3075
|
-
showErrorMessage: !!I.prohibitInput
|
|
3076
|
-
}, I.color)) {
|
|
3077
|
-
const N = I.color.split(",").map((at) => parseInt(at.trim(), 10)), $ = (at) => Math.max(0, Math.min(255, at)).toString(16).padStart(2, "0").toUpperCase(), rt = G.map((at, tt) => {
|
|
3078
|
-
const nt = N[tt * 3], ot = N[tt * 3 + 1], st = N[tt * 3 + 2];
|
|
3079
|
-
if (isNaN(nt) || isNaN(ot) || isNaN(st)) return null;
|
|
3080
|
-
const ut = `FF${$(nt)}${$(ot)}${$(st)}`;
|
|
3081
|
-
return {
|
|
3082
|
-
type: "cellIs",
|
|
3083
|
-
operator: "equal",
|
|
3084
|
-
formulae: [`"${at}"`],
|
|
3085
|
-
priority: e++,
|
|
3086
|
-
style: {
|
|
3087
|
-
fill: {
|
|
3088
|
-
type: "pattern",
|
|
3089
|
-
pattern: "solid",
|
|
3090
|
-
fgColor: { argb: ut }
|
|
3091
|
-
}
|
|
3092
|
-
}
|
|
3093
|
-
};
|
|
3094
|
-
}).filter(Boolean);
|
|
3095
|
-
rt.length > 0 && F.addConditionalFormatting({
|
|
3096
|
-
ref: v,
|
|
3097
|
-
rules: rt
|
|
3098
|
-
});
|
|
3099
|
-
}
|
|
3100
|
-
});
|
|
3101
|
-
}), g.forEach((D, R) => {
|
|
3102
|
-
var O;
|
|
3103
|
-
if (!((O = D.images) != null && O.length)) return;
|
|
3104
|
-
const Z = h.worksheets[R];
|
|
3105
|
-
if (!Z) return;
|
|
3106
|
-
const Y = Number(D.defaultColWidth) || 99, b = Number(D.defaultRowHeight) || 21;
|
|
3107
|
-
Lt(
|
|
3108
|
-
Z,
|
|
3109
|
-
h,
|
|
3110
|
-
D.images,
|
|
3111
|
-
D,
|
|
3112
|
-
Y,
|
|
3113
|
-
b
|
|
3114
|
-
);
|
|
3115
|
-
});
|
|
3116
|
-
const k = await h.xlsx.writeBuffer(), A = await ne(k, _), E = new Blob([A], {
|
|
3117
|
-
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
3118
|
-
}), U = URL.createObjectURL(E), B = document.createElement("a");
|
|
3119
|
-
B.href = U, B.download = `${p}.xlsx`, B.click(), URL.revokeObjectURL(U);
|
|
3120
|
-
} catch (l) {
|
|
3121
|
-
console.error("Export failed:", l);
|
|
3122
|
-
}
|
|
3123
|
-
};
|
|
3124
|
-
export {
|
|
3125
|
-
me as handleExportToXLSX
|
|
3126
|
-
};
|