module-develop-kit 1.4.2 → 1.5.0

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.
Files changed (39) hide show
  1. package/dist/commonjs-virtual-dir/index.js +3 -5
  2. package/dist/commonjs-virtual-dir/index2.js +5 -2
  3. package/dist/commonjs-virtual-dir/index3.js +5 -2
  4. package/dist/commonjs-virtual-dir/index4.js +2 -4
  5. package/dist/commonjs-virtual-dir/index5.js +4 -0
  6. package/dist/commonjs-virtual-dir/index6.js +4 -0
  7. package/dist/commonjs-virtual-dir/index7.js +4 -0
  8. package/dist/commonjs-virtual-dir/index8.js +4 -0
  9. package/dist/main.d.ts +92 -10
  10. package/dist/main.js +44 -40
  11. package/dist/src/outside-call/utils.js +1 -1
  12. package/dist/src/shield/crypto/const.js +4 -0
  13. package/dist/src/shield/crypto/index.js +53 -0
  14. package/dist/src/shield/crypto/sm2.js +7 -0
  15. package/dist/src/shield/crypto/sm4.js +15 -0
  16. package/dist/src/shield/crypto/util.js +29 -0
  17. package/dist/src/shield/gcm-crypto/axios-adapter.js +25 -23
  18. package/dist/src/shield/gcm-crypto/index.js +16 -15
  19. package/dist/vendor/base64-js/index.js +52 -0
  20. package/dist/vendor/file-type/source/detectors/zip.js +64 -60
  21. package/dist/vendor/file-type/source/index.js +146 -130
  22. package/dist/vendor/file-type/source/supported.js +4 -2
  23. package/dist/vendor/gm-crypt/index.js +10 -0
  24. package/dist/vendor/gm-crypt/src/crypt.js +60 -0
  25. package/dist/vendor/gm-crypt/src/sm4.js +513 -0
  26. package/dist/vendor/ieee754/index.js +1 -1
  27. package/dist/vendor/jsbn/index.js +714 -0
  28. package/dist/vendor/sdp-transform/lib/index.js +1 -1
  29. package/dist/vendor/sm-crypto/src/index.js +14 -0
  30. package/dist/vendor/sm-crypto/src/sm2/asn1.js +86 -0
  31. package/dist/vendor/sm-crypto/src/sm2/ec.js +205 -0
  32. package/dist/vendor/sm-crypto/src/sm2/index.js +114 -0
  33. package/dist/vendor/sm-crypto/src/sm2/sm3.js +71 -0
  34. package/dist/vendor/sm-crypto/src/sm2/utils.js +95 -0
  35. package/dist/vendor/sm-crypto/src/sm3/index.js +50 -0
  36. package/dist/vendor/sm-crypto/src/sm4/index.js +408 -0
  37. package/dist/vendor/token-types/lib/index.js +1 -1
  38. package/dist/vite-plugins/index.d.ts +42 -0
  39. package/package.json +13 -13
@@ -0,0 +1,714 @@
1
+ import { __module as C } from "../../commonjs-virtual-dir/index6.js";
2
+ var $i = C.exports, Y;
3
+ function Qi() {
4
+ return Y ? C.exports : (Y = 1, function(x, Hi) {
5
+ (function() {
6
+ var D, tt = 244837814094590, j = (tt & 16777215) == 15715070;
7
+ function s(t, i, e) {
8
+ t != null && (typeof t == "number" ? this.fromNumber(t, i, e) : i == null && typeof t != "string" ? this.fromString(t, 256) : this.fromString(t, i));
9
+ }
10
+ function u() {
11
+ return new s(null);
12
+ }
13
+ function it(t, i, e, r, o, n) {
14
+ for (; --n >= 0; ) {
15
+ var h = i * this[t++] + e[r] + o;
16
+ o = Math.floor(h / 67108864), e[r++] = h & 67108863;
17
+ }
18
+ return o;
19
+ }
20
+ function et(t, i, e, r, o, n) {
21
+ for (var h = i & 32767, f = i >> 15; --n >= 0; ) {
22
+ var p = this[t] & 32767, l = this[t++] >> 15, y = f * p + l * h;
23
+ p = h * p + ((y & 32767) << 15) + e[r] + (o & 1073741823), o = (p >>> 30) + (y >>> 15) + f * l + (o >>> 30), e[r++] = p & 1073741823;
24
+ }
25
+ return o;
26
+ }
27
+ function rt(t, i, e, r, o, n) {
28
+ for (var h = i & 16383, f = i >> 14; --n >= 0; ) {
29
+ var p = this[t] & 16383, l = this[t++] >> 14, y = f * p + l * h;
30
+ p = h * p + ((y & 16383) << 14) + e[r] + o, o = (p >> 28) + (y >> 14) + f * l, e[r++] = p & 268435455;
31
+ }
32
+ return o;
33
+ }
34
+ var z = typeof navigator < "u";
35
+ z && j && navigator.appName == "Microsoft Internet Explorer" ? (s.prototype.am = et, D = 30) : z && j && navigator.appName != "Netscape" ? (s.prototype.am = it, D = 26) : (s.prototype.am = rt, D = 28), s.prototype.DB = D, s.prototype.DM = (1 << D) - 1, s.prototype.DV = 1 << D;
36
+ var L = 52;
37
+ s.prototype.FV = Math.pow(2, L), s.prototype.F1 = L - D, s.prototype.F2 = 2 * D - L;
38
+ var ot = "0123456789abcdefghijklmnopqrstuvwxyz", N = new Array(), A, T;
39
+ for (A = 48, T = 0; T <= 9; ++T) N[A++] = T;
40
+ for (A = 97, T = 10; T < 36; ++T) N[A++] = T;
41
+ for (A = 65, T = 10; T < 36; ++T) N[A++] = T;
42
+ function U(t) {
43
+ return ot.charAt(t);
44
+ }
45
+ function G(t, i) {
46
+ var e = N[t.charCodeAt(i)];
47
+ return e ?? -1;
48
+ }
49
+ function st(t) {
50
+ for (var i = this.t - 1; i >= 0; --i) t[i] = this[i];
51
+ t.t = this.t, t.s = this.s;
52
+ }
53
+ function nt(t) {
54
+ this.t = 1, this.s = t < 0 ? -1 : 0, t > 0 ? this[0] = t : t < -1 ? this[0] = t + this.DV : this.t = 0;
55
+ }
56
+ function S(t) {
57
+ var i = u();
58
+ return i.fromInt(t), i;
59
+ }
60
+ function ht(t, i) {
61
+ var e;
62
+ if (i == 16) e = 4;
63
+ else if (i == 8) e = 3;
64
+ else if (i == 256) e = 8;
65
+ else if (i == 2) e = 1;
66
+ else if (i == 32) e = 5;
67
+ else if (i == 4) e = 2;
68
+ else {
69
+ this.fromRadix(t, i);
70
+ return;
71
+ }
72
+ this.t = 0, this.s = 0;
73
+ for (var r = t.length, o = !1, n = 0; --r >= 0; ) {
74
+ var h = e == 8 ? t[r] & 255 : G(t, r);
75
+ if (h < 0) {
76
+ t.charAt(r) == "-" && (o = !0);
77
+ continue;
78
+ }
79
+ o = !1, n == 0 ? this[this.t++] = h : n + e > this.DB ? (this[this.t - 1] |= (h & (1 << this.DB - n) - 1) << n, this[this.t++] = h >> this.DB - n) : this[this.t - 1] |= h << n, n += e, n >= this.DB && (n -= this.DB);
80
+ }
81
+ e == 8 && (t[0] & 128) != 0 && (this.s = -1, n > 0 && (this[this.t - 1] |= (1 << this.DB - n) - 1 << n)), this.clamp(), o && s.ZERO.subTo(this, this);
82
+ }
83
+ function ft() {
84
+ for (var t = this.s & this.DM; this.t > 0 && this[this.t - 1] == t; ) --this.t;
85
+ }
86
+ function ut(t) {
87
+ if (this.s < 0) return "-" + this.negate().toString(t);
88
+ var i;
89
+ if (t == 16) i = 4;
90
+ else if (t == 8) i = 3;
91
+ else if (t == 2) i = 1;
92
+ else if (t == 32) i = 5;
93
+ else if (t == 4) i = 2;
94
+ else return this.toRadix(t);
95
+ var e = (1 << i) - 1, r, o = !1, n = "", h = this.t, f = this.DB - h * this.DB % i;
96
+ if (h-- > 0)
97
+ for (f < this.DB && (r = this[h] >> f) > 0 && (o = !0, n = U(r)); h >= 0; )
98
+ f < i ? (r = (this[h] & (1 << f) - 1) << i - f, r |= this[--h] >> (f += this.DB - i)) : (r = this[h] >> (f -= i) & e, f <= 0 && (f += this.DB, --h)), r > 0 && (o = !0), o && (n += U(r));
99
+ return o ? n : "0";
100
+ }
101
+ function pt() {
102
+ var t = u();
103
+ return s.ZERO.subTo(this, t), t;
104
+ }
105
+ function at() {
106
+ return this.s < 0 ? this.negate() : this;
107
+ }
108
+ function lt(t) {
109
+ var i = this.s - t.s;
110
+ if (i != 0) return i;
111
+ var e = this.t;
112
+ if (i = e - t.t, i != 0) return this.s < 0 ? -i : i;
113
+ for (; --e >= 0; ) if ((i = this[e] - t[e]) != 0) return i;
114
+ return 0;
115
+ }
116
+ function V(t) {
117
+ var i = 1, e;
118
+ return (e = t >>> 16) != 0 && (t = e, i += 16), (e = t >> 8) != 0 && (t = e, i += 8), (e = t >> 4) != 0 && (t = e, i += 4), (e = t >> 2) != 0 && (t = e, i += 2), (e = t >> 1) != 0 && (t = e, i += 1), i;
119
+ }
120
+ function ct() {
121
+ return this.t <= 0 ? 0 : this.DB * (this.t - 1) + V(this[this.t - 1] ^ this.s & this.DM);
122
+ }
123
+ function vt(t, i) {
124
+ var e;
125
+ for (e = this.t - 1; e >= 0; --e) i[e + t] = this[e];
126
+ for (e = t - 1; e >= 0; --e) i[e] = 0;
127
+ i.t = this.t + t, i.s = this.s;
128
+ }
129
+ function mt(t, i) {
130
+ for (var e = t; e < this.t; ++e) i[e - t] = this[e];
131
+ i.t = Math.max(this.t - t, 0), i.s = this.s;
132
+ }
133
+ function Tt(t, i) {
134
+ var e = t % this.DB, r = this.DB - e, o = (1 << r) - 1, n = Math.floor(t / this.DB), h = this.s << e & this.DM, f;
135
+ for (f = this.t - 1; f >= 0; --f)
136
+ i[f + n + 1] = this[f] >> r | h, h = (this[f] & o) << e;
137
+ for (f = n - 1; f >= 0; --f) i[f] = 0;
138
+ i[n] = h, i.t = this.t + n + 1, i.s = this.s, i.clamp();
139
+ }
140
+ function yt(t, i) {
141
+ i.s = this.s;
142
+ var e = Math.floor(t / this.DB);
143
+ if (e >= this.t) {
144
+ i.t = 0;
145
+ return;
146
+ }
147
+ var r = t % this.DB, o = this.DB - r, n = (1 << r) - 1;
148
+ i[0] = this[e] >> r;
149
+ for (var h = e + 1; h < this.t; ++h)
150
+ i[h - e - 1] |= (this[h] & n) << o, i[h - e] = this[h] >> r;
151
+ r > 0 && (i[this.t - e - 1] |= (this.s & n) << o), i.t = this.t - e, i.clamp();
152
+ }
153
+ function dt(t, i) {
154
+ for (var e = 0, r = 0, o = Math.min(t.t, this.t); e < o; )
155
+ r += this[e] - t[e], i[e++] = r & this.DM, r >>= this.DB;
156
+ if (t.t < this.t) {
157
+ for (r -= t.s; e < this.t; )
158
+ r += this[e], i[e++] = r & this.DM, r >>= this.DB;
159
+ r += this.s;
160
+ } else {
161
+ for (r += this.s; e < t.t; )
162
+ r -= t[e], i[e++] = r & this.DM, r >>= this.DB;
163
+ r -= t.s;
164
+ }
165
+ i.s = r < 0 ? -1 : 0, r < -1 ? i[e++] = this.DV + r : r > 0 && (i[e++] = r), i.t = e, i.clamp();
166
+ }
167
+ function bt(t, i) {
168
+ var e = this.abs(), r = t.abs(), o = e.t;
169
+ for (i.t = o + r.t; --o >= 0; ) i[o] = 0;
170
+ for (o = 0; o < r.t; ++o) i[o + e.t] = e.am(0, r[o], i, o, 0, e.t);
171
+ i.s = 0, i.clamp(), this.s != t.s && s.ZERO.subTo(i, i);
172
+ }
173
+ function wt(t) {
174
+ for (var i = this.abs(), e = t.t = 2 * i.t; --e >= 0; ) t[e] = 0;
175
+ for (e = 0; e < i.t - 1; ++e) {
176
+ var r = i.am(e, i[e], t, 2 * e, 0, 1);
177
+ (t[e + i.t] += i.am(e + 1, 2 * i[e], t, 2 * e + 1, r, i.t - e - 1)) >= i.DV && (t[e + i.t] -= i.DV, t[e + i.t + 1] = 1);
178
+ }
179
+ t.t > 0 && (t[t.t - 1] += i.am(e, i[e], t, 2 * e, 0, 1)), t.s = 0, t.clamp();
180
+ }
181
+ function gt(t, i, e) {
182
+ var r = t.abs();
183
+ if (!(r.t <= 0)) {
184
+ var o = this.abs();
185
+ if (o.t < r.t) {
186
+ i?.fromInt(0), e != null && this.copyTo(e);
187
+ return;
188
+ }
189
+ e == null && (e = u());
190
+ var n = u(), h = this.s, f = t.s, p = this.DB - V(r[r.t - 1]);
191
+ p > 0 ? (r.lShiftTo(p, n), o.lShiftTo(p, e)) : (r.copyTo(n), o.copyTo(e));
192
+ var l = n.t, y = n[l - 1];
193
+ if (y != 0) {
194
+ var m = y * (1 << this.F1) + (l > 1 ? n[l - 2] >> this.F2 : 0), g = this.FV / m, _ = (1 << this.F1) / m, b = 1 << this.F2, w = e.t, q = w - l, B = i ?? u();
195
+ for (n.dlShiftTo(q, B), e.compareTo(B) >= 0 && (e[e.t++] = 1, e.subTo(B, e)), s.ONE.dlShiftTo(l, B), B.subTo(n, n); n.t < l; ) n[n.t++] = 0;
196
+ for (; --q >= 0; ) {
197
+ var Z = e[--w] == y ? this.DM : Math.floor(e[w] * g + (e[w - 1] + b) * _);
198
+ if ((e[w] += n.am(0, Z, e, q, 0, l)) < Z)
199
+ for (n.dlShiftTo(q, B), e.subTo(B, e); e[w] < --Z; ) e.subTo(B, e);
200
+ }
201
+ i != null && (e.drShiftTo(l, i), h != f && s.ZERO.subTo(i, i)), e.t = l, e.clamp(), p > 0 && e.rShiftTo(p, e), h < 0 && s.ZERO.subTo(e, e);
202
+ }
203
+ }
204
+ }
205
+ function Dt(t) {
206
+ var i = u();
207
+ return this.abs().divRemTo(t, null, i), this.s < 0 && i.compareTo(s.ZERO) > 0 && t.subTo(i, i), i;
208
+ }
209
+ function M(t) {
210
+ this.m = t;
211
+ }
212
+ function St(t) {
213
+ return t.s < 0 || t.compareTo(this.m) >= 0 ? t.mod(this.m) : t;
214
+ }
215
+ function Bt(t) {
216
+ return t;
217
+ }
218
+ function Mt(t) {
219
+ t.divRemTo(this.m, null, t);
220
+ }
221
+ function Rt(t, i, e) {
222
+ t.multiplyTo(i, e), this.reduce(e);
223
+ }
224
+ function Et(t, i) {
225
+ t.squareTo(i), this.reduce(i);
226
+ }
227
+ M.prototype.convert = St, M.prototype.revert = Bt, M.prototype.reduce = Mt, M.prototype.mulTo = Rt, M.prototype.sqrTo = Et;
228
+ function At() {
229
+ if (this.t < 1) return 0;
230
+ var t = this[0];
231
+ if ((t & 1) == 0) return 0;
232
+ var i = t & 3;
233
+ return i = i * (2 - (t & 15) * i) & 15, i = i * (2 - (t & 255) * i) & 255, i = i * (2 - ((t & 65535) * i & 65535)) & 65535, i = i * (2 - t * i % this.DV) % this.DV, i > 0 ? this.DV - i : -i;
234
+ }
235
+ function R(t) {
236
+ this.m = t, this.mp = t.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t;
237
+ }
238
+ function Ot(t) {
239
+ var i = u();
240
+ return t.abs().dlShiftTo(this.m.t, i), i.divRemTo(this.m, null, i), t.s < 0 && i.compareTo(s.ZERO) > 0 && this.m.subTo(i, i), i;
241
+ }
242
+ function Nt(t) {
243
+ var i = u();
244
+ return t.copyTo(i), this.reduce(i), i;
245
+ }
246
+ function Vt(t) {
247
+ for (; t.t <= this.mt2; )
248
+ t[t.t++] = 0;
249
+ for (var i = 0; i < this.m.t; ++i) {
250
+ var e = t[i] & 32767, r = e * this.mpl + ((e * this.mph + (t[i] >> 15) * this.mpl & this.um) << 15) & t.DM;
251
+ for (e = i + this.m.t, t[e] += this.m.am(0, r, t, i, 0, this.m.t); t[e] >= t.DV; )
252
+ t[e] -= t.DV, t[++e]++;
253
+ }
254
+ t.clamp(), t.drShiftTo(this.m.t, t), t.compareTo(this.m) >= 0 && t.subTo(this.m, t);
255
+ }
256
+ function It(t, i) {
257
+ t.squareTo(i), this.reduce(i);
258
+ }
259
+ function _t(t, i, e) {
260
+ t.multiplyTo(i, e), this.reduce(e);
261
+ }
262
+ R.prototype.convert = Ot, R.prototype.revert = Nt, R.prototype.reduce = Vt, R.prototype.mulTo = _t, R.prototype.sqrTo = It;
263
+ function qt() {
264
+ return (this.t > 0 ? this[0] & 1 : this.s) == 0;
265
+ }
266
+ function Ct(t, i) {
267
+ if (t > 4294967295 || t < 1) return s.ONE;
268
+ var e = u(), r = u(), o = i.convert(this), n = V(t) - 1;
269
+ for (o.copyTo(e); --n >= 0; )
270
+ if (i.sqrTo(e, r), (t & 1 << n) > 0) i.mulTo(r, o, e);
271
+ else {
272
+ var h = e;
273
+ e = r, r = h;
274
+ }
275
+ return i.revert(e);
276
+ }
277
+ function Lt(t, i) {
278
+ var e;
279
+ return t < 256 || i.isEven() ? e = new M(i) : e = new R(i), this.exp(t, e);
280
+ }
281
+ s.prototype.copyTo = st, s.prototype.fromInt = nt, s.prototype.fromString = ht, s.prototype.clamp = ft, s.prototype.dlShiftTo = vt, s.prototype.drShiftTo = mt, s.prototype.lShiftTo = Tt, s.prototype.rShiftTo = yt, s.prototype.subTo = dt, s.prototype.multiplyTo = bt, s.prototype.squareTo = wt, s.prototype.divRemTo = gt, s.prototype.invDigit = At, s.prototype.isEven = qt, s.prototype.exp = Ct, s.prototype.toString = ut, s.prototype.negate = pt, s.prototype.abs = at, s.prototype.compareTo = lt, s.prototype.bitLength = ct, s.prototype.mod = Dt, s.prototype.modPowInt = Lt, s.ZERO = S(0), s.ONE = S(1);
282
+ function Ft() {
283
+ var t = u();
284
+ return this.copyTo(t), t;
285
+ }
286
+ function Pt() {
287
+ if (this.s < 0) {
288
+ if (this.t == 1) return this[0] - this.DV;
289
+ if (this.t == 0) return -1;
290
+ } else {
291
+ if (this.t == 1) return this[0];
292
+ if (this.t == 0) return 0;
293
+ }
294
+ return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
295
+ }
296
+ function kt() {
297
+ return this.t == 0 ? this.s : this[0] << 24 >> 24;
298
+ }
299
+ function Zt() {
300
+ return this.t == 0 ? this.s : this[0] << 16 >> 16;
301
+ }
302
+ function jt(t) {
303
+ return Math.floor(Math.LN2 * this.DB / Math.log(t));
304
+ }
305
+ function zt() {
306
+ return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
307
+ }
308
+ function Ut(t) {
309
+ if (t == null && (t = 10), this.signum() == 0 || t < 2 || t > 36) return "0";
310
+ var i = this.chunkSize(t), e = Math.pow(t, i), r = S(e), o = u(), n = u(), h = "";
311
+ for (this.divRemTo(r, o, n); o.signum() > 0; )
312
+ h = (e + n.intValue()).toString(t).substr(1) + h, o.divRemTo(r, o, n);
313
+ return n.intValue().toString(t) + h;
314
+ }
315
+ function Gt(t, i) {
316
+ this.fromInt(0), i == null && (i = 10);
317
+ for (var e = this.chunkSize(i), r = Math.pow(i, e), o = !1, n = 0, h = 0, f = 0; f < t.length; ++f) {
318
+ var p = G(t, f);
319
+ if (p < 0) {
320
+ t.charAt(f) == "-" && this.signum() == 0 && (o = !0);
321
+ continue;
322
+ }
323
+ h = i * h + p, ++n >= e && (this.dMultiply(r), this.dAddOffset(h, 0), n = 0, h = 0);
324
+ }
325
+ n > 0 && (this.dMultiply(Math.pow(i, n)), this.dAddOffset(h, 0)), o && s.ZERO.subTo(this, this);
326
+ }
327
+ function Jt(t, i, e) {
328
+ if (typeof i == "number")
329
+ if (t < 2) this.fromInt(1);
330
+ else
331
+ for (this.fromNumber(t, e), this.testBit(t - 1) || this.bitwiseTo(s.ONE.shiftLeft(t - 1), F, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(i); )
332
+ this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(s.ONE.shiftLeft(t - 1), this);
333
+ else {
334
+ var r = new Array(), o = t & 7;
335
+ r.length = (t >> 3) + 1, i.nextBytes(r), o > 0 ? r[0] &= (1 << o) - 1 : r[0] = 0, this.fromString(r, 256);
336
+ }
337
+ }
338
+ function Xt() {
339
+ var t = this.t, i = new Array();
340
+ i[0] = this.s;
341
+ var e = this.DB - t * this.DB % 8, r, o = 0;
342
+ if (t-- > 0)
343
+ for (e < this.DB && (r = this[t] >> e) != (this.s & this.DM) >> e && (i[o++] = r | this.s << this.DB - e); t >= 0; )
344
+ e < 8 ? (r = (this[t] & (1 << e) - 1) << 8 - e, r |= this[--t] >> (e += this.DB - 8)) : (r = this[t] >> (e -= 8) & 255, e <= 0 && (e += this.DB, --t)), (r & 128) != 0 && (r |= -256), o == 0 && (this.s & 128) != (r & 128) && ++o, (o > 0 || r != this.s) && (i[o++] = r);
345
+ return i;
346
+ }
347
+ function $t(t) {
348
+ return this.compareTo(t) == 0;
349
+ }
350
+ function Ht(t) {
351
+ return this.compareTo(t) < 0 ? this : t;
352
+ }
353
+ function Kt(t) {
354
+ return this.compareTo(t) > 0 ? this : t;
355
+ }
356
+ function Qt(t, i, e) {
357
+ var r, o, n = Math.min(t.t, this.t);
358
+ for (r = 0; r < n; ++r) e[r] = i(this[r], t[r]);
359
+ if (t.t < this.t) {
360
+ for (o = t.s & this.DM, r = n; r < this.t; ++r) e[r] = i(this[r], o);
361
+ e.t = this.t;
362
+ } else {
363
+ for (o = this.s & this.DM, r = n; r < t.t; ++r) e[r] = i(o, t[r]);
364
+ e.t = t.t;
365
+ }
366
+ e.s = i(this.s, t.s), e.clamp();
367
+ }
368
+ function Wt(t, i) {
369
+ return t & i;
370
+ }
371
+ function Yt(t) {
372
+ var i = u();
373
+ return this.bitwiseTo(t, Wt, i), i;
374
+ }
375
+ function F(t, i) {
376
+ return t | i;
377
+ }
378
+ function xt(t) {
379
+ var i = u();
380
+ return this.bitwiseTo(t, F, i), i;
381
+ }
382
+ function J(t, i) {
383
+ return t ^ i;
384
+ }
385
+ function ti(t) {
386
+ var i = u();
387
+ return this.bitwiseTo(t, J, i), i;
388
+ }
389
+ function X(t, i) {
390
+ return t & ~i;
391
+ }
392
+ function ii(t) {
393
+ var i = u();
394
+ return this.bitwiseTo(t, X, i), i;
395
+ }
396
+ function ei() {
397
+ for (var t = u(), i = 0; i < this.t; ++i) t[i] = this.DM & ~this[i];
398
+ return t.t = this.t, t.s = ~this.s, t;
399
+ }
400
+ function ri(t) {
401
+ var i = u();
402
+ return t < 0 ? this.rShiftTo(-t, i) : this.lShiftTo(t, i), i;
403
+ }
404
+ function oi(t) {
405
+ var i = u();
406
+ return t < 0 ? this.lShiftTo(-t, i) : this.rShiftTo(t, i), i;
407
+ }
408
+ function si(t) {
409
+ if (t == 0) return -1;
410
+ var i = 0;
411
+ return (t & 65535) == 0 && (t >>= 16, i += 16), (t & 255) == 0 && (t >>= 8, i += 8), (t & 15) == 0 && (t >>= 4, i += 4), (t & 3) == 0 && (t >>= 2, i += 2), (t & 1) == 0 && ++i, i;
412
+ }
413
+ function ni() {
414
+ for (var t = 0; t < this.t; ++t)
415
+ if (this[t] != 0) return t * this.DB + si(this[t]);
416
+ return this.s < 0 ? this.t * this.DB : -1;
417
+ }
418
+ function hi(t) {
419
+ for (var i = 0; t != 0; )
420
+ t &= t - 1, ++i;
421
+ return i;
422
+ }
423
+ function fi() {
424
+ for (var t = 0, i = this.s & this.DM, e = 0; e < this.t; ++e) t += hi(this[e] ^ i);
425
+ return t;
426
+ }
427
+ function ui(t) {
428
+ var i = Math.floor(t / this.DB);
429
+ return i >= this.t ? this.s != 0 : (this[i] & 1 << t % this.DB) != 0;
430
+ }
431
+ function pi(t, i) {
432
+ var e = s.ONE.shiftLeft(t);
433
+ return this.bitwiseTo(e, i, e), e;
434
+ }
435
+ function ai(t) {
436
+ return this.changeBit(t, F);
437
+ }
438
+ function li(t) {
439
+ return this.changeBit(t, X);
440
+ }
441
+ function ci(t) {
442
+ return this.changeBit(t, J);
443
+ }
444
+ function vi(t, i) {
445
+ for (var e = 0, r = 0, o = Math.min(t.t, this.t); e < o; )
446
+ r += this[e] + t[e], i[e++] = r & this.DM, r >>= this.DB;
447
+ if (t.t < this.t) {
448
+ for (r += t.s; e < this.t; )
449
+ r += this[e], i[e++] = r & this.DM, r >>= this.DB;
450
+ r += this.s;
451
+ } else {
452
+ for (r += this.s; e < t.t; )
453
+ r += t[e], i[e++] = r & this.DM, r >>= this.DB;
454
+ r += t.s;
455
+ }
456
+ i.s = r < 0 ? -1 : 0, r > 0 ? i[e++] = r : r < -1 && (i[e++] = this.DV + r), i.t = e, i.clamp();
457
+ }
458
+ function mi(t) {
459
+ var i = u();
460
+ return this.addTo(t, i), i;
461
+ }
462
+ function Ti(t) {
463
+ var i = u();
464
+ return this.subTo(t, i), i;
465
+ }
466
+ function yi(t) {
467
+ var i = u();
468
+ return this.multiplyTo(t, i), i;
469
+ }
470
+ function di() {
471
+ var t = u();
472
+ return this.squareTo(t), t;
473
+ }
474
+ function bi(t) {
475
+ var i = u();
476
+ return this.divRemTo(t, i, null), i;
477
+ }
478
+ function wi(t) {
479
+ var i = u();
480
+ return this.divRemTo(t, null, i), i;
481
+ }
482
+ function gi(t) {
483
+ var i = u(), e = u();
484
+ return this.divRemTo(t, i, e), new Array(i, e);
485
+ }
486
+ function Di(t) {
487
+ this[this.t] = this.am(0, t - 1, this, 0, 0, this.t), ++this.t, this.clamp();
488
+ }
489
+ function Si(t, i) {
490
+ if (t != 0) {
491
+ for (; this.t <= i; ) this[this.t++] = 0;
492
+ for (this[i] += t; this[i] >= this.DV; )
493
+ this[i] -= this.DV, ++i >= this.t && (this[this.t++] = 0), ++this[i];
494
+ }
495
+ }
496
+ function O() {
497
+ }
498
+ function $(t) {
499
+ return t;
500
+ }
501
+ function Bi(t, i, e) {
502
+ t.multiplyTo(i, e);
503
+ }
504
+ function Mi(t, i) {
505
+ t.squareTo(i);
506
+ }
507
+ O.prototype.convert = $, O.prototype.revert = $, O.prototype.mulTo = Bi, O.prototype.sqrTo = Mi;
508
+ function Ri(t) {
509
+ return this.exp(t, new O());
510
+ }
511
+ function Ei(t, i, e) {
512
+ var r = Math.min(this.t + t.t, i);
513
+ for (e.s = 0, e.t = r; r > 0; ) e[--r] = 0;
514
+ var o;
515
+ for (o = e.t - this.t; r < o; ++r) e[r + this.t] = this.am(0, t[r], e, r, 0, this.t);
516
+ for (o = Math.min(t.t, i); r < o; ++r) this.am(0, t[r], e, r, 0, i - r);
517
+ e.clamp();
518
+ }
519
+ function Ai(t, i, e) {
520
+ --i;
521
+ var r = e.t = this.t + t.t - i;
522
+ for (e.s = 0; --r >= 0; ) e[r] = 0;
523
+ for (r = Math.max(i - this.t, 0); r < t.t; ++r)
524
+ e[this.t + r - i] = this.am(i - r, t[r], e, 0, 0, this.t + r - i);
525
+ e.clamp(), e.drShiftTo(1, e);
526
+ }
527
+ function E(t) {
528
+ this.r2 = u(), this.q3 = u(), s.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t), this.m = t;
529
+ }
530
+ function Oi(t) {
531
+ if (t.s < 0 || t.t > 2 * this.m.t) return t.mod(this.m);
532
+ if (t.compareTo(this.m) < 0) return t;
533
+ var i = u();
534
+ return t.copyTo(i), this.reduce(i), i;
535
+ }
536
+ function Ni(t) {
537
+ return t;
538
+ }
539
+ function Vi(t) {
540
+ for (t.drShiftTo(this.m.t - 1, this.r2), t.t > this.m.t + 1 && (t.t = this.m.t + 1, t.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); t.compareTo(this.r2) < 0; ) t.dAddOffset(1, this.m.t + 1);
541
+ for (t.subTo(this.r2, t); t.compareTo(this.m) >= 0; ) t.subTo(this.m, t);
542
+ }
543
+ function Ii(t, i) {
544
+ t.squareTo(i), this.reduce(i);
545
+ }
546
+ function _i(t, i, e) {
547
+ t.multiplyTo(i, e), this.reduce(e);
548
+ }
549
+ E.prototype.convert = Oi, E.prototype.revert = Ni, E.prototype.reduce = Vi, E.prototype.mulTo = _i, E.prototype.sqrTo = Ii;
550
+ function qi(t, i) {
551
+ var e = t.bitLength(), r, o = S(1), n;
552
+ if (e <= 0) return o;
553
+ e < 18 ? r = 1 : e < 48 ? r = 3 : e < 144 ? r = 4 : e < 768 ? r = 5 : r = 6, e < 8 ? n = new M(i) : i.isEven() ? n = new E(i) : n = new R(i);
554
+ var h = new Array(), f = 3, p = r - 1, l = (1 << r) - 1;
555
+ if (h[1] = n.convert(this), r > 1) {
556
+ var y = u();
557
+ for (n.sqrTo(h[1], y); f <= l; )
558
+ h[f] = u(), n.mulTo(y, h[f - 2], h[f]), f += 2;
559
+ }
560
+ var m = t.t - 1, g, _ = !0, b = u(), w;
561
+ for (e = V(t[m]) - 1; m >= 0; ) {
562
+ for (e >= p ? g = t[m] >> e - p & l : (g = (t[m] & (1 << e + 1) - 1) << p - e, m > 0 && (g |= t[m - 1] >> this.DB + e - p)), f = r; (g & 1) == 0; )
563
+ g >>= 1, --f;
564
+ if ((e -= f) < 0 && (e += this.DB, --m), _)
565
+ h[g].copyTo(o), _ = !1;
566
+ else {
567
+ for (; f > 1; )
568
+ n.sqrTo(o, b), n.sqrTo(b, o), f -= 2;
569
+ f > 0 ? n.sqrTo(o, b) : (w = o, o = b, b = w), n.mulTo(b, h[g], o);
570
+ }
571
+ for (; m >= 0 && (t[m] & 1 << e) == 0; )
572
+ n.sqrTo(o, b), w = o, o = b, b = w, --e < 0 && (e = this.DB - 1, --m);
573
+ }
574
+ return n.revert(o);
575
+ }
576
+ function Ci(t) {
577
+ var i = this.s < 0 ? this.negate() : this.clone(), e = t.s < 0 ? t.negate() : t.clone();
578
+ if (i.compareTo(e) < 0) {
579
+ var r = i;
580
+ i = e, e = r;
581
+ }
582
+ var o = i.getLowestSetBit(), n = e.getLowestSetBit();
583
+ if (n < 0) return i;
584
+ for (o < n && (n = o), n > 0 && (i.rShiftTo(n, i), e.rShiftTo(n, e)); i.signum() > 0; )
585
+ (o = i.getLowestSetBit()) > 0 && i.rShiftTo(o, i), (o = e.getLowestSetBit()) > 0 && e.rShiftTo(o, e), i.compareTo(e) >= 0 ? (i.subTo(e, i), i.rShiftTo(1, i)) : (e.subTo(i, e), e.rShiftTo(1, e));
586
+ return n > 0 && e.lShiftTo(n, e), e;
587
+ }
588
+ function Li(t) {
589
+ if (t <= 0) return 0;
590
+ var i = this.DV % t, e = this.s < 0 ? t - 1 : 0;
591
+ if (this.t > 0)
592
+ if (i == 0) e = this[0] % t;
593
+ else for (var r = this.t - 1; r >= 0; --r) e = (i * e + this[r]) % t;
594
+ return e;
595
+ }
596
+ function Fi(t) {
597
+ var i = t.isEven();
598
+ if (this.isEven() && i || t.signum() == 0) return s.ZERO;
599
+ for (var e = t.clone(), r = this.clone(), o = S(1), n = S(0), h = S(0), f = S(1); e.signum() != 0; ) {
600
+ for (; e.isEven(); )
601
+ e.rShiftTo(1, e), i ? ((!o.isEven() || !n.isEven()) && (o.addTo(this, o), n.subTo(t, n)), o.rShiftTo(1, o)) : n.isEven() || n.subTo(t, n), n.rShiftTo(1, n);
602
+ for (; r.isEven(); )
603
+ r.rShiftTo(1, r), i ? ((!h.isEven() || !f.isEven()) && (h.addTo(this, h), f.subTo(t, f)), h.rShiftTo(1, h)) : f.isEven() || f.subTo(t, f), f.rShiftTo(1, f);
604
+ e.compareTo(r) >= 0 ? (e.subTo(r, e), i && o.subTo(h, o), n.subTo(f, n)) : (r.subTo(e, r), i && h.subTo(o, h), f.subTo(n, f));
605
+ }
606
+ if (r.compareTo(s.ONE) != 0) return s.ZERO;
607
+ if (f.compareTo(t) >= 0) return f.subtract(t);
608
+ if (f.signum() < 0) f.addTo(t, f);
609
+ else return f;
610
+ return f.signum() < 0 ? f.add(t) : f;
611
+ }
612
+ var c = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], Pi = (1 << 26) / c[c.length - 1];
613
+ function ki(t) {
614
+ var i, e = this.abs();
615
+ if (e.t == 1 && e[0] <= c[c.length - 1]) {
616
+ for (i = 0; i < c.length; ++i)
617
+ if (e[0] == c[i]) return !0;
618
+ return !1;
619
+ }
620
+ if (e.isEven()) return !1;
621
+ for (i = 1; i < c.length; ) {
622
+ for (var r = c[i], o = i + 1; o < c.length && r < Pi; ) r *= c[o++];
623
+ for (r = e.modInt(r); i < o; ) if (r % c[i++] == 0) return !1;
624
+ }
625
+ return e.millerRabin(t);
626
+ }
627
+ function Zi(t) {
628
+ var i = this.subtract(s.ONE), e = i.getLowestSetBit();
629
+ if (e <= 0) return !1;
630
+ var r = i.shiftRight(e);
631
+ t = t + 1 >> 1, t > c.length && (t = c.length);
632
+ for (var o = u(), n = 0; n < t; ++n) {
633
+ o.fromInt(c[Math.floor(Math.random() * c.length)]);
634
+ var h = o.modPow(r, this);
635
+ if (h.compareTo(s.ONE) != 0 && h.compareTo(i) != 0) {
636
+ for (var f = 1; f++ < e && h.compareTo(i) != 0; )
637
+ if (h = h.modPowInt(2, this), h.compareTo(s.ONE) == 0) return !1;
638
+ if (h.compareTo(i) != 0) return !1;
639
+ }
640
+ }
641
+ return !0;
642
+ }
643
+ s.prototype.chunkSize = jt, s.prototype.toRadix = Ut, s.prototype.fromRadix = Gt, s.prototype.fromNumber = Jt, s.prototype.bitwiseTo = Qt, s.prototype.changeBit = pi, s.prototype.addTo = vi, s.prototype.dMultiply = Di, s.prototype.dAddOffset = Si, s.prototype.multiplyLowerTo = Ei, s.prototype.multiplyUpperTo = Ai, s.prototype.modInt = Li, s.prototype.millerRabin = Zi, s.prototype.clone = Ft, s.prototype.intValue = Pt, s.prototype.byteValue = kt, s.prototype.shortValue = Zt, s.prototype.signum = zt, s.prototype.toByteArray = Xt, s.prototype.equals = $t, s.prototype.min = Ht, s.prototype.max = Kt, s.prototype.and = Yt, s.prototype.or = xt, s.prototype.xor = ti, s.prototype.andNot = ii, s.prototype.not = ei, s.prototype.shiftLeft = ri, s.prototype.shiftRight = oi, s.prototype.getLowestSetBit = ni, s.prototype.bitCount = fi, s.prototype.testBit = ui, s.prototype.setBit = ai, s.prototype.clearBit = li, s.prototype.flipBit = ci, s.prototype.add = mi, s.prototype.subtract = Ti, s.prototype.multiply = yi, s.prototype.divide = bi, s.prototype.remainder = wi, s.prototype.divideAndRemainder = gi, s.prototype.modPow = qi, s.prototype.modInverse = Fi, s.prototype.pow = Ri, s.prototype.gcd = Ci, s.prototype.isProbablePrime = ki, s.prototype.square = di, s.prototype.Barrett = E;
644
+ var I, v, a;
645
+ function ji(t) {
646
+ v[a++] ^= t & 255, v[a++] ^= t >> 8 & 255, v[a++] ^= t >> 16 & 255, v[a++] ^= t >> 24 & 255, a >= k && (a -= k);
647
+ }
648
+ function H() {
649
+ ji((/* @__PURE__ */ new Date()).getTime());
650
+ }
651
+ if (v == null) {
652
+ v = new Array(), a = 0;
653
+ var d;
654
+ if (typeof window < "u" && window.crypto) {
655
+ if (window.crypto.getRandomValues) {
656
+ var K = new Uint8Array(32);
657
+ for (window.crypto.getRandomValues(K), d = 0; d < 32; ++d)
658
+ v[a++] = K[d];
659
+ } else if (navigator.appName == "Netscape" && navigator.appVersion < "5") {
660
+ var Q = window.crypto.random(32);
661
+ for (d = 0; d < Q.length; ++d)
662
+ v[a++] = Q.charCodeAt(d) & 255;
663
+ }
664
+ }
665
+ for (; a < k; )
666
+ d = Math.floor(65536 * Math.random()), v[a++] = d >>> 8, v[a++] = d & 255;
667
+ a = 0, H();
668
+ }
669
+ function zi() {
670
+ if (I == null) {
671
+ for (H(), I = Xi(), I.init(v), a = 0; a < v.length; ++a)
672
+ v[a] = 0;
673
+ a = 0;
674
+ }
675
+ return I.next();
676
+ }
677
+ function Ui(t) {
678
+ var i;
679
+ for (i = 0; i < t.length; ++i) t[i] = zi();
680
+ }
681
+ function W() {
682
+ }
683
+ W.prototype.nextBytes = Ui;
684
+ function P() {
685
+ this.i = 0, this.j = 0, this.S = new Array();
686
+ }
687
+ function Gi(t) {
688
+ var i, e, r;
689
+ for (i = 0; i < 256; ++i)
690
+ this.S[i] = i;
691
+ for (e = 0, i = 0; i < 256; ++i)
692
+ e = e + this.S[i] + t[i % t.length] & 255, r = this.S[i], this.S[i] = this.S[e], this.S[e] = r;
693
+ this.i = 0, this.j = 0;
694
+ }
695
+ function Ji() {
696
+ var t;
697
+ return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, t = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = t, this.S[t + this.S[this.i] & 255];
698
+ }
699
+ P.prototype.init = Gi, P.prototype.next = Ji;
700
+ function Xi() {
701
+ return new P();
702
+ }
703
+ var k = 256;
704
+ x.exports = {
705
+ default: s,
706
+ BigInteger: s,
707
+ SecureRandom: W
708
+ };
709
+ }).call($i);
710
+ }(C), C.exports);
711
+ }
712
+ export {
713
+ Qi as __require
714
+ };