@jieyin/editor-sdk-test 1.1.164 → 1.1.166
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/editor-sdk.es.js +13650 -8129
- package/dist/renderWorker.js +1399 -1357
- package/dist/style.css +1 -1
- package/package.json +3 -2
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
let
|
|
1
|
+
var D0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(D0 || {});
|
|
2
|
+
function rt(r) {
|
|
3
|
+
let d = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = d;
|
|
6
|
+
return d += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function et(r, d) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,131 +23,131 @@ function Ve(r, v) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? d,
|
|
27
27
|
filterList: r.filterList,
|
|
28
28
|
opacity: r.opacity,
|
|
29
29
|
clipping: r.clipping
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
function
|
|
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 tt(r, d, t, e) {
|
|
33
|
+
let c = r.name || "", v = d[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 = d[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
|
-
type:
|
|
46
|
+
type: D0.Group,
|
|
47
47
|
smartObjects: (r.children ?? []).map(
|
|
48
|
-
(x) =>
|
|
48
|
+
(x) => et(x, r.vectorMask)
|
|
49
49
|
),
|
|
50
50
|
opacity: r.opacity,
|
|
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
|
-
type:
|
|
61
|
-
url:
|
|
60
|
+
type: D0.Layer,
|
|
61
|
+
url: C,
|
|
62
62
|
opacity: r.opacity,
|
|
63
63
|
clipping: r.clipping,
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function xt(r, d) {
|
|
68
|
+
const t = new Map(d.parts.map((c) => [c.name, c.id])), e = rt(d.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
71
|
-
models: r.map((
|
|
72
|
-
const
|
|
73
|
-
if (!
|
|
74
|
-
throw new Error(`无法获取 PSD 画布尺寸: canvasWidth=${
|
|
70
|
+
parts: d.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
|
-
const
|
|
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, l) => {
|
|
80
|
+
const b = o.layerOrder ?? 0, g = l.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
|
-
|
|
95
|
-
return
|
|
96
|
-
}, a = n(
|
|
97
|
-
(s) =>
|
|
94
|
+
u.push(p);
|
|
95
|
+
return u;
|
|
96
|
+
}, a = n(B).map(
|
|
97
|
+
(s) => tt(s, v, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
|
-
width:
|
|
100
|
+
width: C,
|
|
101
101
|
height: x,
|
|
102
102
|
psdPartData: a
|
|
103
103
|
};
|
|
104
104
|
})
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function nt(r) {
|
|
108
108
|
return r ? r.vectorMask && r.vectorMask.paths && Array.isArray(r.vectorMask.paths) ? { type: "bezier", paths: r.vectorMask.paths } : Array.isArray(r.vectorMask) ? { type: "simple", points: r.vectorMask } : null : null;
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function at(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((d) => ({
|
|
114
|
+
open: !!d.open,
|
|
115
|
+
knots: d.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((d) => ({
|
|
123
|
+
x: d.x,
|
|
124
|
+
y: d.y,
|
|
125
|
+
type: d.type
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
131
|
-
if (r.globalCompositeOperation = "destination-in", r.beginPath(),
|
|
132
|
-
|
|
129
|
+
function pr(r, d) {
|
|
130
|
+
if (d) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), d.type === "bezier" && Array.isArray(d.paths))
|
|
132
|
+
d.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
|
|
145
|
-
r.bezierCurveTo(x, n, E, a, s,
|
|
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
|
+
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 (d.type === "simple" && Array.isArray(d.points)) {
|
|
150
|
+
const t = d.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);
|
|
@@ -156,15 +156,15 @@ function hr(r, v) {
|
|
|
156
156
|
r.fillStyle = "#000", r.fill(), r.globalCompositeOperation = "source-over";
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
class
|
|
159
|
+
class p0 {
|
|
160
160
|
static hasStorage = typeof window < "u" && typeof localStorage < "u";
|
|
161
161
|
/**
|
|
162
162
|
* 获取存储项
|
|
163
163
|
*/
|
|
164
|
-
static getItem(
|
|
164
|
+
static getItem(d) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(d);
|
|
168
168
|
} catch {
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
@@ -172,10 +172,10 @@ class v0 {
|
|
|
172
172
|
/**
|
|
173
173
|
* 设置存储项
|
|
174
174
|
*/
|
|
175
|
-
static setItem(
|
|
175
|
+
static setItem(d, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(d, t), !0;
|
|
179
179
|
} catch {
|
|
180
180
|
return !1;
|
|
181
181
|
}
|
|
@@ -183,10 +183,10 @@ class v0 {
|
|
|
183
183
|
/**
|
|
184
184
|
* 移除存储项
|
|
185
185
|
*/
|
|
186
|
-
static removeItem(
|
|
186
|
+
static removeItem(d) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(d), !0;
|
|
190
190
|
} catch {
|
|
191
191
|
return !1;
|
|
192
192
|
}
|
|
@@ -209,7 +209,7 @@ class v0 {
|
|
|
209
209
|
return this.hasStorage;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
class
|
|
212
|
+
class dr {
|
|
213
213
|
/**
|
|
214
214
|
* 是否在浏览器环境
|
|
215
215
|
*/
|
|
@@ -247,14 +247,14 @@ class ur {
|
|
|
247
247
|
return this.isBrowser() ? window.location.origin : "http://localhost";
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
class
|
|
250
|
+
class v0 {
|
|
251
251
|
/**
|
|
252
252
|
* 安全地解析 URL
|
|
253
253
|
*/
|
|
254
|
-
static parse(
|
|
254
|
+
static parse(d) {
|
|
255
255
|
try {
|
|
256
|
-
const t =
|
|
257
|
-
return new URL(
|
|
256
|
+
const t = dr.getOrigin();
|
|
257
|
+
return new URL(d, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,246 +262,287 @@ class h0 {
|
|
|
262
262
|
/**
|
|
263
263
|
* 添加查询参数
|
|
264
264
|
*/
|
|
265
|
-
static addParam(
|
|
266
|
-
const
|
|
267
|
-
return !
|
|
265
|
+
static addParam(d, t, e) {
|
|
266
|
+
const c = this.parse(d);
|
|
267
|
+
return !c || c.searchParams.has(t) ? d : (c.searchParams.set(t, e), this.formatUrl(d, 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(d, t) {
|
|
273
|
+
const e = this.parse(d);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? d : (e.searchParams.delete(t), this.formatUrl(d, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(d, t) {
|
|
280
|
+
return this.parse(d)?.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(d, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(d), c = d.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(d) {
|
|
293
|
+
return d?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(d) {
|
|
299
|
+
return d?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
const t = cr, e = r();
|
|
302
|
+
(function(r, d) {
|
|
303
|
+
const t = r0, e = r();
|
|
305
304
|
for (; ; )
|
|
306
305
|
try {
|
|
307
|
-
if (parseInt(t(
|
|
306
|
+
if (-parseInt(t(141)) / 1 * (parseInt(t(140)) / 2) + parseInt(t(149)) / 3 + -parseInt(t(137)) / 4 * (-parseInt(t(153)) / 5) + -parseInt(t(139)) / 6 + -parseInt(t(159)) / 7 + -parseInt(t(132)) / 8 * (-parseInt(t(146)) / 9) + parseInt(t(172)) / 10 === d) break;
|
|
308
307
|
e.push(e.shift());
|
|
309
308
|
} catch {
|
|
310
309
|
e.push(e.shift());
|
|
311
310
|
}
|
|
312
|
-
})(
|
|
313
|
-
const
|
|
311
|
+
})(ur, -71774 + -16661 * -20 + -10672);
|
|
312
|
+
const F0 = /* @__PURE__ */ (function() {
|
|
314
313
|
let r = !0;
|
|
315
|
-
return function(
|
|
314
|
+
return function(d, t) {
|
|
316
315
|
const e = r ? function() {
|
|
316
|
+
const c = r0;
|
|
317
317
|
if (t) {
|
|
318
|
-
const
|
|
319
|
-
return t = null,
|
|
318
|
+
const v = t[c(148)](d, arguments);
|
|
319
|
+
return t = null, v;
|
|
320
320
|
}
|
|
321
321
|
} : function() {
|
|
322
322
|
};
|
|
323
323
|
return r = !1, e;
|
|
324
324
|
};
|
|
325
|
-
})(),
|
|
326
|
-
const r =
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
const m = A0[r(291) + "ructor"].prototype.bind(A0), C = u[h], B = e[C] || m;
|
|
338
|
-
m.__proto__ = A0[r(285)](A0), m.toString = B.toString.bind(B), e[C] = m;
|
|
325
|
+
})(), ot = F0(void 0, function() {
|
|
326
|
+
const r = r0;
|
|
327
|
+
let d;
|
|
328
|
+
try {
|
|
329
|
+
d = Function("retur" + r(164) + "nction() " + ("{}.co" + r(135) + "ctor(" + r(161) + "rn th" + r(150) + " )") + ");")();
|
|
330
|
+
} catch {
|
|
331
|
+
d = window;
|
|
332
|
+
}
|
|
333
|
+
const t = d.console = d.console || {}, e = ["log", "warn", "info", r(157), "exception", "table", r(171)];
|
|
334
|
+
for (let c = -1468 + -3 * -314 + 2 * 263; c < e.length; c++) {
|
|
335
|
+
const v = F0[r(134) + r(151) + "r"].prototype[r(131)](F0), y = e[c], B = t[y] || v;
|
|
336
|
+
v["__pro" + r(169)] = F0[r(131)](F0), v[r(163) + r(166)] = B.toString.bind(B), t[y] = v;
|
|
339
337
|
}
|
|
340
338
|
});
|
|
341
|
-
|
|
342
|
-
const
|
|
343
|
-
function
|
|
344
|
-
return
|
|
339
|
+
ot();
|
|
340
|
+
const gr = "file_token", Dr = "file_token_expire_time", it = (9717 + 285 * 9 + -9 * 1358) * 1e3;
|
|
341
|
+
function Ar() {
|
|
342
|
+
return p0.getItem(gr);
|
|
345
343
|
}
|
|
346
|
-
function
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
344
|
+
function st(r = it) {
|
|
345
|
+
const d = r0;
|
|
346
|
+
if (!Ar()) return !0;
|
|
347
|
+
const e = p0.getItem(Dr);
|
|
348
|
+
if (!e) return !1;
|
|
349
|
+
const c = Number(e);
|
|
350
|
+
return Date[d(170)]() + r > c;
|
|
352
351
|
}
|
|
353
|
-
function
|
|
354
|
-
|
|
355
|
-
const t = Date.now() + v * 1e3;
|
|
356
|
-
v0.setItem(Fr, String(t));
|
|
357
|
-
}
|
|
352
|
+
function r0(r, d) {
|
|
353
|
+
return r = r - (-3 * -1499 + -3168 + -1198), ur()[r];
|
|
358
354
|
}
|
|
359
|
-
function
|
|
360
|
-
|
|
355
|
+
function ct(r, d) {
|
|
356
|
+
if (p0.setItem(gr, r), typeof d == "number" && d > 64 + 1766 * 3 + -5362 * 1) {
|
|
357
|
+
const t = Date.now() + d * 1e3;
|
|
358
|
+
p0.setItem(Dr, String(t));
|
|
359
|
+
}
|
|
361
360
|
}
|
|
362
|
-
function
|
|
363
|
-
|
|
361
|
+
function ft() {
|
|
362
|
+
const r = r0;
|
|
363
|
+
p0["remov" + r(152)](gr), p0["remov" + r(152)](Dr), At();
|
|
364
364
|
}
|
|
365
|
-
async function
|
|
366
|
-
const
|
|
367
|
-
return t?.
|
|
365
|
+
async function Or(r) {
|
|
366
|
+
const d = r0, t = await r(), e = t?.data?.data;
|
|
367
|
+
return t?.[d(154)]?.code === 1 * 6899 + -1 * -2571 + -9270 && e?.["file_token"] ? (ct(e.file_token, e["expir" + d(168)]), e.file_token) : null;
|
|
368
368
|
}
|
|
369
|
-
let
|
|
370
|
-
function
|
|
371
|
-
return
|
|
369
|
+
let ut = null;
|
|
370
|
+
function qr() {
|
|
371
|
+
return dr["isBro" + r0(165)]() ? ut : null;
|
|
372
372
|
}
|
|
373
|
-
async function
|
|
374
|
-
const r =
|
|
375
|
-
if (!
|
|
376
|
-
const
|
|
377
|
-
if (
|
|
373
|
+
async function ye() {
|
|
374
|
+
const r = r0;
|
|
375
|
+
if (!dr["isBro" + r(165)]()) return Ar();
|
|
376
|
+
const d = Ar();
|
|
377
|
+
if (d && !st()) return d;
|
|
378
378
|
try {
|
|
379
|
-
const t = await
|
|
380
|
-
if (
|
|
381
|
-
const e = await
|
|
379
|
+
const t = await qr();
|
|
380
|
+
if (d && t?.[r(173) + "FileTokenR" + r(155) + "h"]) {
|
|
381
|
+
const e = await Or(t.fetchFileTokenRefresh);
|
|
382
382
|
if (e) return e;
|
|
383
383
|
}
|
|
384
384
|
} catch {
|
|
385
385
|
}
|
|
386
386
|
try {
|
|
387
|
-
const t =
|
|
388
|
-
return t?.[
|
|
387
|
+
const t = qr();
|
|
388
|
+
return t?.[r(173) + "FileToken"] ? await Or(t[r(173) + "FileToken"]) : null;
|
|
389
389
|
} catch {
|
|
390
390
|
return null;
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
const
|
|
395
|
-
if (!r ||
|
|
396
|
-
const t =
|
|
397
|
-
return t ? t[
|
|
398
|
-
}
|
|
399
|
-
function ye(r, v) {
|
|
400
|
-
const t = t0;
|
|
401
|
-
return !v || !_e(r) ? r : h0["addPa" + t(271)](r, t(290) + "oken", v);
|
|
393
|
+
function we(r) {
|
|
394
|
+
const d = r0;
|
|
395
|
+
if (!r || v0.isDataUrl(r) || v0[d(142) + "bUrl"](r)) return !1;
|
|
396
|
+
const t = v0.parse(r);
|
|
397
|
+
return t ? t[d(156) + d(167)]["inclu" + d(143)]("/files/") && !v0["hasPa" + d(162)](r, d(138) + "oken") : r[d(158) + d(143)](d(133) + "s/") && !r.includes("fileToken=");
|
|
402
398
|
}
|
|
403
|
-
function
|
|
404
|
-
|
|
399
|
+
function ke(r, d) {
|
|
400
|
+
const t = r0;
|
|
401
|
+
return !d || !we(r) ? r : v0.addParam(r, "fileT" + t(174), d);
|
|
405
402
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
const v = await me();
|
|
409
|
-
return ye(r, v);
|
|
403
|
+
function Se(r) {
|
|
404
|
+
return v0.removeParam(r, "fileToken");
|
|
410
405
|
}
|
|
411
|
-
function
|
|
412
|
-
const r = ["
|
|
413
|
-
return
|
|
406
|
+
function ur() {
|
|
407
|
+
const r = ["toStr", "n (fu", "wser", "ing", "ame", "es_in", "to__", "now", "trace", "274180xuIBcg", "fetch", "oken", "bind", "184568KbatOH", "/file", "const", "nstru", "GET", "4VlMiBZ", "fileT", "11322tEFnXd", "4SYUSJt", "69842fGaWKu", "isBlo", "des", "statu", "clone", "72syupnr", "toUpp", "apply", "1101504ljApGR", 'is")(', "ructo", "eItem", "1012190XTbpxN", "data", "efres", "pathn", "error", "inclu", "2724729CiardZ", "erCas", '"retu', "ram"];
|
|
408
|
+
return ur = function() {
|
|
414
409
|
return r;
|
|
415
|
-
},
|
|
410
|
+
}, ur();
|
|
416
411
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
const
|
|
420
|
-
return
|
|
412
|
+
async function dt(r) {
|
|
413
|
+
if (!we(r)) return r;
|
|
414
|
+
const d = await ye();
|
|
415
|
+
return ke(r, d);
|
|
421
416
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
417
|
+
const Br = /* @__PURE__ */ new Map();
|
|
418
|
+
function lt(r, d) {
|
|
419
|
+
const t = r0;
|
|
420
|
+
return String(t(136))[t(147) + t(160) + "e"]() + "\0" + r;
|
|
421
|
+
}
|
|
422
|
+
async function ht(r, d) {
|
|
423
|
+
const t = r0;
|
|
424
|
+
if (!dr["isBro" + t(165)]()) return fetch(r, d);
|
|
425
|
+
const e = Se(r), c = lt(e);
|
|
426
|
+
let v = Br.get(c);
|
|
427
|
+
return !v && (v = (async () => {
|
|
428
|
+
const B = t;
|
|
428
429
|
try {
|
|
429
|
-
const C = await
|
|
430
|
-
let
|
|
431
|
-
if (B
|
|
432
|
-
|
|
433
|
-
const
|
|
434
|
-
return
|
|
430
|
+
const C = await dt(e);
|
|
431
|
+
let x = await fetch(C, d);
|
|
432
|
+
if (x[B(144) + "s"] !== 401) return x;
|
|
433
|
+
ft();
|
|
434
|
+
const n = await ye(), E = ke(e, n);
|
|
435
|
+
return x = await fetch(E, d), x;
|
|
435
436
|
} finally {
|
|
436
|
-
|
|
437
|
+
Br.delete(c);
|
|
437
438
|
}
|
|
438
|
-
})(),
|
|
439
|
+
})(), Br.set(c, v)), (await v)[t(145)]();
|
|
440
|
+
}
|
|
441
|
+
const vt = 96, pt = 200 * 1024 * 1024, x0 = /* @__PURE__ */ new Map();
|
|
442
|
+
let lr = 0;
|
|
443
|
+
const y0 = /* @__PURE__ */ new Map();
|
|
444
|
+
function Bt(r, d) {
|
|
445
|
+
return `${"GET".toUpperCase()}\0${Se(r)}`;
|
|
439
446
|
}
|
|
440
|
-
|
|
447
|
+
function Ct() {
|
|
448
|
+
const r = x0.keys().next().value;
|
|
449
|
+
if (r === void 0) return;
|
|
450
|
+
const d = x0.get(r);
|
|
451
|
+
x0.delete(r), d && (lr -= d.size);
|
|
452
|
+
}
|
|
453
|
+
function Et(r) {
|
|
454
|
+
for (; x0.size > 0; ) {
|
|
455
|
+
const d = x0.size >= vt, t = lr + r > pt;
|
|
456
|
+
if (!d && !t) break;
|
|
457
|
+
Ct();
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
async function He(r, d) {
|
|
461
|
+
const t = Bt(r), e = x0.get(t);
|
|
462
|
+
if (e)
|
|
463
|
+
return x0.delete(t), x0.set(t, e), e;
|
|
464
|
+
let c = y0.get(t);
|
|
465
|
+
return c || (c = (async () => {
|
|
466
|
+
try {
|
|
467
|
+
const v = await ht(r, d);
|
|
468
|
+
if (!v.ok)
|
|
469
|
+
throw new Error(`fetch failed: ${v.status} ${v.statusText}`);
|
|
470
|
+
const y = await v.blob();
|
|
471
|
+
return Et(y.size), x0.set(t, y), lr += y.size, y;
|
|
472
|
+
} finally {
|
|
473
|
+
y0.delete(t);
|
|
474
|
+
}
|
|
475
|
+
})(), y0.set(t, c), c);
|
|
476
|
+
}
|
|
477
|
+
function At() {
|
|
478
|
+
x0.clear(), y0.clear(), lr = 0;
|
|
479
|
+
}
|
|
480
|
+
const Re = (r, d) => {
|
|
441
481
|
if (!r) return r;
|
|
442
|
-
const t = (
|
|
482
|
+
const t = (d || "").replace(/\/$/, "");
|
|
443
483
|
if (t && r.startsWith(t))
|
|
444
484
|
return r;
|
|
445
485
|
if (typeof window < "u") {
|
|
446
|
-
const
|
|
447
|
-
if (
|
|
486
|
+
const c = window.location.hostname;
|
|
487
|
+
if (c === "localhost" || c === "127.0.0.1")
|
|
448
488
|
try {
|
|
449
|
-
const
|
|
489
|
+
const v = new URL(r);
|
|
450
490
|
if (t)
|
|
451
491
|
try {
|
|
452
|
-
const
|
|
453
|
-
if (
|
|
492
|
+
const y = new URL(t).origin;
|
|
493
|
+
if (v.origin === y)
|
|
454
494
|
return r;
|
|
455
495
|
} catch {
|
|
456
496
|
}
|
|
457
|
-
if (
|
|
458
|
-
return t ? `${t}${
|
|
497
|
+
if (v.pathname.startsWith("/files/"))
|
|
498
|
+
return t ? `${t}${v.pathname}${v.search}${v.hash}` : `${v.pathname}${v.search}${v.hash}`;
|
|
459
499
|
} catch {
|
|
460
500
|
}
|
|
461
501
|
}
|
|
462
502
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
463
503
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
464
504
|
return e ? `/oss${e[2]}` : r;
|
|
465
|
-
},
|
|
505
|
+
}, Ft = (r, d) => {
|
|
466
506
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
467
|
-
return new OffscreenCanvas(r,
|
|
507
|
+
return new OffscreenCanvas(r, d);
|
|
468
508
|
const t = document.createElement("canvas");
|
|
469
|
-
return t.width = r, t.height =
|
|
470
|
-
},
|
|
471
|
-
if (!
|
|
509
|
+
return t.width = r, t.height = d, t;
|
|
510
|
+
}, w0 = async (r, d) => {
|
|
511
|
+
if (!d || d <= 0) return r;
|
|
472
512
|
const t = Math.max(r.width, r.height);
|
|
473
|
-
if (t <=
|
|
474
|
-
const e =
|
|
475
|
-
return
|
|
513
|
+
if (t <= d) return r;
|
|
514
|
+
const e = d / t, c = Math.max(1, Math.round(r.width * e)), v = Math.max(1, Math.round(r.height * e)), y = Ft(c, v), B = y.getContext("2d");
|
|
515
|
+
return B ? (B.drawImage(r, 0, 0, c, v), r.close?.(), await createImageBitmap(y)) : r;
|
|
476
516
|
};
|
|
477
|
-
async function
|
|
517
|
+
async function gt(r, d, t) {
|
|
478
518
|
if (typeof r == "string")
|
|
479
519
|
try {
|
|
480
|
-
const e =
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
520
|
+
const e = Re(r, t);
|
|
521
|
+
let c;
|
|
522
|
+
try {
|
|
523
|
+
c = await He(e);
|
|
524
|
+
} catch {
|
|
525
|
+
throw new Error(`加载图片失败: ${r}`);
|
|
484
526
|
}
|
|
485
|
-
|
|
486
|
-
if (!h.type.startsWith("image/") && h.size === 0)
|
|
527
|
+
if (!c.type.startsWith("image/") && c.size === 0)
|
|
487
528
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
488
529
|
try {
|
|
489
|
-
const
|
|
490
|
-
return await
|
|
491
|
-
} catch (
|
|
492
|
-
throw new Error(`图片解码失败: URL=${r}, 错误=${
|
|
530
|
+
const v = await createImageBitmap(c);
|
|
531
|
+
return await w0(v, d);
|
|
532
|
+
} catch (v) {
|
|
533
|
+
throw new Error(`图片解码失败: URL=${r}, 错误=${v instanceof Error ? v.message : v}`);
|
|
493
534
|
}
|
|
494
535
|
} catch (e) {
|
|
495
536
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
496
537
|
}
|
|
497
538
|
if (r instanceof HTMLImageElement) {
|
|
498
|
-
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e,
|
|
499
|
-
r.onload = e, r.onerror = () =>
|
|
539
|
+
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e, c) => {
|
|
540
|
+
r.onload = e, r.onerror = () => c(new Error(`图片加载失败: src=${r.src}`)), r.complete && e(null);
|
|
500
541
|
}), r.naturalWidth === 0 || r.naturalHeight === 0)
|
|
501
542
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
502
543
|
try {
|
|
503
544
|
const e = await createImageBitmap(r);
|
|
504
|
-
return await
|
|
545
|
+
return await w0(e, d);
|
|
505
546
|
} catch (e) {
|
|
506
547
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
507
548
|
}
|
|
@@ -509,33 +550,34 @@ async function lt(r, v, t) {
|
|
|
509
550
|
if (r instanceof ImageBitmap) {
|
|
510
551
|
if (r.width === 0 || r.height === 0)
|
|
511
552
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
512
|
-
return await
|
|
553
|
+
return await w0(r, d);
|
|
513
554
|
}
|
|
514
555
|
throw new Error("不支持的图片类型");
|
|
515
556
|
}
|
|
516
|
-
async function
|
|
557
|
+
async function Dt(r, d, t) {
|
|
517
558
|
try {
|
|
518
|
-
const e =
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
559
|
+
const e = Re(r, t);
|
|
560
|
+
let c;
|
|
561
|
+
try {
|
|
562
|
+
c = await He(e);
|
|
563
|
+
} catch {
|
|
564
|
+
throw new Error(`加载图片失败: ${r}`);
|
|
522
565
|
}
|
|
523
|
-
|
|
524
|
-
if (!h.type.startsWith("image/") && h.size === 0)
|
|
566
|
+
if (!c.type.startsWith("image/") && c.size === 0)
|
|
525
567
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
526
568
|
try {
|
|
527
|
-
const
|
|
528
|
-
return await
|
|
529
|
-
} catch (
|
|
530
|
-
throw new Error(`图片解码失败: URL=${r}, 错误=${
|
|
569
|
+
const v = await createImageBitmap(c);
|
|
570
|
+
return await w0(v, d);
|
|
571
|
+
} catch (v) {
|
|
572
|
+
throw new Error(`图片解码失败: URL=${r}, 错误=${v instanceof Error ? v.message : v}`);
|
|
531
573
|
}
|
|
532
574
|
} catch (e) {
|
|
533
575
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
534
576
|
}
|
|
535
577
|
}
|
|
536
|
-
function
|
|
578
|
+
function Tr(r) {
|
|
537
579
|
if (!r) return "source-over";
|
|
538
|
-
const
|
|
580
|
+
const d = r.trim().toLowerCase();
|
|
539
581
|
return {
|
|
540
582
|
normal: "source-over",
|
|
541
583
|
multiply: "multiply",
|
|
@@ -561,26 +603,26 @@ function Or(r) {
|
|
|
561
603
|
"linear dodge": "lighter",
|
|
562
604
|
lighter: "lighter",
|
|
563
605
|
"pass-through": "source-over"
|
|
564
|
-
}[
|
|
606
|
+
}[d] || "source-over";
|
|
565
607
|
}
|
|
566
|
-
var
|
|
567
|
-
function
|
|
608
|
+
var Cr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
609
|
+
function bt(r) {
|
|
568
610
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
569
|
-
var
|
|
570
|
-
if (typeof
|
|
611
|
+
var d = r.default;
|
|
612
|
+
if (typeof d == "function") {
|
|
571
613
|
var t = function e() {
|
|
572
|
-
var
|
|
614
|
+
var c = !1;
|
|
573
615
|
try {
|
|
574
|
-
|
|
616
|
+
c = this instanceof e;
|
|
575
617
|
} catch {
|
|
576
618
|
}
|
|
577
|
-
return
|
|
619
|
+
return c ? Reflect.construct(d, arguments, this.constructor) : d.apply(this, arguments);
|
|
578
620
|
};
|
|
579
|
-
t.prototype =
|
|
621
|
+
t.prototype = d.prototype;
|
|
580
622
|
} else t = {};
|
|
581
623
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
582
|
-
var
|
|
583
|
-
Object.defineProperty(t, e,
|
|
624
|
+
var c = Object.getOwnPropertyDescriptor(r, e);
|
|
625
|
+
Object.defineProperty(t, e, c.get ? c : {
|
|
584
626
|
enumerable: !0,
|
|
585
627
|
get: function() {
|
|
586
628
|
return r[e];
|
|
@@ -588,48 +630,48 @@ function vt(r) {
|
|
|
588
630
|
});
|
|
589
631
|
}), t;
|
|
590
632
|
}
|
|
591
|
-
var
|
|
592
|
-
function
|
|
633
|
+
var k0 = { exports: {} };
|
|
634
|
+
function mt(r) {
|
|
593
635
|
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.');
|
|
594
636
|
}
|
|
595
|
-
var
|
|
637
|
+
var S0 = { exports: {} }, _t = {}, yt = /* @__PURE__ */ Object.freeze({
|
|
596
638
|
__proto__: null,
|
|
597
|
-
default:
|
|
598
|
-
}),
|
|
639
|
+
default: _t
|
|
640
|
+
}), wt = /* @__PURE__ */ bt(yt), kt = S0.exports, Mr;
|
|
599
641
|
function M() {
|
|
600
|
-
return
|
|
642
|
+
return Mr || (Mr = 1, (function(r, d) {
|
|
601
643
|
(function(t, e) {
|
|
602
644
|
r.exports = e();
|
|
603
|
-
})(
|
|
604
|
-
var t = t || (function(e,
|
|
605
|
-
var
|
|
606
|
-
if (typeof window < "u" && window.crypto && (
|
|
645
|
+
})(kt, function() {
|
|
646
|
+
var t = t || (function(e, c) {
|
|
647
|
+
var v;
|
|
648
|
+
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 Cr < "u" && Cr.crypto && (v = Cr.crypto), !v && typeof mt == "function")
|
|
607
649
|
try {
|
|
608
|
-
|
|
650
|
+
v = wt;
|
|
609
651
|
} catch {
|
|
610
652
|
}
|
|
611
|
-
var
|
|
612
|
-
if (
|
|
613
|
-
if (typeof
|
|
653
|
+
var y = function() {
|
|
654
|
+
if (v) {
|
|
655
|
+
if (typeof v.getRandomValues == "function")
|
|
614
656
|
try {
|
|
615
|
-
return
|
|
657
|
+
return v.getRandomValues(new Uint32Array(1))[0];
|
|
616
658
|
} catch {
|
|
617
659
|
}
|
|
618
|
-
if (typeof
|
|
660
|
+
if (typeof v.randomBytes == "function")
|
|
619
661
|
try {
|
|
620
|
-
return
|
|
662
|
+
return v.randomBytes(4).readInt32LE();
|
|
621
663
|
} catch {
|
|
622
664
|
}
|
|
623
665
|
}
|
|
624
666
|
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
625
|
-
},
|
|
667
|
+
}, B = Object.create || /* @__PURE__ */ (function() {
|
|
626
668
|
function i() {
|
|
627
669
|
}
|
|
628
670
|
return function(o) {
|
|
629
|
-
var
|
|
630
|
-
return i.prototype = o,
|
|
671
|
+
var l;
|
|
672
|
+
return i.prototype = o, l = new i(), i.prototype = null, l;
|
|
631
673
|
};
|
|
632
|
-
})(),
|
|
674
|
+
})(), C = {}, x = C.lib = {}, n = x.Base = /* @__PURE__ */ (function() {
|
|
633
675
|
return {
|
|
634
676
|
/**
|
|
635
677
|
* Creates a new object that inherits from this object.
|
|
@@ -650,7 +692,7 @@ function M() {
|
|
|
650
692
|
* });
|
|
651
693
|
*/
|
|
652
694
|
extend: function(i) {
|
|
653
|
-
var o =
|
|
695
|
+
var o = B(this);
|
|
654
696
|
return i && o.mixIn(i), (!o.hasOwnProperty("init") || this.init === o.init) && (o.init = function() {
|
|
655
697
|
o.$super.init.apply(this, arguments);
|
|
656
698
|
}), o.init.prototype = o, o.$super = this, o;
|
|
@@ -728,7 +770,7 @@ function M() {
|
|
|
728
770
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
729
771
|
*/
|
|
730
772
|
init: function(i, o) {
|
|
731
|
-
i = this.words = i || [], o !=
|
|
773
|
+
i = this.words = i || [], o != c ? this.sigBytes = o : this.sigBytes = i.length * 4;
|
|
732
774
|
},
|
|
733
775
|
/**
|
|
734
776
|
* Converts this word array to a string.
|
|
@@ -758,15 +800,15 @@ function M() {
|
|
|
758
800
|
* wordArray1.concat(wordArray2);
|
|
759
801
|
*/
|
|
760
802
|
concat: function(i) {
|
|
761
|
-
var o = this.words,
|
|
803
|
+
var o = this.words, l = i.words, b = this.sigBytes, g = i.sigBytes;
|
|
762
804
|
if (this.clamp(), b % 4)
|
|
763
|
-
for (var
|
|
764
|
-
var k =
|
|
765
|
-
o[b +
|
|
805
|
+
for (var _ = 0; _ < g; _++) {
|
|
806
|
+
var k = l[_ >>> 2] >>> 24 - _ % 4 * 8 & 255;
|
|
807
|
+
o[b + _ >>> 2] |= k << 24 - (b + _) % 4 * 8;
|
|
766
808
|
}
|
|
767
809
|
else
|
|
768
|
-
for (var
|
|
769
|
-
o[b +
|
|
810
|
+
for (var $ = 0; $ < g; $ += 4)
|
|
811
|
+
o[b + $ >>> 2] = l[$ >>> 2];
|
|
770
812
|
return this.sigBytes += g, this;
|
|
771
813
|
},
|
|
772
814
|
/**
|
|
@@ -807,11 +849,11 @@ function M() {
|
|
|
807
849
|
* var wordArray = CryptoJS.lib.WordArray.random(16);
|
|
808
850
|
*/
|
|
809
851
|
random: function(i) {
|
|
810
|
-
for (var o = [],
|
|
811
|
-
o.push(
|
|
852
|
+
for (var o = [], l = 0; l < i; l += 4)
|
|
853
|
+
o.push(y());
|
|
812
854
|
return new E.init(o, i);
|
|
813
855
|
}
|
|
814
|
-
}), a =
|
|
856
|
+
}), a = C.enc = {}, s = a.Hex = {
|
|
815
857
|
/**
|
|
816
858
|
* Converts a word array to a hex string.
|
|
817
859
|
*
|
|
@@ -826,9 +868,9 @@ function M() {
|
|
|
826
868
|
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
|
827
869
|
*/
|
|
828
870
|
stringify: function(i) {
|
|
829
|
-
for (var o = i.words,
|
|
830
|
-
var
|
|
831
|
-
b.push((
|
|
871
|
+
for (var o = i.words, l = i.sigBytes, b = [], g = 0; g < l; g++) {
|
|
872
|
+
var _ = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
873
|
+
b.push((_ >>> 4).toString(16)), b.push((_ & 15).toString(16));
|
|
832
874
|
}
|
|
833
875
|
return b.join("");
|
|
834
876
|
},
|
|
@@ -846,11 +888,11 @@ function M() {
|
|
|
846
888
|
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
|
|
847
889
|
*/
|
|
848
890
|
parse: function(i) {
|
|
849
|
-
for (var o = i.length,
|
|
850
|
-
|
|
851
|
-
return new E.init(
|
|
891
|
+
for (var o = i.length, l = [], b = 0; b < o; b += 2)
|
|
892
|
+
l[b >>> 3] |= parseInt(i.substr(b, 2), 16) << 24 - b % 8 * 4;
|
|
893
|
+
return new E.init(l, o / 2);
|
|
852
894
|
}
|
|
853
|
-
},
|
|
895
|
+
}, u = a.Latin1 = {
|
|
854
896
|
/**
|
|
855
897
|
* Converts a word array to a Latin1 string.
|
|
856
898
|
*
|
|
@@ -865,9 +907,9 @@ function M() {
|
|
|
865
907
|
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
|
|
866
908
|
*/
|
|
867
909
|
stringify: function(i) {
|
|
868
|
-
for (var o = i.words,
|
|
869
|
-
var
|
|
870
|
-
b.push(String.fromCharCode(
|
|
910
|
+
for (var o = i.words, l = i.sigBytes, b = [], g = 0; g < l; g++) {
|
|
911
|
+
var _ = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
912
|
+
b.push(String.fromCharCode(_));
|
|
871
913
|
}
|
|
872
914
|
return b.join("");
|
|
873
915
|
},
|
|
@@ -885,9 +927,9 @@ function M() {
|
|
|
885
927
|
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
|
|
886
928
|
*/
|
|
887
929
|
parse: function(i) {
|
|
888
|
-
for (var o = i.length,
|
|
889
|
-
|
|
890
|
-
return new E.init(
|
|
930
|
+
for (var o = i.length, l = [], b = 0; b < o; b++)
|
|
931
|
+
l[b >>> 2] |= (i.charCodeAt(b) & 255) << 24 - b % 4 * 8;
|
|
932
|
+
return new E.init(l, o);
|
|
891
933
|
}
|
|
892
934
|
}, p = a.Utf8 = {
|
|
893
935
|
/**
|
|
@@ -905,7 +947,7 @@ function M() {
|
|
|
905
947
|
*/
|
|
906
948
|
stringify: function(i) {
|
|
907
949
|
try {
|
|
908
|
-
return decodeURIComponent(escape(
|
|
950
|
+
return decodeURIComponent(escape(u.stringify(i)));
|
|
909
951
|
} catch {
|
|
910
952
|
throw new Error("Malformed UTF-8 data");
|
|
911
953
|
}
|
|
@@ -924,9 +966,9 @@ function M() {
|
|
|
924
966
|
* var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
|
|
925
967
|
*/
|
|
926
968
|
parse: function(i) {
|
|
927
|
-
return
|
|
969
|
+
return u.parse(unescape(encodeURIComponent(i)));
|
|
928
970
|
}
|
|
929
|
-
},
|
|
971
|
+
}, h = x.BufferedBlockAlgorithm = n.extend({
|
|
930
972
|
/**
|
|
931
973
|
* Resets this block algorithm's data buffer to its initial state.
|
|
932
974
|
*
|
|
@@ -965,13 +1007,13 @@ function M() {
|
|
|
965
1007
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
966
1008
|
*/
|
|
967
1009
|
_process: function(i) {
|
|
968
|
-
var o,
|
|
969
|
-
i ?
|
|
970
|
-
var F =
|
|
1010
|
+
var o, l = this._data, b = l.words, g = l.sigBytes, _ = this.blockSize, k = _ * 4, $ = g / k;
|
|
1011
|
+
i ? $ = e.ceil($) : $ = e.max(($ | 0) - this._minBufferSize, 0);
|
|
1012
|
+
var F = $ * _, w = e.min(F * 4, g);
|
|
971
1013
|
if (F) {
|
|
972
|
-
for (var H = 0; H < F; H +=
|
|
1014
|
+
for (var H = 0; H < F; H += _)
|
|
973
1015
|
this._doProcessBlock(b, H);
|
|
974
|
-
o = b.splice(0, F),
|
|
1016
|
+
o = b.splice(0, F), l.sigBytes -= w;
|
|
975
1017
|
}
|
|
976
1018
|
return new E.init(o, w);
|
|
977
1019
|
},
|
|
@@ -990,7 +1032,7 @@ function M() {
|
|
|
990
1032
|
},
|
|
991
1033
|
_minBufferSize: 0
|
|
992
1034
|
});
|
|
993
|
-
x.Hasher =
|
|
1035
|
+
x.Hasher = h.extend({
|
|
994
1036
|
/**
|
|
995
1037
|
* Configuration options.
|
|
996
1038
|
*/
|
|
@@ -1015,7 +1057,7 @@ function M() {
|
|
|
1015
1057
|
* hasher.reset();
|
|
1016
1058
|
*/
|
|
1017
1059
|
reset: function() {
|
|
1018
|
-
|
|
1060
|
+
h.reset.call(this), this._doReset();
|
|
1019
1061
|
},
|
|
1020
1062
|
/**
|
|
1021
1063
|
* Updates this hasher with a message.
|
|
@@ -1066,8 +1108,8 @@ function M() {
|
|
|
1066
1108
|
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
|
|
1067
1109
|
*/
|
|
1068
1110
|
_createHelper: function(i) {
|
|
1069
|
-
return function(o,
|
|
1070
|
-
return new i.init(
|
|
1111
|
+
return function(o, l) {
|
|
1112
|
+
return new i.init(l).finalize(o);
|
|
1071
1113
|
};
|
|
1072
1114
|
},
|
|
1073
1115
|
/**
|
|
@@ -1084,27 +1126,27 @@ function M() {
|
|
|
1084
1126
|
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
|
|
1085
1127
|
*/
|
|
1086
1128
|
_createHmacHelper: function(i) {
|
|
1087
|
-
return function(o,
|
|
1088
|
-
return new D.HMAC.init(i,
|
|
1129
|
+
return function(o, l) {
|
|
1130
|
+
return new D.HMAC.init(i, l).finalize(o);
|
|
1089
1131
|
};
|
|
1090
1132
|
}
|
|
1091
1133
|
});
|
|
1092
|
-
var D =
|
|
1093
|
-
return
|
|
1134
|
+
var D = C.algo = {};
|
|
1135
|
+
return C;
|
|
1094
1136
|
})(Math);
|
|
1095
1137
|
return t;
|
|
1096
1138
|
});
|
|
1097
|
-
})(
|
|
1139
|
+
})(S0)), S0.exports;
|
|
1098
1140
|
}
|
|
1099
|
-
var
|
|
1100
|
-
function
|
|
1101
|
-
return
|
|
1141
|
+
var H0 = { exports: {} }, St = H0.exports, Nr;
|
|
1142
|
+
function hr() {
|
|
1143
|
+
return Nr || (Nr = 1, (function(r, d) {
|
|
1102
1144
|
(function(t, e) {
|
|
1103
1145
|
r.exports = e(M());
|
|
1104
|
-
})(
|
|
1146
|
+
})(St, function(t) {
|
|
1105
1147
|
return (function(e) {
|
|
1106
|
-
var
|
|
1107
|
-
|
|
1148
|
+
var c = t, v = c.lib, y = v.Base, B = v.WordArray, C = c.x64 = {};
|
|
1149
|
+
C.Word = y.extend({
|
|
1108
1150
|
/**
|
|
1109
1151
|
* Initializes a newly created 64-bit word.
|
|
1110
1152
|
*
|
|
@@ -1267,7 +1309,7 @@ function dr() {
|
|
|
1267
1309
|
// var high = (this.high + word.high + carry) | 0;
|
|
1268
1310
|
// return X64Word.create(high, low);
|
|
1269
1311
|
// }
|
|
1270
|
-
}),
|
|
1312
|
+
}), C.WordArray = y.extend({
|
|
1271
1313
|
/**
|
|
1272
1314
|
* Initializes a newly created word array.
|
|
1273
1315
|
*
|
|
@@ -1305,7 +1347,7 @@ function dr() {
|
|
|
1305
1347
|
var s = x[a];
|
|
1306
1348
|
E.push(s.high), E.push(s.low);
|
|
1307
1349
|
}
|
|
1308
|
-
return
|
|
1350
|
+
return B.create(E, this.sigBytes);
|
|
1309
1351
|
},
|
|
1310
1352
|
/**
|
|
1311
1353
|
* Creates a copy of this word array.
|
|
@@ -1317,46 +1359,46 @@ function dr() {
|
|
|
1317
1359
|
* var clone = x64WordArray.clone();
|
|
1318
1360
|
*/
|
|
1319
1361
|
clone: function() {
|
|
1320
|
-
for (var x =
|
|
1362
|
+
for (var x = y.clone.call(this), n = x.words = this.words.slice(0), E = n.length, a = 0; a < E; a++)
|
|
1321
1363
|
n[a] = n[a].clone();
|
|
1322
1364
|
return x;
|
|
1323
1365
|
}
|
|
1324
1366
|
});
|
|
1325
1367
|
})(), t;
|
|
1326
1368
|
});
|
|
1327
|
-
})(
|
|
1369
|
+
})(H0)), H0.exports;
|
|
1328
1370
|
}
|
|
1329
|
-
var
|
|
1330
|
-
function
|
|
1331
|
-
return
|
|
1371
|
+
var R0 = { exports: {} }, Ht = R0.exports, Ur;
|
|
1372
|
+
function Rt() {
|
|
1373
|
+
return Ur || (Ur = 1, (function(r, d) {
|
|
1332
1374
|
(function(t, e) {
|
|
1333
1375
|
r.exports = e(M());
|
|
1334
|
-
})(
|
|
1376
|
+
})(Ht, function(t) {
|
|
1335
1377
|
return (function() {
|
|
1336
1378
|
if (typeof ArrayBuffer == "function") {
|
|
1337
|
-
var e = t,
|
|
1338
|
-
if (
|
|
1339
|
-
for (var x =
|
|
1340
|
-
n[E >>> 2] |=
|
|
1341
|
-
|
|
1379
|
+
var e = t, c = e.lib, v = c.WordArray, y = v.init, B = v.init = function(C) {
|
|
1380
|
+
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) {
|
|
1381
|
+
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1382
|
+
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
1383
|
+
y.call(this, n, x);
|
|
1342
1384
|
} else
|
|
1343
|
-
|
|
1385
|
+
y.apply(this, arguments);
|
|
1344
1386
|
};
|
|
1345
|
-
|
|
1387
|
+
B.prototype = v;
|
|
1346
1388
|
}
|
|
1347
1389
|
})(), t.lib.WordArray;
|
|
1348
1390
|
});
|
|
1349
|
-
})(
|
|
1391
|
+
})(R0)), R0.exports;
|
|
1350
1392
|
}
|
|
1351
|
-
var
|
|
1352
|
-
function
|
|
1353
|
-
return
|
|
1393
|
+
var $0 = { exports: {} }, $t = $0.exports, jr;
|
|
1394
|
+
function Pt() {
|
|
1395
|
+
return jr || (jr = 1, (function(r, d) {
|
|
1354
1396
|
(function(t, e) {
|
|
1355
1397
|
r.exports = e(M());
|
|
1356
|
-
})(
|
|
1398
|
+
})($t, function(t) {
|
|
1357
1399
|
return (function() {
|
|
1358
|
-
var e = t,
|
|
1359
|
-
|
|
1400
|
+
var e = t, c = e.lib, v = c.WordArray, y = e.enc;
|
|
1401
|
+
y.Utf16 = y.Utf16BE = {
|
|
1360
1402
|
/**
|
|
1361
1403
|
* Converts a word array to a UTF-16 BE string.
|
|
1362
1404
|
*
|
|
@@ -1370,8 +1412,8 @@ function mt() {
|
|
|
1370
1412
|
*
|
|
1371
1413
|
* var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
|
|
1372
1414
|
*/
|
|
1373
|
-
stringify: function(
|
|
1374
|
-
for (var x =
|
|
1415
|
+
stringify: function(C) {
|
|
1416
|
+
for (var x = C.words, n = C.sigBytes, E = [], a = 0; a < n; a += 2) {
|
|
1375
1417
|
var s = x[a >>> 2] >>> 16 - a % 4 * 8 & 65535;
|
|
1376
1418
|
E.push(String.fromCharCode(s));
|
|
1377
1419
|
}
|
|
@@ -1390,12 +1432,12 @@ function mt() {
|
|
|
1390
1432
|
*
|
|
1391
1433
|
* var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
|
|
1392
1434
|
*/
|
|
1393
|
-
parse: function(
|
|
1394
|
-
for (var x =
|
|
1395
|
-
n[E >>> 1] |=
|
|
1396
|
-
return
|
|
1435
|
+
parse: function(C) {
|
|
1436
|
+
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1437
|
+
n[E >>> 1] |= C.charCodeAt(E) << 16 - E % 2 * 16;
|
|
1438
|
+
return v.create(n, x * 2);
|
|
1397
1439
|
}
|
|
1398
|
-
},
|
|
1440
|
+
}, y.Utf16LE = {
|
|
1399
1441
|
/**
|
|
1400
1442
|
* Converts a word array to a UTF-16 LE string.
|
|
1401
1443
|
*
|
|
@@ -1409,9 +1451,9 @@ function mt() {
|
|
|
1409
1451
|
*
|
|
1410
1452
|
* var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
|
|
1411
1453
|
*/
|
|
1412
|
-
stringify: function(
|
|
1413
|
-
for (var x =
|
|
1414
|
-
var s =
|
|
1454
|
+
stringify: function(C) {
|
|
1455
|
+
for (var x = C.words, n = C.sigBytes, E = [], a = 0; a < n; a += 2) {
|
|
1456
|
+
var s = B(x[a >>> 2] >>> 16 - a % 4 * 8 & 65535);
|
|
1415
1457
|
E.push(String.fromCharCode(s));
|
|
1416
1458
|
}
|
|
1417
1459
|
return E.join("");
|
|
@@ -1429,28 +1471,28 @@ function mt() {
|
|
|
1429
1471
|
*
|
|
1430
1472
|
* var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
|
|
1431
1473
|
*/
|
|
1432
|
-
parse: function(
|
|
1433
|
-
for (var x =
|
|
1434
|
-
n[E >>> 1] |= C
|
|
1435
|
-
return
|
|
1474
|
+
parse: function(C) {
|
|
1475
|
+
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1476
|
+
n[E >>> 1] |= B(C.charCodeAt(E) << 16 - E % 2 * 16);
|
|
1477
|
+
return v.create(n, x * 2);
|
|
1436
1478
|
}
|
|
1437
1479
|
};
|
|
1438
|
-
function C
|
|
1439
|
-
return
|
|
1480
|
+
function B(C) {
|
|
1481
|
+
return C << 8 & 4278255360 | C >>> 8 & 16711935;
|
|
1440
1482
|
}
|
|
1441
1483
|
})(), t.enc.Utf16;
|
|
1442
1484
|
});
|
|
1443
|
-
})(
|
|
1485
|
+
})($0)), $0.exports;
|
|
1444
1486
|
}
|
|
1445
|
-
var
|
|
1446
|
-
function
|
|
1447
|
-
return
|
|
1487
|
+
var P0 = { exports: {} }, zt = P0.exports, Gr;
|
|
1488
|
+
function c0() {
|
|
1489
|
+
return Gr || (Gr = 1, (function(r, d) {
|
|
1448
1490
|
(function(t, e) {
|
|
1449
1491
|
r.exports = e(M());
|
|
1450
|
-
})(
|
|
1492
|
+
})(zt, function(t) {
|
|
1451
1493
|
return (function() {
|
|
1452
|
-
var e = t,
|
|
1453
|
-
|
|
1494
|
+
var e = t, c = e.lib, v = c.WordArray, y = e.enc;
|
|
1495
|
+
y.Base64 = {
|
|
1454
1496
|
/**
|
|
1455
1497
|
* Converts a word array to a Base64 string.
|
|
1456
1498
|
*
|
|
@@ -1464,11 +1506,11 @@ function s0() {
|
|
|
1464
1506
|
*
|
|
1465
1507
|
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
|
|
1466
1508
|
*/
|
|
1467
|
-
stringify: function(
|
|
1468
|
-
var x =
|
|
1469
|
-
|
|
1509
|
+
stringify: function(C) {
|
|
1510
|
+
var x = C.words, n = C.sigBytes, E = this._map;
|
|
1511
|
+
C.clamp();
|
|
1470
1512
|
for (var a = [], s = 0; s < n; s += 3)
|
|
1471
|
-
for (var
|
|
1513
|
+
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++)
|
|
1472
1514
|
a.push(E.charAt(D >>> 6 * (3 - i) & 63));
|
|
1473
1515
|
var o = E.charAt(64);
|
|
1474
1516
|
if (o)
|
|
@@ -1489,8 +1531,8 @@ function s0() {
|
|
|
1489
1531
|
*
|
|
1490
1532
|
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
|
|
1491
1533
|
*/
|
|
1492
|
-
parse: function(
|
|
1493
|
-
var x =
|
|
1534
|
+
parse: function(C) {
|
|
1535
|
+
var x = C.length, n = this._map, E = this._reverseMap;
|
|
1494
1536
|
if (!E) {
|
|
1495
1537
|
E = this._reverseMap = [];
|
|
1496
1538
|
for (var a = 0; a < n.length; a++)
|
|
@@ -1498,34 +1540,34 @@ function s0() {
|
|
|
1498
1540
|
}
|
|
1499
1541
|
var s = n.charAt(64);
|
|
1500
1542
|
if (s) {
|
|
1501
|
-
var
|
|
1502
|
-
|
|
1543
|
+
var u = C.indexOf(s);
|
|
1544
|
+
u !== -1 && (x = u);
|
|
1503
1545
|
}
|
|
1504
|
-
return C
|
|
1546
|
+
return B(C, x, E);
|
|
1505
1547
|
},
|
|
1506
1548
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
|
|
1507
1549
|
};
|
|
1508
|
-
function C
|
|
1550
|
+
function B(C, x, n) {
|
|
1509
1551
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1510
1552
|
if (s % 4) {
|
|
1511
|
-
var
|
|
1512
|
-
E[a >>> 2] |=
|
|
1553
|
+
var u = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, h = u | p;
|
|
1554
|
+
E[a >>> 2] |= h << 24 - a % 4 * 8, a++;
|
|
1513
1555
|
}
|
|
1514
|
-
return
|
|
1556
|
+
return v.create(E, a);
|
|
1515
1557
|
}
|
|
1516
1558
|
})(), t.enc.Base64;
|
|
1517
1559
|
});
|
|
1518
|
-
})(
|
|
1560
|
+
})(P0)), P0.exports;
|
|
1519
1561
|
}
|
|
1520
|
-
var
|
|
1521
|
-
function
|
|
1522
|
-
return
|
|
1562
|
+
var z0 = { exports: {} }, Wt = z0.exports, Kr;
|
|
1563
|
+
function It() {
|
|
1564
|
+
return Kr || (Kr = 1, (function(r, d) {
|
|
1523
1565
|
(function(t, e) {
|
|
1524
1566
|
r.exports = e(M());
|
|
1525
|
-
})(
|
|
1567
|
+
})(Wt, function(t) {
|
|
1526
1568
|
return (function() {
|
|
1527
|
-
var e = t,
|
|
1528
|
-
|
|
1569
|
+
var e = t, c = e.lib, v = c.WordArray, y = e.enc;
|
|
1570
|
+
y.Base64url = {
|
|
1529
1571
|
/**
|
|
1530
1572
|
* Converts a word array to a Base64url string.
|
|
1531
1573
|
*
|
|
@@ -1541,17 +1583,17 @@ function wt() {
|
|
|
1541
1583
|
*
|
|
1542
1584
|
* var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
|
|
1543
1585
|
*/
|
|
1544
|
-
stringify: function(
|
|
1586
|
+
stringify: function(C, x) {
|
|
1545
1587
|
x === void 0 && (x = !0);
|
|
1546
|
-
var n =
|
|
1547
|
-
|
|
1548
|
-
for (var s = [],
|
|
1549
|
-
for (var p = n[
|
|
1588
|
+
var n = C.words, E = C.sigBytes, a = x ? this._safe_map : this._map;
|
|
1589
|
+
C.clamp();
|
|
1590
|
+
for (var s = [], u = 0; u < E; u += 3)
|
|
1591
|
+
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++)
|
|
1550
1592
|
s.push(a.charAt(i >>> 6 * (3 - o) & 63));
|
|
1551
|
-
var
|
|
1552
|
-
if (
|
|
1593
|
+
var l = a.charAt(64);
|
|
1594
|
+
if (l)
|
|
1553
1595
|
for (; s.length % 4; )
|
|
1554
|
-
s.push(
|
|
1596
|
+
s.push(l);
|
|
1555
1597
|
return s.join("");
|
|
1556
1598
|
},
|
|
1557
1599
|
/**
|
|
@@ -1569,112 +1611,112 @@ function wt() {
|
|
|
1569
1611
|
*
|
|
1570
1612
|
* var wordArray = CryptoJS.enc.Base64url.parse(base64String);
|
|
1571
1613
|
*/
|
|
1572
|
-
parse: function(
|
|
1614
|
+
parse: function(C, x) {
|
|
1573
1615
|
x === void 0 && (x = !0);
|
|
1574
|
-
var n =
|
|
1616
|
+
var n = C.length, E = x ? this._safe_map : this._map, a = this._reverseMap;
|
|
1575
1617
|
if (!a) {
|
|
1576
1618
|
a = this._reverseMap = [];
|
|
1577
1619
|
for (var s = 0; s < E.length; s++)
|
|
1578
1620
|
a[E.charCodeAt(s)] = s;
|
|
1579
1621
|
}
|
|
1580
|
-
var
|
|
1581
|
-
if (
|
|
1582
|
-
var p =
|
|
1622
|
+
var u = E.charAt(64);
|
|
1623
|
+
if (u) {
|
|
1624
|
+
var p = C.indexOf(u);
|
|
1583
1625
|
p !== -1 && (n = p);
|
|
1584
1626
|
}
|
|
1585
|
-
return C
|
|
1627
|
+
return B(C, n, a);
|
|
1586
1628
|
},
|
|
1587
1629
|
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
1588
1630
|
_safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
|
|
1589
1631
|
};
|
|
1590
|
-
function C
|
|
1632
|
+
function B(C, x, n) {
|
|
1591
1633
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1592
1634
|
if (s % 4) {
|
|
1593
|
-
var
|
|
1594
|
-
E[a >>> 2] |=
|
|
1635
|
+
var u = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, h = u | p;
|
|
1636
|
+
E[a >>> 2] |= h << 24 - a % 4 * 8, a++;
|
|
1595
1637
|
}
|
|
1596
|
-
return
|
|
1638
|
+
return v.create(E, a);
|
|
1597
1639
|
}
|
|
1598
1640
|
})(), t.enc.Base64url;
|
|
1599
1641
|
});
|
|
1600
|
-
})(
|
|
1642
|
+
})(z0)), z0.exports;
|
|
1601
1643
|
}
|
|
1602
|
-
var
|
|
1603
|
-
function
|
|
1604
|
-
return
|
|
1644
|
+
var W0 = { exports: {} }, Lt = W0.exports, Xr;
|
|
1645
|
+
function f0() {
|
|
1646
|
+
return Xr || (Xr = 1, (function(r, d) {
|
|
1605
1647
|
(function(t, e) {
|
|
1606
1648
|
r.exports = e(M());
|
|
1607
|
-
})(
|
|
1649
|
+
})(Lt, function(t) {
|
|
1608
1650
|
return (function(e) {
|
|
1609
|
-
var
|
|
1651
|
+
var c = t, v = c.lib, y = v.WordArray, B = v.Hasher, C = c.algo, x = [];
|
|
1610
1652
|
(function() {
|
|
1611
1653
|
for (var p = 0; p < 64; p++)
|
|
1612
1654
|
x[p] = e.abs(e.sin(p + 1)) * 4294967296 | 0;
|
|
1613
1655
|
})();
|
|
1614
|
-
var n =
|
|
1656
|
+
var n = C.MD5 = B.extend({
|
|
1615
1657
|
_doReset: function() {
|
|
1616
|
-
this._hash = new
|
|
1658
|
+
this._hash = new y.init([
|
|
1617
1659
|
1732584193,
|
|
1618
1660
|
4023233417,
|
|
1619
1661
|
2562383102,
|
|
1620
1662
|
271733878
|
|
1621
1663
|
]);
|
|
1622
1664
|
},
|
|
1623
|
-
_doProcessBlock: function(p,
|
|
1665
|
+
_doProcessBlock: function(p, h) {
|
|
1624
1666
|
for (var D = 0; D < 16; D++) {
|
|
1625
|
-
var i =
|
|
1667
|
+
var i = h + D, o = p[i];
|
|
1626
1668
|
p[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1627
1669
|
}
|
|
1628
|
-
var
|
|
1629
|
-
S = E(S,
|
|
1670
|
+
var l = 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 = l[0], f = l[1], A = l[2], m = l[3];
|
|
1671
|
+
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]), l[0] = l[0] + S | 0, l[1] = l[1] + f | 0, l[2] = l[2] + A | 0, l[3] = l[3] + m | 0;
|
|
1630
1672
|
},
|
|
1631
1673
|
_doFinalize: function() {
|
|
1632
|
-
var p = this._data,
|
|
1633
|
-
|
|
1634
|
-
var o = e.floor(D / 4294967296),
|
|
1635
|
-
|
|
1636
|
-
for (var b = this._hash, g = b.words,
|
|
1637
|
-
var k = g[
|
|
1638
|
-
g[
|
|
1674
|
+
var p = this._data, h = p.words, D = this._nDataBytes * 8, i = p.sigBytes * 8;
|
|
1675
|
+
h[i >>> 5] |= 128 << 24 - i % 32;
|
|
1676
|
+
var o = e.floor(D / 4294967296), l = D;
|
|
1677
|
+
h[(i + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, h[(i + 64 >>> 9 << 4) + 14] = (l << 8 | l >>> 24) & 16711935 | (l << 24 | l >>> 8) & 4278255360, p.sigBytes = (h.length + 1) * 4, this._process();
|
|
1678
|
+
for (var b = this._hash, g = b.words, _ = 0; _ < 4; _++) {
|
|
1679
|
+
var k = g[_];
|
|
1680
|
+
g[_] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
1639
1681
|
}
|
|
1640
1682
|
return b;
|
|
1641
1683
|
},
|
|
1642
1684
|
clone: function() {
|
|
1643
|
-
var p =
|
|
1685
|
+
var p = B.clone.call(this);
|
|
1644
1686
|
return p._hash = this._hash.clone(), p;
|
|
1645
1687
|
}
|
|
1646
1688
|
});
|
|
1647
|
-
function E(p,
|
|
1648
|
-
var g = p + (
|
|
1649
|
-
return (g <<
|
|
1689
|
+
function E(p, h, D, i, o, l, b) {
|
|
1690
|
+
var g = p + (h & D | ~h & i) + o + b;
|
|
1691
|
+
return (g << l | g >>> 32 - l) + h;
|
|
1650
1692
|
}
|
|
1651
|
-
function a(p,
|
|
1652
|
-
var g = p + (
|
|
1653
|
-
return (g <<
|
|
1693
|
+
function a(p, h, D, i, o, l, b) {
|
|
1694
|
+
var g = p + (h & i | D & ~i) + o + b;
|
|
1695
|
+
return (g << l | g >>> 32 - l) + h;
|
|
1654
1696
|
}
|
|
1655
|
-
function s(p,
|
|
1656
|
-
var g = p + (
|
|
1657
|
-
return (g <<
|
|
1697
|
+
function s(p, h, D, i, o, l, b) {
|
|
1698
|
+
var g = p + (h ^ D ^ i) + o + b;
|
|
1699
|
+
return (g << l | g >>> 32 - l) + h;
|
|
1658
1700
|
}
|
|
1659
|
-
function
|
|
1660
|
-
var g = p + (D ^ (
|
|
1661
|
-
return (g <<
|
|
1701
|
+
function u(p, h, D, i, o, l, b) {
|
|
1702
|
+
var g = p + (D ^ (h | ~i)) + o + b;
|
|
1703
|
+
return (g << l | g >>> 32 - l) + h;
|
|
1662
1704
|
}
|
|
1663
|
-
|
|
1705
|
+
c.MD5 = B._createHelper(n), c.HmacMD5 = B._createHmacHelper(n);
|
|
1664
1706
|
})(Math), t.MD5;
|
|
1665
1707
|
});
|
|
1666
|
-
})(
|
|
1708
|
+
})(W0)), W0.exports;
|
|
1667
1709
|
}
|
|
1668
|
-
var
|
|
1669
|
-
function
|
|
1670
|
-
return
|
|
1710
|
+
var I0 = { exports: {} }, Ot = I0.exports, Yr;
|
|
1711
|
+
function $e() {
|
|
1712
|
+
return Yr || (Yr = 1, (function(r, d) {
|
|
1671
1713
|
(function(t, e) {
|
|
1672
1714
|
r.exports = e(M());
|
|
1673
|
-
})(
|
|
1715
|
+
})(Ot, function(t) {
|
|
1674
1716
|
return (function() {
|
|
1675
|
-
var e = t,
|
|
1717
|
+
var e = t, c = e.lib, v = c.WordArray, y = c.Hasher, B = e.algo, C = [], x = B.SHA1 = y.extend({
|
|
1676
1718
|
_doReset: function() {
|
|
1677
|
-
this._hash = new
|
|
1719
|
+
this._hash = new v.init([
|
|
1678
1720
|
1732584193,
|
|
1679
1721
|
4023233417,
|
|
1680
1722
|
2562383102,
|
|
@@ -1683,40 +1725,40 @@ function Se() {
|
|
|
1683
1725
|
]);
|
|
1684
1726
|
},
|
|
1685
1727
|
_doProcessBlock: function(n, E) {
|
|
1686
|
-
for (var a = this._hash.words, s = a[0],
|
|
1728
|
+
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++) {
|
|
1687
1729
|
if (i < 16)
|
|
1688
|
-
|
|
1730
|
+
C[i] = n[E + i] | 0;
|
|
1689
1731
|
else {
|
|
1690
|
-
var o =
|
|
1691
|
-
|
|
1732
|
+
var o = C[i - 3] ^ C[i - 8] ^ C[i - 14] ^ C[i - 16];
|
|
1733
|
+
C[i] = o << 1 | o >>> 31;
|
|
1692
1734
|
}
|
|
1693
|
-
var
|
|
1694
|
-
i < 20 ?
|
|
1735
|
+
var l = (s << 5 | s >>> 27) + D + C[i];
|
|
1736
|
+
i < 20 ? l += (u & p | ~u & h) + 1518500249 : i < 40 ? l += (u ^ p ^ h) + 1859775393 : i < 60 ? l += (u & p | u & h | p & h) - 1894007588 : l += (u ^ p ^ h) - 899497514, D = h, h = p, p = u << 30 | u >>> 2, u = s, s = l;
|
|
1695
1737
|
}
|
|
1696
|
-
a[0] = a[0] + s | 0, a[1] = a[1] +
|
|
1738
|
+
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;
|
|
1697
1739
|
},
|
|
1698
1740
|
_doFinalize: function() {
|
|
1699
1741
|
var n = this._data, E = n.words, a = this._nDataBytes * 8, s = n.sigBytes * 8;
|
|
1700
1742
|
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;
|
|
1701
1743
|
},
|
|
1702
1744
|
clone: function() {
|
|
1703
|
-
var n =
|
|
1745
|
+
var n = y.clone.call(this);
|
|
1704
1746
|
return n._hash = this._hash.clone(), n;
|
|
1705
1747
|
}
|
|
1706
1748
|
});
|
|
1707
|
-
e.SHA1 =
|
|
1749
|
+
e.SHA1 = y._createHelper(x), e.HmacSHA1 = y._createHmacHelper(x);
|
|
1708
1750
|
})(), t.SHA1;
|
|
1709
1751
|
});
|
|
1710
|
-
})(
|
|
1752
|
+
})(I0)), I0.exports;
|
|
1711
1753
|
}
|
|
1712
|
-
var
|
|
1713
|
-
function
|
|
1714
|
-
return
|
|
1754
|
+
var L0 = { exports: {} }, qt = L0.exports, Zr;
|
|
1755
|
+
function br() {
|
|
1756
|
+
return Zr || (Zr = 1, (function(r, d) {
|
|
1715
1757
|
(function(t, e) {
|
|
1716
1758
|
r.exports = e(M());
|
|
1717
|
-
})(
|
|
1759
|
+
})(qt, function(t) {
|
|
1718
1760
|
return (function(e) {
|
|
1719
|
-
var
|
|
1761
|
+
var c = t, v = c.lib, y = v.WordArray, B = v.Hasher, C = c.algo, x = [], n = [];
|
|
1720
1762
|
(function() {
|
|
1721
1763
|
function s(D) {
|
|
1722
1764
|
for (var i = e.sqrt(D), o = 2; o <= i; o++)
|
|
@@ -1724,53 +1766,53 @@ function gr() {
|
|
|
1724
1766
|
return !1;
|
|
1725
1767
|
return !0;
|
|
1726
1768
|
}
|
|
1727
|
-
function
|
|
1769
|
+
function u(D) {
|
|
1728
1770
|
return (D - (D | 0)) * 4294967296 | 0;
|
|
1729
1771
|
}
|
|
1730
|
-
for (var p = 2,
|
|
1731
|
-
s(p) && (
|
|
1772
|
+
for (var p = 2, h = 0; h < 64; )
|
|
1773
|
+
s(p) && (h < 8 && (x[h] = u(e.pow(p, 1 / 2))), n[h] = u(e.pow(p, 1 / 3)), h++), p++;
|
|
1732
1774
|
})();
|
|
1733
|
-
var E = [], a =
|
|
1775
|
+
var E = [], a = C.SHA256 = B.extend({
|
|
1734
1776
|
_doReset: function() {
|
|
1735
|
-
this._hash = new
|
|
1777
|
+
this._hash = new y.init(x.slice(0));
|
|
1736
1778
|
},
|
|
1737
|
-
_doProcessBlock: function(s,
|
|
1738
|
-
for (var p = this._hash.words,
|
|
1779
|
+
_doProcessBlock: function(s, u) {
|
|
1780
|
+
for (var p = this._hash.words, h = p[0], D = p[1], i = p[2], o = p[3], l = p[4], b = p[5], g = p[6], _ = p[7], k = 0; k < 64; k++) {
|
|
1739
1781
|
if (k < 16)
|
|
1740
|
-
E[k] = s[
|
|
1782
|
+
E[k] = s[u + k] | 0;
|
|
1741
1783
|
else {
|
|
1742
|
-
var
|
|
1784
|
+
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;
|
|
1743
1785
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1744
1786
|
}
|
|
1745
|
-
var
|
|
1746
|
-
|
|
1787
|
+
var R = l & b ^ ~l & g, z = h & D ^ h & i ^ D & i, O = (h << 30 | h >>> 2) ^ (h << 19 | h >>> 13) ^ (h << 10 | h >>> 22), q = (l << 26 | l >>> 6) ^ (l << 21 | l >>> 11) ^ (l << 7 | l >>> 25), U = _ + q + R + n[k] + E[k], T = O + z;
|
|
1788
|
+
_ = g, g = b, b = l, l = o + U | 0, o = i, i = D, D = h, h = U + T | 0;
|
|
1747
1789
|
}
|
|
1748
|
-
p[0] = p[0] +
|
|
1790
|
+
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] + l | 0, p[5] = p[5] + b | 0, p[6] = p[6] + g | 0, p[7] = p[7] + _ | 0;
|
|
1749
1791
|
},
|
|
1750
1792
|
_doFinalize: function() {
|
|
1751
|
-
var s = this._data,
|
|
1752
|
-
return
|
|
1793
|
+
var s = this._data, u = s.words, p = this._nDataBytes * 8, h = s.sigBytes * 8;
|
|
1794
|
+
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;
|
|
1753
1795
|
},
|
|
1754
1796
|
clone: function() {
|
|
1755
|
-
var s =
|
|
1797
|
+
var s = B.clone.call(this);
|
|
1756
1798
|
return s._hash = this._hash.clone(), s;
|
|
1757
1799
|
}
|
|
1758
1800
|
});
|
|
1759
|
-
|
|
1801
|
+
c.SHA256 = B._createHelper(a), c.HmacSHA256 = B._createHmacHelper(a);
|
|
1760
1802
|
})(Math), t.SHA256;
|
|
1761
1803
|
});
|
|
1762
|
-
})(
|
|
1804
|
+
})(L0)), L0.exports;
|
|
1763
1805
|
}
|
|
1764
|
-
var
|
|
1765
|
-
function
|
|
1766
|
-
return
|
|
1767
|
-
(function(t, e,
|
|
1768
|
-
r.exports = e(M(),
|
|
1769
|
-
})(
|
|
1806
|
+
var O0 = { exports: {} }, Tt = O0.exports, Qr;
|
|
1807
|
+
function Mt() {
|
|
1808
|
+
return Qr || (Qr = 1, (function(r, d) {
|
|
1809
|
+
(function(t, e, c) {
|
|
1810
|
+
r.exports = e(M(), br());
|
|
1811
|
+
})(Tt, function(t) {
|
|
1770
1812
|
return (function() {
|
|
1771
|
-
var e = t,
|
|
1813
|
+
var e = t, c = e.lib, v = c.WordArray, y = e.algo, B = y.SHA256, C = y.SHA224 = B.extend({
|
|
1772
1814
|
_doReset: function() {
|
|
1773
|
-
this._hash = new
|
|
1815
|
+
this._hash = new v.init([
|
|
1774
1816
|
3238371032,
|
|
1775
1817
|
914150663,
|
|
1776
1818
|
812702999,
|
|
@@ -1782,25 +1824,25 @@ function Rt() {
|
|
|
1782
1824
|
]);
|
|
1783
1825
|
},
|
|
1784
1826
|
_doFinalize: function() {
|
|
1785
|
-
var x =
|
|
1827
|
+
var x = B._doFinalize.call(this);
|
|
1786
1828
|
return x.sigBytes -= 4, x;
|
|
1787
1829
|
}
|
|
1788
1830
|
});
|
|
1789
|
-
e.SHA224 =
|
|
1831
|
+
e.SHA224 = B._createHelper(C), e.HmacSHA224 = B._createHmacHelper(C);
|
|
1790
1832
|
})(), t.SHA224;
|
|
1791
1833
|
});
|
|
1792
|
-
})(
|
|
1834
|
+
})(O0)), O0.exports;
|
|
1793
1835
|
}
|
|
1794
|
-
var
|
|
1795
|
-
function
|
|
1796
|
-
return
|
|
1797
|
-
(function(t, e,
|
|
1798
|
-
r.exports = e(M(),
|
|
1799
|
-
})(
|
|
1836
|
+
var q0 = { exports: {} }, Nt = q0.exports, Vr;
|
|
1837
|
+
function Pe() {
|
|
1838
|
+
return Vr || (Vr = 1, (function(r, d) {
|
|
1839
|
+
(function(t, e, c) {
|
|
1840
|
+
r.exports = e(M(), hr());
|
|
1841
|
+
})(Nt, function(t) {
|
|
1800
1842
|
return (function() {
|
|
1801
|
-
var e = t,
|
|
1843
|
+
var e = t, c = e.lib, v = c.Hasher, y = e.x64, B = y.Word, C = y.WordArray, x = e.algo;
|
|
1802
1844
|
function n() {
|
|
1803
|
-
return
|
|
1845
|
+
return B.create.apply(B, arguments);
|
|
1804
1846
|
}
|
|
1805
1847
|
var E = [
|
|
1806
1848
|
n(1116352408, 3609767458),
|
|
@@ -1885,117 +1927,117 @@ function He() {
|
|
|
1885
1927
|
n(1816402316, 1246189591)
|
|
1886
1928
|
], a = [];
|
|
1887
1929
|
(function() {
|
|
1888
|
-
for (var
|
|
1889
|
-
a[
|
|
1930
|
+
for (var u = 0; u < 80; u++)
|
|
1931
|
+
a[u] = n();
|
|
1890
1932
|
})();
|
|
1891
|
-
var s = x.SHA512 =
|
|
1933
|
+
var s = x.SHA512 = v.extend({
|
|
1892
1934
|
_doReset: function() {
|
|
1893
|
-
this._hash = new
|
|
1894
|
-
new
|
|
1895
|
-
new
|
|
1896
|
-
new
|
|
1897
|
-
new
|
|
1898
|
-
new
|
|
1899
|
-
new
|
|
1900
|
-
new
|
|
1901
|
-
new
|
|
1935
|
+
this._hash = new C.init([
|
|
1936
|
+
new B.init(1779033703, 4089235720),
|
|
1937
|
+
new B.init(3144134277, 2227873595),
|
|
1938
|
+
new B.init(1013904242, 4271175723),
|
|
1939
|
+
new B.init(2773480762, 1595750129),
|
|
1940
|
+
new B.init(1359893119, 2917565137),
|
|
1941
|
+
new B.init(2600822924, 725511199),
|
|
1942
|
+
new B.init(528734635, 4215389547),
|
|
1943
|
+
new B.init(1541459225, 327033209)
|
|
1902
1944
|
]);
|
|
1903
1945
|
},
|
|
1904
|
-
_doProcessBlock: function(
|
|
1905
|
-
for (var
|
|
1906
|
-
var J,
|
|
1907
|
-
if (
|
|
1908
|
-
|
|
1946
|
+
_doProcessBlock: function(u, p) {
|
|
1947
|
+
for (var h = this._hash.words, D = h[0], i = h[1], o = h[2], l = 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 = l.high, q = l.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, Z = R, Q = z, i0 = O, K = q, G = U, Y = T, e0 = N, u0 = j, b0 = S, B0 = f, vr = A, C0 = m, t0 = 0; t0 < 80; t0++) {
|
|
1948
|
+
var J, n0, m0 = a[t0];
|
|
1949
|
+
if (t0 < 16)
|
|
1950
|
+
n0 = m0.high = u[p + t0 * 2] | 0, J = m0.low = u[p + t0 * 2 + 1] | 0;
|
|
1909
1951
|
else {
|
|
1910
|
-
var
|
|
1911
|
-
J =
|
|
1952
|
+
var yr = a[t0 - 15], d0 = yr.high, E0 = yr.low, Te = (d0 >>> 1 | E0 << 31) ^ (d0 >>> 8 | E0 << 24) ^ d0 >>> 7, wr = (E0 >>> 1 | d0 << 31) ^ (E0 >>> 8 | d0 << 24) ^ (E0 >>> 7 | d0 << 25), kr = a[t0 - 2], l0 = kr.high, A0 = kr.low, Me = (l0 >>> 19 | A0 << 13) ^ (l0 << 3 | A0 >>> 29) ^ l0 >>> 6, Sr = (A0 >>> 19 | l0 << 13) ^ (A0 << 3 | l0 >>> 29) ^ (A0 >>> 6 | l0 << 26), Hr = a[t0 - 7], Ne = Hr.high, Ue = Hr.low, Rr = a[t0 - 16], je = Rr.high, $r = Rr.low;
|
|
1953
|
+
J = wr + Ue, n0 = Te + Ne + (J >>> 0 < wr >>> 0 ? 1 : 0), J = J + Sr, n0 = n0 + Me + (J >>> 0 < Sr >>> 0 ? 1 : 0), J = J + $r, n0 = n0 + je + (J >>> 0 < $r >>> 0 ? 1 : 0), m0.high = n0, m0.low = J;
|
|
1912
1954
|
}
|
|
1913
|
-
var
|
|
1914
|
-
|
|
1955
|
+
var Ge = G & e0 ^ ~G & b0, Pr = Y & u0 ^ ~Y & B0, Ke = W & L ^ W & Z ^ L & Z, Xe = P & I ^ P & Q ^ I & Q, Ye = (W >>> 28 | P << 4) ^ (W << 30 | P >>> 2) ^ (W << 25 | P >>> 7), zr = (P >>> 28 | W << 4) ^ (P << 30 | W >>> 2) ^ (P << 25 | W >>> 7), Ze = (G >>> 14 | Y << 18) ^ (G >>> 18 | Y << 14) ^ (G << 23 | Y >>> 9), Qe = (Y >>> 14 | G << 18) ^ (Y >>> 18 | G << 14) ^ (Y << 23 | G >>> 9), Wr = E[t0], Ve = Wr.high, Ir = Wr.low, V = C0 + Qe, a0 = vr + Ze + (V >>> 0 < C0 >>> 0 ? 1 : 0), V = V + Pr, a0 = a0 + Ge + (V >>> 0 < Pr >>> 0 ? 1 : 0), V = V + Ir, a0 = a0 + Ve + (V >>> 0 < Ir >>> 0 ? 1 : 0), V = V + J, a0 = a0 + n0 + (V >>> 0 < J >>> 0 ? 1 : 0), Lr = zr + Xe, Je = Ye + Ke + (Lr >>> 0 < zr >>> 0 ? 1 : 0);
|
|
1956
|
+
vr = b0, C0 = B0, b0 = e0, B0 = u0, e0 = G, u0 = Y, Y = K + V | 0, G = i0 + a0 + (Y >>> 0 < K >>> 0 ? 1 : 0) | 0, i0 = Z, K = Q, Z = L, Q = I, L = W, I = P, P = V + Lr | 0, W = a0 + Je + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1915
1957
|
}
|
|
1916
|
-
F = D.low = F + P, D.high =
|
|
1958
|
+
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 + Z + (z >>> 0 < Q >>> 0 ? 1 : 0), q = l.low = q + K, l.high = O + i0 + (q >>> 0 < K >>> 0 ? 1 : 0), T = b.low = T + Y, b.high = U + G + (T >>> 0 < Y >>> 0 ? 1 : 0), j = g.low = j + u0, g.high = N + e0 + (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 + vr + (m >>> 0 < C0 >>> 0 ? 1 : 0);
|
|
1917
1959
|
},
|
|
1918
1960
|
_doFinalize: function() {
|
|
1919
|
-
var
|
|
1920
|
-
p[D >>> 5] |= 128 << 24 - D % 32, p[(D + 128 >>> 10 << 5) + 30] = Math.floor(
|
|
1961
|
+
var u = this._data, p = u.words, h = this._nDataBytes * 8, D = u.sigBytes * 8;
|
|
1962
|
+
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();
|
|
1921
1963
|
var i = this._hash.toX32();
|
|
1922
1964
|
return i;
|
|
1923
1965
|
},
|
|
1924
1966
|
clone: function() {
|
|
1925
|
-
var
|
|
1926
|
-
return
|
|
1967
|
+
var u = v.clone.call(this);
|
|
1968
|
+
return u._hash = this._hash.clone(), u;
|
|
1927
1969
|
},
|
|
1928
1970
|
blockSize: 1024 / 32
|
|
1929
1971
|
});
|
|
1930
|
-
e.SHA512 =
|
|
1972
|
+
e.SHA512 = v._createHelper(s), e.HmacSHA512 = v._createHmacHelper(s);
|
|
1931
1973
|
})(), t.SHA512;
|
|
1932
1974
|
});
|
|
1933
|
-
})(
|
|
1975
|
+
})(q0)), q0.exports;
|
|
1934
1976
|
}
|
|
1935
|
-
var
|
|
1936
|
-
function
|
|
1937
|
-
return
|
|
1938
|
-
(function(t, e,
|
|
1939
|
-
r.exports = e(M(),
|
|
1940
|
-
})(
|
|
1977
|
+
var T0 = { exports: {} }, Ut = T0.exports, Jr;
|
|
1978
|
+
function jt() {
|
|
1979
|
+
return Jr || (Jr = 1, (function(r, d) {
|
|
1980
|
+
(function(t, e, c) {
|
|
1981
|
+
r.exports = e(M(), hr(), Pe());
|
|
1982
|
+
})(Ut, function(t) {
|
|
1941
1983
|
return (function() {
|
|
1942
|
-
var e = t,
|
|
1984
|
+
var e = t, c = e.x64, v = c.Word, y = c.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1943
1985
|
_doReset: function() {
|
|
1944
|
-
this._hash = new
|
|
1945
|
-
new
|
|
1946
|
-
new
|
|
1947
|
-
new
|
|
1948
|
-
new
|
|
1949
|
-
new
|
|
1950
|
-
new
|
|
1951
|
-
new
|
|
1952
|
-
new
|
|
1986
|
+
this._hash = new y.init([
|
|
1987
|
+
new v.init(3418070365, 3238371032),
|
|
1988
|
+
new v.init(1654270250, 914150663),
|
|
1989
|
+
new v.init(2438529370, 812702999),
|
|
1990
|
+
new v.init(355462360, 4144912697),
|
|
1991
|
+
new v.init(1731405415, 4290775857),
|
|
1992
|
+
new v.init(2394180231, 1750603025),
|
|
1993
|
+
new v.init(3675008525, 1694076839),
|
|
1994
|
+
new v.init(1203062813, 3204075428)
|
|
1953
1995
|
]);
|
|
1954
1996
|
},
|
|
1955
1997
|
_doFinalize: function() {
|
|
1956
|
-
var n =
|
|
1998
|
+
var n = C._doFinalize.call(this);
|
|
1957
1999
|
return n.sigBytes -= 16, n;
|
|
1958
2000
|
}
|
|
1959
2001
|
});
|
|
1960
|
-
e.SHA384 =
|
|
2002
|
+
e.SHA384 = C._createHelper(x), e.HmacSHA384 = C._createHmacHelper(x);
|
|
1961
2003
|
})(), t.SHA384;
|
|
1962
2004
|
});
|
|
1963
|
-
})(
|
|
2005
|
+
})(T0)), T0.exports;
|
|
1964
2006
|
}
|
|
1965
|
-
var
|
|
1966
|
-
function
|
|
1967
|
-
return
|
|
1968
|
-
(function(t, e,
|
|
1969
|
-
r.exports = e(M(),
|
|
1970
|
-
})(
|
|
2007
|
+
var M0 = { exports: {} }, Gt = M0.exports, re;
|
|
2008
|
+
function Kt() {
|
|
2009
|
+
return re || (re = 1, (function(r, d) {
|
|
2010
|
+
(function(t, e, c) {
|
|
2011
|
+
r.exports = e(M(), hr());
|
|
2012
|
+
})(Gt, function(t) {
|
|
1971
2013
|
return (function(e) {
|
|
1972
|
-
var
|
|
2014
|
+
var c = t, v = c.lib, y = v.WordArray, B = v.Hasher, C = c.x64, x = C.Word, n = c.algo, E = [], a = [], s = [];
|
|
1973
2015
|
(function() {
|
|
1974
|
-
for (var
|
|
1975
|
-
E[
|
|
1976
|
-
var o = D % 5,
|
|
1977
|
-
|
|
2016
|
+
for (var h = 1, D = 0, i = 0; i < 24; i++) {
|
|
2017
|
+
E[h + 5 * D] = (i + 1) * (i + 2) / 2 % 64;
|
|
2018
|
+
var o = D % 5, l = (2 * h + 3 * D) % 5;
|
|
2019
|
+
h = o, D = l;
|
|
1978
2020
|
}
|
|
1979
|
-
for (var
|
|
2021
|
+
for (var h = 0; h < 5; h++)
|
|
1980
2022
|
for (var D = 0; D < 5; D++)
|
|
1981
|
-
a[
|
|
2023
|
+
a[h + 5 * D] = D + (2 * h + 3 * D) % 5 * 5;
|
|
1982
2024
|
for (var b = 1, g = 0; g < 24; g++) {
|
|
1983
|
-
for (var
|
|
2025
|
+
for (var _ = 0, k = 0, $ = 0; $ < 7; $++) {
|
|
1984
2026
|
if (b & 1) {
|
|
1985
|
-
var F = (1 <<
|
|
1986
|
-
F < 32 ? k ^= 1 << F :
|
|
2027
|
+
var F = (1 << $) - 1;
|
|
2028
|
+
F < 32 ? k ^= 1 << F : _ ^= 1 << F - 32;
|
|
1987
2029
|
}
|
|
1988
2030
|
b & 128 ? b = b << 1 ^ 113 : b <<= 1;
|
|
1989
2031
|
}
|
|
1990
|
-
s[g] = x.create(
|
|
2032
|
+
s[g] = x.create(_, k);
|
|
1991
2033
|
}
|
|
1992
2034
|
})();
|
|
1993
|
-
var
|
|
2035
|
+
var u = [];
|
|
1994
2036
|
(function() {
|
|
1995
|
-
for (var
|
|
1996
|
-
|
|
2037
|
+
for (var h = 0; h < 25; h++)
|
|
2038
|
+
u[h] = x.create();
|
|
1997
2039
|
})();
|
|
1998
|
-
var p = n.SHA3 =
|
|
2040
|
+
var p = n.SHA3 = B.extend({
|
|
1999
2041
|
/**
|
|
2000
2042
|
* Configuration options.
|
|
2001
2043
|
*
|
|
@@ -2004,82 +2046,82 @@ function Lt() {
|
|
|
2004
2046
|
* Only values permitted are: 224, 256, 384, 512.
|
|
2005
2047
|
* Default: 512
|
|
2006
2048
|
*/
|
|
2007
|
-
cfg:
|
|
2049
|
+
cfg: B.cfg.extend({
|
|
2008
2050
|
outputLength: 512
|
|
2009
2051
|
}),
|
|
2010
2052
|
_doReset: function() {
|
|
2011
|
-
for (var
|
|
2012
|
-
|
|
2053
|
+
for (var h = this._state = [], D = 0; D < 25; D++)
|
|
2054
|
+
h[D] = new x.init();
|
|
2013
2055
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
2014
2056
|
},
|
|
2015
|
-
_doProcessBlock: function(
|
|
2016
|
-
for (var i = this._state, o = this.blockSize / 2,
|
|
2017
|
-
var b =
|
|
2057
|
+
_doProcessBlock: function(h, D) {
|
|
2058
|
+
for (var i = this._state, o = this.blockSize / 2, l = 0; l < o; l++) {
|
|
2059
|
+
var b = h[D + 2 * l], g = h[D + 2 * l + 1];
|
|
2018
2060
|
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360, g = (g << 8 | g >>> 24) & 16711935 | (g << 24 | g >>> 8) & 4278255360;
|
|
2019
|
-
var
|
|
2020
|
-
|
|
2061
|
+
var _ = i[l];
|
|
2062
|
+
_.high ^= g, _.low ^= b;
|
|
2021
2063
|
}
|
|
2022
2064
|
for (var k = 0; k < 24; k++) {
|
|
2023
|
-
for (var
|
|
2065
|
+
for (var $ = 0; $ < 5; $++) {
|
|
2024
2066
|
for (var F = 0, w = 0, H = 0; H < 5; H++) {
|
|
2025
|
-
var
|
|
2026
|
-
F ^=
|
|
2067
|
+
var _ = i[$ + 5 * H];
|
|
2068
|
+
F ^= _.high, w ^= _.low;
|
|
2027
2069
|
}
|
|
2028
|
-
var
|
|
2029
|
-
|
|
2070
|
+
var R = u[$];
|
|
2071
|
+
R.high = F, R.low = w;
|
|
2030
2072
|
}
|
|
2031
|
-
for (var
|
|
2032
|
-
for (var
|
|
2033
|
-
var
|
|
2034
|
-
|
|
2073
|
+
for (var $ = 0; $ < 5; $++)
|
|
2074
|
+
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++) {
|
|
2075
|
+
var _ = i[$ + 5 * H];
|
|
2076
|
+
_.high ^= F, _.low ^= w;
|
|
2035
2077
|
}
|
|
2036
2078
|
for (var T = 1; T < 25; T++) {
|
|
2037
|
-
var F, w,
|
|
2079
|
+
var F, w, _ = i[T], N = _.high, j = _.low, S = E[T];
|
|
2038
2080
|
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);
|
|
2039
|
-
var
|
|
2040
|
-
|
|
2081
|
+
var f = u[a[T]];
|
|
2082
|
+
f.high = F, f.low = w;
|
|
2041
2083
|
}
|
|
2042
|
-
var A =
|
|
2043
|
-
A.high =
|
|
2044
|
-
for (var
|
|
2084
|
+
var A = u[0], m = i[0];
|
|
2085
|
+
A.high = m.high, A.low = m.low;
|
|
2086
|
+
for (var $ = 0; $ < 5; $++)
|
|
2045
2087
|
for (var H = 0; H < 5; H++) {
|
|
2046
|
-
var T =
|
|
2047
|
-
|
|
2088
|
+
var T = $ + 5 * H, _ = i[T], W = u[T], P = u[($ + 1) % 5 + 5 * H], L = u[($ + 2) % 5 + 5 * H];
|
|
2089
|
+
_.high = W.high ^ ~P.high & L.high, _.low = W.low ^ ~P.low & L.low;
|
|
2048
2090
|
}
|
|
2049
|
-
var
|
|
2050
|
-
|
|
2091
|
+
var _ = i[0], I = s[k];
|
|
2092
|
+
_.high ^= I.high, _.low ^= I.low;
|
|
2051
2093
|
}
|
|
2052
2094
|
},
|
|
2053
2095
|
_doFinalize: function() {
|
|
2054
|
-
var
|
|
2096
|
+
var h = this._data, D = h.words;
|
|
2055
2097
|
this._nDataBytes * 8;
|
|
2056
|
-
var i =
|
|
2057
|
-
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128,
|
|
2058
|
-
for (var
|
|
2059
|
-
var
|
|
2060
|
-
F = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360, w = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360,
|
|
2098
|
+
var i = h.sigBytes * 8, o = this.blockSize * 32;
|
|
2099
|
+
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, h.sigBytes = D.length * 4, this._process();
|
|
2100
|
+
for (var l = this._state, b = this.cfg.outputLength / 8, g = b / 8, _ = [], k = 0; k < g; k++) {
|
|
2101
|
+
var $ = l[k], F = $.high, w = $.low;
|
|
2102
|
+
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);
|
|
2061
2103
|
}
|
|
2062
|
-
return new
|
|
2104
|
+
return new y.init(_, b);
|
|
2063
2105
|
},
|
|
2064
2106
|
clone: function() {
|
|
2065
|
-
for (var
|
|
2107
|
+
for (var h = B.clone.call(this), D = h._state = this._state.slice(0), i = 0; i < 25; i++)
|
|
2066
2108
|
D[i] = D[i].clone();
|
|
2067
|
-
return
|
|
2109
|
+
return h;
|
|
2068
2110
|
}
|
|
2069
2111
|
});
|
|
2070
|
-
|
|
2112
|
+
c.SHA3 = B._createHelper(p), c.HmacSHA3 = B._createHmacHelper(p);
|
|
2071
2113
|
})(Math), t.SHA3;
|
|
2072
2114
|
});
|
|
2073
|
-
})(
|
|
2115
|
+
})(M0)), M0.exports;
|
|
2074
2116
|
}
|
|
2075
|
-
var
|
|
2076
|
-
function
|
|
2077
|
-
return
|
|
2117
|
+
var N0 = { exports: {} }, Xt = N0.exports, ee;
|
|
2118
|
+
function Yt() {
|
|
2119
|
+
return ee || (ee = 1, (function(r, d) {
|
|
2078
2120
|
(function(t, e) {
|
|
2079
2121
|
r.exports = e(M());
|
|
2080
|
-
})(
|
|
2122
|
+
})(Xt, function(t) {
|
|
2081
2123
|
return (function(e) {
|
|
2082
|
-
var
|
|
2124
|
+
var c = t, v = c.lib, y = v.WordArray, B = v.Hasher, C = c.algo, x = y.create([
|
|
2083
2125
|
0,
|
|
2084
2126
|
1,
|
|
2085
2127
|
2,
|
|
@@ -2160,7 +2202,7 @@ function qt() {
|
|
|
2160
2202
|
6,
|
|
2161
2203
|
15,
|
|
2162
2204
|
13
|
|
2163
|
-
]), n =
|
|
2205
|
+
]), n = y.create([
|
|
2164
2206
|
5,
|
|
2165
2207
|
14,
|
|
2166
2208
|
7,
|
|
@@ -2241,7 +2283,7 @@ function qt() {
|
|
|
2241
2283
|
3,
|
|
2242
2284
|
9,
|
|
2243
2285
|
11
|
|
2244
|
-
]), E =
|
|
2286
|
+
]), E = y.create([
|
|
2245
2287
|
11,
|
|
2246
2288
|
14,
|
|
2247
2289
|
15,
|
|
@@ -2322,7 +2364,7 @@ function qt() {
|
|
|
2322
2364
|
8,
|
|
2323
2365
|
5,
|
|
2324
2366
|
6
|
|
2325
|
-
]), a =
|
|
2367
|
+
]), a = y.create([
|
|
2326
2368
|
8,
|
|
2327
2369
|
9,
|
|
2328
2370
|
9,
|
|
@@ -2403,67 +2445,67 @@ function qt() {
|
|
|
2403
2445
|
13,
|
|
2404
2446
|
11,
|
|
2405
2447
|
11
|
|
2406
|
-
]), s =
|
|
2448
|
+
]), s = y.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), u = y.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), p = C.RIPEMD160 = B.extend({
|
|
2407
2449
|
_doReset: function() {
|
|
2408
|
-
this._hash =
|
|
2450
|
+
this._hash = y.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2409
2451
|
},
|
|
2410
|
-
_doProcessBlock: function(g,
|
|
2452
|
+
_doProcessBlock: function(g, _) {
|
|
2411
2453
|
for (var k = 0; k < 16; k++) {
|
|
2412
|
-
var
|
|
2413
|
-
g[
|
|
2454
|
+
var $ = _ + k, F = g[$];
|
|
2455
|
+
g[$] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2414
2456
|
}
|
|
2415
|
-
var w = this._hash.words, H = s.words,
|
|
2416
|
-
A = T = w[0],
|
|
2457
|
+
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;
|
|
2458
|
+
A = T = w[0], m = N = w[1], W = j = w[2], P = S = w[3], L = f = w[4];
|
|
2417
2459
|
for (var I, k = 0; k < 80; k += 1)
|
|
2418
|
-
I = T + g[
|
|
2419
|
-
I = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] +
|
|
2460
|
+
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 += l(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 += l(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;
|
|
2461
|
+
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;
|
|
2420
2462
|
},
|
|
2421
2463
|
_doFinalize: function() {
|
|
2422
|
-
var g = this._data,
|
|
2423
|
-
|
|
2464
|
+
var g = this._data, _ = g.words, k = this._nDataBytes * 8, $ = g.sigBytes * 8;
|
|
2465
|
+
_[$ >>> 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();
|
|
2424
2466
|
for (var F = this._hash, w = F.words, H = 0; H < 5; H++) {
|
|
2425
|
-
var
|
|
2426
|
-
w[H] = (
|
|
2467
|
+
var R = w[H];
|
|
2468
|
+
w[H] = (R << 8 | R >>> 24) & 16711935 | (R << 24 | R >>> 8) & 4278255360;
|
|
2427
2469
|
}
|
|
2428
2470
|
return F;
|
|
2429
2471
|
},
|
|
2430
2472
|
clone: function() {
|
|
2431
|
-
var g =
|
|
2473
|
+
var g = B.clone.call(this);
|
|
2432
2474
|
return g._hash = this._hash.clone(), g;
|
|
2433
2475
|
}
|
|
2434
2476
|
});
|
|
2435
|
-
function
|
|
2436
|
-
return g ^
|
|
2477
|
+
function h(g, _, k) {
|
|
2478
|
+
return g ^ _ ^ k;
|
|
2437
2479
|
}
|
|
2438
|
-
function D(g,
|
|
2439
|
-
return g &
|
|
2480
|
+
function D(g, _, k) {
|
|
2481
|
+
return g & _ | ~g & k;
|
|
2440
2482
|
}
|
|
2441
|
-
function i(g,
|
|
2442
|
-
return (g | ~
|
|
2483
|
+
function i(g, _, k) {
|
|
2484
|
+
return (g | ~_) ^ k;
|
|
2443
2485
|
}
|
|
2444
|
-
function o(g,
|
|
2445
|
-
return g & k |
|
|
2486
|
+
function o(g, _, k) {
|
|
2487
|
+
return g & k | _ & ~k;
|
|
2446
2488
|
}
|
|
2447
|
-
function
|
|
2448
|
-
return g ^ (
|
|
2489
|
+
function l(g, _, k) {
|
|
2490
|
+
return g ^ (_ | ~k);
|
|
2449
2491
|
}
|
|
2450
|
-
function b(g,
|
|
2451
|
-
return g <<
|
|
2492
|
+
function b(g, _) {
|
|
2493
|
+
return g << _ | g >>> 32 - _;
|
|
2452
2494
|
}
|
|
2453
|
-
|
|
2495
|
+
c.RIPEMD160 = B._createHelper(p), c.HmacRIPEMD160 = B._createHmacHelper(p);
|
|
2454
2496
|
})(), t.RIPEMD160;
|
|
2455
2497
|
});
|
|
2456
|
-
})(
|
|
2498
|
+
})(N0)), N0.exports;
|
|
2457
2499
|
}
|
|
2458
|
-
var
|
|
2459
|
-
function
|
|
2460
|
-
return
|
|
2500
|
+
var U0 = { exports: {} }, Zt = U0.exports, te;
|
|
2501
|
+
function mr() {
|
|
2502
|
+
return te || (te = 1, (function(r, d) {
|
|
2461
2503
|
(function(t, e) {
|
|
2462
2504
|
r.exports = e(M());
|
|
2463
|
-
})(
|
|
2505
|
+
})(Zt, function(t) {
|
|
2464
2506
|
(function() {
|
|
2465
|
-
var e = t,
|
|
2466
|
-
|
|
2507
|
+
var e = t, c = e.lib, v = c.Base, y = e.enc, B = y.Utf8, C = e.algo;
|
|
2508
|
+
C.HMAC = v.extend({
|
|
2467
2509
|
/**
|
|
2468
2510
|
* Initializes a newly created HMAC.
|
|
2469
2511
|
*
|
|
@@ -2475,12 +2517,12 @@ function Dr() {
|
|
|
2475
2517
|
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
|
|
2476
2518
|
*/
|
|
2477
2519
|
init: function(x, n) {
|
|
2478
|
-
x = this._hasher = new x.init(), typeof n == "string" && (n =
|
|
2520
|
+
x = this._hasher = new x.init(), typeof n == "string" && (n = B.parse(n));
|
|
2479
2521
|
var E = x.blockSize, a = E * 4;
|
|
2480
2522
|
n.sigBytes > a && (n = x.finalize(n)), n.clamp();
|
|
2481
|
-
for (var s = this._oKey = n.clone(),
|
|
2482
|
-
p[D] ^= 1549556828,
|
|
2483
|
-
s.sigBytes =
|
|
2523
|
+
for (var s = this._oKey = n.clone(), u = this._iKey = n.clone(), p = s.words, h = u.words, D = 0; D < E; D++)
|
|
2524
|
+
p[D] ^= 1549556828, h[D] ^= 909522486;
|
|
2525
|
+
s.sigBytes = u.sigBytes = a, this.reset();
|
|
2484
2526
|
},
|
|
2485
2527
|
/**
|
|
2486
2528
|
* Resets this HMAC to its initial state.
|
|
@@ -2531,16 +2573,16 @@ function Dr() {
|
|
|
2531
2573
|
});
|
|
2532
2574
|
})();
|
|
2533
2575
|
});
|
|
2534
|
-
})(
|
|
2576
|
+
})(U0)), U0.exports;
|
|
2535
2577
|
}
|
|
2536
|
-
var
|
|
2537
|
-
function
|
|
2538
|
-
return
|
|
2539
|
-
(function(t, e,
|
|
2540
|
-
r.exports = e(M(),
|
|
2541
|
-
})(
|
|
2578
|
+
var j0 = { exports: {} }, Qt = j0.exports, xe;
|
|
2579
|
+
function Vt() {
|
|
2580
|
+
return xe || (xe = 1, (function(r, d) {
|
|
2581
|
+
(function(t, e, c) {
|
|
2582
|
+
r.exports = e(M(), br(), mr());
|
|
2583
|
+
})(Qt, function(t) {
|
|
2542
2584
|
return (function() {
|
|
2543
|
-
var e = t,
|
|
2585
|
+
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({
|
|
2544
2586
|
/**
|
|
2545
2587
|
* Configuration options.
|
|
2546
2588
|
*
|
|
@@ -2548,9 +2590,9 @@ function Nt() {
|
|
|
2548
2590
|
* @property {Hasher} hasher The hasher to use. Default: SHA256
|
|
2549
2591
|
* @property {number} iterations The number of iterations to perform. Default: 250000
|
|
2550
2592
|
*/
|
|
2551
|
-
cfg:
|
|
2593
|
+
cfg: v.extend({
|
|
2552
2594
|
keySize: 128 / 32,
|
|
2553
|
-
hasher:
|
|
2595
|
+
hasher: C,
|
|
2554
2596
|
iterations: 25e4
|
|
2555
2597
|
}),
|
|
2556
2598
|
/**
|
|
@@ -2580,12 +2622,12 @@ function Nt() {
|
|
|
2580
2622
|
* var key = kdf.compute(password, salt);
|
|
2581
2623
|
*/
|
|
2582
2624
|
compute: function(E, a) {
|
|
2583
|
-
for (var s = this.cfg,
|
|
2584
|
-
var b =
|
|
2585
|
-
|
|
2586
|
-
for (var g = b.words,
|
|
2587
|
-
k =
|
|
2588
|
-
for (var F = k.words, w = 0; w <
|
|
2625
|
+
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, l = s.iterations; D.length < o; ) {
|
|
2626
|
+
var b = u.update(a).finalize(h);
|
|
2627
|
+
u.reset();
|
|
2628
|
+
for (var g = b.words, _ = g.length, k = b, $ = 1; $ < l; $++) {
|
|
2629
|
+
k = u.finalize(k), u.reset();
|
|
2630
|
+
for (var F = k.words, w = 0; w < _; w++)
|
|
2589
2631
|
g[w] ^= F[w];
|
|
2590
2632
|
}
|
|
2591
2633
|
p.concat(b), i[0]++;
|
|
@@ -2598,16 +2640,16 @@ function Nt() {
|
|
|
2598
2640
|
};
|
|
2599
2641
|
})(), t.PBKDF2;
|
|
2600
2642
|
});
|
|
2601
|
-
})(
|
|
2643
|
+
})(j0)), j0.exports;
|
|
2602
2644
|
}
|
|
2603
|
-
var
|
|
2604
|
-
function
|
|
2605
|
-
return
|
|
2606
|
-
(function(t, e,
|
|
2607
|
-
r.exports = e(M(),
|
|
2608
|
-
})(
|
|
2645
|
+
var G0 = { exports: {} }, Jt = G0.exports, ne;
|
|
2646
|
+
function o0() {
|
|
2647
|
+
return ne || (ne = 1, (function(r, d) {
|
|
2648
|
+
(function(t, e, c) {
|
|
2649
|
+
r.exports = e(M(), $e(), mr());
|
|
2650
|
+
})(Jt, function(t) {
|
|
2609
2651
|
return (function() {
|
|
2610
|
-
var e = t,
|
|
2652
|
+
var e = t, c = e.lib, v = c.Base, y = c.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = v.extend({
|
|
2611
2653
|
/**
|
|
2612
2654
|
* Configuration options.
|
|
2613
2655
|
*
|
|
@@ -2615,9 +2657,9 @@ function a0() {
|
|
|
2615
2657
|
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
|
|
2616
2658
|
* @property {number} iterations The number of iterations to perform. Default: 1
|
|
2617
2659
|
*/
|
|
2618
|
-
cfg:
|
|
2660
|
+
cfg: v.extend({
|
|
2619
2661
|
keySize: 128 / 32,
|
|
2620
|
-
hasher:
|
|
2662
|
+
hasher: C,
|
|
2621
2663
|
iterations: 1
|
|
2622
2664
|
}),
|
|
2623
2665
|
/**
|
|
@@ -2647,10 +2689,10 @@ function a0() {
|
|
|
2647
2689
|
* var key = kdf.compute(password, salt);
|
|
2648
2690
|
*/
|
|
2649
2691
|
compute: function(n, E) {
|
|
2650
|
-
for (var a, s = this.cfg,
|
|
2651
|
-
a &&
|
|
2692
|
+
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; ) {
|
|
2693
|
+
a && u.update(a), a = u.update(n).finalize(E), u.reset();
|
|
2652
2694
|
for (var o = 1; o < i; o++)
|
|
2653
|
-
a =
|
|
2695
|
+
a = u.finalize(a), u.reset();
|
|
2654
2696
|
p.concat(a);
|
|
2655
2697
|
}
|
|
2656
2698
|
return p.sigBytes = D * 4, p;
|
|
@@ -2661,24 +2703,24 @@ function a0() {
|
|
|
2661
2703
|
};
|
|
2662
2704
|
})(), t.EvpKDF;
|
|
2663
2705
|
});
|
|
2664
|
-
})(
|
|
2706
|
+
})(G0)), G0.exports;
|
|
2665
2707
|
}
|
|
2666
|
-
var
|
|
2708
|
+
var K0 = { exports: {} }, rx = K0.exports, ae;
|
|
2667
2709
|
function X() {
|
|
2668
|
-
return
|
|
2669
|
-
(function(t, e,
|
|
2670
|
-
r.exports = e(M(),
|
|
2671
|
-
})(
|
|
2710
|
+
return ae || (ae = 1, (function(r, d) {
|
|
2711
|
+
(function(t, e, c) {
|
|
2712
|
+
r.exports = e(M(), o0());
|
|
2713
|
+
})(rx, function(t) {
|
|
2672
2714
|
t.lib.Cipher || (function(e) {
|
|
2673
|
-
var
|
|
2715
|
+
var c = t, v = c.lib, y = v.Base, B = v.WordArray, C = v.BufferedBlockAlgorithm, x = c.enc;
|
|
2674
2716
|
x.Utf8;
|
|
2675
|
-
var n = x.Base64, E =
|
|
2717
|
+
var n = x.Base64, E = c.algo, a = E.EvpKDF, s = v.Cipher = C.extend({
|
|
2676
2718
|
/**
|
|
2677
2719
|
* Configuration options.
|
|
2678
2720
|
*
|
|
2679
2721
|
* @property {WordArray} iv The IV to use for this operation.
|
|
2680
2722
|
*/
|
|
2681
|
-
cfg:
|
|
2723
|
+
cfg: y.extend(),
|
|
2682
2724
|
/**
|
|
2683
2725
|
* Creates this cipher in encryption mode.
|
|
2684
2726
|
*
|
|
@@ -2735,7 +2777,7 @@ function X() {
|
|
|
2735
2777
|
* cipher.reset();
|
|
2736
2778
|
*/
|
|
2737
2779
|
reset: function() {
|
|
2738
|
-
|
|
2780
|
+
C.reset.call(this), this._doReset();
|
|
2739
2781
|
},
|
|
2740
2782
|
/**
|
|
2741
2783
|
* Adds data to be encrypted or decrypted.
|
|
@@ -2790,28 +2832,28 @@ function X() {
|
|
|
2790
2832
|
*/
|
|
2791
2833
|
_createHelper: /* @__PURE__ */ (function() {
|
|
2792
2834
|
function F(w) {
|
|
2793
|
-
return typeof w == "string" ?
|
|
2835
|
+
return typeof w == "string" ? $ : g;
|
|
2794
2836
|
}
|
|
2795
2837
|
return function(w) {
|
|
2796
2838
|
return {
|
|
2797
|
-
encrypt: function(H,
|
|
2798
|
-
return F(
|
|
2839
|
+
encrypt: function(H, R, z) {
|
|
2840
|
+
return F(R).encrypt(w, H, R, z);
|
|
2799
2841
|
},
|
|
2800
|
-
decrypt: function(H,
|
|
2801
|
-
return F(
|
|
2842
|
+
decrypt: function(H, R, z) {
|
|
2843
|
+
return F(R).decrypt(w, H, R, z);
|
|
2802
2844
|
}
|
|
2803
2845
|
};
|
|
2804
2846
|
};
|
|
2805
2847
|
})()
|
|
2806
2848
|
});
|
|
2807
|
-
|
|
2849
|
+
v.StreamCipher = s.extend({
|
|
2808
2850
|
_doFinalize: function() {
|
|
2809
2851
|
var F = this._process(!0);
|
|
2810
2852
|
return F;
|
|
2811
2853
|
},
|
|
2812
2854
|
blockSize: 1
|
|
2813
2855
|
});
|
|
2814
|
-
var
|
|
2856
|
+
var u = c.mode = {}, p = v.BlockCipherMode = y.extend({
|
|
2815
2857
|
/**
|
|
2816
2858
|
* Creates this mode for encryption.
|
|
2817
2859
|
*
|
|
@@ -2855,7 +2897,7 @@ function X() {
|
|
|
2855
2897
|
init: function(F, w) {
|
|
2856
2898
|
this._cipher = F, this._iv = w;
|
|
2857
2899
|
}
|
|
2858
|
-
}),
|
|
2900
|
+
}), h = u.CBC = (function() {
|
|
2859
2901
|
var F = p.extend();
|
|
2860
2902
|
F.Encryptor = F.extend({
|
|
2861
2903
|
/**
|
|
@@ -2868,9 +2910,9 @@ function X() {
|
|
|
2868
2910
|
*
|
|
2869
2911
|
* mode.processBlock(data.words, offset);
|
|
2870
2912
|
*/
|
|
2871
|
-
processBlock: function(H,
|
|
2872
|
-
var
|
|
2873
|
-
w.call(this, H,
|
|
2913
|
+
processBlock: function(H, R) {
|
|
2914
|
+
var z = this._cipher, O = z.blockSize;
|
|
2915
|
+
w.call(this, H, R, O), z.encryptBlock(H, R), this._prevBlock = H.slice(R, R + O);
|
|
2874
2916
|
}
|
|
2875
2917
|
}), F.Decryptor = F.extend({
|
|
2876
2918
|
/**
|
|
@@ -2883,19 +2925,19 @@ function X() {
|
|
|
2883
2925
|
*
|
|
2884
2926
|
* mode.processBlock(data.words, offset);
|
|
2885
2927
|
*/
|
|
2886
|
-
processBlock: function(H,
|
|
2887
|
-
var
|
|
2888
|
-
|
|
2928
|
+
processBlock: function(H, R) {
|
|
2929
|
+
var z = this._cipher, O = z.blockSize, q = H.slice(R, R + O);
|
|
2930
|
+
z.decryptBlock(H, R), w.call(this, H, R, O), this._prevBlock = q;
|
|
2889
2931
|
}
|
|
2890
2932
|
});
|
|
2891
|
-
function w(H,
|
|
2933
|
+
function w(H, R, z) {
|
|
2892
2934
|
var O, q = this._iv;
|
|
2893
2935
|
q ? (O = q, this._iv = e) : O = this._prevBlock;
|
|
2894
|
-
for (var U = 0; U <
|
|
2895
|
-
H[
|
|
2936
|
+
for (var U = 0; U < z; U++)
|
|
2937
|
+
H[R + U] ^= O[U];
|
|
2896
2938
|
}
|
|
2897
2939
|
return F;
|
|
2898
|
-
})(), D =
|
|
2940
|
+
})(), D = c.pad = {}, i = D.Pkcs7 = {
|
|
2899
2941
|
/**
|
|
2900
2942
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
2901
2943
|
*
|
|
@@ -2909,9 +2951,9 @@ function X() {
|
|
|
2909
2951
|
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
|
|
2910
2952
|
*/
|
|
2911
2953
|
pad: function(F, w) {
|
|
2912
|
-
for (var H = w * 4,
|
|
2913
|
-
O.push(
|
|
2914
|
-
var U =
|
|
2954
|
+
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)
|
|
2955
|
+
O.push(z);
|
|
2956
|
+
var U = B.create(O, R);
|
|
2915
2957
|
F.concat(U);
|
|
2916
2958
|
},
|
|
2917
2959
|
/**
|
|
@@ -2930,7 +2972,7 @@ function X() {
|
|
|
2930
2972
|
F.sigBytes -= w;
|
|
2931
2973
|
}
|
|
2932
2974
|
};
|
|
2933
|
-
|
|
2975
|
+
v.BlockCipher = s.extend({
|
|
2934
2976
|
/**
|
|
2935
2977
|
* Configuration options.
|
|
2936
2978
|
*
|
|
@@ -2938,14 +2980,14 @@ function X() {
|
|
|
2938
2980
|
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
|
|
2939
2981
|
*/
|
|
2940
2982
|
cfg: s.cfg.extend({
|
|
2941
|
-
mode:
|
|
2983
|
+
mode: h,
|
|
2942
2984
|
padding: i
|
|
2943
2985
|
}),
|
|
2944
2986
|
reset: function() {
|
|
2945
2987
|
var F;
|
|
2946
2988
|
s.reset.call(this);
|
|
2947
|
-
var w = this.cfg, H = w.iv,
|
|
2948
|
-
this._xformMode == this._ENC_XFORM_MODE ? F =
|
|
2989
|
+
var w = this.cfg, H = w.iv, R = w.mode;
|
|
2990
|
+
this._xformMode == this._ENC_XFORM_MODE ? F = R.createEncryptor : (F = R.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == F ? this._mode.init(this, H && H.words) : (this._mode = F.call(R, this, H && H.words), this._mode.__creator = F);
|
|
2949
2991
|
},
|
|
2950
2992
|
_doProcessBlock: function(F, w) {
|
|
2951
2993
|
this._mode.processBlock(F, w);
|
|
@@ -2956,7 +2998,7 @@ function X() {
|
|
|
2956
2998
|
},
|
|
2957
2999
|
blockSize: 128 / 32
|
|
2958
3000
|
});
|
|
2959
|
-
var o =
|
|
3001
|
+
var o = v.CipherParams = y.extend({
|
|
2960
3002
|
/**
|
|
2961
3003
|
* Initializes a newly created cipher params object.
|
|
2962
3004
|
*
|
|
@@ -2997,7 +3039,7 @@ function X() {
|
|
|
2997
3039
|
toString: function(F) {
|
|
2998
3040
|
return (F || this.formatter).stringify(this);
|
|
2999
3041
|
}
|
|
3000
|
-
}),
|
|
3042
|
+
}), l = c.format = {}, b = l.OpenSSL = {
|
|
3001
3043
|
/**
|
|
3002
3044
|
* Converts a cipher params object to an OpenSSL-compatible string.
|
|
3003
3045
|
*
|
|
@@ -3012,8 +3054,8 @@ function X() {
|
|
|
3012
3054
|
* var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
|
|
3013
3055
|
*/
|
|
3014
3056
|
stringify: function(F) {
|
|
3015
|
-
var w, H = F.ciphertext,
|
|
3016
|
-
return
|
|
3057
|
+
var w, H = F.ciphertext, R = F.salt;
|
|
3058
|
+
return R ? w = B.create([1398893684, 1701076831]).concat(R).concat(H) : w = H, w.toString(n);
|
|
3017
3059
|
},
|
|
3018
3060
|
/**
|
|
3019
3061
|
* Converts an OpenSSL-compatible string to a cipher params object.
|
|
@@ -3029,16 +3071,16 @@ function X() {
|
|
|
3029
3071
|
* var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
|
|
3030
3072
|
*/
|
|
3031
3073
|
parse: function(F) {
|
|
3032
|
-
var w, H = n.parse(F),
|
|
3033
|
-
return
|
|
3074
|
+
var w, H = n.parse(F), R = H.words;
|
|
3075
|
+
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 });
|
|
3034
3076
|
}
|
|
3035
|
-
}, g =
|
|
3077
|
+
}, g = v.SerializableCipher = y.extend({
|
|
3036
3078
|
/**
|
|
3037
3079
|
* Configuration options.
|
|
3038
3080
|
*
|
|
3039
3081
|
* @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
|
|
3040
3082
|
*/
|
|
3041
|
-
cfg:
|
|
3083
|
+
cfg: y.extend({
|
|
3042
3084
|
format: b
|
|
3043
3085
|
}),
|
|
3044
3086
|
/**
|
|
@@ -3059,9 +3101,9 @@ function X() {
|
|
|
3059
3101
|
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
|
|
3060
3102
|
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3061
3103
|
*/
|
|
3062
|
-
encrypt: function(F, w, H,
|
|
3063
|
-
|
|
3064
|
-
var
|
|
3104
|
+
encrypt: function(F, w, H, R) {
|
|
3105
|
+
R = this.cfg.extend(R);
|
|
3106
|
+
var z = F.createEncryptor(H, R), O = z.finalize(w), q = z.cfg;
|
|
3065
3107
|
return o.create({
|
|
3066
3108
|
ciphertext: O,
|
|
3067
3109
|
key: H,
|
|
@@ -3070,7 +3112,7 @@ function X() {
|
|
|
3070
3112
|
mode: q.mode,
|
|
3071
3113
|
padding: q.padding,
|
|
3072
3114
|
blockSize: F.blockSize,
|
|
3073
|
-
formatter:
|
|
3115
|
+
formatter: R.format
|
|
3074
3116
|
});
|
|
3075
3117
|
},
|
|
3076
3118
|
/**
|
|
@@ -3090,10 +3132,10 @@ function X() {
|
|
|
3090
3132
|
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3091
3133
|
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
|
|
3092
3134
|
*/
|
|
3093
|
-
decrypt: function(F, w, H,
|
|
3094
|
-
|
|
3095
|
-
var
|
|
3096
|
-
return
|
|
3135
|
+
decrypt: function(F, w, H, R) {
|
|
3136
|
+
R = this.cfg.extend(R), w = this._parse(w, R.format);
|
|
3137
|
+
var z = F.createDecryptor(H, R).finalize(w.ciphertext);
|
|
3138
|
+
return z;
|
|
3097
3139
|
},
|
|
3098
3140
|
/**
|
|
3099
3141
|
* Converts serialized ciphertext to CipherParams,
|
|
@@ -3113,7 +3155,7 @@ function X() {
|
|
|
3113
3155
|
_parse: function(F, w) {
|
|
3114
3156
|
return typeof F == "string" ? w.parse(F, this) : F;
|
|
3115
3157
|
}
|
|
3116
|
-
}),
|
|
3158
|
+
}), _ = c.kdf = {}, k = _.OpenSSL = {
|
|
3117
3159
|
/**
|
|
3118
3160
|
* Derives a key and IV from a password.
|
|
3119
3161
|
*
|
|
@@ -3131,15 +3173,15 @@ function X() {
|
|
|
3131
3173
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
|
|
3132
3174
|
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
|
|
3133
3175
|
*/
|
|
3134
|
-
execute: function(F, w, H,
|
|
3135
|
-
if (
|
|
3136
|
-
var O = a.create({ keySize: w + H, hasher:
|
|
3176
|
+
execute: function(F, w, H, R, z) {
|
|
3177
|
+
if (R || (R = B.random(64 / 8)), z)
|
|
3178
|
+
var O = a.create({ keySize: w + H, hasher: z }).compute(F, R);
|
|
3137
3179
|
else
|
|
3138
|
-
var O = a.create({ keySize: w + H }).compute(F,
|
|
3139
|
-
var q =
|
|
3140
|
-
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt:
|
|
3180
|
+
var O = a.create({ keySize: w + H }).compute(F, R);
|
|
3181
|
+
var q = B.create(O.words.slice(w), H * 4);
|
|
3182
|
+
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: R });
|
|
3141
3183
|
}
|
|
3142
|
-
},
|
|
3184
|
+
}, $ = v.PasswordBasedCipher = g.extend({
|
|
3143
3185
|
/**
|
|
3144
3186
|
* Configuration options.
|
|
3145
3187
|
*
|
|
@@ -3165,12 +3207,12 @@ function X() {
|
|
|
3165
3207
|
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
|
|
3166
3208
|
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3167
3209
|
*/
|
|
3168
|
-
encrypt: function(F, w, H,
|
|
3169
|
-
|
|
3170
|
-
var
|
|
3171
|
-
|
|
3172
|
-
var O = g.encrypt.call(this, F, w,
|
|
3173
|
-
return O.mixIn(
|
|
3210
|
+
encrypt: function(F, w, H, R) {
|
|
3211
|
+
R = this.cfg.extend(R);
|
|
3212
|
+
var z = R.kdf.execute(H, F.keySize, F.ivSize, R.salt, R.hasher);
|
|
3213
|
+
R.iv = z.iv;
|
|
3214
|
+
var O = g.encrypt.call(this, F, w, z.key, R);
|
|
3215
|
+
return O.mixIn(z), O;
|
|
3174
3216
|
},
|
|
3175
3217
|
/**
|
|
3176
3218
|
* Decrypts serialized ciphertext using a password.
|
|
@@ -3189,228 +3231,228 @@ function X() {
|
|
|
3189
3231
|
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3190
3232
|
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
|
|
3191
3233
|
*/
|
|
3192
|
-
decrypt: function(F, w, H,
|
|
3193
|
-
|
|
3194
|
-
var
|
|
3195
|
-
|
|
3196
|
-
var O = g.decrypt.call(this, F, w,
|
|
3234
|
+
decrypt: function(F, w, H, R) {
|
|
3235
|
+
R = this.cfg.extend(R), w = this._parse(w, R.format);
|
|
3236
|
+
var z = R.kdf.execute(H, F.keySize, F.ivSize, w.salt, R.hasher);
|
|
3237
|
+
R.iv = z.iv;
|
|
3238
|
+
var O = g.decrypt.call(this, F, w, z.key, R);
|
|
3197
3239
|
return O;
|
|
3198
3240
|
}
|
|
3199
3241
|
});
|
|
3200
3242
|
})();
|
|
3201
3243
|
});
|
|
3202
|
-
})(
|
|
3244
|
+
})(K0)), K0.exports;
|
|
3203
3245
|
}
|
|
3204
|
-
var
|
|
3205
|
-
function
|
|
3206
|
-
return
|
|
3207
|
-
(function(t, e,
|
|
3246
|
+
var X0 = { exports: {} }, ex = X0.exports, oe;
|
|
3247
|
+
function tx() {
|
|
3248
|
+
return oe || (oe = 1, (function(r, d) {
|
|
3249
|
+
(function(t, e, c) {
|
|
3208
3250
|
r.exports = e(M(), X());
|
|
3209
|
-
})(
|
|
3251
|
+
})(ex, function(t) {
|
|
3210
3252
|
return t.mode.CFB = (function() {
|
|
3211
3253
|
var e = t.lib.BlockCipherMode.extend();
|
|
3212
3254
|
e.Encryptor = e.extend({
|
|
3213
|
-
processBlock: function(
|
|
3214
|
-
var
|
|
3215
|
-
|
|
3255
|
+
processBlock: function(v, y) {
|
|
3256
|
+
var B = this._cipher, C = B.blockSize;
|
|
3257
|
+
c.call(this, v, y, C, B), this._prevBlock = v.slice(y, y + C);
|
|
3216
3258
|
}
|
|
3217
3259
|
}), e.Decryptor = e.extend({
|
|
3218
|
-
processBlock: function(
|
|
3219
|
-
var
|
|
3220
|
-
|
|
3260
|
+
processBlock: function(v, y) {
|
|
3261
|
+
var B = this._cipher, C = B.blockSize, x = v.slice(y, y + C);
|
|
3262
|
+
c.call(this, v, y, C, B), this._prevBlock = x;
|
|
3221
3263
|
}
|
|
3222
3264
|
});
|
|
3223
|
-
function
|
|
3265
|
+
function c(v, y, B, C) {
|
|
3224
3266
|
var x, n = this._iv;
|
|
3225
|
-
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock,
|
|
3226
|
-
for (var E = 0; E <
|
|
3227
|
-
|
|
3267
|
+
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3268
|
+
for (var E = 0; E < B; E++)
|
|
3269
|
+
v[y + E] ^= x[E];
|
|
3228
3270
|
}
|
|
3229
3271
|
return e;
|
|
3230
3272
|
})(), t.mode.CFB;
|
|
3231
3273
|
});
|
|
3232
|
-
})(
|
|
3274
|
+
})(X0)), X0.exports;
|
|
3233
3275
|
}
|
|
3234
|
-
var
|
|
3235
|
-
function
|
|
3236
|
-
return
|
|
3237
|
-
(function(t, e,
|
|
3276
|
+
var Y0 = { exports: {} }, xx = Y0.exports, ie;
|
|
3277
|
+
function nx() {
|
|
3278
|
+
return ie || (ie = 1, (function(r, d) {
|
|
3279
|
+
(function(t, e, c) {
|
|
3238
3280
|
r.exports = e(M(), X());
|
|
3239
|
-
})(
|
|
3281
|
+
})(xx, function(t) {
|
|
3240
3282
|
return t.mode.CTR = (function() {
|
|
3241
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3242
|
-
processBlock: function(
|
|
3243
|
-
var
|
|
3283
|
+
var e = t.lib.BlockCipherMode.extend(), c = e.Encryptor = e.extend({
|
|
3284
|
+
processBlock: function(v, y) {
|
|
3285
|
+
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3244
3286
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
3245
3287
|
var E = n.slice(0);
|
|
3246
|
-
|
|
3247
|
-
for (var a = 0; a <
|
|
3248
|
-
|
|
3288
|
+
B.encryptBlock(E, 0), n[C - 1] = n[C - 1] + 1 | 0;
|
|
3289
|
+
for (var a = 0; a < C; a++)
|
|
3290
|
+
v[y + a] ^= E[a];
|
|
3249
3291
|
}
|
|
3250
3292
|
});
|
|
3251
|
-
return e.Decryptor =
|
|
3293
|
+
return e.Decryptor = c, e;
|
|
3252
3294
|
})(), t.mode.CTR;
|
|
3253
3295
|
});
|
|
3254
|
-
})(
|
|
3296
|
+
})(Y0)), Y0.exports;
|
|
3255
3297
|
}
|
|
3256
|
-
var
|
|
3257
|
-
function
|
|
3258
|
-
return
|
|
3259
|
-
(function(t, e,
|
|
3298
|
+
var Z0 = { exports: {} }, ax = Z0.exports, se;
|
|
3299
|
+
function ox() {
|
|
3300
|
+
return se || (se = 1, (function(r, d) {
|
|
3301
|
+
(function(t, e, c) {
|
|
3260
3302
|
r.exports = e(M(), X());
|
|
3261
|
-
})(
|
|
3303
|
+
})(ax, function(t) {
|
|
3262
3304
|
return t.mode.CTRGladman = (function() {
|
|
3263
3305
|
var e = t.lib.BlockCipherMode.extend();
|
|
3264
|
-
function
|
|
3265
|
-
if ((
|
|
3266
|
-
var
|
|
3267
|
-
|
|
3306
|
+
function c(B) {
|
|
3307
|
+
if ((B >> 24 & 255) === 255) {
|
|
3308
|
+
var C = B >> 16 & 255, x = B >> 8 & 255, n = B & 255;
|
|
3309
|
+
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;
|
|
3268
3310
|
} else
|
|
3269
|
-
|
|
3270
|
-
return
|
|
3311
|
+
B += 1 << 24;
|
|
3312
|
+
return B;
|
|
3271
3313
|
}
|
|
3272
|
-
function
|
|
3273
|
-
return (
|
|
3314
|
+
function v(B) {
|
|
3315
|
+
return (B[0] = c(B[0])) === 0 && (B[1] = c(B[1])), B;
|
|
3274
3316
|
}
|
|
3275
|
-
var
|
|
3276
|
-
processBlock: function(
|
|
3317
|
+
var y = e.Encryptor = e.extend({
|
|
3318
|
+
processBlock: function(B, C) {
|
|
3277
3319
|
var x = this._cipher, n = x.blockSize, E = this._iv, a = this._counter;
|
|
3278
|
-
E && (a = this._counter = E.slice(0), this._iv = void 0),
|
|
3320
|
+
E && (a = this._counter = E.slice(0), this._iv = void 0), v(a);
|
|
3279
3321
|
var s = a.slice(0);
|
|
3280
3322
|
x.encryptBlock(s, 0);
|
|
3281
|
-
for (var
|
|
3282
|
-
C
|
|
3323
|
+
for (var u = 0; u < n; u++)
|
|
3324
|
+
B[C + u] ^= s[u];
|
|
3283
3325
|
}
|
|
3284
3326
|
});
|
|
3285
|
-
return e.Decryptor =
|
|
3327
|
+
return e.Decryptor = y, e;
|
|
3286
3328
|
})(), t.mode.CTRGladman;
|
|
3287
3329
|
});
|
|
3288
|
-
})(
|
|
3330
|
+
})(Z0)), Z0.exports;
|
|
3289
3331
|
}
|
|
3290
|
-
var
|
|
3291
|
-
function
|
|
3292
|
-
return
|
|
3293
|
-
(function(t, e,
|
|
3332
|
+
var Q0 = { exports: {} }, ix = Q0.exports, ce;
|
|
3333
|
+
function sx() {
|
|
3334
|
+
return ce || (ce = 1, (function(r, d) {
|
|
3335
|
+
(function(t, e, c) {
|
|
3294
3336
|
r.exports = e(M(), X());
|
|
3295
|
-
})(
|
|
3337
|
+
})(ix, function(t) {
|
|
3296
3338
|
return t.mode.OFB = (function() {
|
|
3297
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3298
|
-
processBlock: function(
|
|
3299
|
-
var
|
|
3300
|
-
x && (n = this._keystream = x.slice(0), this._iv = void 0),
|
|
3301
|
-
for (var E = 0; E <
|
|
3302
|
-
|
|
3339
|
+
var e = t.lib.BlockCipherMode.extend(), c = e.Encryptor = e.extend({
|
|
3340
|
+
processBlock: function(v, y) {
|
|
3341
|
+
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3342
|
+
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
3343
|
+
for (var E = 0; E < C; E++)
|
|
3344
|
+
v[y + E] ^= n[E];
|
|
3303
3345
|
}
|
|
3304
3346
|
});
|
|
3305
|
-
return e.Decryptor =
|
|
3347
|
+
return e.Decryptor = c, e;
|
|
3306
3348
|
})(), t.mode.OFB;
|
|
3307
3349
|
});
|
|
3308
|
-
})(
|
|
3350
|
+
})(Q0)), Q0.exports;
|
|
3309
3351
|
}
|
|
3310
|
-
var
|
|
3311
|
-
function
|
|
3312
|
-
return
|
|
3313
|
-
(function(t, e,
|
|
3352
|
+
var V0 = { exports: {} }, cx = V0.exports, fe;
|
|
3353
|
+
function fx() {
|
|
3354
|
+
return fe || (fe = 1, (function(r, d) {
|
|
3355
|
+
(function(t, e, c) {
|
|
3314
3356
|
r.exports = e(M(), X());
|
|
3315
|
-
})(
|
|
3357
|
+
})(cx, function(t) {
|
|
3316
3358
|
return t.mode.ECB = (function() {
|
|
3317
3359
|
var e = t.lib.BlockCipherMode.extend();
|
|
3318
3360
|
return e.Encryptor = e.extend({
|
|
3319
|
-
processBlock: function(
|
|
3320
|
-
this._cipher.encryptBlock(
|
|
3361
|
+
processBlock: function(c, v) {
|
|
3362
|
+
this._cipher.encryptBlock(c, v);
|
|
3321
3363
|
}
|
|
3322
3364
|
}), e.Decryptor = e.extend({
|
|
3323
|
-
processBlock: function(
|
|
3324
|
-
this._cipher.decryptBlock(
|
|
3365
|
+
processBlock: function(c, v) {
|
|
3366
|
+
this._cipher.decryptBlock(c, v);
|
|
3325
3367
|
}
|
|
3326
3368
|
}), e;
|
|
3327
3369
|
})(), t.mode.ECB;
|
|
3328
3370
|
});
|
|
3329
|
-
})(
|
|
3371
|
+
})(V0)), V0.exports;
|
|
3330
3372
|
}
|
|
3331
|
-
var
|
|
3332
|
-
function
|
|
3333
|
-
return
|
|
3334
|
-
(function(t, e,
|
|
3373
|
+
var J0 = { exports: {} }, ux = J0.exports, ue;
|
|
3374
|
+
function dx() {
|
|
3375
|
+
return ue || (ue = 1, (function(r, d) {
|
|
3376
|
+
(function(t, e, c) {
|
|
3335
3377
|
r.exports = e(M(), X());
|
|
3336
|
-
})(
|
|
3378
|
+
})(ux, function(t) {
|
|
3337
3379
|
return t.pad.AnsiX923 = {
|
|
3338
|
-
pad: function(e,
|
|
3339
|
-
var
|
|
3340
|
-
e.clamp(), e.words[
|
|
3380
|
+
pad: function(e, c) {
|
|
3381
|
+
var v = e.sigBytes, y = c * 4, B = y - v % y, C = v + B - 1;
|
|
3382
|
+
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3341
3383
|
},
|
|
3342
3384
|
unpad: function(e) {
|
|
3343
|
-
var
|
|
3344
|
-
e.sigBytes -=
|
|
3385
|
+
var c = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3386
|
+
e.sigBytes -= c;
|
|
3345
3387
|
}
|
|
3346
3388
|
}, t.pad.Ansix923;
|
|
3347
3389
|
});
|
|
3348
|
-
})(
|
|
3390
|
+
})(J0)), J0.exports;
|
|
3349
3391
|
}
|
|
3350
|
-
var
|
|
3351
|
-
function
|
|
3352
|
-
return
|
|
3353
|
-
(function(t, e,
|
|
3392
|
+
var rr = { exports: {} }, lx = rr.exports, de;
|
|
3393
|
+
function hx() {
|
|
3394
|
+
return de || (de = 1, (function(r, d) {
|
|
3395
|
+
(function(t, e, c) {
|
|
3354
3396
|
r.exports = e(M(), X());
|
|
3355
|
-
})(
|
|
3397
|
+
})(lx, function(t) {
|
|
3356
3398
|
return t.pad.Iso10126 = {
|
|
3357
|
-
pad: function(e,
|
|
3358
|
-
var
|
|
3359
|
-
e.concat(t.lib.WordArray.random(
|
|
3399
|
+
pad: function(e, c) {
|
|
3400
|
+
var v = c * 4, y = v - e.sigBytes % v;
|
|
3401
|
+
e.concat(t.lib.WordArray.random(y - 1)).concat(t.lib.WordArray.create([y << 24], 1));
|
|
3360
3402
|
},
|
|
3361
3403
|
unpad: function(e) {
|
|
3362
|
-
var
|
|
3363
|
-
e.sigBytes -=
|
|
3404
|
+
var c = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3405
|
+
e.sigBytes -= c;
|
|
3364
3406
|
}
|
|
3365
3407
|
}, t.pad.Iso10126;
|
|
3366
3408
|
});
|
|
3367
|
-
})(
|
|
3409
|
+
})(rr)), rr.exports;
|
|
3368
3410
|
}
|
|
3369
|
-
var
|
|
3370
|
-
function
|
|
3371
|
-
return
|
|
3372
|
-
(function(t, e,
|
|
3411
|
+
var er = { exports: {} }, vx = er.exports, le;
|
|
3412
|
+
function px() {
|
|
3413
|
+
return le || (le = 1, (function(r, d) {
|
|
3414
|
+
(function(t, e, c) {
|
|
3373
3415
|
r.exports = e(M(), X());
|
|
3374
|
-
})(
|
|
3416
|
+
})(vx, function(t) {
|
|
3375
3417
|
return t.pad.Iso97971 = {
|
|
3376
|
-
pad: function(e,
|
|
3377
|
-
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e,
|
|
3418
|
+
pad: function(e, c) {
|
|
3419
|
+
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e, c);
|
|
3378
3420
|
},
|
|
3379
3421
|
unpad: function(e) {
|
|
3380
3422
|
t.pad.ZeroPadding.unpad(e), e.sigBytes--;
|
|
3381
3423
|
}
|
|
3382
3424
|
}, t.pad.Iso97971;
|
|
3383
3425
|
});
|
|
3384
|
-
})(
|
|
3426
|
+
})(er)), er.exports;
|
|
3385
3427
|
}
|
|
3386
|
-
var
|
|
3387
|
-
function
|
|
3388
|
-
return
|
|
3389
|
-
(function(t, e,
|
|
3428
|
+
var tr = { exports: {} }, Bx = tr.exports, he;
|
|
3429
|
+
function Cx() {
|
|
3430
|
+
return he || (he = 1, (function(r, d) {
|
|
3431
|
+
(function(t, e, c) {
|
|
3390
3432
|
r.exports = e(M(), X());
|
|
3391
|
-
})(
|
|
3433
|
+
})(Bx, function(t) {
|
|
3392
3434
|
return t.pad.ZeroPadding = {
|
|
3393
|
-
pad: function(e,
|
|
3394
|
-
var
|
|
3395
|
-
e.clamp(), e.sigBytes +=
|
|
3435
|
+
pad: function(e, c) {
|
|
3436
|
+
var v = c * 4;
|
|
3437
|
+
e.clamp(), e.sigBytes += v - (e.sigBytes % v || v);
|
|
3396
3438
|
},
|
|
3397
3439
|
unpad: function(e) {
|
|
3398
|
-
for (var
|
|
3399
|
-
if (
|
|
3400
|
-
e.sigBytes =
|
|
3440
|
+
for (var c = e.words, v = e.sigBytes - 1, v = e.sigBytes - 1; v >= 0; v--)
|
|
3441
|
+
if (c[v >>> 2] >>> 24 - v % 4 * 8 & 255) {
|
|
3442
|
+
e.sigBytes = v + 1;
|
|
3401
3443
|
break;
|
|
3402
3444
|
}
|
|
3403
3445
|
}
|
|
3404
3446
|
}, t.pad.ZeroPadding;
|
|
3405
3447
|
});
|
|
3406
|
-
})(
|
|
3448
|
+
})(tr)), tr.exports;
|
|
3407
3449
|
}
|
|
3408
|
-
var
|
|
3409
|
-
function
|
|
3410
|
-
return
|
|
3411
|
-
(function(t, e,
|
|
3450
|
+
var xr = { exports: {} }, Ex = xr.exports, ve;
|
|
3451
|
+
function Ax() {
|
|
3452
|
+
return ve || (ve = 1, (function(r, d) {
|
|
3453
|
+
(function(t, e, c) {
|
|
3412
3454
|
r.exports = e(M(), X());
|
|
3413
|
-
})(
|
|
3455
|
+
})(Ex, function(t) {
|
|
3414
3456
|
return t.pad.NoPadding = {
|
|
3415
3457
|
pad: function() {
|
|
3416
3458
|
},
|
|
@@ -3418,16 +3460,16 @@ function ux() {
|
|
|
3418
3460
|
}
|
|
3419
3461
|
}, t.pad.NoPadding;
|
|
3420
3462
|
});
|
|
3421
|
-
})(
|
|
3463
|
+
})(xr)), xr.exports;
|
|
3422
3464
|
}
|
|
3423
|
-
var
|
|
3424
|
-
function
|
|
3425
|
-
return
|
|
3426
|
-
(function(t, e,
|
|
3465
|
+
var nr = { exports: {} }, Fx = nr.exports, pe;
|
|
3466
|
+
function gx() {
|
|
3467
|
+
return pe || (pe = 1, (function(r, d) {
|
|
3468
|
+
(function(t, e, c) {
|
|
3427
3469
|
r.exports = e(M(), X());
|
|
3428
|
-
})(
|
|
3470
|
+
})(Fx, function(t) {
|
|
3429
3471
|
return (function(e) {
|
|
3430
|
-
var
|
|
3472
|
+
var c = t, v = c.lib, y = v.CipherParams, B = c.enc, C = B.Hex, x = c.format;
|
|
3431
3473
|
x.Hex = {
|
|
3432
3474
|
/**
|
|
3433
3475
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3443,7 +3485,7 @@ function lx() {
|
|
|
3443
3485
|
* var hexString = CryptoJS.format.Hex.stringify(cipherParams);
|
|
3444
3486
|
*/
|
|
3445
3487
|
stringify: function(n) {
|
|
3446
|
-
return n.ciphertext.toString(
|
|
3488
|
+
return n.ciphertext.toString(C);
|
|
3447
3489
|
},
|
|
3448
3490
|
/**
|
|
3449
3491
|
* Converts a hexadecimally encoded ciphertext string to a cipher params object.
|
|
@@ -3459,82 +3501,82 @@ function lx() {
|
|
|
3459
3501
|
* var cipherParams = CryptoJS.format.Hex.parse(hexString);
|
|
3460
3502
|
*/
|
|
3461
3503
|
parse: function(n) {
|
|
3462
|
-
var E =
|
|
3463
|
-
return
|
|
3504
|
+
var E = C.parse(n);
|
|
3505
|
+
return y.create({ ciphertext: E });
|
|
3464
3506
|
}
|
|
3465
3507
|
};
|
|
3466
3508
|
})(), t.format.Hex;
|
|
3467
3509
|
});
|
|
3468
|
-
})(
|
|
3510
|
+
})(nr)), nr.exports;
|
|
3469
3511
|
}
|
|
3470
|
-
var
|
|
3471
|
-
function
|
|
3472
|
-
return
|
|
3473
|
-
(function(t, e,
|
|
3474
|
-
r.exports = e(M(),
|
|
3475
|
-
})(
|
|
3512
|
+
var ar = { exports: {} }, Dx = ar.exports, Be;
|
|
3513
|
+
function bx() {
|
|
3514
|
+
return Be || (Be = 1, (function(r, d) {
|
|
3515
|
+
(function(t, e, c) {
|
|
3516
|
+
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
3517
|
+
})(Dx, function(t) {
|
|
3476
3518
|
return (function() {
|
|
3477
|
-
var e = t,
|
|
3519
|
+
var e = t, c = e.lib, v = c.BlockCipher, y = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], u = [], p = [], h = [];
|
|
3478
3520
|
(function() {
|
|
3479
|
-
for (var o = [],
|
|
3480
|
-
|
|
3481
|
-
for (var b = 0, g = 0,
|
|
3482
|
-
var
|
|
3483
|
-
|
|
3484
|
-
var k = o[b],
|
|
3521
|
+
for (var o = [], l = 0; l < 256; l++)
|
|
3522
|
+
l < 128 ? o[l] = l << 1 : o[l] = l << 1 ^ 283;
|
|
3523
|
+
for (var b = 0, g = 0, l = 0; l < 256; l++) {
|
|
3524
|
+
var _ = g ^ g << 1 ^ g << 2 ^ g << 3 ^ g << 4;
|
|
3525
|
+
_ = _ >>> 8 ^ _ & 255 ^ 99, B[b] = _, C[_] = b;
|
|
3526
|
+
var k = o[b], $ = o[k], F = o[$], w = o[_] * 257 ^ _ * 16843008;
|
|
3485
3527
|
x[b] = w << 24 | w >>> 8, n[b] = w << 16 | w >>> 16, E[b] = w << 8 | w >>> 24, a[b] = w;
|
|
3486
|
-
var w = F * 16843009 ^
|
|
3487
|
-
s[
|
|
3528
|
+
var w = F * 16843009 ^ $ * 65537 ^ k * 257 ^ b * 16843008;
|
|
3529
|
+
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;
|
|
3488
3530
|
}
|
|
3489
3531
|
})();
|
|
3490
|
-
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i =
|
|
3532
|
+
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = y.AES = v.extend({
|
|
3491
3533
|
_doReset: function() {
|
|
3492
3534
|
var o;
|
|
3493
3535
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
3494
|
-
for (var
|
|
3495
|
-
F < g ?
|
|
3536
|
+
for (var l = this._keyPriorReset = this._key, b = l.words, g = l.sigBytes / 4, _ = this._nRounds = g + 6, k = (_ + 1) * 4, $ = this._keySchedule = [], F = 0; F < k; F++)
|
|
3537
|
+
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);
|
|
3496
3538
|
for (var w = this._invKeySchedule = [], H = 0; H < k; H++) {
|
|
3497
3539
|
var F = k - H;
|
|
3498
3540
|
if (H % 4)
|
|
3499
|
-
var o =
|
|
3541
|
+
var o = $[F];
|
|
3500
3542
|
else
|
|
3501
|
-
var o =
|
|
3502
|
-
H < 4 || F <= 4 ? w[H] = o : w[H] = s[
|
|
3543
|
+
var o = $[F - 4];
|
|
3544
|
+
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]];
|
|
3503
3545
|
}
|
|
3504
3546
|
}
|
|
3505
3547
|
},
|
|
3506
|
-
encryptBlock: function(o,
|
|
3507
|
-
this._doCryptBlock(o,
|
|
3548
|
+
encryptBlock: function(o, l) {
|
|
3549
|
+
this._doCryptBlock(o, l, this._keySchedule, x, n, E, a, B);
|
|
3508
3550
|
},
|
|
3509
|
-
decryptBlock: function(o,
|
|
3510
|
-
var b = o[
|
|
3511
|
-
o[
|
|
3512
|
-
var b = o[
|
|
3513
|
-
o[
|
|
3551
|
+
decryptBlock: function(o, l) {
|
|
3552
|
+
var b = o[l + 1];
|
|
3553
|
+
o[l + 1] = o[l + 3], o[l + 3] = b, this._doCryptBlock(o, l, this._invKeySchedule, s, u, p, h, C);
|
|
3554
|
+
var b = o[l + 1];
|
|
3555
|
+
o[l + 1] = o[l + 3], o[l + 3] = b;
|
|
3514
3556
|
},
|
|
3515
|
-
_doCryptBlock: function(o,
|
|
3516
|
-
for (var w = this._nRounds, H = o[
|
|
3517
|
-
var T = g[H >>> 24] ^
|
|
3518
|
-
H = T,
|
|
3557
|
+
_doCryptBlock: function(o, l, b, g, _, k, $, F) {
|
|
3558
|
+
for (var w = this._nRounds, H = o[l] ^ b[0], R = o[l + 1] ^ b[1], z = o[l + 2] ^ b[2], O = o[l + 3] ^ b[3], q = 4, U = 1; U < w; U++) {
|
|
3559
|
+
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++];
|
|
3560
|
+
H = T, R = N, z = j, O = S;
|
|
3519
3561
|
}
|
|
3520
|
-
var T = (F[H >>> 24] << 24 | F[
|
|
3521
|
-
o[
|
|
3562
|
+
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++];
|
|
3563
|
+
o[l] = T, o[l + 1] = N, o[l + 2] = j, o[l + 3] = S;
|
|
3522
3564
|
},
|
|
3523
3565
|
keySize: 256 / 32
|
|
3524
3566
|
});
|
|
3525
|
-
e.AES =
|
|
3567
|
+
e.AES = v._createHelper(i);
|
|
3526
3568
|
})(), t.AES;
|
|
3527
3569
|
});
|
|
3528
|
-
})(
|
|
3570
|
+
})(ar)), ar.exports;
|
|
3529
3571
|
}
|
|
3530
|
-
var
|
|
3531
|
-
function
|
|
3532
|
-
return
|
|
3533
|
-
(function(t, e,
|
|
3534
|
-
r.exports = e(M(),
|
|
3535
|
-
})(
|
|
3572
|
+
var or = { exports: {} }, mx = or.exports, Ce;
|
|
3573
|
+
function _x() {
|
|
3574
|
+
return Ce || (Ce = 1, (function(r, d) {
|
|
3575
|
+
(function(t, e, c) {
|
|
3576
|
+
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
3577
|
+
})(mx, function(t) {
|
|
3536
3578
|
return (function() {
|
|
3537
|
-
var e = t,
|
|
3579
|
+
var e = t, c = e.lib, v = c.WordArray, y = c.BlockCipher, B = e.algo, C = [
|
|
3538
3580
|
57,
|
|
3539
3581
|
49,
|
|
3540
3582
|
41,
|
|
@@ -4178,22 +4220,22 @@ function Bx() {
|
|
|
4178
4220
|
8064,
|
|
4179
4221
|
504,
|
|
4180
4222
|
2147483679
|
|
4181
|
-
], s =
|
|
4223
|
+
], s = B.DES = y.extend({
|
|
4182
4224
|
_doReset: function() {
|
|
4183
|
-
for (var D = this._key, i = D.words, o = [],
|
|
4184
|
-
var b =
|
|
4185
|
-
o[
|
|
4225
|
+
for (var D = this._key, i = D.words, o = [], l = 0; l < 56; l++) {
|
|
4226
|
+
var b = C[l] - 1;
|
|
4227
|
+
o[l] = i[b >>> 5] >>> 31 - b % 32 & 1;
|
|
4186
4228
|
}
|
|
4187
|
-
for (var g = this._subKeys = [],
|
|
4188
|
-
for (var k = g[
|
|
4189
|
-
k[
|
|
4229
|
+
for (var g = this._subKeys = [], _ = 0; _ < 16; _++) {
|
|
4230
|
+
for (var k = g[_] = [], $ = n[_], l = 0; l < 24; l++)
|
|
4231
|
+
k[l / 6 | 0] |= o[(x[l] - 1 + $) % 28] << 31 - l % 6, k[4 + (l / 6 | 0)] |= o[28 + (x[l + 24] - 1 + $) % 28] << 31 - l % 6;
|
|
4190
4232
|
k[0] = k[0] << 1 | k[0] >>> 31;
|
|
4191
|
-
for (var
|
|
4192
|
-
k[
|
|
4233
|
+
for (var l = 1; l < 7; l++)
|
|
4234
|
+
k[l] = k[l] >>> (l - 1) * 4 + 3;
|
|
4193
4235
|
k[7] = k[7] << 5 | k[7] >>> 27;
|
|
4194
4236
|
}
|
|
4195
|
-
for (var F = this._invSubKeys = [],
|
|
4196
|
-
F[
|
|
4237
|
+
for (var F = this._invSubKeys = [], l = 0; l < 16; l++)
|
|
4238
|
+
F[l] = g[15 - l];
|
|
4197
4239
|
},
|
|
4198
4240
|
encryptBlock: function(D, i) {
|
|
4199
4241
|
this._doCryptBlock(D, i, this._subKeys);
|
|
@@ -4202,20 +4244,20 @@ function Bx() {
|
|
|
4202
4244
|
this._doCryptBlock(D, i, this._invSubKeys);
|
|
4203
4245
|
},
|
|
4204
4246
|
_doCryptBlock: function(D, i, o) {
|
|
4205
|
-
this._lBlock = D[i], this._rBlock = D[i + 1],
|
|
4206
|
-
for (var
|
|
4207
|
-
for (var b = o[
|
|
4208
|
-
k |= E[
|
|
4209
|
-
this._lBlock =
|
|
4247
|
+
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);
|
|
4248
|
+
for (var l = 0; l < 16; l++) {
|
|
4249
|
+
for (var b = o[l], g = this._lBlock, _ = this._rBlock, k = 0, $ = 0; $ < 8; $++)
|
|
4250
|
+
k |= E[$][((_ ^ b[$]) & a[$]) >>> 0];
|
|
4251
|
+
this._lBlock = _, this._rBlock = g ^ k;
|
|
4210
4252
|
}
|
|
4211
4253
|
var F = this._lBlock;
|
|
4212
|
-
this._lBlock = this._rBlock, this._rBlock = F,
|
|
4254
|
+
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;
|
|
4213
4255
|
},
|
|
4214
4256
|
keySize: 64 / 32,
|
|
4215
4257
|
ivSize: 64 / 32,
|
|
4216
4258
|
blockSize: 64 / 32
|
|
4217
4259
|
});
|
|
4218
|
-
function
|
|
4260
|
+
function u(D, i) {
|
|
4219
4261
|
var o = (this._lBlock >>> D ^ this._rBlock) & i;
|
|
4220
4262
|
this._rBlock ^= o, this._lBlock ^= o << D;
|
|
4221
4263
|
}
|
|
@@ -4223,14 +4265,14 @@ function Bx() {
|
|
|
4223
4265
|
var o = (this._rBlock >>> D ^ this._lBlock) & i;
|
|
4224
4266
|
this._lBlock ^= o, this._rBlock ^= o << D;
|
|
4225
4267
|
}
|
|
4226
|
-
e.DES =
|
|
4227
|
-
var
|
|
4268
|
+
e.DES = y._createHelper(s);
|
|
4269
|
+
var h = B.TripleDES = y.extend({
|
|
4228
4270
|
_doReset: function() {
|
|
4229
4271
|
var D = this._key, i = D.words;
|
|
4230
4272
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
4231
4273
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4232
|
-
var o = i.slice(0, 2),
|
|
4233
|
-
this._des1 = s.createEncryptor(
|
|
4274
|
+
var o = i.slice(0, 2), l = i.length < 4 ? i.slice(0, 2) : i.slice(2, 4), b = i.length < 6 ? i.slice(0, 2) : i.slice(4, 6);
|
|
4275
|
+
this._des1 = s.createEncryptor(v.create(o)), this._des2 = s.createEncryptor(v.create(l)), this._des3 = s.createEncryptor(v.create(b));
|
|
4234
4276
|
},
|
|
4235
4277
|
encryptBlock: function(D, i) {
|
|
4236
4278
|
this._des1.encryptBlock(D, i), this._des2.decryptBlock(D, i), this._des3.encryptBlock(D, i);
|
|
@@ -4242,76 +4284,76 @@ function Bx() {
|
|
|
4242
4284
|
ivSize: 64 / 32,
|
|
4243
4285
|
blockSize: 64 / 32
|
|
4244
4286
|
});
|
|
4245
|
-
e.TripleDES =
|
|
4287
|
+
e.TripleDES = y._createHelper(h);
|
|
4246
4288
|
})(), t.TripleDES;
|
|
4247
4289
|
});
|
|
4248
|
-
})(
|
|
4290
|
+
})(or)), or.exports;
|
|
4249
4291
|
}
|
|
4250
|
-
var
|
|
4251
|
-
function
|
|
4252
|
-
return
|
|
4253
|
-
(function(t, e,
|
|
4254
|
-
r.exports = e(M(),
|
|
4255
|
-
})(
|
|
4292
|
+
var ir = { exports: {} }, yx = ir.exports, Ee;
|
|
4293
|
+
function wx() {
|
|
4294
|
+
return Ee || (Ee = 1, (function(r, d) {
|
|
4295
|
+
(function(t, e, c) {
|
|
4296
|
+
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4297
|
+
})(yx, function(t) {
|
|
4256
4298
|
return (function() {
|
|
4257
|
-
var e = t,
|
|
4299
|
+
var e = t, c = e.lib, v = c.StreamCipher, y = e.algo, B = y.RC4 = v.extend({
|
|
4258
4300
|
_doReset: function() {
|
|
4259
|
-
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [],
|
|
4260
|
-
s[
|
|
4261
|
-
for (var
|
|
4262
|
-
var
|
|
4263
|
-
p = (p + s[
|
|
4264
|
-
var i = s[
|
|
4265
|
-
s[
|
|
4301
|
+
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], u = 0; u < 256; u++)
|
|
4302
|
+
s[u] = u;
|
|
4303
|
+
for (var u = 0, p = 0; u < 256; u++) {
|
|
4304
|
+
var h = u % a, D = E[h >>> 2] >>> 24 - h % 4 * 8 & 255;
|
|
4305
|
+
p = (p + s[u] + D) % 256;
|
|
4306
|
+
var i = s[u];
|
|
4307
|
+
s[u] = s[p], s[p] = i;
|
|
4266
4308
|
}
|
|
4267
4309
|
this._i = this._j = 0;
|
|
4268
4310
|
},
|
|
4269
4311
|
_doProcessBlock: function(n, E) {
|
|
4270
|
-
n[E] ^=
|
|
4312
|
+
n[E] ^= C.call(this);
|
|
4271
4313
|
},
|
|
4272
4314
|
keySize: 256 / 32,
|
|
4273
4315
|
ivSize: 0
|
|
4274
4316
|
});
|
|
4275
|
-
function
|
|
4276
|
-
for (var n = this._S, E = this._i, a = this._j, s = 0,
|
|
4317
|
+
function C() {
|
|
4318
|
+
for (var n = this._S, E = this._i, a = this._j, s = 0, u = 0; u < 4; u++) {
|
|
4277
4319
|
E = (E + 1) % 256, a = (a + n[E]) % 256;
|
|
4278
4320
|
var p = n[E];
|
|
4279
|
-
n[E] = n[a], n[a] = p, s |= n[(n[E] + n[a]) % 256] << 24 -
|
|
4321
|
+
n[E] = n[a], n[a] = p, s |= n[(n[E] + n[a]) % 256] << 24 - u * 8;
|
|
4280
4322
|
}
|
|
4281
4323
|
return this._i = E, this._j = a, s;
|
|
4282
4324
|
}
|
|
4283
|
-
e.RC4 =
|
|
4284
|
-
var x =
|
|
4325
|
+
e.RC4 = v._createHelper(B);
|
|
4326
|
+
var x = y.RC4Drop = B.extend({
|
|
4285
4327
|
/**
|
|
4286
4328
|
* Configuration options.
|
|
4287
4329
|
*
|
|
4288
4330
|
* @property {number} drop The number of keystream words to drop. Default 192
|
|
4289
4331
|
*/
|
|
4290
|
-
cfg:
|
|
4332
|
+
cfg: B.cfg.extend({
|
|
4291
4333
|
drop: 192
|
|
4292
4334
|
}),
|
|
4293
4335
|
_doReset: function() {
|
|
4294
|
-
|
|
4336
|
+
B._doReset.call(this);
|
|
4295
4337
|
for (var n = this.cfg.drop; n > 0; n--)
|
|
4296
|
-
|
|
4338
|
+
C.call(this);
|
|
4297
4339
|
}
|
|
4298
4340
|
});
|
|
4299
|
-
e.RC4Drop =
|
|
4341
|
+
e.RC4Drop = v._createHelper(x);
|
|
4300
4342
|
})(), t.RC4;
|
|
4301
4343
|
});
|
|
4302
|
-
})(
|
|
4344
|
+
})(ir)), ir.exports;
|
|
4303
4345
|
}
|
|
4304
|
-
var
|
|
4305
|
-
function
|
|
4306
|
-
return
|
|
4307
|
-
(function(t, e,
|
|
4308
|
-
r.exports = e(M(),
|
|
4309
|
-
})(
|
|
4346
|
+
var sr = { exports: {} }, kx = sr.exports, Ae;
|
|
4347
|
+
function Sx() {
|
|
4348
|
+
return Ae || (Ae = 1, (function(r, d) {
|
|
4349
|
+
(function(t, e, c) {
|
|
4350
|
+
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4351
|
+
})(kx, function(t) {
|
|
4310
4352
|
return (function() {
|
|
4311
|
-
var e = t,
|
|
4353
|
+
var e = t, c = e.lib, v = c.StreamCipher, y = e.algo, B = [], C = [], x = [], n = y.Rabbit = v.extend({
|
|
4312
4354
|
_doReset: function() {
|
|
4313
|
-
for (var a = this._key.words, s = this.cfg.iv,
|
|
4314
|
-
a[
|
|
4355
|
+
for (var a = this._key.words, s = this.cfg.iv, u = 0; u < 4; u++)
|
|
4356
|
+
a[u] = (a[u] << 8 | a[u] >>> 24) & 16711935 | (a[u] << 24 | a[u] >>> 8) & 4278255360;
|
|
4315
4357
|
var p = this._X = [
|
|
4316
4358
|
a[0],
|
|
4317
4359
|
a[3] << 16 | a[2] >>> 16,
|
|
@@ -4321,7 +4363,7 @@ function Fx() {
|
|
|
4321
4363
|
a[1] << 16 | a[0] >>> 16,
|
|
4322
4364
|
a[3],
|
|
4323
4365
|
a[2] << 16 | a[1] >>> 16
|
|
4324
|
-
],
|
|
4366
|
+
], h = this._C = [
|
|
4325
4367
|
a[2] << 16 | a[2] >>> 16,
|
|
4326
4368
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4327
4369
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4332,51 +4374,51 @@ function Fx() {
|
|
|
4332
4374
|
a[3] & 4294901760 | a[0] & 65535
|
|
4333
4375
|
];
|
|
4334
4376
|
this._b = 0;
|
|
4335
|
-
for (var
|
|
4377
|
+
for (var u = 0; u < 4; u++)
|
|
4336
4378
|
E.call(this);
|
|
4337
|
-
for (var
|
|
4338
|
-
|
|
4379
|
+
for (var u = 0; u < 8; u++)
|
|
4380
|
+
h[u] ^= p[u + 4 & 7];
|
|
4339
4381
|
if (s) {
|
|
4340
|
-
var D = s.words, i = D[0], o = D[1],
|
|
4341
|
-
|
|
4342
|
-
for (var
|
|
4382
|
+
var D = s.words, i = D[0], o = D[1], l = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = l >>> 16 | b & 4294901760, _ = b << 16 | l & 65535;
|
|
4383
|
+
h[0] ^= l, h[1] ^= g, h[2] ^= b, h[3] ^= _, h[4] ^= l, h[5] ^= g, h[6] ^= b, h[7] ^= _;
|
|
4384
|
+
for (var u = 0; u < 4; u++)
|
|
4343
4385
|
E.call(this);
|
|
4344
4386
|
}
|
|
4345
4387
|
},
|
|
4346
4388
|
_doProcessBlock: function(a, s) {
|
|
4347
|
-
var
|
|
4348
|
-
E.call(this),
|
|
4389
|
+
var u = this._X;
|
|
4390
|
+
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;
|
|
4349
4391
|
for (var p = 0; p < 4; p++)
|
|
4350
|
-
|
|
4392
|
+
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4351
4393
|
},
|
|
4352
4394
|
blockSize: 128 / 32,
|
|
4353
4395
|
ivSize: 64 / 32
|
|
4354
4396
|
});
|
|
4355
4397
|
function E() {
|
|
4356
|
-
for (var a = this._X, s = this._C,
|
|
4357
|
-
|
|
4358
|
-
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 <
|
|
4359
|
-
for (var
|
|
4360
|
-
var p = a[
|
|
4361
|
-
x[
|
|
4398
|
+
for (var a = this._X, s = this._C, u = 0; u < 8; u++)
|
|
4399
|
+
C[u] = s[u];
|
|
4400
|
+
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;
|
|
4401
|
+
for (var u = 0; u < 8; u++) {
|
|
4402
|
+
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);
|
|
4403
|
+
x[u] = i ^ o;
|
|
4362
4404
|
}
|
|
4363
4405
|
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;
|
|
4364
4406
|
}
|
|
4365
|
-
e.Rabbit =
|
|
4407
|
+
e.Rabbit = v._createHelper(n);
|
|
4366
4408
|
})(), t.Rabbit;
|
|
4367
4409
|
});
|
|
4368
|
-
})(
|
|
4410
|
+
})(sr)), sr.exports;
|
|
4369
4411
|
}
|
|
4370
|
-
var
|
|
4371
|
-
function
|
|
4372
|
-
return
|
|
4373
|
-
(function(t, e,
|
|
4374
|
-
r.exports = e(M(),
|
|
4375
|
-
})(
|
|
4412
|
+
var cr = { exports: {} }, Hx = cr.exports, Fe;
|
|
4413
|
+
function Rx() {
|
|
4414
|
+
return Fe || (Fe = 1, (function(r, d) {
|
|
4415
|
+
(function(t, e, c) {
|
|
4416
|
+
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4417
|
+
})(Hx, function(t) {
|
|
4376
4418
|
return (function() {
|
|
4377
|
-
var e = t,
|
|
4419
|
+
var e = t, c = e.lib, v = c.StreamCipher, y = e.algo, B = [], C = [], x = [], n = y.RabbitLegacy = v.extend({
|
|
4378
4420
|
_doReset: function() {
|
|
4379
|
-
var a = this._key.words, s = this.cfg.iv,
|
|
4421
|
+
var a = this._key.words, s = this.cfg.iv, u = this._X = [
|
|
4380
4422
|
a[0],
|
|
4381
4423
|
a[3] << 16 | a[2] >>> 16,
|
|
4382
4424
|
a[1],
|
|
@@ -4396,50 +4438,50 @@ function Dx() {
|
|
|
4396
4438
|
a[3] & 4294901760 | a[0] & 65535
|
|
4397
4439
|
];
|
|
4398
4440
|
this._b = 0;
|
|
4399
|
-
for (var
|
|
4441
|
+
for (var h = 0; h < 4; h++)
|
|
4400
4442
|
E.call(this);
|
|
4401
|
-
for (var
|
|
4402
|
-
p[
|
|
4443
|
+
for (var h = 0; h < 8; h++)
|
|
4444
|
+
p[h] ^= u[h + 4 & 7];
|
|
4403
4445
|
if (s) {
|
|
4404
|
-
var D = s.words, i = D[0], o = D[1],
|
|
4405
|
-
p[0] ^=
|
|
4406
|
-
for (var
|
|
4446
|
+
var D = s.words, i = D[0], o = D[1], l = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = l >>> 16 | b & 4294901760, _ = b << 16 | l & 65535;
|
|
4447
|
+
p[0] ^= l, p[1] ^= g, p[2] ^= b, p[3] ^= _, p[4] ^= l, p[5] ^= g, p[6] ^= b, p[7] ^= _;
|
|
4448
|
+
for (var h = 0; h < 4; h++)
|
|
4407
4449
|
E.call(this);
|
|
4408
4450
|
}
|
|
4409
4451
|
},
|
|
4410
4452
|
_doProcessBlock: function(a, s) {
|
|
4411
|
-
var
|
|
4412
|
-
E.call(this),
|
|
4453
|
+
var u = this._X;
|
|
4454
|
+
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;
|
|
4413
4455
|
for (var p = 0; p < 4; p++)
|
|
4414
|
-
|
|
4456
|
+
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4415
4457
|
},
|
|
4416
4458
|
blockSize: 128 / 32,
|
|
4417
4459
|
ivSize: 64 / 32
|
|
4418
4460
|
});
|
|
4419
4461
|
function E() {
|
|
4420
|
-
for (var a = this._X, s = this._C,
|
|
4421
|
-
|
|
4422
|
-
s[0] = s[0] + 1295307597 + this._b | 0, s[1] = s[1] + 3545052371 + (s[0] >>> 0 <
|
|
4423
|
-
for (var
|
|
4424
|
-
var p = a[
|
|
4425
|
-
x[
|
|
4462
|
+
for (var a = this._X, s = this._C, u = 0; u < 8; u++)
|
|
4463
|
+
C[u] = s[u];
|
|
4464
|
+
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;
|
|
4465
|
+
for (var u = 0; u < 8; u++) {
|
|
4466
|
+
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);
|
|
4467
|
+
x[u] = i ^ o;
|
|
4426
4468
|
}
|
|
4427
4469
|
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;
|
|
4428
4470
|
}
|
|
4429
|
-
e.RabbitLegacy =
|
|
4471
|
+
e.RabbitLegacy = v._createHelper(n);
|
|
4430
4472
|
})(), t.RabbitLegacy;
|
|
4431
4473
|
});
|
|
4432
|
-
})(
|
|
4474
|
+
})(cr)), cr.exports;
|
|
4433
4475
|
}
|
|
4434
|
-
var
|
|
4435
|
-
function
|
|
4436
|
-
return
|
|
4437
|
-
(function(t, e,
|
|
4438
|
-
r.exports = e(M(),
|
|
4439
|
-
})(
|
|
4476
|
+
var fr = { exports: {} }, $x = fr.exports, ge;
|
|
4477
|
+
function Px() {
|
|
4478
|
+
return ge || (ge = 1, (function(r, d) {
|
|
4479
|
+
(function(t, e, c) {
|
|
4480
|
+
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4481
|
+
})($x, function(t) {
|
|
4440
4482
|
return (function() {
|
|
4441
|
-
var e = t,
|
|
4442
|
-
const
|
|
4483
|
+
var e = t, c = e.lib, v = c.BlockCipher, y = e.algo;
|
|
4484
|
+
const B = 16, C = [
|
|
4443
4485
|
608135816,
|
|
4444
4486
|
2242054355,
|
|
4445
4487
|
320440878,
|
|
@@ -5496,163 +5538,163 @@ function mx() {
|
|
|
5496
5538
|
pbox: [],
|
|
5497
5539
|
sbox: []
|
|
5498
5540
|
};
|
|
5499
|
-
function E(
|
|
5500
|
-
let i = D >> 24 & 255, o = D >> 16 & 255,
|
|
5501
|
-
return g = g ^
|
|
5541
|
+
function E(h, D) {
|
|
5542
|
+
let i = D >> 24 & 255, o = D >> 16 & 255, l = D >> 8 & 255, b = D & 255, g = h.sbox[0][i] + h.sbox[1][o];
|
|
5543
|
+
return g = g ^ h.sbox[2][l], g = g + h.sbox[3][b], g;
|
|
5502
5544
|
}
|
|
5503
|
-
function a(
|
|
5504
|
-
let o = D,
|
|
5505
|
-
for (let g = 0; g <
|
|
5506
|
-
o = o ^
|
|
5507
|
-
return b = o, o =
|
|
5545
|
+
function a(h, D, i) {
|
|
5546
|
+
let o = D, l = i, b;
|
|
5547
|
+
for (let g = 0; g < B; ++g)
|
|
5548
|
+
o = o ^ h.pbox[g], l = E(h, o) ^ l, b = o, o = l, l = b;
|
|
5549
|
+
return b = o, o = l, l = b, l = l ^ h.pbox[B], o = o ^ h.pbox[B + 1], { left: o, right: l };
|
|
5508
5550
|
}
|
|
5509
|
-
function s(
|
|
5510
|
-
let o = D,
|
|
5511
|
-
for (let g =
|
|
5512
|
-
o = o ^
|
|
5513
|
-
return b = o, o =
|
|
5551
|
+
function s(h, D, i) {
|
|
5552
|
+
let o = D, l = i, b;
|
|
5553
|
+
for (let g = B + 1; g > 1; --g)
|
|
5554
|
+
o = o ^ h.pbox[g], l = E(h, o) ^ l, b = o, o = l, l = b;
|
|
5555
|
+
return b = o, o = l, l = b, l = l ^ h.pbox[1], o = o ^ h.pbox[0], { left: o, right: l };
|
|
5514
5556
|
}
|
|
5515
|
-
function
|
|
5516
|
-
for (let
|
|
5517
|
-
|
|
5557
|
+
function u(h, D, i) {
|
|
5558
|
+
for (let _ = 0; _ < 4; _++) {
|
|
5559
|
+
h.sbox[_] = [];
|
|
5518
5560
|
for (let k = 0; k < 256; k++)
|
|
5519
|
-
|
|
5561
|
+
h.sbox[_][k] = x[_][k];
|
|
5520
5562
|
}
|
|
5521
5563
|
let o = 0;
|
|
5522
|
-
for (let
|
|
5523
|
-
|
|
5524
|
-
let
|
|
5525
|
-
for (let
|
|
5526
|
-
g = a(
|
|
5527
|
-
for (let
|
|
5564
|
+
for (let _ = 0; _ < B + 2; _++)
|
|
5565
|
+
h.pbox[_] = C[_] ^ D[o], o++, o >= i && (o = 0);
|
|
5566
|
+
let l = 0, b = 0, g = 0;
|
|
5567
|
+
for (let _ = 0; _ < B + 2; _ += 2)
|
|
5568
|
+
g = a(h, l, b), l = g.left, b = g.right, h.pbox[_] = l, h.pbox[_ + 1] = b;
|
|
5569
|
+
for (let _ = 0; _ < 4; _++)
|
|
5528
5570
|
for (let k = 0; k < 256; k += 2)
|
|
5529
|
-
g = a(
|
|
5571
|
+
g = a(h, l, b), l = g.left, b = g.right, h.sbox[_][k] = l, h.sbox[_][k + 1] = b;
|
|
5530
5572
|
return !0;
|
|
5531
5573
|
}
|
|
5532
|
-
var p =
|
|
5574
|
+
var p = y.Blowfish = v.extend({
|
|
5533
5575
|
_doReset: function() {
|
|
5534
5576
|
if (this._keyPriorReset !== this._key) {
|
|
5535
|
-
var
|
|
5536
|
-
|
|
5577
|
+
var h = this._keyPriorReset = this._key, D = h.words, i = h.sigBytes / 4;
|
|
5578
|
+
u(n, D, i);
|
|
5537
5579
|
}
|
|
5538
5580
|
},
|
|
5539
|
-
encryptBlock: function(
|
|
5540
|
-
var i = a(n,
|
|
5541
|
-
|
|
5581
|
+
encryptBlock: function(h, D) {
|
|
5582
|
+
var i = a(n, h[D], h[D + 1]);
|
|
5583
|
+
h[D] = i.left, h[D + 1] = i.right;
|
|
5542
5584
|
},
|
|
5543
|
-
decryptBlock: function(
|
|
5544
|
-
var i = s(n,
|
|
5545
|
-
|
|
5585
|
+
decryptBlock: function(h, D) {
|
|
5586
|
+
var i = s(n, h[D], h[D + 1]);
|
|
5587
|
+
h[D] = i.left, h[D + 1] = i.right;
|
|
5546
5588
|
},
|
|
5547
5589
|
blockSize: 64 / 32,
|
|
5548
5590
|
keySize: 128 / 32,
|
|
5549
5591
|
ivSize: 64 / 32
|
|
5550
5592
|
});
|
|
5551
|
-
e.Blowfish =
|
|
5593
|
+
e.Blowfish = v._createHelper(p);
|
|
5552
5594
|
})(), t.Blowfish;
|
|
5553
5595
|
});
|
|
5554
|
-
})(
|
|
5596
|
+
})(fr)), fr.exports;
|
|
5555
5597
|
}
|
|
5556
|
-
var
|
|
5557
|
-
function
|
|
5558
|
-
return
|
|
5559
|
-
(function(t, e,
|
|
5560
|
-
r.exports = e(M(),
|
|
5561
|
-
})(
|
|
5598
|
+
var zx = k0.exports, De;
|
|
5599
|
+
function Wx() {
|
|
5600
|
+
return De || (De = 1, (function(r, d) {
|
|
5601
|
+
(function(t, e, c) {
|
|
5602
|
+
r.exports = e(M(), hr(), Rt(), Pt(), c0(), It(), f0(), $e(), br(), Mt(), Pe(), jt(), Kt(), Yt(), mr(), Vt(), o0(), X(), tx(), nx(), ox(), sx(), fx(), dx(), hx(), px(), Cx(), Ax(), gx(), bx(), _x(), wx(), Sx(), Rx(), Px());
|
|
5603
|
+
})(zx, function(t) {
|
|
5562
5604
|
return t;
|
|
5563
5605
|
});
|
|
5564
|
-
})(
|
|
5606
|
+
})(k0)), k0.exports;
|
|
5565
5607
|
}
|
|
5566
|
-
|
|
5567
|
-
let
|
|
5608
|
+
Wx();
|
|
5609
|
+
let ze = null, We = null, Ie = null, Le = null;
|
|
5568
5610
|
Math.random().toString(36).substring(7);
|
|
5569
|
-
function
|
|
5570
|
-
|
|
5611
|
+
function Ix(r) {
|
|
5612
|
+
ze = r.token, We = r.apiUrl, Ie = r.deviceId, Le = r.domain;
|
|
5571
5613
|
}
|
|
5572
|
-
function
|
|
5614
|
+
function Lx() {
|
|
5573
5615
|
return {
|
|
5574
|
-
token:
|
|
5575
|
-
apiUrl:
|
|
5576
|
-
deviceId:
|
|
5577
|
-
domain:
|
|
5616
|
+
token: ze,
|
|
5617
|
+
apiUrl: We,
|
|
5618
|
+
deviceId: Ie,
|
|
5619
|
+
domain: Le
|
|
5578
5620
|
};
|
|
5579
5621
|
}
|
|
5580
|
-
function
|
|
5581
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5622
|
+
function Ox(r) {
|
|
5623
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.166`;
|
|
5582
5624
|
}
|
|
5583
|
-
function
|
|
5584
|
-
const t =
|
|
5585
|
-
return new Worker(t, { type: "module", ...
|
|
5625
|
+
function qx(r, d) {
|
|
5626
|
+
const t = Ox(r);
|
|
5627
|
+
return new Worker(t, { type: "module", ...d });
|
|
5586
5628
|
}
|
|
5587
|
-
const
|
|
5629
|
+
const _r = () => {
|
|
5588
5630
|
try {
|
|
5589
5631
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5590
5632
|
} catch {
|
|
5591
5633
|
}
|
|
5592
5634
|
return !1;
|
|
5593
|
-
},
|
|
5594
|
-
|
|
5595
|
-
},
|
|
5596
|
-
|
|
5597
|
-
},
|
|
5598
|
-
let
|
|
5599
|
-
function
|
|
5600
|
-
const
|
|
5601
|
-
if (
|
|
5602
|
-
const t =
|
|
5635
|
+
}, _0 = (...r) => {
|
|
5636
|
+
_r();
|
|
5637
|
+
}, be = (...r) => {
|
|
5638
|
+
_r();
|
|
5639
|
+
}, me = /* @__PURE__ */ new Map(), Fr = /* @__PURE__ */ new Map();
|
|
5640
|
+
let Tx = 0;
|
|
5641
|
+
function Mx(r) {
|
|
5642
|
+
const d = me.get(r);
|
|
5643
|
+
if (d) return d;
|
|
5644
|
+
const t = qx("./deform.worker.ts");
|
|
5603
5645
|
try {
|
|
5604
|
-
t.postMessage({ type: "SET_DEBUG", debugRender:
|
|
5646
|
+
t.postMessage({ type: "SET_DEBUG", debugRender: _r() });
|
|
5605
5647
|
} catch {
|
|
5606
5648
|
}
|
|
5607
|
-
t.onmessage = (
|
|
5608
|
-
const { id:
|
|
5609
|
-
|
|
5610
|
-
hasImageBitmap: !!
|
|
5611
|
-
width:
|
|
5612
|
-
height:
|
|
5613
|
-
error:
|
|
5649
|
+
t.onmessage = (c) => {
|
|
5650
|
+
const { id: v, imageBitmap: y, error: B, duration: C } = c.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5651
|
+
_0(`[renderService] deform worker 响应 id=${v}${x}`, {
|
|
5652
|
+
hasImageBitmap: !!y,
|
|
5653
|
+
width: y?.width,
|
|
5654
|
+
height: y?.height,
|
|
5655
|
+
error: B
|
|
5614
5656
|
});
|
|
5615
|
-
const n =
|
|
5657
|
+
const n = Fr.get(v);
|
|
5616
5658
|
if (n) {
|
|
5617
|
-
if (
|
|
5618
|
-
n.reject(new Error(
|
|
5659
|
+
if (Fr.delete(v), B) {
|
|
5660
|
+
n.reject(new Error(B));
|
|
5619
5661
|
return;
|
|
5620
5662
|
}
|
|
5621
|
-
n.resolve(
|
|
5663
|
+
n.resolve(y);
|
|
5622
5664
|
}
|
|
5623
|
-
}, t.onerror = (
|
|
5665
|
+
}, t.onerror = (c) => {
|
|
5624
5666
|
};
|
|
5625
5667
|
const e = () => {
|
|
5626
|
-
const
|
|
5627
|
-
return
|
|
5628
|
-
hasToken: !!
|
|
5629
|
-
tokenPreview:
|
|
5668
|
+
const c = Lx();
|
|
5669
|
+
return _0("🔍 [workerManager] 检查 License Token:", {
|
|
5670
|
+
hasToken: !!c.token,
|
|
5671
|
+
tokenPreview: c.token ? c.token.substring(0, 20) + "..." : "undefined",
|
|
5630
5672
|
faceId: r,
|
|
5631
5673
|
source: "licenseStore模块"
|
|
5632
|
-
}),
|
|
5674
|
+
}), c.token ? (_0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5633
5675
|
type: "SET_LICENSE",
|
|
5634
|
-
licenseToken:
|
|
5635
|
-
licenseApiUrl:
|
|
5636
|
-
deviceId:
|
|
5637
|
-
domain:
|
|
5676
|
+
licenseToken: c.token,
|
|
5677
|
+
licenseApiUrl: c.apiUrl,
|
|
5678
|
+
deviceId: c.deviceId,
|
|
5679
|
+
domain: c.domain
|
|
5638
5680
|
}), !0) : !1;
|
|
5639
5681
|
};
|
|
5640
|
-
return e() || (
|
|
5641
|
-
e() ||
|
|
5682
|
+
return e() || (_0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
5683
|
+
e() || be("⚠️ [workerManager] 等待后 License Token 仍未设置", { faceId: r });
|
|
5642
5684
|
}, 200), setTimeout(() => {
|
|
5643
|
-
e() ||
|
|
5644
|
-
}, 500)),
|
|
5685
|
+
e() || be("⚠️ [workerManager] 第二次等待后 License Token 仍未设置", { faceId: r });
|
|
5686
|
+
}, 500)), me.set(r, t), t;
|
|
5645
5687
|
}
|
|
5646
|
-
function
|
|
5688
|
+
function Nx(r) {
|
|
5647
5689
|
return {
|
|
5648
5690
|
name: r.name,
|
|
5649
5691
|
type: r.type,
|
|
5650
5692
|
blendMode: r.blendMode,
|
|
5651
5693
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5652
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5653
|
-
x:
|
|
5654
|
-
y:
|
|
5655
|
-
type:
|
|
5694
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((d) => ({
|
|
5695
|
+
x: d.x,
|
|
5696
|
+
y: d.y,
|
|
5697
|
+
type: d.type
|
|
5656
5698
|
})) : [],
|
|
5657
5699
|
bounds: r.bounds ? {
|
|
5658
5700
|
width: r.bounds.width,
|
|
@@ -5675,30 +5717,30 @@ function Px(r) {
|
|
|
5675
5717
|
layerOrder: r.layerOrder,
|
|
5676
5718
|
imagePath: r.imagePath,
|
|
5677
5719
|
vectorMask: r.vectorMask ? {
|
|
5678
|
-
paths: r.vectorMask.paths?.map((
|
|
5679
|
-
open:
|
|
5680
|
-
knots:
|
|
5720
|
+
paths: r.vectorMask.paths?.map((d) => ({
|
|
5721
|
+
open: d.open,
|
|
5722
|
+
knots: d.knots?.map((t) => ({
|
|
5681
5723
|
linked: t.linked,
|
|
5682
5724
|
points: [...t.points]
|
|
5683
5725
|
})),
|
|
5684
|
-
fillRule:
|
|
5685
|
-
operation:
|
|
5726
|
+
fillRule: d.fillRule,
|
|
5727
|
+
operation: d.operation
|
|
5686
5728
|
})),
|
|
5687
|
-
points: r.vectorMask.points?.map((
|
|
5688
|
-
x:
|
|
5689
|
-
y:
|
|
5690
|
-
type:
|
|
5729
|
+
points: r.vectorMask.points?.map((d) => ({
|
|
5730
|
+
x: d.x,
|
|
5731
|
+
y: d.y,
|
|
5732
|
+
type: d.type
|
|
5691
5733
|
})),
|
|
5692
5734
|
invert: r.vectorMask.invert,
|
|
5693
5735
|
notLink: r.vectorMask.notLink,
|
|
5694
5736
|
disable: r.vectorMask.disable,
|
|
5695
5737
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5696
5738
|
} : void 0,
|
|
5697
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5698
|
-
type:
|
|
5699
|
-
enabled:
|
|
5700
|
-
filter:
|
|
5701
|
-
puppetShapeList:
|
|
5739
|
+
filterList: r.filterList ? r.filterList.map((d) => ({
|
|
5740
|
+
type: d.type,
|
|
5741
|
+
enabled: d.enabled,
|
|
5742
|
+
filter: d.filter ? {
|
|
5743
|
+
puppetShapeList: d.filter.puppetShapeList?.map((t) => ({
|
|
5702
5744
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5703
5745
|
x: e.x,
|
|
5704
5746
|
y: e.y
|
|
@@ -5715,179 +5757,179 @@ function Px(r) {
|
|
|
5715
5757
|
clipping: r.clipping
|
|
5716
5758
|
};
|
|
5717
5759
|
}
|
|
5718
|
-
function
|
|
5719
|
-
const
|
|
5720
|
-
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((
|
|
5721
|
-
|
|
5760
|
+
function Ux(r, d, t, e) {
|
|
5761
|
+
const c = ++Tx, v = Mx(t);
|
|
5762
|
+
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((y, B) => {
|
|
5763
|
+
Fr.set(c, {
|
|
5722
5764
|
resolve: (x) => {
|
|
5723
|
-
performance.now(), (/* @__PURE__ */ new Date()).toISOString(),
|
|
5765
|
+
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), y(x);
|
|
5724
5766
|
},
|
|
5725
|
-
reject:
|
|
5767
|
+
reject: B
|
|
5726
5768
|
});
|
|
5727
|
-
const
|
|
5728
|
-
|
|
5769
|
+
const C = Nx(d);
|
|
5770
|
+
v.postMessage({ id: c, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5729
5771
|
r
|
|
5730
5772
|
]);
|
|
5731
5773
|
});
|
|
5732
5774
|
}
|
|
5733
|
-
async function
|
|
5734
|
-
const
|
|
5735
|
-
if (!
|
|
5775
|
+
async function jx(r, d, t = 0, e, c, v) {
|
|
5776
|
+
const y = await gt(r, c, v);
|
|
5777
|
+
if (!y || y.width === 0 || y.height === 0)
|
|
5736
5778
|
throw new Error("图片无效:尺寸为 0");
|
|
5737
|
-
return await
|
|
5779
|
+
return await Ux(y, d, t, e);
|
|
5738
5780
|
}
|
|
5739
|
-
function
|
|
5781
|
+
function h0(r, d) {
|
|
5740
5782
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5741
|
-
return new OffscreenCanvas(r,
|
|
5783
|
+
return new OffscreenCanvas(r, d);
|
|
5742
5784
|
if (typeof document < "u") {
|
|
5743
5785
|
const t = document.createElement("canvas");
|
|
5744
|
-
return t.width = r, t.height =
|
|
5786
|
+
return t.width = r, t.height = d, t;
|
|
5745
5787
|
} else
|
|
5746
5788
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5747
5789
|
}
|
|
5748
|
-
function
|
|
5790
|
+
function g0(r) {
|
|
5749
5791
|
return r.getContext("2d");
|
|
5750
5792
|
}
|
|
5751
|
-
function
|
|
5752
|
-
const
|
|
5753
|
-
if (!
|
|
5793
|
+
function _e(r) {
|
|
5794
|
+
const d = g0(r);
|
|
5795
|
+
if (!d)
|
|
5754
5796
|
throw new Error("无法创建 canvas context");
|
|
5755
|
-
return
|
|
5797
|
+
return d;
|
|
5756
5798
|
}
|
|
5757
|
-
async function
|
|
5758
|
-
const
|
|
5799
|
+
async function Gx(r) {
|
|
5800
|
+
const d = performance.now(), t = () => {
|
|
5759
5801
|
try {
|
|
5760
5802
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5761
5803
|
} catch {
|
|
5762
5804
|
}
|
|
5763
5805
|
return !1;
|
|
5764
|
-
}, e = (...
|
|
5806
|
+
}, e = (...f) => {
|
|
5765
5807
|
t();
|
|
5766
|
-
},
|
|
5808
|
+
}, c = (...f) => {
|
|
5767
5809
|
t();
|
|
5768
5810
|
}, {
|
|
5769
|
-
psdJson:
|
|
5770
|
-
materialList:
|
|
5771
|
-
fabricScreenshotList:
|
|
5772
|
-
width:
|
|
5811
|
+
psdJson: v,
|
|
5812
|
+
materialList: y,
|
|
5813
|
+
fabricScreenshotList: B,
|
|
5814
|
+
width: C,
|
|
5773
5815
|
height: x,
|
|
5774
5816
|
baseUrl: n
|
|
5775
5817
|
} = r, E = r.maxImageSize;
|
|
5776
5818
|
e("[renderByJson] 接收到的数据:", {
|
|
5777
|
-
psdJsonLayerCount:
|
|
5778
|
-
psdJsonLayers:
|
|
5779
|
-
name:
|
|
5780
|
-
type:
|
|
5781
|
-
id:
|
|
5782
|
-
hasChildren: !!
|
|
5783
|
-
childrenCount:
|
|
5784
|
-
children:
|
|
5819
|
+
psdJsonLayerCount: v.layerList?.length || 0,
|
|
5820
|
+
psdJsonLayers: v.layerList?.map((f) => ({
|
|
5821
|
+
name: f.name,
|
|
5822
|
+
type: f.type,
|
|
5823
|
+
id: f.id,
|
|
5824
|
+
hasChildren: !!f.children,
|
|
5825
|
+
childrenCount: f.children?.length || 0,
|
|
5826
|
+
children: f.children?.map((A) => ({
|
|
5785
5827
|
name: A.name,
|
|
5786
5828
|
type: A.type,
|
|
5787
5829
|
isSmartObject: A.isSmartObject,
|
|
5788
5830
|
id: A.id
|
|
5789
5831
|
}))
|
|
5790
5832
|
})),
|
|
5791
|
-
fabricScreenshotListCount:
|
|
5792
|
-
fabricScreenshotList:
|
|
5833
|
+
fabricScreenshotListCount: B.length,
|
|
5834
|
+
fabricScreenshotList: B.map((f) => ({ id: f.id, url: f.url.substring(0, 50) + "..." }))
|
|
5793
5835
|
});
|
|
5794
|
-
const a = (
|
|
5795
|
-
if (!
|
|
5796
|
-
if (/^(https?:)?\/\//i.test(
|
|
5797
|
-
return
|
|
5836
|
+
const a = (f) => {
|
|
5837
|
+
if (!f || typeof f != "string" || !f.includes("http")) return;
|
|
5838
|
+
if (/^(https?:)?\/\//i.test(f) || f.startsWith("data:") || f.startsWith("blob:"))
|
|
5839
|
+
return f;
|
|
5798
5840
|
if (!n)
|
|
5799
|
-
return !
|
|
5841
|
+
return !f.includes("http") && !f.startsWith("data:") && !f.startsWith("blob:") ? void 0 : f;
|
|
5800
5842
|
try {
|
|
5801
|
-
const
|
|
5802
|
-
return !
|
|
5803
|
-
} catch (
|
|
5804
|
-
|
|
5843
|
+
const m = new URL(f, n).toString();
|
|
5844
|
+
return !m.includes("http") && !m.startsWith("data:") && !m.startsWith("blob:") ? void 0 : m;
|
|
5845
|
+
} catch (m) {
|
|
5846
|
+
c(`[renderByJson] 解析图片 URL 失败: ${f}`, m);
|
|
5805
5847
|
return;
|
|
5806
5848
|
}
|
|
5807
|
-
}, s = {},
|
|
5808
|
-
for (const
|
|
5809
|
-
const A =
|
|
5849
|
+
}, s = {}, u = /* @__PURE__ */ new Map();
|
|
5850
|
+
for (const f of y) {
|
|
5851
|
+
const A = f.sourceName || f.layerName;
|
|
5810
5852
|
A && (s[A] = {
|
|
5811
|
-
url:
|
|
5812
|
-
},
|
|
5813
|
-
url:
|
|
5814
|
-
}),
|
|
5853
|
+
url: f.url
|
|
5854
|
+
}, u.set(A, f.url)), f.layerName && f.layerName !== A && (s[f.layerName] || (s[f.layerName] = {
|
|
5855
|
+
url: f.url
|
|
5856
|
+
}), u.set(f.layerName, f.url));
|
|
5815
5857
|
}
|
|
5816
5858
|
const p = /* @__PURE__ */ new Map();
|
|
5817
|
-
for (const
|
|
5818
|
-
p.set(
|
|
5819
|
-
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:",
|
|
5820
|
-
name:
|
|
5821
|
-
type:
|
|
5822
|
-
id:
|
|
5823
|
-
hasChildren: !!
|
|
5824
|
-
childrenCount:
|
|
5859
|
+
for (const f of B)
|
|
5860
|
+
p.set(f.id, f.url);
|
|
5861
|
+
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:", v.layerList?.map((f) => ({
|
|
5862
|
+
name: f.name,
|
|
5863
|
+
type: f.type,
|
|
5864
|
+
id: f.id,
|
|
5865
|
+
hasChildren: !!f.children,
|
|
5866
|
+
childrenCount: f.children?.length || 0
|
|
5825
5867
|
})));
|
|
5826
|
-
function
|
|
5827
|
-
const
|
|
5828
|
-
if (
|
|
5829
|
-
if (
|
|
5830
|
-
const
|
|
5868
|
+
function h(f, A) {
|
|
5869
|
+
const m = f.color || (f.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(f.name) ? f.name : A);
|
|
5870
|
+
if (f.type === "Layer") {
|
|
5871
|
+
if (f.imagePath) {
|
|
5872
|
+
const W = y.find((P) => {
|
|
5831
5873
|
const L = P.sourceName || P.layerName;
|
|
5832
|
-
return !L || !
|
|
5874
|
+
return !L || !f.imagePath ? !1 : L === f.imagePath || L.endsWith(f.imagePath) || f.imagePath.endsWith(L);
|
|
5833
5875
|
});
|
|
5834
|
-
|
|
5835
|
-
url:
|
|
5876
|
+
W && (s[f.imagePath] = {
|
|
5877
|
+
url: W.url
|
|
5836
5878
|
});
|
|
5837
5879
|
}
|
|
5838
|
-
if (
|
|
5839
|
-
if (
|
|
5840
|
-
const
|
|
5880
|
+
if (f.name) {
|
|
5881
|
+
if (m) {
|
|
5882
|
+
const W = `${m}-${f.name}`, P = y.find((L) => {
|
|
5841
5883
|
const I = L.sourceName || L.layerName;
|
|
5842
|
-
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${
|
|
5884
|
+
return I ? (I.split("/").pop() || I).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${m}-${f.name}`) : !1;
|
|
5843
5885
|
});
|
|
5844
|
-
P && (s[
|
|
5886
|
+
P && (s[W] = {
|
|
5845
5887
|
url: P.url
|
|
5846
5888
|
});
|
|
5847
5889
|
}
|
|
5848
|
-
if (
|
|
5849
|
-
const
|
|
5890
|
+
if (f.imagePath && f.name) {
|
|
5891
|
+
const W = f.imagePath.split("/").pop() || f.imagePath, P = y.find((L) => {
|
|
5850
5892
|
const I = L.sourceName || L.layerName;
|
|
5851
|
-
return I ? (I.split("/").pop() || I) ===
|
|
5893
|
+
return I ? (I.split("/").pop() || I) === W : !1;
|
|
5852
5894
|
});
|
|
5853
|
-
P && (s[
|
|
5895
|
+
P && (s[f.imagePath] = {
|
|
5854
5896
|
url: P.url
|
|
5855
5897
|
});
|
|
5856
5898
|
}
|
|
5857
5899
|
}
|
|
5858
5900
|
}
|
|
5859
|
-
if (
|
|
5860
|
-
for (const
|
|
5861
|
-
|
|
5901
|
+
if (f.children)
|
|
5902
|
+
for (const W of f.children)
|
|
5903
|
+
W && h(W, m);
|
|
5862
5904
|
}
|
|
5863
|
-
function D(
|
|
5864
|
-
const
|
|
5865
|
-
if (
|
|
5866
|
-
if (e(`[renderByJson] processLayer 检查 Group: name="${
|
|
5867
|
-
const
|
|
5868
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${
|
|
5869
|
-
e(`[renderByJson] Group "${
|
|
5870
|
-
for (const P of
|
|
5905
|
+
function D(f, A) {
|
|
5906
|
+
const m = f.id ?? A;
|
|
5907
|
+
if (f.type === "Group" && m)
|
|
5908
|
+
if (e(`[renderByJson] processLayer 检查 Group: name="${f.name}", id=${m}, hasFabricScreenshot=${p.has(m)}`), p.has(m)) {
|
|
5909
|
+
const W = p.get(m);
|
|
5910
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${m}, name="${f.name}", url=${W.substring(0, 50)}...`), f.children) {
|
|
5911
|
+
e(`[renderByJson] Group "${f.name}" 有 ${f.children.length} 个子图层`);
|
|
5912
|
+
for (const P of f.children)
|
|
5871
5913
|
if (P && P.isSmartObject === !0) {
|
|
5872
5914
|
const L = P?.name || "";
|
|
5873
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage =
|
|
5915
|
+
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");
|
|
5874
5916
|
}
|
|
5875
5917
|
} else
|
|
5876
|
-
|
|
5918
|
+
c(`[renderByJson] ⚠️ Group id=${m} 没有 children`);
|
|
5877
5919
|
} else
|
|
5878
|
-
e(`[renderByJson] ⚠️ Group id=${
|
|
5879
|
-
if (
|
|
5880
|
-
for (const
|
|
5881
|
-
|
|
5920
|
+
e(`[renderByJson] ⚠️ Group id=${m}, name="${f.name}" 没有匹配的 fabricScreenshot`);
|
|
5921
|
+
if (f.children)
|
|
5922
|
+
for (const W of f.children)
|
|
5923
|
+
W && D(W, m);
|
|
5882
5924
|
}
|
|
5883
|
-
if (
|
|
5884
|
-
for (const
|
|
5885
|
-
|
|
5886
|
-
if (
|
|
5887
|
-
for (const
|
|
5888
|
-
|
|
5889
|
-
const o =
|
|
5890
|
-
psdJson:
|
|
5925
|
+
if (v.layerList)
|
|
5926
|
+
for (const f of v.layerList)
|
|
5927
|
+
f && h(f);
|
|
5928
|
+
if (v.layerList)
|
|
5929
|
+
for (const f of v.layerList)
|
|
5930
|
+
f && D(f);
|
|
5931
|
+
const o = xt([{
|
|
5932
|
+
psdJson: v,
|
|
5891
5933
|
layerExtrasByName: s
|
|
5892
5934
|
}], {
|
|
5893
5935
|
parts: [],
|
|
@@ -5895,59 +5937,59 @@ async function Ix(r) {
|
|
|
5895
5937
|
});
|
|
5896
5938
|
if (!o.models || o.models.length === 0)
|
|
5897
5939
|
throw new Error("无法解析 JSON 数据");
|
|
5898
|
-
const
|
|
5899
|
-
if (!
|
|
5940
|
+
const l = o.models[0];
|
|
5941
|
+
if (!l.psdPartData)
|
|
5900
5942
|
throw new Error("JSON 数据中没有 psdPartData");
|
|
5901
|
-
const b =
|
|
5902
|
-
if (
|
|
5903
|
-
return s[
|
|
5904
|
-
if (
|
|
5905
|
-
const A =
|
|
5943
|
+
const b = l.width, g = l.height, _ = h0(b, g), k = _e(_), $ = [], F = (f) => {
|
|
5944
|
+
if (f.url && s[f.url])
|
|
5945
|
+
return s[f.url];
|
|
5946
|
+
if (f.url) {
|
|
5947
|
+
const A = f.url.split("/").pop() || f.url;
|
|
5906
5948
|
if (s[A])
|
|
5907
5949
|
return s[A];
|
|
5908
|
-
const
|
|
5909
|
-
const P =
|
|
5910
|
-
return !P || !
|
|
5950
|
+
const m = y.find((W) => {
|
|
5951
|
+
const P = W.sourceName || W.layerName;
|
|
5952
|
+
return !P || !f.url ? !1 : (P.split("/").pop() || P) === A || P === f.url || P.endsWith(f.url) || f.url.endsWith(P);
|
|
5911
5953
|
});
|
|
5912
|
-
if (
|
|
5913
|
-
const
|
|
5914
|
-
if (
|
|
5915
|
-
return s[
|
|
5954
|
+
if (m) {
|
|
5955
|
+
const W = m.sourceName || m.layerName;
|
|
5956
|
+
if (W)
|
|
5957
|
+
return s[W] || { url: m.url };
|
|
5916
5958
|
}
|
|
5917
5959
|
}
|
|
5918
5960
|
};
|
|
5919
|
-
for (let
|
|
5920
|
-
const A =
|
|
5921
|
-
if (A.type ===
|
|
5922
|
-
if (!
|
|
5923
|
-
|
|
5961
|
+
for (let f = 0; f < l.psdPartData.length; f++) {
|
|
5962
|
+
const A = l.psdPartData[f], m = F(A);
|
|
5963
|
+
if (A.type === D0.Layer) {
|
|
5964
|
+
if (!m || !m.url) {
|
|
5965
|
+
c(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5924
5966
|
continue;
|
|
5925
5967
|
}
|
|
5926
|
-
const
|
|
5968
|
+
const W = m.url, P = a(W);
|
|
5927
5969
|
if (!P) {
|
|
5928
|
-
|
|
5970
|
+
c(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5929
5971
|
continue;
|
|
5930
5972
|
}
|
|
5931
|
-
|
|
5932
|
-
index:
|
|
5973
|
+
$.push({
|
|
5974
|
+
index: f,
|
|
5933
5975
|
type: "layer",
|
|
5934
5976
|
partData: A,
|
|
5935
|
-
promise:
|
|
5977
|
+
promise: Dt(P, E, n).catch((L) => null)
|
|
5936
5978
|
});
|
|
5937
|
-
} else if (A.type ===
|
|
5979
|
+
} else if (A.type === D0.Group) {
|
|
5938
5980
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
5939
5981
|
continue;
|
|
5940
|
-
for (let
|
|
5941
|
-
const P = A.smartObjects[
|
|
5982
|
+
for (let W = 0; W < A.smartObjects.length; W++) {
|
|
5983
|
+
const P = A.smartObjects[W];
|
|
5942
5984
|
if (!P || !P.name)
|
|
5943
5985
|
continue;
|
|
5944
|
-
let L = s[P.name] ??
|
|
5986
|
+
let L = s[P.name] ?? m;
|
|
5945
5987
|
if (!L && P.imagePath && (L = s[P.imagePath], !L)) {
|
|
5946
5988
|
const K = P.imagePath.split("/").pop() || P.imagePath;
|
|
5947
5989
|
if (L = s[K], !L) {
|
|
5948
|
-
const G =
|
|
5949
|
-
const
|
|
5950
|
-
return !
|
|
5990
|
+
const G = y.find((Y) => {
|
|
5991
|
+
const e0 = Y.sourceName || Y.layerName;
|
|
5992
|
+
return !e0 || !P.imagePath ? !1 : (e0.split("/").pop() || e0) === K || e0 === P.imagePath || e0.endsWith(P.imagePath) || P.imagePath.endsWith(e0);
|
|
5951
5993
|
});
|
|
5952
5994
|
G && (L = { url: G.url });
|
|
5953
5995
|
}
|
|
@@ -5958,24 +6000,24 @@ async function Ix(r) {
|
|
|
5958
6000
|
if (!I)
|
|
5959
6001
|
continue;
|
|
5960
6002
|
if (typeof I == "string") {
|
|
5961
|
-
/^(https?:)?\/\//i.test(I) || I.startsWith("data:") || I.startsWith("blob:") || (I =
|
|
6003
|
+
/^(https?:)?\/\//i.test(I) || I.startsWith("data:") || I.startsWith("blob:") || (I = u.get(I) ?? I);
|
|
5962
6004
|
const G = a(I);
|
|
5963
6005
|
if (!G)
|
|
5964
6006
|
continue;
|
|
5965
6007
|
I = G;
|
|
5966
6008
|
}
|
|
5967
|
-
const
|
|
5968
|
-
|
|
5969
|
-
index:
|
|
6009
|
+
const Z = (A.partId ?? A.id) * 100 + W, Q = at(nt(P)), i0 = { width: b, height: g };
|
|
6010
|
+
$.push({
|
|
6011
|
+
index: f + W * 0.01,
|
|
5970
6012
|
type: "group",
|
|
5971
6013
|
partData: A,
|
|
5972
6014
|
smartObject: P,
|
|
5973
6015
|
maskData: Q,
|
|
5974
|
-
promise:
|
|
6016
|
+
promise: jx(
|
|
5975
6017
|
I,
|
|
5976
6018
|
P,
|
|
5977
|
-
|
|
5978
|
-
|
|
6019
|
+
Z,
|
|
6020
|
+
i0,
|
|
5979
6021
|
E,
|
|
5980
6022
|
n
|
|
5981
6023
|
).catch((K) => null)
|
|
@@ -5983,152 +6025,152 @@ async function Ix(r) {
|
|
|
5983
6025
|
}
|
|
5984
6026
|
}
|
|
5985
6027
|
}
|
|
5986
|
-
const w = await Promise.all(
|
|
5987
|
-
task:
|
|
6028
|
+
const w = await Promise.all($.map((f) => f.promise)), H = $.map((f, A) => ({
|
|
6029
|
+
task: f,
|
|
5988
6030
|
imageBitmap: w[A]
|
|
5989
|
-
})).sort((
|
|
5990
|
-
const
|
|
5991
|
-
return
|
|
6031
|
+
})).sort((f, A) => {
|
|
6032
|
+
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;
|
|
6033
|
+
return m - W;
|
|
5992
6034
|
});
|
|
5993
|
-
let
|
|
5994
|
-
for (let
|
|
5995
|
-
const { task: A, imageBitmap:
|
|
5996
|
-
if (!
|
|
5997
|
-
|
|
6035
|
+
let R = h0(b, g), z = g0(R), O = !1, q = "normal";
|
|
6036
|
+
for (let f = 0; f < H.length; f++) {
|
|
6037
|
+
const { task: A, imageBitmap: m } = H[f];
|
|
6038
|
+
if (!m) {
|
|
6039
|
+
c(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
5998
6040
|
continue;
|
|
5999
6041
|
}
|
|
6000
|
-
const { partData:
|
|
6042
|
+
const { partData: W } = A, P = W.bounds;
|
|
6001
6043
|
let L;
|
|
6002
|
-
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ??
|
|
6044
|
+
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? W.opacity : L = W.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
6003
6045
|
let I;
|
|
6004
|
-
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ??
|
|
6005
|
-
const
|
|
6046
|
+
A.type === "group" && A.smartObject ? I = A.smartObject.clipping ?? W.clipping === !0 : I = W.clipping === !0;
|
|
6047
|
+
const Z = H[f + 1];
|
|
6006
6048
|
let Q = !1;
|
|
6007
|
-
if (
|
|
6008
|
-
const K =
|
|
6009
|
-
|
|
6049
|
+
if (Z) {
|
|
6050
|
+
const K = Z.task.partData;
|
|
6051
|
+
Z.task.type === "group" && Z.task.smartObject ? Q = Z.task.smartObject.clipping ?? K.clipping === !0 : Q = K.clipping === !0;
|
|
6010
6052
|
}
|
|
6011
|
-
const
|
|
6012
|
-
if (e(`[renderByJson] 绘制图层 "${
|
|
6053
|
+
const i0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : W?.name || "未命名图层";
|
|
6054
|
+
if (e(`[renderByJson] 绘制图层 "${i0}"`, {
|
|
6013
6055
|
type: A.type,
|
|
6014
|
-
bitmapSize: { width:
|
|
6056
|
+
bitmapSize: { width: m.width, height: m.height },
|
|
6015
6057
|
bounds: P,
|
|
6016
6058
|
hasMask: !!A.maskData,
|
|
6017
|
-
blendMode:
|
|
6059
|
+
blendMode: W.blendMode,
|
|
6018
6060
|
opacity: L,
|
|
6019
6061
|
clipping: I
|
|
6020
6062
|
}), !I && Q) {
|
|
6021
|
-
if (O = !0, q =
|
|
6022
|
-
if (
|
|
6063
|
+
if (O = !0, q = W.blendMode || "normal", z) {
|
|
6064
|
+
if (z.clearRect(0, 0, b, g), z.globalCompositeOperation = "source-over", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6023
6065
|
if (A.maskData) {
|
|
6024
|
-
const K =
|
|
6025
|
-
G && (G.drawImage(
|
|
6066
|
+
const K = h0(b, g), G = g0(K);
|
|
6067
|
+
G && (G.drawImage(m, 0, 0), pr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6026
6068
|
} else
|
|
6027
|
-
|
|
6028
|
-
else A.type === "layer" && (P ?
|
|
6029
|
-
|
|
6069
|
+
z.drawImage(m, 0, 0);
|
|
6070
|
+
else A.type === "layer" && (P ? z.drawImage(
|
|
6071
|
+
m,
|
|
6030
6072
|
P.left,
|
|
6031
6073
|
P.top,
|
|
6032
6074
|
P.width,
|
|
6033
6075
|
P.height
|
|
6034
|
-
) :
|
|
6035
|
-
|
|
6076
|
+
) : z.drawImage(m, 0, 0));
|
|
6077
|
+
z.globalAlpha = 1;
|
|
6036
6078
|
}
|
|
6037
6079
|
} else if (I) {
|
|
6038
|
-
if (
|
|
6039
|
-
if (
|
|
6080
|
+
if (z) {
|
|
6081
|
+
if (z.globalCompositeOperation = "source-atop", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6040
6082
|
if (A.maskData) {
|
|
6041
|
-
const K =
|
|
6042
|
-
G && (G.drawImage(
|
|
6083
|
+
const K = h0(b, g), G = g0(K);
|
|
6084
|
+
G && (G.drawImage(m, 0, 0), pr(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6043
6085
|
} else
|
|
6044
|
-
|
|
6045
|
-
else A.type === "layer" && (P ?
|
|
6046
|
-
|
|
6086
|
+
z.drawImage(m, 0, 0);
|
|
6087
|
+
else A.type === "layer" && (P ? z.drawImage(
|
|
6088
|
+
m,
|
|
6047
6089
|
P.left,
|
|
6048
6090
|
P.top,
|
|
6049
6091
|
P.width,
|
|
6050
6092
|
P.height
|
|
6051
|
-
) :
|
|
6052
|
-
|
|
6093
|
+
) : z.drawImage(m, 0, 0));
|
|
6094
|
+
z.globalAlpha = 1, z.globalCompositeOperation = "source-over";
|
|
6053
6095
|
}
|
|
6054
6096
|
} else {
|
|
6055
|
-
if (k.globalCompositeOperation =
|
|
6097
|
+
if (k.globalCompositeOperation = Tr(W.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6056
6098
|
if (A.maskData) {
|
|
6057
|
-
const K =
|
|
6058
|
-
G && (G.drawImage(
|
|
6099
|
+
const K = h0(b, g), G = g0(K);
|
|
6100
|
+
G && (G.drawImage(m, 0, 0), pr(G, A.maskData), k.drawImage(K, 0, 0));
|
|
6059
6101
|
} else
|
|
6060
|
-
k.drawImage(
|
|
6102
|
+
k.drawImage(m, 0, 0);
|
|
6061
6103
|
else A.type === "layer" && (P ? k.drawImage(
|
|
6062
|
-
|
|
6104
|
+
m,
|
|
6063
6105
|
P.left,
|
|
6064
6106
|
P.top,
|
|
6065
6107
|
P.width,
|
|
6066
6108
|
P.height
|
|
6067
|
-
) : k.drawImage(
|
|
6109
|
+
) : k.drawImage(m, 0, 0));
|
|
6068
6110
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6069
6111
|
}
|
|
6070
|
-
O && !Q && (k.globalCompositeOperation =
|
|
6112
|
+
O && !Q && (k.globalCompositeOperation = Tr(q), k.drawImage(R, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6071
6113
|
}
|
|
6072
|
-
|
|
6073
|
-
let U =
|
|
6074
|
-
if (
|
|
6075
|
-
if (
|
|
6076
|
-
T =
|
|
6077
|
-
else if (
|
|
6078
|
-
const A =
|
|
6079
|
-
T =
|
|
6114
|
+
R = null, z = null;
|
|
6115
|
+
let U = _, T = b, N = g;
|
|
6116
|
+
if (C !== void 0 || x !== void 0) {
|
|
6117
|
+
if (C !== void 0 && x !== void 0)
|
|
6118
|
+
T = C, N = x;
|
|
6119
|
+
else if (C !== void 0) {
|
|
6120
|
+
const A = C / b;
|
|
6121
|
+
T = C, N = Math.round(g * A);
|
|
6080
6122
|
} else if (x !== void 0) {
|
|
6081
6123
|
const A = x / g;
|
|
6082
6124
|
T = Math.round(b * A), N = x;
|
|
6083
6125
|
}
|
|
6084
|
-
U =
|
|
6085
|
-
const
|
|
6086
|
-
|
|
6126
|
+
U = h0(T, N);
|
|
6127
|
+
const f = _e(U);
|
|
6128
|
+
f.imageSmoothingEnabled = !0, f.imageSmoothingQuality = "high", f.drawImage(_, 0, 0, b, g, 0, 0, T, N), e(`[renderByJson] 已缩放结果: ${b}x${g} -> ${T}x${N}`);
|
|
6087
6129
|
}
|
|
6088
|
-
const S = performance.now() -
|
|
6130
|
+
const S = performance.now() - d;
|
|
6089
6131
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6090
6132
|
canvas: U,
|
|
6091
6133
|
width: T,
|
|
6092
6134
|
height: N
|
|
6093
6135
|
};
|
|
6094
6136
|
}
|
|
6095
|
-
const
|
|
6096
|
-
const t = (await
|
|
6137
|
+
const Oe = async (r) => {
|
|
6138
|
+
const t = (await Gx(r)).canvas;
|
|
6097
6139
|
return t ? createImageBitmap(t) : null;
|
|
6098
6140
|
};
|
|
6099
|
-
let
|
|
6100
|
-
const
|
|
6101
|
-
if (!
|
|
6102
|
-
|
|
6141
|
+
let s0 = null, Er = !1;
|
|
6142
|
+
const qe = async () => {
|
|
6143
|
+
if (!Er) {
|
|
6144
|
+
Er = !0;
|
|
6103
6145
|
try {
|
|
6104
|
-
for (;
|
|
6105
|
-
const r =
|
|
6106
|
-
|
|
6146
|
+
for (; s0; ) {
|
|
6147
|
+
const r = s0;
|
|
6148
|
+
s0 = null;
|
|
6107
6149
|
try {
|
|
6108
|
-
const
|
|
6109
|
-
if (
|
|
6110
|
-
|
|
6150
|
+
const d = await Oe(r.renderData);
|
|
6151
|
+
if (s0) {
|
|
6152
|
+
d?.close?.();
|
|
6111
6153
|
continue;
|
|
6112
6154
|
}
|
|
6113
|
-
self.postMessage({ id: r.id, bitmap:
|
|
6114
|
-
} catch (
|
|
6115
|
-
if (
|
|
6155
|
+
self.postMessage({ id: r.id, bitmap: d }, d ? [d] : []);
|
|
6156
|
+
} catch (d) {
|
|
6157
|
+
if (s0) continue;
|
|
6116
6158
|
self.postMessage({
|
|
6117
6159
|
id: r.id,
|
|
6118
|
-
error:
|
|
6160
|
+
error: d instanceof Error ? d.message : String(d)
|
|
6119
6161
|
});
|
|
6120
6162
|
}
|
|
6121
6163
|
}
|
|
6122
6164
|
} finally {
|
|
6123
|
-
|
|
6165
|
+
Er = !1, s0 && qe();
|
|
6124
6166
|
}
|
|
6125
6167
|
}
|
|
6126
6168
|
};
|
|
6127
6169
|
self.onmessage = async (r) => {
|
|
6128
|
-
const
|
|
6129
|
-
if (
|
|
6130
|
-
const e =
|
|
6131
|
-
|
|
6170
|
+
const d = r.data;
|
|
6171
|
+
if (d && typeof d == "object" && "type" in d && d.type === "SET_LICENSE") {
|
|
6172
|
+
const e = d;
|
|
6173
|
+
Ix({
|
|
6132
6174
|
token: e.licenseToken,
|
|
6133
6175
|
apiUrl: e.licenseApiUrl,
|
|
6134
6176
|
deviceId: e.deviceId,
|
|
@@ -6136,13 +6178,13 @@ self.onmessage = async (r) => {
|
|
|
6136
6178
|
});
|
|
6137
6179
|
return;
|
|
6138
6180
|
}
|
|
6139
|
-
const t =
|
|
6181
|
+
const t = d;
|
|
6140
6182
|
if (t.coalesce === !0) {
|
|
6141
|
-
|
|
6183
|
+
s0 = { id: t.id, renderData: t.renderData }, qe();
|
|
6142
6184
|
return;
|
|
6143
6185
|
}
|
|
6144
6186
|
try {
|
|
6145
|
-
const e = await
|
|
6187
|
+
const e = await Oe(t.renderData);
|
|
6146
6188
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|
|
6147
6189
|
} catch (e) {
|
|
6148
6190
|
self.postMessage({
|