@gen-epix/ui-phylogenetic-tree 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,820 @@
1
+ //#region \0rolldown/runtime.js
2
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
3
+ if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
4
+ get: ((e) => i[e]).bind(null, d),
5
+ enumerable: !(s = n(i, d)) || s.enumerable
6
+ });
7
+ return e;
8
+ }, c = (n, r, a) => (a = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule ? t(a, "default", {
9
+ value: n,
10
+ enumerable: !0
11
+ }) : a, n)), l = 9e15, u = 1e9, d = "0123456789abcdef", f = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", p = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", m = {
12
+ precision: 20,
13
+ rounding: 4,
14
+ modulo: 1,
15
+ toExpNeg: -7,
16
+ toExpPos: 21,
17
+ minE: -l,
18
+ maxE: l,
19
+ crypto: !1
20
+ }, h, g, _ = !0, v = "[DecimalError] ", y = v + "Invalid argument: ", b = v + "Precision limit exceeded", x = v + "crypto unavailable", S = "[object Decimal]", C = Math.floor, w = Math.pow, T = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, E = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, D = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, O = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, k = 1e7, A = 7, j = 9007199254740991, M = f.length - 1, N = p.length - 1, P = { toStringTag: S };
21
+ P.absoluteValue = P.abs = function() {
22
+ var e = new this.constructor(this);
23
+ return e.s < 0 && (e.s = 1), B(e);
24
+ }, P.ceil = function() {
25
+ return B(new this.constructor(this), this.e + 1, 2);
26
+ }, P.clampedTo = P.clamp = function(e, t) {
27
+ var n, r = this, i = r.constructor;
28
+ if (e = new i(e), t = new i(t), !e.s || !t.s) return new i(NaN);
29
+ if (e.gt(t)) throw Error(y + t);
30
+ return n = r.cmp(e), n < 0 ? e : r.cmp(t) > 0 ? t : new i(r);
31
+ }, P.comparedTo = P.cmp = function(e) {
32
+ var t, n, r, i, a = this, o = a.d, s = (e = new a.constructor(e)).d, c = a.s, l = e.s;
33
+ if (!o || !s) return !c || !l ? NaN : c === l ? o === s ? 0 : !o ^ c < 0 ? 1 : -1 : c;
34
+ if (!o[0] || !s[0]) return o[0] ? c : s[0] ? -l : 0;
35
+ if (c !== l) return c;
36
+ if (a.e !== e.e) return a.e > e.e ^ c < 0 ? 1 : -1;
37
+ for (r = o.length, i = s.length, t = 0, n = r < i ? r : i; t < n; ++t) if (o[t] !== s[t]) return o[t] > s[t] ^ c < 0 ? 1 : -1;
38
+ return r === i ? 0 : r > i ^ c < 0 ? 1 : -1;
39
+ }, P.cosine = P.cos = function() {
40
+ var e, t, n = this, r = n.constructor;
41
+ return n.d ? n.d[0] ? (e = r.precision, t = r.rounding, r.precision = e + Math.max(n.e, n.sd()) + A, r.rounding = 1, n = ee(r, Z(r, n)), r.precision = e, r.rounding = t, B(g == 2 || g == 3 ? n.neg() : n, e, t, !0)) : new r(1) : new r(NaN);
42
+ }, P.cubeRoot = P.cbrt = function() {
43
+ var e, t, n, r, i, a, o, s, c, l, u = this, d = u.constructor;
44
+ if (!u.isFinite() || u.isZero()) return new d(u);
45
+ for (_ = !1, a = u.s * w(u.s * u, 1 / 3), !a || Math.abs(a) == Infinity ? (n = F(u.d), e = u.e, (a = (e - n.length + 1) % 3) && (n += a == 1 || a == -2 ? "0" : "00"), a = w(n, 1 / 3), e = C((e + 1) / 3) - (e % 3 == (e < 0 ? -1 : 2)), a == Infinity ? n = "5e" + e : (n = a.toExponential(), n = n.slice(0, n.indexOf("e") + 1) + e), r = new d(n), r.s = u.s) : r = new d(a.toString()), o = (e = d.precision) + 3;;) if (s = r, c = s.times(s).times(s), l = c.plus(u), r = z(l.plus(u).times(s), l.plus(c), o + 2, 1), F(s.d).slice(0, o) === (n = F(r.d)).slice(0, o)) if (n = n.slice(o - 3, o + 1), n == "9999" || !i && n == "4999") {
46
+ if (!i && (B(s, e + 1, 0), s.times(s).times(s).eq(u))) {
47
+ r = s;
48
+ break;
49
+ }
50
+ o += 4, i = 1;
51
+ } else {
52
+ (!+n || !+n.slice(1) && n.charAt(0) == "5") && (B(r, e + 1, 1), t = !r.times(r).times(r).eq(u));
53
+ break;
54
+ }
55
+ return _ = !0, B(r, e, d.rounding, t);
56
+ }, P.decimalPlaces = P.dp = function() {
57
+ var e, t = this.d, n = NaN;
58
+ if (t) {
59
+ if (e = t.length - 1, n = (e - C(this.e / A)) * A, e = t[e], e) for (; e % 10 == 0; e /= 10) n--;
60
+ n < 0 && (n = 0);
61
+ }
62
+ return n;
63
+ }, P.dividedBy = P.div = function(e) {
64
+ return z(this, new this.constructor(e));
65
+ }, P.dividedToIntegerBy = P.divToInt = function(e) {
66
+ var t = this, n = t.constructor;
67
+ return B(z(t, new n(e), 0, 1, 1), n.precision, n.rounding);
68
+ }, P.equals = P.eq = function(e) {
69
+ return this.cmp(e) === 0;
70
+ }, P.floor = function() {
71
+ return B(new this.constructor(this), this.e + 1, 3);
72
+ }, P.greaterThan = P.gt = function(e) {
73
+ return this.cmp(e) > 0;
74
+ }, P.greaterThanOrEqualTo = P.gte = function(e) {
75
+ var t = this.cmp(e);
76
+ return t == 1 || t === 0;
77
+ }, P.hyperbolicCosine = P.cosh = function() {
78
+ var e, t, n, r, i, a = this, o = a.constructor, s = new o(1);
79
+ if (!a.isFinite()) return new o(a.s ? Infinity : NaN);
80
+ if (a.isZero()) return s;
81
+ n = o.precision, r = o.rounding, o.precision = n + Math.max(a.e, a.sd()) + 4, o.rounding = 1, i = a.d.length, i < 32 ? (e = Math.ceil(i / 3), t = (1 / X(4, e)).toString()) : (e = 16, t = "2.3283064365386962890625e-10"), a = Y(o, 1, a.times(t), new o(1), !0);
82
+ for (var c, l = e, u = new o(8); l--;) c = a.times(a), a = s.minus(c.times(u.minus(c.times(u))));
83
+ return B(a, o.precision = n, o.rounding = r, !0);
84
+ }, P.hyperbolicSine = P.sinh = function() {
85
+ var e, t, n, r, i = this, a = i.constructor;
86
+ if (!i.isFinite() || i.isZero()) return new a(i);
87
+ if (t = a.precision, n = a.rounding, a.precision = t + Math.max(i.e, i.sd()) + 4, a.rounding = 1, r = i.d.length, r < 3) i = Y(a, 2, i, i, !0);
88
+ else {
89
+ e = 1.4 * Math.sqrt(r), e = e > 16 ? 16 : e | 0, i = i.times(1 / X(5, e)), i = Y(a, 2, i, i, !0);
90
+ for (var o, s = new a(5), c = new a(16), l = new a(20); e--;) o = i.times(i), i = i.times(s.plus(o.times(c.times(o).plus(l))));
91
+ }
92
+ return a.precision = t, a.rounding = n, B(i, t, n, !0);
93
+ }, P.hyperbolicTangent = P.tanh = function() {
94
+ var e, t, n = this, r = n.constructor;
95
+ return n.isFinite() ? n.isZero() ? new r(n) : (e = r.precision, t = r.rounding, r.precision = e + 7, r.rounding = 1, z(n.sinh(), n.cosh(), r.precision = e, r.rounding = t)) : new r(n.s);
96
+ }, P.inverseCosine = P.acos = function() {
97
+ var e = this, t = e.constructor, n = e.abs().cmp(1), r = t.precision, i = t.rounding;
98
+ return n === -1 ? e.isZero() ? W(t, r + 4, i).times(.5) : (t.precision = r + 6, t.rounding = 1, e = new t(1).minus(e).div(e.plus(1)).sqrt().atan(), t.precision = r, t.rounding = i, e.times(2)) : n === 0 ? e.isNeg() ? W(t, r, i) : new t(0) : new t(NaN);
99
+ }, P.inverseHyperbolicCosine = P.acosh = function() {
100
+ var e, t, n = this, r = n.constructor;
101
+ return n.lte(1) ? new r(n.eq(1) ? 0 : NaN) : n.isFinite() ? (e = r.precision, t = r.rounding, r.precision = e + Math.max(Math.abs(n.e), n.sd()) + 4, r.rounding = 1, _ = !1, n = n.times(n).minus(1).sqrt().plus(n), _ = !0, r.precision = e, r.rounding = t, n.ln()) : new r(n);
102
+ }, P.inverseHyperbolicSine = P.asinh = function() {
103
+ var e, t, n = this, r = n.constructor;
104
+ return !n.isFinite() || n.isZero() ? new r(n) : (e = r.precision, t = r.rounding, r.precision = e + 2 * Math.max(Math.abs(n.e), n.sd()) + 6, r.rounding = 1, _ = !1, n = n.times(n).plus(1).sqrt().plus(n), _ = !0, r.precision = e, r.rounding = t, n.ln());
105
+ }, P.inverseHyperbolicTangent = P.atanh = function() {
106
+ var e, t, n, r, i = this, a = i.constructor;
107
+ return i.isFinite() ? i.e >= 0 ? new a(i.abs().eq(1) ? i.s / 0 : i.isZero() ? i : NaN) : (e = a.precision, t = a.rounding, r = i.sd(), Math.max(r, e) < 2 * -i.e - 1 ? B(new a(i), e, t, !0) : (a.precision = n = r - i.e, i = z(i.plus(1), new a(1).minus(i), n + e, 1), a.precision = e + 4, a.rounding = 1, i = i.ln(), a.precision = e, a.rounding = t, i.times(.5))) : new a(NaN);
108
+ }, P.inverseSine = P.asin = function() {
109
+ var e, t, n, r, i = this, a = i.constructor;
110
+ return i.isZero() ? new a(i) : (t = i.abs().cmp(1), n = a.precision, r = a.rounding, t === -1 ? (a.precision = n + 6, a.rounding = 1, i = i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(), a.precision = n, a.rounding = r, i.times(2)) : t === 0 ? (e = W(a, n + 4, r).times(.5), e.s = i.s, e) : new a(NaN));
111
+ }, P.inverseTangent = P.atan = function() {
112
+ var e, t, n, r, i, a, o, s, c, l = this, u = l.constructor, d = u.precision, f = u.rounding;
113
+ if (!l.isFinite()) {
114
+ if (!l.s) return new u(NaN);
115
+ if (d + 4 <= N) return o = W(u, d + 4, f).times(.5), o.s = l.s, o;
116
+ } else if (l.isZero()) return new u(l);
117
+ else if (l.abs().eq(1) && d + 4 <= N) return o = W(u, d + 4, f).times(.25), o.s = l.s, o;
118
+ for (u.precision = s = d + 10, u.rounding = 1, n = Math.min(28, s / A + 2 | 0), e = n; e; --e) l = l.div(l.times(l).plus(1).sqrt().plus(1));
119
+ for (_ = !1, t = Math.ceil(s / A), r = 1, c = l.times(l), o = new u(l), i = l; e !== -1;) if (i = i.times(c), a = o.minus(i.div(r += 2)), i = i.times(c), o = a.plus(i.div(r += 2)), o.d[t] !== void 0) for (e = t; o.d[e] === a.d[e] && e--;);
120
+ return n && (o = o.times(2 << n - 1)), _ = !0, B(o, u.precision = d, u.rounding = f, !0);
121
+ }, P.isFinite = function() {
122
+ return !!this.d;
123
+ }, P.isInteger = P.isInt = function() {
124
+ return !!this.d && C(this.e / A) > this.d.length - 2;
125
+ }, P.isNaN = function() {
126
+ return !this.s;
127
+ }, P.isNegative = P.isNeg = function() {
128
+ return this.s < 0;
129
+ }, P.isPositive = P.isPos = function() {
130
+ return this.s > 0;
131
+ }, P.isZero = function() {
132
+ return !!this.d && this.d[0] === 0;
133
+ }, P.lessThan = P.lt = function(e) {
134
+ return this.cmp(e) < 0;
135
+ }, P.lessThanOrEqualTo = P.lte = function(e) {
136
+ return this.cmp(e) < 1;
137
+ }, P.logarithm = P.log = function(e) {
138
+ var t, n, r, i, a, o, s, c, l = this, u = l.constructor, d = u.precision, f = u.rounding, p = 5;
139
+ if (e == null) e = new u(10), t = !0;
140
+ else {
141
+ if (e = new u(e), n = e.d, e.s < 0 || !n || !n[0] || e.eq(1)) return new u(NaN);
142
+ t = e.eq(10);
143
+ }
144
+ if (n = l.d, l.s < 0 || !n || !n[0] || l.eq(1)) return new u(n && !n[0] ? -Infinity : l.s == 1 ? n ? 0 : Infinity : NaN);
145
+ if (t) if (n.length > 1) a = !0;
146
+ else {
147
+ for (i = n[0]; i % 10 == 0;) i /= 10;
148
+ a = i !== 1;
149
+ }
150
+ if (_ = !1, s = d + p, o = q(l, s), r = t ? U(u, s + 10) : q(e, s), c = z(o, r, s, 1), L(c.d, i = d, f)) do
151
+ if (s += 10, o = q(l, s), r = t ? U(u, s + 10) : q(e, s), c = z(o, r, s, 1), !a) {
152
+ +F(c.d).slice(i + 1, i + 15) + 1 == 0x5af3107a4000 && (c = B(c, d + 1, 0));
153
+ break;
154
+ }
155
+ while (L(c.d, i += 10, f));
156
+ return _ = !0, B(c, d, f);
157
+ }, P.minus = P.sub = function(e) {
158
+ var t, n, r, i, a, o, s, c, l, u, d, f, p = this, m = p.constructor;
159
+ if (e = new m(e), !p.d || !e.d) return !p.s || !e.s ? e = new m(NaN) : p.d ? e.s = -e.s : e = new m(e.d || p.s !== e.s ? p : NaN), e;
160
+ if (p.s != e.s) return e.s = -e.s, p.plus(e);
161
+ if (l = p.d, f = e.d, s = m.precision, c = m.rounding, !l[0] || !f[0]) {
162
+ if (f[0]) e.s = -e.s;
163
+ else if (l[0]) e = new m(p);
164
+ else return new m(c === 3 ? -0 : 0);
165
+ return _ ? B(e, s, c) : e;
166
+ }
167
+ if (n = C(e.e / A), u = C(p.e / A), l = l.slice(), a = u - n, a) {
168
+ for (d = a < 0, d ? (t = l, a = -a, o = f.length) : (t = f, n = u, o = l.length), r = Math.max(Math.ceil(s / A), o) + 2, a > r && (a = r, t.length = 1), t.reverse(), r = a; r--;) t.push(0);
169
+ t.reverse();
170
+ } else {
171
+ for (r = l.length, o = f.length, d = r < o, d && (o = r), r = 0; r < o; r++) if (l[r] != f[r]) {
172
+ d = l[r] < f[r];
173
+ break;
174
+ }
175
+ a = 0;
176
+ }
177
+ for (d && (t = l, l = f, f = t, e.s = -e.s), o = l.length, r = f.length - o; r > 0; --r) l[o++] = 0;
178
+ for (r = f.length; r > a;) {
179
+ if (l[--r] < f[r]) {
180
+ for (i = r; i && l[--i] === 0;) l[i] = k - 1;
181
+ --l[i], l[r] += k;
182
+ }
183
+ l[r] -= f[r];
184
+ }
185
+ for (; l[--o] === 0;) l.pop();
186
+ for (; l[0] === 0; l.shift()) --n;
187
+ return l[0] ? (e.d = l, e.e = H(l, n), _ ? B(e, s, c) : e) : new m(c === 3 ? -0 : 0);
188
+ }, P.modulo = P.mod = function(e) {
189
+ var t, n = this, r = n.constructor;
190
+ return e = new r(e), !n.d || !e.s || e.d && !e.d[0] ? new r(NaN) : !e.d || n.d && !n.d[0] ? B(new r(n), r.precision, r.rounding) : (_ = !1, r.modulo == 9 ? (t = z(n, e.abs(), 0, 3, 1), t.s *= e.s) : t = z(n, e, 0, r.modulo, 1), t = t.times(e), _ = !0, n.minus(t));
191
+ }, P.naturalExponential = P.exp = function() {
192
+ return K(this);
193
+ }, P.naturalLogarithm = P.ln = function() {
194
+ return q(this);
195
+ }, P.negated = P.neg = function() {
196
+ var e = new this.constructor(this);
197
+ return e.s = -e.s, B(e);
198
+ }, P.plus = P.add = function(e) {
199
+ var t, n, r, i, a, o, s, c, l, u, d = this, f = d.constructor;
200
+ if (e = new f(e), !d.d || !e.d) return !d.s || !e.s ? e = new f(NaN) : d.d || (e = new f(e.d || d.s === e.s ? d : NaN)), e;
201
+ if (d.s != e.s) return e.s = -e.s, d.minus(e);
202
+ if (l = d.d, u = e.d, s = f.precision, c = f.rounding, !l[0] || !u[0]) return u[0] || (e = new f(d)), _ ? B(e, s, c) : e;
203
+ if (a = C(d.e / A), r = C(e.e / A), l = l.slice(), i = a - r, i) {
204
+ for (i < 0 ? (n = l, i = -i, o = u.length) : (n = u, r = a, o = l.length), a = Math.ceil(s / A), o = a > o ? a + 1 : o + 1, i > o && (i = o, n.length = 1), n.reverse(); i--;) n.push(0);
205
+ n.reverse();
206
+ }
207
+ for (o = l.length, i = u.length, o - i < 0 && (i = o, n = u, u = l, l = n), t = 0; i;) t = (l[--i] = l[i] + u[i] + t) / k | 0, l[i] %= k;
208
+ for (t && (l.unshift(t), ++r), o = l.length; l[--o] == 0;) l.pop();
209
+ return e.d = l, e.e = H(l, r), _ ? B(e, s, c) : e;
210
+ }, P.precision = P.sd = function(e) {
211
+ var t, n = this;
212
+ if (e !== void 0 && e !== !!e && e !== 1 && e !== 0) throw Error(y + e);
213
+ return n.d ? (t = te(n.d), e && n.e + 1 > t && (t = n.e + 1)) : t = NaN, t;
214
+ }, P.round = function() {
215
+ var e = this, t = e.constructor;
216
+ return B(new t(e), e.e + 1, t.rounding);
217
+ }, P.sine = P.sin = function() {
218
+ var e, t, n = this, r = n.constructor;
219
+ return n.isFinite() ? n.isZero() ? new r(n) : (e = r.precision, t = r.rounding, r.precision = e + Math.max(n.e, n.sd()) + A, r.rounding = 1, n = se(r, Z(r, n)), r.precision = e, r.rounding = t, B(g > 2 ? n.neg() : n, e, t, !0)) : new r(NaN);
220
+ }, P.squareRoot = P.sqrt = function() {
221
+ var e, t, n, r, i, a, o = this, s = o.d, c = o.e, l = o.s, u = o.constructor;
222
+ if (l !== 1 || !s || !s[0]) return new u(!l || l < 0 && (!s || s[0]) ? NaN : s ? o : Infinity);
223
+ for (_ = !1, l = Math.sqrt(+o), l == 0 || l == Infinity ? (t = F(s), (t.length + c) % 2 == 0 && (t += "0"), l = Math.sqrt(t), c = C((c + 1) / 2) - (c < 0 || c % 2), l == Infinity ? t = "5e" + c : (t = l.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + c), r = new u(t)) : r = new u(l.toString()), n = (c = u.precision) + 3;;) if (a = r, r = a.plus(z(o, a, n + 2, 1)).times(.5), F(a.d).slice(0, n) === (t = F(r.d)).slice(0, n)) if (t = t.slice(n - 3, n + 1), t == "9999" || !i && t == "4999") {
224
+ if (!i && (B(a, c + 1, 0), a.times(a).eq(o))) {
225
+ r = a;
226
+ break;
227
+ }
228
+ n += 4, i = 1;
229
+ } else {
230
+ (!+t || !+t.slice(1) && t.charAt(0) == "5") && (B(r, c + 1, 1), e = !r.times(r).eq(o));
231
+ break;
232
+ }
233
+ return _ = !0, B(r, c, u.rounding, e);
234
+ }, P.tangent = P.tan = function() {
235
+ var e, t, n = this, r = n.constructor;
236
+ return n.isFinite() ? n.isZero() ? new r(n) : (e = r.precision, t = r.rounding, r.precision = e + 10, r.rounding = 1, n = n.sin(), n.s = 1, n = z(n, new r(1).minus(n.times(n)).sqrt(), e + 10, 0), r.precision = e, r.rounding = t, B(g == 2 || g == 4 ? n.neg() : n, e, t, !0)) : new r(NaN);
237
+ }, P.times = P.mul = function(e) {
238
+ var t, n, r, i, a, o, s, c, l, u = this, d = u.constructor, f = u.d, p = (e = new d(e)).d;
239
+ if (e.s *= u.s, !f || !f[0] || !p || !p[0]) return new d(!e.s || f && !f[0] && !p || p && !p[0] && !f ? NaN : !f || !p ? e.s / 0 : e.s * 0);
240
+ for (n = C(u.e / A) + C(e.e / A), c = f.length, l = p.length, c < l && (a = f, f = p, p = a, o = c, c = l, l = o), a = [], o = c + l, r = o; r--;) a.push(0);
241
+ for (r = l; --r >= 0;) {
242
+ for (t = 0, i = c + r; i > r;) s = a[i] + p[r] * f[i - r - 1] + t, a[i--] = s % k | 0, t = s / k | 0;
243
+ a[i] = (a[i] + t) % k | 0;
244
+ }
245
+ for (; !a[--o];) a.pop();
246
+ return t ? ++n : a.shift(), e.d = a, e.e = H(a, n), _ ? B(e, d.precision, d.rounding) : e;
247
+ }, P.toBinary = function(e, t) {
248
+ return Q(this, 2, e, t);
249
+ }, P.toDecimalPlaces = P.toDP = function(e, t) {
250
+ var n = this, r = n.constructor;
251
+ return n = new r(n), e === void 0 ? n : (I(e, 0, u), t === void 0 ? t = r.rounding : I(t, 0, 8), B(n, e + n.e + 1, t));
252
+ }, P.toExponential = function(e, t) {
253
+ var n, r = this, i = r.constructor;
254
+ return e === void 0 ? n = V(r, !0) : (I(e, 0, u), t === void 0 ? t = i.rounding : I(t, 0, 8), r = B(new i(r), e + 1, t), n = V(r, !0, e + 1)), r.isNeg() && !r.isZero() ? "-" + n : n;
255
+ }, P.toFixed = function(e, t) {
256
+ var n, r, i = this, a = i.constructor;
257
+ return e === void 0 ? n = V(i) : (I(e, 0, u), t === void 0 ? t = a.rounding : I(t, 0, 8), r = B(new a(i), e + i.e + 1, t), n = V(r, !1, e + r.e + 1)), i.isNeg() && !i.isZero() ? "-" + n : n;
258
+ }, P.toFraction = function(e) {
259
+ var t, n, r, i, a, o, s, c, l, u, d, f, p = this, m = p.d, h = p.constructor;
260
+ if (!m) return new h(p);
261
+ if (l = n = new h(1), r = c = new h(0), t = new h(r), a = t.e = te(m) - p.e - 1, o = a % A, t.d[0] = w(10, o < 0 ? A + o : o), e == null) e = a > 0 ? t : l;
262
+ else {
263
+ if (s = new h(e), !s.isInt() || s.lt(l)) throw Error(y + s);
264
+ e = s.gt(t) ? a > 0 ? t : l : s;
265
+ }
266
+ for (_ = !1, s = new h(F(m)), u = h.precision, h.precision = a = m.length * A * 2; d = z(s, t, 0, 1, 1), i = n.plus(d.times(r)), i.cmp(e) != 1;) n = r, r = i, i = l, l = c.plus(d.times(i)), c = i, i = t, t = s.minus(d.times(i)), s = i;
267
+ return i = z(e.minus(n), r, 0, 1, 1), c = c.plus(i.times(l)), n = n.plus(i.times(r)), c.s = l.s = p.s, f = z(l, r, a, 1).minus(p).abs().cmp(z(c, n, a, 1).minus(p).abs()) < 1 ? [l, r] : [c, n], h.precision = u, _ = !0, f;
268
+ }, P.toHexadecimal = P.toHex = function(e, t) {
269
+ return Q(this, 16, e, t);
270
+ }, P.toNearest = function(e, t) {
271
+ var n = this, r = n.constructor;
272
+ if (n = new r(n), e == null) {
273
+ if (!n.d) return n;
274
+ e = new r(1), t = r.rounding;
275
+ } else {
276
+ if (e = new r(e), t === void 0 ? t = r.rounding : I(t, 0, 8), !n.d) return e.s ? n : e;
277
+ if (!e.d) return e.s &&= n.s, e;
278
+ }
279
+ return e.d[0] ? (_ = !1, n = z(n, e, 0, t, 1).times(e), _ = !0, B(n)) : (e.s = n.s, n = e), n;
280
+ }, P.toNumber = function() {
281
+ return +this;
282
+ }, P.toOctal = function(e, t) {
283
+ return Q(this, 8, e, t);
284
+ }, P.toPower = P.pow = function(e) {
285
+ var t, n, r, i, a, o, s = this, c = s.constructor, l = +(e = new c(e));
286
+ if (!s.d || !e.d || !s.d[0] || !e.d[0]) return new c(w(+s, l));
287
+ if (s = new c(s), s.eq(1)) return s;
288
+ if (r = c.precision, a = c.rounding, e.eq(1)) return B(s, r, a);
289
+ if (t = C(e.e / A), t >= e.d.length - 1 && (n = l < 0 ? -l : l) <= j) return i = ne(c, s, n, r), e.s < 0 ? new c(1).div(i) : B(i, r, a);
290
+ if (o = s.s, o < 0) {
291
+ if (t < e.d.length - 1) return new c(NaN);
292
+ if (e.d[t] & 1 || (o = 1), s.e == 0 && s.d[0] == 1 && s.d.length == 1) return s.s = o, s;
293
+ }
294
+ return n = w(+s, l), t = n == 0 || !isFinite(n) ? C(l * (Math.log("0." + F(s.d)) / Math.LN10 + s.e + 1)) : new c(n + "").e, t > c.maxE + 1 || t < c.minE - 1 ? new c(t > 0 ? o / 0 : 0) : (_ = !1, c.rounding = s.s = 1, n = Math.min(12, (t + "").length), i = K(e.times(q(s, r + n)), r), i.d && (i = B(i, r + 5, 1), L(i.d, r, a) && (t = r + 10, i = B(K(e.times(q(s, t + n)), t), t + 5, 1), +F(i.d).slice(r + 1, r + 15) + 1 == 0x5af3107a4000 && (i = B(i, r + 1, 0)))), i.s = o, _ = !0, c.rounding = a, B(i, r, a));
295
+ }, P.toPrecision = function(e, t) {
296
+ var n, r = this, i = r.constructor;
297
+ return e === void 0 ? n = V(r, r.e <= i.toExpNeg || r.e >= i.toExpPos) : (I(e, 1, u), t === void 0 ? t = i.rounding : I(t, 0, 8), r = B(new i(r), e, t), n = V(r, e <= r.e || r.e <= i.toExpNeg, e)), r.isNeg() && !r.isZero() ? "-" + n : n;
298
+ }, P.toSignificantDigits = P.toSD = function(e, t) {
299
+ var n = this, r = n.constructor;
300
+ return e === void 0 ? (e = r.precision, t = r.rounding) : (I(e, 1, u), t === void 0 ? t = r.rounding : I(t, 0, 8)), B(new r(n), e, t);
301
+ }, P.toString = function() {
302
+ var e = this, t = e.constructor, n = V(e, e.e <= t.toExpNeg || e.e >= t.toExpPos);
303
+ return e.isNeg() && !e.isZero() ? "-" + n : n;
304
+ }, P.truncated = P.trunc = function() {
305
+ return B(new this.constructor(this), this.e + 1, 1);
306
+ }, P.valueOf = P.toJSON = function() {
307
+ var e = this, t = e.constructor, n = V(e, e.e <= t.toExpNeg || e.e >= t.toExpPos);
308
+ return e.isNeg() ? "-" + n : n;
309
+ };
310
+ function F(e) {
311
+ var t, n, r, i = e.length - 1, a = "", o = e[0];
312
+ if (i > 0) {
313
+ for (a += o, t = 1; t < i; t++) r = e[t] + "", n = A - r.length, n && (a += G(n)), a += r;
314
+ o = e[t], r = o + "", n = A - r.length, n && (a += G(n));
315
+ } else if (o === 0) return "0";
316
+ for (; o % 10 == 0;) o /= 10;
317
+ return a + o;
318
+ }
319
+ function I(e, t, n) {
320
+ if (e !== ~~e || e < t || e > n) throw Error(y + e);
321
+ }
322
+ function L(e, t, n, r) {
323
+ var i, a, o, s;
324
+ for (a = e[0]; a >= 10; a /= 10) --t;
325
+ return --t < 0 ? (t += A, i = 0) : (i = Math.ceil((t + 1) / A), t %= A), a = w(10, A - t), s = e[i] % a | 0, r == null ? t < 3 ? (t == 0 ? s = s / 100 | 0 : t == 1 && (s = s / 10 | 0), o = n < 4 && s == 99999 || n > 3 && s == 49999 || s == 5e4 || s == 0) : o = (n < 4 && s + 1 == a || n > 3 && s + 1 == a / 2) && (e[i + 1] / a / 100 | 0) == w(10, t - 2) - 1 || (s == a / 2 || s == 0) && (e[i + 1] / a / 100 | 0) == 0 : t < 4 ? (t == 0 ? s = s / 1e3 | 0 : t == 1 ? s = s / 100 | 0 : t == 2 && (s = s / 10 | 0), o = (r || n < 4) && s == 9999 || !r && n > 3 && s == 4999) : o = ((r || n < 4) && s + 1 == a || !r && n > 3 && s + 1 == a / 2) && (e[i + 1] / a / 1e3 | 0) == w(10, t - 3) - 1, o;
326
+ }
327
+ function R(e, t, n) {
328
+ for (var r, i = [0], a, o = 0, s = e.length; o < s;) {
329
+ for (a = i.length; a--;) i[a] *= t;
330
+ for (i[0] += d.indexOf(e.charAt(o++)), r = 0; r < i.length; r++) i[r] > n - 1 && (i[r + 1] === void 0 && (i[r + 1] = 0), i[r + 1] += i[r] / n | 0, i[r] %= n);
331
+ }
332
+ return i.reverse();
333
+ }
334
+ function ee(e, t) {
335
+ var n, r, i;
336
+ if (t.isZero()) return t;
337
+ r = t.d.length, r < 32 ? (n = Math.ceil(r / 3), i = (1 / X(4, n)).toString()) : (n = 16, i = "2.3283064365386962890625e-10"), e.precision += n, t = Y(e, 1, t.times(i), new e(1));
338
+ for (var a = n; a--;) {
339
+ var o = t.times(t);
340
+ t = o.times(o).minus(o).times(8).plus(1);
341
+ }
342
+ return e.precision -= n, t;
343
+ }
344
+ var z = (function() {
345
+ function e(e, t, n) {
346
+ var r, i = 0, a = e.length;
347
+ for (e = e.slice(); a--;) r = e[a] * t + i, e[a] = r % n | 0, i = r / n | 0;
348
+ return i && e.unshift(i), e;
349
+ }
350
+ function t(e, t, n, r) {
351
+ var i, a;
352
+ if (n != r) a = n > r ? 1 : -1;
353
+ else for (i = a = 0; i < n; i++) if (e[i] != t[i]) {
354
+ a = e[i] > t[i] ? 1 : -1;
355
+ break;
356
+ }
357
+ return a;
358
+ }
359
+ function n(e, t, n, r) {
360
+ for (var i = 0; n--;) e[n] -= i, i = +(e[n] < t[n]), e[n] = i * r + e[n] - t[n];
361
+ for (; !e[0] && e.length > 1;) e.shift();
362
+ }
363
+ return function(r, i, a, o, s, c) {
364
+ var l, u, d, f, p, m, g, _, v, y, b, x, S, w, T, E, D, O, j, M, N = r.constructor, P = r.s == i.s ? 1 : -1, F = r.d, I = i.d;
365
+ if (!F || !F[0] || !I || !I[0]) return new N(!r.s || !i.s || (F ? I && F[0] == I[0] : !I) ? NaN : F && F[0] == 0 || !I ? P * 0 : P / 0);
366
+ for (c ? (p = 1, u = r.e - i.e) : (c = k, p = A, u = C(r.e / p) - C(i.e / p)), j = I.length, D = F.length, v = new N(P), y = v.d = [], d = 0; I[d] == (F[d] || 0); d++);
367
+ if (I[d] > (F[d] || 0) && u--, a == null ? (w = a = N.precision, o = N.rounding) : w = s ? a + (r.e - i.e) + 1 : a, w < 0) y.push(1), m = !0;
368
+ else {
369
+ if (w = w / p + 2 | 0, d = 0, j == 1) {
370
+ for (f = 0, I = I[0], w++; (d < D || f) && w--; d++) T = f * c + (F[d] || 0), y[d] = T / I | 0, f = T % I | 0;
371
+ m = f || d < D;
372
+ } else {
373
+ for (f = c / (I[0] + 1) | 0, f > 1 && (I = e(I, f, c), F = e(F, f, c), j = I.length, D = F.length), E = j, b = F.slice(0, j), x = b.length; x < j;) b[x++] = 0;
374
+ M = I.slice(), M.unshift(0), O = I[0], I[1] >= c / 2 && ++O;
375
+ do
376
+ f = 0, l = t(I, b, j, x), l < 0 ? (S = b[0], j != x && (S = S * c + (b[1] || 0)), f = S / O | 0, f > 1 ? (f >= c && (f = c - 1), g = e(I, f, c), _ = g.length, x = b.length, l = t(g, b, _, x), l == 1 && (f--, n(g, j < _ ? M : I, _, c))) : (f == 0 && (l = f = 1), g = I.slice()), _ = g.length, _ < x && g.unshift(0), n(b, g, x, c), l == -1 && (x = b.length, l = t(I, b, j, x), l < 1 && (f++, n(b, j < x ? M : I, x, c))), x = b.length) : l === 0 && (f++, b = [0]), y[d++] = f, l && b[0] ? b[x++] = F[E] || 0 : (b = [F[E]], x = 1);
377
+ while ((E++ < D || b[0] !== void 0) && w--);
378
+ m = b[0] !== void 0;
379
+ }
380
+ y[0] || y.shift();
381
+ }
382
+ if (p == 1) v.e = u, h = m;
383
+ else {
384
+ for (d = 1, f = y[0]; f >= 10; f /= 10) d++;
385
+ v.e = d + u * p - 1, B(v, s ? a + v.e + 1 : a, o, m);
386
+ }
387
+ return v;
388
+ };
389
+ })();
390
+ function B(e, t, n, r) {
391
+ var i, a, o, s, c, l, u, d, f, p = e.constructor;
392
+ out: if (t != null) {
393
+ if (d = e.d, !d) return e;
394
+ for (i = 1, s = d[0]; s >= 10; s /= 10) i++;
395
+ if (a = t - i, a < 0) a += A, o = t, u = d[f = 0], c = u / w(10, i - o - 1) % 10 | 0;
396
+ else if (f = Math.ceil((a + 1) / A), s = d.length, f >= s) if (r) {
397
+ for (; s++ <= f;) d.push(0);
398
+ u = c = 0, i = 1, a %= A, o = a - A + 1;
399
+ } else break out;
400
+ else {
401
+ for (u = s = d[f], i = 1; s >= 10; s /= 10) i++;
402
+ a %= A, o = a - A + i, c = o < 0 ? 0 : u / w(10, i - o - 1) % 10 | 0;
403
+ }
404
+ if (r = r || t < 0 || d[f + 1] !== void 0 || (o < 0 ? u : u % w(10, i - o - 1)), l = n < 4 ? (c || r) && (n == 0 || n == (e.s < 0 ? 3 : 2)) : c > 5 || c == 5 && (n == 4 || r || n == 6 && (a > 0 ? o > 0 ? u / w(10, i - o) : 0 : d[f - 1]) % 10 & 1 || n == (e.s < 0 ? 8 : 7)), t < 1 || !d[0]) return d.length = 0, l ? (t -= e.e + 1, d[0] = w(10, (A - t % A) % A), e.e = -t || 0) : d[0] = e.e = 0, e;
405
+ if (a == 0 ? (d.length = f, s = 1, f--) : (d.length = f + 1, s = w(10, A - a), d[f] = o > 0 ? (u / w(10, i - o) % w(10, o) | 0) * s : 0), l) for (;;) if (f == 0) {
406
+ for (a = 1, o = d[0]; o >= 10; o /= 10) a++;
407
+ for (o = d[0] += s, s = 1; o >= 10; o /= 10) s++;
408
+ a != s && (e.e++, d[0] == k && (d[0] = 1));
409
+ break;
410
+ } else {
411
+ if (d[f] += s, d[f] != k) break;
412
+ d[f--] = 0, s = 1;
413
+ }
414
+ for (a = d.length; d[--a] === 0;) d.pop();
415
+ }
416
+ return _ && (e.e > p.maxE ? (e.d = null, e.e = NaN) : e.e < p.minE && (e.e = 0, e.d = [0])), e;
417
+ }
418
+ function V(e, t, n) {
419
+ if (!e.isFinite()) return ae(e);
420
+ var r, i = e.e, a = F(e.d), o = a.length;
421
+ return t ? (n && (r = n - o) > 0 ? a = a.charAt(0) + "." + a.slice(1) + G(r) : o > 1 && (a = a.charAt(0) + "." + a.slice(1)), a = a + (e.e < 0 ? "e" : "e+") + e.e) : i < 0 ? (a = "0." + G(-i - 1) + a, n && (r = n - o) > 0 && (a += G(r))) : i >= o ? (a += G(i + 1 - o), n && (r = n - i - 1) > 0 && (a = a + "." + G(r))) : ((r = i + 1) < o && (a = a.slice(0, r) + "." + a.slice(r)), n && (r = n - o) > 0 && (i + 1 === o && (a += "."), a += G(r))), a;
422
+ }
423
+ function H(e, t) {
424
+ var n = e[0];
425
+ for (t *= A; n >= 10; n /= 10) t++;
426
+ return t;
427
+ }
428
+ function U(e, t, n) {
429
+ if (t > M) throw _ = !0, n && (e.precision = n), Error(b);
430
+ return B(new e(f), t, 1, !0);
431
+ }
432
+ function W(e, t, n) {
433
+ if (t > N) throw Error(b);
434
+ return B(new e(p), t, n, !0);
435
+ }
436
+ function te(e) {
437
+ var t = e.length - 1, n = t * A + 1;
438
+ if (t = e[t], t) {
439
+ for (; t % 10 == 0; t /= 10) n--;
440
+ for (t = e[0]; t >= 10; t /= 10) n++;
441
+ }
442
+ return n;
443
+ }
444
+ function G(e) {
445
+ for (var t = ""; e--;) t += "0";
446
+ return t;
447
+ }
448
+ function ne(e, t, n, r) {
449
+ var i, a = new e(1), o = Math.ceil(r / A + 4);
450
+ for (_ = !1;;) {
451
+ if (n % 2 && (a = a.times(t), ce(a.d, o) && (i = !0)), n = C(n / 2), n === 0) {
452
+ n = a.d.length - 1, i && a.d[n] === 0 && ++a.d[n];
453
+ break;
454
+ }
455
+ t = t.times(t), ce(t.d, o);
456
+ }
457
+ return _ = !0, a;
458
+ }
459
+ function re(e) {
460
+ return e.d[e.d.length - 1] & 1;
461
+ }
462
+ function ie(e, t, n) {
463
+ for (var r, i, a = new e(t[0]), o = 0; ++o < t.length;) {
464
+ if (i = new e(t[o]), !i.s) {
465
+ a = i;
466
+ break;
467
+ }
468
+ r = a.cmp(i), (r === n || r === 0 && a.s === n) && (a = i);
469
+ }
470
+ return a;
471
+ }
472
+ function K(e, t) {
473
+ var n, r, i, a, o, s, c, l = 0, u = 0, d = 0, f = e.constructor, p = f.rounding, m = f.precision;
474
+ if (!e.d || !e.d[0] || e.e > 17) return new f(e.d ? e.d[0] ? e.s < 0 ? 0 : Infinity : 1 : e.s ? e.s < 0 ? 0 : e : NaN);
475
+ for (t == null ? (_ = !1, c = m) : c = t, s = new f(.03125); e.e > -2;) e = e.times(s), d += 5;
476
+ for (r = Math.log(w(2, d)) / Math.LN10 * 2 + 5 | 0, c += r, n = a = o = new f(1), f.precision = c;;) {
477
+ if (a = B(a.times(e), c, 1), n = n.times(++u), s = o.plus(z(a, n, c, 1)), F(s.d).slice(0, c) === F(o.d).slice(0, c)) {
478
+ for (i = d; i--;) o = B(o.times(o), c, 1);
479
+ if (t == null) if (l < 3 && L(o.d, c - r, p, l)) f.precision = c += 10, n = a = s = new f(1), u = 0, l++;
480
+ else return B(o, f.precision = m, p, _ = !0);
481
+ else return f.precision = m, o;
482
+ }
483
+ o = s;
484
+ }
485
+ }
486
+ function q(e, t) {
487
+ var n, r, i, a, o, s, c, l, u, d, f, p = 1, m = 10, h = e, g = h.d, v = h.constructor, y = v.rounding, b = v.precision;
488
+ if (h.s < 0 || !g || !g[0] || !h.e && g[0] == 1 && g.length == 1) return new v(g && !g[0] ? -Infinity : h.s == 1 ? g ? 0 : h : NaN);
489
+ if (t == null ? (_ = !1, u = b) : u = t, v.precision = u += m, n = F(g), r = n.charAt(0), Math.abs(a = h.e) < 0x5543df729c000) {
490
+ for (; r < 7 && r != 1 || r == 1 && n.charAt(1) > 3;) h = h.times(e), n = F(h.d), r = n.charAt(0), p++;
491
+ a = h.e, r > 1 ? (h = new v("0." + n), a++) : h = new v(r + "." + n.slice(1));
492
+ } else return l = U(v, u + 2, b).times(a + ""), h = q(new v(r + "." + n.slice(1)), u - m).plus(l), v.precision = b, t == null ? B(h, b, y, _ = !0) : h;
493
+ for (d = h, c = o = h = z(h.minus(1), h.plus(1), u, 1), f = B(h.times(h), u, 1), i = 3;;) {
494
+ if (o = B(o.times(f), u, 1), l = c.plus(z(o, new v(i), u, 1)), F(l.d).slice(0, u) === F(c.d).slice(0, u)) if (c = c.times(2), a !== 0 && (c = c.plus(U(v, u + 2, b).times(a + ""))), c = z(c, new v(p), u, 1), t == null) if (L(c.d, u - m, y, s)) v.precision = u += m, l = o = h = z(d.minus(1), d.plus(1), u, 1), f = B(h.times(h), u, 1), i = s = 1;
495
+ else return B(c, v.precision = b, y, _ = !0);
496
+ else return v.precision = b, c;
497
+ c = l, i += 2;
498
+ }
499
+ }
500
+ function ae(e) {
501
+ return String(e.s * e.s / 0);
502
+ }
503
+ function J(e, t) {
504
+ var n, r, i;
505
+ for ((n = t.indexOf(".")) > -1 && (t = t.replace(".", "")), (r = t.search(/e/i)) > 0 ? (n < 0 && (n = r), n += +t.slice(r + 1), t = t.substring(0, r)) : n < 0 && (n = t.length), r = 0; t.charCodeAt(r) === 48; r++);
506
+ for (i = t.length; t.charCodeAt(i - 1) === 48; --i);
507
+ if (t = t.slice(r, i), t) {
508
+ if (i -= r, e.e = n = n - r - 1, e.d = [], r = (n + 1) % A, n < 0 && (r += A), r < i) {
509
+ for (r && e.d.push(+t.slice(0, r)), i -= A; r < i;) e.d.push(+t.slice(r, r += A));
510
+ t = t.slice(r), r = A - t.length;
511
+ } else r -= i;
512
+ for (; r--;) t += "0";
513
+ e.d.push(+t), _ && (e.e > e.constructor.maxE ? (e.d = null, e.e = NaN) : e.e < e.constructor.minE && (e.e = 0, e.d = [0]));
514
+ } else e.e = 0, e.d = [0];
515
+ return e;
516
+ }
517
+ function oe(e, t) {
518
+ var n, r, i, a, o, s, c, l, u;
519
+ if (t.indexOf("_") > -1) {
520
+ if (t = t.replace(/(\d)_(?=\d)/g, "$1"), O.test(t)) return J(e, t);
521
+ } else if (t === "Infinity" || t === "NaN") return +t || (e.s = NaN), e.e = NaN, e.d = null, e;
522
+ if (E.test(t)) n = 16, t = t.toLowerCase();
523
+ else if (T.test(t)) n = 2;
524
+ else if (D.test(t)) n = 8;
525
+ else throw Error(y + t);
526
+ for (a = t.search(/p/i), a > 0 ? (c = +t.slice(a + 1), t = t.substring(2, a)) : t = t.slice(2), a = t.indexOf("."), o = a >= 0, r = e.constructor, o && (t = t.replace(".", ""), s = t.length, a = s - a, i = ne(r, new r(n), a, a * 2)), l = R(t, n, k), u = l.length - 1, a = u; l[a] === 0; --a) l.pop();
527
+ return a < 0 ? new r(e.s * 0) : (e.e = H(l, u), e.d = l, _ = !1, o && (e = z(e, i, s * 4)), c && (e = e.times(Math.abs(c) < 54 ? w(2, c) : $.pow(2, c))), _ = !0, e);
528
+ }
529
+ function se(e, t) {
530
+ var n, r = t.d.length;
531
+ if (r < 3) return t.isZero() ? t : Y(e, 2, t, t);
532
+ n = 1.4 * Math.sqrt(r), n = n > 16 ? 16 : n | 0, t = t.times(1 / X(5, n)), t = Y(e, 2, t, t);
533
+ for (var i, a = new e(5), o = new e(16), s = new e(20); n--;) i = t.times(t), t = t.times(a.plus(i.times(o.times(i).minus(s))));
534
+ return t;
535
+ }
536
+ function Y(e, t, n, r, i) {
537
+ var a, o, s, c, l = 1, u = e.precision, d = Math.ceil(u / A);
538
+ for (_ = !1, c = n.times(n), s = new e(r);;) {
539
+ if (o = z(s.times(c), new e(t++ * t++), u, 1), s = i ? r.plus(o) : r.minus(o), r = z(o.times(c), new e(t++ * t++), u, 1), o = s.plus(r), o.d[d] !== void 0) {
540
+ for (a = d; o.d[a] === s.d[a] && a--;);
541
+ if (a == -1) break;
542
+ }
543
+ a = s, s = r, r = o, o = a, l++;
544
+ }
545
+ return _ = !0, o.d.length = d + 1, o;
546
+ }
547
+ function X(e, t) {
548
+ for (var n = e; --t;) n *= e;
549
+ return n;
550
+ }
551
+ function Z(e, t) {
552
+ var n, r = t.s < 0, i = W(e, e.precision, 1), a = i.times(.5);
553
+ if (t = t.abs(), t.lte(a)) return g = r ? 4 : 1, t;
554
+ if (n = t.divToInt(i), n.isZero()) g = r ? 3 : 2;
555
+ else {
556
+ if (t = t.minus(n.times(i)), t.lte(a)) return g = re(n) ? r ? 2 : 3 : r ? 4 : 1, t;
557
+ g = re(n) ? r ? 1 : 4 : r ? 3 : 2;
558
+ }
559
+ return t.minus(i).abs();
560
+ }
561
+ function Q(e, t, n, r) {
562
+ var i, a, o, s, c, l, f, p, m, g = e.constructor, _ = n !== void 0;
563
+ if (_ ? (I(n, 1, u), r === void 0 ? r = g.rounding : I(r, 0, 8)) : (n = g.precision, r = g.rounding), !e.isFinite()) f = ae(e);
564
+ else {
565
+ for (f = V(e), o = f.indexOf("."), _ ? (i = 2, t == 16 ? n = n * 4 - 3 : t == 8 && (n = n * 3 - 2)) : i = t, o >= 0 && (f = f.replace(".", ""), m = new g(1), m.e = f.length - o, m.d = R(V(m), 10, i), m.e = m.d.length), p = R(f, 10, i), a = c = p.length; p[--c] == 0;) p.pop();
566
+ if (!p[0]) f = _ ? "0p+0" : "0";
567
+ else {
568
+ if (o < 0 ? a-- : (e = new g(e), e.d = p, e.e = a, e = z(e, m, n, r, 0, i), p = e.d, a = e.e, l = h), o = p[n], s = i / 2, l ||= p[n + 1] !== void 0, l = r < 4 ? (o !== void 0 || l) && (r === 0 || r === (e.s < 0 ? 3 : 2)) : o > s || o === s && (r === 4 || l || r === 6 && p[n - 1] & 1 || r === (e.s < 0 ? 8 : 7)), p.length = n, l) for (; ++p[--n] > i - 1;) p[n] = 0, n || (++a, p.unshift(1));
569
+ for (c = p.length; !p[c - 1]; --c);
570
+ for (o = 0, f = ""; o < c; o++) f += d.charAt(p[o]);
571
+ if (_) {
572
+ if (c > 1) if (t == 16 || t == 8) {
573
+ for (o = t == 16 ? 4 : 3, --c; c % o; c++) f += "0";
574
+ for (p = R(f, i, t), c = p.length; !p[c - 1]; --c);
575
+ for (o = 1, f = "1."; o < c; o++) f += d.charAt(p[o]);
576
+ } else f = f.charAt(0) + "." + f.slice(1);
577
+ f = f + (a < 0 ? "p" : "p+") + a;
578
+ } else if (a < 0) {
579
+ for (; ++a;) f = "0" + f;
580
+ f = "0." + f;
581
+ } else if (++a > c) for (a -= c; a--;) f += "0";
582
+ else a < c && (f = f.slice(0, a) + "." + f.slice(a));
583
+ }
584
+ f = (t == 16 ? "0x" : t == 2 ? "0b" : t == 8 ? "0o" : "") + f;
585
+ }
586
+ return e.s < 0 ? "-" + f : f;
587
+ }
588
+ function ce(e, t) {
589
+ if (e.length > t) return e.length = t, !0;
590
+ }
591
+ function le(e) {
592
+ return new this(e).abs();
593
+ }
594
+ function ue(e) {
595
+ return new this(e).acos();
596
+ }
597
+ function de(e) {
598
+ return new this(e).acosh();
599
+ }
600
+ function fe(e, t) {
601
+ return new this(e).plus(t);
602
+ }
603
+ function pe(e) {
604
+ return new this(e).asin();
605
+ }
606
+ function me(e) {
607
+ return new this(e).asinh();
608
+ }
609
+ function he(e) {
610
+ return new this(e).atan();
611
+ }
612
+ function ge(e) {
613
+ return new this(e).atanh();
614
+ }
615
+ function _e(e, t) {
616
+ e = new this(e), t = new this(t);
617
+ var n, r = this.precision, i = this.rounding, a = r + 4;
618
+ return !e.s || !t.s ? n = new this(NaN) : !e.d && !t.d ? (n = W(this, a, 1).times(t.s > 0 ? .25 : .75), n.s = e.s) : !t.d || e.isZero() ? (n = t.s < 0 ? W(this, r, i) : new this(0), n.s = e.s) : !e.d || t.isZero() ? (n = W(this, a, 1).times(.5), n.s = e.s) : t.s < 0 ? (this.precision = a, this.rounding = 1, n = this.atan(z(e, t, a, 1)), t = W(this, a, 1), this.precision = r, this.rounding = i, n = e.s < 0 ? n.minus(t) : n.plus(t)) : n = this.atan(z(e, t, a, 1)), n;
619
+ }
620
+ function ve(e) {
621
+ return new this(e).cbrt();
622
+ }
623
+ function ye(e) {
624
+ return B(e = new this(e), e.e + 1, 2);
625
+ }
626
+ function be(e, t, n) {
627
+ return new this(e).clamp(t, n);
628
+ }
629
+ function xe(e) {
630
+ if (!e || typeof e != "object") throw Error(v + "Object expected");
631
+ var t, n, r, i = e.defaults === !0, a = [
632
+ "precision",
633
+ 1,
634
+ u,
635
+ "rounding",
636
+ 0,
637
+ 8,
638
+ "toExpNeg",
639
+ -l,
640
+ 0,
641
+ "toExpPos",
642
+ 0,
643
+ l,
644
+ "maxE",
645
+ 0,
646
+ l,
647
+ "minE",
648
+ -l,
649
+ 0,
650
+ "modulo",
651
+ 0,
652
+ 9
653
+ ];
654
+ for (t = 0; t < a.length; t += 3) if (n = a[t], i && (this[n] = m[n]), (r = e[n]) !== void 0) if (C(r) === r && r >= a[t + 1] && r <= a[t + 2]) this[n] = r;
655
+ else throw Error(y + n + ": " + r);
656
+ if (n = "crypto", i && (this[n] = m[n]), (r = e[n]) !== void 0) if (r === !0 || r === !1 || r === 0 || r === 1) if (r) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) this[n] = !0;
657
+ else throw Error(x);
658
+ else this[n] = !1;
659
+ else throw Error(y + n + ": " + r);
660
+ return this;
661
+ }
662
+ function Se(e) {
663
+ return new this(e).cos();
664
+ }
665
+ function Ce(e) {
666
+ return new this(e).cosh();
667
+ }
668
+ function we(e) {
669
+ var t, n, r;
670
+ function i(e) {
671
+ var t, n, r, a = this;
672
+ if (!(a instanceof i)) return new i(e);
673
+ if (a.constructor = i, ke(e)) {
674
+ a.s = e.s, _ ? !e.d || e.e > i.maxE ? (a.e = NaN, a.d = null) : e.e < i.minE ? (a.e = 0, a.d = [0]) : (a.e = e.e, a.d = e.d.slice()) : (a.e = e.e, a.d = e.d ? e.d.slice() : e.d);
675
+ return;
676
+ }
677
+ if (r = typeof e, r === "number") {
678
+ if (e === 0) {
679
+ a.s = 1 / e < 0 ? -1 : 1, a.e = 0, a.d = [0];
680
+ return;
681
+ }
682
+ if (e < 0 ? (e = -e, a.s = -1) : a.s = 1, e === ~~e && e < 1e7) {
683
+ for (t = 0, n = e; n >= 10; n /= 10) t++;
684
+ _ ? t > i.maxE ? (a.e = NaN, a.d = null) : t < i.minE ? (a.e = 0, a.d = [0]) : (a.e = t, a.d = [e]) : (a.e = t, a.d = [e]);
685
+ return;
686
+ }
687
+ if (e * 0 != 0) {
688
+ e || (a.s = NaN), a.e = NaN, a.d = null;
689
+ return;
690
+ }
691
+ return J(a, e.toString());
692
+ }
693
+ if (r === "string") return (n = e.charCodeAt(0)) === 45 ? (e = e.slice(1), a.s = -1) : (n === 43 && (e = e.slice(1)), a.s = 1), O.test(e) ? J(a, e) : oe(a, e);
694
+ if (r === "bigint") return e < 0 ? (e = -e, a.s = -1) : a.s = 1, J(a, e.toString());
695
+ throw Error(y + e);
696
+ }
697
+ if (i.prototype = P, i.ROUND_UP = 0, i.ROUND_DOWN = 1, i.ROUND_CEIL = 2, i.ROUND_FLOOR = 3, i.ROUND_HALF_UP = 4, i.ROUND_HALF_DOWN = 5, i.ROUND_HALF_EVEN = 6, i.ROUND_HALF_CEIL = 7, i.ROUND_HALF_FLOOR = 8, i.EUCLID = 9, i.config = i.set = xe, i.clone = we, i.isDecimal = ke, i.abs = le, i.acos = ue, i.acosh = de, i.add = fe, i.asin = pe, i.asinh = me, i.atan = he, i.atanh = ge, i.atan2 = _e, i.cbrt = ve, i.ceil = ye, i.clamp = be, i.cos = Se, i.cosh = Ce, i.div = Te, i.exp = Ee, i.floor = De, i.hypot = Oe, i.ln = Ae, i.log = je, i.log10 = Ne, i.log2 = Me, i.max = Pe, i.min = Fe, i.mod = Ie, i.mul = Le, i.pow = Re, i.random = ze, i.round = Be, i.sign = Ve, i.sin = He, i.sinh = Ue, i.sqrt = We, i.sub = Ge, i.sum = Ke, i.tan = qe, i.tanh = Je, i.trunc = Ye, e === void 0 && (e = {}), e && e.defaults !== !0) for (r = [
698
+ "precision",
699
+ "rounding",
700
+ "toExpNeg",
701
+ "toExpPos",
702
+ "maxE",
703
+ "minE",
704
+ "modulo",
705
+ "crypto"
706
+ ], t = 0; t < r.length;) e.hasOwnProperty(n = r[t++]) || (e[n] = this[n]);
707
+ return i.config(e), i;
708
+ }
709
+ function Te(e, t) {
710
+ return new this(e).div(t);
711
+ }
712
+ function Ee(e) {
713
+ return new this(e).exp();
714
+ }
715
+ function De(e) {
716
+ return B(e = new this(e), e.e + 1, 3);
717
+ }
718
+ function Oe() {
719
+ var e, t, n = new this(0);
720
+ for (_ = !1, e = 0; e < arguments.length;) if (t = new this(arguments[e++]), t.d) n.d && (n = n.plus(t.times(t)));
721
+ else {
722
+ if (t.s) return _ = !0, new this(Infinity);
723
+ n = t;
724
+ }
725
+ return _ = !0, n.sqrt();
726
+ }
727
+ function ke(e) {
728
+ return e instanceof $ || e && e.toStringTag === S || !1;
729
+ }
730
+ function Ae(e) {
731
+ return new this(e).ln();
732
+ }
733
+ function je(e, t) {
734
+ return new this(e).log(t);
735
+ }
736
+ function Me(e) {
737
+ return new this(e).log(2);
738
+ }
739
+ function Ne(e) {
740
+ return new this(e).log(10);
741
+ }
742
+ function Pe() {
743
+ return ie(this, arguments, -1);
744
+ }
745
+ function Fe() {
746
+ return ie(this, arguments, 1);
747
+ }
748
+ function Ie(e, t) {
749
+ return new this(e).mod(t);
750
+ }
751
+ function Le(e, t) {
752
+ return new this(e).mul(t);
753
+ }
754
+ function Re(e, t) {
755
+ return new this(e).pow(t);
756
+ }
757
+ function ze(e) {
758
+ var t, n, r, i, a = 0, o = new this(1), s = [];
759
+ if (e === void 0 ? e = this.precision : I(e, 1, u), r = Math.ceil(e / A), !this.crypto) for (; a < r;) s[a++] = Math.random() * 1e7 | 0;
760
+ else if (crypto.getRandomValues) for (t = crypto.getRandomValues(new Uint32Array(r)); a < r;) i = t[a], i >= 429e7 ? t[a] = crypto.getRandomValues(/* @__PURE__ */ new Uint32Array(1))[0] : s[a++] = i % 1e7;
761
+ else if (crypto.randomBytes) {
762
+ for (t = crypto.randomBytes(r *= 4); a < r;) i = t[a] + (t[a + 1] << 8) + (t[a + 2] << 16) + ((t[a + 3] & 127) << 24), i >= 214e7 ? crypto.randomBytes(4).copy(t, a) : (s.push(i % 1e7), a += 4);
763
+ a = r / 4;
764
+ } else throw Error(x);
765
+ for (r = s[--a], e %= A, r && e && (i = w(10, A - e), s[a] = (r / i | 0) * i); s[a] === 0; a--) s.pop();
766
+ if (a < 0) n = 0, s = [0];
767
+ else {
768
+ for (n = -1; s[0] === 0; n -= A) s.shift();
769
+ for (r = 1, i = s[0]; i >= 10; i /= 10) r++;
770
+ r < A && (n -= A - r);
771
+ }
772
+ return o.e = n, o.d = s, o;
773
+ }
774
+ function Be(e) {
775
+ return B(e = new this(e), e.e + 1, this.rounding);
776
+ }
777
+ function Ve(e) {
778
+ return e = new this(e), e.d ? e.d[0] ? e.s : 0 * e.s : e.s || NaN;
779
+ }
780
+ function He(e) {
781
+ return new this(e).sin();
782
+ }
783
+ function Ue(e) {
784
+ return new this(e).sinh();
785
+ }
786
+ function We(e) {
787
+ return new this(e).sqrt();
788
+ }
789
+ function Ge(e, t) {
790
+ return new this(e).sub(t);
791
+ }
792
+ function Ke() {
793
+ var e = 0, t = arguments, n = new this(t[e]);
794
+ for (_ = !1; n.s && ++e < t.length;) n = n.plus(t[e]);
795
+ return _ = !0, B(n, this.precision, this.rounding);
796
+ }
797
+ function qe(e) {
798
+ return new this(e).tan();
799
+ }
800
+ function Je(e) {
801
+ return new this(e).tanh();
802
+ }
803
+ function Ye(e) {
804
+ return B(e = new this(e), e.e + 1, 1);
805
+ }
806
+ P[Symbol.for("nodejs.util.inspect.custom")] = P.toString, P[Symbol.toStringTag] = "Decimal";
807
+ var $ = P.constructor = we(m);
808
+ f = new $(f), p = new $(p);
809
+ //#endregion
810
+ //#region ../../node_modules/.pnpm/lodash@4.18.1/node_modules/lodash/identity.js
811
+ var Xe = /* @__PURE__ */ o(((e, t) => {
812
+ function n(e) {
813
+ return e;
814
+ }
815
+ t.exports = n;
816
+ }));
817
+ //#endregion
818
+ export { c as i, $ as n, o as r, Xe as t };
819
+
820
+ //# sourceMappingURL=identity.js.map