@univerjs/sheets 0.7.0 → 0.8.0-nightly.202505261607

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,16 +1,16 @@
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 x, ICommandService as g, IPermissionService as le, IAuthzIoService as Fe, LocaleService as He, generateRandomId as Oe, Rectangle as N, RANGE_TYPE as w, isFormulaString as rt, isCellV as st, isICellData as ot, HorizontalAlign as T, VerticalAlign as A, ObjectMatrix as V, Tools as se, TextStyleValue as ke, RichTextValue as P, BooleanNumber as l, WrapStrategy as G, DEFAULT_STYLES as Se, Dimension as M, isNullCell as D, ILogService as je, Direction as j, IResourceLoaderService as it, IUniverInstanceService as oe, mergeWorksheetSnapshotWithDefault as Ce, UndoCommand as at, RedoCommand as ht, toDisposable as Le, UniverInstanceType as U, CanceledError as v } from "@univerjs/core";
5
- import { FBase as ge, FBaseInitialable as me, FUniver as ze, FEnum as dt, FEventName as ct } from "@univerjs/core/facade";
6
- import { WorksheetProtectionRuleModel as Ge, RangeProtectionRuleModel as $e, WorksheetProtectionPointModel as qe, SCOPE_WORKBOOK_VALUE_DEFINED_NAME as H, SetDefinedNameCommand as ie, RemoveDefinedNameCommand as ut, PermissionPointsDefinitions as lt, WorkbookEditablePermission as Ke, UnitObject as W, AddWorksheetProtectionMutation as gt, DeleteWorksheetProtectionMutation as mt, getAllWorksheetPermissionPoint as _t, getAllWorksheetPermissionPointByPointPanel as fe, SetWorksheetPermissionPointsMutation as wt, AddRangeProtectionMutation as kt, DeleteRangeProtectionMutation as St, SetRangeProtectionMutation as Ct, WorksheetEditPermission as ft, WorksheetViewPermission as vt, SetBorderBasicCommand as It, SetStyleCommand as b, SetTextRotationCommand as Rt, SetRangeValuesCommand as B, SetTextWrapCommand as ae, SetVerticalTextAlignCommand as bt, SetHorizontalTextAlignCommand as pt, addMergeCellsUtil as X, getAddMergeMutationRangeByType as ve, RemoveWorksheetMergeCommand as Et, getPrimaryForRange as $, SetSelectionsOperation as _e, SplitTextToColumnsCommand as yt, SetWorksheetRangeThemeStyleCommand as Ut, DeleteWorksheetRangeThemeStyleCommand as xt, SheetRangeThemeService as Ye, ClearSelectionAllCommand as Je, ClearSelectionContentCommand as Qe, ClearSelectionFormatCommand as Xe, InsertRangeMoveDownCommand as Pt, InsertRangeMoveRightCommand as Mt, DeleteRangeMoveUpCommand as Nt, DeleteRangeMoveLeftCommand as Tt, getNextPrimaryCell as At, SheetsSelectionsService as Ze, SetWorksheetDefaultStyleMutation as Dt, SetColDataCommand as Ie, SetRowDataCommand as Re, copyRangeStyles as L, InsertRowByRangeCommand as be, RemoveRowByRangeCommand as Wt, MoveRowsCommand as Bt, SetRowHiddenCommand as pe, SetSpecificRowsVisibleCommand as Ee, SetWorksheetRowIsAutoHeightMutation as Vt, SetRowHeightCommand as ye, SetWorksheetRowIsAutoHeightCommand as Z, InsertColByRangeCommand as Ue, RemoveColByRangeCommand as Ft, MoveColsCommand as Ht, SetColHiddenCommand as xe, SetSpecificColsVisibleCommand as Pe, SetColWidthCommand as Ot, SetFrozenCommand as ee, CancelFrozenCommand as jt, ToggleGridlinesCommand as he, SetGridlinesColorCommand as de, SetTabColorCommand as Lt, SetRangeValuesMutation as Me, SetWorksheetHideCommand as zt, SetWorksheetShowCommand as Gt, SetWorksheetNameCommand as ce, AppendRowCommand as $t, SetWorksheetRowCountCommand as qt, SetWorksheetColumnCountCommand as Kt, InsertSheetCommand as q, SetWorksheetActiveOperation as F, RemoveSheetCommand as ue, CopySheetCommand as Yt, SetWorksheetOrderCommand as Jt, RegisterWorksheetRangeThemeStyleCommand as Qt, UnregisterWorksheetRangeThemeStyleCommand as Xt, RangeThemeStyle as Zt, SetWorksheetOrderMutation as Ne, SetTabColorMutation as Te, SetWorksheetHideMutation as Ae, COMMAND_LISTENER_VALUE_CHANGE as en, getValueChangedEffectedRange as tn, SheetValueChangeType as nn, SheetSkeletonChangeType as rn, SplitDelimiterEnum as sn } from "@univerjs/sheets";
7
- import { IDefinedNamesService as et, serializeRange as we, FormulaDataModel as on, serializeRangeWithSheet as an, deserializeRangeWithSheet as hn } from "@univerjs/engine-formula";
8
- var dn = Object.getOwnPropertyDescriptor, cn = (r, e, t, n) => {
9
- for (var s = n > 1 ? void 0 : n ? dn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
3
+ var p = (r, e, t) => nt(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { Inject as u, Injector as x, ICommandService as l, IPermissionService as ue, IAuthzIoService as Fe, LocaleService as He, generateRandomId as Oe, Rectangle as M, RANGE_TYPE as w, HorizontalAlign as T, VerticalAlign as A, TextStyleValue as we, RichTextValue as P, 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 rt, IUniverInstanceService as se, mergeWorksheetSnapshotWithDefault as Ce, Tools as ve, UndoCommand as st, RedoCommand as ot, toDisposable as Le, UniverInstanceType as U, CanceledError as f } from "@univerjs/core";
5
+ import { FBase as ge, FBaseInitialable as le, FUniver as ze, FEnum as it, FEventName as at } 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 ht, PermissionPointsDefinitions as dt, WorkbookEditablePermission as Ke, UnitObject as W, AddWorksheetProtectionMutation as ct, DeleteWorksheetProtectionMutation as ut, getAllWorksheetPermissionPoint as gt, getAllWorksheetPermissionPointByPointPanel as fe, SetWorksheetPermissionPointsMutation as lt, AddRangeProtectionMutation as mt, DeleteRangeProtectionMutation as _t, SetRangeProtectionMutation as wt, WorksheetEditPermission as kt, WorksheetViewPermission as St, SetBorderBasicCommand as Ct, SetStyleCommand as b, SetTextRotationCommand as vt, SetRangeValuesCommand as B, SetTextWrapCommand as ie, SetVerticalTextAlignCommand as ft, SetHorizontalTextAlignCommand as It, addMergeCellsUtil as Q, getAddMergeMutationRangeByType as Ie, RemoveWorksheetMergeCommand as Rt, getPrimaryForRange as z, SetSelectionsOperation as me, SplitTextToColumnsCommand as bt, SetWorksheetRangeThemeStyleCommand as Et, DeleteWorksheetRangeThemeStyleCommand as pt, SheetRangeThemeService as Ye, ClearSelectionAllCommand as Je, ClearSelectionContentCommand as Qe, ClearSelectionFormatCommand as Xe, InsertRangeMoveDownCommand as yt, InsertRangeMoveRightCommand as Ut, DeleteRangeMoveUpCommand as xt, DeleteRangeMoveLeftCommand as Pt, getNextPrimaryCell as Nt, SheetsSelectionsService as Ze, SetWorksheetDefaultStyleMutation as Mt, SetColDataCommand as Re, SetRowDataCommand as be, copyRangeStyles as O, InsertRowByRangeCommand as Ee, RemoveRowByRangeCommand as Tt, MoveRowsCommand as At, SetRowHiddenCommand as pe, SetSpecificRowsVisibleCommand as ye, SetWorksheetRowIsAutoHeightMutation as Dt, SetRowHeightCommand as Ue, SetWorksheetRowIsAutoHeightCommand as X, InsertColByRangeCommand as xe, RemoveColByRangeCommand as Wt, MoveColsCommand as Bt, SetColHiddenCommand as Pe, SetSpecificColsVisibleCommand as Ne, SetColWidthCommand as Vt, SetFrozenCommand as Z, CancelFrozenCommand as Ft, ToggleGridlinesCommand as ae, SetGridlinesColorCommand as he, SetTabColorCommand as Ht, SetRangeValuesMutation as Me, SetWorksheetHideCommand as Ot, SetWorksheetShowCommand as jt, SetWorksheetNameCommand as de, AppendRowCommand as Lt, SetWorksheetRowCountCommand as zt, SetWorksheetColumnCountCommand as Gt, InsertSheetCommand as G, SetWorksheetActiveOperation as V, RemoveSheetCommand as ce, CopySheetCommand as $t, SetWorksheetOrderCommand as qt, RegisterWorksheetRangeThemeStyleCommand as Kt, UnregisterWorksheetRangeThemeStyleCommand as Yt, RangeThemeStyle as Jt, SetWorksheetOrderMutation as Te, SetTabColorMutation as Ae, SetWorksheetHideMutation as De, COMMAND_LISTENER_VALUE_CHANGE as Qt, getValueChangedEffectedRange as Xt, SheetValueChangeType as Zt, SheetSkeletonChangeType as en, SplitDelimiterEnum as tn } from "@univerjs/sheets";
7
+ import { IDefinedNamesService as et, serializeRange as _e, FormulaDataModel as nn, serializeRangeWithSheet as rn, deserializeRangeWithSheet as sn } from "@univerjs/engine-formula";
8
+ var on = Object.getOwnPropertyDescriptor, an = (r, e, t, n) => {
9
+ for (var s = n > 1 ? void 0 : n ? on(e, t) : e, o = r.length - 1, i; o >= 0; o--)
10
10
  (i = r[o]) && (s = i(s) || s);
11
11
  return s;
12
12
  }, I = (r, e) => (t, n) => e(t, n, r);
13
- function un(r, e, t) {
13
+ function hn(r, e, t) {
14
14
  const n = t.getDefinedNameMap(r);
15
15
  if (n == null)
16
16
  return e.t("definedName.defaultName") + 1;
@@ -25,15 +25,15 @@ function un(r, e, t) {
25
25
  a++;
26
26
  }
27
27
  }
28
- class Q {
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: "",
34
34
  name: "",
35
35
  formulaOrRefString: "",
36
- localSheetId: H
36
+ localSheetId: F
37
37
  };
38
38
  }
39
39
  /**
@@ -105,7 +105,7 @@ class Q {
105
105
  * ```
106
106
  */
107
107
  setRefByRange(e, t, n, s) {
108
- return this._definedNameParam.formulaOrRefString = we({
108
+ return this._definedNameParam.formulaOrRefString = _e({
109
109
  startRow: e,
110
110
  endRow: e + (n != null ? n : 1) - 1,
111
111
  startColumn: t,
@@ -168,7 +168,7 @@ class Q {
168
168
  * ```
169
169
  */
170
170
  setScopeToWorkbook() {
171
- return this._definedNameParam.localSheetId = H, this;
171
+ return this._definedNameParam.localSheetId = F, this;
172
172
  }
173
173
  /**
174
174
  * Sets the hidden status of the defined name builder.
@@ -228,12 +228,12 @@ class Q {
228
228
  return this._definedNameParam = e, this;
229
229
  }
230
230
  }
231
- let K = class extends ge {
231
+ let $ = class extends ge {
232
232
  constructor(r, e, t, n, s, o, i, a, h, d) {
233
233
  super(), this._definedNameParam = r, this._injector = e, this._commandService = t, this._permissionService = n, this._worksheetProtectionRuleModel = s, this._rangeProtectionRuleModel = o, this._worksheetProtectionPointRuleModel = i, this._authzIoService = a, this._localeService = h, this._definedNamesService = d;
234
234
  }
235
235
  _apply() {
236
- this._definedNameParam.name === "" && (this._definedNameParam.name = un(this._definedNameParam.unitId, this._localeService, this._definedNamesService)), this._commandService.syncExecuteCommand(ie.id, this._definedNameParam);
236
+ this._definedNameParam.name === "" && (this._definedNameParam.name = hn(this._definedNameParam.unitId, this._localeService, this._definedNamesService)), this._commandService.syncExecuteCommand(oe.id, this._definedNameParam);
237
237
  }
238
238
  /**
239
239
  * Gets the name of the defined name.
@@ -314,7 +314,7 @@ let K = class extends ge {
314
314
  * ```
315
315
  */
316
316
  setRefByRange(r, e, t, n) {
317
- this._definedNameParam.formulaOrRefString = we({
317
+ this._definedNameParam.formulaOrRefString = _e({
318
318
  startRow: r,
319
319
  endRow: r + (t != null ? t : 1) - 1,
320
320
  startColumn: e,
@@ -373,7 +373,7 @@ let K = class extends ge {
373
373
  * ```
374
374
  */
375
375
  setScopeToWorkbook() {
376
- this._definedNameParam.localSheetId = H, this._apply();
376
+ this._definedNameParam.localSheetId = F, this._apply();
377
377
  }
378
378
  /**
379
379
  * Sets the hidden status of the defined name.
@@ -398,7 +398,7 @@ let K = class extends ge {
398
398
  * ```
399
399
  */
400
400
  delete() {
401
- this._commandService.syncExecuteCommand(ut.id, this._definedNameParam);
401
+ this._commandService.syncExecuteCommand(ht.id, this._definedNameParam);
402
402
  }
403
403
  /**
404
404
  * Gets the local sheet id of the defined name.
@@ -424,7 +424,7 @@ let K = class extends ge {
424
424
  * ```
425
425
  */
426
426
  isWorkbookScope() {
427
- return this._definedNameParam.localSheetId === H;
427
+ return this._definedNameParam.localSheetId === F;
428
428
  }
429
429
  /**
430
430
  * Converts the defined name to a defined name builder.
@@ -443,41 +443,41 @@ let K = class extends ge {
443
443
  * ```
444
444
  */
445
445
  toBuilder() {
446
- const r = this._injector.createInstance(Q);
446
+ const r = this._injector.createInstance(Y);
447
447
  return r.load(this._definedNameParam), r;
448
448
  }
449
449
  };
450
- K = cn([
450
+ $ = an([
451
451
  I(1, u(x)),
452
- I(2, g),
453
- I(3, le),
452
+ I(2, l),
453
+ I(3, ue),
454
454
  I(4, u(Ge)),
455
455
  I(5, u($e)),
456
456
  I(6, u(qe)),
457
457
  I(7, u(Fe)),
458
458
  I(8, u(He)),
459
459
  I(9, et)
460
- ], K);
461
- var ln = Object.getOwnPropertyDescriptor, gn = (r, e, t, n) => {
462
- for (var s = n > 1 ? void 0 : n ? ln(e, t) : e, o = r.length - 1, i; o >= 0; o--)
460
+ ], $);
461
+ var dn = Object.getOwnPropertyDescriptor, cn = (r, e, t, n) => {
462
+ for (var s = n > 1 ? void 0 : n ? dn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
463
463
  (i = r[o]) && (s = i(s) || s);
464
464
  return s;
465
465
  }, y = (r, e) => (t, n) => e(t, n, r);
466
- let Y = class extends ge {
466
+ let q = class extends ge {
467
467
  constructor(e, t, n, s, o, i, a) {
468
468
  super();
469
469
  /**
470
470
  * Permission point definition, can read the point constructor want to modify from here
471
471
  */
472
- E(this, "permissionPointsDefinition", lt);
472
+ p(this, "permissionPointsDefinition", dt);
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
  /**
@@ -551,7 +551,7 @@ let Y = class extends ge {
551
551
  scope: void 0
552
552
  }
553
553
  });
554
- if (this._commandService.syncExecuteCommand(gt.id, {
554
+ if (this._commandService.syncExecuteCommand(ct.id, {
555
555
  unitId: e,
556
556
  subUnitId: t,
557
557
  rule: {
@@ -579,10 +579,10 @@ let Y = class extends ge {
579
579
  * ```
580
580
  */
581
581
  removeWorksheetPermission(e, t) {
582
- this._commandService.syncExecuteCommand(mt.id, {
582
+ this._commandService.syncExecuteCommand(ut.id, {
583
583
  unitId: e,
584
584
  subUnitId: t
585
- }), [..._t(), ...fe()].forEach((n) => {
585
+ }), [...gt(), ...fe()].forEach((n) => {
586
586
  const s = new n(e, t);
587
587
  this._permissionService.updatePermissionPoint(s.id, !0);
588
588
  }), this._worksheetProtectionPointRuleModel.deleteRule(e, t);
@@ -612,7 +612,7 @@ let Y = class extends ge {
612
612
  async setWorksheetPermissionPoint(e, t, n, s) {
613
613
  const o = this._worksheetProtectionRuleModel.getRule(e, t);
614
614
  let i;
615
- if (n === ft || n === vt)
615
+ if (n === kt || n === St)
616
616
  if (o)
617
617
  i = o.permissionId;
618
618
  else {
@@ -631,7 +631,7 @@ let Y = class extends ge {
631
631
  name: "",
632
632
  scope: void 0
633
633
  }
634
- }), this._commandService.syncExecuteCommand(wt.id, { unitId: e, subUnitId: t, rule: { unitId: e, subUnitId: t, permissionId: i } }));
634
+ }), this._commandService.syncExecuteCommand(lt.id, { unitId: e, subUnitId: t, rule: { unitId: e, subUnitId: t, permissionId: i } }));
635
635
  }
636
636
  const h = new n(e, t);
637
637
  return this._permissionService.getPermissionPoint(h.id) || this._permissionService.addPermissionPoint(h), this._permissionService.updatePermissionPoint(h.id, s), i;
@@ -674,9 +674,9 @@ let Y = 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((_) => N.intersects(_.getRange(), C)))))
677
+ if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).some((c) => c.ranges.some((C) => n.some((_) => M.intersects(_.getRange(), C)))))
678
678
  throw new Error("range protection cannot intersect");
679
- if (this._commandService.syncExecuteCommand(kt.id, {
679
+ if (this._commandService.syncExecuteCommand(mt.id, {
680
680
  unitId: e,
681
681
  subUnitId: t,
682
682
  rules: [{
@@ -715,7 +715,7 @@ let Y = class extends ge {
715
715
  * ```
716
716
  */
717
717
  removeRangeProtection(e, t, n) {
718
- this._commandService.syncExecuteCommand(St.id, {
718
+ this._commandService.syncExecuteCommand(_t.id, {
719
719
  unitId: e,
720
720
  subUnitId: t,
721
721
  ruleIds: n
@@ -785,9 +785,9 @@ let Y = class extends ge {
785
785
  setRangeProtectionRanges(e, t, n, s) {
786
786
  const o = this._rangeProtectionRuleModel.getRule(e, t, n);
787
787
  if (o) {
788
- if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).filter((h) => h.id !== n).some((h) => h.ranges.some((d) => s.some((c) => N.intersects(c.getRange(), d)))))
788
+ if (this._rangeProtectionRuleModel.getSubunitRuleList(e, t).filter((h) => h.id !== n).some((h) => h.ranges.some((d) => s.some((c) => M.intersects(c.getRange(), d)))))
789
789
  throw new Error("range protection cannot intersect");
790
- this._commandService.syncExecuteCommand(Ct.id, {
790
+ this._commandService.syncExecuteCommand(wt.id, {
791
791
  unitId: e,
792
792
  subUnitId: t,
793
793
  ruleId: n,
@@ -799,16 +799,16 @@ let Y = class extends ge {
799
799
  }
800
800
  }
801
801
  };
802
- Y = gn([
802
+ q = cn([
803
803
  y(0, u(x)),
804
- y(1, g),
805
- y(2, le),
804
+ y(1, l),
805
+ y(2, ue),
806
806
  y(3, u(Ge)),
807
807
  y(4, u($e)),
808
808
  y(5, u(qe)),
809
809
  y(6, u(Fe))
810
- ], Y);
811
- function mn(r) {
810
+ ], q);
811
+ function un(r) {
812
812
  switch (r) {
813
813
  case "left":
814
814
  return T.LEFT;
@@ -820,7 +820,7 @@ function mn(r) {
820
820
  throw new Error(`Invalid horizontal alignment: ${r}`);
821
821
  }
822
822
  }
823
- function De(r) {
823
+ function We(r) {
824
824
  switch (r) {
825
825
  case T.LEFT:
826
826
  return "left";
@@ -832,7 +832,7 @@ function De(r) {
832
832
  return "general";
833
833
  }
834
834
  }
835
- function _n(r) {
835
+ function gn(r) {
836
836
  switch (r) {
837
837
  case "top":
838
838
  return A.TOP;
@@ -844,7 +844,7 @@ function _n(r) {
844
844
  throw new Error(`Invalid vertical alignment: ${r}`);
845
845
  }
846
846
  }
847
- function We(r) {
847
+ function Be(r) {
848
848
  switch (r) {
849
849
  case A.TOP:
850
850
  return "top";
@@ -856,30 +856,7 @@ function We(r) {
856
856
  return "general";
857
857
  }
858
858
  }
859
- function O(r) {
860
- return rt(r) ? {
861
- f: r,
862
- v: null,
863
- p: null
864
- } : st(r) ? {
865
- v: r,
866
- p: null,
867
- f: null
868
- } : (ot(r), r);
869
- }
870
- function Be(r, e) {
871
- const t = new V(), { startRow: n, startColumn: s, endRow: o, endColumn: i } = e;
872
- if (se.isArray(r))
873
- for (let a = 0; a <= o - n; a++)
874
- for (let h = 0; h <= i - s; h++)
875
- t.setValue(a + n, h + s, O(r[a][h]));
876
- else
877
- new V(r).forValue((h, d, c) => {
878
- t.setValue(h, d, O(c));
879
- });
880
- return t.getMatrix();
881
- }
882
- function te(r, e) {
859
+ function ee(r, e) {
883
860
  return {
884
861
  startRow: r.startRow,
885
862
  endRow: r.endRow,
@@ -888,7 +865,7 @@ function te(r, e) {
888
865
  rangeType: w.ROW
889
866
  };
890
867
  }
891
- function ne(r, e) {
868
+ function te(r, e) {
892
869
  return {
893
870
  startRow: 0,
894
871
  endRow: e.getRowCount() - 1,
@@ -897,12 +874,12 @@ function ne(r, e) {
897
874
  rangeType: w.COLUMN
898
875
  };
899
876
  }
900
- var wn = Object.getOwnPropertyDescriptor, kn = (r, e, t, n) => {
901
- for (var s = n > 1 ? void 0 : n ? wn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
877
+ var ln = Object.getOwnPropertyDescriptor, mn = (r, e, t, n) => {
878
+ for (var s = n > 1 ? void 0 : n ? ln(e, t) : e, o = r.length - 1, i; o >= 0; o--)
902
879
  (i = r[o]) && (s = i(s) || s);
903
880
  return s;
904
- }, re = (r, e) => (t, n) => e(t, n, r);
905
- let m = class extends me {
881
+ }, ne = (r, e) => (t, n) => e(t, n, r);
882
+ let m = class extends le {
906
883
  constructor(r, e, t, n, s, o) {
907
884
  super(n), this._workbook = r, this._worksheet = e, this._range = t, this._injector = n, this._commandService = s, this._formulaDataModel = o;
908
885
  }
@@ -1064,7 +1041,7 @@ let m = class extends me {
1064
1041
  */
1065
1042
  isMerged() {
1066
1043
  const { startColumn: r, startRow: e, endColumn: t, endRow: n } = this._range;
1067
- return this._worksheet.getMergedCellRange(e, r, n, t).some((o) => N.equals(o, this._range));
1044
+ return this._worksheet.getMergedCellRange(e, r, n, t).some((o) => M.equals(o, this._range));
1068
1045
  }
1069
1046
  /**
1070
1047
  * Return first cell style data in this range. Please note that if there are row styles, col styles and (or)
@@ -1148,7 +1125,7 @@ let m = class extends me {
1148
1125
  */
1149
1126
  getCellStyle(r = "row") {
1150
1127
  const e = this.getCellStyleData(r);
1151
- return e ? ke.create(e) : null;
1128
+ return e ? we.create(e) : null;
1152
1129
  }
1153
1130
  /**
1154
1131
  * Returns the cell styles for the cells in the range.
@@ -1171,7 +1148,7 @@ let m = class extends me {
1171
1148
  return this.getCellDatas().map((t, n) => t.map((s, o) => {
1172
1149
  if (!s) return null;
1173
1150
  const i = r !== "cell" ? this._worksheet.getComposedCellStyle(n + this._range.startRow, o + this._range.startColumn, r === "row") : this._worksheet.getCellStyle(n + this._range.startRow, o + this._range.startColumn);
1174
- return i ? ke.create(i) : null;
1151
+ return i ? we.create(i) : null;
1175
1152
  }));
1176
1153
  }
1177
1154
  getValue(r) {
@@ -1518,7 +1495,7 @@ let m = class extends me {
1518
1495
  * ```
1519
1496
  */
1520
1497
  getWrap() {
1521
- return this._worksheet.getRange(this._range).getWrap() === l.TRUE;
1498
+ return this._worksheet.getRange(this._range).getWrap() === g.TRUE;
1522
1499
  }
1523
1500
  /**
1524
1501
  * Gets whether text wrapping is enabled for cells in the range.
@@ -1534,7 +1511,7 @@ let m = class extends me {
1534
1511
  const r = this.getCellDatas(), e = this._workbook.getStyles();
1535
1512
  return r.map((t) => t.map((n) => {
1536
1513
  var s;
1537
- return ((s = e.getStyleByCell(n)) == null ? void 0 : s.tb) === G.WRAP;
1514
+ return ((s = e.getStyleByCell(n)) == null ? void 0 : s.tb) === L.WRAP;
1538
1515
  }));
1539
1516
  }
1540
1517
  /**
@@ -1564,7 +1541,7 @@ let m = class extends me {
1564
1541
  */
1565
1542
  getHorizontalAlignment() {
1566
1543
  const r = this._worksheet.getRange(this._range).getHorizontalAlignment();
1567
- return De(r);
1544
+ return We(r);
1568
1545
  }
1569
1546
  /**
1570
1547
  * Returns the horizontal alignments of the cells in the range.
@@ -1578,7 +1555,7 @@ let m = class extends me {
1578
1555
  * ```
1579
1556
  */
1580
1557
  getHorizontalAlignments() {
1581
- return this._worksheet.getRange(this._range).getHorizontalAlignments().map((e) => e.map((t) => De(t)));
1558
+ return this._worksheet.getRange(this._range).getHorizontalAlignments().map((e) => e.map((t) => We(t)));
1582
1559
  }
1583
1560
  /**
1584
1561
  * Returns the vertical alignment (top/middle/bottom) of the top-left cell in the range.
@@ -1592,7 +1569,7 @@ let m = class extends me {
1592
1569
  * ```
1593
1570
  */
1594
1571
  getVerticalAlignment() {
1595
- return We(this._worksheet.getRange(this._range).getVerticalAlignment());
1572
+ return Be(this._worksheet.getRange(this._range).getVerticalAlignment());
1596
1573
  }
1597
1574
  /**
1598
1575
  * Returns the vertical alignments of the cells in the range.
@@ -1606,7 +1583,7 @@ let m = class extends me {
1606
1583
  * ```
1607
1584
  */
1608
1585
  getVerticalAlignments() {
1609
- return this._worksheet.getRange(this._range).getVerticalAlignments().map((e) => e.map((t) => We(t)));
1586
+ return this._worksheet.getRange(this._range).getVerticalAlignments().map((e) => e.map((t) => Be(t)));
1610
1587
  }
1611
1588
  /**
1612
1589
  * Set custom meta data for first cell in current range.
@@ -1691,7 +1668,7 @@ let m = class extends me {
1691
1668
  * ```
1692
1669
  */
1693
1670
  setBorder(r, e, t) {
1694
- return this._commandService.syncExecuteCommand(It.id, {
1671
+ return this._commandService.syncExecuteCommand(Ct.id, {
1695
1672
  unitId: this._workbook.getUnitId(),
1696
1673
  subUnitId: this._worksheet.getSheetId(),
1697
1674
  ranges: [this._range],
@@ -1717,7 +1694,7 @@ let m = class extends me {
1717
1694
  getBackground() {
1718
1695
  var e, t;
1719
1696
  const r = this.getCellStyle();
1720
- return (t = (e = r == null ? void 0 : r.background) == null ? void 0 : e.rgb) != null ? t : Se.bg.rgb;
1697
+ return (t = (e = r == null ? void 0 : r.background) == null ? void 0 : e.rgb) != null ? t : ke.bg.rgb;
1721
1698
  }
1722
1699
  /**
1723
1700
  * Returns the background colors of the cells in the range.
@@ -1733,7 +1710,7 @@ let m = class extends me {
1733
1710
  getBackgrounds() {
1734
1711
  return this.getCellStyles().map((e) => e.map((t) => {
1735
1712
  var n, s;
1736
- return (s = (n = t == null ? void 0 : t.background) == null ? void 0 : n.rgb) != null ? s : Se.bg.rgb;
1713
+ return (s = (n = t == null ? void 0 : t.background) == null ? void 0 : n.rgb) != null ? s : ke.bg.rgb;
1737
1714
  }));
1738
1715
  }
1739
1716
  /**
@@ -1789,7 +1766,7 @@ let m = class extends me {
1789
1766
  * ```
1790
1767
  */
1791
1768
  setTextRotation(r) {
1792
- return this._commandService.syncExecuteCommand(Rt.id, {
1769
+ return this._commandService.syncExecuteCommand(vt.id, {
1793
1770
  unitId: this._workbook.getUnitId(),
1794
1771
  subUnitId: this._worksheet.getSheetId(),
1795
1772
  range: this._range,
@@ -1811,7 +1788,7 @@ let m = class extends me {
1811
1788
  * ```
1812
1789
  */
1813
1790
  setValue(r) {
1814
- const e = O(r);
1791
+ const e = re(r);
1815
1792
  if (!e)
1816
1793
  throw new Error("Invalid value");
1817
1794
  return this._commandService.syncExecuteCommand(B.id, {
@@ -1836,7 +1813,7 @@ let m = class extends me {
1836
1813
  * ```
1837
1814
  */
1838
1815
  setValueForCell(r) {
1839
- const e = O(r);
1816
+ const e = re(r);
1840
1817
  if (!e)
1841
1818
  throw new Error("Invalid value");
1842
1819
  return this._commandService.syncExecuteCommand(B.id, {
@@ -1909,7 +1886,7 @@ let m = class extends me {
1909
1886
  * ```
1910
1887
  */
1911
1888
  setRichTextValues(r) {
1912
- const e = r.map((s) => s.map((o) => o && { p: o instanceof P ? o.getData() : o })), t = Be(e, this._range), n = {
1889
+ const e = r.map((s) => s.map((o) => o && { p: o instanceof P ? o.getData() : o })), t = Se(e, this._range), n = {
1913
1890
  unitId: this._workbook.getUnitId(),
1914
1891
  subUnitId: this._worksheet.getSheetId(),
1915
1892
  range: this._range,
@@ -1932,11 +1909,11 @@ let m = class extends me {
1932
1909
  * ```
1933
1910
  */
1934
1911
  setWrap(r) {
1935
- return this._commandService.syncExecuteCommand(ae.id, {
1912
+ return this._commandService.syncExecuteCommand(ie.id, {
1936
1913
  unitId: this._workbook.getUnitId(),
1937
1914
  subUnitId: this._worksheet.getSheetId(),
1938
1915
  range: this._range,
1939
- value: r ? G.WRAP : G.UNSPECIFIED
1916
+ value: r ? L.WRAP : L.UNSPECIFIED
1940
1917
  }), this;
1941
1918
  }
1942
1919
  /**
@@ -1953,7 +1930,7 @@ let m = class extends me {
1953
1930
  * ```
1954
1931
  */
1955
1932
  setWrapStrategy(r) {
1956
- return this._commandService.syncExecuteCommand(ae.id, {
1933
+ return this._commandService.syncExecuteCommand(ie.id, {
1957
1934
  unitId: this._workbook.getUnitId(),
1958
1935
  subUnitId: this._worksheet.getSheetId(),
1959
1936
  range: this._range,
@@ -1973,11 +1950,11 @@ let m = class extends me {
1973
1950
  * ```
1974
1951
  */
1975
1952
  setVerticalAlignment(r) {
1976
- return this._commandService.syncExecuteCommand(bt.id, {
1953
+ return this._commandService.syncExecuteCommand(ft.id, {
1977
1954
  unitId: this._workbook.getUnitId(),
1978
1955
  subUnitId: this._worksheet.getSheetId(),
1979
1956
  range: this._range,
1980
- value: _n(r)
1957
+ value: gn(r)
1981
1958
  }), this;
1982
1959
  }
1983
1960
  /**
@@ -1993,11 +1970,11 @@ let m = class extends me {
1993
1970
  * ```
1994
1971
  */
1995
1972
  setHorizontalAlignment(r) {
1996
- return this._commandService.syncExecuteCommand(pt.id, {
1973
+ return this._commandService.syncExecuteCommand(It.id, {
1997
1974
  unitId: this._workbook.getUnitId(),
1998
1975
  subUnitId: this._worksheet.getSheetId(),
1999
1976
  range: this._range,
2000
- value: mn(r)
1977
+ value: un(r)
2001
1978
  }), this;
2002
1979
  }
2003
1980
  /**
@@ -2016,7 +1993,7 @@ let m = class extends me {
2016
1993
  * ```
2017
1994
  */
2018
1995
  setValues(r) {
2019
- const e = Be(r, this._range);
1996
+ const e = Se(r, this._range);
2020
1997
  return this._commandService.syncExecuteCommand(B.id, {
2021
1998
  unitId: this._workbook.getUnitId(),
2022
1999
  subUnitId: this._worksheet.getSheetId(),
@@ -2039,9 +2016,9 @@ let m = class extends me {
2039
2016
  setFontWeight(r) {
2040
2017
  let e;
2041
2018
  if (r === "bold")
2042
- e = l.TRUE;
2019
+ e = g.TRUE;
2043
2020
  else if (r === "normal")
2044
- e = l.FALSE;
2021
+ e = g.FALSE;
2045
2022
  else if (r === null)
2046
2023
  e = null;
2047
2024
  else
@@ -2072,9 +2049,9 @@ let m = class extends me {
2072
2049
  setFontStyle(r) {
2073
2050
  let e;
2074
2051
  if (r === "italic")
2075
- e = l.TRUE;
2052
+ e = g.TRUE;
2076
2053
  else if (r === "normal")
2077
- e = l.FALSE;
2054
+ e = g.FALSE;
2078
2055
  else if (r === null)
2079
2056
  e = null;
2080
2057
  else
@@ -2105,17 +2082,17 @@ let m = class extends me {
2105
2082
  setFontLine(r) {
2106
2083
  if (r === "underline")
2107
2084
  this._setFontUnderline({
2108
- s: l.TRUE
2085
+ s: g.TRUE
2109
2086
  });
2110
2087
  else if (r === "line-through")
2111
2088
  this._setFontStrikethrough({
2112
- s: l.TRUE
2089
+ s: g.TRUE
2113
2090
  });
2114
2091
  else if (r === "none")
2115
2092
  this._setFontUnderline({
2116
- s: l.FALSE
2093
+ s: g.FALSE
2117
2094
  }), this._setFontStrikethrough({
2118
- s: l.FALSE
2095
+ s: g.FALSE
2119
2096
  });
2120
2097
  else if (r === null)
2121
2098
  this._setFontUnderline(null), this._setFontStrikethrough(null);
@@ -2246,7 +2223,7 @@ let m = class extends me {
2246
2223
  */
2247
2224
  merge(r = !0) {
2248
2225
  const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId();
2249
- return X(this._injector, e, t, [this._range], r), this;
2226
+ return Q(this._injector, e, t, [this._range], r), this;
2250
2227
  }
2251
2228
  /**
2252
2229
  * Merges cells in a range horizontally.
@@ -2267,8 +2244,8 @@ let m = class extends me {
2267
2244
  * ```
2268
2245
  */
2269
2246
  mergeAcross(r = !0) {
2270
- const e = ve([this._range], M.ROWS), t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
2271
- return X(this._injector, t, n, e, r), this;
2247
+ const e = Ie([this._range], N.ROWS), t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
2248
+ return Q(this._injector, t, n, e, r), this;
2272
2249
  }
2273
2250
  /**
2274
2251
  * Merges cells in a range vertically.
@@ -2289,8 +2266,8 @@ let m = class extends me {
2289
2266
  * ```
2290
2267
  */
2291
2268
  mergeVertically(r = !0) {
2292
- const e = ve([this._range], M.COLUMNS), t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
2293
- return X(this._injector, t, n, e, r), this;
2269
+ const e = Ie([this._range], N.COLUMNS), t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
2270
+ return Q(this._injector, t, n, e, r), this;
2294
2271
  }
2295
2272
  /**
2296
2273
  * Returns true if cells in the current range overlap a merged cell.
@@ -2325,7 +2302,7 @@ let m = class extends me {
2325
2302
  * ```
2326
2303
  */
2327
2304
  breakApart() {
2328
- return this._commandService.syncExecuteCommand(Et.id, { ranges: [this._range] }), this;
2305
+ return this._commandService.syncExecuteCommand(Rt.id, { ranges: [this._range] }), this;
2329
2306
  }
2330
2307
  //#endregion
2331
2308
  /**
@@ -2387,7 +2364,7 @@ let m = class extends me {
2387
2364
  startAbsoluteRefType: e,
2388
2365
  endAbsoluteRefType: t
2389
2366
  };
2390
- return r ? an(this._worksheet.getName(), n) : we(n);
2367
+ return r ? rn(this._worksheet.getName(), n) : _e(n);
2391
2368
  }
2392
2369
  /**
2393
2370
  * Sets the specified range as the active range, with the top left cell in the range as the current cell.
@@ -2437,23 +2414,23 @@ let m = class extends me {
2437
2414
  */
2438
2415
  activateAsCurrentCell() {
2439
2416
  const r = this._worksheet.getMergedCell(this._range.startRow, this._range.startColumn);
2440
- if (r && N.equals(r, this._range) || !r && this._range.startRow === this._range.endRow && this._range.startColumn === this._range.endColumn) {
2417
+ if (r && M.equals(r, this._range) || !r && this._range.startRow === this._range.endRow && this._range.startColumn === this._range.endColumn) {
2441
2418
  const n = this._injector.createInstance(S, this._workbook).getActiveRange();
2442
2419
  if (!n || n.getUnitId() !== this.getUnitId() || n.getSheetId() !== this.getSheetId())
2443
2420
  return this.activate();
2444
- if (N.contains(n.getRange(), this._range)) {
2421
+ if (M.contains(n.getRange(), this._range)) {
2445
2422
  const s = {
2446
2423
  unitId: this.getUnitId(),
2447
2424
  subUnitId: this.getSheetId(),
2448
2425
  selections: [
2449
2426
  {
2450
2427
  range: n.getRange(),
2451
- primary: $(this.getRange(), this._worksheet),
2428
+ primary: z(this.getRange(), this._worksheet),
2452
2429
  style: null
2453
2430
  }
2454
2431
  ]
2455
2432
  };
2456
- return this._commandService.syncExecuteCommand(_e.id, s), this;
2433
+ return this._commandService.syncExecuteCommand(me.id, s), this;
2457
2434
  }
2458
2435
  return this.activate();
2459
2436
  } else
@@ -2494,7 +2471,7 @@ let m = class extends me {
2494
2471
  * ```
2495
2472
  */
2496
2473
  splitTextToColumns(r, e, t) {
2497
- this._commandService.syncExecuteCommand(yt.id, {
2474
+ this._commandService.syncExecuteCommand(bt.id, {
2498
2475
  unitId: this._workbook.getUnitId(),
2499
2476
  subUnitId: this._worksheet.getSheetId(),
2500
2477
  range: this._range,
@@ -2519,7 +2496,7 @@ let m = class extends me {
2519
2496
  const e = this.getUsedThemeStyle();
2520
2497
  e && this.removeThemeStyle(e);
2521
2498
  } else
2522
- this._commandService.syncExecuteCommand(Ut.id, {
2499
+ this._commandService.syncExecuteCommand(Et.id, {
2523
2500
  unitId: this._workbook.getUnitId(),
2524
2501
  subUnitId: this._worksheet.getSheetId(),
2525
2502
  range: this._range,
@@ -2538,7 +2515,7 @@ let m = class extends me {
2538
2515
  * ```
2539
2516
  */
2540
2517
  removeThemeStyle(r) {
2541
- this._commandService.syncExecuteCommand(xt.id, {
2518
+ this._commandService.syncExecuteCommand(pt.id, {
2542
2519
  unitId: this._workbook.getUnitId(),
2543
2520
  subUnitId: this._worksheet.getSheetId(),
2544
2521
  range: this._range,
@@ -2687,9 +2664,9 @@ let m = class extends me {
2687
2664
  * ```
2688
2665
  */
2689
2666
  insertCells(r) {
2690
- r === M.ROWS ? this._commandService.executeCommand(Pt.id, {
2667
+ r === N.ROWS ? this._commandService.executeCommand(yt.id, {
2691
2668
  range: this._range
2692
- }) : this._commandService.executeCommand(Mt.id, {
2669
+ }) : this._commandService.executeCommand(Ut.id, {
2693
2670
  range: this._range
2694
2671
  });
2695
2672
  }
@@ -2749,9 +2726,9 @@ let m = class extends me {
2749
2726
  * ```
2750
2727
  */
2751
2728
  deleteCells(r) {
2752
- r === M.ROWS ? this._commandService.executeCommand(Nt.id, {
2729
+ r === N.ROWS ? this._commandService.executeCommand(xt.id, {
2753
2730
  range: this._range
2754
- }) : this._commandService.executeCommand(Tt.id, {
2731
+ }) : this._commandService.executeCommand(Pt.id, {
2755
2732
  range: this._range
2756
2733
  });
2757
2734
  }
@@ -2795,17 +2772,17 @@ let m = class extends me {
2795
2772
  getDataRegion(r) {
2796
2773
  const { startRow: e, startColumn: t, endRow: n, endColumn: s } = this._range, o = this._worksheet.getMaxRows(), i = this._worksheet.getMaxColumns(), a = this._worksheet.getCellMatrix();
2797
2774
  let h = e, d = t, c = n, C = s;
2798
- if (r !== M.COLUMNS) {
2799
- let _ = !1, p = !1;
2800
- for (let f = t; f <= s && (e > 0 && !D(a.getValue(e - 1, f)) && (_ = !0), n < o - 1 && !D(a.getValue(n + 1, f)) && (p = !0), !(_ && p)); f++)
2775
+ if (r !== N.COLUMNS) {
2776
+ let _ = !1, E = !1;
2777
+ for (let v = t; v <= s && (e > 0 && !D(a.getValue(e - 1, v)) && (_ = !0), n < o - 1 && !D(a.getValue(n + 1, v)) && (E = !0), !(_ && E)); v++)
2801
2778
  ;
2802
- _ && (h = e - 1), p && (c = n + 1);
2779
+ _ && (h = e - 1), E && (c = n + 1);
2803
2780
  }
2804
- if (r !== M.ROWS) {
2805
- let _ = !1, p = !1;
2806
- for (let f = e; f <= n && (t > 0 && !D(a.getValue(f, t - 1)) && (_ = !0), s < i - 1 && !D(a.getValue(f, s + 1)) && (p = !0), !(_ && p)); f++)
2781
+ if (r !== N.ROWS) {
2782
+ let _ = !1, E = !1;
2783
+ for (let v = e; v <= n && (t > 0 && !D(a.getValue(v, t - 1)) && (_ = !0), s < i - 1 && !D(a.getValue(v, s + 1)) && (E = !0), !(_ && E)); v++)
2807
2784
  ;
2808
- _ && (d = t - 1), p && (C = s + 1);
2785
+ _ && (d = t - 1), E && (C = s + 1);
2809
2786
  }
2810
2787
  return this._injector.createInstance(m, this._workbook, this._worksheet, {
2811
2788
  startRow: h,
@@ -2912,17 +2889,17 @@ let m = class extends me {
2912
2889
  return this.setValues(r.map((e) => e.map((t) => ({ f: t }))));
2913
2890
  }
2914
2891
  };
2915
- m = kn([
2916
- re(3, u(x)),
2917
- re(4, g),
2918
- re(5, u(on))
2892
+ m = mn([
2893
+ ne(3, u(x)),
2894
+ ne(4, l),
2895
+ ne(5, u(nn))
2919
2896
  ], m);
2920
- var Sn = Object.getOwnPropertyDescriptor, Cn = (r, e, t, n) => {
2921
- for (var s = n > 1 ? void 0 : n ? Sn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
2897
+ var _n = Object.getOwnPropertyDescriptor, wn = (r, e, t, n) => {
2898
+ for (var s = n > 1 ? void 0 : n ? _n(e, t) : e, o = r.length - 1, i; o >= 0; o--)
2922
2899
  (i = r[o]) && (s = i(s) || s);
2923
2900
  return s;
2924
- }, fn = (r, e) => (t, n) => e(t, n, r);
2925
- let J = class {
2901
+ }, kn = (r, e) => (t, n) => e(t, n, r);
2902
+ let K = class {
2926
2903
  constructor(r, e, t, n) {
2927
2904
  this._workbook = r, this._worksheet = e, this._selections = t, this._injector = n;
2928
2905
  }
@@ -3018,12 +2995,12 @@ let J = class {
3018
2995
  * ```
3019
2996
  */
3020
2997
  updatePrimaryCell(r) {
3021
- const e = this._injector.get(g);
2998
+ const e = this._injector.get(l);
3022
2999
  let t = [], n = !1;
3023
3000
  for (const { range: o, style: i } of this._selections)
3024
- N.contains(o, r.getRange()) ? (t.push({
3001
+ M.contains(o, r.getRange()) ? (t.push({
3025
3002
  range: o,
3026
- primary: $(r.getRange(), this._worksheet),
3003
+ primary: z(r.getRange(), this._worksheet),
3027
3004
  style: i
3028
3005
  }), n = !0) : t.push({
3029
3006
  range: o,
@@ -3033,7 +3010,7 @@ let J = class {
3033
3010
  n || (t = [
3034
3011
  {
3035
3012
  range: r.getRange(),
3036
- primary: $(r.getRange(), this._worksheet)
3013
+ primary: z(r.getRange(), this._worksheet)
3037
3014
  }
3038
3015
  ]);
3039
3016
  const s = {
@@ -3041,7 +3018,7 @@ let J = class {
3041
3018
  subUnitId: this._worksheet.getSheetId(),
3042
3019
  selections: t
3043
3020
  };
3044
- return e.syncExecuteCommand(_e.id, s), new J(this._workbook, this._worksheet, t, this._injector);
3021
+ return e.syncExecuteCommand(me.id, s), new K(this._workbook, this._worksheet, t, this._injector);
3045
3022
  }
3046
3023
  /**
3047
3024
  * Get the next primary cell in the specified direction. If the primary cell not exists in selections, return null.
@@ -3071,19 +3048,19 @@ let J = class {
3071
3048
  getNextDataRange(r) {
3072
3049
  if (!this._selections.find((n) => !!n.primary))
3073
3050
  return null;
3074
- const t = At(this._selections.concat(), r, this._worksheet);
3051
+ const t = Nt(this._selections.concat(), r, this._worksheet);
3075
3052
  return t ? this._injector.createInstance(m, this._workbook, this._worksheet, t) : null;
3076
3053
  }
3077
3054
  };
3078
- J = Cn([
3079
- fn(3, u(x))
3080
- ], J);
3081
- var vn = Object.getOwnPropertyDescriptor, In = (r, e, t, n) => {
3082
- for (var s = n > 1 ? void 0 : n ? vn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
3055
+ K = wn([
3056
+ kn(3, u(x))
3057
+ ], K);
3058
+ var Sn = Object.getOwnPropertyDescriptor, Cn = (r, e, t, n) => {
3059
+ for (var s = n > 1 ? void 0 : n ? Sn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
3083
3060
  (i = r[o]) && (s = i(s) || s);
3084
3061
  return s;
3085
- }, z = (r, e) => (t, n) => e(t, n, r);
3086
- let k = class extends me {
3062
+ }, j = (r, e) => (t, n) => e(t, n, r);
3063
+ let k = class extends le {
3087
3064
  /**
3088
3065
  * Creates a new worksheet facade instance
3089
3066
  * @param {FWorkbook} _fWorkbook - The facade workbook instance
@@ -3106,7 +3083,7 @@ let k = class extends me {
3106
3083
  * fWorkSheet.setActiveSelection(fWorkSheet.getRange('A10:B10'));
3107
3084
  * ```
3108
3085
  */
3109
- E(this, "setActiveSelection", this.setActiveRange);
3086
+ p(this, "setActiveSelection", this.setActiveRange);
3110
3087
  this._fWorkbook = e, this._workbook = t, this._worksheet = n, this._injector = s, this._selectionManagerService = o, this._logService = i, this._commandService = a;
3111
3088
  }
3112
3089
  /**
@@ -3186,7 +3163,7 @@ let k = class extends me {
3186
3163
  */
3187
3164
  getSelection() {
3188
3165
  const e = this._selectionManagerService.getCurrentSelections();
3189
- return e ? this._injector.createInstance(J, this._workbook, this._worksheet, e) : null;
3166
+ return e ? this._injector.createInstance(K, this._workbook, this._worksheet, e) : null;
3190
3167
  }
3191
3168
  // #region rows
3192
3169
  // #region default style
@@ -3255,7 +3232,7 @@ let k = class extends me {
3255
3232
  */
3256
3233
  setDefaultStyle(e) {
3257
3234
  const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
3258
- return this._commandService.syncExecuteCommand(Dt.id, {
3235
+ return this._commandService.syncExecuteCommand(Mt.id, {
3259
3236
  unitId: t,
3260
3237
  subUnitId: n,
3261
3238
  defaultStyle: e
@@ -3285,7 +3262,7 @@ let k = class extends me {
3285
3262
  }
3286
3263
  }
3287
3264
  };
3288
- return this._commandService.syncExecuteCommand(Ie.id, o), this;
3265
+ return this._commandService.syncExecuteCommand(Re.id, o), this;
3289
3266
  }
3290
3267
  /**
3291
3268
  * Set the default style of the worksheet column
@@ -3311,14 +3288,14 @@ let k = class extends me {
3311
3288
  }
3312
3289
  }
3313
3290
  };
3314
- return this._commandService.syncExecuteCommand(Re.id, o), this;
3291
+ return this._commandService.syncExecuteCommand(be.id, o), this;
3315
3292
  }
3316
3293
  getRange(e, t, n, s) {
3317
3294
  let o, i;
3318
3295
  if (typeof e == "object")
3319
3296
  o = e, i = this._worksheet;
3320
3297
  else if (typeof e == "string") {
3321
- const { range: a, sheetName: h } = hn(e), d = h ? this._workbook.getSheetBySheetName(h) : this._worksheet;
3298
+ const { range: a, sheetName: h } = sn(e), d = h ? this._workbook.getSheetBySheetName(h) : this._worksheet;
3322
3299
  if (!d)
3323
3300
  throw new Error("Range not found");
3324
3301
  i = d, o = {
@@ -3436,8 +3413,8 @@ let k = class extends me {
3436
3413
  * ```
3437
3414
  */
3438
3415
  insertRowsAfter(e, t) {
3439
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = j.DOWN, i = e + 1, a = e + t, h = 0, d = this._worksheet.getColumnCount() - 1, c = L(this._worksheet, i, a, h, d, !0, e);
3440
- return this._commandService.syncExecuteCommand(be.id, {
3416
+ 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);
3417
+ return this._commandService.syncExecuteCommand(Ee.id, {
3441
3418
  unitId: n,
3442
3419
  subUnitId: s,
3443
3420
  direction: o,
@@ -3465,8 +3442,8 @@ let k = class extends me {
3465
3442
  * ```
3466
3443
  */
3467
3444
  insertRowsBefore(e, t) {
3468
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = j.UP, i = e, a = e + t - 1, h = 0, d = this._worksheet.getColumnCount() - 1, c = L(this._worksheet, i, a, h, d, !0, e - 1);
3469
- return this._commandService.syncExecuteCommand(be.id, {
3445
+ 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);
3446
+ return this._commandService.syncExecuteCommand(Ee.id, {
3470
3447
  unitId: n,
3471
3448
  subUnitId: s,
3472
3449
  direction: o,
@@ -3516,7 +3493,7 @@ let k = class extends me {
3516
3493
  startColumn: 0,
3517
3494
  endColumn: this._worksheet.getColumnCount() - 1
3518
3495
  };
3519
- return this._commandService.syncExecuteCommand(Wt.id, {
3496
+ return this._commandService.syncExecuteCommand(Tt.id, {
3520
3497
  range: n,
3521
3498
  unitId: this._workbook.getUnitId(),
3522
3499
  subUnitId: this._worksheet.getSheetId()
@@ -3539,13 +3516,13 @@ let k = class extends me {
3539
3516
  * ```
3540
3517
  */
3541
3518
  moveRows(e, t) {
3542
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = te(e.getRange(), this._worksheet), i = o, a = {
3519
+ const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = ee(e.getRange(), this._worksheet), i = o, a = {
3543
3520
  startRow: t,
3544
3521
  endRow: t,
3545
3522
  startColumn: o.startColumn,
3546
3523
  endColumn: o.endColumn
3547
3524
  };
3548
- return this._commandService.syncExecuteCommand(Bt.id, {
3525
+ return this._commandService.syncExecuteCommand(At.id, {
3549
3526
  unitId: n,
3550
3527
  subUnitId: s,
3551
3528
  range: o,
@@ -3569,7 +3546,7 @@ let k = class extends me {
3569
3546
  * ```
3570
3547
  */
3571
3548
  hideRow(e) {
3572
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = te(e.getRange(), this._worksheet);
3549
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = ee(e.getRange(), this._worksheet);
3573
3550
  return this._commandService.syncExecuteCommand(pe.id, {
3574
3551
  unitId: t,
3575
3552
  subUnitId: n,
@@ -3620,8 +3597,8 @@ let k = class extends me {
3620
3597
  * ```
3621
3598
  */
3622
3599
  unhideRow(e) {
3623
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = te(e.getRange(), this._worksheet);
3624
- return this._commandService.syncExecuteCommand(Ee.id, {
3600
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = ee(e.getRange(), this._worksheet);
3601
+ return this._commandService.syncExecuteCommand(ye.id, {
3625
3602
  unitId: t,
3626
3603
  subUnitId: n,
3627
3604
  ranges: [s]
@@ -3649,7 +3626,7 @@ let k = class extends me {
3649
3626
  endColumn: this._worksheet.getColumnCount() - 1,
3650
3627
  rangeType: w.ROW
3651
3628
  };
3652
- return this._commandService.syncExecuteCommand(Ee.id, {
3629
+ return this._commandService.syncExecuteCommand(ye.id, {
3653
3630
  unitId: n,
3654
3631
  subUnitId: s,
3655
3632
  ranges: [o]
@@ -3683,19 +3660,19 @@ let k = class extends me {
3683
3660
  * fWorkSheet.autoFitRow(24);
3684
3661
  * ```
3685
3662
  */
3686
- autoFitRow(e, t = l.TRUE) {
3663
+ autoFitRow(e, t = g.TRUE) {
3687
3664
  const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = [{
3688
3665
  startRow: e,
3689
3666
  endRow: e,
3690
3667
  startColumn: 0,
3691
3668
  endColumn: this._worksheet.getColumnCount() - 1
3692
3669
  }];
3693
- return this._commandService.syncExecuteCommand(ae.id, {
3670
+ return this._commandService.syncExecuteCommand(ie.id, {
3694
3671
  unitId: this._workbook.getUnitId(),
3695
3672
  subUnitId: this._worksheet.getSheetId(),
3696
3673
  range: o[0],
3697
- value: G.WRAP
3698
- }), this._commandService.syncExecuteCommand(Vt.id, {
3674
+ value: L.WRAP
3675
+ }), this._commandService.syncExecuteCommand(Dt.id, {
3699
3676
  unitId: n,
3700
3677
  subUnitId: s,
3701
3678
  ranges: o,
@@ -3727,12 +3704,12 @@ let k = class extends me {
3727
3704
  };
3728
3705
  n <= C ? a.push(_) : h.push(_);
3729
3706
  }
3730
- return h.length > 0 && this._commandService.syncExecuteCommand(ye.id, {
3707
+ return h.length > 0 && this._commandService.syncExecuteCommand(Ue.id, {
3731
3708
  unitId: s,
3732
3709
  subUnitId: o,
3733
3710
  ranges: h,
3734
3711
  value: n
3735
- }), a.length > 0 && this._commandService.syncExecuteCommand(Z.id, {
3712
+ }), a.length > 0 && this._commandService.syncExecuteCommand(X.id, {
3736
3713
  unitId: s,
3737
3714
  subUnitId: o,
3738
3715
  ranges: a
@@ -3778,7 +3755,7 @@ let k = class extends me {
3778
3755
  endColumn: this._worksheet.getColumnCount() - 1
3779
3756
  }
3780
3757
  ];
3781
- return this._commandService.syncExecuteCommand(Z.id, {
3758
+ return this._commandService.syncExecuteCommand(X.id, {
3782
3759
  unitId: n,
3783
3760
  subUnitId: s,
3784
3761
  ranges: o
@@ -3800,7 +3777,7 @@ let k = class extends me {
3800
3777
  */
3801
3778
  setRangesAutoHeight(e) {
3802
3779
  const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId();
3803
- return this._commandService.syncExecuteCommand(Z.id, {
3780
+ return this._commandService.syncExecuteCommand(X.id, {
3804
3781
  unitId: t,
3805
3782
  subUnitId: n,
3806
3783
  ranges: e
@@ -3827,7 +3804,7 @@ let k = class extends me {
3827
3804
  endColumn: this._worksheet.getColumnCount() - 1
3828
3805
  }
3829
3806
  ];
3830
- return this._commandService.syncExecuteCommand(ye.id, {
3807
+ return this._commandService.syncExecuteCommand(Ue.id, {
3831
3808
  unitId: s,
3832
3809
  subUnitId: o,
3833
3810
  ranges: i,
@@ -3856,7 +3833,7 @@ let k = class extends me {
3856
3833
  subUnitId: n,
3857
3834
  rowData: s
3858
3835
  };
3859
- return this._commandService.syncExecuteCommand(Re.id, o), this;
3836
+ return this._commandService.syncExecuteCommand(be.id, o), this;
3860
3837
  }
3861
3838
  // #region Column
3862
3839
  /**
@@ -3923,8 +3900,8 @@ let k = class extends me {
3923
3900
  * ```
3924
3901
  */
3925
3902
  insertColumnsAfter(e, t) {
3926
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = j.RIGHT, i = 0, a = this._worksheet.getRowCount() - 1, h = e + 1, d = e + t, c = L(this._worksheet, i, a, h, d, !1, e);
3927
- return this._commandService.syncExecuteCommand(Ue.id, {
3903
+ const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = H.RIGHT, i = 0, a = this._worksheet.getRowCount() - 1, h = e + 1, d = e + t, c = O(this._worksheet, i, a, h, d, !1, e);
3904
+ return this._commandService.syncExecuteCommand(xe.id, {
3928
3905
  unitId: n,
3929
3906
  subUnitId: s,
3930
3907
  direction: o,
@@ -3952,8 +3929,8 @@ let k = class extends me {
3952
3929
  * ```
3953
3930
  */
3954
3931
  insertColumnsBefore(e, t) {
3955
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = j.LEFT, i = 0, a = this._worksheet.getRowCount() - 1, h = e, d = e + t - 1, c = L(this._worksheet, i, a, h, d, !1, e - 1);
3956
- return this._commandService.syncExecuteCommand(Ue.id, {
3932
+ const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = H.LEFT, i = 0, a = this._worksheet.getRowCount() - 1, h = e, d = e + t - 1, c = O(this._worksheet, i, a, h, d, !1, e - 1);
3933
+ return this._commandService.syncExecuteCommand(xe.id, {
3957
3934
  unitId: n,
3958
3935
  subUnitId: s,
3959
3936
  direction: o,
@@ -4003,7 +3980,7 @@ let k = class extends me {
4003
3980
  startColumn: e,
4004
3981
  endColumn: e + t - 1
4005
3982
  };
4006
- return this._commandService.syncExecuteCommand(Ft.id, {
3983
+ return this._commandService.syncExecuteCommand(Wt.id, {
4007
3984
  range: n,
4008
3985
  unitId: this._workbook.getUnitId(),
4009
3986
  subUnitId: this._worksheet.getSheetId()
@@ -4026,13 +4003,13 @@ let k = class extends me {
4026
4003
  * ```
4027
4004
  */
4028
4005
  moveColumns(e, t) {
4029
- const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = ne(e.getRange(), this._worksheet), i = o, a = {
4006
+ const n = this._workbook.getUnitId(), s = this._worksheet.getSheetId(), o = te(e.getRange(), this._worksheet), i = o, a = {
4030
4007
  startRow: 0,
4031
4008
  endRow: this._worksheet.getRowCount() - 1,
4032
4009
  startColumn: t,
4033
4010
  endColumn: t
4034
4011
  };
4035
- return this._commandService.syncExecuteCommand(Ht.id, {
4012
+ return this._commandService.syncExecuteCommand(Bt.id, {
4036
4013
  unitId: n,
4037
4014
  subUnitId: s,
4038
4015
  range: o,
@@ -4056,8 +4033,8 @@ let k = class extends me {
4056
4033
  * ```
4057
4034
  */
4058
4035
  hideColumn(e) {
4059
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = ne(e.getRange(), this._worksheet);
4060
- return this._commandService.syncExecuteCommand(xe.id, {
4036
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = te(e.getRange(), this._worksheet);
4037
+ return this._commandService.syncExecuteCommand(Pe.id, {
4061
4038
  unitId: t,
4062
4039
  subUnitId: n,
4063
4040
  ranges: [s]
@@ -4085,7 +4062,7 @@ let k = class extends me {
4085
4062
  endColumn: e + t - 1,
4086
4063
  rangeType: w.COLUMN
4087
4064
  };
4088
- return this._commandService.syncExecuteCommand(xe.id, {
4065
+ return this._commandService.syncExecuteCommand(Pe.id, {
4089
4066
  unitId: n,
4090
4067
  subUnitId: s,
4091
4068
  ranges: [o]
@@ -4107,8 +4084,8 @@ let k = class extends me {
4107
4084
  * ```
4108
4085
  */
4109
4086
  unhideColumn(e) {
4110
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = ne(e.getRange(), this._worksheet);
4111
- return this._commandService.syncExecuteCommand(Pe.id, {
4087
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = te(e.getRange(), this._worksheet);
4088
+ return this._commandService.syncExecuteCommand(Ne.id, {
4112
4089
  unitId: t,
4113
4090
  subUnitId: n,
4114
4091
  ranges: [s]
@@ -4136,7 +4113,7 @@ let k = class extends me {
4136
4113
  endColumn: e + t - 1,
4137
4114
  rangeType: w.COLUMN
4138
4115
  };
4139
- return this._commandService.syncExecuteCommand(Pe.id, {
4116
+ return this._commandService.syncExecuteCommand(Ne.id, {
4140
4117
  unitId: n,
4141
4118
  subUnitId: s,
4142
4119
  ranges: [o]
@@ -4179,7 +4156,7 @@ let k = class extends me {
4179
4156
  endRow: this._worksheet.getRowCount() - 1
4180
4157
  }
4181
4158
  ];
4182
- return this._commandService.syncExecuteCommand(Ot.id, {
4159
+ return this._commandService.syncExecuteCommand(Vt.id, {
4183
4160
  unitId: s,
4184
4161
  subUnitId: o,
4185
4162
  ranges: i,
@@ -4231,7 +4208,7 @@ let k = class extends me {
4231
4208
  subUnitId: n,
4232
4209
  columnData: s
4233
4210
  };
4234
- return this._commandService.syncExecuteCommand(Ie.id, o), this;
4211
+ return this._commandService.syncExecuteCommand(Re.id, o), this;
4235
4212
  }
4236
4213
  // #region merge cells
4237
4214
  /**
@@ -4351,7 +4328,7 @@ let k = class extends me {
4351
4328
  * ```
4352
4329
  */
4353
4330
  setFreeze(e) {
4354
- return this._logService.warn("setFreeze is deprecated, use setFrozenRows and setFrozenColumns instead"), this._commandService.syncExecuteCommand(ee.id, {
4331
+ return this._logService.warn("setFreeze is deprecated, use setFrozenRows and setFrozenColumns instead"), this._commandService.syncExecuteCommand(Z.id, {
4355
4332
  ...e,
4356
4333
  unitId: this._workbook.getUnitId(),
4357
4334
  subUnitId: this.getSheetId()
@@ -4368,7 +4345,7 @@ let k = class extends me {
4368
4345
  * ```
4369
4346
  */
4370
4347
  cancelFreeze() {
4371
- return this._commandService.syncExecuteCommand(jt.id, {
4348
+ return this._commandService.syncExecuteCommand(Ft.id, {
4372
4349
  unitId: this._workbook.getUnitId(),
4373
4350
  subUnitId: this.getSheetId()
4374
4351
  }), this;
@@ -4398,7 +4375,7 @@ let k = class extends me {
4398
4375
  });
4399
4376
  } else if (arguments.length === 2) {
4400
4377
  let [n = 0, s = 0] = e;
4401
- n > s && ([n, s] = [s, n]), this._commandService.syncExecuteCommand(ee.id, {
4378
+ n > s && ([n, s] = [s, n]), this._commandService.syncExecuteCommand(Z.id, {
4402
4379
  startColumn: s + 1,
4403
4380
  xSplit: s - n + 1,
4404
4381
  startRow: t.startRow,
@@ -4420,7 +4397,7 @@ let k = class extends me {
4420
4397
  });
4421
4398
  } else if (arguments.length === 2) {
4422
4399
  let [n = 0, s = 0] = e;
4423
- n > s && ([n, s] = [s, n]), this._commandService.syncExecuteCommand(ee.id, {
4400
+ n > s && ([n, s] = [s, n]), this._commandService.syncExecuteCommand(Z.id, {
4424
4401
  startRow: s + 1,
4425
4402
  ySplit: s - n + 1,
4426
4403
  startColumn: t.startColumn,
@@ -4510,7 +4487,7 @@ let k = class extends me {
4510
4487
  * ```
4511
4488
  */
4512
4489
  hasHiddenGridLines() {
4513
- return this._worksheet.getConfig().showGridlines === l.FALSE;
4490
+ return this._worksheet.getConfig().showGridlines === g.FALSE;
4514
4491
  }
4515
4492
  /**
4516
4493
  * Hides or reveals the sheet gridlines.
@@ -4524,10 +4501,10 @@ let k = class extends me {
4524
4501
  * ```
4525
4502
  */
4526
4503
  setHiddenGridlines(e) {
4527
- return this._commandService.syncExecuteCommand(he.id, {
4504
+ return this._commandService.syncExecuteCommand(ae.id, {
4528
4505
  unitId: this._workbook.getUnitId(),
4529
4506
  subUnitId: this._worksheet.getSheetId(),
4530
- showGridlines: e ? l.FALSE : l.TRUE
4507
+ showGridlines: e ? g.FALSE : g.TRUE
4531
4508
  }), this;
4532
4509
  }
4533
4510
  /**
@@ -4542,7 +4519,7 @@ let k = class extends me {
4542
4519
  * ```
4543
4520
  */
4544
4521
  setGridLinesColor(e) {
4545
- return this._commandService.syncExecuteCommand(de.id, {
4522
+ return this._commandService.syncExecuteCommand(he.id, {
4546
4523
  unitId: this._workbook.getUnitId(),
4547
4524
  subUnitId: this._worksheet.getSheetId(),
4548
4525
  color: e
@@ -4575,7 +4552,7 @@ let k = class extends me {
4575
4552
  * ```
4576
4553
  */
4577
4554
  setTabColor(e) {
4578
- return this._commandService.syncExecuteCommand(Lt.id, {
4555
+ return this._commandService.syncExecuteCommand(Ht.id, {
4579
4556
  unitId: this._workbook.getUnitId(),
4580
4557
  subUnitId: this._worksheet.getSheetId(),
4581
4558
  value: e
@@ -4601,10 +4578,10 @@ let k = class extends me {
4601
4578
  * @deprecated use `univerAPI.addEvent(univerAPI.Event.SheetValueChanged, (params) => {})` instead
4602
4579
  */
4603
4580
  onCellDataChange(e) {
4604
- return this._injector.get(g).onCommandExecuted((n) => {
4581
+ return this._injector.get(l).onCommandExecuted((n) => {
4605
4582
  if (n.id === Me.id) {
4606
4583
  const s = n.params;
4607
- s.unitId === this._workbook.getUnitId() && s.subUnitId === this._worksheet.getSheetId() && s.cellValue && e(new V(s.cellValue));
4584
+ s.unitId === this._workbook.getUnitId() && s.subUnitId === this._worksheet.getSheetId() && s.cellValue && e(new J(s.cellValue));
4608
4585
  }
4609
4586
  });
4610
4587
  }
@@ -4613,10 +4590,10 @@ let k = class extends me {
4613
4590
  * @deprecated use `univerAPI.addEvent(univerAPI.Event.BeforeSheetEditEnd, (params) => {})` instead
4614
4591
  */
4615
4592
  onBeforeCellDataChange(e) {
4616
- return this._injector.get(g).beforeCommandExecuted((n) => {
4593
+ return this._injector.get(l).beforeCommandExecuted((n) => {
4617
4594
  if (n.id === Me.id) {
4618
4595
  const s = n.params;
4619
- s.unitId === this._workbook.getUnitId() && s.subUnitId === this._worksheet.getSheetId() && s.cellValue && e(new V(s.cellValue));
4596
+ s.unitId === this._workbook.getUnitId() && s.subUnitId === this._worksheet.getSheetId() && s.cellValue && e(new J(s.cellValue));
4620
4597
  }
4621
4598
  });
4622
4599
  }
@@ -4632,10 +4609,10 @@ let k = class extends me {
4632
4609
  * ```
4633
4610
  */
4634
4611
  hideSheet() {
4635
- const e = this._injector.get(g);
4636
- if (this._workbook.getSheets().filter((o) => o.isSheetHidden() !== l.TRUE).length <= 1)
4612
+ const e = this._injector.get(l);
4613
+ if (this._workbook.getSheets().filter((o) => o.isSheetHidden() !== g.TRUE).length <= 1)
4637
4614
  throw new Error("Cannot hide the only visible sheet");
4638
- return e.syncExecuteCommand(zt.id, {
4615
+ return e.syncExecuteCommand(Ot.id, {
4639
4616
  unitId: this._workbook.getUnitId(),
4640
4617
  subUnitId: this._worksheet.getSheetId()
4641
4618
  }), this;
@@ -4652,7 +4629,7 @@ let k = class extends me {
4652
4629
  * ```
4653
4630
  */
4654
4631
  showSheet() {
4655
- return this._injector.get(g).syncExecuteCommand(Gt.id, {
4632
+ return this._injector.get(l).syncExecuteCommand(jt.id, {
4656
4633
  unitId: this._workbook.getUnitId(),
4657
4634
  subUnitId: this._worksheet.getSheetId()
4658
4635
  }), this;
@@ -4669,7 +4646,7 @@ let k = class extends me {
4669
4646
  * ```
4670
4647
  */
4671
4648
  isSheetHidden() {
4672
- return this._worksheet.isSheetHidden() === l.TRUE;
4649
+ return this._worksheet.isSheetHidden() === g.TRUE;
4673
4650
  }
4674
4651
  /**
4675
4652
  * Sets the sheet name.
@@ -4684,7 +4661,7 @@ let k = class extends me {
4684
4661
  * ```
4685
4662
  */
4686
4663
  setName(e) {
4687
- return this._commandService.syncExecuteCommand(ce.id, {
4664
+ return this._commandService.syncExecuteCommand(de.id, {
4688
4665
  unitId: this._workbook.getUnitId(),
4689
4666
  subUnitId: this._worksheet.getSheetId(),
4690
4667
  name: e
@@ -4740,7 +4717,7 @@ let k = class extends me {
4740
4717
  return this.clearContents();
4741
4718
  if (e && e.formatOnly && !e.contentsOnly)
4742
4719
  return this.clearFormats();
4743
- const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = this._injector.get(g), o = {
4720
+ const t = this._workbook.getUnitId(), n = this._worksheet.getSheetId(), s = this._injector.get(l), o = {
4744
4721
  startRow: 0,
4745
4722
  endRow: this._worksheet.getRowCount() - 1,
4746
4723
  startColumn: 0,
@@ -4765,7 +4742,7 @@ let k = class extends me {
4765
4742
  * ```
4766
4743
  */
4767
4744
  clearContents() {
4768
- const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(g), s = {
4745
+ const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(l), s = {
4769
4746
  startRow: 0,
4770
4747
  endRow: this._worksheet.getRowCount() - 1,
4771
4748
  startColumn: 0,
@@ -4789,7 +4766,7 @@ let k = class extends me {
4789
4766
  * ```
4790
4767
  */
4791
4768
  clearFormats() {
4792
- const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(g), s = {
4769
+ const e = this._workbook.getUnitId(), t = this._worksheet.getSheetId(), n = this._injector.get(l), s = {
4793
4770
  startRow: 0,
4794
4771
  endRow: this._worksheet.getRowCount() - 1,
4795
4772
  startColumn: 0,
@@ -4894,7 +4871,7 @@ let k = class extends me {
4894
4871
  * ```
4895
4872
  */
4896
4873
  insertDefinedName(e, t) {
4897
- const s = this._injector.createInstance(Q).setName(e).setRef(t).build();
4874
+ const s = this._injector.createInstance(Y).setName(e).setRef(t).build();
4898
4875
  s.localSheetId = this.getSheetId(), this._fWorkbook.insertDefinedNameBuilder(s);
4899
4876
  }
4900
4877
  /**
@@ -5013,10 +4990,10 @@ let k = class extends me {
5013
4990
  * ```
5014
4991
  */
5015
4992
  appendRow(e) {
5016
- const t = this._worksheet.getCellMatrix().hasValue(), n = this._worksheet.getLastRowWithContent(), s = this._worksheet.getRowCount(), o = this._worksheet.getColumnCount(), i = t ? n + 1 : n, a = new V();
4993
+ const t = this._worksheet.getCellMatrix().hasValue(), n = this._worksheet.getLastRowWithContent(), s = this._worksheet.getRowCount(), o = this._worksheet.getColumnCount(), i = t ? n + 1 : n, a = new J();
5017
4994
  for (let h = 0; h < e.length; h++)
5018
- a.setValue(i, h, O(e[h]));
5019
- return this._commandService.syncExecuteCommand($t.id, {
4995
+ a.setValue(i, h, re(e[h]));
4996
+ return this._commandService.syncExecuteCommand(Lt.id, {
5020
4997
  unitId: this._workbook.getUnitId(),
5021
4998
  subUnitId: this._worksheet.getSheetId(),
5022
4999
  cellValue: a.getMatrix(),
@@ -5040,7 +5017,7 @@ let k = class extends me {
5040
5017
  * ```
5041
5018
  */
5042
5019
  setRowCount(e) {
5043
- return this._commandService.syncExecuteCommand(qt.id, {
5020
+ return this._commandService.syncExecuteCommand(zt.id, {
5044
5021
  unitId: this._workbook.getUnitId(),
5045
5022
  subUnitId: this._worksheet.getSheetId(),
5046
5023
  rowCount: e
@@ -5060,28 +5037,28 @@ let k = class extends me {
5060
5037
  * ```
5061
5038
  */
5062
5039
  setColumnCount(e) {
5063
- return this._commandService.syncExecuteCommand(Kt.id, {
5040
+ return this._commandService.syncExecuteCommand(Gt.id, {
5064
5041
  unitId: this._workbook.getUnitId(),
5065
5042
  subUnitId: this._worksheet.getSheetId(),
5066
5043
  columnCount: e
5067
5044
  }), this;
5068
5045
  }
5069
5046
  };
5070
- k = In([
5071
- z(3, u(x)),
5072
- z(4, u(Ze)),
5073
- z(5, u(je)),
5074
- z(6, g)
5047
+ k = Cn([
5048
+ j(3, u(x)),
5049
+ j(4, u(Ze)),
5050
+ j(5, u(je)),
5051
+ j(6, l)
5075
5052
  ], k);
5076
- var Rn = Object.getOwnPropertyDescriptor, bn = (r, e, t, n) => {
5077
- for (var s = n > 1 ? void 0 : n ? Rn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
5053
+ var vn = Object.getOwnPropertyDescriptor, fn = (r, e, t, n) => {
5054
+ for (var s = n > 1 ? void 0 : n ? vn(e, t) : e, o = r.length - 1, i; o >= 0; o--)
5078
5055
  (i = r[o]) && (s = i(s) || s);
5079
5056
  return s;
5080
5057
  }, R = (r, e) => (t, n) => e(t, n, r);
5081
- let S = class extends me {
5058
+ let S = class extends le {
5082
5059
  constructor(e, t, n, s, o, i, a, h, d, c) {
5083
5060
  super(t);
5084
- E(this, "id");
5061
+ p(this, "id");
5085
5062
  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();
5086
5063
  }
5087
5064
  /**
@@ -5234,14 +5211,14 @@ let S = class extends me {
5234
5211
  */
5235
5212
  create(e, t, n, s) {
5236
5213
  var h, d, c;
5237
- const o = Ce(se.deepClone((h = s == null ? void 0 : s.sheet) != null ? h : {}));
5214
+ const o = Ce(ve.deepClone((h = s == null ? void 0 : s.sheet) != null ? h : {}));
5238
5215
  o.name = e, o.rowCount = t, o.columnCount = n, o.id = (d = s == null ? void 0 : s.sheet) == null ? void 0 : d.id;
5239
5216
  const i = (c = s == null ? void 0 : s.index) != null ? c : this._workbook.getSheets().length;
5240
- this._commandService.syncExecuteCommand(q.id, {
5217
+ this._commandService.syncExecuteCommand(G.id, {
5241
5218
  unitId: this.id,
5242
5219
  index: i,
5243
5220
  sheet: o
5244
- }), this._commandService.syncExecuteCommand(F.id, {
5221
+ }), this._commandService.syncExecuteCommand(V.id, {
5245
5222
  unitId: this.id,
5246
5223
  subUnitId: this._workbook.getSheets()[i].getSheetId()
5247
5224
  });
@@ -5295,7 +5272,7 @@ let S = class extends me {
5295
5272
  * ```
5296
5273
  */
5297
5274
  setActiveSheet(e) {
5298
- return this._commandService.syncExecuteCommand(F.id, {
5275
+ return this._commandService.syncExecuteCommand(V.id, {
5299
5276
  unitId: this.id,
5300
5277
  subUnitId: typeof e == "string" ? e : e.getSheetId()
5301
5278
  }), typeof e == "string" ? this.getSheetBySheetId(e) : e;
@@ -5341,14 +5318,14 @@ let S = class extends me {
5341
5318
  */
5342
5319
  insertSheet(e, t) {
5343
5320
  var i, a, h;
5344
- const n = Ce(se.deepClone((i = t == null ? void 0 : t.sheet) != null ? i : {}));
5321
+ const n = Ce(ve.deepClone((i = t == null ? void 0 : t.sheet) != null ? i : {}));
5345
5322
  n.name = e, n.id = (a = t == null ? void 0 : t.sheet) == null ? void 0 : a.id;
5346
5323
  const s = (h = t == null ? void 0 : t.index) != null ? h : this._workbook.getSheets().length;
5347
- this._commandService.syncExecuteCommand(q.id, {
5324
+ this._commandService.syncExecuteCommand(G.id, {
5348
5325
  unitId: this.id,
5349
5326
  index: s,
5350
5327
  sheet: n
5351
- }), this._commandService.syncExecuteCommand(F.id, {
5328
+ }), this._commandService.syncExecuteCommand(V.id, {
5352
5329
  unitId: this.id,
5353
5330
  subUnitId: this._workbook.getSheets()[s].getSheetId()
5354
5331
  });
@@ -5374,7 +5351,7 @@ let S = class extends me {
5374
5351
  */
5375
5352
  deleteSheet(e) {
5376
5353
  const t = this.id, n = typeof e == "string" ? e : e.getSheetId();
5377
- return this._commandService.syncExecuteCommand(ue.id, {
5354
+ return this._commandService.syncExecuteCommand(ce.id, {
5378
5355
  unitId: t,
5379
5356
  subUnitId: n
5380
5357
  });
@@ -5391,7 +5368,7 @@ let S = class extends me {
5391
5368
  * ```
5392
5369
  */
5393
5370
  undo() {
5394
- return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(at.id), this;
5371
+ return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(st.id), this;
5395
5372
  }
5396
5373
  /**
5397
5374
  * Redo the last undone action.
@@ -5404,7 +5381,7 @@ let S = class extends me {
5404
5381
  * ```
5405
5382
  */
5406
5383
  redo() {
5407
- return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(ht.id), this;
5384
+ return this._univerInstanceService.focusUnit(this.id), this._commandService.syncExecuteCommand(ot.id), this;
5408
5385
  }
5409
5386
  /**
5410
5387
  * Callback for command execution.
@@ -5513,9 +5490,9 @@ let S = class extends me {
5513
5490
  const o = {
5514
5491
  unitId: this.getId(),
5515
5492
  subUnitId: n,
5516
- selections: [e].map((i) => ({ range: i.getRange(), primary: $(i.getRange(), s), style: null }))
5493
+ selections: [e].map((i) => ({ range: i.getRange(), primary: z(i.getRange(), s), style: null }))
5517
5494
  };
5518
- return this._commandService.syncExecuteCommand(_e.id, o), this;
5495
+ return this._commandService.syncExecuteCommand(me.id, o), this;
5519
5496
  }
5520
5497
  /**
5521
5498
  * Returns the selected range in the active sheet, or null if there is no active range.
@@ -5578,7 +5555,7 @@ let S = class extends me {
5578
5555
  * ```
5579
5556
  */
5580
5557
  duplicateSheet(e) {
5581
- return this._commandService.syncExecuteCommand(Yt.id, {
5558
+ return this._commandService.syncExecuteCommand($t.id, {
5582
5559
  unitId: e.getWorkbook().getUnitId(),
5583
5560
  subUnitId: e.getSheetId()
5584
5561
  }), this._injector.createInstance(k, this, this._workbook, this._workbook.getActiveSheet());
@@ -5674,7 +5651,7 @@ let S = class extends me {
5674
5651
  */
5675
5652
  moveSheet(e, t) {
5676
5653
  let n = t;
5677
- return n < 0 ? n = 0 : n > this._workbook.getSheets().length - 1 && (n = this._workbook.getSheets().length - 1), this._commandService.syncExecuteCommand(Jt.id, {
5654
+ return n < 0 ? n = 0 : n > this._workbook.getSheets().length - 1 && (n = this._workbook.getSheets().length - 1), this._commandService.syncExecuteCommand(qt.id, {
5678
5655
  unitId: e.getWorkbook().getUnitId(),
5679
5656
  order: n,
5680
5657
  subUnitId: e.getSheetId()
@@ -5706,7 +5683,7 @@ let S = class extends me {
5706
5683
  * ```
5707
5684
  */
5708
5685
  getPermission() {
5709
- return this._injector.createInstance(Y);
5686
+ return this._injector.createInstance(q);
5710
5687
  }
5711
5688
  /**
5712
5689
  * Get the defined name by name.
@@ -5726,7 +5703,7 @@ let S = class extends me {
5726
5703
  */
5727
5704
  getDefinedName(e) {
5728
5705
  const t = this._definedNamesService.getValueByName(this.id, e);
5729
- return t ? this._injector.createInstance(K, { ...t, unitId: this.id }) : null;
5706
+ return t ? this._injector.createInstance($, { ...t, unitId: this.id }) : null;
5730
5707
  }
5731
5708
  /**
5732
5709
  * Get all the defined names in the workbook.
@@ -5741,7 +5718,7 @@ let S = class extends me {
5741
5718
  */
5742
5719
  getDefinedNames() {
5743
5720
  const e = this._definedNamesService.getDefinedNameMap(this.id);
5744
- return e ? Object.values(e).map((t) => this._injector.createInstance(K, { ...t, unitId: this.id })) : [];
5721
+ return e ? Object.values(e).map((t) => this._injector.createInstance($, { ...t, unitId: this.id })) : [];
5745
5722
  }
5746
5723
  /**
5747
5724
  * Insert a defined name.
@@ -5756,8 +5733,8 @@ let S = class extends me {
5756
5733
  * ```
5757
5734
  */
5758
5735
  insertDefinedName(e, t) {
5759
- const s = this._injector.createInstance(Q).setName(e).setRef(t).build();
5760
- return s.localSheetId = H, this.insertDefinedNameBuilder(s), this;
5736
+ const s = this._injector.createInstance(Y).setName(e).setRef(t).build();
5737
+ return s.localSheetId = F, this.insertDefinedNameBuilder(s), this;
5761
5738
  }
5762
5739
  /**
5763
5740
  * Delete the defined name with the given name.
@@ -5791,7 +5768,7 @@ let S = class extends me {
5791
5768
  * ```
5792
5769
  */
5793
5770
  insertDefinedNameBuilder(e) {
5794
- e.unitId = this.getId(), this._commandService.syncExecuteCommand(ie.id, e);
5771
+ e.unitId = this.getId(), this._commandService.syncExecuteCommand(oe.id, e);
5795
5772
  }
5796
5773
  /**
5797
5774
  * Update the defined name with the given name.
@@ -5815,7 +5792,7 @@ let S = class extends me {
5815
5792
  * ```
5816
5793
  */
5817
5794
  updateDefinedNameBuilder(e) {
5818
- this._commandService.syncExecuteCommand(ie.id, e);
5795
+ this._commandService.syncExecuteCommand(oe.id, e);
5819
5796
  }
5820
5797
  /**
5821
5798
  * Gets the registered range themes.
@@ -5849,7 +5826,7 @@ let S = class extends me {
5849
5826
  * ```
5850
5827
  */
5851
5828
  registerRangeTheme(e) {
5852
- this._commandService.syncExecuteCommand(Qt.id, {
5829
+ this._commandService.syncExecuteCommand(Kt.id, {
5853
5830
  unitId: this.getId(),
5854
5831
  rangeThemeStyle: e
5855
5832
  });
@@ -5865,7 +5842,7 @@ let S = class extends me {
5865
5842
  * ```
5866
5843
  */
5867
5844
  unregisterRangeTheme(e) {
5868
- this._commandService.syncExecuteCommand(Xt.id, {
5845
+ this._commandService.syncExecuteCommand(Yt.id, {
5869
5846
  unitId: this.getId(),
5870
5847
  themeName: e
5871
5848
  });
@@ -5889,7 +5866,7 @@ let S = class extends me {
5889
5866
  * ```
5890
5867
  */
5891
5868
  createRangeThemeStyle(e, t) {
5892
- return new Zt(e, t);
5869
+ return new Jt(e, t);
5893
5870
  }
5894
5871
  /**
5895
5872
  * Set custom metadata of workbook
@@ -5918,18 +5895,18 @@ let S = class extends me {
5918
5895
  return this._workbook.getCustomMetadata();
5919
5896
  }
5920
5897
  };
5921
- S = bn([
5898
+ S = fn([
5922
5899
  R(1, u(x)),
5923
- R(2, u(it)),
5900
+ R(2, u(rt)),
5924
5901
  R(3, u(Ze)),
5925
- R(4, oe),
5926
- R(5, g),
5927
- R(6, le),
5902
+ R(4, se),
5903
+ R(5, l),
5904
+ R(6, ue),
5928
5905
  R(7, je),
5929
5906
  R(8, u(He)),
5930
5907
  R(9, et)
5931
5908
  ], S);
5932
- class pn extends ze {
5909
+ class In extends ze {
5933
5910
  getCommandSheetTarget(e) {
5934
5911
  var o;
5935
5912
  const t = e.params;
@@ -5950,7 +5927,7 @@ class pn extends ze {
5950
5927
  return { workbook: n, worksheet: s };
5951
5928
  }
5952
5929
  _initWorkbookEvent(e) {
5953
- const t = e.get(oe);
5930
+ const t = e.get(se);
5954
5931
  this.registerEventHandler(
5955
5932
  this.Event.WorkbookDisposed,
5956
5933
  () => t.unitDisposed$.subscribe((n) => {
@@ -5980,12 +5957,12 @@ class pn extends ze {
5980
5957
  */
5981
5958
  // eslint-disable-next-line max-lines-per-function
5982
5959
  _initialize(e) {
5983
- const t = e.get(g);
5960
+ const t = e.get(l);
5984
5961
  this.registerEventHandler(
5985
5962
  this.Event.BeforeSheetCreate,
5986
5963
  () => t.beforeCommandExecuted((n) => {
5987
5964
  var s;
5988
- if (n.id === q.id) {
5965
+ if (n.id === G.id) {
5989
5966
  const o = n.params, { unitId: i, index: a, sheet: h } = o || {}, d = i ? this.getUniverSheet(i) : (s = this.getActiveWorkbook) == null ? void 0 : s.call(this);
5990
5967
  if (!d)
5991
5968
  return;
@@ -5995,14 +5972,14 @@ class pn extends ze {
5995
5972
  sheet: h
5996
5973
  };
5997
5974
  if (this.fireEvent(this.Event.BeforeSheetCreate, c), c.cancel)
5998
- throw new v();
5975
+ throw new f();
5999
5976
  }
6000
5977
  })
6001
5978
  ), this.registerEventHandler(
6002
5979
  this.Event.BeforeActiveSheetChange,
6003
5980
  () => t.beforeCommandExecuted((n) => {
6004
5981
  var s;
6005
- if (n.id === F.id) {
5982
+ if (n.id === V.id) {
6006
5983
  const { subUnitId: o, unitId: i } = n.params, a = i ? this.getUniverSheet(i) : (s = this.getActiveWorkbook) == null ? void 0 : s.call(this);
6007
5984
  if (!a || !o) return;
6008
5985
  const h = a.getSheetBySheetId(o), d = a.getActiveSheet();
@@ -6013,13 +5990,13 @@ class pn extends ze {
6013
5990
  oldActiveSheet: d
6014
5991
  };
6015
5992
  if (this.fireEvent(this.Event.BeforeActiveSheetChange, c), c.cancel)
6016
- throw new v();
5993
+ throw new f();
6017
5994
  }
6018
5995
  })
6019
5996
  ), this.registerEventHandler(
6020
5997
  this.Event.BeforeSheetDelete,
6021
5998
  () => t.beforeCommandExecuted((n) => {
6022
- if (n.id === ue.id) {
5999
+ if (n.id === ce.id) {
6023
6000
  const s = this.getCommandSheetTarget(n);
6024
6001
  if (!s) return;
6025
6002
  const { workbook: o, worksheet: i } = s, a = {
@@ -6027,13 +6004,13 @@ class pn extends ze {
6027
6004
  worksheet: i
6028
6005
  };
6029
6006
  if (this.fireEvent(this.Event.BeforeSheetDelete, a), a.cancel)
6030
- throw new v();
6007
+ throw new f();
6031
6008
  }
6032
6009
  })
6033
6010
  ), this.registerEventHandler(
6034
6011
  this.Event.BeforeSheetMove,
6035
6012
  () => t.beforeCommandExecuted((n) => {
6036
- if (n.id === Ne.id) {
6013
+ if (n.id === Te.id) {
6037
6014
  const { fromOrder: s, toOrder: o } = n.params, i = this.getCommandSheetTarget(n);
6038
6015
  if (!i) return;
6039
6016
  const a = {
@@ -6043,13 +6020,13 @@ class pn extends ze {
6043
6020
  oldIndex: s
6044
6021
  };
6045
6022
  if (this.fireEvent(this.Event.BeforeSheetMove, a), a.cancel)
6046
- throw new v();
6023
+ throw new f();
6047
6024
  }
6048
6025
  })
6049
6026
  ), this.registerEventHandler(
6050
6027
  this.Event.BeforeSheetNameChange,
6051
6028
  () => t.beforeCommandExecuted((n) => {
6052
- if (n.id === ce.id) {
6029
+ if (n.id === de.id) {
6053
6030
  const { name: s } = n.params, o = this.getCommandSheetTarget(n);
6054
6031
  if (!o) return;
6055
6032
  const i = {
@@ -6059,13 +6036,13 @@ class pn extends ze {
6059
6036
  oldName: o.worksheet.getSheetName()
6060
6037
  };
6061
6038
  if (this.fireEvent(this.Event.BeforeSheetNameChange, i), i.cancel)
6062
- throw new v();
6039
+ throw new f();
6063
6040
  }
6064
6041
  })
6065
6042
  ), this.registerEventHandler(
6066
6043
  this.Event.BeforeSheetTabColorChange,
6067
6044
  () => t.beforeCommandExecuted((n) => {
6068
- if (n.id === Te.id) {
6045
+ if (n.id === Ae.id) {
6069
6046
  const { color: s } = n.params, o = this.getCommandSheetTarget(n);
6070
6047
  if (!o) return;
6071
6048
  const i = {
@@ -6075,13 +6052,13 @@ class pn extends ze {
6075
6052
  oldColor: o.worksheet.getTabColor()
6076
6053
  };
6077
6054
  if (this.fireEvent(this.Event.BeforeSheetTabColorChange, i), i.cancel)
6078
- throw new v();
6055
+ throw new f();
6079
6056
  }
6080
6057
  })
6081
6058
  ), this.registerEventHandler(
6082
6059
  this.Event.BeforeSheetHideChange,
6083
6060
  () => t.beforeCommandExecuted((n) => {
6084
- if (n.id === Ae.id) {
6061
+ if (n.id === De.id) {
6085
6062
  const { hidden: s } = n.params, o = this.getCommandSheetTarget(n);
6086
6063
  if (!o) return;
6087
6064
  const i = {
@@ -6090,14 +6067,14 @@ class pn extends ze {
6090
6067
  hidden: !!s
6091
6068
  };
6092
6069
  if (this.fireEvent(this.Event.BeforeSheetHideChange, i), i.cancel)
6093
- throw new v();
6070
+ throw new f();
6094
6071
  }
6095
6072
  })
6096
6073
  ), this.registerEventHandler(
6097
6074
  this.Event.BeforeGridlineColorChange,
6098
6075
  () => t.beforeCommandExecuted((n) => {
6099
6076
  var s;
6100
- if (n.id === de.id) {
6077
+ if (n.id === he.id) {
6101
6078
  const o = this.getCommandSheetTarget(n);
6102
6079
  if (!o) return;
6103
6080
  const i = {
@@ -6105,14 +6082,14 @@ class pn extends ze {
6105
6082
  color: (s = n.params) == null ? void 0 : s.color
6106
6083
  };
6107
6084
  if (this.fireEvent(this.Event.BeforeGridlineColorChange, i), i.cancel)
6108
- throw new v();
6085
+ throw new f();
6109
6086
  }
6110
6087
  })
6111
6088
  ), this.registerEventHandler(
6112
6089
  this.Event.BeforeGridlineEnableChange,
6113
6090
  () => t.beforeCommandExecuted((n) => {
6114
6091
  var s;
6115
- if (n.id === he.id) {
6092
+ if (n.id === ae.id) {
6116
6093
  const o = this.getCommandSheetTarget(n);
6117
6094
  if (!o) return;
6118
6095
  const i = {
@@ -6120,15 +6097,15 @@ class pn extends ze {
6120
6097
  enabled: !!((s = n.params) != null && s.showGridlines)
6121
6098
  };
6122
6099
  if (this.fireEvent(this.Event.BeforeGridlineEnableChange, i), i.cancel)
6123
- throw new v();
6100
+ throw new f();
6124
6101
  }
6125
6102
  })
6126
6103
  ), this.registerEventHandler(
6127
6104
  this.Event.SheetValueChanged,
6128
6105
  () => t.onCommandExecuted((n) => {
6129
- if (en.indexOf(n.id) > -1) {
6106
+ if (Qt.indexOf(n.id) > -1) {
6130
6107
  if (!this.getActiveSheet()) return;
6131
- const o = tn(n).map(
6108
+ const o = Xt(n).map(
6132
6109
  (i) => {
6133
6110
  var a, h;
6134
6111
  return (h = (a = this.getWorkbook(i.unitId)) == null ? void 0 : a.getSheetBySheetId(i.subUnitId)) == null ? void 0 : h.getRange(i.range);
@@ -6145,7 +6122,7 @@ class pn extends ze {
6145
6122
  this.Event.SheetCreated,
6146
6123
  () => t.onCommandExecuted((n) => {
6147
6124
  var s;
6148
- if (n.id === q.id) {
6125
+ if (n.id === G.id) {
6149
6126
  const o = n.params, { unitId: i } = o || {}, a = i ? this.getUniverSheet(i) : (s = this.getActiveWorkbook) == null ? void 0 : s.call(this);
6150
6127
  if (!a)
6151
6128
  return;
@@ -6165,7 +6142,7 @@ class pn extends ze {
6165
6142
  ), this.registerEventHandler(
6166
6143
  this.Event.ActiveSheetChanged,
6167
6144
  () => t.onCommandExecuted((n) => {
6168
- if (n.id === F.id) {
6145
+ if (n.id === V.id) {
6169
6146
  const s = this.getActiveSheet();
6170
6147
  if (!s) return;
6171
6148
  const { workbook: o, worksheet: i } = s;
@@ -6176,7 +6153,7 @@ class pn extends ze {
6176
6153
  this.Event.SheetDeleted,
6177
6154
  () => t.onCommandExecuted((n) => {
6178
6155
  var s;
6179
- if (n.id === ue.id) {
6156
+ if (n.id === ce.id) {
6180
6157
  const { subUnitId: o, unitId: i } = n.params, a = i ? this.getUniverSheet(i) : (s = this.getActiveWorkbook) == null ? void 0 : s.call(this);
6181
6158
  if (!a || !o) return;
6182
6159
  this._fireSheetDeleted(a, o);
@@ -6185,7 +6162,7 @@ class pn extends ze {
6185
6162
  ), this.registerEventHandler(
6186
6163
  this.Event.SheetMoved,
6187
6164
  () => t.onCommandExecuted((n) => {
6188
- if (n.id === Ne.id) {
6165
+ if (n.id === Te.id) {
6189
6166
  const { toOrder: s } = n.params, o = this.getCommandSheetTarget(n);
6190
6167
  if (!o) return;
6191
6168
  this._fireSheetMoved(o.workbook, o.worksheet, s);
@@ -6194,7 +6171,7 @@ class pn extends ze {
6194
6171
  ), this.registerEventHandler(
6195
6172
  this.Event.SheetNameChanged,
6196
6173
  () => t.onCommandExecuted((n) => {
6197
- if (n.id === ce.id) {
6174
+ if (n.id === de.id) {
6198
6175
  const { name: s } = n.params, o = this.getCommandSheetTarget(n);
6199
6176
  if (!o) return;
6200
6177
  this._fireSheetNameChanged(o.workbook, o.worksheet, s);
@@ -6203,7 +6180,7 @@ class pn extends ze {
6203
6180
  ), this.registerEventHandler(
6204
6181
  this.Event.SheetTabColorChanged,
6205
6182
  () => t.onCommandExecuted((n) => {
6206
- if (n.id === Te.id) {
6183
+ if (n.id === Ae.id) {
6207
6184
  const { color: s } = n.params, o = this.getCommandSheetTarget(n);
6208
6185
  if (!o) return;
6209
6186
  this._fireSheetTabColorChanged(o.workbook, o.worksheet, s);
@@ -6212,7 +6189,7 @@ class pn extends ze {
6212
6189
  ), this.registerEventHandler(
6213
6190
  this.Event.SheetHideChanged,
6214
6191
  () => t.onCommandExecuted((n) => {
6215
- if (n.id === Ae.id) {
6192
+ if (n.id === De.id) {
6216
6193
  const { hidden: s } = n.params, o = this.getCommandSheetTarget(n);
6217
6194
  if (!o) return;
6218
6195
  this._fireSheetHideChanged(o.workbook, o.worksheet, !!s);
@@ -6221,7 +6198,7 @@ class pn extends ze {
6221
6198
  ), this.registerEventHandler(
6222
6199
  this.Event.GridlineChanged,
6223
6200
  () => t.onCommandExecuted((n) => {
6224
- if (n.id === de.id || n.id === he.id) {
6201
+ if (n.id === he.id || n.id === ae.id) {
6225
6202
  const s = this.getCommandSheetTarget(n);
6226
6203
  if (!s) return;
6227
6204
  this.fireEvent(this.Event.GridlineChanged, {
@@ -6234,7 +6211,7 @@ class pn extends ze {
6234
6211
  ), this._initWorkbookEvent(e);
6235
6212
  }
6236
6213
  createUniverSheet(e, t) {
6237
- const s = this._injector.get(oe).createUnit(U.UNIVER_SHEET, e, t);
6214
+ const s = this._injector.get(se).createUnit(U.UNIVER_SHEET, e, t);
6238
6215
  return this._injector.createInstance(S, s);
6239
6216
  }
6240
6217
  createWorkbook(e, t) {
@@ -6255,7 +6232,7 @@ class pn extends ze {
6255
6232
  return this.getUniverSheet(e);
6256
6233
  }
6257
6234
  getPermission() {
6258
- return this._injector.createInstance(Y);
6235
+ return this._injector.createInstance(q);
6259
6236
  }
6260
6237
  onUniverSheetCreated(e) {
6261
6238
  const t = this._univerInstanceService.getTypeOfUnitAdded$(U.UNIVER_SHEET).subscribe((n) => {
@@ -6265,7 +6242,7 @@ class pn extends ze {
6265
6242
  return Le(t);
6266
6243
  }
6267
6244
  newDefinedName() {
6268
- return this._injector.createInstance(Q);
6245
+ return this._injector.createInstance(Y);
6269
6246
  }
6270
6247
  getActiveSheet() {
6271
6248
  const e = this.getActiveWorkbook();
@@ -6315,20 +6292,20 @@ class pn extends ze {
6315
6292
  });
6316
6293
  }
6317
6294
  }
6318
- ze.extend(pn);
6319
- class En {
6295
+ ze.extend(In);
6296
+ class Rn {
6320
6297
  get SheetValueChangeType() {
6321
- return nn;
6298
+ return Zt;
6322
6299
  }
6323
6300
  get SheetSkeletonChangeType() {
6324
- return rn;
6301
+ return en;
6325
6302
  }
6326
6303
  get SplitDelimiterType() {
6327
- return sn;
6304
+ return tn;
6328
6305
  }
6329
6306
  }
6330
- dt.extend(En);
6331
- class yn {
6307
+ it.extend(Rn);
6308
+ class bn {
6332
6309
  get SheetCreated() {
6333
6310
  return "SheetCreated";
6334
6311
  }
@@ -6390,28 +6367,27 @@ class yn {
6390
6367
  return "SheetValueChanged";
6391
6368
  }
6392
6369
  }
6393
- ct.extend(yn);
6394
- var Un = Object.getOwnPropertyDescriptor, xn = (r, e, t, n) => {
6395
- for (var s = n > 1 ? void 0 : n ? Un(e, t) : e, o = r.length - 1, i; o >= 0; o--)
6370
+ at.extend(bn);
6371
+ var En = Object.getOwnPropertyDescriptor, pn = (r, e, t, n) => {
6372
+ for (var s = n > 1 ? void 0 : n ? En(e, t) : e, o = r.length - 1, i; o >= 0; o--)
6396
6373
  (i = r[o]) && (s = i(s) || s);
6397
6374
  return s;
6398
- }, Pn = (r, e) => (t, n) => e(t, n, r);
6375
+ }, yn = (r, e) => (t, n) => e(t, n, r);
6399
6376
  let Ve = class extends ge {
6400
6377
  constructor(r) {
6401
6378
  super(), this._injector = r;
6402
6379
  }
6403
6380
  };
6404
- Ve = xn([
6405
- Pn(0, u(x))
6381
+ Ve = pn([
6382
+ yn(0, u(x))
6406
6383
  ], Ve);
6407
6384
  export {
6408
- Y as FPermission,
6385
+ q as FPermission,
6409
6386
  m as FRange,
6410
- J as FSelection,
6411
- yn as FSheetEventName,
6387
+ K as FSelection,
6388
+ bn as FSheetEventName,
6412
6389
  Ve as FSheetHooks,
6413
- En as FSheetsEnum,
6390
+ Rn as FSheetsEnum,
6414
6391
  S as FWorkbook,
6415
- k as FWorksheet,
6416
- Be as covertCellValues
6392
+ k as FWorksheet
6417
6393
  };