@jieyin/editor-sdk-test 1.1.173 → 1.1.175
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor-sdk.es.js +2096 -2125
- package/dist/renderWorker.js +1150 -1146
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/renderWorker.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var D0 = /* @__PURE__ */ ((r) => (r[r.Group = 0] = "Group", r[r.Layer = 1] = "Layer", r))(D0 || {});
|
|
2
|
-
function
|
|
3
|
-
let
|
|
2
|
+
function et(r) {
|
|
3
|
+
let u = r;
|
|
4
4
|
return () => {
|
|
5
|
-
const t =
|
|
6
|
-
return
|
|
5
|
+
const t = u;
|
|
6
|
+
return u += 1, t;
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function tt(r, u) {
|
|
10
10
|
return {
|
|
11
11
|
name: r.name || "",
|
|
12
12
|
type: r.type || "Layer",
|
|
@@ -23,35 +23,35 @@ function et(r, d) {
|
|
|
23
23
|
quiltSliceY: r.quiltSliceY,
|
|
24
24
|
layerOrder: r.layerOrder,
|
|
25
25
|
imagePath: r.imagePath,
|
|
26
|
-
vectorMask: r.vectorMask ??
|
|
26
|
+
vectorMask: r.vectorMask ?? u,
|
|
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 xt(r, u, t, e) {
|
|
33
|
+
let d = r.name || "", l = u[d], _ = l?.partId ?? (r.type === "Group" ? t.get(d) : void 0);
|
|
34
|
+
if (r.type === "Group" && _ === void 0 && (!l || l.id === void 0) && r.children && r.children.length === 1) {
|
|
35
|
+
const x = r.children[0].name, n = u[x], E = n?.partId ?? t.get(x);
|
|
36
|
+
(E !== void 0 || n?.id !== void 0) && (d = x, l = n, _ = E);
|
|
37
37
|
}
|
|
38
|
-
const B = r.id ??
|
|
38
|
+
const B = r.id ?? l?.id ?? e();
|
|
39
39
|
if (r.type === "Group")
|
|
40
40
|
return {
|
|
41
41
|
id: B,
|
|
42
|
-
partId:
|
|
43
|
-
name:
|
|
42
|
+
partId: _,
|
|
43
|
+
name: d,
|
|
44
44
|
blendMode: r.blendMode || "normal",
|
|
45
45
|
bounds: r.bounds || { left: 0, top: 0, width: 0, height: 0 },
|
|
46
46
|
type: D0.Group,
|
|
47
47
|
smartObjects: (r.children ?? []).map(
|
|
48
|
-
(x) =>
|
|
48
|
+
(x) => tt(x, r.vectorMask)
|
|
49
49
|
),
|
|
50
50
|
opacity: r.opacity,
|
|
51
51
|
clipping: r.clipping,
|
|
52
52
|
layerOrder: r.layerOrder
|
|
53
53
|
};
|
|
54
|
-
let C =
|
|
54
|
+
let C = l?.url;
|
|
55
55
|
return !C && r.imagePath && (C = r.imagePath), {
|
|
56
56
|
id: B,
|
|
57
57
|
name: r.name || "",
|
|
@@ -64,37 +64,37 @@ function tt(r, d, t, e) {
|
|
|
64
64
|
layerOrder: r.layerOrder
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
function
|
|
68
|
-
const t = new Map(
|
|
67
|
+
function nt(r, u) {
|
|
68
|
+
const t = new Map(u.parts.map((d) => [d.name, d.id])), e = et(u.defaultIdStart ?? 1);
|
|
69
69
|
return {
|
|
70
|
-
parts:
|
|
71
|
-
models: r.map((
|
|
72
|
-
const
|
|
70
|
+
parts: u.parts,
|
|
71
|
+
models: r.map((d) => {
|
|
72
|
+
const l = d.layerExtrasByName ?? {}, _ = d.psdJson, B = _.layerList || _.layerList || [], C = _.canvasWidth, x = _.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
|
|
80
|
-
const b = o.layerOrder ?? 0, g =
|
|
79
|
+
const v = [], D = [], i = [...p.children].sort((o, h) => {
|
|
80
|
+
const b = o.layerOrder ?? 0, g = h.layerOrder ?? 0;
|
|
81
81
|
return b - g;
|
|
82
82
|
});
|
|
83
83
|
for (const o of i)
|
|
84
|
-
o.isSmartObject === !0 ?
|
|
84
|
+
o.isSmartObject === !0 ? v.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
|
-
|
|
89
|
+
v.length > 0 && f.push({
|
|
90
90
|
...p,
|
|
91
|
-
children:
|
|
91
|
+
children: v
|
|
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) => xt(s, l, t, e)
|
|
98
98
|
);
|
|
99
99
|
return {
|
|
100
100
|
width: C,
|
|
@@ -104,50 +104,50 @@ function xt(r, d) {
|
|
|
104
104
|
})
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function at(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 ot(r) {
|
|
111
111
|
return r ? r.type === "bezier" ? {
|
|
112
112
|
type: "bezier",
|
|
113
|
-
paths: r.paths.map((
|
|
114
|
-
open: !!
|
|
115
|
-
knots:
|
|
113
|
+
paths: r.paths.map((u) => ({
|
|
114
|
+
open: !!u.open,
|
|
115
|
+
knots: u.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((u) => ({
|
|
123
|
+
x: u.x,
|
|
124
|
+
y: u.y,
|
|
125
|
+
type: u.type
|
|
126
126
|
}))
|
|
127
127
|
} : null : null;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
131
|
-
if (r.globalCompositeOperation = "destination-in", r.beginPath(),
|
|
132
|
-
|
|
129
|
+
function Br(r, u) {
|
|
130
|
+
if (u) {
|
|
131
|
+
if (r.globalCompositeOperation = "destination-in", r.beginPath(), u.type === "bezier" && Array.isArray(u.paths))
|
|
132
|
+
u.paths.forEach((t) => {
|
|
133
133
|
const e = t.knots;
|
|
134
134
|
if (!e || e.length < 2) return;
|
|
135
|
-
const
|
|
136
|
-
r.moveTo(
|
|
137
|
-
for (let
|
|
138
|
-
const
|
|
139
|
-
let B = (
|
|
140
|
-
if (!t.open &&
|
|
135
|
+
const d = e[0];
|
|
136
|
+
r.moveTo(d.points[2], d.points[3]);
|
|
137
|
+
for (let l = 0; l < e.length; l++) {
|
|
138
|
+
const _ = e[l];
|
|
139
|
+
let B = (l + 1) % e.length;
|
|
140
|
+
if (!t.open && l === e.length - 1)
|
|
141
141
|
B = 0;
|
|
142
|
-
else if (t.open &&
|
|
142
|
+
else if (t.open && l === 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 = _.points[4], n = _.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 (u.type === "simple" && Array.isArray(u.points)) {
|
|
150
|
+
const t = u.points;
|
|
151
151
|
if (t.length < 3) return;
|
|
152
152
|
r.moveTo(t[0].x, t[0].y);
|
|
153
153
|
for (let e = 1; e < t.length; e++) r.lineTo(t[e].x, t[e].y);
|
|
@@ -161,10 +161,10 @@ class p0 {
|
|
|
161
161
|
/**
|
|
162
162
|
* 获取存储项
|
|
163
163
|
*/
|
|
164
|
-
static getItem(
|
|
164
|
+
static getItem(u) {
|
|
165
165
|
if (!this.hasStorage) return null;
|
|
166
166
|
try {
|
|
167
|
-
return localStorage.getItem(
|
|
167
|
+
return localStorage.getItem(u);
|
|
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(u, t) {
|
|
176
176
|
if (!this.hasStorage) return !1;
|
|
177
177
|
try {
|
|
178
|
-
return localStorage.setItem(
|
|
178
|
+
return localStorage.setItem(u, 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(u) {
|
|
187
187
|
if (!this.hasStorage) return !1;
|
|
188
188
|
try {
|
|
189
|
-
return localStorage.removeItem(
|
|
189
|
+
return localStorage.removeItem(u), !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 lr {
|
|
213
213
|
/**
|
|
214
214
|
* 是否在浏览器环境
|
|
215
215
|
*/
|
|
@@ -251,10 +251,10 @@ class v0 {
|
|
|
251
251
|
/**
|
|
252
252
|
* 安全地解析 URL
|
|
253
253
|
*/
|
|
254
|
-
static parse(
|
|
254
|
+
static parse(u) {
|
|
255
255
|
try {
|
|
256
|
-
const t =
|
|
257
|
-
return new URL(
|
|
256
|
+
const t = lr.getOrigin();
|
|
257
|
+
return new URL(u, t);
|
|
258
258
|
} catch {
|
|
259
259
|
return null;
|
|
260
260
|
}
|
|
@@ -262,290 +262,294 @@ class v0 {
|
|
|
262
262
|
/**
|
|
263
263
|
* 添加查询参数
|
|
264
264
|
*/
|
|
265
|
-
static addParam(
|
|
266
|
-
const
|
|
267
|
-
return !
|
|
265
|
+
static addParam(u, t, e) {
|
|
266
|
+
const d = this.parse(u);
|
|
267
|
+
return !d || d.searchParams.has(t) ? u : (d.searchParams.set(t, e), this.formatUrl(u, d));
|
|
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(u, t) {
|
|
273
|
+
const e = this.parse(u);
|
|
274
|
+
return !e || !e.searchParams.has(t) ? u : (e.searchParams.delete(t), this.formatUrl(u, e));
|
|
275
275
|
}
|
|
276
276
|
/**
|
|
277
277
|
* 检查是否有指定参数
|
|
278
278
|
*/
|
|
279
|
-
static hasParam(
|
|
280
|
-
return this.parse(
|
|
279
|
+
static hasParam(u, t) {
|
|
280
|
+
return this.parse(u)?.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(u, t) {
|
|
286
|
+
const e = /^(https?:)?\/\//i.test(u), d = u.startsWith("//");
|
|
287
|
+
return e ? t.toString() : d ? 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(u) {
|
|
293
|
+
return u?.startsWith("data:") ?? !1;
|
|
294
294
|
}
|
|
295
295
|
/**
|
|
296
296
|
* 检查是否为 Blob URL
|
|
297
297
|
*/
|
|
298
|
-
static isBlobUrl(
|
|
299
|
-
return
|
|
298
|
+
static isBlobUrl(u) {
|
|
299
|
+
return u?.startsWith("blob:") ?? !1;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
const
|
|
303
|
-
function
|
|
304
|
-
|
|
302
|
+
const it = /* @__PURE__ */ new Map(), st = /* @__PURE__ */ new Map();
|
|
303
|
+
function ct() {
|
|
304
|
+
it.clear(), st.clear();
|
|
305
305
|
}
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
const t0 = b0;
|
|
307
|
+
(function(r, u) {
|
|
308
|
+
const t = b0, e = r();
|
|
308
309
|
for (; ; )
|
|
309
310
|
try {
|
|
310
|
-
if (-parseInt(t(
|
|
311
|
+
if (-parseInt(t(188)) / 1 * (-parseInt(t(178)) / 2) + -parseInt(t(151)) / 3 + -parseInt(t(157)) / 4 * (-parseInt(t(150)) / 5) + -parseInt(t(170)) / 6 * (-parseInt(t(154)) / 7) + -parseInt(t(152)) / 8 + parseInt(t(181)) / 9 + -parseInt(t(187)) / 10 * (-parseInt(t(173)) / 11) === u) break;
|
|
311
312
|
e.push(e.shift());
|
|
312
313
|
} catch {
|
|
313
314
|
e.push(e.shift());
|
|
314
315
|
}
|
|
315
|
-
})(
|
|
316
|
-
function J(r, d) {
|
|
317
|
-
return r = r - (348 + -3446 * -1 + -3396), ur()[r];
|
|
318
|
-
}
|
|
316
|
+
})(dr, -39097 * -1 + -351928 + 721136);
|
|
319
317
|
const F0 = /* @__PURE__ */ (function() {
|
|
320
318
|
let r = !0;
|
|
321
|
-
return function(
|
|
319
|
+
return function(u, t) {
|
|
322
320
|
const e = r ? function() {
|
|
323
|
-
const
|
|
321
|
+
const d = b0;
|
|
324
322
|
if (t) {
|
|
325
|
-
const
|
|
326
|
-
return t = null,
|
|
323
|
+
const l = t[d(180)](u, arguments);
|
|
324
|
+
return t = null, l;
|
|
327
325
|
}
|
|
328
326
|
} : function() {
|
|
329
327
|
};
|
|
330
328
|
return r = !1, e;
|
|
331
329
|
};
|
|
332
|
-
})(),
|
|
333
|
-
const r =
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
330
|
+
})(), ft = F0(void 0, function() {
|
|
331
|
+
const r = b0, u = function() {
|
|
332
|
+
const l = b0;
|
|
333
|
+
let _;
|
|
334
|
+
try {
|
|
335
|
+
_ = Function(l(190) + l(176) + "nction() " + (l(166) + 'nstructor("return th' + l(172) + " )") + ");")();
|
|
336
|
+
} catch {
|
|
337
|
+
_ = window;
|
|
338
|
+
}
|
|
339
|
+
return _;
|
|
340
|
+
}, t = u(), e = t[r(168) + "le"] = t.console || {}, d = ["log", r(186), "info", "error", r(155) + "tion", r(185), r(169)];
|
|
341
|
+
for (let l = -532 * -7 + -5151 + 1 * 1427; l < d.length; l++) {
|
|
342
|
+
const _ = F0.constructor[r(175) + "type"].bind(F0), B = d[l], C = e[B] || _;
|
|
343
|
+
_.__proto__ = F0.bind(F0), _.toString = C.toString.bind(C), e[B] = _;
|
|
344
344
|
}
|
|
345
345
|
});
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
346
|
+
ft();
|
|
347
|
+
function b0(r, u) {
|
|
348
|
+
return r = r - (9356 + -4604 * 2), dr()[r];
|
|
349
|
+
}
|
|
350
|
+
const Dr = "file_" + t0(167), br = "file_" + t0(167) + t0(179) + "re_time", ut = (2 * -2707 + -17 * -557 + 1 * -3995) * 1e3;
|
|
351
|
+
function Fr() {
|
|
352
|
+
return p0.getItem(Dr);
|
|
350
353
|
}
|
|
351
|
-
function
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
return Date[d(408)]() + r > c;
|
|
354
|
+
function dt(r = ut) {
|
|
355
|
+
if (!Fr()) return !0;
|
|
356
|
+
const t = p0.getItem(br);
|
|
357
|
+
if (!t) return !1;
|
|
358
|
+
const e = Number(t);
|
|
359
|
+
return Date.now() + r > e;
|
|
358
360
|
}
|
|
359
|
-
function
|
|
360
|
-
const t =
|
|
361
|
-
if (p0.setItem(
|
|
362
|
-
const e = Date.now() +
|
|
363
|
-
p0[t(
|
|
361
|
+
function lt(r, u) {
|
|
362
|
+
const t = t0;
|
|
363
|
+
if (p0.setItem(Dr, r), typeof u == "number" && u > 2738 + -5915 * 1 + 3 * 1059) {
|
|
364
|
+
const e = Date.now() + u * 1e3;
|
|
365
|
+
p0[t(164) + "em"](br, String(e));
|
|
364
366
|
}
|
|
365
367
|
}
|
|
366
|
-
function
|
|
367
|
-
|
|
368
|
+
function ht() {
|
|
369
|
+
const r = t0;
|
|
370
|
+
p0.removeItem(Dr), p0["remov" + r(160)](br), bt(), ct();
|
|
368
371
|
}
|
|
369
|
-
async function
|
|
370
|
-
const
|
|
371
|
-
return t?.
|
|
372
|
+
async function qr(r) {
|
|
373
|
+
const u = t0, t = await r(), e = t?.data?.data;
|
|
374
|
+
return t?.data?.code === 5001 + -1 * 4801 && e?.[u(165) + "token"] ? (lt(e.file_token, e["expir" + u(153)]), e["file_" + u(167)]) : null;
|
|
372
375
|
}
|
|
373
|
-
let
|
|
374
|
-
function
|
|
375
|
-
return
|
|
376
|
+
let vt = null;
|
|
377
|
+
function Tr() {
|
|
378
|
+
return lr.isBrowser() ? vt : null;
|
|
376
379
|
}
|
|
377
|
-
async function
|
|
378
|
-
const r =
|
|
379
|
-
if (!
|
|
380
|
-
const
|
|
381
|
-
if (
|
|
380
|
+
async function we() {
|
|
381
|
+
const r = t0;
|
|
382
|
+
if (!lr[r(161) + "wser"]()) return Fr();
|
|
383
|
+
const u = Fr();
|
|
384
|
+
if (u && !dt()) return u;
|
|
382
385
|
try {
|
|
383
|
-
const t = await
|
|
384
|
-
if (
|
|
385
|
-
const e = await
|
|
386
|
+
const t = await Tr();
|
|
387
|
+
if (u && t?.["fetchFileT" + r(163) + "efresh"]) {
|
|
388
|
+
const e = await qr(t[r(184) + r(191) + "okenRefresh"]);
|
|
386
389
|
if (e) return e;
|
|
387
390
|
}
|
|
388
391
|
} catch {
|
|
389
392
|
}
|
|
390
393
|
try {
|
|
391
|
-
const t =
|
|
392
|
-
return t?.["fetchFileToken"] ? await
|
|
394
|
+
const t = Tr();
|
|
395
|
+
return t?.["fetchFileToken"] ? await qr(t["fetchFileT" + r(177)]) : null;
|
|
393
396
|
} catch {
|
|
394
397
|
return null;
|
|
395
398
|
}
|
|
396
399
|
}
|
|
397
|
-
function
|
|
398
|
-
const
|
|
399
|
-
if (!r || v0
|
|
400
|
-
const t = v0
|
|
401
|
-
return t ? t
|
|
400
|
+
function ke(r) {
|
|
401
|
+
const u = t0;
|
|
402
|
+
if (!r || v0["isDat" + u(192)](r) || v0[u(148) + "bUrl"](r)) return !1;
|
|
403
|
+
const t = v0.parse(r);
|
|
404
|
+
return t ? t["pathn" + u(171)]["inclu" + u(159)]("/files/") && !v0["hasPa" + u(174)](r, u(158) + u(177)) : r["inclu" + u(159)]("/files/") && !r[u(149) + "des"]("fileT" + u(189));
|
|
402
405
|
}
|
|
403
|
-
function
|
|
404
|
-
const t =
|
|
405
|
-
return !
|
|
406
|
+
function Se(r, u) {
|
|
407
|
+
const t = t0;
|
|
408
|
+
return !u || !ke(r) ? r : v0[t(183) + t(174)](r, "fileToken", u);
|
|
406
409
|
}
|
|
407
|
-
function
|
|
408
|
-
const
|
|
409
|
-
return
|
|
410
|
-
return r;
|
|
411
|
-
}, ur();
|
|
410
|
+
function He(r) {
|
|
411
|
+
const u = t0;
|
|
412
|
+
return v0.removeParam(r, u(158) + "oken");
|
|
412
413
|
}
|
|
413
|
-
function
|
|
414
|
-
|
|
414
|
+
function dr() {
|
|
415
|
+
const r = ["eItem", "isBro", "delet", "okenR", "setIt", "file_", "{}.co", "token", "conso", "trace", "12XHmJws", "ame", 'is")(', "10373sLGnUI", "ram", "proto", "n (fu", "oken", "38SUbFGy", "_expi", "apply", "363330VaULdy", "metho", "addPa", "fetch", "table", "warn", "4490JXOJba", "9221krBWoH", "oken=", "retur", "FileT", "aUrl", "isBlo", "inclu", "360005uIgeIa", "1441401iHCkEY", "4025880xCbkwH", "es_in", "2383605ugCIgK", "excep", "statu", "4jJscJD", "fileT", "des"];
|
|
416
|
+
return dr = function() {
|
|
417
|
+
return r;
|
|
418
|
+
}, dr();
|
|
415
419
|
}
|
|
416
|
-
async function
|
|
417
|
-
if (!
|
|
418
|
-
const
|
|
419
|
-
return
|
|
420
|
+
async function pt(r) {
|
|
421
|
+
if (!ke(r)) return r;
|
|
422
|
+
const u = await we();
|
|
423
|
+
return Se(r, u);
|
|
420
424
|
}
|
|
421
|
-
const
|
|
422
|
-
function
|
|
423
|
-
|
|
424
|
-
return "GET"[t(444) + t(441) + "e"]() + "\0" + r;
|
|
425
|
+
const Cr = /* @__PURE__ */ new Map();
|
|
426
|
+
function Bt(r, u) {
|
|
427
|
+
return "GET".toUpperCase() + "\0" + r;
|
|
425
428
|
}
|
|
426
|
-
async function
|
|
427
|
-
const t =
|
|
428
|
-
if (!
|
|
429
|
-
const e =
|
|
430
|
-
let
|
|
431
|
-
return !
|
|
429
|
+
async function Ct(r, u) {
|
|
430
|
+
const t = t0;
|
|
431
|
+
if (!lr[t(161) + "wser"]()) return fetch(r, u);
|
|
432
|
+
const e = He(r), d = Bt(e);
|
|
433
|
+
let l = Cr.get(d);
|
|
434
|
+
return !l && (l = (async () => {
|
|
435
|
+
const B = t;
|
|
432
436
|
try {
|
|
433
|
-
const
|
|
434
|
-
let
|
|
435
|
-
if (
|
|
436
|
-
|
|
437
|
-
const
|
|
438
|
-
return
|
|
437
|
+
const C = await pt(e);
|
|
438
|
+
let x = await fetch(C, u);
|
|
439
|
+
if (x[B(156) + "s"] !== 360 + -1 * -9619 + -9578 * 1) return x;
|
|
440
|
+
ht();
|
|
441
|
+
const n = await we(), E = Se(e, n);
|
|
442
|
+
return x = await fetch(E, u), x;
|
|
439
443
|
} finally {
|
|
440
|
-
|
|
444
|
+
Cr[B(162) + "e"](d);
|
|
441
445
|
}
|
|
442
|
-
})(),
|
|
446
|
+
})(), Cr.set(d, l)), (await l).clone();
|
|
443
447
|
}
|
|
444
|
-
const
|
|
445
|
-
let
|
|
446
|
-
const
|
|
447
|
-
function
|
|
448
|
-
return `${"GET".toUpperCase()}\0${
|
|
448
|
+
const Et = 96, At = 200 * 1024 * 1024, x0 = /* @__PURE__ */ new Map();
|
|
449
|
+
let hr = 0;
|
|
450
|
+
const w0 = /* @__PURE__ */ new Map();
|
|
451
|
+
function Ft(r, u) {
|
|
452
|
+
return `${"GET".toUpperCase()}\0${He(r)}`;
|
|
449
453
|
}
|
|
450
|
-
function
|
|
454
|
+
function gt() {
|
|
451
455
|
const r = x0.keys().next().value;
|
|
452
456
|
if (r === void 0) return;
|
|
453
|
-
const
|
|
454
|
-
x0.delete(r),
|
|
457
|
+
const u = x0.get(r);
|
|
458
|
+
x0.delete(r), u && (hr -= u.size);
|
|
455
459
|
}
|
|
456
|
-
function
|
|
460
|
+
function Dt(r) {
|
|
457
461
|
for (; x0.size > 0; ) {
|
|
458
|
-
const
|
|
459
|
-
if (!
|
|
460
|
-
|
|
462
|
+
const u = x0.size >= Et, t = hr + r > At;
|
|
463
|
+
if (!u && !t) break;
|
|
464
|
+
gt();
|
|
461
465
|
}
|
|
462
466
|
}
|
|
463
|
-
async function
|
|
464
|
-
const t =
|
|
467
|
+
async function $e(r, u) {
|
|
468
|
+
const t = Ft(r), e = x0.get(t);
|
|
465
469
|
if (e)
|
|
466
470
|
return x0.delete(t), x0.set(t, e), e;
|
|
467
|
-
let
|
|
468
|
-
return
|
|
471
|
+
let d = w0.get(t);
|
|
472
|
+
return d || (d = (async () => {
|
|
469
473
|
try {
|
|
470
|
-
const
|
|
471
|
-
if (!
|
|
472
|
-
throw new Error(`fetch failed: ${
|
|
473
|
-
const
|
|
474
|
-
return
|
|
474
|
+
const l = await Ct(r, u);
|
|
475
|
+
if (!l.ok)
|
|
476
|
+
throw new Error(`fetch failed: ${l.status} ${l.statusText}`);
|
|
477
|
+
const _ = await l.blob();
|
|
478
|
+
return Dt(_.size), x0.set(t, _), hr += _.size, _;
|
|
475
479
|
} finally {
|
|
476
|
-
|
|
480
|
+
w0.delete(t);
|
|
477
481
|
}
|
|
478
|
-
})(),
|
|
482
|
+
})(), w0.set(t, d), d);
|
|
479
483
|
}
|
|
480
|
-
function
|
|
481
|
-
x0.clear(),
|
|
484
|
+
function bt() {
|
|
485
|
+
x0.clear(), w0.clear(), hr = 0;
|
|
482
486
|
}
|
|
483
|
-
const
|
|
487
|
+
const Re = (r, u) => {
|
|
484
488
|
if (!r) return r;
|
|
485
|
-
const t = (
|
|
489
|
+
const t = (u || "").replace(/\/$/, "");
|
|
486
490
|
if (t && r.startsWith(t))
|
|
487
491
|
return r;
|
|
488
492
|
if (typeof window < "u") {
|
|
489
|
-
const
|
|
490
|
-
if (
|
|
493
|
+
const d = window.location.hostname;
|
|
494
|
+
if (d === "localhost" || d === "127.0.0.1")
|
|
491
495
|
try {
|
|
492
|
-
const
|
|
496
|
+
const l = new URL(r);
|
|
493
497
|
if (t)
|
|
494
498
|
try {
|
|
495
|
-
const
|
|
496
|
-
if (
|
|
499
|
+
const _ = new URL(t).origin;
|
|
500
|
+
if (l.origin === _)
|
|
497
501
|
return r;
|
|
498
502
|
} catch {
|
|
499
503
|
}
|
|
500
|
-
if (
|
|
501
|
-
return t ? `${t}${
|
|
504
|
+
if (l.pathname.startsWith("/files/"))
|
|
505
|
+
return t ? `${t}${l.pathname}${l.search}${l.hash}` : `${l.pathname}${l.search}${l.hash}`;
|
|
502
506
|
} catch {
|
|
503
507
|
}
|
|
504
508
|
}
|
|
505
509
|
if (typeof window < "u" && window.location.hostname !== "localhost") return r;
|
|
506
510
|
const e = r.match(/^https?:\/\/([^/]+\.oss[^/]*\.aliyuncs\.com)(.*)$/);
|
|
507
511
|
return e ? `/oss${e[2]}` : r;
|
|
508
|
-
},
|
|
512
|
+
}, mt = (r, u) => {
|
|
509
513
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
510
|
-
return new OffscreenCanvas(r,
|
|
514
|
+
return new OffscreenCanvas(r, u);
|
|
511
515
|
const t = document.createElement("canvas");
|
|
512
|
-
return t.width = r, t.height =
|
|
513
|
-
},
|
|
514
|
-
if (!
|
|
516
|
+
return t.width = r, t.height = u, t;
|
|
517
|
+
}, k0 = async (r, u) => {
|
|
518
|
+
if (!u || u <= 0) return r;
|
|
515
519
|
const t = Math.max(r.width, r.height);
|
|
516
|
-
if (t <=
|
|
517
|
-
const e =
|
|
518
|
-
return B ? (B.drawImage(r, 0, 0,
|
|
520
|
+
if (t <= u) return r;
|
|
521
|
+
const e = u / t, d = Math.max(1, Math.round(r.width * e)), l = Math.max(1, Math.round(r.height * e)), _ = mt(d, l), B = _.getContext("2d");
|
|
522
|
+
return B ? (B.drawImage(r, 0, 0, d, l), r.close?.(), await createImageBitmap(_)) : r;
|
|
519
523
|
};
|
|
520
|
-
async function
|
|
524
|
+
async function _t(r, u, t) {
|
|
521
525
|
if (typeof r == "string")
|
|
522
526
|
try {
|
|
523
|
-
const e =
|
|
524
|
-
let
|
|
527
|
+
const e = Re(r, t);
|
|
528
|
+
let d;
|
|
525
529
|
try {
|
|
526
|
-
|
|
530
|
+
d = await $e(e);
|
|
527
531
|
} catch {
|
|
528
532
|
throw new Error(`加载图片失败: ${r}`);
|
|
529
533
|
}
|
|
530
|
-
if (!
|
|
534
|
+
if (!d.type.startsWith("image/") && d.size === 0)
|
|
531
535
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
532
536
|
try {
|
|
533
|
-
const
|
|
534
|
-
return await
|
|
535
|
-
} catch (
|
|
536
|
-
throw new Error(`图片解码失败: URL=${r}, 错误=${
|
|
537
|
+
const l = await createImageBitmap(d);
|
|
538
|
+
return await k0(l, u);
|
|
539
|
+
} catch (l) {
|
|
540
|
+
throw new Error(`图片解码失败: URL=${r}, 错误=${l instanceof Error ? l.message : l}`);
|
|
537
541
|
}
|
|
538
542
|
} catch (e) {
|
|
539
543
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
540
544
|
}
|
|
541
545
|
if (r instanceof HTMLImageElement) {
|
|
542
|
-
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e,
|
|
543
|
-
r.onload = e, r.onerror = () =>
|
|
546
|
+
if ((!r.complete || r.naturalWidth === 0) && await new Promise((e, d) => {
|
|
547
|
+
r.onload = e, r.onerror = () => d(new Error(`图片加载失败: src=${r.src}`)), r.complete && e(null);
|
|
544
548
|
}), r.naturalWidth === 0 || r.naturalHeight === 0)
|
|
545
549
|
throw new Error(`图片尺寸无效: src=${r.src}, width=${r.naturalWidth}, height=${r.naturalHeight}`);
|
|
546
550
|
try {
|
|
547
551
|
const e = await createImageBitmap(r);
|
|
548
|
-
return await
|
|
552
|
+
return await k0(e, u);
|
|
549
553
|
} catch (e) {
|
|
550
554
|
throw new Error(`图片解码失败: src=${r.src}, 错误=${e instanceof Error ? e.message : e}`);
|
|
551
555
|
}
|
|
@@ -553,34 +557,34 @@ async function mt(r, d, t) {
|
|
|
553
557
|
if (r instanceof ImageBitmap) {
|
|
554
558
|
if (r.width === 0 || r.height === 0)
|
|
555
559
|
throw new Error(`ImageBitmap 尺寸无效: width=${r.width}, height=${r.height}`);
|
|
556
|
-
return await
|
|
560
|
+
return await k0(r, u);
|
|
557
561
|
}
|
|
558
562
|
throw new Error("不支持的图片类型");
|
|
559
563
|
}
|
|
560
|
-
async function
|
|
564
|
+
async function yt(r, u, t) {
|
|
561
565
|
try {
|
|
562
|
-
const e =
|
|
563
|
-
let
|
|
566
|
+
const e = Re(r, t);
|
|
567
|
+
let d;
|
|
564
568
|
try {
|
|
565
|
-
|
|
569
|
+
d = await $e(e);
|
|
566
570
|
} catch {
|
|
567
571
|
throw new Error(`加载图片失败: ${r}`);
|
|
568
572
|
}
|
|
569
|
-
if (!
|
|
573
|
+
if (!d.type.startsWith("image/") && d.size === 0)
|
|
570
574
|
throw new Error(`图片数据无效: URL=${r}`);
|
|
571
575
|
try {
|
|
572
|
-
const
|
|
573
|
-
return await
|
|
574
|
-
} catch (
|
|
575
|
-
throw new Error(`图片解码失败: URL=${r}, 错误=${
|
|
576
|
+
const l = await createImageBitmap(d);
|
|
577
|
+
return await k0(l, u);
|
|
578
|
+
} catch (l) {
|
|
579
|
+
throw new Error(`图片解码失败: URL=${r}, 错误=${l instanceof Error ? l.message : l}`);
|
|
576
580
|
}
|
|
577
581
|
} catch (e) {
|
|
578
582
|
throw e instanceof Error ? e : new Error(`加载图片失败: ${r}, ${e}`);
|
|
579
583
|
}
|
|
580
584
|
}
|
|
581
|
-
function
|
|
585
|
+
function Mr(r) {
|
|
582
586
|
if (!r) return "source-over";
|
|
583
|
-
const
|
|
587
|
+
const u = r.trim().toLowerCase();
|
|
584
588
|
return {
|
|
585
589
|
normal: "source-over",
|
|
586
590
|
multiply: "multiply",
|
|
@@ -606,26 +610,26 @@ function Tr(r) {
|
|
|
606
610
|
"linear dodge": "lighter",
|
|
607
611
|
lighter: "lighter",
|
|
608
612
|
"pass-through": "source-over"
|
|
609
|
-
}[
|
|
613
|
+
}[u] || "source-over";
|
|
610
614
|
}
|
|
611
|
-
var
|
|
612
|
-
function
|
|
615
|
+
var Er = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
616
|
+
function wt(r) {
|
|
613
617
|
if (Object.prototype.hasOwnProperty.call(r, "__esModule")) return r;
|
|
614
|
-
var
|
|
615
|
-
if (typeof
|
|
618
|
+
var u = r.default;
|
|
619
|
+
if (typeof u == "function") {
|
|
616
620
|
var t = function e() {
|
|
617
|
-
var
|
|
621
|
+
var d = !1;
|
|
618
622
|
try {
|
|
619
|
-
|
|
623
|
+
d = this instanceof e;
|
|
620
624
|
} catch {
|
|
621
625
|
}
|
|
622
|
-
return
|
|
626
|
+
return d ? Reflect.construct(u, arguments, this.constructor) : u.apply(this, arguments);
|
|
623
627
|
};
|
|
624
|
-
t.prototype =
|
|
628
|
+
t.prototype = u.prototype;
|
|
625
629
|
} else t = {};
|
|
626
630
|
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(e) {
|
|
627
|
-
var
|
|
628
|
-
Object.defineProperty(t, e,
|
|
631
|
+
var d = Object.getOwnPropertyDescriptor(r, e);
|
|
632
|
+
Object.defineProperty(t, e, d.get ? d : {
|
|
629
633
|
enumerable: !0,
|
|
630
634
|
get: function() {
|
|
631
635
|
return r[e];
|
|
@@ -633,36 +637,36 @@ function yt(r) {
|
|
|
633
637
|
});
|
|
634
638
|
}), t;
|
|
635
639
|
}
|
|
636
|
-
var
|
|
637
|
-
function
|
|
640
|
+
var S0 = { exports: {} };
|
|
641
|
+
function kt(r) {
|
|
638
642
|
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.');
|
|
639
643
|
}
|
|
640
|
-
var
|
|
644
|
+
var H0 = { exports: {} }, St = {}, Ht = /* @__PURE__ */ Object.freeze({
|
|
641
645
|
__proto__: null,
|
|
642
|
-
default:
|
|
643
|
-
}),
|
|
646
|
+
default: St
|
|
647
|
+
}), $t = /* @__PURE__ */ wt(Ht), Rt = H0.exports, Nr;
|
|
644
648
|
function M() {
|
|
645
|
-
return
|
|
649
|
+
return Nr || (Nr = 1, (function(r, u) {
|
|
646
650
|
(function(t, e) {
|
|
647
651
|
r.exports = e();
|
|
648
|
-
})(
|
|
649
|
-
var t = t || (function(e,
|
|
650
|
-
var
|
|
651
|
-
if (typeof window < "u" && window.crypto && (
|
|
652
|
+
})(Rt, function() {
|
|
653
|
+
var t = t || (function(e, d) {
|
|
654
|
+
var l;
|
|
655
|
+
if (typeof window < "u" && window.crypto && (l = window.crypto), typeof self < "u" && self.crypto && (l = self.crypto), typeof globalThis < "u" && globalThis.crypto && (l = globalThis.crypto), !l && typeof window < "u" && window.msCrypto && (l = window.msCrypto), !l && typeof Er < "u" && Er.crypto && (l = Er.crypto), !l && typeof kt == "function")
|
|
652
656
|
try {
|
|
653
|
-
|
|
657
|
+
l = $t;
|
|
654
658
|
} catch {
|
|
655
659
|
}
|
|
656
|
-
var
|
|
657
|
-
if (
|
|
658
|
-
if (typeof
|
|
660
|
+
var _ = function() {
|
|
661
|
+
if (l) {
|
|
662
|
+
if (typeof l.getRandomValues == "function")
|
|
659
663
|
try {
|
|
660
|
-
return
|
|
664
|
+
return l.getRandomValues(new Uint32Array(1))[0];
|
|
661
665
|
} catch {
|
|
662
666
|
}
|
|
663
|
-
if (typeof
|
|
667
|
+
if (typeof l.randomBytes == "function")
|
|
664
668
|
try {
|
|
665
|
-
return
|
|
669
|
+
return l.randomBytes(4).readInt32LE();
|
|
666
670
|
} catch {
|
|
667
671
|
}
|
|
668
672
|
}
|
|
@@ -671,8 +675,8 @@ function M() {
|
|
|
671
675
|
function i() {
|
|
672
676
|
}
|
|
673
677
|
return function(o) {
|
|
674
|
-
var
|
|
675
|
-
return i.prototype = o,
|
|
678
|
+
var h;
|
|
679
|
+
return i.prototype = o, h = new i(), i.prototype = null, h;
|
|
676
680
|
};
|
|
677
681
|
})(), C = {}, x = C.lib = {}, n = x.Base = /* @__PURE__ */ (function() {
|
|
678
682
|
return {
|
|
@@ -773,7 +777,7 @@ function M() {
|
|
|
773
777
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
774
778
|
*/
|
|
775
779
|
init: function(i, o) {
|
|
776
|
-
i = this.words = i || [], o !=
|
|
780
|
+
i = this.words = i || [], o != d ? this.sigBytes = o : this.sigBytes = i.length * 4;
|
|
777
781
|
},
|
|
778
782
|
/**
|
|
779
783
|
* Converts this word array to a string.
|
|
@@ -803,15 +807,15 @@ function M() {
|
|
|
803
807
|
* wordArray1.concat(wordArray2);
|
|
804
808
|
*/
|
|
805
809
|
concat: function(i) {
|
|
806
|
-
var o = this.words,
|
|
810
|
+
var o = this.words, h = i.words, b = this.sigBytes, g = i.sigBytes;
|
|
807
811
|
if (this.clamp(), b % 4)
|
|
808
|
-
for (var
|
|
809
|
-
var k =
|
|
810
|
-
o[b +
|
|
812
|
+
for (var y = 0; y < g; y++) {
|
|
813
|
+
var k = h[y >>> 2] >>> 24 - y % 4 * 8 & 255;
|
|
814
|
+
o[b + y >>> 2] |= k << 24 - (b + y) % 4 * 8;
|
|
811
815
|
}
|
|
812
816
|
else
|
|
813
817
|
for (var R = 0; R < g; R += 4)
|
|
814
|
-
o[b + R >>> 2] =
|
|
818
|
+
o[b + R >>> 2] = h[R >>> 2];
|
|
815
819
|
return this.sigBytes += g, this;
|
|
816
820
|
},
|
|
817
821
|
/**
|
|
@@ -852,8 +856,8 @@ function M() {
|
|
|
852
856
|
* var wordArray = CryptoJS.lib.WordArray.random(16);
|
|
853
857
|
*/
|
|
854
858
|
random: function(i) {
|
|
855
|
-
for (var o = [],
|
|
856
|
-
o.push(
|
|
859
|
+
for (var o = [], h = 0; h < i; h += 4)
|
|
860
|
+
o.push(_());
|
|
857
861
|
return new E.init(o, i);
|
|
858
862
|
}
|
|
859
863
|
}), a = C.enc = {}, s = a.Hex = {
|
|
@@ -871,9 +875,9 @@ function M() {
|
|
|
871
875
|
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
|
872
876
|
*/
|
|
873
877
|
stringify: function(i) {
|
|
874
|
-
for (var o = i.words,
|
|
875
|
-
var
|
|
876
|
-
b.push((
|
|
878
|
+
for (var o = i.words, h = i.sigBytes, b = [], g = 0; g < h; g++) {
|
|
879
|
+
var y = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
880
|
+
b.push((y >>> 4).toString(16)), b.push((y & 15).toString(16));
|
|
877
881
|
}
|
|
878
882
|
return b.join("");
|
|
879
883
|
},
|
|
@@ -891,11 +895,11 @@ function M() {
|
|
|
891
895
|
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
|
|
892
896
|
*/
|
|
893
897
|
parse: function(i) {
|
|
894
|
-
for (var o = i.length,
|
|
895
|
-
|
|
896
|
-
return new E.init(
|
|
898
|
+
for (var o = i.length, h = [], b = 0; b < o; b += 2)
|
|
899
|
+
h[b >>> 3] |= parseInt(i.substr(b, 2), 16) << 24 - b % 8 * 4;
|
|
900
|
+
return new E.init(h, o / 2);
|
|
897
901
|
}
|
|
898
|
-
},
|
|
902
|
+
}, f = a.Latin1 = {
|
|
899
903
|
/**
|
|
900
904
|
* Converts a word array to a Latin1 string.
|
|
901
905
|
*
|
|
@@ -910,9 +914,9 @@ function M() {
|
|
|
910
914
|
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
|
|
911
915
|
*/
|
|
912
916
|
stringify: function(i) {
|
|
913
|
-
for (var o = i.words,
|
|
914
|
-
var
|
|
915
|
-
b.push(String.fromCharCode(
|
|
917
|
+
for (var o = i.words, h = i.sigBytes, b = [], g = 0; g < h; g++) {
|
|
918
|
+
var y = o[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
919
|
+
b.push(String.fromCharCode(y));
|
|
916
920
|
}
|
|
917
921
|
return b.join("");
|
|
918
922
|
},
|
|
@@ -930,9 +934,9 @@ function M() {
|
|
|
930
934
|
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
|
|
931
935
|
*/
|
|
932
936
|
parse: function(i) {
|
|
933
|
-
for (var o = i.length,
|
|
934
|
-
|
|
935
|
-
return new E.init(
|
|
937
|
+
for (var o = i.length, h = [], b = 0; b < o; b++)
|
|
938
|
+
h[b >>> 2] |= (i.charCodeAt(b) & 255) << 24 - b % 4 * 8;
|
|
939
|
+
return new E.init(h, o);
|
|
936
940
|
}
|
|
937
941
|
}, p = a.Utf8 = {
|
|
938
942
|
/**
|
|
@@ -950,7 +954,7 @@ function M() {
|
|
|
950
954
|
*/
|
|
951
955
|
stringify: function(i) {
|
|
952
956
|
try {
|
|
953
|
-
return decodeURIComponent(escape(
|
|
957
|
+
return decodeURIComponent(escape(f.stringify(i)));
|
|
954
958
|
} catch {
|
|
955
959
|
throw new Error("Malformed UTF-8 data");
|
|
956
960
|
}
|
|
@@ -969,9 +973,9 @@ function M() {
|
|
|
969
973
|
* var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
|
|
970
974
|
*/
|
|
971
975
|
parse: function(i) {
|
|
972
|
-
return
|
|
976
|
+
return f.parse(unescape(encodeURIComponent(i)));
|
|
973
977
|
}
|
|
974
|
-
},
|
|
978
|
+
}, v = x.BufferedBlockAlgorithm = n.extend({
|
|
975
979
|
/**
|
|
976
980
|
* Resets this block algorithm's data buffer to its initial state.
|
|
977
981
|
*
|
|
@@ -1010,13 +1014,13 @@ function M() {
|
|
|
1010
1014
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
1011
1015
|
*/
|
|
1012
1016
|
_process: function(i) {
|
|
1013
|
-
var o,
|
|
1017
|
+
var o, h = this._data, b = h.words, g = h.sigBytes, y = this.blockSize, k = y * 4, R = g / k;
|
|
1014
1018
|
i ? R = e.ceil(R) : R = e.max((R | 0) - this._minBufferSize, 0);
|
|
1015
|
-
var F = R *
|
|
1019
|
+
var F = R * y, w = e.min(F * 4, g);
|
|
1016
1020
|
if (F) {
|
|
1017
|
-
for (var H = 0; H < F; H +=
|
|
1021
|
+
for (var H = 0; H < F; H += y)
|
|
1018
1022
|
this._doProcessBlock(b, H);
|
|
1019
|
-
o = b.splice(0, F),
|
|
1023
|
+
o = b.splice(0, F), h.sigBytes -= w;
|
|
1020
1024
|
}
|
|
1021
1025
|
return new E.init(o, w);
|
|
1022
1026
|
},
|
|
@@ -1035,7 +1039,7 @@ function M() {
|
|
|
1035
1039
|
},
|
|
1036
1040
|
_minBufferSize: 0
|
|
1037
1041
|
});
|
|
1038
|
-
x.Hasher =
|
|
1042
|
+
x.Hasher = v.extend({
|
|
1039
1043
|
/**
|
|
1040
1044
|
* Configuration options.
|
|
1041
1045
|
*/
|
|
@@ -1060,7 +1064,7 @@ function M() {
|
|
|
1060
1064
|
* hasher.reset();
|
|
1061
1065
|
*/
|
|
1062
1066
|
reset: function() {
|
|
1063
|
-
|
|
1067
|
+
v.reset.call(this), this._doReset();
|
|
1064
1068
|
},
|
|
1065
1069
|
/**
|
|
1066
1070
|
* Updates this hasher with a message.
|
|
@@ -1111,8 +1115,8 @@ function M() {
|
|
|
1111
1115
|
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
|
|
1112
1116
|
*/
|
|
1113
1117
|
_createHelper: function(i) {
|
|
1114
|
-
return function(o,
|
|
1115
|
-
return new i.init(
|
|
1118
|
+
return function(o, h) {
|
|
1119
|
+
return new i.init(h).finalize(o);
|
|
1116
1120
|
};
|
|
1117
1121
|
},
|
|
1118
1122
|
/**
|
|
@@ -1129,8 +1133,8 @@ function M() {
|
|
|
1129
1133
|
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
|
|
1130
1134
|
*/
|
|
1131
1135
|
_createHmacHelper: function(i) {
|
|
1132
|
-
return function(o,
|
|
1133
|
-
return new D.HMAC.init(i,
|
|
1136
|
+
return function(o, h) {
|
|
1137
|
+
return new D.HMAC.init(i, h).finalize(o);
|
|
1134
1138
|
};
|
|
1135
1139
|
}
|
|
1136
1140
|
});
|
|
@@ -1139,17 +1143,17 @@ function M() {
|
|
|
1139
1143
|
})(Math);
|
|
1140
1144
|
return t;
|
|
1141
1145
|
});
|
|
1142
|
-
})(
|
|
1146
|
+
})(H0)), H0.exports;
|
|
1143
1147
|
}
|
|
1144
|
-
var
|
|
1145
|
-
function
|
|
1146
|
-
return
|
|
1148
|
+
var $0 = { exports: {} }, Pt = $0.exports, Ur;
|
|
1149
|
+
function vr() {
|
|
1150
|
+
return Ur || (Ur = 1, (function(r, u) {
|
|
1147
1151
|
(function(t, e) {
|
|
1148
1152
|
r.exports = e(M());
|
|
1149
|
-
})(
|
|
1153
|
+
})(Pt, function(t) {
|
|
1150
1154
|
return (function(e) {
|
|
1151
|
-
var
|
|
1152
|
-
C.Word =
|
|
1155
|
+
var d = t, l = d.lib, _ = l.Base, B = l.WordArray, C = d.x64 = {};
|
|
1156
|
+
C.Word = _.extend({
|
|
1153
1157
|
/**
|
|
1154
1158
|
* Initializes a newly created 64-bit word.
|
|
1155
1159
|
*
|
|
@@ -1312,7 +1316,7 @@ function hr() {
|
|
|
1312
1316
|
// var high = (this.high + word.high + carry) | 0;
|
|
1313
1317
|
// return X64Word.create(high, low);
|
|
1314
1318
|
// }
|
|
1315
|
-
}), C.WordArray =
|
|
1319
|
+
}), C.WordArray = _.extend({
|
|
1316
1320
|
/**
|
|
1317
1321
|
* Initializes a newly created word array.
|
|
1318
1322
|
*
|
|
@@ -1362,46 +1366,46 @@ function hr() {
|
|
|
1362
1366
|
* var clone = x64WordArray.clone();
|
|
1363
1367
|
*/
|
|
1364
1368
|
clone: function() {
|
|
1365
|
-
for (var x =
|
|
1369
|
+
for (var x = _.clone.call(this), n = x.words = this.words.slice(0), E = n.length, a = 0; a < E; a++)
|
|
1366
1370
|
n[a] = n[a].clone();
|
|
1367
1371
|
return x;
|
|
1368
1372
|
}
|
|
1369
1373
|
});
|
|
1370
1374
|
})(), t;
|
|
1371
1375
|
});
|
|
1372
|
-
})(
|
|
1376
|
+
})($0)), $0.exports;
|
|
1373
1377
|
}
|
|
1374
|
-
var
|
|
1375
|
-
function
|
|
1376
|
-
return
|
|
1378
|
+
var R0 = { exports: {} }, zt = R0.exports, jr;
|
|
1379
|
+
function It() {
|
|
1380
|
+
return jr || (jr = 1, (function(r, u) {
|
|
1377
1381
|
(function(t, e) {
|
|
1378
1382
|
r.exports = e(M());
|
|
1379
|
-
})(
|
|
1383
|
+
})(zt, function(t) {
|
|
1380
1384
|
return (function() {
|
|
1381
1385
|
if (typeof ArrayBuffer == "function") {
|
|
1382
|
-
var e = t,
|
|
1386
|
+
var e = t, d = e.lib, l = d.WordArray, _ = l.init, B = l.init = function(C) {
|
|
1383
1387
|
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) {
|
|
1384
1388
|
for (var x = C.byteLength, n = [], E = 0; E < x; E++)
|
|
1385
1389
|
n[E >>> 2] |= C[E] << 24 - E % 4 * 8;
|
|
1386
|
-
|
|
1390
|
+
_.call(this, n, x);
|
|
1387
1391
|
} else
|
|
1388
|
-
|
|
1392
|
+
_.apply(this, arguments);
|
|
1389
1393
|
};
|
|
1390
|
-
B.prototype =
|
|
1394
|
+
B.prototype = l;
|
|
1391
1395
|
}
|
|
1392
1396
|
})(), t.lib.WordArray;
|
|
1393
1397
|
});
|
|
1394
|
-
})(
|
|
1398
|
+
})(R0)), R0.exports;
|
|
1395
1399
|
}
|
|
1396
|
-
var
|
|
1397
|
-
function
|
|
1398
|
-
return
|
|
1400
|
+
var P0 = { exports: {} }, Wt = P0.exports, Gr;
|
|
1401
|
+
function Lt() {
|
|
1402
|
+
return Gr || (Gr = 1, (function(r, u) {
|
|
1399
1403
|
(function(t, e) {
|
|
1400
1404
|
r.exports = e(M());
|
|
1401
1405
|
})(Wt, function(t) {
|
|
1402
1406
|
return (function() {
|
|
1403
|
-
var e = t,
|
|
1404
|
-
|
|
1407
|
+
var e = t, d = e.lib, l = d.WordArray, _ = e.enc;
|
|
1408
|
+
_.Utf16 = _.Utf16BE = {
|
|
1405
1409
|
/**
|
|
1406
1410
|
* Converts a word array to a UTF-16 BE string.
|
|
1407
1411
|
*
|
|
@@ -1438,9 +1442,9 @@ function It() {
|
|
|
1438
1442
|
parse: function(C) {
|
|
1439
1443
|
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1440
1444
|
n[E >>> 1] |= C.charCodeAt(E) << 16 - E % 2 * 16;
|
|
1441
|
-
return
|
|
1445
|
+
return l.create(n, x * 2);
|
|
1442
1446
|
}
|
|
1443
|
-
},
|
|
1447
|
+
}, _.Utf16LE = {
|
|
1444
1448
|
/**
|
|
1445
1449
|
* Converts a word array to a UTF-16 LE string.
|
|
1446
1450
|
*
|
|
@@ -1477,7 +1481,7 @@ function It() {
|
|
|
1477
1481
|
parse: function(C) {
|
|
1478
1482
|
for (var x = C.length, n = [], E = 0; E < x; E++)
|
|
1479
1483
|
n[E >>> 1] |= B(C.charCodeAt(E) << 16 - E % 2 * 16);
|
|
1480
|
-
return
|
|
1484
|
+
return l.create(n, x * 2);
|
|
1481
1485
|
}
|
|
1482
1486
|
};
|
|
1483
1487
|
function B(C) {
|
|
@@ -1485,17 +1489,17 @@ function It() {
|
|
|
1485
1489
|
}
|
|
1486
1490
|
})(), t.enc.Utf16;
|
|
1487
1491
|
});
|
|
1488
|
-
})(
|
|
1492
|
+
})(P0)), P0.exports;
|
|
1489
1493
|
}
|
|
1490
|
-
var
|
|
1494
|
+
var z0 = { exports: {} }, Ot = z0.exports, Kr;
|
|
1491
1495
|
function c0() {
|
|
1492
|
-
return
|
|
1496
|
+
return Kr || (Kr = 1, (function(r, u) {
|
|
1493
1497
|
(function(t, e) {
|
|
1494
1498
|
r.exports = e(M());
|
|
1495
|
-
})(
|
|
1499
|
+
})(Ot, function(t) {
|
|
1496
1500
|
return (function() {
|
|
1497
|
-
var e = t,
|
|
1498
|
-
|
|
1501
|
+
var e = t, d = e.lib, l = d.WordArray, _ = e.enc;
|
|
1502
|
+
_.Base64 = {
|
|
1499
1503
|
/**
|
|
1500
1504
|
* Converts a word array to a Base64 string.
|
|
1501
1505
|
*
|
|
@@ -1513,7 +1517,7 @@ function c0() {
|
|
|
1513
1517
|
var x = C.words, n = C.sigBytes, E = this._map;
|
|
1514
1518
|
C.clamp();
|
|
1515
1519
|
for (var a = [], s = 0; s < n; s += 3)
|
|
1516
|
-
for (var
|
|
1520
|
+
for (var f = x[s >>> 2] >>> 24 - s % 4 * 8 & 255, p = x[s + 1 >>> 2] >>> 24 - (s + 1) % 4 * 8 & 255, v = x[s + 2 >>> 2] >>> 24 - (s + 2) % 4 * 8 & 255, D = f << 16 | p << 8 | v, i = 0; i < 4 && s + i * 0.75 < n; i++)
|
|
1517
1521
|
a.push(E.charAt(D >>> 6 * (3 - i) & 63));
|
|
1518
1522
|
var o = E.charAt(64);
|
|
1519
1523
|
if (o)
|
|
@@ -1543,8 +1547,8 @@ function c0() {
|
|
|
1543
1547
|
}
|
|
1544
1548
|
var s = n.charAt(64);
|
|
1545
1549
|
if (s) {
|
|
1546
|
-
var
|
|
1547
|
-
|
|
1550
|
+
var f = C.indexOf(s);
|
|
1551
|
+
f !== -1 && (x = f);
|
|
1548
1552
|
}
|
|
1549
1553
|
return B(C, x, E);
|
|
1550
1554
|
},
|
|
@@ -1553,24 +1557,24 @@ function c0() {
|
|
|
1553
1557
|
function B(C, x, n) {
|
|
1554
1558
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1555
1559
|
if (s % 4) {
|
|
1556
|
-
var
|
|
1557
|
-
E[a >>> 2] |=
|
|
1560
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, v = f | p;
|
|
1561
|
+
E[a >>> 2] |= v << 24 - a % 4 * 8, a++;
|
|
1558
1562
|
}
|
|
1559
|
-
return
|
|
1563
|
+
return l.create(E, a);
|
|
1560
1564
|
}
|
|
1561
1565
|
})(), t.enc.Base64;
|
|
1562
1566
|
});
|
|
1563
|
-
})(
|
|
1567
|
+
})(z0)), z0.exports;
|
|
1564
1568
|
}
|
|
1565
|
-
var
|
|
1566
|
-
function
|
|
1567
|
-
return
|
|
1569
|
+
var I0 = { exports: {} }, qt = I0.exports, Xr;
|
|
1570
|
+
function Tt() {
|
|
1571
|
+
return Xr || (Xr = 1, (function(r, u) {
|
|
1568
1572
|
(function(t, e) {
|
|
1569
1573
|
r.exports = e(M());
|
|
1570
|
-
})(
|
|
1574
|
+
})(qt, function(t) {
|
|
1571
1575
|
return (function() {
|
|
1572
|
-
var e = t,
|
|
1573
|
-
|
|
1576
|
+
var e = t, d = e.lib, l = d.WordArray, _ = e.enc;
|
|
1577
|
+
_.Base64url = {
|
|
1574
1578
|
/**
|
|
1575
1579
|
* Converts a word array to a Base64url string.
|
|
1576
1580
|
*
|
|
@@ -1590,13 +1594,13 @@ function qt() {
|
|
|
1590
1594
|
x === void 0 && (x = !0);
|
|
1591
1595
|
var n = C.words, E = C.sigBytes, a = x ? this._safe_map : this._map;
|
|
1592
1596
|
C.clamp();
|
|
1593
|
-
for (var s = [],
|
|
1594
|
-
for (var p = n[
|
|
1597
|
+
for (var s = [], f = 0; f < E; f += 3)
|
|
1598
|
+
for (var p = n[f >>> 2] >>> 24 - f % 4 * 8 & 255, v = n[f + 1 >>> 2] >>> 24 - (f + 1) % 4 * 8 & 255, D = n[f + 2 >>> 2] >>> 24 - (f + 2) % 4 * 8 & 255, i = p << 16 | v << 8 | D, o = 0; o < 4 && f + o * 0.75 < E; o++)
|
|
1595
1599
|
s.push(a.charAt(i >>> 6 * (3 - o) & 63));
|
|
1596
|
-
var
|
|
1597
|
-
if (
|
|
1600
|
+
var h = a.charAt(64);
|
|
1601
|
+
if (h)
|
|
1598
1602
|
for (; s.length % 4; )
|
|
1599
|
-
s.push(
|
|
1603
|
+
s.push(h);
|
|
1600
1604
|
return s.join("");
|
|
1601
1605
|
},
|
|
1602
1606
|
/**
|
|
@@ -1622,9 +1626,9 @@ function qt() {
|
|
|
1622
1626
|
for (var s = 0; s < E.length; s++)
|
|
1623
1627
|
a[E.charCodeAt(s)] = s;
|
|
1624
1628
|
}
|
|
1625
|
-
var
|
|
1626
|
-
if (
|
|
1627
|
-
var p = C.indexOf(
|
|
1629
|
+
var f = E.charAt(64);
|
|
1630
|
+
if (f) {
|
|
1631
|
+
var p = C.indexOf(f);
|
|
1628
1632
|
p !== -1 && (n = p);
|
|
1629
1633
|
}
|
|
1630
1634
|
return B(C, n, a);
|
|
@@ -1635,52 +1639,52 @@ function qt() {
|
|
|
1635
1639
|
function B(C, x, n) {
|
|
1636
1640
|
for (var E = [], a = 0, s = 0; s < x; s++)
|
|
1637
1641
|
if (s % 4) {
|
|
1638
|
-
var
|
|
1639
|
-
E[a >>> 2] |=
|
|
1642
|
+
var f = n[C.charCodeAt(s - 1)] << s % 4 * 2, p = n[C.charCodeAt(s)] >>> 6 - s % 4 * 2, v = f | p;
|
|
1643
|
+
E[a >>> 2] |= v << 24 - a % 4 * 8, a++;
|
|
1640
1644
|
}
|
|
1641
|
-
return
|
|
1645
|
+
return l.create(E, a);
|
|
1642
1646
|
}
|
|
1643
1647
|
})(), t.enc.Base64url;
|
|
1644
1648
|
});
|
|
1645
|
-
})(
|
|
1649
|
+
})(I0)), I0.exports;
|
|
1646
1650
|
}
|
|
1647
|
-
var W0 = { exports: {} },
|
|
1651
|
+
var W0 = { exports: {} }, Mt = W0.exports, Yr;
|
|
1648
1652
|
function f0() {
|
|
1649
|
-
return
|
|
1653
|
+
return Yr || (Yr = 1, (function(r, u) {
|
|
1650
1654
|
(function(t, e) {
|
|
1651
1655
|
r.exports = e(M());
|
|
1652
|
-
})(
|
|
1656
|
+
})(Mt, function(t) {
|
|
1653
1657
|
return (function(e) {
|
|
1654
|
-
var
|
|
1658
|
+
var d = t, l = d.lib, _ = l.WordArray, B = l.Hasher, C = d.algo, x = [];
|
|
1655
1659
|
(function() {
|
|
1656
1660
|
for (var p = 0; p < 64; p++)
|
|
1657
1661
|
x[p] = e.abs(e.sin(p + 1)) * 4294967296 | 0;
|
|
1658
1662
|
})();
|
|
1659
1663
|
var n = C.MD5 = B.extend({
|
|
1660
1664
|
_doReset: function() {
|
|
1661
|
-
this._hash = new
|
|
1665
|
+
this._hash = new _.init([
|
|
1662
1666
|
1732584193,
|
|
1663
1667
|
4023233417,
|
|
1664
1668
|
2562383102,
|
|
1665
1669
|
271733878
|
|
1666
1670
|
]);
|
|
1667
1671
|
},
|
|
1668
|
-
_doProcessBlock: function(p,
|
|
1672
|
+
_doProcessBlock: function(p, v) {
|
|
1669
1673
|
for (var D = 0; D < 16; D++) {
|
|
1670
|
-
var i =
|
|
1674
|
+
var i = v + D, o = p[i];
|
|
1671
1675
|
p[i] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360;
|
|
1672
1676
|
}
|
|
1673
|
-
var
|
|
1674
|
-
S = E(S,
|
|
1677
|
+
var h = this._hash.words, b = p[v + 0], g = p[v + 1], y = p[v + 2], k = p[v + 3], R = p[v + 4], F = p[v + 5], w = p[v + 6], H = p[v + 7], $ = p[v + 8], z = p[v + 9], O = p[v + 10], q = p[v + 11], U = p[v + 12], T = p[v + 13], N = p[v + 14], j = p[v + 15], S = h[0], c = h[1], A = h[2], m = h[3];
|
|
1678
|
+
S = E(S, c, A, m, b, 7, x[0]), m = E(m, S, c, A, g, 12, x[1]), A = E(A, m, S, c, y, 17, x[2]), c = E(c, A, m, S, k, 22, x[3]), S = E(S, c, A, m, R, 7, x[4]), m = E(m, S, c, A, F, 12, x[5]), A = E(A, m, S, c, w, 17, x[6]), c = E(c, A, m, S, H, 22, x[7]), S = E(S, c, A, m, $, 7, x[8]), m = E(m, S, c, A, z, 12, x[9]), A = E(A, m, S, c, O, 17, x[10]), c = E(c, A, m, S, q, 22, x[11]), S = E(S, c, A, m, U, 7, x[12]), m = E(m, S, c, A, T, 12, x[13]), A = E(A, m, S, c, N, 17, x[14]), c = E(c, A, m, S, j, 22, x[15]), S = a(S, c, A, m, g, 5, x[16]), m = a(m, S, c, A, w, 9, x[17]), A = a(A, m, S, c, q, 14, x[18]), c = a(c, A, m, S, b, 20, x[19]), S = a(S, c, A, m, F, 5, x[20]), m = a(m, S, c, A, O, 9, x[21]), A = a(A, m, S, c, j, 14, x[22]), c = a(c, A, m, S, R, 20, x[23]), S = a(S, c, A, m, z, 5, x[24]), m = a(m, S, c, A, N, 9, x[25]), A = a(A, m, S, c, k, 14, x[26]), c = a(c, A, m, S, $, 20, x[27]), S = a(S, c, A, m, T, 5, x[28]), m = a(m, S, c, A, y, 9, x[29]), A = a(A, m, S, c, H, 14, x[30]), c = a(c, A, m, S, U, 20, x[31]), S = s(S, c, A, m, F, 4, x[32]), m = s(m, S, c, A, $, 11, x[33]), A = s(A, m, S, c, q, 16, x[34]), c = s(c, A, m, S, N, 23, x[35]), S = s(S, c, A, m, g, 4, x[36]), m = s(m, S, c, A, R, 11, x[37]), A = s(A, m, S, c, H, 16, x[38]), c = s(c, A, m, S, O, 23, x[39]), S = s(S, c, A, m, T, 4, x[40]), m = s(m, S, c, A, b, 11, x[41]), A = s(A, m, S, c, k, 16, x[42]), c = s(c, A, m, S, w, 23, x[43]), S = s(S, c, A, m, z, 4, x[44]), m = s(m, S, c, A, U, 11, x[45]), A = s(A, m, S, c, j, 16, x[46]), c = s(c, A, m, S, y, 23, x[47]), S = f(S, c, A, m, b, 6, x[48]), m = f(m, S, c, A, H, 10, x[49]), A = f(A, m, S, c, N, 15, x[50]), c = f(c, A, m, S, F, 21, x[51]), S = f(S, c, A, m, U, 6, x[52]), m = f(m, S, c, A, k, 10, x[53]), A = f(A, m, S, c, O, 15, x[54]), c = f(c, A, m, S, g, 21, x[55]), S = f(S, c, A, m, $, 6, x[56]), m = f(m, S, c, A, j, 10, x[57]), A = f(A, m, S, c, w, 15, x[58]), c = f(c, A, m, S, T, 21, x[59]), S = f(S, c, A, m, R, 6, x[60]), m = f(m, S, c, A, q, 10, x[61]), A = f(A, m, S, c, y, 15, x[62]), c = f(c, A, m, S, z, 21, x[63]), h[0] = h[0] + S | 0, h[1] = h[1] + c | 0, h[2] = h[2] + A | 0, h[3] = h[3] + m | 0;
|
|
1675
1679
|
},
|
|
1676
1680
|
_doFinalize: function() {
|
|
1677
|
-
var p = this._data,
|
|
1678
|
-
|
|
1679
|
-
var o = e.floor(D / 4294967296),
|
|
1680
|
-
|
|
1681
|
-
for (var b = this._hash, g = b.words,
|
|
1682
|
-
var k = g[
|
|
1683
|
-
g[
|
|
1681
|
+
var p = this._data, v = p.words, D = this._nDataBytes * 8, i = p.sigBytes * 8;
|
|
1682
|
+
v[i >>> 5] |= 128 << 24 - i % 32;
|
|
1683
|
+
var o = e.floor(D / 4294967296), h = D;
|
|
1684
|
+
v[(i + 64 >>> 9 << 4) + 15] = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, v[(i + 64 >>> 9 << 4) + 14] = (h << 8 | h >>> 24) & 16711935 | (h << 24 | h >>> 8) & 4278255360, p.sigBytes = (v.length + 1) * 4, this._process();
|
|
1685
|
+
for (var b = this._hash, g = b.words, y = 0; y < 4; y++) {
|
|
1686
|
+
var k = g[y];
|
|
1687
|
+
g[y] = (k << 8 | k >>> 24) & 16711935 | (k << 24 | k >>> 8) & 4278255360;
|
|
1684
1688
|
}
|
|
1685
1689
|
return b;
|
|
1686
1690
|
},
|
|
@@ -1689,37 +1693,37 @@ function f0() {
|
|
|
1689
1693
|
return p._hash = this._hash.clone(), p;
|
|
1690
1694
|
}
|
|
1691
1695
|
});
|
|
1692
|
-
function E(p,
|
|
1693
|
-
var g = p + (
|
|
1694
|
-
return (g <<
|
|
1696
|
+
function E(p, v, D, i, o, h, b) {
|
|
1697
|
+
var g = p + (v & D | ~v & i) + o + b;
|
|
1698
|
+
return (g << h | g >>> 32 - h) + v;
|
|
1695
1699
|
}
|
|
1696
|
-
function a(p,
|
|
1697
|
-
var g = p + (
|
|
1698
|
-
return (g <<
|
|
1700
|
+
function a(p, v, D, i, o, h, b) {
|
|
1701
|
+
var g = p + (v & i | D & ~i) + o + b;
|
|
1702
|
+
return (g << h | g >>> 32 - h) + v;
|
|
1699
1703
|
}
|
|
1700
|
-
function s(p,
|
|
1701
|
-
var g = p + (
|
|
1702
|
-
return (g <<
|
|
1704
|
+
function s(p, v, D, i, o, h, b) {
|
|
1705
|
+
var g = p + (v ^ D ^ i) + o + b;
|
|
1706
|
+
return (g << h | g >>> 32 - h) + v;
|
|
1703
1707
|
}
|
|
1704
|
-
function
|
|
1705
|
-
var g = p + (D ^ (
|
|
1706
|
-
return (g <<
|
|
1708
|
+
function f(p, v, D, i, o, h, b) {
|
|
1709
|
+
var g = p + (D ^ (v | ~i)) + o + b;
|
|
1710
|
+
return (g << h | g >>> 32 - h) + v;
|
|
1707
1711
|
}
|
|
1708
|
-
|
|
1712
|
+
d.MD5 = B._createHelper(n), d.HmacMD5 = B._createHmacHelper(n);
|
|
1709
1713
|
})(Math), t.MD5;
|
|
1710
1714
|
});
|
|
1711
1715
|
})(W0)), W0.exports;
|
|
1712
1716
|
}
|
|
1713
|
-
var
|
|
1714
|
-
function
|
|
1715
|
-
return
|
|
1717
|
+
var L0 = { exports: {} }, Nt = L0.exports, Zr;
|
|
1718
|
+
function Pe() {
|
|
1719
|
+
return Zr || (Zr = 1, (function(r, u) {
|
|
1716
1720
|
(function(t, e) {
|
|
1717
1721
|
r.exports = e(M());
|
|
1718
|
-
})(
|
|
1722
|
+
})(Nt, function(t) {
|
|
1719
1723
|
return (function() {
|
|
1720
|
-
var e = t,
|
|
1724
|
+
var e = t, d = e.lib, l = d.WordArray, _ = d.Hasher, B = e.algo, C = [], x = B.SHA1 = _.extend({
|
|
1721
1725
|
_doReset: function() {
|
|
1722
|
-
this._hash = new
|
|
1726
|
+
this._hash = new l.init([
|
|
1723
1727
|
1732584193,
|
|
1724
1728
|
4023233417,
|
|
1725
1729
|
2562383102,
|
|
@@ -1728,40 +1732,40 @@ function Re() {
|
|
|
1728
1732
|
]);
|
|
1729
1733
|
},
|
|
1730
1734
|
_doProcessBlock: function(n, E) {
|
|
1731
|
-
for (var a = this._hash.words, s = a[0],
|
|
1735
|
+
for (var a = this._hash.words, s = a[0], f = a[1], p = a[2], v = a[3], D = a[4], i = 0; i < 80; i++) {
|
|
1732
1736
|
if (i < 16)
|
|
1733
1737
|
C[i] = n[E + i] | 0;
|
|
1734
1738
|
else {
|
|
1735
1739
|
var o = C[i - 3] ^ C[i - 8] ^ C[i - 14] ^ C[i - 16];
|
|
1736
1740
|
C[i] = o << 1 | o >>> 31;
|
|
1737
1741
|
}
|
|
1738
|
-
var
|
|
1739
|
-
i < 20 ?
|
|
1742
|
+
var h = (s << 5 | s >>> 27) + D + C[i];
|
|
1743
|
+
i < 20 ? h += (f & p | ~f & v) + 1518500249 : i < 40 ? h += (f ^ p ^ v) + 1859775393 : i < 60 ? h += (f & p | f & v | p & v) - 1894007588 : h += (f ^ p ^ v) - 899497514, D = v, v = p, p = f << 30 | f >>> 2, f = s, s = h;
|
|
1740
1744
|
}
|
|
1741
|
-
a[0] = a[0] + s | 0, a[1] = a[1] +
|
|
1745
|
+
a[0] = a[0] + s | 0, a[1] = a[1] + f | 0, a[2] = a[2] + p | 0, a[3] = a[3] + v | 0, a[4] = a[4] + D | 0;
|
|
1742
1746
|
},
|
|
1743
1747
|
_doFinalize: function() {
|
|
1744
1748
|
var n = this._data, E = n.words, a = this._nDataBytes * 8, s = n.sigBytes * 8;
|
|
1745
1749
|
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;
|
|
1746
1750
|
},
|
|
1747
1751
|
clone: function() {
|
|
1748
|
-
var n =
|
|
1752
|
+
var n = _.clone.call(this);
|
|
1749
1753
|
return n._hash = this._hash.clone(), n;
|
|
1750
1754
|
}
|
|
1751
1755
|
});
|
|
1752
|
-
e.SHA1 =
|
|
1756
|
+
e.SHA1 = _._createHelper(x), e.HmacSHA1 = _._createHmacHelper(x);
|
|
1753
1757
|
})(), t.SHA1;
|
|
1754
1758
|
});
|
|
1755
|
-
})(
|
|
1759
|
+
})(L0)), L0.exports;
|
|
1756
1760
|
}
|
|
1757
|
-
var
|
|
1758
|
-
function
|
|
1759
|
-
return
|
|
1761
|
+
var O0 = { exports: {} }, Ut = O0.exports, Qr;
|
|
1762
|
+
function mr() {
|
|
1763
|
+
return Qr || (Qr = 1, (function(r, u) {
|
|
1760
1764
|
(function(t, e) {
|
|
1761
1765
|
r.exports = e(M());
|
|
1762
|
-
})(
|
|
1766
|
+
})(Ut, function(t) {
|
|
1763
1767
|
return (function(e) {
|
|
1764
|
-
var
|
|
1768
|
+
var d = t, l = d.lib, _ = l.WordArray, B = l.Hasher, C = d.algo, x = [], n = [];
|
|
1765
1769
|
(function() {
|
|
1766
1770
|
function s(D) {
|
|
1767
1771
|
for (var i = e.sqrt(D), o = 2; o <= i; o++)
|
|
@@ -1769,53 +1773,53 @@ function br() {
|
|
|
1769
1773
|
return !1;
|
|
1770
1774
|
return !0;
|
|
1771
1775
|
}
|
|
1772
|
-
function
|
|
1776
|
+
function f(D) {
|
|
1773
1777
|
return (D - (D | 0)) * 4294967296 | 0;
|
|
1774
1778
|
}
|
|
1775
|
-
for (var p = 2,
|
|
1776
|
-
s(p) && (
|
|
1779
|
+
for (var p = 2, v = 0; v < 64; )
|
|
1780
|
+
s(p) && (v < 8 && (x[v] = f(e.pow(p, 1 / 2))), n[v] = f(e.pow(p, 1 / 3)), v++), p++;
|
|
1777
1781
|
})();
|
|
1778
1782
|
var E = [], a = C.SHA256 = B.extend({
|
|
1779
1783
|
_doReset: function() {
|
|
1780
|
-
this._hash = new
|
|
1784
|
+
this._hash = new _.init(x.slice(0));
|
|
1781
1785
|
},
|
|
1782
|
-
_doProcessBlock: function(s,
|
|
1783
|
-
for (var p = this._hash.words,
|
|
1786
|
+
_doProcessBlock: function(s, f) {
|
|
1787
|
+
for (var p = this._hash.words, v = p[0], D = p[1], i = p[2], o = p[3], h = p[4], b = p[5], g = p[6], y = p[7], k = 0; k < 64; k++) {
|
|
1784
1788
|
if (k < 16)
|
|
1785
|
-
E[k] = s[
|
|
1789
|
+
E[k] = s[f + k] | 0;
|
|
1786
1790
|
else {
|
|
1787
1791
|
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;
|
|
1788
1792
|
E[k] = F + E[k - 7] + H + E[k - 16];
|
|
1789
1793
|
}
|
|
1790
|
-
var $ =
|
|
1791
|
-
|
|
1794
|
+
var $ = h & b ^ ~h & g, z = v & D ^ v & i ^ D & i, O = (v << 30 | v >>> 2) ^ (v << 19 | v >>> 13) ^ (v << 10 | v >>> 22), q = (h << 26 | h >>> 6) ^ (h << 21 | h >>> 11) ^ (h << 7 | h >>> 25), U = y + q + $ + n[k] + E[k], T = O + z;
|
|
1795
|
+
y = g, g = b, b = h, h = o + U | 0, o = i, i = D, D = v, v = U + T | 0;
|
|
1792
1796
|
}
|
|
1793
|
-
p[0] = p[0] +
|
|
1797
|
+
p[0] = p[0] + v | 0, p[1] = p[1] + D | 0, p[2] = p[2] + i | 0, p[3] = p[3] + o | 0, p[4] = p[4] + h | 0, p[5] = p[5] + b | 0, p[6] = p[6] + g | 0, p[7] = p[7] + y | 0;
|
|
1794
1798
|
},
|
|
1795
1799
|
_doFinalize: function() {
|
|
1796
|
-
var s = this._data,
|
|
1797
|
-
return
|
|
1800
|
+
var s = this._data, f = s.words, p = this._nDataBytes * 8, v = s.sigBytes * 8;
|
|
1801
|
+
return f[v >>> 5] |= 128 << 24 - v % 32, f[(v + 64 >>> 9 << 4) + 14] = e.floor(p / 4294967296), f[(v + 64 >>> 9 << 4) + 15] = p, s.sigBytes = f.length * 4, this._process(), this._hash;
|
|
1798
1802
|
},
|
|
1799
1803
|
clone: function() {
|
|
1800
1804
|
var s = B.clone.call(this);
|
|
1801
1805
|
return s._hash = this._hash.clone(), s;
|
|
1802
1806
|
}
|
|
1803
1807
|
});
|
|
1804
|
-
|
|
1808
|
+
d.SHA256 = B._createHelper(a), d.HmacSHA256 = B._createHmacHelper(a);
|
|
1805
1809
|
})(Math), t.SHA256;
|
|
1806
1810
|
});
|
|
1807
|
-
})(
|
|
1811
|
+
})(O0)), O0.exports;
|
|
1808
1812
|
}
|
|
1809
|
-
var
|
|
1810
|
-
function
|
|
1811
|
-
return
|
|
1812
|
-
(function(t, e,
|
|
1813
|
-
r.exports = e(M(),
|
|
1814
|
-
})(
|
|
1813
|
+
var q0 = { exports: {} }, jt = q0.exports, Vr;
|
|
1814
|
+
function Gt() {
|
|
1815
|
+
return Vr || (Vr = 1, (function(r, u) {
|
|
1816
|
+
(function(t, e, d) {
|
|
1817
|
+
r.exports = e(M(), mr());
|
|
1818
|
+
})(jt, function(t) {
|
|
1815
1819
|
return (function() {
|
|
1816
|
-
var e = t,
|
|
1820
|
+
var e = t, d = e.lib, l = d.WordArray, _ = e.algo, B = _.SHA256, C = _.SHA224 = B.extend({
|
|
1817
1821
|
_doReset: function() {
|
|
1818
|
-
this._hash = new
|
|
1822
|
+
this._hash = new l.init([
|
|
1819
1823
|
3238371032,
|
|
1820
1824
|
914150663,
|
|
1821
1825
|
812702999,
|
|
@@ -1834,16 +1838,16 @@ function jt() {
|
|
|
1834
1838
|
e.SHA224 = B._createHelper(C), e.HmacSHA224 = B._createHmacHelper(C);
|
|
1835
1839
|
})(), t.SHA224;
|
|
1836
1840
|
});
|
|
1837
|
-
})(
|
|
1841
|
+
})(q0)), q0.exports;
|
|
1838
1842
|
}
|
|
1839
|
-
var
|
|
1840
|
-
function
|
|
1841
|
-
return
|
|
1842
|
-
(function(t, e,
|
|
1843
|
-
r.exports = e(M(),
|
|
1844
|
-
})(
|
|
1843
|
+
var T0 = { exports: {} }, Kt = T0.exports, Jr;
|
|
1844
|
+
function ze() {
|
|
1845
|
+
return Jr || (Jr = 1, (function(r, u) {
|
|
1846
|
+
(function(t, e, d) {
|
|
1847
|
+
r.exports = e(M(), vr());
|
|
1848
|
+
})(Kt, function(t) {
|
|
1845
1849
|
return (function() {
|
|
1846
|
-
var e = t,
|
|
1850
|
+
var e = t, d = e.lib, l = d.Hasher, _ = e.x64, B = _.Word, C = _.WordArray, x = e.algo;
|
|
1847
1851
|
function n() {
|
|
1848
1852
|
return B.create.apply(B, arguments);
|
|
1849
1853
|
}
|
|
@@ -1930,10 +1934,10 @@ function Pe() {
|
|
|
1930
1934
|
n(1816402316, 1246189591)
|
|
1931
1935
|
], a = [];
|
|
1932
1936
|
(function() {
|
|
1933
|
-
for (var
|
|
1934
|
-
a[
|
|
1937
|
+
for (var f = 0; f < 80; f++)
|
|
1938
|
+
a[f] = n();
|
|
1935
1939
|
})();
|
|
1936
|
-
var s = x.SHA512 =
|
|
1940
|
+
var s = x.SHA512 = l.extend({
|
|
1937
1941
|
_doReset: function() {
|
|
1938
1942
|
this._hash = new C.init([
|
|
1939
1943
|
new B.init(1779033703, 4089235720),
|
|
@@ -1946,55 +1950,55 @@ function Pe() {
|
|
|
1946
1950
|
new B.init(1541459225, 327033209)
|
|
1947
1951
|
]);
|
|
1948
1952
|
},
|
|
1949
|
-
_doProcessBlock: function(
|
|
1950
|
-
for (var
|
|
1951
|
-
var
|
|
1952
|
-
if (
|
|
1953
|
-
n0 =
|
|
1953
|
+
_doProcessBlock: function(f, p) {
|
|
1954
|
+
for (var v = this._hash.words, D = v[0], i = v[1], o = v[2], h = v[3], b = v[4], g = v[5], y = v[6], k = v[7], R = D.high, F = D.low, w = i.high, H = i.low, $ = o.high, z = o.low, O = h.high, q = h.low, U = b.high, T = b.low, N = g.high, j = g.low, S = y.high, c = y.low, A = k.high, m = k.low, I = R, P = F, L = w, W = H, Z = $, Q = z, i0 = O, K = q, G = U, Y = T, r0 = N, u0 = j, m0 = S, B0 = c, pr = A, C0 = m, e0 = 0; e0 < 80; e0++) {
|
|
1955
|
+
var J, n0, _0 = a[e0];
|
|
1956
|
+
if (e0 < 16)
|
|
1957
|
+
n0 = _0.high = f[p + e0 * 2] | 0, J = _0.low = f[p + e0 * 2 + 1] | 0;
|
|
1954
1958
|
else {
|
|
1955
|
-
var
|
|
1956
|
-
|
|
1959
|
+
var wr = a[e0 - 15], d0 = wr.high, E0 = wr.low, Me = (d0 >>> 1 | E0 << 31) ^ (d0 >>> 8 | E0 << 24) ^ d0 >>> 7, kr = (E0 >>> 1 | d0 << 31) ^ (E0 >>> 8 | d0 << 24) ^ (E0 >>> 7 | d0 << 25), Sr = a[e0 - 2], l0 = Sr.high, A0 = Sr.low, Ne = (l0 >>> 19 | A0 << 13) ^ (l0 << 3 | A0 >>> 29) ^ l0 >>> 6, Hr = (A0 >>> 19 | l0 << 13) ^ (A0 << 3 | l0 >>> 29) ^ (A0 >>> 6 | l0 << 26), $r = a[e0 - 7], Ue = $r.high, je = $r.low, Rr = a[e0 - 16], Ge = Rr.high, Pr = Rr.low;
|
|
1960
|
+
J = kr + je, n0 = Me + Ue + (J >>> 0 < kr >>> 0 ? 1 : 0), J = J + Hr, n0 = n0 + Ne + (J >>> 0 < Hr >>> 0 ? 1 : 0), J = J + Pr, n0 = n0 + Ge + (J >>> 0 < Pr >>> 0 ? 1 : 0), _0.high = n0, _0.low = J;
|
|
1957
1961
|
}
|
|
1958
|
-
var
|
|
1959
|
-
|
|
1962
|
+
var Ke = G & r0 ^ ~G & m0, zr = Y & u0 ^ ~Y & B0, Xe = I & L ^ I & Z ^ L & Z, Ye = P & W ^ P & Q ^ W & Q, Ze = (I >>> 28 | P << 4) ^ (I << 30 | P >>> 2) ^ (I << 25 | P >>> 7), Ir = (P >>> 28 | I << 4) ^ (P << 30 | I >>> 2) ^ (P << 25 | I >>> 7), Qe = (G >>> 14 | Y << 18) ^ (G >>> 18 | Y << 14) ^ (G << 23 | Y >>> 9), Ve = (Y >>> 14 | G << 18) ^ (Y >>> 18 | G << 14) ^ (Y << 23 | G >>> 9), Wr = E[e0], Je = Wr.high, Lr = Wr.low, V = C0 + Ve, a0 = pr + Qe + (V >>> 0 < C0 >>> 0 ? 1 : 0), V = V + zr, a0 = a0 + Ke + (V >>> 0 < zr >>> 0 ? 1 : 0), V = V + Lr, a0 = a0 + Je + (V >>> 0 < Lr >>> 0 ? 1 : 0), V = V + J, a0 = a0 + n0 + (V >>> 0 < J >>> 0 ? 1 : 0), Or = Ir + Ye, rt = Ze + Xe + (Or >>> 0 < Ir >>> 0 ? 1 : 0);
|
|
1963
|
+
pr = m0, C0 = B0, m0 = r0, B0 = u0, r0 = G, u0 = Y, Y = K + V | 0, G = i0 + a0 + (Y >>> 0 < K >>> 0 ? 1 : 0) | 0, i0 = Z, K = Q, Z = L, Q = W, L = I, W = P, P = V + Or | 0, I = a0 + rt + (P >>> 0 < V >>> 0 ? 1 : 0) | 0;
|
|
1960
1964
|
}
|
|
1961
|
-
F = D.low = F + P, D.high = R +
|
|
1965
|
+
F = D.low = F + P, D.high = R + I + (F >>> 0 < P >>> 0 ? 1 : 0), H = i.low = H + W, i.high = w + L + (H >>> 0 < W >>> 0 ? 1 : 0), z = o.low = z + Q, o.high = $ + Z + (z >>> 0 < Q >>> 0 ? 1 : 0), q = h.low = q + K, h.high = O + i0 + (q >>> 0 < K >>> 0 ? 1 : 0), T = b.low = T + Y, b.high = U + G + (T >>> 0 < Y >>> 0 ? 1 : 0), j = g.low = j + u0, g.high = N + r0 + (j >>> 0 < u0 >>> 0 ? 1 : 0), c = y.low = c + B0, y.high = S + m0 + (c >>> 0 < B0 >>> 0 ? 1 : 0), m = k.low = m + C0, k.high = A + pr + (m >>> 0 < C0 >>> 0 ? 1 : 0);
|
|
1962
1966
|
},
|
|
1963
1967
|
_doFinalize: function() {
|
|
1964
|
-
var
|
|
1965
|
-
p[D >>> 5] |= 128 << 24 - D % 32, p[(D + 128 >>> 10 << 5) + 30] = Math.floor(
|
|
1968
|
+
var f = this._data, p = f.words, v = this._nDataBytes * 8, D = f.sigBytes * 8;
|
|
1969
|
+
p[D >>> 5] |= 128 << 24 - D % 32, p[(D + 128 >>> 10 << 5) + 30] = Math.floor(v / 4294967296), p[(D + 128 >>> 10 << 5) + 31] = v, f.sigBytes = p.length * 4, this._process();
|
|
1966
1970
|
var i = this._hash.toX32();
|
|
1967
1971
|
return i;
|
|
1968
1972
|
},
|
|
1969
1973
|
clone: function() {
|
|
1970
|
-
var
|
|
1971
|
-
return
|
|
1974
|
+
var f = l.clone.call(this);
|
|
1975
|
+
return f._hash = this._hash.clone(), f;
|
|
1972
1976
|
},
|
|
1973
1977
|
blockSize: 1024 / 32
|
|
1974
1978
|
});
|
|
1975
|
-
e.SHA512 =
|
|
1979
|
+
e.SHA512 = l._createHelper(s), e.HmacSHA512 = l._createHmacHelper(s);
|
|
1976
1980
|
})(), t.SHA512;
|
|
1977
1981
|
});
|
|
1978
|
-
})(
|
|
1982
|
+
})(T0)), T0.exports;
|
|
1979
1983
|
}
|
|
1980
|
-
var
|
|
1981
|
-
function
|
|
1982
|
-
return
|
|
1983
|
-
(function(t, e,
|
|
1984
|
-
r.exports = e(M(),
|
|
1985
|
-
})(
|
|
1984
|
+
var M0 = { exports: {} }, Xt = M0.exports, re;
|
|
1985
|
+
function Yt() {
|
|
1986
|
+
return re || (re = 1, (function(r, u) {
|
|
1987
|
+
(function(t, e, d) {
|
|
1988
|
+
r.exports = e(M(), vr(), ze());
|
|
1989
|
+
})(Xt, function(t) {
|
|
1986
1990
|
return (function() {
|
|
1987
|
-
var e = t,
|
|
1991
|
+
var e = t, d = e.x64, l = d.Word, _ = d.WordArray, B = e.algo, C = B.SHA512, x = B.SHA384 = C.extend({
|
|
1988
1992
|
_doReset: function() {
|
|
1989
|
-
this._hash = new
|
|
1990
|
-
new
|
|
1991
|
-
new
|
|
1992
|
-
new
|
|
1993
|
-
new
|
|
1994
|
-
new
|
|
1995
|
-
new
|
|
1996
|
-
new
|
|
1997
|
-
new
|
|
1993
|
+
this._hash = new _.init([
|
|
1994
|
+
new l.init(3418070365, 3238371032),
|
|
1995
|
+
new l.init(1654270250, 914150663),
|
|
1996
|
+
new l.init(2438529370, 812702999),
|
|
1997
|
+
new l.init(355462360, 4144912697),
|
|
1998
|
+
new l.init(1731405415, 4290775857),
|
|
1999
|
+
new l.init(2394180231, 1750603025),
|
|
2000
|
+
new l.init(3675008525, 1694076839),
|
|
2001
|
+
new l.init(1203062813, 3204075428)
|
|
1998
2002
|
]);
|
|
1999
2003
|
},
|
|
2000
2004
|
_doFinalize: function() {
|
|
@@ -2005,40 +2009,40 @@ function Xt() {
|
|
|
2005
2009
|
e.SHA384 = C._createHelper(x), e.HmacSHA384 = C._createHmacHelper(x);
|
|
2006
2010
|
})(), t.SHA384;
|
|
2007
2011
|
});
|
|
2008
|
-
})(
|
|
2012
|
+
})(M0)), M0.exports;
|
|
2009
2013
|
}
|
|
2010
|
-
var
|
|
2011
|
-
function
|
|
2012
|
-
return
|
|
2013
|
-
(function(t, e,
|
|
2014
|
-
r.exports = e(M(),
|
|
2015
|
-
})(
|
|
2014
|
+
var N0 = { exports: {} }, Zt = N0.exports, ee;
|
|
2015
|
+
function Qt() {
|
|
2016
|
+
return ee || (ee = 1, (function(r, u) {
|
|
2017
|
+
(function(t, e, d) {
|
|
2018
|
+
r.exports = e(M(), vr());
|
|
2019
|
+
})(Zt, function(t) {
|
|
2016
2020
|
return (function(e) {
|
|
2017
|
-
var
|
|
2021
|
+
var d = t, l = d.lib, _ = l.WordArray, B = l.Hasher, C = d.x64, x = C.Word, n = d.algo, E = [], a = [], s = [];
|
|
2018
2022
|
(function() {
|
|
2019
|
-
for (var
|
|
2020
|
-
E[
|
|
2021
|
-
var o = D % 5,
|
|
2022
|
-
|
|
2023
|
+
for (var v = 1, D = 0, i = 0; i < 24; i++) {
|
|
2024
|
+
E[v + 5 * D] = (i + 1) * (i + 2) / 2 % 64;
|
|
2025
|
+
var o = D % 5, h = (2 * v + 3 * D) % 5;
|
|
2026
|
+
v = o, D = h;
|
|
2023
2027
|
}
|
|
2024
|
-
for (var
|
|
2028
|
+
for (var v = 0; v < 5; v++)
|
|
2025
2029
|
for (var D = 0; D < 5; D++)
|
|
2026
|
-
a[
|
|
2030
|
+
a[v + 5 * D] = D + (2 * v + 3 * D) % 5 * 5;
|
|
2027
2031
|
for (var b = 1, g = 0; g < 24; g++) {
|
|
2028
|
-
for (var
|
|
2032
|
+
for (var y = 0, k = 0, R = 0; R < 7; R++) {
|
|
2029
2033
|
if (b & 1) {
|
|
2030
2034
|
var F = (1 << R) - 1;
|
|
2031
|
-
F < 32 ? k ^= 1 << F :
|
|
2035
|
+
F < 32 ? k ^= 1 << F : y ^= 1 << F - 32;
|
|
2032
2036
|
}
|
|
2033
2037
|
b & 128 ? b = b << 1 ^ 113 : b <<= 1;
|
|
2034
2038
|
}
|
|
2035
|
-
s[g] = x.create(
|
|
2039
|
+
s[g] = x.create(y, k);
|
|
2036
2040
|
}
|
|
2037
2041
|
})();
|
|
2038
|
-
var
|
|
2042
|
+
var f = [];
|
|
2039
2043
|
(function() {
|
|
2040
|
-
for (var
|
|
2041
|
-
|
|
2044
|
+
for (var v = 0; v < 25; v++)
|
|
2045
|
+
f[v] = x.create();
|
|
2042
2046
|
})();
|
|
2043
2047
|
var p = n.SHA3 = B.extend({
|
|
2044
2048
|
/**
|
|
@@ -2053,78 +2057,78 @@ function Zt() {
|
|
|
2053
2057
|
outputLength: 512
|
|
2054
2058
|
}),
|
|
2055
2059
|
_doReset: function() {
|
|
2056
|
-
for (var
|
|
2057
|
-
|
|
2060
|
+
for (var v = this._state = [], D = 0; D < 25; D++)
|
|
2061
|
+
v[D] = new x.init();
|
|
2058
2062
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
2059
2063
|
},
|
|
2060
|
-
_doProcessBlock: function(
|
|
2061
|
-
for (var i = this._state, o = this.blockSize / 2,
|
|
2062
|
-
var b =
|
|
2064
|
+
_doProcessBlock: function(v, D) {
|
|
2065
|
+
for (var i = this._state, o = this.blockSize / 2, h = 0; h < o; h++) {
|
|
2066
|
+
var b = v[D + 2 * h], g = v[D + 2 * h + 1];
|
|
2063
2067
|
b = (b << 8 | b >>> 24) & 16711935 | (b << 24 | b >>> 8) & 4278255360, g = (g << 8 | g >>> 24) & 16711935 | (g << 24 | g >>> 8) & 4278255360;
|
|
2064
|
-
var
|
|
2065
|
-
|
|
2068
|
+
var y = i[h];
|
|
2069
|
+
y.high ^= g, y.low ^= b;
|
|
2066
2070
|
}
|
|
2067
2071
|
for (var k = 0; k < 24; k++) {
|
|
2068
2072
|
for (var R = 0; R < 5; R++) {
|
|
2069
2073
|
for (var F = 0, w = 0, H = 0; H < 5; H++) {
|
|
2070
|
-
var
|
|
2071
|
-
F ^=
|
|
2074
|
+
var y = i[R + 5 * H];
|
|
2075
|
+
F ^= y.high, w ^= y.low;
|
|
2072
2076
|
}
|
|
2073
|
-
var $ =
|
|
2077
|
+
var $ = f[R];
|
|
2074
2078
|
$.high = F, $.low = w;
|
|
2075
2079
|
}
|
|
2076
2080
|
for (var R = 0; R < 5; R++)
|
|
2077
|
-
for (var z =
|
|
2078
|
-
var
|
|
2079
|
-
|
|
2081
|
+
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++) {
|
|
2082
|
+
var y = i[R + 5 * H];
|
|
2083
|
+
y.high ^= F, y.low ^= w;
|
|
2080
2084
|
}
|
|
2081
2085
|
for (var T = 1; T < 25; T++) {
|
|
2082
|
-
var F, w,
|
|
2086
|
+
var F, w, y = i[T], N = y.high, j = y.low, S = E[T];
|
|
2083
2087
|
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);
|
|
2084
|
-
var
|
|
2085
|
-
|
|
2088
|
+
var c = f[a[T]];
|
|
2089
|
+
c.high = F, c.low = w;
|
|
2086
2090
|
}
|
|
2087
|
-
var A =
|
|
2091
|
+
var A = f[0], m = i[0];
|
|
2088
2092
|
A.high = m.high, A.low = m.low;
|
|
2089
2093
|
for (var R = 0; R < 5; R++)
|
|
2090
2094
|
for (var H = 0; H < 5; H++) {
|
|
2091
|
-
var T = R + 5 * H,
|
|
2092
|
-
|
|
2095
|
+
var T = R + 5 * H, y = i[T], I = f[T], P = f[(R + 1) % 5 + 5 * H], L = f[(R + 2) % 5 + 5 * H];
|
|
2096
|
+
y.high = I.high ^ ~P.high & L.high, y.low = I.low ^ ~P.low & L.low;
|
|
2093
2097
|
}
|
|
2094
|
-
var
|
|
2095
|
-
|
|
2098
|
+
var y = i[0], W = s[k];
|
|
2099
|
+
y.high ^= W.high, y.low ^= W.low;
|
|
2096
2100
|
}
|
|
2097
2101
|
},
|
|
2098
2102
|
_doFinalize: function() {
|
|
2099
|
-
var
|
|
2103
|
+
var v = this._data, D = v.words;
|
|
2100
2104
|
this._nDataBytes * 8;
|
|
2101
|
-
var i =
|
|
2102
|
-
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128,
|
|
2103
|
-
for (var
|
|
2104
|
-
var R =
|
|
2105
|
-
F = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360, w = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360,
|
|
2105
|
+
var i = v.sigBytes * 8, o = this.blockSize * 32;
|
|
2106
|
+
D[i >>> 5] |= 1 << 24 - i % 32, D[(e.ceil((i + 1) / o) * o >>> 5) - 1] |= 128, v.sigBytes = D.length * 4, this._process();
|
|
2107
|
+
for (var h = this._state, b = this.cfg.outputLength / 8, g = b / 8, y = [], k = 0; k < g; k++) {
|
|
2108
|
+
var R = h[k], F = R.high, w = R.low;
|
|
2109
|
+
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);
|
|
2106
2110
|
}
|
|
2107
|
-
return new
|
|
2111
|
+
return new _.init(y, b);
|
|
2108
2112
|
},
|
|
2109
2113
|
clone: function() {
|
|
2110
|
-
for (var
|
|
2114
|
+
for (var v = B.clone.call(this), D = v._state = this._state.slice(0), i = 0; i < 25; i++)
|
|
2111
2115
|
D[i] = D[i].clone();
|
|
2112
|
-
return
|
|
2116
|
+
return v;
|
|
2113
2117
|
}
|
|
2114
2118
|
});
|
|
2115
|
-
|
|
2119
|
+
d.SHA3 = B._createHelper(p), d.HmacSHA3 = B._createHmacHelper(p);
|
|
2116
2120
|
})(Math), t.SHA3;
|
|
2117
2121
|
});
|
|
2118
|
-
})(
|
|
2122
|
+
})(N0)), N0.exports;
|
|
2119
2123
|
}
|
|
2120
|
-
var
|
|
2121
|
-
function
|
|
2122
|
-
return
|
|
2124
|
+
var U0 = { exports: {} }, Vt = U0.exports, te;
|
|
2125
|
+
function Jt() {
|
|
2126
|
+
return te || (te = 1, (function(r, u) {
|
|
2123
2127
|
(function(t, e) {
|
|
2124
2128
|
r.exports = e(M());
|
|
2125
|
-
})(
|
|
2129
|
+
})(Vt, function(t) {
|
|
2126
2130
|
return (function(e) {
|
|
2127
|
-
var
|
|
2131
|
+
var d = t, l = d.lib, _ = l.WordArray, B = l.Hasher, C = d.algo, x = _.create([
|
|
2128
2132
|
0,
|
|
2129
2133
|
1,
|
|
2130
2134
|
2,
|
|
@@ -2205,7 +2209,7 @@ function Vt() {
|
|
|
2205
2209
|
6,
|
|
2206
2210
|
15,
|
|
2207
2211
|
13
|
|
2208
|
-
]), n =
|
|
2212
|
+
]), n = _.create([
|
|
2209
2213
|
5,
|
|
2210
2214
|
14,
|
|
2211
2215
|
7,
|
|
@@ -2286,7 +2290,7 @@ function Vt() {
|
|
|
2286
2290
|
3,
|
|
2287
2291
|
9,
|
|
2288
2292
|
11
|
|
2289
|
-
]), E =
|
|
2293
|
+
]), E = _.create([
|
|
2290
2294
|
11,
|
|
2291
2295
|
14,
|
|
2292
2296
|
15,
|
|
@@ -2367,7 +2371,7 @@ function Vt() {
|
|
|
2367
2371
|
8,
|
|
2368
2372
|
5,
|
|
2369
2373
|
6
|
|
2370
|
-
]), a =
|
|
2374
|
+
]), a = _.create([
|
|
2371
2375
|
8,
|
|
2372
2376
|
9,
|
|
2373
2377
|
9,
|
|
@@ -2448,24 +2452,24 @@ function Vt() {
|
|
|
2448
2452
|
13,
|
|
2449
2453
|
11,
|
|
2450
2454
|
11
|
|
2451
|
-
]), s =
|
|
2455
|
+
]), s = _.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), f = _.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), p = C.RIPEMD160 = B.extend({
|
|
2452
2456
|
_doReset: function() {
|
|
2453
|
-
this._hash =
|
|
2457
|
+
this._hash = _.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
2454
2458
|
},
|
|
2455
|
-
_doProcessBlock: function(g,
|
|
2459
|
+
_doProcessBlock: function(g, y) {
|
|
2456
2460
|
for (var k = 0; k < 16; k++) {
|
|
2457
|
-
var R =
|
|
2461
|
+
var R = y + k, F = g[R];
|
|
2458
2462
|
g[R] = (F << 8 | F >>> 24) & 16711935 | (F << 24 | F >>> 8) & 4278255360;
|
|
2459
2463
|
}
|
|
2460
|
-
var w = this._hash.words, H = s.words, $ =
|
|
2461
|
-
A = T = w[0], m = N = w[1],
|
|
2462
|
-
for (var
|
|
2463
|
-
|
|
2464
|
-
|
|
2464
|
+
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, m, I, P, L;
|
|
2465
|
+
A = T = w[0], m = N = w[1], I = j = w[2], P = S = w[3], L = c = w[4];
|
|
2466
|
+
for (var W, k = 0; k < 80; k += 1)
|
|
2467
|
+
W = T + g[y + z[k]] | 0, k < 16 ? W += v(N, j, S) + H[0] : k < 32 ? W += D(N, j, S) + H[1] : k < 48 ? W += i(N, j, S) + H[2] : k < 64 ? W += o(N, j, S) + H[3] : W += h(N, j, S) + H[4], W = W | 0, W = b(W, q[k]), W = W + c | 0, T = c, c = S, S = b(j, 10), j = N, N = W, W = A + g[y + O[k]] | 0, k < 16 ? W += h(m, I, P) + $[0] : k < 32 ? W += o(m, I, P) + $[1] : k < 48 ? W += i(m, I, P) + $[2] : k < 64 ? W += D(m, I, P) + $[3] : W += v(m, I, P) + $[4], W = W | 0, W = b(W, U[k]), W = W + L | 0, A = L, L = P, P = b(I, 10), I = m, m = W;
|
|
2468
|
+
W = w[1] + j + P | 0, w[1] = w[2] + S + L | 0, w[2] = w[3] + c + A | 0, w[3] = w[4] + T + m | 0, w[4] = w[0] + N + I | 0, w[0] = W;
|
|
2465
2469
|
},
|
|
2466
2470
|
_doFinalize: function() {
|
|
2467
|
-
var g = this._data,
|
|
2468
|
-
|
|
2471
|
+
var g = this._data, y = g.words, k = this._nDataBytes * 8, R = g.sigBytes * 8;
|
|
2472
|
+
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();
|
|
2469
2473
|
for (var F = this._hash, w = F.words, H = 0; H < 5; H++) {
|
|
2470
2474
|
var $ = w[H];
|
|
2471
2475
|
w[H] = ($ << 8 | $ >>> 24) & 16711935 | ($ << 24 | $ >>> 8) & 4278255360;
|
|
@@ -2477,38 +2481,38 @@ function Vt() {
|
|
|
2477
2481
|
return g._hash = this._hash.clone(), g;
|
|
2478
2482
|
}
|
|
2479
2483
|
});
|
|
2480
|
-
function
|
|
2481
|
-
return g ^
|
|
2484
|
+
function v(g, y, k) {
|
|
2485
|
+
return g ^ y ^ k;
|
|
2482
2486
|
}
|
|
2483
|
-
function D(g,
|
|
2484
|
-
return g &
|
|
2487
|
+
function D(g, y, k) {
|
|
2488
|
+
return g & y | ~g & k;
|
|
2485
2489
|
}
|
|
2486
|
-
function i(g,
|
|
2487
|
-
return (g | ~
|
|
2490
|
+
function i(g, y, k) {
|
|
2491
|
+
return (g | ~y) ^ k;
|
|
2488
2492
|
}
|
|
2489
|
-
function o(g,
|
|
2490
|
-
return g & k |
|
|
2493
|
+
function o(g, y, k) {
|
|
2494
|
+
return g & k | y & ~k;
|
|
2491
2495
|
}
|
|
2492
|
-
function
|
|
2493
|
-
return g ^ (
|
|
2496
|
+
function h(g, y, k) {
|
|
2497
|
+
return g ^ (y | ~k);
|
|
2494
2498
|
}
|
|
2495
|
-
function b(g,
|
|
2496
|
-
return g <<
|
|
2499
|
+
function b(g, y) {
|
|
2500
|
+
return g << y | g >>> 32 - y;
|
|
2497
2501
|
}
|
|
2498
|
-
|
|
2502
|
+
d.RIPEMD160 = B._createHelper(p), d.HmacRIPEMD160 = B._createHmacHelper(p);
|
|
2499
2503
|
})(), t.RIPEMD160;
|
|
2500
2504
|
});
|
|
2501
|
-
})(
|
|
2505
|
+
})(U0)), U0.exports;
|
|
2502
2506
|
}
|
|
2503
|
-
var
|
|
2504
|
-
function
|
|
2505
|
-
return
|
|
2507
|
+
var j0 = { exports: {} }, rx = j0.exports, xe;
|
|
2508
|
+
function _r() {
|
|
2509
|
+
return xe || (xe = 1, (function(r, u) {
|
|
2506
2510
|
(function(t, e) {
|
|
2507
2511
|
r.exports = e(M());
|
|
2508
|
-
})(
|
|
2512
|
+
})(rx, function(t) {
|
|
2509
2513
|
(function() {
|
|
2510
|
-
var e = t,
|
|
2511
|
-
C.HMAC =
|
|
2514
|
+
var e = t, d = e.lib, l = d.Base, _ = e.enc, B = _.Utf8, C = e.algo;
|
|
2515
|
+
C.HMAC = l.extend({
|
|
2512
2516
|
/**
|
|
2513
2517
|
* Initializes a newly created HMAC.
|
|
2514
2518
|
*
|
|
@@ -2523,9 +2527,9 @@ function mr() {
|
|
|
2523
2527
|
x = this._hasher = new x.init(), typeof n == "string" && (n = B.parse(n));
|
|
2524
2528
|
var E = x.blockSize, a = E * 4;
|
|
2525
2529
|
n.sigBytes > a && (n = x.finalize(n)), n.clamp();
|
|
2526
|
-
for (var s = this._oKey = n.clone(),
|
|
2527
|
-
p[D] ^= 1549556828,
|
|
2528
|
-
s.sigBytes =
|
|
2530
|
+
for (var s = this._oKey = n.clone(), f = this._iKey = n.clone(), p = s.words, v = f.words, D = 0; D < E; D++)
|
|
2531
|
+
p[D] ^= 1549556828, v[D] ^= 909522486;
|
|
2532
|
+
s.sigBytes = f.sigBytes = a, this.reset();
|
|
2529
2533
|
},
|
|
2530
2534
|
/**
|
|
2531
2535
|
* Resets this HMAC to its initial state.
|
|
@@ -2576,16 +2580,16 @@ function mr() {
|
|
|
2576
2580
|
});
|
|
2577
2581
|
})();
|
|
2578
2582
|
});
|
|
2579
|
-
})(
|
|
2583
|
+
})(j0)), j0.exports;
|
|
2580
2584
|
}
|
|
2581
|
-
var
|
|
2582
|
-
function
|
|
2583
|
-
return
|
|
2584
|
-
(function(t, e,
|
|
2585
|
-
r.exports = e(M(),
|
|
2586
|
-
})(
|
|
2585
|
+
var G0 = { exports: {} }, ex = G0.exports, ne;
|
|
2586
|
+
function tx() {
|
|
2587
|
+
return ne || (ne = 1, (function(r, u) {
|
|
2588
|
+
(function(t, e, d) {
|
|
2589
|
+
r.exports = e(M(), mr(), _r());
|
|
2590
|
+
})(ex, function(t) {
|
|
2587
2591
|
return (function() {
|
|
2588
|
-
var e = t,
|
|
2592
|
+
var e = t, d = e.lib, l = d.Base, _ = d.WordArray, B = e.algo, C = B.SHA256, x = B.HMAC, n = B.PBKDF2 = l.extend({
|
|
2589
2593
|
/**
|
|
2590
2594
|
* Configuration options.
|
|
2591
2595
|
*
|
|
@@ -2593,7 +2597,7 @@ function ex() {
|
|
|
2593
2597
|
* @property {Hasher} hasher The hasher to use. Default: SHA256
|
|
2594
2598
|
* @property {number} iterations The number of iterations to perform. Default: 250000
|
|
2595
2599
|
*/
|
|
2596
|
-
cfg:
|
|
2600
|
+
cfg: l.extend({
|
|
2597
2601
|
keySize: 128 / 32,
|
|
2598
2602
|
hasher: C,
|
|
2599
2603
|
iterations: 25e4
|
|
@@ -2625,12 +2629,12 @@ function ex() {
|
|
|
2625
2629
|
* var key = kdf.compute(password, salt);
|
|
2626
2630
|
*/
|
|
2627
2631
|
compute: function(E, a) {
|
|
2628
|
-
for (var s = this.cfg,
|
|
2629
|
-
var b =
|
|
2630
|
-
|
|
2631
|
-
for (var g = b.words,
|
|
2632
|
-
k =
|
|
2633
|
-
for (var F = k.words, w = 0; w <
|
|
2632
|
+
for (var s = this.cfg, f = x.create(s.hasher, E), p = _.create(), v = _.create([1]), D = p.words, i = v.words, o = s.keySize, h = s.iterations; D.length < o; ) {
|
|
2633
|
+
var b = f.update(a).finalize(v);
|
|
2634
|
+
f.reset();
|
|
2635
|
+
for (var g = b.words, y = g.length, k = b, R = 1; R < h; R++) {
|
|
2636
|
+
k = f.finalize(k), f.reset();
|
|
2637
|
+
for (var F = k.words, w = 0; w < y; w++)
|
|
2634
2638
|
g[w] ^= F[w];
|
|
2635
2639
|
}
|
|
2636
2640
|
p.concat(b), i[0]++;
|
|
@@ -2643,16 +2647,16 @@ function ex() {
|
|
|
2643
2647
|
};
|
|
2644
2648
|
})(), t.PBKDF2;
|
|
2645
2649
|
});
|
|
2646
|
-
})(
|
|
2650
|
+
})(G0)), G0.exports;
|
|
2647
2651
|
}
|
|
2648
|
-
var
|
|
2652
|
+
var K0 = { exports: {} }, xx = K0.exports, ae;
|
|
2649
2653
|
function o0() {
|
|
2650
|
-
return
|
|
2651
|
-
(function(t, e,
|
|
2652
|
-
r.exports = e(M(),
|
|
2653
|
-
})(
|
|
2654
|
+
return ae || (ae = 1, (function(r, u) {
|
|
2655
|
+
(function(t, e, d) {
|
|
2656
|
+
r.exports = e(M(), Pe(), _r());
|
|
2657
|
+
})(xx, function(t) {
|
|
2654
2658
|
return (function() {
|
|
2655
|
-
var e = t,
|
|
2659
|
+
var e = t, d = e.lib, l = d.Base, _ = d.WordArray, B = e.algo, C = B.MD5, x = B.EvpKDF = l.extend({
|
|
2656
2660
|
/**
|
|
2657
2661
|
* Configuration options.
|
|
2658
2662
|
*
|
|
@@ -2660,7 +2664,7 @@ function o0() {
|
|
|
2660
2664
|
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
|
|
2661
2665
|
* @property {number} iterations The number of iterations to perform. Default: 1
|
|
2662
2666
|
*/
|
|
2663
|
-
cfg:
|
|
2667
|
+
cfg: l.extend({
|
|
2664
2668
|
keySize: 128 / 32,
|
|
2665
2669
|
hasher: C,
|
|
2666
2670
|
iterations: 1
|
|
@@ -2692,10 +2696,10 @@ function o0() {
|
|
|
2692
2696
|
* var key = kdf.compute(password, salt);
|
|
2693
2697
|
*/
|
|
2694
2698
|
compute: function(n, E) {
|
|
2695
|
-
for (var a, s = this.cfg,
|
|
2696
|
-
a &&
|
|
2699
|
+
for (var a, s = this.cfg, f = s.hasher.create(), p = _.create(), v = p.words, D = s.keySize, i = s.iterations; v.length < D; ) {
|
|
2700
|
+
a && f.update(a), a = f.update(n).finalize(E), f.reset();
|
|
2697
2701
|
for (var o = 1; o < i; o++)
|
|
2698
|
-
a =
|
|
2702
|
+
a = f.finalize(a), f.reset();
|
|
2699
2703
|
p.concat(a);
|
|
2700
2704
|
}
|
|
2701
2705
|
return p.sigBytes = D * 4, p;
|
|
@@ -2706,24 +2710,24 @@ function o0() {
|
|
|
2706
2710
|
};
|
|
2707
2711
|
})(), t.EvpKDF;
|
|
2708
2712
|
});
|
|
2709
|
-
})(
|
|
2713
|
+
})(K0)), K0.exports;
|
|
2710
2714
|
}
|
|
2711
|
-
var
|
|
2715
|
+
var X0 = { exports: {} }, nx = X0.exports, oe;
|
|
2712
2716
|
function X() {
|
|
2713
|
-
return
|
|
2714
|
-
(function(t, e,
|
|
2717
|
+
return oe || (oe = 1, (function(r, u) {
|
|
2718
|
+
(function(t, e, d) {
|
|
2715
2719
|
r.exports = e(M(), o0());
|
|
2716
|
-
})(
|
|
2720
|
+
})(nx, function(t) {
|
|
2717
2721
|
t.lib.Cipher || (function(e) {
|
|
2718
|
-
var
|
|
2722
|
+
var d = t, l = d.lib, _ = l.Base, B = l.WordArray, C = l.BufferedBlockAlgorithm, x = d.enc;
|
|
2719
2723
|
x.Utf8;
|
|
2720
|
-
var n = x.Base64, E =
|
|
2724
|
+
var n = x.Base64, E = d.algo, a = E.EvpKDF, s = l.Cipher = C.extend({
|
|
2721
2725
|
/**
|
|
2722
2726
|
* Configuration options.
|
|
2723
2727
|
*
|
|
2724
2728
|
* @property {WordArray} iv The IV to use for this operation.
|
|
2725
2729
|
*/
|
|
2726
|
-
cfg:
|
|
2730
|
+
cfg: _.extend(),
|
|
2727
2731
|
/**
|
|
2728
2732
|
* Creates this cipher in encryption mode.
|
|
2729
2733
|
*
|
|
@@ -2849,14 +2853,14 @@ function X() {
|
|
|
2849
2853
|
};
|
|
2850
2854
|
})()
|
|
2851
2855
|
});
|
|
2852
|
-
|
|
2856
|
+
l.StreamCipher = s.extend({
|
|
2853
2857
|
_doFinalize: function() {
|
|
2854
2858
|
var F = this._process(!0);
|
|
2855
2859
|
return F;
|
|
2856
2860
|
},
|
|
2857
2861
|
blockSize: 1
|
|
2858
2862
|
});
|
|
2859
|
-
var
|
|
2863
|
+
var f = d.mode = {}, p = l.BlockCipherMode = _.extend({
|
|
2860
2864
|
/**
|
|
2861
2865
|
* Creates this mode for encryption.
|
|
2862
2866
|
*
|
|
@@ -2900,7 +2904,7 @@ function X() {
|
|
|
2900
2904
|
init: function(F, w) {
|
|
2901
2905
|
this._cipher = F, this._iv = w;
|
|
2902
2906
|
}
|
|
2903
|
-
}),
|
|
2907
|
+
}), v = f.CBC = (function() {
|
|
2904
2908
|
var F = p.extend();
|
|
2905
2909
|
F.Encryptor = F.extend({
|
|
2906
2910
|
/**
|
|
@@ -2940,7 +2944,7 @@ function X() {
|
|
|
2940
2944
|
H[$ + U] ^= O[U];
|
|
2941
2945
|
}
|
|
2942
2946
|
return F;
|
|
2943
|
-
})(), D =
|
|
2947
|
+
})(), D = d.pad = {}, i = D.Pkcs7 = {
|
|
2944
2948
|
/**
|
|
2945
2949
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
2946
2950
|
*
|
|
@@ -2975,7 +2979,7 @@ function X() {
|
|
|
2975
2979
|
F.sigBytes -= w;
|
|
2976
2980
|
}
|
|
2977
2981
|
};
|
|
2978
|
-
|
|
2982
|
+
l.BlockCipher = s.extend({
|
|
2979
2983
|
/**
|
|
2980
2984
|
* Configuration options.
|
|
2981
2985
|
*
|
|
@@ -2983,7 +2987,7 @@ function X() {
|
|
|
2983
2987
|
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
|
|
2984
2988
|
*/
|
|
2985
2989
|
cfg: s.cfg.extend({
|
|
2986
|
-
mode:
|
|
2990
|
+
mode: v,
|
|
2987
2991
|
padding: i
|
|
2988
2992
|
}),
|
|
2989
2993
|
reset: function() {
|
|
@@ -3001,7 +3005,7 @@ function X() {
|
|
|
3001
3005
|
},
|
|
3002
3006
|
blockSize: 128 / 32
|
|
3003
3007
|
});
|
|
3004
|
-
var o =
|
|
3008
|
+
var o = l.CipherParams = _.extend({
|
|
3005
3009
|
/**
|
|
3006
3010
|
* Initializes a newly created cipher params object.
|
|
3007
3011
|
*
|
|
@@ -3042,7 +3046,7 @@ function X() {
|
|
|
3042
3046
|
toString: function(F) {
|
|
3043
3047
|
return (F || this.formatter).stringify(this);
|
|
3044
3048
|
}
|
|
3045
|
-
}),
|
|
3049
|
+
}), h = d.format = {}, b = h.OpenSSL = {
|
|
3046
3050
|
/**
|
|
3047
3051
|
* Converts a cipher params object to an OpenSSL-compatible string.
|
|
3048
3052
|
*
|
|
@@ -3077,13 +3081,13 @@ function X() {
|
|
|
3077
3081
|
var w, H = n.parse(F), $ = H.words;
|
|
3078
3082
|
return $[0] == 1398893684 && $[1] == 1701076831 && (w = B.create($.slice(2, 4)), $.splice(0, 4), H.sigBytes -= 16), o.create({ ciphertext: H, salt: w });
|
|
3079
3083
|
}
|
|
3080
|
-
}, g =
|
|
3084
|
+
}, g = l.SerializableCipher = _.extend({
|
|
3081
3085
|
/**
|
|
3082
3086
|
* Configuration options.
|
|
3083
3087
|
*
|
|
3084
3088
|
* @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
|
|
3085
3089
|
*/
|
|
3086
|
-
cfg:
|
|
3090
|
+
cfg: _.extend({
|
|
3087
3091
|
format: b
|
|
3088
3092
|
}),
|
|
3089
3093
|
/**
|
|
@@ -3158,7 +3162,7 @@ function X() {
|
|
|
3158
3162
|
_parse: function(F, w) {
|
|
3159
3163
|
return typeof F == "string" ? w.parse(F, this) : F;
|
|
3160
3164
|
}
|
|
3161
|
-
}),
|
|
3165
|
+
}), y = d.kdf = {}, k = y.OpenSSL = {
|
|
3162
3166
|
/**
|
|
3163
3167
|
* Derives a key and IV from a password.
|
|
3164
3168
|
*
|
|
@@ -3184,7 +3188,7 @@ function X() {
|
|
|
3184
3188
|
var q = B.create(O.words.slice(w), H * 4);
|
|
3185
3189
|
return O.sigBytes = w * 4, o.create({ key: O, iv: q, salt: $ });
|
|
3186
3190
|
}
|
|
3187
|
-
}, R =
|
|
3191
|
+
}, R = l.PasswordBasedCipher = g.extend({
|
|
3188
3192
|
/**
|
|
3189
3193
|
* Configuration options.
|
|
3190
3194
|
*
|
|
@@ -3244,69 +3248,69 @@ function X() {
|
|
|
3244
3248
|
});
|
|
3245
3249
|
})();
|
|
3246
3250
|
});
|
|
3247
|
-
})(
|
|
3251
|
+
})(X0)), X0.exports;
|
|
3248
3252
|
}
|
|
3249
|
-
var
|
|
3250
|
-
function
|
|
3251
|
-
return
|
|
3252
|
-
(function(t, e,
|
|
3253
|
+
var Y0 = { exports: {} }, ax = Y0.exports, ie;
|
|
3254
|
+
function ox() {
|
|
3255
|
+
return ie || (ie = 1, (function(r, u) {
|
|
3256
|
+
(function(t, e, d) {
|
|
3253
3257
|
r.exports = e(M(), X());
|
|
3254
|
-
})(
|
|
3258
|
+
})(ax, function(t) {
|
|
3255
3259
|
return t.mode.CFB = (function() {
|
|
3256
3260
|
var e = t.lib.BlockCipherMode.extend();
|
|
3257
3261
|
e.Encryptor = e.extend({
|
|
3258
|
-
processBlock: function(
|
|
3262
|
+
processBlock: function(l, _) {
|
|
3259
3263
|
var B = this._cipher, C = B.blockSize;
|
|
3260
|
-
|
|
3264
|
+
d.call(this, l, _, C, B), this._prevBlock = l.slice(_, _ + C);
|
|
3261
3265
|
}
|
|
3262
3266
|
}), e.Decryptor = e.extend({
|
|
3263
|
-
processBlock: function(
|
|
3264
|
-
var B = this._cipher, C = B.blockSize, x =
|
|
3265
|
-
|
|
3267
|
+
processBlock: function(l, _) {
|
|
3268
|
+
var B = this._cipher, C = B.blockSize, x = l.slice(_, _ + C);
|
|
3269
|
+
d.call(this, l, _, C, B), this._prevBlock = x;
|
|
3266
3270
|
}
|
|
3267
3271
|
});
|
|
3268
|
-
function
|
|
3272
|
+
function d(l, _, B, C) {
|
|
3269
3273
|
var x, n = this._iv;
|
|
3270
3274
|
n ? (x = n.slice(0), this._iv = void 0) : x = this._prevBlock, C.encryptBlock(x, 0);
|
|
3271
3275
|
for (var E = 0; E < B; E++)
|
|
3272
|
-
|
|
3276
|
+
l[_ + E] ^= x[E];
|
|
3273
3277
|
}
|
|
3274
3278
|
return e;
|
|
3275
3279
|
})(), t.mode.CFB;
|
|
3276
3280
|
});
|
|
3277
|
-
})(
|
|
3281
|
+
})(Y0)), Y0.exports;
|
|
3278
3282
|
}
|
|
3279
|
-
var
|
|
3280
|
-
function
|
|
3281
|
-
return
|
|
3282
|
-
(function(t, e,
|
|
3283
|
+
var Z0 = { exports: {} }, ix = Z0.exports, se;
|
|
3284
|
+
function sx() {
|
|
3285
|
+
return se || (se = 1, (function(r, u) {
|
|
3286
|
+
(function(t, e, d) {
|
|
3283
3287
|
r.exports = e(M(), X());
|
|
3284
|
-
})(
|
|
3288
|
+
})(ix, function(t) {
|
|
3285
3289
|
return t.mode.CTR = (function() {
|
|
3286
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3287
|
-
processBlock: function(
|
|
3290
|
+
var e = t.lib.BlockCipherMode.extend(), d = e.Encryptor = e.extend({
|
|
3291
|
+
processBlock: function(l, _) {
|
|
3288
3292
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._counter;
|
|
3289
3293
|
x && (n = this._counter = x.slice(0), this._iv = void 0);
|
|
3290
3294
|
var E = n.slice(0);
|
|
3291
3295
|
B.encryptBlock(E, 0), n[C - 1] = n[C - 1] + 1 | 0;
|
|
3292
3296
|
for (var a = 0; a < C; a++)
|
|
3293
|
-
|
|
3297
|
+
l[_ + a] ^= E[a];
|
|
3294
3298
|
}
|
|
3295
3299
|
});
|
|
3296
|
-
return e.Decryptor =
|
|
3300
|
+
return e.Decryptor = d, e;
|
|
3297
3301
|
})(), t.mode.CTR;
|
|
3298
3302
|
});
|
|
3299
|
-
})(
|
|
3303
|
+
})(Z0)), Z0.exports;
|
|
3300
3304
|
}
|
|
3301
|
-
var
|
|
3302
|
-
function
|
|
3303
|
-
return
|
|
3304
|
-
(function(t, e,
|
|
3305
|
+
var Q0 = { exports: {} }, cx = Q0.exports, ce;
|
|
3306
|
+
function fx() {
|
|
3307
|
+
return ce || (ce = 1, (function(r, u) {
|
|
3308
|
+
(function(t, e, d) {
|
|
3305
3309
|
r.exports = e(M(), X());
|
|
3306
|
-
})(
|
|
3310
|
+
})(cx, function(t) {
|
|
3307
3311
|
return t.mode.CTRGladman = (function() {
|
|
3308
3312
|
var e = t.lib.BlockCipherMode.extend();
|
|
3309
|
-
function
|
|
3313
|
+
function d(B) {
|
|
3310
3314
|
if ((B >> 24 & 255) === 255) {
|
|
3311
3315
|
var C = B >> 16 & 255, x = B >> 8 & 255, n = B & 255;
|
|
3312
3316
|
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;
|
|
@@ -3314,148 +3318,148 @@ function cx() {
|
|
|
3314
3318
|
B += 1 << 24;
|
|
3315
3319
|
return B;
|
|
3316
3320
|
}
|
|
3317
|
-
function
|
|
3318
|
-
return (B[0] =
|
|
3321
|
+
function l(B) {
|
|
3322
|
+
return (B[0] = d(B[0])) === 0 && (B[1] = d(B[1])), B;
|
|
3319
3323
|
}
|
|
3320
|
-
var
|
|
3324
|
+
var _ = e.Encryptor = e.extend({
|
|
3321
3325
|
processBlock: function(B, C) {
|
|
3322
3326
|
var x = this._cipher, n = x.blockSize, E = this._iv, a = this._counter;
|
|
3323
|
-
E && (a = this._counter = E.slice(0), this._iv = void 0),
|
|
3327
|
+
E && (a = this._counter = E.slice(0), this._iv = void 0), l(a);
|
|
3324
3328
|
var s = a.slice(0);
|
|
3325
3329
|
x.encryptBlock(s, 0);
|
|
3326
|
-
for (var
|
|
3327
|
-
B[C +
|
|
3330
|
+
for (var f = 0; f < n; f++)
|
|
3331
|
+
B[C + f] ^= s[f];
|
|
3328
3332
|
}
|
|
3329
3333
|
});
|
|
3330
|
-
return e.Decryptor =
|
|
3334
|
+
return e.Decryptor = _, e;
|
|
3331
3335
|
})(), t.mode.CTRGladman;
|
|
3332
3336
|
});
|
|
3333
|
-
})(
|
|
3337
|
+
})(Q0)), Q0.exports;
|
|
3334
3338
|
}
|
|
3335
|
-
var
|
|
3336
|
-
function
|
|
3337
|
-
return
|
|
3338
|
-
(function(t, e,
|
|
3339
|
+
var V0 = { exports: {} }, ux = V0.exports, fe;
|
|
3340
|
+
function dx() {
|
|
3341
|
+
return fe || (fe = 1, (function(r, u) {
|
|
3342
|
+
(function(t, e, d) {
|
|
3339
3343
|
r.exports = e(M(), X());
|
|
3340
|
-
})(
|
|
3344
|
+
})(ux, function(t) {
|
|
3341
3345
|
return t.mode.OFB = (function() {
|
|
3342
|
-
var e = t.lib.BlockCipherMode.extend(),
|
|
3343
|
-
processBlock: function(
|
|
3346
|
+
var e = t.lib.BlockCipherMode.extend(), d = e.Encryptor = e.extend({
|
|
3347
|
+
processBlock: function(l, _) {
|
|
3344
3348
|
var B = this._cipher, C = B.blockSize, x = this._iv, n = this._keystream;
|
|
3345
3349
|
x && (n = this._keystream = x.slice(0), this._iv = void 0), B.encryptBlock(n, 0);
|
|
3346
3350
|
for (var E = 0; E < C; E++)
|
|
3347
|
-
|
|
3351
|
+
l[_ + E] ^= n[E];
|
|
3348
3352
|
}
|
|
3349
3353
|
});
|
|
3350
|
-
return e.Decryptor =
|
|
3354
|
+
return e.Decryptor = d, e;
|
|
3351
3355
|
})(), t.mode.OFB;
|
|
3352
3356
|
});
|
|
3353
|
-
})(
|
|
3357
|
+
})(V0)), V0.exports;
|
|
3354
3358
|
}
|
|
3355
|
-
var
|
|
3356
|
-
function
|
|
3357
|
-
return
|
|
3358
|
-
(function(t, e,
|
|
3359
|
+
var J0 = { exports: {} }, lx = J0.exports, ue;
|
|
3360
|
+
function hx() {
|
|
3361
|
+
return ue || (ue = 1, (function(r, u) {
|
|
3362
|
+
(function(t, e, d) {
|
|
3359
3363
|
r.exports = e(M(), X());
|
|
3360
|
-
})(
|
|
3364
|
+
})(lx, function(t) {
|
|
3361
3365
|
return t.mode.ECB = (function() {
|
|
3362
3366
|
var e = t.lib.BlockCipherMode.extend();
|
|
3363
3367
|
return e.Encryptor = e.extend({
|
|
3364
|
-
processBlock: function(
|
|
3365
|
-
this._cipher.encryptBlock(
|
|
3368
|
+
processBlock: function(d, l) {
|
|
3369
|
+
this._cipher.encryptBlock(d, l);
|
|
3366
3370
|
}
|
|
3367
3371
|
}), e.Decryptor = e.extend({
|
|
3368
|
-
processBlock: function(
|
|
3369
|
-
this._cipher.decryptBlock(
|
|
3372
|
+
processBlock: function(d, l) {
|
|
3373
|
+
this._cipher.decryptBlock(d, l);
|
|
3370
3374
|
}
|
|
3371
3375
|
}), e;
|
|
3372
3376
|
})(), t.mode.ECB;
|
|
3373
3377
|
});
|
|
3374
|
-
})(
|
|
3378
|
+
})(J0)), J0.exports;
|
|
3375
3379
|
}
|
|
3376
|
-
var
|
|
3377
|
-
function
|
|
3378
|
-
return
|
|
3379
|
-
(function(t, e,
|
|
3380
|
+
var rr = { exports: {} }, vx = rr.exports, de;
|
|
3381
|
+
function px() {
|
|
3382
|
+
return de || (de = 1, (function(r, u) {
|
|
3383
|
+
(function(t, e, d) {
|
|
3380
3384
|
r.exports = e(M(), X());
|
|
3381
|
-
})(
|
|
3385
|
+
})(vx, function(t) {
|
|
3382
3386
|
return t.pad.AnsiX923 = {
|
|
3383
|
-
pad: function(e,
|
|
3384
|
-
var
|
|
3387
|
+
pad: function(e, d) {
|
|
3388
|
+
var l = e.sigBytes, _ = d * 4, B = _ - l % _, C = l + B - 1;
|
|
3385
3389
|
e.clamp(), e.words[C >>> 2] |= B << 24 - C % 4 * 8, e.sigBytes += B;
|
|
3386
3390
|
},
|
|
3387
3391
|
unpad: function(e) {
|
|
3388
|
-
var
|
|
3389
|
-
e.sigBytes -=
|
|
3392
|
+
var d = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3393
|
+
e.sigBytes -= d;
|
|
3390
3394
|
}
|
|
3391
3395
|
}, t.pad.Ansix923;
|
|
3392
3396
|
});
|
|
3393
|
-
})(
|
|
3397
|
+
})(rr)), rr.exports;
|
|
3394
3398
|
}
|
|
3395
|
-
var
|
|
3396
|
-
function
|
|
3397
|
-
return
|
|
3398
|
-
(function(t, e,
|
|
3399
|
+
var er = { exports: {} }, Bx = er.exports, le;
|
|
3400
|
+
function Cx() {
|
|
3401
|
+
return le || (le = 1, (function(r, u) {
|
|
3402
|
+
(function(t, e, d) {
|
|
3399
3403
|
r.exports = e(M(), X());
|
|
3400
|
-
})(
|
|
3404
|
+
})(Bx, function(t) {
|
|
3401
3405
|
return t.pad.Iso10126 = {
|
|
3402
|
-
pad: function(e,
|
|
3403
|
-
var
|
|
3404
|
-
e.concat(t.lib.WordArray.random(
|
|
3406
|
+
pad: function(e, d) {
|
|
3407
|
+
var l = d * 4, _ = l - e.sigBytes % l;
|
|
3408
|
+
e.concat(t.lib.WordArray.random(_ - 1)).concat(t.lib.WordArray.create([_ << 24], 1));
|
|
3405
3409
|
},
|
|
3406
3410
|
unpad: function(e) {
|
|
3407
|
-
var
|
|
3408
|
-
e.sigBytes -=
|
|
3411
|
+
var d = e.words[e.sigBytes - 1 >>> 2] & 255;
|
|
3412
|
+
e.sigBytes -= d;
|
|
3409
3413
|
}
|
|
3410
3414
|
}, t.pad.Iso10126;
|
|
3411
3415
|
});
|
|
3412
|
-
})(
|
|
3416
|
+
})(er)), er.exports;
|
|
3413
3417
|
}
|
|
3414
|
-
var
|
|
3415
|
-
function
|
|
3416
|
-
return
|
|
3417
|
-
(function(t, e,
|
|
3418
|
+
var tr = { exports: {} }, Ex = tr.exports, he;
|
|
3419
|
+
function Ax() {
|
|
3420
|
+
return he || (he = 1, (function(r, u) {
|
|
3421
|
+
(function(t, e, d) {
|
|
3418
3422
|
r.exports = e(M(), X());
|
|
3419
|
-
})(
|
|
3423
|
+
})(Ex, function(t) {
|
|
3420
3424
|
return t.pad.Iso97971 = {
|
|
3421
|
-
pad: function(e,
|
|
3422
|
-
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e,
|
|
3425
|
+
pad: function(e, d) {
|
|
3426
|
+
e.concat(t.lib.WordArray.create([2147483648], 1)), t.pad.ZeroPadding.pad(e, d);
|
|
3423
3427
|
},
|
|
3424
3428
|
unpad: function(e) {
|
|
3425
3429
|
t.pad.ZeroPadding.unpad(e), e.sigBytes--;
|
|
3426
3430
|
}
|
|
3427
3431
|
}, t.pad.Iso97971;
|
|
3428
3432
|
});
|
|
3429
|
-
})(
|
|
3433
|
+
})(tr)), tr.exports;
|
|
3430
3434
|
}
|
|
3431
|
-
var
|
|
3432
|
-
function
|
|
3433
|
-
return
|
|
3434
|
-
(function(t, e,
|
|
3435
|
+
var xr = { exports: {} }, Fx = xr.exports, ve;
|
|
3436
|
+
function gx() {
|
|
3437
|
+
return ve || (ve = 1, (function(r, u) {
|
|
3438
|
+
(function(t, e, d) {
|
|
3435
3439
|
r.exports = e(M(), X());
|
|
3436
|
-
})(
|
|
3440
|
+
})(Fx, function(t) {
|
|
3437
3441
|
return t.pad.ZeroPadding = {
|
|
3438
|
-
pad: function(e,
|
|
3439
|
-
var
|
|
3440
|
-
e.clamp(), e.sigBytes +=
|
|
3442
|
+
pad: function(e, d) {
|
|
3443
|
+
var l = d * 4;
|
|
3444
|
+
e.clamp(), e.sigBytes += l - (e.sigBytes % l || l);
|
|
3441
3445
|
},
|
|
3442
3446
|
unpad: function(e) {
|
|
3443
|
-
for (var
|
|
3444
|
-
if (
|
|
3445
|
-
e.sigBytes =
|
|
3447
|
+
for (var d = e.words, l = e.sigBytes - 1, l = e.sigBytes - 1; l >= 0; l--)
|
|
3448
|
+
if (d[l >>> 2] >>> 24 - l % 4 * 8 & 255) {
|
|
3449
|
+
e.sigBytes = l + 1;
|
|
3446
3450
|
break;
|
|
3447
3451
|
}
|
|
3448
3452
|
}
|
|
3449
3453
|
}, t.pad.ZeroPadding;
|
|
3450
3454
|
});
|
|
3451
|
-
})(
|
|
3455
|
+
})(xr)), xr.exports;
|
|
3452
3456
|
}
|
|
3453
|
-
var
|
|
3454
|
-
function
|
|
3455
|
-
return
|
|
3456
|
-
(function(t, e,
|
|
3457
|
+
var nr = { exports: {} }, Dx = nr.exports, pe;
|
|
3458
|
+
function bx() {
|
|
3459
|
+
return pe || (pe = 1, (function(r, u) {
|
|
3460
|
+
(function(t, e, d) {
|
|
3457
3461
|
r.exports = e(M(), X());
|
|
3458
|
-
})(
|
|
3462
|
+
})(Dx, function(t) {
|
|
3459
3463
|
return t.pad.NoPadding = {
|
|
3460
3464
|
pad: function() {
|
|
3461
3465
|
},
|
|
@@ -3463,16 +3467,16 @@ function Dx() {
|
|
|
3463
3467
|
}
|
|
3464
3468
|
}, t.pad.NoPadding;
|
|
3465
3469
|
});
|
|
3466
|
-
})(
|
|
3470
|
+
})(nr)), nr.exports;
|
|
3467
3471
|
}
|
|
3468
|
-
var
|
|
3469
|
-
function
|
|
3470
|
-
return
|
|
3471
|
-
(function(t, e,
|
|
3472
|
+
var ar = { exports: {} }, mx = ar.exports, Be;
|
|
3473
|
+
function _x() {
|
|
3474
|
+
return Be || (Be = 1, (function(r, u) {
|
|
3475
|
+
(function(t, e, d) {
|
|
3472
3476
|
r.exports = e(M(), X());
|
|
3473
|
-
})(
|
|
3477
|
+
})(mx, function(t) {
|
|
3474
3478
|
return (function(e) {
|
|
3475
|
-
var
|
|
3479
|
+
var d = t, l = d.lib, _ = l.CipherParams, B = d.enc, C = B.Hex, x = d.format;
|
|
3476
3480
|
x.Hex = {
|
|
3477
3481
|
/**
|
|
3478
3482
|
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
@@ -3505,38 +3509,38 @@ function mx() {
|
|
|
3505
3509
|
*/
|
|
3506
3510
|
parse: function(n) {
|
|
3507
3511
|
var E = C.parse(n);
|
|
3508
|
-
return
|
|
3512
|
+
return _.create({ ciphertext: E });
|
|
3509
3513
|
}
|
|
3510
3514
|
};
|
|
3511
3515
|
})(), t.format.Hex;
|
|
3512
3516
|
});
|
|
3513
|
-
})(
|
|
3517
|
+
})(ar)), ar.exports;
|
|
3514
3518
|
}
|
|
3515
|
-
var
|
|
3516
|
-
function
|
|
3517
|
-
return
|
|
3518
|
-
(function(t, e,
|
|
3519
|
+
var or = { exports: {} }, yx = or.exports, Ce;
|
|
3520
|
+
function wx() {
|
|
3521
|
+
return Ce || (Ce = 1, (function(r, u) {
|
|
3522
|
+
(function(t, e, d) {
|
|
3519
3523
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
3520
|
-
})(
|
|
3524
|
+
})(yx, function(t) {
|
|
3521
3525
|
return (function() {
|
|
3522
|
-
var e = t,
|
|
3526
|
+
var e = t, d = e.lib, l = d.BlockCipher, _ = e.algo, B = [], C = [], x = [], n = [], E = [], a = [], s = [], f = [], p = [], v = [];
|
|
3523
3527
|
(function() {
|
|
3524
|
-
for (var o = [],
|
|
3525
|
-
|
|
3526
|
-
for (var b = 0, g = 0,
|
|
3527
|
-
var
|
|
3528
|
-
|
|
3529
|
-
var k = o[b], R = o[k], F = o[R], w = o[
|
|
3528
|
+
for (var o = [], h = 0; h < 256; h++)
|
|
3529
|
+
h < 128 ? o[h] = h << 1 : o[h] = h << 1 ^ 283;
|
|
3530
|
+
for (var b = 0, g = 0, h = 0; h < 256; h++) {
|
|
3531
|
+
var y = g ^ g << 1 ^ g << 2 ^ g << 3 ^ g << 4;
|
|
3532
|
+
y = y >>> 8 ^ y & 255 ^ 99, B[b] = y, C[y] = b;
|
|
3533
|
+
var k = o[b], R = o[k], F = o[R], w = o[y] * 257 ^ y * 16843008;
|
|
3530
3534
|
x[b] = w << 24 | w >>> 8, n[b] = w << 16 | w >>> 16, E[b] = w << 8 | w >>> 24, a[b] = w;
|
|
3531
3535
|
var w = F * 16843009 ^ R * 65537 ^ k * 257 ^ b * 16843008;
|
|
3532
|
-
s[
|
|
3536
|
+
s[y] = w << 24 | w >>> 8, f[y] = w << 16 | w >>> 16, p[y] = w << 8 | w >>> 24, v[y] = w, b ? (b = k ^ o[o[o[F ^ k]]], g ^= o[o[g]]) : b = g = 1;
|
|
3533
3537
|
}
|
|
3534
3538
|
})();
|
|
3535
|
-
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i =
|
|
3539
|
+
var D = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], i = _.AES = l.extend({
|
|
3536
3540
|
_doReset: function() {
|
|
3537
3541
|
var o;
|
|
3538
3542
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
3539
|
-
for (var
|
|
3543
|
+
for (var h = this._keyPriorReset = this._key, b = h.words, g = h.sigBytes / 4, y = this._nRounds = g + 6, k = (y + 1) * 4, R = this._keySchedule = [], F = 0; F < k; F++)
|
|
3540
3544
|
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);
|
|
3541
3545
|
for (var w = this._invKeySchedule = [], H = 0; H < k; H++) {
|
|
3542
3546
|
var F = k - H;
|
|
@@ -3544,42 +3548,42 @@ function yx() {
|
|
|
3544
3548
|
var o = R[F];
|
|
3545
3549
|
else
|
|
3546
3550
|
var o = R[F - 4];
|
|
3547
|
-
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^
|
|
3551
|
+
H < 4 || F <= 4 ? w[H] = o : w[H] = s[B[o >>> 24]] ^ f[B[o >>> 16 & 255]] ^ p[B[o >>> 8 & 255]] ^ v[B[o & 255]];
|
|
3548
3552
|
}
|
|
3549
3553
|
}
|
|
3550
3554
|
},
|
|
3551
|
-
encryptBlock: function(o,
|
|
3552
|
-
this._doCryptBlock(o,
|
|
3555
|
+
encryptBlock: function(o, h) {
|
|
3556
|
+
this._doCryptBlock(o, h, this._keySchedule, x, n, E, a, B);
|
|
3553
3557
|
},
|
|
3554
|
-
decryptBlock: function(o,
|
|
3555
|
-
var b = o[
|
|
3556
|
-
o[
|
|
3557
|
-
var b = o[
|
|
3558
|
-
o[
|
|
3558
|
+
decryptBlock: function(o, h) {
|
|
3559
|
+
var b = o[h + 1];
|
|
3560
|
+
o[h + 1] = o[h + 3], o[h + 3] = b, this._doCryptBlock(o, h, this._invKeySchedule, s, f, p, v, C);
|
|
3561
|
+
var b = o[h + 1];
|
|
3562
|
+
o[h + 1] = o[h + 3], o[h + 3] = b;
|
|
3559
3563
|
},
|
|
3560
|
-
_doCryptBlock: function(o,
|
|
3561
|
-
for (var w = this._nRounds, H = o[
|
|
3562
|
-
var T = g[H >>> 24] ^
|
|
3564
|
+
_doCryptBlock: function(o, h, b, g, y, k, R, F) {
|
|
3565
|
+
for (var w = this._nRounds, H = o[h] ^ b[0], $ = o[h + 1] ^ b[1], z = o[h + 2] ^ b[2], O = o[h + 3] ^ b[3], q = 4, U = 1; U < w; U++) {
|
|
3566
|
+
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++];
|
|
3563
3567
|
H = T, $ = N, z = j, O = S;
|
|
3564
3568
|
}
|
|
3565
3569
|
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++];
|
|
3566
|
-
o[
|
|
3570
|
+
o[h] = T, o[h + 1] = N, o[h + 2] = j, o[h + 3] = S;
|
|
3567
3571
|
},
|
|
3568
3572
|
keySize: 256 / 32
|
|
3569
3573
|
});
|
|
3570
|
-
e.AES =
|
|
3574
|
+
e.AES = l._createHelper(i);
|
|
3571
3575
|
})(), t.AES;
|
|
3572
3576
|
});
|
|
3573
|
-
})(
|
|
3577
|
+
})(or)), or.exports;
|
|
3574
3578
|
}
|
|
3575
|
-
var
|
|
3576
|
-
function
|
|
3577
|
-
return
|
|
3578
|
-
(function(t, e,
|
|
3579
|
+
var ir = { exports: {} }, kx = ir.exports, Ee;
|
|
3580
|
+
function Sx() {
|
|
3581
|
+
return Ee || (Ee = 1, (function(r, u) {
|
|
3582
|
+
(function(t, e, d) {
|
|
3579
3583
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
3580
|
-
})(
|
|
3584
|
+
})(kx, function(t) {
|
|
3581
3585
|
return (function() {
|
|
3582
|
-
var e = t,
|
|
3586
|
+
var e = t, d = e.lib, l = d.WordArray, _ = d.BlockCipher, B = e.algo, C = [
|
|
3583
3587
|
57,
|
|
3584
3588
|
49,
|
|
3585
3589
|
41,
|
|
@@ -4223,22 +4227,22 @@ function kx() {
|
|
|
4223
4227
|
8064,
|
|
4224
4228
|
504,
|
|
4225
4229
|
2147483679
|
|
4226
|
-
], s = B.DES =
|
|
4230
|
+
], s = B.DES = _.extend({
|
|
4227
4231
|
_doReset: function() {
|
|
4228
|
-
for (var D = this._key, i = D.words, o = [],
|
|
4229
|
-
var b = C[
|
|
4230
|
-
o[
|
|
4232
|
+
for (var D = this._key, i = D.words, o = [], h = 0; h < 56; h++) {
|
|
4233
|
+
var b = C[h] - 1;
|
|
4234
|
+
o[h] = i[b >>> 5] >>> 31 - b % 32 & 1;
|
|
4231
4235
|
}
|
|
4232
|
-
for (var g = this._subKeys = [],
|
|
4233
|
-
for (var k = g[
|
|
4234
|
-
k[
|
|
4236
|
+
for (var g = this._subKeys = [], y = 0; y < 16; y++) {
|
|
4237
|
+
for (var k = g[y] = [], R = n[y], h = 0; h < 24; h++)
|
|
4238
|
+
k[h / 6 | 0] |= o[(x[h] - 1 + R) % 28] << 31 - h % 6, k[4 + (h / 6 | 0)] |= o[28 + (x[h + 24] - 1 + R) % 28] << 31 - h % 6;
|
|
4235
4239
|
k[0] = k[0] << 1 | k[0] >>> 31;
|
|
4236
|
-
for (var
|
|
4237
|
-
k[
|
|
4240
|
+
for (var h = 1; h < 7; h++)
|
|
4241
|
+
k[h] = k[h] >>> (h - 1) * 4 + 3;
|
|
4238
4242
|
k[7] = k[7] << 5 | k[7] >>> 27;
|
|
4239
4243
|
}
|
|
4240
|
-
for (var F = this._invSubKeys = [],
|
|
4241
|
-
F[
|
|
4244
|
+
for (var F = this._invSubKeys = [], h = 0; h < 16; h++)
|
|
4245
|
+
F[h] = g[15 - h];
|
|
4242
4246
|
},
|
|
4243
4247
|
encryptBlock: function(D, i) {
|
|
4244
4248
|
this._doCryptBlock(D, i, this._subKeys);
|
|
@@ -4247,20 +4251,20 @@ function kx() {
|
|
|
4247
4251
|
this._doCryptBlock(D, i, this._invSubKeys);
|
|
4248
4252
|
},
|
|
4249
4253
|
_doCryptBlock: function(D, i, o) {
|
|
4250
|
-
this._lBlock = D[i], this._rBlock = D[i + 1],
|
|
4251
|
-
for (var
|
|
4252
|
-
for (var b = o[
|
|
4253
|
-
k |= E[R][((
|
|
4254
|
-
this._lBlock =
|
|
4254
|
+
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);
|
|
4255
|
+
for (var h = 0; h < 16; h++) {
|
|
4256
|
+
for (var b = o[h], g = this._lBlock, y = this._rBlock, k = 0, R = 0; R < 8; R++)
|
|
4257
|
+
k |= E[R][((y ^ b[R]) & a[R]) >>> 0];
|
|
4258
|
+
this._lBlock = y, this._rBlock = g ^ k;
|
|
4255
4259
|
}
|
|
4256
4260
|
var F = this._lBlock;
|
|
4257
|
-
this._lBlock = this._rBlock, this._rBlock = F,
|
|
4261
|
+
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;
|
|
4258
4262
|
},
|
|
4259
4263
|
keySize: 64 / 32,
|
|
4260
4264
|
ivSize: 64 / 32,
|
|
4261
4265
|
blockSize: 64 / 32
|
|
4262
4266
|
});
|
|
4263
|
-
function
|
|
4267
|
+
function f(D, i) {
|
|
4264
4268
|
var o = (this._lBlock >>> D ^ this._rBlock) & i;
|
|
4265
4269
|
this._rBlock ^= o, this._lBlock ^= o << D;
|
|
4266
4270
|
}
|
|
@@ -4268,14 +4272,14 @@ function kx() {
|
|
|
4268
4272
|
var o = (this._rBlock >>> D ^ this._lBlock) & i;
|
|
4269
4273
|
this._lBlock ^= o, this._rBlock ^= o << D;
|
|
4270
4274
|
}
|
|
4271
|
-
e.DES =
|
|
4272
|
-
var
|
|
4275
|
+
e.DES = _._createHelper(s);
|
|
4276
|
+
var v = B.TripleDES = _.extend({
|
|
4273
4277
|
_doReset: function() {
|
|
4274
4278
|
var D = this._key, i = D.words;
|
|
4275
4279
|
if (i.length !== 2 && i.length !== 4 && i.length < 6)
|
|
4276
4280
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
4277
|
-
var o = i.slice(0, 2),
|
|
4278
|
-
this._des1 = s.createEncryptor(
|
|
4281
|
+
var o = i.slice(0, 2), h = i.length < 4 ? i.slice(0, 2) : i.slice(2, 4), b = i.length < 6 ? i.slice(0, 2) : i.slice(4, 6);
|
|
4282
|
+
this._des1 = s.createEncryptor(l.create(o)), this._des2 = s.createEncryptor(l.create(h)), this._des3 = s.createEncryptor(l.create(b));
|
|
4279
4283
|
},
|
|
4280
4284
|
encryptBlock: function(D, i) {
|
|
4281
4285
|
this._des1.encryptBlock(D, i), this._des2.decryptBlock(D, i), this._des3.encryptBlock(D, i);
|
|
@@ -4287,27 +4291,27 @@ function kx() {
|
|
|
4287
4291
|
ivSize: 64 / 32,
|
|
4288
4292
|
blockSize: 64 / 32
|
|
4289
4293
|
});
|
|
4290
|
-
e.TripleDES =
|
|
4294
|
+
e.TripleDES = _._createHelper(v);
|
|
4291
4295
|
})(), t.TripleDES;
|
|
4292
4296
|
});
|
|
4293
|
-
})(
|
|
4297
|
+
})(ir)), ir.exports;
|
|
4294
4298
|
}
|
|
4295
|
-
var
|
|
4296
|
-
function
|
|
4297
|
-
return
|
|
4298
|
-
(function(t, e,
|
|
4299
|
+
var sr = { exports: {} }, Hx = sr.exports, Ae;
|
|
4300
|
+
function $x() {
|
|
4301
|
+
return Ae || (Ae = 1, (function(r, u) {
|
|
4302
|
+
(function(t, e, d) {
|
|
4299
4303
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4300
|
-
})(
|
|
4304
|
+
})(Hx, function(t) {
|
|
4301
4305
|
return (function() {
|
|
4302
|
-
var e = t,
|
|
4306
|
+
var e = t, d = e.lib, l = d.StreamCipher, _ = e.algo, B = _.RC4 = l.extend({
|
|
4303
4307
|
_doReset: function() {
|
|
4304
|
-
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [],
|
|
4305
|
-
s[
|
|
4306
|
-
for (var
|
|
4307
|
-
var
|
|
4308
|
-
p = (p + s[
|
|
4309
|
-
var i = s[
|
|
4310
|
-
s[
|
|
4308
|
+
for (var n = this._key, E = n.words, a = n.sigBytes, s = this._S = [], f = 0; f < 256; f++)
|
|
4309
|
+
s[f] = f;
|
|
4310
|
+
for (var f = 0, p = 0; f < 256; f++) {
|
|
4311
|
+
var v = f % a, D = E[v >>> 2] >>> 24 - v % 4 * 8 & 255;
|
|
4312
|
+
p = (p + s[f] + D) % 256;
|
|
4313
|
+
var i = s[f];
|
|
4314
|
+
s[f] = s[p], s[p] = i;
|
|
4311
4315
|
}
|
|
4312
4316
|
this._i = this._j = 0;
|
|
4313
4317
|
},
|
|
@@ -4318,15 +4322,15 @@ function Hx() {
|
|
|
4318
4322
|
ivSize: 0
|
|
4319
4323
|
});
|
|
4320
4324
|
function C() {
|
|
4321
|
-
for (var n = this._S, E = this._i, a = this._j, s = 0,
|
|
4325
|
+
for (var n = this._S, E = this._i, a = this._j, s = 0, f = 0; f < 4; f++) {
|
|
4322
4326
|
E = (E + 1) % 256, a = (a + n[E]) % 256;
|
|
4323
4327
|
var p = n[E];
|
|
4324
|
-
n[E] = n[a], n[a] = p, s |= n[(n[E] + n[a]) % 256] << 24 -
|
|
4328
|
+
n[E] = n[a], n[a] = p, s |= n[(n[E] + n[a]) % 256] << 24 - f * 8;
|
|
4325
4329
|
}
|
|
4326
4330
|
return this._i = E, this._j = a, s;
|
|
4327
4331
|
}
|
|
4328
|
-
e.RC4 =
|
|
4329
|
-
var x =
|
|
4332
|
+
e.RC4 = l._createHelper(B);
|
|
4333
|
+
var x = _.RC4Drop = B.extend({
|
|
4330
4334
|
/**
|
|
4331
4335
|
* Configuration options.
|
|
4332
4336
|
*
|
|
@@ -4341,22 +4345,22 @@ function Hx() {
|
|
|
4341
4345
|
C.call(this);
|
|
4342
4346
|
}
|
|
4343
4347
|
});
|
|
4344
|
-
e.RC4Drop =
|
|
4348
|
+
e.RC4Drop = l._createHelper(x);
|
|
4345
4349
|
})(), t.RC4;
|
|
4346
4350
|
});
|
|
4347
|
-
})(
|
|
4351
|
+
})(sr)), sr.exports;
|
|
4348
4352
|
}
|
|
4349
|
-
var
|
|
4350
|
-
function
|
|
4351
|
-
return
|
|
4352
|
-
(function(t, e,
|
|
4353
|
+
var cr = { exports: {} }, Rx = cr.exports, Fe;
|
|
4354
|
+
function Px() {
|
|
4355
|
+
return Fe || (Fe = 1, (function(r, u) {
|
|
4356
|
+
(function(t, e, d) {
|
|
4353
4357
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4354
|
-
})(
|
|
4358
|
+
})(Rx, function(t) {
|
|
4355
4359
|
return (function() {
|
|
4356
|
-
var e = t,
|
|
4360
|
+
var e = t, d = e.lib, l = d.StreamCipher, _ = e.algo, B = [], C = [], x = [], n = _.Rabbit = l.extend({
|
|
4357
4361
|
_doReset: function() {
|
|
4358
|
-
for (var a = this._key.words, s = this.cfg.iv,
|
|
4359
|
-
a[
|
|
4362
|
+
for (var a = this._key.words, s = this.cfg.iv, f = 0; f < 4; f++)
|
|
4363
|
+
a[f] = (a[f] << 8 | a[f] >>> 24) & 16711935 | (a[f] << 24 | a[f] >>> 8) & 4278255360;
|
|
4360
4364
|
var p = this._X = [
|
|
4361
4365
|
a[0],
|
|
4362
4366
|
a[3] << 16 | a[2] >>> 16,
|
|
@@ -4366,7 +4370,7 @@ function Rx() {
|
|
|
4366
4370
|
a[1] << 16 | a[0] >>> 16,
|
|
4367
4371
|
a[3],
|
|
4368
4372
|
a[2] << 16 | a[1] >>> 16
|
|
4369
|
-
],
|
|
4373
|
+
], v = this._C = [
|
|
4370
4374
|
a[2] << 16 | a[2] >>> 16,
|
|
4371
4375
|
a[0] & 4294901760 | a[1] & 65535,
|
|
4372
4376
|
a[3] << 16 | a[3] >>> 16,
|
|
@@ -4377,20 +4381,20 @@ function Rx() {
|
|
|
4377
4381
|
a[3] & 4294901760 | a[0] & 65535
|
|
4378
4382
|
];
|
|
4379
4383
|
this._b = 0;
|
|
4380
|
-
for (var
|
|
4384
|
+
for (var f = 0; f < 4; f++)
|
|
4381
4385
|
E.call(this);
|
|
4382
|
-
for (var
|
|
4383
|
-
|
|
4386
|
+
for (var f = 0; f < 8; f++)
|
|
4387
|
+
v[f] ^= p[f + 4 & 7];
|
|
4384
4388
|
if (s) {
|
|
4385
|
-
var D = s.words, i = D[0], o = D[1],
|
|
4386
|
-
|
|
4387
|
-
for (var
|
|
4389
|
+
var D = s.words, i = D[0], o = D[1], h = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = h >>> 16 | b & 4294901760, y = b << 16 | h & 65535;
|
|
4390
|
+
v[0] ^= h, v[1] ^= g, v[2] ^= b, v[3] ^= y, v[4] ^= h, v[5] ^= g, v[6] ^= b, v[7] ^= y;
|
|
4391
|
+
for (var f = 0; f < 4; f++)
|
|
4388
4392
|
E.call(this);
|
|
4389
4393
|
}
|
|
4390
4394
|
},
|
|
4391
4395
|
_doProcessBlock: function(a, s) {
|
|
4392
|
-
var
|
|
4393
|
-
E.call(this), B[0] =
|
|
4396
|
+
var f = this._X;
|
|
4397
|
+
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;
|
|
4394
4398
|
for (var p = 0; p < 4; p++)
|
|
4395
4399
|
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4396
4400
|
},
|
|
@@ -4398,30 +4402,30 @@ function Rx() {
|
|
|
4398
4402
|
ivSize: 64 / 32
|
|
4399
4403
|
});
|
|
4400
4404
|
function E() {
|
|
4401
|
-
for (var a = this._X, s = this._C,
|
|
4402
|
-
C[
|
|
4405
|
+
for (var a = this._X, s = this._C, f = 0; f < 8; f++)
|
|
4406
|
+
C[f] = s[f];
|
|
4403
4407
|
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;
|
|
4404
|
-
for (var
|
|
4405
|
-
var p = a[
|
|
4406
|
-
x[
|
|
4408
|
+
for (var f = 0; f < 8; f++) {
|
|
4409
|
+
var p = a[f] + s[f], v = p & 65535, D = p >>> 16, i = ((v * v >>> 17) + v * D >>> 15) + D * D, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4410
|
+
x[f] = i ^ o;
|
|
4407
4411
|
}
|
|
4408
4412
|
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;
|
|
4409
4413
|
}
|
|
4410
|
-
e.Rabbit =
|
|
4414
|
+
e.Rabbit = l._createHelper(n);
|
|
4411
4415
|
})(), t.Rabbit;
|
|
4412
4416
|
});
|
|
4413
|
-
})(
|
|
4417
|
+
})(cr)), cr.exports;
|
|
4414
4418
|
}
|
|
4415
|
-
var
|
|
4416
|
-
function
|
|
4417
|
-
return
|
|
4418
|
-
(function(t, e,
|
|
4419
|
+
var fr = { exports: {} }, zx = fr.exports, ge;
|
|
4420
|
+
function Ix() {
|
|
4421
|
+
return ge || (ge = 1, (function(r, u) {
|
|
4422
|
+
(function(t, e, d) {
|
|
4419
4423
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4420
|
-
})(
|
|
4424
|
+
})(zx, function(t) {
|
|
4421
4425
|
return (function() {
|
|
4422
|
-
var e = t,
|
|
4426
|
+
var e = t, d = e.lib, l = d.StreamCipher, _ = e.algo, B = [], C = [], x = [], n = _.RabbitLegacy = l.extend({
|
|
4423
4427
|
_doReset: function() {
|
|
4424
|
-
var a = this._key.words, s = this.cfg.iv,
|
|
4428
|
+
var a = this._key.words, s = this.cfg.iv, f = this._X = [
|
|
4425
4429
|
a[0],
|
|
4426
4430
|
a[3] << 16 | a[2] >>> 16,
|
|
4427
4431
|
a[1],
|
|
@@ -4441,20 +4445,20 @@ function zx() {
|
|
|
4441
4445
|
a[3] & 4294901760 | a[0] & 65535
|
|
4442
4446
|
];
|
|
4443
4447
|
this._b = 0;
|
|
4444
|
-
for (var
|
|
4448
|
+
for (var v = 0; v < 4; v++)
|
|
4445
4449
|
E.call(this);
|
|
4446
|
-
for (var
|
|
4447
|
-
p[
|
|
4450
|
+
for (var v = 0; v < 8; v++)
|
|
4451
|
+
p[v] ^= f[v + 4 & 7];
|
|
4448
4452
|
if (s) {
|
|
4449
|
-
var D = s.words, i = D[0], o = D[1],
|
|
4450
|
-
p[0] ^=
|
|
4451
|
-
for (var
|
|
4453
|
+
var D = s.words, i = D[0], o = D[1], h = (i << 8 | i >>> 24) & 16711935 | (i << 24 | i >>> 8) & 4278255360, b = (o << 8 | o >>> 24) & 16711935 | (o << 24 | o >>> 8) & 4278255360, g = h >>> 16 | b & 4294901760, y = b << 16 | h & 65535;
|
|
4454
|
+
p[0] ^= h, p[1] ^= g, p[2] ^= b, p[3] ^= y, p[4] ^= h, p[5] ^= g, p[6] ^= b, p[7] ^= y;
|
|
4455
|
+
for (var v = 0; v < 4; v++)
|
|
4452
4456
|
E.call(this);
|
|
4453
4457
|
}
|
|
4454
4458
|
},
|
|
4455
4459
|
_doProcessBlock: function(a, s) {
|
|
4456
|
-
var
|
|
4457
|
-
E.call(this), B[0] =
|
|
4460
|
+
var f = this._X;
|
|
4461
|
+
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;
|
|
4458
4462
|
for (var p = 0; p < 4; p++)
|
|
4459
4463
|
B[p] = (B[p] << 8 | B[p] >>> 24) & 16711935 | (B[p] << 24 | B[p] >>> 8) & 4278255360, a[s + p] ^= B[p];
|
|
4460
4464
|
},
|
|
@@ -4462,28 +4466,28 @@ function zx() {
|
|
|
4462
4466
|
ivSize: 64 / 32
|
|
4463
4467
|
});
|
|
4464
4468
|
function E() {
|
|
4465
|
-
for (var a = this._X, s = this._C,
|
|
4466
|
-
C[
|
|
4469
|
+
for (var a = this._X, s = this._C, f = 0; f < 8; f++)
|
|
4470
|
+
C[f] = s[f];
|
|
4467
4471
|
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;
|
|
4468
|
-
for (var
|
|
4469
|
-
var p = a[
|
|
4470
|
-
x[
|
|
4472
|
+
for (var f = 0; f < 8; f++) {
|
|
4473
|
+
var p = a[f] + s[f], v = p & 65535, D = p >>> 16, i = ((v * v >>> 17) + v * D >>> 15) + D * D, o = ((p & 4294901760) * p | 0) + ((p & 65535) * p | 0);
|
|
4474
|
+
x[f] = i ^ o;
|
|
4471
4475
|
}
|
|
4472
4476
|
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;
|
|
4473
4477
|
}
|
|
4474
|
-
e.RabbitLegacy =
|
|
4478
|
+
e.RabbitLegacy = l._createHelper(n);
|
|
4475
4479
|
})(), t.RabbitLegacy;
|
|
4476
4480
|
});
|
|
4477
|
-
})(
|
|
4481
|
+
})(fr)), fr.exports;
|
|
4478
4482
|
}
|
|
4479
|
-
var
|
|
4480
|
-
function
|
|
4481
|
-
return
|
|
4482
|
-
(function(t, e,
|
|
4483
|
+
var ur = { exports: {} }, Wx = ur.exports, De;
|
|
4484
|
+
function Lx() {
|
|
4485
|
+
return De || (De = 1, (function(r, u) {
|
|
4486
|
+
(function(t, e, d) {
|
|
4483
4487
|
r.exports = e(M(), c0(), f0(), o0(), X());
|
|
4484
4488
|
})(Wx, function(t) {
|
|
4485
4489
|
return (function() {
|
|
4486
|
-
var e = t,
|
|
4490
|
+
var e = t, d = e.lib, l = d.BlockCipher, _ = e.algo;
|
|
4487
4491
|
const B = 16, C = [
|
|
4488
4492
|
608135816,
|
|
4489
4493
|
2242054355,
|
|
@@ -5541,163 +5545,163 @@ function Ix() {
|
|
|
5541
5545
|
pbox: [],
|
|
5542
5546
|
sbox: []
|
|
5543
5547
|
};
|
|
5544
|
-
function E(
|
|
5545
|
-
let i = D >> 24 & 255, o = D >> 16 & 255,
|
|
5546
|
-
return g = g ^
|
|
5548
|
+
function E(v, D) {
|
|
5549
|
+
let i = D >> 24 & 255, o = D >> 16 & 255, h = D >> 8 & 255, b = D & 255, g = v.sbox[0][i] + v.sbox[1][o];
|
|
5550
|
+
return g = g ^ v.sbox[2][h], g = g + v.sbox[3][b], g;
|
|
5547
5551
|
}
|
|
5548
|
-
function a(
|
|
5549
|
-
let o = D,
|
|
5552
|
+
function a(v, D, i) {
|
|
5553
|
+
let o = D, h = i, b;
|
|
5550
5554
|
for (let g = 0; g < B; ++g)
|
|
5551
|
-
o = o ^
|
|
5552
|
-
return b = o, o =
|
|
5555
|
+
o = o ^ v.pbox[g], h = E(v, o) ^ h, b = o, o = h, h = b;
|
|
5556
|
+
return b = o, o = h, h = b, h = h ^ v.pbox[B], o = o ^ v.pbox[B + 1], { left: o, right: h };
|
|
5553
5557
|
}
|
|
5554
|
-
function s(
|
|
5555
|
-
let o = D,
|
|
5558
|
+
function s(v, D, i) {
|
|
5559
|
+
let o = D, h = i, b;
|
|
5556
5560
|
for (let g = B + 1; g > 1; --g)
|
|
5557
|
-
o = o ^
|
|
5558
|
-
return b = o, o =
|
|
5561
|
+
o = o ^ v.pbox[g], h = E(v, o) ^ h, b = o, o = h, h = b;
|
|
5562
|
+
return b = o, o = h, h = b, h = h ^ v.pbox[1], o = o ^ v.pbox[0], { left: o, right: h };
|
|
5559
5563
|
}
|
|
5560
|
-
function
|
|
5561
|
-
for (let
|
|
5562
|
-
|
|
5564
|
+
function f(v, D, i) {
|
|
5565
|
+
for (let y = 0; y < 4; y++) {
|
|
5566
|
+
v.sbox[y] = [];
|
|
5563
5567
|
for (let k = 0; k < 256; k++)
|
|
5564
|
-
|
|
5568
|
+
v.sbox[y][k] = x[y][k];
|
|
5565
5569
|
}
|
|
5566
5570
|
let o = 0;
|
|
5567
|
-
for (let
|
|
5568
|
-
|
|
5569
|
-
let
|
|
5570
|
-
for (let
|
|
5571
|
-
g = a(
|
|
5572
|
-
for (let
|
|
5571
|
+
for (let y = 0; y < B + 2; y++)
|
|
5572
|
+
v.pbox[y] = C[y] ^ D[o], o++, o >= i && (o = 0);
|
|
5573
|
+
let h = 0, b = 0, g = 0;
|
|
5574
|
+
for (let y = 0; y < B + 2; y += 2)
|
|
5575
|
+
g = a(v, h, b), h = g.left, b = g.right, v.pbox[y] = h, v.pbox[y + 1] = b;
|
|
5576
|
+
for (let y = 0; y < 4; y++)
|
|
5573
5577
|
for (let k = 0; k < 256; k += 2)
|
|
5574
|
-
g = a(
|
|
5578
|
+
g = a(v, h, b), h = g.left, b = g.right, v.sbox[y][k] = h, v.sbox[y][k + 1] = b;
|
|
5575
5579
|
return !0;
|
|
5576
5580
|
}
|
|
5577
|
-
var p =
|
|
5581
|
+
var p = _.Blowfish = l.extend({
|
|
5578
5582
|
_doReset: function() {
|
|
5579
5583
|
if (this._keyPriorReset !== this._key) {
|
|
5580
|
-
var
|
|
5581
|
-
|
|
5584
|
+
var v = this._keyPriorReset = this._key, D = v.words, i = v.sigBytes / 4;
|
|
5585
|
+
f(n, D, i);
|
|
5582
5586
|
}
|
|
5583
5587
|
},
|
|
5584
|
-
encryptBlock: function(
|
|
5585
|
-
var i = a(n,
|
|
5586
|
-
|
|
5588
|
+
encryptBlock: function(v, D) {
|
|
5589
|
+
var i = a(n, v[D], v[D + 1]);
|
|
5590
|
+
v[D] = i.left, v[D + 1] = i.right;
|
|
5587
5591
|
},
|
|
5588
|
-
decryptBlock: function(
|
|
5589
|
-
var i = s(n,
|
|
5590
|
-
|
|
5592
|
+
decryptBlock: function(v, D) {
|
|
5593
|
+
var i = s(n, v[D], v[D + 1]);
|
|
5594
|
+
v[D] = i.left, v[D + 1] = i.right;
|
|
5591
5595
|
},
|
|
5592
5596
|
blockSize: 64 / 32,
|
|
5593
5597
|
keySize: 128 / 32,
|
|
5594
5598
|
ivSize: 64 / 32
|
|
5595
5599
|
});
|
|
5596
|
-
e.Blowfish =
|
|
5600
|
+
e.Blowfish = l._createHelper(p);
|
|
5597
5601
|
})(), t.Blowfish;
|
|
5598
5602
|
});
|
|
5599
|
-
})(
|
|
5603
|
+
})(ur)), ur.exports;
|
|
5600
5604
|
}
|
|
5601
|
-
var
|
|
5602
|
-
function
|
|
5603
|
-
return
|
|
5604
|
-
(function(t, e,
|
|
5605
|
-
r.exports = e(M(),
|
|
5606
|
-
})(
|
|
5605
|
+
var Ox = S0.exports, be;
|
|
5606
|
+
function qx() {
|
|
5607
|
+
return be || (be = 1, (function(r, u) {
|
|
5608
|
+
(function(t, e, d) {
|
|
5609
|
+
r.exports = e(M(), vr(), It(), Lt(), c0(), Tt(), f0(), Pe(), mr(), Gt(), ze(), Yt(), Qt(), Jt(), _r(), tx(), o0(), X(), ox(), sx(), fx(), dx(), hx(), px(), Cx(), Ax(), gx(), bx(), _x(), wx(), Sx(), $x(), Px(), Ix(), Lx());
|
|
5610
|
+
})(Ox, function(t) {
|
|
5607
5611
|
return t;
|
|
5608
5612
|
});
|
|
5609
|
-
})(
|
|
5613
|
+
})(S0)), S0.exports;
|
|
5610
5614
|
}
|
|
5611
|
-
|
|
5612
|
-
let
|
|
5615
|
+
qx();
|
|
5616
|
+
let Ie = null, We = null, Le = null, Oe = null;
|
|
5613
5617
|
Math.random().toString(36).substring(7);
|
|
5614
|
-
function
|
|
5615
|
-
|
|
5618
|
+
function Tx(r) {
|
|
5619
|
+
Ie = r.token, We = r.apiUrl, Le = r.deviceId, Oe = r.domain;
|
|
5616
5620
|
}
|
|
5617
|
-
function
|
|
5621
|
+
function Mx() {
|
|
5618
5622
|
return {
|
|
5619
|
-
token:
|
|
5623
|
+
token: Ie,
|
|
5620
5624
|
apiUrl: We,
|
|
5621
|
-
deviceId:
|
|
5622
|
-
domain:
|
|
5625
|
+
deviceId: Le,
|
|
5626
|
+
domain: Oe
|
|
5623
5627
|
};
|
|
5624
5628
|
}
|
|
5625
|
-
function
|
|
5626
|
-
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.
|
|
5629
|
+
function Nx(r) {
|
|
5630
|
+
return `/sdk-workers/${(r.split("/").pop() || r).replace(/\.ts$/, ".js")}?v=1.1.175`;
|
|
5627
5631
|
}
|
|
5628
|
-
function
|
|
5629
|
-
const t =
|
|
5630
|
-
return new Worker(t, { type: "module", ...
|
|
5632
|
+
function Ux(r, u) {
|
|
5633
|
+
const t = Nx(r);
|
|
5634
|
+
return new Worker(t, { type: "module", ...u });
|
|
5631
5635
|
}
|
|
5632
|
-
const
|
|
5636
|
+
const yr = () => {
|
|
5633
5637
|
try {
|
|
5634
5638
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5635
5639
|
} catch {
|
|
5636
5640
|
}
|
|
5637
5641
|
return !1;
|
|
5638
|
-
},
|
|
5639
|
-
|
|
5640
|
-
},
|
|
5641
|
-
|
|
5642
|
-
},
|
|
5643
|
-
let
|
|
5644
|
-
function
|
|
5645
|
-
const
|
|
5646
|
-
if (
|
|
5647
|
-
const t =
|
|
5642
|
+
}, y0 = (...r) => {
|
|
5643
|
+
yr();
|
|
5644
|
+
}, me = (...r) => {
|
|
5645
|
+
yr();
|
|
5646
|
+
}, _e = /* @__PURE__ */ new Map(), gr = /* @__PURE__ */ new Map();
|
|
5647
|
+
let jx = 0;
|
|
5648
|
+
function Gx(r) {
|
|
5649
|
+
const u = _e.get(r);
|
|
5650
|
+
if (u) return u;
|
|
5651
|
+
const t = Ux("./deform.worker.ts");
|
|
5648
5652
|
try {
|
|
5649
|
-
t.postMessage({ type: "SET_DEBUG", debugRender:
|
|
5653
|
+
t.postMessage({ type: "SET_DEBUG", debugRender: yr() });
|
|
5650
5654
|
} catch {
|
|
5651
5655
|
}
|
|
5652
|
-
t.onmessage = (
|
|
5653
|
-
const { id:
|
|
5654
|
-
|
|
5655
|
-
hasImageBitmap: !!
|
|
5656
|
-
width:
|
|
5657
|
-
height:
|
|
5656
|
+
t.onmessage = (d) => {
|
|
5657
|
+
const { id: l, imageBitmap: _, error: B, duration: C } = d.data ?? {}, x = C ? ` worker耗时=${Math.round(C)}ms` : "";
|
|
5658
|
+
y0(`[renderService] deform worker 响应 id=${l}${x}`, {
|
|
5659
|
+
hasImageBitmap: !!_,
|
|
5660
|
+
width: _?.width,
|
|
5661
|
+
height: _?.height,
|
|
5658
5662
|
error: B
|
|
5659
5663
|
});
|
|
5660
|
-
const n =
|
|
5664
|
+
const n = gr.get(l);
|
|
5661
5665
|
if (n) {
|
|
5662
|
-
if (
|
|
5666
|
+
if (gr.delete(l), B) {
|
|
5663
5667
|
n.reject(new Error(B));
|
|
5664
5668
|
return;
|
|
5665
5669
|
}
|
|
5666
|
-
n.resolve(
|
|
5670
|
+
n.resolve(_);
|
|
5667
5671
|
}
|
|
5668
|
-
}, t.onerror = (
|
|
5672
|
+
}, t.onerror = (d) => {
|
|
5669
5673
|
};
|
|
5670
5674
|
const e = () => {
|
|
5671
|
-
const
|
|
5672
|
-
return
|
|
5673
|
-
hasToken: !!
|
|
5674
|
-
tokenPreview:
|
|
5675
|
+
const d = Mx();
|
|
5676
|
+
return y0("🔍 [workerManager] 检查 License Token:", {
|
|
5677
|
+
hasToken: !!d.token,
|
|
5678
|
+
tokenPreview: d.token ? d.token.substring(0, 20) + "..." : "undefined",
|
|
5675
5679
|
faceId: r,
|
|
5676
5680
|
source: "licenseStore模块"
|
|
5677
|
-
}),
|
|
5681
|
+
}), d.token ? (y0("📤 [workerManager] 发送 License 到新创建的 Worker", { faceId: r }), t.postMessage({
|
|
5678
5682
|
type: "SET_LICENSE",
|
|
5679
|
-
licenseToken:
|
|
5680
|
-
licenseApiUrl:
|
|
5681
|
-
deviceId:
|
|
5682
|
-
domain:
|
|
5683
|
+
licenseToken: d.token,
|
|
5684
|
+
licenseApiUrl: d.apiUrl,
|
|
5685
|
+
deviceId: d.deviceId,
|
|
5686
|
+
domain: d.domain
|
|
5683
5687
|
}), !0) : !1;
|
|
5684
5688
|
};
|
|
5685
|
-
return e() || (
|
|
5686
|
-
e() ||
|
|
5689
|
+
return e() || (y0("⏳ [workerManager] License Token 未设置,等待后重试...", { faceId: r }), setTimeout(() => {
|
|
5690
|
+
e() || me("⚠️ [workerManager] 等待后 License Token 仍未设置", { faceId: r });
|
|
5687
5691
|
}, 200), setTimeout(() => {
|
|
5688
|
-
e() ||
|
|
5689
|
-
}, 500)),
|
|
5692
|
+
e() || me("⚠️ [workerManager] 第二次等待后 License Token 仍未设置", { faceId: r });
|
|
5693
|
+
}, 500)), _e.set(r, t), t;
|
|
5690
5694
|
}
|
|
5691
|
-
function
|
|
5695
|
+
function Kx(r) {
|
|
5692
5696
|
return {
|
|
5693
5697
|
name: r.name,
|
|
5694
5698
|
type: r.type,
|
|
5695
5699
|
blendMode: r.blendMode,
|
|
5696
5700
|
transform: Array.isArray(r.transform) ? [...r.transform] : [],
|
|
5697
|
-
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((
|
|
5698
|
-
x:
|
|
5699
|
-
y:
|
|
5700
|
-
type:
|
|
5701
|
+
meshPoints: Array.isArray(r.meshPoints) ? r.meshPoints.map((u) => ({
|
|
5702
|
+
x: u.x,
|
|
5703
|
+
y: u.y,
|
|
5704
|
+
type: u.type
|
|
5701
5705
|
})) : [],
|
|
5702
5706
|
bounds: r.bounds ? {
|
|
5703
5707
|
width: r.bounds.width,
|
|
@@ -5720,30 +5724,30 @@ function Gx(r) {
|
|
|
5720
5724
|
layerOrder: r.layerOrder,
|
|
5721
5725
|
imagePath: r.imagePath,
|
|
5722
5726
|
vectorMask: r.vectorMask ? {
|
|
5723
|
-
paths: r.vectorMask.paths?.map((
|
|
5724
|
-
open:
|
|
5725
|
-
knots:
|
|
5727
|
+
paths: r.vectorMask.paths?.map((u) => ({
|
|
5728
|
+
open: u.open,
|
|
5729
|
+
knots: u.knots?.map((t) => ({
|
|
5726
5730
|
linked: t.linked,
|
|
5727
5731
|
points: [...t.points]
|
|
5728
5732
|
})),
|
|
5729
|
-
fillRule:
|
|
5730
|
-
operation:
|
|
5733
|
+
fillRule: u.fillRule,
|
|
5734
|
+
operation: u.operation
|
|
5731
5735
|
})),
|
|
5732
|
-
points: r.vectorMask.points?.map((
|
|
5733
|
-
x:
|
|
5734
|
-
y:
|
|
5735
|
-
type:
|
|
5736
|
+
points: r.vectorMask.points?.map((u) => ({
|
|
5737
|
+
x: u.x,
|
|
5738
|
+
y: u.y,
|
|
5739
|
+
type: u.type
|
|
5736
5740
|
})),
|
|
5737
5741
|
invert: r.vectorMask.invert,
|
|
5738
5742
|
notLink: r.vectorMask.notLink,
|
|
5739
5743
|
disable: r.vectorMask.disable,
|
|
5740
5744
|
fillStartsWithAllPixels: r.vectorMask.fillStartsWithAllPixels
|
|
5741
5745
|
} : void 0,
|
|
5742
|
-
filterList: r.filterList ? r.filterList.map((
|
|
5743
|
-
type:
|
|
5744
|
-
enabled:
|
|
5745
|
-
filter:
|
|
5746
|
-
puppetShapeList:
|
|
5746
|
+
filterList: r.filterList ? r.filterList.map((u) => ({
|
|
5747
|
+
type: u.type,
|
|
5748
|
+
enabled: u.enabled,
|
|
5749
|
+
filter: u.filter ? {
|
|
5750
|
+
puppetShapeList: u.filter.puppetShapeList?.map((t) => ({
|
|
5747
5751
|
originalVertexArray: t.originalVertexArray.map((e) => ({
|
|
5748
5752
|
x: e.x,
|
|
5749
5753
|
y: e.y
|
|
@@ -5760,73 +5764,73 @@ function Gx(r) {
|
|
|
5760
5764
|
clipping: r.clipping
|
|
5761
5765
|
};
|
|
5762
5766
|
}
|
|
5763
|
-
function
|
|
5764
|
-
const
|
|
5765
|
-
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((
|
|
5766
|
-
|
|
5767
|
+
function Xx(r, u, t, e) {
|
|
5768
|
+
const d = ++jx, l = Gx(t);
|
|
5769
|
+
return performance.now(), (/* @__PURE__ */ new Date()).toISOString(), new Promise((_, B) => {
|
|
5770
|
+
gr.set(d, {
|
|
5767
5771
|
resolve: (x) => {
|
|
5768
|
-
performance.now(), (/* @__PURE__ */ new Date()).toISOString(),
|
|
5772
|
+
performance.now(), (/* @__PURE__ */ new Date()).toISOString(), _(x);
|
|
5769
5773
|
},
|
|
5770
5774
|
reject: B
|
|
5771
5775
|
});
|
|
5772
|
-
const C =
|
|
5773
|
-
|
|
5776
|
+
const C = Kx(u);
|
|
5777
|
+
l.postMessage({ id: d, designBitmap: r, layerData: C, canvasSize: e }, [
|
|
5774
5778
|
r
|
|
5775
5779
|
]);
|
|
5776
5780
|
});
|
|
5777
5781
|
}
|
|
5778
|
-
async function
|
|
5779
|
-
const
|
|
5780
|
-
if (!
|
|
5782
|
+
async function Yx(r, u, t = 0, e, d, l) {
|
|
5783
|
+
const _ = await _t(r, d, l);
|
|
5784
|
+
if (!_ || _.width === 0 || _.height === 0)
|
|
5781
5785
|
throw new Error("图片无效:尺寸为 0");
|
|
5782
|
-
return await
|
|
5786
|
+
return await Xx(_, u, t, e);
|
|
5783
5787
|
}
|
|
5784
|
-
function h0(r,
|
|
5788
|
+
function h0(r, u) {
|
|
5785
5789
|
if (typeof OffscreenCanvas < "u" && typeof document > "u")
|
|
5786
|
-
return new OffscreenCanvas(r,
|
|
5790
|
+
return new OffscreenCanvas(r, u);
|
|
5787
5791
|
if (typeof document < "u") {
|
|
5788
5792
|
const t = document.createElement("canvas");
|
|
5789
|
-
return t.width = r, t.height =
|
|
5793
|
+
return t.width = r, t.height = u, t;
|
|
5790
5794
|
} else
|
|
5791
5795
|
throw new Error("无法创建 canvas:不在 Worker 或主线程环境中");
|
|
5792
5796
|
}
|
|
5793
5797
|
function g0(r) {
|
|
5794
5798
|
return r.getContext("2d");
|
|
5795
5799
|
}
|
|
5796
|
-
function
|
|
5797
|
-
const
|
|
5798
|
-
if (!
|
|
5800
|
+
function ye(r) {
|
|
5801
|
+
const u = g0(r);
|
|
5802
|
+
if (!u)
|
|
5799
5803
|
throw new Error("无法创建 canvas context");
|
|
5800
|
-
return
|
|
5804
|
+
return u;
|
|
5801
5805
|
}
|
|
5802
|
-
async function
|
|
5803
|
-
const
|
|
5806
|
+
async function Zx(r) {
|
|
5807
|
+
const u = performance.now(), t = () => {
|
|
5804
5808
|
try {
|
|
5805
5809
|
if (globalThis.__DEBUG_RENDER__ === !0 || typeof localStorage < "u" && localStorage.getItem("DEBUG_RENDER") === "1") return !0;
|
|
5806
5810
|
} catch {
|
|
5807
5811
|
}
|
|
5808
5812
|
return !1;
|
|
5809
|
-
}, e = (...
|
|
5813
|
+
}, e = (...c) => {
|
|
5810
5814
|
t();
|
|
5811
|
-
},
|
|
5815
|
+
}, d = (...c) => {
|
|
5812
5816
|
t();
|
|
5813
5817
|
}, {
|
|
5814
|
-
psdJson:
|
|
5815
|
-
materialList:
|
|
5818
|
+
psdJson: l,
|
|
5819
|
+
materialList: _,
|
|
5816
5820
|
fabricScreenshotList: B,
|
|
5817
5821
|
width: C,
|
|
5818
5822
|
height: x,
|
|
5819
5823
|
baseUrl: n
|
|
5820
5824
|
} = r, E = r.maxImageSize;
|
|
5821
5825
|
e("[renderByJson] 接收到的数据:", {
|
|
5822
|
-
psdJsonLayerCount:
|
|
5823
|
-
psdJsonLayers:
|
|
5824
|
-
name:
|
|
5825
|
-
type:
|
|
5826
|
-
id:
|
|
5827
|
-
hasChildren: !!
|
|
5828
|
-
childrenCount:
|
|
5829
|
-
children:
|
|
5826
|
+
psdJsonLayerCount: l.layerList?.length || 0,
|
|
5827
|
+
psdJsonLayers: l.layerList?.map((c) => ({
|
|
5828
|
+
name: c.name,
|
|
5829
|
+
type: c.type,
|
|
5830
|
+
id: c.id,
|
|
5831
|
+
hasChildren: !!c.children,
|
|
5832
|
+
childrenCount: c.children?.length || 0,
|
|
5833
|
+
children: c.children?.map((A) => ({
|
|
5830
5834
|
name: A.name,
|
|
5831
5835
|
type: A.type,
|
|
5832
5836
|
isSmartObject: A.isSmartObject,
|
|
@@ -5834,105 +5838,105 @@ async function Yx(r) {
|
|
|
5834
5838
|
}))
|
|
5835
5839
|
})),
|
|
5836
5840
|
fabricScreenshotListCount: B.length,
|
|
5837
|
-
fabricScreenshotList: B.map((
|
|
5841
|
+
fabricScreenshotList: B.map((c) => ({ id: c.id, url: c.url.substring(0, 50) + "..." }))
|
|
5838
5842
|
});
|
|
5839
|
-
const a = (
|
|
5840
|
-
if (!
|
|
5841
|
-
if (/^(https?:)?\/\//i.test(
|
|
5842
|
-
return
|
|
5843
|
+
const a = (c) => {
|
|
5844
|
+
if (!c || typeof c != "string" || !c.includes("http")) return;
|
|
5845
|
+
if (/^(https?:)?\/\//i.test(c) || c.startsWith("data:") || c.startsWith("blob:"))
|
|
5846
|
+
return c;
|
|
5843
5847
|
if (!n)
|
|
5844
|
-
return !
|
|
5848
|
+
return !c.includes("http") && !c.startsWith("data:") && !c.startsWith("blob:") ? void 0 : c;
|
|
5845
5849
|
try {
|
|
5846
|
-
const m = new URL(
|
|
5850
|
+
const m = new URL(c, n).toString();
|
|
5847
5851
|
return !m.includes("http") && !m.startsWith("data:") && !m.startsWith("blob:") ? void 0 : m;
|
|
5848
5852
|
} catch (m) {
|
|
5849
|
-
|
|
5853
|
+
d(`[renderByJson] 解析图片 URL 失败: ${c}`, m);
|
|
5850
5854
|
return;
|
|
5851
5855
|
}
|
|
5852
|
-
}, s = {},
|
|
5853
|
-
for (const
|
|
5854
|
-
const A =
|
|
5856
|
+
}, s = {}, f = /* @__PURE__ */ new Map();
|
|
5857
|
+
for (const c of _) {
|
|
5858
|
+
const A = c.sourceName || c.layerName;
|
|
5855
5859
|
A && (s[A] = {
|
|
5856
|
-
url:
|
|
5857
|
-
},
|
|
5858
|
-
url:
|
|
5859
|
-
}),
|
|
5860
|
+
url: c.url
|
|
5861
|
+
}, f.set(A, c.url)), c.layerName && c.layerName !== A && (s[c.layerName] || (s[c.layerName] = {
|
|
5862
|
+
url: c.url
|
|
5863
|
+
}), f.set(c.layerName, c.url));
|
|
5860
5864
|
}
|
|
5861
5865
|
const p = /* @__PURE__ */ new Map();
|
|
5862
|
-
for (const
|
|
5863
|
-
p.set(
|
|
5864
|
-
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:",
|
|
5865
|
-
name:
|
|
5866
|
-
type:
|
|
5867
|
-
id:
|
|
5868
|
-
hasChildren: !!
|
|
5869
|
-
childrenCount:
|
|
5866
|
+
for (const c of B)
|
|
5867
|
+
p.set(c.id, c.url);
|
|
5868
|
+
e("[renderByJson] fabricScreenshotMap:", Array.from(p.entries())), e("[renderByJson] psdJson.layerList 结构:", l.layerList?.map((c) => ({
|
|
5869
|
+
name: c.name,
|
|
5870
|
+
type: c.type,
|
|
5871
|
+
id: c.id,
|
|
5872
|
+
hasChildren: !!c.children,
|
|
5873
|
+
childrenCount: c.children?.length || 0
|
|
5870
5874
|
})));
|
|
5871
|
-
function
|
|
5872
|
-
const m =
|
|
5873
|
-
if (
|
|
5874
|
-
if (
|
|
5875
|
-
const
|
|
5875
|
+
function v(c, A) {
|
|
5876
|
+
const m = c.color || (c.name && ["粉", "白", "绿", "红", "蓝", "黄", "黑", "灰"].includes(c.name) ? c.name : A);
|
|
5877
|
+
if (c.type === "Layer") {
|
|
5878
|
+
if (c.imagePath) {
|
|
5879
|
+
const I = _.find((P) => {
|
|
5876
5880
|
const L = P.sourceName || P.layerName;
|
|
5877
|
-
return !L || !
|
|
5881
|
+
return !L || !c.imagePath ? !1 : L === c.imagePath || L.endsWith(c.imagePath) || c.imagePath.endsWith(L);
|
|
5878
5882
|
});
|
|
5879
|
-
|
|
5880
|
-
url:
|
|
5883
|
+
I && (s[c.imagePath] = {
|
|
5884
|
+
url: I.url
|
|
5881
5885
|
});
|
|
5882
5886
|
}
|
|
5883
|
-
if (
|
|
5887
|
+
if (c.name) {
|
|
5884
5888
|
if (m) {
|
|
5885
|
-
const
|
|
5886
|
-
const
|
|
5887
|
-
return
|
|
5889
|
+
const I = `${m}-${c.name}`, P = _.find((L) => {
|
|
5890
|
+
const W = L.sourceName || L.layerName;
|
|
5891
|
+
return W ? (W.split("/").pop() || W).replace(/\.(png|jpg|jpeg|gif|webp)$/i, "").startsWith(`${m}-${c.name}`) : !1;
|
|
5888
5892
|
});
|
|
5889
|
-
P && (s[
|
|
5893
|
+
P && (s[I] = {
|
|
5890
5894
|
url: P.url
|
|
5891
5895
|
});
|
|
5892
5896
|
}
|
|
5893
|
-
if (
|
|
5894
|
-
const
|
|
5895
|
-
const
|
|
5896
|
-
return
|
|
5897
|
+
if (c.imagePath && c.name) {
|
|
5898
|
+
const I = c.imagePath.split("/").pop() || c.imagePath, P = _.find((L) => {
|
|
5899
|
+
const W = L.sourceName || L.layerName;
|
|
5900
|
+
return W ? (W.split("/").pop() || W) === I : !1;
|
|
5897
5901
|
});
|
|
5898
|
-
P && (s[
|
|
5902
|
+
P && (s[c.imagePath] = {
|
|
5899
5903
|
url: P.url
|
|
5900
5904
|
});
|
|
5901
5905
|
}
|
|
5902
5906
|
}
|
|
5903
5907
|
}
|
|
5904
|
-
if (
|
|
5905
|
-
for (const
|
|
5906
|
-
|
|
5908
|
+
if (c.children)
|
|
5909
|
+
for (const I of c.children)
|
|
5910
|
+
I && v(I, m);
|
|
5907
5911
|
}
|
|
5908
|
-
function D(
|
|
5909
|
-
const m =
|
|
5910
|
-
if (
|
|
5911
|
-
if (e(`[renderByJson] processLayer 检查 Group: name="${
|
|
5912
|
-
const
|
|
5913
|
-
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${m}, name="${
|
|
5914
|
-
e(`[renderByJson] Group "${
|
|
5915
|
-
for (const P of
|
|
5912
|
+
function D(c, A) {
|
|
5913
|
+
const m = c.id ?? A;
|
|
5914
|
+
if (c.type === "Group" && m)
|
|
5915
|
+
if (e(`[renderByJson] processLayer 检查 Group: name="${c.name}", id=${m}, hasFabricScreenshot=${p.has(m)}`), p.has(m)) {
|
|
5916
|
+
const I = p.get(m);
|
|
5917
|
+
if (e(`[renderByJson] ✅ 找到匹配的 fabricScreenshot: Group id=${m}, name="${c.name}", url=${I.substring(0, 50)}...`), c.children) {
|
|
5918
|
+
e(`[renderByJson] Group "${c.name}" 有 ${c.children.length} 个子图层`);
|
|
5919
|
+
for (const P of c.children)
|
|
5916
5920
|
if (P && P.isSmartObject === !0) {
|
|
5917
5921
|
const L = P?.name || "";
|
|
5918
|
-
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage =
|
|
5922
|
+
e(`[renderByJson] 找到智能对象: name="${L}"`), L && !s[L] && (s[L] = {}), L ? (s[L].designImage = I, e(`[renderByJson] ✅ 为智能对象 "${L}" 设置 designImage: ${I.substring(0, 50)}...`)) : d("[renderByJson] ⚠️ 智能对象没有 name,无法设置 designImage");
|
|
5919
5923
|
}
|
|
5920
5924
|
} else
|
|
5921
|
-
|
|
5925
|
+
d(`[renderByJson] ⚠️ Group id=${m} 没有 children`);
|
|
5922
5926
|
} else
|
|
5923
|
-
e(`[renderByJson] ⚠️ Group id=${m}, name="${
|
|
5924
|
-
if (
|
|
5925
|
-
for (const
|
|
5926
|
-
|
|
5927
|
+
e(`[renderByJson] ⚠️ Group id=${m}, name="${c.name}" 没有匹配的 fabricScreenshot`);
|
|
5928
|
+
if (c.children)
|
|
5929
|
+
for (const I of c.children)
|
|
5930
|
+
I && D(I, m);
|
|
5927
5931
|
}
|
|
5928
|
-
if (
|
|
5929
|
-
for (const
|
|
5930
|
-
|
|
5931
|
-
if (
|
|
5932
|
-
for (const
|
|
5933
|
-
|
|
5934
|
-
const o =
|
|
5935
|
-
psdJson:
|
|
5932
|
+
if (l.layerList)
|
|
5933
|
+
for (const c of l.layerList)
|
|
5934
|
+
c && v(c);
|
|
5935
|
+
if (l.layerList)
|
|
5936
|
+
for (const c of l.layerList)
|
|
5937
|
+
c && D(c);
|
|
5938
|
+
const o = nt([{
|
|
5939
|
+
psdJson: l,
|
|
5936
5940
|
layerExtrasByName: s
|
|
5937
5941
|
}], {
|
|
5938
5942
|
parts: [],
|
|
@@ -5940,84 +5944,84 @@ async function Yx(r) {
|
|
|
5940
5944
|
});
|
|
5941
5945
|
if (!o.models || o.models.length === 0)
|
|
5942
5946
|
throw new Error("无法解析 JSON 数据");
|
|
5943
|
-
const
|
|
5944
|
-
if (!
|
|
5947
|
+
const h = o.models[0];
|
|
5948
|
+
if (!h.psdPartData)
|
|
5945
5949
|
throw new Error("JSON 数据中没有 psdPartData");
|
|
5946
|
-
const b =
|
|
5947
|
-
if (
|
|
5948
|
-
return s[
|
|
5949
|
-
if (
|
|
5950
|
-
const A =
|
|
5950
|
+
const b = h.width, g = h.height, y = h0(b, g), k = ye(y), R = [], F = (c) => {
|
|
5951
|
+
if (c.url && s[c.url])
|
|
5952
|
+
return s[c.url];
|
|
5953
|
+
if (c.url) {
|
|
5954
|
+
const A = c.url.split("/").pop() || c.url;
|
|
5951
5955
|
if (s[A])
|
|
5952
5956
|
return s[A];
|
|
5953
|
-
const m =
|
|
5954
|
-
const P =
|
|
5955
|
-
return !P || !
|
|
5957
|
+
const m = _.find((I) => {
|
|
5958
|
+
const P = I.sourceName || I.layerName;
|
|
5959
|
+
return !P || !c.url ? !1 : (P.split("/").pop() || P) === A || P === c.url || P.endsWith(c.url) || c.url.endsWith(P);
|
|
5956
5960
|
});
|
|
5957
5961
|
if (m) {
|
|
5958
|
-
const
|
|
5959
|
-
if (
|
|
5960
|
-
return s[
|
|
5962
|
+
const I = m.sourceName || m.layerName;
|
|
5963
|
+
if (I)
|
|
5964
|
+
return s[I] || { url: m.url };
|
|
5961
5965
|
}
|
|
5962
5966
|
}
|
|
5963
5967
|
};
|
|
5964
|
-
for (let
|
|
5965
|
-
const A =
|
|
5968
|
+
for (let c = 0; c < h.psdPartData.length; c++) {
|
|
5969
|
+
const A = h.psdPartData[c], m = F(A);
|
|
5966
5970
|
if (A.type === D0.Layer) {
|
|
5967
5971
|
if (!m || !m.url) {
|
|
5968
|
-
|
|
5972
|
+
d(`图层 "${A.name}" 没有匹配的 material,跳过`);
|
|
5969
5973
|
continue;
|
|
5970
5974
|
}
|
|
5971
|
-
const
|
|
5975
|
+
const I = m.url, P = a(I);
|
|
5972
5976
|
if (!P) {
|
|
5973
|
-
|
|
5977
|
+
d(`图层 "${A.name}" 没有有效的 url,跳过`);
|
|
5974
5978
|
continue;
|
|
5975
5979
|
}
|
|
5976
5980
|
R.push({
|
|
5977
|
-
index:
|
|
5981
|
+
index: c,
|
|
5978
5982
|
type: "layer",
|
|
5979
5983
|
partData: A,
|
|
5980
|
-
promise:
|
|
5984
|
+
promise: yt(P, E, n).catch((L) => null)
|
|
5981
5985
|
});
|
|
5982
5986
|
} else if (A.type === D0.Group) {
|
|
5983
5987
|
if (!A.smartObjects || A.smartObjects.length === 0)
|
|
5984
5988
|
continue;
|
|
5985
|
-
for (let
|
|
5986
|
-
const P = A.smartObjects[
|
|
5989
|
+
for (let I = 0; I < A.smartObjects.length; I++) {
|
|
5990
|
+
const P = A.smartObjects[I];
|
|
5987
5991
|
if (!P || !P.name)
|
|
5988
5992
|
continue;
|
|
5989
5993
|
let L = s[P.name] ?? m;
|
|
5990
5994
|
if (!L && P.imagePath && (L = s[P.imagePath], !L)) {
|
|
5991
5995
|
const K = P.imagePath.split("/").pop() || P.imagePath;
|
|
5992
5996
|
if (L = s[K], !L) {
|
|
5993
|
-
const G =
|
|
5994
|
-
const
|
|
5995
|
-
return !
|
|
5997
|
+
const G = _.find((Y) => {
|
|
5998
|
+
const r0 = Y.sourceName || Y.layerName;
|
|
5999
|
+
return !r0 || !P.imagePath ? !1 : (r0.split("/").pop() || r0) === K || r0 === P.imagePath || r0.endsWith(P.imagePath) || P.imagePath.endsWith(r0);
|
|
5996
6000
|
});
|
|
5997
6001
|
G && (L = { url: G.url });
|
|
5998
6002
|
}
|
|
5999
6003
|
}
|
|
6000
6004
|
if (!L || !L.designImage && !L.url)
|
|
6001
6005
|
continue;
|
|
6002
|
-
let
|
|
6003
|
-
if (!
|
|
6006
|
+
let W = L.designImage ?? L.url;
|
|
6007
|
+
if (!W)
|
|
6004
6008
|
continue;
|
|
6005
|
-
if (typeof
|
|
6006
|
-
/^(https?:)?\/\//i.test(
|
|
6007
|
-
const G = a(
|
|
6009
|
+
if (typeof W == "string") {
|
|
6010
|
+
/^(https?:)?\/\//i.test(W) || W.startsWith("data:") || W.startsWith("blob:") || (W = f.get(W) ?? W);
|
|
6011
|
+
const G = a(W);
|
|
6008
6012
|
if (!G)
|
|
6009
6013
|
continue;
|
|
6010
|
-
|
|
6014
|
+
W = G;
|
|
6011
6015
|
}
|
|
6012
|
-
const Z = (A.partId ?? A.id) * 100 +
|
|
6016
|
+
const Z = (A.partId ?? A.id) * 100 + I, Q = ot(at(P)), i0 = { width: b, height: g };
|
|
6013
6017
|
R.push({
|
|
6014
|
-
index:
|
|
6018
|
+
index: c + I * 0.01,
|
|
6015
6019
|
type: "group",
|
|
6016
6020
|
partData: A,
|
|
6017
6021
|
smartObject: P,
|
|
6018
6022
|
maskData: Q,
|
|
6019
|
-
promise:
|
|
6020
|
-
|
|
6023
|
+
promise: Yx(
|
|
6024
|
+
W,
|
|
6021
6025
|
P,
|
|
6022
6026
|
Z,
|
|
6023
6027
|
i0,
|
|
@@ -6028,46 +6032,46 @@ async function Yx(r) {
|
|
|
6028
6032
|
}
|
|
6029
6033
|
}
|
|
6030
6034
|
}
|
|
6031
|
-
const w = await Promise.all(R.map((
|
|
6032
|
-
task:
|
|
6035
|
+
const w = await Promise.all(R.map((c) => c.promise)), H = R.map((c, A) => ({
|
|
6036
|
+
task: c,
|
|
6033
6037
|
imageBitmap: w[A]
|
|
6034
|
-
})).sort((
|
|
6035
|
-
const m =
|
|
6036
|
-
return m -
|
|
6038
|
+
})).sort((c, A) => {
|
|
6039
|
+
const m = c.task.type === "group" && c.task.smartObject?.layerOrder !== void 0 ? c.task.smartObject.layerOrder : c.task.partData.layerOrder ?? c.task.index, I = A.task.type === "group" && A.task.smartObject?.layerOrder !== void 0 ? A.task.smartObject.layerOrder : A.task.partData.layerOrder ?? A.task.index;
|
|
6040
|
+
return m - I;
|
|
6037
6041
|
});
|
|
6038
6042
|
let $ = h0(b, g), z = g0($), O = !1, q = "normal";
|
|
6039
|
-
for (let
|
|
6040
|
-
const { task: A, imageBitmap: m } = H[
|
|
6043
|
+
for (let c = 0; c < H.length; c++) {
|
|
6044
|
+
const { task: A, imageBitmap: m } = H[c];
|
|
6041
6045
|
if (!m) {
|
|
6042
|
-
|
|
6046
|
+
d(`[renderByJson] 图层 "${A.partData.name}" 没有 imageBitmap,跳过`);
|
|
6043
6047
|
continue;
|
|
6044
6048
|
}
|
|
6045
|
-
const { partData:
|
|
6049
|
+
const { partData: I } = A, P = I.bounds;
|
|
6046
6050
|
let L;
|
|
6047
|
-
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ??
|
|
6048
|
-
let
|
|
6049
|
-
A.type === "group" && A.smartObject ?
|
|
6050
|
-
const Z = H[
|
|
6051
|
+
A.type === "group" && A.smartObject ? L = A.smartObject.opacity ?? I.opacity : L = I.opacity, (typeof L != "number" || isNaN(L)) && (L = 1);
|
|
6052
|
+
let W;
|
|
6053
|
+
A.type === "group" && A.smartObject ? W = A.smartObject.clipping ?? I.clipping === !0 : W = I.clipping === !0;
|
|
6054
|
+
const Z = H[c + 1];
|
|
6051
6055
|
let Q = !1;
|
|
6052
6056
|
if (Z) {
|
|
6053
6057
|
const K = Z.task.partData;
|
|
6054
6058
|
Z.task.type === "group" && Z.task.smartObject ? Q = Z.task.smartObject.clipping ?? K.clipping === !0 : Q = K.clipping === !0;
|
|
6055
6059
|
}
|
|
6056
|
-
const i0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name :
|
|
6060
|
+
const i0 = A.type === "group" && A.smartObject && A.smartObject.name ? A.smartObject.name : I?.name || "未命名图层";
|
|
6057
6061
|
if (e(`[renderByJson] 绘制图层 "${i0}"`, {
|
|
6058
6062
|
type: A.type,
|
|
6059
6063
|
bitmapSize: { width: m.width, height: m.height },
|
|
6060
6064
|
bounds: P,
|
|
6061
6065
|
hasMask: !!A.maskData,
|
|
6062
|
-
blendMode:
|
|
6066
|
+
blendMode: I.blendMode,
|
|
6063
6067
|
opacity: L,
|
|
6064
|
-
clipping:
|
|
6065
|
-
}), !
|
|
6066
|
-
if (O = !0, q =
|
|
6068
|
+
clipping: W
|
|
6069
|
+
}), !W && Q) {
|
|
6070
|
+
if (O = !0, q = I.blendMode || "normal", z) {
|
|
6067
6071
|
if (z.clearRect(0, 0, b, g), z.globalCompositeOperation = "source-over", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6068
6072
|
if (A.maskData) {
|
|
6069
6073
|
const K = h0(b, g), G = g0(K);
|
|
6070
|
-
G && (G.drawImage(m, 0, 0),
|
|
6074
|
+
G && (G.drawImage(m, 0, 0), Br(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6071
6075
|
} else
|
|
6072
6076
|
z.drawImage(m, 0, 0);
|
|
6073
6077
|
else A.type === "layer" && (P ? z.drawImage(
|
|
@@ -6079,12 +6083,12 @@ async function Yx(r) {
|
|
|
6079
6083
|
) : z.drawImage(m, 0, 0));
|
|
6080
6084
|
z.globalAlpha = 1;
|
|
6081
6085
|
}
|
|
6082
|
-
} else if (
|
|
6086
|
+
} else if (W) {
|
|
6083
6087
|
if (z) {
|
|
6084
6088
|
if (z.globalCompositeOperation = "source-atop", z.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6085
6089
|
if (A.maskData) {
|
|
6086
6090
|
const K = h0(b, g), G = g0(K);
|
|
6087
|
-
G && (G.drawImage(m, 0, 0),
|
|
6091
|
+
G && (G.drawImage(m, 0, 0), Br(G, A.maskData), z.drawImage(K, 0, 0));
|
|
6088
6092
|
} else
|
|
6089
6093
|
z.drawImage(m, 0, 0);
|
|
6090
6094
|
else A.type === "layer" && (P ? z.drawImage(
|
|
@@ -6097,10 +6101,10 @@ async function Yx(r) {
|
|
|
6097
6101
|
z.globalAlpha = 1, z.globalCompositeOperation = "source-over";
|
|
6098
6102
|
}
|
|
6099
6103
|
} else {
|
|
6100
|
-
if (k.globalCompositeOperation =
|
|
6104
|
+
if (k.globalCompositeOperation = Mr(I.blendMode), k.globalAlpha = L, A.type === "group" && A.smartObject)
|
|
6101
6105
|
if (A.maskData) {
|
|
6102
6106
|
const K = h0(b, g), G = g0(K);
|
|
6103
|
-
G && (G.drawImage(m, 0, 0),
|
|
6107
|
+
G && (G.drawImage(m, 0, 0), Br(G, A.maskData), k.drawImage(K, 0, 0));
|
|
6104
6108
|
} else
|
|
6105
6109
|
k.drawImage(m, 0, 0);
|
|
6106
6110
|
else A.type === "layer" && (P ? k.drawImage(
|
|
@@ -6112,10 +6116,10 @@ async function Yx(r) {
|
|
|
6112
6116
|
) : k.drawImage(m, 0, 0));
|
|
6113
6117
|
k.globalAlpha = 1, k.globalCompositeOperation = "source-over";
|
|
6114
6118
|
}
|
|
6115
|
-
O && !Q && (k.globalCompositeOperation =
|
|
6119
|
+
O && !Q && (k.globalCompositeOperation = Mr(q), k.drawImage($, 0, 0), k.globalCompositeOperation = "source-over", O = !1);
|
|
6116
6120
|
}
|
|
6117
6121
|
$ = null, z = null;
|
|
6118
|
-
let U =
|
|
6122
|
+
let U = y, T = b, N = g;
|
|
6119
6123
|
if (C !== void 0 || x !== void 0) {
|
|
6120
6124
|
if (C !== void 0 && x !== void 0)
|
|
6121
6125
|
T = C, N = x;
|
|
@@ -6127,53 +6131,53 @@ async function Yx(r) {
|
|
|
6127
6131
|
T = Math.round(b * A), N = x;
|
|
6128
6132
|
}
|
|
6129
6133
|
U = h0(T, N);
|
|
6130
|
-
const
|
|
6131
|
-
|
|
6134
|
+
const c = ye(U);
|
|
6135
|
+
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}`);
|
|
6132
6136
|
}
|
|
6133
|
-
const S = performance.now() -
|
|
6137
|
+
const S = performance.now() - u;
|
|
6134
6138
|
return e(`[renderByJson] 绘制完成,总渲染时间: ${Math.round(S)}ms`), {
|
|
6135
6139
|
canvas: U,
|
|
6136
6140
|
width: T,
|
|
6137
6141
|
height: N
|
|
6138
6142
|
};
|
|
6139
6143
|
}
|
|
6140
|
-
const
|
|
6141
|
-
const t = (await
|
|
6144
|
+
const qe = async (r) => {
|
|
6145
|
+
const t = (await Zx(r)).canvas;
|
|
6142
6146
|
return t ? createImageBitmap(t) : null;
|
|
6143
6147
|
};
|
|
6144
|
-
let s0 = null,
|
|
6145
|
-
const
|
|
6146
|
-
if (!
|
|
6147
|
-
|
|
6148
|
+
let s0 = null, Ar = !1;
|
|
6149
|
+
const Te = async () => {
|
|
6150
|
+
if (!Ar) {
|
|
6151
|
+
Ar = !0;
|
|
6148
6152
|
try {
|
|
6149
6153
|
for (; s0; ) {
|
|
6150
6154
|
const r = s0;
|
|
6151
6155
|
s0 = null;
|
|
6152
6156
|
try {
|
|
6153
|
-
const
|
|
6157
|
+
const u = await qe(r.renderData);
|
|
6154
6158
|
if (s0) {
|
|
6155
|
-
|
|
6159
|
+
u?.close?.();
|
|
6156
6160
|
continue;
|
|
6157
6161
|
}
|
|
6158
|
-
self.postMessage({ id: r.id, bitmap:
|
|
6159
|
-
} catch (
|
|
6162
|
+
self.postMessage({ id: r.id, bitmap: u }, u ? [u] : []);
|
|
6163
|
+
} catch (u) {
|
|
6160
6164
|
if (s0) continue;
|
|
6161
6165
|
self.postMessage({
|
|
6162
6166
|
id: r.id,
|
|
6163
|
-
error:
|
|
6167
|
+
error: u instanceof Error ? u.message : String(u)
|
|
6164
6168
|
});
|
|
6165
6169
|
}
|
|
6166
6170
|
}
|
|
6167
6171
|
} finally {
|
|
6168
|
-
|
|
6172
|
+
Ar = !1, s0 && Te();
|
|
6169
6173
|
}
|
|
6170
6174
|
}
|
|
6171
6175
|
};
|
|
6172
6176
|
self.onmessage = async (r) => {
|
|
6173
|
-
const
|
|
6174
|
-
if (
|
|
6175
|
-
const e =
|
|
6176
|
-
|
|
6177
|
+
const u = r.data;
|
|
6178
|
+
if (u && typeof u == "object" && "type" in u && u.type === "SET_LICENSE") {
|
|
6179
|
+
const e = u;
|
|
6180
|
+
Tx({
|
|
6177
6181
|
token: e.licenseToken,
|
|
6178
6182
|
apiUrl: e.licenseApiUrl,
|
|
6179
6183
|
deviceId: e.deviceId,
|
|
@@ -6181,13 +6185,13 @@ self.onmessage = async (r) => {
|
|
|
6181
6185
|
});
|
|
6182
6186
|
return;
|
|
6183
6187
|
}
|
|
6184
|
-
const t =
|
|
6188
|
+
const t = u;
|
|
6185
6189
|
if (t.coalesce === !0) {
|
|
6186
|
-
s0 = { id: t.id, renderData: t.renderData },
|
|
6190
|
+
s0 = { id: t.id, renderData: t.renderData }, Te();
|
|
6187
6191
|
return;
|
|
6188
6192
|
}
|
|
6189
6193
|
try {
|
|
6190
|
-
const e = await
|
|
6194
|
+
const e = await qe(t.renderData);
|
|
6191
6195
|
self.postMessage({ id: t.id, bitmap: e }, e ? [e] : []);
|
|
6192
6196
|
} catch (e) {
|
|
6193
6197
|
self.postMessage({
|