@pubinfo-pr/module-crypto 0.230.1 → 0.232.1
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/index.js
CHANGED
|
@@ -1,58 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as e, r as t, t as n } from "./context-CqcxYCXg.js";
|
|
2
|
+
import { defineIconModule as r, defineRouteModule as i } from "pubinfo-pr";
|
|
2
3
|
import './index.css';//#region \0rolldown/runtime.js
|
|
3
|
-
var
|
|
4
|
+
var a = Object.create, o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, c = Object.getOwnPropertyNames, l = Object.getPrototypeOf, u = Object.prototype.hasOwnProperty, d = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), f = (e, t) => {
|
|
4
5
|
let n = {};
|
|
5
|
-
for (var r in e)
|
|
6
|
+
for (var r in e) o(n, r, {
|
|
6
7
|
get: e[r],
|
|
7
8
|
enumerable: !0
|
|
8
9
|
});
|
|
9
|
-
return t ||
|
|
10
|
-
},
|
|
11
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i =
|
|
10
|
+
return t || o(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
11
|
+
}, p = (e, t, n, r) => {
|
|
12
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = c(t), a = 0, l = i.length, d; a < l; a++) d = i[a], !u.call(e, d) && d !== n && o(e, d, {
|
|
12
13
|
get: ((e) => t[e]).bind(null, d),
|
|
13
|
-
enumerable: !(r =
|
|
14
|
+
enumerable: !(r = s(t, d)) || r.enumerable
|
|
14
15
|
});
|
|
15
16
|
return e;
|
|
16
|
-
},
|
|
17
|
+
}, m = (e, t, n) => (n = e == null ? {} : a(l(e)), p(t || !e || !e.__esModule ? o(n, "default", {
|
|
17
18
|
value: e,
|
|
18
19
|
enumerable: !0
|
|
19
|
-
}) : n, e)),
|
|
20
|
+
}) : n, e)), h = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
20
21
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
21
22
|
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
22
|
-
}),
|
|
23
|
+
}), g = {
|
|
23
24
|
icons: {},
|
|
24
25
|
layouts: {},
|
|
25
26
|
pages: {
|
|
26
|
-
"src/pages/setting.vue": () => import("./setting-
|
|
27
|
-
"src/pages/components/drawerCryptoUrl.vue": () => import("./drawerCryptoUrl-
|
|
27
|
+
"src/pages/setting.vue": () => import("./setting-GT6QFY_i.js"),
|
|
28
|
+
"src/pages/components/drawerCryptoUrl.vue": () => import("./drawerCryptoUrl-BR79pIbC.js").then((e) => e.n)
|
|
28
29
|
}
|
|
29
|
-
},
|
|
30
|
-
//#endregion
|
|
31
|
-
//#region src/api/modules/crypto/pubSysConfigController.ts
|
|
32
|
-
function v(e, t) {
|
|
33
|
-
return _.Post("/crypto/editCryptoConfig", e, {
|
|
34
|
-
headers: { "Content-Type": "application/json" },
|
|
35
|
-
...t || {}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
function y(e) {
|
|
39
|
-
return _.Get("/crypto/getCryptoConfig", { ...e || {} });
|
|
40
|
-
}
|
|
41
|
-
function b(e) {
|
|
42
|
-
return _.Get("/crypto/getPublicKeyAndConfig", { ...e || {} });
|
|
43
|
-
}
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/context.ts
|
|
46
|
-
var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
30
|
+
}, _ = /* @__PURE__ */ d(((e, t) => {
|
|
47
31
|
t.exports = {};
|
|
48
|
-
})),
|
|
32
|
+
})), v = /* @__PURE__ */ d(((e, t) => {
|
|
49
33
|
(function(n, r) {
|
|
50
34
|
typeof e == "object" ? t.exports = e = r() : typeof define == "function" && define.amd ? define([], r) : n.CryptoJS = r();
|
|
51
35
|
})(e, function() {
|
|
52
36
|
var e = e || function(e, t) {
|
|
53
37
|
var n;
|
|
54
|
-
if (typeof window < "u" && window.crypto && (n = window.crypto), typeof self < "u" && self.crypto && (n = self.crypto), typeof globalThis < "u" && globalThis.crypto && (n = globalThis.crypto), !n && typeof window < "u" && window.msCrypto && (n = window.msCrypto), !n && typeof global < "u" && global.crypto && (n = global.crypto), !n && typeof
|
|
55
|
-
n =
|
|
38
|
+
if (typeof window < "u" && window.crypto && (n = window.crypto), typeof self < "u" && self.crypto && (n = self.crypto), typeof globalThis < "u" && globalThis.crypto && (n = globalThis.crypto), !n && typeof window < "u" && window.msCrypto && (n = window.msCrypto), !n && typeof global < "u" && global.crypto && (n = global.crypto), !n && typeof h == "function") try {
|
|
39
|
+
n = _();
|
|
56
40
|
} catch {}
|
|
57
41
|
var r = function() {
|
|
58
42
|
if (n) {
|
|
@@ -199,18 +183,18 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
199
183
|
},
|
|
200
184
|
_createHmacHelper: function(e) {
|
|
201
185
|
return function(t, n) {
|
|
202
|
-
return new
|
|
186
|
+
return new m.HMAC.init(e, n).finalize(t);
|
|
203
187
|
};
|
|
204
188
|
}
|
|
205
189
|
});
|
|
206
|
-
var
|
|
190
|
+
var m = a.algo = {};
|
|
207
191
|
return a;
|
|
208
192
|
}(Math);
|
|
209
193
|
return e;
|
|
210
194
|
});
|
|
211
|
-
})),
|
|
195
|
+
})), y = /* @__PURE__ */ d(((e, t) => {
|
|
212
196
|
(function(n, r) {
|
|
213
|
-
typeof e == "object" ? t.exports = e = r(
|
|
197
|
+
typeof e == "object" ? t.exports = e = r(v()) : typeof define == "function" && define.amd ? define(["./core"], r) : r(n.CryptoJS);
|
|
214
198
|
})(e, function(e) {
|
|
215
199
|
return (function(t) {
|
|
216
200
|
var n = e, r = n.lib, i = r.Base, a = r.WordArray, o = n.x64 = {};
|
|
@@ -234,9 +218,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
234
218
|
});
|
|
235
219
|
})(), e;
|
|
236
220
|
});
|
|
237
|
-
})),
|
|
221
|
+
})), b = /* @__PURE__ */ d(((e, t) => {
|
|
238
222
|
(function(n, r) {
|
|
239
|
-
typeof e == "object" ? t.exports = e = r(
|
|
223
|
+
typeof e == "object" ? t.exports = e = r(v()) : typeof define == "function" && define.amd ? define(["./core"], r) : r(n.CryptoJS);
|
|
240
224
|
})(e, function(e) {
|
|
241
225
|
return (function() {
|
|
242
226
|
if (typeof ArrayBuffer == "function") {
|
|
@@ -250,9 +234,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
250
234
|
}
|
|
251
235
|
})(), e.lib.WordArray;
|
|
252
236
|
});
|
|
253
|
-
})),
|
|
237
|
+
})), x = /* @__PURE__ */ d(((e, t) => {
|
|
254
238
|
(function(n, r) {
|
|
255
|
-
typeof e == "object" ? t.exports = e = r(
|
|
239
|
+
typeof e == "object" ? t.exports = e = r(v()) : typeof define == "function" && define.amd ? define(["./core"], r) : r(n.CryptoJS);
|
|
256
240
|
})(e, function(e) {
|
|
257
241
|
return (function() {
|
|
258
242
|
var t = e, n = t.lib.WordArray, r = t.enc;
|
|
@@ -286,9 +270,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
286
270
|
}
|
|
287
271
|
})(), e.enc.Utf16;
|
|
288
272
|
});
|
|
289
|
-
})),
|
|
273
|
+
})), S = /* @__PURE__ */ d(((e, t) => {
|
|
290
274
|
(function(n, r) {
|
|
291
|
-
typeof e == "object" ? t.exports = e = r(
|
|
275
|
+
typeof e == "object" ? t.exports = e = r(v()) : typeof define == "function" && define.amd ? define(["./core"], r) : r(n.CryptoJS);
|
|
292
276
|
})(e, function(e) {
|
|
293
277
|
return (function() {
|
|
294
278
|
var t = e, n = t.lib.WordArray, r = t.enc;
|
|
@@ -325,9 +309,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
325
309
|
}
|
|
326
310
|
})(), e.enc.Base64;
|
|
327
311
|
});
|
|
328
|
-
})),
|
|
312
|
+
})), C = /* @__PURE__ */ d(((e, t) => {
|
|
329
313
|
(function(n, r) {
|
|
330
|
-
typeof e == "object" ? t.exports = e = r(
|
|
314
|
+
typeof e == "object" ? t.exports = e = r(v()) : typeof define == "function" && define.amd ? define(["./core"], r) : r(n.CryptoJS);
|
|
331
315
|
})(e, function(e) {
|
|
332
316
|
return (function() {
|
|
333
317
|
var t = e, n = t.lib.WordArray, r = t.enc;
|
|
@@ -367,9 +351,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
367
351
|
}
|
|
368
352
|
})(), e.enc.Base64url;
|
|
369
353
|
});
|
|
370
|
-
})),
|
|
354
|
+
})), w = /* @__PURE__ */ d(((e, t) => {
|
|
371
355
|
(function(n, r) {
|
|
372
|
-
typeof e == "object" ? t.exports = e = r(
|
|
356
|
+
typeof e == "object" ? t.exports = e = r(v()) : typeof define == "function" && define.amd ? define(["./core"], r) : r(n.CryptoJS);
|
|
373
357
|
})(e, function(e) {
|
|
374
358
|
return (function(t) {
|
|
375
359
|
var n = e, r = n.lib, i = r.WordArray, a = r.Hasher, o = n.algo, s = [];
|
|
@@ -428,9 +412,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
428
412
|
n.MD5 = a._createHelper(c), n.HmacMD5 = a._createHmacHelper(c);
|
|
429
413
|
})(Math), e.MD5;
|
|
430
414
|
});
|
|
431
|
-
})),
|
|
415
|
+
})), T = /* @__PURE__ */ d(((e, t) => {
|
|
432
416
|
(function(n, r) {
|
|
433
|
-
typeof e == "object" ? t.exports = e = r(
|
|
417
|
+
typeof e == "object" ? t.exports = e = r(v()) : typeof define == "function" && define.amd ? define(["./core"], r) : r(n.CryptoJS);
|
|
434
418
|
})(e, function(e) {
|
|
435
419
|
return (function() {
|
|
436
420
|
var t = e, n = t.lib, r = n.WordArray, i = n.Hasher, a = t.algo, o = [], s = a.SHA1 = i.extend({
|
|
@@ -467,9 +451,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
467
451
|
t.SHA1 = i._createHelper(s), t.HmacSHA1 = i._createHmacHelper(s);
|
|
468
452
|
})(), e.SHA1;
|
|
469
453
|
});
|
|
470
|
-
})),
|
|
454
|
+
})), E = /* @__PURE__ */ d(((e, t) => {
|
|
471
455
|
(function(n, r) {
|
|
472
|
-
typeof e == "object" ? t.exports = e = r(
|
|
456
|
+
typeof e == "object" ? t.exports = e = r(v()) : typeof define == "function" && define.amd ? define(["./core"], r) : r(n.CryptoJS);
|
|
473
457
|
})(e, function(e) {
|
|
474
458
|
return (function(t) {
|
|
475
459
|
var n = e, r = n.lib, i = r.WordArray, a = r.Hasher, o = n.algo, s = [], c = [];
|
|
@@ -511,9 +495,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
511
495
|
n.SHA256 = a._createHelper(u), n.HmacSHA256 = a._createHmacHelper(u);
|
|
512
496
|
})(Math), e.SHA256;
|
|
513
497
|
});
|
|
514
|
-
})),
|
|
498
|
+
})), D = /* @__PURE__ */ d(((e, t) => {
|
|
515
499
|
(function(n, r, i) {
|
|
516
|
-
typeof e == "object" ? t.exports = e = r(
|
|
500
|
+
typeof e == "object" ? t.exports = e = r(v(), E()) : typeof define == "function" && define.amd ? define(["./core", "./sha256"], r) : r(n.CryptoJS);
|
|
517
501
|
})(e, function(e) {
|
|
518
502
|
return (function() {
|
|
519
503
|
var t = e, n = t.lib.WordArray, r = t.algo, i = r.SHA256, a = r.SHA224 = i.extend({
|
|
@@ -537,9 +521,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
537
521
|
t.SHA224 = i._createHelper(a), t.HmacSHA224 = i._createHmacHelper(a);
|
|
538
522
|
})(), e.SHA224;
|
|
539
523
|
});
|
|
540
|
-
})),
|
|
524
|
+
})), O = /* @__PURE__ */ d(((e, t) => {
|
|
541
525
|
(function(n, r, i) {
|
|
542
|
-
typeof e == "object" ? t.exports = e = r(
|
|
526
|
+
typeof e == "object" ? t.exports = e = r(v(), y()) : typeof define == "function" && define.amd ? define(["./core", "./x64-core"], r) : r(n.CryptoJS);
|
|
543
527
|
})(e, function(e) {
|
|
544
528
|
return (function() {
|
|
545
529
|
var t = e, n = t.lib.Hasher, r = t.x64, i = r.Word, a = r.WordArray, o = t.algo;
|
|
@@ -645,17 +629,17 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
645
629
|
]);
|
|
646
630
|
},
|
|
647
631
|
_doProcessBlock: function(e, t) {
|
|
648
|
-
for (var n = this._hash.words, r = n[0], i = n[1], a = n[2], o = n[3], s = n[4], u = n[5], d = n[6], f = n[7], p = r.high, m = r.low, h = i.high, g = i.low, _ = a.high, v = a.low, y = o.high, b = o.low, x = s.high, S = s.low, C = u.high, w = u.low, T = d.high, E = d.low, D = f.high, O = f.low, k = p, A = m, j = h, M = g, ee = _, N = v,
|
|
649
|
-
var
|
|
650
|
-
if (
|
|
632
|
+
for (var n = this._hash.words, r = n[0], i = n[1], a = n[2], o = n[3], s = n[4], u = n[5], d = n[6], f = n[7], p = r.high, m = r.low, h = i.high, g = i.low, _ = a.high, v = a.low, y = o.high, b = o.low, x = s.high, S = s.low, C = u.high, w = u.low, T = d.high, E = d.low, D = f.high, O = f.low, k = p, A = m, j = h, M = g, ee = _, N = v, P = y, te = b, F = x, I = S, ne = C, re = w, ie = T, ae = E, oe = D, L = O, R = 0; R < 80; R++) {
|
|
633
|
+
var se, ce, le = l[R];
|
|
634
|
+
if (R < 16) ce = le.high = e[t + R * 2] | 0, se = le.low = e[t + R * 2 + 1] | 0;
|
|
651
635
|
else {
|
|
652
|
-
var
|
|
653
|
-
|
|
636
|
+
var ue = l[R - 15], de = ue.high, fe = ue.low, pe = (de >>> 1 | fe << 31) ^ (de >>> 8 | fe << 24) ^ de >>> 7, me = (fe >>> 1 | de << 31) ^ (fe >>> 8 | de << 24) ^ (fe >>> 7 | de << 25), he = l[R - 2], ge = he.high, _e = he.low, ve = (ge >>> 19 | _e << 13) ^ (ge << 3 | _e >>> 29) ^ ge >>> 6, ye = (_e >>> 19 | ge << 13) ^ (_e << 3 | ge >>> 29) ^ (_e >>> 6 | ge << 26), be = l[R - 7], xe = be.high, Se = be.low, Ce = l[R - 16], we = Ce.high, Te = Ce.low;
|
|
637
|
+
se = me + Se, ce = pe + xe + +(se >>> 0 < me >>> 0), se += ye, ce = ce + ve + +(se >>> 0 < ye >>> 0), se += Te, ce = ce + we + +(se >>> 0 < Te >>> 0), le.high = ce, le.low = se;
|
|
654
638
|
}
|
|
655
|
-
var
|
|
656
|
-
|
|
639
|
+
var Ee = F & ne ^ ~F & ie, De = I & re ^ ~I & ae, Oe = k & j ^ k & ee ^ j & ee, ke = A & M ^ A & N ^ M & N, Ae = (k >>> 28 | A << 4) ^ (k << 30 | A >>> 2) ^ (k << 25 | A >>> 7), je = (A >>> 28 | k << 4) ^ (A << 30 | k >>> 2) ^ (A << 25 | k >>> 7), Me = (F >>> 14 | I << 18) ^ (F >>> 18 | I << 14) ^ (F << 23 | I >>> 9), Ne = (I >>> 14 | F << 18) ^ (I >>> 18 | F << 14) ^ (I << 23 | F >>> 9), Pe = c[R], Fe = Pe.high, Ie = Pe.low, Le = L + Ne, Re = oe + Me + +(Le >>> 0 < L >>> 0), Le = Le + De, Re = Re + Ee + +(Le >>> 0 < De >>> 0), Le = Le + Ie, Re = Re + Fe + +(Le >>> 0 < Ie >>> 0), Le = Le + se, Re = Re + ce + +(Le >>> 0 < se >>> 0), ze = je + ke, Be = Ae + Oe + +(ze >>> 0 < je >>> 0);
|
|
640
|
+
oe = ie, L = ae, ie = ne, ae = re, ne = F, re = I, I = te + Le | 0, F = P + Re + +(I >>> 0 < te >>> 0) | 0, P = ee, te = N, ee = j, N = M, j = k, M = A, A = Le + ze | 0, k = Re + Be + +(A >>> 0 < Le >>> 0) | 0;
|
|
657
641
|
}
|
|
658
|
-
m = r.low = m + A, r.high = p + k + (m >>> 0 < A >>> 0
|
|
642
|
+
m = r.low = m + A, r.high = p + k + +(m >>> 0 < A >>> 0), g = i.low = g + M, i.high = h + j + +(g >>> 0 < M >>> 0), v = a.low = v + N, a.high = _ + ee + +(v >>> 0 < N >>> 0), b = o.low = b + te, o.high = y + P + +(b >>> 0 < te >>> 0), S = s.low = S + I, s.high = x + F + +(S >>> 0 < I >>> 0), w = u.low = w + re, u.high = C + ne + +(w >>> 0 < re >>> 0), E = d.low = E + ae, d.high = T + ie + +(E >>> 0 < ae >>> 0), O = f.low = O + L, f.high = D + oe + +(O >>> 0 < L >>> 0);
|
|
659
643
|
},
|
|
660
644
|
_doFinalize: function() {
|
|
661
645
|
var e = this._data, t = e.words, n = this._nDataBytes * 8, r = e.sigBytes * 8;
|
|
@@ -670,9 +654,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
670
654
|
t.SHA512 = n._createHelper(u), t.HmacSHA512 = n._createHmacHelper(u);
|
|
671
655
|
})(), e.SHA512;
|
|
672
656
|
});
|
|
673
|
-
})),
|
|
657
|
+
})), k = /* @__PURE__ */ d(((e, t) => {
|
|
674
658
|
(function(n, r, i) {
|
|
675
|
-
typeof e == "object" ? t.exports = e = r(
|
|
659
|
+
typeof e == "object" ? t.exports = e = r(v(), y(), O()) : typeof define == "function" && define.amd ? define([
|
|
676
660
|
"./core",
|
|
677
661
|
"./x64-core",
|
|
678
662
|
"./sha512"
|
|
@@ -700,9 +684,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
700
684
|
t.SHA384 = o._createHelper(s), t.HmacSHA384 = o._createHmacHelper(s);
|
|
701
685
|
})(), e.SHA384;
|
|
702
686
|
});
|
|
703
|
-
})),
|
|
687
|
+
})), A = /* @__PURE__ */ d(((e, t) => {
|
|
704
688
|
(function(n, r, i) {
|
|
705
|
-
typeof e == "object" ? t.exports = e = r(
|
|
689
|
+
typeof e == "object" ? t.exports = e = r(v(), y()) : typeof define == "function" && define.amd ? define(["./core", "./x64-core"], r) : r(n.CryptoJS);
|
|
706
690
|
})(e, function(e) {
|
|
707
691
|
return (function(t) {
|
|
708
692
|
var n = e, r = n.lib, i = r.WordArray, a = r.Hasher, o = n.x64.Word, s = n.algo, c = [], l = [], u = [];
|
|
@@ -789,9 +773,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
789
773
|
n.SHA3 = a._createHelper(f), n.HmacSHA3 = a._createHmacHelper(f);
|
|
790
774
|
})(Math), e.SHA3;
|
|
791
775
|
});
|
|
792
|
-
})),
|
|
776
|
+
})), j = /* @__PURE__ */ d(((e, t) => {
|
|
793
777
|
(function(n, r) {
|
|
794
|
-
typeof e == "object" ? t.exports = e = r(
|
|
778
|
+
typeof e == "object" ? t.exports = e = r(v()) : typeof define == "function" && define.amd ? define(["./core"], r) : r(n.CryptoJS);
|
|
795
779
|
})(e, function(e) {
|
|
796
780
|
return (function(t) {
|
|
797
781
|
var n = e, r = n.lib, i = r.WordArray, a = r.Hasher, o = n.algo, s = i.create([
|
|
@@ -1183,9 +1167,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1183
1167
|
n.RIPEMD160 = a._createHelper(p), n.HmacRIPEMD160 = a._createHmacHelper(p);
|
|
1184
1168
|
})(Math), e.RIPEMD160;
|
|
1185
1169
|
});
|
|
1186
|
-
})),
|
|
1170
|
+
})), M = /* @__PURE__ */ d(((e, t) => {
|
|
1187
1171
|
(function(n, r) {
|
|
1188
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1172
|
+
typeof e == "object" ? t.exports = e = r(v()) : typeof define == "function" && define.amd ? define(["./core"], r) : r(n.CryptoJS);
|
|
1189
1173
|
})(e, function(e) {
|
|
1190
1174
|
(function() {
|
|
1191
1175
|
var t = e, n = t.lib.Base, r = t.enc.Utf8, i = t.algo;
|
|
@@ -1211,9 +1195,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1211
1195
|
});
|
|
1212
1196
|
})();
|
|
1213
1197
|
});
|
|
1214
|
-
})),
|
|
1198
|
+
})), ee = /* @__PURE__ */ d(((e, t) => {
|
|
1215
1199
|
(function(n, r, i) {
|
|
1216
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1200
|
+
typeof e == "object" ? t.exports = e = r(v(), E(), M()) : typeof define == "function" && define.amd ? define([
|
|
1217
1201
|
"./core",
|
|
1218
1202
|
"./sha256",
|
|
1219
1203
|
"./hmac"
|
|
@@ -1247,9 +1231,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1247
1231
|
};
|
|
1248
1232
|
})(), e.PBKDF2;
|
|
1249
1233
|
});
|
|
1250
|
-
})),
|
|
1234
|
+
})), N = /* @__PURE__ */ d(((e, t) => {
|
|
1251
1235
|
(function(n, r, i) {
|
|
1252
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1236
|
+
typeof e == "object" ? t.exports = e = r(v(), T(), M()) : typeof define == "function" && define.amd ? define([
|
|
1253
1237
|
"./core",
|
|
1254
1238
|
"./sha1",
|
|
1255
1239
|
"./hmac"
|
|
@@ -1279,9 +1263,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1279
1263
|
};
|
|
1280
1264
|
})(), e.EvpKDF;
|
|
1281
1265
|
});
|
|
1282
|
-
})),
|
|
1266
|
+
})), P = /* @__PURE__ */ d(((e, t) => {
|
|
1283
1267
|
(function(n, r, i) {
|
|
1284
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1268
|
+
typeof e == "object" ? t.exports = e = r(v(), N()) : typeof define == "function" && define.amd ? define(["./core", "./evpkdf"], r) : r(n.CryptoJS);
|
|
1285
1269
|
})(e, function(e) {
|
|
1286
1270
|
e.lib.Cipher || function(t) {
|
|
1287
1271
|
var n = e, r = n.lib, i = r.Base, a = r.WordArray, o = r.BufferedBlockAlgorithm, s = n.enc;
|
|
@@ -1458,9 +1442,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1458
1442
|
});
|
|
1459
1443
|
}();
|
|
1460
1444
|
});
|
|
1461
|
-
})),
|
|
1445
|
+
})), te = /* @__PURE__ */ d(((e, t) => {
|
|
1462
1446
|
(function(n, r, i) {
|
|
1463
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1447
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1464
1448
|
})(e, function(e) {
|
|
1465
1449
|
return e.mode.CFB = function() {
|
|
1466
1450
|
var t = e.lib.BlockCipherMode.extend();
|
|
@@ -1479,9 +1463,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1479
1463
|
return t;
|
|
1480
1464
|
}(), e.mode.CFB;
|
|
1481
1465
|
});
|
|
1482
|
-
})),
|
|
1466
|
+
})), F = /* @__PURE__ */ d(((e, t) => {
|
|
1483
1467
|
(function(n, r, i) {
|
|
1484
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1468
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1485
1469
|
})(e, function(e) {
|
|
1486
1470
|
return e.mode.CTR = function() {
|
|
1487
1471
|
var t = e.lib.BlockCipherMode.extend();
|
|
@@ -1494,9 +1478,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1494
1478
|
} }), t;
|
|
1495
1479
|
}(), e.mode.CTR;
|
|
1496
1480
|
});
|
|
1497
|
-
})),
|
|
1481
|
+
})), I = /* @__PURE__ */ d(((e, t) => {
|
|
1498
1482
|
(function(n, r, i) {
|
|
1499
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1483
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1500
1484
|
})(e, function(e) {
|
|
1501
1485
|
return e.mode.CTRGladman = function() {
|
|
1502
1486
|
var t = e.lib.BlockCipherMode.extend();
|
|
@@ -1519,9 +1503,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1519
1503
|
} }), t;
|
|
1520
1504
|
}(), e.mode.CTRGladman;
|
|
1521
1505
|
});
|
|
1522
|
-
})),
|
|
1506
|
+
})), ne = /* @__PURE__ */ d(((e, t) => {
|
|
1523
1507
|
(function(n, r, i) {
|
|
1524
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1508
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1525
1509
|
})(e, function(e) {
|
|
1526
1510
|
return e.mode.OFB = function() {
|
|
1527
1511
|
var t = e.lib.BlockCipherMode.extend();
|
|
@@ -1532,9 +1516,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1532
1516
|
} }), t;
|
|
1533
1517
|
}(), e.mode.OFB;
|
|
1534
1518
|
});
|
|
1535
|
-
})),
|
|
1519
|
+
})), re = /* @__PURE__ */ d(((e, t) => {
|
|
1536
1520
|
(function(n, r, i) {
|
|
1537
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1521
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1538
1522
|
})(e, function(e) {
|
|
1539
1523
|
return e.mode.ECB = function() {
|
|
1540
1524
|
var t = e.lib.BlockCipherMode.extend();
|
|
@@ -1545,9 +1529,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1545
1529
|
} }), t;
|
|
1546
1530
|
}(), e.mode.ECB;
|
|
1547
1531
|
});
|
|
1548
|
-
})),
|
|
1532
|
+
})), ie = /* @__PURE__ */ d(((e, t) => {
|
|
1549
1533
|
(function(n, r, i) {
|
|
1550
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1534
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1551
1535
|
})(e, function(e) {
|
|
1552
1536
|
return e.pad.AnsiX923 = {
|
|
1553
1537
|
pad: function(e, t) {
|
|
@@ -1560,9 +1544,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1560
1544
|
}
|
|
1561
1545
|
}, e.pad.Ansix923;
|
|
1562
1546
|
});
|
|
1563
|
-
})),
|
|
1547
|
+
})), ae = /* @__PURE__ */ d(((e, t) => {
|
|
1564
1548
|
(function(n, r, i) {
|
|
1565
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1549
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1566
1550
|
})(e, function(e) {
|
|
1567
1551
|
return e.pad.Iso10126 = {
|
|
1568
1552
|
pad: function(t, n) {
|
|
@@ -1575,9 +1559,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1575
1559
|
}
|
|
1576
1560
|
}, e.pad.Iso10126;
|
|
1577
1561
|
});
|
|
1578
|
-
})),
|
|
1562
|
+
})), oe = /* @__PURE__ */ d(((e, t) => {
|
|
1579
1563
|
(function(n, r, i) {
|
|
1580
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1564
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1581
1565
|
})(e, function(e) {
|
|
1582
1566
|
return e.pad.Iso97971 = {
|
|
1583
1567
|
pad: function(t, n) {
|
|
@@ -1588,9 +1572,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1588
1572
|
}
|
|
1589
1573
|
}, e.pad.Iso97971;
|
|
1590
1574
|
});
|
|
1591
|
-
})),
|
|
1575
|
+
})), L = /* @__PURE__ */ d(((e, t) => {
|
|
1592
1576
|
(function(n, r, i) {
|
|
1593
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1577
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1594
1578
|
})(e, function(e) {
|
|
1595
1579
|
return e.pad.ZeroPadding = {
|
|
1596
1580
|
pad: function(e, t) {
|
|
@@ -1605,18 +1589,18 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1605
1589
|
}
|
|
1606
1590
|
}, e.pad.ZeroPadding;
|
|
1607
1591
|
});
|
|
1608
|
-
})),
|
|
1592
|
+
})), R = /* @__PURE__ */ d(((e, t) => {
|
|
1609
1593
|
(function(n, r, i) {
|
|
1610
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1594
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1611
1595
|
})(e, function(e) {
|
|
1612
1596
|
return e.pad.NoPadding = {
|
|
1613
1597
|
pad: function() {},
|
|
1614
1598
|
unpad: function() {}
|
|
1615
1599
|
}, e.pad.NoPadding;
|
|
1616
1600
|
});
|
|
1617
|
-
})),
|
|
1601
|
+
})), se = /* @__PURE__ */ d(((e, t) => {
|
|
1618
1602
|
(function(n, r, i) {
|
|
1619
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1603
|
+
typeof e == "object" ? t.exports = e = r(v(), P()) : typeof define == "function" && define.amd ? define(["./core", "./cipher-core"], r) : r(n.CryptoJS);
|
|
1620
1604
|
})(e, function(e) {
|
|
1621
1605
|
return (function(t) {
|
|
1622
1606
|
var n = e, r = n.lib.CipherParams, i = n.enc.Hex, a = n.format;
|
|
@@ -1631,9 +1615,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1631
1615
|
};
|
|
1632
1616
|
})(), e.format.Hex;
|
|
1633
1617
|
});
|
|
1634
|
-
})),
|
|
1618
|
+
})), ce = /* @__PURE__ */ d(((e, t) => {
|
|
1635
1619
|
(function(n, r, i) {
|
|
1636
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1620
|
+
typeof e == "object" ? t.exports = e = r(v(), S(), w(), N(), P()) : typeof define == "function" && define.amd ? define([
|
|
1637
1621
|
"./core",
|
|
1638
1622
|
"./enc-base64",
|
|
1639
1623
|
"./md5",
|
|
@@ -1701,9 +1685,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
1701
1685
|
t.AES = n._createHelper(h);
|
|
1702
1686
|
})(), e.AES;
|
|
1703
1687
|
});
|
|
1704
|
-
})),
|
|
1688
|
+
})), le = /* @__PURE__ */ d(((e, t) => {
|
|
1705
1689
|
(function(n, r, i) {
|
|
1706
|
-
typeof e == "object" ? t.exports = e = r(
|
|
1690
|
+
typeof e == "object" ? t.exports = e = r(v(), S(), w(), N(), P()) : typeof define == "function" && define.amd ? define([
|
|
1707
1691
|
"./core",
|
|
1708
1692
|
"./enc-base64",
|
|
1709
1693
|
"./md5",
|
|
@@ -2435,9 +2419,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
2435
2419
|
t.TripleDES = i._createHelper(m);
|
|
2436
2420
|
})(), e.TripleDES;
|
|
2437
2421
|
});
|
|
2438
|
-
})),
|
|
2422
|
+
})), ue = /* @__PURE__ */ d(((e, t) => {
|
|
2439
2423
|
(function(n, r, i) {
|
|
2440
|
-
typeof e == "object" ? t.exports = e = r(
|
|
2424
|
+
typeof e == "object" ? t.exports = e = r(v(), S(), w(), N(), P()) : typeof define == "function" && define.amd ? define([
|
|
2441
2425
|
"./core",
|
|
2442
2426
|
"./enc-base64",
|
|
2443
2427
|
"./md5",
|
|
@@ -2482,9 +2466,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
2482
2466
|
t.RC4Drop = n._createHelper(o);
|
|
2483
2467
|
})(), e.RC4;
|
|
2484
2468
|
});
|
|
2485
|
-
})),
|
|
2469
|
+
})), de = /* @__PURE__ */ d(((e, t) => {
|
|
2486
2470
|
(function(n, r, i) {
|
|
2487
|
-
typeof e == "object" ? t.exports = e = r(
|
|
2471
|
+
typeof e == "object" ? t.exports = e = r(v(), S(), w(), N(), P()) : typeof define == "function" && define.amd ? define([
|
|
2488
2472
|
"./core",
|
|
2489
2473
|
"./enc-base64",
|
|
2490
2474
|
"./md5",
|
|
@@ -2534,7 +2518,7 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
2534
2518
|
});
|
|
2535
2519
|
function c() {
|
|
2536
2520
|
for (var e = this._X, t = this._C, n = 0; n < 8; n++) a[n] = t[n];
|
|
2537
|
-
t[0] = t[0] + 1295307597 + this._b | 0, t[1] = t[1] + 3545052371 + (t[0] >>> 0 < a[0] >>> 0
|
|
2521
|
+
t[0] = t[0] + 1295307597 + this._b | 0, t[1] = t[1] + 3545052371 + +(t[0] >>> 0 < a[0] >>> 0) | 0, t[2] = t[2] + 886263092 + +(t[1] >>> 0 < a[1] >>> 0) | 0, t[3] = t[3] + 1295307597 + +(t[2] >>> 0 < a[2] >>> 0) | 0, t[4] = t[4] + 3545052371 + +(t[3] >>> 0 < a[3] >>> 0) | 0, t[5] = t[5] + 886263092 + +(t[4] >>> 0 < a[4] >>> 0) | 0, t[6] = t[6] + 1295307597 + +(t[5] >>> 0 < a[5] >>> 0) | 0, t[7] = t[7] + 3545052371 + +(t[6] >>> 0 < a[6] >>> 0) | 0, this._b = +(t[7] >>> 0 < a[7] >>> 0);
|
|
2538
2522
|
for (var n = 0; n < 8; n++) {
|
|
2539
2523
|
var r = e[n] + t[n], i = r & 65535, s = r >>> 16;
|
|
2540
2524
|
o[n] = ((i * i >>> 17) + i * s >>> 15) + s * s ^ ((r & 4294901760) * r | 0) + ((r & 65535) * r | 0);
|
|
@@ -2544,9 +2528,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
2544
2528
|
t.Rabbit = n._createHelper(s);
|
|
2545
2529
|
})(), e.Rabbit;
|
|
2546
2530
|
});
|
|
2547
|
-
})),
|
|
2531
|
+
})), fe = /* @__PURE__ */ d(((e, t) => {
|
|
2548
2532
|
(function(n, r, i) {
|
|
2549
|
-
typeof e == "object" ? t.exports = e = r(
|
|
2533
|
+
typeof e == "object" ? t.exports = e = r(v(), S(), w(), N(), P()) : typeof define == "function" && define.amd ? define([
|
|
2550
2534
|
"./core",
|
|
2551
2535
|
"./enc-base64",
|
|
2552
2536
|
"./md5",
|
|
@@ -2595,7 +2579,7 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
2595
2579
|
});
|
|
2596
2580
|
function c() {
|
|
2597
2581
|
for (var e = this._X, t = this._C, n = 0; n < 8; n++) a[n] = t[n];
|
|
2598
|
-
t[0] = t[0] + 1295307597 + this._b | 0, t[1] = t[1] + 3545052371 + (t[0] >>> 0 < a[0] >>> 0
|
|
2582
|
+
t[0] = t[0] + 1295307597 + this._b | 0, t[1] = t[1] + 3545052371 + +(t[0] >>> 0 < a[0] >>> 0) | 0, t[2] = t[2] + 886263092 + +(t[1] >>> 0 < a[1] >>> 0) | 0, t[3] = t[3] + 1295307597 + +(t[2] >>> 0 < a[2] >>> 0) | 0, t[4] = t[4] + 3545052371 + +(t[3] >>> 0 < a[3] >>> 0) | 0, t[5] = t[5] + 886263092 + +(t[4] >>> 0 < a[4] >>> 0) | 0, t[6] = t[6] + 1295307597 + +(t[5] >>> 0 < a[5] >>> 0) | 0, t[7] = t[7] + 3545052371 + +(t[6] >>> 0 < a[6] >>> 0) | 0, this._b = +(t[7] >>> 0 < a[7] >>> 0);
|
|
2599
2583
|
for (var n = 0; n < 8; n++) {
|
|
2600
2584
|
var r = e[n] + t[n], i = r & 65535, s = r >>> 16;
|
|
2601
2585
|
o[n] = ((i * i >>> 17) + i * s >>> 15) + s * s ^ ((r & 4294901760) * r | 0) + ((r & 65535) * r | 0);
|
|
@@ -2605,9 +2589,9 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
2605
2589
|
t.RabbitLegacy = n._createHelper(s);
|
|
2606
2590
|
})(), e.RabbitLegacy;
|
|
2607
2591
|
});
|
|
2608
|
-
})),
|
|
2592
|
+
})), pe = /* @__PURE__ */ d(((e, t) => {
|
|
2609
2593
|
(function(n, r, i) {
|
|
2610
|
-
typeof e == "object" ? t.exports = e = r(
|
|
2594
|
+
typeof e == "object" ? t.exports = e = r(v(), S(), w(), N(), P()) : typeof define == "function" && define.amd ? define([
|
|
2611
2595
|
"./core",
|
|
2612
2596
|
"./enc-base64",
|
|
2613
2597
|
"./md5",
|
|
@@ -3728,122 +3712,122 @@ var x = e("crypto"), S = /* @__PURE__ */ u(((e, t) => {
|
|
|
3728
3712
|
t.Blowfish = n._createHelper(d);
|
|
3729
3713
|
})(), e.Blowfish;
|
|
3730
3714
|
});
|
|
3731
|
-
})),
|
|
3715
|
+
})), me = /* @__PURE__ */ m((/* @__PURE__ */ d(((e, t) => {
|
|
3732
3716
|
(function(n, r, i) {
|
|
3733
|
-
typeof e == "object" ? t.exports = e = r(C(), w(), T(), E(), D(), O(), k(), A(), j(), M(), ee(), N(),
|
|
3717
|
+
typeof e == "object" ? t.exports = e = r(v(), y(), b(), x(), S(), C(), w(), T(), E(), D(), O(), k(), A(), j(), M(), ee(), N(), P(), te(), F(), I(), ne(), re(), ie(), ae(), oe(), L(), R(), se(), ce(), le(), ue(), de(), fe(), pe()) : typeof define == "function" && define.amd ? define(/* @__PURE__ */ "./core,./x64-core,./lib-typedarrays,./enc-utf16,./enc-base64,./enc-base64url,./md5,./sha1,./sha256,./sha224,./sha512,./sha384,./sha3,./ripemd160,./hmac,./pbkdf2,./evpkdf,./cipher-core,./mode-cfb,./mode-ctr,./mode-ctr-gladman,./mode-ofb,./mode-ecb,./pad-ansix923,./pad-iso10126,./pad-iso97971,./pad-zeropadding,./pad-nopadding,./format-hex,./aes,./tripledes,./rc4,./rabbit,./rabbit-legacy,./blowfish".split(","), r) : n.CryptoJS = r(n.CryptoJS);
|
|
3734
3718
|
})(e, function(e) {
|
|
3735
3719
|
return e;
|
|
3736
3720
|
});
|
|
3737
3721
|
})))(), 1);
|
|
3738
|
-
function
|
|
3722
|
+
function he(e) {
|
|
3739
3723
|
return new Promise((t) => {
|
|
3740
|
-
let
|
|
3741
|
-
t(
|
|
3742
|
-
mode:
|
|
3743
|
-
padding:
|
|
3724
|
+
let r = n.use().key || "chartext12345677";
|
|
3725
|
+
t(me.default.AES.encrypt(e, me.default.enc.Utf8.parse(r), {
|
|
3726
|
+
mode: me.default.mode.ECB,
|
|
3727
|
+
padding: me.default.pad.Pkcs7
|
|
3744
3728
|
}).toString().replaceAll(/\+/g, "-").replaceAll(/\//g, "_").replaceAll(/=/g, ""));
|
|
3745
3729
|
});
|
|
3746
3730
|
}
|
|
3747
|
-
function
|
|
3731
|
+
function ge(e) {
|
|
3748
3732
|
return new Promise((t) => {
|
|
3749
|
-
let
|
|
3750
|
-
for (;
|
|
3751
|
-
let
|
|
3752
|
-
mode:
|
|
3753
|
-
padding:
|
|
3733
|
+
let r = n.use().key || "chartext12345677", i = e.replaceAll(/-/g, "+").replaceAll(/_/g, "/");
|
|
3734
|
+
for (; i.length % 4;) i += "=";
|
|
3735
|
+
let a = me.default.AES.decrypt(i, me.default.enc.Utf8.parse(r), {
|
|
3736
|
+
mode: me.default.mode.ECB,
|
|
3737
|
+
padding: me.default.pad.Pkcs7
|
|
3754
3738
|
});
|
|
3755
3739
|
try {
|
|
3756
|
-
t(JSON.parse(
|
|
3740
|
+
t(JSON.parse(a.toString(me.default.enc.Utf8)));
|
|
3757
3741
|
} catch {
|
|
3758
|
-
t(
|
|
3742
|
+
t(a.toString(me.default.enc.Utf8));
|
|
3759
3743
|
}
|
|
3760
3744
|
});
|
|
3761
3745
|
}
|
|
3762
|
-
function
|
|
3746
|
+
function _e() {
|
|
3763
3747
|
return {
|
|
3764
3748
|
name: "aes",
|
|
3765
|
-
encrypt:
|
|
3766
|
-
decrypt:
|
|
3749
|
+
encrypt: he,
|
|
3750
|
+
decrypt: ge
|
|
3767
3751
|
};
|
|
3768
3752
|
}
|
|
3769
3753
|
//#endregion
|
|
3770
3754
|
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/util.js
|
|
3771
|
-
var
|
|
3772
|
-
function
|
|
3773
|
-
return
|
|
3755
|
+
var ve = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
3756
|
+
function ye(e) {
|
|
3757
|
+
return ve.charAt(e);
|
|
3774
3758
|
}
|
|
3775
|
-
function
|
|
3759
|
+
function be(e, t) {
|
|
3776
3760
|
return e & t;
|
|
3777
3761
|
}
|
|
3778
|
-
function
|
|
3762
|
+
function xe(e, t) {
|
|
3779
3763
|
return e | t;
|
|
3780
3764
|
}
|
|
3781
|
-
function
|
|
3765
|
+
function Se(e, t) {
|
|
3782
3766
|
return e ^ t;
|
|
3783
3767
|
}
|
|
3784
|
-
function
|
|
3768
|
+
function Ce(e, t) {
|
|
3785
3769
|
return e & ~t;
|
|
3786
3770
|
}
|
|
3787
|
-
function
|
|
3771
|
+
function we(e) {
|
|
3788
3772
|
if (e == 0) return -1;
|
|
3789
3773
|
var t = 0;
|
|
3790
3774
|
return e & 65535 || (e >>= 16, t += 16), e & 255 || (e >>= 8, t += 8), e & 15 || (e >>= 4, t += 4), e & 3 || (e >>= 2, t += 2), e & 1 || ++t, t;
|
|
3791
3775
|
}
|
|
3792
|
-
function
|
|
3776
|
+
function Te(e) {
|
|
3793
3777
|
for (var t = 0; e != 0;) e &= e - 1, ++t;
|
|
3794
3778
|
return t;
|
|
3795
3779
|
}
|
|
3796
3780
|
//#endregion
|
|
3797
3781
|
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/base64.js
|
|
3798
|
-
var
|
|
3799
|
-
function
|
|
3782
|
+
var Ee = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", De = "=";
|
|
3783
|
+
function Oe(e) {
|
|
3800
3784
|
var t, n, r = "";
|
|
3801
|
-
for (t = 0; t + 3 <= e.length; t += 3) n = parseInt(e.substring(t, t + 3), 16), r +=
|
|
3802
|
-
for (t + 1 == e.length ? (n = parseInt(e.substring(t, t + 1), 16), r +=
|
|
3785
|
+
for (t = 0; t + 3 <= e.length; t += 3) n = parseInt(e.substring(t, t + 3), 16), r += Ee.charAt(n >> 6) + Ee.charAt(n & 63);
|
|
3786
|
+
for (t + 1 == e.length ? (n = parseInt(e.substring(t, t + 1), 16), r += Ee.charAt(n << 2)) : t + 2 == e.length && (n = parseInt(e.substring(t, t + 2), 16), r += Ee.charAt(n >> 2) + Ee.charAt((n & 3) << 4)); (r.length & 3) > 0;) r += De;
|
|
3803
3787
|
return r;
|
|
3804
3788
|
}
|
|
3805
|
-
function
|
|
3789
|
+
function ke(e) {
|
|
3806
3790
|
var t = "", n, r = 0, i = 0;
|
|
3807
|
-
for (n = 0; n < e.length && e.charAt(n) !=
|
|
3808
|
-
var a =
|
|
3809
|
-
a < 0 || (r == 0 ? (t +=
|
|
3791
|
+
for (n = 0; n < e.length && e.charAt(n) != De; ++n) {
|
|
3792
|
+
var a = Ee.indexOf(e.charAt(n));
|
|
3793
|
+
a < 0 || (r == 0 ? (t += ye(a >> 2), i = a & 3, r = 1) : r == 1 ? (t += ye(i << 2 | a >> 4), i = a & 15, r = 2) : r == 2 ? (t += ye(i), t += ye(a >> 2), i = a & 3, r = 3) : (t += ye(i << 2 | a >> 4), t += ye(a & 15), r = 0));
|
|
3810
3794
|
}
|
|
3811
|
-
return r == 1 && (t +=
|
|
3795
|
+
return r == 1 && (t += ye(i << 2)), t;
|
|
3812
3796
|
}
|
|
3813
3797
|
//#endregion
|
|
3814
3798
|
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/asn1js/hex.js
|
|
3815
|
-
var
|
|
3799
|
+
var Ae, je = { decode: function(e) {
|
|
3816
3800
|
var t;
|
|
3817
|
-
if (
|
|
3801
|
+
if (Ae === void 0) {
|
|
3818
3802
|
var n = "0123456789ABCDEF", r = " \f\n\r \xA0\u2028\u2029";
|
|
3819
|
-
for (
|
|
3820
|
-
for (n = n.toLowerCase(), t = 10; t < 16; ++t)
|
|
3821
|
-
for (t = 0; t < r.length; ++t)
|
|
3803
|
+
for (Ae = {}, t = 0; t < 16; ++t) Ae[n.charAt(t)] = t;
|
|
3804
|
+
for (n = n.toLowerCase(), t = 10; t < 16; ++t) Ae[n.charAt(t)] = t;
|
|
3805
|
+
for (t = 0; t < r.length; ++t) Ae[r.charAt(t)] = -1;
|
|
3822
3806
|
}
|
|
3823
3807
|
var i = [], a = 0, o = 0;
|
|
3824
3808
|
for (t = 0; t < e.length; ++t) {
|
|
3825
3809
|
var s = e.charAt(t);
|
|
3826
3810
|
if (s == "=") break;
|
|
3827
|
-
if (s =
|
|
3811
|
+
if (s = Ae[s], s != -1) {
|
|
3828
3812
|
if (s === void 0) throw Error("Illegal character at offset " + t);
|
|
3829
3813
|
a |= s, ++o >= 2 ? (i[i.length] = a, a = 0, o = 0) : a <<= 4;
|
|
3830
3814
|
}
|
|
3831
3815
|
}
|
|
3832
3816
|
if (o) throw Error("Hex encoding incomplete: 4 bits missing");
|
|
3833
3817
|
return i;
|
|
3834
|
-
} },
|
|
3818
|
+
} }, Me, Ne = {
|
|
3835
3819
|
decode: function(e) {
|
|
3836
3820
|
var t;
|
|
3837
|
-
if (
|
|
3821
|
+
if (Me === void 0) {
|
|
3838
3822
|
var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = "= \f\n\r \xA0\u2028\u2029";
|
|
3839
|
-
for (
|
|
3840
|
-
for (
|
|
3823
|
+
for (Me = Object.create(null), t = 0; t < 64; ++t) Me[n.charAt(t)] = t;
|
|
3824
|
+
for (Me["-"] = 62, Me._ = 63, t = 0; t < r.length; ++t) Me[r.charAt(t)] = -1;
|
|
3841
3825
|
}
|
|
3842
3826
|
var i = [], a = 0, o = 0;
|
|
3843
3827
|
for (t = 0; t < e.length; ++t) {
|
|
3844
3828
|
var s = e.charAt(t);
|
|
3845
3829
|
if (s == "=") break;
|
|
3846
|
-
if (s =
|
|
3830
|
+
if (s = Me[s], s != -1) {
|
|
3847
3831
|
if (s === void 0) throw Error("Illegal character at offset " + t);
|
|
3848
3832
|
a |= s, ++o >= 4 ? (i[i.length] = a >> 16, i[i.length] = a >> 8 & 255, i[i.length] = a & 255, a = 0, o = 0) : a <<= 6;
|
|
3849
3833
|
}
|
|
@@ -3861,40 +3845,40 @@ var Pe, Fe = { decode: function(e) {
|
|
|
3861
3845
|
},
|
|
3862
3846
|
re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
|
|
3863
3847
|
unarmor: function(e) {
|
|
3864
|
-
var t =
|
|
3848
|
+
var t = Ne.re.exec(e);
|
|
3865
3849
|
if (t) if (t[1]) e = t[1];
|
|
3866
3850
|
else if (t[2]) e = t[2];
|
|
3867
3851
|
else throw Error("RegExp out of sync");
|
|
3868
|
-
return
|
|
3852
|
+
return Ne.decode(e);
|
|
3869
3853
|
}
|
|
3870
|
-
},
|
|
3854
|
+
}, Pe = 0x9184e72a000, Fe = function() {
|
|
3871
3855
|
function e(e) {
|
|
3872
3856
|
this.buf = [+e || 0];
|
|
3873
3857
|
}
|
|
3874
3858
|
return e.prototype.mulAdd = function(e, t) {
|
|
3875
3859
|
var n = this.buf, r = n.length, i, a;
|
|
3876
|
-
for (i = 0; i < r; ++i) a = n[i] * e + t, a <
|
|
3860
|
+
for (i = 0; i < r; ++i) a = n[i] * e + t, a < Pe ? t = 0 : (t = 0 | a / Pe, a -= t * Pe), n[i] = a;
|
|
3877
3861
|
t > 0 && (n[i] = t);
|
|
3878
3862
|
}, e.prototype.sub = function(e) {
|
|
3879
3863
|
var t = this.buf, n = t.length, r, i;
|
|
3880
|
-
for (r = 0; r < n; ++r) i = t[r] - e, i < 0 ? (i +=
|
|
3864
|
+
for (r = 0; r < n; ++r) i = t[r] - e, i < 0 ? (i += Pe, e = 1) : e = 0, t[r] = i;
|
|
3881
3865
|
for (; t[t.length - 1] === 0;) t.pop();
|
|
3882
3866
|
}, e.prototype.toString = function(e) {
|
|
3883
3867
|
if ((e || 10) != 10) throw Error("only base 10 is supported");
|
|
3884
|
-
for (var t = this.buf, n = t[t.length - 1].toString(), r = t.length - 2; r >= 0; --r) n += (
|
|
3868
|
+
for (var t = this.buf, n = t[t.length - 1].toString(), r = t.length - 2; r >= 0; --r) n += (Pe + t[r]).toString().substring(1);
|
|
3885
3869
|
return n;
|
|
3886
3870
|
}, e.prototype.valueOf = function() {
|
|
3887
|
-
for (var e = this.buf, t = 0, n = e.length - 1; n >= 0; --n) t = t *
|
|
3871
|
+
for (var e = this.buf, t = 0, n = e.length - 1; n >= 0; --n) t = t * Pe + e[n];
|
|
3888
3872
|
return t;
|
|
3889
3873
|
}, e.prototype.simplify = function() {
|
|
3890
3874
|
var e = this.buf;
|
|
3891
3875
|
return e.length == 1 ? e[0] : this;
|
|
3892
3876
|
}, e;
|
|
3893
|
-
}(),
|
|
3894
|
-
function
|
|
3895
|
-
return e.length > t && (e = e.substring(0, t) +
|
|
3877
|
+
}(), Ie = "…", Le = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, Re = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
|
|
3878
|
+
function ze(e, t) {
|
|
3879
|
+
return e.length > t && (e = e.substring(0, t) + Ie), e;
|
|
3896
3880
|
}
|
|
3897
|
-
var
|
|
3881
|
+
var Be = function() {
|
|
3898
3882
|
function e(t, n) {
|
|
3899
3883
|
this.hexDigits = "0123456789ABCDEF", t instanceof e ? (this.enc = t.enc, this.pos = t.pos) : (this.enc = t, this.pos = n);
|
|
3900
3884
|
}
|
|
@@ -3933,7 +3917,7 @@ var Ue = function() {
|
|
|
3933
3917
|
for (var n = "", r, i, a = e; a < t;) r = this.get(a++), i = this.get(a++), n += String.fromCharCode(r << 8 | i);
|
|
3934
3918
|
return n;
|
|
3935
3919
|
}, e.prototype.parseTime = function(e, t, n) {
|
|
3936
|
-
var r = this.parseStringISO(e, t), i = (n ?
|
|
3920
|
+
var r = this.parseStringISO(e, t), i = (n ? Le : Re).exec(r);
|
|
3937
3921
|
return i ? (n && (i[1] = +i[1], i[1] += +i[1] < 70 ? 2e3 : 1900), r = i[1] + "-" + i[2] + "-" + i[3] + " " + i[4], i[5] && (r += ":" + i[5], i[6] && (r += ":" + i[6], i[7] && (r += "." + i[7]))), i[8] && (r += " UTC", i[8] != "Z" && (r += i[8], i[9] && (r += ":" + i[9]))), r) : "Unrecognized time: " + r;
|
|
3938
3922
|
}, e.prototype.parseInteger = function(e, t) {
|
|
3939
3923
|
for (var n = this.get(e), r = n > 127, i = r ? 255 : 0, a, o = ""; n == i && ++e < t;) n = this.get(e);
|
|
@@ -3943,39 +3927,39 @@ var Ue = function() {
|
|
|
3943
3927
|
o = "(" + a + " bit)\n";
|
|
3944
3928
|
}
|
|
3945
3929
|
r && (n -= 256);
|
|
3946
|
-
for (var s = new
|
|
3930
|
+
for (var s = new Fe(n), c = e + 1; c < t; ++c) s.mulAdd(256, this.get(c));
|
|
3947
3931
|
return o + s.toString();
|
|
3948
3932
|
}, e.prototype.parseBitString = function(e, t, n) {
|
|
3949
3933
|
for (var r = this.get(e), i = "(" + ((t - e - 1 << 3) - r) + " bit)\n", a = "", o = e + 1; o < t; ++o) {
|
|
3950
3934
|
for (var s = this.get(o), c = o == t - 1 ? r : 0, l = 7; l >= c; --l) a += s >> l & 1 ? "1" : "0";
|
|
3951
|
-
if (a.length > n) return i +
|
|
3935
|
+
if (a.length > n) return i + ze(a, n);
|
|
3952
3936
|
}
|
|
3953
3937
|
return i + a;
|
|
3954
3938
|
}, e.prototype.parseOctetString = function(e, t, n) {
|
|
3955
|
-
if (this.isASCII(e, t)) return
|
|
3939
|
+
if (this.isASCII(e, t)) return ze(this.parseStringISO(e, t), n);
|
|
3956
3940
|
var r = t - e, i = "(" + r + " byte)\n";
|
|
3957
3941
|
n /= 2, r > n && (t = e + n);
|
|
3958
3942
|
for (var a = e; a < t; ++a) i += this.hexByte(this.get(a));
|
|
3959
|
-
return r > n && (i +=
|
|
3943
|
+
return r > n && (i += Ie), i;
|
|
3960
3944
|
}, e.prototype.parseOID = function(e, t, n) {
|
|
3961
|
-
for (var r = "", i = new
|
|
3945
|
+
for (var r = "", i = new Fe(), a = 0, o = e; o < t; ++o) {
|
|
3962
3946
|
var s = this.get(o);
|
|
3963
3947
|
if (i.mulAdd(128, s & 127), a += 7, !(s & 128)) {
|
|
3964
|
-
if (r === "") if (i = i.simplify(), i instanceof
|
|
3948
|
+
if (r === "") if (i = i.simplify(), i instanceof Fe) i.sub(80), r = "2." + i.toString();
|
|
3965
3949
|
else {
|
|
3966
3950
|
var c = i < 80 ? i < 40 ? 0 : 1 : 2;
|
|
3967
3951
|
r = c + "." + (i - c * 40);
|
|
3968
3952
|
}
|
|
3969
3953
|
else r += "." + i.toString();
|
|
3970
|
-
if (r.length > n) return
|
|
3971
|
-
i = new
|
|
3954
|
+
if (r.length > n) return ze(r, n);
|
|
3955
|
+
i = new Fe(), a = 0;
|
|
3972
3956
|
}
|
|
3973
3957
|
}
|
|
3974
3958
|
return a > 0 && (r += ".incomplete"), r;
|
|
3975
3959
|
}, e;
|
|
3976
|
-
}(),
|
|
3960
|
+
}(), Ve = function() {
|
|
3977
3961
|
function e(e, t, n, r, i) {
|
|
3978
|
-
if (!(r instanceof
|
|
3962
|
+
if (!(r instanceof He)) throw Error("Invalid tag value.");
|
|
3979
3963
|
this.stream = e, this.header = t, this.length = n, this.tag = r, this.sub = i;
|
|
3980
3964
|
}
|
|
3981
3965
|
return e.prototype.typeName = function() {
|
|
@@ -4028,14 +4012,14 @@ var Ue = function() {
|
|
|
4028
4012
|
case 6: return this.stream.parseOID(t, t + n, e);
|
|
4029
4013
|
case 16:
|
|
4030
4014
|
case 17: return this.sub === null ? "(no elem)" : "(" + this.sub.length + " elem)";
|
|
4031
|
-
case 12: return
|
|
4015
|
+
case 12: return ze(this.stream.parseStringUTF(t, t + n), e);
|
|
4032
4016
|
case 18:
|
|
4033
4017
|
case 19:
|
|
4034
4018
|
case 20:
|
|
4035
4019
|
case 21:
|
|
4036
4020
|
case 22:
|
|
4037
|
-
case 26: return
|
|
4038
|
-
case 30: return
|
|
4021
|
+
case 26: return ze(this.stream.parseStringISO(t, t + n), e);
|
|
4022
|
+
case 30: return ze(this.stream.parseStringBMP(t, t + n), e);
|
|
4039
4023
|
case 23:
|
|
4040
4024
|
case 24: return this.stream.parseTime(t, t + n, this.tag.tagNumber == 23);
|
|
4041
4025
|
}
|
|
@@ -4070,7 +4054,7 @@ var Ue = function() {
|
|
|
4070
4054
|
var e = this.toHexString(), t = this.header * 2, n = this.length * 2;
|
|
4071
4055
|
return e.substring(t, t + n);
|
|
4072
4056
|
}, e.decode = function(t) {
|
|
4073
|
-
var n = t instanceof
|
|
4057
|
+
var n = t instanceof Be ? t : new Be(t, 0), r = new Be(n), i = new He(n), a = e.decodeLength(n), o = n.pos, s = o - r.pos, c = null, l = function() {
|
|
4074
4058
|
var t = [];
|
|
4075
4059
|
if (a !== null) {
|
|
4076
4060
|
for (var r = o + a; n.pos < r;) t[t.length] = e.decode(n);
|
|
@@ -4101,11 +4085,11 @@ var Ue = function() {
|
|
|
4101
4085
|
}
|
|
4102
4086
|
return new e(r, s, a, i, c);
|
|
4103
4087
|
}, e;
|
|
4104
|
-
}(),
|
|
4088
|
+
}(), He = function() {
|
|
4105
4089
|
function e(e) {
|
|
4106
4090
|
var t = e.get();
|
|
4107
4091
|
if (this.tagClass = t >> 6, this.tagConstructed = (t & 32) != 0, this.tagNumber = t & 31, this.tagNumber == 31) {
|
|
4108
|
-
var n = new
|
|
4092
|
+
var n = new Fe();
|
|
4109
4093
|
do
|
|
4110
4094
|
t = e.get(), n.mulAdd(128, t & 127);
|
|
4111
4095
|
while (t & 128);
|
|
@@ -4117,7 +4101,7 @@ var Ue = function() {
|
|
|
4117
4101
|
}, e.prototype.isEOC = function() {
|
|
4118
4102
|
return this.tagClass === 0 && this.tagNumber === 0;
|
|
4119
4103
|
}, e;
|
|
4120
|
-
}(),
|
|
4104
|
+
}(), Ue, We = !0, z = [
|
|
4121
4105
|
2,
|
|
4122
4106
|
3,
|
|
4123
4107
|
5,
|
|
@@ -4286,7 +4270,7 @@ var Ue = function() {
|
|
|
4286
4270
|
983,
|
|
4287
4271
|
991,
|
|
4288
4272
|
997
|
|
4289
|
-
],
|
|
4273
|
+
], Ge = (1 << 26) / z[z.length - 1], B = function() {
|
|
4290
4274
|
function e(e, t, n) {
|
|
4291
4275
|
e != null && (typeof e == "number" ? this.fromNumber(e, t, n) : t == null && typeof e != "string" ? this.fromString(e, 256) : this.fromString(e, t));
|
|
4292
4276
|
}
|
|
@@ -4300,10 +4284,10 @@ var Ue = function() {
|
|
|
4300
4284
|
else if (e == 4) t = 2;
|
|
4301
4285
|
else return this.toRadix(e);
|
|
4302
4286
|
var n = (1 << t) - 1, r, i = !1, a = "", o = this.t, s = this.DB - o * this.DB % t;
|
|
4303
|
-
if (o-- > 0) for (s < this.DB && (r = this[o] >> s) > 0 && (i = !0, a =
|
|
4287
|
+
if (o-- > 0) for (s < this.DB && (r = this[o] >> s) > 0 && (i = !0, a = ye(r)); o >= 0;) s < t ? (r = (this[o] & (1 << s) - 1) << t - s, r |= this[--o] >> (s += this.DB - t)) : (r = this[o] >> (s -= t) & n, s <= 0 && (s += this.DB, --o)), r > 0 && (i = !0), i && (a += ye(r));
|
|
4304
4288
|
return i ? a : "0";
|
|
4305
4289
|
}, e.prototype.negate = function() {
|
|
4306
|
-
var t =
|
|
4290
|
+
var t = V();
|
|
4307
4291
|
return e.ZERO.subTo(this, t), t;
|
|
4308
4292
|
}, e.prototype.abs = function() {
|
|
4309
4293
|
return this.s < 0 ? this.negate() : this;
|
|
@@ -4315,15 +4299,15 @@ var Ue = function() {
|
|
|
4315
4299
|
for (; --n >= 0;) if ((t = this[n] - e[n]) != 0) return t;
|
|
4316
4300
|
return 0;
|
|
4317
4301
|
}, e.prototype.bitLength = function() {
|
|
4318
|
-
return this.t <= 0 ? 0 : this.DB * (this.t - 1) +
|
|
4302
|
+
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + nt(this[this.t - 1] ^ this.s & this.DM);
|
|
4319
4303
|
}, e.prototype.mod = function(t) {
|
|
4320
|
-
var n =
|
|
4304
|
+
var n = V();
|
|
4321
4305
|
return this.abs().divRemTo(t, null, n), this.s < 0 && n.compareTo(e.ZERO) > 0 && t.subTo(n, n), n;
|
|
4322
4306
|
}, e.prototype.modPowInt = function(e, t) {
|
|
4323
|
-
var n = e < 256 || t.isEven() ? new
|
|
4307
|
+
var n = e < 256 || t.isEven() ? new qe(t) : new Je(t);
|
|
4324
4308
|
return this.exp(e, n);
|
|
4325
4309
|
}, e.prototype.clone = function() {
|
|
4326
|
-
var e =
|
|
4310
|
+
var e = V();
|
|
4327
4311
|
return this.copyTo(e), e;
|
|
4328
4312
|
}, e.prototype.intValue = function() {
|
|
4329
4313
|
if (this.s < 0) {
|
|
@@ -4351,70 +4335,70 @@ var Ue = function() {
|
|
|
4351
4335
|
}, e.prototype.max = function(e) {
|
|
4352
4336
|
return this.compareTo(e) > 0 ? this : e;
|
|
4353
4337
|
}, e.prototype.and = function(e) {
|
|
4354
|
-
var t =
|
|
4355
|
-
return this.bitwiseTo(e,
|
|
4338
|
+
var t = V();
|
|
4339
|
+
return this.bitwiseTo(e, be, t), t;
|
|
4356
4340
|
}, e.prototype.or = function(e) {
|
|
4357
|
-
var t =
|
|
4358
|
-
return this.bitwiseTo(e,
|
|
4341
|
+
var t = V();
|
|
4342
|
+
return this.bitwiseTo(e, xe, t), t;
|
|
4359
4343
|
}, e.prototype.xor = function(e) {
|
|
4360
|
-
var t =
|
|
4361
|
-
return this.bitwiseTo(e,
|
|
4344
|
+
var t = V();
|
|
4345
|
+
return this.bitwiseTo(e, Se, t), t;
|
|
4362
4346
|
}, e.prototype.andNot = function(e) {
|
|
4363
|
-
var t =
|
|
4364
|
-
return this.bitwiseTo(e,
|
|
4347
|
+
var t = V();
|
|
4348
|
+
return this.bitwiseTo(e, Ce, t), t;
|
|
4365
4349
|
}, e.prototype.not = function() {
|
|
4366
|
-
for (var e =
|
|
4350
|
+
for (var e = V(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
|
|
4367
4351
|
return e.t = this.t, e.s = ~this.s, e;
|
|
4368
4352
|
}, e.prototype.shiftLeft = function(e) {
|
|
4369
|
-
var t =
|
|
4353
|
+
var t = V();
|
|
4370
4354
|
return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
|
|
4371
4355
|
}, e.prototype.shiftRight = function(e) {
|
|
4372
|
-
var t =
|
|
4356
|
+
var t = V();
|
|
4373
4357
|
return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
|
|
4374
4358
|
}, e.prototype.getLowestSetBit = function() {
|
|
4375
|
-
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB +
|
|
4359
|
+
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + we(this[e]);
|
|
4376
4360
|
return this.s < 0 ? this.t * this.DB : -1;
|
|
4377
4361
|
}, e.prototype.bitCount = function() {
|
|
4378
|
-
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e +=
|
|
4362
|
+
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += Te(this[n] ^ t);
|
|
4379
4363
|
return e;
|
|
4380
4364
|
}, e.prototype.testBit = function(e) {
|
|
4381
4365
|
var t = Math.floor(e / this.DB);
|
|
4382
4366
|
return t >= this.t ? this.s != 0 : (this[t] & 1 << e % this.DB) != 0;
|
|
4383
4367
|
}, e.prototype.setBit = function(e) {
|
|
4384
|
-
return this.changeBit(e,
|
|
4368
|
+
return this.changeBit(e, xe);
|
|
4385
4369
|
}, e.prototype.clearBit = function(e) {
|
|
4386
|
-
return this.changeBit(e,
|
|
4370
|
+
return this.changeBit(e, Ce);
|
|
4387
4371
|
}, e.prototype.flipBit = function(e) {
|
|
4388
|
-
return this.changeBit(e,
|
|
4372
|
+
return this.changeBit(e, Se);
|
|
4389
4373
|
}, e.prototype.add = function(e) {
|
|
4390
|
-
var t =
|
|
4374
|
+
var t = V();
|
|
4391
4375
|
return this.addTo(e, t), t;
|
|
4392
4376
|
}, e.prototype.subtract = function(e) {
|
|
4393
|
-
var t =
|
|
4377
|
+
var t = V();
|
|
4394
4378
|
return this.subTo(e, t), t;
|
|
4395
4379
|
}, e.prototype.multiply = function(e) {
|
|
4396
|
-
var t =
|
|
4380
|
+
var t = V();
|
|
4397
4381
|
return this.multiplyTo(e, t), t;
|
|
4398
4382
|
}, e.prototype.divide = function(e) {
|
|
4399
|
-
var t =
|
|
4383
|
+
var t = V();
|
|
4400
4384
|
return this.divRemTo(e, t, null), t;
|
|
4401
4385
|
}, e.prototype.remainder = function(e) {
|
|
4402
|
-
var t =
|
|
4386
|
+
var t = V();
|
|
4403
4387
|
return this.divRemTo(e, null, t), t;
|
|
4404
4388
|
}, e.prototype.divideAndRemainder = function(e) {
|
|
4405
|
-
var t =
|
|
4389
|
+
var t = V(), n = V();
|
|
4406
4390
|
return this.divRemTo(e, t, n), [t, n];
|
|
4407
4391
|
}, e.prototype.modPow = function(e, t) {
|
|
4408
|
-
var n = e.bitLength(), r, i =
|
|
4392
|
+
var n = e.bitLength(), r, i = tt(1), a;
|
|
4409
4393
|
if (n <= 0) return i;
|
|
4410
|
-
r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new
|
|
4394
|
+
r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new qe(t) : t.isEven() ? new Ye(t) : new Je(t);
|
|
4411
4395
|
var o = [], s = 3, c = r - 1, l = (1 << r) - 1;
|
|
4412
4396
|
if (o[1] = a.convert(this), r > 1) {
|
|
4413
|
-
var u =
|
|
4414
|
-
for (a.sqrTo(o[1], u); s <= l;) o[s] =
|
|
4397
|
+
var u = V();
|
|
4398
|
+
for (a.sqrTo(o[1], u); s <= l;) o[s] = V(), a.mulTo(u, o[s - 2], o[s]), s += 2;
|
|
4415
4399
|
}
|
|
4416
|
-
var d = e.t - 1, f, p = !0, m =
|
|
4417
|
-
for (n =
|
|
4400
|
+
var d = e.t - 1, f, p = !0, m = V(), h;
|
|
4401
|
+
for (n = nt(e[d]) - 1; d >= 0;) {
|
|
4418
4402
|
for (n >= c ? f = e[d] >> n - c & l : (f = (e[d] & (1 << n + 1) - 1) << c - n, d > 0 && (f |= e[d - 1] >> this.DB + n - c)), s = r; !(f & 1);) f >>= 1, --s;
|
|
4419
4403
|
if ((n -= s) < 0 && (n += this.DB, --d), p) o[f].copyTo(i), p = !1;
|
|
4420
4404
|
else {
|
|
@@ -4427,7 +4411,7 @@ var Ue = function() {
|
|
|
4427
4411
|
}, e.prototype.modInverse = function(t) {
|
|
4428
4412
|
var n = t.isEven();
|
|
4429
4413
|
if (this.isEven() && n || t.signum() == 0) return e.ZERO;
|
|
4430
|
-
for (var r = t.clone(), i = this.clone(), a =
|
|
4414
|
+
for (var r = t.clone(), i = this.clone(), a = tt(1), o = tt(0), s = tt(0), c = tt(1); r.signum() != 0;) {
|
|
4431
4415
|
for (; r.isEven();) r.rShiftTo(1, r), n ? ((!a.isEven() || !o.isEven()) && (a.addTo(this, a), o.subTo(t, o)), a.rShiftTo(1, a)) : o.isEven() || o.subTo(t, o), o.rShiftTo(1, o);
|
|
4432
4416
|
for (; i.isEven();) i.rShiftTo(1, i), n ? ((!s.isEven() || !c.isEven()) && (s.addTo(this, s), c.subTo(t, c)), s.rShiftTo(1, s)) : c.isEven() || c.subTo(t, c), c.rShiftTo(1, c);
|
|
4433
4417
|
r.compareTo(i) >= 0 ? (r.subTo(i, r), n && a.subTo(s, a), o.subTo(c, o)) : (i.subTo(r, i), n && s.subTo(a, s), c.subTo(o, c));
|
|
@@ -4438,7 +4422,7 @@ var Ue = function() {
|
|
|
4438
4422
|
else return c;
|
|
4439
4423
|
return c.signum() < 0 ? c.add(t) : c;
|
|
4440
4424
|
}, e.prototype.pow = function(e) {
|
|
4441
|
-
return this.exp(e, new
|
|
4425
|
+
return this.exp(e, new Ke());
|
|
4442
4426
|
}, e.prototype.gcd = function(e) {
|
|
4443
4427
|
var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone();
|
|
4444
4428
|
if (t.compareTo(n) < 0) {
|
|
@@ -4451,14 +4435,14 @@ var Ue = function() {
|
|
|
4451
4435
|
return a > 0 && n.lShiftTo(a, n), n;
|
|
4452
4436
|
}, e.prototype.isProbablePrime = function(e) {
|
|
4453
4437
|
var t, n = this.abs();
|
|
4454
|
-
if (n.t == 1 && n[0] <=
|
|
4455
|
-
for (t = 0; t <
|
|
4438
|
+
if (n.t == 1 && n[0] <= z[z.length - 1]) {
|
|
4439
|
+
for (t = 0; t < z.length; ++t) if (n[0] == z[t]) return !0;
|
|
4456
4440
|
return !1;
|
|
4457
4441
|
}
|
|
4458
4442
|
if (n.isEven()) return !1;
|
|
4459
|
-
for (t = 1; t <
|
|
4460
|
-
for (var r =
|
|
4461
|
-
for (r = n.modInt(r); t < i;) if (r %
|
|
4443
|
+
for (t = 1; t < z.length;) {
|
|
4444
|
+
for (var r = z[t], i = t + 1; i < z.length && r < Ge;) r *= z[i++];
|
|
4445
|
+
for (r = n.modInt(r); t < i;) if (r % z[t++] == 0) return !1;
|
|
4462
4446
|
}
|
|
4463
4447
|
return n.millerRabin(e);
|
|
4464
4448
|
}, e.prototype.copyTo = function(e) {
|
|
@@ -4480,7 +4464,7 @@ var Ue = function() {
|
|
|
4480
4464
|
}
|
|
4481
4465
|
this.t = 0, this.s = 0;
|
|
4482
4466
|
for (var i = t.length, a = !1, o = 0; --i >= 0;) {
|
|
4483
|
-
var s = r == 8 ? t[i] & 255 :
|
|
4467
|
+
var s = r == 8 ? t[i] & 255 : et(t, i);
|
|
4484
4468
|
if (s < 0) {
|
|
4485
4469
|
t.charAt(i) == "-" && (a = !0);
|
|
4486
4470
|
continue;
|
|
@@ -4543,12 +4527,12 @@ var Ue = function() {
|
|
|
4543
4527
|
n?.fromInt(0), r != null && this.copyTo(r);
|
|
4544
4528
|
return;
|
|
4545
4529
|
}
|
|
4546
|
-
r ??=
|
|
4547
|
-
var o =
|
|
4530
|
+
r ??= V();
|
|
4531
|
+
var o = V(), s = this.s, c = t.s, l = this.DB - nt(i[i.t - 1]);
|
|
4548
4532
|
l > 0 ? (i.lShiftTo(l, o), a.lShiftTo(l, r)) : (i.copyTo(o), a.copyTo(r));
|
|
4549
4533
|
var u = o.t, d = o[u - 1];
|
|
4550
4534
|
if (d != 0) {
|
|
4551
|
-
var f = d * (1 << this.F1) + (u > 1 ? o[u - 2] >> this.F2 : 0), p = this.FV / f, m = (1 << this.F1) / f, h = 1 << this.F2, g = r.t, _ = g - u, v = n ??
|
|
4535
|
+
var f = d * (1 << this.F1) + (u > 1 ? o[u - 2] >> this.F2 : 0), p = this.FV / f, m = (1 << this.F1) / f, h = 1 << this.F2, g = r.t, _ = g - u, v = n ?? V();
|
|
4552
4536
|
for (o.dlShiftTo(_, v), r.compareTo(v) >= 0 && (r[r.t++] = 1, r.subTo(v, r)), e.ONE.dlShiftTo(u, v), v.subTo(o, o); o.t < u;) o[o.t++] = 0;
|
|
4553
4537
|
for (; --_ >= 0;) {
|
|
4554
4538
|
var y = r[--g] == d ? this.DM : Math.floor(r[g] * p + (r[g - 1] + h) * m);
|
|
@@ -4567,7 +4551,7 @@ var Ue = function() {
|
|
|
4567
4551
|
return (this.t > 0 ? this[0] & 1 : this.s) == 0;
|
|
4568
4552
|
}, e.prototype.exp = function(t, n) {
|
|
4569
4553
|
if (t > 4294967295 || t < 1) return e.ONE;
|
|
4570
|
-
var r =
|
|
4554
|
+
var r = V(), i = V(), a = n.convert(this), o = nt(t) - 1;
|
|
4571
4555
|
for (a.copyTo(r); --o >= 0;) if (n.sqrTo(r, i), (t & 1 << o) > 0) n.mulTo(i, a, r);
|
|
4572
4556
|
else {
|
|
4573
4557
|
var s = r;
|
|
@@ -4578,13 +4562,13 @@ var Ue = function() {
|
|
|
4578
4562
|
return Math.floor(Math.LN2 * this.DB / Math.log(e));
|
|
4579
4563
|
}, e.prototype.toRadix = function(e) {
|
|
4580
4564
|
if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
|
|
4581
|
-
var t = this.chunkSize(e), n = e ** +t, r =
|
|
4565
|
+
var t = this.chunkSize(e), n = e ** +t, r = tt(n), i = V(), a = V(), o = "";
|
|
4582
4566
|
for (this.divRemTo(r, i, a); i.signum() > 0;) o = (n + a.intValue()).toString(e).substring(1) + o, i.divRemTo(r, i, a);
|
|
4583
4567
|
return a.intValue().toString(e) + o;
|
|
4584
4568
|
}, e.prototype.fromRadix = function(t, n) {
|
|
4585
4569
|
this.fromInt(0), n ??= 10;
|
|
4586
4570
|
for (var r = this.chunkSize(n), i = n ** +r, a = !1, o = 0, s = 0, c = 0; c < t.length; ++c) {
|
|
4587
|
-
var l =
|
|
4571
|
+
var l = et(t, c);
|
|
4588
4572
|
if (l < 0) {
|
|
4589
4573
|
t.charAt(c) == "-" && this.signum() == 0 && (a = !0);
|
|
4590
4574
|
continue;
|
|
@@ -4594,7 +4578,7 @@ var Ue = function() {
|
|
|
4594
4578
|
o > 0 && (this.dMultiply(n ** +o), this.dAddOffset(s, 0)), a && e.ZERO.subTo(this, this);
|
|
4595
4579
|
}, e.prototype.fromNumber = function(t, n, r) {
|
|
4596
4580
|
if (typeof n == "number") if (t < 2) this.fromInt(1);
|
|
4597
|
-
else for (this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1),
|
|
4581
|
+
else for (this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), xe, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(n);) this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(e.ONE.shiftLeft(t - 1), this);
|
|
4598
4582
|
else {
|
|
4599
4583
|
var i = [], a = t & 7;
|
|
4600
4584
|
i.length = (t >> 3) + 1, n.nextBytes(i), a > 0 ? i[0] &= (1 << a) - 1 : i[0] = 0, this.fromString(i, 256);
|
|
@@ -4652,9 +4636,9 @@ var Ue = function() {
|
|
|
4652
4636
|
var n = this.subtract(e.ONE), r = n.getLowestSetBit();
|
|
4653
4637
|
if (r <= 0) return !1;
|
|
4654
4638
|
var i = n.shiftRight(r);
|
|
4655
|
-
t = t + 1 >> 1, t >
|
|
4656
|
-
for (var a =
|
|
4657
|
-
a.fromInt(
|
|
4639
|
+
t = t + 1 >> 1, t > z.length && (t = z.length);
|
|
4640
|
+
for (var a = V(), o = 0; o < t; ++o) {
|
|
4641
|
+
a.fromInt(z[Math.floor(Math.random() * z.length)]);
|
|
4658
4642
|
var s = a.modPow(i, this);
|
|
4659
4643
|
if (s.compareTo(e.ONE) != 0 && s.compareTo(n) != 0) {
|
|
4660
4644
|
for (var c = 1; c++ < r && s.compareTo(n) != 0;) if (s = s.modPowInt(2, this), s.compareTo(e.ONE) == 0) return !1;
|
|
@@ -4663,7 +4647,7 @@ var Ue = function() {
|
|
|
4663
4647
|
}
|
|
4664
4648
|
return !0;
|
|
4665
4649
|
}, e.prototype.square = function() {
|
|
4666
|
-
var e =
|
|
4650
|
+
var e = V();
|
|
4667
4651
|
return this.squareTo(e), e;
|
|
4668
4652
|
}, e.prototype.gcda = function(e, t) {
|
|
4669
4653
|
var n = this.s < 0 ? this.negate() : this.clone(), r = e.s < 0 ? e.negate() : e.clone();
|
|
@@ -4686,7 +4670,7 @@ var Ue = function() {
|
|
|
4686
4670
|
}, e.prototype.fromNumberAsync = function(t, n, r, i) {
|
|
4687
4671
|
if (typeof n == "number") if (t < 2) this.fromInt(1);
|
|
4688
4672
|
else {
|
|
4689
|
-
this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1),
|
|
4673
|
+
this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), xe, this), this.isEven() && this.dAddOffset(1, 0);
|
|
4690
4674
|
var a = this, o = function() {
|
|
4691
4675
|
a.dAddOffset(2, 0), a.bitLength() > t && a.subTo(e.ONE.shiftLeft(t - 1), a), a.isProbablePrime(n) ? setTimeout(function() {
|
|
4692
4676
|
i();
|
|
@@ -4699,7 +4683,7 @@ var Ue = function() {
|
|
|
4699
4683
|
s.length = (t >> 3) + 1, n.nextBytes(s), c > 0 ? s[0] &= (1 << c) - 1 : s[0] = 0, this.fromString(s, 256);
|
|
4700
4684
|
}
|
|
4701
4685
|
}, e;
|
|
4702
|
-
}(),
|
|
4686
|
+
}(), Ke = function() {
|
|
4703
4687
|
function e() {}
|
|
4704
4688
|
return e.prototype.convert = function(e) {
|
|
4705
4689
|
return e;
|
|
@@ -4710,7 +4694,7 @@ var Ue = function() {
|
|
|
4710
4694
|
}, e.prototype.sqrTo = function(e, t) {
|
|
4711
4695
|
e.squareTo(t);
|
|
4712
4696
|
}, e;
|
|
4713
|
-
}(),
|
|
4697
|
+
}(), qe = function() {
|
|
4714
4698
|
function e(e) {
|
|
4715
4699
|
this.m = e;
|
|
4716
4700
|
}
|
|
@@ -4725,15 +4709,15 @@ var Ue = function() {
|
|
|
4725
4709
|
}, e.prototype.sqrTo = function(e, t) {
|
|
4726
4710
|
e.squareTo(t), this.reduce(t);
|
|
4727
4711
|
}, e;
|
|
4728
|
-
}(),
|
|
4712
|
+
}(), Je = function() {
|
|
4729
4713
|
function e(e) {
|
|
4730
4714
|
this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
|
|
4731
4715
|
}
|
|
4732
4716
|
return e.prototype.convert = function(e) {
|
|
4733
|
-
var t =
|
|
4734
|
-
return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(
|
|
4717
|
+
var t = V();
|
|
4718
|
+
return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(B.ZERO) > 0 && this.m.subTo(t, t), t;
|
|
4735
4719
|
}, e.prototype.revert = function(e) {
|
|
4736
|
-
var t =
|
|
4720
|
+
var t = V();
|
|
4737
4721
|
return e.copyTo(t), this.reduce(t), t;
|
|
4738
4722
|
}, e.prototype.reduce = function(e) {
|
|
4739
4723
|
for (; e.t <= this.mt2;) e[e.t++] = 0;
|
|
@@ -4747,14 +4731,14 @@ var Ue = function() {
|
|
|
4747
4731
|
}, e.prototype.sqrTo = function(e, t) {
|
|
4748
4732
|
e.squareTo(t), this.reduce(t);
|
|
4749
4733
|
}, e;
|
|
4750
|
-
}(),
|
|
4734
|
+
}(), Ye = function() {
|
|
4751
4735
|
function e(e) {
|
|
4752
|
-
this.m = e, this.r2 =
|
|
4736
|
+
this.m = e, this.r2 = V(), this.q3 = V(), B.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e);
|
|
4753
4737
|
}
|
|
4754
4738
|
return e.prototype.convert = function(e) {
|
|
4755
4739
|
if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
|
|
4756
4740
|
if (e.compareTo(this.m) < 0) return e;
|
|
4757
|
-
var t =
|
|
4741
|
+
var t = V();
|
|
4758
4742
|
return e.copyTo(t), this.reduce(t), t;
|
|
4759
4743
|
}, e.prototype.revert = function(e) {
|
|
4760
4744
|
return e;
|
|
@@ -4767,53 +4751,53 @@ var Ue = function() {
|
|
|
4767
4751
|
e.squareTo(t), this.reduce(t);
|
|
4768
4752
|
}, e;
|
|
4769
4753
|
}();
|
|
4770
|
-
function
|
|
4771
|
-
return new
|
|
4754
|
+
function V() {
|
|
4755
|
+
return new B(null);
|
|
4772
4756
|
}
|
|
4773
|
-
function
|
|
4774
|
-
return new
|
|
4757
|
+
function H(e, t) {
|
|
4758
|
+
return new B(e, t);
|
|
4775
4759
|
}
|
|
4776
|
-
var
|
|
4777
|
-
|
|
4760
|
+
var Xe = typeof navigator < "u";
|
|
4761
|
+
Xe && We && navigator.appName == "Microsoft Internet Explorer" ? (B.prototype.am = function(e, t, n, r, i, a) {
|
|
4778
4762
|
for (var o = t & 32767, s = t >> 15; --a >= 0;) {
|
|
4779
4763
|
var c = this[e] & 32767, l = this[e++] >> 15, u = s * c + l * o;
|
|
4780
4764
|
c = o * c + ((u & 32767) << 15) + n[r] + (i & 1073741823), i = (c >>> 30) + (u >>> 15) + s * l + (i >>> 30), n[r++] = c & 1073741823;
|
|
4781
4765
|
}
|
|
4782
4766
|
return i;
|
|
4783
|
-
},
|
|
4767
|
+
}, Ue = 30) : Xe && We && navigator.appName != "Netscape" ? (B.prototype.am = function(e, t, n, r, i, a) {
|
|
4784
4768
|
for (; --a >= 0;) {
|
|
4785
4769
|
var o = t * this[e++] + n[r] + i;
|
|
4786
4770
|
i = Math.floor(o / 67108864), n[r++] = o & 67108863;
|
|
4787
4771
|
}
|
|
4788
4772
|
return i;
|
|
4789
|
-
},
|
|
4773
|
+
}, Ue = 26) : (B.prototype.am = function(e, t, n, r, i, a) {
|
|
4790
4774
|
for (var o = t & 16383, s = t >> 14; --a >= 0;) {
|
|
4791
4775
|
var c = this[e] & 16383, l = this[e++] >> 14, u = s * c + l * o;
|
|
4792
4776
|
c = o * c + ((u & 16383) << 14) + n[r] + i, i = (c >> 28) + (u >> 14) + s * l, n[r++] = c & 268435455;
|
|
4793
4777
|
}
|
|
4794
4778
|
return i;
|
|
4795
|
-
},
|
|
4796
|
-
var
|
|
4797
|
-
|
|
4798
|
-
var
|
|
4799
|
-
for (
|
|
4800
|
-
for (
|
|
4801
|
-
for (
|
|
4802
|
-
function
|
|
4803
|
-
return
|
|
4779
|
+
}, Ue = 28), B.prototype.DB = Ue, B.prototype.DM = (1 << Ue) - 1, B.prototype.DV = 1 << Ue;
|
|
4780
|
+
var Ze = 52;
|
|
4781
|
+
B.prototype.FV = 2 ** Ze, B.prototype.F1 = Ze - Ue, B.prototype.F2 = 2 * Ue - Ze;
|
|
4782
|
+
var Qe = [], $e = 48, U;
|
|
4783
|
+
for (U = 0; U <= 9; ++U) Qe[$e++] = U;
|
|
4784
|
+
for ($e = 97, U = 10; U < 36; ++U) Qe[$e++] = U;
|
|
4785
|
+
for ($e = 65, U = 10; U < 36; ++U) Qe[$e++] = U;
|
|
4786
|
+
function et(e, t) {
|
|
4787
|
+
return Qe[e.charCodeAt(t)] ?? -1;
|
|
4804
4788
|
}
|
|
4805
|
-
function
|
|
4806
|
-
var t =
|
|
4789
|
+
function tt(e) {
|
|
4790
|
+
var t = V();
|
|
4807
4791
|
return t.fromInt(e), t;
|
|
4808
4792
|
}
|
|
4809
|
-
function
|
|
4793
|
+
function nt(e) {
|
|
4810
4794
|
var t = 1, n;
|
|
4811
4795
|
return (n = e >>> 16) != 0 && (e = n, t += 16), (n = e >> 8) != 0 && (e = n, t += 8), (n = e >> 4) != 0 && (e = n, t += 4), (n = e >> 2) != 0 && (e = n, t += 2), (n = e >> 1) != 0 && (e = n, t += 1), t;
|
|
4812
4796
|
}
|
|
4813
|
-
|
|
4797
|
+
B.ZERO = tt(0), B.ONE = tt(1);
|
|
4814
4798
|
//#endregion
|
|
4815
4799
|
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/prng4.js
|
|
4816
|
-
var
|
|
4800
|
+
var rt = function() {
|
|
4817
4801
|
function e() {
|
|
4818
4802
|
this.i = 0, this.j = 0, this.S = [];
|
|
4819
4803
|
}
|
|
@@ -4827,94 +4811,94 @@ var ot = function() {
|
|
|
4827
4811
|
return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, e = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = e, this.S[e + this.S[this.i] & 255];
|
|
4828
4812
|
}, e;
|
|
4829
4813
|
}();
|
|
4830
|
-
function
|
|
4831
|
-
return new
|
|
4814
|
+
function it() {
|
|
4815
|
+
return new rt();
|
|
4832
4816
|
}
|
|
4833
4817
|
//#endregion
|
|
4834
4818
|
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/rng.js
|
|
4835
|
-
var
|
|
4836
|
-
if (
|
|
4837
|
-
|
|
4838
|
-
var
|
|
4819
|
+
var at, W = null, ot;
|
|
4820
|
+
if (W == null) {
|
|
4821
|
+
W = [], ot = 0;
|
|
4822
|
+
var st = void 0;
|
|
4839
4823
|
if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
|
|
4840
|
-
var
|
|
4841
|
-
for (self.crypto.getRandomValues(
|
|
4824
|
+
var ct = new Uint32Array(256);
|
|
4825
|
+
for (self.crypto.getRandomValues(ct), st = 0; st < ct.length; ++st) W[ot++] = ct[st] & 255;
|
|
4842
4826
|
}
|
|
4843
|
-
var
|
|
4844
|
-
if (
|
|
4845
|
-
self.removeEventListener ? self.removeEventListener("mousemove",
|
|
4827
|
+
var lt = 0, ut = function(e) {
|
|
4828
|
+
if (lt ||= 0, lt >= 256 || ot >= 256) {
|
|
4829
|
+
self.removeEventListener ? self.removeEventListener("mousemove", ut, !1) : self.detachEvent && self.detachEvent("onmousemove", ut);
|
|
4846
4830
|
return;
|
|
4847
4831
|
}
|
|
4848
4832
|
try {
|
|
4849
4833
|
var t = e.x + e.y;
|
|
4850
|
-
|
|
4834
|
+
W[ot++] = t & 255, lt += 1;
|
|
4851
4835
|
} catch {}
|
|
4852
4836
|
};
|
|
4853
|
-
typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove",
|
|
4837
|
+
typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", ut, !1) : self.attachEvent && self.attachEvent("onmousemove", ut));
|
|
4854
4838
|
}
|
|
4855
|
-
function
|
|
4856
|
-
if (
|
|
4857
|
-
for (
|
|
4839
|
+
function dt() {
|
|
4840
|
+
if (at == null) {
|
|
4841
|
+
for (at = it(); ot < 256;) {
|
|
4858
4842
|
var e = Math.floor(65536 * Math.random());
|
|
4859
|
-
|
|
4843
|
+
W[ot++] = e & 255;
|
|
4860
4844
|
}
|
|
4861
|
-
for (
|
|
4862
|
-
|
|
4845
|
+
for (at.init(W), ot = 0; ot < W.length; ++ot) W[ot] = 0;
|
|
4846
|
+
ot = 0;
|
|
4863
4847
|
}
|
|
4864
|
-
return
|
|
4848
|
+
return at.next();
|
|
4865
4849
|
}
|
|
4866
|
-
var
|
|
4850
|
+
var ft = function() {
|
|
4867
4851
|
function e() {}
|
|
4868
4852
|
return e.prototype.nextBytes = function(e) {
|
|
4869
|
-
for (var t = 0; t < e.length; ++t) e[t] =
|
|
4853
|
+
for (var t = 0; t < e.length; ++t) e[t] = dt();
|
|
4870
4854
|
}, e;
|
|
4871
4855
|
}();
|
|
4872
4856
|
//#endregion
|
|
4873
4857
|
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/sha256.js
|
|
4874
|
-
function
|
|
4875
|
-
return
|
|
4858
|
+
function pt(e) {
|
|
4859
|
+
return ht(Ct(G(e), e.length * 8));
|
|
4876
4860
|
}
|
|
4877
|
-
function
|
|
4861
|
+
function mt(e) {
|
|
4878
4862
|
for (var t = "0123456789abcdef", n = "", r = 0; r < e.length; r++) {
|
|
4879
4863
|
var i = e.charCodeAt(r);
|
|
4880
4864
|
n += t.charAt(i >>> 4 & 15) + t.charAt(i & 15);
|
|
4881
4865
|
}
|
|
4882
4866
|
return n;
|
|
4883
4867
|
}
|
|
4884
|
-
function
|
|
4868
|
+
function G(e) {
|
|
4885
4869
|
for (var t = Array(e.length >> 2), n = 0; n < t.length; n++) t[n] = 0;
|
|
4886
4870
|
for (var n = 0; n < e.length * 8; n += 8) t[n >> 5] |= (e.charCodeAt(n / 8) & 255) << 24 - n % 32;
|
|
4887
4871
|
return t;
|
|
4888
4872
|
}
|
|
4889
|
-
function
|
|
4873
|
+
function ht(e) {
|
|
4890
4874
|
for (var t = "", n = 0; n < e.length * 32; n += 8) t += String.fromCharCode(e[n >> 5] >>> 24 - n % 32 & 255);
|
|
4891
4875
|
return t;
|
|
4892
4876
|
}
|
|
4893
|
-
function
|
|
4877
|
+
function gt(e, t) {
|
|
4894
4878
|
return e >>> t | e << 32 - t;
|
|
4895
4879
|
}
|
|
4896
|
-
function
|
|
4880
|
+
function _t(e, t) {
|
|
4897
4881
|
return e >>> t;
|
|
4898
4882
|
}
|
|
4899
|
-
function
|
|
4883
|
+
function vt(e, t, n) {
|
|
4900
4884
|
return e & t ^ ~e & n;
|
|
4901
4885
|
}
|
|
4902
|
-
function
|
|
4886
|
+
function K(e, t, n) {
|
|
4903
4887
|
return e & t ^ e & n ^ t & n;
|
|
4904
4888
|
}
|
|
4905
|
-
function
|
|
4906
|
-
return
|
|
4889
|
+
function q(e) {
|
|
4890
|
+
return gt(e, 2) ^ gt(e, 13) ^ gt(e, 22);
|
|
4907
4891
|
}
|
|
4908
|
-
function
|
|
4909
|
-
return
|
|
4892
|
+
function yt(e) {
|
|
4893
|
+
return gt(e, 6) ^ gt(e, 11) ^ gt(e, 25);
|
|
4910
4894
|
}
|
|
4911
|
-
function
|
|
4912
|
-
return
|
|
4895
|
+
function bt(e) {
|
|
4896
|
+
return gt(e, 7) ^ gt(e, 18) ^ _t(e, 3);
|
|
4913
4897
|
}
|
|
4914
|
-
function
|
|
4915
|
-
return
|
|
4898
|
+
function xt(e) {
|
|
4899
|
+
return gt(e, 17) ^ gt(e, 19) ^ _t(e, 10);
|
|
4916
4900
|
}
|
|
4917
|
-
var
|
|
4901
|
+
var St = [
|
|
4918
4902
|
1116352408,
|
|
4919
4903
|
1899447441,
|
|
4920
4904
|
-1245643825,
|
|
@@ -4980,7 +4964,7 @@ var Dt = [
|
|
|
4980
4964
|
-1090935817,
|
|
4981
4965
|
-965641998
|
|
4982
4966
|
];
|
|
4983
|
-
function
|
|
4967
|
+
function Ct(e, t) {
|
|
4984
4968
|
var n = [
|
|
4985
4969
|
1779033703,
|
|
4986
4970
|
-1150833019,
|
|
@@ -4992,7 +4976,7 @@ function Ot(e, t) {
|
|
|
4992
4976
|
1541459225
|
|
4993
4977
|
], r = Array(64), i, a, o, s, c, l, u, d, f, p, m, h;
|
|
4994
4978
|
for (e[t >> 5] |= 128 << 24 - t % 32, e[(t + 64 >> 9 << 4) + 15] = t, f = 0; f < e.length; f += 16) {
|
|
4995
|
-
for (i = n[0], a = n[1], o = n[2], s = n[3], c = n[4], l = n[5], u = n[6], d = n[7], p = 0; p < 64; p++) p < 16 ? r[p] = e[p + f] : r[p] = J(J(J(
|
|
4979
|
+
for (i = n[0], a = n[1], o = n[2], s = n[3], c = n[4], l = n[5], u = n[6], d = n[7], p = 0; p < 64; p++) p < 16 ? r[p] = e[p + f] : r[p] = J(J(J(xt(r[p - 2]), r[p - 7]), bt(r[p - 15])), r[p - 16]), m = J(J(J(J(d, yt(c)), vt(c, l, u)), St[p]), r[p]), h = J(q(i), K(i, a, o)), d = u, u = l, l = c, c = J(s, m), s = o, o = a, a = i, i = J(m, h);
|
|
4996
4980
|
n[0] = J(i, n[0]), n[1] = J(a, n[1]), n[2] = J(o, n[2]), n[3] = J(s, n[3]), n[4] = J(c, n[4]), n[5] = J(l, n[5]), n[6] = J(u, n[6]), n[7] = J(d, n[7]);
|
|
4997
4981
|
}
|
|
4998
4982
|
return n;
|
|
@@ -5003,25 +4987,25 @@ function J(e, t) {
|
|
|
5003
4987
|
}
|
|
5004
4988
|
//#endregion
|
|
5005
4989
|
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/rsa.js
|
|
5006
|
-
function
|
|
4990
|
+
function wt(e, t) {
|
|
5007
4991
|
if (t < e.length + 22) return console.error("Message too long for RSA"), null;
|
|
5008
4992
|
for (var n = t - e.length - 6, r = "", i = 0; i < n; i += 2) r += "ff";
|
|
5009
|
-
return
|
|
4993
|
+
return H("0001" + r + "00" + e, 16);
|
|
5010
4994
|
}
|
|
5011
|
-
function
|
|
4995
|
+
function Tt(e, t) {
|
|
5012
4996
|
if (t < e.length + 11) return console.error("Message too long for RSA"), null;
|
|
5013
4997
|
for (var n = [], r = e.length - 1; r >= 0 && t > 0;) {
|
|
5014
4998
|
var i = e.charCodeAt(r--);
|
|
5015
4999
|
i < 128 ? n[--t] = i : i > 127 && i < 2048 ? (n[--t] = i & 63 | 128, n[--t] = i >> 6 | 192) : (n[--t] = i & 63 | 128, n[--t] = i >> 6 & 63 | 128, n[--t] = i >> 12 | 224);
|
|
5016
5000
|
}
|
|
5017
5001
|
n[--t] = 0;
|
|
5018
|
-
for (var a = new
|
|
5002
|
+
for (var a = new ft(), o = []; t > 2;) {
|
|
5019
5003
|
for (o[0] = 0; o[0] == 0;) a.nextBytes(o);
|
|
5020
5004
|
n[--t] = o[0];
|
|
5021
5005
|
}
|
|
5022
|
-
return n[--t] = 2, n[--t] = 0, new
|
|
5006
|
+
return n[--t] = 2, n[--t] = 0, new B(n);
|
|
5023
5007
|
}
|
|
5024
|
-
function
|
|
5008
|
+
function Et(e, t, n) {
|
|
5025
5009
|
for (var r = "", i = 0; r.length < t;) r += n(String.fromCharCode.apply(String, e.concat([
|
|
5026
5010
|
(i & 4278190080) >> 24,
|
|
5027
5011
|
(i & 16711680) >> 16,
|
|
@@ -5030,21 +5014,21 @@ function jt(e, t, n) {
|
|
|
5030
5014
|
]))), i += 1;
|
|
5031
5015
|
return r;
|
|
5032
5016
|
}
|
|
5033
|
-
var
|
|
5034
|
-
function
|
|
5035
|
-
var n =
|
|
5017
|
+
var Dt = 32;
|
|
5018
|
+
function Ot(e, t) {
|
|
5019
|
+
var n = Dt, r = pt;
|
|
5036
5020
|
if (e.length + 2 * n + 2 > t) throw "Message too long for RSA";
|
|
5037
5021
|
var i = "", a;
|
|
5038
5022
|
for (a = 0; a < t - e.length - 2 * n - 2; a += 1) i += "\0";
|
|
5039
5023
|
var o = r("") + i + "" + e, s = Array(n);
|
|
5040
|
-
new
|
|
5041
|
-
var c =
|
|
5024
|
+
new ft().nextBytes(s);
|
|
5025
|
+
var c = Et(s, o.length, r), l = [];
|
|
5042
5026
|
for (a = 0; a < o.length; a += 1) l[a] = o.charCodeAt(a) ^ c.charCodeAt(a);
|
|
5043
|
-
var u =
|
|
5027
|
+
var u = Et(l, s.length, r), d = [0];
|
|
5044
5028
|
for (a = 0; a < s.length; a += 1) d[a + 1] = s[a] ^ u.charCodeAt(a);
|
|
5045
|
-
return new
|
|
5029
|
+
return new B(d.concat(l));
|
|
5046
5030
|
}
|
|
5047
|
-
var
|
|
5031
|
+
var kt = function() {
|
|
5048
5032
|
function e() {
|
|
5049
5033
|
this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
|
|
5050
5034
|
}
|
|
@@ -5055,9 +5039,9 @@ var Pt = function() {
|
|
|
5055
5039
|
for (var t = e.mod(this.p).modPow(this.dmp1, this.p), n = e.mod(this.q).modPow(this.dmq1, this.q); t.compareTo(n) < 0;) t = t.add(this.p);
|
|
5056
5040
|
return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
|
|
5057
5041
|
}, e.prototype.setPublic = function(e, t) {
|
|
5058
|
-
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n =
|
|
5042
|
+
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = H(e, 16), this.e = parseInt(t, 16)) : console.error("Invalid RSA public key");
|
|
5059
5043
|
}, e.prototype.encrypt = function(e, t) {
|
|
5060
|
-
t === void 0 && (t =
|
|
5044
|
+
t === void 0 && (t = Tt);
|
|
5061
5045
|
var n = this.n.bitLength() + 7 >> 3, r = t(e, n);
|
|
5062
5046
|
if (r == null) return null;
|
|
5063
5047
|
var i = this.doPublic(r);
|
|
@@ -5065,51 +5049,51 @@ var Pt = function() {
|
|
|
5065
5049
|
for (var a = i.toString(16), o = a.length, s = 0; s < n * 2 - o; s++) a = "0" + a;
|
|
5066
5050
|
return a;
|
|
5067
5051
|
}, e.prototype.setPrivate = function(e, t, n) {
|
|
5068
|
-
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n =
|
|
5052
|
+
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = H(e, 16), this.e = parseInt(t, 16), this.d = H(n, 16)) : console.error("Invalid RSA private key");
|
|
5069
5053
|
}, e.prototype.setPrivateEx = function(e, t, n, r, i, a, o, s) {
|
|
5070
|
-
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n =
|
|
5054
|
+
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = H(e, 16), this.e = parseInt(t, 16), this.d = H(n, 16), this.p = H(r, 16), this.q = H(i, 16), this.dmp1 = H(a, 16), this.dmq1 = H(o, 16), this.coeff = H(s, 16)) : console.error("Invalid RSA private key");
|
|
5071
5055
|
}, e.prototype.generate = function(e, t) {
|
|
5072
|
-
var n = new
|
|
5056
|
+
var n = new ft(), r = e >> 1;
|
|
5073
5057
|
this.e = parseInt(t, 16);
|
|
5074
|
-
for (var i = new
|
|
5075
|
-
for (; this.p = new
|
|
5076
|
-
for (; this.q = new
|
|
5058
|
+
for (var i = new B(t, 16);;) {
|
|
5059
|
+
for (; this.p = new B(e - r, 1, n), !(this.p.subtract(B.ONE).gcd(i).compareTo(B.ONE) == 0 && this.p.isProbablePrime(10)););
|
|
5060
|
+
for (; this.q = new B(r, 1, n), !(this.q.subtract(B.ONE).gcd(i).compareTo(B.ONE) == 0 && this.q.isProbablePrime(10)););
|
|
5077
5061
|
if (this.p.compareTo(this.q) <= 0) {
|
|
5078
5062
|
var a = this.p;
|
|
5079
5063
|
this.p = this.q, this.q = a;
|
|
5080
5064
|
}
|
|
5081
|
-
var o = this.p.subtract(
|
|
5082
|
-
if (c.gcd(i).compareTo(
|
|
5065
|
+
var o = this.p.subtract(B.ONE), s = this.q.subtract(B.ONE), c = o.multiply(s);
|
|
5066
|
+
if (c.gcd(i).compareTo(B.ONE) == 0) {
|
|
5083
5067
|
this.n = this.p.multiply(this.q), this.d = i.modInverse(c), this.dmp1 = this.d.mod(o), this.dmq1 = this.d.mod(s), this.coeff = this.q.modInverse(this.p);
|
|
5084
5068
|
break;
|
|
5085
5069
|
}
|
|
5086
5070
|
}
|
|
5087
5071
|
}, e.prototype.decrypt = function(e) {
|
|
5088
|
-
var t =
|
|
5089
|
-
return n == null ? null :
|
|
5072
|
+
var t = H(e, 16), n = this.doPrivate(t);
|
|
5073
|
+
return n == null ? null : At(n, this.n.bitLength() + 7 >> 3);
|
|
5090
5074
|
}, e.prototype.generateAsync = function(e, t, n) {
|
|
5091
|
-
var r = new
|
|
5075
|
+
var r = new ft(), i = e >> 1;
|
|
5092
5076
|
this.e = parseInt(t, 16);
|
|
5093
|
-
var a = new
|
|
5077
|
+
var a = new B(t, 16), o = this, s = function() {
|
|
5094
5078
|
var t = function() {
|
|
5095
5079
|
if (o.p.compareTo(o.q) <= 0) {
|
|
5096
5080
|
var e = o.p;
|
|
5097
5081
|
o.p = o.q, o.q = e;
|
|
5098
5082
|
}
|
|
5099
|
-
var t = o.p.subtract(
|
|
5100
|
-
i.gcd(a).compareTo(
|
|
5083
|
+
var t = o.p.subtract(B.ONE), r = o.q.subtract(B.ONE), i = t.multiply(r);
|
|
5084
|
+
i.gcd(a).compareTo(B.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(i), o.dmp1 = o.d.mod(t), o.dmq1 = o.d.mod(r), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
|
|
5101
5085
|
n();
|
|
5102
5086
|
}, 0)) : setTimeout(s, 0);
|
|
5103
5087
|
}, c = function() {
|
|
5104
|
-
o.q =
|
|
5105
|
-
o.q.subtract(
|
|
5106
|
-
e.compareTo(
|
|
5088
|
+
o.q = V(), o.q.fromNumberAsync(i, 1, r, function() {
|
|
5089
|
+
o.q.subtract(B.ONE).gcda(a, function(e) {
|
|
5090
|
+
e.compareTo(B.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(t, 0) : setTimeout(c, 0);
|
|
5107
5091
|
});
|
|
5108
5092
|
});
|
|
5109
5093
|
}, l = function() {
|
|
5110
|
-
o.p =
|
|
5111
|
-
o.p.subtract(
|
|
5112
|
-
e.compareTo(
|
|
5094
|
+
o.p = V(), o.p.fromNumberAsync(e - i, 1, r, function() {
|
|
5095
|
+
o.p.subtract(B.ONE).gcda(a, function(e) {
|
|
5096
|
+
e.compareTo(B.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(c, 0) : setTimeout(l, 0);
|
|
5113
5097
|
});
|
|
5114
5098
|
});
|
|
5115
5099
|
};
|
|
@@ -5117,18 +5101,18 @@ var Pt = function() {
|
|
|
5117
5101
|
};
|
|
5118
5102
|
setTimeout(s, 0);
|
|
5119
5103
|
}, e.prototype.sign = function(e, t, n) {
|
|
5120
|
-
var r =
|
|
5104
|
+
var r = Mt(n) + t(e).toString(), i = this.n.bitLength() / 4, a = wt(r, i);
|
|
5121
5105
|
if (a == null) return null;
|
|
5122
5106
|
var o = this.doPrivate(a);
|
|
5123
5107
|
if (o == null) return null;
|
|
5124
5108
|
for (var s = o.toString(16), c = s.length, l = 0; l < i - c; l++) s = "0" + s;
|
|
5125
5109
|
return s;
|
|
5126
5110
|
}, e.prototype.verify = function(e, t, n) {
|
|
5127
|
-
var r =
|
|
5128
|
-
return i == null ? null :
|
|
5111
|
+
var r = H(t, 16), i = this.doPublic(r);
|
|
5112
|
+
return i == null ? null : Nt(i.toString(16).replace(/^1f+00/, "")) == n(e).toString();
|
|
5129
5113
|
}, e;
|
|
5130
5114
|
}();
|
|
5131
|
-
function
|
|
5115
|
+
function At(e, t) {
|
|
5132
5116
|
for (var n = e.toByteArray(), r = 0; r < n.length && n[r] == 0;) ++r;
|
|
5133
5117
|
if (n.length - r != t - 1 || n[r] != 2) return null;
|
|
5134
5118
|
for (++r; n[r] != 0;) if (++r >= n.length) return null;
|
|
@@ -5138,7 +5122,7 @@ function Ft(e, t) {
|
|
|
5138
5122
|
}
|
|
5139
5123
|
return i;
|
|
5140
5124
|
}
|
|
5141
|
-
var
|
|
5125
|
+
var jt = {
|
|
5142
5126
|
md2: "3020300c06082a864886f70d020205000410",
|
|
5143
5127
|
md5: "3020300c06082a864886f70d020505000410",
|
|
5144
5128
|
sha1: "3021300906052b0e03021a05000414",
|
|
@@ -5148,12 +5132,12 @@ var It = {
|
|
|
5148
5132
|
sha512: "3051300d060960864801650304020305000440",
|
|
5149
5133
|
ripemd160: "3021300906052b2403020105000414"
|
|
5150
5134
|
};
|
|
5151
|
-
function
|
|
5152
|
-
return
|
|
5135
|
+
function Mt(e) {
|
|
5136
|
+
return jt[e] || "";
|
|
5153
5137
|
}
|
|
5154
|
-
function
|
|
5155
|
-
for (var t in
|
|
5156
|
-
var n =
|
|
5138
|
+
function Nt(e) {
|
|
5139
|
+
for (var t in jt) if (jt.hasOwnProperty(t)) {
|
|
5140
|
+
var n = jt[t], r = n.length;
|
|
5157
5141
|
if (e.substring(0, r) == n) return e.substring(r);
|
|
5158
5142
|
}
|
|
5159
5143
|
return e;
|
|
@@ -5189,7 +5173,7 @@ var X = {};
|
|
|
5189
5173
|
var n = t.substring(1).length;
|
|
5190
5174
|
n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
|
|
5191
5175
|
for (var r = "", i = 0; i < n; i++) r += "f";
|
|
5192
|
-
t = new
|
|
5176
|
+
t = new B(r, 16).xor(e).add(B.ONE).toString(16).replace(/^-/, "");
|
|
5193
5177
|
}
|
|
5194
5178
|
return t;
|
|
5195
5179
|
}, this.getPEMStringFromHex = function(e, t) {
|
|
@@ -5249,7 +5233,7 @@ var X = {};
|
|
|
5249
5233
|
for (var t = "", n = parseInt(e.substring(0, 2), 16), r = Math.floor(n / 40), i = n % 40, t = r + "." + i, a = "", o = 2; o < e.length; o += 2) {
|
|
5250
5234
|
var s = ("00000000" + parseInt(e.substring(o, o + 2), 16).toString(2)).slice(-8);
|
|
5251
5235
|
if (a += s.substring(1, 8), s.substring(0, 1) == "0") {
|
|
5252
|
-
var c = new
|
|
5236
|
+
var c = new B(a, 2);
|
|
5253
5237
|
t = t + "." + c.toString(10), a = "";
|
|
5254
5238
|
}
|
|
5255
5239
|
}
|
|
@@ -5259,7 +5243,7 @@ var X = {};
|
|
|
5259
5243
|
var t = e.toString(16);
|
|
5260
5244
|
return t.length == 1 && (t = "0" + t), t;
|
|
5261
5245
|
}, n = function(e) {
|
|
5262
|
-
var n = "", r = new
|
|
5246
|
+
var n = "", r = new B(e, 10).toString(2), i = 7 - r.length % 7;
|
|
5263
5247
|
i == 7 && (i = 0);
|
|
5264
5248
|
for (var a = "", o = 0; o < i; o++) a += "0";
|
|
5265
5249
|
r = a + r;
|
|
@@ -5340,7 +5324,7 @@ var X = {};
|
|
|
5340
5324
|
X.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(e) {
|
|
5341
5325
|
this.hTLV = null, this.isModified = !0, this.hV = X.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
|
|
5342
5326
|
}, this.setByInteger = function(e) {
|
|
5343
|
-
var t = new
|
|
5327
|
+
var t = new B(String(e), 10);
|
|
5344
5328
|
this.setByBigInteger(t);
|
|
5345
5329
|
}, this.setValueHex = function(e) {
|
|
5346
5330
|
this.hV = e;
|
|
@@ -5382,7 +5366,7 @@ var X = {};
|
|
|
5382
5366
|
var t = e.toString(16);
|
|
5383
5367
|
return t.length == 1 && (t = "0" + t), t;
|
|
5384
5368
|
}, n = function(e) {
|
|
5385
|
-
var n = "", r = new
|
|
5369
|
+
var n = "", r = new B(e, 10).toString(2), i = 7 - r.length % 7;
|
|
5386
5370
|
i == 7 && (i = 0);
|
|
5387
5371
|
for (var a = "", o = 0; o < i; o++) a += "0";
|
|
5388
5372
|
r = a + r;
|
|
@@ -5411,7 +5395,7 @@ var X = {};
|
|
|
5411
5395
|
X.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(e) {
|
|
5412
5396
|
this.hTLV = null, this.isModified = !0, this.hV = X.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
|
|
5413
5397
|
}, this.setByInteger = function(e) {
|
|
5414
|
-
var t = new
|
|
5398
|
+
var t = new B(String(e), 10);
|
|
5415
5399
|
this.setByBigInteger(t);
|
|
5416
5400
|
}, this.setValueHex = function(e) {
|
|
5417
5401
|
this.hV = e;
|
|
@@ -5465,7 +5449,7 @@ var X = {};
|
|
|
5465
5449
|
}, Y(X.asn1.DERTaggedObject, X.asn1.ASN1Object);
|
|
5466
5450
|
//#endregion
|
|
5467
5451
|
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/JSEncryptRSAKey.js
|
|
5468
|
-
var
|
|
5452
|
+
var Pt = (function() {
|
|
5469
5453
|
var e = function(t, n) {
|
|
5470
5454
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
5471
5455
|
e.__proto__ = t;
|
|
@@ -5481,20 +5465,20 @@ var zt = (function() {
|
|
|
5481
5465
|
}
|
|
5482
5466
|
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
5483
5467
|
};
|
|
5484
|
-
})(),
|
|
5485
|
-
|
|
5468
|
+
})(), Ft = function(e) {
|
|
5469
|
+
Pt(t, e);
|
|
5486
5470
|
function t(n) {
|
|
5487
5471
|
var r = e.call(this) || this;
|
|
5488
5472
|
return n && (typeof n == "string" ? r.parseKey(n) : (t.hasPrivateKeyProperty(n) || t.hasPublicKeyProperty(n)) && r.parsePropertiesFrom(n)), r;
|
|
5489
5473
|
}
|
|
5490
5474
|
return t.prototype.parseKey = function(e) {
|
|
5491
5475
|
try {
|
|
5492
|
-
var t = 0, n = 0, r = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e) ?
|
|
5493
|
-
if (i.sub.length === 3 && (i = i.sub[2].sub[0]), i.sub.length === 9) t = i.sub[1].getHexStringValue(), this.n =
|
|
5476
|
+
var t = 0, n = 0, r = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e) ? je.decode(e) : Ne.unarmor(e), i = Ve.decode(r);
|
|
5477
|
+
if (i.sub.length === 3 && (i = i.sub[2].sub[0]), i.sub.length === 9) t = i.sub[1].getHexStringValue(), this.n = H(t, 16), n = i.sub[2].getHexStringValue(), this.e = parseInt(n, 16), this.d = H(i.sub[3].getHexStringValue(), 16), this.p = H(i.sub[4].getHexStringValue(), 16), this.q = H(i.sub[5].getHexStringValue(), 16), this.dmp1 = H(i.sub[6].getHexStringValue(), 16), this.dmq1 = H(i.sub[7].getHexStringValue(), 16), this.coeff = H(i.sub[8].getHexStringValue(), 16);
|
|
5494
5478
|
else if (i.sub.length === 2) if (i.sub[0].sub) {
|
|
5495
5479
|
var a = i.sub[1].sub[0];
|
|
5496
|
-
t = a.sub[0].getHexStringValue(), this.n =
|
|
5497
|
-
} else t = i.sub[0].getHexStringValue(), this.n =
|
|
5480
|
+
t = a.sub[0].getHexStringValue(), this.n = H(t, 16), n = a.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
|
|
5481
|
+
} else t = i.sub[0].getHexStringValue(), this.n = H(t, 16), n = i.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
|
|
5498
5482
|
else return !1;
|
|
5499
5483
|
return !0;
|
|
5500
5484
|
} catch {
|
|
@@ -5514,12 +5498,12 @@ var zt = (function() {
|
|
|
5514
5498
|
] };
|
|
5515
5499
|
return new X.asn1.DERSequence(e).getEncodedHex();
|
|
5516
5500
|
}, t.prototype.getPrivateBaseKeyB64 = function() {
|
|
5517
|
-
return
|
|
5501
|
+
return Oe(this.getPrivateBaseKey());
|
|
5518
5502
|
}, t.prototype.getPublicBaseKey = function() {
|
|
5519
5503
|
var e = new X.asn1.DERSequence({ array: [new X.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }), new X.asn1.DERNull()] }), t = new X.asn1.DERSequence({ array: [new X.asn1.DERInteger({ bigint: this.n }), new X.asn1.DERInteger({ int: this.e })] }), n = new X.asn1.DERBitString({ hex: "00" + t.getEncodedHex() });
|
|
5520
5504
|
return new X.asn1.DERSequence({ array: [e, n] }).getEncodedHex();
|
|
5521
5505
|
}, t.prototype.getPublicBaseKeyB64 = function() {
|
|
5522
|
-
return
|
|
5506
|
+
return Oe(this.getPublicBaseKey());
|
|
5523
5507
|
}, t.wordwrap = function(e, t) {
|
|
5524
5508
|
if (t ||= 64, !e) return e;
|
|
5525
5509
|
var n = "(.{1," + t + "})( +|$\n?)|(.{1," + t + "})";
|
|
@@ -5537,31 +5521,31 @@ var zt = (function() {
|
|
|
5537
5521
|
}, t.prototype.parsePropertiesFrom = function(e) {
|
|
5538
5522
|
this.n = e.n, this.e = e.e, e.hasOwnProperty("d") && (this.d = e.d, this.p = e.p, this.q = e.q, this.dmp1 = e.dmp1, this.dmq1 = e.dmq1, this.coeff = e.coeff);
|
|
5539
5523
|
}, t;
|
|
5540
|
-
}(
|
|
5524
|
+
}(kt), It = typeof process < "u" ? process.env?.npm_package_version : void 0, Lt = function() {
|
|
5541
5525
|
function e(e) {
|
|
5542
5526
|
e === void 0 && (e = {}), this.default_key_size = e.default_key_size ? parseInt(e.default_key_size, 10) : 1024, this.default_public_exponent = e.default_public_exponent || "010001", this.log = e.log || !1, this.key = e.key || null;
|
|
5543
5527
|
}
|
|
5544
5528
|
return e.prototype.setKey = function(e) {
|
|
5545
|
-
e ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new
|
|
5529
|
+
e ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Ft(e)) : !this.key && this.log && console.error("A key was not set.");
|
|
5546
5530
|
}, e.prototype.setPrivateKey = function(e) {
|
|
5547
5531
|
this.setKey(e);
|
|
5548
5532
|
}, e.prototype.setPublicKey = function(e) {
|
|
5549
5533
|
this.setKey(e);
|
|
5550
5534
|
}, e.prototype.decrypt = function(e) {
|
|
5551
5535
|
try {
|
|
5552
|
-
return this.getKey().decrypt(
|
|
5536
|
+
return this.getKey().decrypt(ke(e));
|
|
5553
5537
|
} catch {
|
|
5554
5538
|
return !1;
|
|
5555
5539
|
}
|
|
5556
5540
|
}, e.prototype.encrypt = function(e) {
|
|
5557
5541
|
try {
|
|
5558
|
-
return
|
|
5542
|
+
return Oe(this.getKey().encrypt(e));
|
|
5559
5543
|
} catch {
|
|
5560
5544
|
return !1;
|
|
5561
5545
|
}
|
|
5562
5546
|
}, e.prototype.encryptOAEP = function(e) {
|
|
5563
5547
|
try {
|
|
5564
|
-
return
|
|
5548
|
+
return Oe(this.getKey().encrypt(e, Ot));
|
|
5565
5549
|
} catch {
|
|
5566
5550
|
return !1;
|
|
5567
5551
|
}
|
|
@@ -5570,30 +5554,30 @@ var zt = (function() {
|
|
|
5570
5554
|
return e;
|
|
5571
5555
|
}), n === void 0 && (n = "");
|
|
5572
5556
|
try {
|
|
5573
|
-
return
|
|
5557
|
+
return Oe(this.getKey().sign(e, t, n));
|
|
5574
5558
|
} catch {
|
|
5575
5559
|
return !1;
|
|
5576
5560
|
}
|
|
5577
5561
|
}, e.prototype.signSha256 = function(e) {
|
|
5578
5562
|
return this.sign(e, function(e) {
|
|
5579
|
-
return
|
|
5563
|
+
return mt(pt(e));
|
|
5580
5564
|
}, "sha256");
|
|
5581
5565
|
}, e.prototype.verify = function(e, t, n) {
|
|
5582
5566
|
n === void 0 && (n = function(e) {
|
|
5583
5567
|
return e;
|
|
5584
5568
|
});
|
|
5585
5569
|
try {
|
|
5586
|
-
return this.getKey().verify(e,
|
|
5570
|
+
return this.getKey().verify(e, ke(t), n);
|
|
5587
5571
|
} catch {
|
|
5588
5572
|
return !1;
|
|
5589
5573
|
}
|
|
5590
5574
|
}, e.prototype.verifySha256 = function(e, t) {
|
|
5591
5575
|
return this.verify(e, t, function(e) {
|
|
5592
|
-
return
|
|
5576
|
+
return mt(pt(e));
|
|
5593
5577
|
});
|
|
5594
5578
|
}, e.prototype.getKey = function(e) {
|
|
5595
5579
|
if (!this.key) {
|
|
5596
|
-
if (this.key = new
|
|
5580
|
+
if (this.key = new Ft(), e && {}.toString.call(e) === "[object Function]") {
|
|
5597
5581
|
this.key.generateAsync(this.default_key_size, this.default_public_exponent, e);
|
|
5598
5582
|
return;
|
|
5599
5583
|
}
|
|
@@ -5608,22 +5592,22 @@ var zt = (function() {
|
|
|
5608
5592
|
return this.getKey().getPublicKey();
|
|
5609
5593
|
}, e.prototype.getPublicKeyB64 = function() {
|
|
5610
5594
|
return this.getKey().getPublicBaseKeyB64();
|
|
5611
|
-
}, e.version =
|
|
5595
|
+
}, e.version = It, e;
|
|
5612
5596
|
}();
|
|
5613
5597
|
//#endregion
|
|
5614
5598
|
//#region src/cryptoAlg/rsa.ts
|
|
5615
|
-
function
|
|
5599
|
+
function Rt(e) {
|
|
5616
5600
|
return new Promise((t) => {
|
|
5617
|
-
let
|
|
5618
|
-
|
|
5601
|
+
let r = n.use().publicKey, i = new Lt();
|
|
5602
|
+
i.setPublicKey(`-----BEGIN PUBLIC KEY-----\n${r}\n-----END PUBLIC KEY-----`), t(r ? i.encrypt(e) || "" : e);
|
|
5619
5603
|
});
|
|
5620
5604
|
}
|
|
5621
5605
|
//#endregion
|
|
5622
5606
|
//#region src/cryptoSetting.ts
|
|
5623
|
-
function
|
|
5624
|
-
return e === "/crypto/getPublicKeyAndConfig" ? !1 : !
|
|
5607
|
+
function zt(e, t, n, r) {
|
|
5608
|
+
return e === "/crypto/getPublicKeyAndConfig" ? !1 : !Bt(e, n, r) && t;
|
|
5625
5609
|
}
|
|
5626
|
-
function
|
|
5610
|
+
function Bt(e, t, n) {
|
|
5627
5611
|
if (t && n?.length === 0) return !1;
|
|
5628
5612
|
if (!t && n?.length === 0) return !0;
|
|
5629
5613
|
{
|
|
@@ -5635,31 +5619,31 @@ function Gt(e, t, n) {
|
|
|
5635
5619
|
return t ? r : !r;
|
|
5636
5620
|
}
|
|
5637
5621
|
}
|
|
5638
|
-
async function
|
|
5622
|
+
async function Vt(e, t) {
|
|
5639
5623
|
if (e.data && !(e.data instanceof FormData) && (e.data = await t(JSON.stringify(e.data))), e.config.params && JSON.stringify(e.config.params) !== "{}") {
|
|
5640
5624
|
let n = JSON.parse(JSON.stringify(e.config.params));
|
|
5641
5625
|
e.config.params = { secureData: decodeURIComponent(await t(decodeURIComponent(new URLSearchParams(n).toString()))) };
|
|
5642
5626
|
}
|
|
5643
5627
|
if (e.config.meta && e.config.meta.pathParams) for (let n of e.config.meta.pathParams) e.url = e.url.replace(n, await t(`${n}`));
|
|
5644
5628
|
}
|
|
5645
|
-
async function
|
|
5646
|
-
let
|
|
5647
|
-
e.config.headers["X-Crypyto-Key"] = await
|
|
5629
|
+
async function Ht(e, t) {
|
|
5630
|
+
let r = n.use().key, i = n.use().iv;
|
|
5631
|
+
e.config.headers["X-Crypyto-Key"] = await Rt(JSON.stringify({
|
|
5648
5632
|
"Algorithm-Name": t?.name,
|
|
5649
|
-
"Algorithm-Key":
|
|
5650
|
-
"Algorithm-Iv":
|
|
5633
|
+
"Algorithm-Key": r,
|
|
5634
|
+
"Algorithm-Iv": i,
|
|
5651
5635
|
...t?.header
|
|
5652
|
-
})), await
|
|
5636
|
+
})), await Vt(e, t.encrypt);
|
|
5653
5637
|
}
|
|
5654
|
-
async function
|
|
5638
|
+
async function Ut(e, t) {
|
|
5655
5639
|
e.data = await t.decrypt(e.data);
|
|
5656
5640
|
}
|
|
5657
5641
|
//#endregion
|
|
5658
5642
|
//#region src/helper.ts
|
|
5659
|
-
function
|
|
5643
|
+
function Wt(e) {
|
|
5660
5644
|
return e.meta = { authRole: null }, e;
|
|
5661
5645
|
}
|
|
5662
|
-
function
|
|
5646
|
+
function Gt(e) {
|
|
5663
5647
|
let t = "";
|
|
5664
5648
|
if (e < 0) return t;
|
|
5665
5649
|
for (let n = 0; n < e; n++) {
|
|
@@ -5670,7 +5654,7 @@ function Xt(e) {
|
|
|
5670
5654
|
}
|
|
5671
5655
|
//#endregion
|
|
5672
5656
|
//#region ../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
|
|
5673
|
-
var
|
|
5657
|
+
var Kt = /* @__PURE__ */ d(((e) => {
|
|
5674
5658
|
e.byteLength = c, e.toByteArray = u, e.fromByteArray = p;
|
|
5675
5659
|
for (var t = [], n = [], r = typeof Uint8Array < "u" ? Uint8Array : Array, i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0, o = i.length; a < o; ++a) t[a] = i[a], n[i.charCodeAt(a)] = a;
|
|
5676
5660
|
n[45] = 62, n[95] = 63;
|
|
@@ -5705,7 +5689,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5705
5689
|
for (var n, r = e.length, i = r % 3, a = [], o = 16383, s = 0, c = r - i; s < c; s += o) a.push(f(e, s, s + o > c ? c : s + o));
|
|
5706
5690
|
return i === 1 ? (n = e[r - 1], a.push(t[n >> 2] + t[n << 4 & 63] + "==")) : i === 2 && (n = (e[r - 2] << 8) + e[r - 1], a.push(t[n >> 10] + t[n >> 4 & 63] + t[n << 2 & 63] + "=")), a.join("");
|
|
5707
5691
|
}
|
|
5708
|
-
})),
|
|
5692
|
+
})), qt = /* @__PURE__ */ d(((e) => {
|
|
5709
5693
|
e.read = function(e, t, n, r, i) {
|
|
5710
5694
|
var a, o, s = i * 8 - r - 1, c = (1 << s) - 1, l = c >> 1, u = -7, d = n ? i - 1 : 0, f = n ? -1 : 1, p = e[t + d];
|
|
5711
5695
|
for (d += f, a = p & (1 << -u) - 1, p >>= -u, u += s; u > 0; a = a * 256 + e[t + d], d += f, u -= 8);
|
|
@@ -5715,13 +5699,13 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5715
5699
|
else o += 2 ** r, a -= l;
|
|
5716
5700
|
return (p ? -1 : 1) * o * 2 ** (a - r);
|
|
5717
5701
|
}, e.write = function(e, t, n, r, i, a) {
|
|
5718
|
-
var o, s, c, l = a * 8 - i - 1, u = (1 << l) - 1, d = u >> 1, f = i === 23 ? 2 ** -24 - 2 ** -77 : 0, p = r ? 0 : a - 1, m = r ? 1 : -1, h = t < 0 || t === 0 && 1 / t < 0
|
|
5719
|
-
for (t = Math.abs(t), isNaN(t) || t === Infinity ? (s = isNaN(t)
|
|
5702
|
+
var o, s, c, l = a * 8 - i - 1, u = (1 << l) - 1, d = u >> 1, f = i === 23 ? 2 ** -24 - 2 ** -77 : 0, p = r ? 0 : a - 1, m = r ? 1 : -1, h = +(t < 0 || t === 0 && 1 / t < 0);
|
|
5703
|
+
for (t = Math.abs(t), isNaN(t) || t === Infinity ? (s = +!!isNaN(t), o = u) : (o = Math.floor(Math.log(t) / Math.LN2), t * (c = 2 ** -o) < 1 && (o--, c *= 2), o + d >= 1 ? t += f / c : t += f * 2 ** (1 - d), t * c >= 2 && (o++, c /= 2), o + d >= u ? (s = 0, o = u) : o + d >= 1 ? (s = (t * c - 1) * 2 ** i, o += d) : (s = t * 2 ** (d - 1) * 2 ** i, o = 0)); i >= 8; e[n + p] = s & 255, p += m, s /= 256, i -= 8);
|
|
5720
5704
|
for (o = o << i | s, l += i; l > 0; e[n + p] = o & 255, p += m, o /= 256, l -= 8);
|
|
5721
5705
|
e[n + p - m] |= h * 128;
|
|
5722
5706
|
};
|
|
5723
|
-
})),
|
|
5724
|
-
var t =
|
|
5707
|
+
})), Jt = /* @__PURE__ */ d(((e) => {
|
|
5708
|
+
var t = Kt(), n = qt(), r = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
5725
5709
|
e.Buffer = s, e.SlowBuffer = v, e.INSPECT_MAX_BYTES = 50;
|
|
5726
5710
|
var i = 2147483647;
|
|
5727
5711
|
e.kMaxLength = i, s.TYPED_ARRAY_SUPPORT = a(), !s.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
|
|
@@ -5763,7 +5747,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5763
5747
|
if (typeof e == "string") return f(e, t);
|
|
5764
5748
|
if (ArrayBuffer.isView(e)) return m(e);
|
|
5765
5749
|
if (e == null) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
5766
|
-
if (
|
|
5750
|
+
if (ue(e, ArrayBuffer) || e && ue(e.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (ue(e, SharedArrayBuffer) || e && ue(e.buffer, SharedArrayBuffer))) return h(e, t, n);
|
|
5767
5751
|
if (typeof e == "number") throw TypeError("The \"value\" argument must not be of type number. Received type number");
|
|
5768
5752
|
var r = e.valueOf && e.valueOf();
|
|
5769
5753
|
if (r != null && r !== e) return s.from(r, t, n);
|
|
@@ -5803,7 +5787,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5803
5787
|
return n;
|
|
5804
5788
|
}
|
|
5805
5789
|
function m(e) {
|
|
5806
|
-
if (
|
|
5790
|
+
if (ue(e, Uint8Array)) {
|
|
5807
5791
|
var t = new Uint8Array(e);
|
|
5808
5792
|
return h(t.buffer, t.byteOffset, t.byteLength);
|
|
5809
5793
|
}
|
|
@@ -5820,7 +5804,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5820
5804
|
var t = _(e.length) | 0, n = o(t);
|
|
5821
5805
|
return n.length === 0 || e.copy(n, 0, 0, t), n;
|
|
5822
5806
|
}
|
|
5823
|
-
if (e.length !== void 0) return typeof e.length != "number" ||
|
|
5807
|
+
if (e.length !== void 0) return typeof e.length != "number" || de(e.length) ? o(0) : p(e);
|
|
5824
5808
|
if (e.type === "Buffer" && Array.isArray(e.data)) return p(e.data);
|
|
5825
5809
|
}
|
|
5826
5810
|
function _(e) {
|
|
@@ -5833,13 +5817,13 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5833
5817
|
s.isBuffer = function(e) {
|
|
5834
5818
|
return e != null && e._isBuffer === !0 && e !== s.prototype;
|
|
5835
5819
|
}, s.compare = function(e, t) {
|
|
5836
|
-
if (
|
|
5820
|
+
if (ue(e, Uint8Array) && (e = s.from(e, e.offset, e.byteLength)), ue(t, Uint8Array) && (t = s.from(t, t.offset, t.byteLength)), !s.isBuffer(e) || !s.isBuffer(t)) throw TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
|
|
5837
5821
|
if (e === t) return 0;
|
|
5838
5822
|
for (var n = e.length, r = t.length, i = 0, a = Math.min(n, r); i < a; ++i) if (e[i] !== t[i]) {
|
|
5839
5823
|
n = e[i], r = t[i];
|
|
5840
5824
|
break;
|
|
5841
5825
|
}
|
|
5842
|
-
return n < r ? -1 : r < n
|
|
5826
|
+
return n < r ? -1 : +(r < n);
|
|
5843
5827
|
}, s.isEncoding = function(e) {
|
|
5844
5828
|
switch (String(e).toLowerCase()) {
|
|
5845
5829
|
case "hex":
|
|
@@ -5863,7 +5847,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5863
5847
|
var r = s.allocUnsafe(t), i = 0;
|
|
5864
5848
|
for (n = 0; n < e.length; ++n) {
|
|
5865
5849
|
var a = e[n];
|
|
5866
|
-
if (
|
|
5850
|
+
if (ue(a, Uint8Array)) i + a.length > r.length ? s.from(a).copy(r, i) : Uint8Array.prototype.set.call(r, a, i);
|
|
5867
5851
|
else if (s.isBuffer(a)) a.copy(r, i);
|
|
5868
5852
|
else throw TypeError("\"list\" argument must be an Array of Buffers");
|
|
5869
5853
|
i += a.length;
|
|
@@ -5872,7 +5856,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5872
5856
|
};
|
|
5873
5857
|
function y(e, t) {
|
|
5874
5858
|
if (s.isBuffer(e)) return e.length;
|
|
5875
|
-
if (ArrayBuffer.isView(e) ||
|
|
5859
|
+
if (ArrayBuffer.isView(e) || ue(e, ArrayBuffer)) return e.byteLength;
|
|
5876
5860
|
if (typeof e != "string") throw TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof e);
|
|
5877
5861
|
var n = e.length, r = arguments.length > 2 && arguments[2] === !0;
|
|
5878
5862
|
if (!r && n === 0) return 0;
|
|
@@ -5881,15 +5865,15 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5881
5865
|
case "latin1":
|
|
5882
5866
|
case "binary": return n;
|
|
5883
5867
|
case "utf8":
|
|
5884
|
-
case "utf-8": return
|
|
5868
|
+
case "utf-8": return L(e).length;
|
|
5885
5869
|
case "ucs2":
|
|
5886
5870
|
case "ucs-2":
|
|
5887
5871
|
case "utf16le":
|
|
5888
5872
|
case "utf-16le": return n * 2;
|
|
5889
5873
|
case "hex": return n >>> 1;
|
|
5890
|
-
case "base64": return
|
|
5874
|
+
case "base64": return ce(e).length;
|
|
5891
5875
|
default:
|
|
5892
|
-
if (i) return r ? -1 :
|
|
5876
|
+
if (i) return r ? -1 : L(e).length;
|
|
5893
5877
|
t = ("" + t).toLowerCase(), i = !0;
|
|
5894
5878
|
}
|
|
5895
5879
|
}
|
|
@@ -5898,7 +5882,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5898
5882
|
var r = !1;
|
|
5899
5883
|
if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((n === void 0 || n > this.length) && (n = this.length), n <= 0) || (n >>>= 0, t >>>= 0, n <= t)) return "";
|
|
5900
5884
|
for (e ||= "utf8";;) switch (e) {
|
|
5901
|
-
case "hex": return
|
|
5885
|
+
case "hex": return P(this, t, n);
|
|
5902
5886
|
case "utf8":
|
|
5903
5887
|
case "utf-8": return A(this, t, n);
|
|
5904
5888
|
case "ascii": return ee(this, t, n);
|
|
@@ -5908,7 +5892,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5908
5892
|
case "ucs2":
|
|
5909
5893
|
case "ucs-2":
|
|
5910
5894
|
case "utf16le":
|
|
5911
|
-
case "utf-16le": return
|
|
5895
|
+
case "utf-16le": return te(this, t, n);
|
|
5912
5896
|
default:
|
|
5913
5897
|
if (r) throw TypeError("Unknown encoding: " + e);
|
|
5914
5898
|
e = (e + "").toLowerCase(), r = !0;
|
|
@@ -5944,7 +5928,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5944
5928
|
var t = "", n = e.INSPECT_MAX_BYTES;
|
|
5945
5929
|
return t = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), this.length > n && (t += " ... "), "<Buffer " + t + ">";
|
|
5946
5930
|
}, r && (s.prototype[r] = s.prototype.inspect), s.prototype.compare = function(e, t, n, r, i) {
|
|
5947
|
-
if (
|
|
5931
|
+
if (ue(e, Uint8Array) && (e = s.from(e, e.offset, e.byteLength)), !s.isBuffer(e)) throw TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof e);
|
|
5948
5932
|
if (t === void 0 && (t = 0), n === void 0 && (n = e ? e.length : 0), r === void 0 && (r = 0), i === void 0 && (i = this.length), t < 0 || n > e.length || r < 0 || i > this.length) throw RangeError("out of range index");
|
|
5949
5933
|
if (r >= i && t >= n) return 0;
|
|
5950
5934
|
if (r >= i) return -1;
|
|
@@ -5954,11 +5938,11 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
5954
5938
|
a = l[d], o = u[d];
|
|
5955
5939
|
break;
|
|
5956
5940
|
}
|
|
5957
|
-
return a < o ? -1 : o < a
|
|
5941
|
+
return a < o ? -1 : +(o < a);
|
|
5958
5942
|
};
|
|
5959
5943
|
function S(e, t, n, r, i) {
|
|
5960
5944
|
if (e.length === 0) return -1;
|
|
5961
|
-
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n,
|
|
5945
|
+
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, de(n) && (n = i ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
|
|
5962
5946
|
if (i) return -1;
|
|
5963
5947
|
n = e.length - 1;
|
|
5964
5948
|
} else if (n < 0) if (i) n = 0;
|
|
@@ -6006,22 +5990,22 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6006
5990
|
r > a / 2 && (r = a / 2);
|
|
6007
5991
|
for (var o = 0; o < r; ++o) {
|
|
6008
5992
|
var s = parseInt(t.substr(o * 2, 2), 16);
|
|
6009
|
-
if (
|
|
5993
|
+
if (de(s)) return o;
|
|
6010
5994
|
e[n + o] = s;
|
|
6011
5995
|
}
|
|
6012
5996
|
return o;
|
|
6013
5997
|
}
|
|
6014
5998
|
function T(e, t, n, r) {
|
|
6015
|
-
return
|
|
5999
|
+
return le(L(t, e.length - n), e, n, r);
|
|
6016
6000
|
}
|
|
6017
6001
|
function E(e, t, n, r) {
|
|
6018
|
-
return
|
|
6002
|
+
return le(R(t), e, n, r);
|
|
6019
6003
|
}
|
|
6020
6004
|
function D(e, t, n, r) {
|
|
6021
|
-
return ce(
|
|
6005
|
+
return le(ce(t), e, n, r);
|
|
6022
6006
|
}
|
|
6023
6007
|
function O(e, t, n, r) {
|
|
6024
|
-
return
|
|
6008
|
+
return le(se(t, e.length - n), e, n, r);
|
|
6025
6009
|
}
|
|
6026
6010
|
s.prototype.write = function(e, t, n, r) {
|
|
6027
6011
|
if (t === void 0) r = "utf8", n = this.length, t = 0;
|
|
@@ -6098,13 +6082,13 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6098
6082
|
for (var i = t; i < n; ++i) r += String.fromCharCode(e[i]);
|
|
6099
6083
|
return r;
|
|
6100
6084
|
}
|
|
6101
|
-
function
|
|
6085
|
+
function P(e, t, n) {
|
|
6102
6086
|
var r = e.length;
|
|
6103
6087
|
(!t || t < 0) && (t = 0), (!n || n < 0 || n > r) && (n = r);
|
|
6104
|
-
for (var i = "", a = t; a < n; ++a) i +=
|
|
6088
|
+
for (var i = "", a = t; a < n; ++a) i += fe[e[a]];
|
|
6105
6089
|
return i;
|
|
6106
6090
|
}
|
|
6107
|
-
function
|
|
6091
|
+
function te(e, t, n) {
|
|
6108
6092
|
for (var r = e.slice(t, n), i = "", a = 0; a < r.length - 1; a += 2) i += String.fromCharCode(r[a] + r[a + 1] * 256);
|
|
6109
6093
|
return i;
|
|
6110
6094
|
}
|
|
@@ -6114,60 +6098,60 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6114
6098
|
var r = this.subarray(e, t);
|
|
6115
6099
|
return Object.setPrototypeOf(r, s.prototype), r;
|
|
6116
6100
|
};
|
|
6117
|
-
function
|
|
6101
|
+
function F(e, t, n) {
|
|
6118
6102
|
if (e % 1 != 0 || e < 0) throw RangeError("offset is not uint");
|
|
6119
6103
|
if (e + t > n) throw RangeError("Trying to access beyond buffer length");
|
|
6120
6104
|
}
|
|
6121
6105
|
s.prototype.readUintLE = s.prototype.readUIntLE = function(e, t, n) {
|
|
6122
|
-
e >>>= 0, t >>>= 0, n ||
|
|
6106
|
+
e >>>= 0, t >>>= 0, n || F(e, t, this.length);
|
|
6123
6107
|
for (var r = this[e], i = 1, a = 0; ++a < t && (i *= 256);) r += this[e + a] * i;
|
|
6124
6108
|
return r;
|
|
6125
6109
|
}, s.prototype.readUintBE = s.prototype.readUIntBE = function(e, t, n) {
|
|
6126
|
-
e >>>= 0, t >>>= 0, n ||
|
|
6110
|
+
e >>>= 0, t >>>= 0, n || F(e, t, this.length);
|
|
6127
6111
|
for (var r = this[e + --t], i = 1; t > 0 && (i *= 256);) r += this[e + --t] * i;
|
|
6128
6112
|
return r;
|
|
6129
6113
|
}, s.prototype.readUint8 = s.prototype.readUInt8 = function(e, t) {
|
|
6130
|
-
return e >>>= 0, t ||
|
|
6114
|
+
return e >>>= 0, t || F(e, 1, this.length), this[e];
|
|
6131
6115
|
}, s.prototype.readUint16LE = s.prototype.readUInt16LE = function(e, t) {
|
|
6132
|
-
return e >>>= 0, t ||
|
|
6116
|
+
return e >>>= 0, t || F(e, 2, this.length), this[e] | this[e + 1] << 8;
|
|
6133
6117
|
}, s.prototype.readUint16BE = s.prototype.readUInt16BE = function(e, t) {
|
|
6134
|
-
return e >>>= 0, t ||
|
|
6118
|
+
return e >>>= 0, t || F(e, 2, this.length), this[e] << 8 | this[e + 1];
|
|
6135
6119
|
}, s.prototype.readUint32LE = s.prototype.readUInt32LE = function(e, t) {
|
|
6136
|
-
return e >>>= 0, t ||
|
|
6120
|
+
return e >>>= 0, t || F(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
|
|
6137
6121
|
}, s.prototype.readUint32BE = s.prototype.readUInt32BE = function(e, t) {
|
|
6138
|
-
return e >>>= 0, t ||
|
|
6122
|
+
return e >>>= 0, t || F(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
6139
6123
|
}, s.prototype.readIntLE = function(e, t, n) {
|
|
6140
|
-
e >>>= 0, t >>>= 0, n ||
|
|
6124
|
+
e >>>= 0, t >>>= 0, n || F(e, t, this.length);
|
|
6141
6125
|
for (var r = this[e], i = 1, a = 0; ++a < t && (i *= 256);) r += this[e + a] * i;
|
|
6142
6126
|
return i *= 128, r >= i && (r -= 2 ** (8 * t)), r;
|
|
6143
6127
|
}, s.prototype.readIntBE = function(e, t, n) {
|
|
6144
|
-
e >>>= 0, t >>>= 0, n ||
|
|
6128
|
+
e >>>= 0, t >>>= 0, n || F(e, t, this.length);
|
|
6145
6129
|
for (var r = t, i = 1, a = this[e + --r]; r > 0 && (i *= 256);) a += this[e + --r] * i;
|
|
6146
6130
|
return i *= 128, a >= i && (a -= 2 ** (8 * t)), a;
|
|
6147
6131
|
}, s.prototype.readInt8 = function(e, t) {
|
|
6148
|
-
return e >>>= 0, t ||
|
|
6132
|
+
return e >>>= 0, t || F(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
|
|
6149
6133
|
}, s.prototype.readInt16LE = function(e, t) {
|
|
6150
|
-
e >>>= 0, t ||
|
|
6134
|
+
e >>>= 0, t || F(e, 2, this.length);
|
|
6151
6135
|
var n = this[e] | this[e + 1] << 8;
|
|
6152
6136
|
return n & 32768 ? n | 4294901760 : n;
|
|
6153
6137
|
}, s.prototype.readInt16BE = function(e, t) {
|
|
6154
|
-
e >>>= 0, t ||
|
|
6138
|
+
e >>>= 0, t || F(e, 2, this.length);
|
|
6155
6139
|
var n = this[e + 1] | this[e] << 8;
|
|
6156
6140
|
return n & 32768 ? n | 4294901760 : n;
|
|
6157
6141
|
}, s.prototype.readInt32LE = function(e, t) {
|
|
6158
|
-
return e >>>= 0, t ||
|
|
6142
|
+
return e >>>= 0, t || F(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
|
|
6159
6143
|
}, s.prototype.readInt32BE = function(e, t) {
|
|
6160
|
-
return e >>>= 0, t ||
|
|
6144
|
+
return e >>>= 0, t || F(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
6161
6145
|
}, s.prototype.readFloatLE = function(e, t) {
|
|
6162
|
-
return e >>>= 0, t ||
|
|
6146
|
+
return e >>>= 0, t || F(e, 4, this.length), n.read(this, e, !0, 23, 4);
|
|
6163
6147
|
}, s.prototype.readFloatBE = function(e, t) {
|
|
6164
|
-
return e >>>= 0, t ||
|
|
6148
|
+
return e >>>= 0, t || F(e, 4, this.length), n.read(this, e, !1, 23, 4);
|
|
6165
6149
|
}, s.prototype.readDoubleLE = function(e, t) {
|
|
6166
|
-
return e >>>= 0, t ||
|
|
6150
|
+
return e >>>= 0, t || F(e, 8, this.length), n.read(this, e, !0, 52, 8);
|
|
6167
6151
|
}, s.prototype.readDoubleBE = function(e, t) {
|
|
6168
|
-
return e >>>= 0, t ||
|
|
6152
|
+
return e >>>= 0, t || F(e, 8, this.length), n.read(this, e, !1, 52, 8);
|
|
6169
6153
|
};
|
|
6170
|
-
function
|
|
6154
|
+
function I(e, t, n, r, i, a) {
|
|
6171
6155
|
if (!s.isBuffer(e)) throw TypeError("\"buffer\" argument must be a Buffer instance");
|
|
6172
6156
|
if (t > i || t < a) throw RangeError("\"value\" argument is out of bounds");
|
|
6173
6157
|
if (n + r > e.length) throw RangeError("Index out of range");
|
|
@@ -6175,7 +6159,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6175
6159
|
s.prototype.writeUintLE = s.prototype.writeUIntLE = function(e, t, n, r) {
|
|
6176
6160
|
if (e = +e, t >>>= 0, n >>>= 0, !r) {
|
|
6177
6161
|
var i = 2 ** (8 * n) - 1;
|
|
6178
|
-
|
|
6162
|
+
I(this, e, t, n, i, 0);
|
|
6179
6163
|
}
|
|
6180
6164
|
var a = 1, o = 0;
|
|
6181
6165
|
for (this[t] = e & 255; ++o < n && (a *= 256);) this[t + o] = e / a & 255;
|
|
@@ -6183,25 +6167,25 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6183
6167
|
}, s.prototype.writeUintBE = s.prototype.writeUIntBE = function(e, t, n, r) {
|
|
6184
6168
|
if (e = +e, t >>>= 0, n >>>= 0, !r) {
|
|
6185
6169
|
var i = 2 ** (8 * n) - 1;
|
|
6186
|
-
|
|
6170
|
+
I(this, e, t, n, i, 0);
|
|
6187
6171
|
}
|
|
6188
6172
|
var a = n - 1, o = 1;
|
|
6189
6173
|
for (this[t + a] = e & 255; --a >= 0 && (o *= 256);) this[t + a] = e / o & 255;
|
|
6190
6174
|
return t + n;
|
|
6191
6175
|
}, s.prototype.writeUint8 = s.prototype.writeUInt8 = function(e, t, n) {
|
|
6192
|
-
return e = +e, t >>>= 0, n ||
|
|
6176
|
+
return e = +e, t >>>= 0, n || I(this, e, t, 1, 255, 0), this[t] = e & 255, t + 1;
|
|
6193
6177
|
}, s.prototype.writeUint16LE = s.prototype.writeUInt16LE = function(e, t, n) {
|
|
6194
|
-
return e = +e, t >>>= 0, n ||
|
|
6178
|
+
return e = +e, t >>>= 0, n || I(this, e, t, 2, 65535, 0), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
6195
6179
|
}, s.prototype.writeUint16BE = s.prototype.writeUInt16BE = function(e, t, n) {
|
|
6196
|
-
return e = +e, t >>>= 0, n ||
|
|
6180
|
+
return e = +e, t >>>= 0, n || I(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
6197
6181
|
}, s.prototype.writeUint32LE = s.prototype.writeUInt32LE = function(e, t, n) {
|
|
6198
|
-
return e = +e, t >>>= 0, n ||
|
|
6182
|
+
return e = +e, t >>>= 0, n || I(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = e & 255, t + 4;
|
|
6199
6183
|
}, s.prototype.writeUint32BE = s.prototype.writeUInt32BE = function(e, t, n) {
|
|
6200
|
-
return e = +e, t >>>= 0, n ||
|
|
6184
|
+
return e = +e, t >>>= 0, n || I(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
6201
6185
|
}, s.prototype.writeIntLE = function(e, t, n, r) {
|
|
6202
6186
|
if (e = +e, t >>>= 0, !r) {
|
|
6203
6187
|
var i = 2 ** (8 * n - 1);
|
|
6204
|
-
|
|
6188
|
+
I(this, e, t, n, i - 1, -i);
|
|
6205
6189
|
}
|
|
6206
6190
|
var a = 0, o = 1, s = 0;
|
|
6207
6191
|
for (this[t] = e & 255; ++a < n && (o *= 256);) e < 0 && s === 0 && this[t + a - 1] !== 0 && (s = 1), this[t + a] = (e / o >> 0) - s & 255;
|
|
@@ -6209,40 +6193,40 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6209
6193
|
}, s.prototype.writeIntBE = function(e, t, n, r) {
|
|
6210
6194
|
if (e = +e, t >>>= 0, !r) {
|
|
6211
6195
|
var i = 2 ** (8 * n - 1);
|
|
6212
|
-
|
|
6196
|
+
I(this, e, t, n, i - 1, -i);
|
|
6213
6197
|
}
|
|
6214
6198
|
var a = n - 1, o = 1, s = 0;
|
|
6215
6199
|
for (this[t + a] = e & 255; --a >= 0 && (o *= 256);) e < 0 && s === 0 && this[t + a + 1] !== 0 && (s = 1), this[t + a] = (e / o >> 0) - s & 255;
|
|
6216
6200
|
return t + n;
|
|
6217
6201
|
}, s.prototype.writeInt8 = function(e, t, n) {
|
|
6218
|
-
return e = +e, t >>>= 0, n ||
|
|
6202
|
+
return e = +e, t >>>= 0, n || I(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = e & 255, t + 1;
|
|
6219
6203
|
}, s.prototype.writeInt16LE = function(e, t, n) {
|
|
6220
|
-
return e = +e, t >>>= 0, n ||
|
|
6204
|
+
return e = +e, t >>>= 0, n || I(this, e, t, 2, 32767, -32768), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
6221
6205
|
}, s.prototype.writeInt16BE = function(e, t, n) {
|
|
6222
|
-
return e = +e, t >>>= 0, n ||
|
|
6206
|
+
return e = +e, t >>>= 0, n || I(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
6223
6207
|
}, s.prototype.writeInt32LE = function(e, t, n) {
|
|
6224
|
-
return e = +e, t >>>= 0, n ||
|
|
6208
|
+
return e = +e, t >>>= 0, n || I(this, e, t, 4, 2147483647, -2147483648), this[t] = e & 255, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
|
|
6225
6209
|
}, s.prototype.writeInt32BE = function(e, t, n) {
|
|
6226
|
-
return e = +e, t >>>= 0, n ||
|
|
6210
|
+
return e = +e, t >>>= 0, n || I(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
6227
6211
|
};
|
|
6228
|
-
function
|
|
6212
|
+
function ne(e, t, n, r, i, a) {
|
|
6229
6213
|
if (n + r > e.length || n < 0) throw RangeError("Index out of range");
|
|
6230
6214
|
}
|
|
6231
|
-
function
|
|
6232
|
-
return t = +t, r >>>= 0, a ||
|
|
6215
|
+
function re(e, t, r, i, a) {
|
|
6216
|
+
return t = +t, r >>>= 0, a || ne(e, t, r, 4, 34028234663852886e22, -34028234663852886e22), n.write(e, t, r, i, 23, 4), r + 4;
|
|
6233
6217
|
}
|
|
6234
6218
|
s.prototype.writeFloatLE = function(e, t, n) {
|
|
6235
|
-
return
|
|
6219
|
+
return re(this, e, t, !0, n);
|
|
6236
6220
|
}, s.prototype.writeFloatBE = function(e, t, n) {
|
|
6237
|
-
return
|
|
6221
|
+
return re(this, e, t, !1, n);
|
|
6238
6222
|
};
|
|
6239
|
-
function
|
|
6240
|
-
return t = +t, r >>>= 0, a ||
|
|
6223
|
+
function ie(e, t, r, i, a) {
|
|
6224
|
+
return t = +t, r >>>= 0, a || ne(e, t, r, 8, 17976931348623157e292, -17976931348623157e292), n.write(e, t, r, i, 52, 8), r + 8;
|
|
6241
6225
|
}
|
|
6242
6226
|
s.prototype.writeDoubleLE = function(e, t, n) {
|
|
6243
|
-
return
|
|
6227
|
+
return ie(this, e, t, !0, n);
|
|
6244
6228
|
}, s.prototype.writeDoubleBE = function(e, t, n) {
|
|
6245
|
-
return
|
|
6229
|
+
return ie(this, e, t, !1, n);
|
|
6246
6230
|
}, s.prototype.copy = function(e, t, n, r) {
|
|
6247
6231
|
if (!s.isBuffer(e)) throw TypeError("argument should be a Buffer");
|
|
6248
6232
|
if (n ||= 0, !r && r !== 0 && (r = this.length), t >= e.length && (t = e.length), t ||= 0, r > 0 && r < n && (r = n), r === n || e.length === 0 || this.length === 0) return 0;
|
|
@@ -6273,13 +6257,13 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6273
6257
|
}
|
|
6274
6258
|
return this;
|
|
6275
6259
|
};
|
|
6276
|
-
var
|
|
6277
|
-
function
|
|
6278
|
-
if (e = e.split("=")[0], e = e.trim().replace(
|
|
6260
|
+
var ae = /[^+/0-9A-Za-z-_]/g;
|
|
6261
|
+
function oe(e) {
|
|
6262
|
+
if (e = e.split("=")[0], e = e.trim().replace(ae, ""), e.length < 2) return "";
|
|
6279
6263
|
for (; e.length % 4 != 0;) e += "=";
|
|
6280
6264
|
return e;
|
|
6281
6265
|
}
|
|
6282
|
-
function
|
|
6266
|
+
function L(e, t) {
|
|
6283
6267
|
t ||= Infinity;
|
|
6284
6268
|
for (var n, r = e.length, i = null, a = [], o = 0; o < r; ++o) {
|
|
6285
6269
|
if (n = e.charCodeAt(o), n > 55295 && n < 57344) {
|
|
@@ -6316,33 +6300,33 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6316
6300
|
}
|
|
6317
6301
|
return a;
|
|
6318
6302
|
}
|
|
6319
|
-
function
|
|
6303
|
+
function R(e) {
|
|
6320
6304
|
for (var t = [], n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
|
|
6321
6305
|
return t;
|
|
6322
6306
|
}
|
|
6323
|
-
function
|
|
6307
|
+
function se(e, t) {
|
|
6324
6308
|
for (var n, r, i, a = [], o = 0; o < e.length && !((t -= 2) < 0); ++o) n = e.charCodeAt(o), r = n >> 8, i = n % 256, a.push(i), a.push(r);
|
|
6325
6309
|
return a;
|
|
6326
6310
|
}
|
|
6327
|
-
function
|
|
6328
|
-
return t.toByteArray(
|
|
6311
|
+
function ce(e) {
|
|
6312
|
+
return t.toByteArray(oe(e));
|
|
6329
6313
|
}
|
|
6330
|
-
function
|
|
6314
|
+
function le(e, t, n, r) {
|
|
6331
6315
|
for (var i = 0; i < r && !(i + n >= t.length || i >= e.length); ++i) t[i + n] = e[i];
|
|
6332
6316
|
return i;
|
|
6333
6317
|
}
|
|
6334
|
-
function
|
|
6318
|
+
function ue(e, t) {
|
|
6335
6319
|
return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
|
|
6336
6320
|
}
|
|
6337
|
-
function
|
|
6321
|
+
function de(e) {
|
|
6338
6322
|
return e !== e;
|
|
6339
6323
|
}
|
|
6340
|
-
var
|
|
6324
|
+
var fe = (function() {
|
|
6341
6325
|
for (var e = "0123456789abcdef", t = Array(256), n = 0; n < 16; ++n) for (var r = n * 16, i = 0; i < 16; ++i) t[r + i] = e[n] + e[i];
|
|
6342
6326
|
return t;
|
|
6343
6327
|
})();
|
|
6344
|
-
})),
|
|
6345
|
-
var n =
|
|
6328
|
+
})), Yt = /* @__PURE__ */ d(((e, t) => {
|
|
6329
|
+
var n = Jt().Buffer;
|
|
6346
6330
|
t.exports = function(e) {
|
|
6347
6331
|
if (e instanceof Uint8Array) {
|
|
6348
6332
|
if (e.byteOffset === 0 && e.byteLength === e.buffer.byteLength) return e.buffer;
|
|
@@ -6353,7 +6337,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6353
6337
|
return t.buffer;
|
|
6354
6338
|
} else throw Error("Argument must be a Buffer");
|
|
6355
6339
|
};
|
|
6356
|
-
})),
|
|
6340
|
+
})), Xt = /* @__PURE__ */ d(((e, t) => {
|
|
6357
6341
|
(function() {
|
|
6358
6342
|
var n, r = !0;
|
|
6359
6343
|
function i(e, t, n) {
|
|
@@ -6522,7 +6506,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6522
6506
|
}
|
|
6523
6507
|
e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), e.s = 0, e.clamp();
|
|
6524
6508
|
}
|
|
6525
|
-
function
|
|
6509
|
+
function P(e, t, n) {
|
|
6526
6510
|
var r = e.abs();
|
|
6527
6511
|
if (!(r.t <= 0)) {
|
|
6528
6512
|
var o = this.abs();
|
|
@@ -6545,48 +6529,48 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6545
6529
|
}
|
|
6546
6530
|
}
|
|
6547
6531
|
}
|
|
6548
|
-
function
|
|
6532
|
+
function te(e) {
|
|
6549
6533
|
var t = a();
|
|
6550
6534
|
return this.abs().divRemTo(e, null, t), this.s < 0 && t.compareTo(i.ZERO) > 0 && e.subTo(t, t), t;
|
|
6551
6535
|
}
|
|
6552
|
-
function
|
|
6536
|
+
function F(e) {
|
|
6553
6537
|
this.m = e;
|
|
6554
6538
|
}
|
|
6555
|
-
function
|
|
6539
|
+
function I(e) {
|
|
6556
6540
|
return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
|
|
6557
6541
|
}
|
|
6558
|
-
function
|
|
6542
|
+
function ne(e) {
|
|
6559
6543
|
return e;
|
|
6560
6544
|
}
|
|
6561
|
-
function
|
|
6545
|
+
function re(e) {
|
|
6562
6546
|
e.divRemTo(this.m, null, e);
|
|
6563
6547
|
}
|
|
6564
|
-
function
|
|
6548
|
+
function ie(e, t, n) {
|
|
6565
6549
|
e.multiplyTo(t, n), this.reduce(n);
|
|
6566
6550
|
}
|
|
6567
|
-
function
|
|
6551
|
+
function ae(e, t) {
|
|
6568
6552
|
e.squareTo(t), this.reduce(t);
|
|
6569
6553
|
}
|
|
6570
|
-
|
|
6571
|
-
function
|
|
6554
|
+
F.prototype.convert = I, F.prototype.revert = ne, F.prototype.reduce = re, F.prototype.mulTo = ie, F.prototype.sqrTo = ae;
|
|
6555
|
+
function oe() {
|
|
6572
6556
|
if (this.t < 1) return 0;
|
|
6573
6557
|
var e = this[0];
|
|
6574
6558
|
if (!(e & 1)) return 0;
|
|
6575
6559
|
var t = e & 3;
|
|
6576
6560
|
return t = t * (2 - (e & 15) * t) & 15, t = t * (2 - (e & 255) * t) & 255, t = t * (2 - ((e & 65535) * t & 65535)) & 65535, t = t * (2 - e * t % this.DV) % this.DV, t > 0 ? this.DV - t : -t;
|
|
6577
6561
|
}
|
|
6578
|
-
function
|
|
6562
|
+
function L(e) {
|
|
6579
6563
|
this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
|
|
6580
6564
|
}
|
|
6581
|
-
function
|
|
6565
|
+
function R(e) {
|
|
6582
6566
|
var t = a();
|
|
6583
6567
|
return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(i.ZERO) > 0 && this.m.subTo(t, t), t;
|
|
6584
6568
|
}
|
|
6585
|
-
function
|
|
6569
|
+
function se(e) {
|
|
6586
6570
|
var t = a();
|
|
6587
6571
|
return e.copyTo(t), this.reduce(t), t;
|
|
6588
6572
|
}
|
|
6589
|
-
function
|
|
6573
|
+
function ce(e) {
|
|
6590
6574
|
for (; e.t <= this.mt2;) e[e.t++] = 0;
|
|
6591
6575
|
for (var t = 0; t < this.m.t; ++t) {
|
|
6592
6576
|
var n = e[t] & 32767, r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
|
|
@@ -6594,17 +6578,17 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6594
6578
|
}
|
|
6595
6579
|
e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
|
|
6596
6580
|
}
|
|
6597
|
-
function
|
|
6581
|
+
function le(e, t) {
|
|
6598
6582
|
e.squareTo(t), this.reduce(t);
|
|
6599
6583
|
}
|
|
6600
|
-
function
|
|
6584
|
+
function ue(e, t, n) {
|
|
6601
6585
|
e.multiplyTo(t, n), this.reduce(n);
|
|
6602
6586
|
}
|
|
6603
|
-
|
|
6604
|
-
function
|
|
6587
|
+
L.prototype.convert = R, L.prototype.revert = se, L.prototype.reduce = ce, L.prototype.mulTo = ue, L.prototype.sqrTo = le;
|
|
6588
|
+
function de() {
|
|
6605
6589
|
return (this.t > 0 ? this[0] & 1 : this.s) == 0;
|
|
6606
6590
|
}
|
|
6607
|
-
function
|
|
6591
|
+
function fe(e, t) {
|
|
6608
6592
|
if (e > 4294967295 || e < 1) return i.ONE;
|
|
6609
6593
|
var n = a(), r = a(), o = t.convert(this), s = E(e) - 1;
|
|
6610
6594
|
for (o.copyTo(n); --s >= 0;) if (t.sqrTo(n, r), (e & 1 << s) > 0) t.mulTo(r, o, n);
|
|
@@ -6614,16 +6598,16 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6614
6598
|
}
|
|
6615
6599
|
return t.revert(n);
|
|
6616
6600
|
}
|
|
6617
|
-
function
|
|
6618
|
-
var n = e < 256 || t.isEven() ? new
|
|
6601
|
+
function pe(e, t) {
|
|
6602
|
+
var n = e < 256 || t.isEven() ? new F(t) : new L(t);
|
|
6619
6603
|
return this.exp(e, n);
|
|
6620
6604
|
}
|
|
6621
|
-
i.prototype.copyTo = _, i.prototype.fromInt = v, i.prototype.fromString = b, i.prototype.clamp = x, i.prototype.dlShiftTo = O, i.prototype.drShiftTo = k, i.prototype.lShiftTo = A, i.prototype.rShiftTo = j, i.prototype.subTo = M, i.prototype.multiplyTo = ee, i.prototype.squareTo = N, i.prototype.divRemTo =
|
|
6622
|
-
function
|
|
6605
|
+
i.prototype.copyTo = _, i.prototype.fromInt = v, i.prototype.fromString = b, i.prototype.clamp = x, i.prototype.dlShiftTo = O, i.prototype.drShiftTo = k, i.prototype.lShiftTo = A, i.prototype.rShiftTo = j, i.prototype.subTo = M, i.prototype.multiplyTo = ee, i.prototype.squareTo = N, i.prototype.divRemTo = P, i.prototype.invDigit = oe, i.prototype.isEven = de, i.prototype.exp = fe, i.prototype.toString = S, i.prototype.negate = C, i.prototype.abs = w, i.prototype.compareTo = T, i.prototype.bitLength = D, i.prototype.mod = te, i.prototype.modPowInt = pe, i.ZERO = y(0), i.ONE = y(1);
|
|
6606
|
+
function me() {
|
|
6623
6607
|
var e = a();
|
|
6624
6608
|
return this.copyTo(e), e;
|
|
6625
6609
|
}
|
|
6626
|
-
function
|
|
6610
|
+
function he() {
|
|
6627
6611
|
if (this.s < 0) {
|
|
6628
6612
|
if (this.t == 1) return this[0] - this.DV;
|
|
6629
6613
|
if (this.t == 0) return -1;
|
|
@@ -6631,25 +6615,25 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6631
6615
|
else if (this.t == 0) return 0;
|
|
6632
6616
|
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
|
|
6633
6617
|
}
|
|
6634
|
-
function
|
|
6618
|
+
function ge() {
|
|
6635
6619
|
return this.t == 0 ? this.s : this[0] << 24 >> 24;
|
|
6636
6620
|
}
|
|
6637
|
-
function
|
|
6621
|
+
function _e() {
|
|
6638
6622
|
return this.t == 0 ? this.s : this[0] << 16 >> 16;
|
|
6639
6623
|
}
|
|
6640
|
-
function
|
|
6624
|
+
function ve(e) {
|
|
6641
6625
|
return Math.floor(Math.LN2 * this.DB / Math.log(e));
|
|
6642
6626
|
}
|
|
6643
|
-
function
|
|
6627
|
+
function ye() {
|
|
6644
6628
|
return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
|
|
6645
6629
|
}
|
|
6646
|
-
function
|
|
6630
|
+
function be(e) {
|
|
6647
6631
|
if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
|
|
6648
6632
|
var t = this.chunkSize(e), n = e ** +t, r = y(n), i = a(), o = a(), s = "";
|
|
6649
6633
|
for (this.divRemTo(r, i, o); i.signum() > 0;) s = (n + o.intValue()).toString(e).substr(1) + s, i.divRemTo(r, i, o);
|
|
6650
6634
|
return o.intValue().toString(e) + s;
|
|
6651
6635
|
}
|
|
6652
|
-
function
|
|
6636
|
+
function xe(e, t) {
|
|
6653
6637
|
this.fromInt(0), t ??= 10;
|
|
6654
6638
|
for (var n = this.chunkSize(t), r = t ** +n, a = !1, o = 0, s = 0, c = 0; c < e.length; ++c) {
|
|
6655
6639
|
var l = g(e, c);
|
|
@@ -6661,31 +6645,31 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6661
6645
|
}
|
|
6662
6646
|
o > 0 && (this.dMultiply(t ** +o), this.dAddOffset(s, 0)), a && i.ZERO.subTo(this, this);
|
|
6663
6647
|
}
|
|
6664
|
-
function
|
|
6648
|
+
function Se(e, t, n) {
|
|
6665
6649
|
if (typeof t == "number") if (e < 2) this.fromInt(1);
|
|
6666
|
-
else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(i.ONE.shiftLeft(e - 1),
|
|
6650
|
+
else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(i.ONE.shiftLeft(e - 1), Ae, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(i.ONE.shiftLeft(e - 1), this);
|
|
6667
6651
|
else {
|
|
6668
6652
|
var r = [], a = e & 7;
|
|
6669
6653
|
r.length = (e >> 3) + 1, t.nextBytes(r), a > 0 ? r[0] &= (1 << a) - 1 : r[0] = 0, this.fromString(r, 256);
|
|
6670
6654
|
}
|
|
6671
6655
|
}
|
|
6672
|
-
function
|
|
6656
|
+
function Ce() {
|
|
6673
6657
|
var e = this.t, t = [];
|
|
6674
6658
|
t[0] = this.s;
|
|
6675
6659
|
var n = this.DB - e * this.DB % 8, r, i = 0;
|
|
6676
6660
|
if (e-- > 0) for (n < this.DB && (r = this[e] >> n) != (this.s & this.DM) >> n && (t[i++] = r | this.s << this.DB - n); e >= 0;) n < 8 ? (r = (this[e] & (1 << n) - 1) << 8 - n, r |= this[--e] >> (n += this.DB - 8)) : (r = this[e] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --e)), r & 128 && (r |= -256), i == 0 && (this.s & 128) != (r & 128) && ++i, (i > 0 || r != this.s) && (t[i++] = r);
|
|
6677
6661
|
return t;
|
|
6678
6662
|
}
|
|
6679
|
-
function
|
|
6663
|
+
function we(e) {
|
|
6680
6664
|
return this.compareTo(e) == 0;
|
|
6681
6665
|
}
|
|
6682
|
-
function
|
|
6666
|
+
function Te(e) {
|
|
6683
6667
|
return this.compareTo(e) < 0 ? this : e;
|
|
6684
6668
|
}
|
|
6685
|
-
function
|
|
6669
|
+
function Ee(e) {
|
|
6686
6670
|
return this.compareTo(e) > 0 ? this : e;
|
|
6687
6671
|
}
|
|
6688
|
-
function
|
|
6672
|
+
function De(e, t, n) {
|
|
6689
6673
|
var r, i, a = Math.min(e.t, this.t);
|
|
6690
6674
|
for (r = 0; r < a; ++r) n[r] = t(this[r], e[r]);
|
|
6691
6675
|
if (e.t < this.t) {
|
|
@@ -6697,79 +6681,79 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6697
6681
|
}
|
|
6698
6682
|
n.s = t(this.s, e.s), n.clamp();
|
|
6699
6683
|
}
|
|
6700
|
-
function
|
|
6684
|
+
function Oe(e, t) {
|
|
6701
6685
|
return e & t;
|
|
6702
6686
|
}
|
|
6703
|
-
function
|
|
6687
|
+
function ke(e) {
|
|
6704
6688
|
var t = a();
|
|
6705
|
-
return this.bitwiseTo(e,
|
|
6689
|
+
return this.bitwiseTo(e, Oe, t), t;
|
|
6706
6690
|
}
|
|
6707
|
-
function
|
|
6691
|
+
function Ae(e, t) {
|
|
6708
6692
|
return e | t;
|
|
6709
6693
|
}
|
|
6710
|
-
function
|
|
6694
|
+
function je(e) {
|
|
6711
6695
|
var t = a();
|
|
6712
|
-
return this.bitwiseTo(e,
|
|
6696
|
+
return this.bitwiseTo(e, Ae, t), t;
|
|
6713
6697
|
}
|
|
6714
|
-
function
|
|
6698
|
+
function Me(e, t) {
|
|
6715
6699
|
return e ^ t;
|
|
6716
6700
|
}
|
|
6717
|
-
function
|
|
6701
|
+
function Ne(e) {
|
|
6718
6702
|
var t = a();
|
|
6719
|
-
return this.bitwiseTo(e,
|
|
6703
|
+
return this.bitwiseTo(e, Me, t), t;
|
|
6720
6704
|
}
|
|
6721
|
-
function
|
|
6705
|
+
function Pe(e, t) {
|
|
6722
6706
|
return e & ~t;
|
|
6723
6707
|
}
|
|
6724
|
-
function
|
|
6708
|
+
function Fe(e) {
|
|
6725
6709
|
var t = a();
|
|
6726
|
-
return this.bitwiseTo(e,
|
|
6710
|
+
return this.bitwiseTo(e, Pe, t), t;
|
|
6727
6711
|
}
|
|
6728
|
-
function
|
|
6712
|
+
function Ie() {
|
|
6729
6713
|
for (var e = a(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
|
|
6730
6714
|
return e.t = this.t, e.s = ~this.s, e;
|
|
6731
6715
|
}
|
|
6732
|
-
function
|
|
6716
|
+
function Le(e) {
|
|
6733
6717
|
var t = a();
|
|
6734
6718
|
return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
|
|
6735
6719
|
}
|
|
6736
|
-
function
|
|
6720
|
+
function Re(e) {
|
|
6737
6721
|
var t = a();
|
|
6738
6722
|
return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
|
|
6739
6723
|
}
|
|
6740
|
-
function
|
|
6724
|
+
function ze(e) {
|
|
6741
6725
|
if (e == 0) return -1;
|
|
6742
6726
|
var t = 0;
|
|
6743
6727
|
return e & 65535 || (e >>= 16, t += 16), e & 255 || (e >>= 8, t += 8), e & 15 || (e >>= 4, t += 4), e & 3 || (e >>= 2, t += 2), e & 1 || ++t, t;
|
|
6744
6728
|
}
|
|
6745
|
-
function
|
|
6746
|
-
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB +
|
|
6729
|
+
function Be() {
|
|
6730
|
+
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + ze(this[e]);
|
|
6747
6731
|
return this.s < 0 ? this.t * this.DB : -1;
|
|
6748
6732
|
}
|
|
6749
|
-
function
|
|
6733
|
+
function Ve(e) {
|
|
6750
6734
|
for (var t = 0; e != 0;) e &= e - 1, ++t;
|
|
6751
6735
|
return t;
|
|
6752
6736
|
}
|
|
6753
|
-
function
|
|
6754
|
-
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e +=
|
|
6737
|
+
function He() {
|
|
6738
|
+
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += Ve(this[n] ^ t);
|
|
6755
6739
|
return e;
|
|
6756
6740
|
}
|
|
6757
|
-
function
|
|
6741
|
+
function Ue(e) {
|
|
6758
6742
|
var t = Math.floor(e / this.DB);
|
|
6759
6743
|
return t >= this.t ? this.s != 0 : (this[t] & 1 << e % this.DB) != 0;
|
|
6760
6744
|
}
|
|
6761
|
-
function
|
|
6745
|
+
function We(e, t) {
|
|
6762
6746
|
var n = i.ONE.shiftLeft(e);
|
|
6763
6747
|
return this.bitwiseTo(n, t, n), n;
|
|
6764
6748
|
}
|
|
6765
|
-
function
|
|
6766
|
-
return this.changeBit(e,
|
|
6767
|
-
}
|
|
6768
|
-
function We(e) {
|
|
6769
|
-
return this.changeBit(e, Ne);
|
|
6749
|
+
function z(e) {
|
|
6750
|
+
return this.changeBit(e, Ae);
|
|
6770
6751
|
}
|
|
6771
6752
|
function Ge(e) {
|
|
6772
|
-
return this.changeBit(e,
|
|
6753
|
+
return this.changeBit(e, Pe);
|
|
6754
|
+
}
|
|
6755
|
+
function B(e) {
|
|
6756
|
+
return this.changeBit(e, Me);
|
|
6773
6757
|
}
|
|
6774
6758
|
function Ke(e, t) {
|
|
6775
6759
|
for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] + e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
@@ -6786,19 +6770,19 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6786
6770
|
var t = a();
|
|
6787
6771
|
return this.addTo(e, t), t;
|
|
6788
6772
|
}
|
|
6789
|
-
function
|
|
6773
|
+
function Je(e) {
|
|
6790
6774
|
var t = a();
|
|
6791
6775
|
return this.subTo(e, t), t;
|
|
6792
6776
|
}
|
|
6793
|
-
function
|
|
6777
|
+
function Ye(e) {
|
|
6794
6778
|
var t = a();
|
|
6795
6779
|
return this.multiplyTo(e, t), t;
|
|
6796
6780
|
}
|
|
6797
|
-
function
|
|
6781
|
+
function V() {
|
|
6798
6782
|
var e = a();
|
|
6799
6783
|
return this.squareTo(e), e;
|
|
6800
6784
|
}
|
|
6801
|
-
function
|
|
6785
|
+
function H(e) {
|
|
6802
6786
|
var t = a();
|
|
6803
6787
|
return this.divRemTo(e, t, null), t;
|
|
6804
6788
|
}
|
|
@@ -6813,27 +6797,27 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6813
6797
|
function Qe(e) {
|
|
6814
6798
|
this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
|
|
6815
6799
|
}
|
|
6816
|
-
function
|
|
6800
|
+
function $e(e, t) {
|
|
6817
6801
|
if (e != 0) {
|
|
6818
6802
|
for (; this.t <= t;) this[this.t++] = 0;
|
|
6819
6803
|
for (this[t] += e; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
|
|
6820
6804
|
}
|
|
6821
6805
|
}
|
|
6822
|
-
function
|
|
6823
|
-
function
|
|
6806
|
+
function U() {}
|
|
6807
|
+
function et(e) {
|
|
6824
6808
|
return e;
|
|
6825
6809
|
}
|
|
6826
|
-
function
|
|
6810
|
+
function tt(e, t, n) {
|
|
6827
6811
|
e.multiplyTo(t, n);
|
|
6828
6812
|
}
|
|
6829
|
-
function
|
|
6813
|
+
function nt(e, t) {
|
|
6830
6814
|
e.squareTo(t);
|
|
6831
6815
|
}
|
|
6832
|
-
|
|
6833
|
-
function
|
|
6834
|
-
return this.exp(e, new
|
|
6816
|
+
U.prototype.convert = et, U.prototype.revert = et, U.prototype.mulTo = tt, U.prototype.sqrTo = nt;
|
|
6817
|
+
function rt(e) {
|
|
6818
|
+
return this.exp(e, new U());
|
|
6835
6819
|
}
|
|
6836
|
-
function
|
|
6820
|
+
function it(e, t, n) {
|
|
6837
6821
|
var r = Math.min(this.t + e.t, t);
|
|
6838
6822
|
for (n.s = 0, n.t = r; r > 0;) n[--r] = 0;
|
|
6839
6823
|
var i;
|
|
@@ -6841,40 +6825,40 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6841
6825
|
for (i = Math.min(e.t, t); r < i; ++r) this.am(0, e[r], n, r, 0, t - r);
|
|
6842
6826
|
n.clamp();
|
|
6843
6827
|
}
|
|
6844
|
-
function
|
|
6828
|
+
function at(e, t, n) {
|
|
6845
6829
|
--t;
|
|
6846
6830
|
var r = n.t = this.t + e.t - t;
|
|
6847
6831
|
for (n.s = 0; --r >= 0;) n[r] = 0;
|
|
6848
6832
|
for (r = Math.max(t - this.t, 0); r < e.t; ++r) n[this.t + r - t] = this.am(t - r, e[r], n, 0, 0, this.t + r - t);
|
|
6849
6833
|
n.clamp(), n.drShiftTo(1, n);
|
|
6850
6834
|
}
|
|
6851
|
-
function
|
|
6835
|
+
function W(e) {
|
|
6852
6836
|
this.r2 = a(), this.q3 = a(), i.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e), this.m = e;
|
|
6853
6837
|
}
|
|
6854
|
-
function
|
|
6838
|
+
function ot(e) {
|
|
6855
6839
|
if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
|
|
6856
6840
|
if (e.compareTo(this.m) < 0) return e;
|
|
6857
6841
|
var t = a();
|
|
6858
6842
|
return e.copyTo(t), this.reduce(t), t;
|
|
6859
6843
|
}
|
|
6860
|
-
function
|
|
6844
|
+
function st(e) {
|
|
6861
6845
|
return e;
|
|
6862
6846
|
}
|
|
6863
|
-
function
|
|
6847
|
+
function ct(e) {
|
|
6864
6848
|
for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && (e.t = this.m.t + 1, e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0;) e.dAddOffset(1, this.m.t + 1);
|
|
6865
6849
|
for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;) e.subTo(this.m, e);
|
|
6866
6850
|
}
|
|
6867
|
-
function
|
|
6851
|
+
function lt(e, t) {
|
|
6868
6852
|
e.squareTo(t), this.reduce(t);
|
|
6869
6853
|
}
|
|
6870
|
-
function
|
|
6854
|
+
function ut(e, t, n) {
|
|
6871
6855
|
e.multiplyTo(t, n), this.reduce(n);
|
|
6872
6856
|
}
|
|
6873
|
-
|
|
6874
|
-
function
|
|
6857
|
+
W.prototype.convert = ot, W.prototype.revert = st, W.prototype.reduce = ct, W.prototype.mulTo = ut, W.prototype.sqrTo = lt;
|
|
6858
|
+
function dt(e, t) {
|
|
6875
6859
|
var n = e.bitLength(), r, i = y(1), o;
|
|
6876
6860
|
if (n <= 0) return i;
|
|
6877
|
-
r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, o = n < 8 ? new
|
|
6861
|
+
r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, o = n < 8 ? new F(t) : t.isEven() ? new W(t) : new L(t);
|
|
6878
6862
|
var s = [], c = 3, l = r - 1, u = (1 << r) - 1;
|
|
6879
6863
|
if (s[1] = o.convert(this), r > 1) {
|
|
6880
6864
|
var d = a();
|
|
@@ -6892,7 +6876,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6892
6876
|
}
|
|
6893
6877
|
return o.revert(i);
|
|
6894
6878
|
}
|
|
6895
|
-
function
|
|
6879
|
+
function ft(e) {
|
|
6896
6880
|
var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone();
|
|
6897
6881
|
if (t.compareTo(n) < 0) {
|
|
6898
6882
|
var r = t;
|
|
@@ -6903,14 +6887,14 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6903
6887
|
for (i < a && (a = i), a > 0 && (t.rShiftTo(a, t), n.rShiftTo(a, n)); t.signum() > 0;) (i = t.getLowestSetBit()) > 0 && t.rShiftTo(i, t), (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n), t.compareTo(n) >= 0 ? (t.subTo(n, t), t.rShiftTo(1, t)) : (n.subTo(t, n), n.rShiftTo(1, n));
|
|
6904
6888
|
return a > 0 && n.lShiftTo(a, n), n;
|
|
6905
6889
|
}
|
|
6906
|
-
function
|
|
6890
|
+
function pt(e) {
|
|
6907
6891
|
if (e <= 0) return 0;
|
|
6908
6892
|
var t = this.DV % e, n = this.s < 0 ? e - 1 : 0;
|
|
6909
6893
|
if (this.t > 0) if (t == 0) n = this[0] % e;
|
|
6910
6894
|
else for (var r = this.t - 1; r >= 0; --r) n = (t * n + this[r]) % e;
|
|
6911
6895
|
return n;
|
|
6912
6896
|
}
|
|
6913
|
-
function
|
|
6897
|
+
function mt(e) {
|
|
6914
6898
|
var t = e.isEven();
|
|
6915
6899
|
if (this.isEven() && t || e.signum() == 0) return i.ZERO;
|
|
6916
6900
|
for (var n = e.clone(), r = this.clone(), a = y(1), o = y(0), s = y(0), c = y(1); n.signum() != 0;) {
|
|
@@ -6924,7 +6908,7 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
6924
6908
|
else return c;
|
|
6925
6909
|
return c.signum() < 0 ? c.add(e) : c;
|
|
6926
6910
|
}
|
|
6927
|
-
var
|
|
6911
|
+
var G = [
|
|
6928
6912
|
2,
|
|
6929
6913
|
3,
|
|
6930
6914
|
5,
|
|
@@ -7093,27 +7077,27 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
7093
7077
|
983,
|
|
7094
7078
|
991,
|
|
7095
7079
|
997
|
|
7096
|
-
],
|
|
7097
|
-
function
|
|
7080
|
+
], ht = (1 << 26) / G[G.length - 1];
|
|
7081
|
+
function gt(e) {
|
|
7098
7082
|
var t, n = this.abs();
|
|
7099
|
-
if (n.t == 1 && n[0] <=
|
|
7100
|
-
for (t = 0; t <
|
|
7083
|
+
if (n.t == 1 && n[0] <= G[G.length - 1]) {
|
|
7084
|
+
for (t = 0; t < G.length; ++t) if (n[0] == G[t]) return !0;
|
|
7101
7085
|
return !1;
|
|
7102
7086
|
}
|
|
7103
7087
|
if (n.isEven()) return !1;
|
|
7104
|
-
for (t = 1; t <
|
|
7105
|
-
for (var r =
|
|
7106
|
-
for (r = n.modInt(r); t < i;) if (r %
|
|
7088
|
+
for (t = 1; t < G.length;) {
|
|
7089
|
+
for (var r = G[t], i = t + 1; i < G.length && r < ht;) r *= G[i++];
|
|
7090
|
+
for (r = n.modInt(r); t < i;) if (r % G[t++] == 0) return !1;
|
|
7107
7091
|
}
|
|
7108
7092
|
return n.millerRabin(e);
|
|
7109
7093
|
}
|
|
7110
|
-
function
|
|
7094
|
+
function _t(e) {
|
|
7111
7095
|
var t = this.subtract(i.ONE), n = t.getLowestSetBit();
|
|
7112
7096
|
if (n <= 0) return !1;
|
|
7113
7097
|
var r = t.shiftRight(n);
|
|
7114
|
-
e = e + 1 >> 1, e >
|
|
7098
|
+
e = e + 1 >> 1, e > G.length && (e = G.length);
|
|
7115
7099
|
for (var o = a(), s = 0; s < e; ++s) {
|
|
7116
|
-
o.fromInt(
|
|
7100
|
+
o.fromInt(G[Math.floor(Math.random() * G.length)]);
|
|
7117
7101
|
var c = o.modPow(r, this);
|
|
7118
7102
|
if (c.compareTo(i.ONE) != 0 && c.compareTo(t) != 0) {
|
|
7119
7103
|
for (var l = 1; l++ < n && c.compareTo(t) != 0;) if (c = c.modPowInt(2, this), c.compareTo(i.ONE) == 0) return !1;
|
|
@@ -7122,78 +7106,78 @@ var Zt = /* @__PURE__ */ u(((e) => {
|
|
|
7122
7106
|
}
|
|
7123
7107
|
return !0;
|
|
7124
7108
|
}
|
|
7125
|
-
i.prototype.chunkSize =
|
|
7126
|
-
var
|
|
7109
|
+
i.prototype.chunkSize = ve, i.prototype.toRadix = be, i.prototype.fromRadix = xe, i.prototype.fromNumber = Se, i.prototype.bitwiseTo = De, i.prototype.changeBit = We, i.prototype.addTo = Ke, i.prototype.dMultiply = Qe, i.prototype.dAddOffset = $e, i.prototype.multiplyLowerTo = it, i.prototype.multiplyUpperTo = at, i.prototype.modInt = pt, i.prototype.millerRabin = _t, i.prototype.clone = me, i.prototype.intValue = he, i.prototype.byteValue = ge, i.prototype.shortValue = _e, i.prototype.signum = ye, i.prototype.toByteArray = Ce, i.prototype.equals = we, i.prototype.min = Te, i.prototype.max = Ee, i.prototype.and = ke, i.prototype.or = je, i.prototype.xor = Ne, i.prototype.andNot = Fe, i.prototype.not = Ie, i.prototype.shiftLeft = Le, i.prototype.shiftRight = Re, i.prototype.getLowestSetBit = Be, i.prototype.bitCount = He, i.prototype.testBit = Ue, i.prototype.setBit = z, i.prototype.clearBit = Ge, i.prototype.flipBit = B, i.prototype.add = qe, i.prototype.subtract = Je, i.prototype.multiply = Ye, i.prototype.divide = H, i.prototype.remainder = Xe, i.prototype.divideAndRemainder = Ze, i.prototype.modPow = dt, i.prototype.modInverse = mt, i.prototype.pow = rt, i.prototype.gcd = ft, i.prototype.isProbablePrime = gt, i.prototype.square = V, i.prototype.Barrett = W;
|
|
7110
|
+
var vt, K, q;
|
|
7127
7111
|
function yt(e) {
|
|
7128
|
-
|
|
7112
|
+
K[q++] ^= e & 255, K[q++] ^= e >> 8 & 255, K[q++] ^= e >> 16 & 255, K[q++] ^= e >> 24 & 255, q >= At && (q -= At);
|
|
7129
7113
|
}
|
|
7130
7114
|
function bt() {
|
|
7131
7115
|
yt((/* @__PURE__ */ new Date()).getTime());
|
|
7132
7116
|
}
|
|
7133
|
-
if (
|
|
7134
|
-
|
|
7117
|
+
if (K == null) {
|
|
7118
|
+
K = [], q = 0;
|
|
7135
7119
|
var xt;
|
|
7136
7120
|
if (typeof window < "u" && window.crypto) {
|
|
7137
7121
|
if (window.crypto.getRandomValues) {
|
|
7138
7122
|
var St = new Uint8Array(32);
|
|
7139
|
-
for (window.crypto.getRandomValues(St), xt = 0; xt < 32; ++xt)
|
|
7123
|
+
for (window.crypto.getRandomValues(St), xt = 0; xt < 32; ++xt) K[q++] = St[xt];
|
|
7140
7124
|
} else if (navigator.appName == "Netscape" && navigator.appVersion < "5") {
|
|
7141
7125
|
var Ct = window.crypto.random(32);
|
|
7142
|
-
for (xt = 0; xt < Ct.length; ++xt)
|
|
7126
|
+
for (xt = 0; xt < Ct.length; ++xt) K[q++] = Ct.charCodeAt(xt) & 255;
|
|
7143
7127
|
}
|
|
7144
7128
|
}
|
|
7145
|
-
for (; q < At;) xt = Math.floor(65536 * Math.random()),
|
|
7129
|
+
for (; q < At;) xt = Math.floor(65536 * Math.random()), K[q++] = xt >>> 8, K[q++] = xt & 255;
|
|
7146
7130
|
q = 0, bt();
|
|
7147
7131
|
}
|
|
7148
|
-
function
|
|
7149
|
-
if (
|
|
7150
|
-
for (bt(),
|
|
7132
|
+
function J() {
|
|
7133
|
+
if (vt == null) {
|
|
7134
|
+
for (bt(), vt = kt(), vt.init(K), q = 0; q < K.length; ++q) K[q] = 0;
|
|
7151
7135
|
q = 0;
|
|
7152
7136
|
}
|
|
7153
|
-
return
|
|
7137
|
+
return vt.next();
|
|
7154
7138
|
}
|
|
7155
|
-
function
|
|
7139
|
+
function wt(e) {
|
|
7156
7140
|
var t;
|
|
7157
|
-
for (t = 0; t < e.length; ++t) e[t] =
|
|
7141
|
+
for (t = 0; t < e.length; ++t) e[t] = J();
|
|
7158
7142
|
}
|
|
7159
|
-
function
|
|
7160
|
-
|
|
7161
|
-
function
|
|
7143
|
+
function Tt() {}
|
|
7144
|
+
Tt.prototype.nextBytes = wt;
|
|
7145
|
+
function Et() {
|
|
7162
7146
|
this.i = 0, this.j = 0, this.S = [];
|
|
7163
7147
|
}
|
|
7164
|
-
function
|
|
7148
|
+
function Dt(e) {
|
|
7165
7149
|
var t, n, r;
|
|
7166
7150
|
for (t = 0; t < 256; ++t) this.S[t] = t;
|
|
7167
7151
|
for (n = 0, t = 0; t < 256; ++t) n = n + this.S[t] + e[t % e.length] & 255, r = this.S[t], this.S[t] = this.S[n], this.S[n] = r;
|
|
7168
7152
|
this.i = 0, this.j = 0;
|
|
7169
7153
|
}
|
|
7170
|
-
function
|
|
7154
|
+
function Ot() {
|
|
7171
7155
|
var e;
|
|
7172
7156
|
return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, e = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = e, this.S[e + this.S[this.i] & 255];
|
|
7173
7157
|
}
|
|
7174
|
-
|
|
7158
|
+
Et.prototype.init = Dt, Et.prototype.next = Ot;
|
|
7175
7159
|
function kt() {
|
|
7176
|
-
return new
|
|
7160
|
+
return new Et();
|
|
7177
7161
|
}
|
|
7178
7162
|
var At = 256;
|
|
7179
7163
|
e === void 0 ? this.jsbn = {
|
|
7180
7164
|
BigInteger: i,
|
|
7181
|
-
SecureRandom:
|
|
7165
|
+
SecureRandom: Tt
|
|
7182
7166
|
} : e = t.exports = {
|
|
7183
7167
|
default: i,
|
|
7184
7168
|
BigInteger: i,
|
|
7185
|
-
SecureRandom:
|
|
7169
|
+
SecureRandom: Tt
|
|
7186
7170
|
};
|
|
7187
7171
|
}).call(e);
|
|
7188
|
-
})),
|
|
7172
|
+
})), Zt = /* @__PURE__ */ m(Yt()), Z = Jt(), Q = Xt(), Qt = Q.BigInteger.prototype.Barrett;
|
|
7189
7173
|
function $(e, t) {
|
|
7190
7174
|
this.x = t, this.q = e;
|
|
7191
7175
|
}
|
|
7192
|
-
function
|
|
7176
|
+
function $t(e, t, n, r) {
|
|
7193
7177
|
this.curve = e, this.x = t, this.y = n, this.z = r ?? Q.BigInteger.ONE, this.zinv = null;
|
|
7194
7178
|
}
|
|
7195
|
-
function
|
|
7196
|
-
this.q = e, this.a = this.fromBigInteger(t), this.b = this.fromBigInteger(n), this.infinity = new
|
|
7179
|
+
function en(e, t, n) {
|
|
7180
|
+
this.q = e, this.a = this.fromBigInteger(t), this.b = this.fromBigInteger(n), this.infinity = new $t(this, null, null), this.reducer = new Qt(this.q);
|
|
7197
7181
|
}
|
|
7198
7182
|
$.prototype.equals = function(e) {
|
|
7199
7183
|
return e == this || this.q.equals(e.q) && this.x.equals(e.x);
|
|
@@ -7211,35 +7195,35 @@ $.prototype.equals = function(e) {
|
|
|
7211
7195
|
return new $(this.q, this.x.square().mod(this.q));
|
|
7212
7196
|
}, $.prototype.divide = function(e) {
|
|
7213
7197
|
return new $(this.q, this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q));
|
|
7214
|
-
},
|
|
7198
|
+
}, $t.prototype.getX = function() {
|
|
7215
7199
|
this.zinv ??= this.z.modInverse(this.curve.q);
|
|
7216
7200
|
var e = this.x.toBigInteger().multiply(this.zinv);
|
|
7217
7201
|
return this.curve.reduce(e), this.curve.fromBigInteger(e);
|
|
7218
|
-
},
|
|
7202
|
+
}, $t.prototype.getY = function() {
|
|
7219
7203
|
this.zinv ??= this.z.modInverse(this.curve.q);
|
|
7220
7204
|
var e = this.y.toBigInteger().multiply(this.zinv);
|
|
7221
7205
|
return this.curve.reduce(e), this.curve.fromBigInteger(e);
|
|
7222
|
-
},
|
|
7206
|
+
}, $t.prototype.equals = function(e) {
|
|
7223
7207
|
return e == this || (this.isInfinity() ? e.isInfinity() : e.isInfinity() ? this.isInfinity() : !!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(Q.BigInteger.ZERO) && e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(Q.BigInteger.ZERO));
|
|
7224
|
-
},
|
|
7208
|
+
}, $t.prototype.isInfinity = function() {
|
|
7225
7209
|
return this.x == null && this.y == null || this.z.equals(Q.BigInteger.ZERO) && !this.y.toBigInteger().equals(Q.BigInteger.ZERO);
|
|
7226
|
-
},
|
|
7227
|
-
return new
|
|
7228
|
-
},
|
|
7210
|
+
}, $t.prototype.negate = function() {
|
|
7211
|
+
return new $t(this.curve, this.x, this.y.negate(), this.z);
|
|
7212
|
+
}, $t.prototype.add = function(e) {
|
|
7229
7213
|
if (this.isInfinity()) return e;
|
|
7230
7214
|
if (e.isInfinity()) return this;
|
|
7231
7215
|
var t = e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q), n = e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);
|
|
7232
7216
|
if (Q.BigInteger.ZERO.equals(n)) return Q.BigInteger.ZERO.equals(t) ? this.twice() : this.curve.getInfinity();
|
|
7233
7217
|
var r = new Q.BigInteger("3"), i = this.x.toBigInteger(), a = this.y.toBigInteger(), o = (e.x.toBigInteger(), e.y.toBigInteger(), n.square()), s = o.multiply(n), c = i.multiply(o), l = t.square().multiply(this.z), u = l.subtract(c.shiftLeft(1)).multiply(e.z).subtract(s).multiply(n).mod(this.curve.q), d = c.multiply(r).multiply(t).subtract(a.multiply(s)).subtract(l.multiply(t)).multiply(e.z).add(t.multiply(s)).mod(this.curve.q), f = s.multiply(this.z).multiply(e.z).mod(this.curve.q);
|
|
7234
|
-
return new
|
|
7235
|
-
},
|
|
7218
|
+
return new $t(this.curve, this.curve.fromBigInteger(u), this.curve.fromBigInteger(d), f);
|
|
7219
|
+
}, $t.prototype.twice = function() {
|
|
7236
7220
|
if (this.isInfinity()) return this;
|
|
7237
7221
|
if (this.y.toBigInteger().signum() == 0) return this.curve.getInfinity();
|
|
7238
7222
|
var e = new Q.BigInteger("3"), t = this.x.toBigInteger(), n = this.y.toBigInteger(), r = n.multiply(this.z), i = r.multiply(n).mod(this.curve.q), a = this.curve.a.toBigInteger(), o = t.square().multiply(e);
|
|
7239
7223
|
Q.BigInteger.ZERO.equals(a) || (o = o.add(this.z.square().multiply(a)));
|
|
7240
7224
|
var s = (o = o.mod(this.curve.q)).square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.q), c = o.multiply(e).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(o.square().multiply(o)).mod(this.curve.q), l = r.square().multiply(r).shiftLeft(3).mod(this.curve.q);
|
|
7241
|
-
return new
|
|
7242
|
-
},
|
|
7225
|
+
return new $t(this.curve, this.curve.fromBigInteger(s), this.curve.fromBigInteger(c), l);
|
|
7226
|
+
}, $t.prototype.multiply = function(e) {
|
|
7243
7227
|
if (this.isInfinity()) return this;
|
|
7244
7228
|
if (e.signum() == 0) return this.curve.getInfinity();
|
|
7245
7229
|
var t, n = e, r = n.multiply(new Q.BigInteger("3")), i = this.negate(), a = this;
|
|
@@ -7249,24 +7233,24 @@ $.prototype.equals = function(e) {
|
|
|
7249
7233
|
o != n.testBit(t) && (a = a.add(o ? this : i));
|
|
7250
7234
|
}
|
|
7251
7235
|
return a;
|
|
7252
|
-
},
|
|
7236
|
+
}, $t.prototype.multiplyTwo = function(e, t, n) {
|
|
7253
7237
|
for (var r = e.bitLength() > n.bitLength() ? e.bitLength() - 1 : n.bitLength() - 1, i = this.curve.getInfinity(), a = this.add(t); r >= 0;) i = i.twice(), e.testBit(r) ? i = n.testBit(r) ? i.add(a) : i.add(this) : n.testBit(r) && (i = i.add(t)), --r;
|
|
7254
7238
|
return i;
|
|
7255
|
-
},
|
|
7239
|
+
}, en.prototype.getQ = function() {
|
|
7256
7240
|
return this.q;
|
|
7257
|
-
},
|
|
7241
|
+
}, en.prototype.getA = function() {
|
|
7258
7242
|
return this.a;
|
|
7259
|
-
},
|
|
7243
|
+
}, en.prototype.getB = function() {
|
|
7260
7244
|
return this.b;
|
|
7261
|
-
},
|
|
7245
|
+
}, en.prototype.equals = function(e) {
|
|
7262
7246
|
return e == this || this.q.equals(e.q) && this.a.equals(e.a) && this.b.equals(e.b);
|
|
7263
|
-
},
|
|
7247
|
+
}, en.prototype.getInfinity = function() {
|
|
7264
7248
|
return this.infinity;
|
|
7265
|
-
},
|
|
7249
|
+
}, en.prototype.fromBigInteger = function(e) {
|
|
7266
7250
|
return new $(this.q, e);
|
|
7267
|
-
},
|
|
7251
|
+
}, en.prototype.reduce = function(e) {
|
|
7268
7252
|
this.reducer.reduce(e);
|
|
7269
|
-
},
|
|
7253
|
+
}, en.prototype.decodePointHex = function(e) {
|
|
7270
7254
|
switch (parseInt(e.substr(0, 2), 16)) {
|
|
7271
7255
|
case 0: return this.infinity;
|
|
7272
7256
|
case 2:
|
|
@@ -7275,30 +7259,30 @@ $.prototype.equals = function(e) {
|
|
|
7275
7259
|
case 6:
|
|
7276
7260
|
case 7:
|
|
7277
7261
|
var t = (e.length - 2) / 2, n = e.substr(2, t), r = e.substr(t + 2, t);
|
|
7278
|
-
return new
|
|
7262
|
+
return new $t(this, this.fromBigInteger(new Q.BigInteger(n, 16)), this.fromBigInteger(new Q.BigInteger(r, 16)));
|
|
7279
7263
|
default: return null;
|
|
7280
7264
|
}
|
|
7281
|
-
},
|
|
7265
|
+
}, en.prototype.encodePointHex = function(e) {
|
|
7282
7266
|
if (e.isInfinity()) return "00";
|
|
7283
7267
|
var t = e.getX().toBigInteger().toString(16), n = e.getY().toBigInteger().toString(16), r = this.getQ().toString(16).length;
|
|
7284
7268
|
for (r % 2 != 0 && r++; t.length < r;) t = "0" + t;
|
|
7285
7269
|
for (; n.length < r;) n = "0" + n;
|
|
7286
7270
|
return "04" + t + n;
|
|
7287
7271
|
};
|
|
7288
|
-
var
|
|
7272
|
+
var tn = function(e, t) {
|
|
7289
7273
|
return e << (t %= 32) | e >>> 32 - t;
|
|
7290
7274
|
};
|
|
7291
7275
|
new Q.SecureRandom();
|
|
7292
|
-
var
|
|
7293
|
-
var e = new
|
|
7276
|
+
var nn = function() {
|
|
7277
|
+
var e = new en(new Q.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF", 16), new Q.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC", 16), new Q.BigInteger("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93", 16));
|
|
7294
7278
|
return {
|
|
7295
7279
|
curve: e,
|
|
7296
7280
|
G: e.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0"),
|
|
7297
7281
|
n: new Q.BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123", 16)
|
|
7298
7282
|
};
|
|
7299
7283
|
}();
|
|
7300
|
-
|
|
7301
|
-
var
|
|
7284
|
+
nn.curve, nn.G, nn.n;
|
|
7285
|
+
var rn = [
|
|
7302
7286
|
[
|
|
7303
7287
|
214,
|
|
7304
7288
|
144,
|
|
@@ -7587,12 +7571,12 @@ var ln = [
|
|
|
7587
7571
|
57,
|
|
7588
7572
|
72
|
|
7589
7573
|
]
|
|
7590
|
-
],
|
|
7574
|
+
], an = [
|
|
7591
7575
|
2746333894,
|
|
7592
7576
|
1453994832,
|
|
7593
7577
|
1736282519,
|
|
7594
7578
|
2993693404
|
|
7595
|
-
],
|
|
7579
|
+
], on = [
|
|
7596
7580
|
462357,
|
|
7597
7581
|
472066609,
|
|
7598
7582
|
943670861,
|
|
@@ -7625,43 +7609,43 @@ var ln = [
|
|
|
7625
7609
|
741554753,
|
|
7626
7610
|
1213159005,
|
|
7627
7611
|
1684763257
|
|
7628
|
-
],
|
|
7629
|
-
return
|
|
7630
|
-
},
|
|
7631
|
-
return (t =
|
|
7612
|
+
], sn = /^[0-9a-f]{32}$/i, cn = function(e) {
|
|
7613
|
+
return rn[(4026531840 & e) >>> 28][(251658240 & e) >>> 24] << 24 | rn[(15728640 & e) >>> 20][(983040 & e) >>> 16] << 16 | rn[(61440 & e) >>> 12][(3840 & e) >>> 8] << 8 | rn[(240 & e) >>> 4][(15 & e) >>> 0] << 0;
|
|
7614
|
+
}, ln = function(e) {
|
|
7615
|
+
return (t = cn(e)) ^ tn(t, 2) ^ tn(t, 10) ^ tn(t, 18) ^ tn(t, 24);
|
|
7632
7616
|
var t;
|
|
7633
|
-
},
|
|
7617
|
+
}, un = function(e) {
|
|
7634
7618
|
var t, n = Array(36);
|
|
7635
|
-
n[0] = e[0] ^
|
|
7636
|
-
for (var r = Array(32), i = 0; i < 32; i++) n[i + 4] = n[i] ^ (t =
|
|
7619
|
+
n[0] = e[0] ^ an[0], n[1] = e[1] ^ an[1], n[2] = e[2] ^ an[2], n[3] = e[3] ^ an[3];
|
|
7620
|
+
for (var r = Array(32), i = 0; i < 32; i++) n[i + 4] = n[i] ^ (t = cn(n[i + 1] ^ n[i + 2] ^ n[i + 3] ^ on[i])) ^ tn(t, 13) ^ tn(t, 23), r[i] = n[i + 4];
|
|
7637
7621
|
return r;
|
|
7638
|
-
},
|
|
7639
|
-
for (var n =
|
|
7622
|
+
}, dn = function(e, t) {
|
|
7623
|
+
for (var n = un(t), r = 0; r < 32; r++) e[r + 4] = e[r] ^ ln(e[r + 1] ^ e[r + 2] ^ e[r + 3] ^ n[r]);
|
|
7640
7624
|
return [
|
|
7641
7625
|
e[35],
|
|
7642
7626
|
e[34],
|
|
7643
7627
|
e[33],
|
|
7644
7628
|
e[32]
|
|
7645
7629
|
];
|
|
7646
|
-
},
|
|
7647
|
-
for (var n =
|
|
7630
|
+
}, fn = function(e, t) {
|
|
7631
|
+
for (var n = un(t).reverse(), r = 0; r < 32; r++) e[r + 4] = e[r] ^ ln(e[r + 1] ^ e[r + 2] ^ e[r + 3] ^ n[r]);
|
|
7648
7632
|
return [
|
|
7649
7633
|
e[35],
|
|
7650
7634
|
e[34],
|
|
7651
7635
|
e[33],
|
|
7652
7636
|
e[32]
|
|
7653
7637
|
];
|
|
7654
|
-
},
|
|
7638
|
+
}, pn = function(e) {
|
|
7655
7639
|
return [
|
|
7656
7640
|
e.readInt32BE(0),
|
|
7657
7641
|
e.readInt32BE(4),
|
|
7658
7642
|
e.readInt32BE(8),
|
|
7659
7643
|
e.readInt32BE(12)
|
|
7660
7644
|
];
|
|
7661
|
-
},
|
|
7645
|
+
}, mn = function(e) {
|
|
7662
7646
|
for (var t = Z.Buffer.alloc(16), n = 0; n < 4; n++) t.writeInt32BE(e[n], 4 * n);
|
|
7663
7647
|
return t;
|
|
7664
|
-
},
|
|
7648
|
+
}, hn = {
|
|
7665
7649
|
__proto__: null,
|
|
7666
7650
|
constants: {
|
|
7667
7651
|
ECB: 1,
|
|
@@ -7670,41 +7654,41 @@ var ln = [
|
|
|
7670
7654
|
encrypt: function(e, t, n) {
|
|
7671
7655
|
var r = n || {}, i = r.mode, a = r.iv, o = r.outputEncoding;
|
|
7672
7656
|
if (typeof e == "string" ? e = Z.Buffer.from(e, r.inputEncoding || "utf8") : e instanceof ArrayBuffer && (e = Z.Buffer.from(e)), !Z.Buffer.isBuffer(e)) throw TypeError("Expected \"string\" | \"Buffer\" | \"ArrayBuffer\" but received \"" + Object.prototype.toString.call(e) + "\"");
|
|
7673
|
-
if (!
|
|
7674
|
-
if (t = Z.Buffer.from(t, "hex"), i === 2 && !
|
|
7657
|
+
if (!sn.test(t)) throw TypeError("Invalid value of cipher `key`");
|
|
7658
|
+
if (t = Z.Buffer.from(t, "hex"), i === 2 && !sn.test(a)) throw TypeError("Invalid value of `iv` option");
|
|
7675
7659
|
return function(e, t, n, r) {
|
|
7676
|
-
n &&=
|
|
7660
|
+
n &&= pn(n), t = pn(t);
|
|
7677
7661
|
for (var i = [], a = (e = function(e) {
|
|
7678
7662
|
var t = 16 - e.length % 16, n = Z.Buffer.alloc(t, t);
|
|
7679
7663
|
return Z.Buffer.concat([e, n], e.length + t);
|
|
7680
7664
|
}(e)).length / 16, o = 0; o < a; o++) if (n) {
|
|
7681
|
-
var s = 16 * o, c =
|
|
7665
|
+
var s = 16 * o, c = dn([
|
|
7682
7666
|
n[0] ^ e.readInt32BE(s),
|
|
7683
7667
|
n[1] ^ e.readInt32BE(s + 4),
|
|
7684
7668
|
n[2] ^ e.readInt32BE(s + 8),
|
|
7685
7669
|
n[3] ^ e.readInt32BE(s + 12)
|
|
7686
7670
|
], t);
|
|
7687
|
-
i.push(
|
|
7671
|
+
i.push(mn(c)), n = c.slice(0);
|
|
7688
7672
|
} else {
|
|
7689
|
-
var l = 16 * o, u =
|
|
7673
|
+
var l = 16 * o, u = dn([
|
|
7690
7674
|
e.readInt32BE(l),
|
|
7691
7675
|
e.readInt32BE(l + 4),
|
|
7692
7676
|
e.readInt32BE(l + 8),
|
|
7693
7677
|
e.readInt32BE(l + 12)
|
|
7694
7678
|
], t);
|
|
7695
|
-
i.push(
|
|
7679
|
+
i.push(mn(u));
|
|
7696
7680
|
}
|
|
7697
7681
|
var d = Z.Buffer.concat(i, e.length);
|
|
7698
|
-
return r ? d.toString(r) : (0,
|
|
7682
|
+
return r ? d.toString(r) : (0, Zt.default)(d);
|
|
7699
7683
|
}(e, t, a = i === 2 ? Z.Buffer.from(a, "hex") : null, o);
|
|
7700
7684
|
},
|
|
7701
7685
|
decrypt: function(e, t, n) {
|
|
7702
7686
|
var r = n || {}, i = r.mode, a = r.iv, o = r.outputEncoding;
|
|
7703
7687
|
if (typeof e == "string" ? e = Z.Buffer.from(e, r.inputEncoding) : e instanceof ArrayBuffer && (e = Z.Buffer.from(e)), !Z.Buffer.isBuffer(e)) throw TypeError("Expected \"string\" | \"Buffer\" | \"ArrayBuffer\" but received \"" + Object.prototype.toString.call(e) + "\"");
|
|
7704
|
-
if (!
|
|
7705
|
-
if (t = Z.Buffer.from(t, "hex"), i === 2 && !
|
|
7688
|
+
if (!sn.test(t)) throw TypeError("Invalid value of cipher `key`");
|
|
7689
|
+
if (t = Z.Buffer.from(t, "hex"), i === 2 && !sn.test(a)) throw TypeError("Invalid value of `iv` option");
|
|
7706
7690
|
return function(e, t, n, r) {
|
|
7707
|
-
n &&=
|
|
7691
|
+
n &&= pn(n), t = pn(t);
|
|
7708
7692
|
var i = [], a = e.length / 16;
|
|
7709
7693
|
if (n) for (var o = a - 1; o >= 0; o--) {
|
|
7710
7694
|
var s, c = 16 * o;
|
|
@@ -7714,13 +7698,13 @@ var ln = [
|
|
|
7714
7698
|
e.readInt32BE(c - 16 + 8),
|
|
7715
7699
|
e.readInt32BE(c - 16 + 12)
|
|
7716
7700
|
] : n;
|
|
7717
|
-
var l =
|
|
7701
|
+
var l = fn([
|
|
7718
7702
|
e.readInt32BE(c),
|
|
7719
7703
|
e.readInt32BE(c + 4),
|
|
7720
7704
|
e.readInt32BE(c + 8),
|
|
7721
7705
|
e.readInt32BE(c + 12)
|
|
7722
7706
|
], t);
|
|
7723
|
-
i.unshift(
|
|
7707
|
+
i.unshift(mn([
|
|
7724
7708
|
l[0] ^ s[0],
|
|
7725
7709
|
l[1] ^ s[1],
|
|
7726
7710
|
l[2] ^ s[2],
|
|
@@ -7728,120 +7712,120 @@ var ln = [
|
|
|
7728
7712
|
]));
|
|
7729
7713
|
}
|
|
7730
7714
|
else for (var u = 0; u < a; u++) {
|
|
7731
|
-
var d = 16 * u, f =
|
|
7715
|
+
var d = 16 * u, f = fn([
|
|
7732
7716
|
e.readInt32BE(d),
|
|
7733
7717
|
e.readInt32BE(d + 4),
|
|
7734
7718
|
e.readInt32BE(d + 8),
|
|
7735
7719
|
e.readInt32BE(d + 12)
|
|
7736
7720
|
], t);
|
|
7737
|
-
i.push(
|
|
7721
|
+
i.push(mn(f));
|
|
7738
7722
|
}
|
|
7739
7723
|
var p = Z.Buffer.concat(i, e.length - i[i.length - 1][15]);
|
|
7740
|
-
return r ? p.toString(r) : (0,
|
|
7724
|
+
return r ? p.toString(r) : (0, Zt.default)(p);
|
|
7741
7725
|
}(e, t, a = i === 2 ? Z.Buffer.from(a, "hex") : null, o);
|
|
7742
7726
|
}
|
|
7743
7727
|
};
|
|
7744
7728
|
//#endregion
|
|
7745
7729
|
//#region src/cryptoAlg/sm4-cbc.ts
|
|
7746
|
-
function
|
|
7730
|
+
function gn(e) {
|
|
7747
7731
|
return new Promise((t) => {
|
|
7748
|
-
let
|
|
7749
|
-
t(
|
|
7750
|
-
iv:
|
|
7751
|
-
mode:
|
|
7732
|
+
let r = n.use().key || "0123456789abcdeffedcba9876543210", i = n.use().iv || "0123456789abcdeffedcba9876543210";
|
|
7733
|
+
t(hn.encrypt(e, r.toLowerCase(), {
|
|
7734
|
+
iv: i,
|
|
7735
|
+
mode: hn.constants.CBC,
|
|
7752
7736
|
inputEncoding: "utf8",
|
|
7753
7737
|
outputEncoding: "base64"
|
|
7754
7738
|
}).replaceAll(/\+/g, "-").replaceAll(/\//g, "_").replaceAll(/=/g, ""));
|
|
7755
7739
|
});
|
|
7756
7740
|
}
|
|
7757
|
-
function
|
|
7741
|
+
function _n(e) {
|
|
7758
7742
|
return new Promise((t) => {
|
|
7759
|
-
let
|
|
7760
|
-
for (;
|
|
7761
|
-
let
|
|
7762
|
-
iv:
|
|
7763
|
-
mode:
|
|
7743
|
+
let r = n.use().key || "0123456789abcdeffedcba9876543210", i = n.use().iv || "0123456789abcdeffedcba9876543210", a = e.replaceAll(/-/g, "+").replaceAll(/_/g, "/");
|
|
7744
|
+
for (; a.length % 4;) a += "=";
|
|
7745
|
+
let o = hn.decrypt(a, r.toLowerCase(), {
|
|
7746
|
+
iv: i,
|
|
7747
|
+
mode: hn.constants.CBC,
|
|
7764
7748
|
inputEncoding: "base64",
|
|
7765
7749
|
outputEncoding: "utf8"
|
|
7766
7750
|
});
|
|
7767
7751
|
try {
|
|
7768
|
-
t(JSON.parse(
|
|
7752
|
+
t(JSON.parse(o));
|
|
7769
7753
|
} catch {
|
|
7770
|
-
t(
|
|
7754
|
+
t(o);
|
|
7771
7755
|
}
|
|
7772
7756
|
});
|
|
7773
7757
|
}
|
|
7774
|
-
function
|
|
7758
|
+
function vn() {
|
|
7775
7759
|
return {
|
|
7776
7760
|
name: "sm4-cbc",
|
|
7777
|
-
encrypt:
|
|
7778
|
-
decrypt:
|
|
7761
|
+
encrypt: gn,
|
|
7762
|
+
decrypt: _n
|
|
7779
7763
|
};
|
|
7780
7764
|
}
|
|
7781
7765
|
//#endregion
|
|
7782
7766
|
//#region src/cryptoAlg/sm4-ecb.ts
|
|
7783
|
-
function
|
|
7767
|
+
function yn(e) {
|
|
7784
7768
|
return new Promise((t) => {
|
|
7785
|
-
let
|
|
7786
|
-
t(
|
|
7787
|
-
mode:
|
|
7769
|
+
let r = n.use().key || "0123456789abcdeffedcba9876543210";
|
|
7770
|
+
t(hn.encrypt(e, r.toLowerCase(), {
|
|
7771
|
+
mode: hn.constants.ECB,
|
|
7788
7772
|
inputEncoding: "utf8",
|
|
7789
7773
|
outputEncoding: "base64"
|
|
7790
7774
|
}).replaceAll(/\+/g, "-").replaceAll(/\//g, "_").replaceAll(/=/g, ""));
|
|
7791
7775
|
});
|
|
7792
7776
|
}
|
|
7793
|
-
function
|
|
7777
|
+
function bn(e) {
|
|
7794
7778
|
return new Promise((t) => {
|
|
7795
|
-
let
|
|
7796
|
-
for (;
|
|
7797
|
-
let
|
|
7798
|
-
mode:
|
|
7779
|
+
let r = n.use().key || "0123456789abcdeffedcba9876543210", i = e.replaceAll(/-/g, "+").replaceAll(/_/g, "/");
|
|
7780
|
+
for (; i.length % 4;) i += "=";
|
|
7781
|
+
let a = hn.decrypt(i, r.toLowerCase(), {
|
|
7782
|
+
mode: hn.constants.ECB,
|
|
7799
7783
|
inputEncoding: "base64",
|
|
7800
7784
|
outputEncoding: "utf8"
|
|
7801
7785
|
});
|
|
7802
7786
|
try {
|
|
7803
|
-
t(JSON.parse(
|
|
7787
|
+
t(JSON.parse(a));
|
|
7804
7788
|
} catch {
|
|
7805
|
-
t(
|
|
7789
|
+
t(a);
|
|
7806
7790
|
}
|
|
7807
7791
|
});
|
|
7808
7792
|
}
|
|
7809
|
-
function
|
|
7793
|
+
function xn() {
|
|
7810
7794
|
return {
|
|
7811
7795
|
name: "sm4-ecb",
|
|
7812
|
-
encrypt:
|
|
7813
|
-
decrypt:
|
|
7796
|
+
encrypt: yn,
|
|
7797
|
+
decrypt: bn
|
|
7814
7798
|
};
|
|
7815
7799
|
}
|
|
7816
|
-
|
|
7817
|
-
function
|
|
7818
|
-
let { request:
|
|
7819
|
-
return
|
|
7800
|
+
i("crypto", g.pages), r("crypto", g.icons);
|
|
7801
|
+
function Sn(r) {
|
|
7802
|
+
let { request: i, cryptoSetting: a } = r;
|
|
7803
|
+
return e.set({ request: i }), n.set({
|
|
7820
7804
|
isCrypto: !1,
|
|
7821
7805
|
cryptoMode: !1,
|
|
7822
|
-
cryptoSetting:
|
|
7806
|
+
cryptoSetting: _e()
|
|
7823
7807
|
}), {
|
|
7824
7808
|
name: "pubinfo-pr:crypto",
|
|
7825
7809
|
enforce: "pre",
|
|
7826
7810
|
async setup() {
|
|
7827
|
-
let { data: e } = await
|
|
7828
|
-
|
|
7811
|
+
let { data: e } = await Wt(t()), r = Gt(32), i = Gt(32);
|
|
7812
|
+
n.callAsync({
|
|
7829
7813
|
publicKey: e.publicKey,
|
|
7830
7814
|
isCrypto: e.cryptoEnabled || !1,
|
|
7831
|
-
cryptoSetting:
|
|
7815
|
+
cryptoSetting: a,
|
|
7832
7816
|
cryptoMode: e.cryptoMode,
|
|
7833
7817
|
whiteListUrls: e.cryptoWhitePath,
|
|
7834
|
-
iv:
|
|
7835
|
-
key:
|
|
7818
|
+
iv: i,
|
|
7819
|
+
key: r
|
|
7836
7820
|
}, () => {});
|
|
7837
7821
|
},
|
|
7838
7822
|
hooks: {
|
|
7839
7823
|
"http:request": async (e) => {
|
|
7840
|
-
!e.config?.headers?.["X-Crypyto-Key"] &&
|
|
7824
|
+
!e.config?.headers?.["X-Crypyto-Key"] && zt(e.url, n.use().isCrypto, n.use().cryptoMode, n.use().whiteListUrls) && await Ht(e, n.use().cryptoSetting);
|
|
7841
7825
|
},
|
|
7842
|
-
"http:response": { onSuccess: async (e) => (e.config?.responseType !== "blob" &&
|
|
7826
|
+
"http:response": { onSuccess: async (e) => (e.config?.responseType !== "blob" && zt(e.config.url, n.use().isCrypto, n.use().cryptoMode, n.use().whiteListUrls) && await Ut(e, n.use().cryptoSetting), e) }
|
|
7843
7827
|
}
|
|
7844
7828
|
};
|
|
7845
7829
|
}
|
|
7846
7830
|
//#endregion
|
|
7847
|
-
export {
|
|
7831
|
+
export { Sn as crypto, n as cryptoContext, _e as setupAes, vn as setupSm4Cbc, xn as setupSm4Ecb, f as t };
|