@pubinfo-pr/module-crypto 0.189.1 → 0.197.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
@@ -11,12 +11,12 @@ import './index.css';var __create = Object.create, __defProp = Object.defineProp
11
11
  }) : n, e)), __require = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
12
12
  if (typeof require < "u") return require.apply(this, arguments);
13
13
  throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function.");
14
- }), __virtual_pubinfo_resolver_default = {
14
+ }), _virtual_pubinfo_resolver_default = {
15
15
  icons: {},
16
16
  layouts: {},
17
17
  pages: {
18
- "src/pages/setting.vue": () => import("./setting-B92b1yHA.js"),
19
- "src/pages/components/drawerCryptoUrl.vue": () => import("./drawerCryptoUrl-DPRsQXAo.js")
18
+ "src/pages/setting.vue": () => import("./setting-DkwAGQxz.js"),
19
+ "src/pages/components/drawerCryptoUrl.vue": () => import("./drawerCryptoUrl-DltbAlje.js")
20
20
  }
21
21
  };
22
22
  const apictx = createContext("crypto-api"), basic = wrapProxy(apictx.use, "request");
@@ -635,17 +635,17 @@ var require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((e, t) => {
635
635
  ]);
636
636
  },
637
637
  _doProcessBlock: function(e, t) {
638
- for (var n = this._hash.words, r = n[0], a = n[1], c = n[2], l = n[3], p = n[4], g = n[5], v = n[6], y = n[7], T = r.high, E = r.low, k = a.high, j = a.low, M = c.high, N = c.low, P = l.high, F = l.low, I = p.high, R = p.low, B = g.high, V = g.low, H = v.high, U = v.low, W = y.high, G = y.low, K = T, J = E, Y = k, X = j, Ie = M, Z = N, Le = P, Re = F, Q = I, $ = R, ze = B, Be = V, Ve = H, He = U, Ue = W, We = G, Ge = 0; Ge < 80; Ge++) {
639
- var Ke, qe, Je = h[Ge];
640
- if (Ge < 16) qe = Je.high = e[t + Ge * 2] | 0, Ke = Je.low = e[t + Ge * 2 + 1] | 0;
638
+ for (var n = this._hash.words, r = n[0], a = n[1], c = n[2], l = n[3], p = n[4], g = n[5], v = n[6], y = n[7], T = r.high, E = r.low, k = a.high, j = a.low, M = c.high, N = c.low, P = l.high, F = l.low, I = p.high, R = p.low, B = g.high, V = g.low, H = v.high, U = v.low, W = y.high, G = y.low, K = T, J = E, Y = k, X = j, et = M, Z = N, tt = P, nt = F, Q = I, $ = R, rt = B, it = V, at = H, ot = U, st = W, ct = G, lt = 0; lt < 80; lt++) {
639
+ var ut, dt, ft = h[lt];
640
+ if (lt < 16) dt = ft.high = e[t + lt * 2] | 0, ut = ft.low = e[t + lt * 2 + 1] | 0;
641
641
  else {
642
- var Ye = h[Ge - 15], Xe = Ye.high, Ze = Ye.low, Qe = (Xe >>> 1 | Ze << 31) ^ (Xe >>> 8 | Ze << 24) ^ Xe >>> 7, $e = (Ze >>> 1 | Xe << 31) ^ (Ze >>> 8 | Xe << 24) ^ (Ze >>> 7 | Xe << 25), et = h[Ge - 2], tt = et.high, nt = et.low, rt = (tt >>> 19 | nt << 13) ^ (tt << 3 | nt >>> 29) ^ tt >>> 6, it = (nt >>> 19 | tt << 13) ^ (nt << 3 | tt >>> 29) ^ (nt >>> 6 | tt << 26), at = h[Ge - 7], ot = at.high, st = at.low, ct = h[Ge - 16], lt = ct.high, ut = ct.low;
643
- Ke = $e + st, qe = Qe + ot + (Ke >>> 0 < $e >>> 0 ? 1 : 0), Ke += it, qe = qe + rt + (Ke >>> 0 < it >>> 0 ? 1 : 0), Ke += ut, qe = qe + lt + (Ke >>> 0 < ut >>> 0 ? 1 : 0), Je.high = qe, Je.low = Ke;
642
+ var pt = h[lt - 15], mt = pt.high, ht = pt.low, gt = (mt >>> 1 | ht << 31) ^ (mt >>> 8 | ht << 24) ^ mt >>> 7, _t = (ht >>> 1 | mt << 31) ^ (ht >>> 8 | mt << 24) ^ (ht >>> 7 | mt << 25), vt = h[lt - 2], yt = vt.high, bt = vt.low, xt = (yt >>> 19 | bt << 13) ^ (yt << 3 | bt >>> 29) ^ yt >>> 6, St = (bt >>> 19 | yt << 13) ^ (bt << 3 | yt >>> 29) ^ (bt >>> 6 | yt << 26), Ct = h[lt - 7], wt = Ct.high, Tt = Ct.low, Et = h[lt - 16], Dt = Et.high, Ot = Et.low;
643
+ ut = _t + Tt, dt = gt + wt + (ut >>> 0 < _t >>> 0 ? 1 : 0), ut += St, dt = dt + xt + (ut >>> 0 < St >>> 0 ? 1 : 0), ut += Ot, dt = dt + Dt + (ut >>> 0 < Ot >>> 0 ? 1 : 0), ft.high = dt, ft.low = ut;
644
644
  }
645
- var dt = Q & ze ^ ~Q & Ve, ft = $ & Be ^ ~$ & He, pt = K & Y ^ K & Ie ^ Y & Ie, mt = J & X ^ J & Z ^ X & Z, ht = (K >>> 28 | J << 4) ^ (K << 30 | J >>> 2) ^ (K << 25 | J >>> 7), gt = (J >>> 28 | K << 4) ^ (J << 30 | K >>> 2) ^ (J << 25 | K >>> 7), _t = (Q >>> 14 | $ << 18) ^ (Q >>> 18 | $ << 14) ^ (Q << 23 | $ >>> 9), vt = ($ >>> 14 | Q << 18) ^ ($ >>> 18 | Q << 14) ^ ($ << 23 | Q >>> 9), yt = m[Ge], bt = yt.high, xt = yt.low, St = We + vt, Ct = Ue + _t + (St >>> 0 < We >>> 0 ? 1 : 0), St = St + ft, Ct = Ct + dt + (St >>> 0 < ft >>> 0 ? 1 : 0), St = St + xt, Ct = Ct + bt + (St >>> 0 < xt >>> 0 ? 1 : 0), St = St + Ke, Ct = Ct + qe + (St >>> 0 < Ke >>> 0 ? 1 : 0), wt = gt + mt, Tt = ht + pt + (wt >>> 0 < gt >>> 0 ? 1 : 0);
646
- Ue = Ve, We = He, Ve = ze, He = Be, ze = Q, Be = $, $ = Re + St | 0, Q = Le + Ct + ($ >>> 0 < Re >>> 0 ? 1 : 0) | 0, Le = Ie, Re = Z, Ie = Y, Z = X, Y = K, X = J, J = St + wt | 0, K = Ct + Tt + (J >>> 0 < St >>> 0 ? 1 : 0) | 0;
645
+ var kt = Q & rt ^ ~Q & at, At = $ & it ^ ~$ & ot, jt = K & Y ^ K & et ^ Y & et, Mt = J & X ^ J & Z ^ X & Z, Nt = (K >>> 28 | J << 4) ^ (K << 30 | J >>> 2) ^ (K << 25 | J >>> 7), Pt = (J >>> 28 | K << 4) ^ (J << 30 | K >>> 2) ^ (J << 25 | K >>> 7), Ft = (Q >>> 14 | $ << 18) ^ (Q >>> 18 | $ << 14) ^ (Q << 23 | $ >>> 9), It = ($ >>> 14 | Q << 18) ^ ($ >>> 18 | Q << 14) ^ ($ << 23 | Q >>> 9), Lt = m[lt], Rt = Lt.high, zt = Lt.low, Bt = ct + It, Vt = st + Ft + (Bt >>> 0 < ct >>> 0 ? 1 : 0), Bt = Bt + At, Vt = Vt + kt + (Bt >>> 0 < At >>> 0 ? 1 : 0), Bt = Bt + zt, Vt = Vt + Rt + (Bt >>> 0 < zt >>> 0 ? 1 : 0), Bt = Bt + ut, Vt = Vt + dt + (Bt >>> 0 < ut >>> 0 ? 1 : 0), Ht = Pt + Mt, Ut = Nt + jt + (Ht >>> 0 < Pt >>> 0 ? 1 : 0);
646
+ st = at, ct = ot, at = rt, ot = it, rt = Q, it = $, $ = nt + Bt | 0, Q = tt + Vt + ($ >>> 0 < nt >>> 0 ? 1 : 0) | 0, tt = et, nt = Z, et = Y, Z = X, Y = K, X = J, J = Bt + Ht | 0, K = Vt + Ut + (J >>> 0 < Bt >>> 0 ? 1 : 0) | 0;
647
647
  }
648
- E = r.low = E + J, r.high = T + K + (E >>> 0 < J >>> 0 ? 1 : 0), j = a.low = j + X, a.high = k + Y + (j >>> 0 < X >>> 0 ? 1 : 0), N = c.low = N + Z, c.high = M + Ie + (N >>> 0 < Z >>> 0 ? 1 : 0), F = l.low = F + Re, l.high = P + Le + (F >>> 0 < Re >>> 0 ? 1 : 0), R = p.low = R + $, p.high = I + Q + (R >>> 0 < $ >>> 0 ? 1 : 0), V = g.low = V + Be, g.high = B + ze + (V >>> 0 < Be >>> 0 ? 1 : 0), U = v.low = U + He, v.high = H + Ve + (U >>> 0 < He >>> 0 ? 1 : 0), G = y.low = G + We, y.high = W + Ue + (G >>> 0 < We >>> 0 ? 1 : 0);
648
+ E = r.low = E + J, r.high = T + K + (E >>> 0 < J >>> 0 ? 1 : 0), j = a.low = j + X, a.high = k + Y + (j >>> 0 < X >>> 0 ? 1 : 0), N = c.low = N + Z, c.high = M + et + (N >>> 0 < Z >>> 0 ? 1 : 0), F = l.low = F + nt, l.high = P + tt + (F >>> 0 < nt >>> 0 ? 1 : 0), R = p.low = R + $, p.high = I + Q + (R >>> 0 < $ >>> 0 ? 1 : 0), V = g.low = V + it, g.high = B + rt + (V >>> 0 < it >>> 0 ? 1 : 0), U = v.low = U + ot, v.high = H + at + (U >>> 0 < ot >>> 0 ? 1 : 0), G = y.low = G + ct, y.high = W + st + (G >>> 0 < ct >>> 0 ? 1 : 0);
649
649
  },
650
650
  _doFinalize: function() {
651
651
  var e = this._data, t = e.words, n = this._nDataBytes * 8, r = e.sigBytes * 8;
@@ -1135,8 +1135,8 @@ var require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((e, t) => {
1135
1135
  var r = t + n, a = e[r];
1136
1136
  e[r] = (a << 8 | a >>> 24) & 16711935 | (a << 24 | a >>> 8) & 4278255360;
1137
1137
  }
1138
- for (var c = this._hash.words, l = v.words, T = y.words, F = p.words, I = m.words, R = h.words, B = g.words, V, H, U, W, G, K = V = c[0], J = H = c[1], Y = U = c[2], X = W = c[3], Ie = G = c[4], Z, n = 0; n < 80; n += 1) Z = V + e[t + F[n]] | 0, n < 16 ? Z += E(H, U, W) + l[0] : n < 32 ? Z += k(H, U, W) + l[1] : n < 48 ? Z += j(H, U, W) + l[2] : n < 64 ? Z += M(H, U, W) + l[3] : Z += N(H, U, W) + l[4], Z |= 0, Z = P(Z, R[n]), Z = Z + G | 0, V = G, G = W, W = P(U, 10), U = H, H = Z, Z = K + e[t + I[n]] | 0, n < 16 ? Z += N(J, Y, X) + T[0] : n < 32 ? Z += M(J, Y, X) + T[1] : n < 48 ? Z += j(J, Y, X) + T[2] : n < 64 ? Z += k(J, Y, X) + T[3] : Z += E(J, Y, X) + T[4], Z |= 0, Z = P(Z, B[n]), Z = Z + Ie | 0, K = Ie, Ie = X, X = P(Y, 10), Y = J, J = Z;
1139
- Z = c[1] + U + X | 0, c[1] = c[2] + W + Ie | 0, c[2] = c[3] + G + K | 0, c[3] = c[4] + V + J | 0, c[4] = c[0] + H + Y | 0, c[0] = Z;
1138
+ for (var c = this._hash.words, l = v.words, T = y.words, F = p.words, I = m.words, R = h.words, B = g.words, V, H, U, W, G, K = V = c[0], J = H = c[1], Y = U = c[2], X = W = c[3], et = G = c[4], Z, n = 0; n < 80; n += 1) Z = V + e[t + F[n]] | 0, n < 16 ? Z += E(H, U, W) + l[0] : n < 32 ? Z += k(H, U, W) + l[1] : n < 48 ? Z += j(H, U, W) + l[2] : n < 64 ? Z += M(H, U, W) + l[3] : Z += N(H, U, W) + l[4], Z |= 0, Z = P(Z, R[n]), Z = Z + G | 0, V = G, G = W, W = P(U, 10), U = H, H = Z, Z = K + e[t + I[n]] | 0, n < 16 ? Z += N(J, Y, X) + T[0] : n < 32 ? Z += M(J, Y, X) + T[1] : n < 48 ? Z += j(J, Y, X) + T[2] : n < 64 ? Z += k(J, Y, X) + T[3] : Z += E(J, Y, X) + T[4], Z |= 0, Z = P(Z, B[n]), Z = Z + et | 0, K = et, et = X, X = P(Y, 10), Y = J, J = Z;
1139
+ Z = c[1] + U + X | 0, c[1] = c[2] + W + et | 0, c[2] = c[3] + G + K | 0, c[3] = c[4] + V + J | 0, c[4] = c[0] + H + Y | 0, c[0] = Z;
1140
1140
  },
1141
1141
  _doFinalize: function() {
1142
1142
  var e = this._data, t = e.words, n = this._nDataBytes * 8, r = e.sigBytes * 8;
@@ -4052,7 +4052,7 @@ var Stream = function() {
4052
4052
  return t;
4053
4053
  }, e.prototype.getHexStringValue = function() {
4054
4054
  var e = this.toHexString(), t = this.header * 2, n = this.length * 2;
4055
- return e.substr(t, n);
4055
+ return e.substring(t, t + n);
4056
4056
  }, e.decode = function(t) {
4057
4057
  var n = t instanceof Stream ? t : new Stream(t, 0), r = new Stream(n), a = new ASN1Tag(n), c = e.decodeLength(n), l = n.pos, p = l - r.pos, m = null, h = function() {
4058
4058
  var t = [];
@@ -4563,7 +4563,7 @@ var Stream = function() {
4563
4563
  }, e.prototype.toRadix = function(e) {
4564
4564
  if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
4565
4565
  var t = this.chunkSize(e), n = e ** +t, r = nbv(n), a = nbi(), c = nbi(), l = "";
4566
- for (this.divRemTo(r, a, c); a.signum() > 0;) l = (n + c.intValue()).toString(e).substr(1) + l, a.divRemTo(r, a, c);
4566
+ for (this.divRemTo(r, a, c); a.signum() > 0;) l = (n + c.intValue()).toString(e).substring(1) + l, a.divRemTo(r, a, c);
4567
4567
  return c.intValue().toString(e) + l;
4568
4568
  }, e.prototype.fromRadix = function(t, n) {
4569
4569
  this.fromInt(0), n ??= 10;
@@ -4816,13 +4816,13 @@ var rng_state, rng_pool = null, rng_pptr;
4816
4816
  if (rng_pool == null) {
4817
4817
  rng_pool = [], rng_pptr = 0;
4818
4818
  var t$1 = void 0;
4819
- if (typeof window < "u" && window.crypto && window.crypto.getRandomValues) {
4819
+ if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
4820
4820
  var z$1 = new Uint32Array(256);
4821
- for (window.crypto.getRandomValues(z$1), t$1 = 0; t$1 < z$1.length; ++t$1) rng_pool[rng_pptr++] = z$1[t$1] & 255;
4821
+ for (self.crypto.getRandomValues(z$1), t$1 = 0; t$1 < z$1.length; ++t$1) rng_pool[rng_pptr++] = z$1[t$1] & 255;
4822
4822
  }
4823
4823
  var count = 0, onMouseMoveListener_1 = function(e) {
4824
4824
  if (count ||= 0, count >= 256 || rng_pptr >= 256) {
4825
- window.removeEventListener ? window.removeEventListener("mousemove", onMouseMoveListener_1, !1) : window.detachEvent && window.detachEvent("onmousemove", onMouseMoveListener_1);
4825
+ self.removeEventListener ? self.removeEventListener("mousemove", onMouseMoveListener_1, !1) : self.detachEvent && self.detachEvent("onmousemove", onMouseMoveListener_1);
4826
4826
  return;
4827
4827
  }
4828
4828
  try {
@@ -4830,7 +4830,7 @@ if (rng_pool == null) {
4830
4830
  rng_pool[rng_pptr++] = t & 255, count += 1;
4831
4831
  } catch {}
4832
4832
  };
4833
- typeof window < "u" && (window.addEventListener ? window.addEventListener("mousemove", onMouseMoveListener_1, !1) : window.attachEvent && window.attachEvent("onmousemove", onMouseMoveListener_1));
4833
+ typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", onMouseMoveListener_1, !1) : self.attachEvent && self.attachEvent("onmousemove", onMouseMoveListener_1));
4834
4834
  }
4835
4835
  function rng_get_byte() {
4836
4836
  if (rng_state == null) {
@@ -4849,6 +4849,136 @@ var SecureRandom = function() {
4849
4849
  for (var t = 0; t < e.length; ++t) e[t] = rng_get_byte();
4850
4850
  }, e;
4851
4851
  }();
4852
+ function rstr_sha256(e) {
4853
+ return binb2rstr(binb_sha256(rstr2binb(e), e.length * 8));
4854
+ }
4855
+ function rstr2hex(e) {
4856
+ for (var t = "0123456789abcdef", n = "", r = 0; r < e.length; r++) {
4857
+ var a = e.charCodeAt(r);
4858
+ n += t.charAt(a >>> 4 & 15) + t.charAt(a & 15);
4859
+ }
4860
+ return n;
4861
+ }
4862
+ function rstr2binb(e) {
4863
+ for (var t = Array(e.length >> 2), n = 0; n < t.length; n++) t[n] = 0;
4864
+ for (var n = 0; n < e.length * 8; n += 8) t[n >> 5] |= (e.charCodeAt(n / 8) & 255) << 24 - n % 32;
4865
+ return t;
4866
+ }
4867
+ function binb2rstr(e) {
4868
+ for (var t = "", n = 0; n < e.length * 32; n += 8) t += String.fromCharCode(e[n >> 5] >>> 24 - n % 32 & 255);
4869
+ return t;
4870
+ }
4871
+ function sha256_S(e, t) {
4872
+ return e >>> t | e << 32 - t;
4873
+ }
4874
+ function sha256_R(e, t) {
4875
+ return e >>> t;
4876
+ }
4877
+ function sha256_Ch(e, t, n) {
4878
+ return e & t ^ ~e & n;
4879
+ }
4880
+ function sha256_Maj(e, t, n) {
4881
+ return e & t ^ e & n ^ t & n;
4882
+ }
4883
+ function sha256_Sigma0256(e) {
4884
+ return sha256_S(e, 2) ^ sha256_S(e, 13) ^ sha256_S(e, 22);
4885
+ }
4886
+ function sha256_Sigma1256(e) {
4887
+ return sha256_S(e, 6) ^ sha256_S(e, 11) ^ sha256_S(e, 25);
4888
+ }
4889
+ function sha256_Gamma0256(e) {
4890
+ return sha256_S(e, 7) ^ sha256_S(e, 18) ^ sha256_R(e, 3);
4891
+ }
4892
+ function sha256_Gamma1256(e) {
4893
+ return sha256_S(e, 17) ^ sha256_S(e, 19) ^ sha256_R(e, 10);
4894
+ }
4895
+ var sha256_K = [
4896
+ 1116352408,
4897
+ 1899447441,
4898
+ -1245643825,
4899
+ -373957723,
4900
+ 961987163,
4901
+ 1508970993,
4902
+ -1841331548,
4903
+ -1424204075,
4904
+ -670586216,
4905
+ 310598401,
4906
+ 607225278,
4907
+ 1426881987,
4908
+ 1925078388,
4909
+ -2132889090,
4910
+ -1680079193,
4911
+ -1046744716,
4912
+ -459576895,
4913
+ -272742522,
4914
+ 264347078,
4915
+ 604807628,
4916
+ 770255983,
4917
+ 1249150122,
4918
+ 1555081692,
4919
+ 1996064986,
4920
+ -1740746414,
4921
+ -1473132947,
4922
+ -1341970488,
4923
+ -1084653625,
4924
+ -958395405,
4925
+ -710438585,
4926
+ 113926993,
4927
+ 338241895,
4928
+ 666307205,
4929
+ 773529912,
4930
+ 1294757372,
4931
+ 1396182291,
4932
+ 1695183700,
4933
+ 1986661051,
4934
+ -2117940946,
4935
+ -1838011259,
4936
+ -1564481375,
4937
+ -1474664885,
4938
+ -1035236496,
4939
+ -949202525,
4940
+ -778901479,
4941
+ -694614492,
4942
+ -200395387,
4943
+ 275423344,
4944
+ 430227734,
4945
+ 506948616,
4946
+ 659060556,
4947
+ 883997877,
4948
+ 958139571,
4949
+ 1322822218,
4950
+ 1537002063,
4951
+ 1747873779,
4952
+ 1955562222,
4953
+ 2024104815,
4954
+ -2067236844,
4955
+ -1933114872,
4956
+ -1866530822,
4957
+ -1538233109,
4958
+ -1090935817,
4959
+ -965641998
4960
+ ];
4961
+ function binb_sha256(e, t) {
4962
+ var n = [
4963
+ 1779033703,
4964
+ -1150833019,
4965
+ 1013904242,
4966
+ -1521486534,
4967
+ 1359893119,
4968
+ -1694144372,
4969
+ 528734635,
4970
+ 1541459225
4971
+ ], r = Array(64), a, c, l, p, m, h, g, v, y, T, E, k;
4972
+ for (e[t >> 5] |= 128 << 24 - t % 32, e[(t + 64 >> 9 << 4) + 15] = t, y = 0; y < e.length; y += 16) {
4973
+ for (a = n[0], c = n[1], l = n[2], p = n[3], m = n[4], h = n[5], g = n[6], v = n[7], T = 0; T < 64; T++) T < 16 ? r[T] = e[T + y] : r[T] = safe_add(safe_add(safe_add(sha256_Gamma1256(r[T - 2]), r[T - 7]), sha256_Gamma0256(r[T - 15])), r[T - 16]), E = safe_add(safe_add(safe_add(safe_add(v, sha256_Sigma1256(m)), sha256_Ch(m, h, g)), sha256_K[T]), r[T]), k = safe_add(sha256_Sigma0256(a), sha256_Maj(a, c, l)), v = g, g = h, h = m, m = safe_add(p, E), p = l, l = c, c = a, a = safe_add(E, k);
4974
+ n[0] = safe_add(a, n[0]), n[1] = safe_add(c, n[1]), n[2] = safe_add(l, n[2]), n[3] = safe_add(p, n[3]), n[4] = safe_add(m, n[4]), n[5] = safe_add(h, n[5]), n[6] = safe_add(g, n[6]), n[7] = safe_add(v, n[7]);
4975
+ }
4976
+ return n;
4977
+ }
4978
+ function safe_add(e, t) {
4979
+ var n = (e & 65535) + (t & 65535);
4980
+ return (e >> 16) + (t >> 16) + (n >> 16) << 16 | n & 65535;
4981
+ }
4852
4982
  function pkcs1pad1(e, t) {
4853
4983
  if (t < e.length + 22) return console.error("Message too long for RSA"), null;
4854
4984
  for (var n = t - e.length - 6, r = "", a = 0; a < n; a += 2) r += "ff";
@@ -4867,6 +4997,29 @@ function pkcs1pad2(e, t) {
4867
4997
  }
4868
4998
  return n[--t] = 2, n[--t] = 0, new BigInteger(n);
4869
4999
  }
5000
+ function oaep_mgf1_arr(e, t, n) {
5001
+ for (var r = "", a = 0; r.length < t;) r += n(String.fromCharCode.apply(String, e.concat([
5002
+ (a & 4278190080) >> 24,
5003
+ (a & 16711680) >> 16,
5004
+ (a & 65280) >> 8,
5005
+ a & 255
5006
+ ]))), a += 1;
5007
+ return r;
5008
+ }
5009
+ var SHA256_SIZE = 32;
5010
+ function oaep_pad(e, t) {
5011
+ var n = SHA256_SIZE, r = rstr_sha256;
5012
+ if (e.length + 2 * n + 2 > t) throw "Message too long for RSA";
5013
+ var a = "", c;
5014
+ for (c = 0; c < t - e.length - 2 * n - 2; c += 1) a += "\0";
5015
+ var l = r("") + a + "" + e, p = Array(n);
5016
+ new SecureRandom().nextBytes(p);
5017
+ var m = oaep_mgf1_arr(p, l.length, r), h = [];
5018
+ for (c = 0; c < l.length; c += 1) h[c] = l.charCodeAt(c) ^ m.charCodeAt(c);
5019
+ var g = oaep_mgf1_arr(h, p.length, r), v = [0];
5020
+ for (c = 0; c < p.length; c += 1) v[c + 1] = p[c] ^ g.charCodeAt(c);
5021
+ return new BigInteger(v.concat(h));
5022
+ }
4870
5023
  var RSAKey = function() {
4871
5024
  function e() {
4872
5025
  this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
@@ -4879,13 +5032,14 @@ var RSAKey = function() {
4879
5032
  return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
4880
5033
  }, e.prototype.setPublic = function(e, t) {
4881
5034
  e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = parseBigInt(e, 16), this.e = parseInt(t, 16)) : console.error("Invalid RSA public key");
4882
- }, e.prototype.encrypt = function(e) {
4883
- var t = this.n.bitLength() + 7 >> 3, n = pkcs1pad2(e, t);
4884
- if (n == null) return null;
4885
- var r = this.doPublic(n);
5035
+ }, e.prototype.encrypt = function(e, t) {
5036
+ t === void 0 && (t = pkcs1pad2);
5037
+ var n = this.n.bitLength() + 7 >> 3, r = t(e, n);
4886
5038
  if (r == null) return null;
4887
- for (var a = r.toString(16), c = a.length, l = 0; l < t * 2 - c; l++) a = "0" + a;
4888
- return a;
5039
+ var a = this.doPublic(r);
5040
+ if (a == null) return null;
5041
+ for (var c = a.toString(16), l = c.length, p = 0; p < n * 2 - l; p++) c = "0" + c;
5042
+ return c;
4889
5043
  }, e.prototype.setPrivate = function(e, t, n) {
4890
5044
  e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = parseBigInt(e, 16), this.e = parseInt(t, 16), this.d = parseBigInt(n, 16)) : console.error("Invalid RSA private key");
4891
5045
  }, e.prototype.setPrivateEx = function(e, t, n, r, a, c, l, p) {
@@ -4939,12 +5093,12 @@ var RSAKey = function() {
4939
5093
  };
4940
5094
  setTimeout(p, 0);
4941
5095
  }, e.prototype.sign = function(e, t, n) {
4942
- var r = pkcs1pad1(getDigestHeader(n) + t(e).toString(), this.n.bitLength() / 4);
4943
- if (r == null) return null;
4944
- var a = this.doPrivate(r);
4945
- if (a == null) return null;
4946
- var c = a.toString(16);
4947
- return c.length & 1 ? "0" + c : c;
5096
+ var r = getDigestHeader(n) + t(e).toString(), a = this.n.bitLength() / 4, c = pkcs1pad1(r, a);
5097
+ if (c == null) return null;
5098
+ var l = this.doPrivate(c);
5099
+ if (l == null) return null;
5100
+ for (var p = l.toString(16), m = p.length, h = 0; h < a - m; h++) p = "0" + p;
5101
+ return p;
4948
5102
  }, e.prototype.verify = function(e, t, n) {
4949
5103
  var r = parseBigInt(t, 16), a = this.doPublic(r);
4950
5104
  return a == null ? null : removeDigestHeader(a.toString(16).replace(/^1f+00/, "")) == n(e).toString();
@@ -4976,13 +5130,12 @@ function getDigestHeader(e) {
4976
5130
  function removeDigestHeader(e) {
4977
5131
  for (var t in DIGEST_HEADERS) if (DIGEST_HEADERS.hasOwnProperty(t)) {
4978
5132
  var n = DIGEST_HEADERS[t], r = n.length;
4979
- if (e.substr(0, r) == n) return e.substr(r);
5133
+ if (e.substring(0, r) == n) return e.substring(r);
4980
5134
  }
4981
5135
  return e;
4982
5136
  }
4983
- var YAHOO = {};
4984
- YAHOO.lang = { extend: function(e, t, n) {
4985
- if (!t || !e) throw Error("YAHOO.lang.extend failed, please check that all dependencies are included.");
5137
+ function extendClass(e, t, n) {
5138
+ if (!t || !e) throw Error("extend failed, please check that all dependencies are included.");
4986
5139
  var r = function() {};
4987
5140
  if (r.prototype = t.prototype, e.prototype = new r(), e.prototype.constructor = e, e.superclass = t.prototype, t.prototype.constructor == Object.prototype.constructor && (t.prototype.constructor = t), n) {
4988
5141
  for (var a in n) e.prototype[a] = n[a];
@@ -4997,7 +5150,7 @@ YAHOO.lang = { extend: function(e, t, n) {
4997
5150
  } catch {}
4998
5151
  c(e.prototype, n);
4999
5152
  }
5000
- } };
5153
+ }
5001
5154
  /**
5002
5155
  * @fileOverview
5003
5156
  * @name asn1-1.0.js
@@ -5013,9 +5166,9 @@ var KJUR = {};
5013
5166
  return t.length % 2 == 1 && (t = "0" + t), t;
5014
5167
  }, this.bigIntToMinTwosComplementsHex = function(e) {
5015
5168
  var t = e.toString(16);
5016
- if (t.substr(0, 1) != "-") t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
5169
+ if (t.substring(0, 1) != "-") t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
5017
5170
  else {
5018
- var n = t.substr(1).length;
5171
+ var n = t.substring(1).length;
5019
5172
  n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
5020
5173
  for (var r = "", a = 0; a < n; a++) r += "f";
5021
5174
  t = new BigInteger(r, 16).xor(e).add(BigInteger.ONE).toString(16).replace(/^-/, "");
@@ -5075,9 +5228,9 @@ var KJUR = {};
5075
5228
  return this.newObject(e).getEncodedHex();
5076
5229
  };
5077
5230
  }(), KJUR.asn1.ASN1Util.oidHexToInt = function(e) {
5078
- for (var t = "", n = parseInt(e.substr(0, 2), 16), r = Math.floor(n / 40), a = n % 40, t = r + "." + a, c = "", l = 2; l < e.length; l += 2) {
5079
- var p = ("00000000" + parseInt(e.substr(l, 2), 16).toString(2)).slice(-8);
5080
- if (c += p.substr(1, 7), p.substr(0, 1) == "0") {
5231
+ for (var t = "", n = parseInt(e.substring(0, 2), 16), r = Math.floor(n / 40), a = n % 40, t = r + "." + a, c = "", l = 2; l < e.length; l += 2) {
5232
+ var p = ("00000000" + parseInt(e.substring(l, l + 2), 16).toString(2)).slice(-8);
5233
+ if (c += p.substring(1, 8), p.substring(0, 1) == "0") {
5081
5234
  var m = new BigInteger(c, 2);
5082
5235
  t = t + "." + m.toString(10), c = "";
5083
5236
  }
@@ -5093,7 +5246,7 @@ var KJUR = {};
5093
5246
  for (var c = "", l = 0; l < a; l++) c += "0";
5094
5247
  r = c + r;
5095
5248
  for (var l = 0; l < r.length - 1; l += 7) {
5096
- var p = r.substr(l, 7);
5249
+ var p = r.substring(l, l + 7);
5097
5250
  l != r.length - 7 && (p = "1" + p), n += t(parseInt(p, 2));
5098
5251
  }
5099
5252
  return n;
@@ -5130,12 +5283,12 @@ var KJUR = {};
5130
5283
  }, this.getFreshValueHex = function() {
5131
5284
  return this.hV;
5132
5285
  }, e !== void 0 && (typeof e == "string" ? this.setString(e) : e.str === void 0 ? e.hex !== void 0 && this.setStringHex(e.hex) : this.setString(e.str));
5133
- }, YAHOO.lang.extend(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object), KJUR.asn1.DERAbstractTime = function(e) {
5286
+ }, extendClass(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object), KJUR.asn1.DERAbstractTime = function(e) {
5134
5287
  KJUR.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(e) {
5135
5288
  return utc = e.getTime() + e.getTimezoneOffset() * 6e4, new Date(utc);
5136
5289
  }, this.formatDate = function(e, t, n) {
5137
5290
  var r = this.zeroPadding, a = this.localDateToUTC(e), c = String(a.getFullYear());
5138
- t == "utc" && (c = c.substr(2, 2));
5291
+ t == "utc" && (c = c.substring(2, 4));
5139
5292
  var l = r(String(a.getMonth() + 1), 2), p = r(String(a.getDate()), 2), m = r(String(a.getHours()), 2), h = r(String(a.getMinutes()), 2), g = r(String(a.getSeconds()), 2), v = c + l + p + m + h + g;
5140
5293
  if (n === !0) {
5141
5294
  var y = a.getMilliseconds();
@@ -5157,15 +5310,15 @@ var KJUR = {};
5157
5310
  }, this.getFreshValueHex = function() {
5158
5311
  return this.hV;
5159
5312
  };
5160
- }, YAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object), KJUR.asn1.DERAbstractStructured = function(e) {
5313
+ }, extendClass(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object), KJUR.asn1.DERAbstractStructured = function(e) {
5161
5314
  KJUR.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(e) {
5162
5315
  this.hTLV = null, this.isModified = !0, this.asn1Array = e;
5163
5316
  }, this.appendASN1Object = function(e) {
5164
5317
  this.hTLV = null, this.isModified = !0, this.asn1Array.push(e);
5165
5318
  }, this.asn1Array = [], e !== void 0 && e.array !== void 0 && (this.asn1Array = e.array);
5166
- }, YAHOO.lang.extend(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object), KJUR.asn1.DERBoolean = function() {
5319
+ }, extendClass(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object), KJUR.asn1.DERBoolean = function() {
5167
5320
  KJUR.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
5168
- }, YAHOO.lang.extend(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object), KJUR.asn1.DERInteger = function(e) {
5321
+ }, extendClass(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object), KJUR.asn1.DERInteger = function(e) {
5169
5322
  KJUR.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(e) {
5170
5323
  this.hTLV = null, this.isModified = !0, this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
5171
5324
  }, this.setByInteger = function(e) {
@@ -5176,7 +5329,7 @@ var KJUR = {};
5176
5329
  }, this.getFreshValueHex = function() {
5177
5330
  return this.hV;
5178
5331
  }, e !== void 0 && (e.bigint === void 0 ? e.int === void 0 ? typeof e == "number" ? this.setByInteger(e) : e.hex !== void 0 && this.setValueHex(e.hex) : this.setByInteger(e.int) : this.setByBigInteger(e.bigint));
5179
- }, YAHOO.lang.extend(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object), KJUR.asn1.DERBitString = function(e) {
5332
+ }, extendClass(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object), KJUR.asn1.DERBitString = function(e) {
5180
5333
  e !== void 0 && e.obj !== void 0 && (e.hex = "00" + KJUR.asn1.ASN1Util.newObject(e.obj).getEncodedHex()), KJUR.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function(e) {
5181
5334
  this.hTLV = null, this.isModified = !0, this.hV = e;
5182
5335
  }, this.setUnusedBitsAndHexValue = function(e, t) {
@@ -5189,7 +5342,7 @@ var KJUR = {};
5189
5342
  t == 8 && (t = 0);
5190
5343
  for (var n = 0; n <= t; n++) e += "0";
5191
5344
  for (var r = "", n = 0; n < e.length - 1; n += 8) {
5192
- var a = e.substr(n, 8), c = parseInt(a, 2).toString(16);
5345
+ var a = e.substring(n, n + 8), c = parseInt(a, 2).toString(16);
5193
5346
  c.length == 1 && (c = "0" + c), r += c;
5194
5347
  }
5195
5348
  this.hTLV = null, this.isModified = !0, this.hV = "0" + t + r;
@@ -5202,11 +5355,11 @@ var KJUR = {};
5202
5355
  }, this.getFreshValueHex = function() {
5203
5356
  return this.hV;
5204
5357
  }, e !== void 0 && (typeof e == "string" && e.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(e) : e.hex === void 0 ? e.bin === void 0 ? e.array !== void 0 && this.setByBooleanArray(e.array) : this.setByBinaryString(e.bin) : this.setHexValueIncludingUnusedBits(e.hex));
5205
- }, YAHOO.lang.extend(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object), KJUR.asn1.DEROctetString = function(e) {
5358
+ }, extendClass(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object), KJUR.asn1.DEROctetString = function(e) {
5206
5359
  e !== void 0 && e.obj !== void 0 && (e.hex = KJUR.asn1.ASN1Util.newObject(e.obj).getEncodedHex()), KJUR.asn1.DEROctetString.superclass.constructor.call(this, e), this.hT = "04";
5207
- }, YAHOO.lang.extend(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERNull = function() {
5360
+ }, extendClass(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERNull = function() {
5208
5361
  KJUR.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
5209
- }, YAHOO.lang.extend(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object), KJUR.asn1.DERObjectIdentifier = function(e) {
5362
+ }, extendClass(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object), KJUR.asn1.DERObjectIdentifier = function(e) {
5210
5363
  var t = function(e) {
5211
5364
  var t = e.toString(16);
5212
5365
  return t.length == 1 && (t = "0" + t), t;
@@ -5216,7 +5369,7 @@ var KJUR = {};
5216
5369
  for (var c = "", l = 0; l < a; l++) c += "0";
5217
5370
  r = c + r;
5218
5371
  for (var l = 0; l < r.length - 1; l += 7) {
5219
- var p = r.substr(l, 7);
5372
+ var p = r.substring(l, l + 7);
5220
5373
  l != r.length - 7 && (p = "1" + p), n += t(parseInt(p, 2));
5221
5374
  }
5222
5375
  return n;
@@ -5236,7 +5389,7 @@ var KJUR = {};
5236
5389
  }, this.getFreshValueHex = function() {
5237
5390
  return this.hV;
5238
5391
  }, e !== void 0 && (typeof e == "string" ? e.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(e) : this.setValueName(e) : e.oid === void 0 ? e.hex === void 0 ? e.name !== void 0 && this.setValueName(e.name) : this.setValueHex(e.hex) : this.setValueOidString(e.oid));
5239
- }, YAHOO.lang.extend(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object), KJUR.asn1.DEREnumerated = function(e) {
5392
+ }, extendClass(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object), KJUR.asn1.DEREnumerated = function(e) {
5240
5393
  KJUR.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(e) {
5241
5394
  this.hTLV = null, this.isModified = !0, this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
5242
5395
  }, this.setByInteger = function(e) {
@@ -5247,29 +5400,29 @@ var KJUR = {};
5247
5400
  }, this.getFreshValueHex = function() {
5248
5401
  return this.hV;
5249
5402
  }, e !== void 0 && (e.int === void 0 ? typeof e == "number" ? this.setByInteger(e) : e.hex !== void 0 && this.setValueHex(e.hex) : this.setByInteger(e.int));
5250
- }, YAHOO.lang.extend(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object), KJUR.asn1.DERUTF8String = function(e) {
5403
+ }, extendClass(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object), KJUR.asn1.DERUTF8String = function(e) {
5251
5404
  KJUR.asn1.DERUTF8String.superclass.constructor.call(this, e), this.hT = "0c";
5252
- }, YAHOO.lang.extend(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString), KJUR.asn1.DERNumericString = function(e) {
5405
+ }, extendClass(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString), KJUR.asn1.DERNumericString = function(e) {
5253
5406
  KJUR.asn1.DERNumericString.superclass.constructor.call(this, e), this.hT = "12";
5254
- }, YAHOO.lang.extend(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERPrintableString = function(e) {
5407
+ }, extendClass(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERPrintableString = function(e) {
5255
5408
  KJUR.asn1.DERPrintableString.superclass.constructor.call(this, e), this.hT = "13";
5256
- }, YAHOO.lang.extend(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERTeletexString = function(e) {
5409
+ }, extendClass(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERTeletexString = function(e) {
5257
5410
  KJUR.asn1.DERTeletexString.superclass.constructor.call(this, e), this.hT = "14";
5258
- }, YAHOO.lang.extend(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERIA5String = function(e) {
5411
+ }, extendClass(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERIA5String = function(e) {
5259
5412
  KJUR.asn1.DERIA5String.superclass.constructor.call(this, e), this.hT = "16";
5260
- }, YAHOO.lang.extend(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString), KJUR.asn1.DERUTCTime = function(e) {
5413
+ }, extendClass(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString), KJUR.asn1.DERUTCTime = function(e) {
5261
5414
  KJUR.asn1.DERUTCTime.superclass.constructor.call(this, e), this.hT = "17", this.setByDate = function(e) {
5262
5415
  this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
5263
5416
  }, this.getFreshValueHex = function() {
5264
5417
  return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
5265
5418
  }, e !== void 0 && (e.str === void 0 ? typeof e == "string" && e.match(/^[0-9]{12}Z$/) ? this.setString(e) : e.hex === void 0 ? e.date !== void 0 && this.setByDate(e.date) : this.setStringHex(e.hex) : this.setString(e.str));
5266
- }, YAHOO.lang.extend(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime), KJUR.asn1.DERGeneralizedTime = function(e) {
5419
+ }, extendClass(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime), KJUR.asn1.DERGeneralizedTime = function(e) {
5267
5420
  KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, e), this.hT = "18", this.withMillis = !1, this.setByDate = function(e) {
5268
5421
  this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
5269
5422
  }, this.getFreshValueHex = function() {
5270
5423
  return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
5271
5424
  }, e !== void 0 && (e.str === void 0 ? typeof e == "string" && e.match(/^[0-9]{14}Z$/) ? this.setString(e) : e.hex === void 0 ? e.date !== void 0 && this.setByDate(e.date) : this.setStringHex(e.hex) : this.setString(e.str), e.millis === !0 && (this.withMillis = !0));
5272
- }, YAHOO.lang.extend(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime), KJUR.asn1.DERSequence = function(e) {
5425
+ }, extendClass(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime), KJUR.asn1.DERSequence = function(e) {
5273
5426
  KJUR.asn1.DERSequence.superclass.constructor.call(this, e), this.hT = "30", this.getFreshValueHex = function() {
5274
5427
  for (var e = "", t = 0; t < this.asn1Array.length; t++) {
5275
5428
  var n = this.asn1Array[t];
@@ -5277,7 +5430,7 @@ var KJUR = {};
5277
5430
  }
5278
5431
  return this.hV = e, this.hV;
5279
5432
  };
5280
- }, YAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured), KJUR.asn1.DERSet = function(e) {
5433
+ }, extendClass(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured), KJUR.asn1.DERSet = function(e) {
5281
5434
  KJUR.asn1.DERSet.superclass.constructor.call(this, e), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
5282
5435
  for (var e = [], t = 0; t < this.asn1Array.length; t++) {
5283
5436
  var n = this.asn1Array[t];
@@ -5285,13 +5438,13 @@ var KJUR = {};
5285
5438
  }
5286
5439
  return this.sortFlag == 1 && e.sort(), this.hV = e.join(""), this.hV;
5287
5440
  }, e !== void 0 && e.sortflag !== void 0 && e.sortflag == 0 && (this.sortFlag = !1);
5288
- }, YAHOO.lang.extend(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured), KJUR.asn1.DERTaggedObject = function(e) {
5441
+ }, extendClass(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured), KJUR.asn1.DERTaggedObject = function(e) {
5289
5442
  KJUR.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(e, t, n) {
5290
5443
  this.hT = t, this.isExplicit = e, this.asn1Object = n, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = n.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, t), this.isModified = !1);
5291
5444
  }, this.getFreshValueHex = function() {
5292
5445
  return this.hV;
5293
5446
  }, e !== void 0 && (e.tag !== void 0 && (this.hT = e.tag), e.explicit !== void 0 && (this.isExplicit = e.explicit), e.obj !== void 0 && (this.asn1Object = e.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
5294
- }, YAHOO.lang.extend(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);
5447
+ }, extendClass(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);
5295
5448
  var __extends = (function() {
5296
5449
  var e = function(t, n) {
5297
5450
  return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
@@ -5366,10 +5519,10 @@ var __extends = (function() {
5366
5519
  }, t;
5367
5520
  }(RSAKey), version = typeof process < "u" ? process.env?.npm_package_version : void 0, lib_default = function() {
5368
5521
  function e(e) {
5369
- e === void 0 && (e = {}), 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 = null;
5522
+ 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;
5370
5523
  }
5371
5524
  return e.prototype.setKey = function(e) {
5372
- this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new JSEncryptRSAKey(e);
5525
+ e ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new JSEncryptRSAKey(e)) : !this.key && this.log && console.error("A key was not set.");
5373
5526
  }, e.prototype.setPrivateKey = function(e) {
5374
5527
  this.setKey(e);
5375
5528
  }, e.prototype.setPublicKey = function(e) {
@@ -5386,18 +5539,38 @@ var __extends = (function() {
5386
5539
  } catch {
5387
5540
  return !1;
5388
5541
  }
5542
+ }, e.prototype.encryptOAEP = function(e) {
5543
+ try {
5544
+ return hex2b64(this.getKey().encrypt(e, oaep_pad));
5545
+ } catch {
5546
+ return !1;
5547
+ }
5389
5548
  }, e.prototype.sign = function(e, t, n) {
5549
+ t === void 0 && (t = function(e) {
5550
+ return e;
5551
+ }), n === void 0 && (n = "");
5390
5552
  try {
5391
5553
  return hex2b64(this.getKey().sign(e, t, n));
5392
5554
  } catch {
5393
5555
  return !1;
5394
5556
  }
5557
+ }, e.prototype.signSha256 = function(e) {
5558
+ return this.sign(e, function(e) {
5559
+ return rstr2hex(rstr_sha256(e));
5560
+ }, "sha256");
5395
5561
  }, e.prototype.verify = function(e, t, n) {
5562
+ n === void 0 && (n = function(e) {
5563
+ return e;
5564
+ });
5396
5565
  try {
5397
5566
  return this.getKey().verify(e, b64tohex(t), n);
5398
5567
  } catch {
5399
5568
  return !1;
5400
5569
  }
5570
+ }, e.prototype.verifySha256 = function(e, t) {
5571
+ return this.verify(e, t, function(e) {
5572
+ return rstr2hex(rstr_sha256(e));
5573
+ });
5401
5574
  }, e.prototype.getKey = function(e) {
5402
5575
  if (!this.key) {
5403
5576
  if (this.key = new JSEncryptRSAKey(), e && {}.toString.call(e) === "[object Function]") {
@@ -5443,7 +5616,7 @@ async function encryptMethod(e, t) {
5443
5616
  let n = JSON.parse(JSON.stringify(e.config.params));
5444
5617
  e.config.params = { secureData: decodeURIComponent(await t(decodeURIComponent(new URLSearchParams(n).toString()))) };
5445
5618
  }
5446
- 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));
5619
+ 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}`));
5447
5620
  }
5448
5621
  async function encrypt(e, t) {
5449
5622
  let n = ctx.use().key, r = ctx.use().iv;
@@ -5562,7 +5735,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5562
5735
  if (typeof e == "string") return y(e, t);
5563
5736
  if (ArrayBuffer.isView(e)) return E(e);
5564
5737
  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);
5565
- if (Ye(e, ArrayBuffer) || e && Ye(e.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (Ye(e, SharedArrayBuffer) || e && Ye(e.buffer, SharedArrayBuffer))) return k(e, t, n);
5738
+ if (pt(e, ArrayBuffer) || e && pt(e.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (pt(e, SharedArrayBuffer) || e && pt(e.buffer, SharedArrayBuffer))) return k(e, t, n);
5566
5739
  if (typeof e == "number") throw TypeError("The \"value\" argument must not be of type number. Received type number");
5567
5740
  var r = e.valueOf && e.valueOf();
5568
5741
  if (r != null && r !== e) return p.from(r, t, n);
@@ -5602,7 +5775,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5602
5775
  return n;
5603
5776
  }
5604
5777
  function E(e) {
5605
- if (Ye(e, Uint8Array)) {
5778
+ if (pt(e, Uint8Array)) {
5606
5779
  var t = new Uint8Array(e);
5607
5780
  return k(t.buffer, t.byteOffset, t.byteLength);
5608
5781
  }
@@ -5619,7 +5792,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5619
5792
  var t = M(e.length) | 0, n = l(t);
5620
5793
  return n.length === 0 || e.copy(n, 0, 0, t), n;
5621
5794
  }
5622
- if (e.length !== void 0) return typeof e.length != "number" || Xe(e.length) ? l(0) : T(e);
5795
+ if (e.length !== void 0) return typeof e.length != "number" || mt(e.length) ? l(0) : T(e);
5623
5796
  if (e.type === "Buffer" && Array.isArray(e.data)) return T(e.data);
5624
5797
  }
5625
5798
  function M(e) {
@@ -5632,7 +5805,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5632
5805
  p.isBuffer = function(e) {
5633
5806
  return e != null && e._isBuffer === !0 && e !== p.prototype;
5634
5807
  }, p.compare = function(e, t) {
5635
- if (Ye(e, Uint8Array) && (e = p.from(e, e.offset, e.byteLength)), Ye(t, Uint8Array) && (t = p.from(t, t.offset, t.byteLength)), !p.isBuffer(e) || !p.isBuffer(t)) throw TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
5808
+ if (pt(e, Uint8Array) && (e = p.from(e, e.offset, e.byteLength)), pt(t, Uint8Array) && (t = p.from(t, t.offset, t.byteLength)), !p.isBuffer(e) || !p.isBuffer(t)) throw TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
5636
5809
  if (e === t) return 0;
5637
5810
  for (var n = e.length, r = t.length, a = 0, c = Math.min(n, r); a < c; ++a) if (e[a] !== t[a]) {
5638
5811
  n = e[a], r = t[a];
@@ -5662,7 +5835,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5662
5835
  var r = p.allocUnsafe(t), a = 0;
5663
5836
  for (n = 0; n < e.length; ++n) {
5664
5837
  var c = e[n];
5665
- if (Ye(c, Uint8Array)) a + c.length > r.length ? p.from(c).copy(r, a) : Uint8Array.prototype.set.call(r, c, a);
5838
+ if (pt(c, Uint8Array)) a + c.length > r.length ? p.from(c).copy(r, a) : Uint8Array.prototype.set.call(r, c, a);
5666
5839
  else if (p.isBuffer(c)) c.copy(r, a);
5667
5840
  else throw TypeError("\"list\" argument must be an Array of Buffers");
5668
5841
  a += c.length;
@@ -5671,7 +5844,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5671
5844
  };
5672
5845
  function P(e, t) {
5673
5846
  if (p.isBuffer(e)) return e.length;
5674
- if (ArrayBuffer.isView(e) || Ye(e, ArrayBuffer)) return e.byteLength;
5847
+ if (ArrayBuffer.isView(e) || pt(e, ArrayBuffer)) return e.byteLength;
5675
5848
  if (typeof e != "string") throw TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof e);
5676
5849
  var n = e.length, r = arguments.length > 2 && arguments[2] === !0;
5677
5850
  if (!r && n === 0) return 0;
@@ -5680,15 +5853,15 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5680
5853
  case "latin1":
5681
5854
  case "binary": return n;
5682
5855
  case "utf8":
5683
- case "utf-8": return We(e).length;
5856
+ case "utf-8": return ct(e).length;
5684
5857
  case "ucs2":
5685
5858
  case "ucs-2":
5686
5859
  case "utf16le":
5687
5860
  case "utf-16le": return n * 2;
5688
5861
  case "hex": return n >>> 1;
5689
- case "base64": return qe(e).length;
5862
+ case "base64": return dt(e).length;
5690
5863
  default:
5691
- if (a) return r ? -1 : We(e).length;
5864
+ if (a) return r ? -1 : ct(e).length;
5692
5865
  t = ("" + t).toLowerCase(), a = !0;
5693
5866
  }
5694
5867
  }
@@ -5697,17 +5870,17 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5697
5870
  var r = !1;
5698
5871
  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 "";
5699
5872
  for (e ||= "utf8";;) switch (e) {
5700
- case "hex": return Le(this, t, n);
5873
+ case "hex": return tt(this, t, n);
5701
5874
  case "utf8":
5702
5875
  case "utf-8": return J(this, t, n);
5703
- case "ascii": return Ie(this, t, n);
5876
+ case "ascii": return et(this, t, n);
5704
5877
  case "latin1":
5705
5878
  case "binary": return Z(this, t, n);
5706
5879
  case "base64": return K(this, t, n);
5707
5880
  case "ucs2":
5708
5881
  case "ucs-2":
5709
5882
  case "utf16le":
5710
- case "utf-16le": return Re(this, t, n);
5883
+ case "utf-16le": return nt(this, t, n);
5711
5884
  default:
5712
5885
  if (r) throw TypeError("Unknown encoding: " + e);
5713
5886
  e = (e + "").toLowerCase(), r = !0;
@@ -5743,7 +5916,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5743
5916
  var t = "", n = e.INSPECT_MAX_BYTES;
5744
5917
  return t = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), this.length > n && (t += " ... "), "<Buffer " + t + ">";
5745
5918
  }, r && (p.prototype[r] = p.prototype.inspect), p.prototype.compare = function(e, t, n, r, a) {
5746
- if (Ye(e, Uint8Array) && (e = p.from(e, e.offset, e.byteLength)), !p.isBuffer(e)) throw TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof e);
5919
+ if (pt(e, Uint8Array) && (e = p.from(e, e.offset, e.byteLength)), !p.isBuffer(e)) throw TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof e);
5747
5920
  if (t === void 0 && (t = 0), n === void 0 && (n = e ? e.length : 0), r === void 0 && (r = 0), a === void 0 && (a = this.length), t < 0 || n > e.length || r < 0 || a > this.length) throw RangeError("out of range index");
5748
5921
  if (r >= a && t >= n) return 0;
5749
5922
  if (r >= a) return -1;
@@ -5757,7 +5930,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5757
5930
  };
5758
5931
  function R(e, t, n, r, a) {
5759
5932
  if (e.length === 0) return -1;
5760
- if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, Xe(n) && (n = a ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
5933
+ if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, mt(n) && (n = a ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
5761
5934
  if (a) return -1;
5762
5935
  n = e.length - 1;
5763
5936
  } else if (n < 0) if (a) n = 0;
@@ -5805,22 +5978,22 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5805
5978
  r > c / 2 && (r = c / 2);
5806
5979
  for (var l = 0; l < r; ++l) {
5807
5980
  var p = parseInt(t.substr(l * 2, 2), 16);
5808
- if (Xe(p)) return l;
5981
+ if (mt(p)) return l;
5809
5982
  e[n + l] = p;
5810
5983
  }
5811
5984
  return l;
5812
5985
  }
5813
5986
  function H(e, t, n, r) {
5814
- return Je(We(t, e.length - n), e, n, r);
5987
+ return ft(ct(t, e.length - n), e, n, r);
5815
5988
  }
5816
5989
  function U(e, t, n, r) {
5817
- return Je(Ge(t), e, n, r);
5990
+ return ft(lt(t), e, n, r);
5818
5991
  }
5819
5992
  function W(e, t, n, r) {
5820
- return Je(qe(t), e, n, r);
5993
+ return ft(dt(t), e, n, r);
5821
5994
  }
5822
5995
  function G(e, t, n, r) {
5823
- return Je(Ke(t, e.length - n), e, n, r);
5996
+ return ft(ut(t, e.length - n), e, n, r);
5824
5997
  }
5825
5998
  p.prototype.write = function(e, t, n, r) {
5826
5999
  if (t === void 0) r = "utf8", n = this.length, t = 0;
@@ -5885,7 +6058,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5885
6058
  for (var n = "", r = 0; r < t;) n += String.fromCharCode.apply(String, e.slice(r, r += Y));
5886
6059
  return n;
5887
6060
  }
5888
- function Ie(e, t, n) {
6061
+ function et(e, t, n) {
5889
6062
  var r = "";
5890
6063
  n = Math.min(e.length, n);
5891
6064
  for (var a = t; a < n; ++a) r += String.fromCharCode(e[a] & 127);
@@ -5897,13 +6070,13 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5897
6070
  for (var a = t; a < n; ++a) r += String.fromCharCode(e[a]);
5898
6071
  return r;
5899
6072
  }
5900
- function Le(e, t, n) {
6073
+ function tt(e, t, n) {
5901
6074
  var r = e.length;
5902
6075
  (!t || t < 0) && (t = 0), (!n || n < 0 || n > r) && (n = r);
5903
- for (var a = "", c = t; c < n; ++c) a += Ze[e[c]];
6076
+ for (var a = "", c = t; c < n; ++c) a += ht[e[c]];
5904
6077
  return a;
5905
6078
  }
5906
- function Re(e, t, n) {
6079
+ function nt(e, t, n) {
5907
6080
  for (var r = e.slice(t, n), a = "", c = 0; c < r.length - 1; c += 2) a += String.fromCharCode(r[c] + r[c + 1] * 256);
5908
6081
  return a;
5909
6082
  }
@@ -6024,24 +6197,24 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6024
6197
  }, p.prototype.writeInt32BE = function(e, t, n) {
6025
6198
  return e = +e, t >>>= 0, n || $(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;
6026
6199
  };
6027
- function ze(e, t, n, r, a, c) {
6200
+ function rt(e, t, n, r, a, c) {
6028
6201
  if (n + r > e.length || n < 0) throw RangeError("Index out of range");
6029
6202
  }
6030
- function Be(e, t, r, a, c) {
6031
- return t = +t, r >>>= 0, c || ze(e, t, r, 4, 34028234663852886e22, -34028234663852886e22), n.write(e, t, r, a, 23, 4), r + 4;
6203
+ function it(e, t, r, a, c) {
6204
+ return t = +t, r >>>= 0, c || rt(e, t, r, 4, 34028234663852886e22, -34028234663852886e22), n.write(e, t, r, a, 23, 4), r + 4;
6032
6205
  }
6033
6206
  p.prototype.writeFloatLE = function(e, t, n) {
6034
- return Be(this, e, t, !0, n);
6207
+ return it(this, e, t, !0, n);
6035
6208
  }, p.prototype.writeFloatBE = function(e, t, n) {
6036
- return Be(this, e, t, !1, n);
6209
+ return it(this, e, t, !1, n);
6037
6210
  };
6038
- function Ve(e, t, r, a, c) {
6039
- return t = +t, r >>>= 0, c || ze(e, t, r, 8, 17976931348623157e292, -17976931348623157e292), n.write(e, t, r, a, 52, 8), r + 8;
6211
+ function at(e, t, r, a, c) {
6212
+ return t = +t, r >>>= 0, c || rt(e, t, r, 8, 17976931348623157e292, -17976931348623157e292), n.write(e, t, r, a, 52, 8), r + 8;
6040
6213
  }
6041
6214
  p.prototype.writeDoubleLE = function(e, t, n) {
6042
- return Ve(this, e, t, !0, n);
6215
+ return at(this, e, t, !0, n);
6043
6216
  }, p.prototype.writeDoubleBE = function(e, t, n) {
6044
- return Ve(this, e, t, !1, n);
6217
+ return at(this, e, t, !1, n);
6045
6218
  }, p.prototype.copy = function(e, t, n, r) {
6046
6219
  if (!p.isBuffer(e)) throw TypeError("argument should be a Buffer");
6047
6220
  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;
@@ -6072,13 +6245,13 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6072
6245
  }
6073
6246
  return this;
6074
6247
  };
6075
- var He = /[^+/0-9A-Za-z-_]/g;
6076
- function Ue(e) {
6077
- if (e = e.split("=")[0], e = e.trim().replace(He, ""), e.length < 2) return "";
6248
+ var ot = /[^+/0-9A-Za-z-_]/g;
6249
+ function st(e) {
6250
+ if (e = e.split("=")[0], e = e.trim().replace(ot, ""), e.length < 2) return "";
6078
6251
  for (; e.length % 4 != 0;) e += "=";
6079
6252
  return e;
6080
6253
  }
6081
- function We(e, t) {
6254
+ function ct(e, t) {
6082
6255
  t ||= Infinity;
6083
6256
  for (var n, r = e.length, a = null, c = [], l = 0; l < r; ++l) {
6084
6257
  if (n = e.charCodeAt(l), n > 55295 && n < 57344) {
@@ -6115,28 +6288,28 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6115
6288
  }
6116
6289
  return c;
6117
6290
  }
6118
- function Ge(e) {
6291
+ function lt(e) {
6119
6292
  for (var t = [], n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
6120
6293
  return t;
6121
6294
  }
6122
- function Ke(e, t) {
6295
+ function ut(e, t) {
6123
6296
  for (var n, r, a, c = [], l = 0; l < e.length && !((t -= 2) < 0); ++l) n = e.charCodeAt(l), r = n >> 8, a = n % 256, c.push(a), c.push(r);
6124
6297
  return c;
6125
6298
  }
6126
- function qe(e) {
6127
- return t.toByteArray(Ue(e));
6299
+ function dt(e) {
6300
+ return t.toByteArray(st(e));
6128
6301
  }
6129
- function Je(e, t, n, r) {
6302
+ function ft(e, t, n, r) {
6130
6303
  for (var a = 0; a < r && !(a + n >= t.length || a >= e.length); ++a) t[a + n] = e[a];
6131
6304
  return a;
6132
6305
  }
6133
- function Ye(e, t) {
6306
+ function pt(e, t) {
6134
6307
  return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
6135
6308
  }
6136
- function Xe(e) {
6309
+ function mt(e) {
6137
6310
  return e !== e;
6138
6311
  }
6139
- var Ze = (function() {
6312
+ var ht = (function() {
6140
6313
  for (var e = "0123456789abcdef", t = Array(256), n = 0; n < 16; ++n) for (var r = n * 16, a = 0; a < 16; ++a) t[r + a] = e[n] + e[a];
6141
6314
  return t;
6142
6315
  })();
@@ -6307,7 +6480,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6307
6480
  }
6308
6481
  t.s = r < 0 ? -1 : 0, r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r), t.t = n, t.clamp();
6309
6482
  }
6310
- function Ie(e, t) {
6483
+ function et(e, t) {
6311
6484
  var n = this.abs(), r = e.abs(), c = n.t;
6312
6485
  for (t.t = c + r.t; --c >= 0;) t[c] = 0;
6313
6486
  for (c = 0; c < r.t; ++c) t[c + n.t] = n.am(0, r[c], t, c, 0, n.t);
@@ -6321,7 +6494,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6321
6494
  }
6322
6495
  e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), e.s = 0, e.clamp();
6323
6496
  }
6324
- function Le(e, t, n) {
6497
+ function tt(e, t, n) {
6325
6498
  var r = e.abs();
6326
6499
  if (!(r.t <= 0)) {
6327
6500
  var l = this.abs();
@@ -6344,7 +6517,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6344
6517
  }
6345
6518
  }
6346
6519
  }
6347
- function Re(e) {
6520
+ function nt(e) {
6348
6521
  var t = c();
6349
6522
  return this.abs().divRemTo(e, null, t), this.s < 0 && t.compareTo(a.ZERO) > 0 && e.subTo(t, t), t;
6350
6523
  }
@@ -6354,38 +6527,38 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6354
6527
  function $(e) {
6355
6528
  return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
6356
6529
  }
6357
- function ze(e) {
6530
+ function rt(e) {
6358
6531
  return e;
6359
6532
  }
6360
- function Be(e) {
6533
+ function it(e) {
6361
6534
  e.divRemTo(this.m, null, e);
6362
6535
  }
6363
- function Ve(e, t, n) {
6536
+ function at(e, t, n) {
6364
6537
  e.multiplyTo(t, n), this.reduce(n);
6365
6538
  }
6366
- function He(e, t) {
6539
+ function ot(e, t) {
6367
6540
  e.squareTo(t), this.reduce(t);
6368
6541
  }
6369
- Q.prototype.convert = $, Q.prototype.revert = ze, Q.prototype.reduce = Be, Q.prototype.mulTo = Ve, Q.prototype.sqrTo = He;
6370
- function Ue() {
6542
+ Q.prototype.convert = $, Q.prototype.revert = rt, Q.prototype.reduce = it, Q.prototype.mulTo = at, Q.prototype.sqrTo = ot;
6543
+ function st() {
6371
6544
  if (this.t < 1) return 0;
6372
6545
  var e = this[0];
6373
6546
  if (!(e & 1)) return 0;
6374
6547
  var t = e & 3;
6375
6548
  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;
6376
6549
  }
6377
- function We(e) {
6550
+ function ct(e) {
6378
6551
  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;
6379
6552
  }
6380
- function Ge(e) {
6553
+ function lt(e) {
6381
6554
  var t = c();
6382
6555
  return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(a.ZERO) > 0 && this.m.subTo(t, t), t;
6383
6556
  }
6384
- function Ke(e) {
6557
+ function ut(e) {
6385
6558
  var t = c();
6386
6559
  return e.copyTo(t), this.reduce(t), t;
6387
6560
  }
6388
- function qe(e) {
6561
+ function dt(e) {
6389
6562
  for (; e.t <= this.mt2;) e[e.t++] = 0;
6390
6563
  for (var t = 0; t < this.m.t; ++t) {
6391
6564
  var n = e[t] & 32767, r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
@@ -6393,17 +6566,17 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6393
6566
  }
6394
6567
  e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
6395
6568
  }
6396
- function Je(e, t) {
6569
+ function ft(e, t) {
6397
6570
  e.squareTo(t), this.reduce(t);
6398
6571
  }
6399
- function Ye(e, t, n) {
6572
+ function pt(e, t, n) {
6400
6573
  e.multiplyTo(t, n), this.reduce(n);
6401
6574
  }
6402
- We.prototype.convert = Ge, We.prototype.revert = Ke, We.prototype.reduce = qe, We.prototype.mulTo = Ye, We.prototype.sqrTo = Je;
6403
- function Xe() {
6575
+ ct.prototype.convert = lt, ct.prototype.revert = ut, ct.prototype.reduce = dt, ct.prototype.mulTo = pt, ct.prototype.sqrTo = ft;
6576
+ function mt() {
6404
6577
  return (this.t > 0 ? this[0] & 1 : this.s) == 0;
6405
6578
  }
6406
- function Ze(e, t) {
6579
+ function ht(e, t) {
6407
6580
  if (e > 4294967295 || e < 1) return a.ONE;
6408
6581
  var n = c(), r = c(), l = t.convert(this), p = U(e) - 1;
6409
6582
  for (l.copyTo(n); --p >= 0;) if (t.sqrTo(n, r), (e & 1 << p) > 0) t.mulTo(r, l, n);
@@ -6413,16 +6586,16 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6413
6586
  }
6414
6587
  return t.revert(n);
6415
6588
  }
6416
- function Qe(e, t) {
6417
- var n = e < 256 || t.isEven() ? new Q(t) : new We(t);
6589
+ function gt(e, t) {
6590
+ var n = e < 256 || t.isEven() ? new Q(t) : new ct(t);
6418
6591
  return this.exp(e, n);
6419
6592
  }
6420
- a.prototype.copyTo = M, a.prototype.fromInt = N, a.prototype.fromString = F, a.prototype.clamp = I, a.prototype.dlShiftTo = G, a.prototype.drShiftTo = K, a.prototype.lShiftTo = J, a.prototype.rShiftTo = Y, a.prototype.subTo = X, a.prototype.multiplyTo = Ie, a.prototype.squareTo = Z, a.prototype.divRemTo = Le, a.prototype.invDigit = Ue, a.prototype.isEven = Xe, a.prototype.exp = Ze, a.prototype.toString = R, a.prototype.negate = B, a.prototype.abs = V, a.prototype.compareTo = H, a.prototype.bitLength = W, a.prototype.mod = Re, a.prototype.modPowInt = Qe, a.ZERO = P(0), a.ONE = P(1);
6421
- function $e() {
6593
+ a.prototype.copyTo = M, a.prototype.fromInt = N, a.prototype.fromString = F, a.prototype.clamp = I, a.prototype.dlShiftTo = G, a.prototype.drShiftTo = K, a.prototype.lShiftTo = J, a.prototype.rShiftTo = Y, a.prototype.subTo = X, a.prototype.multiplyTo = et, a.prototype.squareTo = Z, a.prototype.divRemTo = tt, a.prototype.invDigit = st, a.prototype.isEven = mt, a.prototype.exp = ht, a.prototype.toString = R, a.prototype.negate = B, a.prototype.abs = V, a.prototype.compareTo = H, a.prototype.bitLength = W, a.prototype.mod = nt, a.prototype.modPowInt = gt, a.ZERO = P(0), a.ONE = P(1);
6594
+ function _t() {
6422
6595
  var e = c();
6423
6596
  return this.copyTo(e), e;
6424
6597
  }
6425
- function et() {
6598
+ function vt() {
6426
6599
  if (this.s < 0) {
6427
6600
  if (this.t == 1) return this[0] - this.DV;
6428
6601
  if (this.t == 0) return -1;
@@ -6430,25 +6603,25 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6430
6603
  else if (this.t == 0) return 0;
6431
6604
  return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
6432
6605
  }
6433
- function tt() {
6606
+ function yt() {
6434
6607
  return this.t == 0 ? this.s : this[0] << 24 >> 24;
6435
6608
  }
6436
- function nt() {
6609
+ function bt() {
6437
6610
  return this.t == 0 ? this.s : this[0] << 16 >> 16;
6438
6611
  }
6439
- function rt(e) {
6612
+ function xt(e) {
6440
6613
  return Math.floor(Math.LN2 * this.DB / Math.log(e));
6441
6614
  }
6442
- function it() {
6615
+ function St() {
6443
6616
  return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
6444
6617
  }
6445
- function at(e) {
6618
+ function Ct(e) {
6446
6619
  if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
6447
6620
  var t = this.chunkSize(e), n = e ** +t, r = P(n), a = c(), l = c(), p = "";
6448
6621
  for (this.divRemTo(r, a, l); a.signum() > 0;) p = (n + l.intValue()).toString(e).substr(1) + p, a.divRemTo(r, a, l);
6449
6622
  return l.intValue().toString(e) + p;
6450
6623
  }
6451
- function ot(e, t) {
6624
+ function wt(e, t) {
6452
6625
  this.fromInt(0), t ??= 10;
6453
6626
  for (var n = this.chunkSize(t), r = t ** +n, c = !1, l = 0, p = 0, m = 0; m < e.length; ++m) {
6454
6627
  var h = j(e, m);
@@ -6460,31 +6633,31 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6460
6633
  }
6461
6634
  l > 0 && (this.dMultiply(t ** +l), this.dAddOffset(p, 0)), c && a.ZERO.subTo(this, this);
6462
6635
  }
6463
- function st(e, t, n) {
6636
+ function Tt(e, t, n) {
6464
6637
  if (typeof t == "number") if (e < 2) this.fromInt(1);
6465
- else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(a.ONE.shiftLeft(e - 1), ht, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(a.ONE.shiftLeft(e - 1), this);
6638
+ else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(a.ONE.shiftLeft(e - 1), Nt, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(t);) this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(a.ONE.shiftLeft(e - 1), this);
6466
6639
  else {
6467
6640
  var r = [], c = e & 7;
6468
6641
  r.length = (e >> 3) + 1, t.nextBytes(r), c > 0 ? r[0] &= (1 << c) - 1 : r[0] = 0, this.fromString(r, 256);
6469
6642
  }
6470
6643
  }
6471
- function ct() {
6644
+ function Et() {
6472
6645
  var e = this.t, t = [];
6473
6646
  t[0] = this.s;
6474
6647
  var n = this.DB - e * this.DB % 8, r, a = 0;
6475
6648
  if (e-- > 0) for (n < this.DB && (r = this[e] >> n) != (this.s & this.DM) >> n && (t[a++] = 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), a == 0 && (this.s & 128) != (r & 128) && ++a, (a > 0 || r != this.s) && (t[a++] = r);
6476
6649
  return t;
6477
6650
  }
6478
- function lt(e) {
6651
+ function Dt(e) {
6479
6652
  return this.compareTo(e) == 0;
6480
6653
  }
6481
- function ut(e) {
6654
+ function Ot(e) {
6482
6655
  return this.compareTo(e) < 0 ? this : e;
6483
6656
  }
6484
- function dt(e) {
6657
+ function kt(e) {
6485
6658
  return this.compareTo(e) > 0 ? this : e;
6486
6659
  }
6487
- function ft(e, t, n) {
6660
+ function At(e, t, n) {
6488
6661
  var r, a, c = Math.min(e.t, this.t);
6489
6662
  for (r = 0; r < c; ++r) n[r] = t(this[r], e[r]);
6490
6663
  if (e.t < this.t) {
@@ -6496,81 +6669,81 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6496
6669
  }
6497
6670
  n.s = t(this.s, e.s), n.clamp();
6498
6671
  }
6499
- function pt(e, t) {
6672
+ function jt(e, t) {
6500
6673
  return e & t;
6501
6674
  }
6502
- function mt(e) {
6675
+ function Mt(e) {
6503
6676
  var t = c();
6504
- return this.bitwiseTo(e, pt, t), t;
6677
+ return this.bitwiseTo(e, jt, t), t;
6505
6678
  }
6506
- function ht(e, t) {
6679
+ function Nt(e, t) {
6507
6680
  return e | t;
6508
6681
  }
6509
- function gt(e) {
6682
+ function Pt(e) {
6510
6683
  var t = c();
6511
- return this.bitwiseTo(e, ht, t), t;
6684
+ return this.bitwiseTo(e, Nt, t), t;
6512
6685
  }
6513
- function _t(e, t) {
6686
+ function Ft(e, t) {
6514
6687
  return e ^ t;
6515
6688
  }
6516
- function vt(e) {
6689
+ function It(e) {
6517
6690
  var t = c();
6518
- return this.bitwiseTo(e, _t, t), t;
6691
+ return this.bitwiseTo(e, Ft, t), t;
6519
6692
  }
6520
- function yt(e, t) {
6693
+ function Lt(e, t) {
6521
6694
  return e & ~t;
6522
6695
  }
6523
- function bt(e) {
6696
+ function Rt(e) {
6524
6697
  var t = c();
6525
- return this.bitwiseTo(e, yt, t), t;
6698
+ return this.bitwiseTo(e, Lt, t), t;
6526
6699
  }
6527
- function xt() {
6700
+ function zt() {
6528
6701
  for (var e = c(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
6529
6702
  return e.t = this.t, e.s = ~this.s, e;
6530
6703
  }
6531
- function St(e) {
6704
+ function Bt(e) {
6532
6705
  var t = c();
6533
6706
  return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
6534
6707
  }
6535
- function Ct(e) {
6708
+ function Vt(e) {
6536
6709
  var t = c();
6537
6710
  return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
6538
6711
  }
6539
- function wt(e) {
6712
+ function Ht(e) {
6540
6713
  if (e == 0) return -1;
6541
6714
  var t = 0;
6542
6715
  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;
6543
6716
  }
6544
- function Tt() {
6545
- for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + wt(this[e]);
6717
+ function Ut() {
6718
+ for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + Ht(this[e]);
6546
6719
  return this.s < 0 ? this.t * this.DB : -1;
6547
6720
  }
6548
- function Et(e) {
6721
+ function Wt(e) {
6549
6722
  for (var t = 0; e != 0;) e &= e - 1, ++t;
6550
6723
  return t;
6551
6724
  }
6552
- function Dt() {
6553
- for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += Et(this[n] ^ t);
6725
+ function Gt() {
6726
+ for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += Wt(this[n] ^ t);
6554
6727
  return e;
6555
6728
  }
6556
- function Ot(e) {
6729
+ function Kt(e) {
6557
6730
  var t = Math.floor(e / this.DB);
6558
6731
  return t >= this.t ? this.s != 0 : (this[t] & 1 << e % this.DB) != 0;
6559
6732
  }
6560
- function kt(e, t) {
6733
+ function qt(e, t) {
6561
6734
  var n = a.ONE.shiftLeft(e);
6562
6735
  return this.bitwiseTo(n, t, n), n;
6563
6736
  }
6564
- function At(e) {
6565
- return this.changeBit(e, ht);
6737
+ function Jt(e) {
6738
+ return this.changeBit(e, Nt);
6566
6739
  }
6567
- function jt(e) {
6568
- return this.changeBit(e, yt);
6740
+ function Yt(e) {
6741
+ return this.changeBit(e, Lt);
6569
6742
  }
6570
- function Mt(e) {
6571
- return this.changeBit(e, _t);
6743
+ function Xt(e) {
6744
+ return this.changeBit(e, Ft);
6572
6745
  }
6573
- function Nt(e, t) {
6746
+ function Zt(e, t) {
6574
6747
  for (var n = 0, r = 0, a = Math.min(e.t, this.t); n < a;) r += this[n] + e[n], t[n++] = r & this.DM, r >>= this.DB;
6575
6748
  if (e.t < this.t) {
6576
6749
  for (r += e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
@@ -6581,58 +6754,58 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6581
6754
  }
6582
6755
  t.s = r < 0 ? -1 : 0, r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r), t.t = n, t.clamp();
6583
6756
  }
6584
- function Pt(e) {
6757
+ function Qt(e) {
6585
6758
  var t = c();
6586
6759
  return this.addTo(e, t), t;
6587
6760
  }
6588
- function Ft(e) {
6761
+ function $t(e) {
6589
6762
  var t = c();
6590
6763
  return this.subTo(e, t), t;
6591
6764
  }
6592
- function It(e) {
6765
+ function en(e) {
6593
6766
  var t = c();
6594
6767
  return this.multiplyTo(e, t), t;
6595
6768
  }
6596
- function Lt() {
6769
+ function tn() {
6597
6770
  var e = c();
6598
6771
  return this.squareTo(e), e;
6599
6772
  }
6600
- function Rt(e) {
6773
+ function nn(e) {
6601
6774
  var t = c();
6602
6775
  return this.divRemTo(e, t, null), t;
6603
6776
  }
6604
- function zt(e) {
6777
+ function rn(e) {
6605
6778
  var t = c();
6606
6779
  return this.divRemTo(e, null, t), t;
6607
6780
  }
6608
- function Bt(e) {
6781
+ function an(e) {
6609
6782
  var t = c(), n = c();
6610
6783
  return this.divRemTo(e, t, n), [t, n];
6611
6784
  }
6612
- function Vt(e) {
6785
+ function on(e) {
6613
6786
  this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
6614
6787
  }
6615
- function Ht(e, t) {
6788
+ function sn(e, t) {
6616
6789
  if (e != 0) {
6617
6790
  for (; this.t <= t;) this[this.t++] = 0;
6618
6791
  for (this[t] += e; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
6619
6792
  }
6620
6793
  }
6621
- function Ut() {}
6622
- function Wt(e) {
6794
+ function cn() {}
6795
+ function ln(e) {
6623
6796
  return e;
6624
6797
  }
6625
- function Gt(e, t, n) {
6798
+ function un(e, t, n) {
6626
6799
  e.multiplyTo(t, n);
6627
6800
  }
6628
- function Kt(e, t) {
6801
+ function dn(e, t) {
6629
6802
  e.squareTo(t);
6630
6803
  }
6631
- Ut.prototype.convert = Wt, Ut.prototype.revert = Wt, Ut.prototype.mulTo = Gt, Ut.prototype.sqrTo = Kt;
6632
- function qt(e) {
6633
- return this.exp(e, new Ut());
6804
+ cn.prototype.convert = ln, cn.prototype.revert = ln, cn.prototype.mulTo = un, cn.prototype.sqrTo = dn;
6805
+ function fn(e) {
6806
+ return this.exp(e, new cn());
6634
6807
  }
6635
- function Jt(e, t, n) {
6808
+ function pn(e, t, n) {
6636
6809
  var r = Math.min(this.t + e.t, t);
6637
6810
  for (n.s = 0, n.t = r; r > 0;) n[--r] = 0;
6638
6811
  var a;
@@ -6640,40 +6813,40 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6640
6813
  for (a = Math.min(e.t, t); r < a; ++r) this.am(0, e[r], n, r, 0, t - r);
6641
6814
  n.clamp();
6642
6815
  }
6643
- function Yt(e, t, n) {
6816
+ function mn(e, t, n) {
6644
6817
  --t;
6645
6818
  var r = n.t = this.t + e.t - t;
6646
6819
  for (n.s = 0; --r >= 0;) n[r] = 0;
6647
6820
  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);
6648
6821
  n.clamp(), n.drShiftTo(1, n);
6649
6822
  }
6650
- function Xt(e) {
6823
+ function hn(e) {
6651
6824
  this.r2 = c(), this.q3 = c(), a.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e), this.m = e;
6652
6825
  }
6653
- function Zt(e) {
6826
+ function gn(e) {
6654
6827
  if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
6655
6828
  if (e.compareTo(this.m) < 0) return e;
6656
6829
  var t = c();
6657
6830
  return e.copyTo(t), this.reduce(t), t;
6658
6831
  }
6659
- function Qt(e) {
6832
+ function _n(e) {
6660
6833
  return e;
6661
6834
  }
6662
- function $t(e) {
6835
+ function vn(e) {
6663
6836
  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);
6664
6837
  for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;) e.subTo(this.m, e);
6665
6838
  }
6666
- function en(e, t) {
6839
+ function yn(e, t) {
6667
6840
  e.squareTo(t), this.reduce(t);
6668
6841
  }
6669
- function tn(e, t, n) {
6842
+ function bn(e, t, n) {
6670
6843
  e.multiplyTo(t, n), this.reduce(n);
6671
6844
  }
6672
- Xt.prototype.convert = Zt, Xt.prototype.revert = Qt, Xt.prototype.reduce = $t, Xt.prototype.mulTo = tn, Xt.prototype.sqrTo = en;
6673
- function nn(e, t) {
6845
+ hn.prototype.convert = gn, hn.prototype.revert = _n, hn.prototype.reduce = vn, hn.prototype.mulTo = bn, hn.prototype.sqrTo = yn;
6846
+ function xn(e, t) {
6674
6847
  var n = e.bitLength(), r, a = P(1), l;
6675
6848
  if (n <= 0) return a;
6676
- r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, l = n < 8 ? new Q(t) : t.isEven() ? new Xt(t) : new We(t);
6849
+ r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, l = n < 8 ? new Q(t) : t.isEven() ? new hn(t) : new ct(t);
6677
6850
  var p = [], m = 3, h = r - 1, g = (1 << r) - 1;
6678
6851
  if (p[1] = l.convert(this), r > 1) {
6679
6852
  var v = c();
@@ -6691,7 +6864,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6691
6864
  }
6692
6865
  return l.revert(a);
6693
6866
  }
6694
- function rn(e) {
6867
+ function Sn(e) {
6695
6868
  var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone();
6696
6869
  if (t.compareTo(n) < 0) {
6697
6870
  var r = t;
@@ -6702,14 +6875,14 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6702
6875
  for (a < c && (c = a), c > 0 && (t.rShiftTo(c, t), n.rShiftTo(c, n)); t.signum() > 0;) (a = t.getLowestSetBit()) > 0 && t.rShiftTo(a, t), (a = n.getLowestSetBit()) > 0 && n.rShiftTo(a, n), t.compareTo(n) >= 0 ? (t.subTo(n, t), t.rShiftTo(1, t)) : (n.subTo(t, n), n.rShiftTo(1, n));
6703
6876
  return c > 0 && n.lShiftTo(c, n), n;
6704
6877
  }
6705
- function an(e) {
6878
+ function Cn(e) {
6706
6879
  if (e <= 0) return 0;
6707
6880
  var t = this.DV % e, n = this.s < 0 ? e - 1 : 0;
6708
6881
  if (this.t > 0) if (t == 0) n = this[0] % e;
6709
6882
  else for (var r = this.t - 1; r >= 0; --r) n = (t * n + this[r]) % e;
6710
6883
  return n;
6711
6884
  }
6712
- function on(e) {
6885
+ function wn(e) {
6713
6886
  var t = e.isEven();
6714
6887
  if (this.isEven() && t || e.signum() == 0) return a.ZERO;
6715
6888
  for (var n = e.clone(), r = this.clone(), c = P(1), l = P(0), p = P(0), m = P(1); n.signum() != 0;) {
@@ -6723,7 +6896,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6723
6896
  else return m;
6724
6897
  return m.signum() < 0 ? m.add(e) : m;
6725
6898
  }
6726
- var sn = [
6899
+ var Tn = [
6727
6900
  2,
6728
6901
  3,
6729
6902
  5,
@@ -6892,27 +7065,27 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6892
7065
  983,
6893
7066
  991,
6894
7067
  997
6895
- ], cn = (1 << 26) / sn[sn.length - 1];
6896
- function ln(e) {
7068
+ ], En = (1 << 26) / Tn[Tn.length - 1];
7069
+ function Dn(e) {
6897
7070
  var t, n = this.abs();
6898
- if (n.t == 1 && n[0] <= sn[sn.length - 1]) {
6899
- for (t = 0; t < sn.length; ++t) if (n[0] == sn[t]) return !0;
7071
+ if (n.t == 1 && n[0] <= Tn[Tn.length - 1]) {
7072
+ for (t = 0; t < Tn.length; ++t) if (n[0] == Tn[t]) return !0;
6900
7073
  return !1;
6901
7074
  }
6902
7075
  if (n.isEven()) return !1;
6903
- for (t = 1; t < sn.length;) {
6904
- for (var r = sn[t], a = t + 1; a < sn.length && r < cn;) r *= sn[a++];
6905
- for (r = n.modInt(r); t < a;) if (r % sn[t++] == 0) return !1;
7076
+ for (t = 1; t < Tn.length;) {
7077
+ for (var r = Tn[t], a = t + 1; a < Tn.length && r < En;) r *= Tn[a++];
7078
+ for (r = n.modInt(r); t < a;) if (r % Tn[t++] == 0) return !1;
6906
7079
  }
6907
7080
  return n.millerRabin(e);
6908
7081
  }
6909
- function un(e) {
7082
+ function On(e) {
6910
7083
  var t = this.subtract(a.ONE), n = t.getLowestSetBit();
6911
7084
  if (n <= 0) return !1;
6912
7085
  var r = t.shiftRight(n);
6913
- e = e + 1 >> 1, e > sn.length && (e = sn.length);
7086
+ e = e + 1 >> 1, e > Tn.length && (e = Tn.length);
6914
7087
  for (var l = c(), p = 0; p < e; ++p) {
6915
- l.fromInt(sn[Math.floor(Math.random() * sn.length)]);
7088
+ l.fromInt(Tn[Math.floor(Math.random() * Tn.length)]);
6916
7089
  var m = l.modPow(r, this);
6917
7090
  if (m.compareTo(a.ONE) != 0 && m.compareTo(t) != 0) {
6918
7091
  for (var h = 1; h++ < n && m.compareTo(t) != 0;) if (m = m.modPowInt(2, this), m.compareTo(a.ONE) == 0) return !1;
@@ -6921,67 +7094,67 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6921
7094
  }
6922
7095
  return !0;
6923
7096
  }
6924
- a.prototype.chunkSize = rt, a.prototype.toRadix = at, a.prototype.fromRadix = ot, a.prototype.fromNumber = st, a.prototype.bitwiseTo = ft, a.prototype.changeBit = kt, a.prototype.addTo = Nt, a.prototype.dMultiply = Vt, a.prototype.dAddOffset = Ht, a.prototype.multiplyLowerTo = Jt, a.prototype.multiplyUpperTo = Yt, a.prototype.modInt = an, a.prototype.millerRabin = un, a.prototype.clone = $e, a.prototype.intValue = et, a.prototype.byteValue = tt, a.prototype.shortValue = nt, a.prototype.signum = it, a.prototype.toByteArray = ct, a.prototype.equals = lt, a.prototype.min = ut, a.prototype.max = dt, a.prototype.and = mt, a.prototype.or = gt, a.prototype.xor = vt, a.prototype.andNot = bt, a.prototype.not = xt, a.prototype.shiftLeft = St, a.prototype.shiftRight = Ct, a.prototype.getLowestSetBit = Tt, a.prototype.bitCount = Dt, a.prototype.testBit = Ot, a.prototype.setBit = At, a.prototype.clearBit = jt, a.prototype.flipBit = Mt, a.prototype.add = Pt, a.prototype.subtract = Ft, a.prototype.multiply = It, a.prototype.divide = Rt, a.prototype.remainder = zt, a.prototype.divideAndRemainder = Bt, a.prototype.modPow = nn, a.prototype.modInverse = on, a.prototype.pow = qt, a.prototype.gcd = rn, a.prototype.isProbablePrime = ln, a.prototype.square = Lt, a.prototype.Barrett = Xt;
6925
- var dn, fn, pn;
6926
- function mn(e) {
6927
- fn[pn++] ^= e & 255, fn[pn++] ^= e >> 8 & 255, fn[pn++] ^= e >> 16 & 255, fn[pn++] ^= e >> 24 & 255, pn >= En && (pn -= En);
7097
+ a.prototype.chunkSize = xt, a.prototype.toRadix = Ct, a.prototype.fromRadix = wt, a.prototype.fromNumber = Tt, a.prototype.bitwiseTo = At, a.prototype.changeBit = qt, a.prototype.addTo = Zt, a.prototype.dMultiply = on, a.prototype.dAddOffset = sn, a.prototype.multiplyLowerTo = pn, a.prototype.multiplyUpperTo = mn, a.prototype.modInt = Cn, a.prototype.millerRabin = On, a.prototype.clone = _t, a.prototype.intValue = vt, a.prototype.byteValue = yt, a.prototype.shortValue = bt, a.prototype.signum = St, a.prototype.toByteArray = Et, a.prototype.equals = Dt, a.prototype.min = Ot, a.prototype.max = kt, a.prototype.and = Mt, a.prototype.or = Pt, a.prototype.xor = It, a.prototype.andNot = Rt, a.prototype.not = zt, a.prototype.shiftLeft = Bt, a.prototype.shiftRight = Vt, a.prototype.getLowestSetBit = Ut, a.prototype.bitCount = Gt, a.prototype.testBit = Kt, a.prototype.setBit = Jt, a.prototype.clearBit = Yt, a.prototype.flipBit = Xt, a.prototype.add = Qt, a.prototype.subtract = $t, a.prototype.multiply = en, a.prototype.divide = nn, a.prototype.remainder = rn, a.prototype.divideAndRemainder = an, a.prototype.modPow = xn, a.prototype.modInverse = wn, a.prototype.pow = fn, a.prototype.gcd = Sn, a.prototype.isProbablePrime = Dn, a.prototype.square = tn, a.prototype.Barrett = hn;
7098
+ var kn, An, jn;
7099
+ function Mn(e) {
7100
+ An[jn++] ^= e & 255, An[jn++] ^= e >> 8 & 255, An[jn++] ^= e >> 16 & 255, An[jn++] ^= e >> 24 & 255, jn >= Wn && (jn -= Wn);
6928
7101
  }
6929
- function hn() {
6930
- mn((/* @__PURE__ */ new Date()).getTime());
7102
+ function Nn() {
7103
+ Mn((/* @__PURE__ */ new Date()).getTime());
6931
7104
  }
6932
- if (fn == null) {
6933
- fn = [], pn = 0;
6934
- var gn;
7105
+ if (An == null) {
7106
+ An = [], jn = 0;
7107
+ var Pn;
6935
7108
  if (typeof window < "u" && window.crypto) {
6936
7109
  if (window.crypto.getRandomValues) {
6937
- var _n = new Uint8Array(32);
6938
- for (window.crypto.getRandomValues(_n), gn = 0; gn < 32; ++gn) fn[pn++] = _n[gn];
7110
+ var Fn = new Uint8Array(32);
7111
+ for (window.crypto.getRandomValues(Fn), Pn = 0; Pn < 32; ++Pn) An[jn++] = Fn[Pn];
6939
7112
  } else if (navigator.appName == "Netscape" && navigator.appVersion < "5") {
6940
- var vn = window.crypto.random(32);
6941
- for (gn = 0; gn < vn.length; ++gn) fn[pn++] = vn.charCodeAt(gn) & 255;
7113
+ var In = window.crypto.random(32);
7114
+ for (Pn = 0; Pn < In.length; ++Pn) An[jn++] = In.charCodeAt(Pn) & 255;
6942
7115
  }
6943
7116
  }
6944
- for (; pn < En;) gn = Math.floor(65536 * Math.random()), fn[pn++] = gn >>> 8, fn[pn++] = gn & 255;
6945
- pn = 0, hn();
7117
+ for (; jn < Wn;) Pn = Math.floor(65536 * Math.random()), An[jn++] = Pn >>> 8, An[jn++] = Pn & 255;
7118
+ jn = 0, Nn();
6946
7119
  }
6947
- function yn() {
6948
- if (dn == null) {
6949
- for (hn(), dn = Tn(), dn.init(fn), pn = 0; pn < fn.length; ++pn) fn[pn] = 0;
6950
- pn = 0;
7120
+ function Ln() {
7121
+ if (kn == null) {
7122
+ for (Nn(), kn = Un(), kn.init(An), jn = 0; jn < An.length; ++jn) An[jn] = 0;
7123
+ jn = 0;
6951
7124
  }
6952
- return dn.next();
7125
+ return kn.next();
6953
7126
  }
6954
- function bn(e) {
7127
+ function Rn(e) {
6955
7128
  var t;
6956
- for (t = 0; t < e.length; ++t) e[t] = yn();
7129
+ for (t = 0; t < e.length; ++t) e[t] = Ln();
6957
7130
  }
6958
- function xn() {}
6959
- xn.prototype.nextBytes = bn;
6960
- function Sn() {
7131
+ function zn() {}
7132
+ zn.prototype.nextBytes = Rn;
7133
+ function Bn() {
6961
7134
  this.i = 0, this.j = 0, this.S = [];
6962
7135
  }
6963
- function Cn(e) {
7136
+ function Vn(e) {
6964
7137
  var t, n, r;
6965
7138
  for (t = 0; t < 256; ++t) this.S[t] = t;
6966
7139
  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;
6967
7140
  this.i = 0, this.j = 0;
6968
7141
  }
6969
- function wn() {
7142
+ function Hn() {
6970
7143
  var e;
6971
7144
  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];
6972
7145
  }
6973
- Sn.prototype.init = Cn, Sn.prototype.next = wn;
6974
- function Tn() {
6975
- return new Sn();
7146
+ Bn.prototype.init = Vn, Bn.prototype.next = Hn;
7147
+ function Un() {
7148
+ return new Bn();
6976
7149
  }
6977
- var En = 256;
7150
+ var Wn = 256;
6978
7151
  e === void 0 ? this.jsbn = {
6979
7152
  BigInteger: a,
6980
- SecureRandom: xn
7153
+ SecureRandom: zn
6981
7154
  } : e = t.exports = {
6982
7155
  default: a,
6983
7156
  BigInteger: a,
6984
- SecureRandom: xn
7157
+ SecureRandom: zn
6985
7158
  };
6986
7159
  }).call(e);
6987
7160
  })), import_to_arraybuffer = /* @__PURE__ */ __toESM(require_to_arraybuffer()), import_buffer = require_buffer(), import_jsbn = require_jsbn(), i = import_jsbn.BigInteger.prototype.Barrett;
@@ -7608,7 +7781,7 @@ function setupSm4Ecb() {
7608
7781
  decrypt: sm4ECBDecrypt
7609
7782
  };
7610
7783
  }
7611
- defineRouteModule("crypto", __virtual_pubinfo_resolver_default.pages), defineIconModule("crypto", __virtual_pubinfo_resolver_default.icons);
7784
+ defineRouteModule("crypto", _virtual_pubinfo_resolver_default.pages), defineIconModule("crypto", _virtual_pubinfo_resolver_default.icons);
7612
7785
  function crypto(e) {
7613
7786
  let { request: t, cryptoSetting: n } = e;
7614
7787
  return apictx.set({ request: t }), ctx.set({