@giszhc/file-utils 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -10
- package/dist/file-utils.js +1038 -2810
- package/package.json +4 -3
package/dist/file-utils.js
CHANGED
|
@@ -1,2901 +1,1129 @@
|
|
|
1
|
-
function
|
|
2
|
-
return new Promise((
|
|
3
|
-
const
|
|
4
|
-
switch (
|
|
1
|
+
function Ar(e, r = "text") {
|
|
2
|
+
return new Promise((t, n) => {
|
|
3
|
+
const a = new FileReader();
|
|
4
|
+
switch (r) {
|
|
5
5
|
case "text":
|
|
6
|
-
|
|
6
|
+
a.readAsText(e);
|
|
7
7
|
break;
|
|
8
8
|
case "arrayBuffer":
|
|
9
|
-
|
|
9
|
+
a.readAsArrayBuffer(e);
|
|
10
10
|
break;
|
|
11
11
|
case "dataURL":
|
|
12
|
-
|
|
12
|
+
a.readAsDataURL(e);
|
|
13
13
|
break;
|
|
14
14
|
case "binaryString":
|
|
15
|
-
|
|
15
|
+
a.readAsBinaryString(e);
|
|
16
16
|
break;
|
|
17
17
|
default:
|
|
18
|
-
|
|
18
|
+
a.readAsText(e);
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
20
|
+
a.onload = (o) => {
|
|
21
|
+
const i = o.target?.result;
|
|
22
|
+
i !== void 0 ? t(i) : n(new Error("文件读取失败"));
|
|
23
|
+
}, a.onerror = () => {
|
|
24
|
+
n(new Error("文件读取错误"));
|
|
25
|
+
}, a.onabort = () => {
|
|
26
|
+
n(new Error("文件读取被中止"));
|
|
27
27
|
};
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
|
-
async function
|
|
31
|
-
return new Promise((
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
|
|
30
|
+
async function Oe(e, r = "utf-8") {
|
|
31
|
+
return new Promise((t, n) => {
|
|
32
|
+
const a = new FileReader();
|
|
33
|
+
a.readAsText(e, r), a.onload = (o) => {
|
|
34
|
+
const i = o.target?.result;
|
|
35
|
+
i !== void 0 ? t(i) : n(new Error("文件读取失败"));
|
|
36
|
+
}, a.onerror = () => {
|
|
37
|
+
n(new Error("文件读取错误"));
|
|
38
|
+
}, a.onabort = () => {
|
|
39
|
+
n(new Error("文件读取被中止"));
|
|
40
40
|
};
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
async function
|
|
44
|
-
const { separator:
|
|
45
|
-
if (!
|
|
43
|
+
async function $e(e, r = {}) {
|
|
44
|
+
const { separator: t = ",", hasHeader: n = !0 } = r, a = await Ar(e, "text");
|
|
45
|
+
if (!a.trim())
|
|
46
46
|
return [];
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
47
|
+
const o = a.split(/\r?\n/).filter((u) => u.trim() !== "");
|
|
48
|
+
if (o.length === 0)
|
|
49
49
|
return [];
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
for (let
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}),
|
|
50
|
+
let i = [], s = 0;
|
|
51
|
+
n && (i = Mr(o[0], t), s = 1);
|
|
52
|
+
const c = [];
|
|
53
|
+
for (let u = s; u < o.length; u++) {
|
|
54
|
+
const f = Mr(o[u], t);
|
|
55
|
+
if (n && i.length > 0) {
|
|
56
|
+
const m = {};
|
|
57
|
+
i.forEach((y, p) => {
|
|
58
|
+
m[y] = f[p] || "";
|
|
59
|
+
}), c.push(m);
|
|
60
60
|
} else
|
|
61
|
-
|
|
61
|
+
c.push(f);
|
|
62
62
|
}
|
|
63
|
-
return
|
|
63
|
+
return c;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
const
|
|
67
|
-
let
|
|
68
|
-
for (let
|
|
69
|
-
const
|
|
70
|
-
|
|
65
|
+
function Mr(e, r) {
|
|
66
|
+
const t = [];
|
|
67
|
+
let n = "", a = !1;
|
|
68
|
+
for (let o = 0; o < e.length; o++) {
|
|
69
|
+
const i = e[o], s = e[o + 1];
|
|
70
|
+
i === '"' ? a && s === '"' ? (n += '"', o++) : a = !a : i === r && !a ? (t.push(n.trim()), n = "") : n += i;
|
|
71
71
|
}
|
|
72
|
-
return
|
|
72
|
+
return t.push(n.trim()), t;
|
|
73
73
|
}
|
|
74
|
-
async function
|
|
75
|
-
const
|
|
74
|
+
async function Ue(e) {
|
|
75
|
+
const r = await Ar(e, "text");
|
|
76
76
|
try {
|
|
77
|
-
return JSON.parse(
|
|
78
|
-
} catch (
|
|
79
|
-
throw new Error(`JSON 解析失败:${
|
|
77
|
+
return JSON.parse(r);
|
|
78
|
+
} catch (t) {
|
|
79
|
+
throw new Error(`JSON 解析失败:${t instanceof Error ? t.message : "未知错误"}`);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
async function
|
|
82
|
+
async function ee(e, r, t) {
|
|
83
83
|
try {
|
|
84
|
-
const
|
|
85
|
-
if (!
|
|
86
|
-
throw new Error(`下载失败:${
|
|
87
|
-
const
|
|
88
|
-
let
|
|
89
|
-
if (!
|
|
90
|
-
const
|
|
91
|
-
if (
|
|
92
|
-
const
|
|
93
|
-
|
|
84
|
+
const n = await fetch(e, t?.fetchOptions);
|
|
85
|
+
if (!n.ok)
|
|
86
|
+
throw new Error(`下载失败:${n.status} ${n.statusText}`);
|
|
87
|
+
const a = await n.blob();
|
|
88
|
+
let o = r;
|
|
89
|
+
if (!o) {
|
|
90
|
+
const i = n.headers.get("Content-Disposition");
|
|
91
|
+
if (i) {
|
|
92
|
+
const s = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(i);
|
|
93
|
+
s && s[1] && (o = decodeURIComponent(s[1].replace(/['"]/g, "")));
|
|
94
94
|
}
|
|
95
|
-
|
|
95
|
+
o || (o = e.split("/").pop() || "download");
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
} catch (
|
|
99
|
-
throw console.error("文件下载失败:",
|
|
97
|
+
Q(a, o, t);
|
|
98
|
+
} catch (n) {
|
|
99
|
+
throw console.error("文件下载失败:", n), n;
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
const
|
|
104
|
-
|
|
102
|
+
function Q(e, r, t) {
|
|
103
|
+
const n = URL.createObjectURL(e), a = document.createElement("a");
|
|
104
|
+
a.href = n, a.download = r, t?.newWindow && (a.target = "_blank"), document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(n);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
for (let
|
|
110
|
-
|
|
111
|
-
const
|
|
112
|
-
|
|
106
|
+
function Ce(e, r, t) {
|
|
107
|
+
e.startsWith("data:") ? (t = e.split(",")[0].split(":")[1].split(";")[0], e = e.split(",")[1]) : t || (t = "application/octet-stream");
|
|
108
|
+
const a = atob(e), o = new Array(a.length);
|
|
109
|
+
for (let c = 0; c < a.length; c++)
|
|
110
|
+
o[c] = a.charCodeAt(c);
|
|
111
|
+
const i = new Uint8Array(o), s = new Blob([i], { type: t });
|
|
112
|
+
Q(s, r);
|
|
113
113
|
}
|
|
114
|
-
async function
|
|
115
|
-
for (let
|
|
114
|
+
async function Se(e, r = 500) {
|
|
115
|
+
for (let t = 0; t < e.length; t++)
|
|
116
116
|
try {
|
|
117
|
-
await
|
|
118
|
-
} catch (
|
|
119
|
-
console.error(`第 ${
|
|
117
|
+
await ee(e[t]), t < e.length - 1 && await new Promise((n) => setTimeout(n, r));
|
|
118
|
+
} catch (n) {
|
|
119
|
+
console.error(`第 ${t + 1} 个文件下载失败:`, n);
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
|
-
var
|
|
123
|
-
function
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var vt = {}, Ft;
|
|
127
|
-
function Ht() {
|
|
128
|
-
if (Ft) return vt;
|
|
129
|
-
Ft = 1, Object.defineProperty(vt, "__esModule", {
|
|
122
|
+
var rr = {}, Pr;
|
|
123
|
+
function te() {
|
|
124
|
+
if (Pr) return rr;
|
|
125
|
+
Pr = 1, Object.defineProperty(rr, "__esModule", {
|
|
130
126
|
value: !0
|
|
131
|
-
}),
|
|
132
|
-
function
|
|
133
|
-
if (Array.isArray(
|
|
134
|
-
for (var
|
|
135
|
-
|
|
136
|
-
return
|
|
127
|
+
}), rr.changeDpiBlob = p, rr.changeDpiDataUrl = $;
|
|
128
|
+
function e(v) {
|
|
129
|
+
if (Array.isArray(v)) {
|
|
130
|
+
for (var h = 0, l = Array(v.length); h < v.length; h++)
|
|
131
|
+
l[h] = v[h];
|
|
132
|
+
return l;
|
|
137
133
|
} else
|
|
138
|
-
return Array.from(
|
|
134
|
+
return Array.from(v);
|
|
139
135
|
}
|
|
140
|
-
function
|
|
141
|
-
for (var
|
|
142
|
-
for (var
|
|
143
|
-
|
|
144
|
-
|
|
136
|
+
function r() {
|
|
137
|
+
for (var v = new Int32Array(256), h = 0; h < 256; h++) {
|
|
138
|
+
for (var l = h, b = 0; b < 8; b++)
|
|
139
|
+
l = l & 1 ? 3988292384 ^ l >>> 1 : l >>> 1;
|
|
140
|
+
v[h] = l;
|
|
145
141
|
}
|
|
146
|
-
return
|
|
142
|
+
return v;
|
|
147
143
|
}
|
|
148
|
-
function
|
|
149
|
-
var
|
|
150
|
-
|
|
151
|
-
for (var
|
|
152
|
-
|
|
153
|
-
return
|
|
144
|
+
function t(v) {
|
|
145
|
+
var h = -1;
|
|
146
|
+
n || (n = r());
|
|
147
|
+
for (var l = 0; l < v.length; l++)
|
|
148
|
+
h = n[(h ^ v[l]) & 255] ^ h >>> 8;
|
|
149
|
+
return h ^ -1;
|
|
154
150
|
}
|
|
155
|
-
var
|
|
156
|
-
function
|
|
157
|
-
var
|
|
158
|
-
return new Promise(function(
|
|
159
|
-
var
|
|
160
|
-
|
|
161
|
-
var
|
|
162
|
-
|
|
163
|
-
},
|
|
151
|
+
var n = void 0, a = "image/png", o = "image/jpeg", i = "AAlwSFlz", s = "AAAJcEhZ", c = "AAAACXBI", u = 112, f = 72, m = 89, y = 115;
|
|
152
|
+
function p(v, h) {
|
|
153
|
+
var l = v.slice(0, 33);
|
|
154
|
+
return new Promise(function(b, d) {
|
|
155
|
+
var x = new FileReader();
|
|
156
|
+
x.onload = function() {
|
|
157
|
+
var g = new Uint8Array(x.result), w = v.slice(33), F = B(g, h, v.type);
|
|
158
|
+
b(new Blob([F, w], { type: v.type }));
|
|
159
|
+
}, x.readAsArrayBuffer(l);
|
|
164
160
|
});
|
|
165
161
|
}
|
|
166
|
-
function
|
|
167
|
-
var
|
|
168
|
-
if (
|
|
169
|
-
|
|
170
|
-
var
|
|
171
|
-
|
|
162
|
+
function $(v, h) {
|
|
163
|
+
var l = v.split(","), b = l[0], d = l[1], x = void 0, g = void 0, w = !1;
|
|
164
|
+
if (b.indexOf(a) !== -1) {
|
|
165
|
+
x = a;
|
|
166
|
+
var F = E(d);
|
|
167
|
+
F >= 0 ? (g = Math.ceil((F + 28) / 3) * 4, w = !0) : g = 33 / 3 * 4;
|
|
172
168
|
}
|
|
173
|
-
|
|
174
|
-
for (var
|
|
175
|
-
|
|
176
|
-
var
|
|
177
|
-
return [
|
|
169
|
+
b.indexOf(o) !== -1 && (x = o, g = 18 / 3 * 4);
|
|
170
|
+
for (var M = d.substring(0, g), D = d.substring(g), R = atob(M), C = new Uint8Array(R.length), S = 0; S < C.length; S++)
|
|
171
|
+
C[S] = R.charCodeAt(S);
|
|
172
|
+
var z = B(C, h, x, w), U = btoa(String.fromCharCode.apply(String, e(z)));
|
|
173
|
+
return [b, ",", U, D].join("");
|
|
178
174
|
}
|
|
179
|
-
function
|
|
180
|
-
var
|
|
181
|
-
return
|
|
175
|
+
function E(v) {
|
|
176
|
+
var h = v.indexOf(i);
|
|
177
|
+
return h === -1 && (h = v.indexOf(s)), h === -1 && (h = v.indexOf(c)), h;
|
|
182
178
|
}
|
|
183
|
-
function
|
|
184
|
-
for (var
|
|
185
|
-
if (
|
|
186
|
-
return
|
|
179
|
+
function A(v) {
|
|
180
|
+
for (var h = v.length - 1, l = h; l >= 4; l--)
|
|
181
|
+
if (v[l - 4] === 9 && v[l - 3] === u && v[l - 2] === f && v[l - 1] === m && v[l] === y)
|
|
182
|
+
return l - 3;
|
|
187
183
|
}
|
|
188
|
-
function
|
|
189
|
-
if (
|
|
190
|
-
return
|
|
191
|
-
if (
|
|
192
|
-
var
|
|
193
|
-
|
|
194
|
-
var
|
|
195
|
-
if (
|
|
196
|
-
var
|
|
197
|
-
return
|
|
184
|
+
function B(v, h, l, b) {
|
|
185
|
+
if (l === o)
|
|
186
|
+
return v[13] = 1, v[14] = h >> 8, v[15] = h & 255, v[16] = h >> 8, v[17] = h & 255, v;
|
|
187
|
+
if (l === a) {
|
|
188
|
+
var d = new Uint8Array(13);
|
|
189
|
+
h *= 39.3701, d[0] = u, d[1] = f, d[2] = m, d[3] = y, d[4] = h >>> 24, d[5] = h >>> 16, d[6] = h >>> 8, d[7] = h & 255, d[8] = d[4], d[9] = d[5], d[10] = d[6], d[11] = d[7], d[12] = 1;
|
|
190
|
+
var x = t(d), g = new Uint8Array(4);
|
|
191
|
+
if (g[0] = x >>> 24, g[1] = x >>> 16, g[2] = x >>> 8, g[3] = x & 255, b) {
|
|
192
|
+
var w = A(v);
|
|
193
|
+
return v.set(d, w), v.set(g, w + 13), v;
|
|
198
194
|
} else {
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
var
|
|
202
|
-
return
|
|
195
|
+
var F = new Uint8Array(4);
|
|
196
|
+
F[0] = 0, F[1] = 0, F[2] = 0, F[3] = 9;
|
|
197
|
+
var M = new Uint8Array(54);
|
|
198
|
+
return M.set(v, 0), M.set(F, 33), M.set(d, 37), M.set(g, 50), M;
|
|
203
199
|
}
|
|
204
200
|
}
|
|
205
201
|
}
|
|
206
|
-
return
|
|
202
|
+
return rr;
|
|
207
203
|
}
|
|
208
|
-
var
|
|
209
|
-
function
|
|
210
|
-
return
|
|
204
|
+
var Tr = te();
|
|
205
|
+
function Be(e) {
|
|
206
|
+
return Ar(e, "dataURL");
|
|
211
207
|
}
|
|
212
|
-
function
|
|
213
|
-
|
|
214
|
-
const
|
|
215
|
-
for (let
|
|
216
|
-
|
|
217
|
-
const
|
|
218
|
-
return new Blob([
|
|
208
|
+
function ne(e, r) {
|
|
209
|
+
e.startsWith("data:") ? (r = e.split(",")[0].split(":")[1].split(";")[0], e = e.split(",")[1]) : r || (r = "application/octet-stream");
|
|
210
|
+
const n = atob(e), a = new Array(n.length);
|
|
211
|
+
for (let i = 0; i < n.length; i++)
|
|
212
|
+
a[i] = n.charCodeAt(i);
|
|
213
|
+
const o = new Uint8Array(a);
|
|
214
|
+
return new Blob([o], { type: r });
|
|
219
215
|
}
|
|
220
|
-
function
|
|
221
|
-
return new File([
|
|
216
|
+
function Jr(e, r) {
|
|
217
|
+
return new File([e], r, { type: e.type });
|
|
222
218
|
}
|
|
223
|
-
function
|
|
224
|
-
const
|
|
225
|
-
return
|
|
219
|
+
function De(e, r = "file", t) {
|
|
220
|
+
const n = ne(e, t);
|
|
221
|
+
return Jr(n, r);
|
|
226
222
|
}
|
|
227
|
-
function
|
|
228
|
-
return new Promise((
|
|
229
|
-
const
|
|
230
|
-
|
|
223
|
+
function Me(e, r = "image/png", t = 1) {
|
|
224
|
+
return new Promise((n, a) => {
|
|
225
|
+
const o = new Image();
|
|
226
|
+
o.crossOrigin = "anonymous", o.onload = () => {
|
|
231
227
|
try {
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
const
|
|
235
|
-
if (!
|
|
236
|
-
|
|
228
|
+
const i = document.createElement("canvas");
|
|
229
|
+
i.width = o.width, i.height = o.height;
|
|
230
|
+
const s = i.getContext("2d");
|
|
231
|
+
if (!s) {
|
|
232
|
+
a(new Error("无法获取 Canvas 上下文"));
|
|
237
233
|
return;
|
|
238
234
|
}
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
} catch (
|
|
243
|
-
|
|
235
|
+
s.drawImage(o, 0, 0);
|
|
236
|
+
const c = i.toDataURL(r, t);
|
|
237
|
+
n(c);
|
|
238
|
+
} catch (i) {
|
|
239
|
+
a(i);
|
|
244
240
|
}
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
},
|
|
241
|
+
}, o.onerror = () => {
|
|
242
|
+
a(new Error(`图片加载失败:${e}`));
|
|
243
|
+
}, o.src = e;
|
|
248
244
|
});
|
|
249
245
|
}
|
|
250
|
-
async function
|
|
251
|
-
return typeof
|
|
246
|
+
async function Pe(e, r = 96) {
|
|
247
|
+
return typeof e == "string" ? Tr.changeDpiDataUrl(e, r) : await Tr.changeDpiBlob(e, r);
|
|
252
248
|
}
|
|
253
|
-
function
|
|
254
|
-
|
|
249
|
+
var Nr = {}, ae = (function(e, r, t, n, a) {
|
|
250
|
+
var o = new Worker(Nr[r] || (Nr[r] = URL.createObjectURL(new Blob([
|
|
251
|
+
e + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'
|
|
252
|
+
], { type: "text/javascript" }))));
|
|
253
|
+
return o.onmessage = function(i) {
|
|
254
|
+
var s = i.data, c = s.$e$;
|
|
255
|
+
if (c) {
|
|
256
|
+
var u = new Error(c[0]);
|
|
257
|
+
u.code = c[1], u.stack = c[2], a(u, null);
|
|
258
|
+
} else
|
|
259
|
+
a(null, s);
|
|
260
|
+
}, o.postMessage(t, n), o;
|
|
261
|
+
}), T = Uint8Array, I = Uint16Array, cr = Int32Array, fr = new T([
|
|
262
|
+
0,
|
|
263
|
+
0,
|
|
264
|
+
0,
|
|
265
|
+
0,
|
|
266
|
+
0,
|
|
267
|
+
0,
|
|
268
|
+
0,
|
|
269
|
+
0,
|
|
270
|
+
1,
|
|
271
|
+
1,
|
|
272
|
+
1,
|
|
273
|
+
1,
|
|
274
|
+
2,
|
|
275
|
+
2,
|
|
276
|
+
2,
|
|
277
|
+
2,
|
|
278
|
+
3,
|
|
279
|
+
3,
|
|
280
|
+
3,
|
|
281
|
+
3,
|
|
282
|
+
4,
|
|
283
|
+
4,
|
|
284
|
+
4,
|
|
285
|
+
4,
|
|
286
|
+
5,
|
|
287
|
+
5,
|
|
288
|
+
5,
|
|
289
|
+
5,
|
|
290
|
+
0,
|
|
291
|
+
/* unused */
|
|
292
|
+
0,
|
|
293
|
+
0,
|
|
294
|
+
/* impossible */
|
|
295
|
+
0
|
|
296
|
+
]), lr = new T([
|
|
297
|
+
0,
|
|
298
|
+
0,
|
|
299
|
+
0,
|
|
300
|
+
0,
|
|
301
|
+
1,
|
|
302
|
+
1,
|
|
303
|
+
2,
|
|
304
|
+
2,
|
|
305
|
+
3,
|
|
306
|
+
3,
|
|
307
|
+
4,
|
|
308
|
+
4,
|
|
309
|
+
5,
|
|
310
|
+
5,
|
|
311
|
+
6,
|
|
312
|
+
6,
|
|
313
|
+
7,
|
|
314
|
+
7,
|
|
315
|
+
8,
|
|
316
|
+
8,
|
|
317
|
+
9,
|
|
318
|
+
9,
|
|
319
|
+
10,
|
|
320
|
+
10,
|
|
321
|
+
11,
|
|
322
|
+
11,
|
|
323
|
+
12,
|
|
324
|
+
12,
|
|
325
|
+
13,
|
|
326
|
+
13,
|
|
327
|
+
/* unused */
|
|
328
|
+
0,
|
|
329
|
+
0
|
|
330
|
+
]), wr = new T([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), _r = function(e, r) {
|
|
331
|
+
for (var t = new I(31), n = 0; n < 31; ++n)
|
|
332
|
+
t[n] = r += 1 << e[n - 1];
|
|
333
|
+
for (var a = new cr(t[30]), n = 1; n < 30; ++n)
|
|
334
|
+
for (var o = t[n]; o < t[n + 1]; ++o)
|
|
335
|
+
a[o] = o - t[n] << 5 | n;
|
|
336
|
+
return { b: t, r: a };
|
|
337
|
+
}, Zr = _r(fr, 2), oe = Zr.b, or = Zr.r;
|
|
338
|
+
oe[28] = 258, or[258] = 28;
|
|
339
|
+
var ie = _r(lr, 0), dr = ie.r, ir = new I(32768);
|
|
340
|
+
for (var O = 0; O < 32768; ++O) {
|
|
341
|
+
var _ = (O & 43690) >> 1 | (O & 21845) << 1;
|
|
342
|
+
_ = (_ & 52428) >> 2 | (_ & 13107) << 2, _ = (_ & 61680) >> 4 | (_ & 3855) << 4, ir[O] = ((_ & 65280) >> 8 | (_ & 255) << 8) >> 1;
|
|
255
343
|
}
|
|
256
|
-
var
|
|
257
|
-
var
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
return z;
|
|
455
|
-
})(o.options.compression, h.compression), s = o.options.compressionOptions || h.compressionOptions || {}, d = o.dir, l = o.date;
|
|
456
|
-
o._compressWorker(m, s).withStreamInfo("file", { name: v, dir: d, date: l, comment: o.comment || "", unixPermissions: o.unixPermissions, dosPermissions: o.dosPermissions }).pipe(k);
|
|
457
|
-
}), k.entriesCount = g;
|
|
458
|
-
} catch (v) {
|
|
459
|
-
k.error(v);
|
|
460
|
-
}
|
|
461
|
-
return k;
|
|
462
|
-
};
|
|
463
|
-
}, { "../compressions": 3, "./ZipFileWorker": 8 }], 10: [function(r, b, u) {
|
|
464
|
-
function n() {
|
|
465
|
-
if (!(this instanceof n)) return new n();
|
|
466
|
-
if (arguments.length) throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
467
|
-
this.files = /* @__PURE__ */ Object.create(null), this.comment = null, this.root = "", this.clone = function() {
|
|
468
|
-
var a = new n();
|
|
469
|
-
for (var i in this) typeof this[i] != "function" && (a[i] = this[i]);
|
|
470
|
-
return a;
|
|
471
|
-
};
|
|
472
|
-
}
|
|
473
|
-
(n.prototype = r("./object")).loadAsync = r("./load"), n.support = r("./support"), n.defaults = r("./defaults"), n.version = "3.10.1", n.loadAsync = function(a, i) {
|
|
474
|
-
return new n().loadAsync(a, i);
|
|
475
|
-
}, n.external = r("./external"), b.exports = n;
|
|
476
|
-
}, { "./defaults": 5, "./external": 6, "./load": 11, "./object": 15, "./support": 30 }], 11: [function(r, b, u) {
|
|
477
|
-
var n = r("./utils"), a = r("./external"), i = r("./utf8"), h = r("./zipEntries"), y = r("./stream/Crc32Probe"), k = r("./nodejsUtils");
|
|
478
|
-
function g(v) {
|
|
479
|
-
return new a.Promise(function(o, m) {
|
|
480
|
-
var s = v.decompressed.getContentWorker().pipe(new y());
|
|
481
|
-
s.on("error", function(d) {
|
|
482
|
-
m(d);
|
|
483
|
-
}).on("end", function() {
|
|
484
|
-
s.streamInfo.crc32 !== v.decompressed.crc32 ? m(new Error("Corrupted zip : CRC32 mismatch")) : o();
|
|
485
|
-
}).resume();
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
b.exports = function(v, o) {
|
|
489
|
-
var m = this;
|
|
490
|
-
return o = n.extend(o || {}, { base64: !1, checkCRC32: !1, optimizedBinaryString: !1, createFolders: !1, decodeFileName: i.utf8decode }), k.isNode && k.isStream(v) ? a.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")) : n.prepareContent("the loaded zip file", v, !0, o.optimizedBinaryString, o.base64).then(function(s) {
|
|
491
|
-
var d = new h(o);
|
|
492
|
-
return d.load(s), d;
|
|
493
|
-
}).then(function(s) {
|
|
494
|
-
var d = [a.Promise.resolve(s)], l = s.files;
|
|
495
|
-
if (o.checkCRC32) for (var f = 0; f < l.length; f++) d.push(g(l[f]));
|
|
496
|
-
return a.Promise.all(d);
|
|
497
|
-
}).then(function(s) {
|
|
498
|
-
for (var d = s.shift(), l = d.files, f = 0; f < l.length; f++) {
|
|
499
|
-
var _ = l[f], S = _.fileNameStr, z = n.resolve(_.fileNameStr);
|
|
500
|
-
m.file(z, _.decompressed, { binary: !0, optimizedBinaryString: !0, date: _.date, dir: _.dir, comment: _.fileCommentStr.length ? _.fileCommentStr : null, unixPermissions: _.unixPermissions, dosPermissions: _.dosPermissions, createFolders: o.createFolders }), _.dir || (m.file(z).unsafeOriginalName = S);
|
|
501
|
-
}
|
|
502
|
-
return d.zipComment.length && (m.comment = d.zipComment), m;
|
|
503
|
-
});
|
|
504
|
-
};
|
|
505
|
-
}, { "./external": 6, "./nodejsUtils": 14, "./stream/Crc32Probe": 25, "./utf8": 31, "./utils": 32, "./zipEntries": 33 }], 12: [function(r, b, u) {
|
|
506
|
-
var n = r("../utils"), a = r("../stream/GenericWorker");
|
|
507
|
-
function i(h, y) {
|
|
508
|
-
a.call(this, "Nodejs stream input adapter for " + h), this._upstreamEnded = !1, this._bindStream(y);
|
|
509
|
-
}
|
|
510
|
-
n.inherits(i, a), i.prototype._bindStream = function(h) {
|
|
511
|
-
var y = this;
|
|
512
|
-
(this._stream = h).pause(), h.on("data", function(k) {
|
|
513
|
-
y.push({ data: k, meta: { percent: 0 } });
|
|
514
|
-
}).on("error", function(k) {
|
|
515
|
-
y.isPaused ? this.generatedError = k : y.error(k);
|
|
516
|
-
}).on("end", function() {
|
|
517
|
-
y.isPaused ? y._upstreamEnded = !0 : y.end();
|
|
518
|
-
});
|
|
519
|
-
}, i.prototype.pause = function() {
|
|
520
|
-
return !!a.prototype.pause.call(this) && (this._stream.pause(), !0);
|
|
521
|
-
}, i.prototype.resume = function() {
|
|
522
|
-
return !!a.prototype.resume.call(this) && (this._upstreamEnded ? this.end() : this._stream.resume(), !0);
|
|
523
|
-
}, b.exports = i;
|
|
524
|
-
}, { "../stream/GenericWorker": 28, "../utils": 32 }], 13: [function(r, b, u) {
|
|
525
|
-
var n = r("readable-stream").Readable;
|
|
526
|
-
function a(i, h, y) {
|
|
527
|
-
n.call(this, h), this._helper = i;
|
|
528
|
-
var k = this;
|
|
529
|
-
i.on("data", function(g, v) {
|
|
530
|
-
k.push(g) || k._helper.pause(), y && y(v);
|
|
531
|
-
}).on("error", function(g) {
|
|
532
|
-
k.emit("error", g);
|
|
533
|
-
}).on("end", function() {
|
|
534
|
-
k.push(null);
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
r("../utils").inherits(a, n), a.prototype._read = function() {
|
|
538
|
-
this._helper.resume();
|
|
539
|
-
}, b.exports = a;
|
|
540
|
-
}, { "../utils": 32, "readable-stream": 16 }], 14: [function(r, b, u) {
|
|
541
|
-
b.exports = { isNode: typeof Buffer < "u", newBufferFrom: function(n, a) {
|
|
542
|
-
if (Buffer.from && Buffer.from !== Uint8Array.from) return Buffer.from(n, a);
|
|
543
|
-
if (typeof n == "number") throw new Error('The "data" argument must not be a number');
|
|
544
|
-
return new Buffer(n, a);
|
|
545
|
-
}, allocBuffer: function(n) {
|
|
546
|
-
if (Buffer.alloc) return Buffer.alloc(n);
|
|
547
|
-
var a = new Buffer(n);
|
|
548
|
-
return a.fill(0), a;
|
|
549
|
-
}, isBuffer: function(n) {
|
|
550
|
-
return Buffer.isBuffer(n);
|
|
551
|
-
}, isStream: function(n) {
|
|
552
|
-
return n && typeof n.on == "function" && typeof n.pause == "function" && typeof n.resume == "function";
|
|
553
|
-
} };
|
|
554
|
-
}, {}], 15: [function(r, b, u) {
|
|
555
|
-
function n(z, F, R) {
|
|
556
|
-
var P, T = i.getTypeOf(F), W = i.extend(R || {}, k);
|
|
557
|
-
W.date = W.date || /* @__PURE__ */ new Date(), W.compression !== null && (W.compression = W.compression.toUpperCase()), typeof W.unixPermissions == "string" && (W.unixPermissions = parseInt(W.unixPermissions, 8)), W.unixPermissions && 16384 & W.unixPermissions && (W.dir = !0), W.dosPermissions && 16 & W.dosPermissions && (W.dir = !0), W.dir && (z = l(z)), W.createFolders && (P = d(z)) && f.call(this, P, !0);
|
|
558
|
-
var J = T === "string" && W.binary === !1 && W.base64 === !1;
|
|
559
|
-
R && R.binary !== void 0 || (W.binary = !J), (F instanceof g && F.uncompressedSize === 0 || W.dir || !F || F.length === 0) && (W.base64 = !1, W.binary = !0, F = "", W.compression = "STORE", T = "string");
|
|
560
|
-
var w = null;
|
|
561
|
-
w = F instanceof g || F instanceof h ? F : m.isNode && m.isStream(F) ? new s(z, F) : i.prepareContent(z, F, W.binary, W.optimizedBinaryString, W.base64);
|
|
562
|
-
var D = new v(z, w, W);
|
|
563
|
-
this.files[z] = D;
|
|
564
|
-
}
|
|
565
|
-
var a = r("./utf8"), i = r("./utils"), h = r("./stream/GenericWorker"), y = r("./stream/StreamHelper"), k = r("./defaults"), g = r("./compressedObject"), v = r("./zipObject"), o = r("./generate"), m = r("./nodejsUtils"), s = r("./nodejs/NodejsStreamInputAdapter"), d = function(z) {
|
|
566
|
-
z.slice(-1) === "/" && (z = z.substring(0, z.length - 1));
|
|
567
|
-
var F = z.lastIndexOf("/");
|
|
568
|
-
return 0 < F ? z.substring(0, F) : "";
|
|
569
|
-
}, l = function(z) {
|
|
570
|
-
return z.slice(-1) !== "/" && (z += "/"), z;
|
|
571
|
-
}, f = function(z, F) {
|
|
572
|
-
return F = F !== void 0 ? F : k.createFolders, z = l(z), this.files[z] || n.call(this, z, null, { dir: !0, createFolders: F }), this.files[z];
|
|
573
|
-
};
|
|
574
|
-
function _(z) {
|
|
575
|
-
return Object.prototype.toString.call(z) === "[object RegExp]";
|
|
576
|
-
}
|
|
577
|
-
var S = { load: function() {
|
|
578
|
-
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
579
|
-
}, forEach: function(z) {
|
|
580
|
-
var F, R, P;
|
|
581
|
-
for (F in this.files) P = this.files[F], (R = F.slice(this.root.length, F.length)) && F.slice(0, this.root.length) === this.root && z(R, P);
|
|
582
|
-
}, filter: function(z) {
|
|
583
|
-
var F = [];
|
|
584
|
-
return this.forEach(function(R, P) {
|
|
585
|
-
z(R, P) && F.push(P);
|
|
586
|
-
}), F;
|
|
587
|
-
}, file: function(z, F, R) {
|
|
588
|
-
if (arguments.length !== 1) return z = this.root + z, n.call(this, z, F, R), this;
|
|
589
|
-
if (_(z)) {
|
|
590
|
-
var P = z;
|
|
591
|
-
return this.filter(function(W, J) {
|
|
592
|
-
return !J.dir && P.test(W);
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
var T = this.files[this.root + z];
|
|
596
|
-
return T && !T.dir ? T : null;
|
|
597
|
-
}, folder: function(z) {
|
|
598
|
-
if (!z) return this;
|
|
599
|
-
if (_(z)) return this.filter(function(T, W) {
|
|
600
|
-
return W.dir && z.test(T);
|
|
601
|
-
});
|
|
602
|
-
var F = this.root + z, R = f.call(this, F), P = this.clone();
|
|
603
|
-
return P.root = R.name, P;
|
|
604
|
-
}, remove: function(z) {
|
|
605
|
-
z = this.root + z;
|
|
606
|
-
var F = this.files[z];
|
|
607
|
-
if (F || (z.slice(-1) !== "/" && (z += "/"), F = this.files[z]), F && !F.dir) delete this.files[z];
|
|
608
|
-
else for (var R = this.filter(function(T, W) {
|
|
609
|
-
return W.name.slice(0, z.length) === z;
|
|
610
|
-
}), P = 0; P < R.length; P++) delete this.files[R[P].name];
|
|
611
|
-
return this;
|
|
612
|
-
}, generate: function() {
|
|
613
|
-
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
614
|
-
}, generateInternalStream: function(z) {
|
|
615
|
-
var F, R = {};
|
|
616
|
-
try {
|
|
617
|
-
if ((R = i.extend(z || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: a.utf8encode })).type = R.type.toLowerCase(), R.compression = R.compression.toUpperCase(), R.type === "binarystring" && (R.type = "string"), !R.type) throw new Error("No output type specified.");
|
|
618
|
-
i.checkSupport(R.type), R.platform !== "darwin" && R.platform !== "freebsd" && R.platform !== "linux" && R.platform !== "sunos" || (R.platform = "UNIX"), R.platform === "win32" && (R.platform = "DOS");
|
|
619
|
-
var P = R.comment || this.comment || "";
|
|
620
|
-
F = o.generateWorker(this, R, P);
|
|
621
|
-
} catch (T) {
|
|
622
|
-
(F = new h("error")).error(T);
|
|
623
|
-
}
|
|
624
|
-
return new y(F, R.type || "string", R.mimeType);
|
|
625
|
-
}, generateAsync: function(z, F) {
|
|
626
|
-
return this.generateInternalStream(z).accumulate(F);
|
|
627
|
-
}, generateNodeStream: function(z, F) {
|
|
628
|
-
return (z = z || {}).type || (z.type = "nodebuffer"), this.generateInternalStream(z).toNodejsStream(F);
|
|
629
|
-
} };
|
|
630
|
-
b.exports = S;
|
|
631
|
-
}, { "./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(r, b, u) {
|
|
632
|
-
b.exports = r("stream");
|
|
633
|
-
}, { stream: void 0 }], 17: [function(r, b, u) {
|
|
634
|
-
var n = r("./DataReader");
|
|
635
|
-
function a(i) {
|
|
636
|
-
n.call(this, i);
|
|
637
|
-
for (var h = 0; h < this.data.length; h++) i[h] = 255 & i[h];
|
|
638
|
-
}
|
|
639
|
-
r("../utils").inherits(a, n), a.prototype.byteAt = function(i) {
|
|
640
|
-
return this.data[this.zero + i];
|
|
641
|
-
}, a.prototype.lastIndexOfSignature = function(i) {
|
|
642
|
-
for (var h = i.charCodeAt(0), y = i.charCodeAt(1), k = i.charCodeAt(2), g = i.charCodeAt(3), v = this.length - 4; 0 <= v; --v) if (this.data[v] === h && this.data[v + 1] === y && this.data[v + 2] === k && this.data[v + 3] === g) return v - this.zero;
|
|
643
|
-
return -1;
|
|
644
|
-
}, a.prototype.readAndCheckSignature = function(i) {
|
|
645
|
-
var h = i.charCodeAt(0), y = i.charCodeAt(1), k = i.charCodeAt(2), g = i.charCodeAt(3), v = this.readData(4);
|
|
646
|
-
return h === v[0] && y === v[1] && k === v[2] && g === v[3];
|
|
647
|
-
}, a.prototype.readData = function(i) {
|
|
648
|
-
if (this.checkOffset(i), i === 0) return [];
|
|
649
|
-
var h = this.data.slice(this.zero + this.index, this.zero + this.index + i);
|
|
650
|
-
return this.index += i, h;
|
|
651
|
-
}, b.exports = a;
|
|
652
|
-
}, { "../utils": 32, "./DataReader": 18 }], 18: [function(r, b, u) {
|
|
653
|
-
var n = r("../utils");
|
|
654
|
-
function a(i) {
|
|
655
|
-
this.data = i, this.length = i.length, this.index = 0, this.zero = 0;
|
|
656
|
-
}
|
|
657
|
-
a.prototype = { checkOffset: function(i) {
|
|
658
|
-
this.checkIndex(this.index + i);
|
|
659
|
-
}, checkIndex: function(i) {
|
|
660
|
-
if (this.length < this.zero + i || i < 0) throw new Error("End of data reached (data length = " + this.length + ", asked index = " + i + "). Corrupted zip ?");
|
|
661
|
-
}, setIndex: function(i) {
|
|
662
|
-
this.checkIndex(i), this.index = i;
|
|
663
|
-
}, skip: function(i) {
|
|
664
|
-
this.setIndex(this.index + i);
|
|
665
|
-
}, byteAt: function() {
|
|
666
|
-
}, readInt: function(i) {
|
|
667
|
-
var h, y = 0;
|
|
668
|
-
for (this.checkOffset(i), h = this.index + i - 1; h >= this.index; h--) y = (y << 8) + this.byteAt(h);
|
|
669
|
-
return this.index += i, y;
|
|
670
|
-
}, readString: function(i) {
|
|
671
|
-
return n.transformTo("string", this.readData(i));
|
|
672
|
-
}, readData: function() {
|
|
673
|
-
}, lastIndexOfSignature: function() {
|
|
674
|
-
}, readAndCheckSignature: function() {
|
|
675
|
-
}, readDate: function() {
|
|
676
|
-
var i = this.readInt(4);
|
|
677
|
-
return new Date(Date.UTC(1980 + (i >> 25 & 127), (i >> 21 & 15) - 1, i >> 16 & 31, i >> 11 & 31, i >> 5 & 63, (31 & i) << 1));
|
|
678
|
-
} }, b.exports = a;
|
|
679
|
-
}, { "../utils": 32 }], 19: [function(r, b, u) {
|
|
680
|
-
var n = r("./Uint8ArrayReader");
|
|
681
|
-
function a(i) {
|
|
682
|
-
n.call(this, i);
|
|
683
|
-
}
|
|
684
|
-
r("../utils").inherits(a, n), a.prototype.readData = function(i) {
|
|
685
|
-
this.checkOffset(i);
|
|
686
|
-
var h = this.data.slice(this.zero + this.index, this.zero + this.index + i);
|
|
687
|
-
return this.index += i, h;
|
|
688
|
-
}, b.exports = a;
|
|
689
|
-
}, { "../utils": 32, "./Uint8ArrayReader": 21 }], 20: [function(r, b, u) {
|
|
690
|
-
var n = r("./DataReader");
|
|
691
|
-
function a(i) {
|
|
692
|
-
n.call(this, i);
|
|
693
|
-
}
|
|
694
|
-
r("../utils").inherits(a, n), a.prototype.byteAt = function(i) {
|
|
695
|
-
return this.data.charCodeAt(this.zero + i);
|
|
696
|
-
}, a.prototype.lastIndexOfSignature = function(i) {
|
|
697
|
-
return this.data.lastIndexOf(i) - this.zero;
|
|
698
|
-
}, a.prototype.readAndCheckSignature = function(i) {
|
|
699
|
-
return i === this.readData(4);
|
|
700
|
-
}, a.prototype.readData = function(i) {
|
|
701
|
-
this.checkOffset(i);
|
|
702
|
-
var h = this.data.slice(this.zero + this.index, this.zero + this.index + i);
|
|
703
|
-
return this.index += i, h;
|
|
704
|
-
}, b.exports = a;
|
|
705
|
-
}, { "../utils": 32, "./DataReader": 18 }], 21: [function(r, b, u) {
|
|
706
|
-
var n = r("./ArrayReader");
|
|
707
|
-
function a(i) {
|
|
708
|
-
n.call(this, i);
|
|
709
|
-
}
|
|
710
|
-
r("../utils").inherits(a, n), a.prototype.readData = function(i) {
|
|
711
|
-
if (this.checkOffset(i), i === 0) return new Uint8Array(0);
|
|
712
|
-
var h = this.data.subarray(this.zero + this.index, this.zero + this.index + i);
|
|
713
|
-
return this.index += i, h;
|
|
714
|
-
}, b.exports = a;
|
|
715
|
-
}, { "../utils": 32, "./ArrayReader": 17 }], 22: [function(r, b, u) {
|
|
716
|
-
var n = r("../utils"), a = r("../support"), i = r("./ArrayReader"), h = r("./StringReader"), y = r("./NodeBufferReader"), k = r("./Uint8ArrayReader");
|
|
717
|
-
b.exports = function(g) {
|
|
718
|
-
var v = n.getTypeOf(g);
|
|
719
|
-
return n.checkSupport(v), v !== "string" || a.uint8array ? v === "nodebuffer" ? new y(g) : a.uint8array ? new k(n.transformTo("uint8array", g)) : new i(n.transformTo("array", g)) : new h(g);
|
|
720
|
-
};
|
|
721
|
-
}, { "../support": 30, "../utils": 32, "./ArrayReader": 17, "./NodeBufferReader": 19, "./StringReader": 20, "./Uint8ArrayReader": 21 }], 23: [function(r, b, u) {
|
|
722
|
-
u.LOCAL_FILE_HEADER = "PK", u.CENTRAL_FILE_HEADER = "PK", u.CENTRAL_DIRECTORY_END = "PK", u.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07", u.ZIP64_CENTRAL_DIRECTORY_END = "PK", u.DATA_DESCRIPTOR = "PK\x07\b";
|
|
723
|
-
}, {}], 24: [function(r, b, u) {
|
|
724
|
-
var n = r("./GenericWorker"), a = r("../utils");
|
|
725
|
-
function i(h) {
|
|
726
|
-
n.call(this, "ConvertWorker to " + h), this.destType = h;
|
|
727
|
-
}
|
|
728
|
-
a.inherits(i, n), i.prototype.processChunk = function(h) {
|
|
729
|
-
this.push({ data: a.transformTo(this.destType, h.data), meta: h.meta });
|
|
730
|
-
}, b.exports = i;
|
|
731
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 25: [function(r, b, u) {
|
|
732
|
-
var n = r("./GenericWorker"), a = r("../crc32");
|
|
733
|
-
function i() {
|
|
734
|
-
n.call(this, "Crc32Probe"), this.withStreamInfo("crc32", 0);
|
|
735
|
-
}
|
|
736
|
-
r("../utils").inherits(i, n), i.prototype.processChunk = function(h) {
|
|
737
|
-
this.streamInfo.crc32 = a(h.data, this.streamInfo.crc32 || 0), this.push(h);
|
|
738
|
-
}, b.exports = i;
|
|
739
|
-
}, { "../crc32": 4, "../utils": 32, "./GenericWorker": 28 }], 26: [function(r, b, u) {
|
|
740
|
-
var n = r("../utils"), a = r("./GenericWorker");
|
|
741
|
-
function i(h) {
|
|
742
|
-
a.call(this, "DataLengthProbe for " + h), this.propName = h, this.withStreamInfo(h, 0);
|
|
743
|
-
}
|
|
744
|
-
n.inherits(i, a), i.prototype.processChunk = function(h) {
|
|
745
|
-
if (h) {
|
|
746
|
-
var y = this.streamInfo[this.propName] || 0;
|
|
747
|
-
this.streamInfo[this.propName] = y + h.data.length;
|
|
748
|
-
}
|
|
749
|
-
a.prototype.processChunk.call(this, h);
|
|
750
|
-
}, b.exports = i;
|
|
751
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 27: [function(r, b, u) {
|
|
752
|
-
var n = r("../utils"), a = r("./GenericWorker");
|
|
753
|
-
function i(h) {
|
|
754
|
-
a.call(this, "DataWorker");
|
|
755
|
-
var y = this;
|
|
756
|
-
this.dataIsReady = !1, this.index = 0, this.max = 0, this.data = null, this.type = "", this._tickScheduled = !1, h.then(function(k) {
|
|
757
|
-
y.dataIsReady = !0, y.data = k, y.max = k && k.length || 0, y.type = n.getTypeOf(k), y.isPaused || y._tickAndRepeat();
|
|
758
|
-
}, function(k) {
|
|
759
|
-
y.error(k);
|
|
760
|
-
});
|
|
761
|
-
}
|
|
762
|
-
n.inherits(i, a), i.prototype.cleanUp = function() {
|
|
763
|
-
a.prototype.cleanUp.call(this), this.data = null;
|
|
764
|
-
}, i.prototype.resume = function() {
|
|
765
|
-
return !!a.prototype.resume.call(this) && (!this._tickScheduled && this.dataIsReady && (this._tickScheduled = !0, n.delay(this._tickAndRepeat, [], this)), !0);
|
|
766
|
-
}, i.prototype._tickAndRepeat = function() {
|
|
767
|
-
this._tickScheduled = !1, this.isPaused || this.isFinished || (this._tick(), this.isFinished || (n.delay(this._tickAndRepeat, [], this), this._tickScheduled = !0));
|
|
768
|
-
}, i.prototype._tick = function() {
|
|
769
|
-
if (this.isPaused || this.isFinished) return !1;
|
|
770
|
-
var h = null, y = Math.min(this.max, this.index + 16384);
|
|
771
|
-
if (this.index >= this.max) return this.end();
|
|
772
|
-
switch (this.type) {
|
|
773
|
-
case "string":
|
|
774
|
-
h = this.data.substring(this.index, y);
|
|
775
|
-
break;
|
|
776
|
-
case "uint8array":
|
|
777
|
-
h = this.data.subarray(this.index, y);
|
|
778
|
-
break;
|
|
779
|
-
case "array":
|
|
780
|
-
case "nodebuffer":
|
|
781
|
-
h = this.data.slice(this.index, y);
|
|
782
|
-
}
|
|
783
|
-
return this.index = y, this.push({ data: h, meta: { percent: this.max ? this.index / this.max * 100 : 0 } });
|
|
784
|
-
}, b.exports = i;
|
|
785
|
-
}, { "../utils": 32, "./GenericWorker": 28 }], 28: [function(r, b, u) {
|
|
786
|
-
function n(a) {
|
|
787
|
-
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;
|
|
788
|
-
}
|
|
789
|
-
n.prototype = { push: function(a) {
|
|
790
|
-
this.emit("data", a);
|
|
791
|
-
}, end: function() {
|
|
792
|
-
if (this.isFinished) return !1;
|
|
793
|
-
this.flush();
|
|
794
|
-
try {
|
|
795
|
-
this.emit("end"), this.cleanUp(), this.isFinished = !0;
|
|
796
|
-
} catch (a) {
|
|
797
|
-
this.emit("error", a);
|
|
798
|
-
}
|
|
799
|
-
return !0;
|
|
800
|
-
}, error: function(a) {
|
|
801
|
-
return !this.isFinished && (this.isPaused ? this.generatedError = a : (this.isFinished = !0, this.emit("error", a), this.previous && this.previous.error(a), this.cleanUp()), !0);
|
|
802
|
-
}, on: function(a, i) {
|
|
803
|
-
return this._listeners[a].push(i), this;
|
|
804
|
-
}, cleanUp: function() {
|
|
805
|
-
this.streamInfo = this.generatedError = this.extraStreamInfo = null, this._listeners = [];
|
|
806
|
-
}, emit: function(a, i) {
|
|
807
|
-
if (this._listeners[a]) for (var h = 0; h < this._listeners[a].length; h++) this._listeners[a][h].call(this, i);
|
|
808
|
-
}, pipe: function(a) {
|
|
809
|
-
return a.registerPrevious(this);
|
|
810
|
-
}, registerPrevious: function(a) {
|
|
811
|
-
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
812
|
-
this.streamInfo = a.streamInfo, this.mergeStreamInfo(), this.previous = a;
|
|
813
|
-
var i = this;
|
|
814
|
-
return a.on("data", function(h) {
|
|
815
|
-
i.processChunk(h);
|
|
816
|
-
}), a.on("end", function() {
|
|
817
|
-
i.end();
|
|
818
|
-
}), a.on("error", function(h) {
|
|
819
|
-
i.error(h);
|
|
820
|
-
}), this;
|
|
821
|
-
}, pause: function() {
|
|
822
|
-
return !this.isPaused && !this.isFinished && (this.isPaused = !0, this.previous && this.previous.pause(), !0);
|
|
823
|
-
}, resume: function() {
|
|
824
|
-
if (!this.isPaused || this.isFinished) return !1;
|
|
825
|
-
var a = this.isPaused = !1;
|
|
826
|
-
return this.generatedError && (this.error(this.generatedError), a = !0), this.previous && this.previous.resume(), !a;
|
|
827
|
-
}, flush: function() {
|
|
828
|
-
}, processChunk: function(a) {
|
|
829
|
-
this.push(a);
|
|
830
|
-
}, withStreamInfo: function(a, i) {
|
|
831
|
-
return this.extraStreamInfo[a] = i, this.mergeStreamInfo(), this;
|
|
832
|
-
}, mergeStreamInfo: function() {
|
|
833
|
-
for (var a in this.extraStreamInfo) Object.prototype.hasOwnProperty.call(this.extraStreamInfo, a) && (this.streamInfo[a] = this.extraStreamInfo[a]);
|
|
834
|
-
}, lock: function() {
|
|
835
|
-
if (this.isLocked) throw new Error("The stream '" + this + "' has already been used.");
|
|
836
|
-
this.isLocked = !0, this.previous && this.previous.lock();
|
|
837
|
-
}, toString: function() {
|
|
838
|
-
var a = "Worker " + this.name;
|
|
839
|
-
return this.previous ? this.previous + " -> " + a : a;
|
|
840
|
-
} }, b.exports = n;
|
|
841
|
-
}, {}], 29: [function(r, b, u) {
|
|
842
|
-
var n = r("../utils"), a = r("./ConvertWorker"), i = r("./GenericWorker"), h = r("../base64"), y = r("../support"), k = r("../external"), g = null;
|
|
843
|
-
if (y.nodestream) try {
|
|
844
|
-
g = r("../nodejs/NodejsStreamOutputAdapter");
|
|
845
|
-
} catch {
|
|
846
|
-
}
|
|
847
|
-
function v(m, s) {
|
|
848
|
-
return new k.Promise(function(d, l) {
|
|
849
|
-
var f = [], _ = m._internalType, S = m._outputType, z = m._mimeType;
|
|
850
|
-
m.on("data", function(F, R) {
|
|
851
|
-
f.push(F), s && s(R);
|
|
852
|
-
}).on("error", function(F) {
|
|
853
|
-
f = [], l(F);
|
|
854
|
-
}).on("end", function() {
|
|
855
|
-
try {
|
|
856
|
-
var F = (function(R, P, T) {
|
|
857
|
-
switch (R) {
|
|
858
|
-
case "blob":
|
|
859
|
-
return n.newBlob(n.transformTo("arraybuffer", P), T);
|
|
860
|
-
case "base64":
|
|
861
|
-
return h.encode(P);
|
|
862
|
-
default:
|
|
863
|
-
return n.transformTo(R, P);
|
|
864
|
-
}
|
|
865
|
-
})(S, (function(R, P) {
|
|
866
|
-
var T, W = 0, J = null, w = 0;
|
|
867
|
-
for (T = 0; T < P.length; T++) w += P[T].length;
|
|
868
|
-
switch (R) {
|
|
869
|
-
case "string":
|
|
870
|
-
return P.join("");
|
|
871
|
-
case "array":
|
|
872
|
-
return Array.prototype.concat.apply([], P);
|
|
873
|
-
case "uint8array":
|
|
874
|
-
for (J = new Uint8Array(w), T = 0; T < P.length; T++) J.set(P[T], W), W += P[T].length;
|
|
875
|
-
return J;
|
|
876
|
-
case "nodebuffer":
|
|
877
|
-
return Buffer.concat(P);
|
|
878
|
-
default:
|
|
879
|
-
throw new Error("concat : unsupported type '" + R + "'");
|
|
880
|
-
}
|
|
881
|
-
})(_, f), z);
|
|
882
|
-
d(F);
|
|
883
|
-
} catch (R) {
|
|
884
|
-
l(R);
|
|
885
|
-
}
|
|
886
|
-
f = [];
|
|
887
|
-
}).resume();
|
|
888
|
-
});
|
|
889
|
-
}
|
|
890
|
-
function o(m, s, d) {
|
|
891
|
-
var l = s;
|
|
892
|
-
switch (s) {
|
|
893
|
-
case "blob":
|
|
894
|
-
case "arraybuffer":
|
|
895
|
-
l = "uint8array";
|
|
896
|
-
break;
|
|
897
|
-
case "base64":
|
|
898
|
-
l = "string";
|
|
899
|
-
}
|
|
900
|
-
try {
|
|
901
|
-
this._internalType = l, this._outputType = s, this._mimeType = d, n.checkSupport(l), this._worker = m.pipe(new a(l)), m.lock();
|
|
902
|
-
} catch (f) {
|
|
903
|
-
this._worker = new i("error"), this._worker.error(f);
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
o.prototype = { accumulate: function(m) {
|
|
907
|
-
return v(this, m);
|
|
908
|
-
}, on: function(m, s) {
|
|
909
|
-
var d = this;
|
|
910
|
-
return m === "data" ? this._worker.on(m, function(l) {
|
|
911
|
-
s.call(d, l.data, l.meta);
|
|
912
|
-
}) : this._worker.on(m, function() {
|
|
913
|
-
n.delay(s, arguments, d);
|
|
914
|
-
}), this;
|
|
915
|
-
}, resume: function() {
|
|
916
|
-
return n.delay(this._worker.resume, [], this._worker), this;
|
|
917
|
-
}, pause: function() {
|
|
918
|
-
return this._worker.pause(), this;
|
|
919
|
-
}, toNodejsStream: function(m) {
|
|
920
|
-
if (n.checkSupport("nodestream"), this._outputType !== "nodebuffer") throw new Error(this._outputType + " is not supported by this method");
|
|
921
|
-
return new g(this, { objectMode: this._outputType !== "nodebuffer" }, m);
|
|
922
|
-
} }, b.exports = o;
|
|
923
|
-
}, { "../base64": 1, "../external": 6, "../nodejs/NodejsStreamOutputAdapter": 13, "../support": 30, "../utils": 32, "./ConvertWorker": 24, "./GenericWorker": 28 }], 30: [function(r, b, u) {
|
|
924
|
-
if (u.base64 = !0, u.array = !0, u.string = !0, u.arraybuffer = typeof ArrayBuffer < "u" && typeof Uint8Array < "u", u.nodebuffer = typeof Buffer < "u", u.uint8array = typeof Uint8Array < "u", typeof ArrayBuffer > "u") u.blob = !1;
|
|
925
|
-
else {
|
|
926
|
-
var n = new ArrayBuffer(0);
|
|
927
|
-
try {
|
|
928
|
-
u.blob = new Blob([n], { type: "application/zip" }).size === 0;
|
|
929
|
-
} catch {
|
|
930
|
-
try {
|
|
931
|
-
var a = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
932
|
-
a.append(n), u.blob = a.getBlob("application/zip").size === 0;
|
|
933
|
-
} catch {
|
|
934
|
-
u.blob = !1;
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
try {
|
|
939
|
-
u.nodestream = !!r("readable-stream").Readable;
|
|
940
|
-
} catch {
|
|
941
|
-
u.nodestream = !1;
|
|
942
|
-
}
|
|
943
|
-
}, { "readable-stream": 16 }], 31: [function(r, b, u) {
|
|
944
|
-
for (var n = r("./utils"), a = r("./support"), i = r("./nodejsUtils"), h = r("./stream/GenericWorker"), y = new Array(256), k = 0; k < 256; k++) y[k] = 252 <= k ? 6 : 248 <= k ? 5 : 240 <= k ? 4 : 224 <= k ? 3 : 192 <= k ? 2 : 1;
|
|
945
|
-
y[254] = y[254] = 1;
|
|
946
|
-
function g() {
|
|
947
|
-
h.call(this, "utf-8 decode"), this.leftOver = null;
|
|
948
|
-
}
|
|
949
|
-
function v() {
|
|
950
|
-
h.call(this, "utf-8 encode");
|
|
951
|
-
}
|
|
952
|
-
u.utf8encode = function(o) {
|
|
953
|
-
return a.nodebuffer ? i.newBufferFrom(o, "utf-8") : (function(m) {
|
|
954
|
-
var s, d, l, f, _, S = m.length, z = 0;
|
|
955
|
-
for (f = 0; f < S; f++) (64512 & (d = m.charCodeAt(f))) == 55296 && f + 1 < S && (64512 & (l = m.charCodeAt(f + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (l - 56320), f++), z += d < 128 ? 1 : d < 2048 ? 2 : d < 65536 ? 3 : 4;
|
|
956
|
-
for (s = a.uint8array ? new Uint8Array(z) : new Array(z), f = _ = 0; _ < z; f++) (64512 & (d = m.charCodeAt(f))) == 55296 && f + 1 < S && (64512 & (l = m.charCodeAt(f + 1))) == 56320 && (d = 65536 + (d - 55296 << 10) + (l - 56320), f++), d < 128 ? s[_++] = d : (d < 2048 ? s[_++] = 192 | d >>> 6 : (d < 65536 ? s[_++] = 224 | d >>> 12 : (s[_++] = 240 | d >>> 18, s[_++] = 128 | d >>> 12 & 63), s[_++] = 128 | d >>> 6 & 63), s[_++] = 128 | 63 & d);
|
|
957
|
-
return s;
|
|
958
|
-
})(o);
|
|
959
|
-
}, u.utf8decode = function(o) {
|
|
960
|
-
return a.nodebuffer ? n.transformTo("nodebuffer", o).toString("utf-8") : (function(m) {
|
|
961
|
-
var s, d, l, f, _ = m.length, S = new Array(2 * _);
|
|
962
|
-
for (s = d = 0; s < _; ) if ((l = m[s++]) < 128) S[d++] = l;
|
|
963
|
-
else if (4 < (f = y[l])) S[d++] = 65533, s += f - 1;
|
|
964
|
-
else {
|
|
965
|
-
for (l &= f === 2 ? 31 : f === 3 ? 15 : 7; 1 < f && s < _; ) l = l << 6 | 63 & m[s++], f--;
|
|
966
|
-
1 < f ? S[d++] = 65533 : l < 65536 ? S[d++] = l : (l -= 65536, S[d++] = 55296 | l >> 10 & 1023, S[d++] = 56320 | 1023 & l);
|
|
967
|
-
}
|
|
968
|
-
return S.length !== d && (S.subarray ? S = S.subarray(0, d) : S.length = d), n.applyFromCharCode(S);
|
|
969
|
-
})(o = n.transformTo(a.uint8array ? "uint8array" : "array", o));
|
|
970
|
-
}, n.inherits(g, h), g.prototype.processChunk = function(o) {
|
|
971
|
-
var m = n.transformTo(a.uint8array ? "uint8array" : "array", o.data);
|
|
972
|
-
if (this.leftOver && this.leftOver.length) {
|
|
973
|
-
if (a.uint8array) {
|
|
974
|
-
var s = m;
|
|
975
|
-
(m = new Uint8Array(s.length + this.leftOver.length)).set(this.leftOver, 0), m.set(s, this.leftOver.length);
|
|
976
|
-
} else m = this.leftOver.concat(m);
|
|
977
|
-
this.leftOver = null;
|
|
978
|
-
}
|
|
979
|
-
var d = (function(f, _) {
|
|
980
|
-
var S;
|
|
981
|
-
for ((_ = _ || f.length) > f.length && (_ = f.length), S = _ - 1; 0 <= S && (192 & f[S]) == 128; ) S--;
|
|
982
|
-
return S < 0 || S === 0 ? _ : S + y[f[S]] > _ ? S : _;
|
|
983
|
-
})(m), l = m;
|
|
984
|
-
d !== m.length && (a.uint8array ? (l = m.subarray(0, d), this.leftOver = m.subarray(d, m.length)) : (l = m.slice(0, d), this.leftOver = m.slice(d, m.length))), this.push({ data: u.utf8decode(l), meta: o.meta });
|
|
985
|
-
}, g.prototype.flush = function() {
|
|
986
|
-
this.leftOver && this.leftOver.length && (this.push({ data: u.utf8decode(this.leftOver), meta: {} }), this.leftOver = null);
|
|
987
|
-
}, u.Utf8DecodeWorker = g, n.inherits(v, h), v.prototype.processChunk = function(o) {
|
|
988
|
-
this.push({ data: u.utf8encode(o.data), meta: o.meta });
|
|
989
|
-
}, u.Utf8EncodeWorker = v;
|
|
990
|
-
}, { "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./support": 30, "./utils": 32 }], 32: [function(r, b, u) {
|
|
991
|
-
var n = r("./support"), a = r("./base64"), i = r("./nodejsUtils"), h = r("./external");
|
|
992
|
-
function y(s) {
|
|
993
|
-
return s;
|
|
994
|
-
}
|
|
995
|
-
function k(s, d) {
|
|
996
|
-
for (var l = 0; l < s.length; ++l) d[l] = 255 & s.charCodeAt(l);
|
|
997
|
-
return d;
|
|
998
|
-
}
|
|
999
|
-
r("setimmediate"), u.newBlob = function(s, d) {
|
|
1000
|
-
u.checkSupport("blob");
|
|
1001
|
-
try {
|
|
1002
|
-
return new Blob([s], { type: d });
|
|
1003
|
-
} catch {
|
|
1004
|
-
try {
|
|
1005
|
-
var l = new (self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder)();
|
|
1006
|
-
return l.append(s), l.getBlob(d);
|
|
1007
|
-
} catch {
|
|
1008
|
-
throw new Error("Bug : can't construct the Blob.");
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
};
|
|
1012
|
-
var g = { stringifyByChunk: function(s, d, l) {
|
|
1013
|
-
var f = [], _ = 0, S = s.length;
|
|
1014
|
-
if (S <= l) return String.fromCharCode.apply(null, s);
|
|
1015
|
-
for (; _ < S; ) d === "array" || d === "nodebuffer" ? f.push(String.fromCharCode.apply(null, s.slice(_, Math.min(_ + l, S)))) : f.push(String.fromCharCode.apply(null, s.subarray(_, Math.min(_ + l, S)))), _ += l;
|
|
1016
|
-
return f.join("");
|
|
1017
|
-
}, stringifyByChar: function(s) {
|
|
1018
|
-
for (var d = "", l = 0; l < s.length; l++) d += String.fromCharCode(s[l]);
|
|
1019
|
-
return d;
|
|
1020
|
-
}, applyCanBeUsed: { uint8array: (function() {
|
|
1021
|
-
try {
|
|
1022
|
-
return n.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1;
|
|
1023
|
-
} catch {
|
|
1024
|
-
return !1;
|
|
1025
|
-
}
|
|
1026
|
-
})(), nodebuffer: (function() {
|
|
1027
|
-
try {
|
|
1028
|
-
return n.nodebuffer && String.fromCharCode.apply(null, i.allocBuffer(1)).length === 1;
|
|
1029
|
-
} catch {
|
|
1030
|
-
return !1;
|
|
1031
|
-
}
|
|
1032
|
-
})() } };
|
|
1033
|
-
function v(s) {
|
|
1034
|
-
var d = 65536, l = u.getTypeOf(s), f = !0;
|
|
1035
|
-
if (l === "uint8array" ? f = g.applyCanBeUsed.uint8array : l === "nodebuffer" && (f = g.applyCanBeUsed.nodebuffer), f) for (; 1 < d; ) try {
|
|
1036
|
-
return g.stringifyByChunk(s, l, d);
|
|
1037
|
-
} catch {
|
|
1038
|
-
d = Math.floor(d / 2);
|
|
1039
|
-
}
|
|
1040
|
-
return g.stringifyByChar(s);
|
|
1041
|
-
}
|
|
1042
|
-
function o(s, d) {
|
|
1043
|
-
for (var l = 0; l < s.length; l++) d[l] = s[l];
|
|
1044
|
-
return d;
|
|
1045
|
-
}
|
|
1046
|
-
u.applyFromCharCode = v;
|
|
1047
|
-
var m = {};
|
|
1048
|
-
m.string = { string: y, array: function(s) {
|
|
1049
|
-
return k(s, new Array(s.length));
|
|
1050
|
-
}, arraybuffer: function(s) {
|
|
1051
|
-
return m.string.uint8array(s).buffer;
|
|
1052
|
-
}, uint8array: function(s) {
|
|
1053
|
-
return k(s, new Uint8Array(s.length));
|
|
1054
|
-
}, nodebuffer: function(s) {
|
|
1055
|
-
return k(s, i.allocBuffer(s.length));
|
|
1056
|
-
} }, m.array = { string: v, array: y, arraybuffer: function(s) {
|
|
1057
|
-
return new Uint8Array(s).buffer;
|
|
1058
|
-
}, uint8array: function(s) {
|
|
1059
|
-
return new Uint8Array(s);
|
|
1060
|
-
}, nodebuffer: function(s) {
|
|
1061
|
-
return i.newBufferFrom(s);
|
|
1062
|
-
} }, m.arraybuffer = { string: function(s) {
|
|
1063
|
-
return v(new Uint8Array(s));
|
|
1064
|
-
}, array: function(s) {
|
|
1065
|
-
return o(new Uint8Array(s), new Array(s.byteLength));
|
|
1066
|
-
}, arraybuffer: y, uint8array: function(s) {
|
|
1067
|
-
return new Uint8Array(s);
|
|
1068
|
-
}, nodebuffer: function(s) {
|
|
1069
|
-
return i.newBufferFrom(new Uint8Array(s));
|
|
1070
|
-
} }, m.uint8array = { string: v, array: function(s) {
|
|
1071
|
-
return o(s, new Array(s.length));
|
|
1072
|
-
}, arraybuffer: function(s) {
|
|
1073
|
-
return s.buffer;
|
|
1074
|
-
}, uint8array: y, nodebuffer: function(s) {
|
|
1075
|
-
return i.newBufferFrom(s);
|
|
1076
|
-
} }, m.nodebuffer = { string: v, array: function(s) {
|
|
1077
|
-
return o(s, new Array(s.length));
|
|
1078
|
-
}, arraybuffer: function(s) {
|
|
1079
|
-
return m.nodebuffer.uint8array(s).buffer;
|
|
1080
|
-
}, uint8array: function(s) {
|
|
1081
|
-
return o(s, new Uint8Array(s.length));
|
|
1082
|
-
}, nodebuffer: y }, u.transformTo = function(s, d) {
|
|
1083
|
-
if (d = d || "", !s) return d;
|
|
1084
|
-
u.checkSupport(s);
|
|
1085
|
-
var l = u.getTypeOf(d);
|
|
1086
|
-
return m[l][s](d);
|
|
1087
|
-
}, u.resolve = function(s) {
|
|
1088
|
-
for (var d = s.split("/"), l = [], f = 0; f < d.length; f++) {
|
|
1089
|
-
var _ = d[f];
|
|
1090
|
-
_ === "." || _ === "" && f !== 0 && f !== d.length - 1 || (_ === ".." ? l.pop() : l.push(_));
|
|
1091
|
-
}
|
|
1092
|
-
return l.join("/");
|
|
1093
|
-
}, u.getTypeOf = function(s) {
|
|
1094
|
-
return typeof s == "string" ? "string" : Object.prototype.toString.call(s) === "[object Array]" ? "array" : n.nodebuffer && i.isBuffer(s) ? "nodebuffer" : n.uint8array && s instanceof Uint8Array ? "uint8array" : n.arraybuffer && s instanceof ArrayBuffer ? "arraybuffer" : void 0;
|
|
1095
|
-
}, u.checkSupport = function(s) {
|
|
1096
|
-
if (!n[s.toLowerCase()]) throw new Error(s + " is not supported by this platform");
|
|
1097
|
-
}, u.MAX_VALUE_16BITS = 65535, u.MAX_VALUE_32BITS = -1, u.pretty = function(s) {
|
|
1098
|
-
var d, l, f = "";
|
|
1099
|
-
for (l = 0; l < (s || "").length; l++) f += "\\x" + ((d = s.charCodeAt(l)) < 16 ? "0" : "") + d.toString(16).toUpperCase();
|
|
1100
|
-
return f;
|
|
1101
|
-
}, u.delay = function(s, d, l) {
|
|
1102
|
-
setImmediate(function() {
|
|
1103
|
-
s.apply(l || null, d || []);
|
|
1104
|
-
});
|
|
1105
|
-
}, u.inherits = function(s, d) {
|
|
1106
|
-
function l() {
|
|
1107
|
-
}
|
|
1108
|
-
l.prototype = d.prototype, s.prototype = new l();
|
|
1109
|
-
}, u.extend = function() {
|
|
1110
|
-
var s, d, l = {};
|
|
1111
|
-
for (s = 0; s < arguments.length; s++) for (d in arguments[s]) Object.prototype.hasOwnProperty.call(arguments[s], d) && l[d] === void 0 && (l[d] = arguments[s][d]);
|
|
1112
|
-
return l;
|
|
1113
|
-
}, u.prepareContent = function(s, d, l, f, _) {
|
|
1114
|
-
return h.Promise.resolve(d).then(function(S) {
|
|
1115
|
-
return n.blob && (S instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(S)) !== -1) && typeof FileReader < "u" ? new h.Promise(function(z, F) {
|
|
1116
|
-
var R = new FileReader();
|
|
1117
|
-
R.onload = function(P) {
|
|
1118
|
-
z(P.target.result);
|
|
1119
|
-
}, R.onerror = function(P) {
|
|
1120
|
-
F(P.target.error);
|
|
1121
|
-
}, R.readAsArrayBuffer(S);
|
|
1122
|
-
}) : S;
|
|
1123
|
-
}).then(function(S) {
|
|
1124
|
-
var z = u.getTypeOf(S);
|
|
1125
|
-
return z ? (z === "arraybuffer" ? S = u.transformTo("uint8array", S) : z === "string" && (_ ? S = a.decode(S) : l && f !== !0 && (S = (function(F) {
|
|
1126
|
-
return k(F, n.uint8array ? new Uint8Array(F.length) : new Array(F.length));
|
|
1127
|
-
})(S))), S) : h.Promise.reject(new Error("Can't read the data of '" + s + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
1128
|
-
});
|
|
1129
|
-
};
|
|
1130
|
-
}, { "./base64": 1, "./external": 6, "./nodejsUtils": 14, "./support": 30, setimmediate: 54 }], 33: [function(r, b, u) {
|
|
1131
|
-
var n = r("./reader/readerFor"), a = r("./utils"), i = r("./signature"), h = r("./zipEntry"), y = r("./support");
|
|
1132
|
-
function k(g) {
|
|
1133
|
-
this.files = [], this.loadOptions = g;
|
|
1134
|
-
}
|
|
1135
|
-
k.prototype = { checkSignature: function(g) {
|
|
1136
|
-
if (!this.reader.readAndCheckSignature(g)) {
|
|
1137
|
-
this.reader.index -= 4;
|
|
1138
|
-
var v = this.reader.readString(4);
|
|
1139
|
-
throw new Error("Corrupted zip or bug: unexpected signature (" + a.pretty(v) + ", expected " + a.pretty(g) + ")");
|
|
1140
|
-
}
|
|
1141
|
-
}, isSignature: function(g, v) {
|
|
1142
|
-
var o = this.reader.index;
|
|
1143
|
-
this.reader.setIndex(g);
|
|
1144
|
-
var m = this.reader.readString(4) === v;
|
|
1145
|
-
return this.reader.setIndex(o), m;
|
|
1146
|
-
}, readBlockEndOfCentral: function() {
|
|
1147
|
-
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);
|
|
1148
|
-
var g = this.reader.readData(this.zipCommentLength), v = y.uint8array ? "uint8array" : "array", o = a.transformTo(v, g);
|
|
1149
|
-
this.zipComment = this.loadOptions.decodeFileName(o);
|
|
1150
|
-
}, readBlockZip64EndOfCentral: function() {
|
|
1151
|
-
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 = {};
|
|
1152
|
-
for (var g, v, o, m = this.zip64EndOfCentralSize - 44; 0 < m; ) g = this.reader.readInt(2), v = this.reader.readInt(4), o = this.reader.readData(v), this.zip64ExtensibleData[g] = { id: g, length: v, value: o };
|
|
1153
|
-
}, readBlockZip64EndOfCentralLocator: function() {
|
|
1154
|
-
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");
|
|
1155
|
-
}, readLocalFiles: function() {
|
|
1156
|
-
var g, v;
|
|
1157
|
-
for (g = 0; g < this.files.length; g++) v = this.files[g], this.reader.setIndex(v.localHeaderOffset), this.checkSignature(i.LOCAL_FILE_HEADER), v.readLocalPart(this.reader), v.handleUTF8(), v.processAttributes();
|
|
1158
|
-
}, readCentralDir: function() {
|
|
1159
|
-
var g;
|
|
1160
|
-
for (this.reader.setIndex(this.centralDirOffset); this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER); ) (g = new h({ zip64: this.zip64 }, this.loadOptions)).readCentralPart(this.reader), this.files.push(g);
|
|
1161
|
-
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);
|
|
1162
|
-
}, readEndOfCentral: function() {
|
|
1163
|
-
var g = this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);
|
|
1164
|
-
if (g < 0) throw this.isSignature(0, i.LOCAL_FILE_HEADER) ? new Error("Corrupted zip: can't find end of central directory") : new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");
|
|
1165
|
-
this.reader.setIndex(g);
|
|
1166
|
-
var v = g;
|
|
1167
|
-
if (this.checkSignature(i.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) {
|
|
1168
|
-
if (this.zip64 = !0, (g = this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR)) < 0) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");
|
|
1169
|
-
if (this.reader.setIndex(g), this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR), this.readBlockZip64EndOfCentralLocator(), !this.isSignature(this.relativeOffsetEndOfZip64CentralDir, i.ZIP64_CENTRAL_DIRECTORY_END) && (this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END), this.relativeOffsetEndOfZip64CentralDir < 0)) throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");
|
|
1170
|
-
this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir), this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END), this.readBlockZip64EndOfCentral();
|
|
1171
|
-
}
|
|
1172
|
-
var o = this.centralDirOffset + this.centralDirSize;
|
|
1173
|
-
this.zip64 && (o += 20, o += 12 + this.zip64EndOfCentralSize);
|
|
1174
|
-
var m = v - o;
|
|
1175
|
-
if (0 < m) this.isSignature(v, i.CENTRAL_FILE_HEADER) || (this.reader.zero = m);
|
|
1176
|
-
else if (m < 0) throw new Error("Corrupted zip: missing " + Math.abs(m) + " bytes.");
|
|
1177
|
-
}, prepareReader: function(g) {
|
|
1178
|
-
this.reader = n(g);
|
|
1179
|
-
}, load: function(g) {
|
|
1180
|
-
this.prepareReader(g), this.readEndOfCentral(), this.readCentralDir(), this.readLocalFiles();
|
|
1181
|
-
} }, b.exports = k;
|
|
1182
|
-
}, { "./reader/readerFor": 22, "./signature": 23, "./support": 30, "./utils": 32, "./zipEntry": 34 }], 34: [function(r, b, u) {
|
|
1183
|
-
var n = r("./reader/readerFor"), a = r("./utils"), i = r("./compressedObject"), h = r("./crc32"), y = r("./utf8"), k = r("./compressions"), g = r("./support");
|
|
1184
|
-
function v(o, m) {
|
|
1185
|
-
this.options = o, this.loadOptions = m;
|
|
1186
|
-
}
|
|
1187
|
-
v.prototype = { isEncrypted: function() {
|
|
1188
|
-
return (1 & this.bitFlag) == 1;
|
|
1189
|
-
}, useUTF8: function() {
|
|
1190
|
-
return (2048 & this.bitFlag) == 2048;
|
|
1191
|
-
}, readLocalPart: function(o) {
|
|
1192
|
-
var m, s;
|
|
1193
|
-
if (o.skip(22), this.fileNameLength = o.readInt(2), s = o.readInt(2), this.fileName = o.readData(this.fileNameLength), o.skip(s), 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)");
|
|
1194
|
-
if ((m = (function(d) {
|
|
1195
|
-
for (var l in k) if (Object.prototype.hasOwnProperty.call(k, l) && k[l].magic === d) return k[l];
|
|
1196
|
-
return null;
|
|
1197
|
-
})(this.compressionMethod)) === null) throw new Error("Corrupted zip : compression " + a.pretty(this.compressionMethod) + " unknown (inner file : " + a.transformTo("string", this.fileName) + ")");
|
|
1198
|
-
this.decompressed = new i(this.compressedSize, this.uncompressedSize, this.crc32, m, o.readData(this.compressedSize));
|
|
1199
|
-
}, readCentralPart: function(o) {
|
|
1200
|
-
this.versionMadeBy = o.readInt(2), o.skip(2), this.bitFlag = o.readInt(2), this.compressionMethod = o.readString(2), this.date = o.readDate(), this.crc32 = o.readInt(4), this.compressedSize = o.readInt(4), this.uncompressedSize = o.readInt(4);
|
|
1201
|
-
var m = o.readInt(2);
|
|
1202
|
-
if (this.extraFieldsLength = o.readInt(2), this.fileCommentLength = o.readInt(2), this.diskNumberStart = o.readInt(2), this.internalFileAttributes = o.readInt(2), this.externalFileAttributes = o.readInt(4), this.localHeaderOffset = o.readInt(4), this.isEncrypted()) throw new Error("Encrypted zip are not supported");
|
|
1203
|
-
o.skip(m), this.readExtraFields(o), this.parseZIP64ExtraField(o), this.fileComment = o.readData(this.fileCommentLength);
|
|
1204
|
-
}, processAttributes: function() {
|
|
1205
|
-
this.unixPermissions = null, this.dosPermissions = null;
|
|
1206
|
-
var o = this.versionMadeBy >> 8;
|
|
1207
|
-
this.dir = !!(16 & this.externalFileAttributes), o == 0 && (this.dosPermissions = 63 & this.externalFileAttributes), o == 3 && (this.unixPermissions = this.externalFileAttributes >> 16 & 65535), this.dir || this.fileNameStr.slice(-1) !== "/" || (this.dir = !0);
|
|
1208
|
-
}, parseZIP64ExtraField: function() {
|
|
1209
|
-
if (this.extraFields[1]) {
|
|
1210
|
-
var o = n(this.extraFields[1].value);
|
|
1211
|
-
this.uncompressedSize === a.MAX_VALUE_32BITS && (this.uncompressedSize = o.readInt(8)), this.compressedSize === a.MAX_VALUE_32BITS && (this.compressedSize = o.readInt(8)), this.localHeaderOffset === a.MAX_VALUE_32BITS && (this.localHeaderOffset = o.readInt(8)), this.diskNumberStart === a.MAX_VALUE_32BITS && (this.diskNumberStart = o.readInt(4));
|
|
1212
|
-
}
|
|
1213
|
-
}, readExtraFields: function(o) {
|
|
1214
|
-
var m, s, d, l = o.index + this.extraFieldsLength;
|
|
1215
|
-
for (this.extraFields || (this.extraFields = {}); o.index + 4 < l; ) m = o.readInt(2), s = o.readInt(2), d = o.readData(s), this.extraFields[m] = { id: m, length: s, value: d };
|
|
1216
|
-
o.setIndex(l);
|
|
1217
|
-
}, handleUTF8: function() {
|
|
1218
|
-
var o = g.uint8array ? "uint8array" : "array";
|
|
1219
|
-
if (this.useUTF8()) this.fileNameStr = y.utf8decode(this.fileName), this.fileCommentStr = y.utf8decode(this.fileComment);
|
|
1220
|
-
else {
|
|
1221
|
-
var m = this.findExtraFieldUnicodePath();
|
|
1222
|
-
if (m !== null) this.fileNameStr = m;
|
|
1223
|
-
else {
|
|
1224
|
-
var s = a.transformTo(o, this.fileName);
|
|
1225
|
-
this.fileNameStr = this.loadOptions.decodeFileName(s);
|
|
1226
|
-
}
|
|
1227
|
-
var d = this.findExtraFieldUnicodeComment();
|
|
1228
|
-
if (d !== null) this.fileCommentStr = d;
|
|
1229
|
-
else {
|
|
1230
|
-
var l = a.transformTo(o, this.fileComment);
|
|
1231
|
-
this.fileCommentStr = this.loadOptions.decodeFileName(l);
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
}, findExtraFieldUnicodePath: function() {
|
|
1235
|
-
var o = this.extraFields[28789];
|
|
1236
|
-
if (o) {
|
|
1237
|
-
var m = n(o.value);
|
|
1238
|
-
return m.readInt(1) !== 1 || h(this.fileName) !== m.readInt(4) ? null : y.utf8decode(m.readData(o.length - 5));
|
|
1239
|
-
}
|
|
1240
|
-
return null;
|
|
1241
|
-
}, findExtraFieldUnicodeComment: function() {
|
|
1242
|
-
var o = this.extraFields[25461];
|
|
1243
|
-
if (o) {
|
|
1244
|
-
var m = n(o.value);
|
|
1245
|
-
return m.readInt(1) !== 1 || h(this.fileComment) !== m.readInt(4) ? null : y.utf8decode(m.readData(o.length - 5));
|
|
1246
|
-
}
|
|
1247
|
-
return null;
|
|
1248
|
-
} }, b.exports = v;
|
|
1249
|
-
}, { "./compressedObject": 2, "./compressions": 3, "./crc32": 4, "./reader/readerFor": 22, "./support": 30, "./utf8": 31, "./utils": 32 }], 35: [function(r, b, u) {
|
|
1250
|
-
function n(m, s, d) {
|
|
1251
|
-
this.name = m, this.dir = d.dir, this.date = d.date, this.comment = d.comment, this.unixPermissions = d.unixPermissions, this.dosPermissions = d.dosPermissions, this._data = s, this._dataBinary = d.binary, this.options = { compression: d.compression, compressionOptions: d.compressionOptions };
|
|
1252
|
-
}
|
|
1253
|
-
var a = r("./stream/StreamHelper"), i = r("./stream/DataWorker"), h = r("./utf8"), y = r("./compressedObject"), k = r("./stream/GenericWorker");
|
|
1254
|
-
n.prototype = { internalStream: function(m) {
|
|
1255
|
-
var s = null, d = "string";
|
|
1256
|
-
try {
|
|
1257
|
-
if (!m) throw new Error("No output type specified.");
|
|
1258
|
-
var l = (d = m.toLowerCase()) === "string" || d === "text";
|
|
1259
|
-
d !== "binarystring" && d !== "text" || (d = "string"), s = this._decompressWorker();
|
|
1260
|
-
var f = !this._dataBinary;
|
|
1261
|
-
f && !l && (s = s.pipe(new h.Utf8EncodeWorker())), !f && l && (s = s.pipe(new h.Utf8DecodeWorker()));
|
|
1262
|
-
} catch (_) {
|
|
1263
|
-
(s = new k("error")).error(_);
|
|
1264
|
-
}
|
|
1265
|
-
return new a(s, d, "");
|
|
1266
|
-
}, async: function(m, s) {
|
|
1267
|
-
return this.internalStream(m).accumulate(s);
|
|
1268
|
-
}, nodeStream: function(m, s) {
|
|
1269
|
-
return this.internalStream(m || "nodebuffer").toNodejsStream(s);
|
|
1270
|
-
}, _compressWorker: function(m, s) {
|
|
1271
|
-
if (this._data instanceof y && this._data.compression.magic === m.magic) return this._data.getCompressedWorker();
|
|
1272
|
-
var d = this._decompressWorker();
|
|
1273
|
-
return this._dataBinary || (d = d.pipe(new h.Utf8EncodeWorker())), y.createWorkerFrom(d, m, s);
|
|
1274
|
-
}, _decompressWorker: function() {
|
|
1275
|
-
return this._data instanceof y ? this._data.getContentWorker() : this._data instanceof k ? this._data : new i(this._data);
|
|
1276
|
-
} };
|
|
1277
|
-
for (var g = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"], v = function() {
|
|
1278
|
-
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
1279
|
-
}, o = 0; o < g.length; o++) n.prototype[g[o]] = v;
|
|
1280
|
-
b.exports = n;
|
|
1281
|
-
}, { "./compressedObject": 2, "./stream/DataWorker": 27, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31 }], 36: [function(r, b, u) {
|
|
1282
|
-
(function(n) {
|
|
1283
|
-
var a, i, h = n.MutationObserver || n.WebKitMutationObserver;
|
|
1284
|
-
if (h) {
|
|
1285
|
-
var y = 0, k = new h(m), g = n.document.createTextNode("");
|
|
1286
|
-
k.observe(g, { characterData: !0 }), a = function() {
|
|
1287
|
-
g.data = y = ++y % 2;
|
|
1288
|
-
};
|
|
1289
|
-
} else if (n.setImmediate || n.MessageChannel === void 0) a = "document" in n && "onreadystatechange" in n.document.createElement("script") ? function() {
|
|
1290
|
-
var s = n.document.createElement("script");
|
|
1291
|
-
s.onreadystatechange = function() {
|
|
1292
|
-
m(), s.onreadystatechange = null, s.parentNode.removeChild(s), s = null;
|
|
1293
|
-
}, n.document.documentElement.appendChild(s);
|
|
1294
|
-
} : function() {
|
|
1295
|
-
setTimeout(m, 0);
|
|
1296
|
-
};
|
|
1297
|
-
else {
|
|
1298
|
-
var v = new n.MessageChannel();
|
|
1299
|
-
v.port1.onmessage = m, a = function() {
|
|
1300
|
-
v.port2.postMessage(0);
|
|
1301
|
-
};
|
|
1302
|
-
}
|
|
1303
|
-
var o = [];
|
|
1304
|
-
function m() {
|
|
1305
|
-
var s, d;
|
|
1306
|
-
i = !0;
|
|
1307
|
-
for (var l = o.length; l; ) {
|
|
1308
|
-
for (d = o, o = [], s = -1; ++s < l; ) d[s]();
|
|
1309
|
-
l = o.length;
|
|
1310
|
-
}
|
|
1311
|
-
i = !1;
|
|
1312
|
-
}
|
|
1313
|
-
b.exports = function(s) {
|
|
1314
|
-
o.push(s) !== 1 || i || a();
|
|
1315
|
-
};
|
|
1316
|
-
}).call(this, typeof kt < "u" ? kt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
1317
|
-
}, {}], 37: [function(r, b, u) {
|
|
1318
|
-
var n = r("immediate");
|
|
1319
|
-
function a() {
|
|
1320
|
-
}
|
|
1321
|
-
var i = {}, h = ["REJECTED"], y = ["FULFILLED"], k = ["PENDING"];
|
|
1322
|
-
function g(l) {
|
|
1323
|
-
if (typeof l != "function") throw new TypeError("resolver must be a function");
|
|
1324
|
-
this.state = k, this.queue = [], this.outcome = void 0, l !== a && s(this, l);
|
|
1325
|
-
}
|
|
1326
|
-
function v(l, f, _) {
|
|
1327
|
-
this.promise = l, typeof f == "function" && (this.onFulfilled = f, this.callFulfilled = this.otherCallFulfilled), typeof _ == "function" && (this.onRejected = _, this.callRejected = this.otherCallRejected);
|
|
1328
|
-
}
|
|
1329
|
-
function o(l, f, _) {
|
|
1330
|
-
n(function() {
|
|
1331
|
-
var S;
|
|
1332
|
-
try {
|
|
1333
|
-
S = f(_);
|
|
1334
|
-
} catch (z) {
|
|
1335
|
-
return i.reject(l, z);
|
|
1336
|
-
}
|
|
1337
|
-
S === l ? i.reject(l, new TypeError("Cannot resolve promise with itself")) : i.resolve(l, S);
|
|
1338
|
-
});
|
|
1339
|
-
}
|
|
1340
|
-
function m(l) {
|
|
1341
|
-
var f = l && l.then;
|
|
1342
|
-
if (l && (typeof l == "object" || typeof l == "function") && typeof f == "function") return function() {
|
|
1343
|
-
f.apply(l, arguments);
|
|
1344
|
-
};
|
|
1345
|
-
}
|
|
1346
|
-
function s(l, f) {
|
|
1347
|
-
var _ = !1;
|
|
1348
|
-
function S(R) {
|
|
1349
|
-
_ || (_ = !0, i.reject(l, R));
|
|
1350
|
-
}
|
|
1351
|
-
function z(R) {
|
|
1352
|
-
_ || (_ = !0, i.resolve(l, R));
|
|
1353
|
-
}
|
|
1354
|
-
var F = d(function() {
|
|
1355
|
-
f(z, S);
|
|
1356
|
-
});
|
|
1357
|
-
F.status === "error" && S(F.value);
|
|
1358
|
-
}
|
|
1359
|
-
function d(l, f) {
|
|
1360
|
-
var _ = {};
|
|
1361
|
-
try {
|
|
1362
|
-
_.value = l(f), _.status = "success";
|
|
1363
|
-
} catch (S) {
|
|
1364
|
-
_.status = "error", _.value = S;
|
|
1365
|
-
}
|
|
1366
|
-
return _;
|
|
1367
|
-
}
|
|
1368
|
-
(b.exports = g).prototype.finally = function(l) {
|
|
1369
|
-
if (typeof l != "function") return this;
|
|
1370
|
-
var f = this.constructor;
|
|
1371
|
-
return this.then(function(_) {
|
|
1372
|
-
return f.resolve(l()).then(function() {
|
|
1373
|
-
return _;
|
|
1374
|
-
});
|
|
1375
|
-
}, function(_) {
|
|
1376
|
-
return f.resolve(l()).then(function() {
|
|
1377
|
-
throw _;
|
|
1378
|
-
});
|
|
1379
|
-
});
|
|
1380
|
-
}, g.prototype.catch = function(l) {
|
|
1381
|
-
return this.then(null, l);
|
|
1382
|
-
}, g.prototype.then = function(l, f) {
|
|
1383
|
-
if (typeof l != "function" && this.state === y || typeof f != "function" && this.state === h) return this;
|
|
1384
|
-
var _ = new this.constructor(a);
|
|
1385
|
-
return this.state !== k ? o(_, this.state === y ? l : f, this.outcome) : this.queue.push(new v(_, l, f)), _;
|
|
1386
|
-
}, v.prototype.callFulfilled = function(l) {
|
|
1387
|
-
i.resolve(this.promise, l);
|
|
1388
|
-
}, v.prototype.otherCallFulfilled = function(l) {
|
|
1389
|
-
o(this.promise, this.onFulfilled, l);
|
|
1390
|
-
}, v.prototype.callRejected = function(l) {
|
|
1391
|
-
i.reject(this.promise, l);
|
|
1392
|
-
}, v.prototype.otherCallRejected = function(l) {
|
|
1393
|
-
o(this.promise, this.onRejected, l);
|
|
1394
|
-
}, i.resolve = function(l, f) {
|
|
1395
|
-
var _ = d(m, f);
|
|
1396
|
-
if (_.status === "error") return i.reject(l, _.value);
|
|
1397
|
-
var S = _.value;
|
|
1398
|
-
if (S) s(l, S);
|
|
1399
|
-
else {
|
|
1400
|
-
l.state = y, l.outcome = f;
|
|
1401
|
-
for (var z = -1, F = l.queue.length; ++z < F; ) l.queue[z].callFulfilled(f);
|
|
1402
|
-
}
|
|
1403
|
-
return l;
|
|
1404
|
-
}, i.reject = function(l, f) {
|
|
1405
|
-
l.state = h, l.outcome = f;
|
|
1406
|
-
for (var _ = -1, S = l.queue.length; ++_ < S; ) l.queue[_].callRejected(f);
|
|
1407
|
-
return l;
|
|
1408
|
-
}, g.resolve = function(l) {
|
|
1409
|
-
return l instanceof this ? l : i.resolve(new this(a), l);
|
|
1410
|
-
}, g.reject = function(l) {
|
|
1411
|
-
var f = new this(a);
|
|
1412
|
-
return i.reject(f, l);
|
|
1413
|
-
}, g.all = function(l) {
|
|
1414
|
-
var f = this;
|
|
1415
|
-
if (Object.prototype.toString.call(l) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1416
|
-
var _ = l.length, S = !1;
|
|
1417
|
-
if (!_) return this.resolve([]);
|
|
1418
|
-
for (var z = new Array(_), F = 0, R = -1, P = new this(a); ++R < _; ) T(l[R], R);
|
|
1419
|
-
return P;
|
|
1420
|
-
function T(W, J) {
|
|
1421
|
-
f.resolve(W).then(function(w) {
|
|
1422
|
-
z[J] = w, ++F !== _ || S || (S = !0, i.resolve(P, z));
|
|
1423
|
-
}, function(w) {
|
|
1424
|
-
S || (S = !0, i.reject(P, w));
|
|
1425
|
-
});
|
|
1426
|
-
}
|
|
1427
|
-
}, g.race = function(l) {
|
|
1428
|
-
var f = this;
|
|
1429
|
-
if (Object.prototype.toString.call(l) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
1430
|
-
var _ = l.length, S = !1;
|
|
1431
|
-
if (!_) return this.resolve([]);
|
|
1432
|
-
for (var z = -1, F = new this(a); ++z < _; ) R = l[z], f.resolve(R).then(function(P) {
|
|
1433
|
-
S || (S = !0, i.resolve(F, P));
|
|
1434
|
-
}, function(P) {
|
|
1435
|
-
S || (S = !0, i.reject(F, P));
|
|
1436
|
-
});
|
|
1437
|
-
var R;
|
|
1438
|
-
return F;
|
|
1439
|
-
};
|
|
1440
|
-
}, { immediate: 36 }], 38: [function(r, b, u) {
|
|
1441
|
-
var n = {};
|
|
1442
|
-
(0, r("./lib/utils/common").assign)(n, r("./lib/deflate"), r("./lib/inflate"), r("./lib/zlib/constants")), b.exports = n;
|
|
1443
|
-
}, { "./lib/deflate": 39, "./lib/inflate": 40, "./lib/utils/common": 41, "./lib/zlib/constants": 44 }], 39: [function(r, b, u) {
|
|
1444
|
-
var n = r("./zlib/deflate"), a = r("./utils/common"), i = r("./utils/strings"), h = r("./zlib/messages"), y = r("./zlib/zstream"), k = Object.prototype.toString, g = 0, v = -1, o = 0, m = 8;
|
|
1445
|
-
function s(l) {
|
|
1446
|
-
if (!(this instanceof s)) return new s(l);
|
|
1447
|
-
this.options = a.assign({ level: v, method: m, chunkSize: 16384, windowBits: 15, memLevel: 8, strategy: o, to: "" }, l || {});
|
|
1448
|
-
var f = this.options;
|
|
1449
|
-
f.raw && 0 < f.windowBits ? f.windowBits = -f.windowBits : f.gzip && 0 < f.windowBits && f.windowBits < 16 && (f.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new y(), this.strm.avail_out = 0;
|
|
1450
|
-
var _ = n.deflateInit2(this.strm, f.level, f.method, f.windowBits, f.memLevel, f.strategy);
|
|
1451
|
-
if (_ !== g) throw new Error(h[_]);
|
|
1452
|
-
if (f.header && n.deflateSetHeader(this.strm, f.header), f.dictionary) {
|
|
1453
|
-
var S;
|
|
1454
|
-
if (S = typeof f.dictionary == "string" ? i.string2buf(f.dictionary) : k.call(f.dictionary) === "[object ArrayBuffer]" ? new Uint8Array(f.dictionary) : f.dictionary, (_ = n.deflateSetDictionary(this.strm, S)) !== g) throw new Error(h[_]);
|
|
1455
|
-
this._dict_set = !0;
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
function d(l, f) {
|
|
1459
|
-
var _ = new s(f);
|
|
1460
|
-
if (_.push(l, !0), _.err) throw _.msg || h[_.err];
|
|
1461
|
-
return _.result;
|
|
1462
|
-
}
|
|
1463
|
-
s.prototype.push = function(l, f) {
|
|
1464
|
-
var _, S, z = this.strm, F = this.options.chunkSize;
|
|
1465
|
-
if (this.ended) return !1;
|
|
1466
|
-
S = f === ~~f ? f : f === !0 ? 4 : 0, typeof l == "string" ? z.input = i.string2buf(l) : k.call(l) === "[object ArrayBuffer]" ? z.input = new Uint8Array(l) : z.input = l, z.next_in = 0, z.avail_in = z.input.length;
|
|
1467
|
-
do {
|
|
1468
|
-
if (z.avail_out === 0 && (z.output = new a.Buf8(F), z.next_out = 0, z.avail_out = F), (_ = n.deflate(z, S)) !== 1 && _ !== g) return this.onEnd(_), !(this.ended = !0);
|
|
1469
|
-
z.avail_out !== 0 && (z.avail_in !== 0 || S !== 4 && S !== 2) || (this.options.to === "string" ? this.onData(i.buf2binstring(a.shrinkBuf(z.output, z.next_out))) : this.onData(a.shrinkBuf(z.output, z.next_out)));
|
|
1470
|
-
} while ((0 < z.avail_in || z.avail_out === 0) && _ !== 1);
|
|
1471
|
-
return S === 4 ? (_ = n.deflateEnd(this.strm), this.onEnd(_), this.ended = !0, _ === g) : S !== 2 || (this.onEnd(g), !(z.avail_out = 0));
|
|
1472
|
-
}, s.prototype.onData = function(l) {
|
|
1473
|
-
this.chunks.push(l);
|
|
1474
|
-
}, s.prototype.onEnd = function(l) {
|
|
1475
|
-
l === g && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = a.flattenChunks(this.chunks)), this.chunks = [], this.err = l, this.msg = this.strm.msg;
|
|
1476
|
-
}, u.Deflate = s, u.deflate = d, u.deflateRaw = function(l, f) {
|
|
1477
|
-
return (f = f || {}).raw = !0, d(l, f);
|
|
1478
|
-
}, u.gzip = function(l, f) {
|
|
1479
|
-
return (f = f || {}).gzip = !0, d(l, f);
|
|
1480
|
-
};
|
|
1481
|
-
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/deflate": 46, "./zlib/messages": 51, "./zlib/zstream": 53 }], 40: [function(r, b, u) {
|
|
1482
|
-
var n = r("./zlib/inflate"), a = r("./utils/common"), i = r("./utils/strings"), h = r("./zlib/constants"), y = r("./zlib/messages"), k = r("./zlib/zstream"), g = r("./zlib/gzheader"), v = Object.prototype.toString;
|
|
1483
|
-
function o(s) {
|
|
1484
|
-
if (!(this instanceof o)) return new o(s);
|
|
1485
|
-
this.options = a.assign({ chunkSize: 16384, windowBits: 0, to: "" }, s || {});
|
|
1486
|
-
var d = this.options;
|
|
1487
|
-
d.raw && 0 <= d.windowBits && d.windowBits < 16 && (d.windowBits = -d.windowBits, d.windowBits === 0 && (d.windowBits = -15)), !(0 <= d.windowBits && d.windowBits < 16) || s && s.windowBits || (d.windowBits += 32), 15 < d.windowBits && d.windowBits < 48 && (15 & d.windowBits) == 0 && (d.windowBits |= 15), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new k(), this.strm.avail_out = 0;
|
|
1488
|
-
var l = n.inflateInit2(this.strm, d.windowBits);
|
|
1489
|
-
if (l !== h.Z_OK) throw new Error(y[l]);
|
|
1490
|
-
this.header = new g(), n.inflateGetHeader(this.strm, this.header);
|
|
1491
|
-
}
|
|
1492
|
-
function m(s, d) {
|
|
1493
|
-
var l = new o(d);
|
|
1494
|
-
if (l.push(s, !0), l.err) throw l.msg || y[l.err];
|
|
1495
|
-
return l.result;
|
|
1496
|
-
}
|
|
1497
|
-
o.prototype.push = function(s, d) {
|
|
1498
|
-
var l, f, _, S, z, F, R = this.strm, P = this.options.chunkSize, T = this.options.dictionary, W = !1;
|
|
1499
|
-
if (this.ended) return !1;
|
|
1500
|
-
f = d === ~~d ? d : d === !0 ? h.Z_FINISH : h.Z_NO_FLUSH, typeof s == "string" ? R.input = i.binstring2buf(s) : v.call(s) === "[object ArrayBuffer]" ? R.input = new Uint8Array(s) : R.input = s, R.next_in = 0, R.avail_in = R.input.length;
|
|
1501
|
-
do {
|
|
1502
|
-
if (R.avail_out === 0 && (R.output = new a.Buf8(P), R.next_out = 0, R.avail_out = P), (l = n.inflate(R, h.Z_NO_FLUSH)) === h.Z_NEED_DICT && T && (F = typeof T == "string" ? i.string2buf(T) : v.call(T) === "[object ArrayBuffer]" ? new Uint8Array(T) : T, l = n.inflateSetDictionary(this.strm, F)), l === h.Z_BUF_ERROR && W === !0 && (l = h.Z_OK, W = !1), l !== h.Z_STREAM_END && l !== h.Z_OK) return this.onEnd(l), !(this.ended = !0);
|
|
1503
|
-
R.next_out && (R.avail_out !== 0 && l !== h.Z_STREAM_END && (R.avail_in !== 0 || f !== h.Z_FINISH && f !== h.Z_SYNC_FLUSH) || (this.options.to === "string" ? (_ = i.utf8border(R.output, R.next_out), S = R.next_out - _, z = i.buf2string(R.output, _), R.next_out = S, R.avail_out = P - S, S && a.arraySet(R.output, R.output, _, S, 0), this.onData(z)) : this.onData(a.shrinkBuf(R.output, R.next_out)))), R.avail_in === 0 && R.avail_out === 0 && (W = !0);
|
|
1504
|
-
} while ((0 < R.avail_in || R.avail_out === 0) && l !== h.Z_STREAM_END);
|
|
1505
|
-
return l === h.Z_STREAM_END && (f = h.Z_FINISH), f === h.Z_FINISH ? (l = n.inflateEnd(this.strm), this.onEnd(l), this.ended = !0, l === h.Z_OK) : f !== h.Z_SYNC_FLUSH || (this.onEnd(h.Z_OK), !(R.avail_out = 0));
|
|
1506
|
-
}, o.prototype.onData = function(s) {
|
|
1507
|
-
this.chunks.push(s);
|
|
1508
|
-
}, o.prototype.onEnd = function(s) {
|
|
1509
|
-
s === h.Z_OK && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = a.flattenChunks(this.chunks)), this.chunks = [], this.err = s, this.msg = this.strm.msg;
|
|
1510
|
-
}, u.Inflate = o, u.inflate = m, u.inflateRaw = function(s, d) {
|
|
1511
|
-
return (d = d || {}).raw = !0, m(s, d);
|
|
1512
|
-
}, u.ungzip = m;
|
|
1513
|
-
}, { "./utils/common": 41, "./utils/strings": 42, "./zlib/constants": 44, "./zlib/gzheader": 47, "./zlib/inflate": 49, "./zlib/messages": 51, "./zlib/zstream": 53 }], 41: [function(r, b, u) {
|
|
1514
|
-
var n = typeof Uint8Array < "u" && typeof Uint16Array < "u" && typeof Int32Array < "u";
|
|
1515
|
-
u.assign = function(h) {
|
|
1516
|
-
for (var y = Array.prototype.slice.call(arguments, 1); y.length; ) {
|
|
1517
|
-
var k = y.shift();
|
|
1518
|
-
if (k) {
|
|
1519
|
-
if (typeof k != "object") throw new TypeError(k + "must be non-object");
|
|
1520
|
-
for (var g in k) k.hasOwnProperty(g) && (h[g] = k[g]);
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
return h;
|
|
1524
|
-
}, u.shrinkBuf = function(h, y) {
|
|
1525
|
-
return h.length === y ? h : h.subarray ? h.subarray(0, y) : (h.length = y, h);
|
|
1526
|
-
};
|
|
1527
|
-
var a = { arraySet: function(h, y, k, g, v) {
|
|
1528
|
-
if (y.subarray && h.subarray) h.set(y.subarray(k, k + g), v);
|
|
1529
|
-
else for (var o = 0; o < g; o++) h[v + o] = y[k + o];
|
|
1530
|
-
}, flattenChunks: function(h) {
|
|
1531
|
-
var y, k, g, v, o, m;
|
|
1532
|
-
for (y = g = 0, k = h.length; y < k; y++) g += h[y].length;
|
|
1533
|
-
for (m = new Uint8Array(g), y = v = 0, k = h.length; y < k; y++) o = h[y], m.set(o, v), v += o.length;
|
|
1534
|
-
return m;
|
|
1535
|
-
} }, i = { arraySet: function(h, y, k, g, v) {
|
|
1536
|
-
for (var o = 0; o < g; o++) h[v + o] = y[k + o];
|
|
1537
|
-
}, flattenChunks: function(h) {
|
|
1538
|
-
return [].concat.apply([], h);
|
|
1539
|
-
} };
|
|
1540
|
-
u.setTyped = function(h) {
|
|
1541
|
-
h ? (u.Buf8 = Uint8Array, u.Buf16 = Uint16Array, u.Buf32 = Int32Array, u.assign(u, a)) : (u.Buf8 = Array, u.Buf16 = Array, u.Buf32 = Array, u.assign(u, i));
|
|
1542
|
-
}, u.setTyped(n);
|
|
1543
|
-
}, {}], 42: [function(r, b, u) {
|
|
1544
|
-
var n = r("./common"), a = !0, i = !0;
|
|
1545
|
-
try {
|
|
1546
|
-
String.fromCharCode.apply(null, [0]);
|
|
1547
|
-
} catch {
|
|
1548
|
-
a = !1;
|
|
1549
|
-
}
|
|
1550
|
-
try {
|
|
1551
|
-
String.fromCharCode.apply(null, new Uint8Array(1));
|
|
1552
|
-
} catch {
|
|
1553
|
-
i = !1;
|
|
1554
|
-
}
|
|
1555
|
-
for (var h = new n.Buf8(256), y = 0; y < 256; y++) h[y] = 252 <= y ? 6 : 248 <= y ? 5 : 240 <= y ? 4 : 224 <= y ? 3 : 192 <= y ? 2 : 1;
|
|
1556
|
-
function k(g, v) {
|
|
1557
|
-
if (v < 65537 && (g.subarray && i || !g.subarray && a)) return String.fromCharCode.apply(null, n.shrinkBuf(g, v));
|
|
1558
|
-
for (var o = "", m = 0; m < v; m++) o += String.fromCharCode(g[m]);
|
|
1559
|
-
return o;
|
|
1560
|
-
}
|
|
1561
|
-
h[254] = h[254] = 1, u.string2buf = function(g) {
|
|
1562
|
-
var v, o, m, s, d, l = g.length, f = 0;
|
|
1563
|
-
for (s = 0; s < l; s++) (64512 & (o = g.charCodeAt(s))) == 55296 && s + 1 < l && (64512 & (m = g.charCodeAt(s + 1))) == 56320 && (o = 65536 + (o - 55296 << 10) + (m - 56320), s++), f += o < 128 ? 1 : o < 2048 ? 2 : o < 65536 ? 3 : 4;
|
|
1564
|
-
for (v = new n.Buf8(f), s = d = 0; d < f; s++) (64512 & (o = g.charCodeAt(s))) == 55296 && s + 1 < l && (64512 & (m = g.charCodeAt(s + 1))) == 56320 && (o = 65536 + (o - 55296 << 10) + (m - 56320), s++), o < 128 ? v[d++] = o : (o < 2048 ? v[d++] = 192 | o >>> 6 : (o < 65536 ? v[d++] = 224 | o >>> 12 : (v[d++] = 240 | o >>> 18, v[d++] = 128 | o >>> 12 & 63), v[d++] = 128 | o >>> 6 & 63), v[d++] = 128 | 63 & o);
|
|
1565
|
-
return v;
|
|
1566
|
-
}, u.buf2binstring = function(g) {
|
|
1567
|
-
return k(g, g.length);
|
|
1568
|
-
}, u.binstring2buf = function(g) {
|
|
1569
|
-
for (var v = new n.Buf8(g.length), o = 0, m = v.length; o < m; o++) v[o] = g.charCodeAt(o);
|
|
1570
|
-
return v;
|
|
1571
|
-
}, u.buf2string = function(g, v) {
|
|
1572
|
-
var o, m, s, d, l = v || g.length, f = new Array(2 * l);
|
|
1573
|
-
for (o = m = 0; o < l; ) if ((s = g[o++]) < 128) f[m++] = s;
|
|
1574
|
-
else if (4 < (d = h[s])) f[m++] = 65533, o += d - 1;
|
|
1575
|
-
else {
|
|
1576
|
-
for (s &= d === 2 ? 31 : d === 3 ? 15 : 7; 1 < d && o < l; ) s = s << 6 | 63 & g[o++], d--;
|
|
1577
|
-
1 < d ? f[m++] = 65533 : s < 65536 ? f[m++] = s : (s -= 65536, f[m++] = 55296 | s >> 10 & 1023, f[m++] = 56320 | 1023 & s);
|
|
1578
|
-
}
|
|
1579
|
-
return k(f, m);
|
|
1580
|
-
}, u.utf8border = function(g, v) {
|
|
1581
|
-
var o;
|
|
1582
|
-
for ((v = v || g.length) > g.length && (v = g.length), o = v - 1; 0 <= o && (192 & g[o]) == 128; ) o--;
|
|
1583
|
-
return o < 0 || o === 0 ? v : o + h[g[o]] > v ? o : v;
|
|
1584
|
-
};
|
|
1585
|
-
}, { "./common": 41 }], 43: [function(r, b, u) {
|
|
1586
|
-
b.exports = function(n, a, i, h) {
|
|
1587
|
-
for (var y = 65535 & n | 0, k = n >>> 16 & 65535 | 0, g = 0; i !== 0; ) {
|
|
1588
|
-
for (i -= g = 2e3 < i ? 2e3 : i; k = k + (y = y + a[h++] | 0) | 0, --g; ) ;
|
|
1589
|
-
y %= 65521, k %= 65521;
|
|
1590
|
-
}
|
|
1591
|
-
return y | k << 16 | 0;
|
|
1592
|
-
};
|
|
1593
|
-
}, {}], 44: [function(r, b, u) {
|
|
1594
|
-
b.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 };
|
|
1595
|
-
}, {}], 45: [function(r, b, u) {
|
|
1596
|
-
var n = (function() {
|
|
1597
|
-
for (var a, i = [], h = 0; h < 256; h++) {
|
|
1598
|
-
a = h;
|
|
1599
|
-
for (var y = 0; y < 8; y++) a = 1 & a ? 3988292384 ^ a >>> 1 : a >>> 1;
|
|
1600
|
-
i[h] = a;
|
|
1601
|
-
}
|
|
1602
|
-
return i;
|
|
1603
|
-
})();
|
|
1604
|
-
b.exports = function(a, i, h, y) {
|
|
1605
|
-
var k = n, g = y + h;
|
|
1606
|
-
a ^= -1;
|
|
1607
|
-
for (var v = y; v < g; v++) a = a >>> 8 ^ k[255 & (a ^ i[v])];
|
|
1608
|
-
return -1 ^ a;
|
|
1609
|
-
};
|
|
1610
|
-
}, {}], 46: [function(r, b, u) {
|
|
1611
|
-
var n, a = r("../utils/common"), i = r("./trees"), h = r("./adler32"), y = r("./crc32"), k = r("./messages"), g = 0, v = 4, o = 0, m = -2, s = -1, d = 4, l = 2, f = 8, _ = 9, S = 286, z = 30, F = 19, R = 2 * S + 1, P = 15, T = 3, W = 258, J = W + T + 1, w = 42, D = 113, e = 1, N = 2, Q = 3, Z = 4;
|
|
1612
|
-
function tt(t, U) {
|
|
1613
|
-
return t.msg = k[U], U;
|
|
1614
|
-
}
|
|
1615
|
-
function M(t) {
|
|
1616
|
-
return (t << 1) - (4 < t ? 9 : 0);
|
|
1617
|
-
}
|
|
1618
|
-
function q(t) {
|
|
1619
|
-
for (var U = t.length; 0 <= --U; ) t[U] = 0;
|
|
1620
|
-
}
|
|
1621
|
-
function I(t) {
|
|
1622
|
-
var U = t.state, B = U.pending;
|
|
1623
|
-
B > t.avail_out && (B = t.avail_out), B !== 0 && (a.arraySet(t.output, U.pending_buf, U.pending_out, B, t.next_out), t.next_out += B, U.pending_out += B, t.total_out += B, t.avail_out -= B, U.pending -= B, U.pending === 0 && (U.pending_out = 0));
|
|
1624
|
-
}
|
|
1625
|
-
function O(t, U) {
|
|
1626
|
-
i._tr_flush_block(t, 0 <= t.block_start ? t.block_start : -1, t.strstart - t.block_start, U), t.block_start = t.strstart, I(t.strm);
|
|
1627
|
-
}
|
|
1628
|
-
function X(t, U) {
|
|
1629
|
-
t.pending_buf[t.pending++] = U;
|
|
1630
|
-
}
|
|
1631
|
-
function K(t, U) {
|
|
1632
|
-
t.pending_buf[t.pending++] = U >>> 8 & 255, t.pending_buf[t.pending++] = 255 & U;
|
|
1633
|
-
}
|
|
1634
|
-
function G(t, U) {
|
|
1635
|
-
var B, p, c = t.max_chain_length, A = t.strstart, j = t.prev_length, L = t.nice_match, C = t.strstart > t.w_size - J ? t.strstart - (t.w_size - J) : 0, H = t.window, Y = t.w_mask, $ = t.prev, V = t.strstart + W, it = H[A + j - 1], rt = H[A + j];
|
|
1636
|
-
t.prev_length >= t.good_match && (c >>= 2), L > t.lookahead && (L = t.lookahead);
|
|
1637
|
-
do
|
|
1638
|
-
if (H[(B = U) + j] === rt && H[B + j - 1] === it && H[B] === H[A] && H[++B] === H[A + 1]) {
|
|
1639
|
-
A += 2, B++;
|
|
1640
|
-
do
|
|
344
|
+
var k = (function(e, r, t) {
|
|
345
|
+
for (var n = e.length, a = 0, o = new I(r); a < n; ++a)
|
|
346
|
+
e[a] && ++o[e[a] - 1];
|
|
347
|
+
var i = new I(r);
|
|
348
|
+
for (a = 1; a < r; ++a)
|
|
349
|
+
i[a] = i[a - 1] + o[a - 1] << 1;
|
|
350
|
+
var s;
|
|
351
|
+
if (t) {
|
|
352
|
+
s = new I(1 << r);
|
|
353
|
+
var c = 15 - r;
|
|
354
|
+
for (a = 0; a < n; ++a)
|
|
355
|
+
if (e[a])
|
|
356
|
+
for (var u = a << 4 | e[a], f = r - e[a], m = i[e[a] - 1]++ << f, y = m | (1 << f) - 1; m <= y; ++m)
|
|
357
|
+
s[ir[m] >> c] = u;
|
|
358
|
+
} else
|
|
359
|
+
for (s = new I(n), a = 0; a < n; ++a)
|
|
360
|
+
e[a] && (s[a] = ir[i[e[a] - 1]++] >> 15 - e[a]);
|
|
361
|
+
return s;
|
|
362
|
+
}), Z = new T(288);
|
|
363
|
+
for (var O = 0; O < 144; ++O)
|
|
364
|
+
Z[O] = 8;
|
|
365
|
+
for (var O = 144; O < 256; ++O)
|
|
366
|
+
Z[O] = 9;
|
|
367
|
+
for (var O = 256; O < 280; ++O)
|
|
368
|
+
Z[O] = 7;
|
|
369
|
+
for (var O = 280; O < 288; ++O)
|
|
370
|
+
Z[O] = 8;
|
|
371
|
+
var er = new T(32);
|
|
372
|
+
for (var O = 0; O < 32; ++O)
|
|
373
|
+
er[O] = 5;
|
|
374
|
+
var qr = /* @__PURE__ */ k(Z, 9, 0), Vr = /* @__PURE__ */ k(er, 5, 0), br = function(e) {
|
|
375
|
+
return (e + 7) / 8 | 0;
|
|
376
|
+
}, Er = function(e, r, t) {
|
|
377
|
+
return (r == null || r < 0) && (r = 0), (t == null || t > e.length) && (t = e.length), new T(e.subarray(r, t));
|
|
378
|
+
}, se = [
|
|
379
|
+
"unexpected EOF",
|
|
380
|
+
"invalid block type",
|
|
381
|
+
"invalid length/literal",
|
|
382
|
+
"invalid distance",
|
|
383
|
+
"stream finished",
|
|
384
|
+
"no stream handler",
|
|
385
|
+
,
|
|
386
|
+
"no callback",
|
|
387
|
+
"invalid UTF-8 data",
|
|
388
|
+
"extra field too long",
|
|
389
|
+
"date not in range 1980-2099",
|
|
390
|
+
"filename too long",
|
|
391
|
+
"stream finishing",
|
|
392
|
+
"invalid zip data"
|
|
393
|
+
// determined by unknown compression method
|
|
394
|
+
], K = function(e, r, t) {
|
|
395
|
+
var n = new Error(r || se[e]);
|
|
396
|
+
if (n.code = e, Error.captureStackTrace && Error.captureStackTrace(n, K), !t)
|
|
397
|
+
throw n;
|
|
398
|
+
return n;
|
|
399
|
+
}, H = function(e, r, t) {
|
|
400
|
+
t <<= r & 7;
|
|
401
|
+
var n = r / 8 | 0;
|
|
402
|
+
e[n] |= t, e[n + 1] |= t >> 8;
|
|
403
|
+
}, G = function(e, r, t) {
|
|
404
|
+
t <<= r & 7;
|
|
405
|
+
var n = r / 8 | 0;
|
|
406
|
+
e[n] |= t, e[n + 1] |= t >> 8, e[n + 2] |= t >> 16;
|
|
407
|
+
}, ar = function(e, r) {
|
|
408
|
+
for (var t = [], n = 0; n < e.length; ++n)
|
|
409
|
+
e[n] && t.push({ s: n, f: e[n] });
|
|
410
|
+
var a = t.length, o = t.slice();
|
|
411
|
+
if (!a)
|
|
412
|
+
return { t: Or, l: 0 };
|
|
413
|
+
if (a == 1) {
|
|
414
|
+
var i = new T(t[0].s + 1);
|
|
415
|
+
return i[t[0].s] = 1, { t: i, l: 1 };
|
|
416
|
+
}
|
|
417
|
+
t.sort(function(b, d) {
|
|
418
|
+
return b.f - d.f;
|
|
419
|
+
}), t.push({ s: -1, f: 25001 });
|
|
420
|
+
var s = t[0], c = t[1], u = 0, f = 1, m = 2;
|
|
421
|
+
for (t[0] = { s: -1, f: s.f + c.f, l: s, r: c }; f != a - 1; )
|
|
422
|
+
s = t[t[u].f < t[m].f ? u++ : m++], c = t[u != f && t[u].f < t[m].f ? u++ : m++], t[f++] = { s: -1, f: s.f + c.f, l: s, r: c };
|
|
423
|
+
for (var y = o[0].s, n = 1; n < a; ++n)
|
|
424
|
+
o[n].s > y && (y = o[n].s);
|
|
425
|
+
var p = new I(y + 1), $ = sr(t[f - 1], p, 0);
|
|
426
|
+
if ($ > r) {
|
|
427
|
+
var n = 0, E = 0, A = $ - r, B = 1 << A;
|
|
428
|
+
for (o.sort(function(d, x) {
|
|
429
|
+
return p[x.s] - p[d.s] || d.f - x.f;
|
|
430
|
+
}); n < a; ++n) {
|
|
431
|
+
var v = o[n].s;
|
|
432
|
+
if (p[v] > r)
|
|
433
|
+
E += B - (1 << $ - p[v]), p[v] = r;
|
|
434
|
+
else
|
|
435
|
+
break;
|
|
436
|
+
}
|
|
437
|
+
for (E >>= A; E > 0; ) {
|
|
438
|
+
var h = o[n].s;
|
|
439
|
+
p[h] < r ? E -= 1 << r - p[h]++ - 1 : ++n;
|
|
440
|
+
}
|
|
441
|
+
for (; n >= 0 && E; --n) {
|
|
442
|
+
var l = o[n].s;
|
|
443
|
+
p[l] == r && (--p[l], ++E);
|
|
444
|
+
}
|
|
445
|
+
$ = r;
|
|
446
|
+
}
|
|
447
|
+
return { t: new T(p), l: $ };
|
|
448
|
+
}, sr = function(e, r, t) {
|
|
449
|
+
return e.s == -1 ? Math.max(sr(e.l, r, t + 1), sr(e.r, r, t + 1)) : r[e.s] = t;
|
|
450
|
+
}, mr = function(e) {
|
|
451
|
+
for (var r = e.length; r && !e[--r]; )
|
|
452
|
+
;
|
|
453
|
+
for (var t = new I(++r), n = 0, a = e[0], o = 1, i = function(c) {
|
|
454
|
+
t[n++] = c;
|
|
455
|
+
}, s = 1; s <= r; ++s)
|
|
456
|
+
if (e[s] == a && s != r)
|
|
457
|
+
++o;
|
|
458
|
+
else {
|
|
459
|
+
if (!a && o > 2) {
|
|
460
|
+
for (; o > 138; o -= 138)
|
|
461
|
+
i(32754);
|
|
462
|
+
o > 2 && (i(o > 10 ? o - 11 << 5 | 28690 : o - 3 << 5 | 12305), o = 0);
|
|
463
|
+
} else if (o > 3) {
|
|
464
|
+
for (i(a), --o; o > 6; o -= 6)
|
|
465
|
+
i(8304);
|
|
466
|
+
o > 2 && (i(o - 3 << 5 | 8208), o = 0);
|
|
467
|
+
}
|
|
468
|
+
for (; o--; )
|
|
469
|
+
i(a);
|
|
470
|
+
o = 1, a = e[s];
|
|
471
|
+
}
|
|
472
|
+
return { c: t.subarray(0, n), n: r };
|
|
473
|
+
}, Y = function(e, r) {
|
|
474
|
+
for (var t = 0, n = 0; n < r.length; ++n)
|
|
475
|
+
t += e[n] * r[n];
|
|
476
|
+
return t;
|
|
477
|
+
}, Fr = function(e, r, t) {
|
|
478
|
+
var n = t.length, a = br(r + 2);
|
|
479
|
+
e[a] = n & 255, e[a + 1] = n >> 8, e[a + 2] = e[a] ^ 255, e[a + 3] = e[a + 1] ^ 255;
|
|
480
|
+
for (var o = 0; o < n; ++o)
|
|
481
|
+
e[a + o + 4] = t[o];
|
|
482
|
+
return (a + 4 + n) * 8;
|
|
483
|
+
}, pr = function(e, r, t, n, a, o, i, s, c, u, f) {
|
|
484
|
+
H(r, f++, t), ++a[256];
|
|
485
|
+
for (var m = ar(a, 15), y = m.t, p = m.l, $ = ar(o, 15), E = $.t, A = $.l, B = mr(y), v = B.c, h = B.n, l = mr(E), b = l.c, d = l.n, x = new I(19), g = 0; g < v.length; ++g)
|
|
486
|
+
++x[v[g] & 31];
|
|
487
|
+
for (var g = 0; g < b.length; ++g)
|
|
488
|
+
++x[b[g] & 31];
|
|
489
|
+
for (var w = ar(x, 7), F = w.t, M = w.l, D = 19; D > 4 && !F[wr[D - 1]]; --D)
|
|
490
|
+
;
|
|
491
|
+
var R = u + 5 << 3, C = Y(a, Z) + Y(o, er) + i, S = Y(a, y) + Y(o, E) + i + 14 + 3 * D + Y(x, F) + 2 * x[16] + 3 * x[17] + 7 * x[18];
|
|
492
|
+
if (c >= 0 && R <= C && R <= S)
|
|
493
|
+
return Fr(r, f, e.subarray(c, c + u));
|
|
494
|
+
var z, U, j, J;
|
|
495
|
+
if (H(r, f, 1 + (S < C)), f += 2, S < C) {
|
|
496
|
+
z = k(y, p, 0), U = y, j = k(E, A, 0), J = E;
|
|
497
|
+
var ur = k(F, M, 0);
|
|
498
|
+
H(r, f, h - 257), H(r, f + 5, d - 1), H(r, f + 10, D - 4), f += 14;
|
|
499
|
+
for (var g = 0; g < D; ++g)
|
|
500
|
+
H(r, f + 3 * g, F[wr[g]]);
|
|
501
|
+
f += 3 * D;
|
|
502
|
+
for (var L = [v, b], X = 0; X < 2; ++X)
|
|
503
|
+
for (var q = L[X], g = 0; g < q.length; ++g) {
|
|
504
|
+
var W = q[g] & 31;
|
|
505
|
+
H(r, f, ur[W]), f += F[W], W > 15 && (H(r, f, q[g] >> 5 & 127), f += q[g] >> 12);
|
|
506
|
+
}
|
|
507
|
+
} else
|
|
508
|
+
z = qr, U = Z, j = Vr, J = er;
|
|
509
|
+
for (var g = 0; g < s; ++g) {
|
|
510
|
+
var N = n[g];
|
|
511
|
+
if (N > 255) {
|
|
512
|
+
var W = N >> 18 & 31;
|
|
513
|
+
G(r, f, z[W + 257]), f += U[W + 257], W > 7 && (H(r, f, N >> 23 & 31), f += fr[W]);
|
|
514
|
+
var V = N & 31;
|
|
515
|
+
G(r, f, j[V]), f += J[V], V > 3 && (G(r, f, N >> 5 & 8191), f += lr[V]);
|
|
516
|
+
} else
|
|
517
|
+
G(r, f, z[N]), f += U[N];
|
|
518
|
+
}
|
|
519
|
+
return G(r, f, z[256]), f + U[256];
|
|
520
|
+
}, Gr = /* @__PURE__ */ new cr([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Or = /* @__PURE__ */ new T(0), Yr = function(e, r, t, n, a, o) {
|
|
521
|
+
var i = o.z || e.length, s = new T(n + i + 5 * (1 + Math.ceil(i / 7e3)) + a), c = s.subarray(n, s.length - a), u = o.l, f = (o.r || 0) & 7;
|
|
522
|
+
if (r) {
|
|
523
|
+
f && (c[0] = o.r >> 3);
|
|
524
|
+
for (var m = Gr[r - 1], y = m >> 13, p = m & 8191, $ = (1 << t) - 1, E = o.p || new I(32768), A = o.h || new I($ + 1), B = Math.ceil(t / 3), v = 2 * B, h = function(gr) {
|
|
525
|
+
return (e[gr] ^ e[gr + 1] << B ^ e[gr + 2] << v) & $;
|
|
526
|
+
}, l = new cr(25e3), b = new I(288), d = new I(32), x = 0, g = 0, w = o.i || 0, F = 0, M = o.w || 0, D = 0; w + 2 < i; ++w) {
|
|
527
|
+
var R = h(w), C = w & 32767, S = A[R];
|
|
528
|
+
if (E[C] = S, A[R] = C, M <= w) {
|
|
529
|
+
var z = i - w;
|
|
530
|
+
if ((x > 7e3 || F > 24576) && (z > 423 || !u)) {
|
|
531
|
+
f = pr(e, c, 0, l, b, d, g, F, D, w - D, f), F = x = g = 0, D = w;
|
|
532
|
+
for (var U = 0; U < 286; ++U)
|
|
533
|
+
b[U] = 0;
|
|
534
|
+
for (var U = 0; U < 30; ++U)
|
|
535
|
+
d[U] = 0;
|
|
536
|
+
}
|
|
537
|
+
var j = 2, J = 0, ur = p, L = C - S & 32767;
|
|
538
|
+
if (z > 2 && R == h(w - L))
|
|
539
|
+
for (var X = Math.min(y, z) - 1, q = Math.min(32767, w), W = Math.min(258, z); L <= q && --ur && C != S; ) {
|
|
540
|
+
if (e[w + j] == e[w + j - L]) {
|
|
541
|
+
for (var N = 0; N < W && e[w + N] == e[w + N - L]; ++N)
|
|
1641
542
|
;
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
if (t.match_start = U, L <= (j = p)) break;
|
|
1645
|
-
it = H[A + j - 1], rt = H[A + j];
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
while ((U = $[U & Y]) > C && --c != 0);
|
|
1649
|
-
return j <= t.lookahead ? j : t.lookahead;
|
|
1650
|
-
}
|
|
1651
|
-
function at(t) {
|
|
1652
|
-
var U, B, p, c, A, j, L, C, H, Y, $ = t.w_size;
|
|
1653
|
-
do {
|
|
1654
|
-
if (c = t.window_size - t.lookahead - t.strstart, t.strstart >= $ + ($ - J)) {
|
|
1655
|
-
for (a.arraySet(t.window, t.window, $, $, 0), t.match_start -= $, t.strstart -= $, t.block_start -= $, U = B = t.hash_size; p = t.head[--U], t.head[U] = $ <= p ? p - $ : 0, --B; ) ;
|
|
1656
|
-
for (U = B = $; p = t.prev[--U], t.prev[U] = $ <= p ? p - $ : 0, --B; ) ;
|
|
1657
|
-
c += $;
|
|
1658
|
-
}
|
|
1659
|
-
if (t.strm.avail_in === 0) break;
|
|
1660
|
-
if (j = t.strm, L = t.window, C = t.strstart + t.lookahead, H = c, Y = void 0, Y = j.avail_in, H < Y && (Y = H), B = Y === 0 ? 0 : (j.avail_in -= Y, a.arraySet(L, j.input, j.next_in, Y, C), j.state.wrap === 1 ? j.adler = h(j.adler, L, Y, C) : j.state.wrap === 2 && (j.adler = y(j.adler, L, Y, C)), j.next_in += Y, j.total_in += Y, Y), t.lookahead += B, t.lookahead + t.insert >= T) for (A = t.strstart - t.insert, t.ins_h = t.window[A], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[A + 1]) & t.hash_mask; t.insert && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[A + T - 1]) & t.hash_mask, t.prev[A & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = A, A++, t.insert--, !(t.lookahead + t.insert < T)); ) ;
|
|
1661
|
-
} while (t.lookahead < J && t.strm.avail_in !== 0);
|
|
1662
|
-
}
|
|
1663
|
-
function lt(t, U) {
|
|
1664
|
-
for (var B, p; ; ) {
|
|
1665
|
-
if (t.lookahead < J) {
|
|
1666
|
-
if (at(t), t.lookahead < J && U === g) return e;
|
|
1667
|
-
if (t.lookahead === 0) break;
|
|
1668
|
-
}
|
|
1669
|
-
if (B = 0, t.lookahead >= T && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + T - 1]) & t.hash_mask, B = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), B !== 0 && t.strstart - B <= t.w_size - J && (t.match_length = G(t, B)), t.match_length >= T) if (p = i._tr_tally(t, t.strstart - t.match_start, t.match_length - T), t.lookahead -= t.match_length, t.match_length <= t.max_lazy_match && t.lookahead >= T) {
|
|
1670
|
-
for (t.match_length--; t.strstart++, t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + T - 1]) & t.hash_mask, B = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart, --t.match_length != 0; ) ;
|
|
1671
|
-
t.strstart++;
|
|
1672
|
-
} 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;
|
|
1673
|
-
else p = i._tr_tally(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++;
|
|
1674
|
-
if (p && (O(t, !1), t.strm.avail_out === 0)) return e;
|
|
1675
|
-
}
|
|
1676
|
-
return t.insert = t.strstart < T - 1 ? t.strstart : T - 1, U === v ? (O(t, !0), t.strm.avail_out === 0 ? Q : Z) : t.last_lit && (O(t, !1), t.strm.avail_out === 0) ? e : N;
|
|
1677
|
-
}
|
|
1678
|
-
function et(t, U) {
|
|
1679
|
-
for (var B, p, c; ; ) {
|
|
1680
|
-
if (t.lookahead < J) {
|
|
1681
|
-
if (at(t), t.lookahead < J && U === g) return e;
|
|
1682
|
-
if (t.lookahead === 0) break;
|
|
1683
|
-
}
|
|
1684
|
-
if (B = 0, t.lookahead >= T && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + T - 1]) & t.hash_mask, B = 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 = T - 1, B !== 0 && t.prev_length < t.max_lazy_match && t.strstart - B <= t.w_size - J && (t.match_length = G(t, B), t.match_length <= 5 && (t.strategy === 1 || t.match_length === T && 4096 < t.strstart - t.match_start) && (t.match_length = T - 1)), t.prev_length >= T && t.match_length <= t.prev_length) {
|
|
1685
|
-
for (c = t.strstart + t.lookahead - T, p = i._tr_tally(t, t.strstart - 1 - t.prev_match, t.prev_length - T), t.lookahead -= t.prev_length - 1, t.prev_length -= 2; ++t.strstart <= c && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + T - 1]) & t.hash_mask, B = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), --t.prev_length != 0; ) ;
|
|
1686
|
-
if (t.match_available = 0, t.match_length = T - 1, t.strstart++, p && (O(t, !1), t.strm.avail_out === 0)) return e;
|
|
1687
|
-
} else if (t.match_available) {
|
|
1688
|
-
if ((p = i._tr_tally(t, 0, t.window[t.strstart - 1])) && O(t, !1), t.strstart++, t.lookahead--, t.strm.avail_out === 0) return e;
|
|
1689
|
-
} else t.match_available = 1, t.strstart++, t.lookahead--;
|
|
1690
|
-
}
|
|
1691
|
-
return t.match_available && (p = i._tr_tally(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart < T - 1 ? t.strstart : T - 1, U === v ? (O(t, !0), t.strm.avail_out === 0 ? Q : Z) : t.last_lit && (O(t, !1), t.strm.avail_out === 0) ? e : N;
|
|
1692
|
-
}
|
|
1693
|
-
function nt(t, U, B, p, c) {
|
|
1694
|
-
this.good_length = t, this.max_lazy = U, this.nice_length = B, this.max_chain = p, this.func = c;
|
|
1695
|
-
}
|
|
1696
|
-
function ut() {
|
|
1697
|
-
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 = f, 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 * R), this.dyn_dtree = new a.Buf16(2 * (2 * z + 1)), this.bl_tree = new a.Buf16(2 * (2 * F + 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(P + 1), this.heap = new a.Buf16(2 * S + 1), q(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new a.Buf16(2 * S + 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;
|
|
1698
|
-
}
|
|
1699
|
-
function st(t) {
|
|
1700
|
-
var U;
|
|
1701
|
-
return t && t.state ? (t.total_in = t.total_out = 0, t.data_type = l, (U = t.state).pending = 0, U.pending_out = 0, U.wrap < 0 && (U.wrap = -U.wrap), U.status = U.wrap ? w : D, t.adler = U.wrap === 2 ? 0 : 1, U.last_flush = g, i._tr_init(U), o) : tt(t, m);
|
|
1702
|
-
}
|
|
1703
|
-
function ct(t) {
|
|
1704
|
-
var U = st(t);
|
|
1705
|
-
return U === o && (function(B) {
|
|
1706
|
-
B.window_size = 2 * B.w_size, q(B.head), B.max_lazy_match = n[B.level].max_lazy, B.good_match = n[B.level].good_length, B.nice_match = n[B.level].nice_length, B.max_chain_length = n[B.level].max_chain, B.strstart = 0, B.block_start = 0, B.lookahead = 0, B.insert = 0, B.match_length = B.prev_length = T - 1, B.match_available = 0, B.ins_h = 0;
|
|
1707
|
-
})(t.state), U;
|
|
1708
|
-
}
|
|
1709
|
-
function ft(t, U, B, p, c, A) {
|
|
1710
|
-
if (!t) return m;
|
|
1711
|
-
var j = 1;
|
|
1712
|
-
if (U === s && (U = 6), p < 0 ? (j = 0, p = -p) : 15 < p && (j = 2, p -= 16), c < 1 || _ < c || B !== f || p < 8 || 15 < p || U < 0 || 9 < U || A < 0 || d < A) return tt(t, m);
|
|
1713
|
-
p === 8 && (p = 9);
|
|
1714
|
-
var L = new ut();
|
|
1715
|
-
return (t.state = L).strm = t, L.wrap = j, L.gzhead = null, L.w_bits = p, L.w_size = 1 << L.w_bits, L.w_mask = L.w_size - 1, L.hash_bits = c + 7, L.hash_size = 1 << L.hash_bits, L.hash_mask = L.hash_size - 1, L.hash_shift = ~~((L.hash_bits + T - 1) / T), L.window = new a.Buf8(2 * L.w_size), L.head = new a.Buf16(L.hash_size), L.prev = new a.Buf16(L.w_size), L.lit_bufsize = 1 << c + 6, L.pending_buf_size = 4 * L.lit_bufsize, L.pending_buf = new a.Buf8(L.pending_buf_size), L.d_buf = 1 * L.lit_bufsize, L.l_buf = 3 * L.lit_bufsize, L.level = U, L.strategy = A, L.method = B, ct(t);
|
|
1716
|
-
}
|
|
1717
|
-
n = [new nt(0, 0, 0, 0, function(t, U) {
|
|
1718
|
-
var B = 65535;
|
|
1719
|
-
for (B > t.pending_buf_size - 5 && (B = t.pending_buf_size - 5); ; ) {
|
|
1720
|
-
if (t.lookahead <= 1) {
|
|
1721
|
-
if (at(t), t.lookahead === 0 && U === g) return e;
|
|
1722
|
-
if (t.lookahead === 0) break;
|
|
1723
|
-
}
|
|
1724
|
-
t.strstart += t.lookahead, t.lookahead = 0;
|
|
1725
|
-
var p = t.block_start + B;
|
|
1726
|
-
if ((t.strstart === 0 || t.strstart >= p) && (t.lookahead = t.strstart - p, t.strstart = p, O(t, !1), t.strm.avail_out === 0) || t.strstart - t.block_start >= t.w_size - J && (O(t, !1), t.strm.avail_out === 0)) return e;
|
|
1727
|
-
}
|
|
1728
|
-
return t.insert = 0, U === v ? (O(t, !0), t.strm.avail_out === 0 ? Q : Z) : (t.strstart > t.block_start && (O(t, !1), t.strm.avail_out), e);
|
|
1729
|
-
}), new nt(4, 4, 8, 4, lt), new nt(4, 5, 16, 8, lt), new nt(4, 6, 32, 32, lt), new nt(4, 4, 16, 16, et), new nt(8, 16, 32, 32, et), new nt(8, 16, 128, 128, et), new nt(8, 32, 128, 256, et), new nt(32, 128, 258, 1024, et), new nt(32, 258, 258, 4096, et)], u.deflateInit = function(t, U) {
|
|
1730
|
-
return ft(t, U, f, 15, 8, 0);
|
|
1731
|
-
}, u.deflateInit2 = ft, u.deflateReset = ct, u.deflateResetKeep = st, u.deflateSetHeader = function(t, U) {
|
|
1732
|
-
return t && t.state ? t.state.wrap !== 2 ? m : (t.state.gzhead = U, o) : m;
|
|
1733
|
-
}, u.deflate = function(t, U) {
|
|
1734
|
-
var B, p, c, A;
|
|
1735
|
-
if (!t || !t.state || 5 < U || U < 0) return t ? tt(t, m) : m;
|
|
1736
|
-
if (p = t.state, !t.output || !t.input && t.avail_in !== 0 || p.status === 666 && U !== v) return tt(t, t.avail_out === 0 ? -5 : m);
|
|
1737
|
-
if (p.strm = t, B = p.last_flush, p.last_flush = U, p.status === w) if (p.wrap === 2) t.adler = 0, X(p, 31), X(p, 139), X(p, 8), p.gzhead ? (X(p, (p.gzhead.text ? 1 : 0) + (p.gzhead.hcrc ? 2 : 0) + (p.gzhead.extra ? 4 : 0) + (p.gzhead.name ? 8 : 0) + (p.gzhead.comment ? 16 : 0)), X(p, 255 & p.gzhead.time), X(p, p.gzhead.time >> 8 & 255), X(p, p.gzhead.time >> 16 & 255), X(p, p.gzhead.time >> 24 & 255), X(p, p.level === 9 ? 2 : 2 <= p.strategy || p.level < 2 ? 4 : 0), X(p, 255 & p.gzhead.os), p.gzhead.extra && p.gzhead.extra.length && (X(p, 255 & p.gzhead.extra.length), X(p, p.gzhead.extra.length >> 8 & 255)), p.gzhead.hcrc && (t.adler = y(t.adler, p.pending_buf, p.pending, 0)), p.gzindex = 0, p.status = 69) : (X(p, 0), X(p, 0), X(p, 0), X(p, 0), X(p, 0), X(p, p.level === 9 ? 2 : 2 <= p.strategy || p.level < 2 ? 4 : 0), X(p, 3), p.status = D);
|
|
1738
|
-
else {
|
|
1739
|
-
var j = f + (p.w_bits - 8 << 4) << 8;
|
|
1740
|
-
j |= (2 <= p.strategy || p.level < 2 ? 0 : p.level < 6 ? 1 : p.level === 6 ? 2 : 3) << 6, p.strstart !== 0 && (j |= 32), j += 31 - j % 31, p.status = D, K(p, j), p.strstart !== 0 && (K(p, t.adler >>> 16), K(p, 65535 & t.adler)), t.adler = 1;
|
|
1741
|
-
}
|
|
1742
|
-
if (p.status === 69) if (p.gzhead.extra) {
|
|
1743
|
-
for (c = p.pending; p.gzindex < (65535 & p.gzhead.extra.length) && (p.pending !== p.pending_buf_size || (p.gzhead.hcrc && p.pending > c && (t.adler = y(t.adler, p.pending_buf, p.pending - c, c)), I(t), c = p.pending, p.pending !== p.pending_buf_size)); ) X(p, 255 & p.gzhead.extra[p.gzindex]), p.gzindex++;
|
|
1744
|
-
p.gzhead.hcrc && p.pending > c && (t.adler = y(t.adler, p.pending_buf, p.pending - c, c)), p.gzindex === p.gzhead.extra.length && (p.gzindex = 0, p.status = 73);
|
|
1745
|
-
} else p.status = 73;
|
|
1746
|
-
if (p.status === 73) if (p.gzhead.name) {
|
|
1747
|
-
c = p.pending;
|
|
1748
|
-
do {
|
|
1749
|
-
if (p.pending === p.pending_buf_size && (p.gzhead.hcrc && p.pending > c && (t.adler = y(t.adler, p.pending_buf, p.pending - c, c)), I(t), c = p.pending, p.pending === p.pending_buf_size)) {
|
|
1750
|
-
A = 1;
|
|
1751
|
-
break;
|
|
1752
|
-
}
|
|
1753
|
-
A = p.gzindex < p.gzhead.name.length ? 255 & p.gzhead.name.charCodeAt(p.gzindex++) : 0, X(p, A);
|
|
1754
|
-
} while (A !== 0);
|
|
1755
|
-
p.gzhead.hcrc && p.pending > c && (t.adler = y(t.adler, p.pending_buf, p.pending - c, c)), A === 0 && (p.gzindex = 0, p.status = 91);
|
|
1756
|
-
} else p.status = 91;
|
|
1757
|
-
if (p.status === 91) if (p.gzhead.comment) {
|
|
1758
|
-
c = p.pending;
|
|
1759
|
-
do {
|
|
1760
|
-
if (p.pending === p.pending_buf_size && (p.gzhead.hcrc && p.pending > c && (t.adler = y(t.adler, p.pending_buf, p.pending - c, c)), I(t), c = p.pending, p.pending === p.pending_buf_size)) {
|
|
1761
|
-
A = 1;
|
|
1762
|
-
break;
|
|
1763
|
-
}
|
|
1764
|
-
A = p.gzindex < p.gzhead.comment.length ? 255 & p.gzhead.comment.charCodeAt(p.gzindex++) : 0, X(p, A);
|
|
1765
|
-
} while (A !== 0);
|
|
1766
|
-
p.gzhead.hcrc && p.pending > c && (t.adler = y(t.adler, p.pending_buf, p.pending - c, c)), A === 0 && (p.status = 103);
|
|
1767
|
-
} else p.status = 103;
|
|
1768
|
-
if (p.status === 103 && (p.gzhead.hcrc ? (p.pending + 2 > p.pending_buf_size && I(t), p.pending + 2 <= p.pending_buf_size && (X(p, 255 & t.adler), X(p, t.adler >> 8 & 255), t.adler = 0, p.status = D)) : p.status = D), p.pending !== 0) {
|
|
1769
|
-
if (I(t), t.avail_out === 0) return p.last_flush = -1, o;
|
|
1770
|
-
} else if (t.avail_in === 0 && M(U) <= M(B) && U !== v) return tt(t, -5);
|
|
1771
|
-
if (p.status === 666 && t.avail_in !== 0) return tt(t, -5);
|
|
1772
|
-
if (t.avail_in !== 0 || p.lookahead !== 0 || U !== g && p.status !== 666) {
|
|
1773
|
-
var L = p.strategy === 2 ? (function(C, H) {
|
|
1774
|
-
for (var Y; ; ) {
|
|
1775
|
-
if (C.lookahead === 0 && (at(C), C.lookahead === 0)) {
|
|
1776
|
-
if (H === g) return e;
|
|
543
|
+
if (N > j) {
|
|
544
|
+
if (j = N, J = L, N > X)
|
|
1777
545
|
break;
|
|
546
|
+
for (var V = Math.min(L, N - 2), Cr = 0, U = 0; U < V; ++U) {
|
|
547
|
+
var vr = w - L + U & 32767, re = E[vr], Sr = vr - re & 32767;
|
|
548
|
+
Sr > Cr && (Cr = Sr, S = vr);
|
|
1778
549
|
}
|
|
1779
|
-
if (C.match_length = 0, Y = i._tr_tally(C, 0, C.window[C.strstart]), C.lookahead--, C.strstart++, Y && (O(C, !1), C.strm.avail_out === 0)) return e;
|
|
1780
550
|
}
|
|
1781
|
-
return C.insert = 0, H === v ? (O(C, !0), C.strm.avail_out === 0 ? Q : Z) : C.last_lit && (O(C, !1), C.strm.avail_out === 0) ? e : N;
|
|
1782
|
-
})(p, U) : p.strategy === 3 ? (function(C, H) {
|
|
1783
|
-
for (var Y, $, V, it, rt = C.window; ; ) {
|
|
1784
|
-
if (C.lookahead <= W) {
|
|
1785
|
-
if (at(C), C.lookahead <= W && H === g) return e;
|
|
1786
|
-
if (C.lookahead === 0) break;
|
|
1787
|
-
}
|
|
1788
|
-
if (C.match_length = 0, C.lookahead >= T && 0 < C.strstart && ($ = rt[V = C.strstart - 1]) === rt[++V] && $ === rt[++V] && $ === rt[++V]) {
|
|
1789
|
-
it = C.strstart + W;
|
|
1790
|
-
do
|
|
1791
|
-
;
|
|
1792
|
-
while ($ === rt[++V] && $ === rt[++V] && $ === rt[++V] && $ === rt[++V] && $ === rt[++V] && $ === rt[++V] && $ === rt[++V] && $ === rt[++V] && V < it);
|
|
1793
|
-
C.match_length = W - (it - V), C.match_length > C.lookahead && (C.match_length = C.lookahead);
|
|
1794
|
-
}
|
|
1795
|
-
if (C.match_length >= T ? (Y = i._tr_tally(C, 1, C.match_length - T), C.lookahead -= C.match_length, C.strstart += C.match_length, C.match_length = 0) : (Y = i._tr_tally(C, 0, C.window[C.strstart]), C.lookahead--, C.strstart++), Y && (O(C, !1), C.strm.avail_out === 0)) return e;
|
|
1796
|
-
}
|
|
1797
|
-
return C.insert = 0, H === v ? (O(C, !0), C.strm.avail_out === 0 ? Q : Z) : C.last_lit && (O(C, !1), C.strm.avail_out === 0) ? e : N;
|
|
1798
|
-
})(p, U) : n[p.level].func(p, U);
|
|
1799
|
-
if (L !== Q && L !== Z || (p.status = 666), L === e || L === Q) return t.avail_out === 0 && (p.last_flush = -1), o;
|
|
1800
|
-
if (L === N && (U === 1 ? i._tr_align(p) : U !== 5 && (i._tr_stored_block(p, 0, 0, !1), U === 3 && (q(p.head), p.lookahead === 0 && (p.strstart = 0, p.block_start = 0, p.insert = 0))), I(t), t.avail_out === 0)) return p.last_flush = -1, o;
|
|
1801
|
-
}
|
|
1802
|
-
return U !== v ? o : p.wrap <= 0 ? 1 : (p.wrap === 2 ? (X(p, 255 & t.adler), X(p, t.adler >> 8 & 255), X(p, t.adler >> 16 & 255), X(p, t.adler >> 24 & 255), X(p, 255 & t.total_in), X(p, t.total_in >> 8 & 255), X(p, t.total_in >> 16 & 255), X(p, t.total_in >> 24 & 255)) : (K(p, t.adler >>> 16), K(p, 65535 & t.adler)), I(t), 0 < p.wrap && (p.wrap = -p.wrap), p.pending !== 0 ? o : 1);
|
|
1803
|
-
}, u.deflateEnd = function(t) {
|
|
1804
|
-
var U;
|
|
1805
|
-
return t && t.state ? (U = t.state.status) !== w && U !== 69 && U !== 73 && U !== 91 && U !== 103 && U !== D && U !== 666 ? tt(t, m) : (t.state = null, U === D ? tt(t, -3) : o) : m;
|
|
1806
|
-
}, u.deflateSetDictionary = function(t, U) {
|
|
1807
|
-
var B, p, c, A, j, L, C, H, Y = U.length;
|
|
1808
|
-
if (!t || !t.state || (A = (B = t.state).wrap) === 2 || A === 1 && B.status !== w || B.lookahead) return m;
|
|
1809
|
-
for (A === 1 && (t.adler = h(t.adler, U, Y, 0)), B.wrap = 0, Y >= B.w_size && (A === 0 && (q(B.head), B.strstart = 0, B.block_start = 0, B.insert = 0), H = new a.Buf8(B.w_size), a.arraySet(H, U, Y - B.w_size, B.w_size, 0), U = H, Y = B.w_size), j = t.avail_in, L = t.next_in, C = t.input, t.avail_in = Y, t.next_in = 0, t.input = U, at(B); B.lookahead >= T; ) {
|
|
1810
|
-
for (p = B.strstart, c = B.lookahead - (T - 1); B.ins_h = (B.ins_h << B.hash_shift ^ B.window[p + T - 1]) & B.hash_mask, B.prev[p & B.w_mask] = B.head[B.ins_h], B.head[B.ins_h] = p, p++, --c; ) ;
|
|
1811
|
-
B.strstart = p, B.lookahead = T - 1, at(B);
|
|
1812
|
-
}
|
|
1813
|
-
return B.strstart += B.lookahead, B.block_start = B.strstart, B.insert = B.lookahead, B.lookahead = 0, B.match_length = B.prev_length = T - 1, B.match_available = 0, t.next_in = L, t.input = C, t.avail_in = j, B.wrap = A, o;
|
|
1814
|
-
}, u.deflateInfo = "pako deflate (from Nodeca project)";
|
|
1815
|
-
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(r, b, u) {
|
|
1816
|
-
b.exports = function() {
|
|
1817
|
-
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;
|
|
1818
|
-
};
|
|
1819
|
-
}, {}], 48: [function(r, b, u) {
|
|
1820
|
-
b.exports = function(n, a) {
|
|
1821
|
-
var i, h, y, k, g, v, o, m, s, d, l, f, _, S, z, F, R, P, T, W, J, w, D, e, N;
|
|
1822
|
-
i = n.state, h = n.next_in, e = n.input, y = h + (n.avail_in - 5), k = n.next_out, N = n.output, g = k - (a - n.avail_out), v = k + (n.avail_out - 257), o = i.dmax, m = i.wsize, s = i.whave, d = i.wnext, l = i.window, f = i.hold, _ = i.bits, S = i.lencode, z = i.distcode, F = (1 << i.lenbits) - 1, R = (1 << i.distbits) - 1;
|
|
1823
|
-
t: do {
|
|
1824
|
-
_ < 15 && (f += e[h++] << _, _ += 8, f += e[h++] << _, _ += 8), P = S[f & F];
|
|
1825
|
-
e: for (; ; ) {
|
|
1826
|
-
if (f >>>= T = P >>> 24, _ -= T, (T = P >>> 16 & 255) === 0) N[k++] = 65535 & P;
|
|
1827
|
-
else {
|
|
1828
|
-
if (!(16 & T)) {
|
|
1829
|
-
if ((64 & T) == 0) {
|
|
1830
|
-
P = S[(65535 & P) + (f & (1 << T) - 1)];
|
|
1831
|
-
continue e;
|
|
1832
|
-
}
|
|
1833
|
-
if (32 & T) {
|
|
1834
|
-
i.mode = 12;
|
|
1835
|
-
break t;
|
|
1836
|
-
}
|
|
1837
|
-
n.msg = "invalid literal/length code", i.mode = 30;
|
|
1838
|
-
break t;
|
|
1839
|
-
}
|
|
1840
|
-
W = 65535 & P, (T &= 15) && (_ < T && (f += e[h++] << _, _ += 8), W += f & (1 << T) - 1, f >>>= T, _ -= T), _ < 15 && (f += e[h++] << _, _ += 8, f += e[h++] << _, _ += 8), P = z[f & R];
|
|
1841
|
-
r: for (; ; ) {
|
|
1842
|
-
if (f >>>= T = P >>> 24, _ -= T, !(16 & (T = P >>> 16 & 255))) {
|
|
1843
|
-
if ((64 & T) == 0) {
|
|
1844
|
-
P = z[(65535 & P) + (f & (1 << T) - 1)];
|
|
1845
|
-
continue r;
|
|
1846
|
-
}
|
|
1847
|
-
n.msg = "invalid distance code", i.mode = 30;
|
|
1848
|
-
break t;
|
|
1849
|
-
}
|
|
1850
|
-
if (J = 65535 & P, _ < (T &= 15) && (f += e[h++] << _, (_ += 8) < T && (f += e[h++] << _, _ += 8)), o < (J += f & (1 << T) - 1)) {
|
|
1851
|
-
n.msg = "invalid distance too far back", i.mode = 30;
|
|
1852
|
-
break t;
|
|
1853
|
-
}
|
|
1854
|
-
if (f >>>= T, _ -= T, (T = k - g) < J) {
|
|
1855
|
-
if (s < (T = J - T) && i.sane) {
|
|
1856
|
-
n.msg = "invalid distance too far back", i.mode = 30;
|
|
1857
|
-
break t;
|
|
1858
|
-
}
|
|
1859
|
-
if (D = l, (w = 0) === d) {
|
|
1860
|
-
if (w += m - T, T < W) {
|
|
1861
|
-
for (W -= T; N[k++] = l[w++], --T; ) ;
|
|
1862
|
-
w = k - J, D = N;
|
|
1863
|
-
}
|
|
1864
|
-
} else if (d < T) {
|
|
1865
|
-
if (w += m + d - T, (T -= d) < W) {
|
|
1866
|
-
for (W -= T; N[k++] = l[w++], --T; ) ;
|
|
1867
|
-
if (w = 0, d < W) {
|
|
1868
|
-
for (W -= T = d; N[k++] = l[w++], --T; ) ;
|
|
1869
|
-
w = k - J, D = N;
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
} else if (w += d - T, T < W) {
|
|
1873
|
-
for (W -= T; N[k++] = l[w++], --T; ) ;
|
|
1874
|
-
w = k - J, D = N;
|
|
1875
|
-
}
|
|
1876
|
-
for (; 2 < W; ) N[k++] = D[w++], N[k++] = D[w++], N[k++] = D[w++], W -= 3;
|
|
1877
|
-
W && (N[k++] = D[w++], 1 < W && (N[k++] = D[w++]));
|
|
1878
|
-
} else {
|
|
1879
|
-
for (w = k - J; N[k++] = N[w++], N[k++] = N[w++], N[k++] = N[w++], 2 < (W -= 3); ) ;
|
|
1880
|
-
W && (N[k++] = N[w++], 1 < W && (N[k++] = N[w++]));
|
|
1881
|
-
}
|
|
1882
|
-
break;
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
break;
|
|
1886
551
|
}
|
|
1887
|
-
|
|
1888
|
-
h -= W = _ >> 3, f &= (1 << (_ -= W << 3)) - 1, n.next_in = h, n.next_out = k, n.avail_in = h < y ? y - h + 5 : 5 - (h - y), n.avail_out = k < v ? v - k + 257 : 257 - (k - v), i.hold = f, i.bits = _;
|
|
1889
|
-
};
|
|
1890
|
-
}, {}], 49: [function(r, b, u) {
|
|
1891
|
-
var n = r("../utils/common"), a = r("./adler32"), i = r("./crc32"), h = r("./inffast"), y = r("./inftrees"), k = 1, g = 2, v = 0, o = -2, m = 1, s = 852, d = 592;
|
|
1892
|
-
function l(w) {
|
|
1893
|
-
return (w >>> 24 & 255) + (w >>> 8 & 65280) + ((65280 & w) << 8) + ((255 & w) << 24);
|
|
1894
|
-
}
|
|
1895
|
-
function f() {
|
|
1896
|
-
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 n.Buf16(320), this.work = new n.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
1897
|
-
}
|
|
1898
|
-
function _(w) {
|
|
1899
|
-
var D;
|
|
1900
|
-
return w && w.state ? (D = w.state, w.total_in = w.total_out = D.total = 0, w.msg = "", D.wrap && (w.adler = 1 & D.wrap), D.mode = m, D.last = 0, D.havedict = 0, D.dmax = 32768, D.head = null, D.hold = 0, D.bits = 0, D.lencode = D.lendyn = new n.Buf32(s), D.distcode = D.distdyn = new n.Buf32(d), D.sane = 1, D.back = -1, v) : o;
|
|
1901
|
-
}
|
|
1902
|
-
function S(w) {
|
|
1903
|
-
var D;
|
|
1904
|
-
return w && w.state ? ((D = w.state).wsize = 0, D.whave = 0, D.wnext = 0, _(w)) : o;
|
|
1905
|
-
}
|
|
1906
|
-
function z(w, D) {
|
|
1907
|
-
var e, N;
|
|
1908
|
-
return w && w.state ? (N = w.state, D < 0 ? (e = 0, D = -D) : (e = 1 + (D >> 4), D < 48 && (D &= 15)), D && (D < 8 || 15 < D) ? o : (N.window !== null && N.wbits !== D && (N.window = null), N.wrap = e, N.wbits = D, S(w))) : o;
|
|
1909
|
-
}
|
|
1910
|
-
function F(w, D) {
|
|
1911
|
-
var e, N;
|
|
1912
|
-
return w ? (N = new f(), (w.state = N).window = null, (e = z(w, D)) !== v && (w.state = null), e) : o;
|
|
1913
|
-
}
|
|
1914
|
-
var R, P, T = !0;
|
|
1915
|
-
function W(w) {
|
|
1916
|
-
if (T) {
|
|
1917
|
-
var D;
|
|
1918
|
-
for (R = new n.Buf32(512), P = new n.Buf32(32), D = 0; D < 144; ) w.lens[D++] = 8;
|
|
1919
|
-
for (; D < 256; ) w.lens[D++] = 9;
|
|
1920
|
-
for (; D < 280; ) w.lens[D++] = 7;
|
|
1921
|
-
for (; D < 288; ) w.lens[D++] = 8;
|
|
1922
|
-
for (y(k, w.lens, 0, 288, R, 0, w.work, { bits: 9 }), D = 0; D < 32; ) w.lens[D++] = 5;
|
|
1923
|
-
y(g, w.lens, 0, 32, P, 0, w.work, { bits: 5 }), T = !1;
|
|
1924
|
-
}
|
|
1925
|
-
w.lencode = R, w.lenbits = 9, w.distcode = P, w.distbits = 5;
|
|
1926
|
-
}
|
|
1927
|
-
function J(w, D, e, N) {
|
|
1928
|
-
var Q, Z = w.state;
|
|
1929
|
-
return Z.window === null && (Z.wsize = 1 << Z.wbits, Z.wnext = 0, Z.whave = 0, Z.window = new n.Buf8(Z.wsize)), N >= Z.wsize ? (n.arraySet(Z.window, D, e - Z.wsize, Z.wsize, 0), Z.wnext = 0, Z.whave = Z.wsize) : (N < (Q = Z.wsize - Z.wnext) && (Q = N), n.arraySet(Z.window, D, e - N, Q, Z.wnext), (N -= Q) ? (n.arraySet(Z.window, D, e - N, N, 0), Z.wnext = N, Z.whave = Z.wsize) : (Z.wnext += Q, Z.wnext === Z.wsize && (Z.wnext = 0), Z.whave < Z.wsize && (Z.whave += Q))), 0;
|
|
1930
|
-
}
|
|
1931
|
-
u.inflateReset = S, u.inflateReset2 = z, u.inflateResetKeep = _, u.inflateInit = function(w) {
|
|
1932
|
-
return F(w, 15);
|
|
1933
|
-
}, u.inflateInit2 = F, u.inflate = function(w, D) {
|
|
1934
|
-
var e, N, Q, Z, tt, M, q, I, O, X, K, G, at, lt, et, nt, ut, st, ct, ft, t, U, B, p, c = 0, A = new n.Buf8(4), j = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
1935
|
-
if (!w || !w.state || !w.output || !w.input && w.avail_in !== 0) return o;
|
|
1936
|
-
(e = w.state).mode === 12 && (e.mode = 13), tt = w.next_out, Q = w.output, q = w.avail_out, Z = w.next_in, N = w.input, M = w.avail_in, I = e.hold, O = e.bits, X = M, K = q, U = v;
|
|
1937
|
-
t: for (; ; ) switch (e.mode) {
|
|
1938
|
-
case m:
|
|
1939
|
-
if (e.wrap === 0) {
|
|
1940
|
-
e.mode = 13;
|
|
1941
|
-
break;
|
|
1942
|
-
}
|
|
1943
|
-
for (; O < 16; ) {
|
|
1944
|
-
if (M === 0) break t;
|
|
1945
|
-
M--, I += N[Z++] << O, O += 8;
|
|
1946
|
-
}
|
|
1947
|
-
if (2 & e.wrap && I === 35615) {
|
|
1948
|
-
A[e.check = 0] = 255 & I, A[1] = I >>> 8 & 255, e.check = i(e.check, A, 2, 0), O = I = 0, e.mode = 2;
|
|
1949
|
-
break;
|
|
1950
|
-
}
|
|
1951
|
-
if (e.flags = 0, e.head && (e.head.done = !1), !(1 & e.wrap) || (((255 & I) << 8) + (I >> 8)) % 31) {
|
|
1952
|
-
w.msg = "incorrect header check", e.mode = 30;
|
|
1953
|
-
break;
|
|
1954
|
-
}
|
|
1955
|
-
if ((15 & I) != 8) {
|
|
1956
|
-
w.msg = "unknown compression method", e.mode = 30;
|
|
1957
|
-
break;
|
|
1958
|
-
}
|
|
1959
|
-
if (O -= 4, t = 8 + (15 & (I >>>= 4)), e.wbits === 0) e.wbits = t;
|
|
1960
|
-
else if (t > e.wbits) {
|
|
1961
|
-
w.msg = "invalid window size", e.mode = 30;
|
|
1962
|
-
break;
|
|
1963
|
-
}
|
|
1964
|
-
e.dmax = 1 << t, w.adler = e.check = 1, e.mode = 512 & I ? 10 : 12, O = I = 0;
|
|
1965
|
-
break;
|
|
1966
|
-
case 2:
|
|
1967
|
-
for (; O < 16; ) {
|
|
1968
|
-
if (M === 0) break t;
|
|
1969
|
-
M--, I += N[Z++] << O, O += 8;
|
|
1970
|
-
}
|
|
1971
|
-
if (e.flags = I, (255 & e.flags) != 8) {
|
|
1972
|
-
w.msg = "unknown compression method", e.mode = 30;
|
|
1973
|
-
break;
|
|
1974
|
-
}
|
|
1975
|
-
if (57344 & e.flags) {
|
|
1976
|
-
w.msg = "unknown header flags set", e.mode = 30;
|
|
1977
|
-
break;
|
|
1978
|
-
}
|
|
1979
|
-
e.head && (e.head.text = I >> 8 & 1), 512 & e.flags && (A[0] = 255 & I, A[1] = I >>> 8 & 255, e.check = i(e.check, A, 2, 0)), O = I = 0, e.mode = 3;
|
|
1980
|
-
case 3:
|
|
1981
|
-
for (; O < 32; ) {
|
|
1982
|
-
if (M === 0) break t;
|
|
1983
|
-
M--, I += N[Z++] << O, O += 8;
|
|
1984
|
-
}
|
|
1985
|
-
e.head && (e.head.time = I), 512 & e.flags && (A[0] = 255 & I, A[1] = I >>> 8 & 255, A[2] = I >>> 16 & 255, A[3] = I >>> 24 & 255, e.check = i(e.check, A, 4, 0)), O = I = 0, e.mode = 4;
|
|
1986
|
-
case 4:
|
|
1987
|
-
for (; O < 16; ) {
|
|
1988
|
-
if (M === 0) break t;
|
|
1989
|
-
M--, I += N[Z++] << O, O += 8;
|
|
1990
|
-
}
|
|
1991
|
-
e.head && (e.head.xflags = 255 & I, e.head.os = I >> 8), 512 & e.flags && (A[0] = 255 & I, A[1] = I >>> 8 & 255, e.check = i(e.check, A, 2, 0)), O = I = 0, e.mode = 5;
|
|
1992
|
-
case 5:
|
|
1993
|
-
if (1024 & e.flags) {
|
|
1994
|
-
for (; O < 16; ) {
|
|
1995
|
-
if (M === 0) break t;
|
|
1996
|
-
M--, I += N[Z++] << O, O += 8;
|
|
1997
|
-
}
|
|
1998
|
-
e.length = I, e.head && (e.head.extra_len = I), 512 & e.flags && (A[0] = 255 & I, A[1] = I >>> 8 & 255, e.check = i(e.check, A, 2, 0)), O = I = 0;
|
|
1999
|
-
} else e.head && (e.head.extra = null);
|
|
2000
|
-
e.mode = 6;
|
|
2001
|
-
case 6:
|
|
2002
|
-
if (1024 & e.flags && (M < (G = e.length) && (G = M), G && (e.head && (t = e.head.extra_len - e.length, e.head.extra || (e.head.extra = new Array(e.head.extra_len)), n.arraySet(e.head.extra, N, Z, G, t)), 512 & e.flags && (e.check = i(e.check, N, G, Z)), M -= G, Z += G, e.length -= G), e.length)) break t;
|
|
2003
|
-
e.length = 0, e.mode = 7;
|
|
2004
|
-
case 7:
|
|
2005
|
-
if (2048 & e.flags) {
|
|
2006
|
-
if (M === 0) break t;
|
|
2007
|
-
for (G = 0; t = N[Z + G++], e.head && t && e.length < 65536 && (e.head.name += String.fromCharCode(t)), t && G < M; ) ;
|
|
2008
|
-
if (512 & e.flags && (e.check = i(e.check, N, G, Z)), M -= G, Z += G, t) break t;
|
|
2009
|
-
} else e.head && (e.head.name = null);
|
|
2010
|
-
e.length = 0, e.mode = 8;
|
|
2011
|
-
case 8:
|
|
2012
|
-
if (4096 & e.flags) {
|
|
2013
|
-
if (M === 0) break t;
|
|
2014
|
-
for (G = 0; t = N[Z + G++], e.head && t && e.length < 65536 && (e.head.comment += String.fromCharCode(t)), t && G < M; ) ;
|
|
2015
|
-
if (512 & e.flags && (e.check = i(e.check, N, G, Z)), M -= G, Z += G, t) break t;
|
|
2016
|
-
} else e.head && (e.head.comment = null);
|
|
2017
|
-
e.mode = 9;
|
|
2018
|
-
case 9:
|
|
2019
|
-
if (512 & e.flags) {
|
|
2020
|
-
for (; O < 16; ) {
|
|
2021
|
-
if (M === 0) break t;
|
|
2022
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2023
|
-
}
|
|
2024
|
-
if (I !== (65535 & e.check)) {
|
|
2025
|
-
w.msg = "header crc mismatch", e.mode = 30;
|
|
2026
|
-
break;
|
|
2027
|
-
}
|
|
2028
|
-
O = I = 0;
|
|
2029
|
-
}
|
|
2030
|
-
e.head && (e.head.hcrc = e.flags >> 9 & 1, e.head.done = !0), w.adler = e.check = 0, e.mode = 12;
|
|
2031
|
-
break;
|
|
2032
|
-
case 10:
|
|
2033
|
-
for (; O < 32; ) {
|
|
2034
|
-
if (M === 0) break t;
|
|
2035
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2036
|
-
}
|
|
2037
|
-
w.adler = e.check = l(I), O = I = 0, e.mode = 11;
|
|
2038
|
-
case 11:
|
|
2039
|
-
if (e.havedict === 0) return w.next_out = tt, w.avail_out = q, w.next_in = Z, w.avail_in = M, e.hold = I, e.bits = O, 2;
|
|
2040
|
-
w.adler = e.check = 1, e.mode = 12;
|
|
2041
|
-
case 12:
|
|
2042
|
-
if (D === 5 || D === 6) break t;
|
|
2043
|
-
case 13:
|
|
2044
|
-
if (e.last) {
|
|
2045
|
-
I >>>= 7 & O, O -= 7 & O, e.mode = 27;
|
|
2046
|
-
break;
|
|
2047
|
-
}
|
|
2048
|
-
for (; O < 3; ) {
|
|
2049
|
-
if (M === 0) break t;
|
|
2050
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2051
|
-
}
|
|
2052
|
-
switch (e.last = 1 & I, O -= 1, 3 & (I >>>= 1)) {
|
|
2053
|
-
case 0:
|
|
2054
|
-
e.mode = 14;
|
|
2055
|
-
break;
|
|
2056
|
-
case 1:
|
|
2057
|
-
if (W(e), e.mode = 20, D !== 6) break;
|
|
2058
|
-
I >>>= 2, O -= 2;
|
|
2059
|
-
break t;
|
|
2060
|
-
case 2:
|
|
2061
|
-
e.mode = 17;
|
|
2062
|
-
break;
|
|
2063
|
-
case 3:
|
|
2064
|
-
w.msg = "invalid block type", e.mode = 30;
|
|
2065
|
-
}
|
|
2066
|
-
I >>>= 2, O -= 2;
|
|
2067
|
-
break;
|
|
2068
|
-
case 14:
|
|
2069
|
-
for (I >>>= 7 & O, O -= 7 & O; O < 32; ) {
|
|
2070
|
-
if (M === 0) break t;
|
|
2071
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2072
|
-
}
|
|
2073
|
-
if ((65535 & I) != (I >>> 16 ^ 65535)) {
|
|
2074
|
-
w.msg = "invalid stored block lengths", e.mode = 30;
|
|
2075
|
-
break;
|
|
2076
|
-
}
|
|
2077
|
-
if (e.length = 65535 & I, O = I = 0, e.mode = 15, D === 6) break t;
|
|
2078
|
-
case 15:
|
|
2079
|
-
e.mode = 16;
|
|
2080
|
-
case 16:
|
|
2081
|
-
if (G = e.length) {
|
|
2082
|
-
if (M < G && (G = M), q < G && (G = q), G === 0) break t;
|
|
2083
|
-
n.arraySet(Q, N, Z, G, tt), M -= G, Z += G, q -= G, tt += G, e.length -= G;
|
|
2084
|
-
break;
|
|
2085
|
-
}
|
|
2086
|
-
e.mode = 12;
|
|
2087
|
-
break;
|
|
2088
|
-
case 17:
|
|
2089
|
-
for (; O < 14; ) {
|
|
2090
|
-
if (M === 0) break t;
|
|
2091
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2092
|
-
}
|
|
2093
|
-
if (e.nlen = 257 + (31 & I), I >>>= 5, O -= 5, e.ndist = 1 + (31 & I), I >>>= 5, O -= 5, e.ncode = 4 + (15 & I), I >>>= 4, O -= 4, 286 < e.nlen || 30 < e.ndist) {
|
|
2094
|
-
w.msg = "too many length or distance symbols", e.mode = 30;
|
|
2095
|
-
break;
|
|
2096
|
-
}
|
|
2097
|
-
e.have = 0, e.mode = 18;
|
|
2098
|
-
case 18:
|
|
2099
|
-
for (; e.have < e.ncode; ) {
|
|
2100
|
-
for (; O < 3; ) {
|
|
2101
|
-
if (M === 0) break t;
|
|
2102
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2103
|
-
}
|
|
2104
|
-
e.lens[j[e.have++]] = 7 & I, I >>>= 3, O -= 3;
|
|
2105
|
-
}
|
|
2106
|
-
for (; e.have < 19; ) e.lens[j[e.have++]] = 0;
|
|
2107
|
-
if (e.lencode = e.lendyn, e.lenbits = 7, B = { bits: e.lenbits }, U = y(0, e.lens, 0, 19, e.lencode, 0, e.work, B), e.lenbits = B.bits, U) {
|
|
2108
|
-
w.msg = "invalid code lengths set", e.mode = 30;
|
|
2109
|
-
break;
|
|
2110
|
-
}
|
|
2111
|
-
e.have = 0, e.mode = 19;
|
|
2112
|
-
case 19:
|
|
2113
|
-
for (; e.have < e.nlen + e.ndist; ) {
|
|
2114
|
-
for (; nt = (c = e.lencode[I & (1 << e.lenbits) - 1]) >>> 16 & 255, ut = 65535 & c, !((et = c >>> 24) <= O); ) {
|
|
2115
|
-
if (M === 0) break t;
|
|
2116
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2117
|
-
}
|
|
2118
|
-
if (ut < 16) I >>>= et, O -= et, e.lens[e.have++] = ut;
|
|
2119
|
-
else {
|
|
2120
|
-
if (ut === 16) {
|
|
2121
|
-
for (p = et + 2; O < p; ) {
|
|
2122
|
-
if (M === 0) break t;
|
|
2123
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2124
|
-
}
|
|
2125
|
-
if (I >>>= et, O -= et, e.have === 0) {
|
|
2126
|
-
w.msg = "invalid bit length repeat", e.mode = 30;
|
|
2127
|
-
break;
|
|
2128
|
-
}
|
|
2129
|
-
t = e.lens[e.have - 1], G = 3 + (3 & I), I >>>= 2, O -= 2;
|
|
2130
|
-
} else if (ut === 17) {
|
|
2131
|
-
for (p = et + 3; O < p; ) {
|
|
2132
|
-
if (M === 0) break t;
|
|
2133
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2134
|
-
}
|
|
2135
|
-
O -= et, t = 0, G = 3 + (7 & (I >>>= et)), I >>>= 3, O -= 3;
|
|
2136
|
-
} else {
|
|
2137
|
-
for (p = et + 7; O < p; ) {
|
|
2138
|
-
if (M === 0) break t;
|
|
2139
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2140
|
-
}
|
|
2141
|
-
O -= et, t = 0, G = 11 + (127 & (I >>>= et)), I >>>= 7, O -= 7;
|
|
2142
|
-
}
|
|
2143
|
-
if (e.have + G > e.nlen + e.ndist) {
|
|
2144
|
-
w.msg = "invalid bit length repeat", e.mode = 30;
|
|
2145
|
-
break;
|
|
2146
|
-
}
|
|
2147
|
-
for (; G--; ) e.lens[e.have++] = t;
|
|
2148
|
-
}
|
|
2149
|
-
}
|
|
2150
|
-
if (e.mode === 30) break;
|
|
2151
|
-
if (e.lens[256] === 0) {
|
|
2152
|
-
w.msg = "invalid code -- missing end-of-block", e.mode = 30;
|
|
2153
|
-
break;
|
|
2154
|
-
}
|
|
2155
|
-
if (e.lenbits = 9, B = { bits: e.lenbits }, U = y(k, e.lens, 0, e.nlen, e.lencode, 0, e.work, B), e.lenbits = B.bits, U) {
|
|
2156
|
-
w.msg = "invalid literal/lengths set", e.mode = 30;
|
|
2157
|
-
break;
|
|
2158
|
-
}
|
|
2159
|
-
if (e.distbits = 6, e.distcode = e.distdyn, B = { bits: e.distbits }, U = y(g, e.lens, e.nlen, e.ndist, e.distcode, 0, e.work, B), e.distbits = B.bits, U) {
|
|
2160
|
-
w.msg = "invalid distances set", e.mode = 30;
|
|
2161
|
-
break;
|
|
2162
|
-
}
|
|
2163
|
-
if (e.mode = 20, D === 6) break t;
|
|
2164
|
-
case 20:
|
|
2165
|
-
e.mode = 21;
|
|
2166
|
-
case 21:
|
|
2167
|
-
if (6 <= M && 258 <= q) {
|
|
2168
|
-
w.next_out = tt, w.avail_out = q, w.next_in = Z, w.avail_in = M, e.hold = I, e.bits = O, h(w, K), tt = w.next_out, Q = w.output, q = w.avail_out, Z = w.next_in, N = w.input, M = w.avail_in, I = e.hold, O = e.bits, e.mode === 12 && (e.back = -1);
|
|
2169
|
-
break;
|
|
2170
|
-
}
|
|
2171
|
-
for (e.back = 0; nt = (c = e.lencode[I & (1 << e.lenbits) - 1]) >>> 16 & 255, ut = 65535 & c, !((et = c >>> 24) <= O); ) {
|
|
2172
|
-
if (M === 0) break t;
|
|
2173
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2174
|
-
}
|
|
2175
|
-
if (nt && (240 & nt) == 0) {
|
|
2176
|
-
for (st = et, ct = nt, ft = ut; nt = (c = e.lencode[ft + ((I & (1 << st + ct) - 1) >> st)]) >>> 16 & 255, ut = 65535 & c, !(st + (et = c >>> 24) <= O); ) {
|
|
2177
|
-
if (M === 0) break t;
|
|
2178
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2179
|
-
}
|
|
2180
|
-
I >>>= st, O -= st, e.back += st;
|
|
2181
|
-
}
|
|
2182
|
-
if (I >>>= et, O -= et, e.back += et, e.length = ut, nt === 0) {
|
|
2183
|
-
e.mode = 26;
|
|
2184
|
-
break;
|
|
2185
|
-
}
|
|
2186
|
-
if (32 & nt) {
|
|
2187
|
-
e.back = -1, e.mode = 12;
|
|
2188
|
-
break;
|
|
2189
|
-
}
|
|
2190
|
-
if (64 & nt) {
|
|
2191
|
-
w.msg = "invalid literal/length code", e.mode = 30;
|
|
2192
|
-
break;
|
|
2193
|
-
}
|
|
2194
|
-
e.extra = 15 & nt, e.mode = 22;
|
|
2195
|
-
case 22:
|
|
2196
|
-
if (e.extra) {
|
|
2197
|
-
for (p = e.extra; O < p; ) {
|
|
2198
|
-
if (M === 0) break t;
|
|
2199
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2200
|
-
}
|
|
2201
|
-
e.length += I & (1 << e.extra) - 1, I >>>= e.extra, O -= e.extra, e.back += e.extra;
|
|
2202
|
-
}
|
|
2203
|
-
e.was = e.length, e.mode = 23;
|
|
2204
|
-
case 23:
|
|
2205
|
-
for (; nt = (c = e.distcode[I & (1 << e.distbits) - 1]) >>> 16 & 255, ut = 65535 & c, !((et = c >>> 24) <= O); ) {
|
|
2206
|
-
if (M === 0) break t;
|
|
2207
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2208
|
-
}
|
|
2209
|
-
if ((240 & nt) == 0) {
|
|
2210
|
-
for (st = et, ct = nt, ft = ut; nt = (c = e.distcode[ft + ((I & (1 << st + ct) - 1) >> st)]) >>> 16 & 255, ut = 65535 & c, !(st + (et = c >>> 24) <= O); ) {
|
|
2211
|
-
if (M === 0) break t;
|
|
2212
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2213
|
-
}
|
|
2214
|
-
I >>>= st, O -= st, e.back += st;
|
|
2215
|
-
}
|
|
2216
|
-
if (I >>>= et, O -= et, e.back += et, 64 & nt) {
|
|
2217
|
-
w.msg = "invalid distance code", e.mode = 30;
|
|
2218
|
-
break;
|
|
2219
|
-
}
|
|
2220
|
-
e.offset = ut, e.extra = 15 & nt, e.mode = 24;
|
|
2221
|
-
case 24:
|
|
2222
|
-
if (e.extra) {
|
|
2223
|
-
for (p = e.extra; O < p; ) {
|
|
2224
|
-
if (M === 0) break t;
|
|
2225
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2226
|
-
}
|
|
2227
|
-
e.offset += I & (1 << e.extra) - 1, I >>>= e.extra, O -= e.extra, e.back += e.extra;
|
|
2228
|
-
}
|
|
2229
|
-
if (e.offset > e.dmax) {
|
|
2230
|
-
w.msg = "invalid distance too far back", e.mode = 30;
|
|
2231
|
-
break;
|
|
2232
|
-
}
|
|
2233
|
-
e.mode = 25;
|
|
2234
|
-
case 25:
|
|
2235
|
-
if (q === 0) break t;
|
|
2236
|
-
if (G = K - q, e.offset > G) {
|
|
2237
|
-
if ((G = e.offset - G) > e.whave && e.sane) {
|
|
2238
|
-
w.msg = "invalid distance too far back", e.mode = 30;
|
|
2239
|
-
break;
|
|
2240
|
-
}
|
|
2241
|
-
at = G > e.wnext ? (G -= e.wnext, e.wsize - G) : e.wnext - G, G > e.length && (G = e.length), lt = e.window;
|
|
2242
|
-
} else lt = Q, at = tt - e.offset, G = e.length;
|
|
2243
|
-
for (q < G && (G = q), q -= G, e.length -= G; Q[tt++] = lt[at++], --G; ) ;
|
|
2244
|
-
e.length === 0 && (e.mode = 21);
|
|
2245
|
-
break;
|
|
2246
|
-
case 26:
|
|
2247
|
-
if (q === 0) break t;
|
|
2248
|
-
Q[tt++] = e.length, q--, e.mode = 21;
|
|
2249
|
-
break;
|
|
2250
|
-
case 27:
|
|
2251
|
-
if (e.wrap) {
|
|
2252
|
-
for (; O < 32; ) {
|
|
2253
|
-
if (M === 0) break t;
|
|
2254
|
-
M--, I |= N[Z++] << O, O += 8;
|
|
2255
|
-
}
|
|
2256
|
-
if (K -= q, w.total_out += K, e.total += K, K && (w.adler = e.check = e.flags ? i(e.check, Q, K, tt - K) : a(e.check, Q, K, tt - K)), K = q, (e.flags ? I : l(I)) !== e.check) {
|
|
2257
|
-
w.msg = "incorrect data check", e.mode = 30;
|
|
2258
|
-
break;
|
|
2259
|
-
}
|
|
2260
|
-
O = I = 0;
|
|
2261
|
-
}
|
|
2262
|
-
e.mode = 28;
|
|
2263
|
-
case 28:
|
|
2264
|
-
if (e.wrap && e.flags) {
|
|
2265
|
-
for (; O < 32; ) {
|
|
2266
|
-
if (M === 0) break t;
|
|
2267
|
-
M--, I += N[Z++] << O, O += 8;
|
|
2268
|
-
}
|
|
2269
|
-
if (I !== (4294967295 & e.total)) {
|
|
2270
|
-
w.msg = "incorrect length check", e.mode = 30;
|
|
2271
|
-
break;
|
|
2272
|
-
}
|
|
2273
|
-
O = I = 0;
|
|
2274
|
-
}
|
|
2275
|
-
e.mode = 29;
|
|
2276
|
-
case 29:
|
|
2277
|
-
U = 1;
|
|
2278
|
-
break t;
|
|
2279
|
-
case 30:
|
|
2280
|
-
U = -3;
|
|
2281
|
-
break t;
|
|
2282
|
-
case 31:
|
|
2283
|
-
return -4;
|
|
2284
|
-
default:
|
|
2285
|
-
return o;
|
|
2286
|
-
}
|
|
2287
|
-
return w.next_out = tt, w.avail_out = q, w.next_in = Z, w.avail_in = M, e.hold = I, e.bits = O, (e.wsize || K !== w.avail_out && e.mode < 30 && (e.mode < 27 || D !== 4)) && J(w, w.output, w.next_out, K - w.avail_out) ? (e.mode = 31, -4) : (X -= w.avail_in, K -= w.avail_out, w.total_in += X, w.total_out += K, e.total += K, e.wrap && K && (w.adler = e.check = e.flags ? i(e.check, Q, K, w.next_out - K) : a(e.check, Q, K, w.next_out - K)), w.data_type = e.bits + (e.last ? 64 : 0) + (e.mode === 12 ? 128 : 0) + (e.mode === 20 || e.mode === 15 ? 256 : 0), (X == 0 && K === 0 || D === 4) && U === v && (U = -5), U);
|
|
2288
|
-
}, u.inflateEnd = function(w) {
|
|
2289
|
-
if (!w || !w.state) return o;
|
|
2290
|
-
var D = w.state;
|
|
2291
|
-
return D.window && (D.window = null), w.state = null, v;
|
|
2292
|
-
}, u.inflateGetHeader = function(w, D) {
|
|
2293
|
-
var e;
|
|
2294
|
-
return w && w.state ? (2 & (e = w.state).wrap) == 0 ? o : ((e.head = D).done = !1, v) : o;
|
|
2295
|
-
}, u.inflateSetDictionary = function(w, D) {
|
|
2296
|
-
var e, N = D.length;
|
|
2297
|
-
return w && w.state ? (e = w.state).wrap !== 0 && e.mode !== 11 ? o : e.mode === 11 && a(1, D, N, 0) !== e.check ? -3 : J(w, D, N, N) ? (e.mode = 31, -4) : (e.havedict = 1, v) : o;
|
|
2298
|
-
}, u.inflateInfo = "pako inflate (from Nodeca project)";
|
|
2299
|
-
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(r, b, u) {
|
|
2300
|
-
var n = r("../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], i = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], h = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], y = [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];
|
|
2301
|
-
b.exports = function(k, g, v, o, m, s, d, l) {
|
|
2302
|
-
var f, _, S, z, F, R, P, T, W, J = l.bits, w = 0, D = 0, e = 0, N = 0, Q = 0, Z = 0, tt = 0, M = 0, q = 0, I = 0, O = null, X = 0, K = new n.Buf16(16), G = new n.Buf16(16), at = null, lt = 0;
|
|
2303
|
-
for (w = 0; w <= 15; w++) K[w] = 0;
|
|
2304
|
-
for (D = 0; D < o; D++) K[g[v + D]]++;
|
|
2305
|
-
for (Q = J, N = 15; 1 <= N && K[N] === 0; N--) ;
|
|
2306
|
-
if (N < Q && (Q = N), N === 0) return m[s++] = 20971520, m[s++] = 20971520, l.bits = 1, 0;
|
|
2307
|
-
for (e = 1; e < N && K[e] === 0; e++) ;
|
|
2308
|
-
for (Q < e && (Q = e), w = M = 1; w <= 15; w++) if (M <<= 1, (M -= K[w]) < 0) return -1;
|
|
2309
|
-
if (0 < M && (k === 0 || N !== 1)) return -1;
|
|
2310
|
-
for (G[1] = 0, w = 1; w < 15; w++) G[w + 1] = G[w] + K[w];
|
|
2311
|
-
for (D = 0; D < o; D++) g[v + D] !== 0 && (d[G[g[v + D]]++] = D);
|
|
2312
|
-
if (R = k === 0 ? (O = at = d, 19) : k === 1 ? (O = a, X -= 257, at = i, lt -= 257, 256) : (O = h, at = y, -1), w = e, F = s, tt = D = I = 0, S = -1, z = (q = 1 << (Z = Q)) - 1, k === 1 && 852 < q || k === 2 && 592 < q) return 1;
|
|
2313
|
-
for (; ; ) {
|
|
2314
|
-
for (P = w - tt, W = d[D] < R ? (T = 0, d[D]) : d[D] > R ? (T = at[lt + d[D]], O[X + d[D]]) : (T = 96, 0), f = 1 << w - tt, e = _ = 1 << Z; m[F + (I >> tt) + (_ -= f)] = P << 24 | T << 16 | W | 0, _ !== 0; ) ;
|
|
2315
|
-
for (f = 1 << w - 1; I & f; ) f >>= 1;
|
|
2316
|
-
if (f !== 0 ? (I &= f - 1, I += f) : I = 0, D++, --K[w] == 0) {
|
|
2317
|
-
if (w === N) break;
|
|
2318
|
-
w = g[v + d[D]];
|
|
2319
|
-
}
|
|
2320
|
-
if (Q < w && (I & z) !== S) {
|
|
2321
|
-
for (tt === 0 && (tt = Q), F += e, M = 1 << (Z = w - tt); Z + tt < N && !((M -= K[Z + tt]) <= 0); ) Z++, M <<= 1;
|
|
2322
|
-
if (q += 1 << Z, k === 1 && 852 < q || k === 2 && 592 < q) return 1;
|
|
2323
|
-
m[S = I & z] = Q << 24 | Z << 16 | F - s | 0;
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
return I !== 0 && (m[F + I] = w - tt << 24 | 64 << 16 | 0), l.bits = Q, 0;
|
|
2327
|
-
};
|
|
2328
|
-
}, { "../utils/common": 41 }], 51: [function(r, b, u) {
|
|
2329
|
-
b.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" };
|
|
2330
|
-
}, {}], 52: [function(r, b, u) {
|
|
2331
|
-
var n = r("../utils/common"), a = 0, i = 1;
|
|
2332
|
-
function h(c) {
|
|
2333
|
-
for (var A = c.length; 0 <= --A; ) c[A] = 0;
|
|
2334
|
-
}
|
|
2335
|
-
var y = 0, k = 29, g = 256, v = g + 1 + k, o = 30, m = 19, s = 2 * v + 1, d = 15, l = 16, f = 7, _ = 256, S = 16, z = 17, F = 18, R = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], P = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], T = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], W = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], J = new Array(2 * (v + 2));
|
|
2336
|
-
h(J);
|
|
2337
|
-
var w = new Array(2 * o);
|
|
2338
|
-
h(w);
|
|
2339
|
-
var D = new Array(512);
|
|
2340
|
-
h(D);
|
|
2341
|
-
var e = new Array(256);
|
|
2342
|
-
h(e);
|
|
2343
|
-
var N = new Array(k);
|
|
2344
|
-
h(N);
|
|
2345
|
-
var Q, Z, tt, M = new Array(o);
|
|
2346
|
-
function q(c, A, j, L, C) {
|
|
2347
|
-
this.static_tree = c, this.extra_bits = A, this.extra_base = j, this.elems = L, this.max_length = C, this.has_stree = c && c.length;
|
|
2348
|
-
}
|
|
2349
|
-
function I(c, A) {
|
|
2350
|
-
this.dyn_tree = c, this.max_code = 0, this.stat_desc = A;
|
|
2351
|
-
}
|
|
2352
|
-
function O(c) {
|
|
2353
|
-
return c < 256 ? D[c] : D[256 + (c >>> 7)];
|
|
2354
|
-
}
|
|
2355
|
-
function X(c, A) {
|
|
2356
|
-
c.pending_buf[c.pending++] = 255 & A, c.pending_buf[c.pending++] = A >>> 8 & 255;
|
|
2357
|
-
}
|
|
2358
|
-
function K(c, A, j) {
|
|
2359
|
-
c.bi_valid > l - j ? (c.bi_buf |= A << c.bi_valid & 65535, X(c, c.bi_buf), c.bi_buf = A >> l - c.bi_valid, c.bi_valid += j - l) : (c.bi_buf |= A << c.bi_valid & 65535, c.bi_valid += j);
|
|
2360
|
-
}
|
|
2361
|
-
function G(c, A, j) {
|
|
2362
|
-
K(c, j[2 * A], j[2 * A + 1]);
|
|
2363
|
-
}
|
|
2364
|
-
function at(c, A) {
|
|
2365
|
-
for (var j = 0; j |= 1 & c, c >>>= 1, j <<= 1, 0 < --A; ) ;
|
|
2366
|
-
return j >>> 1;
|
|
2367
|
-
}
|
|
2368
|
-
function lt(c, A, j) {
|
|
2369
|
-
var L, C, H = new Array(d + 1), Y = 0;
|
|
2370
|
-
for (L = 1; L <= d; L++) H[L] = Y = Y + j[L - 1] << 1;
|
|
2371
|
-
for (C = 0; C <= A; C++) {
|
|
2372
|
-
var $ = c[2 * C + 1];
|
|
2373
|
-
$ !== 0 && (c[2 * C] = at(H[$]++, $));
|
|
552
|
+
C = S, S = E[C], L += C - S & 32767;
|
|
2374
553
|
}
|
|
554
|
+
if (J) {
|
|
555
|
+
l[F++] = 268435456 | or[j] << 18 | dr[J];
|
|
556
|
+
var Br = or[j] & 31, Dr = dr[J] & 31;
|
|
557
|
+
g += fr[Br] + lr[Dr], ++b[257 + Br], ++d[Dr], M = w + j, ++x;
|
|
558
|
+
} else
|
|
559
|
+
l[F++] = e[w], ++b[e[w]];
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
for (w = Math.max(w, M); w < i; ++w)
|
|
563
|
+
l[F++] = e[w], ++b[e[w]];
|
|
564
|
+
f = pr(e, c, u, l, b, d, g, F, D, w - D, f), u || (o.r = f & 7 | c[f / 8 | 0] << 3, f -= 7, o.h = A, o.p = E, o.i = w, o.w = M);
|
|
565
|
+
} else {
|
|
566
|
+
for (var w = o.w || 0; w < i + u; w += 65535) {
|
|
567
|
+
var hr = w + 65535;
|
|
568
|
+
hr >= i && (c[f / 8 | 0] = u, hr = i), f = Fr(c, f + 1, e.subarray(w, hr));
|
|
569
|
+
}
|
|
570
|
+
o.i = i;
|
|
571
|
+
}
|
|
572
|
+
return Er(s, 0, n + br(f) + a);
|
|
573
|
+
}, ce = /* @__PURE__ */ (function() {
|
|
574
|
+
for (var e = new Int32Array(256), r = 0; r < 256; ++r) {
|
|
575
|
+
for (var t = r, n = 9; --n; )
|
|
576
|
+
t = (t & 1 && -306674912) ^ t >>> 1;
|
|
577
|
+
e[r] = t;
|
|
578
|
+
}
|
|
579
|
+
return e;
|
|
580
|
+
})(), fe = function() {
|
|
581
|
+
var e = -1;
|
|
582
|
+
return {
|
|
583
|
+
p: function(r) {
|
|
584
|
+
for (var t = e, n = 0; n < r.length; ++n)
|
|
585
|
+
t = ce[t & 255 ^ r[n]] ^ t >>> 8;
|
|
586
|
+
e = t;
|
|
587
|
+
},
|
|
588
|
+
d: function() {
|
|
589
|
+
return ~e;
|
|
590
|
+
}
|
|
591
|
+
};
|
|
592
|
+
}, kr = function(e, r, t, n, a) {
|
|
593
|
+
if (!a && (a = { l: 1 }, r.dictionary)) {
|
|
594
|
+
var o = r.dictionary.subarray(-32768), i = new T(o.length + e.length);
|
|
595
|
+
i.set(o), i.set(e, o.length), e = i, a.w = o.length;
|
|
596
|
+
}
|
|
597
|
+
return Yr(e, r.level == null ? 6 : r.level, r.mem == null ? a.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20 : 12 + r.mem, t, n, a);
|
|
598
|
+
}, $r = function(e, r) {
|
|
599
|
+
var t = {};
|
|
600
|
+
for (var n in e)
|
|
601
|
+
t[n] = e[n];
|
|
602
|
+
for (var n in r)
|
|
603
|
+
t[n] = r[n];
|
|
604
|
+
return t;
|
|
605
|
+
}, zr = function(e, r, t) {
|
|
606
|
+
for (var n = e(), a = e.toString(), o = a.slice(a.indexOf("[") + 1, a.lastIndexOf("]")).replace(/\s+/g, "").split(","), i = 0; i < n.length; ++i) {
|
|
607
|
+
var s = n[i], c = o[i];
|
|
608
|
+
if (typeof s == "function") {
|
|
609
|
+
r += ";" + c + "=";
|
|
610
|
+
var u = s.toString();
|
|
611
|
+
if (s.prototype)
|
|
612
|
+
if (u.indexOf("[native code]") != -1) {
|
|
613
|
+
var f = u.indexOf(" ", 8) + 1;
|
|
614
|
+
r += u.slice(f, u.indexOf("(", f));
|
|
615
|
+
} else {
|
|
616
|
+
r += u;
|
|
617
|
+
for (var m in s.prototype)
|
|
618
|
+
r += ";" + c + ".prototype." + m + "=" + s.prototype[m].toString();
|
|
2375
619
|
}
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
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;
|
|
2478
|
-
};
|
|
2479
|
-
}, {}], 54: [function(r, b, u) {
|
|
2480
|
-
(function(n) {
|
|
2481
|
-
(function(a, i) {
|
|
2482
|
-
if (!a.setImmediate) {
|
|
2483
|
-
var h, y, k, g, v = 1, o = {}, m = !1, s = a.document, d = Object.getPrototypeOf && Object.getPrototypeOf(a);
|
|
2484
|
-
d = d && d.setTimeout ? d : a, h = {}.toString.call(a.process) === "[object process]" ? function(S) {
|
|
2485
|
-
process.nextTick(function() {
|
|
2486
|
-
f(S);
|
|
2487
|
-
});
|
|
2488
|
-
} : (function() {
|
|
2489
|
-
if (a.postMessage && !a.importScripts) {
|
|
2490
|
-
var S = !0, z = a.onmessage;
|
|
2491
|
-
return a.onmessage = function() {
|
|
2492
|
-
S = !1;
|
|
2493
|
-
}, a.postMessage("", "*"), a.onmessage = z, S;
|
|
2494
|
-
}
|
|
2495
|
-
})() ? (g = "setImmediate$" + Math.random() + "$", a.addEventListener ? a.addEventListener("message", _, !1) : a.attachEvent("onmessage", _), function(S) {
|
|
2496
|
-
a.postMessage(g + S, "*");
|
|
2497
|
-
}) : a.MessageChannel ? ((k = new MessageChannel()).port1.onmessage = function(S) {
|
|
2498
|
-
f(S.data);
|
|
2499
|
-
}, function(S) {
|
|
2500
|
-
k.port2.postMessage(S);
|
|
2501
|
-
}) : s && "onreadystatechange" in s.createElement("script") ? (y = s.documentElement, function(S) {
|
|
2502
|
-
var z = s.createElement("script");
|
|
2503
|
-
z.onreadystatechange = function() {
|
|
2504
|
-
f(S), z.onreadystatechange = null, y.removeChild(z), z = null;
|
|
2505
|
-
}, y.appendChild(z);
|
|
2506
|
-
}) : function(S) {
|
|
2507
|
-
setTimeout(f, 0, S);
|
|
2508
|
-
}, d.setImmediate = function(S) {
|
|
2509
|
-
typeof S != "function" && (S = new Function("" + S));
|
|
2510
|
-
for (var z = new Array(arguments.length - 1), F = 0; F < z.length; F++) z[F] = arguments[F + 1];
|
|
2511
|
-
var R = { callback: S, args: z };
|
|
2512
|
-
return o[v] = R, h(v), v++;
|
|
2513
|
-
}, d.clearImmediate = l;
|
|
2514
|
-
}
|
|
2515
|
-
function l(S) {
|
|
2516
|
-
delete o[S];
|
|
2517
|
-
}
|
|
2518
|
-
function f(S) {
|
|
2519
|
-
if (m) setTimeout(f, 0, S);
|
|
2520
|
-
else {
|
|
2521
|
-
var z = o[S];
|
|
2522
|
-
if (z) {
|
|
2523
|
-
m = !0;
|
|
2524
|
-
try {
|
|
2525
|
-
(function(F) {
|
|
2526
|
-
var R = F.callback, P = F.args;
|
|
2527
|
-
switch (P.length) {
|
|
2528
|
-
case 0:
|
|
2529
|
-
R();
|
|
2530
|
-
break;
|
|
2531
|
-
case 1:
|
|
2532
|
-
R(P[0]);
|
|
2533
|
-
break;
|
|
2534
|
-
case 2:
|
|
2535
|
-
R(P[0], P[1]);
|
|
2536
|
-
break;
|
|
2537
|
-
case 3:
|
|
2538
|
-
R(P[0], P[1], P[2]);
|
|
2539
|
-
break;
|
|
2540
|
-
default:
|
|
2541
|
-
R.apply(i, P);
|
|
2542
|
-
}
|
|
2543
|
-
})(z);
|
|
2544
|
-
} finally {
|
|
2545
|
-
l(S), m = !1;
|
|
2546
|
-
}
|
|
2547
|
-
}
|
|
2548
|
-
}
|
|
2549
|
-
}
|
|
2550
|
-
function _(S) {
|
|
2551
|
-
S.source === a && typeof S.data == "string" && S.data.indexOf(g) === 0 && f(+S.data.slice(g.length));
|
|
2552
|
-
}
|
|
2553
|
-
})(typeof self > "u" ? n === void 0 ? this : n : self);
|
|
2554
|
-
}).call(this, typeof kt < "u" ? kt : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2555
|
-
}, {}] }, {}, [10])(10);
|
|
620
|
+
else
|
|
621
|
+
r += u;
|
|
622
|
+
} else
|
|
623
|
+
t[c] = s;
|
|
624
|
+
}
|
|
625
|
+
return r;
|
|
626
|
+
}, tr = [], le = function(e) {
|
|
627
|
+
var r = [];
|
|
628
|
+
for (var t in e)
|
|
629
|
+
e[t].buffer && r.push((e[t] = new e[t].constructor(e[t])).buffer);
|
|
630
|
+
return r;
|
|
631
|
+
}, ue = function(e, r, t, n) {
|
|
632
|
+
if (!tr[t]) {
|
|
633
|
+
for (var a = "", o = {}, i = e.length - 1, s = 0; s < i; ++s)
|
|
634
|
+
a = zr(e[s], a, o);
|
|
635
|
+
tr[t] = { c: zr(e[i], a, o), e: o };
|
|
636
|
+
}
|
|
637
|
+
var c = $r({}, tr[t].e);
|
|
638
|
+
return ae(tr[t].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + r.toString() + "}", t, c, le(c), n);
|
|
639
|
+
}, ve = function() {
|
|
640
|
+
return [T, I, cr, fr, lr, wr, or, dr, qr, Z, Vr, er, ir, Gr, Or, k, H, G, ar, sr, mr, Y, Fr, pr, br, Er, Yr, kr, Ur, Kr];
|
|
641
|
+
}, Kr = function(e) {
|
|
642
|
+
return postMessage(e, [e.buffer]);
|
|
643
|
+
}, he = function(e, r, t, n, a, o) {
|
|
644
|
+
var i = ue(t, n, a, function(s, c) {
|
|
645
|
+
i.terminate(), o(s, c);
|
|
646
|
+
});
|
|
647
|
+
return i.postMessage([e, r], r.consume ? [e.buffer] : []), function() {
|
|
648
|
+
i.terminate();
|
|
649
|
+
};
|
|
650
|
+
}, P = function(e, r, t) {
|
|
651
|
+
for (; t; ++r)
|
|
652
|
+
e[r] = t, t >>>= 8;
|
|
653
|
+
};
|
|
654
|
+
function ge(e, r, t) {
|
|
655
|
+
return t || (t = r, r = {}), typeof t != "function" && K(7), he(e, r, [
|
|
656
|
+
ve
|
|
657
|
+
], function(n) {
|
|
658
|
+
return Kr(Ur(n.data[0], n.data[1]));
|
|
659
|
+
}, 0, t);
|
|
660
|
+
}
|
|
661
|
+
function Ur(e, r) {
|
|
662
|
+
return kr(e, r || {}, 0, 0);
|
|
663
|
+
}
|
|
664
|
+
var Qr = function(e, r, t, n) {
|
|
665
|
+
for (var a in e) {
|
|
666
|
+
var o = e[a], i = r + a, s = n;
|
|
667
|
+
Array.isArray(o) && (s = $r(n, o[1]), o = o[0]), o instanceof T ? t[i] = [o, s] : (t[i += "/"] = [new T(0), s], Qr(o, i, t, n));
|
|
668
|
+
}
|
|
669
|
+
}, Ir = typeof TextEncoder < "u" && /* @__PURE__ */ new TextEncoder(), we = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), de = 0;
|
|
670
|
+
try {
|
|
671
|
+
we.decode(Or, { stream: !0 }), de = 1;
|
|
672
|
+
} catch {
|
|
673
|
+
}
|
|
674
|
+
function Rr(e, r) {
|
|
675
|
+
var t;
|
|
676
|
+
if (Ir)
|
|
677
|
+
return Ir.encode(e);
|
|
678
|
+
for (var n = e.length, a = new T(e.length + (e.length >> 1)), o = 0, i = function(u) {
|
|
679
|
+
a[o++] = u;
|
|
680
|
+
}, t = 0; t < n; ++t) {
|
|
681
|
+
if (o + 5 > a.length) {
|
|
682
|
+
var s = new T(o + 8 + (n - t << 1));
|
|
683
|
+
s.set(a), a = s;
|
|
684
|
+
}
|
|
685
|
+
var c = e.charCodeAt(t);
|
|
686
|
+
c < 128 || r ? i(c) : c < 2048 ? (i(192 | c >> 6), i(128 | c & 63)) : c > 55295 && c < 57344 ? (c = 65536 + (c & 1047552) | e.charCodeAt(++t) & 1023, i(240 | c >> 18), i(128 | c >> 12 & 63), i(128 | c >> 6 & 63), i(128 | c & 63)) : (i(224 | c >> 12), i(128 | c >> 6 & 63), i(128 | c & 63));
|
|
687
|
+
}
|
|
688
|
+
return Er(a, 0, o);
|
|
689
|
+
}
|
|
690
|
+
var yr = function(e) {
|
|
691
|
+
var r = 0;
|
|
692
|
+
if (e)
|
|
693
|
+
for (var t in e) {
|
|
694
|
+
var n = e[t].length;
|
|
695
|
+
n > 65535 && K(9), r += n + 4;
|
|
696
|
+
}
|
|
697
|
+
return r;
|
|
698
|
+
}, jr = function(e, r, t, n, a, o, i, s) {
|
|
699
|
+
var c = n.length, u = t.extra, f = s && s.length, m = yr(u);
|
|
700
|
+
P(e, r, i != null ? 33639248 : 67324752), r += 4, i != null && (e[r++] = 20, e[r++] = t.os), e[r] = 20, r += 2, e[r++] = t.flag << 1 | (o < 0 && 8), e[r++] = a && 8, e[r++] = t.compression & 255, e[r++] = t.compression >> 8;
|
|
701
|
+
var y = new Date(t.mtime == null ? Date.now() : t.mtime), p = y.getFullYear() - 1980;
|
|
702
|
+
if ((p < 0 || p > 119) && K(10), P(e, r, p << 25 | y.getMonth() + 1 << 21 | y.getDate() << 16 | y.getHours() << 11 | y.getMinutes() << 5 | y.getSeconds() >> 1), r += 4, o != -1 && (P(e, r, t.crc), P(e, r + 4, o < 0 ? -o - 2 : o), P(e, r + 8, t.size)), P(e, r + 12, c), P(e, r + 14, m), r += 16, i != null && (P(e, r, f), P(e, r + 6, t.attrs), P(e, r + 10, i), r += 14), e.set(n, r), r += c, m)
|
|
703
|
+
for (var $ in u) {
|
|
704
|
+
var E = u[$], A = E.length;
|
|
705
|
+
P(e, r, +$), P(e, r + 2, A), e.set(E, r + 4), r += 4 + A;
|
|
706
|
+
}
|
|
707
|
+
return f && (e.set(s, r), r += f), r;
|
|
708
|
+
}, me = function(e, r, t, n, a) {
|
|
709
|
+
P(e, r, 101010256), P(e, r + 8, t), P(e, r + 10, t), P(e, r + 12, n), P(e, r + 16, a);
|
|
710
|
+
};
|
|
711
|
+
function pe(e, r, t) {
|
|
712
|
+
t || (t = r, r = {}), typeof t != "function" && K(7);
|
|
713
|
+
var n = {};
|
|
714
|
+
Qr(e, "", n, r);
|
|
715
|
+
var a = Object.keys(n), o = a.length, i = 0, s = 0, c = o, u = new Array(o), f = [], m = function() {
|
|
716
|
+
for (var A = 0; A < f.length; ++A)
|
|
717
|
+
f[A]();
|
|
718
|
+
}, y = function(A, B) {
|
|
719
|
+
Lr(function() {
|
|
720
|
+
t(A, B);
|
|
2556
721
|
});
|
|
2557
|
-
}
|
|
722
|
+
};
|
|
723
|
+
Lr(function() {
|
|
724
|
+
y = t;
|
|
725
|
+
});
|
|
726
|
+
var p = function() {
|
|
727
|
+
var A = new T(s + 22), B = i, v = s - i;
|
|
728
|
+
s = 0;
|
|
729
|
+
for (var h = 0; h < c; ++h) {
|
|
730
|
+
var l = u[h];
|
|
731
|
+
try {
|
|
732
|
+
var b = l.c.length;
|
|
733
|
+
jr(A, s, l, l.f, l.u, b);
|
|
734
|
+
var d = 30 + l.f.length + yr(l.extra), x = s + d;
|
|
735
|
+
A.set(l.c, x), jr(A, i, l, l.f, l.u, b, s, l.m), i += 16 + d + (l.m ? l.m.length : 0), s = x + b;
|
|
736
|
+
} catch (g) {
|
|
737
|
+
return y(g, null);
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
me(A, i, u.length, v, B), y(null, A);
|
|
741
|
+
};
|
|
742
|
+
o || p();
|
|
743
|
+
for (var $ = function(A) {
|
|
744
|
+
var B = a[A], v = n[B], h = v[0], l = v[1], b = fe(), d = h.length;
|
|
745
|
+
b.p(h);
|
|
746
|
+
var x = Rr(B), g = x.length, w = l.comment, F = w && Rr(w), M = F && F.length, D = yr(l.extra), R = l.level == 0 ? 0 : 8, C = function(S, z) {
|
|
747
|
+
if (S)
|
|
748
|
+
m(), y(S, null);
|
|
749
|
+
else {
|
|
750
|
+
var U = z.length;
|
|
751
|
+
u[A] = $r(l, {
|
|
752
|
+
size: d,
|
|
753
|
+
crc: b.d(),
|
|
754
|
+
c: z,
|
|
755
|
+
f: x,
|
|
756
|
+
m: F,
|
|
757
|
+
u: g != B.length || F && w.length != M,
|
|
758
|
+
compression: R
|
|
759
|
+
}), i += 30 + g + D + U, s += 76 + 2 * (g + D) + (M || 0) + U, --o || p();
|
|
760
|
+
}
|
|
761
|
+
};
|
|
762
|
+
if (g > 65535 && C(K(11, 0, 1), null), !R)
|
|
763
|
+
C(null, h);
|
|
764
|
+
else if (d < 16e4)
|
|
765
|
+
try {
|
|
766
|
+
C(null, Ur(h, l));
|
|
767
|
+
} catch (S) {
|
|
768
|
+
C(S, null);
|
|
769
|
+
}
|
|
770
|
+
else
|
|
771
|
+
f.push(ge(h, l, C));
|
|
772
|
+
}, E = 0; E < c; ++E)
|
|
773
|
+
$(E);
|
|
774
|
+
return m;
|
|
2558
775
|
}
|
|
2559
|
-
var
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
776
|
+
var Lr = typeof queueMicrotask == "function" ? queueMicrotask : typeof setTimeout == "function" ? setTimeout : function(e) {
|
|
777
|
+
e();
|
|
778
|
+
};
|
|
779
|
+
const ye = function(e, r) {
|
|
780
|
+
return new Promise((t, n) => {
|
|
781
|
+
const a = {}, o = e.map((i) => new Promise((s, c) => {
|
|
782
|
+
const u = new FileReader();
|
|
783
|
+
u.onload = () => {
|
|
784
|
+
u.result ? (a[i.name] = new Uint8Array(u.result), s()) : c(new Error(`Failed to read file: ${i.name}`));
|
|
785
|
+
}, u.onerror = () => c(new Error(`Error reading file: ${i.name}`)), u.readAsArrayBuffer(i);
|
|
786
|
+
}));
|
|
787
|
+
Promise.all(o).then(() => {
|
|
788
|
+
pe(a, { level: 6 }, (s, c) => {
|
|
789
|
+
if (s) {
|
|
790
|
+
n(s);
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
const u = new Blob([c], { type: "application/zip" }), f = Jr(u, `${r}.zip`);
|
|
794
|
+
t(f);
|
|
795
|
+
});
|
|
796
|
+
}).catch(n);
|
|
2569
797
|
});
|
|
2570
|
-
},
|
|
2571
|
-
const
|
|
2572
|
-
await
|
|
798
|
+
}, Te = async function(e, r) {
|
|
799
|
+
const t = await ye(e, r);
|
|
800
|
+
await Q(t, t.name);
|
|
2573
801
|
};
|
|
2574
|
-
async function
|
|
802
|
+
async function Ne(e, r) {
|
|
2575
803
|
try {
|
|
2576
804
|
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
2577
|
-
await navigator.clipboard.writeText(
|
|
805
|
+
await navigator.clipboard.writeText(e), r?.onSuccess && r.onSuccess(e);
|
|
2578
806
|
return;
|
|
2579
807
|
}
|
|
2580
|
-
const
|
|
2581
|
-
|
|
808
|
+
const t = document.createElement("textarea");
|
|
809
|
+
t.value = e, t.style.position = "fixed", t.style.top = "0", t.style.left = "0", t.style.width = "2em", t.style.height = "2em", t.style.padding = "0", t.style.border = "none", t.style.outline = "none", t.style.boxShadow = "none", t.style.background = "transparent", t.style.opacity = "0", document.body.appendChild(t), t.focus(), t.select();
|
|
2582
810
|
try {
|
|
2583
811
|
if (document.execCommand("copy"))
|
|
2584
|
-
|
|
812
|
+
r?.onSuccess && r.onSuccess(e);
|
|
2585
813
|
else
|
|
2586
814
|
throw new Error("execCommand 复制失败");
|
|
2587
815
|
} catch {
|
|
2588
816
|
throw new Error("无法使用 execCommand 复制文本");
|
|
2589
817
|
} finally {
|
|
2590
|
-
document.body.removeChild(
|
|
818
|
+
document.body.removeChild(t);
|
|
2591
819
|
}
|
|
2592
|
-
} catch (
|
|
2593
|
-
const
|
|
2594
|
-
throw
|
|
820
|
+
} catch (t) {
|
|
821
|
+
const n = t instanceof Error ? t : new Error("未知错误");
|
|
822
|
+
throw r?.onError ? r.onError(n) : console.error("复制到剪贴板失败:", n), n;
|
|
2595
823
|
}
|
|
2596
824
|
}
|
|
2597
|
-
async function
|
|
825
|
+
async function ze() {
|
|
2598
826
|
try {
|
|
2599
827
|
if (navigator.clipboard && navigator.clipboard.readText)
|
|
2600
828
|
return await navigator.clipboard.readText();
|
|
2601
829
|
throw new Error("当前浏览器不支持读取剪贴板");
|
|
2602
|
-
} catch (
|
|
2603
|
-
throw console.error("从剪贴板读取失败:",
|
|
830
|
+
} catch (e) {
|
|
831
|
+
throw console.error("从剪贴板读取失败:", e), new Error("无法从剪贴板读取内容,请检查浏览器权限");
|
|
2604
832
|
}
|
|
2605
833
|
}
|
|
2606
|
-
function
|
|
834
|
+
function Ie(e, r, t) {
|
|
2607
835
|
const {
|
|
2608
|
-
download:
|
|
2609
|
-
encoding:
|
|
2610
|
-
} =
|
|
2611
|
-
if (
|
|
2612
|
-
|
|
836
|
+
download: n = !0,
|
|
837
|
+
encoding: a = "utf-8"
|
|
838
|
+
} = t || {}, o = new Blob([e], { type: `text/plain;charset=${a}` });
|
|
839
|
+
if (n) {
|
|
840
|
+
Q(o, r);
|
|
2613
841
|
return;
|
|
2614
842
|
}
|
|
2615
|
-
return new File([
|
|
843
|
+
return new File([o], r, { type: `text/plain;charset=${a}` });
|
|
2616
844
|
}
|
|
2617
|
-
function
|
|
2618
|
-
if (
|
|
845
|
+
function nr(e, r) {
|
|
846
|
+
if (e == null)
|
|
2619
847
|
return "";
|
|
2620
|
-
const
|
|
2621
|
-
return
|
|
2622
|
-
`) ||
|
|
848
|
+
const t = String(e);
|
|
849
|
+
return t.includes(r) || t.includes('"') || t.includes(`
|
|
850
|
+
`) || t.includes("\r") ? `"${t.replace(/"/g, '""')}"` : t;
|
|
2623
851
|
}
|
|
2624
|
-
function
|
|
852
|
+
function Re(e, r, t = {}) {
|
|
2625
853
|
const {
|
|
2626
|
-
separator:
|
|
2627
|
-
includeHeader:
|
|
2628
|
-
download:
|
|
2629
|
-
encoding:
|
|
2630
|
-
} =
|
|
2631
|
-
if (
|
|
854
|
+
separator: n = ",",
|
|
855
|
+
includeHeader: a = !0,
|
|
856
|
+
download: o = !0,
|
|
857
|
+
encoding: i = "utf-8"
|
|
858
|
+
} = t;
|
|
859
|
+
if (e.length === 0)
|
|
2632
860
|
throw new Error("数据不能为空");
|
|
2633
|
-
let
|
|
2634
|
-
if (typeof
|
|
2635
|
-
const
|
|
2636
|
-
new Set(
|
|
861
|
+
let s = "";
|
|
862
|
+
if (typeof e[0] == "object" && !Array.isArray(e[0])) {
|
|
863
|
+
const m = e, y = Array.from(
|
|
864
|
+
new Set(m.flatMap((p) => Object.keys(p)))
|
|
2637
865
|
);
|
|
2638
|
-
|
|
2639
|
-
`),
|
|
2640
|
-
const
|
|
2641
|
-
const
|
|
2642
|
-
return
|
|
866
|
+
a && (s += y.join(n) + `
|
|
867
|
+
`), m.forEach((p) => {
|
|
868
|
+
const $ = y.map((E) => {
|
|
869
|
+
const A = p[E];
|
|
870
|
+
return nr(A, n);
|
|
2643
871
|
});
|
|
2644
|
-
|
|
872
|
+
s += $.join(n) + `
|
|
2645
873
|
`;
|
|
2646
874
|
});
|
|
2647
875
|
} else {
|
|
2648
|
-
const
|
|
2649
|
-
if (
|
|
2650
|
-
const
|
|
2651
|
-
(
|
|
876
|
+
const m = e;
|
|
877
|
+
if (a && m.length > 0) {
|
|
878
|
+
const y = m[0].map(
|
|
879
|
+
(p) => nr(p, n)
|
|
2652
880
|
);
|
|
2653
|
-
|
|
881
|
+
s += y.join(n) + `
|
|
2654
882
|
`;
|
|
2655
|
-
for (let
|
|
2656
|
-
const
|
|
2657
|
-
(
|
|
883
|
+
for (let p = 1; p < m.length; p++) {
|
|
884
|
+
const $ = m[p].map(
|
|
885
|
+
(E) => nr(E, n)
|
|
2658
886
|
);
|
|
2659
|
-
|
|
887
|
+
s += $.join(n) + `
|
|
2660
888
|
`;
|
|
2661
889
|
}
|
|
2662
|
-
} else
|
|
2663
|
-
const
|
|
2664
|
-
(
|
|
890
|
+
} else a || m.forEach((y) => {
|
|
891
|
+
const p = y.map(
|
|
892
|
+
($) => nr($, n)
|
|
2665
893
|
);
|
|
2666
|
-
|
|
894
|
+
s += p.join(n) + `
|
|
2667
895
|
`;
|
|
2668
896
|
});
|
|
2669
897
|
}
|
|
2670
|
-
|
|
2671
|
-
const
|
|
2672
|
-
type: `text/csv;charset=${
|
|
898
|
+
s = s.trimEnd();
|
|
899
|
+
const u = "\uFEFF", f = new Blob([u + s], {
|
|
900
|
+
type: `text/csv;charset=${i}`
|
|
2673
901
|
});
|
|
2674
|
-
if (
|
|
2675
|
-
|
|
902
|
+
if (o) {
|
|
903
|
+
Q(f, r);
|
|
2676
904
|
return;
|
|
2677
905
|
}
|
|
2678
|
-
return new File([
|
|
906
|
+
return new File([f], r, { type: `text/csv;charset=${i}` });
|
|
2679
907
|
}
|
|
2680
|
-
function
|
|
908
|
+
function je(e, r, t = {}) {
|
|
2681
909
|
const {
|
|
2682
|
-
pretty:
|
|
2683
|
-
spaces:
|
|
2684
|
-
download:
|
|
2685
|
-
encoding:
|
|
2686
|
-
} =
|
|
910
|
+
pretty: n = !0,
|
|
911
|
+
spaces: a = 2,
|
|
912
|
+
download: o = !0,
|
|
913
|
+
encoding: i = "utf-8"
|
|
914
|
+
} = t;
|
|
2687
915
|
try {
|
|
2688
|
-
const
|
|
2689
|
-
type: `application/json;charset=${
|
|
916
|
+
const s = n ? JSON.stringify(e, null, a) : JSON.stringify(e), c = new Blob([s], {
|
|
917
|
+
type: `application/json;charset=${i}`
|
|
2690
918
|
});
|
|
2691
|
-
if (
|
|
2692
|
-
|
|
919
|
+
if (o) {
|
|
920
|
+
Q(c, r);
|
|
2693
921
|
return;
|
|
2694
922
|
}
|
|
2695
|
-
return new File([
|
|
2696
|
-
} catch (
|
|
2697
|
-
throw console.error("JSON 序列化失败:",
|
|
923
|
+
return new File([c], r, { type: `application/json;charset=${i}` });
|
|
924
|
+
} catch (s) {
|
|
925
|
+
throw console.error("JSON 序列化失败:", s), new Error("数据无法序列化为 JSON");
|
|
2698
926
|
}
|
|
2699
927
|
}
|
|
2700
|
-
function
|
|
2701
|
-
const
|
|
2702
|
-
return
|
|
928
|
+
function Xr(e) {
|
|
929
|
+
const r = typeof e == "string" ? e : e.name, t = r.lastIndexOf(".");
|
|
930
|
+
return t === -1 || t === r.length - 1 ? "" : r.slice(t + 1).toLowerCase();
|
|
2703
931
|
}
|
|
2704
|
-
function
|
|
2705
|
-
const
|
|
2706
|
-
return
|
|
932
|
+
function Le(e) {
|
|
933
|
+
const r = typeof e == "string" ? e : e.name, t = r.lastIndexOf(".");
|
|
934
|
+
return t === -1 ? r : r.slice(0, t);
|
|
2707
935
|
}
|
|
2708
|
-
function
|
|
936
|
+
function We(e) {
|
|
2709
937
|
return {
|
|
2710
|
-
name:
|
|
2711
|
-
size:
|
|
2712
|
-
type:
|
|
2713
|
-
lastModified:
|
|
938
|
+
name: e.name,
|
|
939
|
+
size: e.size,
|
|
940
|
+
type: e.type,
|
|
941
|
+
lastModified: e.lastModified
|
|
2714
942
|
};
|
|
2715
943
|
}
|
|
2716
|
-
function
|
|
2717
|
-
if (!
|
|
944
|
+
function xe(e, r) {
|
|
945
|
+
if (!e || !r || r.length === 0)
|
|
2718
946
|
return !1;
|
|
2719
|
-
const
|
|
2720
|
-
return
|
|
2721
|
-
const
|
|
2722
|
-
if (
|
|
2723
|
-
const
|
|
2724
|
-
return
|
|
947
|
+
const t = e.type.toLowerCase(), n = `.${Xr(e).toLowerCase()}`;
|
|
948
|
+
return r.some((a) => {
|
|
949
|
+
const o = a.toLowerCase();
|
|
950
|
+
if (o.endsWith("/*")) {
|
|
951
|
+
const i = o.split("/")[0];
|
|
952
|
+
return t.startsWith(`${i}/`);
|
|
2725
953
|
}
|
|
2726
|
-
return
|
|
954
|
+
return o.startsWith(".") ? n === o : t === o;
|
|
2727
955
|
});
|
|
2728
956
|
}
|
|
2729
|
-
function
|
|
2730
|
-
return
|
|
957
|
+
function Ae(e, r) {
|
|
958
|
+
return e ? e.size <= r : !1;
|
|
2731
959
|
}
|
|
2732
|
-
function
|
|
2733
|
-
if (!
|
|
960
|
+
function xr(e) {
|
|
961
|
+
if (!e)
|
|
2734
962
|
return !1;
|
|
2735
|
-
if (
|
|
963
|
+
if (e.type.startsWith("image/"))
|
|
2736
964
|
return !0;
|
|
2737
|
-
const
|
|
2738
|
-
return
|
|
965
|
+
const r = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico"], t = `.${Xr(e)}`;
|
|
966
|
+
return r.includes(t);
|
|
2739
967
|
}
|
|
2740
|
-
function
|
|
2741
|
-
return new Promise((
|
|
2742
|
-
if (!
|
|
2743
|
-
|
|
968
|
+
function be(e) {
|
|
969
|
+
return new Promise((r, t) => {
|
|
970
|
+
if (!xr(e)) {
|
|
971
|
+
t(new Error("文件不是有效的图片格式"));
|
|
2744
972
|
return;
|
|
2745
973
|
}
|
|
2746
|
-
const
|
|
2747
|
-
|
|
2748
|
-
const
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
width:
|
|
2752
|
-
height:
|
|
974
|
+
const n = new FileReader();
|
|
975
|
+
n.onload = (a) => {
|
|
976
|
+
const o = new Image();
|
|
977
|
+
o.onload = () => {
|
|
978
|
+
r({
|
|
979
|
+
width: o.width,
|
|
980
|
+
height: o.height
|
|
2753
981
|
});
|
|
2754
|
-
},
|
|
2755
|
-
|
|
2756
|
-
},
|
|
2757
|
-
},
|
|
2758
|
-
|
|
2759
|
-
},
|
|
982
|
+
}, o.onerror = () => {
|
|
983
|
+
t(new Error("图片加载失败"));
|
|
984
|
+
}, o.src = a.target?.result;
|
|
985
|
+
}, n.onerror = () => {
|
|
986
|
+
t(new Error("文件读取失败"));
|
|
987
|
+
}, n.readAsDataURL(e);
|
|
2760
988
|
});
|
|
2761
989
|
}
|
|
2762
|
-
async function
|
|
2763
|
-
const
|
|
2764
|
-
if (
|
|
2765
|
-
const
|
|
2766
|
-
|
|
990
|
+
async function He(e, r = {}) {
|
|
991
|
+
const t = [];
|
|
992
|
+
if (r.acceptTypes && r.acceptTypes.length > 0 && (xe(e, r.acceptTypes) || t.push(`不支持的文件类型。接受:${r.acceptTypes.join(", ")}`)), r.maxSize !== void 0 && !Ae(e, r.maxSize)) {
|
|
993
|
+
const n = Ee(r.maxSize);
|
|
994
|
+
t.push(`文件过大。最大允许:${n}`);
|
|
2767
995
|
}
|
|
2768
|
-
if (
|
|
996
|
+
if (r.mustBeImage && !xr(e) && t.push("文件必须是图片格式"), xr(e) && (r.minWidth !== void 0 || r.maxWidth !== void 0 || r.minHeight !== void 0 || r.maxHeight !== void 0))
|
|
2769
997
|
try {
|
|
2770
|
-
const
|
|
2771
|
-
|
|
998
|
+
const n = await be(e);
|
|
999
|
+
r.minWidth !== void 0 && n.width < r.minWidth && t.push(`图片宽度过小。最小宽度:${r.minWidth}px`), r.maxWidth !== void 0 && n.width > r.maxWidth && t.push(`图片宽度过大。最大宽度:${r.maxWidth}px`), r.minHeight !== void 0 && n.height < r.minHeight && t.push(`图片高度过小。最小高度:${r.minHeight}px`), r.maxHeight !== void 0 && n.height > r.maxHeight && t.push(`图片高度过大。最大高度:${r.maxHeight}px`);
|
|
2772
1000
|
} catch {
|
|
2773
|
-
|
|
1001
|
+
t.push("无法获取图片尺寸");
|
|
2774
1002
|
}
|
|
2775
1003
|
return {
|
|
2776
|
-
valid:
|
|
2777
|
-
errors:
|
|
1004
|
+
valid: t.length === 0,
|
|
1005
|
+
errors: t
|
|
2778
1006
|
};
|
|
2779
1007
|
}
|
|
2780
|
-
function
|
|
2781
|
-
if (
|
|
2782
|
-
const
|
|
2783
|
-
return parseFloat((
|
|
1008
|
+
function Ee(e, r = 2) {
|
|
1009
|
+
if (e === 0) return "0 B";
|
|
1010
|
+
const t = ["B", "KB", "MB", "GB", "TB"], n = 1024, a = Math.floor(Math.log(e) / Math.log(n));
|
|
1011
|
+
return parseFloat((e / Math.pow(n, a)).toFixed(r)) + " " + t[a];
|
|
2784
1012
|
}
|
|
2785
|
-
function
|
|
2786
|
-
if (
|
|
2787
|
-
return
|
|
2788
|
-
if (
|
|
2789
|
-
return new Date(
|
|
2790
|
-
if (
|
|
2791
|
-
return new RegExp(
|
|
2792
|
-
if (Array.isArray(
|
|
2793
|
-
return
|
|
2794
|
-
const
|
|
2795
|
-
for (const
|
|
2796
|
-
Object.prototype.hasOwnProperty.call(
|
|
2797
|
-
return
|
|
1013
|
+
function Wr(e) {
|
|
1014
|
+
if (e === null || typeof e != "object")
|
|
1015
|
+
return e;
|
|
1016
|
+
if (e instanceof Date)
|
|
1017
|
+
return new Date(e.getTime());
|
|
1018
|
+
if (e instanceof RegExp)
|
|
1019
|
+
return new RegExp(e.source, e.flags);
|
|
1020
|
+
if (Array.isArray(e))
|
|
1021
|
+
return e.map((t) => Wr(t));
|
|
1022
|
+
const r = {};
|
|
1023
|
+
for (const t in e)
|
|
1024
|
+
Object.prototype.hasOwnProperty.call(e, t) && (r[t] = Wr(e[t]));
|
|
1025
|
+
return r;
|
|
2798
1026
|
}
|
|
2799
|
-
const
|
|
2800
|
-
return Number(
|
|
1027
|
+
const Je = function(e, r = 2) {
|
|
1028
|
+
return Number(e.toFixed(r));
|
|
2801
1029
|
};
|
|
2802
|
-
function
|
|
2803
|
-
const
|
|
2804
|
-
return new URL(
|
|
2805
|
-
|
|
2806
|
-
}), x;
|
|
2807
|
-
}
|
|
2808
|
-
function Nt(E, x) {
|
|
2809
|
-
const r = x || new FormData();
|
|
2810
|
-
return Object.keys(E).forEach((b) => {
|
|
2811
|
-
const u = E[b];
|
|
2812
|
-
u instanceof File ? r.append(b, u) : Array.isArray(u) ? u.forEach((n, a) => {
|
|
2813
|
-
typeof n == "object" && n !== null ? Nt({ [`${b}[${a}]`]: n }, r) : r.append(`${b}[${a}]`, n);
|
|
2814
|
-
}) : typeof u == "object" && u !== null && !(u instanceof Blob) ? Nt(u, r) : r.append(b, u);
|
|
1030
|
+
function _e(e = location.href) {
|
|
1031
|
+
const r = {};
|
|
1032
|
+
return new URL(e).searchParams.forEach((n, a) => {
|
|
1033
|
+
r[a] = n;
|
|
2815
1034
|
}), r;
|
|
2816
1035
|
}
|
|
2817
|
-
function
|
|
2818
|
-
const
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
1036
|
+
function Hr(e, r) {
|
|
1037
|
+
const t = r || new FormData();
|
|
1038
|
+
return Object.keys(e).forEach((n) => {
|
|
1039
|
+
const a = e[n];
|
|
1040
|
+
a instanceof File ? t.append(n, a) : Array.isArray(a) ? a.forEach((o, i) => {
|
|
1041
|
+
typeof o == "object" && o !== null ? Hr({ [`${n}[${i}]`]: o }, t) : t.append(`${n}[${i}]`, o);
|
|
1042
|
+
}) : typeof a == "object" && a !== null && !(a instanceof Blob) ? Hr(a, t) : t.append(n, a);
|
|
1043
|
+
}), t;
|
|
1044
|
+
}
|
|
1045
|
+
function Ze(e, r, t = !1) {
|
|
1046
|
+
const n = {}, a = new Set(r);
|
|
1047
|
+
if (t)
|
|
1048
|
+
for (const o of r)
|
|
1049
|
+
o in e && (n[o] = e[o]);
|
|
2822
1050
|
else
|
|
2823
|
-
for (const
|
|
2824
|
-
Object.prototype.hasOwnProperty.call(
|
|
2825
|
-
return
|
|
1051
|
+
for (const o in e)
|
|
1052
|
+
Object.prototype.hasOwnProperty.call(e, o) && !a.has(o) && (n[o] = e[o]);
|
|
1053
|
+
return n;
|
|
2826
1054
|
}
|
|
2827
|
-
function
|
|
2828
|
-
const
|
|
2829
|
-
const
|
|
2830
|
-
return (
|
|
1055
|
+
function qe(e = !1) {
|
|
1056
|
+
const r = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
|
|
1057
|
+
const n = Math.random() * 16 | 0;
|
|
1058
|
+
return (t === "x" ? n : n & 3 | 8).toString(16);
|
|
2831
1059
|
});
|
|
2832
|
-
return
|
|
1060
|
+
return e ? r.replace(/-/g, "") : r;
|
|
2833
1061
|
}
|
|
2834
|
-
function
|
|
1062
|
+
function Ve(e) {
|
|
2835
1063
|
return Object.fromEntries(
|
|
2836
|
-
Object.entries(
|
|
2837
|
-
([
|
|
1064
|
+
Object.entries(e).filter(
|
|
1065
|
+
([r, t]) => t !== "" && t !== null && t !== void 0
|
|
2838
1066
|
)
|
|
2839
1067
|
);
|
|
2840
1068
|
}
|
|
2841
|
-
function
|
|
2842
|
-
return
|
|
1069
|
+
function Ge(e) {
|
|
1070
|
+
return e.reduce((r, t) => r + t, 0);
|
|
2843
1071
|
}
|
|
2844
|
-
function
|
|
2845
|
-
if (isNaN(
|
|
2846
|
-
const
|
|
2847
|
-
return
|
|
1072
|
+
function Ye(e, r = 2) {
|
|
1073
|
+
if (isNaN(e)) return "0";
|
|
1074
|
+
const n = e.toFixed(r).split(".");
|
|
1075
|
+
return n[0] = n[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), n.join(".");
|
|
2848
1076
|
}
|
|
2849
|
-
function
|
|
2850
|
-
if (!
|
|
2851
|
-
const
|
|
2852
|
-
if (
|
|
2853
|
-
return
|
|
2854
|
-
const
|
|
2855
|
-
return
|
|
1077
|
+
function Fe(e, r = 3, t = 4, n = "*") {
|
|
1078
|
+
if (!e || typeof e != "string") return "";
|
|
1079
|
+
const a = e.length;
|
|
1080
|
+
if (a <= r + t)
|
|
1081
|
+
return n.repeat(a);
|
|
1082
|
+
const o = e.substring(0, r), i = e.substring(a - t), s = a - r - t;
|
|
1083
|
+
return o + n.repeat(s) + i;
|
|
2856
1084
|
}
|
|
2857
|
-
function
|
|
2858
|
-
return !
|
|
1085
|
+
function ke(e, r = "*") {
|
|
1086
|
+
return !e || e.length < 7 ? e : Fe(e, 3, 4, r);
|
|
2859
1087
|
}
|
|
2860
|
-
function
|
|
2861
|
-
return
|
|
1088
|
+
function Ke(e) {
|
|
1089
|
+
return e.map((r) => Number(r));
|
|
2862
1090
|
}
|
|
2863
|
-
function
|
|
2864
|
-
const
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
}),
|
|
2868
|
-
const
|
|
2869
|
-
return
|
|
1091
|
+
function Qe(e, r, t, n) {
|
|
1092
|
+
const a = /* @__PURE__ */ new Map();
|
|
1093
|
+
e.forEach((o, i) => {
|
|
1094
|
+
a.set(o, i);
|
|
1095
|
+
}), r.sort((o, i) => {
|
|
1096
|
+
const s = a.get(t(o)) ?? -1, c = a.get(n(i)) ?? -1;
|
|
1097
|
+
return s === c ? 0 : s > c ? 1 : -1;
|
|
2870
1098
|
});
|
|
2871
1099
|
}
|
|
2872
|
-
function
|
|
2873
|
-
const
|
|
2874
|
-
const
|
|
2875
|
-
return
|
|
2876
|
-
if (
|
|
2877
|
-
const
|
|
2878
|
-
|
|
1100
|
+
function Xe(e) {
|
|
1101
|
+
const r = (a, o) => {
|
|
1102
|
+
const i = [];
|
|
1103
|
+
return a.forEach((s) => {
|
|
1104
|
+
if (s.pid === o) {
|
|
1105
|
+
const c = r(a, s.id);
|
|
1106
|
+
c.length && (s.children = c), i.push(s);
|
|
2879
1107
|
}
|
|
2880
|
-
}),
|
|
2881
|
-
},
|
|
2882
|
-
return
|
|
2883
|
-
(
|
|
2884
|
-
).forEach((
|
|
2885
|
-
const
|
|
2886
|
-
|
|
2887
|
-
}),
|
|
1108
|
+
}), i;
|
|
1109
|
+
}, t = [];
|
|
1110
|
+
return e.filter(
|
|
1111
|
+
(a) => !e.some((o) => o.id === a.pid)
|
|
1112
|
+
).forEach((a) => {
|
|
1113
|
+
const o = r(e, a.id);
|
|
1114
|
+
o.length && (a.children = o), t.push(a);
|
|
1115
|
+
}), t;
|
|
2888
1116
|
}
|
|
2889
|
-
function
|
|
2890
|
-
const
|
|
2891
|
-
for (const
|
|
2892
|
-
const
|
|
2893
|
-
|
|
1117
|
+
function rt(e, r = !1) {
|
|
1118
|
+
const t = [], n = function(a) {
|
|
1119
|
+
for (const o of a) {
|
|
1120
|
+
const i = { ...o };
|
|
1121
|
+
r && i.children && delete i.children, t.push(i), o.children && n(o.children);
|
|
2894
1122
|
}
|
|
2895
1123
|
};
|
|
2896
|
-
return
|
|
1124
|
+
return n(e), t;
|
|
2897
1125
|
}
|
|
2898
|
-
class
|
|
1126
|
+
class et {
|
|
2899
1127
|
// 提示语映射
|
|
2900
1128
|
static messages = {
|
|
2901
1129
|
email: "请输入正确的邮箱地址",
|
|
@@ -2912,39 +1140,39 @@ class Be {
|
|
|
2912
1140
|
inputCoordinates: "坐标格式不正确或数值超出经纬度范围"
|
|
2913
1141
|
};
|
|
2914
1142
|
// --- 基础验证方法 ---
|
|
2915
|
-
static isEmail = (
|
|
2916
|
-
static isNumber = (
|
|
2917
|
-
static isPhone = (
|
|
2918
|
-
static isUrl = (
|
|
2919
|
-
static isIP = (
|
|
2920
|
-
static isNoSpace = (
|
|
2921
|
-
static isChinese = (
|
|
2922
|
-
static isPassword = (
|
|
1143
|
+
static isEmail = (r) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r);
|
|
1144
|
+
static isNumber = (r) => /^-?\d+(\.\d+)?$/.test(r);
|
|
1145
|
+
static isPhone = (r) => /^1[3-9]\d{9}$/.test(r);
|
|
1146
|
+
static isUrl = (r) => /^(https?|ftp|mapbox):\/\/[^\s/$.?#].[^\s]*$/i.test(r);
|
|
1147
|
+
static isIP = (r) => /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(r);
|
|
1148
|
+
static isNoSpace = (r) => typeof r == "string" && !/\s/.test(r);
|
|
1149
|
+
static isChinese = (r) => /[\u4e00-\u9fa5]/.test(r);
|
|
1150
|
+
static isPassword = (r) => /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[.@_])[\da-zA-Z.@_]{8,18}$/.test(r);
|
|
2923
1151
|
/**
|
|
2924
1152
|
* 验证经度
|
|
2925
1153
|
* @param lng - 经度值
|
|
2926
1154
|
* @returns boolean - 是否在 -180 到 180 之间
|
|
2927
1155
|
*/
|
|
2928
|
-
static isLongitude(
|
|
2929
|
-
const
|
|
2930
|
-
return !isNaN(
|
|
1156
|
+
static isLongitude(r) {
|
|
1157
|
+
const t = Number(r);
|
|
1158
|
+
return !isNaN(t) && t >= -180 && t <= 180;
|
|
2931
1159
|
}
|
|
2932
1160
|
/**
|
|
2933
1161
|
* 验证纬度
|
|
2934
1162
|
* @param lat - 纬度值
|
|
2935
1163
|
* @returns boolean - 是否在 -90 到 90 之间
|
|
2936
1164
|
*/
|
|
2937
|
-
static isLatitude(
|
|
2938
|
-
const
|
|
2939
|
-
return !isNaN(
|
|
1165
|
+
static isLatitude(r) {
|
|
1166
|
+
const t = Number(r);
|
|
1167
|
+
return !isNaN(t) && t >= -90 && t <= 90;
|
|
2940
1168
|
}
|
|
2941
1169
|
/**
|
|
2942
1170
|
* 检查是否为空
|
|
2943
1171
|
* @param value - 需要检查的值
|
|
2944
1172
|
* @returns boolean - 是否为空
|
|
2945
1173
|
*/
|
|
2946
|
-
static isEmpty(
|
|
2947
|
-
return
|
|
1174
|
+
static isEmpty(r) {
|
|
1175
|
+
return r == null || r === "null" || r === "undefined" ? !0 : typeof r == "string" ? r.trim() === "" : Array.isArray(r) ? r.length === 0 : typeof r == "object" ? Object.keys(r).length === 0 : !1;
|
|
2948
1176
|
}
|
|
2949
1177
|
/**
|
|
2950
1178
|
* 验证输入坐标串 (递归平铺校验)
|
|
@@ -2952,13 +1180,13 @@ class Be {
|
|
|
2952
1180
|
* @param latLngS - 坐标字符串
|
|
2953
1181
|
* @returns boolean - 坐标格式是否正确
|
|
2954
1182
|
*/
|
|
2955
|
-
static isInputCoordinates(
|
|
2956
|
-
if (this.isEmpty(
|
|
1183
|
+
static isInputCoordinates(r) {
|
|
1184
|
+
if (this.isEmpty(r)) return !1;
|
|
2957
1185
|
try {
|
|
2958
|
-
const
|
|
2959
|
-
if (!
|
|
2960
|
-
const
|
|
2961
|
-
return
|
|
1186
|
+
const t = this.generateCoordinates(r);
|
|
1187
|
+
if (!t || t.length === 0) return !1;
|
|
1188
|
+
const n = (a) => typeof a[0] == "number" ? this.isLongitude(a[0]) && this.isLatitude(a[1]) : a.every((o) => n(o));
|
|
1189
|
+
return n(t);
|
|
2962
1190
|
} catch {
|
|
2963
1191
|
return !1;
|
|
2964
1192
|
}
|
|
@@ -2968,15 +1196,15 @@ class Be {
|
|
|
2968
1196
|
* @param latLngS - 坐标字符串
|
|
2969
1197
|
* @returns any[] | null - 解析后的坐标数组
|
|
2970
1198
|
*/
|
|
2971
|
-
static generateCoordinates(
|
|
2972
|
-
if (typeof
|
|
2973
|
-
if (
|
|
2974
|
-
return
|
|
2975
|
-
if (
|
|
2976
|
-
return
|
|
2977
|
-
if (
|
|
2978
|
-
const
|
|
2979
|
-
return
|
|
1199
|
+
static generateCoordinates(r) {
|
|
1200
|
+
if (typeof r != "string") return null;
|
|
1201
|
+
if (r.includes("|"))
|
|
1202
|
+
return r.split("|").map((t) => this.generateCoordinates(t));
|
|
1203
|
+
if (r.includes(";"))
|
|
1204
|
+
return r.split(";").map((t) => this.generateCoordinates(t));
|
|
1205
|
+
if (r.includes(",")) {
|
|
1206
|
+
const t = r.split(",").map((n) => Number(n.trim()));
|
|
1207
|
+
return t.length >= 2 ? t : null;
|
|
2980
1208
|
}
|
|
2981
1209
|
return null;
|
|
2982
1210
|
}
|
|
@@ -2986,16 +1214,16 @@ class Be {
|
|
|
2986
1214
|
* @param trigger - 触发方式 'blur' | 'change'
|
|
2987
1215
|
* @returns any - Element UI 表单验证规则对象
|
|
2988
1216
|
*/
|
|
2989
|
-
static getRule(
|
|
1217
|
+
static getRule(r, t = "blur") {
|
|
2990
1218
|
return {
|
|
2991
|
-
validator: (
|
|
2992
|
-
if (this.isEmpty(
|
|
2993
|
-
const
|
|
2994
|
-
if (
|
|
2995
|
-
return
|
|
2996
|
-
|
|
1219
|
+
validator: (n, a, o) => {
|
|
1220
|
+
if (this.isEmpty(a)) return o();
|
|
1221
|
+
const i = `is${r.charAt(0).toUpperCase() + r.slice(1)}`, s = this[i];
|
|
1222
|
+
if (s && !s.call(this, a))
|
|
1223
|
+
return o(new Error(this.messages[r] || "输入格式有误"));
|
|
1224
|
+
o();
|
|
2997
1225
|
},
|
|
2998
|
-
trigger:
|
|
1226
|
+
trigger: t
|
|
2999
1227
|
};
|
|
3000
1228
|
}
|
|
3001
1229
|
/**
|
|
@@ -3004,13 +1232,13 @@ class Be {
|
|
|
3004
1232
|
* @param value - 验证值
|
|
3005
1233
|
* @returns IVerifyResult - 验证结果
|
|
3006
1234
|
*/
|
|
3007
|
-
static validate(
|
|
3008
|
-
const
|
|
3009
|
-
if (
|
|
3010
|
-
const
|
|
1235
|
+
static validate(r, t) {
|
|
1236
|
+
const n = `is${r.charAt(0).toUpperCase() + r.slice(1)}`, a = this[n];
|
|
1237
|
+
if (a) {
|
|
1238
|
+
const o = a.call(this, t);
|
|
3011
1239
|
return {
|
|
3012
|
-
valid:
|
|
3013
|
-
message:
|
|
1240
|
+
valid: o,
|
|
1241
|
+
message: o ? void 0 : this.messages[r]
|
|
3014
1242
|
};
|
|
3015
1243
|
}
|
|
3016
1244
|
return {
|
|
@@ -3020,50 +1248,50 @@ class Be {
|
|
|
3020
1248
|
}
|
|
3021
1249
|
}
|
|
3022
1250
|
export {
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
1251
|
+
et as VerifyUtils,
|
|
1252
|
+
Qe as arrayCustomSort,
|
|
1253
|
+
Ke as arrayStringFormatNumber,
|
|
1254
|
+
Ge as arraySum,
|
|
1255
|
+
ne as base64ToBlob,
|
|
1256
|
+
De as base64ToFile,
|
|
1257
|
+
Jr as blobToFile,
|
|
1258
|
+
Ae as checkFileSize,
|
|
1259
|
+
xe as checkFileType,
|
|
1260
|
+
Ne as copyToClipboard,
|
|
1261
|
+
Wr as deepClone,
|
|
1262
|
+
Ce as downloadBase64,
|
|
1263
|
+
Q as downloadBlob,
|
|
1264
|
+
ee as downloadFile,
|
|
1265
|
+
Te as downloadFileListAsZip,
|
|
1266
|
+
Se as downloadMultiple,
|
|
1267
|
+
Pe as fileChangedImageDPI,
|
|
1268
|
+
ye as fileListToZip,
|
|
1269
|
+
Be as fileToBase64,
|
|
1270
|
+
Ve as filterEmptyValue,
|
|
1271
|
+
Ye as formatAmount,
|
|
1272
|
+
Ee as formatFileSize,
|
|
1273
|
+
ke as formatPhone,
|
|
1274
|
+
Re as generateCsvFile,
|
|
1275
|
+
je as generateJsonFile,
|
|
1276
|
+
Ie as generateTxtFile,
|
|
1277
|
+
qe as generateUUID,
|
|
1278
|
+
We as getFileInfo,
|
|
1279
|
+
Le as getFileNamePrefix,
|
|
1280
|
+
Xr as getFileNameSuffix,
|
|
1281
|
+
be as getImageDimensions,
|
|
1282
|
+
Me as imageUrlToBase64,
|
|
1283
|
+
xr as isImage,
|
|
1284
|
+
rt as jsonConvertGeneralList,
|
|
1285
|
+
Xe as jsonConvertTreeList,
|
|
1286
|
+
Fe as maskString,
|
|
1287
|
+
Je as numberFixed,
|
|
1288
|
+
Hr as objectToFormData,
|
|
1289
|
+
Ze as omitKeys,
|
|
1290
|
+
_e as parseUrlParams,
|
|
1291
|
+
ze as pasteFromClipboard,
|
|
1292
|
+
$e as readCsvFile,
|
|
1293
|
+
Ar as readFile,
|
|
1294
|
+
Ue as readJsonFile,
|
|
1295
|
+
Oe as readTxtFile,
|
|
1296
|
+
He as validateFile
|
|
3069
1297
|
};
|