@univerjs/sheets-formula 0.5.1 → 0.5.2
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,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var w = (n, e, a) =>
|
|
4
|
-
import { CommandType as
|
|
5
|
-
import { SetRangeValuesCommand as
|
|
6
|
-
import { sequenceNodeType as J, deserializeRangeWithSheetWithCache as se, serializeRangeToRefString as at, ErrorType as j, LexerTreeBuilder as _t, generateStringWithSequence as Xe, SetDefinedNameMutation as Me, IDefinedNamesService as qt, SetFormulaCalculationResultMutation as
|
|
7
|
-
import { Subject as
|
|
8
|
-
import { IRPCChannelService as
|
|
9
|
-
const
|
|
1
|
+
var Ga = Object.defineProperty;
|
|
2
|
+
var Ha = (n, e, a) => e in n ? Ga(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a;
|
|
3
|
+
var w = (n, e, a) => Ha(n, typeof e != "symbol" ? e + "" : e, a);
|
|
4
|
+
import { CommandType as ua, ICommandService as pe, ObjectMatrix as X, Tools as Ie, Rectangle as Ce, cellToRange as ma, Direction as He, isFormulaString as De, isFormulaId as fa, getIntersectRange as Ve, RANGE_TYPE as Y, Inject as W, Disposable as te, UniverInstanceType as ee, IUniverInstanceService as xe, LifecycleService as Ya, LocaleService as bt, ILogService as Xa, IConfigService as _e, Injector as tt, createIdentifier as Ot, toDisposable as Oe, moveRangeByOffset as Tt, DisposableCollection as Et, AbsoluteRefType as Ye, Optional as wa, Dimension as Ft, InterceptorEffectEnum as Wa, CellValueType as Bt, DependentOn as ca, Plugin as la, merge as sa, touchDependencies as ye, isNodeEnv as vt } from "@univerjs/core";
|
|
5
|
+
import { SetRangeValuesCommand as Ka, SetRangeValuesMutation as ie, handleMoveRange as pa, EffectRefRangId as G, runRefRangeMutations as H, handleMoveRows as da, handleMoveCols as La, handleInsertRow as Pa, handleInsertCol as Ta, handleIRemoveRow as Ea, handleIRemoveCol as Ia, handleDeleteRangeMoveLeft as Na, handleDeleteRangeMoveUp as Ra, handleInsertRangeMoveDown as Aa, handleInsertRangeMoveRight as Sa, RemoveDefinedNameCommand as Ca, SetDefinedNameCommand as Da, RemoveSheetCommand as Qa, SetWorksheetNameCommand as ka, DeleteRangeMoveLeftCommand as $a, DeleteRangeMoveUpCommand as ja, RemoveColCommand as za, RemoveRowCommand as Za, InsertRangeMoveDownCommand as Ja, InsertRangeMoveRightCommand as en, InsertColCommand as tn, InsertRowCommand as an, MoveColsCommand as nn, MoveRowsCommand as rn, MoveRangeCommand as on, SheetInterceptorService as Mt, SetStyleCommand as xt, SetBorderCommand as ba, ClearSelectionFormatCommand as Oa, RemoveSheetMutation as It, InsertSheetMutation as Nt, RefRangeService as un, handleDefaultRangeChangeWithEffectRefCommands as Vt, getSeparateEffectedRangesOnCommand as mn, handleCommonDefaultRangeChangeWithEffectRefCommands as fn, MoveRangeMutation as Gt, MoveRowsMutation as Ht, MoveColsMutation as Yt, ReorderRangeMutation as Xt, RemoveRowMutation as wt, RemoveColMutation as Wt, InsertColMutation as Kt, InsertRowMutation as Qt, INTERCEPTOR_POINT as cn, SetWorksheetActiveOperation as ln, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as ut, UniverSheetsPlugin as sn } from "@univerjs/sheets";
|
|
6
|
+
import { sequenceNodeType as J, deserializeRangeWithSheetWithCache as se, serializeRangeToRefString as at, ErrorType as j, LexerTreeBuilder as _t, generateStringWithSequence as Xe, SetDefinedNameMutation as Me, IDefinedNamesService as qt, SetFormulaCalculationResultMutation as pn, RemoveOtherFormulaMutation as dn, IActiveDirtyManagerService as yt, SetOtherFormulaMutation as Ln, FormulaDataModel as nt, SetFormulaCalculationStartMutation as Ae, SetFormulaCalculationStopMutation as kt, ENGINE_FORMULA_CYCLE_REFERENCE_COUNT as $t, SetFormulaCalculationNotificationMutation as Pn, FormulaExecuteStageType as ge, FormulaExecutedStateType as Ne, SetFormulaDataMutation as he, SetArrayFormulaDataMutation as Rt, initSheetFormulaData as jt, FUNCTION_NAMES_ARRAY as zt, FunctionType as t, FUNCTION_NAMES_COMPATIBILITY as _, FUNCTION_NAMES_CUBE as ce, FUNCTION_NAMES_DATABASE as $, FUNCTION_NAMES_DATE as B, FUNCTION_NAMES_ENGINEERING as A, FUNCTION_NAMES_FINANCIAL as C, FUNCTION_NAMES_INFORMATION as v, FUNCTION_NAMES_LOGICAL as K, FUNCTION_NAMES_LOOKUP as q, FUNCTION_NAMES_MATH as T, FUNCTION_NAMES_STATISTICAL as l, FUNCTION_NAMES_TEXT as D, FUNCTION_NAMES_WEB as mt, isReferenceStrings as Tn, functionArray as En, functionCompatibility as In, functionCube as Nn, functionDatabase as Rn, functionDate as An, functionEngineering as Sn, functionFinancial as Cn, functionInformation as Dn, functionLogical as bn, functionLookup as On, functionMath as Mn, functionMeta as xn, functionStatistical as _n, functionText as qn, functionUniver as yn, functionWeb as gn, IFunctionService as gt, serializeRangeWithSpreadsheet as Zt, serializeRangeWithSheet as Jt, serializeRange as ea, CustomFunction as Ma, RemoveDefinedNameMutation as At, stripErrorMargin as hn, UniverFormulaEnginePlugin as xa } from "@univerjs/engine-formula";
|
|
7
|
+
import { Subject as ta, BehaviorSubject as _a, bufferWhen as Un, filter as aa, map as Fn } from "rxjs";
|
|
8
|
+
import { IRPCChannelService as qa, fromModule as Bn, toModule as vn } from "@univerjs/rpc";
|
|
9
|
+
const Vn = {
|
|
10
10
|
id: "formula.command.insert-function",
|
|
11
|
-
type:
|
|
11
|
+
type: ua.COMMAND,
|
|
12
12
|
handler: async (n, e) => {
|
|
13
13
|
const { list: a } = e, i = n.get(pe), r = new X();
|
|
14
14
|
a.forEach((u) => {
|
|
@@ -27,20 +27,20 @@ const Un = {
|
|
|
27
27
|
const o = {
|
|
28
28
|
value: r.getData()
|
|
29
29
|
};
|
|
30
|
-
return i.executeCommand(
|
|
30
|
+
return i.executeCommand(Ka.id, o);
|
|
31
31
|
}
|
|
32
32
|
}, Ge = {
|
|
33
|
-
type:
|
|
33
|
+
type: ua.MUTATION,
|
|
34
34
|
id: "sheet.mutation.data-validation-formula-mark-dirty",
|
|
35
35
|
handler() {
|
|
36
36
|
return !0;
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
|
-
function
|
|
39
|
+
function Gn(n, e, a) {
|
|
40
40
|
var i;
|
|
41
41
|
return n == null || n[e] == null || ((i = n[e]) == null ? void 0 : i[a]) == null;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ft(n, e, a) {
|
|
44
44
|
var i;
|
|
45
45
|
if (a) {
|
|
46
46
|
if (n && n[e] && ((i = n[e]) != null && i[a]))
|
|
@@ -55,18 +55,18 @@ function mt(n, e, a) {
|
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
var y = /* @__PURE__ */ ((n) => (n[n.MoveRange = 0] = "MoveRange", n[n.MoveRows = 1] = "MoveRows", n[n.MoveCols = 2] = "MoveCols", n[n.InsertRow = 3] = "InsertRow", n[n.InsertColumn = 4] = "InsertColumn", n[n.RemoveRow = 5] = "RemoveRow", n[n.RemoveColumn = 6] = "RemoveColumn", n[n.DeleteMoveLeft = 7] = "DeleteMoveLeft", n[n.DeleteMoveUp = 8] = "DeleteMoveUp", n[n.InsertMoveDown = 9] = "InsertMoveDown", n[n.InsertMoveRight = 10] = "InsertMoveRight", n[n.SetName = 11] = "SetName", n[n.RemoveSheet = 12] = "RemoveSheet", n[n.SetDefinedName = 13] = "SetDefinedName", n[n.RemoveDefinedName = 14] = "RemoveDefinedName", n))(y || {});
|
|
58
|
-
const
|
|
58
|
+
const Hn = [
|
|
59
59
|
11,
|
|
60
60
|
12,
|
|
61
61
|
13,
|
|
62
62
|
14
|
|
63
63
|
/* RemoveDefinedName */
|
|
64
64
|
];
|
|
65
|
-
function
|
|
65
|
+
function Yn(n, e, a) {
|
|
66
66
|
const { type: i } = a;
|
|
67
|
-
return
|
|
67
|
+
return Hn.includes(i) ? Xn(n, e) : wn(n, e, a);
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function Xn(n, e) {
|
|
70
70
|
const a = [], i = [];
|
|
71
71
|
return Object.keys(e).forEach((r) => {
|
|
72
72
|
const o = e[r], u = n[r];
|
|
@@ -105,8 +105,8 @@ function Vn(n, e) {
|
|
|
105
105
|
redos: i
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
const { redoFormulaData: i, undoFormulaData: r } =
|
|
108
|
+
function wn(n, e, a) {
|
|
109
|
+
const { redoFormulaData: i, undoFormulaData: r } = Wn(n, e, a);
|
|
110
110
|
if (Ie.diffValue(i, r))
|
|
111
111
|
return {
|
|
112
112
|
undos: [],
|
|
@@ -146,10 +146,10 @@ function Gn(n, e, a) {
|
|
|
146
146
|
redos: o
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Wn(n, e, a) {
|
|
150
150
|
const i = {}, r = {}, { type: o, unitId: u, sheetId: m, range: f, from: s, to: p } = a;
|
|
151
151
|
return (/* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(e)])).forEach((L) => {
|
|
152
|
-
if (
|
|
152
|
+
if (Gn(n, L, m))
|
|
153
153
|
return;
|
|
154
154
|
(/* @__PURE__ */ new Set([
|
|
155
155
|
...Object.keys(n[L] || {}),
|
|
@@ -158,8 +158,8 @@ function Hn(n, e, a) {
|
|
|
158
158
|
var F, U;
|
|
159
159
|
const S = (F = n[L]) == null ? void 0 : F[I], c = (U = e[L]) == null ? void 0 : U[I], N = new X(S || {}), R = new X(c || {});
|
|
160
160
|
let P = [];
|
|
161
|
-
L !== u || I !== m ? P =
|
|
162
|
-
const O =
|
|
161
|
+
L !== u || I !== m ? P = Qn(R) : P = Kn(N, o, s, p, f);
|
|
162
|
+
const O = ui(P, N, R), M = mi(P, N);
|
|
163
163
|
i[L] || (i[L] = {}), r[L] || (r[L] = {}), i[L][I] = {
|
|
164
164
|
...i[L][I],
|
|
165
165
|
...O
|
|
@@ -173,11 +173,11 @@ function Hn(n, e, a) {
|
|
|
173
173
|
undoFormulaData: r
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Kn(n, e, a, i, r) {
|
|
177
177
|
const o = [];
|
|
178
178
|
return n.forValue((u, m, f) => {
|
|
179
|
-
if (f == null || !
|
|
180
|
-
const s =
|
|
179
|
+
if (f == null || !ya(f)) return !0;
|
|
180
|
+
const s = ma(u, m);
|
|
181
181
|
let p = null, d = !1;
|
|
182
182
|
if ([
|
|
183
183
|
0,
|
|
@@ -185,68 +185,68 @@ function Yn(n, e, a, i, r) {
|
|
|
185
185
|
2
|
|
186
186
|
/* MoveCols */
|
|
187
187
|
].includes(e))
|
|
188
|
-
p =
|
|
188
|
+
p = kn(e, a, i, s);
|
|
189
189
|
else if (r != null) {
|
|
190
|
-
const L =
|
|
190
|
+
const L = $n(e, r, s);
|
|
191
191
|
p = L.newCell, d = L.isReverse;
|
|
192
192
|
}
|
|
193
193
|
d ? o.unshift({ oldCell: s, newCell: p }) : o.push({ oldCell: s, newCell: p });
|
|
194
194
|
}), o;
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function Qn(n) {
|
|
197
197
|
const e = [];
|
|
198
198
|
return n.forValue((a, i, r) => {
|
|
199
|
-
if (r == null || !
|
|
200
|
-
const o =
|
|
199
|
+
if (r == null || !ya(r)) return !0;
|
|
200
|
+
const o = ma(a, i);
|
|
201
201
|
e.push({ oldCell: o, newCell: o });
|
|
202
202
|
}), e;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function kn(n, e, a, i) {
|
|
205
205
|
if (e == null || a == null)
|
|
206
206
|
return null;
|
|
207
207
|
switch (n) {
|
|
208
208
|
case 0:
|
|
209
|
-
return
|
|
209
|
+
return jn(e, a, i);
|
|
210
210
|
case 1:
|
|
211
|
-
return
|
|
211
|
+
return zn(e, a, i);
|
|
212
212
|
case 2:
|
|
213
|
-
return
|
|
213
|
+
return Zn(e, a, i);
|
|
214
214
|
default:
|
|
215
215
|
return null;
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function $n(n, e, a) {
|
|
219
219
|
let i = null, r = !1;
|
|
220
220
|
switch (n) {
|
|
221
221
|
case 3:
|
|
222
|
-
i =
|
|
222
|
+
i = Jn(e, a), r = !0;
|
|
223
223
|
break;
|
|
224
224
|
case 4:
|
|
225
|
-
i =
|
|
225
|
+
i = ei(e, a), r = !0;
|
|
226
226
|
break;
|
|
227
227
|
case 5:
|
|
228
|
-
i =
|
|
228
|
+
i = ti(e, a);
|
|
229
229
|
break;
|
|
230
230
|
case 6:
|
|
231
|
-
i =
|
|
231
|
+
i = ai(e, a);
|
|
232
232
|
break;
|
|
233
233
|
case 7:
|
|
234
|
-
i =
|
|
234
|
+
i = ni(e, a);
|
|
235
235
|
break;
|
|
236
236
|
case 8:
|
|
237
|
-
i =
|
|
237
|
+
i = ii(e, a);
|
|
238
238
|
break;
|
|
239
239
|
case 9:
|
|
240
|
-
i =
|
|
240
|
+
i = ri(e, a), r = !0;
|
|
241
241
|
break;
|
|
242
242
|
case 10:
|
|
243
|
-
i =
|
|
243
|
+
i = oi(e, a), r = !0;
|
|
244
244
|
break;
|
|
245
245
|
}
|
|
246
246
|
return { newCell: i, isReverse: r };
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
const i =
|
|
248
|
+
function jn(n, e, a) {
|
|
249
|
+
const i = pa(
|
|
250
250
|
{
|
|
251
251
|
id: G.MoveRangeCommandId,
|
|
252
252
|
params: { toRange: e, fromRange: n }
|
|
@@ -255,8 +255,8 @@ function Kn(n, e, a) {
|
|
|
255
255
|
);
|
|
256
256
|
return H(i, a);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
const i =
|
|
258
|
+
function zn(n, e, a) {
|
|
259
|
+
const i = da(
|
|
260
260
|
{
|
|
261
261
|
id: G.MoveRowsCommandId,
|
|
262
262
|
params: { toRange: e, fromRange: n }
|
|
@@ -265,8 +265,8 @@ function Qn(n, e, a) {
|
|
|
265
265
|
);
|
|
266
266
|
return H(i, a);
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
const i =
|
|
268
|
+
function Zn(n, e, a) {
|
|
269
|
+
const i = La(
|
|
270
270
|
{
|
|
271
271
|
id: G.MoveColsCommandId,
|
|
272
272
|
params: { toRange: e, fromRange: n }
|
|
@@ -275,8 +275,8 @@ function kn(n, e, a) {
|
|
|
275
275
|
);
|
|
276
276
|
return H(i, a);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
const a =
|
|
278
|
+
function Jn(n, e) {
|
|
279
|
+
const a = Pa(
|
|
280
280
|
{
|
|
281
281
|
id: G.InsertRowCommandId,
|
|
282
282
|
params: { range: n, unitId: "", subUnitId: "", direction: He.DOWN }
|
|
@@ -285,8 +285,8 @@ function $n(n, e) {
|
|
|
285
285
|
);
|
|
286
286
|
return H(a, e);
|
|
287
287
|
}
|
|
288
|
-
function
|
|
289
|
-
const a =
|
|
288
|
+
function ei(n, e) {
|
|
289
|
+
const a = Ta(
|
|
290
290
|
{
|
|
291
291
|
id: G.InsertColCommandId,
|
|
292
292
|
params: { range: n, unitId: "", subUnitId: "", direction: He.RIGHT }
|
|
@@ -295,8 +295,8 @@ function jn(n, e) {
|
|
|
295
295
|
);
|
|
296
296
|
return H(a, e);
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
const a =
|
|
298
|
+
function ti(n, e) {
|
|
299
|
+
const a = Ea(
|
|
300
300
|
{
|
|
301
301
|
id: G.RemoveRowCommandId,
|
|
302
302
|
params: { range: n }
|
|
@@ -305,8 +305,8 @@ function zn(n, e) {
|
|
|
305
305
|
);
|
|
306
306
|
return H(a, e);
|
|
307
307
|
}
|
|
308
|
-
function
|
|
309
|
-
const a =
|
|
308
|
+
function ai(n, e) {
|
|
309
|
+
const a = Ia(
|
|
310
310
|
{
|
|
311
311
|
id: G.RemoveColCommandId,
|
|
312
312
|
params: { range: n }
|
|
@@ -315,8 +315,8 @@ function Zn(n, e) {
|
|
|
315
315
|
);
|
|
316
316
|
return H(a, e);
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
const a =
|
|
318
|
+
function ni(n, e) {
|
|
319
|
+
const a = Na(
|
|
320
320
|
{
|
|
321
321
|
id: G.DeleteRangeMoveLeftCommandId,
|
|
322
322
|
params: { range: n }
|
|
@@ -325,8 +325,8 @@ function Jn(n, e) {
|
|
|
325
325
|
);
|
|
326
326
|
return H(a, e);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
const a =
|
|
328
|
+
function ii(n, e) {
|
|
329
|
+
const a = Ra(
|
|
330
330
|
{
|
|
331
331
|
id: G.DeleteRangeMoveUpCommandId,
|
|
332
332
|
params: { range: n }
|
|
@@ -335,8 +335,8 @@ function ei(n, e) {
|
|
|
335
335
|
);
|
|
336
336
|
return H(a, e);
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
const a =
|
|
338
|
+
function ri(n, e) {
|
|
339
|
+
const a = Aa(
|
|
340
340
|
{
|
|
341
341
|
id: G.InsertRangeMoveDownCommandId,
|
|
342
342
|
params: { range: n }
|
|
@@ -345,8 +345,8 @@ function ti(n, e) {
|
|
|
345
345
|
);
|
|
346
346
|
return H(a, e);
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
const a =
|
|
348
|
+
function oi(n, e) {
|
|
349
|
+
const a = Sa(
|
|
350
350
|
{
|
|
351
351
|
id: G.InsertRangeMoveRightCommandId,
|
|
352
352
|
params: { range: n }
|
|
@@ -355,7 +355,7 @@ function ai(n, e) {
|
|
|
355
355
|
);
|
|
356
356
|
return H(a, e);
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function ui(n, e, a) {
|
|
359
359
|
const i = new X({});
|
|
360
360
|
return n.forEach((r) => {
|
|
361
361
|
const { oldCell: o, newCell: u } = r, { startRow: m, startColumn: f } = o, s = a.getValue(m, f) || e.getValue(m, f), p = it(s);
|
|
@@ -365,7 +365,7 @@ function ni(n, e, a) {
|
|
|
365
365
|
}
|
|
366
366
|
}), i.getMatrix();
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function mi(n, e) {
|
|
369
369
|
const a = new X({});
|
|
370
370
|
return n.reverse().forEach((i) => {
|
|
371
371
|
const { oldCell: r, newCell: o } = i, { startRow: u, startColumn: m } = r, f = e.getValue(u, m), s = it(f);
|
|
@@ -379,7 +379,7 @@ function ii(n, e) {
|
|
|
379
379
|
function it(n) {
|
|
380
380
|
if (n == null)
|
|
381
381
|
return;
|
|
382
|
-
const { f: e, si: a, x: i = 0, y: r = 0 } = n, o = De(e), u =
|
|
382
|
+
const { f: e, si: a, x: i = 0, y: r = 0 } = n, o = De(e), u = fa(a);
|
|
383
383
|
if (!o && !u)
|
|
384
384
|
return {
|
|
385
385
|
f: null,
|
|
@@ -388,18 +388,18 @@ function it(n) {
|
|
|
388
388
|
const m = {};
|
|
389
389
|
return u && (m.si = a), o && i === 0 && r === 0 && (m.f = e), m.f === void 0 && (m.f = null), m.si === void 0 && (m.si = null), m;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function fi(n) {
|
|
392
392
|
const e = new X({});
|
|
393
393
|
return new X(n).forValue((i, r, o) => {
|
|
394
394
|
const u = it(o);
|
|
395
395
|
u && e.setValue(i, r, u);
|
|
396
396
|
}), e.getMatrix();
|
|
397
397
|
}
|
|
398
|
-
function
|
|
399
|
-
const e = (n == null ? void 0 : n.f) || "", a = (n == null ? void 0 : n.si) || "", i = De(e), r =
|
|
398
|
+
function ya(n) {
|
|
399
|
+
const e = (n == null ? void 0 : n.f) || "", a = (n == null ? void 0 : n.si) || "", i = De(e), r = fa(a);
|
|
400
400
|
return !!(i || r);
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function ga(n, e, a, i, r, o) {
|
|
403
403
|
if ((r == null || r.length === 0) && (o == null || o.length === 0)) {
|
|
404
404
|
if (n === a && e === i)
|
|
405
405
|
return !0;
|
|
@@ -407,7 +407,7 @@ function xa(n, e, a, i, r, o) {
|
|
|
407
407
|
return !0;
|
|
408
408
|
return !1;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function ha(n, e, a = 0, i = 0) {
|
|
411
411
|
const r = [];
|
|
412
412
|
for (let o = 0, u = n.length; o < u; o++) {
|
|
413
413
|
const m = n[o];
|
|
@@ -427,7 +427,7 @@ function _a(n, e, a = 0, i = 0) {
|
|
|
427
427
|
}
|
|
428
428
|
return r;
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function Ua(n, e, a, i) {
|
|
431
431
|
const { type: r, unitId: o, sheetId: u, range: m, from: f, to: s } = e, {
|
|
432
432
|
range: p,
|
|
433
433
|
sheetId: d,
|
|
@@ -436,7 +436,7 @@ function qa(n, e, a, i) {
|
|
|
436
436
|
refOffsetX: I,
|
|
437
437
|
refOffsetY: S
|
|
438
438
|
} = n;
|
|
439
|
-
if (!
|
|
439
|
+
if (!ga(
|
|
440
440
|
o,
|
|
441
441
|
u,
|
|
442
442
|
a,
|
|
@@ -450,20 +450,20 @@ function qa(n, e, a, i) {
|
|
|
450
450
|
if (r === y.MoveRange) {
|
|
451
451
|
if (f == null || s == null)
|
|
452
452
|
return;
|
|
453
|
-
const R =
|
|
453
|
+
const R = lt(c, f), P = Ve(c, f);
|
|
454
454
|
if (P == null || R !== 4)
|
|
455
455
|
return;
|
|
456
|
-
const O =
|
|
456
|
+
const O = pa(
|
|
457
457
|
{ id: G.MoveRangeCommandId, params: { toRange: s, fromRange: f } },
|
|
458
458
|
P
|
|
459
459
|
), M = H(O, P);
|
|
460
460
|
if (M == null)
|
|
461
461
|
return j.REF;
|
|
462
|
-
N =
|
|
462
|
+
N = ct(R, M, f, s, c, P);
|
|
463
463
|
} else if (r === y.MoveRows) {
|
|
464
464
|
if (f == null || s == null)
|
|
465
465
|
return;
|
|
466
|
-
const R =
|
|
466
|
+
const R = lt(c, f);
|
|
467
467
|
let P = Ve(c, f);
|
|
468
468
|
if (P == null && (f.endRow < c.startRow && s.endRow < c.startRow || f.startRow > c.endRow && s.startRow > c.endRow))
|
|
469
469
|
return;
|
|
@@ -474,17 +474,17 @@ function qa(n, e, a, i) {
|
|
|
474
474
|
endColumn: c.endColumn,
|
|
475
475
|
rangeType: Y.NORMAL
|
|
476
476
|
});
|
|
477
|
-
const O =
|
|
477
|
+
const O = da(
|
|
478
478
|
{ id: G.MoveRowsCommandId, params: { toRange: s, fromRange: f } },
|
|
479
479
|
P
|
|
480
480
|
), M = H(O, P);
|
|
481
481
|
if (M == null)
|
|
482
482
|
return j.REF;
|
|
483
|
-
N =
|
|
483
|
+
N = ct(R, M, f, s, c, P);
|
|
484
484
|
} else if (r === y.MoveCols) {
|
|
485
485
|
if (f == null || s == null)
|
|
486
486
|
return;
|
|
487
|
-
const R =
|
|
487
|
+
const R = lt(c, f);
|
|
488
488
|
let P = Ve(c, f);
|
|
489
489
|
if (P == null && (f.endColumn < c.startColumn && s.endColumn < c.startColumn || f.startColumn > c.endColumn && s.startColumn > c.endColumn))
|
|
490
490
|
return;
|
|
@@ -495,17 +495,17 @@ function qa(n, e, a, i) {
|
|
|
495
495
|
endColumn: c.endColumn,
|
|
496
496
|
rangeType: Y.NORMAL
|
|
497
497
|
});
|
|
498
|
-
const O =
|
|
498
|
+
const O = La(
|
|
499
499
|
{ id: G.MoveColsCommandId, params: { toRange: s, fromRange: f } },
|
|
500
500
|
P
|
|
501
501
|
), M = H(O, P);
|
|
502
502
|
if (M == null)
|
|
503
503
|
return j.REF;
|
|
504
|
-
N =
|
|
504
|
+
N = ct(R, M, f, s, c, P);
|
|
505
505
|
}
|
|
506
506
|
if (m != null) {
|
|
507
507
|
if (r === y.InsertRow) {
|
|
508
|
-
const R =
|
|
508
|
+
const R = Pa(
|
|
509
509
|
{
|
|
510
510
|
id: G.InsertRowCommandId,
|
|
511
511
|
params: { range: m, unitId: "", subUnitId: "", direction: He.DOWN }
|
|
@@ -519,7 +519,7 @@ function qa(n, e, a, i) {
|
|
|
519
519
|
...P
|
|
520
520
|
};
|
|
521
521
|
} else if (r === y.InsertColumn) {
|
|
522
|
-
const R =
|
|
522
|
+
const R = Ta(
|
|
523
523
|
{
|
|
524
524
|
id: G.InsertColCommandId,
|
|
525
525
|
params: { range: m, unitId: "", subUnitId: "", direction: He.RIGHT }
|
|
@@ -533,7 +533,7 @@ function qa(n, e, a, i) {
|
|
|
533
533
|
...P
|
|
534
534
|
};
|
|
535
535
|
} else if (r === y.RemoveRow) {
|
|
536
|
-
const R =
|
|
536
|
+
const R = Ea(
|
|
537
537
|
{
|
|
538
538
|
id: G.RemoveRowCommandId,
|
|
539
539
|
params: { range: m }
|
|
@@ -547,7 +547,7 @@ function qa(n, e, a, i) {
|
|
|
547
547
|
...P
|
|
548
548
|
};
|
|
549
549
|
} else if (r === y.RemoveColumn) {
|
|
550
|
-
const R =
|
|
550
|
+
const R = Ia(
|
|
551
551
|
{
|
|
552
552
|
id: G.RemoveColCommandId,
|
|
553
553
|
params: { range: m }
|
|
@@ -561,7 +561,7 @@ function qa(n, e, a, i) {
|
|
|
561
561
|
...P
|
|
562
562
|
};
|
|
563
563
|
} else if (r === y.DeleteMoveLeft) {
|
|
564
|
-
const R =
|
|
564
|
+
const R = Na(
|
|
565
565
|
{
|
|
566
566
|
id: G.DeleteRangeMoveLeftCommandId,
|
|
567
567
|
params: { range: m }
|
|
@@ -575,7 +575,7 @@ function qa(n, e, a, i) {
|
|
|
575
575
|
...P
|
|
576
576
|
};
|
|
577
577
|
} else if (r === y.DeleteMoveUp) {
|
|
578
|
-
const R =
|
|
578
|
+
const R = Ra(
|
|
579
579
|
{
|
|
580
580
|
id: G.DeleteRangeMoveUpCommandId,
|
|
581
581
|
params: { range: m }
|
|
@@ -589,7 +589,7 @@ function qa(n, e, a, i) {
|
|
|
589
589
|
...P
|
|
590
590
|
};
|
|
591
591
|
} else if (r === y.InsertMoveDown) {
|
|
592
|
-
const R =
|
|
592
|
+
const R = Aa(
|
|
593
593
|
{
|
|
594
594
|
id: G.InsertRangeMoveDownCommandId,
|
|
595
595
|
params: { range: m }
|
|
@@ -603,7 +603,7 @@ function qa(n, e, a, i) {
|
|
|
603
603
|
...P
|
|
604
604
|
};
|
|
605
605
|
} else if (r === y.InsertMoveRight) {
|
|
606
|
-
const R =
|
|
606
|
+
const R = Sa(
|
|
607
607
|
{
|
|
608
608
|
id: G.InsertRangeMoveRightCommandId,
|
|
609
609
|
params: { range: m }
|
|
@@ -625,7 +625,7 @@ function qa(n, e, a, i) {
|
|
|
625
625
|
unitId: L
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function ct(n, e, a, i, r, o) {
|
|
629
629
|
const { startRow: u, endRow: m, startColumn: f, endColumn: s, rangeType: p } = Re(e), {
|
|
630
630
|
startRow: d,
|
|
631
631
|
startColumn: L,
|
|
@@ -693,7 +693,7 @@ function ft(n, e, a, i, r, o) {
|
|
|
693
693
|
else n === 4 ? (b.startRow = u, b.startColumn = f, b.endRow = m, b.endColumn = s) : L <= h && I >= V || S === Y.ROW && k === Y.ROW ? a.endRow < g ? (c >= g && (b.startRow -= E - d + 1), c >= x && (b.endRow -= E - d + 1)) : a.startRow > x ? (R <= x && (b.endRow += E - d + 1), R <= g && (b.startRow += E - d + 1)) : a.startRow >= g && a.endRow <= x && (c <= g ? b.startRow += E - d + 1 : c >= x && (b.endRow -= E - d + 1)) : d <= g && E >= x || S === Y.COLUMN && k === Y.COLUMN ? a.endColumn < h ? (N >= h && (b.startColumn -= I - L + 1), N >= V && (b.endColumn -= I - L + 1)) : a.startColumn > V ? (P <= V && (b.endColumn += I - L + 1), P <= h && (b.startColumn += I - L + 1)) : a.startColumn >= h && a.endColumn <= V && (N <= h ? b.startColumn += I - L + 1 : N >= V && (b.endColumn -= I - L + 1)) : ((N <= U + 1 && P >= V || N <= h && P >= F - 1) && c <= g && R >= x || (c <= M + 1 && R >= x || c <= g && R >= O - 1) && N <= h && P >= V, b.startRow = u, b.startColumn = f, b.endRow = m, b.endColumn = s);
|
|
694
694
|
return b;
|
|
695
695
|
}
|
|
696
|
-
function
|
|
696
|
+
function lt(n, e) {
|
|
697
697
|
const a = Te(n.startRow), i = Ee(n.endRow), r = Te(n.startColumn), o = Ee(n.endColumn), u = Te(e.startRow), m = Ee(e.endRow), f = Te(e.startColumn), s = Ee(e.endColumn);
|
|
698
698
|
function p() {
|
|
699
699
|
return n.rangeType === Y.COLUMN && e.rangeType === Y.COLUMN ? !0 : a >= u && i <= m;
|
|
@@ -722,54 +722,54 @@ function Re(n) {
|
|
|
722
722
|
endColumn: Ee(r)
|
|
723
723
|
};
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function Fa(n, e) {
|
|
726
726
|
const { id: a } = e;
|
|
727
727
|
let i = null;
|
|
728
728
|
switch (a) {
|
|
729
|
+
case on.id:
|
|
730
|
+
i = ci(e, n);
|
|
731
|
+
break;
|
|
732
|
+
case rn.id:
|
|
733
|
+
i = li(e, n);
|
|
734
|
+
break;
|
|
735
|
+
case nn.id:
|
|
736
|
+
i = si(e, n);
|
|
737
|
+
break;
|
|
738
|
+
case an.id:
|
|
739
|
+
i = pi(e);
|
|
740
|
+
break;
|
|
729
741
|
case tn.id:
|
|
730
|
-
i =
|
|
742
|
+
i = di(e);
|
|
731
743
|
break;
|
|
732
744
|
case en.id:
|
|
733
|
-
i =
|
|
745
|
+
i = Li(e, n);
|
|
734
746
|
break;
|
|
735
747
|
case Ja.id:
|
|
736
|
-
i =
|
|
748
|
+
i = Pi(e, n);
|
|
737
749
|
break;
|
|
738
750
|
case Za.id:
|
|
739
|
-
i =
|
|
751
|
+
i = Ti(e, n);
|
|
740
752
|
break;
|
|
741
753
|
case za.id:
|
|
742
|
-
i =
|
|
754
|
+
i = Ei(e, n);
|
|
743
755
|
break;
|
|
744
756
|
case ja.id:
|
|
745
|
-
i =
|
|
757
|
+
i = Ii(e, n);
|
|
746
758
|
break;
|
|
747
759
|
case $a.id:
|
|
748
|
-
i =
|
|
760
|
+
i = Ni(e, n);
|
|
749
761
|
break;
|
|
750
762
|
case ka.id:
|
|
751
|
-
i =
|
|
763
|
+
i = Ri(e, n);
|
|
752
764
|
break;
|
|
753
765
|
case Qa.id:
|
|
754
|
-
i =
|
|
755
|
-
break;
|
|
756
|
-
case Ka.id:
|
|
757
|
-
i = Li(e, n);
|
|
766
|
+
i = Ai(e, n);
|
|
758
767
|
break;
|
|
759
|
-
case
|
|
760
|
-
i =
|
|
761
|
-
break;
|
|
762
|
-
case wa.id:
|
|
763
|
-
i = Ti(e, n);
|
|
768
|
+
case Da.id:
|
|
769
|
+
i = Si(e, n);
|
|
764
770
|
break;
|
|
765
|
-
case
|
|
766
|
-
i =
|
|
767
|
-
break;
|
|
768
|
-
case Ra.id:
|
|
769
|
-
i = Ii(e, n);
|
|
770
|
-
break;
|
|
771
|
-
case Na.id:
|
|
772
|
-
i = Ni(e, n);
|
|
771
|
+
case Ca.id:
|
|
772
|
+
i = Ci(e, n);
|
|
773
773
|
break;
|
|
774
774
|
}
|
|
775
775
|
return i;
|
|
@@ -782,7 +782,7 @@ function Z(n) {
|
|
|
782
782
|
sheetId: a
|
|
783
783
|
};
|
|
784
784
|
}
|
|
785
|
-
function
|
|
785
|
+
function ci(n, e) {
|
|
786
786
|
const { params: a } = n;
|
|
787
787
|
if (!a) return null;
|
|
788
788
|
const { fromRange: i, toRange: r } = a;
|
|
@@ -796,7 +796,7 @@ function oi(n, e) {
|
|
|
796
796
|
sheetId: u
|
|
797
797
|
};
|
|
798
798
|
}
|
|
799
|
-
function
|
|
799
|
+
function li(n, e) {
|
|
800
800
|
const { params: a } = n;
|
|
801
801
|
if (!a) return null;
|
|
802
802
|
const {
|
|
@@ -825,7 +825,7 @@ function ui(n, e) {
|
|
|
825
825
|
sheetId: s
|
|
826
826
|
};
|
|
827
827
|
}
|
|
828
|
-
function
|
|
828
|
+
function si(n, e) {
|
|
829
829
|
const { params: a } = n;
|
|
830
830
|
if (!a) return null;
|
|
831
831
|
const {
|
|
@@ -854,7 +854,7 @@ function mi(n, e) {
|
|
|
854
854
|
sheetId: s
|
|
855
855
|
};
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function pi(n) {
|
|
858
858
|
const { params: e } = n;
|
|
859
859
|
if (!e) return null;
|
|
860
860
|
const { range: a, unitId: i, subUnitId: r } = e;
|
|
@@ -865,7 +865,7 @@ function fi(n) {
|
|
|
865
865
|
sheetId: r
|
|
866
866
|
};
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function di(n) {
|
|
869
869
|
const { params: e } = n;
|
|
870
870
|
if (!e) return null;
|
|
871
871
|
const { range: a, unitId: i, subUnitId: r } = e;
|
|
@@ -876,7 +876,7 @@ function ci(n) {
|
|
|
876
876
|
sheetId: r
|
|
877
877
|
};
|
|
878
878
|
}
|
|
879
|
-
function
|
|
879
|
+
function Li(n, e) {
|
|
880
880
|
const { params: a } = n;
|
|
881
881
|
if (!a) return null;
|
|
882
882
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -887,7 +887,7 @@ function li(n, e) {
|
|
|
887
887
|
sheetId: o
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Pi(n, e) {
|
|
891
891
|
const { params: a } = n;
|
|
892
892
|
if (!a) return null;
|
|
893
893
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -898,7 +898,7 @@ function si(n, e) {
|
|
|
898
898
|
sheetId: o
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function Ti(n, e) {
|
|
902
902
|
const { params: a } = n;
|
|
903
903
|
if (!a) return null;
|
|
904
904
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -909,7 +909,7 @@ function pi(n, e) {
|
|
|
909
909
|
sheetId: o
|
|
910
910
|
};
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function Ei(n, e) {
|
|
913
913
|
const { params: a } = n;
|
|
914
914
|
if (!a) return null;
|
|
915
915
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -920,7 +920,7 @@ function di(n, e) {
|
|
|
920
920
|
sheetId: o
|
|
921
921
|
};
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function Ii(n, e) {
|
|
924
924
|
const { params: a } = n;
|
|
925
925
|
if (!a) return null;
|
|
926
926
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -931,7 +931,7 @@ function Li(n, e) {
|
|
|
931
931
|
sheetId: o
|
|
932
932
|
};
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function Ni(n, e) {
|
|
935
935
|
const { params: a } = n;
|
|
936
936
|
if (!a) return null;
|
|
937
937
|
const { range: i } = a, { unitId: r, sheetId: o } = Z(e);
|
|
@@ -942,7 +942,7 @@ function Pi(n, e) {
|
|
|
942
942
|
sheetId: o
|
|
943
943
|
};
|
|
944
944
|
}
|
|
945
|
-
function
|
|
945
|
+
function Ri(n, e) {
|
|
946
946
|
const { params: a } = n;
|
|
947
947
|
if (!a) return null;
|
|
948
948
|
const { unitId: i, subUnitId: r, name: o } = a, { unitId: u, sheetId: m } = Z(e);
|
|
@@ -953,7 +953,7 @@ function Ti(n, e) {
|
|
|
953
953
|
sheetName: o
|
|
954
954
|
};
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Ai(n, e) {
|
|
957
957
|
const { params: a } = n;
|
|
958
958
|
if (!a) return null;
|
|
959
959
|
const { unitId: i, subUnitId: r } = a, { unitId: o, sheetId: u } = Z(e);
|
|
@@ -963,7 +963,7 @@ function Ei(n, e) {
|
|
|
963
963
|
sheetId: r || u
|
|
964
964
|
};
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function Si(n, e) {
|
|
967
967
|
const { params: a } = n;
|
|
968
968
|
if (!a) return null;
|
|
969
969
|
const { unitId: i, name: r, id: o } = a, { sheetId: u } = Z(e);
|
|
@@ -975,7 +975,7 @@ function Ii(n, e) {
|
|
|
975
975
|
definedNameId: o
|
|
976
976
|
};
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Ci(n, e) {
|
|
979
979
|
const { params: a } = n;
|
|
980
980
|
if (!a) return null;
|
|
981
981
|
const { unitId: i, name: r, id: o } = a, { sheetId: u } = Z(e);
|
|
@@ -987,10 +987,10 @@ function Ni(n, e) {
|
|
|
987
987
|
definedNameId: o
|
|
988
988
|
};
|
|
989
989
|
}
|
|
990
|
-
var
|
|
991
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
990
|
+
var Di = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, Oi = (n, e, a, i) => {
|
|
991
|
+
for (var r = i > 1 ? void 0 : i ? bi(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
992
992
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
993
|
-
return i && r &&
|
|
993
|
+
return i && r && Di(e, a, r), r;
|
|
994
994
|
}, Ue = (n, e) => (a, i) => e(a, i, n);
|
|
995
995
|
let we = class extends te {
|
|
996
996
|
constructor(n, e, a, i) {
|
|
@@ -1003,7 +1003,7 @@ let we = class extends te {
|
|
|
1003
1003
|
this.disposeWithMe(
|
|
1004
1004
|
this._sheetInterceptorService.interceptCommand({
|
|
1005
1005
|
getMutations: (n) => {
|
|
1006
|
-
if (n.id ===
|
|
1006
|
+
if (n.id === Da.id || n.id === Ca.id)
|
|
1007
1007
|
return {
|
|
1008
1008
|
redos: [],
|
|
1009
1009
|
undos: []
|
|
@@ -1014,7 +1014,7 @@ let we = class extends te {
|
|
|
1014
1014
|
redos: [],
|
|
1015
1015
|
undos: []
|
|
1016
1016
|
};
|
|
1017
|
-
const a =
|
|
1017
|
+
const a = Fa(e, n);
|
|
1018
1018
|
return a ? this._getUpdateDefinedNameMutations(e, a) : {
|
|
1019
1019
|
redos: [],
|
|
1020
1020
|
undos: []
|
|
@@ -1067,7 +1067,7 @@ let we = class extends te {
|
|
|
1067
1067
|
unitId: g
|
|
1068
1068
|
});
|
|
1069
1069
|
} else
|
|
1070
|
-
V =
|
|
1070
|
+
V = Ua(
|
|
1071
1071
|
h,
|
|
1072
1072
|
e,
|
|
1073
1073
|
i,
|
|
@@ -1080,7 +1080,7 @@ let we = class extends te {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
if (!d)
|
|
1082
1082
|
return !0;
|
|
1083
|
-
const E = Xe(
|
|
1083
|
+
const E = Xe(ha(p, L)), I = {
|
|
1084
1084
|
id: Me.id,
|
|
1085
1085
|
params: {
|
|
1086
1086
|
unitId: i,
|
|
@@ -1108,27 +1108,27 @@ let we = class extends te {
|
|
|
1108
1108
|
return ((o = this._definedNamesService.getWorksheetByRef(e, i)) == null ? void 0 : o.getSheetId()) === a ? j.REF : null;
|
|
1109
1109
|
}
|
|
1110
1110
|
};
|
|
1111
|
-
we =
|
|
1111
|
+
we = Oi([
|
|
1112
1112
|
Ue(0, qt),
|
|
1113
1113
|
Ue(1, xe),
|
|
1114
1114
|
Ue(2, W(Mt)),
|
|
1115
1115
|
Ue(3, W(_t))
|
|
1116
1116
|
], we);
|
|
1117
|
-
var Se = /* @__PURE__ */ ((n) => (n[n.NOT_REGISTER = 1] = "NOT_REGISTER", n[n.SUCCESS = 2] = "SUCCESS", n[n.WAIT = 3] = "WAIT", n[n.ERROR = 4] = "ERROR", n))(Se || {}),
|
|
1118
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1117
|
+
var Se = /* @__PURE__ */ ((n) => (n[n.NOT_REGISTER = 1] = "NOT_REGISTER", n[n.SUCCESS = 2] = "SUCCESS", n[n.WAIT = 3] = "WAIT", n[n.ERROR = 4] = "ERROR", n))(Se || {}), Mi = Object.defineProperty, xi = Object.getOwnPropertyDescriptor, _i = (n, e, a, i) => {
|
|
1118
|
+
for (var r = i > 1 ? void 0 : i ? xi(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
1119
1119
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
1120
|
-
return i && r &&
|
|
1121
|
-
},
|
|
1120
|
+
return i && r && Mi(e, a, r), r;
|
|
1121
|
+
}, st = (n, e) => (a, i) => e(a, i, n);
|
|
1122
1122
|
let We = class extends te {
|
|
1123
1123
|
constructor(e, a, i) {
|
|
1124
1124
|
super();
|
|
1125
1125
|
w(this, "_formulaCacheMap", /* @__PURE__ */ new Map());
|
|
1126
|
-
w(this, "_formulaChangeWithRange$", new
|
|
1126
|
+
w(this, "_formulaChangeWithRange$", new ta());
|
|
1127
1127
|
w(this, "formulaChangeWithRange$", this._formulaChangeWithRange$.asObservable());
|
|
1128
1128
|
// FIXME: this design could be improved.
|
|
1129
|
-
w(this, "_formulaResult$", new
|
|
1129
|
+
w(this, "_formulaResult$", new ta());
|
|
1130
1130
|
w(this, "formulaResult$", this._formulaResult$.asObservable());
|
|
1131
|
-
w(this, "calculateStarted$", new
|
|
1131
|
+
w(this, "calculateStarted$", new _a(!1));
|
|
1132
1132
|
this._commandService = e, this._activeDirtyManagerService = a, this._lifecycleService = i, this._initFormulaRegister(), this._initFormulaCalculationResultChange();
|
|
1133
1133
|
}
|
|
1134
1134
|
dispose() {
|
|
@@ -1169,7 +1169,7 @@ let We = class extends te {
|
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
1171
1171
|
};
|
|
1172
|
-
this._commandService.executeCommand(
|
|
1172
|
+
this._commandService.executeCommand(Ln.id, s).then(() => {
|
|
1173
1173
|
this._commandService.executeCommand(
|
|
1174
1174
|
Ge.id,
|
|
1175
1175
|
{ [i]: { [r]: { [u]: !0 } } }
|
|
@@ -1177,14 +1177,14 @@ let We = class extends te {
|
|
|
1177
1177
|
});
|
|
1178
1178
|
};
|
|
1179
1179
|
this.disposeWithMe(
|
|
1180
|
-
this._formulaChangeWithRange$.pipe(
|
|
1180
|
+
this._formulaChangeWithRange$.pipe(Un(() => this.calculateStarted$.pipe(aa((a) => a)))).subscribe((a) => a.forEach(e))
|
|
1181
1181
|
), this.disposeWithMe(
|
|
1182
|
-
this._formulaChangeWithRange$.pipe(
|
|
1182
|
+
this._formulaChangeWithRange$.pipe(aa(() => this.calculateStarted$.getValue())).subscribe(e)
|
|
1183
1183
|
);
|
|
1184
1184
|
}
|
|
1185
1185
|
_initFormulaCalculationResultChange() {
|
|
1186
1186
|
this.disposeWithMe(this._commandService.onCommandExecuted((e) => {
|
|
1187
|
-
if (e.id ===
|
|
1187
|
+
if (e.id === pn.id) {
|
|
1188
1188
|
const a = e.params, { unitOtherData: i } = a, r = {};
|
|
1189
1189
|
for (const o in i) {
|
|
1190
1190
|
const u = i[o], m = {};
|
|
@@ -1235,7 +1235,7 @@ let We = class extends te {
|
|
|
1235
1235
|
subUnitId: a,
|
|
1236
1236
|
formulaIdList: i
|
|
1237
1237
|
};
|
|
1238
|
-
this._commandService.executeCommand(
|
|
1238
|
+
this._commandService.executeCommand(dn.id, r);
|
|
1239
1239
|
const o = this._ensureCacheMap(e, a);
|
|
1240
1240
|
i.forEach((u) => o.delete(u));
|
|
1241
1241
|
}
|
|
@@ -1251,20 +1251,20 @@ let We = class extends te {
|
|
|
1251
1251
|
return this._ensureCacheMap(e, a).get(i);
|
|
1252
1252
|
}
|
|
1253
1253
|
};
|
|
1254
|
-
We =
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1254
|
+
We = _i([
|
|
1255
|
+
st(0, pe),
|
|
1256
|
+
st(1, yt),
|
|
1257
|
+
st(2, W(Ya))
|
|
1258
1258
|
], We);
|
|
1259
1259
|
const rt = "sheets-formula.base.config";
|
|
1260
1260
|
var ne = /* @__PURE__ */ ((n) => (n[n.FORCED = 0] = "FORCED", n[n.WHEN_EMPTY = 1] = "WHEN_EMPTY", n[n.NO_CALCULATION = 2] = "NO_CALCULATION", n))(ne || {});
|
|
1261
|
-
const
|
|
1262
|
-
var
|
|
1263
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1261
|
+
const na = {}, qi = "sheets-formula.remote.config", ia = {};
|
|
1262
|
+
var yi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, hi = (n, e, a, i) => {
|
|
1263
|
+
for (var r = i > 1 ? void 0 : i ? gi(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
1264
1264
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
1265
|
-
return i && r &&
|
|
1265
|
+
return i && r && yi(e, a, r), r;
|
|
1266
1266
|
}, le = (n, e) => (a, i) => e(a, i, n);
|
|
1267
|
-
const
|
|
1267
|
+
const ra = { done: 0, count: 0 }, pt = { onlyLocal: !0 };
|
|
1268
1268
|
let be = class extends te {
|
|
1269
1269
|
constructor(e, a, i, r, o, u, m) {
|
|
1270
1270
|
var s;
|
|
@@ -1290,7 +1290,7 @@ let be = class extends te {
|
|
|
1290
1290
|
* The mark of forced calculation. If a new mutation triggers dirty area calculation during the forced calculation process, forced calculation is still required.
|
|
1291
1291
|
*/
|
|
1292
1292
|
w(this, "_forceCalculating", !1);
|
|
1293
|
-
w(this, "_progress$", new
|
|
1293
|
+
w(this, "_progress$", new _a(ra));
|
|
1294
1294
|
w(this, "progress$", this._progress$.asObservable());
|
|
1295
1295
|
this._commandService = e, this._activeDirtyManagerService = a, this._logService = i, this._configService = r, this._formulaDataModel = o, this._localeService = u, this._registerOtherFormulaService = m;
|
|
1296
1296
|
const f = this._configService.getConfig(rt);
|
|
@@ -1321,7 +1321,7 @@ let be = class extends te {
|
|
|
1321
1321
|
this._doneCalculationTaskCount = 0, this._totalCalculationTaskCount = 0, this._emitProgress();
|
|
1322
1322
|
}
|
|
1323
1323
|
dispose() {
|
|
1324
|
-
super.dispose(), this._progress$.next(
|
|
1324
|
+
super.dispose(), this._progress$.next(ra), this._progress$.complete();
|
|
1325
1325
|
}
|
|
1326
1326
|
_commandExecutedListener() {
|
|
1327
1327
|
this.disposeWithMe(
|
|
@@ -1329,12 +1329,12 @@ let be = class extends te {
|
|
|
1329
1329
|
if (this._activeDirtyManagerService.get(e.id)) {
|
|
1330
1330
|
if (e.id === ie.id) {
|
|
1331
1331
|
const i = e.params;
|
|
1332
|
-
if (a && a.onlyLocal === !0 || i.trigger === xt.id || i.trigger ===
|
|
1332
|
+
if (a && a.onlyLocal === !0 || i.trigger === xt.id || i.trigger === ba.id || i.trigger === Oa.id)
|
|
1333
1333
|
return;
|
|
1334
1334
|
}
|
|
1335
1335
|
this._waitingCommandQueue.push(e), clearTimeout(this._setTimeoutKey), this._setTimeoutKey = setTimeout(() => {
|
|
1336
1336
|
const i = this._generateDirty(this._waitingCommandQueue);
|
|
1337
|
-
this._executingDirtyData = this._mergeDirty(this._executingDirtyData, i), this._executionInProgressParams == null ? this._commandService.executeCommand(Ae.id, { ...this._executingDirtyData },
|
|
1337
|
+
this._executingDirtyData = this._mergeDirty(this._executingDirtyData, i), this._executionInProgressParams == null ? this._commandService.executeCommand(Ae.id, { ...this._executingDirtyData }, pt) : (this._restartCalculation = !0, this._commandService.executeCommand(kt.id, {})), this._waitingCommandQueue = [];
|
|
1338
1338
|
}, 100);
|
|
1339
1339
|
}
|
|
1340
1340
|
})
|
|
@@ -1356,20 +1356,24 @@ let be = class extends te {
|
|
|
1356
1356
|
dirtyUnitFeatureMap: o,
|
|
1357
1357
|
dirtyUnitOtherFormulaMap: u,
|
|
1358
1358
|
forceCalculation: !1,
|
|
1359
|
-
clearDependencyTreeCache: m
|
|
1359
|
+
clearDependencyTreeCache: m,
|
|
1360
|
+
maxIteration: this._configService.getConfig($t)
|
|
1360
1361
|
// numfmtItemMap,
|
|
1361
1362
|
};
|
|
1362
1363
|
}
|
|
1363
1364
|
_mergeDirty(e, a) {
|
|
1364
1365
|
const i = [...e.dirtyRanges, ...a.dirtyRanges], r = { ...e.dirtyNameMap }, o = { ...e.dirtyDefinedNameMap }, u = { ...e.dirtyUnitFeatureMap }, m = { ...e.dirtyUnitOtherFormulaMap }, f = { ...e.clearDependencyTreeCache };
|
|
1365
|
-
|
|
1366
|
+
this._mergeDirtyNameMap(r, a.dirtyNameMap), this._mergeDirtyNameMap(o, a.dirtyDefinedNameMap), this._mergeDirtyUnitFeatureOrOtherFormulaMap(u, a.dirtyUnitFeatureMap), this._mergeDirtyUnitFeatureOrOtherFormulaMap(m, a.dirtyUnitOtherFormulaMap), this._mergeDirtyNameMap(f, a.clearDependencyTreeCache);
|
|
1367
|
+
const s = e.maxIteration || a.maxIteration;
|
|
1368
|
+
return {
|
|
1366
1369
|
dirtyRanges: i,
|
|
1367
1370
|
dirtyNameMap: r,
|
|
1368
1371
|
dirtyDefinedNameMap: o,
|
|
1369
1372
|
dirtyUnitFeatureMap: u,
|
|
1370
1373
|
dirtyUnitOtherFormulaMap: m,
|
|
1371
1374
|
forceCalculation: !!this._forceCalculating,
|
|
1372
|
-
clearDependencyTreeCache: f
|
|
1375
|
+
clearDependencyTreeCache: f,
|
|
1376
|
+
maxIteration: s
|
|
1373
1377
|
};
|
|
1374
1378
|
}
|
|
1375
1379
|
/**
|
|
@@ -1418,7 +1422,7 @@ let be = class extends te {
|
|
|
1418
1422
|
const { forceCalculation: o = !1 } = i.params;
|
|
1419
1423
|
o && (this._forceCalculating = !0);
|
|
1420
1424
|
} else i.id === kt.id && this.clearProgress();
|
|
1421
|
-
if (i.id !==
|
|
1425
|
+
if (i.id !== Pn.id)
|
|
1422
1426
|
return;
|
|
1423
1427
|
const r = i.params;
|
|
1424
1428
|
if (r.stageInfo != null) {
|
|
@@ -1467,7 +1471,7 @@ let be = class extends te {
|
|
|
1467
1471
|
{
|
|
1468
1472
|
...this._executingDirtyData
|
|
1469
1473
|
},
|
|
1470
|
-
|
|
1474
|
+
pt
|
|
1471
1475
|
)) : this._executionInProgressParams = null, this._logService.debug("[TriggerCalculationController]", u);
|
|
1472
1476
|
}
|
|
1473
1477
|
})
|
|
@@ -1485,10 +1489,10 @@ let be = class extends te {
|
|
|
1485
1489
|
};
|
|
1486
1490
|
}
|
|
1487
1491
|
_initialExecuteFormula() {
|
|
1488
|
-
const e = this.
|
|
1489
|
-
this._commandService.executeCommand(Ae.id, e,
|
|
1492
|
+
const e = this._getDirtyDataByCalculationMode(this._calculationMode);
|
|
1493
|
+
this._commandService.executeCommand(Ae.id, e, pt), this._registerOtherFormulaService.calculateStarted$.next(!0);
|
|
1490
1494
|
}
|
|
1491
|
-
|
|
1495
|
+
_getDirtyDataByCalculationMode(e) {
|
|
1492
1496
|
const a = e === ne.FORCED, i = e === ne.WHEN_EMPTY ? this._formulaDataModel.getFormulaDirtyRanges() : [];
|
|
1493
1497
|
return {
|
|
1494
1498
|
forceCalculation: a,
|
|
@@ -1497,23 +1501,24 @@ let be = class extends te {
|
|
|
1497
1501
|
dirtyDefinedNameMap: {},
|
|
1498
1502
|
dirtyUnitFeatureMap: {},
|
|
1499
1503
|
dirtyUnitOtherFormulaMap: {},
|
|
1500
|
-
clearDependencyTreeCache: {}
|
|
1504
|
+
clearDependencyTreeCache: {},
|
|
1505
|
+
maxIteration: this._configService.getConfig($t)
|
|
1501
1506
|
};
|
|
1502
1507
|
}
|
|
1503
1508
|
};
|
|
1504
|
-
be =
|
|
1509
|
+
be = hi([
|
|
1505
1510
|
le(0, pe),
|
|
1506
1511
|
le(1, yt),
|
|
1507
|
-
le(2,
|
|
1512
|
+
le(2, Xa),
|
|
1508
1513
|
le(3, _e),
|
|
1509
1514
|
le(4, W(nt)),
|
|
1510
1515
|
le(5, W(bt)),
|
|
1511
1516
|
le(6, W(We))
|
|
1512
1517
|
], be);
|
|
1513
|
-
var
|
|
1514
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
1518
|
+
var Ui = Object.defineProperty, Fi = Object.getOwnPropertyDescriptor, Bi = (n, e, a, i) => {
|
|
1519
|
+
for (var r = i > 1 ? void 0 : i ? Fi(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
1515
1520
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
1516
|
-
return i && r &&
|
|
1521
|
+
return i && r && Ui(e, a, r), r;
|
|
1517
1522
|
}, me = (n, e) => (a, i) => e(a, i, n);
|
|
1518
1523
|
let Ke = class extends te {
|
|
1519
1524
|
constructor(n, e, a, i, r, o, u, m) {
|
|
@@ -1534,12 +1539,12 @@ let Ke = class extends te {
|
|
|
1534
1539
|
this._commandService.beforeCommandExecuted((n, e) => {
|
|
1535
1540
|
if (n.id === ie.id) {
|
|
1536
1541
|
const a = n.params;
|
|
1537
|
-
if (e && e.onlyLocal === !0 || a.trigger === xt.id || a.trigger ===
|
|
1542
|
+
if (e && e.onlyLocal === !0 || a.trigger === xt.id || a.trigger === ba.id || a.trigger === Oa.id)
|
|
1538
1543
|
return;
|
|
1539
1544
|
this._handleSetRangeValuesMutation(a);
|
|
1540
1545
|
}
|
|
1541
1546
|
})
|
|
1542
|
-
), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(ee.UNIVER_SHEET).subscribe((n) => this._handleWorkbookAdded(n))), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(ee.UNIVER_SHEET).pipe(
|
|
1547
|
+
), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitAdded$(ee.UNIVER_SHEET).subscribe((n) => this._handleWorkbookAdded(n))), this.disposeWithMe(this._univerInstanceService.getTypeOfUnitDisposed$(ee.UNIVER_SHEET).pipe(Fn((n) => n.getUnitId())).subscribe((n) => this._handleWorkbookDisposed(n)));
|
|
1543
1548
|
}
|
|
1544
1549
|
_handleSetRangeValuesMutation(n) {
|
|
1545
1550
|
const { subUnitId: e, unitId: a, cellValue: i } = n;
|
|
@@ -1555,7 +1560,7 @@ let Ke = class extends te {
|
|
|
1555
1560
|
{
|
|
1556
1561
|
unitId: a,
|
|
1557
1562
|
subUnitId: e,
|
|
1558
|
-
cellValue:
|
|
1563
|
+
cellValue: fi(r)
|
|
1559
1564
|
},
|
|
1560
1565
|
{
|
|
1561
1566
|
onlyLocal: !0,
|
|
@@ -1583,7 +1588,7 @@ let Ke = class extends te {
|
|
|
1583
1588
|
);
|
|
1584
1589
|
}
|
|
1585
1590
|
_handleWorkbookDisposed(n, e) {
|
|
1586
|
-
const a = this._formulaDataModel.getFormulaData(), i =
|
|
1591
|
+
const a = this._formulaDataModel.getFormulaData(), i = ft(a, n, e), r = this._formulaDataModel.getArrayFormulaRange(), o = ft(r, n, e), u = this._formulaDataModel.getArrayFormulaCellData(), m = ft(u, n, e);
|
|
1587
1592
|
i && this._commandService.executeCommand(
|
|
1588
1593
|
he.id,
|
|
1589
1594
|
{
|
|
@@ -1604,7 +1609,7 @@ let Ke = class extends te {
|
|
|
1604
1609
|
);
|
|
1605
1610
|
}
|
|
1606
1611
|
_handleInsertSheetMutation(n) {
|
|
1607
|
-
const { sheet: e, unitId: a } = n, i = this._formulaDataModel.getFormulaData(), { id: r, cellData: o } = e, u = new X(o), m =
|
|
1612
|
+
const { sheet: e, unitId: a } = n, i = this._formulaDataModel.getFormulaData(), { id: r, cellData: o } = e, u = new X(o), m = jt(i, a, r, u);
|
|
1608
1613
|
this._commandService.executeCommand(
|
|
1609
1614
|
he.id,
|
|
1610
1615
|
{
|
|
@@ -1620,7 +1625,7 @@ let Ke = class extends te {
|
|
|
1620
1625
|
const e = {}, a = n.getUnitId(), i = { [a]: {} };
|
|
1621
1626
|
n.getSheets().forEach((s) => {
|
|
1622
1627
|
var E;
|
|
1623
|
-
const p = s.getCellMatrix(), d = s.getSheetId(), L =
|
|
1628
|
+
const p = s.getCellMatrix(), d = s.getSheetId(), L = jt(e, a, d, p);
|
|
1624
1629
|
i[a][d] = (E = L[a]) == null ? void 0 : E[d];
|
|
1625
1630
|
}), this._commandService.executeCommand(he.id, { formulaData: i }, { onlyLocal: !0 });
|
|
1626
1631
|
const o = this._configService.getConfig(rt), u = (f = o == null ? void 0 : o.initialFormulaComputing) != null ? f : ne.WHEN_EMPTY, m = this._getDiryDataByCalculationMode(u);
|
|
@@ -1645,13 +1650,13 @@ let Ke = class extends te {
|
|
|
1645
1650
|
undos: [],
|
|
1646
1651
|
redos: []
|
|
1647
1652
|
};
|
|
1648
|
-
const a =
|
|
1653
|
+
const a = Fa(e, n);
|
|
1649
1654
|
if (a) {
|
|
1650
1655
|
const { unitSheetNameMap: i } = this._formulaDataModel.getCalculateData(), r = this._formulaDataModel.getFormulaData(), { newFormulaData: o } = this._getFormulaReferenceMoveInfo(
|
|
1651
1656
|
r,
|
|
1652
1657
|
i,
|
|
1653
1658
|
a
|
|
1654
|
-
), { undos: u, redos: m } =
|
|
1659
|
+
), { undos: u, redos: m } = Yn(r, o, a);
|
|
1655
1660
|
return {
|
|
1656
1661
|
undos: u,
|
|
1657
1662
|
redos: m
|
|
@@ -1704,7 +1709,7 @@ let Ke = class extends te {
|
|
|
1704
1709
|
} else if (k !== J.REFERENCE)
|
|
1705
1710
|
continue;
|
|
1706
1711
|
const de = se(V), { range: ae, sheetName: re, unitId: Q } = de, oe = Q == null || Q.length === 0 ? u : Q, z = ((U = e == null ? void 0 : e[oe]) == null ? void 0 : U[re]) || "";
|
|
1707
|
-
if (!
|
|
1712
|
+
if (!ga(
|
|
1708
1713
|
a.unitId,
|
|
1709
1714
|
a.sheetId,
|
|
1710
1715
|
u,
|
|
@@ -1744,7 +1749,7 @@ let Ke = class extends te {
|
|
|
1744
1749
|
if (z == null || z.length === 0 || Pe !== z)
|
|
1745
1750
|
continue;
|
|
1746
1751
|
ue = j.REF;
|
|
1747
|
-
} else b !== y.SetDefinedName && (ue =
|
|
1752
|
+
} else b !== y.SetDefinedName && (ue = Ua(
|
|
1748
1753
|
qe,
|
|
1749
1754
|
a,
|
|
1750
1755
|
u,
|
|
@@ -1757,7 +1762,7 @@ let Ke = class extends te {
|
|
|
1757
1762
|
}
|
|
1758
1763
|
if (!O)
|
|
1759
1764
|
return !0;
|
|
1760
|
-
const F =
|
|
1765
|
+
const F = ha(P, M, c, N);
|
|
1761
1766
|
d.setValue(L, E, {
|
|
1762
1767
|
f: `=${Xe(F)}`
|
|
1763
1768
|
});
|
|
@@ -1767,7 +1772,7 @@ let Ke = class extends te {
|
|
|
1767
1772
|
return { newFormulaData: o };
|
|
1768
1773
|
}
|
|
1769
1774
|
};
|
|
1770
|
-
Ke =
|
|
1775
|
+
Ke = Bi([
|
|
1771
1776
|
me(0, xe),
|
|
1772
1777
|
me(1, pe),
|
|
1773
1778
|
me(2, W(_t)),
|
|
@@ -1777,9 +1782,9 @@ Ke = Ui([
|
|
|
1777
1782
|
me(6, _e),
|
|
1778
1783
|
me(7, W(tt))
|
|
1779
1784
|
], Ke);
|
|
1780
|
-
const
|
|
1785
|
+
const vi = [
|
|
1781
1786
|
{
|
|
1782
|
-
functionName:
|
|
1787
|
+
functionName: zt.ARRAY_CONSTRAIN,
|
|
1783
1788
|
functionType: t.Array,
|
|
1784
1789
|
description: "formula.functionList.ARRAY_CONSTRAIN.description",
|
|
1785
1790
|
abstract: "formula.functionList.ARRAY_CONSTRAIN.abstract",
|
|
@@ -1808,7 +1813,7 @@ const Fi = [
|
|
|
1808
1813
|
]
|
|
1809
1814
|
},
|
|
1810
1815
|
{
|
|
1811
|
-
functionName:
|
|
1816
|
+
functionName: zt.FLATTEN,
|
|
1812
1817
|
functionType: t.Array,
|
|
1813
1818
|
description: "formula.functionList.FLATTEN.description",
|
|
1814
1819
|
abstract: "formula.functionList.FLATTEN.abstract",
|
|
@@ -1829,7 +1834,7 @@ const Fi = [
|
|
|
1829
1834
|
}
|
|
1830
1835
|
]
|
|
1831
1836
|
}
|
|
1832
|
-
],
|
|
1837
|
+
], Vi = [
|
|
1833
1838
|
{
|
|
1834
1839
|
functionName: _.BETADIST,
|
|
1835
1840
|
functionType: t.Compatibility,
|
|
@@ -2883,7 +2888,7 @@ const Fi = [
|
|
|
2883
2888
|
}
|
|
2884
2889
|
]
|
|
2885
2890
|
}
|
|
2886
|
-
],
|
|
2891
|
+
], Gi = [
|
|
2887
2892
|
{
|
|
2888
2893
|
functionName: ce.CUBEKPIMEMBER,
|
|
2889
2894
|
functionType: t.Cube,
|
|
@@ -3038,7 +3043,7 @@ const Fi = [
|
|
|
3038
3043
|
}
|
|
3039
3044
|
]
|
|
3040
3045
|
}
|
|
3041
|
-
],
|
|
3046
|
+
], Hi = [
|
|
3042
3047
|
{
|
|
3043
3048
|
functionName: $.DAVERAGE,
|
|
3044
3049
|
functionType: t.Database,
|
|
@@ -3387,7 +3392,7 @@ const Fi = [
|
|
|
3387
3392
|
}
|
|
3388
3393
|
]
|
|
3389
3394
|
}
|
|
3390
|
-
],
|
|
3395
|
+
], Yi = [
|
|
3391
3396
|
{
|
|
3392
3397
|
functionName: B.DATE,
|
|
3393
3398
|
functionType: t.Date,
|
|
@@ -3959,7 +3964,7 @@ const Fi = [
|
|
|
3959
3964
|
}
|
|
3960
3965
|
]
|
|
3961
3966
|
}
|
|
3962
|
-
],
|
|
3967
|
+
], Xi = [
|
|
3963
3968
|
{
|
|
3964
3969
|
functionName: A.BESSELI,
|
|
3965
3970
|
functionType: t.Engineering,
|
|
@@ -5032,7 +5037,7 @@ const Fi = [
|
|
|
5032
5037
|
}
|
|
5033
5038
|
]
|
|
5034
5039
|
}
|
|
5035
|
-
],
|
|
5040
|
+
], wi = [
|
|
5036
5041
|
{
|
|
5037
5042
|
functionName: C.ACCRINT,
|
|
5038
5043
|
functionType: t.Financial,
|
|
@@ -7293,7 +7298,7 @@ const Fi = [
|
|
|
7293
7298
|
}
|
|
7294
7299
|
]
|
|
7295
7300
|
}
|
|
7296
|
-
],
|
|
7301
|
+
], Wi = [
|
|
7297
7302
|
{
|
|
7298
7303
|
functionName: v.CELL,
|
|
7299
7304
|
functionType: t.Information,
|
|
@@ -7702,7 +7707,7 @@ const Fi = [
|
|
|
7702
7707
|
}
|
|
7703
7708
|
]
|
|
7704
7709
|
}
|
|
7705
|
-
],
|
|
7710
|
+
], Ki = [
|
|
7706
7711
|
{
|
|
7707
7712
|
functionName: K.AND,
|
|
7708
7713
|
functionType: t.Logical,
|
|
@@ -8176,7 +8181,7 @@ const Fi = [
|
|
|
8176
8181
|
}
|
|
8177
8182
|
]
|
|
8178
8183
|
}
|
|
8179
|
-
],
|
|
8184
|
+
], Qi = [
|
|
8180
8185
|
{
|
|
8181
8186
|
functionName: q.ADDRESS,
|
|
8182
8187
|
functionType: t.Lookup,
|
|
@@ -9208,7 +9213,7 @@ const Fi = [
|
|
|
9208
9213
|
}
|
|
9209
9214
|
]
|
|
9210
9215
|
}
|
|
9211
|
-
],
|
|
9216
|
+
], ki = [
|
|
9212
9217
|
{
|
|
9213
9218
|
functionName: T.ABS,
|
|
9214
9219
|
functionType: t.Math,
|
|
@@ -10846,7 +10851,7 @@ const Fi = [
|
|
|
10846
10851
|
}
|
|
10847
10852
|
]
|
|
10848
10853
|
}
|
|
10849
|
-
],
|
|
10854
|
+
], $i = [
|
|
10850
10855
|
{
|
|
10851
10856
|
functionName: l.AVEDEV,
|
|
10852
10857
|
functionType: t.Statistical,
|
|
@@ -13788,7 +13793,7 @@ const Fi = [
|
|
|
13788
13793
|
}
|
|
13789
13794
|
]
|
|
13790
13795
|
}
|
|
13791
|
-
],
|
|
13796
|
+
], ji = [
|
|
13792
13797
|
{
|
|
13793
13798
|
functionName: D.ASC,
|
|
13794
13799
|
functionType: t.Text,
|
|
@@ -14980,9 +14985,9 @@ const Fi = [
|
|
|
14980
14985
|
}
|
|
14981
14986
|
]
|
|
14982
14987
|
}
|
|
14983
|
-
],
|
|
14988
|
+
], zi = [], Zi = [
|
|
14984
14989
|
{
|
|
14985
|
-
functionName:
|
|
14990
|
+
functionName: mt.ENCODEURL,
|
|
14986
14991
|
functionType: t.Web,
|
|
14987
14992
|
description: "formula.functionList.ENCODEURL.description",
|
|
14988
14993
|
abstract: "formula.functionList.ENCODEURL.abstract",
|
|
@@ -14997,7 +15002,7 @@ const Fi = [
|
|
|
14997
15002
|
]
|
|
14998
15003
|
},
|
|
14999
15004
|
{
|
|
15000
|
-
functionName:
|
|
15005
|
+
functionName: mt.FILTERXML,
|
|
15001
15006
|
functionType: t.Web,
|
|
15002
15007
|
description: "formula.functionList.FILTERXML.description",
|
|
15003
15008
|
abstract: "formula.functionList.FILTERXML.abstract",
|
|
@@ -15019,7 +15024,7 @@ const Fi = [
|
|
|
15019
15024
|
]
|
|
15020
15025
|
},
|
|
15021
15026
|
{
|
|
15022
|
-
functionName:
|
|
15027
|
+
functionName: mt.WEBSERVICE,
|
|
15023
15028
|
functionType: t.Web,
|
|
15024
15029
|
description: "formula.functionList.WEBSERVICE.description",
|
|
15025
15030
|
abstract: "formula.functionList.WEBSERVICE.abstract",
|
|
@@ -15040,32 +15045,32 @@ const Fi = [
|
|
|
15040
15045
|
}
|
|
15041
15046
|
]
|
|
15042
15047
|
}
|
|
15043
|
-
],
|
|
15048
|
+
], Ji = [
|
|
15049
|
+
...wi,
|
|
15044
15050
|
...Yi,
|
|
15045
|
-
...
|
|
15046
|
-
|
|
15051
|
+
...ki,
|
|
15052
|
+
...$i,
|
|
15047
15053
|
...Qi,
|
|
15054
|
+
...Hi,
|
|
15055
|
+
...ji,
|
|
15056
|
+
...Ki,
|
|
15048
15057
|
...Wi,
|
|
15049
|
-
...Vi,
|
|
15050
|
-
...ki,
|
|
15051
|
-
...wi,
|
|
15052
15058
|
...Xi,
|
|
15053
|
-
...
|
|
15059
|
+
...Gi,
|
|
15060
|
+
...Vi,
|
|
15061
|
+
...Zi,
|
|
15054
15062
|
...vi,
|
|
15055
|
-
...
|
|
15056
|
-
...ji,
|
|
15057
|
-
...Fi,
|
|
15058
|
-
...$i
|
|
15063
|
+
...zi
|
|
15059
15064
|
];
|
|
15060
|
-
function
|
|
15065
|
+
function er(n, e) {
|
|
15061
15066
|
let a = "";
|
|
15062
15067
|
return n.aliasFunctionName ? (a = e.t(n.aliasFunctionName), a === n.aliasFunctionName && (a = n.functionName)) : a = n.functionName, a;
|
|
15063
15068
|
}
|
|
15064
|
-
var
|
|
15065
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15069
|
+
var tr = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, nr = (n, e, a, i) => {
|
|
15070
|
+
for (var r = i > 1 ? void 0 : i ? ar(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15066
15071
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15067
|
-
return i && r &&
|
|
15068
|
-
},
|
|
15072
|
+
return i && r && tr(e, a, r), r;
|
|
15073
|
+
}, dt = (n, e) => (a, i) => e(a, i, n);
|
|
15069
15074
|
const ht = Ot("formula.description-service");
|
|
15070
15075
|
let St = class {
|
|
15071
15076
|
constructor(n, e, a) {
|
|
@@ -15125,7 +15130,7 @@ let St = class {
|
|
|
15125
15130
|
if (e.length === 0)
|
|
15126
15131
|
return !1;
|
|
15127
15132
|
const a = e[0].description;
|
|
15128
|
-
return !
|
|
15133
|
+
return !Tn(a);
|
|
15129
15134
|
}
|
|
15130
15135
|
_initialize() {
|
|
15131
15136
|
this._localeService.localeChanged$.subscribe(() => {
|
|
@@ -15135,10 +15140,6 @@ let St = class {
|
|
|
15135
15140
|
_initDescription() {
|
|
15136
15141
|
var i;
|
|
15137
15142
|
const n = [
|
|
15138
|
-
...dn,
|
|
15139
|
-
...Ln,
|
|
15140
|
-
...Pn,
|
|
15141
|
-
...Tn,
|
|
15142
15143
|
...En,
|
|
15143
15144
|
...In,
|
|
15144
15145
|
...Nn,
|
|
@@ -15150,13 +15151,17 @@ let St = class {
|
|
|
15150
15151
|
...bn,
|
|
15151
15152
|
...On,
|
|
15152
15153
|
...Mn,
|
|
15153
|
-
...xn
|
|
15154
|
-
|
|
15154
|
+
...xn,
|
|
15155
|
+
..._n,
|
|
15156
|
+
...qn,
|
|
15157
|
+
...yn,
|
|
15158
|
+
...gn
|
|
15159
|
+
].map((r) => r[1]), e = Ji.filter((r) => n.includes(r.functionName)), a = this._configService.getConfig(rt);
|
|
15155
15160
|
this._descriptions = e.concat((i = a == null ? void 0 : a.description) != null ? i : []);
|
|
15156
15161
|
}
|
|
15157
15162
|
_registerDescriptions() {
|
|
15158
15163
|
const n = this._localeService, e = this._descriptions.map((a) => ({
|
|
15159
|
-
functionName:
|
|
15164
|
+
functionName: er(a, n),
|
|
15160
15165
|
functionType: a.functionType,
|
|
15161
15166
|
description: n.t(a.description),
|
|
15162
15167
|
abstract: n.t(a.abstract),
|
|
@@ -15171,17 +15176,17 @@ let St = class {
|
|
|
15171
15176
|
this._functionService.registerDescriptions(...e);
|
|
15172
15177
|
}
|
|
15173
15178
|
};
|
|
15174
|
-
St =
|
|
15175
|
-
|
|
15176
|
-
|
|
15177
|
-
|
|
15179
|
+
St = nr([
|
|
15180
|
+
dt(0, gt),
|
|
15181
|
+
dt(1, W(bt)),
|
|
15182
|
+
dt(2, _e)
|
|
15178
15183
|
], St);
|
|
15179
|
-
var
|
|
15180
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15184
|
+
var ir = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, or = (n, e, a, i) => {
|
|
15185
|
+
for (var r = i > 1 ? void 0 : i ? rr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15181
15186
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15182
|
-
return i && r &&
|
|
15187
|
+
return i && r && ir(e, a, r), r;
|
|
15183
15188
|
}, Fe = (n, e) => (a, i) => e(a, i, n);
|
|
15184
|
-
function
|
|
15189
|
+
function oa(n, e, a, i) {
|
|
15185
15190
|
const r = n.sequenceNodesBuilder(e);
|
|
15186
15191
|
if (r == null)
|
|
15187
15192
|
return e;
|
|
@@ -15217,7 +15222,7 @@ let Ct = class extends te {
|
|
|
15217
15222
|
let O = "";
|
|
15218
15223
|
if (P) {
|
|
15219
15224
|
const M = P.startColumn - L.startColumn, F = P.startRow - L.startRow, U = Tt(L, M, F);
|
|
15220
|
-
E && I ? O =
|
|
15225
|
+
E && I ? O = Zt(E, I, U) : I ? O = Jt(I, U) : O = ea(U);
|
|
15221
15226
|
} else
|
|
15222
15227
|
O = j.REF;
|
|
15223
15228
|
return {
|
|
@@ -15240,7 +15245,7 @@ let Ct = class extends te {
|
|
|
15240
15245
|
let R = "";
|
|
15241
15246
|
if (N) {
|
|
15242
15247
|
const P = N.startColumn - c.range.startColumn, O = N.startRow - c.range.startRow, M = Tt(c.range, P, O);
|
|
15243
|
-
c.unitId && c.sheetName ? R =
|
|
15248
|
+
c.unitId && c.sheetName ? R = Zt(c.unitId, c.sheetName, M) : c.sheetName ? R = Jt(c.sheetName, M) : R = ea(M);
|
|
15244
15249
|
} else
|
|
15245
15250
|
R = j.REF;
|
|
15246
15251
|
return {
|
|
@@ -15294,7 +15299,7 @@ let Ct = class extends te {
|
|
|
15294
15299
|
// eslint-disable-next-line max-lines-per-function
|
|
15295
15300
|
registerRangeFormula(n, e, a, i, r) {
|
|
15296
15301
|
const o = new Et(), u = i.map((f) => this._getFormulaDependcy(n, e, f, a)), m = (f) => {
|
|
15297
|
-
const s = a[0].startRow, p = a[0].startColumn, d = [{ unitId: n, subUnitId: e, ranges: a }, ...u.flat()], L = [], E =
|
|
15302
|
+
const s = a[0].startRow, p = a[0].startColumn, d = [{ unitId: n, subUnitId: e, ranges: a }, ...u.flat()], L = [], E = mn(this._injector, f);
|
|
15298
15303
|
for (const { unitId: I, subUnitId: S, ranges: c } of d)
|
|
15299
15304
|
if (I === E.unitId && S === E.subUnitId) {
|
|
15300
15305
|
const N = [], R = c[0].startRow, P = c[0].startColumn, O = R - s, M = P - p;
|
|
@@ -15316,12 +15321,12 @@ let Ct = class extends te {
|
|
|
15316
15321
|
S.sort((O, M) => O.startRow - M.startRow || O.startColumn - M.startColumn);
|
|
15317
15322
|
const c = /* @__PURE__ */ new Map();
|
|
15318
15323
|
for (let O = 0; O < I.length; O++) {
|
|
15319
|
-
const M = I[O], F = M.startRow, U = M.startColumn, g = F - s, x = U - p, h =
|
|
15324
|
+
const M = I[O], F = M.startRow, U = M.startColumn, g = F - s, x = U - p, h = fn(M, f).sort((Q, oe) => Q.startRow - oe.startRow || Q.startColumn - oe.startColumn);
|
|
15320
15325
|
if (!h.length)
|
|
15321
15326
|
continue;
|
|
15322
15327
|
const V = h[0].startRow, k = h[0].startColumn, b = V - s, de = k - p, ae = [];
|
|
15323
15328
|
for (let Q = 0; Q < i.length; Q++) {
|
|
15324
|
-
const oe = i[Q], z = De(oe), qe = z ? this._lexerTreeBuilder.moveFormulaRefOffset(oe, x, g) : oe, ue = z ? this.transformFormulaByEffectCommand(n, e, qe, f) : qe, Le =
|
|
15329
|
+
const oe = i[Q], z = De(oe), qe = z ? this._lexerTreeBuilder.moveFormulaRefOffset(oe, x, g) : oe, ue = z ? this.transformFormulaByEffectCommand(n, e, qe, f) : qe, Le = oa(this._lexerTreeBuilder, ue, -de, -b);
|
|
15325
15330
|
ae.push({
|
|
15326
15331
|
newFormula: ue,
|
|
15327
15332
|
orginFormula: Le
|
|
@@ -15334,7 +15339,7 @@ let Ct = class extends te {
|
|
|
15334
15339
|
};
|
|
15335
15340
|
c.has(re.key) ? c.get(re.key).push(re) : c.set(re.key, [re]);
|
|
15336
15341
|
}
|
|
15337
|
-
const N = i.map((O) =>
|
|
15342
|
+
const N = i.map((O) => oa(this._lexerTreeBuilder, O, 0, 0)).join("_");
|
|
15338
15343
|
if (S.length > 0) {
|
|
15339
15344
|
const O = S[0].startRow, M = S[0].startColumn, F = [];
|
|
15340
15345
|
for (let g = 0; g < i.length; g++) {
|
|
@@ -15380,43 +15385,43 @@ let Ct = class extends te {
|
|
|
15380
15385
|
}), o;
|
|
15381
15386
|
}
|
|
15382
15387
|
};
|
|
15383
|
-
Ct =
|
|
15384
|
-
Fe(0, W(
|
|
15388
|
+
Ct = or([
|
|
15389
|
+
Fe(0, W(un)),
|
|
15385
15390
|
Fe(1, W(_t)),
|
|
15386
15391
|
Fe(2, xe),
|
|
15387
15392
|
Fe(3, W(tt))
|
|
15388
15393
|
], Ct);
|
|
15389
|
-
var
|
|
15390
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15394
|
+
var ur = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, fr = (n, e, a, i) => {
|
|
15395
|
+
for (var r = i > 1 ? void 0 : i ? mr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15391
15396
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15392
|
-
return i && r &&
|
|
15393
|
-
},
|
|
15394
|
-
const Ut = "sheets-formula.remote-register-function.service",
|
|
15397
|
+
return i && r && ur(e, a, r), r;
|
|
15398
|
+
}, cr = (n, e) => (a, i) => e(a, i, n);
|
|
15399
|
+
const Ut = "sheets-formula.remote-register-function.service", Ba = Ot(Ut);
|
|
15395
15400
|
let Qe = class {
|
|
15396
15401
|
constructor(n) {
|
|
15397
15402
|
this._functionService = n;
|
|
15398
15403
|
}
|
|
15399
15404
|
async registerFunctions(n) {
|
|
15400
|
-
const e = n.map(([a, i]) =>
|
|
15405
|
+
const e = n.map(([a, i]) => lr(a, i));
|
|
15401
15406
|
this._functionService.registerExecutors(...e);
|
|
15402
15407
|
}
|
|
15403
15408
|
async unregisterFunctions(n) {
|
|
15404
15409
|
this._functionService.unregisterDescriptions(...n);
|
|
15405
15410
|
}
|
|
15406
15411
|
};
|
|
15407
|
-
Qe =
|
|
15408
|
-
|
|
15412
|
+
Qe = fr([
|
|
15413
|
+
cr(0, gt)
|
|
15409
15414
|
], Qe);
|
|
15410
|
-
function
|
|
15411
|
-
const a = new
|
|
15415
|
+
function lr(n, e) {
|
|
15416
|
+
const a = new Ma(e), i = new Function(`return ${n}`)();
|
|
15412
15417
|
return a.calculateCustom = i, a;
|
|
15413
15418
|
}
|
|
15414
|
-
var
|
|
15415
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15419
|
+
var sr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, dr = (n, e, a, i) => {
|
|
15420
|
+
for (var r = i > 1 ? void 0 : i ? pr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15416
15421
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15417
|
-
return i && r &&
|
|
15422
|
+
return i && r && sr(e, a, r), r;
|
|
15418
15423
|
}, Be = (n, e) => (a, i) => e(a, i, n);
|
|
15419
|
-
const
|
|
15424
|
+
const Lr = Ot(
|
|
15420
15425
|
"sheets-formula.register-function-service"
|
|
15421
15426
|
);
|
|
15422
15427
|
let Dt = class extends te {
|
|
@@ -15443,7 +15448,7 @@ let Dt = class extends te {
|
|
|
15443
15448
|
}
|
|
15444
15449
|
_registerLocalExecutors(n) {
|
|
15445
15450
|
const e = n.map(([i, r]) => r), a = n.map(([i, r]) => {
|
|
15446
|
-
const o = new
|
|
15451
|
+
const o = new Ma(r);
|
|
15447
15452
|
return o.calculateCustom = i, o;
|
|
15448
15453
|
});
|
|
15449
15454
|
return this._functionService.registerExecutors(...a), Oe(() => this._functionService.unregisterExecutors(...e));
|
|
@@ -15453,18 +15458,18 @@ let Dt = class extends te {
|
|
|
15453
15458
|
return this._remoteRegisterFunctionService.registerFunctions(a), Oe(() => this._remoteRegisterFunctionService.unregisterFunctions(e));
|
|
15454
15459
|
}
|
|
15455
15460
|
};
|
|
15456
|
-
Dt =
|
|
15461
|
+
Dt = dr([
|
|
15457
15462
|
Be(0, W(bt)),
|
|
15458
15463
|
Be(1, W(ht)),
|
|
15459
15464
|
Be(2, gt),
|
|
15460
|
-
Be(3,
|
|
15465
|
+
Be(3, wa(Ba))
|
|
15461
15466
|
], Dt);
|
|
15462
|
-
const
|
|
15463
|
-
var
|
|
15464
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15467
|
+
const Pr = "SHEETS_FORMULA_PLUGIN";
|
|
15468
|
+
var Tr = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, Ir = (n, e, a, i) => {
|
|
15469
|
+
for (var r = i > 1 ? void 0 : i ? Er(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15465
15470
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15466
|
-
return i && r &&
|
|
15467
|
-
},
|
|
15471
|
+
return i && r && Tr(e, a, r), r;
|
|
15472
|
+
}, Lt = (n, e) => (a, i) => e(a, i, n);
|
|
15468
15473
|
let ke = class extends te {
|
|
15469
15474
|
constructor(n, e, a) {
|
|
15470
15475
|
super(), this._activeDirtyManagerService = n, this._univerInstanceService = e, this._formulaDataModel = a, this._initialize();
|
|
@@ -15741,16 +15746,16 @@ let ke = class extends te {
|
|
|
15741
15746
|
return i;
|
|
15742
15747
|
}
|
|
15743
15748
|
};
|
|
15744
|
-
ke =
|
|
15745
|
-
|
|
15746
|
-
|
|
15747
|
-
|
|
15749
|
+
ke = Ir([
|
|
15750
|
+
Lt(0, yt),
|
|
15751
|
+
Lt(1, xe),
|
|
15752
|
+
Lt(2, W(nt))
|
|
15748
15753
|
], ke);
|
|
15749
|
-
var
|
|
15750
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15754
|
+
var Nr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, Ar = (n, e, a, i) => {
|
|
15755
|
+
for (var r = i > 1 ? void 0 : i ? Rr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15751
15756
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15752
|
-
return i && r &&
|
|
15753
|
-
},
|
|
15757
|
+
return i && r && Nr(e, a, r), r;
|
|
15758
|
+
}, Pt = (n, e) => (a, i) => e(a, i, n);
|
|
15754
15759
|
let $e = class extends te {
|
|
15755
15760
|
constructor(n, e, a) {
|
|
15756
15761
|
super(), this._commandService = n, this._sheetInterceptorService = e, this._formulaDataModel = a, this._initialize();
|
|
@@ -15773,9 +15778,9 @@ let $e = class extends te {
|
|
|
15773
15778
|
}
|
|
15774
15779
|
_initInterceptorCellContent() {
|
|
15775
15780
|
this.disposeWithMe(
|
|
15776
|
-
this._sheetInterceptorService.intercept(
|
|
15781
|
+
this._sheetInterceptorService.intercept(cn.CELL_CONTENT, {
|
|
15777
15782
|
priority: 100,
|
|
15778
|
-
effect:
|
|
15783
|
+
effect: Wa.Value,
|
|
15779
15784
|
handler: (n, e, a) => {
|
|
15780
15785
|
var s, p, d;
|
|
15781
15786
|
const { unitId: i, subUnitId: r, row: o, col: u } = e, m = this._formulaDataModel.getArrayFormulaCellData(), f = (d = (p = (s = m == null ? void 0 : m[i]) == null ? void 0 : s[r]) == null ? void 0 : p[o]) == null ? void 0 : d[u];
|
|
@@ -15786,7 +15791,7 @@ let $e = class extends te {
|
|
|
15786
15791
|
t: Bt.NUMBER
|
|
15787
15792
|
}) : (n == null ? void 0 : n.t) === Bt.NUMBER && typeof (n == null ? void 0 : n.v) == "number" ? a({
|
|
15788
15793
|
...n,
|
|
15789
|
-
v:
|
|
15794
|
+
v: hn(n.v)
|
|
15790
15795
|
}) : a({
|
|
15791
15796
|
...n,
|
|
15792
15797
|
v: f.v,
|
|
@@ -15797,17 +15802,16 @@ let $e = class extends te {
|
|
|
15797
15802
|
);
|
|
15798
15803
|
}
|
|
15799
15804
|
};
|
|
15800
|
-
$e =
|
|
15801
|
-
|
|
15802
|
-
|
|
15803
|
-
|
|
15805
|
+
$e = Ar([
|
|
15806
|
+
Pt(0, pe),
|
|
15807
|
+
Pt(1, W(Mt)),
|
|
15808
|
+
Pt(2, W(nt))
|
|
15804
15809
|
], $e);
|
|
15805
|
-
var
|
|
15806
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15810
|
+
var Sr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, Dr = (n, e, a, i) => {
|
|
15811
|
+
for (var r = i > 1 ? void 0 : i ? Cr(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15807
15812
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15808
|
-
return i && r &&
|
|
15813
|
+
return i && r && Sr(e, a, r), r;
|
|
15809
15814
|
}, ve = (n, e) => (a, i) => e(a, i, n);
|
|
15810
|
-
const Pt = "AllDefaultWorkbook";
|
|
15811
15815
|
let je = class extends te {
|
|
15812
15816
|
constructor(e, a, i, r) {
|
|
15813
15817
|
super();
|
|
@@ -15835,7 +15839,7 @@ let je = class extends te {
|
|
|
15835
15839
|
this.disposeWithMe(
|
|
15836
15840
|
this._commandService.onCommandExecuted((e, a) => {
|
|
15837
15841
|
if (!(a != null && a.fromCollab)) {
|
|
15838
|
-
if (e.id ===
|
|
15842
|
+
if (e.id === ln.id)
|
|
15839
15843
|
this._unregisterDescriptionsForNotInSheetId(), this._registerDescriptions();
|
|
15840
15844
|
else if (e.id === Me.id) {
|
|
15841
15845
|
const i = e.params;
|
|
@@ -15853,7 +15857,7 @@ let je = class extends te {
|
|
|
15853
15857
|
if (a == null || i == null)
|
|
15854
15858
|
return;
|
|
15855
15859
|
const { name: r, comment: o, formulaOrRefString: u, localSheetId: m } = e;
|
|
15856
|
-
!this._descriptionService.hasDescription(r) && (m == null || m ===
|
|
15860
|
+
!this._descriptionService.hasDescription(r) && (m == null || m === ut || m === i) && this._descriptionService.registerDescriptions([{
|
|
15857
15861
|
functionName: r,
|
|
15858
15862
|
description: u + (o || ""),
|
|
15859
15863
|
abstract: u,
|
|
@@ -15897,7 +15901,7 @@ let je = class extends te {
|
|
|
15897
15901
|
const r = [];
|
|
15898
15902
|
this._preUnitId = e, Array.from(Object.values(i)).forEach((o) => {
|
|
15899
15903
|
const { name: u, comment: m, formulaOrRefString: f, localSheetId: s } = o;
|
|
15900
|
-
!this._descriptionService.hasDescription(u) && (s == null || s ===
|
|
15904
|
+
!this._descriptionService.hasDescription(u) && (s == null || s === ut || s === a) && r.push({
|
|
15901
15905
|
functionName: u,
|
|
15902
15906
|
description: f + (m || ""),
|
|
15903
15907
|
abstract: f,
|
|
@@ -15916,66 +15920,74 @@ let je = class extends te {
|
|
|
15916
15920
|
const r = [];
|
|
15917
15921
|
Array.from(Object.values(i)).forEach((o) => {
|
|
15918
15922
|
const { name: u, localSheetId: m } = o;
|
|
15919
|
-
m !==
|
|
15923
|
+
m !== ut && m !== a && r.push(u);
|
|
15920
15924
|
}), this._descriptionService.unregisterDescriptions(r);
|
|
15921
15925
|
}
|
|
15922
15926
|
};
|
|
15923
|
-
je =
|
|
15927
|
+
je = Dr([
|
|
15924
15928
|
ve(0, ht),
|
|
15925
15929
|
ve(1, qt),
|
|
15926
15930
|
ve(2, xe),
|
|
15927
15931
|
ve(3, pe)
|
|
15928
15932
|
], je);
|
|
15929
|
-
var
|
|
15930
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15933
|
+
var br = Object.defineProperty, Or = Object.getOwnPropertyDescriptor, Mr = (n, e, a, i) => {
|
|
15934
|
+
for (var r = i > 1 ? void 0 : i ? Or(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15931
15935
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15932
|
-
return i && r &&
|
|
15933
|
-
},
|
|
15936
|
+
return i && r && br(e, a, r), r;
|
|
15937
|
+
}, xr = (n, e) => (a, i) => e(a, i, n);
|
|
15934
15938
|
let ze = class extends te {
|
|
15935
15939
|
constructor(n) {
|
|
15936
15940
|
super(), this._commandService = n, [
|
|
15937
|
-
|
|
15941
|
+
Vn,
|
|
15938
15942
|
Ge
|
|
15939
15943
|
].forEach((e) => this._commandService.registerCommand(e));
|
|
15940
15944
|
}
|
|
15941
15945
|
};
|
|
15942
|
-
ze =
|
|
15943
|
-
|
|
15946
|
+
ze = Mr([
|
|
15947
|
+
xr(0, pe)
|
|
15944
15948
|
], ze);
|
|
15945
|
-
var
|
|
15946
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
15949
|
+
var va = Object.defineProperty, _r = Object.getOwnPropertyDescriptor, qr = (n, e, a) => e in n ? va(n, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : n[e] = a, Va = (n, e, a, i) => {
|
|
15950
|
+
for (var r = i > 1 ? void 0 : i ? _r(e, a) : e, o = n.length - 1, u; o >= 0; o--)
|
|
15947
15951
|
(u = n[o]) && (r = (i ? u(e, a, r) : u(r)) || r);
|
|
15948
|
-
return i && r &&
|
|
15949
|
-
}, Ze = (n, e) => (a, i) => e(a, i, n), ot = (n, e, a) =>
|
|
15950
|
-
let Je = class extends
|
|
15951
|
-
constructor(n =
|
|
15952
|
+
return i && r && va(e, a, r), r;
|
|
15953
|
+
}, Ze = (n, e) => (a, i) => e(a, i, n), ot = (n, e, a) => qr(n, typeof e != "symbol" ? e + "" : e, a);
|
|
15954
|
+
let Je = class extends la {
|
|
15955
|
+
constructor(n = ia, e, a) {
|
|
15952
15956
|
super(), this._config = n, this._injector = e, this._configService = a;
|
|
15953
|
-
const { ...i } =
|
|
15954
|
-
|
|
15957
|
+
const { ...i } = sa(
|
|
15958
|
+
{},
|
|
15959
|
+
ia,
|
|
15960
|
+
this._config
|
|
15961
|
+
);
|
|
15962
|
+
this._configService.setConfig(qi, i);
|
|
15955
15963
|
}
|
|
15956
15964
|
onStarting() {
|
|
15957
|
-
this._injector.add([Qe]), this._injector.get(
|
|
15965
|
+
this._injector.add([Qe]), this._injector.get(qa).registerChannel(
|
|
15958
15966
|
Ut,
|
|
15959
|
-
|
|
15967
|
+
Bn(this._injector.get(Qe))
|
|
15960
15968
|
);
|
|
15961
15969
|
}
|
|
15962
15970
|
};
|
|
15963
15971
|
ot(Je, "pluginName", "SHEET_FORMULA_REMOTE_PLUGIN");
|
|
15964
15972
|
ot(Je, "type", ee.UNIVER_SHEET);
|
|
15965
|
-
Je =
|
|
15966
|
-
|
|
15973
|
+
Je = Va([
|
|
15974
|
+
ca(xa),
|
|
15967
15975
|
Ze(1, W(tt)),
|
|
15968
15976
|
Ze(2, _e)
|
|
15969
15977
|
], Je);
|
|
15970
|
-
let et = class extends
|
|
15971
|
-
constructor(n =
|
|
15978
|
+
let et = class extends la {
|
|
15979
|
+
constructor(n = na, e, a) {
|
|
15972
15980
|
super(), this._config = n, this._injector = e, this._configService = a;
|
|
15973
|
-
const { ...i } =
|
|
15981
|
+
const { ...i } = sa(
|
|
15982
|
+
{},
|
|
15983
|
+
na,
|
|
15984
|
+
this._config
|
|
15985
|
+
);
|
|
15974
15986
|
this._configService.setConfig(rt, i);
|
|
15975
15987
|
}
|
|
15976
15988
|
onStarting() {
|
|
15977
15989
|
const n = this._injector, e = [
|
|
15978
|
-
[
|
|
15990
|
+
[Lr, { useClass: Dt }],
|
|
15979
15991
|
[ht, { useClass: St }],
|
|
15980
15992
|
[ze],
|
|
15981
15993
|
[Ct],
|
|
@@ -15988,9 +16000,9 @@ let et = class extends ma {
|
|
|
15988
16000
|
[we]
|
|
15989
16001
|
];
|
|
15990
16002
|
if (this._config.notExecuteFormula) {
|
|
15991
|
-
const a = n.get(
|
|
15992
|
-
e.push([
|
|
15993
|
-
useFactory: () =>
|
|
16003
|
+
const a = n.get(qa);
|
|
16004
|
+
e.push([Ba, {
|
|
16005
|
+
useFactory: () => vn(a.requestChannel(Ut))
|
|
15994
16006
|
}]);
|
|
15995
16007
|
}
|
|
15996
16008
|
e.forEach((a) => n.add(a));
|
|
@@ -16014,10 +16026,10 @@ let et = class extends ma {
|
|
|
16014
16026
|
]);
|
|
16015
16027
|
}
|
|
16016
16028
|
};
|
|
16017
|
-
ot(et, "pluginName",
|
|
16029
|
+
ot(et, "pluginName", Pr);
|
|
16018
16030
|
ot(et, "type", ee.UNIVER_SHEET);
|
|
16019
|
-
et =
|
|
16020
|
-
|
|
16031
|
+
et = Va([
|
|
16032
|
+
ca(xa, sn),
|
|
16021
16033
|
Ze(1, W(tt)),
|
|
16022
16034
|
Ze(2, _e)
|
|
16023
16035
|
], et);
|
|
@@ -16026,9 +16038,9 @@ export {
|
|
|
16026
16038
|
St as DescriptionService,
|
|
16027
16039
|
Ct as FormulaRefRangeService,
|
|
16028
16040
|
ht as IDescriptionService,
|
|
16029
|
-
|
|
16030
|
-
|
|
16031
|
-
|
|
16041
|
+
Lr as IRegisterFunctionService,
|
|
16042
|
+
Ba as IRemoteRegisterFunctionService,
|
|
16043
|
+
Vn as InsertFunctionCommand,
|
|
16032
16044
|
Ge as OtherFormulaMarkDirty,
|
|
16033
16045
|
rt as PLUGIN_CONFIG_KEY_BASE,
|
|
16034
16046
|
Dt as RegisterFunctionService,
|