@dazhicheng/ui 1.5.26 → 1.5.27

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.
@@ -0,0 +1,2984 @@
1
+ var j = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
+ function lt(e) {
3
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
4
+ }
5
+ function ht(e) {
6
+ if (e.__esModule) return e;
7
+ var n = e.default;
8
+ if (typeof n == "function") {
9
+ var r = function t() {
10
+ return this instanceof t ? Reflect.construct(n, arguments, this.constructor) : n.apply(this, arguments);
11
+ };
12
+ r.prototype = n.prototype;
13
+ } else r = {};
14
+ return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(e).forEach(function(t) {
15
+ var s = Object.getOwnPropertyDescriptor(e, t);
16
+ Object.defineProperty(r, t, s.get ? s : {
17
+ enumerable: !0,
18
+ get: function() {
19
+ return e[t];
20
+ }
21
+ });
22
+ }), r;
23
+ }
24
+ var Qe = { exports: {} };
25
+ (function(e, n) {
26
+ (function(r, t) {
27
+ e.exports = t();
28
+ })(j, function() {
29
+ var r = 1e3, t = 6e4, s = 36e5, i = "millisecond", a = "second", u = "minute", f = "hour", o = "day", c = "week", h = "month", l = "quarter", m = "year", $ = "date", p = "Invalid Date", N = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, z = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, g = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) {
30
+ var x = ["th", "st", "nd", "rd"], y = M % 100;
31
+ return "[" + M + (x[(y - 20) % 10] || x[y] || x[0]) + "]";
32
+ } }, d = function(M, x, y) {
33
+ var T = String(M);
34
+ return !T || T.length >= x ? M : "" + Array(x + 1 - T.length).join(y) + M;
35
+ }, _ = { s: d, z: function(M) {
36
+ var x = -M.utcOffset(), y = Math.abs(x), T = Math.floor(y / 60), H = y % 60;
37
+ return (x <= 0 ? "+" : "-") + d(T, 2, "0") + ":" + d(H, 2, "0");
38
+ }, m: function M(x, y) {
39
+ if (x.date() < y.date()) return -M(y, x);
40
+ var T = 12 * (y.year() - x.year()) + (y.month() - x.month()), H = x.clone().add(T, h), I = y - H < 0, R = x.clone().add(T + (I ? -1 : 1), h);
41
+ return +(-(T + (y - H) / (I ? H - R : R - H)) || 0);
42
+ }, a: function(M) {
43
+ return M < 0 ? Math.ceil(M) || 0 : Math.floor(M);
44
+ }, p: function(M) {
45
+ return { M: h, y: m, w: c, d: o, D: $, h: f, m: u, s: a, ms: i, Q: l }[M] || String(M || "").toLowerCase().replace(/s$/, "");
46
+ }, u: function(M) {
47
+ return M === void 0;
48
+ } }, B = "en", O = {};
49
+ O[B] = g;
50
+ var P = "$isDayjsObject", U = function(M) {
51
+ return M instanceof A || !(!M || !M[P]);
52
+ }, q = function M(x, y, T) {
53
+ var H;
54
+ if (!x) return B;
55
+ if (typeof x == "string") {
56
+ var I = x.toLowerCase();
57
+ O[I] && (H = I), y && (O[I] = y, H = I);
58
+ var R = x.split("-");
59
+ if (!H && R.length > 1) return M(R[0]);
60
+ } else {
61
+ var C = x.name;
62
+ O[C] = x, H = C;
63
+ }
64
+ return !T && H && (B = H), H || !T && B;
65
+ }, v = function(M, x) {
66
+ if (U(M)) return M.clone();
67
+ var y = typeof x == "object" ? x : {};
68
+ return y.date = M, y.args = arguments, new A(y);
69
+ }, w = _;
70
+ w.l = q, w.i = U, w.w = function(M, x) {
71
+ return v(M, { locale: x.$L, utc: x.$u, x: x.$x, $offset: x.$offset });
72
+ };
73
+ var A = function() {
74
+ function M(y) {
75
+ this.$L = q(y.locale, null, !0), this.parse(y), this.$x = this.$x || y.x || {}, this[P] = !0;
76
+ }
77
+ var x = M.prototype;
78
+ return x.parse = function(y) {
79
+ this.$d = function(T) {
80
+ var H = T.date, I = T.utc;
81
+ if (H === null) return /* @__PURE__ */ new Date(NaN);
82
+ if (w.u(H)) return /* @__PURE__ */ new Date();
83
+ if (H instanceof Date) return new Date(H);
84
+ if (typeof H == "string" && !/Z$/i.test(H)) {
85
+ var R = H.match(N);
86
+ if (R) {
87
+ var C = R[2] - 1 || 0, S = (R[7] || "0").substring(0, 3);
88
+ return I ? new Date(Date.UTC(R[1], C, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, S)) : new Date(R[1], C, R[3] || 1, R[4] || 0, R[5] || 0, R[6] || 0, S);
89
+ }
90
+ }
91
+ return new Date(H);
92
+ }(y), this.init();
93
+ }, x.init = function() {
94
+ var y = this.$d;
95
+ this.$y = y.getFullYear(), this.$M = y.getMonth(), this.$D = y.getDate(), this.$W = y.getDay(), this.$H = y.getHours(), this.$m = y.getMinutes(), this.$s = y.getSeconds(), this.$ms = y.getMilliseconds();
96
+ }, x.$utils = function() {
97
+ return w;
98
+ }, x.isValid = function() {
99
+ return this.$d.toString() !== p;
100
+ }, x.isSame = function(y, T) {
101
+ var H = v(y);
102
+ return this.startOf(T) <= H && H <= this.endOf(T);
103
+ }, x.isAfter = function(y, T) {
104
+ return v(y) < this.startOf(T);
105
+ }, x.isBefore = function(y, T) {
106
+ return this.endOf(T) < v(y);
107
+ }, x.$g = function(y, T, H) {
108
+ return w.u(y) ? this[T] : this.set(H, y);
109
+ }, x.unix = function() {
110
+ return Math.floor(this.valueOf() / 1e3);
111
+ }, x.valueOf = function() {
112
+ return this.$d.getTime();
113
+ }, x.startOf = function(y, T) {
114
+ var H = this, I = !!w.u(T) || T, R = w.p(y), C = function(ce, G) {
115
+ var ie = w.w(H.$u ? Date.UTC(H.$y, G, ce) : new Date(H.$y, G, ce), H);
116
+ return I ? ie : ie.endOf(o);
117
+ }, S = function(ce, G) {
118
+ return w.w(H.toDate()[ce].apply(H.toDate("s"), (I ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(G)), H);
119
+ }, E = this.$W, k = this.$M, J = this.$D, le = "set" + (this.$u ? "UTC" : "");
120
+ switch (R) {
121
+ case m:
122
+ return I ? C(1, 0) : C(31, 11);
123
+ case h:
124
+ return I ? C(1, k) : C(0, k + 1);
125
+ case c:
126
+ var fe = this.$locale().weekStart || 0, pe = (E < fe ? E + 7 : E) - fe;
127
+ return C(I ? J - pe : J + (6 - pe), k);
128
+ case o:
129
+ case $:
130
+ return S(le + "Hours", 0);
131
+ case f:
132
+ return S(le + "Minutes", 1);
133
+ case u:
134
+ return S(le + "Seconds", 2);
135
+ case a:
136
+ return S(le + "Milliseconds", 3);
137
+ default:
138
+ return this.clone();
139
+ }
140
+ }, x.endOf = function(y) {
141
+ return this.startOf(y, !1);
142
+ }, x.$set = function(y, T) {
143
+ var H, I = w.p(y), R = "set" + (this.$u ? "UTC" : ""), C = (H = {}, H[o] = R + "Date", H[$] = R + "Date", H[h] = R + "Month", H[m] = R + "FullYear", H[f] = R + "Hours", H[u] = R + "Minutes", H[a] = R + "Seconds", H[i] = R + "Milliseconds", H)[I], S = I === o ? this.$D + (T - this.$W) : T;
144
+ if (I === h || I === m) {
145
+ var E = this.clone().set($, 1);
146
+ E.$d[C](S), E.init(), this.$d = E.set($, Math.min(this.$D, E.daysInMonth())).$d;
147
+ } else C && this.$d[C](S);
148
+ return this.init(), this;
149
+ }, x.set = function(y, T) {
150
+ return this.clone().$set(y, T);
151
+ }, x.get = function(y) {
152
+ return this[w.p(y)]();
153
+ }, x.add = function(y, T) {
154
+ var H, I = this;
155
+ y = Number(y);
156
+ var R = w.p(T), C = function(k) {
157
+ var J = v(I);
158
+ return w.w(J.date(J.date() + Math.round(k * y)), I);
159
+ };
160
+ if (R === h) return this.set(h, this.$M + y);
161
+ if (R === m) return this.set(m, this.$y + y);
162
+ if (R === o) return C(1);
163
+ if (R === c) return C(7);
164
+ var S = (H = {}, H[u] = t, H[f] = s, H[a] = r, H)[R] || 1, E = this.$d.getTime() + y * S;
165
+ return w.w(E, this);
166
+ }, x.subtract = function(y, T) {
167
+ return this.add(-1 * y, T);
168
+ }, x.format = function(y) {
169
+ var T = this, H = this.$locale();
170
+ if (!this.isValid()) return H.invalidDate || p;
171
+ var I = y || "YYYY-MM-DDTHH:mm:ssZ", R = w.z(this), C = this.$H, S = this.$m, E = this.$M, k = H.weekdays, J = H.months, le = H.meridiem, fe = function(G, ie, ve, we) {
172
+ return G && (G[ie] || G(T, I)) || ve[ie].slice(0, we);
173
+ }, pe = function(G) {
174
+ return w.s(C % 12 || 12, G, "0");
175
+ }, ce = le || function(G, ie, ve) {
176
+ var we = G < 12 ? "AM" : "PM";
177
+ return ve ? we.toLowerCase() : we;
178
+ };
179
+ return I.replace(z, function(G, ie) {
180
+ return ie || function(ve) {
181
+ switch (ve) {
182
+ case "YY":
183
+ return String(T.$y).slice(-2);
184
+ case "YYYY":
185
+ return w.s(T.$y, 4, "0");
186
+ case "M":
187
+ return E + 1;
188
+ case "MM":
189
+ return w.s(E + 1, 2, "0");
190
+ case "MMM":
191
+ return fe(H.monthsShort, E, J, 3);
192
+ case "MMMM":
193
+ return fe(J, E);
194
+ case "D":
195
+ return T.$D;
196
+ case "DD":
197
+ return w.s(T.$D, 2, "0");
198
+ case "d":
199
+ return String(T.$W);
200
+ case "dd":
201
+ return fe(H.weekdaysMin, T.$W, k, 2);
202
+ case "ddd":
203
+ return fe(H.weekdaysShort, T.$W, k, 3);
204
+ case "dddd":
205
+ return k[T.$W];
206
+ case "H":
207
+ return String(C);
208
+ case "HH":
209
+ return w.s(C, 2, "0");
210
+ case "h":
211
+ return pe(1);
212
+ case "hh":
213
+ return pe(2);
214
+ case "a":
215
+ return ce(C, S, !0);
216
+ case "A":
217
+ return ce(C, S, !1);
218
+ case "m":
219
+ return String(S);
220
+ case "mm":
221
+ return w.s(S, 2, "0");
222
+ case "s":
223
+ return String(T.$s);
224
+ case "ss":
225
+ return w.s(T.$s, 2, "0");
226
+ case "SSS":
227
+ return w.s(T.$ms, 3, "0");
228
+ case "Z":
229
+ return R;
230
+ }
231
+ return null;
232
+ }(G) || R.replace(":", "");
233
+ });
234
+ }, x.utcOffset = function() {
235
+ return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
236
+ }, x.diff = function(y, T, H) {
237
+ var I, R = this, C = w.p(T), S = v(y), E = (S.utcOffset() - this.utcOffset()) * t, k = this - S, J = function() {
238
+ return w.m(R, S);
239
+ };
240
+ switch (C) {
241
+ case m:
242
+ I = J() / 12;
243
+ break;
244
+ case h:
245
+ I = J();
246
+ break;
247
+ case l:
248
+ I = J() / 3;
249
+ break;
250
+ case c:
251
+ I = (k - E) / 6048e5;
252
+ break;
253
+ case o:
254
+ I = (k - E) / 864e5;
255
+ break;
256
+ case f:
257
+ I = k / s;
258
+ break;
259
+ case u:
260
+ I = k / t;
261
+ break;
262
+ case a:
263
+ I = k / r;
264
+ break;
265
+ default:
266
+ I = k;
267
+ }
268
+ return H ? I : w.a(I);
269
+ }, x.daysInMonth = function() {
270
+ return this.endOf(h).$D;
271
+ }, x.$locale = function() {
272
+ return O[this.$L];
273
+ }, x.locale = function(y, T) {
274
+ if (!y) return this.$L;
275
+ var H = this.clone(), I = q(y, T, !0);
276
+ return I && (H.$L = I), H;
277
+ }, x.clone = function() {
278
+ return w.w(this.$d, this);
279
+ }, x.toDate = function() {
280
+ return new Date(this.valueOf());
281
+ }, x.toJSON = function() {
282
+ return this.isValid() ? this.toISOString() : null;
283
+ }, x.toISOString = function() {
284
+ return this.$d.toISOString();
285
+ }, x.toString = function() {
286
+ return this.$d.toUTCString();
287
+ }, M;
288
+ }(), b = A.prototype;
289
+ return v.prototype = b, [["$ms", i], ["$s", a], ["$m", u], ["$H", f], ["$W", o], ["$M", h], ["$y", m], ["$D", $]].forEach(function(M) {
290
+ b[M[1]] = function(x) {
291
+ return this.$g(x, M[0], M[1]);
292
+ };
293
+ }), v.extend = function(M, x) {
294
+ return M.$i || (M(x, A, v), M.$i = !0), v;
295
+ }, v.locale = q, v.isDayjs = U, v.unix = function(M) {
296
+ return v(1e3 * M);
297
+ }, v.en = O[B], v.Ls = O, v.p = {}, v;
298
+ });
299
+ })(Qe);
300
+ var dt = Qe.exports;
301
+ const pt = /* @__PURE__ */ lt(dt), vt = Object.prototype.toString;
302
+ function me(e, n) {
303
+ return vt.call(e) === `[object ${n}]`;
304
+ }
305
+ function gt(e) {
306
+ return typeof e < "u";
307
+ }
308
+ function mt(e) {
309
+ return !gt(e);
310
+ }
311
+ function wt(e) {
312
+ return e === null;
313
+ }
314
+ function Je(e) {
315
+ return mt(e) || wt(e);
316
+ }
317
+ function _t(e) {
318
+ return Je(e) ? !1 : e instanceof Promise ? !0 : me(e, "Object");
319
+ }
320
+ function kr(e) {
321
+ return Je(e) ? !0 : xt(e) || yt(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : _t(e) ? Object.keys(e).length === 0 : !1;
322
+ }
323
+ function Mr(e) {
324
+ return me(e, "Date");
325
+ }
326
+ function br(e) {
327
+ return me(e, "Number") && e === e;
328
+ }
329
+ function yt(e) {
330
+ return me(e, "String");
331
+ }
332
+ function Or(e) {
333
+ return typeof e == "function";
334
+ }
335
+ function Ar(e) {
336
+ return me(e, "Boolean");
337
+ }
338
+ function xt(e) {
339
+ return e && Array.isArray(e);
340
+ }
341
+ function zr(e) {
342
+ return typeof Element > "u" ? !1 : e instanceof Element;
343
+ }
344
+ function Hr(e) {
345
+ return pt.isDayjs(e);
346
+ }
347
+ var $t = { exports: {} };
348
+ (function(e, n) {
349
+ (function(r, t) {
350
+ e.exports = t();
351
+ })(j, function() {
352
+ var r = "minute", t = /[+-]\d\d(?::?\d\d)?/g, s = /([+-]|\d\d)/g;
353
+ return function(i, a, u) {
354
+ var f = a.prototype;
355
+ u.utc = function(p) {
356
+ var N = { date: p, utc: !0, args: arguments };
357
+ return new a(N);
358
+ }, f.utc = function(p) {
359
+ var N = u(this.toDate(), { locale: this.$L, utc: !0 });
360
+ return p ? N.add(this.utcOffset(), r) : N;
361
+ }, f.local = function() {
362
+ return u(this.toDate(), { locale: this.$L, utc: !1 });
363
+ };
364
+ var o = f.parse;
365
+ f.parse = function(p) {
366
+ p.utc && (this.$u = !0), this.$utils().u(p.$offset) || (this.$offset = p.$offset), o.call(this, p);
367
+ };
368
+ var c = f.init;
369
+ f.init = function() {
370
+ if (this.$u) {
371
+ var p = this.$d;
372
+ this.$y = p.getUTCFullYear(), this.$M = p.getUTCMonth(), this.$D = p.getUTCDate(), this.$W = p.getUTCDay(), this.$H = p.getUTCHours(), this.$m = p.getUTCMinutes(), this.$s = p.getUTCSeconds(), this.$ms = p.getUTCMilliseconds();
373
+ } else c.call(this);
374
+ };
375
+ var h = f.utcOffset;
376
+ f.utcOffset = function(p, N) {
377
+ var z = this.$utils().u;
378
+ if (z(p)) return this.$u ? 0 : z(this.$offset) ? h.call(this) : this.$offset;
379
+ if (typeof p == "string" && (p = function(B) {
380
+ B === void 0 && (B = "");
381
+ var O = B.match(t);
382
+ if (!O) return null;
383
+ var P = ("" + O[0]).match(s) || ["-", 0, 0], U = P[0], q = 60 * +P[1] + +P[2];
384
+ return q === 0 ? 0 : U === "+" ? q : -q;
385
+ }(p), p === null)) return this;
386
+ var g = Math.abs(p) <= 16 ? 60 * p : p;
387
+ if (g === 0) return this.utc(N);
388
+ var d = this.clone();
389
+ if (N) return d.$offset = g, d.$u = !1, d;
390
+ var _ = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
391
+ return (d = this.local().add(g + _, r)).$offset = g, d.$x.$localOffset = _, d;
392
+ };
393
+ var l = f.format;
394
+ f.format = function(p) {
395
+ var N = p || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
396
+ return l.call(this, N);
397
+ }, f.valueOf = function() {
398
+ var p = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
399
+ return this.$d.valueOf() - 6e4 * p;
400
+ }, f.isUTC = function() {
401
+ return !!this.$u;
402
+ }, f.toISOString = function() {
403
+ return this.toDate().toISOString();
404
+ }, f.toString = function() {
405
+ return this.toDate().toUTCString();
406
+ };
407
+ var m = f.toDate;
408
+ f.toDate = function(p) {
409
+ return p === "s" && this.$offset ? u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : m.call(this);
410
+ };
411
+ var $ = f.diff;
412
+ f.diff = function(p, N, z) {
413
+ if (p && this.$u === p.$u) return $.call(this, p, N, z);
414
+ var g = this.local(), d = u(p).local();
415
+ return $.call(g, d, N, z);
416
+ };
417
+ };
418
+ });
419
+ })($t);
420
+ var Ct = { exports: {} };
421
+ (function(e, n) {
422
+ (function(r, t) {
423
+ e.exports = t();
424
+ })(j, function() {
425
+ var r = { year: 0, month: 1, day: 2, hour: 3, minute: 4, second: 5 }, t = {};
426
+ return function(s, i, a) {
427
+ var u, f = function(l, m, $) {
428
+ $ === void 0 && ($ = {});
429
+ var p = new Date(l), N = function(z, g) {
430
+ g === void 0 && (g = {});
431
+ var d = g.timeZoneName || "short", _ = z + "|" + d, B = t[_];
432
+ return B || (B = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: z, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: d }), t[_] = B), B;
433
+ }(m, $);
434
+ return N.formatToParts(p);
435
+ }, o = function(l, m) {
436
+ for (var $ = f(l, m), p = [], N = 0; N < $.length; N += 1) {
437
+ var z = $[N], g = z.type, d = z.value, _ = r[g];
438
+ _ >= 0 && (p[_] = parseInt(d, 10));
439
+ }
440
+ var B = p[3], O = B === 24 ? 0 : B, P = p[0] + "-" + p[1] + "-" + p[2] + " " + O + ":" + p[4] + ":" + p[5] + ":000", U = +l;
441
+ return (a.utc(P).valueOf() - (U -= U % 1e3)) / 6e4;
442
+ }, c = i.prototype;
443
+ c.tz = function(l, m) {
444
+ l === void 0 && (l = u);
445
+ var $, p = this.utcOffset(), N = this.toDate(), z = N.toLocaleString("en-US", { timeZone: l }), g = Math.round((N - new Date(z)) / 1e3 / 60), d = 15 * -Math.round(N.getTimezoneOffset() / 15) - g;
446
+ if (!Number(d)) $ = this.utcOffset(0, m);
447
+ else if ($ = a(z, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(d, !0), m) {
448
+ var _ = $.utcOffset();
449
+ $ = $.add(p - _, "minute");
450
+ }
451
+ return $.$x.$timezone = l, $;
452
+ }, c.offsetName = function(l) {
453
+ var m = this.$x.$timezone || a.tz.guess(), $ = f(this.valueOf(), m, { timeZoneName: l }).find(function(p) {
454
+ return p.type.toLowerCase() === "timezonename";
455
+ });
456
+ return $ && $.value;
457
+ };
458
+ var h = c.startOf;
459
+ c.startOf = function(l, m) {
460
+ if (!this.$x || !this.$x.$timezone) return h.call(this, l, m);
461
+ var $ = a(this.format("YYYY-MM-DD HH:mm:ss:SSS"), { locale: this.$L });
462
+ return h.call($, l, m).tz(this.$x.$timezone, !0);
463
+ }, a.tz = function(l, m, $) {
464
+ var p = $ && m, N = $ || m || u, z = o(+a(), N);
465
+ if (typeof l != "string") return a(l).tz(N);
466
+ var g = function(O, P, U) {
467
+ var q = O - 60 * P * 1e3, v = o(q, U);
468
+ if (P === v) return [q, P];
469
+ var w = o(q -= 60 * (v - P) * 1e3, U);
470
+ return v === w ? [q, v] : [O - 60 * Math.min(v, w) * 1e3, Math.max(v, w)];
471
+ }(a.utc(l, p).valueOf(), z, N), d = g[0], _ = g[1], B = a(d).utcOffset(_);
472
+ return B.$x.$timezone = N, B;
473
+ }, a.tz.guess = function() {
474
+ return Intl.DateTimeFormat().resolvedOptions().timeZone;
475
+ }, a.tz.setDefault = function(l) {
476
+ u = l;
477
+ };
478
+ };
479
+ });
480
+ })(Ct);
481
+ /*!
482
+ * decimal.js v10.6.0
483
+ * An arbitrary-precision Decimal type for JavaScript.
484
+ * https://github.com/MikeMcl/decimal.js
485
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
486
+ * MIT Licence
487
+ */
488
+ var he = 9e15, ue = 1e9, He = "0123456789abcdef", xe = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", $e = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", Te = {
489
+ // These values must be integers within the stated ranges (inclusive).
490
+ // Most of these values can be changed at run-time using the `Decimal.config` method.
491
+ // The maximum number of significant digits of the result of a calculation or base conversion.
492
+ // E.g. `Decimal.config({ precision: 20 });`
493
+ precision: 20,
494
+ // 1 to MAX_DIGITS
495
+ // The rounding mode used when rounding to `precision`.
496
+ //
497
+ // ROUND_UP 0 Away from zero.
498
+ // ROUND_DOWN 1 Towards zero.
499
+ // ROUND_CEIL 2 Towards +Infinity.
500
+ // ROUND_FLOOR 3 Towards -Infinity.
501
+ // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.
502
+ // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.
503
+ // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.
504
+ // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.
505
+ // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.
506
+ //
507
+ // E.g.
508
+ // `Decimal.rounding = 4;`
509
+ // `Decimal.rounding = Decimal.ROUND_HALF_UP;`
510
+ rounding: 4,
511
+ // 0 to 8
512
+ // The modulo mode used when calculating the modulus: a mod n.
513
+ // The quotient (q = a / n) is calculated according to the corresponding rounding mode.
514
+ // The remainder (r) is calculated as: r = a - n * q.
515
+ //
516
+ // UP 0 The remainder is positive if the dividend is negative, else is negative.
517
+ // DOWN 1 The remainder has the same sign as the dividend (JavaScript %).
518
+ // FLOOR 3 The remainder has the same sign as the divisor (Python %).
519
+ // HALF_EVEN 6 The IEEE 754 remainder function.
520
+ // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.
521
+ //
522
+ // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian
523
+ // division (9) are commonly used for the modulus operation. The other rounding modes can also
524
+ // be used, but they may not give useful results.
525
+ modulo: 1,
526
+ // 0 to 9
527
+ // The exponent value at and beneath which `toString` returns exponential notation.
528
+ // JavaScript numbers: -7
529
+ toExpNeg: -7,
530
+ // 0 to -EXP_LIMIT
531
+ // The exponent value at and above which `toString` returns exponential notation.
532
+ // JavaScript numbers: 21
533
+ toExpPos: 21,
534
+ // 0 to EXP_LIMIT
535
+ // The minimum exponent value, beneath which underflow to zero occurs.
536
+ // JavaScript numbers: -324 (5e-324)
537
+ minE: -he,
538
+ // -1 to -EXP_LIMIT
539
+ // The maximum exponent value, above which overflow to Infinity occurs.
540
+ // JavaScript numbers: 308 (1.7976931348623157e+308)
541
+ maxE: he,
542
+ // 1 to EXP_LIMIT
543
+ // Whether to use cryptographically-secure random number generation, if available.
544
+ crypto: !1
545
+ // true/false
546
+ }, Xe, ne, W = !0, Ne = "[DecimalError] ", ae = Ne + "Invalid argument: ", et = Ne + "Precision limit exceeded", tt = Ne + "crypto unavailable", rt = "[object Decimal]", K = Math.floor, Y = Math.pow, Nt = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Dt = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, St = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, nt = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, X = 1e7, L = 7, Bt = 9007199254740991, Et = xe.length - 1, Pe = $e.length - 1, D = { toStringTag: rt };
547
+ D.absoluteValue = D.abs = function() {
548
+ var e = new this.constructor(this);
549
+ return e.s < 0 && (e.s = 1), F(e);
550
+ };
551
+ D.ceil = function() {
552
+ return F(new this.constructor(this), this.e + 1, 2);
553
+ };
554
+ D.clampedTo = D.clamp = function(e, n) {
555
+ var r, t = this, s = t.constructor;
556
+ if (e = new s(e), n = new s(n), !e.s || !n.s) return new s(NaN);
557
+ if (e.gt(n)) throw Error(ae + n);
558
+ return r = t.cmp(e), r < 0 ? e : t.cmp(n) > 0 ? n : new s(t);
559
+ };
560
+ D.comparedTo = D.cmp = function(e) {
561
+ var n, r, t, s, i = this, a = i.d, u = (e = new i.constructor(e)).d, f = i.s, o = e.s;
562
+ if (!a || !u)
563
+ return !f || !o ? NaN : f !== o ? f : a === u ? 0 : !a ^ f < 0 ? 1 : -1;
564
+ if (!a[0] || !u[0]) return a[0] ? f : u[0] ? -o : 0;
565
+ if (f !== o) return f;
566
+ if (i.e !== e.e) return i.e > e.e ^ f < 0 ? 1 : -1;
567
+ for (t = a.length, s = u.length, n = 0, r = t < s ? t : s; n < r; ++n)
568
+ if (a[n] !== u[n]) return a[n] > u[n] ^ f < 0 ? 1 : -1;
569
+ return t === s ? 0 : t > s ^ f < 0 ? 1 : -1;
570
+ };
571
+ D.cosine = D.cos = function() {
572
+ var e, n, r = this, t = r.constructor;
573
+ return r.d ? r.d[0] ? (e = t.precision, n = t.rounding, t.precision = e + Math.max(r.e, r.sd()) + L, t.rounding = 1, r = kt(t, ut(t, r)), t.precision = e, t.rounding = n, F(ne == 2 || ne == 3 ? r.neg() : r, e, n, !0)) : new t(1) : new t(NaN);
574
+ };
575
+ D.cubeRoot = D.cbrt = function() {
576
+ var e, n, r, t, s, i, a, u, f, o, c = this, h = c.constructor;
577
+ if (!c.isFinite() || c.isZero()) return new h(c);
578
+ for (W = !1, i = c.s * Y(c.s * c, 1 / 3), !i || Math.abs(i) == 1 / 0 ? (r = V(c.d), e = c.e, (i = (e - r.length + 1) % 3) && (r += i == 1 || i == -2 ? "0" : "00"), i = Y(r, 1 / 3), e = K((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2)), i == 1 / 0 ? r = "5e" + e : (r = i.toExponential(), r = r.slice(0, r.indexOf("e") + 1) + e), t = new h(r), t.s = c.s) : t = new h(i.toString()), a = (e = h.precision) + 3; ; )
579
+ if (u = t, f = u.times(u).times(u), o = f.plus(c), t = Z(o.plus(c).times(u), o.plus(f), a + 2, 1), V(u.d).slice(0, a) === (r = V(t.d)).slice(0, a))
580
+ if (r = r.slice(a - 3, a + 1), r == "9999" || !s && r == "4999") {
581
+ if (!s && (F(u, e + 1, 0), u.times(u).times(u).eq(c))) {
582
+ t = u;
583
+ break;
584
+ }
585
+ a += 4, s = 1;
586
+ } else {
587
+ (!+r || !+r.slice(1) && r.charAt(0) == "5") && (F(t, e + 1, 1), n = !t.times(t).times(t).eq(c));
588
+ break;
589
+ }
590
+ return W = !0, F(t, e, h.rounding, n);
591
+ };
592
+ D.decimalPlaces = D.dp = function() {
593
+ var e, n = this.d, r = NaN;
594
+ if (n) {
595
+ if (e = n.length - 1, r = (e - K(this.e / L)) * L, e = n[e], e) for (; e % 10 == 0; e /= 10) r--;
596
+ r < 0 && (r = 0);
597
+ }
598
+ return r;
599
+ };
600
+ D.dividedBy = D.div = function(e) {
601
+ return Z(this, new this.constructor(e));
602
+ };
603
+ D.dividedToIntegerBy = D.divToInt = function(e) {
604
+ var n = this, r = n.constructor;
605
+ return F(Z(n, new r(e), 0, 1, 1), r.precision, r.rounding);
606
+ };
607
+ D.equals = D.eq = function(e) {
608
+ return this.cmp(e) === 0;
609
+ };
610
+ D.floor = function() {
611
+ return F(new this.constructor(this), this.e + 1, 3);
612
+ };
613
+ D.greaterThan = D.gt = function(e) {
614
+ return this.cmp(e) > 0;
615
+ };
616
+ D.greaterThanOrEqualTo = D.gte = function(e) {
617
+ var n = this.cmp(e);
618
+ return n == 1 || n === 0;
619
+ };
620
+ D.hyperbolicCosine = D.cosh = function() {
621
+ var e, n, r, t, s, i = this, a = i.constructor, u = new a(1);
622
+ if (!i.isFinite()) return new a(i.s ? 1 / 0 : NaN);
623
+ if (i.isZero()) return u;
624
+ r = a.precision, t = a.rounding, a.precision = r + Math.max(i.e, i.sd()) + 4, a.rounding = 1, s = i.d.length, s < 32 ? (e = Math.ceil(s / 3), n = (1 / Se(4, e)).toString()) : (e = 16, n = "2.3283064365386962890625e-10"), i = de(a, 1, i.times(n), new a(1), !0);
625
+ for (var f, o = e, c = new a(8); o--; )
626
+ f = i.times(i), i = u.minus(f.times(c.minus(f.times(c))));
627
+ return F(i, a.precision = r, a.rounding = t, !0);
628
+ };
629
+ D.hyperbolicSine = D.sinh = function() {
630
+ var e, n, r, t, s = this, i = s.constructor;
631
+ if (!s.isFinite() || s.isZero()) return new i(s);
632
+ if (n = i.precision, r = i.rounding, i.precision = n + Math.max(s.e, s.sd()) + 4, i.rounding = 1, t = s.d.length, t < 3)
633
+ s = de(i, 2, s, s, !0);
634
+ else {
635
+ e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, s = s.times(1 / Se(5, e)), s = de(i, 2, s, s, !0);
636
+ for (var a, u = new i(5), f = new i(16), o = new i(20); e--; )
637
+ a = s.times(s), s = s.times(u.plus(a.times(f.times(a).plus(o))));
638
+ }
639
+ return i.precision = n, i.rounding = r, F(s, n, r, !0);
640
+ };
641
+ D.hyperbolicTangent = D.tanh = function() {
642
+ var e, n, r = this, t = r.constructor;
643
+ return r.isFinite() ? r.isZero() ? new t(r) : (e = t.precision, n = t.rounding, t.precision = e + 7, t.rounding = 1, Z(r.sinh(), r.cosh(), t.precision = e, t.rounding = n)) : new t(r.s);
644
+ };
645
+ D.inverseCosine = D.acos = function() {
646
+ var e = this, n = e.constructor, r = e.abs().cmp(1), t = n.precision, s = n.rounding;
647
+ return r !== -1 ? r === 0 ? e.isNeg() ? ee(n, t, s) : new n(0) : new n(NaN) : e.isZero() ? ee(n, t + 4, s).times(0.5) : (n.precision = t + 6, n.rounding = 1, e = new n(1).minus(e).div(e.plus(1)).sqrt().atan(), n.precision = t, n.rounding = s, e.times(2));
648
+ };
649
+ D.inverseHyperbolicCosine = D.acosh = function() {
650
+ var e, n, r = this, t = r.constructor;
651
+ return r.lte(1) ? new t(r.eq(1) ? 0 : NaN) : r.isFinite() ? (e = t.precision, n = t.rounding, t.precision = e + Math.max(Math.abs(r.e), r.sd()) + 4, t.rounding = 1, W = !1, r = r.times(r).minus(1).sqrt().plus(r), W = !0, t.precision = e, t.rounding = n, r.ln()) : new t(r);
652
+ };
653
+ D.inverseHyperbolicSine = D.asinh = function() {
654
+ var e, n, r = this, t = r.constructor;
655
+ return !r.isFinite() || r.isZero() ? new t(r) : (e = t.precision, n = t.rounding, t.precision = e + 2 * Math.max(Math.abs(r.e), r.sd()) + 6, t.rounding = 1, W = !1, r = r.times(r).plus(1).sqrt().plus(r), W = !0, t.precision = e, t.rounding = n, r.ln());
656
+ };
657
+ D.inverseHyperbolicTangent = D.atanh = function() {
658
+ var e, n, r, t, s = this, i = s.constructor;
659
+ return s.isFinite() ? s.e >= 0 ? new i(s.abs().eq(1) ? s.s / 0 : s.isZero() ? s : NaN) : (e = i.precision, n = i.rounding, t = s.sd(), Math.max(t, e) < 2 * -s.e - 1 ? F(new i(s), e, n, !0) : (i.precision = r = t - s.e, s = Z(s.plus(1), new i(1).minus(s), r + e, 1), i.precision = e + 4, i.rounding = 1, s = s.ln(), i.precision = e, i.rounding = n, s.times(0.5))) : new i(NaN);
660
+ };
661
+ D.inverseSine = D.asin = function() {
662
+ var e, n, r, t, s = this, i = s.constructor;
663
+ return s.isZero() ? new i(s) : (n = s.abs().cmp(1), r = i.precision, t = i.rounding, n !== -1 ? n === 0 ? (e = ee(i, r + 4, t).times(0.5), e.s = s.s, e) : new i(NaN) : (i.precision = r + 6, i.rounding = 1, s = s.div(new i(1).minus(s.times(s)).sqrt().plus(1)).atan(), i.precision = r, i.rounding = t, s.times(2)));
664
+ };
665
+ D.inverseTangent = D.atan = function() {
666
+ var e, n, r, t, s, i, a, u, f, o = this, c = o.constructor, h = c.precision, l = c.rounding;
667
+ if (o.isFinite()) {
668
+ if (o.isZero())
669
+ return new c(o);
670
+ if (o.abs().eq(1) && h + 4 <= Pe)
671
+ return a = ee(c, h + 4, l).times(0.25), a.s = o.s, a;
672
+ } else {
673
+ if (!o.s) return new c(NaN);
674
+ if (h + 4 <= Pe)
675
+ return a = ee(c, h + 4, l).times(0.5), a.s = o.s, a;
676
+ }
677
+ for (c.precision = u = h + 10, c.rounding = 1, r = Math.min(28, u / L + 2 | 0), e = r; e; --e) o = o.div(o.times(o).plus(1).sqrt().plus(1));
678
+ for (W = !1, n = Math.ceil(u / L), t = 1, f = o.times(o), a = new c(o), s = o; e !== -1; )
679
+ if (s = s.times(f), i = a.minus(s.div(t += 2)), s = s.times(f), a = i.plus(s.div(t += 2)), a.d[n] !== void 0) for (e = n; a.d[e] === i.d[e] && e--; ) ;
680
+ return r && (a = a.times(2 << r - 1)), W = !0, F(a, c.precision = h, c.rounding = l, !0);
681
+ };
682
+ D.isFinite = function() {
683
+ return !!this.d;
684
+ };
685
+ D.isInteger = D.isInt = function() {
686
+ return !!this.d && K(this.e / L) > this.d.length - 2;
687
+ };
688
+ D.isNaN = function() {
689
+ return !this.s;
690
+ };
691
+ D.isNegative = D.isNeg = function() {
692
+ return this.s < 0;
693
+ };
694
+ D.isPositive = D.isPos = function() {
695
+ return this.s > 0;
696
+ };
697
+ D.isZero = function() {
698
+ return !!this.d && this.d[0] === 0;
699
+ };
700
+ D.lessThan = D.lt = function(e) {
701
+ return this.cmp(e) < 0;
702
+ };
703
+ D.lessThanOrEqualTo = D.lte = function(e) {
704
+ return this.cmp(e) < 1;
705
+ };
706
+ D.logarithm = D.log = function(e) {
707
+ var n, r, t, s, i, a, u, f, o = this, c = o.constructor, h = c.precision, l = c.rounding, m = 5;
708
+ if (e == null)
709
+ e = new c(10), n = !0;
710
+ else {
711
+ if (e = new c(e), r = e.d, e.s < 0 || !r || !r[0] || e.eq(1)) return new c(NaN);
712
+ n = e.eq(10);
713
+ }
714
+ if (r = o.d, o.s < 0 || !r || !r[0] || o.eq(1))
715
+ return new c(r && !r[0] ? -1 / 0 : o.s != 1 ? NaN : r ? 0 : 1 / 0);
716
+ if (n)
717
+ if (r.length > 1)
718
+ i = !0;
719
+ else {
720
+ for (s = r[0]; s % 10 === 0; ) s /= 10;
721
+ i = s !== 1;
722
+ }
723
+ if (W = !1, u = h + m, a = oe(o, u), t = n ? Ce(c, u + 10) : oe(e, u), f = Z(a, t, u, 1), ge(f.d, s = h, l))
724
+ do
725
+ if (u += 10, a = oe(o, u), t = n ? Ce(c, u + 10) : oe(e, u), f = Z(a, t, u, 1), !i) {
726
+ +V(f.d).slice(s + 1, s + 15) + 1 == 1e14 && (f = F(f, h + 1, 0));
727
+ break;
728
+ }
729
+ while (ge(f.d, s += 10, l));
730
+ return W = !0, F(f, h, l);
731
+ };
732
+ D.minus = D.sub = function(e) {
733
+ var n, r, t, s, i, a, u, f, o, c, h, l, m = this, $ = m.constructor;
734
+ if (e = new $(e), !m.d || !e.d)
735
+ return !m.s || !e.s ? e = new $(NaN) : m.d ? e.s = -e.s : e = new $(e.d || m.s !== e.s ? m : NaN), e;
736
+ if (m.s != e.s)
737
+ return e.s = -e.s, m.plus(e);
738
+ if (o = m.d, l = e.d, u = $.precision, f = $.rounding, !o[0] || !l[0]) {
739
+ if (l[0]) e.s = -e.s;
740
+ else if (o[0]) e = new $(m);
741
+ else return new $(f === 3 ? -0 : 0);
742
+ return W ? F(e, u, f) : e;
743
+ }
744
+ if (r = K(e.e / L), c = K(m.e / L), o = o.slice(), i = c - r, i) {
745
+ for (h = i < 0, h ? (n = o, i = -i, a = l.length) : (n = l, r = c, a = o.length), t = Math.max(Math.ceil(u / L), a) + 2, i > t && (i = t, n.length = 1), n.reverse(), t = i; t--; ) n.push(0);
746
+ n.reverse();
747
+ } else {
748
+ for (t = o.length, a = l.length, h = t < a, h && (a = t), t = 0; t < a; t++)
749
+ if (o[t] != l[t]) {
750
+ h = o[t] < l[t];
751
+ break;
752
+ }
753
+ i = 0;
754
+ }
755
+ for (h && (n = o, o = l, l = n, e.s = -e.s), a = o.length, t = l.length - a; t > 0; --t) o[a++] = 0;
756
+ for (t = l.length; t > i; ) {
757
+ if (o[--t] < l[t]) {
758
+ for (s = t; s && o[--s] === 0; ) o[s] = X - 1;
759
+ --o[s], o[t] += X;
760
+ }
761
+ o[t] -= l[t];
762
+ }
763
+ for (; o[--a] === 0; ) o.pop();
764
+ for (; o[0] === 0; o.shift()) --r;
765
+ return o[0] ? (e.d = o, e.e = De(o, r), W ? F(e, u, f) : e) : new $(f === 3 ? -0 : 0);
766
+ };
767
+ D.modulo = D.mod = function(e) {
768
+ var n, r = this, t = r.constructor;
769
+ return e = new t(e), !r.d || !e.s || e.d && !e.d[0] ? new t(NaN) : !e.d || r.d && !r.d[0] ? F(new t(r), t.precision, t.rounding) : (W = !1, t.modulo == 9 ? (n = Z(r, e.abs(), 0, 3, 1), n.s *= e.s) : n = Z(r, e, 0, t.modulo, 1), n = n.times(e), W = !0, r.minus(n));
770
+ };
771
+ D.naturalExponential = D.exp = function() {
772
+ return Fe(this);
773
+ };
774
+ D.naturalLogarithm = D.ln = function() {
775
+ return oe(this);
776
+ };
777
+ D.negated = D.neg = function() {
778
+ var e = new this.constructor(this);
779
+ return e.s = -e.s, F(e);
780
+ };
781
+ D.plus = D.add = function(e) {
782
+ var n, r, t, s, i, a, u, f, o, c, h = this, l = h.constructor;
783
+ if (e = new l(e), !h.d || !e.d)
784
+ return !h.s || !e.s ? e = new l(NaN) : h.d || (e = new l(e.d || h.s === e.s ? h : NaN)), e;
785
+ if (h.s != e.s)
786
+ return e.s = -e.s, h.minus(e);
787
+ if (o = h.d, c = e.d, u = l.precision, f = l.rounding, !o[0] || !c[0])
788
+ return c[0] || (e = new l(h)), W ? F(e, u, f) : e;
789
+ if (i = K(h.e / L), t = K(e.e / L), o = o.slice(), s = i - t, s) {
790
+ for (s < 0 ? (r = o, s = -s, a = c.length) : (r = c, t = i, a = o.length), i = Math.ceil(u / L), a = i > a ? i + 1 : a + 1, s > a && (s = a, r.length = 1), r.reverse(); s--; ) r.push(0);
791
+ r.reverse();
792
+ }
793
+ for (a = o.length, s = c.length, a - s < 0 && (s = a, r = c, c = o, o = r), n = 0; s; )
794
+ n = (o[--s] = o[s] + c[s] + n) / X | 0, o[s] %= X;
795
+ for (n && (o.unshift(n), ++t), a = o.length; o[--a] == 0; ) o.pop();
796
+ return e.d = o, e.e = De(o, t), W ? F(e, u, f) : e;
797
+ };
798
+ D.precision = D.sd = function(e) {
799
+ var n, r = this;
800
+ if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(ae + e);
801
+ return r.d ? (n = it(r.d), e && r.e + 1 > n && (n = r.e + 1)) : n = NaN, n;
802
+ };
803
+ D.round = function() {
804
+ var e = this, n = e.constructor;
805
+ return F(new n(e), e.e + 1, n.rounding);
806
+ };
807
+ D.sine = D.sin = function() {
808
+ var e, n, r = this, t = r.constructor;
809
+ return r.isFinite() ? r.isZero() ? new t(r) : (e = t.precision, n = t.rounding, t.precision = e + Math.max(r.e, r.sd()) + L, t.rounding = 1, r = bt(t, ut(t, r)), t.precision = e, t.rounding = n, F(ne > 2 ? r.neg() : r, e, n, !0)) : new t(NaN);
810
+ };
811
+ D.squareRoot = D.sqrt = function() {
812
+ var e, n, r, t, s, i, a = this, u = a.d, f = a.e, o = a.s, c = a.constructor;
813
+ if (o !== 1 || !u || !u[0])
814
+ return new c(!o || o < 0 && (!u || u[0]) ? NaN : u ? a : 1 / 0);
815
+ for (W = !1, o = Math.sqrt(+a), o == 0 || o == 1 / 0 ? (n = V(u), (n.length + f) % 2 == 0 && (n += "0"), o = Math.sqrt(n), f = K((f + 1) / 2) - (f < 0 || f % 2), o == 1 / 0 ? n = "5e" + f : (n = o.toExponential(), n = n.slice(0, n.indexOf("e") + 1) + f), t = new c(n)) : t = new c(o.toString()), r = (f = c.precision) + 3; ; )
816
+ if (i = t, t = i.plus(Z(a, i, r + 2, 1)).times(0.5), V(i.d).slice(0, r) === (n = V(t.d)).slice(0, r))
817
+ if (n = n.slice(r - 3, r + 1), n == "9999" || !s && n == "4999") {
818
+ if (!s && (F(i, f + 1, 0), i.times(i).eq(a))) {
819
+ t = i;
820
+ break;
821
+ }
822
+ r += 4, s = 1;
823
+ } else {
824
+ (!+n || !+n.slice(1) && n.charAt(0) == "5") && (F(t, f + 1, 1), e = !t.times(t).eq(a));
825
+ break;
826
+ }
827
+ return W = !0, F(t, f, c.rounding, e);
828
+ };
829
+ D.tangent = D.tan = function() {
830
+ var e, n, r = this, t = r.constructor;
831
+ return r.isFinite() ? r.isZero() ? new t(r) : (e = t.precision, n = t.rounding, t.precision = e + 10, t.rounding = 1, r = r.sin(), r.s = 1, r = Z(r, new t(1).minus(r.times(r)).sqrt(), e + 10, 0), t.precision = e, t.rounding = n, F(ne == 2 || ne == 4 ? r.neg() : r, e, n, !0)) : new t(NaN);
832
+ };
833
+ D.times = D.mul = function(e) {
834
+ var n, r, t, s, i, a, u, f, o, c = this, h = c.constructor, l = c.d, m = (e = new h(e)).d;
835
+ if (e.s *= c.s, !l || !l[0] || !m || !m[0])
836
+ return new h(!e.s || l && !l[0] && !m || m && !m[0] && !l ? NaN : !l || !m ? e.s / 0 : e.s * 0);
837
+ for (r = K(c.e / L) + K(e.e / L), f = l.length, o = m.length, f < o && (i = l, l = m, m = i, a = f, f = o, o = a), i = [], a = f + o, t = a; t--; ) i.push(0);
838
+ for (t = o; --t >= 0; ) {
839
+ for (n = 0, s = f + t; s > t; )
840
+ u = i[s] + m[t] * l[s - t - 1] + n, i[s--] = u % X | 0, n = u / X | 0;
841
+ i[s] = (i[s] + n) % X | 0;
842
+ }
843
+ for (; !i[--a]; ) i.pop();
844
+ return n ? ++r : i.shift(), e.d = i, e.e = De(i, r), W ? F(e, h.precision, h.rounding) : e;
845
+ };
846
+ D.toBinary = function(e, n) {
847
+ return qe(this, 2, e, n);
848
+ };
849
+ D.toDecimalPlaces = D.toDP = function(e, n) {
850
+ var r = this, t = r.constructor;
851
+ return r = new t(r), e === void 0 ? r : (Q(e, 0, ue), n === void 0 ? n = t.rounding : Q(n, 0, 8), F(r, e + r.e + 1, n));
852
+ };
853
+ D.toExponential = function(e, n) {
854
+ var r, t = this, s = t.constructor;
855
+ return e === void 0 ? r = te(t, !0) : (Q(e, 0, ue), n === void 0 ? n = s.rounding : Q(n, 0, 8), t = F(new s(t), e + 1, n), r = te(t, !0, e + 1)), t.isNeg() && !t.isZero() ? "-" + r : r;
856
+ };
857
+ D.toFixed = function(e, n) {
858
+ var r, t, s = this, i = s.constructor;
859
+ return e === void 0 ? r = te(s) : (Q(e, 0, ue), n === void 0 ? n = i.rounding : Q(n, 0, 8), t = F(new i(s), e + s.e + 1, n), r = te(t, !1, e + t.e + 1)), s.isNeg() && !s.isZero() ? "-" + r : r;
860
+ };
861
+ D.toFraction = function(e) {
862
+ var n, r, t, s, i, a, u, f, o, c, h, l, m = this, $ = m.d, p = m.constructor;
863
+ if (!$) return new p(m);
864
+ if (o = r = new p(1), t = f = new p(0), n = new p(t), i = n.e = it($) - m.e - 1, a = i % L, n.d[0] = Y(10, a < 0 ? L + a : a), e == null)
865
+ e = i > 0 ? n : o;
866
+ else {
867
+ if (u = new p(e), !u.isInt() || u.lt(o)) throw Error(ae + u);
868
+ e = u.gt(n) ? i > 0 ? n : o : u;
869
+ }
870
+ for (W = !1, u = new p(V($)), c = p.precision, p.precision = i = $.length * L * 2; h = Z(u, n, 0, 1, 1), s = r.plus(h.times(t)), s.cmp(e) != 1; )
871
+ r = t, t = s, s = o, o = f.plus(h.times(s)), f = s, s = n, n = u.minus(h.times(s)), u = s;
872
+ return s = Z(e.minus(r), t, 0, 1, 1), f = f.plus(s.times(o)), r = r.plus(s.times(t)), f.s = o.s = m.s, l = Z(o, t, i, 1).minus(m).abs().cmp(Z(f, r, i, 1).minus(m).abs()) < 1 ? [o, t] : [f, r], p.precision = c, W = !0, l;
873
+ };
874
+ D.toHexadecimal = D.toHex = function(e, n) {
875
+ return qe(this, 16, e, n);
876
+ };
877
+ D.toNearest = function(e, n) {
878
+ var r = this, t = r.constructor;
879
+ if (r = new t(r), e == null) {
880
+ if (!r.d) return r;
881
+ e = new t(1), n = t.rounding;
882
+ } else {
883
+ if (e = new t(e), n === void 0 ? n = t.rounding : Q(n, 0, 8), !r.d) return e.s ? r : e;
884
+ if (!e.d)
885
+ return e.s && (e.s = r.s), e;
886
+ }
887
+ return e.d[0] ? (W = !1, r = Z(r, e, 0, n, 1).times(e), W = !0, F(r)) : (e.s = r.s, r = e), r;
888
+ };
889
+ D.toNumber = function() {
890
+ return +this;
891
+ };
892
+ D.toOctal = function(e, n) {
893
+ return qe(this, 8, e, n);
894
+ };
895
+ D.toPower = D.pow = function(e) {
896
+ var n, r, t, s, i, a, u = this, f = u.constructor, o = +(e = new f(e));
897
+ if (!u.d || !e.d || !u.d[0] || !e.d[0]) return new f(Y(+u, o));
898
+ if (u = new f(u), u.eq(1)) return u;
899
+ if (t = f.precision, i = f.rounding, e.eq(1)) return F(u, t, i);
900
+ if (n = K(e.e / L), n >= e.d.length - 1 && (r = o < 0 ? -o : o) <= Bt)
901
+ return s = st(f, u, r, t), e.s < 0 ? new f(1).div(s) : F(s, t, i);
902
+ if (a = u.s, a < 0) {
903
+ if (n < e.d.length - 1) return new f(NaN);
904
+ if (e.d[n] & 1 || (a = 1), u.e == 0 && u.d[0] == 1 && u.d.length == 1)
905
+ return u.s = a, u;
906
+ }
907
+ return r = Y(+u, o), n = r == 0 || !isFinite(r) ? K(o * (Math.log("0." + V(u.d)) / Math.LN10 + u.e + 1)) : new f(r + "").e, n > f.maxE + 1 || n < f.minE - 1 ? new f(n > 0 ? a / 0 : 0) : (W = !1, f.rounding = u.s = 1, r = Math.min(12, (n + "").length), s = Fe(e.times(oe(u, t + r)), t), s.d && (s = F(s, t + 5, 1), ge(s.d, t, i) && (n = t + 10, s = F(Fe(e.times(oe(u, n + r)), n), n + 5, 1), +V(s.d).slice(t + 1, t + 15) + 1 == 1e14 && (s = F(s, t + 1, 0)))), s.s = a, W = !0, f.rounding = i, F(s, t, i));
908
+ };
909
+ D.toPrecision = function(e, n) {
910
+ var r, t = this, s = t.constructor;
911
+ return e === void 0 ? r = te(t, t.e <= s.toExpNeg || t.e >= s.toExpPos) : (Q(e, 1, ue), n === void 0 ? n = s.rounding : Q(n, 0, 8), t = F(new s(t), e, n), r = te(t, e <= t.e || t.e <= s.toExpNeg, e)), t.isNeg() && !t.isZero() ? "-" + r : r;
912
+ };
913
+ D.toSignificantDigits = D.toSD = function(e, n) {
914
+ var r = this, t = r.constructor;
915
+ return e === void 0 ? (e = t.precision, n = t.rounding) : (Q(e, 1, ue), n === void 0 ? n = t.rounding : Q(n, 0, 8)), F(new t(r), e, n);
916
+ };
917
+ D.toString = function() {
918
+ var e = this, n = e.constructor, r = te(e, e.e <= n.toExpNeg || e.e >= n.toExpPos);
919
+ return e.isNeg() && !e.isZero() ? "-" + r : r;
920
+ };
921
+ D.truncated = D.trunc = function() {
922
+ return F(new this.constructor(this), this.e + 1, 1);
923
+ };
924
+ D.valueOf = D.toJSON = function() {
925
+ var e = this, n = e.constructor, r = te(e, e.e <= n.toExpNeg || e.e >= n.toExpPos);
926
+ return e.isNeg() ? "-" + r : r;
927
+ };
928
+ function V(e) {
929
+ var n, r, t, s = e.length - 1, i = "", a = e[0];
930
+ if (s > 0) {
931
+ for (i += a, n = 1; n < s; n++)
932
+ t = e[n] + "", r = L - t.length, r && (i += se(r)), i += t;
933
+ a = e[n], t = a + "", r = L - t.length, r && (i += se(r));
934
+ } else if (a === 0)
935
+ return "0";
936
+ for (; a % 10 === 0; ) a /= 10;
937
+ return i + a;
938
+ }
939
+ function Q(e, n, r) {
940
+ if (e !== ~~e || e < n || e > r)
941
+ throw Error(ae + e);
942
+ }
943
+ function ge(e, n, r, t) {
944
+ var s, i, a, u;
945
+ for (i = e[0]; i >= 10; i /= 10) --n;
946
+ return --n < 0 ? (n += L, s = 0) : (s = Math.ceil((n + 1) / L), n %= L), i = Y(10, L - n), u = e[s] % i | 0, t == null ? n < 3 ? (n == 0 ? u = u / 100 | 0 : n == 1 && (u = u / 10 | 0), a = r < 4 && u == 99999 || r > 3 && u == 49999 || u == 5e4 || u == 0) : a = (r < 4 && u + 1 == i || r > 3 && u + 1 == i / 2) && (e[s + 1] / i / 100 | 0) == Y(10, n - 2) - 1 || (u == i / 2 || u == 0) && (e[s + 1] / i / 100 | 0) == 0 : n < 4 ? (n == 0 ? u = u / 1e3 | 0 : n == 1 ? u = u / 100 | 0 : n == 2 && (u = u / 10 | 0), a = (t || r < 4) && u == 9999 || !t && r > 3 && u == 4999) : a = ((t || r < 4) && u + 1 == i || !t && r > 3 && u + 1 == i / 2) && (e[s + 1] / i / 1e3 | 0) == Y(10, n - 3) - 1, a;
947
+ }
948
+ function _e(e, n, r) {
949
+ for (var t, s = [0], i, a = 0, u = e.length; a < u; ) {
950
+ for (i = s.length; i--; ) s[i] *= n;
951
+ for (s[0] += He.indexOf(e.charAt(a++)), t = 0; t < s.length; t++)
952
+ s[t] > r - 1 && (s[t + 1] === void 0 && (s[t + 1] = 0), s[t + 1] += s[t] / r | 0, s[t] %= r);
953
+ }
954
+ return s.reverse();
955
+ }
956
+ function kt(e, n) {
957
+ var r, t, s;
958
+ if (n.isZero()) return n;
959
+ t = n.d.length, t < 32 ? (r = Math.ceil(t / 3), s = (1 / Se(4, r)).toString()) : (r = 16, s = "2.3283064365386962890625e-10"), e.precision += r, n = de(e, 1, n.times(s), new e(1));
960
+ for (var i = r; i--; ) {
961
+ var a = n.times(n);
962
+ n = a.times(a).minus(a).times(8).plus(1);
963
+ }
964
+ return e.precision -= r, n;
965
+ }
966
+ var Z = /* @__PURE__ */ function() {
967
+ function e(t, s, i) {
968
+ var a, u = 0, f = t.length;
969
+ for (t = t.slice(); f--; )
970
+ a = t[f] * s + u, t[f] = a % i | 0, u = a / i | 0;
971
+ return u && t.unshift(u), t;
972
+ }
973
+ function n(t, s, i, a) {
974
+ var u, f;
975
+ if (i != a)
976
+ f = i > a ? 1 : -1;
977
+ else
978
+ for (u = f = 0; u < i; u++)
979
+ if (t[u] != s[u]) {
980
+ f = t[u] > s[u] ? 1 : -1;
981
+ break;
982
+ }
983
+ return f;
984
+ }
985
+ function r(t, s, i, a) {
986
+ for (var u = 0; i--; )
987
+ t[i] -= u, u = t[i] < s[i] ? 1 : 0, t[i] = u * a + t[i] - s[i];
988
+ for (; !t[0] && t.length > 1; ) t.shift();
989
+ }
990
+ return function(t, s, i, a, u, f) {
991
+ var o, c, h, l, m, $, p, N, z, g, d, _, B, O, P, U, q, v, w, A, b = t.constructor, M = t.s == s.s ? 1 : -1, x = t.d, y = s.d;
992
+ if (!x || !x[0] || !y || !y[0])
993
+ return new b(
994
+ // Return NaN if either NaN, or both Infinity or 0.
995
+ !t.s || !s.s || (x ? y && x[0] == y[0] : !y) ? NaN : (
996
+ // Return ±0 if x is 0 or y is ±Infinity, or return ±Infinity as y is 0.
997
+ x && x[0] == 0 || !y ? M * 0 : M / 0
998
+ )
999
+ );
1000
+ for (f ? (m = 1, c = t.e - s.e) : (f = X, m = L, c = K(t.e / m) - K(s.e / m)), w = y.length, q = x.length, z = new b(M), g = z.d = [], h = 0; y[h] == (x[h] || 0); h++) ;
1001
+ if (y[h] > (x[h] || 0) && c--, i == null ? (O = i = b.precision, a = b.rounding) : u ? O = i + (t.e - s.e) + 1 : O = i, O < 0)
1002
+ g.push(1), $ = !0;
1003
+ else {
1004
+ if (O = O / m + 2 | 0, h = 0, w == 1) {
1005
+ for (l = 0, y = y[0], O++; (h < q || l) && O--; h++)
1006
+ P = l * f + (x[h] || 0), g[h] = P / y | 0, l = P % y | 0;
1007
+ $ = l || h < q;
1008
+ } else {
1009
+ for (l = f / (y[0] + 1) | 0, l > 1 && (y = e(y, l, f), x = e(x, l, f), w = y.length, q = x.length), U = w, d = x.slice(0, w), _ = d.length; _ < w; ) d[_++] = 0;
1010
+ A = y.slice(), A.unshift(0), v = y[0], y[1] >= f / 2 && ++v;
1011
+ do
1012
+ l = 0, o = n(y, d, w, _), o < 0 ? (B = d[0], w != _ && (B = B * f + (d[1] || 0)), l = B / v | 0, l > 1 ? (l >= f && (l = f - 1), p = e(y, l, f), N = p.length, _ = d.length, o = n(p, d, N, _), o == 1 && (l--, r(p, w < N ? A : y, N, f))) : (l == 0 && (o = l = 1), p = y.slice()), N = p.length, N < _ && p.unshift(0), r(d, p, _, f), o == -1 && (_ = d.length, o = n(y, d, w, _), o < 1 && (l++, r(d, w < _ ? A : y, _, f))), _ = d.length) : o === 0 && (l++, d = [0]), g[h++] = l, o && d[0] ? d[_++] = x[U] || 0 : (d = [x[U]], _ = 1);
1013
+ while ((U++ < q || d[0] !== void 0) && O--);
1014
+ $ = d[0] !== void 0;
1015
+ }
1016
+ g[0] || g.shift();
1017
+ }
1018
+ if (m == 1)
1019
+ z.e = c, Xe = $;
1020
+ else {
1021
+ for (h = 1, l = g[0]; l >= 10; l /= 10) h++;
1022
+ z.e = h + c * m - 1, F(z, u ? i + z.e + 1 : i, a, $);
1023
+ }
1024
+ return z;
1025
+ };
1026
+ }();
1027
+ function F(e, n, r, t) {
1028
+ var s, i, a, u, f, o, c, h, l, m = e.constructor;
1029
+ e: if (n != null) {
1030
+ if (h = e.d, !h) return e;
1031
+ for (s = 1, u = h[0]; u >= 10; u /= 10) s++;
1032
+ if (i = n - s, i < 0)
1033
+ i += L, a = n, c = h[l = 0], f = c / Y(10, s - a - 1) % 10 | 0;
1034
+ else if (l = Math.ceil((i + 1) / L), u = h.length, l >= u)
1035
+ if (t) {
1036
+ for (; u++ <= l; ) h.push(0);
1037
+ c = f = 0, s = 1, i %= L, a = i - L + 1;
1038
+ } else
1039
+ break e;
1040
+ else {
1041
+ for (c = u = h[l], s = 1; u >= 10; u /= 10) s++;
1042
+ i %= L, a = i - L + s, f = a < 0 ? 0 : c / Y(10, s - a - 1) % 10 | 0;
1043
+ }
1044
+ if (t = t || n < 0 || h[l + 1] !== void 0 || (a < 0 ? c : c % Y(10, s - a - 1)), o = r < 4 ? (f || t) && (r == 0 || r == (e.s < 0 ? 3 : 2)) : f > 5 || f == 5 && (r == 4 || t || r == 6 && // Check whether the digit to the left of the rounding digit is odd.
1045
+ (i > 0 ? a > 0 ? c / Y(10, s - a) : 0 : h[l - 1]) % 10 & 1 || r == (e.s < 0 ? 8 : 7)), n < 1 || !h[0])
1046
+ return h.length = 0, o ? (n -= e.e + 1, h[0] = Y(10, (L - n % L) % L), e.e = -n || 0) : h[0] = e.e = 0, e;
1047
+ if (i == 0 ? (h.length = l, u = 1, l--) : (h.length = l + 1, u = Y(10, L - i), h[l] = a > 0 ? (c / Y(10, s - a) % Y(10, a) | 0) * u : 0), o)
1048
+ for (; ; )
1049
+ if (l == 0) {
1050
+ for (i = 1, a = h[0]; a >= 10; a /= 10) i++;
1051
+ for (a = h[0] += u, u = 1; a >= 10; a /= 10) u++;
1052
+ i != u && (e.e++, h[0] == X && (h[0] = 1));
1053
+ break;
1054
+ } else {
1055
+ if (h[l] += u, h[l] != X) break;
1056
+ h[l--] = 0, u = 1;
1057
+ }
1058
+ for (i = h.length; h[--i] === 0; ) h.pop();
1059
+ }
1060
+ return W && (e.e > m.maxE ? (e.d = null, e.e = NaN) : e.e < m.minE && (e.e = 0, e.d = [0])), e;
1061
+ }
1062
+ function te(e, n, r) {
1063
+ if (!e.isFinite()) return at(e);
1064
+ var t, s = e.e, i = V(e.d), a = i.length;
1065
+ return n ? (r && (t = r - a) > 0 ? i = i.charAt(0) + "." + i.slice(1) + se(t) : a > 1 && (i = i.charAt(0) + "." + i.slice(1)), i = i + (e.e < 0 ? "e" : "e+") + e.e) : s < 0 ? (i = "0." + se(-s - 1) + i, r && (t = r - a) > 0 && (i += se(t))) : s >= a ? (i += se(s + 1 - a), r && (t = r - s - 1) > 0 && (i = i + "." + se(t))) : ((t = s + 1) < a && (i = i.slice(0, t) + "." + i.slice(t)), r && (t = r - a) > 0 && (s + 1 === a && (i += "."), i += se(t))), i;
1066
+ }
1067
+ function De(e, n) {
1068
+ var r = e[0];
1069
+ for (n *= L; r >= 10; r /= 10) n++;
1070
+ return n;
1071
+ }
1072
+ function Ce(e, n, r) {
1073
+ if (n > Et)
1074
+ throw W = !0, r && (e.precision = r), Error(et);
1075
+ return F(new e(xe), n, 1, !0);
1076
+ }
1077
+ function ee(e, n, r) {
1078
+ if (n > Pe) throw Error(et);
1079
+ return F(new e($e), n, r, !0);
1080
+ }
1081
+ function it(e) {
1082
+ var n = e.length - 1, r = n * L + 1;
1083
+ if (n = e[n], n) {
1084
+ for (; n % 10 == 0; n /= 10) r--;
1085
+ for (n = e[0]; n >= 10; n /= 10) r++;
1086
+ }
1087
+ return r;
1088
+ }
1089
+ function se(e) {
1090
+ for (var n = ""; e--; ) n += "0";
1091
+ return n;
1092
+ }
1093
+ function st(e, n, r, t) {
1094
+ var s, i = new e(1), a = Math.ceil(t / L + 4);
1095
+ for (W = !1; ; ) {
1096
+ if (r % 2 && (i = i.times(n), Re(i.d, a) && (s = !0)), r = K(r / 2), r === 0) {
1097
+ r = i.d.length - 1, s && i.d[r] === 0 && ++i.d[r];
1098
+ break;
1099
+ }
1100
+ n = n.times(n), Re(n.d, a);
1101
+ }
1102
+ return W = !0, i;
1103
+ }
1104
+ function Ie(e) {
1105
+ return e.d[e.d.length - 1] & 1;
1106
+ }
1107
+ function ot(e, n, r) {
1108
+ for (var t, s, i = new e(n[0]), a = 0; ++a < n.length; ) {
1109
+ if (s = new e(n[a]), !s.s) {
1110
+ i = s;
1111
+ break;
1112
+ }
1113
+ t = i.cmp(s), (t === r || t === 0 && i.s === r) && (i = s);
1114
+ }
1115
+ return i;
1116
+ }
1117
+ function Fe(e, n) {
1118
+ var r, t, s, i, a, u, f, o = 0, c = 0, h = 0, l = e.constructor, m = l.rounding, $ = l.precision;
1119
+ if (!e.d || !e.d[0] || e.e > 17)
1120
+ return new l(e.d ? e.d[0] ? e.s < 0 ? 0 : 1 / 0 : 1 : e.s ? e.s < 0 ? 0 : e : NaN);
1121
+ for (n == null ? (W = !1, f = $) : f = n, u = new l(0.03125); e.e > -2; )
1122
+ e = e.times(u), h += 5;
1123
+ for (t = Math.log(Y(2, h)) / Math.LN10 * 2 + 5 | 0, f += t, r = i = a = new l(1), l.precision = f; ; ) {
1124
+ if (i = F(i.times(e), f, 1), r = r.times(++c), u = a.plus(Z(i, r, f, 1)), V(u.d).slice(0, f) === V(a.d).slice(0, f)) {
1125
+ for (s = h; s--; ) a = F(a.times(a), f, 1);
1126
+ if (n == null)
1127
+ if (o < 3 && ge(a.d, f - t, m, o))
1128
+ l.precision = f += 10, r = i = u = new l(1), c = 0, o++;
1129
+ else
1130
+ return F(a, l.precision = $, m, W = !0);
1131
+ else
1132
+ return l.precision = $, a;
1133
+ }
1134
+ a = u;
1135
+ }
1136
+ }
1137
+ function oe(e, n) {
1138
+ var r, t, s, i, a, u, f, o, c, h, l, m = 1, $ = 10, p = e, N = p.d, z = p.constructor, g = z.rounding, d = z.precision;
1139
+ if (p.s < 0 || !N || !N[0] || !p.e && N[0] == 1 && N.length == 1)
1140
+ return new z(N && !N[0] ? -1 / 0 : p.s != 1 ? NaN : N ? 0 : p);
1141
+ if (n == null ? (W = !1, c = d) : c = n, z.precision = c += $, r = V(N), t = r.charAt(0), Math.abs(i = p.e) < 15e14) {
1142
+ for (; t < 7 && t != 1 || t == 1 && r.charAt(1) > 3; )
1143
+ p = p.times(e), r = V(p.d), t = r.charAt(0), m++;
1144
+ i = p.e, t > 1 ? (p = new z("0." + r), i++) : p = new z(t + "." + r.slice(1));
1145
+ } else
1146
+ return o = Ce(z, c + 2, d).times(i + ""), p = oe(new z(t + "." + r.slice(1)), c - $).plus(o), z.precision = d, n == null ? F(p, d, g, W = !0) : p;
1147
+ for (h = p, f = a = p = Z(p.minus(1), p.plus(1), c, 1), l = F(p.times(p), c, 1), s = 3; ; ) {
1148
+ if (a = F(a.times(l), c, 1), o = f.plus(Z(a, new z(s), c, 1)), V(o.d).slice(0, c) === V(f.d).slice(0, c))
1149
+ if (f = f.times(2), i !== 0 && (f = f.plus(Ce(z, c + 2, d).times(i + ""))), f = Z(f, new z(m), c, 1), n == null)
1150
+ if (ge(f.d, c - $, g, u))
1151
+ z.precision = c += $, o = a = p = Z(h.minus(1), h.plus(1), c, 1), l = F(p.times(p), c, 1), s = u = 1;
1152
+ else
1153
+ return F(f, z.precision = d, g, W = !0);
1154
+ else
1155
+ return z.precision = d, f;
1156
+ f = o, s += 2;
1157
+ }
1158
+ }
1159
+ function at(e) {
1160
+ return String(e.s * e.s / 0);
1161
+ }
1162
+ function ye(e, n) {
1163
+ var r, t, s;
1164
+ for ((r = n.indexOf(".")) > -1 && (n = n.replace(".", "")), (t = n.search(/e/i)) > 0 ? (r < 0 && (r = t), r += +n.slice(t + 1), n = n.substring(0, t)) : r < 0 && (r = n.length), t = 0; n.charCodeAt(t) === 48; t++) ;
1165
+ for (s = n.length; n.charCodeAt(s - 1) === 48; --s) ;
1166
+ if (n = n.slice(t, s), n) {
1167
+ if (s -= t, e.e = r = r - t - 1, e.d = [], t = (r + 1) % L, r < 0 && (t += L), t < s) {
1168
+ for (t && e.d.push(+n.slice(0, t)), s -= L; t < s; ) e.d.push(+n.slice(t, t += L));
1169
+ n = n.slice(t), t = L - n.length;
1170
+ } else
1171
+ t -= s;
1172
+ for (; t--; ) n += "0";
1173
+ e.d.push(+n), W && (e.e > e.constructor.maxE ? (e.d = null, e.e = NaN) : e.e < e.constructor.minE && (e.e = 0, e.d = [0]));
1174
+ } else
1175
+ e.e = 0, e.d = [0];
1176
+ return e;
1177
+ }
1178
+ function Mt(e, n) {
1179
+ var r, t, s, i, a, u, f, o, c;
1180
+ if (n.indexOf("_") > -1) {
1181
+ if (n = n.replace(/(\d)_(?=\d)/g, "$1"), nt.test(n)) return ye(e, n);
1182
+ } else if (n === "Infinity" || n === "NaN")
1183
+ return +n || (e.s = NaN), e.e = NaN, e.d = null, e;
1184
+ if (Dt.test(n))
1185
+ r = 16, n = n.toLowerCase();
1186
+ else if (Nt.test(n))
1187
+ r = 2;
1188
+ else if (St.test(n))
1189
+ r = 8;
1190
+ else
1191
+ throw Error(ae + n);
1192
+ for (i = n.search(/p/i), i > 0 ? (f = +n.slice(i + 1), n = n.substring(2, i)) : n = n.slice(2), i = n.indexOf("."), a = i >= 0, t = e.constructor, a && (n = n.replace(".", ""), u = n.length, i = u - i, s = st(t, new t(r), i, i * 2)), o = _e(n, r, X), c = o.length - 1, i = c; o[i] === 0; --i) o.pop();
1193
+ return i < 0 ? new t(e.s * 0) : (e.e = De(o, c), e.d = o, W = !1, a && (e = Z(e, s, u * 4)), f && (e = e.times(Math.abs(f) < 54 ? Y(2, f) : Be.pow(2, f))), W = !0, e);
1194
+ }
1195
+ function bt(e, n) {
1196
+ var r, t = n.d.length;
1197
+ if (t < 3)
1198
+ return n.isZero() ? n : de(e, 2, n, n);
1199
+ r = 1.4 * Math.sqrt(t), r = r > 16 ? 16 : r | 0, n = n.times(1 / Se(5, r)), n = de(e, 2, n, n);
1200
+ for (var s, i = new e(5), a = new e(16), u = new e(20); r--; )
1201
+ s = n.times(n), n = n.times(i.plus(s.times(a.times(s).minus(u))));
1202
+ return n;
1203
+ }
1204
+ function de(e, n, r, t, s) {
1205
+ var i, a, u, f, o = e.precision, c = Math.ceil(o / L);
1206
+ for (W = !1, f = r.times(r), u = new e(t); ; ) {
1207
+ if (a = Z(u.times(f), new e(n++ * n++), o, 1), u = s ? t.plus(a) : t.minus(a), t = Z(a.times(f), new e(n++ * n++), o, 1), a = u.plus(t), a.d[c] !== void 0) {
1208
+ for (i = c; a.d[i] === u.d[i] && i--; ) ;
1209
+ if (i == -1) break;
1210
+ }
1211
+ i = u, u = t, t = a, a = i;
1212
+ }
1213
+ return W = !0, a.d.length = c + 1, a;
1214
+ }
1215
+ function Se(e, n) {
1216
+ for (var r = e; --n; ) r *= e;
1217
+ return r;
1218
+ }
1219
+ function ut(e, n) {
1220
+ var r, t = n.s < 0, s = ee(e, e.precision, 1), i = s.times(0.5);
1221
+ if (n = n.abs(), n.lte(i))
1222
+ return ne = t ? 4 : 1, n;
1223
+ if (r = n.divToInt(s), r.isZero())
1224
+ ne = t ? 3 : 2;
1225
+ else {
1226
+ if (n = n.minus(r.times(s)), n.lte(i))
1227
+ return ne = Ie(r) ? t ? 2 : 3 : t ? 4 : 1, n;
1228
+ ne = Ie(r) ? t ? 1 : 4 : t ? 3 : 2;
1229
+ }
1230
+ return n.minus(s).abs();
1231
+ }
1232
+ function qe(e, n, r, t) {
1233
+ var s, i, a, u, f, o, c, h, l, m = e.constructor, $ = r !== void 0;
1234
+ if ($ ? (Q(r, 1, ue), t === void 0 ? t = m.rounding : Q(t, 0, 8)) : (r = m.precision, t = m.rounding), !e.isFinite())
1235
+ c = at(e);
1236
+ else {
1237
+ for (c = te(e), a = c.indexOf("."), $ ? (s = 2, n == 16 ? r = r * 4 - 3 : n == 8 && (r = r * 3 - 2)) : s = n, a >= 0 && (c = c.replace(".", ""), l = new m(1), l.e = c.length - a, l.d = _e(te(l), 10, s), l.e = l.d.length), h = _e(c, 10, s), i = f = h.length; h[--f] == 0; ) h.pop();
1238
+ if (!h[0])
1239
+ c = $ ? "0p+0" : "0";
1240
+ else {
1241
+ if (a < 0 ? i-- : (e = new m(e), e.d = h, e.e = i, e = Z(e, l, r, t, 0, s), h = e.d, i = e.e, o = Xe), a = h[r], u = s / 2, o = o || h[r + 1] !== void 0, o = t < 4 ? (a !== void 0 || o) && (t === 0 || t === (e.s < 0 ? 3 : 2)) : a > u || a === u && (t === 4 || o || t === 6 && h[r - 1] & 1 || t === (e.s < 0 ? 8 : 7)), h.length = r, o)
1242
+ for (; ++h[--r] > s - 1; )
1243
+ h[r] = 0, r || (++i, h.unshift(1));
1244
+ for (f = h.length; !h[f - 1]; --f) ;
1245
+ for (a = 0, c = ""; a < f; a++) c += He.charAt(h[a]);
1246
+ if ($) {
1247
+ if (f > 1)
1248
+ if (n == 16 || n == 8) {
1249
+ for (a = n == 16 ? 4 : 3, --f; f % a; f++) c += "0";
1250
+ for (h = _e(c, s, n), f = h.length; !h[f - 1]; --f) ;
1251
+ for (a = 1, c = "1."; a < f; a++) c += He.charAt(h[a]);
1252
+ } else
1253
+ c = c.charAt(0) + "." + c.slice(1);
1254
+ c = c + (i < 0 ? "p" : "p+") + i;
1255
+ } else if (i < 0) {
1256
+ for (; ++i; ) c = "0" + c;
1257
+ c = "0." + c;
1258
+ } else if (++i > f) for (i -= f; i--; ) c += "0";
1259
+ else i < f && (c = c.slice(0, i) + "." + c.slice(i));
1260
+ }
1261
+ c = (n == 16 ? "0x" : n == 2 ? "0b" : n == 8 ? "0o" : "") + c;
1262
+ }
1263
+ return e.s < 0 ? "-" + c : c;
1264
+ }
1265
+ function Re(e, n) {
1266
+ if (e.length > n)
1267
+ return e.length = n, !0;
1268
+ }
1269
+ function Ot(e) {
1270
+ return new this(e).abs();
1271
+ }
1272
+ function At(e) {
1273
+ return new this(e).acos();
1274
+ }
1275
+ function zt(e) {
1276
+ return new this(e).acosh();
1277
+ }
1278
+ function Ht(e, n) {
1279
+ return new this(e).plus(n);
1280
+ }
1281
+ function Tt(e) {
1282
+ return new this(e).asin();
1283
+ }
1284
+ function Pt(e) {
1285
+ return new this(e).asinh();
1286
+ }
1287
+ function Ft(e) {
1288
+ return new this(e).atan();
1289
+ }
1290
+ function qt(e) {
1291
+ return new this(e).atanh();
1292
+ }
1293
+ function Lt(e, n) {
1294
+ e = new this(e), n = new this(n);
1295
+ var r, t = this.precision, s = this.rounding, i = t + 4;
1296
+ return !e.s || !n.s ? r = new this(NaN) : !e.d && !n.d ? (r = ee(this, i, 1).times(n.s > 0 ? 0.25 : 0.75), r.s = e.s) : !n.d || e.isZero() ? (r = n.s < 0 ? ee(this, t, s) : new this(0), r.s = e.s) : !e.d || n.isZero() ? (r = ee(this, i, 1).times(0.5), r.s = e.s) : n.s < 0 ? (this.precision = i, this.rounding = 1, r = this.atan(Z(e, n, i, 1)), n = ee(this, i, 1), this.precision = t, this.rounding = s, r = e.s < 0 ? r.minus(n) : r.plus(n)) : r = this.atan(Z(e, n, i, 1)), r;
1297
+ }
1298
+ function It(e) {
1299
+ return new this(e).cbrt();
1300
+ }
1301
+ function Rt(e) {
1302
+ return F(e = new this(e), e.e + 1, 2);
1303
+ }
1304
+ function Ut(e, n, r) {
1305
+ return new this(e).clamp(n, r);
1306
+ }
1307
+ function Wt(e) {
1308
+ if (!e || typeof e != "object") throw Error(Ne + "Object expected");
1309
+ var n, r, t, s = e.defaults === !0, i = [
1310
+ "precision",
1311
+ 1,
1312
+ ue,
1313
+ "rounding",
1314
+ 0,
1315
+ 8,
1316
+ "toExpNeg",
1317
+ -he,
1318
+ 0,
1319
+ "toExpPos",
1320
+ 0,
1321
+ he,
1322
+ "maxE",
1323
+ 0,
1324
+ he,
1325
+ "minE",
1326
+ -he,
1327
+ 0,
1328
+ "modulo",
1329
+ 0,
1330
+ 9
1331
+ ];
1332
+ for (n = 0; n < i.length; n += 3)
1333
+ if (r = i[n], s && (this[r] = Te[r]), (t = e[r]) !== void 0)
1334
+ if (K(t) === t && t >= i[n + 1] && t <= i[n + 2]) this[r] = t;
1335
+ else throw Error(ae + r + ": " + t);
1336
+ if (r = "crypto", s && (this[r] = Te[r]), (t = e[r]) !== void 0)
1337
+ if (t === !0 || t === !1 || t === 0 || t === 1)
1338
+ if (t)
1339
+ if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
1340
+ this[r] = !0;
1341
+ else
1342
+ throw Error(tt);
1343
+ else
1344
+ this[r] = !1;
1345
+ else
1346
+ throw Error(ae + r + ": " + t);
1347
+ return this;
1348
+ }
1349
+ function Zt(e) {
1350
+ return new this(e).cos();
1351
+ }
1352
+ function Yt(e) {
1353
+ return new this(e).cosh();
1354
+ }
1355
+ function ft(e) {
1356
+ var n, r, t;
1357
+ function s(i) {
1358
+ var a, u, f, o = this;
1359
+ if (!(o instanceof s)) return new s(i);
1360
+ if (o.constructor = s, Ue(i)) {
1361
+ o.s = i.s, W ? !i.d || i.e > s.maxE ? (o.e = NaN, o.d = null) : i.e < s.minE ? (o.e = 0, o.d = [0]) : (o.e = i.e, o.d = i.d.slice()) : (o.e = i.e, o.d = i.d ? i.d.slice() : i.d);
1362
+ return;
1363
+ }
1364
+ if (f = typeof i, f === "number") {
1365
+ if (i === 0) {
1366
+ o.s = 1 / i < 0 ? -1 : 1, o.e = 0, o.d = [0];
1367
+ return;
1368
+ }
1369
+ if (i < 0 ? (i = -i, o.s = -1) : o.s = 1, i === ~~i && i < 1e7) {
1370
+ for (a = 0, u = i; u >= 10; u /= 10) a++;
1371
+ W ? a > s.maxE ? (o.e = NaN, o.d = null) : a < s.minE ? (o.e = 0, o.d = [0]) : (o.e = a, o.d = [i]) : (o.e = a, o.d = [i]);
1372
+ return;
1373
+ }
1374
+ if (i * 0 !== 0) {
1375
+ i || (o.s = NaN), o.e = NaN, o.d = null;
1376
+ return;
1377
+ }
1378
+ return ye(o, i.toString());
1379
+ }
1380
+ if (f === "string")
1381
+ return (u = i.charCodeAt(0)) === 45 ? (i = i.slice(1), o.s = -1) : (u === 43 && (i = i.slice(1)), o.s = 1), nt.test(i) ? ye(o, i) : Mt(o, i);
1382
+ if (f === "bigint")
1383
+ return i < 0 ? (i = -i, o.s = -1) : o.s = 1, ye(o, i.toString());
1384
+ throw Error(ae + i);
1385
+ }
1386
+ if (s.prototype = D, s.ROUND_UP = 0, s.ROUND_DOWN = 1, s.ROUND_CEIL = 2, s.ROUND_FLOOR = 3, s.ROUND_HALF_UP = 4, s.ROUND_HALF_DOWN = 5, s.ROUND_HALF_EVEN = 6, s.ROUND_HALF_CEIL = 7, s.ROUND_HALF_FLOOR = 8, s.EUCLID = 9, s.config = s.set = Wt, s.clone = ft, s.isDecimal = Ue, s.abs = Ot, s.acos = At, s.acosh = zt, s.add = Ht, s.asin = Tt, s.asinh = Pt, s.atan = Ft, s.atanh = qt, s.atan2 = Lt, s.cbrt = It, s.ceil = Rt, s.clamp = Ut, s.cos = Zt, s.cosh = Yt, s.div = jt, s.exp = Vt, s.floor = Kt, s.hypot = Gt, s.ln = Qt, s.log = Jt, s.log10 = er, s.log2 = Xt, s.max = tr, s.min = rr, s.mod = nr, s.mul = ir, s.pow = sr, s.random = or, s.round = ar, s.sign = ur, s.sin = fr, s.sinh = cr, s.sqrt = lr, s.sub = hr, s.sum = dr, s.tan = pr, s.tanh = vr, s.trunc = gr, e === void 0 && (e = {}), e && e.defaults !== !0)
1387
+ for (t = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], n = 0; n < t.length; ) e.hasOwnProperty(r = t[n++]) || (e[r] = this[r]);
1388
+ return s.config(e), s;
1389
+ }
1390
+ function jt(e, n) {
1391
+ return new this(e).div(n);
1392
+ }
1393
+ function Vt(e) {
1394
+ return new this(e).exp();
1395
+ }
1396
+ function Kt(e) {
1397
+ return F(e = new this(e), e.e + 1, 3);
1398
+ }
1399
+ function Gt() {
1400
+ var e, n, r = new this(0);
1401
+ for (W = !1, e = 0; e < arguments.length; )
1402
+ if (n = new this(arguments[e++]), n.d)
1403
+ r.d && (r = r.plus(n.times(n)));
1404
+ else {
1405
+ if (n.s)
1406
+ return W = !0, new this(1 / 0);
1407
+ r = n;
1408
+ }
1409
+ return W = !0, r.sqrt();
1410
+ }
1411
+ function Ue(e) {
1412
+ return e instanceof Be || e && e.toStringTag === rt || !1;
1413
+ }
1414
+ function Qt(e) {
1415
+ return new this(e).ln();
1416
+ }
1417
+ function Jt(e, n) {
1418
+ return new this(e).log(n);
1419
+ }
1420
+ function Xt(e) {
1421
+ return new this(e).log(2);
1422
+ }
1423
+ function er(e) {
1424
+ return new this(e).log(10);
1425
+ }
1426
+ function tr() {
1427
+ return ot(this, arguments, -1);
1428
+ }
1429
+ function rr() {
1430
+ return ot(this, arguments, 1);
1431
+ }
1432
+ function nr(e, n) {
1433
+ return new this(e).mod(n);
1434
+ }
1435
+ function ir(e, n) {
1436
+ return new this(e).mul(n);
1437
+ }
1438
+ function sr(e, n) {
1439
+ return new this(e).pow(n);
1440
+ }
1441
+ function or(e) {
1442
+ var n, r, t, s, i = 0, a = new this(1), u = [];
1443
+ if (e === void 0 ? e = this.precision : Q(e, 1, ue), t = Math.ceil(e / L), this.crypto)
1444
+ if (crypto.getRandomValues)
1445
+ for (n = crypto.getRandomValues(new Uint32Array(t)); i < t; )
1446
+ s = n[i], s >= 429e7 ? n[i] = crypto.getRandomValues(new Uint32Array(1))[0] : u[i++] = s % 1e7;
1447
+ else if (crypto.randomBytes) {
1448
+ for (n = crypto.randomBytes(t *= 4); i < t; )
1449
+ s = n[i] + (n[i + 1] << 8) + (n[i + 2] << 16) + ((n[i + 3] & 127) << 24), s >= 214e7 ? crypto.randomBytes(4).copy(n, i) : (u.push(s % 1e7), i += 4);
1450
+ i = t / 4;
1451
+ } else
1452
+ throw Error(tt);
1453
+ else for (; i < t; ) u[i++] = Math.random() * 1e7 | 0;
1454
+ for (t = u[--i], e %= L, t && e && (s = Y(10, L - e), u[i] = (t / s | 0) * s); u[i] === 0; i--) u.pop();
1455
+ if (i < 0)
1456
+ r = 0, u = [0];
1457
+ else {
1458
+ for (r = -1; u[0] === 0; r -= L) u.shift();
1459
+ for (t = 1, s = u[0]; s >= 10; s /= 10) t++;
1460
+ t < L && (r -= L - t);
1461
+ }
1462
+ return a.e = r, a.d = u, a;
1463
+ }
1464
+ function ar(e) {
1465
+ return F(e = new this(e), e.e + 1, this.rounding);
1466
+ }
1467
+ function ur(e) {
1468
+ return e = new this(e), e.d ? e.d[0] ? e.s : 0 * e.s : e.s || NaN;
1469
+ }
1470
+ function fr(e) {
1471
+ return new this(e).sin();
1472
+ }
1473
+ function cr(e) {
1474
+ return new this(e).sinh();
1475
+ }
1476
+ function lr(e) {
1477
+ return new this(e).sqrt();
1478
+ }
1479
+ function hr(e, n) {
1480
+ return new this(e).sub(n);
1481
+ }
1482
+ function dr() {
1483
+ var e = 0, n = arguments, r = new this(n[e]);
1484
+ for (W = !1; r.s && ++e < n.length; ) r = r.plus(n[e]);
1485
+ return W = !0, F(r, this.precision, this.rounding);
1486
+ }
1487
+ function pr(e) {
1488
+ return new this(e).tan();
1489
+ }
1490
+ function vr(e) {
1491
+ return new this(e).tanh();
1492
+ }
1493
+ function gr(e) {
1494
+ return F(e = new this(e), e.e + 1, 1);
1495
+ }
1496
+ D[Symbol.for("nodejs.util.inspect.custom")] = D.toString;
1497
+ D[Symbol.toStringTag] = "Decimal";
1498
+ var Be = D.constructor = ft(Te);
1499
+ xe = new Be(xe);
1500
+ $e = new Be($e);
1501
+ var mr = { exports: {} };
1502
+ function wr(e) {
1503
+ throw new Error('Could not dynamically require "' + e + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
1504
+ }
1505
+ var Ee = { exports: {} };
1506
+ const _r = {}, yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1507
+ __proto__: null,
1508
+ default: _r
1509
+ }, Symbol.toStringTag, { value: "Module" })), xr = /* @__PURE__ */ ht(yr);
1510
+ var We;
1511
+ function re() {
1512
+ return We || (We = 1, function(e, n) {
1513
+ (function(r, t) {
1514
+ e.exports = t();
1515
+ })(j, function() {
1516
+ var r = r || function(t, s) {
1517
+ var i;
1518
+ if (typeof window < "u" && window.crypto && (i = window.crypto), typeof self < "u" && self.crypto && (i = self.crypto), typeof globalThis < "u" && globalThis.crypto && (i = globalThis.crypto), !i && typeof window < "u" && window.msCrypto && (i = window.msCrypto), !i && typeof j < "u" && j.crypto && (i = j.crypto), !i && typeof wr == "function")
1519
+ try {
1520
+ i = xr;
1521
+ } catch {
1522
+ }
1523
+ var a = function() {
1524
+ if (i) {
1525
+ if (typeof i.getRandomValues == "function")
1526
+ try {
1527
+ return i.getRandomValues(new Uint32Array(1))[0];
1528
+ } catch {
1529
+ }
1530
+ if (typeof i.randomBytes == "function")
1531
+ try {
1532
+ return i.randomBytes(4).readInt32LE();
1533
+ } catch {
1534
+ }
1535
+ }
1536
+ throw new Error("Native crypto module could not be used to get secure random number.");
1537
+ }, u = Object.create || /* @__PURE__ */ function() {
1538
+ function g() {
1539
+ }
1540
+ return function(d) {
1541
+ var _;
1542
+ return g.prototype = d, _ = new g(), g.prototype = null, _;
1543
+ };
1544
+ }(), f = {}, o = f.lib = {}, c = o.Base = /* @__PURE__ */ function() {
1545
+ return {
1546
+ /**
1547
+ * Creates a new object that inherits from this object.
1548
+ *
1549
+ * @param {Object} overrides Properties to copy into the new object.
1550
+ *
1551
+ * @return {Object} The new object.
1552
+ *
1553
+ * @static
1554
+ *
1555
+ * @example
1556
+ *
1557
+ * var MyType = CryptoJS.lib.Base.extend({
1558
+ * field: 'value',
1559
+ *
1560
+ * method: function () {
1561
+ * }
1562
+ * });
1563
+ */
1564
+ extend: function(g) {
1565
+ var d = u(this);
1566
+ return g && d.mixIn(g), (!d.hasOwnProperty("init") || this.init === d.init) && (d.init = function() {
1567
+ d.$super.init.apply(this, arguments);
1568
+ }), d.init.prototype = d, d.$super = this, d;
1569
+ },
1570
+ /**
1571
+ * Extends this object and runs the init method.
1572
+ * Arguments to create() will be passed to init().
1573
+ *
1574
+ * @return {Object} The new object.
1575
+ *
1576
+ * @static
1577
+ *
1578
+ * @example
1579
+ *
1580
+ * var instance = MyType.create();
1581
+ */
1582
+ create: function() {
1583
+ var g = this.extend();
1584
+ return g.init.apply(g, arguments), g;
1585
+ },
1586
+ /**
1587
+ * Initializes a newly created object.
1588
+ * Override this method to add some logic when your objects are created.
1589
+ *
1590
+ * @example
1591
+ *
1592
+ * var MyType = CryptoJS.lib.Base.extend({
1593
+ * init: function () {
1594
+ * // ...
1595
+ * }
1596
+ * });
1597
+ */
1598
+ init: function() {
1599
+ },
1600
+ /**
1601
+ * Copies properties into this object.
1602
+ *
1603
+ * @param {Object} properties The properties to mix in.
1604
+ *
1605
+ * @example
1606
+ *
1607
+ * MyType.mixIn({
1608
+ * field: 'value'
1609
+ * });
1610
+ */
1611
+ mixIn: function(g) {
1612
+ for (var d in g)
1613
+ g.hasOwnProperty(d) && (this[d] = g[d]);
1614
+ g.hasOwnProperty("toString") && (this.toString = g.toString);
1615
+ },
1616
+ /**
1617
+ * Creates a copy of this object.
1618
+ *
1619
+ * @return {Object} The clone.
1620
+ *
1621
+ * @example
1622
+ *
1623
+ * var clone = instance.clone();
1624
+ */
1625
+ clone: function() {
1626
+ return this.init.prototype.extend(this);
1627
+ }
1628
+ };
1629
+ }(), h = o.WordArray = c.extend({
1630
+ /**
1631
+ * Initializes a newly created word array.
1632
+ *
1633
+ * @param {Array} words (Optional) An array of 32-bit words.
1634
+ * @param {number} sigBytes (Optional) The number of significant bytes in the words.
1635
+ *
1636
+ * @example
1637
+ *
1638
+ * var wordArray = CryptoJS.lib.WordArray.create();
1639
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
1640
+ * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
1641
+ */
1642
+ init: function(g, d) {
1643
+ g = this.words = g || [], d != s ? this.sigBytes = d : this.sigBytes = g.length * 4;
1644
+ },
1645
+ /**
1646
+ * Converts this word array to a string.
1647
+ *
1648
+ * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
1649
+ *
1650
+ * @return {string} The stringified word array.
1651
+ *
1652
+ * @example
1653
+ *
1654
+ * var string = wordArray + '';
1655
+ * var string = wordArray.toString();
1656
+ * var string = wordArray.toString(CryptoJS.enc.Utf8);
1657
+ */
1658
+ toString: function(g) {
1659
+ return (g || m).stringify(this);
1660
+ },
1661
+ /**
1662
+ * Concatenates a word array to this word array.
1663
+ *
1664
+ * @param {WordArray} wordArray The word array to append.
1665
+ *
1666
+ * @return {WordArray} This word array.
1667
+ *
1668
+ * @example
1669
+ *
1670
+ * wordArray1.concat(wordArray2);
1671
+ */
1672
+ concat: function(g) {
1673
+ var d = this.words, _ = g.words, B = this.sigBytes, O = g.sigBytes;
1674
+ if (this.clamp(), B % 4)
1675
+ for (var P = 0; P < O; P++) {
1676
+ var U = _[P >>> 2] >>> 24 - P % 4 * 8 & 255;
1677
+ d[B + P >>> 2] |= U << 24 - (B + P) % 4 * 8;
1678
+ }
1679
+ else
1680
+ for (var q = 0; q < O; q += 4)
1681
+ d[B + q >>> 2] = _[q >>> 2];
1682
+ return this.sigBytes += O, this;
1683
+ },
1684
+ /**
1685
+ * Removes insignificant bits.
1686
+ *
1687
+ * @example
1688
+ *
1689
+ * wordArray.clamp();
1690
+ */
1691
+ clamp: function() {
1692
+ var g = this.words, d = this.sigBytes;
1693
+ g[d >>> 2] &= 4294967295 << 32 - d % 4 * 8, g.length = t.ceil(d / 4);
1694
+ },
1695
+ /**
1696
+ * Creates a copy of this word array.
1697
+ *
1698
+ * @return {WordArray} The clone.
1699
+ *
1700
+ * @example
1701
+ *
1702
+ * var clone = wordArray.clone();
1703
+ */
1704
+ clone: function() {
1705
+ var g = c.clone.call(this);
1706
+ return g.words = this.words.slice(0), g;
1707
+ },
1708
+ /**
1709
+ * Creates a word array filled with random bytes.
1710
+ *
1711
+ * @param {number} nBytes The number of random bytes to generate.
1712
+ *
1713
+ * @return {WordArray} The random word array.
1714
+ *
1715
+ * @static
1716
+ *
1717
+ * @example
1718
+ *
1719
+ * var wordArray = CryptoJS.lib.WordArray.random(16);
1720
+ */
1721
+ random: function(g) {
1722
+ for (var d = [], _ = 0; _ < g; _ += 4)
1723
+ d.push(a());
1724
+ return new h.init(d, g);
1725
+ }
1726
+ }), l = f.enc = {}, m = l.Hex = {
1727
+ /**
1728
+ * Converts a word array to a hex string.
1729
+ *
1730
+ * @param {WordArray} wordArray The word array.
1731
+ *
1732
+ * @return {string} The hex string.
1733
+ *
1734
+ * @static
1735
+ *
1736
+ * @example
1737
+ *
1738
+ * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
1739
+ */
1740
+ stringify: function(g) {
1741
+ for (var d = g.words, _ = g.sigBytes, B = [], O = 0; O < _; O++) {
1742
+ var P = d[O >>> 2] >>> 24 - O % 4 * 8 & 255;
1743
+ B.push((P >>> 4).toString(16)), B.push((P & 15).toString(16));
1744
+ }
1745
+ return B.join("");
1746
+ },
1747
+ /**
1748
+ * Converts a hex string to a word array.
1749
+ *
1750
+ * @param {string} hexStr The hex string.
1751
+ *
1752
+ * @return {WordArray} The word array.
1753
+ *
1754
+ * @static
1755
+ *
1756
+ * @example
1757
+ *
1758
+ * var wordArray = CryptoJS.enc.Hex.parse(hexString);
1759
+ */
1760
+ parse: function(g) {
1761
+ for (var d = g.length, _ = [], B = 0; B < d; B += 2)
1762
+ _[B >>> 3] |= parseInt(g.substr(B, 2), 16) << 24 - B % 8 * 4;
1763
+ return new h.init(_, d / 2);
1764
+ }
1765
+ }, $ = l.Latin1 = {
1766
+ /**
1767
+ * Converts a word array to a Latin1 string.
1768
+ *
1769
+ * @param {WordArray} wordArray The word array.
1770
+ *
1771
+ * @return {string} The Latin1 string.
1772
+ *
1773
+ * @static
1774
+ *
1775
+ * @example
1776
+ *
1777
+ * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
1778
+ */
1779
+ stringify: function(g) {
1780
+ for (var d = g.words, _ = g.sigBytes, B = [], O = 0; O < _; O++) {
1781
+ var P = d[O >>> 2] >>> 24 - O % 4 * 8 & 255;
1782
+ B.push(String.fromCharCode(P));
1783
+ }
1784
+ return B.join("");
1785
+ },
1786
+ /**
1787
+ * Converts a Latin1 string to a word array.
1788
+ *
1789
+ * @param {string} latin1Str The Latin1 string.
1790
+ *
1791
+ * @return {WordArray} The word array.
1792
+ *
1793
+ * @static
1794
+ *
1795
+ * @example
1796
+ *
1797
+ * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
1798
+ */
1799
+ parse: function(g) {
1800
+ for (var d = g.length, _ = [], B = 0; B < d; B++)
1801
+ _[B >>> 2] |= (g.charCodeAt(B) & 255) << 24 - B % 4 * 8;
1802
+ return new h.init(_, d);
1803
+ }
1804
+ }, p = l.Utf8 = {
1805
+ /**
1806
+ * Converts a word array to a UTF-8 string.
1807
+ *
1808
+ * @param {WordArray} wordArray The word array.
1809
+ *
1810
+ * @return {string} The UTF-8 string.
1811
+ *
1812
+ * @static
1813
+ *
1814
+ * @example
1815
+ *
1816
+ * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
1817
+ */
1818
+ stringify: function(g) {
1819
+ try {
1820
+ return decodeURIComponent(escape($.stringify(g)));
1821
+ } catch {
1822
+ throw new Error("Malformed UTF-8 data");
1823
+ }
1824
+ },
1825
+ /**
1826
+ * Converts a UTF-8 string to a word array.
1827
+ *
1828
+ * @param {string} utf8Str The UTF-8 string.
1829
+ *
1830
+ * @return {WordArray} The word array.
1831
+ *
1832
+ * @static
1833
+ *
1834
+ * @example
1835
+ *
1836
+ * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
1837
+ */
1838
+ parse: function(g) {
1839
+ return $.parse(unescape(encodeURIComponent(g)));
1840
+ }
1841
+ }, N = o.BufferedBlockAlgorithm = c.extend({
1842
+ /**
1843
+ * Resets this block algorithm's data buffer to its initial state.
1844
+ *
1845
+ * @example
1846
+ *
1847
+ * bufferedBlockAlgorithm.reset();
1848
+ */
1849
+ reset: function() {
1850
+ this._data = new h.init(), this._nDataBytes = 0;
1851
+ },
1852
+ /**
1853
+ * Adds new data to this block algorithm's buffer.
1854
+ *
1855
+ * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
1856
+ *
1857
+ * @example
1858
+ *
1859
+ * bufferedBlockAlgorithm._append('data');
1860
+ * bufferedBlockAlgorithm._append(wordArray);
1861
+ */
1862
+ _append: function(g) {
1863
+ typeof g == "string" && (g = p.parse(g)), this._data.concat(g), this._nDataBytes += g.sigBytes;
1864
+ },
1865
+ /**
1866
+ * Processes available data blocks.
1867
+ *
1868
+ * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
1869
+ *
1870
+ * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
1871
+ *
1872
+ * @return {WordArray} The processed data.
1873
+ *
1874
+ * @example
1875
+ *
1876
+ * var processedData = bufferedBlockAlgorithm._process();
1877
+ * var processedData = bufferedBlockAlgorithm._process(!!'flush');
1878
+ */
1879
+ _process: function(g) {
1880
+ var d, _ = this._data, B = _.words, O = _.sigBytes, P = this.blockSize, U = P * 4, q = O / U;
1881
+ g ? q = t.ceil(q) : q = t.max((q | 0) - this._minBufferSize, 0);
1882
+ var v = q * P, w = t.min(v * 4, O);
1883
+ if (v) {
1884
+ for (var A = 0; A < v; A += P)
1885
+ this._doProcessBlock(B, A);
1886
+ d = B.splice(0, v), _.sigBytes -= w;
1887
+ }
1888
+ return new h.init(d, w);
1889
+ },
1890
+ /**
1891
+ * Creates a copy of this object.
1892
+ *
1893
+ * @return {Object} The clone.
1894
+ *
1895
+ * @example
1896
+ *
1897
+ * var clone = bufferedBlockAlgorithm.clone();
1898
+ */
1899
+ clone: function() {
1900
+ var g = c.clone.call(this);
1901
+ return g._data = this._data.clone(), g;
1902
+ },
1903
+ _minBufferSize: 0
1904
+ });
1905
+ o.Hasher = N.extend({
1906
+ /**
1907
+ * Configuration options.
1908
+ */
1909
+ cfg: c.extend(),
1910
+ /**
1911
+ * Initializes a newly created hasher.
1912
+ *
1913
+ * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
1914
+ *
1915
+ * @example
1916
+ *
1917
+ * var hasher = CryptoJS.algo.SHA256.create();
1918
+ */
1919
+ init: function(g) {
1920
+ this.cfg = this.cfg.extend(g), this.reset();
1921
+ },
1922
+ /**
1923
+ * Resets this hasher to its initial state.
1924
+ *
1925
+ * @example
1926
+ *
1927
+ * hasher.reset();
1928
+ */
1929
+ reset: function() {
1930
+ N.reset.call(this), this._doReset();
1931
+ },
1932
+ /**
1933
+ * Updates this hasher with a message.
1934
+ *
1935
+ * @param {WordArray|string} messageUpdate The message to append.
1936
+ *
1937
+ * @return {Hasher} This hasher.
1938
+ *
1939
+ * @example
1940
+ *
1941
+ * hasher.update('message');
1942
+ * hasher.update(wordArray);
1943
+ */
1944
+ update: function(g) {
1945
+ return this._append(g), this._process(), this;
1946
+ },
1947
+ /**
1948
+ * Finalizes the hash computation.
1949
+ * Note that the finalize operation is effectively a destructive, read-once operation.
1950
+ *
1951
+ * @param {WordArray|string} messageUpdate (Optional) A final message update.
1952
+ *
1953
+ * @return {WordArray} The hash.
1954
+ *
1955
+ * @example
1956
+ *
1957
+ * var hash = hasher.finalize();
1958
+ * var hash = hasher.finalize('message');
1959
+ * var hash = hasher.finalize(wordArray);
1960
+ */
1961
+ finalize: function(g) {
1962
+ g && this._append(g);
1963
+ var d = this._doFinalize();
1964
+ return d;
1965
+ },
1966
+ blockSize: 16,
1967
+ /**
1968
+ * Creates a shortcut function to a hasher's object interface.
1969
+ *
1970
+ * @param {Hasher} hasher The hasher to create a helper for.
1971
+ *
1972
+ * @return {Function} The shortcut function.
1973
+ *
1974
+ * @static
1975
+ *
1976
+ * @example
1977
+ *
1978
+ * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
1979
+ */
1980
+ _createHelper: function(g) {
1981
+ return function(d, _) {
1982
+ return new g.init(_).finalize(d);
1983
+ };
1984
+ },
1985
+ /**
1986
+ * Creates a shortcut function to the HMAC's object interface.
1987
+ *
1988
+ * @param {Hasher} hasher The hasher to use in this HMAC helper.
1989
+ *
1990
+ * @return {Function} The shortcut function.
1991
+ *
1992
+ * @static
1993
+ *
1994
+ * @example
1995
+ *
1996
+ * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
1997
+ */
1998
+ _createHmacHelper: function(g) {
1999
+ return function(d, _) {
2000
+ return new z.HMAC.init(g, _).finalize(d);
2001
+ };
2002
+ }
2003
+ });
2004
+ var z = f.algo = {};
2005
+ return f;
2006
+ }(Math);
2007
+ return r;
2008
+ });
2009
+ }(Ee)), Ee.exports;
2010
+ }
2011
+ var ke = { exports: {} }, Ze;
2012
+ function $r() {
2013
+ return Ze || (Ze = 1, function(e, n) {
2014
+ (function(r, t) {
2015
+ e.exports = t(re());
2016
+ })(j, function(r) {
2017
+ return function() {
2018
+ var t = r, s = t.lib, i = s.WordArray, a = t.enc;
2019
+ a.Base64 = {
2020
+ /**
2021
+ * Converts a word array to a Base64 string.
2022
+ *
2023
+ * @param {WordArray} wordArray The word array.
2024
+ *
2025
+ * @return {string} The Base64 string.
2026
+ *
2027
+ * @static
2028
+ *
2029
+ * @example
2030
+ *
2031
+ * var base64String = CryptoJS.enc.Base64.stringify(wordArray);
2032
+ */
2033
+ stringify: function(f) {
2034
+ var o = f.words, c = f.sigBytes, h = this._map;
2035
+ f.clamp();
2036
+ for (var l = [], m = 0; m < c; m += 3)
2037
+ for (var $ = o[m >>> 2] >>> 24 - m % 4 * 8 & 255, p = o[m + 1 >>> 2] >>> 24 - (m + 1) % 4 * 8 & 255, N = o[m + 2 >>> 2] >>> 24 - (m + 2) % 4 * 8 & 255, z = $ << 16 | p << 8 | N, g = 0; g < 4 && m + g * 0.75 < c; g++)
2038
+ l.push(h.charAt(z >>> 6 * (3 - g) & 63));
2039
+ var d = h.charAt(64);
2040
+ if (d)
2041
+ for (; l.length % 4; )
2042
+ l.push(d);
2043
+ return l.join("");
2044
+ },
2045
+ /**
2046
+ * Converts a Base64 string to a word array.
2047
+ *
2048
+ * @param {string} base64Str The Base64 string.
2049
+ *
2050
+ * @return {WordArray} The word array.
2051
+ *
2052
+ * @static
2053
+ *
2054
+ * @example
2055
+ *
2056
+ * var wordArray = CryptoJS.enc.Base64.parse(base64String);
2057
+ */
2058
+ parse: function(f) {
2059
+ var o = f.length, c = this._map, h = this._reverseMap;
2060
+ if (!h) {
2061
+ h = this._reverseMap = [];
2062
+ for (var l = 0; l < c.length; l++)
2063
+ h[c.charCodeAt(l)] = l;
2064
+ }
2065
+ var m = c.charAt(64);
2066
+ if (m) {
2067
+ var $ = f.indexOf(m);
2068
+ $ !== -1 && (o = $);
2069
+ }
2070
+ return u(f, o, h);
2071
+ },
2072
+ _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
2073
+ };
2074
+ function u(f, o, c) {
2075
+ for (var h = [], l = 0, m = 0; m < o; m++)
2076
+ if (m % 4) {
2077
+ var $ = c[f.charCodeAt(m - 1)] << m % 4 * 2, p = c[f.charCodeAt(m)] >>> 6 - m % 4 * 2, N = $ | p;
2078
+ h[l >>> 2] |= N << 24 - l % 4 * 8, l++;
2079
+ }
2080
+ return i.create(h, l);
2081
+ }
2082
+ }(), r.enc.Base64;
2083
+ });
2084
+ }(ke)), ke.exports;
2085
+ }
2086
+ var Me = { exports: {} }, Ye;
2087
+ function Cr() {
2088
+ return Ye || (Ye = 1, function(e, n) {
2089
+ (function(r, t) {
2090
+ e.exports = t(re());
2091
+ })(j, function(r) {
2092
+ return function(t) {
2093
+ var s = r, i = s.lib, a = i.WordArray, u = i.Hasher, f = s.algo, o = [];
2094
+ (function() {
2095
+ for (var p = 0; p < 64; p++)
2096
+ o[p] = t.abs(t.sin(p + 1)) * 4294967296 | 0;
2097
+ })();
2098
+ var c = f.MD5 = u.extend({
2099
+ _doReset: function() {
2100
+ this._hash = new a.init([
2101
+ 1732584193,
2102
+ 4023233417,
2103
+ 2562383102,
2104
+ 271733878
2105
+ ]);
2106
+ },
2107
+ _doProcessBlock: function(p, N) {
2108
+ for (var z = 0; z < 16; z++) {
2109
+ var g = N + z, d = p[g];
2110
+ p[g] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360;
2111
+ }
2112
+ var _ = this._hash.words, B = p[N + 0], O = p[N + 1], P = p[N + 2], U = p[N + 3], q = p[N + 4], v = p[N + 5], w = p[N + 6], A = p[N + 7], b = p[N + 8], M = p[N + 9], x = p[N + 10], y = p[N + 11], T = p[N + 12], H = p[N + 13], I = p[N + 14], R = p[N + 15], C = _[0], S = _[1], E = _[2], k = _[3];
2113
+ C = h(C, S, E, k, B, 7, o[0]), k = h(k, C, S, E, O, 12, o[1]), E = h(E, k, C, S, P, 17, o[2]), S = h(S, E, k, C, U, 22, o[3]), C = h(C, S, E, k, q, 7, o[4]), k = h(k, C, S, E, v, 12, o[5]), E = h(E, k, C, S, w, 17, o[6]), S = h(S, E, k, C, A, 22, o[7]), C = h(C, S, E, k, b, 7, o[8]), k = h(k, C, S, E, M, 12, o[9]), E = h(E, k, C, S, x, 17, o[10]), S = h(S, E, k, C, y, 22, o[11]), C = h(C, S, E, k, T, 7, o[12]), k = h(k, C, S, E, H, 12, o[13]), E = h(E, k, C, S, I, 17, o[14]), S = h(S, E, k, C, R, 22, o[15]), C = l(C, S, E, k, O, 5, o[16]), k = l(k, C, S, E, w, 9, o[17]), E = l(E, k, C, S, y, 14, o[18]), S = l(S, E, k, C, B, 20, o[19]), C = l(C, S, E, k, v, 5, o[20]), k = l(k, C, S, E, x, 9, o[21]), E = l(E, k, C, S, R, 14, o[22]), S = l(S, E, k, C, q, 20, o[23]), C = l(C, S, E, k, M, 5, o[24]), k = l(k, C, S, E, I, 9, o[25]), E = l(E, k, C, S, U, 14, o[26]), S = l(S, E, k, C, b, 20, o[27]), C = l(C, S, E, k, H, 5, o[28]), k = l(k, C, S, E, P, 9, o[29]), E = l(E, k, C, S, A, 14, o[30]), S = l(S, E, k, C, T, 20, o[31]), C = m(C, S, E, k, v, 4, o[32]), k = m(k, C, S, E, b, 11, o[33]), E = m(E, k, C, S, y, 16, o[34]), S = m(S, E, k, C, I, 23, o[35]), C = m(C, S, E, k, O, 4, o[36]), k = m(k, C, S, E, q, 11, o[37]), E = m(E, k, C, S, A, 16, o[38]), S = m(S, E, k, C, x, 23, o[39]), C = m(C, S, E, k, H, 4, o[40]), k = m(k, C, S, E, B, 11, o[41]), E = m(E, k, C, S, U, 16, o[42]), S = m(S, E, k, C, w, 23, o[43]), C = m(C, S, E, k, M, 4, o[44]), k = m(k, C, S, E, T, 11, o[45]), E = m(E, k, C, S, R, 16, o[46]), S = m(S, E, k, C, P, 23, o[47]), C = $(C, S, E, k, B, 6, o[48]), k = $(k, C, S, E, A, 10, o[49]), E = $(E, k, C, S, I, 15, o[50]), S = $(S, E, k, C, v, 21, o[51]), C = $(C, S, E, k, T, 6, o[52]), k = $(k, C, S, E, U, 10, o[53]), E = $(E, k, C, S, x, 15, o[54]), S = $(S, E, k, C, O, 21, o[55]), C = $(C, S, E, k, b, 6, o[56]), k = $(k, C, S, E, R, 10, o[57]), E = $(E, k, C, S, w, 15, o[58]), S = $(S, E, k, C, H, 21, o[59]), C = $(C, S, E, k, q, 6, o[60]), k = $(k, C, S, E, y, 10, o[61]), E = $(E, k, C, S, P, 15, o[62]), S = $(S, E, k, C, M, 21, o[63]), _[0] = _[0] + C | 0, _[1] = _[1] + S | 0, _[2] = _[2] + E | 0, _[3] = _[3] + k | 0;
2114
+ },
2115
+ _doFinalize: function() {
2116
+ var p = this._data, N = p.words, z = this._nDataBytes * 8, g = p.sigBytes * 8;
2117
+ N[g >>> 5] |= 128 << 24 - g % 32;
2118
+ var d = t.floor(z / 4294967296), _ = z;
2119
+ N[(g + 64 >>> 9 << 4) + 15] = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360, N[(g + 64 >>> 9 << 4) + 14] = (_ << 8 | _ >>> 24) & 16711935 | (_ << 24 | _ >>> 8) & 4278255360, p.sigBytes = (N.length + 1) * 4, this._process();
2120
+ for (var B = this._hash, O = B.words, P = 0; P < 4; P++) {
2121
+ var U = O[P];
2122
+ O[P] = (U << 8 | U >>> 24) & 16711935 | (U << 24 | U >>> 8) & 4278255360;
2123
+ }
2124
+ return B;
2125
+ },
2126
+ clone: function() {
2127
+ var p = u.clone.call(this);
2128
+ return p._hash = this._hash.clone(), p;
2129
+ }
2130
+ });
2131
+ function h(p, N, z, g, d, _, B) {
2132
+ var O = p + (N & z | ~N & g) + d + B;
2133
+ return (O << _ | O >>> 32 - _) + N;
2134
+ }
2135
+ function l(p, N, z, g, d, _, B) {
2136
+ var O = p + (N & g | z & ~g) + d + B;
2137
+ return (O << _ | O >>> 32 - _) + N;
2138
+ }
2139
+ function m(p, N, z, g, d, _, B) {
2140
+ var O = p + (N ^ z ^ g) + d + B;
2141
+ return (O << _ | O >>> 32 - _) + N;
2142
+ }
2143
+ function $(p, N, z, g, d, _, B) {
2144
+ var O = p + (z ^ (N | ~g)) + d + B;
2145
+ return (O << _ | O >>> 32 - _) + N;
2146
+ }
2147
+ s.MD5 = u._createHelper(c), s.HmacMD5 = u._createHmacHelper(c);
2148
+ }(Math), r.MD5;
2149
+ });
2150
+ }(Me)), Me.exports;
2151
+ }
2152
+ var be = { exports: {} }, Oe = { exports: {} }, je;
2153
+ function Nr() {
2154
+ return je || (je = 1, function(e, n) {
2155
+ (function(r, t) {
2156
+ e.exports = t(re());
2157
+ })(j, function(r) {
2158
+ return function() {
2159
+ var t = r, s = t.lib, i = s.WordArray, a = s.Hasher, u = t.algo, f = [], o = u.SHA1 = a.extend({
2160
+ _doReset: function() {
2161
+ this._hash = new i.init([
2162
+ 1732584193,
2163
+ 4023233417,
2164
+ 2562383102,
2165
+ 271733878,
2166
+ 3285377520
2167
+ ]);
2168
+ },
2169
+ _doProcessBlock: function(c, h) {
2170
+ for (var l = this._hash.words, m = l[0], $ = l[1], p = l[2], N = l[3], z = l[4], g = 0; g < 80; g++) {
2171
+ if (g < 16)
2172
+ f[g] = c[h + g] | 0;
2173
+ else {
2174
+ var d = f[g - 3] ^ f[g - 8] ^ f[g - 14] ^ f[g - 16];
2175
+ f[g] = d << 1 | d >>> 31;
2176
+ }
2177
+ var _ = (m << 5 | m >>> 27) + z + f[g];
2178
+ g < 20 ? _ += ($ & p | ~$ & N) + 1518500249 : g < 40 ? _ += ($ ^ p ^ N) + 1859775393 : g < 60 ? _ += ($ & p | $ & N | p & N) - 1894007588 : _ += ($ ^ p ^ N) - 899497514, z = N, N = p, p = $ << 30 | $ >>> 2, $ = m, m = _;
2179
+ }
2180
+ l[0] = l[0] + m | 0, l[1] = l[1] + $ | 0, l[2] = l[2] + p | 0, l[3] = l[3] + N | 0, l[4] = l[4] + z | 0;
2181
+ },
2182
+ _doFinalize: function() {
2183
+ var c = this._data, h = c.words, l = this._nDataBytes * 8, m = c.sigBytes * 8;
2184
+ return h[m >>> 5] |= 128 << 24 - m % 32, h[(m + 64 >>> 9 << 4) + 14] = Math.floor(l / 4294967296), h[(m + 64 >>> 9 << 4) + 15] = l, c.sigBytes = h.length * 4, this._process(), this._hash;
2185
+ },
2186
+ clone: function() {
2187
+ var c = a.clone.call(this);
2188
+ return c._hash = this._hash.clone(), c;
2189
+ }
2190
+ });
2191
+ t.SHA1 = a._createHelper(o), t.HmacSHA1 = a._createHmacHelper(o);
2192
+ }(), r.SHA1;
2193
+ });
2194
+ }(Oe)), Oe.exports;
2195
+ }
2196
+ var Ae = { exports: {} }, Ve;
2197
+ function Dr() {
2198
+ return Ve || (Ve = 1, function(e, n) {
2199
+ (function(r, t) {
2200
+ e.exports = t(re());
2201
+ })(j, function(r) {
2202
+ (function() {
2203
+ var t = r, s = t.lib, i = s.Base, a = t.enc, u = a.Utf8, f = t.algo;
2204
+ f.HMAC = i.extend({
2205
+ /**
2206
+ * Initializes a newly created HMAC.
2207
+ *
2208
+ * @param {Hasher} hasher The hash algorithm to use.
2209
+ * @param {WordArray|string} key The secret key.
2210
+ *
2211
+ * @example
2212
+ *
2213
+ * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
2214
+ */
2215
+ init: function(o, c) {
2216
+ o = this._hasher = new o.init(), typeof c == "string" && (c = u.parse(c));
2217
+ var h = o.blockSize, l = h * 4;
2218
+ c.sigBytes > l && (c = o.finalize(c)), c.clamp();
2219
+ for (var m = this._oKey = c.clone(), $ = this._iKey = c.clone(), p = m.words, N = $.words, z = 0; z < h; z++)
2220
+ p[z] ^= 1549556828, N[z] ^= 909522486;
2221
+ m.sigBytes = $.sigBytes = l, this.reset();
2222
+ },
2223
+ /**
2224
+ * Resets this HMAC to its initial state.
2225
+ *
2226
+ * @example
2227
+ *
2228
+ * hmacHasher.reset();
2229
+ */
2230
+ reset: function() {
2231
+ var o = this._hasher;
2232
+ o.reset(), o.update(this._iKey);
2233
+ },
2234
+ /**
2235
+ * Updates this HMAC with a message.
2236
+ *
2237
+ * @param {WordArray|string} messageUpdate The message to append.
2238
+ *
2239
+ * @return {HMAC} This HMAC instance.
2240
+ *
2241
+ * @example
2242
+ *
2243
+ * hmacHasher.update('message');
2244
+ * hmacHasher.update(wordArray);
2245
+ */
2246
+ update: function(o) {
2247
+ return this._hasher.update(o), this;
2248
+ },
2249
+ /**
2250
+ * Finalizes the HMAC computation.
2251
+ * Note that the finalize operation is effectively a destructive, read-once operation.
2252
+ *
2253
+ * @param {WordArray|string} messageUpdate (Optional) A final message update.
2254
+ *
2255
+ * @return {WordArray} The HMAC.
2256
+ *
2257
+ * @example
2258
+ *
2259
+ * var hmac = hmacHasher.finalize();
2260
+ * var hmac = hmacHasher.finalize('message');
2261
+ * var hmac = hmacHasher.finalize(wordArray);
2262
+ */
2263
+ finalize: function(o) {
2264
+ var c = this._hasher, h = c.finalize(o);
2265
+ c.reset();
2266
+ var l = c.finalize(this._oKey.clone().concat(h));
2267
+ return l;
2268
+ }
2269
+ });
2270
+ })();
2271
+ });
2272
+ }(Ae)), Ae.exports;
2273
+ }
2274
+ var Ke;
2275
+ function ct() {
2276
+ return Ke || (Ke = 1, function(e, n) {
2277
+ (function(r, t, s) {
2278
+ e.exports = t(re(), Nr(), Dr());
2279
+ })(j, function(r) {
2280
+ return function() {
2281
+ var t = r, s = t.lib, i = s.Base, a = s.WordArray, u = t.algo, f = u.MD5, o = u.EvpKDF = i.extend({
2282
+ /**
2283
+ * Configuration options.
2284
+ *
2285
+ * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
2286
+ * @property {Hasher} hasher The hash algorithm to use. Default: MD5
2287
+ * @property {number} iterations The number of iterations to perform. Default: 1
2288
+ */
2289
+ cfg: i.extend({
2290
+ keySize: 128 / 32,
2291
+ hasher: f,
2292
+ iterations: 1
2293
+ }),
2294
+ /**
2295
+ * Initializes a newly created key derivation function.
2296
+ *
2297
+ * @param {Object} cfg (Optional) The configuration options to use for the derivation.
2298
+ *
2299
+ * @example
2300
+ *
2301
+ * var kdf = CryptoJS.algo.EvpKDF.create();
2302
+ * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
2303
+ * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
2304
+ */
2305
+ init: function(c) {
2306
+ this.cfg = this.cfg.extend(c);
2307
+ },
2308
+ /**
2309
+ * Derives a key from a password.
2310
+ *
2311
+ * @param {WordArray|string} password The password.
2312
+ * @param {WordArray|string} salt A salt.
2313
+ *
2314
+ * @return {WordArray} The derived key.
2315
+ *
2316
+ * @example
2317
+ *
2318
+ * var key = kdf.compute(password, salt);
2319
+ */
2320
+ compute: function(c, h) {
2321
+ for (var l, m = this.cfg, $ = m.hasher.create(), p = a.create(), N = p.words, z = m.keySize, g = m.iterations; N.length < z; ) {
2322
+ l && $.update(l), l = $.update(c).finalize(h), $.reset();
2323
+ for (var d = 1; d < g; d++)
2324
+ l = $.finalize(l), $.reset();
2325
+ p.concat(l);
2326
+ }
2327
+ return p.sigBytes = z * 4, p;
2328
+ }
2329
+ });
2330
+ t.EvpKDF = function(c, h, l) {
2331
+ return o.create(l).compute(c, h);
2332
+ };
2333
+ }(), r.EvpKDF;
2334
+ });
2335
+ }(be)), be.exports;
2336
+ }
2337
+ var ze = { exports: {} }, Ge;
2338
+ function Le() {
2339
+ return Ge || (Ge = 1, function(e, n) {
2340
+ (function(r, t, s) {
2341
+ e.exports = t(re(), ct());
2342
+ })(j, function(r) {
2343
+ r.lib.Cipher || function(t) {
2344
+ var s = r, i = s.lib, a = i.Base, u = i.WordArray, f = i.BufferedBlockAlgorithm, o = s.enc;
2345
+ o.Utf8;
2346
+ var c = o.Base64, h = s.algo, l = h.EvpKDF, m = i.Cipher = f.extend({
2347
+ /**
2348
+ * Configuration options.
2349
+ *
2350
+ * @property {WordArray} iv The IV to use for this operation.
2351
+ */
2352
+ cfg: a.extend(),
2353
+ /**
2354
+ * Creates this cipher in encryption mode.
2355
+ *
2356
+ * @param {WordArray} key The key.
2357
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
2358
+ *
2359
+ * @return {Cipher} A cipher instance.
2360
+ *
2361
+ * @static
2362
+ *
2363
+ * @example
2364
+ *
2365
+ * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
2366
+ */
2367
+ createEncryptor: function(v, w) {
2368
+ return this.create(this._ENC_XFORM_MODE, v, w);
2369
+ },
2370
+ /**
2371
+ * Creates this cipher in decryption mode.
2372
+ *
2373
+ * @param {WordArray} key The key.
2374
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
2375
+ *
2376
+ * @return {Cipher} A cipher instance.
2377
+ *
2378
+ * @static
2379
+ *
2380
+ * @example
2381
+ *
2382
+ * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
2383
+ */
2384
+ createDecryptor: function(v, w) {
2385
+ return this.create(this._DEC_XFORM_MODE, v, w);
2386
+ },
2387
+ /**
2388
+ * Initializes a newly created cipher.
2389
+ *
2390
+ * @param {number} xformMode Either the encryption or decryption transormation mode constant.
2391
+ * @param {WordArray} key The key.
2392
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
2393
+ *
2394
+ * @example
2395
+ *
2396
+ * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
2397
+ */
2398
+ init: function(v, w, A) {
2399
+ this.cfg = this.cfg.extend(A), this._xformMode = v, this._key = w, this.reset();
2400
+ },
2401
+ /**
2402
+ * Resets this cipher to its initial state.
2403
+ *
2404
+ * @example
2405
+ *
2406
+ * cipher.reset();
2407
+ */
2408
+ reset: function() {
2409
+ f.reset.call(this), this._doReset();
2410
+ },
2411
+ /**
2412
+ * Adds data to be encrypted or decrypted.
2413
+ *
2414
+ * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
2415
+ *
2416
+ * @return {WordArray} The data after processing.
2417
+ *
2418
+ * @example
2419
+ *
2420
+ * var encrypted = cipher.process('data');
2421
+ * var encrypted = cipher.process(wordArray);
2422
+ */
2423
+ process: function(v) {
2424
+ return this._append(v), this._process();
2425
+ },
2426
+ /**
2427
+ * Finalizes the encryption or decryption process.
2428
+ * Note that the finalize operation is effectively a destructive, read-once operation.
2429
+ *
2430
+ * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
2431
+ *
2432
+ * @return {WordArray} The data after final processing.
2433
+ *
2434
+ * @example
2435
+ *
2436
+ * var encrypted = cipher.finalize();
2437
+ * var encrypted = cipher.finalize('data');
2438
+ * var encrypted = cipher.finalize(wordArray);
2439
+ */
2440
+ finalize: function(v) {
2441
+ v && this._append(v);
2442
+ var w = this._doFinalize();
2443
+ return w;
2444
+ },
2445
+ keySize: 128 / 32,
2446
+ ivSize: 128 / 32,
2447
+ _ENC_XFORM_MODE: 1,
2448
+ _DEC_XFORM_MODE: 2,
2449
+ /**
2450
+ * Creates shortcut functions to a cipher's object interface.
2451
+ *
2452
+ * @param {Cipher} cipher The cipher to create a helper for.
2453
+ *
2454
+ * @return {Object} An object with encrypt and decrypt shortcut functions.
2455
+ *
2456
+ * @static
2457
+ *
2458
+ * @example
2459
+ *
2460
+ * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
2461
+ */
2462
+ _createHelper: /* @__PURE__ */ function() {
2463
+ function v(w) {
2464
+ return typeof w == "string" ? q : O;
2465
+ }
2466
+ return function(w) {
2467
+ return {
2468
+ encrypt: function(A, b, M) {
2469
+ return v(b).encrypt(w, A, b, M);
2470
+ },
2471
+ decrypt: function(A, b, M) {
2472
+ return v(b).decrypt(w, A, b, M);
2473
+ }
2474
+ };
2475
+ };
2476
+ }()
2477
+ });
2478
+ i.StreamCipher = m.extend({
2479
+ _doFinalize: function() {
2480
+ var v = this._process(!0);
2481
+ return v;
2482
+ },
2483
+ blockSize: 1
2484
+ });
2485
+ var $ = s.mode = {}, p = i.BlockCipherMode = a.extend({
2486
+ /**
2487
+ * Creates this mode for encryption.
2488
+ *
2489
+ * @param {Cipher} cipher A block cipher instance.
2490
+ * @param {Array} iv The IV words.
2491
+ *
2492
+ * @static
2493
+ *
2494
+ * @example
2495
+ *
2496
+ * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
2497
+ */
2498
+ createEncryptor: function(v, w) {
2499
+ return this.Encryptor.create(v, w);
2500
+ },
2501
+ /**
2502
+ * Creates this mode for decryption.
2503
+ *
2504
+ * @param {Cipher} cipher A block cipher instance.
2505
+ * @param {Array} iv The IV words.
2506
+ *
2507
+ * @static
2508
+ *
2509
+ * @example
2510
+ *
2511
+ * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
2512
+ */
2513
+ createDecryptor: function(v, w) {
2514
+ return this.Decryptor.create(v, w);
2515
+ },
2516
+ /**
2517
+ * Initializes a newly created mode.
2518
+ *
2519
+ * @param {Cipher} cipher A block cipher instance.
2520
+ * @param {Array} iv The IV words.
2521
+ *
2522
+ * @example
2523
+ *
2524
+ * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
2525
+ */
2526
+ init: function(v, w) {
2527
+ this._cipher = v, this._iv = w;
2528
+ }
2529
+ }), N = $.CBC = function() {
2530
+ var v = p.extend();
2531
+ v.Encryptor = v.extend({
2532
+ /**
2533
+ * Processes the data block at offset.
2534
+ *
2535
+ * @param {Array} words The data words to operate on.
2536
+ * @param {number} offset The offset where the block starts.
2537
+ *
2538
+ * @example
2539
+ *
2540
+ * mode.processBlock(data.words, offset);
2541
+ */
2542
+ processBlock: function(A, b) {
2543
+ var M = this._cipher, x = M.blockSize;
2544
+ w.call(this, A, b, x), M.encryptBlock(A, b), this._prevBlock = A.slice(b, b + x);
2545
+ }
2546
+ }), v.Decryptor = v.extend({
2547
+ /**
2548
+ * Processes the data block at offset.
2549
+ *
2550
+ * @param {Array} words The data words to operate on.
2551
+ * @param {number} offset The offset where the block starts.
2552
+ *
2553
+ * @example
2554
+ *
2555
+ * mode.processBlock(data.words, offset);
2556
+ */
2557
+ processBlock: function(A, b) {
2558
+ var M = this._cipher, x = M.blockSize, y = A.slice(b, b + x);
2559
+ M.decryptBlock(A, b), w.call(this, A, b, x), this._prevBlock = y;
2560
+ }
2561
+ });
2562
+ function w(A, b, M) {
2563
+ var x, y = this._iv;
2564
+ y ? (x = y, this._iv = t) : x = this._prevBlock;
2565
+ for (var T = 0; T < M; T++)
2566
+ A[b + T] ^= x[T];
2567
+ }
2568
+ return v;
2569
+ }(), z = s.pad = {}, g = z.Pkcs7 = {
2570
+ /**
2571
+ * Pads data using the algorithm defined in PKCS #5/7.
2572
+ *
2573
+ * @param {WordArray} data The data to pad.
2574
+ * @param {number} blockSize The multiple that the data should be padded to.
2575
+ *
2576
+ * @static
2577
+ *
2578
+ * @example
2579
+ *
2580
+ * CryptoJS.pad.Pkcs7.pad(wordArray, 4);
2581
+ */
2582
+ pad: function(v, w) {
2583
+ for (var A = w * 4, b = A - v.sigBytes % A, M = b << 24 | b << 16 | b << 8 | b, x = [], y = 0; y < b; y += 4)
2584
+ x.push(M);
2585
+ var T = u.create(x, b);
2586
+ v.concat(T);
2587
+ },
2588
+ /**
2589
+ * Unpads data that had been padded using the algorithm defined in PKCS #5/7.
2590
+ *
2591
+ * @param {WordArray} data The data to unpad.
2592
+ *
2593
+ * @static
2594
+ *
2595
+ * @example
2596
+ *
2597
+ * CryptoJS.pad.Pkcs7.unpad(wordArray);
2598
+ */
2599
+ unpad: function(v) {
2600
+ var w = v.words[v.sigBytes - 1 >>> 2] & 255;
2601
+ v.sigBytes -= w;
2602
+ }
2603
+ };
2604
+ i.BlockCipher = m.extend({
2605
+ /**
2606
+ * Configuration options.
2607
+ *
2608
+ * @property {Mode} mode The block mode to use. Default: CBC
2609
+ * @property {Padding} padding The padding strategy to use. Default: Pkcs7
2610
+ */
2611
+ cfg: m.cfg.extend({
2612
+ mode: N,
2613
+ padding: g
2614
+ }),
2615
+ reset: function() {
2616
+ var v;
2617
+ m.reset.call(this);
2618
+ var w = this.cfg, A = w.iv, b = w.mode;
2619
+ this._xformMode == this._ENC_XFORM_MODE ? v = b.createEncryptor : (v = b.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == v ? this._mode.init(this, A && A.words) : (this._mode = v.call(b, this, A && A.words), this._mode.__creator = v);
2620
+ },
2621
+ _doProcessBlock: function(v, w) {
2622
+ this._mode.processBlock(v, w);
2623
+ },
2624
+ _doFinalize: function() {
2625
+ var v, w = this.cfg.padding;
2626
+ return this._xformMode == this._ENC_XFORM_MODE ? (w.pad(this._data, this.blockSize), v = this._process(!0)) : (v = this._process(!0), w.unpad(v)), v;
2627
+ },
2628
+ blockSize: 128 / 32
2629
+ });
2630
+ var d = i.CipherParams = a.extend({
2631
+ /**
2632
+ * Initializes a newly created cipher params object.
2633
+ *
2634
+ * @param {Object} cipherParams An object with any of the possible cipher parameters.
2635
+ *
2636
+ * @example
2637
+ *
2638
+ * var cipherParams = CryptoJS.lib.CipherParams.create({
2639
+ * ciphertext: ciphertextWordArray,
2640
+ * key: keyWordArray,
2641
+ * iv: ivWordArray,
2642
+ * salt: saltWordArray,
2643
+ * algorithm: CryptoJS.algo.AES,
2644
+ * mode: CryptoJS.mode.CBC,
2645
+ * padding: CryptoJS.pad.PKCS7,
2646
+ * blockSize: 4,
2647
+ * formatter: CryptoJS.format.OpenSSL
2648
+ * });
2649
+ */
2650
+ init: function(v) {
2651
+ this.mixIn(v);
2652
+ },
2653
+ /**
2654
+ * Converts this cipher params object to a string.
2655
+ *
2656
+ * @param {Format} formatter (Optional) The formatting strategy to use.
2657
+ *
2658
+ * @return {string} The stringified cipher params.
2659
+ *
2660
+ * @throws Error If neither the formatter nor the default formatter is set.
2661
+ *
2662
+ * @example
2663
+ *
2664
+ * var string = cipherParams + '';
2665
+ * var string = cipherParams.toString();
2666
+ * var string = cipherParams.toString(CryptoJS.format.OpenSSL);
2667
+ */
2668
+ toString: function(v) {
2669
+ return (v || this.formatter).stringify(this);
2670
+ }
2671
+ }), _ = s.format = {}, B = _.OpenSSL = {
2672
+ /**
2673
+ * Converts a cipher params object to an OpenSSL-compatible string.
2674
+ *
2675
+ * @param {CipherParams} cipherParams The cipher params object.
2676
+ *
2677
+ * @return {string} The OpenSSL-compatible string.
2678
+ *
2679
+ * @static
2680
+ *
2681
+ * @example
2682
+ *
2683
+ * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
2684
+ */
2685
+ stringify: function(v) {
2686
+ var w, A = v.ciphertext, b = v.salt;
2687
+ return b ? w = u.create([1398893684, 1701076831]).concat(b).concat(A) : w = A, w.toString(c);
2688
+ },
2689
+ /**
2690
+ * Converts an OpenSSL-compatible string to a cipher params object.
2691
+ *
2692
+ * @param {string} openSSLStr The OpenSSL-compatible string.
2693
+ *
2694
+ * @return {CipherParams} The cipher params object.
2695
+ *
2696
+ * @static
2697
+ *
2698
+ * @example
2699
+ *
2700
+ * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
2701
+ */
2702
+ parse: function(v) {
2703
+ var w, A = c.parse(v), b = A.words;
2704
+ return b[0] == 1398893684 && b[1] == 1701076831 && (w = u.create(b.slice(2, 4)), b.splice(0, 4), A.sigBytes -= 16), d.create({ ciphertext: A, salt: w });
2705
+ }
2706
+ }, O = i.SerializableCipher = a.extend({
2707
+ /**
2708
+ * Configuration options.
2709
+ *
2710
+ * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
2711
+ */
2712
+ cfg: a.extend({
2713
+ format: B
2714
+ }),
2715
+ /**
2716
+ * Encrypts a message.
2717
+ *
2718
+ * @param {Cipher} cipher The cipher algorithm to use.
2719
+ * @param {WordArray|string} message The message to encrypt.
2720
+ * @param {WordArray} key The key.
2721
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
2722
+ *
2723
+ * @return {CipherParams} A cipher params object.
2724
+ *
2725
+ * @static
2726
+ *
2727
+ * @example
2728
+ *
2729
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
2730
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
2731
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
2732
+ */
2733
+ encrypt: function(v, w, A, b) {
2734
+ b = this.cfg.extend(b);
2735
+ var M = v.createEncryptor(A, b), x = M.finalize(w), y = M.cfg;
2736
+ return d.create({
2737
+ ciphertext: x,
2738
+ key: A,
2739
+ iv: y.iv,
2740
+ algorithm: v,
2741
+ mode: y.mode,
2742
+ padding: y.padding,
2743
+ blockSize: v.blockSize,
2744
+ formatter: b.format
2745
+ });
2746
+ },
2747
+ /**
2748
+ * Decrypts serialized ciphertext.
2749
+ *
2750
+ * @param {Cipher} cipher The cipher algorithm to use.
2751
+ * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
2752
+ * @param {WordArray} key The key.
2753
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
2754
+ *
2755
+ * @return {WordArray} The plaintext.
2756
+ *
2757
+ * @static
2758
+ *
2759
+ * @example
2760
+ *
2761
+ * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
2762
+ * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
2763
+ */
2764
+ decrypt: function(v, w, A, b) {
2765
+ b = this.cfg.extend(b), w = this._parse(w, b.format);
2766
+ var M = v.createDecryptor(A, b).finalize(w.ciphertext);
2767
+ return M;
2768
+ },
2769
+ /**
2770
+ * Converts serialized ciphertext to CipherParams,
2771
+ * else assumed CipherParams already and returns ciphertext unchanged.
2772
+ *
2773
+ * @param {CipherParams|string} ciphertext The ciphertext.
2774
+ * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
2775
+ *
2776
+ * @return {CipherParams} The unserialized ciphertext.
2777
+ *
2778
+ * @static
2779
+ *
2780
+ * @example
2781
+ *
2782
+ * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
2783
+ */
2784
+ _parse: function(v, w) {
2785
+ return typeof v == "string" ? w.parse(v, this) : v;
2786
+ }
2787
+ }), P = s.kdf = {}, U = P.OpenSSL = {
2788
+ /**
2789
+ * Derives a key and IV from a password.
2790
+ *
2791
+ * @param {string} password The password to derive from.
2792
+ * @param {number} keySize The size in words of the key to generate.
2793
+ * @param {number} ivSize The size in words of the IV to generate.
2794
+ * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
2795
+ *
2796
+ * @return {CipherParams} A cipher params object with the key, IV, and salt.
2797
+ *
2798
+ * @static
2799
+ *
2800
+ * @example
2801
+ *
2802
+ * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
2803
+ * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
2804
+ */
2805
+ execute: function(v, w, A, b, M) {
2806
+ if (b || (b = u.random(64 / 8)), M)
2807
+ var x = l.create({ keySize: w + A, hasher: M }).compute(v, b);
2808
+ else
2809
+ var x = l.create({ keySize: w + A }).compute(v, b);
2810
+ var y = u.create(x.words.slice(w), A * 4);
2811
+ return x.sigBytes = w * 4, d.create({ key: x, iv: y, salt: b });
2812
+ }
2813
+ }, q = i.PasswordBasedCipher = O.extend({
2814
+ /**
2815
+ * Configuration options.
2816
+ *
2817
+ * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
2818
+ */
2819
+ cfg: O.cfg.extend({
2820
+ kdf: U
2821
+ }),
2822
+ /**
2823
+ * Encrypts a message using a password.
2824
+ *
2825
+ * @param {Cipher} cipher The cipher algorithm to use.
2826
+ * @param {WordArray|string} message The message to encrypt.
2827
+ * @param {string} password The password.
2828
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
2829
+ *
2830
+ * @return {CipherParams} A cipher params object.
2831
+ *
2832
+ * @static
2833
+ *
2834
+ * @example
2835
+ *
2836
+ * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
2837
+ * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
2838
+ */
2839
+ encrypt: function(v, w, A, b) {
2840
+ b = this.cfg.extend(b);
2841
+ var M = b.kdf.execute(A, v.keySize, v.ivSize, b.salt, b.hasher);
2842
+ b.iv = M.iv;
2843
+ var x = O.encrypt.call(this, v, w, M.key, b);
2844
+ return x.mixIn(M), x;
2845
+ },
2846
+ /**
2847
+ * Decrypts serialized ciphertext using a password.
2848
+ *
2849
+ * @param {Cipher} cipher The cipher algorithm to use.
2850
+ * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
2851
+ * @param {string} password The password.
2852
+ * @param {Object} cfg (Optional) The configuration options to use for this operation.
2853
+ *
2854
+ * @return {WordArray} The plaintext.
2855
+ *
2856
+ * @static
2857
+ *
2858
+ * @example
2859
+ *
2860
+ * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
2861
+ * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
2862
+ */
2863
+ decrypt: function(v, w, A, b) {
2864
+ b = this.cfg.extend(b), w = this._parse(w, b.format);
2865
+ var M = b.kdf.execute(A, v.keySize, v.ivSize, w.salt, b.hasher);
2866
+ b.iv = M.iv;
2867
+ var x = O.decrypt.call(this, v, w, M.key, b);
2868
+ return x;
2869
+ }
2870
+ });
2871
+ }();
2872
+ });
2873
+ }(ze)), ze.exports;
2874
+ }
2875
+ (function(e, n) {
2876
+ (function(r, t, s) {
2877
+ e.exports = t(re(), $r(), Cr(), ct(), Le());
2878
+ })(j, function(r) {
2879
+ return function() {
2880
+ var t = r, s = t.lib, i = s.BlockCipher, a = t.algo, u = [], f = [], o = [], c = [], h = [], l = [], m = [], $ = [], p = [], N = [];
2881
+ (function() {
2882
+ for (var d = [], _ = 0; _ < 256; _++)
2883
+ _ < 128 ? d[_] = _ << 1 : d[_] = _ << 1 ^ 283;
2884
+ for (var B = 0, O = 0, _ = 0; _ < 256; _++) {
2885
+ var P = O ^ O << 1 ^ O << 2 ^ O << 3 ^ O << 4;
2886
+ P = P >>> 8 ^ P & 255 ^ 99, u[B] = P, f[P] = B;
2887
+ var U = d[B], q = d[U], v = d[q], w = d[P] * 257 ^ P * 16843008;
2888
+ o[B] = w << 24 | w >>> 8, c[B] = w << 16 | w >>> 16, h[B] = w << 8 | w >>> 24, l[B] = w;
2889
+ var w = v * 16843009 ^ q * 65537 ^ U * 257 ^ B * 16843008;
2890
+ m[P] = w << 24 | w >>> 8, $[P] = w << 16 | w >>> 16, p[P] = w << 8 | w >>> 24, N[P] = w, B ? (B = U ^ d[d[d[v ^ U]]], O ^= d[d[O]]) : B = O = 1;
2891
+ }
2892
+ })();
2893
+ var z = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], g = a.AES = i.extend({
2894
+ _doReset: function() {
2895
+ var d;
2896
+ if (!(this._nRounds && this._keyPriorReset === this._key)) {
2897
+ for (var _ = this._keyPriorReset = this._key, B = _.words, O = _.sigBytes / 4, P = this._nRounds = O + 6, U = (P + 1) * 4, q = this._keySchedule = [], v = 0; v < U; v++)
2898
+ v < O ? q[v] = B[v] : (d = q[v - 1], v % O ? O > 6 && v % O == 4 && (d = u[d >>> 24] << 24 | u[d >>> 16 & 255] << 16 | u[d >>> 8 & 255] << 8 | u[d & 255]) : (d = d << 8 | d >>> 24, d = u[d >>> 24] << 24 | u[d >>> 16 & 255] << 16 | u[d >>> 8 & 255] << 8 | u[d & 255], d ^= z[v / O | 0] << 24), q[v] = q[v - O] ^ d);
2899
+ for (var w = this._invKeySchedule = [], A = 0; A < U; A++) {
2900
+ var v = U - A;
2901
+ if (A % 4)
2902
+ var d = q[v];
2903
+ else
2904
+ var d = q[v - 4];
2905
+ A < 4 || v <= 4 ? w[A] = d : w[A] = m[u[d >>> 24]] ^ $[u[d >>> 16 & 255]] ^ p[u[d >>> 8 & 255]] ^ N[u[d & 255]];
2906
+ }
2907
+ }
2908
+ },
2909
+ encryptBlock: function(d, _) {
2910
+ this._doCryptBlock(d, _, this._keySchedule, o, c, h, l, u);
2911
+ },
2912
+ decryptBlock: function(d, _) {
2913
+ var B = d[_ + 1];
2914
+ d[_ + 1] = d[_ + 3], d[_ + 3] = B, this._doCryptBlock(d, _, this._invKeySchedule, m, $, p, N, f);
2915
+ var B = d[_ + 1];
2916
+ d[_ + 1] = d[_ + 3], d[_ + 3] = B;
2917
+ },
2918
+ _doCryptBlock: function(d, _, B, O, P, U, q, v) {
2919
+ for (var w = this._nRounds, A = d[_] ^ B[0], b = d[_ + 1] ^ B[1], M = d[_ + 2] ^ B[2], x = d[_ + 3] ^ B[3], y = 4, T = 1; T < w; T++) {
2920
+ var H = O[A >>> 24] ^ P[b >>> 16 & 255] ^ U[M >>> 8 & 255] ^ q[x & 255] ^ B[y++], I = O[b >>> 24] ^ P[M >>> 16 & 255] ^ U[x >>> 8 & 255] ^ q[A & 255] ^ B[y++], R = O[M >>> 24] ^ P[x >>> 16 & 255] ^ U[A >>> 8 & 255] ^ q[b & 255] ^ B[y++], C = O[x >>> 24] ^ P[A >>> 16 & 255] ^ U[b >>> 8 & 255] ^ q[M & 255] ^ B[y++];
2921
+ A = H, b = I, M = R, x = C;
2922
+ }
2923
+ var H = (v[A >>> 24] << 24 | v[b >>> 16 & 255] << 16 | v[M >>> 8 & 255] << 8 | v[x & 255]) ^ B[y++], I = (v[b >>> 24] << 24 | v[M >>> 16 & 255] << 16 | v[x >>> 8 & 255] << 8 | v[A & 255]) ^ B[y++], R = (v[M >>> 24] << 24 | v[x >>> 16 & 255] << 16 | v[A >>> 8 & 255] << 8 | v[b & 255]) ^ B[y++], C = (v[x >>> 24] << 24 | v[A >>> 16 & 255] << 16 | v[b >>> 8 & 255] << 8 | v[M & 255]) ^ B[y++];
2924
+ d[_] = H, d[_ + 1] = I, d[_ + 2] = R, d[_ + 3] = C;
2925
+ },
2926
+ keySize: 256 / 32
2927
+ });
2928
+ t.AES = i._createHelper(g);
2929
+ }(), r.AES;
2930
+ });
2931
+ })(mr);
2932
+ var Sr = { exports: {} };
2933
+ (function(e, n) {
2934
+ (function(r, t) {
2935
+ e.exports = t(re());
2936
+ })(j, function(r) {
2937
+ return r.enc.Utf8;
2938
+ });
2939
+ })(Sr);
2940
+ var Br = { exports: {} };
2941
+ (function(e, n) {
2942
+ (function(r, t, s) {
2943
+ e.exports = t(re(), Le());
2944
+ })(j, function(r) {
2945
+ return r.mode.ECB = function() {
2946
+ var t = r.lib.BlockCipherMode.extend();
2947
+ return t.Encryptor = t.extend({
2948
+ processBlock: function(s, i) {
2949
+ this._cipher.encryptBlock(s, i);
2950
+ }
2951
+ }), t.Decryptor = t.extend({
2952
+ processBlock: function(s, i) {
2953
+ this._cipher.decryptBlock(s, i);
2954
+ }
2955
+ }), t;
2956
+ }(), r.mode.ECB;
2957
+ });
2958
+ })(Br);
2959
+ var Er = { exports: {} };
2960
+ (function(e, n) {
2961
+ (function(r, t, s) {
2962
+ e.exports = t(re(), Le());
2963
+ })(j, function(r) {
2964
+ return r.pad.Pkcs7;
2965
+ });
2966
+ })(Er);
2967
+ export {
2968
+ Be as D,
2969
+ xt as a,
2970
+ Or as b,
2971
+ Je as c,
2972
+ kr as d,
2973
+ zr as e,
2974
+ pt as f,
2975
+ Hr as g,
2976
+ Mr as h,
2977
+ _t as i,
2978
+ yt as j,
2979
+ Ar as k,
2980
+ wt as l,
2981
+ br as m,
2982
+ j as n,
2983
+ lt as o
2984
+ };