@pubinfo/module-crypto 2.1.10-beta.2 → 2.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,5 +1,12 @@
1
1
  import { createContext, defineIconModule, defineRouteModule, wrapProxy } from "pubinfo";
2
- import './index.css';var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJSMin = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), __copyProps = (e, t, n, r) => {
2
+ import './index.css';var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDesc = Object.getOwnPropertyDescriptor, __getOwnPropNames = Object.getOwnPropertyNames, __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty, __commonJSMin = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), __exportAll = (e, t) => {
3
+ let n = {};
4
+ for (var r in e) __defProp(n, r, {
5
+ get: e[r],
6
+ enumerable: !0
7
+ });
8
+ return t || __defProp(n, Symbol.toStringTag, { value: "Module" }), n;
9
+ }, __copyProps = (e, t, n, r) => {
3
10
  if (t && typeof t == "object" || typeof t == "function") for (var a = __getOwnPropNames(t), m = 0, g = a.length, v; m < g; m++) v = a[m], !__hasOwnProp.call(e, v) && v !== n && __defProp(e, v, {
4
11
  get: ((e) => t[e]).bind(null, v),
5
12
  enumerable: !(r = __getOwnPropDesc(t, v)) || r.enumerable
@@ -10,13 +17,13 @@ import './index.css';var __create = Object.create, __defProp = Object.defineProp
10
17
  enumerable: !0
11
18
  }) : 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
19
  if (typeof require < "u") return require.apply(this, arguments);
13
- throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function.");
20
+ throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
14
21
  }), _virtual_pubinfo_resolver_default = {
15
22
  icons: {},
16
23
  layouts: {},
17
24
  pages: {
18
- "src/pages/setting.vue": () => import("./setting-DkwAGQxz.js"),
19
- "src/pages/components/drawerCryptoUrl.vue": () => import("./drawerCryptoUrl-DltbAlje.js")
25
+ "src/pages/setting.vue": () => import("./setting-Df7ot4w8.js"),
26
+ "src/pages/components/drawerCryptoUrl.vue": () => import("./drawerCryptoUrl-I-5m5_57.js").then((e) => e.n)
20
27
  }
21
28
  };
22
29
  const apictx = createContext("crypto-api"), basic = wrapProxy(apictx.use, "request");
@@ -144,7 +151,7 @@ var require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((e, t) => {
144
151
  parse: function(e) {
145
152
  return v.parse(unescape(encodeURIComponent(e)));
146
153
  }
147
- }, E = l.BufferedBlockAlgorithm = p.extend({
154
+ }, T = l.BufferedBlockAlgorithm = p.extend({
148
155
  reset: function() {
149
156
  this._data = new m.init(), this._nDataBytes = 0;
150
157
  },
@@ -167,13 +174,13 @@ var require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((e, t) => {
167
174
  },
168
175
  _minBufferSize: 0
169
176
  });
170
- l.Hasher = E.extend({
177
+ l.Hasher = T.extend({
171
178
  cfg: p.extend(),
172
179
  init: function(e) {
173
180
  this.cfg = this.cfg.extend(e), this.reset();
174
181
  },
175
182
  reset: function() {
176
- E.reset.call(this), this._doReset();
183
+ T.reset.call(this), this._doReset();
177
184
  },
178
185
  update: function(e) {
179
186
  return this._append(e), this._process(), this;
@@ -635,17 +642,17 @@ var require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((e, t) => {
635
642
  ]);
636
643
  },
637
644
  _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;
645
+ 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, ee = M, Z = N, te = P, ne = F, Q = I, $ = R, re = B, ie = V, ae = H, oe = U, se = W, ce = G, le = 0; le < 80; le++) {
646
+ var ue, de, fe = h[le];
647
+ if (le < 16) de = fe.high = e[t + le * 2] | 0, ue = fe.low = e[t + le * 2 + 1] | 0;
641
648
  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;
649
+ var pe = h[le - 15], me = pe.high, he = pe.low, ge = (me >>> 1 | he << 31) ^ (me >>> 8 | he << 24) ^ me >>> 7, _e = (he >>> 1 | me << 31) ^ (he >>> 8 | me << 24) ^ (he >>> 7 | me << 25), ve = h[le - 2], ye = ve.high, be = ve.low, xe = (ye >>> 19 | be << 13) ^ (ye << 3 | be >>> 29) ^ ye >>> 6, Se = (be >>> 19 | ye << 13) ^ (be << 3 | ye >>> 29) ^ (be >>> 6 | ye << 26), Ce = h[le - 7], we = Ce.high, Te = Ce.low, Ee = h[le - 16], De = Ee.high, Oe = Ee.low;
650
+ ue = _e + Te, de = ge + we + (ue >>> 0 < _e >>> 0 ? 1 : 0), ue += Se, de = de + xe + (ue >>> 0 < Se >>> 0 ? 1 : 0), ue += Oe, de = de + De + (ue >>> 0 < Oe >>> 0 ? 1 : 0), fe.high = de, fe.low = ue;
644
651
  }
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;
652
+ var ke = Q & re ^ ~Q & ae, Ae = $ & ie ^ ~$ & oe, je = K & Y ^ K & ee ^ Y & ee, Me = J & X ^ J & Z ^ X & Z, Ne = (K >>> 28 | J << 4) ^ (K << 30 | J >>> 2) ^ (K << 25 | J >>> 7), Pe = (J >>> 28 | K << 4) ^ (J << 30 | K >>> 2) ^ (J << 25 | K >>> 7), Fe = (Q >>> 14 | $ << 18) ^ (Q >>> 18 | $ << 14) ^ (Q << 23 | $ >>> 9), Ie = ($ >>> 14 | Q << 18) ^ ($ >>> 18 | Q << 14) ^ ($ << 23 | Q >>> 9), Le = m[le], Re = Le.high, ze = Le.low, Be = ce + Ie, Ve = se + Fe + (Be >>> 0 < ce >>> 0 ? 1 : 0), Be = Be + Ae, Ve = Ve + ke + (Be >>> 0 < Ae >>> 0 ? 1 : 0), Be = Be + ze, Ve = Ve + Re + (Be >>> 0 < ze >>> 0 ? 1 : 0), Be = Be + ue, Ve = Ve + de + (Be >>> 0 < ue >>> 0 ? 1 : 0), He = Pe + Me, Ue = Ne + je + (He >>> 0 < Pe >>> 0 ? 1 : 0);
653
+ se = ae, ce = oe, ae = re, oe = ie, re = Q, ie = $, $ = ne + Be | 0, Q = te + Ve + ($ >>> 0 < ne >>> 0 ? 1 : 0) | 0, te = ee, ne = Z, ee = Y, Z = X, Y = K, X = J, J = Be + He | 0, K = Ve + Ue + (J >>> 0 < Be >>> 0 ? 1 : 0) | 0;
647
654
  }
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);
655
+ 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 + ee + (N >>> 0 < Z >>> 0 ? 1 : 0), F = l.low = F + ne, l.high = P + te + (F >>> 0 < ne >>> 0 ? 1 : 0), R = p.low = R + $, p.high = I + Q + (R >>> 0 < $ >>> 0 ? 1 : 0), V = g.low = V + ie, g.high = B + re + (V >>> 0 < ie >>> 0 ? 1 : 0), U = v.low = U + oe, v.high = H + ae + (U >>> 0 < oe >>> 0 ? 1 : 0), G = y.low = G + ce, y.high = W + se + (G >>> 0 < ce >>> 0 ? 1 : 0);
649
656
  },
650
657
  _doFinalize: function() {
651
658
  var e = this._data, t = e.words, n = this._nDataBytes * 8, r = e.sigBytes * 8;
@@ -1135,8 +1142,8 @@ var require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((e, t) => {
1135
1142
  var r = t + n, a = e[r];
1136
1143
  e[r] = (a << 8 | a >>> 24) & 16711935 | (a << 24 | a >>> 8) & 4278255360;
1137
1144
  }
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;
1145
+ 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], ee = 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 + ee | 0, K = ee, ee = X, X = P(Y, 10), Y = J, J = Z;
1146
+ Z = c[1] + U + X | 0, c[1] = c[2] + W + ee | 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
1147
  },
1141
1148
  _doFinalize: function() {
1142
1149
  var e = this._data, t = e.words, n = this._nDataBytes * 8, r = e.sigBytes * 8;
@@ -4052,7 +4059,7 @@ var Stream = function() {
4052
4059
  return t;
4053
4060
  }, e.prototype.getHexStringValue = function() {
4054
4061
  var e = this.toHexString(), t = this.header * 2, n = this.length * 2;
4055
- return e.substr(t, n);
4062
+ return e.substring(t, t + n);
4056
4063
  }, e.decode = function(t) {
4057
4064
  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
4065
  var t = [];
@@ -4563,7 +4570,7 @@ var Stream = function() {
4563
4570
  }, e.prototype.toRadix = function(e) {
4564
4571
  if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
4565
4572
  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);
4573
+ for (this.divRemTo(r, a, c); a.signum() > 0;) l = (n + c.intValue()).toString(e).substring(1) + l, a.divRemTo(r, a, c);
4567
4574
  return c.intValue().toString(e) + l;
4568
4575
  }, e.prototype.fromRadix = function(t, n) {
4569
4576
  this.fromInt(0), n ??= 10;
@@ -4816,13 +4823,13 @@ var rng_state, rng_pool = null, rng_pptr;
4816
4823
  if (rng_pool == null) {
4817
4824
  rng_pool = [], rng_pptr = 0;
4818
4825
  var t$1 = void 0;
4819
- if (typeof window < "u" && window.crypto && window.crypto.getRandomValues) {
4826
+ if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
4820
4827
  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;
4828
+ 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
4829
  }
4823
4830
  var count = 0, onMouseMoveListener_1 = function(e) {
4824
4831
  if (count ||= 0, count >= 256 || rng_pptr >= 256) {
4825
- window.removeEventListener ? window.removeEventListener("mousemove", onMouseMoveListener_1, !1) : window.detachEvent && window.detachEvent("onmousemove", onMouseMoveListener_1);
4832
+ self.removeEventListener ? self.removeEventListener("mousemove", onMouseMoveListener_1, !1) : self.detachEvent && self.detachEvent("onmousemove", onMouseMoveListener_1);
4826
4833
  return;
4827
4834
  }
4828
4835
  try {
@@ -4830,7 +4837,7 @@ if (rng_pool == null) {
4830
4837
  rng_pool[rng_pptr++] = t & 255, count += 1;
4831
4838
  } catch {}
4832
4839
  };
4833
- typeof window < "u" && (window.addEventListener ? window.addEventListener("mousemove", onMouseMoveListener_1, !1) : window.attachEvent && window.attachEvent("onmousemove", onMouseMoveListener_1));
4840
+ typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", onMouseMoveListener_1, !1) : self.attachEvent && self.attachEvent("onmousemove", onMouseMoveListener_1));
4834
4841
  }
4835
4842
  function rng_get_byte() {
4836
4843
  if (rng_state == null) {
@@ -4849,6 +4856,136 @@ var SecureRandom = function() {
4849
4856
  for (var t = 0; t < e.length; ++t) e[t] = rng_get_byte();
4850
4857
  }, e;
4851
4858
  }();
4859
+ function rstr_sha256(e) {
4860
+ return binb2rstr(binb_sha256(rstr2binb(e), e.length * 8));
4861
+ }
4862
+ function rstr2hex(e) {
4863
+ for (var t = "0123456789abcdef", n = "", r = 0; r < e.length; r++) {
4864
+ var a = e.charCodeAt(r);
4865
+ n += t.charAt(a >>> 4 & 15) + t.charAt(a & 15);
4866
+ }
4867
+ return n;
4868
+ }
4869
+ function rstr2binb(e) {
4870
+ for (var t = Array(e.length >> 2), n = 0; n < t.length; n++) t[n] = 0;
4871
+ for (var n = 0; n < e.length * 8; n += 8) t[n >> 5] |= (e.charCodeAt(n / 8) & 255) << 24 - n % 32;
4872
+ return t;
4873
+ }
4874
+ function binb2rstr(e) {
4875
+ for (var t = "", n = 0; n < e.length * 32; n += 8) t += String.fromCharCode(e[n >> 5] >>> 24 - n % 32 & 255);
4876
+ return t;
4877
+ }
4878
+ function sha256_S(e, t) {
4879
+ return e >>> t | e << 32 - t;
4880
+ }
4881
+ function sha256_R(e, t) {
4882
+ return e >>> t;
4883
+ }
4884
+ function sha256_Ch(e, t, n) {
4885
+ return e & t ^ ~e & n;
4886
+ }
4887
+ function sha256_Maj(e, t, n) {
4888
+ return e & t ^ e & n ^ t & n;
4889
+ }
4890
+ function sha256_Sigma0256(e) {
4891
+ return sha256_S(e, 2) ^ sha256_S(e, 13) ^ sha256_S(e, 22);
4892
+ }
4893
+ function sha256_Sigma1256(e) {
4894
+ return sha256_S(e, 6) ^ sha256_S(e, 11) ^ sha256_S(e, 25);
4895
+ }
4896
+ function sha256_Gamma0256(e) {
4897
+ return sha256_S(e, 7) ^ sha256_S(e, 18) ^ sha256_R(e, 3);
4898
+ }
4899
+ function sha256_Gamma1256(e) {
4900
+ return sha256_S(e, 17) ^ sha256_S(e, 19) ^ sha256_R(e, 10);
4901
+ }
4902
+ var sha256_K = [
4903
+ 1116352408,
4904
+ 1899447441,
4905
+ -1245643825,
4906
+ -373957723,
4907
+ 961987163,
4908
+ 1508970993,
4909
+ -1841331548,
4910
+ -1424204075,
4911
+ -670586216,
4912
+ 310598401,
4913
+ 607225278,
4914
+ 1426881987,
4915
+ 1925078388,
4916
+ -2132889090,
4917
+ -1680079193,
4918
+ -1046744716,
4919
+ -459576895,
4920
+ -272742522,
4921
+ 264347078,
4922
+ 604807628,
4923
+ 770255983,
4924
+ 1249150122,
4925
+ 1555081692,
4926
+ 1996064986,
4927
+ -1740746414,
4928
+ -1473132947,
4929
+ -1341970488,
4930
+ -1084653625,
4931
+ -958395405,
4932
+ -710438585,
4933
+ 113926993,
4934
+ 338241895,
4935
+ 666307205,
4936
+ 773529912,
4937
+ 1294757372,
4938
+ 1396182291,
4939
+ 1695183700,
4940
+ 1986661051,
4941
+ -2117940946,
4942
+ -1838011259,
4943
+ -1564481375,
4944
+ -1474664885,
4945
+ -1035236496,
4946
+ -949202525,
4947
+ -778901479,
4948
+ -694614492,
4949
+ -200395387,
4950
+ 275423344,
4951
+ 430227734,
4952
+ 506948616,
4953
+ 659060556,
4954
+ 883997877,
4955
+ 958139571,
4956
+ 1322822218,
4957
+ 1537002063,
4958
+ 1747873779,
4959
+ 1955562222,
4960
+ 2024104815,
4961
+ -2067236844,
4962
+ -1933114872,
4963
+ -1866530822,
4964
+ -1538233109,
4965
+ -1090935817,
4966
+ -965641998
4967
+ ];
4968
+ function binb_sha256(e, t) {
4969
+ var n = [
4970
+ 1779033703,
4971
+ -1150833019,
4972
+ 1013904242,
4973
+ -1521486534,
4974
+ 1359893119,
4975
+ -1694144372,
4976
+ 528734635,
4977
+ 1541459225
4978
+ ], r = Array(64), a, c, l, p, m, h, g, v, y, T, E, k;
4979
+ for (e[t >> 5] |= 128 << 24 - t % 32, e[(t + 64 >> 9 << 4) + 15] = t, y = 0; y < e.length; y += 16) {
4980
+ 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);
4981
+ 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]);
4982
+ }
4983
+ return n;
4984
+ }
4985
+ function safe_add(e, t) {
4986
+ var n = (e & 65535) + (t & 65535);
4987
+ return (e >> 16) + (t >> 16) + (n >> 16) << 16 | n & 65535;
4988
+ }
4852
4989
  function pkcs1pad1(e, t) {
4853
4990
  if (t < e.length + 22) return console.error("Message too long for RSA"), null;
4854
4991
  for (var n = t - e.length - 6, r = "", a = 0; a < n; a += 2) r += "ff";
@@ -4867,6 +5004,29 @@ function pkcs1pad2(e, t) {
4867
5004
  }
4868
5005
  return n[--t] = 2, n[--t] = 0, new BigInteger(n);
4869
5006
  }
5007
+ function oaep_mgf1_arr(e, t, n) {
5008
+ for (var r = "", a = 0; r.length < t;) r += n(String.fromCharCode.apply(String, e.concat([
5009
+ (a & 4278190080) >> 24,
5010
+ (a & 16711680) >> 16,
5011
+ (a & 65280) >> 8,
5012
+ a & 255
5013
+ ]))), a += 1;
5014
+ return r;
5015
+ }
5016
+ var SHA256_SIZE = 32;
5017
+ function oaep_pad(e, t) {
5018
+ var n = SHA256_SIZE, r = rstr_sha256;
5019
+ if (e.length + 2 * n + 2 > t) throw "Message too long for RSA";
5020
+ var a = "", c;
5021
+ for (c = 0; c < t - e.length - 2 * n - 2; c += 1) a += "\0";
5022
+ var l = r("") + a + "" + e, p = Array(n);
5023
+ new SecureRandom().nextBytes(p);
5024
+ var m = oaep_mgf1_arr(p, l.length, r), h = [];
5025
+ for (c = 0; c < l.length; c += 1) h[c] = l.charCodeAt(c) ^ m.charCodeAt(c);
5026
+ var g = oaep_mgf1_arr(h, p.length, r), v = [0];
5027
+ for (c = 0; c < p.length; c += 1) v[c + 1] = p[c] ^ g.charCodeAt(c);
5028
+ return new BigInteger(v.concat(h));
5029
+ }
4870
5030
  var RSAKey = function() {
4871
5031
  function e() {
4872
5032
  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 +5039,14 @@ var RSAKey = function() {
4879
5039
  return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
4880
5040
  }, e.prototype.setPublic = function(e, t) {
4881
5041
  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);
5042
+ }, e.prototype.encrypt = function(e, t) {
5043
+ t === void 0 && (t = pkcs1pad2);
5044
+ var n = this.n.bitLength() + 7 >> 3, r = t(e, n);
4886
5045
  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;
5046
+ var a = this.doPublic(r);
5047
+ if (a == null) return null;
5048
+ for (var c = a.toString(16), l = c.length, p = 0; p < n * 2 - l; p++) c = "0" + c;
5049
+ return c;
4889
5050
  }, e.prototype.setPrivate = function(e, t, n) {
4890
5051
  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
5052
  }, e.prototype.setPrivateEx = function(e, t, n, r, a, c, l, p) {
@@ -4939,12 +5100,12 @@ var RSAKey = function() {
4939
5100
  };
4940
5101
  setTimeout(p, 0);
4941
5102
  }, 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;
5103
+ var r = getDigestHeader(n) + t(e).toString(), a = this.n.bitLength() / 4, c = pkcs1pad1(r, a);
5104
+ if (c == null) return null;
5105
+ var l = this.doPrivate(c);
5106
+ if (l == null) return null;
5107
+ for (var p = l.toString(16), m = p.length, h = 0; h < a - m; h++) p = "0" + p;
5108
+ return p;
4948
5109
  }, e.prototype.verify = function(e, t, n) {
4949
5110
  var r = parseBigInt(t, 16), a = this.doPublic(r);
4950
5111
  return a == null ? null : removeDigestHeader(a.toString(16).replace(/^1f+00/, "")) == n(e).toString();
@@ -4976,13 +5137,12 @@ function getDigestHeader(e) {
4976
5137
  function removeDigestHeader(e) {
4977
5138
  for (var t in DIGEST_HEADERS) if (DIGEST_HEADERS.hasOwnProperty(t)) {
4978
5139
  var n = DIGEST_HEADERS[t], r = n.length;
4979
- if (e.substr(0, r) == n) return e.substr(r);
5140
+ if (e.substring(0, r) == n) return e.substring(r);
4980
5141
  }
4981
5142
  return e;
4982
5143
  }
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.");
5144
+ function extendClass(e, t, n) {
5145
+ if (!t || !e) throw Error("extend failed, please check that all dependencies are included.");
4986
5146
  var r = function() {};
4987
5147
  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
5148
  for (var a in n) e.prototype[a] = n[a];
@@ -4997,7 +5157,7 @@ YAHOO.lang = { extend: function(e, t, n) {
4997
5157
  } catch {}
4998
5158
  c(e.prototype, n);
4999
5159
  }
5000
- } };
5160
+ }
5001
5161
  /**
5002
5162
  * @fileOverview
5003
5163
  * @name asn1-1.0.js
@@ -5013,9 +5173,9 @@ var KJUR = {};
5013
5173
  return t.length % 2 == 1 && (t = "0" + t), t;
5014
5174
  }, this.bigIntToMinTwosComplementsHex = function(e) {
5015
5175
  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);
5176
+ if (t.substring(0, 1) != "-") t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
5017
5177
  else {
5018
- var n = t.substr(1).length;
5178
+ var n = t.substring(1).length;
5019
5179
  n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
5020
5180
  for (var r = "", a = 0; a < n; a++) r += "f";
5021
5181
  t = new BigInteger(r, 16).xor(e).add(BigInteger.ONE).toString(16).replace(/^-/, "");
@@ -5075,9 +5235,9 @@ var KJUR = {};
5075
5235
  return this.newObject(e).getEncodedHex();
5076
5236
  };
5077
5237
  }(), 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") {
5238
+ 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) {
5239
+ var p = ("00000000" + parseInt(e.substring(l, l + 2), 16).toString(2)).slice(-8);
5240
+ if (c += p.substring(1, 8), p.substring(0, 1) == "0") {
5081
5241
  var m = new BigInteger(c, 2);
5082
5242
  t = t + "." + m.toString(10), c = "";
5083
5243
  }
@@ -5093,7 +5253,7 @@ var KJUR = {};
5093
5253
  for (var c = "", l = 0; l < a; l++) c += "0";
5094
5254
  r = c + r;
5095
5255
  for (var l = 0; l < r.length - 1; l += 7) {
5096
- var p = r.substr(l, 7);
5256
+ var p = r.substring(l, l + 7);
5097
5257
  l != r.length - 7 && (p = "1" + p), n += t(parseInt(p, 2));
5098
5258
  }
5099
5259
  return n;
@@ -5130,12 +5290,12 @@ var KJUR = {};
5130
5290
  }, this.getFreshValueHex = function() {
5131
5291
  return this.hV;
5132
5292
  }, 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) {
5293
+ }, extendClass(KJUR.asn1.DERAbstractString, KJUR.asn1.ASN1Object), KJUR.asn1.DERAbstractTime = function(e) {
5134
5294
  KJUR.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(e) {
5135
5295
  return utc = e.getTime() + e.getTimezoneOffset() * 6e4, new Date(utc);
5136
5296
  }, this.formatDate = function(e, t, n) {
5137
5297
  var r = this.zeroPadding, a = this.localDateToUTC(e), c = String(a.getFullYear());
5138
- t == "utc" && (c = c.substr(2, 2));
5298
+ t == "utc" && (c = c.substring(2, 4));
5139
5299
  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
5300
  if (n === !0) {
5141
5301
  var y = a.getMilliseconds();
@@ -5157,15 +5317,15 @@ var KJUR = {};
5157
5317
  }, this.getFreshValueHex = function() {
5158
5318
  return this.hV;
5159
5319
  };
5160
- }, YAHOO.lang.extend(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object), KJUR.asn1.DERAbstractStructured = function(e) {
5320
+ }, extendClass(KJUR.asn1.DERAbstractTime, KJUR.asn1.ASN1Object), KJUR.asn1.DERAbstractStructured = function(e) {
5161
5321
  KJUR.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(e) {
5162
5322
  this.hTLV = null, this.isModified = !0, this.asn1Array = e;
5163
5323
  }, this.appendASN1Object = function(e) {
5164
5324
  this.hTLV = null, this.isModified = !0, this.asn1Array.push(e);
5165
5325
  }, 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() {
5326
+ }, extendClass(KJUR.asn1.DERAbstractStructured, KJUR.asn1.ASN1Object), KJUR.asn1.DERBoolean = function() {
5167
5327
  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) {
5328
+ }, extendClass(KJUR.asn1.DERBoolean, KJUR.asn1.ASN1Object), KJUR.asn1.DERInteger = function(e) {
5169
5329
  KJUR.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(e) {
5170
5330
  this.hTLV = null, this.isModified = !0, this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
5171
5331
  }, this.setByInteger = function(e) {
@@ -5176,7 +5336,7 @@ var KJUR = {};
5176
5336
  }, this.getFreshValueHex = function() {
5177
5337
  return this.hV;
5178
5338
  }, 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) {
5339
+ }, extendClass(KJUR.asn1.DERInteger, KJUR.asn1.ASN1Object), KJUR.asn1.DERBitString = function(e) {
5180
5340
  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
5341
  this.hTLV = null, this.isModified = !0, this.hV = e;
5182
5342
  }, this.setUnusedBitsAndHexValue = function(e, t) {
@@ -5189,7 +5349,7 @@ var KJUR = {};
5189
5349
  t == 8 && (t = 0);
5190
5350
  for (var n = 0; n <= t; n++) e += "0";
5191
5351
  for (var r = "", n = 0; n < e.length - 1; n += 8) {
5192
- var a = e.substr(n, 8), c = parseInt(a, 2).toString(16);
5352
+ var a = e.substring(n, n + 8), c = parseInt(a, 2).toString(16);
5193
5353
  c.length == 1 && (c = "0" + c), r += c;
5194
5354
  }
5195
5355
  this.hTLV = null, this.isModified = !0, this.hV = "0" + t + r;
@@ -5202,11 +5362,11 @@ var KJUR = {};
5202
5362
  }, this.getFreshValueHex = function() {
5203
5363
  return this.hV;
5204
5364
  }, 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) {
5365
+ }, extendClass(KJUR.asn1.DERBitString, KJUR.asn1.ASN1Object), KJUR.asn1.DEROctetString = function(e) {
5206
5366
  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() {
5367
+ }, extendClass(KJUR.asn1.DEROctetString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERNull = function() {
5208
5368
  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) {
5369
+ }, extendClass(KJUR.asn1.DERNull, KJUR.asn1.ASN1Object), KJUR.asn1.DERObjectIdentifier = function(e) {
5210
5370
  var t = function(e) {
5211
5371
  var t = e.toString(16);
5212
5372
  return t.length == 1 && (t = "0" + t), t;
@@ -5216,7 +5376,7 @@ var KJUR = {};
5216
5376
  for (var c = "", l = 0; l < a; l++) c += "0";
5217
5377
  r = c + r;
5218
5378
  for (var l = 0; l < r.length - 1; l += 7) {
5219
- var p = r.substr(l, 7);
5379
+ var p = r.substring(l, l + 7);
5220
5380
  l != r.length - 7 && (p = "1" + p), n += t(parseInt(p, 2));
5221
5381
  }
5222
5382
  return n;
@@ -5236,7 +5396,7 @@ var KJUR = {};
5236
5396
  }, this.getFreshValueHex = function() {
5237
5397
  return this.hV;
5238
5398
  }, 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) {
5399
+ }, extendClass(KJUR.asn1.DERObjectIdentifier, KJUR.asn1.ASN1Object), KJUR.asn1.DEREnumerated = function(e) {
5240
5400
  KJUR.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(e) {
5241
5401
  this.hTLV = null, this.isModified = !0, this.hV = KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
5242
5402
  }, this.setByInteger = function(e) {
@@ -5247,29 +5407,29 @@ var KJUR = {};
5247
5407
  }, this.getFreshValueHex = function() {
5248
5408
  return this.hV;
5249
5409
  }, 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) {
5410
+ }, extendClass(KJUR.asn1.DEREnumerated, KJUR.asn1.ASN1Object), KJUR.asn1.DERUTF8String = function(e) {
5251
5411
  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) {
5412
+ }, extendClass(KJUR.asn1.DERUTF8String, KJUR.asn1.DERAbstractString), KJUR.asn1.DERNumericString = function(e) {
5253
5413
  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) {
5414
+ }, extendClass(KJUR.asn1.DERNumericString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERPrintableString = function(e) {
5255
5415
  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) {
5416
+ }, extendClass(KJUR.asn1.DERPrintableString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERTeletexString = function(e) {
5257
5417
  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) {
5418
+ }, extendClass(KJUR.asn1.DERTeletexString, KJUR.asn1.DERAbstractString), KJUR.asn1.DERIA5String = function(e) {
5259
5419
  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) {
5420
+ }, extendClass(KJUR.asn1.DERIA5String, KJUR.asn1.DERAbstractString), KJUR.asn1.DERUTCTime = function(e) {
5261
5421
  KJUR.asn1.DERUTCTime.superclass.constructor.call(this, e), this.hT = "17", this.setByDate = function(e) {
5262
5422
  this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
5263
5423
  }, this.getFreshValueHex = function() {
5264
5424
  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
5425
  }, 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) {
5426
+ }, extendClass(KJUR.asn1.DERUTCTime, KJUR.asn1.DERAbstractTime), KJUR.asn1.DERGeneralizedTime = function(e) {
5267
5427
  KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this, e), this.hT = "18", this.withMillis = !1, this.setByDate = function(e) {
5268
5428
  this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
5269
5429
  }, this.getFreshValueHex = function() {
5270
5430
  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
5431
  }, 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) {
5432
+ }, extendClass(KJUR.asn1.DERGeneralizedTime, KJUR.asn1.DERAbstractTime), KJUR.asn1.DERSequence = function(e) {
5273
5433
  KJUR.asn1.DERSequence.superclass.constructor.call(this, e), this.hT = "30", this.getFreshValueHex = function() {
5274
5434
  for (var e = "", t = 0; t < this.asn1Array.length; t++) {
5275
5435
  var n = this.asn1Array[t];
@@ -5277,7 +5437,7 @@ var KJUR = {};
5277
5437
  }
5278
5438
  return this.hV = e, this.hV;
5279
5439
  };
5280
- }, YAHOO.lang.extend(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured), KJUR.asn1.DERSet = function(e) {
5440
+ }, extendClass(KJUR.asn1.DERSequence, KJUR.asn1.DERAbstractStructured), KJUR.asn1.DERSet = function(e) {
5281
5441
  KJUR.asn1.DERSet.superclass.constructor.call(this, e), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
5282
5442
  for (var e = [], t = 0; t < this.asn1Array.length; t++) {
5283
5443
  var n = this.asn1Array[t];
@@ -5285,13 +5445,13 @@ var KJUR = {};
5285
5445
  }
5286
5446
  return this.sortFlag == 1 && e.sort(), this.hV = e.join(""), this.hV;
5287
5447
  }, 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) {
5448
+ }, extendClass(KJUR.asn1.DERSet, KJUR.asn1.DERAbstractStructured), KJUR.asn1.DERTaggedObject = function(e) {
5289
5449
  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
5450
  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
5451
  }, this.getFreshValueHex = function() {
5292
5452
  return this.hV;
5293
5453
  }, 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);
5454
+ }, extendClass(KJUR.asn1.DERTaggedObject, KJUR.asn1.ASN1Object);
5295
5455
  var __extends = (function() {
5296
5456
  var e = function(t, n) {
5297
5457
  return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
@@ -5366,10 +5526,10 @@ var __extends = (function() {
5366
5526
  }, t;
5367
5527
  }(RSAKey), version = typeof process < "u" ? process.env?.npm_package_version : void 0, lib_default = function() {
5368
5528
  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;
5529
+ 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
5530
  }
5371
5531
  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);
5532
+ 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
5533
  }, e.prototype.setPrivateKey = function(e) {
5374
5534
  this.setKey(e);
5375
5535
  }, e.prototype.setPublicKey = function(e) {
@@ -5386,18 +5546,38 @@ var __extends = (function() {
5386
5546
  } catch {
5387
5547
  return !1;
5388
5548
  }
5549
+ }, e.prototype.encryptOAEP = function(e) {
5550
+ try {
5551
+ return hex2b64(this.getKey().encrypt(e, oaep_pad));
5552
+ } catch {
5553
+ return !1;
5554
+ }
5389
5555
  }, e.prototype.sign = function(e, t, n) {
5556
+ t === void 0 && (t = function(e) {
5557
+ return e;
5558
+ }), n === void 0 && (n = "");
5390
5559
  try {
5391
5560
  return hex2b64(this.getKey().sign(e, t, n));
5392
5561
  } catch {
5393
5562
  return !1;
5394
5563
  }
5564
+ }, e.prototype.signSha256 = function(e) {
5565
+ return this.sign(e, function(e) {
5566
+ return rstr2hex(rstr_sha256(e));
5567
+ }, "sha256");
5395
5568
  }, e.prototype.verify = function(e, t, n) {
5569
+ n === void 0 && (n = function(e) {
5570
+ return e;
5571
+ });
5396
5572
  try {
5397
5573
  return this.getKey().verify(e, b64tohex(t), n);
5398
5574
  } catch {
5399
5575
  return !1;
5400
5576
  }
5577
+ }, e.prototype.verifySha256 = function(e, t) {
5578
+ return this.verify(e, t, function(e) {
5579
+ return rstr2hex(rstr_sha256(e));
5580
+ });
5401
5581
  }, e.prototype.getKey = function(e) {
5402
5582
  if (!this.key) {
5403
5583
  if (this.key = new JSEncryptRSAKey(), e && {}.toString.call(e) === "[object Function]") {
@@ -5562,7 +5742,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5562
5742
  if (typeof e == "string") return y(e, t);
5563
5743
  if (ArrayBuffer.isView(e)) return E(e);
5564
5744
  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);
5745
+ if (pe(e, ArrayBuffer) || e && pe(e.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (pe(e, SharedArrayBuffer) || e && pe(e.buffer, SharedArrayBuffer))) return k(e, t, n);
5566
5746
  if (typeof e == "number") throw TypeError("The \"value\" argument must not be of type number. Received type number");
5567
5747
  var r = e.valueOf && e.valueOf();
5568
5748
  if (r != null && r !== e) return p.from(r, t, n);
@@ -5602,7 +5782,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5602
5782
  return n;
5603
5783
  }
5604
5784
  function E(e) {
5605
- if (Ye(e, Uint8Array)) {
5785
+ if (pe(e, Uint8Array)) {
5606
5786
  var t = new Uint8Array(e);
5607
5787
  return k(t.buffer, t.byteOffset, t.byteLength);
5608
5788
  }
@@ -5619,7 +5799,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5619
5799
  var t = M(e.length) | 0, n = l(t);
5620
5800
  return n.length === 0 || e.copy(n, 0, 0, t), n;
5621
5801
  }
5622
- if (e.length !== void 0) return typeof e.length != "number" || Xe(e.length) ? l(0) : T(e);
5802
+ if (e.length !== void 0) return typeof e.length != "number" || me(e.length) ? l(0) : T(e);
5623
5803
  if (e.type === "Buffer" && Array.isArray(e.data)) return T(e.data);
5624
5804
  }
5625
5805
  function M(e) {
@@ -5632,7 +5812,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5632
5812
  p.isBuffer = function(e) {
5633
5813
  return e != null && e._isBuffer === !0 && e !== p.prototype;
5634
5814
  }, 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");
5815
+ if (pe(e, Uint8Array) && (e = p.from(e, e.offset, e.byteLength)), pe(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
5816
  if (e === t) return 0;
5637
5817
  for (var n = e.length, r = t.length, a = 0, c = Math.min(n, r); a < c; ++a) if (e[a] !== t[a]) {
5638
5818
  n = e[a], r = t[a];
@@ -5662,7 +5842,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5662
5842
  var r = p.allocUnsafe(t), a = 0;
5663
5843
  for (n = 0; n < e.length; ++n) {
5664
5844
  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);
5845
+ if (pe(c, Uint8Array)) a + c.length > r.length ? p.from(c).copy(r, a) : Uint8Array.prototype.set.call(r, c, a);
5666
5846
  else if (p.isBuffer(c)) c.copy(r, a);
5667
5847
  else throw TypeError("\"list\" argument must be an Array of Buffers");
5668
5848
  a += c.length;
@@ -5671,7 +5851,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5671
5851
  };
5672
5852
  function P(e, t) {
5673
5853
  if (p.isBuffer(e)) return e.length;
5674
- if (ArrayBuffer.isView(e) || Ye(e, ArrayBuffer)) return e.byteLength;
5854
+ if (ArrayBuffer.isView(e) || pe(e, ArrayBuffer)) return e.byteLength;
5675
5855
  if (typeof e != "string") throw TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof e);
5676
5856
  var n = e.length, r = arguments.length > 2 && arguments[2] === !0;
5677
5857
  if (!r && n === 0) return 0;
@@ -5680,15 +5860,15 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5680
5860
  case "latin1":
5681
5861
  case "binary": return n;
5682
5862
  case "utf8":
5683
- case "utf-8": return We(e).length;
5863
+ case "utf-8": return ce(e).length;
5684
5864
  case "ucs2":
5685
5865
  case "ucs-2":
5686
5866
  case "utf16le":
5687
5867
  case "utf-16le": return n * 2;
5688
5868
  case "hex": return n >>> 1;
5689
- case "base64": return qe(e).length;
5869
+ case "base64": return de(e).length;
5690
5870
  default:
5691
- if (a) return r ? -1 : We(e).length;
5871
+ if (a) return r ? -1 : ce(e).length;
5692
5872
  t = ("" + t).toLowerCase(), a = !0;
5693
5873
  }
5694
5874
  }
@@ -5697,17 +5877,17 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5697
5877
  var r = !1;
5698
5878
  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
5879
  for (e ||= "utf8";;) switch (e) {
5700
- case "hex": return Le(this, t, n);
5880
+ case "hex": return te(this, t, n);
5701
5881
  case "utf8":
5702
5882
  case "utf-8": return J(this, t, n);
5703
- case "ascii": return Ie(this, t, n);
5883
+ case "ascii": return ee(this, t, n);
5704
5884
  case "latin1":
5705
5885
  case "binary": return Z(this, t, n);
5706
5886
  case "base64": return K(this, t, n);
5707
5887
  case "ucs2":
5708
5888
  case "ucs-2":
5709
5889
  case "utf16le":
5710
- case "utf-16le": return Re(this, t, n);
5890
+ case "utf-16le": return ne(this, t, n);
5711
5891
  default:
5712
5892
  if (r) throw TypeError("Unknown encoding: " + e);
5713
5893
  e = (e + "").toLowerCase(), r = !0;
@@ -5743,7 +5923,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5743
5923
  var t = "", n = e.INSPECT_MAX_BYTES;
5744
5924
  return t = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), this.length > n && (t += " ... "), "<Buffer " + t + ">";
5745
5925
  }, 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);
5926
+ if (pe(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
5927
  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
5928
  if (r >= a && t >= n) return 0;
5749
5929
  if (r >= a) return -1;
@@ -5757,7 +5937,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5757
5937
  };
5758
5938
  function R(e, t, n, r, a) {
5759
5939
  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) {
5940
+ if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, me(n) && (n = a ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
5761
5941
  if (a) return -1;
5762
5942
  n = e.length - 1;
5763
5943
  } else if (n < 0) if (a) n = 0;
@@ -5805,22 +5985,22 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5805
5985
  r > c / 2 && (r = c / 2);
5806
5986
  for (var l = 0; l < r; ++l) {
5807
5987
  var p = parseInt(t.substr(l * 2, 2), 16);
5808
- if (Xe(p)) return l;
5988
+ if (me(p)) return l;
5809
5989
  e[n + l] = p;
5810
5990
  }
5811
5991
  return l;
5812
5992
  }
5813
5993
  function H(e, t, n, r) {
5814
- return Je(We(t, e.length - n), e, n, r);
5994
+ return fe(ce(t, e.length - n), e, n, r);
5815
5995
  }
5816
5996
  function U(e, t, n, r) {
5817
- return Je(Ge(t), e, n, r);
5997
+ return fe(le(t), e, n, r);
5818
5998
  }
5819
5999
  function W(e, t, n, r) {
5820
- return Je(qe(t), e, n, r);
6000
+ return fe(de(t), e, n, r);
5821
6001
  }
5822
6002
  function G(e, t, n, r) {
5823
- return Je(Ke(t, e.length - n), e, n, r);
6003
+ return fe(ue(t, e.length - n), e, n, r);
5824
6004
  }
5825
6005
  p.prototype.write = function(e, t, n, r) {
5826
6006
  if (t === void 0) r = "utf8", n = this.length, t = 0;
@@ -5885,7 +6065,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5885
6065
  for (var n = "", r = 0; r < t;) n += String.fromCharCode.apply(String, e.slice(r, r += Y));
5886
6066
  return n;
5887
6067
  }
5888
- function Ie(e, t, n) {
6068
+ function ee(e, t, n) {
5889
6069
  var r = "";
5890
6070
  n = Math.min(e.length, n);
5891
6071
  for (var a = t; a < n; ++a) r += String.fromCharCode(e[a] & 127);
@@ -5897,13 +6077,13 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
5897
6077
  for (var a = t; a < n; ++a) r += String.fromCharCode(e[a]);
5898
6078
  return r;
5899
6079
  }
5900
- function Le(e, t, n) {
6080
+ function te(e, t, n) {
5901
6081
  var r = e.length;
5902
6082
  (!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]];
6083
+ for (var a = "", c = t; c < n; ++c) a += he[e[c]];
5904
6084
  return a;
5905
6085
  }
5906
- function Re(e, t, n) {
6086
+ function ne(e, t, n) {
5907
6087
  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
6088
  return a;
5909
6089
  }
@@ -6024,24 +6204,24 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6024
6204
  }, p.prototype.writeInt32BE = function(e, t, n) {
6025
6205
  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
6206
  };
6027
- function ze(e, t, n, r, a, c) {
6207
+ function re(e, t, n, r, a, c) {
6028
6208
  if (n + r > e.length || n < 0) throw RangeError("Index out of range");
6029
6209
  }
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;
6210
+ function ie(e, t, r, a, c) {
6211
+ return t = +t, r >>>= 0, c || re(e, t, r, 4, 34028234663852886e22, -34028234663852886e22), n.write(e, t, r, a, 23, 4), r + 4;
6032
6212
  }
6033
6213
  p.prototype.writeFloatLE = function(e, t, n) {
6034
- return Be(this, e, t, !0, n);
6214
+ return ie(this, e, t, !0, n);
6035
6215
  }, p.prototype.writeFloatBE = function(e, t, n) {
6036
- return Be(this, e, t, !1, n);
6216
+ return ie(this, e, t, !1, n);
6037
6217
  };
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;
6218
+ function ae(e, t, r, a, c) {
6219
+ return t = +t, r >>>= 0, c || re(e, t, r, 8, 17976931348623157e292, -17976931348623157e292), n.write(e, t, r, a, 52, 8), r + 8;
6040
6220
  }
6041
6221
  p.prototype.writeDoubleLE = function(e, t, n) {
6042
- return Ve(this, e, t, !0, n);
6222
+ return ae(this, e, t, !0, n);
6043
6223
  }, p.prototype.writeDoubleBE = function(e, t, n) {
6044
- return Ve(this, e, t, !1, n);
6224
+ return ae(this, e, t, !1, n);
6045
6225
  }, p.prototype.copy = function(e, t, n, r) {
6046
6226
  if (!p.isBuffer(e)) throw TypeError("argument should be a Buffer");
6047
6227
  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 +6252,13 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6072
6252
  }
6073
6253
  return this;
6074
6254
  };
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 "";
6255
+ var oe = /[^+/0-9A-Za-z-_]/g;
6256
+ function se(e) {
6257
+ if (e = e.split("=")[0], e = e.trim().replace(oe, ""), e.length < 2) return "";
6078
6258
  for (; e.length % 4 != 0;) e += "=";
6079
6259
  return e;
6080
6260
  }
6081
- function We(e, t) {
6261
+ function ce(e, t) {
6082
6262
  t ||= Infinity;
6083
6263
  for (var n, r = e.length, a = null, c = [], l = 0; l < r; ++l) {
6084
6264
  if (n = e.charCodeAt(l), n > 55295 && n < 57344) {
@@ -6115,28 +6295,28 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6115
6295
  }
6116
6296
  return c;
6117
6297
  }
6118
- function Ge(e) {
6298
+ function le(e) {
6119
6299
  for (var t = [], n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
6120
6300
  return t;
6121
6301
  }
6122
- function Ke(e, t) {
6302
+ function ue(e, t) {
6123
6303
  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
6304
  return c;
6125
6305
  }
6126
- function qe(e) {
6127
- return t.toByteArray(Ue(e));
6306
+ function de(e) {
6307
+ return t.toByteArray(se(e));
6128
6308
  }
6129
- function Je(e, t, n, r) {
6309
+ function fe(e, t, n, r) {
6130
6310
  for (var a = 0; a < r && !(a + n >= t.length || a >= e.length); ++a) t[a + n] = e[a];
6131
6311
  return a;
6132
6312
  }
6133
- function Ye(e, t) {
6313
+ function pe(e, t) {
6134
6314
  return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
6135
6315
  }
6136
- function Xe(e) {
6316
+ function me(e) {
6137
6317
  return e !== e;
6138
6318
  }
6139
- var Ze = (function() {
6319
+ var he = (function() {
6140
6320
  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
6321
  return t;
6142
6322
  })();
@@ -6307,7 +6487,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6307
6487
  }
6308
6488
  t.s = r < 0 ? -1 : 0, r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r), t.t = n, t.clamp();
6309
6489
  }
6310
- function Ie(e, t) {
6490
+ function ee(e, t) {
6311
6491
  var n = this.abs(), r = e.abs(), c = n.t;
6312
6492
  for (t.t = c + r.t; --c >= 0;) t[c] = 0;
6313
6493
  for (c = 0; c < r.t; ++c) t[c + n.t] = n.am(0, r[c], t, c, 0, n.t);
@@ -6321,7 +6501,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6321
6501
  }
6322
6502
  e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), e.s = 0, e.clamp();
6323
6503
  }
6324
- function Le(e, t, n) {
6504
+ function te(e, t, n) {
6325
6505
  var r = e.abs();
6326
6506
  if (!(r.t <= 0)) {
6327
6507
  var l = this.abs();
@@ -6344,7 +6524,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6344
6524
  }
6345
6525
  }
6346
6526
  }
6347
- function Re(e) {
6527
+ function ne(e) {
6348
6528
  var t = c();
6349
6529
  return this.abs().divRemTo(e, null, t), this.s < 0 && t.compareTo(a.ZERO) > 0 && e.subTo(t, t), t;
6350
6530
  }
@@ -6354,38 +6534,38 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6354
6534
  function $(e) {
6355
6535
  return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
6356
6536
  }
6357
- function ze(e) {
6537
+ function re(e) {
6358
6538
  return e;
6359
6539
  }
6360
- function Be(e) {
6540
+ function ie(e) {
6361
6541
  e.divRemTo(this.m, null, e);
6362
6542
  }
6363
- function Ve(e, t, n) {
6543
+ function ae(e, t, n) {
6364
6544
  e.multiplyTo(t, n), this.reduce(n);
6365
6545
  }
6366
- function He(e, t) {
6546
+ function oe(e, t) {
6367
6547
  e.squareTo(t), this.reduce(t);
6368
6548
  }
6369
- Q.prototype.convert = $, Q.prototype.revert = ze, Q.prototype.reduce = Be, Q.prototype.mulTo = Ve, Q.prototype.sqrTo = He;
6370
- function Ue() {
6549
+ Q.prototype.convert = $, Q.prototype.revert = re, Q.prototype.reduce = ie, Q.prototype.mulTo = ae, Q.prototype.sqrTo = oe;
6550
+ function se() {
6371
6551
  if (this.t < 1) return 0;
6372
6552
  var e = this[0];
6373
6553
  if (!(e & 1)) return 0;
6374
6554
  var t = e & 3;
6375
6555
  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
6556
  }
6377
- function We(e) {
6557
+ function ce(e) {
6378
6558
  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
6559
  }
6380
- function Ge(e) {
6560
+ function le(e) {
6381
6561
  var t = c();
6382
6562
  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
6563
  }
6384
- function Ke(e) {
6564
+ function ue(e) {
6385
6565
  var t = c();
6386
6566
  return e.copyTo(t), this.reduce(t), t;
6387
6567
  }
6388
- function qe(e) {
6568
+ function de(e) {
6389
6569
  for (; e.t <= this.mt2;) e[e.t++] = 0;
6390
6570
  for (var t = 0; t < this.m.t; ++t) {
6391
6571
  var n = e[t] & 32767, r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
@@ -6393,17 +6573,17 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6393
6573
  }
6394
6574
  e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
6395
6575
  }
6396
- function Je(e, t) {
6576
+ function fe(e, t) {
6397
6577
  e.squareTo(t), this.reduce(t);
6398
6578
  }
6399
- function Ye(e, t, n) {
6579
+ function pe(e, t, n) {
6400
6580
  e.multiplyTo(t, n), this.reduce(n);
6401
6581
  }
6402
- We.prototype.convert = Ge, We.prototype.revert = Ke, We.prototype.reduce = qe, We.prototype.mulTo = Ye, We.prototype.sqrTo = Je;
6403
- function Xe() {
6582
+ ce.prototype.convert = le, ce.prototype.revert = ue, ce.prototype.reduce = de, ce.prototype.mulTo = pe, ce.prototype.sqrTo = fe;
6583
+ function me() {
6404
6584
  return (this.t > 0 ? this[0] & 1 : this.s) == 0;
6405
6585
  }
6406
- function Ze(e, t) {
6586
+ function he(e, t) {
6407
6587
  if (e > 4294967295 || e < 1) return a.ONE;
6408
6588
  var n = c(), r = c(), l = t.convert(this), p = U(e) - 1;
6409
6589
  for (l.copyTo(n); --p >= 0;) if (t.sqrTo(n, r), (e & 1 << p) > 0) t.mulTo(r, l, n);
@@ -6413,16 +6593,16 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6413
6593
  }
6414
6594
  return t.revert(n);
6415
6595
  }
6416
- function Qe(e, t) {
6417
- var n = e < 256 || t.isEven() ? new Q(t) : new We(t);
6596
+ function ge(e, t) {
6597
+ var n = e < 256 || t.isEven() ? new Q(t) : new ce(t);
6418
6598
  return this.exp(e, n);
6419
6599
  }
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() {
6600
+ 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 = ee, a.prototype.squareTo = Z, a.prototype.divRemTo = te, a.prototype.invDigit = se, a.prototype.isEven = me, a.prototype.exp = he, a.prototype.toString = R, a.prototype.negate = B, a.prototype.abs = V, a.prototype.compareTo = H, a.prototype.bitLength = W, a.prototype.mod = ne, a.prototype.modPowInt = ge, a.ZERO = P(0), a.ONE = P(1);
6601
+ function _e() {
6422
6602
  var e = c();
6423
6603
  return this.copyTo(e), e;
6424
6604
  }
6425
- function et() {
6605
+ function ve() {
6426
6606
  if (this.s < 0) {
6427
6607
  if (this.t == 1) return this[0] - this.DV;
6428
6608
  if (this.t == 0) return -1;
@@ -6430,25 +6610,25 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6430
6610
  else if (this.t == 0) return 0;
6431
6611
  return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
6432
6612
  }
6433
- function tt() {
6613
+ function ye() {
6434
6614
  return this.t == 0 ? this.s : this[0] << 24 >> 24;
6435
6615
  }
6436
- function nt() {
6616
+ function be() {
6437
6617
  return this.t == 0 ? this.s : this[0] << 16 >> 16;
6438
6618
  }
6439
- function rt(e) {
6619
+ function xe(e) {
6440
6620
  return Math.floor(Math.LN2 * this.DB / Math.log(e));
6441
6621
  }
6442
- function it() {
6622
+ function Se() {
6443
6623
  return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
6444
6624
  }
6445
- function at(e) {
6625
+ function Ce(e) {
6446
6626
  if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
6447
6627
  var t = this.chunkSize(e), n = e ** +t, r = P(n), a = c(), l = c(), p = "";
6448
6628
  for (this.divRemTo(r, a, l); a.signum() > 0;) p = (n + l.intValue()).toString(e).substr(1) + p, a.divRemTo(r, a, l);
6449
6629
  return l.intValue().toString(e) + p;
6450
6630
  }
6451
- function ot(e, t) {
6631
+ function we(e, t) {
6452
6632
  this.fromInt(0), t ??= 10;
6453
6633
  for (var n = this.chunkSize(t), r = t ** +n, c = !1, l = 0, p = 0, m = 0; m < e.length; ++m) {
6454
6634
  var h = j(e, m);
@@ -6460,31 +6640,31 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6460
6640
  }
6461
6641
  l > 0 && (this.dMultiply(t ** +l), this.dAddOffset(p, 0)), c && a.ZERO.subTo(this, this);
6462
6642
  }
6463
- function st(e, t, n) {
6643
+ function Te(e, t, n) {
6464
6644
  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);
6645
+ else for (this.fromNumber(e, n), this.testBit(e - 1) || this.bitwiseTo(a.ONE.shiftLeft(e - 1), Ne, 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
6646
  else {
6467
6647
  var r = [], c = e & 7;
6468
6648
  r.length = (e >> 3) + 1, t.nextBytes(r), c > 0 ? r[0] &= (1 << c) - 1 : r[0] = 0, this.fromString(r, 256);
6469
6649
  }
6470
6650
  }
6471
- function ct() {
6651
+ function Ee() {
6472
6652
  var e = this.t, t = [];
6473
6653
  t[0] = this.s;
6474
6654
  var n = this.DB - e * this.DB % 8, r, a = 0;
6475
6655
  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
6656
  return t;
6477
6657
  }
6478
- function lt(e) {
6658
+ function De(e) {
6479
6659
  return this.compareTo(e) == 0;
6480
6660
  }
6481
- function ut(e) {
6661
+ function Oe(e) {
6482
6662
  return this.compareTo(e) < 0 ? this : e;
6483
6663
  }
6484
- function dt(e) {
6664
+ function ke(e) {
6485
6665
  return this.compareTo(e) > 0 ? this : e;
6486
6666
  }
6487
- function ft(e, t, n) {
6667
+ function Ae(e, t, n) {
6488
6668
  var r, a, c = Math.min(e.t, this.t);
6489
6669
  for (r = 0; r < c; ++r) n[r] = t(this[r], e[r]);
6490
6670
  if (e.t < this.t) {
@@ -6496,81 +6676,81 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6496
6676
  }
6497
6677
  n.s = t(this.s, e.s), n.clamp();
6498
6678
  }
6499
- function pt(e, t) {
6679
+ function je(e, t) {
6500
6680
  return e & t;
6501
6681
  }
6502
- function mt(e) {
6682
+ function Me(e) {
6503
6683
  var t = c();
6504
- return this.bitwiseTo(e, pt, t), t;
6684
+ return this.bitwiseTo(e, je, t), t;
6505
6685
  }
6506
- function ht(e, t) {
6686
+ function Ne(e, t) {
6507
6687
  return e | t;
6508
6688
  }
6509
- function gt(e) {
6689
+ function Pe(e) {
6510
6690
  var t = c();
6511
- return this.bitwiseTo(e, ht, t), t;
6691
+ return this.bitwiseTo(e, Ne, t), t;
6512
6692
  }
6513
- function _t(e, t) {
6693
+ function Fe(e, t) {
6514
6694
  return e ^ t;
6515
6695
  }
6516
- function vt(e) {
6696
+ function Ie(e) {
6517
6697
  var t = c();
6518
- return this.bitwiseTo(e, _t, t), t;
6698
+ return this.bitwiseTo(e, Fe, t), t;
6519
6699
  }
6520
- function yt(e, t) {
6700
+ function Le(e, t) {
6521
6701
  return e & ~t;
6522
6702
  }
6523
- function bt(e) {
6703
+ function Re(e) {
6524
6704
  var t = c();
6525
- return this.bitwiseTo(e, yt, t), t;
6705
+ return this.bitwiseTo(e, Le, t), t;
6526
6706
  }
6527
- function xt() {
6707
+ function ze() {
6528
6708
  for (var e = c(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
6529
6709
  return e.t = this.t, e.s = ~this.s, e;
6530
6710
  }
6531
- function St(e) {
6711
+ function Be(e) {
6532
6712
  var t = c();
6533
6713
  return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
6534
6714
  }
6535
- function Ct(e) {
6715
+ function Ve(e) {
6536
6716
  var t = c();
6537
6717
  return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
6538
6718
  }
6539
- function wt(e) {
6719
+ function He(e) {
6540
6720
  if (e == 0) return -1;
6541
6721
  var t = 0;
6542
6722
  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
6723
  }
6544
- function Tt() {
6545
- for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + wt(this[e]);
6724
+ function Ue() {
6725
+ for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + He(this[e]);
6546
6726
  return this.s < 0 ? this.t * this.DB : -1;
6547
6727
  }
6548
- function Et(e) {
6728
+ function We(e) {
6549
6729
  for (var t = 0; e != 0;) e &= e - 1, ++t;
6550
6730
  return t;
6551
6731
  }
6552
- function Dt() {
6553
- for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += Et(this[n] ^ t);
6732
+ function Ge() {
6733
+ for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += We(this[n] ^ t);
6554
6734
  return e;
6555
6735
  }
6556
- function Ot(e) {
6736
+ function Ke(e) {
6557
6737
  var t = Math.floor(e / this.DB);
6558
6738
  return t >= this.t ? this.s != 0 : (this[t] & 1 << e % this.DB) != 0;
6559
6739
  }
6560
- function kt(e, t) {
6740
+ function qe(e, t) {
6561
6741
  var n = a.ONE.shiftLeft(e);
6562
6742
  return this.bitwiseTo(n, t, n), n;
6563
6743
  }
6564
- function At(e) {
6565
- return this.changeBit(e, ht);
6744
+ function Je(e) {
6745
+ return this.changeBit(e, Ne);
6566
6746
  }
6567
- function jt(e) {
6568
- return this.changeBit(e, yt);
6747
+ function Ye(e) {
6748
+ return this.changeBit(e, Le);
6569
6749
  }
6570
- function Mt(e) {
6571
- return this.changeBit(e, _t);
6750
+ function Xe(e) {
6751
+ return this.changeBit(e, Fe);
6572
6752
  }
6573
- function Nt(e, t) {
6753
+ function Ze(e, t) {
6574
6754
  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
6755
  if (e.t < this.t) {
6576
6756
  for (r += e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
@@ -6581,58 +6761,58 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6581
6761
  }
6582
6762
  t.s = r < 0 ? -1 : 0, r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r), t.t = n, t.clamp();
6583
6763
  }
6584
- function Pt(e) {
6764
+ function Qe(e) {
6585
6765
  var t = c();
6586
6766
  return this.addTo(e, t), t;
6587
6767
  }
6588
- function Ft(e) {
6768
+ function $e(e) {
6589
6769
  var t = c();
6590
6770
  return this.subTo(e, t), t;
6591
6771
  }
6592
- function It(e) {
6772
+ function et(e) {
6593
6773
  var t = c();
6594
6774
  return this.multiplyTo(e, t), t;
6595
6775
  }
6596
- function Lt() {
6776
+ function tt() {
6597
6777
  var e = c();
6598
6778
  return this.squareTo(e), e;
6599
6779
  }
6600
- function Rt(e) {
6780
+ function nt(e) {
6601
6781
  var t = c();
6602
6782
  return this.divRemTo(e, t, null), t;
6603
6783
  }
6604
- function zt(e) {
6784
+ function rt(e) {
6605
6785
  var t = c();
6606
6786
  return this.divRemTo(e, null, t), t;
6607
6787
  }
6608
- function Bt(e) {
6788
+ function it(e) {
6609
6789
  var t = c(), n = c();
6610
6790
  return this.divRemTo(e, t, n), [t, n];
6611
6791
  }
6612
- function Vt(e) {
6792
+ function at(e) {
6613
6793
  this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
6614
6794
  }
6615
- function Ht(e, t) {
6795
+ function ot(e, t) {
6616
6796
  if (e != 0) {
6617
6797
  for (; this.t <= t;) this[this.t++] = 0;
6618
6798
  for (this[t] += e; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
6619
6799
  }
6620
6800
  }
6621
- function Ut() {}
6622
- function Wt(e) {
6801
+ function st() {}
6802
+ function ct(e) {
6623
6803
  return e;
6624
6804
  }
6625
- function Gt(e, t, n) {
6805
+ function lt(e, t, n) {
6626
6806
  e.multiplyTo(t, n);
6627
6807
  }
6628
- function Kt(e, t) {
6808
+ function ut(e, t) {
6629
6809
  e.squareTo(t);
6630
6810
  }
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());
6811
+ st.prototype.convert = ct, st.prototype.revert = ct, st.prototype.mulTo = lt, st.prototype.sqrTo = ut;
6812
+ function dt(e) {
6813
+ return this.exp(e, new st());
6634
6814
  }
6635
- function Jt(e, t, n) {
6815
+ function ft(e, t, n) {
6636
6816
  var r = Math.min(this.t + e.t, t);
6637
6817
  for (n.s = 0, n.t = r; r > 0;) n[--r] = 0;
6638
6818
  var a;
@@ -6640,40 +6820,40 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6640
6820
  for (a = Math.min(e.t, t); r < a; ++r) this.am(0, e[r], n, r, 0, t - r);
6641
6821
  n.clamp();
6642
6822
  }
6643
- function Yt(e, t, n) {
6823
+ function pt(e, t, n) {
6644
6824
  --t;
6645
6825
  var r = n.t = this.t + e.t - t;
6646
6826
  for (n.s = 0; --r >= 0;) n[r] = 0;
6647
6827
  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
6828
  n.clamp(), n.drShiftTo(1, n);
6649
6829
  }
6650
- function Xt(e) {
6830
+ function mt(e) {
6651
6831
  this.r2 = c(), this.q3 = c(), a.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e), this.m = e;
6652
6832
  }
6653
- function Zt(e) {
6833
+ function ht(e) {
6654
6834
  if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
6655
6835
  if (e.compareTo(this.m) < 0) return e;
6656
6836
  var t = c();
6657
6837
  return e.copyTo(t), this.reduce(t), t;
6658
6838
  }
6659
- function Qt(e) {
6839
+ function gt(e) {
6660
6840
  return e;
6661
6841
  }
6662
- function $t(e) {
6842
+ function _t(e) {
6663
6843
  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
6844
  for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;) e.subTo(this.m, e);
6665
6845
  }
6666
- function en(e, t) {
6846
+ function vt(e, t) {
6667
6847
  e.squareTo(t), this.reduce(t);
6668
6848
  }
6669
- function tn(e, t, n) {
6849
+ function yt(e, t, n) {
6670
6850
  e.multiplyTo(t, n), this.reduce(n);
6671
6851
  }
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) {
6852
+ mt.prototype.convert = ht, mt.prototype.revert = gt, mt.prototype.reduce = _t, mt.prototype.mulTo = yt, mt.prototype.sqrTo = vt;
6853
+ function bt(e, t) {
6674
6854
  var n = e.bitLength(), r, a = P(1), l;
6675
6855
  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);
6856
+ r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, l = n < 8 ? new Q(t) : t.isEven() ? new mt(t) : new ce(t);
6677
6857
  var p = [], m = 3, h = r - 1, g = (1 << r) - 1;
6678
6858
  if (p[1] = l.convert(this), r > 1) {
6679
6859
  var v = c();
@@ -6691,7 +6871,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6691
6871
  }
6692
6872
  return l.revert(a);
6693
6873
  }
6694
- function rn(e) {
6874
+ function xt(e) {
6695
6875
  var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone();
6696
6876
  if (t.compareTo(n) < 0) {
6697
6877
  var r = t;
@@ -6702,14 +6882,14 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6702
6882
  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
6883
  return c > 0 && n.lShiftTo(c, n), n;
6704
6884
  }
6705
- function an(e) {
6885
+ function St(e) {
6706
6886
  if (e <= 0) return 0;
6707
6887
  var t = this.DV % e, n = this.s < 0 ? e - 1 : 0;
6708
6888
  if (this.t > 0) if (t == 0) n = this[0] % e;
6709
6889
  else for (var r = this.t - 1; r >= 0; --r) n = (t * n + this[r]) % e;
6710
6890
  return n;
6711
6891
  }
6712
- function on(e) {
6892
+ function Ct(e) {
6713
6893
  var t = e.isEven();
6714
6894
  if (this.isEven() && t || e.signum() == 0) return a.ZERO;
6715
6895
  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 +6903,7 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6723
6903
  else return m;
6724
6904
  return m.signum() < 0 ? m.add(e) : m;
6725
6905
  }
6726
- var sn = [
6906
+ var wt = [
6727
6907
  2,
6728
6908
  3,
6729
6909
  5,
@@ -6892,27 +7072,27 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6892
7072
  983,
6893
7073
  991,
6894
7074
  997
6895
- ], cn = (1 << 26) / sn[sn.length - 1];
6896
- function ln(e) {
7075
+ ], Tt = (1 << 26) / wt[wt.length - 1];
7076
+ function Et(e) {
6897
7077
  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;
7078
+ if (n.t == 1 && n[0] <= wt[wt.length - 1]) {
7079
+ for (t = 0; t < wt.length; ++t) if (n[0] == wt[t]) return !0;
6900
7080
  return !1;
6901
7081
  }
6902
7082
  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;
7083
+ for (t = 1; t < wt.length;) {
7084
+ for (var r = wt[t], a = t + 1; a < wt.length && r < Tt;) r *= wt[a++];
7085
+ for (r = n.modInt(r); t < a;) if (r % wt[t++] == 0) return !1;
6906
7086
  }
6907
7087
  return n.millerRabin(e);
6908
7088
  }
6909
- function un(e) {
7089
+ function Dt(e) {
6910
7090
  var t = this.subtract(a.ONE), n = t.getLowestSetBit();
6911
7091
  if (n <= 0) return !1;
6912
7092
  var r = t.shiftRight(n);
6913
- e = e + 1 >> 1, e > sn.length && (e = sn.length);
7093
+ e = e + 1 >> 1, e > wt.length && (e = wt.length);
6914
7094
  for (var l = c(), p = 0; p < e; ++p) {
6915
- l.fromInt(sn[Math.floor(Math.random() * sn.length)]);
7095
+ l.fromInt(wt[Math.floor(Math.random() * wt.length)]);
6916
7096
  var m = l.modPow(r, this);
6917
7097
  if (m.compareTo(a.ONE) != 0 && m.compareTo(t) != 0) {
6918
7098
  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 +7101,67 @@ var require_base64_js = /* @__PURE__ */ __commonJSMin(((e) => {
6921
7101
  }
6922
7102
  return !0;
6923
7103
  }
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);
7104
+ a.prototype.chunkSize = xe, a.prototype.toRadix = Ce, a.prototype.fromRadix = we, a.prototype.fromNumber = Te, a.prototype.bitwiseTo = Ae, a.prototype.changeBit = qe, a.prototype.addTo = Ze, a.prototype.dMultiply = at, a.prototype.dAddOffset = ot, a.prototype.multiplyLowerTo = ft, a.prototype.multiplyUpperTo = pt, a.prototype.modInt = St, a.prototype.millerRabin = Dt, a.prototype.clone = _e, a.prototype.intValue = ve, a.prototype.byteValue = ye, a.prototype.shortValue = be, a.prototype.signum = Se, a.prototype.toByteArray = Ee, a.prototype.equals = De, a.prototype.min = Oe, a.prototype.max = ke, a.prototype.and = Me, a.prototype.or = Pe, a.prototype.xor = Ie, a.prototype.andNot = Re, a.prototype.not = ze, a.prototype.shiftLeft = Be, a.prototype.shiftRight = Ve, a.prototype.getLowestSetBit = Ue, a.prototype.bitCount = Ge, a.prototype.testBit = Ke, a.prototype.setBit = Je, a.prototype.clearBit = Ye, a.prototype.flipBit = Xe, a.prototype.add = Qe, a.prototype.subtract = $e, a.prototype.multiply = et, a.prototype.divide = nt, a.prototype.remainder = rt, a.prototype.divideAndRemainder = it, a.prototype.modPow = bt, a.prototype.modInverse = Ct, a.prototype.pow = dt, a.prototype.gcd = xt, a.prototype.isProbablePrime = Et, a.prototype.square = tt, a.prototype.Barrett = mt;
7105
+ var Ot, kt, At;
7106
+ function jt(e) {
7107
+ kt[At++] ^= e & 255, kt[At++] ^= e >> 8 & 255, kt[At++] ^= e >> 16 & 255, kt[At++] ^= e >> 24 & 255, At >= Ut && (At -= Ut);
6928
7108
  }
6929
- function hn() {
6930
- mn((/* @__PURE__ */ new Date()).getTime());
7109
+ function Mt() {
7110
+ jt((/* @__PURE__ */ new Date()).getTime());
6931
7111
  }
6932
- if (fn == null) {
6933
- fn = [], pn = 0;
6934
- var gn;
7112
+ if (kt == null) {
7113
+ kt = [], At = 0;
7114
+ var Nt;
6935
7115
  if (typeof window < "u" && window.crypto) {
6936
7116
  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];
7117
+ var Pt = new Uint8Array(32);
7118
+ for (window.crypto.getRandomValues(Pt), Nt = 0; Nt < 32; ++Nt) kt[At++] = Pt[Nt];
6939
7119
  } 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;
7120
+ var Ft = window.crypto.random(32);
7121
+ for (Nt = 0; Nt < Ft.length; ++Nt) kt[At++] = Ft.charCodeAt(Nt) & 255;
6942
7122
  }
6943
7123
  }
6944
- for (; pn < En;) gn = Math.floor(65536 * Math.random()), fn[pn++] = gn >>> 8, fn[pn++] = gn & 255;
6945
- pn = 0, hn();
7124
+ for (; At < Ut;) Nt = Math.floor(65536 * Math.random()), kt[At++] = Nt >>> 8, kt[At++] = Nt & 255;
7125
+ At = 0, Mt();
6946
7126
  }
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;
7127
+ function It() {
7128
+ if (Ot == null) {
7129
+ for (Mt(), Ot = Ht(), Ot.init(kt), At = 0; At < kt.length; ++At) kt[At] = 0;
7130
+ At = 0;
6951
7131
  }
6952
- return dn.next();
7132
+ return Ot.next();
6953
7133
  }
6954
- function bn(e) {
7134
+ function Lt(e) {
6955
7135
  var t;
6956
- for (t = 0; t < e.length; ++t) e[t] = yn();
7136
+ for (t = 0; t < e.length; ++t) e[t] = It();
6957
7137
  }
6958
- function xn() {}
6959
- xn.prototype.nextBytes = bn;
6960
- function Sn() {
7138
+ function Rt() {}
7139
+ Rt.prototype.nextBytes = Lt;
7140
+ function zt() {
6961
7141
  this.i = 0, this.j = 0, this.S = [];
6962
7142
  }
6963
- function Cn(e) {
7143
+ function Bt(e) {
6964
7144
  var t, n, r;
6965
7145
  for (t = 0; t < 256; ++t) this.S[t] = t;
6966
7146
  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
7147
  this.i = 0, this.j = 0;
6968
7148
  }
6969
- function wn() {
7149
+ function Vt() {
6970
7150
  var e;
6971
7151
  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
7152
  }
6973
- Sn.prototype.init = Cn, Sn.prototype.next = wn;
6974
- function Tn() {
6975
- return new Sn();
7153
+ zt.prototype.init = Bt, zt.prototype.next = Vt;
7154
+ function Ht() {
7155
+ return new zt();
6976
7156
  }
6977
- var En = 256;
7157
+ var Ut = 256;
6978
7158
  e === void 0 ? this.jsbn = {
6979
7159
  BigInteger: a,
6980
- SecureRandom: xn
7160
+ SecureRandom: Rt
6981
7161
  } : e = t.exports = {
6982
7162
  default: a,
6983
7163
  BigInteger: a,
6984
- SecureRandom: xn
7164
+ SecureRandom: Rt
6985
7165
  };
6986
7166
  }).call(e);
6987
7167
  })), import_to_arraybuffer = /* @__PURE__ */ __toESM(require_to_arraybuffer()), import_buffer = require_buffer(), import_jsbn = require_jsbn(), i = import_jsbn.BigInteger.prototype.Barrett;
@@ -7638,4 +7818,4 @@ function crypto(e) {
7638
7818
  }
7639
7819
  };
7640
7820
  }
7641
- export { crypto, getCryptoGetCryptoConfig as n, postCryptoEditCryptoConfig as r, setupAes, setupSm4Cbc, setupSm4Ecb, ctx as t };
7821
+ export { crypto, __exportAll as i, getCryptoGetCryptoConfig as n, postCryptoEditCryptoConfig as r, setupAes, setupSm4Cbc, setupSm4Ecb, ctx as t };