@univerjs/engine-formula 0.6.8 → 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/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 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 ps, 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 is } from "@univerjs/core";
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";
@@ -59,7 +59,7 @@ const nn = /* @__PURE__ */ new Map([
59
59
  /* LESS_THAN_OR_EQUAL */
60
60
  ]);
61
61
  var K = /* @__PURE__ */ ((i) => (i.OPEN_BRACKET = "(", i.CLOSE_BRACKET = ")", i.COMMA = ",", i.SINGLE_QUOTATION = "'", i.DOUBLE_QUOTATION = '"', i.OPEN_BRACES = "{", i.CLOSE_BRACES = "}", i.COLON = ":", i.OPEN_SQUARE_BRACKET = "[", i.CLOSE_SQUARE_BRACKET = "]", i))(K || {}), Je = /* @__PURE__ */ ((i) => (i.PERCENTAGE = "%", i.POUND = "#", i))(Je || {});
62
- const os = /* @__PURE__ */ new Set([
62
+ const us = /* @__PURE__ */ new Set([
63
63
  "%",
64
64
  "#"
65
65
  /* POUND */
@@ -161,7 +161,7 @@ function pc(i) {
161
161
  }
162
162
  return a;
163
163
  }
164
- const Xi = '\\[([^\\[\\]\\/?:"<>|*\\\\]+)\\]', Ja = new RegExp(Xi), Vc = "((?![\\[\\]\\/?*\\\\]).)*!", Tt = "$", oa = "\\s*?:\\s*?", mn = "[A-Za-z]+", gn = "[1-9][0-9]*", Rr = `'?(${Xi})?(${Vc})?'?`, Vs = `\\${Tt}?${mn}\\${Tt}?${gn}`, Nc = `^(${Me.AT})?${Rr}${Vs}${oa}${Vs}$`, ei = new RegExp(Nc), Oc = `^${Rr}\\s*?${Vs}(${Je.POUND})?$`, ti = new RegExp(Oc), Mc = `^${Rr}\\${Tt}?${gn}${oa}\\${Tt}?${gn}$`, ri = new RegExp(Mc), wc = `^${Rr}\\${Tt}?${mn}${oa}\\${Tt}?${mn}$`, ni = new RegExp(wc), Sc = `^${Rr}\\s*?\\${Tt}?${gn}$`, si = new RegExp(Sc), Dc = `^${Rr}\\s*?\\${Tt}?${mn}$`, ai = new RegExp(Dc), Lc = "{.*?}", ii = new RegExp(Lc, "g");
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
  }
@@ -190,7 +190,7 @@ const Uc = {
190
190
  id: "formula.mutation.register-function",
191
191
  type: Ie.MUTATION,
192
192
  handler: () => !0
193
- }, Ns = {
193
+ }, Os = {
194
194
  id: "formula.mutation.set-array-formula-data",
195
195
  type: Ie.MUTATION,
196
196
  handler: (i, a) => !0
@@ -242,13 +242,13 @@ function Bc(i, a) {
242
242
  return `${ro(i)}!${fr(a)}`;
243
243
  }
244
244
  function Ic(i, a, e) {
245
- return Ms(i) || Ms(a) ? `'[${ws(i)}]${ws(a)}'!${fr(e)}` : `[${i}]${a}!${fr(e)}`;
245
+ return ws(i) || ws(a) ? `'[${Ss(i)}]${Ss(a)}'!${fr(e)}` : `[${i}]${a}!${fr(e)}`;
246
246
  }
247
- function Os(i) {
247
+ function Ms(i) {
248
248
  const { unitId: a, sheetName: e, range: t } = i;
249
249
  return a != null && a.length > 0 && e != null && e.length > 0 ? Ic(a, e, t) : e != null && e.length > 0 ? Bc(e, t) : fr(t);
250
250
  }
251
- function us(i) {
251
+ function cs(i) {
252
252
  const a = Number.parseInt(i.replace(vc, "")) - 1, e = ze.ABCatNum(i.replace(Tc, "")), t = an(i);
253
253
  return {
254
254
  row: a,
@@ -268,10 +268,10 @@ function ua(i) {
268
268
  unitId: e
269
269
  };
270
270
  }
271
- function dn(i) {
271
+ function Cn(i) {
272
272
  const { refBody: a, sheetName: e, unitId: t } = ua(i), r = a.indexOf(":");
273
273
  if (r === -1) {
274
- const _ = us(a), C = _.row, E = _.column, b = _.absoluteRefType;
274
+ const _ = cs(a), C = _.row, E = _.column, b = _.absoluteRefType;
275
275
  return {
276
276
  unitId: t,
277
277
  sheetName: e,
@@ -285,7 +285,7 @@ function dn(i) {
285
285
  }
286
286
  };
287
287
  }
288
- const n = a.substring(0, r), s = a.substring(r + 1), o = us(n), u = us(s), c = o.row > u.row ? u.row : o.row, l = o.column > u.column ? u.column : o.column, f = o.row > u.row ? o.row : u.row, h = o.column > u.column ? o.column : u.column;
288
+ const n = a.substring(0, r), s = a.substring(r + 1), o = cs(n), u = cs(s), c = o.row > u.row ? u.row : o.row, l = o.column > u.column ? u.column : o.column, f = o.row > u.row ? o.row : u.row, h = o.column > u.column ? o.column : u.column;
289
289
  let d = Ze.NORMAL;
290
290
  return Number.isNaN(c) && Number.isNaN(f) ? d = Ze.COLUMN : Number.isNaN(l) && Number.isNaN(h) && (d = Ze.ROW), {
291
291
  unitId: t,
@@ -306,7 +306,7 @@ function 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 } = dn(a);
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 = dn(n);
330
+ const s = Cn(n);
331
331
  return {
332
332
  unitId: s.unitId,
333
333
  sheetId: a(s.sheetName),
@@ -339,13 +339,13 @@ function $b(i, a) {
339
339
  function kc(i) {
340
340
  return ((i == null ? void 0 : i.split(",")) || []).every((e) => on(e.trim()));
341
341
  }
342
- function Ms(i) {
342
+ function ws(i) {
343
343
  return i.length === 0 ? !1 : !!(_c(i) || $c(i) || Yc(i) || Hc(i) || /[\s!$%^&*()+\-=\[\]{};':"\\|,.<>\/?()]/.test(i));
344
344
  }
345
345
  function ro(i) {
346
- return Ms(i) ? `'${ws(i)}'` : i;
346
+ return ws(i) ? `'${Ss(i)}'` : i;
347
347
  }
348
- function ws(i) {
348
+ function Ss(i) {
349
349
  return i.replace(/'/g, "''");
350
350
  }
351
351
  function ui(i) {
@@ -366,7 +366,7 @@ var Gc = Object.getOwnPropertyDescriptor, Qc = (i, a, e, t) => {
366
366
  (s = i[n]) && (r = s(r) || r);
367
367
  return r;
368
368
  }, Wc = (i, a) => (e, t) => a(e, t, i);
369
- let Ss = class extends Ne {
369
+ let Ds = class extends Ne {
370
370
  constructor(a) {
371
371
  super();
372
372
  // 18.2.6 definedNames (Defined Names)
@@ -464,9 +464,9 @@ let Ss = class extends Ne {
464
464
  this._nameCacheMap[a][t.name] = t;
465
465
  }
466
466
  };
467
- Ss = Qc([
467
+ Ds = Qc([
468
468
  Wc(0, sa)
469
- ], Ss);
469
+ ], Ds);
470
470
  const pr = et("univer.formula.defined-names.service"), Yb = (i, a) => {
471
471
  const { unitId: e, id: t } = a;
472
472
  return {
@@ -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
- }, Cn = {
517
+ }, _n = {
518
518
  id: "formula.mutation.set-formula-calculation-notification",
519
519
  type: Ie.MUTATION,
520
520
  handler: () => !0
@@ -573,16 +573,16 @@ class Nt {
573
573
  return a.length <= 64 ? a : qu(a).toString();
574
574
  }
575
575
  }
576
- const ht = "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"]), Ds = new Nt(1e5);
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
- const a = Ds.get(i);
578
+ const a = Ls.get(i);
579
579
  if (a)
580
580
  return a;
581
- const e = dn(i);
582
- return Ds.set(i, e), dn(i);
581
+ const e = Cn(i);
582
+ return Ls.set(i, e), Cn(i);
583
583
  }
584
584
  function Jc() {
585
- Ds.clear();
585
+ Ls.clear();
586
586
  }
587
587
  var $e = /* @__PURE__ */ ((i) => (i[i.NORMAL = 0] = "NORMAL", i[i.NUMBER = 1] = "NUMBER", i[i.STRING = 2] = "STRING", i[i.FUNCTION = 3] = "FUNCTION", i[i.REFERENCE = 4] = "REFERENCE", i[i.ARRAY = 5] = "ARRAY", i[i.DEFINED_NAME = 6] = "DEFINED_NAME", i))($e || {});
588
588
  function ci(i) {
@@ -698,7 +698,7 @@ class ae {
698
698
  return r;
699
699
  }
700
700
  }
701
- const lo = 2e3, cs = new Nt(lo), ls = new Nt(lo);
701
+ const lo = 2e3, ls = new Nt(lo), fs = new Nt(lo);
702
702
  class ga extends Ne {
703
703
  constructor() {
704
704
  super(...arguments);
@@ -723,7 +723,7 @@ class ga extends Ne {
723
723
  }
724
724
  // Table3[[#All],[Column1]:[Column2]]
725
725
  dispose() {
726
- this._resetTemp(), this._currentLexerNode.dispose(), cs.clear(), ls.clear();
726
+ this._resetTemp(), this._currentLexerNode.dispose(), ls.clear(), fs.clear();
727
727
  }
728
728
  getUpLevel() {
729
729
  return this._upLevel;
@@ -768,7 +768,7 @@ class ga extends Ne {
768
768
  let s = n.getParent(), o = n;
769
769
  for (; s; ) {
770
770
  const u = s.getToken();
771
- if (u !== ht && !sn(u) && s.getStartIndex() !== -1) {
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,19 +795,19 @@ class ga 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 !== ht && l !== K.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== Pr && (t === 0 ? c += 1 : t--), u = u.getParent();
798
+ l !== ft && l !== K.COLON && u.getStartIndex() !== -1 && l.toUpperCase() !== Pr && (t === 0 ? c += 1 : t--), u = u.getParent();
799
799
  }
800
800
  return c;
801
801
  }
802
802
  sequenceNodesBuilder(e) {
803
- const t = ls.get(e);
803
+ const t = fs.get(e);
804
804
  if (t)
805
805
  return [...t];
806
806
  const r = this._getSequenceArray(e);
807
807
  if (r.length === 0)
808
808
  return;
809
809
  const n = this.getSequenceNode(r);
810
- return ls.set(e, [...n]), n;
810
+ return fs.set(e, [...n]), n;
811
811
  }
812
812
  convertRefersToAbsolute(e, t, r, n = "") {
813
813
  const s = this.sequenceNodesBuilder(e);
@@ -825,7 +825,7 @@ class ga extends Ne {
825
825
  ..._,
826
826
  startAbsoluteRefType: t,
827
827
  endAbsoluteRefType: r
828
- }, R = Os({
828
+ }, R = Ms({
829
829
  range: b,
830
830
  unitId: E,
831
831
  sheetName: C || n
@@ -862,7 +862,7 @@ class ga extends Ne {
862
862
  } else
863
863
  C = aa(C, t, r, n);
864
864
  let E = "";
865
- Ku(C) ? E = Os({
865
+ Ku(C) ? E = Ms({
866
866
  range: C,
867
867
  unitId: _,
868
868
  sheetName: d
@@ -881,7 +881,7 @@ class ga extends Ne {
881
881
  if (this._currentLexerNode.getChildren().length === 0)
882
882
  return !0;
883
883
  const e = this._currentLexerNode.getChildren()[0];
884
- return !!(e instanceof ae || Dt.has(e) || os.has(e) || e === Me.AT || e === K.COMMA || e === K.COLON || e === K.OPEN_BRACKET);
884
+ return !!(e instanceof ae || Dt.has(e) || us.has(e) || e === Me.AT || e === K.COMMA || e === K.COLON || e === K.OPEN_BRACKET);
885
885
  }
886
886
  // eslint-disable-next-line complexity
887
887
  getSequenceNode(e) {
@@ -989,7 +989,7 @@ class ga extends Ne {
989
989
  }
990
990
  treeBuilder(e, t = !0, r, n) {
991
991
  if (t === !0) {
992
- const h = cs.get(e), d = n == null ? void 0 : n(e);
992
+ const h = ls.get(e), d = n == null ? void 0 : n(e);
993
993
  if (h && !d)
994
994
  return h;
995
995
  }
@@ -1009,7 +1009,7 @@ class ga extends Ne {
1009
1009
  if (f && (this._currentLexerNode = f), t) {
1010
1010
  if (!this._suffixExpressionHandler(this._currentLexerNode))
1011
1011
  return m.VALUE;
1012
- cs.set(e, this._currentLexerNode);
1012
+ ls.set(e, this._currentLexerNode);
1013
1013
  }
1014
1014
  return u && this._currentLexerNode.setDefinedNames(l), this._currentLexerNode;
1015
1015
  }
@@ -1255,7 +1255,7 @@ class ga extends Ne {
1255
1255
  const r = this._findPreviousToken(e, t) || "", n = e.length - 1 === t;
1256
1256
  if (!n && this._isOperatorToken(r) || n && Ec(r))
1257
1257
  return !0;
1258
- if (os.has(r)) {
1258
+ if (us.has(r)) {
1259
1259
  const s = this._findSecondLastNonSpaceToken(e, t);
1260
1260
  if (s == null || yc(s))
1261
1261
  return !0;
@@ -1364,7 +1364,7 @@ class ga 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(ht, u);
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 ga 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(ht, u);
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(ht), h.changeToParent(f);
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 ga extends Ne {
1438
1438
  this._changeCurrentBracket(
1439
1439
  1
1440
1440
  /* FUNCTION */
1441
- ), this._pushNodeToChildren(this._segment), this._resetSegment(), this._currentLexerNode = f, this._newAndPushCurrentLexerNode(ht, u);
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(ht), f.setParent(l);
1447
+ f.setToken(ft), f.setParent(l);
1448
1448
  const h = new ae();
1449
- h.setToken(ht), h.setParent(l), l.getChildren().push(f, h);
1449
+ h.setToken(ft), h.setParent(l), l.getChildren().push(f, h);
1450
1450
  let d = l, _ = 0;
1451
1451
  if (this._segmentCount() > 0) {
1452
1452
  let C, E, b = 0;
@@ -1465,7 +1465,7 @@ class ga extends Ne {
1465
1465
  C && C.changeToParent(f);
1466
1466
  }
1467
1467
  this._setCurrentLexerNode(d), this._currentLexerNode = h, this._openColon(_);
1468
- } else if (os.has(c) && this._checkSimilarErrorToken(c, u, s) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose() && this.isBracesClose()) {
1468
+ } else if (us.has(c) && this._checkSimilarErrorToken(c, u, s) && this.isSingleQuotationClose() && this.isDoubleQuotationClose() && this.isSquareBracketClose() && this.isBracesClose()) {
1469
1469
  this._pushNodeToChildren(this._segment);
1470
1470
  const l = new ae();
1471
1471
  l.setToken(c);
@@ -1904,7 +1904,7 @@ function fi(i, a, e, t) {
1904
1904
  }
1905
1905
  };
1906
1906
  }
1907
- const sl = class Ls {
1907
+ const sl = class Ps {
1908
1908
  /**
1909
1909
  * Accept two comparable values and creates new instance of interval
1910
1910
  * Predicate Interval.comparable_less(low, high) supposed to return true on these values
@@ -1919,7 +1919,7 @@ const sl = class Ls {
1919
1919
  * @returns {Interval}
1920
1920
  */
1921
1921
  clone() {
1922
- return new Ls(this.low, this.high);
1922
+ return new Ps(this.low, this.high);
1923
1923
  }
1924
1924
  /**
1925
1925
  * Propery max returns clone of this interval
@@ -1966,7 +1966,7 @@ const sl = class Ls {
1966
1966
  * @returns {Interval}
1967
1967
  */
1968
1968
  merge(a) {
1969
- return new Ls(
1969
+ return new Ps(
1970
1970
  this.low === void 0 ? a.low : this.low < a.low ? this.low : a.low,
1971
1971
  this.high === void 0 ? a.high : this.high > a.high ? this.high : a.high
1972
1972
  );
@@ -2429,7 +2429,7 @@ var ol = Object.getOwnPropertyDescriptor, ul = (i, a, e, t) => {
2429
2429
  (s = i[n]) && (r = s(r) || r);
2430
2430
  return r;
2431
2431
  }, Kr = (i, a) => (e, t) => a(e, t, i);
2432
- let Ps = class extends Ne {
2432
+ let xs = class extends Ne {
2433
2433
  constructor(a, e, t, r) {
2434
2434
  super();
2435
2435
  A(this, "_unitData", {});
@@ -2652,12 +2652,12 @@ let Ps = class extends Ne {
2652
2652
  }), this._unitData[e][t].rowData = a[e][t]);
2653
2653
  }
2654
2654
  };
2655
- Ps = ul([
2655
+ xs = ul([
2656
2656
  Kr(0, sa),
2657
2657
  Kr(1, ye(Zu)),
2658
2658
  Kr(2, ye(gr)),
2659
2659
  Kr(3, ye(ho))
2660
- ], Ps);
2660
+ ], xs);
2661
2661
  const Ft = et(
2662
2662
  "univer.formula.current-data.service"
2663
2663
  );
@@ -2665,7 +2665,7 @@ var cl = Object.getOwnPropertyDescriptor, ll = (i, a, e, t) => {
2665
2665
  for (var r = t > 1 ? void 0 : t ? cl(a, e) : a, n = i.length - 1, s; n >= 0; n--)
2666
2666
  (s = i[n]) && (r = s(r) || r);
2667
2667
  return r;
2668
- }, fs = (i, a) => (e, t) => a(e, t, i);
2668
+ }, hs = (i, a) => (e, t) => a(e, t, i);
2669
2669
  let dr = class extends Ne {
2670
2670
  constructor(i, a, e) {
2671
2671
  super(), this._definedNamesService = i, this._lexerTreeBuilder = a, this._formulaCurrentConfigService = e;
@@ -2730,9 +2730,9 @@ let dr = class extends Ne {
2730
2730
  }
2731
2731
  };
2732
2732
  dr = ll([
2733
- fs(0, pr),
2734
- fs(1, ye(ga)),
2735
- fs(2, Ft)
2733
+ hs(0, pr),
2734
+ hs(1, ye(ga)),
2735
+ hs(2, Ft)
2736
2736
  ], dr);
2737
2737
  function un(i) {
2738
2738
  if (i == null)
@@ -2809,16 +2809,16 @@ function Gb(i, a, e) {
2809
2809
  const o = n || s;
2810
2810
  return r.n.pattern = o, a;
2811
2811
  }
2812
- const xs = new Nt(1e5);
2812
+ const js = new Nt(1e5);
2813
2813
  function mi(i) {
2814
- const a = xs.get(i);
2814
+ const a = js.get(i);
2815
2815
  if (a !== void 0)
2816
2816
  return a;
2817
2817
  const e = gl(i);
2818
- return xs.set(i, e), e;
2818
+ return js.set(i, e), e;
2819
2819
  }
2820
2820
  function ml() {
2821
- xs.clear();
2821
+ js.clear();
2822
2822
  }
2823
2823
  function gl(i) {
2824
2824
  if (dl(i))
@@ -2870,16 +2870,16 @@ function Al(i) {
2870
2870
  };
2871
2871
  const t = gt.parseNumber(a);
2872
2872
  if (t && t.z)
2873
- return hs(a, t.v, t.z);
2873
+ return ms(a, t.v, t.z);
2874
2874
  const r = gt.parseDate(a);
2875
2875
  if (r && r.z)
2876
- return hs(a, r.v, r.z);
2876
+ return ms(a, r.v, r.z);
2877
2877
  const n = gt.parseTime(a);
2878
- return n && n.z ? hs(a, n.v, n.z) : {
2878
+ return n && n.z ? ms(a, n.v, n.z) : {
2879
2879
  isNumberPattern: !1
2880
2880
  };
2881
2881
  }
2882
- function hs(i, a, e) {
2882
+ function ms(i, a, e) {
2883
2883
  return _a.set(i, {
2884
2884
  value: a,
2885
2885
  pattern: e
@@ -2892,7 +2892,7 @@ function hs(i, a, e) {
2892
2892
  function El() {
2893
2893
  _a.clear();
2894
2894
  }
2895
- class Fn {
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 Fn {
2933
+ class kt extends kn {
2934
2934
  constructor(e) {
2935
2935
  super();
2936
2936
  A(this, "_customData");
@@ -3225,17 +3225,17 @@ class kt extends Fn {
3225
3225
  return g.create(m.VALUE);
3226
3226
  }
3227
3227
  }
3228
- const bl = 1e3, js = new Nt(bl);
3228
+ const bl = 1e3, Us = new Nt(bl);
3229
3229
  class g extends kt {
3230
3230
  constructor(a, e = "") {
3231
3231
  super(a), this._errorType = a, this._errorContent = e;
3232
3232
  }
3233
3233
  static create(a, e = "") {
3234
- const t = `${a}-${e}`, r = js.get(t);
3234
+ const t = `${a}-${e}`, r = Us.get(t);
3235
3235
  if (r)
3236
3236
  return r;
3237
3237
  const n = new g(a, e);
3238
- return js.set(t, n), n;
3238
+ return Us.set(t, n), n;
3239
3239
  }
3240
3240
  getValue() {
3241
3241
  return this._errorType;
@@ -3267,13 +3267,13 @@ function yl(i) {
3267
3267
  return (a = i == null ? void 0 : i.v) != null ? a : 0;
3268
3268
  }
3269
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 || {});
3270
- function _n() {
3270
+ function An() {
3271
3271
  return Intl && Intl.Collator ? new Intl.Collator(void 0, { numeric: !1 }).compare : (i, a) => i.localeCompare(a);
3272
3272
  }
3273
3273
  function Rl(i) {
3274
3274
  return i.indexOf("*") > -1 || i.indexOf("?") > -1;
3275
3275
  }
3276
- function ms(i, a) {
3276
+ function gs(i, a) {
3277
3277
  const e = Vl(a).replace(/~?[*?]/g, (r) => r.startsWith("~") ? `\\${r.substring(1)}` : r === "*" ? ".*" : r === "?" ? "." : r);
3278
3278
  return new RegExp(`^${e}$`).test(i);
3279
3279
  }
@@ -3284,14 +3284,14 @@ function pl(i, a, e) {
3284
3284
  let t = !1;
3285
3285
  switch (e) {
3286
3286
  case $.EQUALS:
3287
- t = ms(i, a);
3287
+ t = gs(i, a);
3288
3288
  break;
3289
3289
  case $.NOT_EQUAL:
3290
- t = !ms(i, a);
3290
+ t = !gs(i, a);
3291
3291
  break;
3292
3292
  case $.GREATER_THAN:
3293
3293
  case $.GREATER_THAN_OR_EQUAL:
3294
- t = ms(i, a) || i > di(a);
3294
+ t = gs(i, a) || i > di(a);
3295
3295
  break;
3296
3296
  case $.LESS_THAN:
3297
3297
  case $.LESS_THAN_OR_EQUAL:
@@ -3303,7 +3303,7 @@ function pl(i, a, e) {
3303
3303
  function Vl(i) {
3304
3304
  return i.replace(/[.+^${}()|[\]\\]/g, "\\$&");
3305
3305
  }
3306
- function Us(i) {
3306
+ function vs(i) {
3307
3307
  switch (i) {
3308
3308
  case 1:
3309
3309
  return 2;
@@ -3315,7 +3315,7 @@ function Us(i) {
3315
3315
  return 0;
3316
3316
  }
3317
3317
  }
3318
- function vs(i) {
3318
+ function Ts(i) {
3319
3319
  return i === -2 ? 1 : 0;
3320
3320
  }
3321
3321
  function Aa(i) {
@@ -3343,13 +3343,13 @@ function Aa(i) {
3343
3343
  return a;
3344
3344
  }
3345
3345
  /*!
3346
- * decimal.js v10.4.3
3346
+ * decimal.js v10.5.0
3347
3347
  * An arbitrary-precision Decimal type for JavaScript.
3348
3348
  * https://github.com/MikeMcl/decimal.js
3349
- * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
3349
+ * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
3350
3350
  * MIT Licence
3351
3351
  */
3352
- var Ts = 9e15, $t = 1e9, Bs = "0123456789abcdef", An = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", En = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", Is = {
3352
+ var Bs = 9e15, $t = 1e9, Is = "0123456789abcdef", En = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", bn = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", Fs = {
3353
3353
  // These values must be integers within the stated ranges (inclusive).
3354
3354
  // Most of these values can be changed at run-time using the `Decimal.config` method.
3355
3355
  // The maximum number of significant digits of the result of a calculation or base conversion.
@@ -3402,12 +3402,12 @@ var Ts = 9e15, $t = 1e9, Bs = "0123456789abcdef", An = "2.3025850929940456840179
3402
3402
  // -1 to -EXP_LIMIT
3403
3403
  // The maximum exponent value, above which overflow to Infinity occurs.
3404
3404
  // JavaScript numbers: 308 (1.7976931348623157e+308)
3405
- maxE: Ts,
3405
+ maxE: Bs,
3406
3406
  // 1 to EXP_LIMIT
3407
3407
  // Whether to use cryptographically-secure random number generation, if available.
3408
3408
  crypto: !1
3409
3409
  // true/false
3410
- }, go, pt, ue = !0, kn = "[DecimalError] ", Bt = kn + "Invalid argument: ", Co = kn + "Precision limit exceeded", _o = kn + "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, lt = 1e7, te = 7, wl = 9007199254740991, Sl = An.length - 1, Fs = En.length - 1, B = { toStringTag: Ao };
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 };
3411
3411
  B.absoluteValue = B.abs = function() {
3412
3412
  var i = new this.constructor(this);
3413
3413
  return i.s < 0 && (i.s = 1), J(i);
@@ -3485,7 +3485,7 @@ B.hyperbolicCosine = B.cosh = function() {
3485
3485
  var i, a, e, t, r, n = this, s = n.constructor, o = new s(1);
3486
3486
  if (!n.isFinite()) return new s(n.s ? 1 / 0 : NaN);
3487
3487
  if (n.isZero()) return o;
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 / Yn(4, i)).toString()) : (i = 16, a = "2.3283064365386962890625e-10"), n = Cr(s, 1, n.times(a), new s(1), !0);
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);
3489
3489
  for (var u, c = i, l = new s(8); c--; )
3490
3490
  u = n.times(n), n = o.minus(u.times(l.minus(u.times(l))));
3491
3491
  return J(n, s.precision = e, s.rounding = t, !0);
@@ -3496,7 +3496,7 @@ B.hyperbolicSine = B.sinh = function() {
3496
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)
3497
3497
  r = Cr(n, 2, r, r, !0);
3498
3498
  else {
3499
- i = 1.4 * Math.sqrt(t), i = i > 16 ? 16 : i | 0, r = r.times(1 / Yn(5, i)), r = Cr(n, 2, r, r, !0);
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);
3500
3500
  for (var s, o = new n(5), u = new n(16), c = new n(20); i--; )
3501
3501
  s = r.times(r), r = r.times(o.plus(s.times(u.times(s).plus(c))));
3502
3502
  }
@@ -3507,8 +3507,8 @@ B.hyperbolicTangent = B.tanh = function() {
3507
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);
3508
3508
  };
3509
3509
  B.inverseCosine = B.acos = function() {
3510
- var i, a = this, e = a.constructor, t = a.abs().cmp(1), r = e.precision, n = e.rounding;
3511
- return t !== -1 ? t === 0 ? a.isNeg() ? ct(e, r, n) : new e(0) : new e(NaN) : a.isZero() ? ct(e, r + 4, n).times(0.5) : (e.precision = r + 6, e.rounding = 1, a = a.asin(), i = ct(e, r + 4, n).times(0.5), e.precision = r, e.rounding = n, i.minus(a));
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));
3512
3512
  };
3513
3513
  B.inverseHyperbolicCosine = B.acosh = function() {
3514
3514
  var i, a, e = this, t = e.constructor;
@@ -3524,19 +3524,19 @@ B.inverseHyperbolicTangent = B.atanh = function() {
3524
3524
  };
3525
3525
  B.inverseSine = B.asin = function() {
3526
3526
  var i, a, e, t, r = this, n = r.constructor;
3527
- return r.isZero() ? new n(r) : (a = r.abs().cmp(1), e = n.precision, t = n.rounding, a !== -1 ? a === 0 ? (i = ct(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
+ 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)));
3528
3528
  };
3529
3529
  B.inverseTangent = B.atan = function() {
3530
3530
  var i, a, e, t, r, n, s, o, u, c = this, l = c.constructor, f = l.precision, h = l.rounding;
3531
3531
  if (c.isFinite()) {
3532
3532
  if (c.isZero())
3533
3533
  return new l(c);
3534
- if (c.abs().eq(1) && f + 4 <= Fs)
3535
- return s = ct(l, f + 4, h).times(0.25), s.s = c.s, s;
3534
+ if (c.abs().eq(1) && f + 4 <= ks)
3535
+ return s = mt(l, f + 4, h).times(0.25), s.s = c.s, s;
3536
3536
  } else {
3537
3537
  if (!c.s) return new l(NaN);
3538
- if (f + 4 <= Fs)
3539
- return s = ct(l, f + 4, h).times(0.5), s.s = c.s, s;
3538
+ if (f + 4 <= ks)
3539
+ return s = mt(l, f + 4, h).times(0.5), s.s = c.s, s;
3540
3540
  }
3541
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));
3542
3542
  for (ue = !1, a = Math.ceil(o / te), t = 1, u = c.times(c), s = new l(c), r = c; i !== -1; )
@@ -3584,9 +3584,9 @@ B.logarithm = B.log = function(i) {
3584
3584
  for (r = e[0]; r % 10 === 0; ) r /= 10;
3585
3585
  n = r !== 1;
3586
3586
  }
3587
- if (ue = !1, o = f + d, s = jt(c, o), t = a ? bn(l, o + 10) : jt(i, o), u = Ve(s, t, o, 1), xr(u.d, r = f, h))
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))
3588
3588
  do
3589
- if (o += 10, s = jt(c, o), t = a ? bn(l, o + 10) : jt(i, o), u = Ve(s, t, o, 1), !n) {
3589
+ if (o += 10, s = jt(c, o), t = a ? yn(l, o + 10) : jt(i, o), u = Ve(s, t, o, 1), !n) {
3590
3590
  +Ue(u.d).slice(r + 1, r + 15) + 1 == 1e14 && (u = J(u, f + 1, 0));
3591
3591
  break;
3592
3592
  }
@@ -3619,21 +3619,21 @@ B.minus = B.sub = function(i) {
3619
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;
3620
3620
  for (t = h.length; t > n; ) {
3621
3621
  if (c[--t] < h[t]) {
3622
- for (r = t; r && c[--r] === 0; ) c[r] = lt - 1;
3623
- --c[r], c[t] += lt;
3622
+ for (r = t; r && c[--r] === 0; ) c[r] = ct - 1;
3623
+ --c[r], c[t] += ct;
3624
3624
  }
3625
3625
  c[t] -= h[t];
3626
3626
  }
3627
3627
  for (; c[--s] === 0; ) c.pop();
3628
3628
  for (; c[0] === 0; c.shift()) --e;
3629
- return c[0] ? (i.d = c, i.e = $n(c, e), ue ? J(i, o, u) : i) : new _(u === 3 ? -0 : 0);
3629
+ return c[0] ? (i.d = c, i.e = Yn(c, e), ue ? J(i, o, u) : i) : new _(u === 3 ? -0 : 0);
3630
3630
  };
3631
3631
  B.modulo = B.mod = function(i) {
3632
3632
  var a, e = this, t = e.constructor;
3633
3633
  return i = new t(i), !e.d || !i.s || i.d && !i.d[0] ? new t(NaN) : !i.d || e.d && !e.d[0] ? J(new t(e), t.precision, t.rounding) : (ue = !1, t.modulo == 9 ? (a = Ve(e, i.abs(), 0, 3, 1), a.s *= i.s) : a = Ve(e, i, 0, t.modulo, 1), a = a.times(i), ue = !0, e.minus(a));
3634
3634
  };
3635
3635
  B.naturalExponential = B.exp = function() {
3636
- return ks(this);
3636
+ return $s(this);
3637
3637
  };
3638
3638
  B.naturalLogarithm = B.ln = function() {
3639
3639
  return jt(this);
@@ -3655,9 +3655,9 @@ B.plus = B.add = function(i) {
3655
3655
  e.reverse();
3656
3656
  }
3657
3657
  for (s = c.length, r = l.length, s - r < 0 && (r = s, e = l, l = c, c = e), a = 0; r; )
3658
- a = (c[--r] = c[r] + l[r] + a) / lt | 0, c[r] %= lt;
3658
+ a = (c[--r] = c[r] + l[r] + a) / ct | 0, c[r] %= ct;
3659
3659
  for (a && (c.unshift(a), ++t), s = c.length; c[--s] == 0; ) c.pop();
3660
- return i.d = c, i.e = $n(c, t), ue ? J(i, o, u) : i;
3660
+ return i.d = c, i.e = Yn(c, t), ue ? J(i, o, u) : i;
3661
3661
  };
3662
3662
  B.precision = B.sd = function(i) {
3663
3663
  var a, e = this;
@@ -3701,11 +3701,11 @@ B.times = B.mul = function(i) {
3701
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);
3702
3702
  for (t = c; --t >= 0; ) {
3703
3703
  for (a = 0, r = u + t; r > t; )
3704
- o = n[r] + d[t] * h[r - t - 1] + a, n[r--] = o % lt | 0, a = o / lt | 0;
3705
- n[r] = (n[r] + a) % lt | 0;
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;
3706
3706
  }
3707
3707
  for (; !n[--s]; ) n.pop();
3708
- return a ? ++e : n.shift(), i.d = n, i.e = $n(n, e), ue ? J(i, f.precision, f.rounding) : i;
3708
+ return a ? ++e : n.shift(), i.d = n, i.e = Yn(n, e), ue ? J(i, f.precision, f.rounding) : i;
3709
3709
  };
3710
3710
  B.toBinary = function(i, a) {
3711
3711
  return Ea(this, 2, i, a);
@@ -3768,7 +3768,7 @@ B.toPower = B.pow = function(i) {
3768
3768
  if ((i.d[a] & 1) == 0 && (s = 1), o.e == 0 && o.d[0] == 1 && o.d.length == 1)
3769
3769
  return o.s = s, o;
3770
3770
  }
3771
- return e = Pe(+o, c), a = e == 0 || !isFinite(e) ? Be(c * (Math.log("0." + Ue(o.d)) / Math.LN10 + o.e + 1)) : new u(e + "").e, a > u.maxE + 1 || a < u.minE - 1 ? new u(a > 0 ? s / 0 : 0) : (ue = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = ks(i.times(jt(o, t + e)), t), r.d && (r = J(r, t + 5, 1), xr(r.d, t, n) && (a = t + 10, r = J(ks(i.times(jt(o, a + e)), a), a + 5, 1), +Ue(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = J(r, t + 1, 0)))), r.s = s, ue = !0, u.rounding = n, J(r, t, n));
3771
+ return e = Pe(+o, c), a = e == 0 || !isFinite(e) ? Be(c * (Math.log("0." + Ue(o.d)) / Math.LN10 + o.e + 1)) : new u(e + "").e, a > u.maxE + 1 || a < u.minE - 1 ? new u(a > 0 ? s / 0 : 0) : (ue = !1, u.rounding = o.s = 1, e = Math.min(12, (a + "").length), r = $s(i.times(jt(o, t + e)), t), r.d && (r = J(r, t + 5, 1), xr(r.d, t, n) && (a = t + 10, r = J($s(i.times(jt(o, a + e)), a), a + 5, 1), +Ue(r.d).slice(t + 1, t + 15) + 1 == 1e14 && (r = J(r, t + 1, 0)))), r.s = s, ue = !0, u.rounding = n, J(r, t, n));
3772
3772
  };
3773
3773
  B.toPrecision = function(i, a) {
3774
3774
  var e, t = this, r = t.constructor;
@@ -3812,7 +3812,7 @@ function xr(i, a, e, t) {
3812
3812
  function cn(i, a, e) {
3813
3813
  for (var t, r = [0], n, s = 0, o = i.length; s < o; ) {
3814
3814
  for (n = r.length; n--; ) r[n] *= a;
3815
- for (r[0] += Bs.indexOf(i.charAt(s++)), t = 0; t < r.length; t++)
3815
+ for (r[0] += Is.indexOf(i.charAt(s++)), t = 0; t < r.length; t++)
3816
3816
  r[t] > e - 1 && (r[t + 1] === void 0 && (r[t + 1] = 0), r[t + 1] += r[t] / e | 0, r[t] %= e);
3817
3817
  }
3818
3818
  return r.reverse();
@@ -3820,7 +3820,7 @@ function cn(i, a, e) {
3820
3820
  function Dl(i, a) {
3821
3821
  var e, t, r;
3822
3822
  if (a.isZero()) return a;
3823
- t = a.d.length, t < 32 ? (e = Math.ceil(t / 3), r = (1 / Yn(4, e)).toString()) : (e = 16, r = "2.3283064365386962890625e-10"), i.precision += e, a = Cr(i, 1, a.times(r), new i(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));
3824
3824
  for (var n = e; n--; ) {
3825
3825
  var s = a.times(a);
3826
3826
  a = s.times(s).minus(s).times(8).plus(1);
@@ -3861,7 +3861,7 @@ var Ve = /* @__PURE__ */ function() {
3861
3861
  z && z[0] == 0 || !G ? ne * 0 : ne / 0
3862
3862
  )
3863
3863
  );
3864
- for (u ? (d = 1, l = t.e - r.e) : (u = lt, 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
+ 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++) ;
3865
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)
3866
3866
  R.push(1), _ = !0;
3867
3867
  else {
@@ -3913,10 +3913,10 @@ function J(i, a, e, t) {
3913
3913
  if (h == 0) {
3914
3914
  for (n = 1, s = f[0]; s >= 10; s /= 10) n++;
3915
3915
  for (s = f[0] += o, o = 1; s >= 10; s /= 10) o++;
3916
- n != o && (i.e++, f[0] == lt && (f[0] = 1));
3916
+ n != o && (i.e++, f[0] == ct && (f[0] = 1));
3917
3917
  break;
3918
3918
  } else {
3919
- if (f[h] += o, f[h] != lt) break;
3919
+ if (f[h] += o, f[h] != ct) break;
3920
3920
  f[h--] = 0, o = 1;
3921
3921
  }
3922
3922
  for (n = f.length; f[--n] === 0; ) f.pop();
@@ -3928,19 +3928,19 @@ function Ct(i, a, e) {
3928
3928
  var t, r = i.e, n = Ue(i.d), s = n.length;
3929
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;
3930
3930
  }
3931
- function $n(i, a) {
3931
+ function Yn(i, a) {
3932
3932
  var e = i[0];
3933
3933
  for (a *= te; e >= 10; e /= 10) a++;
3934
3934
  return a;
3935
3935
  }
3936
- function bn(i, a, e) {
3936
+ function yn(i, a, e) {
3937
3937
  if (a > Sl)
3938
3938
  throw ue = !0, e && (i.precision = e), Error(Co);
3939
- return J(new i(An), a, 1, !0);
3939
+ return J(new i(En), a, 1, !0);
3940
3940
  }
3941
- function ct(i, a, e) {
3942
- if (a > Fs) throw Error(Co);
3943
- return J(new i(En), a, e, !0);
3941
+ function mt(i, a, e) {
3942
+ if (a > ks) throw Error(Co);
3943
+ return J(new i(bn), a, e, !0);
3944
3944
  }
3945
3945
  function bo(i) {
3946
3946
  var a = i.length - 1, e = a * te + 1;
@@ -3969,16 +3969,16 @@ function Ci(i) {
3969
3969
  return i.d[i.d.length - 1] & 1;
3970
3970
  }
3971
3971
  function Ro(i, a, e) {
3972
- for (var t, r = new i(a[0]), n = 0; ++n < a.length; )
3973
- if (t = new i(a[n]), t.s)
3974
- r[e](t) && (r = t);
3975
- else {
3976
- 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;
3977
3975
  break;
3978
3976
  }
3979
- return r;
3977
+ t = n.cmp(r), (t === e || t === 0 && n.s === e) && (n = r);
3978
+ }
3979
+ return n;
3980
3980
  }
3981
- function ks(i, a) {
3981
+ function $s(i, a) {
3982
3982
  var e, t, r, n, s, o, u, c = 0, l = 0, f = 0, h = i.constructor, d = h.rounding, _ = h.precision;
3983
3983
  if (!i.d || !i.d[0] || i.e > 17)
3984
3984
  return new h(i.d ? i.d[0] ? i.s < 0 ? 0 : 1 / 0 : 1 : i.s ? i.s < 0 ? 0 : i : NaN);
@@ -4007,10 +4007,10 @@ function jt(i, a) {
4007
4007
  C = C.times(i), e = Ue(C.d), t = e.charAt(0), d++;
4008
4008
  n = C.e, t > 1 ? (C = new b("0." + e), n++) : C = new b(t + "." + e.slice(1));
4009
4009
  } else
4010
- return c = bn(b, l + 2, p).times(n + ""), C = jt(new b(t + "." + e.slice(1)), l - _).plus(c), b.precision = p, a == null ? J(C, p, R, ue = !0) : C;
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;
4011
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; ; ) {
4012
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))
4013
- if (u = u.times(2), n !== 0 && (u = u.plus(bn(b, l + 2, p).times(n + ""))), u = Ve(u, new b(d), l, 1), a == null)
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)
4014
4014
  if (xr(u.d, l - _, R, o))
4015
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;
4016
4016
  else
@@ -4023,7 +4023,7 @@ function jt(i, a) {
4023
4023
  function po(i) {
4024
4024
  return String(i.s * i.s / 0);
4025
4025
  }
4026
- function $s(i, a) {
4026
+ function ln(i, a) {
4027
4027
  var e, t, r;
4028
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++) ;
4029
4029
  for (r = a.length; a.charCodeAt(r - 1) === 48; --r) ;
@@ -4042,7 +4042,7 @@ function $s(i, a) {
4042
4042
  function Ll(i, a) {
4043
4043
  var e, t, r, n, s, o, u, c, l;
4044
4044
  if (a.indexOf("_") > -1) {
4045
- if (a = a.replace(/(\d)_(?=\d)/g, "$1"), Eo.test(a)) return $s(i, a);
4045
+ if (a = a.replace(/(\d)_(?=\d)/g, "$1"), Eo.test(a)) return ln(i, a);
4046
4046
  } else if (a === "Infinity" || a === "NaN")
4047
4047
  return +a || (i.s = NaN), i.e = NaN, i.d = null, i;
4048
4048
  if (Ol.test(a))
@@ -4053,14 +4053,14 @@ function Ll(i, a) {
4053
4053
  e = 8;
4054
4054
  else
4055
4055
  throw Error(Bt + a);
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, lt), l = c.length - 1, n = l; c[n] === 0; --n) c.pop();
4057
- return n < 0 ? new t(i.s * 0) : (i.e = $n(c, l), i.d = c, ue = !1, s && (i = Ve(i, r, o * 4)), u && (i = i.times(Math.abs(u) < 54 ? Pe(2, u) : P.pow(2, u))), ue = !0, i);
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);
4058
4058
  }
4059
4059
  function Pl(i, a) {
4060
4060
  var e, t = a.d.length;
4061
4061
  if (t < 3)
4062
4062
  return a.isZero() ? a : Cr(i, 2, a, a);
4063
- e = 1.4 * Math.sqrt(t), e = e > 16 ? 16 : e | 0, a = a.times(1 / Yn(5, e)), a = Cr(i, 2, a, a);
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);
4064
4064
  for (var r, n = new i(5), s = new i(16), o = new i(20); e--; )
4065
4065
  r = a.times(a), a = a.times(n.plus(r.times(s.times(r).minus(o))));
4066
4066
  return a;
@@ -4076,12 +4076,12 @@ function Cr(i, a, e, t, r) {
4076
4076
  }
4077
4077
  return ue = !0, s.d.length = l + 1, s;
4078
4078
  }
4079
- function Yn(i, a) {
4079
+ function Hn(i, a) {
4080
4080
  for (var e = i; --a; ) e *= i;
4081
4081
  return e;
4082
4082
  }
4083
4083
  function Vo(i, a) {
4084
- var e, t = a.s < 0, r = ct(i, i.precision, 1), n = r.times(0.5);
4084
+ var e, t = a.s < 0, r = mt(i, i.precision, 1), n = r.times(0.5);
4085
4085
  if (a = a.abs(), a.lte(n))
4086
4086
  return pt = t ? 4 : 1, a;
4087
4087
  if (e = a.divToInt(r), e.isZero())
@@ -4106,13 +4106,13 @@ function Ea(i, a, e, t) {
4106
4106
  for (; ++f[--e] > r - 1; )
4107
4107
  f[e] = 0, e || (++n, f.unshift(1));
4108
4108
  for (u = f.length; !f[u - 1]; --u) ;
4109
- for (s = 0, l = ""; s < u; s++) l += Bs.charAt(f[s]);
4109
+ for (s = 0, l = ""; s < u; s++) l += Is.charAt(f[s]);
4110
4110
  if (_) {
4111
4111
  if (u > 1)
4112
4112
  if (a == 16 || a == 8) {
4113
4113
  for (s = a == 16 ? 4 : 3, --u; u % s; u++) l += "0";
4114
4114
  for (f = cn(l, r, a), u = f.length; !f[u - 1]; --u) ;
4115
- for (s = 1, l = "1."; s < u; s++) l += Bs.charAt(f[s]);
4115
+ for (s = 1, l = "1."; s < u; s++) l += Is.charAt(f[s]);
4116
4116
  } else
4117
4117
  l = l.charAt(0) + "." + l.slice(1);
4118
4118
  l = l + (n < 0 ? "p" : "p+") + n;
@@ -4157,7 +4157,7 @@ function Fl(i) {
4157
4157
  function kl(i, a) {
4158
4158
  i = new this(i), a = new this(a);
4159
4159
  var e, t = this.precision, r = this.rounding, n = t + 4;
4160
- return !i.s || !a.s ? e = new this(NaN) : !i.d && !a.d ? (e = ct(this, n, 1).times(a.s > 0 ? 0.25 : 0.75), e.s = i.s) : !a.d || i.isZero() ? (e = a.s < 0 ? ct(this, t, r) : new this(0), e.s = i.s) : !i.d || a.isZero() ? (e = ct(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 = ct(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
+ 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;
4161
4161
  }
4162
4162
  function $l(i) {
4163
4163
  return new this(i).cbrt();
@@ -4169,7 +4169,7 @@ function Hl(i, a, e) {
4169
4169
  return new this(i).clamp(a, e);
4170
4170
  }
4171
4171
  function Gl(i) {
4172
- if (!i || typeof i != "object") throw Error(kn + "Object expected");
4172
+ if (!i || typeof i != "object") throw Error($n + "Object expected");
4173
4173
  var a, e, t, r = i.defaults === !0, n = [
4174
4174
  "precision",
4175
4175
  1,
@@ -4182,10 +4182,10 @@ function Gl(i) {
4182
4182
  0,
4183
4183
  "toExpPos",
4184
4184
  0,
4185
- Ts,
4185
+ Bs,
4186
4186
  "maxE",
4187
4187
  0,
4188
- Ts,
4188
+ Bs,
4189
4189
  "minE",
4190
4190
  -9e15,
4191
4191
  0,
@@ -4194,10 +4194,10 @@ function Gl(i) {
4194
4194
  9
4195
4195
  ];
4196
4196
  for (a = 0; a < n.length; a += 3)
4197
- if (e = n[a], r && (this[e] = Is[e]), (t = i[e]) !== void 0)
4197
+ if (e = n[a], r && (this[e] = Fs[e]), (t = i[e]) !== void 0)
4198
4198
  if (Be(t) === t && t >= n[a + 1] && t <= n[a + 2]) this[e] = t;
4199
4199
  else throw Error(Bt + e + ": " + t);
4200
- if (e = "crypto", r && (this[e] = Is[e]), (t = i[e]) !== void 0)
4200
+ if (e = "crypto", r && (this[e] = Fs[e]), (t = i[e]) !== void 0)
4201
4201
  if (t === !0 || t === !1 || t === 0 || t === 1)
4202
4202
  if (t)
4203
4203
  if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
@@ -4234,14 +4234,18 @@ function No(i) {
4234
4234
  for (s = 0, o = n; o >= 10; o /= 10) s++;
4235
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]);
4236
4236
  return;
4237
- } else if (n * 0 !== 0) {
4237
+ }
4238
+ if (n * 0 !== 0) {
4238
4239
  n || (c.s = NaN), c.e = NaN, c.d = null;
4239
4240
  return;
4240
4241
  }
4241
- return $s(c, n.toString());
4242
- } else if (u !== "string")
4243
- throw Error(Bt + n);
4244
- 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) ? $s(c, n) : Ll(c, n);
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);
4245
4249
  }
4246
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)
4247
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]);
@@ -4284,10 +4288,10 @@ function tf(i) {
4284
4288
  return new this(i).log(10);
4285
4289
  }
4286
4290
  function rf() {
4287
- return Ro(this, arguments, "lt");
4291
+ return Ro(this, arguments, -1);
4288
4292
  }
4289
4293
  function nf() {
4290
- return Ro(this, arguments, "gt");
4294
+ return Ro(this, arguments, 1);
4291
4295
  }
4292
4296
  function sf(i, a) {
4293
4297
  return new this(i).mod(a);
@@ -4355,9 +4359,9 @@ function Af(i) {
4355
4359
  }
4356
4360
  B[Symbol.for("nodejs.util.inspect.custom")] = B.toString;
4357
4361
  B[Symbol.toStringTag] = "Decimal";
4358
- var P = B.constructor = No(Is);
4359
- An = new P(An);
4362
+ var P = B.constructor = No(Fs);
4360
4363
  En = new P(En);
4364
+ bn = new P(bn);
4361
4365
  function Ef(i, a) {
4362
4366
  const e = i + a;
4363
4367
  return Number.isSafeInteger(e) ? e : new P(i).add(a).toNumber();
@@ -4375,18 +4379,18 @@ function yf(i, a) {
4375
4379
  return Number.isSafeInteger(e) ? e : new P(i).div(a).toNumber();
4376
4380
  }
4377
4381
  function vt(i, a) {
4378
- const e = 10 ** Math.trunc(a), t = Hn(i, e);
4382
+ const e = 10 ** Math.trunc(a), t = Gn(i, e);
4379
4383
  return Math.round(Vr(i, e) + t) / e;
4380
4384
  }
4381
4385
  function We(i, a) {
4382
- const e = 10 ** Math.trunc(a), t = Hn(i, e);
4386
+ const e = 10 ** Math.trunc(a), t = Gn(i, e);
4383
4387
  return Math.floor(Vr(i, e) + t) / e;
4384
4388
  }
4385
4389
  function Ye(i, a) {
4386
- const e = 10 ** Math.trunc(a), t = Hn(i, e);
4390
+ const e = 10 ** Math.trunc(a), t = Gn(i, e);
4387
4391
  return Math.ceil(Vr(i, e) - t) / e;
4388
4392
  }
4389
- function Hn(i, a) {
4393
+ function Gn(i, a) {
4390
4394
  return Number.EPSILON * Math.max(1, Math.abs(Vr(i, a)));
4391
4395
  }
4392
4396
  function Ei(i, a) {
@@ -4426,9 +4430,9 @@ function Sf(i, a = 12, e = 1e-10) {
4426
4430
  function Df(i) {
4427
4431
  return i - Math.trunc(i);
4428
4432
  }
4429
- const In = class In extends kt {
4433
+ const Fn = class Fn extends kt {
4430
4434
  static create() {
4431
- return this._instance = this._instance || new In(0), this._instance;
4435
+ return this._instance = this._instance || new Fn(0), this._instance;
4432
4436
  }
4433
4437
  isNull() {
4434
4438
  return !0;
@@ -4548,8 +4552,8 @@ const In = class In extends kt {
4548
4552
  return T.create(!1);
4549
4553
  }
4550
4554
  };
4551
- A(In, "_instance");
4552
- let ie = In;
4555
+ A(Fn, "_instance");
4556
+ let ie = Fn;
4553
4557
  const qt = class qt extends kt {
4554
4558
  constructor(e) {
4555
4559
  super(e);
@@ -4694,7 +4698,7 @@ const qt = class qt extends kt {
4694
4698
  return this._convertToNumber().ceil(e);
4695
4699
  }
4696
4700
  convertToNumberObjectValue() {
4697
- return Qn(this.getValue());
4701
+ return Wn(this.getValue());
4698
4702
  }
4699
4703
  convertToBooleanObjectValue() {
4700
4704
  return this;
@@ -5102,7 +5106,7 @@ class y extends kt {
5102
5106
  return this;
5103
5107
  }
5104
5108
  convertToBooleanObjectValue() {
5105
- return Gn(!0);
5109
+ return Qn(!0);
5106
5110
  }
5107
5111
  _compareInfinity(e, t, r) {
5108
5112
  let n = !1;
@@ -5221,7 +5225,7 @@ class j extends kt {
5221
5225
  }
5222
5226
  }
5223
5227
  convertToNumberObjectValue() {
5224
- return Qn(this.getValue());
5228
+ return Wn(this.getValue());
5225
5229
  }
5226
5230
  convertToBooleanObjectValue() {
5227
5231
  return T.create(!0);
@@ -5231,7 +5235,7 @@ class j extends kt {
5231
5235
  return T.create(n);
5232
5236
  }
5233
5237
  }
5234
- function Gn(i) {
5238
+ function Qn(i) {
5235
5239
  if (typeof i == "boolean")
5236
5240
  return T.create(i);
5237
5241
  let a = !1;
@@ -5246,7 +5250,7 @@ function Pf(i) {
5246
5250
  let a = i.toString();
5247
5251
  return a.charAt(0) === '"' && a.charAt(a.length - 1) === '"' && (a = a.slice(1, -1), a = a.replace(/""/g, '"')), j.create(a);
5248
5252
  }
5249
- function Qn(i, a = "") {
5253
+ function Wn(i, a = "") {
5250
5254
  if (typeof i == "boolean") {
5251
5255
  let e = 0;
5252
5256
  return i && (e = 1), y.create(e, a);
@@ -5602,7 +5606,7 @@ class q extends kt {
5602
5606
  * @returns
5603
5607
  */
5604
5608
  _binarySearch(e, t, r, n = Wt.MIN, s = Le.MIN) {
5605
- const o = _n(), u = Number(e.getValue()), c = !Number.isNaN(u);
5609
+ const o = An(), u = Number(e.getValue()), c = !Number.isNaN(u);
5606
5610
  let l = 0, f = t.length - 1, h = -1, d = -1, _ = -1;
5607
5611
  for (; l <= f; ) {
5608
5612
  const C = Math.floor((l + f) / 2), E = t[C];
@@ -5951,7 +5955,7 @@ class q extends kt {
5951
5955
  this._flattenCache = null, this._sliceCache.clear();
5952
5956
  }
5953
5957
  _sort(e) {
5954
- const t = _n();
5958
+ const t = An();
5955
5959
  return (r, n) => {
5956
5960
  const s = r[e], o = n[e];
5957
5961
  return s == null ? 1 : o == null ? -1 : s.isError() && s.isError() ? 0 : s.isError() ? 1 : o.isError() ? -1 : t(
@@ -6263,7 +6267,7 @@ class Vt {
6263
6267
  if (yr.has(e))
6264
6268
  return g.create(e);
6265
6269
  if (e === er.TRUE || e === er.FALSE)
6266
- return Gn(a);
6270
+ return Qn(a);
6267
6271
  if (Q(a))
6268
6272
  return y.create(Number(a));
6269
6273
  const { isNumberPattern: t, value: r, pattern: n } = Al(a);
@@ -6272,15 +6276,15 @@ class Vt {
6272
6276
  const s = a.replace(/\n/g, "").replace(/\r/g, "");
6273
6277
  return !Uf(s) && xc(s) ? q.create(s) : Pf(a);
6274
6278
  }
6275
- return typeof a == "number" ? Qn(a) : g.create(m.VALUE);
6279
+ return typeof a == "number" ? Wn(a) : g.create(m.VALUE);
6276
6280
  }
6277
6281
  }
6278
6282
  function Uf(i) {
6279
6283
  const a = i.trim();
6280
6284
  return a.startsWith('"') && a.endsWith('"');
6281
6285
  }
6282
- const vf = 1e4, yn = new Nt(vf);
6283
- class Wn extends Fn {
6286
+ const vf = 1e4, Rn = new Nt(vf);
6287
+ class qn extends kn {
6284
6288
  constructor(e) {
6285
6289
  super();
6286
6290
  A(this, "_forcedSheetId", "");
@@ -6521,9 +6525,9 @@ class Wn extends Fn {
6521
6525
  return g.create(t);
6522
6526
  if (e.t === Rt.NUMBER) {
6523
6527
  const r = this._getPatternByCell(e);
6524
- return lc(r) ? j.create(t.toString()) : Qn(t, r);
6528
+ return lc(r) ? j.create(t.toString()) : Wn(t, r);
6525
6529
  }
6526
- return e.t === Rt.STRING || e.t === Rt.FORCE_STRING ? j.create(t.toString()) : e.t === Rt.BOOLEAN ? Gn(t) : Vt.create(t);
6530
+ return e.t === Rt.STRING || e.t === Rt.FORCE_STRING ? j.create(t.toString()) : e.t === Rt.BOOLEAN ? Qn(t) : Vt.create(t);
6527
6531
  }
6528
6532
  _getPatternByCell(e) {
6529
6533
  var n;
@@ -6591,7 +6595,7 @@ class Wn extends Fn {
6591
6595
  }
6592
6596
  toArrayValueObject(e = !0) {
6593
6597
  var _;
6594
- const { startRow: t, endRow: r, startColumn: n, endColumn: s } = this.getRangePosition(), o = `${this.getUnitId()}_${this.getSheetId()}_${t}_${r}_${n}_${s}`, u = yn.get(o);
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);
6595
6599
  if (u && e)
6596
6600
  return u;
6597
6601
  const c = r - t + 1, l = s - n + 1;
@@ -6611,7 +6615,7 @@ class Wn extends Fn {
6611
6615
  row: t,
6612
6616
  column: n
6613
6617
  }, d = q.create(h);
6614
- return e && yn.set(o, d), d;
6618
+ return e && Rn.set(o, d), d;
6615
6619
  }
6616
6620
  toUnitRange() {
6617
6621
  return {
@@ -6636,7 +6640,7 @@ class Wn extends Fn {
6636
6640
  return q.create(e);
6637
6641
  }
6638
6642
  }
6639
- class Tf extends Fn {
6643
+ class Tf extends kn {
6640
6644
  constructor(a) {
6641
6645
  super(), this._promise = a;
6642
6646
  }
@@ -6647,7 +6651,7 @@ class Tf extends Fn {
6647
6651
  return this._promise;
6648
6652
  }
6649
6653
  }
6650
- class Bf extends Fn {
6654
+ class Bf extends kn {
6651
6655
  constructor(a) {
6652
6656
  super(), this._promiseList = a;
6653
6657
  }
@@ -6677,7 +6681,7 @@ class Bf extends Fn {
6677
6681
  return q.create(e);
6678
6682
  }
6679
6683
  }
6680
- class Rn extends Wn {
6684
+ class pn extends qn {
6681
6685
  constructor(a, e, t) {
6682
6686
  super(""), this.setRangeData(a), e && this.setForcedSheetIdDirect(e), t && this.setForcedUnitIdDirect(t);
6683
6687
  }
@@ -6685,7 +6689,7 @@ class Rn extends Wn {
6685
6689
  return !0;
6686
6690
  }
6687
6691
  }
6688
- class ba extends Wn {
6692
+ class ba extends qn {
6689
6693
  constructor(a) {
6690
6694
  super(a);
6691
6695
  const e = mr(a);
@@ -6710,7 +6714,7 @@ class ba extends Wn {
6710
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;
6711
6715
  }
6712
6716
  _createRange(a) {
6713
- const e = new Rn(
6717
+ const e = new pn(
6714
6718
  a,
6715
6719
  this.getForcedSheetId(),
6716
6720
  this.getForcedUnitId()
@@ -6724,7 +6728,7 @@ class ba extends Wn {
6724
6728
  return s && e.setForcedUnitIdDirect(s), e;
6725
6729
  }
6726
6730
  }
6727
- class ya extends Wn {
6731
+ class ya extends qn {
6728
6732
  constructor(a) {
6729
6733
  super(a);
6730
6734
  const e = mr(a);
@@ -6755,7 +6759,7 @@ class ya extends Wn {
6755
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;
6756
6760
  }
6757
6761
  }
6758
- class Ra extends Wn {
6762
+ class Ra extends qn {
6759
6763
  constructor(a) {
6760
6764
  super(a);
6761
6765
  const e = mr(a);
@@ -6845,7 +6849,7 @@ function pa(i) {
6845
6849
  }
6846
6850
  return [$.EQUALS, Vt.create(i)];
6847
6851
  }
6848
- function qn(i, a, e, t) {
6852
+ function Kn(i, a, e, t) {
6849
6853
  if (!e)
6850
6854
  if (a.isString()) {
6851
6855
  const r = `${a.getValue()}`, [n, s] = pa(r);
@@ -6858,7 +6862,7 @@ function If(i, a) {
6858
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);
6859
6863
  return r.mapValue((s, o, u) => {
6860
6864
  const c = n.get(o, u);
6861
- return s != null && s.isError() ? s : c != null && c.isError() ? c : s != null && s.isBoolean() && (c != null && c.isBoolean()) ? Gn(s.getValue() && c.getValue()) : T.create(!1);
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);
6862
6866
  });
6863
6867
  }
6864
6868
  function Ff(i) {
@@ -6950,8 +6954,8 @@ function kr(i, a, e, t = !1) {
6950
6954
  O(a, e, o, g.create(m.NA)).iterator((c, l, f) => {
6951
6955
  if (!c)
6952
6956
  return;
6953
- let h = qn(s, c);
6954
- if (t && (h = Kn(h, s, c)), r[l] === void 0 && (r[l] = []), r[l][f] === void 0) {
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) {
6955
6959
  r[l][f] = h;
6956
6960
  return;
6957
6961
  }
@@ -6960,7 +6964,7 @@ function kr(i, a, e, t = !1) {
6960
6964
  }
6961
6965
  return r;
6962
6966
  }
6963
- function Kn(i, a, e) {
6967
+ function Xn(i, a, e) {
6964
6968
  const [t, r] = pa(`${e.getValue()}`);
6965
6969
  return i.mapValue((n, s, o) => {
6966
6970
  const u = a.get(s, o);
@@ -6989,7 +6993,7 @@ function kf(i, a) {
6989
6993
  const e = i.isString() && i.getValue() === "", t = a.isString() && a.getValue() === "";
6990
6994
  return !!((e || i.isNull()) && (t || a.isNull()) || i.isString() && !e && a.isString() && !t);
6991
6995
  }
6992
- var ln = /* @__PURE__ */ ((i) => (i[i.CELL = 0] = "CELL", i[i.COLUMN = 1] = "COLUMN", i[i.ROW = 2] = "ROW", i))(ln || {});
6996
+ var fn = /* @__PURE__ */ ((i) => (i[i.CELL = 0] = "CELL", i[i.COLUMN = 1] = "COLUMN", i[i.ROW = 2] = "ROW", i))(fn || {});
6993
6997
  function $f(i, a) {
6994
6998
  let e;
6995
6999
  switch (a) {
@@ -7608,7 +7612,7 @@ var Te = /* @__PURE__ */ ((i) => (i.COMPARE = "COMPARE", i.DIVIDED = "DIVIDED",
7608
7612
  (s = i[n]) && (r = s(r) || r);
7609
7613
  return r;
7610
7614
  }, Vi = (i, a) => (e, t) => a(e, t, i);
7611
- class pn extends Ge {
7615
+ class Vn extends Ge {
7612
7616
  constructor(a, e, t) {
7613
7617
  super(e), this._runtimeService = a, this._operatorString = e, this._functionExecutor = t;
7614
7618
  }
@@ -7634,7 +7638,7 @@ class pn extends Ge {
7634
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);
7635
7639
  }
7636
7640
  }
7637
- let Vn = class extends Et {
7641
+ let Nn = class extends Et {
7638
7642
  constructor(i, a) {
7639
7643
  super(), this._functionService = i, this._runtimeService = a;
7640
7644
  }
@@ -7650,15 +7654,15 @@ let Vn = class extends Et {
7650
7654
  let t = "";
7651
7655
  if (e === Me.MINUS)
7652
7656
  t = Te.MINUS;
7653
- else return e === Me.AT ? new pn(this._runtimeService, e) : void 0;
7657
+ else return e === Me.AT ? new Vn(this._runtimeService, e) : void 0;
7654
7658
  const r = this._functionService.getExecutor(t);
7655
- return r ? new pn(this._runtimeService, e, r) : (console.error(`No function ${a}`), xe.create(m.NAME));
7659
+ return r ? new Vn(this._runtimeService, e, r) : (console.error(`No function ${a}`), xe.create(m.NAME));
7656
7660
  }
7657
7661
  };
7658
- Vn = Zf([
7662
+ Nn = Zf([
7659
7663
  Vi(0, Yt),
7660
7664
  Vi(1, Ot)
7661
- ], Vn);
7665
+ ], Nn);
7662
7666
  new RegExp(Me.MINUS, "g");
7663
7667
  new RegExp(Me.AT, "g");
7664
7668
  function So(i, a, e) {
@@ -7667,9 +7671,9 @@ function So(i, a, e) {
7667
7671
  let o = 0;
7668
7672
  if (s[0] === Me.MINUS) {
7669
7673
  const u = a.getExecutor(Te.MINUS);
7670
- t = new pn(e, Me.MINUS, u), o++;
7674
+ t = new Vn(e, Me.MINUS, u), o++;
7671
7675
  }
7672
- return s[0] === Me.AT && (r = new pn(e, Me.AT), t && r.setParent(t), o++), o > 0 && (n = n.slice(o)), { tokenTrim: n, minusPrefixNode: t, atPrefixNode: r };
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 };
7673
7677
  }
7674
7678
  var zf = Object.getOwnPropertyDescriptor, Jf = (i, a, e, t) => {
7675
7679
  for (var r = t > 1 ? void 0 : t ? zf(a, e) : a, n = i.length - 1, s; n >= 0; n--)
@@ -7835,7 +7839,7 @@ class th extends Ge {
7835
7839
  this.setValue(g.create(m.NAME));
7836
7840
  }
7837
7841
  }
7838
- let Nn = class extends Et {
7842
+ let On = class extends Et {
7839
7843
  constructor(i, a, e, t, r, n) {
7840
7844
  super(), this._functionService = i, this._currentConfigService = a, this._runtimeService = e, this._definedNamesService = t, this._injector = r, this._formulaDataModel = n;
7841
7845
  }
@@ -7870,14 +7874,14 @@ let Nn = class extends Et {
7870
7874
  return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken()) === K.COLON;
7871
7875
  }
7872
7876
  };
7873
- Nn = Jf([
7877
+ On = Jf([
7874
7878
  ir(0, Yt),
7875
7879
  ir(1, Ft),
7876
7880
  ir(2, Ot),
7877
7881
  ir(3, pr),
7878
7882
  ir(4, ye(Qi)),
7879
7883
  ir(5, ye(gr))
7880
- ], Nn);
7884
+ ], On);
7881
7885
  var rh = Object.getOwnPropertyDescriptor, nh = (i, a, e, t) => {
7882
7886
  for (var r = t > 1 ? void 0 : t ? rh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
7883
7887
  (s = i[n]) && (r = s(r) || r);
@@ -8099,7 +8103,7 @@ class uh extends Ge {
8099
8103
  // return Promise.resolve(AstNodePromiseType.SUCCESS);
8100
8104
  // }
8101
8105
  }
8102
- let On = class extends Et {
8106
+ let Mn = class extends Et {
8103
8107
  constructor(i, a) {
8104
8108
  super(), this._runtimeService = i, this._interpreter = a;
8105
8109
  }
@@ -8137,10 +8141,10 @@ let On = class extends Et {
8137
8141
  Va(i, a, e);
8138
8142
  }
8139
8143
  };
8140
- On = oh([
8144
+ Mn = oh([
8141
8145
  Ni(0, Ot),
8142
8146
  Ni(1, ye(_r))
8143
- ], On);
8147
+ ], Mn);
8144
8148
  function Po(i) {
8145
8149
  if (!i)
8146
8150
  return;
@@ -8227,7 +8231,7 @@ class gh extends Ge {
8227
8231
  );
8228
8232
  }
8229
8233
  }
8230
- let Mn = class extends Et {
8234
+ let wn = class extends Et {
8231
8235
  constructor(i) {
8232
8236
  super(), this._functionService = i;
8233
8237
  }
@@ -8249,15 +8253,15 @@ let Mn = class extends Et {
8249
8253
  return this.create(a);
8250
8254
  }
8251
8255
  };
8252
- Mn = hh([
8256
+ wn = hh([
8253
8257
  mh(0, Yt)
8254
- ], Mn);
8258
+ ], wn);
8255
8259
  var dh = Object.getOwnPropertyDescriptor, Ch = (i, a, e, t) => {
8256
8260
  for (var r = t > 1 ? void 0 : t ? dh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
8257
8261
  (s = i[n]) && (r = s(r) || r);
8258
8262
  return r;
8259
- }, gs = (i, a) => (e, t) => a(e, t, i);
8260
- class ds extends Ge {
8263
+ }, ds = (i, a) => (e, t) => a(e, t, i);
8264
+ class Cs extends Ge {
8261
8265
  constructor(e, t, r, n, s = !1) {
8262
8266
  super(r);
8263
8267
  A(this, "_refOffsetX", 0);
@@ -8283,7 +8287,7 @@ class ds extends Ge {
8283
8287
  };
8284
8288
  }
8285
8289
  }
8286
- let wn = class extends Et {
8290
+ let Sn = class extends Et {
8287
8291
  constructor(i, a, e) {
8288
8292
  super(), this._currentConfigService = i, this._formulaRuntimeService = a, this._functionService = e;
8289
8293
  }
@@ -8298,7 +8302,7 @@ let wn = class extends Et {
8298
8302
  if (!a && s.charAt(0) === '"' && s.charAt(s.length - 1) === '"')
8299
8303
  return;
8300
8304
  let c;
8301
- if (Br(s) ? c = new ds(r, n, s, ln.CELL, t) : a && this._checkParentIsUnionOperator(i) && (Ji(s) ? c = new ds(r, n, s, ln.ROW, t) : eo(s) && (c = new ds(r, n, s, ln.COLUMN, t))), c)
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)
8302
8306
  return u ? c.setParent(u) : o && c.setParent(o), c;
8303
8307
  }
8304
8308
  _checkParentIsUnionOperator(i) {
@@ -8306,16 +8310,16 @@ let wn = class extends Et {
8306
8310
  return ((e = (a = i.getParent()) == null ? void 0 : a.getParent()) == null ? void 0 : e.getToken().trim()) === K.COLON;
8307
8311
  }
8308
8312
  };
8309
- wn = Ch([
8310
- gs(0, Ft),
8311
- gs(1, Ot),
8312
- gs(2, Yt)
8313
- ], wn);
8313
+ Sn = Ch([
8314
+ ds(0, Ft),
8315
+ ds(1, Ot),
8316
+ ds(2, Yt)
8317
+ ], Sn);
8314
8318
  var _h = Object.getOwnPropertyDescriptor, Ah = (i, a, e, t) => {
8315
8319
  for (var r = t > 1 ? void 0 : t ? _h(a, e) : a, n = i.length - 1, s; n >= 0; n--)
8316
8320
  (s = i[n]) && (r = s(r) || r);
8317
8321
  return r;
8318
- }, Cs = (i, a) => (e, t) => a(e, t, i);
8322
+ }, _s = (i, a) => (e, t) => a(e, t, i);
8319
8323
  class Oi extends Ge {
8320
8324
  constructor(a, e, t, r) {
8321
8325
  super(t), this._currentConfigService = a, this._lexer = e, this._operatorString = t, this._functionExecutor = r;
@@ -8346,7 +8350,7 @@ class Oi extends Ge {
8346
8350
  return o && this._lexer.treeBuilder(o), g.create(m.VALUE);
8347
8351
  }
8348
8352
  }
8349
- let Sn = class extends Et {
8353
+ let Dn = class extends Et {
8350
8354
  constructor(i, a, e) {
8351
8355
  super(), this._functionService = i, this._lexer = a, this._currentConfigService = e;
8352
8356
  }
@@ -8367,11 +8371,11 @@ let Sn = class extends Et {
8367
8371
  return t ? new Oi(this._currentConfigService, this._lexer, a, t) : (console.error(`No function ${i}`), xe.create(m.NAME));
8368
8372
  }
8369
8373
  };
8370
- Sn = Ah([
8371
- Cs(0, Yt),
8372
- Cs(1, ye(dr)),
8373
- Cs(2, Ft)
8374
- ], Sn);
8374
+ Dn = Ah([
8375
+ _s(0, Yt),
8376
+ _s(1, ye(dr)),
8377
+ _s(2, Ft)
8378
+ ], Dn);
8375
8379
  var Eh = Object.getOwnPropertyDescriptor, bh = (i, a, e, t) => {
8376
8380
  for (var r = t > 1 ? void 0 : t ? Eh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
8377
8381
  (s = i[n]) && (r = s(r) || r);
@@ -8395,7 +8399,7 @@ class Rh extends Ge {
8395
8399
  return a.isError() || e.isError() || !a.isReferenceObject() || !e.isReferenceObject() ? g.create(m.REF) : (a = a, e = e, Yf(a, e));
8396
8400
  }
8397
8401
  }
8398
- let Dn = class extends Et {
8402
+ let Ln = class extends Et {
8399
8403
  constructor(i) {
8400
8404
  super(), this._functionService = i;
8401
8405
  }
@@ -8413,9 +8417,9 @@ let Dn = class extends Et {
8413
8417
  return this.create(e);
8414
8418
  }
8415
8419
  };
8416
- Dn = bh([
8420
+ Ln = bh([
8417
8421
  yh(0, Yt)
8418
- ], Dn);
8422
+ ], Ln);
8419
8423
  class ph extends Ge {
8420
8424
  constructor(a) {
8421
8425
  super(a);
@@ -8521,7 +8525,7 @@ let Ur = class extends Ne {
8521
8525
  const f = this._changeLetToLambda(a);
8522
8526
  return f != null ? this._parse(f, e) : xe.create(m.ERROR);
8523
8527
  }
8524
- if (o === ht) {
8528
+ if (o === ft) {
8525
8529
  if (s = e, r === 0)
8526
8530
  return new lh(Ut).setParent(e), s;
8527
8531
  } else {
@@ -8542,7 +8546,7 @@ let Ur = class extends Ne {
8542
8546
  continue;
8543
8547
  let d = null;
8544
8548
  if (h instanceof ae) {
8545
- if (h.getToken() === ht && h.getChildren().length === 0) {
8549
+ if (h.getToken() === ft && h.getChildren().length === 0) {
8546
8550
  const _ = (l = h.getParent()) == null ? void 0 : l.getChildren();
8547
8551
  if (_ && _.length === 1)
8548
8552
  return xe.create(m.NAME);
@@ -8634,14 +8638,14 @@ let Ur = class extends Ne {
8634
8638
  Ur = Nh([
8635
8639
  ot(0, Ot),
8636
8640
  ot(1, ye(Mo)),
8637
- ot(2, ye(Nn)),
8638
- ot(3, ye(On)),
8641
+ ot(2, ye(On)),
8642
+ ot(3, ye(Mn)),
8639
8643
  ot(4, ye(xo)),
8640
- ot(5, ye(Mn)),
8641
- ot(6, ye(Vn)),
8642
- ot(7, ye(wn)),
8643
- ot(8, ye(Sn)),
8644
- ot(9, ye(Dn)),
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)),
8645
8649
  ot(10, ye(jo))
8646
8650
  ], Ur);
8647
8651
  class Oh extends Ne {
@@ -8656,7 +8660,7 @@ class Oh extends Ne {
8656
8660
  A(this, "_definedNameMap", /* @__PURE__ */ new Map());
8657
8661
  // unitId -> definedName -> treeId
8658
8662
  A(this, "_otherFormulaDataMainData", /* @__PURE__ */ new Set());
8659
- A(this, "_dependencyRTreeCache", new ps());
8663
+ A(this, "_dependencyRTreeCache", new Vs());
8660
8664
  A(this, "_dependencyTreeIdLast", 0);
8661
8665
  }
8662
8666
  buildDependencyTree(e, t) {
@@ -8988,7 +8992,7 @@ class Mh extends Oh {
8988
8992
  this._allTreeMap.set(e.treeId, e);
8989
8993
  }
8990
8994
  }
8991
- const Xn = et(
8995
+ const Zn = et(
8992
8996
  "univer.formula.dependency-manager.service"
8993
8997
  );
8994
8998
  class wh extends Ne {
@@ -9253,7 +9257,7 @@ class Mi extends Uo {
9253
9257
  return this.refTree == null ? "" : this.refTree.formulaId;
9254
9258
  }
9255
9259
  }
9256
- class _s extends Uo {
9260
+ class As extends Uo {
9257
9261
  constructor(e) {
9258
9262
  super();
9259
9263
  A(this, "isCache", !1);
@@ -9403,7 +9407,7 @@ let qs = class extends Ne {
9403
9407
  constructor(a, e, t, r, n, s, o, u) {
9404
9408
  super();
9405
9409
  A(this, "_updateRangeFlattenCache", /* @__PURE__ */ new Map());
9406
- A(this, "_dependencyRTreeCacheForAddressFunction", new ps());
9410
+ A(this, "_dependencyRTreeCacheForAddressFunction", new Vs());
9407
9411
  A(this, "_executedAddressFunctionNodeIds", /* @__PURE__ */ new Set());
9408
9412
  this._currentConfigService = a, this._runtimeService = e, this._otherFormulaManagerService = t, this._featureCalculationManagerService = r, this._interpreter = n, this._astTreeBuilder = s, this._lexer = o, this._dependencyManagerService = u;
9409
9413
  }
@@ -9584,7 +9588,7 @@ let qs = class extends Ne {
9584
9588
  });
9585
9589
  }
9586
9590
  _getFeatureFormulaTree(a, e, t) {
9587
- const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || or(this._dependencyManagerService), c = new _s(u);
9591
+ const { unitId: r, subUnitId: n, dependencyRanges: s, getDirtyData: o } = t, u = e || or(this._dependencyManagerService), c = new As(u);
9588
9592
  c.unitId = r, c.subUnitId = n, c.rangeList = s, c.getDirtyData = o;
9589
9593
  const l = o(this._currentConfigService.getDirtyData(), this._runtimeService.getAllRuntimeData()), f = this._convertDirtyRangesToUnitRange(l.dirtyRanges);
9590
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;
@@ -9604,7 +9608,7 @@ let qs = class extends Ne {
9604
9608
  const f = this._dependencyManagerService.hasOtherFormulaDataMainData(l), h = u[l], { f: d, ranges: _ } = h;
9605
9609
  let C = !1;
9606
9610
  f && (C = !0);
9607
- const E = pi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: b, firstColumn: R } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), N = (p == null ? void 0 : p.getValue(0, 0)) || or(this._dependencyManagerService), M = new _s(N);
9611
+ const E = pi(r, d, this._lexer, this._astTreeBuilder, this._currentConfigService), { firstRow: b, firstColumn: R } = this._getFirstCellOfRange(_), p = this._dependencyManagerService.getOtherFormulaDependency(r, o, l), N = (p == null ? void 0 : p.getValue(0, 0)) || or(this._dependencyManagerService), M = new As(N);
9608
9612
  for (let w = 0; w < _.length; w++) {
9609
9613
  const S = _[w], { startRow: D, startColumn: L, endRow: U, endColumn: x } = S;
9610
9614
  for (let F = D; F <= U; F++)
@@ -9665,7 +9669,7 @@ let qs = class extends Ne {
9665
9669
  }
9666
9670
  }
9667
9671
  _createFDtree(a, e, t, r, n, s) {
9668
- const { f: o, x: u = 0, y: c = 0 } = s, l = new _s(or(this._dependencyManagerService)), f = n[a][e], h = pi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
9672
+ const { f: o, x: u = 0, y: c = 0 } = s, l = new As(or(this._dependencyManagerService)), f = n[a][e], h = pi(a, o, this._lexer, this._astTreeBuilder, this._currentConfigService);
9669
9673
  return l.node = h, l.formula = o, l.unitId = a, l.subUnitId = e, l.row = t, l.column = r, l.rowCount = f.rowCount, l.columnCount = f.columnCount, l;
9670
9674
  }
9671
9675
  _createVirtualFDtree(a, e) {
@@ -9761,7 +9765,7 @@ let qs = class extends Ne {
9761
9765
  u.length !== 0 && await this._calculateAddressFunctionRuntimeData(a, u);
9762
9766
  }
9763
9767
  async _calculateListByFunctionRefNode(a) {
9764
- const e = new ps();
9768
+ const e = new Vs();
9765
9769
  for (let t = 0, r = a.length; t < r; t++) {
9766
9770
  const n = a[t];
9767
9771
  e.insert({
@@ -9997,7 +10001,7 @@ qs = Lh([
9997
10001
  St(4, ye(_r)),
9998
10002
  St(5, ye(Ur)),
9999
10003
  St(6, ye(dr)),
10000
- St(7, Xn)
10004
+ St(7, Zn)
10001
10005
  ], qs);
10002
10006
  var Ph = Object.getOwnPropertyDescriptor, xh = (i, a, e, t) => {
10003
10007
  for (var r = t > 1 ? void 0 : t ? Ph(a, e) : a, n = i.length - 1, s; n >= 0; n--)
@@ -10015,7 +10019,7 @@ let Xs = class extends Ne {
10015
10019
  this._configService = a, this._lexer = e, this._currentConfigService = t, this._runtimeService = r, this._formulaDependencyGenerator = n, this._interpreter = s, this._astTreeBuilder = o;
10016
10020
  }
10017
10021
  dispose() {
10018
- super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(), yn.clear(), bt.clear(), js.clear(), Ys.clear();
10022
+ super.dispose(), this._executionInProgressListener$.complete(), this._executionCompleteListener$.complete(), Rn.clear(), bt.clear(), Us.clear(), Ys.clear();
10019
10023
  }
10020
10024
  /**
10021
10025
  * Stop the execution of the formula.
@@ -10039,7 +10043,7 @@ let Xs = class extends Ne {
10039
10043
  async execute(a) {
10040
10044
  this._runtimeService.setFormulaExecuteStage(Xe.START), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._currentConfigService.load(a), this._runtimeService.reset();
10041
10045
  const e = a.maxIteration || fo;
10042
- for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._execute(), yn.clear(), !!this._runtimeService.isCycleDependency()); t++)
10046
+ for (let t = 0; t < e && (this._runtimeService.setFormulaCycleIndex(t), await this._execute(), Rn.clear(), !!this._runtimeService.isCycleDependency()); t++)
10043
10047
  ;
10044
10048
  this._runtimeService.setFormulaExecuteStage(Xe.CALCULATION_COMPLETED), this._executionInProgressListener$.next(this._runtimeService.getRuntimeState()), this._executionCompleteListener$.next(this._runtimeService.getAllRuntimeData()), bt.clear(), this._runtimeService.reset();
10045
10049
  }
@@ -10139,8 +10143,8 @@ var Uh = Object.getOwnPropertyDescriptor, vh = (i, a, e, t) => {
10139
10143
  for (var r = t > 1 ? void 0 : t ? Uh(a, e) : a, n = i.length - 1, s; n >= 0; n--)
10140
10144
  (s = i[n]) && (r = s(r) || r);
10141
10145
  return r;
10142
- }, As = (i, a) => (e, t) => a(e, t, i);
10143
- let Ln = class extends Ne {
10146
+ }, Es = (i, a) => (e, t) => a(e, t, i);
10147
+ let Pn = class extends Ne {
10144
10148
  constructor(i, a, e) {
10145
10149
  super(), this._commandService = i, this._calculateFormulaService = a, this._formulaDataModel = e, this._initialize();
10146
10150
  }
@@ -10155,7 +10159,7 @@ let Ln = class extends Ne {
10155
10159
  else if (i.id === so.id) {
10156
10160
  const a = i.params;
10157
10161
  this._calculate(a);
10158
- } else if (i.id === Ns.id) {
10162
+ } else if (i.id === Os.id) {
10159
10163
  const a = i.params;
10160
10164
  if (a == null)
10161
10165
  return;
@@ -10198,7 +10202,7 @@ let Ln = class extends Ne {
10198
10202
  break;
10199
10203
  }
10200
10204
  this._commandService.executeCommand(
10201
- Cn.id,
10205
+ _n.id,
10202
10206
  {
10203
10207
  functionsExecutedState: a
10204
10208
  },
@@ -10208,7 +10212,7 @@ let Ln = class extends Ne {
10208
10212
  );
10209
10213
  }), this._calculateFormulaService.executionInProgressListener$.subscribe((i) => {
10210
10214
  this._commandService.executeCommand(
10211
- Cn.id,
10215
+ _n.id,
10212
10216
  {
10213
10217
  stageInfo: i
10214
10218
  },
@@ -10225,7 +10229,7 @@ let Ln = class extends Ne {
10225
10229
  return;
10226
10230
  }
10227
10231
  t && (this._formulaDataModel.clearPreviousArrayFormulaCellData(n), this._formulaDataModel.mergeArrayFormulaCellData(r), this._formulaDataModel.mergeArrayFormulaRange(t), this._commandService.executeCommand(
10228
- Ns.id,
10232
+ Os.id,
10229
10233
  {
10230
10234
  arrayFormulaRange: this._formulaDataModel.getArrayFormulaRange(),
10231
10235
  arrayFormulaCellData: this._formulaDataModel.getArrayFormulaCellData()
@@ -10245,11 +10249,11 @@ let Ln = class extends Ne {
10245
10249
  );
10246
10250
  }
10247
10251
  };
10248
- Ln = vh([
10249
- As(0, sr),
10250
- As(1, Ks),
10251
- As(2, ye(gr))
10252
- ], Ln);
10252
+ Pn = vh([
10253
+ Es(0, sr),
10254
+ Es(1, Ks),
10255
+ Es(2, ye(gr))
10256
+ ], Pn);
10253
10257
  const wi = /[\[\]]/g;
10254
10258
  function Si(i, a) {
10255
10259
  if (wi.test(i)) {
@@ -10258,7 +10262,7 @@ function Si(i, a) {
10258
10262
  }
10259
10263
  return Number(i) - 1;
10260
10264
  }
10261
- function Es(i, a = 0, e = 0) {
10265
+ function bs(i, a = 0, e = 0) {
10262
10266
  i = i.toLocaleUpperCase();
10263
10267
  const t = i.split(/[RC]/), r = t[1], n = t[2], s = Si(r, a), o = Si(n, e);
10264
10268
  return {
@@ -10270,7 +10274,7 @@ function Es(i, a = 0, e = 0) {
10270
10274
  function Th(i, a = 0, e = 0) {
10271
10275
  const { refBody: t, sheetName: r, unitId: n } = ua(i), s = t.indexOf(":");
10272
10276
  if (s === -1) {
10273
- const C = Es(t, a, e), E = C.row, b = C.column, R = C.absoluteRefType;
10277
+ const C = bs(t, a, e), E = C.row, b = C.column, R = C.absoluteRefType;
10274
10278
  return {
10275
10279
  unitId: n,
10276
10280
  sheetName: r,
@@ -10284,7 +10288,7 @@ function Th(i, a = 0, e = 0) {
10284
10288
  }
10285
10289
  };
10286
10290
  }
10287
- const o = t.substring(0, s), u = t.substring(s + 1), c = Es(o, a, e), l = Es(u, a, e), f = c.row, h = c.column, d = l.row, _ = l.column;
10291
+ const o = t.substring(0, s), u = t.substring(s + 1), c = bs(o, a, e), l = bs(u, a, e), f = c.row, h = c.column, d = l.row, _ = l.column;
10288
10292
  return {
10289
10293
  unitId: n,
10290
10294
  sheetName: r,
@@ -10670,13 +10674,13 @@ class V {
10670
10674
  return a;
10671
10675
  }
10672
10676
  createReferenceObject(a, e) {
10673
- const t = a.getForcedUnitId(), r = a.getForcedSheetId() || "", n = a.getForcedSheetName(), o = Os({
10677
+ const t = a.getForcedUnitId(), r = a.getForcedSheetId() || "", n = a.getForcedSheetName(), o = Ms({
10674
10678
  unitId: t,
10675
10679
  sheetName: n,
10676
10680
  range: e
10677
10681
  });
10678
10682
  let u;
10679
- return Br(o) ? u = new ba(o) : Ji(o) ? u = new Ra(o) : eo(o) ? u = new ya(o) : u = new Rn(e, r, t), this._setReferenceDefault(a, u);
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);
10680
10684
  }
10681
10685
  _setReferenceDefault(a, e) {
10682
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);
@@ -11012,7 +11016,7 @@ function lr(i, a) {
11012
11016
  (t, r) => e.reduce((n, s, o) => n + s * a[o][r], 0)
11013
11017
  ));
11014
11018
  }
11015
- function mt(i) {
11019
+ function ht(i) {
11016
11020
  return i[0].map((a, e) => i.map((t) => t[e]));
11017
11021
  }
11018
11022
  function Qh(i) {
@@ -11020,7 +11024,7 @@ function Qh(i) {
11020
11024
  return a ? null : Wh(e, t);
11021
11025
  }
11022
11026
  function vo(i) {
11023
- const a = mt(i), e = a.length, t = a[0].length;
11027
+ const a = ht(i), e = a.length, t = a[0].length;
11024
11028
  let r = !0, n = !1;
11025
11029
  const s = Js(e, t, 0), o = new Array(t).fill(0).map((u, c) => c);
11026
11030
  for (let u = 0; u < t; u++) {
@@ -11098,26 +11102,26 @@ function qh(i) {
11098
11102
  const a = Kh(i);
11099
11103
  if (!a)
11100
11104
  return null;
11101
- const { matrixU: e, matrixS: t, matrixV: r } = a, n = mt(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];
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];
11102
11106
  for (let u = 0; u < t.length; u++)
11103
11107
  Math.abs(t[u]) > o && (s[u][u] = 1 / t[u]);
11104
11108
  return lr(r, lr(s, n));
11105
11109
  }
11106
11110
  function Kh(i) {
11107
- const a = mt(i), e = a.length, t = a[0].length;
11111
+ const a = ht(i), e = a.length, t = a[0].length;
11108
11112
  if (e < t)
11109
11113
  return null;
11110
11114
  const r = new Array(t).fill(0), n = new Array(t).fill(0), s = Array.from({ length: t }, () => new Array(t).fill(0));
11111
11115
  let o = Number.EPSILON, u = 0, c = 0, l = 0;
11112
11116
  for (let C = 0; C < t; C++) {
11113
- if (r[C] = u, c = bs(a, C, e, C, C), c <= 1e-64 / o)
11117
+ if (r[C] = u, c = ys(a, C, e, C, C), c <= 1e-64 / o)
11114
11118
  u = 0;
11115
11119
  else {
11116
11120
  u = Math.sqrt(c), a[C][C] >= 0 && (u = -u);
11117
11121
  const b = a[C][C] * u - c;
11118
11122
  a[C][C] -= u;
11119
11123
  for (let R = C + 1; R < t; R++) {
11120
- c = bs(a, C, e, C, R);
11124
+ c = ys(a, C, e, C, R);
11121
11125
  for (let p = C; p < e; p++)
11122
11126
  a[p][R] += c / b * a[p][C];
11123
11127
  }
@@ -11162,7 +11166,7 @@ function Kh(i) {
11162
11166
  a[C][E] = 0;
11163
11167
  if (u !== 0) {
11164
11168
  for (let E = C + 1; E < t; E++) {
11165
- c = bs(a, C + 1, e, C, E);
11169
+ c = ys(a, C + 1, e, C, E);
11166
11170
  for (let b = C; b < e; b++)
11167
11171
  a[b][E] += c / (a[C][C] * u) * a[b][C];
11168
11172
  }
@@ -11251,7 +11255,7 @@ function zr(i, a) {
11251
11255
  let e = 0;
11252
11256
  return Math.abs(i) > Math.abs(a) ? (e = a / i, Math.abs(i) * Math.sqrt(1 + e * e)) : a !== 0 ? (e = i / a, Math.abs(a) * Math.sqrt(1 + e * e)) : 0;
11253
11257
  }
11254
- function bs(i, a, e, t, r) {
11258
+ function ys(i, a, e, t, r) {
11255
11259
  let n = 0;
11256
11260
  for (let s = a; s < e; s++)
11257
11261
  n += i[s][t] * i[s][r];
@@ -11305,7 +11309,7 @@ const Jr = /* @__PURE__ */ new Map([
11305
11309
  [1, 4, 5, 9, 10, 40, 45, 49, 50, 90, 95, 99, 100, 400, 450, 490, 495, 499, 500, 900, 950, 990, 995, 999, 1e3, 4e3]
11306
11310
  ];
11307
11311
  function To(i, a, e) {
11308
- return i <= 0 ? 0 : i >= 1 ? 1 : Zn(i, a, e);
11312
+ return i <= 0 ? 0 : i >= 1 ? 1 : zn(i, a, e);
11309
11313
  }
11310
11314
  function zh(i, a, e) {
11311
11315
  return i <= 0 || i >= 1 ? 0 : a === 1 && e === 1 ? 1 : a < 512 && e < 512 ? i ** (a - 1) * (1 - i) ** (e - 1) / xa(a, e) : Math.exp((a - 1) * Math.log(i) + (e - 1) * Math.log(1 - i) - ja(a, e));
@@ -11331,13 +11335,13 @@ function Pa(i, a, e) {
11331
11335
  for (let c = 0; c < 10; c++) {
11332
11336
  if (r === 0 || r === 1)
11333
11337
  return r;
11334
- if (s = Zn(r, a, e) - i, o = Math.exp((a - 1) * Math.log(r) + (e - 1) * Math.log(1 - r) + n), u = s / o, r -= o = u / (1 - 0.5 * Math.min(1, u * ((a - 1) / r - (e - 1) / (1 - r)))), r <= 0 && (r = 0.5 * (r + o)), r >= 1 && (r = 0.5 * (r + o + 1)), Math.abs(o) < t * r && c > 0)
11338
+ if (s = zn(r, a, e) - i, o = Math.exp((a - 1) * Math.log(r) + (e - 1) * Math.log(1 - r) + n), u = s / o, r -= o = u / (1 - 0.5 * Math.min(1, u * ((a - 1) / r - (e - 1) / (1 - r)))), r <= 0 && (r = 0.5 * (r + o)), r >= 1 && (r = 0.5 * (r + o + 1)), Math.abs(o) < t * r && c > 0)
11335
11339
  break;
11336
11340
  }
11337
11341
  return r;
11338
11342
  }
11339
- function Zn(i, a, e) {
11340
- const t = i === 0 || i === 1 ? 0 : Math.exp(ft(a + e) - ft(a) - ft(e) + a * Math.log(i) + e * Math.log(1 - i));
11343
+ function zn(i, a, e) {
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));
11341
11345
  return i < (a + 1) / (a + e + 2) ? t * Pi(i, a, e) / a : 1 - t * Pi(1 - i, e, a) / e;
11342
11346
  }
11343
11347
  function Pi(i, a, e) {
@@ -11352,10 +11356,10 @@ function Pi(i, a, e) {
11352
11356
  return o;
11353
11357
  }
11354
11358
  function xa(i, a) {
11355
- return i + a > 170 ? Math.exp(ja(i, a)) : fn(i) * fn(a) / fn(i + a);
11359
+ return i + a > 170 ? Math.exp(ja(i, a)) : hn(i) * hn(a) / hn(i + a);
11356
11360
  }
11357
11361
  function ja(i, a) {
11358
- return ft(i) + ft(a) - ft(i + a);
11362
+ return lt(i) + lt(a) - lt(i + a);
11359
11363
  }
11360
11364
  function Bo(i, a, e) {
11361
11365
  if (i < 0)
@@ -11376,13 +11380,13 @@ function va(i, a) {
11376
11380
  return i <= 0 ? 0 : Ba(a / 2, i / 2);
11377
11381
  }
11378
11382
  function Jh(i, a) {
11379
- 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) - ft(a / 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));
11380
11384
  }
11381
11385
  function Io(i, a) {
11382
11386
  return i <= 0 ? 0 : i >= 1 ? 1 / 0 : 2 * $o(i, a / 2);
11383
11387
  }
11384
11388
  function Ta(i, a, e) {
11385
- return i < 0 ? 0 : Zn(a * i / (a * i + e), a / 2, e / 2);
11389
+ return i < 0 ? 0 : zn(a * i / (a * i + e), a / 2, e / 2);
11386
11390
  }
11387
11391
  function em(i, a, e) {
11388
11392
  if (i < 0)
@@ -11417,7 +11421,7 @@ function ko(i, a, e) {
11417
11421
  const l = u / c;
11418
11422
  return s - l * o + l * i;
11419
11423
  }
11420
- function fn(i) {
11424
+ function hn(i) {
11421
11425
  const a = [
11422
11426
  -1.716185138865495,
11423
11427
  24.76565080557592,
@@ -11467,12 +11471,12 @@ function nm(i, a, e) {
11467
11471
  return i <= 0 ? 0 : Ba(a, i / e);
11468
11472
  }
11469
11473
  function sm(i, a, e) {
11470
- return i < 0 ? 0 : i === 0 && a === 1 ? 1 / e : Math.exp((a - 1) * Math.log(i) - i / e - ft(a) - a * Math.log(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));
11471
11475
  }
11472
11476
  function am(i, a, e) {
11473
11477
  return i <= 0 ? 0 : i >= 1 ? 1 / 0 : e * $o(i, a);
11474
11478
  }
11475
- function ft(i) {
11479
+ function lt(i) {
11476
11480
  const a = [
11477
11481
  76.18009172947146,
11478
11482
  -86.50532032941678,
@@ -11492,7 +11496,7 @@ function ft(i) {
11492
11496
  function Ba(i, a) {
11493
11497
  if (a < 0 || i <= 0)
11494
11498
  return Number.NaN;
11495
- const e = 1e-30, t = -~(Math.log(i >= 1 ? i : 1 / i) * 8.5 + i * 0.4 + 17), r = ft(i), n = Math.exp(-a + i * Math.log(a) - 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);
11496
11500
  let s = i, o = 1 / i, u = o;
11497
11501
  if (a < i + 1) {
11498
11502
  if (n === 0)
@@ -11524,7 +11528,7 @@ function $o(i, a) {
11524
11528
  const o = 1 - a * (0.253 + a * 0.12);
11525
11529
  i < o ? e = (i / o) ** (1 / a) : e = 1 - Math.log(1 - (i - o) / (1 - o));
11526
11530
  }
11527
- const t = 1e-8, r = ft(a);
11531
+ const t = 1e-8, r = lt(a);
11528
11532
  let n, s;
11529
11533
  for (let o = 0; o < 12; o++) {
11530
11534
  if (e <= 0)
@@ -11550,7 +11554,7 @@ function om(i, a, e) {
11550
11554
  return i <= 0 ? 0 : Math.exp(-Math.log(i) - 0.5 * Math.log(2 * Math.PI) - Math.log(e) - (Math.log(i) - a) ** 2 / (2 * e * e));
11551
11555
  }
11552
11556
  function um(i, a, e) {
11553
- return Math.exp(zn(i, a, e));
11557
+ return Math.exp(Jn(i, a, e));
11554
11558
  }
11555
11559
  function cm(i, a, e) {
11556
11560
  if (i < 0)
@@ -11569,7 +11573,7 @@ function Yr(i, a, e) {
11569
11573
  function Ho(i, a, e) {
11570
11574
  return Math.exp(-0.5 * Math.log(2 * Math.PI) - Math.log(e) - (i - a) ** 2 / (2 * e * e));
11571
11575
  }
11572
- function zn(i, a, e) {
11576
+ function Jn(i, a, e) {
11573
11577
  return -1.4142135623730951 * e * $h(2 * i) + a;
11574
11578
  }
11575
11579
  function lm(i, a) {
@@ -11582,14 +11586,14 @@ function Go(i, a) {
11582
11586
  return Math.exp(-a) * a ** i / cr(i);
11583
11587
  }
11584
11588
  function Hr(i, a) {
11585
- const e = 0.5 * Zn(a / (i ** 2 + a), a / 2, 0.5);
11589
+ const e = 0.5 * zn(a / (i ** 2 + a), a / 2, 0.5);
11586
11590
  return i < 0 ? e : 1 - e;
11587
11591
  }
11588
11592
  function fm(i, a) {
11589
11593
  const e = (1 + i ** 2 / a) ** (-(a + 1) / 2);
11590
11594
  return 1 / (Math.sqrt(a) * xa(0.5, a / 2)) * e;
11591
11595
  }
11592
- function Jn(i, a) {
11596
+ function es(i, a) {
11593
11597
  let e = Pa(2 * Math.min(i, 1 - i), 0.5 * a, 0.5);
11594
11598
  return e = Math.sqrt(a * (1 - e) / e), i > 0.5 ? e : -e;
11595
11599
  }
@@ -11627,7 +11631,7 @@ function tt(i, a, e, t, r) {
11627
11631
  noCalculate: o
11628
11632
  };
11629
11633
  }
11630
- function es(i, a, e) {
11634
+ function ts(i, a, e) {
11631
11635
  const t = i.isArray() ? i.getRowCount() : 1, r = i.isArray() ? i.getColumnCount() : 1;
11632
11636
  let n = t, s = r;
11633
11637
  if (a && !a.isNull() && (n = a.isArray() ? a.getRowCount() : 1, s = a.isArray() ? a.getColumnCount() : 1, t === 1 && s !== r || r === 1 && n !== t || t !== 1 && r !== 1 && (n !== t || s !== r)))
@@ -11661,7 +11665,7 @@ function dt(i) {
11661
11665
  }
11662
11666
  return t;
11663
11667
  }
11664
- function ts(i, a) {
11668
+ function rs(i, a) {
11665
11669
  const e = [];
11666
11670
  let t = 1;
11667
11671
  for (let r = 0; r < i; r++) {
@@ -11671,7 +11675,7 @@ function ts(i, a) {
11671
11675
  }
11672
11676
  return e;
11673
11677
  }
11674
- function rs(i, a, e, t) {
11678
+ function ns(i, a, e, t) {
11675
11679
  let r = a;
11676
11680
  t && (r = a.map((o) => Math.log(o)));
11677
11681
  let n, s;
@@ -11733,18 +11737,18 @@ function mm(i, a) {
11733
11737
  intercept: 0
11734
11738
  };
11735
11739
  }
11736
- function ns(i, a, e, t, r) {
11740
+ function ss(i, a, e, t, r) {
11737
11741
  const n = i.length === 1 && i[0].length > 1;
11738
11742
  let s = i;
11739
11743
  r && (s = i.map((C) => C.map((E) => Math.log(E))));
11740
11744
  let o = a, u = e;
11741
- n && (s = mt(s), o = mt(o), u = mt(u)), t && (o = o.map((C) => [...C, 1]));
11742
- const c = mt(o), l = lr(c, o), f = lr(c, s);
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);
11743
11747
  let h = Qh(l);
11744
11748
  if (!h && (h = qh(l), !h))
11745
11749
  return g.create(m.NA);
11746
11750
  let d = lr(h, f);
11747
- t || d.push([0]), d = mt(d);
11751
+ t || d.push([0]), d = ht(d);
11748
11752
  const _ = d[0].pop();
11749
11753
  if (d[0].reverse(), d[0].push(_), r)
11750
11754
  for (let C = 0; C < d[0].length; C++)
@@ -12008,7 +12012,7 @@ class zo extends V {
12008
12012
  const [p, N, M] = R, w = +p.getValue(), S = +N.getValue(), D = Math.floor(+M.getValue());
12009
12013
  if (w <= 0 || w >= 1 || S <= 0 || D < 1)
12010
12014
  return g.create(m.NUM);
12011
- const L = Math.abs(zn(w / 2, 0, 1) * S / Math.sqrt(D));
12015
+ const L = Math.abs(Jn(w / 2, 0, 1) * S / Math.sqrt(D));
12012
12016
  return y.create(L);
12013
12017
  });
12014
12018
  return n === 1 && s === 1 ? l.get(0, 0) : l;
@@ -12446,7 +12450,7 @@ class cu extends V {
12446
12450
  const [u, c, l] = o, f = +u.getValue(), h = +c.getValue(), d = +l.getValue();
12447
12451
  if (f <= 0 || f >= 1 || d <= 0)
12448
12452
  return g.create(m.NUM);
12449
- const _ = zn(f, h, d);
12453
+ const _ = Jn(f, h, d);
12450
12454
  return y.create(_);
12451
12455
  }
12452
12456
  }
@@ -12470,7 +12474,7 @@ class lu extends V {
12470
12474
  const [s] = n, o = +s.getValue();
12471
12475
  if (o <= 0 || o >= 1)
12472
12476
  return g.create(m.NUM);
12473
- const u = zn(o, 0, 1);
12477
+ const u = Jn(o, 0, 1);
12474
12478
  return y.create(u);
12475
12479
  }
12476
12480
  }
@@ -12695,7 +12699,7 @@ class _u extends V {
12695
12699
  const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
12696
12700
  if (c <= 0 || c > 1 || l < 1 || l > 10 ** 10)
12697
12701
  return g.create(m.NUM);
12698
- const f = Math.abs(Jn(c / 2, l));
12702
+ const f = Math.abs(es(c / 2, l));
12699
12703
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
12700
12704
  }
12701
12705
  }
@@ -13895,7 +13899,7 @@ function Nu(i) {
13895
13899
  }
13896
13900
  return Vu[Number(i)] || [];
13897
13901
  }
13898
- function Pn(i, a, e = 1, t) {
13902
+ function xn(i, a, e = 1, t) {
13899
13903
  const r = Nu(e), n = Math.floor(i), s = Math.floor(a), o = s > n ? n : s;
13900
13904
  let u = 0;
13901
13905
  const c = Math.abs(Math.floor(a) - Math.floor(i)) + 1;
@@ -13908,7 +13912,7 @@ function Pn(i, a, e = 1, t) {
13908
13912
  }
13909
13913
  return s >= n ? u : -u;
13910
13914
  }
13911
- function xn(i, a, e = 1, t) {
13915
+ function jn(i, a, e = 1, t) {
13912
13916
  const r = Nu(e), n = Math.floor(i);
13913
13917
  let s = n, o = Math.abs(a);
13914
13918
  for (let u = 1; u <= o; u++) {
@@ -14026,7 +14030,7 @@ const Gm = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Qm = [31, 28, 31, 3
14026
14030
  function Qr(i, a) {
14027
14031
  return Ym(i) ? Gm[a] : Qm[a];
14028
14032
  }
14029
- function ss(i) {
14033
+ function as(i) {
14030
14034
  return Hm(i) ? 366 : 365;
14031
14035
  }
14032
14036
  function Ou(i, a) {
@@ -14036,7 +14040,7 @@ function Ou(i, a) {
14036
14040
  case 4:
14037
14041
  return 360;
14038
14042
  case 1:
14039
- return ss(re(i).getUTCFullYear());
14043
+ return as(re(i).getUTCFullYear());
14040
14044
  case 3:
14041
14045
  return 365;
14042
14046
  default:
@@ -14533,7 +14537,7 @@ class ig extends V {
14533
14537
  return u;
14534
14538
  if (r)
14535
14539
  return this._getResultByHolidays(o, u, r);
14536
- const c = Pn(o, u);
14540
+ const c = xn(o, u);
14537
14541
  return y.create(c);
14538
14542
  }
14539
14543
  _getResultByHolidays(e, t, r) {
@@ -14558,7 +14562,7 @@ class ig extends V {
14558
14562
  return o;
14559
14563
  n.push(o);
14560
14564
  }
14561
- const s = Pn(e, t, 1, n);
14565
+ const s = xn(e, t, 1, n);
14562
14566
  return y.create(s);
14563
14567
  }
14564
14568
  }
@@ -14606,7 +14610,7 @@ class og extends V {
14606
14610
  return l;
14607
14611
  if (n)
14608
14612
  return this._getResultByHolidays(c, l, u, n);
14609
- const f = Pn(c, l, u);
14613
+ const f = xn(c, l, u);
14610
14614
  return y.create(f);
14611
14615
  }
14612
14616
  _getResultByHolidays(e, t, r, n) {
@@ -14631,7 +14635,7 @@ class og extends V {
14631
14635
  return u;
14632
14636
  s.push(u);
14633
14637
  }
14634
- const o = Pn(e, t, r, s);
14638
+ const o = xn(e, t, r, s);
14635
14639
  return y.create(o);
14636
14640
  }
14637
14641
  }
@@ -14918,7 +14922,7 @@ class Cg extends V {
14918
14922
  return g.create(m.VALUE);
14919
14923
  if (r)
14920
14924
  return this._getResultByHolidays(o, u, r);
14921
- const c = xn(o, u);
14925
+ const c = jn(o, u);
14922
14926
  return typeof c != "number" ? c : y.create(c);
14923
14927
  }
14924
14928
  _getResultByHolidays(e, t, r) {
@@ -14943,7 +14947,7 @@ class Cg extends V {
14943
14947
  return o;
14944
14948
  n.push(o);
14945
14949
  }
14946
- const s = xn(e, t, 1, n);
14950
+ const s = jn(e, t, 1, n);
14947
14951
  return typeof s != "number" ? s : y.create(s);
14948
14952
  }
14949
14953
  }
@@ -14978,7 +14982,7 @@ class _g extends V {
14978
14982
  return g.create(m.NUM);
14979
14983
  if (n)
14980
14984
  return this._getResultByHolidays(c, l, f, n);
14981
- const h = xn(c, l, f);
14985
+ const h = jn(c, l, f);
14982
14986
  return typeof h != "number" ? h : y.create(h);
14983
14987
  }
14984
14988
  _checkArrayError(e) {
@@ -15013,7 +15017,7 @@ class _g extends V {
15013
15017
  return u;
15014
15018
  s.push(u);
15015
15019
  }
15016
- const o = xn(e, t, r, s);
15020
+ const o = jn(e, t, r, s);
15017
15021
  return typeof o != "number" ? o : y.create(o);
15018
15022
  }
15019
15023
  }
@@ -17142,7 +17146,7 @@ const V1 = [
17142
17146
  [p1, Z.OCT2HEX]
17143
17147
  ];
17144
17148
  var ee = /* @__PURE__ */ ((i) => (i.ACCRINT = "ACCRINT", i.ACCRINTM = "ACCRINTM", i.AMORDEGRC = "AMORDEGRC", i.AMORLINC = "AMORLINC", i.COUPDAYBS = "COUPDAYBS", i.COUPDAYS = "COUPDAYS", i.COUPDAYSNC = "COUPDAYSNC", i.COUPNCD = "COUPNCD", i.COUPNUM = "COUPNUM", i.COUPPCD = "COUPPCD", i.CUMIPMT = "CUMIPMT", i.CUMPRINC = "CUMPRINC", i.DB = "DB", i.DDB = "DDB", i.DISC = "DISC", i.DOLLARDE = "DOLLARDE", i.DOLLARFR = "DOLLARFR", i.DURATION = "DURATION", i.EFFECT = "EFFECT", i.FV = "FV", i.FVSCHEDULE = "FVSCHEDULE", i.INTRATE = "INTRATE", i.IPMT = "IPMT", i.IRR = "IRR", i.ISPMT = "ISPMT", i.MDURATION = "MDURATION", i.MIRR = "MIRR", i.NOMINAL = "NOMINAL", i.NPER = "NPER", i.NPV = "NPV", i.ODDFPRICE = "ODDFPRICE", i.ODDFYIELD = "ODDFYIELD", i.ODDLPRICE = "ODDLPRICE", i.ODDLYIELD = "ODDLYIELD", i.PDURATION = "PDURATION", i.PMT = "PMT", i.PPMT = "PPMT", i.PRICE = "PRICE", i.PRICEDISC = "PRICEDISC", i.PRICEMAT = "PRICEMAT", i.PV = "PV", i.RATE = "RATE", i.RECEIVED = "RECEIVED", i.RRI = "RRI", i.SLN = "SLN", i.SYD = "SYD", i.TBILLEQ = "TBILLEQ", i.TBILLPRICE = "TBILLPRICE", i.TBILLYIELD = "TBILLYIELD", i.VDB = "VDB", i.XIRR = "XIRR", i.XNPV = "XNPV", i.YIELD = "YIELD", i.YIELDDISC = "YIELDDISC", i.YIELDMAT = "YIELDMAT", i))(ee || {});
17145
- function as(i, a, e, t) {
17149
+ function is(i, a, e, t) {
17146
17150
  const r = It(i, a, e), { days: n } = _e(r, i, t);
17147
17151
  return n;
17148
17152
  }
@@ -17180,7 +17184,7 @@ function It(i, a, e) {
17180
17184
  return Re(r);
17181
17185
  }
17182
17186
  function wu(i, a, e, t, r, n) {
17183
- const s = as(i, a, r, n), o = qe(i, a, r, n), u = rr(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
17187
+ const s = is(i, a, r, n), o = qe(i, a, r, n), u = rr(i, a, r), c = (o - s) / o - 1, l = t / r + 1, f = e * 100 / r;
17184
17188
  let h = 0, d = 0;
17185
17189
  for (let E = 1; E <= u; E++) {
17186
17190
  const b = E + c, R = f / l ** b;
@@ -17344,8 +17348,8 @@ function w1(i, a) {
17344
17348
  while (Math.abs(_) > 1e-7 && f < 60);
17345
17349
  return C;
17346
17350
  }
17347
- function hn(i, a, e, t, r, n, s) {
17348
- const o = rr(i, a, n), u = qe(i, a, n, s), c = as(i, a, n, s);
17351
+ function mn(i, a, e, t, r, n, s) {
17352
+ const o = rr(i, a, n), u = qe(i, a, n, s), c = is(i, a, n, s);
17349
17353
  if (o === 1) {
17350
17354
  const h = u - c, d = 100 * e / n + r, _ = t / n * h / u + 1, C = 100 * e / n * c / u;
17351
17355
  return d / _ - C;
@@ -17496,7 +17500,7 @@ class P1 extends V {
17496
17500
  return g.create(m.VALUE);
17497
17501
  if (![1, 2, 4].includes(E) || b < 0 || b > 4 || Math.floor(_) >= Math.floor(C))
17498
17502
  return g.create(m.NUM);
17499
- const R = as(_, C, E, b);
17503
+ const R = is(_, C, E, b);
17500
17504
  return y.create(R);
17501
17505
  }
17502
17506
  }
@@ -18659,7 +18663,7 @@ class f0 extends V {
18659
18663
  return g.create(m.VALUE);
18660
18664
  if (w < 0 || S < 0 || D <= 0 || ![1, 2, 4].includes(L) || U < 0 || U > 4 || N >= M || !Mr(N, M, L))
18661
18665
  return g.create(m.NUM);
18662
- const x = hn(N, M, w, S, D, L, U);
18666
+ const x = mn(N, M, w, S, D, L, U);
18663
18667
  return y.create(x);
18664
18668
  }
18665
18669
  }
@@ -18958,7 +18962,7 @@ class b0 extends V {
18958
18962
  return g.create(m.VALUE);
18959
18963
  if (d <= 0 || f >= h)
18960
18964
  return g.create(m.NUM);
18961
- const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = ss(E);
18965
+ const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = as(E);
18962
18966
  if (_ > b)
18963
18967
  return g.create(m.NUM);
18964
18968
  let R = 365 * d / (360 - d * _);
@@ -18992,7 +18996,7 @@ class y0 extends V {
18992
18996
  return g.create(m.VALUE);
18993
18997
  if (d <= 0 || f >= h)
18994
18998
  return g.create(m.NUM);
18995
- const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = ss(E);
18999
+ const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = as(E);
18996
19000
  if (_ > b)
18997
19001
  return g.create(m.NUM);
18998
19002
  const R = 100 * (1 - d * _ / 360);
@@ -19020,7 +19024,7 @@ class R0 extends V {
19020
19024
  return g.create(m.VALUE);
19021
19025
  if (d <= 0 || f >= h)
19022
19026
  return g.create(m.NUM);
19023
- const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = ss(E);
19027
+ const _ = Math.floor(h) - Math.floor(f), E = re(f).getUTCFullYear(), b = as(E);
19024
19028
  if (_ > b)
19025
19029
  return g.create(m.NUM);
19026
19030
  const R = (100 - d) / d * 360 / _;
@@ -19417,12 +19421,12 @@ class O0 extends V {
19417
19421
  }
19418
19422
  _getResult(e, t, r, n, s, o, u) {
19419
19423
  if (rr(e, t, o) > 1) {
19420
- let E = r || 0.01, b = hn(e, t, r, E, s, o, u), R = b - n;
19424
+ let E = r || 0.01, b = mn(e, t, r, E, s, o, u), R = b - n;
19421
19425
  for (let p = 0; p < 100 && Math.abs(R) > 1e-7; p++)
19422
- b = hn(e, t, r, 1.01 * E, s, o, u), E += -R / (b - n - R) * E * 0.01, R = hn(e, t, r, E, s, o, u) - n;
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;
19423
19427
  return E;
19424
19428
  }
19425
- const l = as(e, t, o, u), f = qe(e, t, o, u), { days: h } = _e(e, t, u), d = n / 100 + l / f * r / o;
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;
19426
19430
  return (s / 100 + r / o - d) / d * o * f / h;
19427
19431
  }
19428
19432
  }
@@ -21384,7 +21388,7 @@ class Ud extends V {
21384
21388
  return g.create(m.REF);
21385
21389
  const n = this._convertToDefinedName(r);
21386
21390
  if (t === 0) {
21387
- const f = Th(n), { range: h, sheetName: d, unitId: _ } = f, C = new Rn(h);
21391
+ const f = Th(n), { range: h, sheetName: d, unitId: _ } = f, C = new pn(h);
21388
21392
  return C.setForcedUnitIdDirect(_), C.setForcedSheetName(d), this._setDefault(C);
21389
21393
  }
21390
21394
  if (Br(n))
@@ -21396,7 +21400,7 @@ class Ud extends V {
21396
21400
  const s = mr(n), { range: o, sheetName: u, unitId: c } = s;
21397
21401
  if (Number.isNaN(o.startRow) || o.endRow + 1 > 1048576 || Number.isNaN(o.startColumn) || o.endColumn + 1 > 16384)
21398
21402
  return g.create(m.REF);
21399
- const l = new Rn(o);
21403
+ const l = new pn(o);
21400
21404
  return l.setForcedUnitIdDirect(c), l.setForcedSheetName(u), this._setDefault(l);
21401
21405
  }
21402
21406
  _setDefault(e) {
@@ -21702,7 +21706,7 @@ class kd extends V {
21702
21706
  }
21703
21707
  }
21704
21708
  _sort(e, t = 1) {
21705
- const r = _n();
21709
+ const r = An();
21706
21710
  return t === 1 ? this._sortAsc(e, r) : this._sortDesc(e, r);
21707
21711
  }
21708
21712
  _sortAsc(e, t) {
@@ -21867,7 +21871,7 @@ class $d extends V {
21867
21871
  return n;
21868
21872
  }
21869
21873
  _sort(e, t) {
21870
- const r = _n();
21874
+ const r = An();
21871
21875
  return (n, s) => {
21872
21876
  let o = n[e], u = s[e], c = this._compare(o, u, t[0], r);
21873
21877
  if (c === 0 && t.length > 1) {
@@ -22522,7 +22526,7 @@ class zd extends V {
22522
22526
  }
22523
22527
  _handleExpandObject(e, t, r, n, s, o = 0) {
22524
22528
  if ((s === 2 || s === -2) && n !== 2) {
22525
- const u = vs(s), c = Us(n);
22529
+ const u = Ts(s), c = vs(n);
22526
22530
  return this.binarySearchExpand(
22527
22531
  e,
22528
22532
  t,
@@ -22543,7 +22547,7 @@ class zd extends V {
22543
22547
  }
22544
22548
  _handleSingleObject(e, t, r, n, s) {
22545
22549
  if ((s === 2 || s === -2) && n !== 2) {
22546
- const o = vs(s), u = Us(n);
22550
+ const o = Ts(s), u = vs(n);
22547
22551
  return this.binarySearch(e, t, r, o, u);
22548
22552
  }
22549
22553
  return n === 2 ? this.fuzzySearch(e, t, r, s !== -1) : n === -1 || n === 1 ? this.orderSearch(
@@ -22601,7 +22605,7 @@ class Jd extends V {
22601
22605
  _handleSingleObject(e, t, r, n) {
22602
22606
  let s;
22603
22607
  if ((n === 2 || n === -2) && r !== 2) {
22604
- const o = vs(n), u = Us(r);
22608
+ const o = Ts(n), u = vs(r);
22605
22609
  s = t.binarySearch(e, o, u);
22606
22610
  } else if (r === 2) {
22607
22611
  const o = t.compare(e, $.EQUALS);
@@ -24675,8 +24679,8 @@ class __ extends V {
24675
24679
  if (!e.isReferenceObject() || r && !r.isReferenceObject())
24676
24680
  return g.create(m.VALUE);
24677
24681
  const n = e.toArrayValueObject();
24678
- let s = qn(n, t);
24679
- s = Kn(s, n, t);
24682
+ let s = Kn(n, t);
24683
+ s = Xn(s, n, t);
24680
24684
  const o = n.getRowCount(), u = n.getColumnCount();
24681
24685
  let c = n;
24682
24686
  if (r) {
@@ -25011,7 +25015,7 @@ class O_ extends V {
25011
25015
  return _;
25012
25016
  if (d.isString() && (d = d.convertToNumberObjectValue()), d.isError())
25013
25017
  return d;
25014
- const C = +_.getValue(), E = +d.getValue(), b = 10 ** Math.trunc(E), R = Hn(C, b), p = Math.trunc(Vr(C, b) + R) / b;
25018
+ const C = +_.getValue(), E = +d.getValue(), b = 10 ** Math.trunc(E), R = Gn(C, b), p = Math.trunc(Vr(C, b) + R) / b;
25015
25019
  return y.create(p);
25016
25020
  });
25017
25021
  return n === 1 && s === 1 ? c.get(0, 0) : c;
@@ -25409,8 +25413,8 @@ class F_ extends V {
25409
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));
25410
25414
  }
25411
25415
  _handleSingleObject(e, t, r) {
25412
- let n = qn(e, t);
25413
- n = Kn(n, e, t);
25416
+ let n = Kn(e, t);
25417
+ n = Xn(n, e, t);
25414
25418
  let s = r ? this._createRangeReferenceObject(r, e) : e;
25415
25419
  if (!s)
25416
25420
  return g.create(m.VALUE);
@@ -25656,7 +25660,7 @@ class Q_ extends V {
25656
25660
  return g.create(m.NUM);
25657
25661
  if (D === 1)
25658
25662
  return g.create(m.DIV_BY_ZERO);
25659
- const L = Math.abs(Jn(w / 2, D - 1) * S / Math.sqrt(D));
25663
+ const L = Math.abs(es(w / 2, D - 1) * S / Math.sqrt(D));
25660
25664
  return y.create(L);
25661
25665
  });
25662
25666
  return n === 1 && s === 1 ? l.get(0, 0) : l;
@@ -25764,8 +25768,8 @@ class Z_ extends V {
25764
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);
25765
25769
  }
25766
25770
  _handleSingleObject(e, t) {
25767
- let r = qn(e, t);
25768
- r = Kn(r, e, t);
25771
+ let r = Kn(e, t);
25772
+ r = Xn(r, e, t);
25769
25773
  const n = e.pick(r);
25770
25774
  return this._countA(n);
25771
25775
  }
@@ -26157,7 +26161,7 @@ class oA extends V {
26157
26161
  const [s] = n, o = +s.getValue();
26158
26162
  if (o === 0 || o < 0 && o % 1 === 0)
26159
26163
  return g.create(m.NUM);
26160
- const u = fn(o);
26164
+ const u = hn(o);
26161
26165
  return Number.isNaN(u) || !Number.isFinite(u) ? g.create(m.NUM) : y.create(u);
26162
26166
  }
26163
26167
  }
@@ -26181,7 +26185,7 @@ class vi extends V {
26181
26185
  const [s] = n, o = +s.getValue();
26182
26186
  if (o <= 0)
26183
26187
  return g.create(m.NUM);
26184
- const u = ft(o);
26188
+ const u = lt(o);
26185
26189
  return Math.abs(u) < 1e-15 ? y.create(0) : y.create(u);
26186
26190
  }
26187
26191
  }
@@ -26258,7 +26262,7 @@ class lA extends V {
26258
26262
  A(this, "maxParams", 4);
26259
26263
  }
26260
26264
  calculate(e, t, r, n) {
26261
- const { isError: s, errorObject: o } = es(e, t, r);
26265
+ const { isError: s, errorObject: o } = ts(e, t, r);
26262
26266
  if (s)
26263
26267
  return o;
26264
26268
  const u = dt(e);
@@ -26280,7 +26284,7 @@ class lA extends V {
26280
26284
  return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (n ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (n ? t[0].length + 1 : t[0].length) > e.length ? g.create(m.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
26281
26285
  }
26282
26286
  _getResultByMultipleVariables(e, t, r, n) {
26283
- const s = e.length === 1 && e[0].length > 1, o = ns(e, t, r, n, !0);
26287
+ const s = e.length === 1 && e[0].length > 1, o = ss(e, t, r, n, !0);
26284
26288
  if (o instanceof g)
26285
26289
  return o;
26286
26290
  const { coefficients: u, newX: c } = o, l = u[0].length, f = u[0][l - 1];
@@ -26292,14 +26296,14 @@ class lA extends V {
26292
26296
  _ *= u[0][l - 2 - C] ** c[d][C];
26293
26297
  h[d].push(_);
26294
26298
  }
26295
- return s && (h = mt(h)), q.createByArray(h);
26299
+ return s && (h = ht(h)), q.createByArray(h);
26296
26300
  }
26297
26301
  _getResultBySimpleVariables(e, t, r, n) {
26298
- const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = rs(o, s, n, !0), l = r.map((f) => f.map((h) => c * u ** h));
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));
26299
26303
  return q.createByArray(l);
26300
26304
  }
26301
26305
  _getKnownXsValues(e, t) {
26302
- return !t || t.isNull() ? ts(e.length, e[0].length) : dt(t);
26306
+ return !t || t.isNull() ? rs(e.length, e[0].length) : dt(t);
26303
26307
  }
26304
26308
  _getNewXsValues(e, t) {
26305
26309
  return !t || t.isNull() ? e : dt(t);
@@ -26519,7 +26523,7 @@ class CA extends V {
26519
26523
  A(this, "maxParams", 4);
26520
26524
  }
26521
26525
  calculate(e, t, r, n) {
26522
- const { isError: s, errorObject: o } = es(e, t);
26526
+ const { isError: s, errorObject: o } = ts(e, t);
26523
26527
  if (s)
26524
26528
  return o;
26525
26529
  const u = dt(e);
@@ -26542,7 +26546,7 @@ class CA extends V {
26542
26546
  return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (r ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (r ? t[0].length + 1 : t[0].length) > e.length ? g.create(m.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
26543
26547
  }
26544
26548
  _getResultByMultipleVariables(e, t, r, n) {
26545
- const s = ns(e, t, t, r, !1);
26549
+ const s = ss(e, t, t, r, !1);
26546
26550
  if (s instanceof g)
26547
26551
  return s;
26548
26552
  const { coefficients: o, X: u, XTXInverse: c } = s;
@@ -26589,7 +26593,7 @@ class CA extends V {
26589
26593
  return q.createByArray(l);
26590
26594
  }
26591
26595
  _getResultBySimpleVariables(e, t, r, n) {
26592
- const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = rs(o, s, r, !1);
26596
+ const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ns(o, s, r, !1);
26593
26597
  if (Number.isNaN(u))
26594
26598
  return g.create(m.NA);
26595
26599
  let l = [];
@@ -26629,7 +26633,7 @@ class CA extends V {
26629
26633
  return q.createByArray(l);
26630
26634
  }
26631
26635
  _getKnownXsValues(e, t) {
26632
- return !t || t.isNull() ? ts(e.length, e[0].length) : dt(t);
26636
+ return !t || t.isNull() ? rs(e.length, e[0].length) : dt(t);
26633
26637
  }
26634
26638
  }
26635
26639
  class _A extends V {
@@ -26639,7 +26643,7 @@ class _A extends V {
26639
26643
  A(this, "maxParams", 4);
26640
26644
  }
26641
26645
  calculate(e, t, r, n) {
26642
- const { isError: s, errorObject: o } = es(e, t);
26646
+ const { isError: s, errorObject: o } = ts(e, t);
26643
26647
  if (s)
26644
26648
  return o;
26645
26649
  const u = dt(e);
@@ -26663,7 +26667,7 @@ class _A extends V {
26663
26667
  }
26664
26668
  // eslint-disable-next-line max-lines-per-function
26665
26669
  _getResultByMultipleVariables(e, t, r, n) {
26666
- const s = ns(e, t, t, r, !0);
26670
+ const s = ss(e, t, t, r, !0);
26667
26671
  if (s instanceof g)
26668
26672
  return s;
26669
26673
  const { coefficients: o, Y: u, X: c, XTXInverse: l } = s;
@@ -26711,7 +26715,7 @@ class _A extends V {
26711
26715
  return q.createByArray(f);
26712
26716
  }
26713
26717
  _getResultBySimpleVariables(e, t, r, n) {
26714
- const s = e.flat(), o = t.flat(), { slope: u, intercept: c, Y: l } = rs(o, s, r, !0);
26718
+ const s = e.flat(), o = t.flat(), { slope: u, intercept: c, Y: l } = ns(o, s, r, !0);
26715
26719
  if (Number.isNaN(u))
26716
26720
  return g.create(m.NA);
26717
26721
  let f = [];
@@ -26749,7 +26753,7 @@ class _A extends V {
26749
26753
  return q.createByArray(f);
26750
26754
  }
26751
26755
  _getKnownXsValues(e, t) {
26752
- return !t || t.isNull() ? ts(e.length, e[0].length) : dt(t);
26756
+ return !t || t.isNull() ? rs(e.length, e[0].length) : dt(t);
26753
26757
  }
26754
26758
  }
26755
26759
  class AA extends V {
@@ -26810,7 +26814,7 @@ class EA extends V {
26810
26814
  const f = 1 - l, h = r.length, d = r.reduce((b, R) => b + R, 0) / h, _ = r.reduce((b, R) => b + (R - d) ** 2, 0) / (h - 1), C = Math.sqrt(_);
26811
26815
  if (C <= 0)
26812
26816
  return g.create(m.NUM);
26813
- const E = Math.abs(Jn(f / 2, h - 1) * C / Math.sqrt(h));
26817
+ const E = Math.abs(es(f / 2, h - 1) * C / Math.sqrt(h));
26814
26818
  return y.create(E);
26815
26819
  }
26816
26820
  _getRangeValues(e) {
@@ -28110,7 +28114,7 @@ class zA extends V {
28110
28114
  const [o, u] = s, c = +o.getValue(), l = Math.floor(+u.getValue());
28111
28115
  if (c <= 0 || c > 1 || l < 1 || l > 10 ** 10)
28112
28116
  return g.create(m.NUM);
28113
- const f = Jn(c, l);
28117
+ const f = es(c, l);
28114
28118
  return Number.isNaN(f) || !Number.isFinite(f) ? g.create(m.NUM) : y.create(f);
28115
28119
  }
28116
28120
  }
@@ -28121,7 +28125,7 @@ class JA extends V {
28121
28125
  A(this, "maxParams", 4);
28122
28126
  }
28123
28127
  calculate(e, t, r, n) {
28124
- const { isError: s, errorObject: o } = es(e, t, r);
28128
+ const { isError: s, errorObject: o } = ts(e, t, r);
28125
28129
  if (s)
28126
28130
  return o;
28127
28131
  const u = dt(e);
@@ -28143,7 +28147,7 @@ class JA extends V {
28143
28147
  return e.length === 1 && t.length > 1 || e[0].length === 1 && t[0].length > 1 ? e.length === 1 && t.length > 1 && (n ? t.length + 1 : t.length) > e[0].length || e[0].length === 1 && t[0].length > 1 && (n ? t[0].length + 1 : t[0].length) > e.length ? g.create(m.NA) : this._getResultByMultipleVariables(e, t, r, n) : this._getResultBySimpleVariables(e, t, r, n);
28144
28148
  }
28145
28149
  _getResultByMultipleVariables(e, t, r, n) {
28146
- const s = e.length === 1 && e[0].length > 1, o = ns(e, t, r, n, !1);
28150
+ const s = e.length === 1 && e[0].length > 1, o = ss(e, t, r, n, !1);
28147
28151
  if (o instanceof g)
28148
28152
  return o;
28149
28153
  const { coefficients: u, newX: c } = o, l = u[0].length, f = u[0][l - 1];
@@ -28155,17 +28159,17 @@ class JA extends V {
28155
28159
  _ += u[0][l - 2 - C] * c[d][C];
28156
28160
  h[d].push(_);
28157
28161
  }
28158
- return s && (h = mt(h)), q.createByArray(h);
28162
+ return s && (h = ht(h)), q.createByArray(h);
28159
28163
  }
28160
28164
  _getResultBySimpleVariables(e, t, r, n) {
28161
- const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = rs(o, s, n, !1);
28165
+ const s = e.flat(), o = t.flat(), { slope: u, intercept: c } = ns(o, s, n, !1);
28162
28166
  if (Number.isNaN(u))
28163
28167
  return g.create(m.NA);
28164
28168
  const l = r.map((f) => f.map((h) => u * h + c));
28165
28169
  return q.createByArray(l);
28166
28170
  }
28167
28171
  _getKnownXsValues(e, t) {
28168
- return !t || t.isNull() ? ts(e.length, e[0].length) : dt(t);
28172
+ return !t || t.isNull() ? rs(e.length, e[0].length) : dt(t);
28169
28173
  }
28170
28174
  _getNewXsValues(e, t) {
28171
28175
  return !t || t.isNull() ? e : dt(t);
@@ -30723,7 +30727,7 @@ let na = class extends Ne {
30723
30727
  super();
30724
30728
  A(this, "_computingCompleted$", new uc((a) => {
30725
30729
  this._commandService.onCommandExecuted((e) => {
30726
- if (e.id !== Cn.id) return;
30730
+ if (e.id !== _n.id) return;
30727
30731
  const t = e.params;
30728
30732
  if (t.stageInfo)
30729
30733
  return a.next(
@@ -30748,7 +30752,7 @@ var _b = Object.getOwnPropertyDescriptor, Ab = (i, a, e, t) => {
30748
30752
  (s = i[n]) && (r = s(r) || r);
30749
30753
  return r;
30750
30754
  }, tn = (i, a) => (e, t) => a(e, t, i);
30751
- let jn = class extends Ne {
30755
+ let Un = class extends Ne {
30752
30756
  constructor(i, a, e, t) {
30753
30757
  super(), this._commandService = i, this._functionService = a, this._configService = e, this._dataSyncPrimaryController = t, this._initialize();
30754
30758
  }
@@ -30758,10 +30762,10 @@ let jn = class extends Ne {
30758
30762
  _registerCommands() {
30759
30763
  [
30760
30764
  oo,
30761
- Ns,
30765
+ Os,
30762
30766
  so,
30763
30767
  ao,
30764
- Cn,
30768
+ _n,
30765
30769
  io,
30766
30770
  ca,
30767
30771
  no,
@@ -30804,18 +30808,18 @@ let jn = class extends Ne {
30804
30808
  this._functionService.registerExecutors(...a);
30805
30809
  }
30806
30810
  };
30807
- jn = Ab([
30811
+ Un = Ab([
30808
30812
  tn(0, sr),
30809
30813
  tn(1, Yt),
30810
30814
  tn(2, ia),
30811
30815
  tn(3, nc(fc))
30812
- ], jn);
30816
+ ], Un);
30813
30817
  var Eb = Object.getOwnPropertyDescriptor, bb = (i, a, e, t) => {
30814
30818
  for (var r = t > 1 ? void 0 : t ? Eb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
30815
30819
  (s = i[n]) && (r = s(r) || r);
30816
30820
  return r;
30817
30821
  }, rn = (i, a) => (e, t) => a(e, t, i);
30818
- let Un = class extends Ne {
30822
+ let vn = class extends Ne {
30819
30823
  constructor(i, a, e) {
30820
30824
  super(), this._commandService = i, this._dependencyManagerService = a, this._featureCalculationManagerService = e, this._initialize();
30821
30825
  }
@@ -30891,18 +30895,18 @@ let Un = class extends Ne {
30891
30895
  this._dependencyManagerService.removeFormulaDependencyByDefinedName(e, t);
30892
30896
  }
30893
30897
  };
30894
- Un = bb([
30898
+ vn = bb([
30895
30899
  rn(0, sr),
30896
30900
  rn(1, vr),
30897
- rn(1, Xn),
30901
+ rn(1, Zn),
30898
30902
  rn(2, vr)
30899
- ], Un);
30903
+ ], vn);
30900
30904
  var yb = Object.getOwnPropertyDescriptor, Rb = (i, a, e, t) => {
30901
30905
  for (var r = t > 1 ? void 0 : t ? yb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
30902
30906
  (s = i[n]) && (r = s(r) || r);
30903
30907
  return r;
30904
30908
  }, ki = (i, a) => (e, t) => a(e, t, i);
30905
- let vn = class extends Ne {
30909
+ let Tn = class extends Ne {
30906
30910
  constructor(i, a) {
30907
30911
  super(), this._commandService = i, this._featureCalculationManagerService = a, this._initialize();
30908
30912
  }
@@ -30929,16 +30933,16 @@ let vn = class extends Ne {
30929
30933
  );
30930
30934
  }
30931
30935
  };
30932
- vn = Rb([
30936
+ Tn = Rb([
30933
30937
  ki(0, sr),
30934
30938
  ki(1, vr)
30935
- ], vn);
30939
+ ], Tn);
30936
30940
  var pb = Object.getOwnPropertyDescriptor, Vb = (i, a, e, t) => {
30937
30941
  for (var r = t > 1 ? void 0 : t ? pb(a, e) : a, n = i.length - 1, s; n >= 0; n--)
30938
30942
  (s = i[n]) && (r = s(r) || r);
30939
30943
  return r;
30940
- }, ys = (i, a) => (e, t) => a(e, t, i);
30941
- let Tn = class extends Ne {
30944
+ }, Rs = (i, a) => (e, t) => a(e, t, i);
30945
+ let Bn = class extends Ne {
30942
30946
  constructor(i, a, e) {
30943
30947
  super(), this._commandService = i, this._otherFormulaManagerService = a, this._dependencyManagerService = e, this._initialize();
30944
30948
  }
@@ -30967,11 +30971,11 @@ let Tn = class extends Ne {
30967
30971
  );
30968
30972
  }
30969
30973
  };
30970
- Tn = Vb([
30971
- ys(0, sr),
30972
- ys(1, Oa),
30973
- ys(2, Xn)
30974
- ], Tn);
30974
+ Bn = Vb([
30975
+ Rs(0, sr),
30976
+ Rs(1, Oa),
30977
+ Rs(2, Zn)
30978
+ ], Bn);
30975
30979
  class Nb extends Ne {
30976
30980
  constructor() {
30977
30981
  super(...arguments);
@@ -31007,7 +31011,7 @@ var Ob = Object.getOwnPropertyDescriptor, Mb = (i, a, e, t) => {
31007
31011
  (s = i[n]) && (r = s(r) || r);
31008
31012
  return r;
31009
31013
  }, $i = (i, a) => (e, t) => a(e, t, i);
31010
- let Bn = class extends Ne {
31014
+ let In = class extends Ne {
31011
31015
  constructor(i, a) {
31012
31016
  super(), this._commandService = i, this._superTableService = a, this._initialize();
31013
31017
  }
@@ -31040,10 +31044,10 @@ let Bn = class extends Ne {
31040
31044
  );
31041
31045
  }
31042
31046
  };
31043
- Bn = Mb([
31047
+ In = Mb([
31044
31048
  $i(0, sr),
31045
31049
  $i(1, Hu)
31046
- ], Bn);
31050
+ ], In);
31047
31051
  class wb extends Ne {
31048
31052
  constructor() {
31049
31053
  super(...arguments);
@@ -31077,8 +31081,8 @@ var Db = Object.getOwnPropertyDescriptor, Lb = (i, a, e, t) => {
31077
31081
  return r;
31078
31082
  }, Yi = (i, a) => (e, t) => a(e, t, i);
31079
31083
  const Pb = "UNIVER_ENGINE_FORMULA_PLUGIN";
31080
- var Rs;
31081
- let Hi = (Rs = class extends sc {
31084
+ var ps;
31085
+ let Hi = (ps = class extends sc {
31082
31086
  constructor(i = hi, a, e) {
31083
31087
  super(), this._config = i, this._injector = a, this._configService = e;
31084
31088
  const { ...t } = ac(
@@ -31093,19 +31097,19 @@ let Hi = (Rs = class extends sc {
31093
31097
  }
31094
31098
  onReady() {
31095
31099
  var i;
31096
- is(this._injector, [
31097
- [jn],
31098
- [Bn]
31099
- ]), (i = this._config) != null && i.notExecuteFormula || is(this._injector, [
31100
+ os(this._injector, [
31101
+ [Un],
31102
+ [In]
31103
+ ]), (i = this._config) != null && i.notExecuteFormula || os(this._injector, [
31104
+ [Bn],
31100
31105
  [Tn],
31101
31106
  [vn],
31102
- [Un],
31103
- [Ln]
31107
+ [Pn]
31104
31108
  ]);
31105
31109
  }
31106
31110
  onRendered() {
31107
31111
  var i;
31108
- (i = this._config) != null && i.notExecuteFormula || is(this._injector, [
31112
+ (i = this._config) != null && i.notExecuteFormula || os(this._injector, [
31109
31113
  [Ks],
31110
31114
  [Ws]
31111
31115
  ]);
@@ -31114,7 +31118,7 @@ let Hi = (Rs = class extends sc {
31114
31118
  const i = !this._config.notExecuteFormula, a = [
31115
31119
  // Services
31116
31120
  [Yt, { useClass: Kf }],
31117
- [pr, { useClass: Ss }],
31121
+ [pr, { useClass: Ds }],
31118
31122
  [Sb, { useClass: wb }],
31119
31123
  [ho, { useClass: il }],
31120
31124
  [Hu, { useClass: Nb }],
@@ -31124,35 +31128,35 @@ let Hi = (Rs = class extends sc {
31124
31128
  // Engine
31125
31129
  [ga],
31126
31130
  //Controllers
31127
- [jn],
31128
- [Bn],
31131
+ [Un],
31132
+ [In],
31129
31133
  [na]
31130
31134
  ];
31131
31135
  i && a.push(
31132
31136
  // Services
31133
31137
  [Oa, { useClass: Sh }],
31134
31138
  [Ot, { useClass: Hs }],
31135
- [Ft, { useClass: Ps }],
31139
+ [Ft, { useClass: xs }],
31136
31140
  [vr, { useClass: wh }],
31137
31141
  //Controller
31138
- [Ln],
31139
- [Tn],
31140
- [Un],
31142
+ [Pn],
31143
+ [Bn],
31141
31144
  [vn],
31145
+ [Tn],
31142
31146
  // Calculation engine
31143
31147
  [_r],
31144
31148
  [Ur],
31145
31149
  [dr],
31146
31150
  // AstNode factory
31147
31151
  [Mo],
31148
- [Nn],
31149
31152
  [On],
31150
- [xo],
31151
31153
  [Mn],
31152
- [Vn],
31154
+ [xo],
31153
31155
  [wn],
31156
+ [Nn],
31154
31157
  [Sn],
31155
31158
  [Dn],
31159
+ [Ln],
31156
31160
  [jo]
31157
31161
  ), a.forEach((e) => this._injector.add(e));
31158
31162
  }
@@ -31160,11 +31164,11 @@ let Hi = (Rs = class extends sc {
31160
31164
  var i;
31161
31165
  (i = this._config) != null && i.notExecuteFormula || [
31162
31166
  [Ks, { useClass: Xs }],
31163
- [Xn, { useClass: Mh }],
31167
+ [Zn, { useClass: Mh }],
31164
31168
  [Ws, { useClass: qs }]
31165
31169
  ].forEach((e) => this._injector.add(e));
31166
31170
  }
31167
- }, A(Rs, "pluginName", Pb), Rs);
31171
+ }, A(ps, "pluginName", Pb), ps);
31168
31172
  Hi = Lb([
31169
31173
  Yi(1, ye(Qi)),
31170
31174
  Yi(2, ia)
@@ -31178,15 +31182,15 @@ export {
31178
31182
  Qb as AsyncCustomFunction,
31179
31183
  Tf as AsyncObject,
31180
31184
  V as BaseFunction,
31181
- Wn as BaseReferenceObject,
31185
+ qn as BaseReferenceObject,
31182
31186
  kt as BaseValueObject,
31183
31187
  er as BooleanValue,
31184
31188
  T as BooleanValueObject,
31185
- Ln as CalculateController,
31189
+ Pn as CalculateController,
31186
31190
  Xs as CalculateFormulaService,
31187
31191
  Vm as CustomFunction,
31188
31192
  jh as DEFAULT_INTERVAL_COUNT,
31189
- Ss as DefinedNamesService,
31193
+ Ds as DefinedNamesService,
31190
31194
  Oh as DependencyManagerBaseService,
31191
31195
  Mh as DependencyManagerService,
31192
31196
  Hb as ENGINE_FORMULA_CYCLE_REFERENCE_COUNT,
@@ -31210,23 +31214,23 @@ export {
31210
31214
  hb as FUNCTION_NAMES_UNIVER,
31211
31215
  $u as FUNCTION_NAMES_WEB,
31212
31216
  wh as FeatureCalculationManagerService,
31213
- Ps as FormulaCurrentConfigService,
31217
+ xs as FormulaCurrentConfigService,
31214
31218
  gr as FormulaDataModel,
31215
31219
  qs as FormulaDependencyGenerator,
31216
- _s as FormulaDependencyTree,
31220
+ As as FormulaDependencyTree,
31217
31221
  Qs as FormulaDependencyTreeType,
31218
31222
  Mi as FormulaDependencyTreeVirtual,
31219
31223
  Xe as FormulaExecuteStageType,
31220
31224
  Dr as FormulaExecutedStateType,
31221
31225
  Hs as FormulaRuntimeService,
31222
- Nn as FunctionNodeFactory,
31226
+ On as FunctionNodeFactory,
31223
31227
  Kf as FunctionService,
31224
31228
  gc as FunctionType,
31225
31229
  Yu as GlobalComputingStatusService,
31226
31230
  Sb as IActiveDirtyManagerService,
31227
31231
  Ks as ICalculateFormulaService,
31228
31232
  pr as IDefinedNamesService,
31229
- Xn as IDependencyManagerService,
31233
+ Zn as IDependencyManagerService,
31230
31234
  vr as IFeatureCalculationManagerService,
31231
31235
  Ft as IFormulaCurrentConfigService,
31232
31236
  Ws as IFormulaDependencyGenerator,
@@ -31236,7 +31240,7 @@ export {
31236
31240
  ho as ISheetRowFilteredService,
31237
31241
  Hu as ISuperTableService,
31238
31242
  _r as Interpreter,
31239
- On as LambdaNodeFactory,
31243
+ Mn as LambdaNodeFactory,
31240
31244
  xo as LambdaParameterNodeFactory,
31241
31245
  Na as LambdaValueObjectObject,
31242
31246
  dr as Lexer,
@@ -31244,21 +31248,21 @@ export {
31244
31248
  ga as LexerTreeBuilder,
31245
31249
  ie as NullValueObject,
31246
31250
  y as NumberValueObject,
31247
- Mn as OperatorNodeFactory,
31251
+ wn as OperatorNodeFactory,
31248
31252
  Sh as OtherFormulaManagerService,
31249
- Vn as PrefixNodeFactory,
31250
- Rn as RangeReferenceObject,
31251
- wn as ReferenceNodeFactory,
31253
+ Nn as PrefixNodeFactory,
31254
+ pn as RangeReferenceObject,
31255
+ Sn as ReferenceNodeFactory,
31252
31256
  Uc as RegisterFunctionMutation,
31253
31257
  no as RemoveDefinedNameMutation,
31254
31258
  fa as RemoveFeatureCalculationMutation,
31255
31259
  ma as RemoveOtherFormulaMutation,
31256
31260
  Kc as RemoveSuperTableMutation,
31257
- Ns as SetArrayFormulaDataMutation,
31261
+ Os as SetArrayFormulaDataMutation,
31258
31262
  ca as SetDefinedNameMutation,
31259
31263
  Yb as SetDefinedNameMutationFactory,
31260
31264
  la as SetFeatureCalculationMutation,
31261
- Cn as SetFormulaCalculationNotificationMutation,
31265
+ _n as SetFormulaCalculationNotificationMutation,
31262
31266
  io as SetFormulaCalculationResultMutation,
31263
31267
  so as SetFormulaCalculationStartMutation,
31264
31268
  ao as SetFormulaCalculationStopMutation,
@@ -31268,16 +31272,16 @@ export {
31268
31272
  uo as SetSuperTableOptionMutation,
31269
31273
  il as SheetRowFilteredService,
31270
31274
  j as StringValueObject,
31271
- Sn as SuffixNodeFactory,
31275
+ Dn as SuffixNodeFactory,
31272
31276
  Nb as SuperTableService,
31273
- Dn as UnionNodeFactory,
31277
+ Ln as UnionNodeFactory,
31274
31278
  Hi as UniverFormulaEnginePlugin,
31275
31279
  jo as ValueNodeFactory,
31276
31280
  Vt as ValueObjectFactory,
31277
31281
  $ as compareToken,
31278
31282
  Rc as convertUnitDataToRuntime,
31279
31283
  Th as deserializeRangeForR1C1,
31280
- dn as deserializeRangeWithSheet,
31284
+ Cn as deserializeRangeWithSheet,
31281
31285
  mr as deserializeRangeWithSheetWithCache,
31282
31286
  kh as functionArray,
31283
31287
  ym as functionCompatibility,
@@ -31318,10 +31322,10 @@ export {
31318
31322
  X as operatorToken,
31319
31323
  $e as sequenceNodeType,
31320
31324
  fr as serializeRange,
31321
- Os as serializeRangeToRefString,
31325
+ Ms as serializeRangeToRefString,
31322
31326
  Bc as serializeRangeWithSheet,
31323
31327
  Ic as serializeRangeWithSpreadsheet,
31324
- us as singleReferenceToGrid,
31328
+ cs as singleReferenceToGrid,
31325
31329
  yi as strip,
31326
31330
  Sf as stripErrorMargin
31327
31331
  };