@univerjs/engine-formula 0.10.14-nightly.202511031023 → 0.10.14-nightly.202511070628
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +2 -2
- package/lib/es/index.js +198 -192
- package/lib/index.js +198 -192
- package/lib/types/engine/ast-node/base-ast-node.d.ts +1 -2
- package/lib/types/engine/utils/reference.d.ts +12 -0
- package/lib/types/index.d.ts +2 -2
- package/lib/umd/index.js +2 -2
- package/package.json +3 -3
package/lib/index.js
CHANGED
|
@@ -18,7 +18,7 @@ function bc(i, a, e, t, r) {
|
|
|
18
18
|
}
|
|
19
19
|
var m = /* @__PURE__ */ ((i) => (i.DIV_BY_ZERO = "#DIV/0!", i.NAME = "#NAME?", i.VALUE = "#VALUE!", i.NUM = "#NUM!", i.NA = "#N/A", i.CYCLE = "#CYCLE!", i.REF = "#REF!", i.SPILL = "#SPILL!", i.CALC = "#CALC!", i.ERROR = "#ERROR!", i.CONNECT = "#GETTING_DATA", i.NULL = "#NULL!", i))(m || {});
|
|
20
20
|
const or = new Set(Object.values(m)), za = [...new Set(Object.values(m).map((i) => i.length))];
|
|
21
|
-
var yc = /* @__PURE__ */ ((i) => (i[i.Financial = 0] = "Financial", i[i.Date = 1] = "Date", i[i.Math = 2] = "Math", i[i.Statistical = 3] = "Statistical", i[i.Lookup = 4] = "Lookup", i[i.Database = 5] = "Database", i[i.Text = 6] = "Text", i[i.Logical = 7] = "Logical", i[i.Information = 8] = "Information", i[i.Engineering = 9] = "Engineering", i[i.Cube = 10] = "Cube", i[i.Compatibility = 11] = "Compatibility", i[i.Web = 12] = "Web", i[i.Array = 13] = "Array", i[i.Univer = 14] = "Univer", i[i.User = 15] = "User", i[i.DefinedName = 16] = "DefinedName", i))(yc || {}), X = /* @__PURE__ */ ((i) => (i.PLUS = "+", i.MINUS = "-", i.MULTIPLY = "*", i.DIVIDED = "/", i.CONCATENATE = "&", i.POWER = "^", i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(X || {}),
|
|
21
|
+
var yc = /* @__PURE__ */ ((i) => (i[i.Financial = 0] = "Financial", i[i.Date = 1] = "Date", i[i.Math = 2] = "Math", i[i.Statistical = 3] = "Statistical", i[i.Lookup = 4] = "Lookup", i[i.Database = 5] = "Database", i[i.Text = 6] = "Text", i[i.Logical = 7] = "Logical", i[i.Information = 8] = "Information", i[i.Engineering = 9] = "Engineering", i[i.Cube = 10] = "Cube", i[i.Compatibility = 11] = "Compatibility", i[i.Web = 12] = "Web", i[i.Array = 13] = "Array", i[i.Univer = 14] = "Univer", i[i.User = 15] = "User", i[i.DefinedName = 16] = "DefinedName", i))(yc || {}), X = /* @__PURE__ */ ((i) => (i.PLUS = "+", i.MINUS = "-", i.MULTIPLY = "*", i.DIVIDED = "/", i.CONCATENATE = "&", i.POWER = "^", i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(X || {}), F = /* @__PURE__ */ ((i) => (i.EQUALS = "=", i.NOT_EQUAL = "<>", i.GREATER_THAN = ">", i.GREATER_THAN_OR_EQUAL = ">=", i.LESS_THAN = "<", i.LESS_THAN_OR_EQUAL = "<=", i))(F || {});
|
|
22
22
|
const sn = /* @__PURE__ */ new Map([
|
|
23
23
|
["<>", 4],
|
|
24
24
|
["<", 4],
|
|
@@ -50,7 +50,7 @@ const ls = /* @__PURE__ */ new Set([
|
|
|
50
50
|
]);
|
|
51
51
|
var Me = /* @__PURE__ */ ((i) => (i.AT = "@", i.MINUS = "-", i.PLUS = "+", i))(Me || {});
|
|
52
52
|
const pc = " ", zi = [
|
|
53
|
-
...Object.values(
|
|
53
|
+
...Object.values(F),
|
|
54
54
|
...Object.values(X),
|
|
55
55
|
...Object.values(K),
|
|
56
56
|
...Object.values(tt),
|
|
@@ -3047,22 +3047,22 @@ class Ht extends Hn {
|
|
|
3047
3047
|
return g.create(m.NAME);
|
|
3048
3048
|
}
|
|
3049
3049
|
isEqual(e) {
|
|
3050
|
-
return this.compare(e,
|
|
3050
|
+
return this.compare(e, F.EQUALS);
|
|
3051
3051
|
}
|
|
3052
3052
|
isNotEqual(e) {
|
|
3053
|
-
return this.compare(e,
|
|
3053
|
+
return this.compare(e, F.NOT_EQUAL);
|
|
3054
3054
|
}
|
|
3055
3055
|
isGreaterThanOrEqual(e) {
|
|
3056
|
-
return this.compare(e,
|
|
3056
|
+
return this.compare(e, F.GREATER_THAN_OR_EQUAL);
|
|
3057
3057
|
}
|
|
3058
3058
|
isLessThanOrEqual(e) {
|
|
3059
|
-
return this.compare(e,
|
|
3059
|
+
return this.compare(e, F.LESS_THAN_OR_EQUAL);
|
|
3060
3060
|
}
|
|
3061
3061
|
isLessThan(e) {
|
|
3062
|
-
return this.compare(e,
|
|
3062
|
+
return this.compare(e, F.LESS_THAN);
|
|
3063
3063
|
}
|
|
3064
3064
|
isGreaterThan(e) {
|
|
3065
|
-
return this.compare(e,
|
|
3065
|
+
return this.compare(e, F.GREATER_THAN);
|
|
3066
3066
|
}
|
|
3067
3067
|
concatenateFront(e) {
|
|
3068
3068
|
return g.create(m.NAME);
|
|
@@ -3286,18 +3286,18 @@ function di(i) {
|
|
|
3286
3286
|
function Sl(i, a, e) {
|
|
3287
3287
|
let t = !1;
|
|
3288
3288
|
switch (e) {
|
|
3289
|
-
case
|
|
3289
|
+
case F.EQUALS:
|
|
3290
3290
|
t = Cs(i, a);
|
|
3291
3291
|
break;
|
|
3292
|
-
case
|
|
3292
|
+
case F.NOT_EQUAL:
|
|
3293
3293
|
t = !Cs(i, a);
|
|
3294
3294
|
break;
|
|
3295
|
-
case
|
|
3296
|
-
case
|
|
3295
|
+
case F.GREATER_THAN:
|
|
3296
|
+
case F.GREATER_THAN_OR_EQUAL:
|
|
3297
3297
|
t = Cs(i, a) || i > di(a);
|
|
3298
3298
|
break;
|
|
3299
|
-
case
|
|
3300
|
-
case
|
|
3299
|
+
case F.LESS_THAN:
|
|
3300
|
+
case F.LESS_THAN_OR_EQUAL:
|
|
3301
3301
|
t = i < di(a);
|
|
3302
3302
|
break;
|
|
3303
3303
|
}
|
|
@@ -3324,23 +3324,23 @@ function Is(i) {
|
|
|
3324
3324
|
function Aa(i) {
|
|
3325
3325
|
let a;
|
|
3326
3326
|
switch (i) {
|
|
3327
|
-
case
|
|
3328
|
-
a =
|
|
3327
|
+
case F.EQUALS:
|
|
3328
|
+
a = F.EQUALS;
|
|
3329
3329
|
break;
|
|
3330
|
-
case
|
|
3331
|
-
a =
|
|
3330
|
+
case F.GREATER_THAN:
|
|
3331
|
+
a = F.LESS_THAN;
|
|
3332
3332
|
break;
|
|
3333
|
-
case
|
|
3334
|
-
a =
|
|
3333
|
+
case F.GREATER_THAN_OR_EQUAL:
|
|
3334
|
+
a = F.LESS_THAN_OR_EQUAL;
|
|
3335
3335
|
break;
|
|
3336
|
-
case
|
|
3337
|
-
a =
|
|
3336
|
+
case F.LESS_THAN:
|
|
3337
|
+
a = F.GREATER_THAN;
|
|
3338
3338
|
break;
|
|
3339
|
-
case
|
|
3340
|
-
a =
|
|
3339
|
+
case F.LESS_THAN_OR_EQUAL:
|
|
3340
|
+
a = F.GREATER_THAN_OR_EQUAL;
|
|
3341
3341
|
break;
|
|
3342
|
-
case
|
|
3343
|
-
a =
|
|
3342
|
+
case F.NOT_EQUAL:
|
|
3343
|
+
a = F.NOT_EQUAL;
|
|
3344
3344
|
break;
|
|
3345
3345
|
}
|
|
3346
3346
|
return a;
|
|
@@ -3855,7 +3855,7 @@ var Ve = /* @__PURE__ */ (function() {
|
|
|
3855
3855
|
for (; !t[0] && t.length > 1; ) t.shift();
|
|
3856
3856
|
}
|
|
3857
3857
|
return function(t, r, n, s, o, u) {
|
|
3858
|
-
var c, l, f, h, d, _, C, E, b, R, p, N, M, w, S, D, L, U, x,
|
|
3858
|
+
var c, l, f, h, d, _, C, E, b, R, p, N, M, w, S, D, L, U, x, k, Q = t.constructor, ne = t.s == r.s ? 1 : -1, z = t.d, G = r.d;
|
|
3859
3859
|
if (!z || !z[0] || !G || !G[0])
|
|
3860
3860
|
return new Q(
|
|
3861
3861
|
// Return NaN if either NaN, or both Infinity or 0.
|
|
@@ -3874,9 +3874,9 @@ var Ve = /* @__PURE__ */ (function() {
|
|
|
3874
3874
|
_ = h || f < L;
|
|
3875
3875
|
} else {
|
|
3876
3876
|
for (h = u / (G[0] + 1) | 0, h > 1 && (G = i(G, h, u), z = i(z, h, u), x = G.length, L = z.length), D = x, p = z.slice(0, x), N = p.length; N < x; ) p[N++] = 0;
|
|
3877
|
-
|
|
3877
|
+
k = G.slice(), k.unshift(0), U = G[0], G[1] >= u / 2 && ++U;
|
|
3878
3878
|
do
|
|
3879
|
-
h = 0, c = a(G, p, x, N), c < 0 ? (M = p[0], x != N && (M = M * u + (p[1] || 0)), h = M / U | 0, h > 1 ? (h >= u && (h = u - 1), C = i(G, h, u), E = C.length, N = p.length, c = a(C, p, E, N), c == 1 && (h--, e(C, x < E ?
|
|
3879
|
+
h = 0, c = a(G, p, x, N), c < 0 ? (M = p[0], x != N && (M = M * u + (p[1] || 0)), h = M / U | 0, h > 1 ? (h >= u && (h = u - 1), C = i(G, h, u), E = C.length, N = p.length, c = a(C, p, E, N), c == 1 && (h--, e(C, x < E ? k : G, E, u))) : (h == 0 && (c = h = 1), C = G.slice()), E = C.length, E < N && C.unshift(0), e(p, C, N, u), c == -1 && (N = p.length, c = a(G, p, x, N), c < 1 && (h++, e(p, x < N ? k : G, N, u))), N = p.length) : c === 0 && (h++, p = [0]), R[f++] = h, c && p[0] ? p[N++] = z[D] || 0 : (p = [z[D]], N = 1);
|
|
3880
3880
|
while ((D++ < L || p[0] !== void 0) && w--);
|
|
3881
3881
|
_ = p[0] !== void 0;
|
|
3882
3882
|
}
|
|
@@ -4610,13 +4610,13 @@ const Xt = class Xt extends Ht {
|
|
|
4610
4610
|
}
|
|
4611
4611
|
_compareString(e) {
|
|
4612
4612
|
switch (e) {
|
|
4613
|
-
case
|
|
4614
|
-
case
|
|
4613
|
+
case F.GREATER_THAN:
|
|
4614
|
+
case F.GREATER_THAN_OR_EQUAL:
|
|
4615
4615
|
return !0;
|
|
4616
|
-
case
|
|
4617
|
-
case
|
|
4618
|
-
case
|
|
4619
|
-
case
|
|
4616
|
+
case F.EQUALS:
|
|
4617
|
+
case F.LESS_THAN:
|
|
4618
|
+
case F.LESS_THAN_OR_EQUAL:
|
|
4619
|
+
case F.NOT_EQUAL:
|
|
4620
4620
|
return !1;
|
|
4621
4621
|
}
|
|
4622
4622
|
}
|
|
@@ -4869,13 +4869,13 @@ class y extends Ht {
|
|
|
4869
4869
|
}
|
|
4870
4870
|
_compareString(e) {
|
|
4871
4871
|
switch (e) {
|
|
4872
|
-
case
|
|
4873
|
-
case
|
|
4874
|
-
case
|
|
4872
|
+
case F.EQUALS:
|
|
4873
|
+
case F.GREATER_THAN:
|
|
4874
|
+
case F.GREATER_THAN_OR_EQUAL:
|
|
4875
4875
|
return !1;
|
|
4876
|
-
case
|
|
4877
|
-
case
|
|
4878
|
-
case
|
|
4876
|
+
case F.LESS_THAN:
|
|
4877
|
+
case F.LESS_THAN_OR_EQUAL:
|
|
4878
|
+
case F.NOT_EQUAL:
|
|
4879
4879
|
return !0;
|
|
4880
4880
|
}
|
|
4881
4881
|
}
|
|
@@ -4884,29 +4884,29 @@ class y extends Ht {
|
|
|
4884
4884
|
}
|
|
4885
4885
|
_compareFiniteNumber(e, t, r) {
|
|
4886
4886
|
switch (r) {
|
|
4887
|
-
case
|
|
4887
|
+
case F.EQUALS:
|
|
4888
4888
|
return bi(e, t);
|
|
4889
|
-
case
|
|
4889
|
+
case F.GREATER_THAN:
|
|
4890
4890
|
return Df(e, t);
|
|
4891
|
-
case
|
|
4891
|
+
case F.GREATER_THAN_OR_EQUAL:
|
|
4892
4892
|
return Lf(e, t);
|
|
4893
|
-
case
|
|
4893
|
+
case F.LESS_THAN:
|
|
4894
4894
|
return Pf(e, t);
|
|
4895
|
-
case
|
|
4895
|
+
case F.LESS_THAN_OR_EQUAL:
|
|
4896
4896
|
return xf(e, t);
|
|
4897
|
-
case
|
|
4897
|
+
case F.NOT_EQUAL:
|
|
4898
4898
|
return !bi(e, t);
|
|
4899
4899
|
}
|
|
4900
4900
|
}
|
|
4901
4901
|
_compareBoolean(e) {
|
|
4902
4902
|
switch (e) {
|
|
4903
|
-
case
|
|
4904
|
-
case
|
|
4905
|
-
case
|
|
4903
|
+
case F.EQUALS:
|
|
4904
|
+
case F.GREATER_THAN:
|
|
4905
|
+
case F.GREATER_THAN_OR_EQUAL:
|
|
4906
4906
|
return !1;
|
|
4907
|
-
case
|
|
4908
|
-
case
|
|
4909
|
-
case
|
|
4907
|
+
case F.LESS_THAN:
|
|
4908
|
+
case F.LESS_THAN_OR_EQUAL:
|
|
4909
|
+
case F.NOT_EQUAL:
|
|
4910
4910
|
return !0;
|
|
4911
4911
|
}
|
|
4912
4912
|
}
|
|
@@ -5122,22 +5122,22 @@ class y extends Ht {
|
|
|
5122
5122
|
_compareInfinity(e, t, r) {
|
|
5123
5123
|
let n = !1;
|
|
5124
5124
|
switch (r) {
|
|
5125
|
-
case
|
|
5125
|
+
case F.EQUALS:
|
|
5126
5126
|
n = e === t;
|
|
5127
5127
|
break;
|
|
5128
|
-
case
|
|
5128
|
+
case F.GREATER_THAN:
|
|
5129
5129
|
n = e > t;
|
|
5130
5130
|
break;
|
|
5131
|
-
case
|
|
5131
|
+
case F.GREATER_THAN_OR_EQUAL:
|
|
5132
5132
|
n = e >= t;
|
|
5133
5133
|
break;
|
|
5134
|
-
case
|
|
5134
|
+
case F.LESS_THAN:
|
|
5135
5135
|
n = e < t;
|
|
5136
5136
|
break;
|
|
5137
|
-
case
|
|
5137
|
+
case F.LESS_THAN_OR_EQUAL:
|
|
5138
5138
|
n = e <= t;
|
|
5139
5139
|
break;
|
|
5140
|
-
case
|
|
5140
|
+
case F.NOT_EQUAL:
|
|
5141
5141
|
n = e !== t;
|
|
5142
5142
|
break;
|
|
5143
5143
|
}
|
|
@@ -5209,41 +5209,41 @@ class j extends Ht {
|
|
|
5209
5209
|
}
|
|
5210
5210
|
_compareString(e, t, r) {
|
|
5211
5211
|
switch (r) {
|
|
5212
|
-
case
|
|
5212
|
+
case F.EQUALS:
|
|
5213
5213
|
return e === t;
|
|
5214
|
-
case
|
|
5214
|
+
case F.GREATER_THAN:
|
|
5215
5215
|
return e > t;
|
|
5216
|
-
case
|
|
5216
|
+
case F.GREATER_THAN_OR_EQUAL:
|
|
5217
5217
|
return e >= t;
|
|
5218
|
-
case
|
|
5218
|
+
case F.LESS_THAN:
|
|
5219
5219
|
return e < t;
|
|
5220
|
-
case
|
|
5220
|
+
case F.LESS_THAN_OR_EQUAL:
|
|
5221
5221
|
return e <= t;
|
|
5222
|
-
case
|
|
5222
|
+
case F.NOT_EQUAL:
|
|
5223
5223
|
return e !== t;
|
|
5224
5224
|
}
|
|
5225
5225
|
}
|
|
5226
5226
|
_compareNumber(e) {
|
|
5227
5227
|
switch (e) {
|
|
5228
|
-
case
|
|
5229
|
-
case
|
|
5230
|
-
case
|
|
5228
|
+
case F.NOT_EQUAL:
|
|
5229
|
+
case F.GREATER_THAN:
|
|
5230
|
+
case F.GREATER_THAN_OR_EQUAL:
|
|
5231
5231
|
return !0;
|
|
5232
|
-
case
|
|
5233
|
-
case
|
|
5234
|
-
case
|
|
5232
|
+
case F.EQUALS:
|
|
5233
|
+
case F.LESS_THAN:
|
|
5234
|
+
case F.LESS_THAN_OR_EQUAL:
|
|
5235
5235
|
return !1;
|
|
5236
5236
|
}
|
|
5237
5237
|
}
|
|
5238
5238
|
_compareBoolean(e) {
|
|
5239
5239
|
switch (e) {
|
|
5240
|
-
case
|
|
5241
|
-
case
|
|
5242
|
-
case
|
|
5240
|
+
case F.EQUALS:
|
|
5241
|
+
case F.GREATER_THAN:
|
|
5242
|
+
case F.GREATER_THAN_OR_EQUAL:
|
|
5243
5243
|
return !1;
|
|
5244
|
-
case
|
|
5245
|
-
case
|
|
5246
|
-
case
|
|
5244
|
+
case F.LESS_THAN:
|
|
5245
|
+
case F.LESS_THAN_OR_EQUAL:
|
|
5246
|
+
case F.NOT_EQUAL:
|
|
5247
5247
|
return !0;
|
|
5248
5248
|
}
|
|
5249
5249
|
}
|
|
@@ -5603,7 +5603,7 @@ class q extends Ht {
|
|
|
5603
5603
|
if (f == null)
|
|
5604
5604
|
return !0;
|
|
5605
5605
|
let _;
|
|
5606
|
-
if (n === !0 ? _ = f.compare(e,
|
|
5606
|
+
if (n === !0 ? _ = f.compare(e, F.EQUALS) : _ = f.isEqual(e), (_ == null ? void 0 : _.getValue()) === !0)
|
|
5607
5607
|
return s = f, u = { row: h, column: d }, !1;
|
|
5608
5608
|
t === Le.MAX ? f.isGreaterThan(e).getValue() === !0 && (o == null || f.minus(e).abs().isLessThanOrEqual(o.minus(e).abs()).getValue() === !0) && (o = f, c = { row: h, column: d }) : t === Le.MIN && f.isLessThan(e).getValue() === !0 && (o == null || f.minus(e).abs().isLessThanOrEqual(o.minus(e).abs()).getValue() === !0) && (o = f, c = { row: h, column: d });
|
|
5609
5609
|
};
|
|
@@ -6042,61 +6042,64 @@ class q extends Ht {
|
|
|
6042
6042
|
f + u - 1
|
|
6043
6043
|
);
|
|
6044
6044
|
if (d.length > 0) {
|
|
6045
|
-
|
|
6046
|
-
|
|
6045
|
+
let C = !1;
|
|
6046
|
+
if (s === F.EQUALS) {
|
|
6047
|
+
const E = We.getCellPositions(
|
|
6047
6048
|
c,
|
|
6048
6049
|
l,
|
|
6049
6050
|
t + h,
|
|
6050
6051
|
e.getValue(),
|
|
6051
6052
|
d
|
|
6052
6053
|
);
|
|
6053
|
-
|
|
6054
|
-
if (
|
|
6054
|
+
E != null && (E.forEach((b) => {
|
|
6055
|
+
if (b < f || b > f + u - 1)
|
|
6055
6056
|
return;
|
|
6056
|
-
const
|
|
6057
|
-
r[
|
|
6058
|
-
});
|
|
6057
|
+
const R = b - f;
|
|
6058
|
+
r[R] == null && (r[R] = []), r[R][t] = T.create(!0);
|
|
6059
|
+
}), C = !0);
|
|
6059
6060
|
} else {
|
|
6060
|
-
const
|
|
6061
|
+
const E = We.getCellValuePositions(
|
|
6061
6062
|
c,
|
|
6062
6063
|
l,
|
|
6063
6064
|
t + h
|
|
6064
6065
|
);
|
|
6065
|
-
|
|
6066
|
-
let
|
|
6067
|
-
or.has(
|
|
6068
|
-
let
|
|
6069
|
-
|
|
6070
|
-
|
|
6066
|
+
E != null && E.forEach((b, R) => {
|
|
6067
|
+
let p = ce.create();
|
|
6068
|
+
or.has(R) ? p = g.create(R) : typeof R == "string" ? p = j.create(R) : typeof R == "number" ? p = y.create(R) : typeof R == "boolean" && (p = T.create(R));
|
|
6069
|
+
let N;
|
|
6070
|
+
p.isError() ? N = p : e.isError() ? N = e : N = p.compare(e, s, o), (N.isError() || N.getValue() === !0) && b.forEach((M) => {
|
|
6071
|
+
M >= f && M <= f + u - 1 && (r[M - f] == null && (r[M - f] = []), r[M - f][t] = N);
|
|
6071
6072
|
});
|
|
6072
6073
|
});
|
|
6073
6074
|
}
|
|
6074
|
-
if (
|
|
6075
|
-
|
|
6076
|
-
const
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6075
|
+
if (!(s === F.EQUALS && !C && !o)) {
|
|
6076
|
+
if (_.length > 0)
|
|
6077
|
+
for (const E of _) {
|
|
6078
|
+
const [b, R] = E;
|
|
6079
|
+
for (let p = b; p <= R; p++)
|
|
6080
|
+
this.__batchOperatorRowValue(
|
|
6081
|
+
e,
|
|
6082
|
+
t,
|
|
6083
|
+
r,
|
|
6084
|
+
n,
|
|
6085
|
+
p - f,
|
|
6086
|
+
c,
|
|
6087
|
+
l,
|
|
6088
|
+
f,
|
|
6089
|
+
h,
|
|
6090
|
+
s,
|
|
6091
|
+
o
|
|
6092
|
+
);
|
|
6093
|
+
We.setContinueBuildingCache(
|
|
6084
6094
|
c,
|
|
6085
6095
|
l,
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
o
|
|
6096
|
+
t + h,
|
|
6097
|
+
b,
|
|
6098
|
+
R
|
|
6090
6099
|
);
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
t + h,
|
|
6095
|
-
E,
|
|
6096
|
-
b
|
|
6097
|
-
);
|
|
6098
|
-
}
|
|
6099
|
-
return;
|
|
6100
|
+
}
|
|
6101
|
+
return;
|
|
6102
|
+
}
|
|
6100
6103
|
}
|
|
6101
6104
|
}
|
|
6102
6105
|
for (let d = 0; d < u; d++)
|
|
@@ -6173,7 +6176,7 @@ class q extends Ht {
|
|
|
6173
6176
|
}
|
|
6174
6177
|
else
|
|
6175
6178
|
r[s][t] = g.create(m.NA);
|
|
6176
|
-
d != null && (d.isError() ? We.set(
|
|
6179
|
+
d != null && (d.isNull() || (d.isError() ? We.set(
|
|
6177
6180
|
o,
|
|
6178
6181
|
u,
|
|
6179
6182
|
t + l,
|
|
@@ -6185,7 +6188,7 @@ class q extends Ht {
|
|
|
6185
6188
|
t + l,
|
|
6186
6189
|
d.getValue(),
|
|
6187
6190
|
s + c
|
|
6188
|
-
));
|
|
6191
|
+
)));
|
|
6189
6192
|
}
|
|
6190
6193
|
// eslint-disable-next-line max-lines-per-function, complexity
|
|
6191
6194
|
_batchOperatorArray(e, t, r, n) {
|
|
@@ -6870,19 +6873,19 @@ function Fr(i, a, e, t = "", r = "") {
|
|
|
6870
6873
|
}
|
|
6871
6874
|
function Va(i) {
|
|
6872
6875
|
const a = [
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6876
|
+
F.EQUALS,
|
|
6877
|
+
F.NOT_EQUAL,
|
|
6878
|
+
F.GREATER_THAN_OR_EQUAL,
|
|
6879
|
+
F.GREATER_THAN,
|
|
6880
|
+
F.LESS_THAN_OR_EQUAL,
|
|
6881
|
+
F.LESS_THAN
|
|
6879
6882
|
];
|
|
6880
6883
|
for (const e of a)
|
|
6881
6884
|
if (i.startsWith(e)) {
|
|
6882
6885
|
const t = i.substring(e.length);
|
|
6883
6886
|
return [e, Mt.create(t)];
|
|
6884
6887
|
}
|
|
6885
|
-
return [
|
|
6888
|
+
return [F.EQUALS, Mt.create(i)];
|
|
6886
6889
|
}
|
|
6887
6890
|
function Zn(i, a, e, t) {
|
|
6888
6891
|
if (!e)
|
|
@@ -6890,7 +6893,7 @@ function Zn(i, a, e, t) {
|
|
|
6890
6893
|
const r = `${a.getValue()}`, [n, s] = Va(r);
|
|
6891
6894
|
e = n, a = s;
|
|
6892
6895
|
} else
|
|
6893
|
-
e =
|
|
6896
|
+
e = F.EQUALS;
|
|
6894
6897
|
return i.compare(a, e, t);
|
|
6895
6898
|
}
|
|
6896
6899
|
function Hf(i, a) {
|
|
@@ -7055,7 +7058,7 @@ function zn(i, a, e) {
|
|
|
7055
7058
|
return n;
|
|
7056
7059
|
if (u != null && u.isError() && r.isError() && u.getValue() === r.getValue())
|
|
7057
7060
|
return T.create(!0);
|
|
7058
|
-
if (t ===
|
|
7061
|
+
if (t === F.EQUALS || t === F.NOT_EQUAL) {
|
|
7059
7062
|
if (u != null && u.isNumber() && r.isString()) {
|
|
7060
7063
|
const c = r.convertToNumberObjectValue();
|
|
7061
7064
|
if (c.isNumber())
|
|
@@ -7066,9 +7069,9 @@ function zn(i, a, e) {
|
|
|
7066
7069
|
if (c.isNumber())
|
|
7067
7070
|
return c.compare(r, t);
|
|
7068
7071
|
}
|
|
7069
|
-
if (t ===
|
|
7072
|
+
if (t === F.EQUALS)
|
|
7070
7073
|
return T.create(!1);
|
|
7071
|
-
if (t ===
|
|
7074
|
+
if (t === F.NOT_EQUAL)
|
|
7072
7075
|
return T.create(!0);
|
|
7073
7076
|
}
|
|
7074
7077
|
return T.create(!1);
|
|
@@ -7343,15 +7346,15 @@ let Ws = class extends Ne {
|
|
|
7343
7346
|
const S = this._currentConfigService.getUnitData();
|
|
7344
7347
|
E.iterator((D, L, U) => {
|
|
7345
7348
|
var ne, z;
|
|
7346
|
-
const x = L - b + e,
|
|
7349
|
+
const x = L - b + e, k = U - R + t, Q = (z = (ne = S[o]) == null ? void 0 : ne[s]) == null ? void 0 : z.cellData.getValue(x, k);
|
|
7347
7350
|
if (L === b && U === R)
|
|
7348
7351
|
_.setValue(e, t, w);
|
|
7349
7352
|
else if (Q != null)
|
|
7350
|
-
Q.v == null && (Q.v = ""), _.setValue(x,
|
|
7353
|
+
Q.v == null && (Q.v = ""), _.setValue(x, k, Q);
|
|
7351
7354
|
else {
|
|
7352
|
-
if (this._isInOtherArrayFormulaRange(o, s, e, t, x,
|
|
7355
|
+
if (this._isInOtherArrayFormulaRange(o, s, e, t, x, k))
|
|
7353
7356
|
return !0;
|
|
7354
|
-
_.setValue(x,
|
|
7357
|
+
_.setValue(x, k, { v: "" });
|
|
7355
7358
|
}
|
|
7356
7359
|
});
|
|
7357
7360
|
} else {
|
|
@@ -7371,8 +7374,8 @@ let Ws = class extends Ne {
|
|
|
7371
7374
|
return C.setValue(e, t, {}), d.setValue(e, t, { ...this._getValueObjectOfRuntimeData(w) }), !1;
|
|
7372
7375
|
d.setValue(e, t, { ...U });
|
|
7373
7376
|
}
|
|
7374
|
-
const x = D - b + e,
|
|
7375
|
-
_.setValue(x,
|
|
7377
|
+
const x = D - b + e, k = L - R + t;
|
|
7378
|
+
_.setValue(x, k, U);
|
|
7376
7379
|
});
|
|
7377
7380
|
}
|
|
7378
7381
|
} else {
|
|
@@ -9791,9 +9794,9 @@ let Zs = class extends Ne {
|
|
|
9791
9794
|
const E = Vi(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)) || cr(this._dependencyManagerService), M = new bs(N);
|
|
9792
9795
|
for (let w = 0; w < _.length; w++) {
|
|
9793
9796
|
const S = _[w], { startRow: D, startColumn: L, endRow: U, endColumn: x } = S;
|
|
9794
|
-
for (let
|
|
9797
|
+
for (let k = D; k <= U; k++)
|
|
9795
9798
|
for (let Q = L; Q <= x; Q++) {
|
|
9796
|
-
const ne = Q - R, z =
|
|
9799
|
+
const ne = Q - R, z = k - b;
|
|
9797
9800
|
if (ne === 0 && z === 0) {
|
|
9798
9801
|
M.node = E, M.formula = d, M.unitId = r, M.subUnitId = o, M.formulaId = l, M.type = Ks.OTHER_FORMULA, M.isCache = C, t.push(M), this._dependencyManagerService.addOtherFormulaDependency(r, o, l, M), this._dependencyManagerService.addFormulaDependencyByDefinedName(M);
|
|
9799
9802
|
continue;
|
|
@@ -10802,7 +10805,7 @@ class V {
|
|
|
10802
10805
|
return r ? this._getOneFirstByRaw(n) : this._getOneLastByRaw(n);
|
|
10803
10806
|
}
|
|
10804
10807
|
fuzzySearch(a, e, t, r = !0) {
|
|
10805
|
-
const n = t.pickRaw(e.compare(a,
|
|
10808
|
+
const n = t.pickRaw(e.compare(a, F.EQUALS));
|
|
10806
10809
|
return r ? this._getOneFirstByRaw(n) : this._getOneLastByRaw(n);
|
|
10807
10810
|
}
|
|
10808
10811
|
orderSearch(a, e, t, r = Le.MIN, n = !1) {
|
|
@@ -10822,7 +10825,7 @@ class V {
|
|
|
10822
10825
|
return r ? o = s.getFirstTruePosition() : o = s.getLastTruePosition(), o == null ? g.create(m.NA) : n === 0 ? t.slice([o.row, o.row + 1]) : t.slice(void 0, [o.column, o.column + 1]);
|
|
10823
10826
|
}
|
|
10824
10827
|
fuzzySearchExpand(a, e, t, r = !0, n = 0) {
|
|
10825
|
-
const s = e.compare(a,
|
|
10828
|
+
const s = e.compare(a, F.EQUALS);
|
|
10826
10829
|
let o;
|
|
10827
10830
|
return r ? o = s.getFirstTruePosition() : o = s.getLastTruePosition(), o == null ? g.create(m.NA) : n === 0 ? t.slice([o.row, o.row + 1]) : t.slice(void 0, [o.column, o.column + 1]);
|
|
10828
10831
|
}
|
|
@@ -17579,8 +17582,8 @@ class F1 extends V {
|
|
|
17579
17582
|
const D = $(b);
|
|
17580
17583
|
if (typeof D != "number")
|
|
17581
17584
|
return D;
|
|
17582
|
-
const L = +R.getValue(), U = +p.getValue(), x = Math.floor(+N.getValue()),
|
|
17583
|
-
return Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(
|
|
17585
|
+
const L = +R.getValue(), U = +p.getValue(), x = Math.floor(+N.getValue()), k = Math.floor(+M.getValue()), Q = +f.getValue();
|
|
17586
|
+
return Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(k) || Number.isNaN(Q) ? g.create(m.VALUE) : L <= 0 || U <= 0 || ![1, 2, 4].includes(x) || k < 0 || k > 4 || Math.floor(w) >= Math.floor(D) ? g.create(m.NUM) : this._getResult(w, S, D, L, U, x, k, Q);
|
|
17584
17587
|
}
|
|
17585
17588
|
_getResult(e, t, r, n, s, o, u, c) {
|
|
17586
17589
|
let l = $t(e, t, o);
|
|
@@ -17903,7 +17906,7 @@ class Z1 extends V {
|
|
|
17903
17906
|
const p = f.get(b, R), N = h.get(b, R), M = d.get(b, R), w = _.get(b, R), { isError: S, errorObject: D, variants: L } = B(E, p, N, M, w);
|
|
17904
17907
|
if (S)
|
|
17905
17908
|
return D;
|
|
17906
|
-
const [U, x,
|
|
17909
|
+
const [U, x, k, Q, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +k.getValue();
|
|
17907
17910
|
let de = +Q.getValue();
|
|
17908
17911
|
const Ee = Math.floor(+ne.getValue());
|
|
17909
17912
|
return z < 0 || G < 0 || ge <= 0 || de <= 0 || Math.floor(de) > Math.floor(ge) || Ee < 1 || Ee > 12 ? g.create(m.NUM) : (de < 1 && (de = 1), de = Math.floor(de), this._getResult(z, G, ge, de, Ee, b, R));
|
|
@@ -17946,7 +17949,7 @@ class z1 extends V {
|
|
|
17946
17949
|
const p = f.get(b, R), N = h.get(b, R), M = d.get(b, R), w = _.get(b, R), { isError: S, errorObject: D, variants: L } = B(E, p, N, M, w);
|
|
17947
17950
|
if (S)
|
|
17948
17951
|
return D;
|
|
17949
|
-
const [U, x,
|
|
17952
|
+
const [U, x, k, Q, ne] = L, z = +U.getValue(), G = +x.getValue(), ge = +k.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
|
|
17950
17953
|
if (z < 0 || G < 0 || ge <= 0 || de <= 0 || de > ge || Ee <= 0)
|
|
17951
17954
|
return g.create(m.NUM);
|
|
17952
17955
|
const pe = na(z, G, ge, de, Ee);
|
|
@@ -18100,7 +18103,7 @@ class s0 extends V {
|
|
|
18100
18103
|
const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
|
|
18101
18104
|
if (D)
|
|
18102
18105
|
return L;
|
|
18103
|
-
const [x,
|
|
18106
|
+
const [x, k, Q, ne, z] = U, G = +x.getValue(), ge = +k.getValue(), de = +Q.getValue(), Ee = +ne.getValue(), pe = +z.getValue(), me = ar(G, ge, de, Ee, pe ? 1 : 0);
|
|
18104
18107
|
return Number.isNaN(me) || !Number.isFinite(me) ? g.create(m.NUM) : R === 0 && p === 0 ? y.create(me, ze(this.getLocale())) : y.create(me);
|
|
18105
18108
|
});
|
|
18106
18109
|
return c === 1 && l === 1 ? E.get(0, 0) : E;
|
|
@@ -18190,9 +18193,9 @@ class o0 extends V {
|
|
|
18190
18193
|
u.isArray() ? u.getColumnCount() : 1,
|
|
18191
18194
|
c.isArray() ? c.getColumnCount() : 1
|
|
18192
18195
|
), h = O(l, f, e, g.create(m.NA)), d = O(l, f, t, g.create(m.NA)), _ = O(l, f, r, g.create(m.NA)), C = O(l, f, n, g.create(m.NA)), E = O(l, f, u, g.create(m.NA)), b = O(l, f, c, g.create(m.NA)), R = h.map((p, N, M) => {
|
|
18193
|
-
const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject:
|
|
18196
|
+
const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject: k, variants: Q } = B(p, w, S, D, L, U);
|
|
18194
18197
|
if (x)
|
|
18195
|
-
return
|
|
18198
|
+
return k;
|
|
18196
18199
|
const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ve = +G.getValue(), ht = +ge.getValue(), Dt = +de.getValue(), Lt = +Ee.getValue();
|
|
18197
18200
|
if (me < 1 || Math.floor(me) > Math.ceil(ve))
|
|
18198
18201
|
return g.create(m.NUM);
|
|
@@ -18282,10 +18285,10 @@ class c0 extends V {
|
|
|
18282
18285
|
const E = c.get(_, C), b = l.get(_, C), R = f.get(_, C), { isError: p, errorObject: N, variants: M } = B(d, E, b, R);
|
|
18283
18286
|
if (p)
|
|
18284
18287
|
return N;
|
|
18285
|
-
const [w, S, D, L] = M, U = +w.getValue(), x = +S.getValue(),
|
|
18286
|
-
if (
|
|
18288
|
+
const [w, S, D, L] = M, U = +w.getValue(), x = +S.getValue(), k = +D.getValue(), Q = +L.getValue();
|
|
18289
|
+
if (k === 0)
|
|
18287
18290
|
return g.create(m.DIV_BY_ZERO);
|
|
18288
|
-
const ne = Q * U * (x /
|
|
18291
|
+
const ne = Q * U * (x / k - 1);
|
|
18289
18292
|
return y.create(ne);
|
|
18290
18293
|
});
|
|
18291
18294
|
return s === 1 && o === 1 ? h.get(0, 0) : h;
|
|
@@ -18450,7 +18453,7 @@ class m0 extends V {
|
|
|
18450
18453
|
const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
|
|
18451
18454
|
if (D)
|
|
18452
18455
|
return L;
|
|
18453
|
-
const [x,
|
|
18456
|
+
const [x, k, Q, ne, z] = U, G = +x.getValue(), ge = +k.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
|
|
18454
18457
|
let pe = +z.getValue();
|
|
18455
18458
|
if (pe = pe ? 1 : 0, G === 0 && ge === 0)
|
|
18456
18459
|
return g.create(m.DIV_BY_ZERO);
|
|
@@ -18554,12 +18557,12 @@ class d0 extends V {
|
|
|
18554
18557
|
const x = $(R);
|
|
18555
18558
|
if (typeof x != "number")
|
|
18556
18559
|
return x;
|
|
18557
|
-
const
|
|
18558
|
-
if (Number.isNaN(
|
|
18560
|
+
const k = +p.getValue(), Q = +N.getValue(), ne = +M.getValue(), z = Math.floor(+w.getValue()), G = Math.floor(+S.getValue());
|
|
18561
|
+
if (Number.isNaN(k) || Number.isNaN(Q) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN(G))
|
|
18559
18562
|
return g.create(m.VALUE);
|
|
18560
|
-
if (
|
|
18563
|
+
if (k < 0 || Q < 0 || ne <= 0 || ![1, 2, 4].includes(z) || G < 0 || G > 4 || !this._validDate(L, x, D, U, z))
|
|
18561
18564
|
return g.create(m.NUM);
|
|
18562
|
-
const ge = Uu(D, L, U, x,
|
|
18565
|
+
const ge = Uu(D, L, U, x, k, Q, ne, z, G);
|
|
18563
18566
|
return y.create(ge);
|
|
18564
18567
|
}
|
|
18565
18568
|
_validDate(e, t, r, n, s) {
|
|
@@ -18593,8 +18596,8 @@ class C0 extends V {
|
|
|
18593
18596
|
const x = $(R);
|
|
18594
18597
|
if (typeof x != "number")
|
|
18595
18598
|
return x;
|
|
18596
|
-
const
|
|
18597
|
-
return Number.isNaN(
|
|
18599
|
+
const k = +p.getValue(), Q = +N.getValue(), ne = +M.getValue(), z = Math.floor(+w.getValue()), G = Math.floor(+S.getValue());
|
|
18600
|
+
return Number.isNaN(k) || Number.isNaN(Q) || Number.isNaN(ne) || Number.isNaN(z) || Number.isNaN(G) ? g.create(m.VALUE) : k < 0 || Q <= 0 || ne <= 0 || ![1, 2, 4].includes(z) || G < 0 || G > 4 || !this._validDate(L, x, D, U, z) ? g.create(m.NUM) : this._getResult(D, L, U, x, k, Q, ne, z, G);
|
|
18598
18601
|
}
|
|
18599
18602
|
_validDate(e, t, r, n, s) {
|
|
18600
18603
|
return this._getDateCorrectOrder(e, t, r, n) && vu(e, t, s) && Mr(n, e, s);
|
|
@@ -18632,12 +18635,12 @@ class _0 extends V {
|
|
|
18632
18635
|
const D = $(E);
|
|
18633
18636
|
if (typeof D != "number")
|
|
18634
18637
|
return D;
|
|
18635
|
-
const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(),
|
|
18636
|
-
if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(
|
|
18638
|
+
const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(), k = Math.floor(+N.getValue()), Q = Math.floor(+M.getValue());
|
|
18639
|
+
if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(k) || Number.isNaN(Q))
|
|
18637
18640
|
return g.create(m.VALUE);
|
|
18638
|
-
if (L < 0 || U < 0 || x <= 0 || ![1, 2, 4].includes(
|
|
18641
|
+
if (L < 0 || U < 0 || x <= 0 || ![1, 2, 4].includes(k) || Q < 0 || Q > 4 || !this._validDate(S, w, D, k))
|
|
18639
18642
|
return g.create(m.NUM);
|
|
18640
|
-
const ne = this._getResult(w, S, D, L, U, x,
|
|
18643
|
+
const ne = this._getResult(w, S, D, L, U, x, k, Q);
|
|
18641
18644
|
return y.create(ne);
|
|
18642
18645
|
}
|
|
18643
18646
|
_validDate(e, t, r, n) {
|
|
@@ -18695,12 +18698,12 @@ class A0 extends V {
|
|
|
18695
18698
|
const D = $(E);
|
|
18696
18699
|
if (typeof D != "number")
|
|
18697
18700
|
return D;
|
|
18698
|
-
const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(),
|
|
18699
|
-
if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(
|
|
18701
|
+
const L = +b.getValue(), U = +R.getValue(), x = +p.getValue(), k = Math.floor(+N.getValue()), Q = Math.floor(+M.getValue());
|
|
18702
|
+
if (Number.isNaN(L) || Number.isNaN(U) || Number.isNaN(x) || Number.isNaN(k) || Number.isNaN(Q))
|
|
18700
18703
|
return g.create(m.VALUE);
|
|
18701
|
-
if (L < 0 || U <= 0 || x <= 0 || ![1, 2, 4].includes(
|
|
18704
|
+
if (L < 0 || U <= 0 || x <= 0 || ![1, 2, 4].includes(k) || Q < 0 || Q > 4 || !this._validDate(S, w, D, k))
|
|
18702
18705
|
return g.create(m.NUM);
|
|
18703
|
-
const ne = this._getResult(w, S, D, L, U, x,
|
|
18706
|
+
const ne = this._getResult(w, S, D, L, U, x, k, Q);
|
|
18704
18707
|
return y.create(ne);
|
|
18705
18708
|
}
|
|
18706
18709
|
_validDate(e, t, r, n) {
|
|
@@ -18789,7 +18792,7 @@ class b0 extends V {
|
|
|
18789
18792
|
const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
|
|
18790
18793
|
if (D)
|
|
18791
18794
|
return L;
|
|
18792
|
-
const [x,
|
|
18795
|
+
const [x, k, Q, ne, z] = U, G = +x.getValue(), ge = +k.getValue(), de = +Q.getValue(), Ee = +ne.getValue(), pe = +z.getValue();
|
|
18793
18796
|
if (G <= -1)
|
|
18794
18797
|
return g.create(m.NUM);
|
|
18795
18798
|
const me = qr(G, ge, de, Ee, pe ? 1 : 0);
|
|
@@ -18821,9 +18824,9 @@ class y0 extends V {
|
|
|
18821
18824
|
u.isArray() ? u.getColumnCount() : 1,
|
|
18822
18825
|
c.isArray() ? c.getColumnCount() : 1
|
|
18823
18826
|
), h = O(l, f, e, g.create(m.NA)), d = O(l, f, t, g.create(m.NA)), _ = O(l, f, r, g.create(m.NA)), C = O(l, f, n, g.create(m.NA)), E = O(l, f, u, g.create(m.NA)), b = O(l, f, c, g.create(m.NA)), R = h.map((p, N, M) => {
|
|
18824
|
-
const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject:
|
|
18827
|
+
const w = d.get(N, M), S = _.get(N, M), D = C.get(N, M), L = E.get(N, M), U = b.get(N, M), { isError: x, errorObject: k, variants: Q } = B(p, w, S, D, L, U);
|
|
18825
18828
|
if (x)
|
|
18826
|
-
return
|
|
18829
|
+
return k;
|
|
18827
18830
|
const [ne, z, G, ge, de, Ee] = Q, pe = +ne.getValue(), me = +z.getValue(), ve = +G.getValue(), ht = +ge.getValue(), Dt = +de.getValue(), Lt = +Ee.getValue();
|
|
18828
18831
|
if (me < 1 || Math.floor(me) > Math.ceil(ve) || me - ve >= 1)
|
|
18829
18832
|
return g.create(m.NUM);
|
|
@@ -18914,7 +18917,7 @@ class V0 extends V {
|
|
|
18914
18917
|
const D = this._getDateCorrectOrder(p, R, N);
|
|
18915
18918
|
if (M < 0 || w < 0 || S < 0 || S > 4 || !D)
|
|
18916
18919
|
return g.create(m.NUM);
|
|
18917
|
-
const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days:
|
|
18920
|
+
const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days: k } = _e(N, R, S), Q = (100 + x / L * M * 100) / (1 + U / L * w) - k / L * M * 100;
|
|
18918
18921
|
return y.create(Q);
|
|
18919
18922
|
}
|
|
18920
18923
|
_getDateCorrectOrder(e, t, r) {
|
|
@@ -18945,7 +18948,7 @@ class N0 extends V {
|
|
|
18945
18948
|
const N = h.get(R, p), M = d.get(R, p), w = _.get(R, p), S = C.get(R, p), { isError: D, errorObject: L, variants: U } = B(b, N, M, w, S);
|
|
18946
18949
|
if (D)
|
|
18947
18950
|
return L;
|
|
18948
|
-
const [x,
|
|
18951
|
+
const [x, k, Q, ne, z] = U, G = +x.getValue(), ge = +k.getValue(), de = +Q.getValue(), Ee = +ne.getValue();
|
|
18949
18952
|
let pe = +z.getValue();
|
|
18950
18953
|
pe = pe ? 1 : 0;
|
|
18951
18954
|
const me = G === 0 ? -de * ge - Ee : ((1 - (1 + G) ** ge) / G * de * (1 + G * pe) - Ee) / (1 + G) ** ge;
|
|
@@ -18976,8 +18979,8 @@ class O0 extends V {
|
|
|
18976
18979
|
c.isArray() ? c.getColumnCount() : 1,
|
|
18977
18980
|
l.isArray() ? l.getColumnCount() : 1
|
|
18978
18981
|
), d = O(f, h, e, g.create(m.NA)), _ = O(f, h, t, g.create(m.NA)), C = O(f, h, r, g.create(m.NA)), E = O(f, h, u, g.create(m.NA)), b = O(f, h, c, g.create(m.NA)), R = O(f, h, l, g.create(m.NA)), p = d.map((N, M, w) => {
|
|
18979
|
-
const S = _.get(M, w), D = C.get(M, w), L = E.get(M, w), U = b.get(M, w), x = R.get(M, w), { isError:
|
|
18980
|
-
if (
|
|
18982
|
+
const S = _.get(M, w), D = C.get(M, w), L = E.get(M, w), U = b.get(M, w), x = R.get(M, w), { isError: k, errorObject: Q, variants: ne } = B(N, S, D, L, U, x);
|
|
18983
|
+
if (k)
|
|
18981
18984
|
return Q;
|
|
18982
18985
|
const [z, G, ge, de, Ee, pe] = ne, me = +z.getValue(), ve = +G.getValue(), ht = +ge.getValue(), Dt = +de.getValue();
|
|
18983
18986
|
let Lt = +Ee.getValue();
|
|
@@ -19270,7 +19273,7 @@ class j0 extends V {
|
|
|
19270
19273
|
const C = t.get(d, _), E = r.get(d, _), b = n.get(d, _), R = s.get(d, _), p = o.get(d, _), N = u.get(d, _), { isError: M, errorObject: w, variants: S } = B(h, C, E, b, R, p, N);
|
|
19271
19274
|
if (M)
|
|
19272
19275
|
return w;
|
|
19273
|
-
const [D, L, U, x,
|
|
19276
|
+
const [D, L, U, x, k, Q, ne] = S, z = +D.getValue(), G = +L.getValue(), ge = +U.getValue(), de = +x.getValue(), Ee = +k.getValue(), pe = +Q.getValue(), me = +ne.getValue();
|
|
19274
19277
|
if (z < 0 || G < 0 || ge < 0 || de < 0 || Ee < 0 || Ee > ge || de > Ee || pe < 0)
|
|
19275
19278
|
return g.create(m.NUM);
|
|
19276
19279
|
if (ge === 0 && de === 0 && Ee === 0)
|
|
@@ -19691,7 +19694,7 @@ class I0 extends V {
|
|
|
19691
19694
|
const D = this._getDateCorrectOrder(p, R, N);
|
|
19692
19695
|
if (M < 0 || w <= 0 || S < 0 || S > 4 || !D)
|
|
19693
19696
|
return g.create(m.NUM);
|
|
19694
|
-
const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days:
|
|
19697
|
+
const L = Du(R, S), { days: U } = _e(R, p, S), { days: x } = _e(N, p, S), { days: k } = _e(N, R, S), Q = ((1 + x / L * M) / (w / 100 + k / L * M) - 1) / (U / L);
|
|
19695
19698
|
return y.create(Q);
|
|
19696
19699
|
}
|
|
19697
19700
|
_getDateCorrectOrder(e, t, r) {
|
|
@@ -22840,7 +22843,7 @@ class fC extends V {
|
|
|
22840
22843
|
const u = Is(n), c = Bs(r);
|
|
22841
22844
|
o = s.binarySearch(e, u, c);
|
|
22842
22845
|
} else if (r === 2) {
|
|
22843
|
-
const u = s.compare(e,
|
|
22846
|
+
const u = s.compare(e, F.EQUALS);
|
|
22844
22847
|
let c;
|
|
22845
22848
|
if (n !== -1 ? c = u.getFirstTruePosition() : c = u.getLastTruePosition(), c == null)
|
|
22846
22849
|
return g.create(m.NA);
|
|
@@ -25350,7 +25353,7 @@ class F_ extends V {
|
|
|
25350
25353
|
super(...arguments);
|
|
25351
25354
|
A(this, "minParams", 2);
|
|
25352
25355
|
A(this, "maxParams", 2);
|
|
25353
|
-
A(this, "_compareType",
|
|
25356
|
+
A(this, "_compareType", F.EQUALS);
|
|
25354
25357
|
}
|
|
25355
25358
|
setCompareType(e) {
|
|
25356
25359
|
this._compareType = e;
|
|
@@ -26808,20 +26811,20 @@ class wA extends V {
|
|
|
26808
26811
|
const { coefficients: o, X: u, XTXInverse: c } = s;
|
|
26809
26812
|
let l = [];
|
|
26810
26813
|
if (n) {
|
|
26811
|
-
const f = e.flat(), h = f.length, d = r ? f.reduce((x,
|
|
26814
|
+
const f = e.flat(), h = f.length, d = r ? f.reduce((x, k) => x + k, 0) / h : 0, _ = c.length, C = h - _, E = o[0].length, b = new Array(E - 2).fill(m.NA), R = o[0][E - 1], p = [];
|
|
26812
26815
|
for (let x = 0; x < u.length; x++) {
|
|
26813
|
-
let
|
|
26816
|
+
let k = R;
|
|
26814
26817
|
for (let Q = E - 2; Q >= 0; Q--)
|
|
26815
|
-
|
|
26816
|
-
p.push(
|
|
26818
|
+
k += o[0][E - 2 - Q] * u[x][Q];
|
|
26819
|
+
p.push(k);
|
|
26817
26820
|
}
|
|
26818
26821
|
let N = 0, M = 0;
|
|
26819
26822
|
for (let x = 0; x < h; x++)
|
|
26820
26823
|
N += (f[x] - d) ** 2, M += (f[x] - p[x]) ** 2;
|
|
26821
26824
|
const w = N - M, S = N === 0 ? 0 : w / N, D = [];
|
|
26822
26825
|
for (let x = _ - 1; x >= 0; x--) {
|
|
26823
|
-
const
|
|
26824
|
-
D.push(
|
|
26826
|
+
const k = C > 0 ? Math.sqrt(M / C * c[x][x]) : 0;
|
|
26827
|
+
D.push(k);
|
|
26825
26828
|
}
|
|
26826
26829
|
if (r) {
|
|
26827
26830
|
const x = D.shift();
|
|
@@ -26929,25 +26932,25 @@ class SA extends V {
|
|
|
26929
26932
|
const { coefficients: o, Y: u, X: c, XTXInverse: l } = s;
|
|
26930
26933
|
let f = [];
|
|
26931
26934
|
if (n) {
|
|
26932
|
-
const h = u.flat(), d = h.length, _ = r ? h.reduce((
|
|
26933
|
-
for (let
|
|
26935
|
+
const h = u.flat(), d = h.length, _ = r ? h.reduce((k, Q) => k + Q, 0) / d : 0, C = l.length, E = d - C, b = o[0].length, R = new Array(b - 2).fill(m.NA), p = o[0][b - 1], N = [];
|
|
26936
|
+
for (let k = 0; k < c.length; k++) {
|
|
26934
26937
|
let Q = p;
|
|
26935
26938
|
for (let ne = b - 2; ne >= 0; ne--)
|
|
26936
|
-
Q *= o[0][b - 2 - ne] ** c[
|
|
26939
|
+
Q *= o[0][b - 2 - ne] ** c[k][ne];
|
|
26937
26940
|
N.push(Math.log(Q));
|
|
26938
26941
|
}
|
|
26939
26942
|
let M = 0, w = 0;
|
|
26940
|
-
for (let
|
|
26941
|
-
M += (h[
|
|
26943
|
+
for (let k = 0; k < d; k++)
|
|
26944
|
+
M += (h[k] - _) ** 2, !(!r && !Number.isFinite(N[k])) && (w += (h[k] - N[k]) ** 2);
|
|
26942
26945
|
Number.isFinite(w) || (w = 0);
|
|
26943
26946
|
const S = M - w, D = M === 0 ? 0 : S / M, L = [];
|
|
26944
|
-
for (let
|
|
26945
|
-
const Q = E > 0 ? Math.sqrt(w / E * l[
|
|
26947
|
+
for (let k = C - 1; k >= 0; k--) {
|
|
26948
|
+
const Q = E > 0 ? Math.sqrt(w / E * l[k][k]) : 0;
|
|
26946
26949
|
L.push(Q);
|
|
26947
26950
|
}
|
|
26948
26951
|
if (r) {
|
|
26949
|
-
const
|
|
26950
|
-
L.push(
|
|
26952
|
+
const k = L.shift();
|
|
26953
|
+
L.push(k);
|
|
26951
26954
|
} else
|
|
26952
26955
|
L.push(m.NA);
|
|
26953
26956
|
const U = E > 0 ? Math.sqrt(w / E) : 0, x = E > 0 ? S / (b - 1) / (w / E) : m.NUM;
|
|
@@ -30574,7 +30577,7 @@ class mb extends V {
|
|
|
30574
30577
|
return r;
|
|
30575
30578
|
const [u] = o, c = +u.getValue();
|
|
30576
30579
|
let l = r;
|
|
30577
|
-
c && (l = r.filter((h) => h !== null));
|
|
30580
|
+
c && (l = r.filter((h) => h !== null && h !== ""));
|
|
30578
30581
|
let f = "";
|
|
30579
30582
|
for (let h = 0; h < l.length; h++)
|
|
30580
30583
|
l[h] !== null && (f += l[h]), h < l.length - 1 && (f += e[h % e.length]);
|
|
@@ -31573,7 +31576,7 @@ export {
|
|
|
31573
31576
|
Wi as UniverFormulaEnginePlugin,
|
|
31574
31577
|
Io as ValueNodeFactory,
|
|
31575
31578
|
Mt as ValueObjectFactory,
|
|
31576
|
-
|
|
31579
|
+
F as compareToken,
|
|
31577
31580
|
Ic as convertUnitDataToRuntime,
|
|
31578
31581
|
Wh as deserializeRangeForR1C1,
|
|
31579
31582
|
Dr as deserializeRangeWithSheet,
|
|
@@ -31614,8 +31617,10 @@ export {
|
|
|
31614
31617
|
Wc as isReferenceStrings,
|
|
31615
31618
|
Xb as matchRefDrawToken,
|
|
31616
31619
|
K as matchToken,
|
|
31620
|
+
Ds as needsQuoting,
|
|
31617
31621
|
Kb as normalizeSheetName,
|
|
31618
31622
|
X as operatorToken,
|
|
31623
|
+
Ls as quoteSheetName,
|
|
31619
31624
|
$e as sequenceNodeType,
|
|
31620
31625
|
Ft as serializeRange,
|
|
31621
31626
|
Ss as serializeRangeToRefString,
|
|
@@ -31623,5 +31628,6 @@ export {
|
|
|
31623
31628
|
Gc as serializeRangeWithSpreadsheet,
|
|
31624
31629
|
fs as singleReferenceToGrid,
|
|
31625
31630
|
yi as strip,
|
|
31626
|
-
ba as stripErrorMargin
|
|
31631
|
+
ba as stripErrorMargin,
|
|
31632
|
+
ui as unquoteSheetName
|
|
31627
31633
|
};
|