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