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