@jieyin/editor-sdk 1.1.124 → 1.1.125
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor-sdk.es.js +2926 -2927
- package/dist/renderWorker.js +1005 -1004
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var E0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(E0 || {});
|
|
2
|
-
function
|
|
2
|
+
function Ne(r) {
|
|
3
3
|
let l = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const
|
|
6
|
-
return l += 1,
|
|
5
|
+
const x = l;
|
|
6
|
+
return l += 1, x;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
9
|
function Ue(r, l) {
|
|
@@ -29,31 +29,31 @@ function Ue(r, l) {
|
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function je(r, l,
|
|
33
|
-
let
|
|
34
|
-
if (r.type === "Group" && F === void 0 && (!
|
|
35
|
-
const
|
|
36
|
-
(A !== void 0 || a?.id !== void 0) && (
|
|
32
|
+
function je(r, l, x, e) {
|
|
33
|
+
let d = r.name || "", v = l[d], F = v?.partId ?? (r.type === "Group" ? x.get(d) : void 0);
|
|
34
|
+
if (r.type === "Group" && F === void 0 && (!v || v.id === void 0) && r.children && r.children.length === 1) {
|
|
35
|
+
const t = r.children[0].name, a = l[t], A = a?.partId ?? x.get(t);
|
|
36
|
+
(A !== void 0 || a?.id !== void 0) && (d = t, v = a, F = A);
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const p = r.id ?? v?.id ?? e();
|
|
39
39
|
if (r.type === "Group")
|
|
40
40
|
return {
|
|
41
|
-
id:
|
|
41
|
+
id: p,
|
|
42
42
|
partId: F,
|
|
43
|
-
name:
|
|
43
|
+
name: d,
|
|
44
44
|
blendMode: r.blendMode || "normal",
|
|
45
45
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
46
46
|
type: E0.Group,
|
|
47
47
|
smartObjects: (r.children ?? []).map(
|
|
48
|
-
(
|
|
48
|
+
(t) => Ue(t, r.vectorMask)
|
|
49
49
|
),
|
|
50
50
|
opacity: r.opacity,
|
|
51
51
|
clipping: r.clipping,
|
|
52
52
|
layerOrder: r.layerOrder
|
|
53
53
|
};
|
|
54
|
-
let C =
|
|
54
|
+
let C = v?.url;
|
|
55
55
|
return !C && r.imagePath && (C = r.imagePath), {
|
|
56
|
-
id:
|
|
56
|
+
id: p,
|
|
57
57
|
name: r.name || "",
|
|
58
58
|
blendMode: r.blendMode || "normal",
|
|
59
59
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
@@ -65,18 +65,18 @@ function je(r, l, t, e) {
|
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
function Ke(r, l) {
|
|
68
|
-
const
|
|
68
|
+
const x = new Map(l.parts.map((d) => [d.name, d.id])), e = Ne(l.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
70
|
parts: l.parts,
|
|
71
|
-
models: r.map((
|
|
72
|
-
const
|
|
73
|
-
if (!C || !
|
|
74
|
-
throw new Error(`无法获取 PSD 画布尺寸: canvasWidth=${C}, canvasHeight=${
|
|
75
|
-
const a = (
|
|
71
|
+
models: r.map((d) => {
|
|
72
|
+
const v = d.layerExtrasByName ?? {}, F = d.psdJson, p = F.layerList || F.layerList || [], C = F.canvasWidth, t = F.canvasHeight;
|
|
73
|
+
if (!C || !t)
|
|
74
|
+
throw new Error(`无法获取 PSD 画布尺寸: canvasWidth=${C}, canvasHeight=${t}。请确保 jsonurl 中的 canvasWidth 和 canvasHeight 存在`);
|
|
75
|
+
const a = (u) => {
|
|
76
76
|
const c = [];
|
|
77
|
-
for (const
|
|
78
|
-
if (
|
|
79
|
-
const f = [], E = [], o = [...
|
|
77
|
+
for (const h of u)
|
|
78
|
+
if (h.type === "Group" && h.children) {
|
|
79
|
+
const f = [], E = [], o = [...h.children].sort((i, s) => {
|
|
80
80
|
const D = i.layerOrder ?? 0, g = s.layerOrder ?? 0;
|
|
81
81
|
return D - g;
|
|
82
82
|
});
|
|
@@ -87,34 +87,34 @@ function Ke(r, l) {
|
|
|
87
87
|
c.push(...i);
|
|
88
88
|
}
|
|
89
89
|
f.length > 0 && c.push({
|
|
90
|
-
...
|
|
90
|
+
...h,
|
|
91
91
|
children: f
|
|
92
92
|
});
|
|
93
93
|
} else
|
|
94
|
-
c.push(
|
|
94
|
+
c.push(h);
|
|
95
95
|
return c;
|
|
96
|
-
}, n = a(
|
|
97
|
-
(
|
|
96
|
+
}, n = a(p).map(
|
|
97
|
+
(u) => je(u, v, x, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
100
|
width: C,
|
|
101
|
-
height:
|
|
101
|
+
height: t,
|
|
102
102
|
psdPartData: n
|
|
103
103
|
};
|
|
104
104
|
})
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Ge(r) {
|
|
108
108
|
return r ? r.vectorMask && r.vectorMask.paths && Array.isArray(r.vectorMask.paths) ? { type: "bezier", paths: r.vectorMask.paths } : Array.isArray(r.vectorMask) ? { type: "simple", points: r.vectorMask } : null : null;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Xe(r) {
|
|
111
111
|
return r ? r.type === "bezier" ? {
|
|
112
112
|
type: "bezier",
|
|
113
113
|
paths: r.paths.map((l) => ({
|
|
114
114
|
open: !!l.open,
|
|
115
|
-
knots: l.knots.map((
|
|
116
|
-
linked: !!
|
|
117
|
-
points: Array.isArray(
|
|
115
|
+
knots: l.knots.map((x) => ({
|
|
116
|
+
linked: !!x.linked,
|
|
117
|
+
points: Array.isArray(x.points) ? [...x.points] : []
|
|
118
118
|
}))
|
|
119
119
|
}))
|
|
120
120
|
} : r.type === "simple" ? {
|
|
@@ -129,28 +129,28 @@ function Ge(r) {
|
|
|
129
129
|
function ur(r, l) {
|
|
130
130
|
if (l) {
|
|
131
131
|
if (r.globalCompositeOperation = "destination-in", r.beginPath(), l.type === "bezier" && Array.isArray(l.paths))
|
|
132
|
-
l.paths.forEach((
|
|
133
|
-
const e =
|
|
132
|
+
l.paths.forEach((x) => {
|
|
133
|
+
const e = x.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
|
-
const
|
|
136
|
-
r.moveTo(
|
|
137
|
-
for (let
|
|
138
|
-
const F = e[
|
|
139
|
-
let
|
|
140
|
-
if (!
|
|
141
|
-
|
|
142
|
-
else if (
|
|
135
|
+
const d = e[0];
|
|
136
|
+
r.moveTo(d.points[2], d.points[3]);
|
|
137
|
+
for (let v = 0; v < e.length; v++) {
|
|
138
|
+
const F = e[v];
|
|
139
|
+
let p = (v + 1) % e.length;
|
|
140
|
+
if (!x.open && v === e.length - 1)
|
|
141
|
+
p = 0;
|
|
142
|
+
else if (x.open && v === e.length - 1)
|
|
143
143
|
break;
|
|
144
|
-
const C = e[
|
|
145
|
-
r.bezierCurveTo(
|
|
144
|
+
const C = e[p], t = F.points[4], a = F.points[5], A = C.points[0], n = C.points[1], u = C.points[2], c = C.points[3];
|
|
145
|
+
r.bezierCurveTo(t, a, A, n, u, c);
|
|
146
146
|
}
|
|
147
|
-
|
|
147
|
+
x.open || r.closePath();
|
|
148
148
|
});
|
|
149
149
|
else if (l.type === "simple" && Array.isArray(l.points)) {
|
|
150
|
-
const
|
|
151
|
-
if (
|
|
152
|
-
r.moveTo(
|
|
153
|
-
for (let e = 1; e <
|
|
150
|
+
const x = l.points;
|
|
151
|
+
if (x.length < 3) return;
|
|
152
|
+
r.moveTo(x[0].x, x[0].y);
|
|
153
|
+
for (let e = 1; e < x.length; e++) r.lineTo(x[e].x, x[e].y);
|
|
154
154
|
r.closePath();
|
|
155
155
|
}
|
|
156
156
|
r.fillStyle = "#000", r.fill(), r.globalCompositeOperation = "source-over";
|
|
@@ -172,10 +172,10 @@ class f0 {
|
|
|
172
172
|
/**
|
|
173
173
|
* 设置存储项
|
|
174
174
|
*/
|
|
175
|
-
static setItem(l,
|
|
175
|
+
static setItem(l, x) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(l,
|
|
178
|
+
return localStorage.setItem(l, x), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
@@ -253,8 +253,8 @@ class c0 {
|
|
|
253
253
|
*/
|
|
254
254
|
static parse(l) {
|
|
255
255
|
try {
|
|
256
|
-
const
|
|
257
|
-
return new URL(l,
|
|
256
|
+
const x = sr.getOrigin();
|
|
257
|
+
return new URL(l, x);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,29 +262,29 @@ class c0 {
|
|
|
262
262
|
/**
|
|
263
263
|
* 添加查询参数
|
|
264
264
|
*/
|
|
265
|
-
static addParam(l,
|
|
266
|
-
const
|
|
267
|
-
return !
|
|
265
|
+
static addParam(l, x, e) {
|
|
266
|
+
const d = this.parse(l);
|
|
267
|
+
return !d || d.searchParams.has(x) ? l : (d.searchParams.set(x, e), this.formatUrl(l, d));
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* 移除查询参数
|
|
271
271
|
*/
|
|
272
|
-
static removeParam(l,
|
|
272
|
+
static removeParam(l, x) {
|
|
273
273
|
const e = this.parse(l);
|
|
274
|
-
return !e || !e.searchParams.has(
|
|
274
|
+
return !e || !e.searchParams.has(x) ? l : (e.searchParams.delete(x), this.formatUrl(l, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(l,
|
|
280
|
-
return this.parse(l)?.searchParams.has(
|
|
279
|
+
static hasParam(l, x) {
|
|
280
|
+
return this.parse(l)?.searchParams.has(x) ?? !1;
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* 格式化 URL(保持原始格式)
|
|
284
284
|
*/
|
|
285
|
-
static formatUrl(l,
|
|
286
|
-
const e = /^(https?:)?\/\//i.test(l),
|
|
287
|
-
return e ?
|
|
285
|
+
static formatUrl(l, x) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(l), d = l.startsWith("//");
|
|
287
|
+
return e ? x.toString() : d ? x.toString().replace(/^https?:/, "") : `${x.pathname}${x.search}${x.hash}`;
|
|
288
288
|
}
|
|
289
289
|
/**
|
|
290
290
|
* 检查是否为数据 URL
|
|
@@ -301,22 +301,22 @@ class c0 {
|
|
|
301
301
|
}
|
|
302
302
|
const J = ir;
|
|
303
303
|
(function(r, l) {
|
|
304
|
-
const
|
|
304
|
+
const x = ir, e = r();
|
|
305
305
|
for (; ; )
|
|
306
306
|
try {
|
|
307
|
-
if (parseInt(
|
|
307
|
+
if (parseInt(x(418)) / 1 + parseInt(x(412)) / 2 * (-parseInt(x(437)) / 3) + parseInt(x(423)) / 4 * (-parseInt(x(429)) / 5) + parseInt(x(433)) / 6 + parseInt(x(419)) / 7 * (parseInt(x(434)) / 8) + -parseInt(x(426)) / 9 * (parseInt(x(448)) / 10) + parseInt(x(435)) / 11 === l) break;
|
|
308
308
|
e.push(e.shift());
|
|
309
309
|
} catch {
|
|
310
310
|
e.push(e.shift());
|
|
311
311
|
}
|
|
312
|
-
})(or,
|
|
312
|
+
})(or, 554076 + 1 * 950414 + -941224);
|
|
313
313
|
const B0 = /* @__PURE__ */ (function() {
|
|
314
314
|
let r = !0;
|
|
315
|
-
return function(l,
|
|
315
|
+
return function(l, x) {
|
|
316
316
|
const e = r ? function() {
|
|
317
|
-
if (
|
|
318
|
-
const
|
|
319
|
-
return
|
|
317
|
+
if (x) {
|
|
318
|
+
const d = x.apply(l, arguments);
|
|
319
|
+
return x = null, d;
|
|
320
320
|
}
|
|
321
321
|
} : function() {
|
|
322
322
|
};
|
|
@@ -324,125 +324,126 @@ const B0 = /* @__PURE__ */ (function() {
|
|
|
324
324
|
};
|
|
325
325
|
})(), Ye = B0(void 0, function() {
|
|
326
326
|
const r = ir, l = function() {
|
|
327
|
-
const
|
|
327
|
+
const v = ir;
|
|
328
328
|
let F;
|
|
329
329
|
try {
|
|
330
|
-
F = Function(
|
|
330
|
+
F = Function("retur" + v(417) + "nction() " + ('{}.constructor("return th' + v(447) + " )") + ");")();
|
|
331
331
|
} catch {
|
|
332
332
|
F = window;
|
|
333
333
|
}
|
|
334
334
|
return F;
|
|
335
|
-
},
|
|
336
|
-
for (let
|
|
337
|
-
const F = B0.constructor
|
|
338
|
-
F
|
|
335
|
+
}, x = l(), e = x[r(430) + "le"] = x.console || {}, d = ["log", "warn", r(416), r(446), r(431) + "tion", "table", r(441)];
|
|
336
|
+
for (let v = -5594 + 5594 * 1; v < d.length; v++) {
|
|
337
|
+
const F = B0.constructor.prototype.bind(B0), p = d[v], C = e[p] || F;
|
|
338
|
+
F.__proto__ = B0[r(414)](B0), F.toString = C[r(425) + "ing"].bind(C), e[p] = F;
|
|
339
339
|
}
|
|
340
340
|
});
|
|
341
341
|
Ye();
|
|
342
|
-
const pr =
|
|
342
|
+
const pr = "file_token", Br = J(420) + "token_expire_time", Ze = (5970 + -19 * -481 + -15049) * 1e3;
|
|
343
343
|
function hr() {
|
|
344
344
|
return f0.getItem(pr);
|
|
345
345
|
}
|
|
346
346
|
function Qe(r = Ze) {
|
|
347
|
+
const l = J;
|
|
347
348
|
if (!hr()) return !0;
|
|
348
|
-
const
|
|
349
|
-
if (!
|
|
350
|
-
const
|
|
351
|
-
return Date.now() + r >
|
|
349
|
+
const e = f0[l(424) + "em"](Br);
|
|
350
|
+
if (!e) return !1;
|
|
351
|
+
const d = Number(e);
|
|
352
|
+
return Date.now() + r > d;
|
|
352
353
|
}
|
|
353
354
|
function Ve(r, l) {
|
|
354
|
-
const
|
|
355
|
-
if (f0.setItem(pr, r), typeof l == "number" && l >
|
|
355
|
+
const x = J;
|
|
356
|
+
if (f0.setItem(pr, r), typeof l == "number" && l > -8060 + 353 * -13 + 12649) {
|
|
356
357
|
const e = Date.now() + l * 1e3;
|
|
357
|
-
f0[
|
|
358
|
+
f0[x(432) + "em"](Br, String(e));
|
|
358
359
|
}
|
|
359
360
|
}
|
|
360
361
|
function Je() {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
function or() {
|
|
364
|
-
const r = ["conso", "parse", "log", "toStr", "13330SThiUb", "des", "token", "isBlo", "{}.co", "setIt", "aUrl", "ePara", "oken", "data", "/file", "file_", "to__", '"retu', "3444525NQasmP", "165428mWazSo", "info", "lengt", "36aaiswQ", "684jbpAhV", "fetch", "eItem", "hasPa", "fileT", "3YJgrqL", "efres", "oken=", "trace", "8jINMPJ", "retur", "843892DEnACL", "nctio", "inclu", "4NnMqJN", "ram", "re_ti", "159908dUBRtA", "1234981CKJXFs", "2293460UzoCfx", "FileT", "n (fu", "proto"];
|
|
365
|
-
return or = function() {
|
|
366
|
-
return r;
|
|
367
|
-
}, or();
|
|
362
|
+
const r = J;
|
|
363
|
+
f0.removeItem(pr), f0["remov" + r(444)](Br);
|
|
368
364
|
}
|
|
369
365
|
async function Pr(r) {
|
|
370
|
-
const l = J,
|
|
371
|
-
return
|
|
366
|
+
const l = J, x = await r(), e = x?.data?.data;
|
|
367
|
+
return x?.data?.code === 200 && e?.[l(420) + "token"] ? (Ve(e.file_token, e.expires_in), e.file_token) : null;
|
|
372
368
|
}
|
|
373
369
|
let rt = null;
|
|
374
370
|
function Rr() {
|
|
375
|
-
return sr
|
|
371
|
+
return sr["isBro" + J(421)]() ? rt : null;
|
|
376
372
|
}
|
|
377
373
|
async function Ee() {
|
|
378
374
|
const r = J;
|
|
379
|
-
if (!sr
|
|
375
|
+
if (!sr[r(443) + r(421)]()) return hr();
|
|
380
376
|
const l = hr();
|
|
381
377
|
if (l && !Qe()) return l;
|
|
382
378
|
try {
|
|
383
|
-
const
|
|
384
|
-
if (l &&
|
|
385
|
-
const e = await Pr(
|
|
379
|
+
const x = await Rr();
|
|
380
|
+
if (l && x?.[r(439) + "FileTokenRefresh"]) {
|
|
381
|
+
const e = await Pr(x[r(439) + r(445) + r(413) + r(415) + "h"]);
|
|
386
382
|
if (e) return e;
|
|
387
383
|
}
|
|
388
384
|
} catch {
|
|
389
385
|
}
|
|
390
386
|
try {
|
|
391
|
-
const
|
|
392
|
-
return
|
|
387
|
+
const x = Rr();
|
|
388
|
+
return x?.[r(439) + "FileToken"] ? await Pr(x.fetchFileToken) : null;
|
|
393
389
|
} catch {
|
|
394
390
|
return null;
|
|
395
391
|
}
|
|
396
392
|
}
|
|
397
393
|
function Ae(r) {
|
|
398
394
|
const l = J;
|
|
399
|
-
if (!r || c0
|
|
400
|
-
const
|
|
401
|
-
return
|
|
395
|
+
if (!r || c0.isDataUrl(r) || c0["isBlo" + l(436)](r)) return !1;
|
|
396
|
+
const x = c0.parse(r);
|
|
397
|
+
return x ? x[l(411) + "ame"].includes(l(422) + "s/") && !c0.hasParam(r, "fileToken") : r.includes("/files/") && !r[l(442) + "des"]("fileT" + l(440));
|
|
402
398
|
}
|
|
403
399
|
function Fe(r, l) {
|
|
404
|
-
|
|
405
|
-
|
|
400
|
+
return !l || !Ae(r) ? r : c0.addParam(r, "fileToken", l);
|
|
401
|
+
}
|
|
402
|
+
function or() {
|
|
403
|
+
const r = ["1749498riKXEG", "8pvDoaz", "4113978LSrvlw", "bUrl", "215274eBOHmU", "remov", "fetch", "oken=", "trace", "inclu", "isBro", "eItem", "FileT", "error", 'is")(', "10GHQudJ", "pathn", "4fDzCkh", "okenR", "bind", "efres", "info", "n (fu", "1070970jbLnYl", "742777aUCGxA", "file_", "wser", "/file", "116FYEOHG", "getIt", "toStr", "794295iTuzpm", "fileT", "oken", "180625nCitbg", "conso", "excep", "setIt"];
|
|
404
|
+
return or = function() {
|
|
405
|
+
return r;
|
|
406
|
+
}, or();
|
|
407
|
+
}
|
|
408
|
+
function ir(r, l) {
|
|
409
|
+
return r = r - (6793 + 1 * -6382), or()[r];
|
|
406
410
|
}
|
|
407
411
|
function et(r) {
|
|
408
412
|
const l = J;
|
|
409
|
-
return c0[
|
|
413
|
+
return c0[l(438) + "eParam"](r, l(427) + l(428));
|
|
410
414
|
}
|
|
411
415
|
async function tt(r) {
|
|
412
416
|
if (!Ae(r)) return r;
|
|
413
417
|
const l = await Ee();
|
|
414
418
|
return Fe(r, l);
|
|
415
419
|
}
|
|
416
|
-
function ir(r, l) {
|
|
417
|
-
return r = r - (4313 * -1 + -9088 + -6932 * -2), or()[r];
|
|
418
|
-
}
|
|
419
420
|
async function De(r, l) {
|
|
420
|
-
if (!sr
|
|
421
|
-
const
|
|
422
|
-
if (
|
|
421
|
+
if (!sr[J(443) + "wser"]()) return fetch(r, l);
|
|
422
|
+
const e = et(r), d = await tt(e), v = await fetch(d, l);
|
|
423
|
+
if (v.status !== -9696 + -1 * -10097) return v;
|
|
423
424
|
Je();
|
|
424
|
-
const
|
|
425
|
-
return fetch(
|
|
425
|
+
const F = await Ee(), p = Fe(e, F);
|
|
426
|
+
return fetch(p, l);
|
|
426
427
|
}
|
|
427
428
|
const ge = (r, l) => {
|
|
428
429
|
if (!r) return r;
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
430
|
+
const x = (l || "").replace(/\/$/, "");
|
|
431
|
+
if (x && r.startsWith(x))
|
|
431
432
|
return r;
|
|
432
433
|
if (typeof window < "u") {
|
|
433
|
-
const
|
|
434
|
-
if (
|
|
434
|
+
const d = window.location.hostname;
|
|
435
|
+
if (d === "localhost" || d === "127.0.0.1")
|
|
435
436
|
try {
|
|
436
|
-
const
|
|
437
|
-
if (
|
|
437
|
+
const v = new URL(r);
|
|
438
|
+
if (x)
|
|
438
439
|
try {
|
|
439
|
-
const F = new URL(
|
|
440
|
-
if (
|
|
440
|
+
const F = new URL(x).origin;
|
|
441
|
+
if (v.origin === F)
|
|
441
442
|
return r;
|
|
442
443
|
} catch {
|
|
443
444
|
}
|
|
444
|
-
if (
|
|
445
|
-
return
|
|
445
|
+
if (v.pathname.startsWith("/files/"))
|
|
446
|
+
return x ? `${x}${v.pathname}${v.search}${v.hash}` : `${v.pathname}${v.search}${v.hash}`;
|
|
446
447
|
} catch {
|
|
447
448
|
}
|
|
448
449
|
}
|
|
@@ -452,28 +453,28 @@ const ge = (r, l) => {
|
|
|
452
453
|
}, xt = (r, l) => {
|
|
453
454
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
454
455
|
return new OffscreenCanvas(r, l);
|
|
455
|
-
const
|
|
456
|
-
return
|
|
456
|
+
const x = document.createElement("canvas");
|
|
457
|
+
return x.width = r, x.height = l, x;
|
|
457
458
|
}, g0 = async (r, l) => {
|
|
458
459
|
if (!l || l <= 0) return r;
|
|
459
|
-
const
|
|
460
|
-
if (
|
|
461
|
-
const e = l /
|
|
462
|
-
return
|
|
460
|
+
const x = Math.max(r.width, r.height);
|
|
461
|
+
if (x <= l) return r;
|
|
462
|
+
const e = l / x, d = Math.max(1, Math.round(r.width * e)), v = Math.max(1, Math.round(r.height * e)), F = xt(d, v), p = F.getContext("2d");
|
|
463
|
+
return p ? (p.drawImage(r, 0, 0, d, v), r.close?.(), await createImageBitmap(F)) : r;
|
|
463
464
|
};
|
|
464
|
-
async function at(r, l,
|
|
465
|
+
async function at(r, l, x) {
|
|
465
466
|
if (typeof r == "string")
|
|
466
467
|
try {
|
|
467
|
-
const e = ge(r,
|
|
468
|
-
if (!
|
|
469
|
-
const F =
|
|
468
|
+
const e = ge(r, x), d = await De(e);
|
|
469
|
+
if (!d.ok) {
|
|
470
|
+
const F = d.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${d.status} ${d.statusText}): ${r}`;
|
|
470
471
|
throw new Error(F);
|
|
471
472
|
}
|
|
472
|
-
const
|
|
473
|
-
if (!
|
|
473
|
+
const v = await d.blob();
|
|
474
|
+
if (!v.type.startsWith("image/") && v.size === 0)
|
|
474
475
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
475
476
|
try {
|
|
476
|
-
const F = await createImageBitmap(
|
|
477
|
+
const F = await createImageBitmap(v);
|
|
477
478
|
return await g0(F, l);
|
|
478
479
|
} catch (F) {
|
|
479
480
|
throw new Error(`图片解码失败: URL=${r}, 错误=${F instanceof Error ? F.message : F}`);
|
|
@@ -482,8 +483,8 @@ async function at(r, l, t) {
|
|
|
482
483
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
483
484
|
}
|
|
484
485
|
if (r instanceof HTMLImageElement) {
|
|
485
|
-
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e,
|
|
486
|
-
r.onload = e, r.onerror = () =>
|
|
486
|
+
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e, d) => {
|
|
487
|
+
r.onload = e, r.onerror = () => d(new Error(`图片加载失败: src=${r.src}`)), r.complete && e(null);
|
|
487
488
|
}), r.naturalWidth === 0 || r.naturalHeight === 0)
|
|
488
489
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
489
490
|
try {
|
|
@@ -500,18 +501,18 @@ async function at(r, l, t) {
|
|
|
500
501
|
}
|
|
501
502
|
throw new Error("不支持的图片类型");
|
|
502
503
|
}
|
|
503
|
-
async function nt(r, l,
|
|
504
|
+
async function nt(r, l, x) {
|
|
504
505
|
try {
|
|
505
|
-
const e = ge(r,
|
|
506
|
-
if (!
|
|
507
|
-
const F =
|
|
506
|
+
const e = ge(r, x), d = await De(e);
|
|
507
|
+
if (!d.ok) {
|
|
508
|
+
const F = d.status === 404 ? `图片不存在 (404): ${r}` : `加载图片失败 (${d.status} ${d.statusText}): ${r}`;
|
|
508
509
|
throw new Error(F);
|
|
509
510
|
}
|
|
510
|
-
const
|
|
511
|
-
if (!
|
|
511
|
+
const v = await d.blob();
|
|
512
|
+
if (!v.type.startsWith("image/") && v.size === 0)
|
|
512
513
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
513
514
|
try {
|
|
514
|
-
const F = await createImageBitmap(
|
|
515
|
+
const F = await createImageBitmap(v);
|
|
515
516
|
return await g0(F, l);
|
|
516
517
|
} catch (F) {
|
|
517
518
|
throw new Error(`图片解码失败: URL=${r}, 错误=${F instanceof Error ? F.message : F}`);
|
|
@@ -555,68 +556,68 @@ function ot(r) {
|
|
|
555
556
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
556
557
|
var l = r.default;
|
|
557
558
|
if (typeof l == "function") {
|
|
558
|
-
var
|
|
559
|
-
var
|
|
559
|
+
var x = function e() {
|
|
560
|
+
var d = !1;
|
|
560
561
|
try {
|
|
561
|
-
|
|
562
|
+
d = this instanceof e;
|
|
562
563
|
} catch {
|
|
563
564
|
}
|
|
564
|
-
return
|
|
565
|
+
return d ? Reflect.construct(l, arguments, this.constructor) : l.apply(this, arguments);
|
|
565
566
|
};
|
|
566
|
-
|
|
567
|
-
} else
|
|
568
|
-
return Object.defineProperty(
|
|
569
|
-
var
|
|
570
|
-
Object.defineProperty(
|
|
567
|
+
x.prototype = l.prototype;
|
|
568
|
+
} else x = {};
|
|
569
|
+
return Object.defineProperty(x, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
570
|
+
var d = Object.getOwnPropertyDescriptor(r, e);
|
|
571
|
+
Object.defineProperty(x, e, d.get ? d : {
|
|
571
572
|
enumerable: !0,
|
|
572
573
|
get: function() {
|
|
573
574
|
return r[e];
|
|
574
575
|
}
|
|
575
576
|
});
|
|
576
|
-
}),
|
|
577
|
+
}), x;
|
|
577
578
|
}
|
|
578
579
|
var b0 = { exports: {} };
|
|
579
580
|
function it(r) {
|
|
580
581
|
throw new Error('Could not dynamically require "' + r + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
581
582
|
}
|
|
582
|
-
var
|
|
583
|
+
var _0 = { exports: {} }, st = {}, ct = /* @__PURE__ */ Object.freeze({
|
|
583
584
|
__proto__: null,
|
|
584
585
|
default: st
|
|
585
|
-
}), ft = /* @__PURE__ */ ot(ct), dt =
|
|
586
|
+
}), ft = /* @__PURE__ */ ot(ct), dt = _0.exports, zr;
|
|
586
587
|
function U() {
|
|
587
588
|
return zr || (zr = 1, (function(r, l) {
|
|
588
|
-
(function(
|
|
589
|
+
(function(x, e) {
|
|
589
590
|
r.exports = e();
|
|
590
591
|
})(dt, function() {
|
|
591
|
-
var
|
|
592
|
-
var
|
|
593
|
-
if (typeof window < "u" && window.crypto && (
|
|
592
|
+
var x = x || (function(e, d) {
|
|
593
|
+
var v;
|
|
594
|
+
if (typeof window < "u" && window.crypto && (v = window.crypto), typeof self < "u" && self.crypto && (v = self.crypto), typeof globalThis < "u" && globalThis.crypto && (v = globalThis.crypto), !v && typeof window < "u" && window.msCrypto && (v = window.msCrypto), !v && typeof lr < "u" && lr.crypto && (v = lr.crypto), !v && typeof it == "function")
|
|
594
595
|
try {
|
|
595
|
-
|
|
596
|
+
v = ft;
|
|
596
597
|
} catch {
|
|
597
598
|
}
|
|
598
599
|
var F = function() {
|
|
599
|
-
if (
|
|
600
|
-
if (typeof
|
|
600
|
+
if (v) {
|
|
601
|
+
if (typeof v.getRandomValues == "function")
|
|
601
602
|
try {
|
|
602
|
-
return
|
|
603
|
+
return v.getRandomValues(new Uint32Array(1))[0];
|
|
603
604
|
} catch {
|
|
604
605
|
}
|
|
605
|
-
if (typeof
|
|
606
|
+
if (typeof v.randomBytes == "function")
|
|
606
607
|
try {
|
|
607
|
-
return
|
|
608
|
+
return v.randomBytes(4).readInt32LE();
|
|
608
609
|
} catch {
|
|
609
610
|
}
|
|
610
611
|
}
|
|
611
612
|
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
612
|
-
},
|
|
613
|
+
}, p = Object.create || /* @__PURE__ */ (function() {
|
|
613
614
|
function o() {
|
|
614
615
|
}
|
|
615
616
|
return function(i) {
|
|
616
617
|
var s;
|
|
617
618
|
return o.prototype = i, s = new o(), o.prototype = null, s;
|
|
618
619
|
};
|
|
619
|
-
})(), C = {},
|
|
620
|
+
})(), C = {}, t = C.lib = {}, a = t.Base = /* @__PURE__ */ (function() {
|
|
620
621
|
return {
|
|
621
622
|
/**
|
|
622
623
|
* Creates a new object that inherits from this object.
|
|
@@ -637,7 +638,7 @@ function U() {
|
|
|
637
638
|
* });
|
|
638
639
|
*/
|
|
639
640
|
extend: function(o) {
|
|
640
|
-
var i =
|
|
641
|
+
var i = p(this);
|
|
641
642
|
return o && i.mixIn(o), (!i.hasOwnProperty("init") || this.init === i.init) && (i.init = function() {
|
|
642
643
|
i.$super.init.apply(this, arguments);
|
|
643
644
|
}), i.init.prototype = i, i.$super = this, i;
|
|
@@ -701,7 +702,7 @@ function U() {
|
|
|
701
702
|
return this.init.prototype.extend(this);
|
|
702
703
|
}
|
|
703
704
|
};
|
|
704
|
-
})(), A =
|
|
705
|
+
})(), A = t.WordArray = a.extend({
|
|
705
706
|
/**
|
|
706
707
|
* Initializes a newly created word array.
|
|
707
708
|
*
|
|
@@ -715,7 +716,7 @@ function U() {
|
|
|
715
716
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
716
717
|
*/
|
|
717
718
|
init: function(o, i) {
|
|
718
|
-
o = this.words = o || [], i !=
|
|
719
|
+
o = this.words = o || [], i != d ? this.sigBytes = i : this.sigBytes = o.length * 4;
|
|
719
720
|
},
|
|
720
721
|
/**
|
|
721
722
|
* Converts this word array to a string.
|
|
@@ -731,7 +732,7 @@ function U() {
|
|
|
731
732
|
* var string = wordArray.toString(CryptoJS.enc.Utf8);
|
|
732
733
|
*/
|
|
733
734
|
toString: function(o) {
|
|
734
|
-
return (o ||
|
|
735
|
+
return (o || u).stringify(this);
|
|
735
736
|
},
|
|
736
737
|
/**
|
|
737
738
|
* Concatenates a word array to this word array.
|
|
@@ -747,9 +748,9 @@ function U() {
|
|
|
747
748
|
concat: function(o) {
|
|
748
749
|
var i = this.words, s = o.words, D = this.sigBytes, g = o.sigBytes;
|
|
749
750
|
if (this.clamp(), D % 4)
|
|
750
|
-
for (var
|
|
751
|
-
var w = s[
|
|
752
|
-
i[D +
|
|
751
|
+
for (var m = 0; m < g; m++) {
|
|
752
|
+
var w = s[m >>> 2] >>> 24 - m % 4 * 8 & 255;
|
|
753
|
+
i[D + m >>> 2] |= w << 24 - (D + m) % 4 * 8;
|
|
753
754
|
}
|
|
754
755
|
else
|
|
755
756
|
for (var z = 0; z < g; z += 4)
|
|
@@ -798,7 +799,7 @@ function U() {
|
|
|
798
799
|
i.push(F());
|
|
799
800
|
return new A.init(i, o);
|
|
800
801
|
}
|
|
801
|
-
}), n = C.enc = {},
|
|
802
|
+
}), n = C.enc = {}, u = n.Hex = {
|
|
802
803
|
/**
|
|
803
804
|
* Converts a word array to a hex string.
|
|
804
805
|
*
|
|
@@ -814,8 +815,8 @@ function U() {
|
|
|
814
815
|
*/
|
|
815
816
|
stringify: function(o) {
|
|
816
817
|
for (var i = o.words, s = o.sigBytes, D = [], g = 0; g < s; g++) {
|
|
817
|
-
var
|
|
818
|
-
D.push((
|
|
818
|
+
var m = i[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
819
|
+
D.push((m >>> 4).toString(16)), D.push((m & 15).toString(16));
|
|
819
820
|
}
|
|
820
821
|
return D.join("");
|
|
821
822
|
},
|
|
@@ -853,8 +854,8 @@ function U() {
|
|
|
853
854
|
*/
|
|
854
855
|
stringify: function(o) {
|
|
855
856
|
for (var i = o.words, s = o.sigBytes, D = [], g = 0; g < s; g++) {
|
|
856
|
-
var
|
|
857
|
-
D.push(String.fromCharCode(
|
|
857
|
+
var m = i[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
858
|
+
D.push(String.fromCharCode(m));
|
|
858
859
|
}
|
|
859
860
|
return D.join("");
|
|
860
861
|
},
|
|
@@ -876,7 +877,7 @@ function U() {
|
|
|
876
877
|
s[D >>> 2] |= (o.charCodeAt(D) & 255) << 24 - D % 4 * 8;
|
|
877
878
|
return new A.init(s, i);
|
|
878
879
|
}
|
|
879
|
-
},
|
|
880
|
+
}, h = n.Utf8 = {
|
|
880
881
|
/**
|
|
881
882
|
* Converts a word array to a UTF-8 string.
|
|
882
883
|
*
|
|
@@ -913,7 +914,7 @@ function U() {
|
|
|
913
914
|
parse: function(o) {
|
|
914
915
|
return c.parse(unescape(encodeURIComponent(o)));
|
|
915
916
|
}
|
|
916
|
-
}, f =
|
|
917
|
+
}, f = t.BufferedBlockAlgorithm = a.extend({
|
|
917
918
|
/**
|
|
918
919
|
* Resets this block algorithm's data buffer to its initial state.
|
|
919
920
|
*
|
|
@@ -935,7 +936,7 @@ function U() {
|
|
|
935
936
|
* bufferedBlockAlgorithm._append(wordArray);
|
|
936
937
|
*/
|
|
937
938
|
_append: function(o) {
|
|
938
|
-
typeof o == "string" && (o =
|
|
939
|
+
typeof o == "string" && (o = h.parse(o)), this._data.concat(o), this._nDataBytes += o.sigBytes;
|
|
939
940
|
},
|
|
940
941
|
/**
|
|
941
942
|
* Processes available data blocks.
|
|
@@ -952,15 +953,15 @@ function U() {
|
|
|
952
953
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
953
954
|
*/
|
|
954
955
|
_process: function(o) {
|
|
955
|
-
var i, s = this._data, D = s.words, g = s.sigBytes,
|
|
956
|
+
var i, s = this._data, D = s.words, g = s.sigBytes, m = this.blockSize, w = m * 4, z = g / w;
|
|
956
957
|
o ? z = e.ceil(z) : z = e.max((z | 0) - this._minBufferSize, 0);
|
|
957
|
-
var
|
|
958
|
-
if (
|
|
959
|
-
for (var P = 0; P <
|
|
958
|
+
var B = z * m, _ = e.min(B * 4, g);
|
|
959
|
+
if (B) {
|
|
960
|
+
for (var P = 0; P < B; P += m)
|
|
960
961
|
this._doProcessBlock(D, P);
|
|
961
|
-
i = D.splice(0,
|
|
962
|
+
i = D.splice(0, B), s.sigBytes -= _;
|
|
962
963
|
}
|
|
963
|
-
return new A.init(i,
|
|
964
|
+
return new A.init(i, _);
|
|
964
965
|
},
|
|
965
966
|
/**
|
|
966
967
|
* Creates a copy of this object.
|
|
@@ -977,7 +978,7 @@ function U() {
|
|
|
977
978
|
},
|
|
978
979
|
_minBufferSize: 0
|
|
979
980
|
});
|
|
980
|
-
|
|
981
|
+
t.Hasher = f.extend({
|
|
981
982
|
/**
|
|
982
983
|
* Configuration options.
|
|
983
984
|
*/
|
|
@@ -1079,18 +1080,18 @@ function U() {
|
|
|
1079
1080
|
var E = C.algo = {};
|
|
1080
1081
|
return C;
|
|
1081
1082
|
})(Math);
|
|
1082
|
-
return
|
|
1083
|
+
return x;
|
|
1083
1084
|
});
|
|
1084
|
-
})(
|
|
1085
|
+
})(_0)), _0.exports;
|
|
1085
1086
|
}
|
|
1086
|
-
var
|
|
1087
|
+
var m0 = { exports: {} }, ut = m0.exports, Ir;
|
|
1087
1088
|
function cr() {
|
|
1088
1089
|
return Ir || (Ir = 1, (function(r, l) {
|
|
1089
|
-
(function(
|
|
1090
|
+
(function(x, e) {
|
|
1090
1091
|
r.exports = e(U());
|
|
1091
|
-
})(ut, function(
|
|
1092
|
+
})(ut, function(x) {
|
|
1092
1093
|
return (function(e) {
|
|
1093
|
-
var
|
|
1094
|
+
var d = x, v = d.lib, F = v.Base, p = v.WordArray, C = d.x64 = {};
|
|
1094
1095
|
C.Word = F.extend({
|
|
1095
1096
|
/**
|
|
1096
1097
|
* Initializes a newly created 64-bit word.
|
|
@@ -1102,8 +1103,8 @@ function cr() {
|
|
|
1102
1103
|
*
|
|
1103
1104
|
* var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
|
|
1104
1105
|
*/
|
|
1105
|
-
init: function(
|
|
1106
|
-
this.high =
|
|
1106
|
+
init: function(t, a) {
|
|
1107
|
+
this.high = t, this.low = a;
|
|
1107
1108
|
}
|
|
1108
1109
|
/**
|
|
1109
1110
|
* Bitwise NOTs this word.
|
|
@@ -1275,8 +1276,8 @@ function cr() {
|
|
|
1275
1276
|
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
|
|
1276
1277
|
* ], 10);
|
|
1277
1278
|
*/
|
|
1278
|
-
init: function(
|
|
1279
|
-
|
|
1279
|
+
init: function(t, a) {
|
|
1280
|
+
t = this.words = t || [], a != e ? this.sigBytes = a : this.sigBytes = t.length * 8;
|
|
1280
1281
|
},
|
|
1281
1282
|
/**
|
|
1282
1283
|
* Converts this 64-bit word array to a 32-bit word array.
|
|
@@ -1288,11 +1289,11 @@ function cr() {
|
|
|
1288
1289
|
* var x32WordArray = x64WordArray.toX32();
|
|
1289
1290
|
*/
|
|
1290
1291
|
toX32: function() {
|
|
1291
|
-
for (var
|
|
1292
|
-
var
|
|
1293
|
-
A.push(
|
|
1292
|
+
for (var t = this.words, a = t.length, A = [], n = 0; n < a; n++) {
|
|
1293
|
+
var u = t[n];
|
|
1294
|
+
A.push(u.high), A.push(u.low);
|
|
1294
1295
|
}
|
|
1295
|
-
return
|
|
1296
|
+
return p.create(A, this.sigBytes);
|
|
1296
1297
|
},
|
|
1297
1298
|
/**
|
|
1298
1299
|
* Creates a copy of this word array.
|
|
@@ -1304,45 +1305,45 @@ function cr() {
|
|
|
1304
1305
|
* var clone = x64WordArray.clone();
|
|
1305
1306
|
*/
|
|
1306
1307
|
clone: function() {
|
|
1307
|
-
for (var
|
|
1308
|
+
for (var t = F.clone.call(this), a = t.words = this.words.slice(0), A = a.length, n = 0; n < A; n++)
|
|
1308
1309
|
a[n] = a[n].clone();
|
|
1309
|
-
return
|
|
1310
|
+
return t;
|
|
1310
1311
|
}
|
|
1311
1312
|
});
|
|
1312
|
-
})(),
|
|
1313
|
+
})(), x;
|
|
1313
1314
|
});
|
|
1314
|
-
})(
|
|
1315
|
+
})(m0)), m0.exports;
|
|
1315
1316
|
}
|
|
1316
1317
|
var y0 = { exports: {} }, lt = y0.exports, Wr;
|
|
1317
1318
|
function ht() {
|
|
1318
1319
|
return Wr || (Wr = 1, (function(r, l) {
|
|
1319
|
-
(function(
|
|
1320
|
+
(function(x, e) {
|
|
1320
1321
|
r.exports = e(U());
|
|
1321
|
-
})(lt, function(
|
|
1322
|
+
})(lt, function(x) {
|
|
1322
1323
|
return (function() {
|
|
1323
1324
|
if (typeof ArrayBuffer == "function") {
|
|
1324
|
-
var e =
|
|
1325
|
+
var e = x, d = e.lib, v = d.WordArray, F = v.init, p = v.init = function(C) {
|
|
1325
1326
|
if (C instanceof ArrayBuffer && (C = new Uint8Array(C)), (C instanceof Int8Array || typeof Uint8ClampedArray < "u" && C instanceof Uint8ClampedArray || C instanceof Int16Array || C instanceof Uint16Array || C instanceof Int32Array || C instanceof Uint32Array || C instanceof Float32Array || C instanceof Float64Array) && (C = new Uint8Array(C.buffer, C.byteOffset, C.byteLength)), C instanceof Uint8Array) {
|
|
1326
|
-
for (var
|
|
1327
|
+
for (var t = C.byteLength, a = [], A = 0; A < t; A++)
|
|
1327
1328
|
a[A >>> 2] |= C[A] << 24 - A % 4 * 8;
|
|
1328
|
-
F.call(this, a,
|
|
1329
|
+
F.call(this, a, t);
|
|
1329
1330
|
} else
|
|
1330
1331
|
F.apply(this, arguments);
|
|
1331
1332
|
};
|
|
1332
|
-
|
|
1333
|
+
p.prototype = v;
|
|
1333
1334
|
}
|
|
1334
|
-
})(),
|
|
1335
|
+
})(), x.lib.WordArray;
|
|
1335
1336
|
});
|
|
1336
1337
|
})(y0)), y0.exports;
|
|
1337
1338
|
}
|
|
1338
1339
|
var w0 = { exports: {} }, vt = w0.exports, Or;
|
|
1339
1340
|
function pt() {
|
|
1340
1341
|
return Or || (Or = 1, (function(r, l) {
|
|
1341
|
-
(function(
|
|
1342
|
+
(function(x, e) {
|
|
1342
1343
|
r.exports = e(U());
|
|
1343
|
-
})(vt, function(
|
|
1344
|
+
})(vt, function(x) {
|
|
1344
1345
|
return (function() {
|
|
1345
|
-
var e =
|
|
1346
|
+
var e = x, d = e.lib, v = d.WordArray, F = e.enc;
|
|
1346
1347
|
F.Utf16 = F.Utf16BE = {
|
|
1347
1348
|
/**
|
|
1348
1349
|
* Converts a word array to a UTF-16 BE string.
|
|
@@ -1358,9 +1359,9 @@ function pt() {
|
|
|
1358
1359
|
* var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
|
|
1359
1360
|
*/
|
|
1360
1361
|
stringify: function(C) {
|
|
1361
|
-
for (var
|
|
1362
|
-
var
|
|
1363
|
-
A.push(String.fromCharCode(
|
|
1362
|
+
for (var t = C.words, a = C.sigBytes, A = [], n = 0; n < a; n += 2) {
|
|
1363
|
+
var u = t[n >>> 2] >>> 16 - n % 4 * 8 & 65535;
|
|
1364
|
+
A.push(String.fromCharCode(u));
|
|
1364
1365
|
}
|
|
1365
1366
|
return A.join("");
|
|
1366
1367
|
},
|
|
@@ -1378,9 +1379,9 @@ function pt() {
|
|
|
1378
1379
|
* var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
|
|
1379
1380
|
*/
|
|
1380
1381
|
parse: function(C) {
|
|
1381
|
-
for (var
|
|
1382
|
+
for (var t = C.length, a = [], A = 0; A < t; A++)
|
|
1382
1383
|
a[A >>> 1] |= C.charCodeAt(A) << 16 - A % 2 * 16;
|
|
1383
|
-
return
|
|
1384
|
+
return v.create(a, t * 2);
|
|
1384
1385
|
}
|
|
1385
1386
|
}, F.Utf16LE = {
|
|
1386
1387
|
/**
|
|
@@ -1397,9 +1398,9 @@ function pt() {
|
|
|
1397
1398
|
* var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
|
|
1398
1399
|
*/
|
|
1399
1400
|
stringify: function(C) {
|
|
1400
|
-
for (var
|
|
1401
|
-
var
|
|
1402
|
-
A.push(String.fromCharCode(
|
|
1401
|
+
for (var t = C.words, a = C.sigBytes, A = [], n = 0; n < a; n += 2) {
|
|
1402
|
+
var u = p(t[n >>> 2] >>> 16 - n % 4 * 8 & 65535);
|
|
1403
|
+
A.push(String.fromCharCode(u));
|
|
1403
1404
|
}
|
|
1404
1405
|
return A.join("");
|
|
1405
1406
|
},
|
|
@@ -1417,26 +1418,26 @@ function pt() {
|
|
|
1417
1418
|
* var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
|
|
1418
1419
|
*/
|
|
1419
1420
|
parse: function(C) {
|
|
1420
|
-
for (var
|
|
1421
|
-
a[A >>> 1] |=
|
|
1422
|
-
return
|
|
1421
|
+
for (var t = C.length, a = [], A = 0; A < t; A++)
|
|
1422
|
+
a[A >>> 1] |= p(C.charCodeAt(A) << 16 - A % 2 * 16);
|
|
1423
|
+
return v.create(a, t * 2);
|
|
1423
1424
|
}
|
|
1424
1425
|
};
|
|
1425
|
-
function
|
|
1426
|
+
function p(C) {
|
|
1426
1427
|
return C << 8 & 4278255360 | C >>> 8 & 16711935;
|
|
1427
1428
|
}
|
|
1428
|
-
})(),
|
|
1429
|
+
})(), x.enc.Utf16;
|
|
1429
1430
|
});
|
|
1430
1431
|
})(w0)), w0.exports;
|
|
1431
1432
|
}
|
|
1432
|
-
var k0 = { exports: {} }, Bt = k0.exports,
|
|
1433
|
+
var k0 = { exports: {} }, Bt = k0.exports, Lr;
|
|
1433
1434
|
function a0() {
|
|
1434
|
-
return
|
|
1435
|
-
(function(
|
|
1435
|
+
return Lr || (Lr = 1, (function(r, l) {
|
|
1436
|
+
(function(x, e) {
|
|
1436
1437
|
r.exports = e(U());
|
|
1437
|
-
})(Bt, function(
|
|
1438
|
+
})(Bt, function(x) {
|
|
1438
1439
|
return (function() {
|
|
1439
|
-
var e =
|
|
1440
|
+
var e = x, d = e.lib, v = d.WordArray, F = e.enc;
|
|
1440
1441
|
F.Base64 = {
|
|
1441
1442
|
/**
|
|
1442
1443
|
* Converts a word array to a Base64 string.
|
|
@@ -1452,10 +1453,10 @@ function a0() {
|
|
|
1452
1453
|
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
|
|
1453
1454
|
*/
|
|
1454
1455
|
stringify: function(C) {
|
|
1455
|
-
var
|
|
1456
|
+
var t = C.words, a = C.sigBytes, A = this._map;
|
|
1456
1457
|
C.clamp();
|
|
1457
|
-
for (var n = [],
|
|
1458
|
-
for (var c =
|
|
1458
|
+
for (var n = [], u = 0; u < a; u += 3)
|
|
1459
|
+
for (var c = t[u >>> 2] >>> 24 - u % 4 * 8 & 255, h = t[u + 1 >>> 2] >>> 24 - (u + 1) % 4 * 8 & 255, f = t[u + 2 >>> 2] >>> 24 - (u + 2) % 4 * 8 & 255, E = c << 16 | h << 8 | f, o = 0; o < 4 && u + o * 0.75 < a; o++)
|
|
1459
1460
|
n.push(A.charAt(E >>> 6 * (3 - o) & 63));
|
|
1460
1461
|
var i = A.charAt(64);
|
|
1461
1462
|
if (i)
|
|
@@ -1477,41 +1478,41 @@ function a0() {
|
|
|
1477
1478
|
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
|
|
1478
1479
|
*/
|
|
1479
1480
|
parse: function(C) {
|
|
1480
|
-
var
|
|
1481
|
+
var t = C.length, a = this._map, A = this._reverseMap;
|
|
1481
1482
|
if (!A) {
|
|
1482
1483
|
A = this._reverseMap = [];
|
|
1483
1484
|
for (var n = 0; n < a.length; n++)
|
|
1484
1485
|
A[a.charCodeAt(n)] = n;
|
|
1485
1486
|
}
|
|
1486
|
-
var
|
|
1487
|
-
if (
|
|
1488
|
-
var c = C.indexOf(
|
|
1489
|
-
c !== -1 && (
|
|
1487
|
+
var u = a.charAt(64);
|
|
1488
|
+
if (u) {
|
|
1489
|
+
var c = C.indexOf(u);
|
|
1490
|
+
c !== -1 && (t = c);
|
|
1490
1491
|
}
|
|
1491
|
-
return
|
|
1492
|
+
return p(C, t, A);
|
|
1492
1493
|
},
|
|
1493
1494
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
|
1494
1495
|
};
|
|
1495
|
-
function
|
|
1496
|
-
for (var A = [], n = 0,
|
|
1497
|
-
if (
|
|
1498
|
-
var c = a[C.charCodeAt(
|
|
1496
|
+
function p(C, t, a) {
|
|
1497
|
+
for (var A = [], n = 0, u = 0; u < t; u++)
|
|
1498
|
+
if (u % 4) {
|
|
1499
|
+
var c = a[C.charCodeAt(u - 1)] << u % 4 * 2, h = a[C.charCodeAt(u)] >>> 6 - u % 4 * 2, f = c | h;
|
|
1499
1500
|
A[n >>> 2] |= f << 24 - n % 4 * 8, n++;
|
|
1500
1501
|
}
|
|
1501
|
-
return
|
|
1502
|
+
return v.create(A, n);
|
|
1502
1503
|
}
|
|
1503
|
-
})(),
|
|
1504
|
+
})(), x.enc.Base64;
|
|
1504
1505
|
});
|
|
1505
1506
|
})(k0)), k0.exports;
|
|
1506
1507
|
}
|
|
1507
|
-
var S0 = { exports: {} }, Ct = S0.exports,
|
|
1508
|
+
var S0 = { exports: {} }, Ct = S0.exports, qr;
|
|
1508
1509
|
function Et() {
|
|
1509
|
-
return
|
|
1510
|
-
(function(
|
|
1510
|
+
return qr || (qr = 1, (function(r, l) {
|
|
1511
|
+
(function(x, e) {
|
|
1511
1512
|
r.exports = e(U());
|
|
1512
|
-
})(Ct, function(
|
|
1513
|
+
})(Ct, function(x) {
|
|
1513
1514
|
return (function() {
|
|
1514
|
-
var e =
|
|
1515
|
+
var e = x, d = e.lib, v = d.WordArray, F = e.enc;
|
|
1515
1516
|
F.Base64url = {
|
|
1516
1517
|
/**
|
|
1517
1518
|
* Converts a word array to a Base64url string.
|
|
@@ -1528,18 +1529,18 @@ function Et() {
|
|
|
1528
1529
|
*
|
|
1529
1530
|
* var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
|
|
1530
1531
|
*/
|
|
1531
|
-
stringify: function(C,
|
|
1532
|
-
|
|
1533
|
-
var a = C.words, A = C.sigBytes, n =
|
|
1532
|
+
stringify: function(C, t) {
|
|
1533
|
+
t === void 0 && (t = !0);
|
|
1534
|
+
var a = C.words, A = C.sigBytes, n = t ? this._safe_map : this._map;
|
|
1534
1535
|
C.clamp();
|
|
1535
|
-
for (var
|
|
1536
|
-
for (var
|
|
1537
|
-
|
|
1536
|
+
for (var u = [], c = 0; c < A; c += 3)
|
|
1537
|
+
for (var h = a[c >>> 2] >>> 24 - c % 4 * 8 & 255, f = a[c + 1 >>> 2] >>> 24 - (c + 1) % 4 * 8 & 255, E = a[c + 2 >>> 2] >>> 24 - (c + 2) % 4 * 8 & 255, o = h << 16 | f << 8 | E, i = 0; i < 4 && c + i * 0.75 < A; i++)
|
|
1538
|
+
u.push(n.charAt(o >>> 6 * (3 - i) & 63));
|
|
1538
1539
|
var s = n.charAt(64);
|
|
1539
1540
|
if (s)
|
|
1540
|
-
for (;
|
|
1541
|
-
|
|
1542
|
-
return
|
|
1541
|
+
for (; u.length % 4; )
|
|
1542
|
+
u.push(s);
|
|
1543
|
+
return u.join("");
|
|
1543
1544
|
},
|
|
1544
1545
|
/**
|
|
1545
1546
|
* Converts a Base64url string to a word array.
|
|
@@ -1556,49 +1557,49 @@ function Et() {
|
|
|
1556
1557
|
*
|
|
1557
1558
|
* var wordArray = CryptoJS.enc.Base64url.parse(base64String);
|
|
1558
1559
|
*/
|
|
1559
|
-
parse: function(C,
|
|
1560
|
-
|
|
1561
|
-
var a = C.length, A =
|
|
1560
|
+
parse: function(C, t) {
|
|
1561
|
+
t === void 0 && (t = !0);
|
|
1562
|
+
var a = C.length, A = t ? this._safe_map : this._map, n = this._reverseMap;
|
|
1562
1563
|
if (!n) {
|
|
1563
1564
|
n = this._reverseMap = [];
|
|
1564
|
-
for (var
|
|
1565
|
-
n[A.charCodeAt(
|
|
1565
|
+
for (var u = 0; u < A.length; u++)
|
|
1566
|
+
n[A.charCodeAt(u)] = u;
|
|
1566
1567
|
}
|
|
1567
1568
|
var c = A.charAt(64);
|
|
1568
1569
|
if (c) {
|
|
1569
|
-
var
|
|
1570
|
-
|
|
1570
|
+
var h = C.indexOf(c);
|
|
1571
|
+
h !== -1 && (a = h);
|
|
1571
1572
|
}
|
|
1572
|
-
return
|
|
1573
|
+
return p(C, a, n);
|
|
1573
1574
|
},
|
|
1574
1575
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
1575
1576
|
_safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
|
|
1576
1577
|
};
|
|
1577
|
-
function
|
|
1578
|
-
for (var A = [], n = 0,
|
|
1579
|
-
if (
|
|
1580
|
-
var c = a[C.charCodeAt(
|
|
1578
|
+
function p(C, t, a) {
|
|
1579
|
+
for (var A = [], n = 0, u = 0; u < t; u++)
|
|
1580
|
+
if (u % 4) {
|
|
1581
|
+
var c = a[C.charCodeAt(u - 1)] << u % 4 * 2, h = a[C.charCodeAt(u)] >>> 6 - u % 4 * 2, f = c | h;
|
|
1581
1582
|
A[n >>> 2] |= f << 24 - n % 4 * 8, n++;
|
|
1582
1583
|
}
|
|
1583
|
-
return
|
|
1584
|
+
return v.create(A, n);
|
|
1584
1585
|
}
|
|
1585
|
-
})(),
|
|
1586
|
+
})(), x.enc.Base64url;
|
|
1586
1587
|
});
|
|
1587
1588
|
})(S0)), S0.exports;
|
|
1588
1589
|
}
|
|
1589
1590
|
var H0 = { exports: {} }, At = H0.exports, Tr;
|
|
1590
1591
|
function n0() {
|
|
1591
1592
|
return Tr || (Tr = 1, (function(r, l) {
|
|
1592
|
-
(function(
|
|
1593
|
+
(function(x, e) {
|
|
1593
1594
|
r.exports = e(U());
|
|
1594
|
-
})(At, function(
|
|
1595
|
+
})(At, function(x) {
|
|
1595
1596
|
return (function(e) {
|
|
1596
|
-
var
|
|
1597
|
+
var d = x, v = d.lib, F = v.WordArray, p = v.Hasher, C = d.algo, t = [];
|
|
1597
1598
|
(function() {
|
|
1598
|
-
for (var
|
|
1599
|
-
|
|
1599
|
+
for (var h = 0; h < 64; h++)
|
|
1600
|
+
t[h] = e.abs(e.sin(h + 1)) * 4294967296 | 0;
|
|
1600
1601
|
})();
|
|
1601
|
-
var a = C.MD5 =
|
|
1602
|
+
var a = C.MD5 = p.extend({
|
|
1602
1603
|
_doReset: function() {
|
|
1603
1604
|
this._hash = new F.init([
|
|
1604
1605
|
1732584193,
|
|
@@ -1607,61 +1608,61 @@ function n0() {
|
|
|
1607
1608
|
271733878
|
|
1608
1609
|
]);
|
|
1609
1610
|
},
|
|
1610
|
-
_doProcessBlock: function(
|
|
1611
|
+
_doProcessBlock: function(h, f) {
|
|
1611
1612
|
for (var E = 0; E < 16; E++) {
|
|
1612
|
-
var o = f + E, i =
|
|
1613
|
-
|
|
1613
|
+
var o = f + E, i = h[o];
|
|
1614
|
+
h[o] = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360;
|
|
1614
1615
|
}
|
|
1615
|
-
var s = this._hash.words, D =
|
|
1616
|
-
b = A(b, k, R, S, D, 7,
|
|
1616
|
+
var s = this._hash.words, D = h[f + 0], g = h[f + 1], m = h[f + 2], w = h[f + 3], z = h[f + 4], B = h[f + 5], _ = h[f + 6], P = h[f + 7], H = h[f + 8], L = h[f + 9], q = h[f + 10], y = h[f + 11], $ = h[f + 12], W = h[f + 13], O = h[f + 14], I = h[f + 15], b = s[0], k = s[1], R = s[2], S = s[3];
|
|
1617
|
+
b = A(b, k, R, S, D, 7, t[0]), S = A(S, b, k, R, g, 12, t[1]), R = A(R, S, b, k, m, 17, t[2]), k = A(k, R, S, b, w, 22, t[3]), b = A(b, k, R, S, z, 7, t[4]), S = A(S, b, k, R, B, 12, t[5]), R = A(R, S, b, k, _, 17, t[6]), k = A(k, R, S, b, P, 22, t[7]), b = A(b, k, R, S, H, 7, t[8]), S = A(S, b, k, R, L, 12, t[9]), R = A(R, S, b, k, q, 17, t[10]), k = A(k, R, S, b, y, 22, t[11]), b = A(b, k, R, S, $, 7, t[12]), S = A(S, b, k, R, W, 12, t[13]), R = A(R, S, b, k, O, 17, t[14]), k = A(k, R, S, b, I, 22, t[15]), b = n(b, k, R, S, g, 5, t[16]), S = n(S, b, k, R, _, 9, t[17]), R = n(R, S, b, k, y, 14, t[18]), k = n(k, R, S, b, D, 20, t[19]), b = n(b, k, R, S, B, 5, t[20]), S = n(S, b, k, R, q, 9, t[21]), R = n(R, S, b, k, I, 14, t[22]), k = n(k, R, S, b, z, 20, t[23]), b = n(b, k, R, S, L, 5, t[24]), S = n(S, b, k, R, O, 9, t[25]), R = n(R, S, b, k, w, 14, t[26]), k = n(k, R, S, b, H, 20, t[27]), b = n(b, k, R, S, W, 5, t[28]), S = n(S, b, k, R, m, 9, t[29]), R = n(R, S, b, k, P, 14, t[30]), k = n(k, R, S, b, $, 20, t[31]), b = u(b, k, R, S, B, 4, t[32]), S = u(S, b, k, R, H, 11, t[33]), R = u(R, S, b, k, y, 16, t[34]), k = u(k, R, S, b, O, 23, t[35]), b = u(b, k, R, S, g, 4, t[36]), S = u(S, b, k, R, z, 11, t[37]), R = u(R, S, b, k, P, 16, t[38]), k = u(k, R, S, b, q, 23, t[39]), b = u(b, k, R, S, W, 4, t[40]), S = u(S, b, k, R, D, 11, t[41]), R = u(R, S, b, k, w, 16, t[42]), k = u(k, R, S, b, _, 23, t[43]), b = u(b, k, R, S, L, 4, t[44]), S = u(S, b, k, R, $, 11, t[45]), R = u(R, S, b, k, I, 16, t[46]), k = u(k, R, S, b, m, 23, t[47]), b = c(b, k, R, S, D, 6, t[48]), S = c(S, b, k, R, P, 10, t[49]), R = c(R, S, b, k, O, 15, t[50]), k = c(k, R, S, b, B, 21, t[51]), b = c(b, k, R, S, $, 6, t[52]), S = c(S, b, k, R, w, 10, t[53]), R = c(R, S, b, k, q, 15, t[54]), k = c(k, R, S, b, g, 21, t[55]), b = c(b, k, R, S, H, 6, t[56]), S = c(S, b, k, R, I, 10, t[57]), R = c(R, S, b, k, _, 15, t[58]), k = c(k, R, S, b, W, 21, t[59]), b = c(b, k, R, S, z, 6, t[60]), S = c(S, b, k, R, y, 10, t[61]), R = c(R, S, b, k, m, 15, t[62]), k = c(k, R, S, b, L, 21, t[63]), s[0] = s[0] + b | 0, s[1] = s[1] + k | 0, s[2] = s[2] + R | 0, s[3] = s[3] + S | 0;
|
|
1617
1618
|
},
|
|
1618
1619
|
_doFinalize: function() {
|
|
1619
|
-
var
|
|
1620
|
+
var h = this._data, f = h.words, E = this._nDataBytes * 8, o = h.sigBytes * 8;
|
|
1620
1621
|
f[o >>> 5] |= 128 << 24 - o % 32;
|
|
1621
1622
|
var i = e.floor(E / 4294967296), s = E;
|
|
1622
|
-
f[(o + 64 >>> 9 << 4) + 15] = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, f[(o + 64 >>> 9 << 4) + 14] = (s << 8 | s >>> 24) & 16711935 | (s << 24 | s >>> 8) & 4278255360,
|
|
1623
|
-
for (var D = this._hash, g = D.words,
|
|
1624
|
-
var w = g[
|
|
1625
|
-
g[
|
|
1623
|
+
f[(o + 64 >>> 9 << 4) + 15] = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, f[(o + 64 >>> 9 << 4) + 14] = (s << 8 | s >>> 24) & 16711935 | (s << 24 | s >>> 8) & 4278255360, h.sigBytes = (f.length + 1) * 4, this._process();
|
|
1624
|
+
for (var D = this._hash, g = D.words, m = 0; m < 4; m++) {
|
|
1625
|
+
var w = g[m];
|
|
1626
|
+
g[m] = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360;
|
|
1626
1627
|
}
|
|
1627
1628
|
return D;
|
|
1628
1629
|
},
|
|
1629
1630
|
clone: function() {
|
|
1630
|
-
var
|
|
1631
|
-
return
|
|
1631
|
+
var h = p.clone.call(this);
|
|
1632
|
+
return h._hash = this._hash.clone(), h;
|
|
1632
1633
|
}
|
|
1633
1634
|
});
|
|
1634
|
-
function A(
|
|
1635
|
-
var g =
|
|
1635
|
+
function A(h, f, E, o, i, s, D) {
|
|
1636
|
+
var g = h + (f & E | ~f & o) + i + D;
|
|
1636
1637
|
return (g << s | g >>> 32 - s) + f;
|
|
1637
1638
|
}
|
|
1638
|
-
function n(
|
|
1639
|
-
var g =
|
|
1639
|
+
function n(h, f, E, o, i, s, D) {
|
|
1640
|
+
var g = h + (f & o | E & ~o) + i + D;
|
|
1640
1641
|
return (g << s | g >>> 32 - s) + f;
|
|
1641
1642
|
}
|
|
1642
|
-
function
|
|
1643
|
-
var g =
|
|
1643
|
+
function u(h, f, E, o, i, s, D) {
|
|
1644
|
+
var g = h + (f ^ E ^ o) + i + D;
|
|
1644
1645
|
return (g << s | g >>> 32 - s) + f;
|
|
1645
1646
|
}
|
|
1646
|
-
function c(
|
|
1647
|
-
var g =
|
|
1647
|
+
function c(h, f, E, o, i, s, D) {
|
|
1648
|
+
var g = h + (E ^ (f | ~o)) + i + D;
|
|
1648
1649
|
return (g << s | g >>> 32 - s) + f;
|
|
1649
1650
|
}
|
|
1650
|
-
|
|
1651
|
-
})(Math),
|
|
1651
|
+
d.MD5 = p._createHelper(a), d.HmacMD5 = p._createHmacHelper(a);
|
|
1652
|
+
})(Math), x.MD5;
|
|
1652
1653
|
});
|
|
1653
1654
|
})(H0)), H0.exports;
|
|
1654
1655
|
}
|
|
1655
|
-
var P0 = { exports: {} }, Ft = P0.exports,
|
|
1656
|
+
var P0 = { exports: {} }, Ft = P0.exports, Mr;
|
|
1656
1657
|
function be() {
|
|
1657
|
-
return
|
|
1658
|
-
(function(
|
|
1658
|
+
return Mr || (Mr = 1, (function(r, l) {
|
|
1659
|
+
(function(x, e) {
|
|
1659
1660
|
r.exports = e(U());
|
|
1660
|
-
})(Ft, function(
|
|
1661
|
+
})(Ft, function(x) {
|
|
1661
1662
|
return (function() {
|
|
1662
|
-
var e =
|
|
1663
|
+
var e = x, d = e.lib, v = d.WordArray, F = d.Hasher, p = e.algo, C = [], t = p.SHA1 = F.extend({
|
|
1663
1664
|
_doReset: function() {
|
|
1664
|
-
this._hash = new
|
|
1665
|
+
this._hash = new v.init([
|
|
1665
1666
|
1732584193,
|
|
1666
1667
|
4023233417,
|
|
1667
1668
|
2562383102,
|
|
@@ -1670,42 +1671,42 @@ function be() {
|
|
|
1670
1671
|
]);
|
|
1671
1672
|
},
|
|
1672
1673
|
_doProcessBlock: function(a, A) {
|
|
1673
|
-
for (var n = this._hash.words,
|
|
1674
|
+
for (var n = this._hash.words, u = n[0], c = n[1], h = n[2], f = n[3], E = n[4], o = 0; o < 80; o++) {
|
|
1674
1675
|
if (o < 16)
|
|
1675
1676
|
C[o] = a[A + o] | 0;
|
|
1676
1677
|
else {
|
|
1677
1678
|
var i = C[o - 3] ^ C[o - 8] ^ C[o - 14] ^ C[o - 16];
|
|
1678
1679
|
C[o] = i << 1 | i >>> 31;
|
|
1679
1680
|
}
|
|
1680
|
-
var s = (
|
|
1681
|
-
o < 20 ? s += (c &
|
|
1681
|
+
var s = (u << 5 | u >>> 27) + E + C[o];
|
|
1682
|
+
o < 20 ? s += (c & h | ~c & f) + 1518500249 : o < 40 ? s += (c ^ h ^ f) + 1859775393 : o < 60 ? s += (c & h | c & f | h & f) - 1894007588 : s += (c ^ h ^ f) - 899497514, E = f, f = h, h = c << 30 | c >>> 2, c = u, u = s;
|
|
1682
1683
|
}
|
|
1683
|
-
n[0] = n[0] +
|
|
1684
|
+
n[0] = n[0] + u | 0, n[1] = n[1] + c | 0, n[2] = n[2] + h | 0, n[3] = n[3] + f | 0, n[4] = n[4] + E | 0;
|
|
1684
1685
|
},
|
|
1685
1686
|
_doFinalize: function() {
|
|
1686
|
-
var a = this._data, A = a.words, n = this._nDataBytes * 8,
|
|
1687
|
-
return A[
|
|
1687
|
+
var a = this._data, A = a.words, n = this._nDataBytes * 8, u = a.sigBytes * 8;
|
|
1688
|
+
return A[u >>> 5] |= 128 << 24 - u % 32, A[(u + 64 >>> 9 << 4) + 14] = Math.floor(n / 4294967296), A[(u + 64 >>> 9 << 4) + 15] = n, a.sigBytes = A.length * 4, this._process(), this._hash;
|
|
1688
1689
|
},
|
|
1689
1690
|
clone: function() {
|
|
1690
1691
|
var a = F.clone.call(this);
|
|
1691
1692
|
return a._hash = this._hash.clone(), a;
|
|
1692
1693
|
}
|
|
1693
1694
|
});
|
|
1694
|
-
e.SHA1 = F._createHelper(
|
|
1695
|
-
})(),
|
|
1695
|
+
e.SHA1 = F._createHelper(t), e.HmacSHA1 = F._createHmacHelper(t);
|
|
1696
|
+
})(), x.SHA1;
|
|
1696
1697
|
});
|
|
1697
1698
|
})(P0)), P0.exports;
|
|
1698
1699
|
}
|
|
1699
|
-
var R0 = { exports: {} }, Dt = R0.exports,
|
|
1700
|
+
var R0 = { exports: {} }, Dt = R0.exports, Nr;
|
|
1700
1701
|
function Cr() {
|
|
1701
|
-
return
|
|
1702
|
-
(function(
|
|
1702
|
+
return Nr || (Nr = 1, (function(r, l) {
|
|
1703
|
+
(function(x, e) {
|
|
1703
1704
|
r.exports = e(U());
|
|
1704
|
-
})(Dt, function(
|
|
1705
|
+
})(Dt, function(x) {
|
|
1705
1706
|
return (function(e) {
|
|
1706
|
-
var
|
|
1707
|
+
var d = x, v = d.lib, F = v.WordArray, p = v.Hasher, C = d.algo, t = [], a = [];
|
|
1707
1708
|
(function() {
|
|
1708
|
-
function
|
|
1709
|
+
function u(E) {
|
|
1709
1710
|
for (var o = e.sqrt(E), i = 2; i <= o; i++)
|
|
1710
1711
|
if (!(E % i))
|
|
1711
1712
|
return !1;
|
|
@@ -1714,50 +1715,50 @@ function Cr() {
|
|
|
1714
1715
|
function c(E) {
|
|
1715
1716
|
return (E - (E | 0)) * 4294967296 | 0;
|
|
1716
1717
|
}
|
|
1717
|
-
for (var
|
|
1718
|
-
|
|
1718
|
+
for (var h = 2, f = 0; f < 64; )
|
|
1719
|
+
u(h) && (f < 8 && (t[f] = c(e.pow(h, 1 / 2))), a[f] = c(e.pow(h, 1 / 3)), f++), h++;
|
|
1719
1720
|
})();
|
|
1720
|
-
var A = [], n = C.SHA256 =
|
|
1721
|
+
var A = [], n = C.SHA256 = p.extend({
|
|
1721
1722
|
_doReset: function() {
|
|
1722
|
-
this._hash = new F.init(
|
|
1723
|
+
this._hash = new F.init(t.slice(0));
|
|
1723
1724
|
},
|
|
1724
|
-
_doProcessBlock: function(
|
|
1725
|
-
for (var
|
|
1725
|
+
_doProcessBlock: function(u, c) {
|
|
1726
|
+
for (var h = this._hash.words, f = h[0], E = h[1], o = h[2], i = h[3], s = h[4], D = h[5], g = h[6], m = h[7], w = 0; w < 64; w++) {
|
|
1726
1727
|
if (w < 16)
|
|
1727
|
-
A[w] =
|
|
1728
|
+
A[w] = u[c + w] | 0;
|
|
1728
1729
|
else {
|
|
1729
|
-
var z = A[w - 15],
|
|
1730
|
-
A[w] =
|
|
1730
|
+
var z = A[w - 15], B = (z << 25 | z >>> 7) ^ (z << 14 | z >>> 18) ^ z >>> 3, _ = A[w - 2], P = (_ << 15 | _ >>> 17) ^ (_ << 13 | _ >>> 19) ^ _ >>> 10;
|
|
1731
|
+
A[w] = B + A[w - 7] + P + A[w - 16];
|
|
1731
1732
|
}
|
|
1732
|
-
var H = s & D ^ ~s & g,
|
|
1733
|
-
|
|
1733
|
+
var H = s & D ^ ~s & g, L = f & E ^ f & o ^ E & o, q = (f << 30 | f >>> 2) ^ (f << 19 | f >>> 13) ^ (f << 10 | f >>> 22), y = (s << 26 | s >>> 6) ^ (s << 21 | s >>> 11) ^ (s << 7 | s >>> 25), $ = m + y + H + a[w] + A[w], W = q + L;
|
|
1734
|
+
m = g, g = D, D = s, s = i + $ | 0, i = o, o = E, E = f, f = $ + W | 0;
|
|
1734
1735
|
}
|
|
1735
|
-
|
|
1736
|
+
h[0] = h[0] + f | 0, h[1] = h[1] + E | 0, h[2] = h[2] + o | 0, h[3] = h[3] + i | 0, h[4] = h[4] + s | 0, h[5] = h[5] + D | 0, h[6] = h[6] + g | 0, h[7] = h[7] + m | 0;
|
|
1736
1737
|
},
|
|
1737
1738
|
_doFinalize: function() {
|
|
1738
|
-
var
|
|
1739
|
-
return c[f >>> 5] |= 128 << 24 - f % 32, c[(f + 64 >>> 9 << 4) + 14] = e.floor(
|
|
1739
|
+
var u = this._data, c = u.words, h = this._nDataBytes * 8, f = u.sigBytes * 8;
|
|
1740
|
+
return c[f >>> 5] |= 128 << 24 - f % 32, c[(f + 64 >>> 9 << 4) + 14] = e.floor(h / 4294967296), c[(f + 64 >>> 9 << 4) + 15] = h, u.sigBytes = c.length * 4, this._process(), this._hash;
|
|
1740
1741
|
},
|
|
1741
1742
|
clone: function() {
|
|
1742
|
-
var
|
|
1743
|
-
return
|
|
1743
|
+
var u = p.clone.call(this);
|
|
1744
|
+
return u._hash = this._hash.clone(), u;
|
|
1744
1745
|
}
|
|
1745
1746
|
});
|
|
1746
|
-
|
|
1747
|
-
})(Math),
|
|
1747
|
+
d.SHA256 = p._createHelper(n), d.HmacSHA256 = p._createHmacHelper(n);
|
|
1748
|
+
})(Math), x.SHA256;
|
|
1748
1749
|
});
|
|
1749
1750
|
})(R0)), R0.exports;
|
|
1750
1751
|
}
|
|
1751
1752
|
var $0 = { exports: {} }, gt = $0.exports, Ur;
|
|
1752
1753
|
function bt() {
|
|
1753
1754
|
return Ur || (Ur = 1, (function(r, l) {
|
|
1754
|
-
(function(
|
|
1755
|
+
(function(x, e, d) {
|
|
1755
1756
|
r.exports = e(U(), Cr());
|
|
1756
|
-
})(gt, function(
|
|
1757
|
+
})(gt, function(x) {
|
|
1757
1758
|
return (function() {
|
|
1758
|
-
var e =
|
|
1759
|
+
var e = x, d = e.lib, v = d.WordArray, F = e.algo, p = F.SHA256, C = F.SHA224 = p.extend({
|
|
1759
1760
|
_doReset: function() {
|
|
1760
|
-
this._hash = new
|
|
1761
|
+
this._hash = new v.init([
|
|
1761
1762
|
3238371032,
|
|
1762
1763
|
914150663,
|
|
1763
1764
|
812702999,
|
|
@@ -1769,25 +1770,25 @@ function bt() {
|
|
|
1769
1770
|
]);
|
|
1770
1771
|
},
|
|
1771
1772
|
_doFinalize: function() {
|
|
1772
|
-
var
|
|
1773
|
-
return
|
|
1773
|
+
var t = p._doFinalize.call(this);
|
|
1774
|
+
return t.sigBytes -= 4, t;
|
|
1774
1775
|
}
|
|
1775
1776
|
});
|
|
1776
|
-
e.SHA224 =
|
|
1777
|
-
})(),
|
|
1777
|
+
e.SHA224 = p._createHelper(C), e.HmacSHA224 = p._createHmacHelper(C);
|
|
1778
|
+
})(), x.SHA224;
|
|
1778
1779
|
});
|
|
1779
1780
|
})($0)), $0.exports;
|
|
1780
1781
|
}
|
|
1781
|
-
var z0 = { exports: {} },
|
|
1782
|
-
function
|
|
1782
|
+
var z0 = { exports: {} }, _t = z0.exports, jr;
|
|
1783
|
+
function _e() {
|
|
1783
1784
|
return jr || (jr = 1, (function(r, l) {
|
|
1784
|
-
(function(
|
|
1785
|
+
(function(x, e, d) {
|
|
1785
1786
|
r.exports = e(U(), cr());
|
|
1786
|
-
})(
|
|
1787
|
+
})(_t, function(x) {
|
|
1787
1788
|
return (function() {
|
|
1788
|
-
var e =
|
|
1789
|
+
var e = x, d = e.lib, v = d.Hasher, F = e.x64, p = F.Word, C = F.WordArray, t = e.algo;
|
|
1789
1790
|
function a() {
|
|
1790
|
-
return
|
|
1791
|
+
return p.create.apply(p, arguments);
|
|
1791
1792
|
}
|
|
1792
1793
|
var A = [
|
|
1793
1794
|
a(1116352408, 3609767458),
|
|
@@ -1875,68 +1876,68 @@ function me() {
|
|
|
1875
1876
|
for (var c = 0; c < 80; c++)
|
|
1876
1877
|
n[c] = a();
|
|
1877
1878
|
})();
|
|
1878
|
-
var
|
|
1879
|
+
var u = t.SHA512 = v.extend({
|
|
1879
1880
|
_doReset: function() {
|
|
1880
1881
|
this._hash = new C.init([
|
|
1881
|
-
new
|
|
1882
|
-
new
|
|
1883
|
-
new
|
|
1884
|
-
new
|
|
1885
|
-
new
|
|
1886
|
-
new
|
|
1887
|
-
new
|
|
1888
|
-
new
|
|
1882
|
+
new p.init(1779033703, 4089235720),
|
|
1883
|
+
new p.init(3144134277, 2227873595),
|
|
1884
|
+
new p.init(1013904242, 4271175723),
|
|
1885
|
+
new p.init(2773480762, 1595750129),
|
|
1886
|
+
new p.init(1359893119, 2917565137),
|
|
1887
|
+
new p.init(2600822924, 725511199),
|
|
1888
|
+
new p.init(528734635, 4215389547),
|
|
1889
|
+
new p.init(1541459225, 327033209)
|
|
1889
1890
|
]);
|
|
1890
1891
|
},
|
|
1891
|
-
_doProcessBlock: function(c,
|
|
1892
|
-
for (var f = this._hash.words, E = f[0], o = f[1], i = f[2], s = f[3], D = f[4], g = f[5],
|
|
1892
|
+
_doProcessBlock: function(c, h) {
|
|
1893
|
+
for (var f = this._hash.words, E = f[0], o = f[1], i = f[2], s = f[3], D = f[4], g = f[5], m = f[6], w = f[7], z = E.high, B = E.low, _ = o.high, P = o.low, H = i.high, L = i.low, q = s.high, y = s.low, $ = D.high, W = D.low, O = g.high, I = g.low, b = m.high, k = m.low, R = w.high, S = w.low, N = z, T = B, j = _, M = P, Y = H, x0 = L, fr = q, d0 = y, Q = $, G = W, A0 = O, u0 = I, F0 = b, l0 = k, dr = R, h0 = S, V = 0; V < 80; V++) {
|
|
1893
1894
|
var Z, r0, D0 = n[V];
|
|
1894
1895
|
if (V < 16)
|
|
1895
|
-
r0 = D0.high = c[
|
|
1896
|
+
r0 = D0.high = c[h + V * 2] | 0, Z = D0.low = c[h + V * 2 + 1] | 0;
|
|
1896
1897
|
else {
|
|
1897
|
-
var Ar = n[V - 15], o0 = Ar.high, v0 = Ar.low, Se = (o0 >>> 1 | v0 << 31) ^ (o0 >>> 8 | v0 << 24) ^ o0 >>> 7, Fr = (v0 >>> 1 | o0 << 31) ^ (v0 >>> 8 | o0 << 24) ^ (v0 >>> 7 | o0 << 25), Dr = n[V - 2], i0 = Dr.high, p0 = Dr.low, He = (i0 >>> 19 | p0 << 13) ^ (i0 << 3 | p0 >>> 29) ^ i0 >>> 6, gr = (p0 >>> 19 | i0 << 13) ^ (p0 << 3 | i0 >>> 29) ^ (p0 >>> 6 | i0 << 26), br = n[V - 7], Pe = br.high, Re = br.low,
|
|
1898
|
-
Z = Fr + Re, r0 = Se + Pe + (Z >>> 0 < Fr >>> 0 ? 1 : 0), Z = Z + gr, r0 = r0 + He + (Z >>> 0 < gr >>> 0 ? 1 : 0), Z = Z +
|
|
1898
|
+
var Ar = n[V - 15], o0 = Ar.high, v0 = Ar.low, Se = (o0 >>> 1 | v0 << 31) ^ (o0 >>> 8 | v0 << 24) ^ o0 >>> 7, Fr = (v0 >>> 1 | o0 << 31) ^ (v0 >>> 8 | o0 << 24) ^ (v0 >>> 7 | o0 << 25), Dr = n[V - 2], i0 = Dr.high, p0 = Dr.low, He = (i0 >>> 19 | p0 << 13) ^ (i0 << 3 | p0 >>> 29) ^ i0 >>> 6, gr = (p0 >>> 19 | i0 << 13) ^ (p0 << 3 | i0 >>> 29) ^ (p0 >>> 6 | i0 << 26), br = n[V - 7], Pe = br.high, Re = br.low, _r = n[V - 16], $e = _r.high, mr = _r.low;
|
|
1899
|
+
Z = Fr + Re, r0 = Se + Pe + (Z >>> 0 < Fr >>> 0 ? 1 : 0), Z = Z + gr, r0 = r0 + He + (Z >>> 0 < gr >>> 0 ? 1 : 0), Z = Z + mr, r0 = r0 + $e + (Z >>> 0 < mr >>> 0 ? 1 : 0), D0.high = r0, D0.low = Z;
|
|
1899
1900
|
}
|
|
1900
|
-
var ze = Q & A0 ^ ~Q & F0, yr =
|
|
1901
|
-
dr = F0, h0 = l0, F0 = A0, l0 = u0, A0 = Q, u0 =
|
|
1901
|
+
var ze = Q & A0 ^ ~Q & F0, yr = G & u0 ^ ~G & l0, Ie = N & j ^ N & Y ^ j & Y, We = T & M ^ T & x0 ^ M & x0, Oe = (N >>> 28 | T << 4) ^ (N << 30 | T >>> 2) ^ (N << 25 | T >>> 7), wr = (T >>> 28 | N << 4) ^ (T << 30 | N >>> 2) ^ (T << 25 | N >>> 7), Le = (Q >>> 14 | G << 18) ^ (Q >>> 18 | G << 14) ^ (Q << 23 | G >>> 9), qe = (G >>> 14 | Q << 18) ^ (G >>> 18 | Q << 14) ^ (G << 23 | Q >>> 9), kr = A[V], Te = kr.high, Sr = kr.low, X = h0 + qe, e0 = dr + Le + (X >>> 0 < h0 >>> 0 ? 1 : 0), X = X + yr, e0 = e0 + ze + (X >>> 0 < yr >>> 0 ? 1 : 0), X = X + Sr, e0 = e0 + Te + (X >>> 0 < Sr >>> 0 ? 1 : 0), X = X + Z, e0 = e0 + r0 + (X >>> 0 < Z >>> 0 ? 1 : 0), Hr = wr + We, Me = Oe + Ie + (Hr >>> 0 < wr >>> 0 ? 1 : 0);
|
|
1902
|
+
dr = F0, h0 = l0, F0 = A0, l0 = u0, A0 = Q, u0 = G, G = d0 + X | 0, Q = fr + e0 + (G >>> 0 < d0 >>> 0 ? 1 : 0) | 0, fr = Y, d0 = x0, Y = j, x0 = M, j = N, M = T, T = X + Hr | 0, N = e0 + Me + (T >>> 0 < X >>> 0 ? 1 : 0) | 0;
|
|
1902
1903
|
}
|
|
1903
|
-
|
|
1904
|
+
B = E.low = B + T, E.high = z + N + (B >>> 0 < T >>> 0 ? 1 : 0), P = o.low = P + M, o.high = _ + j + (P >>> 0 < M >>> 0 ? 1 : 0), L = i.low = L + x0, i.high = H + Y + (L >>> 0 < x0 >>> 0 ? 1 : 0), y = s.low = y + d0, s.high = q + fr + (y >>> 0 < d0 >>> 0 ? 1 : 0), W = D.low = W + G, D.high = $ + Q + (W >>> 0 < G >>> 0 ? 1 : 0), I = g.low = I + u0, g.high = O + A0 + (I >>> 0 < u0 >>> 0 ? 1 : 0), k = m.low = k + l0, m.high = b + F0 + (k >>> 0 < l0 >>> 0 ? 1 : 0), S = w.low = S + h0, w.high = R + dr + (S >>> 0 < h0 >>> 0 ? 1 : 0);
|
|
1904
1905
|
},
|
|
1905
1906
|
_doFinalize: function() {
|
|
1906
|
-
var c = this._data,
|
|
1907
|
-
|
|
1907
|
+
var c = this._data, h = c.words, f = this._nDataBytes * 8, E = c.sigBytes * 8;
|
|
1908
|
+
h[E >>> 5] |= 128 << 24 - E % 32, h[(E + 128 >>> 10 << 5) + 30] = Math.floor(f / 4294967296), h[(E + 128 >>> 10 << 5) + 31] = f, c.sigBytes = h.length * 4, this._process();
|
|
1908
1909
|
var o = this._hash.toX32();
|
|
1909
1910
|
return o;
|
|
1910
1911
|
},
|
|
1911
1912
|
clone: function() {
|
|
1912
|
-
var c =
|
|
1913
|
+
var c = v.clone.call(this);
|
|
1913
1914
|
return c._hash = this._hash.clone(), c;
|
|
1914
1915
|
},
|
|
1915
1916
|
blockSize: 1024 / 32
|
|
1916
1917
|
});
|
|
1917
|
-
e.SHA512 =
|
|
1918
|
-
})(),
|
|
1918
|
+
e.SHA512 = v._createHelper(u), e.HmacSHA512 = v._createHmacHelper(u);
|
|
1919
|
+
})(), x.SHA512;
|
|
1919
1920
|
});
|
|
1920
1921
|
})(z0)), z0.exports;
|
|
1921
1922
|
}
|
|
1922
|
-
var I0 = { exports: {} },
|
|
1923
|
+
var I0 = { exports: {} }, mt = I0.exports, Kr;
|
|
1923
1924
|
function yt() {
|
|
1924
1925
|
return Kr || (Kr = 1, (function(r, l) {
|
|
1925
|
-
(function(
|
|
1926
|
-
r.exports = e(U(), cr(),
|
|
1927
|
-
})(
|
|
1926
|
+
(function(x, e, d) {
|
|
1927
|
+
r.exports = e(U(), cr(), _e());
|
|
1928
|
+
})(mt, function(x) {
|
|
1928
1929
|
return (function() {
|
|
1929
|
-
var e =
|
|
1930
|
+
var e = x, d = e.x64, v = d.Word, F = d.WordArray, p = e.algo, C = p.SHA512, t = p.SHA384 = C.extend({
|
|
1930
1931
|
_doReset: function() {
|
|
1931
1932
|
this._hash = new F.init([
|
|
1932
|
-
new
|
|
1933
|
-
new
|
|
1934
|
-
new
|
|
1935
|
-
new
|
|
1936
|
-
new
|
|
1937
|
-
new
|
|
1938
|
-
new
|
|
1939
|
-
new
|
|
1933
|
+
new v.init(3418070365, 3238371032),
|
|
1934
|
+
new v.init(1654270250, 914150663),
|
|
1935
|
+
new v.init(2438529370, 812702999),
|
|
1936
|
+
new v.init(355462360, 4144912697),
|
|
1937
|
+
new v.init(1731405415, 4290775857),
|
|
1938
|
+
new v.init(2394180231, 1750603025),
|
|
1939
|
+
new v.init(3675008525, 1694076839),
|
|
1940
|
+
new v.init(1203062813, 3204075428)
|
|
1940
1941
|
]);
|
|
1941
1942
|
},
|
|
1942
1943
|
_doFinalize: function() {
|
|
@@ -1944,19 +1945,19 @@ function yt() {
|
|
|
1944
1945
|
return a.sigBytes -= 16, a;
|
|
1945
1946
|
}
|
|
1946
1947
|
});
|
|
1947
|
-
e.SHA384 = C._createHelper(
|
|
1948
|
-
})(),
|
|
1948
|
+
e.SHA384 = C._createHelper(t), e.HmacSHA384 = C._createHmacHelper(t);
|
|
1949
|
+
})(), x.SHA384;
|
|
1949
1950
|
});
|
|
1950
1951
|
})(I0)), I0.exports;
|
|
1951
1952
|
}
|
|
1952
|
-
var W0 = { exports: {} }, wt = W0.exports,
|
|
1953
|
+
var W0 = { exports: {} }, wt = W0.exports, Gr;
|
|
1953
1954
|
function kt() {
|
|
1954
|
-
return
|
|
1955
|
-
(function(
|
|
1955
|
+
return Gr || (Gr = 1, (function(r, l) {
|
|
1956
|
+
(function(x, e, d) {
|
|
1956
1957
|
r.exports = e(U(), cr());
|
|
1957
|
-
})(wt, function(
|
|
1958
|
+
})(wt, function(x) {
|
|
1958
1959
|
return (function(e) {
|
|
1959
|
-
var
|
|
1960
|
+
var d = x, v = d.lib, F = v.WordArray, p = v.Hasher, C = d.x64, t = C.Word, a = d.algo, A = [], n = [], u = [];
|
|
1960
1961
|
(function() {
|
|
1961
1962
|
for (var f = 1, E = 0, o = 0; o < 24; o++) {
|
|
1962
1963
|
A[f + 5 * E] = (o + 1) * (o + 2) / 2 % 64;
|
|
@@ -1967,22 +1968,22 @@ function kt() {
|
|
|
1967
1968
|
for (var E = 0; E < 5; E++)
|
|
1968
1969
|
n[f + 5 * E] = E + (2 * f + 3 * E) % 5 * 5;
|
|
1969
1970
|
for (var D = 1, g = 0; g < 24; g++) {
|
|
1970
|
-
for (var
|
|
1971
|
+
for (var m = 0, w = 0, z = 0; z < 7; z++) {
|
|
1971
1972
|
if (D & 1) {
|
|
1972
|
-
var
|
|
1973
|
-
|
|
1973
|
+
var B = (1 << z) - 1;
|
|
1974
|
+
B < 32 ? w ^= 1 << B : m ^= 1 << B - 32;
|
|
1974
1975
|
}
|
|
1975
1976
|
D & 128 ? D = D << 1 ^ 113 : D <<= 1;
|
|
1976
1977
|
}
|
|
1977
|
-
|
|
1978
|
+
u[g] = t.create(m, w);
|
|
1978
1979
|
}
|
|
1979
1980
|
})();
|
|
1980
1981
|
var c = [];
|
|
1981
1982
|
(function() {
|
|
1982
1983
|
for (var f = 0; f < 25; f++)
|
|
1983
|
-
c[f] =
|
|
1984
|
+
c[f] = t.create();
|
|
1984
1985
|
})();
|
|
1985
|
-
var
|
|
1986
|
+
var h = a.SHA3 = p.extend({
|
|
1986
1987
|
/**
|
|
1987
1988
|
* Configuration options.
|
|
1988
1989
|
*
|
|
@@ -1991,50 +1992,50 @@ function kt() {
|
|
|
1991
1992
|
* Only values permitted are: 224, 256, 384, 512.
|
|
1992
1993
|
* Default: 512
|
|
1993
1994
|
*/
|
|
1994
|
-
cfg:
|
|
1995
|
+
cfg: p.cfg.extend({
|
|
1995
1996
|
outputLength: 512
|
|
1996
1997
|
}),
|
|
1997
1998
|
_doReset: function() {
|
|
1998
1999
|
for (var f = this._state = [], E = 0; E < 25; E++)
|
|
1999
|
-
f[E] = new
|
|
2000
|
+
f[E] = new t.init();
|
|
2000
2001
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
2001
2002
|
},
|
|
2002
2003
|
_doProcessBlock: function(f, E) {
|
|
2003
2004
|
for (var o = this._state, i = this.blockSize / 2, s = 0; s < i; s++) {
|
|
2004
2005
|
var D = f[E + 2 * s], g = f[E + 2 * s + 1];
|
|
2005
2006
|
D = (D << 8 | D >>> 24) & 16711935 | (D << 24 | D >>> 8) & 4278255360, g = (g << 8 | g >>> 24) & 16711935 | (g << 24 | g >>> 8) & 4278255360;
|
|
2006
|
-
var
|
|
2007
|
-
|
|
2007
|
+
var m = o[s];
|
|
2008
|
+
m.high ^= g, m.low ^= D;
|
|
2008
2009
|
}
|
|
2009
2010
|
for (var w = 0; w < 24; w++) {
|
|
2010
2011
|
for (var z = 0; z < 5; z++) {
|
|
2011
|
-
for (var
|
|
2012
|
-
var
|
|
2013
|
-
|
|
2012
|
+
for (var B = 0, _ = 0, P = 0; P < 5; P++) {
|
|
2013
|
+
var m = o[z + 5 * P];
|
|
2014
|
+
B ^= m.high, _ ^= m.low;
|
|
2014
2015
|
}
|
|
2015
2016
|
var H = c[z];
|
|
2016
|
-
H.high =
|
|
2017
|
+
H.high = B, H.low = _;
|
|
2017
2018
|
}
|
|
2018
2019
|
for (var z = 0; z < 5; z++)
|
|
2019
|
-
for (var
|
|
2020
|
-
var
|
|
2021
|
-
|
|
2020
|
+
for (var L = c[(z + 4) % 5], q = c[(z + 1) % 5], y = q.high, $ = q.low, B = L.high ^ (y << 1 | $ >>> 31), _ = L.low ^ ($ << 1 | y >>> 31), P = 0; P < 5; P++) {
|
|
2021
|
+
var m = o[z + 5 * P];
|
|
2022
|
+
m.high ^= B, m.low ^= _;
|
|
2022
2023
|
}
|
|
2023
2024
|
for (var W = 1; W < 25; W++) {
|
|
2024
|
-
var
|
|
2025
|
-
b < 32 ? (
|
|
2025
|
+
var B, _, m = o[W], O = m.high, I = m.low, b = A[W];
|
|
2026
|
+
b < 32 ? (B = O << b | I >>> 32 - b, _ = I << b | O >>> 32 - b) : (B = I << b - 32 | O >>> 64 - b, _ = O << b - 32 | I >>> 64 - b);
|
|
2026
2027
|
var k = c[n[W]];
|
|
2027
|
-
k.high =
|
|
2028
|
+
k.high = B, k.low = _;
|
|
2028
2029
|
}
|
|
2029
2030
|
var R = c[0], S = o[0];
|
|
2030
2031
|
R.high = S.high, R.low = S.low;
|
|
2031
2032
|
for (var z = 0; z < 5; z++)
|
|
2032
2033
|
for (var P = 0; P < 5; P++) {
|
|
2033
|
-
var W = z + 5 * P,
|
|
2034
|
-
|
|
2034
|
+
var W = z + 5 * P, m = o[W], N = c[W], T = c[(z + 1) % 5 + 5 * P], j = c[(z + 2) % 5 + 5 * P];
|
|
2035
|
+
m.high = N.high ^ ~T.high & j.high, m.low = N.low ^ ~T.low & j.low;
|
|
2035
2036
|
}
|
|
2036
|
-
var
|
|
2037
|
-
|
|
2037
|
+
var m = o[0], M = u[w];
|
|
2038
|
+
m.high ^= M.high, m.low ^= M.low;
|
|
2038
2039
|
}
|
|
2039
2040
|
},
|
|
2040
2041
|
_doFinalize: function() {
|
|
@@ -2042,31 +2043,31 @@ function kt() {
|
|
|
2042
2043
|
this._nDataBytes * 8;
|
|
2043
2044
|
var o = f.sigBytes * 8, i = this.blockSize * 32;
|
|
2044
2045
|
E[o >>> 5] |= 1 << 24 - o % 32, E[(e.ceil((o + 1) / i) * i >>> 5) - 1] |= 128, f.sigBytes = E.length * 4, this._process();
|
|
2045
|
-
for (var s = this._state, D = this.cfg.outputLength / 8, g = D / 8,
|
|
2046
|
-
var z = s[w],
|
|
2047
|
-
|
|
2046
|
+
for (var s = this._state, D = this.cfg.outputLength / 8, g = D / 8, m = [], w = 0; w < g; w++) {
|
|
2047
|
+
var z = s[w], B = z.high, _ = z.low;
|
|
2048
|
+
B = (B << 8 | B >>> 24) & 16711935 | (B << 24 | B >>> 8) & 4278255360, _ = (_ << 8 | _ >>> 24) & 16711935 | (_ << 24 | _ >>> 8) & 4278255360, m.push(_), m.push(B);
|
|
2048
2049
|
}
|
|
2049
|
-
return new F.init(
|
|
2050
|
+
return new F.init(m, D);
|
|
2050
2051
|
},
|
|
2051
2052
|
clone: function() {
|
|
2052
|
-
for (var f =
|
|
2053
|
+
for (var f = p.clone.call(this), E = f._state = this._state.slice(0), o = 0; o < 25; o++)
|
|
2053
2054
|
E[o] = E[o].clone();
|
|
2054
2055
|
return f;
|
|
2055
2056
|
}
|
|
2056
2057
|
});
|
|
2057
|
-
|
|
2058
|
-
})(Math),
|
|
2058
|
+
d.SHA3 = p._createHelper(h), d.HmacSHA3 = p._createHmacHelper(h);
|
|
2059
|
+
})(Math), x.SHA3;
|
|
2059
2060
|
});
|
|
2060
2061
|
})(W0)), W0.exports;
|
|
2061
2062
|
}
|
|
2062
|
-
var O0 = { exports: {} }, St = O0.exports,
|
|
2063
|
+
var O0 = { exports: {} }, St = O0.exports, Xr;
|
|
2063
2064
|
function Ht() {
|
|
2064
|
-
return
|
|
2065
|
-
(function(
|
|
2065
|
+
return Xr || (Xr = 1, (function(r, l) {
|
|
2066
|
+
(function(x, e) {
|
|
2066
2067
|
r.exports = e(U());
|
|
2067
|
-
})(St, function(
|
|
2068
|
+
})(St, function(x) {
|
|
2068
2069
|
return (function(e) {
|
|
2069
|
-
var
|
|
2070
|
+
var d = x, v = d.lib, F = v.WordArray, p = v.Hasher, C = d.algo, t = F.create([
|
|
2070
2071
|
0,
|
|
2071
2072
|
1,
|
|
2072
2073
|
2,
|
|
@@ -2390,67 +2391,67 @@ function Ht() {
|
|
|
2390
2391
|
13,
|
|
2391
2392
|
11,
|
|
2392
2393
|
11
|
|
2393
|
-
]),
|
|
2394
|
+
]), u = F.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), c = F.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), h = C.RIPEMD160 = p.extend({
|
|
2394
2395
|
_doReset: function() {
|
|
2395
2396
|
this._hash = F.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2396
2397
|
},
|
|
2397
|
-
_doProcessBlock: function(g,
|
|
2398
|
+
_doProcessBlock: function(g, m) {
|
|
2398
2399
|
for (var w = 0; w < 16; w++) {
|
|
2399
|
-
var z =
|
|
2400
|
-
g[z] = (
|
|
2400
|
+
var z = m + w, B = g[z];
|
|
2401
|
+
g[z] = (B << 8 | B >>> 24) & 16711935 | (B << 24 | B >>> 8) & 4278255360;
|
|
2401
2402
|
}
|
|
2402
|
-
var
|
|
2403
|
-
R = W =
|
|
2404
|
-
for (var
|
|
2405
|
-
|
|
2406
|
-
|
|
2403
|
+
var _ = this._hash.words, P = u.words, H = c.words, L = t.words, q = a.words, y = A.words, $ = n.words, W, O, I, b, k, R, S, N, T, j;
|
|
2404
|
+
R = W = _[0], S = O = _[1], N = I = _[2], T = b = _[3], j = k = _[4];
|
|
2405
|
+
for (var M, w = 0; w < 80; w += 1)
|
|
2406
|
+
M = W + g[m + L[w]] | 0, w < 16 ? M += f(O, I, b) + P[0] : w < 32 ? M += E(O, I, b) + P[1] : w < 48 ? M += o(O, I, b) + P[2] : w < 64 ? M += i(O, I, b) + P[3] : M += s(O, I, b) + P[4], M = M | 0, M = D(M, y[w]), M = M + k | 0, W = k, k = b, b = D(I, 10), I = O, O = M, M = R + g[m + q[w]] | 0, w < 16 ? M += s(S, N, T) + H[0] : w < 32 ? M += i(S, N, T) + H[1] : w < 48 ? M += o(S, N, T) + H[2] : w < 64 ? M += E(S, N, T) + H[3] : M += f(S, N, T) + H[4], M = M | 0, M = D(M, $[w]), M = M + j | 0, R = j, j = T, T = D(N, 10), N = S, S = M;
|
|
2407
|
+
M = _[1] + I + T | 0, _[1] = _[2] + b + j | 0, _[2] = _[3] + k + R | 0, _[3] = _[4] + W + S | 0, _[4] = _[0] + O + N | 0, _[0] = M;
|
|
2407
2408
|
},
|
|
2408
2409
|
_doFinalize: function() {
|
|
2409
|
-
var g = this._data,
|
|
2410
|
-
|
|
2411
|
-
for (var
|
|
2412
|
-
var H =
|
|
2413
|
-
|
|
2410
|
+
var g = this._data, m = g.words, w = this._nDataBytes * 8, z = g.sigBytes * 8;
|
|
2411
|
+
m[z >>> 5] |= 128 << 24 - z % 32, m[(z + 64 >>> 9 << 4) + 14] = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360, g.sigBytes = (m.length + 1) * 4, this._process();
|
|
2412
|
+
for (var B = this._hash, _ = B.words, P = 0; P < 5; P++) {
|
|
2413
|
+
var H = _[P];
|
|
2414
|
+
_[P] = (H << 8 | H >>> 24) & 16711935 | (H << 24 | H >>> 8) & 4278255360;
|
|
2414
2415
|
}
|
|
2415
|
-
return
|
|
2416
|
+
return B;
|
|
2416
2417
|
},
|
|
2417
2418
|
clone: function() {
|
|
2418
|
-
var g =
|
|
2419
|
+
var g = p.clone.call(this);
|
|
2419
2420
|
return g._hash = this._hash.clone(), g;
|
|
2420
2421
|
}
|
|
2421
2422
|
});
|
|
2422
|
-
function f(g,
|
|
2423
|
-
return g ^
|
|
2423
|
+
function f(g, m, w) {
|
|
2424
|
+
return g ^ m ^ w;
|
|
2424
2425
|
}
|
|
2425
|
-
function E(g,
|
|
2426
|
-
return g &
|
|
2426
|
+
function E(g, m, w) {
|
|
2427
|
+
return g & m | ~g & w;
|
|
2427
2428
|
}
|
|
2428
|
-
function o(g,
|
|
2429
|
-
return (g | ~
|
|
2429
|
+
function o(g, m, w) {
|
|
2430
|
+
return (g | ~m) ^ w;
|
|
2430
2431
|
}
|
|
2431
|
-
function i(g,
|
|
2432
|
-
return g & w |
|
|
2432
|
+
function i(g, m, w) {
|
|
2433
|
+
return g & w | m & ~w;
|
|
2433
2434
|
}
|
|
2434
|
-
function s(g,
|
|
2435
|
-
return g ^ (
|
|
2435
|
+
function s(g, m, w) {
|
|
2436
|
+
return g ^ (m | ~w);
|
|
2436
2437
|
}
|
|
2437
|
-
function D(g,
|
|
2438
|
-
return g <<
|
|
2438
|
+
function D(g, m) {
|
|
2439
|
+
return g << m | g >>> 32 - m;
|
|
2439
2440
|
}
|
|
2440
|
-
|
|
2441
|
-
})(),
|
|
2441
|
+
d.RIPEMD160 = p._createHelper(h), d.HmacRIPEMD160 = p._createHmacHelper(h);
|
|
2442
|
+
})(), x.RIPEMD160;
|
|
2442
2443
|
});
|
|
2443
2444
|
})(O0)), O0.exports;
|
|
2444
2445
|
}
|
|
2445
|
-
var
|
|
2446
|
+
var L0 = { exports: {} }, Pt = L0.exports, Yr;
|
|
2446
2447
|
function Er() {
|
|
2447
2448
|
return Yr || (Yr = 1, (function(r, l) {
|
|
2448
|
-
(function(
|
|
2449
|
+
(function(x, e) {
|
|
2449
2450
|
r.exports = e(U());
|
|
2450
|
-
})(Pt, function(
|
|
2451
|
+
})(Pt, function(x) {
|
|
2451
2452
|
(function() {
|
|
2452
|
-
var e =
|
|
2453
|
-
C.HMAC =
|
|
2453
|
+
var e = x, d = e.lib, v = d.Base, F = e.enc, p = F.Utf8, C = e.algo;
|
|
2454
|
+
C.HMAC = v.extend({
|
|
2454
2455
|
/**
|
|
2455
2456
|
* Initializes a newly created HMAC.
|
|
2456
2457
|
*
|
|
@@ -2461,13 +2462,13 @@ function Er() {
|
|
|
2461
2462
|
*
|
|
2462
2463
|
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
|
|
2463
2464
|
*/
|
|
2464
|
-
init: function(
|
|
2465
|
-
|
|
2466
|
-
var A =
|
|
2467
|
-
a.sigBytes > n && (a =
|
|
2468
|
-
for (var
|
|
2469
|
-
|
|
2470
|
-
|
|
2465
|
+
init: function(t, a) {
|
|
2466
|
+
t = this._hasher = new t.init(), typeof a == "string" && (a = p.parse(a));
|
|
2467
|
+
var A = t.blockSize, n = A * 4;
|
|
2468
|
+
a.sigBytes > n && (a = t.finalize(a)), a.clamp();
|
|
2469
|
+
for (var u = this._oKey = a.clone(), c = this._iKey = a.clone(), h = u.words, f = c.words, E = 0; E < A; E++)
|
|
2470
|
+
h[E] ^= 1549556828, f[E] ^= 909522486;
|
|
2471
|
+
u.sigBytes = c.sigBytes = n, this.reset();
|
|
2471
2472
|
},
|
|
2472
2473
|
/**
|
|
2473
2474
|
* Resets this HMAC to its initial state.
|
|
@@ -2477,8 +2478,8 @@ function Er() {
|
|
|
2477
2478
|
* hmacHasher.reset();
|
|
2478
2479
|
*/
|
|
2479
2480
|
reset: function() {
|
|
2480
|
-
var
|
|
2481
|
-
|
|
2481
|
+
var t = this._hasher;
|
|
2482
|
+
t.reset(), t.update(this._iKey);
|
|
2482
2483
|
},
|
|
2483
2484
|
/**
|
|
2484
2485
|
* Updates this HMAC with a message.
|
|
@@ -2492,8 +2493,8 @@ function Er() {
|
|
|
2492
2493
|
* hmacHasher.update('message');
|
|
2493
2494
|
* hmacHasher.update(wordArray);
|
|
2494
2495
|
*/
|
|
2495
|
-
update: function(
|
|
2496
|
-
return this._hasher.update(
|
|
2496
|
+
update: function(t) {
|
|
2497
|
+
return this._hasher.update(t), this;
|
|
2497
2498
|
},
|
|
2498
2499
|
/**
|
|
2499
2500
|
* Finalizes the HMAC computation.
|
|
@@ -2509,8 +2510,8 @@ function Er() {
|
|
|
2509
2510
|
* var hmac = hmacHasher.finalize('message');
|
|
2510
2511
|
* var hmac = hmacHasher.finalize(wordArray);
|
|
2511
2512
|
*/
|
|
2512
|
-
finalize: function(
|
|
2513
|
-
var a = this._hasher, A = a.finalize(
|
|
2513
|
+
finalize: function(t) {
|
|
2514
|
+
var a = this._hasher, A = a.finalize(t);
|
|
2514
2515
|
a.reset();
|
|
2515
2516
|
var n = a.finalize(this._oKey.clone().concat(A));
|
|
2516
2517
|
return n;
|
|
@@ -2518,16 +2519,16 @@ function Er() {
|
|
|
2518
2519
|
});
|
|
2519
2520
|
})();
|
|
2520
2521
|
});
|
|
2521
|
-
})(
|
|
2522
|
+
})(L0)), L0.exports;
|
|
2522
2523
|
}
|
|
2523
|
-
var
|
|
2524
|
+
var q0 = { exports: {} }, Rt = q0.exports, Zr;
|
|
2524
2525
|
function $t() {
|
|
2525
2526
|
return Zr || (Zr = 1, (function(r, l) {
|
|
2526
|
-
(function(
|
|
2527
|
+
(function(x, e, d) {
|
|
2527
2528
|
r.exports = e(U(), Cr(), Er());
|
|
2528
|
-
})(Rt, function(
|
|
2529
|
+
})(Rt, function(x) {
|
|
2529
2530
|
return (function() {
|
|
2530
|
-
var e =
|
|
2531
|
+
var e = x, d = e.lib, v = d.Base, F = d.WordArray, p = e.algo, C = p.SHA256, t = p.HMAC, a = p.PBKDF2 = v.extend({
|
|
2531
2532
|
/**
|
|
2532
2533
|
* Configuration options.
|
|
2533
2534
|
*
|
|
@@ -2535,7 +2536,7 @@ function $t() {
|
|
|
2535
2536
|
* @property {Hasher} hasher The hasher to use. Default: SHA256
|
|
2536
2537
|
* @property {number} iterations The number of iterations to perform. Default: 250000
|
|
2537
2538
|
*/
|
|
2538
|
-
cfg:
|
|
2539
|
+
cfg: v.extend({
|
|
2539
2540
|
keySize: 128 / 32,
|
|
2540
2541
|
hasher: C,
|
|
2541
2542
|
iterations: 25e4
|
|
@@ -2567,34 +2568,34 @@ function $t() {
|
|
|
2567
2568
|
* var key = kdf.compute(password, salt);
|
|
2568
2569
|
*/
|
|
2569
2570
|
compute: function(A, n) {
|
|
2570
|
-
for (var
|
|
2571
|
+
for (var u = this.cfg, c = t.create(u.hasher, A), h = F.create(), f = F.create([1]), E = h.words, o = f.words, i = u.keySize, s = u.iterations; E.length < i; ) {
|
|
2571
2572
|
var D = c.update(n).finalize(f);
|
|
2572
2573
|
c.reset();
|
|
2573
|
-
for (var g = D.words,
|
|
2574
|
+
for (var g = D.words, m = g.length, w = D, z = 1; z < s; z++) {
|
|
2574
2575
|
w = c.finalize(w), c.reset();
|
|
2575
|
-
for (var
|
|
2576
|
-
g[
|
|
2576
|
+
for (var B = w.words, _ = 0; _ < m; _++)
|
|
2577
|
+
g[_] ^= B[_];
|
|
2577
2578
|
}
|
|
2578
|
-
|
|
2579
|
+
h.concat(D), o[0]++;
|
|
2579
2580
|
}
|
|
2580
|
-
return
|
|
2581
|
+
return h.sigBytes = i * 4, h;
|
|
2581
2582
|
}
|
|
2582
2583
|
});
|
|
2583
|
-
e.PBKDF2 = function(A, n,
|
|
2584
|
-
return a.create(
|
|
2584
|
+
e.PBKDF2 = function(A, n, u) {
|
|
2585
|
+
return a.create(u).compute(A, n);
|
|
2585
2586
|
};
|
|
2586
|
-
})(),
|
|
2587
|
+
})(), x.PBKDF2;
|
|
2587
2588
|
});
|
|
2588
|
-
})(
|
|
2589
|
+
})(q0)), q0.exports;
|
|
2589
2590
|
}
|
|
2590
2591
|
var T0 = { exports: {} }, zt = T0.exports, Qr;
|
|
2591
2592
|
function t0() {
|
|
2592
2593
|
return Qr || (Qr = 1, (function(r, l) {
|
|
2593
|
-
(function(
|
|
2594
|
+
(function(x, e, d) {
|
|
2594
2595
|
r.exports = e(U(), be(), Er());
|
|
2595
|
-
})(zt, function(
|
|
2596
|
+
})(zt, function(x) {
|
|
2596
2597
|
return (function() {
|
|
2597
|
-
var e =
|
|
2598
|
+
var e = x, d = e.lib, v = d.Base, F = d.WordArray, p = e.algo, C = p.MD5, t = p.EvpKDF = v.extend({
|
|
2598
2599
|
/**
|
|
2599
2600
|
* Configuration options.
|
|
2600
2601
|
*
|
|
@@ -2602,7 +2603,7 @@ function t0() {
|
|
|
2602
2603
|
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
|
|
2603
2604
|
* @property {number} iterations The number of iterations to perform. Default: 1
|
|
2604
2605
|
*/
|
|
2605
|
-
cfg:
|
|
2606
|
+
cfg: v.extend({
|
|
2606
2607
|
keySize: 128 / 32,
|
|
2607
2608
|
hasher: C,
|
|
2608
2609
|
iterations: 1
|
|
@@ -2634,32 +2635,32 @@ function t0() {
|
|
|
2634
2635
|
* var key = kdf.compute(password, salt);
|
|
2635
2636
|
*/
|
|
2636
2637
|
compute: function(a, A) {
|
|
2637
|
-
for (var n,
|
|
2638
|
+
for (var n, u = this.cfg, c = u.hasher.create(), h = F.create(), f = h.words, E = u.keySize, o = u.iterations; f.length < E; ) {
|
|
2638
2639
|
n && c.update(n), n = c.update(a).finalize(A), c.reset();
|
|
2639
2640
|
for (var i = 1; i < o; i++)
|
|
2640
2641
|
n = c.finalize(n), c.reset();
|
|
2641
|
-
|
|
2642
|
+
h.concat(n);
|
|
2642
2643
|
}
|
|
2643
|
-
return
|
|
2644
|
+
return h.sigBytes = E * 4, h;
|
|
2644
2645
|
}
|
|
2645
2646
|
});
|
|
2646
2647
|
e.EvpKDF = function(a, A, n) {
|
|
2647
|
-
return
|
|
2648
|
+
return t.create(n).compute(a, A);
|
|
2648
2649
|
};
|
|
2649
|
-
})(),
|
|
2650
|
+
})(), x.EvpKDF;
|
|
2650
2651
|
});
|
|
2651
2652
|
})(T0)), T0.exports;
|
|
2652
2653
|
}
|
|
2653
|
-
var
|
|
2654
|
+
var M0 = { exports: {} }, It = M0.exports, Vr;
|
|
2654
2655
|
function K() {
|
|
2655
2656
|
return Vr || (Vr = 1, (function(r, l) {
|
|
2656
|
-
(function(
|
|
2657
|
+
(function(x, e, d) {
|
|
2657
2658
|
r.exports = e(U(), t0());
|
|
2658
|
-
})(It, function(
|
|
2659
|
-
|
|
2660
|
-
var
|
|
2661
|
-
|
|
2662
|
-
var a =
|
|
2659
|
+
})(It, function(x) {
|
|
2660
|
+
x.lib.Cipher || (function(e) {
|
|
2661
|
+
var d = x, v = d.lib, F = v.Base, p = v.WordArray, C = v.BufferedBlockAlgorithm, t = d.enc;
|
|
2662
|
+
t.Utf8;
|
|
2663
|
+
var a = t.Base64, A = d.algo, n = A.EvpKDF, u = v.Cipher = C.extend({
|
|
2663
2664
|
/**
|
|
2664
2665
|
* Configuration options.
|
|
2665
2666
|
*
|
|
@@ -2680,8 +2681,8 @@ function K() {
|
|
|
2680
2681
|
*
|
|
2681
2682
|
* var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
|
|
2682
2683
|
*/
|
|
2683
|
-
createEncryptor: function(
|
|
2684
|
-
return this.create(this._ENC_XFORM_MODE,
|
|
2684
|
+
createEncryptor: function(B, _) {
|
|
2685
|
+
return this.create(this._ENC_XFORM_MODE, B, _);
|
|
2685
2686
|
},
|
|
2686
2687
|
/**
|
|
2687
2688
|
* Creates this cipher in decryption mode.
|
|
@@ -2697,8 +2698,8 @@ function K() {
|
|
|
2697
2698
|
*
|
|
2698
2699
|
* var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
|
|
2699
2700
|
*/
|
|
2700
|
-
createDecryptor: function(
|
|
2701
|
-
return this.create(this._DEC_XFORM_MODE,
|
|
2701
|
+
createDecryptor: function(B, _) {
|
|
2702
|
+
return this.create(this._DEC_XFORM_MODE, B, _);
|
|
2702
2703
|
},
|
|
2703
2704
|
/**
|
|
2704
2705
|
* Initializes a newly created cipher.
|
|
@@ -2711,8 +2712,8 @@ function K() {
|
|
|
2711
2712
|
*
|
|
2712
2713
|
* var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
|
|
2713
2714
|
*/
|
|
2714
|
-
init: function(
|
|
2715
|
-
this.cfg = this.cfg.extend(P), this._xformMode =
|
|
2715
|
+
init: function(B, _, P) {
|
|
2716
|
+
this.cfg = this.cfg.extend(P), this._xformMode = B, this._key = _, this.reset();
|
|
2716
2717
|
},
|
|
2717
2718
|
/**
|
|
2718
2719
|
* Resets this cipher to its initial state.
|
|
@@ -2736,8 +2737,8 @@ function K() {
|
|
|
2736
2737
|
* var encrypted = cipher.process('data');
|
|
2737
2738
|
* var encrypted = cipher.process(wordArray);
|
|
2738
2739
|
*/
|
|
2739
|
-
process: function(
|
|
2740
|
-
return this._append(
|
|
2740
|
+
process: function(B) {
|
|
2741
|
+
return this._append(B), this._process();
|
|
2741
2742
|
},
|
|
2742
2743
|
/**
|
|
2743
2744
|
* Finalizes the encryption or decryption process.
|
|
@@ -2753,10 +2754,10 @@ function K() {
|
|
|
2753
2754
|
* var encrypted = cipher.finalize('data');
|
|
2754
2755
|
* var encrypted = cipher.finalize(wordArray);
|
|
2755
2756
|
*/
|
|
2756
|
-
finalize: function(
|
|
2757
|
-
|
|
2758
|
-
var
|
|
2759
|
-
return
|
|
2757
|
+
finalize: function(B) {
|
|
2758
|
+
B && this._append(B);
|
|
2759
|
+
var _ = this._doFinalize();
|
|
2760
|
+
return _;
|
|
2760
2761
|
},
|
|
2761
2762
|
keySize: 128 / 32,
|
|
2762
2763
|
ivSize: 128 / 32,
|
|
@@ -2776,29 +2777,29 @@ function K() {
|
|
|
2776
2777
|
* var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
|
|
2777
2778
|
*/
|
|
2778
2779
|
_createHelper: /* @__PURE__ */ (function() {
|
|
2779
|
-
function
|
|
2780
|
-
return typeof
|
|
2780
|
+
function B(_) {
|
|
2781
|
+
return typeof _ == "string" ? z : g;
|
|
2781
2782
|
}
|
|
2782
|
-
return function(
|
|
2783
|
+
return function(_) {
|
|
2783
2784
|
return {
|
|
2784
|
-
encrypt: function(P, H,
|
|
2785
|
-
return
|
|
2785
|
+
encrypt: function(P, H, L) {
|
|
2786
|
+
return B(H).encrypt(_, P, H, L);
|
|
2786
2787
|
},
|
|
2787
|
-
decrypt: function(P, H,
|
|
2788
|
-
return
|
|
2788
|
+
decrypt: function(P, H, L) {
|
|
2789
|
+
return B(H).decrypt(_, P, H, L);
|
|
2789
2790
|
}
|
|
2790
2791
|
};
|
|
2791
2792
|
};
|
|
2792
2793
|
})()
|
|
2793
2794
|
});
|
|
2794
|
-
|
|
2795
|
+
v.StreamCipher = u.extend({
|
|
2795
2796
|
_doFinalize: function() {
|
|
2796
|
-
var
|
|
2797
|
-
return
|
|
2797
|
+
var B = this._process(!0);
|
|
2798
|
+
return B;
|
|
2798
2799
|
},
|
|
2799
2800
|
blockSize: 1
|
|
2800
2801
|
});
|
|
2801
|
-
var c =
|
|
2802
|
+
var c = d.mode = {}, h = v.BlockCipherMode = F.extend({
|
|
2802
2803
|
/**
|
|
2803
2804
|
* Creates this mode for encryption.
|
|
2804
2805
|
*
|
|
@@ -2811,8 +2812,8 @@ function K() {
|
|
|
2811
2812
|
*
|
|
2812
2813
|
* var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
|
|
2813
2814
|
*/
|
|
2814
|
-
createEncryptor: function(
|
|
2815
|
-
return this.Encryptor.create(
|
|
2815
|
+
createEncryptor: function(B, _) {
|
|
2816
|
+
return this.Encryptor.create(B, _);
|
|
2816
2817
|
},
|
|
2817
2818
|
/**
|
|
2818
2819
|
* Creates this mode for decryption.
|
|
@@ -2826,8 +2827,8 @@ function K() {
|
|
|
2826
2827
|
*
|
|
2827
2828
|
* var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
|
|
2828
2829
|
*/
|
|
2829
|
-
createDecryptor: function(
|
|
2830
|
-
return this.Decryptor.create(
|
|
2830
|
+
createDecryptor: function(B, _) {
|
|
2831
|
+
return this.Decryptor.create(B, _);
|
|
2831
2832
|
},
|
|
2832
2833
|
/**
|
|
2833
2834
|
* Initializes a newly created mode.
|
|
@@ -2839,12 +2840,12 @@ function K() {
|
|
|
2839
2840
|
*
|
|
2840
2841
|
* var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
|
|
2841
2842
|
*/
|
|
2842
|
-
init: function(
|
|
2843
|
-
this._cipher =
|
|
2843
|
+
init: function(B, _) {
|
|
2844
|
+
this._cipher = B, this._iv = _;
|
|
2844
2845
|
}
|
|
2845
2846
|
}), f = c.CBC = (function() {
|
|
2846
|
-
var
|
|
2847
|
-
|
|
2847
|
+
var B = h.extend();
|
|
2848
|
+
B.Encryptor = B.extend({
|
|
2848
2849
|
/**
|
|
2849
2850
|
* Processes the data block at offset.
|
|
2850
2851
|
*
|
|
@@ -2856,10 +2857,10 @@ function K() {
|
|
|
2856
2857
|
* mode.processBlock(data.words, offset);
|
|
2857
2858
|
*/
|
|
2858
2859
|
processBlock: function(P, H) {
|
|
2859
|
-
var
|
|
2860
|
-
|
|
2860
|
+
var L = this._cipher, q = L.blockSize;
|
|
2861
|
+
_.call(this, P, H, q), L.encryptBlock(P, H), this._prevBlock = P.slice(H, H + q);
|
|
2861
2862
|
}
|
|
2862
|
-
}),
|
|
2863
|
+
}), B.Decryptor = B.extend({
|
|
2863
2864
|
/**
|
|
2864
2865
|
* Processes the data block at offset.
|
|
2865
2866
|
*
|
|
@@ -2871,18 +2872,18 @@ function K() {
|
|
|
2871
2872
|
* mode.processBlock(data.words, offset);
|
|
2872
2873
|
*/
|
|
2873
2874
|
processBlock: function(P, H) {
|
|
2874
|
-
var
|
|
2875
|
-
|
|
2875
|
+
var L = this._cipher, q = L.blockSize, y = P.slice(H, H + q);
|
|
2876
|
+
L.decryptBlock(P, H), _.call(this, P, H, q), this._prevBlock = y;
|
|
2876
2877
|
}
|
|
2877
2878
|
});
|
|
2878
|
-
function
|
|
2879
|
-
var
|
|
2880
|
-
y ? (
|
|
2881
|
-
for (var $ = 0; $ <
|
|
2882
|
-
P[H + $] ^=
|
|
2879
|
+
function _(P, H, L) {
|
|
2880
|
+
var q, y = this._iv;
|
|
2881
|
+
y ? (q = y, this._iv = e) : q = this._prevBlock;
|
|
2882
|
+
for (var $ = 0; $ < L; $++)
|
|
2883
|
+
P[H + $] ^= q[$];
|
|
2883
2884
|
}
|
|
2884
|
-
return
|
|
2885
|
-
})(), E =
|
|
2885
|
+
return B;
|
|
2886
|
+
})(), E = d.pad = {}, o = E.Pkcs7 = {
|
|
2886
2887
|
/**
|
|
2887
2888
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
2888
2889
|
*
|
|
@@ -2895,11 +2896,11 @@ function K() {
|
|
|
2895
2896
|
*
|
|
2896
2897
|
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
|
2897
2898
|
*/
|
|
2898
|
-
pad: function(
|
|
2899
|
-
for (var P =
|
|
2900
|
-
|
|
2901
|
-
var $ =
|
|
2902
|
-
|
|
2899
|
+
pad: function(B, _) {
|
|
2900
|
+
for (var P = _ * 4, H = P - B.sigBytes % P, L = H << 24 | H << 16 | H << 8 | H, q = [], y = 0; y < H; y += 4)
|
|
2901
|
+
q.push(L);
|
|
2902
|
+
var $ = p.create(q, H);
|
|
2903
|
+
B.concat($);
|
|
2903
2904
|
},
|
|
2904
2905
|
/**
|
|
2905
2906
|
* Unpads data that had been padded using the algorithm defined in PKCS #5/7.
|
|
@@ -2912,38 +2913,38 @@ function K() {
|
|
|
2912
2913
|
*
|
|
2913
2914
|
* CryptoJS.pad.Pkcs7.unpad(wordArray);
|
|
2914
2915
|
*/
|
|
2915
|
-
unpad: function(
|
|
2916
|
-
var
|
|
2917
|
-
|
|
2916
|
+
unpad: function(B) {
|
|
2917
|
+
var _ = B.words[B.sigBytes - 1 >>> 2] & 255;
|
|
2918
|
+
B.sigBytes -= _;
|
|
2918
2919
|
}
|
|
2919
2920
|
};
|
|
2920
|
-
|
|
2921
|
+
v.BlockCipher = u.extend({
|
|
2921
2922
|
/**
|
|
2922
2923
|
* Configuration options.
|
|
2923
2924
|
*
|
|
2924
2925
|
* @property {Mode} mode The block mode to use. Default: CBC
|
|
2925
2926
|
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
|
|
2926
2927
|
*/
|
|
2927
|
-
cfg:
|
|
2928
|
+
cfg: u.cfg.extend({
|
|
2928
2929
|
mode: f,
|
|
2929
2930
|
padding: o
|
|
2930
2931
|
}),
|
|
2931
2932
|
reset: function() {
|
|
2932
|
-
var
|
|
2933
|
-
|
|
2934
|
-
var
|
|
2935
|
-
this._xformMode == this._ENC_XFORM_MODE ?
|
|
2933
|
+
var B;
|
|
2934
|
+
u.reset.call(this);
|
|
2935
|
+
var _ = this.cfg, P = _.iv, H = _.mode;
|
|
2936
|
+
this._xformMode == this._ENC_XFORM_MODE ? B = H.createEncryptor : (B = H.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == B ? this._mode.init(this, P && P.words) : (this._mode = B.call(H, this, P && P.words), this._mode.__creator = B);
|
|
2936
2937
|
},
|
|
2937
|
-
_doProcessBlock: function(
|
|
2938
|
-
this._mode.processBlock(
|
|
2938
|
+
_doProcessBlock: function(B, _) {
|
|
2939
|
+
this._mode.processBlock(B, _);
|
|
2939
2940
|
},
|
|
2940
2941
|
_doFinalize: function() {
|
|
2941
|
-
var
|
|
2942
|
-
return this._xformMode == this._ENC_XFORM_MODE ? (
|
|
2942
|
+
var B, _ = this.cfg.padding;
|
|
2943
|
+
return this._xformMode == this._ENC_XFORM_MODE ? (_.pad(this._data, this.blockSize), B = this._process(!0)) : (B = this._process(!0), _.unpad(B)), B;
|
|
2943
2944
|
},
|
|
2944
2945
|
blockSize: 128 / 32
|
|
2945
2946
|
});
|
|
2946
|
-
var i =
|
|
2947
|
+
var i = v.CipherParams = F.extend({
|
|
2947
2948
|
/**
|
|
2948
2949
|
* Initializes a newly created cipher params object.
|
|
2949
2950
|
*
|
|
@@ -2963,8 +2964,8 @@ function K() {
|
|
|
2963
2964
|
* formatter: CryptoJS.format.OpenSSL
|
|
2964
2965
|
* });
|
|
2965
2966
|
*/
|
|
2966
|
-
init: function(
|
|
2967
|
-
this.mixIn(
|
|
2967
|
+
init: function(B) {
|
|
2968
|
+
this.mixIn(B);
|
|
2968
2969
|
},
|
|
2969
2970
|
/**
|
|
2970
2971
|
* Converts this cipher params object to a string.
|
|
@@ -2981,10 +2982,10 @@ function K() {
|
|
|
2981
2982
|
* var string = cipherParams.toString();
|
|
2982
2983
|
* var string = cipherParams.toString(CryptoJS.format.OpenSSL);
|
|
2983
2984
|
*/
|
|
2984
|
-
toString: function(
|
|
2985
|
-
return (
|
|
2985
|
+
toString: function(B) {
|
|
2986
|
+
return (B || this.formatter).stringify(this);
|
|
2986
2987
|
}
|
|
2987
|
-
}), s =
|
|
2988
|
+
}), s = d.format = {}, D = s.OpenSSL = {
|
|
2988
2989
|
/**
|
|
2989
2990
|
* Converts a cipher params object to an OpenSSL-compatible string.
|
|
2990
2991
|
*
|
|
@@ -2998,9 +2999,9 @@ function K() {
|
|
|
2998
2999
|
*
|
|
2999
3000
|
* var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
|
|
3000
3001
|
*/
|
|
3001
|
-
stringify: function(
|
|
3002
|
-
var
|
|
3003
|
-
return H ?
|
|
3002
|
+
stringify: function(B) {
|
|
3003
|
+
var _, P = B.ciphertext, H = B.salt;
|
|
3004
|
+
return H ? _ = p.create([1398893684, 1701076831]).concat(H).concat(P) : _ = P, _.toString(a);
|
|
3004
3005
|
},
|
|
3005
3006
|
/**
|
|
3006
3007
|
* Converts an OpenSSL-compatible string to a cipher params object.
|
|
@@ -3015,11 +3016,11 @@ function K() {
|
|
|
3015
3016
|
*
|
|
3016
3017
|
* var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
|
|
3017
3018
|
*/
|
|
3018
|
-
parse: function(
|
|
3019
|
-
var
|
|
3020
|
-
return H[0] == 1398893684 && H[1] == 1701076831 && (
|
|
3019
|
+
parse: function(B) {
|
|
3020
|
+
var _, P = a.parse(B), H = P.words;
|
|
3021
|
+
return H[0] == 1398893684 && H[1] == 1701076831 && (_ = p.create(H.slice(2, 4)), H.splice(0, 4), P.sigBytes -= 16), i.create({ ciphertext: P, salt: _ });
|
|
3021
3022
|
}
|
|
3022
|
-
}, g =
|
|
3023
|
+
}, g = v.SerializableCipher = F.extend({
|
|
3023
3024
|
/**
|
|
3024
3025
|
* Configuration options.
|
|
3025
3026
|
*
|
|
@@ -3046,17 +3047,17 @@ function K() {
|
|
|
3046
3047
|
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
|
|
3047
3048
|
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3048
3049
|
*/
|
|
3049
|
-
encrypt: function(
|
|
3050
|
+
encrypt: function(B, _, P, H) {
|
|
3050
3051
|
H = this.cfg.extend(H);
|
|
3051
|
-
var
|
|
3052
|
+
var L = B.createEncryptor(P, H), q = L.finalize(_), y = L.cfg;
|
|
3052
3053
|
return i.create({
|
|
3053
|
-
ciphertext:
|
|
3054
|
+
ciphertext: q,
|
|
3054
3055
|
key: P,
|
|
3055
3056
|
iv: y.iv,
|
|
3056
|
-
algorithm:
|
|
3057
|
+
algorithm: B,
|
|
3057
3058
|
mode: y.mode,
|
|
3058
3059
|
padding: y.padding,
|
|
3059
|
-
blockSize:
|
|
3060
|
+
blockSize: B.blockSize,
|
|
3060
3061
|
formatter: H.format
|
|
3061
3062
|
});
|
|
3062
3063
|
},
|
|
@@ -3077,10 +3078,10 @@ function K() {
|
|
|
3077
3078
|
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3078
3079
|
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3079
3080
|
*/
|
|
3080
|
-
decrypt: function(
|
|
3081
|
-
H = this.cfg.extend(H),
|
|
3082
|
-
var
|
|
3083
|
-
return
|
|
3081
|
+
decrypt: function(B, _, P, H) {
|
|
3082
|
+
H = this.cfg.extend(H), _ = this._parse(_, H.format);
|
|
3083
|
+
var L = B.createDecryptor(P, H).finalize(_.ciphertext);
|
|
3084
|
+
return L;
|
|
3084
3085
|
},
|
|
3085
3086
|
/**
|
|
3086
3087
|
* Converts serialized ciphertext to CipherParams,
|
|
@@ -3097,10 +3098,10 @@ function K() {
|
|
|
3097
3098
|
*
|
|
3098
3099
|
* var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
|
|
3099
3100
|
*/
|
|
3100
|
-
_parse: function(
|
|
3101
|
-
return typeof
|
|
3101
|
+
_parse: function(B, _) {
|
|
3102
|
+
return typeof B == "string" ? _.parse(B, this) : B;
|
|
3102
3103
|
}
|
|
3103
|
-
}),
|
|
3104
|
+
}), m = d.kdf = {}, w = m.OpenSSL = {
|
|
3104
3105
|
/**
|
|
3105
3106
|
* Derives a key and IV from a password.
|
|
3106
3107
|
*
|
|
@@ -3118,15 +3119,15 @@ function K() {
|
|
|
3118
3119
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
3119
3120
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
3120
3121
|
*/
|
|
3121
|
-
execute: function(
|
|
3122
|
-
if (H || (H =
|
|
3123
|
-
var
|
|
3122
|
+
execute: function(B, _, P, H, L) {
|
|
3123
|
+
if (H || (H = p.random(64 / 8)), L)
|
|
3124
|
+
var q = n.create({ keySize: _ + P, hasher: L }).compute(B, H);
|
|
3124
3125
|
else
|
|
3125
|
-
var
|
|
3126
|
-
var y =
|
|
3127
|
-
return
|
|
3126
|
+
var q = n.create({ keySize: _ + P }).compute(B, H);
|
|
3127
|
+
var y = p.create(q.words.slice(_), P * 4);
|
|
3128
|
+
return q.sigBytes = _ * 4, i.create({ key: q, iv: y, salt: H });
|
|
3128
3129
|
}
|
|
3129
|
-
}, z =
|
|
3130
|
+
}, z = v.PasswordBasedCipher = g.extend({
|
|
3130
3131
|
/**
|
|
3131
3132
|
* Configuration options.
|
|
3132
3133
|
*
|
|
@@ -3152,12 +3153,12 @@ function K() {
|
|
|
3152
3153
|
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
|
|
3153
3154
|
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3154
3155
|
*/
|
|
3155
|
-
encrypt: function(
|
|
3156
|
+
encrypt: function(B, _, P, H) {
|
|
3156
3157
|
H = this.cfg.extend(H);
|
|
3157
|
-
var
|
|
3158
|
-
H.iv =
|
|
3159
|
-
var
|
|
3160
|
-
return
|
|
3158
|
+
var L = H.kdf.execute(P, B.keySize, B.ivSize, H.salt, H.hasher);
|
|
3159
|
+
H.iv = L.iv;
|
|
3160
|
+
var q = g.encrypt.call(this, B, _, L.key, H);
|
|
3161
|
+
return q.mixIn(L), q;
|
|
3161
3162
|
},
|
|
3162
3163
|
/**
|
|
3163
3164
|
* Decrypts serialized ciphertext using a password.
|
|
@@ -3176,246 +3177,246 @@ function K() {
|
|
|
3176
3177
|
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3177
3178
|
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3178
3179
|
*/
|
|
3179
|
-
decrypt: function(
|
|
3180
|
-
H = this.cfg.extend(H),
|
|
3181
|
-
var
|
|
3182
|
-
H.iv =
|
|
3183
|
-
var
|
|
3184
|
-
return
|
|
3180
|
+
decrypt: function(B, _, P, H) {
|
|
3181
|
+
H = this.cfg.extend(H), _ = this._parse(_, H.format);
|
|
3182
|
+
var L = H.kdf.execute(P, B.keySize, B.ivSize, _.salt, H.hasher);
|
|
3183
|
+
H.iv = L.iv;
|
|
3184
|
+
var q = g.decrypt.call(this, B, _, L.key, H);
|
|
3185
|
+
return q;
|
|
3185
3186
|
}
|
|
3186
3187
|
});
|
|
3187
3188
|
})();
|
|
3188
3189
|
});
|
|
3189
|
-
})(
|
|
3190
|
+
})(M0)), M0.exports;
|
|
3190
3191
|
}
|
|
3191
|
-
var
|
|
3192
|
+
var N0 = { exports: {} }, Wt = N0.exports, Jr;
|
|
3192
3193
|
function Ot() {
|
|
3193
3194
|
return Jr || (Jr = 1, (function(r, l) {
|
|
3194
|
-
(function(
|
|
3195
|
+
(function(x, e, d) {
|
|
3195
3196
|
r.exports = e(U(), K());
|
|
3196
|
-
})(Wt, function(
|
|
3197
|
-
return
|
|
3198
|
-
var e =
|
|
3197
|
+
})(Wt, function(x) {
|
|
3198
|
+
return x.mode.CFB = (function() {
|
|
3199
|
+
var e = x.lib.BlockCipherMode.extend();
|
|
3199
3200
|
e.Encryptor = e.extend({
|
|
3200
|
-
processBlock: function(
|
|
3201
|
-
var
|
|
3202
|
-
|
|
3201
|
+
processBlock: function(v, F) {
|
|
3202
|
+
var p = this._cipher, C = p.blockSize;
|
|
3203
|
+
d.call(this, v, F, C, p), this._prevBlock = v.slice(F, F + C);
|
|
3203
3204
|
}
|
|
3204
3205
|
}), e.Decryptor = e.extend({
|
|
3205
|
-
processBlock: function(
|
|
3206
|
-
var
|
|
3207
|
-
|
|
3206
|
+
processBlock: function(v, F) {
|
|
3207
|
+
var p = this._cipher, C = p.blockSize, t = v.slice(F, F + C);
|
|
3208
|
+
d.call(this, v, F, C, p), this._prevBlock = t;
|
|
3208
3209
|
}
|
|
3209
3210
|
});
|
|
3210
|
-
function
|
|
3211
|
-
var
|
|
3212
|
-
a ? (
|
|
3213
|
-
for (var A = 0; A <
|
|
3214
|
-
|
|
3211
|
+
function d(v, F, p, C) {
|
|
3212
|
+
var t, a = this._iv;
|
|
3213
|
+
a ? (t = a.slice(0), this._iv = void 0) : t = this._prevBlock, C.encryptBlock(t, 0);
|
|
3214
|
+
for (var A = 0; A < p; A++)
|
|
3215
|
+
v[F + A] ^= t[A];
|
|
3215
3216
|
}
|
|
3216
3217
|
return e;
|
|
3217
|
-
})(),
|
|
3218
|
+
})(), x.mode.CFB;
|
|
3218
3219
|
});
|
|
3219
|
-
})(
|
|
3220
|
+
})(N0)), N0.exports;
|
|
3220
3221
|
}
|
|
3221
|
-
var U0 = { exports: {} },
|
|
3222
|
-
function
|
|
3222
|
+
var U0 = { exports: {} }, Lt = U0.exports, re;
|
|
3223
|
+
function qt() {
|
|
3223
3224
|
return re || (re = 1, (function(r, l) {
|
|
3224
|
-
(function(
|
|
3225
|
+
(function(x, e, d) {
|
|
3225
3226
|
r.exports = e(U(), K());
|
|
3226
|
-
})(
|
|
3227
|
-
return
|
|
3228
|
-
var e =
|
|
3229
|
-
processBlock: function(
|
|
3230
|
-
var
|
|
3231
|
-
|
|
3227
|
+
})(Lt, function(x) {
|
|
3228
|
+
return x.mode.CTR = (function() {
|
|
3229
|
+
var e = x.lib.BlockCipherMode.extend(), d = e.Encryptor = e.extend({
|
|
3230
|
+
processBlock: function(v, F) {
|
|
3231
|
+
var p = this._cipher, C = p.blockSize, t = this._iv, a = this._counter;
|
|
3232
|
+
t && (a = this._counter = t.slice(0), this._iv = void 0);
|
|
3232
3233
|
var A = a.slice(0);
|
|
3233
|
-
|
|
3234
|
+
p.encryptBlock(A, 0), a[C - 1] = a[C - 1] + 1 | 0;
|
|
3234
3235
|
for (var n = 0; n < C; n++)
|
|
3235
|
-
|
|
3236
|
+
v[F + n] ^= A[n];
|
|
3236
3237
|
}
|
|
3237
3238
|
});
|
|
3238
|
-
return e.Decryptor =
|
|
3239
|
-
})(),
|
|
3239
|
+
return e.Decryptor = d, e;
|
|
3240
|
+
})(), x.mode.CTR;
|
|
3240
3241
|
});
|
|
3241
3242
|
})(U0)), U0.exports;
|
|
3242
3243
|
}
|
|
3243
3244
|
var j0 = { exports: {} }, Tt = j0.exports, ee;
|
|
3244
|
-
function
|
|
3245
|
+
function Mt() {
|
|
3245
3246
|
return ee || (ee = 1, (function(r, l) {
|
|
3246
|
-
(function(
|
|
3247
|
+
(function(x, e, d) {
|
|
3247
3248
|
r.exports = e(U(), K());
|
|
3248
|
-
})(Tt, function(
|
|
3249
|
-
return
|
|
3250
|
-
var e =
|
|
3251
|
-
function
|
|
3252
|
-
if ((
|
|
3253
|
-
var C =
|
|
3254
|
-
C === 255 ? (C = 0,
|
|
3249
|
+
})(Tt, function(x) {
|
|
3250
|
+
return x.mode.CTRGladman = (function() {
|
|
3251
|
+
var e = x.lib.BlockCipherMode.extend();
|
|
3252
|
+
function d(p) {
|
|
3253
|
+
if ((p >> 24 & 255) === 255) {
|
|
3254
|
+
var C = p >> 16 & 255, t = p >> 8 & 255, a = p & 255;
|
|
3255
|
+
C === 255 ? (C = 0, t === 255 ? (t = 0, a === 255 ? a = 0 : ++a) : ++t) : ++C, p = 0, p += C << 16, p += t << 8, p += a;
|
|
3255
3256
|
} else
|
|
3256
|
-
|
|
3257
|
-
return
|
|
3257
|
+
p += 1 << 24;
|
|
3258
|
+
return p;
|
|
3258
3259
|
}
|
|
3259
|
-
function
|
|
3260
|
-
return (
|
|
3260
|
+
function v(p) {
|
|
3261
|
+
return (p[0] = d(p[0])) === 0 && (p[1] = d(p[1])), p;
|
|
3261
3262
|
}
|
|
3262
3263
|
var F = e.Encryptor = e.extend({
|
|
3263
|
-
processBlock: function(
|
|
3264
|
-
var
|
|
3265
|
-
A && (n = this._counter = A.slice(0), this._iv = void 0),
|
|
3266
|
-
var
|
|
3267
|
-
|
|
3264
|
+
processBlock: function(p, C) {
|
|
3265
|
+
var t = this._cipher, a = t.blockSize, A = this._iv, n = this._counter;
|
|
3266
|
+
A && (n = this._counter = A.slice(0), this._iv = void 0), v(n);
|
|
3267
|
+
var u = n.slice(0);
|
|
3268
|
+
t.encryptBlock(u, 0);
|
|
3268
3269
|
for (var c = 0; c < a; c++)
|
|
3269
|
-
|
|
3270
|
+
p[C + c] ^= u[c];
|
|
3270
3271
|
}
|
|
3271
3272
|
});
|
|
3272
3273
|
return e.Decryptor = F, e;
|
|
3273
|
-
})(),
|
|
3274
|
+
})(), x.mode.CTRGladman;
|
|
3274
3275
|
});
|
|
3275
3276
|
})(j0)), j0.exports;
|
|
3276
3277
|
}
|
|
3277
|
-
var K0 = { exports: {} },
|
|
3278
|
+
var K0 = { exports: {} }, Nt = K0.exports, te;
|
|
3278
3279
|
function Ut() {
|
|
3279
3280
|
return te || (te = 1, (function(r, l) {
|
|
3280
|
-
(function(
|
|
3281
|
+
(function(x, e, d) {
|
|
3281
3282
|
r.exports = e(U(), K());
|
|
3282
|
-
})(
|
|
3283
|
-
return
|
|
3284
|
-
var e =
|
|
3285
|
-
processBlock: function(
|
|
3286
|
-
var
|
|
3287
|
-
|
|
3283
|
+
})(Nt, function(x) {
|
|
3284
|
+
return x.mode.OFB = (function() {
|
|
3285
|
+
var e = x.lib.BlockCipherMode.extend(), d = e.Encryptor = e.extend({
|
|
3286
|
+
processBlock: function(v, F) {
|
|
3287
|
+
var p = this._cipher, C = p.blockSize, t = this._iv, a = this._keystream;
|
|
3288
|
+
t && (a = this._keystream = t.slice(0), this._iv = void 0), p.encryptBlock(a, 0);
|
|
3288
3289
|
for (var A = 0; A < C; A++)
|
|
3289
|
-
|
|
3290
|
+
v[F + A] ^= a[A];
|
|
3290
3291
|
}
|
|
3291
3292
|
});
|
|
3292
|
-
return e.Decryptor =
|
|
3293
|
-
})(),
|
|
3293
|
+
return e.Decryptor = d, e;
|
|
3294
|
+
})(), x.mode.OFB;
|
|
3294
3295
|
});
|
|
3295
3296
|
})(K0)), K0.exports;
|
|
3296
3297
|
}
|
|
3297
|
-
var
|
|
3298
|
+
var G0 = { exports: {} }, jt = G0.exports, xe;
|
|
3298
3299
|
function Kt() {
|
|
3299
3300
|
return xe || (xe = 1, (function(r, l) {
|
|
3300
|
-
(function(
|
|
3301
|
+
(function(x, e, d) {
|
|
3301
3302
|
r.exports = e(U(), K());
|
|
3302
|
-
})(jt, function(
|
|
3303
|
-
return
|
|
3304
|
-
var e =
|
|
3303
|
+
})(jt, function(x) {
|
|
3304
|
+
return x.mode.ECB = (function() {
|
|
3305
|
+
var e = x.lib.BlockCipherMode.extend();
|
|
3305
3306
|
return e.Encryptor = e.extend({
|
|
3306
|
-
processBlock: function(
|
|
3307
|
-
this._cipher.encryptBlock(
|
|
3307
|
+
processBlock: function(d, v) {
|
|
3308
|
+
this._cipher.encryptBlock(d, v);
|
|
3308
3309
|
}
|
|
3309
3310
|
}), e.Decryptor = e.extend({
|
|
3310
|
-
processBlock: function(
|
|
3311
|
-
this._cipher.decryptBlock(
|
|
3311
|
+
processBlock: function(d, v) {
|
|
3312
|
+
this._cipher.decryptBlock(d, v);
|
|
3312
3313
|
}
|
|
3313
3314
|
}), e;
|
|
3314
|
-
})(),
|
|
3315
|
+
})(), x.mode.ECB;
|
|
3315
3316
|
});
|
|
3316
|
-
})(
|
|
3317
|
+
})(G0)), G0.exports;
|
|
3317
3318
|
}
|
|
3318
|
-
var
|
|
3319
|
-
function
|
|
3319
|
+
var X0 = { exports: {} }, Gt = X0.exports, ae;
|
|
3320
|
+
function Xt() {
|
|
3320
3321
|
return ae || (ae = 1, (function(r, l) {
|
|
3321
|
-
(function(
|
|
3322
|
+
(function(x, e, d) {
|
|
3322
3323
|
r.exports = e(U(), K());
|
|
3323
|
-
})(
|
|
3324
|
-
return
|
|
3325
|
-
pad: function(e,
|
|
3326
|
-
var
|
|
3327
|
-
e.clamp(), e.words[C >>> 2] |=
|
|
3324
|
+
})(Gt, function(x) {
|
|
3325
|
+
return x.pad.AnsiX923 = {
|
|
3326
|
+
pad: function(e, d) {
|
|
3327
|
+
var v = e.sigBytes, F = d * 4, p = F - v % F, C = v + p - 1;
|
|
3328
|
+
e.clamp(), e.words[C >>> 2] |= p << 24 - C % 4 * 8, e.sigBytes += p;
|
|
3328
3329
|
},
|
|
3329
3330
|
unpad: function(e) {
|
|
3330
|
-
var
|
|
3331
|
-
e.sigBytes -=
|
|
3331
|
+
var d = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3332
|
+
e.sigBytes -= d;
|
|
3332
3333
|
}
|
|
3333
|
-
},
|
|
3334
|
+
}, x.pad.Ansix923;
|
|
3334
3335
|
});
|
|
3335
|
-
})(
|
|
3336
|
+
})(X0)), X0.exports;
|
|
3336
3337
|
}
|
|
3337
3338
|
var Y0 = { exports: {} }, Yt = Y0.exports, ne;
|
|
3338
3339
|
function Zt() {
|
|
3339
3340
|
return ne || (ne = 1, (function(r, l) {
|
|
3340
|
-
(function(
|
|
3341
|
+
(function(x, e, d) {
|
|
3341
3342
|
r.exports = e(U(), K());
|
|
3342
|
-
})(Yt, function(
|
|
3343
|
-
return
|
|
3344
|
-
pad: function(e,
|
|
3345
|
-
var
|
|
3346
|
-
e.concat(
|
|
3343
|
+
})(Yt, function(x) {
|
|
3344
|
+
return x.pad.Iso10126 = {
|
|
3345
|
+
pad: function(e, d) {
|
|
3346
|
+
var v = d * 4, F = v - e.sigBytes % v;
|
|
3347
|
+
e.concat(x.lib.WordArray.random(F - 1)).concat(x.lib.WordArray.create([F << 24], 1));
|
|
3347
3348
|
},
|
|
3348
3349
|
unpad: function(e) {
|
|
3349
|
-
var
|
|
3350
|
-
e.sigBytes -=
|
|
3350
|
+
var d = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3351
|
+
e.sigBytes -= d;
|
|
3351
3352
|
}
|
|
3352
|
-
},
|
|
3353
|
+
}, x.pad.Iso10126;
|
|
3353
3354
|
});
|
|
3354
3355
|
})(Y0)), Y0.exports;
|
|
3355
3356
|
}
|
|
3356
3357
|
var Z0 = { exports: {} }, Qt = Z0.exports, oe;
|
|
3357
3358
|
function Vt() {
|
|
3358
3359
|
return oe || (oe = 1, (function(r, l) {
|
|
3359
|
-
(function(
|
|
3360
|
+
(function(x, e, d) {
|
|
3360
3361
|
r.exports = e(U(), K());
|
|
3361
|
-
})(Qt, function(
|
|
3362
|
-
return
|
|
3363
|
-
pad: function(e,
|
|
3364
|
-
e.concat(
|
|
3362
|
+
})(Qt, function(x) {
|
|
3363
|
+
return x.pad.Iso97971 = {
|
|
3364
|
+
pad: function(e, d) {
|
|
3365
|
+
e.concat(x.lib.WordArray.create([2147483648], 1)), x.pad.ZeroPadding.pad(e, d);
|
|
3365
3366
|
},
|
|
3366
3367
|
unpad: function(e) {
|
|
3367
|
-
|
|
3368
|
+
x.pad.ZeroPadding.unpad(e), e.sigBytes--;
|
|
3368
3369
|
}
|
|
3369
|
-
},
|
|
3370
|
+
}, x.pad.Iso97971;
|
|
3370
3371
|
});
|
|
3371
3372
|
})(Z0)), Z0.exports;
|
|
3372
3373
|
}
|
|
3373
3374
|
var Q0 = { exports: {} }, Jt = Q0.exports, ie;
|
|
3374
3375
|
function rx() {
|
|
3375
3376
|
return ie || (ie = 1, (function(r, l) {
|
|
3376
|
-
(function(
|
|
3377
|
+
(function(x, e, d) {
|
|
3377
3378
|
r.exports = e(U(), K());
|
|
3378
|
-
})(Jt, function(
|
|
3379
|
-
return
|
|
3380
|
-
pad: function(e,
|
|
3381
|
-
var
|
|
3382
|
-
e.clamp(), e.sigBytes +=
|
|
3379
|
+
})(Jt, function(x) {
|
|
3380
|
+
return x.pad.ZeroPadding = {
|
|
3381
|
+
pad: function(e, d) {
|
|
3382
|
+
var v = d * 4;
|
|
3383
|
+
e.clamp(), e.sigBytes += v - (e.sigBytes % v || v);
|
|
3383
3384
|
},
|
|
3384
3385
|
unpad: function(e) {
|
|
3385
|
-
for (var
|
|
3386
|
-
if (
|
|
3387
|
-
e.sigBytes =
|
|
3386
|
+
for (var d = e.words, v = e.sigBytes - 1, v = e.sigBytes - 1; v >= 0; v--)
|
|
3387
|
+
if (d[v >>> 2] >>> 24 - v % 4 * 8 & 255) {
|
|
3388
|
+
e.sigBytes = v + 1;
|
|
3388
3389
|
break;
|
|
3389
3390
|
}
|
|
3390
3391
|
}
|
|
3391
|
-
},
|
|
3392
|
+
}, x.pad.ZeroPadding;
|
|
3392
3393
|
});
|
|
3393
3394
|
})(Q0)), Q0.exports;
|
|
3394
3395
|
}
|
|
3395
3396
|
var V0 = { exports: {} }, ex = V0.exports, se;
|
|
3396
3397
|
function tx() {
|
|
3397
3398
|
return se || (se = 1, (function(r, l) {
|
|
3398
|
-
(function(
|
|
3399
|
+
(function(x, e, d) {
|
|
3399
3400
|
r.exports = e(U(), K());
|
|
3400
|
-
})(ex, function(
|
|
3401
|
-
return
|
|
3401
|
+
})(ex, function(x) {
|
|
3402
|
+
return x.pad.NoPadding = {
|
|
3402
3403
|
pad: function() {
|
|
3403
3404
|
},
|
|
3404
3405
|
unpad: function() {
|
|
3405
3406
|
}
|
|
3406
|
-
},
|
|
3407
|
+
}, x.pad.NoPadding;
|
|
3407
3408
|
});
|
|
3408
3409
|
})(V0)), V0.exports;
|
|
3409
3410
|
}
|
|
3410
3411
|
var J0 = { exports: {} }, xx = J0.exports, ce;
|
|
3411
3412
|
function ax() {
|
|
3412
3413
|
return ce || (ce = 1, (function(r, l) {
|
|
3413
|
-
(function(
|
|
3414
|
+
(function(x, e, d) {
|
|
3414
3415
|
r.exports = e(U(), K());
|
|
3415
|
-
})(xx, function(
|
|
3416
|
+
})(xx, function(x) {
|
|
3416
3417
|
return (function(e) {
|
|
3417
|
-
var
|
|
3418
|
-
|
|
3418
|
+
var d = x, v = d.lib, F = v.CipherParams, p = d.enc, C = p.Hex, t = d.format;
|
|
3419
|
+
t.Hex = {
|
|
3419
3420
|
/**
|
|
3420
3421
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
3421
3422
|
*
|
|
@@ -3450,78 +3451,78 @@ function ax() {
|
|
|
3450
3451
|
return F.create({ ciphertext: A });
|
|
3451
3452
|
}
|
|
3452
3453
|
};
|
|
3453
|
-
})(),
|
|
3454
|
+
})(), x.format.Hex;
|
|
3454
3455
|
});
|
|
3455
3456
|
})(J0)), J0.exports;
|
|
3456
3457
|
}
|
|
3457
3458
|
var rr = { exports: {} }, nx = rr.exports, fe;
|
|
3458
3459
|
function ox() {
|
|
3459
3460
|
return fe || (fe = 1, (function(r, l) {
|
|
3460
|
-
(function(
|
|
3461
|
+
(function(x, e, d) {
|
|
3461
3462
|
r.exports = e(U(), a0(), n0(), t0(), K());
|
|
3462
|
-
})(nx, function(
|
|
3463
|
+
})(nx, function(x) {
|
|
3463
3464
|
return (function() {
|
|
3464
|
-
var e =
|
|
3465
|
+
var e = x, d = e.lib, v = d.BlockCipher, F = e.algo, p = [], C = [], t = [], a = [], A = [], n = [], u = [], c = [], h = [], f = [];
|
|
3465
3466
|
(function() {
|
|
3466
3467
|
for (var i = [], s = 0; s < 256; s++)
|
|
3467
3468
|
s < 128 ? i[s] = s << 1 : i[s] = s << 1 ^ 283;
|
|
3468
3469
|
for (var D = 0, g = 0, s = 0; s < 256; s++) {
|
|
3469
|
-
var
|
|
3470
|
-
|
|
3471
|
-
var w = i[D], z = i[w],
|
|
3472
|
-
|
|
3473
|
-
var
|
|
3474
|
-
|
|
3470
|
+
var m = g ^ g << 1 ^ g << 2 ^ g << 3 ^ g << 4;
|
|
3471
|
+
m = m >>> 8 ^ m & 255 ^ 99, p[D] = m, C[m] = D;
|
|
3472
|
+
var w = i[D], z = i[w], B = i[z], _ = i[m] * 257 ^ m * 16843008;
|
|
3473
|
+
t[D] = _ << 24 | _ >>> 8, a[D] = _ << 16 | _ >>> 16, A[D] = _ << 8 | _ >>> 24, n[D] = _;
|
|
3474
|
+
var _ = B * 16843009 ^ z * 65537 ^ w * 257 ^ D * 16843008;
|
|
3475
|
+
u[m] = _ << 24 | _ >>> 8, c[m] = _ << 16 | _ >>> 16, h[m] = _ << 8 | _ >>> 24, f[m] = _, D ? (D = w ^ i[i[i[B ^ w]]], g ^= i[i[g]]) : D = g = 1;
|
|
3475
3476
|
}
|
|
3476
3477
|
})();
|
|
3477
|
-
var E = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], o = F.AES =
|
|
3478
|
+
var E = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], o = F.AES = v.extend({
|
|
3478
3479
|
_doReset: function() {
|
|
3479
3480
|
var i;
|
|
3480
3481
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
3481
|
-
for (var s = this._keyPriorReset = this._key, D = s.words, g = s.sigBytes / 4,
|
|
3482
|
-
|
|
3483
|
-
for (var
|
|
3484
|
-
var
|
|
3482
|
+
for (var s = this._keyPriorReset = this._key, D = s.words, g = s.sigBytes / 4, m = this._nRounds = g + 6, w = (m + 1) * 4, z = this._keySchedule = [], B = 0; B < w; B++)
|
|
3483
|
+
B < g ? z[B] = D[B] : (i = z[B - 1], B % g ? g > 6 && B % g == 4 && (i = p[i >>> 24] << 24 | p[i >>> 16 & 255] << 16 | p[i >>> 8 & 255] << 8 | p[i & 255]) : (i = i << 8 | i >>> 24, i = p[i >>> 24] << 24 | p[i >>> 16 & 255] << 16 | p[i >>> 8 & 255] << 8 | p[i & 255], i ^= E[B / g | 0] << 24), z[B] = z[B - g] ^ i);
|
|
3484
|
+
for (var _ = this._invKeySchedule = [], P = 0; P < w; P++) {
|
|
3485
|
+
var B = w - P;
|
|
3485
3486
|
if (P % 4)
|
|
3486
|
-
var i = z[
|
|
3487
|
+
var i = z[B];
|
|
3487
3488
|
else
|
|
3488
|
-
var i = z[
|
|
3489
|
-
P < 4 ||
|
|
3489
|
+
var i = z[B - 4];
|
|
3490
|
+
P < 4 || B <= 4 ? _[P] = i : _[P] = u[p[i >>> 24]] ^ c[p[i >>> 16 & 255]] ^ h[p[i >>> 8 & 255]] ^ f[p[i & 255]];
|
|
3490
3491
|
}
|
|
3491
3492
|
}
|
|
3492
3493
|
},
|
|
3493
3494
|
encryptBlock: function(i, s) {
|
|
3494
|
-
this._doCryptBlock(i, s, this._keySchedule,
|
|
3495
|
+
this._doCryptBlock(i, s, this._keySchedule, t, a, A, n, p);
|
|
3495
3496
|
},
|
|
3496
3497
|
decryptBlock: function(i, s) {
|
|
3497
3498
|
var D = i[s + 1];
|
|
3498
|
-
i[s + 1] = i[s + 3], i[s + 3] = D, this._doCryptBlock(i, s, this._invKeySchedule,
|
|
3499
|
+
i[s + 1] = i[s + 3], i[s + 3] = D, this._doCryptBlock(i, s, this._invKeySchedule, u, c, h, f, C);
|
|
3499
3500
|
var D = i[s + 1];
|
|
3500
3501
|
i[s + 1] = i[s + 3], i[s + 3] = D;
|
|
3501
3502
|
},
|
|
3502
|
-
_doCryptBlock: function(i, s, D, g,
|
|
3503
|
-
for (var
|
|
3504
|
-
var W = g[P >>> 24] ^
|
|
3505
|
-
P = W, H = O,
|
|
3503
|
+
_doCryptBlock: function(i, s, D, g, m, w, z, B) {
|
|
3504
|
+
for (var _ = this._nRounds, P = i[s] ^ D[0], H = i[s + 1] ^ D[1], L = i[s + 2] ^ D[2], q = i[s + 3] ^ D[3], y = 4, $ = 1; $ < _; $++) {
|
|
3505
|
+
var W = g[P >>> 24] ^ m[H >>> 16 & 255] ^ w[L >>> 8 & 255] ^ z[q & 255] ^ D[y++], O = g[H >>> 24] ^ m[L >>> 16 & 255] ^ w[q >>> 8 & 255] ^ z[P & 255] ^ D[y++], I = g[L >>> 24] ^ m[q >>> 16 & 255] ^ w[P >>> 8 & 255] ^ z[H & 255] ^ D[y++], b = g[q >>> 24] ^ m[P >>> 16 & 255] ^ w[H >>> 8 & 255] ^ z[L & 255] ^ D[y++];
|
|
3506
|
+
P = W, H = O, L = I, q = b;
|
|
3506
3507
|
}
|
|
3507
|
-
var W = (
|
|
3508
|
+
var W = (B[P >>> 24] << 24 | B[H >>> 16 & 255] << 16 | B[L >>> 8 & 255] << 8 | B[q & 255]) ^ D[y++], O = (B[H >>> 24] << 24 | B[L >>> 16 & 255] << 16 | B[q >>> 8 & 255] << 8 | B[P & 255]) ^ D[y++], I = (B[L >>> 24] << 24 | B[q >>> 16 & 255] << 16 | B[P >>> 8 & 255] << 8 | B[H & 255]) ^ D[y++], b = (B[q >>> 24] << 24 | B[P >>> 16 & 255] << 16 | B[H >>> 8 & 255] << 8 | B[L & 255]) ^ D[y++];
|
|
3508
3509
|
i[s] = W, i[s + 1] = O, i[s + 2] = I, i[s + 3] = b;
|
|
3509
3510
|
},
|
|
3510
3511
|
keySize: 256 / 32
|
|
3511
3512
|
});
|
|
3512
|
-
e.AES =
|
|
3513
|
-
})(),
|
|
3513
|
+
e.AES = v._createHelper(o);
|
|
3514
|
+
})(), x.AES;
|
|
3514
3515
|
});
|
|
3515
3516
|
})(rr)), rr.exports;
|
|
3516
3517
|
}
|
|
3517
3518
|
var er = { exports: {} }, ix = er.exports, de;
|
|
3518
3519
|
function sx() {
|
|
3519
3520
|
return de || (de = 1, (function(r, l) {
|
|
3520
|
-
(function(
|
|
3521
|
+
(function(x, e, d) {
|
|
3521
3522
|
r.exports = e(U(), a0(), n0(), t0(), K());
|
|
3522
|
-
})(ix, function(
|
|
3523
|
+
})(ix, function(x) {
|
|
3523
3524
|
return (function() {
|
|
3524
|
-
var e =
|
|
3525
|
+
var e = x, d = e.lib, v = d.WordArray, F = d.BlockCipher, p = e.algo, C = [
|
|
3525
3526
|
57,
|
|
3526
3527
|
49,
|
|
3527
3528
|
41,
|
|
@@ -3578,7 +3579,7 @@ function sx() {
|
|
|
3578
3579
|
20,
|
|
3579
3580
|
12,
|
|
3580
3581
|
4
|
|
3581
|
-
],
|
|
3582
|
+
], t = [
|
|
3582
3583
|
14,
|
|
3583
3584
|
17,
|
|
3584
3585
|
11,
|
|
@@ -4165,22 +4166,22 @@ function sx() {
|
|
|
4165
4166
|
8064,
|
|
4166
4167
|
504,
|
|
4167
4168
|
2147483679
|
|
4168
|
-
],
|
|
4169
|
+
], u = p.DES = F.extend({
|
|
4169
4170
|
_doReset: function() {
|
|
4170
4171
|
for (var E = this._key, o = E.words, i = [], s = 0; s < 56; s++) {
|
|
4171
4172
|
var D = C[s] - 1;
|
|
4172
4173
|
i[s] = o[D >>> 5] >>> 31 - D % 32 & 1;
|
|
4173
4174
|
}
|
|
4174
|
-
for (var g = this._subKeys = [],
|
|
4175
|
-
for (var w = g[
|
|
4176
|
-
w[s / 6 | 0] |= i[(
|
|
4175
|
+
for (var g = this._subKeys = [], m = 0; m < 16; m++) {
|
|
4176
|
+
for (var w = g[m] = [], z = a[m], s = 0; s < 24; s++)
|
|
4177
|
+
w[s / 6 | 0] |= i[(t[s] - 1 + z) % 28] << 31 - s % 6, w[4 + (s / 6 | 0)] |= i[28 + (t[s + 24] - 1 + z) % 28] << 31 - s % 6;
|
|
4177
4178
|
w[0] = w[0] << 1 | w[0] >>> 31;
|
|
4178
4179
|
for (var s = 1; s < 7; s++)
|
|
4179
4180
|
w[s] = w[s] >>> (s - 1) * 4 + 3;
|
|
4180
4181
|
w[7] = w[7] << 5 | w[7] >>> 27;
|
|
4181
4182
|
}
|
|
4182
|
-
for (var
|
|
4183
|
-
|
|
4183
|
+
for (var B = this._invSubKeys = [], s = 0; s < 16; s++)
|
|
4184
|
+
B[s] = g[15 - s];
|
|
4184
4185
|
},
|
|
4185
4186
|
encryptBlock: function(E, o) {
|
|
4186
4187
|
this._doCryptBlock(E, o, this._subKeys);
|
|
@@ -4189,14 +4190,14 @@ function sx() {
|
|
|
4189
4190
|
this._doCryptBlock(E, o, this._invSubKeys);
|
|
4190
4191
|
},
|
|
4191
4192
|
_doCryptBlock: function(E, o, i) {
|
|
4192
|
-
this._lBlock = E[o], this._rBlock = E[o + 1], c.call(this, 4, 252645135), c.call(this, 16, 65535),
|
|
4193
|
+
this._lBlock = E[o], this._rBlock = E[o + 1], c.call(this, 4, 252645135), c.call(this, 16, 65535), h.call(this, 2, 858993459), h.call(this, 8, 16711935), c.call(this, 1, 1431655765);
|
|
4193
4194
|
for (var s = 0; s < 16; s++) {
|
|
4194
|
-
for (var D = i[s], g = this._lBlock,
|
|
4195
|
-
w |= A[z][((
|
|
4196
|
-
this._lBlock =
|
|
4195
|
+
for (var D = i[s], g = this._lBlock, m = this._rBlock, w = 0, z = 0; z < 8; z++)
|
|
4196
|
+
w |= A[z][((m ^ D[z]) & n[z]) >>> 0];
|
|
4197
|
+
this._lBlock = m, this._rBlock = g ^ w;
|
|
4197
4198
|
}
|
|
4198
|
-
var
|
|
4199
|
-
this._lBlock = this._rBlock, this._rBlock =
|
|
4199
|
+
var B = this._lBlock;
|
|
4200
|
+
this._lBlock = this._rBlock, this._rBlock = B, c.call(this, 1, 1431655765), h.call(this, 8, 16711935), h.call(this, 2, 858993459), c.call(this, 16, 65535), c.call(this, 4, 252645135), E[o] = this._lBlock, E[o + 1] = this._rBlock;
|
|
4200
4201
|
},
|
|
4201
4202
|
keySize: 64 / 32,
|
|
4202
4203
|
ivSize: 64 / 32,
|
|
@@ -4206,18 +4207,18 @@ function sx() {
|
|
|
4206
4207
|
var i = (this._lBlock >>> E ^ this._rBlock) & o;
|
|
4207
4208
|
this._rBlock ^= i, this._lBlock ^= i << E;
|
|
4208
4209
|
}
|
|
4209
|
-
function
|
|
4210
|
+
function h(E, o) {
|
|
4210
4211
|
var i = (this._rBlock >>> E ^ this._lBlock) & o;
|
|
4211
4212
|
this._lBlock ^= i, this._rBlock ^= i << E;
|
|
4212
4213
|
}
|
|
4213
|
-
e.DES = F._createHelper(
|
|
4214
|
-
var f =
|
|
4214
|
+
e.DES = F._createHelper(u);
|
|
4215
|
+
var f = p.TripleDES = F.extend({
|
|
4215
4216
|
_doReset: function() {
|
|
4216
4217
|
var E = this._key, o = E.words;
|
|
4217
4218
|
if (o.length !== 2 && o.length !== 4 && o.length < 6)
|
|
4218
4219
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4219
4220
|
var i = o.slice(0, 2), s = o.length < 4 ? o.slice(0, 2) : o.slice(2, 4), D = o.length < 6 ? o.slice(0, 2) : o.slice(4, 6);
|
|
4220
|
-
this._des1 =
|
|
4221
|
+
this._des1 = u.createEncryptor(v.create(i)), this._des2 = u.createEncryptor(v.create(s)), this._des3 = u.createEncryptor(v.create(D));
|
|
4221
4222
|
},
|
|
4222
4223
|
encryptBlock: function(E, o) {
|
|
4223
4224
|
this._des1.encryptBlock(E, o), this._des2.decryptBlock(E, o), this._des3.encryptBlock(E, o);
|
|
@@ -4230,26 +4231,26 @@ function sx() {
|
|
|
4230
4231
|
blockSize: 64 / 32
|
|
4231
4232
|
});
|
|
4232
4233
|
e.TripleDES = F._createHelper(f);
|
|
4233
|
-
})(),
|
|
4234
|
+
})(), x.TripleDES;
|
|
4234
4235
|
});
|
|
4235
4236
|
})(er)), er.exports;
|
|
4236
4237
|
}
|
|
4237
4238
|
var tr = { exports: {} }, cx = tr.exports, ue;
|
|
4238
4239
|
function fx() {
|
|
4239
4240
|
return ue || (ue = 1, (function(r, l) {
|
|
4240
|
-
(function(
|
|
4241
|
+
(function(x, e, d) {
|
|
4241
4242
|
r.exports = e(U(), a0(), n0(), t0(), K());
|
|
4242
|
-
})(cx, function(
|
|
4243
|
+
})(cx, function(x) {
|
|
4243
4244
|
return (function() {
|
|
4244
|
-
var e =
|
|
4245
|
+
var e = x, d = e.lib, v = d.StreamCipher, F = e.algo, p = F.RC4 = v.extend({
|
|
4245
4246
|
_doReset: function() {
|
|
4246
|
-
for (var a = this._key, A = a.words, n = a.sigBytes,
|
|
4247
|
-
|
|
4248
|
-
for (var c = 0,
|
|
4247
|
+
for (var a = this._key, A = a.words, n = a.sigBytes, u = this._S = [], c = 0; c < 256; c++)
|
|
4248
|
+
u[c] = c;
|
|
4249
|
+
for (var c = 0, h = 0; c < 256; c++) {
|
|
4249
4250
|
var f = c % n, E = A[f >>> 2] >>> 24 - f % 4 * 8 & 255;
|
|
4250
|
-
|
|
4251
|
-
var o =
|
|
4252
|
-
|
|
4251
|
+
h = (h + u[c] + E) % 256;
|
|
4252
|
+
var o = u[c];
|
|
4253
|
+
u[c] = u[h], u[h] = o;
|
|
4253
4254
|
}
|
|
4254
4255
|
this._i = this._j = 0;
|
|
4255
4256
|
},
|
|
@@ -4260,46 +4261,46 @@ function fx() {
|
|
|
4260
4261
|
ivSize: 0
|
|
4261
4262
|
});
|
|
4262
4263
|
function C() {
|
|
4263
|
-
for (var a = this._S, A = this._i, n = this._j,
|
|
4264
|
+
for (var a = this._S, A = this._i, n = this._j, u = 0, c = 0; c < 4; c++) {
|
|
4264
4265
|
A = (A + 1) % 256, n = (n + a[A]) % 256;
|
|
4265
|
-
var
|
|
4266
|
-
a[A] = a[n], a[n] =
|
|
4266
|
+
var h = a[A];
|
|
4267
|
+
a[A] = a[n], a[n] = h, u |= a[(a[A] + a[n]) % 256] << 24 - c * 8;
|
|
4267
4268
|
}
|
|
4268
|
-
return this._i = A, this._j = n,
|
|
4269
|
+
return this._i = A, this._j = n, u;
|
|
4269
4270
|
}
|
|
4270
|
-
e.RC4 =
|
|
4271
|
-
var
|
|
4271
|
+
e.RC4 = v._createHelper(p);
|
|
4272
|
+
var t = F.RC4Drop = p.extend({
|
|
4272
4273
|
/**
|
|
4273
4274
|
* Configuration options.
|
|
4274
4275
|
*
|
|
4275
4276
|
* @property {number} drop The number of keystream words to drop. Default 192
|
|
4276
4277
|
*/
|
|
4277
|
-
cfg:
|
|
4278
|
+
cfg: p.cfg.extend({
|
|
4278
4279
|
drop: 192
|
|
4279
4280
|
}),
|
|
4280
4281
|
_doReset: function() {
|
|
4281
|
-
|
|
4282
|
+
p._doReset.call(this);
|
|
4282
4283
|
for (var a = this.cfg.drop; a > 0; a--)
|
|
4283
4284
|
C.call(this);
|
|
4284
4285
|
}
|
|
4285
4286
|
});
|
|
4286
|
-
e.RC4Drop =
|
|
4287
|
-
})(),
|
|
4287
|
+
e.RC4Drop = v._createHelper(t);
|
|
4288
|
+
})(), x.RC4;
|
|
4288
4289
|
});
|
|
4289
4290
|
})(tr)), tr.exports;
|
|
4290
4291
|
}
|
|
4291
4292
|
var xr = { exports: {} }, dx = xr.exports, le;
|
|
4292
4293
|
function ux() {
|
|
4293
4294
|
return le || (le = 1, (function(r, l) {
|
|
4294
|
-
(function(
|
|
4295
|
+
(function(x, e, d) {
|
|
4295
4296
|
r.exports = e(U(), a0(), n0(), t0(), K());
|
|
4296
|
-
})(dx, function(
|
|
4297
|
+
})(dx, function(x) {
|
|
4297
4298
|
return (function() {
|
|
4298
|
-
var e =
|
|
4299
|
+
var e = x, d = e.lib, v = d.StreamCipher, F = e.algo, p = [], C = [], t = [], a = F.Rabbit = v.extend({
|
|
4299
4300
|
_doReset: function() {
|
|
4300
|
-
for (var n = this._key.words,
|
|
4301
|
+
for (var n = this._key.words, u = this.cfg.iv, c = 0; c < 4; c++)
|
|
4301
4302
|
n[c] = (n[c] << 8 | n[c] >>> 24) & 16711935 | (n[c] << 24 | n[c] >>> 8) & 4278255360;
|
|
4302
|
-
var
|
|
4303
|
+
var h = this._X = [
|
|
4303
4304
|
n[0],
|
|
4304
4305
|
n[3] << 16 | n[2] >>> 16,
|
|
4305
4306
|
n[1],
|
|
@@ -4322,48 +4323,48 @@ function ux() {
|
|
|
4322
4323
|
for (var c = 0; c < 4; c++)
|
|
4323
4324
|
A.call(this);
|
|
4324
4325
|
for (var c = 0; c < 8; c++)
|
|
4325
|
-
f[c] ^=
|
|
4326
|
-
if (
|
|
4327
|
-
var E =
|
|
4328
|
-
f[0] ^= s, f[1] ^= g, f[2] ^= D, f[3] ^=
|
|
4326
|
+
f[c] ^= h[c + 4 & 7];
|
|
4327
|
+
if (u) {
|
|
4328
|
+
var E = u.words, o = E[0], i = E[1], s = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, D = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, g = s >>> 16 | D & 4294901760, m = D << 16 | s & 65535;
|
|
4329
|
+
f[0] ^= s, f[1] ^= g, f[2] ^= D, f[3] ^= m, f[4] ^= s, f[5] ^= g, f[6] ^= D, f[7] ^= m;
|
|
4329
4330
|
for (var c = 0; c < 4; c++)
|
|
4330
4331
|
A.call(this);
|
|
4331
4332
|
}
|
|
4332
4333
|
},
|
|
4333
|
-
_doProcessBlock: function(n,
|
|
4334
|
+
_doProcessBlock: function(n, u) {
|
|
4334
4335
|
var c = this._X;
|
|
4335
|
-
A.call(this),
|
|
4336
|
-
for (var
|
|
4337
|
-
|
|
4336
|
+
A.call(this), p[0] = c[0] ^ c[5] >>> 16 ^ c[3] << 16, p[1] = c[2] ^ c[7] >>> 16 ^ c[5] << 16, p[2] = c[4] ^ c[1] >>> 16 ^ c[7] << 16, p[3] = c[6] ^ c[3] >>> 16 ^ c[1] << 16;
|
|
4337
|
+
for (var h = 0; h < 4; h++)
|
|
4338
|
+
p[h] = (p[h] << 8 | p[h] >>> 24) & 16711935 | (p[h] << 24 | p[h] >>> 8) & 4278255360, n[u + h] ^= p[h];
|
|
4338
4339
|
},
|
|
4339
4340
|
blockSize: 128 / 32,
|
|
4340
4341
|
ivSize: 64 / 32
|
|
4341
4342
|
});
|
|
4342
4343
|
function A() {
|
|
4343
|
-
for (var n = this._X,
|
|
4344
|
-
C[c] =
|
|
4345
|
-
|
|
4344
|
+
for (var n = this._X, u = this._C, c = 0; c < 8; c++)
|
|
4345
|
+
C[c] = u[c];
|
|
4346
|
+
u[0] = u[0] + 1295307597 + this._b | 0, u[1] = u[1] + 3545052371 + (u[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, u[2] = u[2] + 886263092 + (u[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, u[3] = u[3] + 1295307597 + (u[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, u[4] = u[4] + 3545052371 + (u[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, u[5] = u[5] + 886263092 + (u[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, u[6] = u[6] + 1295307597 + (u[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, u[7] = u[7] + 3545052371 + (u[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = u[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4346
4347
|
for (var c = 0; c < 8; c++) {
|
|
4347
|
-
var
|
|
4348
|
-
|
|
4348
|
+
var h = n[c] + u[c], f = h & 65535, E = h >>> 16, o = ((f * f >>> 17) + f * E >>> 15) + E * E, i = ((h & 4294901760) * h | 0) + ((h & 65535) * h | 0);
|
|
4349
|
+
t[c] = o ^ i;
|
|
4349
4350
|
}
|
|
4350
|
-
n[0] =
|
|
4351
|
+
n[0] = t[0] + (t[7] << 16 | t[7] >>> 16) + (t[6] << 16 | t[6] >>> 16) | 0, n[1] = t[1] + (t[0] << 8 | t[0] >>> 24) + t[7] | 0, n[2] = t[2] + (t[1] << 16 | t[1] >>> 16) + (t[0] << 16 | t[0] >>> 16) | 0, n[3] = t[3] + (t[2] << 8 | t[2] >>> 24) + t[1] | 0, n[4] = t[4] + (t[3] << 16 | t[3] >>> 16) + (t[2] << 16 | t[2] >>> 16) | 0, n[5] = t[5] + (t[4] << 8 | t[4] >>> 24) + t[3] | 0, n[6] = t[6] + (t[5] << 16 | t[5] >>> 16) + (t[4] << 16 | t[4] >>> 16) | 0, n[7] = t[7] + (t[6] << 8 | t[6] >>> 24) + t[5] | 0;
|
|
4351
4352
|
}
|
|
4352
|
-
e.Rabbit =
|
|
4353
|
-
})(),
|
|
4353
|
+
e.Rabbit = v._createHelper(a);
|
|
4354
|
+
})(), x.Rabbit;
|
|
4354
4355
|
});
|
|
4355
4356
|
})(xr)), xr.exports;
|
|
4356
4357
|
}
|
|
4357
4358
|
var ar = { exports: {} }, lx = ar.exports, he;
|
|
4358
4359
|
function hx() {
|
|
4359
4360
|
return he || (he = 1, (function(r, l) {
|
|
4360
|
-
(function(
|
|
4361
|
+
(function(x, e, d) {
|
|
4361
4362
|
r.exports = e(U(), a0(), n0(), t0(), K());
|
|
4362
|
-
})(lx, function(
|
|
4363
|
+
})(lx, function(x) {
|
|
4363
4364
|
return (function() {
|
|
4364
|
-
var e =
|
|
4365
|
+
var e = x, d = e.lib, v = d.StreamCipher, F = e.algo, p = [], C = [], t = [], a = F.RabbitLegacy = v.extend({
|
|
4365
4366
|
_doReset: function() {
|
|
4366
|
-
var n = this._key.words,
|
|
4367
|
+
var n = this._key.words, u = this.cfg.iv, c = this._X = [
|
|
4367
4368
|
n[0],
|
|
4368
4369
|
n[3] << 16 | n[2] >>> 16,
|
|
4369
4370
|
n[1],
|
|
@@ -4372,7 +4373,7 @@ function hx() {
|
|
|
4372
4373
|
n[1] << 16 | n[0] >>> 16,
|
|
4373
4374
|
n[3],
|
|
4374
4375
|
n[2] << 16 | n[1] >>> 16
|
|
4375
|
-
],
|
|
4376
|
+
], h = this._C = [
|
|
4376
4377
|
n[2] << 16 | n[2] >>> 16,
|
|
4377
4378
|
n[0] & 4294901760 | n[1] & 65535,
|
|
4378
4379
|
n[3] << 16 | n[3] >>> 16,
|
|
@@ -4386,47 +4387,47 @@ function hx() {
|
|
|
4386
4387
|
for (var f = 0; f < 4; f++)
|
|
4387
4388
|
A.call(this);
|
|
4388
4389
|
for (var f = 0; f < 8; f++)
|
|
4389
|
-
|
|
4390
|
-
if (
|
|
4391
|
-
var E =
|
|
4392
|
-
|
|
4390
|
+
h[f] ^= c[f + 4 & 7];
|
|
4391
|
+
if (u) {
|
|
4392
|
+
var E = u.words, o = E[0], i = E[1], s = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, D = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, g = s >>> 16 | D & 4294901760, m = D << 16 | s & 65535;
|
|
4393
|
+
h[0] ^= s, h[1] ^= g, h[2] ^= D, h[3] ^= m, h[4] ^= s, h[5] ^= g, h[6] ^= D, h[7] ^= m;
|
|
4393
4394
|
for (var f = 0; f < 4; f++)
|
|
4394
4395
|
A.call(this);
|
|
4395
4396
|
}
|
|
4396
4397
|
},
|
|
4397
|
-
_doProcessBlock: function(n,
|
|
4398
|
+
_doProcessBlock: function(n, u) {
|
|
4398
4399
|
var c = this._X;
|
|
4399
|
-
A.call(this),
|
|
4400
|
-
for (var
|
|
4401
|
-
|
|
4400
|
+
A.call(this), p[0] = c[0] ^ c[5] >>> 16 ^ c[3] << 16, p[1] = c[2] ^ c[7] >>> 16 ^ c[5] << 16, p[2] = c[4] ^ c[1] >>> 16 ^ c[7] << 16, p[3] = c[6] ^ c[3] >>> 16 ^ c[1] << 16;
|
|
4401
|
+
for (var h = 0; h < 4; h++)
|
|
4402
|
+
p[h] = (p[h] << 8 | p[h] >>> 24) & 16711935 | (p[h] << 24 | p[h] >>> 8) & 4278255360, n[u + h] ^= p[h];
|
|
4402
4403
|
},
|
|
4403
4404
|
blockSize: 128 / 32,
|
|
4404
4405
|
ivSize: 64 / 32
|
|
4405
4406
|
});
|
|
4406
4407
|
function A() {
|
|
4407
|
-
for (var n = this._X,
|
|
4408
|
-
C[c] =
|
|
4409
|
-
|
|
4408
|
+
for (var n = this._X, u = this._C, c = 0; c < 8; c++)
|
|
4409
|
+
C[c] = u[c];
|
|
4410
|
+
u[0] = u[0] + 1295307597 + this._b | 0, u[1] = u[1] + 3545052371 + (u[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, u[2] = u[2] + 886263092 + (u[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, u[3] = u[3] + 1295307597 + (u[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, u[4] = u[4] + 3545052371 + (u[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, u[5] = u[5] + 886263092 + (u[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, u[6] = u[6] + 1295307597 + (u[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, u[7] = u[7] + 3545052371 + (u[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = u[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4410
4411
|
for (var c = 0; c < 8; c++) {
|
|
4411
|
-
var
|
|
4412
|
-
|
|
4412
|
+
var h = n[c] + u[c], f = h & 65535, E = h >>> 16, o = ((f * f >>> 17) + f * E >>> 15) + E * E, i = ((h & 4294901760) * h | 0) + ((h & 65535) * h | 0);
|
|
4413
|
+
t[c] = o ^ i;
|
|
4413
4414
|
}
|
|
4414
|
-
n[0] =
|
|
4415
|
+
n[0] = t[0] + (t[7] << 16 | t[7] >>> 16) + (t[6] << 16 | t[6] >>> 16) | 0, n[1] = t[1] + (t[0] << 8 | t[0] >>> 24) + t[7] | 0, n[2] = t[2] + (t[1] << 16 | t[1] >>> 16) + (t[0] << 16 | t[0] >>> 16) | 0, n[3] = t[3] + (t[2] << 8 | t[2] >>> 24) + t[1] | 0, n[4] = t[4] + (t[3] << 16 | t[3] >>> 16) + (t[2] << 16 | t[2] >>> 16) | 0, n[5] = t[5] + (t[4] << 8 | t[4] >>> 24) + t[3] | 0, n[6] = t[6] + (t[5] << 16 | t[5] >>> 16) + (t[4] << 16 | t[4] >>> 16) | 0, n[7] = t[7] + (t[6] << 8 | t[6] >>> 24) + t[5] | 0;
|
|
4415
4416
|
}
|
|
4416
|
-
e.RabbitLegacy =
|
|
4417
|
-
})(),
|
|
4417
|
+
e.RabbitLegacy = v._createHelper(a);
|
|
4418
|
+
})(), x.RabbitLegacy;
|
|
4418
4419
|
});
|
|
4419
4420
|
})(ar)), ar.exports;
|
|
4420
4421
|
}
|
|
4421
4422
|
var nr = { exports: {} }, vx = nr.exports, ve;
|
|
4422
4423
|
function px() {
|
|
4423
4424
|
return ve || (ve = 1, (function(r, l) {
|
|
4424
|
-
(function(
|
|
4425
|
+
(function(x, e, d) {
|
|
4425
4426
|
r.exports = e(U(), a0(), n0(), t0(), K());
|
|
4426
|
-
})(vx, function(
|
|
4427
|
+
})(vx, function(x) {
|
|
4427
4428
|
return (function() {
|
|
4428
|
-
var e =
|
|
4429
|
-
const
|
|
4429
|
+
var e = x, d = e.lib, v = d.BlockCipher, F = e.algo;
|
|
4430
|
+
const p = 16, C = [
|
|
4430
4431
|
608135816,
|
|
4431
4432
|
2242054355,
|
|
4432
4433
|
320440878,
|
|
@@ -4445,7 +4446,7 @@ function px() {
|
|
|
4445
4446
|
3041331479,
|
|
4446
4447
|
2450970073,
|
|
4447
4448
|
2306472731
|
|
4448
|
-
],
|
|
4449
|
+
], t = [
|
|
4449
4450
|
[
|
|
4450
4451
|
3509652390,
|
|
4451
4452
|
2564797868,
|
|
@@ -5489,34 +5490,34 @@ function px() {
|
|
|
5489
5490
|
}
|
|
5490
5491
|
function n(f, E, o) {
|
|
5491
5492
|
let i = E, s = o, D;
|
|
5492
|
-
for (let g = 0; g <
|
|
5493
|
+
for (let g = 0; g < p; ++g)
|
|
5493
5494
|
i = i ^ f.pbox[g], s = A(f, i) ^ s, D = i, i = s, s = D;
|
|
5494
|
-
return D = i, i = s, s = D, s = s ^ f.pbox[
|
|
5495
|
+
return D = i, i = s, s = D, s = s ^ f.pbox[p], i = i ^ f.pbox[p + 1], { left: i, right: s };
|
|
5495
5496
|
}
|
|
5496
|
-
function
|
|
5497
|
+
function u(f, E, o) {
|
|
5497
5498
|
let i = E, s = o, D;
|
|
5498
|
-
for (let g =
|
|
5499
|
+
for (let g = p + 1; g > 1; --g)
|
|
5499
5500
|
i = i ^ f.pbox[g], s = A(f, i) ^ s, D = i, i = s, s = D;
|
|
5500
5501
|
return D = i, i = s, s = D, s = s ^ f.pbox[1], i = i ^ f.pbox[0], { left: i, right: s };
|
|
5501
5502
|
}
|
|
5502
5503
|
function c(f, E, o) {
|
|
5503
|
-
for (let
|
|
5504
|
-
f.sbox[
|
|
5504
|
+
for (let m = 0; m < 4; m++) {
|
|
5505
|
+
f.sbox[m] = [];
|
|
5505
5506
|
for (let w = 0; w < 256; w++)
|
|
5506
|
-
f.sbox[
|
|
5507
|
+
f.sbox[m][w] = t[m][w];
|
|
5507
5508
|
}
|
|
5508
5509
|
let i = 0;
|
|
5509
|
-
for (let
|
|
5510
|
-
f.pbox[
|
|
5510
|
+
for (let m = 0; m < p + 2; m++)
|
|
5511
|
+
f.pbox[m] = C[m] ^ E[i], i++, i >= o && (i = 0);
|
|
5511
5512
|
let s = 0, D = 0, g = 0;
|
|
5512
|
-
for (let
|
|
5513
|
-
g = n(f, s, D), s = g.left, D = g.right, f.pbox[
|
|
5514
|
-
for (let
|
|
5513
|
+
for (let m = 0; m < p + 2; m += 2)
|
|
5514
|
+
g = n(f, s, D), s = g.left, D = g.right, f.pbox[m] = s, f.pbox[m + 1] = D;
|
|
5515
|
+
for (let m = 0; m < 4; m++)
|
|
5515
5516
|
for (let w = 0; w < 256; w += 2)
|
|
5516
|
-
g = n(f, s, D), s = g.left, D = g.right, f.sbox[
|
|
5517
|
+
g = n(f, s, D), s = g.left, D = g.right, f.sbox[m][w] = s, f.sbox[m][w + 1] = D;
|
|
5517
5518
|
return !0;
|
|
5518
5519
|
}
|
|
5519
|
-
var
|
|
5520
|
+
var h = F.Blowfish = v.extend({
|
|
5520
5521
|
_doReset: function() {
|
|
5521
5522
|
if (this._keyPriorReset !== this._key) {
|
|
5522
5523
|
var f = this._keyPriorReset = this._key, E = f.words, o = f.sigBytes / 4;
|
|
@@ -5528,83 +5529,83 @@ function px() {
|
|
|
5528
5529
|
f[E] = o.left, f[E + 1] = o.right;
|
|
5529
5530
|
},
|
|
5530
5531
|
decryptBlock: function(f, E) {
|
|
5531
|
-
var o =
|
|
5532
|
+
var o = u(a, f[E], f[E + 1]);
|
|
5532
5533
|
f[E] = o.left, f[E + 1] = o.right;
|
|
5533
5534
|
},
|
|
5534
5535
|
blockSize: 64 / 32,
|
|
5535
5536
|
keySize: 128 / 32,
|
|
5536
5537
|
ivSize: 64 / 32
|
|
5537
5538
|
});
|
|
5538
|
-
e.Blowfish =
|
|
5539
|
-
})(),
|
|
5539
|
+
e.Blowfish = v._createHelper(h);
|
|
5540
|
+
})(), x.Blowfish;
|
|
5540
5541
|
});
|
|
5541
5542
|
})(nr)), nr.exports;
|
|
5542
5543
|
}
|
|
5543
5544
|
var Bx = b0.exports, pe;
|
|
5544
5545
|
function Cx() {
|
|
5545
5546
|
return pe || (pe = 1, (function(r, l) {
|
|
5546
|
-
(function(
|
|
5547
|
-
r.exports = e(U(), cr(), ht(), pt(), a0(), Et(), n0(), be(), Cr(), bt(),
|
|
5548
|
-
})(Bx, function(
|
|
5549
|
-
return
|
|
5547
|
+
(function(x, e, d) {
|
|
5548
|
+
r.exports = e(U(), cr(), ht(), pt(), a0(), Et(), n0(), be(), Cr(), bt(), _e(), yt(), kt(), Ht(), Er(), $t(), t0(), K(), Ot(), qt(), Mt(), Ut(), Kt(), Xt(), Zt(), Vt(), rx(), tx(), ax(), ox(), sx(), fx(), ux(), hx(), px());
|
|
5549
|
+
})(Bx, function(x) {
|
|
5550
|
+
return x;
|
|
5550
5551
|
});
|
|
5551
5552
|
})(b0)), b0.exports;
|
|
5552
5553
|
}
|
|
5553
5554
|
Cx();
|
|
5554
|
-
let
|
|
5555
|
+
let me = null, ye = null, we = null, ke = null;
|
|
5555
5556
|
Math.random().toString(36).substring(7);
|
|
5556
5557
|
function Ex(r) {
|
|
5557
|
-
|
|
5558
|
+
me = r.token, ye = r.apiUrl, we = r.deviceId, ke = r.domain;
|
|
5558
5559
|
}
|
|
5559
5560
|
function Ax() {
|
|
5560
5561
|
return {
|
|
5561
|
-
token:
|
|
5562
|
+
token: me,
|
|
5562
5563
|
apiUrl: ye,
|
|
5563
5564
|
deviceId: we,
|
|
5564
5565
|
domain: ke
|
|
5565
5566
|
};
|
|
5566
5567
|
}
|
|
5567
5568
|
function Fx(r) {
|
|
5568
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5569
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.125`;
|
|
5569
5570
|
}
|
|
5570
5571
|
function Dx(r, l) {
|
|
5571
|
-
const
|
|
5572
|
-
return new Worker(
|
|
5572
|
+
const x = Fx(r);
|
|
5573
|
+
return new Worker(x, { type: "module", ...l });
|
|
5573
5574
|
}
|
|
5574
5575
|
const Be = /* @__PURE__ */ new Map(), vr = /* @__PURE__ */ new Map();
|
|
5575
5576
|
let gx = 0;
|
|
5576
5577
|
function bx(r) {
|
|
5577
5578
|
const l = Be.get(r);
|
|
5578
5579
|
if (l) return l;
|
|
5579
|
-
const
|
|
5580
|
-
|
|
5581
|
-
const { id:
|
|
5582
|
-
if (
|
|
5583
|
-
if (vr.delete(
|
|
5584
|
-
|
|
5580
|
+
const x = Dx("./deform.worker.ts");
|
|
5581
|
+
x.onmessage = (d) => {
|
|
5582
|
+
const { id: v, imageBitmap: F, error: p, duration: C } = d.data ?? {}, t = vr.get(v);
|
|
5583
|
+
if (t) {
|
|
5584
|
+
if (vr.delete(v), p) {
|
|
5585
|
+
t.reject(new Error(p));
|
|
5585
5586
|
return;
|
|
5586
5587
|
}
|
|
5587
|
-
|
|
5588
|
+
t.resolve(F);
|
|
5588
5589
|
}
|
|
5589
|
-
},
|
|
5590
|
+
}, x.onerror = (d) => {
|
|
5590
5591
|
};
|
|
5591
5592
|
const e = () => {
|
|
5592
|
-
const
|
|
5593
|
-
return
|
|
5593
|
+
const d = Ax();
|
|
5594
|
+
return d.token ? (x.postMessage({
|
|
5594
5595
|
type: "SET_LICENSE",
|
|
5595
|
-
licenseToken:
|
|
5596
|
-
licenseApiUrl:
|
|
5597
|
-
deviceId:
|
|
5598
|
-
domain:
|
|
5596
|
+
licenseToken: d.token,
|
|
5597
|
+
licenseApiUrl: d.apiUrl,
|
|
5598
|
+
deviceId: d.deviceId,
|
|
5599
|
+
domain: d.domain
|
|
5599
5600
|
}), !0) : !1;
|
|
5600
5601
|
};
|
|
5601
5602
|
return e() || (setTimeout(() => {
|
|
5602
5603
|
e();
|
|
5603
5604
|
}, 200), setTimeout(() => {
|
|
5604
5605
|
e();
|
|
5605
|
-
}, 500)), Be.set(r,
|
|
5606
|
+
}, 500)), Be.set(r, x), x;
|
|
5606
5607
|
}
|
|
5607
|
-
function
|
|
5608
|
+
function _x(r) {
|
|
5608
5609
|
return {
|
|
5609
5610
|
name: r.name,
|
|
5610
5611
|
type: r.type,
|
|
@@ -5638,9 +5639,9 @@ function mx(r) {
|
|
|
5638
5639
|
vectorMask: r.vectorMask ? {
|
|
5639
5640
|
paths: r.vectorMask.paths?.map((l) => ({
|
|
5640
5641
|
open: l.open,
|
|
5641
|
-
knots: l.knots?.map((
|
|
5642
|
-
linked:
|
|
5643
|
-
points: [...
|
|
5642
|
+
knots: l.knots?.map((x) => ({
|
|
5643
|
+
linked: x.linked,
|
|
5644
|
+
points: [...x.points]
|
|
5644
5645
|
})),
|
|
5645
5646
|
fillRule: l.fillRule,
|
|
5646
5647
|
operation: l.operation
|
|
@@ -5659,16 +5660,16 @@ function mx(r) {
|
|
|
5659
5660
|
type: l.type,
|
|
5660
5661
|
enabled: l.enabled,
|
|
5661
5662
|
filter: l.filter ? {
|
|
5662
|
-
puppetShapeList: l.filter.puppetShapeList?.map((
|
|
5663
|
-
originalVertexArray:
|
|
5663
|
+
puppetShapeList: l.filter.puppetShapeList?.map((x) => ({
|
|
5664
|
+
originalVertexArray: x.originalVertexArray.map((e) => ({
|
|
5664
5665
|
x: e.x,
|
|
5665
5666
|
y: e.y
|
|
5666
5667
|
})),
|
|
5667
|
-
deformedVertexArray:
|
|
5668
|
+
deformedVertexArray: x.deformedVertexArray.map((e) => ({
|
|
5668
5669
|
x: e.x,
|
|
5669
5670
|
y: e.y
|
|
5670
5671
|
})),
|
|
5671
|
-
indexArray: [...
|
|
5672
|
+
indexArray: [...x.indexArray]
|
|
5672
5673
|
}))
|
|
5673
5674
|
} : void 0
|
|
5674
5675
|
})) : void 0,
|
|
@@ -5676,33 +5677,33 @@ function mx(r) {
|
|
|
5676
5677
|
clipping: r.clipping
|
|
5677
5678
|
};
|
|
5678
5679
|
}
|
|
5679
|
-
function
|
|
5680
|
-
const
|
|
5681
|
-
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((F,
|
|
5682
|
-
vr.set(
|
|
5683
|
-
resolve: (
|
|
5684
|
-
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), F(
|
|
5680
|
+
function mx(r, l, x, e) {
|
|
5681
|
+
const d = ++gx, v = bx(x);
|
|
5682
|
+
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((F, p) => {
|
|
5683
|
+
vr.set(d, {
|
|
5684
|
+
resolve: (t) => {
|
|
5685
|
+
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), F(t);
|
|
5685
5686
|
},
|
|
5686
|
-
reject:
|
|
5687
|
+
reject: p
|
|
5687
5688
|
});
|
|
5688
|
-
const C =
|
|
5689
|
-
|
|
5689
|
+
const C = _x(l);
|
|
5690
|
+
v.postMessage({ id: d, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5690
5691
|
r
|
|
5691
5692
|
]);
|
|
5692
5693
|
});
|
|
5693
5694
|
}
|
|
5694
|
-
async function yx(r, l,
|
|
5695
|
-
const F = await at(r,
|
|
5695
|
+
async function yx(r, l, x = 0, e, d, v) {
|
|
5696
|
+
const F = await at(r, d, v);
|
|
5696
5697
|
if (!F || F.width === 0 || F.height === 0)
|
|
5697
5698
|
throw new Error("图片无效:尺寸为 0");
|
|
5698
|
-
return await
|
|
5699
|
+
return await mx(F, l, x, e);
|
|
5699
5700
|
}
|
|
5700
5701
|
function s0(r, l) {
|
|
5701
5702
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5702
5703
|
return new OffscreenCanvas(r, l);
|
|
5703
5704
|
if (typeof document < "u") {
|
|
5704
|
-
const
|
|
5705
|
-
return
|
|
5705
|
+
const x = document.createElement("canvas");
|
|
5706
|
+
return x.width = r, x.height = l, x;
|
|
5706
5707
|
} else
|
|
5707
5708
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5708
5709
|
}
|
|
@@ -5719,12 +5720,12 @@ async function wx(r) {
|
|
|
5719
5720
|
performance.now();
|
|
5720
5721
|
const {
|
|
5721
5722
|
psdJson: l,
|
|
5722
|
-
materialList:
|
|
5723
|
+
materialList: x,
|
|
5723
5724
|
fabricScreenshotList: e,
|
|
5724
|
-
width:
|
|
5725
|
-
height:
|
|
5725
|
+
width: d,
|
|
5726
|
+
height: v,
|
|
5726
5727
|
baseUrl: F
|
|
5727
|
-
} = r,
|
|
5728
|
+
} = r, p = r.maxImageSize, C = (y) => {
|
|
5728
5729
|
if (!y || typeof y != "string" || !y.includes("http")) return;
|
|
5729
5730
|
if (/^(https?:)?\/\//i.test(y) || y.startsWith("data:") || y.startsWith("blob:"))
|
|
5730
5731
|
return y;
|
|
@@ -5736,12 +5737,12 @@ async function wx(r) {
|
|
|
5736
5737
|
} catch {
|
|
5737
5738
|
return;
|
|
5738
5739
|
}
|
|
5739
|
-
},
|
|
5740
|
-
for (const y of
|
|
5740
|
+
}, t = {}, a = /* @__PURE__ */ new Map();
|
|
5741
|
+
for (const y of x) {
|
|
5741
5742
|
const $ = y.sourceName || y.layerName;
|
|
5742
|
-
$ && (
|
|
5743
|
+
$ && (t[$] = {
|
|
5743
5744
|
url: y.url
|
|
5744
|
-
}, a.set($, y.url)), y.layerName && y.layerName !== $ && (
|
|
5745
|
+
}, a.set($, y.url)), y.layerName && y.layerName !== $ && (t[y.layerName] || (t[y.layerName] = {
|
|
5745
5746
|
url: y.url
|
|
5746
5747
|
}), a.set(y.layerName, y.url));
|
|
5747
5748
|
}
|
|
@@ -5752,30 +5753,30 @@ async function wx(r) {
|
|
|
5752
5753
|
const W = y.color || (y.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(y.name) ? y.name : $);
|
|
5753
5754
|
if (y.type === "Layer") {
|
|
5754
5755
|
if (y.imagePath) {
|
|
5755
|
-
const O =
|
|
5756
|
+
const O = x.find((I) => {
|
|
5756
5757
|
const b = I.sourceName || I.layerName;
|
|
5757
5758
|
return !b || !y.imagePath ? !1 : b === y.imagePath || b.endsWith(y.imagePath) || y.imagePath.endsWith(b);
|
|
5758
5759
|
});
|
|
5759
|
-
O && (
|
|
5760
|
+
O && (t[y.imagePath] = {
|
|
5760
5761
|
url: O.url
|
|
5761
5762
|
});
|
|
5762
5763
|
}
|
|
5763
5764
|
if (y.name) {
|
|
5764
5765
|
if (W) {
|
|
5765
|
-
const O = `${W}-${y.name}`, I =
|
|
5766
|
+
const O = `${W}-${y.name}`, I = x.find((b) => {
|
|
5766
5767
|
const k = b.sourceName || b.layerName;
|
|
5767
5768
|
return k ? (k.split("/").pop() || k).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${W}-${y.name}`) : !1;
|
|
5768
5769
|
});
|
|
5769
|
-
I && (
|
|
5770
|
+
I && (t[O] = {
|
|
5770
5771
|
url: I.url
|
|
5771
5772
|
});
|
|
5772
5773
|
}
|
|
5773
5774
|
if (y.imagePath && y.name) {
|
|
5774
|
-
const O = y.imagePath.split("/").pop() || y.imagePath, I =
|
|
5775
|
+
const O = y.imagePath.split("/").pop() || y.imagePath, I = x.find((b) => {
|
|
5775
5776
|
const k = b.sourceName || b.layerName;
|
|
5776
5777
|
return k ? (k.split("/").pop() || k) === O : !1;
|
|
5777
5778
|
});
|
|
5778
|
-
I && (
|
|
5779
|
+
I && (t[y.imagePath] = {
|
|
5779
5780
|
url: I.url
|
|
5780
5781
|
});
|
|
5781
5782
|
}
|
|
@@ -5785,7 +5786,7 @@ async function wx(r) {
|
|
|
5785
5786
|
for (const O of y.children)
|
|
5786
5787
|
O && n(O, W);
|
|
5787
5788
|
}
|
|
5788
|
-
function
|
|
5789
|
+
function u(y, $) {
|
|
5789
5790
|
const W = y.id ?? $;
|
|
5790
5791
|
if (y.type === "Group" && W && A.has(W)) {
|
|
5791
5792
|
const O = A.get(W);
|
|
@@ -5793,47 +5794,47 @@ async function wx(r) {
|
|
|
5793
5794
|
for (const I of y.children)
|
|
5794
5795
|
if (I && I.isSmartObject === !0) {
|
|
5795
5796
|
const b = I?.name || "";
|
|
5796
|
-
b && !
|
|
5797
|
+
b && !t[b] && (t[b] = {}), b && (t[b].designImage = O);
|
|
5797
5798
|
}
|
|
5798
5799
|
}
|
|
5799
5800
|
}
|
|
5800
5801
|
if (y.children)
|
|
5801
5802
|
for (const O of y.children)
|
|
5802
|
-
O &&
|
|
5803
|
+
O && u(O, W);
|
|
5803
5804
|
}
|
|
5804
5805
|
if (l.layerList)
|
|
5805
5806
|
for (const y of l.layerList)
|
|
5806
5807
|
y && n(y);
|
|
5807
5808
|
if (l.layerList)
|
|
5808
5809
|
for (const y of l.layerList)
|
|
5809
|
-
y &&
|
|
5810
|
-
const
|
|
5810
|
+
y && u(y);
|
|
5811
|
+
const h = Ke([{
|
|
5811
5812
|
psdJson: l,
|
|
5812
|
-
layerExtrasByName:
|
|
5813
|
+
layerExtrasByName: t
|
|
5813
5814
|
}], {
|
|
5814
5815
|
parts: [],
|
|
5815
5816
|
defaultIdStart: 1
|
|
5816
5817
|
});
|
|
5817
|
-
if (!
|
|
5818
|
+
if (!h.models || h.models.length === 0)
|
|
5818
5819
|
throw new Error("无法解析 JSON 数据");
|
|
5819
|
-
const f =
|
|
5820
|
+
const f = h.models[0];
|
|
5820
5821
|
if (!f.psdPartData)
|
|
5821
5822
|
throw new Error("JSON 数据中没有 psdPartData");
|
|
5822
5823
|
const E = f.width, o = f.height, i = s0(E, o), s = Ce(i), D = [], g = (y) => {
|
|
5823
|
-
if (y.url &&
|
|
5824
|
-
return
|
|
5824
|
+
if (y.url && t[y.url])
|
|
5825
|
+
return t[y.url];
|
|
5825
5826
|
if (y.url) {
|
|
5826
5827
|
const $ = y.url.split("/").pop() || y.url;
|
|
5827
|
-
if (
|
|
5828
|
-
return
|
|
5829
|
-
const W =
|
|
5828
|
+
if (t[$])
|
|
5829
|
+
return t[$];
|
|
5830
|
+
const W = x.find((O) => {
|
|
5830
5831
|
const I = O.sourceName || O.layerName;
|
|
5831
5832
|
return !I || !y.url ? !1 : (I.split("/").pop() || I) === $ || I === y.url || I.endsWith(y.url) || y.url.endsWith(I);
|
|
5832
5833
|
});
|
|
5833
5834
|
if (W) {
|
|
5834
5835
|
const O = W.sourceName || W.layerName;
|
|
5835
5836
|
if (O)
|
|
5836
|
-
return
|
|
5837
|
+
return t[O] || { url: W.url };
|
|
5837
5838
|
}
|
|
5838
5839
|
}
|
|
5839
5840
|
};
|
|
@@ -5849,7 +5850,7 @@ async function wx(r) {
|
|
|
5849
5850
|
index: y,
|
|
5850
5851
|
type: "layer",
|
|
5851
5852
|
partData: $,
|
|
5852
|
-
promise: nt(I,
|
|
5853
|
+
promise: nt(I, p, F).catch((b) => null)
|
|
5853
5854
|
});
|
|
5854
5855
|
} else if ($.type === E0.Group) {
|
|
5855
5856
|
if (!$.smartObjects || $.smartObjects.length === 0)
|
|
@@ -5858,12 +5859,12 @@ async function wx(r) {
|
|
|
5858
5859
|
const I = $.smartObjects[O];
|
|
5859
5860
|
if (!I || !I.name)
|
|
5860
5861
|
continue;
|
|
5861
|
-
let b =
|
|
5862
|
-
if (!b && I.imagePath && (b =
|
|
5862
|
+
let b = t[I.name] ?? W;
|
|
5863
|
+
if (!b && I.imagePath && (b = t[I.imagePath], !b)) {
|
|
5863
5864
|
const T = I.imagePath.split("/").pop() || I.imagePath;
|
|
5864
|
-
if (b =
|
|
5865
|
-
const j =
|
|
5866
|
-
const Y =
|
|
5865
|
+
if (b = t[T], !b) {
|
|
5866
|
+
const j = x.find((M) => {
|
|
5867
|
+
const Y = M.sourceName || M.layerName;
|
|
5867
5868
|
return !Y || !I.imagePath ? !1 : (Y.split("/").pop() || Y) === T || Y === I.imagePath || Y.endsWith(I.imagePath) || I.imagePath.endsWith(Y);
|
|
5868
5869
|
});
|
|
5869
5870
|
j && (b = { url: j.url });
|
|
@@ -5881,7 +5882,7 @@ async function wx(r) {
|
|
|
5881
5882
|
continue;
|
|
5882
5883
|
k = j;
|
|
5883
5884
|
}
|
|
5884
|
-
const R = ($.partId ?? $.id) * 100 + O, S = Ge(
|
|
5885
|
+
const R = ($.partId ?? $.id) * 100 + O, S = Xe(Ge(I)), N = { width: E, height: o };
|
|
5885
5886
|
D.push({
|
|
5886
5887
|
index: y + O * 0.01,
|
|
5887
5888
|
type: "group",
|
|
@@ -5892,22 +5893,22 @@ async function wx(r) {
|
|
|
5892
5893
|
k,
|
|
5893
5894
|
I,
|
|
5894
5895
|
R,
|
|
5895
|
-
|
|
5896
|
-
|
|
5896
|
+
N,
|
|
5897
|
+
p,
|
|
5897
5898
|
F
|
|
5898
5899
|
).catch((T) => null)
|
|
5899
5900
|
});
|
|
5900
5901
|
}
|
|
5901
5902
|
}
|
|
5902
5903
|
}
|
|
5903
|
-
const
|
|
5904
|
+
const m = await Promise.all(D.map((y) => y.promise)), w = D.map((y, $) => ({
|
|
5904
5905
|
task: y,
|
|
5905
|
-
imageBitmap:
|
|
5906
|
+
imageBitmap: m[$]
|
|
5906
5907
|
})).sort((y, $) => {
|
|
5907
5908
|
const W = y.task.type === "group" && y.task.smartObject?.layerOrder !== void 0 ? y.task.smartObject.layerOrder : y.task.partData.layerOrder ?? y.task.index, O = $.task.type === "group" && $.task.smartObject?.layerOrder !== void 0 ? $.task.smartObject.layerOrder : $.task.partData.layerOrder ?? $.task.index;
|
|
5908
5909
|
return W - O;
|
|
5909
5910
|
});
|
|
5910
|
-
let z = s0(E, o),
|
|
5911
|
+
let z = s0(E, o), B = C0(z), _ = !1, P = "normal";
|
|
5911
5912
|
for (let y = 0; y < w.length; y++) {
|
|
5912
5913
|
const { task: $, imageBitmap: W } = w[y];
|
|
5913
5914
|
if (!W)
|
|
@@ -5920,48 +5921,48 @@ async function wx(r) {
|
|
|
5920
5921
|
const R = w[y + 1];
|
|
5921
5922
|
let S = !1;
|
|
5922
5923
|
if (R) {
|
|
5923
|
-
const
|
|
5924
|
-
R.task.type === "group" && R.task.smartObject ? S = R.task.smartObject.clipping ??
|
|
5924
|
+
const N = R.task.partData;
|
|
5925
|
+
R.task.type === "group" && R.task.smartObject ? S = R.task.smartObject.clipping ?? N.clipping === !0 : S = N.clipping === !0;
|
|
5925
5926
|
}
|
|
5926
5927
|
if ($.type === "group" && $.smartObject && $.smartObject.name ? $.smartObject.name : O?.name, !k && S) {
|
|
5927
|
-
if (
|
|
5928
|
-
if (
|
|
5928
|
+
if (_ = !0, P = O.blendMode || "normal", B) {
|
|
5929
|
+
if (B.clearRect(0, 0, E, o), B.globalCompositeOperation = "source-over", B.globalAlpha = b, $.type === "group" && $.smartObject)
|
|
5929
5930
|
if ($.maskData) {
|
|
5930
|
-
const
|
|
5931
|
-
T && (T.drawImage(W, 0, 0), ur(T, $.maskData),
|
|
5931
|
+
const N = s0(E, o), T = C0(N);
|
|
5932
|
+
T && (T.drawImage(W, 0, 0), ur(T, $.maskData), B.drawImage(N, 0, 0));
|
|
5932
5933
|
} else
|
|
5933
|
-
|
|
5934
|
-
else $.type === "layer" && (I ?
|
|
5934
|
+
B.drawImage(W, 0, 0);
|
|
5935
|
+
else $.type === "layer" && (I ? B.drawImage(
|
|
5935
5936
|
W,
|
|
5936
5937
|
I.left,
|
|
5937
5938
|
I.top,
|
|
5938
5939
|
I.width,
|
|
5939
5940
|
I.height
|
|
5940
|
-
) :
|
|
5941
|
-
|
|
5941
|
+
) : B.drawImage(W, 0, 0));
|
|
5942
|
+
B.globalAlpha = 1;
|
|
5942
5943
|
}
|
|
5943
5944
|
} else if (k) {
|
|
5944
|
-
if (
|
|
5945
|
-
if (
|
|
5945
|
+
if (B) {
|
|
5946
|
+
if (B.globalCompositeOperation = "source-atop", B.globalAlpha = b, $.type === "group" && $.smartObject)
|
|
5946
5947
|
if ($.maskData) {
|
|
5947
|
-
const
|
|
5948
|
-
T && (T.drawImage(W, 0, 0), ur(T, $.maskData),
|
|
5948
|
+
const N = s0(E, o), T = C0(N);
|
|
5949
|
+
T && (T.drawImage(W, 0, 0), ur(T, $.maskData), B.drawImage(N, 0, 0));
|
|
5949
5950
|
} else
|
|
5950
|
-
|
|
5951
|
-
else $.type === "layer" && (I ?
|
|
5951
|
+
B.drawImage(W, 0, 0);
|
|
5952
|
+
else $.type === "layer" && (I ? B.drawImage(
|
|
5952
5953
|
W,
|
|
5953
5954
|
I.left,
|
|
5954
5955
|
I.top,
|
|
5955
5956
|
I.width,
|
|
5956
5957
|
I.height
|
|
5957
|
-
) :
|
|
5958
|
-
|
|
5958
|
+
) : B.drawImage(W, 0, 0));
|
|
5959
|
+
B.globalAlpha = 1, B.globalCompositeOperation = "source-over";
|
|
5959
5960
|
}
|
|
5960
5961
|
} else {
|
|
5961
5962
|
if (s.globalCompositeOperation = $r(O.blendMode), s.globalAlpha = b, $.type === "group" && $.smartObject)
|
|
5962
5963
|
if ($.maskData) {
|
|
5963
|
-
const
|
|
5964
|
-
T && (T.drawImage(W, 0, 0), ur(T, $.maskData), s.drawImage(
|
|
5964
|
+
const N = s0(E, o), T = C0(N);
|
|
5965
|
+
T && (T.drawImage(W, 0, 0), ur(T, $.maskData), s.drawImage(N, 0, 0));
|
|
5965
5966
|
} else
|
|
5966
5967
|
s.drawImage(W, 0, 0);
|
|
5967
5968
|
else $.type === "layer" && (I ? s.drawImage(
|
|
@@ -5973,33 +5974,33 @@ async function wx(r) {
|
|
|
5973
5974
|
) : s.drawImage(W, 0, 0));
|
|
5974
5975
|
s.globalAlpha = 1, s.globalCompositeOperation = "source-over";
|
|
5975
5976
|
}
|
|
5976
|
-
|
|
5977
|
+
_ && !S && (s.globalCompositeOperation = $r(P), s.drawImage(z, 0, 0), s.globalCompositeOperation = "source-over", _ = !1);
|
|
5977
5978
|
}
|
|
5978
|
-
z = null,
|
|
5979
|
-
let H = i,
|
|
5980
|
-
if (
|
|
5981
|
-
if (
|
|
5982
|
-
|
|
5983
|
-
else if (
|
|
5984
|
-
const $ =
|
|
5985
|
-
|
|
5986
|
-
} else if (
|
|
5987
|
-
const $ =
|
|
5988
|
-
|
|
5979
|
+
z = null, B = null;
|
|
5980
|
+
let H = i, L = E, q = o;
|
|
5981
|
+
if (d !== void 0 || v !== void 0) {
|
|
5982
|
+
if (d !== void 0 && v !== void 0)
|
|
5983
|
+
L = d, q = v;
|
|
5984
|
+
else if (d !== void 0) {
|
|
5985
|
+
const $ = d / E;
|
|
5986
|
+
L = d, q = Math.round(o * $);
|
|
5987
|
+
} else if (v !== void 0) {
|
|
5988
|
+
const $ = v / o;
|
|
5989
|
+
L = Math.round(E * $), q = v;
|
|
5989
5990
|
}
|
|
5990
|
-
H = s0(
|
|
5991
|
+
H = s0(L, q);
|
|
5991
5992
|
const y = Ce(H);
|
|
5992
|
-
y.imageSmoothingEnabled = !0, y.imageSmoothingQuality = "high", y.drawImage(i, 0, 0, E, o, 0, 0,
|
|
5993
|
+
y.imageSmoothingEnabled = !0, y.imageSmoothingQuality = "high", y.drawImage(i, 0, 0, E, o, 0, 0, L, q);
|
|
5993
5994
|
}
|
|
5994
5995
|
return performance.now(), {
|
|
5995
5996
|
canvas: H,
|
|
5996
|
-
width:
|
|
5997
|
-
height:
|
|
5997
|
+
width: L,
|
|
5998
|
+
height: q
|
|
5998
5999
|
};
|
|
5999
6000
|
}
|
|
6000
6001
|
const kx = async (r) => {
|
|
6001
|
-
const
|
|
6002
|
-
return
|
|
6002
|
+
const x = (await wx(r)).canvas;
|
|
6003
|
+
return x ? createImageBitmap(x) : null;
|
|
6003
6004
|
};
|
|
6004
6005
|
self.onmessage = async (r) => {
|
|
6005
6006
|
const l = r.data;
|
|
@@ -6013,13 +6014,13 @@ self.onmessage = async (r) => {
|
|
|
6013
6014
|
});
|
|
6014
6015
|
return;
|
|
6015
6016
|
}
|
|
6016
|
-
const
|
|
6017
|
+
const x = l;
|
|
6017
6018
|
try {
|
|
6018
|
-
const e = await kx(
|
|
6019
|
-
self.postMessage({ id:
|
|
6019
|
+
const e = await kx(x.renderData);
|
|
6020
|
+
self.postMessage({ id: x.id, bitmap: e }, e ? [e] : []);
|
|
6020
6021
|
} catch (e) {
|
|
6021
6022
|
self.postMessage({
|
|
6022
|
-
id:
|
|
6023
|
+
id: x.id,
|
|
6023
6024
|
error: e instanceof Error ? e.message : String(e)
|
|
6024
6025
|
});
|
|
6025
6026
|
}
|