@univerjs/engine-formula 0.6.7 → 0.6.9-experimental.20250403-d914ddc
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 +444 -428
- package/lib/facade.js +212 -0
- package/lib/index.js +31331 -0
- package/lib/types/engine/utils/cell.d.ts +1 -1
- package/lib/umd/index.js +4 -4
- package/package.json +5 -5
- package/LICENSE +0 -176
package/lib/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Gu = Object.defineProperty;
|
|
2
2
|
var Qu = (i, a, e) => a in i ? Gu(i, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[a] = e;
|
|
3
3
|
var A = (i, a, e) => Qu(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 et, Disposable as Ne, IUniverInstanceService as
|
|
4
|
+
import { ObjectMatrix as Ce, CommandType as Ie, RANGE_TYPE as Ze, AbsoluteRefType as we, Tools as ze, createIdentifier as et, Disposable as Ne, IUniverInstanceService as sa, LRUMap as Wu, hashAlgorithm as qu, moveRangeByOffset as aa, isValidRange as Ku, isFormulaString as yt, isFormulaId as Pt, Rectangle as Xa, cellToRange as Xu, Inject as ye, UniverInstanceType as Lr, BooleanNumber as Gi, LocaleService as Zu, LocaleType as wr, numfmt as gt, BuildTextUtils as zu, isRealNum as Q, CellValueType as Rt, toDisposable as Ju, Injector as Qi, sortRules as ec, RTree as Vs, IConfigService as ia, requestImmediateMacroTask as tc, ICommandService as sr, DataStreamTreeTokenType as ve, DisposableCollection as rc, Optional as nc, Plugin as sc, merge as ac, touchDependencies as os } from "@univerjs/core";
|
|
5
5
|
import { Subject as ur, BehaviorSubject as Wi, distinctUntilChanged as qi, combineLatest as ic, map as oc, Observable as uc, shareReplay as cc } from "rxjs";
|
|
6
6
|
import { isTextFormat as lc } from "@univerjs/engine-numfmt";
|
|
7
7
|
import { DataSyncPrimaryController as fc } from "@univerjs/rpc";
|
|
@@ -161,7 +161,7 @@ function pc(i) {
|
|
|
161
161
|
}
|
|
162
162
|
return a;
|
|
163
163
|
}
|
|
164
|
-
const Xi = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Ja = new RegExp(Xi), Vc = "((?![\\[\\]\\/?*\\\\]).)*!", Tt = "$",
|
|
164
|
+
const Xi = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Ja = new RegExp(Xi), Vc = "((?![\\[\\]\\/?*\\\\]).)*!", Tt = "$", oa = "\\s*?:\\s*?", gn = "[A-Za-z]+", dn = "[1-9][0-9]*", Rr = `'?(${Xi})?(${Vc})?'?`, Ns = `\\${Tt}?${gn}\\${Tt}?${dn}`, Nc = `^(${Me.AT})?${Rr}${Ns}${oa}${Ns}$`, ei = new RegExp(Nc), Oc = `^${Rr}\\s*?${Ns}(${Je.POUND})?$`, ti = new RegExp(Oc), Mc = `^${Rr}\\${Tt}?${dn}${oa}\\${Tt}?${dn}$`, ri = new RegExp(Mc), wc = `^${Rr}\\${Tt}?${gn}${oa}\\${Tt}?${gn}$`, ni = new RegExp(wc), Sc = `^${Rr}\\s*?\\${Tt}?${dn}$`, si = new RegExp(Sc), Dc = `^${Rr}\\s*?\\${Tt}?${gn}$`, ai = new RegExp(Dc), Lc = "{.*?}", ii = new RegExp(Lc, "g");
|
|
165
165
|
function Br(i) {
|
|
166
166
|
return ti.lastIndex = 0, ti.test(i);
|
|
167
167
|
}
|
|
@@ -256,7 +256,7 @@ function cs(i) {
|
|
|
256
256
|
absoluteRefType: t
|
|
257
257
|
};
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function ua(i) {
|
|
260
260
|
const a = Ja.exec(i);
|
|
261
261
|
let e = "";
|
|
262
262
|
a != null && (e = a[0].trim(), e = ui(e.slice(1, e.length - 1)), i = i.replace(Ja, ""));
|
|
@@ -268,8 +268,8 @@ function ca(i) {
|
|
|
268
268
|
unitId: e
|
|
269
269
|
};
|
|
270
270
|
}
|
|
271
|
-
function
|
|
272
|
-
const { refBody: a, sheetName: e, unitId: t } =
|
|
271
|
+
function Cn(i) {
|
|
272
|
+
const { refBody: a, sheetName: e, unitId: t } = ua(i), r = a.indexOf(":");
|
|
273
273
|
if (r === -1) {
|
|
274
274
|
const _ = cs(a), C = _.row, E = _.column, b = _.absoluteRefType;
|
|
275
275
|
return {
|
|
@@ -306,7 +306,7 @@ function on(i) {
|
|
|
306
306
|
const a = to(i);
|
|
307
307
|
if (!jc(a) || Fc.includes(a.toUpperCase().trim()))
|
|
308
308
|
return !1;
|
|
309
|
-
const { range: e } =
|
|
309
|
+
const { range: e } = Cn(a);
|
|
310
310
|
return !(e.endColumn >= 16384);
|
|
311
311
|
}
|
|
312
312
|
function to(i) {
|
|
@@ -327,7 +327,7 @@ function to(i) {
|
|
|
327
327
|
function $b(i, a) {
|
|
328
328
|
const e = (i == null ? void 0 : i.split(",")) || [];
|
|
329
329
|
return i === "" || e.length === 0 ? [] : kc(i) ? e.map((n) => {
|
|
330
|
-
const s =
|
|
330
|
+
const s = Cn(n);
|
|
331
331
|
return {
|
|
332
332
|
unitId: s.unitId,
|
|
333
333
|
sheetId: a(s.sheetName),
|
|
@@ -396,7 +396,7 @@ let Ds = class extends Ne {
|
|
|
396
396
|
}
|
|
397
397
|
getWorksheetByRef(a, e) {
|
|
398
398
|
var r;
|
|
399
|
-
const { sheetName: t } =
|
|
399
|
+
const { sheetName: t } = ua(e);
|
|
400
400
|
return (r = this._univerInstanceService.getUnit(a)) == null ? void 0 : r.getSheetBySheetName(t);
|
|
401
401
|
}
|
|
402
402
|
focusRange(a, e) {
|
|
@@ -465,7 +465,7 @@ let Ds = class extends Ne {
|
|
|
465
465
|
}
|
|
466
466
|
};
|
|
467
467
|
Ds = Qc([
|
|
468
|
-
Wc(0,
|
|
468
|
+
Wc(0, sa)
|
|
469
469
|
], Ds);
|
|
470
470
|
const pr = et("univer.formula.defined-names.service"), Yb = (i, a) => {
|
|
471
471
|
const { unitId: e, id: t } = a;
|
|
@@ -473,7 +473,7 @@ const pr = et("univer.formula.defined-names.service"), Yb = (i, a) => {
|
|
|
473
473
|
...i.get(pr).getValueById(e, t),
|
|
474
474
|
unitId: e
|
|
475
475
|
};
|
|
476
|
-
},
|
|
476
|
+
}, ca = {
|
|
477
477
|
id: "formula.mutation.set-defined-name",
|
|
478
478
|
type: Ie.MUTATION,
|
|
479
479
|
handler: (i, a) => {
|
|
@@ -498,11 +498,11 @@ const pr = et("univer.formula.defined-names.service"), Yb = (i, a) => {
|
|
|
498
498
|
const e = i.get(pr), { unitId: t, id: r } = a;
|
|
499
499
|
return e.removeDefinedName(t, r), !0;
|
|
500
500
|
}
|
|
501
|
-
},
|
|
501
|
+
}, la = {
|
|
502
502
|
id: "formula.mutation.set-feature-calculation",
|
|
503
503
|
type: Ie.MUTATION,
|
|
504
504
|
handler: () => !0
|
|
505
|
-
},
|
|
505
|
+
}, fa = {
|
|
506
506
|
id: "formula.mutation.remove-feature-calculation",
|
|
507
507
|
type: Ie.MUTATION,
|
|
508
508
|
handler: () => !0
|
|
@@ -514,7 +514,7 @@ const pr = et("univer.formula.defined-names.service"), Yb = (i, a) => {
|
|
|
514
514
|
id: "formula.mutation.set-formula-calculation-stop",
|
|
515
515
|
type: Ie.MUTATION,
|
|
516
516
|
handler: () => !0
|
|
517
|
-
},
|
|
517
|
+
}, _n = {
|
|
518
518
|
id: "formula.mutation.set-formula-calculation-notification",
|
|
519
519
|
type: Ie.MUTATION,
|
|
520
520
|
handler: () => !0
|
|
@@ -526,11 +526,11 @@ const pr = et("univer.formula.defined-names.service"), Yb = (i, a) => {
|
|
|
526
526
|
id: "formula.mutation.set-formula-data",
|
|
527
527
|
type: Ie.MUTATION,
|
|
528
528
|
handler: (i, a) => !0
|
|
529
|
-
},
|
|
529
|
+
}, ha = {
|
|
530
530
|
id: "formula.mutation.set-other-formula",
|
|
531
531
|
type: Ie.MUTATION,
|
|
532
532
|
handler: () => !0
|
|
533
|
-
},
|
|
533
|
+
}, ma = {
|
|
534
534
|
id: "formula.mutation.remove-other-formula",
|
|
535
535
|
type: Ie.MUTATION,
|
|
536
536
|
handler: () => !0
|
|
@@ -573,13 +573,13 @@ class Nt {
|
|
|
573
573
|
return a.length <= 64 ? a : qu(a).toString();
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
|
-
const
|
|
576
|
+
const ft = "P_1", Ut = "R_1", hr = "L_1", Ir = "LR_1", co = "LO_1", Xc = "LET", Pr = "LAMBDA", Zc = "CUBE", zc = /* @__PURE__ */ new Set(["RAND", "RANDBETWEEN", "NOW", "TODAY"]), Ls = new Nt(1e5);
|
|
577
577
|
function mr(i) {
|
|
578
578
|
const a = Ls.get(i);
|
|
579
579
|
if (a)
|
|
580
580
|
return a;
|
|
581
|
-
const e =
|
|
582
|
-
return Ls.set(i, e),
|
|
581
|
+
const e = Cn(i);
|
|
582
|
+
return Ls.set(i, e), Cn(i);
|
|
583
583
|
}
|
|
584
584
|
function Jc() {
|
|
585
585
|
Ls.clear();
|
|
@@ -699,7 +699,7 @@ class ae {
|
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
701
|
const lo = 2e3, ls = new Nt(lo), fs = new Nt(lo);
|
|
702
|
-
class
|
|
702
|
+
class ga extends Ne {
|
|
703
703
|
constructor() {
|
|
704
704
|
super(...arguments);
|
|
705
705
|
A(this, "_currentLexerNode", new ae());
|
|
@@ -768,7 +768,7 @@ class da extends Ne {
|
|
|
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 && !sn(u) && s.getStartIndex() !== -1) {
|
|
772
772
|
const c = s.getChildren().indexOf(o);
|
|
773
773
|
return {
|
|
774
774
|
functionName: u,
|
|
@@ -795,7 +795,7 @@ class da extends Ne {
|
|
|
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
|
}
|
|
@@ -860,7 +860,7 @@ class da extends Ne {
|
|
|
860
860
|
o.push(l);
|
|
861
861
|
continue;
|
|
862
862
|
} else
|
|
863
|
-
C =
|
|
863
|
+
C = aa(C, t, r, n);
|
|
864
864
|
let E = "";
|
|
865
865
|
Ku(C) ? E = Ms({
|
|
866
866
|
range: C,
|
|
@@ -1364,7 +1364,7 @@ class da extends Ne {
|
|
|
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 Ne {
|
|
|
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(Zc);
|
|
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 Ne {
|
|
|
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;
|
|
@@ -1869,8 +1869,8 @@ let gr = class extends Ne {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
};
|
|
1871
1871
|
gr = nl([
|
|
1872
|
-
li(0,
|
|
1873
|
-
li(1, ye(
|
|
1872
|
+
li(0, sa),
|
|
1873
|
+
li(1, ye(ga))
|
|
1874
1874
|
], gr);
|
|
1875
1875
|
function fi(i, a, e, t) {
|
|
1876
1876
|
i[a] || (i[a] = {}), i[a][e] || (i[a][e] = {});
|
|
@@ -2048,7 +2048,7 @@ class Ht {
|
|
|
2048
2048
|
return e(a.item.key.high, t);
|
|
2049
2049
|
}
|
|
2050
2050
|
}
|
|
2051
|
-
class
|
|
2051
|
+
class da {
|
|
2052
2052
|
/**
|
|
2053
2053
|
* Construct new empty instance of IntervalTree
|
|
2054
2054
|
*/
|
|
@@ -2169,7 +2169,7 @@ class Ca {
|
|
|
2169
2169
|
* @param callback(value,key) - function to be called for each tree item
|
|
2170
2170
|
*/
|
|
2171
2171
|
map(a) {
|
|
2172
|
-
const e = new
|
|
2172
|
+
const e = new da();
|
|
2173
2173
|
return this.tree_walk(this.root, (t) => e.insert(t.item.key, a(t.item.value, t.item.key))), e;
|
|
2174
2174
|
}
|
|
2175
2175
|
/**
|
|
@@ -2339,7 +2339,7 @@ class al {
|
|
|
2339
2339
|
o == null && (o = /* @__PURE__ */ new Map(), s.set(e, o));
|
|
2340
2340
|
let u = o.get(t);
|
|
2341
2341
|
if (u == null) {
|
|
2342
|
-
u = new
|
|
2342
|
+
u = new da(), u.insert([r, n]), o.set(t, u);
|
|
2343
2343
|
return;
|
|
2344
2344
|
}
|
|
2345
2345
|
this._handleNewInterval(u, r, n);
|
|
@@ -2407,7 +2407,7 @@ class al {
|
|
|
2407
2407
|
a.insert([n, s]);
|
|
2408
2408
|
}
|
|
2409
2409
|
}
|
|
2410
|
-
const bt = new al(),
|
|
2410
|
+
const bt = new al(), Ca = "engine-formula.config", fo = 1, Hb = "CYCLE_REFERENCE_COUNT", hi = {};
|
|
2411
2411
|
class il extends Ne {
|
|
2412
2412
|
constructor() {
|
|
2413
2413
|
super(...arguments);
|
|
@@ -2653,7 +2653,7 @@ let xs = class extends Ne {
|
|
|
2653
2653
|
}
|
|
2654
2654
|
};
|
|
2655
2655
|
xs = ul([
|
|
2656
|
-
Kr(0,
|
|
2656
|
+
Kr(0, sa),
|
|
2657
2657
|
Kr(1, ye(Zu)),
|
|
2658
2658
|
Kr(2, ye(gr)),
|
|
2659
2659
|
Kr(3, ye(ho))
|
|
@@ -2731,7 +2731,7 @@ let dr = class extends Ne {
|
|
|
2731
2731
|
};
|
|
2732
2732
|
dr = ll([
|
|
2733
2733
|
hs(0, pr),
|
|
2734
|
-
hs(1, ye(
|
|
2734
|
+
hs(1, ye(ga)),
|
|
2735
2735
|
hs(2, Ft)
|
|
2736
2736
|
], dr);
|
|
2737
2737
|
function un(i) {
|
|
@@ -2857,11 +2857,11 @@ function Ke(i, a = 2) {
|
|
|
2857
2857
|
function _l(i, a, e = 2) {
|
|
2858
2858
|
return gt.format(Ke(i, e), a);
|
|
2859
2859
|
}
|
|
2860
|
-
const
|
|
2860
|
+
const _a = new Nt(1e5);
|
|
2861
2861
|
function Al(i) {
|
|
2862
2862
|
let a = i;
|
|
2863
2863
|
a.startsWith('"') && a.endsWith('"') && (a = a.slice(1, -1));
|
|
2864
|
-
const e =
|
|
2864
|
+
const e = _a.get(a);
|
|
2865
2865
|
if (e)
|
|
2866
2866
|
return {
|
|
2867
2867
|
isNumberPattern: !0,
|
|
@@ -2880,7 +2880,7 @@ function Al(i) {
|
|
|
2880
2880
|
};
|
|
2881
2881
|
}
|
|
2882
2882
|
function ms(i, a, e) {
|
|
2883
|
-
return
|
|
2883
|
+
return _a.set(i, {
|
|
2884
2884
|
value: a,
|
|
2885
2885
|
pattern: e
|
|
2886
2886
|
}), {
|
|
@@ -2890,9 +2890,9 @@ function ms(i, a, e) {
|
|
|
2890
2890
|
};
|
|
2891
2891
|
}
|
|
2892
2892
|
function El() {
|
|
2893
|
-
|
|
2893
|
+
_a.clear();
|
|
2894
2894
|
}
|
|
2895
|
-
class
|
|
2895
|
+
class kn {
|
|
2896
2896
|
constructor() {
|
|
2897
2897
|
A(this, "pattern", "");
|
|
2898
2898
|
}
|
|
@@ -2930,7 +2930,7 @@ class Fn {
|
|
|
2930
2930
|
return !1;
|
|
2931
2931
|
}
|
|
2932
2932
|
}
|
|
2933
|
-
class kt extends
|
|
2933
|
+
class kt extends kn {
|
|
2934
2934
|
constructor(e) {
|
|
2935
2935
|
super();
|
|
2936
2936
|
A(this, "_customData");
|
|
@@ -3254,19 +3254,20 @@ class g extends kt {
|
|
|
3254
3254
|
}
|
|
3255
3255
|
}
|
|
3256
3256
|
function yl(i) {
|
|
3257
|
+
var a;
|
|
3257
3258
|
if (i === null)
|
|
3258
3259
|
return 0;
|
|
3259
3260
|
if (i != null && i.p) {
|
|
3260
|
-
const
|
|
3261
|
-
if (
|
|
3261
|
+
const e = i == null ? void 0 : i.p.body;
|
|
3262
|
+
if (e == null)
|
|
3262
3263
|
return 0;
|
|
3263
|
-
const
|
|
3264
|
-
return zu.transform.getPlainText(
|
|
3264
|
+
const t = e.dataStream;
|
|
3265
|
+
return zu.transform.getPlainText(t);
|
|
3265
3266
|
}
|
|
3266
|
-
return (i == null ? void 0 : i.v)
|
|
3267
|
+
return (a = i == null ? void 0 : i.v) != null ? a : 0;
|
|
3267
3268
|
}
|
|
3268
3269
|
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 || {});
|
|
3269
|
-
function
|
|
3270
|
+
function An() {
|
|
3270
3271
|
return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (i, a) => i.localeCompare(a);
|
|
3271
3272
|
}
|
|
3272
3273
|
function Rl(i) {
|
|
@@ -3317,7 +3318,7 @@ function vs(i) {
|
|
|
3317
3318
|
function Ts(i) {
|
|
3318
3319
|
return i === -2 ? 1 : 0;
|
|
3319
3320
|
}
|
|
3320
|
-
function
|
|
3321
|
+
function Aa(i) {
|
|
3321
3322
|
let a;
|
|
3322
3323
|
switch (i) {
|
|
3323
3324
|
case $.EQUALS:
|
|
@@ -3342,13 +3343,13 @@ function Ea(i) {
|
|
|
3342
3343
|
return a;
|
|
3343
3344
|
}
|
|
3344
3345
|
/*!
|
|
3345
|
-
* decimal.js v10.
|
|
3346
|
+
* decimal.js v10.5.0
|
|
3346
3347
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
3347
3348
|
* https://github.com/MikeMcl/decimal.js
|
|
3348
|
-
* Copyright (c)
|
|
3349
|
+
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
3349
3350
|
* MIT Licence
|
|
3350
3351
|
*/
|
|
3351
|
-
var Bs = 9e15, $t = 1e9, Is = "0123456789abcdef",
|
|
3352
|
+
var Bs = 9e15, $t = 1e9, Is = "0123456789abcdef", En = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", bn = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", Fs = {
|
|
3352
3353
|
// These values must be integers within the stated ranges (inclusive).
|
|
3353
3354
|
// Most of these values can be changed at run-time using the `Decimal.config` method.
|
|
3354
3355
|
// The maximum number of significant digits of the result of a calculation or base conversion.
|
|
@@ -3406,7 +3407,7 @@ var Bs = 9e15, $t = 1e9, Is = "0123456789abcdef", An = "2.3025850929940456840179
|
|
|
3406
3407
|
// Whether to use cryptographically-secure random number generation, if available.
|
|
3407
3408
|
crypto: !1
|
|
3408
3409
|
// true/false
|
|
3409
|
-
}, go, pt, ue = !0,
|
|
3410
|
+
}, go, pt, ue = !0, $n = "[DecimalError] ", Bt = $n + "Invalid argument: ", Co = $n + "Precision limit exceeded", _o = $n + "crypto unavailable", Ao = "[object Decimal]", Be = Math.floor, Pe = Math.pow, Nl = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, Ol = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, Ml = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, Eo = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, ct = 1e7, te = 7, wl = 9007199254740991, Sl = En.length - 1, ks = bn.length - 1, B = { toStringTag: Ao };
|
|
3410
3411
|
B.absoluteValue = B.abs = function() {
|
|
3411
3412
|
var i = new this.constructor(this);
|
|
3412
3413
|
return i.s < 0 && (i.s = 1), J(i);
|
|
@@ -3484,7 +3485,7 @@ B.hyperbolicCosine = B.cosh = function() {
|
|
|
3484
3485
|
var i, a, e, t, r, n = this, s = n.constructor, o = new s(1);
|
|
3485
3486
|
if (!n.isFinite()) return new s(n.s ? 1 / 0 : NaN);
|
|
3486
3487
|
if (n.isZero()) return o;
|
|
3487
|
-
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 /
|
|
3488
|
+
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 / Hn(4, i)).toString()) : (i = 16, a = "2.3283064365386962890625e-10"), n = Cr(s, 1, n.times(a), new s(1), !0);
|
|
3488
3489
|
for (var u, c = i, l = new s(8); c--; )
|
|
3489
3490
|
u = n.times(n), n = o.minus(u.times(l.minus(u.times(l))));
|
|
3490
3491
|
return J(n, s.precision = e, s.rounding = t, !0);
|
|
@@ -3495,7 +3496,7 @@ B.hyperbolicSine = B.sinh = function() {
|
|
|
3495
3496
|
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)
|
|
3496
3497
|
r = Cr(n, 2, r, r, !0);
|
|
3497
3498
|
else {
|
|
3498
|
-
i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 /
|
|
3499
|
+
i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / Hn(5, i)), r = Cr(n, 2, r, r, !0);
|
|
3499
3500
|
for (var s, o = new n(5), u = new n(16), c = new n(20); i--; )
|
|
3500
3501
|
s = r.times(r), r = r.times(o.plus(s.times(u.times(s).plus(c))));
|
|
3501
3502
|
}
|
|
@@ -3506,8 +3507,8 @@ B.hyperbolicTangent = B.tanh = function() {
|
|
|
3506
3507
|
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);
|
|
3507
3508
|
};
|
|
3508
3509
|
B.inverseCosine = B.acos = function() {
|
|
3509
|
-
var i
|
|
3510
|
-
return
|
|
3510
|
+
var i = this, a = i.constructor, e = i.abs().cmp(1), t = a.precision, r = a.rounding;
|
|
3511
|
+
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));
|
|
3511
3512
|
};
|
|
3512
3513
|
B.inverseHyperbolicCosine = B.acosh = function() {
|
|
3513
3514
|
var i, a, e = this, t = e.constructor;
|
|
@@ -3523,7 +3524,7 @@ B.inverseHyperbolicTangent = B.atanh = function() {
|
|
|
3523
3524
|
};
|
|
3524
3525
|
B.inverseSine = B.asin = function() {
|
|
3525
3526
|
var i, a, e, t, r = this, n = r.constructor;
|
|
3526
|
-
return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i =
|
|
3527
|
+
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)));
|
|
3527
3528
|
};
|
|
3528
3529
|
B.inverseTangent = B.atan = function() {
|
|
3529
3530
|
var i, a, e, t, r, n, s, o, u, c = this, l = c.constructor, f = l.precision, h = l.rounding;
|
|
@@ -3531,11 +3532,11 @@ B.inverseTangent = B.atan = function() {
|
|
|
3531
3532
|
if (c.isZero())
|
|
3532
3533
|
return new l(c);
|
|
3533
3534
|
if (c.abs().eq(1) && f + 4 <= ks)
|
|
3534
|
-
return s =
|
|
3535
|
+
return s = mt(l, f + 4, h).times(0.25), s.s = c.s, s;
|
|
3535
3536
|
} else {
|
|
3536
3537
|
if (!c.s) return new l(NaN);
|
|
3537
3538
|
if (f + 4 <= ks)
|
|
3538
|
-
return s =
|
|
3539
|
+
return s = mt(l, f + 4, h).times(0.5), s.s = c.s, s;
|
|
3539
3540
|
}
|
|
3540
3541
|
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));
|
|
3541
3542
|
for (ue = !1, a = Math.ceil(o / te), t = 1, u = c.times(c), s = new l(c), r = c; i !== -1; )
|
|
@@ -3583,9 +3584,9 @@ B.logarithm = B.log = function(i) {
|
|
|
3583
3584
|
for (r = e[0]; r % 10 === 0; ) r /= 10;
|
|
3584
3585
|
n = r !== 1;
|
|
3585
3586
|
}
|
|
3586
|
-
if (ue = !1, o = f + d, s = jt(c, o), t = a ?
|
|
3587
|
+
if (ue = !1, o = f + d, s = jt(c, o), t = a ? yn(l, o + 10) : jt(i, o), u = Ve(s, t, o, 1), xr(u.d, r = f, h))
|
|
3587
3588
|
do
|
|
3588
|
-
if (o += 10, s = jt(c, o), t = a ?
|
|
3589
|
+
if (o += 10, s = jt(c, o), t = a ? yn(l, o + 10) : jt(i, o), u = Ve(s, t, o, 1), !n) {
|
|
3589
3590
|
+Ue(u.d).slice(r + 1, r + 15) + 1 == 1e14 && (u = J(u, f + 1, 0));
|
|
3590
3591
|
break;
|
|
3591
3592
|
}
|
|
@@ -3618,14 +3619,14 @@ B.minus = B.sub = function(i) {
|
|
|
3618
3619
|
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;
|
|
3619
3620
|
for (t = h.length; t > n; ) {
|
|
3620
3621
|
if (c[--t] < h[t]) {
|
|
3621
|
-
for (r = t; r && c[--r] === 0; ) c[r] =
|
|
3622
|
-
--c[r], c[t] +=
|
|
3622
|
+
for (r = t; r && c[--r] === 0; ) c[r] = ct - 1;
|
|
3623
|
+
--c[r], c[t] += ct;
|
|
3623
3624
|
}
|
|
3624
3625
|
c[t] -= h[t];
|
|
3625
3626
|
}
|
|
3626
3627
|
for (; c[--s] === 0; ) c.pop();
|
|
3627
3628
|
for (; c[0] === 0; c.shift()) --e;
|
|
3628
|
-
return c[0] ? (i.d = c, i.e =
|
|
3629
|
+
return c[0] ? (i.d = c, i.e = Yn(c, e), ue ? J(i, o, u) : i) : new _(u === 3 ? -0 : 0);
|
|
3629
3630
|
};
|
|
3630
3631
|
B.modulo = B.mod = function(i) {
|
|
3631
3632
|
var a, e = this, t = e.constructor;
|
|
@@ -3654,9 +3655,9 @@ B.plus = B.add = function(i) {
|
|
|
3654
3655
|
e.reverse();
|
|
3655
3656
|
}
|
|
3656
3657
|
for (s = c.length, r = l.length, s - r < 0 && (r = s, e = l, l = c, c = e), a = 0; r; )
|
|
3657
|
-
a = (c[--r] = c[r] + l[r] + a) /
|
|
3658
|
+
a = (c[--r] = c[r] + l[r] + a) / ct | 0, c[r] %= ct;
|
|
3658
3659
|
for (a && (c.unshift(a), ++t), s = c.length; c[--s] == 0; ) c.pop();
|
|
3659
|
-
return i.d = c, i.e =
|
|
3660
|
+
return i.d = c, i.e = Yn(c, t), ue ? J(i, o, u) : i;
|
|
3660
3661
|
};
|
|
3661
3662
|
B.precision = B.sd = function(i) {
|
|
3662
3663
|
var a, e = this;
|
|
@@ -3700,14 +3701,14 @@ B.times = B.mul = function(i) {
|
|
|
3700
3701
|
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);
|
|
3701
3702
|
for (t = c; --t >= 0; ) {
|
|
3702
3703
|
for (a = 0, r = u + t; r > t; )
|
|
3703
|
-
o = n[r] + d[t] * h[r - t - 1] + a, n[r--] = o %
|
|
3704
|
-
n[r] = (n[r] + a) %
|
|
3704
|
+
o = n[r] + d[t] * h[r - t - 1] + a, n[r--] = o % ct | 0, a = o / ct | 0;
|
|
3705
|
+
n[r] = (n[r] + a) % ct | 0;
|
|
3705
3706
|
}
|
|
3706
3707
|
for (; !n[--s]; ) n.pop();
|
|
3707
|
-
return a ? ++e : n.shift(), i.d = n, i.e =
|
|
3708
|
+
return a ? ++e : n.shift(), i.d = n, i.e = Yn(n, e), ue ? J(i, f.precision, f.rounding) : i;
|
|
3708
3709
|
};
|
|
3709
3710
|
B.toBinary = function(i, a) {
|
|
3710
|
-
return
|
|
3711
|
+
return Ea(this, 2, i, a);
|
|
3711
3712
|
};
|
|
3712
3713
|
B.toDecimalPlaces = B.toDP = function(i, a) {
|
|
3713
3714
|
var e = this, t = e.constructor;
|
|
@@ -3735,7 +3736,7 @@ B.toFraction = function(i) {
|
|
|
3735
3736
|
return r = Ve(i.minus(e), t, 0, 1, 1), u = u.plus(r.times(c)), e = e.plus(r.times(t)), u.s = c.s = d.s, h = Ve(c, t, n, 1).minus(d).abs().cmp(Ve(u, e, n, 1).minus(d).abs()) < 1 ? [c, t] : [u, e], C.precision = l, ue = !0, h;
|
|
3736
3737
|
};
|
|
3737
3738
|
B.toHexadecimal = B.toHex = function(i, a) {
|
|
3738
|
-
return
|
|
3739
|
+
return Ea(this, 16, i, a);
|
|
3739
3740
|
};
|
|
3740
3741
|
B.toNearest = function(i, a) {
|
|
3741
3742
|
var e = this, t = e.constructor;
|
|
@@ -3753,7 +3754,7 @@ B.toNumber = function() {
|
|
|
3753
3754
|
return +this;
|
|
3754
3755
|
};
|
|
3755
3756
|
B.toOctal = function(i, a) {
|
|
3756
|
-
return
|
|
3757
|
+
return Ea(this, 8, i, a);
|
|
3757
3758
|
};
|
|
3758
3759
|
B.toPower = B.pow = function(i) {
|
|
3759
3760
|
var a, e, t, r, n, s, o = this, u = o.constructor, c = +(i = new u(i));
|
|
@@ -3819,7 +3820,7 @@ function cn(i, a, e) {
|
|
|
3819
3820
|
function Dl(i, a) {
|
|
3820
3821
|
var e, t, r;
|
|
3821
3822
|
if (a.isZero()) return a;
|
|
3822
|
-
t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 /
|
|
3823
|
+
t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / Hn(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a = Cr(i, 1, a.times(r), new i(1));
|
|
3823
3824
|
for (var n = e; n--; ) {
|
|
3824
3825
|
var s = a.times(a);
|
|
3825
3826
|
a = s.times(s).minus(s).times(8).plus(1);
|
|
@@ -3860,7 +3861,7 @@ var Ve = /* @__PURE__ */ function() {
|
|
|
3860
3861
|
z && z[0] == 0 || !G ? ne * 0 : ne / 0
|
|
3861
3862
|
)
|
|
3862
3863
|
);
|
|
3863
|
-
for (u ? (d = 1, l = t.e - r.e) : (u =
|
|
3864
|
+
for (u ? (d = 1, l = t.e - r.e) : (u = ct, 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++) ;
|
|
3864
3865
|
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)
|
|
3865
3866
|
R.push(1), _ = !0;
|
|
3866
3867
|
else {
|
|
@@ -3912,10 +3913,10 @@ function J(i, a, e, t) {
|
|
|
3912
3913
|
if (h == 0) {
|
|
3913
3914
|
for (n = 1, s = f[0]; s >= 10; s /= 10) n++;
|
|
3914
3915
|
for (s = f[0] += o, o = 1; s >= 10; s /= 10) o++;
|
|
3915
|
-
n != o && (i.e++, f[0] ==
|
|
3916
|
+
n != o && (i.e++, f[0] == ct && (f[0] = 1));
|
|
3916
3917
|
break;
|
|
3917
3918
|
} else {
|
|
3918
|
-
if (f[h] += o, f[h] !=
|
|
3919
|
+
if (f[h] += o, f[h] != ct) break;
|
|
3919
3920
|
f[h--] = 0, o = 1;
|
|
3920
3921
|
}
|
|
3921
3922
|
for (n = f.length; f[--n] === 0; ) f.pop();
|
|
@@ -3927,19 +3928,19 @@ function Ct(i, a, e) {
|
|
|
3927
3928
|
var t, r = i.e, n = Ue(i.d), s = n.length;
|
|
3928
3929
|
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;
|
|
3929
3930
|
}
|
|
3930
|
-
function
|
|
3931
|
+
function Yn(i, a) {
|
|
3931
3932
|
var e = i[0];
|
|
3932
3933
|
for (a *= te; e >= 10; e /= 10) a++;
|
|
3933
3934
|
return a;
|
|
3934
3935
|
}
|
|
3935
|
-
function
|
|
3936
|
+
function yn(i, a, e) {
|
|
3936
3937
|
if (a > Sl)
|
|
3937
3938
|
throw ue = !0, e && (i.precision = e), Error(Co);
|
|
3938
|
-
return J(new i(
|
|
3939
|
+
return J(new i(En), a, 1, !0);
|
|
3939
3940
|
}
|
|
3940
|
-
function
|
|
3941
|
+
function mt(i, a, e) {
|
|
3941
3942
|
if (a > ks) throw Error(Co);
|
|
3942
|
-
return J(new i(
|
|
3943
|
+
return J(new i(bn), a, e, !0);
|
|
3943
3944
|
}
|
|
3944
3945
|
function bo(i) {
|
|
3945
3946
|
var a = i.length - 1, e = a * te + 1;
|
|
@@ -3968,14 +3969,14 @@ function Ci(i) {
|
|
|
3968
3969
|
return i.d[i.d.length - 1] & 1;
|
|
3969
3970
|
}
|
|
3970
3971
|
function Ro(i, a, e) {
|
|
3971
|
-
for (var t, r = new i(a[0]),
|
|
3972
|
-
if (
|
|
3973
|
-
|
|
3974
|
-
else {
|
|
3975
|
-
r = t;
|
|
3972
|
+
for (var t, r, n = new i(a[0]), s = 0; ++s < a.length; ) {
|
|
3973
|
+
if (r = new i(a[s]), !r.s) {
|
|
3974
|
+
n = r;
|
|
3976
3975
|
break;
|
|
3977
3976
|
}
|
|
3978
|
-
|
|
3977
|
+
t = n.cmp(r), (t === e || t === 0 && n.s === e) && (n = r);
|
|
3978
|
+
}
|
|
3979
|
+
return n;
|
|
3979
3980
|
}
|
|
3980
3981
|
function $s(i, a) {
|
|
3981
3982
|
var e, t, r, n, s, o, u, c = 0, l = 0, f = 0, h = i.constructor, d = h.rounding, _ = h.precision;
|
|
@@ -4006,10 +4007,10 @@ function jt(i, a) {
|
|
|
4006
4007
|
C = C.times(i), e = Ue(C.d), t = e.charAt(0), d++;
|
|
4007
4008
|
n = C.e, t > 1 ? (C = new b("0." + e), n++) : C = new b(t + "." + e.slice(1));
|
|
4008
4009
|
} else
|
|
4009
|
-
return c =
|
|
4010
|
+
return c = yn(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;
|
|
4010
4011
|
for (f = C, u = s = C = Ve(C.minus(1), C.plus(1), l, 1), h = J(C.times(C), l, 1), r = 3; ; ) {
|
|
4011
4012
|
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))
|
|
4012
|
-
if (u = u.times(2), n !== 0 && (u = u.plus(
|
|
4013
|
+
if (u = u.times(2), n !== 0 && (u = u.plus(yn(b, l + 2, p).times(n + ""))), u = Ve(u, new b(d), l, 1), a == null)
|
|
4013
4014
|
if (xr(u.d, l - _, R, o))
|
|
4014
4015
|
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;
|
|
4015
4016
|
else
|
|
@@ -4022,7 +4023,7 @@ function jt(i, a) {
|
|
|
4022
4023
|
function po(i) {
|
|
4023
4024
|
return String(i.s * i.s / 0);
|
|
4024
4025
|
}
|
|
4025
|
-
function
|
|
4026
|
+
function ln(i, a) {
|
|
4026
4027
|
var e, t, r;
|
|
4027
4028
|
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++) ;
|
|
4028
4029
|
for (r = a.length; a.charCodeAt(r - 1) === 48; --r) ;
|
|
@@ -4041,7 +4042,7 @@ function Ys(i, a) {
|
|
|
4041
4042
|
function Ll(i, a) {
|
|
4042
4043
|
var e, t, r, n, s, o, u, c, l;
|
|
4043
4044
|
if (a.indexOf("_") > -1) {
|
|
4044
|
-
if (a = a.replace(/(\d)_(?=\d)/g, "$1"), Eo.test(a)) return
|
|
4045
|
+
if (a = a.replace(/(\d)_(?=\d)/g, "$1"), Eo.test(a)) return ln(i, a);
|
|
4045
4046
|
} else if (a === "Infinity" || a === "NaN")
|
|
4046
4047
|
return +a || (i.s = NaN), i.e = NaN, i.d = null, i;
|
|
4047
4048
|
if (Ol.test(a))
|
|
@@ -4052,14 +4053,14 @@ function Ll(i, a) {
|
|
|
4052
4053
|
e = 8;
|
|
4053
4054
|
else
|
|
4054
4055
|
throw Error(Bt + a);
|
|
4055
|
-
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 = yo(t, new t(e), n, n * 2)), c = cn(a, e,
|
|
4056
|
-
return n < 0 ? new t(i.s * 0) : (i.e =
|
|
4056
|
+
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 = yo(t, new t(e), n, n * 2)), c = cn(a, e, ct), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
|
|
4057
|
+
return n < 0 ? new t(i.s * 0) : (i.e = Yn(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);
|
|
4057
4058
|
}
|
|
4058
4059
|
function Pl(i, a) {
|
|
4059
4060
|
var e, t = a.d.length;
|
|
4060
4061
|
if (t < 3)
|
|
4061
4062
|
return a.isZero() ? a : Cr(i, 2, a, a);
|
|
4062
|
-
e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 /
|
|
4063
|
+
e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / Hn(5, e)), a = Cr(i, 2, a, a);
|
|
4063
4064
|
for (var r, n = new i(5), s = new i(16), o = new i(20); e--; )
|
|
4064
4065
|
r = a.times(a), a = a.times(n.plus(r.times(s.times(r).minus(o))));
|
|
4065
4066
|
return a;
|
|
@@ -4075,12 +4076,12 @@ function Cr(i, a, e, t, r) {
|
|
|
4075
4076
|
}
|
|
4076
4077
|
return ue = !0, s.d.length = l + 1, s;
|
|
4077
4078
|
}
|
|
4078
|
-
function
|
|
4079
|
+
function Hn(i, a) {
|
|
4079
4080
|
for (var e = i; --a; ) e *= i;
|
|
4080
4081
|
return e;
|
|
4081
4082
|
}
|
|
4082
4083
|
function Vo(i, a) {
|
|
4083
|
-
var e, t = a.s < 0, r =
|
|
4084
|
+
var e, t = a.s < 0, r = mt(i, i.precision, 1), n = r.times(0.5);
|
|
4084
4085
|
if (a = a.abs(), a.lte(n))
|
|
4085
4086
|
return pt = t ? 4 : 1, a;
|
|
4086
4087
|
if (e = a.divToInt(r), e.isZero())
|
|
@@ -4092,7 +4093,7 @@ function Vo(i, a) {
|
|
|
4092
4093
|
}
|
|
4093
4094
|
return a.minus(r).abs();
|
|
4094
4095
|
}
|
|
4095
|
-
function
|
|
4096
|
+
function Ea(i, a, e, t) {
|
|
4096
4097
|
var r, n, s, o, u, c, l, f, h, d = i.constructor, _ = e !== void 0;
|
|
4097
4098
|
if (_ ? (He(e, 1, $t), t === void 0 ? t = d.rounding : He(t, 0, 8)) : (e = d.precision, t = d.rounding), !i.isFinite())
|
|
4098
4099
|
l = po(i);
|
|
@@ -4156,7 +4157,7 @@ function Fl(i) {
|
|
|
4156
4157
|
function kl(i, a) {
|
|
4157
4158
|
i = new this(i), a = new this(a);
|
|
4158
4159
|
var e, t = this.precision, r = this.rounding, n = t + 4;
|
|
4159
|
-
return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e =
|
|
4160
|
+
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;
|
|
4160
4161
|
}
|
|
4161
4162
|
function $l(i) {
|
|
4162
4163
|
return new this(i).cbrt();
|
|
@@ -4168,7 +4169,7 @@ function Hl(i, a, e) {
|
|
|
4168
4169
|
return new this(i).clamp(a, e);
|
|
4169
4170
|
}
|
|
4170
4171
|
function Gl(i) {
|
|
4171
|
-
if (!i || typeof i != "object") throw Error(
|
|
4172
|
+
if (!i || typeof i != "object") throw Error($n + "Object expected");
|
|
4172
4173
|
var a, e, t, r = i.defaults === !0, n = [
|
|
4173
4174
|
"precision",
|
|
4174
4175
|
1,
|
|
@@ -4233,14 +4234,18 @@ function No(i) {
|
|
|
4233
4234
|
for (s = 0, o = n; o >= 10; o /= 10) s++;
|
|
4234
4235
|
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]);
|
|
4235
4236
|
return;
|
|
4236
|
-
}
|
|
4237
|
+
}
|
|
4238
|
+
if (n * 0 !== 0) {
|
|
4237
4239
|
n || (c.s = NaN), c.e = NaN, c.d = null;
|
|
4238
4240
|
return;
|
|
4239
4241
|
}
|
|
4240
|
-
return
|
|
4241
|
-
}
|
|
4242
|
-
|
|
4243
|
-
|
|
4242
|
+
return ln(c, n.toString());
|
|
4243
|
+
}
|
|
4244
|
+
if (u === "string")
|
|
4245
|
+
return (o = n.charCodeAt(0)) === 45 ? (n = n.slice(1), c.s = -1) : (o === 43 && (n = n.slice(1)), c.s = 1), Eo.test(n) ? ln(c, n) : Ll(c, n);
|
|
4246
|
+
if (u === "bigint")
|
|
4247
|
+
return n < 0 ? (n = -n, c.s = -1) : c.s = 1, ln(c, n.toString());
|
|
4248
|
+
throw Error(Bt + n);
|
|
4244
4249
|
}
|
|
4245
4250
|
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 = Gl, r.clone = No, r.isDecimal = Ai, r.abs = xl, r.acos = jl, r.acosh = Ul, r.add = vl, r.asin = Tl, r.asinh = Bl, r.atan = Il, r.atanh = Fl, r.atan2 = kl, r.cbrt = $l, r.ceil = Yl, r.clamp = Hl, r.cos = Ql, r.cosh = Wl, r.div = ql, r.exp = Kl, r.floor = Xl, r.hypot = Zl, r.ln = zl, r.log = Jl, r.log10 = tf, r.log2 = ef, r.max = rf, r.min = nf, r.mod = sf, r.mul = af, r.pow = of, r.random = uf, r.round = cf, r.sign = lf, r.sin = ff, r.sinh = hf, r.sqrt = mf, r.sub = gf, r.sum = df, r.tan = Cf, r.tanh = _f, r.trunc = Af, i === void 0 && (i = {}), i && i.defaults !== !0)
|
|
4246
4251
|
for (t = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], a = 0; a < t.length; ) i.hasOwnProperty(e = t[a++]) || (i[e] = this[e]);
|
|
@@ -4283,10 +4288,10 @@ function tf(i) {
|
|
|
4283
4288
|
return new this(i).log(10);
|
|
4284
4289
|
}
|
|
4285
4290
|
function rf() {
|
|
4286
|
-
return Ro(this, arguments,
|
|
4291
|
+
return Ro(this, arguments, -1);
|
|
4287
4292
|
}
|
|
4288
4293
|
function nf() {
|
|
4289
|
-
return Ro(this, arguments,
|
|
4294
|
+
return Ro(this, arguments, 1);
|
|
4290
4295
|
}
|
|
4291
4296
|
function sf(i, a) {
|
|
4292
4297
|
return new this(i).mod(a);
|
|
@@ -4355,8 +4360,8 @@ function Af(i) {
|
|
|
4355
4360
|
B[Symbol.for("nodejs.util.inspect.custom")] = B.toString;
|
|
4356
4361
|
B[Symbol.toStringTag] = "Decimal";
|
|
4357
4362
|
var P = B.constructor = No(Fs);
|
|
4358
|
-
An = new P(An);
|
|
4359
4363
|
En = new P(En);
|
|
4364
|
+
bn = new P(bn);
|
|
4360
4365
|
function Ef(i, a) {
|
|
4361
4366
|
const e = i + a;
|
|
4362
4367
|
return Number.isSafeInteger(e) ? e : new P(i).add(a).toNumber();
|
|
@@ -4374,18 +4379,18 @@ function yf(i, a) {
|
|
|
4374
4379
|
return Number.isSafeInteger(e) ? e : new P(i).div(a).toNumber();
|
|
4375
4380
|
}
|
|
4376
4381
|
function vt(i, a) {
|
|
4377
|
-
const e = 10 ** Math.trunc(a), t =
|
|
4382
|
+
const e = 10 ** Math.trunc(a), t = Gn(i, e);
|
|
4378
4383
|
return Math.round(Vr(i, e) + t) / e;
|
|
4379
4384
|
}
|
|
4380
4385
|
function We(i, a) {
|
|
4381
|
-
const e = 10 ** Math.trunc(a), t =
|
|
4386
|
+
const e = 10 ** Math.trunc(a), t = Gn(i, e);
|
|
4382
4387
|
return Math.floor(Vr(i, e) + t) / e;
|
|
4383
4388
|
}
|
|
4384
4389
|
function Ye(i, a) {
|
|
4385
|
-
const e = 10 ** Math.trunc(a), t =
|
|
4390
|
+
const e = 10 ** Math.trunc(a), t = Gn(i, e);
|
|
4386
4391
|
return Math.ceil(Vr(i, e) - t) / e;
|
|
4387
4392
|
}
|
|
4388
|
-
function
|
|
4393
|
+
function Gn(i, a) {
|
|
4389
4394
|
return Number.EPSILON * Math.max(1, Math.abs(Vr(i, a)));
|
|
4390
4395
|
}
|
|
4391
4396
|
function Ei(i, a) {
|
|
@@ -4425,9 +4430,9 @@ function Sf(i, a = 12, e = 1e-10) {
|
|
|
4425
4430
|
function Df(i) {
|
|
4426
4431
|
return i - Math.trunc(i);
|
|
4427
4432
|
}
|
|
4428
|
-
const
|
|
4433
|
+
const Fn = class Fn extends kt {
|
|
4429
4434
|
static create() {
|
|
4430
|
-
return this._instance = this._instance || new
|
|
4435
|
+
return this._instance = this._instance || new Fn(0), this._instance;
|
|
4431
4436
|
}
|
|
4432
4437
|
isNull() {
|
|
4433
4438
|
return !0;
|
|
@@ -4547,8 +4552,8 @@ const In = class In extends kt {
|
|
|
4547
4552
|
return T.create(!1);
|
|
4548
4553
|
}
|
|
4549
4554
|
};
|
|
4550
|
-
A(
|
|
4551
|
-
let ie =
|
|
4555
|
+
A(Fn, "_instance");
|
|
4556
|
+
let ie = Fn;
|
|
4552
4557
|
const qt = class qt extends kt {
|
|
4553
4558
|
constructor(e) {
|
|
4554
4559
|
super(e);
|
|
@@ -4588,7 +4593,7 @@ const qt = class qt extends kt {
|
|
|
4588
4593
|
return this._convertToNumber().mod(e);
|
|
4589
4594
|
}
|
|
4590
4595
|
compare(e, t) {
|
|
4591
|
-
return e.isArray() ? e.compare(this,
|
|
4596
|
+
return e.isArray() ? e.compare(this, Aa(t)) : e.isNull() ? this._convertToNumber().compare(e, t) : this.compareBy(e.getValue(), t);
|
|
4592
4597
|
}
|
|
4593
4598
|
compareBy(e, t) {
|
|
4594
4599
|
let r = !1;
|
|
@@ -4693,7 +4698,7 @@ const qt = class qt extends kt {
|
|
|
4693
4698
|
return this._convertToNumber().ceil(e);
|
|
4694
4699
|
}
|
|
4695
4700
|
convertToNumberObjectValue() {
|
|
4696
|
-
return
|
|
4701
|
+
return Wn(this.getValue());
|
|
4697
4702
|
}
|
|
4698
4703
|
convertToBooleanObjectValue() {
|
|
4699
4704
|
return this;
|
|
@@ -4798,9 +4803,11 @@ class y extends kt {
|
|
|
4798
4803
|
return e.isArray() ? e.concatenateFront(this) : j.create(this.concatenate(e.getValue(), ut.BACK));
|
|
4799
4804
|
}
|
|
4800
4805
|
compare(e, t) {
|
|
4801
|
-
return e.isArray() ? e.compare(this,
|
|
4806
|
+
return e.isArray() ? e.compare(this, Aa(t)) : this.compareBy(e.getValue(), t);
|
|
4802
4807
|
}
|
|
4803
4808
|
plusBy(e) {
|
|
4809
|
+
if (typeof e == "string" && e.trim() === "")
|
|
4810
|
+
return g.create(m.VALUE);
|
|
4804
4811
|
const t = +this.getValue(), r = +e;
|
|
4805
4812
|
if (Number.isNaN(t) || Number.isNaN(r))
|
|
4806
4813
|
return g.create(m.VALUE);
|
|
@@ -4810,6 +4817,8 @@ class y extends kt {
|
|
|
4810
4817
|
return Number.isFinite(n) ? y.create(n) : g.create(m.NUM);
|
|
4811
4818
|
}
|
|
4812
4819
|
minusBy(e) {
|
|
4820
|
+
if (typeof e == "string" && e.trim() === "")
|
|
4821
|
+
return g.create(m.VALUE);
|
|
4813
4822
|
const t = +this.getValue(), r = +e;
|
|
4814
4823
|
if (Number.isNaN(t) || Number.isNaN(r))
|
|
4815
4824
|
return g.create(m.VALUE);
|
|
@@ -4819,6 +4828,8 @@ class y extends kt {
|
|
|
4819
4828
|
return Number.isFinite(n) ? y.create(n) : g.create(m.NUM);
|
|
4820
4829
|
}
|
|
4821
4830
|
multiplyBy(e) {
|
|
4831
|
+
if (typeof e == "string" && e.trim() === "")
|
|
4832
|
+
return g.create(m.VALUE);
|
|
4822
4833
|
const t = +this.getValue(), r = +e;
|
|
4823
4834
|
if (Number.isNaN(t) || Number.isNaN(r))
|
|
4824
4835
|
return g.create(m.VALUE);
|
|
@@ -4828,6 +4839,8 @@ class y extends kt {
|
|
|
4828
4839
|
return Number.isFinite(n) ? y.create(n) : g.create(m.NUM);
|
|
4829
4840
|
}
|
|
4830
4841
|
dividedBy(e) {
|
|
4842
|
+
if (typeof e == "string" && e.trim() === "")
|
|
4843
|
+
return g.create(m.VALUE);
|
|
4831
4844
|
const t = +this.getValue(), r = +e;
|
|
4832
4845
|
if (Number.isNaN(t) || Number.isNaN(r))
|
|
4833
4846
|
return g.create(m.VALUE);
|
|
@@ -5093,7 +5106,7 @@ class y extends kt {
|
|
|
5093
5106
|
return this;
|
|
5094
5107
|
}
|
|
5095
5108
|
convertToBooleanObjectValue() {
|
|
5096
|
-
return
|
|
5109
|
+
return Qn(!0);
|
|
5097
5110
|
}
|
|
5098
5111
|
_compareInfinity(e, t, r) {
|
|
5099
5112
|
let n = !1;
|
|
@@ -5120,7 +5133,7 @@ class y extends kt {
|
|
|
5120
5133
|
return n;
|
|
5121
5134
|
}
|
|
5122
5135
|
}
|
|
5123
|
-
const Lf = 1e5,
|
|
5136
|
+
const Lf = 1e5, Ys = new Nt(Lf);
|
|
5124
5137
|
class j extends kt {
|
|
5125
5138
|
constructor(e) {
|
|
5126
5139
|
super(e);
|
|
@@ -5128,11 +5141,11 @@ class j extends kt {
|
|
|
5128
5141
|
this._value = e;
|
|
5129
5142
|
}
|
|
5130
5143
|
static create(e) {
|
|
5131
|
-
const t =
|
|
5144
|
+
const t = Ys.get(e);
|
|
5132
5145
|
if (t)
|
|
5133
5146
|
return t;
|
|
5134
5147
|
const r = new j(e);
|
|
5135
|
-
return
|
|
5148
|
+
return Ys.set(e, r), r;
|
|
5136
5149
|
}
|
|
5137
5150
|
getValue() {
|
|
5138
5151
|
return this._value;
|
|
@@ -5159,7 +5172,7 @@ class j extends kt {
|
|
|
5159
5172
|
return this.convertToNumberObjectValue().divided(e);
|
|
5160
5173
|
}
|
|
5161
5174
|
compare(e, t, r) {
|
|
5162
|
-
return e.isArray() ? e.compare(this,
|
|
5175
|
+
return e.isArray() ? e.compare(this, Aa(t), r) : this.compareBy(e.getValue(), t, r);
|
|
5163
5176
|
}
|
|
5164
5177
|
compareBy(e, t, r = !1) {
|
|
5165
5178
|
let n = this.getValue(), s = !1;
|
|
@@ -5212,7 +5225,7 @@ class j extends kt {
|
|
|
5212
5225
|
}
|
|
5213
5226
|
}
|
|
5214
5227
|
convertToNumberObjectValue() {
|
|
5215
|
-
return
|
|
5228
|
+
return Wn(this.getValue());
|
|
5216
5229
|
}
|
|
5217
5230
|
convertToBooleanObjectValue() {
|
|
5218
5231
|
return T.create(!0);
|
|
@@ -5222,7 +5235,7 @@ class j extends kt {
|
|
|
5222
5235
|
return T.create(n);
|
|
5223
5236
|
}
|
|
5224
5237
|
}
|
|
5225
|
-
function
|
|
5238
|
+
function Qn(i) {
|
|
5226
5239
|
if (typeof i == "boolean")
|
|
5227
5240
|
return T.create(i);
|
|
5228
5241
|
let a = !1;
|
|
@@ -5237,7 +5250,7 @@ function Pf(i) {
|
|
|
5237
5250
|
let a = i.toString();
|
|
5238
5251
|
return a.charAt(0) === '"' && a.charAt(a.length - 1) === '"' && (a = a.slice(1, -1), a = a.replace(/""/g, '"')), j.create(a);
|
|
5239
5252
|
}
|
|
5240
|
-
function
|
|
5253
|
+
function Wn(i, a = "") {
|
|
5241
5254
|
if (typeof i == "boolean") {
|
|
5242
5255
|
let e = 0;
|
|
5243
5256
|
return i && (e = 1), y.create(e, a);
|
|
@@ -5593,7 +5606,7 @@ class q extends kt {
|
|
|
5593
5606
|
* @returns
|
|
5594
5607
|
*/
|
|
5595
5608
|
_binarySearch(e, t, r, n = Wt.MIN, s = Le.MIN) {
|
|
5596
|
-
const o =
|
|
5609
|
+
const o = An(), u = Number(e.getValue()), c = !Number.isNaN(u);
|
|
5597
5610
|
let l = 0, f = t.length - 1, h = -1, d = -1, _ = -1;
|
|
5598
5611
|
for (; l <= f; ) {
|
|
5599
5612
|
const C = Math.floor((l + f) / 2), E = t[C];
|
|
@@ -5942,7 +5955,7 @@ class q extends kt {
|
|
|
5942
5955
|
this._flattenCache = null, this._sliceCache.clear();
|
|
5943
5956
|
}
|
|
5944
5957
|
_sort(e) {
|
|
5945
|
-
const t =
|
|
5958
|
+
const t = An();
|
|
5946
5959
|
return (r, n) => {
|
|
5947
5960
|
const s = r[e], o = n[e];
|
|
5948
5961
|
return s == null ? 1 : o == null ? -1 : s.isError() && s.isError() ? 0 : s.isError() ? 1 : o.isError() ? -1 : t(
|
|
@@ -6254,7 +6267,7 @@ class Vt {
|
|
|
6254
6267
|
if (yr.has(e))
|
|
6255
6268
|
return g.create(e);
|
|
6256
6269
|
if (e === er.TRUE || e === er.FALSE)
|
|
6257
|
-
return
|
|
6270
|
+
return Qn(a);
|
|
6258
6271
|
if (Q(a))
|
|
6259
6272
|
return y.create(Number(a));
|
|
6260
6273
|
const { isNumberPattern: t, value: r, pattern: n } = Al(a);
|
|
@@ -6263,15 +6276,15 @@ class Vt {
|
|
|
6263
6276
|
const s = a.replace(/\n/g, "").replace(/\r/g, "");
|
|
6264
6277
|
return !Uf(s) && xc(s) ? q.create(s) : Pf(a);
|
|
6265
6278
|
}
|
|
6266
|
-
return typeof a == "number" ?
|
|
6279
|
+
return typeof a == "number" ? Wn(a) : g.create(m.VALUE);
|
|
6267
6280
|
}
|
|
6268
6281
|
}
|
|
6269
6282
|
function Uf(i) {
|
|
6270
6283
|
const a = i.trim();
|
|
6271
6284
|
return a.startsWith('"') && a.endsWith('"');
|
|
6272
6285
|
}
|
|
6273
|
-
const vf = 1e4,
|
|
6274
|
-
class
|
|
6286
|
+
const vf = 1e4, Rn = new Nt(vf);
|
|
6287
|
+
class qn extends kn {
|
|
6275
6288
|
constructor(e) {
|
|
6276
6289
|
super();
|
|
6277
6290
|
A(this, "_forcedSheetId", "");
|
|
@@ -6319,7 +6332,7 @@ class Wn extends Fn {
|
|
|
6319
6332
|
};
|
|
6320
6333
|
}
|
|
6321
6334
|
getRangePosition() {
|
|
6322
|
-
let { startRow: e, startColumn: t, endRow: r, endColumn: n } =
|
|
6335
|
+
let { startRow: e, startColumn: t, endRow: r, endColumn: n } = aa(this._rangeData, this._refOffsetX, this._refOffsetY);
|
|
6323
6336
|
return Number.isNaN(e) && (e = 0), Number.isNaN(t) && (t = 0), Number.isNaN(r) && (r = this.getActiveSheetRowCount() - 1), Number.isNaN(n) && (n = this.getActiveSheetColumnCount() - 1), {
|
|
6324
6337
|
...this._rangeData,
|
|
6325
6338
|
startRow: e,
|
|
@@ -6512,9 +6525,9 @@ class Wn extends Fn {
|
|
|
6512
6525
|
return g.create(t);
|
|
6513
6526
|
if (e.t === Rt.NUMBER) {
|
|
6514
6527
|
const r = this._getPatternByCell(e);
|
|
6515
|
-
return lc(r) ? j.create(t.toString()) :
|
|
6528
|
+
return lc(r) ? j.create(t.toString()) : Wn(t, r);
|
|
6516
6529
|
}
|
|
6517
|
-
return e.t === Rt.STRING || e.t === Rt.FORCE_STRING ? j.create(t.toString()) : e.t === Rt.BOOLEAN ?
|
|
6530
|
+
return e.t === Rt.STRING || e.t === Rt.FORCE_STRING ? j.create(t.toString()) : e.t === Rt.BOOLEAN ? Qn(t) : Vt.create(t);
|
|
6518
6531
|
}
|
|
6519
6532
|
_getPatternByCell(e) {
|
|
6520
6533
|
var n;
|
|
@@ -6582,7 +6595,7 @@ class Wn extends Fn {
|
|
|
6582
6595
|
}
|
|
6583
6596
|
toArrayValueObject(e = !0) {
|
|
6584
6597
|
var _;
|
|
6585
|
-
const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u =
|
|
6598
|
+
const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u = Rn.get(o);
|
|
6586
6599
|
if (u && e)
|
|
6587
6600
|
return u;
|
|
6588
6601
|
const c = r - t + 1, l = s - n + 1;
|
|
@@ -6602,7 +6615,7 @@ class Wn extends Fn {
|
|
|
6602
6615
|
row: t,
|
|
6603
6616
|
column: n
|
|
6604
6617
|
}, d = q.create(h);
|
|
6605
|
-
return e &&
|
|
6618
|
+
return e && Rn.set(o, d), d;
|
|
6606
6619
|
}
|
|
6607
6620
|
toUnitRange() {
|
|
6608
6621
|
return {
|
|
@@ -6627,7 +6640,7 @@ class Wn extends Fn {
|
|
|
6627
6640
|
return q.create(e);
|
|
6628
6641
|
}
|
|
6629
6642
|
}
|
|
6630
|
-
class Tf extends
|
|
6643
|
+
class Tf extends kn {
|
|
6631
6644
|
constructor(a) {
|
|
6632
6645
|
super(), this._promise = a;
|
|
6633
6646
|
}
|
|
@@ -6638,7 +6651,7 @@ class Tf extends Fn {
|
|
|
6638
6651
|
return this._promise;
|
|
6639
6652
|
}
|
|
6640
6653
|
}
|
|
6641
|
-
class Bf extends
|
|
6654
|
+
class Bf extends kn {
|
|
6642
6655
|
constructor(a) {
|
|
6643
6656
|
super(), this._promiseList = a;
|
|
6644
6657
|
}
|
|
@@ -6668,7 +6681,7 @@ class Bf extends Fn {
|
|
|
6668
6681
|
return q.create(e);
|
|
6669
6682
|
}
|
|
6670
6683
|
}
|
|
6671
|
-
class
|
|
6684
|
+
class pn extends qn {
|
|
6672
6685
|
constructor(a, e, t) {
|
|
6673
6686
|
super(""), this.setRangeData(a), e && this.setForcedSheetIdDirect(e), t && this.setForcedUnitIdDirect(t);
|
|
6674
6687
|
}
|
|
@@ -6676,7 +6689,7 @@ class Rn extends Wn {
|
|
|
6676
6689
|
return !0;
|
|
6677
6690
|
}
|
|
6678
6691
|
}
|
|
6679
|
-
class
|
|
6692
|
+
class ba extends qn {
|
|
6680
6693
|
constructor(a) {
|
|
6681
6694
|
super(a);
|
|
6682
6695
|
const e = mr(a);
|
|
@@ -6701,7 +6714,7 @@ class ya extends Wn {
|
|
|
6701
6714
|
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;
|
|
6702
6715
|
}
|
|
6703
6716
|
_createRange(a) {
|
|
6704
|
-
const e = new
|
|
6717
|
+
const e = new pn(
|
|
6705
6718
|
a,
|
|
6706
6719
|
this.getForcedSheetId(),
|
|
6707
6720
|
this.getForcedUnitId()
|
|
@@ -6715,7 +6728,7 @@ class ya extends Wn {
|
|
|
6715
6728
|
return s && e.setForcedUnitIdDirect(s), e;
|
|
6716
6729
|
}
|
|
6717
6730
|
}
|
|
6718
|
-
class
|
|
6731
|
+
class ya extends qn {
|
|
6719
6732
|
constructor(a) {
|
|
6720
6733
|
super(a);
|
|
6721
6734
|
const e = mr(a);
|
|
@@ -6746,7 +6759,7 @@ class Ra extends Wn {
|
|
|
6746
6759
|
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;
|
|
6747
6760
|
}
|
|
6748
6761
|
}
|
|
6749
|
-
class
|
|
6762
|
+
class Ra extends qn {
|
|
6750
6763
|
constructor(a) {
|
|
6751
6764
|
super(a);
|
|
6752
6765
|
const e = mr(a);
|
|
@@ -6820,7 +6833,7 @@ function Nr(i, a, e, t = "", r = "") {
|
|
|
6820
6833
|
};
|
|
6821
6834
|
return q.create(n);
|
|
6822
6835
|
}
|
|
6823
|
-
function
|
|
6836
|
+
function pa(i) {
|
|
6824
6837
|
const a = [
|
|
6825
6838
|
$.EQUALS,
|
|
6826
6839
|
$.NOT_EQUAL,
|
|
@@ -6836,10 +6849,10 @@ function Va(i) {
|
|
|
6836
6849
|
}
|
|
6837
6850
|
return [$.EQUALS, Vt.create(i)];
|
|
6838
6851
|
}
|
|
6839
|
-
function
|
|
6852
|
+
function Kn(i, a, e, t) {
|
|
6840
6853
|
if (!e)
|
|
6841
6854
|
if (a.isString()) {
|
|
6842
|
-
const r = `${a.getValue()}`, [n, s] =
|
|
6855
|
+
const r = `${a.getValue()}`, [n, s] = pa(r);
|
|
6843
6856
|
e = n, a = s;
|
|
6844
6857
|
} else
|
|
6845
6858
|
e = $.EQUALS;
|
|
@@ -6849,7 +6862,7 @@ function If(i, a) {
|
|
|
6849
6862
|
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);
|
|
6850
6863
|
return r.mapValue((s, o, u) => {
|
|
6851
6864
|
const c = n.get(o, u);
|
|
6852
|
-
return s != null && s.isError() ? s : c != null && c.isError() ? c : s != null && s.isBoolean() && (c != null && c.isBoolean()) ?
|
|
6865
|
+
return s != null && s.isError() ? s : c != null && c.isError() ? c : s != null && s.isBoolean() && (c != null && c.isBoolean()) ? Qn(s.getValue() && c.getValue()) : T.create(!1);
|
|
6853
6866
|
});
|
|
6854
6867
|
}
|
|
6855
6868
|
function Ff(i) {
|
|
@@ -6941,8 +6954,8 @@ function kr(i, a, e, t = !1) {
|
|
|
6941
6954
|
O(a, e, o, g.create(m.NA)).iterator((c, l, f) => {
|
|
6942
6955
|
if (!c)
|
|
6943
6956
|
return;
|
|
6944
|
-
let h =
|
|
6945
|
-
if (t && (h =
|
|
6957
|
+
let h = Kn(s, c);
|
|
6958
|
+
if (t && (h = Xn(h, s, c)), r[l] === void 0 && (r[l] = []), r[l][f] === void 0) {
|
|
6946
6959
|
r[l][f] = h;
|
|
6947
6960
|
return;
|
|
6948
6961
|
}
|
|
@@ -6951,8 +6964,8 @@ function kr(i, a, e, t = !1) {
|
|
|
6951
6964
|
}
|
|
6952
6965
|
return r;
|
|
6953
6966
|
}
|
|
6954
|
-
function
|
|
6955
|
-
const [t, r] =
|
|
6967
|
+
function Xn(i, a, e) {
|
|
6968
|
+
const [t, r] = pa(`${e.getValue()}`);
|
|
6956
6969
|
return i.mapValue((n, s, o) => {
|
|
6957
6970
|
const u = a.get(s, o);
|
|
6958
6971
|
if (u && kf(u, r))
|
|
@@ -6980,18 +6993,18 @@ function kf(i, a) {
|
|
|
6980
6993
|
const e = i.isString() && i.getValue() === "", t = a.isString() && a.getValue() === "";
|
|
6981
6994
|
return !!((e || i.isNull()) && (t || a.isNull()) || i.isString() && !e && a.isString() && !t);
|
|
6982
6995
|
}
|
|
6983
|
-
var
|
|
6996
|
+
var fn = /* @__PURE__ */ ((i) => (i[i.CELL = 0] = "CELL", i[i.COLUMN = 1] = "COLUMN", i[i.ROW = 2] = "ROW", i))(fn || {});
|
|
6984
6997
|
function $f(i, a) {
|
|
6985
6998
|
let e;
|
|
6986
6999
|
switch (a) {
|
|
6987
7000
|
case 0:
|
|
6988
|
-
e = new
|
|
7001
|
+
e = new ba(i);
|
|
6989
7002
|
break;
|
|
6990
7003
|
case 1:
|
|
6991
|
-
e = new
|
|
7004
|
+
e = new ya(i);
|
|
6992
7005
|
break;
|
|
6993
7006
|
case 2:
|
|
6994
|
-
e = new
|
|
7007
|
+
e = new Ra(i);
|
|
6995
7008
|
break;
|
|
6996
7009
|
default:
|
|
6997
7010
|
throw new Error("Unknown reference object type");
|
|
@@ -7007,7 +7020,7 @@ var Hf = Object.getOwnPropertyDescriptor, Gf = (i, a, e, t) => {
|
|
|
7007
7020
|
(s = i[n]) && (r = s(r) || r);
|
|
7008
7021
|
return r;
|
|
7009
7022
|
}, Qf = (i, a) => (e, t) => a(e, t, i), Xe = /* @__PURE__ */ ((i) => (i[i.IDLE = 0] = "IDLE", i[i.START = 1] = "START", i[i.START_DEPENDENCY = 2] = "START_DEPENDENCY", i[i.START_CALCULATION = 3] = "START_CALCULATION", i[i.CURRENTLY_CALCULATING = 4] = "CURRENTLY_CALCULATING", i[i.START_DEPENDENCY_ARRAY_FORMULA = 5] = "START_DEPENDENCY_ARRAY_FORMULA", i[i.START_CALCULATION_ARRAY_FORMULA = 6] = "START_CALCULATION_ARRAY_FORMULA", i[i.CURRENTLY_CALCULATING_ARRAY_FORMULA = 7] = "CURRENTLY_CALCULATING_ARRAY_FORMULA", i[i.CALCULATION_COMPLETED = 8] = "CALCULATION_COMPLETED", i))(Xe || {}), Dr = /* @__PURE__ */ ((i) => (i[i.INITIAL = 0] = "INITIAL", i[i.STOP_EXECUTION = 1] = "STOP_EXECUTION", i[i.NOT_EXECUTED = 2] = "NOT_EXECUTED", i[i.SUCCESS = 3] = "SUCCESS", i))(Dr || {});
|
|
7010
|
-
let
|
|
7023
|
+
let Hs = class extends Ne {
|
|
7011
7024
|
constructor(a) {
|
|
7012
7025
|
super();
|
|
7013
7026
|
A(this, "_formulaExecuteStage", 0);
|
|
@@ -7335,9 +7348,9 @@ let Gs = class extends Ne {
|
|
|
7335
7348
|
return n.length === 0 ? !0 : mc(n, a, e, t, r);
|
|
7336
7349
|
}
|
|
7337
7350
|
};
|
|
7338
|
-
|
|
7351
|
+
Hs = Gf([
|
|
7339
7352
|
Qf(0, Ft)
|
|
7340
|
-
],
|
|
7353
|
+
], Hs);
|
|
7341
7354
|
const Ot = et("univer.formula.runtime.service");
|
|
7342
7355
|
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 || {});
|
|
7343
7356
|
const _t = /* @__PURE__ */ new Map([
|
|
@@ -7476,7 +7489,7 @@ class Et {
|
|
|
7476
7489
|
return a instanceof ae ? r = a.getToken() : r = a, new Ge(r);
|
|
7477
7490
|
}
|
|
7478
7491
|
}
|
|
7479
|
-
class
|
|
7492
|
+
class Gs extends Ge {
|
|
7480
7493
|
get nodeType() {
|
|
7481
7494
|
return oe.ROOT;
|
|
7482
7495
|
}
|
|
@@ -7498,7 +7511,7 @@ class Mo extends Et {
|
|
|
7498
7511
|
if (!(a instanceof ae))
|
|
7499
7512
|
return;
|
|
7500
7513
|
if (a.getToken() === Ut)
|
|
7501
|
-
return new
|
|
7514
|
+
return new Gs(Ut);
|
|
7502
7515
|
}
|
|
7503
7516
|
}
|
|
7504
7517
|
const Wf = 5e3, jr = new Nt(Wf);
|
|
@@ -7599,7 +7612,7 @@ var Te = /* @__PURE__ */ ((i) => (i.COMPARE = "COMPARE", i.DIVIDED = "DIVIDED",
|
|
|
7599
7612
|
(s = i[n]) && (r = s(r) || r);
|
|
7600
7613
|
return r;
|
|
7601
7614
|
}, Vi = (i, a) => (e, t) => a(e, t, i);
|
|
7602
|
-
class
|
|
7615
|
+
class Vn extends Ge {
|
|
7603
7616
|
constructor(a, e, t) {
|
|
7604
7617
|
super(e), this._runtimeService = a, this._operatorString = e, this._functionExecutor = t;
|
|
7605
7618
|
}
|
|
@@ -7625,7 +7638,7 @@ class pn extends Ge {
|
|
|
7625
7638
|
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);
|
|
7626
7639
|
}
|
|
7627
7640
|
}
|
|
7628
|
-
let
|
|
7641
|
+
let Nn = class extends Et {
|
|
7629
7642
|
constructor(i, a) {
|
|
7630
7643
|
super(), this._functionService = i, this._runtimeService = a;
|
|
7631
7644
|
}
|
|
@@ -7641,15 +7654,15 @@ let Vn = class extends Et {
|
|
|
7641
7654
|
let t = "";
|
|
7642
7655
|
if (e === Me.MINUS)
|
|
7643
7656
|
t = Te.MINUS;
|
|
7644
|
-
else return e === Me.AT ? new
|
|
7657
|
+
else return e === Me.AT ? new Vn(this._runtimeService, e) : void 0;
|
|
7645
7658
|
const r = this._functionService.getExecutor(t);
|
|
7646
|
-
return r ? new
|
|
7659
|
+
return r ? new Vn(this._runtimeService, e, r) : (console.error(`No function ${a}`), xe.create(m.NAME));
|
|
7647
7660
|
}
|
|
7648
7661
|
};
|
|
7649
|
-
|
|
7662
|
+
Nn = Zf([
|
|
7650
7663
|
Vi(0, Yt),
|
|
7651
7664
|
Vi(1, Ot)
|
|
7652
|
-
],
|
|
7665
|
+
], Nn);
|
|
7653
7666
|
new RegExp(Me.MINUS, "g");
|
|
7654
7667
|
new RegExp(Me.AT, "g");
|
|
7655
7668
|
function So(i, a, e) {
|
|
@@ -7658,9 +7671,9 @@ function So(i, a, e) {
|
|
|
7658
7671
|
let o = 0;
|
|
7659
7672
|
if (s[0] === Me.MINUS) {
|
|
7660
7673
|
const u = a.getExecutor(Te.MINUS);
|
|
7661
|
-
t = new
|
|
7674
|
+
t = new Vn(e, Me.MINUS, u), o++;
|
|
7662
7675
|
}
|
|
7663
|
-
return s[0] === Me.AT && (r = new
|
|
7676
|
+
return s[0] === Me.AT && (r = new Vn(e, Me.AT), t && r.setParent(t), o++), o > 0 && (n = n.slice(o)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: r };
|
|
7664
7677
|
}
|
|
7665
7678
|
var zf = Object.getOwnPropertyDescriptor, Jf = (i, a, e, t) => {
|
|
7666
7679
|
for (var r = t > 1 ? void 0 : t ? zf(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
@@ -7826,7 +7839,7 @@ class th extends Ge {
|
|
|
7826
7839
|
this.setValue(g.create(m.NAME));
|
|
7827
7840
|
}
|
|
7828
7841
|
}
|
|
7829
|
-
let
|
|
7842
|
+
let On = class extends Et {
|
|
7830
7843
|
constructor(i, a, e, t, r, n) {
|
|
7831
7844
|
super(), this._functionService = i, this._currentConfigService = a, this._runtimeService = e, this._definedNamesService = t, this._injector = r, this._formulaDataModel = n;
|
|
7832
7845
|
}
|
|
@@ -7861,14 +7874,14 @@ let Nn = class extends Et {
|
|
|
7861
7874
|
return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken()) === K.COLON;
|
|
7862
7875
|
}
|
|
7863
7876
|
};
|
|
7864
|
-
|
|
7877
|
+
On = Jf([
|
|
7865
7878
|
ir(0, Yt),
|
|
7866
7879
|
ir(1, Ft),
|
|
7867
7880
|
ir(2, Ot),
|
|
7868
7881
|
ir(3, pr),
|
|
7869
7882
|
ir(4, ye(Qi)),
|
|
7870
7883
|
ir(5, ye(gr))
|
|
7871
|
-
],
|
|
7884
|
+
], On);
|
|
7872
7885
|
var rh = Object.getOwnPropertyDescriptor, nh = (i, a, e, t) => {
|
|
7873
7886
|
for (var r = t > 1 ? void 0 : t ? rh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
7874
7887
|
(s = i[n]) && (r = s(r) || r);
|
|
@@ -7952,13 +7965,13 @@ function Do(i) {
|
|
|
7952
7965
|
function ah(i) {
|
|
7953
7966
|
return i instanceof ae ? i.getToken() === co : !1;
|
|
7954
7967
|
}
|
|
7955
|
-
function
|
|
7968
|
+
function Va(i, a, e) {
|
|
7956
7969
|
const t = i.getChildren(), r = t.length, n = t[0];
|
|
7957
7970
|
for (let s = 0; s < r; s++) {
|
|
7958
7971
|
const o = t[s];
|
|
7959
7972
|
if (!(Do(n) && s !== 0))
|
|
7960
7973
|
if (o instanceof ae)
|
|
7961
|
-
|
|
7974
|
+
Va(o, a, e);
|
|
7962
7975
|
else {
|
|
7963
7976
|
const u = o.trim();
|
|
7964
7977
|
if (e.has(u)) {
|
|
@@ -7979,14 +7992,14 @@ function Lo(i) {
|
|
|
7979
7992
|
const r = e.get(t);
|
|
7980
7993
|
return r == null && i.getValue() ? i : Lo(r);
|
|
7981
7994
|
}
|
|
7982
|
-
class
|
|
7995
|
+
class Na extends kt {
|
|
7983
7996
|
constructor(e, t, r) {
|
|
7984
7997
|
super(0);
|
|
7985
7998
|
A(this, "_lambdaPrivacyValueMap", /* @__PURE__ */ new Map());
|
|
7986
7999
|
this._lambdaNode = e, this._interpreter = t, this._lambdaPrivacyVarKeys = r, this._lambdaPrivacyValueMap.clear();
|
|
7987
8000
|
}
|
|
7988
8001
|
static create(e, t, r) {
|
|
7989
|
-
return new
|
|
8002
|
+
return new Na(e, t, r);
|
|
7990
8003
|
}
|
|
7991
8004
|
dispose() {
|
|
7992
8005
|
this._lambdaPrivacyValueMap.clear(), this._lambdaPrivacyValueMap = /* @__PURE__ */ new Map(), this._lambdaNode = null, this._interpreter = null, this._lambdaPrivacyVarKeys = [];
|
|
@@ -8073,7 +8086,7 @@ class uh extends Ge {
|
|
|
8073
8086
|
}
|
|
8074
8087
|
execute() {
|
|
8075
8088
|
if (this.isEmptyParamFunction())
|
|
8076
|
-
this.setValue(
|
|
8089
|
+
this.setValue(Na.create(this, this._interpreter, this._lambdaPrivacyVarKeys));
|
|
8077
8090
|
else {
|
|
8078
8091
|
const e = this.getChildren(), t = e.length;
|
|
8079
8092
|
this.setValue(e[t - 1].getValue());
|
|
@@ -8090,7 +8103,7 @@ class uh extends Ge {
|
|
|
8090
8103
|
// return Promise.resolve(AstNodePromiseType.SUCCESS);
|
|
8091
8104
|
// }
|
|
8092
8105
|
}
|
|
8093
|
-
let
|
|
8106
|
+
let Mn = class extends Et {
|
|
8094
8107
|
constructor(i, a) {
|
|
8095
8108
|
super(), this._runtimeService = i, this._interpreter = a;
|
|
8096
8109
|
}
|
|
@@ -8125,13 +8138,13 @@ let On = class extends Et {
|
|
|
8125
8138
|
return this.create(i);
|
|
8126
8139
|
}
|
|
8127
8140
|
_updateLambdaStatement(i, a, e) {
|
|
8128
|
-
|
|
8141
|
+
Va(i, a, e);
|
|
8129
8142
|
}
|
|
8130
8143
|
};
|
|
8131
|
-
|
|
8144
|
+
Mn = oh([
|
|
8132
8145
|
Ni(0, Ot),
|
|
8133
8146
|
Ni(1, ye(_r))
|
|
8134
|
-
],
|
|
8147
|
+
], Mn);
|
|
8135
8148
|
function Po(i) {
|
|
8136
8149
|
if (!i)
|
|
8137
8150
|
return;
|
|
@@ -8218,7 +8231,7 @@ class gh extends Ge {
|
|
|
8218
8231
|
);
|
|
8219
8232
|
}
|
|
8220
8233
|
}
|
|
8221
|
-
let
|
|
8234
|
+
let wn = class extends Et {
|
|
8222
8235
|
constructor(i) {
|
|
8223
8236
|
super(), this._functionService = i;
|
|
8224
8237
|
}
|
|
@@ -8240,9 +8253,9 @@ let Mn = class extends Et {
|
|
|
8240
8253
|
return this.create(a);
|
|
8241
8254
|
}
|
|
8242
8255
|
};
|
|
8243
|
-
|
|
8256
|
+
wn = hh([
|
|
8244
8257
|
mh(0, Yt)
|
|
8245
|
-
],
|
|
8258
|
+
], wn);
|
|
8246
8259
|
var dh = Object.getOwnPropertyDescriptor, Ch = (i, a, e, t) => {
|
|
8247
8260
|
for (var r = t > 1 ? void 0 : t ? dh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
8248
8261
|
(s = i[n]) && (r = s(r) || r);
|
|
@@ -8274,7 +8287,7 @@ class Cs extends Ge {
|
|
|
8274
8287
|
};
|
|
8275
8288
|
}
|
|
8276
8289
|
}
|
|
8277
|
-
let
|
|
8290
|
+
let Sn = class extends Et {
|
|
8278
8291
|
constructor(i, a, e) {
|
|
8279
8292
|
super(), this._currentConfigService = i, this._formulaRuntimeService = a, this._functionService = e;
|
|
8280
8293
|
}
|
|
@@ -8289,7 +8302,7 @@ let wn = class extends Et {
|
|
|
8289
8302
|
if (!a && s.charAt(0) === '"' && s.charAt(s.length - 1) === '"')
|
|
8290
8303
|
return;
|
|
8291
8304
|
let c;
|
|
8292
|
-
if (Br(s) ? c = new Cs(r, n, s,
|
|
8305
|
+
if (Br(s) ? c = new Cs(r, n, s, fn.CELL, t) : a && this._checkParentIsUnionOperator(i) && (Ji(s) ? c = new Cs(r, n, s, fn.ROW, t) : eo(s) && (c = new Cs(r, n, s, fn.COLUMN, t))), c)
|
|
8293
8306
|
return u ? c.setParent(u) : o && c.setParent(o), c;
|
|
8294
8307
|
}
|
|
8295
8308
|
_checkParentIsUnionOperator(i) {
|
|
@@ -8297,11 +8310,11 @@ let wn = class extends Et {
|
|
|
8297
8310
|
return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken().trim()) === K.COLON;
|
|
8298
8311
|
}
|
|
8299
8312
|
};
|
|
8300
|
-
|
|
8313
|
+
Sn = Ch([
|
|
8301
8314
|
ds(0, Ft),
|
|
8302
8315
|
ds(1, Ot),
|
|
8303
8316
|
ds(2, Yt)
|
|
8304
|
-
],
|
|
8317
|
+
], Sn);
|
|
8305
8318
|
var _h = Object.getOwnPropertyDescriptor, Ah = (i, a, e, t) => {
|
|
8306
8319
|
for (var r = t > 1 ? void 0 : t ? _h(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
8307
8320
|
(s = i[n]) && (r = s(r) || r);
|
|
@@ -8337,7 +8350,7 @@ class Oi extends Ge {
|
|
|
8337
8350
|
return o && this._lexer.treeBuilder(o), g.create(m.VALUE);
|
|
8338
8351
|
}
|
|
8339
8352
|
}
|
|
8340
|
-
let
|
|
8353
|
+
let Dn = class extends Et {
|
|
8341
8354
|
constructor(i, a, e) {
|
|
8342
8355
|
super(), this._functionService = i, this._lexer = a, this._currentConfigService = e;
|
|
8343
8356
|
}
|
|
@@ -8358,11 +8371,11 @@ let Sn = class extends Et {
|
|
|
8358
8371
|
return t ? new Oi(this._currentConfigService, this._lexer, a, t) : (console.error(`No function ${i}`), xe.create(m.NAME));
|
|
8359
8372
|
}
|
|
8360
8373
|
};
|
|
8361
|
-
|
|
8374
|
+
Dn = Ah([
|
|
8362
8375
|
_s(0, Yt),
|
|
8363
8376
|
_s(1, ye(dr)),
|
|
8364
8377
|
_s(2, Ft)
|
|
8365
|
-
],
|
|
8378
|
+
], Dn);
|
|
8366
8379
|
var Eh = Object.getOwnPropertyDescriptor, bh = (i, a, e, t) => {
|
|
8367
8380
|
for (var r = t > 1 ? void 0 : t ? Eh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
8368
8381
|
(s = i[n]) && (r = s(r) || r);
|
|
@@ -8386,7 +8399,7 @@ class Rh extends Ge {
|
|
|
8386
8399
|
return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(m.REF) : (a = a, e = e, Yf(a, e));
|
|
8387
8400
|
}
|
|
8388
8401
|
}
|
|
8389
|
-
let
|
|
8402
|
+
let Ln = class extends Et {
|
|
8390
8403
|
constructor(i) {
|
|
8391
8404
|
super(), this._functionService = i;
|
|
8392
8405
|
}
|
|
@@ -8404,9 +8417,9 @@ let Dn = class extends Et {
|
|
|
8404
8417
|
return this.create(e);
|
|
8405
8418
|
}
|
|
8406
8419
|
};
|
|
8407
|
-
|
|
8420
|
+
Ln = bh([
|
|
8408
8421
|
yh(0, Yt)
|
|
8409
|
-
],
|
|
8422
|
+
], Ln);
|
|
8410
8423
|
class ph extends Ge {
|
|
8411
8424
|
constructor(a) {
|
|
8412
8425
|
super(a);
|
|
@@ -8462,20 +8475,20 @@ let Ur = class extends Ne {
|
|
|
8462
8475
|
}), this._astNodeFactoryList = [];
|
|
8463
8476
|
}
|
|
8464
8477
|
parse(a) {
|
|
8465
|
-
const e = new
|
|
8478
|
+
const e = new Gs(Ut), t = this._parse(a, e);
|
|
8466
8479
|
return a.hasDefinedNames() && (t == null || t.setDefinedNames(a.getDefinedNames())), t;
|
|
8467
8480
|
}
|
|
8468
8481
|
_lambdaParameterHandler(a, e) {
|
|
8469
8482
|
if (e.getLambdaId == null)
|
|
8470
8483
|
return xe.create(m.VALUE);
|
|
8471
|
-
const t = e.getLambdaId(), r = new
|
|
8484
|
+
const t = e.getLambdaId(), r = new Gs(Ut), n = this._runtimeService.getFunctionDefinitionPrivacyVar(t);
|
|
8472
8485
|
if (!n)
|
|
8473
8486
|
return !1;
|
|
8474
8487
|
const s = [...n.keys()], o = a.getChildren(), u = o.length;
|
|
8475
8488
|
for (let c = 0; c < u; c++) {
|
|
8476
8489
|
const l = o[c];
|
|
8477
8490
|
if (l instanceof ae) {
|
|
8478
|
-
|
|
8491
|
+
Va(l, t, n), this._parse(l, r);
|
|
8479
8492
|
const h = r.getChildren()[c];
|
|
8480
8493
|
h != null && n.set(s[c], h);
|
|
8481
8494
|
} else
|
|
@@ -8512,7 +8525,7 @@ let Ur = class extends Ne {
|
|
|
8512
8525
|
const f = this._changeLetToLambda(a);
|
|
8513
8526
|
return f != null ? this._parse(f, e) : xe.create(m.ERROR);
|
|
8514
8527
|
}
|
|
8515
|
-
if (o ===
|
|
8528
|
+
if (o === ft) {
|
|
8516
8529
|
if (s = e, r === 0)
|
|
8517
8530
|
return new lh(Ut).setParent(e), s;
|
|
8518
8531
|
} else {
|
|
@@ -8533,7 +8546,7 @@ let Ur = class extends Ne {
|
|
|
8533
8546
|
continue;
|
|
8534
8547
|
let d = null;
|
|
8535
8548
|
if (h instanceof ae) {
|
|
8536
|
-
if (h.getToken() ===
|
|
8549
|
+
if (h.getToken() === ft && h.getChildren().length === 0) {
|
|
8537
8550
|
const _ = (l = h.getParent()) == null ? void 0 : l.getChildren();
|
|
8538
8551
|
if (_ && _.length === 1)
|
|
8539
8552
|
return xe.create(m.NAME);
|
|
@@ -8625,14 +8638,14 @@ let Ur = class extends Ne {
|
|
|
8625
8638
|
Ur = Nh([
|
|
8626
8639
|
ot(0, Ot),
|
|
8627
8640
|
ot(1, ye(Mo)),
|
|
8628
|
-
ot(2, ye(
|
|
8629
|
-
ot(3, ye(
|
|
8641
|
+
ot(2, ye(On)),
|
|
8642
|
+
ot(3, ye(Mn)),
|
|
8630
8643
|
ot(4, ye(xo)),
|
|
8631
|
-
ot(5, ye(
|
|
8632
|
-
ot(6, ye(
|
|
8633
|
-
ot(7, ye(
|
|
8634
|
-
ot(8, ye(
|
|
8635
|
-
ot(9, ye(
|
|
8644
|
+
ot(5, ye(wn)),
|
|
8645
|
+
ot(6, ye(Nn)),
|
|
8646
|
+
ot(7, ye(Sn)),
|
|
8647
|
+
ot(8, ye(Dn)),
|
|
8648
|
+
ot(9, ye(Ln)),
|
|
8636
8649
|
ot(10, ye(jo))
|
|
8637
8650
|
], Ur);
|
|
8638
8651
|
class Oh extends Ne {
|
|
@@ -8979,7 +8992,7 @@ class Mh extends Oh {
|
|
|
8979
8992
|
this._allTreeMap.set(e.treeId, e);
|
|
8980
8993
|
}
|
|
8981
8994
|
}
|
|
8982
|
-
const
|
|
8995
|
+
const Zn = et(
|
|
8983
8996
|
"univer.formula.dependency-manager.service"
|
|
8984
8997
|
);
|
|
8985
8998
|
class wh extends Ne {
|
|
@@ -9101,10 +9114,10 @@ class Sh extends Ne {
|
|
|
9101
9114
|
return this._otherFormulaData;
|
|
9102
9115
|
}
|
|
9103
9116
|
}
|
|
9104
|
-
const
|
|
9117
|
+
const Oa = et(
|
|
9105
9118
|
"univer.formula.other-formula-manager.service"
|
|
9106
9119
|
);
|
|
9107
|
-
var
|
|
9120
|
+
var Qs = /* @__PURE__ */ ((i) => (i[i.NORMAL_FORMULA = 0] = "NORMAL_FORMULA", i[i.OTHER_FORMULA = 1] = "OTHER_FORMULA", i[i.FEATURE_FORMULA = 2] = "FEATURE_FORMULA", i))(Qs || {});
|
|
9108
9121
|
class Uo {
|
|
9109
9122
|
constructor() {
|
|
9110
9123
|
A(this, "_state", 0);
|
|
@@ -9197,7 +9210,7 @@ class Mi extends Uo {
|
|
|
9197
9210
|
e.push({
|
|
9198
9211
|
unitId: r.unitId,
|
|
9199
9212
|
sheetId: r.sheetId,
|
|
9200
|
-
range:
|
|
9213
|
+
range: aa(r.range, this.refOffsetX, this.refOffsetY)
|
|
9201
9214
|
});
|
|
9202
9215
|
}
|
|
9203
9216
|
return e;
|
|
@@ -9389,8 +9402,8 @@ var Dh = Object.getOwnPropertyDescriptor, Lh = (i, a, e, t) => {
|
|
|
9389
9402
|
function or(i) {
|
|
9390
9403
|
return i.getLastTreeId() || 0;
|
|
9391
9404
|
}
|
|
9392
|
-
const
|
|
9393
|
-
let
|
|
9405
|
+
const Ws = et("engine-formula.dependency-generator");
|
|
9406
|
+
let qs = class extends Ne {
|
|
9394
9407
|
constructor(a, e, t, r, n, s, o, u) {
|
|
9395
9408
|
super();
|
|
9396
9409
|
A(this, "_updateRangeFlattenCache", /* @__PURE__ */ new Map());
|
|
@@ -9578,7 +9591,7 @@ let Ks = class extends Ne {
|
|
|
9578
9591
|
const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || or(this._dependencyManagerService), c = new As(u);
|
|
9579
9592
|
c.unitId = r, c.subUnitId = n, c.rangeList = s, c.getDirtyData = o;
|
|
9580
9593
|
const l = o(this._currentConfigService.getDirtyData(), this._runtimeService.getAllRuntimeData()), f = this._convertDirtyRangesToUnitRange(l.dirtyRanges);
|
|
9581
|
-
return c.featureDirtyRanges = f, c.featureId = a, c.type =
|
|
9594
|
+
return c.featureDirtyRanges = f, c.featureId = a, c.type = Qs.FEATURE_FORMULA, this._dependencyManagerService.addFeatureFormulaDependency(r, n, a, c), this._dependencyManagerService.getFeatureFormulaDependency(t.unitId, t.subUnitId, a) && (c.isCache = !0), c;
|
|
9582
9595
|
}
|
|
9583
9596
|
_registerOtherFormulas(a, e, t) {
|
|
9584
9597
|
for (const r of e) {
|
|
@@ -9602,7 +9615,7 @@ let Ks = class extends Ne {
|
|
|
9602
9615
|
for (let W = L; W <= x; W++) {
|
|
9603
9616
|
const ne = W - R, z = F - b;
|
|
9604
9617
|
if (ne === 0 && z === 0) {
|
|
9605
|
-
M.node = E, M.formula = d, M.unitId = r, M.subUnitId = o, M.formulaId = l, M.type =
|
|
9618
|
+
M.node = E, M.formula = d, M.unitId = r, M.subUnitId = o, M.formulaId = l, M.type = Qs.OTHER_FORMULA, M.isCache = C, t.push(M), this._dependencyManagerService.addOtherFormulaDependency(r, o, l, M), this._dependencyManagerService.addFormulaDependencyByDefinedName(M);
|
|
9606
9619
|
continue;
|
|
9607
9620
|
}
|
|
9608
9621
|
const G = new Mi();
|
|
@@ -9980,23 +9993,23 @@ let Ks = class extends Ne {
|
|
|
9980
9993
|
return t;
|
|
9981
9994
|
}
|
|
9982
9995
|
};
|
|
9983
|
-
|
|
9996
|
+
qs = Lh([
|
|
9984
9997
|
St(0, Ft),
|
|
9985
9998
|
St(1, Ot),
|
|
9986
|
-
St(2,
|
|
9999
|
+
St(2, Oa),
|
|
9987
10000
|
St(3, vr),
|
|
9988
10001
|
St(4, ye(_r)),
|
|
9989
10002
|
St(5, ye(Ur)),
|
|
9990
10003
|
St(6, ye(dr)),
|
|
9991
|
-
St(7,
|
|
9992
|
-
],
|
|
10004
|
+
St(7, Zn)
|
|
10005
|
+
], qs);
|
|
9993
10006
|
var Ph = Object.getOwnPropertyDescriptor, xh = (i, a, e, t) => {
|
|
9994
10007
|
for (var r = t > 1 ? void 0 : t ? Ph(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
9995
10008
|
(s = i[n]) && (r = s(r) || r);
|
|
9996
10009
|
return r;
|
|
9997
10010
|
}, Qt = (i, a) => (e, t) => a(e, t, i);
|
|
9998
|
-
const jh = 500,
|
|
9999
|
-
let
|
|
10011
|
+
const jh = 500, Ks = et("engine-formula.calculate-formula.service");
|
|
10012
|
+
let Xs = class extends Ne {
|
|
10000
10013
|
constructor(a, e, t, r, n, s, o) {
|
|
10001
10014
|
super();
|
|
10002
10015
|
A(this, "_executionInProgressListener$", new ur());
|
|
@@ -10006,7 +10019,7 @@ let Zs = class extends Ne {
|
|
|
10006
10019
|
this._configService = a, this._lexer = e, this._currentConfigService = t, this._runtimeService = r, this._formulaDependencyGenerator = n, this._interpreter = s, this._astTreeBuilder = o;
|
|
10007
10020
|
}
|
|
10008
10021
|
dispose() {
|
|
10009
|
-
super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(),
|
|
10022
|
+
super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(), Rn.clear(), bt.clear(), Us.clear(), Ys.clear();
|
|
10010
10023
|
}
|
|
10011
10024
|
/**
|
|
10012
10025
|
* Stop the execution of the formula.
|
|
@@ -10030,7 +10043,7 @@ let Zs = class extends Ne {
|
|
|
10030
10043
|
async execute(a) {
|
|
10031
10044
|
this._runtimeService.setFormulaExecuteStage(Xe.START), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._currentConfigService.load(a), this._runtimeService.reset();
|
|
10032
10045
|
const e = a.maxIteration || fo;
|
|
10033
|
-
for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._execute(),
|
|
10046
|
+
for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._execute(), Rn.clear(), !!this._runtimeService.isCycleDependency()); t++)
|
|
10034
10047
|
;
|
|
10035
10048
|
this._runtimeService.setFormulaExecuteStage(Xe.CALCULATION_COMPLETED), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._executionCompleteListener$.next(this._runtimeService.getAllRuntimeData()), bt.clear(), this._runtimeService.reset();
|
|
10036
10049
|
}
|
|
@@ -10081,7 +10094,7 @@ let Zs = class extends Ne {
|
|
|
10081
10094
|
const e = (await this._formulaDependencyGenerator.generate()).reverse(), t = this._interpreter;
|
|
10082
10095
|
a ? (this._runtimeService.setFormulaExecuteStage(Xe.START_CALCULATION_ARRAY_FORMULA), this._runtimeService.setTotalArrayFormulasToCalculate(e.length)) : (this._runtimeService.setFormulaExecuteStage(Xe.START_CALCULATION), this._runtimeService.setTotalFormulasToCalculate(e.length)), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState());
|
|
10083
10096
|
let r = [];
|
|
10084
|
-
const n = this._configService.getConfig(
|
|
10097
|
+
const n = this._configService.getConfig(Ca), s = (n == null ? void 0 : n.intervalCount) || jh, o = e.length;
|
|
10085
10098
|
for (let u = 0; u < o; u++) {
|
|
10086
10099
|
const c = e[u], l = c.nodeData, f = c.getDirtyData;
|
|
10087
10100
|
if (u % s === 0 && (await new Promise((d) => {
|
|
@@ -10117,21 +10130,21 @@ let Zs = class extends Ne {
|
|
|
10117
10130
|
r == null || r.serialize();
|
|
10118
10131
|
}
|
|
10119
10132
|
};
|
|
10120
|
-
|
|
10121
|
-
Qt(0,
|
|
10133
|
+
Xs = xh([
|
|
10134
|
+
Qt(0, ia),
|
|
10122
10135
|
Qt(1, ye(dr)),
|
|
10123
10136
|
Qt(2, Ft),
|
|
10124
10137
|
Qt(3, Ot),
|
|
10125
|
-
Qt(4,
|
|
10138
|
+
Qt(4, Ws),
|
|
10126
10139
|
Qt(5, ye(_r)),
|
|
10127
10140
|
Qt(6, ye(Ur))
|
|
10128
|
-
],
|
|
10141
|
+
], Xs);
|
|
10129
10142
|
var Uh = Object.getOwnPropertyDescriptor, vh = (i, a, e, t) => {
|
|
10130
10143
|
for (var r = t > 1 ? void 0 : t ? Uh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
10131
10144
|
(s = i[n]) && (r = s(r) || r);
|
|
10132
10145
|
return r;
|
|
10133
10146
|
}, Es = (i, a) => (e, t) => a(e, t, i);
|
|
10134
|
-
let
|
|
10147
|
+
let Pn = class extends Ne {
|
|
10135
10148
|
constructor(i, a, e) {
|
|
10136
10149
|
super(), this._commandService = i, this._calculateFormulaService = a, this._formulaDataModel = e, this._initialize();
|
|
10137
10150
|
}
|
|
@@ -10189,7 +10202,7 @@ let Ln = class extends Ne {
|
|
|
10189
10202
|
break;
|
|
10190
10203
|
}
|
|
10191
10204
|
this._commandService.executeCommand(
|
|
10192
|
-
|
|
10205
|
+
_n.id,
|
|
10193
10206
|
{
|
|
10194
10207
|
functionsExecutedState: a
|
|
10195
10208
|
},
|
|
@@ -10199,7 +10212,7 @@ let Ln = class extends Ne {
|
|
|
10199
10212
|
);
|
|
10200
10213
|
}), this._calculateFormulaService.executionInProgressListener$.subscribe((i) => {
|
|
10201
10214
|
this._commandService.executeCommand(
|
|
10202
|
-
|
|
10215
|
+
_n.id,
|
|
10203
10216
|
{
|
|
10204
10217
|
stageInfo: i
|
|
10205
10218
|
},
|
|
@@ -10236,11 +10249,11 @@ let Ln = class extends Ne {
|
|
|
10236
10249
|
);
|
|
10237
10250
|
}
|
|
10238
10251
|
};
|
|
10239
|
-
|
|
10252
|
+
Pn = vh([
|
|
10240
10253
|
Es(0, sr),
|
|
10241
|
-
Es(1,
|
|
10254
|
+
Es(1, Ks),
|
|
10242
10255
|
Es(2, ye(gr))
|
|
10243
|
-
],
|
|
10256
|
+
], Pn);
|
|
10244
10257
|
const wi = /[\[\]]/g;
|
|
10245
10258
|
function Si(i, a) {
|
|
10246
10259
|
if (wi.test(i)) {
|
|
@@ -10259,7 +10272,7 @@ function bs(i, a = 0, e = 0) {
|
|
|
10259
10272
|
};
|
|
10260
10273
|
}
|
|
10261
10274
|
function Th(i, a = 0, e = 0) {
|
|
10262
|
-
const { refBody: t, sheetName: r, unitId: n } =
|
|
10275
|
+
const { refBody: t, sheetName: r, unitId: n } = ua(i), s = t.indexOf(":");
|
|
10263
10276
|
if (s === -1) {
|
|
10264
10277
|
const C = bs(t, a, e), E = C.row, b = C.column, R = C.absoluteRefType;
|
|
10265
10278
|
return {
|
|
@@ -10667,7 +10680,7 @@ class V {
|
|
|
10667
10680
|
range: e
|
|
10668
10681
|
});
|
|
10669
10682
|
let u;
|
|
10670
|
-
return Br(o) ? u = new
|
|
10683
|
+
return Br(o) ? u = new ba(o) : Ji(o) ? u = new Ra(o) : eo(o) ? u = new ya(o) : u = new pn(e, r, t), this._setReferenceDefault(a, u);
|
|
10671
10684
|
}
|
|
10672
10685
|
_setReferenceDefault(a, e) {
|
|
10673
10686
|
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);
|
|
@@ -10727,10 +10740,10 @@ class Fh extends V {
|
|
|
10727
10740
|
});
|
|
10728
10741
|
}
|
|
10729
10742
|
}
|
|
10730
|
-
var
|
|
10743
|
+
var Zs = /* @__PURE__ */ ((i) => (i.ARRAY_CONSTRAIN = "ARRAY_CONSTRAIN", i.FLATTEN = "FLATTEN", i))(Zs || {});
|
|
10731
10744
|
const kh = [
|
|
10732
|
-
[Ih,
|
|
10733
|
-
[Fh,
|
|
10745
|
+
[Ih, Zs.ARRAY_CONSTRAIN],
|
|
10746
|
+
[Fh, Zs.FLATTEN]
|
|
10734
10747
|
];
|
|
10735
10748
|
var Ar;
|
|
10736
10749
|
((i) => {
|
|
@@ -10872,13 +10885,13 @@ var Ar;
|
|
|
10872
10885
|
return r(o, l, 2, 1);
|
|
10873
10886
|
})();
|
|
10874
10887
|
})(Ar || (Ar = {}));
|
|
10875
|
-
function
|
|
10888
|
+
function Ma(i) {
|
|
10876
10889
|
return /^[01]{1,10}$/.test(i);
|
|
10877
10890
|
}
|
|
10878
|
-
function
|
|
10891
|
+
function wa(i) {
|
|
10879
10892
|
return /^[0-7]{1,10}$/.test(i);
|
|
10880
10893
|
}
|
|
10881
|
-
function
|
|
10894
|
+
function Sa(i) {
|
|
10882
10895
|
return /^[0-9A-Fa-f]{1,10}$/.test(i);
|
|
10883
10896
|
}
|
|
10884
10897
|
function Zt(i) {
|
|
@@ -10924,7 +10937,7 @@ function Zt(i) {
|
|
|
10924
10937
|
const c = r * Math.exp(-e * e + 0.5 * (a[0] + n * s) - o);
|
|
10925
10938
|
return t ? c - 1 : 1 - c;
|
|
10926
10939
|
}
|
|
10927
|
-
function
|
|
10940
|
+
function Da(i) {
|
|
10928
10941
|
return 1 - Zt(i);
|
|
10929
10942
|
}
|
|
10930
10943
|
function $h(i) {
|
|
@@ -10935,7 +10948,7 @@ function $h(i) {
|
|
|
10935
10948
|
const a = i < 1 ? i : 2 - i, e = Math.sqrt(-2 * Math.log(a / 2));
|
|
10936
10949
|
let t = -0.70711 * ((2.30753 + e * 0.27061) / (1 + e * (0.99229 + e * 0.04481)) - e);
|
|
10937
10950
|
for (let r = 0; r < 2; r++) {
|
|
10938
|
-
const n =
|
|
10951
|
+
const n = Da(t) - a;
|
|
10939
10952
|
t += n / (1.1283791670955126 * Math.exp(-t * t) - t * n);
|
|
10940
10953
|
}
|
|
10941
10954
|
return i < 1 ? t : -t;
|
|
@@ -10956,7 +10969,7 @@ function zt(i, a) {
|
|
|
10956
10969
|
t *= i - r + 1, t /= r;
|
|
10957
10970
|
return t;
|
|
10958
10971
|
}
|
|
10959
|
-
function
|
|
10972
|
+
function zs(i, a) {
|
|
10960
10973
|
let e = Math.floor(i), t = Math.floor(a);
|
|
10961
10974
|
for (; t !== 0; ) {
|
|
10962
10975
|
const r = t;
|
|
@@ -10965,33 +10978,36 @@ function Js(i, a) {
|
|
|
10965
10978
|
return e;
|
|
10966
10979
|
}
|
|
10967
10980
|
function Di(i, a) {
|
|
10968
|
-
const e =
|
|
10981
|
+
const e = zs(i, a);
|
|
10969
10982
|
return e === 0 ? 0 : Math.abs(i * a) / e;
|
|
10970
10983
|
}
|
|
10971
|
-
function
|
|
10984
|
+
function La(i) {
|
|
10972
10985
|
const a = i.length;
|
|
10973
10986
|
if (a === 1)
|
|
10974
10987
|
return i[0][0];
|
|
10975
10988
|
if (a === 2)
|
|
10976
10989
|
return i[0][0] * i[1][1] - i[0][1] * i[1][0];
|
|
10977
|
-
|
|
10978
|
-
|
|
10979
|
-
|
|
10980
|
-
|
|
10990
|
+
const { rowSwap: e, smallPivotDetected: t, luMatrix: r, permutation: n } = vo(i);
|
|
10991
|
+
if (t)
|
|
10992
|
+
return 0;
|
|
10993
|
+
let s = e ? 1 : -1;
|
|
10994
|
+
for (let o = 0; o < n.length; o++)
|
|
10995
|
+
s *= r[o][o];
|
|
10996
|
+
return s === 0 ? 0 : s;
|
|
10981
10997
|
}
|
|
10982
10998
|
function Yh(i) {
|
|
10983
|
-
const a =
|
|
10984
|
-
return a === 0 ? null : i.length === 1 ? [[1 / a]] :
|
|
10999
|
+
const a = La(i);
|
|
11000
|
+
return a === 0 ? null : i.length === 1 ? [[1 / a]] : Gh(i).map((r) => r.map((n) => n / a));
|
|
10985
11001
|
}
|
|
10986
|
-
function
|
|
11002
|
+
function Hh(i, a, e) {
|
|
10987
11003
|
return i.filter((t, r) => r !== a).map((t) => t.filter((r, n) => n !== e));
|
|
10988
11004
|
}
|
|
10989
|
-
function
|
|
11005
|
+
function Gh(i) {
|
|
10990
11006
|
const a = i.length, e = Array.from({ length: a }, () => new Array(a).fill(0));
|
|
10991
11007
|
for (let t = 0; t < a; t++)
|
|
10992
11008
|
for (let r = 0; r < a; r++) {
|
|
10993
|
-
const
|
|
10994
|
-
e[r][t] =
|
|
11009
|
+
const s = ((t + r) % 2 === 0 ? 1 : -1) * La(Hh(i, t, r));
|
|
11010
|
+
e[r][t] = s === 0 ? 0 : s;
|
|
10995
11011
|
}
|
|
10996
11012
|
return e;
|
|
10997
11013
|
}
|
|
@@ -11000,17 +11016,17 @@ function lr(i, a) {
|
|
|
11000
11016
|
(t, r) => e.reduce((n, s, o) => n + s * a[o][r], 0)
|
|
11001
11017
|
));
|
|
11002
11018
|
}
|
|
11003
|
-
function
|
|
11019
|
+
function ht(i) {
|
|
11004
11020
|
return i[0].map((a, e) => i.map((t) => t[e]));
|
|
11005
11021
|
}
|
|
11006
|
-
function
|
|
11007
|
-
const { smallPivotDetected: a, luMatrix: e, permutation: t } =
|
|
11022
|
+
function Qh(i) {
|
|
11023
|
+
const { smallPivotDetected: a, luMatrix: e, permutation: t } = vo(i);
|
|
11008
11024
|
return a ? null : Wh(e, t);
|
|
11009
11025
|
}
|
|
11010
|
-
function
|
|
11011
|
-
const a =
|
|
11026
|
+
function vo(i) {
|
|
11027
|
+
const a = ht(i), e = a.length, t = a[0].length;
|
|
11012
11028
|
let r = !0, n = !1;
|
|
11013
|
-
const s =
|
|
11029
|
+
const s = Js(e, t, 0), o = new Array(t).fill(0).map((u, c) => c);
|
|
11014
11030
|
for (let u = 0; u < t; u++) {
|
|
11015
11031
|
for (let h = 0; h < u; h++) {
|
|
11016
11032
|
let d = a[h][u];
|
|
@@ -11044,10 +11060,10 @@ function Qh(i) {
|
|
|
11044
11060
|
};
|
|
11045
11061
|
}
|
|
11046
11062
|
function Wh(i, a) {
|
|
11047
|
-
const e = a.length, t =
|
|
11063
|
+
const e = a.length, t = Js(e, e, 0);
|
|
11048
11064
|
for (let n = 0; n < e; n++)
|
|
11049
11065
|
t[n][n] = 1;
|
|
11050
|
-
const r =
|
|
11066
|
+
const r = Js(e, e, 0);
|
|
11051
11067
|
for (let n = 0; n < e; n++) {
|
|
11052
11068
|
const s = a[n];
|
|
11053
11069
|
for (let o = 0; o < e; o++)
|
|
@@ -11073,7 +11089,7 @@ function Wh(i, a) {
|
|
|
11073
11089
|
}
|
|
11074
11090
|
return r;
|
|
11075
11091
|
}
|
|
11076
|
-
function
|
|
11092
|
+
function Js(i, a, e) {
|
|
11077
11093
|
const t = [];
|
|
11078
11094
|
for (let r = 0; r < i; r++) {
|
|
11079
11095
|
t[r] = [];
|
|
@@ -11086,13 +11102,13 @@ function qh(i) {
|
|
|
11086
11102
|
const a = Kh(i);
|
|
11087
11103
|
if (!a)
|
|
11088
11104
|
return null;
|
|
11089
|
-
const { matrixU: e, matrixS: t, matrixV: r } = a, n =
|
|
11105
|
+
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];
|
|
11090
11106
|
for (let u = 0; u < t.length; u++)
|
|
11091
11107
|
Math.abs(t[u]) > o && (s[u][u] = 1 / t[u]);
|
|
11092
11108
|
return lr(r, lr(s, n));
|
|
11093
11109
|
}
|
|
11094
11110
|
function Kh(i) {
|
|
11095
|
-
const a =
|
|
11111
|
+
const a = ht(i), e = a.length, t = a[0].length;
|
|
11096
11112
|
if (e < t)
|
|
11097
11113
|
return null;
|
|
11098
11114
|
const r = new Array(t).fill(0), n = new Array(t).fill(0), s = Array.from({ length: t }, () => new Array(t).fill(0));
|
|
@@ -11325,7 +11341,7 @@ function Pa(i, a, e) {
|
|
|
11325
11341
|
return r;
|
|
11326
11342
|
}
|
|
11327
11343
|
function zn(i, a, e) {
|
|
11328
|
-
const t = i === 0 || i === 1 ? 0 : Math.exp(
|
|
11344
|
+
const t = i === 0 || i === 1 ? 0 : Math.exp(lt(a + e) - lt(a) - lt(e) + a * Math.log(i) + e * Math.log(1 - i));
|
|
11329
11345
|
return i < (a + 1) / (a + e + 2) ? t * Pi(i, a, e) / a : 1 - t * Pi(1 - i, e, a) / e;
|
|
11330
11346
|
}
|
|
11331
11347
|
function Pi(i, a, e) {
|
|
@@ -11340,10 +11356,10 @@ function Pi(i, a, e) {
|
|
|
11340
11356
|
return o;
|
|
11341
11357
|
}
|
|
11342
11358
|
function xa(i, a) {
|
|
11343
|
-
return i + a > 170 ? Math.exp(ja(i, a)) :
|
|
11359
|
+
return i + a > 170 ? Math.exp(ja(i, a)) : hn(i) * hn(a) / hn(i + a);
|
|
11344
11360
|
}
|
|
11345
11361
|
function ja(i, a) {
|
|
11346
|
-
return
|
|
11362
|
+
return lt(i) + lt(a) - lt(i + a);
|
|
11347
11363
|
}
|
|
11348
11364
|
function Bo(i, a, e) {
|
|
11349
11365
|
if (i < 0)
|
|
@@ -11364,7 +11380,7 @@ function va(i, a) {
|
|
|
11364
11380
|
return i <= 0 ? 0 : Ba(a / 2, i / 2);
|
|
11365
11381
|
}
|
|
11366
11382
|
function Jh(i, a) {
|
|
11367
|
-
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) -
|
|
11383
|
+
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) - lt(a / 2));
|
|
11368
11384
|
}
|
|
11369
11385
|
function Io(i, a) {
|
|
11370
11386
|
return i <= 0 ? 0 : i >= 1 ? 1 / 0 : 2 * $o(i, a / 2);
|
|
@@ -11405,7 +11421,7 @@ function ko(i, a, e) {
|
|
|
11405
11421
|
const l = u / c;
|
|
11406
11422
|
return s - l * o + l * i;
|
|
11407
11423
|
}
|
|
11408
|
-
function
|
|
11424
|
+
function hn(i) {
|
|
11409
11425
|
const a = [
|
|
11410
11426
|
-1.716185138865495,
|
|
11411
11427
|
24.76565080557592,
|
|
@@ -11455,12 +11471,12 @@ function nm(i, a, e) {
|
|
|
11455
11471
|
return i <= 0 ? 0 : Ba(a, i / e);
|
|
11456
11472
|
}
|
|
11457
11473
|
function sm(i, a, e) {
|
|
11458
|
-
return i < 0 ? 0 : i === 0 && a === 1 ? 1 / e : Math.exp((a - 1) * Math.log(i) - i / e -
|
|
11474
|
+
return i < 0 ? 0 : i === 0 && a === 1 ? 1 / e : Math.exp((a - 1) * Math.log(i) - i / e - lt(a) - a * Math.log(e));
|
|
11459
11475
|
}
|
|
11460
11476
|
function am(i, a, e) {
|
|
11461
11477
|
return i <= 0 ? 0 : i >= 1 ? 1 / 0 : e * $o(i, a);
|
|
11462
11478
|
}
|
|
11463
|
-
function
|
|
11479
|
+
function lt(i) {
|
|
11464
11480
|
const a = [
|
|
11465
11481
|
76.18009172947146,
|
|
11466
11482
|
-86.50532032941678,
|
|
@@ -11480,7 +11496,7 @@ function ft(i) {
|
|
|
11480
11496
|
function Ba(i, a) {
|
|
11481
11497
|
if (a < 0 || i <= 0)
|
|
11482
11498
|
return Number.NaN;
|
|
11483
|
-
const e = 1e-30, t = -~(Math.log(i >= 1 ? i : 1 / i) * 8.5 + i * 0.4 + 17), r =
|
|
11499
|
+
const e = 1e-30, t = -~(Math.log(i >= 1 ? i : 1 / i) * 8.5 + i * 0.4 + 17), r = lt(i), n = Math.exp(-a + i * Math.log(a) - r);
|
|
11484
11500
|
let s = i, o = 1 / i, u = o;
|
|
11485
11501
|
if (a < i + 1) {
|
|
11486
11502
|
if (n === 0)
|
|
@@ -11512,7 +11528,7 @@ function $o(i, a) {
|
|
|
11512
11528
|
const o = 1 - a * (0.253 + a * 0.12);
|
|
11513
11529
|
i < o ? e = (i / o) ** (1 / a) : e = 1 - Math.log(1 - (i - o) / (1 - o));
|
|
11514
11530
|
}
|
|
11515
|
-
const t = 1e-8, r =
|
|
11531
|
+
const t = 1e-8, r = lt(a);
|
|
11516
11532
|
let n, s;
|
|
11517
11533
|
for (let o = 0; o < 12; o++) {
|
|
11518
11534
|
if (e <= 0)
|
|
@@ -11726,13 +11742,13 @@ function ss(i, a, e, t, r) {
|
|
|
11726
11742
|
let s = i;
|
|
11727
11743
|
r && (s = i.map((C) => C.map((E) => Math.log(E))));
|
|
11728
11744
|
let o = a, u = e;
|
|
11729
|
-
n && (s =
|
|
11730
|
-
const c =
|
|
11731
|
-
let h =
|
|
11745
|
+
n && (s = ht(s), o = ht(o), u = ht(u)), t && (o = o.map((C) => [...C, 1]));
|
|
11746
|
+
const c = ht(o), l = lr(c, o), f = lr(c, s);
|
|
11747
|
+
let h = Qh(l);
|
|
11732
11748
|
if (!h && (h = qh(l), !h))
|
|
11733
11749
|
return g.create(m.NA);
|
|
11734
11750
|
let d = lr(h, f);
|
|
11735
|
-
t || d.push([0]), d =
|
|
11751
|
+
t || d.push([0]), d = ht(d);
|
|
11736
11752
|
const _ = d[0].pop();
|
|
11737
11753
|
if (d[0].reverse(), d[0].push(_), r)
|
|
11738
11754
|
for (let C = 0; C < d[0].length; C++)
|
|
@@ -13451,7 +13467,7 @@ function at(i, a, e) {
|
|
|
13451
13467
|
u = !1;
|
|
13452
13468
|
break;
|
|
13453
13469
|
}
|
|
13454
|
-
const [d, _] =
|
|
13470
|
+
const [d, _] = pa(`${l}`);
|
|
13455
13471
|
if (!Vt.create(`${h}`).compare(_, d).getValue()) {
|
|
13456
13472
|
u = !1;
|
|
13457
13473
|
break;
|
|
@@ -13827,13 +13843,13 @@ function Ya(i) {
|
|
|
13827
13843
|
const r = t.getFullYear(), n = (t.getMonth() + 1).toString().padStart(2, "0"), s = t.getDate().toString().padStart(2, "0"), o = `${r}-${n}-${s}`;
|
|
13828
13844
|
return i.replace(/\//g, "-").split("-").map((c) => c.padStart(2, "0")).join("-") === o;
|
|
13829
13845
|
}
|
|
13830
|
-
function
|
|
13846
|
+
function ea(i) {
|
|
13831
13847
|
return gt.parseDate(i);
|
|
13832
13848
|
}
|
|
13833
13849
|
function pu(i) {
|
|
13834
13850
|
return gt.parseValue(i);
|
|
13835
13851
|
}
|
|
13836
|
-
function
|
|
13852
|
+
function ta(i) {
|
|
13837
13853
|
return gt.parseTime(i);
|
|
13838
13854
|
}
|
|
13839
13855
|
function Ha(i) {
|
|
@@ -13883,7 +13899,7 @@ function Nu(i) {
|
|
|
13883
13899
|
}
|
|
13884
13900
|
return Vu[Number(i)] || [];
|
|
13885
13901
|
}
|
|
13886
|
-
function
|
|
13902
|
+
function xn(i, a, e = 1, t) {
|
|
13887
13903
|
const r = Nu(e), n = Math.floor(i), s = Math.floor(a), o = s > n ? n : s;
|
|
13888
13904
|
let u = 0;
|
|
13889
13905
|
const c = Math.abs(Math.floor(a) - Math.floor(i)) + 1;
|
|
@@ -13896,7 +13912,7 @@ function Pn(i, a, e = 1, t) {
|
|
|
13896
13912
|
}
|
|
13897
13913
|
return s >= n ? u : -u;
|
|
13898
13914
|
}
|
|
13899
|
-
function
|
|
13915
|
+
function jn(i, a, e = 1, t) {
|
|
13900
13916
|
const r = Nu(e), n = Math.floor(i);
|
|
13901
13917
|
let s = n, o = Math.abs(a);
|
|
13902
13918
|
for (let u = 1; u <= o; u++) {
|
|
@@ -13922,10 +13938,10 @@ function k(i) {
|
|
|
13922
13938
|
const a = i.getValue();
|
|
13923
13939
|
if (i.isString()) {
|
|
13924
13940
|
let e;
|
|
13925
|
-
if (
|
|
13941
|
+
if (ea(`${a}`))
|
|
13942
|
+
e = ea(`${a}`).v;
|
|
13943
|
+
else if (ta(`${a}`))
|
|
13926
13944
|
e = ta(`${a}`).v;
|
|
13927
|
-
else if (ra(`${a}`))
|
|
13928
|
-
e = ra(`${a}`).v;
|
|
13929
13945
|
else if (Q(a))
|
|
13930
13946
|
e = +a;
|
|
13931
13947
|
else
|
|
@@ -14521,7 +14537,7 @@ class ig extends V {
|
|
|
14521
14537
|
return u;
|
|
14522
14538
|
if (r)
|
|
14523
14539
|
return this._getResultByHolidays(o, u, r);
|
|
14524
|
-
const c =
|
|
14540
|
+
const c = xn(o, u);
|
|
14525
14541
|
return y.create(c);
|
|
14526
14542
|
}
|
|
14527
14543
|
_getResultByHolidays(e, t, r) {
|
|
@@ -14546,7 +14562,7 @@ class ig extends V {
|
|
|
14546
14562
|
return o;
|
|
14547
14563
|
n.push(o);
|
|
14548
14564
|
}
|
|
14549
|
-
const s =
|
|
14565
|
+
const s = xn(e, t, 1, n);
|
|
14550
14566
|
return y.create(s);
|
|
14551
14567
|
}
|
|
14552
14568
|
}
|
|
@@ -14594,7 +14610,7 @@ class og extends V {
|
|
|
14594
14610
|
return l;
|
|
14595
14611
|
if (n)
|
|
14596
14612
|
return this._getResultByHolidays(c, l, u, n);
|
|
14597
|
-
const f =
|
|
14613
|
+
const f = xn(c, l, u);
|
|
14598
14614
|
return y.create(f);
|
|
14599
14615
|
}
|
|
14600
14616
|
_getResultByHolidays(e, t, r, n) {
|
|
@@ -14619,7 +14635,7 @@ class og extends V {
|
|
|
14619
14635
|
return u;
|
|
14620
14636
|
s.push(u);
|
|
14621
14637
|
}
|
|
14622
|
-
const o =
|
|
14638
|
+
const o = xn(e, t, r, s);
|
|
14623
14639
|
return y.create(o);
|
|
14624
14640
|
}
|
|
14625
14641
|
}
|
|
@@ -14906,7 +14922,7 @@ class Cg extends V {
|
|
|
14906
14922
|
return g.create(m.VALUE);
|
|
14907
14923
|
if (r)
|
|
14908
14924
|
return this._getResultByHolidays(o, u, r);
|
|
14909
|
-
const c =
|
|
14925
|
+
const c = jn(o, u);
|
|
14910
14926
|
return typeof c != "number" ? c : y.create(c);
|
|
14911
14927
|
}
|
|
14912
14928
|
_getResultByHolidays(e, t, r) {
|
|
@@ -14931,7 +14947,7 @@ class Cg extends V {
|
|
|
14931
14947
|
return o;
|
|
14932
14948
|
n.push(o);
|
|
14933
14949
|
}
|
|
14934
|
-
const s =
|
|
14950
|
+
const s = jn(e, t, 1, n);
|
|
14935
14951
|
return typeof s != "number" ? s : y.create(s);
|
|
14936
14952
|
}
|
|
14937
14953
|
}
|
|
@@ -14966,7 +14982,7 @@ class _g extends V {
|
|
|
14966
14982
|
return g.create(m.NUM);
|
|
14967
14983
|
if (n)
|
|
14968
14984
|
return this._getResultByHolidays(c, l, f, n);
|
|
14969
|
-
const h =
|
|
14985
|
+
const h = jn(c, l, f);
|
|
14970
14986
|
return typeof h != "number" ? h : y.create(h);
|
|
14971
14987
|
}
|
|
14972
14988
|
_checkArrayError(e) {
|
|
@@ -15001,7 +15017,7 @@ class _g extends V {
|
|
|
15001
15017
|
return u;
|
|
15002
15018
|
s.push(u);
|
|
15003
15019
|
}
|
|
15004
|
-
const o =
|
|
15020
|
+
const o = jn(e, t, r, s);
|
|
15005
15021
|
return typeof o != "number" ? o : y.create(o);
|
|
15006
15022
|
}
|
|
15007
15023
|
}
|
|
@@ -15192,7 +15208,7 @@ class Ng extends V {
|
|
|
15192
15208
|
if (t)
|
|
15193
15209
|
return r;
|
|
15194
15210
|
const [s] = n, o = `${s.getValue()}`;
|
|
15195
|
-
if (!
|
|
15211
|
+
if (!Ma(o))
|
|
15196
15212
|
return g.create(m.NUM);
|
|
15197
15213
|
let u;
|
|
15198
15214
|
return o.length === 10 && o.substring(0, 1) === "1" ? u = Number.parseInt(o.substring(1), 2) - 512 : u = Number.parseInt(o, 2), y.create(u);
|
|
@@ -15222,7 +15238,7 @@ class Og extends V {
|
|
|
15222
15238
|
if (n)
|
|
15223
15239
|
return s;
|
|
15224
15240
|
const [u] = o, c = `${u.getValue()}`;
|
|
15225
|
-
if (!
|
|
15241
|
+
if (!Ma(c))
|
|
15226
15242
|
return g.create(m.NUM);
|
|
15227
15243
|
let l;
|
|
15228
15244
|
if (c.length === 10 && c.substring(0, 1) === "1")
|
|
@@ -15259,7 +15275,7 @@ class Mg extends V {
|
|
|
15259
15275
|
if (n)
|
|
15260
15276
|
return s;
|
|
15261
15277
|
const [u] = o, c = `${u.getValue()}`;
|
|
15262
|
-
if (!
|
|
15278
|
+
if (!Ma(c))
|
|
15263
15279
|
return g.create(m.NUM);
|
|
15264
15280
|
let l;
|
|
15265
15281
|
if (c.length === 10 && c.substring(0, 1) === "1")
|
|
@@ -16275,7 +16291,7 @@ class kg extends V {
|
|
|
16275
16291
|
const [s] = n, o = +s.getValue();
|
|
16276
16292
|
if (Number.isNaN(o))
|
|
16277
16293
|
return g.create(m.VALUE);
|
|
16278
|
-
const u =
|
|
16294
|
+
const u = Da(o);
|
|
16279
16295
|
return y.create(u);
|
|
16280
16296
|
}
|
|
16281
16297
|
}
|
|
@@ -16292,7 +16308,7 @@ class $g extends V {
|
|
|
16292
16308
|
const [s] = n, o = +s.getValue();
|
|
16293
16309
|
if (Number.isNaN(o))
|
|
16294
16310
|
return g.create(m.VALUE);
|
|
16295
|
-
const u =
|
|
16311
|
+
const u = Da(o);
|
|
16296
16312
|
return y.create(u);
|
|
16297
16313
|
}
|
|
16298
16314
|
}
|
|
@@ -16340,7 +16356,7 @@ class Hg extends V {
|
|
|
16340
16356
|
if (n)
|
|
16341
16357
|
return s;
|
|
16342
16358
|
const [u] = o, c = `${u.getValue()}`;
|
|
16343
|
-
if (!
|
|
16359
|
+
if (!Sa(c))
|
|
16344
16360
|
return g.create(m.NUM);
|
|
16345
16361
|
const l = c.length === 10 && c.substring(0, 1).toLocaleUpperCase() === "F", f = l ? Number.parseInt(c, 16) - 1099511627776 : Number.parseInt(c, 16);
|
|
16346
16362
|
if (f < -512 || f > 511)
|
|
@@ -16368,7 +16384,7 @@ class Gg extends V {
|
|
|
16368
16384
|
if (t)
|
|
16369
16385
|
return r;
|
|
16370
16386
|
const [s] = n, o = `${s.getValue()}`;
|
|
16371
|
-
if (!
|
|
16387
|
+
if (!Sa(o))
|
|
16372
16388
|
return g.create(m.NUM);
|
|
16373
16389
|
let u = Number.parseInt(o, 16);
|
|
16374
16390
|
return u >= 549755813888 && (u -= 1099511627776), y.create(u);
|
|
@@ -16398,7 +16414,7 @@ class Qg extends V {
|
|
|
16398
16414
|
if (n)
|
|
16399
16415
|
return s;
|
|
16400
16416
|
const [u] = o, c = `${u.getValue()}`;
|
|
16401
|
-
if (!
|
|
16417
|
+
if (!Sa(c))
|
|
16402
16418
|
return g.create(m.NUM);
|
|
16403
16419
|
const l = Number.parseInt(c, 16);
|
|
16404
16420
|
if (l > 536870911 && l < 1098974756864)
|
|
@@ -16998,7 +17014,7 @@ class y1 extends V {
|
|
|
16998
17014
|
if (n)
|
|
16999
17015
|
return s;
|
|
17000
17016
|
const [u] = o, c = `${u.getValue()}`;
|
|
17001
|
-
if (!
|
|
17017
|
+
if (!wa(c))
|
|
17002
17018
|
return g.create(m.NUM);
|
|
17003
17019
|
const l = c.length === 10 && c.substring(0, 1) === "7", f = l ? Number.parseInt(c, 8) - 1073741824 : Number.parseInt(c, 8);
|
|
17004
17020
|
if (f < -512 || f > 511)
|
|
@@ -17026,7 +17042,7 @@ class R1 extends V {
|
|
|
17026
17042
|
if (t)
|
|
17027
17043
|
return r;
|
|
17028
17044
|
const [s] = n, o = `${s.getValue()}`;
|
|
17029
|
-
if (!
|
|
17045
|
+
if (!wa(o))
|
|
17030
17046
|
return g.create(m.NUM);
|
|
17031
17047
|
let u = Number.parseInt(o, 8);
|
|
17032
17048
|
return u >= 536870912 && (u -= 1073741824), y.create(u);
|
|
@@ -17056,7 +17072,7 @@ class p1 extends V {
|
|
|
17056
17072
|
if (n)
|
|
17057
17073
|
return s;
|
|
17058
17074
|
const [u] = o, c = `${u.getValue()}`;
|
|
17059
|
-
if (!
|
|
17075
|
+
if (!wa(c))
|
|
17060
17076
|
return g.create(m.NUM);
|
|
17061
17077
|
const l = Number.parseInt(c, 8);
|
|
17062
17078
|
let f;
|
|
@@ -17332,7 +17348,7 @@ function w1(i, a) {
|
|
|
17332
17348
|
while (Math.abs(_) > 1e-7 && f < 60);
|
|
17333
17349
|
return C;
|
|
17334
17350
|
}
|
|
17335
|
-
function
|
|
17351
|
+
function mn(i, a, e, t, r, n, s) {
|
|
17336
17352
|
const o = rr(i, a, n), u = qe(i, a, n, s), c = is(i, a, n, s);
|
|
17337
17353
|
if (o === 1) {
|
|
17338
17354
|
const h = u - c, d = 100 * e / n + r, _ = t / n * h / u + 1, C = 100 * e / n * c / u;
|
|
@@ -17344,7 +17360,7 @@ function hn(i, a, e, t, r, n, s) {
|
|
|
17344
17360
|
f += 100 * e / n / (1 + t / n) ** (h - 1 + l / u);
|
|
17345
17361
|
return f -= 100 * e / n * c / u, f;
|
|
17346
17362
|
}
|
|
17347
|
-
function
|
|
17363
|
+
function ra(i, a, e, t, r) {
|
|
17348
17364
|
let n = 0, s = r / e;
|
|
17349
17365
|
s >= 1 ? (s = 1, n = t === 1 ? i : 0) : n = i * (1 - s) ** (t - 1);
|
|
17350
17366
|
const o = i * (1 - s) ** t;
|
|
@@ -17740,7 +17756,7 @@ class k1 extends V {
|
|
|
17740
17756
|
const [U, x, F, W, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +F.getValue(), de = +W.getValue(), Ee = +ne.getValue();
|
|
17741
17757
|
if (z < 0 || G < 0 || ge <= 0 || de <= 0 || de > ge || Ee <= 0)
|
|
17742
17758
|
return g.create(m.NUM);
|
|
17743
|
-
const pe =
|
|
17759
|
+
const pe = ra(z, G, ge, de, Ee);
|
|
17744
17760
|
return Number.isNaN(pe) || !Number.isFinite(pe) ? g.create(m.NUM) : b === 0 && R === 0 ? y.create(pe, Ke(this.getLocale())) : y.create(pe);
|
|
17745
17761
|
});
|
|
17746
17762
|
return u === 1 && c === 1 ? C.get(0, 0) : C;
|
|
@@ -18647,7 +18663,7 @@ class f0 extends V {
|
|
|
18647
18663
|
return g.create(m.VALUE);
|
|
18648
18664
|
if (w < 0 || S < 0 || D <= 0 || ![1, 2, 4].includes(L) || U < 0 || U > 4 || N >= M || !Mr(N, M, L))
|
|
18649
18665
|
return g.create(m.NUM);
|
|
18650
|
-
const x =
|
|
18666
|
+
const x = mn(N, M, w, S, D, L, U);
|
|
18651
18667
|
return y.create(x);
|
|
18652
18668
|
}
|
|
18653
18669
|
}
|
|
@@ -19082,7 +19098,7 @@ class p0 extends V {
|
|
|
19082
19098
|
}
|
|
19083
19099
|
if (u)
|
|
19084
19100
|
for (let h = c + 1; h <= l; h++) {
|
|
19085
|
-
let d =
|
|
19101
|
+
let d = ra(e, t, r, h, o);
|
|
19086
19102
|
h === c + 1 ? d *= Math.min(s, c + 1) - n : h === l && (d *= s + 1 - l), f += d;
|
|
19087
19103
|
}
|
|
19088
19104
|
else {
|
|
@@ -19098,7 +19114,7 @@ class p0 extends V {
|
|
|
19098
19114
|
if (d)
|
|
19099
19115
|
h = f;
|
|
19100
19116
|
else {
|
|
19101
|
-
const C =
|
|
19117
|
+
const C = ra(e, t, r, _, o);
|
|
19102
19118
|
f = l / (n - (_ - 1)), f > C ? (h = f, d = !0) : (h = C, l -= C);
|
|
19103
19119
|
}
|
|
19104
19120
|
_ === u && (h *= s + 1 - u), c += h;
|
|
@@ -19405,9 +19421,9 @@ class O0 extends V {
|
|
|
19405
19421
|
}
|
|
19406
19422
|
_getResult(e, t, r, n, s, o, u) {
|
|
19407
19423
|
if (rr(e, t, o) > 1) {
|
|
19408
|
-
let E = r || 0.01, b =
|
|
19424
|
+
let E = r || 0.01, b = mn(e, t, r, E, s, o, u), R = b - n;
|
|
19409
19425
|
for (let p = 0; p < 100 && Math.abs(R) > 1e-7; p++)
|
|
19410
|
-
b =
|
|
19426
|
+
b = mn(e, t, r, 1.01 * E, s, o, u), E += -R / (b - n - R) * E * 0.01, R = mn(e, t, r, E, s, o, u) - n;
|
|
19411
19427
|
return E;
|
|
19412
19428
|
}
|
|
19413
19429
|
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;
|
|
@@ -19671,7 +19687,7 @@ class j0 extends V {
|
|
|
19671
19687
|
return g.create(m.VALUE);
|
|
19672
19688
|
t = t.get(0, 0);
|
|
19673
19689
|
}
|
|
19674
|
-
return t.isError() ? t : t.isNumber() && t.getPattern() !== "" ? T.create(Ha(t.getPattern())) : t.isString() && (
|
|
19690
|
+
return t.isError() ? t : t.isNumber() && t.getPattern() !== "" ? T.create(Ha(t.getPattern())) : t.isString() && (ea(`${t.getValue()}`) || ta(`${t.getValue()}`)) ? T.create(!0) : T.create(!1);
|
|
19675
19691
|
}
|
|
19676
19692
|
}
|
|
19677
19693
|
class U0 extends V {
|
|
@@ -21372,19 +21388,19 @@ class Ud extends V {
|
|
|
21372
21388
|
return g.create(m.REF);
|
|
21373
21389
|
const n = this._convertToDefinedName(r);
|
|
21374
21390
|
if (t === 0) {
|
|
21375
|
-
const f = Th(n), { range: h, sheetName: d, unitId: _ } = f, C = new
|
|
21391
|
+
const f = Th(n), { range: h, sheetName: d, unitId: _ } = f, C = new pn(h);
|
|
21376
21392
|
return C.setForcedUnitIdDirect(_), C.setForcedSheetName(d), this._setDefault(C);
|
|
21377
21393
|
}
|
|
21378
21394
|
if (Br(n))
|
|
21379
|
-
return this._setDefault(new
|
|
21395
|
+
return this._setDefault(new ba(n));
|
|
21380
21396
|
if (Zi(n))
|
|
21381
|
-
return this._setDefault(new pa(n));
|
|
21382
|
-
if (zi(n))
|
|
21383
21397
|
return this._setDefault(new Ra(n));
|
|
21398
|
+
if (zi(n))
|
|
21399
|
+
return this._setDefault(new ya(n));
|
|
21384
21400
|
const s = mr(n), { range: o, sheetName: u, unitId: c } = s;
|
|
21385
21401
|
if (Number.isNaN(o.startRow) || o.endRow + 1 > 1048576 || Number.isNaN(o.startColumn) || o.endColumn + 1 > 16384)
|
|
21386
21402
|
return g.create(m.REF);
|
|
21387
|
-
const l = new
|
|
21403
|
+
const l = new pn(o);
|
|
21388
21404
|
return l.setForcedUnitIdDirect(c), l.setForcedSheetName(u), this._setDefault(l);
|
|
21389
21405
|
}
|
|
21390
21406
|
_setDefault(e) {
|
|
@@ -21690,7 +21706,7 @@ class kd extends V {
|
|
|
21690
21706
|
}
|
|
21691
21707
|
}
|
|
21692
21708
|
_sort(e, t = 1) {
|
|
21693
|
-
const r =
|
|
21709
|
+
const r = An();
|
|
21694
21710
|
return t === 1 ? this._sortAsc(e, r) : this._sortDesc(e, r);
|
|
21695
21711
|
}
|
|
21696
21712
|
_sortAsc(e, t) {
|
|
@@ -21855,7 +21871,7 @@ class $d extends V {
|
|
|
21855
21871
|
return n;
|
|
21856
21872
|
}
|
|
21857
21873
|
_sort(e, t) {
|
|
21858
|
-
const r =
|
|
21874
|
+
const r = An();
|
|
21859
21875
|
return (n, s) => {
|
|
21860
21876
|
let o = n[e], u = s[e], c = this._compare(o, u, t[0], r);
|
|
21861
21877
|
if (c === 0 && t.length > 1) {
|
|
@@ -23363,14 +23379,14 @@ class xC extends V {
|
|
|
23363
23379
|
const { isError: c, errorObject: l, number: f } = this._handleSingleObject(u);
|
|
23364
23380
|
if (c)
|
|
23365
23381
|
return s = !0, o = l, !1;
|
|
23366
|
-
t =
|
|
23382
|
+
t = zs(t, f);
|
|
23367
23383
|
}), s)
|
|
23368
23384
|
return o;
|
|
23369
23385
|
} else {
|
|
23370
23386
|
const { isError: s, errorObject: o, number: u } = this._handleSingleObject(n);
|
|
23371
23387
|
if (s)
|
|
23372
23388
|
return o;
|
|
23373
|
-
t =
|
|
23389
|
+
t = zs(t, u);
|
|
23374
23390
|
}
|
|
23375
23391
|
}
|
|
23376
23392
|
return y.create(t);
|
|
@@ -23558,7 +23574,7 @@ class IC extends V {
|
|
|
23558
23574
|
}
|
|
23559
23575
|
if (t !== r)
|
|
23560
23576
|
return g.create(m.VALUE);
|
|
23561
|
-
const s =
|
|
23577
|
+
const s = La(n);
|
|
23562
23578
|
return y.create(s);
|
|
23563
23579
|
}
|
|
23564
23580
|
}
|
|
@@ -24663,8 +24679,8 @@ class __ extends V {
|
|
|
24663
24679
|
if (!e.isReferenceObject() || r && !r.isReferenceObject())
|
|
24664
24680
|
return g.create(m.VALUE);
|
|
24665
24681
|
const n = e.toArrayValueObject();
|
|
24666
|
-
let s =
|
|
24667
|
-
s =
|
|
24682
|
+
let s = Kn(n, t);
|
|
24683
|
+
s = Xn(s, n, t);
|
|
24668
24684
|
const o = n.getRowCount(), u = n.getColumnCount();
|
|
24669
24685
|
let c = n;
|
|
24670
24686
|
if (r) {
|
|
@@ -24999,7 +25015,7 @@ class O_ extends V {
|
|
|
24999
25015
|
return _;
|
|
25000
25016
|
if (d.isString() && (d = d.convertToNumberObjectValue()), d.isError())
|
|
25001
25017
|
return d;
|
|
25002
|
-
const C = +_.getValue(), E = +d.getValue(), b = 10 ** Math.trunc(E), R =
|
|
25018
|
+
const C = +_.getValue(), E = +d.getValue(), b = 10 ** Math.trunc(E), R = Gn(C, b), p = Math.trunc(Vr(C, b) + R) / b;
|
|
25003
25019
|
return y.create(p);
|
|
25004
25020
|
});
|
|
25005
25021
|
return n === 1 && s === 1 ? c.get(0, 0) : c;
|
|
@@ -25397,8 +25413,8 @@ class F_ extends V {
|
|
|
25397
25413
|
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));
|
|
25398
25414
|
}
|
|
25399
25415
|
_handleSingleObject(e, t, r) {
|
|
25400
|
-
let n =
|
|
25401
|
-
n =
|
|
25416
|
+
let n = Kn(e, t);
|
|
25417
|
+
n = Xn(n, e, t);
|
|
25402
25418
|
let s = r ? this._createRangeReferenceObject(r, e) : e;
|
|
25403
25419
|
if (!s)
|
|
25404
25420
|
return g.create(m.VALUE);
|
|
@@ -25752,8 +25768,8 @@ class Z_ extends V {
|
|
|
25752
25768
|
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);
|
|
25753
25769
|
}
|
|
25754
25770
|
_handleSingleObject(e, t) {
|
|
25755
|
-
let r =
|
|
25756
|
-
r =
|
|
25771
|
+
let r = Kn(e, t);
|
|
25772
|
+
r = Xn(r, e, t);
|
|
25757
25773
|
const n = e.pick(r);
|
|
25758
25774
|
return this._countA(n);
|
|
25759
25775
|
}
|
|
@@ -26145,7 +26161,7 @@ class oA extends V {
|
|
|
26145
26161
|
const [s] = n, o = +s.getValue();
|
|
26146
26162
|
if (o === 0 || o < 0 && o % 1 === 0)
|
|
26147
26163
|
return g.create(m.NUM);
|
|
26148
|
-
const u =
|
|
26164
|
+
const u = hn(o);
|
|
26149
26165
|
return Number.isNaN(u) || !Number.isFinite(u) ? g.create(m.NUM) : y.create(u);
|
|
26150
26166
|
}
|
|
26151
26167
|
}
|
|
@@ -26169,7 +26185,7 @@ class vi extends V {
|
|
|
26169
26185
|
const [s] = n, o = +s.getValue();
|
|
26170
26186
|
if (o <= 0)
|
|
26171
26187
|
return g.create(m.NUM);
|
|
26172
|
-
const u =
|
|
26188
|
+
const u = lt(o);
|
|
26173
26189
|
return Math.abs(u) < 1e-15 ? y.create(0) : y.create(u);
|
|
26174
26190
|
}
|
|
26175
26191
|
}
|
|
@@ -26280,7 +26296,7 @@ class lA extends V {
|
|
|
26280
26296
|
_ *= u[0][l - 2 - C] ** c[d][C];
|
|
26281
26297
|
h[d].push(_);
|
|
26282
26298
|
}
|
|
26283
|
-
return s && (h =
|
|
26299
|
+
return s && (h = ht(h)), q.createByArray(h);
|
|
26284
26300
|
}
|
|
26285
26301
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
26286
26302
|
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));
|
|
@@ -28143,7 +28159,7 @@ class JA extends V {
|
|
|
28143
28159
|
_ += u[0][l - 2 - C] * c[d][C];
|
|
28144
28160
|
h[d].push(_);
|
|
28145
28161
|
}
|
|
28146
|
-
return s && (h =
|
|
28162
|
+
return s && (h = ht(h)), q.createByArray(h);
|
|
28147
28163
|
}
|
|
28148
28164
|
_getResultBySimpleVariables(e, t, r, n) {
|
|
28149
28165
|
const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ns(o, s, n, !1);
|
|
@@ -30706,12 +30722,12 @@ var db = Object.getOwnPropertyDescriptor, Cb = (i, a, e, t) => {
|
|
|
30706
30722
|
(s = i[n]) && (r = s(r) || r);
|
|
30707
30723
|
return r;
|
|
30708
30724
|
}, Fi = (i, a) => (e, t) => a(e, t, i);
|
|
30709
|
-
let
|
|
30725
|
+
let na = class extends Ne {
|
|
30710
30726
|
constructor(a, e) {
|
|
30711
30727
|
super();
|
|
30712
30728
|
A(this, "_computingCompleted$", new uc((a) => {
|
|
30713
30729
|
this._commandService.onCommandExecuted((e) => {
|
|
30714
|
-
if (e.id !==
|
|
30730
|
+
if (e.id !== _n.id) return;
|
|
30715
30731
|
const t = e.params;
|
|
30716
30732
|
if (t.stageInfo)
|
|
30717
30733
|
return a.next(
|
|
@@ -30727,16 +30743,16 @@ let sa = class extends Ne {
|
|
|
30727
30743
|
t.add(this._globalComputingSrv.pushComputingStatusSubject(r)), t.add(this._computingCompleted$.subscribe((n) => r.next(n))), t.add(() => r.complete()), this.disposeWithMe(t);
|
|
30728
30744
|
}
|
|
30729
30745
|
};
|
|
30730
|
-
|
|
30746
|
+
na = Cb([
|
|
30731
30747
|
Fi(0, sr),
|
|
30732
30748
|
Fi(1, ye(Yu))
|
|
30733
|
-
],
|
|
30749
|
+
], na);
|
|
30734
30750
|
var _b = Object.getOwnPropertyDescriptor, Ab = (i, a, e, t) => {
|
|
30735
30751
|
for (var r = t > 1 ? void 0 : t ? _b(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
30736
30752
|
(s = i[n]) && (r = s(r) || r);
|
|
30737
30753
|
return r;
|
|
30738
30754
|
}, tn = (i, a) => (e, t) => a(e, t, i);
|
|
30739
|
-
let
|
|
30755
|
+
let Un = class extends Ne {
|
|
30740
30756
|
constructor(i, a, e, t) {
|
|
30741
30757
|
super(), this._commandService = i, this._functionService = a, this._configService = e, this._dataSyncPrimaryController = t, this._initialize();
|
|
30742
30758
|
}
|
|
@@ -30749,14 +30765,14 @@ let jn = class extends Ne {
|
|
|
30749
30765
|
Os,
|
|
30750
30766
|
so,
|
|
30751
30767
|
ao,
|
|
30752
|
-
|
|
30768
|
+
_n,
|
|
30753
30769
|
io,
|
|
30754
|
-
|
|
30770
|
+
ca,
|
|
30755
30771
|
no,
|
|
30772
|
+
la,
|
|
30756
30773
|
fa,
|
|
30757
30774
|
ha,
|
|
30758
30775
|
ma,
|
|
30759
|
-
ga,
|
|
30760
30776
|
qc,
|
|
30761
30777
|
Kc,
|
|
30762
30778
|
uo,
|
|
@@ -30768,7 +30784,7 @@ let jn = class extends Ne {
|
|
|
30768
30784
|
}
|
|
30769
30785
|
_registerFunctions() {
|
|
30770
30786
|
var e;
|
|
30771
|
-
const i = this._configService.getConfig(
|
|
30787
|
+
const i = this._configService.getConfig(Ca), a = [
|
|
30772
30788
|
...kh,
|
|
30773
30789
|
...ym,
|
|
30774
30790
|
...Rm,
|
|
@@ -30792,18 +30808,18 @@ let jn = class extends Ne {
|
|
|
30792
30808
|
this._functionService.registerExecutors(...a);
|
|
30793
30809
|
}
|
|
30794
30810
|
};
|
|
30795
|
-
|
|
30811
|
+
Un = Ab([
|
|
30796
30812
|
tn(0, sr),
|
|
30797
30813
|
tn(1, Yt),
|
|
30798
|
-
tn(2,
|
|
30814
|
+
tn(2, ia),
|
|
30799
30815
|
tn(3, nc(fc))
|
|
30800
|
-
],
|
|
30816
|
+
], Un);
|
|
30801
30817
|
var Eb = Object.getOwnPropertyDescriptor, bb = (i, a, e, t) => {
|
|
30802
30818
|
for (var r = t > 1 ? void 0 : t ? Eb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
30803
30819
|
(s = i[n]) && (r = s(r) || r);
|
|
30804
30820
|
return r;
|
|
30805
30821
|
}, rn = (i, a) => (e, t) => a(e, t, i);
|
|
30806
|
-
let
|
|
30822
|
+
let vn = class extends Ne {
|
|
30807
30823
|
constructor(i, a, e) {
|
|
30808
30824
|
super(), this._commandService = i, this._dependencyManagerService = a, this._featureCalculationManagerService = e, this._initialize();
|
|
30809
30825
|
}
|
|
@@ -30821,24 +30837,24 @@ let Un = class extends Ne {
|
|
|
30821
30837
|
_commandExecutedListener() {
|
|
30822
30838
|
this.disposeWithMe(
|
|
30823
30839
|
this._commandService.onCommandExecuted((i) => {
|
|
30824
|
-
if (i.id ===
|
|
30840
|
+
if (i.id === fa.id) {
|
|
30825
30841
|
const a = i.params;
|
|
30826
30842
|
if (a == null)
|
|
30827
30843
|
return;
|
|
30828
30844
|
const { featureIds: e, unitId: t, subUnitId: r } = a;
|
|
30829
30845
|
this._dependencyManagerService.removeFeatureFormulaDependency(t, r, e);
|
|
30830
|
-
} else if (i.id ===
|
|
30846
|
+
} else if (i.id === la.id) {
|
|
30831
30847
|
const a = i.params;
|
|
30832
30848
|
if (a == null)
|
|
30833
30849
|
return;
|
|
30834
30850
|
const { featureId: e, calculationParam: t } = a, { unitId: r, subUnitId: n } = t;
|
|
30835
30851
|
this._dependencyManagerService.removeFeatureFormulaDependency(r, n, [e]);
|
|
30836
|
-
} else if (i.id ===
|
|
30852
|
+
} else if (i.id === ma.id) {
|
|
30837
30853
|
const a = i.params;
|
|
30838
30854
|
if (a == null)
|
|
30839
30855
|
return;
|
|
30840
30856
|
this._dependencyManagerService.removeOtherFormulaDependency(a.unitId, a.subUnitId, a.formulaIdList);
|
|
30841
|
-
} else if (i.id ===
|
|
30857
|
+
} else if (i.id === ha.id) {
|
|
30842
30858
|
const a = i.params;
|
|
30843
30859
|
if (a == null)
|
|
30844
30860
|
return;
|
|
@@ -30867,7 +30883,7 @@ let Un = class extends Ne {
|
|
|
30867
30883
|
});
|
|
30868
30884
|
}
|
|
30869
30885
|
});
|
|
30870
|
-
} else i.id ===
|
|
30886
|
+
} else i.id === ca.id && this._handleSetDefinedName(i);
|
|
30871
30887
|
})
|
|
30872
30888
|
);
|
|
30873
30889
|
}
|
|
@@ -30879,18 +30895,18 @@ let Un = class extends Ne {
|
|
|
30879
30895
|
this._dependencyManagerService.removeFormulaDependencyByDefinedName(e, t);
|
|
30880
30896
|
}
|
|
30881
30897
|
};
|
|
30882
|
-
|
|
30898
|
+
vn = bb([
|
|
30883
30899
|
rn(0, sr),
|
|
30884
30900
|
rn(1, vr),
|
|
30885
|
-
rn(1,
|
|
30901
|
+
rn(1, Zn),
|
|
30886
30902
|
rn(2, vr)
|
|
30887
|
-
],
|
|
30903
|
+
], vn);
|
|
30888
30904
|
var yb = Object.getOwnPropertyDescriptor, Rb = (i, a, e, t) => {
|
|
30889
30905
|
for (var r = t > 1 ? void 0 : t ? yb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
30890
30906
|
(s = i[n]) && (r = s(r) || r);
|
|
30891
30907
|
return r;
|
|
30892
30908
|
}, ki = (i, a) => (e, t) => a(e, t, i);
|
|
30893
|
-
let
|
|
30909
|
+
let Tn = class extends Ne {
|
|
30894
30910
|
constructor(i, a) {
|
|
30895
30911
|
super(), this._commandService = i, this._featureCalculationManagerService = a, this._initialize();
|
|
30896
30912
|
}
|
|
@@ -30900,13 +30916,13 @@ let vn = class extends Ne {
|
|
|
30900
30916
|
_commandExecutedListener() {
|
|
30901
30917
|
this.disposeWithMe(
|
|
30902
30918
|
this._commandService.onCommandExecuted((i) => {
|
|
30903
|
-
if (i.id ===
|
|
30919
|
+
if (i.id === la.id) {
|
|
30904
30920
|
const a = i.params;
|
|
30905
30921
|
if (a == null)
|
|
30906
30922
|
return;
|
|
30907
30923
|
const { featureId: e, calculationParam: t } = a, { unitId: r, subUnitId: n } = t;
|
|
30908
30924
|
this._featureCalculationManagerService.register(r, n, e, t);
|
|
30909
|
-
} else if (i.id ===
|
|
30925
|
+
} else if (i.id === fa.id) {
|
|
30910
30926
|
const a = i.params;
|
|
30911
30927
|
if (a == null)
|
|
30912
30928
|
return;
|
|
@@ -30917,16 +30933,16 @@ let vn = class extends Ne {
|
|
|
30917
30933
|
);
|
|
30918
30934
|
}
|
|
30919
30935
|
};
|
|
30920
|
-
|
|
30936
|
+
Tn = Rb([
|
|
30921
30937
|
ki(0, sr),
|
|
30922
30938
|
ki(1, vr)
|
|
30923
|
-
],
|
|
30939
|
+
], Tn);
|
|
30924
30940
|
var pb = Object.getOwnPropertyDescriptor, Vb = (i, a, e, t) => {
|
|
30925
30941
|
for (var r = t > 1 ? void 0 : t ? pb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
|
|
30926
30942
|
(s = i[n]) && (r = s(r) || r);
|
|
30927
30943
|
return r;
|
|
30928
30944
|
}, Rs = (i, a) => (e, t) => a(e, t, i);
|
|
30929
|
-
let
|
|
30945
|
+
let Bn = class extends Ne {
|
|
30930
30946
|
constructor(i, a, e) {
|
|
30931
30947
|
super(), this._commandService = i, this._otherFormulaManagerService = a, this._dependencyManagerService = e, this._initialize();
|
|
30932
30948
|
}
|
|
@@ -30936,13 +30952,13 @@ let Tn = class extends Ne {
|
|
|
30936
30952
|
_commandExecutedListener() {
|
|
30937
30953
|
this.disposeWithMe(
|
|
30938
30954
|
this._commandService.onCommandExecuted((i) => {
|
|
30939
|
-
if (i.id ===
|
|
30955
|
+
if (i.id === ha.id) {
|
|
30940
30956
|
const a = i.params;
|
|
30941
30957
|
if (a == null)
|
|
30942
30958
|
return;
|
|
30943
30959
|
const e = { [a.unitId]: { [a.subUnitId]: a.formulaMap } };
|
|
30944
30960
|
this._otherFormulaManagerService.batchRegister(e);
|
|
30945
|
-
} else if (i.id ===
|
|
30961
|
+
} else if (i.id === ma.id) {
|
|
30946
30962
|
const a = i.params;
|
|
30947
30963
|
if (a == null)
|
|
30948
30964
|
return;
|
|
@@ -30955,11 +30971,11 @@ let Tn = class extends Ne {
|
|
|
30955
30971
|
);
|
|
30956
30972
|
}
|
|
30957
30973
|
};
|
|
30958
|
-
|
|
30974
|
+
Bn = Vb([
|
|
30959
30975
|
Rs(0, sr),
|
|
30960
|
-
Rs(1,
|
|
30961
|
-
Rs(2,
|
|
30962
|
-
],
|
|
30976
|
+
Rs(1, Oa),
|
|
30977
|
+
Rs(2, Zn)
|
|
30978
|
+
], Bn);
|
|
30963
30979
|
class Nb extends Ne {
|
|
30964
30980
|
constructor() {
|
|
30965
30981
|
super(...arguments);
|
|
@@ -30995,7 +31011,7 @@ var Ob = Object.getOwnPropertyDescriptor, Mb = (i, a, e, t) => {
|
|
|
30995
31011
|
(s = i[n]) && (r = s(r) || r);
|
|
30996
31012
|
return r;
|
|
30997
31013
|
}, $i = (i, a) => (e, t) => a(e, t, i);
|
|
30998
|
-
let
|
|
31014
|
+
let In = class extends Ne {
|
|
30999
31015
|
constructor(i, a) {
|
|
31000
31016
|
super(), this._commandService = i, this._superTableService = a, this._initialize();
|
|
31001
31017
|
}
|
|
@@ -31005,7 +31021,7 @@ let Bn = class extends Ne {
|
|
|
31005
31021
|
_commandExecutedListener() {
|
|
31006
31022
|
this.disposeWithMe(
|
|
31007
31023
|
this._commandService.onCommandExecuted((i) => {
|
|
31008
|
-
if (i.id ===
|
|
31024
|
+
if (i.id === ca.id) {
|
|
31009
31025
|
const a = i.params;
|
|
31010
31026
|
if (a == null)
|
|
31011
31027
|
return;
|
|
@@ -31028,10 +31044,10 @@ let Bn = class extends Ne {
|
|
|
31028
31044
|
);
|
|
31029
31045
|
}
|
|
31030
31046
|
};
|
|
31031
|
-
|
|
31047
|
+
In = Mb([
|
|
31032
31048
|
$i(0, sr),
|
|
31033
31049
|
$i(1, Hu)
|
|
31034
|
-
],
|
|
31050
|
+
], In);
|
|
31035
31051
|
class wb extends Ne {
|
|
31036
31052
|
constructor() {
|
|
31037
31053
|
super(...arguments);
|
|
@@ -31074,7 +31090,7 @@ let Hi = (ps = class extends sc {
|
|
|
31074
31090
|
hi,
|
|
31075
31091
|
this._config
|
|
31076
31092
|
);
|
|
31077
|
-
this._configService.setConfig(
|
|
31093
|
+
this._configService.setConfig(Ca, t);
|
|
31078
31094
|
}
|
|
31079
31095
|
onStarting() {
|
|
31080
31096
|
this._initialize(), this._initializeWithOverride();
|
|
@@ -31082,20 +31098,20 @@ let Hi = (ps = class extends sc {
|
|
|
31082
31098
|
onReady() {
|
|
31083
31099
|
var i;
|
|
31084
31100
|
os(this._injector, [
|
|
31085
|
-
[
|
|
31086
|
-
[
|
|
31101
|
+
[Un],
|
|
31102
|
+
[In]
|
|
31087
31103
|
]), (i = this._config) != null && i.notExecuteFormula || os(this._injector, [
|
|
31104
|
+
[Bn],
|
|
31088
31105
|
[Tn],
|
|
31089
31106
|
[vn],
|
|
31090
|
-
[
|
|
31091
|
-
[Ln]
|
|
31107
|
+
[Pn]
|
|
31092
31108
|
]);
|
|
31093
31109
|
}
|
|
31094
31110
|
onRendered() {
|
|
31095
31111
|
var i;
|
|
31096
31112
|
(i = this._config) != null && i.notExecuteFormula || os(this._injector, [
|
|
31097
|
-
[
|
|
31098
|
-
[
|
|
31113
|
+
[Ks],
|
|
31114
|
+
[Ws]
|
|
31099
31115
|
]);
|
|
31100
31116
|
}
|
|
31101
31117
|
_initialize() {
|
|
@@ -31110,52 +31126,52 @@ let Hi = (ps = class extends sc {
|
|
|
31110
31126
|
// Models
|
|
31111
31127
|
[gr],
|
|
31112
31128
|
// Engine
|
|
31113
|
-
[
|
|
31129
|
+
[ga],
|
|
31114
31130
|
//Controllers
|
|
31115
|
-
[
|
|
31116
|
-
[
|
|
31117
|
-
[
|
|
31131
|
+
[Un],
|
|
31132
|
+
[In],
|
|
31133
|
+
[na]
|
|
31118
31134
|
];
|
|
31119
31135
|
i && a.push(
|
|
31120
31136
|
// Services
|
|
31121
|
-
[
|
|
31122
|
-
[Ot, { useClass:
|
|
31137
|
+
[Oa, { useClass: Sh }],
|
|
31138
|
+
[Ot, { useClass: Hs }],
|
|
31123
31139
|
[Ft, { useClass: xs }],
|
|
31124
31140
|
[vr, { useClass: wh }],
|
|
31125
31141
|
//Controller
|
|
31126
|
-
[
|
|
31127
|
-
[
|
|
31128
|
-
[Un],
|
|
31142
|
+
[Pn],
|
|
31143
|
+
[Bn],
|
|
31129
31144
|
[vn],
|
|
31145
|
+
[Tn],
|
|
31130
31146
|
// Calculation engine
|
|
31131
31147
|
[_r],
|
|
31132
31148
|
[Ur],
|
|
31133
31149
|
[dr],
|
|
31134
31150
|
// AstNode factory
|
|
31135
31151
|
[Mo],
|
|
31136
|
-
[Nn],
|
|
31137
31152
|
[On],
|
|
31138
|
-
[xo],
|
|
31139
31153
|
[Mn],
|
|
31140
|
-
[
|
|
31154
|
+
[xo],
|
|
31141
31155
|
[wn],
|
|
31156
|
+
[Nn],
|
|
31142
31157
|
[Sn],
|
|
31143
31158
|
[Dn],
|
|
31159
|
+
[Ln],
|
|
31144
31160
|
[jo]
|
|
31145
31161
|
), a.forEach((e) => this._injector.add(e));
|
|
31146
31162
|
}
|
|
31147
31163
|
_initializeWithOverride() {
|
|
31148
31164
|
var i;
|
|
31149
31165
|
(i = this._config) != null && i.notExecuteFormula || [
|
|
31150
|
-
[
|
|
31151
|
-
[
|
|
31152
|
-
[
|
|
31166
|
+
[Ks, { useClass: Xs }],
|
|
31167
|
+
[Zn, { useClass: Mh }],
|
|
31168
|
+
[Ws, { useClass: qs }]
|
|
31153
31169
|
].forEach((e) => this._injector.add(e));
|
|
31154
31170
|
}
|
|
31155
31171
|
}, A(ps, "pluginName", Pb), ps);
|
|
31156
31172
|
Hi = Lb([
|
|
31157
31173
|
Yi(1, ye(Qi)),
|
|
31158
|
-
Yi(2,
|
|
31174
|
+
Yi(2, ia)
|
|
31159
31175
|
], Hi);
|
|
31160
31176
|
export {
|
|
31161
31177
|
wb as ActiveDirtyManagerService,
|
|
@@ -31166,23 +31182,23 @@ export {
|
|
|
31166
31182
|
Qb as AsyncCustomFunction,
|
|
31167
31183
|
Tf as AsyncObject,
|
|
31168
31184
|
V as BaseFunction,
|
|
31169
|
-
|
|
31185
|
+
qn as BaseReferenceObject,
|
|
31170
31186
|
kt as BaseValueObject,
|
|
31171
31187
|
er as BooleanValue,
|
|
31172
31188
|
T as BooleanValueObject,
|
|
31173
|
-
|
|
31174
|
-
|
|
31189
|
+
Pn as CalculateController,
|
|
31190
|
+
Xs as CalculateFormulaService,
|
|
31175
31191
|
Vm as CustomFunction,
|
|
31176
31192
|
jh as DEFAULT_INTERVAL_COUNT,
|
|
31177
31193
|
Ds as DefinedNamesService,
|
|
31178
31194
|
Oh as DependencyManagerBaseService,
|
|
31179
31195
|
Mh as DependencyManagerService,
|
|
31180
31196
|
Hb as ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,
|
|
31181
|
-
|
|
31197
|
+
Ca as ENGINE_FORMULA_PLUGIN_CONFIG_KEY,
|
|
31182
31198
|
yr as ERROR_TYPE_SET,
|
|
31183
31199
|
m as ErrorType,
|
|
31184
31200
|
g as ErrorValueObject,
|
|
31185
|
-
|
|
31201
|
+
Zs as FUNCTION_NAMES_ARRAY,
|
|
31186
31202
|
le as FUNCTION_NAMES_COMPATIBILITY,
|
|
31187
31203
|
pm as FUNCTION_NAMES_CUBE,
|
|
31188
31204
|
Qe as FUNCTION_NAMES_DATABASE,
|
|
@@ -31200,72 +31216,72 @@ export {
|
|
|
31200
31216
|
wh as FeatureCalculationManagerService,
|
|
31201
31217
|
xs as FormulaCurrentConfigService,
|
|
31202
31218
|
gr as FormulaDataModel,
|
|
31203
|
-
|
|
31219
|
+
qs as FormulaDependencyGenerator,
|
|
31204
31220
|
As as FormulaDependencyTree,
|
|
31205
|
-
|
|
31221
|
+
Qs as FormulaDependencyTreeType,
|
|
31206
31222
|
Mi as FormulaDependencyTreeVirtual,
|
|
31207
31223
|
Xe as FormulaExecuteStageType,
|
|
31208
31224
|
Dr as FormulaExecutedStateType,
|
|
31209
|
-
|
|
31210
|
-
|
|
31225
|
+
Hs as FormulaRuntimeService,
|
|
31226
|
+
On as FunctionNodeFactory,
|
|
31211
31227
|
Kf as FunctionService,
|
|
31212
31228
|
gc as FunctionType,
|
|
31213
31229
|
Yu as GlobalComputingStatusService,
|
|
31214
31230
|
Sb as IActiveDirtyManagerService,
|
|
31215
|
-
|
|
31231
|
+
Ks as ICalculateFormulaService,
|
|
31216
31232
|
pr as IDefinedNamesService,
|
|
31217
|
-
|
|
31233
|
+
Zn as IDependencyManagerService,
|
|
31218
31234
|
vr as IFeatureCalculationManagerService,
|
|
31219
31235
|
Ft as IFormulaCurrentConfigService,
|
|
31220
|
-
|
|
31236
|
+
Ws as IFormulaDependencyGenerator,
|
|
31221
31237
|
Ot as IFormulaRuntimeService,
|
|
31222
31238
|
Yt as IFunctionService,
|
|
31223
|
-
|
|
31239
|
+
Oa as IOtherFormulaManagerService,
|
|
31224
31240
|
ho as ISheetRowFilteredService,
|
|
31225
31241
|
Hu as ISuperTableService,
|
|
31226
31242
|
_r as Interpreter,
|
|
31227
|
-
|
|
31243
|
+
Mn as LambdaNodeFactory,
|
|
31228
31244
|
xo as LambdaParameterNodeFactory,
|
|
31229
|
-
|
|
31245
|
+
Na as LambdaValueObjectObject,
|
|
31230
31246
|
dr as Lexer,
|
|
31231
31247
|
ae as LexerNode,
|
|
31232
|
-
|
|
31248
|
+
ga as LexerTreeBuilder,
|
|
31233
31249
|
ie as NullValueObject,
|
|
31234
31250
|
y as NumberValueObject,
|
|
31235
|
-
|
|
31251
|
+
wn as OperatorNodeFactory,
|
|
31236
31252
|
Sh as OtherFormulaManagerService,
|
|
31237
|
-
|
|
31238
|
-
|
|
31239
|
-
|
|
31253
|
+
Nn as PrefixNodeFactory,
|
|
31254
|
+
pn as RangeReferenceObject,
|
|
31255
|
+
Sn as ReferenceNodeFactory,
|
|
31240
31256
|
Uc as RegisterFunctionMutation,
|
|
31241
31257
|
no as RemoveDefinedNameMutation,
|
|
31242
|
-
|
|
31243
|
-
|
|
31258
|
+
fa as RemoveFeatureCalculationMutation,
|
|
31259
|
+
ma as RemoveOtherFormulaMutation,
|
|
31244
31260
|
Kc as RemoveSuperTableMutation,
|
|
31245
31261
|
Os as SetArrayFormulaDataMutation,
|
|
31246
|
-
|
|
31262
|
+
ca as SetDefinedNameMutation,
|
|
31247
31263
|
Yb as SetDefinedNameMutationFactory,
|
|
31248
|
-
|
|
31249
|
-
|
|
31264
|
+
la as SetFeatureCalculationMutation,
|
|
31265
|
+
_n as SetFormulaCalculationNotificationMutation,
|
|
31250
31266
|
io as SetFormulaCalculationResultMutation,
|
|
31251
31267
|
so as SetFormulaCalculationStartMutation,
|
|
31252
31268
|
ao as SetFormulaCalculationStopMutation,
|
|
31253
31269
|
oo as SetFormulaDataMutation,
|
|
31254
|
-
|
|
31270
|
+
ha as SetOtherFormulaMutation,
|
|
31255
31271
|
qc as SetSuperTableMutation,
|
|
31256
31272
|
uo as SetSuperTableOptionMutation,
|
|
31257
31273
|
il as SheetRowFilteredService,
|
|
31258
31274
|
j as StringValueObject,
|
|
31259
|
-
|
|
31275
|
+
Dn as SuffixNodeFactory,
|
|
31260
31276
|
Nb as SuperTableService,
|
|
31261
|
-
|
|
31277
|
+
Ln as UnionNodeFactory,
|
|
31262
31278
|
Hi as UniverFormulaEnginePlugin,
|
|
31263
31279
|
jo as ValueNodeFactory,
|
|
31264
31280
|
Vt as ValueObjectFactory,
|
|
31265
31281
|
$ as compareToken,
|
|
31266
31282
|
Rc as convertUnitDataToRuntime,
|
|
31267
31283
|
Th as deserializeRangeForR1C1,
|
|
31268
|
-
|
|
31284
|
+
Cn as deserializeRangeWithSheet,
|
|
31269
31285
|
mr as deserializeRangeWithSheetWithCache,
|
|
31270
31286
|
kh as functionArray,
|
|
31271
31287
|
ym as functionCompatibility,
|
|
@@ -31292,7 +31308,7 @@ export {
|
|
|
31292
31308
|
Bb as getObjectValue,
|
|
31293
31309
|
$b as getRangeWithRefsString,
|
|
31294
31310
|
Gb as handleNumfmtInCell,
|
|
31295
|
-
|
|
31311
|
+
ua as handleRefStringInfo,
|
|
31296
31312
|
_c as includeFormulaLexerToken,
|
|
31297
31313
|
fi as initSheetFormulaData,
|
|
31298
31314
|
sn as isFormulaLexerToken,
|