module-develop-kit 0.1.0 → 0.1.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.es.js CHANGED
@@ -1,37 +1,37 @@
1
- var at = { exports: {} }, li = at.exports, Pt;
2
- function lt() {
1
+ var lt = { exports: {} }, ai = lt.exports, Pt;
2
+ function at() {
3
3
  return Pt || (Pt = 1, function(v, z) {
4
4
  (function() {
5
- var S, T = 244837814094590, I = (T & 16777215) == 15715070;
5
+ var S, y = 244837814094590, I = (y & 16777215) == 15715070;
6
6
  function r(t, e, i) {
7
7
  t != null && (typeof t == "number" ? this.fromNumber(t, e, i) : e == null && typeof t != "string" ? this.fromString(t, 256) : this.fromString(t, e));
8
8
  }
9
9
  function g() {
10
10
  return new r(null);
11
11
  }
12
- function c(t, e, i, n, u, a) {
13
- for (; --a >= 0; ) {
14
- var b = e * this[t++] + i[n] + u;
15
- u = Math.floor(b / 67108864), i[n++] = b & 67108863;
12
+ function c(t, e, i, n, u, l) {
13
+ for (; --l >= 0; ) {
14
+ var T = e * this[t++] + i[n] + u;
15
+ u = Math.floor(T / 67108864), i[n++] = T & 67108863;
16
16
  }
17
17
  return u;
18
18
  }
19
- function y(t, e, i, n, u, a) {
20
- for (var b = e & 32767, F = e >> 15; --a >= 0; ) {
21
- var V = this[t] & 32767, j = this[t++] >> 15, $ = F * V + j * b;
22
- V = b * V + (($ & 32767) << 15) + i[n] + (u & 1073741823), u = (V >>> 30) + ($ >>> 15) + F * j + (u >>> 30), i[n++] = V & 1073741823;
19
+ function b(t, e, i, n, u, l) {
20
+ for (var T = e & 32767, F = e >> 15; --l >= 0; ) {
21
+ var V = this[t] & 32767, k = this[t++] >> 15, $ = F * V + k * T;
22
+ V = T * V + (($ & 32767) << 15) + i[n] + (u & 1073741823), u = (V >>> 30) + ($ >>> 15) + F * k + (u >>> 30), i[n++] = V & 1073741823;
23
23
  }
24
24
  return u;
25
25
  }
26
- function p(t, e, i, n, u, a) {
27
- for (var b = e & 16383, F = e >> 14; --a >= 0; ) {
28
- var V = this[t] & 16383, j = this[t++] >> 14, $ = F * V + j * b;
29
- V = b * V + (($ & 16383) << 14) + i[n] + u, u = (V >> 28) + ($ >> 14) + F * j, i[n++] = V & 268435455;
26
+ function p(t, e, i, n, u, l) {
27
+ for (var T = e & 16383, F = e >> 14; --l >= 0; ) {
28
+ var V = this[t] & 16383, k = this[t++] >> 14, $ = F * V + k * T;
29
+ V = T * V + (($ & 16383) << 14) + i[n] + u, u = (V >> 28) + ($ >> 14) + F * k, i[n++] = V & 268435455;
30
30
  }
31
31
  return u;
32
32
  }
33
33
  var d = typeof navigator < "u";
34
- d && I && navigator.appName == "Microsoft Internet Explorer" ? (r.prototype.am = y, S = 30) : d && I && navigator.appName != "Netscape" ? (r.prototype.am = c, S = 26) : (r.prototype.am = p, S = 28), r.prototype.DB = S, r.prototype.DM = (1 << S) - 1, r.prototype.DV = 1 << S;
34
+ d && I && navigator.appName == "Microsoft Internet Explorer" ? (r.prototype.am = b, S = 30) : d && I && navigator.appName != "Netscape" ? (r.prototype.am = c, S = 26) : (r.prototype.am = p, S = 28), r.prototype.DB = S, r.prototype.DM = (1 << S) - 1, r.prototype.DV = 1 << S;
35
35
  var w = 52;
36
36
  r.prototype.FV = Math.pow(2, w), r.prototype.F1 = w - S, r.prototype.F2 = 2 * S - w;
37
37
  var B = "0123456789abcdefghijklmnopqrstuvwxyz", E = new Array(), D, M;
@@ -41,7 +41,7 @@ function lt() {
41
41
  function f(t) {
42
42
  return B.charAt(t);
43
43
  }
44
- function l(t, e) {
44
+ function a(t, e) {
45
45
  var i = E[t.charCodeAt(e)];
46
46
  return i ?? -1;
47
47
  }
@@ -69,15 +69,15 @@ function lt() {
69
69
  return;
70
70
  }
71
71
  this.t = 0, this.s = 0;
72
- for (var n = t.length, u = !1, a = 0; --n >= 0; ) {
73
- var b = i == 8 ? t[n] & 255 : l(t, n);
74
- if (b < 0) {
72
+ for (var n = t.length, u = !1, l = 0; --n >= 0; ) {
73
+ var T = i == 8 ? t[n] & 255 : a(t, n);
74
+ if (T < 0) {
75
75
  t.charAt(n) == "-" && (u = !0);
76
76
  continue;
77
77
  }
78
- u = !1, a == 0 ? this[this.t++] = b : a + i > this.DB ? (this[this.t - 1] |= (b & (1 << this.DB - a) - 1) << a, this[this.t++] = b >> this.DB - a) : this[this.t - 1] |= b << a, a += i, a >= this.DB && (a -= this.DB);
78
+ u = !1, l == 0 ? this[this.t++] = T : l + i > this.DB ? (this[this.t - 1] |= (T & (1 << this.DB - l) - 1) << l, this[this.t++] = T >> this.DB - l) : this[this.t - 1] |= T << l, l += i, l >= this.DB && (l -= this.DB);
79
79
  }
80
- i == 8 && (t[0] & 128) != 0 && (this.s = -1, a > 0 && (this[this.t - 1] |= (1 << this.DB - a) - 1 << a)), this.clamp(), u && r.ZERO.subTo(this, this);
80
+ i == 8 && (t[0] & 128) != 0 && (this.s = -1, l > 0 && (this[this.t - 1] |= (1 << this.DB - l) - 1 << l)), this.clamp(), u && r.ZERO.subTo(this, this);
81
81
  }
82
82
  function m() {
83
83
  for (var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t; ) --this.t;
@@ -91,11 +91,11 @@ function lt() {
91
91
  else if (t == 32) e = 5;
92
92
  else if (t == 4) e = 2;
93
93
  else return this.toRadix(t);
94
- var i = (1 << e) - 1, n, u = !1, a = "", b = this.t, F = this.DB - b * this.DB % e;
95
- if (b-- > 0)
96
- for (F < this.DB && (n = this[b] >> F) > 0 && (u = !0, a = f(n)); b >= 0; )
97
- F < e ? (n = (this[b] & (1 << F) - 1) << e - F, n |= this[--b] >> (F += this.DB - e)) : (n = this[b] >> (F -= e) & i, F <= 0 && (F += this.DB, --b)), n > 0 && (u = !0), u && (a += f(n));
98
- return u ? a : "0";
94
+ var i = (1 << e) - 1, n, u = !1, l = "", T = this.t, F = this.DB - T * this.DB % e;
95
+ if (T-- > 0)
96
+ for (F < this.DB && (n = this[T] >> F) > 0 && (u = !0, l = f(n)); T >= 0; )
97
+ F < e ? (n = (this[T] & (1 << F) - 1) << e - F, n |= this[--T] >> (F += this.DB - e)) : (n = this[T] >> (F -= e) & i, F <= 0 && (F += this.DB, --T)), n > 0 && (u = !0), u && (l += f(n));
98
+ return u ? l : "0";
99
99
  }
100
100
  function P() {
101
101
  var t = g();
@@ -130,11 +130,11 @@ function lt() {
130
130
  e.t = Math.max(this.t - t, 0), e.s = this.s;
131
131
  }
132
132
  function Z(t, e) {
133
- var i = t % this.DB, n = this.DB - i, u = (1 << n) - 1, a = Math.floor(t / this.DB), b = this.s << i & this.DM, F;
133
+ var i = t % this.DB, n = this.DB - i, u = (1 << n) - 1, l = Math.floor(t / this.DB), T = this.s << i & this.DM, F;
134
134
  for (F = this.t - 1; F >= 0; --F)
135
- e[F + a + 1] = this[F] >> n | b, b = (this[F] & u) << i;
136
- for (F = a - 1; F >= 0; --F) e[F] = 0;
137
- e[a] = b, e.t = this.t + a + 1, e.s = this.s, e.clamp();
135
+ e[F + l + 1] = this[F] >> n | T, T = (this[F] & u) << i;
136
+ for (F = l - 1; F >= 0; --F) e[F] = 0;
137
+ e[l] = T, e.t = this.t + l + 1, e.s = this.s, e.clamp();
138
138
  }
139
139
  function W(t, e) {
140
140
  e.s = this.s;
@@ -143,11 +143,11 @@ function lt() {
143
143
  e.t = 0;
144
144
  return;
145
145
  }
146
- var n = t % this.DB, u = this.DB - n, a = (1 << n) - 1;
146
+ var n = t % this.DB, u = this.DB - n, l = (1 << n) - 1;
147
147
  e[0] = this[i] >> n;
148
- for (var b = i + 1; b < this.t; ++b)
149
- e[b - i - 1] |= (this[b] & a) << u, e[b - i] = this[b] >> n;
150
- n > 0 && (e[this.t - i - 1] |= (this.s & a) << u), e.t = this.t - i, e.clamp();
148
+ for (var T = i + 1; T < this.t; ++T)
149
+ e[T - i - 1] |= (this[T] & l) << u, e[T - i] = this[T] >> n;
150
+ n > 0 && (e[this.t - i - 1] |= (this.s & l) << u), e.t = this.t - i, e.clamp();
151
151
  }
152
152
  function G(t, e) {
153
153
  for (var i = 0, n = 0, u = Math.min(t.t, this.t); i < u; )
@@ -186,18 +186,18 @@ function lt() {
186
186
  return;
187
187
  }
188
188
  i == null && (i = g());
189
- var a = g(), b = this.s, F = t.s, V = this.DB - q(n[n.t - 1]);
190
- V > 0 ? (n.lShiftTo(V, a), u.lShiftTo(V, i)) : (n.copyTo(a), u.copyTo(i));
191
- var j = a.t, $ = a[j - 1];
189
+ var l = g(), T = this.s, F = t.s, V = this.DB - q(n[n.t - 1]);
190
+ V > 0 ? (n.lShiftTo(V, l), u.lShiftTo(V, i)) : (n.copyTo(l), u.copyTo(i));
191
+ var k = l.t, $ = l[k - 1];
192
192
  if ($ != 0) {
193
- var X = $ * (1 << this.F1) + (j > 1 ? a[j - 2] >> this.F2 : 0), Q = this.FV / X, ut = (1 << this.F1) / X, K = 1 << this.F2, J = i.t, ct = J - j, tt = e ?? g();
194
- for (a.dlShiftTo(ct, tt), i.compareTo(tt) >= 0 && (i[i.t++] = 1, i.subTo(tt, i)), r.ONE.dlShiftTo(j, tt), tt.subTo(a, a); a.t < j; ) a[a.t++] = 0;
193
+ var X = $ * (1 << this.F1) + (k > 1 ? l[k - 2] >> this.F2 : 0), Q = this.FV / X, ut = (1 << this.F1) / X, K = 1 << this.F2, J = i.t, ct = J - k, tt = e ?? g();
194
+ for (l.dlShiftTo(ct, tt), i.compareTo(tt) >= 0 && (i[i.t++] = 1, i.subTo(tt, i)), r.ONE.dlShiftTo(k, tt), tt.subTo(l, l); l.t < k; ) l[l.t++] = 0;
195
195
  for (; --ct >= 0; ) {
196
196
  var gt = i[--J] == $ ? this.DM : Math.floor(i[J] * Q + (i[J - 1] + K) * ut);
197
- if ((i[J] += a.am(0, gt, i, ct, 0, j)) < gt)
198
- for (a.dlShiftTo(ct, tt), i.subTo(tt, i); i[J] < --gt; ) i.subTo(tt, i);
197
+ if ((i[J] += l.am(0, gt, i, ct, 0, k)) < gt)
198
+ for (l.dlShiftTo(ct, tt), i.subTo(tt, i); i[J] < --gt; ) i.subTo(tt, i);
199
199
  }
200
- e != null && (i.drShiftTo(j, e), b != F && r.ZERO.subTo(e, e)), i.t = j, i.clamp(), V > 0 && i.rShiftTo(V, i), b < 0 && r.ZERO.subTo(i, i);
200
+ e != null && (i.drShiftTo(k, e), T != F && r.ZERO.subTo(e, e)), i.t = k, i.clamp(), V > 0 && i.rShiftTo(V, i), T < 0 && r.ZERO.subTo(i, i);
201
201
  }
202
202
  }
203
203
  }
@@ -208,7 +208,7 @@ function lt() {
208
208
  function A(t) {
209
209
  this.m = t;
210
210
  }
211
- function jt(t) {
211
+ function kt(t) {
212
212
  return t.s < 0 || t.compareTo(this.m) >= 0 ? t.mod(this.m) : t;
213
213
  }
214
214
  function Ut(t) {
@@ -223,7 +223,7 @@ function lt() {
223
223
  function Xt(t, e) {
224
224
  t.squareTo(e), this.reduce(e);
225
225
  }
226
- A.prototype.convert = jt, A.prototype.revert = Ut, A.prototype.reduce = Zt, A.prototype.mulTo = _t, A.prototype.sqrTo = Xt;
226
+ A.prototype.convert = kt, A.prototype.revert = Ut, A.prototype.reduce = Zt, A.prototype.mulTo = _t, A.prototype.sqrTo = Xt;
227
227
  function $t() {
228
228
  if (this.t < 1) return 0;
229
229
  var t = this[0];
@@ -264,12 +264,12 @@ function lt() {
264
264
  }
265
265
  function te(t, e) {
266
266
  if (t > 4294967295 || t < 1) return r.ONE;
267
- var i = g(), n = g(), u = e.convert(this), a = q(t) - 1;
268
- for (u.copyTo(i); --a >= 0; )
269
- if (e.sqrTo(i, n), (t & 1 << a) > 0) e.mulTo(n, u, i);
267
+ var i = g(), n = g(), u = e.convert(this), l = q(t) - 1;
268
+ for (u.copyTo(i); --l >= 0; )
269
+ if (e.sqrTo(i, n), (t & 1 << l) > 0) e.mulTo(n, u, i);
270
270
  else {
271
- var b = i;
272
- i = n, n = b;
271
+ var T = i;
272
+ i = n, n = T;
273
273
  }
274
274
  return e.revert(i);
275
275
  }
@@ -306,22 +306,22 @@ function lt() {
306
306
  }
307
307
  function he(t) {
308
308
  if (t == null && (t = 10), this.signum() == 0 || t < 2 || t > 36) return "0";
309
- var e = this.chunkSize(t), i = Math.pow(t, e), n = x(i), u = g(), a = g(), b = "";
310
- for (this.divRemTo(n, u, a); u.signum() > 0; )
311
- b = (i + a.intValue()).toString(t).substr(1) + b, u.divRemTo(n, u, a);
312
- return a.intValue().toString(t) + b;
309
+ var e = this.chunkSize(t), i = Math.pow(t, e), n = x(i), u = g(), l = g(), T = "";
310
+ for (this.divRemTo(n, u, l); u.signum() > 0; )
311
+ T = (i + l.intValue()).toString(t).substr(1) + T, u.divRemTo(n, u, l);
312
+ return l.intValue().toString(t) + T;
313
313
  }
314
314
  function ue(t, e) {
315
315
  this.fromInt(0), e == null && (e = 10);
316
- for (var i = this.chunkSize(e), n = Math.pow(e, i), u = !1, a = 0, b = 0, F = 0; F < t.length; ++F) {
317
- var V = l(t, F);
316
+ for (var i = this.chunkSize(e), n = Math.pow(e, i), u = !1, l = 0, T = 0, F = 0; F < t.length; ++F) {
317
+ var V = a(t, F);
318
318
  if (V < 0) {
319
319
  t.charAt(F) == "-" && this.signum() == 0 && (u = !0);
320
320
  continue;
321
321
  }
322
- b = e * b + V, ++a >= i && (this.dMultiply(n), this.dAddOffset(b, 0), a = 0, b = 0);
322
+ T = e * T + V, ++l >= i && (this.dMultiply(n), this.dAddOffset(T, 0), l = 0, T = 0);
323
323
  }
324
- a > 0 && (this.dMultiply(Math.pow(e, a)), this.dAddOffset(b, 0)), u && r.ZERO.subTo(this, this);
324
+ l > 0 && (this.dMultiply(Math.pow(e, l)), this.dAddOffset(T, 0)), u && r.ZERO.subTo(this, this);
325
325
  }
326
326
  function ce(t, e, i) {
327
327
  if (typeof e == "number")
@@ -334,7 +334,7 @@ function lt() {
334
334
  n.length = (t >> 3) + 1, e.nextBytes(n), u > 0 ? n[0] &= (1 << u) - 1 : n[0] = 0, this.fromString(n, 256);
335
335
  }
336
336
  }
337
- function ae() {
337
+ function le() {
338
338
  var t = this.t, e = new Array();
339
339
  e[0] = this.s;
340
340
  var i = this.DB - t * this.DB % 8, n, u = 0;
@@ -343,7 +343,7 @@ function lt() {
343
343
  i < 8 ? (n = (this[t] & (1 << i) - 1) << 8 - i, n |= this[--t] >> (i += this.DB - 8)) : (n = this[t] >> (i -= 8) & 255, i <= 0 && (i += this.DB, --t)), (n & 128) != 0 && (n |= -256), u == 0 && (this.s & 128) != (n & 128) && ++u, (u > 0 || n != this.s) && (e[u++] = n);
344
344
  return e;
345
345
  }
346
- function le(t) {
346
+ function ae(t) {
347
347
  return this.compareTo(t) == 0;
348
348
  }
349
349
  function xe(t) {
@@ -353,13 +353,13 @@ function lt() {
353
353
  return this.compareTo(t) > 0 ? this : t;
354
354
  }
355
355
  function de(t, e, i) {
356
- var n, u, a = Math.min(t.t, this.t);
357
- for (n = 0; n < a; ++n) i[n] = e(this[n], t[n]);
356
+ var n, u, l = Math.min(t.t, this.t);
357
+ for (n = 0; n < l; ++n) i[n] = e(this[n], t[n]);
358
358
  if (t.t < this.t) {
359
- for (u = t.s & this.DM, n = a; n < this.t; ++n) i[n] = e(this[n], u);
359
+ for (u = t.s & this.DM, n = l; n < this.t; ++n) i[n] = e(this[n], u);
360
360
  i.t = this.t;
361
361
  } else {
362
- for (u = this.s & this.DM, n = a; n < t.t; ++n) i[n] = e(u, t[n]);
362
+ for (u = this.s & this.DM, n = l; n < t.t; ++n) i[n] = e(u, t[n]);
363
363
  i.t = t.t;
364
364
  }
365
365
  i.s = e(this.s, t.s), i.clamp();
@@ -482,10 +482,10 @@ function lt() {
482
482
  var e = g(), i = g();
483
483
  return this.divRemTo(t, e, i), new Array(e, i);
484
484
  }
485
- function ke(t) {
485
+ function je(t) {
486
486
  this[this.t] = this.am(0, t - 1, this, 0, 0, this.t), ++this.t, this.clamp();
487
487
  }
488
- function je(t, e) {
488
+ function ke(t, e) {
489
489
  if (t != 0) {
490
490
  for (; this.t <= e; ) this[this.t++] = 0;
491
491
  for (this[e] += t; this[e] >= this.DV; )
@@ -547,30 +547,30 @@ function lt() {
547
547
  }
548
548
  it.prototype.convert = Ge, it.prototype.revert = Ye, it.prototype.reduce = Ke, it.prototype.mulTo = We, it.prototype.sqrTo = Je;
549
549
  function Qe(t, e) {
550
- var i = t.bitLength(), n, u = x(1), a;
550
+ var i = t.bitLength(), n, u = x(1), l;
551
551
  if (i <= 0) return u;
552
- i < 18 ? n = 1 : i < 48 ? n = 3 : i < 144 ? n = 4 : i < 768 ? n = 5 : n = 6, i < 8 ? a = new A(e) : e.isEven() ? a = new it(e) : a = new et(e);
553
- var b = new Array(), F = 3, V = n - 1, j = (1 << n) - 1;
554
- if (b[1] = a.convert(this), n > 1) {
552
+ i < 18 ? n = 1 : i < 48 ? n = 3 : i < 144 ? n = 4 : i < 768 ? n = 5 : n = 6, i < 8 ? l = new A(e) : e.isEven() ? l = new it(e) : l = new et(e);
553
+ var T = new Array(), F = 3, V = n - 1, k = (1 << n) - 1;
554
+ if (T[1] = l.convert(this), n > 1) {
555
555
  var $ = g();
556
- for (a.sqrTo(b[1], $); F <= j; )
557
- b[F] = g(), a.mulTo($, b[F - 2], b[F]), F += 2;
556
+ for (l.sqrTo(T[1], $); F <= k; )
557
+ T[F] = g(), l.mulTo($, T[F - 2], T[F]), F += 2;
558
558
  }
559
559
  var X = t.t - 1, Q, ut = !0, K = g(), J;
560
560
  for (i = q(t[X]) - 1; X >= 0; ) {
561
- for (i >= V ? Q = t[X] >> i - V & j : (Q = (t[X] & (1 << i + 1) - 1) << V - i, X > 0 && (Q |= t[X - 1] >> this.DB + i - V)), F = n; (Q & 1) == 0; )
561
+ for (i >= V ? Q = t[X] >> i - V & k : (Q = (t[X] & (1 << i + 1) - 1) << V - i, X > 0 && (Q |= t[X - 1] >> this.DB + i - V)), F = n; (Q & 1) == 0; )
562
562
  Q >>= 1, --F;
563
563
  if ((i -= F) < 0 && (i += this.DB, --X), ut)
564
- b[Q].copyTo(u), ut = !1;
564
+ T[Q].copyTo(u), ut = !1;
565
565
  else {
566
566
  for (; F > 1; )
567
- a.sqrTo(u, K), a.sqrTo(K, u), F -= 2;
568
- F > 0 ? a.sqrTo(u, K) : (J = u, u = K, K = J), a.mulTo(K, b[Q], u);
567
+ l.sqrTo(u, K), l.sqrTo(K, u), F -= 2;
568
+ F > 0 ? l.sqrTo(u, K) : (J = u, u = K, K = J), l.mulTo(K, T[Q], u);
569
569
  }
570
570
  for (; X >= 0 && (t[X] & 1 << i) == 0; )
571
- a.sqrTo(u, K), J = u, u = K, K = J, --i < 0 && (i = this.DB - 1, --X);
571
+ l.sqrTo(u, K), J = u, u = K, K = J, --i < 0 && (i = this.DB - 1, --X);
572
572
  }
573
- return a.revert(u);
573
+ return l.revert(u);
574
574
  }
575
575
  function ti(t) {
576
576
  var e = this.s < 0 ? this.negate() : this.clone(), i = t.s < 0 ? t.negate() : t.clone();
@@ -578,11 +578,11 @@ function lt() {
578
578
  var n = e;
579
579
  e = i, i = n;
580
580
  }
581
- var u = e.getLowestSetBit(), a = i.getLowestSetBit();
582
- if (a < 0) return e;
583
- for (u < a && (a = u), a > 0 && (e.rShiftTo(a, e), i.rShiftTo(a, i)); e.signum() > 0; )
581
+ var u = e.getLowestSetBit(), l = i.getLowestSetBit();
582
+ if (l < 0) return e;
583
+ for (u < l && (l = u), l > 0 && (e.rShiftTo(l, e), i.rShiftTo(l, i)); e.signum() > 0; )
584
584
  (u = e.getLowestSetBit()) > 0 && e.rShiftTo(u, e), (u = i.getLowestSetBit()) > 0 && i.rShiftTo(u, i), e.compareTo(i) >= 0 ? (e.subTo(i, e), e.rShiftTo(1, e)) : (i.subTo(e, i), i.rShiftTo(1, i));
585
- return a > 0 && i.lShiftTo(a, i), i;
585
+ return l > 0 && i.lShiftTo(l, i), i;
586
586
  }
587
587
  function ei(t) {
588
588
  if (t <= 0) return 0;
@@ -595,12 +595,12 @@ function lt() {
595
595
  function ii(t) {
596
596
  var e = t.isEven();
597
597
  if (this.isEven() && e || t.signum() == 0) return r.ZERO;
598
- for (var i = t.clone(), n = this.clone(), u = x(1), a = x(0), b = x(0), F = x(1); i.signum() != 0; ) {
598
+ for (var i = t.clone(), n = this.clone(), u = x(1), l = x(0), T = x(0), F = x(1); i.signum() != 0; ) {
599
599
  for (; i.isEven(); )
600
- i.rShiftTo(1, i), e ? ((!u.isEven() || !a.isEven()) && (u.addTo(this, u), a.subTo(t, a)), u.rShiftTo(1, u)) : a.isEven() || a.subTo(t, a), a.rShiftTo(1, a);
600
+ i.rShiftTo(1, i), e ? ((!u.isEven() || !l.isEven()) && (u.addTo(this, u), l.subTo(t, l)), u.rShiftTo(1, u)) : l.isEven() || l.subTo(t, l), l.rShiftTo(1, l);
601
601
  for (; n.isEven(); )
602
- n.rShiftTo(1, n), e ? ((!b.isEven() || !F.isEven()) && (b.addTo(this, b), F.subTo(t, F)), b.rShiftTo(1, b)) : F.isEven() || F.subTo(t, F), F.rShiftTo(1, F);
603
- i.compareTo(n) >= 0 ? (i.subTo(n, i), e && u.subTo(b, u), a.subTo(F, a)) : (n.subTo(i, n), e && b.subTo(u, b), F.subTo(a, F));
602
+ n.rShiftTo(1, n), e ? ((!T.isEven() || !F.isEven()) && (T.addTo(this, T), F.subTo(t, F)), T.rShiftTo(1, T)) : F.isEven() || F.subTo(t, F), F.rShiftTo(1, F);
603
+ i.compareTo(n) >= 0 ? (i.subTo(n, i), e && u.subTo(T, u), l.subTo(F, l)) : (n.subTo(i, n), e && T.subTo(u, T), F.subTo(l, F));
604
604
  }
605
605
  if (n.compareTo(r.ONE) != 0) return r.ZERO;
606
606
  if (F.compareTo(t) >= 0) return F.subtract(t);
@@ -628,48 +628,48 @@ function lt() {
628
628
  if (i <= 0) return !1;
629
629
  var n = e.shiftRight(i);
630
630
  t = t + 1 >> 1, t > U.length && (t = U.length);
631
- for (var u = g(), a = 0; a < t; ++a) {
631
+ for (var u = g(), l = 0; l < t; ++l) {
632
632
  u.fromInt(U[Math.floor(Math.random() * U.length)]);
633
- var b = u.modPow(n, this);
634
- if (b.compareTo(r.ONE) != 0 && b.compareTo(e) != 0) {
635
- for (var F = 1; F++ < i && b.compareTo(e) != 0; )
636
- if (b = b.modPowInt(2, this), b.compareTo(r.ONE) == 0) return !1;
637
- if (b.compareTo(e) != 0) return !1;
633
+ var T = u.modPow(n, this);
634
+ if (T.compareTo(r.ONE) != 0 && T.compareTo(e) != 0) {
635
+ for (var F = 1; F++ < i && T.compareTo(e) != 0; )
636
+ if (T = T.modPowInt(2, this), T.compareTo(r.ONE) == 0) return !1;
637
+ if (T.compareTo(e) != 0) return !1;
638
638
  }
639
639
  }
640
640
  return !0;
641
641
  }
642
- r.prototype.chunkSize = oe, r.prototype.toRadix = he, r.prototype.fromRadix = ue, r.prototype.fromNumber = ce, r.prototype.bitwiseTo = de, r.prototype.changeBit = Ee, r.prototype.addTo = Me, r.prototype.dMultiply = ke, r.prototype.dAddOffset = je, r.prototype.multiplyLowerTo = Xe, r.prototype.multiplyUpperTo = $e, r.prototype.modInt = ei, r.prototype.millerRabin = si, r.prototype.clone = ie, r.prototype.intValue = ne, r.prototype.byteValue = re, r.prototype.shortValue = se, r.prototype.signum = fe, r.prototype.toByteArray = ae, r.prototype.equals = le, r.prototype.min = xe, r.prototype.max = pe, r.prototype.and = me, r.prototype.or = ve, r.prototype.xor = ye, r.prototype.andNot = be, r.prototype.not = Te, r.prototype.shiftLeft = we, r.prototype.shiftRight = Fe, r.prototype.getLowestSetBit = Se, r.prototype.bitCount = qe, r.prototype.testBit = Ie, r.prototype.setBit = Re, r.prototype.clearBit = Ae, r.prototype.flipBit = Pe, r.prototype.add = Ce, r.prototype.subtract = Oe, r.prototype.multiply = He, r.prototype.divide = Le, r.prototype.remainder = Ve, r.prototype.divideAndRemainder = ze, r.prototype.modPow = Qe, r.prototype.modInverse = ii, r.prototype.pow = _e, r.prototype.gcd = ti, r.prototype.isProbablePrime = ri, r.prototype.square = Ne, r.prototype.Barrett = it;
643
- var ht, _, k;
642
+ r.prototype.chunkSize = oe, r.prototype.toRadix = he, r.prototype.fromRadix = ue, r.prototype.fromNumber = ce, r.prototype.bitwiseTo = de, r.prototype.changeBit = Ee, r.prototype.addTo = Me, r.prototype.dMultiply = je, r.prototype.dAddOffset = ke, r.prototype.multiplyLowerTo = Xe, r.prototype.multiplyUpperTo = $e, r.prototype.modInt = ei, r.prototype.millerRabin = si, r.prototype.clone = ie, r.prototype.intValue = ne, r.prototype.byteValue = re, r.prototype.shortValue = se, r.prototype.signum = fe, r.prototype.toByteArray = le, r.prototype.equals = ae, r.prototype.min = xe, r.prototype.max = pe, r.prototype.and = me, r.prototype.or = ve, r.prototype.xor = ye, r.prototype.andNot = be, r.prototype.not = Te, r.prototype.shiftLeft = we, r.prototype.shiftRight = Fe, r.prototype.getLowestSetBit = Se, r.prototype.bitCount = qe, r.prototype.testBit = Ie, r.prototype.setBit = Re, r.prototype.clearBit = Ae, r.prototype.flipBit = Pe, r.prototype.add = Ce, r.prototype.subtract = Oe, r.prototype.multiply = He, r.prototype.divide = Le, r.prototype.remainder = Ve, r.prototype.divideAndRemainder = ze, r.prototype.modPow = Qe, r.prototype.modInverse = ii, r.prototype.pow = _e, r.prototype.gcd = ti, r.prototype.isProbablePrime = ri, r.prototype.square = Ne, r.prototype.Barrett = it;
643
+ var ht, _, j;
644
644
  function oi(t) {
645
- _[k++] ^= t & 255, _[k++] ^= t >> 8 & 255, _[k++] ^= t >> 16 & 255, _[k++] ^= t >> 24 & 255, k >= dt && (k -= dt);
645
+ _[j++] ^= t & 255, _[j++] ^= t >> 8 & 255, _[j++] ^= t >> 16 & 255, _[j++] ^= t >> 24 & 255, j >= dt && (j -= dt);
646
646
  }
647
647
  function It() {
648
648
  oi((/* @__PURE__ */ new Date()).getTime());
649
649
  }
650
650
  if (_ == null) {
651
- _ = new Array(), k = 0;
651
+ _ = new Array(), j = 0;
652
652
  var Y;
653
653
  if (typeof window < "u" && window.crypto) {
654
654
  if (window.crypto.getRandomValues) {
655
655
  var Et = new Uint8Array(32);
656
656
  for (window.crypto.getRandomValues(Et), Y = 0; Y < 32; ++Y)
657
- _[k++] = Et[Y];
657
+ _[j++] = Et[Y];
658
658
  } else if (navigator.appName == "Netscape" && navigator.appVersion < "5") {
659
659
  var Rt = window.crypto.random(32);
660
660
  for (Y = 0; Y < Rt.length; ++Y)
661
- _[k++] = Rt.charCodeAt(Y) & 255;
661
+ _[j++] = Rt.charCodeAt(Y) & 255;
662
662
  }
663
663
  }
664
- for (; k < dt; )
665
- Y = Math.floor(65536 * Math.random()), _[k++] = Y >>> 8, _[k++] = Y & 255;
666
- k = 0, It();
664
+ for (; j < dt; )
665
+ Y = Math.floor(65536 * Math.random()), _[j++] = Y >>> 8, _[j++] = Y & 255;
666
+ j = 0, It();
667
667
  }
668
668
  function fi() {
669
669
  if (ht == null) {
670
- for (It(), ht = ai(), ht.init(_), k = 0; k < _.length; ++k)
671
- _[k] = 0;
672
- k = 0;
670
+ for (It(), ht = li(), ht.init(_), j = 0; j < _.length; ++j)
671
+ _[j] = 0;
672
+ j = 0;
673
673
  }
674
674
  return ht.next();
675
675
  }
@@ -696,7 +696,7 @@ function lt() {
696
696
  return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, t = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = t, this.S[t + this.S[this.i] & 255];
697
697
  }
698
698
  pt.prototype.init = ui, pt.prototype.next = ci;
699
- function ai() {
699
+ function li() {
700
700
  return new pt();
701
701
  }
702
702
  var dt = 256;
@@ -705,16 +705,16 @@ function lt() {
705
705
  BigInteger: r,
706
706
  SecureRandom: At
707
707
  };
708
- }).call(li);
709
- }(at)), at.exports;
708
+ }).call(ai);
709
+ }(lt)), lt.exports;
710
710
  }
711
711
  var mt, Mt;
712
712
  function xi() {
713
713
  if (Mt) return mt;
714
714
  Mt = 1;
715
- const { BigInteger: v } = lt();
716
- function z(y) {
717
- let p = y.toString(16);
715
+ const { BigInteger: v } = at();
716
+ function z(b) {
717
+ let p = b.toString(16);
718
718
  if (p[0] !== "-")
719
719
  p.length % 2 === 1 ? p = "0" + p : p.match(/^[0-7]/) || (p = "00" + p);
720
720
  else {
@@ -723,7 +723,7 @@ function xi() {
723
723
  d % 2 === 1 ? d += 1 : p.match(/^[0-7]/) || (d += 2);
724
724
  let w = "";
725
725
  for (let B = 0; B < d; B++) w += "f";
726
- w = new v(w, 16), p = w.xor(y).add(v.ONE), p = p.toString(16).replace(/^-/, "");
726
+ w = new v(w, 16), p = w.xor(b).add(v.ONE), p = p.toString(16).replace(/^-/, "");
727
727
  }
728
728
  return p;
729
729
  }
@@ -746,7 +746,7 @@ function xi() {
746
746
  return "";
747
747
  }
748
748
  }
749
- class T extends S {
749
+ class y extends S {
750
750
  constructor(p) {
751
751
  super(), this.t = "02", p && (this.v = z(p));
752
752
  }
@@ -762,31 +762,31 @@ function xi() {
762
762
  return this.v = this.asn1Array.map((p) => p.getEncodedHex()).join(""), this.v;
763
763
  }
764
764
  }
765
- function r(y, p) {
766
- return +y[p + 2] < 8 ? 1 : +y.substr(p + 2, 2) & 128;
765
+ function r(b, p) {
766
+ return +b[p + 2] < 8 ? 1 : +b.substr(p + 2, 2) & 128;
767
767
  }
768
- function g(y, p) {
769
- const d = r(y, p), w = y.substr(p + 2, d * 2);
768
+ function g(b, p) {
769
+ const d = r(b, p), w = b.substr(p + 2, d * 2);
770
770
  return w ? (+w[0] < 8 ? new v(w, 16) : new v(w.substr(2), 16)).intValue() : -1;
771
771
  }
772
- function c(y, p) {
773
- const d = r(y, p);
772
+ function c(b, p) {
773
+ const d = r(b, p);
774
774
  return p + (d + 1) * 2;
775
775
  }
776
776
  return mt = {
777
777
  /**
778
778
  * ASN.1 der 编码,针对 sm2 签名
779
779
  */
780
- encodeDer(y, p) {
781
- const d = new T(y), w = new T(p);
780
+ encodeDer(b, p) {
781
+ const d = new y(b), w = new y(p);
782
782
  return new I([d, w]).getEncodedHex();
783
783
  },
784
784
  /**
785
785
  * 解析 ASN.1 der,针对 sm2 验签
786
786
  */
787
- decodeDer(y) {
788
- const p = c(y, 0), d = c(y, p), w = g(y, p), B = y.substr(d, w * 2), E = d + B.length, D = c(y, E), M = g(y, E), f = y.substr(D, M * 2), l = new v(B, 16), h = new v(f, 16);
789
- return { r: l, s: h };
787
+ decodeDer(b) {
788
+ const p = c(b, 0), d = c(b, p), w = g(b, p), B = b.substr(d, w * 2), E = d + B.length, D = c(b, E), M = g(b, E), f = b.substr(D, M * 2), a = new v(B, 16), h = new v(f, 16);
789
+ return { r: a, s: h };
790
790
  }
791
791
  }, mt;
792
792
  }
@@ -794,10 +794,10 @@ var vt, Ct;
794
794
  function pi() {
795
795
  if (Ct) return vt;
796
796
  Ct = 1;
797
- const { BigInteger: v } = lt(), z = new v("2"), S = new v("3");
798
- class T {
799
- constructor(c, y) {
800
- this.x = y, this.q = c;
797
+ const { BigInteger: v } = at(), z = new v("2"), S = new v("3");
798
+ class y {
799
+ constructor(c, b) {
800
+ this.x = b, this.q = c;
801
801
  }
802
802
  /**
803
803
  * 判断相等
@@ -815,42 +815,42 @@ function pi() {
815
815
  * 取反
816
816
  */
817
817
  negate() {
818
- return new T(this.q, this.x.negate().mod(this.q));
818
+ return new y(this.q, this.x.negate().mod(this.q));
819
819
  }
820
820
  /**
821
821
  * 相加
822
822
  */
823
823
  add(c) {
824
- return new T(this.q, this.x.add(c.toBigInteger()).mod(this.q));
824
+ return new y(this.q, this.x.add(c.toBigInteger()).mod(this.q));
825
825
  }
826
826
  /**
827
827
  * 相减
828
828
  */
829
829
  subtract(c) {
830
- return new T(this.q, this.x.subtract(c.toBigInteger()).mod(this.q));
830
+ return new y(this.q, this.x.subtract(c.toBigInteger()).mod(this.q));
831
831
  }
832
832
  /**
833
833
  * 相乘
834
834
  */
835
835
  multiply(c) {
836
- return new T(this.q, this.x.multiply(c.toBigInteger()).mod(this.q));
836
+ return new y(this.q, this.x.multiply(c.toBigInteger()).mod(this.q));
837
837
  }
838
838
  /**
839
839
  * 相除
840
840
  */
841
841
  divide(c) {
842
- return new T(this.q, this.x.multiply(c.toBigInteger().modInverse(this.q)).mod(this.q));
842
+ return new y(this.q, this.x.multiply(c.toBigInteger().modInverse(this.q)).mod(this.q));
843
843
  }
844
844
  /**
845
845
  * 平方
846
846
  */
847
847
  square() {
848
- return new T(this.q, this.x.square().mod(this.q));
848
+ return new y(this.q, this.x.square().mod(this.q));
849
849
  }
850
850
  }
851
851
  class I {
852
- constructor(c, y, p, d) {
853
- this.curve = c, this.x = y, this.y = p, this.z = d ?? v.ONE, this.zinv = null;
852
+ constructor(c, b, p, d) {
853
+ this.curve = c, this.x = b, this.y = p, this.z = d ?? v.ONE, this.zinv = null;
854
854
  }
855
855
  getX() {
856
856
  return this.zinv === null && (this.zinv = this.z.modInverse(this.curve.q)), this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q));
@@ -899,10 +899,10 @@ function pi() {
899
899
  add(c) {
900
900
  if (this.isInfinity()) return c;
901
901
  if (c.isInfinity()) return this;
902
- const y = this.x.toBigInteger(), p = this.y.toBigInteger(), d = this.z, w = c.x.toBigInteger(), B = c.y.toBigInteger(), E = c.z, D = this.curve.q, M = y.multiply(E).mod(D), f = w.multiply(d).mod(D), l = M.subtract(f), h = p.multiply(E).mod(D), o = B.multiply(d).mod(D), x = h.subtract(o);
903
- if (v.ZERO.equals(l))
902
+ const b = this.x.toBigInteger(), p = this.y.toBigInteger(), d = this.z, w = c.x.toBigInteger(), B = c.y.toBigInteger(), E = c.z, D = this.curve.q, M = b.multiply(E).mod(D), f = w.multiply(d).mod(D), a = M.subtract(f), h = p.multiply(E).mod(D), o = B.multiply(d).mod(D), x = h.subtract(o);
903
+ if (v.ZERO.equals(a))
904
904
  return v.ZERO.equals(x) ? this.twice() : this.curve.infinity;
905
- const s = M.add(f), m = d.multiply(E).mod(D), R = l.square().mod(D), P = l.multiply(R).mod(D), C = m.multiply(x.square()).subtract(s.multiply(R)).mod(D), N = l.multiply(C).mod(D), q = x.multiply(R.multiply(M).subtract(C)).subtract(h.multiply(P)).mod(D), O = P.multiply(m).mod(D);
905
+ const s = M.add(f), m = d.multiply(E).mod(D), R = a.square().mod(D), P = a.multiply(R).mod(D), C = m.multiply(x.square()).subtract(s.multiply(R)).mod(D), N = a.multiply(C).mod(D), q = x.multiply(R.multiply(M).subtract(C)).subtract(h.multiply(P)).mod(D), O = P.multiply(m).mod(D);
906
906
  return new I(this.curve, this.curve.fromBigInteger(N), this.curve.fromBigInteger(q), O);
907
907
  }
908
908
  /**
@@ -923,7 +923,7 @@ function pi() {
923
923
  twice() {
924
924
  if (this.isInfinity()) return this;
925
925
  if (!this.y.toBigInteger().signum()) return this.curve.infinity;
926
- const c = this.x.toBigInteger(), y = this.y.toBigInteger(), p = this.z, d = this.curve.q, w = this.curve.a.toBigInteger(), B = c.square().multiply(S).add(w.multiply(p.square())).mod(d), E = y.shiftLeft(1).multiply(p).mod(d), D = y.square().mod(d), M = D.multiply(c).multiply(p).mod(d), f = E.square().mod(d), l = B.square().subtract(M.shiftLeft(3)).mod(d), h = E.multiply(l).mod(d), o = B.multiply(M.shiftLeft(2).subtract(l)).subtract(f.shiftLeft(1).multiply(D)).mod(d), x = E.multiply(f).mod(d);
926
+ const c = this.x.toBigInteger(), b = this.y.toBigInteger(), p = this.z, d = this.curve.q, w = this.curve.a.toBigInteger(), B = c.square().multiply(S).add(w.multiply(p.square())).mod(d), E = b.shiftLeft(1).multiply(p).mod(d), D = b.square().mod(d), M = D.multiply(c).multiply(p).mod(d), f = E.square().mod(d), a = B.square().subtract(M.shiftLeft(3)).mod(d), h = E.multiply(a).mod(d), o = B.multiply(M.shiftLeft(2).subtract(a)).subtract(f.shiftLeft(1).multiply(D)).mod(d), x = E.multiply(f).mod(d);
927
927
  return new I(this.curve, this.curve.fromBigInteger(h), this.curve.fromBigInteger(o), x);
928
928
  }
929
929
  /**
@@ -932,19 +932,19 @@ function pi() {
932
932
  multiply(c) {
933
933
  if (this.isInfinity()) return this;
934
934
  if (!c.signum()) return this.curve.infinity;
935
- const y = c.multiply(S), p = this.negate();
935
+ const b = c.multiply(S), p = this.negate();
936
936
  let d = this;
937
- for (let w = y.bitLength() - 2; w > 0; w--) {
937
+ for (let w = b.bitLength() - 2; w > 0; w--) {
938
938
  d = d.twice();
939
- const B = y.testBit(w), E = c.testBit(w);
939
+ const B = b.testBit(w), E = c.testBit(w);
940
940
  B !== E && (d = d.add(B ? this : p));
941
941
  }
942
942
  return d;
943
943
  }
944
944
  }
945
945
  class r {
946
- constructor(c, y, p) {
947
- this.q = c, this.a = this.fromBigInteger(y), this.b = this.fromBigInteger(p), this.infinity = new I(this, null, null);
946
+ constructor(c, b, p) {
947
+ this.q = c, this.a = this.fromBigInteger(b), this.b = this.fromBigInteger(p), this.infinity = new I(this, null, null);
948
948
  }
949
949
  /**
950
950
  * 判断两个椭圆曲线是否相等
@@ -956,7 +956,7 @@ function pi() {
956
956
  * 生成椭圆曲线域元素
957
957
  */
958
958
  fromBigInteger(c) {
959
- return new T(this.q, c);
959
+ return new y(this.q, c);
960
960
  }
961
961
  /**
962
962
  * 解析 16 进制串为椭圆曲线点
@@ -968,14 +968,14 @@ function pi() {
968
968
  return this.infinity;
969
969
  case 2:
970
970
  case 3:
971
- const y = this.fromBigInteger(new v(c.substr(2), 16));
972
- let p = this.fromBigInteger(y.multiply(y.square()).add(
973
- y.multiply(this.a)
971
+ const b = this.fromBigInteger(new v(c.substr(2), 16));
972
+ let p = this.fromBigInteger(b.multiply(b.square()).add(
973
+ b.multiply(this.a)
974
974
  ).add(this.b).toBigInteger().modPow(
975
975
  this.q.divide(new v("4")).add(v.ONE),
976
976
  this.q
977
977
  ));
978
- return p.toBigInteger().mod(z).equals(new v(c.substr(0, 2), 16).subtract(z)) || (p = p.negate()), new I(this, y, p);
978
+ return p.toBigInteger().mod(z).equals(new v(c.substr(0, 2), 16).subtract(z)) || (p = p.negate()), new I(this, b, p);
979
979
  case 4:
980
980
  case 6:
981
981
  case 7:
@@ -995,16 +995,16 @@ var yt, Ot;
995
995
  function di() {
996
996
  if (Ot) return yt;
997
997
  Ot = 1;
998
- const { BigInteger: v, SecureRandom: z } = lt(), { ECCurveFp: S } = pi(), T = new z(), { curve: I, G: r, n: g } = y();
998
+ const { BigInteger: v, SecureRandom: z } = at(), { ECCurveFp: S } = pi(), y = new z(), { curve: I, G: r, n: g } = b();
999
999
  function c() {
1000
1000
  return I;
1001
1001
  }
1002
- function y() {
1002
+ function b() {
1003
1003
  const h = new v("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF", 16), o = new v("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC", 16), x = new v("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93", 16), s = new S(h, o, x), P = s.decodePointHex("04" + "32C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7" + "BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0"), C = new v("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123", 16);
1004
1004
  return { curve: s, G: P, n: C };
1005
1005
  }
1006
1006
  function p(h, o, x) {
1007
- const m = (h ? new v(h, o, x) : new v(g.bitLength(), T)).mod(g.subtract(v.ONE)).add(v.ONE), R = B(m.toString(16), 64), P = r.multiply(m), C = B(P.getX().toBigInteger().toString(16), 64), N = B(P.getY().toBigInteger().toString(16), 64), q = "04" + C + N;
1007
+ const m = (h ? new v(h, o, x) : new v(g.bitLength(), y)).mod(g.subtract(v.ONE)).add(v.ONE), R = B(m.toString(16), 64), P = r.multiply(m), C = B(P.getX().toBigInteger().toString(16), 64), N = B(P.getY().toBigInteger().toString(16), 64), q = "04" + C + N;
1008
1008
  return { privateKey: R, publicKey: q };
1009
1009
  }
1010
1010
  function d(h) {
@@ -1061,7 +1061,7 @@ function di() {
1061
1061
  const x = o.getX();
1062
1062
  return o.getY().square().equals(x.multiply(x.square()).add(x.multiply(I.a)).add(I.b));
1063
1063
  }
1064
- function l(h, o) {
1064
+ function a(h, o) {
1065
1065
  const x = I.decodePointHex(h);
1066
1066
  if (!x) return !1;
1067
1067
  const s = I.decodePointHex(o);
@@ -1069,7 +1069,7 @@ function di() {
1069
1069
  }
1070
1070
  return yt = {
1071
1071
  getGlobalCurve: c,
1072
- generateEcparam: y,
1072
+ generateEcparam: b,
1073
1073
  generateKeyPairHex: p,
1074
1074
  compressPublicKeyHex: d,
1075
1075
  utf8ToHex: w,
@@ -1078,11 +1078,11 @@ function di() {
1078
1078
  arrayToUtf8: D,
1079
1079
  hexToArray: M,
1080
1080
  verifyPublicKey: f,
1081
- comparePublicKeyHex: l
1081
+ comparePublicKeyHex: a
1082
1082
  }, yt;
1083
1083
  }
1084
1084
  var bt, Ht;
1085
- function kt() {
1085
+ function jt() {
1086
1086
  if (Ht) return bt;
1087
1087
  Ht = 1;
1088
1088
  const v = new Uint32Array(68), z = new Uint32Array(64);
@@ -1090,7 +1090,7 @@ function kt() {
1090
1090
  const E = B & 31;
1091
1091
  return w << E | w >>> 32 - E;
1092
1092
  }
1093
- function T(w, B) {
1093
+ function y(w, B) {
1094
1094
  const E = [];
1095
1095
  for (let D = w.length - 1; D >= 0; D--) E[D] = (w[D] ^ B[D]) & 255;
1096
1096
  return E;
@@ -1113,12 +1113,12 @@ function kt() {
1113
1113
  const m = B.length - 8;
1114
1114
  M[s] = parseInt(B.substr(m), 2), B = B.substr(0, m);
1115
1115
  } else B.length > 0 && (M[s] = parseInt(B, 2), B = "");
1116
- const f = new Uint8Array([...w, 128, ...D, ...M]), l = new DataView(f.buffer, 0), h = f.length / 64, o = new Uint32Array([1937774191, 1226093241, 388252375, 3666478592, 2842636476, 372324522, 3817729613, 2969243214]);
1116
+ const f = new Uint8Array([...w, 128, ...D, ...M]), a = new DataView(f.buffer, 0), h = f.length / 64, o = new Uint32Array([1937774191, 1226093241, 388252375, 3666478592, 2842636476, 372324522, 3817729613, 2969243214]);
1117
1117
  for (let s = 0; s < h; s++) {
1118
1118
  v.fill(0), z.fill(0);
1119
1119
  const m = 16 * s;
1120
1120
  for (let A = 0; A < 16; A++)
1121
- v[A] = l.getUint32((m + A) * 4, !1);
1121
+ v[A] = a.getUint32((m + A) * 4, !1);
1122
1122
  for (let A = 16; A < 68; A++)
1123
1123
  v[A] = r(v[A - 16] ^ v[A - 9] ^ S(v[A - 3], 15)) ^ S(v[A - 13], 7) ^ v[A - 6];
1124
1124
  for (let A = 0; A < 64; A++)
@@ -1136,12 +1136,12 @@ function kt() {
1136
1136
  }
1137
1137
  return x;
1138
1138
  }
1139
- const c = 64, y = new Uint8Array(c), p = new Uint8Array(c);
1139
+ const c = 64, b = new Uint8Array(c), p = new Uint8Array(c);
1140
1140
  for (let w = 0; w < c; w++)
1141
- y[w] = 54, p[w] = 92;
1141
+ b[w] = 54, p[w] = 92;
1142
1142
  function d(w, B) {
1143
1143
  for (B.length > c && (B = g(B)); B.length < c; ) B.push(0);
1144
- const E = T(B, y), D = T(B, p), M = g([...E, ...w]);
1144
+ const E = y(B, b), D = y(B, p), M = g([...E, ...w]);
1145
1145
  return g([...D, ...M]);
1146
1146
  }
1147
1147
  return bt = {
@@ -1153,13 +1153,13 @@ var Tt, Nt;
1153
1153
  function gi() {
1154
1154
  if (Nt) return Tt;
1155
1155
  Nt = 1;
1156
- const { BigInteger: v } = lt(), { encodeDer: z, decodeDer: S } = xi(), T = di(), I = kt().sm3, { G: r, curve: g, n: c } = T.generateEcparam(), y = 0;
1157
- function p(f, l, h = 1) {
1158
- f = typeof f == "string" ? T.hexToArray(T.utf8ToHex(f)) : Array.prototype.slice.call(f), l = T.getGlobalCurve().decodePointHex(l);
1159
- const o = T.generateKeyPairHex(), x = new v(o.privateKey, 16);
1156
+ const { BigInteger: v } = at(), { encodeDer: z, decodeDer: S } = xi(), y = di(), I = jt().sm3, { G: r, curve: g, n: c } = y.generateEcparam(), b = 0;
1157
+ function p(f, a, h = 1) {
1158
+ f = typeof f == "string" ? y.hexToArray(y.utf8ToHex(f)) : Array.prototype.slice.call(f), a = y.getGlobalCurve().decodePointHex(a);
1159
+ const o = y.generateKeyPairHex(), x = new v(o.privateKey, 16);
1160
1160
  let s = o.publicKey;
1161
1161
  s.length > 128 && (s = s.substr(s.length - 128));
1162
- const m = l.multiply(x), R = T.hexToArray(T.leftPad(m.getX().toBigInteger().toRadix(16), 64)), P = T.hexToArray(T.leftPad(m.getY().toBigInteger().toRadix(16), 64)), C = T.arrayToHex(I([].concat(R, f, P)));
1162
+ const m = a.multiply(x), R = y.hexToArray(y.leftPad(m.getX().toBigInteger().toRadix(16), 64)), P = y.hexToArray(y.leftPad(m.getY().toBigInteger().toRadix(16), 64)), C = y.arrayToHex(I([].concat(R, f, P)));
1163
1163
  let N = 1, q = 0, O = [];
1164
1164
  const H = [].concat(R, P), L = () => {
1165
1165
  O = I([...H, N >> 24 & 255, N >> 16 & 255, N >> 8 & 255, N & 255]), N++, q = 0;
@@ -1167,16 +1167,16 @@ function gi() {
1167
1167
  L();
1168
1168
  for (let W = 0, G = f.length; W < G; W++)
1169
1169
  q === O.length && L(), f[W] ^= O[q++] & 255;
1170
- const Z = T.arrayToHex(f);
1171
- return h === y ? s + Z + C : s + C + Z;
1170
+ const Z = y.arrayToHex(f);
1171
+ return h === b ? s + Z + C : s + C + Z;
1172
1172
  }
1173
- function d(f, l, h = 1, {
1173
+ function d(f, a, h = 1, {
1174
1174
  output: o = "string"
1175
1175
  } = {}) {
1176
- l = new v(l, 16);
1176
+ a = new v(a, 16);
1177
1177
  let x = f.substr(128, 64), s = f.substr(192);
1178
- h === y && (x = f.substr(f.length - 64), s = f.substr(128, f.length - 128 - 64));
1179
- const m = T.hexToArray(s), P = T.getGlobalCurve().decodePointHex("04" + f.substr(0, 128)).multiply(l), C = T.hexToArray(T.leftPad(P.getX().toBigInteger().toRadix(16), 64)), N = T.hexToArray(T.leftPad(P.getY().toBigInteger().toRadix(16), 64));
1178
+ h === b && (x = f.substr(f.length - 64), s = f.substr(128, f.length - 128 - 64));
1179
+ const m = y.hexToArray(s), P = y.getGlobalCurve().decodePointHex("04" + f.substr(0, 128)).multiply(a), C = y.hexToArray(y.leftPad(P.getX().toBigInteger().toRadix(16), 64)), N = y.hexToArray(y.leftPad(P.getY().toBigInteger().toRadix(16), 64));
1180
1180
  let q = 1, O = 0, H = [];
1181
1181
  const L = [].concat(C, N), Z = () => {
1182
1182
  H = I([...L, q >> 24 & 255, q >> 16 & 255, q >> 8 & 255, q & 255]), q++, O = 0;
@@ -1184,18 +1184,18 @@ function gi() {
1184
1184
  Z();
1185
1185
  for (let G = 0, nt = m.length; G < nt; G++)
1186
1186
  O === H.length && Z(), m[G] ^= H[O++] & 255;
1187
- return T.arrayToHex(I([].concat(C, m, N))) === x.toLowerCase() ? o === "array" ? m : T.arrayToUtf8(m) : o === "array" ? [] : "";
1187
+ return y.arrayToHex(I([].concat(C, m, N))) === x.toLowerCase() ? o === "array" ? m : y.arrayToUtf8(m) : o === "array" ? [] : "";
1188
1188
  }
1189
- function w(f, l, {
1189
+ function w(f, a, {
1190
1190
  pointPool: h,
1191
1191
  der: o,
1192
1192
  hash: x,
1193
1193
  publicKey: s,
1194
1194
  userId: m
1195
1195
  } = {}) {
1196
- let R = typeof f == "string" ? T.utf8ToHex(f) : T.arrayToHex(f);
1197
- x && (s = s || D(l), R = E(R, s, m));
1198
- const P = new v(l, 16), C = new v(R, 16);
1196
+ let R = typeof f == "string" ? y.utf8ToHex(f) : y.arrayToHex(f);
1197
+ x && (s = s || D(a), R = E(R, s, m));
1198
+ const P = new v(a, 16), C = new v(R, 16);
1199
1199
  let N = null, q = null, O = null;
1200
1200
  do {
1201
1201
  do {
@@ -1204,81 +1204,81 @@ function gi() {
1204
1204
  } while (q.equals(v.ZERO) || q.add(N).equals(c));
1205
1205
  O = P.add(v.ONE).modInverse(c).multiply(N.subtract(q.multiply(P))).mod(c);
1206
1206
  } while (O.equals(v.ZERO));
1207
- return o ? z(q, O) : T.leftPad(q.toString(16), 64) + T.leftPad(O.toString(16), 64);
1207
+ return o ? z(q, O) : y.leftPad(q.toString(16), 64) + y.leftPad(O.toString(16), 64);
1208
1208
  }
1209
- function B(f, l, h, { der: o, hash: x, userId: s } = {}) {
1210
- let m = typeof f == "string" ? T.utf8ToHex(f) : T.arrayToHex(f);
1209
+ function B(f, a, h, { der: o, hash: x, userId: s } = {}) {
1210
+ let m = typeof f == "string" ? y.utf8ToHex(f) : y.arrayToHex(f);
1211
1211
  x && (m = E(m, h, s));
1212
1212
  let R, P;
1213
1213
  if (o) {
1214
- const L = S(l);
1214
+ const L = S(a);
1215
1215
  R = L.r, P = L.s;
1216
1216
  } else
1217
- R = new v(l.substring(0, 64), 16), P = new v(l.substring(64), 16);
1217
+ R = new v(a.substring(0, 64), 16), P = new v(a.substring(64), 16);
1218
1218
  const C = g.decodePointHex(h), N = new v(m, 16), q = R.add(P).mod(c);
1219
1219
  if (q.equals(v.ZERO)) return !1;
1220
1220
  const O = r.multiply(P).add(C.multiply(q)), H = N.add(O.getX().toBigInteger()).mod(c);
1221
1221
  return R.equals(H);
1222
1222
  }
1223
- function E(f, l, h = "1234567812345678") {
1224
- h = T.utf8ToHex(h);
1225
- const o = T.leftPad(r.curve.a.toBigInteger().toRadix(16), 64), x = T.leftPad(r.curve.b.toBigInteger().toRadix(16), 64), s = T.leftPad(r.getX().toBigInteger().toRadix(16), 64), m = T.leftPad(r.getY().toBigInteger().toRadix(16), 64);
1223
+ function E(f, a, h = "1234567812345678") {
1224
+ h = y.utf8ToHex(h);
1225
+ const o = y.leftPad(r.curve.a.toBigInteger().toRadix(16), 64), x = y.leftPad(r.curve.b.toBigInteger().toRadix(16), 64), s = y.leftPad(r.getX().toBigInteger().toRadix(16), 64), m = y.leftPad(r.getY().toBigInteger().toRadix(16), 64);
1226
1226
  let R, P;
1227
- if (l.length === 128)
1228
- R = l.substr(0, 64), P = l.substr(64, 64);
1227
+ if (a.length === 128)
1228
+ R = a.substr(0, 64), P = a.substr(64, 64);
1229
1229
  else {
1230
- const O = r.curve.decodePointHex(l);
1231
- R = T.leftPad(O.getX().toBigInteger().toRadix(16), 64), P = T.leftPad(O.getY().toBigInteger().toRadix(16), 64);
1230
+ const O = r.curve.decodePointHex(a);
1231
+ R = y.leftPad(O.getX().toBigInteger().toRadix(16), 64), P = y.leftPad(O.getY().toBigInteger().toRadix(16), 64);
1232
1232
  }
1233
- const C = T.hexToArray(h + o + x + s + m + R + P), N = h.length * 4;
1233
+ const C = y.hexToArray(h + o + x + s + m + R + P), N = h.length * 4;
1234
1234
  C.unshift(N & 255), C.unshift(N >> 8 & 255);
1235
1235
  const q = I(C);
1236
- return T.arrayToHex(I(q.concat(T.hexToArray(f))));
1236
+ return y.arrayToHex(I(q.concat(y.hexToArray(f))));
1237
1237
  }
1238
1238
  function D(f) {
1239
- const l = r.multiply(new v(f, 16)), h = T.leftPad(l.getX().toBigInteger().toString(16), 64), o = T.leftPad(l.getY().toBigInteger().toString(16), 64);
1239
+ const a = r.multiply(new v(f, 16)), h = y.leftPad(a.getX().toBigInteger().toString(16), 64), o = y.leftPad(a.getY().toBigInteger().toString(16), 64);
1240
1240
  return "04" + h + o;
1241
1241
  }
1242
1242
  function M() {
1243
- const f = T.generateKeyPairHex(), l = g.decodePointHex(f.publicKey);
1244
- return f.k = new v(f.privateKey, 16), f.x1 = l.getX().toBigInteger(), f;
1243
+ const f = y.generateKeyPairHex(), a = g.decodePointHex(f.publicKey);
1244
+ return f.k = new v(f.privateKey, 16), f.x1 = a.getX().toBigInteger(), f;
1245
1245
  }
1246
1246
  return Tt = {
1247
- generateKeyPairHex: T.generateKeyPairHex,
1248
- compressPublicKeyHex: T.compressPublicKeyHex,
1249
- comparePublicKeyHex: T.comparePublicKeyHex,
1247
+ generateKeyPairHex: y.generateKeyPairHex,
1248
+ compressPublicKeyHex: y.compressPublicKeyHex,
1249
+ comparePublicKeyHex: y.comparePublicKeyHex,
1250
1250
  doEncrypt: p,
1251
1251
  doDecrypt: d,
1252
1252
  doSignature: w,
1253
1253
  doVerifySignature: B,
1254
1254
  getPublicKeyFromPrivateKey: D,
1255
1255
  getPoint: M,
1256
- verifyPublicKey: T.verifyPublicKey
1256
+ verifyPublicKey: y.verifyPublicKey
1257
1257
  }, Tt;
1258
1258
  }
1259
1259
  var wt, Lt;
1260
1260
  function mi() {
1261
1261
  if (Lt) return wt;
1262
1262
  Lt = 1;
1263
- const { sm3: v, hmac: z } = kt();
1263
+ const { sm3: v, hmac: z } = jt();
1264
1264
  function S(g, c) {
1265
1265
  return g.length >= c ? g : new Array(c - g.length + 1).join("0") + g;
1266
1266
  }
1267
- function T(g) {
1267
+ function y(g) {
1268
1268
  return g.map((c) => (c = c.toString(16), c.length === 1 ? "0" + c : c)).join("");
1269
1269
  }
1270
1270
  function I(g) {
1271
1271
  const c = [];
1272
- let y = g.length;
1273
- y % 2 !== 0 && (g = S(g, y + 1)), y = g.length;
1274
- for (let p = 0; p < y; p += 2)
1272
+ let b = g.length;
1273
+ b % 2 !== 0 && (g = S(g, b + 1)), b = g.length;
1274
+ for (let p = 0; p < b; p += 2)
1275
1275
  c.push(parseInt(g.substr(p, 2), 16));
1276
1276
  return c;
1277
1277
  }
1278
1278
  function r(g) {
1279
1279
  const c = [];
1280
- for (let y = 0, p = g.length; y < p; y++) {
1281
- const d = g.codePointAt(y);
1280
+ for (let b = 0, p = g.length; b < p; b++) {
1281
+ const d = g.codePointAt(b);
1282
1282
  if (d <= 127)
1283
1283
  c.push(d);
1284
1284
  else if (d <= 2047)
@@ -1286,7 +1286,7 @@ function mi() {
1286
1286
  else if (d <= 55295 || d >= 57344 && d <= 65535)
1287
1287
  c.push(224 | d >>> 12), c.push(128 | d >>> 6 & 63), c.push(128 | d & 63);
1288
1288
  else if (d >= 65536 && d <= 1114111)
1289
- y++, c.push(240 | d >>> 18 & 28), c.push(128 | d >>> 12 & 63), c.push(128 | d >>> 6 & 63), c.push(128 | d & 63);
1289
+ b++, c.push(240 | d >>> 18 & 28), c.push(128 | d >>> 12 & 63), c.push(128 | d >>> 6 & 63), c.push(128 | d & 63);
1290
1290
  else
1291
1291
  throw c.push(d), new Error("input is not supported");
1292
1292
  }
@@ -1297,16 +1297,16 @@ function mi() {
1297
1297
  if ((c.mode || "hmac") !== "hmac") throw new Error("invalid mode");
1298
1298
  let p = c.key;
1299
1299
  if (!p) throw new Error("invalid key");
1300
- return p = typeof p == "string" ? I(p) : Array.prototype.slice.call(p), T(z(g, p));
1300
+ return p = typeof p == "string" ? I(p) : Array.prototype.slice.call(p), y(z(g, p));
1301
1301
  }
1302
- return T(v(g));
1302
+ return y(v(g));
1303
1303
  }, wt;
1304
1304
  }
1305
1305
  var Ft, Vt;
1306
1306
  function vi() {
1307
1307
  if (Vt) return Ft;
1308
1308
  Vt = 1;
1309
- const v = 0, z = 32, S = 16, T = [
1309
+ const v = 0, z = 32, S = 16, y = [
1310
1310
  214,
1311
1311
  144,
1312
1312
  233,
@@ -1598,43 +1598,43 @@ function vi() {
1598
1598
  1684763257
1599
1599
  ];
1600
1600
  function r(f) {
1601
- const l = [];
1601
+ const a = [];
1602
1602
  for (let h = 0, o = f.length; h < o; h += 2)
1603
- l.push(parseInt(f.substr(h, 2), 16));
1604
- return l;
1603
+ a.push(parseInt(f.substr(h, 2), 16));
1604
+ return a;
1605
1605
  }
1606
1606
  function g(f) {
1607
- return f.map((l) => (l = l.toString(16), l.length === 1 ? "0" + l : l)).join("");
1607
+ return f.map((a) => (a = a.toString(16), a.length === 1 ? "0" + a : a)).join("");
1608
1608
  }
1609
1609
  function c(f) {
1610
- const l = [];
1610
+ const a = [];
1611
1611
  for (let h = 0, o = f.length; h < o; h++) {
1612
1612
  const x = f.codePointAt(h);
1613
1613
  if (x <= 127)
1614
- l.push(x);
1614
+ a.push(x);
1615
1615
  else if (x <= 2047)
1616
- l.push(192 | x >>> 6), l.push(128 | x & 63);
1616
+ a.push(192 | x >>> 6), a.push(128 | x & 63);
1617
1617
  else if (x <= 55295 || x >= 57344 && x <= 65535)
1618
- l.push(224 | x >>> 12), l.push(128 | x >>> 6 & 63), l.push(128 | x & 63);
1618
+ a.push(224 | x >>> 12), a.push(128 | x >>> 6 & 63), a.push(128 | x & 63);
1619
1619
  else if (x >= 65536 && x <= 1114111)
1620
- h++, l.push(240 | x >>> 18 & 28), l.push(128 | x >>> 12 & 63), l.push(128 | x >>> 6 & 63), l.push(128 | x & 63);
1620
+ h++, a.push(240 | x >>> 18 & 28), a.push(128 | x >>> 12 & 63), a.push(128 | x >>> 6 & 63), a.push(128 | x & 63);
1621
1621
  else
1622
- throw l.push(x), new Error("input is not supported");
1622
+ throw a.push(x), new Error("input is not supported");
1623
1623
  }
1624
- return l;
1624
+ return a;
1625
1625
  }
1626
- function y(f) {
1627
- const l = [];
1626
+ function b(f) {
1627
+ const a = [];
1628
1628
  for (let h = 0, o = f.length; h < o; h++)
1629
- f[h] >= 240 && f[h] <= 247 ? (l.push(String.fromCodePoint(((f[h] & 7) << 18) + ((f[h + 1] & 63) << 12) + ((f[h + 2] & 63) << 6) + (f[h + 3] & 63))), h += 3) : f[h] >= 224 && f[h] <= 239 ? (l.push(String.fromCodePoint(((f[h] & 15) << 12) + ((f[h + 1] & 63) << 6) + (f[h + 2] & 63))), h += 2) : f[h] >= 192 && f[h] <= 223 ? (l.push(String.fromCodePoint(((f[h] & 31) << 6) + (f[h + 1] & 63))), h++) : l.push(String.fromCodePoint(f[h]));
1630
- return l.join("");
1629
+ f[h] >= 240 && f[h] <= 247 ? (a.push(String.fromCodePoint(((f[h] & 7) << 18) + ((f[h + 1] & 63) << 12) + ((f[h + 2] & 63) << 6) + (f[h + 3] & 63))), h += 3) : f[h] >= 224 && f[h] <= 239 ? (a.push(String.fromCodePoint(((f[h] & 15) << 12) + ((f[h + 1] & 63) << 6) + (f[h + 2] & 63))), h += 2) : f[h] >= 192 && f[h] <= 223 ? (a.push(String.fromCodePoint(((f[h] & 31) << 6) + (f[h + 1] & 63))), h++) : a.push(String.fromCodePoint(f[h]));
1630
+ return a.join("");
1631
1631
  }
1632
- function p(f, l) {
1633
- const h = l & 31;
1632
+ function p(f, a) {
1633
+ const h = a & 31;
1634
1634
  return f << h | f >>> 32 - h;
1635
1635
  }
1636
1636
  function d(f) {
1637
- return (T[f >>> 24 & 255] & 255) << 24 | (T[f >>> 16 & 255] & 255) << 16 | (T[f >>> 8 & 255] & 255) << 8 | T[f & 255] & 255;
1637
+ return (y[f >>> 24 & 255] & 255) << 24 | (y[f >>> 16 & 255] & 255) << 16 | (y[f >>> 8 & 255] & 255) << 8 | y[f & 255] & 255;
1638
1638
  }
1639
1639
  function w(f) {
1640
1640
  return f ^ p(f, 2) ^ p(f, 10) ^ p(f, 18) ^ p(f, 24);
@@ -1642,27 +1642,27 @@ function vi() {
1642
1642
  function B(f) {
1643
1643
  return f ^ p(f, 13) ^ p(f, 23);
1644
1644
  }
1645
- function E(f, l, h) {
1645
+ function E(f, a, h) {
1646
1646
  const o = new Array(4), x = new Array(4);
1647
1647
  for (let s = 0; s < 4; s++)
1648
1648
  x[0] = f[4 * s] & 255, x[1] = f[4 * s + 1] & 255, x[2] = f[4 * s + 2] & 255, x[3] = f[4 * s + 3] & 255, o[s] = x[0] << 24 | x[1] << 16 | x[2] << 8 | x[3];
1649
1649
  for (let s = 0, m; s < 32; s += 4)
1650
1650
  m = o[1] ^ o[2] ^ o[3] ^ h[s + 0], o[0] ^= w(d(m)), m = o[2] ^ o[3] ^ o[0] ^ h[s + 1], o[1] ^= w(d(m)), m = o[3] ^ o[0] ^ o[1] ^ h[s + 2], o[2] ^= w(d(m)), m = o[0] ^ o[1] ^ o[2] ^ h[s + 3], o[3] ^= w(d(m));
1651
1651
  for (let s = 0; s < 16; s += 4)
1652
- l[s] = o[3 - s / 4] >>> 24 & 255, l[s + 1] = o[3 - s / 4] >>> 16 & 255, l[s + 2] = o[3 - s / 4] >>> 8 & 255, l[s + 3] = o[3 - s / 4] & 255;
1652
+ a[s] = o[3 - s / 4] >>> 24 & 255, a[s + 1] = o[3 - s / 4] >>> 16 & 255, a[s + 2] = o[3 - s / 4] >>> 8 & 255, a[s + 3] = o[3 - s / 4] & 255;
1653
1653
  }
1654
- function D(f, l, h) {
1654
+ function D(f, a, h) {
1655
1655
  const o = new Array(4), x = new Array(4);
1656
1656
  for (let s = 0; s < 4; s++)
1657
1657
  x[0] = f[0 + 4 * s] & 255, x[1] = f[1 + 4 * s] & 255, x[2] = f[2 + 4 * s] & 255, x[3] = f[3 + 4 * s] & 255, o[s] = x[0] << 24 | x[1] << 16 | x[2] << 8 | x[3];
1658
1658
  o[0] ^= 2746333894, o[1] ^= 1453994832, o[2] ^= 1736282519, o[3] ^= 2993693404;
1659
1659
  for (let s = 0, m; s < 32; s += 4)
1660
- m = o[1] ^ o[2] ^ o[3] ^ I[s + 0], l[s + 0] = o[0] ^= B(d(m)), m = o[2] ^ o[3] ^ o[0] ^ I[s + 1], l[s + 1] = o[1] ^= B(d(m)), m = o[3] ^ o[0] ^ o[1] ^ I[s + 2], l[s + 2] = o[2] ^= B(d(m)), m = o[0] ^ o[1] ^ o[2] ^ I[s + 3], l[s + 3] = o[3] ^= B(d(m));
1660
+ m = o[1] ^ o[2] ^ o[3] ^ I[s + 0], a[s + 0] = o[0] ^= B(d(m)), m = o[2] ^ o[3] ^ o[0] ^ I[s + 1], a[s + 1] = o[1] ^= B(d(m)), m = o[3] ^ o[0] ^ o[1] ^ I[s + 2], a[s + 2] = o[2] ^= B(d(m)), m = o[0] ^ o[1] ^ o[2] ^ I[s + 3], a[s + 3] = o[3] ^= B(d(m));
1661
1661
  if (h === v)
1662
1662
  for (let s = 0, m; s < 16; s++)
1663
- m = l[s], l[s] = l[31 - s], l[31 - s] = m;
1663
+ m = a[s], a[s] = a[31 - s], a[31 - s] = m;
1664
1664
  }
1665
- function M(f, l, h, {
1665
+ function M(f, a, h, {
1666
1666
  padding: o = "pkcs#7",
1667
1667
  mode: x,
1668
1668
  iv: s = [],
@@ -1670,14 +1670,14 @@ function vi() {
1670
1670
  } = {}) {
1671
1671
  if (x === "cbc" && (typeof s == "string" && (s = r(s)), s.length !== 128 / 8))
1672
1672
  throw new Error("iv is invalid");
1673
- if (typeof l == "string" && (l = r(l)), l.length !== 128 / 8)
1673
+ if (typeof a == "string" && (a = r(a)), a.length !== 128 / 8)
1674
1674
  throw new Error("key is invalid");
1675
1675
  if (typeof f == "string" ? h !== v ? f = c(f) : f = r(f) : f = [...f], (o === "pkcs#5" || o === "pkcs#7") && h !== v) {
1676
1676
  const O = S - f.length % S;
1677
1677
  for (let H = 0; H < O; H++) f.push(O);
1678
1678
  }
1679
1679
  const R = new Array(z);
1680
- D(l, R, h);
1680
+ D(a, R, h);
1681
1681
  const P = [];
1682
1682
  let C = s, N = f.length, q = 0;
1683
1683
  for (; N >= S; ) {
@@ -1696,14 +1696,14 @@ function vi() {
1696
1696
  if (P[O - L] !== H) throw new Error("padding is invalid");
1697
1697
  P.splice(O - H, H);
1698
1698
  }
1699
- return m !== "array" ? h !== v ? g(P) : y(P) : P;
1699
+ return m !== "array" ? h !== v ? g(P) : b(P) : P;
1700
1700
  }
1701
1701
  return Ft = {
1702
- encrypt(f, l, h) {
1703
- return M(f, l, 1, h);
1702
+ encrypt(f, a, h) {
1703
+ return M(f, a, 1, h);
1704
1704
  },
1705
- decrypt(f, l, h) {
1706
- return M(f, l, 0, h);
1705
+ decrypt(f, a, h) {
1706
+ return M(f, a, 0, h);
1707
1707
  }
1708
1708
  }, Ft;
1709
1709
  }
@@ -1720,22 +1720,22 @@ function Ti({
1720
1720
  uid: v = "",
1721
1721
  salt: z = "",
1722
1722
  ts: S = 0,
1723
- data: T
1723
+ data: y
1724
1724
  }) {
1725
- const I = Date.now() + S, r = Math.random().toString(36).substring(2, 15), g = JSON.stringify(T ?? ""), c = `${I}${v}${r}${g}${z}`, y = bi.sm3(c);
1725
+ const I = Date.now() + S, r = Math.random().toString(36).substring(2, 15), g = typeof y == "object" ? JSON.stringify(y ?? {}) : y ?? "", c = `${I}${v}${r}${g}${z}`, b = bi.sm3(c);
1726
1726
  return {
1727
1727
  headers: {
1728
1728
  "X-Sign-Timestamp": String(I),
1729
1729
  "X-Sign-Nonce": r,
1730
- "X-Sign-Client": y
1730
+ "X-Sign-Client": b
1731
1731
  }
1732
1732
  };
1733
1733
  }
1734
1734
  function wi(v) {
1735
- const z = ["script", "iframe", "object", "embed", "link", "meta", "style"], S = ["onerror", "onload", "onclick", "onmouseover", "onfocus", "onmouseenter", "onmouseleave"], T = (y) => /^javascript:/i.test(y) || /^data:text\/html/i.test(y), r = new DOMParser().parseFromString(`<div>${v}</div>`, "text/html"), g = r.body.firstChild;
1736
- function c(y) {
1737
- if (y.nodeType === Node.ELEMENT_NODE) {
1738
- const p = y, d = p.tagName.toLowerCase();
1735
+ const z = ["script", "iframe", "object", "embed", "link", "meta", "style"], S = ["onerror", "onload", "onclick", "onmouseover", "onfocus", "onmouseenter", "onmouseleave"], y = (b) => /^javascript:/i.test(b) || /^data:text\/html/i.test(b), r = new DOMParser().parseFromString(`<div>${v}</div>`, "text/html"), g = r.body.firstChild;
1736
+ function c(b) {
1737
+ if (b.nodeType === Node.ELEMENT_NODE) {
1738
+ const p = b, d = p.tagName.toLowerCase();
1739
1739
  if (z.includes(d)) {
1740
1740
  const w = p.outerHTML, B = r.createTextNode(w);
1741
1741
  p.replaceWith(B);
@@ -1743,7 +1743,7 @@ function wi(v) {
1743
1743
  }
1744
1744
  [...p.attributes].forEach((w) => {
1745
1745
  const B = w.name.toLowerCase(), E = w.value;
1746
- (S.includes(B) || T(E)) && p.removeAttribute(w.name);
1746
+ (S.includes(B) || y(E)) && p.removeAttribute(w.name);
1747
1747
  }), [...p.childNodes].forEach(c);
1748
1748
  }
1749
1749
  }