@univerjs/engine-formula 0.6.4 → 0.6.5-nightly.202503131607
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/lib/cjs/index.js +4 -4
- package/lib/es/index.js +434 -430
- package/lib/umd/index.js +4 -4
- package/package.json +7 -7
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Hu = Object.defineProperty;
|
|
2
2
|
var Gu = (i, a, e) => a in i ? Hu(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
|
|
3
3
|
var A = (i, a, e) => Gu(i, typeof a != "symbol" ? a + "" : a, e);
|
|
4
|
-
import { ObjectMatrix as Ce, CommandType as Ie, RANGE_TYPE as Ze, AbsoluteRefType as we, Tools as ze, createIdentifier as
|
|
4
|
+
import { ObjectMatrix as Ce, CommandType as Ie, RANGE_TYPE as Ze, AbsoluteRefType as we, Tools as ze, createIdentifier as lt, Disposable as Oe, IUniverInstanceService as aa, LRUMap as Qu, hashAlgorithm as Wu, moveRangeByOffset as ia, isValidRange as qu, isFormulaString as yt, isFormulaId as Pt, Rectangle as Xa, cellToRange as Ku, Inject as pe, UniverInstanceType as Lr, BooleanNumber as Gi, LocaleService as Xu, LocaleType as wr, numfmt as gt, BuildTextUtils as Zu, isRealNum as Q, CellValueType as Rt, toDisposable as zu, Injector as Qi, sortRules as Ju, RTree as Ns, IConfigService as oa, requestImmediateMacroTask as ec, ICommandService as ar, DataStreamTreeTokenType as ve, DisposableCollection as tc, Optional as rc, Plugin as nc, merge as sc, touchDependencies as os } from "@univerjs/core";
|
|
5
5
|
import { Subject as cr, BehaviorSubject as Wi, distinctUntilChanged as qi, combineLatest as ac, map as ic, Observable as oc, shareReplay as uc } from "rxjs";
|
|
6
6
|
import { isTextFormat as cc } from "@univerjs/engine-numfmt";
|
|
7
7
|
import { DataSyncPrimaryController as lc } from "@univerjs/rpc";
|
|
@@ -59,7 +59,7 @@ const rn = /* @__PURE__ */ new Map([
|
|
|
59
59
|
/* LESS_THAN_OR_EQUAL */
|
|
60
60
|
]);
|
|
61
61
|
var K = /* @__PURE__ */ ((i) => (i.OPEN_BRACKET = "(", i.CLOSE_BRACKET = ")", i.COMMA = ",", i.SINGLE_QUOTATION = "'", i.DOUBLE_QUOTATION = '"', i.OPEN_BRACES = "{", i.CLOSE_BRACES = "}", i.COLON = ":", i.OPEN_SQUARE_BRACKET = "[", i.CLOSE_SQUARE_BRACKET = "]", i))(K || {}), Je = /* @__PURE__ */ ((i) => (i.PERCENTAGE = "%", i.POUND = "#", i))(Je || {});
|
|
62
|
-
const
|
|
62
|
+
const us = /* @__PURE__ */ new Set([
|
|
63
63
|
"%",
|
|
64
64
|
"#"
|
|
65
65
|
/* POUND */
|
|
@@ -161,7 +161,7 @@ function Rc(i) {
|
|
|
161
161
|
}
|
|
162
162
|
return a;
|
|
163
163
|
}
|
|
164
|
-
const Xi = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Ja = new RegExp(Xi), pc = "((?![\\[\\]\\/?*\\\\]).)*!", Tt = "$", ua = "\\s*?:\\s*?",
|
|
164
|
+
const Xi = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Ja = new RegExp(Xi), pc = "((?![\\[\\]\\/?*\\\\]).)*!", Tt = "$", ua = "\\s*?:\\s*?", mn = "[A-Za-z]+", gn = "[1-9][0-9]*", pr = `'?(${Xi})?(${pc})?'?`, Os = `\\${Tt}?${mn}\\${Tt}?${gn}`, Vc = `^(${Me.AT})?${pr}${Os}${ua}${Os}$`, ei = new RegExp(Vc), Nc = `^${pr}\\s*?${Os}(${Je.POUND})?$`, ti = new RegExp(Nc), Oc = `^${pr}\\${Tt}?${gn}${ua}\\${Tt}?${gn}$`, ri = new RegExp(Oc), Mc = `^${pr}\\${Tt}?${mn}${ua}\\${Tt}?${mn}$`, ni = new RegExp(Mc), wc = `^${pr}\\s*?\\${Tt}?${gn}$`, si = new RegExp(wc), Sc = `^${pr}\\s*?\\${Tt}?${mn}$`, ai = new RegExp(Sc), Dc = "{.*?}", ii = new RegExp(Dc, "g");
|
|
165
165
|
function Br(i) {
|
|
166
166
|
return ti.lastIndex = 0, ti.test(i);
|
|
167
167
|
}
|
|
@@ -190,7 +190,7 @@ const jc = {
|
|
|
190
190
|
id: "formula.mutation.register-function",
|
|
191
191
|
type: Ie.MUTATION,
|
|
192
192
|
handler: () => !0
|
|
193
|
-
},
|
|
193
|
+
}, Ms = {
|
|
194
194
|
id: "formula.mutation.set-array-formula-data",
|
|
195
195
|
type: Ie.MUTATION,
|
|
196
196
|
handler: (i, a) => !0
|
|
@@ -242,13 +242,13 @@ function Tc(i, a) {
|
|
|
242
242
|
return `${ro(i)}!${hr(a)}`;
|
|
243
243
|
}
|
|
244
244
|
function Bc(i, a, e) {
|
|
245
|
-
return
|
|
245
|
+
return Ss(i) || Ss(a) ? `'[${Ds(i)}]${Ds(a)}'!${hr(e)}` : `[${i}]${a}!${hr(e)}`;
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function ws(i) {
|
|
248
248
|
const { unitId: a, sheetName: e, range: t } = i;
|
|
249
249
|
return a != null && a.length > 0 && e != null && e.length > 0 ? Bc(a, e, t) : e != null && e.length > 0 ? Tc(e, t) : hr(t);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function cs(i) {
|
|
252
252
|
const a = Number.parseInt(i.replace(Uc, "")) - 1, e = ze.ABCatNum(i.replace(vc, "")), t = sn(i);
|
|
253
253
|
return {
|
|
254
254
|
row: a,
|
|
@@ -268,10 +268,10 @@ function ca(i) {
|
|
|
268
268
|
unitId: e
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
|
-
function
|
|
271
|
+
function dn(i) {
|
|
272
272
|
const { refBody: a, sheetName: e, unitId: t } = ca(i), r = a.indexOf(":");
|
|
273
273
|
if (r === -1) {
|
|
274
|
-
const _ =
|
|
274
|
+
const _ = cs(a), C = _.row, E = _.column, b = _.absoluteRefType;
|
|
275
275
|
return {
|
|
276
276
|
unitId: t,
|
|
277
277
|
sheetName: e,
|
|
@@ -285,7 +285,7 @@ function gn(i) {
|
|
|
285
285
|
}
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
|
-
const n = a.substring(0, r), s = a.substring(r + 1), o =
|
|
288
|
+
const n = a.substring(0, r), s = a.substring(r + 1), o = cs(n), u = cs(s), c = o.row > u.row ? u.row : o.row, l = o.column > u.column ? u.column : o.column, f = o.row > u.row ? o.row : u.row, h = o.column > u.column ? o.column : u.column;
|
|
289
289
|
let d = Ze.NORMAL;
|
|
290
290
|
return Number.isNaN(c) && Number.isNaN(f) ? d = Ze.COLUMN : Number.isNaN(l) && Number.isNaN(h) && (d = Ze.ROW), {
|
|
291
291
|
unitId: t,
|
|
@@ -306,7 +306,7 @@ function an(i) {
|
|
|
306
306
|
const a = to(i);
|
|
307
307
|
if (!xc(a) || Ic.includes(a.toUpperCase().trim()))
|
|
308
308
|
return !1;
|
|
309
|
-
const { range: e } =
|
|
309
|
+
const { range: e } = dn(a);
|
|
310
310
|
return !(e.endColumn >= 16384);
|
|
311
311
|
}
|
|
312
312
|
function to(i) {
|
|
@@ -327,7 +327,7 @@ function to(i) {
|
|
|
327
327
|
function Fb(i, a) {
|
|
328
328
|
const e = (i == null ? void 0 : i.split(",")) || [];
|
|
329
329
|
return i === "" || e.length === 0 ? [] : Fc(i) ? e.map((n) => {
|
|
330
|
-
const s =
|
|
330
|
+
const s = dn(n);
|
|
331
331
|
return {
|
|
332
332
|
unitId: s.unitId,
|
|
333
333
|
sheetId: a(s.sheetName),
|
|
@@ -339,13 +339,13 @@ function Fb(i, a) {
|
|
|
339
339
|
function Fc(i) {
|
|
340
340
|
return ((i == null ? void 0 : i.split(",")) || []).every((e) => an(e.trim()));
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Ss(i) {
|
|
343
343
|
return i.length === 0 ? !1 : !!(Cc(i) || kc(i) || $c(i) || Yc(i) || /[\s!$%^&*()+\-=\[\]{};':"\\|,.<>\/?()]/.test(i));
|
|
344
344
|
}
|
|
345
345
|
function ro(i) {
|
|
346
|
-
return
|
|
346
|
+
return Ss(i) ? `'${Ds(i)}'` : i;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Ds(i) {
|
|
349
349
|
return i.replace(/'/g, "''");
|
|
350
350
|
}
|
|
351
351
|
function ui(i) {
|
|
@@ -366,7 +366,7 @@ var Hc = Object.getOwnPropertyDescriptor, Gc = (i, a, e, t) => {
|
|
|
366
366
|
(s = i[n]) && (r = s(r) || r);
|
|
367
367
|
return r;
|
|
368
368
|
}, Qc = (i, a) => (e, t) => a(e, t, i);
|
|
369
|
-
let
|
|
369
|
+
let Ls = class extends Oe {
|
|
370
370
|
constructor(a) {
|
|
371
371
|
super();
|
|
372
372
|
// 18.2.6 definedNames (Defined Names)
|
|
@@ -464,10 +464,10 @@ let Ds = class extends Oe {
|
|
|
464
464
|
this._nameCacheMap[a][t.name] = t;
|
|
465
465
|
}
|
|
466
466
|
};
|
|
467
|
-
|
|
467
|
+
Ls = Gc([
|
|
468
468
|
Qc(0, aa)
|
|
469
|
-
],
|
|
470
|
-
const Vr =
|
|
469
|
+
], Ls);
|
|
470
|
+
const Vr = lt("univer.formula.defined-names.service"), kb = (i, a) => {
|
|
471
471
|
const { unitId: e, id: t } = a;
|
|
472
472
|
return {
|
|
473
473
|
...i.get(Vr).getValueById(e, t),
|
|
@@ -514,7 +514,7 @@ const Vr = ft("univer.formula.defined-names.service"), kb = (i, a) => {
|
|
|
514
514
|
id: "formula.mutation.set-formula-calculation-stop",
|
|
515
515
|
type: Ie.MUTATION,
|
|
516
516
|
handler: () => !0
|
|
517
|
-
},
|
|
517
|
+
}, Cn = {
|
|
518
518
|
id: "formula.mutation.set-formula-calculation-notification",
|
|
519
519
|
type: Ie.MUTATION,
|
|
520
520
|
handler: () => !0
|
|
@@ -573,16 +573,16 @@ class Nt {
|
|
|
573
573
|
return a.length <= 64 ? a : Wu(a).toString();
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
const
|
|
576
|
+
const ft = "P_1", Ut = "R_1", mr = "L_1", Ir = "LR_1", co = "LO_1", Kc = "LET", Pr = "LAMBDA", Xc = "CUBE", Zc = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), Ps = new Nt(1e5);
|
|
577
577
|
function gr(i) {
|
|
578
|
-
const a =
|
|
578
|
+
const a = Ps.get(i);
|
|
579
579
|
if (a)
|
|
580
580
|
return a;
|
|
581
|
-
const e =
|
|
582
|
-
return
|
|
581
|
+
const e = dn(i);
|
|
582
|
+
return Ps.set(i, e), dn(i);
|
|
583
583
|
}
|
|
584
584
|
function zc() {
|
|
585
|
-
|
|
585
|
+
Ps.clear();
|
|
586
586
|
}
|
|
587
587
|
var $e = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.NUMBER = 1] = "NUMBER", i[i.STRING = 2] = "STRING", i[i.FUNCTION = 3] = "FUNCTION", i[i.REFERENCE = 4] = "REFERENCE", i[i.ARRAY = 5] = "ARRAY", i[i.DEFINED_NAME = 6] = "DEFINED_NAME", i))($e || {});
|
|
588
588
|
function ci(i) {
|
|
@@ -698,7 +698,7 @@ class ae {
|
|
|
698
698
|
return r;
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
|
-
const lo = 2e3,
|
|
701
|
+
const lo = 2e3, ls = new Nt(lo), fs = new Nt(lo);
|
|
702
702
|
class da extends Oe {
|
|
703
703
|
constructor() {
|
|
704
704
|
super(...arguments);
|
|
@@ -723,7 +723,7 @@ class da extends Oe {
|
|
|
723
723
|
}
|
|
724
724
|
// Table3[[#All],[Column1]:[Column2]]
|
|
725
725
|
dispose() {
|
|
726
|
-
this._resetTemp(), this._currentLexerNode.dispose(),
|
|
726
|
+
this._resetTemp(), this._currentLexerNode.dispose(), ls.clear(), fs.clear();
|
|
727
727
|
}
|
|
728
728
|
getUpLevel() {
|
|
729
729
|
return this._upLevel;
|
|
@@ -768,7 +768,7 @@ class da extends Oe {
|
|
|
768
768
|
let s = n.getParent(), o = n;
|
|
769
769
|
for (; s; ) {
|
|
770
770
|
const u = s.getToken();
|
|
771
|
-
if (u !==
|
|
771
|
+
if (u !== ft && !nn(u) && s.getStartIndex() !== -1) {
|
|
772
772
|
const c = s.getChildren().indexOf(o);
|
|
773
773
|
return {
|
|
774
774
|
functionName: u,
|
|
@@ -795,19 +795,19 @@ class da extends Oe {
|
|
|
795
795
|
let u = o.getParent(), c = 0;
|
|
796
796
|
for (s[1] === K.OPEN_BRACKET && c++; u; ) {
|
|
797
797
|
const l = u.getToken();
|
|
798
|
-
l !==
|
|
798
|
+
l !== ft && l !== K.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== Pr && (t === 0 ? c += 1 : t--), u = u.getParent();
|
|
799
799
|
}
|
|
800
800
|
return c;
|
|
801
801
|
}
|
|
802
802
|
sequenceNodesBuilder(e) {
|
|
803
|
-
const t =
|
|
803
|
+
const t = fs.get(e);
|
|
804
804
|
if (t)
|
|
805
805
|
return [...t];
|
|
806
806
|
const r = this._getSequenceArray(e);
|
|
807
807
|
if (r.length === 0)
|
|
808
808
|
return;
|
|
809
809
|
const n = this.getSequenceNode(r);
|
|
810
|
-
return
|
|
810
|
+
return fs.set(e, [...n]), n;
|
|
811
811
|
}
|
|
812
812
|
convertRefersToAbsolute(e, t, r, n = "") {
|
|
813
813
|
const s = this.sequenceNodesBuilder(e);
|
|
@@ -825,7 +825,7 @@ class da extends Oe {
|
|
|
825
825
|
..._,
|
|
826
826
|
startAbsoluteRefType: t,
|
|
827
827
|
endAbsoluteRefType: r
|
|
828
|
-
}, R =
|
|
828
|
+
}, R = ws({
|
|
829
829
|
range: b,
|
|
830
830
|
unitId: E,
|
|
831
831
|
sheetName: C || n
|
|
@@ -862,7 +862,7 @@ class da extends Oe {
|
|
|
862
862
|
} else
|
|
863
863
|
C = ia(C, t, r, n);
|
|
864
864
|
let E = "";
|
|
865
|
-
qu(C) ? E =
|
|
865
|
+
qu(C) ? E = ws({
|
|
866
866
|
range: C,
|
|
867
867
|
unitId: _,
|
|
868
868
|
sheetName: d
|
|
@@ -881,7 +881,7 @@ class da extends Oe {
|
|
|
881
881
|
if (this._currentLexerNode.getChildren().length === 0)
|
|
882
882
|
return !0;
|
|
883
883
|
const e = this._currentLexerNode.getChildren()[0];
|
|
884
|
-
return !!(e instanceof ae || Dt.has(e) ||
|
|
884
|
+
return !!(e instanceof ae || Dt.has(e) || us.has(e) || e === Me.AT || e === K.COMMA || e === K.COLON || e === K.OPEN_BRACKET);
|
|
885
885
|
}
|
|
886
886
|
// eslint-disable-next-line complexity
|
|
887
887
|
getSequenceNode(e) {
|
|
@@ -989,7 +989,7 @@ class da extends Oe {
|
|
|
989
989
|
}
|
|
990
990
|
treeBuilder(e, t = !0, r, n) {
|
|
991
991
|
if (t === !0) {
|
|
992
|
-
const h =
|
|
992
|
+
const h = ls.get(e), d = n == null ? void 0 : n(e);
|
|
993
993
|
if (h && !d)
|
|
994
994
|
return h;
|
|
995
995
|
}
|
|
@@ -1009,7 +1009,7 @@ class da extends Oe {
|
|
|
1009
1009
|
if (f && (this._currentLexerNode = f), t) {
|
|
1010
1010
|
if (!this._suffixExpressionHandler(this._currentLexerNode))
|
|
1011
1011
|
return m.VALUE;
|
|
1012
|
-
|
|
1012
|
+
ls.set(e, this._currentLexerNode);
|
|
1013
1013
|
}
|
|
1014
1014
|
return u && this._currentLexerNode.setDefinedNames(l), this._currentLexerNode;
|
|
1015
1015
|
}
|
|
@@ -1255,7 +1255,7 @@ class da extends Oe {
|
|
|
1255
1255
|
const r = this._findPreviousToken(e, t) || "", n = e.length - 1 === t;
|
|
1256
1256
|
if (!n && this._isOperatorToken(r) || n && Ac(r))
|
|
1257
1257
|
return !0;
|
|
1258
|
-
if (
|
|
1258
|
+
if (us.has(r)) {
|
|
1259
1259
|
const s = this._findSecondLastNonSpaceToken(e, t);
|
|
1260
1260
|
if (s == null || bc(s))
|
|
1261
1261
|
return !0;
|
|
@@ -1364,7 +1364,7 @@ class da extends Oe {
|
|
|
1364
1364
|
return m.VALUE;
|
|
1365
1365
|
this._addSequenceArray(t, c, u), u++, this._addSequenceArray(t, l, u), u++, this._closeBracket();
|
|
1366
1366
|
continue;
|
|
1367
|
-
} else l && this._newAndPushCurrentLexerNode(
|
|
1367
|
+
} else l && this._newAndPushCurrentLexerNode(ft, u);
|
|
1368
1368
|
} else
|
|
1369
1369
|
this._pushNodeToChildren(c), this._openBracket(
|
|
1370
1370
|
0
|
|
@@ -1421,12 +1421,12 @@ class da extends Oe {
|
|
|
1421
1421
|
if (l === 1 || l == null) {
|
|
1422
1422
|
if (this._pushNodeToChildren(this._segment), this._resetSegment(), !this._setParentCurrentLexerNode() && u !== o - 1 && l != null)
|
|
1423
1423
|
return m.VALUE;
|
|
1424
|
-
this._newAndPushCurrentLexerNode(
|
|
1424
|
+
this._newAndPushCurrentLexerNode(ft, u);
|
|
1425
1425
|
} else {
|
|
1426
1426
|
const f = new ae();
|
|
1427
1427
|
f.setToken(Xc);
|
|
1428
1428
|
const h = new ae();
|
|
1429
|
-
h.setToken(
|
|
1429
|
+
h.setToken(ft), h.changeToParent(f);
|
|
1430
1430
|
const d = this._currentLexerNode.getParent();
|
|
1431
1431
|
if (d && d.getToken() === K.COLON) {
|
|
1432
1432
|
const _ = d.getParent();
|
|
@@ -1438,15 +1438,15 @@ class da extends Oe {
|
|
|
1438
1438
|
this._changeCurrentBracket(
|
|
1439
1439
|
1
|
|
1440
1440
|
/* FUNCTION */
|
|
1441
|
-
), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(
|
|
1441
|
+
), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(ft, u);
|
|
1442
1442
|
}
|
|
1443
1443
|
} else if (c === K.COLON && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isBracesClose() && this.isSquareBracketClose()) {
|
|
1444
1444
|
const l = new ae();
|
|
1445
1445
|
l.setToken(c);
|
|
1446
1446
|
const f = new ae();
|
|
1447
|
-
f.setToken(
|
|
1447
|
+
f.setToken(ft), f.setParent(l);
|
|
1448
1448
|
const h = new ae();
|
|
1449
|
-
h.setToken(
|
|
1449
|
+
h.setToken(ft), h.setParent(l), l.getChildren().push(f, h);
|
|
1450
1450
|
let d = l, _ = 0;
|
|
1451
1451
|
if (this._segmentCount() > 0) {
|
|
1452
1452
|
let C, E, b = 0;
|
|
@@ -1465,7 +1465,7 @@ class da extends Oe {
|
|
|
1465
1465
|
C && C.changeToParent(f);
|
|
1466
1466
|
}
|
|
1467
1467
|
this._setCurrentLexerNode(d), this._currentLexerNode = h, this._openColon(_);
|
|
1468
|
-
} else if (
|
|
1468
|
+
} else if (us.has(c) && this._checkSimilarErrorToken(c, u, s) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose() && this.isBracesClose()) {
|
|
1469
1469
|
this._pushNodeToChildren(this._segment);
|
|
1470
1470
|
const l = new ae();
|
|
1471
1471
|
l.setToken(c);
|
|
@@ -1904,7 +1904,7 @@ function fi(i, a, e, t) {
|
|
|
1904
1904
|
}
|
|
1905
1905
|
};
|
|
1906
1906
|
}
|
|
1907
|
-
const nl = class
|
|
1907
|
+
const nl = class xs {
|
|
1908
1908
|
/**
|
|
1909
1909
|
* Accept two comparable values and creates new instance of interval
|
|
1910
1910
|
* Predicate Interval.comparable_less(low, high) supposed to return true on these values
|
|
@@ -1919,7 +1919,7 @@ const nl = class Ps {
|
|
|
1919
1919
|
* @returns {Interval}
|
|
1920
1920
|
*/
|
|
1921
1921
|
clone() {
|
|
1922
|
-
return new
|
|
1922
|
+
return new xs(this.low, this.high);
|
|
1923
1923
|
}
|
|
1924
1924
|
/**
|
|
1925
1925
|
* Propery max returns clone of this interval
|
|
@@ -1966,7 +1966,7 @@ const nl = class Ps {
|
|
|
1966
1966
|
* @returns {Interval}
|
|
1967
1967
|
*/
|
|
1968
1968
|
merge(a) {
|
|
1969
|
-
return new
|
|
1969
|
+
return new xs(
|
|
1970
1970
|
this.low === void 0 ? a.low : this.low < a.low ? this.low : a.low,
|
|
1971
1971
|
this.high === void 0 ? a.high : this.high > a.high ? this.high : a.high
|
|
1972
1972
|
);
|
|
@@ -2412,8 +2412,8 @@ var al = Object.getOwnPropertyDescriptor, il = (i, a, e, t) => {
|
|
|
2412
2412
|
for (var r = t > 1 ? void 0 : t ? al(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
2413
2413
|
(s = i[n]) && (r = s(r) || r);
|
|
2414
2414
|
return r;
|
|
2415
|
-
},
|
|
2416
|
-
let
|
|
2415
|
+
}, hs = (i, a) => (e, t) => a(e, t, i);
|
|
2416
|
+
let js = class extends Oe {
|
|
2417
2417
|
constructor(a, e, t) {
|
|
2418
2418
|
super();
|
|
2419
2419
|
A(this, "_unitData", {});
|
|
@@ -2630,19 +2630,19 @@ let xs = class extends Oe {
|
|
|
2630
2630
|
}), this._unitData[e][t].rowData = a[e][t]);
|
|
2631
2631
|
}
|
|
2632
2632
|
};
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
],
|
|
2638
|
-
const Ft =
|
|
2633
|
+
js = il([
|
|
2634
|
+
hs(0, aa),
|
|
2635
|
+
hs(1, pe(Xu)),
|
|
2636
|
+
hs(2, pe(dr))
|
|
2637
|
+
], js);
|
|
2638
|
+
const Ft = lt(
|
|
2639
2639
|
"univer.formula.current-data.service"
|
|
2640
2640
|
);
|
|
2641
2641
|
var ol = Object.getOwnPropertyDescriptor, ul = (i, a, e, t) => {
|
|
2642
2642
|
for (var r = t > 1 ? void 0 : t ? ol(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
2643
2643
|
(s = i[n]) && (r = s(r) || r);
|
|
2644
2644
|
return r;
|
|
2645
|
-
},
|
|
2645
|
+
}, ms = (i, a) => (e, t) => a(e, t, i);
|
|
2646
2646
|
let Cr = class extends Oe {
|
|
2647
2647
|
constructor(i, a, e) {
|
|
2648
2648
|
super(), this._definedNamesService = i, this._lexerTreeBuilder = a, this._formulaCurrentConfigService = e;
|
|
@@ -2707,9 +2707,9 @@ let Cr = class extends Oe {
|
|
|
2707
2707
|
}
|
|
2708
2708
|
};
|
|
2709
2709
|
Cr = ul([
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2710
|
+
ms(0, Vr),
|
|
2711
|
+
ms(1, pe(da)),
|
|
2712
|
+
ms(2, Ft)
|
|
2713
2713
|
], Cr);
|
|
2714
2714
|
function on(i) {
|
|
2715
2715
|
if (i == null)
|
|
@@ -2786,16 +2786,16 @@ function Yb(i, a, e) {
|
|
|
2786
2786
|
const o = n || s;
|
|
2787
2787
|
return r.n.pattern = o, a;
|
|
2788
2788
|
}
|
|
2789
|
-
const
|
|
2789
|
+
const Us = new Nt(1e5);
|
|
2790
2790
|
function mi(i) {
|
|
2791
|
-
const a =
|
|
2791
|
+
const a = Us.get(i);
|
|
2792
2792
|
if (a !== void 0)
|
|
2793
2793
|
return a;
|
|
2794
2794
|
const e = hl(i);
|
|
2795
|
-
return
|
|
2795
|
+
return Us.set(i, e), e;
|
|
2796
2796
|
}
|
|
2797
2797
|
function fl() {
|
|
2798
|
-
|
|
2798
|
+
Us.clear();
|
|
2799
2799
|
}
|
|
2800
2800
|
function hl(i) {
|
|
2801
2801
|
if (ml(i))
|
|
@@ -2847,16 +2847,16 @@ function Cl(i) {
|
|
|
2847
2847
|
};
|
|
2848
2848
|
const t = gt.parseNumber(a);
|
|
2849
2849
|
if (t && t.z)
|
|
2850
|
-
return
|
|
2850
|
+
return gs(a, t.v, t.z);
|
|
2851
2851
|
const r = gt.parseDate(a);
|
|
2852
2852
|
if (r && r.z)
|
|
2853
|
-
return
|
|
2853
|
+
return gs(a, r.v, r.z);
|
|
2854
2854
|
const n = gt.parseTime(a);
|
|
2855
|
-
return n && n.z ?
|
|
2855
|
+
return n && n.z ? gs(a, n.v, n.z) : {
|
|
2856
2856
|
isNumberPattern: !1
|
|
2857
2857
|
};
|
|
2858
2858
|
}
|
|
2859
|
-
function
|
|
2859
|
+
function gs(i, a, e) {
|
|
2860
2860
|
return Aa.set(i, {
|
|
2861
2861
|
value: a,
|
|
2862
2862
|
pattern: e
|
|
@@ -2869,7 +2869,7 @@ function ms(i, a, e) {
|
|
|
2869
2869
|
function _l() {
|
|
2870
2870
|
Aa.clear();
|
|
2871
2871
|
}
|
|
2872
|
-
class
|
|
2872
|
+
class Fn {
|
|
2873
2873
|
constructor() {
|
|
2874
2874
|
A(this, "pattern", "");
|
|
2875
2875
|
}
|
|
@@ -2907,7 +2907,7 @@ class In {
|
|
|
2907
2907
|
return !1;
|
|
2908
2908
|
}
|
|
2909
2909
|
}
|
|
2910
|
-
class kt extends
|
|
2910
|
+
class kt extends Fn {
|
|
2911
2911
|
constructor(e) {
|
|
2912
2912
|
super();
|
|
2913
2913
|
A(this, "_customData");
|
|
@@ -3202,17 +3202,17 @@ class kt extends In {
|
|
|
3202
3202
|
return g.create(m.VALUE);
|
|
3203
3203
|
}
|
|
3204
3204
|
}
|
|
3205
|
-
const Al = 1e3,
|
|
3205
|
+
const Al = 1e3, vs = new Nt(Al);
|
|
3206
3206
|
class g extends kt {
|
|
3207
3207
|
constructor(a, e = "") {
|
|
3208
3208
|
super(a), this._errorType = a, this._errorContent = e;
|
|
3209
3209
|
}
|
|
3210
3210
|
static create(a, e = "") {
|
|
3211
|
-
const t = `${a}-${e}`, r =
|
|
3211
|
+
const t = `${a}-${e}`, r = vs.get(t);
|
|
3212
3212
|
if (r)
|
|
3213
3213
|
return r;
|
|
3214
3214
|
const n = new g(a, e);
|
|
3215
|
-
return
|
|
3215
|
+
return vs.set(t, n), n;
|
|
3216
3216
|
}
|
|
3217
3217
|
getValue() {
|
|
3218
3218
|
return this._errorType;
|
|
@@ -3243,13 +3243,13 @@ function El(i) {
|
|
|
3243
3243
|
return (i == null ? void 0 : i.v) || 0;
|
|
3244
3244
|
}
|
|
3245
3245
|
var Wt = /* @__PURE__ */ ((i) => (i[i.MIN = 0] = "MIN", i[i.MAX = 1] = "MAX", i))(Wt || {}), Le = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.MIN = 1] = "MIN", i[i.MAX = 2] = "MAX", i))(Le || {});
|
|
3246
|
-
function
|
|
3246
|
+
function _n() {
|
|
3247
3247
|
return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (i, a) => i.localeCompare(a);
|
|
3248
3248
|
}
|
|
3249
3249
|
function bl(i) {
|
|
3250
3250
|
return i.indexOf("*") > -1 || i.indexOf("?") > -1;
|
|
3251
3251
|
}
|
|
3252
|
-
function
|
|
3252
|
+
function ds(i, a) {
|
|
3253
3253
|
const e = Rl(a).replace(/~?[*?]/g, (r) => r.startsWith("~") ? `\\${r.substring(1)}` : r === "*" ? ".*" : r === "?" ? "." : r);
|
|
3254
3254
|
return new RegExp(`^${e}$`).test(i);
|
|
3255
3255
|
}
|
|
@@ -3260,14 +3260,14 @@ function yl(i, a, e) {
|
|
|
3260
3260
|
let t = !1;
|
|
3261
3261
|
switch (e) {
|
|
3262
3262
|
case $.EQUALS:
|
|
3263
|
-
t =
|
|
3263
|
+
t = ds(i, a);
|
|
3264
3264
|
break;
|
|
3265
3265
|
case $.NOT_EQUAL:
|
|
3266
|
-
t = !
|
|
3266
|
+
t = !ds(i, a);
|
|
3267
3267
|
break;
|
|
3268
3268
|
case $.GREATER_THAN:
|
|
3269
3269
|
case $.GREATER_THAN_OR_EQUAL:
|
|
3270
|
-
t =
|
|
3270
|
+
t = ds(i, a) || i > di(a);
|
|
3271
3271
|
break;
|
|
3272
3272
|
case $.LESS_THAN:
|
|
3273
3273
|
case $.LESS_THAN_OR_EQUAL:
|
|
@@ -3279,7 +3279,7 @@ function yl(i, a, e) {
|
|
|
3279
3279
|
function Rl(i) {
|
|
3280
3280
|
return i.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
3281
3281
|
}
|
|
3282
|
-
function
|
|
3282
|
+
function Ts(i) {
|
|
3283
3283
|
switch (i) {
|
|
3284
3284
|
case 1:
|
|
3285
3285
|
return 2;
|
|
@@ -3291,7 +3291,7 @@ function vs(i) {
|
|
|
3291
3291
|
return 0;
|
|
3292
3292
|
}
|
|
3293
3293
|
}
|
|
3294
|
-
function
|
|
3294
|
+
function Bs(i) {
|
|
3295
3295
|
return i === -2 ? 1 : 0;
|
|
3296
3296
|
}
|
|
3297
3297
|
function Ea(i) {
|
|
@@ -3319,13 +3319,13 @@ function Ea(i) {
|
|
|
3319
3319
|
return a;
|
|
3320
3320
|
}
|
|
3321
3321
|
/*!
|
|
3322
|
-
* decimal.js v10.
|
|
3322
|
+
* decimal.js v10.5.0
|
|
3323
3323
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
3324
3324
|
* https://github.com/MikeMcl/decimal.js
|
|
3325
|
-
* Copyright (c)
|
|
3325
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
3326
3326
|
* MIT Licence
|
|
3327
3327
|
*/
|
|
3328
|
-
var
|
|
3328
|
+
var Is = 9e15, $t = 1e9, Fs = "0123456789abcdef", An = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", En = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", ks = {
|
|
3329
3329
|
// These values must be integers within the stated ranges (inclusive).
|
|
3330
3330
|
// Most of these values can be changed at run-time using the `Decimal.config` method.
|
|
3331
3331
|
// The maximum number of significant digits of the result of a calculation or base conversion.
|
|
@@ -3378,12 +3378,12 @@ var Bs = 9e15, $t = 1e9, Is = "0123456789abcdef", _n = "2.3025850929940456840179
|
|
|
3378
3378
|
// -1 to -EXP_LIMIT
|
|
3379
3379
|
// The maximum exponent value, above which overflow to Infinity occurs.
|
|
3380
3380
|
// JavaScript numbers: 308 (1.7976931348623157e+308)
|
|
3381
|
-
maxE:
|
|
3381
|
+
maxE: Is,
|
|
3382
3382
|
// 1 to EXP_LIMIT
|
|
3383
3383
|
// Whether to use cryptographically-secure random number generation, if available.
|
|
3384
3384
|
crypto: !1
|
|
3385
3385
|
// true/false
|
|
3386
|
-
}, mo, pt, ue = !0,
|
|
3386
|
+
}, mo, pt, ue = !0, kn = "[DecimalError] ", Bt = kn + "Invalid argument: ", go = kn + "Precision limit exceeded", Co = kn + "crypto unavailable", _o = "[object Decimal]", Be = Math.floor, Pe = Math.pow, pl = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Vl = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Nl = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, Ao = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, ut = 1e7, te = 7, Ol = 9007199254740991, Ml = An.length - 1, $s = En.length - 1, B = { toStringTag: _o };
|
|
3387
3387
|
B.absoluteValue = B.abs = function() {
|
|
3388
3388
|
var i = new this.constructor(this);
|
|
3389
3389
|
return i.s < 0 && (i.s = 1), J(i);
|
|
@@ -3461,7 +3461,7 @@ B.hyperbolicCosine = B.cosh = function() {
|
|
|
3461
3461
|
var i, a, e, t, r, n = this, s = n.constructor, o = new s(1);
|
|
3462
3462
|
if (!n.isFinite()) return new s(n.s ? 1 / 0 : NaN);
|
|
3463
3463
|
if (n.isZero()) return o;
|
|
3464
|
-
e = s.precision, t = s.rounding, s.precision = e + Math.max(n.e, n.sd()) + 4, s.rounding = 1, r = n.d.length, r < 32 ? (i = Math.ceil(r / 3), a = (1 /
|
|
3464
|
+
e = s.precision, t = s.rounding, s.precision = e + Math.max(n.e, n.sd()) + 4, s.rounding = 1, r = n.d.length, r < 32 ? (i = Math.ceil(r / 3), a = (1 / Yn(4, i)).toString()) : (i = 16, a = "2.3283064365386962890625e-10"), n = _r(s, 1, n.times(a), new s(1), !0);
|
|
3465
3465
|
for (var u, c = i, l = new s(8); c--; )
|
|
3466
3466
|
u = n.times(n), n = o.minus(u.times(l.minus(u.times(l))));
|
|
3467
3467
|
return J(n, s.precision = e, s.rounding = t, !0);
|
|
@@ -3472,7 +3472,7 @@ B.hyperbolicSine = B.sinh = function() {
|
|
|
3472
3472
|
if (a = n.precision, e = n.rounding, n.precision = a + Math.max(r.e, r.sd()) + 4, n.rounding = 1, t = r.d.length, t < 3)
|
|
3473
3473
|
r = _r(n, 2, r, r, !0);
|
|
3474
3474
|
else {
|
|
3475
|
-
i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 /
|
|
3475
|
+
i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / Yn(5, i)), r = _r(n, 2, r, r, !0);
|
|
3476
3476
|
for (var s, o = new n(5), u = new n(16), c = new n(20); i--; )
|
|
3477
3477
|
s = r.times(r), r = r.times(o.plus(s.times(u.times(s).plus(c))));
|
|
3478
3478
|
}
|
|
@@ -3483,8 +3483,8 @@ B.hyperbolicTangent = B.tanh = function() {
|
|
|
3483
3483
|
return e.isFinite() ? e.isZero() ? new t(e) : (i = t.precision, a = t.rounding, t.precision = i + 7, t.rounding = 1, Ve(e.sinh(), e.cosh(), t.precision = i, t.rounding = a)) : new t(e.s);
|
|
3484
3484
|
};
|
|
3485
3485
|
B.inverseCosine = B.acos = function() {
|
|
3486
|
-
var i
|
|
3487
|
-
return
|
|
3486
|
+
var i = this, a = i.constructor, e = i.abs().cmp(1), t = a.precision, r = a.rounding;
|
|
3487
|
+
return e !== -1 ? e === 0 ? i.isNeg() ? mt(a, t, r) : new a(0) : new a(NaN) : i.isZero() ? mt(a, t + 4, r).times(0.5) : (a.precision = t + 6, a.rounding = 1, i = new a(1).minus(i).div(i.plus(1)).sqrt().atan(), a.precision = t, a.rounding = r, i.times(2));
|
|
3488
3488
|
};
|
|
3489
3489
|
B.inverseHyperbolicCosine = B.acosh = function() {
|
|
3490
3490
|
var i, a, e = this, t = e.constructor;
|
|
@@ -3500,19 +3500,19 @@ B.inverseHyperbolicTangent = B.atanh = function() {
|
|
|
3500
3500
|
};
|
|
3501
3501
|
B.inverseSine = B.asin = function() {
|
|
3502
3502
|
var i, a, e, t, r = this, n = r.constructor;
|
|
3503
|
-
return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i =
|
|
3503
|
+
return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i = mt(n, e + 4, t).times(0.5), i.s = r.s, i) : new n(NaN) : (n.precision = e + 6, n.rounding = 1, r = r.div(new n(1).minus(r.times(r)).sqrt().plus(1)).atan(), n.precision = e, n.rounding = t, r.times(2)));
|
|
3504
3504
|
};
|
|
3505
3505
|
B.inverseTangent = B.atan = function() {
|
|
3506
3506
|
var i, a, e, t, r, n, s, o, u, c = this, l = c.constructor, f = l.precision, h = l.rounding;
|
|
3507
3507
|
if (c.isFinite()) {
|
|
3508
3508
|
if (c.isZero())
|
|
3509
3509
|
return new l(c);
|
|
3510
|
-
if (c.abs().eq(1) && f + 4 <=
|
|
3511
|
-
return s =
|
|
3510
|
+
if (c.abs().eq(1) && f + 4 <= $s)
|
|
3511
|
+
return s = mt(l, f + 4, h).times(0.25), s.s = c.s, s;
|
|
3512
3512
|
} else {
|
|
3513
3513
|
if (!c.s) return new l(NaN);
|
|
3514
|
-
if (f + 4 <=
|
|
3515
|
-
return s =
|
|
3514
|
+
if (f + 4 <= $s)
|
|
3515
|
+
return s = mt(l, f + 4, h).times(0.5), s.s = c.s, s;
|
|
3516
3516
|
}
|
|
3517
3517
|
for (l.precision = o = f + 10, l.rounding = 1, e = Math.min(28, o / te + 2 | 0), i = e; i; --i) c = c.div(c.times(c).plus(1).sqrt().plus(1));
|
|
3518
3518
|
for (ue = !1, a = Math.ceil(o / te), t = 1, u = c.times(c), s = new l(c), r = c; i !== -1; )
|
|
@@ -3560,9 +3560,9 @@ B.logarithm = B.log = function(i) {
|
|
|
3560
3560
|
for (r = e[0]; r % 10 === 0; ) r /= 10;
|
|
3561
3561
|
n = r !== 1;
|
|
3562
3562
|
}
|
|
3563
|
-
if (ue = !1, o = f + d, s = jt(c, o), t = a ?
|
|
3563
|
+
if (ue = !1, o = f + d, s = jt(c, o), t = a ? bn(l, o + 10) : jt(i, o), u = Ve(s, t, o, 1), xr(u.d, r = f, h))
|
|
3564
3564
|
do
|
|
3565
|
-
if (o += 10, s = jt(c, o), t = a ?
|
|
3565
|
+
if (o += 10, s = jt(c, o), t = a ? bn(l, o + 10) : jt(i, o), u = Ve(s, t, o, 1), !n) {
|
|
3566
3566
|
+Ue(u.d).slice(r + 1, r + 15) + 1 == 1e14 && (u = J(u, f + 1, 0));
|
|
3567
3567
|
break;
|
|
3568
3568
|
}
|
|
@@ -3595,21 +3595,21 @@ B.minus = B.sub = function(i) {
|
|
|
3595
3595
|
for (f && (a = c, c = h, h = a, i.s = -i.s), s = c.length, t = h.length - s; t > 0; --t) c[s++] = 0;
|
|
3596
3596
|
for (t = h.length; t > n; ) {
|
|
3597
3597
|
if (c[--t] < h[t]) {
|
|
3598
|
-
for (r = t; r && c[--r] === 0; ) c[r] =
|
|
3599
|
-
--c[r], c[t] +=
|
|
3598
|
+
for (r = t; r && c[--r] === 0; ) c[r] = ut - 1;
|
|
3599
|
+
--c[r], c[t] += ut;
|
|
3600
3600
|
}
|
|
3601
3601
|
c[t] -= h[t];
|
|
3602
3602
|
}
|
|
3603
3603
|
for (; c[--s] === 0; ) c.pop();
|
|
3604
3604
|
for (; c[0] === 0; c.shift()) --e;
|
|
3605
|
-
return c[0] ? (i.d = c, i.e =
|
|
3605
|
+
return c[0] ? (i.d = c, i.e = $n(c, e), ue ? J(i, o, u) : i) : new _(u === 3 ? -0 : 0);
|
|
3606
3606
|
};
|
|
3607
3607
|
B.modulo = B.mod = function(i) {
|
|
3608
3608
|
var a, e = this, t = e.constructor;
|
|
3609
3609
|
return i = new t(i), !e.d || !i.s || i.d && !i.d[0] ? new t(NaN) : !i.d || e.d && !e.d[0] ? J(new t(e), t.precision, t.rounding) : (ue = !1, t.modulo == 9 ? (a = Ve(e, i.abs(), 0, 3, 1), a.s *= i.s) : a = Ve(e, i, 0, t.modulo, 1), a = a.times(i), ue = !0, e.minus(a));
|
|
3610
3610
|
};
|
|
3611
3611
|
B.naturalExponential = B.exp = function() {
|
|
3612
|
-
return
|
|
3612
|
+
return Ys(this);
|
|
3613
3613
|
};
|
|
3614
3614
|
B.naturalLogarithm = B.ln = function() {
|
|
3615
3615
|
return jt(this);
|
|
@@ -3631,9 +3631,9 @@ B.plus = B.add = function(i) {
|
|
|
3631
3631
|
e.reverse();
|
|
3632
3632
|
}
|
|
3633
3633
|
for (s = c.length, r = l.length, s - r < 0 && (r = s, e = l, l = c, c = e), a = 0; r; )
|
|
3634
|
-
a = (c[--r] = c[r] + l[r] + a) /
|
|
3634
|
+
a = (c[--r] = c[r] + l[r] + a) / ut | 0, c[r] %= ut;
|
|
3635
3635
|
for (a && (c.unshift(a), ++t), s = c.length; c[--s] == 0; ) c.pop();
|
|
3636
|
-
return i.d = c, i.e =
|
|
3636
|
+
return i.d = c, i.e = $n(c, t), ue ? J(i, o, u) : i;
|
|
3637
3637
|
};
|
|
3638
3638
|
B.precision = B.sd = function(i) {
|
|
3639
3639
|
var a, e = this;
|
|
@@ -3677,11 +3677,11 @@ B.times = B.mul = function(i) {
|
|
|
3677
3677
|
for (e = Be(l.e / te) + Be(i.e / te), u = h.length, c = d.length, u < c && (n = h, h = d, d = n, s = u, u = c, c = s), n = [], s = u + c, t = s; t--; ) n.push(0);
|
|
3678
3678
|
for (t = c; --t >= 0; ) {
|
|
3679
3679
|
for (a = 0, r = u + t; r > t; )
|
|
3680
|
-
o = n[r] + d[t] * h[r - t - 1] + a, n[r--] = o %
|
|
3681
|
-
n[r] = (n[r] + a) %
|
|
3680
|
+
o = n[r] + d[t] * h[r - t - 1] + a, n[r--] = o % ut | 0, a = o / ut | 0;
|
|
3681
|
+
n[r] = (n[r] + a) % ut | 0;
|
|
3682
3682
|
}
|
|
3683
3683
|
for (; !n[--s]; ) n.pop();
|
|
3684
|
-
return a ? ++e : n.shift(), i.d = n, i.e =
|
|
3684
|
+
return a ? ++e : n.shift(), i.d = n, i.e = $n(n, e), ue ? J(i, f.precision, f.rounding) : i;
|
|
3685
3685
|
};
|
|
3686
3686
|
B.toBinary = function(i, a) {
|
|
3687
3687
|
return ba(this, 2, i, a);
|
|
@@ -3744,7 +3744,7 @@ B.toPower = B.pow = function(i) {
|
|
|
3744
3744
|
if ((i.d[a] & 1) == 0 && (s = 1), o.e == 0 && o.d[0] == 1 && o.d.length == 1)
|
|
3745
3745
|
return o.s = s, o;
|
|
3746
3746
|
}
|
|
3747
|
-
return e = Pe(+o, c), a = e == 0 || !isFinite(e) ? Be(c * (Math.log("0." + Ue(o.d)) / Math.LN10 + o.e + 1)) : new u(e + "").e, a > u.maxE + 1 || a < u.minE - 1 ? new u(a > 0 ? s / 0 : 0) : (ue = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r =
|
|
3747
|
+
return e = Pe(+o, c), a = e == 0 || !isFinite(e) ? Be(c * (Math.log("0." + Ue(o.d)) / Math.LN10 + o.e + 1)) : new u(e + "").e, a > u.maxE + 1 || a < u.minE - 1 ? new u(a > 0 ? s / 0 : 0) : (ue = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = Ys(i.times(jt(o, t + e)), t), r.d && (r = J(r, t + 5, 1), xr(r.d, t, n) && (a = t + 10, r = J(Ys(i.times(jt(o, a + e)), a), a + 5, 1), +Ue(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = J(r, t + 1, 0)))), r.s = s, ue = !0, u.rounding = n, J(r, t, n));
|
|
3748
3748
|
};
|
|
3749
3749
|
B.toPrecision = function(i, a) {
|
|
3750
3750
|
var e, t = this, r = t.constructor;
|
|
@@ -3788,7 +3788,7 @@ function xr(i, a, e, t) {
|
|
|
3788
3788
|
function un(i, a, e) {
|
|
3789
3789
|
for (var t, r = [0], n, s = 0, o = i.length; s < o; ) {
|
|
3790
3790
|
for (n = r.length; n--; ) r[n] *= a;
|
|
3791
|
-
for (r[0] +=
|
|
3791
|
+
for (r[0] += Fs.indexOf(i.charAt(s++)), t = 0; t < r.length; t++)
|
|
3792
3792
|
r[t] > e - 1 && (r[t + 1] === void 0 && (r[t + 1] = 0), r[t + 1] += r[t] / e | 0, r[t] %= e);
|
|
3793
3793
|
}
|
|
3794
3794
|
return r.reverse();
|
|
@@ -3796,7 +3796,7 @@ function un(i, a, e) {
|
|
|
3796
3796
|
function wl(i, a) {
|
|
3797
3797
|
var e, t, r;
|
|
3798
3798
|
if (a.isZero()) return a;
|
|
3799
|
-
t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 /
|
|
3799
|
+
t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / Yn(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a = _r(i, 1, a.times(r), new i(1));
|
|
3800
3800
|
for (var n = e; n--; ) {
|
|
3801
3801
|
var s = a.times(a);
|
|
3802
3802
|
a = s.times(s).minus(s).times(8).plus(1);
|
|
@@ -3837,7 +3837,7 @@ var Ve = /* @__PURE__ */ function() {
|
|
|
3837
3837
|
z && z[0] == 0 || !G ? ne * 0 : ne / 0
|
|
3838
3838
|
)
|
|
3839
3839
|
);
|
|
3840
|
-
for (u ? (d = 1, l = t.e - r.e) : (u =
|
|
3840
|
+
for (u ? (d = 1, l = t.e - r.e) : (u = ut, d = te, l = Be(t.e / d) - Be(r.e / d)), x = G.length, L = z.length, b = new W(ne), R = b.d = [], f = 0; G[f] == (z[f] || 0); f++) ;
|
|
3841
3841
|
if (G[f] > (z[f] || 0) && l--, n == null ? (w = n = W.precision, s = W.rounding) : o ? w = n + (t.e - r.e) + 1 : w = n, w < 0)
|
|
3842
3842
|
R.push(1), _ = !0;
|
|
3843
3843
|
else {
|
|
@@ -3889,10 +3889,10 @@ function J(i, a, e, t) {
|
|
|
3889
3889
|
if (h == 0) {
|
|
3890
3890
|
for (n = 1, s = f[0]; s >= 10; s /= 10) n++;
|
|
3891
3891
|
for (s = f[0] += o, o = 1; s >= 10; s /= 10) o++;
|
|
3892
|
-
n != o && (i.e++, f[0] ==
|
|
3892
|
+
n != o && (i.e++, f[0] == ut && (f[0] = 1));
|
|
3893
3893
|
break;
|
|
3894
3894
|
} else {
|
|
3895
|
-
if (f[h] += o, f[h] !=
|
|
3895
|
+
if (f[h] += o, f[h] != ut) break;
|
|
3896
3896
|
f[h--] = 0, o = 1;
|
|
3897
3897
|
}
|
|
3898
3898
|
for (n = f.length; f[--n] === 0; ) f.pop();
|
|
@@ -3904,19 +3904,19 @@ function Ct(i, a, e) {
|
|
|
3904
3904
|
var t, r = i.e, n = Ue(i.d), s = n.length;
|
|
3905
3905
|
return a ? (e && (t = e - s) > 0 ? n = n.charAt(0) + "." + n.slice(1) + Lt(t) : s > 1 && (n = n.charAt(0) + "." + n.slice(1)), n = n + (i.e < 0 ? "e" : "e+") + i.e) : r < 0 ? (n = "0." + Lt(-r - 1) + n, e && (t = e - s) > 0 && (n += Lt(t))) : r >= s ? (n += Lt(r + 1 - s), e && (t = e - r - 1) > 0 && (n = n + "." + Lt(t))) : ((t = r + 1) < s && (n = n.slice(0, t) + "." + n.slice(t)), e && (t = e - s) > 0 && (r + 1 === s && (n += "."), n += Lt(t))), n;
|
|
3906
3906
|
}
|
|
3907
|
-
function
|
|
3907
|
+
function $n(i, a) {
|
|
3908
3908
|
var e = i[0];
|
|
3909
3909
|
for (a *= te; e >= 10; e /= 10) a++;
|
|
3910
3910
|
return a;
|
|
3911
3911
|
}
|
|
3912
|
-
function
|
|
3912
|
+
function bn(i, a, e) {
|
|
3913
3913
|
if (a > Ml)
|
|
3914
3914
|
throw ue = !0, e && (i.precision = e), Error(go);
|
|
3915
|
-
return J(new i(
|
|
3915
|
+
return J(new i(An), a, 1, !0);
|
|
3916
3916
|
}
|
|
3917
|
-
function
|
|
3918
|
-
if (a >
|
|
3919
|
-
return J(new i(
|
|
3917
|
+
function mt(i, a, e) {
|
|
3918
|
+
if (a > $s) throw Error(go);
|
|
3919
|
+
return J(new i(En), a, e, !0);
|
|
3920
3920
|
}
|
|
3921
3921
|
function Eo(i) {
|
|
3922
3922
|
var a = i.length - 1, e = a * te + 1;
|
|
@@ -3945,16 +3945,16 @@ function Ci(i) {
|
|
|
3945
3945
|
return i.d[i.d.length - 1] & 1;
|
|
3946
3946
|
}
|
|
3947
3947
|
function yo(i, a, e) {
|
|
3948
|
-
for (var t, r = new i(a[0]),
|
|
3949
|
-
if (
|
|
3950
|
-
|
|
3951
|
-
else {
|
|
3952
|
-
r = t;
|
|
3948
|
+
for (var t, r, n = new i(a[0]), s = 0; ++s < a.length; ) {
|
|
3949
|
+
if (r = new i(a[s]), !r.s) {
|
|
3950
|
+
n = r;
|
|
3953
3951
|
break;
|
|
3954
3952
|
}
|
|
3955
|
-
|
|
3953
|
+
t = n.cmp(r), (t === e || t === 0 && n.s === e) && (n = r);
|
|
3954
|
+
}
|
|
3955
|
+
return n;
|
|
3956
3956
|
}
|
|
3957
|
-
function
|
|
3957
|
+
function Ys(i, a) {
|
|
3958
3958
|
var e, t, r, n, s, o, u, c = 0, l = 0, f = 0, h = i.constructor, d = h.rounding, _ = h.precision;
|
|
3959
3959
|
if (!i.d || !i.d[0] || i.e > 17)
|
|
3960
3960
|
return new h(i.d ? i.d[0] ? i.s < 0 ? 0 : 1 / 0 : 1 : i.s ? i.s < 0 ? 0 : i : NaN);
|
|
@@ -3983,10 +3983,10 @@ function jt(i, a) {
|
|
|
3983
3983
|
C = C.times(i), e = Ue(C.d), t = e.charAt(0), d++;
|
|
3984
3984
|
n = C.e, t > 1 ? (C = new b("0." + e), n++) : C = new b(t + "." + e.slice(1));
|
|
3985
3985
|
} else
|
|
3986
|
-
return c =
|
|
3986
|
+
return c = bn(b, l + 2, p).times(n + ""), C = jt(new b(t + "." + e.slice(1)), l - _).plus(c), b.precision = p, a == null ? J(C, p, R, ue = !0) : C;
|
|
3987
3987
|
for (f = C, u = s = C = Ve(C.minus(1), C.plus(1), l, 1), h = J(C.times(C), l, 1), r = 3; ; ) {
|
|
3988
3988
|
if (s = J(s.times(h), l, 1), c = u.plus(Ve(s, new b(r), l, 1)), Ue(c.d).slice(0, l) === Ue(u.d).slice(0, l))
|
|
3989
|
-
if (u = u.times(2), n !== 0 && (u = u.plus(
|
|
3989
|
+
if (u = u.times(2), n !== 0 && (u = u.plus(bn(b, l + 2, p).times(n + ""))), u = Ve(u, new b(d), l, 1), a == null)
|
|
3990
3990
|
if (xr(u.d, l - _, R, o))
|
|
3991
3991
|
b.precision = l += _, c = s = C = Ve(f.minus(1), f.plus(1), l, 1), h = J(C.times(C), l, 1), r = o = 1;
|
|
3992
3992
|
else
|
|
@@ -3999,7 +3999,7 @@ function jt(i, a) {
|
|
|
3999
3999
|
function Ro(i) {
|
|
4000
4000
|
return String(i.s * i.s / 0);
|
|
4001
4001
|
}
|
|
4002
|
-
function
|
|
4002
|
+
function cn(i, a) {
|
|
4003
4003
|
var e, t, r;
|
|
4004
4004
|
for ((e = a.indexOf(".")) > -1 && (a = a.replace(".", "")), (t = a.search(/e/i)) > 0 ? (e < 0 && (e = t), e += +a.slice(t + 1), a = a.substring(0, t)) : e < 0 && (e = a.length), t = 0; a.charCodeAt(t) === 48; t++) ;
|
|
4005
4005
|
for (r = a.length; a.charCodeAt(r - 1) === 48; --r) ;
|
|
@@ -4018,7 +4018,7 @@ function Ys(i, a) {
|
|
|
4018
4018
|
function Sl(i, a) {
|
|
4019
4019
|
var e, t, r, n, s, o, u, c, l;
|
|
4020
4020
|
if (a.indexOf("_") > -1) {
|
|
4021
|
-
if (a = a.replace(/(\d)_(?=\d)/g, "$1"), Ao.test(a)) return
|
|
4021
|
+
if (a = a.replace(/(\d)_(?=\d)/g, "$1"), Ao.test(a)) return cn(i, a);
|
|
4022
4022
|
} else if (a === "Infinity" || a === "NaN")
|
|
4023
4023
|
return +a || (i.s = NaN), i.e = NaN, i.d = null, i;
|
|
4024
4024
|
if (Vl.test(a))
|
|
@@ -4029,14 +4029,14 @@ function Sl(i, a) {
|
|
|
4029
4029
|
e = 8;
|
|
4030
4030
|
else
|
|
4031
4031
|
throw Error(Bt + a);
|
|
4032
|
-
for (n = a.search(/p/i), n > 0 ? (u = +a.slice(n + 1), a = a.substring(2, n)) : a = a.slice(2), n = a.indexOf("."), s = n >= 0, t = i.constructor, s && (a = a.replace(".", ""), o = a.length, n = o - n, r = bo(t, new t(e), n, n * 2)), c = un(a, e,
|
|
4033
|
-
return n < 0 ? new t(i.s * 0) : (i.e =
|
|
4032
|
+
for (n = a.search(/p/i), n > 0 ? (u = +a.slice(n + 1), a = a.substring(2, n)) : a = a.slice(2), n = a.indexOf("."), s = n >= 0, t = i.constructor, s && (a = a.replace(".", ""), o = a.length, n = o - n, r = bo(t, new t(e), n, n * 2)), c = un(a, e, ut), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
|
|
4033
|
+
return n < 0 ? new t(i.s * 0) : (i.e = $n(c, l), i.d = c, ue = !1, s && (i = Ve(i, r, o * 4)), u && (i = i.times(Math.abs(u) < 54 ? Pe(2, u) : P.pow(2, u))), ue = !0, i);
|
|
4034
4034
|
}
|
|
4035
4035
|
function Dl(i, a) {
|
|
4036
4036
|
var e, t = a.d.length;
|
|
4037
4037
|
if (t < 3)
|
|
4038
4038
|
return a.isZero() ? a : _r(i, 2, a, a);
|
|
4039
|
-
e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 /
|
|
4039
|
+
e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / Yn(5, e)), a = _r(i, 2, a, a);
|
|
4040
4040
|
for (var r, n = new i(5), s = new i(16), o = new i(20); e--; )
|
|
4041
4041
|
r = a.times(a), a = a.times(n.plus(r.times(s.times(r).minus(o))));
|
|
4042
4042
|
return a;
|
|
@@ -4052,12 +4052,12 @@ function _r(i, a, e, t, r) {
|
|
|
4052
4052
|
}
|
|
4053
4053
|
return ue = !0, s.d.length = l + 1, s;
|
|
4054
4054
|
}
|
|
4055
|
-
function
|
|
4055
|
+
function Yn(i, a) {
|
|
4056
4056
|
for (var e = i; --a; ) e *= i;
|
|
4057
4057
|
return e;
|
|
4058
4058
|
}
|
|
4059
4059
|
function po(i, a) {
|
|
4060
|
-
var e, t = a.s < 0, r =
|
|
4060
|
+
var e, t = a.s < 0, r = mt(i, i.precision, 1), n = r.times(0.5);
|
|
4061
4061
|
if (a = a.abs(), a.lte(n))
|
|
4062
4062
|
return pt = t ? 4 : 1, a;
|
|
4063
4063
|
if (e = a.divToInt(r), e.isZero())
|
|
@@ -4082,13 +4082,13 @@ function ba(i, a, e, t) {
|
|
|
4082
4082
|
for (; ++f[--e] > r - 1; )
|
|
4083
4083
|
f[e] = 0, e || (++n, f.unshift(1));
|
|
4084
4084
|
for (u = f.length; !f[u - 1]; --u) ;
|
|
4085
|
-
for (s = 0, l = ""; s < u; s++) l +=
|
|
4085
|
+
for (s = 0, l = ""; s < u; s++) l += Fs.charAt(f[s]);
|
|
4086
4086
|
if (_) {
|
|
4087
4087
|
if (u > 1)
|
|
4088
4088
|
if (a == 16 || a == 8) {
|
|
4089
4089
|
for (s = a == 16 ? 4 : 3, --u; u % s; u++) l += "0";
|
|
4090
4090
|
for (f = un(l, r, a), u = f.length; !f[u - 1]; --u) ;
|
|
4091
|
-
for (s = 1, l = "1."; s < u; s++) l +=
|
|
4091
|
+
for (s = 1, l = "1."; s < u; s++) l += Fs.charAt(f[s]);
|
|
4092
4092
|
} else
|
|
4093
4093
|
l = l.charAt(0) + "." + l.slice(1);
|
|
4094
4094
|
l = l + (n < 0 ? "p" : "p+") + n;
|
|
@@ -4133,7 +4133,7 @@ function Bl(i) {
|
|
|
4133
4133
|
function Il(i, a) {
|
|
4134
4134
|
i = new this(i), a = new this(a);
|
|
4135
4135
|
var e, t = this.precision, r = this.rounding, n = t + 4;
|
|
4136
|
-
return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e =
|
|
4136
|
+
return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = mt(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? mt(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = mt(this, n, 1).times(0.5), e.s = i.s) : a.s < 0 ? (this.precision = n, this.rounding = 1, e = this.atan(Ve(i, a, n, 1)), a = mt(this, n, 1), this.precision = t, this.rounding = r, e = i.s < 0 ? e.minus(a) : e.plus(a)) : e = this.atan(Ve(i, a, n, 1)), e;
|
|
4137
4137
|
}
|
|
4138
4138
|
function Fl(i) {
|
|
4139
4139
|
return new this(i).cbrt();
|
|
@@ -4145,7 +4145,7 @@ function $l(i, a, e) {
|
|
|
4145
4145
|
return new this(i).clamp(a, e);
|
|
4146
4146
|
}
|
|
4147
4147
|
function Yl(i) {
|
|
4148
|
-
if (!i || typeof i != "object") throw Error(
|
|
4148
|
+
if (!i || typeof i != "object") throw Error(kn + "Object expected");
|
|
4149
4149
|
var a, e, t, r = i.defaults === !0, n = [
|
|
4150
4150
|
"precision",
|
|
4151
4151
|
1,
|
|
@@ -4158,10 +4158,10 @@ function Yl(i) {
|
|
|
4158
4158
|
0,
|
|
4159
4159
|
"toExpPos",
|
|
4160
4160
|
0,
|
|
4161
|
-
|
|
4161
|
+
Is,
|
|
4162
4162
|
"maxE",
|
|
4163
4163
|
0,
|
|
4164
|
-
|
|
4164
|
+
Is,
|
|
4165
4165
|
"minE",
|
|
4166
4166
|
-9e15,
|
|
4167
4167
|
0,
|
|
@@ -4170,10 +4170,10 @@ function Yl(i) {
|
|
|
4170
4170
|
9
|
|
4171
4171
|
];
|
|
4172
4172
|
for (a = 0; a < n.length; a += 3)
|
|
4173
|
-
if (e = n[a], r && (this[e] =
|
|
4173
|
+
if (e = n[a], r && (this[e] = ks[e]), (t = i[e]) !== void 0)
|
|
4174
4174
|
if (Be(t) === t && t >= n[a + 1] && t <= n[a + 2]) this[e] = t;
|
|
4175
4175
|
else throw Error(Bt + e + ": " + t);
|
|
4176
|
-
if (e = "crypto", r && (this[e] =
|
|
4176
|
+
if (e = "crypto", r && (this[e] = ks[e]), (t = i[e]) !== void 0)
|
|
4177
4177
|
if (t === !0 || t === !1 || t === 0 || t === 1)
|
|
4178
4178
|
if (t)
|
|
4179
4179
|
if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
|
|
@@ -4210,14 +4210,18 @@ function Vo(i) {
|
|
|
4210
4210
|
for (s = 0, o = n; o >= 10; o /= 10) s++;
|
|
4211
4211
|
ue ? s > r.maxE ? (c.e = NaN, c.d = null) : s < r.minE ? (c.e = 0, c.d = [0]) : (c.e = s, c.d = [n]) : (c.e = s, c.d = [n]);
|
|
4212
4212
|
return;
|
|
4213
|
-
}
|
|
4213
|
+
}
|
|
4214
|
+
if (n * 0 !== 0) {
|
|
4214
4215
|
n || (c.s = NaN), c.e = NaN, c.d = null;
|
|
4215
4216
|
return;
|
|
4216
4217
|
}
|
|
4217
|
-
return
|
|
4218
|
-
}
|
|
4219
|
-
|
|
4220
|
-
|
|
4218
|
+
return cn(c, n.toString());
|
|
4219
|
+
}
|
|
4220
|
+
if (u === "string")
|
|
4221
|
+
return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), Ao.test(n) ? cn(c, n) : Sl(c, n);
|
|
4222
|
+
if (u === "bigint")
|
|
4223
|
+
return n < 0 ? (n = -n, c.s = -1) : c.s = 1, cn(c, n.toString());
|
|
4224
|
+
throw Error(Bt + n);
|
|
4221
4225
|
}
|
|
4222
4226
|
if (r.prototype = B, r.ROUND_UP = 0, r.ROUND_DOWN = 1, r.ROUND_CEIL = 2, r.ROUND_FLOOR = 3, r.ROUND_HALF_UP = 4, r.ROUND_HALF_DOWN = 5, r.ROUND_HALF_EVEN = 6, r.ROUND_HALF_CEIL = 7, r.ROUND_HALF_FLOOR = 8, r.EUCLID = 9, r.config = r.set = Yl, r.clone = Vo, r.isDecimal = Ai, r.abs = Ll, r.acos = Pl, r.acosh = xl, r.add = jl, r.asin = Ul, r.asinh = vl, r.atan = Tl, r.atanh = Bl, r.atan2 = Il, r.cbrt = Fl, r.ceil = kl, r.clamp = $l, r.cos = Hl, r.cosh = Gl, r.div = Ql, r.exp = Wl, r.floor = ql, r.hypot = Kl, r.ln = Xl, r.log = Zl, r.log10 = Jl, r.log2 = zl, r.max = ef, r.min = tf, r.mod = rf, r.mul = nf, r.pow = sf, r.random = af, r.round = of, r.sign = uf, r.sin = cf, r.sinh = lf, r.sqrt = ff, r.sub = hf, r.sum = mf, r.tan = gf, r.tanh = df, r.trunc = Cf, i === void 0 && (i = {}), i && i.defaults !== !0)
|
|
4223
4227
|
for (t = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], a = 0; a < t.length; ) i.hasOwnProperty(e = t[a++]) || (i[e] = this[e]);
|
|
@@ -4260,10 +4264,10 @@ function Jl(i) {
|
|
|
4260
4264
|
return new this(i).log(10);
|
|
4261
4265
|
}
|
|
4262
4266
|
function ef() {
|
|
4263
|
-
return yo(this, arguments,
|
|
4267
|
+
return yo(this, arguments, -1);
|
|
4264
4268
|
}
|
|
4265
4269
|
function tf() {
|
|
4266
|
-
return yo(this, arguments,
|
|
4270
|
+
return yo(this, arguments, 1);
|
|
4267
4271
|
}
|
|
4268
4272
|
function rf(i, a) {
|
|
4269
4273
|
return new this(i).mod(a);
|
|
@@ -4331,9 +4335,9 @@ function Cf(i) {
|
|
|
4331
4335
|
}
|
|
4332
4336
|
B[Symbol.for("nodejs.util.inspect.custom")] = B.toString;
|
|
4333
4337
|
B[Symbol.toStringTag] = "Decimal";
|
|
4334
|
-
var P = B.constructor = Vo(
|
|
4335
|
-
_n = new P(_n);
|
|
4338
|
+
var P = B.constructor = Vo(ks);
|
|
4336
4339
|
An = new P(An);
|
|
4340
|
+
En = new P(En);
|
|
4337
4341
|
function _f(i, a) {
|
|
4338
4342
|
const e = i + a;
|
|
4339
4343
|
return Number.isSafeInteger(e) ? e : new P(i).add(a).toNumber();
|
|
@@ -4351,18 +4355,18 @@ function Ef(i, a) {
|
|
|
4351
4355
|
return Number.isSafeInteger(e) ? e : new P(i).div(a).toNumber();
|
|
4352
4356
|
}
|
|
4353
4357
|
function vt(i, a) {
|
|
4354
|
-
const e = 10 ** Math.trunc(a), t =
|
|
4358
|
+
const e = 10 ** Math.trunc(a), t = Hn(i, e);
|
|
4355
4359
|
return Math.round(Nr(i, e) + t) / e;
|
|
4356
4360
|
}
|
|
4357
4361
|
function We(i, a) {
|
|
4358
|
-
const e = 10 ** Math.trunc(a), t =
|
|
4362
|
+
const e = 10 ** Math.trunc(a), t = Hn(i, e);
|
|
4359
4363
|
return Math.floor(Nr(i, e) + t) / e;
|
|
4360
4364
|
}
|
|
4361
4365
|
function Ye(i, a) {
|
|
4362
|
-
const e = 10 ** Math.trunc(a), t =
|
|
4366
|
+
const e = 10 ** Math.trunc(a), t = Hn(i, e);
|
|
4363
4367
|
return Math.ceil(Nr(i, e) - t) / e;
|
|
4364
4368
|
}
|
|
4365
|
-
function
|
|
4369
|
+
function Hn(i, a) {
|
|
4366
4370
|
return Number.EPSILON * Math.max(1, Math.abs(Nr(i, a)));
|
|
4367
4371
|
}
|
|
4368
4372
|
function Ei(i, a) {
|
|
@@ -4402,9 +4406,9 @@ function Mf(i, a = 12, e = 1e-10) {
|
|
|
4402
4406
|
function wf(i) {
|
|
4403
4407
|
return i - Math.trunc(i);
|
|
4404
4408
|
}
|
|
4405
|
-
const
|
|
4409
|
+
const In = class In extends kt {
|
|
4406
4410
|
static create() {
|
|
4407
|
-
return this._instance = this._instance || new
|
|
4411
|
+
return this._instance = this._instance || new In(0), this._instance;
|
|
4408
4412
|
}
|
|
4409
4413
|
isNull() {
|
|
4410
4414
|
return !0;
|
|
@@ -4524,8 +4528,8 @@ const Bn = class Bn extends kt {
|
|
|
4524
4528
|
return T.create(!1);
|
|
4525
4529
|
}
|
|
4526
4530
|
};
|
|
4527
|
-
A(
|
|
4528
|
-
let ie =
|
|
4531
|
+
A(In, "_instance");
|
|
4532
|
+
let ie = In;
|
|
4529
4533
|
const qt = class qt extends kt {
|
|
4530
4534
|
constructor(e) {
|
|
4531
4535
|
super(e);
|
|
@@ -4670,7 +4674,7 @@ const qt = class qt extends kt {
|
|
|
4670
4674
|
return this._convertToNumber().ceil(e);
|
|
4671
4675
|
}
|
|
4672
4676
|
convertToNumberObjectValue() {
|
|
4673
|
-
return
|
|
4677
|
+
return Qn(this.getValue());
|
|
4674
4678
|
}
|
|
4675
4679
|
convertToBooleanObjectValue() {
|
|
4676
4680
|
return this;
|
|
@@ -5070,7 +5074,7 @@ class y extends kt {
|
|
|
5070
5074
|
return this;
|
|
5071
5075
|
}
|
|
5072
5076
|
convertToBooleanObjectValue() {
|
|
5073
|
-
return
|
|
5077
|
+
return Gn(!0);
|
|
5074
5078
|
}
|
|
5075
5079
|
_compareInfinity(e, t, r) {
|
|
5076
5080
|
let n = !1;
|
|
@@ -5189,7 +5193,7 @@ class j extends kt {
|
|
|
5189
5193
|
}
|
|
5190
5194
|
}
|
|
5191
5195
|
convertToNumberObjectValue() {
|
|
5192
|
-
return
|
|
5196
|
+
return Qn(this.getValue());
|
|
5193
5197
|
}
|
|
5194
5198
|
convertToBooleanObjectValue() {
|
|
5195
5199
|
return T.create(!0);
|
|
@@ -5199,7 +5203,7 @@ class j extends kt {
|
|
|
5199
5203
|
return T.create(n);
|
|
5200
5204
|
}
|
|
5201
5205
|
}
|
|
5202
|
-
function
|
|
5206
|
+
function Gn(i) {
|
|
5203
5207
|
if (typeof i == "boolean")
|
|
5204
5208
|
return T.create(i);
|
|
5205
5209
|
let a = !1;
|
|
@@ -5214,7 +5218,7 @@ function Df(i) {
|
|
|
5214
5218
|
let a = i.toString();
|
|
5215
5219
|
return a.charAt(0) === '"' && a.charAt(a.length - 1) === '"' && (a = a.slice(1, -1), a = a.replace(/""/g, '"')), j.create(a);
|
|
5216
5220
|
}
|
|
5217
|
-
function
|
|
5221
|
+
function Qn(i, a = "") {
|
|
5218
5222
|
if (typeof i == "boolean") {
|
|
5219
5223
|
let e = 0;
|
|
5220
5224
|
return i && (e = 1), y.create(e, a);
|
|
@@ -5570,7 +5574,7 @@ class q extends kt {
|
|
|
5570
5574
|
* @returns
|
|
5571
5575
|
*/
|
|
5572
5576
|
_binarySearch(e, t, r, n = Wt.MIN, s = Le.MIN) {
|
|
5573
|
-
const o =
|
|
5577
|
+
const o = _n(), u = Number(e.getValue()), c = !Number.isNaN(u);
|
|
5574
5578
|
let l = 0, f = t.length - 1, h = -1, d = -1, _ = -1;
|
|
5575
5579
|
for (; l <= f; ) {
|
|
5576
5580
|
const C = Math.floor((l + f) / 2), E = t[C];
|
|
@@ -5919,7 +5923,7 @@ class q extends kt {
|
|
|
5919
5923
|
this._flattenCache = null, this._sliceCache.clear();
|
|
5920
5924
|
}
|
|
5921
5925
|
_sort(e) {
|
|
5922
|
-
const t =
|
|
5926
|
+
const t = _n();
|
|
5923
5927
|
return (r, n) => {
|
|
5924
5928
|
const s = r[e], o = n[e];
|
|
5925
5929
|
return s == null ? 1 : o == null ? -1 : s.isError() && s.isError() ? 0 : s.isError() ? 1 : o.isError() ? -1 : t(
|
|
@@ -6231,7 +6235,7 @@ class Vt {
|
|
|
6231
6235
|
if (Rr.has(e))
|
|
6232
6236
|
return g.create(e);
|
|
6233
6237
|
if (e === er.TRUE || e === er.FALSE)
|
|
6234
|
-
return
|
|
6238
|
+
return Gn(a);
|
|
6235
6239
|
if (Q(a))
|
|
6236
6240
|
return y.create(Number(a));
|
|
6237
6241
|
const { isNumberPattern: t, value: r, pattern: n } = Cl(a);
|
|
@@ -6240,15 +6244,15 @@ class Vt {
|
|
|
6240
6244
|
const s = a.replace(/\n/g, "").replace(/\r/g, "");
|
|
6241
6245
|
return !xf(s) && Pc(s) ? q.create(s) : Df(a);
|
|
6242
6246
|
}
|
|
6243
|
-
return typeof a == "number" ?
|
|
6247
|
+
return typeof a == "number" ? Qn(a) : g.create(m.VALUE);
|
|
6244
6248
|
}
|
|
6245
6249
|
}
|
|
6246
6250
|
function xf(i) {
|
|
6247
6251
|
const a = i.trim();
|
|
6248
6252
|
return a.startsWith('"') && a.endsWith('"');
|
|
6249
6253
|
}
|
|
6250
|
-
const jf = 1e4,
|
|
6251
|
-
class
|
|
6254
|
+
const jf = 1e4, yn = new Nt(jf);
|
|
6255
|
+
class Wn extends Fn {
|
|
6252
6256
|
constructor(e) {
|
|
6253
6257
|
super();
|
|
6254
6258
|
A(this, "_forcedSheetId", "");
|
|
@@ -6482,9 +6486,9 @@ class Qn extends In {
|
|
|
6482
6486
|
return g.create(t);
|
|
6483
6487
|
if (e.t === Rt.NUMBER) {
|
|
6484
6488
|
const r = this._getPatternByCell(e);
|
|
6485
|
-
return cc(r) ? j.create(t.toString()) :
|
|
6489
|
+
return cc(r) ? j.create(t.toString()) : Qn(t, r);
|
|
6486
6490
|
}
|
|
6487
|
-
return e.t === Rt.STRING || e.t === Rt.FORCE_STRING ? j.create(t.toString()) : e.t === Rt.BOOLEAN ?
|
|
6491
|
+
return e.t === Rt.STRING || e.t === Rt.FORCE_STRING ? j.create(t.toString()) : e.t === Rt.BOOLEAN ? Gn(t) : Vt.create(t);
|
|
6488
6492
|
}
|
|
6489
6493
|
_getPatternByCell(e) {
|
|
6490
6494
|
var n;
|
|
@@ -6552,7 +6556,7 @@ class Qn extends In {
|
|
|
6552
6556
|
}
|
|
6553
6557
|
toArrayValueObject(e = !0) {
|
|
6554
6558
|
var _;
|
|
6555
|
-
const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u =
|
|
6559
|
+
const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u = yn.get(o);
|
|
6556
6560
|
if (u && e)
|
|
6557
6561
|
return u;
|
|
6558
6562
|
const c = r - t + 1, l = s - n + 1;
|
|
@@ -6572,7 +6576,7 @@ class Qn extends In {
|
|
|
6572
6576
|
row: t,
|
|
6573
6577
|
column: n
|
|
6574
6578
|
}, d = q.create(h);
|
|
6575
|
-
return e &&
|
|
6579
|
+
return e && yn.set(o, d), d;
|
|
6576
6580
|
}
|
|
6577
6581
|
toUnitRange() {
|
|
6578
6582
|
return {
|
|
@@ -6597,7 +6601,7 @@ class Qn extends In {
|
|
|
6597
6601
|
return q.create(e);
|
|
6598
6602
|
}
|
|
6599
6603
|
}
|
|
6600
|
-
class Uf extends
|
|
6604
|
+
class Uf extends Fn {
|
|
6601
6605
|
constructor(a) {
|
|
6602
6606
|
super(), this._promise = a;
|
|
6603
6607
|
}
|
|
@@ -6608,7 +6612,7 @@ class Uf extends In {
|
|
|
6608
6612
|
return this._promise;
|
|
6609
6613
|
}
|
|
6610
6614
|
}
|
|
6611
|
-
class vf extends
|
|
6615
|
+
class vf extends Fn {
|
|
6612
6616
|
constructor(a) {
|
|
6613
6617
|
super(), this._promiseList = a;
|
|
6614
6618
|
}
|
|
@@ -6638,7 +6642,7 @@ class vf extends In {
|
|
|
6638
6642
|
return q.create(e);
|
|
6639
6643
|
}
|
|
6640
6644
|
}
|
|
6641
|
-
class
|
|
6645
|
+
class Rn extends Wn {
|
|
6642
6646
|
constructor(a, e, t) {
|
|
6643
6647
|
super(""), this.setRangeData(a), e && this.setForcedSheetIdDirect(e), t && this.setForcedUnitIdDirect(t);
|
|
6644
6648
|
}
|
|
@@ -6646,7 +6650,7 @@ class yn extends Qn {
|
|
|
6646
6650
|
return !0;
|
|
6647
6651
|
}
|
|
6648
6652
|
}
|
|
6649
|
-
class ya extends
|
|
6653
|
+
class ya extends Wn {
|
|
6650
6654
|
constructor(a) {
|
|
6651
6655
|
super(a);
|
|
6652
6656
|
const e = gr(a);
|
|
@@ -6671,7 +6675,7 @@ class ya extends Qn {
|
|
|
6671
6675
|
return t > n ? (o.startRow = n, o.endRow = t) : (o.startRow = t, o.endRow = n), r > s ? (o.startColumn = s, o.endColumn = r) : (o.startColumn = r, o.endColumn = s), a.startAbsoluteRefType && (o.startAbsoluteRefType = a.startAbsoluteRefType), e.startAbsoluteRefType && (o.endAbsoluteRefType = e.startAbsoluteRefType), o;
|
|
6672
6676
|
}
|
|
6673
6677
|
_createRange(a) {
|
|
6674
|
-
const e = new
|
|
6678
|
+
const e = new Rn(
|
|
6675
6679
|
a,
|
|
6676
6680
|
this.getForcedSheetId(),
|
|
6677
6681
|
this.getForcedUnitId()
|
|
@@ -6685,7 +6689,7 @@ class ya extends Qn {
|
|
|
6685
6689
|
return s && e.setForcedUnitIdDirect(s), e;
|
|
6686
6690
|
}
|
|
6687
6691
|
}
|
|
6688
|
-
class Ra extends
|
|
6692
|
+
class Ra extends Wn {
|
|
6689
6693
|
constructor(a) {
|
|
6690
6694
|
super(a);
|
|
6691
6695
|
const e = gr(a);
|
|
@@ -6716,7 +6720,7 @@ class Ra extends Qn {
|
|
|
6716
6720
|
return n > s ? t.endColumn = n : (t.startColumn = n, t.endColumn = s), r.startAbsoluteRefType && (t.endAbsoluteRefType = r.startAbsoluteRefType), t.rangeType = Ze.COLUMN, this.setToken(`${this.getToken()}${K.COLON}${e.getToken()}`), this;
|
|
6717
6721
|
}
|
|
6718
6722
|
}
|
|
6719
|
-
class pa extends
|
|
6723
|
+
class pa extends Wn {
|
|
6720
6724
|
constructor(a) {
|
|
6721
6725
|
super(a);
|
|
6722
6726
|
const e = gr(a);
|
|
@@ -6806,7 +6810,7 @@ function Va(i) {
|
|
|
6806
6810
|
}
|
|
6807
6811
|
return [$.EQUALS, Vt.create(i)];
|
|
6808
6812
|
}
|
|
6809
|
-
function
|
|
6813
|
+
function qn(i, a, e, t) {
|
|
6810
6814
|
if (!e)
|
|
6811
6815
|
if (a.isString()) {
|
|
6812
6816
|
const r = `${a.getValue()}`, [n, s] = Va(r);
|
|
@@ -6819,7 +6823,7 @@ function Tf(i, a) {
|
|
|
6819
6823
|
const e = Math.max(i.isArray() ? i.getRowCount() : 1, a.isArray() ? a.getRowCount() : 1), t = Math.max(i.isArray() ? i.getColumnCount() : 1, a.isArray() ? a.getColumnCount() : 1), r = O(e, t, i), n = O(e, t, a);
|
|
6820
6824
|
return r.mapValue((s, o, u) => {
|
|
6821
6825
|
const c = n.get(o, u);
|
|
6822
|
-
return s != null && s.isError() ? s : c != null && c.isError() ? c : s != null && s.isBoolean() && (c != null && c.isBoolean()) ?
|
|
6826
|
+
return s != null && s.isError() ? s : c != null && c.isError() ? c : s != null && s.isBoolean() && (c != null && c.isBoolean()) ? Gn(s.getValue() && c.getValue()) : T.create(!1);
|
|
6823
6827
|
});
|
|
6824
6828
|
}
|
|
6825
6829
|
function Bf(i) {
|
|
@@ -6911,8 +6915,8 @@ function kr(i, a, e, t = !1) {
|
|
|
6911
6915
|
O(a, e, o, g.create(m.NA)).iterator((c, l, f) => {
|
|
6912
6916
|
if (!c)
|
|
6913
6917
|
return;
|
|
6914
|
-
let h =
|
|
6915
|
-
if (t && (h =
|
|
6918
|
+
let h = qn(s, c);
|
|
6919
|
+
if (t && (h = Kn(h, s, c)), r[l] === void 0 && (r[l] = []), r[l][f] === void 0) {
|
|
6916
6920
|
r[l][f] = h;
|
|
6917
6921
|
return;
|
|
6918
6922
|
}
|
|
@@ -6921,7 +6925,7 @@ function kr(i, a, e, t = !1) {
|
|
|
6921
6925
|
}
|
|
6922
6926
|
return r;
|
|
6923
6927
|
}
|
|
6924
|
-
function
|
|
6928
|
+
function Kn(i, a, e) {
|
|
6925
6929
|
const [t, r] = Va(`${e.getValue()}`);
|
|
6926
6930
|
return i.mapValue((n, s, o) => {
|
|
6927
6931
|
const u = a.get(s, o);
|
|
@@ -6950,7 +6954,7 @@ function If(i, a) {
|
|
|
6950
6954
|
const e = i.isString() && i.getValue() === "", t = a.isString() && a.getValue() === "";
|
|
6951
6955
|
return !!((e || i.isNull()) && (t || a.isNull()) || i.isString() && !e && a.isString() && !t);
|
|
6952
6956
|
}
|
|
6953
|
-
var
|
|
6957
|
+
var ln = /* @__PURE__ */ ((i) => (i[i.CELL = 0] = "CELL", i[i.COLUMN = 1] = "COLUMN", i[i.ROW = 2] = "ROW", i))(ln || {});
|
|
6954
6958
|
function Ff(i, a) {
|
|
6955
6959
|
let e;
|
|
6956
6960
|
switch (a) {
|
|
@@ -7308,7 +7312,7 @@ let Gs = class extends Oe {
|
|
|
7308
7312
|
Gs = Yf([
|
|
7309
7313
|
Hf(0, Ft)
|
|
7310
7314
|
], Gs);
|
|
7311
|
-
const Ot =
|
|
7315
|
+
const Ot = lt("univer.formula.runtime.service");
|
|
7312
7316
|
var oe = /* @__PURE__ */ ((i) => (i[i.REFERENCE = 1] = "REFERENCE", i[i.VALUE = 2] = "VALUE", i[i.OPERATOR = 3] = "OPERATOR", i[i.FUNCTION = 4] = "FUNCTION", i[i.LAMBDA = 5] = "LAMBDA", i[i.LAMBDA_PARAMETER = 6] = "LAMBDA_PARAMETER", i[i.ERROR = 7] = "ERROR", i[i.BASE = 8] = "BASE", i[i.ROOT = 9] = "ROOT", i[i.UNION = 10] = "UNION", i[i.PREFIX = 11] = "PREFIX", i[i.SUFFIX = 12] = "SUFFIX", i[i.NULL = 13] = "NULL", i))(oe || {});
|
|
7313
7317
|
const _t = /* @__PURE__ */ new Map([
|
|
7314
7318
|
[1, 7],
|
|
@@ -7498,7 +7502,7 @@ function Mo(i, a) {
|
|
|
7498
7502
|
function Qf(i, a, e) {
|
|
7499
7503
|
return !!(a != null && Mo(a, e));
|
|
7500
7504
|
}
|
|
7501
|
-
const Yt =
|
|
7505
|
+
const Yt = lt("univer.formula-function.service");
|
|
7502
7506
|
class Wf extends Oe {
|
|
7503
7507
|
constructor() {
|
|
7504
7508
|
super(...arguments);
|
|
@@ -7569,7 +7573,7 @@ var Te = /* @__PURE__ */ ((i) => (i.COMPARE = "COMPARE", i.DIVIDED = "DIVIDED",
|
|
|
7569
7573
|
(s = i[n]) && (r = s(r) || r);
|
|
7570
7574
|
return r;
|
|
7571
7575
|
}, Vi = (i, a) => (e, t) => a(e, t, i);
|
|
7572
|
-
class
|
|
7576
|
+
class pn extends Ge {
|
|
7573
7577
|
constructor(a, e, t) {
|
|
7574
7578
|
super(e), this._runtimeService = a, this._operatorString = e, this._functionExecutor = t;
|
|
7575
7579
|
}
|
|
@@ -7595,7 +7599,7 @@ class Rn extends Ge {
|
|
|
7595
7599
|
return l !== u && c !== o || o === c && u === l ? g.create(m.VALUE) : c === o && n >= u && n <= l ? e.getCellByColumn(n) : u === l && r >= o && r <= c ? e.getCellByRow(r) : e.isTable() ? e.getCellByPosition(r) : g.create(m.VALUE);
|
|
7596
7600
|
}
|
|
7597
7601
|
}
|
|
7598
|
-
let
|
|
7602
|
+
let Vn = class extends Et {
|
|
7599
7603
|
constructor(i, a) {
|
|
7600
7604
|
super(), this._functionService = i, this._runtimeService = a;
|
|
7601
7605
|
}
|
|
@@ -7611,15 +7615,15 @@ let pn = class extends Et {
|
|
|
7611
7615
|
let t = "";
|
|
7612
7616
|
if (e === Me.MINUS)
|
|
7613
7617
|
t = Te.MINUS;
|
|
7614
|
-
else return e === Me.AT ? new
|
|
7618
|
+
else return e === Me.AT ? new pn(this._runtimeService, e) : void 0;
|
|
7615
7619
|
const r = this._functionService.getExecutor(t);
|
|
7616
|
-
return r ? new
|
|
7620
|
+
return r ? new pn(this._runtimeService, e, r) : (console.error(`No function ${a}`), xe.create(m.NAME));
|
|
7617
7621
|
}
|
|
7618
7622
|
};
|
|
7619
|
-
|
|
7623
|
+
Vn = Kf([
|
|
7620
7624
|
Vi(0, Yt),
|
|
7621
7625
|
Vi(1, Ot)
|
|
7622
|
-
],
|
|
7626
|
+
], Vn);
|
|
7623
7627
|
new RegExp(Me.MINUS, "g");
|
|
7624
7628
|
new RegExp(Me.AT, "g");
|
|
7625
7629
|
function wo(i, a, e) {
|
|
@@ -7628,9 +7632,9 @@ function wo(i, a, e) {
|
|
|
7628
7632
|
let o = 0;
|
|
7629
7633
|
if (s[0] === Me.MINUS) {
|
|
7630
7634
|
const u = a.getExecutor(Te.MINUS);
|
|
7631
|
-
t = new
|
|
7635
|
+
t = new pn(e, Me.MINUS, u), o++;
|
|
7632
7636
|
}
|
|
7633
|
-
return s[0] === Me.AT && (r = new
|
|
7637
|
+
return s[0] === Me.AT && (r = new pn(e, Me.AT), t && r.setParent(t), o++), o > 0 && (n = n.slice(o)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: r };
|
|
7634
7638
|
}
|
|
7635
7639
|
var Xf = Object.getOwnPropertyDescriptor, Zf = (i, a, e, t) => {
|
|
7636
7640
|
for (var r = t > 1 ? void 0 : t ? Xf(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
@@ -7787,7 +7791,7 @@ class Jf extends Ge {
|
|
|
7787
7791
|
this.setValue(g.create(m.NAME));
|
|
7788
7792
|
}
|
|
7789
7793
|
}
|
|
7790
|
-
let
|
|
7794
|
+
let Nn = class extends Et {
|
|
7791
7795
|
constructor(i, a, e, t, r, n) {
|
|
7792
7796
|
super(), this._functionService = i, this._currentConfigService = a, this._runtimeService = e, this._definedNamesService = t, this._injector = r, this._formulaDataModel = n;
|
|
7793
7797
|
}
|
|
@@ -7822,14 +7826,14 @@ let Vn = class extends Et {
|
|
|
7822
7826
|
return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken()) === K.COLON;
|
|
7823
7827
|
}
|
|
7824
7828
|
};
|
|
7825
|
-
|
|
7829
|
+
Nn = Zf([
|
|
7826
7830
|
or(0, Yt),
|
|
7827
7831
|
or(1, Ft),
|
|
7828
7832
|
or(2, Ot),
|
|
7829
7833
|
or(3, Vr),
|
|
7830
7834
|
or(4, pe(Qi)),
|
|
7831
7835
|
or(5, pe(dr))
|
|
7832
|
-
],
|
|
7836
|
+
], Nn);
|
|
7833
7837
|
var eh = Object.getOwnPropertyDescriptor, th = (i, a, e, t) => {
|
|
7834
7838
|
for (var r = t > 1 ? void 0 : t ? eh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7835
7839
|
(s = i[n]) && (r = s(r) || r);
|
|
@@ -8051,7 +8055,7 @@ class ih extends Ge {
|
|
|
8051
8055
|
// return Promise.resolve(AstNodePromiseType.SUCCESS);
|
|
8052
8056
|
// }
|
|
8053
8057
|
}
|
|
8054
|
-
let
|
|
8058
|
+
let On = class extends Et {
|
|
8055
8059
|
constructor(i, a) {
|
|
8056
8060
|
super(), this._runtimeService = i, this._interpreter = a;
|
|
8057
8061
|
}
|
|
@@ -8089,10 +8093,10 @@ let Nn = class extends Et {
|
|
|
8089
8093
|
Na(i, a, e);
|
|
8090
8094
|
}
|
|
8091
8095
|
};
|
|
8092
|
-
|
|
8096
|
+
On = ah([
|
|
8093
8097
|
Ni(0, Ot),
|
|
8094
8098
|
Ni(1, pe(Ar))
|
|
8095
|
-
],
|
|
8099
|
+
], On);
|
|
8096
8100
|
function Lo(i) {
|
|
8097
8101
|
if (!i)
|
|
8098
8102
|
return;
|
|
@@ -8179,7 +8183,7 @@ class hh extends Ge {
|
|
|
8179
8183
|
);
|
|
8180
8184
|
}
|
|
8181
8185
|
}
|
|
8182
|
-
let
|
|
8186
|
+
let Mn = class extends Et {
|
|
8183
8187
|
constructor(i) {
|
|
8184
8188
|
super(), this._functionService = i;
|
|
8185
8189
|
}
|
|
@@ -8201,15 +8205,15 @@ let On = class extends Et {
|
|
|
8201
8205
|
return this.create(a);
|
|
8202
8206
|
}
|
|
8203
8207
|
};
|
|
8204
|
-
|
|
8208
|
+
Mn = lh([
|
|
8205
8209
|
fh(0, Yt)
|
|
8206
|
-
],
|
|
8210
|
+
], Mn);
|
|
8207
8211
|
var mh = Object.getOwnPropertyDescriptor, gh = (i, a, e, t) => {
|
|
8208
8212
|
for (var r = t > 1 ? void 0 : t ? mh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
8209
8213
|
(s = i[n]) && (r = s(r) || r);
|
|
8210
8214
|
return r;
|
|
8211
|
-
},
|
|
8212
|
-
class
|
|
8215
|
+
}, Cs = (i, a) => (e, t) => a(e, t, i);
|
|
8216
|
+
class _s extends Ge {
|
|
8213
8217
|
constructor(e, t, r, n, s = !1) {
|
|
8214
8218
|
super(r);
|
|
8215
8219
|
A(this, "_refOffsetX", 0);
|
|
@@ -8235,7 +8239,7 @@ class Cs extends Ge {
|
|
|
8235
8239
|
};
|
|
8236
8240
|
}
|
|
8237
8241
|
}
|
|
8238
|
-
let
|
|
8242
|
+
let wn = class extends Et {
|
|
8239
8243
|
constructor(i, a, e) {
|
|
8240
8244
|
super(), this._currentConfigService = i, this._formulaRuntimeService = a, this._functionService = e;
|
|
8241
8245
|
}
|
|
@@ -8250,7 +8254,7 @@ let Mn = class extends Et {
|
|
|
8250
8254
|
if (!a && s.charAt(0) === '"' && s.charAt(s.length - 1) === '"')
|
|
8251
8255
|
return;
|
|
8252
8256
|
let c;
|
|
8253
|
-
if (Br(s) ? c = new
|
|
8257
|
+
if (Br(s) ? c = new _s(r, n, s, ln.CELL, t) : a && this._checkParentIsUnionOperator(i) && (Ji(s) ? c = new _s(r, n, s, ln.ROW, t) : eo(s) && (c = new _s(r, n, s, ln.COLUMN, t))), c)
|
|
8254
8258
|
return u ? c.setParent(u) : o && c.setParent(o), c;
|
|
8255
8259
|
}
|
|
8256
8260
|
_checkParentIsUnionOperator(i) {
|
|
@@ -8258,16 +8262,16 @@ let Mn = class extends Et {
|
|
|
8258
8262
|
return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken().trim()) === K.COLON;
|
|
8259
8263
|
}
|
|
8260
8264
|
};
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
],
|
|
8265
|
+
wn = gh([
|
|
8266
|
+
Cs(0, Ft),
|
|
8267
|
+
Cs(1, Ot),
|
|
8268
|
+
Cs(2, Yt)
|
|
8269
|
+
], wn);
|
|
8266
8270
|
var dh = Object.getOwnPropertyDescriptor, Ch = (i, a, e, t) => {
|
|
8267
8271
|
for (var r = t > 1 ? void 0 : t ? dh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
8268
8272
|
(s = i[n]) && (r = s(r) || r);
|
|
8269
8273
|
return r;
|
|
8270
|
-
},
|
|
8274
|
+
}, As = (i, a) => (e, t) => a(e, t, i);
|
|
8271
8275
|
class Oi extends Ge {
|
|
8272
8276
|
constructor(a, e, t, r) {
|
|
8273
8277
|
super(t), this._currentConfigService = a, this._lexer = e, this._operatorString = t, this._functionExecutor = r;
|
|
@@ -8298,7 +8302,7 @@ class Oi extends Ge {
|
|
|
8298
8302
|
return o && this._lexer.treeBuilder(o), g.create(m.VALUE);
|
|
8299
8303
|
}
|
|
8300
8304
|
}
|
|
8301
|
-
let
|
|
8305
|
+
let Sn = class extends Et {
|
|
8302
8306
|
constructor(i, a, e) {
|
|
8303
8307
|
super(), this._functionService = i, this._lexer = a, this._currentConfigService = e;
|
|
8304
8308
|
}
|
|
@@ -8319,11 +8323,11 @@ let wn = class extends Et {
|
|
|
8319
8323
|
return t ? new Oi(this._currentConfigService, this._lexer, a, t) : (console.error(`No function ${i}`), xe.create(m.NAME));
|
|
8320
8324
|
}
|
|
8321
8325
|
};
|
|
8322
|
-
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8326
|
-
],
|
|
8326
|
+
Sn = Ch([
|
|
8327
|
+
As(0, Yt),
|
|
8328
|
+
As(1, pe(Cr)),
|
|
8329
|
+
As(2, Ft)
|
|
8330
|
+
], Sn);
|
|
8327
8331
|
var _h = Object.getOwnPropertyDescriptor, Ah = (i, a, e, t) => {
|
|
8328
8332
|
for (var r = t > 1 ? void 0 : t ? _h(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
8329
8333
|
(s = i[n]) && (r = s(r) || r);
|
|
@@ -8347,7 +8351,7 @@ class bh extends Ge {
|
|
|
8347
8351
|
return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(m.REF) : (a = a, e = e, kf(a, e));
|
|
8348
8352
|
}
|
|
8349
8353
|
}
|
|
8350
|
-
let
|
|
8354
|
+
let Dn = class extends Et {
|
|
8351
8355
|
constructor(i) {
|
|
8352
8356
|
super(), this._functionService = i;
|
|
8353
8357
|
}
|
|
@@ -8365,9 +8369,9 @@ let Sn = class extends Et {
|
|
|
8365
8369
|
return this.create(e);
|
|
8366
8370
|
}
|
|
8367
8371
|
};
|
|
8368
|
-
|
|
8372
|
+
Dn = Ah([
|
|
8369
8373
|
Eh(0, Yt)
|
|
8370
|
-
],
|
|
8374
|
+
], Dn);
|
|
8371
8375
|
class yh extends Ge {
|
|
8372
8376
|
constructor(a) {
|
|
8373
8377
|
super(a);
|
|
@@ -8473,7 +8477,7 @@ let Ur = class extends Oe {
|
|
|
8473
8477
|
const f = this._changeLetToLambda(a);
|
|
8474
8478
|
return f != null ? this._parse(f, e) : xe.create(m.ERROR);
|
|
8475
8479
|
}
|
|
8476
|
-
if (o ===
|
|
8480
|
+
if (o === ft) {
|
|
8477
8481
|
if (s = e, r === 0)
|
|
8478
8482
|
return new uh(Ut).setParent(e), s;
|
|
8479
8483
|
} else {
|
|
@@ -8494,7 +8498,7 @@ let Ur = class extends Oe {
|
|
|
8494
8498
|
continue;
|
|
8495
8499
|
let d = null;
|
|
8496
8500
|
if (h instanceof ae) {
|
|
8497
|
-
if (h.getToken() ===
|
|
8501
|
+
if (h.getToken() === ft && h.getChildren().length === 0) {
|
|
8498
8502
|
const _ = (l = h.getParent()) == null ? void 0 : l.getChildren();
|
|
8499
8503
|
if (_ && _.length === 1)
|
|
8500
8504
|
return xe.create(m.NAME);
|
|
@@ -8586,14 +8590,14 @@ let Ur = class extends Oe {
|
|
|
8586
8590
|
Ur = ph([
|
|
8587
8591
|
it(0, Ot),
|
|
8588
8592
|
it(1, pe(Oo)),
|
|
8589
|
-
it(2, pe(
|
|
8590
|
-
it(3, pe(
|
|
8593
|
+
it(2, pe(Nn)),
|
|
8594
|
+
it(3, pe(On)),
|
|
8591
8595
|
it(4, pe(Po)),
|
|
8592
|
-
it(5, pe(
|
|
8593
|
-
it(6, pe(
|
|
8594
|
-
it(7, pe(
|
|
8595
|
-
it(8, pe(
|
|
8596
|
-
it(9, pe(
|
|
8596
|
+
it(5, pe(Mn)),
|
|
8597
|
+
it(6, pe(Vn)),
|
|
8598
|
+
it(7, pe(wn)),
|
|
8599
|
+
it(8, pe(Sn)),
|
|
8600
|
+
it(9, pe(Dn)),
|
|
8597
8601
|
it(10, pe(xo))
|
|
8598
8602
|
], Ur);
|
|
8599
8603
|
class Vh extends Oe {
|
|
@@ -8608,7 +8612,7 @@ class Vh extends Oe {
|
|
|
8608
8612
|
A(this, "_definedNameMap", /* @__PURE__ */ new Map());
|
|
8609
8613
|
// unitId -> definedName -> treeId
|
|
8610
8614
|
A(this, "_otherFormulaDataMainData", /* @__PURE__ */ new Set());
|
|
8611
|
-
A(this, "_dependencyRTreeCache", new
|
|
8615
|
+
A(this, "_dependencyRTreeCache", new Ns());
|
|
8612
8616
|
A(this, "_dependencyTreeIdLast", 0);
|
|
8613
8617
|
}
|
|
8614
8618
|
buildDependencyTree(e, t) {
|
|
@@ -8940,7 +8944,7 @@ class Nh extends Vh {
|
|
|
8940
8944
|
this._allTreeMap.set(e.treeId, e);
|
|
8941
8945
|
}
|
|
8942
8946
|
}
|
|
8943
|
-
const
|
|
8947
|
+
const Xn = lt(
|
|
8944
8948
|
"univer.formula.dependency-manager.service"
|
|
8945
8949
|
);
|
|
8946
8950
|
class Oh extends Oe {
|
|
@@ -8986,7 +8990,7 @@ class Oh extends Oe {
|
|
|
8986
8990
|
return this._referenceExecutorMap;
|
|
8987
8991
|
}
|
|
8988
8992
|
}
|
|
8989
|
-
const vr =
|
|
8993
|
+
const vr = lt(
|
|
8990
8994
|
"univer.formula.feature-calculation-manager.service"
|
|
8991
8995
|
);
|
|
8992
8996
|
class Mh extends Oe {
|
|
@@ -9062,7 +9066,7 @@ class Mh extends Oe {
|
|
|
9062
9066
|
return this._otherFormulaData;
|
|
9063
9067
|
}
|
|
9064
9068
|
}
|
|
9065
|
-
const Ma =
|
|
9069
|
+
const Ma = lt(
|
|
9066
9070
|
"univer.formula.other-formula-manager.service"
|
|
9067
9071
|
);
|
|
9068
9072
|
var Ws = /* @__PURE__ */ ((i) => (i[i.NORMAL_FORMULA = 0] = "NORMAL_FORMULA", i[i.OTHER_FORMULA = 1] = "OTHER_FORMULA", i[i.FEATURE_FORMULA = 2] = "FEATURE_FORMULA", i))(Ws || {});
|
|
@@ -9205,7 +9209,7 @@ class Mi extends jo {
|
|
|
9205
9209
|
return this.refTree == null ? "" : this.refTree.formulaId;
|
|
9206
9210
|
}
|
|
9207
9211
|
}
|
|
9208
|
-
class
|
|
9212
|
+
class Es extends jo {
|
|
9209
9213
|
constructor(e) {
|
|
9210
9214
|
super();
|
|
9211
9215
|
A(this, "isCache", !1);
|
|
@@ -9350,12 +9354,12 @@ var wh = Object.getOwnPropertyDescriptor, Sh = (i, a, e, t) => {
|
|
|
9350
9354
|
function ur(i) {
|
|
9351
9355
|
return i.getLastTreeId() || 0;
|
|
9352
9356
|
}
|
|
9353
|
-
const qs =
|
|
9357
|
+
const qs = lt("engine-formula.dependency-generator");
|
|
9354
9358
|
let Ks = class extends Oe {
|
|
9355
9359
|
constructor(a, e, t, r, n, s, o, u) {
|
|
9356
9360
|
super();
|
|
9357
9361
|
A(this, "_updateRangeFlattenCache", /* @__PURE__ */ new Map());
|
|
9358
|
-
A(this, "_dependencyRTreeCacheForAddressFunction", new
|
|
9362
|
+
A(this, "_dependencyRTreeCacheForAddressFunction", new Ns());
|
|
9359
9363
|
A(this, "_executedAddressFunctionNodeIds", /* @__PURE__ */ new Set());
|
|
9360
9364
|
this._currentConfigService = a, this._runtimeService = e, this._otherFormulaManagerService = t, this._featureCalculationManagerService = r, this._interpreter = n, this._astTreeBuilder = s, this._lexer = o, this._dependencyManagerService = u;
|
|
9361
9365
|
}
|
|
@@ -9536,7 +9540,7 @@ let Ks = class extends Oe {
|
|
|
9536
9540
|
});
|
|
9537
9541
|
}
|
|
9538
9542
|
_getFeatureFormulaTree(a, e, t) {
|
|
9539
|
-
const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || ur(this._dependencyManagerService), c = new
|
|
9543
|
+
const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || ur(this._dependencyManagerService), c = new Es(u);
|
|
9540
9544
|
c.unitId = r, c.subUnitId = n, c.rangeList = s, c.getDirtyData = o;
|
|
9541
9545
|
const l = o(this._currentConfigService.getDirtyData(), this._runtimeService.getAllRuntimeData()), f = this._convertDirtyRangesToUnitRange(l.dirtyRanges);
|
|
9542
9546
|
return c.featureDirtyRanges = f, c.featureId = a, c.type = Ws.FEATURE_FORMULA, this._dependencyManagerService.addFeatureFormulaDependency(r, n, a, c), this._dependencyManagerService.getFeatureFormulaDependency(t.unitId, t.subUnitId, a) && (c.isCache = !0), c;
|
|
@@ -9556,7 +9560,7 @@ let Ks = class extends Oe {
|
|
|
9556
9560
|
const f = this._dependencyManagerService.hasOtherFormulaDataMainData(l), h = u[l], { f: d, ranges: _ } = h;
|
|
9557
9561
|
let C = !1;
|
|
9558
9562
|
f && (C = !0);
|
|
9559
|
-
const E = pi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: b, firstColumn: R } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), N = (p == null ? void 0 : p.getValue(0, 0)) || ur(this._dependencyManagerService), M = new
|
|
9563
|
+
const E = pi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: b, firstColumn: R } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), N = (p == null ? void 0 : p.getValue(0, 0)) || ur(this._dependencyManagerService), M = new Es(N);
|
|
9560
9564
|
for (let w = 0; w < _.length; w++) {
|
|
9561
9565
|
const S = _[w], { startRow: D, startColumn: L, endRow: U, endColumn: x } = S;
|
|
9562
9566
|
for (let F = D; F <= U; F++)
|
|
@@ -9617,7 +9621,7 @@ let Ks = class extends Oe {
|
|
|
9617
9621
|
}
|
|
9618
9622
|
}
|
|
9619
9623
|
_createFDtree(a, e, t, r, n, s) {
|
|
9620
|
-
const { f: o, x: u = 0, y: c = 0 } = s, l = new
|
|
9624
|
+
const { f: o, x: u = 0, y: c = 0 } = s, l = new Es(ur(this._dependencyManagerService)), f = n[a][e], h = pi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
|
|
9621
9625
|
return l.node = h, l.formula = o, l.unitId = a, l.subUnitId = e, l.row = t, l.column = r, l.rowCount = f.rowCount, l.columnCount = f.columnCount, l;
|
|
9622
9626
|
}
|
|
9623
9627
|
_createVirtualFDtree(a, e) {
|
|
@@ -9713,7 +9717,7 @@ let Ks = class extends Oe {
|
|
|
9713
9717
|
u.length !== 0 && await this._calculateAddressFunctionRuntimeData(a, u);
|
|
9714
9718
|
}
|
|
9715
9719
|
async _calculateListByFunctionRefNode(a) {
|
|
9716
|
-
const e = new
|
|
9720
|
+
const e = new Ns();
|
|
9717
9721
|
for (let t = 0, r = a.length; t < r; t++) {
|
|
9718
9722
|
const n = a[t];
|
|
9719
9723
|
e.insert({
|
|
@@ -9949,14 +9953,14 @@ Ks = Sh([
|
|
|
9949
9953
|
St(4, pe(Ar)),
|
|
9950
9954
|
St(5, pe(Ur)),
|
|
9951
9955
|
St(6, pe(Cr)),
|
|
9952
|
-
St(7,
|
|
9956
|
+
St(7, Xn)
|
|
9953
9957
|
], Ks);
|
|
9954
9958
|
var Dh = Object.getOwnPropertyDescriptor, Lh = (i, a, e, t) => {
|
|
9955
9959
|
for (var r = t > 1 ? void 0 : t ? Dh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
9956
9960
|
(s = i[n]) && (r = s(r) || r);
|
|
9957
9961
|
return r;
|
|
9958
9962
|
}, Qt = (i, a) => (e, t) => a(e, t, i);
|
|
9959
|
-
const Ph = 500, Xs =
|
|
9963
|
+
const Ph = 500, Xs = lt("engine-formula.calculate-formula.service");
|
|
9960
9964
|
let Zs = class extends Oe {
|
|
9961
9965
|
constructor(a, e, t, r, n, s, o) {
|
|
9962
9966
|
super();
|
|
@@ -9967,7 +9971,7 @@ let Zs = class extends Oe {
|
|
|
9967
9971
|
this._configService = a, this._lexer = e, this._currentConfigService = t, this._runtimeService = r, this._formulaDependencyGenerator = n, this._interpreter = s, this._astTreeBuilder = o;
|
|
9968
9972
|
}
|
|
9969
9973
|
dispose() {
|
|
9970
|
-
super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(),
|
|
9974
|
+
super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(), yn.clear(), bt.clear(), vs.clear(), Hs.clear();
|
|
9971
9975
|
}
|
|
9972
9976
|
/**
|
|
9973
9977
|
* Stop the execution of the formula.
|
|
@@ -9991,7 +9995,7 @@ let Zs = class extends Oe {
|
|
|
9991
9995
|
async execute(a) {
|
|
9992
9996
|
this._runtimeService.setFormulaExecuteStage(Xe.START), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._currentConfigService.load(a), this._runtimeService.reset();
|
|
9993
9997
|
const e = a.maxIteration || fo;
|
|
9994
|
-
for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._execute(),
|
|
9998
|
+
for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._execute(), yn.clear(), !!this._runtimeService.isCycleDependency()); t++)
|
|
9995
9999
|
;
|
|
9996
10000
|
this._runtimeService.setFormulaExecuteStage(Xe.CALCULATION_COMPLETED), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._executionCompleteListener$.next(this._runtimeService.getAllRuntimeData()), bt.clear(), this._runtimeService.reset();
|
|
9997
10001
|
}
|
|
@@ -10091,8 +10095,8 @@ var xh = Object.getOwnPropertyDescriptor, jh = (i, a, e, t) => {
|
|
|
10091
10095
|
for (var r = t > 1 ? void 0 : t ? xh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
10092
10096
|
(s = i[n]) && (r = s(r) || r);
|
|
10093
10097
|
return r;
|
|
10094
|
-
},
|
|
10095
|
-
let
|
|
10098
|
+
}, bs = (i, a) => (e, t) => a(e, t, i);
|
|
10099
|
+
let Ln = class extends Oe {
|
|
10096
10100
|
constructor(i, a, e) {
|
|
10097
10101
|
super(), this._commandService = i, this._calculateFormulaService = a, this._formulaDataModel = e, this._initialize();
|
|
10098
10102
|
}
|
|
@@ -10107,7 +10111,7 @@ let Dn = class extends Oe {
|
|
|
10107
10111
|
else if (i.id === so.id) {
|
|
10108
10112
|
const a = i.params;
|
|
10109
10113
|
this._calculate(a);
|
|
10110
|
-
} else if (i.id ===
|
|
10114
|
+
} else if (i.id === Ms.id) {
|
|
10111
10115
|
const a = i.params;
|
|
10112
10116
|
if (a == null)
|
|
10113
10117
|
return;
|
|
@@ -10150,7 +10154,7 @@ let Dn = class extends Oe {
|
|
|
10150
10154
|
break;
|
|
10151
10155
|
}
|
|
10152
10156
|
this._commandService.executeCommand(
|
|
10153
|
-
|
|
10157
|
+
Cn.id,
|
|
10154
10158
|
{
|
|
10155
10159
|
functionsExecutedState: a
|
|
10156
10160
|
},
|
|
@@ -10160,7 +10164,7 @@ let Dn = class extends Oe {
|
|
|
10160
10164
|
);
|
|
10161
10165
|
}), this._calculateFormulaService.executionInProgressListener$.subscribe((i) => {
|
|
10162
10166
|
this._commandService.executeCommand(
|
|
10163
|
-
|
|
10167
|
+
Cn.id,
|
|
10164
10168
|
{
|
|
10165
10169
|
stageInfo: i
|
|
10166
10170
|
},
|
|
@@ -10177,7 +10181,7 @@ let Dn = class extends Oe {
|
|
|
10177
10181
|
return;
|
|
10178
10182
|
}
|
|
10179
10183
|
t && (this._formulaDataModel.clearPreviousArrayFormulaCellData(n), this._formulaDataModel.mergeArrayFormulaCellData(r), this._formulaDataModel.mergeArrayFormulaRange(t), this._commandService.executeCommand(
|
|
10180
|
-
|
|
10184
|
+
Ms.id,
|
|
10181
10185
|
{
|
|
10182
10186
|
arrayFormulaRange: this._formulaDataModel.getArrayFormulaRange(),
|
|
10183
10187
|
arrayFormulaCellData: this._formulaDataModel.getArrayFormulaCellData()
|
|
@@ -10197,11 +10201,11 @@ let Dn = class extends Oe {
|
|
|
10197
10201
|
);
|
|
10198
10202
|
}
|
|
10199
10203
|
};
|
|
10200
|
-
|
|
10201
|
-
|
|
10202
|
-
|
|
10203
|
-
|
|
10204
|
-
],
|
|
10204
|
+
Ln = jh([
|
|
10205
|
+
bs(0, ar),
|
|
10206
|
+
bs(1, Xs),
|
|
10207
|
+
bs(2, pe(dr))
|
|
10208
|
+
], Ln);
|
|
10205
10209
|
const wi = /[\[\]]/g;
|
|
10206
10210
|
function Si(i, a) {
|
|
10207
10211
|
if (wi.test(i)) {
|
|
@@ -10210,7 +10214,7 @@ function Si(i, a) {
|
|
|
10210
10214
|
}
|
|
10211
10215
|
return Number(i) - 1;
|
|
10212
10216
|
}
|
|
10213
|
-
function
|
|
10217
|
+
function ys(i, a = 0, e = 0) {
|
|
10214
10218
|
i = i.toLocaleUpperCase();
|
|
10215
10219
|
const t = i.split(/[RC]/), r = t[1], n = t[2], s = Si(r, a), o = Si(n, e);
|
|
10216
10220
|
return {
|
|
@@ -10222,7 +10226,7 @@ function bs(i, a = 0, e = 0) {
|
|
|
10222
10226
|
function Uh(i, a = 0, e = 0) {
|
|
10223
10227
|
const { refBody: t, sheetName: r, unitId: n } = ca(i), s = t.indexOf(":");
|
|
10224
10228
|
if (s === -1) {
|
|
10225
|
-
const C =
|
|
10229
|
+
const C = ys(t, a, e), E = C.row, b = C.column, R = C.absoluteRefType;
|
|
10226
10230
|
return {
|
|
10227
10231
|
unitId: n,
|
|
10228
10232
|
sheetName: r,
|
|
@@ -10236,7 +10240,7 @@ function Uh(i, a = 0, e = 0) {
|
|
|
10236
10240
|
}
|
|
10237
10241
|
};
|
|
10238
10242
|
}
|
|
10239
|
-
const o = t.substring(0, s), u = t.substring(s + 1), c =
|
|
10243
|
+
const o = t.substring(0, s), u = t.substring(s + 1), c = ys(o, a, e), l = ys(u, a, e), f = c.row, h = c.column, d = l.row, _ = l.column;
|
|
10240
10244
|
return {
|
|
10241
10245
|
unitId: n,
|
|
10242
10246
|
sheetName: r,
|
|
@@ -10618,13 +10622,13 @@ class V {
|
|
|
10618
10622
|
return a;
|
|
10619
10623
|
}
|
|
10620
10624
|
createReferenceObject(a, e) {
|
|
10621
|
-
const t = a.getForcedUnitId(), r = a.getForcedSheetId() || "", n = a.getForcedSheetName(), o =
|
|
10625
|
+
const t = a.getForcedUnitId(), r = a.getForcedSheetId() || "", n = a.getForcedSheetName(), o = ws({
|
|
10622
10626
|
unitId: t,
|
|
10623
10627
|
sheetName: n,
|
|
10624
10628
|
range: e
|
|
10625
10629
|
});
|
|
10626
10630
|
let u;
|
|
10627
|
-
return Br(o) ? u = new ya(o) : Ji(o) ? u = new pa(o) : eo(o) ? u = new Ra(o) : u = new
|
|
10631
|
+
return Br(o) ? u = new ya(o) : Ji(o) ? u = new pa(o) : eo(o) ? u = new Ra(o) : u = new Rn(e, r, t), this._setReferenceDefault(a, u);
|
|
10628
10632
|
}
|
|
10629
10633
|
_setReferenceDefault(a, e) {
|
|
10630
10634
|
return this.unitId == null || this.subUnitId == null ? g.create(m.REF) : (e.setDefaultUnitId(this.unitId), e.setDefaultSheetId(this.subUnitId), e.setUnitData(a.getUnitData()), e.setRuntimeData(a.getRuntimeData()), e.setArrayFormulaCellData(a.getArrayFormulaCellData()), e.setRuntimeArrayFormulaCellData(a.getRuntimeArrayFormulaCellData()), e);
|
|
@@ -10925,7 +10929,7 @@ function Di(i, a) {
|
|
|
10925
10929
|
const e = Js(i, a);
|
|
10926
10930
|
return e === 0 ? 0 : Math.abs(i * a) / e;
|
|
10927
10931
|
}
|
|
10928
|
-
function
|
|
10932
|
+
function Zn(i) {
|
|
10929
10933
|
const a = i.length;
|
|
10930
10934
|
if (a === 1)
|
|
10931
10935
|
return i[0][0];
|
|
@@ -10933,11 +10937,11 @@ function Xn(i) {
|
|
|
10933
10937
|
return i[0][0] * i[1][1] - i[0][1] * i[1][0];
|
|
10934
10938
|
let e = 0;
|
|
10935
10939
|
for (let t = 0; t < a; t++)
|
|
10936
|
-
e += (t % 2 === 0 ? 1 : -1) * i[0][t] *
|
|
10940
|
+
e += (t % 2 === 0 ? 1 : -1) * i[0][t] * Zn(Uo(i, 0, t));
|
|
10937
10941
|
return e;
|
|
10938
10942
|
}
|
|
10939
10943
|
function kh(i) {
|
|
10940
|
-
const a =
|
|
10944
|
+
const a = Zn(i);
|
|
10941
10945
|
return a === 0 ? null : i.length === 1 ? [[1 / a]] : $h(i).map((r) => r.map((n) => n / a));
|
|
10942
10946
|
}
|
|
10943
10947
|
function Uo(i, a, e) {
|
|
@@ -10948,7 +10952,7 @@ function $h(i) {
|
|
|
10948
10952
|
for (let t = 0; t < a; t++)
|
|
10949
10953
|
for (let r = 0; r < a; r++) {
|
|
10950
10954
|
const n = (t + r) % 2 === 0 ? 1 : -1;
|
|
10951
|
-
e[r][t] = n *
|
|
10955
|
+
e[r][t] = n * Zn(Uo(i, t, r));
|
|
10952
10956
|
}
|
|
10953
10957
|
return e;
|
|
10954
10958
|
}
|
|
@@ -10957,7 +10961,7 @@ function fr(i, a) {
|
|
|
10957
10961
|
(t, r) => e.reduce((n, s, o) => n + s * a[o][r], 0)
|
|
10958
10962
|
));
|
|
10959
10963
|
}
|
|
10960
|
-
function
|
|
10964
|
+
function ht(i) {
|
|
10961
10965
|
return i[0].map((a, e) => i.map((t) => t[e]));
|
|
10962
10966
|
}
|
|
10963
10967
|
function Yh(i) {
|
|
@@ -10965,7 +10969,7 @@ function Yh(i) {
|
|
|
10965
10969
|
return a ? null : Gh(e, t);
|
|
10966
10970
|
}
|
|
10967
10971
|
function Hh(i) {
|
|
10968
|
-
const a =
|
|
10972
|
+
const a = ht(i), e = a.length, t = a[0].length;
|
|
10969
10973
|
let r = !0, n = !1;
|
|
10970
10974
|
const s = ea(e, t, 0), o = new Array(t).fill(0).map((u, c) => c);
|
|
10971
10975
|
for (let u = 0; u < t; u++) {
|
|
@@ -11043,26 +11047,26 @@ function Qh(i) {
|
|
|
11043
11047
|
const a = Wh(i);
|
|
11044
11048
|
if (!a)
|
|
11045
11049
|
return null;
|
|
11046
|
-
const { matrixU: e, matrixS: t, matrixV: r } = a, n =
|
|
11050
|
+
const { matrixU: e, matrixS: t, matrixV: r } = a, n = ht(e), s = Array.from({ length: t.length }, () => new Array(i[0].length).fill(0)), o = Math.max(i.length, i[0].length) * Number.EPSILON * t[0];
|
|
11047
11051
|
for (let u = 0; u < t.length; u++)
|
|
11048
11052
|
Math.abs(t[u]) > o && (s[u][u] = 1 / t[u]);
|
|
11049
11053
|
return fr(r, fr(s, n));
|
|
11050
11054
|
}
|
|
11051
11055
|
function Wh(i) {
|
|
11052
|
-
const a =
|
|
11056
|
+
const a = ht(i), e = a.length, t = a[0].length;
|
|
11053
11057
|
if (e < t)
|
|
11054
11058
|
return null;
|
|
11055
11059
|
const r = new Array(t).fill(0), n = new Array(t).fill(0), s = Array.from({ length: t }, () => new Array(t).fill(0));
|
|
11056
11060
|
let o = Number.EPSILON, u = 0, c = 0, l = 0;
|
|
11057
11061
|
for (let C = 0; C < t; C++) {
|
|
11058
|
-
if (r[C] = u, c =
|
|
11062
|
+
if (r[C] = u, c = Rs(a, C, e, C, C), c <= 1e-64 / o)
|
|
11059
11063
|
u = 0;
|
|
11060
11064
|
else {
|
|
11061
11065
|
u = Math.sqrt(c), a[C][C] >= 0 && (u = -u);
|
|
11062
11066
|
const b = a[C][C] * u - c;
|
|
11063
11067
|
a[C][C] -= u;
|
|
11064
11068
|
for (let R = C + 1; R < t; R++) {
|
|
11065
|
-
c =
|
|
11069
|
+
c = Rs(a, C, e, C, R);
|
|
11066
11070
|
for (let p = C; p < e; p++)
|
|
11067
11071
|
a[p][R] += c / b * a[p][C];
|
|
11068
11072
|
}
|
|
@@ -11107,7 +11111,7 @@ function Wh(i) {
|
|
|
11107
11111
|
a[C][E] = 0;
|
|
11108
11112
|
if (u !== 0) {
|
|
11109
11113
|
for (let E = C + 1; E < t; E++) {
|
|
11110
|
-
c =
|
|
11114
|
+
c = Rs(a, C + 1, e, C, E);
|
|
11111
11115
|
for (let b = C; b < e; b++)
|
|
11112
11116
|
a[b][E] += c / (a[C][C] * u) * a[b][C];
|
|
11113
11117
|
}
|
|
@@ -11196,7 +11200,7 @@ function Zr(i, a) {
|
|
|
11196
11200
|
let e = 0;
|
|
11197
11201
|
return Math.abs(i) > Math.abs(a) ? (e = a / i, Math.abs(i) * Math.sqrt(1 + e * e)) : a !== 0 ? (e = i / a, Math.abs(a) * Math.sqrt(1 + e * e)) : 0;
|
|
11198
11202
|
}
|
|
11199
|
-
function
|
|
11203
|
+
function Rs(i, a, e, t, r) {
|
|
11200
11204
|
let n = 0;
|
|
11201
11205
|
for (let s = a; s < e; s++)
|
|
11202
11206
|
n += i[s][t] * i[s][r];
|
|
@@ -11250,7 +11254,7 @@ const zr = /* @__PURE__ */ new Map([
|
|
|
11250
11254
|
[1, 4, 5, 9, 10, 40, 45, 49, 50, 90, 95, 99, 100, 400, 450, 490, 495, 499, 500, 900, 950, 990, 995, 999, 1e3, 4e3]
|
|
11251
11255
|
];
|
|
11252
11256
|
function vo(i, a, e) {
|
|
11253
|
-
return i <= 0 ? 0 : i >= 1 ? 1 :
|
|
11257
|
+
return i <= 0 ? 0 : i >= 1 ? 1 : zn(i, a, e);
|
|
11254
11258
|
}
|
|
11255
11259
|
function Xh(i, a, e) {
|
|
11256
11260
|
return i <= 0 || i >= 1 ? 0 : a === 1 && e === 1 ? 1 : a < 512 && e < 512 ? i ** (a - 1) * (1 - i) ** (e - 1) / xa(a, e) : Math.exp((a - 1) * Math.log(i) + (e - 1) * Math.log(1 - i) - ja(a, e));
|
|
@@ -11276,13 +11280,13 @@ function Pa(i, a, e) {
|
|
|
11276
11280
|
for (let c = 0; c < 10; c++) {
|
|
11277
11281
|
if (r === 0 || r === 1)
|
|
11278
11282
|
return r;
|
|
11279
|
-
if (s =
|
|
11283
|
+
if (s = zn(r, a, e) - i, o = Math.exp((a - 1) * Math.log(r) + (e - 1) * Math.log(1 - r) + n), u = s / o, r -= o = u / (1 - 0.5 * Math.min(1, u * ((a - 1) / r - (e - 1) / (1 - r)))), r <= 0 && (r = 0.5 * (r + o)), r >= 1 && (r = 0.5 * (r + o + 1)), Math.abs(o) < t * r && c > 0)
|
|
11280
11284
|
break;
|
|
11281
11285
|
}
|
|
11282
11286
|
return r;
|
|
11283
11287
|
}
|
|
11284
|
-
function
|
|
11285
|
-
const t = i === 0 || i === 1 ? 0 : Math.exp(
|
|
11288
|
+
function zn(i, a, e) {
|
|
11289
|
+
const t = i === 0 || i === 1 ? 0 : Math.exp(ct(a + e) - ct(a) - ct(e) + a * Math.log(i) + e * Math.log(1 - i));
|
|
11286
11290
|
return i < (a + 1) / (a + e + 2) ? t * Pi(i, a, e) / a : 1 - t * Pi(1 - i, e, a) / e;
|
|
11287
11291
|
}
|
|
11288
11292
|
function Pi(i, a, e) {
|
|
@@ -11297,10 +11301,10 @@ function Pi(i, a, e) {
|
|
|
11297
11301
|
return o;
|
|
11298
11302
|
}
|
|
11299
11303
|
function xa(i, a) {
|
|
11300
|
-
return i + a > 170 ? Math.exp(ja(i, a)) :
|
|
11304
|
+
return i + a > 170 ? Math.exp(ja(i, a)) : fn(i) * fn(a) / fn(i + a);
|
|
11301
11305
|
}
|
|
11302
11306
|
function ja(i, a) {
|
|
11303
|
-
return
|
|
11307
|
+
return ct(i) + ct(a) - ct(i + a);
|
|
11304
11308
|
}
|
|
11305
11309
|
function To(i, a, e) {
|
|
11306
11310
|
if (i < 0)
|
|
@@ -11321,13 +11325,13 @@ function va(i, a) {
|
|
|
11321
11325
|
return i <= 0 ? 0 : Ba(a / 2, i / 2);
|
|
11322
11326
|
}
|
|
11323
11327
|
function Zh(i, a) {
|
|
11324
|
-
return i < 0 ? 0 : i === 0 && a === 2 ? 0.5 : Math.exp((a / 2 - 1) * Math.log(i) - i / 2 - a / 2 * Math.log(2) -
|
|
11328
|
+
return i < 0 ? 0 : i === 0 && a === 2 ? 0.5 : Math.exp((a / 2 - 1) * Math.log(i) - i / 2 - a / 2 * Math.log(2) - ct(a / 2));
|
|
11325
11329
|
}
|
|
11326
11330
|
function Bo(i, a) {
|
|
11327
11331
|
return i <= 0 ? 0 : i >= 1 ? 1 / 0 : 2 * ko(i, a / 2);
|
|
11328
11332
|
}
|
|
11329
11333
|
function Ta(i, a, e) {
|
|
11330
|
-
return i < 0 ? 0 :
|
|
11334
|
+
return i < 0 ? 0 : zn(a * i / (a * i + e), a / 2, e / 2);
|
|
11331
11335
|
}
|
|
11332
11336
|
function zh(i, a, e) {
|
|
11333
11337
|
if (i < 0)
|
|
@@ -11362,7 +11366,7 @@ function Fo(i, a, e) {
|
|
|
11362
11366
|
const l = u / c;
|
|
11363
11367
|
return s - l * o + l * i;
|
|
11364
11368
|
}
|
|
11365
|
-
function
|
|
11369
|
+
function fn(i) {
|
|
11366
11370
|
const a = [
|
|
11367
11371
|
-1.716185138865495,
|
|
11368
11372
|
24.76565080557592,
|
|
@@ -11412,12 +11416,12 @@ function tm(i, a, e) {
|
|
|
11412
11416
|
return i <= 0 ? 0 : Ba(a, i / e);
|
|
11413
11417
|
}
|
|
11414
11418
|
function rm(i, a, e) {
|
|
11415
|
-
return i < 0 ? 0 : i === 0 && a === 1 ? 1 / e : Math.exp((a - 1) * Math.log(i) - i / e -
|
|
11419
|
+
return i < 0 ? 0 : i === 0 && a === 1 ? 1 / e : Math.exp((a - 1) * Math.log(i) - i / e - ct(a) - a * Math.log(e));
|
|
11416
11420
|
}
|
|
11417
11421
|
function nm(i, a, e) {
|
|
11418
11422
|
return i <= 0 ? 0 : i >= 1 ? 1 / 0 : e * ko(i, a);
|
|
11419
11423
|
}
|
|
11420
|
-
function
|
|
11424
|
+
function ct(i) {
|
|
11421
11425
|
const a = [
|
|
11422
11426
|
76.18009172947146,
|
|
11423
11427
|
-86.50532032941678,
|
|
@@ -11437,7 +11441,7 @@ function lt(i) {
|
|
|
11437
11441
|
function Ba(i, a) {
|
|
11438
11442
|
if (a < 0 || i <= 0)
|
|
11439
11443
|
return Number.NaN;
|
|
11440
|
-
const e = 1e-30, t = -~(Math.log(i >= 1 ? i : 1 / i) * 8.5 + i * 0.4 + 17), r =
|
|
11444
|
+
const e = 1e-30, t = -~(Math.log(i >= 1 ? i : 1 / i) * 8.5 + i * 0.4 + 17), r = ct(i), n = Math.exp(-a + i * Math.log(a) - r);
|
|
11441
11445
|
let s = i, o = 1 / i, u = o;
|
|
11442
11446
|
if (a < i + 1) {
|
|
11443
11447
|
if (n === 0)
|
|
@@ -11469,7 +11473,7 @@ function ko(i, a) {
|
|
|
11469
11473
|
const o = 1 - a * (0.253 + a * 0.12);
|
|
11470
11474
|
i < o ? e = (i / o) ** (1 / a) : e = 1 - Math.log(1 - (i - o) / (1 - o));
|
|
11471
11475
|
}
|
|
11472
|
-
const t = 1e-8, r =
|
|
11476
|
+
const t = 1e-8, r = ct(a);
|
|
11473
11477
|
let n, s;
|
|
11474
11478
|
for (let o = 0; o < 12; o++) {
|
|
11475
11479
|
if (e <= 0)
|
|
@@ -11495,7 +11499,7 @@ function am(i, a, e) {
|
|
|
11495
11499
|
return i <= 0 ? 0 : Math.exp(-Math.log(i) - 0.5 * Math.log(2 * Math.PI) - Math.log(e) - (Math.log(i) - a) ** 2 / (2 * e * e));
|
|
11496
11500
|
}
|
|
11497
11501
|
function im(i, a, e) {
|
|
11498
|
-
return Math.exp(
|
|
11502
|
+
return Math.exp(Jn(i, a, e));
|
|
11499
11503
|
}
|
|
11500
11504
|
function om(i, a, e) {
|
|
11501
11505
|
if (i < 0)
|
|
@@ -11514,7 +11518,7 @@ function Yr(i, a, e) {
|
|
|
11514
11518
|
function Yo(i, a, e) {
|
|
11515
11519
|
return Math.exp(-0.5 * Math.log(2 * Math.PI) - Math.log(e) - (i - a) ** 2 / (2 * e * e));
|
|
11516
11520
|
}
|
|
11517
|
-
function
|
|
11521
|
+
function Jn(i, a, e) {
|
|
11518
11522
|
return -1.4142135623730951 * e * Fh(2 * i) + a;
|
|
11519
11523
|
}
|
|
11520
11524
|
function um(i, a) {
|
|
@@ -11527,14 +11531,14 @@ function Ho(i, a) {
|
|
|
11527
11531
|
return Math.exp(-a) * a ** i / lr(i);
|
|
11528
11532
|
}
|
|
11529
11533
|
function Hr(i, a) {
|
|
11530
|
-
const e = 0.5 *
|
|
11534
|
+
const e = 0.5 * zn(a / (i ** 2 + a), a / 2, 0.5);
|
|
11531
11535
|
return i < 0 ? e : 1 - e;
|
|
11532
11536
|
}
|
|
11533
11537
|
function cm(i, a) {
|
|
11534
11538
|
const e = (1 + i ** 2 / a) ** (-(a + 1) / 2);
|
|
11535
11539
|
return 1 / (Math.sqrt(a) * xa(0.5, a / 2)) * e;
|
|
11536
11540
|
}
|
|
11537
|
-
function
|
|
11541
|
+
function es(i, a) {
|
|
11538
11542
|
let e = Pa(2 * Math.min(i, 1 - i), 0.5 * a, 0.5);
|
|
11539
11543
|
return e = Math.sqrt(a * (1 - e) / e), i > 0.5 ? e : -e;
|
|
11540
11544
|
}
|
|
@@ -11572,7 +11576,7 @@ function et(i, a, e, t, r) {
|
|
|
11572
11576
|
noCalculate: o
|
|
11573
11577
|
};
|
|
11574
11578
|
}
|
|
11575
|
-
function
|
|
11579
|
+
function ts(i, a, e) {
|
|
11576
11580
|
const t = i.isArray() ? i.getRowCount() : 1, r = i.isArray() ? i.getColumnCount() : 1;
|
|
11577
11581
|
let n = t, s = r;
|
|
11578
11582
|
if (a && !a.isNull() && (n = a.isArray() ? a.getRowCount() : 1, s = a.isArray() ? a.getColumnCount() : 1, t === 1 && s !== r || r === 1 && n !== t || t !== 1 && r !== 1 && (n !== t || s !== r)))
|
|
@@ -11606,7 +11610,7 @@ function dt(i) {
|
|
|
11606
11610
|
}
|
|
11607
11611
|
return t;
|
|
11608
11612
|
}
|
|
11609
|
-
function
|
|
11613
|
+
function rs(i, a) {
|
|
11610
11614
|
const e = [];
|
|
11611
11615
|
let t = 1;
|
|
11612
11616
|
for (let r = 0; r < i; r++) {
|
|
@@ -11616,7 +11620,7 @@ function ts(i, a) {
|
|
|
11616
11620
|
}
|
|
11617
11621
|
return e;
|
|
11618
11622
|
}
|
|
11619
|
-
function
|
|
11623
|
+
function ns(i, a, e, t) {
|
|
11620
11624
|
let r = a;
|
|
11621
11625
|
t && (r = a.map((o) => Math.log(o)));
|
|
11622
11626
|
let n, s;
|
|
@@ -11678,18 +11682,18 @@ function fm(i, a) {
|
|
|
11678
11682
|
intercept: 0
|
|
11679
11683
|
};
|
|
11680
11684
|
}
|
|
11681
|
-
function
|
|
11685
|
+
function ss(i, a, e, t, r) {
|
|
11682
11686
|
const n = i.length === 1 && i[0].length > 1;
|
|
11683
11687
|
let s = i;
|
|
11684
11688
|
r && (s = i.map((C) => C.map((E) => Math.log(E))));
|
|
11685
11689
|
let o = a, u = e;
|
|
11686
|
-
n && (s =
|
|
11687
|
-
const c =
|
|
11690
|
+
n && (s = ht(s), o = ht(o), u = ht(u)), t && (o = o.map((C) => [...C, 1]));
|
|
11691
|
+
const c = ht(o), l = fr(c, o), f = fr(c, s);
|
|
11688
11692
|
let h = Yh(l);
|
|
11689
11693
|
if (!h && (h = Qh(l), !h))
|
|
11690
11694
|
return g.create(m.NA);
|
|
11691
11695
|
let d = fr(h, f);
|
|
11692
|
-
t || d.push([0]), d =
|
|
11696
|
+
t || d.push([0]), d = ht(d);
|
|
11693
11697
|
const _ = d[0].pop();
|
|
11694
11698
|
if (d[0].reverse(), d[0].push(_), r)
|
|
11695
11699
|
for (let C = 0; C < d[0].length; C++)
|
|
@@ -11953,7 +11957,7 @@ class Zo extends V {
|
|
|
11953
11957
|
const [p, N, M] = R, w = +p.getValue(), S = +N.getValue(), D = Math.floor(+M.getValue());
|
|
11954
11958
|
if (w <= 0 || w >= 1 || S <= 0 || D < 1)
|
|
11955
11959
|
return g.create(m.NUM);
|
|
11956
|
-
const L = Math.abs(
|
|
11960
|
+
const L = Math.abs(Jn(w / 2, 0, 1) * S / Math.sqrt(D));
|
|
11957
11961
|
return y.create(L);
|
|
11958
11962
|
});
|
|
11959
11963
|
return n === 1 && s === 1 ? l.get(0, 0) : l;
|
|
@@ -12391,7 +12395,7 @@ class uu extends V {
|
|
|
12391
12395
|
const [u, c, l] = o, f = +u.getValue(), h = +c.getValue(), d = +l.getValue();
|
|
12392
12396
|
if (f <= 0 || f >= 1 || d <= 0)
|
|
12393
12397
|
return g.create(m.NUM);
|
|
12394
|
-
const _ =
|
|
12398
|
+
const _ = Jn(f, h, d);
|
|
12395
12399
|
return y.create(_);
|
|
12396
12400
|
}
|
|
12397
12401
|
}
|
|
@@ -12415,7 +12419,7 @@ class cu extends V {
|
|
|
12415
12419
|
const [s] = n, o = +s.getValue();
|
|
12416
12420
|
if (o <= 0 || o >= 1)
|
|
12417
12421
|
return g.create(m.NUM);
|
|
12418
|
-
const u =
|
|
12422
|
+
const u = Jn(o, 0, 1);
|
|
12419
12423
|
return y.create(u);
|
|
12420
12424
|
}
|
|
12421
12425
|
}
|
|
@@ -12640,7 +12644,7 @@ class Cu extends V {
|
|
|
12640
12644
|
const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
|
|
12641
12645
|
if (c <= 0 || c > 1 || l < 1 || l > 10 ** 10)
|
|
12642
12646
|
return g.create(m.NUM);
|
|
12643
|
-
const f = Math.abs(
|
|
12647
|
+
const f = Math.abs(es(c / 2, l));
|
|
12644
12648
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
|
|
12645
12649
|
}
|
|
12646
12650
|
}
|
|
@@ -13840,7 +13844,7 @@ function Vu(i) {
|
|
|
13840
13844
|
}
|
|
13841
13845
|
return pu[Number(i)] || [];
|
|
13842
13846
|
}
|
|
13843
|
-
function
|
|
13847
|
+
function Pn(i, a, e = 1, t) {
|
|
13844
13848
|
const r = Vu(e), n = Math.floor(i), s = Math.floor(a), o = s > n ? n : s;
|
|
13845
13849
|
let u = 0;
|
|
13846
13850
|
const c = Math.abs(Math.floor(a) - Math.floor(i)) + 1;
|
|
@@ -13853,7 +13857,7 @@ function Ln(i, a, e = 1, t) {
|
|
|
13853
13857
|
}
|
|
13854
13858
|
return s >= n ? u : -u;
|
|
13855
13859
|
}
|
|
13856
|
-
function
|
|
13860
|
+
function xn(i, a, e = 1, t) {
|
|
13857
13861
|
const r = Vu(e), n = Math.floor(i);
|
|
13858
13862
|
let s = n, o = Math.abs(a);
|
|
13859
13863
|
for (let u = 1; u <= o; u++) {
|
|
@@ -13971,7 +13975,7 @@ const Ym = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Hm = [31, 28, 31, 3
|
|
|
13971
13975
|
function Qr(i, a) {
|
|
13972
13976
|
return km(i) ? Ym[a] : Hm[a];
|
|
13973
13977
|
}
|
|
13974
|
-
function
|
|
13978
|
+
function as(i) {
|
|
13975
13979
|
return $m(i) ? 366 : 365;
|
|
13976
13980
|
}
|
|
13977
13981
|
function Nu(i, a) {
|
|
@@ -13981,7 +13985,7 @@ function Nu(i, a) {
|
|
|
13981
13985
|
case 4:
|
|
13982
13986
|
return 360;
|
|
13983
13987
|
case 1:
|
|
13984
|
-
return
|
|
13988
|
+
return as(re(i).getUTCFullYear());
|
|
13985
13989
|
case 3:
|
|
13986
13990
|
return 365;
|
|
13987
13991
|
default:
|
|
@@ -14478,7 +14482,7 @@ class sg extends V {
|
|
|
14478
14482
|
return u;
|
|
14479
14483
|
if (r)
|
|
14480
14484
|
return this._getResultByHolidays(o, u, r);
|
|
14481
|
-
const c =
|
|
14485
|
+
const c = Pn(o, u);
|
|
14482
14486
|
return y.create(c);
|
|
14483
14487
|
}
|
|
14484
14488
|
_getResultByHolidays(e, t, r) {
|
|
@@ -14503,7 +14507,7 @@ class sg extends V {
|
|
|
14503
14507
|
return o;
|
|
14504
14508
|
n.push(o);
|
|
14505
14509
|
}
|
|
14506
|
-
const s =
|
|
14510
|
+
const s = Pn(e, t, 1, n);
|
|
14507
14511
|
return y.create(s);
|
|
14508
14512
|
}
|
|
14509
14513
|
}
|
|
@@ -14551,7 +14555,7 @@ class ag extends V {
|
|
|
14551
14555
|
return l;
|
|
14552
14556
|
if (n)
|
|
14553
14557
|
return this._getResultByHolidays(c, l, u, n);
|
|
14554
|
-
const f =
|
|
14558
|
+
const f = Pn(c, l, u);
|
|
14555
14559
|
return y.create(f);
|
|
14556
14560
|
}
|
|
14557
14561
|
_getResultByHolidays(e, t, r, n) {
|
|
@@ -14576,7 +14580,7 @@ class ag extends V {
|
|
|
14576
14580
|
return u;
|
|
14577
14581
|
s.push(u);
|
|
14578
14582
|
}
|
|
14579
|
-
const o =
|
|
14583
|
+
const o = Pn(e, t, r, s);
|
|
14580
14584
|
return y.create(o);
|
|
14581
14585
|
}
|
|
14582
14586
|
}
|
|
@@ -14863,7 +14867,7 @@ class gg extends V {
|
|
|
14863
14867
|
return g.create(m.VALUE);
|
|
14864
14868
|
if (r)
|
|
14865
14869
|
return this._getResultByHolidays(o, u, r);
|
|
14866
|
-
const c =
|
|
14870
|
+
const c = xn(o, u);
|
|
14867
14871
|
return typeof c != "number" ? c : y.create(c);
|
|
14868
14872
|
}
|
|
14869
14873
|
_getResultByHolidays(e, t, r) {
|
|
@@ -14888,7 +14892,7 @@ class gg extends V {
|
|
|
14888
14892
|
return o;
|
|
14889
14893
|
n.push(o);
|
|
14890
14894
|
}
|
|
14891
|
-
const s =
|
|
14895
|
+
const s = xn(e, t, 1, n);
|
|
14892
14896
|
return typeof s != "number" ? s : y.create(s);
|
|
14893
14897
|
}
|
|
14894
14898
|
}
|
|
@@ -14923,7 +14927,7 @@ class dg extends V {
|
|
|
14923
14927
|
return g.create(m.NUM);
|
|
14924
14928
|
if (n)
|
|
14925
14929
|
return this._getResultByHolidays(c, l, f, n);
|
|
14926
|
-
const h =
|
|
14930
|
+
const h = xn(c, l, f);
|
|
14927
14931
|
return typeof h != "number" ? h : y.create(h);
|
|
14928
14932
|
}
|
|
14929
14933
|
_checkArrayError(e) {
|
|
@@ -14958,7 +14962,7 @@ class dg extends V {
|
|
|
14958
14962
|
return u;
|
|
14959
14963
|
s.push(u);
|
|
14960
14964
|
}
|
|
14961
|
-
const o =
|
|
14965
|
+
const o = xn(e, t, r, s);
|
|
14962
14966
|
return typeof o != "number" ? o : y.create(o);
|
|
14963
14967
|
}
|
|
14964
14968
|
}
|
|
@@ -17087,7 +17091,7 @@ const R1 = [
|
|
|
17087
17091
|
[y1, Z.OCT2HEX]
|
|
17088
17092
|
];
|
|
17089
17093
|
var ee = /* @__PURE__ */ ((i) => (i.ACCRINT = "ACCRINT", i.ACCRINTM = "ACCRINTM", i.AMORDEGRC = "AMORDEGRC", i.AMORLINC = "AMORLINC", i.COUPDAYBS = "COUPDAYBS", i.COUPDAYS = "COUPDAYS", i.COUPDAYSNC = "COUPDAYSNC", i.COUPNCD = "COUPNCD", i.COUPNUM = "COUPNUM", i.COUPPCD = "COUPPCD", i.CUMIPMT = "CUMIPMT", i.CUMPRINC = "CUMPRINC", i.DB = "DB", i.DDB = "DDB", i.DISC = "DISC", i.DOLLARDE = "DOLLARDE", i.DOLLARFR = "DOLLARFR", i.DURATION = "DURATION", i.EFFECT = "EFFECT", i.FV = "FV", i.FVSCHEDULE = "FVSCHEDULE", i.INTRATE = "INTRATE", i.IPMT = "IPMT", i.IRR = "IRR", i.ISPMT = "ISPMT", i.MDURATION = "MDURATION", i.MIRR = "MIRR", i.NOMINAL = "NOMINAL", i.NPER = "NPER", i.NPV = "NPV", i.ODDFPRICE = "ODDFPRICE", i.ODDFYIELD = "ODDFYIELD", i.ODDLPRICE = "ODDLPRICE", i.ODDLYIELD = "ODDLYIELD", i.PDURATION = "PDURATION", i.PMT = "PMT", i.PPMT = "PPMT", i.PRICE = "PRICE", i.PRICEDISC = "PRICEDISC", i.PRICEMAT = "PRICEMAT", i.PV = "PV", i.RATE = "RATE", i.RECEIVED = "RECEIVED", i.RRI = "RRI", i.SLN = "SLN", i.SYD = "SYD", i.TBILLEQ = "TBILLEQ", i.TBILLPRICE = "TBILLPRICE", i.TBILLYIELD = "TBILLYIELD", i.VDB = "VDB", i.XIRR = "XIRR", i.XNPV = "XNPV", i.YIELD = "YIELD", i.YIELDDISC = "YIELDDISC", i.YIELDMAT = "YIELDMAT", i))(ee || {});
|
|
17090
|
-
function
|
|
17094
|
+
function is(i, a, e, t) {
|
|
17091
17095
|
const r = It(i, a, e), { days: n } = _e(r, i, t);
|
|
17092
17096
|
return n;
|
|
17093
17097
|
}
|
|
@@ -17125,7 +17129,7 @@ function It(i, a, e) {
|
|
|
17125
17129
|
return ye(r);
|
|
17126
17130
|
}
|
|
17127
17131
|
function Mu(i, a, e, t, r, n) {
|
|
17128
|
-
const s =
|
|
17132
|
+
const s = is(i, a, r, n), o = qe(i, a, r, n), u = nr(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
|
|
17129
17133
|
let h = 0, d = 0;
|
|
17130
17134
|
for (let E = 1; E <= u; E++) {
|
|
17131
17135
|
const b = E + c, R = f / l ** b;
|
|
@@ -17289,8 +17293,8 @@ function O1(i, a) {
|
|
|
17289
17293
|
while (Math.abs(_) > 1e-7 && f < 60);
|
|
17290
17294
|
return C;
|
|
17291
17295
|
}
|
|
17292
|
-
function
|
|
17293
|
-
const o = nr(i, a, n), u = qe(i, a, n, s), c =
|
|
17296
|
+
function hn(i, a, e, t, r, n, s) {
|
|
17297
|
+
const o = nr(i, a, n), u = qe(i, a, n, s), c = is(i, a, n, s);
|
|
17294
17298
|
if (o === 1) {
|
|
17295
17299
|
const h = u - c, d = 100 * e / n + r, _ = t / n * h / u + 1, C = 100 * e / n * c / u;
|
|
17296
17300
|
return d / _ - C;
|
|
@@ -17441,7 +17445,7 @@ class D1 extends V {
|
|
|
17441
17445
|
return g.create(m.VALUE);
|
|
17442
17446
|
if (![1, 2, 4].includes(E) || b < 0 || b > 4 || Math.floor(_) >= Math.floor(C))
|
|
17443
17447
|
return g.create(m.NUM);
|
|
17444
|
-
const R =
|
|
17448
|
+
const R = is(_, C, E, b);
|
|
17445
17449
|
return y.create(R);
|
|
17446
17450
|
}
|
|
17447
17451
|
}
|
|
@@ -18604,7 +18608,7 @@ class c0 extends V {
|
|
|
18604
18608
|
return g.create(m.VALUE);
|
|
18605
18609
|
if (w < 0 || S < 0 || D <= 0 || ![1, 2, 4].includes(L) || U < 0 || U > 4 || N >= M || !Mr(N, M, L))
|
|
18606
18610
|
return g.create(m.NUM);
|
|
18607
|
-
const x =
|
|
18611
|
+
const x = hn(N, M, w, S, D, L, U);
|
|
18608
18612
|
return y.create(x);
|
|
18609
18613
|
}
|
|
18610
18614
|
}
|
|
@@ -18903,7 +18907,7 @@ class A0 extends V {
|
|
|
18903
18907
|
return g.create(m.VALUE);
|
|
18904
18908
|
if (d <= 0 || f >= h)
|
|
18905
18909
|
return g.create(m.NUM);
|
|
18906
|
-
const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b =
|
|
18910
|
+
const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = as(E);
|
|
18907
18911
|
if (_ > b)
|
|
18908
18912
|
return g.create(m.NUM);
|
|
18909
18913
|
let R = 365 * d / (360 - d * _);
|
|
@@ -18937,7 +18941,7 @@ class E0 extends V {
|
|
|
18937
18941
|
return g.create(m.VALUE);
|
|
18938
18942
|
if (d <= 0 || f >= h)
|
|
18939
18943
|
return g.create(m.NUM);
|
|
18940
|
-
const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b =
|
|
18944
|
+
const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = as(E);
|
|
18941
18945
|
if (_ > b)
|
|
18942
18946
|
return g.create(m.NUM);
|
|
18943
18947
|
const R = 100 * (1 - d * _ / 360);
|
|
@@ -18965,7 +18969,7 @@ class b0 extends V {
|
|
|
18965
18969
|
return g.create(m.VALUE);
|
|
18966
18970
|
if (d <= 0 || f >= h)
|
|
18967
18971
|
return g.create(m.NUM);
|
|
18968
|
-
const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b =
|
|
18972
|
+
const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = as(E);
|
|
18969
18973
|
if (_ > b)
|
|
18970
18974
|
return g.create(m.NUM);
|
|
18971
18975
|
const R = (100 - d) / d * 360 / _;
|
|
@@ -19362,12 +19366,12 @@ class V0 extends V {
|
|
|
19362
19366
|
}
|
|
19363
19367
|
_getResult(e, t, r, n, s, o, u) {
|
|
19364
19368
|
if (nr(e, t, o) > 1) {
|
|
19365
|
-
let E = r || 0.01, b =
|
|
19369
|
+
let E = r || 0.01, b = hn(e, t, r, E, s, o, u), R = b - n;
|
|
19366
19370
|
for (let p = 0; p < 100 && Math.abs(R) > 1e-7; p++)
|
|
19367
|
-
b =
|
|
19371
|
+
b = hn(e, t, r, 1.01 * E, s, o, u), E += -R / (b - n - R) * E * 0.01, R = hn(e, t, r, E, s, o, u) - n;
|
|
19368
19372
|
return E;
|
|
19369
19373
|
}
|
|
19370
|
-
const l =
|
|
19374
|
+
const l = is(e, t, o, u), f = qe(e, t, o, u), { days: h } = _e(e, t, u), d = n / 100 + l / f * r / o;
|
|
19371
19375
|
return (s / 100 + r / o - d) / d * o * f / h;
|
|
19372
19376
|
}
|
|
19373
19377
|
}
|
|
@@ -21329,7 +21333,7 @@ class xd extends V {
|
|
|
21329
21333
|
return g.create(m.REF);
|
|
21330
21334
|
const n = this._convertToDefinedName(r);
|
|
21331
21335
|
if (t === 0) {
|
|
21332
|
-
const f = Uh(n), { range: h, sheetName: d, unitId: _ } = f, C = new
|
|
21336
|
+
const f = Uh(n), { range: h, sheetName: d, unitId: _ } = f, C = new Rn(h);
|
|
21333
21337
|
return C.setForcedUnitIdDirect(_), C.setForcedSheetName(d), this._setDefault(C);
|
|
21334
21338
|
}
|
|
21335
21339
|
if (Br(n))
|
|
@@ -21341,7 +21345,7 @@ class xd extends V {
|
|
|
21341
21345
|
const s = gr(n), { range: o, sheetName: u, unitId: c } = s;
|
|
21342
21346
|
if (Number.isNaN(o.startRow) || o.endRow + 1 > 1048576 || Number.isNaN(o.startColumn) || o.endColumn + 1 > 16384)
|
|
21343
21347
|
return g.create(m.REF);
|
|
21344
|
-
const l = new
|
|
21348
|
+
const l = new Rn(o);
|
|
21345
21349
|
return l.setForcedUnitIdDirect(c), l.setForcedSheetName(u), this._setDefault(l);
|
|
21346
21350
|
}
|
|
21347
21351
|
_setDefault(e) {
|
|
@@ -21647,7 +21651,7 @@ class Id extends V {
|
|
|
21647
21651
|
}
|
|
21648
21652
|
}
|
|
21649
21653
|
_sort(e, t = 1) {
|
|
21650
|
-
const r =
|
|
21654
|
+
const r = _n();
|
|
21651
21655
|
return t === 1 ? this._sortAsc(e, r) : this._sortDesc(e, r);
|
|
21652
21656
|
}
|
|
21653
21657
|
_sortAsc(e, t) {
|
|
@@ -21812,7 +21816,7 @@ class Fd extends V {
|
|
|
21812
21816
|
return n;
|
|
21813
21817
|
}
|
|
21814
21818
|
_sort(e, t) {
|
|
21815
|
-
const r =
|
|
21819
|
+
const r = _n();
|
|
21816
21820
|
return (n, s) => {
|
|
21817
21821
|
let o = n[e], u = s[e], c = this._compare(o, u, t[0], r);
|
|
21818
21822
|
if (c === 0 && t.length > 1) {
|
|
@@ -22467,7 +22471,7 @@ class Xd extends V {
|
|
|
22467
22471
|
}
|
|
22468
22472
|
_handleExpandObject(e, t, r, n, s, o = 0) {
|
|
22469
22473
|
if ((s === 2 || s === -2) && n !== 2) {
|
|
22470
|
-
const u =
|
|
22474
|
+
const u = Bs(s), c = Ts(n);
|
|
22471
22475
|
return this.binarySearchExpand(
|
|
22472
22476
|
e,
|
|
22473
22477
|
t,
|
|
@@ -22488,7 +22492,7 @@ class Xd extends V {
|
|
|
22488
22492
|
}
|
|
22489
22493
|
_handleSingleObject(e, t, r, n, s) {
|
|
22490
22494
|
if ((s === 2 || s === -2) && n !== 2) {
|
|
22491
|
-
const o =
|
|
22495
|
+
const o = Bs(s), u = Ts(n);
|
|
22492
22496
|
return this.binarySearch(e, t, r, o, u);
|
|
22493
22497
|
}
|
|
22494
22498
|
return n === 2 ? this.fuzzySearch(e, t, r, s !== -1) : n === -1 || n === 1 ? this.orderSearch(
|
|
@@ -22546,7 +22550,7 @@ class Zd extends V {
|
|
|
22546
22550
|
_handleSingleObject(e, t, r, n) {
|
|
22547
22551
|
let s;
|
|
22548
22552
|
if ((n === 2 || n === -2) && r !== 2) {
|
|
22549
|
-
const o =
|
|
22553
|
+
const o = Bs(n), u = Ts(r);
|
|
22550
22554
|
s = t.binarySearch(e, o, u);
|
|
22551
22555
|
} else if (r === 2) {
|
|
22552
22556
|
const o = t.compare(e, $.EQUALS);
|
|
@@ -23515,7 +23519,7 @@ class TC extends V {
|
|
|
23515
23519
|
}
|
|
23516
23520
|
if (t !== r)
|
|
23517
23521
|
return g.create(m.VALUE);
|
|
23518
|
-
const s =
|
|
23522
|
+
const s = Zn(n);
|
|
23519
23523
|
return y.create(s);
|
|
23520
23524
|
}
|
|
23521
23525
|
}
|
|
@@ -24630,8 +24634,8 @@ class d_ extends V {
|
|
|
24630
24634
|
if (!e.isReferenceObject() || r && !r.isReferenceObject())
|
|
24631
24635
|
return g.create(m.VALUE);
|
|
24632
24636
|
const n = e.toArrayValueObject();
|
|
24633
|
-
let s =
|
|
24634
|
-
s =
|
|
24637
|
+
let s = qn(n, t);
|
|
24638
|
+
s = Kn(s, n, t);
|
|
24635
24639
|
const o = n.getRowCount(), u = n.getColumnCount();
|
|
24636
24640
|
let c = n;
|
|
24637
24641
|
if (r) {
|
|
@@ -24966,7 +24970,7 @@ class V_ extends V {
|
|
|
24966
24970
|
return _;
|
|
24967
24971
|
if (d.isString() && (d = d.convertToNumberObjectValue()), d.isError())
|
|
24968
24972
|
return d;
|
|
24969
|
-
const C = +_.getValue(), E = +d.getValue(), b = 10 ** Math.trunc(E), R =
|
|
24973
|
+
const C = +_.getValue(), E = +d.getValue(), b = 10 ** Math.trunc(E), R = Hn(C, b), p = Math.trunc(Nr(C, b) + R) / b;
|
|
24970
24974
|
return y.create(p);
|
|
24971
24975
|
});
|
|
24972
24976
|
return n === 1 && s === 1 ? c.get(0, 0) : c;
|
|
@@ -25364,8 +25368,8 @@ class B_ extends V {
|
|
|
25364
25368
|
return s.isReferenceObject() && (s = s.toArrayValueObject()), r && !(r != null && r.isReferenceObject()) ? g.create(m.NA) : (s = s, s.isArray() ? s.map((o) => this._handleSingleObject(n, o, r)) : this._handleSingleObject(n, s, r));
|
|
25365
25369
|
}
|
|
25366
25370
|
_handleSingleObject(e, t, r) {
|
|
25367
|
-
let n =
|
|
25368
|
-
n =
|
|
25371
|
+
let n = qn(e, t);
|
|
25372
|
+
n = Kn(n, e, t);
|
|
25369
25373
|
let s = r ? this._createRangeReferenceObject(r, e) : e;
|
|
25370
25374
|
if (!s)
|
|
25371
25375
|
return g.create(m.VALUE);
|
|
@@ -25611,7 +25615,7 @@ class H_ extends V {
|
|
|
25611
25615
|
return g.create(m.NUM);
|
|
25612
25616
|
if (D === 1)
|
|
25613
25617
|
return g.create(m.DIV_BY_ZERO);
|
|
25614
|
-
const L = Math.abs(
|
|
25618
|
+
const L = Math.abs(es(w / 2, D - 1) * S / Math.sqrt(D));
|
|
25615
25619
|
return y.create(L);
|
|
25616
25620
|
});
|
|
25617
25621
|
return n === 1 && s === 1 ? l.get(0, 0) : l;
|
|
@@ -25719,8 +25723,8 @@ class K_ extends V {
|
|
|
25719
25723
|
return e.isError() || t.isError() ? g.create(m.NA) : e.isArray() ? t.isArray() ? t.mapValue((r) => this._handleSingleObject(e, r)) : this._handleSingleObject(e, t) : g.create(m.VALUE);
|
|
25720
25724
|
}
|
|
25721
25725
|
_handleSingleObject(e, t) {
|
|
25722
|
-
let r =
|
|
25723
|
-
r =
|
|
25726
|
+
let r = qn(e, t);
|
|
25727
|
+
r = Kn(r, e, t);
|
|
25724
25728
|
const n = e.pick(r);
|
|
25725
25729
|
return this._countA(n);
|
|
25726
25730
|
}
|
|
@@ -26112,7 +26116,7 @@ class aA extends V {
|
|
|
26112
26116
|
const [s] = n, o = +s.getValue();
|
|
26113
26117
|
if (o === 0 || o < 0 && o % 1 === 0)
|
|
26114
26118
|
return g.create(m.NUM);
|
|
26115
|
-
const u =
|
|
26119
|
+
const u = fn(o);
|
|
26116
26120
|
return Number.isNaN(u) || !Number.isFinite(u) ? g.create(m.NUM) : y.create(u);
|
|
26117
26121
|
}
|
|
26118
26122
|
}
|
|
@@ -26136,7 +26140,7 @@ class vi extends V {
|
|
|
26136
26140
|
const [s] = n, o = +s.getValue();
|
|
26137
26141
|
if (o <= 0)
|
|
26138
26142
|
return g.create(m.NUM);
|
|
26139
|
-
const u =
|
|
26143
|
+
const u = ct(o);
|
|
26140
26144
|
return Math.abs(u) < 1e-15 ? y.create(0) : y.create(u);
|
|
26141
26145
|
}
|
|
26142
26146
|
}
|
|
@@ -26213,7 +26217,7 @@ class uA extends V {
|
|
|
26213
26217
|
A(this, "maxParams", 4);
|
|
26214
26218
|
}
|
|
26215
26219
|
calculate(e, t, r, n) {
|
|
26216
|
-
const { isError: s, errorObject: o } =
|
|
26220
|
+
const { isError: s, errorObject: o } = ts(e, t, r);
|
|
26217
26221
|
if (s)
|
|
26218
26222
|
return o;
|
|
26219
26223
|
const u = dt(e);
|
|
@@ -26235,7 +26239,7 @@ class uA extends V {
|
|
|
26235
26239
|
return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (n ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (n ? t[0].length + 1 : t[0].length) > e.length ? g.create(m.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
|
|
26236
26240
|
}
|
|
26237
26241
|
_getResultByMultipleVariables(e, t, r, n) {
|
|
26238
|
-
const s = e.length === 1 && e[0].length > 1, o =
|
|
26242
|
+
const s = e.length === 1 && e[0].length > 1, o = ss(e, t, r, n, !0);
|
|
26239
26243
|
if (o instanceof g)
|
|
26240
26244
|
return o;
|
|
26241
26245
|
const { coefficients: u, newX: c } = o, l = u[0].length, f = u[0][l - 1];
|
|
@@ -26247,14 +26251,14 @@ class uA extends V {
|
|
|
26247
26251
|
_ *= u[0][l - 2 - C] ** c[d][C];
|
|
26248
26252
|
h[d].push(_);
|
|
26249
26253
|
}
|
|
26250
|
-
return s && (h =
|
|
26254
|
+
return s && (h = ht(h)), q.createByArray(h);
|
|
26251
26255
|
}
|
|
26252
26256
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
26253
|
-
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } =
|
|
26257
|
+
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ns(o, s, n, !0), l = r.map((f) => f.map((h) => c * u ** h));
|
|
26254
26258
|
return q.createByArray(l);
|
|
26255
26259
|
}
|
|
26256
26260
|
_getKnownXsValues(e, t) {
|
|
26257
|
-
return !t || t.isNull() ?
|
|
26261
|
+
return !t || t.isNull() ? rs(e.length, e[0].length) : dt(t);
|
|
26258
26262
|
}
|
|
26259
26263
|
_getNewXsValues(e, t) {
|
|
26260
26264
|
return !t || t.isNull() ? e : dt(t);
|
|
@@ -26474,7 +26478,7 @@ class gA extends V {
|
|
|
26474
26478
|
A(this, "maxParams", 4);
|
|
26475
26479
|
}
|
|
26476
26480
|
calculate(e, t, r, n) {
|
|
26477
|
-
const { isError: s, errorObject: o } =
|
|
26481
|
+
const { isError: s, errorObject: o } = ts(e, t);
|
|
26478
26482
|
if (s)
|
|
26479
26483
|
return o;
|
|
26480
26484
|
const u = dt(e);
|
|
@@ -26497,7 +26501,7 @@ class gA extends V {
|
|
|
26497
26501
|
return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (r ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (r ? t[0].length + 1 : t[0].length) > e.length ? g.create(m.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
|
|
26498
26502
|
}
|
|
26499
26503
|
_getResultByMultipleVariables(e, t, r, n) {
|
|
26500
|
-
const s =
|
|
26504
|
+
const s = ss(e, t, t, r, !1);
|
|
26501
26505
|
if (s instanceof g)
|
|
26502
26506
|
return s;
|
|
26503
26507
|
const { coefficients: o, X: u, XTXInverse: c } = s;
|
|
@@ -26544,7 +26548,7 @@ class gA extends V {
|
|
|
26544
26548
|
return q.createByArray(l);
|
|
26545
26549
|
}
|
|
26546
26550
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
26547
|
-
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } =
|
|
26551
|
+
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ns(o, s, r, !1);
|
|
26548
26552
|
if (Number.isNaN(u))
|
|
26549
26553
|
return g.create(m.NA);
|
|
26550
26554
|
let l = [];
|
|
@@ -26584,7 +26588,7 @@ class gA extends V {
|
|
|
26584
26588
|
return q.createByArray(l);
|
|
26585
26589
|
}
|
|
26586
26590
|
_getKnownXsValues(e, t) {
|
|
26587
|
-
return !t || t.isNull() ?
|
|
26591
|
+
return !t || t.isNull() ? rs(e.length, e[0].length) : dt(t);
|
|
26588
26592
|
}
|
|
26589
26593
|
}
|
|
26590
26594
|
class dA extends V {
|
|
@@ -26594,7 +26598,7 @@ class dA extends V {
|
|
|
26594
26598
|
A(this, "maxParams", 4);
|
|
26595
26599
|
}
|
|
26596
26600
|
calculate(e, t, r, n) {
|
|
26597
|
-
const { isError: s, errorObject: o } =
|
|
26601
|
+
const { isError: s, errorObject: o } = ts(e, t);
|
|
26598
26602
|
if (s)
|
|
26599
26603
|
return o;
|
|
26600
26604
|
const u = dt(e);
|
|
@@ -26618,7 +26622,7 @@ class dA extends V {
|
|
|
26618
26622
|
}
|
|
26619
26623
|
// eslint-disable-next-line max-lines-per-function
|
|
26620
26624
|
_getResultByMultipleVariables(e, t, r, n) {
|
|
26621
|
-
const s =
|
|
26625
|
+
const s = ss(e, t, t, r, !0);
|
|
26622
26626
|
if (s instanceof g)
|
|
26623
26627
|
return s;
|
|
26624
26628
|
const { coefficients: o, Y: u, X: c, XTXInverse: l } = s;
|
|
@@ -26666,7 +26670,7 @@ class dA extends V {
|
|
|
26666
26670
|
return q.createByArray(f);
|
|
26667
26671
|
}
|
|
26668
26672
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
26669
|
-
const s = e.flat(), o = t.flat(), { slope: u, intercept: c, Y: l } =
|
|
26673
|
+
const s = e.flat(), o = t.flat(), { slope: u, intercept: c, Y: l } = ns(o, s, r, !0);
|
|
26670
26674
|
if (Number.isNaN(u))
|
|
26671
26675
|
return g.create(m.NA);
|
|
26672
26676
|
let f = [];
|
|
@@ -26704,7 +26708,7 @@ class dA extends V {
|
|
|
26704
26708
|
return q.createByArray(f);
|
|
26705
26709
|
}
|
|
26706
26710
|
_getKnownXsValues(e, t) {
|
|
26707
|
-
return !t || t.isNull() ?
|
|
26711
|
+
return !t || t.isNull() ? rs(e.length, e[0].length) : dt(t);
|
|
26708
26712
|
}
|
|
26709
26713
|
}
|
|
26710
26714
|
class CA extends V {
|
|
@@ -26765,7 +26769,7 @@ class _A extends V {
|
|
|
26765
26769
|
const f = 1 - l, h = r.length, d = r.reduce((b, R) => b + R, 0) / h, _ = r.reduce((b, R) => b + (R - d) ** 2, 0) / (h - 1), C = Math.sqrt(_);
|
|
26766
26770
|
if (C <= 0)
|
|
26767
26771
|
return g.create(m.NUM);
|
|
26768
|
-
const E = Math.abs(
|
|
26772
|
+
const E = Math.abs(es(f / 2, h - 1) * C / Math.sqrt(h));
|
|
26769
26773
|
return y.create(E);
|
|
26770
26774
|
}
|
|
26771
26775
|
_getRangeValues(e) {
|
|
@@ -28065,7 +28069,7 @@ class XA extends V {
|
|
|
28065
28069
|
const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
|
|
28066
28070
|
if (c <= 0 || c > 1 || l < 1 || l > 10 ** 10)
|
|
28067
28071
|
return g.create(m.NUM);
|
|
28068
|
-
const f =
|
|
28072
|
+
const f = es(c, l);
|
|
28069
28073
|
return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
|
|
28070
28074
|
}
|
|
28071
28075
|
}
|
|
@@ -28076,7 +28080,7 @@ class ZA extends V {
|
|
|
28076
28080
|
A(this, "maxParams", 4);
|
|
28077
28081
|
}
|
|
28078
28082
|
calculate(e, t, r, n) {
|
|
28079
|
-
const { isError: s, errorObject: o } =
|
|
28083
|
+
const { isError: s, errorObject: o } = ts(e, t, r);
|
|
28080
28084
|
if (s)
|
|
28081
28085
|
return o;
|
|
28082
28086
|
const u = dt(e);
|
|
@@ -28098,7 +28102,7 @@ class ZA extends V {
|
|
|
28098
28102
|
return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (n ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (n ? t[0].length + 1 : t[0].length) > e.length ? g.create(m.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
|
|
28099
28103
|
}
|
|
28100
28104
|
_getResultByMultipleVariables(e, t, r, n) {
|
|
28101
|
-
const s = e.length === 1 && e[0].length > 1, o =
|
|
28105
|
+
const s = e.length === 1 && e[0].length > 1, o = ss(e, t, r, n, !1);
|
|
28102
28106
|
if (o instanceof g)
|
|
28103
28107
|
return o;
|
|
28104
28108
|
const { coefficients: u, newX: c } = o, l = u[0].length, f = u[0][l - 1];
|
|
@@ -28110,17 +28114,17 @@ class ZA extends V {
|
|
|
28110
28114
|
_ += u[0][l - 2 - C] * c[d][C];
|
|
28111
28115
|
h[d].push(_);
|
|
28112
28116
|
}
|
|
28113
|
-
return s && (h =
|
|
28117
|
+
return s && (h = ht(h)), q.createByArray(h);
|
|
28114
28118
|
}
|
|
28115
28119
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
28116
|
-
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } =
|
|
28120
|
+
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ns(o, s, n, !1);
|
|
28117
28121
|
if (Number.isNaN(u))
|
|
28118
28122
|
return g.create(m.NA);
|
|
28119
28123
|
const l = r.map((f) => f.map((h) => u * h + c));
|
|
28120
28124
|
return q.createByArray(l);
|
|
28121
28125
|
}
|
|
28122
28126
|
_getKnownXsValues(e, t) {
|
|
28123
|
-
return !t || t.isNull() ?
|
|
28127
|
+
return !t || t.isNull() ? rs(e.length, e[0].length) : dt(t);
|
|
28124
28128
|
}
|
|
28125
28129
|
_getNewXsValues(e, t) {
|
|
28126
28130
|
return !t || t.isNull() ? e : dt(t);
|
|
@@ -30678,7 +30682,7 @@ let sa = class extends Oe {
|
|
|
30678
30682
|
super();
|
|
30679
30683
|
A(this, "_computingCompleted$", new oc((a) => {
|
|
30680
30684
|
this._commandService.onCommandExecuted((e) => {
|
|
30681
|
-
if (e.id !==
|
|
30685
|
+
if (e.id !== Cn.id) return;
|
|
30682
30686
|
const t = e.params;
|
|
30683
30687
|
if (t.stageInfo)
|
|
30684
30688
|
return a.next(
|
|
@@ -30703,7 +30707,7 @@ var db = Object.getOwnPropertyDescriptor, Cb = (i, a, e, t) => {
|
|
|
30703
30707
|
(s = i[n]) && (r = s(r) || r);
|
|
30704
30708
|
return r;
|
|
30705
30709
|
}, en = (i, a) => (e, t) => a(e, t, i);
|
|
30706
|
-
let
|
|
30710
|
+
let jn = class extends Oe {
|
|
30707
30711
|
constructor(i, a, e, t) {
|
|
30708
30712
|
super(), this._commandService = i, this._functionService = a, this._configService = e, this._dataSyncPrimaryController = t, this._initialize();
|
|
30709
30713
|
}
|
|
@@ -30713,10 +30717,10 @@ let xn = class extends Oe {
|
|
|
30713
30717
|
_registerCommands() {
|
|
30714
30718
|
[
|
|
30715
30719
|
oo,
|
|
30716
|
-
|
|
30720
|
+
Ms,
|
|
30717
30721
|
so,
|
|
30718
30722
|
ao,
|
|
30719
|
-
|
|
30723
|
+
Cn,
|
|
30720
30724
|
io,
|
|
30721
30725
|
la,
|
|
30722
30726
|
no,
|
|
@@ -30759,18 +30763,18 @@ let xn = class extends Oe {
|
|
|
30759
30763
|
this._functionService.registerExecutors(...a);
|
|
30760
30764
|
}
|
|
30761
30765
|
};
|
|
30762
|
-
|
|
30766
|
+
jn = Cb([
|
|
30763
30767
|
en(0, ar),
|
|
30764
30768
|
en(1, Yt),
|
|
30765
30769
|
en(2, oa),
|
|
30766
30770
|
en(3, rc(lc))
|
|
30767
|
-
],
|
|
30771
|
+
], jn);
|
|
30768
30772
|
var _b = Object.getOwnPropertyDescriptor, Ab = (i, a, e, t) => {
|
|
30769
30773
|
for (var r = t > 1 ? void 0 : t ? _b(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
30770
30774
|
(s = i[n]) && (r = s(r) || r);
|
|
30771
30775
|
return r;
|
|
30772
30776
|
}, tn = (i, a) => (e, t) => a(e, t, i);
|
|
30773
|
-
let
|
|
30777
|
+
let Un = class extends Oe {
|
|
30774
30778
|
constructor(i, a, e) {
|
|
30775
30779
|
super(), this._commandService = i, this._dependencyManagerService = a, this._featureCalculationManagerService = e, this._initialize();
|
|
30776
30780
|
}
|
|
@@ -30846,18 +30850,18 @@ let jn = class extends Oe {
|
|
|
30846
30850
|
this._dependencyManagerService.removeFormulaDependencyByDefinedName(e, t);
|
|
30847
30851
|
}
|
|
30848
30852
|
};
|
|
30849
|
-
|
|
30853
|
+
Un = Ab([
|
|
30850
30854
|
tn(0, ar),
|
|
30851
30855
|
tn(1, vr),
|
|
30852
|
-
tn(1,
|
|
30856
|
+
tn(1, Xn),
|
|
30853
30857
|
tn(2, vr)
|
|
30854
|
-
],
|
|
30858
|
+
], Un);
|
|
30855
30859
|
var Eb = Object.getOwnPropertyDescriptor, bb = (i, a, e, t) => {
|
|
30856
30860
|
for (var r = t > 1 ? void 0 : t ? Eb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
30857
30861
|
(s = i[n]) && (r = s(r) || r);
|
|
30858
30862
|
return r;
|
|
30859
30863
|
}, ki = (i, a) => (e, t) => a(e, t, i);
|
|
30860
|
-
let
|
|
30864
|
+
let vn = class extends Oe {
|
|
30861
30865
|
constructor(i, a) {
|
|
30862
30866
|
super(), this._commandService = i, this._featureCalculationManagerService = a, this._initialize();
|
|
30863
30867
|
}
|
|
@@ -30884,16 +30888,16 @@ let Un = class extends Oe {
|
|
|
30884
30888
|
);
|
|
30885
30889
|
}
|
|
30886
30890
|
};
|
|
30887
|
-
|
|
30891
|
+
vn = bb([
|
|
30888
30892
|
ki(0, ar),
|
|
30889
30893
|
ki(1, vr)
|
|
30890
|
-
],
|
|
30894
|
+
], vn);
|
|
30891
30895
|
var yb = Object.getOwnPropertyDescriptor, Rb = (i, a, e, t) => {
|
|
30892
30896
|
for (var r = t > 1 ? void 0 : t ? yb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
30893
30897
|
(s = i[n]) && (r = s(r) || r);
|
|
30894
30898
|
return r;
|
|
30895
|
-
},
|
|
30896
|
-
let
|
|
30899
|
+
}, ps = (i, a) => (e, t) => a(e, t, i);
|
|
30900
|
+
let Tn = class extends Oe {
|
|
30897
30901
|
constructor(i, a, e) {
|
|
30898
30902
|
super(), this._commandService = i, this._otherFormulaManagerService = a, this._dependencyManagerService = e, this._initialize();
|
|
30899
30903
|
}
|
|
@@ -30922,11 +30926,11 @@ let vn = class extends Oe {
|
|
|
30922
30926
|
);
|
|
30923
30927
|
}
|
|
30924
30928
|
};
|
|
30925
|
-
|
|
30926
|
-
|
|
30927
|
-
|
|
30928
|
-
|
|
30929
|
-
],
|
|
30929
|
+
Tn = Rb([
|
|
30930
|
+
ps(0, ar),
|
|
30931
|
+
ps(1, Ma),
|
|
30932
|
+
ps(2, Xn)
|
|
30933
|
+
], Tn);
|
|
30930
30934
|
class pb extends Oe {
|
|
30931
30935
|
constructor() {
|
|
30932
30936
|
super(...arguments);
|
|
@@ -30956,13 +30960,13 @@ class pb extends Oe {
|
|
|
30956
30960
|
this._tableOptionMap.set(e, t);
|
|
30957
30961
|
}
|
|
30958
30962
|
}
|
|
30959
|
-
const Yu =
|
|
30963
|
+
const Yu = lt("univer.formula.super-table.service");
|
|
30960
30964
|
var Vb = Object.getOwnPropertyDescriptor, Nb = (i, a, e, t) => {
|
|
30961
30965
|
for (var r = t > 1 ? void 0 : t ? Vb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
30962
30966
|
(s = i[n]) && (r = s(r) || r);
|
|
30963
30967
|
return r;
|
|
30964
30968
|
}, $i = (i, a) => (e, t) => a(e, t, i);
|
|
30965
|
-
let
|
|
30969
|
+
let Bn = class extends Oe {
|
|
30966
30970
|
constructor(i, a) {
|
|
30967
30971
|
super(), this._commandService = i, this._superTableService = a, this._initialize();
|
|
30968
30972
|
}
|
|
@@ -30995,10 +30999,10 @@ let Tn = class extends Oe {
|
|
|
30995
30999
|
);
|
|
30996
31000
|
}
|
|
30997
31001
|
};
|
|
30998
|
-
|
|
31002
|
+
Bn = Nb([
|
|
30999
31003
|
$i(0, ar),
|
|
31000
31004
|
$i(1, Yu)
|
|
31001
|
-
],
|
|
31005
|
+
], Bn);
|
|
31002
31006
|
class Ob extends Oe {
|
|
31003
31007
|
constructor() {
|
|
31004
31008
|
super(...arguments);
|
|
@@ -31023,7 +31027,7 @@ class Ob extends Oe {
|
|
|
31023
31027
|
return this._dirtyConversionMap;
|
|
31024
31028
|
}
|
|
31025
31029
|
}
|
|
31026
|
-
const Mb =
|
|
31030
|
+
const Mb = lt(
|
|
31027
31031
|
"univer.formula.active-dirty-manager.service"
|
|
31028
31032
|
);
|
|
31029
31033
|
var wb = Object.getOwnPropertyDescriptor, Sb = (i, a, e, t) => {
|
|
@@ -31032,8 +31036,8 @@ var wb = Object.getOwnPropertyDescriptor, Sb = (i, a, e, t) => {
|
|
|
31032
31036
|
return r;
|
|
31033
31037
|
}, Yi = (i, a) => (e, t) => a(e, t, i);
|
|
31034
31038
|
const Db = "UNIVER_ENGINE_FORMULA_PLUGIN";
|
|
31035
|
-
var
|
|
31036
|
-
let Hi = (
|
|
31039
|
+
var Vs;
|
|
31040
|
+
let Hi = (Vs = class extends nc {
|
|
31037
31041
|
constructor(i = hi, a, e) {
|
|
31038
31042
|
super(), this._config = i, this._injector = a, this._configService = e;
|
|
31039
31043
|
const { ...t } = sc(
|
|
@@ -31048,19 +31052,19 @@ let Hi = (ps = class extends nc {
|
|
|
31048
31052
|
}
|
|
31049
31053
|
onReady() {
|
|
31050
31054
|
var i;
|
|
31051
|
-
|
|
31052
|
-
[
|
|
31053
|
-
[
|
|
31054
|
-
]), (i = this._config) != null && i.notExecuteFormula ||
|
|
31055
|
+
os(this._injector, [
|
|
31056
|
+
[jn],
|
|
31057
|
+
[Bn]
|
|
31058
|
+
]), (i = this._config) != null && i.notExecuteFormula || os(this._injector, [
|
|
31059
|
+
[Tn],
|
|
31055
31060
|
[vn],
|
|
31056
31061
|
[Un],
|
|
31057
|
-
[
|
|
31058
|
-
[Dn]
|
|
31062
|
+
[Ln]
|
|
31059
31063
|
]);
|
|
31060
31064
|
}
|
|
31061
31065
|
onRendered() {
|
|
31062
31066
|
var i;
|
|
31063
|
-
(i = this._config) != null && i.notExecuteFormula ||
|
|
31067
|
+
(i = this._config) != null && i.notExecuteFormula || os(this._injector, [
|
|
31064
31068
|
[Xs],
|
|
31065
31069
|
[qs]
|
|
31066
31070
|
]);
|
|
@@ -31069,7 +31073,7 @@ let Hi = (ps = class extends nc {
|
|
|
31069
31073
|
const i = !this._config.notExecuteFormula, a = [
|
|
31070
31074
|
// Services
|
|
31071
31075
|
[Yt, { useClass: Wf }],
|
|
31072
|
-
[Vr, { useClass:
|
|
31076
|
+
[Vr, { useClass: Ls }],
|
|
31073
31077
|
[Mb, { useClass: Ob }],
|
|
31074
31078
|
[Yu, { useClass: pb }],
|
|
31075
31079
|
[$u],
|
|
@@ -31078,35 +31082,35 @@ let Hi = (ps = class extends nc {
|
|
|
31078
31082
|
// Engine
|
|
31079
31083
|
[da],
|
|
31080
31084
|
//Controllers
|
|
31081
|
-
[
|
|
31082
|
-
[
|
|
31085
|
+
[jn],
|
|
31086
|
+
[Bn],
|
|
31083
31087
|
[sa]
|
|
31084
31088
|
];
|
|
31085
31089
|
i && a.push(
|
|
31086
31090
|
// Services
|
|
31087
31091
|
[Ma, { useClass: Mh }],
|
|
31088
31092
|
[Ot, { useClass: Gs }],
|
|
31089
|
-
[Ft, { useClass:
|
|
31093
|
+
[Ft, { useClass: js }],
|
|
31090
31094
|
[vr, { useClass: Oh }],
|
|
31091
31095
|
//Controller
|
|
31092
|
-
[
|
|
31093
|
-
[
|
|
31094
|
-
[jn],
|
|
31096
|
+
[Ln],
|
|
31097
|
+
[Tn],
|
|
31095
31098
|
[Un],
|
|
31099
|
+
[vn],
|
|
31096
31100
|
// Calculation engine
|
|
31097
31101
|
[Ar],
|
|
31098
31102
|
[Ur],
|
|
31099
31103
|
[Cr],
|
|
31100
31104
|
// AstNode factory
|
|
31101
31105
|
[Oo],
|
|
31102
|
-
[Vn],
|
|
31103
31106
|
[Nn],
|
|
31104
|
-
[Po],
|
|
31105
31107
|
[On],
|
|
31106
|
-
[
|
|
31108
|
+
[Po],
|
|
31107
31109
|
[Mn],
|
|
31110
|
+
[Vn],
|
|
31108
31111
|
[wn],
|
|
31109
31112
|
[Sn],
|
|
31113
|
+
[Dn],
|
|
31110
31114
|
[xo]
|
|
31111
31115
|
), a.forEach((e) => this._injector.add(e));
|
|
31112
31116
|
}
|
|
@@ -31114,11 +31118,11 @@ let Hi = (ps = class extends nc {
|
|
|
31114
31118
|
var i;
|
|
31115
31119
|
(i = this._config) != null && i.notExecuteFormula || [
|
|
31116
31120
|
[Xs, { useClass: Zs }],
|
|
31117
|
-
[
|
|
31121
|
+
[Xn, { useClass: Nh }],
|
|
31118
31122
|
[qs, { useClass: Ks }]
|
|
31119
31123
|
].forEach((e) => this._injector.add(e));
|
|
31120
31124
|
}
|
|
31121
|
-
}, A(
|
|
31125
|
+
}, A(Vs, "pluginName", Db), Vs);
|
|
31122
31126
|
Hi = Sb([
|
|
31123
31127
|
Yi(1, pe(Qi)),
|
|
31124
31128
|
Yi(2, oa)
|
|
@@ -31132,15 +31136,15 @@ export {
|
|
|
31132
31136
|
Hb as AsyncCustomFunction,
|
|
31133
31137
|
Uf as AsyncObject,
|
|
31134
31138
|
V as BaseFunction,
|
|
31135
|
-
|
|
31139
|
+
Wn as BaseReferenceObject,
|
|
31136
31140
|
kt as BaseValueObject,
|
|
31137
31141
|
er as BooleanValue,
|
|
31138
31142
|
T as BooleanValueObject,
|
|
31139
|
-
|
|
31143
|
+
Ln as CalculateController,
|
|
31140
31144
|
Zs as CalculateFormulaService,
|
|
31141
31145
|
Rm as CustomFunction,
|
|
31142
31146
|
Ph as DEFAULT_INTERVAL_COUNT,
|
|
31143
|
-
|
|
31147
|
+
Ls as DefinedNamesService,
|
|
31144
31148
|
Vh as DependencyManagerBaseService,
|
|
31145
31149
|
Nh as DependencyManagerService,
|
|
31146
31150
|
$b as ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,
|
|
@@ -31164,23 +31168,23 @@ export {
|
|
|
31164
31168
|
lb as FUNCTION_NAMES_UNIVER,
|
|
31165
31169
|
ku as FUNCTION_NAMES_WEB,
|
|
31166
31170
|
Oh as FeatureCalculationManagerService,
|
|
31167
|
-
|
|
31171
|
+
js as FormulaCurrentConfigService,
|
|
31168
31172
|
dr as FormulaDataModel,
|
|
31169
31173
|
Ks as FormulaDependencyGenerator,
|
|
31170
|
-
|
|
31174
|
+
Es as FormulaDependencyTree,
|
|
31171
31175
|
Ws as FormulaDependencyTreeType,
|
|
31172
31176
|
Mi as FormulaDependencyTreeVirtual,
|
|
31173
31177
|
Xe as FormulaExecuteStageType,
|
|
31174
31178
|
Dr as FormulaExecutedStateType,
|
|
31175
31179
|
Gs as FormulaRuntimeService,
|
|
31176
|
-
|
|
31180
|
+
Nn as FunctionNodeFactory,
|
|
31177
31181
|
Wf as FunctionService,
|
|
31178
31182
|
mc as FunctionType,
|
|
31179
31183
|
$u as GlobalComputingStatusService,
|
|
31180
31184
|
Mb as IActiveDirtyManagerService,
|
|
31181
31185
|
Xs as ICalculateFormulaService,
|
|
31182
31186
|
Vr as IDefinedNamesService,
|
|
31183
|
-
|
|
31187
|
+
Xn as IDependencyManagerService,
|
|
31184
31188
|
vr as IFeatureCalculationManagerService,
|
|
31185
31189
|
Ft as IFormulaCurrentConfigService,
|
|
31186
31190
|
qs as IFormulaDependencyGenerator,
|
|
@@ -31189,7 +31193,7 @@ export {
|
|
|
31189
31193
|
Ma as IOtherFormulaManagerService,
|
|
31190
31194
|
Yu as ISuperTableService,
|
|
31191
31195
|
Ar as Interpreter,
|
|
31192
|
-
|
|
31196
|
+
On as LambdaNodeFactory,
|
|
31193
31197
|
Po as LambdaParameterNodeFactory,
|
|
31194
31198
|
Oa as LambdaValueObjectObject,
|
|
31195
31199
|
Cr as Lexer,
|
|
@@ -31197,21 +31201,21 @@ export {
|
|
|
31197
31201
|
da as LexerTreeBuilder,
|
|
31198
31202
|
ie as NullValueObject,
|
|
31199
31203
|
y as NumberValueObject,
|
|
31200
|
-
|
|
31204
|
+
Mn as OperatorNodeFactory,
|
|
31201
31205
|
Mh as OtherFormulaManagerService,
|
|
31202
|
-
|
|
31203
|
-
|
|
31204
|
-
|
|
31206
|
+
Vn as PrefixNodeFactory,
|
|
31207
|
+
Rn as RangeReferenceObject,
|
|
31208
|
+
wn as ReferenceNodeFactory,
|
|
31205
31209
|
jc as RegisterFunctionMutation,
|
|
31206
31210
|
no as RemoveDefinedNameMutation,
|
|
31207
31211
|
ha as RemoveFeatureCalculationMutation,
|
|
31208
31212
|
ga as RemoveOtherFormulaMutation,
|
|
31209
31213
|
qc as RemoveSuperTableMutation,
|
|
31210
|
-
|
|
31214
|
+
Ms as SetArrayFormulaDataMutation,
|
|
31211
31215
|
la as SetDefinedNameMutation,
|
|
31212
31216
|
kb as SetDefinedNameMutationFactory,
|
|
31213
31217
|
fa as SetFeatureCalculationMutation,
|
|
31214
|
-
|
|
31218
|
+
Cn as SetFormulaCalculationNotificationMutation,
|
|
31215
31219
|
io as SetFormulaCalculationResultMutation,
|
|
31216
31220
|
so as SetFormulaCalculationStartMutation,
|
|
31217
31221
|
ao as SetFormulaCalculationStopMutation,
|
|
@@ -31220,16 +31224,16 @@ export {
|
|
|
31220
31224
|
Wc as SetSuperTableMutation,
|
|
31221
31225
|
uo as SetSuperTableOptionMutation,
|
|
31222
31226
|
j as StringValueObject,
|
|
31223
|
-
|
|
31227
|
+
Sn as SuffixNodeFactory,
|
|
31224
31228
|
pb as SuperTableService,
|
|
31225
|
-
|
|
31229
|
+
Dn as UnionNodeFactory,
|
|
31226
31230
|
Hi as UniverFormulaEnginePlugin,
|
|
31227
31231
|
xo as ValueNodeFactory,
|
|
31228
31232
|
Vt as ValueObjectFactory,
|
|
31229
31233
|
$ as compareToken,
|
|
31230
31234
|
yc as convertUnitDataToRuntime,
|
|
31231
31235
|
Uh as deserializeRangeForR1C1,
|
|
31232
|
-
|
|
31236
|
+
dn as deserializeRangeWithSheet,
|
|
31233
31237
|
gr as deserializeRangeWithSheetWithCache,
|
|
31234
31238
|
Ih as functionArray,
|
|
31235
31239
|
Em as functionCompatibility,
|
|
@@ -31270,10 +31274,10 @@ export {
|
|
|
31270
31274
|
X as operatorToken,
|
|
31271
31275
|
$e as sequenceNodeType,
|
|
31272
31276
|
hr as serializeRange,
|
|
31273
|
-
|
|
31277
|
+
ws as serializeRangeToRefString,
|
|
31274
31278
|
Tc as serializeRangeWithSheet,
|
|
31275
31279
|
Bc as serializeRangeWithSpreadsheet,
|
|
31276
|
-
|
|
31280
|
+
cs as singleReferenceToGrid,
|
|
31277
31281
|
yi as strip,
|
|
31278
31282
|
Mf as stripErrorMargin
|
|
31279
31283
|
};
|