@univerjs/sheets-formula 0.2.4-alpha.0 → 0.2.4

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,13 +1,15 @@
1
1
  var ui = Object.defineProperty;
2
2
  var mi = (a, e, t) => e in a ? ui(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
3
  var g = (a, e, t) => mi(a, typeof e != "symbol" ? e + "" : e, t);
4
- import { Disposable as re, ObjectMatrix as z, Dimension as xn, OnLifecycle as Le, LifecycleStages as Ae, Inject as U, IUniverInstanceService as Pe, CellValueType as Dt, ThemeService as Xt, ICommandService as le, isFormulaString as ge, isFormulaId as He, Tools as ie, Direction as X, UniverInstanceType as w, Injector as xe, DEFAULT_EMPTY_DOCUMENT_VALUE as ua, toDisposable as Ee, ColorKit as ma, Rectangle as Ce, CommandType as Te, createIdentifier as Wt, isRealNum as ci, getCellValueType as fi, useDependency as ce, LocaleService as we, useInjector as si, FOCUSING_DOC as li, FOCUSING_UNIVER_EDITOR as di, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as pi, connectInjector as Li, throttle as vn, cellToRange as Ai, RANGE_TYPE as fe, DisposableCollection as mt, Optional as Pi, isICellData as bi, RxDisposable as Si, FOCUSING_EDITOR_INPUT_FORMULA as bt, getCellInfoInMergeData as Ei, AbsoluteRefType as ee, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Ti, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Ii, IContextService as Ri, Plugin as Pn, DependentOn as ca } from "@univerjs/core";
5
- import { IRPCChannelService as fa, fromModule as Ni, toModule as Ci } from "@univerjs/rpc";
6
- import { SetDefinedNameMutation as yn, RemoveDefinedNameMutation as Fn, FormulaDataModel as Ge, IActiveDirtyManagerService as bn, IDefinedNamesService as sa, SetArrayFormulaDataMutation as gt, stripErrorMargin as hi, LexerTreeBuilder as lt, SetFormulaCalculationResultMutation as la, ErrorType as K, sequenceNodeType as ue, serializeRange as ct, FUNCTION_NAMES_COMPATIBILITY as B, FunctionType as r, FUNCTION_NAMES_CUBE as _e, FUNCTION_NAMES_DATABASE as oe, FUNCTION_NAMES_DATE as G, FUNCTION_NAMES_ENGINEERING as O, FUNCTION_NAMES_FINANCIAL as _, FUNCTION_NAMES_INFORMATION as j, FUNCTION_NAMES_LOGICAL as J, FUNCTION_NAMES_LOOKUP as V, FUNCTION_NAMES_MATH as T, FUNCTION_NAMES_STATISTICAL as b, FUNCTION_NAMES_TEXT as q, FUNCTION_NAMES_WEB as $t, isReferenceStrings as _i, functionArray as Oi, functionCompatibility as Mi, functionCube as Di, functionDatabase as gi, functionDate as xi, functionEngineering as vi, functionFinancial as yi, functionInformation as Fi, functionLogical as qi, functionLookup as Ui, functionMath as Bi, functionMeta as Vi, functionStatistical as Hi, functionText as wi, functionUniver as Gi, functionWeb as Xi, IFunctionService as Sn, ERROR_TYPE_SET as Wi, SetFormulaCalculationStartMutation as jt, SetFormulaCalculationStopMutation as qn, SetFormulaCalculationNotificationMutation as Yi, FormulaExecuteStageType as Qt, FormulaExecutedStateType as Fe, SetFormulaDataMutation as St, initSheetFormulaData as Un, deserializeRangeWithSheet as De, serializeRangeToRefString as Ct, generateStringWithSequence as xt, CustomFunction as da, serializeRangeWithSpreadsheet as Ki, serializeRangeWithSheet as ki, SetOtherFormulaMutation as $i, RemoveOtherFormulaMutation as ji, matchRefDrawToken as Bn, matchToken as qe, compareToken as zt, normalizeSheetName as Qi, getAbsoluteRefTypeWitString as zi, UniverFormulaEnginePlugin as pa } from "@univerjs/engine-formula";
7
- import { IRenderManagerService as dt, ITextSelectionRenderManager as La, DeviceInputEventType as de, ScrollTimerType as Vn, SHEET_VIEWPORT_KEY as Zi, Vector2 as Ji } from "@univerjs/engine-render";
8
- import { SetRangeValuesMutation as pe, SetStyleCommand as En, MoveRangeMutation as Hn, MoveRowsMutation as wn, MoveColsMutation as Gn, ReorderRangeMutation as Xn, RemoveRowMutation as Wn, RemoveColMutation as Yn, RemoveSheetMutation as fn, InsertSheetMutation as sn, SetDefinedNameCommand as ln, INTERCEPTOR_POINT as Aa, SheetInterceptorService as Tn, SetRangeValuesUndoMutationFactory as er, SetWorksheetRowHeightMutation as tr, SetWorksheetColWidthMutation as nr, SetColHiddenMutation as ar, SetColVisibleMutation as ir, SetRowHiddenMutation as rr, SetRowVisibleMutation as or, SetWorksheetRowAutoHeightMutation as ur, SetRangeValuesCommand as mr, SheetsSelectionsService as In, getSheetCommandTarget as cr, getCellAtRowCol as fr, SetSelectionsOperation as sr, WorkbookEditablePermission as Pa, WorksheetEditPermission as ba, WorksheetSetCellValuePermission as Sa, RangeProtectionPermissionEditPoint as Ea, SetBorderCommand as Ta, ClearSelectionFormatCommand as Ia, INumfmtService as lr, handleMoveRange as Ra, EffectRefRangId as k, runRefRangeMutations as $, handleMoveRows as Na, handleMoveCols as Ca, handleInsertRow as ha, handleInsertCol as _a, handleIRemoveRow as Oa, handleIRemoveCol as Ma, handleDeleteRangeMoveLeft as Da, handleDeleteRangeMoveUp as ga, handleInsertRangeMoveDown as xa, handleInsertRangeMoveRight as va, RemoveSheetCommand as dr, SetWorksheetNameCommand as pr, DeleteRangeMoveLeftCommand as Lr, DeleteRangeMoveUpCommand as Ar, RemoveColCommand as Pr, RemoveRowCommand as br, InsertRangeMoveDownCommand as Sr, InsertRangeMoveRightCommand as Er, InsertColCommand as Tr, InsertRowCommand as Ir, MoveColsCommand as Rr, MoveRowsCommand as Nr, MoveRangeCommand as Cr, SetWorksheetActiveOperation as hr, InsertDefinedNameCommand as _r, RemoveDefinedNameCommand as Or, RefRangeService as Mr, handleDefaultRangeChangeWithEffectRefCommands as Dr, convertSelectionDataToRange as ht, getNormalSelectionStyle as gr, IRefSelectionsService as Rn, DISABLE_NORMAL_SELECTIONS as Zt, setEndForRange as xr, getPrimaryForRange as vr, RefSelectionsService as yr } from "@univerjs/sheets";
9
- import { DATA_TYPE as Kn, APPLY_TYPE as Fr, IAutoFillService as qr, PREDEFINED_HOOK_NAME as Ve, COPY_TYPE as ya, ISheetClipboardService as Ur, ISheetSelectionRenderService as Br, SelectionShape as Vr, IEditorBridgeService as Fa, SheetSkeletonManagerService as Nn, SheetPasteCommand as Hr, useActiveWorkbook as wr, getCurrentRangeDisable$ as qa, PASTE_SPECIAL_MENU_ID as Gr, whenFormulaEditorActivated as pt, CellAlertType as Xr, HoverManagerService as Wr, CellAlertManagerService as Yr, BaseSelectionRenderService as Kr, getCoordByOffset as kn, checkInHeaderRanges as $n, getAllSelection as kr, getSheetObject as $r, getEditorObject as jr, MoveSelectionCommand as jn, JumpOver as Qn, ExpandSelectionCommand as zn } from "@univerjs/sheets-ui";
10
- import { IEditorService as Xe, ISidebarService as Ua, MenuGroup as Qr, MenuItemType as Cn, MenuPosition as zr, getMenuHiddenObservable as Zr, IClipboardInterfaceService as Zn, KeyCode as H, MetaKeys as he, ComponentManager as Jr, BuiltInUIPart as eo, IMenuService as to, IShortcutService as Ba, IUIPartsService as no, IProgressService as ao, UNI_DISABLE_CHANGING_FOCUS_KEY as Jt, SetEditorResizeOperation as io, IContextMenuService as ro } from "@univerjs/ui";
4
+ import { Disposable as re, ObjectMatrix as z, Dimension as xn, OnLifecycle as Le, LifecycleStages as Ae, IUniverInstanceService as Pe, CellValueType as Dt, ThemeService as Xt, ICommandService as le, isFormulaString as ge, isFormulaId as He, Tools as ie, Direction as X, UniverInstanceType as w, DEFAULT_EMPTY_DOCUMENT_VALUE as ua, toDisposable as Ee, ColorKit as ma, Rectangle as Ce, CommandType as Te, isRealNum as ci, getCellValueType as fi, LocaleService as we, FOCUSING_DOC as si, FOCUSING_UNIVER_EDITOR as li, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as di, throttle as vn, cellToRange as pi, RANGE_TYPE as ce, DisposableCollection as mt, isICellData as Li, RxDisposable as Ai, FOCUSING_EDITOR_INPUT_FORMULA as bt, getCellInfoInMergeData as Pi, AbsoluteRefType as ee, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as bi, DOCS_NORMAL_EDITOR_UNIT_ID_KEY as Si, IContextService as Ei, Plugin as Pn, DependentOn as ca } from "@univerjs/core";
5
+ import { Inject as U, Injector as xe, createIdentifier as Wt, Optional as Ti } from "@wendellhu/redi";
6
+ import { IRPCChannelService as fa, fromModule as Ii, toModule as Ri } from "@univerjs/rpc";
7
+ import { SetDefinedNameMutation as yn, RemoveDefinedNameMutation as Fn, FormulaDataModel as Ge, IActiveDirtyManagerService as bn, IDefinedNamesService as sa, SetArrayFormulaDataMutation as gt, stripErrorMargin as Ni, LexerTreeBuilder as lt, SetFormulaCalculationResultMutation as la, ErrorType as K, sequenceNodeType as ue, serializeRange as ct, FUNCTION_NAMES_COMPATIBILITY as B, FunctionType as r, FUNCTION_NAMES_CUBE as _e, FUNCTION_NAMES_DATABASE as oe, FUNCTION_NAMES_DATE as G, FUNCTION_NAMES_ENGINEERING as O, FUNCTION_NAMES_FINANCIAL as _, FUNCTION_NAMES_INFORMATION as j, FUNCTION_NAMES_LOGICAL as J, FUNCTION_NAMES_LOOKUP as V, FUNCTION_NAMES_MATH as T, FUNCTION_NAMES_STATISTICAL as b, FUNCTION_NAMES_TEXT as q, FUNCTION_NAMES_WEB as $t, isReferenceStrings as Ci, functionArray as hi, functionCompatibility as _i, functionCube as Oi, functionDatabase as Mi, functionDate as Di, functionEngineering as gi, functionFinancial as xi, functionInformation as vi, functionLogical as yi, functionLookup as Fi, functionMath as qi, functionMeta as Ui, functionStatistical as Bi, functionText as Vi, functionUniver as Hi, functionWeb as wi, IFunctionService as Sn, ERROR_TYPE_SET as Gi, SetFormulaCalculationStartMutation as jt, SetFormulaCalculationStopMutation as qn, SetFormulaCalculationNotificationMutation as Xi, FormulaExecuteStageType as Qt, FormulaExecutedStateType as Fe, SetFormulaDataMutation as St, initSheetFormulaData as Un, deserializeRangeWithSheet as De, serializeRangeToRefString as Ct, generateStringWithSequence as xt, CustomFunction as da, serializeRangeWithSpreadsheet as Wi, serializeRangeWithSheet as Yi, SetOtherFormulaMutation as Ki, RemoveOtherFormulaMutation as ki, matchRefDrawToken as Bn, matchToken as qe, compareToken as zt, normalizeSheetName as $i, getAbsoluteRefTypeWitString as ji, UniverFormulaEnginePlugin as pa } from "@univerjs/engine-formula";
8
+ import { IRenderManagerService as dt, ITextSelectionRenderManager as La, DeviceInputEventType as de, ScrollTimerType as Vn, SHEET_VIEWPORT_KEY as Qi, Vector2 as zi } from "@univerjs/engine-render";
9
+ import { SetRangeValuesMutation as pe, SetStyleCommand as En, MoveRangeMutation as Hn, MoveRowsMutation as wn, MoveColsMutation as Gn, ReorderRangeMutation as Xn, RemoveRowMutation as Wn, RemoveColMutation as Yn, RemoveSheetMutation as fn, InsertSheetMutation as sn, SetDefinedNameCommand as ln, INTERCEPTOR_POINT as Aa, SheetInterceptorService as Tn, SetRangeValuesUndoMutationFactory as Zi, SetWorksheetRowHeightMutation as Ji, SetWorksheetColWidthMutation as er, SetColHiddenMutation as tr, SetColVisibleMutation as nr, SetRowHiddenMutation as ar, SetRowVisibleMutation as ir, SetWorksheetRowAutoHeightMutation as rr, SetRangeValuesCommand as or, SheetsSelectionsService as In, getSheetCommandTarget as ur, getCellAtRowCol as mr, SetSelectionsOperation as cr, WorkbookEditablePermission as Pa, WorksheetEditPermission as ba, WorksheetSetCellValuePermission as Sa, RangeProtectionPermissionEditPoint as Ea, SetBorderCommand as Ta, ClearSelectionFormatCommand as Ia, INumfmtService as fr, handleMoveRange as Ra, EffectRefRangId as k, runRefRangeMutations as $, handleMoveRows as Na, handleMoveCols as Ca, handleInsertRow as ha, handleInsertCol as _a, handleIRemoveRow as Oa, handleIRemoveCol as Ma, handleDeleteRangeMoveLeft as Da, handleDeleteRangeMoveUp as ga, handleInsertRangeMoveDown as xa, handleInsertRangeMoveRight as va, RemoveSheetCommand as sr, SetWorksheetNameCommand as lr, DeleteRangeMoveLeftCommand as dr, DeleteRangeMoveUpCommand as pr, RemoveColCommand as Lr, RemoveRowCommand as Ar, InsertRangeMoveDownCommand as Pr, InsertRangeMoveRightCommand as br, InsertColCommand as Sr, InsertRowCommand as Er, MoveColsCommand as Tr, MoveRowsCommand as Ir, MoveRangeCommand as Rr, SetWorksheetActiveOperation as Nr, InsertDefinedNameCommand as Cr, RemoveDefinedNameCommand as hr, RefRangeService as _r, handleDefaultRangeChangeWithEffectRefCommands as Or, convertSelectionDataToRange as ht, getNormalSelectionStyle as Mr, IRefSelectionsService as Rn, DISABLE_NORMAL_SELECTIONS as Zt, setEndForRange as Dr, getPrimaryForRange as gr, RefSelectionsService as xr } from "@univerjs/sheets";
10
+ import { DATA_TYPE as Kn, APPLY_TYPE as vr, IAutoFillService as yr, PREDEFINED_HOOK_NAME as Ve, COPY_TYPE as ya, ISheetClipboardService as Fr, ISheetSelectionRenderService as qr, SelectionShape as Ur, IEditorBridgeService as Fa, SheetSkeletonManagerService as Nn, SheetPasteCommand as Br, useActiveWorkbook as Vr, getCurrentRangeDisable$ as qa, PASTE_SPECIAL_MENU_ID as Hr, whenFormulaEditorActivated as pt, CellAlertType as wr, HoverManagerService as Gr, CellAlertManagerService as Xr, BaseSelectionRenderService as Wr, getCoordByOffset as kn, checkInHeaderRanges as $n, getAllSelection as Yr, getSheetObject as Kr, getEditorObject as kr, MoveSelectionCommand as jn, JumpOver as Qn, ExpandSelectionCommand as zn } from "@univerjs/sheets-ui";
11
+ import { IEditorService as Xe, ISidebarService as Ua, MenuGroup as $r, MenuItemType as Cn, MenuPosition as jr, getMenuHiddenObservable as Qr, IClipboardInterfaceService as Zn, KeyCode as H, MetaKeys as he, ComponentManager as zr, BuiltInUIPart as Zr, IMenuService as Jr, IShortcutService as Ba, IUIPartsService as eo, IProgressService as to, UNI_DISABLE_CHANGING_FOCUS_KEY as Jt, SetEditorResizeOperation as no, IContextMenuService as ao } from "@univerjs/ui";
12
+ import { useDependency as fe, useInjector as io, connectInjector as ro } from "@wendellhu/redi/react-bindings";
11
13
  import { Subject as Me, throttleTime as oo, combineLatestWith as uo, map as Je, switchMap as mo, of as Jn, Observable as co, merge as ea, filter as dn, bufferTime as fo } from "rxjs";
12
14
  import so, { forwardRef as Lt, useRef as Va, createElement as At, useEffect as ft, useState as W } from "react";
13
15
  import { Popup as Ha, Select as lo, Input as po, Button as en } from "@univerjs/design";
@@ -284,7 +286,7 @@ let tt = class extends re {
284
286
  }) : (a == null ? void 0 : a.t) === Dt.NUMBER && typeof (a == null ? void 0 : a.v) == "number" ? t({
285
287
  ...a,
286
288
  ...c,
287
- v: hi(a.v)
289
+ v: Ni(a.v)
288
290
  }) : t({ ...a, ...c });
289
291
  }
290
292
  })
@@ -317,7 +319,7 @@ let _t = class extends re {
317
319
  match: (e) => ge(e == null ? void 0 : e.f) || He(e == null ? void 0 : e.si),
318
320
  isContinue: (e, t) => e.type === Kn.FORMULA,
319
321
  applyFunctions: {
320
- [Fr.COPY]: (e, t, n, i) => {
322
+ [vr.COPY]: (e, t, n, i) => {
321
323
  const { data: o, index: u } = e;
322
324
  return this._fillCopyFormula(o, t, n, u, i);
323
325
  }
@@ -356,7 +358,7 @@ let _t = class extends re {
356
358
  };
357
359
  _t = _o([
358
360
  Le(Ae.Ready, _t),
359
- ta(0, qr),
361
+ ta(0, yr),
360
362
  ta(1, U(lt))
361
363
  ], _t);
362
364
  function Oo(a, e) {
@@ -450,7 +452,7 @@ nt = xo([
450
452
  Le(Ae.Ready, nt),
451
453
  $e(0, Pe),
452
454
  $e(1, U(lt)),
453
- $e(2, Ur),
455
+ $e(2, Fr),
454
456
  $e(3, U(xe)),
455
457
  $e(4, U(Ge))
456
458
  ], nt);
@@ -500,7 +502,7 @@ function yo(a, e, t, n, i, o, u, m, c = !1, f) {
500
502
  id: pe.id,
501
503
  params: p
502
504
  });
503
- const N = er(
505
+ const N = Zi(
504
506
  i,
505
507
  p
506
508
  );
@@ -527,12 +529,12 @@ var qo = Object.defineProperty, Uo = Object.getOwnPropertyDescriptor, Bo = (a, e
527
529
  return n && i && qo(e, t, i), i;
528
530
  }, Ue = (a, e) => (t, n) => e(t, n, a);
529
531
  const Vo = [
532
+ Ji.id,
533
+ er.id,
530
534
  tr.id,
531
535
  nr.id,
532
536
  ar.id,
533
- ir.id,
534
- rr.id,
535
- or.id
537
+ ir.id
536
538
  ];
537
539
  let vt = class extends re {
538
540
  constructor(e, t, n, i, o, u, m) {
@@ -568,7 +570,7 @@ let vt = class extends re {
568
570
  (e.id === la.id || e.id === gt.id && t && t.remove) && this._removeArrayFormulaRangeShape();
569
571
  })), this.disposeWithMe(
570
572
  this._commandService.beforeCommandExecuted((e) => {
571
- ur.id === e.id && requestIdleCallback(() => {
573
+ rr.id === e.id && requestIdleCallback(() => {
572
574
  const t = e.params, { unitId: n, subUnitId: i, rowsAutoHeightInfo: o } = t;
573
575
  this._refreshArrayFormulaRangeShapeByRow(n, i, o);
574
576
  }), Vo.includes(e.id) && requestIdleCallback(() => {
@@ -613,13 +615,13 @@ let vt = class extends re {
613
615
  hasColumnHeader: !1
614
616
  }, u = this._renderManagerService.getRenderById(t);
615
617
  if (!u) return;
616
- const { scene: m } = u, { rangeWithCoord: c, primaryWithCoord: f } = u.with(Br).attachSelectionWithCoord({
618
+ const { scene: m } = u, { rangeWithCoord: c, primaryWithCoord: f } = u.with(qr).attachSelectionWithCoord({
617
619
  range: e,
618
620
  primary: null,
619
621
  style: o
620
622
  }), d = this._sheetSkeletonManagerService.getCurrentSkeleton();
621
623
  if (!m || !d) return;
622
- const { rowHeaderWidth: s, columnHeaderHeight: l } = d, A = new Vr(m, 100, !1, this._themeService);
624
+ const { rowHeaderWidth: s, columnHeaderHeight: l } = d, A = new Ur(m, 100, !1, this._themeService);
623
625
  A.update(c, s, l, o, f), A.setEvent(!1), this._previousShape = A;
624
626
  }
625
627
  _removeArrayFormulaRangeShape() {
@@ -696,7 +698,7 @@ vt = Bo([
696
698
  const wa = {
697
699
  id: "sheet.command.paste-formula",
698
700
  type: Te.COMMAND,
699
- handler: async (a) => a.get(le).executeCommand(Hr.id, {
701
+ handler: async (a) => a.get(le).executeCommand(Br.id, {
700
702
  value: Ve.SPECIAL_PASTE_FORMULA
701
703
  })
702
704
  }, Ga = {
@@ -720,7 +722,7 @@ const wa = {
720
722
  const o = {
721
723
  value: i.getData()
722
724
  };
723
- return n.executeCommand(mr.id, o);
725
+ return n.executeCommand(or.id, o);
724
726
  }
725
727
  }, ve = {
726
728
  id: "formula-ui.operation.select-editor-formula",
@@ -921,7 +923,7 @@ const pn = {
921
923
  const t = a.get(In), n = a.get(Xe), i = t.getCurrentSelections();
922
924
  if (!i || !i.length)
923
925
  return !1;
924
- const o = cr(a.get(Pe));
926
+ const o = ur(a.get(Pe));
925
927
  if (!o) return !1;
926
928
  const { worksheet: u, unitId: m, subUnitId: c } = o, f = u.getCellMatrix(), { value: d } = e, s = a.get(le), l = [];
927
929
  let A = null, P = 0, S = 0, p = "";
@@ -947,7 +949,7 @@ const pn = {
947
949
  }), !1;
948
950
  });
949
951
  if (A) {
950
- const L = fr(P, S, u), h = {
952
+ const L = mr(P, S, u), h = {
951
953
  range: Ce.clone(A),
952
954
  primary: {
953
955
  startRow: L.startRow,
@@ -964,7 +966,7 @@ const pn = {
964
966
  subUnitId: c,
965
967
  selections: [h]
966
968
  };
967
- await s.executeCommand(sr.id, M), setTimeout(() => {
969
+ await s.executeCommand(cr.id, M), setTimeout(() => {
968
970
  n.setFormula(`=${d}(${p}`);
969
971
  }, 0);
970
972
  }
@@ -1203,7 +1205,7 @@ const ou = (a, e = 100) => {
1203
1205
  formulaHelpParamActive: Tu
1204
1206
  };
1205
1207
  function Iu() {
1206
- const [a, e] = W(!1), [t, n] = W(!0), [i, o] = W(!0), [u, m] = W(0), [c, f] = W([0, 0]), [d, s] = W({ left: 0, top: 0 }), [l, A] = W(null), P = ce(ye), S = ce(we), p = S.t("formula.prompt.required"), N = S.t("formula.prompt.optional"), I = ce(Pe), L = ce(Xe), h = ce(Ua), M = si();
1208
+ const [a, e] = W(!1), [t, n] = W(!0), [i, o] = W(!0), [u, m] = W(0), [c, f] = W([0, 0]), [d, s] = W({ left: 0, top: 0 }), [l, A] = W(null), P = fe(ye), S = fe(we), p = S.t("formula.prompt.required"), N = S.t("formula.prompt.optional"), I = fe(Pe), L = fe(Xe), h = fe(Ua), M = io();
1207
1209
  ou(x), ft(() => {
1208
1210
  const F = P.help$.subscribe((D) => {
1209
1211
  const { visible: Z, paramIndex: Y, functionInfo: Q } = D;
@@ -1354,7 +1356,7 @@ const tn = (a) => /* @__PURE__ */ R.jsxs("div", { className: te.formulaHelpFunct
1354
1356
  formulaSearchFunctionItemActive: Mu
1355
1357
  };
1356
1358
  function Du() {
1357
- const [a, e] = W(!1), [t, n] = W(0), [i, o] = W([0, 0]), [u, m] = W([]), [c, f] = W(""), d = Va(null), s = ce(ye), l = ce(Pe), A = ce(Xe);
1359
+ const [a, e] = W(!1), [t, n] = W(0), [i, o] = W([0, 0]), [u, m] = W([]), [c, f] = W(""), d = Va(null), s = fe(ye), l = fe(Pe), A = fe(Xe);
1358
1360
  ft(() => {
1359
1361
  let I = [], L = 0;
1360
1362
  const h = s.search$.subscribe((C) => {
@@ -12827,7 +12829,7 @@ let Ft = class {
12827
12829
  if (e.length === 0)
12828
12830
  return !1;
12829
12831
  const t = e[0].description;
12830
- return !_i(t);
12832
+ return !Ci(t);
12831
12833
  }
12832
12834
  _initialize() {
12833
12835
  this._localeService.localeChanged$.subscribe(() => {
@@ -12836,6 +12838,8 @@ let Ft = class {
12836
12838
  }
12837
12839
  _initDescription() {
12838
12840
  const a = [
12841
+ ...hi,
12842
+ ..._i,
12839
12843
  ...Oi,
12840
12844
  ...Mi,
12841
12845
  ...Di,
@@ -12849,9 +12853,7 @@ let Ft = class {
12849
12853
  ...Bi,
12850
12854
  ...Vi,
12851
12855
  ...Hi,
12852
- ...wi,
12853
- ...Gi,
12854
- ...Xi
12856
+ ...wi
12855
12857
  ].map((t) => t[1]), e = nm.filter((t) => a.includes(t.functionName));
12856
12858
  this._descriptions = e.concat(this._description);
12857
12859
  }
@@ -12886,7 +12888,7 @@ const om = "univer-formula-select-function-select", um = "univer-formula-select-
12886
12888
  formulaSelectFunctionContent: lm
12887
12889
  };
12888
12890
  function dm(a) {
12889
- const { onChange: e } = a, t = "-1", [n, i] = W(""), [o, u] = W([]), [m, c] = W(0), [f, d] = W(t), [s, l] = W(0), [A, P] = W(null), S = ce(We), p = ce(we), N = iu(r, p);
12891
+ const { onChange: e } = a, t = "-1", [n, i] = W(""), [o, u] = W([]), [m, c] = W(0), [f, d] = W(t), [s, l] = W(0), [A, P] = W(null), S = fe(We), p = fe(we), N = iu(r, p);
12890
12892
  N.unshift({
12891
12893
  label: p.t("formula.moreFunctions.allFunctions"),
12892
12894
  value: t
@@ -12995,7 +12997,7 @@ function dm(a) {
12995
12997
  ] });
12996
12998
  }
12997
12999
  function pm() {
12998
- const a = wr(), [e, t] = W(!0), [n, i] = W(!1), [o, u] = W(null), m = ce(we), c = ce(Xe);
13000
+ const a = Vr(), [e, t] = W(!0), [n, i] = W(!1), [o, u] = W(null), m = fe(we), c = fe(Xe);
12999
13001
  function f() {
13000
13002
  t(!e), i(!n);
13001
13003
  }
@@ -13025,9 +13027,9 @@ function Lm(a) {
13025
13027
  id: _n.id,
13026
13028
  icon: "FunctionSingle",
13027
13029
  tooltip: "formula.insert.tooltip",
13028
- group: Qr.TOOLBAR_FORMULAS_INSERT,
13030
+ group: $r.TOOLBAR_FORMULAS_INSERT,
13029
13031
  type: Cn.SELECTOR,
13030
- positions: [zr.TOOLBAR_START],
13032
+ positions: [jr.TOOLBAR_START],
13031
13033
  selections: [
13032
13034
  {
13033
13035
  label: "SUM",
@@ -13055,7 +13057,7 @@ function Lm(a) {
13055
13057
  icon: "MinSingle"
13056
13058
  }
13057
13059
  ],
13058
- hidden$: Zr(a, w.UNIVER_SHEET),
13060
+ hidden$: Qr(a, w.UNIVER_SHEET),
13059
13061
  disabled$: qa(a, { workbookTypes: [Pa], worksheetTypes: [ba, Sa], rangeTypes: [Ea] })
13060
13062
  };
13061
13063
  }
@@ -13077,7 +13079,7 @@ function bm(a) {
13077
13079
  id: wa.id,
13078
13080
  type: Cn.BUTTON,
13079
13081
  title: "formula.operation.pasteFormula",
13080
- positions: [Gr],
13082
+ positions: [Hr],
13081
13083
  disabled$: Pm(a).pipe(
13082
13084
  uo(qa(a, { workbookTypes: [Pa], rangeTypes: [Ea], worksheetTypes: [Sa, ba] })),
13083
13085
  Je(([e, t]) => e || t)
@@ -13086,10 +13088,10 @@ function bm(a) {
13086
13088
  }
13087
13089
  const ti = "meta_key_ctrl_And_Shift";
13088
13090
  function Sm(a) {
13089
- return a.getContextValue(li) && a.getContextValue(di) && a.getContextValue(pi);
13091
+ return a.getContextValue(si) && a.getContextValue(li) && a.getContextValue(di);
13090
13092
  }
13091
13093
  function ni(a) {
13092
- return (ge(a == null ? void 0 : a.f) || He(a == null ? void 0 : a.si)) && typeof (a == null ? void 0 : a.v) == "string" && Wi.has(a.v) ? a.v : null;
13094
+ return (ge(a == null ? void 0 : a.f) || He(a == null ? void 0 : a.si)) && typeof (a == null ? void 0 : a.v) == "string" && Gi.has(a.v) ? a.v : null;
13093
13095
  }
13094
13096
  const Kt = [
13095
13097
  H.ARROW_DOWN,
@@ -13224,7 +13226,7 @@ let at = class extends re {
13224
13226
  }
13225
13227
  _registerComponents() {
13226
13228
  this.disposeWithMe(
13227
- this._uiPartsService.registerComponent(eo.CONTENT, () => Li(gu, this._injector))
13229
+ this._uiPartsService.registerComponent(Zr.CONTENT, () => ro(gu, this._injector))
13228
13230
  ), this._componentManager.register(Wa, pm);
13229
13231
  }
13230
13232
  _registerRenderModules() {
@@ -13234,12 +13236,12 @@ let at = class extends re {
13234
13236
  at = Mm([
13235
13237
  Le(Ae.Ready, at),
13236
13238
  Oe(1, U(xe)),
13237
- Oe(2, to),
13239
+ Oe(2, Jr),
13238
13240
  Oe(3, le),
13239
13241
  Oe(4, Ba),
13240
- Oe(5, no),
13242
+ Oe(5, eo),
13241
13243
  Oe(6, dt),
13242
- Oe(7, U(Jr))
13244
+ Oe(7, U(zr))
13243
13245
  ], at);
13244
13246
  var Dm = Object.defineProperty, gm = Object.getOwnPropertyDescriptor, xm = (a, e, t, n) => {
13245
13247
  for (var i = n > 1 ? void 0 : n ? gm(e, t) : e, o = a.length - 1, u; o >= 0; o--)
@@ -13345,7 +13347,7 @@ let it = class extends re {
13345
13347
  this.disposeWithMe(
13346
13348
  // eslint-disable-next-line complexity, max-lines-per-function
13347
13349
  this._commandService.onCommandExecuted((f) => {
13348
- if (f.id !== Yi.id)
13350
+ if (f.id !== Xi.id)
13349
13351
  return;
13350
13352
  const d = f.params;
13351
13353
  if (d.stageInfo != null) {
@@ -13444,9 +13446,9 @@ it = xm([
13444
13446
  Le(Ae.Ready, it),
13445
13447
  Qe(0, le),
13446
13448
  Qe(1, bn),
13447
- Qe(2, U(lr)),
13449
+ Qe(2, U(fr)),
13448
13450
  Qe(3, U(Ge)),
13449
- Qe(4, U(ao))
13451
+ Qe(4, U(to))
13450
13452
  ], it);
13451
13453
  function vm(a, e, t) {
13452
13454
  var n;
@@ -13556,7 +13558,7 @@ function Bm(a, e, t, n, i) {
13556
13558
  const o = [];
13557
13559
  return a.forValue((u, m, c) => {
13558
13560
  if (c == null || !ec(c)) return !0;
13559
- const f = Ai(u, m);
13561
+ const f = pi(u, m);
13560
13562
  let d = null, s = !1;
13561
13563
  if ([
13562
13564
  0,
@@ -13900,43 +13902,43 @@ let rt = class extends re {
13900
13902
  const { id: e } = a;
13901
13903
  let t = null;
13902
13904
  switch (e) {
13903
- case Cr.id:
13905
+ case Rr.id:
13904
13906
  t = this._handleMoveRange(a);
13905
13907
  break;
13906
- case Nr.id:
13908
+ case Ir.id:
13907
13909
  t = this._handleMoveRows(a);
13908
13910
  break;
13909
- case Rr.id:
13911
+ case Tr.id:
13910
13912
  t = this._handleMoveCols(a);
13911
13913
  break;
13912
- case Ir.id:
13914
+ case Er.id:
13913
13915
  t = this._handleInsertRow(a);
13914
13916
  break;
13915
- case Tr.id:
13917
+ case Sr.id:
13916
13918
  t = this._handleInsertCol(a);
13917
13919
  break;
13918
- case Er.id:
13920
+ case br.id:
13919
13921
  t = this._handleInsertRangeMoveRight(a);
13920
13922
  break;
13921
- case Sr.id:
13923
+ case Pr.id:
13922
13924
  t = this._handleInsertRangeMoveDown(a);
13923
13925
  break;
13924
- case br.id:
13926
+ case Ar.id:
13925
13927
  t = this._handleRemoveRow(a);
13926
13928
  break;
13927
- case Pr.id:
13929
+ case Lr.id:
13928
13930
  t = this._handleRemoveCol(a);
13929
13931
  break;
13930
- case Ar.id:
13932
+ case pr.id:
13931
13933
  t = this._handleDeleteRangeMoveUp(a);
13932
13934
  break;
13933
- case Lr.id:
13935
+ case dr.id:
13934
13936
  t = this._handleDeleteRangeMoveLeft(a);
13935
13937
  break;
13936
- case pr.id:
13938
+ case lr.id:
13937
13939
  t = this._handleSetWorksheetName(a);
13938
13940
  break;
13939
- case dr.id:
13941
+ case sr.id:
13940
13942
  t = this._handleRemoveWorksheet(a);
13941
13943
  break;
13942
13944
  }
@@ -13983,13 +13985,13 @@ let rt = class extends re {
13983
13985
  startColumn: 0,
13984
13986
  endRow: n,
13985
13987
  endColumn: c.getColumnCount() - 1,
13986
- rangeType: fe.ROW
13988
+ rangeType: ce.ROW
13987
13989
  }, s = {
13988
13990
  startRow: i,
13989
13991
  startColumn: 0,
13990
13992
  endRow: o,
13991
13993
  endColumn: c.getColumnCount() - 1,
13992
- rangeType: fe.ROW
13994
+ rangeType: ce.ROW
13993
13995
  };
13994
13996
  return {
13995
13997
  type: 1,
@@ -14012,13 +14014,13 @@ let rt = class extends re {
14012
14014
  startColumn: t,
14013
14015
  endRow: c.getRowCount() - 1,
14014
14016
  endColumn: n,
14015
- rangeType: fe.COLUMN
14017
+ rangeType: ce.COLUMN
14016
14018
  }, s = {
14017
14019
  startRow: 0,
14018
14020
  startColumn: i,
14019
14021
  endRow: c.getRowCount() - 1,
14020
14022
  endColumn: o,
14021
- rangeType: fe.COLUMN
14023
+ rangeType: ce.COLUMN
14022
14024
  };
14023
14025
  return {
14024
14026
  type: 2,
@@ -14483,7 +14485,7 @@ let rt = class extends re {
14483
14485
  startColumn: s,
14484
14486
  endRow: l,
14485
14487
  endColumn: A,
14486
- rangeType: P = fe.NORMAL
14488
+ rangeType: P = ce.NORMAL
14487
14489
  } = t, { startRow: S, startColumn: p, endRow: N, endColumn: I } = n, {
14488
14490
  startRow: L,
14489
14491
  endRow: h,
@@ -14645,7 +14647,7 @@ Ut = sc([
14645
14647
  It(0, U(we)),
14646
14648
  It(1, U(We)),
14647
14649
  It(2, Sn),
14648
- It(3, Pi(ii))
14650
+ It(3, Ti(ii))
14649
14651
  ], Ut);
14650
14652
  var lc = Object.defineProperty, dc = Object.getOwnPropertyDescriptor, pc = (a, e, t, n) => {
14651
14653
  for (var i = n > 1 ? void 0 : n ? dc(e, t) : e, o = a.length - 1, u; o >= 0; o--)
@@ -14680,12 +14682,12 @@ let ot = class extends re {
14680
14682
  this.disposeWithMe(
14681
14683
  this._commandService.onCommandExecuted((e, t) => {
14682
14684
  if (!(t != null && t.fromCollab)) {
14683
- if (e.id === hr.id)
14685
+ if (e.id === Nr.id)
14684
14686
  this._unregisterDescriptionsForNotInSheetId(), this._registerDescriptions();
14685
- else if (e.id === _r.id) {
14687
+ else if (e.id === Cr.id) {
14686
14688
  const n = e.params;
14687
14689
  this._registerDescription(n);
14688
- } else if (e.id === Or.id) {
14690
+ } else if (e.id === hr.id) {
14689
14691
  const n = e.params;
14690
14692
  this._unregisterDescription(n);
14691
14693
  } else if (e.id === ln.id) {
@@ -14791,9 +14793,9 @@ let Bt = class extends re {
14791
14793
  const P = t.get(A.token);
14792
14794
  if (P.unitId && P.unitId !== f && P.subUnitId && P.subUnitId !== d)
14793
14795
  return A;
14794
- const S = Dr(P.range, u);
14796
+ const S = Or(P.range, u);
14795
14797
  let p = "";
14796
- return P.unitId && P.sheetName ? p = Ki(P.unitId, P.sheetName, P.range) : P.sheetName ? p = ki(P.sheetName, P.range) : p = S ? ct(S) : K.ERROR, {
14798
+ return P.unitId && P.sheetName ? p = Wi(P.unitId, P.sheetName, P.range) : P.sheetName ? p = Yi(P.sheetName, P.range) : p = S ? ct(S) : K.ERROR, {
14797
14799
  ...A,
14798
14800
  token: p
14799
14801
  };
@@ -14819,7 +14821,7 @@ let Bt = class extends re {
14819
14821
  }
14820
14822
  };
14821
14823
  Bt = Pc([
14822
- on(0, U(Mr)),
14824
+ on(0, U(_r)),
14823
14825
  on(1, U(lt)),
14824
14826
  on(2, Pe)
14825
14827
  ], Bt);
@@ -14869,7 +14871,7 @@ let Vt = class extends re {
14869
14871
  for (const t in e)
14870
14872
  for (const n in e[t]) {
14871
14873
  const i = e[t][n], o = { unitId: t, subUnitId: n, formulaMap: i };
14872
- this._commandService.executeCommand($i.id, o).then(() => {
14874
+ this._commandService.executeCommand(Ki.id, o).then(() => {
14873
14875
  this._commandService.executeCommand(
14874
14876
  Ot.id,
14875
14877
  { [t]: { [n]: i } }
@@ -14924,7 +14926,7 @@ let Vt = class extends re {
14924
14926
  subUnitId: t,
14925
14927
  formulaIdList: n
14926
14928
  };
14927
- this._commandService.executeCommand(ji.id, i);
14929
+ this._commandService.executeCommand(ki.id, i);
14928
14930
  const o = this._ensureCacheMap(e, t);
14929
14931
  n.forEach((u) => o.delete(u));
14930
14932
  }
@@ -14977,7 +14979,7 @@ let An = class extends re {
14977
14979
  const n = this._context.unit.getActiveSheet();
14978
14980
  if (!n) return;
14979
14981
  const i = n.getCell(a.location.row, a.location.col);
14980
- if (bi(i)) {
14982
+ if (Li(i)) {
14981
14983
  const o = ni(i);
14982
14984
  if (!o)
14983
14985
  return;
@@ -14985,7 +14987,7 @@ let An = class extends re {
14985
14987
  if (m && m.row === a.location.row && m.col === a.location.col && m.subUnitId === a.location.subUnitId && m.unitId === a.location.unitId)
14986
14988
  return;
14987
14989
  this._cellAlertManagerService.showAlert({
14988
- type: Xr.ERROR,
14990
+ type: wr.ERROR,
14989
14991
  title: this._localeService.t("formula.error.title"),
14990
14992
  message: this._localeService.t(`formula.error.${Nc[o]}`),
14991
14993
  location: a.location,
@@ -15001,8 +15003,8 @@ let An = class extends re {
15001
15003
  }
15002
15004
  };
15003
15005
  An = Rc([
15004
- un(1, U(Wr)),
15005
- un(2, U(Yr)),
15006
+ un(1, U(Gr)),
15007
+ un(2, U(Xr)),
15006
15008
  un(3, U(we))
15007
15009
  ], An);
15008
15010
  var Cc = Object.defineProperty, hc = Object.getOwnPropertyDescriptor, _c = (a, e, t, n) => {
@@ -15016,7 +15018,7 @@ const Mc = {
15016
15018
  color: "#409f11"
15017
15019
  }
15018
15020
  };
15019
- let ut = class extends Si {
15021
+ let ut = class extends Ai {
15020
15022
  constructor(a) {
15021
15023
  super(), this._sheetInterceptorService = a, this._init();
15022
15024
  }
@@ -15045,7 +15047,7 @@ var Dc = Object.defineProperty, gc = Object.getOwnPropertyDescriptor, xc = (a, e
15045
15047
  (u = a[o]) && (i = (n ? u(e, t, i) : u(i)) || i);
15046
15048
  return n && i && Dc(e, t, i), i;
15047
15049
  }, Be = (a, e) => (t, n) => e(t, n, a);
15048
- let st = class extends Kr {
15050
+ let st = class extends Wr {
15049
15051
  constructor(e, t, n, i, o, u, m) {
15050
15052
  super(
15051
15053
  t,
@@ -15084,18 +15086,18 @@ let st = class extends Kr {
15084
15086
  const e = this._getSheetObject(), { spreadsheetRowHeader: t, spreadsheetColumnHeader: n, spreadsheet: i, spreadsheetLeftTopPlaceholder: o } = e, { scene: u } = this._context, m = new mt();
15085
15087
  return m.add(i == null ? void 0 : i.onPointerDown$.subscribeEvent((c, f) => {
15086
15088
  var d;
15087
- console.warn("debug start dragging", (d = this._skeleton.worksheet) == null ? void 0 : d.getUnitId()), this._onPointerDown(c, i.zIndex + 1, fe.NORMAL, this._getActiveViewport(c)), c.button !== 2 && f.stopPropagation();
15089
+ console.warn("debug start dragging", (d = this._skeleton.worksheet) == null ? void 0 : d.getUnitId()), this._onPointerDown(c, i.zIndex + 1, ce.NORMAL, this._getActiveViewport(c)), c.button !== 2 && f.stopPropagation();
15088
15090
  })), m.add(
15089
15091
  t == null ? void 0 : t.onPointerDown$.subscribeEvent((c, f) => {
15090
15092
  const d = this._sheetSkeletonManagerService.getCurrent().skeleton, { row: s } = kn(c.offsetX, c.offsetY, u, d);
15091
- $n(this._workbookSelections.getCurrentSelections(), s, fe.ROW) || (this._onPointerDown(c, (i.zIndex || 1) + 1, fe.ROW, this._getActiveViewport(c), Vn.Y), c.button !== 2 && f.stopPropagation());
15093
+ $n(this._workbookSelections.getCurrentSelections(), s, ce.ROW) || (this._onPointerDown(c, (i.zIndex || 1) + 1, ce.ROW, this._getActiveViewport(c), Vn.Y), c.button !== 2 && f.stopPropagation());
15092
15094
  })
15093
15095
  ), m.add(n == null ? void 0 : n.onPointerDown$.subscribeEvent((c, f) => {
15094
15096
  const d = this._sheetSkeletonManagerService.getCurrent().skeleton, { column: s } = kn(c.offsetX, c.offsetY, u, d);
15095
- $n(this._workbookSelections.getCurrentSelections(), s, fe.COLUMN) || (this._onPointerDown(c, (i.zIndex || 1) + 1, fe.COLUMN, this._getActiveViewport(c), Vn.X), c.button !== 2 && f.stopPropagation());
15097
+ $n(this._workbookSelections.getCurrentSelections(), s, ce.COLUMN) || (this._onPointerDown(c, (i.zIndex || 1) + 1, ce.COLUMN, this._getActiveViewport(c), Vn.X), c.button !== 2 && f.stopPropagation());
15096
15098
  })), m.add(o == null ? void 0 : o.onPointerDown$.subscribeEvent((c, f) => {
15097
15099
  this._reset();
15098
- const d = this._sheetSkeletonManagerService.getCurrent().skeleton, s = kr(d), l = this.attachSelectionWithCoord(s);
15100
+ const d = this._sheetSkeletonManagerService.getCurrent().skeleton, s = Yr(d), l = this.attachSelectionWithCoord(s);
15099
15101
  this._addSelectionControlBySelectionData(l), this.refreshSelectionMoveStart(), c.button !== 2 && f.stopPropagation();
15100
15102
  })), m;
15101
15103
  }
@@ -15122,16 +15124,16 @@ let st = class extends Kr {
15122
15124
  this.disposeWithMe(this._sheetSkeletonManagerService.currentSkeleton$.subscribe((e) => {
15123
15125
  if (!e)
15124
15126
  return;
15125
- const { skeleton: t } = e, { scene: n } = this._context, i = n.getViewport(Zi.VIEW_MAIN);
15127
+ const { skeleton: t } = e, { scene: n } = this._context, i = n.getViewport(Qi.VIEW_MAIN);
15126
15128
  this._changeRuntime(t, n, i);
15127
15129
  }));
15128
15130
  }
15129
15131
  _getActiveViewport(e) {
15130
15132
  const t = this._getSheetObject();
15131
- return t == null ? void 0 : t.scene.getActiveViewportByCoord(Ji.FromArray([e.offsetX, e.offsetY]));
15133
+ return t == null ? void 0 : t.scene.getActiveViewportByCoord(zi.FromArray([e.offsetX, e.offsetY]));
15132
15134
  }
15133
15135
  _getSheetObject() {
15134
- return $r(this._context.unit, this._context);
15136
+ return Kr(this._context.unit, this._context);
15135
15137
  }
15136
15138
  };
15137
15139
  st = xc([
@@ -15143,7 +15145,7 @@ st = xc([
15143
15145
  Be(6, U(Nn))
15144
15146
  ], st);
15145
15147
  function vc(a) {
15146
- const e = gr(a);
15148
+ const e = Mr(a);
15147
15149
  return e.strokeDash = 8, e.hasAutoFill = !1, e.hasRowHeader = !1, e.hasColumnHeader = !1, e;
15148
15150
  }
15149
15151
  function cn(a, e, t) {
@@ -15167,7 +15169,7 @@ var yc = Object.defineProperty, Fc = Object.getOwnPropertyDescriptor, qc = (a, e
15167
15169
  (u = a[o]) && (i = (n ? u(e, t, i) : u(i)) || i);
15168
15170
  return n && i && yc(e, t, i), i;
15169
15171
  }, ae = (a, e) => (t, n) => e(t, n, a);
15170
- const Uc = [Ti, Ii];
15172
+ const Uc = [bi, Si];
15171
15173
  let Mt = class extends re {
15172
15174
  constructor(e, t, n, i, o, u, m, c, f, d, s, l, A, P, S) {
15173
15175
  super();
@@ -15555,7 +15557,7 @@ let Mt = class extends re {
15555
15557
  const P = t[l], { themeColor: S, token: p, refIndex: N } = P, I = De(p), { unitId: L, sheetName: h, range: M } = I;
15556
15558
  if (!m && (!L || !h))
15557
15559
  continue;
15558
- const x = xr(M, f.getRowCount(), f.getColumnCount());
15560
+ const x = Dr(M, f.getRowCount(), f.getColumnCount());
15559
15561
  if (L != null && L.length > 0 && n !== L)
15560
15562
  continue;
15561
15563
  const C = this._getSheetIdByName(n, h.trim());
@@ -15566,7 +15568,7 @@ let Mt = class extends re {
15566
15568
  d = y;
15567
15569
  continue;
15568
15570
  }
15569
- const v = vr(x, f);
15571
+ const v = gr(x, f);
15570
15572
  !Ce.equals(v, x) && x.startRow === x.endRow && x.startColumn === x.endColumn && (x.startRow = v.startRow, x.endRow = v.endRow, x.startColumn = v.startColumn, x.endColumn = v.endColumn), s.push({
15571
15573
  range: x,
15572
15574
  primary: v,
@@ -15600,7 +15602,7 @@ let Mt = class extends re {
15600
15602
  _getSheetIdByName(e, t) {
15601
15603
  var i;
15602
15604
  const n = this._univerInstanceService.getUniverSheetInstance(e);
15603
- return (i = n == null ? void 0 : n.getSheetBySheetName(Qi(t))) == null ? void 0 : i.getSheetId();
15605
+ return (i = n == null ? void 0 : n.getSheetBySheetName($i(t))) == null ? void 0 : i.getSheetId();
15604
15606
  }
15605
15607
  _getSheetNameById(e, t) {
15606
15608
  var o;
@@ -15717,7 +15719,7 @@ let Mt = class extends re {
15717
15719
  }
15718
15720
  _fitEditorSize() {
15719
15721
  const t = this._univerInstanceService.getCurrentUniverDocInstance().getUnitId();
15720
- this._editorService.isEditor(t) && !this._editorService.isSheetEditor(t) || this._commandService.executeCommand(io.id, {
15722
+ this._editorService.isEditor(t) && !this._editorService.isSheetEditor(t) || this._commandService.executeCommand(no.id, {
15721
15723
  unitId: t
15722
15724
  });
15723
15725
  }
@@ -15784,7 +15786,7 @@ let Mt = class extends re {
15784
15786
  continue;
15785
15787
  const I = n.find((L) => {
15786
15788
  const { startRow: h, startColumn: M, endRow: x, endColumn: C, rangeType: y } = L.getRange();
15787
- return y === fe.COLUMN && M === p.startColumn && C === p.endColumn || y === fe.ROW && h === p.startRow && x === p.endRow || h === p.startRow && M === p.startColumn && x === p.endRow && C === p.endColumn || h === p.startRow && M === p.startColumn && p.startRow === p.endRow && p.startColumn === p.endColumn;
15789
+ return y === ce.COLUMN && M === p.startColumn && C === p.endColumn || y === ce.ROW && h === p.startRow && x === p.endRow || h === p.startRow && M === p.startColumn && x === p.endRow && C === p.endColumn || h === p.startRow && M === p.startColumn && p.startRow === p.endRow && p.startColumn === p.endColumn;
15788
15790
  });
15789
15791
  if (I) {
15790
15792
  const L = cn(this._themeService, s, d.toString());
@@ -15800,7 +15802,7 @@ let Mt = class extends re {
15800
15802
  if (!i || !ie.isStringNumber(i))
15801
15803
  return;
15802
15804
  let { startRow: o, endRow: u, startColumn: m, endColumn: c } = e;
15803
- const f = Ei(o, m, n == null ? void 0 : n.mergeData);
15805
+ const f = Pi(o, m, n == null ? void 0 : n.mergeData);
15804
15806
  if (f) {
15805
15807
  const {
15806
15808
  isMerged: N,
@@ -15816,7 +15818,7 @@ let Mt = class extends re {
15816
15818
  let l = { startAbsoluteRefType: ee.NONE };
15817
15819
  if (typeof s != "string") {
15818
15820
  const N = s.token;
15819
- l = zi(N), l.endAbsoluteRefType == null && (l.endAbsoluteRefType = l.startAbsoluteRefType);
15821
+ l = ji(N), l.endAbsoluteRefType == null && (l.endAbsoluteRefType = l.startAbsoluteRefType);
15820
15822
  }
15821
15823
  const A = this._generateRefString({
15822
15824
  range: {
@@ -15836,7 +15838,7 @@ let Mt = class extends re {
15836
15838
  _refreshFormulaAndCellEditor(e) {
15837
15839
  var t;
15838
15840
  for (const n of e) {
15839
- const i = jr(n, this._renderManagerService), o = i == null ? void 0 : i.document;
15841
+ const i = kr(n, this._renderManagerService), o = i == null ? void 0 : i.document;
15840
15842
  o != null && ((t = o.getSkeleton()) == null || t.calculate(), o.makeDirty());
15841
15843
  }
15842
15844
  }
@@ -16041,7 +16043,7 @@ let Mt = class extends re {
16041
16043
  Mt = qc([
16042
16044
  Le(Ae.Steady, Mt),
16043
16045
  ae(0, le),
16044
- ae(1, Ri),
16046
+ ae(1, Ei),
16045
16047
  ae(2, La),
16046
16048
  ae(3, U(Fa)),
16047
16049
  ae(4, U(ye)),
@@ -16053,7 +16055,7 @@ Mt = qc([
16053
16055
  ae(10, Pe),
16054
16056
  ae(11, U(We)),
16055
16057
  ae(12, U(bo)),
16056
- ae(13, ro),
16058
+ ae(13, ao),
16057
16059
  ae(14, Xe)
16058
16060
  ], Mt);
16059
16061
  var oi = Object.defineProperty, Bc = Object.getOwnPropertyDescriptor, Vc = (a, e, t) => e in a ? oi(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t, gn = (a, e, t, n) => {
@@ -16068,7 +16070,7 @@ let wt = class extends Pn {
16068
16070
  onStarting(a) {
16069
16071
  a.add([qt]), a.get(fa).registerChannel(
16070
16072
  Dn,
16071
- Ni(a.get(qt))
16073
+ Ii(a.get(qt))
16072
16074
  );
16073
16075
  }
16074
16076
  };
@@ -16085,7 +16087,7 @@ let Gt = class extends Pn {
16085
16087
  onStarting() {
16086
16088
  const a = this._injector, e = [
16087
16089
  [ye, { useClass: Xa }],
16088
- [Rn, { useClass: yr }],
16090
+ [Rn, { useClass: xr }],
16089
16091
  [We, { useFactory: () => {
16090
16092
  var t;
16091
16093
  return a.createInstance(Ft, (t = this._config) == null ? void 0 : t.description);
@@ -16108,7 +16110,7 @@ let Gt = class extends Pn {
16108
16110
  if (this._config.notExecuteFormula) {
16109
16111
  const t = a.get(fa);
16110
16112
  e.push([ii, {
16111
- useFactory: () => Ci(t.requestChannel(Dn))
16113
+ useFactory: () => Ri(t.requestChannel(Dn))
16112
16114
  }]);
16113
16115
  }
16114
16116
  e.forEach((t) => a.add(t));