@jieyin/editor-sdk-test 1.1.165 → 1.1.167
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 +4117 -4119
- package/dist/renderWorker.js +1116 -1117
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var D0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(D0 || {});
|
|
2
2
|
function et(r) {
|
|
3
|
-
let
|
|
3
|
+
let l = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = l;
|
|
6
|
+
return l += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function tt(r,
|
|
9
|
+
function tt(r, l) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,24 +23,24 @@ function tt(r, d) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? l,
|
|
27
27
|
filterList: r.filterList,
|
|
28
28
|
opacity: r.opacity,
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function xt(r,
|
|
33
|
-
let
|
|
34
|
-
if (r.type === "Group" &&
|
|
35
|
-
const x = r.children[0].name, n =
|
|
36
|
-
(E !== void 0 || n?.id !== void 0) && (
|
|
32
|
+
function xt(r, l, t, e) {
|
|
33
|
+
let c = r.name || "", v = l[c], y = v?.partId ?? (r.type === "Group" ? t.get(c) : void 0);
|
|
34
|
+
if (r.type === "Group" && y === void 0 && (!v || v.id === void 0) && r.children && r.children.length === 1) {
|
|
35
|
+
const x = r.children[0].name, n = l[x], E = n?.partId ?? t.get(x);
|
|
36
|
+
(E !== void 0 || n?.id !== void 0) && (c = x, v = n, y = E);
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const B = r.id ?? v?.id ?? e();
|
|
39
39
|
if (r.type === "Group")
|
|
40
40
|
return {
|
|
41
|
-
id:
|
|
42
|
-
partId:
|
|
43
|
-
name:
|
|
41
|
+
id: B,
|
|
42
|
+
partId: y,
|
|
43
|
+
name: c,
|
|
44
44
|
blendMode: r.blendMode || "normal",
|
|
45
45
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
46
46
|
type: D0.Group,
|
|
@@ -51,53 +51,53 @@ function xt(r, d, t, e) {
|
|
|
51
51
|
clipping: r.clipping,
|
|
52
52
|
layerOrder: r.layerOrder
|
|
53
53
|
};
|
|
54
|
-
let
|
|
55
|
-
return !
|
|
56
|
-
id:
|
|
54
|
+
let C = v?.url;
|
|
55
|
+
return !C && r.imagePath && (C = r.imagePath), {
|
|
56
|
+
id: B,
|
|
57
57
|
name: r.name || "",
|
|
58
58
|
blendMode: r.blendMode || "normal",
|
|
59
59
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
60
60
|
type: D0.Layer,
|
|
61
|
-
url:
|
|
61
|
+
url: C,
|
|
62
62
|
opacity: r.opacity,
|
|
63
63
|
clipping: r.clipping,
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function nt(r,
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function nt(r, l) {
|
|
68
|
+
const t = new Map(l.parts.map((c) => [c.name, c.id])), e = et(l.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
71
|
-
models: r.map((
|
|
72
|
-
const
|
|
73
|
-
if (!
|
|
74
|
-
throw new Error(`无法获取 PSD 画布尺寸: canvasWidth=${
|
|
70
|
+
parts: l.parts,
|
|
71
|
+
models: r.map((c) => {
|
|
72
|
+
const v = c.layerExtrasByName ?? {}, y = c.psdJson, B = y.layerList || y.layerList || [], C = y.canvasWidth, x = y.canvasHeight;
|
|
73
|
+
if (!C || !x)
|
|
74
|
+
throw new Error(`无法获取 PSD 画布尺寸: canvasWidth=${C}, canvasHeight=${x}。请确保 jsonurl 中的 canvasWidth 和 canvasHeight 存在`);
|
|
75
75
|
const n = (s) => {
|
|
76
76
|
const u = [];
|
|
77
77
|
for (const p of s)
|
|
78
78
|
if (p.type === "Group" && p.children) {
|
|
79
|
-
const
|
|
80
|
-
const b = o.layerOrder ?? 0, g =
|
|
79
|
+
const h = [], D = [], i = [...p.children].sort((o, d) => {
|
|
80
|
+
const b = o.layerOrder ?? 0, g = d.layerOrder ?? 0;
|
|
81
81
|
return b - g;
|
|
82
82
|
});
|
|
83
83
|
for (const o of i)
|
|
84
|
-
o.isSmartObject === !0 ?
|
|
84
|
+
o.isSmartObject === !0 ? h.push(o) : D.push(o);
|
|
85
85
|
if (D.length > 0) {
|
|
86
86
|
const o = n(D);
|
|
87
87
|
u.push(...o);
|
|
88
88
|
}
|
|
89
|
-
|
|
89
|
+
h.length > 0 && u.push({
|
|
90
90
|
...p,
|
|
91
|
-
children:
|
|
91
|
+
children: h
|
|
92
92
|
});
|
|
93
93
|
} else
|
|
94
94
|
u.push(p);
|
|
95
95
|
return u;
|
|
96
|
-
}, a = n(
|
|
97
|
-
(s) => xt(s,
|
|
96
|
+
}, a = n(B).map(
|
|
97
|
+
(s) => xt(s, v, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
|
-
width:
|
|
100
|
+
width: C,
|
|
101
101
|
height: x,
|
|
102
102
|
psdPartData: a
|
|
103
103
|
};
|
|
@@ -110,44 +110,44 @@ function at(r) {
|
|
|
110
110
|
function ot(r) {
|
|
111
111
|
return r ? r.type === "bezier" ? {
|
|
112
112
|
type: "bezier",
|
|
113
|
-
paths: r.paths.map((
|
|
114
|
-
open: !!
|
|
115
|
-
knots:
|
|
113
|
+
paths: r.paths.map((l) => ({
|
|
114
|
+
open: !!l.open,
|
|
115
|
+
knots: l.knots.map((t) => ({
|
|
116
116
|
linked: !!t.linked,
|
|
117
117
|
points: Array.isArray(t.points) ? [...t.points] : []
|
|
118
118
|
}))
|
|
119
119
|
}))
|
|
120
120
|
} : r.type === "simple" ? {
|
|
121
121
|
type: "simple",
|
|
122
|
-
points: r.points.map((
|
|
123
|
-
x:
|
|
124
|
-
y:
|
|
125
|
-
type:
|
|
122
|
+
points: r.points.map((l) => ({
|
|
123
|
+
x: l.x,
|
|
124
|
+
y: l.y,
|
|
125
|
+
type: l.type
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
131
|
-
if (r.globalCompositeOperation = "destination-in", r.beginPath(),
|
|
132
|
-
|
|
129
|
+
function Br(r, l) {
|
|
130
|
+
if (l) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), l.type === "bezier" && Array.isArray(l.paths))
|
|
132
|
+
l.paths.forEach((t) => {
|
|
133
133
|
const e = t.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
|
-
const
|
|
136
|
-
r.moveTo(
|
|
137
|
-
for (let
|
|
138
|
-
const
|
|
139
|
-
let
|
|
140
|
-
if (!t.open &&
|
|
141
|
-
|
|
142
|
-
else if (t.open &&
|
|
135
|
+
const c = e[0];
|
|
136
|
+
r.moveTo(c.points[2], c.points[3]);
|
|
137
|
+
for (let v = 0; v < e.length; v++) {
|
|
138
|
+
const y = e[v];
|
|
139
|
+
let B = (v + 1) % e.length;
|
|
140
|
+
if (!t.open && v === e.length - 1)
|
|
141
|
+
B = 0;
|
|
142
|
+
else if (t.open && v === e.length - 1)
|
|
143
143
|
break;
|
|
144
|
-
const
|
|
144
|
+
const C = e[B], x = y.points[4], n = y.points[5], E = C.points[0], a = C.points[1], s = C.points[2], u = C.points[3];
|
|
145
145
|
r.bezierCurveTo(x, n, E, a, s, u);
|
|
146
146
|
}
|
|
147
147
|
t.open || r.closePath();
|
|
148
148
|
});
|
|
149
|
-
else if (
|
|
150
|
-
const t =
|
|
149
|
+
else if (l.type === "simple" && Array.isArray(l.points)) {
|
|
150
|
+
const t = l.points;
|
|
151
151
|
if (t.length < 3) return;
|
|
152
152
|
r.moveTo(t[0].x, t[0].y);
|
|
153
153
|
for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
|
|
@@ -161,10 +161,10 @@ class p0 {
|
|
|
161
161
|
/**
|
|
162
162
|
* 获取存储项
|
|
163
163
|
*/
|
|
164
|
-
static getItem(
|
|
164
|
+
static getItem(l) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(l);
|
|
168
168
|
} catch {
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
@@ -172,10 +172,10 @@ class p0 {
|
|
|
172
172
|
/**
|
|
173
173
|
* 设置存储项
|
|
174
174
|
*/
|
|
175
|
-
static setItem(
|
|
175
|
+
static setItem(l, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(l, t), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
@@ -183,10 +183,10 @@ class p0 {
|
|
|
183
183
|
/**
|
|
184
184
|
* 移除存储项
|
|
185
185
|
*/
|
|
186
|
-
static removeItem(
|
|
186
|
+
static removeItem(l) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(l), !0;
|
|
190
190
|
} catch {
|
|
191
191
|
return !1;
|
|
192
192
|
}
|
|
@@ -251,10 +251,10 @@ class v0 {
|
|
|
251
251
|
/**
|
|
252
252
|
* 安全地解析 URL
|
|
253
253
|
*/
|
|
254
|
-
static parse(
|
|
254
|
+
static parse(l) {
|
|
255
255
|
try {
|
|
256
256
|
const t = dr.getOrigin();
|
|
257
|
-
return new URL(
|
|
257
|
+
return new URL(l, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,285 +262,284 @@ class v0 {
|
|
|
262
262
|
/**
|
|
263
263
|
* 添加查询参数
|
|
264
264
|
*/
|
|
265
|
-
static addParam(
|
|
266
|
-
const
|
|
267
|
-
return !
|
|
265
|
+
static addParam(l, t, e) {
|
|
266
|
+
const c = this.parse(l);
|
|
267
|
+
return !c || c.searchParams.has(t) ? l : (c.searchParams.set(t, e), this.formatUrl(l, c));
|
|
268
268
|
}
|
|
269
269
|
/**
|
|
270
270
|
* 移除查询参数
|
|
271
271
|
*/
|
|
272
|
-
static removeParam(
|
|
273
|
-
const e = this.parse(
|
|
274
|
-
return !e || !e.searchParams.has(t) ?
|
|
272
|
+
static removeParam(l, t) {
|
|
273
|
+
const e = this.parse(l);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? l : (e.searchParams.delete(t), this.formatUrl(l, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(l, t) {
|
|
280
|
+
return this.parse(l)?.searchParams.has(t) ?? !1;
|
|
281
281
|
}
|
|
282
282
|
/**
|
|
283
283
|
* 格式化 URL(保持原始格式)
|
|
284
284
|
*/
|
|
285
|
-
static formatUrl(
|
|
286
|
-
const e = /^(https?:)?\/\//i.test(
|
|
287
|
-
return e ? t.toString() :
|
|
285
|
+
static formatUrl(l, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(l), c = l.startsWith("//");
|
|
287
|
+
return e ? t.toString() : c ? t.toString().replace(/^https?:/, "") : `${t.pathname}${t.search}${t.hash}`;
|
|
288
288
|
}
|
|
289
289
|
/**
|
|
290
290
|
* 检查是否为数据 URL
|
|
291
291
|
*/
|
|
292
|
-
static isDataUrl(
|
|
293
|
-
return
|
|
292
|
+
static isDataUrl(l) {
|
|
293
|
+
return l?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(l) {
|
|
299
|
+
return l?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
return
|
|
302
|
+
function ur() {
|
|
303
|
+
const r = ["eItem", "22142gGuQkI", "apply", "326291cMeRsn", "isBlo", "fileT", "2112XjtaZa", "isBro", "ctor(", "const", "trace", "type", "2120994iZsysP", "fetch", "1979744OPSnuN", "ructo", "oken", "bind", "file_", "1295vNuuba", "re_ti", 'is")(', "get", "aUrl", "remov", "4vXZcoo", "token", "conso", "metho", "300728cbHcuN", "115179FnKcHu"];
|
|
304
|
+
return ur = function() {
|
|
305
|
+
return r;
|
|
306
|
+
}, ur();
|
|
305
307
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
+
const x0 = lr;
|
|
309
|
+
(function(r, l) {
|
|
310
|
+
const t = lr, e = r();
|
|
308
311
|
for (; ; )
|
|
309
312
|
try {
|
|
310
|
-
if (-parseInt(t(
|
|
313
|
+
if (-parseInt(t(302)) / 1 + parseInt(t(299)) / 2 + parseInt(t(300)) / 3 * (-parseInt(t(295)) / 4) + parseInt(t(320)) / 5 * (parseInt(t(307)) / 6) + -parseInt(t(304)) / 7 + parseInt(t(315)) / 8 + -parseInt(t(313)) / 9 === l) break;
|
|
311
314
|
e.push(e.shift());
|
|
312
315
|
} catch {
|
|
313
316
|
e.push(e.shift());
|
|
314
317
|
}
|
|
315
|
-
})(ur, -
|
|
318
|
+
})(ur, -76864 + 355 * 494 + 47680);
|
|
316
319
|
const F0 = /* @__PURE__ */ (function() {
|
|
317
320
|
let r = !0;
|
|
318
|
-
return function(
|
|
321
|
+
return function(l, t) {
|
|
319
322
|
const e = r ? function() {
|
|
323
|
+
const c = lr;
|
|
320
324
|
if (t) {
|
|
321
|
-
const
|
|
322
|
-
return t = null,
|
|
325
|
+
const v = t[c(303)](l, arguments);
|
|
326
|
+
return t = null, v;
|
|
323
327
|
}
|
|
324
328
|
} : function() {
|
|
325
329
|
};
|
|
326
330
|
return r = !1, e;
|
|
327
331
|
};
|
|
328
332
|
})(), it = F0(void 0, function() {
|
|
329
|
-
const r =
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
const _ = F0["const" + r(210) + "r"][r(205) + "type"].bind(F0), C = f[h], B = e[C] || _;
|
|
341
|
-
_.__proto__ = F0.bind(F0), _.toString = B.toString.bind(B), e[C] = _;
|
|
333
|
+
const r = lr;
|
|
334
|
+
let l;
|
|
335
|
+
try {
|
|
336
|
+
l = Function("return (function() " + ("{}.constru" + r(309) + '"return th' + r(291) + " )") + ");")();
|
|
337
|
+
} catch {
|
|
338
|
+
l = window;
|
|
339
|
+
}
|
|
340
|
+
const t = l.console = l[r(297) + "le"] || {}, e = ["log", "warn", "info", "error", "exception", "table", r(311)];
|
|
341
|
+
for (let c = -1 * 1558 + 9176 + 7618 * -1; c < e.length; c++) {
|
|
342
|
+
const v = F0[r(310) + r(316) + "r"]["proto" + r(312)].bind(F0), y = e[c], B = t[y] || v;
|
|
343
|
+
v.__proto__ = F0.bind(F0), v.toString = B.toString[r(318)](B), t[y] = v;
|
|
342
344
|
}
|
|
343
345
|
});
|
|
344
346
|
it();
|
|
345
|
-
const
|
|
346
|
-
function
|
|
347
|
-
|
|
348
|
-
return ur = function() {
|
|
349
|
-
return r;
|
|
350
|
-
}, ur();
|
|
351
|
-
}
|
|
352
|
-
function Ar() {
|
|
353
|
-
return p0.getItem(gr);
|
|
347
|
+
const Dr = x0(319) + x0(296), br = x0(319) + "token_expi" + x0(321) + "me", st = (-563 * -9 + 1 * -8093 + 3086) * 1e3;
|
|
348
|
+
function Fr() {
|
|
349
|
+
return p0.getItem(Dr);
|
|
354
350
|
}
|
|
355
351
|
function ct(r = st) {
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
return Date[d(216)]() + r > f;
|
|
352
|
+
if (!Fr()) return !0;
|
|
353
|
+
const t = p0.getItem(br);
|
|
354
|
+
if (!t) return !1;
|
|
355
|
+
const e = Number(t);
|
|
356
|
+
return Date.now() + r > e;
|
|
362
357
|
}
|
|
363
|
-
function ft(r,
|
|
364
|
-
if (p0.setItem(
|
|
365
|
-
const t = Date.now() +
|
|
366
|
-
p0.setItem(
|
|
358
|
+
function ft(r, l) {
|
|
359
|
+
if (p0.setItem(Dr, r), typeof l == "number" && l > 2 * -1627 + -3225 * 1 + 11 * 589) {
|
|
360
|
+
const t = Date.now() + l * 1e3;
|
|
361
|
+
p0.setItem(br, String(t));
|
|
367
362
|
}
|
|
368
363
|
}
|
|
364
|
+
function lr(r, l) {
|
|
365
|
+
return r = r - 291, ur()[r];
|
|
366
|
+
}
|
|
369
367
|
function ut() {
|
|
370
|
-
const r =
|
|
371
|
-
p0.removeItem(
|
|
372
|
-
});
|
|
368
|
+
const r = x0;
|
|
369
|
+
p0.removeItem(Dr), p0[r(294) + r(301)](br), Ft();
|
|
373
370
|
}
|
|
374
371
|
async function qr(r) {
|
|
375
|
-
const
|
|
376
|
-
return
|
|
372
|
+
const l = x0, t = await r(), e = t?.data?.data;
|
|
373
|
+
return t?.data?.code === 200 && e?.[l(319) + "token"] ? (ft(e[l(319) + "token"], e.expires_in), e.file_token) : null;
|
|
377
374
|
}
|
|
378
375
|
let dt = null;
|
|
379
376
|
function Tr() {
|
|
380
|
-
return dr
|
|
377
|
+
return dr.isBrowser() ? dt : null;
|
|
381
378
|
}
|
|
382
379
|
async function we() {
|
|
383
|
-
const r =
|
|
384
|
-
if (!dr
|
|
385
|
-
const
|
|
386
|
-
if (
|
|
380
|
+
const r = x0;
|
|
381
|
+
if (!dr[r(308) + "wser"]()) return Fr();
|
|
382
|
+
const l = Fr();
|
|
383
|
+
if (l && !ct()) return l;
|
|
387
384
|
try {
|
|
388
385
|
const t = await Tr();
|
|
389
|
-
if (
|
|
390
|
-
const e = await qr(t
|
|
386
|
+
if (l && t?.["fetchFileTokenRefresh"]) {
|
|
387
|
+
const e = await qr(t.fetchFileTokenRefresh);
|
|
391
388
|
if (e) return e;
|
|
392
389
|
}
|
|
393
390
|
} catch {
|
|
394
391
|
}
|
|
395
392
|
try {
|
|
396
393
|
const t = Tr();
|
|
397
|
-
return t?.["
|
|
394
|
+
return t?.[r(314) + "FileT" + r(317)] ? await qr(t[r(314) + "FileToken"]) : null;
|
|
398
395
|
} catch {
|
|
399
396
|
return null;
|
|
400
397
|
}
|
|
401
398
|
}
|
|
402
399
|
function ke(r) {
|
|
403
|
-
const
|
|
404
|
-
if (!r || v0[
|
|
400
|
+
const l = x0;
|
|
401
|
+
if (!r || v0["isDat" + l(293)](r) || v0[l(305) + "bUrl"](r)) return !1;
|
|
405
402
|
const t = v0.parse(r);
|
|
406
|
-
return t ? t
|
|
403
|
+
return t ? t.pathname.includes("/files/") && !v0.hasParam(r, "fileT" + l(317)) : r.includes("/files/") && !r.includes(l(306) + "oken=");
|
|
407
404
|
}
|
|
408
|
-
function Se(r,
|
|
409
|
-
|
|
410
|
-
return !d || !ke(r) ? r : v0["addPa" + t(229)](r, "fileToken", d);
|
|
405
|
+
function Se(r, l) {
|
|
406
|
+
return !l || !ke(r) ? r : v0.addParam(r, "fileToken", l);
|
|
411
407
|
}
|
|
412
408
|
function He(r) {
|
|
413
|
-
return v0
|
|
409
|
+
return v0.removeParam(r, "fileToken");
|
|
414
410
|
}
|
|
415
411
|
async function lt(r) {
|
|
416
412
|
if (!ke(r)) return r;
|
|
417
|
-
const
|
|
418
|
-
return Se(r,
|
|
413
|
+
const l = await we();
|
|
414
|
+
return Se(r, l);
|
|
419
415
|
}
|
|
420
|
-
const
|
|
421
|
-
function ht(r,
|
|
422
|
-
return
|
|
416
|
+
const Cr = /* @__PURE__ */ new Map();
|
|
417
|
+
function ht(r, l) {
|
|
418
|
+
return "GET".toUpperCase() + "\0" + r;
|
|
423
419
|
}
|
|
424
|
-
async function vt(r,
|
|
425
|
-
const t =
|
|
426
|
-
if (!dr.isBrowser()) return fetch(r,
|
|
427
|
-
const e = He(r),
|
|
428
|
-
let
|
|
429
|
-
return !
|
|
420
|
+
async function vt(r, l) {
|
|
421
|
+
const t = x0;
|
|
422
|
+
if (!dr.isBrowser()) return fetch(r, l);
|
|
423
|
+
const e = He(r), c = ht(e);
|
|
424
|
+
let v = Cr[t(292)](c);
|
|
425
|
+
return !v && (v = (async () => {
|
|
430
426
|
try {
|
|
431
|
-
const
|
|
432
|
-
let
|
|
433
|
-
if (
|
|
427
|
+
const B = await lt(e);
|
|
428
|
+
let C = await fetch(B, l);
|
|
429
|
+
if (C.status !== -2687 * -3 + 1 * 8814 + -16474) return C;
|
|
434
430
|
ut();
|
|
435
431
|
const x = await we(), n = Se(e, x);
|
|
436
|
-
return
|
|
432
|
+
return C = await fetch(n, l), C;
|
|
437
433
|
} finally {
|
|
438
|
-
|
|
434
|
+
Cr.delete(c);
|
|
439
435
|
}
|
|
440
|
-
})(),
|
|
436
|
+
})(), Cr.set(c, v)), (await v).clone();
|
|
441
437
|
}
|
|
442
|
-
const pt = 96, Bt = 200 * 1024 * 1024,
|
|
443
|
-
let
|
|
444
|
-
const
|
|
445
|
-
function Ct(r,
|
|
438
|
+
const pt = 96, Bt = 200 * 1024 * 1024, t0 = /* @__PURE__ */ new Map();
|
|
439
|
+
let hr = 0;
|
|
440
|
+
const y0 = /* @__PURE__ */ new Map();
|
|
441
|
+
function Ct(r, l) {
|
|
446
442
|
return `${"GET".toUpperCase()}\0${He(r)}`;
|
|
447
443
|
}
|
|
448
444
|
function Et() {
|
|
449
|
-
const r =
|
|
445
|
+
const r = t0.keys().next().value;
|
|
450
446
|
if (r === void 0) return;
|
|
451
|
-
const
|
|
452
|
-
|
|
447
|
+
const l = t0.get(r);
|
|
448
|
+
t0.delete(r), l && (hr -= l.size);
|
|
453
449
|
}
|
|
454
450
|
function At(r) {
|
|
455
|
-
for (;
|
|
456
|
-
const
|
|
457
|
-
if (!
|
|
451
|
+
for (; t0.size > 0; ) {
|
|
452
|
+
const l = t0.size >= pt, t = hr + r > Bt;
|
|
453
|
+
if (!l && !t) break;
|
|
458
454
|
Et();
|
|
459
455
|
}
|
|
460
456
|
}
|
|
461
|
-
async function Re(r,
|
|
462
|
-
const t = Ct(r), e =
|
|
457
|
+
async function Re(r, l) {
|
|
458
|
+
const t = Ct(r), e = t0.get(t);
|
|
463
459
|
if (e)
|
|
464
|
-
return
|
|
465
|
-
let
|
|
466
|
-
return
|
|
460
|
+
return t0.delete(t), t0.set(t, e), e;
|
|
461
|
+
let c = y0.get(t);
|
|
462
|
+
return c || (c = (async () => {
|
|
467
463
|
try {
|
|
468
|
-
const
|
|
469
|
-
if (!
|
|
470
|
-
throw new Error(`fetch failed: ${
|
|
471
|
-
const
|
|
472
|
-
return At(
|
|
464
|
+
const v = await vt(r, l);
|
|
465
|
+
if (!v.ok)
|
|
466
|
+
throw new Error(`fetch failed: ${v.status} ${v.statusText}`);
|
|
467
|
+
const y = await v.blob();
|
|
468
|
+
return At(y.size), t0.set(t, y), hr += y.size, y;
|
|
473
469
|
} finally {
|
|
474
|
-
|
|
470
|
+
y0.delete(t);
|
|
475
471
|
}
|
|
476
|
-
})(),
|
|
472
|
+
})(), y0.set(t, c), c);
|
|
473
|
+
}
|
|
474
|
+
function Ft() {
|
|
475
|
+
t0.clear(), y0.clear(), hr = 0;
|
|
477
476
|
}
|
|
478
|
-
const $e = (r,
|
|
477
|
+
const $e = (r, l) => {
|
|
479
478
|
if (!r) return r;
|
|
480
|
-
const t = (
|
|
479
|
+
const t = (l || "").replace(/\/$/, "");
|
|
481
480
|
if (t && r.startsWith(t))
|
|
482
481
|
return r;
|
|
483
482
|
if (typeof window < "u") {
|
|
484
|
-
const
|
|
485
|
-
if (
|
|
483
|
+
const c = window.location.hostname;
|
|
484
|
+
if (c === "localhost" || c === "127.0.0.1")
|
|
486
485
|
try {
|
|
487
|
-
const
|
|
486
|
+
const v = new URL(r);
|
|
488
487
|
if (t)
|
|
489
488
|
try {
|
|
490
|
-
const
|
|
491
|
-
if (
|
|
489
|
+
const y = new URL(t).origin;
|
|
490
|
+
if (v.origin === y)
|
|
492
491
|
return r;
|
|
493
492
|
} catch {
|
|
494
493
|
}
|
|
495
|
-
if (
|
|
496
|
-
return t ? `${t}${
|
|
494
|
+
if (v.pathname.startsWith("/files/"))
|
|
495
|
+
return t ? `${t}${v.pathname}${v.search}${v.hash}` : `${v.pathname}${v.search}${v.hash}`;
|
|
497
496
|
} catch {
|
|
498
497
|
}
|
|
499
498
|
}
|
|
500
499
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
501
500
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
502
501
|
return e ? `/oss${e[2]}` : r;
|
|
503
|
-
},
|
|
502
|
+
}, gt = (r, l) => {
|
|
504
503
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
505
|
-
return new OffscreenCanvas(r,
|
|
504
|
+
return new OffscreenCanvas(r, l);
|
|
506
505
|
const t = document.createElement("canvas");
|
|
507
|
-
return t.width = r, t.height =
|
|
508
|
-
},
|
|
509
|
-
if (!
|
|
506
|
+
return t.width = r, t.height = l, t;
|
|
507
|
+
}, w0 = async (r, l) => {
|
|
508
|
+
if (!l || l <= 0) return r;
|
|
510
509
|
const t = Math.max(r.width, r.height);
|
|
511
|
-
if (t <=
|
|
512
|
-
const e =
|
|
513
|
-
return
|
|
510
|
+
if (t <= l) return r;
|
|
511
|
+
const e = l / t, c = Math.max(1, Math.round(r.width * e)), v = Math.max(1, Math.round(r.height * e)), y = gt(c, v), B = y.getContext("2d");
|
|
512
|
+
return B ? (B.drawImage(r, 0, 0, c, v), r.close?.(), await createImageBitmap(y)) : r;
|
|
514
513
|
};
|
|
515
|
-
async function
|
|
514
|
+
async function Dt(r, l, t) {
|
|
516
515
|
if (typeof r == "string")
|
|
517
516
|
try {
|
|
518
517
|
const e = $e(r, t);
|
|
519
|
-
let
|
|
518
|
+
let c;
|
|
520
519
|
try {
|
|
521
|
-
|
|
520
|
+
c = await Re(e);
|
|
522
521
|
} catch {
|
|
523
522
|
throw new Error(`加载图片失败: ${r}`);
|
|
524
523
|
}
|
|
525
|
-
if (!
|
|
524
|
+
if (!c.type.startsWith("image/") && c.size === 0)
|
|
526
525
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
527
526
|
try {
|
|
528
|
-
const
|
|
529
|
-
return await
|
|
530
|
-
} catch (
|
|
531
|
-
throw new Error(`图片解码失败: URL=${r}, 错误=${
|
|
527
|
+
const v = await createImageBitmap(c);
|
|
528
|
+
return await w0(v, l);
|
|
529
|
+
} catch (v) {
|
|
530
|
+
throw new Error(`图片解码失败: URL=${r}, 错误=${v instanceof Error ? v.message : v}`);
|
|
532
531
|
}
|
|
533
532
|
} catch (e) {
|
|
534
533
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
535
534
|
}
|
|
536
535
|
if (r instanceof HTMLImageElement) {
|
|
537
|
-
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e,
|
|
538
|
-
r.onload = e, r.onerror = () =>
|
|
536
|
+
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e, c) => {
|
|
537
|
+
r.onload = e, r.onerror = () => c(new Error(`图片加载失败: src=${r.src}`)), r.complete && e(null);
|
|
539
538
|
}), r.naturalWidth === 0 || r.naturalHeight === 0)
|
|
540
539
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
541
540
|
try {
|
|
542
541
|
const e = await createImageBitmap(r);
|
|
543
|
-
return await
|
|
542
|
+
return await w0(e, l);
|
|
544
543
|
} catch (e) {
|
|
545
544
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
546
545
|
}
|
|
@@ -548,26 +547,26 @@ async function gt(r, d, t) {
|
|
|
548
547
|
if (r instanceof ImageBitmap) {
|
|
549
548
|
if (r.width === 0 || r.height === 0)
|
|
550
549
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
551
|
-
return await
|
|
550
|
+
return await w0(r, l);
|
|
552
551
|
}
|
|
553
552
|
throw new Error("不支持的图片类型");
|
|
554
553
|
}
|
|
555
|
-
async function
|
|
554
|
+
async function bt(r, l, t) {
|
|
556
555
|
try {
|
|
557
556
|
const e = $e(r, t);
|
|
558
|
-
let
|
|
557
|
+
let c;
|
|
559
558
|
try {
|
|
560
|
-
|
|
559
|
+
c = await Re(e);
|
|
561
560
|
} catch {
|
|
562
561
|
throw new Error(`加载图片失败: ${r}`);
|
|
563
562
|
}
|
|
564
|
-
if (!
|
|
563
|
+
if (!c.type.startsWith("image/") && c.size === 0)
|
|
565
564
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
566
565
|
try {
|
|
567
|
-
const
|
|
568
|
-
return await
|
|
569
|
-
} catch (
|
|
570
|
-
throw new Error(`图片解码失败: URL=${r}, 错误=${
|
|
566
|
+
const v = await createImageBitmap(c);
|
|
567
|
+
return await w0(v, l);
|
|
568
|
+
} catch (v) {
|
|
569
|
+
throw new Error(`图片解码失败: URL=${r}, 错误=${v instanceof Error ? v.message : v}`);
|
|
571
570
|
}
|
|
572
571
|
} catch (e) {
|
|
573
572
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
@@ -575,7 +574,7 @@ async function Dt(r, d, t) {
|
|
|
575
574
|
}
|
|
576
575
|
function Mr(r) {
|
|
577
576
|
if (!r) return "source-over";
|
|
578
|
-
const
|
|
577
|
+
const l = r.trim().toLowerCase();
|
|
579
578
|
return {
|
|
580
579
|
normal: "source-over",
|
|
581
580
|
multiply: "multiply",
|
|
@@ -601,26 +600,26 @@ function Mr(r) {
|
|
|
601
600
|
"linear dodge": "lighter",
|
|
602
601
|
lighter: "lighter",
|
|
603
602
|
"pass-through": "source-over"
|
|
604
|
-
}[
|
|
603
|
+
}[l] || "source-over";
|
|
605
604
|
}
|
|
606
|
-
var
|
|
607
|
-
function
|
|
605
|
+
var Er = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
606
|
+
function mt(r) {
|
|
608
607
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
609
|
-
var
|
|
610
|
-
if (typeof
|
|
608
|
+
var l = r.default;
|
|
609
|
+
if (typeof l == "function") {
|
|
611
610
|
var t = function e() {
|
|
612
|
-
var
|
|
611
|
+
var c = !1;
|
|
613
612
|
try {
|
|
614
|
-
|
|
613
|
+
c = this instanceof e;
|
|
615
614
|
} catch {
|
|
616
615
|
}
|
|
617
|
-
return
|
|
616
|
+
return c ? Reflect.construct(l, arguments, this.constructor) : l.apply(this, arguments);
|
|
618
617
|
};
|
|
619
|
-
t.prototype =
|
|
618
|
+
t.prototype = l.prototype;
|
|
620
619
|
} else t = {};
|
|
621
620
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
622
|
-
var
|
|
623
|
-
Object.defineProperty(t, e,
|
|
621
|
+
var c = Object.getOwnPropertyDescriptor(r, e);
|
|
622
|
+
Object.defineProperty(t, e, c.get ? c : {
|
|
624
623
|
enumerable: !0,
|
|
625
624
|
get: function() {
|
|
626
625
|
return r[e];
|
|
@@ -628,48 +627,48 @@ function bt(r) {
|
|
|
628
627
|
});
|
|
629
628
|
}), t;
|
|
630
629
|
}
|
|
631
|
-
var
|
|
632
|
-
function
|
|
630
|
+
var k0 = { exports: {} };
|
|
631
|
+
function _t(r) {
|
|
633
632
|
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.');
|
|
634
633
|
}
|
|
635
|
-
var
|
|
634
|
+
var S0 = { exports: {} }, yt = {}, wt = /* @__PURE__ */ Object.freeze({
|
|
636
635
|
__proto__: null,
|
|
637
|
-
default:
|
|
638
|
-
}),
|
|
636
|
+
default: yt
|
|
637
|
+
}), kt = /* @__PURE__ */ mt(wt), St = S0.exports, Nr;
|
|
639
638
|
function M() {
|
|
640
|
-
return Nr || (Nr = 1, (function(r,
|
|
639
|
+
return Nr || (Nr = 1, (function(r, l) {
|
|
641
640
|
(function(t, e) {
|
|
642
641
|
r.exports = e();
|
|
643
|
-
})(
|
|
644
|
-
var t = t || (function(e,
|
|
645
|
-
var
|
|
646
|
-
if (typeof window < "u" && window.crypto && (
|
|
642
|
+
})(St, function() {
|
|
643
|
+
var t = t || (function(e, c) {
|
|
644
|
+
var v;
|
|
645
|
+
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 Er < "u" && Er.crypto && (v = Er.crypto), !v && typeof _t == "function")
|
|
647
646
|
try {
|
|
648
|
-
|
|
647
|
+
v = kt;
|
|
649
648
|
} catch {
|
|
650
649
|
}
|
|
651
|
-
var
|
|
652
|
-
if (
|
|
653
|
-
if (typeof
|
|
650
|
+
var y = function() {
|
|
651
|
+
if (v) {
|
|
652
|
+
if (typeof v.getRandomValues == "function")
|
|
654
653
|
try {
|
|
655
|
-
return
|
|
654
|
+
return v.getRandomValues(new Uint32Array(1))[0];
|
|
656
655
|
} catch {
|
|
657
656
|
}
|
|
658
|
-
if (typeof
|
|
657
|
+
if (typeof v.randomBytes == "function")
|
|
659
658
|
try {
|
|
660
|
-
return
|
|
659
|
+
return v.randomBytes(4).readInt32LE();
|
|
661
660
|
} catch {
|
|
662
661
|
}
|
|
663
662
|
}
|
|
664
663
|
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
665
|
-
},
|
|
664
|
+
}, B = Object.create || /* @__PURE__ */ (function() {
|
|
666
665
|
function i() {
|
|
667
666
|
}
|
|
668
667
|
return function(o) {
|
|
669
|
-
var
|
|
670
|
-
return i.prototype = o,
|
|
668
|
+
var d;
|
|
669
|
+
return i.prototype = o, d = new i(), i.prototype = null, d;
|
|
671
670
|
};
|
|
672
|
-
})(),
|
|
671
|
+
})(), C = {}, x = C.lib = {}, n = x.Base = /* @__PURE__ */ (function() {
|
|
673
672
|
return {
|
|
674
673
|
/**
|
|
675
674
|
* Creates a new object that inherits from this object.
|
|
@@ -690,7 +689,7 @@ function M() {
|
|
|
690
689
|
* });
|
|
691
690
|
*/
|
|
692
691
|
extend: function(i) {
|
|
693
|
-
var o =
|
|
692
|
+
var o = B(this);
|
|
694
693
|
return i && o.mixIn(i), (!o.hasOwnProperty("init") || this.init === o.init) && (o.init = function() {
|
|
695
694
|
o.$super.init.apply(this, arguments);
|
|
696
695
|
}), o.init.prototype = o, o.$super = this, o;
|
|
@@ -768,7 +767,7 @@ function M() {
|
|
|
768
767
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
769
768
|
*/
|
|
770
769
|
init: function(i, o) {
|
|
771
|
-
i = this.words = i || [], o !=
|
|
770
|
+
i = this.words = i || [], o != c ? this.sigBytes = o : this.sigBytes = i.length * 4;
|
|
772
771
|
},
|
|
773
772
|
/**
|
|
774
773
|
* Converts this word array to a string.
|
|
@@ -798,15 +797,15 @@ function M() {
|
|
|
798
797
|
* wordArray1.concat(wordArray2);
|
|
799
798
|
*/
|
|
800
799
|
concat: function(i) {
|
|
801
|
-
var o = this.words,
|
|
800
|
+
var o = this.words, d = i.words, b = this.sigBytes, g = i.sigBytes;
|
|
802
801
|
if (this.clamp(), b % 4)
|
|
803
|
-
for (var
|
|
804
|
-
var k =
|
|
805
|
-
o[b +
|
|
802
|
+
for (var _ = 0; _ < g; _++) {
|
|
803
|
+
var k = d[_ >>> 2] >>> 24 - _ % 4 * 8 & 255;
|
|
804
|
+
o[b + _ >>> 2] |= k << 24 - (b + _) % 4 * 8;
|
|
806
805
|
}
|
|
807
806
|
else
|
|
808
807
|
for (var $ = 0; $ < g; $ += 4)
|
|
809
|
-
o[b + $ >>> 2] =
|
|
808
|
+
o[b + $ >>> 2] = d[$ >>> 2];
|
|
810
809
|
return this.sigBytes += g, this;
|
|
811
810
|
},
|
|
812
811
|
/**
|
|
@@ -847,11 +846,11 @@ function M() {
|
|
|
847
846
|
* var wordArray = CryptoJS.lib.WordArray.random(16);
|
|
848
847
|
*/
|
|
849
848
|
random: function(i) {
|
|
850
|
-
for (var o = [],
|
|
851
|
-
o.push(
|
|
849
|
+
for (var o = [], d = 0; d < i; d += 4)
|
|
850
|
+
o.push(y());
|
|
852
851
|
return new E.init(o, i);
|
|
853
852
|
}
|
|
854
|
-
}), a =
|
|
853
|
+
}), a = C.enc = {}, s = a.Hex = {
|
|
855
854
|
/**
|
|
856
855
|
* Converts a word array to a hex string.
|
|
857
856
|
*
|
|
@@ -866,9 +865,9 @@ function M() {
|
|
|
866
865
|
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
|
867
866
|
*/
|
|
868
867
|
stringify: function(i) {
|
|
869
|
-
for (var o = i.words,
|
|
870
|
-
var
|
|
871
|
-
b.push((
|
|
868
|
+
for (var o = i.words, d = i.sigBytes, b = [], g = 0; g < d; g++) {
|
|
869
|
+
var _ = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
870
|
+
b.push((_ >>> 4).toString(16)), b.push((_ & 15).toString(16));
|
|
872
871
|
}
|
|
873
872
|
return b.join("");
|
|
874
873
|
},
|
|
@@ -886,9 +885,9 @@ function M() {
|
|
|
886
885
|
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
|
|
887
886
|
*/
|
|
888
887
|
parse: function(i) {
|
|
889
|
-
for (var o = i.length,
|
|
890
|
-
|
|
891
|
-
return new E.init(
|
|
888
|
+
for (var o = i.length, d = [], b = 0; b < o; b += 2)
|
|
889
|
+
d[b >>> 3] |= parseInt(i.substr(b, 2), 16) << 24 - b % 8 * 4;
|
|
890
|
+
return new E.init(d, o / 2);
|
|
892
891
|
}
|
|
893
892
|
}, u = a.Latin1 = {
|
|
894
893
|
/**
|
|
@@ -905,9 +904,9 @@ function M() {
|
|
|
905
904
|
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
|
|
906
905
|
*/
|
|
907
906
|
stringify: function(i) {
|
|
908
|
-
for (var o = i.words,
|
|
909
|
-
var
|
|
910
|
-
b.push(String.fromCharCode(
|
|
907
|
+
for (var o = i.words, d = i.sigBytes, b = [], g = 0; g < d; g++) {
|
|
908
|
+
var _ = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
909
|
+
b.push(String.fromCharCode(_));
|
|
911
910
|
}
|
|
912
911
|
return b.join("");
|
|
913
912
|
},
|
|
@@ -925,9 +924,9 @@ function M() {
|
|
|
925
924
|
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
|
|
926
925
|
*/
|
|
927
926
|
parse: function(i) {
|
|
928
|
-
for (var o = i.length,
|
|
929
|
-
|
|
930
|
-
return new E.init(
|
|
927
|
+
for (var o = i.length, d = [], b = 0; b < o; b++)
|
|
928
|
+
d[b >>> 2] |= (i.charCodeAt(b) & 255) << 24 - b % 4 * 8;
|
|
929
|
+
return new E.init(d, o);
|
|
931
930
|
}
|
|
932
931
|
}, p = a.Utf8 = {
|
|
933
932
|
/**
|
|
@@ -966,7 +965,7 @@ function M() {
|
|
|
966
965
|
parse: function(i) {
|
|
967
966
|
return u.parse(unescape(encodeURIComponent(i)));
|
|
968
967
|
}
|
|
969
|
-
},
|
|
968
|
+
}, h = x.BufferedBlockAlgorithm = n.extend({
|
|
970
969
|
/**
|
|
971
970
|
* Resets this block algorithm's data buffer to its initial state.
|
|
972
971
|
*
|
|
@@ -1005,13 +1004,13 @@ function M() {
|
|
|
1005
1004
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
1006
1005
|
*/
|
|
1007
1006
|
_process: function(i) {
|
|
1008
|
-
var o,
|
|
1007
|
+
var o, d = this._data, b = d.words, g = d.sigBytes, _ = this.blockSize, k = _ * 4, $ = g / k;
|
|
1009
1008
|
i ? $ = e.ceil($) : $ = e.max(($ | 0) - this._minBufferSize, 0);
|
|
1010
|
-
var F = $ *
|
|
1009
|
+
var F = $ * _, w = e.min(F * 4, g);
|
|
1011
1010
|
if (F) {
|
|
1012
|
-
for (var H = 0; H < F; H +=
|
|
1011
|
+
for (var H = 0; H < F; H += _)
|
|
1013
1012
|
this._doProcessBlock(b, H);
|
|
1014
|
-
o = b.splice(0, F),
|
|
1013
|
+
o = b.splice(0, F), d.sigBytes -= w;
|
|
1015
1014
|
}
|
|
1016
1015
|
return new E.init(o, w);
|
|
1017
1016
|
},
|
|
@@ -1030,7 +1029,7 @@ function M() {
|
|
|
1030
1029
|
},
|
|
1031
1030
|
_minBufferSize: 0
|
|
1032
1031
|
});
|
|
1033
|
-
x.Hasher =
|
|
1032
|
+
x.Hasher = h.extend({
|
|
1034
1033
|
/**
|
|
1035
1034
|
* Configuration options.
|
|
1036
1035
|
*/
|
|
@@ -1055,7 +1054,7 @@ function M() {
|
|
|
1055
1054
|
* hasher.reset();
|
|
1056
1055
|
*/
|
|
1057
1056
|
reset: function() {
|
|
1058
|
-
|
|
1057
|
+
h.reset.call(this), this._doReset();
|
|
1059
1058
|
},
|
|
1060
1059
|
/**
|
|
1061
1060
|
* Updates this hasher with a message.
|
|
@@ -1106,8 +1105,8 @@ function M() {
|
|
|
1106
1105
|
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
|
|
1107
1106
|
*/
|
|
1108
1107
|
_createHelper: function(i) {
|
|
1109
|
-
return function(o,
|
|
1110
|
-
return new i.init(
|
|
1108
|
+
return function(o, d) {
|
|
1109
|
+
return new i.init(d).finalize(o);
|
|
1111
1110
|
};
|
|
1112
1111
|
},
|
|
1113
1112
|
/**
|
|
@@ -1124,27 +1123,27 @@ function M() {
|
|
|
1124
1123
|
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
|
|
1125
1124
|
*/
|
|
1126
1125
|
_createHmacHelper: function(i) {
|
|
1127
|
-
return function(o,
|
|
1128
|
-
return new D.HMAC.init(i,
|
|
1126
|
+
return function(o, d) {
|
|
1127
|
+
return new D.HMAC.init(i, d).finalize(o);
|
|
1129
1128
|
};
|
|
1130
1129
|
}
|
|
1131
1130
|
});
|
|
1132
|
-
var D =
|
|
1133
|
-
return
|
|
1131
|
+
var D = C.algo = {};
|
|
1132
|
+
return C;
|
|
1134
1133
|
})(Math);
|
|
1135
1134
|
return t;
|
|
1136
1135
|
});
|
|
1137
|
-
})(
|
|
1136
|
+
})(S0)), S0.exports;
|
|
1138
1137
|
}
|
|
1139
|
-
var
|
|
1140
|
-
function
|
|
1141
|
-
return Ur || (Ur = 1, (function(r,
|
|
1138
|
+
var H0 = { exports: {} }, Ht = H0.exports, Ur;
|
|
1139
|
+
function vr() {
|
|
1140
|
+
return Ur || (Ur = 1, (function(r, l) {
|
|
1142
1141
|
(function(t, e) {
|
|
1143
1142
|
r.exports = e(M());
|
|
1144
|
-
})(
|
|
1143
|
+
})(Ht, function(t) {
|
|
1145
1144
|
return (function(e) {
|
|
1146
|
-
var
|
|
1147
|
-
|
|
1145
|
+
var c = t, v = c.lib, y = v.Base, B = v.WordArray, C = c.x64 = {};
|
|
1146
|
+
C.Word = y.extend({
|
|
1148
1147
|
/**
|
|
1149
1148
|
* Initializes a newly created 64-bit word.
|
|
1150
1149
|
*
|
|
@@ -1307,7 +1306,7 @@ function lr() {
|
|
|
1307
1306
|
// var high = (this.high + word.high + carry) | 0;
|
|
1308
1307
|
// return X64Word.create(high, low);
|
|
1309
1308
|
// }
|
|
1310
|
-
}),
|
|
1309
|
+
}), C.WordArray = y.extend({
|
|
1311
1310
|
/**
|
|
1312
1311
|
* Initializes a newly created word array.
|
|
1313
1312
|
*
|
|
@@ -1345,7 +1344,7 @@ function lr() {
|
|
|
1345
1344
|
var s = x[a];
|
|
1346
1345
|
E.push(s.high), E.push(s.low);
|
|
1347
1346
|
}
|
|
1348
|
-
return
|
|
1347
|
+
return B.create(E, this.sigBytes);
|
|
1349
1348
|
},
|
|
1350
1349
|
/**
|
|
1351
1350
|
* Creates a copy of this word array.
|
|
@@ -1357,46 +1356,46 @@ function lr() {
|
|
|
1357
1356
|
* var clone = x64WordArray.clone();
|
|
1358
1357
|
*/
|
|
1359
1358
|
clone: function() {
|
|
1360
|
-
for (var x =
|
|
1359
|
+
for (var x = y.clone.call(this), n = x.words = this.words.slice(0), E = n.length, a = 0; a < E; a++)
|
|
1361
1360
|
n[a] = n[a].clone();
|
|
1362
1361
|
return x;
|
|
1363
1362
|
}
|
|
1364
1363
|
});
|
|
1365
1364
|
})(), t;
|
|
1366
1365
|
});
|
|
1367
|
-
})(
|
|
1366
|
+
})(H0)), H0.exports;
|
|
1368
1367
|
}
|
|
1369
|
-
var
|
|
1370
|
-
function
|
|
1371
|
-
return jr || (jr = 1, (function(r,
|
|
1368
|
+
var R0 = { exports: {} }, Rt = R0.exports, jr;
|
|
1369
|
+
function $t() {
|
|
1370
|
+
return jr || (jr = 1, (function(r, l) {
|
|
1372
1371
|
(function(t, e) {
|
|
1373
1372
|
r.exports = e(M());
|
|
1374
|
-
})(
|
|
1373
|
+
})(Rt, function(t) {
|
|
1375
1374
|
return (function() {
|
|
1376
1375
|
if (typeof ArrayBuffer == "function") {
|
|
1377
|
-
var e = t,
|
|
1378
|
-
if (
|
|
1379
|
-
for (var x =
|
|
1380
|
-
n[E >>> 2] |=
|
|
1381
|
-
|
|
1376
|
+
var e = t, c = e.lib, v = c.WordArray, y = v.init, B = v.init = function(C) {
|
|
1377
|
+
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) {
|
|
1378
|
+
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1379
|
+
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
1380
|
+
y.call(this, n, x);
|
|
1382
1381
|
} else
|
|
1383
|
-
|
|
1382
|
+
y.apply(this, arguments);
|
|
1384
1383
|
};
|
|
1385
|
-
|
|
1384
|
+
B.prototype = v;
|
|
1386
1385
|
}
|
|
1387
1386
|
})(), t.lib.WordArray;
|
|
1388
1387
|
});
|
|
1389
|
-
})(
|
|
1388
|
+
})(R0)), R0.exports;
|
|
1390
1389
|
}
|
|
1391
|
-
var
|
|
1392
|
-
function
|
|
1393
|
-
return Gr || (Gr = 1, (function(r,
|
|
1390
|
+
var $0 = { exports: {} }, Pt = $0.exports, Gr;
|
|
1391
|
+
function zt() {
|
|
1392
|
+
return Gr || (Gr = 1, (function(r, l) {
|
|
1394
1393
|
(function(t, e) {
|
|
1395
1394
|
r.exports = e(M());
|
|
1396
|
-
})(
|
|
1395
|
+
})(Pt, function(t) {
|
|
1397
1396
|
return (function() {
|
|
1398
|
-
var e = t,
|
|
1399
|
-
|
|
1397
|
+
var e = t, c = e.lib, v = c.WordArray, y = e.enc;
|
|
1398
|
+
y.Utf16 = y.Utf16BE = {
|
|
1400
1399
|
/**
|
|
1401
1400
|
* Converts a word array to a UTF-16 BE string.
|
|
1402
1401
|
*
|
|
@@ -1410,8 +1409,8 @@ function Pt() {
|
|
|
1410
1409
|
*
|
|
1411
1410
|
* var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
|
|
1412
1411
|
*/
|
|
1413
|
-
stringify: function(
|
|
1414
|
-
for (var x =
|
|
1412
|
+
stringify: function(C) {
|
|
1413
|
+
for (var x = C.words, n = C.sigBytes, E = [], a = 0; a < n; a += 2) {
|
|
1415
1414
|
var s = x[a >>> 2] >>> 16 - a % 4 * 8 & 65535;
|
|
1416
1415
|
E.push(String.fromCharCode(s));
|
|
1417
1416
|
}
|
|
@@ -1430,12 +1429,12 @@ function Pt() {
|
|
|
1430
1429
|
*
|
|
1431
1430
|
* var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
|
|
1432
1431
|
*/
|
|
1433
|
-
parse: function(
|
|
1434
|
-
for (var x =
|
|
1435
|
-
n[E >>> 1] |=
|
|
1436
|
-
return
|
|
1432
|
+
parse: function(C) {
|
|
1433
|
+
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1434
|
+
n[E >>> 1] |= C.charCodeAt(E) << 16 - E % 2 * 16;
|
|
1435
|
+
return v.create(n, x * 2);
|
|
1437
1436
|
}
|
|
1438
|
-
},
|
|
1437
|
+
}, y.Utf16LE = {
|
|
1439
1438
|
/**
|
|
1440
1439
|
* Converts a word array to a UTF-16 LE string.
|
|
1441
1440
|
*
|
|
@@ -1449,9 +1448,9 @@ function Pt() {
|
|
|
1449
1448
|
*
|
|
1450
1449
|
* var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
|
|
1451
1450
|
*/
|
|
1452
|
-
stringify: function(
|
|
1453
|
-
for (var x =
|
|
1454
|
-
var s =
|
|
1451
|
+
stringify: function(C) {
|
|
1452
|
+
for (var x = C.words, n = C.sigBytes, E = [], a = 0; a < n; a += 2) {
|
|
1453
|
+
var s = B(x[a >>> 2] >>> 16 - a % 4 * 8 & 65535);
|
|
1455
1454
|
E.push(String.fromCharCode(s));
|
|
1456
1455
|
}
|
|
1457
1456
|
return E.join("");
|
|
@@ -1469,28 +1468,28 @@ function Pt() {
|
|
|
1469
1468
|
*
|
|
1470
1469
|
* var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
|
|
1471
1470
|
*/
|
|
1472
|
-
parse: function(
|
|
1473
|
-
for (var x =
|
|
1474
|
-
n[E >>> 1] |= C
|
|
1475
|
-
return
|
|
1471
|
+
parse: function(C) {
|
|
1472
|
+
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1473
|
+
n[E >>> 1] |= B(C.charCodeAt(E) << 16 - E % 2 * 16);
|
|
1474
|
+
return v.create(n, x * 2);
|
|
1476
1475
|
}
|
|
1477
1476
|
};
|
|
1478
|
-
function C
|
|
1479
|
-
return
|
|
1477
|
+
function B(C) {
|
|
1478
|
+
return C << 8 & 4278255360 | C >>> 8 & 16711935;
|
|
1480
1479
|
}
|
|
1481
1480
|
})(), t.enc.Utf16;
|
|
1482
1481
|
});
|
|
1483
|
-
})(
|
|
1482
|
+
})($0)), $0.exports;
|
|
1484
1483
|
}
|
|
1485
|
-
var
|
|
1484
|
+
var P0 = { exports: {} }, Wt = P0.exports, Kr;
|
|
1486
1485
|
function c0() {
|
|
1487
|
-
return Kr || (Kr = 1, (function(r,
|
|
1486
|
+
return Kr || (Kr = 1, (function(r, l) {
|
|
1488
1487
|
(function(t, e) {
|
|
1489
1488
|
r.exports = e(M());
|
|
1490
|
-
})(
|
|
1489
|
+
})(Wt, function(t) {
|
|
1491
1490
|
return (function() {
|
|
1492
|
-
var e = t,
|
|
1493
|
-
|
|
1491
|
+
var e = t, c = e.lib, v = c.WordArray, y = e.enc;
|
|
1492
|
+
y.Base64 = {
|
|
1494
1493
|
/**
|
|
1495
1494
|
* Converts a word array to a Base64 string.
|
|
1496
1495
|
*
|
|
@@ -1504,11 +1503,11 @@ function c0() {
|
|
|
1504
1503
|
*
|
|
1505
1504
|
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
|
|
1506
1505
|
*/
|
|
1507
|
-
stringify: function(
|
|
1508
|
-
var x =
|
|
1509
|
-
|
|
1506
|
+
stringify: function(C) {
|
|
1507
|
+
var x = C.words, n = C.sigBytes, E = this._map;
|
|
1508
|
+
C.clamp();
|
|
1510
1509
|
for (var a = [], s = 0; s < n; s += 3)
|
|
1511
|
-
for (var u = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, p = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255,
|
|
1510
|
+
for (var u = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, p = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, h = x[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, D = u << 16 | p << 8 | h, i = 0; i < 4 && s + i * 0.75 < n; i++)
|
|
1512
1511
|
a.push(E.charAt(D >>> 6 * (3 - i) & 63));
|
|
1513
1512
|
var o = E.charAt(64);
|
|
1514
1513
|
if (o)
|
|
@@ -1529,8 +1528,8 @@ function c0() {
|
|
|
1529
1528
|
*
|
|
1530
1529
|
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
|
|
1531
1530
|
*/
|
|
1532
|
-
parse: function(
|
|
1533
|
-
var x =
|
|
1531
|
+
parse: function(C) {
|
|
1532
|
+
var x = C.length, n = this._map, E = this._reverseMap;
|
|
1534
1533
|
if (!E) {
|
|
1535
1534
|
E = this._reverseMap = [];
|
|
1536
1535
|
for (var a = 0; a < n.length; a++)
|
|
@@ -1538,34 +1537,34 @@ function c0() {
|
|
|
1538
1537
|
}
|
|
1539
1538
|
var s = n.charAt(64);
|
|
1540
1539
|
if (s) {
|
|
1541
|
-
var u =
|
|
1540
|
+
var u = C.indexOf(s);
|
|
1542
1541
|
u !== -1 && (x = u);
|
|
1543
1542
|
}
|
|
1544
|
-
return C
|
|
1543
|
+
return B(C, x, E);
|
|
1545
1544
|
},
|
|
1546
1545
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
|
1547
1546
|
};
|
|
1548
|
-
function C
|
|
1547
|
+
function B(C, x, n) {
|
|
1549
1548
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1550
1549
|
if (s % 4) {
|
|
1551
|
-
var u = n[
|
|
1552
|
-
E[a >>> 2] |=
|
|
1550
|
+
var u = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, h = u | p;
|
|
1551
|
+
E[a >>> 2] |= h << 24 - a % 4 * 8, a++;
|
|
1553
1552
|
}
|
|
1554
|
-
return
|
|
1553
|
+
return v.create(E, a);
|
|
1555
1554
|
}
|
|
1556
1555
|
})(), t.enc.Base64;
|
|
1557
1556
|
});
|
|
1558
|
-
})(
|
|
1557
|
+
})(P0)), P0.exports;
|
|
1559
1558
|
}
|
|
1560
|
-
var
|
|
1561
|
-
function
|
|
1562
|
-
return Xr || (Xr = 1, (function(r,
|
|
1559
|
+
var z0 = { exports: {} }, It = z0.exports, Xr;
|
|
1560
|
+
function Lt() {
|
|
1561
|
+
return Xr || (Xr = 1, (function(r, l) {
|
|
1563
1562
|
(function(t, e) {
|
|
1564
1563
|
r.exports = e(M());
|
|
1565
|
-
})(
|
|
1564
|
+
})(It, function(t) {
|
|
1566
1565
|
return (function() {
|
|
1567
|
-
var e = t,
|
|
1568
|
-
|
|
1566
|
+
var e = t, c = e.lib, v = c.WordArray, y = e.enc;
|
|
1567
|
+
y.Base64url = {
|
|
1569
1568
|
/**
|
|
1570
1569
|
* Converts a word array to a Base64url string.
|
|
1571
1570
|
*
|
|
@@ -1581,17 +1580,17 @@ function It() {
|
|
|
1581
1580
|
*
|
|
1582
1581
|
* var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
|
|
1583
1582
|
*/
|
|
1584
|
-
stringify: function(
|
|
1583
|
+
stringify: function(C, x) {
|
|
1585
1584
|
x === void 0 && (x = !0);
|
|
1586
|
-
var n =
|
|
1587
|
-
|
|
1585
|
+
var n = C.words, E = C.sigBytes, a = x ? this._safe_map : this._map;
|
|
1586
|
+
C.clamp();
|
|
1588
1587
|
for (var s = [], u = 0; u < E; u += 3)
|
|
1589
|
-
for (var p = n[u >>> 2] >>> 24 - u % 4 * 8 & 255,
|
|
1588
|
+
for (var p = n[u >>> 2] >>> 24 - u % 4 * 8 & 255, h = n[u + 1 >>> 2] >>> 24 - (u + 1) % 4 * 8 & 255, D = n[u + 2 >>> 2] >>> 24 - (u + 2) % 4 * 8 & 255, i = p << 16 | h << 8 | D, o = 0; o < 4 && u + o * 0.75 < E; o++)
|
|
1590
1589
|
s.push(a.charAt(i >>> 6 * (3 - o) & 63));
|
|
1591
|
-
var
|
|
1592
|
-
if (
|
|
1590
|
+
var d = a.charAt(64);
|
|
1591
|
+
if (d)
|
|
1593
1592
|
for (; s.length % 4; )
|
|
1594
|
-
s.push(
|
|
1593
|
+
s.push(d);
|
|
1595
1594
|
return s.join("");
|
|
1596
1595
|
},
|
|
1597
1596
|
/**
|
|
@@ -1609,9 +1608,9 @@ function It() {
|
|
|
1609
1608
|
*
|
|
1610
1609
|
* var wordArray = CryptoJS.enc.Base64url.parse(base64String);
|
|
1611
1610
|
*/
|
|
1612
|
-
parse: function(
|
|
1611
|
+
parse: function(C, x) {
|
|
1613
1612
|
x === void 0 && (x = !0);
|
|
1614
|
-
var n =
|
|
1613
|
+
var n = C.length, E = x ? this._safe_map : this._map, a = this._reverseMap;
|
|
1615
1614
|
if (!a) {
|
|
1616
1615
|
a = this._reverseMap = [];
|
|
1617
1616
|
for (var s = 0; s < E.length; s++)
|
|
@@ -1619,102 +1618,102 @@ function It() {
|
|
|
1619
1618
|
}
|
|
1620
1619
|
var u = E.charAt(64);
|
|
1621
1620
|
if (u) {
|
|
1622
|
-
var p =
|
|
1621
|
+
var p = C.indexOf(u);
|
|
1623
1622
|
p !== -1 && (n = p);
|
|
1624
1623
|
}
|
|
1625
|
-
return C
|
|
1624
|
+
return B(C, n, a);
|
|
1626
1625
|
},
|
|
1627
1626
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
1628
1627
|
_safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
|
|
1629
1628
|
};
|
|
1630
|
-
function C
|
|
1629
|
+
function B(C, x, n) {
|
|
1631
1630
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1632
1631
|
if (s % 4) {
|
|
1633
|
-
var u = n[
|
|
1634
|
-
E[a >>> 2] |=
|
|
1632
|
+
var u = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, h = u | p;
|
|
1633
|
+
E[a >>> 2] |= h << 24 - a % 4 * 8, a++;
|
|
1635
1634
|
}
|
|
1636
|
-
return
|
|
1635
|
+
return v.create(E, a);
|
|
1637
1636
|
}
|
|
1638
1637
|
})(), t.enc.Base64url;
|
|
1639
1638
|
});
|
|
1640
|
-
})(
|
|
1639
|
+
})(z0)), z0.exports;
|
|
1641
1640
|
}
|
|
1642
|
-
var
|
|
1641
|
+
var W0 = { exports: {} }, Ot = W0.exports, Zr;
|
|
1643
1642
|
function f0() {
|
|
1644
|
-
return
|
|
1643
|
+
return Zr || (Zr = 1, (function(r, l) {
|
|
1645
1644
|
(function(t, e) {
|
|
1646
1645
|
r.exports = e(M());
|
|
1647
|
-
})(
|
|
1646
|
+
})(Ot, function(t) {
|
|
1648
1647
|
return (function(e) {
|
|
1649
|
-
var
|
|
1648
|
+
var c = t, v = c.lib, y = v.WordArray, B = v.Hasher, C = c.algo, x = [];
|
|
1650
1649
|
(function() {
|
|
1651
1650
|
for (var p = 0; p < 64; p++)
|
|
1652
1651
|
x[p] = e.abs(e.sin(p + 1)) * 4294967296 | 0;
|
|
1653
1652
|
})();
|
|
1654
|
-
var n =
|
|
1653
|
+
var n = C.MD5 = B.extend({
|
|
1655
1654
|
_doReset: function() {
|
|
1656
|
-
this._hash = new
|
|
1655
|
+
this._hash = new y.init([
|
|
1657
1656
|
1732584193,
|
|
1658
1657
|
4023233417,
|
|
1659
1658
|
2562383102,
|
|
1660
1659
|
271733878
|
|
1661
1660
|
]);
|
|
1662
1661
|
},
|
|
1663
|
-
_doProcessBlock: function(p,
|
|
1662
|
+
_doProcessBlock: function(p, h) {
|
|
1664
1663
|
for (var D = 0; D < 16; D++) {
|
|
1665
|
-
var i =
|
|
1664
|
+
var i = h + D, o = p[i];
|
|
1666
1665
|
p[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1667
1666
|
}
|
|
1668
|
-
var
|
|
1669
|
-
S = E(S,
|
|
1667
|
+
var d = this._hash.words, b = p[h + 0], g = p[h + 1], _ = p[h + 2], k = p[h + 3], $ = p[h + 4], F = p[h + 5], w = p[h + 6], H = p[h + 7], R = p[h + 8], z = p[h + 9], O = p[h + 10], q = p[h + 11], U = p[h + 12], T = p[h + 13], N = p[h + 14], j = p[h + 15], S = d[0], f = d[1], A = d[2], m = d[3];
|
|
1668
|
+
S = E(S, f, A, m, b, 7, x[0]), m = E(m, S, f, A, g, 12, x[1]), A = E(A, m, S, f, _, 17, x[2]), f = E(f, A, m, S, k, 22, x[3]), S = E(S, f, A, m, $, 7, x[4]), m = E(m, S, f, A, F, 12, x[5]), A = E(A, m, S, f, w, 17, x[6]), f = E(f, A, m, S, H, 22, x[7]), S = E(S, f, A, m, R, 7, x[8]), m = E(m, S, f, A, z, 12, x[9]), A = E(A, m, S, f, O, 17, x[10]), f = E(f, A, m, S, q, 22, x[11]), S = E(S, f, A, m, U, 7, x[12]), m = E(m, S, f, A, T, 12, x[13]), A = E(A, m, S, f, N, 17, x[14]), f = E(f, A, m, S, j, 22, x[15]), S = a(S, f, A, m, g, 5, x[16]), m = a(m, S, f, A, w, 9, x[17]), A = a(A, m, S, f, q, 14, x[18]), f = a(f, A, m, S, b, 20, x[19]), S = a(S, f, A, m, F, 5, x[20]), m = a(m, S, f, A, O, 9, x[21]), A = a(A, m, S, f, j, 14, x[22]), f = a(f, A, m, S, $, 20, x[23]), S = a(S, f, A, m, z, 5, x[24]), m = a(m, S, f, A, N, 9, x[25]), A = a(A, m, S, f, k, 14, x[26]), f = a(f, A, m, S, R, 20, x[27]), S = a(S, f, A, m, T, 5, x[28]), m = a(m, S, f, A, _, 9, x[29]), A = a(A, m, S, f, H, 14, x[30]), f = a(f, A, m, S, U, 20, x[31]), S = s(S, f, A, m, F, 4, x[32]), m = s(m, S, f, A, R, 11, x[33]), A = s(A, m, S, f, q, 16, x[34]), f = s(f, A, m, S, N, 23, x[35]), S = s(S, f, A, m, g, 4, x[36]), m = s(m, S, f, A, $, 11, x[37]), A = s(A, m, S, f, H, 16, x[38]), f = s(f, A, m, S, O, 23, x[39]), S = s(S, f, A, m, T, 4, x[40]), m = s(m, S, f, A, b, 11, x[41]), A = s(A, m, S, f, k, 16, x[42]), f = s(f, A, m, S, w, 23, x[43]), S = s(S, f, A, m, z, 4, x[44]), m = s(m, S, f, A, U, 11, x[45]), A = s(A, m, S, f, j, 16, x[46]), f = s(f, A, m, S, _, 23, x[47]), S = u(S, f, A, m, b, 6, x[48]), m = u(m, S, f, A, H, 10, x[49]), A = u(A, m, S, f, N, 15, x[50]), f = u(f, A, m, S, F, 21, x[51]), S = u(S, f, A, m, U, 6, x[52]), m = u(m, S, f, A, k, 10, x[53]), A = u(A, m, S, f, O, 15, x[54]), f = u(f, A, m, S, g, 21, x[55]), S = u(S, f, A, m, R, 6, x[56]), m = u(m, S, f, A, j, 10, x[57]), A = u(A, m, S, f, w, 15, x[58]), f = u(f, A, m, S, T, 21, x[59]), S = u(S, f, A, m, $, 6, x[60]), m = u(m, S, f, A, q, 10, x[61]), A = u(A, m, S, f, _, 15, x[62]), f = u(f, A, m, S, z, 21, x[63]), d[0] = d[0] + S | 0, d[1] = d[1] + f | 0, d[2] = d[2] + A | 0, d[3] = d[3] + m | 0;
|
|
1670
1669
|
},
|
|
1671
1670
|
_doFinalize: function() {
|
|
1672
|
-
var p = this._data,
|
|
1673
|
-
|
|
1674
|
-
var o = e.floor(D / 4294967296),
|
|
1675
|
-
|
|
1676
|
-
for (var b = this._hash, g = b.words,
|
|
1677
|
-
var k = g[
|
|
1678
|
-
g[
|
|
1671
|
+
var p = this._data, h = p.words, D = this._nDataBytes * 8, i = p.sigBytes * 8;
|
|
1672
|
+
h[i >>> 5] |= 128 << 24 - i % 32;
|
|
1673
|
+
var o = e.floor(D / 4294967296), d = D;
|
|
1674
|
+
h[(i + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, h[(i + 64 >>> 9 << 4) + 14] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360, p.sigBytes = (h.length + 1) * 4, this._process();
|
|
1675
|
+
for (var b = this._hash, g = b.words, _ = 0; _ < 4; _++) {
|
|
1676
|
+
var k = g[_];
|
|
1677
|
+
g[_] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
1679
1678
|
}
|
|
1680
1679
|
return b;
|
|
1681
1680
|
},
|
|
1682
1681
|
clone: function() {
|
|
1683
|
-
var p =
|
|
1682
|
+
var p = B.clone.call(this);
|
|
1684
1683
|
return p._hash = this._hash.clone(), p;
|
|
1685
1684
|
}
|
|
1686
1685
|
});
|
|
1687
|
-
function E(p,
|
|
1688
|
-
var g = p + (
|
|
1689
|
-
return (g <<
|
|
1686
|
+
function E(p, h, D, i, o, d, b) {
|
|
1687
|
+
var g = p + (h & D | ~h & i) + o + b;
|
|
1688
|
+
return (g << d | g >>> 32 - d) + h;
|
|
1690
1689
|
}
|
|
1691
|
-
function a(p,
|
|
1692
|
-
var g = p + (
|
|
1693
|
-
return (g <<
|
|
1690
|
+
function a(p, h, D, i, o, d, b) {
|
|
1691
|
+
var g = p + (h & i | D & ~i) + o + b;
|
|
1692
|
+
return (g << d | g >>> 32 - d) + h;
|
|
1694
1693
|
}
|
|
1695
|
-
function s(p,
|
|
1696
|
-
var g = p + (
|
|
1697
|
-
return (g <<
|
|
1694
|
+
function s(p, h, D, i, o, d, b) {
|
|
1695
|
+
var g = p + (h ^ D ^ i) + o + b;
|
|
1696
|
+
return (g << d | g >>> 32 - d) + h;
|
|
1698
1697
|
}
|
|
1699
|
-
function u(p,
|
|
1700
|
-
var g = p + (D ^ (
|
|
1701
|
-
return (g <<
|
|
1698
|
+
function u(p, h, D, i, o, d, b) {
|
|
1699
|
+
var g = p + (D ^ (h | ~i)) + o + b;
|
|
1700
|
+
return (g << d | g >>> 32 - d) + h;
|
|
1702
1701
|
}
|
|
1703
|
-
|
|
1702
|
+
c.MD5 = B._createHelper(n), c.HmacMD5 = B._createHmacHelper(n);
|
|
1704
1703
|
})(Math), t.MD5;
|
|
1705
1704
|
});
|
|
1706
|
-
})(
|
|
1705
|
+
})(W0)), W0.exports;
|
|
1707
1706
|
}
|
|
1708
|
-
var
|
|
1707
|
+
var I0 = { exports: {} }, qt = I0.exports, Yr;
|
|
1709
1708
|
function Pe() {
|
|
1710
|
-
return
|
|
1709
|
+
return Yr || (Yr = 1, (function(r, l) {
|
|
1711
1710
|
(function(t, e) {
|
|
1712
1711
|
r.exports = e(M());
|
|
1713
|
-
})(
|
|
1712
|
+
})(qt, function(t) {
|
|
1714
1713
|
return (function() {
|
|
1715
|
-
var e = t,
|
|
1714
|
+
var e = t, c = e.lib, v = c.WordArray, y = c.Hasher, B = e.algo, C = [], x = B.SHA1 = y.extend({
|
|
1716
1715
|
_doReset: function() {
|
|
1717
|
-
this._hash = new
|
|
1716
|
+
this._hash = new v.init([
|
|
1718
1717
|
1732584193,
|
|
1719
1718
|
4023233417,
|
|
1720
1719
|
2562383102,
|
|
@@ -1723,40 +1722,40 @@ function Pe() {
|
|
|
1723
1722
|
]);
|
|
1724
1723
|
},
|
|
1725
1724
|
_doProcessBlock: function(n, E) {
|
|
1726
|
-
for (var a = this._hash.words, s = a[0], u = a[1], p = a[2],
|
|
1725
|
+
for (var a = this._hash.words, s = a[0], u = a[1], p = a[2], h = a[3], D = a[4], i = 0; i < 80; i++) {
|
|
1727
1726
|
if (i < 16)
|
|
1728
|
-
|
|
1727
|
+
C[i] = n[E + i] | 0;
|
|
1729
1728
|
else {
|
|
1730
|
-
var o =
|
|
1731
|
-
|
|
1729
|
+
var o = C[i - 3] ^ C[i - 8] ^ C[i - 14] ^ C[i - 16];
|
|
1730
|
+
C[i] = o << 1 | o >>> 31;
|
|
1732
1731
|
}
|
|
1733
|
-
var
|
|
1734
|
-
i < 20 ?
|
|
1732
|
+
var d = (s << 5 | s >>> 27) + D + C[i];
|
|
1733
|
+
i < 20 ? d += (u & p | ~u & h) + 1518500249 : i < 40 ? d += (u ^ p ^ h) + 1859775393 : i < 60 ? d += (u & p | u & h | p & h) - 1894007588 : d += (u ^ p ^ h) - 899497514, D = h, h = p, p = u << 30 | u >>> 2, u = s, s = d;
|
|
1735
1734
|
}
|
|
1736
|
-
a[0] = a[0] + s | 0, a[1] = a[1] + u | 0, a[2] = a[2] + p | 0, a[3] = a[3] +
|
|
1735
|
+
a[0] = a[0] + s | 0, a[1] = a[1] + u | 0, a[2] = a[2] + p | 0, a[3] = a[3] + h | 0, a[4] = a[4] + D | 0;
|
|
1737
1736
|
},
|
|
1738
1737
|
_doFinalize: function() {
|
|
1739
1738
|
var n = this._data, E = n.words, a = this._nDataBytes * 8, s = n.sigBytes * 8;
|
|
1740
1739
|
return E[s >>> 5] |= 128 << 24 - s % 32, E[(s + 64 >>> 9 << 4) + 14] = Math.floor(a / 4294967296), E[(s + 64 >>> 9 << 4) + 15] = a, n.sigBytes = E.length * 4, this._process(), this._hash;
|
|
1741
1740
|
},
|
|
1742
1741
|
clone: function() {
|
|
1743
|
-
var n =
|
|
1742
|
+
var n = y.clone.call(this);
|
|
1744
1743
|
return n._hash = this._hash.clone(), n;
|
|
1745
1744
|
}
|
|
1746
1745
|
});
|
|
1747
|
-
e.SHA1 =
|
|
1746
|
+
e.SHA1 = y._createHelper(x), e.HmacSHA1 = y._createHmacHelper(x);
|
|
1748
1747
|
})(), t.SHA1;
|
|
1749
1748
|
});
|
|
1750
|
-
})(
|
|
1749
|
+
})(I0)), I0.exports;
|
|
1751
1750
|
}
|
|
1752
|
-
var
|
|
1751
|
+
var L0 = { exports: {} }, Tt = L0.exports, Qr;
|
|
1753
1752
|
function mr() {
|
|
1754
|
-
return Qr || (Qr = 1, (function(r,
|
|
1753
|
+
return Qr || (Qr = 1, (function(r, l) {
|
|
1755
1754
|
(function(t, e) {
|
|
1756
1755
|
r.exports = e(M());
|
|
1757
|
-
})(
|
|
1756
|
+
})(Tt, function(t) {
|
|
1758
1757
|
return (function(e) {
|
|
1759
|
-
var
|
|
1758
|
+
var c = t, v = c.lib, y = v.WordArray, B = v.Hasher, C = c.algo, x = [], n = [];
|
|
1760
1759
|
(function() {
|
|
1761
1760
|
function s(D) {
|
|
1762
1761
|
for (var i = e.sqrt(D), o = 2; o <= i; o++)
|
|
@@ -1767,50 +1766,50 @@ function mr() {
|
|
|
1767
1766
|
function u(D) {
|
|
1768
1767
|
return (D - (D | 0)) * 4294967296 | 0;
|
|
1769
1768
|
}
|
|
1770
|
-
for (var p = 2,
|
|
1771
|
-
s(p) && (
|
|
1769
|
+
for (var p = 2, h = 0; h < 64; )
|
|
1770
|
+
s(p) && (h < 8 && (x[h] = u(e.pow(p, 1 / 2))), n[h] = u(e.pow(p, 1 / 3)), h++), p++;
|
|
1772
1771
|
})();
|
|
1773
|
-
var E = [], a =
|
|
1772
|
+
var E = [], a = C.SHA256 = B.extend({
|
|
1774
1773
|
_doReset: function() {
|
|
1775
|
-
this._hash = new
|
|
1774
|
+
this._hash = new y.init(x.slice(0));
|
|
1776
1775
|
},
|
|
1777
1776
|
_doProcessBlock: function(s, u) {
|
|
1778
|
-
for (var p = this._hash.words,
|
|
1777
|
+
for (var p = this._hash.words, h = p[0], D = p[1], i = p[2], o = p[3], d = p[4], b = p[5], g = p[6], _ = p[7], k = 0; k < 64; k++) {
|
|
1779
1778
|
if (k < 16)
|
|
1780
1779
|
E[k] = s[u + k] | 0;
|
|
1781
1780
|
else {
|
|
1782
1781
|
var $ = E[k - 15], F = ($ << 25 | $ >>> 7) ^ ($ << 14 | $ >>> 18) ^ $ >>> 3, w = E[k - 2], H = (w << 15 | w >>> 17) ^ (w << 13 | w >>> 19) ^ w >>> 10;
|
|
1783
1782
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1784
1783
|
}
|
|
1785
|
-
var R =
|
|
1786
|
-
|
|
1784
|
+
var R = d & b ^ ~d & g, z = h & D ^ h & i ^ D & i, O = (h << 30 | h >>> 2) ^ (h << 19 | h >>> 13) ^ (h << 10 | h >>> 22), q = (d << 26 | d >>> 6) ^ (d << 21 | d >>> 11) ^ (d << 7 | d >>> 25), U = _ + q + R + n[k] + E[k], T = O + z;
|
|
1785
|
+
_ = g, g = b, b = d, d = o + U | 0, o = i, i = D, D = h, h = U + T | 0;
|
|
1787
1786
|
}
|
|
1788
|
-
p[0] = p[0] +
|
|
1787
|
+
p[0] = p[0] + h | 0, p[1] = p[1] + D | 0, p[2] = p[2] + i | 0, p[3] = p[3] + o | 0, p[4] = p[4] + d | 0, p[5] = p[5] + b | 0, p[6] = p[6] + g | 0, p[7] = p[7] + _ | 0;
|
|
1789
1788
|
},
|
|
1790
1789
|
_doFinalize: function() {
|
|
1791
|
-
var s = this._data, u = s.words, p = this._nDataBytes * 8,
|
|
1792
|
-
return u[
|
|
1790
|
+
var s = this._data, u = s.words, p = this._nDataBytes * 8, h = s.sigBytes * 8;
|
|
1791
|
+
return u[h >>> 5] |= 128 << 24 - h % 32, u[(h + 64 >>> 9 << 4) + 14] = e.floor(p / 4294967296), u[(h + 64 >>> 9 << 4) + 15] = p, s.sigBytes = u.length * 4, this._process(), this._hash;
|
|
1793
1792
|
},
|
|
1794
1793
|
clone: function() {
|
|
1795
|
-
var s =
|
|
1794
|
+
var s = B.clone.call(this);
|
|
1796
1795
|
return s._hash = this._hash.clone(), s;
|
|
1797
1796
|
}
|
|
1798
1797
|
});
|
|
1799
|
-
|
|
1798
|
+
c.SHA256 = B._createHelper(a), c.HmacSHA256 = B._createHmacHelper(a);
|
|
1800
1799
|
})(Math), t.SHA256;
|
|
1801
1800
|
});
|
|
1802
|
-
})(
|
|
1801
|
+
})(L0)), L0.exports;
|
|
1803
1802
|
}
|
|
1804
|
-
var
|
|
1805
|
-
function
|
|
1806
|
-
return Vr || (Vr = 1, (function(r,
|
|
1807
|
-
(function(t, e,
|
|
1803
|
+
var O0 = { exports: {} }, Mt = O0.exports, Vr;
|
|
1804
|
+
function Nt() {
|
|
1805
|
+
return Vr || (Vr = 1, (function(r, l) {
|
|
1806
|
+
(function(t, e, c) {
|
|
1808
1807
|
r.exports = e(M(), mr());
|
|
1809
|
-
})(
|
|
1808
|
+
})(Mt, function(t) {
|
|
1810
1809
|
return (function() {
|
|
1811
|
-
var e = t,
|
|
1810
|
+
var e = t, c = e.lib, v = c.WordArray, y = e.algo, B = y.SHA256, C = y.SHA224 = B.extend({
|
|
1812
1811
|
_doReset: function() {
|
|
1813
|
-
this._hash = new
|
|
1812
|
+
this._hash = new v.init([
|
|
1814
1813
|
3238371032,
|
|
1815
1814
|
914150663,
|
|
1816
1815
|
812702999,
|
|
@@ -1822,25 +1821,25 @@ function Mt() {
|
|
|
1822
1821
|
]);
|
|
1823
1822
|
},
|
|
1824
1823
|
_doFinalize: function() {
|
|
1825
|
-
var x =
|
|
1824
|
+
var x = B._doFinalize.call(this);
|
|
1826
1825
|
return x.sigBytes -= 4, x;
|
|
1827
1826
|
}
|
|
1828
1827
|
});
|
|
1829
|
-
e.SHA224 =
|
|
1828
|
+
e.SHA224 = B._createHelper(C), e.HmacSHA224 = B._createHmacHelper(C);
|
|
1830
1829
|
})(), t.SHA224;
|
|
1831
1830
|
});
|
|
1832
|
-
})(
|
|
1831
|
+
})(O0)), O0.exports;
|
|
1833
1832
|
}
|
|
1834
|
-
var
|
|
1833
|
+
var q0 = { exports: {} }, Ut = q0.exports, Jr;
|
|
1835
1834
|
function ze() {
|
|
1836
|
-
return Jr || (Jr = 1, (function(r,
|
|
1837
|
-
(function(t, e,
|
|
1838
|
-
r.exports = e(M(),
|
|
1839
|
-
})(
|
|
1835
|
+
return Jr || (Jr = 1, (function(r, l) {
|
|
1836
|
+
(function(t, e, c) {
|
|
1837
|
+
r.exports = e(M(), vr());
|
|
1838
|
+
})(Ut, function(t) {
|
|
1840
1839
|
return (function() {
|
|
1841
|
-
var e = t,
|
|
1840
|
+
var e = t, c = e.lib, v = c.Hasher, y = e.x64, B = y.Word, C = y.WordArray, x = e.algo;
|
|
1842
1841
|
function n() {
|
|
1843
|
-
return
|
|
1842
|
+
return B.create.apply(B, arguments);
|
|
1844
1843
|
}
|
|
1845
1844
|
var E = [
|
|
1846
1845
|
n(1116352408, 3609767458),
|
|
@@ -1928,21 +1927,21 @@ function ze() {
|
|
|
1928
1927
|
for (var u = 0; u < 80; u++)
|
|
1929
1928
|
a[u] = n();
|
|
1930
1929
|
})();
|
|
1931
|
-
var s = x.SHA512 =
|
|
1930
|
+
var s = x.SHA512 = v.extend({
|
|
1932
1931
|
_doReset: function() {
|
|
1933
|
-
this._hash = new
|
|
1934
|
-
new
|
|
1935
|
-
new
|
|
1936
|
-
new
|
|
1937
|
-
new
|
|
1938
|
-
new
|
|
1939
|
-
new
|
|
1940
|
-
new
|
|
1941
|
-
new
|
|
1932
|
+
this._hash = new C.init([
|
|
1933
|
+
new B.init(1779033703, 4089235720),
|
|
1934
|
+
new B.init(3144134277, 2227873595),
|
|
1935
|
+
new B.init(1013904242, 4271175723),
|
|
1936
|
+
new B.init(2773480762, 1595750129),
|
|
1937
|
+
new B.init(1359893119, 2917565137),
|
|
1938
|
+
new B.init(2600822924, 725511199),
|
|
1939
|
+
new B.init(528734635, 4215389547),
|
|
1940
|
+
new B.init(1541459225, 327033209)
|
|
1942
1941
|
]);
|
|
1943
1942
|
},
|
|
1944
1943
|
_doProcessBlock: function(u, p) {
|
|
1945
|
-
for (var
|
|
1944
|
+
for (var h = this._hash.words, D = h[0], i = h[1], o = h[2], d = h[3], b = h[4], g = h[5], _ = h[6], k = h[7], $ = D.high, F = D.low, w = i.high, H = i.low, R = o.high, z = o.low, O = d.high, q = d.low, U = b.high, T = b.low, N = g.high, j = g.low, S = _.high, f = _.low, A = k.high, m = k.low, W = $, P = F, L = w, I = H, Y = R, Q = z, i0 = O, K = q, G = U, Z = T, r0 = N, u0 = j, b0 = S, B0 = f, pr = A, C0 = m, e0 = 0; e0 < 80; e0++) {
|
|
1946
1945
|
var J, n0, m0 = a[e0];
|
|
1947
1946
|
if (e0 < 16)
|
|
1948
1947
|
n0 = m0.high = u[p + e0 * 2] | 0, J = m0.low = u[p + e0 * 2 + 1] | 0;
|
|
@@ -1950,92 +1949,92 @@ function ze() {
|
|
|
1950
1949
|
var wr = a[e0 - 15], d0 = wr.high, E0 = wr.low, Me = (d0 >>> 1 | E0 << 31) ^ (d0 >>> 8 | E0 << 24) ^ d0 >>> 7, kr = (E0 >>> 1 | d0 << 31) ^ (E0 >>> 8 | d0 << 24) ^ (E0 >>> 7 | d0 << 25), Sr = a[e0 - 2], l0 = Sr.high, A0 = Sr.low, Ne = (l0 >>> 19 | A0 << 13) ^ (l0 << 3 | A0 >>> 29) ^ l0 >>> 6, Hr = (A0 >>> 19 | l0 << 13) ^ (A0 << 3 | l0 >>> 29) ^ (A0 >>> 6 | l0 << 26), Rr = a[e0 - 7], Ue = Rr.high, je = Rr.low, $r = a[e0 - 16], Ge = $r.high, Pr = $r.low;
|
|
1951
1950
|
J = kr + je, n0 = Me + Ue + (J >>> 0 < kr >>> 0 ? 1 : 0), J = J + Hr, n0 = n0 + Ne + (J >>> 0 < Hr >>> 0 ? 1 : 0), J = J + Pr, n0 = n0 + Ge + (J >>> 0 < Pr >>> 0 ? 1 : 0), m0.high = n0, m0.low = J;
|
|
1952
1951
|
}
|
|
1953
|
-
var Ke = G & r0 ^ ~G & b0, zr =
|
|
1954
|
-
|
|
1952
|
+
var Ke = G & r0 ^ ~G & b0, zr = Z & u0 ^ ~Z & B0, Xe = W & L ^ W & Y ^ L & Y, Ze = P & I ^ P & Q ^ I & Q, Ye = (W >>> 28 | P << 4) ^ (W << 30 | P >>> 2) ^ (W << 25 | P >>> 7), Wr = (P >>> 28 | W << 4) ^ (P << 30 | W >>> 2) ^ (P << 25 | W >>> 7), Qe = (G >>> 14 | Z << 18) ^ (G >>> 18 | Z << 14) ^ (G << 23 | Z >>> 9), Ve = (Z >>> 14 | G << 18) ^ (Z >>> 18 | G << 14) ^ (Z << 23 | G >>> 9), Ir = E[e0], Je = Ir.high, Lr = Ir.low, V = C0 + Ve, a0 = pr + Qe + (V >>> 0 < C0 >>> 0 ? 1 : 0), V = V + zr, a0 = a0 + Ke + (V >>> 0 < zr >>> 0 ? 1 : 0), V = V + Lr, a0 = a0 + Je + (V >>> 0 < Lr >>> 0 ? 1 : 0), V = V + J, a0 = a0 + n0 + (V >>> 0 < J >>> 0 ? 1 : 0), Or = Wr + Ze, rt = Ye + Xe + (Or >>> 0 < Wr >>> 0 ? 1 : 0);
|
|
1953
|
+
pr = b0, C0 = B0, b0 = r0, B0 = u0, r0 = G, u0 = Z, Z = K + V | 0, G = i0 + a0 + (Z >>> 0 < K >>> 0 ? 1 : 0) | 0, i0 = Y, K = Q, Y = L, Q = I, L = W, I = P, P = V + Or | 0, W = a0 + rt + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1955
1954
|
}
|
|
1956
|
-
F = D.low = F + P, D.high = $ + W + (F >>> 0 < P >>> 0 ? 1 : 0), H = i.low = H + I, i.high = w + L + (H >>> 0 < I >>> 0 ? 1 : 0), z = o.low = z + Q, o.high = R +
|
|
1955
|
+
F = D.low = F + P, D.high = $ + W + (F >>> 0 < P >>> 0 ? 1 : 0), H = i.low = H + I, i.high = w + L + (H >>> 0 < I >>> 0 ? 1 : 0), z = o.low = z + Q, o.high = R + Y + (z >>> 0 < Q >>> 0 ? 1 : 0), q = d.low = q + K, d.high = O + i0 + (q >>> 0 < K >>> 0 ? 1 : 0), T = b.low = T + Z, b.high = U + G + (T >>> 0 < Z >>> 0 ? 1 : 0), j = g.low = j + u0, g.high = N + r0 + (j >>> 0 < u0 >>> 0 ? 1 : 0), f = _.low = f + B0, _.high = S + b0 + (f >>> 0 < B0 >>> 0 ? 1 : 0), m = k.low = m + C0, k.high = A + pr + (m >>> 0 < C0 >>> 0 ? 1 : 0);
|
|
1957
1956
|
},
|
|
1958
1957
|
_doFinalize: function() {
|
|
1959
|
-
var u = this._data, p = u.words,
|
|
1960
|
-
p[D >>> 5] |= 128 << 24 - D % 32, p[(D + 128 >>> 10 << 5) + 30] = Math.floor(
|
|
1958
|
+
var u = this._data, p = u.words, h = this._nDataBytes * 8, D = u.sigBytes * 8;
|
|
1959
|
+
p[D >>> 5] |= 128 << 24 - D % 32, p[(D + 128 >>> 10 << 5) + 30] = Math.floor(h / 4294967296), p[(D + 128 >>> 10 << 5) + 31] = h, u.sigBytes = p.length * 4, this._process();
|
|
1961
1960
|
var i = this._hash.toX32();
|
|
1962
1961
|
return i;
|
|
1963
1962
|
},
|
|
1964
1963
|
clone: function() {
|
|
1965
|
-
var u =
|
|
1964
|
+
var u = v.clone.call(this);
|
|
1966
1965
|
return u._hash = this._hash.clone(), u;
|
|
1967
1966
|
},
|
|
1968
1967
|
blockSize: 1024 / 32
|
|
1969
1968
|
});
|
|
1970
|
-
e.SHA512 =
|
|
1969
|
+
e.SHA512 = v._createHelper(s), e.HmacSHA512 = v._createHmacHelper(s);
|
|
1971
1970
|
})(), t.SHA512;
|
|
1972
1971
|
});
|
|
1973
|
-
})(
|
|
1972
|
+
})(q0)), q0.exports;
|
|
1974
1973
|
}
|
|
1975
|
-
var
|
|
1976
|
-
function
|
|
1977
|
-
return re || (re = 1, (function(r,
|
|
1978
|
-
(function(t, e,
|
|
1979
|
-
r.exports = e(M(),
|
|
1980
|
-
})(
|
|
1974
|
+
var T0 = { exports: {} }, jt = T0.exports, re;
|
|
1975
|
+
function Gt() {
|
|
1976
|
+
return re || (re = 1, (function(r, l) {
|
|
1977
|
+
(function(t, e, c) {
|
|
1978
|
+
r.exports = e(M(), vr(), ze());
|
|
1979
|
+
})(jt, function(t) {
|
|
1981
1980
|
return (function() {
|
|
1982
|
-
var e = t,
|
|
1981
|
+
var e = t, c = e.x64, v = c.Word, y = c.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1983
1982
|
_doReset: function() {
|
|
1984
|
-
this._hash = new
|
|
1985
|
-
new
|
|
1986
|
-
new
|
|
1987
|
-
new
|
|
1988
|
-
new
|
|
1989
|
-
new
|
|
1990
|
-
new
|
|
1991
|
-
new
|
|
1992
|
-
new
|
|
1983
|
+
this._hash = new y.init([
|
|
1984
|
+
new v.init(3418070365, 3238371032),
|
|
1985
|
+
new v.init(1654270250, 914150663),
|
|
1986
|
+
new v.init(2438529370, 812702999),
|
|
1987
|
+
new v.init(355462360, 4144912697),
|
|
1988
|
+
new v.init(1731405415, 4290775857),
|
|
1989
|
+
new v.init(2394180231, 1750603025),
|
|
1990
|
+
new v.init(3675008525, 1694076839),
|
|
1991
|
+
new v.init(1203062813, 3204075428)
|
|
1993
1992
|
]);
|
|
1994
1993
|
},
|
|
1995
1994
|
_doFinalize: function() {
|
|
1996
|
-
var n =
|
|
1995
|
+
var n = C._doFinalize.call(this);
|
|
1997
1996
|
return n.sigBytes -= 16, n;
|
|
1998
1997
|
}
|
|
1999
1998
|
});
|
|
2000
|
-
e.SHA384 =
|
|
1999
|
+
e.SHA384 = C._createHelper(x), e.HmacSHA384 = C._createHmacHelper(x);
|
|
2001
2000
|
})(), t.SHA384;
|
|
2002
2001
|
});
|
|
2003
|
-
})(
|
|
2002
|
+
})(T0)), T0.exports;
|
|
2004
2003
|
}
|
|
2005
|
-
var
|
|
2006
|
-
function
|
|
2007
|
-
return ee || (ee = 1, (function(r,
|
|
2008
|
-
(function(t, e,
|
|
2009
|
-
r.exports = e(M(),
|
|
2010
|
-
})(
|
|
2004
|
+
var M0 = { exports: {} }, Kt = M0.exports, ee;
|
|
2005
|
+
function Xt() {
|
|
2006
|
+
return ee || (ee = 1, (function(r, l) {
|
|
2007
|
+
(function(t, e, c) {
|
|
2008
|
+
r.exports = e(M(), vr());
|
|
2009
|
+
})(Kt, function(t) {
|
|
2011
2010
|
return (function(e) {
|
|
2012
|
-
var
|
|
2011
|
+
var c = t, v = c.lib, y = v.WordArray, B = v.Hasher, C = c.x64, x = C.Word, n = c.algo, E = [], a = [], s = [];
|
|
2013
2012
|
(function() {
|
|
2014
|
-
for (var
|
|
2015
|
-
E[
|
|
2016
|
-
var o = D % 5,
|
|
2017
|
-
|
|
2013
|
+
for (var h = 1, D = 0, i = 0; i < 24; i++) {
|
|
2014
|
+
E[h + 5 * D] = (i + 1) * (i + 2) / 2 % 64;
|
|
2015
|
+
var o = D % 5, d = (2 * h + 3 * D) % 5;
|
|
2016
|
+
h = o, D = d;
|
|
2018
2017
|
}
|
|
2019
|
-
for (var
|
|
2018
|
+
for (var h = 0; h < 5; h++)
|
|
2020
2019
|
for (var D = 0; D < 5; D++)
|
|
2021
|
-
a[
|
|
2020
|
+
a[h + 5 * D] = D + (2 * h + 3 * D) % 5 * 5;
|
|
2022
2021
|
for (var b = 1, g = 0; g < 24; g++) {
|
|
2023
|
-
for (var
|
|
2022
|
+
for (var _ = 0, k = 0, $ = 0; $ < 7; $++) {
|
|
2024
2023
|
if (b & 1) {
|
|
2025
2024
|
var F = (1 << $) - 1;
|
|
2026
|
-
F < 32 ? k ^= 1 << F :
|
|
2025
|
+
F < 32 ? k ^= 1 << F : _ ^= 1 << F - 32;
|
|
2027
2026
|
}
|
|
2028
2027
|
b & 128 ? b = b << 1 ^ 113 : b <<= 1;
|
|
2029
2028
|
}
|
|
2030
|
-
s[g] = x.create(
|
|
2029
|
+
s[g] = x.create(_, k);
|
|
2031
2030
|
}
|
|
2032
2031
|
})();
|
|
2033
2032
|
var u = [];
|
|
2034
2033
|
(function() {
|
|
2035
|
-
for (var
|
|
2036
|
-
u[
|
|
2034
|
+
for (var h = 0; h < 25; h++)
|
|
2035
|
+
u[h] = x.create();
|
|
2037
2036
|
})();
|
|
2038
|
-
var p = n.SHA3 =
|
|
2037
|
+
var p = n.SHA3 = B.extend({
|
|
2039
2038
|
/**
|
|
2040
2039
|
* Configuration options.
|
|
2041
2040
|
*
|
|
@@ -2044,82 +2043,82 @@ function Kt() {
|
|
|
2044
2043
|
* Only values permitted are: 224, 256, 384, 512.
|
|
2045
2044
|
* Default: 512
|
|
2046
2045
|
*/
|
|
2047
|
-
cfg:
|
|
2046
|
+
cfg: B.cfg.extend({
|
|
2048
2047
|
outputLength: 512
|
|
2049
2048
|
}),
|
|
2050
2049
|
_doReset: function() {
|
|
2051
|
-
for (var
|
|
2052
|
-
|
|
2050
|
+
for (var h = this._state = [], D = 0; D < 25; D++)
|
|
2051
|
+
h[D] = new x.init();
|
|
2053
2052
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
2054
2053
|
},
|
|
2055
|
-
_doProcessBlock: function(
|
|
2056
|
-
for (var i = this._state, o = this.blockSize / 2,
|
|
2057
|
-
var b =
|
|
2054
|
+
_doProcessBlock: function(h, D) {
|
|
2055
|
+
for (var i = this._state, o = this.blockSize / 2, d = 0; d < o; d++) {
|
|
2056
|
+
var b = h[D + 2 * d], g = h[D + 2 * d + 1];
|
|
2058
2057
|
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360, g = (g << 8 | g >>> 24) & 16711935 | (g << 24 | g >>> 8) & 4278255360;
|
|
2059
|
-
var
|
|
2060
|
-
|
|
2058
|
+
var _ = i[d];
|
|
2059
|
+
_.high ^= g, _.low ^= b;
|
|
2061
2060
|
}
|
|
2062
2061
|
for (var k = 0; k < 24; k++) {
|
|
2063
2062
|
for (var $ = 0; $ < 5; $++) {
|
|
2064
2063
|
for (var F = 0, w = 0, H = 0; H < 5; H++) {
|
|
2065
|
-
var
|
|
2066
|
-
F ^=
|
|
2064
|
+
var _ = i[$ + 5 * H];
|
|
2065
|
+
F ^= _.high, w ^= _.low;
|
|
2067
2066
|
}
|
|
2068
2067
|
var R = u[$];
|
|
2069
2068
|
R.high = F, R.low = w;
|
|
2070
2069
|
}
|
|
2071
2070
|
for (var $ = 0; $ < 5; $++)
|
|
2072
2071
|
for (var z = u[($ + 4) % 5], O = u[($ + 1) % 5], q = O.high, U = O.low, F = z.high ^ (q << 1 | U >>> 31), w = z.low ^ (U << 1 | q >>> 31), H = 0; H < 5; H++) {
|
|
2073
|
-
var
|
|
2074
|
-
|
|
2072
|
+
var _ = i[$ + 5 * H];
|
|
2073
|
+
_.high ^= F, _.low ^= w;
|
|
2075
2074
|
}
|
|
2076
2075
|
for (var T = 1; T < 25; T++) {
|
|
2077
|
-
var F, w,
|
|
2076
|
+
var F, w, _ = i[T], N = _.high, j = _.low, S = E[T];
|
|
2078
2077
|
S < 32 ? (F = N << S | j >>> 32 - S, w = j << S | N >>> 32 - S) : (F = j << S - 32 | N >>> 64 - S, w = N << S - 32 | j >>> 64 - S);
|
|
2079
|
-
var
|
|
2080
|
-
|
|
2078
|
+
var f = u[a[T]];
|
|
2079
|
+
f.high = F, f.low = w;
|
|
2081
2080
|
}
|
|
2082
2081
|
var A = u[0], m = i[0];
|
|
2083
2082
|
A.high = m.high, A.low = m.low;
|
|
2084
2083
|
for (var $ = 0; $ < 5; $++)
|
|
2085
2084
|
for (var H = 0; H < 5; H++) {
|
|
2086
|
-
var T = $ + 5 * H,
|
|
2087
|
-
|
|
2085
|
+
var T = $ + 5 * H, _ = i[T], W = u[T], P = u[($ + 1) % 5 + 5 * H], L = u[($ + 2) % 5 + 5 * H];
|
|
2086
|
+
_.high = W.high ^ ~P.high & L.high, _.low = W.low ^ ~P.low & L.low;
|
|
2088
2087
|
}
|
|
2089
|
-
var
|
|
2090
|
-
|
|
2088
|
+
var _ = i[0], I = s[k];
|
|
2089
|
+
_.high ^= I.high, _.low ^= I.low;
|
|
2091
2090
|
}
|
|
2092
2091
|
},
|
|
2093
2092
|
_doFinalize: function() {
|
|
2094
|
-
var
|
|
2093
|
+
var h = this._data, D = h.words;
|
|
2095
2094
|
this._nDataBytes * 8;
|
|
2096
|
-
var i =
|
|
2097
|
-
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128,
|
|
2098
|
-
for (var
|
|
2099
|
-
var $ =
|
|
2100
|
-
F = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360, w = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360,
|
|
2095
|
+
var i = h.sigBytes * 8, o = this.blockSize * 32;
|
|
2096
|
+
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, h.sigBytes = D.length * 4, this._process();
|
|
2097
|
+
for (var d = this._state, b = this.cfg.outputLength / 8, g = b / 8, _ = [], k = 0; k < g; k++) {
|
|
2098
|
+
var $ = d[k], F = $.high, w = $.low;
|
|
2099
|
+
F = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360, w = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360, _.push(w), _.push(F);
|
|
2101
2100
|
}
|
|
2102
|
-
return new
|
|
2101
|
+
return new y.init(_, b);
|
|
2103
2102
|
},
|
|
2104
2103
|
clone: function() {
|
|
2105
|
-
for (var
|
|
2104
|
+
for (var h = B.clone.call(this), D = h._state = this._state.slice(0), i = 0; i < 25; i++)
|
|
2106
2105
|
D[i] = D[i].clone();
|
|
2107
|
-
return
|
|
2106
|
+
return h;
|
|
2108
2107
|
}
|
|
2109
2108
|
});
|
|
2110
|
-
|
|
2109
|
+
c.SHA3 = B._createHelper(p), c.HmacSHA3 = B._createHmacHelper(p);
|
|
2111
2110
|
})(Math), t.SHA3;
|
|
2112
2111
|
});
|
|
2113
|
-
})(
|
|
2112
|
+
})(M0)), M0.exports;
|
|
2114
2113
|
}
|
|
2115
|
-
var
|
|
2114
|
+
var N0 = { exports: {} }, Zt = N0.exports, te;
|
|
2116
2115
|
function Yt() {
|
|
2117
|
-
return te || (te = 1, (function(r,
|
|
2116
|
+
return te || (te = 1, (function(r, l) {
|
|
2118
2117
|
(function(t, e) {
|
|
2119
2118
|
r.exports = e(M());
|
|
2120
|
-
})(
|
|
2119
|
+
})(Zt, function(t) {
|
|
2121
2120
|
return (function(e) {
|
|
2122
|
-
var
|
|
2121
|
+
var c = t, v = c.lib, y = v.WordArray, B = v.Hasher, C = c.algo, x = y.create([
|
|
2123
2122
|
0,
|
|
2124
2123
|
1,
|
|
2125
2124
|
2,
|
|
@@ -2200,7 +2199,7 @@ function Yt() {
|
|
|
2200
2199
|
6,
|
|
2201
2200
|
15,
|
|
2202
2201
|
13
|
|
2203
|
-
]), n =
|
|
2202
|
+
]), n = y.create([
|
|
2204
2203
|
5,
|
|
2205
2204
|
14,
|
|
2206
2205
|
7,
|
|
@@ -2281,7 +2280,7 @@ function Yt() {
|
|
|
2281
2280
|
3,
|
|
2282
2281
|
9,
|
|
2283
2282
|
11
|
|
2284
|
-
]), E =
|
|
2283
|
+
]), E = y.create([
|
|
2285
2284
|
11,
|
|
2286
2285
|
14,
|
|
2287
2286
|
15,
|
|
@@ -2362,7 +2361,7 @@ function Yt() {
|
|
|
2362
2361
|
8,
|
|
2363
2362
|
5,
|
|
2364
2363
|
6
|
|
2365
|
-
]), a =
|
|
2364
|
+
]), a = y.create([
|
|
2366
2365
|
8,
|
|
2367
2366
|
9,
|
|
2368
2367
|
9,
|
|
@@ -2443,24 +2442,24 @@ function Yt() {
|
|
|
2443
2442
|
13,
|
|
2444
2443
|
11,
|
|
2445
2444
|
11
|
|
2446
|
-
]), s =
|
|
2445
|
+
]), s = y.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), u = y.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), p = C.RIPEMD160 = B.extend({
|
|
2447
2446
|
_doReset: function() {
|
|
2448
|
-
this._hash =
|
|
2447
|
+
this._hash = y.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2449
2448
|
},
|
|
2450
|
-
_doProcessBlock: function(g,
|
|
2449
|
+
_doProcessBlock: function(g, _) {
|
|
2451
2450
|
for (var k = 0; k < 16; k++) {
|
|
2452
|
-
var $ =
|
|
2451
|
+
var $ = _ + k, F = g[$];
|
|
2453
2452
|
g[$] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2454
2453
|
}
|
|
2455
|
-
var w = this._hash.words, H = s.words, R = u.words, z = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S,
|
|
2456
|
-
A = T = w[0], m = N = w[1], W = j = w[2], P = S = w[3], L =
|
|
2454
|
+
var w = this._hash.words, H = s.words, R = u.words, z = x.words, O = n.words, q = E.words, U = a.words, T, N, j, S, f, A, m, W, P, L;
|
|
2455
|
+
A = T = w[0], m = N = w[1], W = j = w[2], P = S = w[3], L = f = w[4];
|
|
2457
2456
|
for (var I, k = 0; k < 80; k += 1)
|
|
2458
|
-
I = T + g[
|
|
2459
|
-
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] +
|
|
2457
|
+
I = T + g[_ + z[k]] | 0, k < 16 ? I += h(N, j, S) + H[0] : k < 32 ? I += D(N, j, S) + H[1] : k < 48 ? I += i(N, j, S) + H[2] : k < 64 ? I += o(N, j, S) + H[3] : I += d(N, j, S) + H[4], I = I | 0, I = b(I, q[k]), I = I + f | 0, T = f, f = S, S = b(j, 10), j = N, N = I, I = A + g[_ + O[k]] | 0, k < 16 ? I += d(m, W, P) + R[0] : k < 32 ? I += o(m, W, P) + R[1] : k < 48 ? I += i(m, W, P) + R[2] : k < 64 ? I += D(m, W, P) + R[3] : I += h(m, W, P) + R[4], I = I | 0, I = b(I, U[k]), I = I + L | 0, A = L, L = P, P = b(W, 10), W = m, m = I;
|
|
2458
|
+
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] + f + A | 0, w[3] = w[4] + T + m | 0, w[4] = w[0] + N + W | 0, w[0] = I;
|
|
2460
2459
|
},
|
|
2461
2460
|
_doFinalize: function() {
|
|
2462
|
-
var g = this._data,
|
|
2463
|
-
|
|
2461
|
+
var g = this._data, _ = g.words, k = this._nDataBytes * 8, $ = g.sigBytes * 8;
|
|
2462
|
+
_[$ >>> 5] |= 128 << 24 - $ % 32, _[($ + 64 >>> 9 << 4) + 14] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360, g.sigBytes = (_.length + 1) * 4, this._process();
|
|
2464
2463
|
for (var F = this._hash, w = F.words, H = 0; H < 5; H++) {
|
|
2465
2464
|
var R = w[H];
|
|
2466
2465
|
w[H] = (R << 8 | R >>> 24) & 16711935 | (R << 24 | R >>> 8) & 4278255360;
|
|
@@ -2468,42 +2467,42 @@ function Yt() {
|
|
|
2468
2467
|
return F;
|
|
2469
2468
|
},
|
|
2470
2469
|
clone: function() {
|
|
2471
|
-
var g =
|
|
2470
|
+
var g = B.clone.call(this);
|
|
2472
2471
|
return g._hash = this._hash.clone(), g;
|
|
2473
2472
|
}
|
|
2474
2473
|
});
|
|
2475
|
-
function
|
|
2476
|
-
return g ^
|
|
2474
|
+
function h(g, _, k) {
|
|
2475
|
+
return g ^ _ ^ k;
|
|
2477
2476
|
}
|
|
2478
|
-
function D(g,
|
|
2479
|
-
return g &
|
|
2477
|
+
function D(g, _, k) {
|
|
2478
|
+
return g & _ | ~g & k;
|
|
2480
2479
|
}
|
|
2481
|
-
function i(g,
|
|
2482
|
-
return (g | ~
|
|
2480
|
+
function i(g, _, k) {
|
|
2481
|
+
return (g | ~_) ^ k;
|
|
2483
2482
|
}
|
|
2484
|
-
function o(g,
|
|
2485
|
-
return g & k |
|
|
2483
|
+
function o(g, _, k) {
|
|
2484
|
+
return g & k | _ & ~k;
|
|
2486
2485
|
}
|
|
2487
|
-
function
|
|
2488
|
-
return g ^ (
|
|
2486
|
+
function d(g, _, k) {
|
|
2487
|
+
return g ^ (_ | ~k);
|
|
2489
2488
|
}
|
|
2490
|
-
function b(g,
|
|
2491
|
-
return g <<
|
|
2489
|
+
function b(g, _) {
|
|
2490
|
+
return g << _ | g >>> 32 - _;
|
|
2492
2491
|
}
|
|
2493
|
-
|
|
2492
|
+
c.RIPEMD160 = B._createHelper(p), c.HmacRIPEMD160 = B._createHmacHelper(p);
|
|
2494
2493
|
})(), t.RIPEMD160;
|
|
2495
2494
|
});
|
|
2496
|
-
})(
|
|
2495
|
+
})(N0)), N0.exports;
|
|
2497
2496
|
}
|
|
2498
|
-
var
|
|
2497
|
+
var U0 = { exports: {} }, Qt = U0.exports, xe;
|
|
2499
2498
|
function _r() {
|
|
2500
|
-
return xe || (xe = 1, (function(r,
|
|
2499
|
+
return xe || (xe = 1, (function(r, l) {
|
|
2501
2500
|
(function(t, e) {
|
|
2502
2501
|
r.exports = e(M());
|
|
2503
|
-
})(
|
|
2502
|
+
})(Qt, function(t) {
|
|
2504
2503
|
(function() {
|
|
2505
|
-
var e = t,
|
|
2506
|
-
|
|
2504
|
+
var e = t, c = e.lib, v = c.Base, y = e.enc, B = y.Utf8, C = e.algo;
|
|
2505
|
+
C.HMAC = v.extend({
|
|
2507
2506
|
/**
|
|
2508
2507
|
* Initializes a newly created HMAC.
|
|
2509
2508
|
*
|
|
@@ -2515,11 +2514,11 @@ function _r() {
|
|
|
2515
2514
|
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
|
|
2516
2515
|
*/
|
|
2517
2516
|
init: function(x, n) {
|
|
2518
|
-
x = this._hasher = new x.init(), typeof n == "string" && (n =
|
|
2517
|
+
x = this._hasher = new x.init(), typeof n == "string" && (n = B.parse(n));
|
|
2519
2518
|
var E = x.blockSize, a = E * 4;
|
|
2520
2519
|
n.sigBytes > a && (n = x.finalize(n)), n.clamp();
|
|
2521
|
-
for (var s = this._oKey = n.clone(), u = this._iKey = n.clone(), p = s.words,
|
|
2522
|
-
p[D] ^= 1549556828,
|
|
2520
|
+
for (var s = this._oKey = n.clone(), u = this._iKey = n.clone(), p = s.words, h = u.words, D = 0; D < E; D++)
|
|
2521
|
+
p[D] ^= 1549556828, h[D] ^= 909522486;
|
|
2523
2522
|
s.sigBytes = u.sigBytes = a, this.reset();
|
|
2524
2523
|
},
|
|
2525
2524
|
/**
|
|
@@ -2571,16 +2570,16 @@ function _r() {
|
|
|
2571
2570
|
});
|
|
2572
2571
|
})();
|
|
2573
2572
|
});
|
|
2574
|
-
})(
|
|
2573
|
+
})(U0)), U0.exports;
|
|
2575
2574
|
}
|
|
2576
|
-
var
|
|
2577
|
-
function
|
|
2578
|
-
return ne || (ne = 1, (function(r,
|
|
2579
|
-
(function(t, e,
|
|
2575
|
+
var j0 = { exports: {} }, Vt = j0.exports, ne;
|
|
2576
|
+
function Jt() {
|
|
2577
|
+
return ne || (ne = 1, (function(r, l) {
|
|
2578
|
+
(function(t, e, c) {
|
|
2580
2579
|
r.exports = e(M(), mr(), _r());
|
|
2581
|
-
})(
|
|
2580
|
+
})(Vt, function(t) {
|
|
2582
2581
|
return (function() {
|
|
2583
|
-
var e = t,
|
|
2582
|
+
var e = t, c = e.lib, v = c.Base, y = c.WordArray, B = e.algo, C = B.SHA256, x = B.HMAC, n = B.PBKDF2 = v.extend({
|
|
2584
2583
|
/**
|
|
2585
2584
|
* Configuration options.
|
|
2586
2585
|
*
|
|
@@ -2588,9 +2587,9 @@ function Vt() {
|
|
|
2588
2587
|
* @property {Hasher} hasher The hasher to use. Default: SHA256
|
|
2589
2588
|
* @property {number} iterations The number of iterations to perform. Default: 250000
|
|
2590
2589
|
*/
|
|
2591
|
-
cfg:
|
|
2590
|
+
cfg: v.extend({
|
|
2592
2591
|
keySize: 128 / 32,
|
|
2593
|
-
hasher:
|
|
2592
|
+
hasher: C,
|
|
2594
2593
|
iterations: 25e4
|
|
2595
2594
|
}),
|
|
2596
2595
|
/**
|
|
@@ -2620,12 +2619,12 @@ function Vt() {
|
|
|
2620
2619
|
* var key = kdf.compute(password, salt);
|
|
2621
2620
|
*/
|
|
2622
2621
|
compute: function(E, a) {
|
|
2623
|
-
for (var s = this.cfg, u = x.create(s.hasher, E), p =
|
|
2624
|
-
var b = u.update(a).finalize(
|
|
2622
|
+
for (var s = this.cfg, u = x.create(s.hasher, E), p = y.create(), h = y.create([1]), D = p.words, i = h.words, o = s.keySize, d = s.iterations; D.length < o; ) {
|
|
2623
|
+
var b = u.update(a).finalize(h);
|
|
2625
2624
|
u.reset();
|
|
2626
|
-
for (var g = b.words,
|
|
2625
|
+
for (var g = b.words, _ = g.length, k = b, $ = 1; $ < d; $++) {
|
|
2627
2626
|
k = u.finalize(k), u.reset();
|
|
2628
|
-
for (var F = k.words, w = 0; w <
|
|
2627
|
+
for (var F = k.words, w = 0; w < _; w++)
|
|
2629
2628
|
g[w] ^= F[w];
|
|
2630
2629
|
}
|
|
2631
2630
|
p.concat(b), i[0]++;
|
|
@@ -2638,16 +2637,16 @@ function Vt() {
|
|
|
2638
2637
|
};
|
|
2639
2638
|
})(), t.PBKDF2;
|
|
2640
2639
|
});
|
|
2641
|
-
})(
|
|
2640
|
+
})(j0)), j0.exports;
|
|
2642
2641
|
}
|
|
2643
|
-
var
|
|
2642
|
+
var G0 = { exports: {} }, rx = G0.exports, ae;
|
|
2644
2643
|
function o0() {
|
|
2645
|
-
return ae || (ae = 1, (function(r,
|
|
2646
|
-
(function(t, e,
|
|
2644
|
+
return ae || (ae = 1, (function(r, l) {
|
|
2645
|
+
(function(t, e, c) {
|
|
2647
2646
|
r.exports = e(M(), Pe(), _r());
|
|
2648
|
-
})(
|
|
2647
|
+
})(rx, function(t) {
|
|
2649
2648
|
return (function() {
|
|
2650
|
-
var e = t,
|
|
2649
|
+
var e = t, c = e.lib, v = c.Base, y = c.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = v.extend({
|
|
2651
2650
|
/**
|
|
2652
2651
|
* Configuration options.
|
|
2653
2652
|
*
|
|
@@ -2655,9 +2654,9 @@ function o0() {
|
|
|
2655
2654
|
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
|
|
2656
2655
|
* @property {number} iterations The number of iterations to perform. Default: 1
|
|
2657
2656
|
*/
|
|
2658
|
-
cfg:
|
|
2657
|
+
cfg: v.extend({
|
|
2659
2658
|
keySize: 128 / 32,
|
|
2660
|
-
hasher:
|
|
2659
|
+
hasher: C,
|
|
2661
2660
|
iterations: 1
|
|
2662
2661
|
}),
|
|
2663
2662
|
/**
|
|
@@ -2687,7 +2686,7 @@ function o0() {
|
|
|
2687
2686
|
* var key = kdf.compute(password, salt);
|
|
2688
2687
|
*/
|
|
2689
2688
|
compute: function(n, E) {
|
|
2690
|
-
for (var a, s = this.cfg, u = s.hasher.create(), p =
|
|
2689
|
+
for (var a, s = this.cfg, u = s.hasher.create(), p = y.create(), h = p.words, D = s.keySize, i = s.iterations; h.length < D; ) {
|
|
2691
2690
|
a && u.update(a), a = u.update(n).finalize(E), u.reset();
|
|
2692
2691
|
for (var o = 1; o < i; o++)
|
|
2693
2692
|
a = u.finalize(a), u.reset();
|
|
@@ -2701,24 +2700,24 @@ function o0() {
|
|
|
2701
2700
|
};
|
|
2702
2701
|
})(), t.EvpKDF;
|
|
2703
2702
|
});
|
|
2704
|
-
})(
|
|
2703
|
+
})(G0)), G0.exports;
|
|
2705
2704
|
}
|
|
2706
|
-
var
|
|
2705
|
+
var K0 = { exports: {} }, ex = K0.exports, oe;
|
|
2707
2706
|
function X() {
|
|
2708
|
-
return oe || (oe = 1, (function(r,
|
|
2709
|
-
(function(t, e,
|
|
2707
|
+
return oe || (oe = 1, (function(r, l) {
|
|
2708
|
+
(function(t, e, c) {
|
|
2710
2709
|
r.exports = e(M(), o0());
|
|
2711
|
-
})(
|
|
2710
|
+
})(ex, function(t) {
|
|
2712
2711
|
t.lib.Cipher || (function(e) {
|
|
2713
|
-
var
|
|
2712
|
+
var c = t, v = c.lib, y = v.Base, B = v.WordArray, C = v.BufferedBlockAlgorithm, x = c.enc;
|
|
2714
2713
|
x.Utf8;
|
|
2715
|
-
var n = x.Base64, E =
|
|
2714
|
+
var n = x.Base64, E = c.algo, a = E.EvpKDF, s = v.Cipher = C.extend({
|
|
2716
2715
|
/**
|
|
2717
2716
|
* Configuration options.
|
|
2718
2717
|
*
|
|
2719
2718
|
* @property {WordArray} iv The IV to use for this operation.
|
|
2720
2719
|
*/
|
|
2721
|
-
cfg:
|
|
2720
|
+
cfg: y.extend(),
|
|
2722
2721
|
/**
|
|
2723
2722
|
* Creates this cipher in encryption mode.
|
|
2724
2723
|
*
|
|
@@ -2775,7 +2774,7 @@ function X() {
|
|
|
2775
2774
|
* cipher.reset();
|
|
2776
2775
|
*/
|
|
2777
2776
|
reset: function() {
|
|
2778
|
-
|
|
2777
|
+
C.reset.call(this), this._doReset();
|
|
2779
2778
|
},
|
|
2780
2779
|
/**
|
|
2781
2780
|
* Adds data to be encrypted or decrypted.
|
|
@@ -2844,14 +2843,14 @@ function X() {
|
|
|
2844
2843
|
};
|
|
2845
2844
|
})()
|
|
2846
2845
|
});
|
|
2847
|
-
|
|
2846
|
+
v.StreamCipher = s.extend({
|
|
2848
2847
|
_doFinalize: function() {
|
|
2849
2848
|
var F = this._process(!0);
|
|
2850
2849
|
return F;
|
|
2851
2850
|
},
|
|
2852
2851
|
blockSize: 1
|
|
2853
2852
|
});
|
|
2854
|
-
var u =
|
|
2853
|
+
var u = c.mode = {}, p = v.BlockCipherMode = y.extend({
|
|
2855
2854
|
/**
|
|
2856
2855
|
* Creates this mode for encryption.
|
|
2857
2856
|
*
|
|
@@ -2895,7 +2894,7 @@ function X() {
|
|
|
2895
2894
|
init: function(F, w) {
|
|
2896
2895
|
this._cipher = F, this._iv = w;
|
|
2897
2896
|
}
|
|
2898
|
-
}),
|
|
2897
|
+
}), h = u.CBC = (function() {
|
|
2899
2898
|
var F = p.extend();
|
|
2900
2899
|
F.Encryptor = F.extend({
|
|
2901
2900
|
/**
|
|
@@ -2935,7 +2934,7 @@ function X() {
|
|
|
2935
2934
|
H[R + U] ^= O[U];
|
|
2936
2935
|
}
|
|
2937
2936
|
return F;
|
|
2938
|
-
})(), D =
|
|
2937
|
+
})(), D = c.pad = {}, i = D.Pkcs7 = {
|
|
2939
2938
|
/**
|
|
2940
2939
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
2941
2940
|
*
|
|
@@ -2951,7 +2950,7 @@ function X() {
|
|
|
2951
2950
|
pad: function(F, w) {
|
|
2952
2951
|
for (var H = w * 4, R = H - F.sigBytes % H, z = R << 24 | R << 16 | R << 8 | R, O = [], q = 0; q < R; q += 4)
|
|
2953
2952
|
O.push(z);
|
|
2954
|
-
var U =
|
|
2953
|
+
var U = B.create(O, R);
|
|
2955
2954
|
F.concat(U);
|
|
2956
2955
|
},
|
|
2957
2956
|
/**
|
|
@@ -2970,7 +2969,7 @@ function X() {
|
|
|
2970
2969
|
F.sigBytes -= w;
|
|
2971
2970
|
}
|
|
2972
2971
|
};
|
|
2973
|
-
|
|
2972
|
+
v.BlockCipher = s.extend({
|
|
2974
2973
|
/**
|
|
2975
2974
|
* Configuration options.
|
|
2976
2975
|
*
|
|
@@ -2978,7 +2977,7 @@ function X() {
|
|
|
2978
2977
|
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
|
|
2979
2978
|
*/
|
|
2980
2979
|
cfg: s.cfg.extend({
|
|
2981
|
-
mode:
|
|
2980
|
+
mode: h,
|
|
2982
2981
|
padding: i
|
|
2983
2982
|
}),
|
|
2984
2983
|
reset: function() {
|
|
@@ -2996,7 +2995,7 @@ function X() {
|
|
|
2996
2995
|
},
|
|
2997
2996
|
blockSize: 128 / 32
|
|
2998
2997
|
});
|
|
2999
|
-
var o =
|
|
2998
|
+
var o = v.CipherParams = y.extend({
|
|
3000
2999
|
/**
|
|
3001
3000
|
* Initializes a newly created cipher params object.
|
|
3002
3001
|
*
|
|
@@ -3037,7 +3036,7 @@ function X() {
|
|
|
3037
3036
|
toString: function(F) {
|
|
3038
3037
|
return (F || this.formatter).stringify(this);
|
|
3039
3038
|
}
|
|
3040
|
-
}),
|
|
3039
|
+
}), d = c.format = {}, b = d.OpenSSL = {
|
|
3041
3040
|
/**
|
|
3042
3041
|
* Converts a cipher params object to an OpenSSL-compatible string.
|
|
3043
3042
|
*
|
|
@@ -3053,7 +3052,7 @@ function X() {
|
|
|
3053
3052
|
*/
|
|
3054
3053
|
stringify: function(F) {
|
|
3055
3054
|
var w, H = F.ciphertext, R = F.salt;
|
|
3056
|
-
return R ? w =
|
|
3055
|
+
return R ? w = B.create([1398893684, 1701076831]).concat(R).concat(H) : w = H, w.toString(n);
|
|
3057
3056
|
},
|
|
3058
3057
|
/**
|
|
3059
3058
|
* Converts an OpenSSL-compatible string to a cipher params object.
|
|
@@ -3070,15 +3069,15 @@ function X() {
|
|
|
3070
3069
|
*/
|
|
3071
3070
|
parse: function(F) {
|
|
3072
3071
|
var w, H = n.parse(F), R = H.words;
|
|
3073
|
-
return R[0] == 1398893684 && R[1] == 1701076831 && (w =
|
|
3072
|
+
return R[0] == 1398893684 && R[1] == 1701076831 && (w = B.create(R.slice(2, 4)), R.splice(0, 4), H.sigBytes -= 16), o.create({ ciphertext: H, salt: w });
|
|
3074
3073
|
}
|
|
3075
|
-
}, g =
|
|
3074
|
+
}, g = v.SerializableCipher = y.extend({
|
|
3076
3075
|
/**
|
|
3077
3076
|
* Configuration options.
|
|
3078
3077
|
*
|
|
3079
3078
|
* @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
|
|
3080
3079
|
*/
|
|
3081
|
-
cfg:
|
|
3080
|
+
cfg: y.extend({
|
|
3082
3081
|
format: b
|
|
3083
3082
|
}),
|
|
3084
3083
|
/**
|
|
@@ -3153,7 +3152,7 @@ function X() {
|
|
|
3153
3152
|
_parse: function(F, w) {
|
|
3154
3153
|
return typeof F == "string" ? w.parse(F, this) : F;
|
|
3155
3154
|
}
|
|
3156
|
-
}),
|
|
3155
|
+
}), _ = c.kdf = {}, k = _.OpenSSL = {
|
|
3157
3156
|
/**
|
|
3158
3157
|
* Derives a key and IV from a password.
|
|
3159
3158
|
*
|
|
@@ -3172,14 +3171,14 @@ function X() {
|
|
|
3172
3171
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
3173
3172
|
*/
|
|
3174
3173
|
execute: function(F, w, H, R, z) {
|
|
3175
|
-
if (R || (R =
|
|
3174
|
+
if (R || (R = B.random(64 / 8)), z)
|
|
3176
3175
|
var O = a.create({ keySize: w + H, hasher: z }).compute(F, R);
|
|
3177
3176
|
else
|
|
3178
3177
|
var O = a.create({ keySize: w + H }).compute(F, R);
|
|
3179
|
-
var q =
|
|
3178
|
+
var q = B.create(O.words.slice(w), H * 4);
|
|
3180
3179
|
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: R });
|
|
3181
3180
|
}
|
|
3182
|
-
}, $ =
|
|
3181
|
+
}, $ = v.PasswordBasedCipher = g.extend({
|
|
3183
3182
|
/**
|
|
3184
3183
|
* Configuration options.
|
|
3185
3184
|
*
|
|
@@ -3239,218 +3238,218 @@ function X() {
|
|
|
3239
3238
|
});
|
|
3240
3239
|
})();
|
|
3241
3240
|
});
|
|
3242
|
-
})(
|
|
3241
|
+
})(K0)), K0.exports;
|
|
3243
3242
|
}
|
|
3244
|
-
var
|
|
3245
|
-
function
|
|
3246
|
-
return ie || (ie = 1, (function(r,
|
|
3247
|
-
(function(t, e,
|
|
3243
|
+
var X0 = { exports: {} }, tx = X0.exports, ie;
|
|
3244
|
+
function xx() {
|
|
3245
|
+
return ie || (ie = 1, (function(r, l) {
|
|
3246
|
+
(function(t, e, c) {
|
|
3248
3247
|
r.exports = e(M(), X());
|
|
3249
|
-
})(
|
|
3248
|
+
})(tx, function(t) {
|
|
3250
3249
|
return t.mode.CFB = (function() {
|
|
3251
3250
|
var e = t.lib.BlockCipherMode.extend();
|
|
3252
3251
|
e.Encryptor = e.extend({
|
|
3253
|
-
processBlock: function(
|
|
3254
|
-
var
|
|
3255
|
-
|
|
3252
|
+
processBlock: function(v, y) {
|
|
3253
|
+
var B = this._cipher, C = B.blockSize;
|
|
3254
|
+
c.call(this, v, y, C, B), this._prevBlock = v.slice(y, y + C);
|
|
3256
3255
|
}
|
|
3257
3256
|
}), e.Decryptor = e.extend({
|
|
3258
|
-
processBlock: function(
|
|
3259
|
-
var
|
|
3260
|
-
|
|
3257
|
+
processBlock: function(v, y) {
|
|
3258
|
+
var B = this._cipher, C = B.blockSize, x = v.slice(y, y + C);
|
|
3259
|
+
c.call(this, v, y, C, B), this._prevBlock = x;
|
|
3261
3260
|
}
|
|
3262
3261
|
});
|
|
3263
|
-
function
|
|
3262
|
+
function c(v, y, B, C) {
|
|
3264
3263
|
var x, n = this._iv;
|
|
3265
|
-
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock,
|
|
3266
|
-
for (var E = 0; E <
|
|
3267
|
-
|
|
3264
|
+
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3265
|
+
for (var E = 0; E < B; E++)
|
|
3266
|
+
v[y + E] ^= x[E];
|
|
3268
3267
|
}
|
|
3269
3268
|
return e;
|
|
3270
3269
|
})(), t.mode.CFB;
|
|
3271
3270
|
});
|
|
3272
|
-
})(
|
|
3271
|
+
})(X0)), X0.exports;
|
|
3273
3272
|
}
|
|
3274
|
-
var
|
|
3275
|
-
function
|
|
3276
|
-
return se || (se = 1, (function(r,
|
|
3277
|
-
(function(t, e,
|
|
3273
|
+
var Z0 = { exports: {} }, nx = Z0.exports, se;
|
|
3274
|
+
function ax() {
|
|
3275
|
+
return se || (se = 1, (function(r, l) {
|
|
3276
|
+
(function(t, e, c) {
|
|
3278
3277
|
r.exports = e(M(), X());
|
|
3279
|
-
})(
|
|
3278
|
+
})(nx, function(t) {
|
|
3280
3279
|
return t.mode.CTR = (function() {
|
|
3281
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3282
|
-
processBlock: function(
|
|
3283
|
-
var
|
|
3280
|
+
var e = t.lib.BlockCipherMode.extend(), c = e.Encryptor = e.extend({
|
|
3281
|
+
processBlock: function(v, y) {
|
|
3282
|
+
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3284
3283
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
3285
3284
|
var E = n.slice(0);
|
|
3286
|
-
|
|
3287
|
-
for (var a = 0; a <
|
|
3288
|
-
|
|
3285
|
+
B.encryptBlock(E, 0), n[C - 1] = n[C - 1] + 1 | 0;
|
|
3286
|
+
for (var a = 0; a < C; a++)
|
|
3287
|
+
v[y + a] ^= E[a];
|
|
3289
3288
|
}
|
|
3290
3289
|
});
|
|
3291
|
-
return e.Decryptor =
|
|
3290
|
+
return e.Decryptor = c, e;
|
|
3292
3291
|
})(), t.mode.CTR;
|
|
3293
3292
|
});
|
|
3294
|
-
})(
|
|
3293
|
+
})(Z0)), Z0.exports;
|
|
3295
3294
|
}
|
|
3296
|
-
var Y0 = { exports: {} },
|
|
3297
|
-
function
|
|
3298
|
-
return ce || (ce = 1, (function(r,
|
|
3299
|
-
(function(t, e,
|
|
3295
|
+
var Y0 = { exports: {} }, ox = Y0.exports, ce;
|
|
3296
|
+
function ix() {
|
|
3297
|
+
return ce || (ce = 1, (function(r, l) {
|
|
3298
|
+
(function(t, e, c) {
|
|
3300
3299
|
r.exports = e(M(), X());
|
|
3301
|
-
})(
|
|
3300
|
+
})(ox, function(t) {
|
|
3302
3301
|
return t.mode.CTRGladman = (function() {
|
|
3303
3302
|
var e = t.lib.BlockCipherMode.extend();
|
|
3304
|
-
function
|
|
3305
|
-
if ((
|
|
3306
|
-
var
|
|
3307
|
-
|
|
3303
|
+
function c(B) {
|
|
3304
|
+
if ((B >> 24 & 255) === 255) {
|
|
3305
|
+
var C = B >> 16 & 255, x = B >> 8 & 255, n = B & 255;
|
|
3306
|
+
C === 255 ? (C = 0, x === 255 ? (x = 0, n === 255 ? n = 0 : ++n) : ++x) : ++C, B = 0, B += C << 16, B += x << 8, B += n;
|
|
3308
3307
|
} else
|
|
3309
|
-
|
|
3310
|
-
return
|
|
3308
|
+
B += 1 << 24;
|
|
3309
|
+
return B;
|
|
3311
3310
|
}
|
|
3312
|
-
function
|
|
3313
|
-
return (
|
|
3311
|
+
function v(B) {
|
|
3312
|
+
return (B[0] = c(B[0])) === 0 && (B[1] = c(B[1])), B;
|
|
3314
3313
|
}
|
|
3315
|
-
var
|
|
3316
|
-
processBlock: function(
|
|
3314
|
+
var y = e.Encryptor = e.extend({
|
|
3315
|
+
processBlock: function(B, C) {
|
|
3317
3316
|
var x = this._cipher, n = x.blockSize, E = this._iv, a = this._counter;
|
|
3318
|
-
E && (a = this._counter = E.slice(0), this._iv = void 0),
|
|
3317
|
+
E && (a = this._counter = E.slice(0), this._iv = void 0), v(a);
|
|
3319
3318
|
var s = a.slice(0);
|
|
3320
3319
|
x.encryptBlock(s, 0);
|
|
3321
3320
|
for (var u = 0; u < n; u++)
|
|
3322
|
-
C
|
|
3321
|
+
B[C + u] ^= s[u];
|
|
3323
3322
|
}
|
|
3324
3323
|
});
|
|
3325
|
-
return e.Decryptor =
|
|
3324
|
+
return e.Decryptor = y, e;
|
|
3326
3325
|
})(), t.mode.CTRGladman;
|
|
3327
3326
|
});
|
|
3328
3327
|
})(Y0)), Y0.exports;
|
|
3329
3328
|
}
|
|
3330
|
-
var
|
|
3331
|
-
function
|
|
3332
|
-
return fe || (fe = 1, (function(r,
|
|
3333
|
-
(function(t, e,
|
|
3329
|
+
var Q0 = { exports: {} }, sx = Q0.exports, fe;
|
|
3330
|
+
function cx() {
|
|
3331
|
+
return fe || (fe = 1, (function(r, l) {
|
|
3332
|
+
(function(t, e, c) {
|
|
3334
3333
|
r.exports = e(M(), X());
|
|
3335
|
-
})(
|
|
3334
|
+
})(sx, function(t) {
|
|
3336
3335
|
return t.mode.OFB = (function() {
|
|
3337
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3338
|
-
processBlock: function(
|
|
3339
|
-
var
|
|
3340
|
-
x && (n = this._keystream = x.slice(0), this._iv = void 0),
|
|
3341
|
-
for (var E = 0; E <
|
|
3342
|
-
|
|
3336
|
+
var e = t.lib.BlockCipherMode.extend(), c = e.Encryptor = e.extend({
|
|
3337
|
+
processBlock: function(v, y) {
|
|
3338
|
+
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3339
|
+
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
3340
|
+
for (var E = 0; E < C; E++)
|
|
3341
|
+
v[y + E] ^= n[E];
|
|
3343
3342
|
}
|
|
3344
3343
|
});
|
|
3345
|
-
return e.Decryptor =
|
|
3344
|
+
return e.Decryptor = c, e;
|
|
3346
3345
|
})(), t.mode.OFB;
|
|
3347
3346
|
});
|
|
3348
|
-
})(
|
|
3347
|
+
})(Q0)), Q0.exports;
|
|
3349
3348
|
}
|
|
3350
|
-
var
|
|
3351
|
-
function
|
|
3352
|
-
return ue || (ue = 1, (function(r,
|
|
3353
|
-
(function(t, e,
|
|
3349
|
+
var V0 = { exports: {} }, fx = V0.exports, ue;
|
|
3350
|
+
function ux() {
|
|
3351
|
+
return ue || (ue = 1, (function(r, l) {
|
|
3352
|
+
(function(t, e, c) {
|
|
3354
3353
|
r.exports = e(M(), X());
|
|
3355
|
-
})(
|
|
3354
|
+
})(fx, function(t) {
|
|
3356
3355
|
return t.mode.ECB = (function() {
|
|
3357
3356
|
var e = t.lib.BlockCipherMode.extend();
|
|
3358
3357
|
return e.Encryptor = e.extend({
|
|
3359
|
-
processBlock: function(
|
|
3360
|
-
this._cipher.encryptBlock(
|
|
3358
|
+
processBlock: function(c, v) {
|
|
3359
|
+
this._cipher.encryptBlock(c, v);
|
|
3361
3360
|
}
|
|
3362
3361
|
}), e.Decryptor = e.extend({
|
|
3363
|
-
processBlock: function(
|
|
3364
|
-
this._cipher.decryptBlock(
|
|
3362
|
+
processBlock: function(c, v) {
|
|
3363
|
+
this._cipher.decryptBlock(c, v);
|
|
3365
3364
|
}
|
|
3366
3365
|
}), e;
|
|
3367
3366
|
})(), t.mode.ECB;
|
|
3368
3367
|
});
|
|
3369
|
-
})(
|
|
3368
|
+
})(V0)), V0.exports;
|
|
3370
3369
|
}
|
|
3371
|
-
var
|
|
3372
|
-
function
|
|
3373
|
-
return de || (de = 1, (function(r,
|
|
3374
|
-
(function(t, e,
|
|
3370
|
+
var J0 = { exports: {} }, dx = J0.exports, de;
|
|
3371
|
+
function lx() {
|
|
3372
|
+
return de || (de = 1, (function(r, l) {
|
|
3373
|
+
(function(t, e, c) {
|
|
3375
3374
|
r.exports = e(M(), X());
|
|
3376
|
-
})(
|
|
3375
|
+
})(dx, function(t) {
|
|
3377
3376
|
return t.pad.AnsiX923 = {
|
|
3378
|
-
pad: function(e,
|
|
3379
|
-
var
|
|
3380
|
-
e.clamp(), e.words[
|
|
3377
|
+
pad: function(e, c) {
|
|
3378
|
+
var v = e.sigBytes, y = c * 4, B = y - v % y, C = v + B - 1;
|
|
3379
|
+
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3381
3380
|
},
|
|
3382
3381
|
unpad: function(e) {
|
|
3383
|
-
var
|
|
3384
|
-
e.sigBytes -=
|
|
3382
|
+
var c = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3383
|
+
e.sigBytes -= c;
|
|
3385
3384
|
}
|
|
3386
3385
|
}, t.pad.Ansix923;
|
|
3387
3386
|
});
|
|
3388
|
-
})(
|
|
3387
|
+
})(J0)), J0.exports;
|
|
3389
3388
|
}
|
|
3390
|
-
var
|
|
3391
|
-
function
|
|
3392
|
-
return le || (le = 1, (function(r,
|
|
3393
|
-
(function(t, e,
|
|
3389
|
+
var rr = { exports: {} }, hx = rr.exports, le;
|
|
3390
|
+
function vx() {
|
|
3391
|
+
return le || (le = 1, (function(r, l) {
|
|
3392
|
+
(function(t, e, c) {
|
|
3394
3393
|
r.exports = e(M(), X());
|
|
3395
|
-
})(
|
|
3394
|
+
})(hx, function(t) {
|
|
3396
3395
|
return t.pad.Iso10126 = {
|
|
3397
|
-
pad: function(e,
|
|
3398
|
-
var
|
|
3399
|
-
e.concat(t.lib.WordArray.random(
|
|
3396
|
+
pad: function(e, c) {
|
|
3397
|
+
var v = c * 4, y = v - e.sigBytes % v;
|
|
3398
|
+
e.concat(t.lib.WordArray.random(y - 1)).concat(t.lib.WordArray.create([y << 24], 1));
|
|
3400
3399
|
},
|
|
3401
3400
|
unpad: function(e) {
|
|
3402
|
-
var
|
|
3403
|
-
e.sigBytes -=
|
|
3401
|
+
var c = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3402
|
+
e.sigBytes -= c;
|
|
3404
3403
|
}
|
|
3405
3404
|
}, t.pad.Iso10126;
|
|
3406
3405
|
});
|
|
3407
|
-
})(
|
|
3406
|
+
})(rr)), rr.exports;
|
|
3408
3407
|
}
|
|
3409
|
-
var
|
|
3410
|
-
function
|
|
3411
|
-
return he || (he = 1, (function(r,
|
|
3412
|
-
(function(t, e,
|
|
3408
|
+
var er = { exports: {} }, px = er.exports, he;
|
|
3409
|
+
function Bx() {
|
|
3410
|
+
return he || (he = 1, (function(r, l) {
|
|
3411
|
+
(function(t, e, c) {
|
|
3413
3412
|
r.exports = e(M(), X());
|
|
3414
|
-
})(
|
|
3413
|
+
})(px, function(t) {
|
|
3415
3414
|
return t.pad.Iso97971 = {
|
|
3416
|
-
pad: function(e,
|
|
3417
|
-
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e,
|
|
3415
|
+
pad: function(e, c) {
|
|
3416
|
+
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e, c);
|
|
3418
3417
|
},
|
|
3419
3418
|
unpad: function(e) {
|
|
3420
3419
|
t.pad.ZeroPadding.unpad(e), e.sigBytes--;
|
|
3421
3420
|
}
|
|
3422
3421
|
}, t.pad.Iso97971;
|
|
3423
3422
|
});
|
|
3424
|
-
})(
|
|
3423
|
+
})(er)), er.exports;
|
|
3425
3424
|
}
|
|
3426
|
-
var
|
|
3427
|
-
function
|
|
3428
|
-
return ve || (ve = 1, (function(r,
|
|
3429
|
-
(function(t, e,
|
|
3425
|
+
var tr = { exports: {} }, Cx = tr.exports, ve;
|
|
3426
|
+
function Ex() {
|
|
3427
|
+
return ve || (ve = 1, (function(r, l) {
|
|
3428
|
+
(function(t, e, c) {
|
|
3430
3429
|
r.exports = e(M(), X());
|
|
3431
|
-
})(
|
|
3430
|
+
})(Cx, function(t) {
|
|
3432
3431
|
return t.pad.ZeroPadding = {
|
|
3433
|
-
pad: function(e,
|
|
3434
|
-
var
|
|
3435
|
-
e.clamp(), e.sigBytes +=
|
|
3432
|
+
pad: function(e, c) {
|
|
3433
|
+
var v = c * 4;
|
|
3434
|
+
e.clamp(), e.sigBytes += v - (e.sigBytes % v || v);
|
|
3436
3435
|
},
|
|
3437
3436
|
unpad: function(e) {
|
|
3438
|
-
for (var
|
|
3439
|
-
if (
|
|
3440
|
-
e.sigBytes =
|
|
3437
|
+
for (var c = e.words, v = e.sigBytes - 1, v = e.sigBytes - 1; v >= 0; v--)
|
|
3438
|
+
if (c[v >>> 2] >>> 24 - v % 4 * 8 & 255) {
|
|
3439
|
+
e.sigBytes = v + 1;
|
|
3441
3440
|
break;
|
|
3442
3441
|
}
|
|
3443
3442
|
}
|
|
3444
3443
|
}, t.pad.ZeroPadding;
|
|
3445
3444
|
});
|
|
3446
|
-
})(
|
|
3445
|
+
})(tr)), tr.exports;
|
|
3447
3446
|
}
|
|
3448
|
-
var
|
|
3449
|
-
function
|
|
3450
|
-
return pe || (pe = 1, (function(r,
|
|
3451
|
-
(function(t, e,
|
|
3447
|
+
var xr = { exports: {} }, Ax = xr.exports, pe;
|
|
3448
|
+
function Fx() {
|
|
3449
|
+
return pe || (pe = 1, (function(r, l) {
|
|
3450
|
+
(function(t, e, c) {
|
|
3452
3451
|
r.exports = e(M(), X());
|
|
3453
|
-
})(
|
|
3452
|
+
})(Ax, function(t) {
|
|
3454
3453
|
return t.pad.NoPadding = {
|
|
3455
3454
|
pad: function() {
|
|
3456
3455
|
},
|
|
@@ -3458,16 +3457,16 @@ function Ax() {
|
|
|
3458
3457
|
}
|
|
3459
3458
|
}, t.pad.NoPadding;
|
|
3460
3459
|
});
|
|
3461
|
-
})(
|
|
3460
|
+
})(xr)), xr.exports;
|
|
3462
3461
|
}
|
|
3463
|
-
var
|
|
3464
|
-
function
|
|
3465
|
-
return Be || (Be = 1, (function(r,
|
|
3466
|
-
(function(t, e,
|
|
3462
|
+
var nr = { exports: {} }, gx = nr.exports, Be;
|
|
3463
|
+
function Dx() {
|
|
3464
|
+
return Be || (Be = 1, (function(r, l) {
|
|
3465
|
+
(function(t, e, c) {
|
|
3467
3466
|
r.exports = e(M(), X());
|
|
3468
|
-
})(
|
|
3467
|
+
})(gx, function(t) {
|
|
3469
3468
|
return (function(e) {
|
|
3470
|
-
var
|
|
3469
|
+
var c = t, v = c.lib, y = v.CipherParams, B = c.enc, C = B.Hex, x = c.format;
|
|
3471
3470
|
x.Hex = {
|
|
3472
3471
|
/**
|
|
3473
3472
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3483,7 +3482,7 @@ function gx() {
|
|
|
3483
3482
|
* var hexString = CryptoJS.format.Hex.stringify(cipherParams);
|
|
3484
3483
|
*/
|
|
3485
3484
|
stringify: function(n) {
|
|
3486
|
-
return n.ciphertext.toString(
|
|
3485
|
+
return n.ciphertext.toString(C);
|
|
3487
3486
|
},
|
|
3488
3487
|
/**
|
|
3489
3488
|
* Converts a hexadecimally encoded ciphertext string to a cipher params object.
|
|
@@ -3499,82 +3498,82 @@ function gx() {
|
|
|
3499
3498
|
* var cipherParams = CryptoJS.format.Hex.parse(hexString);
|
|
3500
3499
|
*/
|
|
3501
3500
|
parse: function(n) {
|
|
3502
|
-
var E =
|
|
3503
|
-
return
|
|
3501
|
+
var E = C.parse(n);
|
|
3502
|
+
return y.create({ ciphertext: E });
|
|
3504
3503
|
}
|
|
3505
3504
|
};
|
|
3506
3505
|
})(), t.format.Hex;
|
|
3507
3506
|
});
|
|
3508
|
-
})(
|
|
3507
|
+
})(nr)), nr.exports;
|
|
3509
3508
|
}
|
|
3510
|
-
var
|
|
3511
|
-
function
|
|
3512
|
-
return Ce || (Ce = 1, (function(r,
|
|
3513
|
-
(function(t, e,
|
|
3509
|
+
var ar = { exports: {} }, bx = ar.exports, Ce;
|
|
3510
|
+
function mx() {
|
|
3511
|
+
return Ce || (Ce = 1, (function(r, l) {
|
|
3512
|
+
(function(t, e, c) {
|
|
3514
3513
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
3515
|
-
})(
|
|
3514
|
+
})(bx, function(t) {
|
|
3516
3515
|
return (function() {
|
|
3517
|
-
var e = t,
|
|
3516
|
+
var e = t, c = e.lib, v = c.BlockCipher, y = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], u = [], p = [], h = [];
|
|
3518
3517
|
(function() {
|
|
3519
|
-
for (var o = [],
|
|
3520
|
-
|
|
3521
|
-
for (var b = 0, g = 0,
|
|
3522
|
-
var
|
|
3523
|
-
|
|
3524
|
-
var k = o[b], $ = o[k], F = o[$], w = o[
|
|
3518
|
+
for (var o = [], d = 0; d < 256; d++)
|
|
3519
|
+
d < 128 ? o[d] = d << 1 : o[d] = d << 1 ^ 283;
|
|
3520
|
+
for (var b = 0, g = 0, d = 0; d < 256; d++) {
|
|
3521
|
+
var _ = g ^ g << 1 ^ g << 2 ^ g << 3 ^ g << 4;
|
|
3522
|
+
_ = _ >>> 8 ^ _ & 255 ^ 99, B[b] = _, C[_] = b;
|
|
3523
|
+
var k = o[b], $ = o[k], F = o[$], w = o[_] * 257 ^ _ * 16843008;
|
|
3525
3524
|
x[b] = w << 24 | w >>> 8, n[b] = w << 16 | w >>> 16, E[b] = w << 8 | w >>> 24, a[b] = w;
|
|
3526
3525
|
var w = F * 16843009 ^ $ * 65537 ^ k * 257 ^ b * 16843008;
|
|
3527
|
-
s[
|
|
3526
|
+
s[_] = w << 24 | w >>> 8, u[_] = w << 16 | w >>> 16, p[_] = w << 8 | w >>> 24, h[_] = w, b ? (b = k ^ o[o[o[F ^ k]]], g ^= o[o[g]]) : b = g = 1;
|
|
3528
3527
|
}
|
|
3529
3528
|
})();
|
|
3530
|
-
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i =
|
|
3529
|
+
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = y.AES = v.extend({
|
|
3531
3530
|
_doReset: function() {
|
|
3532
3531
|
var o;
|
|
3533
3532
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
3534
|
-
for (var
|
|
3535
|
-
F < g ? $[F] = b[F] : (o = $[F - 1], F % g ? g > 6 && F % g == 4 && (o =
|
|
3533
|
+
for (var d = this._keyPriorReset = this._key, b = d.words, g = d.sigBytes / 4, _ = this._nRounds = g + 6, k = (_ + 1) * 4, $ = this._keySchedule = [], F = 0; F < k; F++)
|
|
3534
|
+
F < g ? $[F] = b[F] : (o = $[F - 1], F % g ? g > 6 && F % g == 4 && (o = B[o >>> 24] << 24 | B[o >>> 16 & 255] << 16 | B[o >>> 8 & 255] << 8 | B[o & 255]) : (o = o << 8 | o >>> 24, o = B[o >>> 24] << 24 | B[o >>> 16 & 255] << 16 | B[o >>> 8 & 255] << 8 | B[o & 255], o ^= D[F / g | 0] << 24), $[F] = $[F - g] ^ o);
|
|
3536
3535
|
for (var w = this._invKeySchedule = [], H = 0; H < k; H++) {
|
|
3537
3536
|
var F = k - H;
|
|
3538
3537
|
if (H % 4)
|
|
3539
3538
|
var o = $[F];
|
|
3540
3539
|
else
|
|
3541
3540
|
var o = $[F - 4];
|
|
3542
|
-
H < 4 || F <= 4 ? w[H] = o : w[H] = s[
|
|
3541
|
+
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ u[B[o >>> 16 & 255]] ^ p[B[o >>> 8 & 255]] ^ h[B[o & 255]];
|
|
3543
3542
|
}
|
|
3544
3543
|
}
|
|
3545
3544
|
},
|
|
3546
|
-
encryptBlock: function(o,
|
|
3547
|
-
this._doCryptBlock(o,
|
|
3545
|
+
encryptBlock: function(o, d) {
|
|
3546
|
+
this._doCryptBlock(o, d, this._keySchedule, x, n, E, a, B);
|
|
3548
3547
|
},
|
|
3549
|
-
decryptBlock: function(o,
|
|
3550
|
-
var b = o[
|
|
3551
|
-
o[
|
|
3552
|
-
var b = o[
|
|
3553
|
-
o[
|
|
3548
|
+
decryptBlock: function(o, d) {
|
|
3549
|
+
var b = o[d + 1];
|
|
3550
|
+
o[d + 1] = o[d + 3], o[d + 3] = b, this._doCryptBlock(o, d, this._invKeySchedule, s, u, p, h, C);
|
|
3551
|
+
var b = o[d + 1];
|
|
3552
|
+
o[d + 1] = o[d + 3], o[d + 3] = b;
|
|
3554
3553
|
},
|
|
3555
|
-
_doCryptBlock: function(o,
|
|
3556
|
-
for (var w = this._nRounds, H = o[
|
|
3557
|
-
var T = g[H >>> 24] ^
|
|
3554
|
+
_doCryptBlock: function(o, d, b, g, _, k, $, F) {
|
|
3555
|
+
for (var w = this._nRounds, H = o[d] ^ b[0], R = o[d + 1] ^ b[1], z = o[d + 2] ^ b[2], O = o[d + 3] ^ b[3], q = 4, U = 1; U < w; U++) {
|
|
3556
|
+
var T = g[H >>> 24] ^ _[R >>> 16 & 255] ^ k[z >>> 8 & 255] ^ $[O & 255] ^ b[q++], N = g[R >>> 24] ^ _[z >>> 16 & 255] ^ k[O >>> 8 & 255] ^ $[H & 255] ^ b[q++], j = g[z >>> 24] ^ _[O >>> 16 & 255] ^ k[H >>> 8 & 255] ^ $[R & 255] ^ b[q++], S = g[O >>> 24] ^ _[H >>> 16 & 255] ^ k[R >>> 8 & 255] ^ $[z & 255] ^ b[q++];
|
|
3558
3557
|
H = T, R = N, z = j, O = S;
|
|
3559
3558
|
}
|
|
3560
3559
|
var T = (F[H >>> 24] << 24 | F[R >>> 16 & 255] << 16 | F[z >>> 8 & 255] << 8 | F[O & 255]) ^ b[q++], N = (F[R >>> 24] << 24 | F[z >>> 16 & 255] << 16 | F[O >>> 8 & 255] << 8 | F[H & 255]) ^ b[q++], j = (F[z >>> 24] << 24 | F[O >>> 16 & 255] << 16 | F[H >>> 8 & 255] << 8 | F[R & 255]) ^ b[q++], S = (F[O >>> 24] << 24 | F[H >>> 16 & 255] << 16 | F[R >>> 8 & 255] << 8 | F[z & 255]) ^ b[q++];
|
|
3561
|
-
o[
|
|
3560
|
+
o[d] = T, o[d + 1] = N, o[d + 2] = j, o[d + 3] = S;
|
|
3562
3561
|
},
|
|
3563
3562
|
keySize: 256 / 32
|
|
3564
3563
|
});
|
|
3565
|
-
e.AES =
|
|
3564
|
+
e.AES = v._createHelper(i);
|
|
3566
3565
|
})(), t.AES;
|
|
3567
3566
|
});
|
|
3568
|
-
})(
|
|
3567
|
+
})(ar)), ar.exports;
|
|
3569
3568
|
}
|
|
3570
|
-
var
|
|
3571
|
-
function
|
|
3572
|
-
return Ee || (Ee = 1, (function(r,
|
|
3573
|
-
(function(t, e,
|
|
3569
|
+
var or = { exports: {} }, _x = or.exports, Ee;
|
|
3570
|
+
function yx() {
|
|
3571
|
+
return Ee || (Ee = 1, (function(r, l) {
|
|
3572
|
+
(function(t, e, c) {
|
|
3574
3573
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
3575
|
-
})(
|
|
3574
|
+
})(_x, function(t) {
|
|
3576
3575
|
return (function() {
|
|
3577
|
-
var e = t,
|
|
3576
|
+
var e = t, c = e.lib, v = c.WordArray, y = c.BlockCipher, B = e.algo, C = [
|
|
3578
3577
|
57,
|
|
3579
3578
|
49,
|
|
3580
3579
|
41,
|
|
@@ -4218,22 +4217,22 @@ function _x() {
|
|
|
4218
4217
|
8064,
|
|
4219
4218
|
504,
|
|
4220
4219
|
2147483679
|
|
4221
|
-
], s =
|
|
4220
|
+
], s = B.DES = y.extend({
|
|
4222
4221
|
_doReset: function() {
|
|
4223
|
-
for (var D = this._key, i = D.words, o = [],
|
|
4224
|
-
var b =
|
|
4225
|
-
o[
|
|
4222
|
+
for (var D = this._key, i = D.words, o = [], d = 0; d < 56; d++) {
|
|
4223
|
+
var b = C[d] - 1;
|
|
4224
|
+
o[d] = i[b >>> 5] >>> 31 - b % 32 & 1;
|
|
4226
4225
|
}
|
|
4227
|
-
for (var g = this._subKeys = [],
|
|
4228
|
-
for (var k = g[
|
|
4229
|
-
k[
|
|
4226
|
+
for (var g = this._subKeys = [], _ = 0; _ < 16; _++) {
|
|
4227
|
+
for (var k = g[_] = [], $ = n[_], d = 0; d < 24; d++)
|
|
4228
|
+
k[d / 6 | 0] |= o[(x[d] - 1 + $) % 28] << 31 - d % 6, k[4 + (d / 6 | 0)] |= o[28 + (x[d + 24] - 1 + $) % 28] << 31 - d % 6;
|
|
4230
4229
|
k[0] = k[0] << 1 | k[0] >>> 31;
|
|
4231
|
-
for (var
|
|
4232
|
-
k[
|
|
4230
|
+
for (var d = 1; d < 7; d++)
|
|
4231
|
+
k[d] = k[d] >>> (d - 1) * 4 + 3;
|
|
4233
4232
|
k[7] = k[7] << 5 | k[7] >>> 27;
|
|
4234
4233
|
}
|
|
4235
|
-
for (var F = this._invSubKeys = [],
|
|
4236
|
-
F[
|
|
4234
|
+
for (var F = this._invSubKeys = [], d = 0; d < 16; d++)
|
|
4235
|
+
F[d] = g[15 - d];
|
|
4237
4236
|
},
|
|
4238
4237
|
encryptBlock: function(D, i) {
|
|
4239
4238
|
this._doCryptBlock(D, i, this._subKeys);
|
|
@@ -4243,10 +4242,10 @@ function _x() {
|
|
|
4243
4242
|
},
|
|
4244
4243
|
_doCryptBlock: function(D, i, o) {
|
|
4245
4244
|
this._lBlock = D[i], this._rBlock = D[i + 1], u.call(this, 4, 252645135), u.call(this, 16, 65535), p.call(this, 2, 858993459), p.call(this, 8, 16711935), u.call(this, 1, 1431655765);
|
|
4246
|
-
for (var
|
|
4247
|
-
for (var b = o[
|
|
4248
|
-
k |= E[$][((
|
|
4249
|
-
this._lBlock =
|
|
4245
|
+
for (var d = 0; d < 16; d++) {
|
|
4246
|
+
for (var b = o[d], g = this._lBlock, _ = this._rBlock, k = 0, $ = 0; $ < 8; $++)
|
|
4247
|
+
k |= E[$][((_ ^ b[$]) & a[$]) >>> 0];
|
|
4248
|
+
this._lBlock = _, this._rBlock = g ^ k;
|
|
4250
4249
|
}
|
|
4251
4250
|
var F = this._lBlock;
|
|
4252
4251
|
this._lBlock = this._rBlock, this._rBlock = F, u.call(this, 1, 1431655765), p.call(this, 8, 16711935), p.call(this, 2, 858993459), u.call(this, 16, 65535), u.call(this, 4, 252645135), D[i] = this._lBlock, D[i + 1] = this._rBlock;
|
|
@@ -4263,14 +4262,14 @@ function _x() {
|
|
|
4263
4262
|
var o = (this._rBlock >>> D ^ this._lBlock) & i;
|
|
4264
4263
|
this._lBlock ^= o, this._rBlock ^= o << D;
|
|
4265
4264
|
}
|
|
4266
|
-
e.DES =
|
|
4267
|
-
var
|
|
4265
|
+
e.DES = y._createHelper(s);
|
|
4266
|
+
var h = B.TripleDES = y.extend({
|
|
4268
4267
|
_doReset: function() {
|
|
4269
4268
|
var D = this._key, i = D.words;
|
|
4270
4269
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
4271
4270
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4272
|
-
var o = i.slice(0, 2),
|
|
4273
|
-
this._des1 = s.createEncryptor(
|
|
4271
|
+
var o = i.slice(0, 2), d = i.length < 4 ? i.slice(0, 2) : i.slice(2, 4), b = i.length < 6 ? i.slice(0, 2) : i.slice(4, 6);
|
|
4272
|
+
this._des1 = s.createEncryptor(v.create(o)), this._des2 = s.createEncryptor(v.create(d)), this._des3 = s.createEncryptor(v.create(b));
|
|
4274
4273
|
},
|
|
4275
4274
|
encryptBlock: function(D, i) {
|
|
4276
4275
|
this._des1.encryptBlock(D, i), this._des2.decryptBlock(D, i), this._des3.encryptBlock(D, i);
|
|
@@ -4282,24 +4281,24 @@ function _x() {
|
|
|
4282
4281
|
ivSize: 64 / 32,
|
|
4283
4282
|
blockSize: 64 / 32
|
|
4284
4283
|
});
|
|
4285
|
-
e.TripleDES =
|
|
4284
|
+
e.TripleDES = y._createHelper(h);
|
|
4286
4285
|
})(), t.TripleDES;
|
|
4287
4286
|
});
|
|
4288
|
-
})(
|
|
4287
|
+
})(or)), or.exports;
|
|
4289
4288
|
}
|
|
4290
|
-
var
|
|
4291
|
-
function
|
|
4292
|
-
return Ae || (Ae = 1, (function(r,
|
|
4293
|
-
(function(t, e,
|
|
4289
|
+
var ir = { exports: {} }, wx = ir.exports, Ae;
|
|
4290
|
+
function kx() {
|
|
4291
|
+
return Ae || (Ae = 1, (function(r, l) {
|
|
4292
|
+
(function(t, e, c) {
|
|
4294
4293
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4295
|
-
})(
|
|
4294
|
+
})(wx, function(t) {
|
|
4296
4295
|
return (function() {
|
|
4297
|
-
var e = t,
|
|
4296
|
+
var e = t, c = e.lib, v = c.StreamCipher, y = e.algo, B = y.RC4 = v.extend({
|
|
4298
4297
|
_doReset: function() {
|
|
4299
4298
|
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], u = 0; u < 256; u++)
|
|
4300
4299
|
s[u] = u;
|
|
4301
4300
|
for (var u = 0, p = 0; u < 256; u++) {
|
|
4302
|
-
var
|
|
4301
|
+
var h = u % a, D = E[h >>> 2] >>> 24 - h % 4 * 8 & 255;
|
|
4303
4302
|
p = (p + s[u] + D) % 256;
|
|
4304
4303
|
var i = s[u];
|
|
4305
4304
|
s[u] = s[p], s[p] = i;
|
|
@@ -4307,12 +4306,12 @@ function wx() {
|
|
|
4307
4306
|
this._i = this._j = 0;
|
|
4308
4307
|
},
|
|
4309
4308
|
_doProcessBlock: function(n, E) {
|
|
4310
|
-
n[E] ^=
|
|
4309
|
+
n[E] ^= C.call(this);
|
|
4311
4310
|
},
|
|
4312
4311
|
keySize: 256 / 32,
|
|
4313
4312
|
ivSize: 0
|
|
4314
4313
|
});
|
|
4315
|
-
function
|
|
4314
|
+
function C() {
|
|
4316
4315
|
for (var n = this._S, E = this._i, a = this._j, s = 0, u = 0; u < 4; u++) {
|
|
4317
4316
|
E = (E + 1) % 256, a = (a + n[E]) % 256;
|
|
4318
4317
|
var p = n[E];
|
|
@@ -4320,35 +4319,35 @@ function wx() {
|
|
|
4320
4319
|
}
|
|
4321
4320
|
return this._i = E, this._j = a, s;
|
|
4322
4321
|
}
|
|
4323
|
-
e.RC4 =
|
|
4324
|
-
var x =
|
|
4322
|
+
e.RC4 = v._createHelper(B);
|
|
4323
|
+
var x = y.RC4Drop = B.extend({
|
|
4325
4324
|
/**
|
|
4326
4325
|
* Configuration options.
|
|
4327
4326
|
*
|
|
4328
4327
|
* @property {number} drop The number of keystream words to drop. Default 192
|
|
4329
4328
|
*/
|
|
4330
|
-
cfg:
|
|
4329
|
+
cfg: B.cfg.extend({
|
|
4331
4330
|
drop: 192
|
|
4332
4331
|
}),
|
|
4333
4332
|
_doReset: function() {
|
|
4334
|
-
|
|
4333
|
+
B._doReset.call(this);
|
|
4335
4334
|
for (var n = this.cfg.drop; n > 0; n--)
|
|
4336
|
-
|
|
4335
|
+
C.call(this);
|
|
4337
4336
|
}
|
|
4338
4337
|
});
|
|
4339
|
-
e.RC4Drop =
|
|
4338
|
+
e.RC4Drop = v._createHelper(x);
|
|
4340
4339
|
})(), t.RC4;
|
|
4341
4340
|
});
|
|
4342
|
-
})(
|
|
4341
|
+
})(ir)), ir.exports;
|
|
4343
4342
|
}
|
|
4344
|
-
var
|
|
4345
|
-
function
|
|
4346
|
-
return Fe || (Fe = 1, (function(r,
|
|
4347
|
-
(function(t, e,
|
|
4343
|
+
var sr = { exports: {} }, Sx = sr.exports, Fe;
|
|
4344
|
+
function Hx() {
|
|
4345
|
+
return Fe || (Fe = 1, (function(r, l) {
|
|
4346
|
+
(function(t, e, c) {
|
|
4348
4347
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4349
|
-
})(
|
|
4348
|
+
})(Sx, function(t) {
|
|
4350
4349
|
return (function() {
|
|
4351
|
-
var e = t,
|
|
4350
|
+
var e = t, c = e.lib, v = c.StreamCipher, y = e.algo, B = [], C = [], x = [], n = y.Rabbit = v.extend({
|
|
4352
4351
|
_doReset: function() {
|
|
4353
4352
|
for (var a = this._key.words, s = this.cfg.iv, u = 0; u < 4; u++)
|
|
4354
4353
|
a[u] = (a[u] << 8 | a[u] >>> 24) & 16711935 | (a[u] << 24 | a[u] >>> 8) & 4278255360;
|
|
@@ -4361,7 +4360,7 @@ function Sx() {
|
|
|
4361
4360
|
a[1] << 16 | a[0] >>> 16,
|
|
4362
4361
|
a[3],
|
|
4363
4362
|
a[2] << 16 | a[1] >>> 16
|
|
4364
|
-
],
|
|
4363
|
+
], h = this._C = [
|
|
4365
4364
|
a[2] << 16 | a[2] >>> 16,
|
|
4366
4365
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4367
4366
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4375,46 +4374,46 @@ function Sx() {
|
|
|
4375
4374
|
for (var u = 0; u < 4; u++)
|
|
4376
4375
|
E.call(this);
|
|
4377
4376
|
for (var u = 0; u < 8; u++)
|
|
4378
|
-
|
|
4377
|
+
h[u] ^= p[u + 4 & 7];
|
|
4379
4378
|
if (s) {
|
|
4380
|
-
var D = s.words, i = D[0], o = D[1],
|
|
4381
|
-
|
|
4379
|
+
var D = s.words, i = D[0], o = D[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = d >>> 16 | b & 4294901760, _ = b << 16 | d & 65535;
|
|
4380
|
+
h[0] ^= d, h[1] ^= g, h[2] ^= b, h[3] ^= _, h[4] ^= d, h[5] ^= g, h[6] ^= b, h[7] ^= _;
|
|
4382
4381
|
for (var u = 0; u < 4; u++)
|
|
4383
4382
|
E.call(this);
|
|
4384
4383
|
}
|
|
4385
4384
|
},
|
|
4386
4385
|
_doProcessBlock: function(a, s) {
|
|
4387
4386
|
var u = this._X;
|
|
4388
|
-
E.call(this),
|
|
4387
|
+
E.call(this), B[0] = u[0] ^ u[5] >>> 16 ^ u[3] << 16, B[1] = u[2] ^ u[7] >>> 16 ^ u[5] << 16, B[2] = u[4] ^ u[1] >>> 16 ^ u[7] << 16, B[3] = u[6] ^ u[3] >>> 16 ^ u[1] << 16;
|
|
4389
4388
|
for (var p = 0; p < 4; p++)
|
|
4390
|
-
|
|
4389
|
+
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4391
4390
|
},
|
|
4392
4391
|
blockSize: 128 / 32,
|
|
4393
4392
|
ivSize: 64 / 32
|
|
4394
4393
|
});
|
|
4395
4394
|
function E() {
|
|
4396
4395
|
for (var a = this._X, s = this._C, u = 0; u < 8; u++)
|
|
4397
|
-
|
|
4398
|
-
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 <
|
|
4396
|
+
C[u] = s[u];
|
|
4397
|
+
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4399
4398
|
for (var u = 0; u < 8; u++) {
|
|
4400
|
-
var p = a[u] + s[u],
|
|
4399
|
+
var p = a[u] + s[u], h = p & 65535, D = p >>> 16, i = ((h * h >>> 17) + h * D >>> 15) + D * D, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4401
4400
|
x[u] = i ^ o;
|
|
4402
4401
|
}
|
|
4403
4402
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
4404
4403
|
}
|
|
4405
|
-
e.Rabbit =
|
|
4404
|
+
e.Rabbit = v._createHelper(n);
|
|
4406
4405
|
})(), t.Rabbit;
|
|
4407
4406
|
});
|
|
4408
|
-
})(
|
|
4407
|
+
})(sr)), sr.exports;
|
|
4409
4408
|
}
|
|
4410
|
-
var
|
|
4411
|
-
function
|
|
4412
|
-
return ge || (ge = 1, (function(r,
|
|
4413
|
-
(function(t, e,
|
|
4409
|
+
var cr = { exports: {} }, Rx = cr.exports, ge;
|
|
4410
|
+
function $x() {
|
|
4411
|
+
return ge || (ge = 1, (function(r, l) {
|
|
4412
|
+
(function(t, e, c) {
|
|
4414
4413
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4415
|
-
})(
|
|
4414
|
+
})(Rx, function(t) {
|
|
4416
4415
|
return (function() {
|
|
4417
|
-
var e = t,
|
|
4416
|
+
var e = t, c = e.lib, v = c.StreamCipher, y = e.algo, B = [], C = [], x = [], n = y.RabbitLegacy = v.extend({
|
|
4418
4417
|
_doReset: function() {
|
|
4419
4418
|
var a = this._key.words, s = this.cfg.iv, u = this._X = [
|
|
4420
4419
|
a[0],
|
|
@@ -4436,50 +4435,50 @@ function Rx() {
|
|
|
4436
4435
|
a[3] & 4294901760 | a[0] & 65535
|
|
4437
4436
|
];
|
|
4438
4437
|
this._b = 0;
|
|
4439
|
-
for (var
|
|
4438
|
+
for (var h = 0; h < 4; h++)
|
|
4440
4439
|
E.call(this);
|
|
4441
|
-
for (var
|
|
4442
|
-
p[
|
|
4440
|
+
for (var h = 0; h < 8; h++)
|
|
4441
|
+
p[h] ^= u[h + 4 & 7];
|
|
4443
4442
|
if (s) {
|
|
4444
|
-
var D = s.words, i = D[0], o = D[1],
|
|
4445
|
-
p[0] ^=
|
|
4446
|
-
for (var
|
|
4443
|
+
var D = s.words, i = D[0], o = D[1], d = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = d >>> 16 | b & 4294901760, _ = b << 16 | d & 65535;
|
|
4444
|
+
p[0] ^= d, p[1] ^= g, p[2] ^= b, p[3] ^= _, p[4] ^= d, p[5] ^= g, p[6] ^= b, p[7] ^= _;
|
|
4445
|
+
for (var h = 0; h < 4; h++)
|
|
4447
4446
|
E.call(this);
|
|
4448
4447
|
}
|
|
4449
4448
|
},
|
|
4450
4449
|
_doProcessBlock: function(a, s) {
|
|
4451
4450
|
var u = this._X;
|
|
4452
|
-
E.call(this),
|
|
4451
|
+
E.call(this), B[0] = u[0] ^ u[5] >>> 16 ^ u[3] << 16, B[1] = u[2] ^ u[7] >>> 16 ^ u[5] << 16, B[2] = u[4] ^ u[1] >>> 16 ^ u[7] << 16, B[3] = u[6] ^ u[3] >>> 16 ^ u[1] << 16;
|
|
4453
4452
|
for (var p = 0; p < 4; p++)
|
|
4454
|
-
|
|
4453
|
+
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4455
4454
|
},
|
|
4456
4455
|
blockSize: 128 / 32,
|
|
4457
4456
|
ivSize: 64 / 32
|
|
4458
4457
|
});
|
|
4459
4458
|
function E() {
|
|
4460
4459
|
for (var a = this._X, s = this._C, u = 0; u < 8; u++)
|
|
4461
|
-
|
|
4462
|
-
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 <
|
|
4460
|
+
C[u] = s[u];
|
|
4461
|
+
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 < C[0] >>> 0 ? 1 : 0) | 0, s[2] = s[2] + 886263092 + (s[1] >>> 0 < C[1] >>> 0 ? 1 : 0) | 0, s[3] = s[3] + 1295307597 + (s[2] >>> 0 < C[2] >>> 0 ? 1 : 0) | 0, s[4] = s[4] + 3545052371 + (s[3] >>> 0 < C[3] >>> 0 ? 1 : 0) | 0, s[5] = s[5] + 886263092 + (s[4] >>> 0 < C[4] >>> 0 ? 1 : 0) | 0, s[6] = s[6] + 1295307597 + (s[5] >>> 0 < C[5] >>> 0 ? 1 : 0) | 0, s[7] = s[7] + 3545052371 + (s[6] >>> 0 < C[6] >>> 0 ? 1 : 0) | 0, this._b = s[7] >>> 0 < C[7] >>> 0 ? 1 : 0;
|
|
4463
4462
|
for (var u = 0; u < 8; u++) {
|
|
4464
|
-
var p = a[u] + s[u],
|
|
4463
|
+
var p = a[u] + s[u], h = p & 65535, D = p >>> 16, i = ((h * h >>> 17) + h * D >>> 15) + D * D, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4465
4464
|
x[u] = i ^ o;
|
|
4466
4465
|
}
|
|
4467
4466
|
a[0] = x[0] + (x[7] << 16 | x[7] >>> 16) + (x[6] << 16 | x[6] >>> 16) | 0, a[1] = x[1] + (x[0] << 8 | x[0] >>> 24) + x[7] | 0, a[2] = x[2] + (x[1] << 16 | x[1] >>> 16) + (x[0] << 16 | x[0] >>> 16) | 0, a[3] = x[3] + (x[2] << 8 | x[2] >>> 24) + x[1] | 0, a[4] = x[4] + (x[3] << 16 | x[3] >>> 16) + (x[2] << 16 | x[2] >>> 16) | 0, a[5] = x[5] + (x[4] << 8 | x[4] >>> 24) + x[3] | 0, a[6] = x[6] + (x[5] << 16 | x[5] >>> 16) + (x[4] << 16 | x[4] >>> 16) | 0, a[7] = x[7] + (x[6] << 8 | x[6] >>> 24) + x[5] | 0;
|
|
4468
4467
|
}
|
|
4469
|
-
e.RabbitLegacy =
|
|
4468
|
+
e.RabbitLegacy = v._createHelper(n);
|
|
4470
4469
|
})(), t.RabbitLegacy;
|
|
4471
4470
|
});
|
|
4472
|
-
})(
|
|
4471
|
+
})(cr)), cr.exports;
|
|
4473
4472
|
}
|
|
4474
|
-
var
|
|
4475
|
-
function
|
|
4476
|
-
return De || (De = 1, (function(r,
|
|
4477
|
-
(function(t, e,
|
|
4473
|
+
var fr = { exports: {} }, Px = fr.exports, De;
|
|
4474
|
+
function zx() {
|
|
4475
|
+
return De || (De = 1, (function(r, l) {
|
|
4476
|
+
(function(t, e, c) {
|
|
4478
4477
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4479
|
-
})(
|
|
4478
|
+
})(Px, function(t) {
|
|
4480
4479
|
return (function() {
|
|
4481
|
-
var e = t,
|
|
4482
|
-
const
|
|
4480
|
+
var e = t, c = e.lib, v = c.BlockCipher, y = e.algo;
|
|
4481
|
+
const B = 16, C = [
|
|
4483
4482
|
608135816,
|
|
4484
4483
|
2242054355,
|
|
4485
4484
|
320440878,
|
|
@@ -5536,80 +5535,80 @@ function Px() {
|
|
|
5536
5535
|
pbox: [],
|
|
5537
5536
|
sbox: []
|
|
5538
5537
|
};
|
|
5539
|
-
function E(
|
|
5540
|
-
let i = D >> 24 & 255, o = D >> 16 & 255,
|
|
5541
|
-
return g = g ^
|
|
5538
|
+
function E(h, D) {
|
|
5539
|
+
let i = D >> 24 & 255, o = D >> 16 & 255, d = D >> 8 & 255, b = D & 255, g = h.sbox[0][i] + h.sbox[1][o];
|
|
5540
|
+
return g = g ^ h.sbox[2][d], g = g + h.sbox[3][b], g;
|
|
5542
5541
|
}
|
|
5543
|
-
function a(
|
|
5544
|
-
let o = D,
|
|
5545
|
-
for (let g = 0; g <
|
|
5546
|
-
o = o ^
|
|
5547
|
-
return b = o, o =
|
|
5542
|
+
function a(h, D, i) {
|
|
5543
|
+
let o = D, d = i, b;
|
|
5544
|
+
for (let g = 0; g < B; ++g)
|
|
5545
|
+
o = o ^ h.pbox[g], d = E(h, o) ^ d, b = o, o = d, d = b;
|
|
5546
|
+
return b = o, o = d, d = b, d = d ^ h.pbox[B], o = o ^ h.pbox[B + 1], { left: o, right: d };
|
|
5548
5547
|
}
|
|
5549
|
-
function s(
|
|
5550
|
-
let o = D,
|
|
5551
|
-
for (let g =
|
|
5552
|
-
o = o ^
|
|
5553
|
-
return b = o, o =
|
|
5548
|
+
function s(h, D, i) {
|
|
5549
|
+
let o = D, d = i, b;
|
|
5550
|
+
for (let g = B + 1; g > 1; --g)
|
|
5551
|
+
o = o ^ h.pbox[g], d = E(h, o) ^ d, b = o, o = d, d = b;
|
|
5552
|
+
return b = o, o = d, d = b, d = d ^ h.pbox[1], o = o ^ h.pbox[0], { left: o, right: d };
|
|
5554
5553
|
}
|
|
5555
|
-
function u(
|
|
5556
|
-
for (let
|
|
5557
|
-
|
|
5554
|
+
function u(h, D, i) {
|
|
5555
|
+
for (let _ = 0; _ < 4; _++) {
|
|
5556
|
+
h.sbox[_] = [];
|
|
5558
5557
|
for (let k = 0; k < 256; k++)
|
|
5559
|
-
|
|
5558
|
+
h.sbox[_][k] = x[_][k];
|
|
5560
5559
|
}
|
|
5561
5560
|
let o = 0;
|
|
5562
|
-
for (let
|
|
5563
|
-
|
|
5564
|
-
let
|
|
5565
|
-
for (let
|
|
5566
|
-
g = a(
|
|
5567
|
-
for (let
|
|
5561
|
+
for (let _ = 0; _ < B + 2; _++)
|
|
5562
|
+
h.pbox[_] = C[_] ^ D[o], o++, o >= i && (o = 0);
|
|
5563
|
+
let d = 0, b = 0, g = 0;
|
|
5564
|
+
for (let _ = 0; _ < B + 2; _ += 2)
|
|
5565
|
+
g = a(h, d, b), d = g.left, b = g.right, h.pbox[_] = d, h.pbox[_ + 1] = b;
|
|
5566
|
+
for (let _ = 0; _ < 4; _++)
|
|
5568
5567
|
for (let k = 0; k < 256; k += 2)
|
|
5569
|
-
g = a(
|
|
5568
|
+
g = a(h, d, b), d = g.left, b = g.right, h.sbox[_][k] = d, h.sbox[_][k + 1] = b;
|
|
5570
5569
|
return !0;
|
|
5571
5570
|
}
|
|
5572
|
-
var p =
|
|
5571
|
+
var p = y.Blowfish = v.extend({
|
|
5573
5572
|
_doReset: function() {
|
|
5574
5573
|
if (this._keyPriorReset !== this._key) {
|
|
5575
|
-
var
|
|
5574
|
+
var h = this._keyPriorReset = this._key, D = h.words, i = h.sigBytes / 4;
|
|
5576
5575
|
u(n, D, i);
|
|
5577
5576
|
}
|
|
5578
5577
|
},
|
|
5579
|
-
encryptBlock: function(
|
|
5580
|
-
var i = a(n,
|
|
5581
|
-
|
|
5578
|
+
encryptBlock: function(h, D) {
|
|
5579
|
+
var i = a(n, h[D], h[D + 1]);
|
|
5580
|
+
h[D] = i.left, h[D + 1] = i.right;
|
|
5582
5581
|
},
|
|
5583
|
-
decryptBlock: function(
|
|
5584
|
-
var i = s(n,
|
|
5585
|
-
|
|
5582
|
+
decryptBlock: function(h, D) {
|
|
5583
|
+
var i = s(n, h[D], h[D + 1]);
|
|
5584
|
+
h[D] = i.left, h[D + 1] = i.right;
|
|
5586
5585
|
},
|
|
5587
5586
|
blockSize: 64 / 32,
|
|
5588
5587
|
keySize: 128 / 32,
|
|
5589
5588
|
ivSize: 64 / 32
|
|
5590
5589
|
});
|
|
5591
|
-
e.Blowfish =
|
|
5590
|
+
e.Blowfish = v._createHelper(p);
|
|
5592
5591
|
})(), t.Blowfish;
|
|
5593
5592
|
});
|
|
5594
|
-
})(
|
|
5593
|
+
})(fr)), fr.exports;
|
|
5595
5594
|
}
|
|
5596
|
-
var
|
|
5597
|
-
function
|
|
5598
|
-
return be || (be = 1, (function(r,
|
|
5599
|
-
(function(t, e,
|
|
5600
|
-
r.exports = e(M(),
|
|
5601
|
-
})(
|
|
5595
|
+
var Wx = k0.exports, be;
|
|
5596
|
+
function Ix() {
|
|
5597
|
+
return be || (be = 1, (function(r, l) {
|
|
5598
|
+
(function(t, e, c) {
|
|
5599
|
+
r.exports = e(M(), vr(), $t(), zt(), c0(), Lt(), f0(), Pe(), mr(), Nt(), ze(), Gt(), Xt(), Yt(), _r(), Jt(), o0(), X(), xx(), ax(), ix(), cx(), ux(), lx(), vx(), Bx(), Ex(), Fx(), Dx(), mx(), yx(), kx(), Hx(), $x(), zx());
|
|
5600
|
+
})(Wx, function(t) {
|
|
5602
5601
|
return t;
|
|
5603
5602
|
});
|
|
5604
|
-
})(
|
|
5603
|
+
})(k0)), k0.exports;
|
|
5605
5604
|
}
|
|
5606
|
-
|
|
5605
|
+
Ix();
|
|
5607
5606
|
let We = null, Ie = null, Le = null, Oe = null;
|
|
5608
5607
|
Math.random().toString(36).substring(7);
|
|
5609
|
-
function
|
|
5608
|
+
function Lx(r) {
|
|
5610
5609
|
We = r.token, Ie = r.apiUrl, Le = r.deviceId, Oe = r.domain;
|
|
5611
5610
|
}
|
|
5612
|
-
function
|
|
5611
|
+
function Ox() {
|
|
5613
5612
|
return {
|
|
5614
5613
|
token: We,
|
|
5615
5614
|
apiUrl: Ie,
|
|
@@ -5617,12 +5616,12 @@ function Lx() {
|
|
|
5617
5616
|
domain: Oe
|
|
5618
5617
|
};
|
|
5619
5618
|
}
|
|
5620
|
-
function
|
|
5621
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5619
|
+
function qx(r) {
|
|
5620
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.167`;
|
|
5622
5621
|
}
|
|
5623
|
-
function
|
|
5624
|
-
const t =
|
|
5625
|
-
return new Worker(t, { type: "module", ...
|
|
5622
|
+
function Tx(r, l) {
|
|
5623
|
+
const t = qx(r);
|
|
5624
|
+
return new Worker(t, { type: "module", ...l });
|
|
5626
5625
|
}
|
|
5627
5626
|
const yr = () => {
|
|
5628
5627
|
try {
|
|
@@ -5634,47 +5633,47 @@ const yr = () => {
|
|
|
5634
5633
|
yr();
|
|
5635
5634
|
}, me = (...r) => {
|
|
5636
5635
|
yr();
|
|
5637
|
-
}, _e = /* @__PURE__ */ new Map(),
|
|
5638
|
-
let
|
|
5639
|
-
function
|
|
5640
|
-
const
|
|
5641
|
-
if (
|
|
5642
|
-
const t =
|
|
5636
|
+
}, _e = /* @__PURE__ */ new Map(), gr = /* @__PURE__ */ new Map();
|
|
5637
|
+
let Mx = 0;
|
|
5638
|
+
function Nx(r) {
|
|
5639
|
+
const l = _e.get(r);
|
|
5640
|
+
if (l) return l;
|
|
5641
|
+
const t = Tx("./deform.worker.ts");
|
|
5643
5642
|
try {
|
|
5644
5643
|
t.postMessage({ type: "SET_DEBUG", debugRender: yr() });
|
|
5645
5644
|
} catch {
|
|
5646
5645
|
}
|
|
5647
|
-
t.onmessage = (
|
|
5648
|
-
const { id:
|
|
5649
|
-
_0(`[renderService] deform worker 响应 id=${
|
|
5650
|
-
hasImageBitmap: !!
|
|
5651
|
-
width:
|
|
5652
|
-
height:
|
|
5653
|
-
error:
|
|
5646
|
+
t.onmessage = (c) => {
|
|
5647
|
+
const { id: v, imageBitmap: y, error: B, duration: C } = c.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5648
|
+
_0(`[renderService] deform worker 响应 id=${v}${x}`, {
|
|
5649
|
+
hasImageBitmap: !!y,
|
|
5650
|
+
width: y?.width,
|
|
5651
|
+
height: y?.height,
|
|
5652
|
+
error: B
|
|
5654
5653
|
});
|
|
5655
|
-
const n =
|
|
5654
|
+
const n = gr.get(v);
|
|
5656
5655
|
if (n) {
|
|
5657
|
-
if (
|
|
5658
|
-
n.reject(new Error(
|
|
5656
|
+
if (gr.delete(v), B) {
|
|
5657
|
+
n.reject(new Error(B));
|
|
5659
5658
|
return;
|
|
5660
5659
|
}
|
|
5661
|
-
n.resolve(
|
|
5660
|
+
n.resolve(y);
|
|
5662
5661
|
}
|
|
5663
|
-
}, t.onerror = (
|
|
5662
|
+
}, t.onerror = (c) => {
|
|
5664
5663
|
};
|
|
5665
5664
|
const e = () => {
|
|
5666
|
-
const
|
|
5665
|
+
const c = Ox();
|
|
5667
5666
|
return _0("🔍 [workerManager] 检查 License Token:", {
|
|
5668
|
-
hasToken: !!
|
|
5669
|
-
tokenPreview:
|
|
5667
|
+
hasToken: !!c.token,
|
|
5668
|
+
tokenPreview: c.token ? c.token.substring(0, 20) + "..." : "undefined",
|
|
5670
5669
|
faceId: r,
|
|
5671
5670
|
source: "licenseStore模块"
|
|
5672
|
-
}),
|
|
5671
|
+
}), c.token ? (_0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5673
5672
|
type: "SET_LICENSE",
|
|
5674
|
-
licenseToken:
|
|
5675
|
-
licenseApiUrl:
|
|
5676
|
-
deviceId:
|
|
5677
|
-
domain:
|
|
5673
|
+
licenseToken: c.token,
|
|
5674
|
+
licenseApiUrl: c.apiUrl,
|
|
5675
|
+
deviceId: c.deviceId,
|
|
5676
|
+
domain: c.domain
|
|
5678
5677
|
}), !0) : !1;
|
|
5679
5678
|
};
|
|
5680
5679
|
return e() || (_0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
@@ -5683,16 +5682,16 @@ function Mx(r) {
|
|
|
5683
5682
|
e() || me("⚠️ [workerManager] 第二次等待后 License Token 仍未设置", { faceId: r });
|
|
5684
5683
|
}, 500)), _e.set(r, t), t;
|
|
5685
5684
|
}
|
|
5686
|
-
function
|
|
5685
|
+
function Ux(r) {
|
|
5687
5686
|
return {
|
|
5688
5687
|
name: r.name,
|
|
5689
5688
|
type: r.type,
|
|
5690
5689
|
blendMode: r.blendMode,
|
|
5691
5690
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5692
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5693
|
-
x:
|
|
5694
|
-
y:
|
|
5695
|
-
type:
|
|
5691
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((l) => ({
|
|
5692
|
+
x: l.x,
|
|
5693
|
+
y: l.y,
|
|
5694
|
+
type: l.type
|
|
5696
5695
|
})) : [],
|
|
5697
5696
|
bounds: r.bounds ? {
|
|
5698
5697
|
width: r.bounds.width,
|
|
@@ -5715,30 +5714,30 @@ function Nx(r) {
|
|
|
5715
5714
|
layerOrder: r.layerOrder,
|
|
5716
5715
|
imagePath: r.imagePath,
|
|
5717
5716
|
vectorMask: r.vectorMask ? {
|
|
5718
|
-
paths: r.vectorMask.paths?.map((
|
|
5719
|
-
open:
|
|
5720
|
-
knots:
|
|
5717
|
+
paths: r.vectorMask.paths?.map((l) => ({
|
|
5718
|
+
open: l.open,
|
|
5719
|
+
knots: l.knots?.map((t) => ({
|
|
5721
5720
|
linked: t.linked,
|
|
5722
5721
|
points: [...t.points]
|
|
5723
5722
|
})),
|
|
5724
|
-
fillRule:
|
|
5725
|
-
operation:
|
|
5723
|
+
fillRule: l.fillRule,
|
|
5724
|
+
operation: l.operation
|
|
5726
5725
|
})),
|
|
5727
|
-
points: r.vectorMask.points?.map((
|
|
5728
|
-
x:
|
|
5729
|
-
y:
|
|
5730
|
-
type:
|
|
5726
|
+
points: r.vectorMask.points?.map((l) => ({
|
|
5727
|
+
x: l.x,
|
|
5728
|
+
y: l.y,
|
|
5729
|
+
type: l.type
|
|
5731
5730
|
})),
|
|
5732
5731
|
invert: r.vectorMask.invert,
|
|
5733
5732
|
notLink: r.vectorMask.notLink,
|
|
5734
5733
|
disable: r.vectorMask.disable,
|
|
5735
5734
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5736
5735
|
} : void 0,
|
|
5737
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5738
|
-
type:
|
|
5739
|
-
enabled:
|
|
5740
|
-
filter:
|
|
5741
|
-
puppetShapeList:
|
|
5736
|
+
filterList: r.filterList ? r.filterList.map((l) => ({
|
|
5737
|
+
type: l.type,
|
|
5738
|
+
enabled: l.enabled,
|
|
5739
|
+
filter: l.filter ? {
|
|
5740
|
+
puppetShapeList: l.filter.puppetShapeList?.map((t) => ({
|
|
5742
5741
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5743
5742
|
x: e.x,
|
|
5744
5743
|
y: e.y
|
|
@@ -5755,33 +5754,33 @@ function Nx(r) {
|
|
|
5755
5754
|
clipping: r.clipping
|
|
5756
5755
|
};
|
|
5757
5756
|
}
|
|
5758
|
-
function
|
|
5759
|
-
const
|
|
5760
|
-
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((
|
|
5761
|
-
|
|
5757
|
+
function jx(r, l, t, e) {
|
|
5758
|
+
const c = ++Mx, v = Nx(t);
|
|
5759
|
+
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((y, B) => {
|
|
5760
|
+
gr.set(c, {
|
|
5762
5761
|
resolve: (x) => {
|
|
5763
|
-
performance.now(), (/* @__PURE__ */ new Date()).toISOString(),
|
|
5762
|
+
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), y(x);
|
|
5764
5763
|
},
|
|
5765
|
-
reject:
|
|
5764
|
+
reject: B
|
|
5766
5765
|
});
|
|
5767
|
-
const
|
|
5768
|
-
|
|
5766
|
+
const C = Ux(l);
|
|
5767
|
+
v.postMessage({ id: c, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5769
5768
|
r
|
|
5770
5769
|
]);
|
|
5771
5770
|
});
|
|
5772
5771
|
}
|
|
5773
|
-
async function
|
|
5774
|
-
const
|
|
5775
|
-
if (!
|
|
5772
|
+
async function Gx(r, l, t = 0, e, c, v) {
|
|
5773
|
+
const y = await Dt(r, c, v);
|
|
5774
|
+
if (!y || y.width === 0 || y.height === 0)
|
|
5776
5775
|
throw new Error("图片无效:尺寸为 0");
|
|
5777
|
-
return await
|
|
5776
|
+
return await jx(y, l, t, e);
|
|
5778
5777
|
}
|
|
5779
|
-
function h0(r,
|
|
5778
|
+
function h0(r, l) {
|
|
5780
5779
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5781
|
-
return new OffscreenCanvas(r,
|
|
5780
|
+
return new OffscreenCanvas(r, l);
|
|
5782
5781
|
if (typeof document < "u") {
|
|
5783
5782
|
const t = document.createElement("canvas");
|
|
5784
|
-
return t.width = r, t.height =
|
|
5783
|
+
return t.width = r, t.height = l, t;
|
|
5785
5784
|
} else
|
|
5786
5785
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5787
5786
|
}
|
|
@@ -5789,145 +5788,145 @@ function g0(r) {
|
|
|
5789
5788
|
return r.getContext("2d");
|
|
5790
5789
|
}
|
|
5791
5790
|
function ye(r) {
|
|
5792
|
-
const
|
|
5793
|
-
if (!
|
|
5791
|
+
const l = g0(r);
|
|
5792
|
+
if (!l)
|
|
5794
5793
|
throw new Error("无法创建 canvas context");
|
|
5795
|
-
return
|
|
5794
|
+
return l;
|
|
5796
5795
|
}
|
|
5797
|
-
async function
|
|
5798
|
-
const
|
|
5796
|
+
async function Kx(r) {
|
|
5797
|
+
const l = performance.now(), t = () => {
|
|
5799
5798
|
try {
|
|
5800
5799
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5801
5800
|
} catch {
|
|
5802
5801
|
}
|
|
5803
5802
|
return !1;
|
|
5804
|
-
}, e = (...
|
|
5803
|
+
}, e = (...f) => {
|
|
5805
5804
|
t();
|
|
5806
|
-
},
|
|
5805
|
+
}, c = (...f) => {
|
|
5807
5806
|
t();
|
|
5808
5807
|
}, {
|
|
5809
|
-
psdJson:
|
|
5810
|
-
materialList:
|
|
5811
|
-
fabricScreenshotList:
|
|
5812
|
-
width:
|
|
5808
|
+
psdJson: v,
|
|
5809
|
+
materialList: y,
|
|
5810
|
+
fabricScreenshotList: B,
|
|
5811
|
+
width: C,
|
|
5813
5812
|
height: x,
|
|
5814
5813
|
baseUrl: n
|
|
5815
5814
|
} = r, E = r.maxImageSize;
|
|
5816
5815
|
e("[renderByJson] 接收到的数据:", {
|
|
5817
|
-
psdJsonLayerCount:
|
|
5818
|
-
psdJsonLayers:
|
|
5819
|
-
name:
|
|
5820
|
-
type:
|
|
5821
|
-
id:
|
|
5822
|
-
hasChildren: !!
|
|
5823
|
-
childrenCount:
|
|
5824
|
-
children:
|
|
5816
|
+
psdJsonLayerCount: v.layerList?.length || 0,
|
|
5817
|
+
psdJsonLayers: v.layerList?.map((f) => ({
|
|
5818
|
+
name: f.name,
|
|
5819
|
+
type: f.type,
|
|
5820
|
+
id: f.id,
|
|
5821
|
+
hasChildren: !!f.children,
|
|
5822
|
+
childrenCount: f.children?.length || 0,
|
|
5823
|
+
children: f.children?.map((A) => ({
|
|
5825
5824
|
name: A.name,
|
|
5826
5825
|
type: A.type,
|
|
5827
5826
|
isSmartObject: A.isSmartObject,
|
|
5828
5827
|
id: A.id
|
|
5829
5828
|
}))
|
|
5830
5829
|
})),
|
|
5831
|
-
fabricScreenshotListCount:
|
|
5832
|
-
fabricScreenshotList:
|
|
5830
|
+
fabricScreenshotListCount: B.length,
|
|
5831
|
+
fabricScreenshotList: B.map((f) => ({ id: f.id, url: f.url.substring(0, 50) + "..." }))
|
|
5833
5832
|
});
|
|
5834
|
-
const a = (
|
|
5835
|
-
if (!
|
|
5836
|
-
if (/^(https?:)?\/\//i.test(
|
|
5837
|
-
return
|
|
5833
|
+
const a = (f) => {
|
|
5834
|
+
if (!f || typeof f != "string" || !f.includes("http")) return;
|
|
5835
|
+
if (/^(https?:)?\/\//i.test(f) || f.startsWith("data:") || f.startsWith("blob:"))
|
|
5836
|
+
return f;
|
|
5838
5837
|
if (!n)
|
|
5839
|
-
return !
|
|
5838
|
+
return !f.includes("http") && !f.startsWith("data:") && !f.startsWith("blob:") ? void 0 : f;
|
|
5840
5839
|
try {
|
|
5841
|
-
const m = new URL(
|
|
5840
|
+
const m = new URL(f, n).toString();
|
|
5842
5841
|
return !m.includes("http") && !m.startsWith("data:") && !m.startsWith("blob:") ? void 0 : m;
|
|
5843
5842
|
} catch (m) {
|
|
5844
|
-
|
|
5843
|
+
c(`[renderByJson] 解析图片 URL 失败: ${f}`, m);
|
|
5845
5844
|
return;
|
|
5846
5845
|
}
|
|
5847
5846
|
}, s = {}, u = /* @__PURE__ */ new Map();
|
|
5848
|
-
for (const
|
|
5849
|
-
const A =
|
|
5847
|
+
for (const f of y) {
|
|
5848
|
+
const A = f.sourceName || f.layerName;
|
|
5850
5849
|
A && (s[A] = {
|
|
5851
|
-
url:
|
|
5852
|
-
}, u.set(A,
|
|
5853
|
-
url:
|
|
5854
|
-
}), u.set(
|
|
5850
|
+
url: f.url
|
|
5851
|
+
}, u.set(A, f.url)), f.layerName && f.layerName !== A && (s[f.layerName] || (s[f.layerName] = {
|
|
5852
|
+
url: f.url
|
|
5853
|
+
}), u.set(f.layerName, f.url));
|
|
5855
5854
|
}
|
|
5856
5855
|
const p = /* @__PURE__ */ new Map();
|
|
5857
|
-
for (const
|
|
5858
|
-
p.set(
|
|
5859
|
-
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:",
|
|
5860
|
-
name:
|
|
5861
|
-
type:
|
|
5862
|
-
id:
|
|
5863
|
-
hasChildren: !!
|
|
5864
|
-
childrenCount:
|
|
5856
|
+
for (const f of B)
|
|
5857
|
+
p.set(f.id, f.url);
|
|
5858
|
+
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:", v.layerList?.map((f) => ({
|
|
5859
|
+
name: f.name,
|
|
5860
|
+
type: f.type,
|
|
5861
|
+
id: f.id,
|
|
5862
|
+
hasChildren: !!f.children,
|
|
5863
|
+
childrenCount: f.children?.length || 0
|
|
5865
5864
|
})));
|
|
5866
|
-
function
|
|
5867
|
-
const m =
|
|
5868
|
-
if (
|
|
5869
|
-
if (
|
|
5870
|
-
const W =
|
|
5865
|
+
function h(f, A) {
|
|
5866
|
+
const m = f.color || (f.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(f.name) ? f.name : A);
|
|
5867
|
+
if (f.type === "Layer") {
|
|
5868
|
+
if (f.imagePath) {
|
|
5869
|
+
const W = y.find((P) => {
|
|
5871
5870
|
const L = P.sourceName || P.layerName;
|
|
5872
|
-
return !L || !
|
|
5871
|
+
return !L || !f.imagePath ? !1 : L === f.imagePath || L.endsWith(f.imagePath) || f.imagePath.endsWith(L);
|
|
5873
5872
|
});
|
|
5874
|
-
W && (s[
|
|
5873
|
+
W && (s[f.imagePath] = {
|
|
5875
5874
|
url: W.url
|
|
5876
5875
|
});
|
|
5877
5876
|
}
|
|
5878
|
-
if (
|
|
5877
|
+
if (f.name) {
|
|
5879
5878
|
if (m) {
|
|
5880
|
-
const W = `${m}-${
|
|
5879
|
+
const W = `${m}-${f.name}`, P = y.find((L) => {
|
|
5881
5880
|
const I = L.sourceName || L.layerName;
|
|
5882
|
-
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${m}-${
|
|
5881
|
+
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${m}-${f.name}`) : !1;
|
|
5883
5882
|
});
|
|
5884
5883
|
P && (s[W] = {
|
|
5885
5884
|
url: P.url
|
|
5886
5885
|
});
|
|
5887
5886
|
}
|
|
5888
|
-
if (
|
|
5889
|
-
const W =
|
|
5887
|
+
if (f.imagePath && f.name) {
|
|
5888
|
+
const W = f.imagePath.split("/").pop() || f.imagePath, P = y.find((L) => {
|
|
5890
5889
|
const I = L.sourceName || L.layerName;
|
|
5891
5890
|
return I ? (I.split("/").pop() || I) === W : !1;
|
|
5892
5891
|
});
|
|
5893
|
-
P && (s[
|
|
5892
|
+
P && (s[f.imagePath] = {
|
|
5894
5893
|
url: P.url
|
|
5895
5894
|
});
|
|
5896
5895
|
}
|
|
5897
5896
|
}
|
|
5898
5897
|
}
|
|
5899
|
-
if (
|
|
5900
|
-
for (const W of
|
|
5901
|
-
W &&
|
|
5898
|
+
if (f.children)
|
|
5899
|
+
for (const W of f.children)
|
|
5900
|
+
W && h(W, m);
|
|
5902
5901
|
}
|
|
5903
|
-
function D(
|
|
5904
|
-
const m =
|
|
5905
|
-
if (
|
|
5906
|
-
if (e(`[renderByJson] processLayer 检查 Group: name="${
|
|
5902
|
+
function D(f, A) {
|
|
5903
|
+
const m = f.id ?? A;
|
|
5904
|
+
if (f.type === "Group" && m)
|
|
5905
|
+
if (e(`[renderByJson] processLayer 检查 Group: name="${f.name}", id=${m}, hasFabricScreenshot=${p.has(m)}`), p.has(m)) {
|
|
5907
5906
|
const W = p.get(m);
|
|
5908
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${m}, name="${
|
|
5909
|
-
e(`[renderByJson] Group "${
|
|
5910
|
-
for (const P of
|
|
5907
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${m}, name="${f.name}", url=${W.substring(0, 50)}...`), f.children) {
|
|
5908
|
+
e(`[renderByJson] Group "${f.name}" 有 ${f.children.length} 个子图层`);
|
|
5909
|
+
for (const P of f.children)
|
|
5911
5910
|
if (P && P.isSmartObject === !0) {
|
|
5912
5911
|
const L = P?.name || "";
|
|
5913
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = W, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${W.substring(0, 50)}...`)) :
|
|
5912
|
+
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = W, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${W.substring(0, 50)}...`)) : c("[renderByJson] ⚠️ 智能对象没有 name,无法设置 designImage");
|
|
5914
5913
|
}
|
|
5915
5914
|
} else
|
|
5916
|
-
|
|
5915
|
+
c(`[renderByJson] ⚠️ Group id=${m} 没有 children`);
|
|
5917
5916
|
} else
|
|
5918
|
-
e(`[renderByJson] ⚠️ Group id=${m}, name="${
|
|
5919
|
-
if (
|
|
5920
|
-
for (const W of
|
|
5917
|
+
e(`[renderByJson] ⚠️ Group id=${m}, name="${f.name}" 没有匹配的 fabricScreenshot`);
|
|
5918
|
+
if (f.children)
|
|
5919
|
+
for (const W of f.children)
|
|
5921
5920
|
W && D(W, m);
|
|
5922
5921
|
}
|
|
5923
|
-
if (
|
|
5924
|
-
for (const
|
|
5925
|
-
|
|
5926
|
-
if (
|
|
5927
|
-
for (const
|
|
5928
|
-
|
|
5922
|
+
if (v.layerList)
|
|
5923
|
+
for (const f of v.layerList)
|
|
5924
|
+
f && h(f);
|
|
5925
|
+
if (v.layerList)
|
|
5926
|
+
for (const f of v.layerList)
|
|
5927
|
+
f && D(f);
|
|
5929
5928
|
const o = nt([{
|
|
5930
|
-
psdJson:
|
|
5929
|
+
psdJson: v,
|
|
5931
5930
|
layerExtrasByName: s
|
|
5932
5931
|
}], {
|
|
5933
5932
|
parts: [],
|
|
@@ -5935,19 +5934,19 @@ async function Gx(r) {
|
|
|
5935
5934
|
});
|
|
5936
5935
|
if (!o.models || o.models.length === 0)
|
|
5937
5936
|
throw new Error("无法解析 JSON 数据");
|
|
5938
|
-
const
|
|
5939
|
-
if (!
|
|
5937
|
+
const d = o.models[0];
|
|
5938
|
+
if (!d.psdPartData)
|
|
5940
5939
|
throw new Error("JSON 数据中没有 psdPartData");
|
|
5941
|
-
const b =
|
|
5942
|
-
if (
|
|
5943
|
-
return s[
|
|
5944
|
-
if (
|
|
5945
|
-
const A =
|
|
5940
|
+
const b = d.width, g = d.height, _ = h0(b, g), k = ye(_), $ = [], F = (f) => {
|
|
5941
|
+
if (f.url && s[f.url])
|
|
5942
|
+
return s[f.url];
|
|
5943
|
+
if (f.url) {
|
|
5944
|
+
const A = f.url.split("/").pop() || f.url;
|
|
5946
5945
|
if (s[A])
|
|
5947
5946
|
return s[A];
|
|
5948
|
-
const m =
|
|
5947
|
+
const m = y.find((W) => {
|
|
5949
5948
|
const P = W.sourceName || W.layerName;
|
|
5950
|
-
return !P || !
|
|
5949
|
+
return !P || !f.url ? !1 : (P.split("/").pop() || P) === A || P === f.url || P.endsWith(f.url) || f.url.endsWith(P);
|
|
5951
5950
|
});
|
|
5952
5951
|
if (m) {
|
|
5953
5952
|
const W = m.sourceName || m.layerName;
|
|
@@ -5956,23 +5955,23 @@ async function Gx(r) {
|
|
|
5956
5955
|
}
|
|
5957
5956
|
}
|
|
5958
5957
|
};
|
|
5959
|
-
for (let
|
|
5960
|
-
const A =
|
|
5958
|
+
for (let f = 0; f < d.psdPartData.length; f++) {
|
|
5959
|
+
const A = d.psdPartData[f], m = F(A);
|
|
5961
5960
|
if (A.type === D0.Layer) {
|
|
5962
5961
|
if (!m || !m.url) {
|
|
5963
|
-
|
|
5962
|
+
c(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5964
5963
|
continue;
|
|
5965
5964
|
}
|
|
5966
5965
|
const W = m.url, P = a(W);
|
|
5967
5966
|
if (!P) {
|
|
5968
|
-
|
|
5967
|
+
c(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5969
5968
|
continue;
|
|
5970
5969
|
}
|
|
5971
5970
|
$.push({
|
|
5972
|
-
index:
|
|
5971
|
+
index: f,
|
|
5973
5972
|
type: "layer",
|
|
5974
5973
|
partData: A,
|
|
5975
|
-
promise:
|
|
5974
|
+
promise: bt(P, E, n).catch((L) => null)
|
|
5976
5975
|
});
|
|
5977
5976
|
} else if (A.type === D0.Group) {
|
|
5978
5977
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
@@ -5985,8 +5984,8 @@ async function Gx(r) {
|
|
|
5985
5984
|
if (!L && P.imagePath && (L = s[P.imagePath], !L)) {
|
|
5986
5985
|
const K = P.imagePath.split("/").pop() || P.imagePath;
|
|
5987
5986
|
if (L = s[K], !L) {
|
|
5988
|
-
const G =
|
|
5989
|
-
const r0 =
|
|
5987
|
+
const G = y.find((Z) => {
|
|
5988
|
+
const r0 = Z.sourceName || Z.layerName;
|
|
5990
5989
|
return !r0 || !P.imagePath ? !1 : (r0.split("/").pop() || r0) === K || r0 === P.imagePath || r0.endsWith(P.imagePath) || P.imagePath.endsWith(r0);
|
|
5991
5990
|
});
|
|
5992
5991
|
G && (L = { url: G.url });
|
|
@@ -6004,17 +6003,17 @@ async function Gx(r) {
|
|
|
6004
6003
|
continue;
|
|
6005
6004
|
I = G;
|
|
6006
6005
|
}
|
|
6007
|
-
const
|
|
6006
|
+
const Y = (A.partId ?? A.id) * 100 + W, Q = ot(at(P)), i0 = { width: b, height: g };
|
|
6008
6007
|
$.push({
|
|
6009
|
-
index:
|
|
6008
|
+
index: f + W * 0.01,
|
|
6010
6009
|
type: "group",
|
|
6011
6010
|
partData: A,
|
|
6012
6011
|
smartObject: P,
|
|
6013
6012
|
maskData: Q,
|
|
6014
|
-
promise:
|
|
6013
|
+
promise: Gx(
|
|
6015
6014
|
I,
|
|
6016
6015
|
P,
|
|
6017
|
-
|
|
6016
|
+
Y,
|
|
6018
6017
|
i0,
|
|
6019
6018
|
E,
|
|
6020
6019
|
n
|
|
@@ -6023,18 +6022,18 @@ async function Gx(r) {
|
|
|
6023
6022
|
}
|
|
6024
6023
|
}
|
|
6025
6024
|
}
|
|
6026
|
-
const w = await Promise.all($.map((
|
|
6027
|
-
task:
|
|
6025
|
+
const w = await Promise.all($.map((f) => f.promise)), H = $.map((f, A) => ({
|
|
6026
|
+
task: f,
|
|
6028
6027
|
imageBitmap: w[A]
|
|
6029
|
-
})).sort((
|
|
6030
|
-
const m =
|
|
6028
|
+
})).sort((f, A) => {
|
|
6029
|
+
const m = f.task.type === "group" && f.task.smartObject?.layerOrder !== void 0 ? f.task.smartObject.layerOrder : f.task.partData.layerOrder ?? f.task.index, W = A.task.type === "group" && A.task.smartObject?.layerOrder !== void 0 ? A.task.smartObject.layerOrder : A.task.partData.layerOrder ?? A.task.index;
|
|
6031
6030
|
return m - W;
|
|
6032
6031
|
});
|
|
6033
6032
|
let R = h0(b, g), z = g0(R), O = !1, q = "normal";
|
|
6034
|
-
for (let
|
|
6035
|
-
const { task: A, imageBitmap: m } = H[
|
|
6033
|
+
for (let f = 0; f < H.length; f++) {
|
|
6034
|
+
const { task: A, imageBitmap: m } = H[f];
|
|
6036
6035
|
if (!m) {
|
|
6037
|
-
|
|
6036
|
+
c(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
6038
6037
|
continue;
|
|
6039
6038
|
}
|
|
6040
6039
|
const { partData: W } = A, P = W.bounds;
|
|
@@ -6042,11 +6041,11 @@ async function Gx(r) {
|
|
|
6042
6041
|
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? W.opacity : L = W.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
6043
6042
|
let I;
|
|
6044
6043
|
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ?? W.clipping === !0 : I = W.clipping === !0;
|
|
6045
|
-
const
|
|
6044
|
+
const Y = H[f + 1];
|
|
6046
6045
|
let Q = !1;
|
|
6047
|
-
if (
|
|
6048
|
-
const K =
|
|
6049
|
-
|
|
6046
|
+
if (Y) {
|
|
6047
|
+
const K = Y.task.partData;
|
|
6048
|
+
Y.task.type === "group" && Y.task.smartObject ? Q = Y.task.smartObject.clipping ?? K.clipping === !0 : Q = K.clipping === !0;
|
|
6050
6049
|
}
|
|
6051
6050
|
const i0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : W?.name || "未命名图层";
|
|
6052
6051
|
if (e(`[renderByJson] 绘制图层 "${i0}"`, {
|
|
@@ -6062,7 +6061,7 @@ async function Gx(r) {
|
|
|
6062
6061
|
if (z.clearRect(0, 0, b, g), z.globalCompositeOperation = "source-over", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6063
6062
|
if (A.maskData) {
|
|
6064
6063
|
const K = h0(b, g), G = g0(K);
|
|
6065
|
-
G && (G.drawImage(m, 0, 0),
|
|
6064
|
+
G && (G.drawImage(m, 0, 0), Br(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6066
6065
|
} else
|
|
6067
6066
|
z.drawImage(m, 0, 0);
|
|
6068
6067
|
else A.type === "layer" && (P ? z.drawImage(
|
|
@@ -6079,7 +6078,7 @@ async function Gx(r) {
|
|
|
6079
6078
|
if (z.globalCompositeOperation = "source-atop", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6080
6079
|
if (A.maskData) {
|
|
6081
6080
|
const K = h0(b, g), G = g0(K);
|
|
6082
|
-
G && (G.drawImage(m, 0, 0),
|
|
6081
|
+
G && (G.drawImage(m, 0, 0), Br(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6083
6082
|
} else
|
|
6084
6083
|
z.drawImage(m, 0, 0);
|
|
6085
6084
|
else A.type === "layer" && (P ? z.drawImage(
|
|
@@ -6095,7 +6094,7 @@ async function Gx(r) {
|
|
|
6095
6094
|
if (k.globalCompositeOperation = Mr(W.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6096
6095
|
if (A.maskData) {
|
|
6097
6096
|
const K = h0(b, g), G = g0(K);
|
|
6098
|
-
G && (G.drawImage(m, 0, 0),
|
|
6097
|
+
G && (G.drawImage(m, 0, 0), Br(G, A.maskData), k.drawImage(K, 0, 0));
|
|
6099
6098
|
} else
|
|
6100
6099
|
k.drawImage(m, 0, 0);
|
|
6101
6100
|
else A.type === "layer" && (P ? k.drawImage(
|
|
@@ -6110,22 +6109,22 @@ async function Gx(r) {
|
|
|
6110
6109
|
O && !Q && (k.globalCompositeOperation = Mr(q), k.drawImage(R, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6111
6110
|
}
|
|
6112
6111
|
R = null, z = null;
|
|
6113
|
-
let U =
|
|
6114
|
-
if (
|
|
6115
|
-
if (
|
|
6116
|
-
T =
|
|
6117
|
-
else if (
|
|
6118
|
-
const A =
|
|
6119
|
-
T =
|
|
6112
|
+
let U = _, T = b, N = g;
|
|
6113
|
+
if (C !== void 0 || x !== void 0) {
|
|
6114
|
+
if (C !== void 0 && x !== void 0)
|
|
6115
|
+
T = C, N = x;
|
|
6116
|
+
else if (C !== void 0) {
|
|
6117
|
+
const A = C / b;
|
|
6118
|
+
T = C, N = Math.round(g * A);
|
|
6120
6119
|
} else if (x !== void 0) {
|
|
6121
6120
|
const A = x / g;
|
|
6122
6121
|
T = Math.round(b * A), N = x;
|
|
6123
6122
|
}
|
|
6124
6123
|
U = h0(T, N);
|
|
6125
|
-
const
|
|
6126
|
-
|
|
6124
|
+
const f = ye(U);
|
|
6125
|
+
f.imageSmoothingEnabled = !0, f.imageSmoothingQuality = "high", f.drawImage(_, 0, 0, b, g, 0, 0, T, N), e(`[renderByJson] 已缩放结果: ${b}x${g} -> ${T}x${N}`);
|
|
6127
6126
|
}
|
|
6128
|
-
const S = performance.now() -
|
|
6127
|
+
const S = performance.now() - l;
|
|
6129
6128
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6130
6129
|
canvas: U,
|
|
6131
6130
|
width: T,
|
|
@@ -6133,42 +6132,42 @@ async function Gx(r) {
|
|
|
6133
6132
|
};
|
|
6134
6133
|
}
|
|
6135
6134
|
const qe = async (r) => {
|
|
6136
|
-
const t = (await
|
|
6135
|
+
const t = (await Kx(r)).canvas;
|
|
6137
6136
|
return t ? createImageBitmap(t) : null;
|
|
6138
6137
|
};
|
|
6139
|
-
let s0 = null,
|
|
6138
|
+
let s0 = null, Ar = !1;
|
|
6140
6139
|
const Te = async () => {
|
|
6141
|
-
if (!
|
|
6142
|
-
|
|
6140
|
+
if (!Ar) {
|
|
6141
|
+
Ar = !0;
|
|
6143
6142
|
try {
|
|
6144
6143
|
for (; s0; ) {
|
|
6145
6144
|
const r = s0;
|
|
6146
6145
|
s0 = null;
|
|
6147
6146
|
try {
|
|
6148
|
-
const
|
|
6147
|
+
const l = await qe(r.renderData);
|
|
6149
6148
|
if (s0) {
|
|
6150
|
-
|
|
6149
|
+
l?.close?.();
|
|
6151
6150
|
continue;
|
|
6152
6151
|
}
|
|
6153
|
-
self.postMessage({ id: r.id, bitmap:
|
|
6154
|
-
} catch (
|
|
6152
|
+
self.postMessage({ id: r.id, bitmap: l }, l ? [l] : []);
|
|
6153
|
+
} catch (l) {
|
|
6155
6154
|
if (s0) continue;
|
|
6156
6155
|
self.postMessage({
|
|
6157
6156
|
id: r.id,
|
|
6158
|
-
error:
|
|
6157
|
+
error: l instanceof Error ? l.message : String(l)
|
|
6159
6158
|
});
|
|
6160
6159
|
}
|
|
6161
6160
|
}
|
|
6162
6161
|
} finally {
|
|
6163
|
-
|
|
6162
|
+
Ar = !1, s0 && Te();
|
|
6164
6163
|
}
|
|
6165
6164
|
}
|
|
6166
6165
|
};
|
|
6167
6166
|
self.onmessage = async (r) => {
|
|
6168
|
-
const
|
|
6169
|
-
if (
|
|
6170
|
-
const e =
|
|
6171
|
-
|
|
6167
|
+
const l = r.data;
|
|
6168
|
+
if (l && typeof l == "object" && "type" in l && l.type === "SET_LICENSE") {
|
|
6169
|
+
const e = l;
|
|
6170
|
+
Lx({
|
|
6172
6171
|
token: e.licenseToken,
|
|
6173
6172
|
apiUrl: e.licenseApiUrl,
|
|
6174
6173
|
deviceId: e.deviceId,
|
|
@@ -6176,7 +6175,7 @@ self.onmessage = async (r) => {
|
|
|
6176
6175
|
});
|
|
6177
6176
|
return;
|
|
6178
6177
|
}
|
|
6179
|
-
const t =
|
|
6178
|
+
const t = l;
|
|
6180
6179
|
if (t.coalesce === !0) {
|
|
6181
6180
|
s0 = { id: t.id, renderData: t.renderData }, Te();
|
|
6182
6181
|
return;
|