@sheetxl/formulas 0.8.0-beta.22 → 0.8.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/esm/{DXbuB8TogW81jsqq.mjs → -3OnHOj2LLDR1fc_.mjs} +1 -1
- package/browser/esm/{CVXTgQdrA5Gy2npZ.mjs → B3ZIxkXpijIr7_0H.mjs} +1 -1
- package/{node/esm/awo6QFGSb30mviA0.mjs → browser/esm/B4JL4tyPYordrFSn.mjs} +1 -1
- package/browser/esm/{BTD5KvdGRxzNBnIO.mjs → B8Lb4ycMbsisimyJ.mjs} +1 -1
- package/browser/esm/{Dj457kRu6DvdAeTv.mjs → BMu9wmB3CUBwBBW1.mjs} +1 -1
- package/{node/esm/IcAzgM7RZrZL6-4K.mjs → browser/esm/BXyl3EySzcpdcg4a.mjs} +1 -1
- package/browser/esm/{BbSaG4eBosLvgrSS.mjs → Bgm6ooSL37aLrze-.mjs} +1 -1
- package/{node/esm/PuqvOodiIfHenP7g.mjs → browser/esm/C6XhGX3n-kOXcVe-.mjs} +1 -1
- package/browser/esm/{DendOKspRKG9r9QD.mjs → CEL8D-iv8wA9zzGP.mjs} +1 -1
- package/browser/esm/{nUkMs4qlRGwRtmgD.mjs → CZM973Z0Okl_3JQc.mjs} +1 -1
- package/browser/esm/{xn78EHJuEdJzKXGc.mjs → CcHSbpd59O15t-0s.mjs} +1 -1
- package/browser/esm/{DZ1f1UeQfW32oFDa.mjs → Cod2iEVYfjhcXGHs.mjs} +1 -1
- package/browser/esm/{DE0pfCNRGN7sKztP.mjs → CuoQKYMmPOfl94gW.mjs} +1 -1
- package/{node/esm/BegSQDj4tl7gUEZB.mjs → browser/esm/DKarKpru6FjwvLA_.mjs} +1 -1
- package/browser/esm/{BmGi9qnYbFadWArp.mjs → DMTraB6qAjSlyDKP.mjs} +1 -1
- package/{node/esm/D0XkRZWFT2pe1SLZ.mjs → browser/esm/DRcy1_Zqu53jue2l.mjs} +1 -1
- package/browser/esm/{DhYHSHu_EEPGWP9q.mjs → DTQMfBMFzcfiKUUd.mjs} +1 -1
- package/browser/esm/{DupAjLOP54THnRnY.mjs → DTtayzMN3z3KzrEs.mjs} +1 -1
- package/{node/esm/P-8nL0ZP1fTNGWQB.mjs → browser/esm/DgQs_yv8yoyN7IvY.mjs} +1 -1
- package/browser/esm/{C93t272f69uXW73e.mjs → DhGoS8Vi10avRc0T.mjs} +1 -1
- package/browser/esm/{CicOwl2VbvgQnjVd.mjs → FJ3f_AG3AtqiwPvE.mjs} +1 -1
- package/browser/esm/{ybd6oHZq8FS_MqtL.mjs → KGE7M7zDiMjCOz64.mjs} +1 -1
- package/{node/esm/D6OcKlcUZD6M68BV.mjs → browser/esm/OkSc7RXqdqBX_dhB.mjs} +1 -1
- package/{node/esm/CZ0BLs5xhvTaPYDh.mjs → browser/esm/UzUKr0PdyOTCvFQK.mjs} +1 -1
- package/browser/esm/declarations.mjs +2 -2
- package/browser/esm/index.mjs +790 -792
- package/{node/esm/DRDr9L2X9CIvxuWt.mjs → browser/esm/j3fzAwgnII1ABYoy.mjs} +1 -1
- package/browser/esm/{DF2fTusbVBu8mgCF.mjs → tT_Sh3neAQCj8w1k.mjs} +1 -1
- package/node/esm/{DXbuB8TogW81jsqq.mjs → -3OnHOj2LLDR1fc_.mjs} +1 -1
- package/node/esm/{B3CtWsu1zcvVUOHj.mjs → 09cs4iXujO7ozZKl.mjs} +1 -1
- package/{browser/esm/awo6QFGSb30mviA0.mjs → node/esm/B4JL4tyPYordrFSn.mjs} +1 -1
- package/node/esm/{qrWn2IOfCdT1WOLg.mjs → B4cV-4I4AxsDqTeg.mjs} +1 -1
- package/node/esm/{BTD5KvdGRxzNBnIO.mjs → B8Lb4ycMbsisimyJ.mjs} +1 -1
- package/node/esm/{C9L7LxTSt6UkMRQJ.mjs → BBsG5_MNOOBzpkm3.mjs} +1 -1
- package/{browser/esm/IcAzgM7RZrZL6-4K.mjs → node/esm/BXyl3EySzcpdcg4a.mjs} +1 -1
- package/node/esm/{CGnTNCRQ0gUUFyr0.mjs → BgWNOg6VC2WA3Wld.mjs} +1 -1
- package/node/esm/{BbSaG4eBosLvgrSS.mjs → Bgm6ooSL37aLrze-.mjs} +1 -1
- package/{browser/esm/PuqvOodiIfHenP7g.mjs → node/esm/C6XhGX3n-kOXcVe-.mjs} +1 -1
- package/node/esm/{DendOKspRKG9r9QD.mjs → CEL8D-iv8wA9zzGP.mjs} +1 -1
- package/node/esm/{DQpO5BTkOABHXJWL.mjs → CHRc41kLdyeK5TBj.mjs} +1 -1
- package/node/esm/{DIRl4nTHGc7r-yI_.mjs → CRPSImZV4jAnwQKI.mjs} +1 -1
- package/node/esm/{xn78EHJuEdJzKXGc.mjs → CcHSbpd59O15t-0s.mjs} +1 -1
- package/node/esm/{DR8Bh2icTbAyj4uJ.mjs → Cwmf3WtWvqEbXl9w.mjs} +1 -1
- package/node/esm/{CjuoNisbPcjTNdVY.mjs → DBovrQMoOcTgfyy5.mjs} +1 -1
- package/{browser/esm/BegSQDj4tl7gUEZB.mjs → node/esm/DKarKpru6FjwvLA_.mjs} +1 -1
- package/{browser/esm/D0XkRZWFT2pe1SLZ.mjs → node/esm/DRcy1_Zqu53jue2l.mjs} +1 -1
- package/node/esm/{DupAjLOP54THnRnY.mjs → DTtayzMN3z3KzrEs.mjs} +1 -1
- package/{browser/esm/P-8nL0ZP1fTNGWQB.mjs → node/esm/DgQs_yv8yoyN7IvY.mjs} +1 -1
- package/node/esm/{C93t272f69uXW73e.mjs → DhGoS8Vi10avRc0T.mjs} +1 -1
- package/node/esm/{ybd6oHZq8FS_MqtL.mjs → KGE7M7zDiMjCOz64.mjs} +1 -1
- package/{browser/esm/D6OcKlcUZD6M68BV.mjs → node/esm/OkSc7RXqdqBX_dhB.mjs} +1 -1
- package/{browser/esm/CZ0BLs5xhvTaPYDh.mjs → node/esm/UzUKr0PdyOTCvFQK.mjs} +1 -1
- package/node/esm/declarations.mjs +2 -2
- package/node/esm/index.mjs +1181 -1183
- package/{browser/esm/DRDr9L2X9CIvxuWt.mjs → node/esm/j3fzAwgnII1ABYoy.mjs} +1 -1
- package/node/esm/{DF2fTusbVBu8mgCF.mjs → tT_Sh3neAQCj8w1k.mjs} +1 -1
- package/package.json +3 -3
- package/types/src/_utils/Distributions.d.ts +3 -5
package/node/esm/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/formulas - Formulas - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/formulas - Formulas - TypeScript formulas compatible with Excel built-ins. - v0.8.0-beta.23
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
|
-
import { C as t, D as n, E as e, O as r, S as o, T as u, _ as i, a as l, b as a, c as s, d as c, f, g as h, h as g, i as m, k as N, l as I, m as
|
|
7
|
+
import { C as t, D as n, E as e, O as r, S as o, T as u, _ as i, a as l, b as a, c as s, d as c, f, g as h, h as g, i as m, k as N, l as I, m as p, n as M, o as A, p as w, r as d, s as E, t as B, u as C, v as S, w as R, x as b, y as v } from "./BBsG5_MNOOBzpkm3.mjs";
|
|
8
8
|
import { FormulaContext as y, FormulaError as T, IRange as V, Scalar as x, ScalarType as D, ValueKind as O, WildCard as F } from "@sheetxl/primitives";
|
|
9
9
|
import P from "bessel";
|
|
10
10
|
import { bahttext as L } from "bahttext";
|
|
@@ -209,13 +209,13 @@ function mt(t, n) {
|
|
|
209
209
|
return It(Nt(t)) - It(Nt(n));
|
|
210
210
|
}
|
|
211
211
|
function Nt(t) {
|
|
212
|
-
return null === t ? 0 : "boolean" == typeof t ? t ? 1 : 0 :
|
|
212
|
+
return null === t ? 0 : "boolean" == typeof t ? t ? 1 : 0 : pt(t);
|
|
213
213
|
}
|
|
214
214
|
function It(t) {
|
|
215
215
|
if (!(t >= 0) || Math.floor(t) > y.getSerialDate(9999, 12, 31)) throw T.BuiltIn.Num;
|
|
216
216
|
return Math.floor(t);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function pt(t) {
|
|
219
219
|
if (null === t) return 0;
|
|
220
220
|
if ("string" == typeof t) try {
|
|
221
221
|
return y.parseAsNumber(t);
|
|
@@ -224,7 +224,7 @@ function Mt(t) {
|
|
|
224
224
|
}
|
|
225
225
|
return y.parseAsSerialDate(t);
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Mt(t) {
|
|
228
228
|
return null === t ? 0 : y.parseAsNumber(t);
|
|
229
229
|
}
|
|
230
230
|
function At(t, n) {
|
|
@@ -232,11 +232,11 @@ function At(t, n) {
|
|
|
232
232
|
return n(t);
|
|
233
233
|
}
|
|
234
234
|
function wt(t, n) {
|
|
235
|
-
const e = It(At(t,
|
|
235
|
+
const e = It(At(t, pt)), { year: r, month: o, day: u } = y.getDateParts(e), { year: i, month: l } = Rt(r, o, Bt(n));
|
|
236
236
|
return Et(i, l, y.getSerialDate(i, l, Math.min(u, St(i, l))));
|
|
237
237
|
}
|
|
238
238
|
function dt(t, n) {
|
|
239
|
-
const e = It(At(t,
|
|
239
|
+
const e = It(At(t, pt)), { year: r, month: o } = y.getDateParts(e), { year: u, month: i } = Rt(r, o, Bt(n));
|
|
240
240
|
return Et(u, i, y.getSerialDate(u, i, St(u, i)));
|
|
241
241
|
}
|
|
242
242
|
function Et(t, n, e) {
|
|
@@ -245,7 +245,7 @@ function Et(t, n, e) {
|
|
|
245
245
|
return e;
|
|
246
246
|
}
|
|
247
247
|
function Bt(t) {
|
|
248
|
-
return Math.trunc(At(t,
|
|
248
|
+
return Math.trunc(At(t, Mt));
|
|
249
249
|
}
|
|
250
250
|
var Ct = [
|
|
251
251
|
31,
|
|
@@ -303,7 +303,7 @@ function xt(t) {
|
|
|
303
303
|
}
|
|
304
304
|
function Dt(t, n, e = 1, r) {
|
|
305
305
|
const o = xt(e);
|
|
306
|
-
let u = It(At(t,
|
|
306
|
+
let u = It(At(t, pt)), i = It(At(n, pt)), l = 1;
|
|
307
307
|
if (u > i) {
|
|
308
308
|
l = -1;
|
|
309
309
|
const t = u;
|
|
@@ -335,7 +335,7 @@ function _t() {
|
|
|
335
335
|
return y.formatResults("Short Date"), Math.floor(y.getNow());
|
|
336
336
|
}
|
|
337
337
|
function Ut(t, n = 1) {
|
|
338
|
-
const e = Yt[
|
|
338
|
+
const e = Yt[Zt(n)];
|
|
339
339
|
if (!e) throw T.BuiltIn.Num;
|
|
340
340
|
return e[y.getDateParts(t).dow % 7];
|
|
341
341
|
}
|
|
@@ -350,7 +350,7 @@ function Xt(t, n = 1) {
|
|
|
350
350
|
}
|
|
351
351
|
else e = y.parseAsSerialDate(t);
|
|
352
352
|
e = It(e);
|
|
353
|
-
const r = null === n ? 0 :
|
|
353
|
+
const r = null === n ? 0 : Zt(y.parseAsNumber(n));
|
|
354
354
|
if (21 === r) return vt(e);
|
|
355
355
|
const o = jt[r];
|
|
356
356
|
if (void 0 === o) throw T.BuiltIn.Num;
|
|
@@ -361,10 +361,11 @@ function kt(t, n, e) {
|
|
|
361
361
|
return Ht(t, n, 1, e);
|
|
362
362
|
}
|
|
363
363
|
function Ht(t, n, e = 1, r) {
|
|
364
|
-
const o = It(At(t,
|
|
364
|
+
const o = It(At(t, pt)), u = Math.floor(At(n, Mt));
|
|
365
|
+
if (0 === u) return o;
|
|
365
366
|
if (T.isError(e)) throw T.BuiltIn.Num;
|
|
366
367
|
const i = xt(e);
|
|
367
|
-
if (7 === i.length
|
|
368
|
+
if (7 === i.length) throw T.BuiltIn.Value;
|
|
368
369
|
const l = zt(r), a = Kt(), s = y.getSerialDate(9999, 12, 31), c = u < 0 ? -1 : 1;
|
|
369
370
|
let f = Math.abs(u), h = o;
|
|
370
371
|
for (; f > 0;) {
|
|
@@ -524,38 +525,42 @@ function zt(t) {
|
|
|
524
525
|
const n = /* @__PURE__ */ new Set();
|
|
525
526
|
for (let e = 0; e < (t?.length ?? 0); e++) {
|
|
526
527
|
const r = t[e];
|
|
527
|
-
null != r && n.add(It(
|
|
528
|
+
null != r && n.add(It(pt(r)));
|
|
528
529
|
}
|
|
529
530
|
return n;
|
|
530
531
|
}
|
|
531
532
|
function Wt(t) {
|
|
532
533
|
return Math.floor(t + Qt);
|
|
533
534
|
}
|
|
534
|
-
var Qt = 1 / 4194304
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
535
|
+
var Qt = 1 / 4194304;
|
|
536
|
+
function Zt(t) {
|
|
537
|
+
return t >= 0 ? Math.floor(t + Qt) : Math.trunc(t);
|
|
538
|
+
}
|
|
539
|
+
var Jt = U({
|
|
540
|
+
BESSELI: () => rn,
|
|
541
|
+
BESSELJ: () => on,
|
|
542
|
+
BESSELK: () => un,
|
|
543
|
+
BESSELY: () => ln
|
|
544
|
+
}), tn = 2 ** 27 + 1, nn = (t) => {
|
|
540
545
|
if (T.isError(t)) throw t;
|
|
541
546
|
if (void 0 === t) throw T.BuiltIn.NA;
|
|
542
547
|
return null === t ? 0 : y.parseAsNumber(t);
|
|
543
|
-
},
|
|
548
|
+
}, en = (t) => {
|
|
544
549
|
const n = Math.trunc(t);
|
|
545
550
|
return n < 0 || n > 1e7 ? NaN : n;
|
|
546
551
|
};
|
|
547
|
-
function
|
|
548
|
-
const e =
|
|
552
|
+
function rn(t, n) {
|
|
553
|
+
const e = nn(t), r = en(nn(n));
|
|
549
554
|
if (Number.isNaN(r)) return NaN;
|
|
550
555
|
const o = P.besseli(Math.abs(e), r);
|
|
551
556
|
return e < 0 && r % 2 == 1 ? -o : o;
|
|
552
557
|
}
|
|
553
|
-
function rn(t, n) {
|
|
554
|
-
const e = tn(t), r = nn(tn(n));
|
|
555
|
-
return Number.isNaN(r) || Math.abs(e) > Jt ? NaN : P.besselj(e, r);
|
|
556
|
-
}
|
|
557
558
|
function on(t, n) {
|
|
558
|
-
const e =
|
|
559
|
+
const e = nn(t), r = en(nn(n));
|
|
560
|
+
return Number.isNaN(r) || Math.abs(e) > tn ? NaN : P.besselj(e, r);
|
|
561
|
+
}
|
|
562
|
+
function un(t, n) {
|
|
563
|
+
const e = nn(t), r = en(nn(n));
|
|
559
564
|
if (Number.isNaN(r)) return NaN;
|
|
560
565
|
if (!(e > 0)) return P.besselk(e, r);
|
|
561
566
|
let o = X(P.besselk(e, 0));
|
|
@@ -568,36 +573,36 @@ function on(t, n) {
|
|
|
568
573
|
}
|
|
569
574
|
return u;
|
|
570
575
|
}
|
|
571
|
-
function
|
|
572
|
-
const e =
|
|
573
|
-
return Number.isNaN(r) || Math.abs(e) >
|
|
574
|
-
}
|
|
575
|
-
var
|
|
576
|
-
BIN2DEC: () =>
|
|
577
|
-
BIN2HEX: () =>
|
|
578
|
-
BIN2OCT: () =>
|
|
579
|
-
BITAND: () =>
|
|
580
|
-
BITLSHIFT: () =>
|
|
581
|
-
BITOR: () =>
|
|
582
|
-
BITRSHIFT: () =>
|
|
583
|
-
BITXOR: () =>
|
|
584
|
-
DEC2BIN: () =>
|
|
576
|
+
function ln(t, n) {
|
|
577
|
+
const e = nn(t), r = en(nn(n));
|
|
578
|
+
return Number.isNaN(r) || Math.abs(e) > tn ? NaN : P.bessely(e, r);
|
|
579
|
+
}
|
|
580
|
+
var an = U({
|
|
581
|
+
BIN2DEC: () => sn,
|
|
582
|
+
BIN2HEX: () => cn,
|
|
583
|
+
BIN2OCT: () => fn,
|
|
584
|
+
BITAND: () => hn,
|
|
585
|
+
BITLSHIFT: () => gn,
|
|
586
|
+
BITOR: () => mn,
|
|
587
|
+
BITRSHIFT: () => Nn,
|
|
588
|
+
BITXOR: () => In,
|
|
589
|
+
DEC2BIN: () => pn,
|
|
585
590
|
DEC2HEX: () => Mn,
|
|
586
|
-
DEC2OCT: () =>
|
|
587
|
-
HEX2BIN: () =>
|
|
588
|
-
HEX2DEC: () =>
|
|
589
|
-
HEX2OCT: () =>
|
|
590
|
-
OCT2BIN: () =>
|
|
591
|
-
OCT2DEC: () =>
|
|
592
|
-
OCT2HEX: () =>
|
|
591
|
+
DEC2OCT: () => An,
|
|
592
|
+
HEX2BIN: () => wn,
|
|
593
|
+
HEX2DEC: () => dn,
|
|
594
|
+
HEX2OCT: () => En,
|
|
595
|
+
OCT2BIN: () => Bn,
|
|
596
|
+
OCT2DEC: () => Cn,
|
|
597
|
+
OCT2HEX: () => Sn
|
|
593
598
|
});
|
|
594
|
-
function
|
|
595
|
-
const n =
|
|
596
|
-
return 10 === n.length && "1" === n.substring(0, 1) ? parseInt(n.substring(1), 2) +
|
|
599
|
+
function sn(t) {
|
|
600
|
+
const n = Fn(t, Rn);
|
|
601
|
+
return 10 === n.length && "1" === n.substring(0, 1) ? parseInt(n.substring(1), 2) + xn : parseInt(n, 2);
|
|
597
602
|
}
|
|
598
|
-
function
|
|
599
|
-
n =
|
|
600
|
-
const e =
|
|
603
|
+
function cn(t, n) {
|
|
604
|
+
n = Dn(n);
|
|
605
|
+
const e = Fn(t, Rn);
|
|
601
606
|
if (t = parseInt(e, 2), 10 === e.length && "1" === e.substring(0, 1)) return (parseInt(e.substring(1), 2) + 0xfffffffe00).toString(16).toUpperCase();
|
|
602
607
|
const r = t.toString(16);
|
|
603
608
|
if (void 0 === n) return r.toUpperCase();
|
|
@@ -605,9 +610,9 @@ function sn(t, n) {
|
|
|
605
610
|
if ((n = Math.trunc(n)) >= r.length) return ("0".repeat(n - r.length) + r).toUpperCase();
|
|
606
611
|
throw T.BuiltIn.Num;
|
|
607
612
|
}
|
|
608
|
-
function
|
|
609
|
-
n =
|
|
610
|
-
const e =
|
|
613
|
+
function fn(t, n) {
|
|
614
|
+
n = Dn(n);
|
|
615
|
+
const e = Fn(t, Rn);
|
|
611
616
|
if (t = parseInt(e, 2), 10 === e.length && "1" === e.substring(0, 1)) return (parseInt(e.substring(1), 2) + 1073741312).toString(8);
|
|
612
617
|
const r = t.toString(8);
|
|
613
618
|
if (void 0 === n) return r.toUpperCase();
|
|
@@ -615,30 +620,30 @@ function cn(t, n) {
|
|
|
615
620
|
if ((n = Math.trunc(n)) >= r.length) return "0".repeat(n - r.length) + r;
|
|
616
621
|
throw T.BuiltIn.Num;
|
|
617
622
|
}
|
|
618
|
-
function fn(t, n) {
|
|
619
|
-
return t = Pn(t), n = Pn(n), _n(t, n, (t, n) => t & n);
|
|
620
|
-
}
|
|
621
623
|
function hn(t, n) {
|
|
622
|
-
t =
|
|
623
|
-
|
|
624
|
+
return t = Ln(t), n = Ln(n), Un(t, n, (t, n) => t & n);
|
|
625
|
+
}
|
|
626
|
+
function gn(t, n) {
|
|
627
|
+
t = Ln(t);
|
|
628
|
+
const e = _n(n);
|
|
624
629
|
if (0 === t) return 0;
|
|
625
630
|
if (Math.abs(e) > 53) return NaN;
|
|
626
631
|
if (e < 0) return Math.trunc(t / 2 ** -e);
|
|
627
632
|
if (e > 48) return 0;
|
|
628
633
|
const r = BigInt(t) << BigInt(e);
|
|
629
|
-
return r > BigInt(
|
|
630
|
-
}
|
|
631
|
-
function gn(t, n) {
|
|
632
|
-
return t = Pn(t), n = Pn(n), _n(t, n, (t, n) => t | n);
|
|
634
|
+
return r > BigInt(Pn) ? NaN : Number(r);
|
|
633
635
|
}
|
|
634
636
|
function mn(t, n) {
|
|
635
|
-
return
|
|
637
|
+
return t = Ln(t), n = Ln(n), Un(t, n, (t, n) => t | n);
|
|
636
638
|
}
|
|
637
639
|
function Nn(t, n) {
|
|
638
|
-
return t =
|
|
640
|
+
return gn(t = Ln(t), -_n(n));
|
|
639
641
|
}
|
|
640
642
|
function In(t, n) {
|
|
641
|
-
|
|
643
|
+
return t = Ln(t), n = Ln(n), Un(t, n, (t, n) => t ^ n);
|
|
644
|
+
}
|
|
645
|
+
function pn(t, n) {
|
|
646
|
+
if (n = Dn(n), (t = On(t)) < xn || t > Vn) throw T.BuiltIn.Num;
|
|
642
647
|
if (t < 0) return "1" + "0".repeat(9 - (512 + t).toString(2).length) + (512 + t).toString(2);
|
|
643
648
|
const e = parseInt(t, 10).toString(2);
|
|
644
649
|
if (void 0 === n) return e;
|
|
@@ -647,7 +652,7 @@ function In(t, n) {
|
|
|
647
652
|
return "0".repeat(n - e.length) + e;
|
|
648
653
|
}
|
|
649
654
|
function Mn(t, n) {
|
|
650
|
-
if (n =
|
|
655
|
+
if (n = Dn(n), (t = On(t)) < -549755813888 || t >= 549755813888) throw T.BuiltIn.Num;
|
|
651
656
|
if (t < 0) return (1099511627776 + t).toString(16).toUpperCase();
|
|
652
657
|
const e = parseInt(t, 10).toString(16);
|
|
653
658
|
if (void 0 === n) return e.toUpperCase();
|
|
@@ -655,8 +660,8 @@ function Mn(t, n) {
|
|
|
655
660
|
if (n < e.length) throw T.BuiltIn.Num;
|
|
656
661
|
return "0".repeat(n - e.length) + e.toUpperCase();
|
|
657
662
|
}
|
|
658
|
-
function
|
|
659
|
-
if (n =
|
|
663
|
+
function An(t, n) {
|
|
664
|
+
if (n = Dn(n), (t = On(t)) < -536870912 || t >= 536870912) throw T.BuiltIn.Num;
|
|
660
665
|
if (t < 0) return (t + 1073741824).toString(8);
|
|
661
666
|
const e = parseInt(t, 10).toString(8);
|
|
662
667
|
if (void 0 === n) return e.toUpperCase();
|
|
@@ -664,62 +669,62 @@ function pn(t, n) {
|
|
|
664
669
|
if (n < e.length) throw T.BuiltIn.Num;
|
|
665
670
|
return "0".repeat(n - e.length) + e;
|
|
666
671
|
}
|
|
667
|
-
function
|
|
668
|
-
n =
|
|
669
|
-
const e =
|
|
670
|
-
if (o <
|
|
672
|
+
function wn(t, n) {
|
|
673
|
+
n = Dn(n);
|
|
674
|
+
const e = Fn(t, vn), r = 10 === e.length && "f" === e.substring(0, 1).toLowerCase(), o = r ? parseInt(e, 16) - 1099511627776 : parseInt(e, 16);
|
|
675
|
+
if (o < xn || o > Vn) return NaN;
|
|
671
676
|
if (r) return "1" + "0".repeat(9 - (o + 512).toString(2).length) + (o + 512).toString(2);
|
|
672
677
|
const u = o.toString(2);
|
|
673
678
|
return void 0 === n ? u : (n = Math.trunc(n)) <= 0 || n < u.length ? NaN : "0".repeat(n - u.length) + u;
|
|
674
679
|
}
|
|
675
|
-
function
|
|
676
|
-
const n = parseInt(
|
|
680
|
+
function dn(t) {
|
|
681
|
+
const n = parseInt(Fn(t, vn), 16);
|
|
677
682
|
return n >= 549755813888 ? n - 1099511627776 : n;
|
|
678
683
|
}
|
|
679
|
-
function dn(t, n) {
|
|
680
|
-
n = xn(n);
|
|
681
|
-
const e = wn(On(t, bn));
|
|
682
|
-
if (e > vn || e < yn) throw T.BuiltIn.Num;
|
|
683
|
-
return pn(e, n);
|
|
684
|
-
}
|
|
685
684
|
function En(t, n) {
|
|
686
|
-
n =
|
|
687
|
-
const e =
|
|
685
|
+
n = Dn(n);
|
|
686
|
+
const e = dn(Fn(t, vn));
|
|
687
|
+
if (e > yn || e < Tn) throw T.BuiltIn.Num;
|
|
688
|
+
return An(e, n);
|
|
689
|
+
}
|
|
690
|
+
function Bn(t, n) {
|
|
691
|
+
n = Dn(n);
|
|
692
|
+
const e = Fn(t, bn);
|
|
688
693
|
if (void 0 !== n && n > 10) throw T.BuiltIn.Num;
|
|
689
694
|
if (void 0 !== n && n < 0) throw T.BuiltIn.Num;
|
|
690
695
|
n = void 0 === n ? NaN : Math.trunc(n);
|
|
691
|
-
const r = 10 === e.length && "7" === e.substring(0, 1), o =
|
|
692
|
-
if (o <
|
|
696
|
+
const r = 10 === e.length && "7" === e.substring(0, 1), o = Cn(e);
|
|
697
|
+
if (o < xn || o > Vn) throw T.BuiltIn.Num;
|
|
693
698
|
if (r) return "1" + "0".repeat(9 - (512 + o).toString(2).length) + (512 + o).toString(2);
|
|
694
699
|
const u = o.toString(2);
|
|
695
700
|
if (0 === n) return u;
|
|
696
701
|
if (n < u.length) throw T.BuiltIn.Num;
|
|
697
702
|
return "0".repeat(n - u.length) + u;
|
|
698
703
|
}
|
|
699
|
-
function
|
|
700
|
-
const n = parseInt(
|
|
704
|
+
function Cn(t) {
|
|
705
|
+
const n = parseInt(Fn(t, bn), 8);
|
|
701
706
|
return n >= 536870912 ? n - 1073741824 : n;
|
|
702
707
|
}
|
|
703
|
-
function
|
|
704
|
-
n =
|
|
705
|
-
const e =
|
|
708
|
+
function Sn(t, n) {
|
|
709
|
+
n = Dn(n);
|
|
710
|
+
const e = Fn(t, bn);
|
|
706
711
|
if ((n = void 0 === n ? NaN : Math.trunc(n)) < 0 || n > 10) return NaN;
|
|
707
|
-
const r =
|
|
712
|
+
const r = Cn(e), o = Mn(r);
|
|
708
713
|
return 0 === n || r < 0 ? o : n < o.length ? NaN : "0".repeat(n - o.length) + o;
|
|
709
714
|
}
|
|
710
|
-
var
|
|
715
|
+
var Rn = /^[01]{1,10}$/, bn = /^[0-7]{1,10}$/, vn = /^[0-9a-fA-F]{1,10}$/, yn = 536870911, Tn = -536870912, Vn = 511, xn = -512, Dn = (t) => {
|
|
711
716
|
if (void 0 === t) return;
|
|
712
717
|
if ("boolean" == typeof t) throw T.BuiltIn.Value;
|
|
713
718
|
const n = Math.trunc(null === t ? 0 : y.parseAsNumber(t));
|
|
714
719
|
if (n < 1 || n > 10) throw T.BuiltIn.Num;
|
|
715
720
|
return n;
|
|
716
|
-
},
|
|
721
|
+
}, On = (t) => {
|
|
717
722
|
if (T.isError(t)) throw t;
|
|
718
723
|
if (void 0 === t) throw T.BuiltIn.NA;
|
|
719
724
|
if (null === t) return 0;
|
|
720
725
|
if ("boolean" == typeof t) throw T.BuiltIn.Value;
|
|
721
726
|
return Math.trunc(y.parseAsNumber(t));
|
|
722
|
-
},
|
|
727
|
+
}, Fn = (t, n) => {
|
|
723
728
|
if (T.isError(t)) throw t;
|
|
724
729
|
if (void 0 === t) throw T.BuiltIn.NA;
|
|
725
730
|
if (null === t) return "0";
|
|
@@ -729,7 +734,7 @@ var Sn = /^[01]{1,10}$/, Rn = /^[0-7]{1,10}$/, bn = /^[0-9a-fA-F]{1,10}$/, vn =
|
|
|
729
734
|
if ("" === e) return "0";
|
|
730
735
|
if (!n.test(e)) throw T.BuiltIn.Num;
|
|
731
736
|
return e;
|
|
732
|
-
},
|
|
737
|
+
}, Pn = 0xffffffffffff, Ln = (t) => {
|
|
733
738
|
if (T.isError(t)) throw t;
|
|
734
739
|
const n = typeof t;
|
|
735
740
|
if ("boolean" === n) return t ? 1 : 0;
|
|
@@ -740,46 +745,46 @@ var Sn = /^[01]{1,10}$/, Rn = /^[0-7]{1,10}$/, bn = /^[0-9a-fA-F]{1,10}$/, vn =
|
|
|
740
745
|
if ("string" !== n) throw T.BuiltIn.Value;
|
|
741
746
|
e = y.parseAsNumber(t);
|
|
742
747
|
}
|
|
743
|
-
if (e < 0 || e >
|
|
748
|
+
if (e < 0 || e > Pn || Math.floor(e) !== e) throw T.BuiltIn.Num;
|
|
744
749
|
return e;
|
|
745
|
-
},
|
|
750
|
+
}, _n = (t) => {
|
|
746
751
|
if (T.isError(t)) throw t;
|
|
747
752
|
return null == t ? 0 : "boolean" == typeof t ? t ? 1 : 0 : Math.trunc(y.parseAsNumber(t));
|
|
748
|
-
},
|
|
749
|
-
function
|
|
750
|
-
t = null == t ? 0 : y.parseAsNumber(t), n =
|
|
751
|
-
const r =
|
|
753
|
+
}, Un = (t, n, e) => Number(e(BigInt(t), BigInt(n))), Xn = U({ CONVERT: () => kn });
|
|
754
|
+
function kn(t, n, e) {
|
|
755
|
+
t = null == t ? 0 : y.parseAsNumber(t), n = Hn(n), e = Hn(e);
|
|
756
|
+
const r = Wn(n), o = Wn(e);
|
|
752
757
|
if (null === r || null === o || r.unit[3] !== o.unit[3]) throw T.BuiltIn.NA;
|
|
753
758
|
return "temperature" === r.unit[3] ? function(t, n, e) {
|
|
754
759
|
if (n === e) return t;
|
|
755
|
-
const r =
|
|
756
|
-
return r ? r(t) :
|
|
760
|
+
const r = Yn[`${n}>${e}`];
|
|
761
|
+
return r ? r(t) : jn[e](Gn[n](t));
|
|
757
762
|
}(t * r.multiplier, r.unit[1], o.unit[1]) / o.multiplier : t * (r.unit[5] / o.unit[5]) * (r.multiplier / o.multiplier);
|
|
758
763
|
}
|
|
759
|
-
function
|
|
764
|
+
function Hn(t) {
|
|
760
765
|
if (T.isError(t)) throw t;
|
|
761
766
|
if ("boolean" == typeof t) throw T.BuiltIn.Value;
|
|
762
767
|
return null == t ? "" : String(t);
|
|
763
768
|
}
|
|
764
|
-
var
|
|
769
|
+
var Gn = {
|
|
765
770
|
C: (t) => t,
|
|
766
771
|
F: (t) => (t - 32) / 1.8,
|
|
767
772
|
K: (t) => t - 273.15,
|
|
768
773
|
Rank: (t) => t / 1.8 - 273.15,
|
|
769
774
|
Reau: (t) => t / .8
|
|
770
|
-
},
|
|
775
|
+
}, jn = {
|
|
771
776
|
C: (t) => t,
|
|
772
777
|
F: (t) => 1.8 * t + 32,
|
|
773
778
|
K: (t) => t + 273.15,
|
|
774
779
|
Rank: (t) => 1.8 * (t + 273.15),
|
|
775
780
|
Reau: (t) => .8 * t
|
|
776
|
-
},
|
|
781
|
+
}, Yn = {
|
|
777
782
|
"F>Rank": (t) => t + 459.67,
|
|
778
783
|
"Rank>F": (t) => t - 459.67,
|
|
779
784
|
"K>Rank": (t) => 1.8 * t,
|
|
780
785
|
"Rank>K": (t) => t / 1.8,
|
|
781
786
|
"F>Reau": (t) => .8 * (t - 32) / 1.8
|
|
782
|
-
},
|
|
787
|
+
}, qn = [
|
|
783
788
|
[
|
|
784
789
|
"a.u. of energy",
|
|
785
790
|
"Eh",
|
|
@@ -1856,14 +1861,14 @@ var Hn = {
|
|
|
1856
1861
|
"none",
|
|
1857
1862
|
1
|
|
1858
1863
|
]
|
|
1859
|
-
],
|
|
1864
|
+
], $n = (() => {
|
|
1860
1865
|
const t = /* @__PURE__ */ new Map();
|
|
1861
|
-
for (const n of
|
|
1866
|
+
for (const n of qn) {
|
|
1862
1867
|
t.set(n[1], n);
|
|
1863
1868
|
for (const e of n[2] ?? []) t.set(e, n);
|
|
1864
1869
|
}
|
|
1865
1870
|
return t;
|
|
1866
|
-
})(),
|
|
1871
|
+
})(), Kn = {
|
|
1867
1872
|
Y: 24,
|
|
1868
1873
|
Z: 21,
|
|
1869
1874
|
E: 18,
|
|
@@ -1885,7 +1890,7 @@ var Hn = {
|
|
|
1885
1890
|
a: -18,
|
|
1886
1891
|
z: -21,
|
|
1887
1892
|
y: -24
|
|
1888
|
-
},
|
|
1893
|
+
}, zn = {
|
|
1889
1894
|
Yi: 80,
|
|
1890
1895
|
Zi: 70,
|
|
1891
1896
|
Ei: 60,
|
|
@@ -1895,24 +1900,24 @@ var Hn = {
|
|
|
1895
1900
|
Mi: 20,
|
|
1896
1901
|
ki: 10
|
|
1897
1902
|
};
|
|
1898
|
-
function
|
|
1899
|
-
const n =
|
|
1903
|
+
function Wn(t) {
|
|
1904
|
+
const n = $n.get(t);
|
|
1900
1905
|
if (n) return {
|
|
1901
1906
|
unit: n,
|
|
1902
1907
|
multiplier: 1
|
|
1903
1908
|
};
|
|
1904
|
-
const e =
|
|
1909
|
+
const e = zn[t.slice(0, 2)];
|
|
1905
1910
|
if (void 0 !== e) {
|
|
1906
|
-
const n =
|
|
1911
|
+
const n = $n.get(t.slice(2));
|
|
1907
1912
|
if ("si+binary" === n?.[4]) return {
|
|
1908
1913
|
unit: n,
|
|
1909
1914
|
multiplier: 2 ** e
|
|
1910
1915
|
};
|
|
1911
1916
|
}
|
|
1912
1917
|
for (const n of [t.slice(0, 2), t.slice(0, 1)]) {
|
|
1913
|
-
const e =
|
|
1918
|
+
const e = Kn[n];
|
|
1914
1919
|
if (void 0 === e) continue;
|
|
1915
|
-
const r =
|
|
1920
|
+
const r = $n.get(t.slice(n.length));
|
|
1916
1921
|
if (r && "none" !== r[4]) return {
|
|
1917
1922
|
unit: r,
|
|
1918
1923
|
multiplier: Number("1e" + e * (r[6] ?? 1))
|
|
@@ -1920,21 +1925,21 @@ function zn(t) {
|
|
|
1920
1925
|
}
|
|
1921
1926
|
return null;
|
|
1922
1927
|
}
|
|
1923
|
-
var
|
|
1924
|
-
DELTA: () =>
|
|
1925
|
-
GESTEP: () =>
|
|
1928
|
+
var Qn = U({
|
|
1929
|
+
DELTA: () => Zn,
|
|
1930
|
+
GESTEP: () => Jn
|
|
1926
1931
|
});
|
|
1927
|
-
function Qn(t, n = 0) {
|
|
1928
|
-
return n = Jn(n), (t = Jn(t)) === n ? 1 : 0;
|
|
1929
|
-
}
|
|
1930
1932
|
function Zn(t, n = 0) {
|
|
1931
|
-
return n =
|
|
1933
|
+
return n = te(n), (t = te(t)) === n ? 1 : 0;
|
|
1932
1934
|
}
|
|
1933
|
-
function Jn(t) {
|
|
1935
|
+
function Jn(t, n = 0) {
|
|
1936
|
+
return n = te(n), (t = te(t)) >= n ? 1 : 0;
|
|
1937
|
+
}
|
|
1938
|
+
function te(t) {
|
|
1934
1939
|
if (void 0 === t) throw T.BuiltIn.NA;
|
|
1935
1940
|
return null === t ? 0 : y.parseAsNumber(t);
|
|
1936
1941
|
}
|
|
1937
|
-
var
|
|
1942
|
+
var ne = [
|
|
1938
1943
|
57.15623566586292,
|
|
1939
1944
|
-59.59796035547549,
|
|
1940
1945
|
14.136097974741746,
|
|
@@ -1950,14 +1955,14 @@ var te = [
|
|
|
1950
1955
|
-26190838401581408e-21,
|
|
1951
1956
|
36899182659531625e-22
|
|
1952
1957
|
];
|
|
1953
|
-
function
|
|
1958
|
+
function ee(t) {
|
|
1954
1959
|
let n = t, e = t + 5.2421875;
|
|
1955
1960
|
e = (t + .5) * Math.log(e) - e;
|
|
1956
1961
|
let r = .9999999999999971;
|
|
1957
|
-
for (let t = 0; t < 14; t++) r +=
|
|
1962
|
+
for (let t = 0; t < 14; t++) r += ne[t] / ++n;
|
|
1958
1963
|
return e + Math.log(2.5066282746310007 * r / t);
|
|
1959
1964
|
}
|
|
1960
|
-
function
|
|
1965
|
+
function re(t) {
|
|
1961
1966
|
const n = [
|
|
1962
1967
|
-1.716185138865495,
|
|
1963
1968
|
24.76565080557592,
|
|
@@ -1990,10 +1995,10 @@ function ee(t) {
|
|
|
1990
1995
|
else if (c > s) for (let t = 0; t < i; ++t) o *= s, s++;
|
|
1991
1996
|
return u && (o = u / o), o;
|
|
1992
1997
|
}
|
|
1993
|
-
function
|
|
1994
|
-
if (!(t <= 0 || n <= 0)) return t + n > 170 ? Math.exp(
|
|
1998
|
+
function oe(t, n) {
|
|
1999
|
+
if (!(t <= 0 || n <= 0)) return t + n > 170 ? Math.exp(le(t, n)) : re(t) * re(n) / re(t + n);
|
|
1995
2000
|
}
|
|
1996
|
-
var
|
|
2001
|
+
var ue = [
|
|
1997
2002
|
1 / 12,
|
|
1998
2003
|
-1 / 360,
|
|
1999
2004
|
1 / 1260,
|
|
@@ -2002,18 +2007,18 @@ var oe = [
|
|
|
2002
2007
|
-691 / 360360,
|
|
2003
2008
|
1 / 156
|
|
2004
2009
|
];
|
|
2005
|
-
function
|
|
2010
|
+
function ie(t) {
|
|
2006
2011
|
const n = 1 / (t * t);
|
|
2007
2012
|
let e = 0;
|
|
2008
|
-
for (let t =
|
|
2013
|
+
for (let t = ue.length - 1; t >= 0; t--) e = (e + ue[t]) * n;
|
|
2009
2014
|
return e * t;
|
|
2010
2015
|
}
|
|
2011
|
-
var
|
|
2016
|
+
var le = (t, n) => {
|
|
2012
2017
|
const e = t < n ? t : n, r = t < n ? n : t;
|
|
2013
|
-
return r < 30 ?
|
|
2014
|
-
return n * Math.log(t) + (t + n - .5) * Math.log1p(n / t) - n +
|
|
2018
|
+
return r < 30 ? ee(t) + ee(n) - ee(t + n) : ee(e) - function(t, n) {
|
|
2019
|
+
return n * Math.log(t) + (t + n - .5) * Math.log1p(n / t) - n + ie(t + n) - ie(t);
|
|
2015
2020
|
}(r, e);
|
|
2016
|
-
},
|
|
2021
|
+
}, ae = [
|
|
2017
2022
|
-1.3026537197817094,
|
|
2018
2023
|
.6419697923564902,
|
|
2019
2024
|
.019476473204185836,
|
|
@@ -2043,29 +2048,29 @@ var ie = (t, n) => {
|
|
|
2043
2048
|
121e-18,
|
|
2044
2049
|
-28e-18
|
|
2045
2050
|
];
|
|
2046
|
-
function
|
|
2051
|
+
function se(t) {
|
|
2047
2052
|
let n = 0, e = 0;
|
|
2048
2053
|
const r = 2 / (2 + t), o = 4 * r - 2;
|
|
2049
|
-
for (let t =
|
|
2054
|
+
for (let t = ae.length - 1; t > 0; t--) {
|
|
2050
2055
|
const r = n;
|
|
2051
|
-
n = o * n - e +
|
|
2056
|
+
n = o * n - e + ae[t], e = r;
|
|
2052
2057
|
}
|
|
2053
|
-
return r * Math.exp(-t * t + .5 * (
|
|
2058
|
+
return r * Math.exp(-t * t + .5 * (ae[0] + o * n) - e);
|
|
2054
2059
|
}
|
|
2055
|
-
var
|
|
2056
|
-
function
|
|
2060
|
+
var ce = (t) => t >= 0 ? 1 - se(t) : se(-t) - 1, fe = (t) => t >= 0 ? se(t) : 2 - se(-t);
|
|
2061
|
+
function he(t) {
|
|
2057
2062
|
if (t >= 2) return -100;
|
|
2058
2063
|
if (t <= 0) return 100;
|
|
2059
2064
|
const n = t < 1 ? t : 2 - t, e = Math.sqrt(-2 * Math.log(n / 2));
|
|
2060
2065
|
let r = -.70711 * ((2.30753 + .27061 * e) / (1 + e * (.99229 + .04481 * e)) - e);
|
|
2061
2066
|
for (let t = 0; t < 2; t++) {
|
|
2062
|
-
const t =
|
|
2067
|
+
const t = fe(r) - n;
|
|
2063
2068
|
r += t / (1.1283791670955126 * Math.exp(-r * r) - r * t);
|
|
2064
2069
|
}
|
|
2065
2070
|
return t < 1 ? r : -r;
|
|
2066
2071
|
}
|
|
2067
|
-
var
|
|
2068
|
-
function
|
|
2072
|
+
var ge = (t, n) => Ie(t, n, !1), me = 1e8;
|
|
2073
|
+
function Ne(t) {
|
|
2069
2074
|
if (Math.abs(t) < .03) {
|
|
2070
2075
|
let n = 0;
|
|
2071
2076
|
for (let e = 14; e >= 0; e--) n = n * t + 2 * (e % 2 == 0 ? -1 : 1) / (e + 3);
|
|
@@ -2073,16 +2078,16 @@ function me(t) {
|
|
|
2073
2078
|
}
|
|
2074
2079
|
return (2 * (t - Math.log1p(t)) / (t * t) - 1) / t;
|
|
2075
2080
|
}
|
|
2076
|
-
function
|
|
2081
|
+
function Ie(t, n, e) {
|
|
2077
2082
|
if (n < 0 || t <= 0) return NaN;
|
|
2078
|
-
if (t >=
|
|
2083
|
+
if (t >= me) {
|
|
2079
2084
|
const r = function(t, n) {
|
|
2080
|
-
const e = n / t - 1, r =
|
|
2081
|
-
return .5 *
|
|
2085
|
+
const e = n / t - 1, r = Ne(e), o = r * e, u = Math.sqrt(1 + o), i = t * e * e * (1 + o) / 2;
|
|
2086
|
+
return .5 * fe(Math.sign(e) * Math.sqrt(i)) + Math.exp(-i) / Math.sqrt(2 * Math.PI * t) * (r / (u * (u + 1)));
|
|
2082
2087
|
}(t, n);
|
|
2083
2088
|
return e ? r : 1 - r;
|
|
2084
2089
|
}
|
|
2085
|
-
const r =
|
|
2090
|
+
const r = ee(t), o = -~(8.5 * Math.log(t >= 1 ? t : 1 / t) + .4 * t + 17);
|
|
2086
2091
|
if (n < t + 1) {
|
|
2087
2092
|
let u = t, i = 1 / t, l = i;
|
|
2088
2093
|
for (let t = 1; t <= o; t++) {
|
|
@@ -2100,8 +2105,8 @@ function Ne(t, n, e) {
|
|
|
2100
2105
|
const s = a * Math.exp(-n + t * Math.log(n) - r);
|
|
2101
2106
|
return e ? s : 1 - s;
|
|
2102
2107
|
}
|
|
2103
|
-
function
|
|
2104
|
-
const e = 4 * Number.EPSILON, r = n - 1, o =
|
|
2108
|
+
function pe(t, n) {
|
|
2109
|
+
const e = 4 * Number.EPSILON, r = n - 1, o = ee(n);
|
|
2105
2110
|
let u, i = 0, l = 0;
|
|
2106
2111
|
if (t >= 1) return 1 / 0;
|
|
2107
2112
|
if (t <= 0) return 0;
|
|
@@ -2115,7 +2120,7 @@ function Ie(t, n) {
|
|
|
2115
2120
|
}
|
|
2116
2121
|
for (let a = 0; a < 100; a++) {
|
|
2117
2122
|
if (u <= 0) return 0;
|
|
2118
|
-
const a =
|
|
2123
|
+
const a = ge(n, u) - t;
|
|
2119
2124
|
let s;
|
|
2120
2125
|
s = n > 1 ? l * Math.exp(-(u - r) + r * (Math.log(u) - i)) : Math.exp(-u + r * Math.log(u) - o);
|
|
2121
2126
|
const c = a / s;
|
|
@@ -2137,17 +2142,17 @@ function Me(t, n, e) {
|
|
|
2137
2142
|
}
|
|
2138
2143
|
return s;
|
|
2139
2144
|
}
|
|
2140
|
-
var
|
|
2141
|
-
function Ae(t, n, e, r) {
|
|
2142
|
-
return t < 0 || t > 1 ? NaN : t < (e + 1) / (e + r + 2) ? we(t, n, e, r) * Me(t, e, r) / e : 1 - we(n, t, r, e) * Me(n, r, e) / r;
|
|
2143
|
-
}
|
|
2145
|
+
var Ae = (t, n, e) => we(t, 1 - t, n, e);
|
|
2144
2146
|
function we(t, n, e, r) {
|
|
2147
|
+
return t < 0 || t > 1 ? NaN : t < (e + 1) / (e + r + 2) ? de(t, n, e, r) * Me(t, e, r) / e : 1 - de(n, t, r, e) * Me(n, r, e) / r;
|
|
2148
|
+
}
|
|
2149
|
+
function de(t, n, e, r) {
|
|
2145
2150
|
if (0 === t || 1 === t) return 0;
|
|
2146
2151
|
const o = t < .5 ? Math.log1p(-t) : Math.log(n);
|
|
2147
|
-
return Math.exp(e * Math.log(t) + r * o -
|
|
2152
|
+
return Math.exp(e * Math.log(t) + r * o - le(e, r));
|
|
2148
2153
|
}
|
|
2149
|
-
function
|
|
2150
|
-
if (!Number.isFinite(
|
|
2154
|
+
function Ee(t, n, e) {
|
|
2155
|
+
if (!Number.isFinite(ee(n)) || !Number.isFinite(ee(e))) return NaN;
|
|
2151
2156
|
const r = 4 * Number.EPSILON, o = n - 1, u = e - 1;
|
|
2152
2157
|
let i, l;
|
|
2153
2158
|
if (t <= 0) return 0;
|
|
@@ -2163,152 +2168,152 @@ function de(t, n, e) {
|
|
|
2163
2168
|
const u = l + Math.exp(e * o) / e;
|
|
2164
2169
|
i = t < l / u ? Math.pow(n * u * t, 1 / n) : 1 - Math.pow(e * u * (1 - t), 1 / e);
|
|
2165
2170
|
}
|
|
2166
|
-
const a = -
|
|
2171
|
+
const a = -le(n, e);
|
|
2167
2172
|
for (let s = 0; s < 100; s++) {
|
|
2168
2173
|
if (0 === i || 1 === i) return i;
|
|
2169
|
-
const c =
|
|
2174
|
+
const c = Ae(i, n, e) - t;
|
|
2170
2175
|
l = Math.exp(o * Math.log(i) + u * Math.log1p(-i) + a);
|
|
2171
2176
|
const f = c / l;
|
|
2172
2177
|
if (i -= l = f / (1 - .5 * Math.min(1, f * (o / i - u / (1 - i)))), i <= 0 && (i = .5 * (i + l)), i >= 1 && (i = .5 * (i + l + 1)), Math.abs(l) < r * i && s > 0) break;
|
|
2173
2178
|
}
|
|
2174
2179
|
return i;
|
|
2175
2180
|
}
|
|
2176
|
-
var
|
|
2177
|
-
ERF: () =>
|
|
2178
|
-
ERFC: () =>
|
|
2179
|
-
ERFC_PRECISE: () =>
|
|
2180
|
-
ERF_PRECISE: () =>
|
|
2181
|
-
}),
|
|
2181
|
+
var Be = U({
|
|
2182
|
+
ERF: () => Se,
|
|
2183
|
+
ERFC: () => be,
|
|
2184
|
+
ERFC_PRECISE: () => ve,
|
|
2185
|
+
ERF_PRECISE: () => Re
|
|
2186
|
+
}), Ce = (t) => {
|
|
2182
2187
|
if (T.isError(t)) throw t;
|
|
2183
2188
|
return null === t ? 0 : y.parseAsNumber(t);
|
|
2184
2189
|
};
|
|
2185
|
-
function
|
|
2186
|
-
if (void 0 === t) throw T.BuiltIn.NA;
|
|
2187
|
-
const e = Be(t);
|
|
2188
|
-
return void 0 === n ? se(e) : se(Be(n)) - se(e);
|
|
2189
|
-
}
|
|
2190
|
-
function Se(t) {
|
|
2190
|
+
function Se(t, n) {
|
|
2191
2191
|
if (void 0 === t) throw T.BuiltIn.NA;
|
|
2192
|
-
|
|
2192
|
+
const e = Ce(t);
|
|
2193
|
+
return void 0 === n ? ce(e) : ce(Ce(n)) - ce(e);
|
|
2193
2194
|
}
|
|
2194
2195
|
function Re(t) {
|
|
2195
2196
|
if (void 0 === t) throw T.BuiltIn.NA;
|
|
2196
|
-
return ce(
|
|
2197
|
+
return ce(Ce(t));
|
|
2197
2198
|
}
|
|
2198
2199
|
function be(t) {
|
|
2199
2200
|
if (void 0 === t) throw T.BuiltIn.NA;
|
|
2200
|
-
return
|
|
2201
|
+
return fe(Ce(t));
|
|
2202
|
+
}
|
|
2203
|
+
function ve(t) {
|
|
2204
|
+
if (void 0 === t) throw T.BuiltIn.NA;
|
|
2205
|
+
return fe(Ce(t));
|
|
2201
2206
|
}
|
|
2202
|
-
var
|
|
2207
|
+
var ye = Math.PI, Te = 2 ** 27, Ve = 134217729, xe = (t, n) => {
|
|
2203
2208
|
const e = t + n, r = e - t;
|
|
2204
2209
|
return [e, t - (e - r) + (n - r)];
|
|
2205
|
-
},
|
|
2206
|
-
const n =
|
|
2207
|
-
const e = t * n, r =
|
|
2210
|
+
}, De = (t) => {
|
|
2211
|
+
const n = ye / 2, e = Math.round(t / n), [r, o] = ((t, n) => {
|
|
2212
|
+
const e = t * n, r = Ve * t, o = r - (r - t), u = t - o, i = Ve * n, l = i - (i - n), a = n - l;
|
|
2208
2213
|
return [e, o * l - e + o * a + u * l + u * a];
|
|
2209
|
-
})(e, n), [u, i] =
|
|
2214
|
+
})(e, n), [u, i] = xe(t, -r), [l, a] = xe(u, i - o - 61257422745431e-30 * e);
|
|
2210
2215
|
return [
|
|
2211
2216
|
(e % 4 + 4) % 4,
|
|
2212
2217
|
l,
|
|
2213
2218
|
a
|
|
2214
2219
|
];
|
|
2215
|
-
},
|
|
2216
|
-
function Fe(t) {
|
|
2217
|
-
const [n, e, r] = xe(t);
|
|
2218
|
-
switch (n) {
|
|
2219
|
-
case 0: return De(e, r);
|
|
2220
|
-
case 1: return Oe(e, r);
|
|
2221
|
-
case 2: return -De(e, r);
|
|
2222
|
-
default: return -Oe(e, r);
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2220
|
+
}, Oe = (t, n) => Math.sin(t) + Math.cos(t) * n, Fe = (t, n) => Math.cos(t) - Math.sin(t) * n;
|
|
2225
2221
|
function Pe(t) {
|
|
2226
|
-
const [n, e, r] =
|
|
2222
|
+
const [n, e, r] = De(t);
|
|
2227
2223
|
switch (n) {
|
|
2228
2224
|
case 0: return Oe(e, r);
|
|
2229
|
-
case 1: return
|
|
2225
|
+
case 1: return Fe(e, r);
|
|
2230
2226
|
case 2: return -Oe(e, r);
|
|
2231
|
-
default: return
|
|
2232
|
-
}
|
|
2233
|
-
}
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2227
|
+
default: return -Fe(e, r);
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
function Le(t) {
|
|
2231
|
+
const [n, e, r] = De(t);
|
|
2232
|
+
switch (n) {
|
|
2233
|
+
case 0: return Fe(e, r);
|
|
2234
|
+
case 1: return -Oe(e, r);
|
|
2235
|
+
case 2: return -Fe(e, r);
|
|
2236
|
+
default: return Oe(e, r);
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
var _e = (t) => Pe(t) / Le(t), Ue = U({
|
|
2240
|
+
COMPLEX: () => Xe,
|
|
2241
|
+
IMABS: () => ke,
|
|
2242
|
+
IMAGINARY: () => He,
|
|
2243
|
+
IMARGUMENT: () => Ge,
|
|
2244
|
+
IMCONJUGATE: () => qe,
|
|
2245
|
+
IMCOS: () => lr,
|
|
2246
|
+
IMCOSH: () => ar,
|
|
2247
|
+
IMCOT: () => sr,
|
|
2248
|
+
IMCOTH: () => cr,
|
|
2249
|
+
IMCSC: () => fr,
|
|
2250
|
+
IMCSCH: () => hr,
|
|
2251
|
+
IMDIV: () => gr,
|
|
2252
|
+
IMEXP: () => mr,
|
|
2253
|
+
IMLN: () => Nr,
|
|
2254
|
+
IMLOG: () => Ir,
|
|
2255
|
+
IMLOG10: () => pr,
|
|
2251
2256
|
IMLOG2: () => Mr,
|
|
2252
|
-
IMPOWER: () =>
|
|
2253
|
-
IMPRODUCT: () =>
|
|
2254
|
-
IMREAL: () =>
|
|
2255
|
-
IMSEC: () =>
|
|
2256
|
-
IMSECH: () =>
|
|
2257
|
-
IMSIN: () =>
|
|
2258
|
-
IMSINH: () =>
|
|
2259
|
-
IMSQRT: () =>
|
|
2260
|
-
IMSUB: () =>
|
|
2261
|
-
IMSUM: () =>
|
|
2262
|
-
IMTAN: () =>
|
|
2263
|
-
IMTANH: () =>
|
|
2257
|
+
IMPOWER: () => Ar,
|
|
2258
|
+
IMPRODUCT: () => wr,
|
|
2259
|
+
IMREAL: () => dr,
|
|
2260
|
+
IMSEC: () => Er,
|
|
2261
|
+
IMSECH: () => Br,
|
|
2262
|
+
IMSIN: () => Cr,
|
|
2263
|
+
IMSINH: () => Sr,
|
|
2264
|
+
IMSQRT: () => Rr,
|
|
2265
|
+
IMSUB: () => br,
|
|
2266
|
+
IMSUM: () => vr,
|
|
2267
|
+
IMTAN: () => yr,
|
|
2268
|
+
IMTANH: () => Tr
|
|
2264
2269
|
});
|
|
2265
|
-
function
|
|
2270
|
+
function Xe(t, n, e = "i") {
|
|
2266
2271
|
if (T.isError(e)) throw e;
|
|
2267
2272
|
if (e || (e = "i"), "i" !== e && "j" !== e) throw T.BuiltIn.Value;
|
|
2268
|
-
const r =
|
|
2273
|
+
const r = ir(t), o = ir(n);
|
|
2269
2274
|
if (0 === r && 0 === o) return y.toText(0);
|
|
2270
2275
|
if (0 === r) return 1 === o ? e : -1 === o ? "-" + e : y.toText(o) + e;
|
|
2271
2276
|
if (0 === o) return y.toText(r);
|
|
2272
2277
|
let u = o > 0 ? "+" : "";
|
|
2273
2278
|
return 1 === o ? y.toText(r) + u + e : -1 === o ? y.toText(r) + u + "-" + e : y.toText(r) + u + y.toText(o) + e;
|
|
2274
2279
|
}
|
|
2275
|
-
function Xe(t) {
|
|
2276
|
-
const { real: n, im: e } = Pr(t);
|
|
2277
|
-
return Math.hypot(n, e);
|
|
2278
|
-
}
|
|
2279
2280
|
function ke(t) {
|
|
2280
|
-
|
|
2281
|
+
const { real: n, im: e } = Lr(t);
|
|
2282
|
+
return Math.hypot(n, e);
|
|
2281
2283
|
}
|
|
2282
2284
|
function He(t) {
|
|
2283
|
-
|
|
2285
|
+
return Lr(t).im;
|
|
2286
|
+
}
|
|
2287
|
+
function Ge(t) {
|
|
2288
|
+
const { real: n, im: e } = Lr(t);
|
|
2284
2289
|
if (0 === n && 0 === e) throw T.BuiltIn.Div0;
|
|
2285
|
-
return
|
|
2290
|
+
return je(n, e);
|
|
2286
2291
|
}
|
|
2287
|
-
var
|
|
2292
|
+
var je = (t, n) => 0 === t && 0 === n ? 0 : 0 === t ? n > 0 ? Math.PI / 2 : -Math.PI / 2 : 0 === n ? t > 0 ? 0 : Math.PI : t > 0 ? Math.atan(n / t) : n > 0 ? Math.atan(n / t) + Math.PI : Math.atan(n / t) - Math.PI, Ye = (t, n) => {
|
|
2288
2293
|
const e = Math.log(Math.sqrt(t * t + n * n));
|
|
2289
2294
|
if (!Number.isFinite(e)) throw T.BuiltIn.Num;
|
|
2290
2295
|
return e;
|
|
2291
2296
|
};
|
|
2292
|
-
function
|
|
2293
|
-
const { real: n, im: e, unit: r } =
|
|
2294
|
-
return 0 !== e ?
|
|
2295
|
-
}
|
|
2296
|
-
var
|
|
2297
|
-
real:
|
|
2298
|
-
im: -
|
|
2299
|
-
}), ze = (t, n) => ({
|
|
2300
|
-
real: Fe(t) * qe(n),
|
|
2301
|
-
im: Pe(t) * $e(n)
|
|
2297
|
+
function qe(t) {
|
|
2298
|
+
const { real: n, im: e, unit: r } = Lr(t);
|
|
2299
|
+
return 0 !== e ? Xe(n, -e, r) : y.toText(n);
|
|
2300
|
+
}
|
|
2301
|
+
var $e = (t) => (Math.exp(t) + Math.exp(-t)) / 2, Ke = (t) => (Math.exp(t) - Math.exp(-t)) / 2, ze = (t, n) => ({
|
|
2302
|
+
real: Le(t) * $e(n),
|
|
2303
|
+
im: -Pe(t) * Ke(n)
|
|
2302
2304
|
}), We = (t, n) => ({
|
|
2303
|
-
real: Pe(
|
|
2304
|
-
im:
|
|
2305
|
+
real: Pe(t) * $e(n),
|
|
2306
|
+
im: Le(t) * Ke(n)
|
|
2305
2307
|
}), Qe = (t, n) => ({
|
|
2306
|
-
real:
|
|
2307
|
-
im:
|
|
2308
|
-
}), Ze = {
|
|
2308
|
+
real: Le(n) * $e(t),
|
|
2309
|
+
im: Pe(n) * Ke(t)
|
|
2310
|
+
}), Ze = (t, n) => ({
|
|
2311
|
+
real: Le(n) * Ke(t),
|
|
2312
|
+
im: Pe(n) * $e(t)
|
|
2313
|
+
}), Je = {
|
|
2309
2314
|
real: 1,
|
|
2310
2315
|
im: 0
|
|
2311
|
-
},
|
|
2316
|
+
}, tr = (t, n) => {
|
|
2312
2317
|
if (0 === n.real && 0 === n.im) throw T.BuiltIn.Num;
|
|
2313
2318
|
if (0 === t.im && 0 === n.im) return {
|
|
2314
2319
|
real: t.real / n.real,
|
|
@@ -2327,209 +2332,209 @@ var qe = (t) => (Math.exp(t) + Math.exp(-t)) / 2, $e = (t) => (Math.exp(t) - Mat
|
|
|
2327
2332
|
real: (t.real * n.real + t.im * n.im) / e,
|
|
2328
2333
|
im: (t.im * n.real - t.real * n.im) / e
|
|
2329
2334
|
};
|
|
2330
|
-
},
|
|
2331
|
-
if (Math.abs(t) >=
|
|
2332
|
-
},
|
|
2335
|
+
}, nr = (t) => {
|
|
2336
|
+
if (Math.abs(t) >= Te) throw T.BuiltIn.Num;
|
|
2337
|
+
}, er = (t, n) => {
|
|
2333
2338
|
const e = Math.tanh(n);
|
|
2334
2339
|
if (1 === Math.abs(e)) return {
|
|
2335
2340
|
real: 0,
|
|
2336
2341
|
im: e
|
|
2337
2342
|
};
|
|
2338
|
-
if (
|
|
2339
|
-
real:
|
|
2343
|
+
if (nr(t), 0 === n) return {
|
|
2344
|
+
real: Pe(t) / Le(t),
|
|
2340
2345
|
im: 0
|
|
2341
2346
|
};
|
|
2342
|
-
const r =
|
|
2347
|
+
const r = Le(2 * t) + Math.cosh(2 * n);
|
|
2343
2348
|
if (0 === r) throw T.BuiltIn.Num;
|
|
2344
2349
|
return {
|
|
2345
|
-
real:
|
|
2350
|
+
real: Pe(2 * t) / r,
|
|
2346
2351
|
im: Math.sinh(2 * n) / r
|
|
2347
2352
|
};
|
|
2348
|
-
},
|
|
2353
|
+
}, rr = (t, n) => {
|
|
2349
2354
|
const e = Math.tanh(n);
|
|
2350
2355
|
if (1 === Math.abs(e)) return {
|
|
2351
2356
|
real: 0,
|
|
2352
2357
|
im: -e
|
|
2353
2358
|
};
|
|
2354
2359
|
if (0 === n) {
|
|
2355
|
-
if (Math.abs(t) >=
|
|
2360
|
+
if (Math.abs(t) >= Te) return {
|
|
2356
2361
|
real: 0,
|
|
2357
2362
|
im: 0
|
|
2358
2363
|
};
|
|
2359
|
-
const n =
|
|
2364
|
+
const n = Pe(t);
|
|
2360
2365
|
if (0 === n) throw T.BuiltIn.Num;
|
|
2361
2366
|
return {
|
|
2362
|
-
real:
|
|
2367
|
+
real: Le(t) / n,
|
|
2363
2368
|
im: 0
|
|
2364
2369
|
};
|
|
2365
2370
|
}
|
|
2366
|
-
|
|
2367
|
-
const r = Math.cosh(2 * n) -
|
|
2371
|
+
nr(t);
|
|
2372
|
+
const r = Math.cosh(2 * n) - Le(2 * t);
|
|
2368
2373
|
if (0 === r) throw T.BuiltIn.Num;
|
|
2369
2374
|
return {
|
|
2370
|
-
real:
|
|
2375
|
+
real: Pe(2 * t) / r,
|
|
2371
2376
|
im: -Math.sinh(2 * n) / r
|
|
2372
2377
|
};
|
|
2373
|
-
},
|
|
2374
|
-
if (Number.isFinite(n.real) && Number.isFinite(n.im) && Math.abs(t) >=
|
|
2378
|
+
}, or = (t, n) => {
|
|
2379
|
+
if (Number.isFinite(n.real) && Number.isFinite(n.im) && Math.abs(t) >= Te) throw T.BuiltIn.Num;
|
|
2375
2380
|
return n;
|
|
2376
|
-
},
|
|
2381
|
+
}, ur = (t) => {
|
|
2377
2382
|
if (!Number.isFinite(t.real) || !Number.isFinite(t.im)) throw T.BuiltIn.Num;
|
|
2378
2383
|
return t;
|
|
2379
|
-
},
|
|
2384
|
+
}, ir = (t) => {
|
|
2380
2385
|
if (T.isError(t)) throw t;
|
|
2381
2386
|
if (void 0 === t) throw T.BuiltIn.NA;
|
|
2382
2387
|
return null === t ? 0 : y.parseAsNumber(t);
|
|
2383
2388
|
};
|
|
2384
|
-
function ir(t) {
|
|
2385
|
-
const { real: n, im: e, unit: r } = Pr(t), o = or(rr(n, Ke(n, e)));
|
|
2386
|
-
return Ue(o.real, o.im, r);
|
|
2387
|
-
}
|
|
2388
2389
|
function lr(t) {
|
|
2389
|
-
const { real: n, im: e, unit: r } =
|
|
2390
|
-
return
|
|
2390
|
+
const { real: n, im: e, unit: r } = Lr(t), o = ur(or(n, ze(n, e)));
|
|
2391
|
+
return Xe(o.real, o.im, r);
|
|
2391
2392
|
}
|
|
2392
2393
|
function ar(t) {
|
|
2393
|
-
const { real: n, im: e, unit: r } =
|
|
2394
|
-
return
|
|
2394
|
+
const { real: n, im: e, unit: r } = Lr(t), o = ur(or(e, Qe(n, e)));
|
|
2395
|
+
return Xe(o.real, o.im, r);
|
|
2395
2396
|
}
|
|
2396
2397
|
function sr(t) {
|
|
2397
|
-
const { real: n, im: e, unit: r } =
|
|
2398
|
-
return
|
|
2398
|
+
const { real: n, im: e, unit: r } = Lr(t), o = rr(n, e);
|
|
2399
|
+
return Xe(o.real, o.im, r);
|
|
2399
2400
|
}
|
|
2400
2401
|
function cr(t) {
|
|
2401
|
-
const { real: n, im: e, unit: r } =
|
|
2402
|
-
return
|
|
2402
|
+
const { real: n, im: e, unit: r } = Lr(t), o = tr(Qe(n, e), Ze(n, e));
|
|
2403
|
+
return Xe(o.real, o.im, r);
|
|
2403
2404
|
}
|
|
2404
2405
|
function fr(t) {
|
|
2405
|
-
const { real: n, im: e, unit: r } =
|
|
2406
|
-
return
|
|
2406
|
+
const { real: n, im: e, unit: r } = Lr(t), o = tr(Je, or(n, We(n, e)));
|
|
2407
|
+
return Xe(o.real, o.im, r);
|
|
2408
|
+
}
|
|
2409
|
+
function hr(t) {
|
|
2410
|
+
const { real: n, im: e, unit: r } = Lr(t), o = tr(Je, or(e, Ze(n, e)));
|
|
2411
|
+
return Xe(o.real, o.im, r);
|
|
2407
2412
|
}
|
|
2408
|
-
function
|
|
2409
|
-
const e = Pr(
|
|
2413
|
+
function gr(t, n) {
|
|
2414
|
+
const e = Lr(Pr(t)), r = e.real, o = e.im, u = e.unit, i = Lr(Pr(n)), l = i.real, a = i.im, s = i.unit;
|
|
2410
2415
|
if (0 === l && 0 === a || u !== s) throw T.BuiltIn.Num;
|
|
2411
|
-
const c = u, f = Math.pow(l, 2) + Math.pow(a, 2), h =
|
|
2416
|
+
const c = u, f = Math.pow(l, 2) + Math.pow(a, 2), h = ur({
|
|
2412
2417
|
real: (r * l + o * a) / f,
|
|
2413
2418
|
im: (o * l - r * a) / f
|
|
2414
2419
|
});
|
|
2415
|
-
return
|
|
2420
|
+
return Xe(h.real, h.im, c);
|
|
2416
2421
|
}
|
|
2417
|
-
function
|
|
2418
|
-
const { real: n, im: e, unit: r } =
|
|
2422
|
+
function mr(t) {
|
|
2423
|
+
const { real: n, im: e, unit: r } = Lr(t);
|
|
2419
2424
|
let o = Math.exp(n);
|
|
2420
2425
|
if (!Number.isFinite(o)) {
|
|
2421
2426
|
if (0 === e) throw T.BuiltIn.Num;
|
|
2422
2427
|
o = Number.MAX_VALUE;
|
|
2423
2428
|
}
|
|
2424
|
-
const u = or(
|
|
2425
|
-
real: o *
|
|
2426
|
-
im: o *
|
|
2429
|
+
const u = ur(or(e, {
|
|
2430
|
+
real: o * Le(e),
|
|
2431
|
+
im: o * Pe(e)
|
|
2427
2432
|
}));
|
|
2428
|
-
return
|
|
2433
|
+
return Xe(u.real, u.im, r);
|
|
2429
2434
|
}
|
|
2430
|
-
function
|
|
2431
|
-
const { real: n, im: e, unit: r } =
|
|
2432
|
-
return
|
|
2435
|
+
function Nr(t) {
|
|
2436
|
+
const { real: n, im: e, unit: r } = Lr(t);
|
|
2437
|
+
return Xe(Ye(n, e), je(n, e), r);
|
|
2433
2438
|
}
|
|
2434
|
-
function
|
|
2435
|
-
const e =
|
|
2436
|
-
return T.isError(e) ? e : n <= 0 || 1 === n ? NaN :
|
|
2439
|
+
function Ir(t, n = 10) {
|
|
2440
|
+
const e = Nr(t);
|
|
2441
|
+
return T.isError(e) ? e : n <= 0 || 1 === n ? NaN : gr(e, Math.log(n));
|
|
2437
2442
|
}
|
|
2438
|
-
function
|
|
2439
|
-
const { real: n, im: e, unit: r } =
|
|
2440
|
-
return
|
|
2443
|
+
function pr(t) {
|
|
2444
|
+
const { real: n, im: e, unit: r } = Lr(t);
|
|
2445
|
+
return Xe(Ye(n, e) / Math.LN10, je(n, e) / Math.LN10, r);
|
|
2441
2446
|
}
|
|
2442
2447
|
function Mr(t) {
|
|
2443
|
-
const { real: n, im: e, unit: r } =
|
|
2444
|
-
return
|
|
2448
|
+
const { real: n, im: e, unit: r } = Lr(t);
|
|
2449
|
+
return Xe(Ye(n, e) / Math.LN2, je(n, e) / Math.LN2, r);
|
|
2445
2450
|
}
|
|
2446
|
-
function
|
|
2447
|
-
const { real: e, im: r, unit: o } = Pr(
|
|
2451
|
+
function Ar(t, n) {
|
|
2452
|
+
const { real: e, im: r, unit: o } = Lr(Pr(t)), u = y.parseAsNumber(Pr(n) ?? 0), i = Math.sqrt(e * e + r * r);
|
|
2448
2453
|
if (0 === e && 0 === r) {
|
|
2449
|
-
if (u > 0) return
|
|
2454
|
+
if (u > 0) return Xe(0, 0, o);
|
|
2450
2455
|
throw T.BuiltIn.Num;
|
|
2451
2456
|
}
|
|
2452
2457
|
const l = u * Math.log(i);
|
|
2453
2458
|
if (!Number.isFinite(l)) throw T.BuiltIn.Num;
|
|
2454
2459
|
const a = Math.pow(i, u);
|
|
2455
2460
|
if (!Number.isFinite(a)) throw T.BuiltIn.Num;
|
|
2456
|
-
const s = u *
|
|
2457
|
-
real: a *
|
|
2458
|
-
im: a *
|
|
2461
|
+
const s = u * je(e, r), c = or(s, {
|
|
2462
|
+
real: a * Le(s),
|
|
2463
|
+
im: a * Pe(s)
|
|
2459
2464
|
});
|
|
2460
|
-
return
|
|
2465
|
+
return Xe(c.real, c.im, o);
|
|
2461
2466
|
}
|
|
2462
|
-
function
|
|
2467
|
+
function wr(t) {
|
|
2463
2468
|
const n = t.length;
|
|
2464
|
-
if (0 === n) return
|
|
2465
|
-
const e =
|
|
2466
|
-
let r =
|
|
2469
|
+
if (0 === n) return Xe(0, 0, "i");
|
|
2470
|
+
const e = Lr(t[0]);
|
|
2471
|
+
let r = Xe(e.real, e.im, e.unit);
|
|
2467
2472
|
for (let e = 1; e < n; e++) {
|
|
2468
|
-
const n = t[e], o =
|
|
2473
|
+
const n = t[e], o = Lr(r), u = Lr(n), i = o.unit;
|
|
2469
2474
|
if (i !== u.unit) throw T.BuiltIn.Value;
|
|
2470
2475
|
const l = o.real, a = o.im, s = u.real, c = u.im, f = {
|
|
2471
2476
|
real: l * s - a * c,
|
|
2472
2477
|
im: l * c + a * s
|
|
2473
2478
|
};
|
|
2474
2479
|
if (!Number.isFinite(f.real) || !Number.isFinite(f.im)) throw T.BuiltIn.Value;
|
|
2475
|
-
r =
|
|
2480
|
+
r = Xe(f.real, f.im, i);
|
|
2476
2481
|
}
|
|
2477
2482
|
return r;
|
|
2478
2483
|
}
|
|
2479
|
-
function wr(t) {
|
|
2480
|
-
return Pr(t).real;
|
|
2481
|
-
}
|
|
2482
2484
|
function dr(t) {
|
|
2483
|
-
|
|
2484
|
-
return Ue(o.real, o.im, r);
|
|
2485
|
+
return Lr(t).real;
|
|
2485
2486
|
}
|
|
2486
2487
|
function Er(t) {
|
|
2487
|
-
const { real: n, im: e, unit: r } =
|
|
2488
|
-
return
|
|
2488
|
+
const { real: n, im: e, unit: r } = Lr(t), o = tr(Je, or(n, ze(n, e)));
|
|
2489
|
+
return Xe(o.real, o.im, r);
|
|
2489
2490
|
}
|
|
2490
2491
|
function Br(t) {
|
|
2491
|
-
const { real: n, im: e, unit: r } =
|
|
2492
|
-
return
|
|
2492
|
+
const { real: n, im: e, unit: r } = Lr(t), o = tr(Je, or(e, Qe(n, e)));
|
|
2493
|
+
return Xe(o.real, o.im, r);
|
|
2493
2494
|
}
|
|
2494
2495
|
function Cr(t) {
|
|
2495
|
-
const { real: n, im: e, unit: r } =
|
|
2496
|
-
return
|
|
2496
|
+
const { real: n, im: e, unit: r } = Lr(t), o = ur(or(n, We(n, e)));
|
|
2497
|
+
return Xe(o.real, o.im, r);
|
|
2497
2498
|
}
|
|
2498
2499
|
function Sr(t) {
|
|
2499
|
-
const { real: n, im: e, unit: r } =
|
|
2500
|
+
const { real: n, im: e, unit: r } = Lr(t), o = ur(or(e, Ze(n, e)));
|
|
2501
|
+
return Xe(o.real, o.im, r);
|
|
2502
|
+
}
|
|
2503
|
+
function Rr(t) {
|
|
2504
|
+
const { real: n, im: e, unit: r } = Lr(t), o = Math.sqrt(Math.sqrt(n * n + e * e));
|
|
2500
2505
|
if (!Number.isFinite(o)) throw T.BuiltIn.Num;
|
|
2501
|
-
const u =
|
|
2502
|
-
return
|
|
2506
|
+
const u = je(n, e) / 2;
|
|
2507
|
+
return Xe(o * Le(u), o * Pe(u), r);
|
|
2503
2508
|
}
|
|
2504
|
-
function
|
|
2505
|
-
const e = Pr(
|
|
2509
|
+
function br(t, n) {
|
|
2510
|
+
const e = Lr(Pr(t)), r = e.real, o = e.im, u = e.unit, i = Lr(Pr(n)), l = i.real, a = i.im;
|
|
2506
2511
|
if (u !== i.unit) throw T.BuiltIn.Num;
|
|
2507
|
-
return
|
|
2512
|
+
return Xe(r - l, o - a, u);
|
|
2508
2513
|
}
|
|
2509
|
-
function
|
|
2514
|
+
function vr(t) {
|
|
2510
2515
|
let n, e = 0, r = 0;
|
|
2511
2516
|
const o = t.length;
|
|
2512
2517
|
for (let u = 0; u < o; u++) {
|
|
2513
|
-
const o = t[u], { real: i, im: l, unit: a } =
|
|
2518
|
+
const o = t[u], { real: i, im: l, unit: a } = Lr(o);
|
|
2514
2519
|
if (n || (n = a), n !== a) throw T.BuiltIn.Value;
|
|
2515
2520
|
e += i, r += l;
|
|
2516
2521
|
}
|
|
2517
|
-
return
|
|
2518
|
-
}
|
|
2519
|
-
function vr(t) {
|
|
2520
|
-
const { real: n, im: e, unit: r } = Pr(t), o = nr(n, e);
|
|
2521
|
-
return Ue(o.real, o.im, r);
|
|
2522
|
+
return Xe(e, r, n);
|
|
2522
2523
|
}
|
|
2523
2524
|
function yr(t) {
|
|
2524
|
-
const { real: n, im: e, unit: r } =
|
|
2525
|
-
return
|
|
2525
|
+
const { real: n, im: e, unit: r } = Lr(t), o = er(n, e);
|
|
2526
|
+
return Xe(o.real, o.im, r);
|
|
2527
|
+
}
|
|
2528
|
+
function Tr(t) {
|
|
2529
|
+
const { real: n, im: e, unit: r } = Lr(t), o = tr(Ze(n, e), Qe(n, e));
|
|
2530
|
+
return Xe(o.real, o.im, r);
|
|
2526
2531
|
}
|
|
2527
|
-
var
|
|
2532
|
+
var Vr = String.raw`[+-]?\s*[0-9]+[.]?[0-9]*(?:[eE][+-]?[0-9]+)?`, xr = new RegExp(String.raw`^\s*([+-]?\s*(?:[0-9]+[.]?[0-9]*(?:[eE][+-]?[0-9]+)?)?)\s*([ij])\s*$`), Dr = new RegExp(String.raw`^\s*(${Vr})\s*([+-]\s*(?:[0-9]+[.]?[0-9]*(?:[eE][+-]?[0-9]+)?)?)\s*([ij])\s*$`), Or = /^\s*[+-]?\s*$/, Fr = (t) => Or.test(t) ? Number(`${t.replace(/\s+/g, "")}1`) : Number(t.replace(/\s+/g, "")), Pr = (t) => {
|
|
2528
2533
|
if (T.isError(t)) throw t;
|
|
2529
2534
|
if (void 0 === t) throw T.BuiltIn.NA;
|
|
2530
2535
|
return t;
|
|
2531
2536
|
};
|
|
2532
|
-
function
|
|
2537
|
+
function Lr(t) {
|
|
2533
2538
|
let n = 0, e = 0, r = "i";
|
|
2534
2539
|
if ("number" == typeof t) return {
|
|
2535
2540
|
real: t,
|
|
@@ -2550,23 +2555,23 @@ function Pr(t) {
|
|
|
2550
2555
|
unit: r
|
|
2551
2556
|
};
|
|
2552
2557
|
} catch (t) {}
|
|
2553
|
-
let o = t.match(
|
|
2554
|
-
if (o) return e =
|
|
2558
|
+
let o = t.match(xr);
|
|
2559
|
+
if (o) return e = Fr(o[1]), r = o[2], {
|
|
2555
2560
|
real: n,
|
|
2556
2561
|
im: e,
|
|
2557
2562
|
unit: r
|
|
2558
2563
|
};
|
|
2559
|
-
if (o = t.match(
|
|
2564
|
+
if (o = t.match(Dr), o) return n = Fr(o[1]), e = Fr(o[2]), r = o[3], {
|
|
2560
2565
|
real: n,
|
|
2561
2566
|
im: e,
|
|
2562
2567
|
unit: r
|
|
2563
2568
|
};
|
|
2564
2569
|
throw T.BuiltIn.Num;
|
|
2565
2570
|
}
|
|
2566
|
-
var
|
|
2567
|
-
FXHISTORY: () =>
|
|
2568
|
-
STOCKHISTORY: () =>
|
|
2569
|
-
}),
|
|
2571
|
+
var _r = U({
|
|
2572
|
+
FXHISTORY: () => eo,
|
|
2573
|
+
STOCKHISTORY: () => Jr
|
|
2574
|
+
}), Ur = 864e5, Xr = (t) => Math.round(Date.parse(`${t}T00:00:00Z`) / Ur) + 25569, kr = (t) => (/* @__PURE__ */ new Date((Math.floor(t) - 25569) * Ur)).toISOString().slice(0, 10), Hr = [
|
|
2570
2575
|
"Date",
|
|
2571
2576
|
"Close",
|
|
2572
2577
|
"Open",
|
|
@@ -2574,12 +2579,12 @@ var Lr = U({
|
|
|
2574
2579
|
"Low",
|
|
2575
2580
|
"Volume"
|
|
2576
2581
|
];
|
|
2577
|
-
function
|
|
2578
|
-
const e = t.properties.split(",").map((t) =>
|
|
2582
|
+
function Gr(t, n) {
|
|
2583
|
+
const e = t.properties.split(",").map((t) => Hr[Number(t)]), r = [];
|
|
2579
2584
|
2 === t.headers && r.push(e.map((n, e) => 0 === e ? t.instrument : null)), t.headers >= 1 && r.push([...e]);
|
|
2580
2585
|
const o = Array.from(n.keys()).sort();
|
|
2581
2586
|
for (const u of o) {
|
|
2582
|
-
const o =
|
|
2587
|
+
const o = Xr(u);
|
|
2583
2588
|
if (o < t.start || o > t.end) continue;
|
|
2584
2589
|
const i = n.get(u);
|
|
2585
2590
|
r.push(e.map((t) => "Date" === t ? o : i[t] ?? null));
|
|
@@ -2587,17 +2592,17 @@ function Hr(t, n) {
|
|
|
2587
2592
|
if (0 === r.length) throw T.BuiltIn.NA;
|
|
2588
2593
|
return r;
|
|
2589
2594
|
}
|
|
2590
|
-
function
|
|
2595
|
+
function jr(t) {
|
|
2591
2596
|
const n = [];
|
|
2592
2597
|
for (const e of t ?? []) {
|
|
2593
2598
|
if (null == e) continue;
|
|
2594
2599
|
const t = Number(e);
|
|
2595
|
-
if (!Number.isInteger(t) || t < 0 || t >=
|
|
2600
|
+
if (!Number.isInteger(t) || t < 0 || t >= Hr.length) throw T.BuiltIn.Value;
|
|
2596
2601
|
n.push(t);
|
|
2597
2602
|
}
|
|
2598
2603
|
return n.length > 0 ? n.join(",") : "0,1";
|
|
2599
2604
|
}
|
|
2600
|
-
function
|
|
2605
|
+
function Yr(t, n) {
|
|
2601
2606
|
const e = Math.floor(t), r = void 0 === n ? e : Math.floor(n);
|
|
2602
2607
|
if (e < 1 || r < e) throw T.BuiltIn.Value;
|
|
2603
2608
|
return {
|
|
@@ -2605,7 +2610,7 @@ function jr(t, n) {
|
|
|
2605
2610
|
end: r
|
|
2606
2611
|
};
|
|
2607
2612
|
}
|
|
2608
|
-
function
|
|
2613
|
+
function qr(t, n, e) {
|
|
2609
2614
|
const r = /* @__PURE__ */ new Map();
|
|
2610
2615
|
for (const n of t) {
|
|
2611
2616
|
const t = n.payload.url, e = r.get(t);
|
|
@@ -2617,7 +2622,7 @@ function Yr(t, n, e) {
|
|
|
2617
2622
|
for (const t of o) t.onCancel(() => {
|
|
2618
2623
|
0 === --u && r.abort();
|
|
2619
2624
|
});
|
|
2620
|
-
|
|
2625
|
+
$r(n, t, r.signal).then((t) => {
|
|
2621
2626
|
let n;
|
|
2622
2627
|
try {
|
|
2623
2628
|
n = e(t);
|
|
@@ -2626,7 +2631,7 @@ function Yr(t, n, e) {
|
|
|
2626
2631
|
return;
|
|
2627
2632
|
}
|
|
2628
2633
|
for (const t of o) try {
|
|
2629
|
-
t.resolve(
|
|
2634
|
+
t.resolve(Gr(t.payload, n));
|
|
2630
2635
|
} catch (n) {
|
|
2631
2636
|
t.reject(n);
|
|
2632
2637
|
}
|
|
@@ -2635,7 +2640,7 @@ function Yr(t, n, e) {
|
|
|
2635
2640
|
});
|
|
2636
2641
|
}
|
|
2637
2642
|
}
|
|
2638
|
-
async function
|
|
2643
|
+
async function $r(t, n, e) {
|
|
2639
2644
|
const r = await t.fetch(n, {
|
|
2640
2645
|
signal: e,
|
|
2641
2646
|
headers: { Accept: "application/json" }
|
|
@@ -2644,7 +2649,7 @@ async function qr(t, n, e) {
|
|
|
2644
2649
|
if (!r.ok) throw new T.Value(`HTTP ${r.status}`);
|
|
2645
2650
|
return r.json();
|
|
2646
2651
|
}
|
|
2647
|
-
var
|
|
2652
|
+
var Kr = "https://www.alphavantage.co/query", zr = [
|
|
2648
2653
|
{
|
|
2649
2654
|
fn: "TIME_SERIES_DAILY",
|
|
2650
2655
|
key: "Time Series (Daily)"
|
|
@@ -2657,32 +2662,32 @@ var $r = "https://www.alphavantage.co/query", Kr = [
|
|
|
2657
2662
|
fn: "TIME_SERIES_MONTHLY",
|
|
2658
2663
|
key: "Monthly Time Series"
|
|
2659
2664
|
}
|
|
2660
|
-
],
|
|
2665
|
+
], Wr = {
|
|
2661
2666
|
Open: "1. open",
|
|
2662
2667
|
High: "2. high",
|
|
2663
2668
|
Low: "3. low",
|
|
2664
2669
|
Close: "4. close",
|
|
2665
2670
|
Volume: "5. volume"
|
|
2666
2671
|
};
|
|
2667
|
-
function
|
|
2672
|
+
function Qr() {
|
|
2668
2673
|
const t = globalThis.ALPHAVANTAGE_API_KEY;
|
|
2669
2674
|
if ("string" == typeof t && t) return t;
|
|
2670
2675
|
const n = globalThis.process?.env?.ALPHAVANTAGE_API_KEY;
|
|
2671
2676
|
return "string" == typeof n && n ? n : "demo";
|
|
2672
2677
|
}
|
|
2673
|
-
function
|
|
2674
|
-
|
|
2678
|
+
function Zr(t, n) {
|
|
2679
|
+
qr(t, n, (t) => {
|
|
2675
2680
|
if (!t || "object" != typeof t) throw T.BuiltIn.Value;
|
|
2676
2681
|
if (t["Error Message"]) throw T.BuiltIn.NA;
|
|
2677
2682
|
const n = t.Information ?? t.Note;
|
|
2678
2683
|
if (n) throw new T.Value(String(n));
|
|
2679
|
-
const e =
|
|
2684
|
+
const e = zr.map((n) => t[n.key]).find((t) => t && "object" == typeof t);
|
|
2680
2685
|
if (!e) throw T.BuiltIn.NA;
|
|
2681
2686
|
const r = /* @__PURE__ */ new Map();
|
|
2682
2687
|
for (const t of Object.keys(e)) {
|
|
2683
2688
|
const n = e[t], o = {};
|
|
2684
|
-
for (const t of Object.keys(
|
|
2685
|
-
const e = n[
|
|
2689
|
+
for (const t of Object.keys(Wr)) {
|
|
2690
|
+
const e = n[Wr[t]];
|
|
2686
2691
|
o[t] = void 0 === e ? null : Number(e);
|
|
2687
2692
|
}
|
|
2688
2693
|
r.set(t, o);
|
|
@@ -2690,24 +2695,24 @@ function Qr(t, n) {
|
|
|
2690
2695
|
return r;
|
|
2691
2696
|
});
|
|
2692
2697
|
}
|
|
2693
|
-
function
|
|
2694
|
-
const { start: i, end: l } =
|
|
2698
|
+
function Jr(t, n, e, r = 0, o = 1, u) {
|
|
2699
|
+
const { start: i, end: l } = Yr(n, e), a = t.trim().toUpperCase();
|
|
2695
2700
|
if (!a) throw T.BuiltIn.Value;
|
|
2696
|
-
const s =
|
|
2701
|
+
const s = zr[Math.trunc(r)];
|
|
2697
2702
|
if (!s) throw T.BuiltIn.Value;
|
|
2698
2703
|
const c = {
|
|
2699
|
-
url: `${
|
|
2704
|
+
url: `${Kr}?function=${s.fn}&symbol=${encodeURIComponent(a)}&outputsize=full&apikey=${encodeURIComponent(Qr())}`,
|
|
2700
2705
|
headers: Math.trunc(o),
|
|
2701
|
-
properties:
|
|
2706
|
+
properties: jr(u),
|
|
2702
2707
|
start: i,
|
|
2703
2708
|
end: l,
|
|
2704
2709
|
instrument: a
|
|
2705
2710
|
};
|
|
2706
|
-
return y.defer(
|
|
2711
|
+
return y.defer(Zr, c), [[T.BuiltIn.Busy]];
|
|
2707
2712
|
}
|
|
2708
|
-
var
|
|
2709
|
-
function
|
|
2710
|
-
|
|
2713
|
+
var to = "https://api.frankfurter.dev/v1";
|
|
2714
|
+
function no(t, n) {
|
|
2715
|
+
qr(t, n, (t) => {
|
|
2711
2716
|
const n = t?.rates;
|
|
2712
2717
|
if (!n || "object" != typeof n) throw T.BuiltIn.NA;
|
|
2713
2718
|
const e = /* @__PURE__ */ new Map();
|
|
@@ -2718,49 +2723,49 @@ function to(t, n) {
|
|
|
2718
2723
|
return e;
|
|
2719
2724
|
});
|
|
2720
2725
|
}
|
|
2721
|
-
function
|
|
2722
|
-
const { start: u, end: i } =
|
|
2726
|
+
function eo(t, n, e, r, o = 1) {
|
|
2727
|
+
const { start: u, end: i } = Yr(e, r), l = t.trim().toUpperCase(), a = n.trim().toUpperCase();
|
|
2723
2728
|
if (!/^[A-Z]{3}$/.test(l) || !/^[A-Z]{3}$/.test(a)) throw T.BuiltIn.Value;
|
|
2724
2729
|
const s = {
|
|
2725
|
-
url: `${
|
|
2730
|
+
url: `${to}/${kr(u)}..${kr(i)}?from=${l}&to=${a}`,
|
|
2726
2731
|
headers: Math.trunc(o),
|
|
2727
2732
|
properties: "0,1",
|
|
2728
2733
|
start: u,
|
|
2729
2734
|
end: i,
|
|
2730
2735
|
instrument: `${l}/${a}`
|
|
2731
2736
|
};
|
|
2732
|
-
return y.defer(
|
|
2737
|
+
return y.defer(no, s), [[T.BuiltIn.Busy]];
|
|
2733
2738
|
}
|
|
2734
|
-
var
|
|
2739
|
+
var ro = (t, n, e = 0) => {
|
|
2735
2740
|
const r = (t) => T.isError(t) ? t : n(t);
|
|
2736
2741
|
return y.getArgs().getKindAt(e) === O.Reference ? r(t.getValueAt(0, 0)) : y.createRange(t.getRowCount(), t.getColumnCount(), (n, e) => r(t.getValueAt(e.rowIndex, e.colIndex)));
|
|
2737
|
-
},
|
|
2738
|
-
CELL: () =>
|
|
2739
|
-
ERROR_TYPE: () =>
|
|
2740
|
-
INFO: () =>
|
|
2741
|
-
ISBLANK: () =>
|
|
2742
|
-
ISDATE: () =>
|
|
2743
|
-
ISEMAIL: () =>
|
|
2744
|
-
ISERR: () =>
|
|
2745
|
-
ISERROR: () =>
|
|
2746
|
-
ISEVEN: () =>
|
|
2747
|
-
ISFORMULA: () =>
|
|
2748
|
-
ISLOGICAL: () =>
|
|
2749
|
-
ISNA: () =>
|
|
2750
|
-
ISNONTEXT: () =>
|
|
2751
|
-
ISNUMBER: () =>
|
|
2752
|
-
ISODD: () =>
|
|
2753
|
-
ISOMITTED: () =>
|
|
2754
|
-
ISREF: () =>
|
|
2755
|
-
ISTEXT: () =>
|
|
2756
|
-
ISURL: () =>
|
|
2757
|
-
N: () =>
|
|
2758
|
-
NA: () =>
|
|
2759
|
-
SHEET: () =>
|
|
2760
|
-
SHEETS: () =>
|
|
2761
|
-
TYPE: () =>
|
|
2742
|
+
}, oo = U({
|
|
2743
|
+
CELL: () => uo,
|
|
2744
|
+
ERROR_TYPE: () => io,
|
|
2745
|
+
INFO: () => lo,
|
|
2746
|
+
ISBLANK: () => ao,
|
|
2747
|
+
ISDATE: () => so,
|
|
2748
|
+
ISEMAIL: () => co,
|
|
2749
|
+
ISERR: () => fo,
|
|
2750
|
+
ISERROR: () => ho,
|
|
2751
|
+
ISEVEN: () => go,
|
|
2752
|
+
ISFORMULA: () => mo,
|
|
2753
|
+
ISLOGICAL: () => No,
|
|
2754
|
+
ISNA: () => Io,
|
|
2755
|
+
ISNONTEXT: () => po,
|
|
2756
|
+
ISNUMBER: () => Ao,
|
|
2757
|
+
ISODD: () => wo,
|
|
2758
|
+
ISOMITTED: () => Bo,
|
|
2759
|
+
ISREF: () => So,
|
|
2760
|
+
ISTEXT: () => Ro,
|
|
2761
|
+
ISURL: () => Co,
|
|
2762
|
+
N: () => bo,
|
|
2763
|
+
NA: () => yo,
|
|
2764
|
+
SHEET: () => Vo,
|
|
2765
|
+
SHEETS: () => xo,
|
|
2766
|
+
TYPE: () => Oo
|
|
2762
2767
|
});
|
|
2763
|
-
function
|
|
2768
|
+
function uo(t, n) {
|
|
2764
2769
|
let e = null;
|
|
2765
2770
|
switch (n || (n = y.getReference()), t) {
|
|
2766
2771
|
case "address":
|
|
@@ -2790,10 +2795,10 @@ function oo(t, n) {
|
|
|
2790
2795
|
}
|
|
2791
2796
|
return e;
|
|
2792
2797
|
}
|
|
2793
|
-
function
|
|
2798
|
+
function io(t) {
|
|
2794
2799
|
return T.isError(t) ? t.getCode() : T.BuiltIn.NA;
|
|
2795
2800
|
}
|
|
2796
|
-
function
|
|
2801
|
+
function lo(t) {
|
|
2797
2802
|
if ("directory" === t) {
|
|
2798
2803
|
try {
|
|
2799
2804
|
return y.getRuntime().getLocation();
|
|
@@ -2810,10 +2815,10 @@ function io(t) {
|
|
|
2810
2815
|
if ("user" === t) return y.getRuntime().getUser() || (y.formatResults("@[Red]"), "Unidentified");
|
|
2811
2816
|
throw T.BuiltIn.Value;
|
|
2812
2817
|
}
|
|
2813
|
-
function
|
|
2818
|
+
function ao(t) {
|
|
2814
2819
|
return null === t;
|
|
2815
2820
|
}
|
|
2816
|
-
function
|
|
2821
|
+
function so(t) {
|
|
2817
2822
|
if ("string" != typeof t) return !1;
|
|
2818
2823
|
try {
|
|
2819
2824
|
return y.parseAsSerialDate(t), !0;
|
|
@@ -2821,50 +2826,50 @@ function ao(t) {
|
|
|
2821
2826
|
return !1;
|
|
2822
2827
|
}
|
|
2823
2828
|
}
|
|
2824
|
-
function so(t) {
|
|
2825
|
-
return "string" == typeof t && (t.length > 7 && "mailto:" === t.substring(0, 7).toLowerCase() ? !/\s/.test(t) : /^[^\s@]+@[^\s@]+\.[^\s@]+$/i.test(t));
|
|
2826
|
-
}
|
|
2827
2829
|
function co(t) {
|
|
2828
|
-
return
|
|
2830
|
+
return "string" == typeof t && (t.length > 7 && "mailto:" === t.substring(0, 7).toLowerCase() ? !/\s/.test(t) : /^[^\s@]+@[^\s@]+\.[^\s@]+$/i.test(t));
|
|
2829
2831
|
}
|
|
2830
2832
|
function fo(t) {
|
|
2831
|
-
return T.isError(t);
|
|
2833
|
+
return T.isError(t) && !(t instanceof T.NA);
|
|
2832
2834
|
}
|
|
2833
2835
|
function ho(t) {
|
|
2834
|
-
return
|
|
2836
|
+
return T.isError(t);
|
|
2835
2837
|
}
|
|
2836
2838
|
function go(t) {
|
|
2837
|
-
|
|
2838
|
-
return y.createRange(t.getRowCount(), t.getColumnCount(), (t, r) => null !== y.getFormulaAt(n.rowStart + r.rowIndex, n.colStart + r.colIndex, e));
|
|
2839
|
+
return Eo(t);
|
|
2839
2840
|
}
|
|
2840
2841
|
function mo(t) {
|
|
2841
|
-
|
|
2842
|
+
const n = (t = To(t)).getCoords(), e = n.scope ?? void 0;
|
|
2843
|
+
return y.createRange(t.getRowCount(), t.getColumnCount(), (t, r) => null !== y.getFormulaAt(n.rowStart + r.rowIndex, n.colStart + r.colIndex, e));
|
|
2842
2844
|
}
|
|
2843
2845
|
function No(t) {
|
|
2844
|
-
return
|
|
2846
|
+
return "boolean" == typeof t;
|
|
2845
2847
|
}
|
|
2846
2848
|
function Io(t) {
|
|
2849
|
+
return t instanceof T.NA;
|
|
2850
|
+
}
|
|
2851
|
+
function po(t) {
|
|
2847
2852
|
return !Mo(t);
|
|
2848
2853
|
}
|
|
2849
2854
|
function Mo(t) {
|
|
2850
2855
|
return "string" == typeof t || !0 === t?.isIRichData && "string" == typeof t.toPrimitive?.();
|
|
2851
2856
|
}
|
|
2852
|
-
function
|
|
2857
|
+
function Ao(t) {
|
|
2853
2858
|
return "number" == typeof t;
|
|
2854
2859
|
}
|
|
2855
|
-
function
|
|
2856
|
-
const n =
|
|
2860
|
+
function wo(t) {
|
|
2861
|
+
const n = Eo(t);
|
|
2857
2862
|
return T.isError(n) ? n : !n;
|
|
2858
2863
|
}
|
|
2859
|
-
function
|
|
2864
|
+
function Eo(t) {
|
|
2860
2865
|
if ("boolean" == typeof t) return T.BuiltIn.Value;
|
|
2861
2866
|
const n = null == t ? 0 : y.parseAsNumber(t);
|
|
2862
2867
|
return Math.trunc(j(n)) % 2 == 0;
|
|
2863
2868
|
}
|
|
2864
|
-
function
|
|
2869
|
+
function Bo(t) {
|
|
2865
2870
|
return y.getArgs().getKindAt(0) === O.Omitted;
|
|
2866
2871
|
}
|
|
2867
|
-
function
|
|
2872
|
+
function Co(t) {
|
|
2868
2873
|
if ("string" != typeof t) return !1;
|
|
2869
2874
|
try {
|
|
2870
2875
|
const n = new URL(t);
|
|
@@ -2872,28 +2877,28 @@ function Bo(t) {
|
|
|
2872
2877
|
} catch {
|
|
2873
2878
|
return !1;
|
|
2874
2879
|
}
|
|
2875
|
-
return
|
|
2880
|
+
return Fo.test(t);
|
|
2876
2881
|
}
|
|
2877
|
-
function
|
|
2882
|
+
function So(t) {
|
|
2878
2883
|
if (!t || 0 === t.length) return !1;
|
|
2879
2884
|
for (let n = 0; n < t.length; n++) if (!t[n]?.isIReferenceRange) return !1;
|
|
2880
2885
|
return !0;
|
|
2881
2886
|
}
|
|
2882
|
-
function
|
|
2887
|
+
function Ro(t) {
|
|
2883
2888
|
return Mo(t);
|
|
2884
2889
|
}
|
|
2885
|
-
function
|
|
2890
|
+
function bo(t) {
|
|
2886
2891
|
if (y.getArgs().getKindAt(0) === O.Lambda) return T.BuiltIn.Value;
|
|
2887
2892
|
const n = !0 === t?.isIRange ? t : null;
|
|
2888
|
-
return n ?
|
|
2893
|
+
return n ? ro(n, vo) : vo(t);
|
|
2889
2894
|
}
|
|
2890
|
-
var
|
|
2891
|
-
function
|
|
2895
|
+
var vo = (t) => "number" == typeof t ? t : "boolean" == typeof t ? Number(t) : 0;
|
|
2896
|
+
function yo() {
|
|
2892
2897
|
return T.BuiltIn.NA;
|
|
2893
2898
|
}
|
|
2894
|
-
var
|
|
2895
|
-
function
|
|
2896
|
-
if (void 0 === (t = void 0 === t ? void 0 :
|
|
2899
|
+
var To = (t) => Array.isArray(t) ? t[0] : t;
|
|
2900
|
+
function Vo(t) {
|
|
2901
|
+
if (void 0 === (t = void 0 === t ? void 0 : To(t))) {
|
|
2897
2902
|
const t = y.getSheetIndex();
|
|
2898
2903
|
return t >= 0 ? t + 1 : T.BuiltIn.NA;
|
|
2899
2904
|
}
|
|
@@ -2906,15 +2911,15 @@ function To(t) {
|
|
|
2906
2911
|
const e = y.getSheetIndex(n);
|
|
2907
2912
|
return e >= 0 ? e + 1 : T.BuiltIn.NA;
|
|
2908
2913
|
}
|
|
2909
|
-
function
|
|
2914
|
+
function xo(t) {
|
|
2910
2915
|
if (void 0 === t) return y.getSheetCount();
|
|
2911
2916
|
if (Array.isArray(t) && t.isSheetSpan) {
|
|
2912
2917
|
const n = t[0];
|
|
2913
2918
|
return y.getSheetIndex(n) >= 0 ? t.length : T.BuiltIn.NA;
|
|
2914
2919
|
}
|
|
2915
|
-
return (t =
|
|
2920
|
+
return (t = To(t)).isIReferenceRange ? 1 : T.BuiltIn.NA;
|
|
2916
2921
|
}
|
|
2917
|
-
var
|
|
2922
|
+
var Do = {
|
|
2918
2923
|
[O.Number]: 1,
|
|
2919
2924
|
[O.Null]: 1,
|
|
2920
2925
|
[O.String]: 2,
|
|
@@ -2924,11 +2929,11 @@ var xo = {
|
|
|
2924
2929
|
[O.RichData]: 128,
|
|
2925
2930
|
[O.Lambda]: 128
|
|
2926
2931
|
};
|
|
2927
|
-
function
|
|
2928
|
-
if (T.isError(t)) return
|
|
2932
|
+
function Oo(t) {
|
|
2933
|
+
if (T.isError(t)) return Do[O.Error];
|
|
2929
2934
|
let n = y.getArgs().getKindAt(0);
|
|
2930
2935
|
if (n === O.Reference) {
|
|
2931
|
-
if (t.getColumnCount() > 1 || t.getRowCount() > 1) return
|
|
2936
|
+
if (t.getColumnCount() > 1 || t.getRowCount() > 1) return Do[O.Array];
|
|
2932
2937
|
n = function(t) {
|
|
2933
2938
|
if (null === t) return O.Null;
|
|
2934
2939
|
if (T.isError(t)) return O.Error;
|
|
@@ -2947,23 +2952,23 @@ function Do(t) {
|
|
|
2947
2952
|
return O.Number;
|
|
2948
2953
|
}(t.getValueAt(0, 0));
|
|
2949
2954
|
}
|
|
2950
|
-
return
|
|
2955
|
+
return Do[n] ?? 1;
|
|
2951
2956
|
}
|
|
2952
|
-
var
|
|
2953
|
-
DATESTRING: () =>
|
|
2954
|
-
NUMBERSTRING: () =>
|
|
2957
|
+
var Fo = /* @__PURE__ */ new RegExp("^([a-zA-Z]+:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$", "i"), Po = U({
|
|
2958
|
+
DATESTRING: () => Lo,
|
|
2959
|
+
NUMBERSTRING: () => _o
|
|
2955
2960
|
});
|
|
2956
|
-
function
|
|
2961
|
+
function Lo(t) {
|
|
2957
2962
|
return T.BuiltIn.NA;
|
|
2958
2963
|
}
|
|
2959
|
-
function
|
|
2964
|
+
function _o(t, n) {
|
|
2960
2965
|
return T.BuiltIn.NA;
|
|
2961
2966
|
}
|
|
2962
|
-
var
|
|
2963
|
-
function
|
|
2967
|
+
var Uo = U({ PHONETIC: () => Xo });
|
|
2968
|
+
function Xo(t) {
|
|
2964
2969
|
return T.BuiltIn.NA;
|
|
2965
2970
|
}
|
|
2966
|
-
function
|
|
2971
|
+
function ko(t, n, e, r, o) {
|
|
2967
2972
|
let u = null;
|
|
2968
2973
|
e && (u = y.getResizedReference(e.getCoords(), t.getRowCount(), t.getColumnCount()));
|
|
2969
2974
|
const i = y.createCriteria(n), l = i(null);
|
|
@@ -2991,35 +2996,35 @@ function Xo(t, n, e, r, o) {
|
|
|
2991
2996
|
return r;
|
|
2992
2997
|
}(r, t, n)) } : void 0);
|
|
2993
2998
|
}
|
|
2994
|
-
var
|
|
2995
|
-
AND: () =>
|
|
2996
|
-
BYCOL: () =>
|
|
2997
|
-
BYROW: () =>
|
|
2998
|
-
FALSE: () =>
|
|
2999
|
-
FLATTEN: () =>
|
|
3000
|
-
IF: () =>
|
|
3001
|
-
IFERROR: () =>
|
|
3002
|
-
IFNA: () =>
|
|
3003
|
-
IFS: () =>
|
|
3004
|
-
LAMBDA: () =>
|
|
3005
|
-
LET: () =>
|
|
3006
|
-
MAKEARRAY: () =>
|
|
3007
|
-
MAP: () =>
|
|
3008
|
-
NOT: () =>
|
|
3009
|
-
OR: () =>
|
|
3010
|
-
REDUCE: () =>
|
|
3011
|
-
REDUCEIF: () =>
|
|
3012
|
-
SCAN: () =>
|
|
3013
|
-
SWITCH: () =>
|
|
3014
|
-
TRUE: () =>
|
|
3015
|
-
XOR: () =>
|
|
3016
|
-
}),
|
|
3017
|
-
function
|
|
2999
|
+
var Ho = (t, n) => (t ?? 0) + n, Go = (t, n) => t, jo = U({
|
|
3000
|
+
AND: () => qo,
|
|
3001
|
+
BYCOL: () => $o,
|
|
3002
|
+
BYROW: () => Ko,
|
|
3003
|
+
FALSE: () => zo,
|
|
3004
|
+
FLATTEN: () => Wo,
|
|
3005
|
+
IF: () => Qo,
|
|
3006
|
+
IFERROR: () => Zo,
|
|
3007
|
+
IFNA: () => Jo,
|
|
3008
|
+
IFS: () => tu,
|
|
3009
|
+
LAMBDA: () => nu,
|
|
3010
|
+
LET: () => eu,
|
|
3011
|
+
MAKEARRAY: () => ru,
|
|
3012
|
+
MAP: () => ou,
|
|
3013
|
+
NOT: () => uu,
|
|
3014
|
+
OR: () => iu,
|
|
3015
|
+
REDUCE: () => lu,
|
|
3016
|
+
REDUCEIF: () => au,
|
|
3017
|
+
SCAN: () => su,
|
|
3018
|
+
SWITCH: () => cu,
|
|
3019
|
+
TRUE: () => fu,
|
|
3020
|
+
XOR: () => hu
|
|
3021
|
+
}), Yo = (t) => "number" == typeof t ? X(t) : t;
|
|
3022
|
+
function qo(t) {
|
|
3018
3023
|
let n = !1, e = !1;
|
|
3019
3024
|
for (const r of t) for (const t of r.values()) n = !0, t || (e = !0);
|
|
3020
3025
|
return n ? !e : T.BuiltIn.Value;
|
|
3021
3026
|
}
|
|
3022
|
-
function
|
|
3027
|
+
function $o(t, n) {
|
|
3023
3028
|
if (!n) return T.BuiltIn.Calc;
|
|
3024
3029
|
const e = t.getColumnCount(), r = new Array(e);
|
|
3025
3030
|
for (let o = 0; o < e; o++) r[o] = n(t.slice({
|
|
@@ -3028,7 +3033,7 @@ function qo(t, n) {
|
|
|
3028
3033
|
}));
|
|
3029
3034
|
return y.createRange(1, e, [r]);
|
|
3030
3035
|
}
|
|
3031
|
-
function
|
|
3036
|
+
function Ko(t, n) {
|
|
3032
3037
|
if (!n) return T.BuiltIn.Calc;
|
|
3033
3038
|
const e = t.getRowCount(), r = new Array(e);
|
|
3034
3039
|
for (let o = 0; o < e; o++) r[o] = [n(t.slice({
|
|
@@ -3037,33 +3042,33 @@ function $o(t, n) {
|
|
|
3037
3042
|
}))];
|
|
3038
3043
|
return y.createRange(e, 1, r);
|
|
3039
3044
|
}
|
|
3040
|
-
function
|
|
3045
|
+
function zo() {
|
|
3041
3046
|
return !1;
|
|
3042
3047
|
}
|
|
3043
|
-
function
|
|
3048
|
+
function Wo(t) {
|
|
3044
3049
|
return t.map((t) => t.flatten()).reduce((t, n) => t.concat(n));
|
|
3045
3050
|
}
|
|
3046
|
-
function
|
|
3051
|
+
function Qo(t, n, e) {
|
|
3047
3052
|
return t ? n : e;
|
|
3048
3053
|
}
|
|
3049
|
-
function
|
|
3054
|
+
function Zo(t, n) {
|
|
3050
3055
|
return T.isError(t) ? n : t;
|
|
3051
3056
|
}
|
|
3052
|
-
function
|
|
3057
|
+
function Jo(t, n) {
|
|
3053
3058
|
return T.BuiltIn.NA.equals(t) ? n : t;
|
|
3054
3059
|
}
|
|
3055
|
-
function
|
|
3060
|
+
function tu(t) {
|
|
3056
3061
|
for (const [n, e] of t) {
|
|
3057
3062
|
if (T.isError(n)) return n;
|
|
3058
3063
|
if (n) return e;
|
|
3059
3064
|
}
|
|
3060
3065
|
return T.BuiltIn.NA;
|
|
3061
3066
|
}
|
|
3062
|
-
function
|
|
3067
|
+
function nu(t) {
|
|
3063
3068
|
return T.BuiltIn.Calc;
|
|
3064
3069
|
}
|
|
3065
|
-
function
|
|
3066
|
-
function
|
|
3070
|
+
function eu(t, n, e, ...r) {}
|
|
3071
|
+
function ru(t, n, e) {
|
|
3067
3072
|
if (t !== Math.trunc(t) || n !== Math.trunc(n) || t < 1 || n < 1) return T.BuiltIn.Value;
|
|
3068
3073
|
const r = y.getEntireCoords();
|
|
3069
3074
|
if (t > r.rowEnd + 1 || n > r.colEnd + 1) return T.BuiltIn.Value;
|
|
@@ -3075,7 +3080,7 @@ function eu(t, n, e) {
|
|
|
3075
3080
|
}
|
|
3076
3081
|
return y.createRange(t, n, o);
|
|
3077
3082
|
}
|
|
3078
|
-
function
|
|
3083
|
+
function ou(t, n) {
|
|
3079
3084
|
const e = n.length, r = e > 0 ? n[e - 1] : null;
|
|
3080
3085
|
if ("function" != typeof r) return T.BuiltIn.Value;
|
|
3081
3086
|
const o = [t];
|
|
@@ -3108,15 +3113,15 @@ function ru(t, n) {
|
|
|
3108
3113
|
}
|
|
3109
3114
|
return y.createRange(i, a, h);
|
|
3110
3115
|
}
|
|
3111
|
-
function
|
|
3116
|
+
function uu(t) {
|
|
3112
3117
|
return !t;
|
|
3113
3118
|
}
|
|
3114
|
-
function
|
|
3119
|
+
function iu(t) {
|
|
3115
3120
|
let n = !1, e = !1;
|
|
3116
3121
|
for (const r of t) for (const t of r.values()) n = !0, t && (e = !0);
|
|
3117
3122
|
return n ? e : T.BuiltIn.Value;
|
|
3118
3123
|
}
|
|
3119
|
-
function
|
|
3124
|
+
function lu(t, n, e) {
|
|
3120
3125
|
if (Array.isArray(t)) return T.BuiltIn.Value;
|
|
3121
3126
|
let r = t, o = void 0 !== t;
|
|
3122
3127
|
const u = !0 === n.isIReferenceRange, i = n.entries({
|
|
@@ -3138,10 +3143,10 @@ function iu(t, n, e) {
|
|
|
3138
3143
|
}
|
|
3139
3144
|
return r;
|
|
3140
3145
|
}
|
|
3141
|
-
function
|
|
3142
|
-
return
|
|
3146
|
+
function au(t, n, e, r) {
|
|
3147
|
+
return ko(t, n, e, r, null);
|
|
3143
3148
|
}
|
|
3144
|
-
function
|
|
3149
|
+
function su(t, n, e) {
|
|
3145
3150
|
const r = n.getRowCount(), o = n.getColumnCount();
|
|
3146
3151
|
if (Array.isArray(t)) return y.createRange(r, o, () => T.BuiltIn.Value);
|
|
3147
3152
|
const u = !0 === n.isIReferenceRange;
|
|
@@ -3162,70 +3167,70 @@ function au(t, n, e) {
|
|
|
3162
3167
|
}
|
|
3163
3168
|
return y.createRange(r, o, a);
|
|
3164
3169
|
}
|
|
3165
|
-
function
|
|
3166
|
-
const r =
|
|
3170
|
+
function cu(t, n, e) {
|
|
3171
|
+
const r = Yo(t ?? 0);
|
|
3167
3172
|
for (const [t, e] of n) {
|
|
3168
3173
|
if (T.isError(t)) return t;
|
|
3169
|
-
if (0 === y.compare(r,
|
|
3174
|
+
if (0 === y.compare(r, Yo(t ?? 0))) return e ?? 0;
|
|
3170
3175
|
}
|
|
3171
3176
|
return void 0 !== e ? e : T.BuiltIn.NA;
|
|
3172
3177
|
}
|
|
3173
|
-
function
|
|
3178
|
+
function fu() {
|
|
3174
3179
|
return !0;
|
|
3175
3180
|
}
|
|
3176
|
-
function
|
|
3181
|
+
function hu(t) {
|
|
3177
3182
|
let n = !1, e = 0;
|
|
3178
3183
|
for (const r of t) for (const t of r.values()) n = !0, t && e++;
|
|
3179
3184
|
return n ? e % 2 == 1 : T.BuiltIn.Value;
|
|
3180
3185
|
}
|
|
3181
|
-
var
|
|
3186
|
+
var gu = Object.freeze({ includeEmpty: !0 }), mu = Object.freeze({ axis: V.Axis.Column }), Nu = Object.freeze({ axis: V.Axis.Row }), Iu = (Object.freeze({
|
|
3182
3187
|
type: D.Number,
|
|
3183
3188
|
axis: V.Axis.Column
|
|
3184
3189
|
}), U({
|
|
3185
|
-
ADDRESS: () =>
|
|
3190
|
+
ADDRESS: () => pu,
|
|
3186
3191
|
AREAS: () => Mu,
|
|
3187
|
-
ARRAYFORMULA: () =>
|
|
3188
|
-
ARRAY_CONSTRAIN: () =>
|
|
3189
|
-
CHOOSE: () =>
|
|
3190
|
-
CHOOSECOLS: () =>
|
|
3191
|
-
CHOOSEROWS: () =>
|
|
3192
|
-
COLUMN: () =>
|
|
3193
|
-
COLUMNS: () =>
|
|
3194
|
-
DROP: () =>
|
|
3195
|
-
EXPAND: () =>
|
|
3196
|
-
FIELDVALUE: () =>
|
|
3197
|
-
FILTER: () =>
|
|
3198
|
-
FORMULATEXT: () =>
|
|
3199
|
-
GETPIVOTDATA: () =>
|
|
3200
|
-
HLOOKUP: () =>
|
|
3201
|
-
HSTACK: () =>
|
|
3202
|
-
HYPERLINK: () =>
|
|
3203
|
-
IMAGE: () =>
|
|
3204
|
-
INDEX: () =>
|
|
3205
|
-
INDIRECT: () =>
|
|
3206
|
-
LOOKUP: () =>
|
|
3207
|
-
MATCH: () =>
|
|
3208
|
-
OFFSET: () =>
|
|
3209
|
-
ROW: () =>
|
|
3210
|
-
ROWS: () =>
|
|
3211
|
-
RTD: () =>
|
|
3212
|
-
SORT: () =>
|
|
3213
|
-
SORTBY: () =>
|
|
3214
|
-
TAKE: () =>
|
|
3215
|
-
TOCOL: () =>
|
|
3216
|
-
TOROW: () =>
|
|
3217
|
-
TRANSPOSE: () =>
|
|
3218
|
-
TRIMRANGE: () =>
|
|
3219
|
-
UNIQUE: () =>
|
|
3220
|
-
VLOOKUP: () =>
|
|
3221
|
-
VSTACK: () =>
|
|
3222
|
-
WRAPCOLS: () =>
|
|
3223
|
-
WRAPROWS: () =>
|
|
3224
|
-
XLOOKUP: () =>
|
|
3225
|
-
XMATCH: () =>
|
|
3192
|
+
ARRAYFORMULA: () => wu,
|
|
3193
|
+
ARRAY_CONSTRAIN: () => Au,
|
|
3194
|
+
CHOOSE: () => du,
|
|
3195
|
+
CHOOSECOLS: () => Eu,
|
|
3196
|
+
CHOOSEROWS: () => Bu,
|
|
3197
|
+
COLUMN: () => Cu,
|
|
3198
|
+
COLUMNS: () => Su,
|
|
3199
|
+
DROP: () => Ru,
|
|
3200
|
+
EXPAND: () => vu,
|
|
3201
|
+
FIELDVALUE: () => yu,
|
|
3202
|
+
FILTER: () => xu,
|
|
3203
|
+
FORMULATEXT: () => Ou,
|
|
3204
|
+
GETPIVOTDATA: () => Fu,
|
|
3205
|
+
HLOOKUP: () => _u,
|
|
3206
|
+
HSTACK: () => Xu,
|
|
3207
|
+
HYPERLINK: () => ku,
|
|
3208
|
+
IMAGE: () => Gu,
|
|
3209
|
+
INDEX: () => ju,
|
|
3210
|
+
INDIRECT: () => Yu,
|
|
3211
|
+
LOOKUP: () => qu,
|
|
3212
|
+
MATCH: () => $u,
|
|
3213
|
+
OFFSET: () => Ku,
|
|
3214
|
+
ROW: () => zu,
|
|
3215
|
+
ROWS: () => Wu,
|
|
3216
|
+
RTD: () => Qu,
|
|
3217
|
+
SORT: () => Zu,
|
|
3218
|
+
SORTBY: () => ei,
|
|
3219
|
+
TAKE: () => ri,
|
|
3220
|
+
TOCOL: () => ui,
|
|
3221
|
+
TOROW: () => ii,
|
|
3222
|
+
TRANSPOSE: () => li,
|
|
3223
|
+
TRIMRANGE: () => ai,
|
|
3224
|
+
UNIQUE: () => ci,
|
|
3225
|
+
VLOOKUP: () => fi,
|
|
3226
|
+
VSTACK: () => hi,
|
|
3227
|
+
WRAPCOLS: () => mi,
|
|
3228
|
+
WRAPROWS: () => Ni,
|
|
3229
|
+
XLOOKUP: () => Ii,
|
|
3230
|
+
XMATCH: () => pi
|
|
3226
3231
|
}));
|
|
3227
|
-
function
|
|
3228
|
-
const u =
|
|
3232
|
+
function pu(t, n, e = 1, r = !0, o = void 0) {
|
|
3233
|
+
const u = di(t), i = di(n), l = di(e), a = y.getEntireCoords();
|
|
3229
3234
|
if (l < 1 || l > 4) throw T.BuiltIn.Value;
|
|
3230
3235
|
const s = !r && (2 === l || 4 === l);
|
|
3231
3236
|
if (!r && (3 === l || 4 === l) ? Math.abs(u) > a.rowEnd : u < 1 || u > a.rowEnd + 1) throw T.BuiltIn.Value;
|
|
@@ -3242,7 +3247,7 @@ function Iu(t, n, e = 1, r = !0, o = void 0) {
|
|
|
3242
3247
|
function Mu(t) {
|
|
3243
3248
|
return t.length;
|
|
3244
3249
|
}
|
|
3245
|
-
function
|
|
3250
|
+
function Au(t, n, e) {
|
|
3246
3251
|
return n < 0 || e < 0 ? T.BuiltIn.Num : (n = Math.trunc(n), e = Math.trunc(e), n < 1 || e < 1 ? T.BuiltIn.Ref : t.slice({
|
|
3247
3252
|
rowStart: 0,
|
|
3248
3253
|
colStart: 0,
|
|
@@ -3250,17 +3255,17 @@ function pu(t, n, e) {
|
|
|
3250
3255
|
colEnd: Math.min(e, t.getColumnCount()) - 1
|
|
3251
3256
|
}));
|
|
3252
3257
|
}
|
|
3253
|
-
function
|
|
3258
|
+
function wu(t) {
|
|
3254
3259
|
return t;
|
|
3255
3260
|
}
|
|
3256
|
-
function
|
|
3261
|
+
function du(t, n) {
|
|
3257
3262
|
const e = n.length;
|
|
3258
3263
|
if (e < 1 || e > 254) throw T.BuiltIn.Value;
|
|
3259
3264
|
const r = Math.trunc(t);
|
|
3260
3265
|
if (r < 1 || r > e) throw T.BuiltIn.Value;
|
|
3261
3266
|
return n[r - 1];
|
|
3262
3267
|
}
|
|
3263
|
-
function
|
|
3268
|
+
function Eu(t, n) {
|
|
3264
3269
|
if (t.length > 1) return T.BuiltIn.Ref;
|
|
3265
3270
|
const e = t[0], r = e.getColumnCount(), o = n.map((t) => {
|
|
3266
3271
|
const n = Math.trunc(t);
|
|
@@ -3271,7 +3276,7 @@ function du(t, n) {
|
|
|
3271
3276
|
});
|
|
3272
3277
|
return e.take(o, V.Axis.Column);
|
|
3273
3278
|
}
|
|
3274
|
-
function
|
|
3279
|
+
function Bu(t, n) {
|
|
3275
3280
|
if (t.length > 1) return T.BuiltIn.Ref;
|
|
3276
3281
|
const e = t[0], r = e.getRowCount(), o = n.map((t) => {
|
|
3277
3282
|
const n = Math.trunc(t);
|
|
@@ -3282,17 +3287,17 @@ function Eu(t, n) {
|
|
|
3282
3287
|
});
|
|
3283
3288
|
return e.take(o, V.Axis.Row);
|
|
3284
3289
|
}
|
|
3285
|
-
function
|
|
3290
|
+
function Cu(t) {
|
|
3286
3291
|
if (!t || 0 === t.length) return y.getColumn() + 1;
|
|
3287
3292
|
if (t.length > 1) return T.BuiltIn.Ref;
|
|
3288
3293
|
const n = [], e = t[0].getCoords(), r = e.colStart, o = e.colEnd;
|
|
3289
3294
|
for (let t = r; t <= o; t++) n.push(t + 1);
|
|
3290
3295
|
return n;
|
|
3291
3296
|
}
|
|
3292
|
-
function
|
|
3297
|
+
function Su(t) {
|
|
3293
3298
|
return t.length > 1 ? T.BuiltIn.Ref : t[0].getColumnCount();
|
|
3294
3299
|
}
|
|
3295
|
-
function
|
|
3300
|
+
function Ru(t, n, e) {
|
|
3296
3301
|
const r = t.getRowCount(), o = t.getColumnCount();
|
|
3297
3302
|
if (e = Math.trunc(e ?? 0), n = Math.trunc(n), Math.abs(n) >= r || Math.abs(e) >= o) return T.BuiltIn.Calc;
|
|
3298
3303
|
const u = n >= 0 ? n : 0, i = n >= 0 ? r - 1 : r + n - 1, l = e >= 0 ? e : 0, a = e >= 0 ? o - 1 : o + e - 1;
|
|
@@ -3303,17 +3308,17 @@ function Su(t, n, e) {
|
|
|
3303
3308
|
colEnd: a
|
|
3304
3309
|
});
|
|
3305
3310
|
}
|
|
3306
|
-
var
|
|
3307
|
-
function
|
|
3308
|
-
const o =
|
|
3311
|
+
var bu = (t) => !0 === t?.isIRange ? t : y.createRange(1, 1, t);
|
|
3312
|
+
function vu(t, n, e, r = T.BuiltIn.NA) {
|
|
3313
|
+
const o = bu(t), u = o.getRowCount(), i = o.getColumnCount(), l = void 0 === n ? u : Math.trunc(n), a = void 0 === e ? i : Math.trunc(e);
|
|
3309
3314
|
if (l > 2147483647 || a > 2147483647) return T.BuiltIn.Value;
|
|
3310
3315
|
if (l < u || a < i) return T.BuiltIn.Value;
|
|
3311
3316
|
const s = y.getEntireCoords(), c = s.rowEnd - s.rowStart + 1;
|
|
3312
3317
|
return l > c || a > c ? T.BuiltIn.Num : o.resize(l, a, r);
|
|
3313
3318
|
}
|
|
3314
|
-
function
|
|
3319
|
+
function yu(t, n) {
|
|
3315
3320
|
if (!0 !== t?.isIRichData || T.isError(t)) return T.BuiltIn.Field;
|
|
3316
|
-
const r =
|
|
3321
|
+
const r = Tu(t.getKind(), n);
|
|
3317
3322
|
if (!r) return T.BuiltIn.Field;
|
|
3318
3323
|
if ((t.getPropertyMeta ? t.getPropertyMeta(r.name) : r.meta)?.excludeFrom?.dotNotation) return T.BuiltIn.Field;
|
|
3319
3324
|
const o = t.getProperty(r.name), u = !0 === o?.isIRichData ? o.toArray?.() : null;
|
|
@@ -3321,19 +3326,19 @@ function vu(t, n) {
|
|
|
3321
3326
|
const i = u.length, l = i > 0 ? u[0].length : 0;
|
|
3322
3327
|
return 0 === i || 0 === l ? T.BuiltIn.Field : 1 === i && 1 === l ? u[0][0] : y.createRange(i, l, u);
|
|
3323
3328
|
}
|
|
3324
|
-
var
|
|
3329
|
+
var Tu = (t, n) => {
|
|
3325
3330
|
const e = t.getProperty(n);
|
|
3326
3331
|
if (e) return e;
|
|
3327
3332
|
const r = n.toUpperCase(), o = t.getProperties();
|
|
3328
3333
|
for (let t = 0; t < o.length; t++) if (o[t].name.toUpperCase() === r) return o[t];
|
|
3329
3334
|
return null;
|
|
3330
|
-
},
|
|
3331
|
-
function
|
|
3335
|
+
}, Vu = Object.freeze({ type: null });
|
|
3336
|
+
function xu(t, n, e) {
|
|
3332
3337
|
if (t.length > 1 || n.length > 1) return T.BuiltIn.Ref;
|
|
3333
3338
|
const r = t[0], o = n[0];
|
|
3334
|
-
return
|
|
3339
|
+
return Du(r, o, e);
|
|
3335
3340
|
}
|
|
3336
|
-
var
|
|
3341
|
+
var Du = (t, n, e) => {
|
|
3337
3342
|
const r = t.getRowCount(), o = t.getColumnCount(), u = n.getRowCount(), i = n.getColumnCount(), l = 1 === i, a = 1 === u;
|
|
3338
3343
|
if (l && u !== r) throw T.BuiltIn.Value;
|
|
3339
3344
|
if (a && i !== o) throw T.BuiltIn.Value;
|
|
@@ -3342,7 +3347,7 @@ var xu = (t, n, e) => {
|
|
|
3342
3347
|
const f = t.filter((t, e) => {
|
|
3343
3348
|
const r = l ? e.rowIndex : e.colIndex;
|
|
3344
3349
|
if (r !== s) {
|
|
3345
|
-
const t = l ? n.getValueAt(r, 0,
|
|
3350
|
+
const t = l ? n.getValueAt(r, 0, Vu) : n.getValueAt(0, r, Vu);
|
|
3346
3351
|
if (T.isError(t)) throw t;
|
|
3347
3352
|
let e = t;
|
|
3348
3353
|
if ("string" == typeof e) {
|
|
@@ -3364,7 +3369,7 @@ var xu = (t, n, e) => {
|
|
|
3364
3369
|
}
|
|
3365
3370
|
return f;
|
|
3366
3371
|
};
|
|
3367
|
-
function
|
|
3372
|
+
function Ou(t) {
|
|
3368
3373
|
if (t.length > 1) {
|
|
3369
3374
|
const n = t[0];
|
|
3370
3375
|
return y.createRange(n.getRowCount(), n.getColumnCount(), () => T.BuiltIn.NA);
|
|
@@ -3375,21 +3380,21 @@ function Du(t) {
|
|
|
3375
3380
|
return null === o ? T.BuiltIn.NA : "=" + o;
|
|
3376
3381
|
});
|
|
3377
3382
|
}
|
|
3378
|
-
function
|
|
3383
|
+
function Fu(t, n, e) {
|
|
3379
3384
|
const r = 1 === n.length ? n[0] : null, o = r ? y.getPivotAt(r) : null;
|
|
3380
3385
|
if (!o) return T.BuiltIn.Ref;
|
|
3381
3386
|
if (!1 === o.isComputed?.()) {
|
|
3382
3387
|
const t = y.getValueAt(y.getRow(), y.getColumn());
|
|
3383
3388
|
return null != t ? t : T.BuiltIn.Ref;
|
|
3384
3389
|
}
|
|
3385
|
-
const u =
|
|
3390
|
+
const u = Pu(o, String(t ?? ""));
|
|
3386
3391
|
if (-1 === u) return T.BuiltIn.Ref;
|
|
3387
3392
|
const i = /* @__PURE__ */ new Map(), l = o.getFields();
|
|
3388
3393
|
for (const [t, n] of e ?? []) {
|
|
3389
3394
|
if (void 0 === n) return T.BuiltIn.Ref;
|
|
3390
3395
|
const e = String(t ?? "").toLowerCase(), r = l.findIndex((t) => t.name.toLowerCase() === e);
|
|
3391
3396
|
if (-1 === r) return T.BuiltIn.Ref;
|
|
3392
|
-
const o =
|
|
3397
|
+
const o = Lu(l[r].items, n);
|
|
3393
3398
|
if (-1 === o) return T.BuiltIn.Ref;
|
|
3394
3399
|
const u = i.get(r);
|
|
3395
3400
|
if (void 0 !== u && u !== o) return T.BuiltIn.Ref;
|
|
@@ -3397,24 +3402,24 @@ function Ou(t, n, e) {
|
|
|
3397
3402
|
}
|
|
3398
3403
|
return o.getValue(u, i) ?? T.BuiltIn.Ref;
|
|
3399
3404
|
}
|
|
3400
|
-
var
|
|
3405
|
+
var Pu = (t, n) => {
|
|
3401
3406
|
const e = n.toLowerCase(), r = t.getDataFields(), o = r.findIndex((t) => t.name.toLowerCase() === e);
|
|
3402
3407
|
return -1 !== o ? o : r.findIndex((t) => t.sourceName.toLowerCase() === e);
|
|
3403
|
-
},
|
|
3408
|
+
}, Lu = (t, n) => {
|
|
3404
3409
|
if ("string" == typeof n) {
|
|
3405
3410
|
const e = n.toLowerCase();
|
|
3406
3411
|
return t.findIndex((t) => (t.name ?? t.text).toLowerCase() === e);
|
|
3407
3412
|
}
|
|
3408
3413
|
return "number" == typeof n || "boolean" == typeof n ? t.findIndex((t) => t.value === n) : -1;
|
|
3409
3414
|
};
|
|
3410
|
-
function
|
|
3415
|
+
function _u(t, n, e, r = !0) {
|
|
3411
3416
|
if (T.isError(t)) return t;
|
|
3412
3417
|
if (n.length > 1) return T.BuiltIn.NA;
|
|
3413
3418
|
const o = n[0];
|
|
3414
|
-
if (
|
|
3415
|
-
const u =
|
|
3419
|
+
if (wi()) return T.BuiltIn.NA;
|
|
3420
|
+
const u = di(e);
|
|
3416
3421
|
if (u < 1) return T.BuiltIn.Value;
|
|
3417
|
-
const i = u > o.getRowCount(), l = (t) => i ? T.BuiltIn.Ref : o.getValueAt(u - 1, t) ?? null, a = typeof t, s =
|
|
3422
|
+
const i = u > o.getRowCount(), l = (t) => i ? T.BuiltIn.Ref : o.getValueAt(u - 1, t) ?? null, a = typeof t, s = Ei(t);
|
|
3418
3423
|
if (r) {
|
|
3419
3424
|
let n = null, e = -1, r = !0, u = !1;
|
|
3420
3425
|
const i = o.entries({
|
|
@@ -3430,18 +3435,18 @@ function Lu(t, n, e, r = !0) {
|
|
|
3430
3435
|
s = i.next();
|
|
3431
3436
|
continue;
|
|
3432
3437
|
}
|
|
3433
|
-
const h =
|
|
3438
|
+
const h = Ai(o, t);
|
|
3434
3439
|
if (r) {
|
|
3435
3440
|
n = o, e = f, r = !1, h > 0 && (u = !0), s = i.next();
|
|
3436
3441
|
continue;
|
|
3437
3442
|
}
|
|
3438
|
-
const g =
|
|
3443
|
+
const g = Ai(n, t);
|
|
3439
3444
|
if (h > 0 && (u = !0), g > 0 && h > 0) return T.BuiltIn.NA;
|
|
3440
3445
|
if (u && 0 === g && h < 0) return l(e);
|
|
3441
3446
|
if (null != n && h > 0 && g <= 0) return l(e);
|
|
3442
3447
|
n = o, e = f, s = i.next();
|
|
3443
3448
|
}
|
|
3444
|
-
return r ||
|
|
3449
|
+
return r || Ai(n, t) > 0 ? T.BuiltIn.NA : l(e);
|
|
3445
3450
|
}
|
|
3446
3451
|
if (!s) {
|
|
3447
3452
|
const n = o.slice({
|
|
@@ -3463,7 +3468,7 @@ function Lu(t, n, e, r = !0) {
|
|
|
3463
3468
|
}
|
|
3464
3469
|
return T.BuiltIn.NA;
|
|
3465
3470
|
}
|
|
3466
|
-
var
|
|
3471
|
+
var Uu = (t, n) => {
|
|
3467
3472
|
const e = y.getEntireCoords(), r = e.rowEnd - e.rowStart + 1, o = n === V.Axis.Column;
|
|
3468
3473
|
let u = 0;
|
|
3469
3474
|
const i = t.length;
|
|
@@ -3473,10 +3478,10 @@ var _u = (t, n) => {
|
|
|
3473
3478
|
}
|
|
3474
3479
|
return u > r ? T.BuiltIn.Num : t.reduce((t, e) => t.concat(e, n));
|
|
3475
3480
|
};
|
|
3476
|
-
function
|
|
3477
|
-
return
|
|
3481
|
+
function Xu(t) {
|
|
3482
|
+
return Uu(t, V.Axis.Column);
|
|
3478
3483
|
}
|
|
3479
|
-
function
|
|
3484
|
+
function ku(t, n) {
|
|
3480
3485
|
const e = y.getArgs();
|
|
3481
3486
|
let r = n;
|
|
3482
3487
|
return e.getLength() < 2 ? r = void 0 : null != r && e.getKindAt(1) !== O.Omitted || (r = 0), y.createRichData("hyperlink", {
|
|
@@ -3484,7 +3489,7 @@ function Xu(t, n) {
|
|
|
3484
3489
|
friendly: r
|
|
3485
3490
|
});
|
|
3486
3491
|
}
|
|
3487
|
-
function
|
|
3492
|
+
function Hu(t, n) {
|
|
3488
3493
|
const e = /* @__PURE__ */ new Map();
|
|
3489
3494
|
for (const n of t) {
|
|
3490
3495
|
const t = n.payload.source, r = e.get(t);
|
|
@@ -3520,7 +3525,7 @@ function ku(t, n) {
|
|
|
3520
3525
|
for (const t of r) t.reject(n);
|
|
3521
3526
|
});
|
|
3522
3527
|
}
|
|
3523
|
-
function
|
|
3528
|
+
function Gu(t, n = void 0, e = 0, r = void 0, o = void 0) {
|
|
3524
3529
|
if (!t) return T.BuiltIn.Value;
|
|
3525
3530
|
const u = Math.trunc(e);
|
|
3526
3531
|
if (u < 0 || u > 3) return T.BuiltIn.Value;
|
|
@@ -3530,12 +3535,12 @@ function Hu(t, n = void 0, e = 0, r = void 0, o = void 0) {
|
|
|
3530
3535
|
if (void 0 !== r && r < 1 || void 0 !== o && o < 1) return T.BuiltIn.Value;
|
|
3531
3536
|
void 0 !== r && (i.height = r), void 0 !== o && (i.width = o);
|
|
3532
3537
|
} else if (void 0 !== r || void 0 !== o) return T.BuiltIn.Value;
|
|
3533
|
-
return y.defer(
|
|
3538
|
+
return y.defer(Hu, i) ?? T.BuiltIn.Busy;
|
|
3534
3539
|
}
|
|
3535
|
-
function
|
|
3540
|
+
function ju(t, n, e = void 0, r = 1) {
|
|
3536
3541
|
if (n ??= 0, n < 0 || void 0 !== e && e < 0 || r < 1) return T.BuiltIn.Value;
|
|
3537
3542
|
let o = H(n), u = void 0 === e ? 0 : H(e);
|
|
3538
|
-
const i =
|
|
3543
|
+
const i = di(r);
|
|
3539
3544
|
if (i > t.length) return T.BuiltIn.Ref;
|
|
3540
3545
|
const l = t[i - 1];
|
|
3541
3546
|
if (0 === l.size && !l.isIReferenceRange) return o <= 1 && u <= 1 ? 0 : T.BuiltIn.Ref;
|
|
@@ -3563,10 +3568,10 @@ function Gu(t, n, e = void 0, r = 1) {
|
|
|
3563
3568
|
colEnd: g
|
|
3564
3569
|
});
|
|
3565
3570
|
}
|
|
3566
|
-
function
|
|
3571
|
+
function Yu(t, n = !0) {
|
|
3567
3572
|
return y.getReference(t, !n);
|
|
3568
3573
|
}
|
|
3569
|
-
function
|
|
3574
|
+
function qu(t, n, e) {
|
|
3570
3575
|
if (T.isError(t)) return t;
|
|
3571
3576
|
if (n.length > 1) return T.BuiltIn.NA;
|
|
3572
3577
|
const r = n[0];
|
|
@@ -3574,15 +3579,15 @@ function Yu(t, n, e) {
|
|
|
3574
3579
|
const o = r.getRowCount(), u = r.getColumnCount(), i = o > 1 && u > 1;
|
|
3575
3580
|
if (i && !e) {
|
|
3576
3581
|
if (u > o) {
|
|
3577
|
-
const n =
|
|
3582
|
+
const n = yi(t, r, !0);
|
|
3578
3583
|
return -1 === n ? T.BuiltIn.NA : r.getValueAt(o - 1, n) ?? null;
|
|
3579
3584
|
}
|
|
3580
3585
|
{
|
|
3581
|
-
const n =
|
|
3586
|
+
const n = yi(t, r, !1);
|
|
3582
3587
|
return -1 === n ? T.BuiltIn.NA : r.getValueAt(n, u - 1) ?? null;
|
|
3583
3588
|
}
|
|
3584
3589
|
}
|
|
3585
|
-
const l = i ? u > o : 1 === o, a =
|
|
3590
|
+
const l = i ? u > o : 1 === o, a = yi(t, r, l);
|
|
3586
3591
|
return -1 === a ? T.BuiltIn.NA : e ? function(t, n, e) {
|
|
3587
3592
|
const r = t.getRowCount(), o = t.getColumnCount();
|
|
3588
3593
|
if (r > 1 && o > 1) return T.BuiltIn.NA;
|
|
@@ -3594,14 +3599,14 @@ function Yu(t, n, e) {
|
|
|
3594
3599
|
return n >= (u ? r : o) ? T.BuiltIn.NA : (u ? t.getValueAt(n, 0) : t.getValueAt(0, n)) ?? 0;
|
|
3595
3600
|
}(e, a, l ? u : o) : (l ? r.getValueAt(0, a) : r.getValueAt(a, 0)) ?? 0;
|
|
3596
3601
|
}
|
|
3597
|
-
function
|
|
3598
|
-
if (n.length > 1 ||
|
|
3602
|
+
function $u(t, n, e = 1) {
|
|
3603
|
+
if (n.length > 1 || wi()) return T.BuiltIn.NA;
|
|
3599
3604
|
const r = 0 === e ? 0 : e > 0 ? -1 : 1, o = 0 === e ? 1 : e > 0 ? 2 : -2;
|
|
3600
3605
|
return Mi(t, n[0], r, o, 0 === e, !0);
|
|
3601
3606
|
}
|
|
3602
|
-
function
|
|
3607
|
+
function Ku(t, n, e, r, o) {
|
|
3603
3608
|
n = Math.trunc(n), e = Math.trunc(e);
|
|
3604
|
-
const u = t.getCoords(), [i, l] =
|
|
3609
|
+
const u = t.getCoords(), [i, l] = Ti(u.rowStart + n, r ?? t.getRowCount()), [a, s] = Ti(u.colStart + e, o ?? t.getColumnCount());
|
|
3605
3610
|
return y.getReference({
|
|
3606
3611
|
rowStart: i,
|
|
3607
3612
|
colStart: a,
|
|
@@ -3610,28 +3615,28 @@ function $u(t, n, e, r, o) {
|
|
|
3610
3615
|
scope: u.scope
|
|
3611
3616
|
});
|
|
3612
3617
|
}
|
|
3613
|
-
function
|
|
3618
|
+
function zu(t) {
|
|
3614
3619
|
if (!t || 0 === t.length) return y.getRow() + 1;
|
|
3615
3620
|
if (t.length > 1) return T.BuiltIn.Ref;
|
|
3616
3621
|
const n = [], e = t[0].getCoords(), r = e.rowStart, o = e.rowEnd;
|
|
3617
3622
|
for (let t = r; t <= o; t++) n.push([t + 1]);
|
|
3618
3623
|
return n;
|
|
3619
3624
|
}
|
|
3620
|
-
function
|
|
3625
|
+
function Wu(t) {
|
|
3621
3626
|
return t.length > 1 ? T.BuiltIn.Ref : t[0].getRowCount();
|
|
3622
3627
|
}
|
|
3623
|
-
function
|
|
3628
|
+
function Qu(t, n, e) {
|
|
3624
3629
|
return T.BuiltIn.NA;
|
|
3625
3630
|
}
|
|
3626
|
-
function
|
|
3627
|
-
const o =
|
|
3631
|
+
function Zu(t, n, e, r = !1) {
|
|
3632
|
+
const o = bu(t), u = o.getRowCount(), i = o.getColumnCount(), l = r ? V.Axis.Column : V.Axis.Row, a = r ? u : i, s = function(t, n) {
|
|
3628
3633
|
if (t.length > n) throw T.BuiltIn.Value;
|
|
3629
3634
|
return t.map((t) => {
|
|
3630
3635
|
const e = Math.trunc(j(t));
|
|
3631
3636
|
if (!(e >= 1 && e <= n)) throw T.BuiltIn.Value;
|
|
3632
3637
|
return e - 1;
|
|
3633
3638
|
});
|
|
3634
|
-
}(
|
|
3639
|
+
}(ti(n), a), c = ni(ti(e), s.length), f = s.map((t) => r ? o.slice({
|
|
3635
3640
|
rowStart: t,
|
|
3636
3641
|
rowEnd: t
|
|
3637
3642
|
}) : o.slice({
|
|
@@ -3640,18 +3645,18 @@ function Qu(t, n, e, r = !1) {
|
|
|
3640
3645
|
})), h = o.argsort(f, c, l);
|
|
3641
3646
|
return o.take(h, l).resize(u, i);
|
|
3642
3647
|
}
|
|
3643
|
-
var
|
|
3648
|
+
var Ju = Object.freeze({
|
|
3644
3649
|
includeEmpty: !0,
|
|
3645
3650
|
onError: "value"
|
|
3646
3651
|
});
|
|
3647
|
-
function
|
|
3652
|
+
function ti(t) {
|
|
3648
3653
|
if (!t) return [1];
|
|
3649
3654
|
if (t.getRowCount() > 1 && t.getColumnCount() > 1) throw T.BuiltIn.Value;
|
|
3650
3655
|
if (t.isIReferenceRange && 1 === t.getRowCount() && 1 === t.getColumnCount()) {
|
|
3651
3656
|
const n = t.getValueAt(0, 0);
|
|
3652
3657
|
if (T.isError(n)) throw n;
|
|
3653
3658
|
}
|
|
3654
|
-
return t.getValuesFlat(
|
|
3659
|
+
return t.getValuesFlat(Ju).map((t) => {
|
|
3655
3660
|
if ("number" == typeof t) return t;
|
|
3656
3661
|
if (null === t) return 0;
|
|
3657
3662
|
if ("boolean" == typeof t) return t ? 1 : 0;
|
|
@@ -3659,7 +3664,7 @@ function Ju(t) {
|
|
|
3659
3664
|
throw T.BuiltIn.Value;
|
|
3660
3665
|
});
|
|
3661
3666
|
}
|
|
3662
|
-
function
|
|
3667
|
+
function ni(t, n) {
|
|
3663
3668
|
if (1 !== t.length && t.length !== n) throw T.BuiltIn.Value;
|
|
3664
3669
|
const e = t.map((t) => {
|
|
3665
3670
|
const n = Math.floor(t);
|
|
@@ -3668,8 +3673,8 @@ function ti(t, n) {
|
|
|
3668
3673
|
});
|
|
3669
3674
|
return e.length === n ? e : new Array(n).fill(e[0]);
|
|
3670
3675
|
}
|
|
3671
|
-
function
|
|
3672
|
-
const e =
|
|
3676
|
+
function ei(t, n) {
|
|
3677
|
+
const e = bu(t), r = n.map(([t]) => t), o = ni(n.map(([, t]) => t ?? 1), r.length), u = e.getRowCount(), i = e.getColumnCount();
|
|
3673
3678
|
if (1 === u && 1 === i) {
|
|
3674
3679
|
const t = e.getValueAt(0, 0);
|
|
3675
3680
|
if (T.isError(t)) return t;
|
|
@@ -3696,7 +3701,7 @@ function ni(t, n) {
|
|
|
3696
3701
|
const a = e.argsort(r, o, l);
|
|
3697
3702
|
return e.take(a, l).resize(u, i);
|
|
3698
3703
|
}
|
|
3699
|
-
function
|
|
3704
|
+
function ri(t, n, e) {
|
|
3700
3705
|
const r = void 0 === n ? void 0 : Math.trunc(n), o = void 0 === e ? void 0 : Math.trunc(e);
|
|
3701
3706
|
if (0 === r || 0 === o) return T.BuiltIn.Calc;
|
|
3702
3707
|
const u = t.getRowCount(), i = t.getColumnCount(), l = void 0 === r || r >= 0 ? 0 : Math.max(0, u + r), a = void 0 === r ? u : r >= 0 ? Math.min(r, u) : u, s = void 0 === o || o >= 0 ? 0 : Math.max(0, i + o), c = void 0 === o ? i : o >= 0 ? Math.min(o, i) : i;
|
|
@@ -3707,10 +3712,10 @@ function ei(t, n, e) {
|
|
|
3707
3712
|
colEnd: c - 1
|
|
3708
3713
|
});
|
|
3709
3714
|
}
|
|
3710
|
-
var
|
|
3715
|
+
var oi = (t, n, e, r) => {
|
|
3711
3716
|
const o = Math.trunc(n);
|
|
3712
3717
|
if (!(o >= 0 && o <= 3)) return T.BuiltIn.Value;
|
|
3713
|
-
const u = r === V.Axis.Column, i = e ?
|
|
3718
|
+
const u = r === V.Axis.Column, i = e ? mu : Nu, l = [], a = t.length;
|
|
3714
3719
|
for (let n = 0; n < a; n++) {
|
|
3715
3720
|
const r = t[n], u = r.getColumnCount(), a = r.getRowCount(), s = new Array(u * a).fill(null), c = r.entries(i);
|
|
3716
3721
|
let f = c.next();
|
|
@@ -3718,24 +3723,24 @@ var ri = (t, n, e, r) => {
|
|
|
3718
3723
|
const { value: t, coords: n } = f.value;
|
|
3719
3724
|
f = c.next(), s[e ? n.colIndex * a + n.rowIndex : n.rowIndex * u + n.colIndex] = t;
|
|
3720
3725
|
}
|
|
3721
|
-
for (let t = 0; t < s.length; t++)
|
|
3726
|
+
for (let t = 0; t < s.length; t++) vi(s[t], o) || l.push(s[t]);
|
|
3722
3727
|
}
|
|
3723
3728
|
if (0 === l.length) return T.BuiltIn.Calc;
|
|
3724
3729
|
const s = t[0].empty().sparseBuilder(r);
|
|
3725
3730
|
for (let t = 0; t < l.length; t++) u ? s.pushAt(t, 0, l[t]) : s.pushAt(0, t, l[t]);
|
|
3726
3731
|
return s.build().resize(u ? l.length : 1, u ? 1 : l.length);
|
|
3727
3732
|
};
|
|
3728
|
-
function oi(t, n = 0, e = !1) {
|
|
3729
|
-
return ri(t, n, e, V.Axis.Column);
|
|
3730
|
-
}
|
|
3731
3733
|
function ui(t, n = 0, e = !1) {
|
|
3732
|
-
return
|
|
3734
|
+
return oi(t, n, e, V.Axis.Column);
|
|
3735
|
+
}
|
|
3736
|
+
function ii(t, n = 0, e = !1) {
|
|
3737
|
+
return oi(t, n, e, V.Axis.Row);
|
|
3733
3738
|
}
|
|
3734
|
-
function
|
|
3739
|
+
function li(t) {
|
|
3735
3740
|
return t.transpose();
|
|
3736
3741
|
}
|
|
3737
|
-
function
|
|
3738
|
-
if (!
|
|
3742
|
+
function ai(t, n = 3, e = 3) {
|
|
3743
|
+
if (!si(n) || !si(e)) return T.BuiltIn.Value;
|
|
3739
3744
|
const r = t.getRowCount(), o = t.getColumnCount();
|
|
3740
3745
|
if (0 === r || 0 === o) return T.BuiltIn.Calc;
|
|
3741
3746
|
let u = 0, i = r - 1, l = 0, a = o - 1;
|
|
@@ -3772,20 +3777,20 @@ function li(t, n = 3, e = 3) {
|
|
|
3772
3777
|
colEnd: a
|
|
3773
3778
|
});
|
|
3774
3779
|
}
|
|
3775
|
-
var
|
|
3776
|
-
function
|
|
3777
|
-
const r =
|
|
3780
|
+
var si = (t) => Number.isInteger(t) && t >= 0 && t <= 3;
|
|
3781
|
+
function ci(t, n = !1, e = !1) {
|
|
3782
|
+
const r = bu(t), o = n ? V.Axis.Column : V.Axis.Row, u = r.uniqueIndices(o, e);
|
|
3778
3783
|
if (0 === u.length) throw T.BuiltIn.Calc;
|
|
3779
3784
|
return r.take(u, o);
|
|
3780
3785
|
}
|
|
3781
|
-
function
|
|
3786
|
+
function fi(t, n, e, r = !0) {
|
|
3782
3787
|
if (T.isError(t)) return t;
|
|
3783
3788
|
if (n.length > 1) return T.BuiltIn.NA;
|
|
3784
3789
|
const o = n[0];
|
|
3785
|
-
if (
|
|
3786
|
-
const u =
|
|
3790
|
+
if (wi()) return T.BuiltIn.NA;
|
|
3791
|
+
const u = di(e);
|
|
3787
3792
|
if (u < 1) return T.BuiltIn.Value;
|
|
3788
|
-
const i = u > o.getColumnCount(), l = (t) => i ? T.BuiltIn.Ref : o.getValueAt(t, u - 1) ?? null, a = typeof t, s =
|
|
3793
|
+
const i = u > o.getColumnCount(), l = (t) => i ? T.BuiltIn.Ref : o.getValueAt(t, u - 1) ?? null, a = typeof t, s = Ei(t);
|
|
3789
3794
|
if (r) {
|
|
3790
3795
|
let n = null, e = -1, r = !0, u = !1;
|
|
3791
3796
|
const i = o.entries({
|
|
@@ -3801,18 +3806,18 @@ function ci(t, n, e, r = !0) {
|
|
|
3801
3806
|
s = i.next();
|
|
3802
3807
|
continue;
|
|
3803
3808
|
}
|
|
3804
|
-
const h =
|
|
3809
|
+
const h = Ai(o, t);
|
|
3805
3810
|
if (r) {
|
|
3806
3811
|
n = o, e = f, r = !1, h > 0 && (u = !0), s = i.next();
|
|
3807
3812
|
continue;
|
|
3808
3813
|
}
|
|
3809
|
-
const g =
|
|
3814
|
+
const g = Ai(n, t);
|
|
3810
3815
|
if (h > 0 && (u = !0), g > 0 && h > 0) return T.BuiltIn.NA;
|
|
3811
3816
|
if (u && 0 === g && h < 0) return l(e);
|
|
3812
3817
|
if (null != n && h > 0 && g <= 0) return l(e);
|
|
3813
3818
|
n = o, e = f, s = i.next();
|
|
3814
3819
|
}
|
|
3815
|
-
return r ||
|
|
3820
|
+
return r || Ai(n, t) > 0 ? T.BuiltIn.NA : l(e);
|
|
3816
3821
|
}
|
|
3817
3822
|
if (!s) {
|
|
3818
3823
|
const n = o.slice({
|
|
@@ -3834,11 +3839,11 @@ function ci(t, n, e, r = !0) {
|
|
|
3834
3839
|
}
|
|
3835
3840
|
return T.BuiltIn.NA;
|
|
3836
3841
|
}
|
|
3837
|
-
function
|
|
3838
|
-
return
|
|
3842
|
+
function hi(t) {
|
|
3843
|
+
return Uu(t, V.Axis.Row);
|
|
3839
3844
|
}
|
|
3840
|
-
var
|
|
3841
|
-
const o =
|
|
3845
|
+
var gi = (t, n, e, r) => {
|
|
3846
|
+
const o = bu(t), { rows: u, columns: i } = o.getShape();
|
|
3842
3847
|
if (u > 1 && i > 1) return T.BuiltIn.Value;
|
|
3843
3848
|
const l = Math.trunc(n);
|
|
3844
3849
|
if (!(l >= 1 && l <= 2147483647)) return T.BuiltIn.Num;
|
|
@@ -3853,13 +3858,13 @@ var hi = (t, n, e, r) => {
|
|
|
3853
3858
|
for (let t = a; t < f * s; t++) c ? h.pushAt(Math.floor(t / s), t % s, e) : h.pushAt(t % s, Math.floor(t / s), e);
|
|
3854
3859
|
return h.build();
|
|
3855
3860
|
};
|
|
3856
|
-
function gi(t, n, e = T.BuiltIn.NA) {
|
|
3857
|
-
return hi(t, n, e, V.Axis.Column);
|
|
3858
|
-
}
|
|
3859
3861
|
function mi(t, n, e = T.BuiltIn.NA) {
|
|
3860
|
-
return
|
|
3862
|
+
return gi(t, n, e, V.Axis.Column);
|
|
3861
3863
|
}
|
|
3862
|
-
function Ni(t, n, e
|
|
3864
|
+
function Ni(t, n, e = T.BuiltIn.NA) {
|
|
3865
|
+
return gi(t, n, e, V.Axis.Row);
|
|
3866
|
+
}
|
|
3867
|
+
function Ii(t, n, e, r = T.BuiltIn.NA, o = 0, u = 1) {
|
|
3863
3868
|
if (![
|
|
3864
3869
|
0,
|
|
3865
3870
|
-1,
|
|
@@ -3881,13 +3886,13 @@ function Ni(t, n, e, r = T.BuiltIn.NA, o = 0, u = 1) {
|
|
|
3881
3886
|
if (1 === l.getRowCount()) s = !1;
|
|
3882
3887
|
else if (1 !== l.getColumnCount()) throw T.BuiltIn.Value;
|
|
3883
3888
|
}
|
|
3884
|
-
if (null == t) a =
|
|
3889
|
+
if (null == t) a = Si(i, o, u);
|
|
3885
3890
|
else if (0 !== o && 2 !== o || 1 !== u && -1 !== u) {
|
|
3886
|
-
const n = i.getValuesFlat(
|
|
3891
|
+
const n = i.getValuesFlat(gu), e = [], r = [];
|
|
3887
3892
|
for (let t = 0; t < n.length; t++) null !== n[t] && void 0 !== n[t] && (e.push(n[t]), r.push(t));
|
|
3888
|
-
const l =
|
|
3893
|
+
const l = bi(t, e, o, u);
|
|
3889
3894
|
a = -1 === l ? -1 : r[l];
|
|
3890
|
-
} else a =
|
|
3895
|
+
} else a = Ri(i, t, -1 === u, Ei(t, 2 === o));
|
|
3891
3896
|
if (-1 === a) return r;
|
|
3892
3897
|
if (a < (s ? l.getColumnCount() : l.getRowCount())) {
|
|
3893
3898
|
if (!0 === l.isIReferenceRange) {
|
|
@@ -3916,7 +3921,7 @@ function Ni(t, n, e, r = T.BuiltIn.NA, o = 0, u = 1) {
|
|
|
3916
3921
|
}
|
|
3917
3922
|
return l.getValueAt(s ? 0 : a, s ? a : 0);
|
|
3918
3923
|
}
|
|
3919
|
-
function
|
|
3924
|
+
function pi(t, n, e = 0, r = 1) {
|
|
3920
3925
|
return n.length > 1 ? T.BuiltIn.NA : Mi(t, n[0], e, r, 2 === e);
|
|
3921
3926
|
}
|
|
3922
3927
|
function Mi(t, n, e, r, o, u = !1) {
|
|
@@ -3936,16 +3941,16 @@ function Mi(t, n, e, r, o, u = !1) {
|
|
|
3936
3941
|
if (n.getColumnCount() > 1 && n.getRowCount() > 1) throw T.BuiltIn.Value;
|
|
3937
3942
|
if (null == t) {
|
|
3938
3943
|
if (u) return T.BuiltIn.NA;
|
|
3939
|
-
const t =
|
|
3944
|
+
const t = Si(n, e, r);
|
|
3940
3945
|
return -1 === t ? T.BuiltIn.NA : t + 1;
|
|
3941
3946
|
}
|
|
3942
3947
|
if (!(0 !== e && 2 !== e || 1 !== r && -1 !== r)) {
|
|
3943
|
-
const e =
|
|
3948
|
+
const e = Ri(n, t, -1 === r, o ? Ei(t, !0) : null);
|
|
3944
3949
|
return -1 === e ? T.BuiltIn.NA : e + 1;
|
|
3945
3950
|
}
|
|
3946
|
-
const i = n.getValuesFlat(
|
|
3951
|
+
const i = n.getValuesFlat(gu), l = [], a = [];
|
|
3947
3952
|
for (let t = 0; t < i.length; t++) null !== i[t] && void 0 !== i[t] && (l.push(i[t]), a.push(t));
|
|
3948
|
-
const s = !u || 2 !== r && -2 !== r ?
|
|
3953
|
+
const s = !u || 2 !== r && -2 !== r ? bi(t, l, e, r, o) : function(t, n, e) {
|
|
3949
3954
|
const r = (e) => typeof t[e] == typeof n;
|
|
3950
3955
|
let o = 0, u = t.length - 1, i = -1;
|
|
3951
3956
|
for (; o <= u;) {
|
|
@@ -3958,9 +3963,9 @@ function Mi(t, n, e, r, o, u = !1) {
|
|
|
3958
3963
|
if (a < o) break;
|
|
3959
3964
|
}
|
|
3960
3965
|
}
|
|
3961
|
-
const s =
|
|
3966
|
+
const s = Ai(t[a], n);
|
|
3962
3967
|
if (0 === s) {
|
|
3963
|
-
for (; a + 1 < t.length && r(a + 1) && 0 ===
|
|
3968
|
+
for (; a + 1 < t.length && r(a + 1) && 0 === Ai(t[a + 1], n);) a++;
|
|
3964
3969
|
return a;
|
|
3965
3970
|
}
|
|
3966
3971
|
(e ? s < 0 : s > 0) ? (i = a, o = Math.max(l, a) + 1) : u = Math.min(l, a) - 1;
|
|
@@ -3969,32 +3974,32 @@ function Mi(t, n, e, r, o, u = !1) {
|
|
|
3969
3974
|
}(l, t, 2 === r);
|
|
3970
3975
|
return -1 === s ? T.BuiltIn.NA : a[s] + 1;
|
|
3971
3976
|
}
|
|
3972
|
-
function
|
|
3977
|
+
function Ai(t, n) {
|
|
3973
3978
|
return "number" == typeof t && "number" == typeof n ? t < n ? -1 : t > n ? 1 : 0 : y.compare(t, n);
|
|
3974
3979
|
}
|
|
3975
|
-
function
|
|
3980
|
+
function wi() {
|
|
3976
3981
|
const t = y.getArgs().getKindAt(1);
|
|
3977
3982
|
return t !== O.Reference && t !== O.Array;
|
|
3978
3983
|
}
|
|
3979
|
-
function
|
|
3984
|
+
function di(t) {
|
|
3980
3985
|
return Number.isFinite(t) ? Math.trunc(0 === t ? 0 : Number(t.toPrecision(15))) : t;
|
|
3981
3986
|
}
|
|
3982
|
-
function
|
|
3987
|
+
function Ei(t, n = !1) {
|
|
3983
3988
|
return "string" != typeof t ? null : (n ? /[*?~]/.test(t) : F.isWildCard(t)) ? F.toRegex(t, "i", !0) : null;
|
|
3984
3989
|
}
|
|
3985
|
-
function
|
|
3990
|
+
function Bi(t, n, e, r) {
|
|
3986
3991
|
let o = 0, u = t.length - 1, i = -1, l = -1;
|
|
3987
3992
|
for (; o <= u;) {
|
|
3988
|
-
const e = o + u >>> 1, a = null === n ?
|
|
3993
|
+
const e = o + u >>> 1, a = null === n ? Ci(t[e]) : Ai(t[e], n);
|
|
3989
3994
|
0 === a ? (i = e, r ? u = e - 1 : o = e + 1) : (r ? a < 0 : a > 0) ? (l = e, o = e + 1) : u = e - 1;
|
|
3990
3995
|
}
|
|
3991
3996
|
return -1 !== i ? i : 0 === e || 2 === e ? -1 : (r ? -1 === e : 1 === e) ? l : l + 1 < t.length ? l + 1 : -1;
|
|
3992
3997
|
}
|
|
3993
|
-
function
|
|
3998
|
+
function Ci(t) {
|
|
3994
3999
|
return null == t ? 0 : -1;
|
|
3995
4000
|
}
|
|
3996
|
-
function
|
|
3997
|
-
if (2 === e || -2 === e) return
|
|
4001
|
+
function Si(t, n, e) {
|
|
4002
|
+
if (2 === e || -2 === e) return Bi(t.getValuesFlat(gu), null, n, 2 === e);
|
|
3998
4003
|
const r = -1 === e, o = 1 === t.getRowCount(), u = t.entries({
|
|
3999
4004
|
axis: o ? V.Axis.Row : V.Axis.Column,
|
|
4000
4005
|
includeEmpty: !0,
|
|
@@ -4004,11 +4009,11 @@ function Ci(t, n, e) {
|
|
|
4004
4009
|
for (; !a.done;) {
|
|
4005
4010
|
const { value: t, coords: e } = a.value, r = o ? e.colIndex : e.rowIndex;
|
|
4006
4011
|
if (null == t) return r;
|
|
4007
|
-
-1 === n && (-1 === i ||
|
|
4012
|
+
-1 === n && (-1 === i || Ai(t, l) > 0) && (i = r, l = t), a = u.next();
|
|
4008
4013
|
}
|
|
4009
4014
|
return i;
|
|
4010
4015
|
}
|
|
4011
|
-
function
|
|
4016
|
+
function Ri(t, n, e, r) {
|
|
4012
4017
|
if (null === r) return t.indexOf(n, { reverse: e });
|
|
4013
4018
|
const o = 1 === t.getRowCount(), u = t.entries({
|
|
4014
4019
|
axis: o ? V.Axis.Row : V.Axis.Column,
|
|
@@ -4018,14 +4023,14 @@ function Si(t, n, e, r) {
|
|
|
4018
4023
|
let i = u.next();
|
|
4019
4024
|
for (; !i.done;) {
|
|
4020
4025
|
const { value: t, coords: e } = i.value;
|
|
4021
|
-
if (null != t && (r ? "string" == typeof t && r.test(t) : 0 ===
|
|
4026
|
+
if (null != t && (r ? "string" == typeof t && r.test(t) : 0 === Ai(t, n))) return o ? e.colIndex : e.rowIndex;
|
|
4022
4027
|
i = u.next();
|
|
4023
4028
|
}
|
|
4024
4029
|
return -1;
|
|
4025
4030
|
}
|
|
4026
|
-
function
|
|
4027
|
-
const u = o ?
|
|
4028
|
-
if (2 === r || -2 === r) return
|
|
4031
|
+
function bi(t, n, e, r, o = 2 === e) {
|
|
4032
|
+
const u = o ? Ei(t, !0) : null;
|
|
4033
|
+
if (2 === r || -2 === r) return Bi(n, t, e, 2 === r);
|
|
4029
4034
|
const i = -1 === r ? -1 : 1, l = -1 === r ? n.length - 1 : 0, a = -1 === r ? -1 : n.length;
|
|
4030
4035
|
if (0 === e || 2 === e) {
|
|
4031
4036
|
for (let e = l; e !== a; e += i) {
|
|
@@ -4033,7 +4038,7 @@ function Ri(t, n, e, r, o = 2 === e) {
|
|
|
4033
4038
|
if (null != r) {
|
|
4034
4039
|
if (u) {
|
|
4035
4040
|
if ("string" == typeof r && u.test(r)) return e;
|
|
4036
|
-
} else if (0 ===
|
|
4041
|
+
} else if (0 === Ai(r, t)) return e;
|
|
4037
4042
|
}
|
|
4038
4043
|
}
|
|
4039
4044
|
return -1;
|
|
@@ -4042,16 +4047,16 @@ function Ri(t, n, e, r, o = 2 === e) {
|
|
|
4042
4047
|
for (let r = l; r !== a; r += i) {
|
|
4043
4048
|
const o = n[r];
|
|
4044
4049
|
if (null == o) continue;
|
|
4045
|
-
const u =
|
|
4050
|
+
const u = Ai(o, t);
|
|
4046
4051
|
if (0 === u) return r;
|
|
4047
|
-
-1 === e ? u < 0 && (-1 === s ||
|
|
4052
|
+
-1 === e ? u < 0 && (-1 === s || Ai(o, c) > 0) && (s = r, c = o) : u > 0 && (-1 === s || Ai(o, c) < 0) && (s = r, c = o);
|
|
4048
4053
|
}
|
|
4049
4054
|
return s;
|
|
4050
4055
|
}
|
|
4051
|
-
function
|
|
4056
|
+
function vi(t, n) {
|
|
4052
4057
|
return 0 !== n && ((1 === n || 3 === n) && null === t || !(2 !== n && 3 !== n || !T.isError(t)));
|
|
4053
4058
|
}
|
|
4054
|
-
function
|
|
4059
|
+
function yi(t, n, e) {
|
|
4055
4060
|
const r = typeof t;
|
|
4056
4061
|
let o = -1, u = null, i = !1;
|
|
4057
4062
|
const l = e ? V.Axis.Row : V.Axis.Column, a = n.entries({
|
|
@@ -4074,20 +4079,20 @@ function vi(t, n, e) {
|
|
|
4074
4079
|
s = a.next();
|
|
4075
4080
|
continue;
|
|
4076
4081
|
}
|
|
4077
|
-
const f =
|
|
4082
|
+
const f = Ai(n, t);
|
|
4078
4083
|
if (f > 0 && (i = !0), f <= 0) {
|
|
4079
|
-
const e = null !== u && 0 ===
|
|
4084
|
+
const e = null !== u && 0 === Ai(u, t);
|
|
4080
4085
|
i && e || (o = c, u = n);
|
|
4081
4086
|
}
|
|
4082
4087
|
s = a.next();
|
|
4083
4088
|
}
|
|
4084
4089
|
return o;
|
|
4085
4090
|
}
|
|
4086
|
-
var
|
|
4091
|
+
var Ti = (t, n) => {
|
|
4087
4092
|
if (0 === n) throw T.BuiltIn.Ref;
|
|
4088
4093
|
const e = Math.trunc(n), r = n > 0 ? t : t + e + 1, o = n > 0 ? t + e - 1 : t;
|
|
4089
4094
|
return r > o ? [o, r] : [r, o];
|
|
4090
|
-
},
|
|
4095
|
+
}, Vi = (t) => {
|
|
4091
4096
|
const n = t.length, e = t.map((t) => [...t]), r = Array.from({ length: n }, (t, n) => n);
|
|
4092
4097
|
let o = 1;
|
|
4093
4098
|
for (let t = 0; t < n; t++) {
|
|
@@ -4112,7 +4117,7 @@ var yi = (t, n) => {
|
|
|
4112
4117
|
singular: !1
|
|
4113
4118
|
};
|
|
4114
4119
|
};
|
|
4115
|
-
function
|
|
4120
|
+
function xi(t, n, e, r, o, u) {
|
|
4116
4121
|
const i = n.map((t) => t[0]), l = i[0].getColumnCount(), a = i[0].getRowCount();
|
|
4117
4122
|
for (let t = 1; t < i.length; t++) if (i[t].getColumnCount() !== l || i[t].getRowCount() !== a) throw T.BuiltIn.Value;
|
|
4118
4123
|
if (r && (r.getColumnCount() !== l || r.getRowCount() !== a)) throw T.BuiltIn.Value;
|
|
@@ -4132,98 +4137,98 @@ function Vi(t, n, e, r, o, u) {
|
|
|
4132
4137
|
}, null, f && u ? { emptyFold: u } : void 0);
|
|
4133
4138
|
return null !== N ? N : o;
|
|
4134
4139
|
}
|
|
4135
|
-
function
|
|
4140
|
+
function Di(t) {
|
|
4136
4141
|
return (n, e) => T.isError(n) ? n : T.isError(e) ? e : t(n, e);
|
|
4137
4142
|
}
|
|
4138
|
-
function
|
|
4143
|
+
function Oi(t) {
|
|
4139
4144
|
const n = t.getCode();
|
|
4140
4145
|
return n === T.Code.Null || n === T.Code.GettingData ? T.BuiltIn.Num : t;
|
|
4141
4146
|
}
|
|
4142
|
-
function
|
|
4147
|
+
function Fi(t) {
|
|
4143
4148
|
const n = t.firstError();
|
|
4144
|
-
return 1 === t.size && t.isIReferenceRange ? n :
|
|
4149
|
+
return 1 === t.size && t.isIReferenceRange ? n : Oi(n);
|
|
4145
4150
|
}
|
|
4146
|
-
var
|
|
4151
|
+
var Pi = (t) => {
|
|
4147
4152
|
let n = 1;
|
|
4148
4153
|
for (let e = t; e >= 2; e--) n *= e;
|
|
4149
4154
|
return n;
|
|
4150
|
-
},
|
|
4155
|
+
}, Li = (t, n) => {
|
|
4151
4156
|
const e = Math.min(n, t - n);
|
|
4152
4157
|
let r = 1;
|
|
4153
4158
|
for (let n = 1; n <= e; n++) if (r = r / n * (t - e + n), !Number.isFinite(r)) return NaN;
|
|
4154
4159
|
return r;
|
|
4155
|
-
},
|
|
4156
|
-
ABS: () =>
|
|
4157
|
-
AGGREGATE: () =>
|
|
4158
|
-
ARABIC: () =>
|
|
4159
|
-
BASE: () =>
|
|
4160
|
-
CEILING: () =>
|
|
4161
|
-
CEILING_MATH: () =>
|
|
4162
|
-
CEILING_PRECISE: () =>
|
|
4163
|
-
COMBIN: () =>
|
|
4164
|
-
COMBINA: () =>
|
|
4165
|
-
DECIMAL: () =>
|
|
4166
|
-
DEGREES: () =>
|
|
4167
|
-
ECMA_CEILING: () =>
|
|
4168
|
-
EVEN: () =>
|
|
4169
|
-
EXP: () =>
|
|
4170
|
-
FACT: () =>
|
|
4171
|
-
FACTDOUBLE: () =>
|
|
4172
|
-
FLOOR: () =>
|
|
4173
|
-
FLOOR_MATH: () =>
|
|
4174
|
-
FLOOR_PRECISE: () =>
|
|
4175
|
-
GCD: () =>
|
|
4176
|
-
INT: () =>
|
|
4177
|
-
ISO_CEILING: () =>
|
|
4178
|
-
LCM: () =>
|
|
4179
|
-
LN: () =>
|
|
4180
|
-
LOG: () =>
|
|
4181
|
-
LOG10: () =>
|
|
4182
|
-
MDETERM: () =>
|
|
4183
|
-
MINVERSE: () =>
|
|
4184
|
-
MMULT: () =>
|
|
4185
|
-
MOD: () =>
|
|
4186
|
-
MROUND: () =>
|
|
4187
|
-
MULTINOMIAL: () =>
|
|
4188
|
-
MUNIT: () =>
|
|
4189
|
-
ODD: () =>
|
|
4190
|
-
PERCENTOF: () =>
|
|
4191
|
-
PI: () =>
|
|
4192
|
-
POWER: () =>
|
|
4193
|
-
PRODUCT: () =>
|
|
4194
|
-
QUOTIENT: () =>
|
|
4195
|
-
RADIANS: () =>
|
|
4196
|
-
RAND: () =>
|
|
4197
|
-
RANDARRAY: () =>
|
|
4198
|
-
RANDBETWEEN: () =>
|
|
4199
|
-
ROMAN: () =>
|
|
4200
|
-
ROUND: () =>
|
|
4201
|
-
ROUNDDOWN: () =>
|
|
4202
|
-
ROUNDUP: () =>
|
|
4203
|
-
SEQUENCE: () =>
|
|
4204
|
-
SERIESSUM: () =>
|
|
4205
|
-
SIGN: () =>
|
|
4206
|
-
SQRT: () =>
|
|
4207
|
-
SQRTPI: () =>
|
|
4208
|
-
SUBTOTAL: () =>
|
|
4209
|
-
SUM: () =>
|
|
4210
|
-
SUMIF: () =>
|
|
4211
|
-
SUMIFS: () =>
|
|
4212
|
-
SUMPRODUCT: () =>
|
|
4213
|
-
SUMSQ: () =>
|
|
4214
|
-
SUMX2MY2: () =>
|
|
4215
|
-
SUMX2PY2: () =>
|
|
4216
|
-
SUMXMY2: () =>
|
|
4217
|
-
TRUNC: () =>
|
|
4160
|
+
}, _i = U({
|
|
4161
|
+
ABS: () => Ui,
|
|
4162
|
+
AGGREGATE: () => ki,
|
|
4163
|
+
ARABIC: () => Hi,
|
|
4164
|
+
BASE: () => Gi,
|
|
4165
|
+
CEILING: () => ji,
|
|
4166
|
+
CEILING_MATH: () => Yi,
|
|
4167
|
+
CEILING_PRECISE: () => qi,
|
|
4168
|
+
COMBIN: () => Ki,
|
|
4169
|
+
COMBINA: () => zi,
|
|
4170
|
+
DECIMAL: () => Wi,
|
|
4171
|
+
DEGREES: () => Qi,
|
|
4172
|
+
ECMA_CEILING: () => $i,
|
|
4173
|
+
EVEN: () => Zi,
|
|
4174
|
+
EXP: () => Ji,
|
|
4175
|
+
FACT: () => tl,
|
|
4176
|
+
FACTDOUBLE: () => nl,
|
|
4177
|
+
FLOOR: () => el,
|
|
4178
|
+
FLOOR_MATH: () => rl,
|
|
4179
|
+
FLOOR_PRECISE: () => ol,
|
|
4180
|
+
GCD: () => ul,
|
|
4181
|
+
INT: () => il,
|
|
4182
|
+
ISO_CEILING: () => ll,
|
|
4183
|
+
LCM: () => al,
|
|
4184
|
+
LN: () => sl,
|
|
4185
|
+
LOG: () => cl,
|
|
4186
|
+
LOG10: () => fl,
|
|
4187
|
+
MDETERM: () => gl,
|
|
4188
|
+
MINVERSE: () => ml,
|
|
4189
|
+
MMULT: () => Nl,
|
|
4190
|
+
MOD: () => Il,
|
|
4191
|
+
MROUND: () => Al,
|
|
4192
|
+
MULTINOMIAL: () => wl,
|
|
4193
|
+
MUNIT: () => dl,
|
|
4194
|
+
ODD: () => El,
|
|
4195
|
+
PERCENTOF: () => Bl,
|
|
4196
|
+
PI: () => Cl,
|
|
4197
|
+
POWER: () => Rl,
|
|
4198
|
+
PRODUCT: () => bl,
|
|
4199
|
+
QUOTIENT: () => vl,
|
|
4200
|
+
RADIANS: () => yl,
|
|
4201
|
+
RAND: () => Tl,
|
|
4202
|
+
RANDARRAY: () => Vl,
|
|
4203
|
+
RANDBETWEEN: () => xl,
|
|
4204
|
+
ROMAN: () => Dl,
|
|
4205
|
+
ROUND: () => Ol,
|
|
4206
|
+
ROUNDDOWN: () => Fl,
|
|
4207
|
+
ROUNDUP: () => Pl,
|
|
4208
|
+
SEQUENCE: () => _l,
|
|
4209
|
+
SERIESSUM: () => Ul,
|
|
4210
|
+
SIGN: () => kl,
|
|
4211
|
+
SQRT: () => Hl,
|
|
4212
|
+
SQRTPI: () => Gl,
|
|
4213
|
+
SUBTOTAL: () => jl,
|
|
4214
|
+
SUM: () => Yl,
|
|
4215
|
+
SUMIF: () => ql,
|
|
4216
|
+
SUMIFS: () => $l,
|
|
4217
|
+
SUMPRODUCT: () => Kl,
|
|
4218
|
+
SUMSQ: () => zl,
|
|
4219
|
+
SUMX2MY2: () => Wl,
|
|
4220
|
+
SUMX2PY2: () => Ql,
|
|
4221
|
+
SUMXMY2: () => Zl,
|
|
4222
|
+
TRUNC: () => Jl
|
|
4218
4223
|
});
|
|
4219
|
-
function
|
|
4224
|
+
function Ui(t) {
|
|
4220
4225
|
return Math.abs(t);
|
|
4221
4226
|
}
|
|
4222
|
-
var
|
|
4227
|
+
var Xi = (t, n, e) => {
|
|
4223
4228
|
const r = t.length;
|
|
4224
4229
|
return 0 === r || n < 1 || n > r ? T.BuiltIn.Num : t[Math.trunc(e ? r - n : n - 1)];
|
|
4225
4230
|
};
|
|
4226
|
-
function
|
|
4231
|
+
function ki(t, n, e, ...r) {
|
|
4227
4232
|
const o = y.getArgs().getAreaCountAt(2) > 1;
|
|
4228
4233
|
e = y.flattenAreas(e);
|
|
4229
4234
|
const u = Math.trunc(t), i = Math.trunc(n);
|
|
@@ -4262,7 +4267,7 @@ function Xi(t, n, e, ...r) {
|
|
|
4262
4267
|
else if (2 !== u && 3 !== u) {
|
|
4263
4268
|
for (const t of m) if (t.hasError()) return t.firstError();
|
|
4264
4269
|
}
|
|
4265
|
-
const N = m.reduce((t, n) => t.concat(n, V.Axis.Row, null)), I = N.getStats().getAggregates(),
|
|
4270
|
+
const N = m.reduce((t, n) => t.concat(n, V.Axis.Row, null)), I = N.getStats().getAggregates(), p = () => N.getStats().getSortedNumbers();
|
|
4266
4271
|
switch (u) {
|
|
4267
4272
|
case 1: {
|
|
4268
4273
|
const t = I.numericalCount ?? 0;
|
|
@@ -4292,7 +4297,7 @@ function Xi(t, n, e, ...r) {
|
|
|
4292
4297
|
case 11:
|
|
4293
4298
|
if ((I.numericalCount ?? 0) < 1) throw T.BuiltIn.Div0;
|
|
4294
4299
|
return I.varP;
|
|
4295
|
-
case 12: return
|
|
4300
|
+
case 12: return p().getPercentile(.5) ?? T.BuiltIn.Num;
|
|
4296
4301
|
case 13: {
|
|
4297
4302
|
const t = N.getStats().getFrequencies({ filterFn: (t) => "number" == typeof t }).getValueCounts({
|
|
4298
4303
|
sortBy: "frequency",
|
|
@@ -4300,33 +4305,33 @@ function Xi(t, n, e, ...r) {
|
|
|
4300
4305
|
}).next();
|
|
4301
4306
|
return t.done || t.value[1] < 2 ? T.BuiltIn.NA : t.value[0];
|
|
4302
4307
|
}
|
|
4303
|
-
case 14: return
|
|
4304
|
-
case 15: return
|
|
4305
|
-
case 16: return
|
|
4306
|
-
case 17: return
|
|
4307
|
-
case 18: return
|
|
4308
|
-
case 19: return
|
|
4308
|
+
case 14: return Xi(p().getValues(), f, !0);
|
|
4309
|
+
case 15: return Xi(p().getValues(), f, !1);
|
|
4310
|
+
case 16: return p().getPercentile(f) ?? T.BuiltIn.Num;
|
|
4311
|
+
case 17: return p().getPercentile(Math.trunc(f) / 4) ?? T.BuiltIn.Num;
|
|
4312
|
+
case 18: return p().getPercentile(f, !0) ?? T.BuiltIn.Num;
|
|
4313
|
+
case 19: return p().getPercentile(Math.trunc(f) / 4, !0) ?? T.BuiltIn.Num;
|
|
4309
4314
|
default: return T.BuiltIn.Value;
|
|
4310
4315
|
}
|
|
4311
4316
|
}
|
|
4312
|
-
function
|
|
4313
|
-
if (t.length >
|
|
4317
|
+
function Hi(t) {
|
|
4318
|
+
if (t.length > la) throw new T.Value("Roman numeral too long in ARABIC evaluation.");
|
|
4314
4319
|
const n = t.replace(/^[ \t\n\r]+|[ \t\n\r]+$/g, ""), e = n.startsWith("-"), r = e ? n.slice(1) : n;
|
|
4315
4320
|
if (e && "" === r) throw T.BuiltIn.Num;
|
|
4316
4321
|
let o = 0, u = 0;
|
|
4317
4322
|
for (let t = r.length - 1; t >= 0; t--) {
|
|
4318
|
-
const n =
|
|
4323
|
+
const n = ia[r[t].toUpperCase()];
|
|
4319
4324
|
if (void 0 === n) throw new T.Value("Invalid roman numeral in ARABIC evaluation.");
|
|
4320
4325
|
n < u ? o -= n : (o += n, u = n);
|
|
4321
4326
|
}
|
|
4322
4327
|
return e ? -o : o;
|
|
4323
4328
|
}
|
|
4324
|
-
function
|
|
4329
|
+
function Gi(t, n, e = 1) {
|
|
4325
4330
|
if (t < 0 || e < 0) return NaN;
|
|
4326
4331
|
const r = Math.trunc(t), o = Math.trunc(n), u = Math.trunc(e);
|
|
4327
|
-
return r >= 2 ** 53 || o < 2 || o > 36 || u >
|
|
4332
|
+
return r >= 2 ** 53 || o < 2 || o > 36 || u > la ? NaN : (0 === r ? "" : r.toString(o).toUpperCase()).padStart(u, "0");
|
|
4328
4333
|
}
|
|
4329
|
-
function
|
|
4334
|
+
function ji(t, n) {
|
|
4330
4335
|
if (0 === n) return 0;
|
|
4331
4336
|
if (0 === X(n)) throw T.BuiltIn.Div0;
|
|
4332
4337
|
if (t > 0 && n < 0) return NaN;
|
|
@@ -4335,33 +4340,33 @@ function Gi(t, n) {
|
|
|
4335
4340
|
const o = Math.floor(r);
|
|
4336
4341
|
return t < 0 ? n < 0 ? -e * (o + 1) : -e * o : (o + 1) * e;
|
|
4337
4342
|
}
|
|
4338
|
-
function
|
|
4343
|
+
function Yi(t, n, e = 0) {
|
|
4339
4344
|
if (0 === (n = Math.abs(n ?? 1))) return 0;
|
|
4340
|
-
const r =
|
|
4345
|
+
const r = ji(t, n);
|
|
4341
4346
|
return t >= 0 || !e || r === t ? r : r - n;
|
|
4342
4347
|
}
|
|
4343
|
-
function
|
|
4344
|
-
return 0 === n ? 0 :
|
|
4345
|
-
}
|
|
4346
|
-
function qi(t, n) {
|
|
4347
|
-
return Gi(t, n);
|
|
4348
|
+
function qi(t, n = 1) {
|
|
4349
|
+
return 0 === n ? 0 : ji(t, Math.abs(n));
|
|
4348
4350
|
}
|
|
4349
4351
|
function $i(t, n) {
|
|
4352
|
+
return ji(t, n);
|
|
4353
|
+
}
|
|
4354
|
+
function Ki(t, n) {
|
|
4350
4355
|
if (t < 0 || n < 0) return NaN;
|
|
4351
4356
|
const e = Math.trunc(t), r = Math.trunc(n);
|
|
4352
|
-
return e > 2147483646 || e < r ? NaN :
|
|
4357
|
+
return e > 2147483646 || e < r ? NaN : Li(e, r);
|
|
4353
4358
|
}
|
|
4354
|
-
function
|
|
4359
|
+
function zi(t, n) {
|
|
4355
4360
|
const e = Math.trunc(t), r = Math.trunc(n);
|
|
4356
4361
|
if (0 === r && (0 === e || 1 === e)) return 1;
|
|
4357
4362
|
if (t < 0 || n < 0) return NaN;
|
|
4358
4363
|
const o = e + r - 1;
|
|
4359
|
-
return o > 2147483646 || o < r ? NaN :
|
|
4364
|
+
return o > 2147483646 || o < r ? NaN : Li(o, r);
|
|
4360
4365
|
}
|
|
4361
|
-
function
|
|
4366
|
+
function Wi(t, n) {
|
|
4362
4367
|
const e = Math.trunc(n);
|
|
4363
4368
|
if (e < 2 || e > 36) return NaN;
|
|
4364
|
-
if (t.length >
|
|
4369
|
+
if (t.length > la) throw T.BuiltIn.Value;
|
|
4365
4370
|
let r = t.replace(/^[ \t]+/, "");
|
|
4366
4371
|
if (16 === e) {
|
|
4367
4372
|
const t = r.search(/[xX]/);
|
|
@@ -4375,29 +4380,29 @@ function zi(t, n) {
|
|
|
4375
4380
|
}
|
|
4376
4381
|
return o;
|
|
4377
4382
|
}
|
|
4378
|
-
function
|
|
4383
|
+
function Qi(t) {
|
|
4379
4384
|
return t * (180 / Math.PI);
|
|
4380
4385
|
}
|
|
4381
|
-
function
|
|
4386
|
+
function Zi(t) {
|
|
4382
4387
|
let n = Math.ceil(Math.abs(t));
|
|
4383
4388
|
return n = 1 & n ? n + 1 : n, t < 0 ? -n : n;
|
|
4384
4389
|
}
|
|
4385
|
-
function
|
|
4390
|
+
function Ji(t) {
|
|
4386
4391
|
return Math.exp(t);
|
|
4387
4392
|
}
|
|
4388
|
-
function
|
|
4393
|
+
function tl(t) {
|
|
4389
4394
|
if (t < 0) return NaN;
|
|
4390
4395
|
const n = Math.trunc(j(t));
|
|
4391
|
-
return n > 170 ? NaN :
|
|
4396
|
+
return n > 170 ? NaN : Pi(n);
|
|
4392
4397
|
}
|
|
4393
|
-
function
|
|
4398
|
+
function nl(t) {
|
|
4394
4399
|
const n = Ml(t);
|
|
4395
4400
|
if (n < -1) return NaN;
|
|
4396
4401
|
let e = 1;
|
|
4397
4402
|
for (let t = Math.trunc(n); t > 1; t -= 2) if (e *= t, !Number.isFinite(e)) return NaN;
|
|
4398
4403
|
return e;
|
|
4399
4404
|
}
|
|
4400
|
-
function
|
|
4405
|
+
function el(t, n) {
|
|
4401
4406
|
if (0 === t) return 0;
|
|
4402
4407
|
if (0 === n) throw T.BuiltIn.Div0;
|
|
4403
4408
|
if (0 === X(n)) throw T.BuiltIn.Div0;
|
|
@@ -4407,88 +4412,88 @@ function nl(t, n) {
|
|
|
4407
4412
|
const o = Math.floor(r);
|
|
4408
4413
|
return t < 0 ? n < 0 ? -e * o : -e * (o + 1) : o * e;
|
|
4409
4414
|
}
|
|
4410
|
-
function
|
|
4415
|
+
function rl(t, n = t > 0 ? 1 : -1, e = 0) {
|
|
4411
4416
|
if (0 === n) return 0;
|
|
4412
|
-
const r = Math.abs(n), o =
|
|
4417
|
+
const r = Math.abs(n), o = el(t, r);
|
|
4413
4418
|
return t >= 0 || !e || o === t ? o : o + r;
|
|
4414
4419
|
}
|
|
4415
|
-
function
|
|
4416
|
-
return 0 === n ? 0 :
|
|
4420
|
+
function ol(t, n = 1) {
|
|
4421
|
+
return 0 === n ? 0 : el(t, Math.abs(n));
|
|
4417
4422
|
}
|
|
4418
|
-
function
|
|
4419
|
-
|
|
4423
|
+
function ul(t) {
|
|
4424
|
+
ca(t);
|
|
4420
4425
|
let n, e = t[0];
|
|
4421
|
-
if (e < 0 || e >
|
|
4426
|
+
if (e < 0 || e > Na) return NaN;
|
|
4422
4427
|
e = Math.abs(Math.trunc(e));
|
|
4423
4428
|
const r = t.length;
|
|
4424
4429
|
for (let o = 1; o < r; o++) {
|
|
4425
|
-
if (n = t[o], n < 0 || n >
|
|
4430
|
+
if (n = t[o], n < 0 || n > Na) return NaN;
|
|
4426
4431
|
for (n = Math.abs(Math.trunc(n)); e && n;) e > n ? e %= n : n %= e;
|
|
4427
4432
|
e += n;
|
|
4428
4433
|
}
|
|
4429
4434
|
return e;
|
|
4430
4435
|
}
|
|
4431
|
-
function
|
|
4436
|
+
function il(t) {
|
|
4432
4437
|
const n = Math.round(t);
|
|
4433
4438
|
return j(t) === j(n) ? n : Math.floor(t);
|
|
4434
4439
|
}
|
|
4435
|
-
function
|
|
4436
|
-
return
|
|
4440
|
+
function ll(t, n = 1) {
|
|
4441
|
+
return qi(t, n);
|
|
4437
4442
|
}
|
|
4438
|
-
function
|
|
4439
|
-
|
|
4443
|
+
function al(t) {
|
|
4444
|
+
ca(t);
|
|
4440
4445
|
let n, e, r, o = t[0];
|
|
4441
|
-
if (o < 0 || o >
|
|
4446
|
+
if (o < 0 || o > Na) return NaN;
|
|
4442
4447
|
o = Math.abs(Math.trunc(o));
|
|
4443
4448
|
const u = t.length;
|
|
4444
4449
|
for (let i = 1; i < u; i++) {
|
|
4445
4450
|
const u = t[i];
|
|
4446
|
-
if (u < 0 || u >
|
|
4451
|
+
if (u < 0 || u > Na) return NaN;
|
|
4447
4452
|
if (n = Math.abs(Math.trunc(u)), 0 !== o && 0 !== n) {
|
|
4448
4453
|
for (e = o, r = n; e && r;) e > r ? e %= r : r %= e;
|
|
4449
|
-
if (o = o / (e + r) * n, o >
|
|
4454
|
+
if (o = o / (e + r) * n, o > Na) return NaN;
|
|
4450
4455
|
} else o = 0;
|
|
4451
4456
|
}
|
|
4452
4457
|
return o;
|
|
4453
4458
|
}
|
|
4454
|
-
function
|
|
4459
|
+
function sl(t) {
|
|
4455
4460
|
return t <= 0 ? NaN : Math.log(t);
|
|
4456
4461
|
}
|
|
4457
|
-
function
|
|
4462
|
+
function cl(t, n) {
|
|
4458
4463
|
if (t <= 0) return NaN;
|
|
4459
4464
|
if (void 0 === n) return Math.log10(t);
|
|
4460
4465
|
if (1 === n) throw T.BuiltIn.Div0;
|
|
4461
4466
|
return n <= 0 ? NaN : Math.log(t) / Math.log(n);
|
|
4462
4467
|
}
|
|
4463
|
-
function
|
|
4468
|
+
function fl(t) {
|
|
4464
4469
|
return t <= 0 ? NaN : Math.log10(t);
|
|
4465
4470
|
}
|
|
4466
|
-
var
|
|
4471
|
+
var hl = (t) => {
|
|
4467
4472
|
const n = t.getValues();
|
|
4468
4473
|
for (const t of n) for (const n of t) if ("number" != typeof n) return T.isError(n) ? n : T.BuiltIn.Value;
|
|
4469
4474
|
return n;
|
|
4470
4475
|
};
|
|
4471
|
-
function
|
|
4476
|
+
function gl(t) {
|
|
4472
4477
|
if (t.hasError()) return t.firstError();
|
|
4473
4478
|
const { rows: n, columns: e } = t.getShape();
|
|
4474
4479
|
if (n !== e) return T.BuiltIn.Value;
|
|
4475
|
-
const r =
|
|
4480
|
+
const r = hl(t);
|
|
4476
4481
|
return Array.isArray(r) ? ((t) => {
|
|
4477
|
-
const { lu: n, sign: e, singular: r } =
|
|
4482
|
+
const { lu: n, sign: e, singular: r } = Vi(t);
|
|
4478
4483
|
if (r) return 0;
|
|
4479
4484
|
let o = e;
|
|
4480
4485
|
for (let t = 0; t < n.length; t++) o = X(o * n[t][t]);
|
|
4481
4486
|
return Number.isFinite(o) ? o : NaN;
|
|
4482
4487
|
})(r) : r;
|
|
4483
4488
|
}
|
|
4484
|
-
function
|
|
4489
|
+
function ml(t) {
|
|
4485
4490
|
if (t.hasError()) return t.firstError();
|
|
4486
4491
|
const { rows: n, columns: e } = t.getShape();
|
|
4487
4492
|
if (n !== e) return T.BuiltIn.Value;
|
|
4488
|
-
const r =
|
|
4493
|
+
const r = hl(t);
|
|
4489
4494
|
if (!Array.isArray(r)) return r;
|
|
4490
4495
|
const o = ((t) => {
|
|
4491
|
-
const n = t.length, { lu: e, perm: r, singular: o } =
|
|
4496
|
+
const n = t.length, { lu: e, perm: r, singular: o } = Vi(t);
|
|
4492
4497
|
if (o) return null;
|
|
4493
4498
|
const u = Array.from({ length: n }, () => new Array(n).fill(0));
|
|
4494
4499
|
for (let t = 0; t < n; t++) {
|
|
@@ -4508,10 +4513,10 @@ function gl(t) {
|
|
|
4508
4513
|
})(r);
|
|
4509
4514
|
return null === o ? T.BuiltIn.Num : o;
|
|
4510
4515
|
}
|
|
4511
|
-
function
|
|
4512
|
-
const e =
|
|
4516
|
+
function Nl(t, n) {
|
|
4517
|
+
const e = hl(t);
|
|
4513
4518
|
if (!Array.isArray(e)) return e;
|
|
4514
|
-
const r =
|
|
4519
|
+
const r = hl(n);
|
|
4515
4520
|
if (!Array.isArray(r)) return r;
|
|
4516
4521
|
const { rows: o, columns: u } = t.getShape(), { rows: i, columns: l } = n.getShape();
|
|
4517
4522
|
if (u !== i) return T.BuiltIn.Value;
|
|
@@ -4527,14 +4532,14 @@ function ml(t, n) {
|
|
|
4527
4532
|
}
|
|
4528
4533
|
return a;
|
|
4529
4534
|
}
|
|
4530
|
-
function
|
|
4535
|
+
function Il(t, n) {
|
|
4531
4536
|
if (0 === X(n)) throw T.BuiltIn.Div0;
|
|
4532
4537
|
if (0 !== t && 0 === X(t)) return NaN;
|
|
4533
|
-
if (Math.abs(t / n) >
|
|
4538
|
+
if (Math.abs(t / n) > pl) return NaN;
|
|
4534
4539
|
let e = t % n;
|
|
4535
4540
|
return 0 !== e && e < 0 != n < 0 && (e += n), e === n ? 0 : e;
|
|
4536
4541
|
}
|
|
4537
|
-
var
|
|
4542
|
+
var pl = 1099511627776;
|
|
4538
4543
|
function Ml(t) {
|
|
4539
4544
|
if (void 0 === t) throw T.BuiltIn.NA;
|
|
4540
4545
|
if (null === t) return 0;
|
|
@@ -4542,7 +4547,7 @@ function Ml(t) {
|
|
|
4542
4547
|
if (T.isError(t)) throw t;
|
|
4543
4548
|
return y.parseAsNumber(t);
|
|
4544
4549
|
}
|
|
4545
|
-
function
|
|
4550
|
+
function Al(t, n) {
|
|
4546
4551
|
const e = Ml(t), r = Ml(n);
|
|
4547
4552
|
if (0 === r) return 0;
|
|
4548
4553
|
if (e > 0 && r < 0 || e < 0 && r > 0) return NaN;
|
|
@@ -4551,8 +4556,8 @@ function pl(t, n) {
|
|
|
4551
4556
|
const u = Math.floor(o);
|
|
4552
4557
|
return (o - u >= .499999999999995 ? u + 1 : u) * r;
|
|
4553
4558
|
}
|
|
4554
|
-
function
|
|
4555
|
-
|
|
4559
|
+
function wl(t) {
|
|
4560
|
+
ca(t);
|
|
4556
4561
|
const n = [];
|
|
4557
4562
|
let e = 0;
|
|
4558
4563
|
const r = t.length;
|
|
@@ -4564,10 +4569,10 @@ function Al(t) {
|
|
|
4564
4569
|
}
|
|
4565
4570
|
if (e > 170) return NaN;
|
|
4566
4571
|
let o = 1;
|
|
4567
|
-
for (let t = 0; t < n.length; t++) o *=
|
|
4568
|
-
return
|
|
4572
|
+
for (let t = 0; t < n.length; t++) o *= Pi(n[t]);
|
|
4573
|
+
return Pi(e) / o;
|
|
4569
4574
|
}
|
|
4570
|
-
function
|
|
4575
|
+
function dl(t) {
|
|
4571
4576
|
const n = Math.trunc(t);
|
|
4572
4577
|
if (n <= 0) return T.BuiltIn.Value;
|
|
4573
4578
|
const e = y.getEntireCoords();
|
|
@@ -4576,12 +4581,12 @@ function wl(t) {
|
|
|
4576
4581
|
for (let t = 0; t < n; t++) r.pushAt(t, t, 1);
|
|
4577
4582
|
return r.build();
|
|
4578
4583
|
}
|
|
4579
|
-
function
|
|
4584
|
+
function El(t) {
|
|
4580
4585
|
if (0 === t) return 1;
|
|
4581
4586
|
let n = Math.ceil(Math.abs(t));
|
|
4582
4587
|
return n = 1 & n ? n : n + 1, t > 0 ? n : -n;
|
|
4583
4588
|
}
|
|
4584
|
-
function
|
|
4589
|
+
function Bl(t, n) {
|
|
4585
4590
|
t = y.flattenAreas(t), n = y.flattenAreas(n);
|
|
4586
4591
|
const e = y.getArgs(), r = [t, n];
|
|
4587
4592
|
for (let t = 0; t < 2; t++) if (r[t].hasError()) {
|
|
@@ -4592,41 +4597,41 @@ function El(t, n) {
|
|
|
4592
4597
|
if (0 === X(u)) throw T.BuiltIn.Div0;
|
|
4593
4598
|
return X(o / u);
|
|
4594
4599
|
}
|
|
4595
|
-
function
|
|
4600
|
+
function Cl() {
|
|
4596
4601
|
return Math.PI;
|
|
4597
4602
|
}
|
|
4598
|
-
var
|
|
4599
|
-
function
|
|
4603
|
+
var Sl = 4294967294;
|
|
4604
|
+
function Rl(t, n) {
|
|
4600
4605
|
if (0 === t) {
|
|
4601
4606
|
if (n < 0) throw T.BuiltIn.Div0;
|
|
4602
4607
|
if (0 === n) return NaN;
|
|
4603
4608
|
}
|
|
4604
4609
|
return t < 0 ? function(t, n) {
|
|
4605
|
-
if (Number.isInteger(n) && Math.abs(n) <=
|
|
4610
|
+
if (Number.isInteger(n) && Math.abs(n) <= Sl) return t ** n;
|
|
4606
4611
|
const e = Number((1 / n).toPrecision(15));
|
|
4607
4612
|
return Number.isInteger(e) && 1 === Math.abs(e % 2) ? -((-t) ** n) : NaN;
|
|
4608
4613
|
}(t, n) : t ** n;
|
|
4609
4614
|
}
|
|
4610
|
-
function
|
|
4615
|
+
function bl(t) {
|
|
4611
4616
|
let n = 0, e = !1;
|
|
4612
4617
|
for (const r of t) for (const t of r.values()) n = e ? X(n * t) : t, e = !0;
|
|
4613
4618
|
return e ? n : 0;
|
|
4614
4619
|
}
|
|
4615
|
-
function
|
|
4620
|
+
function vl(t, n) {
|
|
4616
4621
|
const e = Ml(t), r = Ml(n);
|
|
4617
4622
|
if (0 === r) throw T.BuiltIn.Div0;
|
|
4618
4623
|
return Math.trunc(e / r);
|
|
4619
4624
|
}
|
|
4620
|
-
function
|
|
4625
|
+
function yl(t) {
|
|
4621
4626
|
return t * (Math.PI / 180);
|
|
4622
4627
|
}
|
|
4623
|
-
function
|
|
4628
|
+
function Tl() {
|
|
4624
4629
|
return y.getRandom();
|
|
4625
4630
|
}
|
|
4626
|
-
function
|
|
4627
|
-
const u =
|
|
4631
|
+
function Vl(t = 1, n = 1, e = 0, r = 1, o = !1) {
|
|
4632
|
+
const u = Ll(t);
|
|
4628
4633
|
if ("number" != typeof u) return u;
|
|
4629
|
-
const i =
|
|
4634
|
+
const i = Ll(n);
|
|
4630
4635
|
if ("number" != typeof i) return i;
|
|
4631
4636
|
const l = !0 === o;
|
|
4632
4637
|
return e > r ? T.BuiltIn.Value : !l || e === Math.trunc(e) && r === Math.trunc(r) ? y.createRange(u, i, () => {
|
|
@@ -4635,39 +4640,39 @@ function Tl(t = 1, n = 1, e = 0, r = 1, o = !1) {
|
|
|
4635
4640
|
return t > r ? r : t;
|
|
4636
4641
|
}) : T.BuiltIn.Value;
|
|
4637
4642
|
}
|
|
4638
|
-
function
|
|
4643
|
+
function xl(t, n) {
|
|
4639
4644
|
const e = Ml(n), r = Ml(t);
|
|
4640
4645
|
if (r > e) return NaN;
|
|
4641
4646
|
const o = Math.ceil(X(r)), u = Math.ceil(X(e));
|
|
4642
4647
|
return o + Math.floor(y.getRandom() * (u - o + 1));
|
|
4643
4648
|
}
|
|
4644
|
-
function
|
|
4649
|
+
function Dl(t, n = 0) {
|
|
4645
4650
|
const e = "boolean" == typeof n ? n ? 0 : 4 : Math.trunc(null === n ? 0 : y.parseAsNumber(n));
|
|
4646
4651
|
if ((t = Math.trunc(t)) < 0 || t > 3999) return T.BuiltIn.Value;
|
|
4647
4652
|
if (e < 0 || e > 4) return T.BuiltIn.Value;
|
|
4648
4653
|
if (0 === t) return "";
|
|
4649
4654
|
let r = t, o = "";
|
|
4650
|
-
for (let t = 0; t <=
|
|
4655
|
+
for (let t = 0; t <= ua / 2; t++) {
|
|
4651
4656
|
let n = 2 * t;
|
|
4652
|
-
const u = Math.floor(r /
|
|
4657
|
+
const u = Math.floor(r / oa[n]);
|
|
4653
4658
|
if (u % 5 == 4) {
|
|
4654
4659
|
let t = 4 === u ? n - 1 : n - 2, i = 0;
|
|
4655
|
-
for (; i < e && n <
|
|
4656
|
-
o +=
|
|
4660
|
+
for (; i < e && n < ua;) i++, oa[t] - oa[n + 1] <= r ? n++ : i = e;
|
|
4661
|
+
o += ra[n] + ra[t], r = r + oa[n] - oa[t];
|
|
4657
4662
|
} else {
|
|
4658
|
-
u > 4 && (o +=
|
|
4659
|
-
let t = Math.floor(r /
|
|
4660
|
-
for (r -= t *
|
|
4663
|
+
u > 4 && (o += ra[n - 1], r -= oa[n - 1]);
|
|
4664
|
+
let t = Math.floor(r / oa[n]);
|
|
4665
|
+
for (r -= t * oa[n]; t > 0; t--) o += ra[n];
|
|
4661
4666
|
}
|
|
4662
4667
|
}
|
|
4663
4668
|
return o;
|
|
4664
4669
|
}
|
|
4665
|
-
function
|
|
4670
|
+
function Ol(t, n) {
|
|
4666
4671
|
const e = H(n);
|
|
4667
|
-
if (e >=
|
|
4672
|
+
if (e >= na) return 0;
|
|
4668
4673
|
const r = t > 0 ? 1 : -1, o = Math.abs(t);
|
|
4669
4674
|
if (0 === e) return r * Math.round(j(o));
|
|
4670
|
-
const u =
|
|
4675
|
+
const u = ea(e);
|
|
4671
4676
|
if (void 0 === u) return e > 0 ? t : 0;
|
|
4672
4677
|
if (e > 0) {
|
|
4673
4678
|
const n = j(j(o) * u);
|
|
@@ -4675,10 +4680,10 @@ function Dl(t, n) {
|
|
|
4675
4680
|
}
|
|
4676
4681
|
return r * Math.round(j(o / u)) * u;
|
|
4677
4682
|
}
|
|
4678
|
-
function
|
|
4679
|
-
const e =
|
|
4683
|
+
function Fl(t, n) {
|
|
4684
|
+
const e = ta(n), r = t > 0 ? 1 : -1, o = Math.abs(t);
|
|
4680
4685
|
if (0 === e) return r * Math.floor(j(o));
|
|
4681
|
-
const u =
|
|
4686
|
+
const u = ea(e);
|
|
4682
4687
|
if (void 0 === u) return e > 0 ? t : 0;
|
|
4683
4688
|
if (e > 0) {
|
|
4684
4689
|
const n = j(j(o) * u);
|
|
@@ -4686,22 +4691,22 @@ function Ol(t, n) {
|
|
|
4686
4691
|
}
|
|
4687
4692
|
return r * Math.floor(j(o / u)) * u;
|
|
4688
4693
|
}
|
|
4689
|
-
function
|
|
4690
|
-
const e =
|
|
4694
|
+
function Pl(t, n) {
|
|
4695
|
+
const e = ta(n), r = Fl(t, e);
|
|
4691
4696
|
if (r === j(t)) return r;
|
|
4692
4697
|
const o = r + Math.sign(t) * Math.pow(10, -e);
|
|
4693
4698
|
return Number.isFinite(o) ? o : NaN;
|
|
4694
4699
|
}
|
|
4695
|
-
var
|
|
4700
|
+
var Ll = (t) => {
|
|
4696
4701
|
if (t <= -1.1920928955078125e-7) return T.BuiltIn.Value;
|
|
4697
4702
|
const n = Math.trunc(j(t));
|
|
4698
4703
|
return n <= 0 ? T.BuiltIn.Calc : n > y.getEntireCoords().rowEnd + 1 ? T.BuiltIn.Value : n;
|
|
4699
4704
|
};
|
|
4700
|
-
function
|
|
4705
|
+
function _l(t, n = 1, e = 1, r = 1) {
|
|
4701
4706
|
t ??= 1;
|
|
4702
|
-
const o =
|
|
4707
|
+
const o = Ll(t);
|
|
4703
4708
|
if ("number" != typeof o) return o;
|
|
4704
|
-
const u =
|
|
4709
|
+
const u = Ll(n);
|
|
4705
4710
|
if ("number" != typeof u) return u;
|
|
4706
4711
|
let i = e;
|
|
4707
4712
|
return y.createRange(o, u, () => {
|
|
@@ -4709,43 +4714,43 @@ function Ll(t, n = 1, e = 1, r = 1) {
|
|
|
4709
4714
|
return i += r, t;
|
|
4710
4715
|
});
|
|
4711
4716
|
}
|
|
4712
|
-
function
|
|
4717
|
+
function Ul(t, n, e, r) {
|
|
4713
4718
|
const o = Ml(t), u = Ml(n), i = Ml(e);
|
|
4714
4719
|
if (void 0 === r) throw T.BuiltIn.NA;
|
|
4715
4720
|
if (T.isError(r)) throw r;
|
|
4716
4721
|
const l = y.getArgs().getRawAt(3), a = l, s = !0 === a?.isIRange, c = s && 1 === a.size && !0 === a.isIReferenceRange;
|
|
4717
4722
|
if (!s || c) {
|
|
4718
4723
|
const t = s ? a.getValueAt(0, 0) ?? null : l;
|
|
4719
|
-
return (null === t ? 0 : y.parseAsNumber(t)) *
|
|
4724
|
+
return (null === t ? 0 : y.parseAsNumber(t)) * Xl(o, u);
|
|
4720
4725
|
}
|
|
4721
4726
|
let f = 0, h = 0;
|
|
4722
|
-
for (const t of r.values(
|
|
4727
|
+
for (const t of r.values(ma)) if (null !== t) {
|
|
4723
4728
|
if (T.isError(t)) throw t;
|
|
4724
4729
|
if ("number" != typeof t) throw T.BuiltIn.Value;
|
|
4725
|
-
f += t *
|
|
4730
|
+
f += t * Xl(o, u + h * i), h++;
|
|
4726
4731
|
}
|
|
4727
4732
|
return f;
|
|
4728
4733
|
}
|
|
4729
|
-
var
|
|
4734
|
+
var Xl = (t, n) => {
|
|
4730
4735
|
if (0 === t && n <= 0) throw T.BuiltIn.Num;
|
|
4731
4736
|
const e = Math.pow(t, n);
|
|
4732
4737
|
if (Number.isNaN(e)) return 0;
|
|
4733
4738
|
if (!Number.isFinite(e)) throw T.BuiltIn.Num;
|
|
4734
4739
|
return e;
|
|
4735
4740
|
};
|
|
4736
|
-
function
|
|
4741
|
+
function kl(t) {
|
|
4737
4742
|
const n = X(t);
|
|
4738
4743
|
return n > 0 ? 1 : 0 === n ? 0 : -1;
|
|
4739
4744
|
}
|
|
4740
|
-
function
|
|
4745
|
+
function Hl(t) {
|
|
4741
4746
|
return Math.sqrt(t);
|
|
4742
4747
|
}
|
|
4743
|
-
function
|
|
4748
|
+
function Gl(t) {
|
|
4744
4749
|
const n = Ml(t);
|
|
4745
4750
|
return n < 0 ? NaN : Math.sqrt(n * Math.PI);
|
|
4746
4751
|
}
|
|
4747
|
-
function
|
|
4748
|
-
const e = Math.trunc(t), r = e >= 101, o = r ? e - 100 : e, u = r ? void 0 :
|
|
4752
|
+
function jl(t, n) {
|
|
4753
|
+
const e = Math.trunc(t), r = e >= 101, o = r ? e - 100 : e, u = r ? void 0 : ga;
|
|
4749
4754
|
let i = n.map((t) => y.filterHidden(t, u)).map((t) => y.filterTotals(t));
|
|
4750
4755
|
if (2 !== o && 3 !== o) {
|
|
4751
4756
|
for (const t of i) if (t.hasError()) return t.firstError();
|
|
@@ -4783,7 +4788,7 @@ function Gl(t, n) {
|
|
|
4783
4788
|
default: return T.BuiltIn.Value;
|
|
4784
4789
|
}
|
|
4785
4790
|
}
|
|
4786
|
-
function
|
|
4791
|
+
function Yl(t) {
|
|
4787
4792
|
let n = 0, e = null;
|
|
4788
4793
|
for (const r of t) {
|
|
4789
4794
|
const t = r.getStats(), o = t.getAggregates();
|
|
@@ -4791,13 +4796,13 @@ function jl(t) {
|
|
|
4791
4796
|
}
|
|
4792
4797
|
return e ? e.getSnappedSum(n) : n;
|
|
4793
4798
|
}
|
|
4794
|
-
function
|
|
4795
|
-
return
|
|
4799
|
+
function ql(t, n, e) {
|
|
4800
|
+
return ko(t, n, e, Di((t, n) => (null === t && (t = 0), "number" != typeof n ? t : t + n)), Go);
|
|
4796
4801
|
}
|
|
4797
|
-
function
|
|
4798
|
-
return
|
|
4802
|
+
function $l(t, n) {
|
|
4803
|
+
return xi(y, n, Di((t, n) => "number" != typeof n ? t : null === t ? n : t + n), t, 0, Go);
|
|
4799
4804
|
}
|
|
4800
|
-
function
|
|
4805
|
+
function Kl(t) {
|
|
4801
4806
|
const n = y.getArgs().getRepeatingArgsAt(0);
|
|
4802
4807
|
for (let t = 0, e = n.getLength(); t < e; t++) {
|
|
4803
4808
|
const e = n.getRawAt(t);
|
|
@@ -4818,26 +4823,26 @@ function $l(t) {
|
|
|
4818
4823
|
for (const n of e.values()) "number" == typeof n && (t += n);
|
|
4819
4824
|
return t;
|
|
4820
4825
|
}
|
|
4821
|
-
return
|
|
4826
|
+
return sa(e, r, aa);
|
|
4822
4827
|
}
|
|
4823
|
-
function
|
|
4828
|
+
function zl(t) {
|
|
4824
4829
|
let n = 0;
|
|
4825
4830
|
for (const e of t) for (const t of e.values()) n += X(t ** 2);
|
|
4826
4831
|
return n;
|
|
4827
4832
|
}
|
|
4828
|
-
function zl(t, n) {
|
|
4829
|
-
return fa(t, n, (t, n) => X(t ** 2) - X(n ** 2));
|
|
4830
|
-
}
|
|
4831
4833
|
function Wl(t, n) {
|
|
4832
|
-
return
|
|
4834
|
+
return ha(t, n, (t, n) => X(t ** 2) - X(n ** 2));
|
|
4833
4835
|
}
|
|
4834
4836
|
function Ql(t, n) {
|
|
4835
|
-
return
|
|
4837
|
+
return ha(t, n, (t, n) => X(t ** 2) + X(n ** 2));
|
|
4836
4838
|
}
|
|
4837
|
-
function Zl(t, n
|
|
4838
|
-
|
|
4839
|
+
function Zl(t, n) {
|
|
4840
|
+
return ha(t, n, (t, n) => X((t - n) ** 2));
|
|
4841
|
+
}
|
|
4842
|
+
function Jl(t, n = 0) {
|
|
4843
|
+
const e = ta(n);
|
|
4839
4844
|
if (0 === e) return Math.trunc(j(t));
|
|
4840
|
-
const r =
|
|
4845
|
+
const r = ea(e);
|
|
4841
4846
|
if (void 0 === r) return e > 0 ? t : 0;
|
|
4842
4847
|
if (e > 0) {
|
|
4843
4848
|
const n = j(j(t) * r);
|
|
@@ -4845,10 +4850,10 @@ function Zl(t, n = 0) {
|
|
|
4845
4850
|
}
|
|
4846
4851
|
return Math.trunc(j(t / r)) * r;
|
|
4847
4852
|
}
|
|
4848
|
-
var
|
|
4853
|
+
var ta = (t) => Math.trunc(t), na = 2147483646, ea = (t) => {
|
|
4849
4854
|
const n = Math.pow(10, Math.abs(t));
|
|
4850
4855
|
return Number.isFinite(n) ? n : void 0;
|
|
4851
|
-
},
|
|
4856
|
+
}, ra = [
|
|
4852
4857
|
"M",
|
|
4853
4858
|
"D",
|
|
4854
4859
|
"C",
|
|
@@ -4856,7 +4861,7 @@ var Jl = (t) => Math.trunc(t), ta = 2147483646, na = (t) => {
|
|
|
4856
4861
|
"X",
|
|
4857
4862
|
"V",
|
|
4858
4863
|
"I"
|
|
4859
|
-
],
|
|
4864
|
+
], oa = [
|
|
4860
4865
|
1e3,
|
|
4861
4866
|
500,
|
|
4862
4867
|
100,
|
|
@@ -4864,246 +4869,246 @@ var Jl = (t) => Math.trunc(t), ta = 2147483646, na = (t) => {
|
|
|
4864
4869
|
10,
|
|
4865
4870
|
5,
|
|
4866
4871
|
1
|
|
4867
|
-
],
|
|
4872
|
+
], ua = oa.length - 1, ia = Object.fromEntries(ra.map((t, n) => [t, oa[n]])), la = 255, aa = (t) => {
|
|
4868
4873
|
let n = t[0];
|
|
4869
4874
|
const e = t.length;
|
|
4870
4875
|
for (let r = 1; r < e; r++) n = X(n * t[r]);
|
|
4871
4876
|
return n;
|
|
4872
|
-
},
|
|
4877
|
+
}, sa = (t, n, e) => t.alignReduce(n, (t, n) => {
|
|
4873
4878
|
const r = n.length;
|
|
4874
4879
|
for (let e = 0; e < r; e++) if ("number" != typeof n[e]) return t;
|
|
4875
4880
|
return t + e(n);
|
|
4876
|
-
}, 0),
|
|
4881
|
+
}, 0), ca = (t) => {
|
|
4877
4882
|
if (y.getArgs().getRepeatingArgsAt(0).getKindAt(0) === O.Omitted) throw T.BuiltIn.NA;
|
|
4878
4883
|
if (0 === t.length) throw T.BuiltIn.Value;
|
|
4879
|
-
},
|
|
4884
|
+
}, fa = (t, n) => {
|
|
4880
4885
|
if (1 !== t.getRowCount() || 1 !== t.getColumnCount()) return;
|
|
4881
4886
|
if (y.getArgs().getKindAt(n) === O.Array) return;
|
|
4882
4887
|
const e = t.getValueAt(0, 0);
|
|
4883
4888
|
if (null === e) throw T.BuiltIn.Value;
|
|
4884
4889
|
if (T.isError(e)) throw e;
|
|
4885
|
-
},
|
|
4886
|
-
|
|
4890
|
+
}, ha = (t, n, e) => {
|
|
4891
|
+
fa(t, 0), fa(n, 1);
|
|
4887
4892
|
const r = t.getRowCount(), o = t.getColumnCount();
|
|
4888
4893
|
if (r * o !== n.getRowCount() * n.getColumnCount()) throw T.BuiltIn.NA;
|
|
4889
4894
|
r === n.getRowCount() && o === n.getColumnCount() || (n = n.reshape(r, o));
|
|
4890
|
-
for (const n of t.values(
|
|
4891
|
-
for (const t of n.values(
|
|
4895
|
+
for (const n of t.values(ma)) if (T.isError(n)) throw Oi(n);
|
|
4896
|
+
for (const t of n.values(ma)) if (T.isError(t)) throw Oi(t);
|
|
4892
4897
|
let u = 0;
|
|
4893
4898
|
const i = t.alignReduce([n], (t, n) => "number" != typeof n[0] || "number" != typeof n[1] ? t : (u++, t + e(n[0], n[1])), 0);
|
|
4894
4899
|
if (0 === u) throw T.BuiltIn.Div0;
|
|
4895
4900
|
return i;
|
|
4896
|
-
},
|
|
4897
|
-
ACOS: () =>
|
|
4901
|
+
}, ga = { onlyWhileFiltered: !0 }, ma = { axis: V.Axis.Row }, Na = 9007199254740992, Ia = U({
|
|
4902
|
+
ACOS: () => pa,
|
|
4898
4903
|
ACOSH: () => Ma,
|
|
4899
|
-
ACOT: () =>
|
|
4900
|
-
ACOTH: () =>
|
|
4901
|
-
ASIN: () =>
|
|
4902
|
-
ASINH: () =>
|
|
4903
|
-
ATAN: () =>
|
|
4904
|
-
ATAN2: () =>
|
|
4905
|
-
ATANH: () =>
|
|
4906
|
-
COS: () =>
|
|
4907
|
-
COSH: () =>
|
|
4908
|
-
COT: () =>
|
|
4909
|
-
COTH: () =>
|
|
4910
|
-
CSC: () =>
|
|
4911
|
-
CSCH: () =>
|
|
4912
|
-
SEC: () =>
|
|
4913
|
-
SECH: () =>
|
|
4914
|
-
SIN: () =>
|
|
4915
|
-
SINH: () =>
|
|
4916
|
-
TAN: () =>
|
|
4917
|
-
TANH: () =>
|
|
4904
|
+
ACOT: () => Aa,
|
|
4905
|
+
ACOTH: () => wa,
|
|
4906
|
+
ASIN: () => da,
|
|
4907
|
+
ASINH: () => Ea,
|
|
4908
|
+
ATAN: () => Ba,
|
|
4909
|
+
ATAN2: () => Ca,
|
|
4910
|
+
ATANH: () => Sa,
|
|
4911
|
+
COS: () => Ra,
|
|
4912
|
+
COSH: () => ba,
|
|
4913
|
+
COT: () => va,
|
|
4914
|
+
COTH: () => ya,
|
|
4915
|
+
CSC: () => Ta,
|
|
4916
|
+
CSCH: () => Va,
|
|
4917
|
+
SEC: () => xa,
|
|
4918
|
+
SECH: () => Da,
|
|
4919
|
+
SIN: () => Oa,
|
|
4920
|
+
SINH: () => Fa,
|
|
4921
|
+
TAN: () => Pa,
|
|
4922
|
+
TANH: () => La
|
|
4918
4923
|
});
|
|
4919
|
-
function
|
|
4924
|
+
function pa(t) {
|
|
4920
4925
|
return t > 1 || t < -1 ? NaN : Math.PI / 2 - Math.asin(t);
|
|
4921
4926
|
}
|
|
4922
4927
|
function Ma(t) {
|
|
4923
4928
|
return t < 1 ? NaN : Math.log(t + Math.sqrt(t * t - 1));
|
|
4924
4929
|
}
|
|
4925
|
-
function
|
|
4930
|
+
function Aa(t) {
|
|
4926
4931
|
const n = Math.atan(X(1 / t));
|
|
4927
4932
|
return t < 0 ? Math.PI + n : n;
|
|
4928
4933
|
}
|
|
4929
|
-
function
|
|
4934
|
+
function wa(t) {
|
|
4930
4935
|
return Math.abs(t) <= 1 ? NaN : Math.abs(t) <= 2 ? Math.log((t + 1) / (t - 1)) / 2 : G(X(1 / t));
|
|
4931
4936
|
}
|
|
4932
|
-
function
|
|
4937
|
+
function da(t) {
|
|
4933
4938
|
return t > 1 || t < -1 ? NaN : Math.asin(t);
|
|
4934
4939
|
}
|
|
4935
|
-
function
|
|
4940
|
+
function Ea(t) {
|
|
4936
4941
|
const n = Math.abs(t), e = Math.log(n + Math.sqrt(n * n + 1));
|
|
4937
4942
|
return t < 0 ? -e : e;
|
|
4938
4943
|
}
|
|
4939
|
-
function
|
|
4944
|
+
function Ba(t) {
|
|
4940
4945
|
return Math.atan(t);
|
|
4941
4946
|
}
|
|
4942
|
-
function
|
|
4947
|
+
function Ca(t, n) {
|
|
4943
4948
|
if (0 === n && 0 === t) throw T.BuiltIn.Div0;
|
|
4944
4949
|
const e = n / t;
|
|
4945
4950
|
if (0 !== t && !Number.isFinite(e)) return NaN;
|
|
4946
4951
|
const r = Math.atan(e);
|
|
4947
4952
|
return t >= 0 ? r : n >= 0 ? r + Math.PI : r - Math.PI;
|
|
4948
4953
|
}
|
|
4949
|
-
function Ca(t) {
|
|
4950
|
-
return Math.abs(t) >= 1 ? NaN : G(t);
|
|
4951
|
-
}
|
|
4952
4954
|
function Sa(t) {
|
|
4953
|
-
return Math.abs(t) >=
|
|
4955
|
+
return Math.abs(t) >= 1 ? NaN : G(t);
|
|
4954
4956
|
}
|
|
4955
4957
|
function Ra(t) {
|
|
4956
|
-
return
|
|
4958
|
+
return Math.abs(t) >= Te ? NaN : Le(t);
|
|
4957
4959
|
}
|
|
4958
4960
|
function ba(t) {
|
|
4959
|
-
|
|
4960
|
-
if (0 === t) throw T.BuiltIn.Div0;
|
|
4961
|
-
return 1 / Le(t);
|
|
4961
|
+
return Number.isFinite(Math.exp(Math.abs(t))) ? Math.cosh(t) : NaN;
|
|
4962
4962
|
}
|
|
4963
4963
|
function va(t) {
|
|
4964
|
+
if (Math.abs(t) >= Te) return NaN;
|
|
4964
4965
|
if (0 === t) throw T.BuiltIn.Div0;
|
|
4965
|
-
return
|
|
4966
|
+
return 1 / _e(t);
|
|
4966
4967
|
}
|
|
4967
4968
|
function ya(t) {
|
|
4968
|
-
if (Math.abs(t) >= ye) return NaN;
|
|
4969
4969
|
if (0 === t) throw T.BuiltIn.Div0;
|
|
4970
|
-
return 1 /
|
|
4970
|
+
return X(1 / Math.tanh(t));
|
|
4971
4971
|
}
|
|
4972
4972
|
function Ta(t) {
|
|
4973
|
+
if (Math.abs(t) >= Te) return NaN;
|
|
4973
4974
|
if (0 === t) throw T.BuiltIn.Div0;
|
|
4974
|
-
return
|
|
4975
|
+
return 1 / Pe(t);
|
|
4975
4976
|
}
|
|
4976
4977
|
function Va(t) {
|
|
4977
|
-
|
|
4978
|
+
if (0 === t) throw T.BuiltIn.Div0;
|
|
4979
|
+
return X(1 / Math.sinh(t));
|
|
4978
4980
|
}
|
|
4979
4981
|
function xa(t) {
|
|
4980
|
-
return
|
|
4982
|
+
return Math.abs(t) >= Te ? NaN : 1 / Le(t);
|
|
4981
4983
|
}
|
|
4982
4984
|
function Da(t) {
|
|
4983
|
-
return
|
|
4985
|
+
return X(1 / Math.cosh(t));
|
|
4984
4986
|
}
|
|
4985
4987
|
function Oa(t) {
|
|
4986
|
-
return
|
|
4988
|
+
return Math.abs(t) >= Te ? NaN : Pe(t);
|
|
4987
4989
|
}
|
|
4988
4990
|
function Fa(t) {
|
|
4989
|
-
return Math.abs(t)
|
|
4991
|
+
return Number.isFinite(Math.exp(Math.abs(t))) ? Math.sinh(t) : NaN;
|
|
4990
4992
|
}
|
|
4991
4993
|
function Pa(t) {
|
|
4992
|
-
return Math.
|
|
4994
|
+
return Math.abs(t) >= Te ? NaN : _e(t);
|
|
4993
4995
|
}
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
DIVIDE: () => Xa,
|
|
4997
|
-
EQ: () => ka,
|
|
4998
|
-
GT: () => Ha,
|
|
4999
|
-
GTE: () => Ga,
|
|
5000
|
-
ISBETWEEN: () => Ja,
|
|
5001
|
-
LT: () => ja,
|
|
5002
|
-
LTE: () => Ya,
|
|
5003
|
-
MINUS: () => qa,
|
|
5004
|
-
MULTIPLY: () => $a,
|
|
5005
|
-
NE: () => Ka,
|
|
5006
|
-
POW: () => za,
|
|
5007
|
-
UMINUS: () => Wa,
|
|
5008
|
-
UNARY_PERCENT: () => Qa,
|
|
5009
|
-
UPLUS: () => Za
|
|
5010
|
-
}), _a = (t) => t > -22250738585072014e-324 && t < 22250738585072014e-324 ? 0 : t;
|
|
5011
|
-
function Ua(t, n) {
|
|
5012
|
-
return t + n;
|
|
4996
|
+
function La(t) {
|
|
4997
|
+
return Math.tanh(t);
|
|
5013
4998
|
}
|
|
4999
|
+
var _a = U({
|
|
5000
|
+
ADD: () => Xa,
|
|
5001
|
+
DIVIDE: () => ka,
|
|
5002
|
+
EQ: () => Ha,
|
|
5003
|
+
GT: () => Ga,
|
|
5004
|
+
GTE: () => ja,
|
|
5005
|
+
ISBETWEEN: () => ts,
|
|
5006
|
+
LT: () => Ya,
|
|
5007
|
+
LTE: () => qa,
|
|
5008
|
+
MINUS: () => $a,
|
|
5009
|
+
MULTIPLY: () => Ka,
|
|
5010
|
+
NE: () => za,
|
|
5011
|
+
POW: () => Wa,
|
|
5012
|
+
UMINUS: () => Qa,
|
|
5013
|
+
UNARY_PERCENT: () => Za,
|
|
5014
|
+
UPLUS: () => Ja
|
|
5015
|
+
}), Ua = (t) => t > -22250738585072014e-324 && t < 22250738585072014e-324 ? 0 : t;
|
|
5014
5016
|
function Xa(t, n) {
|
|
5015
|
-
|
|
5016
|
-
return _a(t / n);
|
|
5017
|
+
return t + n;
|
|
5017
5018
|
}
|
|
5018
5019
|
function ka(t, n) {
|
|
5019
|
-
|
|
5020
|
+
if (0 === Ua(n)) throw T.BuiltIn.Div0;
|
|
5021
|
+
return Ua(t / n);
|
|
5020
5022
|
}
|
|
5021
5023
|
function Ha(t, n) {
|
|
5022
|
-
return y.compare(t, n)
|
|
5024
|
+
return 0 === y.compare(t, n);
|
|
5023
5025
|
}
|
|
5024
5026
|
function Ga(t, n) {
|
|
5025
|
-
return y.compare(t, n)
|
|
5027
|
+
return y.compare(t, n) > 0;
|
|
5026
5028
|
}
|
|
5027
5029
|
function ja(t, n) {
|
|
5028
|
-
return y.compare(t, n)
|
|
5030
|
+
return y.compare(t, n) >= 0;
|
|
5029
5031
|
}
|
|
5030
5032
|
function Ya(t, n) {
|
|
5031
|
-
return y.compare(t, n)
|
|
5033
|
+
return y.compare(t, n) < 0;
|
|
5032
5034
|
}
|
|
5033
5035
|
function qa(t, n) {
|
|
5034
|
-
return t
|
|
5036
|
+
return y.compare(t, n) <= 0;
|
|
5035
5037
|
}
|
|
5036
5038
|
function $a(t, n) {
|
|
5037
|
-
return
|
|
5039
|
+
return t - n;
|
|
5038
5040
|
}
|
|
5039
5041
|
function Ka(t, n) {
|
|
5040
|
-
return
|
|
5042
|
+
return Ua(t * n);
|
|
5041
5043
|
}
|
|
5042
5044
|
function za(t, n) {
|
|
5045
|
+
return 0 !== y.compare(t, n);
|
|
5046
|
+
}
|
|
5047
|
+
function Wa(t, n) {
|
|
5043
5048
|
if (0 === t) {
|
|
5044
5049
|
if (n < 0) throw T.BuiltIn.Div0;
|
|
5045
5050
|
if (0 === n) return NaN;
|
|
5046
5051
|
}
|
|
5047
5052
|
if (t < 0) {
|
|
5048
|
-
if (Number.isInteger(n) && Math.abs(n) <= 4294967294) return
|
|
5053
|
+
if (Number.isInteger(n) && Math.abs(n) <= 4294967294) return Ua(t ** n);
|
|
5049
5054
|
const e = Number((1 / n).toPrecision(15));
|
|
5050
|
-
return Number.isInteger(e) && 1 === Math.abs(e % 2) ?
|
|
5055
|
+
return Number.isInteger(e) && 1 === Math.abs(e % 2) ? Ua(-((-t) ** n)) : NaN;
|
|
5051
5056
|
}
|
|
5052
|
-
return
|
|
5053
|
-
}
|
|
5054
|
-
function Wa(t) {
|
|
5055
|
-
return -1 * t;
|
|
5057
|
+
return Ua(t ** n);
|
|
5056
5058
|
}
|
|
5057
5059
|
function Qa(t) {
|
|
5058
|
-
return
|
|
5060
|
+
return -1 * t;
|
|
5059
5061
|
}
|
|
5060
5062
|
function Za(t) {
|
|
5063
|
+
return ka(t, 100);
|
|
5064
|
+
}
|
|
5065
|
+
function Ja(t) {
|
|
5061
5066
|
return t;
|
|
5062
5067
|
}
|
|
5063
|
-
function
|
|
5068
|
+
function ts(t, n, e, r = !0, o = !0) {
|
|
5064
5069
|
return (r ? t >= n : t > n) && (o ? t <= e : t < e);
|
|
5065
5070
|
}
|
|
5066
|
-
var
|
|
5067
|
-
const u =
|
|
5071
|
+
var ns = (t) => !!t.isIReferenceRange, es = (t) => Object.freeze({ coerce: (n, e, r, o) => {
|
|
5072
|
+
const u = ns(o);
|
|
5068
5073
|
if (e === D.String) return u ? 0 : t;
|
|
5069
5074
|
if (e === D.Boolean) return u ? n ? 1 : 0 : null;
|
|
5070
5075
|
if (T.isError(n)) throw n;
|
|
5071
5076
|
return null;
|
|
5072
|
-
} }),
|
|
5077
|
+
} }), rs = es(null), os = es(0), us = (t, n) => {
|
|
5073
5078
|
if ("number" == typeof t) return t;
|
|
5074
5079
|
if ("boolean" == typeof t) return n ? t ? 1 : 0 : null;
|
|
5075
5080
|
if ("string" == typeof t) return n ? 0 : null;
|
|
5076
5081
|
if (T.isError(t)) throw t;
|
|
5077
5082
|
return null;
|
|
5078
|
-
},
|
|
5079
|
-
AVEDEV: () =>
|
|
5080
|
-
AVERAGE: () =>
|
|
5081
|
-
AVERAGEA: () =>
|
|
5082
|
-
AVERAGEIF: () =>
|
|
5083
|
-
AVERAGEIFS: () =>
|
|
5084
|
-
AVERAGE_WEIGHTED: () =>
|
|
5085
|
-
COUNT: () =>
|
|
5086
|
-
COUNTA: () =>
|
|
5087
|
-
COUNTBLANK: () =>
|
|
5088
|
-
COUNTIF: () =>
|
|
5089
|
-
COUNTIFS: () =>
|
|
5083
|
+
}, is = U({
|
|
5084
|
+
AVEDEV: () => ls,
|
|
5085
|
+
AVERAGE: () => as,
|
|
5086
|
+
AVERAGEA: () => ss,
|
|
5087
|
+
AVERAGEIF: () => cs,
|
|
5088
|
+
AVERAGEIFS: () => fs,
|
|
5089
|
+
AVERAGE_WEIGHTED: () => hs,
|
|
5090
|
+
COUNT: () => gs,
|
|
5091
|
+
COUNTA: () => ms,
|
|
5092
|
+
COUNTBLANK: () => Ns,
|
|
5093
|
+
COUNTIF: () => Is,
|
|
5094
|
+
COUNTIFS: () => ps,
|
|
5090
5095
|
COUNTUNIQUE: () => Ms,
|
|
5091
|
-
COUNTUNIQUEIFS: () =>
|
|
5092
|
-
LARGE: () =>
|
|
5093
|
-
MAX: () =>
|
|
5094
|
-
MAXA: () =>
|
|
5095
|
-
MAXIF: () =>
|
|
5096
|
-
MAXIFS: () =>
|
|
5097
|
-
MEDIAN: () =>
|
|
5098
|
-
MIN: () =>
|
|
5099
|
-
MINA: () =>
|
|
5100
|
-
MINIF: () =>
|
|
5101
|
-
MINIFS: () =>
|
|
5102
|
-
PERMUT: () =>
|
|
5103
|
-
PERMUTATIONA: () =>
|
|
5104
|
-
SMALL: () =>
|
|
5096
|
+
COUNTUNIQUEIFS: () => As,
|
|
5097
|
+
LARGE: () => ws,
|
|
5098
|
+
MAX: () => ds,
|
|
5099
|
+
MAXA: () => Es,
|
|
5100
|
+
MAXIF: () => Bs,
|
|
5101
|
+
MAXIFS: () => Cs,
|
|
5102
|
+
MEDIAN: () => Ss,
|
|
5103
|
+
MIN: () => Rs,
|
|
5104
|
+
MINA: () => bs,
|
|
5105
|
+
MINIF: () => vs,
|
|
5106
|
+
MINIFS: () => ys,
|
|
5107
|
+
PERMUT: () => Ts,
|
|
5108
|
+
PERMUTATIONA: () => Vs,
|
|
5109
|
+
SMALL: () => xs
|
|
5105
5110
|
});
|
|
5106
|
-
function
|
|
5111
|
+
function ls(t) {
|
|
5107
5112
|
let n = 0;
|
|
5108
5113
|
const e = [];
|
|
5109
5114
|
for (const r of t) for (const t of r.values()) n += t, e.push(t);
|
|
@@ -5114,21 +5119,21 @@ function is(t) {
|
|
|
5114
5119
|
for (let t = 0; t < r; t++) n += Math.abs(e[t] - o);
|
|
5115
5120
|
return n / r;
|
|
5116
5121
|
}
|
|
5117
|
-
function ls(t) {
|
|
5118
|
-
return Os(t);
|
|
5119
|
-
}
|
|
5120
5122
|
function as(t) {
|
|
5121
|
-
return
|
|
5123
|
+
return Fs(t);
|
|
5122
5124
|
}
|
|
5123
|
-
function ss(t
|
|
5124
|
-
|
|
5125
|
+
function ss(t) {
|
|
5126
|
+
return Fs(t, os);
|
|
5127
|
+
}
|
|
5128
|
+
function cs(t, n, e) {
|
|
5129
|
+
const r = ko(t, n, e, (t, n) => "number" != typeof n ? t : t + 1, Go), o = ko(t, n, e, Di((t, n) => (null === t && (t = 0), "number" != typeof n ? t : t + n)), Go);
|
|
5125
5130
|
return T.isError(o) ? o : r ? o / r : T.BuiltIn.Div0;
|
|
5126
5131
|
}
|
|
5127
|
-
function
|
|
5128
|
-
const e =
|
|
5132
|
+
function fs(t, n) {
|
|
5133
|
+
const e = xi(y, n, Di((t, n) => "number" != typeof n ? t : null === t ? n : t + n), t, null, Go), r = xi(y, n, (t, n) => "number" != typeof n ? t : null === t ? 1 : t + 1, t, 0, Go);
|
|
5129
5134
|
return T.isError(e) ? e : 0 === r || null === r ? T.BuiltIn.Div0 : e / r;
|
|
5130
5135
|
}
|
|
5131
|
-
function
|
|
5136
|
+
function hs(t) {
|
|
5132
5137
|
let n = 0, e = 0;
|
|
5133
5138
|
const r = t.length;
|
|
5134
5139
|
for (let o = 0; o < r; o++) {
|
|
@@ -5144,12 +5149,12 @@ function fs(t) {
|
|
|
5144
5149
|
if (0 === e) throw T.BuiltIn.Div0;
|
|
5145
5150
|
return n / e;
|
|
5146
5151
|
}
|
|
5147
|
-
function
|
|
5152
|
+
function gs(t) {
|
|
5148
5153
|
let n = 0;
|
|
5149
5154
|
for (const e of t) T.isError(e) || (n += e.getStats().getAggregates().numericalCount ?? 0);
|
|
5150
5155
|
return n;
|
|
5151
5156
|
}
|
|
5152
|
-
function
|
|
5157
|
+
function ms(t) {
|
|
5153
5158
|
const n = y.getArgs().getRepeatingArgsAt(0);
|
|
5154
5159
|
let e = 0;
|
|
5155
5160
|
for (let r = 0; r < t.length; r++) {
|
|
@@ -5162,28 +5167,28 @@ function gs(t) {
|
|
|
5162
5167
|
}
|
|
5163
5168
|
return e;
|
|
5164
5169
|
}
|
|
5165
|
-
function
|
|
5170
|
+
function Ns(t) {
|
|
5166
5171
|
if (y.getArgs().getAreaCountAt(0) > 1) return T.BuiltIn.Value;
|
|
5167
5172
|
let n = 0;
|
|
5168
5173
|
for (const { value: e } of t.entries({ includeEmpty: !1 })) "" !== e && n++;
|
|
5169
5174
|
return t.getColumnCount() * t.getRowCount() - n;
|
|
5170
5175
|
}
|
|
5171
|
-
function
|
|
5172
|
-
return
|
|
5176
|
+
function Is(t, n) {
|
|
5177
|
+
return ko(t, n, void 0, (t) => null === t ? 1 : t + 1, Ho);
|
|
5173
5178
|
}
|
|
5174
|
-
function
|
|
5175
|
-
return
|
|
5179
|
+
function ps(t) {
|
|
5180
|
+
return xi(y, t, (t) => null === t ? 1 : t + 1, void 0, 0, Ho);
|
|
5176
5181
|
}
|
|
5177
5182
|
function Ms(t) {
|
|
5178
5183
|
const n = /* @__PURE__ */ new Set(), e = t.length;
|
|
5179
5184
|
for (let r = 0; r < e; r++) {
|
|
5180
5185
|
const e = t[r];
|
|
5181
|
-
if (T.isError(e)) n.add(
|
|
5182
|
-
else for (const t of e.values()) n.add(
|
|
5186
|
+
if (T.isError(e)) n.add(Ds(e));
|
|
5187
|
+
else for (const t of e.values()) n.add(Ds(t));
|
|
5183
5188
|
}
|
|
5184
5189
|
return n.size;
|
|
5185
5190
|
}
|
|
5186
|
-
function
|
|
5191
|
+
function As(t, n) {
|
|
5187
5192
|
const e = t.getRowCount(), r = t.getColumnCount(), o = n.length, u = new Array(o), i = new Array(o);
|
|
5188
5193
|
for (let t = 0; t < o; t++) {
|
|
5189
5194
|
const o = n[t][0];
|
|
@@ -5195,26 +5200,26 @@ function ps(t, n) {
|
|
|
5195
5200
|
const e = n[0];
|
|
5196
5201
|
if (null === e) return t;
|
|
5197
5202
|
for (let e = 0; e < o; e++) if (!i[e](n[e + 1])) return t;
|
|
5198
|
-
return l.add(
|
|
5203
|
+
return l.add(Ds(e)), t;
|
|
5199
5204
|
}, null), l.size;
|
|
5200
5205
|
}
|
|
5201
|
-
function
|
|
5206
|
+
function ws(t, n) {
|
|
5202
5207
|
const e = y.flattenAreas(t).getStats().getSortedNumbers().getLarge(n);
|
|
5203
5208
|
return null === e ? NaN : e;
|
|
5204
5209
|
}
|
|
5205
|
-
function ws(t) {
|
|
5206
|
-
return Ds(t, !0);
|
|
5207
|
-
}
|
|
5208
5210
|
function ds(t) {
|
|
5209
|
-
return
|
|
5211
|
+
return Os(t, !0);
|
|
5210
5212
|
}
|
|
5211
|
-
function Es(t
|
|
5212
|
-
return
|
|
5213
|
+
function Es(t) {
|
|
5214
|
+
return Os(t, !0, rs);
|
|
5213
5215
|
}
|
|
5214
|
-
function Bs(t, n) {
|
|
5215
|
-
return
|
|
5216
|
+
function Bs(t, n, e) {
|
|
5217
|
+
return ko(t, n, e, Di((t, n) => "number" != typeof n ? t ?? 0 : null === t ? n : Math.max(t, n)), Go);
|
|
5216
5218
|
}
|
|
5217
|
-
function Cs(t) {
|
|
5219
|
+
function Cs(t, n) {
|
|
5220
|
+
return xi(y, n, Di((t, n) => "number" != typeof n ? t : null === t ? n : Math.max(t, n)), t, 0, Go);
|
|
5221
|
+
}
|
|
5222
|
+
function Ss(t) {
|
|
5218
5223
|
const n = [];
|
|
5219
5224
|
for (const e of t) for (const t of e.values()) n.push(t);
|
|
5220
5225
|
if (0 === n.length) return NaN;
|
|
@@ -5226,37 +5231,37 @@ function Cs(t) {
|
|
|
5226
5231
|
}
|
|
5227
5232
|
return n[Math.floor(e / 2)];
|
|
5228
5233
|
}
|
|
5229
|
-
function Ss(t) {
|
|
5230
|
-
return Ds(t, !1);
|
|
5231
|
-
}
|
|
5232
5234
|
function Rs(t) {
|
|
5233
|
-
return
|
|
5235
|
+
return Os(t, !1);
|
|
5234
5236
|
}
|
|
5235
|
-
function bs(t
|
|
5236
|
-
return
|
|
5237
|
+
function bs(t) {
|
|
5238
|
+
return Os(t, !1, rs);
|
|
5237
5239
|
}
|
|
5238
|
-
function vs(t, n) {
|
|
5239
|
-
return
|
|
5240
|
+
function vs(t, n, e) {
|
|
5241
|
+
return ko(t, n, e, Di((t, n) => "number" != typeof n ? t ?? 0 : null === t ? n : Math.min(t, n)), Go);
|
|
5240
5242
|
}
|
|
5241
5243
|
function ys(t, n) {
|
|
5244
|
+
return xi(y, n, Di((t, n) => "number" != typeof n ? t : null === t ? n : Math.min(t, n)), t, 0, Go);
|
|
5245
|
+
}
|
|
5246
|
+
function Ts(t, n) {
|
|
5242
5247
|
if (t = Math.trunc(t), n = Math.trunc(n), t < 0 || n < 0 || n > t) return NaN;
|
|
5243
5248
|
if (t > 2147483646) return NaN;
|
|
5244
5249
|
let e = 1;
|
|
5245
5250
|
for (let r = t; r > t - n; r--) if (e *= r, !Number.isFinite(e)) return NaN;
|
|
5246
5251
|
return e;
|
|
5247
5252
|
}
|
|
5248
|
-
function
|
|
5253
|
+
function Vs(t, n) {
|
|
5249
5254
|
return t = Math.trunc(t), n = Math.trunc(n), t < 0 || n < 0 || t > 2147483646 || n > 2147483646 ? NaN : Math.pow(t, n);
|
|
5250
5255
|
}
|
|
5251
|
-
function
|
|
5256
|
+
function xs(t, n) {
|
|
5252
5257
|
const e = (t = y.flattenAreas(t)).getStats().getSortedNumbers().getSmall(n);
|
|
5253
5258
|
return null === e ? NaN : e;
|
|
5254
5259
|
}
|
|
5255
|
-
var
|
|
5260
|
+
var Ds = (t) => {
|
|
5256
5261
|
if (null === t) return "\0";
|
|
5257
5262
|
const n = typeof t;
|
|
5258
5263
|
return "number" === n ? "" + t.toString() : "string" === n ? "" + t : "boolean" === n ? "" + (t ? "1" : "0") : T.isError(t) ? "" + t.getCode() : "" + String(t);
|
|
5259
|
-
},
|
|
5264
|
+
}, Os = (t, n, e) => {
|
|
5260
5265
|
let r = 0, o = !1;
|
|
5261
5266
|
for (const u of t) {
|
|
5262
5267
|
const t = u.getStats(e).getAggregates();
|
|
@@ -5265,7 +5270,7 @@ var xs = (t) => {
|
|
|
5265
5270
|
r = o ? n ? Math.max(r, i) : Math.min(r, i) : i, o = !0;
|
|
5266
5271
|
}
|
|
5267
5272
|
return o ? r : 0;
|
|
5268
|
-
},
|
|
5273
|
+
}, Fs = (t, n) => {
|
|
5269
5274
|
let e = 0, r = 0, o = null;
|
|
5270
5275
|
for (const u of t) {
|
|
5271
5276
|
const t = u.getStats(n), i = t.getAggregates();
|
|
@@ -5273,63 +5278,55 @@ var xs = (t) => {
|
|
|
5273
5278
|
}
|
|
5274
5279
|
if (0 === r) throw T.BuiltIn.Div0;
|
|
5275
5280
|
return (o ? o.getSnappedSum(e) : e) / r;
|
|
5276
|
-
},
|
|
5277
|
-
function
|
|
5281
|
+
}, Ps = (t, n, e) => Math.exp(-.5 * Math.log(2 * Math.PI) - Math.log(e) - Math.pow(t - n, 2) / (2 * e * e)), Ls = (t, n, e) => .5 * fe(-(t - n) / Math.sqrt(2 * e * e)), _s = (t, n, e) => -1.4142135623730951 * e * he(2 * t) + n;
|
|
5282
|
+
function Us(t, n, e) {
|
|
5278
5283
|
return t < 0 ? 0 : 0 === t && 1 === n ? 1 / e : n >= 30 ? Math.exp(function(t, n) {
|
|
5279
5284
|
const e = n / t - 1;
|
|
5280
|
-
return -t * e * e * (1 +
|
|
5281
|
-
}(n, t / e)) / e : Math.exp((n - 1) * Math.log(t) - t / e -
|
|
5285
|
+
return -t * e * e * (1 + Ne(e) * e) / 2 - Math.log1p(e) - .5 * Math.log(t) - .5 * Math.log(2 * Math.PI) - ie(t);
|
|
5286
|
+
}(n, t / e)) / e : Math.exp((n - 1) * Math.log(t) - t / e - ee(n) - n * Math.log(e));
|
|
5282
5287
|
}
|
|
5283
|
-
function
|
|
5284
|
-
return t < 0 ? 1 : ((t, n) =>
|
|
5288
|
+
function Xs(t, n) {
|
|
5289
|
+
return t < 0 ? 1 : ((t, n) => Ie(t, n, !0))(n / 2, t / 2);
|
|
5285
5290
|
}
|
|
5286
|
-
var
|
|
5287
|
-
function
|
|
5291
|
+
var ks = (t, n) => 2 * pe(t, .5 * n);
|
|
5292
|
+
function Hs(t, n, e) {
|
|
5288
5293
|
if (t < 0) return 0;
|
|
5289
5294
|
const r = n * t + e;
|
|
5290
|
-
return
|
|
5295
|
+
return we(n * t / r, e / r, n / 2, e / 2);
|
|
5291
5296
|
}
|
|
5292
|
-
var
|
|
5293
|
-
function
|
|
5297
|
+
var Gs = (t, n, e) => e / (n * (1 / Ee(t, n / 2, e / 2) - 1));
|
|
5298
|
+
function js(t, n) {
|
|
5294
5299
|
if (!Number.isFinite(t * t)) return NaN;
|
|
5295
|
-
const e = .5 *
|
|
5300
|
+
const e = .5 * Ys(t, n);
|
|
5296
5301
|
return t > 0 ? e : 1 - e;
|
|
5297
5302
|
}
|
|
5298
|
-
function
|
|
5303
|
+
function Ys(t, n) {
|
|
5299
5304
|
const e = n + t * t;
|
|
5300
|
-
return
|
|
5305
|
+
return we(n / e, t * t / e, n / 2, .5);
|
|
5301
5306
|
}
|
|
5302
|
-
function
|
|
5303
|
-
let e =
|
|
5307
|
+
function qs(t, n) {
|
|
5308
|
+
let e = Ee(2 * Math.min(t, 1 - t), .5 * n, .5);
|
|
5304
5309
|
return e = Math.sqrt(n * (1 - e) / e), t > .5 ? e : -e;
|
|
5305
5310
|
}
|
|
5306
|
-
var
|
|
5307
|
-
function
|
|
5311
|
+
var $s = 1e5;
|
|
5312
|
+
function Ks(t, n) {
|
|
5308
5313
|
if (n < 0 || t % 1 != 0 || t < 0) return 0;
|
|
5309
|
-
const e = t <= 170 ? Math.pow(n, t) * Math.exp(-n) /
|
|
5310
|
-
return Number.isFinite(e) ? e : 0 === n ? 0 === t ? 1 : 0 : Math.exp(t * Math.log(n) - n -
|
|
5314
|
+
const e = t <= 170 ? Math.pow(n, t) * Math.exp(-n) / Pi(t) : 1 / 0;
|
|
5315
|
+
return Number.isFinite(e) ? e : 0 === n ? 0 === t ? 1 : 0 : Math.exp(t * Math.log(n) - n - ee(t + 1));
|
|
5311
5316
|
}
|
|
5312
|
-
var
|
|
5317
|
+
var zs = (t, n, e) => {
|
|
5313
5318
|
if (0 === e || 1 === e) return n * e === t ? 1 : 0;
|
|
5314
|
-
const r =
|
|
5315
|
-
return Number.isFinite(r) ? r : Math.exp(
|
|
5319
|
+
const r = Li(n, t) * Math.pow(e, t) * Math.pow(1 - e, n - t);
|
|
5320
|
+
return Number.isFinite(r) ? r : Math.exp(ee(n + 1) - ee(t + 1) - ee(n - t + 1) + t * Math.log(e) + (n - t) * Math.log(1 - e));
|
|
5316
5321
|
};
|
|
5317
|
-
function zs(t, n, e) {
|
|
5318
|
-
let r;
|
|
5319
|
-
const o = 1e-10;
|
|
5320
|
-
if (t < 0) return 0;
|
|
5321
|
-
if (t >= n) return 1;
|
|
5322
|
-
if (e < 0 || e > 1 || n <= 0) return NaN;
|
|
5323
|
-
const u = e, i = (t = Math.floor(t)) + 1, l = n - t, a = i + l, s = Math.exp(ne(a) - ne(l) - ne(i) + i * Math.log(u) + l * Math.log(1 - u));
|
|
5324
|
-
return r = u < (i + 1) / (a + 2) ? s * Qs(u, i, l, o) : 1 - s * Qs(1 - u, l, i, o), Math.round(1 / o * (1 - r)) / (1 / o);
|
|
5325
|
-
}
|
|
5326
5322
|
function Ws(t, n, e) {
|
|
5327
|
-
return t
|
|
5323
|
+
return t < 0 ? 0 : t >= n ? 1 : e < 0 || e > 1 || n <= 0 ? NaN : 0 === e ? 1 : 1 === e ? 0 : we(1 - e, e, n - (t = Math.floor(t)), t + 1);
|
|
5328
5324
|
}
|
|
5329
|
-
function Qs(t, n, e
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5325
|
+
function Qs(t, n, e) {
|
|
5326
|
+
if (t !== t >>> 0) return 0;
|
|
5327
|
+
if (t < 0) return 0;
|
|
5328
|
+
const r = Li(t + n - 1, n - 1) * Math.pow(1 - e, t) * Math.pow(e, n);
|
|
5329
|
+
return Number.isFinite(r) ? r : Math.exp(ee(t + n) - ee(t + 1) - ee(n) + t * Math.log1p(-e) + n * Math.log(e));
|
|
5333
5330
|
}
|
|
5334
5331
|
var Zs = U({
|
|
5335
5332
|
BETADIST: () => lc,
|
|
@@ -5343,8 +5340,8 @@ var Zs = U({
|
|
|
5343
5340
|
CHIDIST: () => Ic,
|
|
5344
5341
|
CHIINV: () => Ac,
|
|
5345
5342
|
CHISQ_DIST: () => Nc,
|
|
5346
|
-
CHISQ_DIST_RT: () =>
|
|
5347
|
-
CHISQ_INV: () =>
|
|
5343
|
+
CHISQ_DIST_RT: () => pc,
|
|
5344
|
+
CHISQ_INV: () => Mc,
|
|
5348
5345
|
CHISQ_INV_RT: () => wc,
|
|
5349
5346
|
CHISQ_TEST: () => dc,
|
|
5350
5347
|
CHITEST: () => Ec,
|
|
@@ -5393,8 +5390,8 @@ var Zs = U({
|
|
|
5393
5390
|
MODE: () => gf,
|
|
5394
5391
|
MODE_MULT: () => Nf,
|
|
5395
5392
|
MODE_SNGL: () => If,
|
|
5396
|
-
NEGBINOMDIST: () =>
|
|
5397
|
-
NEGBINOM_DIST: () =>
|
|
5393
|
+
NEGBINOMDIST: () => Mf,
|
|
5394
|
+
NEGBINOM_DIST: () => pf,
|
|
5398
5395
|
NORMDIST: () => wf,
|
|
5399
5396
|
NORMINV: () => Ef,
|
|
5400
5397
|
NORMSDIST: () => Cf,
|
|
@@ -5443,11 +5440,11 @@ var Zs = U({
|
|
|
5443
5440
|
VAR: () => mh,
|
|
5444
5441
|
VARA: () => Ih,
|
|
5445
5442
|
VARP: () => hh,
|
|
5446
|
-
VARPA: () =>
|
|
5443
|
+
VARPA: () => ph,
|
|
5447
5444
|
VAR_P: () => fh,
|
|
5448
5445
|
VAR_S: () => gh,
|
|
5449
5446
|
WEIBULL: () => Ah,
|
|
5450
|
-
WEIBULL_DIST: () =>
|
|
5447
|
+
WEIBULL_DIST: () => Mh,
|
|
5451
5448
|
ZTEST: () => dh,
|
|
5452
5449
|
Z_TEST: () => wh
|
|
5453
5450
|
}), Js = 1e10, tc = 22250738585072014e-324, nc = (t) => ((t) => {
|
|
@@ -5465,28 +5462,28 @@ var Zs = U({
|
|
|
5465
5462
|
}, oc = 2 ** -22, uc = (t, n, e) => {
|
|
5466
5463
|
let r = 0, o = Math.floor(t);
|
|
5467
5464
|
for (; r < o;) {
|
|
5468
|
-
const u = r + Math.floor((o - r) / 2), i =
|
|
5465
|
+
const u = r + Math.floor((o - r) / 2), i = Ws(u, t, n) > e, l = i ? r : u + 1, a = i ? u : o;
|
|
5469
5466
|
if (l === r && a === o) break;
|
|
5470
5467
|
r = l, o = a;
|
|
5471
5468
|
}
|
|
5472
|
-
return
|
|
5469
|
+
return Ws(r, t, n) > e ? r : NaN;
|
|
5473
5470
|
};
|
|
5474
5471
|
function ic(t, n, e, r, o = 0, u = 1) {
|
|
5475
|
-
return n <= 0 || e <= 0 || t < o || t > u || o === u ? NaN : (t = (t - o) / (u - o), r ? ((t, n, e) => t > 1 || t < 0 ? t > 1 ? 1 : 0 :
|
|
5476
|
-
return t > 1 || t < 0 ? 0 : 1 === n && 1 === e ? 1 : n < 512 && e < 512 ? Math.pow(t, n - 1) * Math.pow(1 - t, e - 1) /
|
|
5472
|
+
return n <= 0 || e <= 0 || t < o || t > u || o === u ? NaN : (t = (t - o) / (u - o), r ? ((t, n, e) => t > 1 || t < 0 ? t > 1 ? 1 : 0 : Ae(t, n, e))(t, n, e) : function(t, n, e) {
|
|
5473
|
+
return t > 1 || t < 0 ? 0 : 1 === n && 1 === e ? 1 : n < 512 && e < 512 ? Math.pow(t, n - 1) * Math.pow(1 - t, e - 1) / oe(n, e) : Math.exp((n - 1) * Math.log(t) + (e - 1) * Math.log(1 - t) - le(n, e));
|
|
5477
5474
|
}(t, n, e) / (u - o));
|
|
5478
5475
|
}
|
|
5479
5476
|
function lc(t, n, e, r = 0, o = 1) {
|
|
5480
5477
|
return ic(t, n, e, !0, r, o);
|
|
5481
5478
|
}
|
|
5482
5479
|
function ac(t, n, e, r = 0, o = 1) {
|
|
5483
|
-
return n <= 0 || e <= 0 || t <= 0 || t >= 1 || r >= o ? NaN : ((t, n, e) =>
|
|
5480
|
+
return n <= 0 || e <= 0 || t <= 0 || t >= 1 || r >= o ? NaN : ((t, n, e) => Ee(t, n, e))(t, n, e) * (o - r) + r;
|
|
5484
5481
|
}
|
|
5485
5482
|
function sc(t, n, e, r = 0, o = 1) {
|
|
5486
5483
|
return ac(t, n, e, r, o);
|
|
5487
5484
|
}
|
|
5488
5485
|
function cc(t, n, e, r) {
|
|
5489
|
-
return t = Math.trunc(t), (n = Math.trunc(n)) < 0 || e < 0 || e > 1 || t < 0 || t > n || n > 2147483646 ? NaN : r ?
|
|
5486
|
+
return t = Math.trunc(t), (n = Math.trunc(n)) < 0 || e < 0 || e > 1 || t < 0 || t > n || n > 2147483646 ? NaN : r ? Ws(t, n, e) : zs(t, n, e);
|
|
5490
5487
|
}
|
|
5491
5488
|
function fc(t, n, e, r) {
|
|
5492
5489
|
return cc(t, n, e, r);
|
|
@@ -5494,9 +5491,9 @@ function fc(t, n, e, r) {
|
|
|
5494
5491
|
function hc(t, n, e, r = e) {
|
|
5495
5492
|
if (t = Math.trunc(t), e = Math.trunc(e), r = Math.trunc(r), t < 0 || n < 0 || n > 1 || e < 0 || e > t || r < e || r > t) return NaN;
|
|
5496
5493
|
if (t > 2147483646) return NaN;
|
|
5497
|
-
if (r - e > gc) return
|
|
5494
|
+
if (r - e > gc) return Ws(r, t, n) - (e > 0 ? Ws(e - 1, t, n) : 0);
|
|
5498
5495
|
let o = 0;
|
|
5499
|
-
for (let u = e; u <= r; u++) o +=
|
|
5496
|
+
for (let u = e; u <= r; u++) o += zs(u, t, n);
|
|
5500
5497
|
return o;
|
|
5501
5498
|
}
|
|
5502
5499
|
var gc = 1e5;
|
|
@@ -5505,33 +5502,33 @@ function mc(t, n, e) {
|
|
|
5505
5502
|
}
|
|
5506
5503
|
function Nc(t, n, e) {
|
|
5507
5504
|
return n = Math.trunc(n), t < 0 || n < 1 || n > Js ? NaN : e ? function(t, n) {
|
|
5508
|
-
return t < 0 ? 0 :
|
|
5505
|
+
return t < 0 ? 0 : ge(n / 2, t / 2);
|
|
5509
5506
|
}(t, n) : function(t, n) {
|
|
5510
|
-
return t < 0 ? 0 : 0 === t && 2 === n ? .5 : Math.exp((n / 2 - 1) * Math.log(t) - t / 2 - n / 2 * Math.log(2) -
|
|
5507
|
+
return t < 0 ? 0 : 0 === t && 2 === n ? .5 : Math.exp((n / 2 - 1) * Math.log(t) - t / 2 - n / 2 * Math.log(2) - ee(n / 2));
|
|
5511
5508
|
}(t, n);
|
|
5512
5509
|
}
|
|
5513
5510
|
function Ic(t, n) {
|
|
5514
|
-
return
|
|
5515
|
-
}
|
|
5516
|
-
function Mc(t, n) {
|
|
5517
|
-
return n = Math.trunc(n), t < 0 || n < 1 || n > Js ? NaN : Us(t, n);
|
|
5511
|
+
return pc(t, n);
|
|
5518
5512
|
}
|
|
5519
5513
|
function pc(t, n) {
|
|
5520
|
-
return n = Math.trunc(n), t < 0 ||
|
|
5514
|
+
return n = Math.trunc(n), t < 0 || n < 1 || n > Js ? NaN : Xs(t, n);
|
|
5515
|
+
}
|
|
5516
|
+
function Mc(t, n) {
|
|
5517
|
+
return n = Math.trunc(n), t < 0 || t >= 1 || n < 1 || n > Js ? NaN : ks(t, n);
|
|
5521
5518
|
}
|
|
5522
5519
|
function Ac(t, n) {
|
|
5523
5520
|
return wc(t, n);
|
|
5524
5521
|
}
|
|
5525
5522
|
function wc(t, n) {
|
|
5526
|
-
return n = Math.trunc(n), t <= 0 || t > 1 || n < 1 || n > Js ? NaN :
|
|
5523
|
+
return n = Math.trunc(n), t <= 0 || t > 1 || n < 1 || n > Js ? NaN : ks(1 - t, n);
|
|
5527
5524
|
}
|
|
5528
5525
|
function dc(t, n) {
|
|
5529
5526
|
const e = Bh(t) ?? Bh(n);
|
|
5530
5527
|
if (e) return e;
|
|
5531
5528
|
const r = t.getRowCount(), o = t.getColumnCount();
|
|
5532
5529
|
if (r * o !== n.getRowCount() * n.getColumnCount()) throw T.BuiltIn.NA;
|
|
5533
|
-
if (t.hasError()) return
|
|
5534
|
-
if (n.hasError()) return
|
|
5530
|
+
if (t.hasError()) return Fi(t);
|
|
5531
|
+
if (n.hasError()) return Fi(n);
|
|
5535
5532
|
if (1 === r && 1 === o) throw T.BuiltIn.NA;
|
|
5536
5533
|
let u;
|
|
5537
5534
|
n.getRowCount() === r && n.getColumnCount() === o || (n = n.reshape(r, o)), u = 1 === r ? o - 1 : 1 === o ? r - 1 : (r - 1) * (o - 1);
|
|
@@ -5543,14 +5540,14 @@ function dc(t, n) {
|
|
|
5543
5540
|
i += (t - n) ** 2 / n, l++;
|
|
5544
5541
|
}
|
|
5545
5542
|
}
|
|
5546
|
-
return 0 === l ? T.BuiltIn.Div0 : Number.isFinite(i) ?
|
|
5543
|
+
return 0 === l ? T.BuiltIn.Div0 : Number.isFinite(i) ? pc(i, u) : T.BuiltIn.Num;
|
|
5547
5544
|
}
|
|
5548
5545
|
function Ec(t, n) {
|
|
5549
5546
|
return dc(t, n);
|
|
5550
5547
|
}
|
|
5551
5548
|
function Bc(t, n, e) {
|
|
5552
5549
|
return e = Math.trunc(e), t <= 0 || t >= 1 || n <= 0 || e < 1 || 1 - t / 2 == 1 ? NaN : function(t, n, e) {
|
|
5553
|
-
return 1 + Math.abs(
|
|
5550
|
+
return 1 + Math.abs(_s(t / 2, 0, 1) * n / Math.sqrt(e)) - 1;
|
|
5554
5551
|
}(t, n, e);
|
|
5555
5552
|
}
|
|
5556
5553
|
function Cc(t, n, e) {
|
|
@@ -5560,7 +5557,7 @@ function Sc(t, n, e) {
|
|
|
5560
5557
|
if (e = Math.trunc(e), t <= 0 || t >= 1 || n <= 0 || e < 1) return NaN;
|
|
5561
5558
|
if (1 === e) throw T.BuiltIn.Div0;
|
|
5562
5559
|
return e - 1 > Js || t / 2 < tc ? NaN : function(t, n, e) {
|
|
5563
|
-
return 1 + Math.abs(
|
|
5560
|
+
return 1 + Math.abs(qs(t / 2, e - 1) * n / Math.sqrt(e)) - 1;
|
|
5564
5561
|
}(t, n, e);
|
|
5565
5562
|
}
|
|
5566
5563
|
function Rc(t, n) {
|
|
@@ -5598,8 +5595,8 @@ function Dc(t, n, e) {
|
|
|
5598
5595
|
return xc(t, n, e);
|
|
5599
5596
|
}
|
|
5600
5597
|
function Oc(t, n, e, r) {
|
|
5601
|
-
return t < 0 || n < 1 || e < 1 ? NaN : (n = Math.trunc(n), e = Math.trunc(e), n > Js || e > Js ? NaN : r ?
|
|
5602
|
-
return t < 0 ? 0 : 0 === t && n < 2 ? 1 / 0 : 0 === t && 2 === n ? 1 : n < 512 && e < 512 ? 1 /
|
|
5598
|
+
return t < 0 || n < 1 || e < 1 ? NaN : (n = Math.trunc(n), e = Math.trunc(e), n > Js || e > Js ? NaN : r ? Hs(t, n, e) : function(t, n, e) {
|
|
5599
|
+
return t < 0 ? 0 : 0 === t && n < 2 ? 1 / 0 : 0 === t && 2 === n ? 1 : n < 512 && e < 512 ? 1 / oe(n / 2, e / 2) * Math.pow(n / e, n / 2) * Math.pow(t, n / 2 - 1) * Math.pow(1 + n / e * t, -(n + e) / 2) : Math.exp(n / 2 * Math.log(n / e) + (n / 2 - 1) * Math.log(t) - (n + e) / 2 * Math.log(1 + n / e * t) - le(n / 2, e / 2));
|
|
5603
5600
|
}(t, n, e));
|
|
5604
5601
|
}
|
|
5605
5602
|
function Fc(t, n, e) {
|
|
@@ -5609,23 +5606,23 @@ function Pc(t, n, e) {
|
|
|
5609
5606
|
return t < 0 || n < 1 || e < 1 ? NaN : (n = Math.trunc(n), e = Math.trunc(e), n > Js || e > Js ? NaN : function(t, n, e) {
|
|
5610
5607
|
if (t < 0) return 1;
|
|
5611
5608
|
const r = n * t + e;
|
|
5612
|
-
return
|
|
5609
|
+
return we(e / r, n * t / r, e / 2, n / 2);
|
|
5613
5610
|
}(t, n, e));
|
|
5614
5611
|
}
|
|
5615
5612
|
function Lc(t, n, e) {
|
|
5616
|
-
return t < 0 || t > 1 || n < 1 || e < 1 ? NaN : (n = Math.trunc(n), e = Math.trunc(e), n > Js || e > Js ? NaN :
|
|
5613
|
+
return t < 0 || t > 1 || n < 1 || e < 1 ? NaN : (n = Math.trunc(n), e = Math.trunc(e), n > Js || e > Js ? NaN : Gs(t, n, e));
|
|
5617
5614
|
}
|
|
5618
5615
|
function _c(t, n, e) {
|
|
5619
5616
|
return Uc(t, n, e);
|
|
5620
5617
|
}
|
|
5621
5618
|
function Uc(t, n, e) {
|
|
5622
|
-
return t < 0 || t > 1 || n < 1 || e < 1 ? NaN : (n = Math.trunc(n), e = Math.trunc(e), n > Js || e > Js ? NaN :
|
|
5619
|
+
return t < 0 || t > 1 || n < 1 || e < 1 ? NaN : (n = Math.trunc(n), e = Math.trunc(e), n > Js || e > Js ? NaN : Gs(1 - t, n, e));
|
|
5623
5620
|
}
|
|
5624
5621
|
function Xc(t, n) {
|
|
5625
5622
|
const e = Bh(t) ?? Bh(n);
|
|
5626
5623
|
if (e) return e;
|
|
5627
|
-
if (t.hasError()) return
|
|
5628
|
-
if (n.hasError()) return
|
|
5624
|
+
if (t.hasError()) return Fi(t);
|
|
5625
|
+
if (n.hasError()) return Fi(n);
|
|
5629
5626
|
const r = [], o = [];
|
|
5630
5627
|
for (const [e, u] of [[t, r], [n, o]]) e.forEach((t) => {
|
|
5631
5628
|
"number" == typeof t && u.push(t);
|
|
@@ -5641,7 +5638,7 @@ function Xc(t, n) {
|
|
|
5641
5638
|
for (let t = 0; t < o.length; t++) a += (i - o[t]) ** 2;
|
|
5642
5639
|
if (a /= o.length - 1, l = X(l), a = X(a), 0 === l || 0 === a) return T.BuiltIn.Div0;
|
|
5643
5640
|
if (!Number.isFinite(l) || !Number.isFinite(a)) return T.BuiltIn.Num;
|
|
5644
|
-
const s =
|
|
5641
|
+
const s = Hs(l / a, r.length - 1, o.length - 1);
|
|
5645
5642
|
return 2 * Math.min(s, 1 - s);
|
|
5646
5643
|
}
|
|
5647
5644
|
function kc(t, n) {
|
|
@@ -5690,31 +5687,31 @@ function qc(t, n) {
|
|
|
5690
5687
|
return u[e.length][0] = l, u;
|
|
5691
5688
|
}
|
|
5692
5689
|
function $c(t) {
|
|
5693
|
-
return 0 === t || t < 0 && t === Math.trunc(t) ? NaN :
|
|
5690
|
+
return 0 === t || t < 0 && t === Math.trunc(t) ? NaN : re(t);
|
|
5694
5691
|
}
|
|
5695
5692
|
function Kc(t, n, e, r) {
|
|
5696
|
-
return t < 0 || n <= 0 || e <= 0 ? NaN : Number.isFinite(
|
|
5697
|
-
return t < 0 ? 0 :
|
|
5698
|
-
}(t, n, e) :
|
|
5693
|
+
return t < 0 || n <= 0 || e <= 0 ? NaN : Number.isFinite(ee(n)) && Number.isFinite(t / e * 2) ? r ? function(t, n, e) {
|
|
5694
|
+
return t < 0 ? 0 : ge(n, t / e);
|
|
5695
|
+
}(t, n, e) : Us(t, n, e) : NaN;
|
|
5699
5696
|
}
|
|
5700
5697
|
function zc(t, n, e, r) {
|
|
5701
5698
|
return Kc(t, n, e, r);
|
|
5702
5699
|
}
|
|
5703
5700
|
function Wc(t, n, e) {
|
|
5704
|
-
return t < 0 || t >= 1 || n <= 0 || e <= 0 ? NaN : (r = e,
|
|
5701
|
+
return t < 0 || t >= 1 || n <= 0 || e <= 0 ? NaN : (r = e, pe(t, n) * r);
|
|
5705
5702
|
var r;
|
|
5706
5703
|
}
|
|
5707
5704
|
function Qc(t, n, e) {
|
|
5708
5705
|
return Wc(t, n, e);
|
|
5709
5706
|
}
|
|
5710
5707
|
function Zc(t) {
|
|
5711
|
-
return t <= 0 ? NaN :
|
|
5708
|
+
return t <= 0 ? NaN : ee(t);
|
|
5712
5709
|
}
|
|
5713
5710
|
function Jc(t) {
|
|
5714
|
-
return t <= 0 ? NaN :
|
|
5711
|
+
return t <= 0 ? NaN : ee(t);
|
|
5715
5712
|
}
|
|
5716
5713
|
function tf(t) {
|
|
5717
|
-
return
|
|
5714
|
+
return Ls(t, 0, 1) - .5;
|
|
5718
5715
|
}
|
|
5719
5716
|
function nf(t) {
|
|
5720
5717
|
const n = [];
|
|
@@ -5741,10 +5738,10 @@ function rf(t, n, e, r, o) {
|
|
|
5741
5738
|
const u = (t) => {
|
|
5742
5739
|
if (t > n || t > e) return 0;
|
|
5743
5740
|
if (n - t > r - e) return 0;
|
|
5744
|
-
const o =
|
|
5741
|
+
const o = Ki(e, t) * Ki(r - e, n - t) / Ki(r, n);
|
|
5745
5742
|
if (Number.isFinite(o)) return o;
|
|
5746
5743
|
if (r > 2147483646) return NaN;
|
|
5747
|
-
const u = (t, n) =>
|
|
5744
|
+
const u = (t, n) => ee(t + 1) - ee(n + 1) - ee(t - n + 1);
|
|
5748
5745
|
return Math.exp(u(e, t) + u(r - e, n - t) - u(r, n));
|
|
5749
5746
|
};
|
|
5750
5747
|
if (!o) return u(t);
|
|
@@ -5780,7 +5777,7 @@ function lf(t) {
|
|
|
5780
5777
|
}
|
|
5781
5778
|
function af(t, n, e, r) {
|
|
5782
5779
|
return t <= 0 || e <= 0 ? NaN : r ? function(t, n, e) {
|
|
5783
|
-
return t < 0 ? 0 : .5 *
|
|
5780
|
+
return t < 0 ? 0 : .5 * fe(-(Math.log(t) - n) / Math.sqrt(2 * e * e));
|
|
5784
5781
|
}(t, n, e) : function(t, n, e) {
|
|
5785
5782
|
return t <= 0 ? 0 : Math.exp(-Math.log(t) - .5 * Math.log(2 * Math.PI) - Math.log(e) - Math.pow(Math.log(t) - n, 2) / (2 * e * e));
|
|
5786
5783
|
}(t, n, e);
|
|
@@ -5789,7 +5786,7 @@ function sf(t, n, e) {
|
|
|
5789
5786
|
return af(t, n, e, !0);
|
|
5790
5787
|
}
|
|
5791
5788
|
function cf(t, n, e) {
|
|
5792
|
-
return t <= 0 || t >= 1 || e <= 0 ? NaN : (r = t, o = n, u = e, Math.exp(-1.4142135623730951 * u *
|
|
5789
|
+
return t <= 0 || t >= 1 || e <= 0 ? NaN : (r = t, o = n, u = e, Math.exp(-1.4142135623730951 * u * he(2 * r) + o));
|
|
5793
5790
|
var r, o, u;
|
|
5794
5791
|
}
|
|
5795
5792
|
function ff(t, n, e) {
|
|
@@ -5810,7 +5807,7 @@ function gf(t) {
|
|
|
5810
5807
|
return If(t);
|
|
5811
5808
|
}
|
|
5812
5809
|
var mf = (t) => {
|
|
5813
|
-
for (const n of t) if (1 === n.size &&
|
|
5810
|
+
for (const n of t) if (1 === n.size && ns(n) && n.entries({ includeEmpty: !1 }).next().done) throw T.BuiltIn.Value;
|
|
5814
5811
|
};
|
|
5815
5812
|
function Nf(t) {
|
|
5816
5813
|
const n = hf();
|
|
@@ -5865,46 +5862,46 @@ function If(t) {
|
|
|
5865
5862
|
for (const [t, { count: n, firstSeen: r }] of e) n < 2 || (n > u || n === u && r < i) && (o = t, u = n, i = r);
|
|
5866
5863
|
return null === o ? T.BuiltIn.NA : o;
|
|
5867
5864
|
}
|
|
5868
|
-
function
|
|
5865
|
+
function pf(t, n, e, r) {
|
|
5869
5866
|
return t < 0 ? NaN : (t = Math.trunc(t), n = Math.trunc(n), e <= 0 || e >= 1 || n < 1 ? NaN : r ? function(t, n, e) {
|
|
5870
5867
|
if (t < 0) return 0;
|
|
5871
5868
|
let r = 0, o = !1;
|
|
5872
|
-
const u = Math.min(t,
|
|
5869
|
+
const u = Math.min(t, $s);
|
|
5873
5870
|
for (let i = 0; i <= u; i++) {
|
|
5874
|
-
const u =
|
|
5875
|
-
if (!Number.isFinite(u)) return
|
|
5871
|
+
const u = Qs(i, n, e);
|
|
5872
|
+
if (!Number.isFinite(u)) return Ae(e, n, Math.floor(t) + 1);
|
|
5876
5873
|
if (0 === u && o) return r;
|
|
5877
5874
|
0 !== u && (o = !0), r += u;
|
|
5878
5875
|
}
|
|
5879
|
-
return o && t <=
|
|
5880
|
-
}(t, n, e) :
|
|
5876
|
+
return o && t <= $s ? r : Ae(e, n, Math.floor(t) + 1);
|
|
5877
|
+
}(t, n, e) : Qs(t, n, e));
|
|
5881
5878
|
}
|
|
5882
|
-
function
|
|
5883
|
-
return
|
|
5879
|
+
function Mf(t, n, e) {
|
|
5880
|
+
return pf(t, n, e, !1);
|
|
5884
5881
|
}
|
|
5885
5882
|
function Af(t, n, e, r) {
|
|
5886
5883
|
if (e <= 0) return NaN;
|
|
5887
|
-
if (r) return
|
|
5884
|
+
if (r) return Ls(t, n, e);
|
|
5888
5885
|
const o = (t - n) / e;
|
|
5889
|
-
return Number.isFinite(o * o) ?
|
|
5886
|
+
return Number.isFinite(o * o) ? Ps(t, n, e) : NaN;
|
|
5890
5887
|
}
|
|
5891
5888
|
function wf(t, n, e, r) {
|
|
5892
5889
|
return Af(t, n, e, r);
|
|
5893
5890
|
}
|
|
5894
5891
|
function df(t, n, e) {
|
|
5895
|
-
return t <= 0 || t >= 1 || e <= 0 ? NaN :
|
|
5892
|
+
return t <= 0 || t >= 1 || e <= 0 ? NaN : _s(t, n, e);
|
|
5896
5893
|
}
|
|
5897
5894
|
function Ef(t, n, e) {
|
|
5898
5895
|
return df(t, n, e);
|
|
5899
5896
|
}
|
|
5900
5897
|
function Bf(t, n) {
|
|
5901
|
-
return n ?
|
|
5898
|
+
return n ? Ls(t, 0, 1) : Number.isFinite(t * t) ? Ps(t, 0, 1) : NaN;
|
|
5902
5899
|
}
|
|
5903
5900
|
function Cf(t) {
|
|
5904
5901
|
return Bf(t, !0);
|
|
5905
5902
|
}
|
|
5906
5903
|
function Sf(t) {
|
|
5907
|
-
return t <= 0 || t >= 1 ? NaN :
|
|
5904
|
+
return t <= 0 || t >= 1 ? NaN : _s(t, 0, 1);
|
|
5908
5905
|
}
|
|
5909
5906
|
function Rf(t) {
|
|
5910
5907
|
return Sf(t);
|
|
@@ -5940,19 +5937,19 @@ function Of(t) {
|
|
|
5940
5937
|
return Number.isFinite(t * t) ? Math.exp(-.5 * t * t) / Eh : NaN;
|
|
5941
5938
|
}
|
|
5942
5939
|
function Ff(t, n, e) {
|
|
5943
|
-
return t < 0 || n < 0 ? NaN : (t = Math.trunc(t), Number.isFinite(
|
|
5940
|
+
return t < 0 || n < 0 ? NaN : (t = Math.trunc(t), Number.isFinite(ee(t + 1)) ? e ? function(t, n) {
|
|
5944
5941
|
if (t < 0) return 0;
|
|
5945
5942
|
if (t <= 170) {
|
|
5946
5943
|
const e = [];
|
|
5947
|
-
for (let r = 0; r <= t; r++) e.push(
|
|
5944
|
+
for (let r = 0; r <= t; r++) e.push(Ks(r, n));
|
|
5948
5945
|
if (e.every(Number.isFinite)) {
|
|
5949
5946
|
let t = 0;
|
|
5950
5947
|
for (let n = e.length - 1; n >= 0; n--) t += e[n];
|
|
5951
5948
|
return t;
|
|
5952
5949
|
}
|
|
5953
5950
|
}
|
|
5954
|
-
return 1 -
|
|
5955
|
-
}(t, n) :
|
|
5951
|
+
return 1 - ge(Math.floor(t) + 1, n);
|
|
5952
|
+
}(t, n) : Ks(t, n) : NaN);
|
|
5956
5953
|
}
|
|
5957
5954
|
function Pf(t, n, e) {
|
|
5958
5955
|
return !e && t >= 0 && t < 1 && n < 0 ? Math.exp(-n) : Ff(t, n, e);
|
|
@@ -5961,8 +5958,8 @@ function Lf(t, n, e, r) {
|
|
|
5961
5958
|
mf([t, n]);
|
|
5962
5959
|
const o = t.flatten(), u = n.flatten();
|
|
5963
5960
|
if (o.getRowCount() !== u.getRowCount()) return T.BuiltIn.NA;
|
|
5964
|
-
if (t.hasError()) return
|
|
5965
|
-
if (n.hasError()) return
|
|
5961
|
+
if (t.hasError()) return Fi(t);
|
|
5962
|
+
if (n.hasError()) return Fi(n);
|
|
5966
5963
|
const i = r ?? e;
|
|
5967
5964
|
let l = 0, a = 0;
|
|
5968
5965
|
for (const [[t, n]] of o.alignValues([u])) "number" == typeof t && "number" == typeof n && (l += n, t >= e && t <= i && (a += n));
|
|
@@ -6082,7 +6079,7 @@ function Jf(t) {
|
|
|
6082
6079
|
return Math.sqrt(n);
|
|
6083
6080
|
}
|
|
6084
6081
|
function th(t) {
|
|
6085
|
-
const n =
|
|
6082
|
+
const n = ph(t);
|
|
6086
6083
|
return Math.sqrt(n);
|
|
6087
6084
|
}
|
|
6088
6085
|
function nh(t, n) {
|
|
@@ -6092,31 +6089,31 @@ function nh(t, n) {
|
|
|
6092
6089
|
function eh(t, n, e) {
|
|
6093
6090
|
return (n = Math.trunc(n)) < 1 || n > Js ? NaN : e ? 0 === t ? .5 : function(t, n) {
|
|
6094
6091
|
if (!Number.isFinite(t * t)) return NaN;
|
|
6095
|
-
const e = .5 *
|
|
6092
|
+
const e = .5 * Ys(t, n);
|
|
6096
6093
|
return t > 0 ? 1 - e : e;
|
|
6097
|
-
}(t, n) : function(t, n) {
|
|
6098
|
-
return n = n > 1e100 ? 1e100 : n, 1 / (Math.sqrt(n) *
|
|
6099
|
-
}(t, n);
|
|
6094
|
+
}(t, n) : Number.isFinite(t * t) ? function(t, n) {
|
|
6095
|
+
return n = n > 1e100 ? 1e100 : n, 1 / (Math.sqrt(n) * oe(.5, n / 2)) * Math.pow(1 + t * t / n, -(n + 1) / 2);
|
|
6096
|
+
}(t, n) : NaN;
|
|
6100
6097
|
}
|
|
6101
6098
|
function rh(t, n, e) {
|
|
6102
6099
|
return t < 0 || 1 !== (e = Math.floor(e + oc)) && 2 !== e ? NaN : 1 === e ? uh(t, n) : oh(t, n);
|
|
6103
6100
|
}
|
|
6104
6101
|
function oh(t, n) {
|
|
6105
|
-
return (n = Math.trunc(n)) < 1 || t < 0 || n > Js ? NaN : 2 *
|
|
6102
|
+
return (n = Math.trunc(n)) < 1 || t < 0 || n > Js ? NaN : 2 * js(t, n);
|
|
6106
6103
|
}
|
|
6107
6104
|
function uh(t, n) {
|
|
6108
|
-
return (n = Math.trunc(n)) < 1 || n > Js ? NaN : 0 === t ? .5 :
|
|
6105
|
+
return (n = Math.trunc(n)) < 1 || n > Js ? NaN : 0 === t ? .5 : js(t, n);
|
|
6109
6106
|
}
|
|
6110
6107
|
function ih(t, n) {
|
|
6111
6108
|
if (0 === t && 1 === Math.trunc(n)) throw T.BuiltIn.Div0;
|
|
6112
|
-
return t <= 0 || t >= 1 || n < 1 || (n = Math.trunc(n)) > Js ? NaN : 1 === n ? Math.tan(Math.PI * (t - .5)) :
|
|
6109
|
+
return t <= 0 || t >= 1 || n < 1 || (n = Math.trunc(n)) > Js ? NaN : 1 === n ? Math.tan(Math.PI * (t - .5)) : qs(t, n);
|
|
6113
6110
|
}
|
|
6114
6111
|
function lh(t, n) {
|
|
6115
6112
|
return ah(t, n);
|
|
6116
6113
|
}
|
|
6117
6114
|
function ah(t, n) {
|
|
6118
6115
|
if (0 === t && 1 === Math.trunc(n)) throw T.BuiltIn.Div0;
|
|
6119
|
-
return t <= 0 || n < 1 || (n = Math.trunc(n)) > Js ? NaN : 1 === n ? Math.tan(Math.PI * (.5 - t / 2)) : -
|
|
6116
|
+
return t <= 0 || n < 1 || (n = Math.trunc(n)) > Js ? NaN : 1 === n ? Math.tan(Math.PI * (.5 - t / 2)) : -qs(t / 2, n);
|
|
6120
6117
|
}
|
|
6121
6118
|
function sh(t, n) {
|
|
6122
6119
|
if ((t = y.flattenAreas(t)).hasError()) return t.firstError();
|
|
@@ -6141,7 +6138,7 @@ function sh(t, n) {
|
|
|
6141
6138
|
var ch = { axis: V.Axis.Row };
|
|
6142
6139
|
function fh(t) {
|
|
6143
6140
|
let n = 0, e = 0;
|
|
6144
|
-
const r =
|
|
6141
|
+
const r = as(t);
|
|
6145
6142
|
for (const o of t) for (const t of o.values()) n += Math.pow(t - r, 2), e++;
|
|
6146
6143
|
const o = n / e;
|
|
6147
6144
|
return isNaN(o) ? NaN : o;
|
|
@@ -6151,7 +6148,7 @@ function hh(t) {
|
|
|
6151
6148
|
}
|
|
6152
6149
|
function gh(t) {
|
|
6153
6150
|
let n = 0, e = 0;
|
|
6154
|
-
const r =
|
|
6151
|
+
const r = as(t);
|
|
6155
6152
|
for (const o of t) for (const t of o.values({
|
|
6156
6153
|
type: D.Number,
|
|
6157
6154
|
onError: "value"
|
|
@@ -6166,9 +6163,9 @@ var Nh = (t) => {
|
|
|
6166
6163
|
const n = [];
|
|
6167
6164
|
let e = 0;
|
|
6168
6165
|
for (const r of t) {
|
|
6169
|
-
const t =
|
|
6166
|
+
const t = ns(r);
|
|
6170
6167
|
for (const o of r.values({ type: null })) {
|
|
6171
|
-
const r =
|
|
6168
|
+
const r = us(o, t);
|
|
6172
6169
|
null !== r && (n.push(r), e += r);
|
|
6173
6170
|
}
|
|
6174
6171
|
}
|
|
@@ -6185,12 +6182,12 @@ function Ih(t) {
|
|
|
6185
6182
|
if (e < 2) throw T.BuiltIn.Div0;
|
|
6186
6183
|
return n / (e - 1);
|
|
6187
6184
|
}
|
|
6188
|
-
function
|
|
6185
|
+
function ph(t) {
|
|
6189
6186
|
const { sigma: n, count: e } = Nh(t);
|
|
6190
6187
|
if (0 === e) throw T.BuiltIn.Div0;
|
|
6191
6188
|
return n / e;
|
|
6192
6189
|
}
|
|
6193
|
-
function
|
|
6190
|
+
function Mh(t, n, e, r) {
|
|
6194
6191
|
if (t < 0 || n <= 0 || e <= 0) return NaN;
|
|
6195
6192
|
if (!r && 0 === t) return 0;
|
|
6196
6193
|
const o = Math.pow(t / e, n);
|
|
@@ -6202,7 +6199,7 @@ function ph(t, n, e, r) {
|
|
|
6202
6199
|
return u / i * Math.exp(-o);
|
|
6203
6200
|
}
|
|
6204
6201
|
function Ah(t, n, e, r) {
|
|
6205
|
-
return
|
|
6202
|
+
return Mh(t, n, e, r);
|
|
6206
6203
|
}
|
|
6207
6204
|
function wh(t, n, e) {
|
|
6208
6205
|
const r = [];
|
|
@@ -6229,7 +6226,7 @@ function wh(t, n, e) {
|
|
|
6229
6226
|
function dh(t, n, e) {
|
|
6230
6227
|
return wh(t, n, e);
|
|
6231
6228
|
}
|
|
6232
|
-
var Eh = 2.5066282746310002, Bh = (t) => 1 === t.size &&
|
|
6229
|
+
var Eh = 2.5066282746310002, Bh = (t) => 1 === t.size && ns(t) ? t.hasError() ? t.firstError() : t.entries({ includeEmpty: !1 }).next().done ? T.BuiltIn.Value : null : null;
|
|
6233
6230
|
function Ch(t, n) {
|
|
6234
6231
|
const e = Bh(t) ?? Bh(n);
|
|
6235
6232
|
if (e) return e;
|
|
@@ -6239,8 +6236,8 @@ function Ch(t, n) {
|
|
|
6239
6236
|
const u = [], i = [];
|
|
6240
6237
|
for (const [e] of t.alignValues([n])) {
|
|
6241
6238
|
const t = e[0], n = e[1];
|
|
6242
|
-
if (T.isError(t)) return
|
|
6243
|
-
if (T.isError(n)) return
|
|
6239
|
+
if (T.isError(t)) return Oi(t);
|
|
6240
|
+
if (T.isError(n)) return Oi(n);
|
|
6244
6241
|
"number" == typeof t && "number" == typeof n && (i.push(t), u.push(n));
|
|
6245
6242
|
}
|
|
6246
6243
|
const l = i.length;
|
|
@@ -6372,8 +6369,8 @@ var Dh = [
|
|
|
6372
6369
|
NUMBERVALUE: () => mg,
|
|
6373
6370
|
PROPER: () => Ng,
|
|
6374
6371
|
REPLACE: () => Ig,
|
|
6375
|
-
REPLACEB: () =>
|
|
6376
|
-
REPT: () =>
|
|
6372
|
+
REPLACEB: () => pg,
|
|
6373
|
+
REPT: () => Mg,
|
|
6377
6374
|
RIGHT: () => Ag,
|
|
6378
6375
|
RIGHTB: () => wg,
|
|
6379
6376
|
SEARCH: () => dg,
|
|
@@ -6570,10 +6567,10 @@ function Ng(t) {
|
|
|
6570
6567
|
function Ig(t, n, e, r) {
|
|
6571
6568
|
return e + k < 0 ? T.BuiltIn.Value : (n = H(n), e = H(e), n < 1 ? T.BuiltIn.Value : Hg(t) ? t.slice(0, om(t, n - 1)) + r + t.slice(om(t, n - 1 + e)) : t.slice(0, n - 1) + r + t.slice(n - 1 + e));
|
|
6572
6569
|
}
|
|
6573
|
-
function
|
|
6570
|
+
function pg(t, n, e, r) {
|
|
6574
6571
|
return e + k < 0 ? T.BuiltIn.Value : (n = H(n), e = H(e), n < 1 ? T.BuiltIn.Value : t.slice(0, n - 1) + r + t.slice(n - 1 + e));
|
|
6575
6572
|
}
|
|
6576
|
-
function
|
|
6573
|
+
function Mg(t, n) {
|
|
6577
6574
|
return (n = Math.floor(n)) < 0 || t.length * n > x.MAX_TEXT_LENGTH ? T.BuiltIn.Value : t.repeat(n);
|
|
6578
6575
|
}
|
|
6579
6576
|
function Ag(t, n = 1) {
|
|
@@ -6622,11 +6619,12 @@ function Cg(t, n, e, r) {
|
|
|
6622
6619
|
}
|
|
6623
6620
|
function Sg(t) {
|
|
6624
6621
|
const n = !0 === t?.isIRange ? t : null;
|
|
6625
|
-
return n ?
|
|
6622
|
+
return n ? ro(n, Rg) : Rg(t);
|
|
6626
6623
|
}
|
|
6627
6624
|
var Rg = (t) => "string" == typeof t ? t : "";
|
|
6628
6625
|
function bg(t, n) {
|
|
6629
|
-
if (null === t && (t = 0), "" === n) return "";
|
|
6626
|
+
if (null === t && (t = 0), "" === n) return "number" == typeof t && t < 0 ? "-" : "";
|
|
6627
|
+
if (n.length > 255) return T.BuiltIn.Value;
|
|
6630
6628
|
if ("string" == typeof t && "" !== t.trim()) try {
|
|
6631
6629
|
t = y.parseAsNumber(t.trim());
|
|
6632
6630
|
} catch (t) {}
|
|
@@ -6842,7 +6840,7 @@ function cm(t, n) {
|
|
|
6842
6840
|
}
|
|
6843
6841
|
async function fm(t) {
|
|
6844
6842
|
if (!mm || !Nm) try {
|
|
6845
|
-
|
|
6843
|
+
pm ??= gm(), await pm;
|
|
6846
6844
|
} catch (t) {
|
|
6847
6845
|
Im || (Im = !0, console.warn(`FILTERXML is unavailable: XML libraries could not be loaded (${t?.message ?? t}).`));
|
|
6848
6846
|
}
|
|
@@ -6880,7 +6878,7 @@ var gm = async () => {
|
|
|
6880
6878
|
Nm = t;
|
|
6881
6879
|
const e = n.DOMParser;
|
|
6882
6880
|
mm = new e();
|
|
6883
|
-
}, mm = null, Nm = null, Im = !1,
|
|
6881
|
+
}, mm = null, Nm = null, Im = !1, pm = null, Mm = U({ IMPORTDATA: () => Em }), Am = "Resource at url not found.";
|
|
6884
6882
|
function wm(t) {
|
|
6885
6883
|
const n = t.split(/[?#]/, 1)[0];
|
|
6886
6884
|
return /\.tsv$/i.test(n) ? " " : ",";
|
|
@@ -6949,5 +6947,5 @@ async function bm(t, n, e) {
|
|
|
6949
6947
|
throw T.isError(t, T.Code.Blocked) ? new T.Value(t.message) : T.BuiltIn.Value;
|
|
6950
6948
|
}
|
|
6951
6949
|
}
|
|
6952
|
-
var vm = () => import("./
|
|
6950
|
+
var vm = () => import("./B8Lb4ycMbsisimyJ.mjs"), ym = () => import("./09cs4iXujO7ozZKl.mjs"), Tm = () => import("./CcHSbpd59O15t-0s.mjs"), Vm = () => import("./j3fzAwgnII1ABYoy.mjs"), xm = () => import("./Cwmf3WtWvqEbXl9w.mjs"), Dm = () => import("./CEL8D-iv8wA9zzGP.mjs"), Om = () => import("./B4cV-4I4AxsDqTeg.mjs"), Fm = () => import("./B4JL4tyPYordrFSn.mjs"), Pm = () => import("./DgQs_yv8yoyN7IvY.mjs"), Lm = () => import("./tT_Sh3neAQCj8w1k.mjs"), _m = () => import("./OkSc7RXqdqBX_dhB.mjs"), Um = () => import("./BXyl3EySzcpdcg4a.mjs"), Xm = () => import("./UzUKr0PdyOTCvFQK.mjs"), km = () => import("./DBovrQMoOcTgfyy5.mjs"), Hm = () => import("./DRcy1_Zqu53jue2l.mjs"), Gm = () => import("./DTtayzMN3z3KzrEs.mjs"), jm = () => import("./Bgm6ooSL37aLrze-.mjs"), Ym = () => import("./-3OnHOj2LLDR1fc_.mjs"), qm = () => import("./C6XhGX3n-kOXcVe-.mjs"), $m = () => import("./KGE7M7zDiMjCOz64.mjs"), Km = () => import("./CRPSImZV4jAnwQKI.mjs"), zm = () => import("./BgWNOg6VC2WA3Wld.mjs"), Wm = () => import("./CHRc41kLdyeK5TBj.mjs"), Qm = () => import("./DhGoS8Vi10avRc0T.mjs"), Zm = () => import("./DKarKpru6FjwvLA_.mjs"), Jm = (y, T, V) => (V || (V = /* @__PURE__ */ new Map()), T(V, y, Y, N, vm, "Database"), T(V, y, ct, n, ym, "Date & Time", r), T(V, y, Jt, e, Tm, "Engineering"), T(V, y, an, u, Vm, "Engineering"), T(V, y, Xn, R, xm, "Engineering"), T(V, y, Qn, t, Dm, "Engineering"), T(V, y, Be, o, Om, "Engineering"), T(V, y, Ue, b, Fm, "Engineering"), T(V, y, _r, a, Pm, "Financial"), T(V, y, oo, S, Lm, "Information", v), T(V, y, Po, i, _m, "Japanese"), T(V, y, Uo, h, Um, "Japanese"), T(V, y, jo, g, Xm, "Logical"), T(V, y, Iu, w, km, "Lookup & Reference", p), T(V, y, _i, c, Hm, "Math & Trig", f), T(V, y, Ia, C, Gm, "Math & Trig"), T(V, y, _a, I, jm, "Operators"), T(V, y, Zs, s, Ym, "Statistical"), T(V, y, is, E, qm, "Statistical"), T(V, y, Sh, A, $m, "Testing"), T(V, y, Hh, l, Km, "Text"), T(V, y, lm, m, zm, "Thai"), T(V, y, sm, d, Wm, "Web"), T(V, y, Mm, M, Qm, "Web"), T(V, y, Bm, B, Zm, "Web"), V);
|
|
6953
6951
|
export { Jm as default };
|