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