@univerjs/sheets-formula 0.1.0-alpha.3 → 0.1.0-beta.1

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,20 +1,20 @@
1
- var Gn = Object.defineProperty;
2
- var Xn = (i, e, t) => e in i ? Gn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
- var k = (i, e, t) => (Xn(i, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { Disposable as H, ObjectMatrix as x, Dimension as X, OnLifecycle as K, LifecycleStages as Y, IUniverInstanceService as ge, ICommandService as Q, isFormulaString as Ee, isFormulaId as wt, Tools as G, Direction as M, CommandType as oe, toDisposable as w, ColorKit as an, ThemeService as sn, deserializeRangeWithSheet as Re, AbsoluteRefType as F, serializeRange as pt, Rectangle as Ue, getCellValueType as Kn, CellValueType as Yn, LocaleService as _e, IContextService as St, FOCUSING_FORMULA_EDITOR as on, FOCUSING_EDITOR_INPUT_FORMULA as Oe, DisposableCollection as Qn, serializeRangeToRefString as Ve, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Ft, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Lt, RANGE_TYPE as he, Plugin as Jn, PluginType as Zn } from "@univerjs/core";
5
- import { createIdentifier as Ze, Inject as y, Injector as et } from "@wendellhu/redi";
6
- import { FormulaDataModel as tt, SetArrayFormulaDataMutation as ht, LexerTreeBuilder as Ie, SetFormulaCalculationResultMutation as er, sequenceNodeType as W, matchToken as j, FUNCTION_NAMES_MATH as zt, FunctionType as ne, FUNCTION_NAMES_STATISTICAL as Pe, IFunctionService as tr, isFormulaLexerToken as nr, normalizeSheetName as rr, includeFormulaLexerToken as ir, generateStringWithSequence as cn, SetFormulaCalculationStartMutation as Ut, SetFormulaCalculationNotificationMutation as ar, FormulaExecutedStateType as xe, SetFormulaDataMutation as we, initSheetFormulaData as sr } from "@univerjs/engine-formula";
7
- import { SetRangeValuesMutation as ie, SetStyleCommand as Bt, MoveRangeMutation as Vt, MoveRowsMutation as qt, MoveColsMutation as Ht, DeleteRangeMutation as $t, InsertRangeMutation as jt, RemoveRowMutation as Wt, RemoveColMutation as Gt, RemoveSheetMutation as Et, InsertSheetMutation as Rt, INTERCEPTOR_POINT as un, SheetInterceptorService as kt, SetRangeValuesUndoMutationFactory as mn, SetRangeValuesCommand as or, SelectionManagerService as Ct, getCellAtRowCol as cr, SetSelectionsOperation as ur, NORMAL_SELECTION_PLUGIN_NAME as Be, convertSelectionDataToRange as st, getNormalSelectionStyle as mr, SetBorderCommand as fn, DeleteRangeMoveLeftCommand as ln, DeleteRangeMoveUpCommand as dn, RemoveColCommand as bn, RemoveRowCommand as pn, InsertRangeMoveDownCommand as hn, InsertRangeMoveRightCommand as En, InsertColCommand as Rn, InsertRowCommand as gn, MoveColsCommand as In, MoveRowsCommand as vn, MoveRangeCommand as Pn, handleInsertRangeMutation as nt, handleDeleteRangeMutation as rt, SetWorksheetNameCommand as fr, handleMoveRange as lr, EffectRefRangId as J, runRefRangeMutations as Z, handleInsertRow as dr, handleInsertCol as br, handleIRemoveRow as pr, handleIRemoveCol as hr, handleDeleteRangeMoveLeft as Er, handleDeleteRangeMoveUp as Rr, handleInsertRangeMoveDown as gr, handleInsertRangeMoveRight as Ir } from "@univerjs/sheets";
8
- import { DATA_TYPE as Xt, APPLY_TYPE as vr, IAutoFillService as Pr, SheetPasteCommand as Sr, ISheetClipboardService as Br, COPY_TYPE as kr, SelectionShape as Cr, IEditorBridgeService as _t, SheetSkeletonManagerService as Sn, ISelectionRenderService as Bn, getEditorObject as gt, ICellEditorManagerService as Dt, IFormulaEditorManagerService as kn, RangeSelector as _r, PASTE_SPECIAL_MENU_ID as Dr, whenEditorInputFormulaActivated as De, SetEditorResizeOperation as yr, MoveSelectionCommand as Fe, JumpOver as Kt, ExpandSelectionCommand as Yt } from "@univerjs/sheets-ui";
9
- import { IRenderManagerService as yt, DeviceInputEventType as ae, ITextSelectionRenderManager as Cn, getCellInfoInMergeData as Tr } from "@univerjs/engine-render";
10
- import { TextSelectionManagerService as _n, ReplaceContentCommand as Ar, MoveCursorOperation as Nr, DocViewModelManagerService as Mr } from "@univerjs/docs";
11
- import { KeyCode as O, ISidebarService as Dn, MenuGroup as Or, MenuItemType as Tt, MenuPosition as xr, MetaKeys as se, ComponentManager as wr, IMenuService as Fr, IShortcutService as Lr, IUIController as zr } from "@univerjs/ui";
1
+ var Kn = Object.defineProperty;
2
+ var Yn = (i, e, t) => e in i ? Kn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
+ var k = (i, e, t) => (Yn(i, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import { Disposable as $, ObjectMatrix as x, Dimension as Y, OnLifecycle as X, LifecycleStages as Q, IUniverInstanceService as Ie, ICommandService as J, isFormulaString as Re, isFormulaId as Ut, Tools as K, Direction as M, CommandType as oe, toDisposable as w, ColorKit as sn, ThemeService as on, deserializeRangeWithSheet as ge, AbsoluteRefType as L, serializeRange as gt, Rectangle as Ve, getCellValueType as Xn, CellValueType as Qn, LocaleService as De, IContextService as _t, FOCUSING_FORMULA_EDITOR as cn, UniverInstanceType as Jn, FOCUSING_EDITOR_INPUT_FORMULA as xe, DisposableCollection as Zn, serializeRangeToRefString as qe, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as ot, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as ct, RANGE_TYPE as Ee, Plugin as er, PluginType as tr } from "@univerjs/core";
5
+ import { createIdentifier as et, Inject as y, Injector as tt } from "@wendellhu/redi";
6
+ import { FormulaDataModel as nt, SetArrayFormulaDataMutation as It, LexerTreeBuilder as ve, ErrorType as nr, SetFormulaCalculationResultMutation as rr, sequenceNodeType as G, matchToken as W, FUNCTION_NAMES_ARRAY as ir, FunctionType as q, FUNCTION_NAMES_MATH as pe, FUNCTION_NAMES_STATISTICAL as Se, IFunctionService as ar, isFormulaLexerToken as sr, normalizeSheetName as or, includeFormulaLexerToken as cr, generateStringWithSequence as un, SetFormulaCalculationStartMutation as Vt, SetFormulaCalculationNotificationMutation as ur, FormulaExecutedStateType as we, SetFormulaDataMutation as Le, initSheetFormulaData as mr } from "@univerjs/engine-formula";
7
+ import { SetRangeValuesMutation as ie, SetStyleCommand as Dt, MoveRangeMutation as qt, MoveRowsMutation as Ht, MoveColsMutation as $t, DeleteRangeMutation as jt, InsertRangeMutation as Wt, RemoveRowMutation as Gt, RemoveColMutation as Kt, RemoveSheetMutation as vt, InsertSheetMutation as Pt, INTERCEPTOR_POINT as mn, SheetInterceptorService as yt, SetRangeValuesUndoMutationFactory as fn, SetRangeValuesCommand as fr, SelectionManagerService as Tt, getCellAtRowCol as lr, SetSelectionsOperation as dr, NORMAL_SELECTION_PLUGIN_NAME as Ce, convertSelectionDataToRange as ut, getNormalSelectionStyle as br, SetBorderCommand as ln, DeleteRangeMoveLeftCommand as dn, DeleteRangeMoveUpCommand as bn, RemoveColCommand as pn, RemoveRowCommand as hn, InsertRangeMoveDownCommand as En, InsertRangeMoveRightCommand as Rn, InsertColCommand as gn, InsertRowCommand as In, MoveColsCommand as vn, MoveRowsCommand as Pn, MoveRangeCommand as Sn, handleInsertRangeMutation as rt, handleDeleteRangeMutation as it, SetWorksheetNameCommand as pr, handleMoveRange as hr, EffectRefRangId as Z, runRefRangeMutations as ee, handleInsertRow as Er, handleInsertCol as Rr, handleIRemoveRow as gr, handleIRemoveCol as Ir, handleDeleteRangeMoveLeft as vr, handleDeleteRangeMoveUp as Pr, handleInsertRangeMoveDown as Sr, handleInsertRangeMoveRight as Br } from "@univerjs/sheets";
8
+ import { DATA_TYPE as Yt, APPLY_TYPE as Cr, IAutoFillService as kr, SheetPasteCommand as _r, ISheetClipboardService as Dr, COPY_TYPE as yr, SelectionShape as Tr, IEditorBridgeService as At, SheetSkeletonManagerService as Bn, ISelectionRenderService as Cn, getEditorObject as St, ICellEditorManagerService as Nt, IFormulaEditorManagerService as kn, RangeSelector as Ar, PASTE_SPECIAL_MENU_ID as Nr, whenEditorInputFormulaActivated as ye, SetEditorResizeOperation as Mr, MoveSelectionCommand as Fe, JumpOver as Xt, ExpandSelectionCommand as Qt } from "@univerjs/sheets-ui";
9
+ import { IRenderManagerService as Mt, DeviceInputEventType as ae, ITextSelectionRenderManager as _n, getCellInfoInMergeData as Or } from "@univerjs/engine-render";
10
+ import { TextSelectionManagerService as Dn, ReplaceContentCommand as xr, MoveCursorOperation as wr, DocViewModelManagerService as Lr } from "@univerjs/docs";
11
+ import { KeyCode as O, ISidebarService as yn, MenuGroup as Fr, MenuItemType as Ot, MenuPosition as zr, getMenuHiddenObservable as Ur, MetaKeys as se, ComponentManager as Vr, IMenuService as qr, IShortcutService as Hr, IUIController as $r } from "@univerjs/ui";
12
12
  import { Subject as re } from "rxjs";
13
- import { useDependency as z, connectInjector as Ur } from "@wendellhu/redi/react-bindings";
14
- import Vr, { useState as A, useEffect as Ce, forwardRef as ye, useRef as qr, createElement as Te } from "react";
15
- import { Popup as yn, Select as Hr, Input as $r, Button as ot } from "@univerjs/design";
16
- const Tn = "formula-ui";
17
- class jr extends H {
13
+ import { useDependency as z, connectInjector as jr } from "@wendellhu/redi/react-bindings";
14
+ import Wr, { useState as N, useEffect as _e, forwardRef as Te, useRef as Gr, createElement as Ae } from "react";
15
+ import { Popup as Tn, Select as Kr, Input as Yr, Button as mt } from "@univerjs/design";
16
+ const An = "formula-ui";
17
+ class Xr extends $ {
18
18
  constructor() {
19
19
  super(...arguments);
20
20
  k(this, "_dirtyConversionMap", /* @__PURE__ */ new Map());
@@ -38,15 +38,15 @@ class jr extends H {
38
38
  return this._dirtyConversionMap;
39
39
  }
40
40
  }
41
- const At = Ze(
41
+ const xt = et(
42
42
  "univer.formula.active-dirty-manager.service"
43
43
  );
44
- var Wr = Object.defineProperty, Gr = Object.getOwnPropertyDescriptor, Xr = (i, e, t, n) => {
45
- for (var r = n > 1 ? void 0 : n ? Gr(e, t) : e, a = i.length - 1, s; a >= 0; a--)
44
+ var Qr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, Zr = (i, e, t, n) => {
45
+ for (var r = n > 1 ? void 0 : n ? Jr(e, t) : e, a = i.length - 1, s; a >= 0; a--)
46
46
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
47
- return n && r && Wr(e, t, r), r;
48
- }, ct = (i, e) => (t, n) => e(t, n, i);
49
- let qe = class extends H {
47
+ return n && r && Qr(e, t, r), r;
48
+ }, ft = (i, e) => (t, n) => e(t, n, i);
49
+ let He = class extends $ {
50
50
  constructor(i, e, t) {
51
51
  super(), this._activeDirtyManagerService = i, this._currentUniverService = e, this._formulaDataModel = t, this._initialize();
52
52
  }
@@ -58,24 +58,16 @@ let qe = class extends H {
58
58
  commandId: ie.id,
59
59
  getDirtyData: (i) => {
60
60
  const e = i.params;
61
- return e.trigger === Bt.id ? {} : {
61
+ return e.trigger === Dt.id ? {} : {
62
62
  dirtyRanges: this._getSetRangeValuesMutationDirtyRange(e)
63
63
  };
64
64
  }
65
- }), this._activeDirtyManagerService.register(Vt.id, {
66
- commandId: Vt.id,
67
- getDirtyData: (i) => {
68
- const e = i.params;
69
- return {
70
- dirtyRanges: this._getMoveRangeMutationDirtyRange(e)
71
- };
72
- }
73
65
  }), this._activeDirtyManagerService.register(qt.id, {
74
66
  commandId: qt.id,
75
67
  getDirtyData: (i) => {
76
68
  const e = i.params;
77
69
  return {
78
- dirtyRanges: this._getMoveRowsMutationDirtyRange(e)
70
+ dirtyRanges: this._getMoveRangeMutationDirtyRange(e)
79
71
  };
80
72
  }
81
73
  }), this._activeDirtyManagerService.register(Ht.id, {
@@ -91,7 +83,7 @@ let qe = class extends H {
91
83
  getDirtyData: (i) => {
92
84
  const e = i.params;
93
85
  return {
94
- dirtyRanges: this._getDeleteRangeMutationDirtyRange(e)
86
+ dirtyRanges: this._getMoveRowsMutationDirtyRange(e)
95
87
  };
96
88
  }
97
89
  }), this._activeDirtyManagerService.register(jt.id, {
@@ -107,25 +99,33 @@ let qe = class extends H {
107
99
  getDirtyData: (i) => {
108
100
  const e = i.params;
109
101
  return {
110
- dirtyRanges: this._getRemoveRowOrColumnMutation(e, !0)
102
+ dirtyRanges: this._getDeleteRangeMutationDirtyRange(e)
111
103
  };
112
104
  }
113
105
  }), this._activeDirtyManagerService.register(Gt.id, {
114
106
  commandId: Gt.id,
107
+ getDirtyData: (i) => {
108
+ const e = i.params;
109
+ return {
110
+ dirtyRanges: this._getRemoveRowOrColumnMutation(e, !0)
111
+ };
112
+ }
113
+ }), this._activeDirtyManagerService.register(Kt.id, {
114
+ commandId: Kt.id,
115
115
  getDirtyData: (i) => {
116
116
  const e = i.params;
117
117
  return {
118
118
  dirtyRanges: this._getRemoveRowOrColumnMutation(e, !1)
119
119
  };
120
120
  }
121
- }), this._activeDirtyManagerService.register(Et.id, {
122
- commandId: Et.id,
121
+ }), this._activeDirtyManagerService.register(vt.id, {
122
+ commandId: vt.id,
123
123
  getDirtyData: (i) => {
124
124
  const e = i.params;
125
125
  return { dirtyNameMap: this._getRemoveSheetMutation(e) };
126
126
  }
127
- }), this._activeDirtyManagerService.register(Rt.id, {
128
- commandId: Rt.id,
127
+ }), this._activeDirtyManagerService.register(Pt.id, {
128
+ commandId: Pt.id,
129
129
  getDirtyData: (i) => {
130
130
  const e = i.params;
131
131
  return { dirtyNameMap: this._getInsertSheetMutation(e) };
@@ -147,13 +147,13 @@ let qe = class extends H {
147
147
  _getDeleteRangeMutationDirtyRange(i) {
148
148
  const { subUnitId: e, unitId: t, range: n, shiftDimension: r } = i, a = [], s = this._currentUniverService.getUniverSheetInstance(t), o = s == null ? void 0 : s.getSheetBySheetId(e), c = (o == null ? void 0 : o.getLastRowWithContent()) || 0, u = (o == null ? void 0 : o.getLastColumnWithContent()) || 0, l = new x();
149
149
  let d = null;
150
- const { startRow: m, startColumn: b, endRow: h, endColumn: I } = n;
151
- r === X.ROWS ? d = this._rangeToMatrix({
150
+ const { startRow: m, startColumn: b, endRow: h, endColumn: g } = n;
151
+ r === Y.ROWS ? d = this._rangeToMatrix({
152
152
  startRow: m,
153
153
  startColumn: b,
154
154
  endRow: c,
155
- endColumn: I
156
- }) : r === X.COLUMNS && (d = this._rangeToMatrix({
155
+ endColumn: g
156
+ }) : r === Y.COLUMNS && (d = this._rangeToMatrix({
157
157
  startRow: m,
158
158
  startColumn: b,
159
159
  endRow: h,
@@ -165,7 +165,7 @@ let qe = class extends H {
165
165
  _getRemoveRowOrColumnMutation(i, e = !0) {
166
166
  const { subUnitId: t, unitId: n, range: r } = i, a = [], s = this._currentUniverService.getUniverSheetInstance(n), o = s == null ? void 0 : s.getSheetBySheetId(t), c = (o == null ? void 0 : o.getRowCount()) || 0, u = (o == null ? void 0 : o.getColumnCount()) || 0, l = new x();
167
167
  let d = null;
168
- const { startRow: m, endRow: b, startColumn: h, endColumn: I } = r;
168
+ const { startRow: m, endRow: b, startColumn: h, endColumn: g } = r;
169
169
  e === !0 ? d = this._rangeToMatrix({
170
170
  startRow: m,
171
171
  startColumn: 0,
@@ -175,7 +175,7 @@ let qe = class extends H {
175
175
  startRow: 0,
176
176
  startColumn: h,
177
177
  endRow: c,
178
- endColumn: I
178
+ endColumn: g
179
179
  }), d != null && l.merge(d);
180
180
  const f = l.getData();
181
181
  return a.push(...this._getDirtyRangesByCellValue(n, t, f)), a.push(...this._getDirtyRangesForArrayFormula(n, t, f)), a;
@@ -217,15 +217,15 @@ let qe = class extends H {
217
217
  c.forValue((d, m, b) => {
218
218
  if (b == null)
219
219
  return !0;
220
- const { startRow: h, startColumn: I, endRow: f, endColumn: R } = b;
221
- u >= h && u <= f && l >= I && l <= R && n.push({
220
+ const { startRow: h, startColumn: g, endRow: f, endColumn: R } = b;
221
+ u >= h && u <= f && l >= g && l <= R && n.push({
222
222
  unitId: i,
223
223
  sheetId: e,
224
224
  range: {
225
225
  startRow: h,
226
- startColumn: I,
226
+ startColumn: g,
227
227
  endRow: h,
228
- endColumn: I
228
+ endColumn: g
229
229
  }
230
230
  });
231
231
  });
@@ -234,18 +234,18 @@ let qe = class extends H {
234
234
  return n;
235
235
  }
236
236
  };
237
- qe = Xr([
238
- K(Y.Ready, qe),
239
- ct(0, At),
240
- ct(1, ge),
241
- ct(2, y(tt))
242
- ], qe);
243
- var Kr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, Qr = (i, e, t, n) => {
244
- for (var r = n > 1 ? void 0 : n ? Yr(e, t) : e, a = i.length - 1, s; a >= 0; a--)
237
+ He = Zr([
238
+ X(Q.Ready, He),
239
+ ft(0, xt),
240
+ ft(1, Ie),
241
+ ft(2, y(nt))
242
+ ], He);
243
+ var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, ni = (i, e, t, n) => {
244
+ for (var r = n > 1 ? void 0 : n ? ti(e, t) : e, a = i.length - 1, s; a >= 0; a--)
245
245
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
246
- return n && r && Kr(e, t, r), r;
247
- }, ut = (i, e) => (t, n) => e(t, n, i);
248
- let He = class extends H {
246
+ return n && r && ei(e, t, r), r;
247
+ }, lt = (i, e) => (t, n) => e(t, n, i);
248
+ let $e = class extends $ {
249
249
  constructor(i, e, t) {
250
250
  super(), this._commandService = i, this._sheetInterceptorService = e, this._formulaDataModel = t, this._initialize();
251
251
  }
@@ -255,7 +255,7 @@ let He = class extends H {
255
255
  _commandExecutedListener() {
256
256
  this.disposeWithMe(
257
257
  this._commandService.onCommandExecuted((i) => {
258
- if (i.id !== ht.id)
258
+ if (i.id !== It.id)
259
259
  return;
260
260
  const e = i.params;
261
261
  if (e == null)
@@ -267,29 +267,29 @@ let He = class extends H {
267
267
  }
268
268
  _initInterceptorCellContent() {
269
269
  this.disposeWithMe(
270
- this._sheetInterceptorService.intercept(un.CELL_CONTENT, {
270
+ this._sheetInterceptorService.intercept(mn.CELL_CONTENT, {
271
271
  priority: 100,
272
272
  handler: (i, e, t) => {
273
- var d, m, b, h, I, f;
274
- const { unitId: n, subUnitId: r, row: a, col: s } = e, o = this._formulaDataModel.getArrayFormulaCellData(), c = this._formulaDataModel.getArrayFormulaRange(), u = (b = (m = (d = o == null ? void 0 : o[n]) == null ? void 0 : d[r]) == null ? void 0 : m[a]) == null ? void 0 : b[s], l = (f = (I = (h = c == null ? void 0 : c[n]) == null ? void 0 : h[r]) == null ? void 0 : I[a]) == null ? void 0 : f[s];
273
+ var d, m, b, h, g, f;
274
+ const { unitId: n, subUnitId: r, row: a, col: s } = e, o = this._formulaDataModel.getArrayFormulaCellData(), c = this._formulaDataModel.getArrayFormulaRange(), u = (b = (m = (d = o == null ? void 0 : o[n]) == null ? void 0 : d[r]) == null ? void 0 : m[a]) == null ? void 0 : b[s], l = (f = (g = (h = c == null ? void 0 : c[n]) == null ? void 0 : h[r]) == null ? void 0 : g[a]) == null ? void 0 : f[s];
275
275
  return u == null || l != null && l.startRow === a && l.startColumn === s ? t(i) : t({ ...i, ...u });
276
276
  }
277
277
  })
278
278
  );
279
279
  }
280
280
  };
281
- He = Qr([
282
- K(Y.Ready, He),
283
- ut(0, Q),
284
- ut(1, y(kt)),
285
- ut(2, y(tt))
286
- ], He);
287
- var Jr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, ei = (i, e, t, n) => {
288
- for (var r = n > 1 ? void 0 : n ? Zr(e, t) : e, a = i.length - 1, s; a >= 0; a--)
281
+ $e = ni([
282
+ X(Q.Ready, $e),
283
+ lt(0, J),
284
+ lt(1, y(yt)),
285
+ lt(2, y(nt))
286
+ ], $e);
287
+ var ri = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, ai = (i, e, t, n) => {
288
+ for (var r = n > 1 ? void 0 : n ? ii(e, t) : e, a = i.length - 1, s; a >= 0; a--)
289
289
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
290
- return n && r && Jr(e, t, r), r;
291
- }, Qt = (i, e) => (t, n) => e(t, n, i);
292
- let $e = class extends H {
290
+ return n && r && ri(e, t, r), r;
291
+ }, Jt = (i, e) => (t, n) => e(t, n, i);
292
+ let je = class extends $ {
293
293
  constructor(i, e) {
294
294
  super(), this._autoFillService = i, this._lexerTreeBuilder = e, this._initialize();
295
295
  }
@@ -298,12 +298,12 @@ let $e = class extends H {
298
298
  }
299
299
  _registerAutoFill() {
300
300
  const i = {
301
- type: Xt.FORMULA,
301
+ type: Yt.FORMULA,
302
302
  priority: 1001,
303
- match: (e) => Ee(e == null ? void 0 : e.f) || wt(e == null ? void 0 : e.si),
304
- isContinue: (e, t) => e.type === Xt.FORMULA,
303
+ match: (e) => Re(e == null ? void 0 : e.f) || Ut(e == null ? void 0 : e.si),
304
+ isContinue: (e, t) => e.type === Yt.FORMULA,
305
305
  applyFunctions: {
306
- [vr.COPY]: (e, t, n, r) => {
306
+ [Cr.COPY]: (e, t, n, r) => {
307
307
  const { data: a, index: s } = e;
308
308
  return this._fillCopyFormula(a, t, n, s, r);
309
309
  }
@@ -313,23 +313,23 @@ let $e = class extends H {
313
313
  }
314
314
  _fillCopyFormula(i, e, t, n, r) {
315
315
  var c, u;
316
- const a = ni(r), s = [], o = /* @__PURE__ */ new Map();
316
+ const a = oi(r), s = [], o = /* @__PURE__ */ new Map();
317
317
  for (let l = 1; l <= e; l++) {
318
- const d = (l - 1) % i.length, m = G.deepClone(i[d]);
318
+ const d = (l - 1) % i.length, m = K.deepClone(i[d]);
319
319
  if (m) {
320
- const b = ((c = i[d]) == null ? void 0 : c.f) || "", h = ((u = i[d]) == null ? void 0 : u.si) || "", I = Ee(b);
321
- if (wt(h))
320
+ const b = ((c = i[d]) == null ? void 0 : c.f) || "", h = ((u = i[d]) == null ? void 0 : u.si) || "", g = Re(b);
321
+ if (Ut(h))
322
322
  m.si = h, m.f = null, m.v = null, m.p = null, t === M.DOWN || t === M.RIGHT ? s.push(m) : s.unshift(m);
323
- else if (I) {
323
+ else if (g) {
324
324
  let R = o.get(d);
325
325
  if (R)
326
326
  m.si = R, m.f = null, m.v = null, m.p = null;
327
327
  else {
328
- R = G.generateRandomId(6), o.set(d, R);
329
- const { offsetX: p, offsetY: g } = ti(a, t), C = this._lexerTreeBuilder.moveFormulaRefOffset(
328
+ R = K.generateRandomId(6), o.set(d, R);
329
+ const { offsetX: p, offsetY: I } = si(a, t), C = this._lexerTreeBuilder.moveFormulaRefOffset(
330
330
  b,
331
331
  p,
332
- g
332
+ I
333
333
  );
334
334
  m.si = R, m.f = C, m.v = null, m.p = null;
335
335
  }
@@ -340,12 +340,12 @@ let $e = class extends H {
340
340
  return s;
341
341
  }
342
342
  };
343
- $e = ei([
344
- K(Y.Ready, $e),
345
- Qt(0, Pr),
346
- Qt(1, y(Ie))
347
- ], $e);
348
- function ti(i, e) {
343
+ je = ai([
344
+ X(Q.Ready, je),
345
+ Jt(0, kr),
346
+ Jt(1, y(ve))
347
+ ], je);
348
+ function si(i, e) {
349
349
  let t = 0, n = 0;
350
350
  switch (e) {
351
351
  case M.UP:
@@ -363,7 +363,7 @@ function ti(i, e) {
363
363
  }
364
364
  return { offsetX: t, offsetY: n };
365
365
  }
366
- function ni(i) {
366
+ function oi(i) {
367
367
  let e = 0;
368
368
  for (const t in i)
369
369
  i[t].forEach((n) => {
@@ -371,20 +371,20 @@ function ni(i) {
371
371
  });
372
372
  return e;
373
373
  }
374
- const An = "special-paste-formula", Nn = {
374
+ const Nn = "special-paste-formula", Mn = {
375
375
  id: "sheet.command.paste-formula",
376
376
  type: oe.COMMAND,
377
- handler: async (i) => i.get(Q).executeCommand(Sr.id, {
378
- value: An
377
+ handler: async (i) => i.get(J).executeCommand(_r.id, {
378
+ value: Nn
379
379
  })
380
380
  };
381
- var ri = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, ai = (i, e, t, n) => {
382
- for (var r = n > 1 ? void 0 : n ? ii(e, t) : e, a = i.length - 1, s; a >= 0; a--)
381
+ var ci = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, mi = (i, e, t, n) => {
382
+ for (var r = n > 1 ? void 0 : n ? ui(e, t) : e, a = i.length - 1, s; a >= 0; a--)
383
383
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
384
- return n && r && ri(e, t, r), r;
385
- }, Le = (i, e) => (t, n) => e(t, n, i);
386
- const si = "default-paste-formula";
387
- let je = class extends H {
384
+ return n && r && ci(e, t, r), r;
385
+ }, ze = (i, e) => (t, n) => e(t, n, i);
386
+ const fi = "default-paste-formula";
387
+ let We = class extends $ {
388
388
  constructor(i, e, t, n) {
389
389
  super(), this._currentUniverSheet = i, this._lexerTreeBuilder = e, this._sheetClipboardService = t, this._injector = n, this._initialize();
390
390
  }
@@ -396,14 +396,14 @@ let je = class extends H {
396
396
  }
397
397
  _pasteFormulaHook() {
398
398
  return {
399
- hookName: An,
399
+ hookName: Nn,
400
400
  specialPasteInfo: {
401
401
  label: "specialPaste.formula"
402
402
  },
403
403
  onPasteCells: (e, t, n, r) => {
404
404
  const a = this._currentUniverSheet.getCurrentUniverSheetInstance(), s = a.getUnitId(), o = a.getActiveSheet().getSheetId();
405
405
  return this._injector.invoke(
406
- (c) => Jt(
406
+ (c) => Zt(
407
407
  s,
408
408
  o,
409
409
  e,
@@ -419,11 +419,11 @@ let je = class extends H {
419
419
  }
420
420
  _pasteWithFormulaHook() {
421
421
  return {
422
- hookName: si,
422
+ hookName: fi,
423
423
  onPasteCells: (e, t, n, r) => {
424
424
  const a = this._currentUniverSheet.getCurrentUniverSheetInstance(), s = a.getUnitId(), o = a.getActiveSheet().getSheetId();
425
425
  return this._injector.invoke(
426
- (c) => Jt(
426
+ (c) => Zt(
427
427
  s,
428
428
  o,
429
429
  e,
@@ -437,30 +437,30 @@ let je = class extends H {
437
437
  };
438
438
  }
439
439
  };
440
- je = ai([
441
- K(Y.Ready, je),
442
- Le(0, ge),
443
- Le(1, y(Ie)),
444
- Le(2, Br),
445
- Le(3, y(et))
446
- ], je);
447
- function Jt(i, e, t, n, r, a, s, o = !1) {
440
+ We = mi([
441
+ X(Q.Ready, We),
442
+ ze(0, Ie),
443
+ ze(1, y(ve)),
444
+ ze(2, Dr),
445
+ ze(3, y(tt))
446
+ ], We);
447
+ function Zt(i, e, t, n, r, a, s, o = !1) {
448
448
  const c = [], u = [], { startColumn: l, startRow: d } = t, m = new x(), b = /* @__PURE__ */ new Map();
449
- let h = 0, I = 0, f = 0, R = 0;
449
+ let h = 0, g = 0, f = 0, R = 0;
450
450
  if (a) {
451
451
  const { copyType: C, copyRange: S } = a;
452
- C === kr.COPY && S && (f = S.startRow, R = S.startColumn, h = S.endRow - f + 1, I = S.endColumn - R + 1);
452
+ C === yr.COPY && S && (f = S.startRow, R = S.startColumn, h = S.endRow - f + 1, g = S.endColumn - R + 1);
453
453
  }
454
454
  n.forValue((C, S, v) => {
455
- const P = v.f || "", _ = {};
456
- if (o && (_.v = v.v), Ee(P) && h && I) {
457
- const N = C % h, B = S % I, T = `${N}_${B}`;
455
+ const B = v.f || "", _ = {};
456
+ if (o && (_.v = v.v), Re(B) && h && g) {
457
+ const A = C % h, P = S % g, T = `${A}_${P}`;
458
458
  let D = b.get(T);
459
459
  if (D)
460
460
  _.si = D, _.f = null, _.v = null, _.p = null;
461
461
  else {
462
- D = G.generateRandomId(6), b.set(T, D);
463
- const $ = S + l - (R + B), U = C + d - (f + N), ce = s.moveFormulaRefOffset(P, $, U);
462
+ D = K.generateRandomId(6), b.set(T, D);
463
+ const j = S + l - (R + P), U = C + d - (f + A), ce = s.moveFormulaRefOffset(B, j, U);
464
464
  _.si = D, _.f = ce, _.v = null, _.p = null;
465
465
  }
466
466
  }
@@ -475,24 +475,24 @@ function Jt(i, e, t, n, r, a, s, o = !1) {
475
475
  id: ie.id,
476
476
  params: p
477
477
  });
478
- const g = mn(
478
+ const I = fn(
479
479
  r,
480
480
  p
481
481
  );
482
482
  return u.push({
483
483
  id: ie.id,
484
- params: g
484
+ params: I
485
485
  }), {
486
486
  undos: u,
487
487
  redos: c
488
488
  };
489
489
  }
490
- var oi = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, ui = (i, e, t, n) => {
491
- for (var r = n > 1 ? void 0 : n ? ci(e, t) : e, a = i.length - 1, s; a >= 0; a--)
490
+ var li = Object.defineProperty, di = Object.getOwnPropertyDescriptor, bi = (i, e, t, n) => {
491
+ for (var r = n > 1 ? void 0 : n ? di(e, t) : e, a = i.length - 1, s; a >= 0; a--)
492
492
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
493
- return n && r && oi(e, t, r), r;
494
- }, ee = (i, e) => (t, n) => e(t, n, i);
495
- let We = class extends H {
493
+ return n && r && li(e, t, r), r;
494
+ }, te = (i, e) => (t, n) => e(t, n, i);
495
+ let Ge = class extends $ {
496
496
  constructor(e, t, n, r, a, s, o, c, u) {
497
497
  super();
498
498
  k(this, "_previousShape");
@@ -505,62 +505,65 @@ let We = class extends H {
505
505
  this._editorBridgeService.interceptor.getInterceptPoints().BEFORE_CELL_EDIT,
506
506
  {
507
507
  handler: (e, t, n) => {
508
- var b, h, I, f;
509
- const { row: r, col: a, unitId: s, subUnitId: o } = t, c = this._formulaDataModel.getArrayFormulaRange(), u = this._formulaDataModel.getArrayFormulaCellData();
508
+ var h, g, f, R;
509
+ const { row: r, col: a, unitId: s, subUnitId: o, worksheet: c } = t, u = this._formulaDataModel.getArrayFormulaRange(), l = this._formulaDataModel.getArrayFormulaCellData();
510
510
  if (this._removeArrayFormulaRangeShape(), e == null)
511
511
  return n(e);
512
- let l = null;
513
- const d = this._formulaDataModel.getFormulaDataItem(
512
+ let d = null;
513
+ const m = this._formulaDataModel.getFormulaDataItem(
514
514
  r,
515
515
  a,
516
516
  o,
517
517
  s
518
518
  );
519
- if (d != null) {
520
- const { f: R, si: p, x: g = 0, y: C = 0 } = d;
521
- if (p != null && (g > 0 || C > 0)) {
522
- let S = "";
523
- if (R.length > 0)
524
- S = R;
519
+ if (m != null) {
520
+ const { f: p, si: I, x: C = 0, y: S = 0 } = m;
521
+ if (I != null && (C > 0 || S > 0)) {
522
+ let v = "";
523
+ if (p.length > 0)
524
+ v = p;
525
525
  else {
526
- const P = this._formulaDataModel.getFormulaItemBySId(
527
- p,
526
+ const _ = this._formulaDataModel.getFormulaItemBySId(
527
+ I,
528
528
  o,
529
529
  s
530
530
  );
531
- if (P == null || P.f.length === 0)
531
+ if (_ == null || _.f.length === 0)
532
532
  return n(e);
533
- S = P.f;
533
+ v = _.f;
534
534
  }
535
- l = { f: this._lexerTreeBuilder.moveFormulaRefOffset(
536
- S,
537
- g,
538
- C
535
+ d = { f: this._lexerTreeBuilder.moveFormulaRefOffset(
536
+ v,
537
+ C,
538
+ S
539
539
  ) };
540
540
  }
541
541
  }
542
- if (e.v != null && e.v !== "" && ((I = (h = (b = u[s]) == null ? void 0 : b[o]) == null ? void 0 : h[r]) == null ? void 0 : I[a]) == null)
543
- return l || n(e);
544
- const m = (f = c == null ? void 0 : c[s]) == null ? void 0 : f[o];
545
- return m != null && new x(m).forValue((R, p, g) => {
546
- if (g == null)
542
+ if (e.v != null && e.v !== "" && ((f = (g = (h = l[s]) == null ? void 0 : h[o]) == null ? void 0 : g[r]) == null ? void 0 : f[a]) == null)
543
+ return d || n(e);
544
+ const b = (R = u == null ? void 0 : u[s]) == null ? void 0 : R[o];
545
+ return b != null && new x(b).forValue((p, I, C) => {
546
+ if (C == null)
547
547
  return !0;
548
- const { startRow: C, startColumn: S, endRow: v, endColumn: P } = g;
549
- if (R === r && p === a)
550
- return this._createArrayFormulaRangeShape(g, s), !1;
551
- if (r >= C && r <= v && a >= S && a <= P) {
552
- const _ = this._formulaDataModel.getFormulaDataItem(
553
- R,
548
+ const { startRow: S, startColumn: v, endRow: B, endColumn: _ } = C;
549
+ if (p === r && I === a)
550
+ return this._createArrayFormulaRangeShape(C, s), !1;
551
+ if (r >= S && r <= B && a >= v && a <= _) {
552
+ const A = c.getCell(S, v);
553
+ if ((A == null ? void 0 : A.v) === nr.SPILL)
554
+ return;
555
+ const P = this._formulaDataModel.getFormulaDataItem(
554
556
  p,
557
+ I,
555
558
  o,
556
559
  s
557
560
  );
558
- return _ == null || _.f == null ? !0 : (l == null && (l = {
559
- f: _.f,
561
+ return P == null || P.f == null ? !0 : (d == null && (d = {
562
+ f: P.f,
560
563
  isInArrayFormulaRange: !0
561
- }), this._createArrayFormulaRangeShape(g, s), !1);
564
+ }), this._createArrayFormulaRangeShape(C, s), !1);
562
565
  }
563
- }), l || n(e);
566
+ }), d || n(e);
564
567
  }
565
568
  }
566
569
  )
@@ -569,7 +572,7 @@ let We = class extends H {
569
572
  }
570
573
  _initInterceptorCell() {
571
574
  this.disposeWithMe(
572
- this._sheetInterceptorService.intercept(un.CELL_CONTENT, {
575
+ this._sheetInterceptorService.intercept(mn.CELL_CONTENT, {
573
576
  handler: (e, t, n) => {
574
577
  var l, d, m;
575
578
  const { row: r, col: a, unitId: s, subUnitId: o } = t, c = this._formulaDataModel.getArrayFormulaCellData(), u = (m = (d = (l = c == null ? void 0 : c[s]) == null ? void 0 : l[o]) == null ? void 0 : d[r]) == null ? void 0 : m[a];
@@ -581,13 +584,13 @@ let We = class extends H {
581
584
  _commandExecutedListener() {
582
585
  this.disposeWithMe(
583
586
  this._commandService.onCommandExecuted((e) => {
584
- e.id === er.id && this._removeArrayFormulaRangeShape();
587
+ e.id === rr.id && this._removeArrayFormulaRangeShape();
585
588
  })
586
589
  );
587
590
  }
588
591
  _createArrayFormulaRangeShape(e, t) {
589
592
  var b;
590
- const n = this._themeService.getCurrentTheme(), r = new an(n.colorWhite).setAlpha(0).toString(), a = {
593
+ const n = this._themeService.getCurrentTheme(), r = new sn(n.colorWhite).setAlpha(0).toString(), a = {
591
594
  strokeWidth: 1,
592
595
  stroke: n.hyacinth700,
593
596
  fill: r,
@@ -602,31 +605,31 @@ let We = class extends H {
602
605
  }), u = (b = this._sheetSkeletonManagerService.getCurrent()) == null ? void 0 : b.skeleton;
603
606
  if (!s || !u)
604
607
  return;
605
- const { rowHeaderWidth: l, columnHeaderHeight: d } = u, m = new Cr(s, 100, !1, this._themeService);
608
+ const { rowHeaderWidth: l, columnHeaderHeight: d } = u, m = new Tr(s, 100, !1, this._themeService);
606
609
  m.update(o, l, d, a, c), this._previousShape = m;
607
610
  }
608
611
  _removeArrayFormulaRangeShape() {
609
612
  this._previousShape != null && (this._previousShape.dispose(), this._previousShape = null);
610
613
  }
611
614
  };
612
- We = ui([
613
- K(Y.Rendered, We),
614
- ee(0, y(_t)),
615
- ee(1, y(tt)),
616
- ee(2, y(Ie)),
617
- ee(3, y(sn)),
618
- ee(4, yt),
619
- ee(5, Bn),
620
- ee(6, y(Sn)),
621
- ee(7, Q),
622
- ee(8, y(kt))
623
- ], We);
624
- const Nt = {
615
+ Ge = bi([
616
+ X(Q.Rendered, Ge),
617
+ te(0, y(At)),
618
+ te(1, y(nt)),
619
+ te(2, y(ve)),
620
+ te(3, y(on)),
621
+ te(4, Mt),
622
+ te(5, Cn),
623
+ te(6, y(Bn)),
624
+ te(7, J),
625
+ te(8, y(yt))
626
+ ], Ge);
627
+ const wt = {
625
628
  id: "formula-ui.operation.change-ref-to-absolute",
626
629
  type: oe.OPERATION,
627
630
  handler: async (i) => !0
628
631
  };
629
- class mi {
632
+ class pi {
630
633
  constructor() {
631
634
  k(this, "_sequenceNodes", []);
632
635
  k(this, "_isSelectionMoving", !1);
@@ -692,7 +695,7 @@ class mi {
692
695
  */
693
696
  updateSequenceRef(e, t) {
694
697
  const n = this._sequenceNodes[e];
695
- if (typeof n == "string" || n.nodeType !== W.REFERENCE)
698
+ if (typeof n == "string" || n.nodeType !== G.REFERENCE)
696
699
  return;
697
700
  const r = t.length - n.token.length, a = { ...n };
698
701
  a.token = t, a.endIndex += r, this._sequenceNodes[e] = a;
@@ -717,7 +720,7 @@ class mi {
717
720
  token: t,
718
721
  startIndex: e,
719
722
  endIndex: e + n - 1,
720
- nodeType: W.REFERENCE
723
+ nodeType: G.REFERENCE
721
724
  });
722
725
  for (let a = r + 1, s = this._sequenceNodes.length; a < s; a++) {
723
726
  const o = this._sequenceNodes[a];
@@ -775,13 +778,13 @@ class mi {
775
778
  return this._isLockedOnSelectionInsertRefString;
776
779
  }
777
780
  }
778
- const Ae = Ze("formula-ui.input-service");
779
- var fi = Object.defineProperty, li = Object.getOwnPropertyDescriptor, di = (i, e, t, n) => {
780
- for (var r = n > 1 ? void 0 : n ? li(e, t) : e, a = i.length - 1, s; a >= 0; a--)
781
+ const Ne = et("formula-ui.input-service");
782
+ var hi = Object.defineProperty, Ei = Object.getOwnPropertyDescriptor, Ri = (i, e, t, n) => {
783
+ for (var r = n > 1 ? void 0 : n ? Ei(e, t) : e, a = i.length - 1, s; a >= 0; a--)
781
784
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
782
- return n && r && fi(e, t, r), r;
785
+ return n && r && hi(e, t, r), r;
783
786
  }, me = (i, e) => (t, n) => e(t, n, i);
784
- let Ge = class extends H {
787
+ let Ke = class extends $ {
785
788
  constructor(e, t, n, r, a, s, o) {
786
789
  super();
787
790
  k(this, "_userCursorMove", !1);
@@ -832,7 +835,7 @@ let Ge = class extends H {
832
835
  if (e == null)
833
836
  return;
834
837
  const { startOffset: t } = e, n = t - 2, r = this._formulaInputService.getCurrentSequenceNodeIndex(n), a = this._formulaInputService.getCurrentSequenceNodeByIndex(r);
835
- if (a == null || typeof a == "string" || a.nodeType !== W.REFERENCE)
838
+ if (a == null || typeof a == "string" || a.nodeType !== G.REFERENCE)
836
839
  return;
837
840
  const s = a.token.split("!");
838
841
  let o = a.token;
@@ -841,12 +844,12 @@ let Ge = class extends H {
841
844
  for (let d = 0, m = s.length; d < m - 1; d++)
842
845
  c += s[d];
843
846
  let u = o;
844
- if (o.indexOf(j.COLON) > -1)
847
+ if (o.indexOf(W.COLON) > -1)
845
848
  if (!this._userCursorMove)
846
849
  u = this._changeRangeRef(o);
847
850
  else {
848
- const d = o.split(j.COLON), m = d[0], b = d[1];
849
- n - a.startIndex <= m.length ? u = this._changeSingleRef(m) + j.COLON + b : u = m + j.COLON + this._changeSingleRef(b);
851
+ const d = o.split(W.COLON), m = d[0], b = d[1];
852
+ n - a.startIndex <= m.length ? u = this._changeSingleRef(m) + W.COLON + b : u = m + W.COLON + this._changeSingleRef(b);
850
853
  }
851
854
  else
852
855
  u = this._changeSingleRef(o);
@@ -855,17 +858,17 @@ let Ge = class extends H {
855
858
  this._formulaInputService.updateSequenceRef(r, u), this._formulaInputService.syncToEditor(n + l + 1);
856
859
  }
857
860
  _changeRangeRef(e) {
858
- const t = Re(e).range;
861
+ const t = ge(e).range;
859
862
  let n = "";
860
- return t.startAbsoluteRefType === F.NONE || t.startAbsoluteRefType == null ? (t.startAbsoluteRefType = F.ALL, t.endAbsoluteRefType = F.ALL) : (t.startAbsoluteRefType = F.NONE, t.endAbsoluteRefType = F.NONE), n = pt(t), n;
863
+ return t.startAbsoluteRefType === L.NONE || t.startAbsoluteRefType == null ? (t.startAbsoluteRefType = L.ALL, t.endAbsoluteRefType = L.ALL) : (t.startAbsoluteRefType = L.NONE, t.endAbsoluteRefType = L.NONE), n = gt(t), n;
861
864
  }
862
865
  _changeSingleRef(e) {
863
- const t = Re(e).range, n = t.startAbsoluteRefType;
866
+ const t = ge(e).range, n = t.startAbsoluteRefType;
864
867
  let r = "";
865
- return n === F.NONE || n == null ? (t.startAbsoluteRefType = F.ALL, t.endAbsoluteRefType = F.ALL) : n === F.ALL ? (t.startAbsoluteRefType = F.ROW, t.endAbsoluteRefType = F.ROW) : n === F.ROW ? (t.startAbsoluteRefType = F.COLUMN, t.endAbsoluteRefType = F.COLUMN) : (t.startAbsoluteRefType = F.NONE, t.endAbsoluteRefType = F.NONE), r = pt(t), r;
868
+ return n === L.NONE || n == null ? (t.startAbsoluteRefType = L.ALL, t.endAbsoluteRefType = L.ALL) : n === L.ALL ? (t.startAbsoluteRefType = L.ROW, t.endAbsoluteRefType = L.ROW) : n === L.ROW ? (t.startAbsoluteRefType = L.COLUMN, t.endAbsoluteRefType = L.COLUMN) : (t.startAbsoluteRefType = L.NONE, t.endAbsoluteRefType = L.NONE), r = gt(t), r;
866
869
  }
867
870
  _commandExecutedListener() {
868
- const e = [Nt.id];
871
+ const e = [wt.id];
869
872
  this.disposeWithMe(
870
873
  this._commandService.onCommandExecuted((t) => {
871
874
  e.includes(t.id) && this._changeRefString();
@@ -873,32 +876,32 @@ let Ge = class extends H {
873
876
  );
874
877
  }
875
878
  _getEditorObject() {
876
- return gt(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
879
+ return St(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
877
880
  }
878
881
  };
879
- Ge = di([
880
- K(Y.Steady, Ge),
881
- me(0, Q),
882
- me(1, Cn),
883
- me(2, y(_t)),
884
- me(3, y(Ie)),
885
- me(4, yt),
886
- me(5, Ae),
887
- me(6, y(_n))
888
- ], Ge);
889
- const Mn = {
882
+ Ke = Ri([
883
+ X(Q.Steady, Ke),
884
+ me(0, J),
885
+ me(1, _n),
886
+ me(2, y(At)),
887
+ me(3, y(ve)),
888
+ me(4, Mt),
889
+ me(5, Ne),
890
+ me(6, y(Dn))
891
+ ], Ke);
892
+ const On = {
890
893
  id: "formula-ui.command.insert-function",
891
894
  type: oe.COMMAND,
892
895
  handler: async (i, e) => {
893
- const { list: t } = e, n = i.get(Q), r = new x();
896
+ const { list: t } = e, n = i.get(J), r = new x();
894
897
  t.forEach((s) => {
895
- const { range: o, primary: c, formula: u } = s, { row: l, column: d } = c, m = G.generateRandomId(6);
898
+ const { range: o, primary: c, formula: u } = s, { row: l, column: d } = c, m = K.generateRandomId(6);
896
899
  r.setValue(l, d, {
897
900
  f: u,
898
901
  si: m
899
902
  });
900
- const { startRow: b, startColumn: h, endRow: I, endColumn: f } = o;
901
- for (let R = b; R <= I; R++)
903
+ const { startRow: b, startColumn: h, endRow: g, endColumn: f } = o;
904
+ for (let R = b; R <= g; R++)
902
905
  for (let p = h; p <= f; p++)
903
906
  (R !== l || p !== d) && r.setValue(R, p, {
904
907
  si: m
@@ -907,9 +910,9 @@ const Mn = {
907
910
  const a = {
908
911
  value: r.getData()
909
912
  };
910
- return n.executeCommand(or.id, a);
913
+ return n.executeCommand(fr.id, a);
911
914
  }
912
- }, ve = {
915
+ }, Pe = {
913
916
  id: "formula-ui.operation.select-editor-formula",
914
917
  type: oe.OPERATION,
915
918
  handler: (i, e) => (
@@ -941,8 +944,8 @@ const Mn = {
941
944
  // }
942
945
  !0
943
946
  )
944
- }, de = Ze("formula-ui.prompt-service");
945
- class bi {
947
+ }, de = et("formula-ui.prompt-service");
948
+ class gi {
946
949
  constructor() {
947
950
  k(this, "_search$", new re());
948
951
  k(this, "_help$", new re());
@@ -983,62 +986,62 @@ class bi {
983
986
  this._acceptFormulaName$.next(e);
984
987
  }
985
988
  }
986
- const It = {
989
+ const Bt = {
987
990
  id: "formula-ui.operation.help-function",
988
991
  type: oe.OPERATION,
989
992
  handler: async (i, e) => (i.get(de).help(e), !0)
990
- }, Mt = {
993
+ }, Lt = {
991
994
  id: "formula-ui.operation.insert-function",
992
995
  type: oe.OPERATION,
993
996
  handler: async (i, e) => {
994
- const t = i.get(Ct), n = i.get(Ae), r = t.getSelections();
997
+ const t = i.get(Tt), n = i.get(Ne), r = t.getSelections();
995
998
  if (!r || !r.length)
996
999
  return !1;
997
- const a = i.get(ge).getCurrentUniverSheetInstance(), s = a.getActiveSheet(), o = a.getUnitId(), c = s.getSheetId(), u = s.getCellMatrix(), { value: l } = e, d = i.get(Q), m = [];
998
- let b = null, h = 0, I = 0;
1000
+ const a = i.get(Ie).getCurrentUniverSheetInstance(), s = a.getActiveSheet(), o = a.getUnitId(), c = s.getSheetId(), u = s.getCellMatrix(), { value: l } = e, d = i.get(J), m = [];
1001
+ let b = null, h = 0, g = 0;
999
1002
  if (r.some((f) => {
1000
- const { range: R, primary: p } = f, g = (p == null ? void 0 : p.actualRow) ?? R.startRow, C = (p == null ? void 0 : p.actualColumn) ?? R.startColumn, S = pi(u, g, C);
1003
+ const { range: R, primary: p } = f, I = (p == null ? void 0 : p.actualRow) ?? R.startRow, C = (p == null ? void 0 : p.actualColumn) ?? R.startColumn, S = Ii(u, I, C);
1001
1004
  if (!S)
1002
- return b = R, h = g, I = C, !0;
1003
- const v = pt(S), P = `=${l}(${v})`;
1005
+ return b = R, h = I, g = C, !0;
1006
+ const v = gt(S), B = `=${l}(${v})`;
1004
1007
  return m.push({
1005
1008
  range: R,
1006
1009
  primary: {
1007
- row: g,
1010
+ row: I,
1008
1011
  column: C
1009
1012
  },
1010
- formula: P
1013
+ formula: B
1011
1014
  }), !1;
1012
1015
  }), b) {
1013
- const f = cr(h, I, s), R = {
1014
- range: Ue.clone(b),
1016
+ const f = lr(h, g, s), R = {
1017
+ range: Ve.clone(b),
1015
1018
  primary: {
1016
1019
  startRow: f.startRow,
1017
1020
  startColumn: f.startColumn,
1018
1021
  endRow: f.endRow,
1019
1022
  endColumn: f.endColumn,
1020
1023
  actualRow: h,
1021
- actualColumn: I,
1024
+ actualColumn: g,
1022
1025
  isMerged: f.isMerged,
1023
- isMergedMainCell: f.startRow === h && f.startColumn === I
1026
+ isMergedMainCell: f.startRow === h && f.startColumn === g
1024
1027
  }
1025
1028
  }, p = {
1026
1029
  unitId: o,
1027
1030
  sheetId: c,
1028
- pluginName: Be,
1031
+ pluginName: Ce,
1029
1032
  selections: [R]
1030
1033
  };
1031
- await d.executeCommand(ur.id, p), setTimeout(() => {
1034
+ await d.executeCommand(dr.id, p), setTimeout(() => {
1032
1035
  n.inputFormula(`=${l}(`);
1033
1036
  }, 0);
1034
1037
  }
1035
- return m.length === 0 ? !1 : d.executeCommand(Mn.id, {
1038
+ return m.length === 0 ? !1 : d.executeCommand(On.id, {
1036
1039
  list: m
1037
1040
  });
1038
1041
  }
1039
1042
  };
1040
- function pi(i, e, t) {
1041
- const n = hi(i, e, t);
1043
+ function Ii(i, e, t) {
1044
+ const n = vi(i, e, t);
1042
1045
  if (n !== e)
1043
1046
  return {
1044
1047
  startRow: n,
@@ -1046,7 +1049,7 @@ function pi(i, e, t) {
1046
1049
  startColumn: t,
1047
1050
  endColumn: t
1048
1051
  };
1049
- const r = Ei(i, e, t);
1052
+ const r = Pi(i, e, t);
1050
1053
  return r !== t ? {
1051
1054
  startRow: e,
1052
1055
  endRow: e,
@@ -1054,18 +1057,18 @@ function pi(i, e, t) {
1054
1057
  endColumn: t - 1
1055
1058
  } : null;
1056
1059
  }
1057
- function hi(i, e, t) {
1060
+ function vi(i, e, t) {
1058
1061
  let n = !1;
1059
1062
  if (e === 0)
1060
1063
  return e;
1061
1064
  for (let r = e - 1; r >= 0; r--) {
1062
1065
  const a = i.getValue(r, t);
1063
- if (Je(a) && !n) {
1066
+ if (Ze(a) && !n) {
1064
1067
  if (r === 0)
1065
1068
  return 0;
1066
1069
  n = !0;
1067
1070
  } else {
1068
- if (n && !Je(a))
1071
+ if (n && !Ze(a))
1069
1072
  return r + 1;
1070
1073
  if (n && r === 0)
1071
1074
  return 0;
@@ -1073,18 +1076,18 @@ function hi(i, e, t) {
1073
1076
  }
1074
1077
  return e;
1075
1078
  }
1076
- function Ei(i, e, t) {
1079
+ function Pi(i, e, t) {
1077
1080
  let n = !1;
1078
1081
  if (t === 0)
1079
1082
  return t;
1080
1083
  for (let r = t - 1; r >= 0; r--) {
1081
1084
  const a = i.getValue(e, r);
1082
- if (Je(a) && !n) {
1085
+ if (Ze(a) && !n) {
1083
1086
  if (r === 0)
1084
1087
  return 0;
1085
1088
  n = !0;
1086
1089
  } else {
1087
- if (n && !Je(a))
1090
+ if (n && !Ze(a))
1088
1091
  return r + 1;
1089
1092
  if (n && r === 0)
1090
1093
  return 0;
@@ -1092,22 +1095,22 @@ function Ei(i, e, t) {
1092
1095
  }
1093
1096
  return t;
1094
1097
  }
1095
- function Je(i) {
1096
- return i && (G.isStringNumber(i.v) || Kn(i) === Yn.NUMBER);
1098
+ function Ze(i) {
1099
+ return i && (K.isStringNumber(i.v) || Xn(i) === Qn.NUMBER);
1097
1100
  }
1098
- const On = `${Tn}_MORE_FUNCTIONS_COMPONENT`, xn = {
1101
+ const xn = `${An}_MORE_FUNCTIONS_COMPONENT`, wn = {
1099
1102
  id: "formula-ui.operation.more-functions",
1100
1103
  type: oe.OPERATION,
1101
- handler: async (i) => (i.get(Dn).open({
1104
+ handler: async (i) => (i.get(yn).open({
1102
1105
  header: { title: "formula.insert.tooltip" },
1103
- children: { label: On }
1106
+ children: { label: xn }
1104
1107
  }), !0)
1105
- }, vt = {
1108
+ }, Ct = {
1106
1109
  id: "formula-ui.operation.search-function",
1107
1110
  type: oe.OPERATION,
1108
1111
  handler: async (i, e) => (i.get(de).search(e), !0)
1109
1112
  };
1110
- var wn = { exports: {} }, it = {};
1113
+ var Ln = { exports: {} }, at = {};
1111
1114
  /**
1112
1115
  * @license React
1113
1116
  * react-jsx-runtime.production.min.js
@@ -1117,28 +1120,28 @@ var wn = { exports: {} }, it = {};
1117
1120
  * This source code is licensed under the MIT license found in the
1118
1121
  * LICENSE file in the root directory of this source tree.
1119
1122
  */
1120
- var Ri = Vr, gi = Symbol.for("react.element"), Ii = Symbol.for("react.fragment"), vi = Object.prototype.hasOwnProperty, Pi = Ri.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Si = { key: !0, ref: !0, __self: !0, __source: !0 };
1123
+ var Si = Wr, Bi = Symbol.for("react.element"), Ci = Symbol.for("react.fragment"), ki = Object.prototype.hasOwnProperty, _i = Si.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Di = { key: !0, ref: !0, __self: !0, __source: !0 };
1121
1124
  function Fn(i, e, t) {
1122
1125
  var n, r = {}, a = null, s = null;
1123
1126
  t !== void 0 && (a = "" + t), e.key !== void 0 && (a = "" + e.key), e.ref !== void 0 && (s = e.ref);
1124
1127
  for (n in e)
1125
- vi.call(e, n) && !Si.hasOwnProperty(n) && (r[n] = e[n]);
1128
+ ki.call(e, n) && !Di.hasOwnProperty(n) && (r[n] = e[n]);
1126
1129
  if (i && i.defaultProps)
1127
1130
  for (n in e = i.defaultProps, e)
1128
1131
  r[n] === void 0 && (r[n] = e[n]);
1129
- return { $$typeof: gi, type: i, key: a, ref: s, props: r, _owner: Pi.current };
1132
+ return { $$typeof: Bi, type: i, key: a, ref: s, props: r, _owner: _i.current };
1130
1133
  }
1131
- it.Fragment = Ii;
1132
- it.jsx = Fn;
1133
- it.jsxs = Fn;
1134
- wn.exports = it;
1135
- var E = wn.exports;
1136
- const Bi = "univer-formula-error-function", ki = {
1137
- formulaErrorFunction: Bi
1134
+ at.Fragment = Ci;
1135
+ at.jsx = Fn;
1136
+ at.jsxs = Fn;
1137
+ Ln.exports = at;
1138
+ var E = Ln.exports;
1139
+ const yi = "univer-formula-error-function", Ti = {
1140
+ formulaErrorFunction: yi
1138
1141
  };
1139
- function Ci() {
1140
- const [i, e] = A(!1), [t, n] = A({ left: 0, top: 0 }), r = z(de), a = z(Dt);
1141
- return Ce(() => {
1142
+ function Ai() {
1143
+ const [i, e] = N(!1), [t, n] = N({ left: 0, top: 0 }), r = z(de), a = z(Nt);
1144
+ return _e(() => {
1142
1145
  const s = r.help$.subscribe((o) => {
1143
1146
  const c = a.getState();
1144
1147
  if (!c)
@@ -1154,18 +1157,18 @@ function Ci() {
1154
1157
  return () => {
1155
1158
  s == null || s.unsubscribe();
1156
1159
  };
1157
- }, []), i ? /* @__PURE__ */ E.jsx("div", { className: ki.formulaErrorFunction, style: { left: t.left, top: t.top } }) : null;
1160
+ }, []), i ? /* @__PURE__ */ E.jsx("div", { className: Ti.formulaErrorFunction, style: { left: t.left, top: t.top } }) : null;
1158
1161
  }
1159
- var q = function() {
1160
- return q = Object.assign || function(i) {
1162
+ var H = function() {
1163
+ return H = Object.assign || function(i) {
1161
1164
  for (var e, t = 1, n = arguments.length; t < n; t++) {
1162
1165
  e = arguments[t];
1163
1166
  for (var r in e)
1164
1167
  Object.prototype.hasOwnProperty.call(e, r) && (i[r] = e[r]);
1165
1168
  }
1166
1169
  return i;
1167
- }, q.apply(this, arguments);
1168
- }, _i = function(i, e) {
1170
+ }, H.apply(this, arguments);
1171
+ }, Ni = function(i, e) {
1169
1172
  var t = {};
1170
1173
  for (var n in i)
1171
1174
  Object.prototype.hasOwnProperty.call(i, n) && e.indexOf(n) < 0 && (t[n] = i[n]);
@@ -1173,17 +1176,17 @@ var q = function() {
1173
1176
  for (var r = 0, n = Object.getOwnPropertySymbols(i); r < n.length; r++)
1174
1177
  e.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, n[r]) && (t[n[r]] = i[n[r]]);
1175
1178
  return t;
1176
- }, Ne = ye(function(i, e) {
1177
- var t = i.icon, n = i.id, r = i.className, a = i.extend, s = _i(i, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), c = qr("_".concat(Ti()));
1178
- return Ln(t, "".concat(n), { defIds: t.defIds, idSuffix: c.current }, q({ ref: e, className: o }, s), a);
1179
+ }, Me = Te(function(i, e) {
1180
+ var t = i.icon, n = i.id, r = i.className, a = i.extend, s = Ni(i, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), c = Gr("_".concat(xi()));
1181
+ return zn(t, "".concat(n), { defIds: t.defIds, idSuffix: c.current }, H({ ref: e, className: o }, s), a);
1179
1182
  });
1180
- function Ln(i, e, t, n, r) {
1181
- return Te(i.tag, q(q({ key: e }, Di(i, t, r)), n), (yi(i, t).children || []).map(function(a, s) {
1182
- return Ln(a, "".concat(e, "-").concat(i.tag, "-").concat(s), t, void 0, r);
1183
+ function zn(i, e, t, n, r) {
1184
+ return Ae(i.tag, H(H({ key: e }, Mi(i, t, r)), n), (Oi(i, t).children || []).map(function(a, s) {
1185
+ return zn(a, "".concat(e, "-").concat(i.tag, "-").concat(s), t, void 0, r);
1183
1186
  }));
1184
1187
  }
1185
- function Di(i, e, t) {
1186
- var n = q({}, i.attrs);
1188
+ function Mi(i, e, t) {
1189
+ var n = H({}, i.attrs);
1187
1190
  t != null && t.colorChannel1 && n.fill === "colorChannel1" && (n.fill = t.colorChannel1);
1188
1191
  var r = e.defIds;
1189
1192
  return !r || r.length === 0 || (i.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + e.idSuffix), Object.entries(n).forEach(function(a) {
@@ -1191,17 +1194,17 @@ function Di(i, e, t) {
1191
1194
  typeof o == "string" && (n[s] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
1192
1195
  })), n;
1193
1196
  }
1194
- function yi(i, e) {
1197
+ function Oi(i, e) {
1195
1198
  var t, n = e.defIds;
1196
- return !n || n.length === 0 ? i : i.tag === "defs" && (!((t = i.children) === null || t === void 0) && t.length) ? q(q({}, i), { children: i.children.map(function(r) {
1197
- return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ? q(q({}, r), { attrs: q(q({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
1199
+ return !n || n.length === 0 ? i : i.tag === "defs" && (!((t = i.children) === null || t === void 0) && t.length) ? H(H({}, i), { children: i.children.map(function(r) {
1200
+ return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ? H(H({}, r), { attrs: H(H({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
1198
1201
  }) }) : i;
1199
1202
  }
1200
- function Ti() {
1203
+ function xi() {
1201
1204
  return Math.random().toString(36).substring(2, 8);
1202
1205
  }
1203
- Ne.displayName = "UniverIcon";
1204
- var Ai = {
1206
+ Me.displayName = "UniverIcon";
1207
+ var wi = {
1205
1208
  tag: "svg",
1206
1209
  attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" },
1207
1210
  children: [
@@ -1215,16 +1218,16 @@ var Ai = {
1215
1218
  }
1216
1219
  }
1217
1220
  ]
1218
- }, zn = ye(function(i, e) {
1219
- return Te(Ne, Object.assign({}, i, {
1221
+ }, Un = Te(function(i, e) {
1222
+ return Ae(Me, Object.assign({}, i, {
1220
1223
  id: "check-mark-single",
1221
1224
  ref: e,
1222
- icon: Ai
1225
+ icon: wi
1223
1226
  }));
1224
1227
  });
1225
- zn.displayName = "CheckMarkSingle";
1226
- const Ni = zn;
1227
- var Mi = {
1228
+ Un.displayName = "CheckMarkSingle";
1229
+ const Li = Un;
1230
+ var Fi = {
1228
1231
  tag: "svg",
1229
1232
  attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" },
1230
1233
  children: [
@@ -1236,16 +1239,16 @@ var Mi = {
1236
1239
  }
1237
1240
  }
1238
1241
  ]
1239
- }, Un = ye(function(i, e) {
1240
- return Te(Ne, Object.assign({}, i, {
1242
+ }, Vn = Te(function(i, e) {
1243
+ return Ae(Me, Object.assign({}, i, {
1241
1244
  id: "close-single",
1242
1245
  ref: e,
1243
- icon: Mi
1246
+ icon: Fi
1244
1247
  }));
1245
1248
  });
1246
- Un.displayName = "CloseSingle";
1247
- const Oi = Un;
1248
- var xi = {
1249
+ Vn.displayName = "CloseSingle";
1250
+ const zi = Vn;
1251
+ var Ui = {
1249
1252
  tag: "svg",
1250
1253
  attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" },
1251
1254
  children: [
@@ -1288,16 +1291,16 @@ var xi = {
1288
1291
  ]
1289
1292
  }
1290
1293
  ]
1291
- }, Vn = ye(function(i, e) {
1292
- return Te(Ne, Object.assign({}, i, {
1294
+ }, qn = Te(function(i, e) {
1295
+ return Ae(Me, Object.assign({}, i, {
1293
1296
  id: "details-single",
1294
1297
  ref: e,
1295
- icon: xi
1298
+ icon: Ui
1296
1299
  }));
1297
1300
  });
1298
- Vn.displayName = "DetailsSingle";
1299
- const wi = Vn;
1300
- var Fi = {
1301
+ qn.displayName = "DetailsSingle";
1302
+ const Vi = qn;
1303
+ var qi = {
1301
1304
  tag: "svg",
1302
1305
  attrs: { fill: "none", viewBox: "0 0 17 17", width: "1em", height: "1em" },
1303
1306
  children: [
@@ -1311,45 +1314,45 @@ var Fi = {
1311
1314
  }
1312
1315
  }
1313
1316
  ]
1314
- }, qn = ye(function(i, e) {
1315
- return Te(Ne, Object.assign({}, i, {
1317
+ }, Hn = Te(function(i, e) {
1318
+ return Ae(Me, Object.assign({}, i, {
1316
1319
  id: "more-single",
1317
1320
  ref: e,
1318
- icon: Fi
1321
+ icon: qi
1319
1322
  }));
1320
1323
  });
1321
- qn.displayName = "MoreSingle";
1322
- const Li = qn, zi = "univer-formula-help-function", Ui = "univer-formula-help-function-title", Vi = "univer-formula-help-function-title-icons", qi = "univer-formula-help-function-title-icon", Hi = "univer-formula-help-function-content", $i = "univer-formula-help-function-content-inner", ji = "univer-formula-help-function-content-params", Wi = "univer-formula-help-function-content-params-title", Gi = "univer-formula-help-function-content-params-detail", Xi = "univer-formula-help-function-active", Ki = "univer-formula-help-decorator", V = {
1323
- formulaHelpFunction: zi,
1324
- formulaHelpFunctionTitle: Ui,
1325
- formulaHelpFunctionTitleIcons: Vi,
1326
- formulaHelpFunctionTitleIcon: qi,
1327
- formulaHelpFunctionContent: Hi,
1328
- formulaHelpFunctionContentInner: $i,
1329
- formulaHelpFunctionContentParams: ji,
1330
- formulaHelpFunctionContentParamsTitle: Wi,
1331
- formulaHelpFunctionContentParamsDetail: Gi,
1332
- formulaHelpFunctionActive: Xi,
1333
- formulaHelpDecorator: Ki
1324
+ Hn.displayName = "MoreSingle";
1325
+ const Hi = Hn, $i = "univer-formula-help-function", ji = "univer-formula-help-function-title", Wi = "univer-formula-help-function-title-icons", Gi = "univer-formula-help-function-title-icon", Ki = "univer-formula-help-function-content", Yi = "univer-formula-help-function-content-inner", Xi = "univer-formula-help-function-content-params", Qi = "univer-formula-help-function-content-params-title", Ji = "univer-formula-help-function-content-params-detail", Zi = "univer-formula-help-function-active", ea = "univer-formula-help-decorator", V = {
1326
+ formulaHelpFunction: $i,
1327
+ formulaHelpFunctionTitle: ji,
1328
+ formulaHelpFunctionTitleIcons: Wi,
1329
+ formulaHelpFunctionTitleIcon: Gi,
1330
+ formulaHelpFunctionContent: Ki,
1331
+ formulaHelpFunctionContentInner: Yi,
1332
+ formulaHelpFunctionContentParams: Xi,
1333
+ formulaHelpFunctionContentParamsTitle: Qi,
1334
+ formulaHelpFunctionContentParamsDetail: Ji,
1335
+ formulaHelpFunctionActive: Zi,
1336
+ formulaHelpDecorator: ea
1334
1337
  };
1335
- function Yi() {
1336
- const [i, e] = A(!1), [t, n] = A(!0), [r, a] = A(!0), [s, o] = A(0), [c, u] = A([0, 0]), [l, d] = A({ left: 0, top: 0 }), [m, b] = A(null), h = z(de), I = z(Dt), f = z(_e), R = z(kn), p = z(St), g = f.t("formula.prompt.required"), C = f.t("formula.prompt.optional");
1337
- Ce(() => {
1338
- const v = h.help$.subscribe((P) => {
1339
- const { visible: _, paramIndex: N, functionInfo: B } = P;
1338
+ function ta() {
1339
+ const [i, e] = N(!1), [t, n] = N(!0), [r, a] = N(!0), [s, o] = N(0), [c, u] = N([0, 0]), [l, d] = N({ left: 0, top: 0 }), [m, b] = N(null), h = z(de), g = z(Nt), f = z(De), R = z(kn), p = z(_t), I = f.t("formula.prompt.required"), C = f.t("formula.prompt.optional");
1340
+ _e(() => {
1341
+ const v = h.help$.subscribe((B) => {
1342
+ const { visible: _, paramIndex: A, functionInfo: P } = B;
1340
1343
  if (!_) {
1341
1344
  e(_);
1342
1345
  return;
1343
1346
  }
1344
- const D = p.getContextValue(on) ? R.getPosition() : I.getRect();
1347
+ const D = p.getContextValue(cn) ? R.getPosition() : g.getRect();
1345
1348
  if (D == null)
1346
1349
  return;
1347
- const { left: $, top: U, height: ce } = D, be = {
1348
- functionName: B.functionName,
1349
- functionType: B.functionType,
1350
- description: f.t(B.description),
1351
- abstract: f.t(B.abstract),
1352
- functionParameter: B.functionParameter.map((ue) => ({
1350
+ const { left: j, top: U, height: ce } = D, be = {
1351
+ functionName: P.functionName,
1352
+ functionType: P.functionType,
1353
+ description: f.t(P.description),
1354
+ abstract: f.t(P.abstract),
1355
+ functionParameter: P.functionParameter.map((ue) => ({
1353
1356
  name: f.t(ue.name),
1354
1357
  detail: f.t(ue.detail),
1355
1358
  example: ue.example,
@@ -1357,7 +1360,7 @@ function Yi() {
1357
1360
  repeat: ue.repeat
1358
1361
  }))
1359
1362
  };
1360
- u([$, U + ce]), o(N), b(be), d({ left: $, top: U }), e(_);
1363
+ u([j, U + ce]), o(A), b(be), d({ left: j, top: U }), e(_);
1361
1364
  });
1362
1365
  return () => {
1363
1366
  v == null || v.unsubscribe();
@@ -1366,10 +1369,10 @@ function Yi() {
1366
1369
  function S(v) {
1367
1370
  o(v);
1368
1371
  }
1369
- return /* @__PURE__ */ E.jsx(E.Fragment, { children: r ? /* @__PURE__ */ E.jsx(yn, { visible: i, offset: c, children: m ? /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunction, children: [
1372
+ return /* @__PURE__ */ E.jsx(E.Fragment, { children: r ? /* @__PURE__ */ E.jsx(Tn, { visible: i, offset: c, children: m ? /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunction, children: [
1370
1373
  /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunctionTitle, children: [
1371
1374
  /* @__PURE__ */ E.jsx(
1372
- Qi,
1375
+ na,
1373
1376
  {
1374
1377
  prefix: m.functionName,
1375
1378
  value: m.functionParameter,
@@ -1384,7 +1387,7 @@ function Yi() {
1384
1387
  className: V.formulaHelpFunctionTitleIcon,
1385
1388
  style: { transform: t ? "rotateZ(-90deg)" : "rotateZ(90deg)" },
1386
1389
  onClick: () => n(!t),
1387
- children: /* @__PURE__ */ E.jsx(Li, {})
1390
+ children: /* @__PURE__ */ E.jsx(Hi, {})
1388
1391
  }
1389
1392
  ),
1390
1393
  /* @__PURE__ */ E.jsx(
@@ -1392,7 +1395,7 @@ function Yi() {
1392
1395
  {
1393
1396
  className: V.formulaHelpFunctionTitleIcon,
1394
1397
  onClick: () => a(!r),
1395
- children: /* @__PURE__ */ E.jsx(Oi, {})
1398
+ children: /* @__PURE__ */ E.jsx(zi, {})
1396
1399
  }
1397
1400
  )
1398
1401
  ] })
@@ -1407,27 +1410,27 @@ function Yi() {
1407
1410
  },
1408
1411
  children: /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunctionContentInner, children: [
1409
1412
  /* @__PURE__ */ E.jsx(
1410
- mt,
1413
+ dt,
1411
1414
  {
1412
1415
  title: f.t("formula.prompt.helpExample"),
1413
1416
  value: `${m.functionName}(${m.functionParameter.map((v) => v.example).join(",")})`
1414
1417
  }
1415
1418
  ),
1416
1419
  /* @__PURE__ */ E.jsx(
1417
- mt,
1420
+ dt,
1418
1421
  {
1419
1422
  title: f.t("formula.prompt.helpAbstract"),
1420
1423
  value: m.description
1421
1424
  }
1422
1425
  ),
1423
- m && m.functionParameter && m.functionParameter.map((v, P) => /* @__PURE__ */ E.jsx(
1424
- mt,
1426
+ m && m.functionParameter && m.functionParameter.map((v, B) => /* @__PURE__ */ E.jsx(
1427
+ dt,
1425
1428
  {
1426
- className: s === P ? V.formulaHelpFunctionActive : "",
1429
+ className: s === B ? V.formulaHelpFunctionActive : "",
1427
1430
  title: v.name,
1428
- value: `${v.require ? g : C} ${v.detail}`
1431
+ value: `${v.require ? I : C} ${v.detail}`
1429
1432
  },
1430
- P
1433
+ B
1431
1434
  ))
1432
1435
  ] })
1433
1436
  }
@@ -1438,14 +1441,14 @@ function Yi() {
1438
1441
  className: V.formulaHelpDecorator,
1439
1442
  onClick: () => a(!r),
1440
1443
  style: { left: l.left - 24, top: l.top },
1441
- children: /* @__PURE__ */ E.jsx(wi, {})
1444
+ children: /* @__PURE__ */ E.jsx(Vi, {})
1442
1445
  }
1443
1446
  ) : /* @__PURE__ */ E.jsx(E.Fragment, {}) });
1444
1447
  }
1445
- const mt = (i) => /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunctionContentParams, children: [
1448
+ const dt = (i) => /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFunctionContentParams, children: [
1446
1449
  /* @__PURE__ */ E.jsx("div", { className: `${V.formulaHelpFunctionContentParamsTitle} ${i.className}`, children: i.title }),
1447
1450
  /* @__PURE__ */ E.jsx("div", { className: V.formulaHelpFunctionContentParamsDetail, children: i.value })
1448
- ] }), Qi = (i) => {
1451
+ ] }), na = (i) => {
1449
1452
  const { prefix: e, value: t, active: n, onClick: r } = i;
1450
1453
  return /* @__PURE__ */ E.jsxs("div", { children: [
1451
1454
  /* @__PURE__ */ E.jsxs("span", { children: [
@@ -1468,58 +1471,58 @@ const mt = (i) => /* @__PURE__ */ E.jsxs("div", { className: V.formulaHelpFuncti
1468
1471
  )),
1469
1472
  ")"
1470
1473
  ] });
1471
- }, Ji = "univer-formula-search-function", Zi = "univer-formula-search-function-item", ea = "univer-formula-search-function-item-name", ta = "univer-formula-search-function-item-name-light", na = "univer-formula-search-function-item-desc", ra = "univer-formula-search-function-item-active", fe = {
1472
- formulaSearchFunction: Ji,
1473
- formulaSearchFunctionItem: Zi,
1474
- formulaSearchFunctionItemName: ea,
1475
- formulaSearchFunctionItemNameLight: ta,
1476
- formulaSearchFunctionItemDesc: na,
1477
- formulaSearchFunctionItemActive: ra
1474
+ }, ra = "univer-formula-search-function", ia = "univer-formula-search-function-item", aa = "univer-formula-search-function-item-name", sa = "univer-formula-search-function-item-name-light", oa = "univer-formula-search-function-item-desc", ca = "univer-formula-search-function-item-active", fe = {
1475
+ formulaSearchFunction: ra,
1476
+ formulaSearchFunctionItem: ia,
1477
+ formulaSearchFunctionItemName: aa,
1478
+ formulaSearchFunctionItemNameLight: sa,
1479
+ formulaSearchFunctionItemDesc: oa,
1480
+ formulaSearchFunctionItemActive: ca
1478
1481
  };
1479
- function ia() {
1480
- const [i, e] = A(!1), [t, n] = A(0), [r, a] = A([0, 0]), [s, o] = A([]), [c, u] = A(""), l = z(de), d = z(Dt), m = z(kn), b = z(St);
1481
- Ce(() => {
1482
+ function ua() {
1483
+ const [i, e] = N(!1), [t, n] = N(0), [r, a] = N([0, 0]), [s, o] = N([]), [c, u] = N(""), l = z(de), d = z(Nt), m = z(kn), b = z(_t);
1484
+ _e(() => {
1482
1485
  let f = [], R = 0;
1483
1486
  const p = l.search$.subscribe((S) => {
1484
- const { visible: v, searchText: P, searchList: _ } = S;
1487
+ const { visible: v, searchText: B, searchList: _ } = S;
1485
1488
  if (!v) {
1486
1489
  e(v);
1487
1490
  return;
1488
1491
  }
1489
- const B = b.getContextValue(on) ? m.getPosition() : d.getRect();
1490
- if (B == null)
1492
+ const P = b.getContextValue(cn) ? m.getPosition() : d.getRect();
1493
+ if (P == null)
1491
1494
  return;
1492
- const { left: T, top: D, height: $ } = B;
1493
- u(P), o(_), f = _, a([T, D + $]), e(v), n(0), R = 0;
1494
- }), g = l.navigate$.subscribe((S) => {
1495
+ const { left: T, top: D, height: j } = P;
1496
+ u(B), o(_), f = _, a([T, D + j]), e(v), n(0), R = 0;
1497
+ }), I = l.navigate$.subscribe((S) => {
1495
1498
  const { direction: v } = S;
1496
1499
  if (v === M.UP) {
1497
- let P = R - 1;
1498
- P = P < 0 ? f.length - 1 : P, n(P), R = P;
1500
+ let B = R - 1;
1501
+ B = B < 0 ? f.length - 1 : B, n(B), R = B;
1499
1502
  } else if (v === M.DOWN) {
1500
- let P = R + 1;
1501
- P = P >= f.length ? 0 : P, n(P), R = P;
1503
+ let B = R + 1;
1504
+ B = B >= f.length ? 0 : B, n(B), R = B;
1502
1505
  }
1503
1506
  }), C = l.accept$.subscribe((S) => {
1504
1507
  const v = f[R].name;
1505
1508
  l.acceptFormulaName(v);
1506
1509
  });
1507
1510
  return () => {
1508
- p == null || p.unsubscribe(), g == null || g.unsubscribe(), C == null || C.unsubscribe();
1511
+ p == null || p.unsubscribe(), I == null || I.unsubscribe(), C == null || C.unsubscribe();
1509
1512
  };
1510
1513
  }, []);
1511
1514
  function h(f) {
1512
1515
  n(f);
1513
1516
  }
1514
- function I() {
1517
+ function g() {
1515
1518
  n(-1);
1516
1519
  }
1517
- return /* @__PURE__ */ E.jsx(yn, { visible: i, offset: r, children: /* @__PURE__ */ E.jsx("ul", { className: fe.formulaSearchFunction, children: s.map((f, R) => /* @__PURE__ */ E.jsxs(
1520
+ return /* @__PURE__ */ E.jsx(Tn, { visible: i, offset: r, children: /* @__PURE__ */ E.jsx("ul", { className: fe.formulaSearchFunction, children: s.map((f, R) => /* @__PURE__ */ E.jsxs(
1518
1521
  "li",
1519
1522
  {
1520
1523
  className: t === R ? `${fe.formulaSearchFunctionItem} ${fe.formulaSearchFunctionItemActive}` : fe.formulaSearchFunctionItem,
1521
1524
  onMouseEnter: () => h(R),
1522
- onMouseLeave: I,
1525
+ onMouseLeave: g,
1523
1526
  onClick: () => l.acceptFormulaName(f.name),
1524
1527
  children: [
1525
1528
  /* @__PURE__ */ E.jsxs("span", { className: fe.formulaSearchFunctionItemName, children: [
@@ -1532,18 +1535,18 @@ function ia() {
1532
1535
  R
1533
1536
  )) }) });
1534
1537
  }
1535
- function aa() {
1538
+ function ma() {
1536
1539
  return /* @__PURE__ */ E.jsxs(E.Fragment, { children: [
1537
- /* @__PURE__ */ E.jsx(ia, {}),
1538
- /* @__PURE__ */ E.jsx(Yi, {}),
1539
- /* @__PURE__ */ E.jsx(Ci, {})
1540
+ /* @__PURE__ */ E.jsx(ua, {}),
1541
+ /* @__PURE__ */ E.jsx(ta, {}),
1542
+ /* @__PURE__ */ E.jsx(Ai, {})
1540
1543
  ] });
1541
1544
  }
1542
- const sa = "univer-formula-more-functions", oa = "univer-formula-more-functions-operation", Zt = {
1543
- formulaMoreFunctions: sa,
1544
- formulaMoreFunctionsOperation: oa
1545
+ const fa = "univer-formula-more-functions", la = "univer-formula-more-functions-operation", en = {
1546
+ formulaMoreFunctions: fa,
1547
+ formulaMoreFunctionsOperation: la
1545
1548
  };
1546
- function Hn(i) {
1549
+ function $n(i) {
1547
1550
  const { prefix: e, value: t } = i;
1548
1551
  return /* @__PURE__ */ E.jsxs("div", { children: [
1549
1552
  /* @__PURE__ */ E.jsxs("span", { children: [
@@ -1557,28 +1560,28 @@ function Hn(i) {
1557
1560
  ")"
1558
1561
  ] });
1559
1562
  }
1560
- const ca = "univer-formula-function-params", ua = "univer-formula-function-params-title", ma = "univer-formula-function-params-detail", ft = {
1561
- formulaFunctionParams: ca,
1562
- formulaFunctionParamsTitle: ua,
1563
- formulaFunctionParamsDetail: ma
1563
+ const da = "univer-formula-function-params", ba = "univer-formula-function-params-title", pa = "univer-formula-function-params-detail", bt = {
1564
+ formulaFunctionParams: da,
1565
+ formulaFunctionParamsTitle: ba,
1566
+ formulaFunctionParamsDetail: pa
1564
1567
  };
1565
1568
  function ke(i) {
1566
1569
  const { className: e, value: t, title: n } = i;
1567
- return /* @__PURE__ */ E.jsxs("div", { className: ft.formulaFunctionParams, children: [
1568
- /* @__PURE__ */ E.jsx("div", { className: `${ft.formulaFunctionParamsTitle} ${e}`, children: n }),
1569
- /* @__PURE__ */ E.jsx("div", { className: ft.formulaFunctionParamsDetail, children: t })
1570
+ return /* @__PURE__ */ E.jsxs("div", { className: bt.formulaFunctionParams, children: [
1571
+ /* @__PURE__ */ E.jsx("div", { className: `${bt.formulaFunctionParamsTitle} ${e}`, children: n }),
1572
+ /* @__PURE__ */ E.jsx("div", { className: bt.formulaFunctionParamsDetail, children: t })
1570
1573
  ] });
1571
1574
  }
1572
- const fa = "univer-formula-input-params-list", la = "univer-formula-input-params-list-item-name", da = "univer-formula-input-params-list-item-selector", Se = {
1573
- formulaInputParamsList: fa,
1574
- formulaInputParamsListItemName: la,
1575
- formulaInputParamsListItemSelector: da
1575
+ const ha = "univer-formula-input-params-list", Ea = "univer-formula-input-params-list-item-name", Ra = "univer-formula-input-params-list-item-selector", Be = {
1576
+ formulaInputParamsList: ha,
1577
+ formulaInputParamsListItemName: Ea,
1578
+ formulaInputParamsListItemSelector: Ra
1576
1579
  };
1577
- function ba(i) {
1580
+ function ga(i) {
1578
1581
  const { functionInfo: e, onChange: t } = i;
1579
1582
  if (!e)
1580
1583
  return null;
1581
- const [n, r] = A([]), [a, s] = A(e.functionParameter), [o, c] = A(-1);
1584
+ const [n, r] = N([]), [a, s] = N(e.functionParameter), [o, c] = N(-1);
1582
1585
  function u(d, m) {
1583
1586
  const b = [...n];
1584
1587
  b[m] = d, r(b), t(b);
@@ -1590,31 +1593,122 @@ function ba(i) {
1590
1593
  }
1591
1594
  c(d);
1592
1595
  }
1593
- return /* @__PURE__ */ E.jsxs("div", { className: Se.formulaInputParams, children: [
1594
- /* @__PURE__ */ E.jsx("div", { className: Se.formulaInputParamsList, children: a.map((d, m) => /* @__PURE__ */ E.jsxs("div", { children: [
1595
- /* @__PURE__ */ E.jsx("div", { className: Se.formulaInputParamsListItemName, children: d.name }),
1596
- /* @__PURE__ */ E.jsx("div", { className: Se.formulaInputParamsListItemSelector, children: /* @__PURE__ */ E.jsx(
1597
- _r,
1596
+ return /* @__PURE__ */ E.jsxs("div", { className: Be.formulaInputParams, children: [
1597
+ /* @__PURE__ */ E.jsx("div", { className: Be.formulaInputParamsList, children: a.map((d, m) => /* @__PURE__ */ E.jsxs("div", { children: [
1598
+ /* @__PURE__ */ E.jsx("div", { className: Be.formulaInputParamsListItemName, children: d.name }),
1599
+ /* @__PURE__ */ E.jsx("div", { className: Be.formulaInputParamsListItemSelector, children: /* @__PURE__ */ E.jsx(
1600
+ Ar,
1598
1601
  {
1599
1602
  onChange: (b) => u(b, m),
1600
1603
  onActive: () => l(m)
1601
1604
  }
1602
1605
  ) })
1603
1606
  ] }, m)) }),
1604
- /* @__PURE__ */ E.jsx("div", { className: Se.formulaInputParamsInfo, children: /* @__PURE__ */ E.jsx(
1607
+ /* @__PURE__ */ E.jsx("div", { className: Be.formulaInputParamsInfo, children: /* @__PURE__ */ E.jsx(
1605
1608
  ke,
1606
1609
  {
1607
- title: o === -1 ? /* @__PURE__ */ E.jsx(Hn, { prefix: e.functionName, value: a }) : a[o].name,
1610
+ title: o === -1 ? /* @__PURE__ */ E.jsx($n, { prefix: e.functionName, value: a }) : a[o].name,
1608
1611
  value: o === -1 ? e.description : a[o].detail
1609
1612
  }
1610
1613
  ) })
1611
1614
  ] });
1612
1615
  }
1613
- const pa = [], ha = [], Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa = [], Ba = [], ka = [
1616
+ const Ia = [
1617
+ {
1618
+ functionName: ir.MAKEARRAY,
1619
+ aliasFunctionName: "formula.functionList.MAKEARRAY.aliasFunctionName",
1620
+ functionType: q.Array,
1621
+ description: "formula.functionList.MAKEARRAY.description",
1622
+ abstract: "formula.functionList.MAKEARRAY.abstract",
1623
+ functionParameter: [
1624
+ {
1625
+ name: "formula.functionList.MAKEARRAY.functionParameter.number1.name",
1626
+ detail: "formula.functionList.MAKEARRAY.functionParameter.number1.detail",
1627
+ example: "8",
1628
+ require: 1,
1629
+ repeat: 0
1630
+ },
1631
+ {
1632
+ name: "formula.functionList.MAKEARRAY.functionParameter.number2.name",
1633
+ detail: "formula.functionList.MAKEARRAY.functionParameter.number2.detail",
1634
+ example: "7",
1635
+ require: 1,
1636
+ repeat: 0
1637
+ },
1638
+ {
1639
+ name: "formula.functionList.MAKEARRAY.functionParameter.value3.name",
1640
+ detail: "formula.functionList.MAKEARRAY.functionParameter.value3.detail",
1641
+ example: "LAMBDA(r,c, r*c)",
1642
+ require: 1,
1643
+ repeat: 0
1644
+ }
1645
+ ]
1646
+ }
1647
+ ], va = [], Pa = [], Sa = [], Ba = [], Ca = [], ka = [], _a = [], Da = [], ya = [], Ta = [
1614
1648
  {
1615
- functionName: zt.SUM,
1649
+ functionName: pe.ABS,
1650
+ functionType: q.Math,
1651
+ description: "formula.functionList.ABS.description",
1652
+ abstract: "formula.functionList.ABS.abstract",
1653
+ functionParameter: [
1654
+ {
1655
+ name: "formula.functionList.ABS.functionParameter.number.name",
1656
+ detail: "formula.functionList.ABS.functionParameter.number.detail",
1657
+ example: "A1:A20",
1658
+ require: 1,
1659
+ repeat: 0
1660
+ }
1661
+ ]
1662
+ },
1663
+ {
1664
+ functionName: pe.ACOS,
1665
+ functionType: q.Math,
1666
+ description: "formula.functionList.ACOS.description",
1667
+ abstract: "formula.functionList.ACOS.abstract",
1668
+ functionParameter: [
1669
+ {
1670
+ name: "formula.functionList.ACOS.functionParameter.number.name",
1671
+ detail: "formula.functionList.ACOS.functionParameter.number.detail",
1672
+ example: "A1:A20",
1673
+ require: 1,
1674
+ repeat: 0
1675
+ }
1676
+ ]
1677
+ },
1678
+ {
1679
+ functionName: pe.ACOSH,
1680
+ functionType: q.Math,
1681
+ description: "formula.functionList.ACOSH.description",
1682
+ abstract: "formula.functionList.ACOSH.abstract",
1683
+ functionParameter: [
1684
+ {
1685
+ name: "formula.functionList.ACOSH.functionParameter.number.name",
1686
+ detail: "formula.functionList.ACOSH.functionParameter.number.detail",
1687
+ example: "A1:A20",
1688
+ require: 1,
1689
+ repeat: 0
1690
+ }
1691
+ ]
1692
+ },
1693
+ {
1694
+ functionName: pe.ACOT,
1695
+ functionType: q.Math,
1696
+ description: "formula.functionList.ACOT.description",
1697
+ abstract: "formula.functionList.ACOT.abstract",
1698
+ functionParameter: [
1699
+ {
1700
+ name: "formula.functionList.ACOT.functionParameter.number.name",
1701
+ detail: "formula.functionList.ACOT.functionParameter.number.detail",
1702
+ example: "A1:A20",
1703
+ require: 1,
1704
+ repeat: 0
1705
+ }
1706
+ ]
1707
+ },
1708
+ {
1709
+ functionName: pe.SUM,
1616
1710
  aliasFunctionName: "formula.functionList.SUM.aliasFunctionName",
1617
- functionType: ne.Math,
1711
+ functionType: q.Math,
1618
1712
  description: "formula.functionList.SUM.description",
1619
1713
  abstract: "formula.functionList.SUM.abstract",
1620
1714
  functionParameter: [
@@ -1635,9 +1729,9 @@ const pa = [], ha = [], Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa
1635
1729
  ]
1636
1730
  },
1637
1731
  {
1638
- functionName: zt.SUMIF,
1732
+ functionName: pe.SUMIF,
1639
1733
  aliasFunctionName: "formula.functionList.SUMIF.aliasFunctionName",
1640
- functionType: ne.Math,
1734
+ functionType: q.Math,
1641
1735
  description: "formula.functionList.SUMIF.description",
1642
1736
  abstract: "formula.functionList.SUMIF.abstract",
1643
1737
  functionParameter: [
@@ -1664,11 +1758,11 @@ const pa = [], ha = [], Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa
1664
1758
  }
1665
1759
  ]
1666
1760
  }
1667
- ], Ca = [
1761
+ ], Aa = [
1668
1762
  {
1669
- functionName: Pe.AVERAGE,
1763
+ functionName: Se.AVERAGE,
1670
1764
  aliasFunctionName: "formula.functionList.AVERAGE.aliasFunctionName",
1671
- functionType: ne.Statistical,
1765
+ functionType: q.Statistical,
1672
1766
  description: "formula.functionList.AVERAGE.description",
1673
1767
  abstract: "formula.functionList.AVERAGE.abstract",
1674
1768
  functionParameter: [
@@ -1689,9 +1783,9 @@ const pa = [], ha = [], Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa
1689
1783
  ]
1690
1784
  },
1691
1785
  {
1692
- functionName: Pe.MAX,
1786
+ functionName: Se.MAX,
1693
1787
  aliasFunctionName: "formula.functionList.MAX.aliasFunctionName",
1694
- functionType: ne.Statistical,
1788
+ functionType: q.Statistical,
1695
1789
  description: "formula.functionList.MAX.description",
1696
1790
  abstract: "formula.functionList.MAX.abstract",
1697
1791
  functionParameter: [
@@ -1712,9 +1806,9 @@ const pa = [], ha = [], Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa
1712
1806
  ]
1713
1807
  },
1714
1808
  {
1715
- functionName: Pe.COUNT,
1809
+ functionName: Se.COUNT,
1716
1810
  aliasFunctionName: "formula.functionList.COUNT.aliasFunctionName",
1717
- functionType: ne.Statistical,
1811
+ functionType: q.Statistical,
1718
1812
  description: "formula.functionList.COUNT.description",
1719
1813
  abstract: "formula.functionList.COUNT.abstract",
1720
1814
  functionParameter: [
@@ -1735,9 +1829,9 @@ const pa = [], ha = [], Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa
1735
1829
  ]
1736
1830
  },
1737
1831
  {
1738
- functionName: Pe.MIN,
1832
+ functionName: Se.MIN,
1739
1833
  aliasFunctionName: "formula.functionList.MIN.aliasFunctionName",
1740
- functionType: ne.Statistical,
1834
+ functionType: q.Statistical,
1741
1835
  description: "formula.functionList.MIN.description",
1742
1836
  abstract: "formula.functionList.MIN.abstract",
1743
1837
  functionParameter: [
@@ -1758,9 +1852,9 @@ const pa = [], ha = [], Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa
1758
1852
  ]
1759
1853
  },
1760
1854
  {
1761
- functionName: Pe.COUNTA,
1855
+ functionName: Se.COUNTA,
1762
1856
  aliasFunctionName: "formula.functionList.COUNTA.aliasFunctionName",
1763
- functionType: ne.Statistical,
1857
+ functionType: q.Statistical,
1764
1858
  description: "formula.functionList.COUNT_A.description",
1765
1859
  abstract: "formula.functionList.COUNT_A.abstract",
1766
1860
  functionParameter: [
@@ -1780,40 +1874,40 @@ const pa = [], ha = [], Ea = [], Ra = [], ga = [], Ia = [], va = [], Pa = [], Sa
1780
1874
  }
1781
1875
  ]
1782
1876
  }
1783
- ], _a = [], Da = [], ya = [], Ta = [
1784
- ...va,
1785
- ...ga,
1877
+ ], Na = [], Ma = [], Oa = [], xa = [
1786
1878
  ...ka,
1787
- ...Ca,
1788
1879
  ...Ba,
1789
- ...Ra,
1790
- ..._a,
1880
+ ...Ta,
1881
+ ...Aa,
1882
+ ...ya,
1791
1883
  ...Sa,
1884
+ ...Na,
1885
+ ...Da,
1886
+ ..._a,
1887
+ ...Ca,
1792
1888
  ...Pa,
1889
+ ...va,
1890
+ ...Oa,
1793
1891
  ...Ia,
1794
- ...Ea,
1795
- ...ha,
1796
- ...ya,
1797
- ...pa,
1798
- ...Da
1892
+ ...Ma
1799
1893
  ];
1800
- function Aa(i, e) {
1894
+ function wa(i, e) {
1801
1895
  return Object.keys(i).filter((t) => isNaN(Number(t))).map((t) => ({
1802
1896
  label: e.t(`formula.functionType.${t.toLocaleLowerCase()}`),
1803
1897
  value: `${i[t]}`
1804
1898
  }));
1805
1899
  }
1806
- function Na(i, e) {
1900
+ function La(i, e) {
1807
1901
  let t = "";
1808
1902
  return i.aliasFunctionName ? (t = e.t(i.aliasFunctionName), t === i.aliasFunctionName && (t = i.functionName)) : t = i.functionName, t;
1809
1903
  }
1810
- var Ma = Object.defineProperty, Oa = Object.getOwnPropertyDescriptor, xa = (i, e, t, n) => {
1811
- for (var r = n > 1 ? void 0 : n ? Oa(e, t) : e, a = i.length - 1, s; a >= 0; a--)
1904
+ var Fa = Object.defineProperty, za = Object.getOwnPropertyDescriptor, Ua = (i, e, t, n) => {
1905
+ for (var r = n > 1 ? void 0 : n ? za(e, t) : e, a = i.length - 1, s; a >= 0; a--)
1812
1906
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
1813
- return n && r && Ma(e, t, r), r;
1814
- }, en = (i, e) => (t, n) => e(t, n, i);
1815
- const Ot = Ze("formula-ui.description-service");
1816
- let Pt = class {
1907
+ return n && r && Fa(e, t, r), r;
1908
+ }, tn = (i, e) => (t, n) => e(t, n, i);
1909
+ const Ft = et("formula-ui.description-service");
1910
+ let kt = class {
1817
1911
  constructor(i, e, t) {
1818
1912
  this._description = i, this._functionService = e, this._localeService = t, this._initialize(), this._registerDescription();
1819
1913
  }
@@ -1836,6 +1930,13 @@ let Pt = class {
1836
1930
  r.indexOf(i) > -1 && e.push({ name: r, desc: a });
1837
1931
  }), e;
1838
1932
  }
1933
+ getSearchListByNameFirstLetter(i) {
1934
+ const e = [], t = this._functionService.getDescriptions();
1935
+ return i = i.toLocaleUpperCase(), t.forEach((n) => {
1936
+ const { functionName: r, abstract: a } = n;
1937
+ r.indexOf(i) === 0 && e.push({ name: r, desc: a });
1938
+ }), e;
1939
+ }
1839
1940
  getSearchListByType(i) {
1840
1941
  const e = [];
1841
1942
  return this._functionService.getDescriptions().forEach((n) => {
@@ -1849,8 +1950,8 @@ let Pt = class {
1849
1950
  });
1850
1951
  }
1851
1952
  _registerDescription() {
1852
- const i = this._localeService, t = Ta.concat(this._description || []).map((n) => ({
1853
- functionName: Na(n, i),
1953
+ const i = this._localeService, t = xa.concat(this._description || []).map((n) => ({
1954
+ functionName: La(n, i),
1854
1955
  functionType: n.functionType,
1855
1956
  description: i.t(n.description),
1856
1957
  abstract: i.t(n.abstract),
@@ -1865,43 +1966,43 @@ let Pt = class {
1865
1966
  this._functionService.registerDescriptions(...t);
1866
1967
  }
1867
1968
  };
1868
- Pt = xa([
1869
- en(1, tr),
1870
- en(2, y(_e))
1871
- ], Pt);
1872
- const wa = "univer-formula-select-function-select", Fa = "univer-formula-select-function-result", La = "univer-formula-select-function-result-item", za = "univer-formula-select-function-result-item-name-light", Ua = "univer-formula-select-function-result-item-selected", Va = "univer-formula-select-function-result-item-active", qa = "univer-formula-select-function-content", te = {
1873
- formulaSelectFunctionSelect: wa,
1874
- formulaSelectFunctionResult: Fa,
1875
- formulaSelectFunctionResultItem: La,
1876
- formulaSelectFunctionResultItemNameLight: za,
1877
- formulaSelectFunctionResultItemSelected: Ua,
1878
- formulaSelectFunctionResultItemActive: Va,
1879
- formulaSelectFunctionContent: qa
1969
+ kt = Ua([
1970
+ tn(1, ar),
1971
+ tn(2, y(De))
1972
+ ], kt);
1973
+ const Va = "univer-formula-select-function-select", qa = "univer-formula-select-function-result", Ha = "univer-formula-select-function-result-item", $a = "univer-formula-select-function-result-item-name-light", ja = "univer-formula-select-function-result-item-selected", Wa = "univer-formula-select-function-result-item-active", Ga = "univer-formula-select-function-content", ne = {
1974
+ formulaSelectFunctionSelect: Va,
1975
+ formulaSelectFunctionResult: qa,
1976
+ formulaSelectFunctionResultItem: Ha,
1977
+ formulaSelectFunctionResultItemNameLight: $a,
1978
+ formulaSelectFunctionResultItemSelected: ja,
1979
+ formulaSelectFunctionResultItemActive: Wa,
1980
+ formulaSelectFunctionContent: Ga
1880
1981
  };
1881
- function Ha(i) {
1882
- const { onChange: e } = i, t = "-1", [n, r] = A(""), [a, s] = A([]), [o, c] = A(0), [u, l] = A(t), [d, m] = A(0), [b, h] = A(null), I = z(Ot), f = z(_e), R = Aa(ne, f);
1982
+ function Ka(i) {
1983
+ const { onChange: e } = i, t = "-1", [n, r] = N(""), [a, s] = N([]), [o, c] = N(0), [u, l] = N(t), [d, m] = N(0), [b, h] = N(null), g = z(Ft), f = z(De), R = wa(q, f);
1883
1984
  R.unshift({
1884
1985
  label: f.t("formula.moreFunctions.allFunctions"),
1885
1986
  value: t
1886
1987
  });
1887
- const p = f.t("formula.prompt.required"), g = f.t("formula.prompt.optional");
1888
- Ce(() => {
1988
+ const p = f.t("formula.prompt.required"), I = f.t("formula.prompt.optional");
1989
+ _e(() => {
1889
1990
  v(t);
1890
- }, []), Ce(() => {
1991
+ }, []), _e(() => {
1891
1992
  S(0);
1892
1993
  }, [a]);
1893
1994
  const C = (T) => {
1894
1995
  if (n.trim() === "")
1895
1996
  return T;
1896
1997
  const D = new RegExp(`(${n.toLocaleUpperCase()})`);
1897
- return T.split(D).filter(Boolean).map((U, ce) => U.match(D) ? /* @__PURE__ */ E.jsx("span", { className: te.formulaSelectFunctionResultItemNameLight, children: U }, ce) : U);
1998
+ return T.split(D).filter(Boolean).map((U, ce) => U.match(D) ? /* @__PURE__ */ E.jsx("span", { className: ne.formulaSelectFunctionResultItemNameLight, children: U }, ce) : U);
1898
1999
  }, S = (T) => {
1899
2000
  if (a.length === 0) {
1900
2001
  h(null);
1901
2002
  return;
1902
2003
  }
1903
2004
  m(T);
1904
- const D = I.getFunctionInfo(a[T].name);
2005
+ const D = g.getFunctionInfo(a[T].name);
1905
2006
  if (!D) {
1906
2007
  h(null);
1907
2008
  return;
@@ -1910,12 +2011,12 @@ function Ha(i) {
1910
2011
  };
1911
2012
  function v(T) {
1912
2013
  l(T);
1913
- const D = I.getSearchListByType(+T);
2014
+ const D = g.getSearchListByType(+T);
1914
2015
  s(D);
1915
2016
  }
1916
- function P(T) {
2017
+ function B(T) {
1917
2018
  r(T);
1918
- const D = I.getSearchListByName(T);
2019
+ const D = g.getSearchListByName(T);
1919
2020
  s(D);
1920
2021
  }
1921
2022
  function _(T) {
@@ -1928,47 +2029,47 @@ function Ha(i) {
1928
2029
  } else
1929
2030
  T.key === "Enter" && S(o);
1930
2031
  }
1931
- const N = (T) => {
2032
+ const A = (T) => {
1932
2033
  c(T);
1933
- }, B = () => {
2034
+ }, P = () => {
1934
2035
  c(-1);
1935
2036
  };
1936
2037
  return /* @__PURE__ */ E.jsxs("div", { children: [
1937
- /* @__PURE__ */ E.jsxs("div", { className: te.formulaSelectFunctionSelect, children: [
1938
- /* @__PURE__ */ E.jsx(Hr, { value: u, options: R, onChange: v }),
2038
+ /* @__PURE__ */ E.jsxs("div", { className: ne.formulaSelectFunctionSelect, children: [
2039
+ /* @__PURE__ */ E.jsx(Kr, { value: u, options: R, onChange: v }),
1939
2040
  /* @__PURE__ */ E.jsx(
1940
- $r,
2041
+ Yr,
1941
2042
  {
1942
2043
  placeholder: f.t("formula.moreFunctions.searchFunctionPlaceholder"),
1943
2044
  onKeyDown: _,
1944
2045
  value: n,
1945
- onChange: P,
2046
+ onChange: B,
1946
2047
  size: "large",
1947
2048
  allowClear: !0
1948
2049
  }
1949
2050
  )
1950
2051
  ] }),
1951
- /* @__PURE__ */ E.jsx("ul", { className: te.formulaSelectFunctionResult, onKeyDown: _, tabIndex: -1, children: a.map(({ name: T }, D) => /* @__PURE__ */ E.jsxs(
2052
+ /* @__PURE__ */ E.jsx("ul", { className: ne.formulaSelectFunctionResult, onKeyDown: _, tabIndex: -1, children: a.map(({ name: T }, D) => /* @__PURE__ */ E.jsxs(
1952
2053
  "li",
1953
2054
  {
1954
- className: o === D ? `${te.formulaSelectFunctionResultItem} ${te.formulaSelectFunctionResultItemActive}` : te.formulaSelectFunctionResultItem,
1955
- onMouseEnter: () => N(D),
1956
- onMouseLeave: B,
2055
+ className: o === D ? `${ne.formulaSelectFunctionResultItem} ${ne.formulaSelectFunctionResultItemActive}` : ne.formulaSelectFunctionResultItem,
2056
+ onMouseEnter: () => A(D),
2057
+ onMouseLeave: P,
1957
2058
  onClick: () => S(D),
1958
2059
  children: [
1959
- d === D && /* @__PURE__ */ E.jsx(Ni, { className: te.formulaSelectFunctionResultItemSelected }),
1960
- /* @__PURE__ */ E.jsx("span", { className: te.formulaSelectFunctionResultItemName, children: C(T) })
2060
+ d === D && /* @__PURE__ */ E.jsx(Li, { className: ne.formulaSelectFunctionResultItemSelected }),
2061
+ /* @__PURE__ */ E.jsx("span", { className: ne.formulaSelectFunctionResultItemName, children: C(T) })
1961
2062
  ]
1962
2063
  },
1963
2064
  D
1964
2065
  )) }),
1965
- b && /* @__PURE__ */ E.jsxs("div", { className: te.formulaSelectFunctionContent, children: [
2066
+ b && /* @__PURE__ */ E.jsxs("div", { className: ne.formulaSelectFunctionContent, children: [
1966
2067
  /* @__PURE__ */ E.jsx(ke, { title: b.functionName, value: b.description }),
1967
2068
  /* @__PURE__ */ E.jsx(
1968
2069
  ke,
1969
2070
  {
1970
2071
  title: f.t("formula.moreFunctions.syntax"),
1971
- value: /* @__PURE__ */ E.jsx(Hn, { prefix: b.functionName, value: b.functionParameter })
2072
+ value: /* @__PURE__ */ E.jsx($n, { prefix: b.functionName, value: b.functionParameter })
1972
2073
  }
1973
2074
  ),
1974
2075
  /* @__PURE__ */ E.jsx(
@@ -1982,41 +2083,41 @@ function Ha(i) {
1982
2083
  ke,
1983
2084
  {
1984
2085
  title: T.name,
1985
- value: `${T.require ? p : g} ${T.detail}`
2086
+ value: `${T.require ? p : I} ${T.detail}`
1986
2087
  },
1987
2088
  D
1988
2089
  ))
1989
2090
  ] })
1990
2091
  ] });
1991
2092
  }
1992
- function $a() {
1993
- const [i, e] = A(!0), [t, n] = A(!1), [r, a] = A([]), [s, o] = A(null), c = z(_e);
1994
- z(Dn);
1995
- const u = z(Ae);
2093
+ function Ya() {
2094
+ const [i, e] = N(!0), [t, n] = N(!1), [r, a] = N([]), [s, o] = N(null), c = z(De);
2095
+ z(yn);
2096
+ const u = z(Ne);
1996
2097
  function l() {
1997
2098
  e(!i), n(!t);
1998
2099
  }
1999
2100
  function d() {
2000
2101
  u.inputFormula(`=${s == null ? void 0 : s.functionName}(`);
2001
2102
  }
2002
- return /* @__PURE__ */ E.jsxs("div", { className: Zt.formulaMoreFunctions, children: [
2003
- i && /* @__PURE__ */ E.jsx(Ha, { onChange: o }),
2004
- t && /* @__PURE__ */ E.jsx(ba, { functionInfo: s, onChange: a }),
2005
- /* @__PURE__ */ E.jsxs("div", { className: Zt.formulaMoreFunctionsOperation, children: [
2006
- t && /* @__PURE__ */ E.jsx(ot, { type: "primary", size: "small", onClick: l, children: c.t("formula.moreFunctions.next") }),
2007
- t && /* @__PURE__ */ E.jsx(ot, { size: "small", onClick: l, children: c.t("formula.moreFunctions.prev") }),
2008
- i && /* @__PURE__ */ E.jsx(ot, { type: "primary", size: "small", onClick: d, children: c.t("formula.moreFunctions.confirm") })
2103
+ return /* @__PURE__ */ E.jsxs("div", { className: en.formulaMoreFunctions, children: [
2104
+ i && /* @__PURE__ */ E.jsx(Ka, { onChange: o }),
2105
+ t && /* @__PURE__ */ E.jsx(ga, { functionInfo: s, onChange: a }),
2106
+ /* @__PURE__ */ E.jsxs("div", { className: en.formulaMoreFunctionsOperation, children: [
2107
+ t && /* @__PURE__ */ E.jsx(mt, { type: "primary", size: "small", onClick: l, children: c.t("formula.moreFunctions.next") }),
2108
+ t && /* @__PURE__ */ E.jsx(mt, { size: "small", onClick: l, children: c.t("formula.moreFunctions.prev") }),
2109
+ i && /* @__PURE__ */ E.jsx(mt, { type: "primary", size: "small", onClick: d, children: c.t("formula.moreFunctions.confirm") })
2009
2110
  ] })
2010
2111
  ] });
2011
2112
  }
2012
- function ja(i) {
2113
+ function Xa(i) {
2013
2114
  return {
2014
- id: Mt.id,
2115
+ id: Lt.id,
2015
2116
  icon: "FunctionSingle",
2016
2117
  tooltip: "formula.insert.tooltip",
2017
- group: Or.TOOLBAR_FORMULAS_INSERT,
2018
- type: Tt.SELECTOR,
2019
- positions: [xr.TOOLBAR_START],
2118
+ group: Fr.TOOLBAR_FORMULAS_INSERT,
2119
+ type: Ot.SELECTOR,
2120
+ positions: [zr.TOOLBAR_START],
2020
2121
  selections: [
2021
2122
  {
2022
2123
  label: "SUM",
@@ -2043,38 +2144,39 @@ function ja(i) {
2043
2144
  value: "MIN",
2044
2145
  icon: "MinSingle"
2045
2146
  }
2046
- ]
2147
+ ],
2148
+ hidden$: Ur(i, Jn.SHEET)
2047
2149
  };
2048
2150
  }
2049
- function Wa(i) {
2151
+ function Qa(i) {
2050
2152
  return {
2051
- id: xn.id,
2153
+ id: wn.id,
2052
2154
  title: "formula.insert.more",
2053
- positions: Mt.id,
2054
- type: Tt.BUTTON
2155
+ positions: Lt.id,
2156
+ type: Ot.BUTTON
2055
2157
  };
2056
2158
  }
2057
- function Ga(i) {
2159
+ function Ja(i) {
2058
2160
  return {
2059
- id: Nn.id,
2060
- type: Tt.BUTTON,
2161
+ id: Mn.id,
2162
+ type: Ot.BUTTON,
2061
2163
  title: "formula.operation.pasteFormula",
2062
- positions: [Dr]
2164
+ positions: [Nr]
2063
2165
  };
2064
2166
  }
2065
- const $n = "meta_key_ctrl_And_Shift", at = [
2167
+ const jn = "meta_key_ctrl_And_Shift", st = [
2066
2168
  O.ARROW_DOWN,
2067
2169
  O.ARROW_UP,
2068
2170
  O.ARROW_LEFT,
2069
2171
  O.ARROW_RIGHT
2070
- ], Xa = [...at, O.ENTER, O.TAB];
2071
- function Ka() {
2172
+ ], Za = [...st, O.ENTER, O.TAB];
2173
+ function es() {
2072
2174
  const i = [];
2073
- for (const e of Xa)
2175
+ for (const e of Za)
2074
2176
  i.push({
2075
- id: ve.id,
2177
+ id: Pe.id,
2076
2178
  binding: e,
2077
- preconditions: (t) => De(t),
2179
+ preconditions: (t) => ye(t),
2078
2180
  staticParameters: {
2079
2181
  eventType: ae.Keyboard,
2080
2182
  keycode: e
@@ -2082,13 +2184,13 @@ function Ka() {
2082
2184
  });
2083
2185
  return i;
2084
2186
  }
2085
- function Ya() {
2187
+ function ts() {
2086
2188
  const i = [];
2087
- for (const e of at)
2189
+ for (const e of st)
2088
2190
  i.push({
2089
- id: ve.id,
2191
+ id: Pe.id,
2090
2192
  binding: e | se.SHIFT,
2091
- preconditions: (t) => De(t),
2193
+ preconditions: (t) => ye(t),
2092
2194
  staticParameters: {
2093
2195
  eventType: ae.Keyboard,
2094
2196
  keycode: e,
@@ -2097,13 +2199,13 @@ function Ya() {
2097
2199
  });
2098
2200
  return i;
2099
2201
  }
2100
- function Qa() {
2202
+ function ns() {
2101
2203
  const i = [];
2102
- for (const e of at)
2204
+ for (const e of st)
2103
2205
  i.push({
2104
- id: ve.id,
2206
+ id: Pe.id,
2105
2207
  binding: e | se.CTRL_COMMAND,
2106
- preconditions: (t) => De(t),
2208
+ preconditions: (t) => ye(t),
2107
2209
  staticParameters: {
2108
2210
  eventType: ae.Keyboard,
2109
2211
  keycode: e,
@@ -2112,32 +2214,32 @@ function Qa() {
2112
2214
  });
2113
2215
  return i;
2114
2216
  }
2115
- function Ja() {
2217
+ function rs() {
2116
2218
  const i = [];
2117
- for (const e of at)
2219
+ for (const e of st)
2118
2220
  i.push({
2119
- id: ve.id,
2221
+ id: Pe.id,
2120
2222
  binding: e | se.SHIFT | se.CTRL_COMMAND,
2121
- preconditions: (t) => De(t),
2223
+ preconditions: (t) => ye(t),
2122
2224
  staticParameters: {
2123
2225
  eventType: ae.Keyboard,
2124
2226
  keycode: e,
2125
- metaKey: $n
2227
+ metaKey: jn
2126
2228
  }
2127
2229
  });
2128
2230
  return i;
2129
2231
  }
2130
- const Za = {
2131
- id: Nt.id,
2232
+ const is = {
2233
+ id: wt.id,
2132
2234
  binding: O.F4,
2133
- preconditions: (i) => De(i)
2235
+ preconditions: (i) => ye(i)
2134
2236
  };
2135
- var es = Object.defineProperty, ts = Object.getOwnPropertyDescriptor, ns = (i, e, t, n) => {
2136
- for (var r = n > 1 ? void 0 : n ? ts(e, t) : e, a = i.length - 1, s; a >= 0; a--)
2237
+ var as = Object.defineProperty, ss = Object.getOwnPropertyDescriptor, os = (i, e, t, n) => {
2238
+ for (var r = n > 1 ? void 0 : n ? ss(e, t) : e, a = i.length - 1, s; a >= 0; a--)
2137
2239
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
2138
- return n && r && es(e, t, r), r;
2139
- }, pe = (i, e) => (t, n) => e(t, n, i);
2140
- let Xe = class extends H {
2240
+ return n && r && as(e, t, r), r;
2241
+ }, he = (i, e) => (t, n) => e(t, n, i);
2242
+ let Ye = class extends $ {
2141
2243
  constructor(i, e, t, n, r, a) {
2142
2244
  super(), this._injector = i, this._menuService = e, this._commandService = t, this._shortcutService = n, this._uiController = r, this._componentManager = a, this._initialize();
2143
2245
  }
@@ -2145,7 +2247,7 @@ let Xe = class extends H {
2145
2247
  this._registerCommands(), this._registerMenus(), this._registerShortcuts(), this._registerComponents();
2146
2248
  }
2147
2249
  _registerMenus() {
2148
- [ja, Wa, Ga].forEach(
2250
+ [Xa, Qa, Ja].forEach(
2149
2251
  (i) => {
2150
2252
  this.disposeWithMe(this._menuService.addMenuItem(this._injector.invoke(i)));
2151
2253
  }
@@ -2153,23 +2255,23 @@ let Xe = class extends H {
2153
2255
  }
2154
2256
  _registerCommands() {
2155
2257
  [
2258
+ On,
2156
2259
  Mn,
2157
- Nn,
2158
- Mt,
2159
- xn,
2160
- vt,
2161
- It,
2162
- ve,
2163
- Nt
2260
+ Lt,
2261
+ wn,
2262
+ Ct,
2263
+ Bt,
2264
+ Pe,
2265
+ wt
2164
2266
  ].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
2165
2267
  }
2166
2268
  _registerShortcuts() {
2167
2269
  [
2168
- ...Ka(),
2169
- ...Ya(),
2170
- ...Qa(),
2171
- ...Ja(),
2172
- Za
2270
+ ...es(),
2271
+ ...ts(),
2272
+ ...ns(),
2273
+ ...rs(),
2274
+ is
2173
2275
  ].forEach((i) => {
2174
2276
  this.disposeWithMe(this._shortcutService.registerShortcut(i));
2175
2277
  });
@@ -2177,26 +2279,26 @@ let Xe = class extends H {
2177
2279
  _registerComponents() {
2178
2280
  this.disposeWithMe(
2179
2281
  this._uiController.registerContentComponent(
2180
- () => Ur(aa, this._injector)
2282
+ () => jr(ma, this._injector)
2181
2283
  )
2182
- ), this._componentManager.register(On, $a);
2284
+ ), this._componentManager.register(xn, Ya);
2183
2285
  }
2184
2286
  };
2185
- Xe = ns([
2186
- K(Y.Ready, Xe),
2187
- pe(0, y(et)),
2188
- pe(1, Fr),
2189
- pe(2, Q),
2190
- pe(3, Lr),
2191
- pe(4, zr),
2192
- pe(5, y(wr))
2193
- ], Xe);
2194
- const tn = "formula_reference_selection_plugin_name";
2195
- function lt(i, e, t) {
2196
- const n = i.getCurrentTheme(), r = new an(e).setAlpha(0.05).toRgbString();
2287
+ Ye = os([
2288
+ X(Q.Ready, Ye),
2289
+ he(0, y(tt)),
2290
+ he(1, qr),
2291
+ he(2, J),
2292
+ he(3, Hr),
2293
+ he(4, $r),
2294
+ he(5, y(Vr))
2295
+ ], Ye);
2296
+ const nn = "formula_reference_selection_plugin_name";
2297
+ function pt(i, e, t) {
2298
+ const n = i.getCurrentTheme(), r = new sn(e).setAlpha(0.05).toRgbString();
2197
2299
  return {
2198
2300
  id: t,
2199
- strokeWidth: 1,
2301
+ strokeWidth: 1.5,
2200
2302
  stroke: e,
2201
2303
  // strokeDash: 10,
2202
2304
  fill: r,
@@ -2209,13 +2311,13 @@ function lt(i, e, t) {
2209
2311
  hasColumnHeader: !1
2210
2312
  };
2211
2313
  }
2212
- var rs = Object.defineProperty, is = Object.getOwnPropertyDescriptor, as = (i, e, t, n) => {
2213
- for (var r = n > 1 ? void 0 : n ? is(e, t) : e, a = i.length - 1, s; a >= 0; a--)
2314
+ var cs = Object.defineProperty, us = Object.getOwnPropertyDescriptor, ms = (i, e, t, n) => {
2315
+ for (var r = n > 1 ? void 0 : n ? us(e, t) : e, a = i.length - 1, s; a >= 0; a--)
2214
2316
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
2215
- return n && r && rs(e, t, r), r;
2216
- }, L = (i, e) => (t, n) => e(t, n, i);
2217
- let Ke = class extends H {
2218
- constructor(e, t, n, r, a, s, o, c, u, l, d, m, b, h, I, f) {
2317
+ return n && r && cs(e, t, r), r;
2318
+ }, F = (i, e) => (t, n) => e(t, n, i);
2319
+ let Xe = class extends $ {
2320
+ constructor(e, t, n, r, a, s, o, c, u, l, d, m, b, h, g, f) {
2219
2321
  super();
2220
2322
  k(this, "_formulaRefColors", []);
2221
2323
  k(this, "_previousSequenceNodes");
@@ -2230,7 +2332,7 @@ let Ke = class extends H {
2230
2332
  k(this, "_numberColor", "");
2231
2333
  k(this, "_insertSelections", []);
2232
2334
  k(this, "_inputPanelState", 0);
2233
- this._commandService = e, this._contextService = t, this._textSelectionRenderManager = n, this._editorBridgeService = r, this._formulaPromptService = a, this._lexerTreeBuilder = s, this._renderManagerService = o, this._themeService = c, this._selectionManagerService = u, this._sheetSkeletonManagerService = l, this._currentUniverService = d, this._selectionRenderService = m, this._descriptionService = b, this._textSelectionManagerService = h, this._formulaInputService = I, this._docViewModelManagerService = f, this._initialize();
2335
+ this._commandService = e, this._contextService = t, this._textSelectionRenderManager = n, this._editorBridgeService = r, this._formulaPromptService = a, this._lexerTreeBuilder = s, this._renderManagerService = o, this._themeService = c, this._selectionManagerService = u, this._sheetSkeletonManagerService = l, this._currentUniverService = d, this._selectionRenderService = m, this._descriptionService = b, this._textSelectionManagerService = h, this._formulaInputService = g, this._docViewModelManagerService = f, this._initialize();
2234
2336
  }
2235
2337
  dispose() {
2236
2338
  this._formulaRefColors = [], this._resetTemp();
@@ -2261,11 +2363,11 @@ let Ke = class extends H {
2261
2363
  _initialCursorSync() {
2262
2364
  this.disposeWithMe(
2263
2365
  w(
2264
- this._textSelectionManagerService.textSelection$.subscribe(() => {
2265
- if (this._editorBridgeService.isVisible().visible === !1 || this._formulaInputService.isSelectionMoving())
2366
+ this._textSelectionManagerService.textSelection$.subscribe((e) => {
2367
+ if (this._editorBridgeService.isVisible().visible === !1 || this._formulaInputService.isSelectionMoving() || (e == null ? void 0 : e.unitId) == null || ![ot, ct].includes(e.unitId))
2266
2368
  return;
2267
- const e = this._getCurrentBody(), t = (e == null ? void 0 : e.dataStream) || "";
2268
- this._contextSwitch(t), this._changeKeepVisibleHideState(), this._switchSelectionPlugin(), !this._formulaInputService.isLockedSelectionChange() && (this._highlightFormula(), this._changeFunctionPanelState());
2369
+ const n = this._getCurrentBody(), r = (n == null ? void 0 : n.dataStream) || "";
2370
+ this._contextSwitch(r), this._changeKeepVisibleHideState(), this._switchSelectionPlugin(), !this._formulaInputService.isLockedSelectionChange() && (this._highlightFormula(), this._changeFunctionPanelState());
2269
2371
  })
2270
2372
  )
2271
2373
  );
@@ -2293,24 +2395,24 @@ let Ke = class extends H {
2293
2395
  return;
2294
2396
  }
2295
2397
  const t = this._selectionManagerService.getCurrent();
2296
- if ((t == null ? void 0 : t.pluginName) === Be) {
2398
+ if ((t == null ? void 0 : t.pluginName) === Ce) {
2297
2399
  this._disableForceKeepVisible();
2298
2400
  return;
2299
2401
  }
2300
- this._selectionManagerService.clear(), this._selectionManagerService.changePlugin(Be), this._updateEditorModel(`\r
2301
- `, []), this._contextService.setContextValue(Oe, !1), this._disableForceKeepVisible(), this._selectionRenderService.resetStyle(), this._resetTemp(), this._hideFunctionPanel();
2402
+ this._selectionManagerService.clear(), this._selectionManagerService.changePlugin(Ce), this._updateEditorModel(`\r
2403
+ `, []), this._contextService.setContextValue(xe, !1), this._disableForceKeepVisible(), this._selectionRenderService.resetStyle(), this._resetTemp(), this._hideFunctionPanel();
2302
2404
  })
2303
2405
  )
2304
2406
  );
2305
2407
  }
2306
2408
  _initialRefSelectionUpdateEvent() {
2307
- const e = new Qn();
2409
+ const e = new Zn();
2308
2410
  this.disposeWithMe(
2309
2411
  w(
2310
2412
  this._selectionManagerService.selectionMoveEnd$.subscribe(() => {
2311
2413
  e.dispose();
2312
2414
  const t = this._selectionManagerService.getCurrent();
2313
- if (this._formulaInputService.disableSelectionMoving(), (t == null ? void 0 : t.pluginName) !== tn)
2415
+ if (this._formulaInputService.disableSelectionMoving(), (t == null ? void 0 : t.pluginName) !== nn)
2314
2416
  return;
2315
2417
  this._updateRefSelectionStyle(this._isSelectionMovingRefSelections), this._selectionRenderService.getCurrentControls().forEach((r) => {
2316
2418
  r.disableHelperSelection(), e.add(
@@ -2365,7 +2467,7 @@ let Ke = class extends H {
2365
2467
  this._selectionRenderService.selectionMoving$.subscribe((e) => {
2366
2468
  this._selectionChanging(
2367
2469
  e.map(
2368
- (t) => st(t)
2470
+ (t) => ut(t)
2369
2471
  )
2370
2472
  );
2371
2473
  })
@@ -2375,7 +2477,7 @@ let Ke = class extends H {
2375
2477
  this._selectionRenderService.selectionMoveStart$.subscribe((e) => {
2376
2478
  this._selectionChanging(
2377
2479
  e.map(
2378
- (t) => st(t)
2480
+ (t) => ut(t)
2379
2481
  ),
2380
2482
  !0
2381
2483
  );
@@ -2398,7 +2500,7 @@ let Ke = class extends H {
2398
2500
  return;
2399
2501
  }
2400
2502
  const o = e.length - s.token.length, c = { ...s };
2401
- c.token = e, c.endIndex += o, r[a] = c, r.splice(a + 1, 0, j.OPEN_BRACKET);
2503
+ c.token = e, c.endIndex += o, r[a] = c, r.splice(a + 1, 0, W.OPEN_BRACKET);
2402
2504
  const u = e.length + 1;
2403
2505
  for (let l = a + 2, d = r.length; l < d; l++) {
2404
2506
  const m = r[l];
@@ -2423,13 +2525,13 @@ let Ke = class extends H {
2423
2525
  this._hideFunctionPanel();
2424
2526
  return;
2425
2527
  }
2426
- if (typeof n != "string" && n.nodeType === W.FUNCTION) {
2528
+ if (typeof n != "string" && n.nodeType === G.FUNCTION) {
2427
2529
  const u = n.token.toUpperCase();
2428
2530
  if (this._inputPanelState === 1) {
2429
- const l = this._descriptionService.getSearchListByName(u);
2531
+ const l = this._descriptionService.getSearchListByNameFirstLetter(u);
2430
2532
  if (this._hideFunctionPanel(), l == null || l.length === 0)
2431
2533
  return;
2432
- this._commandService.executeCommand(vt.id, {
2534
+ this._commandService.executeCommand(Ct.id, {
2433
2535
  visible: !0,
2434
2536
  searchText: u,
2435
2537
  searchList: l
@@ -2448,17 +2550,17 @@ let Ke = class extends H {
2448
2550
  }
2449
2551
  _changeHelpFunctionPanelState(e, t) {
2450
2552
  const n = this._descriptionService.getFunctionInfo(e);
2451
- this._hideFunctionPanel(), n != null && this._commandService.executeCommand(It.id, {
2553
+ this._hideFunctionPanel(), n != null && this._commandService.executeCommand(Bt.id, {
2452
2554
  visible: !0,
2453
2555
  paramIndex: t,
2454
2556
  functionInfo: n
2455
2557
  });
2456
2558
  }
2457
2559
  _hideFunctionPanel() {
2458
- this._commandService.executeCommand(vt.id, {
2560
+ this._commandService.executeCommand(Ct.id, {
2459
2561
  visible: !1,
2460
2562
  searchText: ""
2461
- }), this._commandService.executeCommand(It.id, {
2563
+ }), this._commandService.executeCommand(Bt.id, {
2462
2564
  visible: !1,
2463
2565
  paramIndex: -1
2464
2566
  });
@@ -2486,7 +2588,7 @@ let Ke = class extends H {
2486
2588
  * @returns
2487
2589
  */
2488
2590
  _matchRefDrawToken(e) {
2489
- return nr(e) && e !== j.CLOSE_BRACES && e !== j.CLOSE_BRACKET && e !== j.SINGLE_QUOTATION && e !== j.DOUBLE_QUOTATION || e === " ";
2591
+ return sr(e) && e !== W.CLOSE_BRACES && e !== W.CLOSE_BRACKET && e !== W.SINGLE_QUOTATION && e !== W.DOUBLE_QUOTATION || e === " ";
2490
2592
  }
2491
2593
  /**
2492
2594
  *
@@ -2515,7 +2617,7 @@ let Ke = class extends H {
2515
2617
  return (n = t == null ? void 0 : t.snapshot) == null ? void 0 : n.body;
2516
2618
  }
2517
2619
  _getFormulaAndCellEditorBody() {
2518
- return [Ft, Lt].map((t) => {
2620
+ return [ot, ct].map((t) => {
2519
2621
  const n = this._currentUniverService.getUniverDocInstance(t);
2520
2622
  return n == null ? void 0 : n.getBody();
2521
2623
  });
@@ -2528,8 +2630,8 @@ let Ke = class extends H {
2528
2630
  * @returns
2529
2631
  */
2530
2632
  _contextSwitch(e) {
2531
- if (Ee(e)) {
2532
- this._contextService.setContextValue(Oe, !0);
2633
+ if (Re(e)) {
2634
+ this._contextService.setContextValue(xe, !0);
2533
2635
  const t = this._lexerTreeBuilder.sequenceNodesBuilder(e.replace(/\r/g, "").replace(/\n/g, "")) || [];
2534
2636
  this._formulaInputService.setSequenceNodes(t);
2535
2637
  const n = this._textSelectionManagerService.getActiveRange();
@@ -2538,21 +2640,21 @@ let Ke = class extends H {
2538
2640
  const { startOffset: r } = n;
2539
2641
  this._currentInsertRefStringIndex = r - 1;
2540
2642
  } else
2541
- this._contextService.setContextValue(Oe, !1), this._formulaInputService.disableLockedSelectionChange(), this._formulaInputService.disableLockedSelectionInsert(), this._formulaInputService.clearSequenceNodes(), this._hideFunctionPanel();
2643
+ this._contextService.setContextValue(xe, !1), this._formulaInputService.disableLockedSelectionChange(), this._formulaInputService.disableLockedSelectionInsert(), this._formulaInputService.clearSequenceNodes(), this._hideFunctionPanel();
2542
2644
  }
2543
2645
  _getContextState() {
2544
- return this._contextService.getContextValue(Oe);
2646
+ return this._contextService.getContextValue(xe);
2545
2647
  }
2546
2648
  /**
2547
2649
  * Switch from formula selection state to regular selection state.
2548
2650
  */
2549
2651
  _switchSelectionPlugin() {
2550
2652
  if (this._getContextState() === !0) {
2551
- this._selectionManagerService.changePluginNoRefresh(tn);
2552
- const e = mr(this._themeService);
2653
+ this._selectionManagerService.changePluginNoRefresh(nn);
2654
+ const e = br(this._themeService);
2553
2655
  e.strokeDash = 8, e.hasAutoFill = !1, e.hasRowHeader = !1, e.hasColumnHeader = !1, this._selectionRenderService.setStyle(e);
2554
2656
  } else
2555
- this._selectionManagerService.changePluginNoRefresh(Be), this._selectionRenderService.resetStyle();
2657
+ this._selectionManagerService.changePluginNoRefresh(Ce), this._selectionRenderService.resetStyle();
2556
2658
  }
2557
2659
  /**
2558
2660
  * Highlight cell editor and formula bar editor.
@@ -2584,7 +2686,7 @@ let Ke = class extends H {
2584
2686
  continue;
2585
2687
  const { startIndex: c, endIndex: u, nodeType: l, token: d } = o;
2586
2688
  let m = "";
2587
- if (l === W.REFERENCE) {
2689
+ if (l === G.REFERENCE) {
2588
2690
  const b = r % this._formulaRefColors.length;
2589
2691
  m = this._formulaRefColors[b], n.push({
2590
2692
  refIndex: a,
@@ -2592,7 +2694,7 @@ let Ke = class extends H {
2592
2694
  token: d
2593
2695
  }), r++;
2594
2696
  } else
2595
- l === W.NUMBER ? m = this._numberColor : l === W.STRING ? m = this._stringColor : l === W.ARRAY && (m = this._stringColor);
2697
+ l === G.NUMBER ? m = this._numberColor : l === G.STRING ? m = this._stringColor : l === G.ARRAY && (m = this._stringColor);
2596
2698
  m && m.length > 0 && t.push({
2597
2699
  st: c + 1,
2598
2700
  ed: u + 2,
@@ -2617,36 +2719,36 @@ let Ke = class extends H {
2617
2719
  return;
2618
2720
  let o = null;
2619
2721
  for (let u = 0, l = e.length; u < l; u++) {
2620
- const d = e[u], { themeColor: m, token: b, refIndex: h } = d, I = Re(b), { unitId: f, sheetName: R, range: p } = I;
2722
+ const d = e[u], { themeColor: m, token: b, refIndex: h } = d, g = ge(b), { unitId: f, sheetName: R, range: p } = g;
2621
2723
  if (f != null && f.length > 0 && t !== f)
2622
2724
  continue;
2623
- const g = this._getSheetIdByName(t, R.trim());
2624
- if (R.length !== 0 && g !== n)
2725
+ const I = this._getSheetIdByName(t, R.trim());
2726
+ if (R.length !== 0 && I !== n)
2625
2727
  continue;
2626
2728
  const C = (c = this._insertSelections.find((S) => {
2627
- const { startRow: v, startColumn: P, endRow: _, endColumn: N } = S.range;
2628
- return v === p.startRow && P === p.startColumn && _ === p.endRow && N === p.endColumn || v === p.startRow && P === p.startColumn && p.startRow === p.endRow && p.startColumn === p.endColumn;
2729
+ const { startRow: v, startColumn: B, endRow: _, endColumn: A } = S.range;
2730
+ return v === p.startRow && B === p.startColumn && _ === p.endRow && A === p.endColumn || v === p.startRow && B === p.startColumn && p.startRow === p.endRow && p.startColumn === p.endColumn;
2629
2731
  })) == null ? void 0 : c.primary;
2630
2732
  if (C != null) {
2631
2733
  const {
2632
2734
  isMerged: S,
2633
2735
  isMergedMainCell: v,
2634
- startRow: P,
2736
+ startRow: B,
2635
2737
  endRow: _,
2636
- startColumn: N,
2637
- endColumn: B
2738
+ startColumn: A,
2739
+ endColumn: P
2638
2740
  } = C;
2639
- (S || v) && P === p.startRow && N === p.startColumn && p.startRow === p.endRow && p.startColumn === p.endColumn && (p.endRow = _, p.endColumn = B), o = {
2741
+ (S || v) && B === p.startRow && A === p.startColumn && p.startRow === p.endRow && p.startColumn === p.endColumn && (p.endRow = _, p.endColumn = P), o = {
2640
2742
  range: p,
2641
2743
  primary: C,
2642
- style: lt(this._themeService, m, h.toString())
2744
+ style: pt(this._themeService, m, h.toString())
2643
2745
  };
2644
2746
  continue;
2645
2747
  }
2646
2748
  r.push({
2647
2749
  range: p,
2648
2750
  primary: C,
2649
- style: lt(this._themeService, m, h.toString())
2751
+ style: pt(this._themeService, m, h.toString())
2650
2752
  });
2651
2753
  }
2652
2754
  o && r.push(o), r.length !== 0 && this._selectionManagerService.add(r);
@@ -2654,13 +2756,13 @@ let Ke = class extends H {
2654
2756
  _getSheetIdByName(e, t) {
2655
2757
  var r;
2656
2758
  const n = this._currentUniverService.getUniverSheetInstance(e);
2657
- return (r = n == null ? void 0 : n.getSheetBySheetName(rr(t))) == null ? void 0 : r.getSheetId();
2759
+ return (r = n == null ? void 0 : n.getSheetBySheetName(or(t))) == null ? void 0 : r.getSheetId();
2658
2760
  }
2659
2761
  _getSheetNameById(e, t) {
2660
2762
  var a;
2661
2763
  const n = this._currentUniverService.getUniverSheetInstance(e);
2662
2764
  let r = ((a = n == null ? void 0 : n.getSheetBySheetId(t)) == null ? void 0 : a.getName()) || "";
2663
- return r.length > 0 && ir(r) && (r = `'${r}'`), r;
2765
+ return r.length > 0 && cr(r) && (r = `'${r}'`), r;
2664
2766
  }
2665
2767
  _getCurrentUnitIdAndSheetId() {
2666
2768
  const e = this._sheetSkeletonManagerService.getCurrent();
@@ -2694,13 +2796,13 @@ let Ke = class extends H {
2694
2796
  isMerged: m,
2695
2797
  isMergedMainCell: b,
2696
2798
  startRow: h,
2697
- endRow: I,
2799
+ endRow: g,
2698
2800
  startColumn: f,
2699
2801
  endColumn: R
2700
2802
  } = o;
2701
- (m || b) && h === c && f === l && I === u && R === d && (c = h, l = f, u = h, d = f);
2803
+ (m || b) && h === c && f === l && g === u && R === d && (c = h, l = f, u = h, d = f);
2702
2804
  }
2703
- return Ve({
2805
+ return qe({
2704
2806
  sheetName: a,
2705
2807
  unitId: r,
2706
2808
  range: {
@@ -2718,13 +2820,13 @@ let Ke = class extends H {
2718
2820
  * @returns
2719
2821
  */
2720
2822
  async _syncToEditor(e, t, n = !0) {
2721
- const r = cn(e), { textRuns: a, refSelections: s } = this._buildTextRuns(e);
2823
+ const r = un(e), { textRuns: a, refSelections: s } = this._buildTextRuns(e);
2722
2824
  this._isSelectionMovingRefSelections = s;
2723
2825
  const o = this._textSelectionManagerService.getActiveRange();
2724
2826
  if (o == null)
2725
2827
  return;
2726
2828
  const { collapsed: c, style: u } = o;
2727
- this._currentInsertRefStringIndex = t, await this._fitEditorSize(), n ? this._commandService.executeCommand(Ar.id, {
2829
+ this._currentInsertRefStringIndex = t, await this._fitEditorSize(), n ? this._commandService.executeCommand(xr.id, {
2728
2830
  unitId: this._editorBridgeService.getCurrentEditorId(),
2729
2831
  body: {
2730
2832
  dataStream: `=${r}`,
@@ -2746,11 +2848,13 @@ let Ke = class extends H {
2746
2848
  endOffset: t + 1,
2747
2849
  style: u
2748
2850
  }
2749
- ]));
2851
+ ])), setTimeout(() => {
2852
+ this._textSelectionRenderManager.focus();
2853
+ }, 0);
2750
2854
  }
2751
2855
  async _fitEditorSize() {
2752
2856
  const e = this._editorBridgeService.getCurrentEditorId();
2753
- e != null && await this._commandService.syncExecuteCommand(yr.id, {
2857
+ e != null && await this._commandService.syncExecuteCommand(Mr.id, {
2754
2858
  unitId: e
2755
2859
  });
2756
2860
  }
@@ -2778,14 +2882,14 @@ let Ke = class extends H {
2778
2882
  }
2779
2883
  _inertControlSelectionReplace(e) {
2780
2884
  this._previousSequenceNodes == null && (this._previousSequenceNodes = this._formulaInputService.getSequenceNodes()), this._previousInsertRefStringIndex == null && (this._previousInsertRefStringIndex = this._currentInsertRefStringIndex);
2781
- const t = G.deepClone(this._previousSequenceNodes);
2885
+ const t = K.deepClone(this._previousSequenceNodes);
2782
2886
  if (t == null)
2783
2887
  return;
2784
2888
  const n = this._getRefString(e);
2785
2889
  this._formulaInputService.setSequenceNodes(t), this._formulaInputService.insertSequenceRef(this._previousInsertRefStringIndex, n), this._syncToEditor(t, this._previousInsertRefStringIndex + n.length);
2786
2890
  const r = this._selectionRenderService.getSelectionDataWithStyle();
2787
2891
  this._insertSelections = [], r.forEach((a) => {
2788
- const s = st(a);
2892
+ const s = ut(a);
2789
2893
  this._insertSelections.push(s);
2790
2894
  });
2791
2895
  }
@@ -2800,7 +2904,7 @@ let Ke = class extends H {
2800
2904
  const r = this._getCurrentChar();
2801
2905
  if (r == null)
2802
2906
  return;
2803
- this._previousInsertRefStringIndex = this._currentInsertRefStringIndex, this._matchRefDrawToken(r) || (this._formulaInputService.insertSequenceString(this._currentInsertRefStringIndex, j.COMMA), n = this._formulaInputService.getSequenceNodes(), this._previousInsertRefStringIndex += 1), this._previousSequenceNodes = G.deepClone(n);
2907
+ this._previousInsertRefStringIndex = this._currentInsertRefStringIndex, this._matchRefDrawToken(r) || (this._formulaInputService.insertSequenceString(this._currentInsertRefStringIndex, W.COMMA), n = this._formulaInputService.getSequenceNodes(), this._previousInsertRefStringIndex += 1), this._previousSequenceNodes = K.deepClone(n);
2804
2908
  const a = this._getRefString(t);
2805
2909
  this._formulaInputService.setSequenceNodes(n), this._formulaInputService.insertSequenceRef(this._previousInsertRefStringIndex, a), this._selectionRenderService.disableSkipRemainLast();
2806
2910
  }
@@ -2809,19 +2913,19 @@ let Ke = class extends H {
2809
2913
  _updateRefSelectionStyle(e) {
2810
2914
  const t = this._selectionRenderService.getCurrentControls(), { unitId: n, sheetId: r } = this._getCurrentUnitIdAndSheetId();
2811
2915
  for (let a = 0, s = e.length; a < s; a++) {
2812
- const o = e[a], { refIndex: c, themeColor: u, token: l } = o, d = Re(l), { unitId: m, sheetName: b, range: h } = d;
2916
+ const o = e[a], { refIndex: c, themeColor: u, token: l } = o, d = ge(l), { unitId: m, sheetName: b, range: h } = d;
2813
2917
  if (m != null && m.length > 0 && n !== m)
2814
2918
  continue;
2815
- const I = this._getSheetIdByName(n, b.trim());
2816
- if (I != null && I !== r)
2919
+ const g = this._getSheetIdByName(n, b.trim());
2920
+ if (g != null && g !== r)
2817
2921
  continue;
2818
2922
  const f = t.find((p) => {
2819
- const { startRow: g, startColumn: C, endRow: S, endColumn: v } = p.getRange();
2820
- return g === h.startRow && C === h.startColumn && S === h.endRow && v === h.endColumn || g === h.startRow && C === h.startColumn && h.startRow === h.endRow && h.startColumn === h.endColumn;
2923
+ const { startRow: I, startColumn: C, endRow: S, endColumn: v } = p.getRange();
2924
+ return I === h.startRow && C === h.startColumn && S === h.endRow && v === h.endColumn || I === h.startRow && C === h.startColumn && h.startRow === h.endRow && h.startColumn === h.endColumn;
2821
2925
  });
2822
2926
  if (f == null)
2823
2927
  continue;
2824
- const R = lt(this._themeService, u, c.toString());
2928
+ const R = pt(this._themeService, u, c.toString());
2825
2929
  f.updateStyle(R);
2826
2930
  }
2827
2931
  }
@@ -2832,20 +2936,20 @@ let Ke = class extends H {
2832
2936
  const { unitId: n, sheetId: r, skeleton: a } = this._getCurrentUnitIdAndSheetId();
2833
2937
  this._formulaInputService.enableLockedSelectionChange();
2834
2938
  const s = (f = t.selectionStyle) == null ? void 0 : f.id;
2835
- if (s == null || !G.isStringNumber(s))
2939
+ if (s == null || !K.isStringNumber(s))
2836
2940
  return;
2837
2941
  let { startRow: o, endRow: c, startColumn: u, endColumn: l } = e;
2838
- const d = Tr(o, u, a == null ? void 0 : a.mergeData);
2942
+ const d = Or(o, u, a == null ? void 0 : a.mergeData);
2839
2943
  if (d) {
2840
2944
  const {
2841
2945
  isMerged: R,
2842
2946
  isMergedMainCell: p,
2843
- startRow: g,
2947
+ startRow: I,
2844
2948
  endRow: C,
2845
2949
  startColumn: S,
2846
2950
  endColumn: v
2847
2951
  } = d;
2848
- (R || p) && g === o && S === u && C === c && v === l && (o = g, u = S, c = g, l = S);
2952
+ (R || p) && I === o && S === u && C === c && v === l && (o = I, u = S, c = I, l = S);
2849
2953
  }
2850
2954
  const m = this._getRefString({
2851
2955
  range: {
@@ -2858,14 +2962,20 @@ let Ke = class extends H {
2858
2962
  style: null
2859
2963
  }), b = Number(s);
2860
2964
  this._formulaInputService.updateSequenceRef(b, m);
2861
- const h = this._formulaInputService.getSequenceNodes(), I = h[b];
2862
- typeof I != "string" && (this._syncToEditor(h, I.endIndex + 1), t.update(e));
2965
+ const h = this._formulaInputService.getSequenceNodes(), g = h[b];
2966
+ typeof g != "string" && (this._syncToEditor(h, g.endIndex + 1), t.update(
2967
+ e,
2968
+ void 0,
2969
+ void 0,
2970
+ void 0,
2971
+ this._selectionRenderService.convertCellRangeToInfo(d)
2972
+ ));
2863
2973
  }
2864
2974
  _refreshFormulaAndCellEditor() {
2865
2975
  var t;
2866
- const e = [Ft, Lt];
2976
+ const e = [ot, ct];
2867
2977
  for (const n of e) {
2868
- const r = gt(n, this._renderManagerService), a = r == null ? void 0 : r.document;
2978
+ const r = St(n, this._renderManagerService), a = r == null ? void 0 : r.document;
2869
2979
  a != null && ((t = a.getSkeleton()) == null || t.calculate(), a.makeDirty());
2870
2980
  }
2871
2981
  }
@@ -2883,7 +2993,7 @@ let Ke = class extends H {
2883
2993
  );
2884
2994
  }
2885
2995
  _commandExecutedListener() {
2886
- const e = [ve.id];
2996
+ const e = [Pe.id];
2887
2997
  this.disposeWithMe(
2888
2998
  this._commandService.onCommandExecuted((t) => {
2889
2999
  if (e.includes(t.id)) {
@@ -2939,21 +3049,21 @@ let Ke = class extends H {
2939
3049
  return;
2940
3050
  }
2941
3051
  if (this._arrowMoveActionState === 2 && (this._arrowMoveActionState = 3), (this._selectionManagerService.getSelectionRanges() || []).length === 0) {
2942
- const l = this._selectionManagerService.getLastByPlugin(Be);
3052
+ const l = this._selectionManagerService.getLastByPlugin(Ce);
2943
3053
  if (l != null) {
2944
- const d = G.deepClone(l);
3054
+ const d = K.deepClone(l);
2945
3055
  this._selectionManagerService.add([d]);
2946
3056
  }
2947
3057
  }
2948
3058
  let o = M.DOWN;
2949
3059
  r === O.ARROW_DOWN ? o = M.DOWN : r === O.ARROW_UP ? o = M.UP : r === O.ARROW_LEFT ? o = M.LEFT : r === O.ARROW_RIGHT && (o = M.RIGHT), a === se.CTRL_COMMAND ? this._commandService.executeCommand(Fe.id, {
2950
3060
  direction: o,
2951
- jumpOver: Kt.moveGap
2952
- }) : a === se.SHIFT ? this._commandService.executeCommand(Yt.id, {
3061
+ jumpOver: Xt.moveGap
3062
+ }) : a === se.SHIFT ? this._commandService.executeCommand(Qt.id, {
2953
3063
  direction: o
2954
- }) : a === $n ? this._commandService.executeCommand(Yt.id, {
3064
+ }) : a === jn ? this._commandService.executeCommand(Qt.id, {
2955
3065
  direction: o,
2956
- jumpOver: Kt.moveGap
3066
+ jumpOver: Xt.moveGap
2957
3067
  }) : this._commandService.executeCommand(Fe.id, {
2958
3068
  direction: o
2959
3069
  });
@@ -2967,39 +3077,39 @@ let Ke = class extends H {
2967
3077
  if (e == null)
2968
3078
  return;
2969
3079
  let t = M.LEFT;
2970
- e === O.ARROW_DOWN ? t = M.DOWN : e === O.ARROW_UP ? t = M.UP : e === O.ARROW_RIGHT && (t = M.RIGHT), this._commandService.executeCommand(Nr.id, {
3080
+ e === O.ARROW_DOWN ? t = M.DOWN : e === O.ARROW_UP ? t = M.UP : e === O.ARROW_RIGHT && (t = M.RIGHT), this._commandService.executeCommand(wr.id, {
2971
3081
  direction: t
2972
3082
  });
2973
3083
  }
2974
3084
  _getEditorObject() {
2975
- return gt(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
3085
+ return St(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
2976
3086
  }
2977
3087
  };
2978
- Ke = as([
2979
- K(Y.Steady, Ke),
2980
- L(0, Q),
2981
- L(1, St),
2982
- L(2, Cn),
2983
- L(3, y(_t)),
2984
- L(4, y(de)),
2985
- L(5, y(Ie)),
2986
- L(6, yt),
2987
- L(7, y(sn)),
2988
- L(8, y(Ct)),
2989
- L(9, y(Sn)),
2990
- L(10, ge),
2991
- L(11, y(Bn)),
2992
- L(12, y(Ot)),
2993
- L(13, y(_n)),
2994
- L(14, Ae),
2995
- L(15, y(Mr))
2996
- ], Ke);
2997
- var ss = Object.defineProperty, os = Object.getOwnPropertyDescriptor, cs = (i, e, t, n) => {
2998
- for (var r = n > 1 ? void 0 : n ? os(e, t) : e, a = i.length - 1, s; a >= 0; a--)
3088
+ Xe = ms([
3089
+ X(Q.Steady, Xe),
3090
+ F(0, J),
3091
+ F(1, _t),
3092
+ F(2, _n),
3093
+ F(3, y(At)),
3094
+ F(4, y(de)),
3095
+ F(5, y(ve)),
3096
+ F(6, Mt),
3097
+ F(7, y(on)),
3098
+ F(8, y(Tt)),
3099
+ F(9, y(Bn)),
3100
+ F(10, Ie),
3101
+ F(11, y(Cn)),
3102
+ F(12, y(Ft)),
3103
+ F(13, y(Dn)),
3104
+ F(14, Ne),
3105
+ F(15, y(Lr))
3106
+ ], Xe);
3107
+ var fs = Object.defineProperty, ls = Object.getOwnPropertyDescriptor, ds = (i, e, t, n) => {
3108
+ for (var r = n > 1 ? void 0 : n ? ls(e, t) : e, a = i.length - 1, s; a >= 0; a--)
2999
3109
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
3000
- return n && r && ss(e, t, r), r;
3001
- }, nn = (i, e) => (t, n) => e(t, n, i);
3002
- let Ye = class extends H {
3110
+ return n && r && fs(e, t, r), r;
3111
+ }, rn = (i, e) => (t, n) => e(t, n, i);
3112
+ let Qe = class extends $ {
3003
3113
  constructor(e, t) {
3004
3114
  super();
3005
3115
  k(this, "_waitingCommandQueue", []);
@@ -3017,12 +3127,12 @@ let Ye = class extends H {
3017
3127
  if (this._activeDirtyManagerService.get(e.id)) {
3018
3128
  if (e.id === ie.id) {
3019
3129
  const n = e.params;
3020
- if (t && t.onlyLocal === !0 || n.trigger === Bt.id || n.trigger === fn.id)
3130
+ if (t && t.onlyLocal === !0 || n.trigger === Dt.id || n.trigger === ln.id)
3021
3131
  return;
3022
3132
  }
3023
3133
  this._waitingCommandQueue.push(e), clearTimeout(this._setTimeoutKey), this._setTimeoutKey = setTimeout(() => {
3024
3134
  this._commandService.executeCommand(
3025
- Ut.id,
3135
+ Vt.id,
3026
3136
  {
3027
3137
  ...this._generateDirty(this._waitingCommandQueue)
3028
3138
  },
@@ -3069,7 +3179,7 @@ let Ye = class extends H {
3069
3179
  _initialExecuteFormulaProcessListener() {
3070
3180
  this.disposeWithMe(
3071
3181
  this._commandService.onCommandExecuted((e) => {
3072
- if (e.id !== ar.id)
3182
+ if (e.id !== ur.id)
3073
3183
  return;
3074
3184
  const t = e.params;
3075
3185
  if (t.stageInfo != null) {
@@ -3089,16 +3199,16 @@ let Ye = class extends H {
3089
3199
  const n = t.functionsExecutedState;
3090
3200
  let r = "";
3091
3201
  switch (n) {
3092
- case xe.NOT_EXECUTED:
3202
+ case we.NOT_EXECUTED:
3093
3203
  r = "No tasks are being executed anymore", this._waitingCommandQueue.unshift(...this._executingCommandQueue), this._executingCommandQueue = [];
3094
3204
  break;
3095
- case xe.STOP_EXECUTION:
3205
+ case we.STOP_EXECUTION:
3096
3206
  r = "The execution of the formula has been stopped", this._waitingCommandQueue.unshift(...this._executingCommandQueue), this._executingCommandQueue = [];
3097
3207
  break;
3098
- case xe.SUCCESS:
3208
+ case we.SUCCESS:
3099
3209
  r = `Formula calculation succeeded, Total time consumed: ${performance.now() - this._startExecutionTime} ms`, this._executingCommandQueue = [];
3100
3210
  break;
3101
- case xe.INITIAL:
3211
+ case we.INITIAL:
3102
3212
  r = "Waiting for calculation", this._executingCommandQueue = [];
3103
3213
  break;
3104
3214
  }
@@ -3109,7 +3219,7 @@ let Ye = class extends H {
3109
3219
  }
3110
3220
  _initialExecuteFormula() {
3111
3221
  this._commandService.executeCommand(
3112
- Ut.id,
3222
+ Vt.id,
3113
3223
  {
3114
3224
  commands: [],
3115
3225
  forceCalculation: !0
@@ -3120,54 +3230,54 @@ let Ye = class extends H {
3120
3230
  );
3121
3231
  }
3122
3232
  };
3123
- Ye = cs([
3124
- K(Y.Ready, Ye),
3125
- nn(0, Q),
3126
- nn(1, At)
3127
- ], Ye);
3128
- function ze(i, e, t, n, r) {
3233
+ Qe = ds([
3234
+ X(Q.Ready, Qe),
3235
+ rn(0, J),
3236
+ rn(1, xt)
3237
+ ], Qe);
3238
+ function Ue(i, e, t, n, r) {
3129
3239
  const { id: a } = e;
3130
- if (jn(i, t, n))
3240
+ if (Wn(i, t, n))
3131
3241
  return i;
3132
3242
  const s = new x(i[t][n]);
3133
3243
  switch (a) {
3244
+ case Sn.id:
3245
+ bs(s, e);
3246
+ break;
3134
3247
  case Pn.id:
3135
- us(s, e);
3248
+ ps(s, e, r);
3136
3249
  break;
3137
3250
  case vn.id:
3138
- ms(s, e, r);
3251
+ hs(s, e, r);
3139
3252
  break;
3140
3253
  case In.id:
3141
- fs(s, e, r);
3254
+ Es(s, e);
3142
3255
  break;
3143
3256
  case gn.id:
3144
- ls(s, e);
3257
+ Rs(s, e);
3145
3258
  break;
3146
3259
  case Rn.id:
3147
- ds(s, e);
3260
+ gs(s, e);
3148
3261
  break;
3149
3262
  case En.id:
3150
- bs(s, e);
3263
+ Is(s, e);
3151
3264
  break;
3152
3265
  case hn.id:
3153
- ps(s, e);
3266
+ vs(s, e);
3154
3267
  break;
3155
3268
  case pn.id:
3156
- hs(s, e);
3269
+ Ps(s, e);
3157
3270
  break;
3158
3271
  case bn.id:
3159
- Es(s, e);
3272
+ Ss(s, e);
3160
3273
  break;
3161
3274
  case dn.id:
3162
- Rs(s, e);
3163
- break;
3164
- case ln.id:
3165
- gs(s, e);
3275
+ Bs(s, e);
3166
3276
  break;
3167
3277
  }
3168
3278
  return i;
3169
3279
  }
3170
- function us(i, e) {
3280
+ function bs(i, e) {
3171
3281
  const { params: t } = e;
3172
3282
  if (!t)
3173
3283
  return;
@@ -3178,98 +3288,98 @@ function us(i, e) {
3178
3288
  endColumn: c
3179
3289
  } = n, { startRow: u, endRow: l, startColumn: d, endColumn: m } = r, b = new x();
3180
3290
  for (let h = a; h <= s; h++)
3181
- for (let I = o; I <= c; I++) {
3182
- const f = i.getValue(h, I);
3183
- b.setValue(h - a, I - o, f), i.setValue(h, I, null);
3291
+ for (let g = o; g <= c; g++) {
3292
+ const f = i.getValue(h, g);
3293
+ b.setValue(h - a, g - o, f), i.setValue(h, g, null);
3184
3294
  }
3185
3295
  for (let h = u; h <= l; h++)
3186
- for (let I = d; I <= m; I++) {
3187
- const f = b.getValue(h - u, I - d);
3188
- i.setValue(h, I, f);
3296
+ for (let g = d; g <= m; g++) {
3297
+ const f = b.getValue(h - u, g - d);
3298
+ i.setValue(h, g, f);
3189
3299
  }
3190
3300
  }
3191
- function ms(i, e, t) {
3301
+ function ps(i, e, t) {
3192
3302
  const { params: n } = e;
3193
3303
  if (!n)
3194
3304
  return;
3195
3305
  const { fromRow: r, toRow: a } = n, s = t == null ? void 0 : t.filter(
3196
- (l) => l.range.rangeType === he.ROW && l.range.startRow <= r && r <= l.range.endRow
3306
+ (l) => l.range.rangeType === Ee.ROW && l.range.startRow <= r && r <= l.range.endRow
3197
3307
  );
3198
3308
  if ((s == null ? void 0 : s.length) !== 1)
3199
3309
  return;
3200
3310
  const o = s[0].range, c = o.startRow, u = o.endRow - o.startRow + 1;
3201
3311
  i.moveRows(c, u, a);
3202
3312
  }
3203
- function fs(i, e, t) {
3313
+ function hs(i, e, t) {
3204
3314
  const { params: n } = e;
3205
3315
  if (!n)
3206
3316
  return;
3207
3317
  const { fromCol: r, toCol: a } = n, s = t == null ? void 0 : t.filter(
3208
- (l) => l.range.rangeType === he.COLUMN && l.range.startColumn <= r && r <= l.range.endColumn
3318
+ (l) => l.range.rangeType === Ee.COLUMN && l.range.startColumn <= r && r <= l.range.endColumn
3209
3319
  );
3210
3320
  if ((s == null ? void 0 : s.length) !== 1)
3211
3321
  return;
3212
3322
  const o = s[0].range, c = o.startColumn, u = o.endColumn - o.startColumn + 1;
3213
3323
  i.moveColumns(c, u, a);
3214
3324
  }
3215
- function ls(i, e) {
3325
+ function Es(i, e) {
3216
3326
  const { params: t } = e;
3217
3327
  if (!t)
3218
3328
  return;
3219
3329
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3220
- nt(i, n, r, a, X.ROWS);
3330
+ rt(i, n, r, a, Y.ROWS);
3221
3331
  }
3222
- function ds(i, e) {
3332
+ function Rs(i, e) {
3223
3333
  const { params: t } = e;
3224
3334
  if (!t)
3225
3335
  return;
3226
3336
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3227
- nt(i, n, r, a, X.COLUMNS);
3337
+ rt(i, n, r, a, Y.COLUMNS);
3228
3338
  }
3229
- function bs(i, e) {
3339
+ function gs(i, e) {
3230
3340
  const { params: t } = e;
3231
3341
  if (!t)
3232
3342
  return;
3233
3343
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3234
- nt(i, n, r, a, X.COLUMNS);
3344
+ rt(i, n, r, a, Y.COLUMNS);
3235
3345
  }
3236
- function ps(i, e) {
3346
+ function Is(i, e) {
3237
3347
  const { params: t } = e;
3238
3348
  if (!t)
3239
3349
  return;
3240
3350
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3241
- nt(i, n, r, a, X.ROWS);
3351
+ rt(i, n, r, a, Y.ROWS);
3242
3352
  }
3243
- function hs(i, e) {
3353
+ function vs(i, e) {
3244
3354
  const { params: t } = e;
3245
3355
  if (!t)
3246
3356
  return;
3247
3357
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3248
- rt(i, n, r, a, X.ROWS);
3358
+ it(i, n, r, a, Y.ROWS);
3249
3359
  }
3250
- function Es(i, e) {
3360
+ function Ps(i, e) {
3251
3361
  const { params: t } = e;
3252
3362
  if (!t)
3253
3363
  return;
3254
3364
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3255
- rt(i, n, r, a, X.COLUMNS);
3365
+ it(i, n, r, a, Y.COLUMNS);
3256
3366
  }
3257
- function Rs(i, e) {
3367
+ function Ss(i, e) {
3258
3368
  const { params: t } = e;
3259
3369
  if (!t)
3260
3370
  return;
3261
3371
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3262
- rt(i, n, r, a, X.ROWS);
3372
+ it(i, n, r, a, Y.ROWS);
3263
3373
  }
3264
- function gs(i, e) {
3374
+ function Bs(i, e) {
3265
3375
  const { params: t } = e;
3266
3376
  if (!t)
3267
3377
  return;
3268
3378
  const { range: n } = t, r = i.getLength() - 1, a = i.getRange().endColumn;
3269
- rt(i, n, r, a, X.COLUMNS);
3379
+ it(i, n, r, a, Y.COLUMNS);
3270
3380
  }
3271
- function Is(i, e, t) {
3272
- if (jn(i, e, t))
3381
+ function Cs(i, e, t) {
3382
+ if (Wn(i, e, t))
3273
3383
  return i;
3274
3384
  const n = new x(i[e][t]);
3275
3385
  return n.forValue((r, a, s) => {
@@ -3285,15 +3395,18 @@ function Is(i, e, t) {
3285
3395
  n.setValue(r, a, b);
3286
3396
  }), i;
3287
3397
  }
3288
- function jn(i, e, t) {
3398
+ function Wn(i, e, t) {
3289
3399
  return i == null || i[e] == null || i[e][t] == null;
3290
3400
  }
3291
- var vs = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, Ss = (i, e, t, n) => {
3292
- for (var r = n > 1 ? void 0 : n ? Ps(e, t) : e, a = i.length - 1, s; a >= 0; a--)
3401
+ function ht(i, e, t) {
3402
+ i && i[e] && i[e][t] && delete i[e][t];
3403
+ }
3404
+ var ks = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Ds = (i, e, t, n) => {
3405
+ for (var r = n > 1 ? void 0 : n ? _s(e, t) : e, a = i.length - 1, s; a >= 0; a--)
3293
3406
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
3294
- return n && r && vs(e, t, r), r;
3407
+ return n && r && ks(e, t, r), r;
3295
3408
  }, le = (i, e) => (t, n) => e(t, n, i);
3296
- let Qe = class extends H {
3409
+ let Je = class extends $ {
3297
3410
  constructor(i, e, t, n, r, a, s) {
3298
3411
  super(), this._currentUniverService = i, this._commandService = e, this._lexerTreeBuilder = t, this._formulaDataModel = n, this._sheetInterceptorService = r, this._selectionManagerService = a, this._injector = s, this._initialize();
3299
3412
  }
@@ -3310,18 +3423,18 @@ let Qe = class extends H {
3310
3423
  if (i.params)
3311
3424
  if (i.id === ie.id) {
3312
3425
  const t = i.params;
3313
- if (e && e.onlyLocal === !0 || t.trigger === Bt.id || t.trigger === fn.id)
3426
+ if (e && e.onlyLocal === !0 || t.trigger === Dt.id || t.trigger === ln.id)
3314
3427
  return;
3315
3428
  this._handleSetRangeValuesMutation(t, e);
3316
3429
  } else
3317
- i.id === Et.id ? this._handleRemoveSheetMutation(i.params) : i.id === Rt.id && this._handleInsertSheetMutation(i.params);
3430
+ i.id === vt.id ? this._handleRemoveSheetMutation(i.params) : i.id === Pt.id && this._handleInsertSheetMutation(i.params);
3318
3431
  })
3319
3432
  );
3320
3433
  }
3321
3434
  _handleSetRangeValuesMutation(i, e) {
3322
3435
  const { subUnitId: t, unitId: n, cellValue: r } = i;
3323
3436
  e && e.onlyLocal === !0 || r == null || (this._formulaDataModel.updateFormulaData(n, t, r), this._commandService.executeCommand(
3324
- we.id,
3437
+ Le.id,
3325
3438
  {
3326
3439
  formulaData: this._formulaDataModel.getFormulaData()
3327
3440
  },
@@ -3332,20 +3445,20 @@ let Qe = class extends H {
3332
3445
  }
3333
3446
  _handleRemoveSheetMutation(i) {
3334
3447
  const { subUnitId: e, unitId: t } = i, n = this._formulaDataModel.getFormulaData();
3335
- delete n[t][e];
3448
+ ht(n, t, e);
3336
3449
  const r = this._formulaDataModel.getArrayFormulaRange();
3337
- delete r[t][e];
3450
+ ht(r, t, e);
3338
3451
  const a = this._formulaDataModel.getArrayFormulaCellData();
3339
- delete a[t][e], this._commandService.executeCommand(we.id, {
3452
+ ht(a, t, e), this._commandService.executeCommand(Le.id, {
3340
3453
  formulaData: n
3341
- }), this._commandService.executeCommand(ht.id, {
3454
+ }), this._commandService.executeCommand(It.id, {
3342
3455
  arrayFormulaRange: r,
3343
3456
  arrayFormulaCellData: a
3344
3457
  });
3345
3458
  }
3346
3459
  _handleInsertSheetMutation(i) {
3347
3460
  const { sheet: e, unitId: t } = i, n = this._formulaDataModel.getFormulaData(), { id: r, cellData: a } = e, s = new x(a);
3348
- sr(n, t, r, s), this._commandService.executeCommand(we.id, {
3461
+ mr(n, t, r, s), this._commandService.executeCommand(Le.id, {
3349
3462
  formulaData: n
3350
3463
  });
3351
3464
  }
@@ -3353,40 +3466,40 @@ let Qe = class extends H {
3353
3466
  const { id: e } = i;
3354
3467
  let t = null;
3355
3468
  switch (e) {
3356
- case Pn.id:
3469
+ case Sn.id:
3357
3470
  t = this._handleMoveRange(i);
3358
3471
  break;
3359
- case vn.id:
3472
+ case Pn.id:
3360
3473
  t = this._handleMoveRows(i);
3361
3474
  break;
3362
- case In.id:
3475
+ case vn.id:
3363
3476
  t = this._handleMoveCols(i);
3364
3477
  break;
3365
- case gn.id:
3478
+ case In.id:
3366
3479
  t = this._handleInsertRow(i);
3367
3480
  break;
3368
- case Rn.id:
3481
+ case gn.id:
3369
3482
  t = this._handleInsertCol(i);
3370
3483
  break;
3371
- case En.id:
3484
+ case Rn.id:
3372
3485
  t = this._handleInsertRangeMoveRight(i);
3373
3486
  break;
3374
- case hn.id:
3487
+ case En.id:
3375
3488
  t = this._handleInsertRangeMoveDown(i);
3376
3489
  break;
3377
- case pn.id:
3490
+ case hn.id:
3378
3491
  t = this._handleRemoveRow(i);
3379
3492
  break;
3380
- case bn.id:
3493
+ case pn.id:
3381
3494
  t = this._handleRemoveCol(i);
3382
3495
  break;
3383
- case dn.id:
3496
+ case bn.id:
3384
3497
  t = this._handleDeleteRangeMoveUp(i);
3385
3498
  break;
3386
- case ln.id:
3499
+ case dn.id:
3387
3500
  t = this._handleDeleteRangeMoveLeft(i);
3388
3501
  break;
3389
- case fr.id:
3502
+ case pr.id:
3390
3503
  t = this._handleSetWorksheetName(i);
3391
3504
  break;
3392
3505
  }
@@ -3394,9 +3507,9 @@ let Qe = class extends H {
3394
3507
  const { unitSheetNameMap: n } = this._formulaDataModel.getCalculateData();
3395
3508
  let r = this._formulaDataModel.getFormulaData();
3396
3509
  const a = this._getFormulaReferenceMoveInfo(r, n, t), s = this._currentUniverService.getCurrentUniverSheetInstance(), o = s.getUnitId(), c = s.getActiveSheet().getSheetId(), u = this._selectionManagerService.getSelections(), l = this._formulaDataModel.getArrayFormulaRange(), d = this._formulaDataModel.getArrayFormulaCellData();
3397
- let m = ze(l, i, o, c, u);
3398
- m = Is(m, o, c);
3399
- const b = ze(
3510
+ let m = Ue(l, i, o, c, u);
3511
+ m = Cs(m, o, c);
3512
+ const b = Ue(
3400
3513
  d,
3401
3514
  i,
3402
3515
  o,
@@ -3404,7 +3517,7 @@ let Qe = class extends H {
3404
3517
  u
3405
3518
  );
3406
3519
  this._commandService.executeCommand(
3407
- ht.id,
3520
+ It.id,
3408
3521
  {
3409
3522
  arrayFormulaRange: m,
3410
3523
  arrayFormulaCellData: b
@@ -3412,9 +3525,9 @@ let Qe = class extends H {
3412
3525
  {
3413
3526
  local: !0
3414
3527
  }
3415
- ), r = ze(r, i, o, c, u);
3416
- const h = ze(a, i, o, c, u);
3417
- return this._commandService.executeCommand(we.id, {
3528
+ ), r = Ue(r, i, o, c, u);
3529
+ const h = Ue(a, i, o, c, u);
3530
+ return this._commandService.executeCommand(Le.id, {
3418
3531
  formulaData: this._formulaDataModel.getFormulaData()
3419
3532
  }), this._getUpdateFormulaMutations(r, h);
3420
3533
  }
@@ -3448,13 +3561,13 @@ let Qe = class extends H {
3448
3561
  startColumn: 0,
3449
3562
  endRow: t,
3450
3563
  endColumn: s.getColumnCount() - 1,
3451
- rangeType: he.ROW
3564
+ rangeType: Ee.ROW
3452
3565
  }, u = {
3453
3566
  startRow: n,
3454
3567
  startColumn: 0,
3455
3568
  endRow: n,
3456
3569
  endColumn: s.getColumnCount() - 1,
3457
- rangeType: he.ROW
3570
+ rangeType: Ee.ROW
3458
3571
  };
3459
3572
  return {
3460
3573
  type: 0,
@@ -3473,13 +3586,13 @@ let Qe = class extends H {
3473
3586
  startColumn: t,
3474
3587
  endRow: s.getRowCount() - 1,
3475
3588
  endColumn: t,
3476
- rangeType: he.COLUMN
3589
+ rangeType: Ee.COLUMN
3477
3590
  }, u = {
3478
3591
  startRow: 0,
3479
3592
  startColumn: n,
3480
3593
  endRow: s.getRowCount() - 1,
3481
3594
  endColumn: n,
3482
- rangeType: he.COLUMN
3595
+ rangeType: Ee.COLUMN
3483
3596
  };
3484
3597
  return {
3485
3598
  type: 0,
@@ -3607,11 +3720,11 @@ let Qe = class extends H {
3607
3720
  const l = new x(i[s][u]), d = new x(o[u]), m = new x();
3608
3721
  d.forValue((f, R, p) => {
3609
3722
  var S;
3610
- const g = (p == null ? void 0 : p.f) || "", C = ((S = l.getValue(f, R)) == null ? void 0 : S.f) || "";
3611
- Ee(g) && (Ee(C) && g !== C ? m.setValue(f, R, { f: g }) : m.setValue(f, R, { f: g, si: null }));
3723
+ const I = (p == null ? void 0 : p.f) || "", C = ((S = l.getValue(f, R)) == null ? void 0 : S.f) || "";
3724
+ Re(I) && (Re(C) && I !== C ? m.setValue(f, R, { f: I }) : m.setValue(f, R, { f: I, si: null }));
3612
3725
  });
3613
3726
  const b = m.getData();
3614
- if (G.isEmptyObject(b))
3727
+ if (K.isEmptyObject(b))
3615
3728
  continue;
3616
3729
  const h = {
3617
3730
  subUnitId: u,
@@ -3622,10 +3735,10 @@ let Qe = class extends H {
3622
3735
  id: ie.id,
3623
3736
  params: h
3624
3737
  });
3625
- const I = mn(r, h);
3738
+ const g = fn(r, h);
3626
3739
  n.push({
3627
3740
  id: ie.id,
3628
- params: I
3741
+ params: g
3629
3742
  });
3630
3743
  }
3631
3744
  }
@@ -3635,7 +3748,12 @@ let Qe = class extends H {
3635
3748
  };
3636
3749
  }
3637
3750
  _getFormulaReferenceMoveInfo(i, e, t) {
3638
- const n = Object.keys(i), r = {};
3751
+ if (i == null)
3752
+ return {};
3753
+ const n = Object.keys(i);
3754
+ if (n.length === 0)
3755
+ return {};
3756
+ const r = {};
3639
3757
  for (const a of n) {
3640
3758
  const s = i[a], o = Object.keys(s);
3641
3759
  r[a] == null && (r[a] = {});
@@ -3645,55 +3763,55 @@ let Qe = class extends H {
3645
3763
  var v;
3646
3764
  if (!b)
3647
3765
  return !0;
3648
- const { f: h, x: I, y: f, si: R } = b, p = this._lexerTreeBuilder.sequenceNodesBuilder(h);
3766
+ const { f: h, x: g, y: f, si: R } = b, p = this._lexerTreeBuilder.sequenceNodesBuilder(h);
3649
3767
  if (p == null)
3650
3768
  return !0;
3651
- let g = !1;
3769
+ let I = !1;
3652
3770
  const C = [];
3653
- for (let P = 0, _ = p.length; P < _; P++) {
3654
- const N = p[P];
3655
- if (typeof N == "string" || N.nodeType !== W.REFERENCE)
3771
+ for (let B = 0, _ = p.length; B < _; B++) {
3772
+ const A = p[B];
3773
+ if (typeof A == "string" || A.nodeType !== G.REFERENCE)
3656
3774
  continue;
3657
- const { token: B } = N, T = Re(B), { range: D, sheetName: $, unitId: U } = T, ce = U == null || U.length === 0 ? a : U, be = (v = e == null ? void 0 : e[ce]) == null ? void 0 : v[$], ue = {
3775
+ const { token: P } = A, T = ge(P), { range: D, sheetName: j, unitId: U } = T, ce = U == null || U.length === 0 ? a : U, be = (v = e == null ? void 0 : e[ce]) == null ? void 0 : v[j], ue = {
3658
3776
  range: D,
3659
3777
  sheetId: be,
3660
3778
  unitId: U,
3661
- sheetName: $,
3662
- refOffsetX: I || 0,
3779
+ sheetName: j,
3780
+ refOffsetX: g || 0,
3663
3781
  refOffsetY: f || 0
3664
3782
  };
3665
- let Me = null;
3783
+ let Oe = null;
3666
3784
  if (t.type === 9) {
3667
3785
  const {
3668
- unitId: io,
3669
- sheetId: Wn,
3670
- sheetName: xt
3786
+ unitId: uo,
3787
+ sheetId: Gn,
3788
+ sheetName: zt
3671
3789
  } = t;
3672
- if (xt == null || be == null || be.length === 0 || Wn !== be)
3790
+ if (zt == null || be == null || be.length === 0 || Gn !== be)
3673
3791
  continue;
3674
- Me = Ve({
3792
+ Oe = qe({
3675
3793
  range: D,
3676
- sheetName: xt,
3794
+ sheetName: zt,
3677
3795
  unitId: U
3678
3796
  });
3679
3797
  } else
3680
- Me = this._getNewRangeByMoveParam(
3798
+ Oe = this._getNewRangeByMoveParam(
3681
3799
  ue,
3682
3800
  t,
3683
3801
  a,
3684
3802
  c
3685
3803
  );
3686
- Me != null && (p[P] = {
3687
- ...N,
3688
- token: Me
3689
- }, g = !0, C.push(P));
3804
+ Oe != null && (p[B] = {
3805
+ ...A,
3806
+ token: Oe
3807
+ }, I = !0, C.push(B));
3690
3808
  }
3691
- if (!g)
3809
+ if (!I)
3692
3810
  return !0;
3693
- const S = this._updateRefOffset(p, C, I, f);
3811
+ const S = this._updateRefOffset(p, C, g, f);
3694
3812
  l.setValue(d, m, {
3695
- f: `=${cn(S)}`,
3696
- x: I,
3813
+ f: `=${un(S)}`,
3814
+ x: g,
3697
3815
  y: f,
3698
3816
  si: R
3699
3817
  });
@@ -3709,7 +3827,7 @@ let Qe = class extends H {
3709
3827
  unitId: m,
3710
3828
  sheetName: b,
3711
3829
  refOffsetX: h,
3712
- refOffsetY: I
3830
+ refOffsetY: g
3713
3831
  } = i;
3714
3832
  if (!this._checkIsSameUnitAndSheet(
3715
3833
  a,
@@ -3720,139 +3838,139 @@ let Qe = class extends H {
3720
3838
  d
3721
3839
  ))
3722
3840
  return;
3723
- const f = Ue.moveOffset(l, h, I);
3841
+ const f = Ve.moveOffset(l, h, g);
3724
3842
  let R = null;
3725
3843
  if (r === 0) {
3726
3844
  if (c == null || u == null)
3727
3845
  return;
3728
- const p = this._checkMoveEdge(f, c), g = Ue.getIntersects(f, c);
3729
- if (g == null)
3846
+ const p = this._checkMoveEdge(f, c), I = Ve.getIntersects(f, c);
3847
+ if (I == null)
3730
3848
  return;
3731
- const C = lr(
3732
- { id: J.MoveRangeCommandId, params: { toRange: u, fromRange: c } },
3733
- g
3734
- ), S = Z(C, g);
3849
+ const C = hr(
3850
+ { id: Z.MoveRangeCommandId, params: { toRange: u, fromRange: c } },
3851
+ I
3852
+ ), S = ee(C, I);
3735
3853
  if (S == null)
3736
3854
  return;
3737
- R = this._getMoveNewRange(p, S, c, u, f, g);
3855
+ R = this._getMoveNewRange(p, S, c, u, f, I);
3738
3856
  }
3739
3857
  if (o != null) {
3740
3858
  if (r === 1) {
3741
- const p = dr(
3859
+ const p = Er(
3742
3860
  {
3743
- id: J.InsertRowCommandId,
3861
+ id: Z.InsertRowCommandId,
3744
3862
  params: { range: o, unitId: "", subUnitId: "", direction: M.DOWN }
3745
3863
  },
3746
3864
  f
3747
- ), g = Z(p, f);
3748
- if (g == null)
3865
+ ), I = ee(p, f);
3866
+ if (I == null)
3749
3867
  return;
3750
3868
  R = {
3751
3869
  ...f,
3752
- ...g
3870
+ ...I
3753
3871
  };
3754
3872
  } else if (r === 2) {
3755
- const p = br(
3873
+ const p = Rr(
3756
3874
  {
3757
- id: J.InsertColCommandId,
3875
+ id: Z.InsertColCommandId,
3758
3876
  params: { range: o, unitId: "", subUnitId: "", direction: M.RIGHT }
3759
3877
  },
3760
3878
  f
3761
- ), g = Z(p, f);
3762
- if (g == null)
3879
+ ), I = ee(p, f);
3880
+ if (I == null)
3763
3881
  return;
3764
3882
  R = {
3765
3883
  ...f,
3766
- ...g
3884
+ ...I
3767
3885
  };
3768
3886
  } else if (r === 3) {
3769
- const p = pr(
3887
+ const p = gr(
3770
3888
  {
3771
- id: J.RemoveRowCommandId,
3889
+ id: Z.RemoveRowCommandId,
3772
3890
  params: { range: o }
3773
3891
  },
3774
3892
  f
3775
- ), g = Z(p, f);
3776
- if (g == null)
3893
+ ), I = ee(p, f);
3894
+ if (I == null)
3777
3895
  return;
3778
3896
  R = {
3779
3897
  ...f,
3780
- ...g
3898
+ ...I
3781
3899
  };
3782
3900
  } else if (r === 4) {
3783
- const p = hr(
3901
+ const p = Ir(
3784
3902
  {
3785
- id: J.RemoveColCommandId,
3903
+ id: Z.RemoveColCommandId,
3786
3904
  params: { range: o }
3787
3905
  },
3788
3906
  f
3789
- ), g = Z(p, f);
3790
- if (g == null)
3907
+ ), I = ee(p, f);
3908
+ if (I == null)
3791
3909
  return;
3792
3910
  R = {
3793
3911
  ...f,
3794
- ...g
3912
+ ...I
3795
3913
  };
3796
3914
  } else if (r === 5) {
3797
- const p = Er(
3915
+ const p = vr(
3798
3916
  {
3799
- id: J.DeleteRangeMoveLeftCommandId,
3917
+ id: Z.DeleteRangeMoveLeftCommandId,
3800
3918
  params: { range: o }
3801
3919
  },
3802
3920
  f
3803
- ), g = Z(p, f);
3804
- if (g == null)
3921
+ ), I = ee(p, f);
3922
+ if (I == null)
3805
3923
  return;
3806
3924
  R = {
3807
3925
  ...f,
3808
- ...g
3926
+ ...I
3809
3927
  };
3810
3928
  } else if (r === 6) {
3811
- const p = Rr(
3929
+ const p = Pr(
3812
3930
  {
3813
- id: J.DeleteRangeMoveUpCommandId,
3931
+ id: Z.DeleteRangeMoveUpCommandId,
3814
3932
  params: { range: o }
3815
3933
  },
3816
3934
  f
3817
- ), g = Z(p, f);
3818
- if (g == null)
3935
+ ), I = ee(p, f);
3936
+ if (I == null)
3819
3937
  return;
3820
3938
  R = {
3821
3939
  ...f,
3822
- ...g
3940
+ ...I
3823
3941
  };
3824
3942
  } else if (r === 7) {
3825
- const p = gr(
3943
+ const p = Sr(
3826
3944
  {
3827
- id: J.InsertRangeMoveDownCommandId,
3945
+ id: Z.InsertRangeMoveDownCommandId,
3828
3946
  params: { range: o }
3829
3947
  },
3830
3948
  f
3831
- ), g = Z(p, f);
3832
- if (g == null)
3949
+ ), I = ee(p, f);
3950
+ if (I == null)
3833
3951
  return;
3834
3952
  R = {
3835
3953
  ...f,
3836
- ...g
3954
+ ...I
3837
3955
  };
3838
3956
  } else if (r === 8) {
3839
- const p = Ir(
3957
+ const p = Br(
3840
3958
  {
3841
- id: J.InsertRangeMoveRightCommandId,
3959
+ id: Z.InsertRangeMoveRightCommandId,
3842
3960
  params: { range: o }
3843
3961
  },
3844
3962
  f
3845
- ), g = Z(p, f);
3846
- if (g == null)
3963
+ ), I = ee(p, f);
3964
+ if (I == null)
3847
3965
  return;
3848
3966
  R = {
3849
3967
  ...f,
3850
- ...g
3968
+ ...I
3851
3969
  };
3852
3970
  }
3853
3971
  }
3854
3972
  if (R != null)
3855
- return Ve({
3973
+ return qe({
3856
3974
  range: R,
3857
3975
  sheetName: b,
3858
3976
  unitId: m
@@ -3873,14 +3991,14 @@ let Qe = class extends H {
3873
3991
  const r = [];
3874
3992
  for (let a = 0, s = i.length; a < s; a++) {
3875
3993
  const o = i[a];
3876
- if (typeof o == "string" || o.nodeType !== W.REFERENCE || e.includes(a)) {
3994
+ if (typeof o == "string" || o.nodeType !== G.REFERENCE || e.includes(a)) {
3877
3995
  r.push(o);
3878
3996
  continue;
3879
3997
  }
3880
- const { token: c } = o, u = Re(c), { range: l, sheetName: d, unitId: m } = u, b = Ue.moveOffset(l, t, n);
3998
+ const { token: c } = o, u = ge(c), { range: l, sheetName: d, unitId: m } = u, b = Ve.moveOffset(l, t, n);
3881
3999
  r.push({
3882
4000
  ...o,
3883
- token: Ve({
4001
+ token: qe({
3884
4002
  range: b,
3885
4003
  unitId: m,
3886
4004
  sheetName: d
@@ -3929,68 +4047,68 @@ let Qe = class extends H {
3929
4047
  startColumn: d,
3930
4048
  endRow: m,
3931
4049
  endColumn: b
3932
- } = t, { startRow: h, startColumn: I, endRow: f, endColumn: R } = n, {
4050
+ } = t, { startRow: h, startColumn: g, endRow: f, endColumn: R } = n, {
3933
4051
  startRow: p,
3934
- endRow: g,
4052
+ endRow: I,
3935
4053
  startColumn: C,
3936
4054
  endColumn: S
3937
4055
  } = a, {
3938
4056
  startRow: v,
3939
- endRow: P,
4057
+ endRow: B,
3940
4058
  startColumn: _,
3941
- endColumn: N
3942
- } = r, B = { ...r };
4059
+ endColumn: A
4060
+ } = r, P = { ...r };
3943
4061
  if (i === 0)
3944
- if (c === _ && u === N)
4062
+ if (c === _ && u === A)
3945
4063
  if (s < v)
3946
- B.startRow = s;
3947
- else if (o < P)
3948
- B.startRow = s;
3949
- else if (o >= P && h <= P)
3950
- B.startRow = m + 1, B.endRow = o;
4064
+ P.startRow = s;
4065
+ else if (o < B)
4066
+ P.startRow = s;
4067
+ else if (o >= B && h <= B)
4068
+ P.startRow = m + 1, P.endRow = o;
3951
4069
  else
3952
4070
  return;
3953
4071
  else
3954
4072
  return;
3955
4073
  else if (i === 1)
3956
- if (c === _ && u === N)
3957
- if (o > P)
3958
- B.endRow = o;
4074
+ if (c === _ && u === A)
4075
+ if (o > B)
4076
+ P.endRow = o;
3959
4077
  else if (s > v)
3960
- B.endRow = o;
4078
+ P.endRow = o;
3961
4079
  else if (s <= v && f >= v)
3962
- B.endRow = l + 1, B.startRow = s;
4080
+ P.endRow = l + 1, P.startRow = s;
3963
4081
  else
3964
4082
  return;
3965
4083
  else
3966
4084
  return;
3967
4085
  else if (i === 2)
3968
- if (s === v && o === P)
4086
+ if (s === v && o === B)
3969
4087
  if (c < _)
3970
- B.startColumn = c;
3971
- else if (u < N)
3972
- B.startColumn = c;
3973
- else if (u >= N && I <= N)
3974
- B.startColumn = b + 1, B.endColumn = u;
4088
+ P.startColumn = c;
4089
+ else if (u < A)
4090
+ P.startColumn = c;
4091
+ else if (u >= A && g <= A)
4092
+ P.startColumn = b + 1, P.endColumn = u;
3975
4093
  else
3976
4094
  return;
3977
4095
  else
3978
4096
  return;
3979
4097
  else if (i === 3)
3980
- if (s === v && o === P)
3981
- if (u > N)
3982
- B.endColumn = u;
4098
+ if (s === v && o === B)
4099
+ if (u > A)
4100
+ P.endColumn = u;
3983
4101
  else if (c > _)
3984
- B.endColumn = u;
4102
+ P.endColumn = u;
3985
4103
  else if (c <= _ && R >= _)
3986
- B.endColumn = d + 1, B.startColumn = c;
4104
+ P.endColumn = d + 1, P.startColumn = c;
3987
4105
  else
3988
4106
  return;
3989
4107
  else
3990
4108
  return;
3991
4109
  else
3992
- (i === 4 || (I <= S + 1 && R >= N || I <= _ && R >= C - 1) && h <= v && f >= P || (h <= g + 1 && f >= P || h <= v && f >= p - 1) && I <= _ && R >= N) && (B.startRow = s, B.startColumn = c, B.endRow = o, B.endColumn = u);
3993
- return B;
4110
+ (i === 4 || (g <= S + 1 && R >= A || g <= _ && R >= C - 1) && h <= v && f >= B || (h <= I + 1 && f >= B || h <= v && f >= p - 1) && g <= _ && R >= A) && (P.startRow = s, P.startColumn = c, P.endRow = o, P.endColumn = u);
4111
+ return P;
3994
4112
  }
3995
4113
  _getInsertNewRange() {
3996
4114
  }
@@ -4002,17 +4120,17 @@ let Qe = class extends H {
4002
4120
  };
4003
4121
  }
4004
4122
  };
4005
- Qe = Ss([
4006
- K(Y.Ready, Qe),
4007
- le(0, ge),
4008
- le(1, Q),
4009
- le(2, y(Ie)),
4010
- le(3, y(tt)),
4011
- le(4, y(kt)),
4012
- le(5, y(Ct)),
4013
- le(6, y(et))
4014
- ], Qe);
4015
- const Bs = {}, ks = {
4123
+ Je = Ds([
4124
+ X(Q.Ready, Je),
4125
+ le(0, Ie),
4126
+ le(1, J),
4127
+ le(2, y(ve)),
4128
+ le(3, y(nt)),
4129
+ le(4, y(yt)),
4130
+ le(5, y(Tt)),
4131
+ le(6, y(tt))
4132
+ ], Je);
4133
+ const ys = {}, Ts = {
4016
4134
  BETADIST: {
4017
4135
  description: "Returns the beta cumulative distribution function",
4018
4136
  abstract: "Returns the beta cumulative distribution function",
@@ -4587,7 +4705,7 @@ const Bs = {}, ks = {
4587
4705
  number2: { name: "number2", detail: "second" }
4588
4706
  }
4589
4707
  }
4590
- }, Cs = {
4708
+ }, As = {
4591
4709
  CUBEKPIMEMBER: {
4592
4710
  description: "Returns a key performance indicator (KPI) property and displays the KPI name in the cell. A KPI is a quantifiable measurement, such as monthly gross profit or quarterly employee turnover, that is used to monitor an organization's performance.",
4593
4711
  abstract: "Returns a key performance indicator (KPI) property and displays the KPI name in the cell. A KPI is a quantifiable measurement, such as monthly gross profit or quarterly employee turnover, that is used to monitor an organization's performance.",
@@ -4686,7 +4804,7 @@ const Bs = {}, ks = {
4686
4804
  number2: { name: "number2", detail: "second" }
4687
4805
  }
4688
4806
  }
4689
- }, _s = {
4807
+ }, Ns = {
4690
4808
  DAVERAGE: {
4691
4809
  description: "Returns the average of selected database entries",
4692
4810
  abstract: "Returns the average of selected database entries",
@@ -4855,7 +4973,7 @@ const Bs = {}, ks = {
4855
4973
  number2: { name: "number2", detail: "second" }
4856
4974
  }
4857
4975
  }
4858
- }, Ds = {
4976
+ }, Ms = {
4859
4977
  DATE: {
4860
4978
  description: "Returns the serial number of a particular date",
4861
4979
  abstract: "Returns the serial number of a particular date",
@@ -5206,7 +5324,7 @@ const Bs = {}, ks = {
5206
5324
  number2: { name: "number2", detail: "second" }
5207
5325
  }
5208
5326
  }
5209
- }, ys = {
5327
+ }, Os = {
5210
5328
  BESSELI: {
5211
5329
  description: "Returns the modified Bessel function In(x)",
5212
5330
  abstract: "Returns the modified Bessel function In(x)",
@@ -5963,7 +6081,7 @@ const Bs = {}, ks = {
5963
6081
  number2: { name: "number2", detail: "second" }
5964
6082
  }
5965
6083
  }
5966
- }, Ts = {
6084
+ }, xs = {
5967
6085
  ACCRINT: {
5968
6086
  description: "Returns the accrued interest for a security that pays periodic interest",
5969
6087
  abstract: "Returns the accrued interest for a security that pays periodic interest",
@@ -6734,7 +6852,7 @@ const Bs = {}, ks = {
6734
6852
  number2: { name: "number2", detail: "second" }
6735
6853
  }
6736
6854
  }
6737
- }, As = {
6855
+ }, ws = {
6738
6856
  CELL: {
6739
6857
  description: "Returns information about the formatting, location, or contents of a cell",
6740
6858
  abstract: "Returns information about the formatting, location, or contents of a cell",
@@ -7029,7 +7147,7 @@ const Bs = {}, ks = {
7029
7147
  number2: { name: "number2", detail: "second" }
7030
7148
  }
7031
7149
  }
7032
- }, Ns = {
7150
+ }, Ls = {
7033
7151
  AND: {
7034
7152
  description: "Returns TRUE if all of its arguments are TRUE",
7035
7153
  abstract: "Returns TRUE if all of its arguments are TRUE",
@@ -7180,8 +7298,12 @@ const Bs = {}, ks = {
7180
7298
  }
7181
7299
  ],
7182
7300
  functionParameter: {
7183
- number1: { name: "number1", detail: "first" },
7184
- number2: { name: "number2", detail: "second" }
7301
+ number1: { name: "rows", detail: "The number of rows in the array. Must be greater than zero." },
7302
+ number2: { name: "cols", detail: "The number of columns in the array. Must be greater than zero." },
7303
+ value3: {
7304
+ name: "lambda",
7305
+ detail: " A LAMBDA that is called to create the array. The LAMBDA takes two parameters: row (The row index of the array), col (The column index of the array)."
7306
+ }
7185
7307
  }
7186
7308
  },
7187
7309
  MAP: {
@@ -7296,7 +7418,7 @@ const Bs = {}, ks = {
7296
7418
  number2: { name: "number2", detail: "second" }
7297
7419
  }
7298
7420
  }
7299
- }, Ms = {
7421
+ }, Fs = {
7300
7422
  ADDRESS: {
7301
7423
  description: "Returns a reference as text to a single cell in a worksheet",
7302
7424
  abstract: "Returns a reference as text to a single cell in a worksheet",
@@ -7815,9 +7937,9 @@ const Bs = {}, ks = {
7815
7937
  number2: { name: "number2", detail: "second" }
7816
7938
  }
7817
7939
  }
7818
- }, Os = {
7940
+ }, zs = {
7819
7941
  ABS: {
7820
- description: "Returns the absolute value of a number",
7942
+ description: "Returns the absolute value of a number. The absolute value of a number is the number without its sign.",
7821
7943
  abstract: "Returns the absolute value of a number",
7822
7944
  links: [
7823
7945
  {
@@ -7826,12 +7948,11 @@ const Bs = {}, ks = {
7826
7948
  }
7827
7949
  ],
7828
7950
  functionParameter: {
7829
- number1: { name: "number1", detail: "first" },
7830
- number2: { name: "number2", detail: "second" }
7951
+ number: { name: "number", detail: "The real number of which you want the absolute value." }
7831
7952
  }
7832
7953
  },
7833
7954
  ACOS: {
7834
- description: "Returns the arccosine of a number",
7955
+ description: "Returns the arccosine, or inverse cosine, of a number. The arccosine is the angle whose cosine is number. The returned angle is given in radians in the range 0 (zero) to pi.",
7835
7956
  abstract: "Returns the arccosine of a number",
7836
7957
  links: [
7837
7958
  {
@@ -7840,12 +7961,11 @@ const Bs = {}, ks = {
7840
7961
  }
7841
7962
  ],
7842
7963
  functionParameter: {
7843
- number1: { name: "number1", detail: "first" },
7844
- number2: { name: "number2", detail: "second" }
7964
+ number: { name: "number", detail: "The cosine of the angle you want and must be from -1 to 1." }
7845
7965
  }
7846
7966
  },
7847
7967
  ACOSH: {
7848
- description: "Returns the inverse hyperbolic cosine of a number",
7968
+ description: "Returns the inverse hyperbolic cosine of a number. The number must be greater than or equal to 1. The inverse hyperbolic cosine is the value whose hyperbolic cosine is number, so ACOSH(COSH(number)) equals number.",
7849
7969
  abstract: "Returns the inverse hyperbolic cosine of a number",
7850
7970
  links: [
7851
7971
  {
@@ -7854,12 +7974,11 @@ const Bs = {}, ks = {
7854
7974
  }
7855
7975
  ],
7856
7976
  functionParameter: {
7857
- number1: { name: "number1", detail: "first" },
7858
- number2: { name: "number2", detail: "second" }
7977
+ number: { name: "number", detail: "Any real number equal to or greater than 1." }
7859
7978
  }
7860
7979
  },
7861
7980
  ACOT: {
7862
- description: "Returns the arccotangent of a number",
7981
+ description: "Returns the principal value of the arccotangent, or inverse cotangent, of a number.",
7863
7982
  abstract: "Returns the arccotangent of a number",
7864
7983
  links: [
7865
7984
  {
@@ -7868,8 +7987,10 @@ const Bs = {}, ks = {
7868
7987
  }
7869
7988
  ],
7870
7989
  functionParameter: {
7871
- number1: { name: "number1", detail: "first" },
7872
- number2: { name: "number2", detail: "second" }
7990
+ number: {
7991
+ name: "number",
7992
+ detail: "Number is the cotangent of the angle you want. This must be a real number."
7993
+ }
7873
7994
  }
7874
7995
  },
7875
7996
  ACOTH: {
@@ -8980,7 +9101,7 @@ const Bs = {}, ks = {
8980
9101
  number2: { name: "number2", detail: "second" }
8981
9102
  }
8982
9103
  }
8983
- }, xs = {
9104
+ }, Us = {
8984
9105
  AVEDEV: {
8985
9106
  description: "Returns the average of the absolute deviations of data points from their mean",
8986
9107
  abstract: "Returns the average of the absolute deviations of data points from their mean",
@@ -10566,7 +10687,7 @@ const Bs = {}, ks = {
10566
10687
  number2: { name: "number2", detail: "second" }
10567
10688
  }
10568
10689
  }
10569
- }, ws = {
10690
+ }, Vs = {
10570
10691
  ASC: {
10571
10692
  description: "Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters",
10572
10693
  abstract: "Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters",
@@ -11225,7 +11346,7 @@ const Bs = {}, ks = {
11225
11346
  number2: { name: "number2", detail: "second" }
11226
11347
  }
11227
11348
  }
11228
- }, Fs = {}, Ls = {
11349
+ }, qs = {}, Hs = {
11229
11350
  ENCODEURL: {
11230
11351
  description: "Returns a URL-encoded string",
11231
11352
  abstract: "Returns a URL-encoded string",
@@ -11268,7 +11389,7 @@ const Bs = {}, ks = {
11268
11389
  number2: { name: "number2", detail: "second" }
11269
11390
  }
11270
11391
  }
11271
- }, go = {
11392
+ }, Bo = {
11272
11393
  formula: {
11273
11394
  insert: {
11274
11395
  tooltip: "Functions",
@@ -11280,21 +11401,21 @@ const Bs = {}, ks = {
11280
11401
  more: "More Functions..."
11281
11402
  },
11282
11403
  functionList: {
11283
- ...Ts,
11284
- ...Ds,
11285
- ...Os,
11286
11404
  ...xs,
11287
11405
  ...Ms,
11288
- ..._s,
11289
- ...ws,
11406
+ ...zs,
11407
+ ...Us,
11408
+ ...Fs,
11290
11409
  ...Ns,
11410
+ ...Vs,
11411
+ ...Ls,
11412
+ ...ws,
11413
+ ...Os,
11291
11414
  ...As,
11415
+ ...Ts,
11416
+ ...Hs,
11292
11417
  ...ys,
11293
- ...Cs,
11294
- ...ks,
11295
- ...Ls,
11296
- ...Bs,
11297
- ...Fs
11418
+ ...qs
11298
11419
  },
11299
11420
  prompt: {
11300
11421
  helpExample: "EXAMPLE",
@@ -11331,7 +11452,7 @@ const Bs = {}, ks = {
11331
11452
  pasteFormula: "Paste Formula"
11332
11453
  }
11333
11454
  }
11334
- }, zs = {}, Us = {
11455
+ }, $s = {}, js = {
11335
11456
  BETADIST: {
11336
11457
  description: "返回 beta 累积分布函数",
11337
11458
  abstract: "返回 beta 累积分布函数",
@@ -11906,7 +12027,7 @@ const Bs = {}, ks = {
11906
12027
  number2: { name: "number2", detail: "second" }
11907
12028
  }
11908
12029
  }
11909
- }, Vs = {
12030
+ }, Ws = {
11910
12031
  CUBEKPIMEMBER: {
11911
12032
  description: "返回重要性能指示器 (KPI) 属性,并在单元格中显示 KPI 名称。 KPI 是一种用于监控单位绩效的可计量度量值,如每月总利润或季度员工调整。",
11912
12033
  abstract: "返回重要性能指示器 (KPI) 属性,并在单元格中显示 KPI 名称。 KPI 是一种用于监控单位绩效的可计量度量值,如每月总利润或季度员工调整。",
@@ -12005,7 +12126,7 @@ const Bs = {}, ks = {
12005
12126
  number2: { name: "number2", detail: "second" }
12006
12127
  }
12007
12128
  }
12008
- }, qs = {
12129
+ }, Gs = {
12009
12130
  DAVERAGE: {
12010
12131
  description: "返回所选数据库条目的平均值",
12011
12132
  abstract: "返回所选数据库条目的平均值",
@@ -12174,7 +12295,7 @@ const Bs = {}, ks = {
12174
12295
  number2: { name: "number2", detail: "second" }
12175
12296
  }
12176
12297
  }
12177
- }, Hs = {
12298
+ }, Ks = {
12178
12299
  DATE: {
12179
12300
  description: "返回特定日期的序列号",
12180
12301
  abstract: "返回特定日期的序列号",
@@ -12525,7 +12646,7 @@ const Bs = {}, ks = {
12525
12646
  number2: { name: "number2", detail: "second" }
12526
12647
  }
12527
12648
  }
12528
- }, $s = {
12649
+ }, Ys = {
12529
12650
  BESSELI: {
12530
12651
  description: "返回修正的贝赛耳函数 In(x)",
12531
12652
  abstract: "返回修正的贝赛耳函数 In(x)",
@@ -13282,7 +13403,7 @@ const Bs = {}, ks = {
13282
13403
  number2: { name: "number2", detail: "second" }
13283
13404
  }
13284
13405
  }
13285
- }, js = {
13406
+ }, Xs = {
13286
13407
  ACCRINT: {
13287
13408
  description: "返回定期支付利息的债券的应计利息",
13288
13409
  abstract: "返回定期支付利息的债券的应计利息",
@@ -14053,7 +14174,7 @@ const Bs = {}, ks = {
14053
14174
  number2: { name: "number2", detail: "second" }
14054
14175
  }
14055
14176
  }
14056
- }, Ws = {
14177
+ }, Qs = {
14057
14178
  CELL: {
14058
14179
  description: "返回有关单元格格式、位置或内容的信息",
14059
14180
  abstract: "返回有关单元格格式、位置或内容的信息",
@@ -14348,7 +14469,7 @@ const Bs = {}, ks = {
14348
14469
  number2: { name: "number2", detail: "second" }
14349
14470
  }
14350
14471
  }
14351
- }, Gs = {
14472
+ }, Js = {
14352
14473
  AND: {
14353
14474
  description: "如果其所有参数均为 TRUE,则返回 TRUE",
14354
14475
  abstract: "如果其所有参数均为 TRUE,则返回 TRUE",
@@ -14499,8 +14620,12 @@ const Bs = {}, ks = {
14499
14620
  }
14500
14621
  ],
14501
14622
  functionParameter: {
14502
- number1: { name: "number1", detail: "first" },
14503
- number2: { name: "number2", detail: "second" }
14623
+ number1: { name: "rows", detail: "数组中的行数。 必须大于零" },
14624
+ number2: { name: "cols", detail: "数组中的列数。 必须大于零" },
14625
+ value3: {
14626
+ name: "lambda",
14627
+ detail: "调用 LAMBDA 来创建数组。 LAMBDA 接受两个参数:row数组的行索引, col数组的列索引"
14628
+ }
14504
14629
  }
14505
14630
  },
14506
14631
  MAP: {
@@ -14615,7 +14740,7 @@ const Bs = {}, ks = {
14615
14740
  number2: { name: "number2", detail: "second" }
14616
14741
  }
14617
14742
  }
14618
- }, Xs = {
14743
+ }, Zs = {
14619
14744
  ADDRESS: {
14620
14745
  description: "以文本形式将引用值返回到工作表的单个单元格",
14621
14746
  abstract: "以文本形式将引用值返回到工作表的单个单元格",
@@ -15134,9 +15259,9 @@ const Bs = {}, ks = {
15134
15259
  number2: { name: "number2", detail: "second" }
15135
15260
  }
15136
15261
  }
15137
- }, Ks = {
15262
+ }, eo = {
15138
15263
  ABS: {
15139
- description: "返回数字的绝对值",
15264
+ description: "返回数字的绝对值。一个数字的绝对值是该数字不带其符号的形式。",
15140
15265
  abstract: "返回数字的绝对值",
15141
15266
  links: [
15142
15267
  {
@@ -15145,12 +15270,11 @@ const Bs = {}, ks = {
15145
15270
  }
15146
15271
  ],
15147
15272
  functionParameter: {
15148
- number1: { name: "number1", detail: "first" },
15149
- number2: { name: "number2", detail: "second" }
15273
+ number: { name: "数值", detail: "需要计算其绝对值的实数。" }
15150
15274
  }
15151
15275
  },
15152
15276
  ACOS: {
15153
- description: "返回数字的反余弦值",
15277
+ description: "返回数字的反余弦值。 反余弦值是指余弦值为 number 的角度。 返回的角度以弧度表示,弧度值在 0(零)到 pi 之间。",
15154
15278
  abstract: "返回数字的反余弦值",
15155
15279
  links: [
15156
15280
  {
@@ -15159,12 +15283,11 @@ const Bs = {}, ks = {
15159
15283
  }
15160
15284
  ],
15161
15285
  functionParameter: {
15162
- number1: { name: "number1", detail: "first" },
15163
- number2: { name: "number2", detail: "second" }
15286
+ number: { name: "数值", detail: "所求角度的余弦值,必须介于 -1 到 1 之间。" }
15164
15287
  }
15165
15288
  },
15166
15289
  ACOSH: {
15167
- description: "返回数字的反双曲余弦值",
15290
+ description: "返回数字的反双曲余弦值。 该数字必须大于或等于 1。 反双曲余弦值是指双曲余弦值为 number 的值,因此 ACOSH(COSH(number)) 等于 number。",
15168
15291
  abstract: "返回数字的反双曲余弦值",
15169
15292
  links: [
15170
15293
  {
@@ -15173,12 +15296,11 @@ const Bs = {}, ks = {
15173
15296
  }
15174
15297
  ],
15175
15298
  functionParameter: {
15176
- number1: { name: "number1", detail: "first" },
15177
- number2: { name: "number2", detail: "second" }
15299
+ number: { name: "数值", detail: "大于或等于 1 的任意实数。" }
15178
15300
  }
15179
15301
  },
15180
15302
  ACOT: {
15181
- description: "返回一个数的反余切值",
15303
+ description: "返回数字的反余切值的主值。",
15182
15304
  abstract: "返回一个数的反余切值",
15183
15305
  links: [
15184
15306
  {
@@ -15187,8 +15309,7 @@ const Bs = {}, ks = {
15187
15309
  }
15188
15310
  ],
15189
15311
  functionParameter: {
15190
- number1: { name: "number1", detail: "first" },
15191
- number2: { name: "number2", detail: "second" }
15312
+ number: { name: "数值", detail: "Number 是需要的角度的正切值。 这必须是实数。" }
15192
15313
  }
15193
15314
  },
15194
15315
  ACOTH: {
@@ -16299,7 +16420,7 @@ const Bs = {}, ks = {
16299
16420
  number2: { name: "number2", detail: "second" }
16300
16421
  }
16301
16422
  }
16302
- }, Ys = {
16423
+ }, to = {
16303
16424
  AVEDEV: {
16304
16425
  description: "返回数据点与它们的平均值的绝对偏差平均值",
16305
16426
  abstract: "返回数据点与它们的平均值的绝对偏差平均值",
@@ -17885,7 +18006,7 @@ const Bs = {}, ks = {
17885
18006
  number2: { name: "number2", detail: "second" }
17886
18007
  }
17887
18008
  }
17888
- }, Qs = {
18009
+ }, no = {
17889
18010
  ASC: {
17890
18011
  description: "将字符串中的全角(双字节)英文字母或片假名更改为半角(单字节)字符",
17891
18012
  abstract: "将字符串中的全角(双字节)英文字母或片假名更改为半角(单字节)字符",
@@ -18544,7 +18665,7 @@ const Bs = {}, ks = {
18544
18665
  number2: { name: "number2", detail: "second" }
18545
18666
  }
18546
18667
  }
18547
- }, Js = {}, Zs = {
18668
+ }, ro = {}, io = {
18548
18669
  ENCODEURL: {
18549
18670
  description: "返回 URL 编码的字符串",
18550
18671
  abstract: "返回 URL 编码的字符串",
@@ -18587,7 +18708,7 @@ const Bs = {}, ks = {
18587
18708
  number2: { name: "number2", detail: "second" }
18588
18709
  }
18589
18710
  }
18590
- }, eo = {
18711
+ }, ao = {
18591
18712
  formula: {
18592
18713
  insert: {
18593
18714
  tooltip: "函数",
@@ -18599,21 +18720,21 @@ const Bs = {}, ks = {
18599
18720
  more: "更多函数..."
18600
18721
  },
18601
18722
  functionList: {
18602
- ...js,
18603
- ...Hs,
18604
- ...Ks,
18605
- ...Ys,
18606
18723
  ...Xs,
18607
- ...qs,
18608
- ...Qs,
18724
+ ...Ks,
18725
+ ...eo,
18726
+ ...to,
18727
+ ...Zs,
18609
18728
  ...Gs,
18729
+ ...no,
18730
+ ...Js,
18731
+ ...Qs,
18732
+ ...Ys,
18610
18733
  ...Ws,
18734
+ ...js,
18735
+ ...io,
18611
18736
  ...$s,
18612
- ...Vs,
18613
- ...Us,
18614
- ...Zs,
18615
- ...zs,
18616
- ...Js
18737
+ ...ro
18617
18738
  },
18618
18739
  prompt: {
18619
18740
  helpExample: "示例",
@@ -18651,57 +18772,57 @@ const Bs = {}, ks = {
18651
18772
  }
18652
18773
  }
18653
18774
  };
18654
- var to = Object.defineProperty, no = Object.getOwnPropertyDescriptor, ro = (i, e, t, n) => {
18655
- for (var r = n > 1 ? void 0 : n ? no(e, t) : e, a = i.length - 1, s; a >= 0; a--)
18775
+ var so = Object.defineProperty, oo = Object.getOwnPropertyDescriptor, co = (i, e, t, n) => {
18776
+ for (var r = n > 1 ? void 0 : n ? oo(e, t) : e, a = i.length - 1, s; a >= 0; a--)
18656
18777
  (s = i[a]) && (r = (n ? s(e, t, r) : s(r)) || r);
18657
- return n && r && to(e, t, r), r;
18658
- }, dt = (i, e) => (t, n) => e(t, n, i), bt;
18659
- let rn = (bt = class extends Jn {
18778
+ return n && r && so(e, t, r), r;
18779
+ }, Et = (i, e) => (t, n) => e(t, n, i), Rt;
18780
+ let an = (Rt = class extends er {
18660
18781
  constructor(i, e, t, n) {
18661
- super(Tn), this._config = i, this._injector = e, this._localeService = t, this._currentUniverService = n;
18782
+ super(An), this._config = i, this._injector = e, this._localeService = t, this._currentUniverService = n;
18662
18783
  }
18663
18784
  initialize() {
18664
18785
  this._localeService.load({
18665
- zhCN: eo
18786
+ zhCN: ao
18666
18787
  }), [
18667
18788
  // services
18668
- [de, { useClass: bi }],
18669
- [Ae, { useClass: mi }],
18789
+ [de, { useClass: gi }],
18790
+ [Ne, { useClass: pi }],
18670
18791
  [
18671
- Ot,
18792
+ Ft,
18672
18793
  {
18673
18794
  useFactory: () => {
18674
18795
  var e;
18675
- return this._injector.createInstance(Pt, ((e = this._config) == null ? void 0 : e.description) || []);
18796
+ return this._injector.createInstance(kt, ((e = this._config) == null ? void 0 : e.description) || []);
18676
18797
  }
18677
18798
  // TODO@Dusuhir: initialize config with asynchronous method?
18678
18799
  }
18679
18800
  ],
18680
- [At, { useClass: jr }],
18801
+ [xt, { useClass: Xr }],
18681
18802
  // controllers
18803
+ [Ye],
18682
18804
  [Xe],
18683
18805
  [Ke],
18684
- [Ge],
18685
- [$e],
18686
18806
  [je],
18687
- [He],
18688
- [Ye],
18689
- [Qe],
18690
18807
  [We],
18691
- [qe]
18808
+ [$e],
18809
+ [Qe],
18810
+ [Je],
18811
+ [Ge],
18812
+ [He]
18692
18813
  ].forEach((e) => this._injector.add(e));
18693
18814
  }
18694
18815
  onReady() {
18695
18816
  this.initialize();
18696
18817
  }
18697
- }, k(bt, "type", Zn.Sheet), bt);
18698
- rn = ro([
18699
- dt(1, y(et)),
18700
- dt(2, y(_e)),
18701
- dt(3, ge)
18702
- ], rn);
18818
+ }, k(Rt, "type", tr.Sheet), Rt);
18819
+ an = co([
18820
+ Et(1, y(tt)),
18821
+ Et(2, y(De)),
18822
+ Et(3, Ie)
18823
+ ], an);
18703
18824
  export {
18704
- rn as UniverSheetsFormulaPlugin,
18705
- go as enUS,
18706
- eo as zhCN
18825
+ an as UniverSheetsFormulaPlugin,
18826
+ Bo as enUS,
18827
+ ao as zhCN
18707
18828
  };