@univerjs/sheets 0.10.2 → 0.10.3

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/facade.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var tt = Object.defineProperty;
2
2
  var nt = (r, e, t) => e in r ? tt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var E = (r, e, t) => nt(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { Inject as u, Injector as P, ICommandService as l, IPermissionService as ue, IAuthzIoService as Fe, LocaleService as He, generateRandomId as Oe, Rectangle as x, cellToRange as rt, RANGE_TYPE as w, HorizontalAlign as T, VerticalAlign as A, TextStyleValue as we, RichTextValue as M, BooleanNumber as g, WrapStrategy as L, DEFAULT_STYLES as ke, covertCellValue as re, covertCellValues as Se, Dimension as N, isNullCell as D, ILogService as je, Direction as H, ObjectMatrix as J, IResourceLoaderService as st, IUniverInstanceService as se, mergeWorksheetSnapshotWithDefault as Ce, Tools as ve, UndoCommand as ot, RedoCommand as it, toDisposable as Le, UniverInstanceType as U, CanceledError as f } from "@univerjs/core";
3
+ var p = (r, e, t) => nt(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { Inject as g, Injector as P, ICommandService as m, IPermissionService as ue, IAuthzIoService as Fe, LocaleService as He, generateRandomId as Oe, Rectangle as x, cellToRange as rt, RANGE_TYPE as k, HorizontalAlign as T, VerticalAlign as A, TextStyleValue as we, RichTextValue as M, BooleanNumber as l, WrapStrategy as L, DEFAULT_STYLES as ke, covertCellValue as re, covertCellValues as Se, Dimension as N, isNullCell as D, ILogService as je, Direction as H, ObjectMatrix as J, IResourceLoaderService as st, IUniverInstanceService as se, mergeWorksheetSnapshotWithDefault as Ce, Tools as ve, UndoCommand as ot, RedoCommand as it, toDisposable as Le, UniverInstanceType as U, CanceledError as f } from "@univerjs/core";
5
5
  import { FBase as ge, FBaseInitialable as le, FUniver as ze, FEnum as at, FEventName as ht } from "@univerjs/core/facade";
6
- import { WorksheetProtectionRuleModel as Ge, RangeProtectionRuleModel as $e, WorksheetProtectionPointModel as qe, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as F, SetDefinedNameCommand as oe, RemoveDefinedNameCommand as dt, PermissionPointsDefinitions as ct, WorkbookEditablePermission as Ke, UnitObject as W, AddWorksheetProtectionMutation as ut, DeleteWorksheetProtectionMutation as gt, getAllWorksheetPermissionPoint as lt, getAllWorksheetPermissionPointByPointPanel as fe, SetWorksheetPermissionPointsMutation as mt, AddRangeProtectionMutation as _t, DeleteRangeProtectionMutation as wt, SetRangeProtectionMutation as kt, WorksheetEditPermission as St, WorksheetViewPermission as Ct, SetBorderBasicCommand as vt, SetStyleCommand as b, SetTextRotationCommand as ft, SetRangeValuesCommand as B, SetTextWrapCommand as ie, SetVerticalTextAlignCommand as It, SetHorizontalTextAlignCommand as Rt, addMergeCellsUtil as Q, getAddMergeMutationRangeByType as Ie, RemoveWorksheetMergeCommand as bt, getPrimaryForRange as z, SetSelectionsOperation as me, SplitTextToColumnsCommand as pt, SetWorksheetRangeThemeStyleCommand as Et, DeleteWorksheetRangeThemeStyleCommand as yt, SheetRangeThemeService as Ye, ClearSelectionAllCommand as Je, ClearSelectionContentCommand as Qe, ClearSelectionFormatCommand as Xe, InsertRangeMoveDownCommand as Ut, InsertRangeMoveRightCommand as xt, DeleteRangeMoveUpCommand as Pt, DeleteRangeMoveLeftCommand as Mt, getNextPrimaryCell as Nt, SheetsSelectionsService as Ze, SetWorksheetDefaultStyleMutation as Tt, SetColDataCommand as Re, SetRowDataCommand as be, copyRangeStyles as O, InsertRowByRangeCommand as pe, RemoveRowByRangeCommand as At, MoveRowsCommand as Dt, SetRowHiddenCommand as Ee, SetSpecificRowsVisibleCommand as ye, SetWorksheetRowIsAutoHeightMutation as Wt, SetRowHeightCommand as Ue, SetWorksheetRowIsAutoHeightCommand as X, InsertColByRangeCommand as xe, RemoveColByRangeCommand as Bt, MoveColsCommand as Vt, SetColHiddenCommand as Pe, SetSpecificColsVisibleCommand as Me, SetColWidthCommand as Ft, SetFrozenCommand as Z, CancelFrozenCommand as Ht, ToggleGridlinesCommand as ae, SetGridlinesColorCommand as he, SetTabColorCommand as Ot, SetRangeValuesMutation as Ne, SetWorksheetHideCommand as jt, SetWorksheetShowCommand as Lt, SetWorksheetNameCommand as de, AppendRowCommand as zt, SetWorksheetRowCountCommand as Gt, SetWorksheetColumnCountCommand as $t, SetWorkbookNameCommand as qt, InsertSheetCommand as G, SetWorksheetActiveOperation as V, RemoveSheetCommand as ce, CopySheetCommand as Kt, SetWorksheetOrderCommand as Yt, RegisterWorksheetRangeThemeStyleCommand as Jt, UnregisterWorksheetRangeThemeStyleCommand as Qt, RangeThemeStyle as Xt, SetWorksheetOrderMutation as Te, SetTabColorMutation as Ae, SetWorksheetHideMutation as De, COMMAND_LISTENER_VALUE_CHANGE as Zt, getValueChangedEffectedRange as en, SheetValueChangeType as tn, SheetSkeletonChangeType as nn, SplitDelimiterEnum as rn } from "@univerjs/sheets";
6
+ import { WorksheetProtectionRuleModel as Ge, RangeProtectionRuleModel as $e, WorksheetProtectionPointModel as qe, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as F, SetDefinedNameCommand as oe, RemoveDefinedNameCommand as dt, PermissionPointsDefinitions as ct, WorkbookEditablePermission as Ke, UnitObject as W, AddWorksheetProtectionMutation as ut, DeleteWorksheetProtectionMutation as gt, getAllWorksheetPermissionPoint as lt, getAllWorksheetPermissionPointByPointPanel as fe, SetWorksheetPermissionPointsMutation as mt, AddRangeProtectionMutation as _t, DeleteRangeProtectionMutation as wt, SetRangeProtectionMutation as kt, WorksheetEditPermission as St, WorksheetViewPermission as Ct, SetBorderBasicCommand as vt, SetStyleCommand as b, SetTextRotationCommand as ft, SetRangeValuesCommand as B, SetTextWrapCommand as ie, SetVerticalTextAlignCommand as It, SetHorizontalTextAlignCommand as Rt, addMergeCellsUtil as Q, getAddMergeMutationRangeByType as Ie, RemoveWorksheetMergeCommand as bt, getPrimaryForRange as z, SetSelectionsOperation as me, SplitTextToColumnsCommand as Et, SetWorksheetRangeThemeStyleCommand as pt, DeleteWorksheetRangeThemeStyleCommand as yt, SheetRangeThemeService as Ye, ClearSelectionAllCommand as Je, ClearSelectionContentCommand as Qe, ClearSelectionFormatCommand as Xe, InsertRangeMoveDownCommand as Ut, InsertRangeMoveRightCommand as xt, DeleteRangeMoveUpCommand as Pt, DeleteRangeMoveLeftCommand as Mt, getNextPrimaryCell as Nt, SheetsSelectionsService as Ze, SetWorksheetDefaultStyleMutation as Tt, SetColDataCommand as Re, SetRowDataCommand as be, copyRangeStyles as O, InsertRowByRangeCommand as Ee, RemoveRowByRangeCommand as At, MoveRowsCommand as Dt, SetRowHiddenCommand as pe, SetSpecificRowsVisibleCommand as ye, SetWorksheetRowIsAutoHeightMutation as Wt, SetRowHeightCommand as Ue, SetWorksheetRowIsAutoHeightCommand as X, InsertColByRangeCommand as xe, RemoveColByRangeCommand as Bt, MoveColsCommand as Vt, SetColHiddenCommand as Pe, SetSpecificColsVisibleCommand as Me, SetColWidthCommand as Ft, SetFrozenCommand as Z, CancelFrozenCommand as Ht, ToggleGridlinesCommand as ae, SetGridlinesColorCommand as he, SetTabColorCommand as Ot, SetRangeValuesMutation as Ne, SetWorksheetHideCommand as jt, SetWorksheetShowCommand as Lt, SetWorksheetNameCommand as de, AppendRowCommand as zt, SetWorksheetRowCountCommand as Gt, SetWorksheetColumnCountCommand as $t, SetWorkbookNameCommand as qt, InsertSheetCommand as G, SetWorksheetActiveOperation as V, RemoveSheetCommand as ce, CopySheetCommand as Kt, SetWorksheetOrderCommand as Yt, RegisterWorksheetRangeThemeStyleCommand as Jt, UnregisterWorksheetRangeThemeStyleCommand as Qt, RangeThemeStyle as Xt, SetWorksheetOrderMutation as Te, SetTabColorMutation as Ae, SetWorksheetHideMutation as De, COMMAND_LISTENER_VALUE_CHANGE as Zt, getValueChangedEffectedRange as en, SheetValueChangeType as tn, SheetSkeletonChangeType as nn, SplitDelimiterEnum as rn } from "@univerjs/sheets";
7
7
  import { IDefinedNamesService as et, serializeRange as _e, FormulaDataModel as sn, serializeRangeWithSheet as on, deserializeRangeWithSheet as an } from "@univerjs/engine-formula";
8
8
  var hn = Object.getOwnPropertyDescriptor, dn = (r, e, t, n) => {
9
9
  for (var s = n > 1 ? void 0 : n ? hn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
@@ -27,7 +27,7 @@ function cn(r, e, t) {
27
27
  }
28
28
  class Y {
29
29
  constructor() {
30
- E(this, "_definedNameParam");
30
+ p(this, "_definedNameParam");
31
31
  this._definedNameParam = {
32
32
  id: Oe(10),
33
33
  unitId: "",
@@ -448,14 +448,14 @@ let $ = class extends ge {
448
448
  }
449
449
  };
450
450
  $ = dn([
451
- I(1, u(P)),
452
- I(2, l),
451
+ I(1, g(P)),
452
+ I(2, m),
453
453
  I(3, ue),
454
- I(4, u(Ge)),
455
- I(5, u($e)),
456
- I(6, u(qe)),
457
- I(7, u(Fe)),
458
- I(8, u(He)),
454
+ I(4, g(Ge)),
455
+ I(5, g($e)),
456
+ I(6, g(qe)),
457
+ I(7, g(Fe)),
458
+ I(8, g(He)),
459
459
  I(9, et)
460
460
  ], $);
461
461
  var un = Object.getOwnPropertyDescriptor, gn = (r, e, t, n) => {
@@ -469,15 +469,15 @@ let q = class extends ge {
469
469
  /**
470
470
  * Permission point definition, can read the point constructor want to modify from here
471
471
  */
472
- E(this, "permissionPointsDefinition", ct);
472
+ p(this, "permissionPointsDefinition", ct);
473
473
  /**
474
474
  * An observable object used to monitor permission change events within a range, thereby triggering corresponding subsequent processing.
475
475
  */
476
- E(this, "rangeRuleChangedAfterAuth$");
476
+ p(this, "rangeRuleChangedAfterAuth$");
477
477
  /**
478
478
  * An observable object used to monitor permission change events within a worksheet, thereby triggering corresponding subsequent processing.
479
479
  */
480
- E(this, "sheetRuleChangedAfterAuth$");
480
+ p(this, "sheetRuleChangedAfterAuth$");
481
481
  this._injector = e, this._commandService = t, this._permissionService = n, this._worksheetProtectionRuleModel = s, this._rangeProtectionRuleModel = o, this._worksheetProtectionPointRuleModel = i, this._authzIoService = a, this.rangeRuleChangedAfterAuth$ = this._rangeProtectionRuleModel.ruleRefresh$, this.sheetRuleChangedAfterAuth$ = this._worksheetProtectionRuleModel.ruleRefresh$;
482
482
  }
483
483
  /**
@@ -674,7 +674,7 @@ let q = class extends ge {
674
674
  }), o = `ruleId_${Oe(6)}`;
675
675
  if (this._worksheetProtectionRuleModel.getRule(e, t))
676
676
  throw new Error("sheet protection cannot intersect with range protection");
677
- if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).some((c) => c.ranges.some((C) => n.some((_) => x.intersects(_.getRange(), C)))))
677
+ if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).some((c) => c.ranges.some((u) => n.some((w) => x.intersects(w.getRange(), u)))))
678
678
  throw new Error("range protection cannot intersect");
679
679
  if (this._commandService.syncExecuteCommand(_t.id, {
680
680
  unitId: e,
@@ -845,13 +845,13 @@ let q = class extends ge {
845
845
  }
846
846
  };
847
847
  q = gn([
848
- y(0, u(P)),
849
- y(1, l),
848
+ y(0, g(P)),
849
+ y(1, m),
850
850
  y(2, ue),
851
- y(3, u(Ge)),
852
- y(4, u($e)),
853
- y(5, u(qe)),
854
- y(6, u(Fe))
851
+ y(3, g(Ge)),
852
+ y(4, g($e)),
853
+ y(5, g(qe)),
854
+ y(6, g(Fe))
855
855
  ], q);
856
856
  function ln(r) {
857
857
  switch (r) {
@@ -907,7 +907,7 @@ function ee(r, e) {
907
907
  endRow: r.endRow,
908
908
  startColumn: 0,
909
909
  endColumn: e.getColumnCount() - 1,
910
- rangeType: w.ROW
910
+ rangeType: k.ROW
911
911
  };
912
912
  }
913
913
  function te(r, e) {
@@ -916,7 +916,7 @@ function te(r, e) {
916
916
  endRow: e.getRowCount() - 1,
917
917
  startColumn: r.startColumn,
918
918
  endColumn: r.endColumn,
919
- rangeType: w.COLUMN
919
+ rangeType: k.COLUMN
920
920
  };
921
921
  }
922
922
  var _n = Object.getOwnPropertyDescriptor, wn = (r, e, t, n) => {
@@ -924,7 +924,7 @@ var _n = Object.getOwnPropertyDescriptor, wn = (r, e, t, n) => {
924
924
  (i = r[o]) && (s = i(s) || s);
925
925
  return s;
926
926
  }, ne = (r, e) => (t, n) => e(t, n, r);
927
- let m = class extends le {
927
+ let _ = class extends le {
928
928
  constructor(r, e, t, n, s, o) {
929
929
  super(n), this._workbook = r, this._worksheet = e, this._range = t, this._injector = n, this._commandService = s, this._formulaDataModel = o;
930
930
  }
@@ -1220,9 +1220,9 @@ let m = class extends le {
1220
1220
  * ```
1221
1221
  */
1222
1222
  getRawValue() {
1223
- var e;
1223
+ var e, t;
1224
1224
  const r = this._worksheet.getCellMatrix().getValue(this._range.startRow, this._range.startColumn);
1225
- return r != null && r.p && ((e = r.p.body) != null && e.dataStream) ? r.p.body.dataStream : r != null && r.v ? r.v : null;
1225
+ return r != null && r.p && ((e = r.p.body) != null && e.dataStream) ? r.p.body.dataStream : (t = r == null ? void 0 : r.v) != null ? t : null;
1226
1226
  }
1227
1227
  /**
1228
1228
  * Returns the displayed value of the top-left cell in the range. The value is a String. Empty cells return an empty string.
@@ -1244,9 +1244,9 @@ let m = class extends le {
1244
1244
  * ```
1245
1245
  */
1246
1246
  getDisplayValue() {
1247
- var e;
1247
+ var e, t, n;
1248
1248
  const r = this._worksheet.getCell(this._range.startRow, this._range.startColumn);
1249
- return r != null && r.p && ((e = r.p.body) != null && e.dataStream) ? r.p.body.dataStream : r != null && r.v ? String(r.v) : "";
1249
+ return r != null && r.p && ((e = r.p.body) != null && e.dataStream) ? r.p.body.dataStream : (n = (t = r == null ? void 0 : r.v) == null ? void 0 : t.toString()) != null ? n : "";
1250
1250
  }
1251
1251
  getValues(r) {
1252
1252
  var i, a;
@@ -1304,15 +1304,15 @@ let m = class extends le {
1304
1304
  * ```
1305
1305
  */
1306
1306
  getRawValues() {
1307
- var i;
1307
+ var i, a;
1308
1308
  const r = this._worksheet.getCellMatrix(), { startRow: e, endRow: t, startColumn: n, endColumn: s } = this._range, o = [];
1309
- for (let a = e; a <= t; a++) {
1310
- const h = [];
1311
- for (let d = n; d <= s; d++) {
1312
- const c = r.getValue(a, d);
1313
- c != null && c.p && ((i = c.p.body) != null && i.dataStream) ? h.push(c.p.body.dataStream) : c != null && c.v ? h.push(c.v) : h.push(null);
1309
+ for (let h = e; h <= t; h++) {
1310
+ const d = [];
1311
+ for (let c = n; c <= s; c++) {
1312
+ const u = r.getValue(h, c);
1313
+ u != null && u.p && ((i = u.p.body) != null && i.dataStream) ? d.push(u.p.body.dataStream) : d.push((a = u == null ? void 0 : u.v) != null ? a : null);
1314
1314
  }
1315
- o.push(h);
1315
+ o.push(d);
1316
1316
  }
1317
1317
  return o;
1318
1318
  }
@@ -1359,15 +1359,15 @@ let m = class extends le {
1359
1359
  * ```
1360
1360
  */
1361
1361
  getDisplayValues() {
1362
- var o;
1362
+ var o, i, a;
1363
1363
  const { startRow: r, endRow: e, startColumn: t, endColumn: n } = this._range, s = [];
1364
- for (let i = r; i <= e; i++) {
1365
- const a = [];
1366
- for (let h = t; h <= n; h++) {
1367
- const d = this._worksheet.getCell(i, h);
1368
- d != null && d.p && ((o = d.p.body) != null && o.dataStream) ? a.push(d.p.body.dataStream) : d != null && d.v ? a.push(String(d.v)) : a.push("");
1364
+ for (let h = r; h <= e; h++) {
1365
+ const d = [];
1366
+ for (let c = t; c <= n; c++) {
1367
+ const u = this._worksheet.getCell(h, c);
1368
+ u != null && u.p && ((o = u.p.body) != null && o.dataStream) ? d.push(u.p.body.dataStream) : d.push((a = (i = u == null ? void 0 : u.v) == null ? void 0 : i.toString()) != null ? a : "");
1369
1369
  }
1370
- s.push(a);
1370
+ s.push(d);
1371
1371
  }
1372
1372
  return s;
1373
1373
  }
@@ -1540,7 +1540,7 @@ let m = class extends le {
1540
1540
  * ```
1541
1541
  */
1542
1542
  getWrap() {
1543
- return this._worksheet.getRange(this._range).getWrap() === g.TRUE;
1543
+ return this._worksheet.getRange(this._range).getWrap() === l.TRUE;
1544
1544
  }
1545
1545
  /**
1546
1546
  * Gets whether text wrapping is enabled for cells in the range.
@@ -2061,9 +2061,9 @@ let m = class extends le {
2061
2061
  setFontWeight(r) {
2062
2062
  let e;
2063
2063
  if (r === "bold")
2064
- e = g.TRUE;
2064
+ e = l.TRUE;
2065
2065
  else if (r === "normal")
2066
- e = g.FALSE;
2066
+ e = l.FALSE;
2067
2067
  else if (r === null)
2068
2068
  e = null;
2069
2069
  else
@@ -2094,9 +2094,9 @@ let m = class extends le {
2094
2094
  setFontStyle(r) {
2095
2095
  let e;
2096
2096
  if (r === "italic")
2097
- e = g.TRUE;
2097
+ e = l.TRUE;
2098
2098
  else if (r === "normal")
2099
- e = g.FALSE;
2099
+ e = l.FALSE;
2100
2100
  else if (r === null)
2101
2101
  e = null;
2102
2102
  else
@@ -2127,17 +2127,17 @@ let m = class extends le {
2127
2127
  setFontLine(r) {
2128
2128
  if (r === "underline")
2129
2129
  this._setFontUnderline({
2130
- s: g.TRUE
2130
+ s: l.TRUE
2131
2131
  });
2132
2132
  else if (r === "line-through")
2133
2133
  this._setFontStrikethrough({
2134
- s: g.TRUE
2134
+ s: l.TRUE
2135
2135
  });
2136
2136
  else if (r === "none")
2137
2137
  this._setFontUnderline({
2138
- s: g.FALSE
2138
+ s: l.FALSE
2139
2139
  }), this._setFontStrikethrough({
2140
- s: g.FALSE
2140
+ s: l.FALSE
2141
2141
  });
2142
2142
  else if (r === null)
2143
2143
  this._setFontUnderline(null), this._setFontStrikethrough(null);
@@ -2423,7 +2423,7 @@ let m = class extends le {
2423
2423
  * ```
2424
2424
  */
2425
2425
  activate() {
2426
- return this._injector.createInstance(S, this._workbook).setActiveRange(this), this;
2426
+ return this._injector.createInstance(C, this._workbook).setActiveRange(this), this;
2427
2427
  }
2428
2428
  /**
2429
2429
  * Sets the specified cell as the current cell.
@@ -2460,7 +2460,7 @@ let m = class extends le {
2460
2460
  activateAsCurrentCell() {
2461
2461
  const r = this._worksheet.getMergedCell(this._range.startRow, this._range.startColumn);
2462
2462
  if (r && x.equals(r, this._range) || !r && this._range.startRow === this._range.endRow && this._range.startColumn === this._range.endColumn) {
2463
- const n = this._injector.createInstance(S, this._workbook).getActiveRange();
2463
+ const n = this._injector.createInstance(C, this._workbook).getActiveRange();
2464
2464
  if (!n || n.getUnitId() !== this.getUnitId() || n.getSheetId() !== this.getSheetId())
2465
2465
  return this.activate();
2466
2466
  if (x.contains(n.getRange(), this._range)) {
@@ -2516,7 +2516,7 @@ let m = class extends le {
2516
2516
  * ```
2517
2517
  */
2518
2518
  splitTextToColumns(r, e, t) {
2519
- this._commandService.syncExecuteCommand(pt.id, {
2519
+ this._commandService.syncExecuteCommand(Et.id, {
2520
2520
  unitId: this._workbook.getUnitId(),
2521
2521
  subUnitId: this._worksheet.getSheetId(),
2522
2522
  range: this._range,
@@ -2541,7 +2541,7 @@ let m = class extends le {
2541
2541
  const e = this.getUsedThemeStyle();
2542
2542
  e && this.removeThemeStyle(e);
2543
2543
  } else
2544
- this._commandService.syncExecuteCommand(Et.id, {
2544
+ this._commandService.syncExecuteCommand(pt.id, {
2545
2545
  unitId: this._workbook.getUnitId(),
2546
2546
  subUnitId: this._worksheet.getSheetId(),
2547
2547
  range: this._range,
@@ -2816,24 +2816,24 @@ let m = class extends le {
2816
2816
  // eslint-disable-next-line complexity
2817
2817
  getDataRegion(r) {
2818
2818
  const { startRow: e, startColumn: t, endRow: n, endColumn: s } = this._range, o = this._worksheet.getMaxRows(), i = this._worksheet.getMaxColumns(), a = this._worksheet.getCellMatrix();
2819
- let h = e, d = t, c = n, C = s;
2819
+ let h = e, d = t, c = n, u = s;
2820
2820
  if (r !== N.COLUMNS) {
2821
- let _ = !1, p = !1;
2822
- for (let v = t; v <= s && (e > 0 && !D(a.getValue(e - 1, v)) && (_ = !0), n < o - 1 && !D(a.getValue(n + 1, v)) && (p = !0), !(_ && p)); v++)
2821
+ let w = !1, E = !1;
2822
+ for (let v = t; v <= s && (e > 0 && !D(a.getValue(e - 1, v)) && (w = !0), n < o - 1 && !D(a.getValue(n + 1, v)) && (E = !0), !(w && E)); v++)
2823
2823
  ;
2824
- _ && (h = e - 1), p && (c = n + 1);
2824
+ w && (h = e - 1), E && (c = n + 1);
2825
2825
  }
2826
2826
  if (r !== N.ROWS) {
2827
- let _ = !1, p = !1;
2828
- for (let v = e; v <= n && (t > 0 && !D(a.getValue(v, t - 1)) && (_ = !0), s < i - 1 && !D(a.getValue(v, s + 1)) && (p = !0), !(_ && p)); v++)
2827
+ let w = !1, E = !1;
2828
+ for (let v = e; v <= n && (t > 0 && !D(a.getValue(v, t - 1)) && (w = !0), s < i - 1 && !D(a.getValue(v, s + 1)) && (E = !0), !(w && E)); v++)
2829
2829
  ;
2830
- _ && (d = t - 1), p && (C = s + 1);
2830
+ w && (d = t - 1), E && (u = s + 1);
2831
2831
  }
2832
- return this._injector.createInstance(m, this._workbook, this._worksheet, {
2832
+ return this._injector.createInstance(_, this._workbook, this._worksheet, {
2833
2833
  startRow: h,
2834
2834
  startColumn: d,
2835
2835
  endRow: c,
2836
- endColumn: C
2836
+ endColumn: u
2837
2837
  });
2838
2838
  }
2839
2839
  /**
@@ -2886,14 +2886,14 @@ let m = class extends le {
2886
2886
  * ```
2887
2887
  */
2888
2888
  offset(r, e, t, n) {
2889
- const { startRow: s, startColumn: o, endRow: i, endColumn: a } = this._range, h = s + r, d = o + e, c = t ? h + t - 1 : i + r, C = n ? d + n - 1 : a + e;
2890
- if (h < 0 || d < 0 || c < 0 || C < 0)
2889
+ const { startRow: s, startColumn: o, endRow: i, endColumn: a } = this._range, h = s + r, d = o + e, c = t ? h + t - 1 : i + r, u = n ? d + n - 1 : a + e;
2890
+ if (h < 0 || d < 0 || c < 0 || u < 0)
2891
2891
  throw new Error("The row or column index is out of range");
2892
- return this._injector.createInstance(m, this._workbook, this._worksheet, {
2892
+ return this._injector.createInstance(_, this._workbook, this._worksheet, {
2893
2893
  startRow: h,
2894
2894
  startColumn: d,
2895
2895
  endRow: c,
2896
- endColumn: C
2896
+ endColumn: u
2897
2897
  });
2898
2898
  }
2899
2899
  /**
@@ -2934,11 +2934,11 @@ let m = class extends le {
2934
2934
  return this.setValues(r.map((e) => e.map((t) => ({ f: t }))));
2935
2935
  }
2936
2936
  };
2937
- m = wn([
2938
- ne(3, u(P)),
2939
- ne(4, l),
2940
- ne(5, u(sn))
2941
- ], m);
2937
+ _ = wn([
2938
+ ne(3, g(P)),
2939
+ ne(4, m),
2940
+ ne(5, g(sn))
2941
+ ], _);
2942
2942
  var kn = Object.getOwnPropertyDescriptor, Sn = (r, e, t, n) => {
2943
2943
  for (var s = n > 1 ? void 0 : n ? kn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
2944
2944
  (i = r[o]) && (s = i(s) || s);
@@ -2963,7 +2963,7 @@ let K = class {
2963
2963
  */
2964
2964
  getActiveRange() {
2965
2965
  const r = this._selections.find((e) => !!e.primary);
2966
- return r ? this._injector.createInstance(m, this._workbook, this._worksheet, r.range) : null;
2966
+ return r ? this._injector.createInstance(_, this._workbook, this._worksheet, r.range) : null;
2967
2967
  }
2968
2968
  /**
2969
2969
  * Represents the active selection list in the sheet.
@@ -2980,7 +2980,7 @@ let K = class {
2980
2980
  * ```
2981
2981
  */
2982
2982
  getActiveRangeList() {
2983
- return this._selections.map((r) => this._injector.createInstance(m, this._workbook, this._worksheet, r.range));
2983
+ return this._selections.map((r) => this._injector.createInstance(_, this._workbook, this._worksheet, r.range));
2984
2984
  }
2985
2985
  /**
2986
2986
  * Represents the current select cell in the sheet.
@@ -3015,8 +3015,8 @@ let K = class {
3015
3015
  * ```
3016
3016
  */
3017
3017
  getActiveSheet() {
3018
- const r = this._injector.createInstance(S, this._workbook);
3019
- return this._injector.createInstance(k, r, this._workbook, this._worksheet);
3018
+ const r = this._injector.createInstance(C, this._workbook);
3019
+ return this._injector.createInstance(S, r, this._workbook, this._worksheet);
3020
3020
  }
3021
3021
  /**
3022
3022
  * Update the primary cell in the selection. if the primary cell not exists in selections, add it to the selections and clear the old selections.
@@ -3040,7 +3040,7 @@ let K = class {
3040
3040
  * ```
3041
3041
  */
3042
3042
  updatePrimaryCell(r) {
3043
- const e = this._injector.get(l);
3043
+ const e = this._injector.get(m);
3044
3044
  let t = [], n = !1;
3045
3045
  for (const { range: o, style: i } of this._selections)
3046
3046
  x.contains(o, r.getRange()) ? (t.push({
@@ -3094,18 +3094,18 @@ let K = class {
3094
3094
  if (!this._selections.find((n) => !!n.primary))
3095
3095
  return null;
3096
3096
  const t = Nt(this._selections.concat(), r, this._worksheet);
3097
- return t ? this._injector.createInstance(m, this._workbook, this._worksheet, t) : null;
3097
+ return t ? this._injector.createInstance(_, this._workbook, this._worksheet, t) : null;
3098
3098
  }
3099
3099
  };
3100
3100
  K = Sn([
3101
- Cn(3, u(P))
3101
+ Cn(3, g(P))
3102
3102
  ], K);
3103
3103
  var vn = Object.getOwnPropertyDescriptor, fn = (r, e, t, n) => {
3104
3104
  for (var s = n > 1 ? void 0 : n ? vn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
3105
3105
  (i = r[o]) && (s = i(s) || s);
3106
3106
  return s;
3107
3107
  }, j = (r, e) => (t, n) => e(t, n, r);
3108
- let k = class extends le {
3108
+ let S = class extends le {
3109
3109
  /**
3110
3110
  * Creates a new worksheet facade instance
3111
3111
  * @param {FWorkbook} _fWorkbook - The facade workbook instance
@@ -3128,7 +3128,7 @@ let k = class extends le {
3128
3128
  * fWorkSheet.setActiveSelection(fWorkSheet.getRange('A10:B10'));
3129
3129
  * ```
3130
3130
  */
3131
- E(this, "setActiveSelection", this.setActiveRange);
3131
+ p(this, "setActiveSelection", this.setActiveRange);
3132
3132
  this._fWorkbook = e, this._workbook = t, this._worksheet = n, this._injector = s, this._selectionManagerService = o, this._logService = i, this._commandService = a;
3133
3133
  }
3134
3134
  /**
@@ -3349,11 +3349,11 @@ let k = class extends le {
3349
3349
  sheetId: i.getSheetId(),
3350
3350
  // Use the current range instead of the future actual range to match Apps Script behavior.
3351
3351
  // Users can create the latest range in real time when needed.
3352
- rangeType: w.NORMAL,
3353
- startRow: a.rangeType === w.COLUMN ? 0 : a.startRow,
3354
- endRow: a.rangeType === w.COLUMN ? i.getMaxRows() - 1 : a.endRow,
3355
- startColumn: a.rangeType === w.ROW ? 0 : a.startColumn,
3356
- endColumn: a.rangeType === w.ROW ? i.getMaxColumns() - 1 : a.endColumn
3352
+ rangeType: k.NORMAL,
3353
+ startRow: a.rangeType === k.COLUMN ? 0 : a.startRow,
3354
+ endRow: a.rangeType === k.COLUMN ? i.getMaxRows() - 1 : a.endRow,
3355
+ startColumn: a.rangeType === k.ROW ? 0 : a.startColumn,
3356
+ endColumn: a.rangeType === k.ROW ? i.getMaxColumns() - 1 : a.endColumn
3357
3357
  };
3358
3358
  } else if (typeof e == "number" && t !== void 0)
3359
3359
  i = this._worksheet, o = {
@@ -3366,7 +3366,7 @@ let k = class extends le {
3366
3366
  };
3367
3367
  else
3368
3368
  throw new Error("Invalid range specification");
3369
- return this._injector.createInstance(m, this._workbook, i, o);
3369
+ return this._injector.createInstance(_, this._workbook, i, o);
3370
3370
  }
3371
3371
  /**
3372
3372
  * Returns the current number of columns in the sheet, regardless of content.
@@ -3459,7 +3459,7 @@ let k = class extends le {
3459
3459
  */
3460
3460
  insertRowsAfter(e, t) {
3461
3461
  const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = H.DOWN, i = e + 1, a = e + t, h = 0, d = this._worksheet.getColumnCount() - 1, c = O(this._worksheet, i, a, h, d, !0, e);
3462
- return this._commandService.syncExecuteCommand(pe.id, {
3462
+ return this._commandService.syncExecuteCommand(Ee.id, {
3463
3463
  unitId: n,
3464
3464
  subUnitId: s,
3465
3465
  direction: o,
@@ -3488,7 +3488,7 @@ let k = class extends le {
3488
3488
  */
3489
3489
  insertRowsBefore(e, t) {
3490
3490
  const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = H.UP, i = e, a = e + t - 1, h = 0, d = this._worksheet.getColumnCount() - 1, c = O(this._worksheet, i, a, h, d, !0, e - 1);
3491
- return this._commandService.syncExecuteCommand(pe.id, {
3491
+ return this._commandService.syncExecuteCommand(Ee.id, {
3492
3492
  unitId: n,
3493
3493
  subUnitId: s,
3494
3494
  direction: o,
@@ -3592,7 +3592,7 @@ let k = class extends le {
3592
3592
  */
3593
3593
  hideRow(e) {
3594
3594
  const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = ee(e.getRange(), this._worksheet);
3595
- return this._commandService.syncExecuteCommand(Ee.id, {
3595
+ return this._commandService.syncExecuteCommand(pe.id, {
3596
3596
  unitId: t,
3597
3597
  subUnitId: n,
3598
3598
  ranges: [s]
@@ -3618,9 +3618,9 @@ let k = class extends le {
3618
3618
  endRow: e + t - 1,
3619
3619
  startColumn: 0,
3620
3620
  endColumn: this._worksheet.getColumnCount() - 1,
3621
- rangeType: w.ROW
3621
+ rangeType: k.ROW
3622
3622
  };
3623
- return this._commandService.syncExecuteCommand(Ee.id, {
3623
+ return this._commandService.syncExecuteCommand(pe.id, {
3624
3624
  unitId: n,
3625
3625
  subUnitId: s,
3626
3626
  ranges: [o]
@@ -3669,7 +3669,7 @@ let k = class extends le {
3669
3669
  endRow: e + t - 1,
3670
3670
  startColumn: 0,
3671
3671
  endColumn: this._worksheet.getColumnCount() - 1,
3672
- rangeType: w.ROW
3672
+ rangeType: k.ROW
3673
3673
  };
3674
3674
  return this._commandService.syncExecuteCommand(ye.id, {
3675
3675
  unitId: n,
@@ -3705,7 +3705,7 @@ let k = class extends le {
3705
3705
  * fWorkSheet.autoFitRow(24);
3706
3706
  * ```
3707
3707
  */
3708
- autoFitRow(e, t = g.TRUE) {
3708
+ autoFitRow(e, t = l.TRUE) {
3709
3709
  const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = [{
3710
3710
  startRow: e,
3711
3711
  endRow: e,
@@ -3741,13 +3741,13 @@ let k = class extends le {
3741
3741
  var d;
3742
3742
  const s = this._workbook.getUnitId(), o = this._worksheet.getSheetId(), i = this._worksheet.getRowManager(), a = [], h = [];
3743
3743
  for (let c = e; c < e + t; c++) {
3744
- const C = ((d = i.getRow(c)) == null ? void 0 : d.ah) || this._worksheet.getConfig().defaultRowHeight, _ = {
3744
+ const u = ((d = i.getRow(c)) == null ? void 0 : d.ah) || this._worksheet.getConfig().defaultRowHeight, w = {
3745
3745
  startRow: c,
3746
3746
  endRow: c,
3747
3747
  startColumn: 0,
3748
3748
  endColumn: this._worksheet.getColumnCount() - 1
3749
3749
  };
3750
- n <= C ? a.push(_) : h.push(_);
3750
+ n <= u ? a.push(w) : h.push(w);
3751
3751
  }
3752
3752
  return h.length > 0 && this._commandService.syncExecuteCommand(Ue.id, {
3753
3753
  unitId: s,
@@ -4105,7 +4105,7 @@ let k = class extends le {
4105
4105
  endRow: this._worksheet.getRowCount() - 1,
4106
4106
  startColumn: e,
4107
4107
  endColumn: e + t - 1,
4108
- rangeType: w.COLUMN
4108
+ rangeType: k.COLUMN
4109
4109
  };
4110
4110
  return this._commandService.syncExecuteCommand(Pe.id, {
4111
4111
  unitId: n,
@@ -4156,7 +4156,7 @@ let k = class extends le {
4156
4156
  endRow: this._worksheet.getRowCount() - 1,
4157
4157
  startColumn: e,
4158
4158
  endColumn: e + t - 1,
4159
- rangeType: w.COLUMN
4159
+ rangeType: k.COLUMN
4160
4160
  };
4161
4161
  return this._commandService.syncExecuteCommand(Me.id, {
4162
4162
  unitId: n,
@@ -4271,7 +4271,7 @@ let k = class extends le {
4271
4271
  * ```
4272
4272
  */
4273
4273
  getMergeData() {
4274
- return this._worksheet.getMergeData().map((e) => this._injector.createInstance(m, this._workbook, this._worksheet, e));
4274
+ return this._worksheet.getMergeData().map((e) => this._injector.createInstance(_, this._workbook, this._worksheet, e));
4275
4275
  }
4276
4276
  /**
4277
4277
  * Get all merged cells in the current sheet
@@ -4288,7 +4288,7 @@ let k = class extends le {
4288
4288
  * ```
4289
4289
  */
4290
4290
  getMergedRanges() {
4291
- return this._worksheet.getSnapshot().mergeData.map((t) => this._injector.createInstance(m, this._workbook, this._worksheet, t));
4291
+ return this._worksheet.getSnapshot().mergeData.map((t) => this._injector.createInstance(_, this._workbook, this._worksheet, t));
4292
4292
  }
4293
4293
  /**
4294
4294
  * Get the merged cell data of the specified row and column.
@@ -4307,7 +4307,7 @@ let k = class extends le {
4307
4307
  getCellMergeData(e, t) {
4308
4308
  const s = this._worksheet.getMergedCell(e, t);
4309
4309
  if (s)
4310
- return this._injector.createInstance(m, this._workbook, this._worksheet, s);
4310
+ return this._injector.createInstance(_, this._workbook, this._worksheet, s);
4311
4311
  }
4312
4312
  // #endregion
4313
4313
  /**
@@ -4532,7 +4532,7 @@ let k = class extends le {
4532
4532
  * ```
4533
4533
  */
4534
4534
  hasHiddenGridLines() {
4535
- return this._worksheet.getConfig().showGridlines === g.FALSE;
4535
+ return this._worksheet.getConfig().showGridlines === l.FALSE;
4536
4536
  }
4537
4537
  /**
4538
4538
  * Hides or reveals the sheet gridlines.
@@ -4549,7 +4549,7 @@ let k = class extends le {
4549
4549
  return this._commandService.syncExecuteCommand(ae.id, {
4550
4550
  unitId: this._workbook.getUnitId(),
4551
4551
  subUnitId: this._worksheet.getSheetId(),
4552
- showGridlines: e ? g.FALSE : g.TRUE
4552
+ showGridlines: e ? l.FALSE : l.TRUE
4553
4553
  }), this;
4554
4554
  }
4555
4555
  /**
@@ -4623,7 +4623,7 @@ let k = class extends le {
4623
4623
  * @deprecated use `univerAPI.addEvent(univerAPI.Event.SheetValueChanged, (params) => {})` instead
4624
4624
  */
4625
4625
  onCellDataChange(e) {
4626
- return this._injector.get(l).onCommandExecuted((n) => {
4626
+ return this._injector.get(m).onCommandExecuted((n) => {
4627
4627
  if (n.id === Ne.id) {
4628
4628
  const s = n.params;
4629
4629
  s.unitId === this._workbook.getUnitId() && s.subUnitId === this._worksheet.getSheetId() && s.cellValue && e(new J(s.cellValue));
@@ -4635,7 +4635,7 @@ let k = class extends le {
4635
4635
  * @deprecated use `univerAPI.addEvent(univerAPI.Event.BeforeSheetEditEnd, (params) => {})` instead
4636
4636
  */
4637
4637
  onBeforeCellDataChange(e) {
4638
- return this._injector.get(l).beforeCommandExecuted((n) => {
4638
+ return this._injector.get(m).beforeCommandExecuted((n) => {
4639
4639
  if (n.id === Ne.id) {
4640
4640
  const s = n.params;
4641
4641
  s.unitId === this._workbook.getUnitId() && s.subUnitId === this._worksheet.getSheetId() && s.cellValue && e(new J(s.cellValue));
@@ -4654,8 +4654,8 @@ let k = class extends le {
4654
4654
  * ```
4655
4655
  */
4656
4656
  hideSheet() {
4657
- const e = this._injector.get(l);
4658
- if (this._workbook.getSheets().filter((o) => o.isSheetHidden() !== g.TRUE).length <= 1)
4657
+ const e = this._injector.get(m);
4658
+ if (this._workbook.getSheets().filter((o) => o.isSheetHidden() !== l.TRUE).length <= 1)
4659
4659
  throw new Error("Cannot hide the only visible sheet");
4660
4660
  return e.syncExecuteCommand(jt.id, {
4661
4661
  unitId: this._workbook.getUnitId(),
@@ -4674,7 +4674,7 @@ let k = class extends le {
4674
4674
  * ```
4675
4675
  */
4676
4676
  showSheet() {
4677
- return this._injector.get(l).syncExecuteCommand(Lt.id, {
4677
+ return this._injector.get(m).syncExecuteCommand(Lt.id, {
4678
4678
  unitId: this._workbook.getUnitId(),
4679
4679
  subUnitId: this._worksheet.getSheetId()
4680
4680
  }), this;
@@ -4691,7 +4691,7 @@ let k = class extends le {
4691
4691
  * ```
4692
4692
  */
4693
4693
  isSheetHidden() {
4694
- return this._worksheet.isSheetHidden() === g.TRUE;
4694
+ return this._worksheet.isSheetHidden() === l.TRUE;
4695
4695
  }
4696
4696
  /**
4697
4697
  * Sets the sheet name.
@@ -4762,7 +4762,7 @@ let k = class extends le {
4762
4762
  return this.clearContents();
4763
4763
  if (e && e.formatOnly && !e.contentsOnly)
4764
4764
  return this.clearFormats();
4765
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = this._injector.get(l), o = {
4765
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = this._injector.get(m), o = {
4766
4766
  startRow: 0,
4767
4767
  endRow: this._worksheet.getRowCount() - 1,
4768
4768
  startColumn: 0,
@@ -4787,7 +4787,7 @@ let k = class extends le {
4787
4787
  * ```
4788
4788
  */
4789
4789
  clearContents() {
4790
- const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(l), s = {
4790
+ const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(m), s = {
4791
4791
  startRow: 0,
4792
4792
  endRow: this._worksheet.getRowCount() - 1,
4793
4793
  startColumn: 0,
@@ -4811,7 +4811,7 @@ let k = class extends le {
4811
4811
  * ```
4812
4812
  */
4813
4813
  clearFormats() {
4814
- const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(l), s = {
4814
+ const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(m), s = {
4815
4815
  startRow: 0,
4816
4816
  endRow: this._worksheet.getRowCount() - 1,
4817
4817
  startColumn: 0,
@@ -4902,7 +4902,7 @@ let k = class extends le {
4902
4902
  * ```
4903
4903
  */
4904
4904
  equalTo(e) {
4905
- return e instanceof k ? this._worksheet.getSheetId() === e.getSheetId() && this._workbook.getUnitId() === e.getWorkbook().getUnitId() : !1;
4905
+ return e instanceof S ? this._worksheet.getSheetId() === e.getSheetId() && this._workbook.getUnitId() === e.getWorkbook().getUnitId() : !1;
4906
4906
  }
4907
4907
  /**
4908
4908
  * Insert a defined name for worksheet.
@@ -5089,21 +5089,21 @@ let k = class extends le {
5089
5089
  }), this;
5090
5090
  }
5091
5091
  };
5092
- k = fn([
5093
- j(3, u(P)),
5094
- j(4, u(Ze)),
5095
- j(5, u(je)),
5096
- j(6, l)
5097
- ], k);
5092
+ S = fn([
5093
+ j(3, g(P)),
5094
+ j(4, g(Ze)),
5095
+ j(5, g(je)),
5096
+ j(6, m)
5097
+ ], S);
5098
5098
  var In = Object.getOwnPropertyDescriptor, Rn = (r, e, t, n) => {
5099
5099
  for (var s = n > 1 ? void 0 : n ? In(e, t) : e, o = r.length - 1, i; o >= 0; o--)
5100
5100
  (i = r[o]) && (s = i(s) || s);
5101
5101
  return s;
5102
5102
  }, R = (r, e) => (t, n) => e(t, n, r);
5103
- let S = class extends le {
5103
+ let C = class extends le {
5104
5104
  constructor(e, t, n, s, o, i, a, h, d, c) {
5105
5105
  super(t);
5106
- E(this, "id");
5106
+ p(this, "id");
5107
5107
  this._workbook = e, this._injector = t, this._resourceLoaderService = n, this._selectionManagerService = s, this._univerInstanceService = o, this._commandService = i, this._permissionService = a, this._logService = h, this._localeService = d, this._definedNamesService = c, this.id = this._workbook.getUnitId();
5108
5108
  }
5109
5109
  /**
@@ -5205,7 +5205,7 @@ let S = class extends le {
5205
5205
  */
5206
5206
  getActiveSheet() {
5207
5207
  const e = this._workbook.getActiveSheet();
5208
- return this._injector.createInstance(k, this, this._workbook, e);
5208
+ return this._injector.createInstance(S, this, this._workbook, e);
5209
5209
  }
5210
5210
  /**
5211
5211
  * Gets all the worksheets in this workbook
@@ -5219,7 +5219,7 @@ let S = class extends le {
5219
5219
  * ```
5220
5220
  */
5221
5221
  getSheets() {
5222
- return this._workbook.getSheets().map((e) => this._injector.createInstance(k, this, this._workbook, e));
5222
+ return this._workbook.getSheets().map((e) => this._injector.createInstance(S, this, this._workbook, e));
5223
5223
  }
5224
5224
  /**
5225
5225
  * Create a new worksheet and returns a handle to it.
@@ -5273,7 +5273,7 @@ let S = class extends le {
5273
5273
  const a = this._workbook.getActiveSheet();
5274
5274
  if (!a)
5275
5275
  throw new Error("No active sheet found");
5276
- return this._injector.createInstance(k, this, this._workbook, a);
5276
+ return this._injector.createInstance(S, this, this._workbook, a);
5277
5277
  }
5278
5278
  /**
5279
5279
  * Get a worksheet by sheet id.
@@ -5289,7 +5289,7 @@ let S = class extends le {
5289
5289
  */
5290
5290
  getSheetBySheetId(e) {
5291
5291
  const t = this._workbook.getSheetBySheetId(e);
5292
- return t ? this._injector.createInstance(k, this, this._workbook, t) : null;
5292
+ return t ? this._injector.createInstance(S, this, this._workbook, t) : null;
5293
5293
  }
5294
5294
  /**
5295
5295
  * Get a worksheet by sheet name.
@@ -5305,7 +5305,7 @@ let S = class extends le {
5305
5305
  */
5306
5306
  getSheetByName(e) {
5307
5307
  const t = this._workbook.getSheetBySheetName(e);
5308
- return t ? this._injector.createInstance(k, this, this._workbook, t) : null;
5308
+ return t ? this._injector.createInstance(S, this, this._workbook, t) : null;
5309
5309
  }
5310
5310
  /**
5311
5311
  * Sets the given worksheet to be the active worksheet in the workbook.
@@ -5380,7 +5380,7 @@ let S = class extends le {
5380
5380
  const o = this._workbook.getActiveSheet();
5381
5381
  if (!o)
5382
5382
  throw new Error("No active sheet found");
5383
- return this._injector.createInstance(k, this, this._workbook, o);
5383
+ return this._injector.createInstance(S, this, this._workbook, o);
5384
5384
  }
5385
5385
  /**
5386
5386
  * Deletes the specified worksheet.
@@ -5534,7 +5534,7 @@ let S = class extends le {
5534
5534
  const t = this.getActiveSheet(), n = e.getRange().sheetId || t.getSheetId(), s = n ? this._workbook.getSheetBySheetId(n) : this._workbook.getActiveSheet(!0);
5535
5535
  if (!s)
5536
5536
  throw new Error("No active sheet found");
5537
- s.getSheetId() !== t.getSheetId() && this.setActiveSheet(this._injector.createInstance(k, this, this._workbook, s));
5537
+ s.getSheetId() !== t.getSheetId() && this.setActiveSheet(this._injector.createInstance(S, this, this._workbook, s));
5538
5538
  const o = {
5539
5539
  unitId: this.getId(),
5540
5540
  subUnitId: n,
@@ -5555,7 +5555,7 @@ let S = class extends le {
5555
5555
  // could sheet have no active range ?
5556
5556
  getActiveRange() {
5557
5557
  const e = this._workbook.getActiveSheet(), n = this._selectionManagerService.getCurrentSelections().find((s) => !!s.primary);
5558
- return n ? this._injector.createInstance(m, this._workbook, e, n.range) : null;
5558
+ return n ? this._injector.createInstance(_, this._workbook, e, n.range) : null;
5559
5559
  }
5560
5560
  /**
5561
5561
  * Returns the active cell in this spreadsheet.
@@ -5572,9 +5572,9 @@ let S = class extends le {
5572
5572
  return null;
5573
5573
  const s = {
5574
5574
  ...n.primary,
5575
- rangeType: w.NORMAL
5575
+ rangeType: k.NORMAL
5576
5576
  };
5577
- return this._injector.createInstance(m, this._workbook, e, s);
5577
+ return this._injector.createInstance(_, this._workbook, e, s);
5578
5578
  }
5579
5579
  /**
5580
5580
  * Deletes the currently active sheet.
@@ -5606,7 +5606,7 @@ let S = class extends le {
5606
5606
  return this._commandService.syncExecuteCommand(Kt.id, {
5607
5607
  unitId: e.getWorkbook().getUnitId(),
5608
5608
  subUnitId: e.getSheetId()
5609
- }), this._injector.createInstance(k, this, this._workbook, this._workbook.getActiveSheet());
5609
+ }), this._injector.createInstance(S, this, this._workbook, this._workbook.getActiveSheet());
5610
5610
  }
5611
5611
  /**
5612
5612
  * Duplicates the active sheet.
@@ -5943,17 +5943,17 @@ let S = class extends le {
5943
5943
  return this._workbook.getCustomMetadata();
5944
5944
  }
5945
5945
  };
5946
- S = Rn([
5947
- R(1, u(P)),
5948
- R(2, u(st)),
5949
- R(3, u(Ze)),
5946
+ C = Rn([
5947
+ R(1, g(P)),
5948
+ R(2, g(st)),
5949
+ R(3, g(Ze)),
5950
5950
  R(4, se),
5951
- R(5, l),
5951
+ R(5, m),
5952
5952
  R(6, ue),
5953
5953
  R(7, je),
5954
- R(8, u(He)),
5954
+ R(8, g(He)),
5955
5955
  R(9, et)
5956
- ], S);
5956
+ ], C);
5957
5957
  class bn extends ze {
5958
5958
  getCommandSheetTarget(e) {
5959
5959
  var o;
@@ -5989,7 +5989,7 @@ class bn extends ze {
5989
5989
  this.Event.WorkbookCreated,
5990
5990
  () => t.unitAdded$.subscribe((n) => {
5991
5991
  if (n.type === U.UNIVER_SHEET) {
5992
- const s = n, o = e.createInstance(S, s);
5992
+ const s = n, o = e.createInstance(C, s);
5993
5993
  this.fireEvent(this.Event.WorkbookCreated, {
5994
5994
  unitId: n.getUnitId(),
5995
5995
  type: n.type,
@@ -6005,7 +6005,7 @@ class bn extends ze {
6005
6005
  */
6006
6006
  // eslint-disable-next-line max-lines-per-function
6007
6007
  _initialize(e) {
6008
- const t = e.get(l);
6008
+ const t = e.get(m);
6009
6009
  this.registerEventHandler(
6010
6010
  this.Event.BeforeSheetCreate,
6011
6011
  () => t.beforeCommandExecuted((n) => {
@@ -6260,21 +6260,21 @@ class bn extends ze {
6260
6260
  }
6261
6261
  createUniverSheet(e, t) {
6262
6262
  const s = this._injector.get(se).createUnit(U.UNIVER_SHEET, e, t);
6263
- return this._injector.createInstance(S, s);
6263
+ return this._injector.createInstance(C, s);
6264
6264
  }
6265
6265
  createWorkbook(e, t) {
6266
6266
  return this.createUniverSheet(e, t);
6267
6267
  }
6268
6268
  getActiveWorkbook() {
6269
6269
  const e = this._univerInstanceService.getCurrentUnitForType(U.UNIVER_SHEET);
6270
- return e ? this._injector.createInstance(S, e) : null;
6270
+ return e ? this._injector.createInstance(C, e) : null;
6271
6271
  }
6272
6272
  getActiveUniverSheet() {
6273
6273
  return this.getActiveWorkbook();
6274
6274
  }
6275
6275
  getUniverSheet(e) {
6276
6276
  const t = this._univerInstanceService.getUnit(e, U.UNIVER_SHEET);
6277
- return t ? this._injector.createInstance(S, t) : null;
6277
+ return t ? this._injector.createInstance(C, t) : null;
6278
6278
  }
6279
6279
  getWorkbook(e) {
6280
6280
  return this.getUniverSheet(e);
@@ -6284,7 +6284,7 @@ class bn extends ze {
6284
6284
  }
6285
6285
  onUniverSheetCreated(e) {
6286
6286
  const t = this._univerInstanceService.getTypeOfUnitAdded$(U.UNIVER_SHEET).subscribe((n) => {
6287
- const s = this._injector.createInstance(S, n);
6287
+ const s = this._injector.createInstance(C, n);
6288
6288
  e(s);
6289
6289
  });
6290
6290
  return Le(t);
@@ -6341,7 +6341,7 @@ class bn extends ze {
6341
6341
  }
6342
6342
  }
6343
6343
  ze.extend(bn);
6344
- class pn {
6344
+ class En {
6345
6345
  get SheetValueChangeType() {
6346
6346
  return tn;
6347
6347
  }
@@ -6352,8 +6352,8 @@ class pn {
6352
6352
  return rn;
6353
6353
  }
6354
6354
  }
6355
- at.extend(pn);
6356
- class En {
6355
+ at.extend(En);
6356
+ class pn {
6357
6357
  get SheetCreated() {
6358
6358
  return "SheetCreated";
6359
6359
  }
@@ -6415,7 +6415,7 @@ class En {
6415
6415
  return "SheetValueChanged";
6416
6416
  }
6417
6417
  }
6418
- ht.extend(En);
6418
+ ht.extend(pn);
6419
6419
  var yn = Object.getOwnPropertyDescriptor, Un = (r, e, t, n) => {
6420
6420
  for (var s = n > 1 ? void 0 : n ? yn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
6421
6421
  (i = r[o]) && (s = i(s) || s);
@@ -6427,15 +6427,15 @@ let Ve = class extends ge {
6427
6427
  }
6428
6428
  };
6429
6429
  Ve = Un([
6430
- xn(0, u(P))
6430
+ xn(0, g(P))
6431
6431
  ], Ve);
6432
6432
  export {
6433
6433
  q as FPermission,
6434
- m as FRange,
6434
+ _ as FRange,
6435
6435
  K as FSelection,
6436
- En as FSheetEventName,
6436
+ pn as FSheetEventName,
6437
6437
  Ve as FSheetHooks,
6438
- pn as FSheetsEnum,
6439
- S as FWorkbook,
6440
- k as FWorksheet
6438
+ En as FSheetsEnum,
6439
+ C as FWorkbook,
6440
+ S as FWorksheet
6441
6441
  };