@univerjs/sheets 0.1.4 → 0.1.5

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.
Files changed (102) hide show
  1. package/lib/cjs/index.js +2 -2
  2. package/lib/es/index.js +900 -901
  3. package/lib/types/basics/const/default-spreadsheet-plugin-data.d.ts +2 -16
  4. package/lib/types/basics/interfaces/i-ruler-manager.d.ts +2 -16
  5. package/lib/types/basics/interfaces/mutation-interface.d.ts +2 -16
  6. package/lib/types/basics/interfaces/selection-config.d.ts +2 -16
  7. package/lib/types/basics/interfaces/spreadsheet-config.d.ts +2 -16
  8. package/lib/types/basics/rangeMerge.d.ts +2 -17
  9. package/lib/types/basics/selection.d.ts +2 -16
  10. package/lib/types/basics/sheet-header.d.ts +2 -16
  11. package/lib/types/commands/commands/__tests__/create-command-test-bed.d.ts +3 -19
  12. package/lib/types/commands/commands/add-worksheet-merge.command.d.ts +2 -17
  13. package/lib/types/commands/commands/clear-selection-all.command.d.ts +2 -16
  14. package/lib/types/commands/commands/clear-selection-content.command.d.ts +2 -16
  15. package/lib/types/commands/commands/clear-selection-format.command.d.ts +2 -16
  16. package/lib/types/commands/commands/copy-to-worksheet.command.d.ts +2 -16
  17. package/lib/types/commands/commands/copy-worksheet.command.d.ts +2 -16
  18. package/lib/types/commands/commands/delete-range-move-left.command.d.ts +2 -16
  19. package/lib/types/commands/commands/delete-range-move-up.command.d.ts +2 -16
  20. package/lib/types/commands/commands/insert-range-move-down.command.d.ts +2 -16
  21. package/lib/types/commands/commands/insert-range-move-right.command.d.ts +2 -16
  22. package/lib/types/commands/commands/insert-row-col.command.d.ts +2 -17
  23. package/lib/types/commands/commands/insert-sheet.command.d.ts +2 -16
  24. package/lib/types/commands/commands/move-range.command.d.ts +3 -17
  25. package/lib/types/commands/commands/move-rows-cols.command.d.ts +2 -16
  26. package/lib/types/commands/commands/remove-row-col.command.d.ts +2 -16
  27. package/lib/types/commands/commands/remove-sheet.command.d.ts +2 -16
  28. package/lib/types/commands/commands/remove-worksheet-merge.command.d.ts +2 -16
  29. package/lib/types/commands/commands/set-border-command.d.ts +3 -18
  30. package/lib/types/commands/commands/set-col-visible.command.d.ts +2 -16
  31. package/lib/types/commands/commands/set-frozen-cancel.command.d.ts +2 -16
  32. package/lib/types/commands/commands/set-frozen.command.d.ts +2 -16
  33. package/lib/types/commands/commands/set-hide-gridlines.command.d.ts +2 -17
  34. package/lib/types/commands/commands/set-range-values.command.d.ts +3 -17
  35. package/lib/types/commands/commands/set-row-visible.command.d.ts +2 -16
  36. package/lib/types/commands/commands/set-style.command.d.ts +2 -16
  37. package/lib/types/commands/commands/set-tab-color.command.d.ts +2 -16
  38. package/lib/types/commands/commands/set-worksheet-activate.command.d.ts +2 -16
  39. package/lib/types/commands/commands/set-worksheet-col-width.command.d.ts +2 -16
  40. package/lib/types/commands/commands/set-worksheet-hide.command.d.ts +2 -16
  41. package/lib/types/commands/commands/set-worksheet-name.command.d.ts +2 -16
  42. package/lib/types/commands/commands/set-worksheet-order.command.d.ts +2 -16
  43. package/lib/types/commands/commands/set-worksheet-right-to-left.command.d.ts +2 -17
  44. package/lib/types/commands/commands/set-worksheet-row-height.command.d.ts +2 -16
  45. package/lib/types/commands/commands/set-worksheet-show.command.d.ts +2 -16
  46. package/lib/types/commands/commands/utils/merged-cell-util.d.ts +2 -16
  47. package/lib/types/commands/commands/utils/selection-utils.d.ts +4 -17
  48. package/lib/types/commands/mutations/__tests__/create-command-test-bed.d.ts +3 -19
  49. package/lib/types/commands/mutations/add-worksheet-merge.mutation.d.ts +4 -18
  50. package/lib/types/commands/mutations/empty.mutation.d.ts +2 -16
  51. package/lib/types/commands/mutations/insert-row-col.mutation.d.ts +4 -18
  52. package/lib/types/commands/mutations/insert-sheet.mutation.d.ts +4 -18
  53. package/lib/types/commands/mutations/move-range.mutation.d.ts +2 -16
  54. package/lib/types/commands/mutations/move-rows-cols.mutation.d.ts +3 -17
  55. package/lib/types/commands/mutations/numfmt-mutation.d.ts +4 -18
  56. package/lib/types/commands/mutations/remove-row-col.mutation.d.ts +4 -18
  57. package/lib/types/commands/mutations/remove-sheet.mutation.d.ts +4 -18
  58. package/lib/types/commands/mutations/remove-worksheet-merge.mutation.d.ts +4 -18
  59. package/lib/types/commands/mutations/set-col-visible.mutation.d.ts +3 -17
  60. package/lib/types/commands/mutations/set-frozen.mutation.d.ts +3 -17
  61. package/lib/types/commands/mutations/set-hide-gridlines.mutatiom.d.ts +3 -17
  62. package/lib/types/commands/mutations/set-range-values.mutation.d.ts +3 -17
  63. package/lib/types/commands/mutations/set-row-visible.mutation.d.ts +3 -17
  64. package/lib/types/commands/mutations/set-tab-color.mutation.d.ts +3 -17
  65. package/lib/types/commands/mutations/set-worksheet-col-width.mutation.d.ts +3 -17
  66. package/lib/types/commands/mutations/set-worksheet-config.mutation.d.ts +3 -17
  67. package/lib/types/commands/mutations/set-worksheet-hide.mutation.d.ts +3 -17
  68. package/lib/types/commands/mutations/set-worksheet-name.mutation.d.ts +3 -17
  69. package/lib/types/commands/mutations/set-worksheet-order.mutation.d.ts +5 -18
  70. package/lib/types/commands/mutations/set-worksheet-right-to-left.mutation.d.ts +3 -17
  71. package/lib/types/commands/mutations/set-worksheet-row-height.mutation.d.ts +4 -18
  72. package/lib/types/commands/operations/selection.operation.d.ts +4 -18
  73. package/lib/types/commands/operations/set-worksheet-active.operation.d.ts +2 -16
  74. package/lib/types/commands/utils/get-target.d.ts +2 -16
  75. package/lib/types/commands/utils/handle-merge-operation.d.ts +5 -19
  76. package/lib/types/commands/utils/handle-range-mutation.d.ts +4 -19
  77. package/lib/types/controllers/__tests__/util.d.ts +10 -25
  78. package/lib/types/controllers/basic-worksheet.controller.d.ts +3 -18
  79. package/lib/types/controllers/calculate-result-apply.controller.d.ts +1 -15
  80. package/lib/types/controllers/feature-calculation.controller.d.ts +2 -16
  81. package/lib/types/controllers/merge-cell.controller.d.ts +5 -20
  82. package/lib/types/index.d.ts +1 -1
  83. package/lib/types/locale/en-US.d.ts +2 -16
  84. package/lib/types/services/__tests__/util.d.ts +10 -25
  85. package/lib/types/services/border-style-manager.service.d.ts +3 -17
  86. package/lib/types/services/numfmt/numfmt.service.d.ts +5 -19
  87. package/lib/types/services/numfmt/type.d.ts +5 -18
  88. package/lib/types/services/permission/permission-point.d.ts +1 -15
  89. package/lib/types/services/permission/sheet-permission.service.d.ts +3 -18
  90. package/lib/types/services/permission/tool.d.ts +2 -16
  91. package/lib/types/services/ref-range/__tests__/util.d.ts +10 -25
  92. package/lib/types/services/ref-range/ref-range.service.d.ts +7 -22
  93. package/lib/types/services/ref-range/type.d.ts +10 -32
  94. package/lib/types/services/ref-range/util.d.ts +7 -22
  95. package/lib/types/services/selection-manager.service.d.ts +7 -21
  96. package/lib/types/services/sheet-interceptor/__tests__/create-core-test-bed.d.ts +10 -25
  97. package/lib/types/services/sheet-interceptor/interceptor-const.d.ts +5 -19
  98. package/lib/types/services/sheet-interceptor/sheet-interceptor.service.d.ts +4 -19
  99. package/lib/types/services/sheet-interceptor/utils/interceptor.d.ts +2 -16
  100. package/lib/types/sheets-plugin.d.ts +2 -16
  101. package/lib/umd/index.js +2 -2
  102. package/package.json +10 -10
package/lib/es/index.js CHANGED
@@ -1,19 +1,19 @@
1
- var go = Object.defineProperty;
2
- var ho = (t, e, o) => e in t ? go(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
- var F = (t, e, o) => (ho(t, typeof e != "symbol" ? e + "" : e, o), o);
4
- import { ThemeService as mo, createInterceptorKey as Rt, OnLifecycle as Oe, LifecycleStages as _e, Disposable as ke, toDisposable as ge, remove as rn, composeInterceptors as fo, DisposableCollection as Et, IUniverInstanceService as C, CommandType as I, ObjectMatrix as ne, CellValueType as Me, Tools as b, ICommandService as _, IUndoRedoService as B, sequenceExecute as K, LocaleService as Vt, selectionToArray as vo, Rectangle as N, RANGE_TYPE as q, ErrorService as pt, Range as ue, isICellData as Co, Dimension as ae, getArrayLength as Cn, insertMatrixArray as vt, spliceArray as Sn, sliceMatrixArray as In, concatMatrixArray as Rn, ILogService as Bt, BooleanNumber as Y, Direction as $e, mergeWorksheetSnapshotWithDefault as So, moveMatrixArray as pn, BorderType as re, BorderStyleTypes as Io, FontWeight as Ro, FontItalic as po, runOnLifecycle as wo, IConfigService as Mo, InterceptorManager as _o, IResourceManagerService as yo, RefAlias as Dt, PermissionPoint as bo, IPermissionService as Uo, UniverEditablePermissionPoint as sn, getTypeFromPermissionItemList as Do, Plugin as Oo, PluginType as ko, ColorKit as Ao, makeCellRangeToRangeData as Po } from "@univerjs/core";
5
- import { Inject as oe, createIdentifier as Eo, Injector as wn } from "@wendellhu/redi";
6
- import { Subject as Nt, BehaviorSubject as Mn, Observable as No } from "rxjs";
7
- import { SetFormulaCalculationResultMutation as xo, FormulaDataModel as To, IFeatureCalculationManagerService as Lo } from "@univerjs/engine-formula";
8
- import { map as Vo } from "rxjs/operators";
9
- import { getCellInfoInMergeData as Bo } from "@univerjs/engine-render";
10
- var Wo = Object.defineProperty, jo = Object.getOwnPropertyDescriptor, Fo = (t, e, o, n) => {
11
- for (var r = n > 1 ? void 0 : n ? jo(e, o) : e, i = t.length - 1, s; i >= 0; i--)
1
+ var ho = Object.defineProperty;
2
+ var mo = (t, e, o) => e in t ? ho(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
3
+ var F = (t, e, o) => (mo(t, typeof e != "symbol" ? e + "" : e, o), o);
4
+ import { ThemeService as fo, createInterceptorKey as It, OnLifecycle as Oe, LifecycleStages as _e, Disposable as ke, toDisposable as ge, remove as rn, composeInterceptors as vo, DisposableCollection as Nt, IUniverInstanceService as C, CommandType as R, ObjectMatrix as te, CellValueType as Me, Tools as b, ICommandService as _, IUndoRedoService as B, sequenceExecute as K, LocaleService as Vt, selectionToArray as Co, Rectangle as N, RANGE_TYPE as q, ErrorService as pt, Range as ue, cellToRange as Cn, isICellData as So, Dimension as ae, getArrayLength as Sn, insertMatrixArray as vt, spliceArray as Rn, sliceMatrixArray as In, concatMatrixArray as pn, ILogService as Bt, BooleanNumber as Y, Direction as $e, mergeWorksheetSnapshotWithDefault as Ro, moveMatrixArray as wn, BorderType as re, BorderStyleTypes as Io, FontWeight as po, FontItalic as wo, runOnLifecycle as Mo, IConfigService as _o, InterceptorManager as yo, IResourceManagerService as bo, RefAlias as Dt, PermissionPoint as Uo, IPermissionService as Do, UniverEditablePermissionPoint as sn, getTypeFromPermissionItemList as Oo, Plugin as ko, PluginType as Ao, ColorKit as Po, makeCellRangeToRangeData as No } from "@univerjs/core";
5
+ import { Inject as ne, createIdentifier as Eo, Injector as Mn } from "@wendellhu/redi";
6
+ import { Subject as Et, BehaviorSubject as _n, Observable as xo } from "rxjs";
7
+ import { SetFormulaCalculationResultMutation as To, FormulaDataModel as Lo, IFeatureCalculationManagerService as Vo } from "@univerjs/engine-formula";
8
+ import { map as Bo } from "rxjs/operators";
9
+ import { getCellInfoInMergeData as Wo } from "@univerjs/engine-render";
10
+ var jo = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, $o = (t, e, o, n) => {
11
+ for (var r = n > 1 ? void 0 : n ? Fo(e, o) : e, i = t.length - 1, s; i >= 0; i--)
12
12
  (s = t[i]) && (r = (n ? s(e, o, r) : s(r)) || r);
13
- return n && r && Wo(e, o, r), r;
14
- }, $o = (t, e) => (o, n) => e(o, n, t);
13
+ return n && r && jo(e, o, r), r;
14
+ }, Ho = (t, e) => (o, n) => e(o, n, t);
15
15
  const se = "normalSelectionPluginName";
16
- var Ho = /* @__PURE__ */ ((t) => (t[t.MOVE_START = 0] = "MOVE_START", t[t.MOVING = 1] = "MOVING", t[t.MOVE_END = 2] = "MOVE_END", t))(Ho || {});
16
+ var zo = /* @__PURE__ */ ((t) => (t[t.MOVE_START = 0] = "MOVE_START", t[t.MOVING = 1] = "MOVING", t[t.MOVE_END = 2] = "MOVE_END", t))(zo || {});
17
17
  let x = class {
18
18
  // get isSelectionEnabled() {
19
19
  // return this._isSelectionEnabled;
@@ -24,11 +24,11 @@ let x = class {
24
24
  constructor(t) {
25
25
  F(this, "_selectionInfo", /* @__PURE__ */ new Map());
26
26
  F(this, "_currentSelection", null);
27
- F(this, "_selectionMoveStart$", new Nt());
27
+ F(this, "_selectionMoveStart$", new Et());
28
28
  F(this, "selectionMoveStart$", this._selectionMoveStart$.asObservable());
29
- F(this, "_selectionMoving$", new Nt());
29
+ F(this, "_selectionMoving$", new Et());
30
30
  F(this, "selectionMoving$", this._selectionMoving$.asObservable());
31
- F(this, "_selectionMoveEnd$", new Mn(null));
31
+ F(this, "_selectionMoveEnd$", new _n(null));
32
32
  F(this, "selectionMoveEnd$", this._selectionMoveEnd$.asObservable());
33
33
  F(this, "_dirty", !0);
34
34
  this._themeService = t;
@@ -235,18 +235,18 @@ let x = class {
235
235
  // this._currentSelection$.next(this._currentSelection);
236
236
  // }
237
237
  };
238
- x = Fo([
239
- $o(0, oe(mo))
238
+ x = $o([
239
+ Ho(0, ne(fo))
240
240
  ], x);
241
- const zo = Rt("CELL_CONTENT"), Go = Rt("PERMISSION"), qe = {
242
- CELL_CONTENT: zo,
243
- PERMISSION: Go
241
+ const Go = It("CELL_CONTENT"), qo = It("PERMISSION"), qe = {
242
+ CELL_CONTENT: Go,
243
+ PERMISSION: qo
244
244
  };
245
- var qo = Object.defineProperty, Ko = Object.getOwnPropertyDescriptor, Jo = (t, e, o, n) => {
246
- for (var r = n > 1 ? void 0 : n ? Ko(e, o) : e, i = t.length - 1, s; i >= 0; i--)
245
+ var Ko = Object.defineProperty, Jo = Object.getOwnPropertyDescriptor, Xo = (t, e, o, n) => {
246
+ for (var r = n > 1 ? void 0 : n ? Jo(e, o) : e, i = t.length - 1, s; i >= 0; i--)
247
247
  (s = t[i]) && (r = (n ? s(e, o, r) : s(r)) || r);
248
- return n && r && qo(e, o, r), r;
249
- }, Xo = (t, e) => (o, n) => e(o, n, t);
248
+ return n && r && Ko(e, o, r), r;
249
+ }, Yo = (t, e) => (o, n) => e(o, n, t);
250
250
  let $ = class extends ke {
251
251
  constructor(e) {
252
252
  super();
@@ -314,13 +314,13 @@ let $ = class extends ke {
314
314
  }
315
315
  fetchThroughInterceptors(e) {
316
316
  const o = e, n = this._interceptorsByName.get(o);
317
- return fo(n || []);
317
+ return vo(n || []);
318
318
  }
319
319
  _interceptWorkbook(e) {
320
- const o = new Et(), n = e.getUnitId(), r = this, i = (s) => {
320
+ const o = new Nt(), n = e.getUnitId(), r = this, i = (s) => {
321
321
  const a = s.getSheetId();
322
322
  s.__interceptViewModel((c) => {
323
- const d = new Et(), u = c.registerCellContentInterceptor({
323
+ const d = new Nt(), u = c.registerCellContentInterceptor({
324
324
  getCell(l, g) {
325
325
  return r.fetchThroughInterceptors(qe.CELL_CONTENT)(
326
326
  s.getCellRaw(l, g),
@@ -357,9 +357,9 @@ let $ = class extends ke {
357
357
  r && (r.dispose(), this._worksheetDisposables.delete(n));
358
358
  }
359
359
  };
360
- $ = Jo([
360
+ $ = Xo([
361
361
  Oe(_e.Starting, $),
362
- Xo(0, C)
362
+ Yo(0, C)
363
363
  ], $);
364
364
  function an(t, e) {
365
365
  return `${t}|${e.getSheetId()}`;
@@ -371,22 +371,22 @@ const Ae = (t, e) => {
371
371
  const a = s.getSheetBySheetId(n);
372
372
  if (a == null)
373
373
  throw new Error("worksheet is null error!");
374
- const c = a.getCellMatrix(), d = s.getStyles(), u = new ne();
375
- return new ne(r).forValue((g, m, h) => {
376
- const f = b.deepClone(c == null ? void 0 : c.getValue(g, m)) || {}, v = d.getStyleByCell(f), S = Qo(v, h && h.s ? h.s : null);
377
- f.s = S, u.setValue(g, m, Yo(f));
374
+ const c = a.getCellMatrix(), d = s.getStyles(), u = new te();
375
+ return new te(r).forValue((g, m, h) => {
376
+ const f = b.deepClone(c == null ? void 0 : c.getValue(g, m)) || {}, v = d.getStyleByCell(f), S = er(v, h && h.s ? h.s : null);
377
+ f.s = S, u.setValue(g, m, Zo(f));
378
378
  }), {
379
379
  ...e,
380
380
  options: {},
381
381
  cellValue: u.getMatrix()
382
382
  };
383
383
  };
384
- function Yo(t) {
384
+ function Zo(t) {
385
385
  return t == null ? null : (t.f === void 0 && (t.f = null), t.si === void 0 && (t.si = null), t.p === void 0 && (t.p = null), t.v === void 0 && (t.v = null), t.t === void 0 && (t.t = null), t.s === void 0 && (t.s = null), t);
386
386
  }
387
- const ee = {
387
+ const Q = {
388
388
  id: "sheet.mutation.set-range-values",
389
- type: I.MUTATION,
389
+ type: R.MUTATION,
390
390
  handler: (t, e) => {
391
391
  const { cellValue: o, subUnitId: n, unitId: r } = e, s = t.get(C).getUniverSheetInstance(r);
392
392
  if (!s)
@@ -395,37 +395,37 @@ const ee = {
395
395
  if (!a)
396
396
  return !1;
397
397
  const c = a.getCellMatrix(), d = s.getStyles();
398
- return new ne(o).forValue((l, g, m) => {
398
+ return new te(o).forValue((l, g, m) => {
399
399
  if (!m)
400
400
  c == null || c.setValue(l, g, {});
401
401
  else {
402
- const h = c.getValue(l, g) || {}, f = m.t === Me.FORCE_STRING ? m.t : Zo(m.v === void 0 ? h.v : m.v);
402
+ const h = c.getValue(l, g) || {}, f = m.t === Me.FORCE_STRING ? m.t : Qo(m.v === void 0 ? h.v : m.v);
403
403
  if (m.f !== void 0 && (h.f = m.f), m.si !== void 0 && (h.si = m.si), m.p !== void 0 && (h.p = m.p), m.v !== void 0 && (h.v = f === Me.NUMBER ? Number(m.v) : f === Me.BOOLEAN ? m.v.toString().toUpperCase() === "TRUE" ? 1 : 0 : m.v), h.v !== void 0 && (h.t = f), m.s !== void 0) {
404
404
  const v = d.getStyleByCell(h);
405
405
  v == null && delete h.s, typeof m.s == "string" && (m.s = d.get(m.s));
406
406
  const S = ct(v, m.s ? m.s : null);
407
- S && b.removeNull(S), b.isEmptyObject(S) ? delete h.s : h.s = d.setValue(S), !m.p && h.p && nr(h.p, m.s ? m.s : null);
407
+ S && b.removeNull(S), b.isEmptyObject(S) ? delete h.s : h.s = d.setValue(S), !m.p && h.p && or(h.p, m.s ? m.s : null);
408
408
  }
409
409
  c.setValue(l, g, b.removeNull(h));
410
410
  }
411
411
  }), !0;
412
412
  }
413
413
  };
414
- function Zo(t) {
415
- return t === null ? null : typeof t == "string" ? rr(t) ? Me.NUMBER : sr(t) ? Me.BOOLEAN : Me.STRING : typeof t == "number" ? Me.NUMBER : typeof t == "boolean" ? Me.BOOLEAN : Me.FORCE_STRING;
416
- }
417
- function Qo(t, e) {
418
- return er(t, e);
414
+ function Qo(t) {
415
+ return t === null ? null : typeof t == "string" ? sr(t) ? Me.NUMBER : ir(t) ? Me.BOOLEAN : Me.STRING : typeof t == "number" ? Me.NUMBER : typeof t == "boolean" ? Me.BOOLEAN : Me.FORCE_STRING;
419
416
  }
420
417
  function er(t, e) {
418
+ return tr(t, e);
419
+ }
420
+ function tr(t, e) {
421
421
  if (!e || !Object.keys(e).length)
422
422
  return t;
423
423
  const o = t || {};
424
424
  for (const n in e)
425
- n === "bd" ? o[n] = tr(o[n] || {}, e[n]) : n in o || (o[n] = null);
425
+ n === "bd" ? o[n] = nr(o[n] || {}, e[n]) : n in o || (o[n] = null);
426
426
  return o;
427
427
  }
428
- function tr(t, e) {
428
+ function nr(t, e) {
429
429
  if (!e || !Object.keys(e).length)
430
430
  return t;
431
431
  for (const o in e)
@@ -444,10 +444,10 @@ function ct(t, e, o = !1) {
444
444
  return "cl" in n && ("ul" in n && n.ul && (n.ul.cl = n.cl), "ol" in n && n.ol && (n.ol.cl = n.cl), "st" in n && n.st && (n.st.cl = n.cl)), n;
445
445
  }
446
446
  }
447
- function _n(t, e) {
448
- return t.some((o) => o.startIndex === e) ? _n(t, e + 1) : e;
447
+ function yn(t, e) {
448
+ return t.some((o) => o.startIndex === e) ? yn(t, e + 1) : e;
449
449
  }
450
- function nr(t, e) {
450
+ function or(t, e) {
451
451
  var s;
452
452
  if (t.body == null)
453
453
  return;
@@ -464,7 +464,7 @@ function nr(t, e) {
464
464
  m && b.removeNull(m), b.isEmptyObject(m) || (g.ts = m), n.push(g);
465
465
  }
466
466
  const l = ct(u, e, !0);
467
- l && b.removeNull(l), b.isEmptyObject(l) ? delete a.ts : a.ts = l, n.push(a), o = _n(r, d);
467
+ l && b.removeNull(l), b.isEmptyObject(l) ? delete a.ts : a.ts = l, n.push(a), o = yn(r, d);
468
468
  }
469
469
  const i = t.body.dataStream.endsWith(`\r
470
470
  `) ? t.body.dataStream.length - 2 : t.body.dataStream.length;
@@ -477,18 +477,18 @@ function nr(t, e) {
477
477
  }
478
478
  t.body.textRuns = n;
479
479
  }
480
- function or(t) {
481
- return /^-?\d+(\.\d+)?$/.test(t);
482
- }
483
480
  function rr(t) {
484
- return or(t) ? Number(t) <= Number.MAX_SAFE_INTEGER : !1;
481
+ return /^-?\d+(\.\d+)?$/.test(t);
485
482
  }
486
483
  function sr(t) {
484
+ return rr(t) ? Number(t) <= Number.MAX_SAFE_INTEGER : !1;
485
+ }
486
+ function ir(t) {
487
487
  return t.toUpperCase() === "TRUE" || t.toUpperCase() === "FALSE";
488
488
  }
489
489
  const Wt = {
490
490
  id: "sheet.command.clear-selection-all",
491
- type: I.COMMAND,
491
+ type: R.COMMAND,
492
492
  handler: async (t) => {
493
493
  const e = t.get(C), o = t.get(_), n = t.get(x), r = t.get(B), i = t.get($), s = e.getCurrentUniverSheetInstance(), a = s.getUnitId(), d = s.getActiveSheet().getSheetId(), u = n.getSelectionRanges();
494
494
  if (!(u != null && u.length))
@@ -496,16 +496,16 @@ const Wt = {
496
496
  const l = [], g = [], m = {
497
497
  subUnitId: d,
498
498
  unitId: a,
499
- cellValue: ir(u)
499
+ cellValue: ar(u)
500
500
  }, h = Ae(
501
501
  t,
502
502
  m
503
503
  );
504
504
  l.push({
505
- id: ee.id,
505
+ id: Q.id,
506
506
  params: m
507
507
  }), g.push({
508
- id: ee.id,
508
+ id: Q.id,
509
509
  params: h
510
510
  });
511
511
  const f = i.onCommandExecute({ id: Wt.id });
@@ -518,8 +518,8 @@ const Wt = {
518
518
  }), !0) : !1;
519
519
  }
520
520
  };
521
- function ir(t) {
522
- const e = new ne();
521
+ function ar(t) {
522
+ const e = new te();
523
523
  return t.forEach((o) => {
524
524
  const { startRow: n, startColumn: r, endRow: i, endColumn: s } = o;
525
525
  for (let a = n; a <= i; a++)
@@ -527,9 +527,9 @@ function ir(t) {
527
527
  e.setValue(a, c, null);
528
528
  }), e.getData();
529
529
  }
530
- const yn = {
530
+ const bn = {
531
531
  id: "sheet.command.clear-selection-content",
532
- type: I.COMMAND,
532
+ type: R.COMMAND,
533
533
  handler: async (t) => {
534
534
  const e = t.get(C), o = t.get(_), n = t.get(x), r = t.get(B), i = t.get($), s = e.getCurrentUniverSheetInstance(), a = s.getUnitId(), d = s.getActiveSheet().getSheetId(), u = n.getSelectionRanges();
535
535
  if (!(u != null && u.length))
@@ -537,11 +537,11 @@ const yn = {
537
537
  const l = {
538
538
  subUnitId: d,
539
539
  unitId: a,
540
- cellValue: ar(u)
540
+ cellValue: cr(u)
541
541
  }, g = Ae(
542
542
  t,
543
543
  l
544
- ), m = i.onCommandExecute({ id: yn.id }), h = [{ id: ee.id, params: l }, ...m.redos], f = [...m.undos, { id: ee.id, params: g }];
544
+ ), m = i.onCommandExecute({ id: bn.id }), h = [{ id: Q.id, params: l }, ...m.redos], f = [...m.undos, { id: Q.id, params: g }];
545
545
  return K(h, o).result ? (r.pushUndoRedo({
546
546
  // If there are multiple mutations that form an encapsulated project, they must be encapsulated in the same undo redo element.
547
547
  // Hooks can be used to hook the code of external controllers to add new actions.
@@ -551,8 +551,8 @@ const yn = {
551
551
  }), !0) : !1;
552
552
  }
553
553
  };
554
- function ar(t) {
555
- const e = new ne();
554
+ function cr(t) {
555
+ const e = new te();
556
556
  return t.forEach((o) => {
557
557
  const { startRow: n, startColumn: r, endRow: i, endColumn: s } = o;
558
558
  for (let a = n; a <= i; a++)
@@ -567,7 +567,7 @@ function ar(t) {
567
567
  }
568
568
  const jt = {
569
569
  id: "sheet.command.clear-selection-format",
570
- type: I.COMMAND,
570
+ type: R.COMMAND,
571
571
  handler: async (t) => {
572
572
  const e = t.get(C), o = t.get(_), n = t.get(x), r = t.get(B), i = t.get($), s = e.getCurrentUniverSheetInstance(), a = s.getUnitId(), d = s.getActiveSheet().getSheetId(), u = n.getSelectionRanges();
573
573
  if (!(u != null && u.length))
@@ -575,16 +575,16 @@ const jt = {
575
575
  const l = [], g = [], m = {
576
576
  subUnitId: d,
577
577
  unitId: a,
578
- cellValue: cr(u)
578
+ cellValue: ur(u)
579
579
  }, h = Ae(
580
580
  t,
581
581
  m
582
582
  );
583
583
  l.push({
584
- id: ee.id,
584
+ id: Q.id,
585
585
  params: m
586
586
  }), g.push({
587
- id: ee.id,
587
+ id: Q.id,
588
588
  params: h
589
589
  });
590
590
  const f = i.onCommandExecute({ id: jt.id });
@@ -597,8 +597,8 @@ const jt = {
597
597
  }), !0) : !1;
598
598
  }
599
599
  };
600
- function cr(t) {
601
- const e = new ne();
600
+ function ur(t) {
601
+ const e = new te();
602
602
  return t.forEach((o) => {
603
603
  const { startRow: n, startColumn: r, endRow: i, endColumn: s } = o;
604
604
  for (let a = n; a <= i; a++)
@@ -608,18 +608,18 @@ function cr(t) {
608
608
  });
609
609
  }), e.getData();
610
610
  }
611
- const bn = (t, e) => ({
611
+ const Un = (t, e) => ({
612
612
  subUnitId: e.sheet.id,
613
613
  unitId: e.unitId,
614
614
  subUnitName: e.sheet.name
615
615
  }), Le = {
616
616
  id: "sheet.mutation.insert-sheet",
617
- type: I.MUTATION,
617
+ type: R.MUTATION,
618
618
  handler: (t, e) => {
619
619
  const o = t.get(C), { sheet: n, index: r, unitId: i } = e, s = o.getUniverSheetInstance(i);
620
620
  return s ? s.addWorksheet(n.id, r, n) : !1;
621
621
  }
622
- }, ur = (t, e) => {
622
+ }, lr = (t, e) => {
623
623
  const n = t.get(C).getCurrentUniverSheetInstance(), { subUnitId: r, unitId: i } = e, s = n.getSheetBySheetId(r).getConfig();
624
624
  return {
625
625
  index: n.getConfig().sheetOrder.findIndex((d) => d === r),
@@ -628,13 +628,13 @@ const bn = (t, e) => ({
628
628
  };
629
629
  }, wt = {
630
630
  id: "sheet.mutation.remove-sheet",
631
- type: I.MUTATION,
631
+ type: R.MUTATION,
632
632
  handler: (t, e) => {
633
633
  const o = t.get(C), { subUnitId: n, unitId: r } = e, i = o.getUniverSheetInstance(r);
634
634
  return i ? i.removeSheet(n) : !1;
635
635
  }
636
- }, lr = {
637
- type: I.COMMAND,
636
+ }, dr = {
637
+ type: R.COMMAND,
638
638
  id: "sheet.command.copy-sheet",
639
639
  handler: async (t, e) => {
640
640
  var f, v;
@@ -653,7 +653,7 @@ const bn = (t, e) => ({
653
653
  index: c.getSheetIndex(d) + 1,
654
654
  sheet: u,
655
655
  unitId: s
656
- }, m = bn(
656
+ }, m = Un(
657
657
  t,
658
658
  g
659
659
  );
@@ -665,7 +665,7 @@ const bn = (t, e) => ({
665
665
  }
666
666
  }, Ct = {
667
667
  id: "sheet.mutation.move-range",
668
- type: I.MUTATION,
668
+ type: R.MUTATION,
669
669
  handler: (t, e) => {
670
670
  const { from: o, to: n } = e;
671
671
  if (!o || !n)
@@ -677,15 +677,15 @@ const bn = (t, e) => ({
677
677
  if (!s || !a)
678
678
  return !1;
679
679
  const c = s.getCellMatrix(), d = a.getCellMatrix();
680
- return new ne(o.value).forValue((u, l, g) => {
680
+ return new te(o.value).forValue((u, l, g) => {
681
681
  c.setValue(u, l, g);
682
- }), new ne(n.value).forValue((u, l, g) => {
682
+ }), new te(n.value).forValue((u, l, g) => {
683
683
  d.setValue(u, l, g);
684
684
  }), !0;
685
685
  }
686
- }, te = {
686
+ }, ee = {
687
687
  id: "sheet.operation.set-selections",
688
- type: I.OPERATION,
688
+ type: R.OPERATION,
689
689
  handler: (t, e) => {
690
690
  const o = t.get(x);
691
691
  if (!e)
@@ -695,7 +695,7 @@ const bn = (t, e) => ({
695
695
  }
696
696
  };
697
697
  function Mt(t, e, o = !0) {
698
- const n = e.getMatrixWithMergedCells(...vo(t)), r = [];
698
+ const n = e.getMatrixWithMergedCells(...Co(t)), r = [];
699
699
  if (n.forValue((s, a, c) => {
700
700
  if (c.colSpan !== void 0 && c.rowSpan !== void 0) {
701
701
  const d = {
@@ -711,7 +711,7 @@ function Mt(t, e, o = !0) {
711
711
  const i = N.union(t, ...r);
712
712
  return o ? Mt(i, e, o) : i;
713
713
  }
714
- function di(t, e, o) {
714
+ function gi(t, e, o) {
715
715
  let n = null;
716
716
  return o.getMatrixWithMergedCells(t, e, t, e).forValue((i, s, a) => (n = {
717
717
  actualRow: i,
@@ -735,38 +735,42 @@ function di(t, e, o) {
735
735
  rangeType: q.NORMAL
736
736
  };
737
737
  }
738
+ function hi(t, e, o) {
739
+ const { startRow: n, startColumn: r, endRow: i, endColumn: s } = t;
740
+ return Number.isNaN(n) && (t.startRow = 0), Number.isNaN(i) && (t.endRow = e), Number.isNaN(r) && (t.startColumn = 0), Number.isNaN(s) && (t.endColumn = o), t;
741
+ }
738
742
  function he(t, e) {
739
- const o = e.getMergedCell(t.startRow, t.startColumn);
740
- return o ? {
741
- ...o,
742
- actualRow: t.startRow,
743
- actualColumn: t.startColumn,
743
+ const o = Number.isNaN(t.startRow) ? 0 : t.startRow, n = Number.isNaN(t.startColumn) ? 0 : t.startColumn, r = e.getMergedCell(o, n);
744
+ return r ? {
745
+ ...r,
746
+ actualRow: o,
747
+ actualColumn: n,
744
748
  rangeType: q.NORMAL,
745
749
  isMerged: !0,
746
750
  isMergedMainCell: !0
747
751
  } : {
748
- startRow: t.startRow,
749
- startColumn: t.startColumn,
752
+ startRow: o,
753
+ startColumn: n,
750
754
  endRow: t.startRow,
751
755
  endColumn: t.startColumn,
752
- actualRow: t.startRow,
753
- actualColumn: t.startColumn,
756
+ actualRow: o,
757
+ actualColumn: n,
754
758
  rangeType: q.NORMAL,
755
759
  isMerged: !1,
756
760
  isMergedMainCell: !1
757
761
  };
758
762
  }
759
763
  const Pe = (t, e, o) => ({
760
- id: te.id,
764
+ id: ee.id,
761
765
  params: {
762
766
  unitId: e.getUnitId(),
763
767
  subUnitId: o.getSheetId(),
764
768
  pluginName: se,
765
769
  selections: [{ range: t, primary: he(t, o) }]
766
770
  }
767
- }), Un = "sheet.command.move-range", Ft = {
768
- type: I.COMMAND,
769
- id: Un,
771
+ }), Dn = "sheet.command.move-range", Ft = {
772
+ type: R.COMMAND,
773
+ id: Dn,
770
774
  handler: (t, e) => {
771
775
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get(pt), s = r.getCurrentUniverSheetInstance(), a = s.getActiveSheet(), c = s.getUnitId(), d = a.getSheetId(), u = $t(
772
776
  t,
@@ -782,7 +786,7 @@ const Pe = (t, e, o) => ({
782
786
  ...u.redos,
783
787
  ...g.redos,
784
788
  {
785
- id: te.id,
789
+ id: ee.id,
786
790
  params: {
787
791
  unitId: c,
788
792
  subUnitId: d,
@@ -792,7 +796,7 @@ const Pe = (t, e, o) => ({
792
796
  }
793
797
  ], h = [
794
798
  {
795
- id: te.id,
799
+ id: ee.id,
796
800
  params: {
797
801
  unitId: c,
798
802
  subUnitId: d,
@@ -816,46 +820,41 @@ function $t(t, e, o, n = !1) {
816
820
  const S = Mt(d, m, !1);
817
821
  if (!N.equals(d, S) && !n)
818
822
  return null;
819
- const M = new ne(), p = new ne(), w = (O, U) => ({
820
- startRow: O,
821
- endRow: O,
822
- startColumn: U,
823
- endColumn: U
824
- });
825
- ue.foreach(s, (O, U) => {
826
- M.setValue(O, U, v.getValue(O, U)), p.setValue(O, U, null);
823
+ const M = new te(), p = new te();
824
+ ue.foreach(s, (U, k) => {
825
+ M.setValue(U, k, v.getValue(U, k)), p.setValue(U, k, null);
827
826
  });
828
- const y = new ne();
829
- ue.foreach(d, (O, U) => {
830
- y.setValue(O, U, f.getValue(O, U));
827
+ const w = new te();
828
+ ue.foreach(d, (U, k) => {
829
+ w.setValue(U, k, f.getValue(U, k));
831
830
  });
832
- const A = new ne();
833
- ue.foreach(s, (O, U) => {
834
- const j = w(O, U), R = N.getRelativeRange(j, s), Q = N.getPositionRange(R, d);
835
- A.setValue(Q.startRow, Q.startColumn, v.getValue(O, U));
831
+ const y = new te();
832
+ ue.foreach(s, (U, k) => {
833
+ const E = Cn(U, k), j = N.getRelativeRange(E, s), I = N.getPositionRange(j, d);
834
+ y.setValue(I.startRow, I.startColumn, v.getValue(U, k));
836
835
  });
837
- const D = {
836
+ const P = {
838
837
  from: {
839
838
  value: p.getMatrix(),
840
839
  subUnitId: a
841
840
  },
842
841
  to: {
843
- value: A.getMatrix(),
842
+ value: y.getMatrix(),
844
843
  subUnitId: u
845
844
  },
846
845
  unitId: c
847
- }, E = {
846
+ }, D = {
848
847
  from: {
849
848
  value: M.getMatrix(),
850
849
  subUnitId: a
851
850
  },
852
851
  to: {
853
- value: y.getMatrix(),
852
+ value: w.getMatrix(),
854
853
  subUnitId: u
855
854
  },
856
855
  unitId: c
857
856
  };
858
- r.push({ id: Ct.id, params: D }), i.push({ id: Ct.id, params: E });
857
+ r.push({ id: Ct.id, params: P }), i.push({ id: Ct.id, params: D });
859
858
  }
860
859
  return {
861
860
  redos: r,
@@ -864,7 +863,7 @@ function $t(t, e, o, n = !1) {
864
863
  }
865
864
  const Ve = {
866
865
  id: "sheet.command.set-range-values",
867
- type: I.COMMAND,
866
+ type: R.COMMAND,
868
867
  handler: (t, e) => {
869
868
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get(x), s = t.get($), {
870
869
  value: a,
@@ -874,21 +873,21 @@ const Ve = {
874
873
  } = e, l = c ? [c] : i.getSelectionRanges();
875
874
  if (!l || !l.length)
876
875
  return !1;
877
- const g = new ne();
876
+ const g = new te();
878
877
  let m;
879
878
  if (b.isArray(a))
880
879
  for (let w = 0; w < l.length; w++) {
881
- const { startRow: y, startColumn: A, endRow: D, endColumn: E } = l[w];
882
- for (let O = 0; O <= D - y; O++)
883
- for (let U = 0; U <= E - A; U++)
884
- g.setValue(O + y, U + A, a[O][U]);
880
+ const { startRow: y, startColumn: P, endRow: D, endColumn: U } = l[w];
881
+ for (let k = 0; k <= D - y; k++)
882
+ for (let E = 0; E <= U - P; E++)
883
+ g.setValue(k + y, E + P, a[k][E]);
885
884
  }
886
- else if (Co(a))
885
+ else if (So(a))
887
886
  for (let w = 0; w < l.length; w++) {
888
- const { startRow: y, startColumn: A, endRow: D, endColumn: E } = l[w];
889
- for (let O = y; O <= D; O++)
890
- for (let U = A; U <= E; U++)
891
- g.setValue(O, U, a);
887
+ const { startRow: y, startColumn: P, endRow: D, endColumn: U } = l[w];
888
+ for (let k = y; k <= D; k++)
889
+ for (let E = P; E <= U; E++)
890
+ g.setValue(k, E, a);
892
891
  }
893
892
  else
894
893
  m = a;
@@ -903,7 +902,7 @@ const Ve = {
903
902
  }))
904
903
  return !1;
905
904
  const v = o.syncExecuteCommand(
906
- ee.id,
905
+ Q.id,
907
906
  h
908
907
  ), { undos: S, redos: M } = s.onCommandExecute({
909
908
  id: Ve.id,
@@ -911,51 +910,51 @@ const Ve = {
911
910
  }), p = K([...M], o);
912
911
  return v && p.result ? (n.pushUndoRedo({
913
912
  unitID: d,
914
- undoMutations: [{ id: ee.id, params: f }, ...S],
915
- redoMutations: [{ id: ee.id, params: h }, ...M]
913
+ undoMutations: [{ id: Q.id, params: f }, ...S],
914
+ redoMutations: [{ id: Q.id, params: h }, ...M]
916
915
  }), !0) : !1;
917
916
  }
918
917
  };
919
- function Dn(t, e) {
918
+ function On(t, e) {
920
919
  const o = [], n = [], { unitId: r, subUnitId: i, range: s, shiftDimension: a, cellValue: c = {} } = e, d = t.get(C), u = t.get($), l = d.getUniverSheetInstance(r), g = l == null ? void 0 : l.getSheetBySheetId(i);
921
920
  if (g) {
922
921
  const m = g.getCellMatrix(), h = m.getDataRange();
923
922
  if (s.startColumn <= h.endColumn || s.startRow <= h.endRow) {
924
923
  let p, w;
925
924
  if (a === ae.COLUMNS) {
926
- const A = Math.min(s.endRow, h.endRow);
925
+ const P = Math.min(s.endRow, h.endRow);
927
926
  let D = 0;
928
- for (let O = s.startRow; O <= A; O++) {
929
- const U = m.getRow(O), j = U ? Cn(U) - 1 : 0;
927
+ for (let k = s.startRow; k <= P; k++) {
928
+ const E = m.getRow(k), j = E ? Sn(E) - 1 : 0;
930
929
  D = Math.max(D, j);
931
930
  }
932
931
  p = {
933
932
  startRow: s.startRow,
934
933
  startColumn: s.startColumn,
935
- endRow: A,
934
+ endRow: P,
936
935
  endColumn: D
937
936
  };
938
- const E = s.endColumn - s.startColumn + 1;
937
+ const U = s.endColumn - s.startColumn + 1;
939
938
  w = {
940
939
  startRow: s.startRow,
941
- startColumn: p.startColumn + E,
942
- endRow: A,
943
- endColumn: p.endColumn + E
940
+ startColumn: p.startColumn + U,
941
+ endRow: P,
942
+ endColumn: p.endColumn + U
944
943
  };
945
944
  } else {
946
- const A = Math.min(s.endColumn, h.endColumn), D = h.endRow;
945
+ const P = Math.min(s.endColumn, h.endColumn), D = h.endRow;
947
946
  p = {
948
947
  startRow: s.startRow,
949
948
  startColumn: s.startColumn,
950
949
  endRow: D,
951
- endColumn: A
950
+ endColumn: P
952
951
  };
953
- const E = s.endRow - s.startRow + 1;
952
+ const U = s.endRow - s.startRow + 1;
954
953
  w = {
955
- startRow: p.startRow + E,
954
+ startRow: p.startRow + U,
956
955
  startColumn: s.startColumn,
957
- endRow: p.endRow + E,
958
- endColumn: A
956
+ endRow: p.endRow + U,
957
+ endColumn: P
959
958
  };
960
959
  }
961
960
  const y = $t(
@@ -983,20 +982,20 @@ function Dn(t, e) {
983
982
  id: Ve.id,
984
983
  params: { ...f, range: s }
985
984
  });
986
- o.push({ id: ee.id, params: f }, ...M), n.push({ id: ee.id, params: v }, ...S);
985
+ o.push({ id: Q.id, params: f }, ...M), n.push({ id: Q.id, params: v }, ...S);
987
986
  }
988
987
  return {
989
988
  redo: o,
990
989
  undo: n
991
990
  };
992
991
  }
993
- function On(t, e) {
992
+ function kn(t, e) {
994
993
  const o = [], n = [], { unitId: r, subUnitId: i, range: s, shiftDimension: a } = e, c = t.get(C), d = t.get($), u = c.getUniverSheetInstance(r), l = u == null ? void 0 : u.getSheetBySheetId(i);
995
994
  if (l) {
996
995
  const g = l.getCellMatrix(), m = g.getDataRange(), h = {
997
996
  subUnitId: i,
998
997
  unitId: r,
999
- cellValue: dr([s])
998
+ cellValue: gr([s])
1000
999
  }, f = Ae(
1001
1000
  t,
1002
1001
  h
@@ -1004,17 +1003,17 @@ function On(t, e) {
1004
1003
  id: Ve.id,
1005
1004
  params: h
1006
1005
  });
1007
- if (o.push({ id: ee.id, params: h }, ...v.redos), n.push(...v.undos, {
1008
- id: ee.id,
1006
+ if (o.push({ id: Q.id, params: h }, ...v.redos), n.push(...v.undos, {
1007
+ id: Q.id,
1009
1008
  params: f
1010
1009
  }), s.startColumn <= m.endColumn || s.startRow <= m.endRow) {
1011
1010
  let S = null, M = null;
1012
1011
  if (a === ae.COLUMNS && s.endColumn < m.endColumn) {
1013
1012
  const p = Math.min(s.endRow, m.endRow);
1014
1013
  let w = 0;
1015
- for (let A = s.startRow; A <= p; A++) {
1016
- const D = g.getRow(A), E = D ? Cn(D) - 1 : 0;
1017
- w = Math.max(w, E);
1014
+ for (let P = s.startRow; P <= p; P++) {
1015
+ const D = g.getRow(P), U = D ? Sn(D) - 1 : 0;
1016
+ w = Math.max(w, U);
1018
1017
  }
1019
1018
  S = {
1020
1019
  startRow: s.startRow,
@@ -1062,7 +1061,7 @@ function On(t, e) {
1062
1061
  undo: n
1063
1062
  };
1064
1063
  }
1065
- function gi(t, e, o, n, r, i) {
1064
+ function mi(t, e, o, n, r, i) {
1066
1065
  const { startRow: s, endRow: a, startColumn: c, endColumn: d } = e;
1067
1066
  if (r === ae.ROWS) {
1068
1067
  const u = a - s + 1;
@@ -1086,7 +1085,7 @@ function gi(t, e, o, n, r, i) {
1086
1085
  i && i[l] && i[l][g] ? t.setValue(l, g, i[l][g]) : t.realDeleteValue(l, g);
1087
1086
  }
1088
1087
  }
1089
- function hi(t, e, o, n, r) {
1088
+ function fi(t, e, o, n, r) {
1090
1089
  const { startRow: i, endRow: s, startColumn: a, endColumn: c } = e, d = s - i + 1, u = c - a + 1;
1091
1090
  if (r === ae.ROWS)
1092
1091
  for (let l = i; l <= o; l++)
@@ -1101,8 +1100,8 @@ function hi(t, e, o, n, r) {
1101
1100
  m == null ? t.realDeleteValue(l, g) : t.setValue(l, g, m);
1102
1101
  }
1103
1102
  }
1104
- function dr(t) {
1105
- const e = new ne();
1103
+ function gr(t) {
1104
+ const e = new te();
1106
1105
  return t.forEach((o) => {
1107
1106
  const { startRow: n, startColumn: r, endRow: i, endColumn: s } = o;
1108
1107
  for (let a = n; a <= i; a++)
@@ -1110,9 +1109,9 @@ function dr(t) {
1110
1109
  e.setValue(a, c, null);
1111
1110
  }), e.getData();
1112
1111
  }
1113
- const kn = "sheet.command.delete-range-move-left", Ht = {
1114
- type: I.COMMAND,
1115
- id: kn,
1112
+ const An = "sheet.command.delete-range-move-left", Ht = {
1113
+ type: R.COMMAND,
1114
+ id: An,
1116
1115
  handler: async (t, e) => {
1117
1116
  var p;
1118
1117
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get(x), s = t.get($), a = r.getCurrentUniverSheetInstance().getUnitId(), c = r.getCurrentUniverSheetInstance().getActiveSheet().getSheetId();
@@ -1133,7 +1132,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1133
1132
  }, m = s.onCommandExecute({
1134
1133
  id: Ht.id,
1135
1134
  params: { range: d }
1136
- }), { redo: h, undo: f } = On(
1135
+ }), { redo: h, undo: f } = kn(
1137
1136
  t,
1138
1137
  g
1139
1138
  ), v = [...h], S = [...f];
@@ -1145,9 +1144,9 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1145
1144
  }
1146
1145
  // all subsequent mutations should succeed inorder to make the whole process succeed
1147
1146
  // Promise.all([]).then(() => true),
1148
- }, An = "sheet.command.delete-range-move-up", zt = {
1149
- type: I.COMMAND,
1150
- id: An,
1147
+ }, Pn = "sheet.command.delete-range-move-up", zt = {
1148
+ type: R.COMMAND,
1149
+ id: Pn,
1151
1150
  handler: async (t, e) => {
1152
1151
  var p;
1153
1152
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get(x), s = t.get($), a = r.getCurrentUniverSheetInstance().getUnitId(), c = r.getCurrentUniverSheetInstance().getActiveSheet().getSheetId();
@@ -1168,7 +1167,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1168
1167
  }, m = s.onCommandExecute({
1169
1168
  id: zt.id,
1170
1169
  params: { range: d }
1171
- }), { redo: h, undo: f } = On(
1170
+ }), { redo: h, undo: f } = kn(
1172
1171
  t,
1173
1172
  g
1174
1173
  ), v = [...h], S = [...f];
@@ -1180,7 +1179,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1180
1179
  }
1181
1180
  // all subsequent mutations should succeed inorder to make the whole process succeed
1182
1181
  // Promise.all([]).then(() => true),
1183
- }, Pn = (t, e) => {
1182
+ }, Nn = (t, e) => {
1184
1183
  if (t.get(C).getUniverSheetInstance(e.unitId) == null)
1185
1184
  throw new Error("universheet is null error!");
1186
1185
  return {
@@ -1190,7 +1189,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1190
1189
  };
1191
1190
  }, Be = {
1192
1191
  id: "sheet.mutation.insert-row",
1193
- type: I.MUTATION,
1192
+ type: R.MUTATION,
1194
1193
  handler: (t, e) => {
1195
1194
  var h;
1196
1195
  const { unitId: o, subUnitId: n, range: r, rowInfo: i } = e, a = t.get(C).getUniverSheetInstance(o);
@@ -1217,7 +1216,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1217
1216
  };
1218
1217
  }, We = {
1219
1218
  id: "sheet.mutation.insert-col",
1220
- type: I.MUTATION,
1219
+ type: R.MUTATION,
1221
1220
  handler: (t, e) => {
1222
1221
  var h;
1223
1222
  const n = t.get(C).getUniverSheetInstance(e.unitId);
@@ -1236,8 +1235,8 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1236
1235
  }
1237
1236
  return r.setColumnCount(r.getColumnCount() + s.endColumn - s.startColumn + 1), r.getCellMatrix().insertColumns(s.startColumn, l), !0;
1238
1237
  }
1239
- }, gr = (t, e) => {
1240
- const r = e.getRowManager().getRowData(), i = {}, s = t.range, a = In(s.startRow, s.endRow, r), c = Rn(i, a);
1238
+ }, hr = (t, e) => {
1239
+ const r = e.getRowManager().getRowData(), i = {}, s = t.range, a = In(s.startRow, s.endRow, r), c = pn(i, a);
1241
1240
  return {
1242
1241
  unitId: t.unitId,
1243
1242
  subUnitId: t.subUnitId,
@@ -1246,7 +1245,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1246
1245
  };
1247
1246
  }, je = {
1248
1247
  id: "sheet.mutation.remove-rows",
1249
- type: I.MUTATION,
1248
+ type: R.MUTATION,
1250
1249
  handler: (t, e) => {
1251
1250
  const n = t.get(C).getUniverSheetInstance(e.unitId);
1252
1251
  if (n == null)
@@ -1255,16 +1254,16 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1255
1254
  if (!r)
1256
1255
  return !1;
1257
1256
  const i = e.range, a = r.getRowManager().getRowData(), c = i.endRow - i.startRow + 1;
1258
- return Sn(i.startRow, c, a), r.getCellMatrix().removeRows(i.startRow, c), r.setRowCount(r.getRowCount() - c), !0;
1257
+ return Rn(i.startRow, c, a), r.getCellMatrix().removeRows(i.startRow, c), r.setRowCount(r.getRowCount() - c), !0;
1259
1258
  }
1260
- }, hr = (t, e) => {
1259
+ }, mr = (t, e) => {
1261
1260
  const n = t.get(C).getUniverSheetInstance(e.unitId);
1262
1261
  if (n == null)
1263
1262
  throw new Error("universheet is null error!");
1264
1263
  const r = n.getSheetBySheetId(e.subUnitId);
1265
1264
  if (r == null)
1266
1265
  throw new Error("worksheet is null error!");
1267
- const a = r.getColumnManager().getColumnData(), c = {}, d = e.range, u = In(d.startColumn, d.endColumn, a), l = Rn(c, u);
1266
+ const a = r.getColumnManager().getColumnData(), c = {}, d = e.range, u = In(d.startColumn, d.endColumn, a), l = pn(c, u);
1268
1267
  return {
1269
1268
  unitId: e.unitId,
1270
1269
  subUnitId: e.subUnitId,
@@ -1273,7 +1272,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1273
1272
  };
1274
1273
  }, Fe = {
1275
1274
  id: "sheet.mutation.remove-col",
1276
- type: I.MUTATION,
1275
+ type: R.MUTATION,
1277
1276
  handler: (t, e) => {
1278
1277
  const n = t.get(C).getUniverSheetInstance(e.unitId);
1279
1278
  if (n == null)
@@ -1282,19 +1281,19 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1282
1281
  if (!r)
1283
1282
  return !1;
1284
1283
  const i = e.range, a = r.getColumnManager().getColumnData(), c = i.endColumn - i.startColumn + 1;
1285
- return Sn(i.startColumn, c, a), r.setColumnCount(r.getColumnCount() - c), r.getCellMatrix().removeColumns(i.startColumn, c), !0;
1284
+ return Rn(i.startColumn, c, a), r.setColumnCount(r.getColumnCount() - c), r.getCellMatrix().removeColumns(i.startColumn, c), !0;
1286
1285
  }
1287
- }, mr = "sheet.command.insert-range-move-down", Gt = {
1288
- type: I.COMMAND,
1286
+ }, fr = "sheet.command.insert-range-move-down", Gt = {
1287
+ type: R.COMMAND,
1289
1288
  id: "sheet.command.insert-range-move-down",
1290
1289
  handler: async (t, e) => {
1291
- var U;
1290
+ var E;
1292
1291
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get(Bt), s = t.get(x), a = t.get($);
1293
1292
  if (s.isOverlapping())
1294
1293
  return i.error("Cannot use that command on overlapping selections."), !1;
1295
1294
  const c = r.getCurrentUniverSheetInstance().getUnitId(), d = r.getCurrentUniverSheetInstance().getActiveSheet().getSheetId();
1296
1295
  let u = e == null ? void 0 : e.range;
1297
- if (u || (u = (U = s.getLast()) == null ? void 0 : U.range), !u)
1296
+ if (u || (u = (E = s.getLast()) == null ? void 0 : E.range), !u)
1298
1297
  return !1;
1299
1298
  const l = r.getUniverSheetInstance(c);
1300
1299
  if (!l)
@@ -1304,7 +1303,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1304
1303
  return !1;
1305
1304
  const m = [], h = [], f = g.getCellMatrix(), v = f.getDataRange(), M = f.getSlice(v.startRow, v.endRow, u.startColumn, u.endColumn).getDataRange().endRow, p = Math.max(M + (u.endRow - u.startRow + 1) - v.endRow, 0);
1306
1305
  if (p > 0) {
1307
- const j = u.startRow - 1, R = g.getRowHeight(j), Q = {
1306
+ const j = u.startRow - 1, I = g.getRowHeight(j), oe = {
1308
1307
  unitId: c,
1309
1308
  subUnitId: d,
1310
1309
  range: {
@@ -1314,24 +1313,24 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1314
1313
  endColumn: v.endColumn
1315
1314
  },
1316
1315
  rowInfo: new Array(p).fill(void 0).map(() => ({
1317
- h: R,
1316
+ h: I,
1318
1317
  hd: Y.FALSE
1319
1318
  }))
1320
1319
  };
1321
1320
  m.push({
1322
1321
  id: Be.id,
1323
- params: Q
1322
+ params: oe
1324
1323
  });
1325
- const ye = Pn(
1324
+ const ye = Nn(
1326
1325
  t,
1327
- Q
1326
+ oe
1328
1327
  );
1329
1328
  h.push({ id: je.id, params: ye });
1330
1329
  }
1331
1330
  const w = {};
1332
- ue.foreach(u, (j, R) => {
1333
- const Q = g.getCell(j, R);
1334
- Q && (w[j] || (w[j] = {}), w[j][R] = { s: Q.s });
1331
+ ue.foreach(u, (j, I) => {
1332
+ const oe = g.getCell(j, I);
1333
+ oe && (w[j] || (w[j] = {}), w[j][I] = { s: oe.s });
1335
1334
  });
1336
1335
  const y = {
1337
1336
  range: u,
@@ -1339,16 +1338,16 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1339
1338
  unitId: c,
1340
1339
  shiftDimension: ae.ROWS,
1341
1340
  cellValue: w
1342
- }, { redo: A, undo: D } = Dn(
1341
+ }, { redo: P, undo: D } = On(
1343
1342
  t,
1344
1343
  y
1345
1344
  );
1346
- m.push(...A), h.push(...D);
1347
- const E = a.onCommandExecute({
1345
+ m.push(...P), h.push(...D);
1346
+ const U = a.onCommandExecute({
1348
1347
  id: Gt.id,
1349
1348
  params: { range: u }
1350
1349
  });
1351
- return m.push(...E.redos), m.push(Pe(u, l, g)), h.push(...E.undos), K(m, o) ? (n.pushUndoRedo({
1350
+ return m.push(...U.redos), m.push(Pe(u, l, g)), h.push(...U.undos), K(m, o) ? (n.pushUndoRedo({
1352
1351
  unitID: c,
1353
1352
  undoMutations: h.reverse(),
1354
1353
  redoMutations: m
@@ -1356,17 +1355,17 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1356
1355
  }
1357
1356
  // all subsequent mutations should succeed inorder to make the whole process succeed
1358
1357
  // Promise.all([]).then(() => true),
1359
- }, Nn = "sheet.command.insert-range-move-right", qt = {
1360
- type: I.COMMAND,
1361
- id: Nn,
1358
+ }, xn = "sheet.command.insert-range-move-right", qt = {
1359
+ type: R.COMMAND,
1360
+ id: xn,
1362
1361
  handler: async (t, e) => {
1363
- var U;
1362
+ var E;
1364
1363
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get(Bt), s = t.get(x), a = t.get($);
1365
1364
  if (s.isOverlapping())
1366
1365
  return i.error("Cannot use that command on overlapping selections."), !1;
1367
1366
  const c = r.getCurrentUniverSheetInstance().getUnitId(), d = r.getCurrentUniverSheetInstance().getActiveSheet().getSheetId();
1368
1367
  let u = e == null ? void 0 : e.range;
1369
- if (u || (u = (U = s.getLast()) == null ? void 0 : U.range), !u)
1368
+ if (u || (u = (E = s.getLast()) == null ? void 0 : E.range), !u)
1370
1369
  return !1;
1371
1370
  const l = r.getUniverSheetInstance(c);
1372
1371
  if (!l)
@@ -1379,7 +1378,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1379
1378
  0
1380
1379
  );
1381
1380
  if (p > 0) {
1382
- const j = u.startColumn - 1, R = g.getColumnWidth(j), Q = {
1381
+ const j = u.startColumn - 1, I = g.getColumnWidth(j), oe = {
1383
1382
  unitId: c,
1384
1383
  subUnitId: d,
1385
1384
  range: {
@@ -1389,24 +1388,24 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1389
1388
  endColumn: v.endColumn + p
1390
1389
  },
1391
1390
  colInfo: new Array(p).fill(void 0).map(() => ({
1392
- w: R,
1391
+ w: I,
1393
1392
  hd: Y.FALSE
1394
1393
  }))
1395
1394
  };
1396
1395
  m.push({
1397
1396
  id: We.id,
1398
- params: Q
1397
+ params: oe
1399
1398
  });
1400
1399
  const ye = En(
1401
1400
  t,
1402
- Q
1401
+ oe
1403
1402
  );
1404
1403
  h.push({ id: Fe.id, params: ye });
1405
1404
  }
1406
1405
  const w = {};
1407
- ue.foreach(u, (j, R) => {
1408
- const Q = g.getCell(j, R);
1409
- !Q || !Q.s || (w[j] || (w[j] = {}), w[j][R] = { s: Q.s });
1406
+ ue.foreach(u, (j, I) => {
1407
+ const oe = g.getCell(j, I);
1408
+ !oe || !oe.s || (w[j] || (w[j] = {}), w[j][I] = { s: oe.s });
1410
1409
  });
1411
1410
  const y = {
1412
1411
  range: u,
@@ -1414,16 +1413,16 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1414
1413
  unitId: c,
1415
1414
  shiftDimension: ae.COLUMNS,
1416
1415
  cellValue: w
1417
- }, { redo: A, undo: D } = Dn(
1416
+ }, { redo: P, undo: D } = On(
1418
1417
  t,
1419
1418
  y
1420
1419
  );
1421
- m.push(...A), h.push(...D);
1422
- const E = a.onCommandExecute({
1420
+ m.push(...P), h.push(...D);
1421
+ const U = a.onCommandExecute({
1423
1422
  id: qt.id,
1424
1423
  params: { range: u }
1425
1424
  });
1426
- return m.push(...E.redos), m.push(Pe(u, l, g)), h.push(...E.undos), K(m, o).result ? (n.pushUndoRedo({
1425
+ return m.push(...U.redos), m.push(Pe(u, l, g)), h.push(...U.undos), K(m, o).result ? (n.pushUndoRedo({
1427
1426
  unitID: c,
1428
1427
  undoMutations: h.reverse(),
1429
1428
  redoMutations: m
@@ -1431,9 +1430,9 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1431
1430
  }
1432
1431
  // all subsequent mutations should succeed inorder to make the whole process succeed
1433
1432
  // Promise.all([]).then(() => true),
1434
- }, xn = "sheet.command.insert-row", et = {
1435
- type: I.COMMAND,
1436
- id: xn,
1433
+ }, Tn = "sheet.command.insert-row", et = {
1434
+ type: R.COMMAND,
1435
+ id: Tn,
1437
1436
  handler: async (t, e) => {
1438
1437
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get($), s = r.getUniverSheetInstance(e.unitId), a = s.getSheetBySheetId(e.subUnitId), { range: c, direction: d, unitId: u, subUnitId: l } = e, { startRow: g, endRow: m } = c, h = d === $e.UP ? g : g - 1, f = a.getRowHeight(h), v = {
1439
1438
  unitId: u,
@@ -1444,7 +1443,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1444
1443
  hd: Y.FALSE
1445
1444
  }))
1446
1445
  // row height should inherit from the anchor row
1447
- }, S = Pn(
1446
+ }, S = Nn(
1448
1447
  t,
1449
1448
  v
1450
1449
  ), M = i.onCommandExecute({
@@ -1464,8 +1463,8 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1464
1463
  redoMutations: [{ id: Be.id, params: v }, ...M.redos]
1465
1464
  }), !0) : !1;
1466
1465
  }
1467
- }, fr = {
1468
- type: I.COMMAND,
1466
+ }, vr = {
1467
+ type: R.COMMAND,
1469
1468
  id: "sheet.command.insert-row-before",
1470
1469
  handler: async (t) => {
1471
1470
  var g;
@@ -1500,8 +1499,8 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1500
1499
  };
1501
1500
  return t.get(_).executeCommand(et.id, l);
1502
1501
  }
1503
- }, vr = {
1504
- type: I.COMMAND,
1502
+ }, Cr = {
1503
+ type: R.COMMAND,
1505
1504
  id: "sheet.command.insert-row-after",
1506
1505
  handler: async (t) => {
1507
1506
  var l;
@@ -1530,9 +1529,9 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1530
1529
  };
1531
1530
  return t.get(_).executeCommand(et.id, u);
1532
1531
  }
1533
- }, Tn = "sheet.command.insert-col", tt = {
1534
- type: I.COMMAND,
1535
- id: Tn,
1532
+ }, Ln = "sheet.command.insert-col", tt = {
1533
+ type: R.COMMAND,
1534
+ id: Ln,
1536
1535
  handler: async (t, e) => {
1537
1536
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get($), { range: s, direction: a, subUnitId: c, unitId: d, cellValue: u } = e, { startColumn: l, endColumn: g } = e.range, m = r.getUniverSheetInstance(e.unitId), h = m.getSheetBySheetId(e.subUnitId), f = a === $e.LEFT ? l : l - 1, v = h.getColumnWidth(f), S = {
1538
1537
  unitId: d,
@@ -1570,8 +1569,8 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1570
1569
  redoMutations: [{ id: We.id, params: S }, ...p.redos]
1571
1570
  }), !0) : !1;
1572
1571
  }
1573
- }, Cr = {
1574
- type: I.COMMAND,
1572
+ }, Sr = {
1573
+ type: R.COMMAND,
1575
1574
  id: "sheet.command.insert-col-before",
1576
1575
  handler: async (t) => {
1577
1576
  const o = t.get(x).getSelections();
@@ -1605,8 +1604,8 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1605
1604
  };
1606
1605
  return t.get(_).executeCommand(tt.id, l);
1607
1606
  }
1608
- }, Sr = {
1609
- type: I.COMMAND,
1607
+ }, Rr = {
1608
+ type: R.COMMAND,
1610
1609
  id: "sheet.command.insert-col-after",
1611
1610
  handler: async (t) => {
1612
1611
  const o = t.get(x).getSelections();
@@ -1636,19 +1635,19 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1636
1635
  }
1637
1636
  }, Ir = {
1638
1637
  id: "sheet.command.insert-sheet",
1639
- type: I.COMMAND,
1638
+ type: R.COMMAND,
1640
1639
  handler: (t, e) => {
1641
1640
  var m, h;
1642
1641
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get(Vt), s = (m = e == null ? void 0 : e.unitId) != null ? m : r.getCurrentUniverSheetInstance().getUnitId(), a = r.getUniverSheetInstance(s);
1643
1642
  if (!a)
1644
1643
  return !1;
1645
- let c = a.getSheets().length, d = So({});
1644
+ let c = a.getSheets().length, d = Ro({});
1646
1645
  e ? (c = (h = e.index) != null ? h : c, e.sheet ? d = e.sheet : (d.id = b.generateRandomId(), d.name = a.generateNewSheetName(`${i.t("sheets.sheet")}`))) : (d.id = b.generateRandomId(), d.name = a.generateNewSheetName(`${i.t("sheets.sheet")}`));
1647
1646
  const u = {
1648
1647
  index: c,
1649
1648
  sheet: d,
1650
1649
  unitId: s
1651
- }, l = bn(
1650
+ }, l = Un(
1652
1651
  t,
1653
1652
  u
1654
1653
  );
@@ -1659,7 +1658,7 @@ const kn = "sheet.command.delete-range-move-left", Ht = {
1659
1658
  }), !0) : !1;
1660
1659
  }
1661
1660
  };
1662
- function Rr(t, e) {
1661
+ function pr(t, e) {
1663
1662
  const { unitId: o, subUnitId: n, sourceRange: r, targetRange: i } = e, s = r.startRow > i.startRow, a = r.endRow - r.startRow + 1;
1664
1663
  return s ? {
1665
1664
  unitId: o,
@@ -1683,7 +1682,7 @@ function Rr(t, e) {
1683
1682
  }
1684
1683
  const St = {
1685
1684
  id: "sheet.mutation.move-rows",
1686
- type: I.MUTATION,
1685
+ type: R.MUTATION,
1687
1686
  handler: (t, e) => {
1688
1687
  const { unitId: o, subUnitId: n, sourceRange: r, targetRange: i } = e, a = t.get(C).getUniverSheetInstance(o);
1689
1688
  if (!a)
@@ -1692,10 +1691,10 @@ const St = {
1692
1691
  if (!c)
1693
1692
  throw new Error("[MoveRowMutation] worksheet is null!");
1694
1693
  const d = r.startRow, u = r.endRow - r.startRow + 1, l = i.startRow, g = c.getRowManager().getRowData();
1695
- return pn(d, u, l, g), c.getCellMatrix().moveRows(d, u, l), !0;
1694
+ return wn(d, u, l, g), c.getCellMatrix().moveRows(d, u, l), !0;
1696
1695
  }
1697
1696
  };
1698
- function pr(t, e) {
1697
+ function wr(t, e) {
1699
1698
  const { unitId: o, subUnitId: n, sourceRange: r, targetRange: i } = e, s = r.startColumn > i.startColumn, a = r.endColumn - r.startColumn + 1;
1700
1699
  return s ? {
1701
1700
  unitId: o,
@@ -1717,9 +1716,9 @@ function pr(t, e) {
1717
1716
  }
1718
1717
  };
1719
1718
  }
1720
- const It = {
1719
+ const Rt = {
1721
1720
  id: "sheet.mutation.move-columns",
1722
- type: I.MUTATION,
1721
+ type: R.MUTATION,
1723
1722
  handler: (t, e) => {
1724
1723
  const { unitId: o, subUnitId: n, sourceRange: r, targetRange: i } = e, a = t.get(C).getUniverSheetInstance(o);
1725
1724
  if (!a)
@@ -1728,18 +1727,18 @@ const It = {
1728
1727
  if (!c)
1729
1728
  throw new Error("[MoveColumnMutation] worksheet is null!");
1730
1729
  const d = r.startColumn, u = r.endColumn - r.startColumn + 1, l = i.startColumn, g = c.getColumnManager().getColumnData();
1731
- return pn(d, u, l, g), c.getCellMatrix().moveColumns(d, u, l), !0;
1730
+ return wn(d, u, l, g), c.getCellMatrix().moveColumns(d, u, l), !0;
1732
1731
  }
1733
1732
  };
1734
- function wr(t, e) {
1733
+ function Mr(t, e) {
1735
1734
  return e.getMergeData().some((o) => o.startRow < t && t <= o.endRow);
1736
1735
  }
1737
- function Mr(t, e) {
1736
+ function _r(t, e) {
1738
1737
  return e.getMergeData().some((o) => o.startColumn < t && t <= o.endColumn);
1739
1738
  }
1740
- const Ln = "sheet.command.move-rows", Vn = {
1741
- id: Ln,
1742
- type: I.COMMAND,
1739
+ const Vn = "sheet.command.move-rows", Bn = {
1740
+ id: Vn,
1741
+ type: R.COMMAND,
1743
1742
  handler: async (t, e) => {
1744
1743
  const n = t.get(x).getSelections(), {
1745
1744
  fromRange: { startRow: r },
@@ -1758,7 +1757,7 @@ const Ln = "sheet.command.move-rows", Vn = {
1758
1757
  const l = d.getUnitId(), g = u.getSheetId(), m = t.get(pt), h = s[0].range, f = s[0].primary, v = Mt(h, u, !1);
1759
1758
  if (!N.equals(h, v))
1760
1759
  return m.emit("Only part of a merged cell is selected."), !1;
1761
- if (wr(i, u))
1760
+ if (Mr(i, u))
1762
1761
  return m.emit("Across a merged cell."), !1;
1763
1762
  const S = {
1764
1763
  ...h,
@@ -1769,38 +1768,38 @@ const Ln = "sheet.command.move-rows", Vn = {
1769
1768
  subUnitId: g,
1770
1769
  sourceRange: h,
1771
1770
  targetRange: S
1772
- }, p = Rr(t, M), y = i - r < 0, A = h.endRow - h.startRow + 1, D = y ? S : {
1771
+ }, p = pr(t, M), y = i - r < 0, P = h.endRow - h.startRow + 1, D = y ? S : {
1773
1772
  ...S,
1774
- startRow: S.startRow - A,
1775
- endRow: S.endRow - A
1776
- }, E = {
1773
+ startRow: S.startRow - P,
1774
+ endRow: S.endRow - P
1775
+ }, U = {
1777
1776
  unitId: l,
1778
1777
  subUnitId: g,
1779
1778
  pluginName: se,
1780
1779
  selections: [{ range: D, primary: he(D, u), style: null }]
1781
- }, O = {
1780
+ }, k = {
1782
1781
  unitId: l,
1783
1782
  subUnitId: g,
1784
1783
  pluginName: se,
1785
1784
  selections: [{ range: h, primary: f, style: null }]
1786
- }, U = t.get(_), j = a.onCommandExecute({ id: Vn.id, params: e }), R = [
1785
+ }, E = t.get(_), j = a.onCommandExecute({ id: Bn.id, params: e }), I = [
1787
1786
  { id: St.id, params: M },
1788
- { id: te.id, params: E },
1787
+ { id: ee.id, params: U },
1789
1788
  ...j.redos
1790
- ], Q = [
1789
+ ], oe = [
1791
1790
  { id: St.id, params: p },
1792
- { id: te.id, params: O },
1791
+ { id: ee.id, params: k },
1793
1792
  ...j.undos
1794
1793
  ];
1795
- return K(R, U).result ? (t.get(B).pushUndoRedo({
1794
+ return K(I, E).result ? (t.get(B).pushUndoRedo({
1796
1795
  unitID: l,
1797
- undoMutations: Q,
1798
- redoMutations: R
1796
+ undoMutations: oe,
1797
+ redoMutations: I
1799
1798
  }), !0) : !1;
1800
1799
  }
1801
- }, Bn = "sheet.command.move-cols", Wn = {
1802
- id: Bn,
1803
- type: I.COMMAND,
1800
+ }, Wn = "sheet.command.move-cols", jn = {
1801
+ id: Wn,
1802
+ type: R.COMMAND,
1804
1803
  handler: async (t, e) => {
1805
1804
  const n = t.get(x).getSelections(), {
1806
1805
  fromRange: { startColumn: r },
@@ -1819,7 +1818,7 @@ const Ln = "sheet.command.move-rows", Vn = {
1819
1818
  const l = d.getUnitId(), g = u.getSheetId(), m = t.get(pt), h = s[0].range, f = s[0].primary, v = Mt(h, u, !1);
1820
1819
  if (!N.equals(h, v))
1821
1820
  return m.emit("Only part of a merged cell is selected."), !1;
1822
- if (Mr(i, u))
1821
+ if (_r(i, u))
1823
1822
  return m.emit("Across a merged cell."), !1;
1824
1823
  const S = {
1825
1824
  ...h,
@@ -1830,38 +1829,38 @@ const Ln = "sheet.command.move-rows", Vn = {
1830
1829
  subUnitId: g,
1831
1830
  sourceRange: h,
1832
1831
  targetRange: S
1833
- }, p = pr(t, M), w = h.endColumn - h.startColumn + 1, D = i - r < 0 ? S : {
1832
+ }, p = wr(t, M), w = h.endColumn - h.startColumn + 1, D = i - r < 0 ? S : {
1834
1833
  ...S,
1835
1834
  startColumn: S.startColumn - w,
1836
1835
  endColumn: S.endColumn - w
1837
- }, E = {
1836
+ }, U = {
1838
1837
  unitId: l,
1839
1838
  subUnitId: g,
1840
1839
  pluginName: se,
1841
1840
  selections: [{ range: D, primary: he(D, u), style: null }]
1842
- }, O = {
1841
+ }, k = {
1843
1842
  unitId: l,
1844
1843
  subUnitId: g,
1845
1844
  pluginName: se,
1846
1845
  selections: [{ range: h, primary: f, style: null }]
1847
- }, U = t.get(_), j = a.onCommandExecute({ id: Wn.id, params: e }), R = [
1848
- { id: It.id, params: M },
1849
- { id: te.id, params: E },
1846
+ }, E = t.get(_), j = a.onCommandExecute({ id: jn.id, params: e }), I = [
1847
+ { id: Rt.id, params: M },
1848
+ { id: ee.id, params: U },
1850
1849
  ...j.redos
1851
- ], Q = [
1852
- { id: It.id, params: p },
1853
- { id: te.id, params: O },
1850
+ ], oe = [
1851
+ { id: Rt.id, params: p },
1852
+ { id: ee.id, params: k },
1854
1853
  ...j.undos
1855
1854
  ];
1856
- return K(R, U).result && t.get(B).pushUndoRedo({
1855
+ return K(I, E).result && t.get(B).pushUndoRedo({
1857
1856
  unitID: l,
1858
- undoMutations: Q,
1859
- redoMutations: R
1857
+ undoMutations: oe,
1858
+ redoMutations: I
1860
1859
  }), !0;
1861
1860
  }
1862
- }, jn = "sheet.command.remove-row", Kt = {
1863
- type: I.COMMAND,
1864
- id: jn,
1861
+ }, Fn = "sheet.command.remove-row", Kt = {
1862
+ type: R.COMMAND,
1863
+ id: Fn,
1865
1864
  handler: async (t, e) => {
1866
1865
  var f;
1867
1866
  const o = t.get(x), n = t.get($);
@@ -1878,7 +1877,7 @@ const Ln = "sheet.command.move-rows", Vn = {
1878
1877
  unitId: c,
1879
1878
  subUnitId: d,
1880
1879
  range: r
1881
- }, l = gr(
1880
+ }, l = hr(
1882
1881
  u,
1883
1882
  a
1884
1883
  ), g = n.onCommandExecute({
@@ -1898,9 +1897,9 @@ const Ln = "sheet.command.move-rows", Vn = {
1898
1897
  redoMutations: [{ id: je.id, params: u }, ...g.redos]
1899
1898
  }), !0) : !1;
1900
1899
  }
1901
- }, Fn = "sheet.command.remove-col", Jt = {
1902
- type: I.COMMAND,
1903
- id: Fn,
1900
+ }, $n = "sheet.command.remove-col", Jt = {
1901
+ type: R.COMMAND,
1902
+ id: $n,
1904
1903
  handler: async (t, e) => {
1905
1904
  var f;
1906
1905
  const o = t.get(x), n = t.get($);
@@ -1917,7 +1916,7 @@ const Ln = "sheet.command.move-rows", Vn = {
1917
1916
  unitId: c,
1918
1917
  subUnitId: d,
1919
1918
  range: r
1920
- }, l = hr(t, u), g = n.onCommandExecute({
1919
+ }, l = mr(t, u), g = n.onCommandExecute({
1921
1920
  id: Jt.id,
1922
1921
  params: { range: r }
1923
1922
  }), m = t.get(_);
@@ -1934,9 +1933,9 @@ const Ln = "sheet.command.move-rows", Vn = {
1934
1933
  redoMutations: [{ id: Fe.id, params: u }, ...g.redos]
1935
1934
  }), !0) : !1;
1936
1935
  }
1937
- }, $n = {
1936
+ }, Hn = {
1938
1937
  id: "sheet.command.remove-sheet",
1939
- type: I.COMMAND,
1938
+ type: R.COMMAND,
1940
1939
  handler: async (t, e) => {
1941
1940
  var S, M;
1942
1941
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get($);
@@ -1954,11 +1953,11 @@ const Ln = "sheet.command.move-rows", Vn = {
1954
1953
  subUnitId: a,
1955
1954
  unitId: s,
1956
1955
  subUnitName: d.getName()
1957
- }, g = ur(
1956
+ }, g = lr(
1958
1957
  t,
1959
1958
  l
1960
1959
  ), m = i.onCommandExecute({
1961
- id: $n.id,
1960
+ id: Hn.id,
1962
1961
  params: { unitId: s, subUnitId: a }
1963
1962
  }), h = [{ id: wt.id, params: l }, ...m.redos], f = [...m.undos, { id: Le.id, params: g }];
1964
1963
  return K(h, o) ? (n.pushUndoRedo({
@@ -1977,7 +1976,7 @@ const Ln = "sheet.command.move-rows", Vn = {
1977
1976
  };
1978
1977
  }, z = {
1979
1978
  id: "sheet.mutation.add-worksheet-merge",
1980
- type: I.MUTATION,
1979
+ type: R.MUTATION,
1981
1980
  handler: (t, e) => {
1982
1981
  const n = t.get(C).getUniverSheetInstance(e.unitId);
1983
1982
  if (n == null)
@@ -2010,7 +2009,7 @@ const Ln = "sheet.command.move-rows", Vn = {
2010
2009
  };
2011
2010
  }, G = {
2012
2011
  id: "sheet.mutation.remove-worksheet-merge",
2013
- type: I.MUTATION,
2012
+ type: R.MUTATION,
2014
2013
  handler: (t, e) => {
2015
2014
  const n = t.get(C).getUniverSheetInstance(e.unitId);
2016
2015
  if (n == null)
@@ -2026,8 +2025,8 @@ const Ln = "sheet.command.move-rows", Vn = {
2026
2025
  }
2027
2026
  return !0;
2028
2027
  }
2029
- }, _r = {
2030
- type: I.COMMAND,
2028
+ }, yr = {
2029
+ type: R.COMMAND,
2031
2030
  id: "sheet.command.remove-worksheet-merge",
2032
2031
  handler: async (t) => {
2033
2032
  const e = t.get(x), o = t.get(_), n = t.get(B), r = t.get(C), i = e.getSelectionRanges();
@@ -2056,10 +2055,11 @@ const Ln = "sheet.command.move-rows", Vn = {
2056
2055
  t,
2057
2056
  u
2058
2057
  );
2059
- return o.syncExecuteCommand(G.id, u) ? (n.pushUndoRedo({
2058
+ return o.syncExecuteCommand(G.id, m) ? (n.pushUndoRedo({
2060
2059
  unitID: s,
2061
2060
  undoMutations: [{ id: z.id, params: m }],
2062
- redoMutations: [{ id: G.id, params: u }]
2061
+ // params should be the merged cells to be deleted accurately, rather than the selection
2062
+ redoMutations: [{ id: G.id, params: m }]
2063
2063
  }), !0) : !1;
2064
2064
  }
2065
2065
  };
@@ -2071,7 +2071,7 @@ class He {
2071
2071
  style: Io.THIN,
2072
2072
  activeBorderType: !1
2073
2073
  });
2074
- F(this, "_borderInfo$", new Mn(this._borderInfo));
2074
+ F(this, "_borderInfo$", new _n(this._borderInfo));
2075
2075
  F(this, "borderInfo$", this._borderInfo$.asObservable());
2076
2076
  }
2077
2077
  dispose() {
@@ -2096,7 +2096,7 @@ class He {
2096
2096
  this._borderInfo$.next(this._borderInfo);
2097
2097
  }
2098
2098
  }
2099
- function yr(t, e, o) {
2099
+ function br(t, e, o) {
2100
2100
  const n = e ? t.getUniverSheetInstance(e) : t.getCurrentUniverSheetInstance();
2101
2101
  if (!n)
2102
2102
  throw new Error();
@@ -2116,9 +2116,9 @@ function rt(t, e) {
2116
2116
  for (let a = n; a <= i; a++)
2117
2117
  e(s, a);
2118
2118
  }
2119
- const br = {
2119
+ const Ur = {
2120
2120
  id: "sheet.command.set-border-basic",
2121
- type: I.COMMAND,
2121
+ type: R.COMMAND,
2122
2122
  handler: async (t, e) => {
2123
2123
  const { unitId: o, subUnitId: n, value: r } = e, { type: i, color: s, style: a } = r, c = t.get(_), d = t.get(He);
2124
2124
  return d.setType(i), d.setColor(s), d.setStyle(a), c.executeCommand(nt.id, {
@@ -2126,34 +2126,34 @@ const br = {
2126
2126
  subUnitId: n
2127
2127
  });
2128
2128
  }
2129
- }, Ur = {
2129
+ }, Dr = {
2130
2130
  id: "sheet.command.set-border-position",
2131
- type: I.COMMAND,
2131
+ type: R.COMMAND,
2132
2132
  handler: async (t, e) => {
2133
2133
  if (!e.value)
2134
2134
  return !1;
2135
2135
  const o = t.get(_);
2136
2136
  return t.get(He).setType(e.value), o.executeCommand(nt.id);
2137
2137
  }
2138
- }, Dr = {
2138
+ }, Or = {
2139
2139
  id: "sheet.command.set-border-style",
2140
- type: I.COMMAND,
2140
+ type: R.COMMAND,
2141
2141
  handler: async (t, e) => {
2142
2142
  const o = t.get(_);
2143
2143
  return t.get(He).setStyle(e.value), o.executeCommand(nt.id);
2144
2144
  }
2145
- }, Or = {
2145
+ }, kr = {
2146
2146
  id: "sheet.command.set-border-color",
2147
- type: I.COMMAND,
2147
+ type: R.COMMAND,
2148
2148
  handler: async (t, e) => {
2149
2149
  const o = t.get(_);
2150
2150
  return t.get(He).setColor(e.value), o.executeCommand(nt.id);
2151
2151
  }
2152
2152
  }, nt = {
2153
2153
  id: "sheet.command.set-border",
2154
- type: I.COMMAND,
2154
+ type: R.COMMAND,
2155
2155
  handler: async (t, e) => {
2156
- const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get(x), s = t.get(He), { worksheet: a, unitId: c, subUnitId: d } = yr(
2156
+ const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get(x), s = t.get(He), { worksheet: a, unitId: c, subUnitId: d } = br(
2157
2157
  r,
2158
2158
  e == null ? void 0 : e.unitId,
2159
2159
  e == null ? void 0 : e.subUnitId
@@ -2163,73 +2163,73 @@ const br = {
2163
2163
  const { style: g, color: m, type: h, activeBorderType: f } = s.getBorderInfo();
2164
2164
  if (!f)
2165
2165
  return !1;
2166
- const v = h === re.TOP || h === re.ALL || h === re.OUTSIDE, S = h === re.LEFT || h === re.ALL || h === re.OUTSIDE, M = h === re.BOTTOM || h === re.ALL || h === re.OUTSIDE, p = h === re.RIGHT || h === re.ALL || h === re.OUTSIDE, w = h === re.VERTICAL || h === re.ALL || h === re.INSIDE, y = h === re.HORIZONTAL || h === re.ALL || h === re.INSIDE, A = h.indexOf("tlbr") > -1, D = h.indexOf("tlbc") > -1, E = h.indexOf("tlmr") > -1, O = h.indexOf("bltr") > -1, U = h.indexOf("mltr") > -1, j = h.indexOf("bctr") > -1, R = u[0], Q = {
2167
- startRow: R.startRow - 1,
2168
- startColumn: R.startColumn,
2169
- endRow: R.startRow - 1,
2170
- endColumn: R.endColumn
2166
+ const v = h === re.TOP || h === re.ALL || h === re.OUTSIDE, S = h === re.LEFT || h === re.ALL || h === re.OUTSIDE, M = h === re.BOTTOM || h === re.ALL || h === re.OUTSIDE, p = h === re.RIGHT || h === re.ALL || h === re.OUTSIDE, w = h === re.VERTICAL || h === re.ALL || h === re.INSIDE, y = h === re.HORIZONTAL || h === re.ALL || h === re.INSIDE, P = h.indexOf("tlbr") > -1, D = h.indexOf("tlbc") > -1, U = h.indexOf("tlmr") > -1, k = h.indexOf("bltr") > -1, E = h.indexOf("mltr") > -1, j = h.indexOf("bctr") > -1, I = u[0], oe = {
2167
+ startRow: I.startRow - 1,
2168
+ startColumn: I.startColumn,
2169
+ endRow: I.startRow - 1,
2170
+ endColumn: I.endColumn
2171
2171
  }, ye = {
2172
- startRow: R.startRow,
2173
- startColumn: R.startColumn - 1,
2174
- endRow: R.endRow,
2175
- endColumn: R.startColumn - 1
2172
+ startRow: I.startRow,
2173
+ startColumn: I.startColumn - 1,
2174
+ endRow: I.endRow,
2175
+ endColumn: I.startColumn - 1
2176
2176
  }, me = {
2177
- startRow: R.endRow + 1,
2178
- startColumn: R.startColumn,
2179
- endRow: R.endRow + 1,
2180
- endColumn: R.endColumn
2177
+ startRow: I.endRow + 1,
2178
+ startColumn: I.startColumn,
2179
+ endRow: I.endRow + 1,
2180
+ endColumn: I.endColumn
2181
2181
  }, Zt = {
2182
- startRow: R.startRow,
2183
- startColumn: R.endColumn + 1,
2184
- endRow: R.endRow,
2185
- endColumn: R.endColumn + 1
2182
+ startRow: I.startRow,
2183
+ startColumn: I.endColumn + 1,
2184
+ endRow: I.endRow,
2185
+ endColumn: I.endColumn + 1
2186
2186
  }, Qt = {
2187
- startRow: R.startRow,
2188
- startColumn: R.startColumn,
2189
- endRow: R.startRow,
2190
- endColumn: R.endColumn
2187
+ startRow: I.startRow,
2188
+ startColumn: I.startColumn,
2189
+ endRow: I.startRow,
2190
+ endColumn: I.endColumn
2191
2191
  }, en = {
2192
- startRow: R.startRow,
2193
- startColumn: R.startColumn,
2194
- endRow: R.endRow,
2195
- endColumn: R.startColumn
2192
+ startRow: I.startRow,
2193
+ startColumn: I.startColumn,
2194
+ endRow: I.endRow,
2195
+ endColumn: I.startColumn
2196
2196
  }, tn = {
2197
- startRow: R.endRow,
2198
- startColumn: R.startColumn,
2199
- endRow: R.endRow,
2200
- endColumn: R.endColumn
2197
+ startRow: I.endRow,
2198
+ startColumn: I.startColumn,
2199
+ endRow: I.endRow,
2200
+ endColumn: I.endColumn
2201
2201
  }, nn = {
2202
- startRow: R.startRow,
2203
- startColumn: R.endColumn,
2204
- endRow: R.endRow,
2205
- endColumn: R.endColumn
2206
- }, V = new ne(), J = {
2202
+ startRow: I.startRow,
2203
+ startColumn: I.endColumn,
2204
+ endRow: I.endRow,
2205
+ endColumn: I.endColumn
2206
+ }, V = new te(), J = {
2207
2207
  s: g,
2208
2208
  cl: {
2209
2209
  rgb: m
2210
2210
  }
2211
- }, ot = (T, k) => {
2211
+ }, ot = (T, O) => {
2212
2212
  let W = null;
2213
2213
  return l.forEach((ce) => {
2214
2214
  N.intersects(ce, {
2215
- startColumn: k,
2216
- endColumn: k,
2215
+ startColumn: O,
2216
+ endColumn: O,
2217
2217
  startRow: T,
2218
2218
  endRow: T
2219
2219
  }) && (W = ce);
2220
2220
  }), W;
2221
2221
  };
2222
- function H(T, k, W) {
2222
+ function H(T, O, W) {
2223
2223
  T.startRow < 0 || T.startColumn < 0 || rt(T, (ce, fe) => {
2224
- var P, Ge;
2224
+ var A, Ge;
2225
2225
  const le = ot(ce, fe);
2226
- let de = k;
2227
- if (le && (k.bc_tr || k.ml_tr || k.bl_tr || k.tl_mr || k.tl_bc || k.tl_br)) {
2226
+ let de = O;
2227
+ if (le && (O.bc_tr || O.ml_tr || O.bl_tr || O.tl_mr || O.tl_bc || O.tl_br)) {
2228
2228
  if (W) {
2229
2229
  const ve = b.deepClone(
2230
- (P = V.getValue(le.startRow, le.startColumn)) == null ? void 0 : P.s
2230
+ (A = V.getValue(le.startRow, le.startColumn)) == null ? void 0 : A.s
2231
2231
  );
2232
- de = ve != null && ve.bd ? Object.assign(ve.bd, k) : k;
2232
+ de = ve != null && ve.bd ? Object.assign(ve.bd, O) : O;
2233
2233
  }
2234
2234
  V.setValue(le.startRow, le.startColumn, {
2235
2235
  s: {
@@ -2239,152 +2239,152 @@ const br = {
2239
2239
  } else {
2240
2240
  if (W) {
2241
2241
  const ve = b.deepClone((Ge = V.getValue(ce, fe)) == null ? void 0 : Ge.s);
2242
- de = ve != null && ve.bd ? Object.assign(ve.bd, k) : k;
2242
+ de = ve != null && ve.bd ? Object.assign(ve.bd, O) : O;
2243
2243
  }
2244
2244
  V.setValue(ce, fe, { s: { bd: de } });
2245
2245
  }
2246
2246
  });
2247
2247
  }
2248
- v && (H(Q, { b: null }), H(Qt, { t: b.deepClone(J) }, !0)), M && (H(me, { t: null }), H(tn, { b: b.deepClone(J) }, !0)), S && (H(ye, { r: null }), H(en, { l: b.deepClone(J) }, !0)), p && (H(Zt, { l: null }), H(nn, { r: b.deepClone(J) }, !0)), A && H(R, { tl_br: b.deepClone(J) }, !0), D && H(R, { tl_bc: b.deepClone(J) }, !0), E && H(R, { tl_mr: b.deepClone(J) }, !0), O && H(R, { bl_tr: b.deepClone(J) }, !0), U && H(R, { ml_tr: b.deepClone(J) }, !0), j && H(R, { bc_tr: b.deepClone(J) }, !0), w && rt(R, (T, k) => {
2248
+ v && (H(oe, { b: null }), H(Qt, { t: b.deepClone(J) }, !0)), M && (H(me, { t: null }), H(tn, { b: b.deepClone(J) }, !0)), S && (H(ye, { r: null }), H(en, { l: b.deepClone(J) }, !0)), p && (H(Zt, { l: null }), H(nn, { r: b.deepClone(J) }, !0)), P && H(I, { tl_br: b.deepClone(J) }, !0), D && H(I, { tl_bc: b.deepClone(J) }, !0), U && H(I, { tl_mr: b.deepClone(J) }, !0), k && H(I, { bl_tr: b.deepClone(J) }, !0), E && H(I, { ml_tr: b.deepClone(J) }, !0), j && H(I, { bc_tr: b.deepClone(J) }, !0), w && rt(I, (T, O) => {
2249
2249
  var ce, fe, le, de;
2250
- const W = ot(T, k);
2250
+ const W = ot(T, O);
2251
2251
  if (W) {
2252
- if (W.endColumn !== R.endColumn) {
2253
- const P = (ce = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : ce.s;
2254
- V.setValue(T, k, {
2252
+ if (W.endColumn !== I.endColumn) {
2253
+ const A = (ce = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : ce.s;
2254
+ V.setValue(T, O, {
2255
2255
  s: {
2256
- bd: P != null && P.bd ? Object.assign(P.bd, { r: b.deepClone(J) }) : { r: b.deepClone(J) }
2256
+ bd: A != null && A.bd ? Object.assign(A.bd, { r: b.deepClone(J) }) : { r: b.deepClone(J) }
2257
2257
  }
2258
2258
  });
2259
2259
  }
2260
- if (W.startColumn !== R.startColumn) {
2261
- const P = (fe = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : fe.s;
2262
- V.setValue(T, k, {
2260
+ if (W.startColumn !== I.startColumn) {
2261
+ const A = (fe = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : fe.s;
2262
+ V.setValue(T, O, {
2263
2263
  s: {
2264
- bd: P != null && P.bd ? Object.assign(P.bd, { l: b.deepClone(J) }) : { l: b.deepClone(J) }
2264
+ bd: A != null && A.bd ? Object.assign(A.bd, { l: b.deepClone(J) }) : { l: b.deepClone(J) }
2265
2265
  }
2266
2266
  });
2267
2267
  }
2268
2268
  } else {
2269
- if (k !== R.endColumn) {
2270
- const P = (le = V.getValue(T, k)) == null ? void 0 : le.s;
2271
- V.setValue(T, k, {
2269
+ if (O !== I.endColumn) {
2270
+ const A = (le = V.getValue(T, O)) == null ? void 0 : le.s;
2271
+ V.setValue(T, O, {
2272
2272
  s: {
2273
- bd: P != null && P.bd ? Object.assign(P.bd, { r: b.deepClone(J) }) : { r: b.deepClone(J) }
2273
+ bd: A != null && A.bd ? Object.assign(A.bd, { r: b.deepClone(J) }) : { r: b.deepClone(J) }
2274
2274
  }
2275
2275
  });
2276
2276
  }
2277
- if (k !== R.startColumn) {
2278
- const P = (de = V.getValue(T, k)) == null ? void 0 : de.s;
2279
- V.setValue(T, k, {
2277
+ if (O !== I.startColumn) {
2278
+ const A = (de = V.getValue(T, O)) == null ? void 0 : de.s;
2279
+ V.setValue(T, O, {
2280
2280
  s: {
2281
- bd: P != null && P.bd ? Object.assign(P.bd, { l: b.deepClone(J) }) : { l: b.deepClone(J) }
2281
+ bd: A != null && A.bd ? Object.assign(A.bd, { l: b.deepClone(J) }) : { l: b.deepClone(J) }
2282
2282
  }
2283
2283
  });
2284
2284
  }
2285
2285
  }
2286
- }), y && rt(R, (T, k) => {
2286
+ }), y && rt(I, (T, O) => {
2287
2287
  var ce, fe, le, de;
2288
- const W = ot(T, k);
2288
+ const W = ot(T, O);
2289
2289
  if (W) {
2290
- if (W.endRow !== R.endRow) {
2291
- const P = (ce = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : ce.s;
2292
- V.setValue(T, k, {
2290
+ if (W.endRow !== I.endRow) {
2291
+ const A = (ce = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : ce.s;
2292
+ V.setValue(T, O, {
2293
2293
  s: {
2294
- bd: P != null && P.bd ? Object.assign(P.bd, { b: b.deepClone(J) }) : { b: b.deepClone(J) }
2294
+ bd: A != null && A.bd ? Object.assign(A.bd, { b: b.deepClone(J) }) : { b: b.deepClone(J) }
2295
2295
  }
2296
2296
  });
2297
2297
  }
2298
- if (W.startRow !== R.startRow) {
2299
- const P = (fe = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : fe.s;
2300
- V.setValue(T, k, {
2298
+ if (W.startRow !== I.startRow) {
2299
+ const A = (fe = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : fe.s;
2300
+ V.setValue(T, O, {
2301
2301
  s: {
2302
- bd: P != null && P.bd ? Object.assign(P.bd, { t: b.deepClone(J) }) : { t: b.deepClone(J) }
2302
+ bd: A != null && A.bd ? Object.assign(A.bd, { t: b.deepClone(J) }) : { t: b.deepClone(J) }
2303
2303
  }
2304
2304
  });
2305
2305
  }
2306
2306
  } else {
2307
- if (T !== R.endRow) {
2308
- const P = (le = V.getValue(T, k)) == null ? void 0 : le.s;
2309
- V.setValue(T, k, {
2307
+ if (T !== I.endRow) {
2308
+ const A = (le = V.getValue(T, O)) == null ? void 0 : le.s;
2309
+ V.setValue(T, O, {
2310
2310
  s: {
2311
- bd: P != null && P.bd ? Object.assign(P.bd, { b: b.deepClone(J) }) : { b: b.deepClone(J) }
2311
+ bd: A != null && A.bd ? Object.assign(A.bd, { b: b.deepClone(J) }) : { b: b.deepClone(J) }
2312
2312
  }
2313
2313
  });
2314
2314
  }
2315
- if (T !== R.startRow) {
2316
- const P = (de = V.getValue(T, k)) == null ? void 0 : de.s;
2317
- V.setValue(T, k, {
2315
+ if (T !== I.startRow) {
2316
+ const A = (de = V.getValue(T, O)) == null ? void 0 : de.s;
2317
+ V.setValue(T, O, {
2318
2318
  s: {
2319
- bd: P != null && P.bd ? Object.assign(P.bd, { t: b.deepClone(J) }) : { t: b.deepClone(J) }
2319
+ bd: A != null && A.bd ? Object.assign(A.bd, { t: b.deepClone(J) }) : { t: b.deepClone(J) }
2320
2320
  }
2321
2321
  });
2322
2322
  }
2323
2323
  }
2324
- }), !v && !M && !S && !p && !w && !y && !A && !D && !E && !O && !U && !j && (H(Q, { b: null }), H(Qt, { t: null }, !0), H(me, { t: null }), H(tn, { b: null }, !0), H(ye, { r: null }), H(en, { l: null }, !0), H(Zt, { l: null }), H(nn, { r: null }, !0), H(R, { tl_br: null }, !0), H(R, { tl_bc: null }, !0), H(R, { tl_mr: null }, !0), H(R, { bl_tr: null }, !0), H(R, { ml_tr: null }, !0), H(R, { bc_tr: null }, !0), rt(R, (T, k) => {
2325
- var ce, fe, le, de, P, Ge, ve, on;
2326
- const W = ot(T, k);
2324
+ }), !v && !M && !S && !p && !w && !y && !P && !D && !U && !k && !E && !j && (H(oe, { b: null }), H(Qt, { t: null }, !0), H(me, { t: null }), H(tn, { b: null }, !0), H(ye, { r: null }), H(en, { l: null }, !0), H(Zt, { l: null }), H(nn, { r: null }, !0), H(I, { tl_br: null }, !0), H(I, { tl_bc: null }, !0), H(I, { tl_mr: null }, !0), H(I, { bl_tr: null }, !0), H(I, { ml_tr: null }, !0), H(I, { bc_tr: null }, !0), rt(I, (T, O) => {
2325
+ var ce, fe, le, de, A, Ge, ve, on;
2326
+ const W = ot(T, O);
2327
2327
  if (W) {
2328
- if (W.endColumn !== R.endColumn) {
2328
+ if (W.endColumn !== I.endColumn) {
2329
2329
  const L = (ce = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : ce.s;
2330
- V.setValue(T, k, {
2330
+ V.setValue(T, O, {
2331
2331
  s: {
2332
2332
  bd: L != null && L.bd ? Object.assign(L.bd, { r: null }) : { r: null }
2333
2333
  }
2334
2334
  });
2335
2335
  }
2336
- if (W.startColumn !== R.startColumn) {
2336
+ if (W.startColumn !== I.startColumn) {
2337
2337
  const L = (fe = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : fe.s;
2338
- V.setValue(T, k, {
2338
+ V.setValue(T, O, {
2339
2339
  s: {
2340
2340
  bd: L != null && L.bd ? Object.assign(L.bd, { l: null }) : { l: null }
2341
2341
  }
2342
2342
  });
2343
2343
  }
2344
- if (W.endRow !== R.endRow) {
2344
+ if (W.endRow !== I.endRow) {
2345
2345
  const L = (le = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : le.s;
2346
- V.setValue(T, k, {
2346
+ V.setValue(T, O, {
2347
2347
  s: {
2348
2348
  bd: L != null && L.bd ? Object.assign(L.bd, { b: null }) : { b: null }
2349
2349
  }
2350
2350
  });
2351
2351
  }
2352
- if (W.startRow !== R.startRow) {
2352
+ if (W.startRow !== I.startRow) {
2353
2353
  const L = (de = V.getValue(W.startRow, W.startColumn)) == null ? void 0 : de.s;
2354
- V.setValue(T, k, {
2354
+ V.setValue(T, O, {
2355
2355
  s: {
2356
2356
  bd: L != null && L.bd ? Object.assign(L.bd, { t: null }) : { t: null }
2357
2357
  }
2358
2358
  });
2359
2359
  }
2360
2360
  } else {
2361
- if (k !== R.endColumn) {
2362
- const L = (P = V.getValue(T, k)) == null ? void 0 : P.s;
2363
- V.setValue(T, k, {
2361
+ if (O !== I.endColumn) {
2362
+ const L = (A = V.getValue(T, O)) == null ? void 0 : A.s;
2363
+ V.setValue(T, O, {
2364
2364
  s: {
2365
2365
  bd: L != null && L.bd ? Object.assign(L.bd, { r: null }) : { r: null }
2366
2366
  }
2367
2367
  });
2368
2368
  }
2369
- if (k !== R.startColumn) {
2370
- const L = (Ge = V.getValue(T, k)) == null ? void 0 : Ge.s;
2371
- V.setValue(T, k, {
2369
+ if (O !== I.startColumn) {
2370
+ const L = (Ge = V.getValue(T, O)) == null ? void 0 : Ge.s;
2371
+ V.setValue(T, O, {
2372
2372
  s: {
2373
2373
  bd: L != null && L.bd ? Object.assign(L.bd, { l: null }) : { l: null }
2374
2374
  }
2375
2375
  });
2376
2376
  }
2377
- if (T !== R.endRow) {
2378
- const L = (ve = V.getValue(T, k)) == null ? void 0 : ve.s;
2379
- V.setValue(T, k, {
2377
+ if (T !== I.endRow) {
2378
+ const L = (ve = V.getValue(T, O)) == null ? void 0 : ve.s;
2379
+ V.setValue(T, O, {
2380
2380
  s: {
2381
2381
  bd: L != null && L.bd ? Object.assign(L.bd, { b: null }) : { b: null }
2382
2382
  }
2383
2383
  });
2384
2384
  }
2385
- if (T !== R.startRow) {
2386
- const L = (on = V.getValue(T, k)) == null ? void 0 : on.s;
2387
- V.setValue(T, k, {
2385
+ if (T !== I.startRow) {
2386
+ const L = (on = V.getValue(T, O)) == null ? void 0 : on.s;
2387
+ V.setValue(T, O, {
2388
2388
  s: {
2389
2389
  bd: L != null && L.bd ? Object.assign(L.bd, { t: null }) : { t: null }
2390
2390
  }
@@ -2396,17 +2396,17 @@ const br = {
2396
2396
  unitId: c,
2397
2397
  subUnitId: d,
2398
2398
  cellValue: V.getData()
2399
- }, lo = Ae(
2399
+ }, go = Ae(
2400
2400
  t,
2401
2401
  Ut
2402
2402
  );
2403
- return o.syncExecuteCommand(ee.id, Ut) ? (n.pushUndoRedo({
2403
+ return o.syncExecuteCommand(Q.id, Ut) ? (n.pushUndoRedo({
2404
2404
  unitID: c,
2405
- undoMutations: [{ id: ee.id, params: lo }],
2406
- redoMutations: [{ id: ee.id, params: Ut }]
2405
+ undoMutations: [{ id: Q.id, params: go }],
2406
+ redoMutations: [{ id: Q.id, params: Ut }]
2407
2407
  }), !0) : !1;
2408
2408
  }
2409
- }, kr = (t, e) => {
2409
+ }, Ar = (t, e) => {
2410
2410
  if (t.get(C).getUniverSheetInstance(e.unitId) == null)
2411
2411
  throw new Error("universheet is null error!");
2412
2412
  return {
@@ -2416,7 +2416,7 @@ const br = {
2416
2416
  };
2417
2417
  }, Xe = {
2418
2418
  id: "sheet.mutation.set-col-hidden",
2419
- type: I.MUTATION,
2419
+ type: R.MUTATION,
2420
2420
  handler: (t, e) => {
2421
2421
  const n = t.get(C).getUniverSheetInstance(e.unitId);
2422
2422
  if (!n)
@@ -2431,7 +2431,7 @@ const br = {
2431
2431
  }
2432
2432
  return !0;
2433
2433
  }
2434
- }, Ar = (t, e) => {
2434
+ }, Pr = (t, e) => {
2435
2435
  if (t.get(C).getUniverSheetInstance(e.unitId) == null)
2436
2436
  throw new Error("universheet is null error!");
2437
2437
  return {
@@ -2441,7 +2441,7 @@ const br = {
2441
2441
  };
2442
2442
  }, Ye = {
2443
2443
  id: "sheet.mutation.set-col-visible",
2444
- type: I.MUTATION,
2444
+ type: R.MUTATION,
2445
2445
  handler: (t, e) => {
2446
2446
  const n = t.get(C).getUniverSheetInstance(e.unitId);
2447
2447
  if (!n)
@@ -2456,15 +2456,15 @@ const br = {
2456
2456
  }
2457
2457
  return !0;
2458
2458
  }
2459
- }, Hn = {
2460
- type: I.COMMAND,
2459
+ }, zn = {
2460
+ type: R.COMMAND,
2461
2461
  id: "sheet.command.set-col-visible-on-cols",
2462
2462
  handler: async (t, e) => {
2463
2463
  const { unitId: o, subUnitId: n, ranges: r } = e, i = t.get(C).getUniverSheetInstance(o).getSheetBySheetId(n), s = {
2464
2464
  unitId: o,
2465
2465
  subUnitId: n,
2466
2466
  ranges: r
2467
- }, a = Ar(t, s), c = {
2467
+ }, a = Pr(t, s), c = {
2468
2468
  unitId: o,
2469
2469
  subUnitId: n,
2470
2470
  pluginName: se,
@@ -2473,7 +2473,7 @@ const br = {
2473
2473
  unitId: o,
2474
2474
  subUnitId: n,
2475
2475
  pluginName: se,
2476
- selections: zn(r).map((g) => ({
2476
+ selections: Gn(r).map((g) => ({
2477
2477
  range: g,
2478
2478
  primary: he(g, i),
2479
2479
  style: null
@@ -2482,23 +2482,23 @@ const br = {
2482
2482
  return K(
2483
2483
  [
2484
2484
  { id: Ye.id, params: s },
2485
- { id: te.id, params: c }
2485
+ { id: ee.id, params: c }
2486
2486
  ],
2487
2487
  u
2488
2488
  ).result && t.get(B).pushUndoRedo({
2489
2489
  unitID: o,
2490
2490
  undoMutations: [
2491
2491
  { id: Xe.id, params: a },
2492
- { id: te.id, params: d }
2492
+ { id: ee.id, params: d }
2493
2493
  ],
2494
2494
  redoMutations: [
2495
2495
  { id: Ye.id, params: s },
2496
- { id: te.id, params: c }
2496
+ { id: ee.id, params: c }
2497
2497
  ]
2498
2498
  }), !0;
2499
2499
  }
2500
- }, Pr = {
2501
- type: I.COMMAND,
2500
+ }, Nr = {
2501
+ type: R.COMMAND,
2502
2502
  id: "sheet.command.set-selected-cols-visible",
2503
2503
  handler: async (t) => {
2504
2504
  var d;
@@ -2512,14 +2512,14 @@ const br = {
2512
2512
  if (!i)
2513
2513
  return !1;
2514
2514
  const s = r.getUnitId(), a = i.getSheetId(), c = o.map((u) => i.getHiddenCols(u.startColumn, u.endColumn)).flat();
2515
- return t.get(_).executeCommand(Hn.id, {
2515
+ return t.get(_).executeCommand(zn.id, {
2516
2516
  unitId: s,
2517
2517
  subUnitId: a,
2518
2518
  ranges: c
2519
2519
  });
2520
2520
  }
2521
2521
  }, Er = {
2522
- type: I.COMMAND,
2522
+ type: R.COMMAND,
2523
2523
  id: "sheet.command.set-col-hidden",
2524
2524
  handler: async (t) => {
2525
2525
  var m;
@@ -2540,7 +2540,7 @@ const br = {
2540
2540
  unitId: s,
2541
2541
  subUnitId: a,
2542
2542
  pluginName: se,
2543
- selections: zn(o).map((h) => ({
2543
+ selections: Gn(o).map((h) => ({
2544
2544
  range: h,
2545
2545
  primary: he(h, i),
2546
2546
  style: null
@@ -2558,28 +2558,28 @@ const br = {
2558
2558
  if (K(
2559
2559
  [
2560
2560
  { id: Xe.id, params: c },
2561
- { id: te.id, params: d }
2561
+ { id: ee.id, params: d }
2562
2562
  ],
2563
2563
  l
2564
2564
  ).result) {
2565
- const h = t.get(B), f = kr(t, c);
2565
+ const h = t.get(B), f = Ar(t, c);
2566
2566
  return h.pushUndoRedo({
2567
2567
  unitID: s,
2568
2568
  undoMutations: [
2569
2569
  { id: Ye.id, params: f },
2570
- { id: te.id, params: u }
2570
+ { id: ee.id, params: u }
2571
2571
  ],
2572
2572
  redoMutations: [
2573
2573
  { id: Xe.id, params: c },
2574
- { id: te.id, params: d }
2574
+ { id: ee.id, params: d }
2575
2575
  ]
2576
2576
  }), !0;
2577
2577
  }
2578
2578
  return !1;
2579
2579
  }
2580
2580
  };
2581
- function zn(t) {
2582
- return Nr(t).map((o) => {
2581
+ function Gn(t) {
2582
+ return xr(t).map((o) => {
2583
2583
  const n = o.startColumn === 0 ? o.endColumn + 1 : o.startColumn - 1;
2584
2584
  return {
2585
2585
  ...o,
@@ -2588,7 +2588,7 @@ function zn(t) {
2588
2588
  };
2589
2589
  });
2590
2590
  }
2591
- function Nr(t) {
2591
+ function xr(t) {
2592
2592
  const e = [];
2593
2593
  let o;
2594
2594
  return t.sort((n, r) => n.startColumn - r.startColumn).forEach((n) => {
@@ -2599,7 +2599,7 @@ function Nr(t) {
2599
2599
  o.endColumn === n.startColumn - 1 ? o.endColumn = n.endColumn : (e.push(o), o = n);
2600
2600
  }), e.push(o), e;
2601
2601
  }
2602
- const Gn = (t, e) => {
2602
+ const qn = (t, e) => {
2603
2603
  const n = t.get(C).getUniverSheetInstance(e.unitId);
2604
2604
  if (n == null)
2605
2605
  throw new Error("universheet is null error!");
@@ -2612,9 +2612,9 @@ const Gn = (t, e) => {
2612
2612
  subUnitId: e.subUnitId,
2613
2613
  ...s
2614
2614
  };
2615
- }, Ee = {
2615
+ }, Ne = {
2616
2616
  id: "sheet.mutation.set-frozen",
2617
- type: I.MUTATION,
2617
+ type: R.MUTATION,
2618
2618
  handler: (t, e) => {
2619
2619
  const n = t.get(C).getUniverSheetInstance(e.unitId);
2620
2620
  if (n == null)
@@ -2625,8 +2625,8 @@ const Gn = (t, e) => {
2625
2625
  const i = r.getConfig(), { startRow: s, startColumn: a, ySplit: c, xSplit: d } = e;
2626
2626
  return i.freeze = { startRow: s, startColumn: a, ySplit: c, xSplit: d }, !0;
2627
2627
  }
2628
- }, xr = {
2629
- type: I.COMMAND,
2628
+ }, Tr = {
2629
+ type: R.COMMAND,
2630
2630
  id: "sheet.command.set-frozen",
2631
2631
  handler: async (t, e) => {
2632
2632
  const o = t.get(_), n = t.get(B), r = t.get(C), i = r.getCurrentUniverSheetInstance().getUnitId(), s = r.getCurrentUniverSheetInstance().getActiveSheet().getSheetId(), a = r.getUniverSheetInstance(i);
@@ -2642,15 +2642,15 @@ const Gn = (t, e) => {
2642
2642
  unitId: i,
2643
2643
  subUnitId: s,
2644
2644
  ...e
2645
- }, h = Gn(t, m);
2646
- return o.syncExecuteCommand(Ee.id, m) ? (n.pushUndoRedo({
2645
+ }, h = qn(t, m);
2646
+ return o.syncExecuteCommand(Ne.id, m) ? (n.pushUndoRedo({
2647
2647
  unitID: i,
2648
- undoMutations: [{ id: Ee.id, params: h }],
2649
- redoMutations: [{ id: Ee.id, params: m }]
2648
+ undoMutations: [{ id: Ne.id, params: h }],
2649
+ redoMutations: [{ id: Ne.id, params: m }]
2650
2650
  }), !0) : !1;
2651
2651
  }
2652
- }, Tr = {
2653
- type: I.COMMAND,
2652
+ }, Lr = {
2653
+ type: R.COMMAND,
2654
2654
  id: "sheet.command.set-frozen-cancel",
2655
2655
  handler: async (t) => {
2656
2656
  const e = t.get(_), o = t.get(B), n = t.get(C), r = n.getCurrentUniverSheetInstance().getUnitId(), i = n.getCurrentUniverSheetInstance().getActiveSheet().getSheetId(), s = n.getUniverSheetInstance(r);
@@ -2663,14 +2663,14 @@ const Gn = (t, e) => {
2663
2663
  startColumn: -1,
2664
2664
  ySplit: 0,
2665
2665
  xSplit: 0
2666
- }, d = Gn(t, c);
2667
- return e.syncExecuteCommand(Ee.id, c) ? (o.pushUndoRedo({
2666
+ }, d = qn(t, c);
2667
+ return e.syncExecuteCommand(Ne.id, c) ? (o.pushUndoRedo({
2668
2668
  unitID: r,
2669
- undoMutations: [{ id: Ee.id, params: d }],
2670
- redoMutations: [{ id: Ee.id, params: c }]
2669
+ undoMutations: [{ id: Ne.id, params: d }],
2670
+ redoMutations: [{ id: Ne.id, params: c }]
2671
2671
  }), !0) : !1;
2672
2672
  }
2673
- }, Lr = (t, e) => {
2673
+ }, Vr = (t, e) => {
2674
2674
  if (t.get(C).getUniverSheetInstance(e.unitId) == null)
2675
2675
  throw new Error("universheet is null error!");
2676
2676
  return {
@@ -2680,7 +2680,7 @@ const Gn = (t, e) => {
2680
2680
  };
2681
2681
  }, Ze = {
2682
2682
  id: "sheet.mutation.set-row-visible",
2683
- type: I.MUTATION,
2683
+ type: R.MUTATION,
2684
2684
  handler: (t, e) => {
2685
2685
  const n = t.get(C).getUniverSheetInstance(e.unitId);
2686
2686
  if (n == null)
@@ -2695,7 +2695,7 @@ const Gn = (t, e) => {
2695
2695
  }
2696
2696
  return !0;
2697
2697
  }
2698
- }, Vr = (t, e) => {
2698
+ }, Br = (t, e) => {
2699
2699
  if (t.get(C).getUniverSheetInstance(e.unitId) == null)
2700
2700
  throw new Error("universheet is null error!");
2701
2701
  return {
@@ -2705,7 +2705,7 @@ const Gn = (t, e) => {
2705
2705
  };
2706
2706
  }, Qe = {
2707
2707
  id: "sheet.mutation.set-row-hidden",
2708
- type: I.MUTATION,
2708
+ type: R.MUTATION,
2709
2709
  handler: (t, e) => {
2710
2710
  const n = t.get(C).getUniverSheetInstance(e.unitId);
2711
2711
  if (n == null)
@@ -2720,15 +2720,15 @@ const Gn = (t, e) => {
2720
2720
  }
2721
2721
  return !0;
2722
2722
  }
2723
- }, qn = {
2724
- type: I.COMMAND,
2723
+ }, Kn = {
2724
+ type: R.COMMAND,
2725
2725
  id: "sheet.command.set-specific-rows-visible",
2726
2726
  handler: async (t, e) => {
2727
2727
  const { unitId: o, subUnitId: n, ranges: r } = e, i = t.get(_), s = t.get(B), a = t.get(C).getUniverSheetInstance(o).getSheetBySheetId(n), c = {
2728
2728
  unitId: o,
2729
2729
  subUnitId: n,
2730
2730
  ranges: r
2731
- }, d = Lr(t, c), u = {
2731
+ }, d = Vr(t, c), u = {
2732
2732
  unitId: o,
2733
2733
  subUnitId: n,
2734
2734
  pluginName: se,
@@ -2741,7 +2741,7 @@ const Gn = (t, e) => {
2741
2741
  unitId: o,
2742
2742
  subUnitId: n,
2743
2743
  pluginName: se,
2744
- selections: Kn(r).map((m) => ({
2744
+ selections: Jn(r).map((m) => ({
2745
2745
  range: m,
2746
2746
  primary: he(m, a),
2747
2747
  style: null
@@ -2750,23 +2750,23 @@ const Gn = (t, e) => {
2750
2750
  return K(
2751
2751
  [
2752
2752
  { id: Ze.id, params: c },
2753
- { id: te.id, params: u }
2753
+ { id: ee.id, params: u }
2754
2754
  ],
2755
2755
  i
2756
2756
  ).result && s.pushUndoRedo({
2757
2757
  unitID: o,
2758
2758
  undoMutations: [
2759
2759
  { id: Qe.id, params: d },
2760
- { id: te.id, params: l }
2760
+ { id: ee.id, params: l }
2761
2761
  ],
2762
2762
  redoMutations: [
2763
2763
  { id: Ze.id, params: c },
2764
- { id: te.id, params: u }
2764
+ { id: ee.id, params: u }
2765
2765
  ]
2766
2766
  }), !0;
2767
2767
  }
2768
- }, Br = {
2769
- type: I.COMMAND,
2768
+ }, Wr = {
2769
+ type: R.COMMAND,
2770
2770
  id: "sheet.command.set-selected-rows-visible",
2771
2771
  handler: async (t) => {
2772
2772
  var d;
@@ -2780,14 +2780,14 @@ const Gn = (t, e) => {
2780
2780
  if (!i)
2781
2781
  return !1;
2782
2782
  const s = r.getUnitId(), a = i.getSheetId(), c = n.map((u) => i.getHiddenRows(u.startRow, u.endRow)).flat();
2783
- return t.get(_).executeCommand(qn.id, {
2783
+ return t.get(_).executeCommand(Kn.id, {
2784
2784
  unitId: s,
2785
2785
  subUnitId: a,
2786
2786
  ranges: c
2787
2787
  });
2788
2788
  }
2789
- }, Wr = {
2790
- type: I.COMMAND,
2789
+ }, jr = {
2790
+ type: R.COMMAND,
2791
2791
  id: "sheet.command.set-rows-hidden",
2792
2792
  handler: async (t) => {
2793
2793
  var f;
@@ -2808,7 +2808,7 @@ const Gn = (t, e) => {
2808
2808
  unitId: s,
2809
2809
  subUnitId: a,
2810
2810
  pluginName: se,
2811
- selections: Kn(i).map((v) => ({
2811
+ selections: Jn(i).map((v) => ({
2812
2812
  range: v,
2813
2813
  primary: he(v, d),
2814
2814
  style: null
@@ -2822,28 +2822,28 @@ const Gn = (t, e) => {
2822
2822
  primary: he(v, d),
2823
2823
  style: null
2824
2824
  }))
2825
- }, m = Vr(t, u);
2825
+ }, m = Br(t, u);
2826
2826
  return K(
2827
2827
  [
2828
2828
  { id: Qe.id, params: u },
2829
- { id: te.id, params: l }
2829
+ { id: ee.id, params: l }
2830
2830
  ],
2831
2831
  o
2832
2832
  ).result && n.pushUndoRedo({
2833
2833
  unitID: s,
2834
2834
  undoMutations: [
2835
2835
  { id: Ze.id, params: m },
2836
- { id: te.id, params: g }
2836
+ { id: ee.id, params: g }
2837
2837
  ],
2838
2838
  redoMutations: [
2839
2839
  { id: Qe.id, params: u },
2840
- { id: te.id, params: l }
2840
+ { id: ee.id, params: l }
2841
2841
  ]
2842
2842
  }), !0;
2843
2843
  }
2844
2844
  };
2845
- function Kn(t) {
2846
- return jr(t).map((o) => {
2845
+ function Jn(t) {
2846
+ return Fr(t).map((o) => {
2847
2847
  const n = o.startRow === 0 ? o.endRow + 1 : o.startRow - 1;
2848
2848
  return {
2849
2849
  ...o,
@@ -2852,7 +2852,7 @@ function Kn(t) {
2852
2852
  };
2853
2853
  });
2854
2854
  }
2855
- function jr(t) {
2855
+ function Fr(t) {
2856
2856
  const e = [];
2857
2857
  let o;
2858
2858
  return t.sort((n, r) => n.startRow - r.startRow).forEach((n) => {
@@ -2864,7 +2864,7 @@ function jr(t) {
2864
2864
  }), e.push(o), e;
2865
2865
  }
2866
2866
  const ie = {
2867
- type: I.COMMAND,
2867
+ type: R.COMMAND,
2868
2868
  id: "sheet.command.set-style",
2869
2869
  handler: async (t, e) => {
2870
2870
  const o = t.get(C), {
@@ -2878,28 +2878,28 @@ const ie = {
2878
2878
  const l = o.getUniverSheetInstance(n);
2879
2879
  if ((l == null ? void 0 : l.getSheetBySheetId(r)) == null)
2880
2880
  return !1;
2881
- const m = new ne();
2881
+ const m = new te();
2882
2882
  if (b.isArray(s.value))
2883
2883
  for (let w = 0; w < u.length; w++) {
2884
- const { startRow: y, endRow: A, startColumn: D, endColumn: E } = u[w];
2885
- for (let O = 0; O <= A - y; O++)
2886
- for (let U = 0; U <= E - D; U++)
2887
- m.setValue(O + y, U + D, {
2884
+ const { startRow: y, endRow: P, startColumn: D, endColumn: U } = u[w];
2885
+ for (let k = 0; k <= P - y; k++)
2886
+ for (let E = 0; E <= U - D; E++)
2887
+ m.setValue(k + y, E + D, {
2888
2888
  s: {
2889
- [s.type]: s.value[O][U]
2889
+ [s.type]: s.value[k][E]
2890
2890
  }
2891
2891
  });
2892
2892
  }
2893
2893
  else
2894
2894
  for (let w = 0; w < u.length; w++) {
2895
- const { startRow: y, endRow: A, startColumn: D, endColumn: E } = u[w], O = {
2895
+ const { startRow: y, endRow: P, startColumn: D, endColumn: U } = u[w], k = {
2896
2896
  s: {
2897
2897
  [s.type]: s.value
2898
2898
  }
2899
2899
  };
2900
- for (let U = y; U <= A; U++)
2901
- for (let j = D; j <= E; j++)
2902
- m.setValue(U, j, O);
2900
+ for (let E = y; E <= P; E++)
2901
+ for (let j = D; j <= U; j++)
2902
+ m.setValue(E, j, k);
2903
2903
  }
2904
2904
  const h = {
2905
2905
  subUnitId: r,
@@ -2909,7 +2909,7 @@ const ie = {
2909
2909
  t,
2910
2910
  h
2911
2911
  ), v = a.syncExecuteCommand(
2912
- ee.id,
2912
+ Q.id,
2913
2913
  h
2914
2914
  ), { undos: S, redos: M } = t.get($).onCommandExecute({
2915
2915
  id: ie.id,
@@ -2917,12 +2917,12 @@ const ie = {
2917
2917
  }), p = K([...M], a);
2918
2918
  return v && p.result ? (c.pushUndoRedo({
2919
2919
  unitID: n,
2920
- undoMutations: [{ id: ee.id, params: f }, ...S],
2921
- redoMutations: [{ id: ee.id, params: h }, ...M]
2920
+ undoMutations: [{ id: Q.id, params: f }, ...S],
2921
+ redoMutations: [{ id: Q.id, params: h }, ...M]
2922
2922
  }), !0) : !1;
2923
2923
  }
2924
- }, mi = {
2925
- type: I.COMMAND,
2924
+ }, vi = {
2925
+ type: R.COMMAND,
2926
2926
  id: "sheet.command.set-bold",
2927
2927
  handler: async (t) => {
2928
2928
  const e = t.get(x).getLast();
@@ -2931,13 +2931,13 @@ const ie = {
2931
2931
  const o = t.get(C).getCurrentUniverSheetInstance().getActiveSheet(), { actualRow: n, actualColumn: r } = e.primary, s = {
2932
2932
  style: {
2933
2933
  type: "bl",
2934
- value: o.getRange(n, r).getFontWeight() === Ro.BOLD ? Y.FALSE : Y.TRUE
2934
+ value: o.getRange(n, r).getFontWeight() === po.BOLD ? Y.FALSE : Y.TRUE
2935
2935
  }
2936
2936
  };
2937
2937
  return t.get(_).executeCommand(ie.id, s);
2938
2938
  }
2939
- }, fi = {
2940
- type: I.COMMAND,
2939
+ }, Ci = {
2940
+ type: R.COMMAND,
2941
2941
  id: "sheet.command.set-italic",
2942
2942
  handler: async (t) => {
2943
2943
  const e = t.get(x).getLast();
@@ -2947,7 +2947,7 @@ const ie = {
2947
2947
  let n = !0;
2948
2948
  if (e.primary) {
2949
2949
  const { startRow: i, startColumn: s } = e.primary;
2950
- n = o.getRange(i, s).getFontStyle() === po.ITALIC;
2950
+ n = o.getRange(i, s).getFontStyle() === wo.ITALIC;
2951
2951
  }
2952
2952
  const r = {
2953
2953
  style: {
@@ -2957,8 +2957,8 @@ const ie = {
2957
2957
  };
2958
2958
  return t.get(_).executeCommand(ie.id, r);
2959
2959
  }
2960
- }, vi = {
2961
- type: I.COMMAND,
2960
+ }, Si = {
2961
+ type: R.COMMAND,
2962
2962
  id: "sheet.command.set-underline",
2963
2963
  handler: async (t) => {
2964
2964
  const e = t.get(x).getLast();
@@ -2977,8 +2977,8 @@ const ie = {
2977
2977
  };
2978
2978
  return t.get(_).executeCommand(ie.id, r);
2979
2979
  }
2980
- }, Ci = {
2981
- type: I.COMMAND,
2980
+ }, Ri = {
2981
+ type: R.COMMAND,
2982
2982
  id: "sheet.command.set-stroke",
2983
2983
  handler: async (t) => {
2984
2984
  const e = t.get(x).getLast();
@@ -2996,9 +2996,9 @@ const ie = {
2996
2996
  return t.get(_).executeCommand(ie.id, r);
2997
2997
  }
2998
2998
  };
2999
- I.COMMAND;
3000
- const Si = {
3001
- type: I.COMMAND,
2999
+ R.COMMAND;
3000
+ const Ii = {
3001
+ type: R.COMMAND,
3002
3002
  id: "sheet.command.set-font-family",
3003
3003
  handler: async (t, e) => {
3004
3004
  if (!e)
@@ -3011,8 +3011,8 @@ const Si = {
3011
3011
  };
3012
3012
  return o.executeCommand(ie.id, n);
3013
3013
  }
3014
- }, Ii = {
3015
- type: I.COMMAND,
3014
+ }, pi = {
3015
+ type: R.COMMAND,
3016
3016
  id: "sheet.command.set-font-size",
3017
3017
  handler: async (t, e) => {
3018
3018
  if (!e)
@@ -3025,8 +3025,8 @@ const Si = {
3025
3025
  };
3026
3026
  return o.executeCommand(ie.id, n);
3027
3027
  }
3028
- }, Fr = {
3029
- type: I.COMMAND,
3028
+ }, $r = {
3029
+ type: R.COMMAND,
3030
3030
  id: "sheet.command.set-text-color",
3031
3031
  handler: async (t, e) => {
3032
3032
  if (!e || !e.value)
@@ -3041,8 +3041,8 @@ const Si = {
3041
3041
  };
3042
3042
  return o.executeCommand(ie.id, n);
3043
3043
  }
3044
- }, $r = {
3045
- type: I.COMMAND,
3044
+ }, Hr = {
3045
+ type: R.COMMAND,
3046
3046
  id: "sheet.command.reset-text-color",
3047
3047
  handler: async (t) => {
3048
3048
  const e = t.get(_), o = {
@@ -3056,8 +3056,8 @@ const Si = {
3056
3056
  };
3057
3057
  return e.executeCommand(ie.id, o);
3058
3058
  }
3059
- }, Hr = {
3060
- type: I.COMMAND,
3059
+ }, zr = {
3060
+ type: R.COMMAND,
3061
3061
  id: "sheet.command.set-background-color",
3062
3062
  handler: async (t, e) => {
3063
3063
  if (!e || !e.value)
@@ -3072,8 +3072,8 @@ const Si = {
3072
3072
  };
3073
3073
  return o.executeCommand(ie.id, n);
3074
3074
  }
3075
- }, zr = {
3076
- type: I.COMMAND,
3075
+ }, Gr = {
3076
+ type: R.COMMAND,
3077
3077
  id: "sheet.command.reset-background-color",
3078
3078
  handler: async (t) => {
3079
3079
  const e = t.get(_), o = {
@@ -3087,8 +3087,8 @@ const Si = {
3087
3087
  };
3088
3088
  return e.executeCommand(ie.id, o);
3089
3089
  }
3090
- }, Gr = {
3091
- type: I.COMMAND,
3090
+ }, qr = {
3091
+ type: R.COMMAND,
3092
3092
  id: "sheet.command.set-vertical-text-align",
3093
3093
  handler: async (t, e) => {
3094
3094
  if (!e)
@@ -3101,8 +3101,8 @@ const Si = {
3101
3101
  };
3102
3102
  return o.executeCommand(ie.id, n);
3103
3103
  }
3104
- }, qr = {
3105
- type: I.COMMAND,
3104
+ }, Kr = {
3105
+ type: R.COMMAND,
3106
3106
  id: "sheet.command.set-horizontal-text-align",
3107
3107
  handler: async (t, e) => {
3108
3108
  if (!e)
@@ -3115,8 +3115,8 @@ const Si = {
3115
3115
  };
3116
3116
  return o.executeCommand(ie.id, n);
3117
3117
  }
3118
- }, Kr = {
3119
- type: I.COMMAND,
3118
+ }, Jr = {
3119
+ type: R.COMMAND,
3120
3120
  id: "sheet.command.set-text-wrap",
3121
3121
  handler: async (t, e) => {
3122
3122
  if (!e)
@@ -3129,8 +3129,8 @@ const Si = {
3129
3129
  };
3130
3130
  return o.executeCommand(ie.id, n);
3131
3131
  }
3132
- }, Jr = {
3133
- type: I.COMMAND,
3132
+ }, Xr = {
3133
+ type: R.COMMAND,
3134
3134
  id: "sheet.command.set-text-rotation",
3135
3135
  handler: async (t, e) => {
3136
3136
  if (!e)
@@ -3143,7 +3143,7 @@ const Si = {
3143
3143
  };
3144
3144
  return n.executeCommand(ie.id, r);
3145
3145
  }
3146
- }, Xr = (t, e) => {
3146
+ }, Yr = (t, e) => {
3147
3147
  const i = t.get(C).getUniverSheetInstance(e.unitId).getSheetBySheetId(e.subUnitId).getConfig().tabColor;
3148
3148
  return {
3149
3149
  ...b.deepClone(e),
@@ -3151,7 +3151,7 @@ const Si = {
3151
3151
  };
3152
3152
  }, ut = {
3153
3153
  id: "sheet.mutation.set-tab-color",
3154
- type: I.MUTATION,
3154
+ type: R.MUTATION,
3155
3155
  handler: (t, e) => {
3156
3156
  const o = t.get(C).getUniverSheetInstance(e.unitId);
3157
3157
  if (!o)
@@ -3159,8 +3159,8 @@ const Si = {
3159
3159
  const n = o.getSheetBySheetId(e.subUnitId);
3160
3160
  return n ? (n.getConfig().tabColor = e.color, !0) : !1;
3161
3161
  }
3162
- }, Yr = {
3163
- type: I.COMMAND,
3162
+ }, Zr = {
3163
+ type: R.COMMAND,
3164
3164
  id: "sheet.command.set-tab-color",
3165
3165
  handler: async (t, e) => {
3166
3166
  const o = t.get(_), n = t.get(B), r = t.get(C), i = r.getCurrentUniverSheetInstance().getUnitId(), s = r.getCurrentUniverSheetInstance().getActiveSheet().getSheetId(), a = r.getUniverSheetInstance(i);
@@ -3170,7 +3170,7 @@ const Si = {
3170
3170
  color: e.value,
3171
3171
  unitId: i,
3172
3172
  subUnitId: s
3173
- }, u = Xr(t, d);
3173
+ }, u = Yr(t, d);
3174
3174
  return o.syncExecuteCommand(ut.id, d) ? (n.pushUndoRedo({
3175
3175
  unitID: i,
3176
3176
  undoMutations: [{ id: ut.id, params: u }],
@@ -3179,7 +3179,7 @@ const Si = {
3179
3179
  }
3180
3180
  }, _t = {
3181
3181
  id: "sheet.operation.set-worksheet-active",
3182
- type: I.OPERATION,
3182
+ type: R.OPERATION,
3183
3183
  handler: (t, e) => {
3184
3184
  const o = t.get(C).getUniverSheetInstance(e.unitId);
3185
3185
  if (!o)
@@ -3190,8 +3190,8 @@ const Si = {
3190
3190
  return o.setActiveSheet(r), !0;
3191
3191
  return !1;
3192
3192
  }
3193
- }, Zr = 4, Jn = {
3194
- type: I.COMMAND,
3193
+ }, Qr = 4, Xn = {
3194
+ type: R.COMMAND,
3195
3195
  id: "sheet.command.set-worksheet-activate",
3196
3196
  handler: (t, e, o) => {
3197
3197
  var a, c;
@@ -3204,10 +3204,10 @@ const Si = {
3204
3204
  subUnitId: s
3205
3205
  }, o);
3206
3206
  d(u);
3207
- }, Zr);
3207
+ }, Qr);
3208
3208
  });
3209
3209
  }
3210
- }, Xn = (t, e) => {
3210
+ }, Yn = (t, e) => {
3211
3211
  const n = t.get(C).getUniverSheetInstance(e.unitId);
3212
3212
  if (n == null)
3213
3213
  throw new Error("universheet is null error!");
@@ -3230,7 +3230,7 @@ const Si = {
3230
3230
  };
3231
3231
  }, be = {
3232
3232
  id: "sheet.mutation.set-worksheet-col-width",
3233
- type: I.MUTATION,
3233
+ type: R.MUTATION,
3234
3234
  handler: (t, e) => {
3235
3235
  var c;
3236
3236
  const n = t.get(C).getUniverSheetInstance(e.unitId);
@@ -3249,33 +3249,33 @@ const Si = {
3249
3249
  }
3250
3250
  return !0;
3251
3251
  }
3252
- }, Yn = {
3253
- type: I.COMMAND,
3252
+ }, Zn = {
3253
+ type: R.COMMAND,
3254
3254
  id: "sheet.command.delta-column-width",
3255
3255
  handler: async (t, e) => {
3256
3256
  const n = t.get(x).getSelections();
3257
3257
  if (!(n != null && n.length))
3258
3258
  return !1;
3259
- const r = t.get(_), i = t.get(B), a = t.get(C).getCurrentUniverSheetInstance(), c = a.getActiveSheet(), d = a.getUnitId(), u = c.getSheetId(), { anchorCol: l, deltaX: g } = e, h = c.getColumnWidth(l) + g, f = n.length === 1 && n[0].range.rangeType === q.ALL, v = n.filter((E) => E.range.rangeType === q.COLUMN), S = f ? q.ALL : v.some(({ range: E }) => {
3260
- const { startColumn: O, endColumn: U } = E;
3261
- return O <= l && l <= U;
3259
+ const r = t.get(_), i = t.get(B), a = t.get(C).getCurrentUniverSheetInstance(), c = a.getActiveSheet(), d = a.getUnitId(), u = c.getSheetId(), { anchorCol: l, deltaX: g } = e, h = c.getColumnWidth(l) + g, f = n.length === 1 && n[0].range.rangeType === q.ALL, v = n.filter((U) => U.range.rangeType === q.COLUMN), S = f ? q.ALL : v.some(({ range: U }) => {
3260
+ const { startColumn: k, endColumn: E } = U;
3261
+ return k <= l && l <= E;
3262
3262
  }) ? q.COLUMN : q.NORMAL;
3263
3263
  let M;
3264
3264
  if (S === q.ALL) {
3265
- const E = c.getRowCount(), O = new Array(c.getColumnCount()).fill(void 0).map(
3266
- (U, j) => ({ startRow: 0, endRow: E - 1, startColumn: j, endColumn: j })
3265
+ const U = c.getRowCount(), k = new Array(c.getColumnCount()).fill(void 0).map(
3266
+ (E, j) => ({ startRow: 0, endRow: U - 1, startColumn: j, endColumn: j })
3267
3267
  );
3268
3268
  M = {
3269
3269
  subUnitId: u,
3270
3270
  unitId: d,
3271
3271
  colWidth: h,
3272
- ranges: O
3272
+ ranges: k
3273
3273
  };
3274
3274
  } else
3275
3275
  S === q.COLUMN ? M = {
3276
3276
  subUnitId: u,
3277
3277
  unitId: d,
3278
- ranges: v.map((E) => N.clone(E.range)),
3278
+ ranges: v.map((U) => N.clone(U.range)),
3279
3279
  colWidth: h
3280
3280
  } : M = {
3281
3281
  subUnitId: u,
@@ -3290,24 +3290,24 @@ const Si = {
3290
3290
  }
3291
3291
  ]
3292
3292
  };
3293
- const p = Xn(
3293
+ const p = Yn(
3294
3294
  t,
3295
3295
  M
3296
3296
  ), w = r.syncExecuteCommand(
3297
3297
  be.id,
3298
3298
  M
3299
- ), { undos: y, redos: A } = t.get($).onCommandExecute({
3300
- id: Yn.id,
3299
+ ), { undos: y, redos: P } = t.get($).onCommandExecute({
3300
+ id: Zn.id,
3301
3301
  params: M
3302
- }), D = K([...A], r);
3302
+ }), D = K([...P], r);
3303
3303
  return w && D.result && i.pushUndoRedo({
3304
3304
  unitID: d,
3305
3305
  undoMutations: [{ id: be.id, params: p }, ...y],
3306
- redoMutations: [{ id: be.id, params: M }, ...A]
3306
+ redoMutations: [{ id: be.id, params: M }, ...P]
3307
3307
  }), !0;
3308
3308
  }
3309
- }, Zn = {
3310
- type: I.COMMAND,
3309
+ }, Qn = {
3310
+ type: R.COMMAND,
3311
3311
  id: "sheet.command.set-worksheet-col-width",
3312
3312
  handler: async (t, e) => {
3313
3313
  const o = t.get(x), n = t.get(_), r = t.get(B), i = t.get(C), s = o.getSelectionRanges();
@@ -3318,14 +3318,14 @@ const Si = {
3318
3318
  unitId: a,
3319
3319
  ranges: s,
3320
3320
  colWidth: e.value
3321
- }, u = Xn(
3321
+ }, u = Yn(
3322
3322
  t,
3323
3323
  d
3324
3324
  ), l = n.syncExecuteCommand(
3325
3325
  be.id,
3326
3326
  d
3327
3327
  ), { undos: g, redos: m } = t.get($).onCommandExecute({
3328
- id: Zn.id,
3328
+ id: Qn.id,
3329
3329
  params: d
3330
3330
  }), h = K([...m], n);
3331
3331
  return l && h.result ? (r.pushUndoRedo({
@@ -3334,7 +3334,7 @@ const Si = {
3334
3334
  redoMutations: [{ id: be.id, params: d }, ...m]
3335
3335
  }), !0) : !1;
3336
3336
  }
3337
- }, Qn = (t, e) => {
3337
+ }, eo = (t, e) => {
3338
3338
  const n = t.get(C).getCurrentUniverSheetInstance().getSheetBySheetId(e.subUnitId);
3339
3339
  if (n == null)
3340
3340
  throw new Error("worksheet is null error!");
@@ -3343,9 +3343,9 @@ const Si = {
3343
3343
  unitId: e.unitId,
3344
3344
  subUnitId: n.getSheetId()
3345
3345
  };
3346
- }, Ne = {
3346
+ }, Ee = {
3347
3347
  id: "sheet.mutation.set-worksheet-hidden",
3348
- type: I.MUTATION,
3348
+ type: R.MUTATION,
3349
3349
  handler: (t, e) => {
3350
3350
  const o = t.get(C).getUniverSheetInstance(e.unitId);
3351
3351
  if (o == null)
@@ -3353,8 +3353,8 @@ const Si = {
3353
3353
  const n = o.getSheetBySheetId(e.subUnitId);
3354
3354
  return n ? (n.getConfig().hidden = e.hidden, !0) : !1;
3355
3355
  }
3356
- }, Qr = {
3357
- type: I.COMMAND,
3356
+ }, es = {
3357
+ type: R.COMMAND,
3358
3358
  id: "sheet.command.set-worksheet-hidden",
3359
3359
  handler: async (t, e) => {
3360
3360
  var v;
@@ -3371,14 +3371,14 @@ const Si = {
3371
3371
  unitId: s,
3372
3372
  subUnitId: a,
3373
3373
  hidden: Y.TRUE
3374
- }, g = Qn(t, l);
3375
- return c.getSheets().filter((S) => S.getConfig().hidden === Y.FALSE).length === 1 ? (i.emit("No visible sheet after you hide this."), !1) : o.syncExecuteCommand(Ne.id, l) ? (n.pushUndoRedo({
3374
+ }, g = eo(t, l);
3375
+ return c.getSheets().filter((S) => S.getConfig().hidden === Y.FALSE).length === 1 ? (i.emit("No visible sheet after you hide this."), !1) : o.syncExecuteCommand(Ee.id, l) ? (n.pushUndoRedo({
3376
3376
  unitID: s,
3377
- undoMutations: [{ id: Ne.id, params: g }],
3378
- redoMutations: [{ id: Ne.id, params: l }]
3377
+ undoMutations: [{ id: Ee.id, params: g }],
3378
+ redoMutations: [{ id: Ee.id, params: l }]
3379
3379
  }), !0) : !1;
3380
3380
  }
3381
- }, es = (t, e) => {
3381
+ }, ts = (t, e) => {
3382
3382
  const n = t.get(C).getCurrentUniverSheetInstance().getSheetBySheetId(e.subUnitId);
3383
3383
  if (n == null)
3384
3384
  throw new Error("worksheet is null error!");
@@ -3389,7 +3389,7 @@ const Si = {
3389
3389
  };
3390
3390
  }, xt = {
3391
3391
  id: "sheet.mutation.set-worksheet-name",
3392
- type: I.MUTATION,
3392
+ type: R.MUTATION,
3393
3393
  handler: (t, e) => {
3394
3394
  const o = t.get(C).getUniverSheetInstance(e.unitId);
3395
3395
  if (o == null)
@@ -3397,19 +3397,19 @@ const Si = {
3397
3397
  const n = o.getSheetBySheetId(e.subUnitId);
3398
3398
  return n ? (n.getConfig().name = e.name, !0) : !1;
3399
3399
  }
3400
- }, eo = {
3401
- type: I.COMMAND,
3400
+ }, to = {
3401
+ type: R.COMMAND,
3402
3402
  id: "sheet.command.set-worksheet-name",
3403
3403
  handler: async (t, e) => {
3404
3404
  const o = t.get(_), n = t.get(B), r = t.get(C), i = t.get($), s = e.unitId || r.getCurrentUniverSheetInstance().getUnitId(), c = {
3405
3405
  subUnitId: e.subUnitId || r.getCurrentUniverSheetInstance().getActiveSheet().getSheetId(),
3406
3406
  name: e.name,
3407
3407
  unitId: s
3408
- }, d = es(
3408
+ }, d = ts(
3409
3409
  t,
3410
3410
  c
3411
3411
  ), u = i.onCommandExecute({
3412
- id: eo.id,
3412
+ id: to.id,
3413
3413
  params: e
3414
3414
  }), l = [{ id: xt.id, params: c }, ...u.redos], g = [...u.undos, { id: xt.id, params: d }];
3415
3415
  return await K(l, o).result ? (n.pushUndoRedo({
@@ -3418,41 +3418,40 @@ const Si = {
3418
3418
  redoMutations: l
3419
3419
  }), !0) : !1;
3420
3420
  }
3421
- }, ts = (t, e) => {
3422
- const r = t.get(C).getUniverSheetInstance(e.unitId).getConfig().sheetOrder.findIndex((i) => i === e.subUnitId);
3423
- return {
3424
- ...b.deepClone(e),
3425
- order: r
3426
- };
3427
- }, lt = {
3421
+ }, ns = (t, e) => ({
3422
+ ...b.deepClone(e),
3423
+ toOrder: e.fromOrder,
3424
+ fromOrder: e.toOrder
3425
+ }), lt = {
3428
3426
  id: "sheet.mutation.set-worksheet-order",
3429
- type: I.MUTATION,
3427
+ type: R.MUTATION,
3430
3428
  handler: (t, e) => {
3431
3429
  const o = t.get(C).getUniverSheetInstance(e.unitId);
3432
3430
  if (!o)
3433
3431
  return !1;
3434
- const n = o.getConfig(), r = n.sheetOrder.filter((i) => i !== e.subUnitId);
3435
- return r.splice(e.order, 0, e.subUnitId), n.sheetOrder = r, !0;
3432
+ const n = o.getConfig();
3433
+ return n.sheetOrder.splice(e.fromOrder, 1), n.sheetOrder.splice(e.toOrder, 0, e.subUnitId), !0;
3436
3434
  }
3437
- }, ns = {
3438
- type: I.COMMAND,
3435
+ }, os = {
3436
+ type: R.COMMAND,
3439
3437
  id: "sheet.command.set-worksheet-order",
3440
3438
  handler: async (t, e) => {
3441
3439
  const o = t.get(_), n = t.get(B), r = t.get(C), i = e.unitId || r.getCurrentUniverSheetInstance().getUnitId(), s = e.subUnitId || r.getCurrentUniverSheetInstance().getActiveSheet().getSheetId(), a = r.getUniverSheetInstance(i);
3442
3440
  if (!a || !a.getSheetBySheetId(s))
3443
3441
  return !1;
3444
- const d = {
3445
- order: e.order,
3442
+ const u = {
3443
+ fromOrder: a.getConfig().sheetOrder.indexOf(s),
3444
+ toOrder: e.order,
3446
3445
  unitId: i,
3447
3446
  subUnitId: s
3448
- }, u = ts(t, d);
3449
- return o.syncExecuteCommand(lt.id, d) ? (n.pushUndoRedo({
3447
+ }, l = ns(t, u);
3448
+ return o.syncExecuteCommand(lt.id, u) ? (n.pushUndoRedo({
3450
3449
  unitID: i,
3451
- undoMutations: [{ id: lt.id, params: u }],
3452
- redoMutations: [{ id: lt.id, params: d }]
3450
+ undoMutations: [{ id: lt.id, params: l }],
3451
+ redoMutations: [{ id: lt.id, params: u }]
3453
3452
  }), !0) : !1;
3454
3453
  }
3455
- }, os = 2e3, to = (t, e) => {
3454
+ }, rs = 2e3, no = (t, e) => {
3456
3455
  const { unitId: o, subUnitId: n, ranges: r } = e, s = t.get(C).getUniverSheetInstance(o), a = s == null ? void 0 : s.getSheetBySheetId(n);
3457
3456
  if (a == null)
3458
3457
  throw new Error("worksheet is null error!");
@@ -3481,7 +3480,7 @@ const Si = {
3481
3480
  ranges: r,
3482
3481
  autoHeightInfo: c
3483
3482
  };
3484
- }, Ri = (t, e) => {
3483
+ }, wi = (t, e) => {
3485
3484
  const { unitId: o, subUnitId: n, rowsAutoHeightInfo: r } = e, s = t.get(C).getUniverSheetInstance(o), a = s == null ? void 0 : s.getSheetBySheetId(n), c = [], d = a.getRowManager();
3486
3485
  for (const u of r) {
3487
3486
  const { row: l } = u, { ah: g } = d.getRowOrCreate(l);
@@ -3497,7 +3496,7 @@ const Si = {
3497
3496
  };
3498
3497
  }, Ue = {
3499
3498
  id: "sheet.mutation.set-worksheet-row-height",
3500
- type: I.MUTATION,
3499
+ type: R.MUTATION,
3501
3500
  handler: (t, e) => {
3502
3501
  var l;
3503
3502
  const { unitId: o, subUnitId: n, ranges: r, rowHeight: i } = e, a = t.get(C).getUniverSheetInstance(o), c = a == null ? void 0 : a.getSheetBySheetId(n);
@@ -3507,13 +3506,13 @@ const Si = {
3507
3506
  for (const { startRow: g, endRow: m } of r)
3508
3507
  for (let h = g; h <= m; h++) {
3509
3508
  const f = u.getRowOrCreate(h);
3510
- typeof i == "number" ? f.h = i : f.h = (l = i[h]) != null ? l : d, f.h = Math.min(os, f.h);
3509
+ typeof i == "number" ? f.h = i : f.h = (l = i[h]) != null ? l : d, f.h = Math.min(rs, f.h);
3511
3510
  }
3512
3511
  return !0;
3513
3512
  }
3514
- }, Re = {
3513
+ }, Ie = {
3515
3514
  id: "sheet.mutation.set-worksheet-row-is-auto-height",
3516
- type: I.MUTATION,
3515
+ type: R.MUTATION,
3517
3516
  handler: (t, e) => {
3518
3517
  var l;
3519
3518
  const { unitId: o, subUnitId: n, ranges: r, autoHeightInfo: i } = e, a = t.get(C).getUniverSheetInstance(o), c = a == null ? void 0 : a.getSheetBySheetId(n);
@@ -3527,9 +3526,9 @@ const Si = {
3527
3526
  }
3528
3527
  return !0;
3529
3528
  }
3530
- }, no = {
3529
+ }, oo = {
3531
3530
  id: "sheet.mutation.set-worksheet-row-auto-height",
3532
- type: I.MUTATION,
3531
+ type: R.MUTATION,
3533
3532
  handler: (t, e) => {
3534
3533
  const { unitId: o, subUnitId: n, rowsAutoHeightInfo: r } = e, s = t.get(C).getUniverSheetInstance(o), a = s == null ? void 0 : s.getSheetBySheetId(n);
3535
3534
  if (!a || !s)
@@ -3541,27 +3540,27 @@ const Si = {
3541
3540
  }
3542
3541
  return !0;
3543
3542
  }
3544
- }, rs = {
3545
- type: I.COMMAND,
3543
+ }, ss = {
3544
+ type: R.COMMAND,
3546
3545
  id: "sheet.command.delta-row-height",
3547
3546
  handler: async (t, e) => {
3548
3547
  const n = t.get(x).getSelections();
3549
3548
  if (!(n != null && n.length))
3550
3549
  return !1;
3551
3550
  const i = t.get(C).getCurrentUniverSheetInstance(), s = i.getActiveSheet(), a = i.getUnitId(), c = s.getSheetId(), { anchorRow: d, deltaY: u } = e, g = s.getRowHeight(d) + u, m = n.length === 1 && n[0].range.rangeType === q.ALL, h = n.filter((D) => D.range.rangeType === q.ROW), f = m ? q.ALL : h.some(({ range: D }) => {
3552
- const { startRow: E, endRow: O } = D;
3553
- return E <= d && d <= O;
3551
+ const { startRow: U, endRow: k } = D;
3552
+ return U <= d && d <= k;
3554
3553
  }) ? q.ROW : q.NORMAL;
3555
3554
  let v;
3556
3555
  if (f === q.ALL) {
3557
- const D = s.getRowCount(), E = new Array(s.getColumnCount()).fill(void 0).map(
3558
- (O, U) => ({ startRow: U, endRow: U, startColumn: 0, endColumn: D - 1 })
3556
+ const D = s.getRowCount(), U = new Array(s.getColumnCount()).fill(void 0).map(
3557
+ (k, E) => ({ startRow: E, endRow: E, startColumn: 0, endColumn: D - 1 })
3559
3558
  );
3560
3559
  v = {
3561
3560
  subUnitId: c,
3562
3561
  unitId: a,
3563
3562
  rowHeight: g,
3564
- ranges: E
3563
+ ranges: U
3565
3564
  };
3566
3565
  } else
3567
3566
  f === q.ROW ? v = {
@@ -3582,7 +3581,7 @@ const Si = {
3582
3581
  }
3583
3582
  ]
3584
3583
  };
3585
- const S = to(
3584
+ const S = no(
3586
3585
  t,
3587
3586
  v
3588
3587
  ), M = {
@@ -3598,7 +3597,7 @@ const Si = {
3598
3597
  params: v
3599
3598
  },
3600
3599
  {
3601
- id: Re.id,
3600
+ id: Ie.id,
3602
3601
  params: M
3603
3602
  }
3604
3603
  ],
@@ -3611,7 +3610,7 @@ const Si = {
3611
3610
  params: S
3612
3611
  },
3613
3612
  {
3614
- id: Re.id,
3613
+ id: Ie.id,
3615
3614
  params: p
3616
3615
  }
3617
3616
  ],
@@ -3621,14 +3620,14 @@ const Si = {
3621
3620
  params: v
3622
3621
  },
3623
3622
  {
3624
- id: Re.id,
3623
+ id: Ie.id,
3625
3624
  params: M
3626
3625
  }
3627
3626
  ]
3628
3627
  }), !0) : !1;
3629
3628
  }
3630
- }, ss = {
3631
- type: I.COMMAND,
3629
+ }, is = {
3630
+ type: R.COMMAND,
3632
3631
  id: "sheet.command.set-row-height",
3633
3632
  handler: (t, e) => {
3634
3633
  const o = t.get(x), n = t.get(_), r = t.get(B), i = t.get(C), s = o.getSelectionRanges();
@@ -3639,7 +3638,7 @@ const Si = {
3639
3638
  unitId: c,
3640
3639
  ranges: s,
3641
3640
  rowHeight: e.value
3642
- }, l = to(
3641
+ }, l = no(
3643
3642
  t,
3644
3643
  u
3645
3644
  ), g = {
@@ -3655,7 +3654,7 @@ const Si = {
3655
3654
  params: u
3656
3655
  },
3657
3656
  {
3658
- id: Re.id,
3657
+ id: Ie.id,
3659
3658
  params: g
3660
3659
  }
3661
3660
  ],
@@ -3668,7 +3667,7 @@ const Si = {
3668
3667
  params: l
3669
3668
  },
3670
3669
  {
3671
- id: Re.id,
3670
+ id: Ie.id,
3672
3671
  params: m
3673
3672
  }
3674
3673
  ],
@@ -3678,14 +3677,14 @@ const Si = {
3678
3677
  params: u
3679
3678
  },
3680
3679
  {
3681
- id: Re.id,
3680
+ id: Ie.id,
3682
3681
  params: g
3683
3682
  }
3684
3683
  ]
3685
3684
  }), !0) : !1;
3686
3685
  }
3687
- }, oo = {
3688
- type: I.COMMAND,
3686
+ }, ro = {
3687
+ type: R.COMMAND,
3689
3688
  id: "sheet.command.set-row-is-auto-height",
3690
3689
  handler: async (t, e) => {
3691
3690
  const o = t.get(_), n = t.get(B), r = t.get(x), i = t.get(C), s = i.getCurrentUniverSheetInstance().getUnitId(), a = i.getCurrentUniverSheetInstance().getActiveSheet(), c = a.getSheetId(), { anchorRow: d } = e != null ? e : {}, u = d != null ? [
@@ -3705,20 +3704,20 @@ const Si = {
3705
3704
  autoHeightInfo: Y.TRUE
3706
3705
  // Hard code first, maybe it will change by the menu item in the future.
3707
3706
  }, g = Xt(t, l), m = o.syncExecuteCommand(
3708
- Re.id,
3707
+ Ie.id,
3709
3708
  l
3710
3709
  ), { undos: h, redos: f } = t.get($).onCommandExecute({
3711
- id: oo.id,
3710
+ id: ro.id,
3712
3711
  params: l
3713
3712
  }), v = K([...f], o);
3714
3713
  return m && v.result ? (n.pushUndoRedo({
3715
3714
  unitID: s,
3716
- undoMutations: [{ id: Re.id, params: g }, ...h],
3717
- redoMutations: [{ id: Re.id, params: l }, ...f]
3715
+ undoMutations: [{ id: Ie.id, params: g }, ...h],
3716
+ redoMutations: [{ id: Ie.id, params: l }, ...f]
3718
3717
  }), !0) : !1;
3719
3718
  }
3720
- }, is = {
3721
- type: I.COMMAND,
3719
+ }, as = {
3720
+ type: R.COMMAND,
3722
3721
  id: "sheet.command.set-worksheet-show",
3723
3722
  handler: async (t, e) => {
3724
3723
  var f;
@@ -3735,7 +3734,7 @@ const Si = {
3735
3734
  unitId: i,
3736
3735
  subUnitId: s,
3737
3736
  hidden: Y.FALSE
3738
- }, l = Qn(t, u), g = o.syncExecuteCommand(Ne.id, u), m = {
3737
+ }, l = eo(t, u), g = o.syncExecuteCommand(Ee.id, u), m = {
3739
3738
  unitId: i,
3740
3739
  subUnitId: s
3741
3740
  }, h = o.syncExecuteCommand(
@@ -3745,17 +3744,17 @@ const Si = {
3745
3744
  return g && h ? (n.pushUndoRedo({
3746
3745
  unitID: i,
3747
3746
  undoMutations: [
3748
- { id: Ne.id, params: l }
3747
+ { id: Ee.id, params: l }
3749
3748
  // { id: SetWorksheetActiveOperation.id, params: unActiveMutationParams },
3750
3749
  ],
3751
3750
  redoMutations: [
3752
3751
  // { id: SetWorksheetActiveOperation.id, params: activeSheetMutationParams },
3753
- { id: Ne.id, params: u }
3752
+ { id: Ee.id, params: u }
3754
3753
  ]
3755
3754
  }), !0) : !1;
3756
3755
  }
3757
- }, as = (t) => {
3758
- const e = new ne();
3756
+ }, cs = (t) => {
3757
+ const e = new te();
3759
3758
  return t.forEach((o) => {
3760
3759
  ue.foreach(o, (n, r) => {
3761
3760
  e.setValue(n, r, 1);
@@ -3764,7 +3763,7 @@ const Si = {
3764
3763
  const r = e.getValue(o - 1, n);
3765
3764
  r && e.setValue(o, n, r + 1);
3766
3765
  }), e;
3767
- }, cs = (t) => {
3766
+ }, us = (t) => {
3768
3767
  const e = t;
3769
3768
  return e.forValue((o, n) => {
3770
3769
  const r = t.getValue(o - 1, n);
@@ -3794,24 +3793,24 @@ const Si = {
3794
3793
  c.startColumn = d, c.startRow = n - a + 1, o(u, c);
3795
3794
  }
3796
3795
  }), e;
3797
- }, us = (t, e) => (ue.foreach(e, (o, n) => {
3796
+ }, ls = (t, e) => (ue.foreach(e, (o, n) => {
3798
3797
  t.realDeleteValue(o, n);
3799
3798
  let r = o + 1, i = t.getValue(r, n) || 0;
3800
3799
  for (; i > 1; )
3801
3800
  t.setValue(r, n, i - 1), r += 1, i = t.getValue(r, n) || 0;
3802
- }), t), ro = (t) => {
3801
+ }), t), so = (t) => {
3803
3802
  const e = [];
3804
3803
  let o = cn(t);
3805
3804
  for (; o.area > 0; )
3806
- o.range && (e.push(o.range), us(t, o.range)), o = cn(t);
3805
+ o.range && (e.push(o.range), ls(t, o.range)), o = cn(t);
3807
3806
  return e;
3808
- }, so = (t) => {
3809
- const e = as(t);
3810
- return ro(e);
3807
+ }, io = (t) => {
3808
+ const e = cs(t);
3809
+ return so(e);
3811
3810
  };
3812
- class pi {
3811
+ class Mi {
3813
3812
  constructor() {
3814
- F(this, "_matrix", new ne());
3813
+ F(this, "_matrix", new te());
3815
3814
  }
3816
3815
  add(...e) {
3817
3816
  return e.forEach((o) => {
@@ -3828,24 +3827,24 @@ class pi {
3828
3827
  }), this;
3829
3828
  }
3830
3829
  merge() {
3831
- const e = cs(this._matrix);
3832
- return ro(e);
3830
+ const e = us(this._matrix);
3831
+ return so(e);
3833
3832
  }
3834
3833
  }
3835
- const ls = (t, e, o = "") => t.reduce(
3834
+ const ds = (t, e, o = "") => t.reduce(
3836
3835
  (n, r) => {
3837
3836
  const i = r && r[e];
3838
3837
  return typeof i != "string" ? (console.warn(r, `${e} is not string`), n) : (i ? (n[i] || (n[i] = []), n[i].push(r)) : n[o].push(r), n);
3839
3838
  },
3840
3839
  {}
3841
- ), ds = (t = 0) => {
3840
+ ), gs = (t = 0) => {
3842
3841
  let e = t;
3843
3842
  return function() {
3844
3843
  return e++;
3845
3844
  };
3846
3845
  }, ze = Eo("INumfmtService");
3847
- wo(_e.Rendered, ze);
3848
- const wi = (t, e) => {
3846
+ Mo(_e.Rendered, ze);
3847
+ const _i = (t, e) => {
3849
3848
  const o = t.get(ze), { values: n, unitId: r, subUnitId: i } = e, s = [], a = [], c = o.getModel(r, i) || void 0;
3850
3849
  Object.keys(n).forEach((u) => {
3851
3850
  n[u].ranges.forEach((g) => {
@@ -3865,14 +3864,14 @@ const wi = (t, e) => {
3865
3864
  const u = Tt(r, i, s);
3866
3865
  Object.keys(u.values).forEach((l) => {
3867
3866
  const g = u.values[l];
3868
- g.ranges = so(g.ranges);
3867
+ g.ranges = io(g.ranges);
3869
3868
  }), d.push({
3870
3869
  id: Yt.id,
3871
3870
  params: Tt(r, i, s)
3872
3871
  });
3873
3872
  }
3874
3873
  return a.length && d.push({
3875
- id: io.id,
3874
+ id: ao.id,
3876
3875
  params: {
3877
3876
  unitId: r,
3878
3877
  subUnitId: i,
@@ -3881,7 +3880,7 @@ const wi = (t, e) => {
3881
3880
  }), d;
3882
3881
  }, Yt = {
3883
3882
  id: "sheet.mutation.set.numfmt",
3884
- type: I.MUTATION,
3883
+ type: R.MUTATION,
3885
3884
  handler: (t, e) => {
3886
3885
  if (!e)
3887
3886
  return !1;
@@ -3897,16 +3896,16 @@ const wi = (t, e) => {
3897
3896
  );
3898
3897
  return r.setValues(i, s, a), !0;
3899
3898
  }
3900
- }, io = {
3899
+ }, ao = {
3901
3900
  id: "sheet.mutation.remove.numfmt",
3902
- type: I.MUTATION,
3901
+ type: R.MUTATION,
3903
3902
  handler: (t, e) => {
3904
3903
  if (!e)
3905
3904
  return !1;
3906
3905
  const { unitId: o, subUnitId: n, ranges: r } = e;
3907
3906
  return t.get(ze).deleteValues(o, n, r), !0;
3908
3907
  }
3909
- }, Mi = (t, e) => {
3908
+ }, yi = (t, e) => {
3910
3909
  const o = t.get(ze), { ranges: n, unitId: r, subUnitId: i } = e, s = [], a = o.getModel(r, i) || void 0;
3911
3910
  if (n.forEach((d) => {
3912
3911
  ue.foreach(d, (u, l) => {
@@ -3923,27 +3922,22 @@ const wi = (t, e) => {
3923
3922
  const c = Tt(r, i, s);
3924
3923
  return Object.keys(c.values).forEach((d) => {
3925
3924
  const u = c.values[d];
3926
- u.ranges = so(u.ranges);
3925
+ u.ranges = io(u.ranges);
3927
3926
  }), [{ id: Yt.id, params: c }];
3928
3927
  }, Tt = (t, e, o) => {
3929
- const n = ls(o, "pattern"), r = {}, i = {}, s = ds();
3928
+ const n = ds(o, "pattern"), r = {}, i = {}, s = gs();
3930
3929
  return Object.keys(n).forEach((a) => {
3931
3930
  const c = n[a], d = c[0], u = s();
3932
3931
  r[u] = {
3933
3932
  pattern: a,
3934
3933
  type: d.type
3935
3934
  }, c.forEach((l) => {
3936
- i[u] || (i[u] = { ranges: [] }), i[u].ranges.push(gs(l.row, l.col));
3935
+ i[u] || (i[u] = { ranges: [] }), i[u].ranges.push(Cn(l.row, l.col));
3937
3936
  });
3938
3937
  }), { unitId: t, subUnitId: e, refMap: r, values: i };
3939
- }, gs = (t, e) => ({
3940
- startRow: t,
3941
- endRow: t,
3942
- startColumn: e,
3943
- endColumn: e
3944
- }), hs = {
3938
+ }, hs = {
3945
3939
  id: "sheet.mutation.empty",
3946
- type: I.MUTATION,
3940
+ type: R.MUTATION,
3947
3941
  handler: () => !0
3948
3942
  }, ms = "maxCellsPerSheet", fs = 3e6;
3949
3943
  var vs = Object.defineProperty, Cs = Object.getOwnPropertyDescriptor, Ss = (t, e, o, n) => {
@@ -3956,89 +3950,89 @@ let dt = class extends ke {
3956
3950
  super(), this._commandService = t, this._configService = e, [
3957
3951
  z,
3958
3952
  Wt,
3959
- yn,
3953
+ bn,
3960
3954
  jt,
3961
- lr,
3955
+ dr,
3962
3956
  Ht,
3963
3957
  zt,
3964
- Yn,
3965
- rs,
3958
+ Zn,
3959
+ ss,
3960
+ Rr,
3966
3961
  Sr,
3967
- Cr,
3968
3962
  tt,
3969
3963
  We,
3970
3964
  Gt,
3971
3965
  qt,
3966
+ Cr,
3972
3967
  vr,
3973
- fr,
3974
3968
  et,
3975
3969
  Be,
3976
3970
  Ir,
3977
3971
  Le,
3978
- Wn,
3979
- It,
3972
+ jn,
3973
+ Rt,
3980
3974
  Ft,
3981
3975
  Ct,
3982
- Vn,
3976
+ Bn,
3983
3977
  St,
3984
3978
  Jt,
3985
3979
  Fe,
3986
3980
  Kt,
3987
3981
  je,
3988
- $n,
3982
+ Hn,
3989
3983
  wt,
3990
- _r,
3984
+ yr,
3991
3985
  G,
3992
- zr,
3993
- $r,
3986
+ Gr,
3994
3987
  Hr,
3995
- br,
3996
- Or,
3997
- nt,
3988
+ zr,
3998
3989
  Ur,
3990
+ kr,
3991
+ nt,
3999
3992
  Dr,
3993
+ Or,
4000
3994
  Er,
4001
3995
  Xe,
4002
3996
  Ye,
4003
- Zn,
3997
+ Qn,
3998
+ Lr,
4004
3999
  Tr,
4005
- xr,
4006
- Ee,
4007
- qr,
4000
+ Ne,
4001
+ Kr,
4008
4002
  Ve,
4009
- ee,
4010
- ss,
4011
- Wr,
4003
+ Q,
4004
+ is,
4005
+ jr,
4012
4006
  Qe,
4013
4007
  Ze,
4014
- Pr,
4015
- Br,
4016
- Hn,
4017
- qn,
4008
+ Nr,
4009
+ Wr,
4010
+ zn,
4011
+ Kn,
4018
4012
  ie,
4019
- Yr,
4013
+ Zr,
4020
4014
  ut,
4021
- Fr,
4015
+ $r,
4016
+ Xr,
4022
4017
  Jr,
4023
- Kr,
4024
- Gr,
4025
- Jn,
4018
+ qr,
4019
+ Xn,
4026
4020
  _t,
4027
4021
  be,
4028
- Qr,
4029
- Ne,
4030
- eo,
4022
+ es,
4023
+ Ee,
4024
+ to,
4031
4025
  xt,
4032
- ns,
4026
+ os,
4033
4027
  lt,
4034
- no,
4035
- Ue,
4036
4028
  oo,
4037
- Re,
4038
- is,
4029
+ Ue,
4030
+ ro,
4031
+ Ie,
4032
+ as,
4039
4033
  Yt,
4040
- te,
4041
- io,
4034
+ ee,
4035
+ ao,
4042
4036
  hs
4043
4037
  ].forEach((o) => this.disposeWithMe(this._commandService.registerCommand(o))), this._configService.setConfig(ms, fs);
4044
4038
  }
@@ -4046,12 +4040,12 @@ let dt = class extends ke {
4046
4040
  dt = Ss([
4047
4041
  Oe(_e.Starting, dt),
4048
4042
  un(0, _),
4049
- un(1, Mo)
4043
+ un(1, _o)
4050
4044
  ], dt);
4051
- var Is = Object.defineProperty, Rs = Object.getOwnPropertyDescriptor, ps = (t, e, o, n) => {
4052
- for (var r = n > 1 ? void 0 : n ? Rs(e, o) : e, i = t.length - 1, s; i >= 0; i--)
4045
+ var Rs = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, ps = (t, e, o, n) => {
4046
+ for (var r = n > 1 ? void 0 : n ? Is(e, o) : e, i = t.length - 1, s; i >= 0; i--)
4053
4047
  (s = t[i]) && (r = (n ? s(e, o, r) : s(r)) || r);
4054
- return n && r && Is(e, o, r), r;
4048
+ return n && r && Rs(e, o, r), r;
4055
4049
  }, ws = (t, e) => (o, n) => e(o, n, t);
4056
4050
  let gt = class extends ke {
4057
4051
  constructor(t) {
@@ -4063,7 +4057,7 @@ let gt = class extends ke {
4063
4057
  _commandExecutedListener() {
4064
4058
  this.disposeWithMe(
4065
4059
  this._commandService.onCommandExecuted((t) => {
4066
- if (t.id !== xo.id)
4060
+ if (t.id !== To.id)
4067
4061
  return;
4068
4062
  const e = t.params, { unitData: o, unitOtherData: n } = e, r = Object.keys(o), i = [];
4069
4063
  return r.forEach((a) => {
@@ -4080,7 +4074,7 @@ let gt = class extends ke {
4080
4074
  cellValue: l
4081
4075
  };
4082
4076
  i.push({
4083
- id: ee.id,
4077
+ id: Q.id,
4084
4078
  params: g
4085
4079
  });
4086
4080
  });
@@ -4116,7 +4110,7 @@ let ht = class extends ke {
4116
4110
  _initialize() {
4117
4111
  const t = "test", e = "workbook-01", o = "sheet-0011", n = {
4118
4112
  [e]: {
4119
- [o]: new ne({
4113
+ [o]: new te({
4120
4114
  4: {
4121
4115
  0: {
4122
4116
  v: 10,
@@ -4162,33 +4156,33 @@ let ht = class extends ke {
4162
4156
  ht = ys([
4163
4157
  Oe(_e.Ready, ht),
4164
4158
  st(0, _),
4165
- st(1, Lo),
4159
+ st(1, Vo),
4166
4160
  st(2, C),
4167
- st(3, oe(To))
4161
+ st(3, ne(Lo))
4168
4162
  ], ht);
4169
4163
  const X = {
4170
- MoveRangeCommandId: Un,
4171
- InsertRowCommandId: xn,
4172
- InsertColCommandId: Tn,
4173
- RemoveColCommandId: Fn,
4174
- RemoveRowCommandId: jn,
4175
- DeleteRangeMoveLeftCommandId: kn,
4176
- DeleteRangeMoveUpCommandId: An,
4177
- InsertRangeMoveDownCommandId: mr,
4178
- InsertRangeMoveRightCommandId: Nn,
4179
- MoveColsCommandId: Bn,
4180
- MoveRowsCommandId: Ln
4164
+ MoveRangeCommandId: Dn,
4165
+ InsertRowCommandId: Tn,
4166
+ InsertColCommandId: Ln,
4167
+ RemoveColCommandId: $n,
4168
+ RemoveRowCommandId: Fn,
4169
+ DeleteRangeMoveLeftCommandId: An,
4170
+ DeleteRangeMoveUpCommandId: Pn,
4171
+ InsertRangeMoveDownCommandId: fr,
4172
+ InsertRangeMoveRightCommandId: xn,
4173
+ MoveColsCommandId: Wn,
4174
+ MoveRowsCommandId: Vn
4181
4175
  };
4182
4176
  var Z = /* @__PURE__ */ ((t) => (t[t.Set = 0] = "Set", t[t.Delete = 1] = "Delete", t[t.HorizontalMove = 2] = "HorizontalMove", t[t.VerticalMove = 3] = "VerticalMove", t[t.Unknown = 4] = "Unknown", t))(Z || {}), bs = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, Ds = (t, e, o, n) => {
4183
4177
  for (var r = n > 1 ? void 0 : n ? Us(e, o) : e, i = t.length - 1, s; i >= 0; i--)
4184
4178
  (s = t[i]) && (r = (n ? s(e, o, r) : s(r)) || r);
4185
4179
  return n && r && bs(e, o, r), r;
4186
4180
  }, Ot = (t, e) => (o, n) => e(o, n, t);
4187
- const Os = Rt("MERGE_REDO"), ks = Rt("MERGE_UNDO");
4181
+ const Os = It("MERGE_REDO"), ks = It("MERGE_UNDO");
4188
4182
  let Ke = class extends ke {
4189
4183
  constructor(e, o, n) {
4190
4184
  super();
4191
- F(this, "interceptor", new _o({ MERGE_REDO: Os, MERGE_UNDO: ks }));
4185
+ F(this, "interceptor", new yo({ MERGE_REDO: Os, MERGE_UNDO: ks }));
4192
4186
  F(this, "_refRangeManagerMap", /* @__PURE__ */ new Map());
4193
4187
  F(this, "_serializer", As());
4194
4188
  F(this, "_onRefRangeChange", () => {
@@ -4339,9 +4333,9 @@ let Ke = class extends ke {
4339
4333
  };
4340
4334
  Ke = Ds([
4341
4335
  Oe(_e.Steady, Ke),
4342
- Ot(0, oe($)),
4343
- Ot(1, oe(C)),
4344
- Ot(2, oe(x))
4336
+ Ot(0, ne($)),
4337
+ Ot(1, ne(C)),
4338
+ Ot(2, ne(x))
4345
4339
  ], Ke);
4346
4340
  function ln(t) {
4347
4341
  return t.getCurrentUniverSheetInstance().getUnitId();
@@ -4385,7 +4379,7 @@ const it = Number.MAX_SAFE_INTEGER, we = (t) => {
4385
4379
  endRow: t.endColumn,
4386
4380
  startColumn: t.startRow,
4387
4381
  endColumn: t.endRow
4388
- }), ao = (t, e, o) => {
4382
+ }), co = (t, e, o) => {
4389
4383
  const n = { ...o }, r = { ...e }, i = (f, v) => {
4390
4384
  const S = Math.max(f.start, v.start), M = Math.min(f.end, v.end);
4391
4385
  return M < S ? null : { start: S, end: M };
@@ -4424,11 +4418,11 @@ const it = Number.MAX_SAFE_INTEGER, we = (t) => {
4424
4418
  step: n.start - o.start,
4425
4419
  length: s(n) - s(o)
4426
4420
  };
4427
- }, co = (t, e) => {
4421
+ }, uo = (t, e) => {
4428
4422
  const { fromRange: o, toRange: n } = t.params || {};
4429
4423
  if (!n || !o)
4430
4424
  return [];
4431
- const r = we(o), i = we(n), s = we(e), a = ao(
4425
+ const r = we(o), i = we(n), s = we(e), a = co(
4432
4426
  { start: r.startRow, end: r.endRow },
4433
4427
  { start: i.startRow, end: i.endRow },
4434
4428
  { start: s.startRow, end: s.endRow }
@@ -4444,11 +4438,11 @@ const it = Number.MAX_SAFE_INTEGER, we = (t) => {
4444
4438
  length: a.length || 0
4445
4439
  }
4446
4440
  ];
4447
- }, uo = (t, e) => {
4441
+ }, lo = (t, e) => {
4448
4442
  const { fromRange: o, toRange: n } = t.params || {};
4449
4443
  if (!n || !o)
4450
4444
  return [];
4451
- const r = we(o), i = we(n), s = we(e), a = ao(
4445
+ const r = we(o), i = we(n), s = we(e), a = co(
4452
4446
  { start: r.startColumn, end: r.endColumn },
4453
4447
  { start: i.startColumn, end: i.endColumn },
4454
4448
  { start: s.startColumn, end: s.endColumn }
@@ -4510,7 +4504,7 @@ const it = Number.MAX_SAFE_INTEGER, we = (t) => {
4510
4504
  return { step: -r(o), length: 0 };
4511
4505
  }
4512
4506
  return { step: 0, length: 0 };
4513
- }, Es = (t, e) => {
4507
+ }, Ns = (t, e) => {
4514
4508
  var i;
4515
4509
  const o = (i = t.params) == null ? void 0 : i.range;
4516
4510
  if (!o)
@@ -4527,7 +4521,7 @@ const it = Number.MAX_SAFE_INTEGER, we = (t) => {
4527
4521
  });
4528
4522
  }
4529
4523
  return n;
4530
- }, Ns = (t, e) => {
4524
+ }, Es = (t, e) => {
4531
4525
  var i;
4532
4526
  const o = (i = t.params) == null ? void 0 : i.range;
4533
4527
  if (!o)
@@ -4666,7 +4660,7 @@ const it = Number.MAX_SAFE_INTEGER, we = (t) => {
4666
4660
  }
4667
4661
  }
4668
4662
  }), o && (o.endColumn < o.startColumn || o.endRow < o.startRow) ? null : o;
4669
- }, _i = (t, e) => {
4663
+ }, bi = (t, e) => {
4670
4664
  let o = [];
4671
4665
  switch (e.id) {
4672
4666
  case X.DeleteRangeMoveLeftCommandId: {
@@ -4694,7 +4688,7 @@ const it = Number.MAX_SAFE_INTEGER, we = (t) => {
4694
4688
  break;
4695
4689
  }
4696
4690
  case X.MoveColsCommandId: {
4697
- o = uo(e, t);
4691
+ o = lo(e, t);
4698
4692
  break;
4699
4693
  }
4700
4694
  case X.MoveRangeCommandId: {
@@ -4702,15 +4696,15 @@ const it = Number.MAX_SAFE_INTEGER, we = (t) => {
4702
4696
  break;
4703
4697
  }
4704
4698
  case X.MoveRowsCommandId: {
4705
- o = co(e, t);
4699
+ o = uo(e, t);
4706
4700
  break;
4707
4701
  }
4708
4702
  case X.RemoveColCommandId: {
4709
- o = Es(e, t);
4703
+ o = Ns(e, t);
4710
4704
  break;
4711
4705
  }
4712
4706
  case X.RemoveRowCommandId: {
4713
- o = Ns(e, t);
4707
+ o = Es(e, t);
4714
4708
  break;
4715
4709
  }
4716
4710
  }
@@ -4785,7 +4779,7 @@ let mt = class extends ke {
4785
4779
  });
4786
4780
  }
4787
4781
  _onRefRangeChange() {
4788
- const t = new Et(), e = (r, i) => {
4782
+ const t = new Nt(), e = (r, i) => {
4789
4783
  const s = this._univerInstanceService.getUniverSheetInstance(r);
4790
4784
  if (!s)
4791
4785
  return;
@@ -4848,7 +4842,7 @@ let mt = class extends ke {
4848
4842
  };
4849
4843
  this.disposeWithMe(
4850
4844
  this._commandService.onCommandExecuted((r) => {
4851
- if (r.id === Jn.id) {
4845
+ if (r.id === Xn.id) {
4852
4846
  const i = r.params, s = i.subUnitId, a = i.unitId;
4853
4847
  if (!s || !a)
4854
4848
  return;
@@ -4869,12 +4863,12 @@ let mt = class extends ke {
4869
4863
  const n = Se(this._univerInstanceService, e);
4870
4864
  if (!n)
4871
4865
  return this._handleNull();
4872
- const r = Ie(n, o);
4866
+ const r = Re(n, o);
4873
4867
  if (!r)
4874
4868
  return this._handleNull();
4875
4869
  const i = [...r.getMergeData()], s = { unitId: e, subUnitId: o, ranges: i }, a = { unitId: e, subUnitId: o, ranges: [] };
4876
4870
  i.forEach((u) => {
4877
- const l = co({ id: X.MoveRowsCommandId, params: t }, u), g = Lt(l, u);
4871
+ const l = uo({ id: X.MoveRowsCommandId, params: t }, u), g = Lt(l, u);
4878
4872
  g && a.ranges.push(g);
4879
4873
  });
4880
4874
  const c = Ce(this._injector, s), d = pe(this._injector, a);
@@ -4899,12 +4893,12 @@ let mt = class extends ke {
4899
4893
  const n = Se(this._univerInstanceService, e);
4900
4894
  if (!n)
4901
4895
  return this._handleNull();
4902
- const r = Ie(n, o);
4896
+ const r = Re(n, o);
4903
4897
  if (!r)
4904
4898
  return this._handleNull();
4905
4899
  const i = [...r.getMergeData()], s = { unitId: e, subUnitId: o, ranges: i }, a = { unitId: e, subUnitId: o, ranges: [] };
4906
4900
  i.forEach((u) => {
4907
- const l = uo({ id: X.MoveColsCommandId, params: t }, u), g = Lt(l, u);
4901
+ const l = lo({ id: X.MoveColsCommandId, params: t }, u), g = Lt(l, u);
4908
4902
  g && a.ranges.push(g);
4909
4903
  });
4910
4904
  const c = Ce(this._injector, s), d = pe(this._injector, a);
@@ -4929,7 +4923,7 @@ let mt = class extends ke {
4929
4923
  const n = Se(this._univerInstanceService, e);
4930
4924
  if (!n)
4931
4925
  return this._handleNull();
4932
- const r = Ie(n, o);
4926
+ const r = Re(n, o);
4933
4927
  if (!r)
4934
4928
  return this._handleNull();
4935
4929
  const i = r.getMergeData(), s = i.filter((g) => N.intersects(g, t.fromRange)), a = i.filter((g) => N.intersects(g, t.toRange)), c = s.map((g) => N.getRelativeRange(g, t.fromRange)).map((g) => N.getPositionRange(g, t.toRange)), d = Hs(c).filter(
@@ -4991,7 +4985,7 @@ let mt = class extends ke {
4991
4985
  const n = Se(this._univerInstanceService, e);
4992
4986
  if (!n)
4993
4987
  return this._handleNull();
4994
- const r = Ie(n, o);
4988
+ const r = Re(n, o);
4995
4989
  if (!r)
4996
4990
  return this._handleNull();
4997
4991
  const { range: i } = t, { startRow: s, endRow: a } = i, c = b.deepClone(r.getMergeData()), d = b.deepClone(r.getMergeData()).map((v) => {
@@ -5024,7 +5018,7 @@ let mt = class extends ke {
5024
5018
  const { range: n } = t, r = Se(this._univerInstanceService, e);
5025
5019
  if (!r)
5026
5020
  return this._handleNull();
5027
- const i = Ie(r, o);
5021
+ const i = Re(r, o);
5028
5022
  if (!i)
5029
5023
  return this._handleNull();
5030
5024
  const { startColumn: s, endColumn: a } = n, c = b.deepClone(i.getMergeData()), d = b.deepClone(i.getMergeData()).map((v) => {
@@ -5057,7 +5051,7 @@ let mt = class extends ke {
5057
5051
  const n = Se(this._univerInstanceService, e);
5058
5052
  if (!n)
5059
5053
  return this._handleNull();
5060
- const r = Ie(n, o);
5054
+ const r = Re(n, o);
5061
5055
  if (!r)
5062
5056
  return this._handleNull();
5063
5057
  const { range: i } = t, s = b.deepClone(r.getMergeData());
@@ -5071,8 +5065,8 @@ let mt = class extends ke {
5071
5065
  if (M <= h.startColumn && p >= h.endColumn)
5072
5066
  s.splice(m, 1), m--;
5073
5067
  else {
5074
- const y = N.getIntersects(i, h), A = y.endColumn - y.startColumn + 1, D = y.endRow - y.startRow === 0;
5075
- A === S - 1 && D ? (s.splice(m, 1), m--) : h.endColumn -= y.endColumn - y.startColumn + 1;
5068
+ const y = N.getIntersects(i, h), P = y.endColumn - y.startColumn + 1, D = y.endRow - y.startRow === 0;
5069
+ P === S - 1 && D ? (s.splice(m, 1), m--) : h.endColumn -= y.endColumn - y.startColumn + 1;
5076
5070
  }
5077
5071
  }
5078
5072
  }
@@ -5103,7 +5097,7 @@ let mt = class extends ke {
5103
5097
  const { range: n } = t, r = Se(this._univerInstanceService, e);
5104
5098
  if (!r)
5105
5099
  return this._handleNull();
5106
- const i = Ie(r, o);
5100
+ const i = Re(r, o);
5107
5101
  if (!i)
5108
5102
  return this._handleNull();
5109
5103
  const s = b.deepClone(i.getMergeData());
@@ -5117,8 +5111,8 @@ let mt = class extends ke {
5117
5111
  if (M <= f && p >= v)
5118
5112
  s.splice(m, 1), m--;
5119
5113
  else {
5120
- const y = N.getIntersects(n, h), A = y.endRow - y.startRow + 1, D = y.endColumn - y.startColumn === 0;
5121
- A === S - 1 && D ? (s.splice(m, 1), m--) : h.endRow -= y.endRow - y.startRow + 1;
5114
+ const y = N.getIntersects(n, h), P = y.endRow - y.startRow + 1, D = y.endColumn - y.startColumn === 0;
5115
+ P === S - 1 && D ? (s.splice(m, 1), m--) : h.endRow -= y.endRow - y.startRow + 1;
5122
5116
  }
5123
5117
  }
5124
5118
  }
@@ -5149,7 +5143,7 @@ let mt = class extends ke {
5149
5143
  const n = Se(this._univerInstanceService, e);
5150
5144
  if (!n)
5151
5145
  return this._handleNull();
5152
- const r = Ie(n, o);
5146
+ const r = Re(n, o);
5153
5147
  if (!r)
5154
5148
  return this._handleNull();
5155
5149
  const i = t.range, s = r.getMaxColumns() - 1, a = r.getMergeData(), c = [], d = [];
@@ -5217,7 +5211,7 @@ let mt = class extends ke {
5217
5211
  const n = Se(this._univerInstanceService, e);
5218
5212
  if (!n)
5219
5213
  return this._handleNull();
5220
- const r = Ie(n, o);
5214
+ const r = Re(n, o);
5221
5215
  if (!r)
5222
5216
  return this._handleNull();
5223
5217
  const i = t.range, s = r.getMaxRows() - 1, a = r.getMergeData(), c = [], d = [];
@@ -5272,15 +5266,15 @@ let mt = class extends ke {
5272
5266
  const n = Se(this._univerInstanceService, e);
5273
5267
  if (!n)
5274
5268
  return this._handleNull();
5275
- const r = Ie(n, o);
5269
+ const r = Re(n, o);
5276
5270
  if (!r)
5277
5271
  return this._handleNull();
5278
5272
  const i = t.range, s = r.getMaxRows() - 1, a = r.getMergeData(), c = [], d = [];
5279
5273
  a.forEach((v) => {
5280
5274
  const { startRow: S, startColumn: M, endColumn: p, endRow: w } = i;
5281
5275
  if (N.intersects({ startRow: S, startColumn: M, endRow: s, endColumn: p }, v) && (c.push(v), N.contains({ startRow: S, startColumn: M, endRow: s, endColumn: p }, v))) {
5282
- const D = w - S + 1, E = N.moveVertical(v, -D);
5283
- d.push(E);
5276
+ const D = w - S + 1, U = N.moveVertical(v, -D);
5277
+ d.push(U);
5284
5278
  }
5285
5279
  });
5286
5280
  const u = {
@@ -5322,7 +5316,7 @@ let mt = class extends ke {
5322
5316
  const n = Se(this._univerInstanceService, e);
5323
5317
  if (!n)
5324
5318
  return this._handleNull();
5325
- const r = Ie(n, o);
5319
+ const r = Re(n, o);
5326
5320
  if (!r)
5327
5321
  return this._handleNull();
5328
5322
  const i = t.range, s = r.getMaxColumns() - 1, a = r.getMergeData(), c = [], d = [];
@@ -5392,20 +5386,20 @@ let mt = class extends ke {
5392
5386
  };
5393
5387
  mt = $s([
5394
5388
  Oe(_e.Steady, mt),
5395
- xe(0, oe(_)),
5396
- xe(1, oe(Ke)),
5397
- xe(2, oe(C)),
5398
- xe(3, oe(wn)),
5399
- xe(4, oe($)),
5400
- xe(5, oe(x))
5389
+ xe(0, ne(_)),
5390
+ xe(1, ne(Ke)),
5391
+ xe(2, ne(C)),
5392
+ xe(3, ne(Mn)),
5393
+ xe(4, ne($)),
5394
+ xe(5, ne(x))
5401
5395
  ], mt);
5402
5396
  function Se(t, e) {
5403
5397
  return e ? t.getUniverSheetInstance(e) : t.getCurrentUniverSheetInstance();
5404
5398
  }
5405
- function Ie(t, e) {
5399
+ function Re(t, e) {
5406
5400
  return e ? t.getSheetBySheetId(e) : t.getActiveSheet();
5407
5401
  }
5408
- const yi = {
5402
+ const Ui = {
5409
5403
  sheets: {
5410
5404
  sheetCopy: "(Copy)",
5411
5405
  sheet: "Sheet"
@@ -5421,7 +5415,7 @@ var Gs = Object.defineProperty, qs = Object.getOwnPropertyDescriptor, Ks = (t, e
5421
5415
  (s = t[i]) && (r = (n ? s(e, o, r) : s(r)) || r);
5422
5416
  return n && r && Gs(e, o, r), r;
5423
5417
  }, at = (t, e) => (o, n) => e(o, n, t);
5424
- const mn = "SHEET_NUMFMT_PLUGIN";
5418
+ const mn = "SHEET_NUMFMT_PLUGIN", Js = 24 * 60 * 60 * 1e3;
5425
5419
  let ft = class extends ke {
5426
5420
  constructor(e, o, n, r) {
5427
5421
  super();
@@ -5432,7 +5426,7 @@ let ft = class extends ke {
5432
5426
  */
5433
5427
  F(this, "_numfmtModel", /* @__PURE__ */ new Map());
5434
5428
  F(this, "_refAliasModel", /* @__PURE__ */ new Map());
5435
- F(this, "_modelReplace$", new Nt());
5429
+ F(this, "_modelReplace$", new Et());
5436
5430
  F(this, "modelReplace$", this._modelReplace$.asObservable());
5437
5431
  this._commandService = e, this._resourceManagerService = o, this._univerInstanceService = n, this._logService = r, this._initModel(), this.disposeWithMe(
5438
5432
  ge(() => {
@@ -5450,7 +5444,7 @@ let ft = class extends ke {
5450
5444
  onChange: (i, s) => {
5451
5445
  const { model: a, refModel: c } = s;
5452
5446
  if (a) {
5453
- const d = Object.keys(a).reduce((u, l) => (u.set(l, new ne(a[l])), u), /* @__PURE__ */ new Map());
5447
+ const d = Object.keys(a).reduce((u, l) => (u.set(l, new te(a[l])), u), /* @__PURE__ */ new Map());
5454
5448
  this._numfmtModel.set(i, d);
5455
5449
  }
5456
5450
  c && this._refAliasModel.set(
@@ -5495,7 +5489,7 @@ let ft = class extends ke {
5495
5489
  _setValue(e, o, n, r, i) {
5496
5490
  let s = this.getModel(e, o);
5497
5491
  if (!s) {
5498
- const a = this._numfmtModel.get(e) || /* @__PURE__ */ new Map(), c = a.get(o) || new ne();
5492
+ const a = this._numfmtModel.get(e) || /* @__PURE__ */ new Map(), c = a.get(o) || new te();
5499
5493
  a.set(o, c), this._numfmtModel.set(e, a), s = c;
5500
5494
  }
5501
5495
  if (i)
@@ -5518,7 +5512,7 @@ let ft = class extends ke {
5518
5512
  return null;
5519
5513
  const a = this._refAliasModel.get(e), c = s.getValue(n, r);
5520
5514
  if (c && a) {
5521
- const d = a.getValue(c == null ? void 0 : c.i);
5515
+ const d = a.getValue(c == null ? void 0 : c.i, ["i"]);
5522
5516
  return d ? {
5523
5517
  pattern: d.pattern,
5524
5518
  type: d.type
@@ -5533,7 +5527,7 @@ let ft = class extends ke {
5533
5527
  ue.foreach(s, (a, c) => {
5534
5528
  const d = this.getValue(e, o, a, c, i);
5535
5529
  if (d && d.pattern) {
5536
- const u = r.getValue(d.pattern);
5530
+ const u = r.getValue(d.pattern, ["pattern"]);
5537
5531
  u && u.count--;
5538
5532
  }
5539
5533
  this._setValue(e, o, a, c, null);
@@ -5544,7 +5538,7 @@ let ft = class extends ke {
5544
5538
  const r = this.getModel(e, o);
5545
5539
  let i = this._refAliasModel.get(e);
5546
5540
  i || (i = new Dt([], ["pattern", "i"]), this._refAliasModel.set(e, i)), n.forEach((s) => {
5547
- let a = i.getValue(s.pattern);
5541
+ let a = i.getValue(s.pattern, ["pattern"]);
5548
5542
  a || (a = {
5549
5543
  count: 0,
5550
5544
  i: this._getUniqueRefId(e),
@@ -5555,7 +5549,7 @@ let ft = class extends ke {
5555
5549
  if (r) {
5556
5550
  const l = this.getValue(e, o, d, u, r);
5557
5551
  if (l && l.pattern) {
5558
- const g = i.getValue(l.pattern);
5552
+ const g = i.getValue(l.pattern, ["pattern"]);
5559
5553
  g && g.count--;
5560
5554
  }
5561
5555
  }
@@ -5573,16 +5567,20 @@ let ft = class extends ke {
5573
5567
  getRefModel(e) {
5574
5568
  return this._refAliasModel.get(e);
5575
5569
  }
5570
+ serialTimeToTimestamp(e, o = !0) {
5571
+ const n = (/* @__PURE__ */ new Date("1900-01-01")).getTime();
5572
+ return (e - (o ? 25569 : 24107)) * Js + n;
5573
+ }
5576
5574
  };
5577
5575
  ft = Ks([
5578
5576
  Oe(_e.Starting, ft),
5579
- at(0, oe(_)),
5580
- at(1, oe(yo)),
5581
- at(2, oe(C)),
5582
- at(3, oe(Bt))
5577
+ at(0, ne(_)),
5578
+ at(1, ne(bo)),
5579
+ at(2, ne(C)),
5580
+ at(3, ne(Bt))
5583
5581
  ], ft);
5584
5582
  const fn = "univer.sheet.editable";
5585
- class Te extends bo {
5583
+ class Te extends Uo {
5586
5584
  constructor(o, n) {
5587
5585
  super();
5588
5586
  F(this, "id", fn);
@@ -5591,10 +5589,10 @@ class Te extends bo {
5591
5589
  this._unitId = o, this._subUnitId = n, this.unitID = o, this.id = `${fn}_${o}_${n}`;
5592
5590
  }
5593
5591
  }
5594
- var Js = Object.defineProperty, Xs = Object.getOwnPropertyDescriptor, Ys = (t, e, o, n) => {
5595
- for (var r = n > 1 ? void 0 : n ? Xs(e, o) : e, i = t.length - 1, s; i >= 0; i--)
5592
+ var Xs = Object.defineProperty, Ys = Object.getOwnPropertyDescriptor, Zs = (t, e, o, n) => {
5593
+ for (var r = n > 1 ? void 0 : n ? Ys(e, o) : e, i = t.length - 1, s; i >= 0; i--)
5596
5594
  (s = t[i]) && (r = (n ? s(e, o, r) : s(r)) || r);
5597
- return n && r && Js(e, o, r), r;
5595
+ return n && r && Xs(e, o, r), r;
5598
5596
  }, kt = (t, e) => (o, n) => e(o, n, t);
5599
5597
  let Je = class extends ke {
5600
5598
  constructor(t, e, o) {
@@ -5641,8 +5639,8 @@ let Je = class extends ke {
5641
5639
  getEditable$(t, e) {
5642
5640
  const o = this._univerInstanceService.getCurrentUniverSheetInstance(), n = t || o.getUnitId(), r = o.getActiveSheet(), i = e || r.getSheetId(), s = new Te(n, i);
5643
5641
  return this._permissionService.composePermission$(n, [sn, s.id]).pipe(
5644
- Vo(([a, c]) => {
5645
- const d = a.value && c.value, u = Do([a, c]);
5642
+ Bo(([a, c]) => {
5643
+ const d = a.value && c.value, u = Oo([a, c]);
5646
5644
  return { value: d, status: u };
5647
5645
  })
5648
5646
  );
@@ -5656,15 +5654,15 @@ let Je = class extends ke {
5656
5654
  this._permissionService.updatePermissionPoint(r, a.id, t);
5657
5655
  }
5658
5656
  };
5659
- Je = Ys([
5657
+ Je = Zs([
5660
5658
  Oe(_e.Ready, Je),
5661
- kt(0, oe(Uo)),
5662
- kt(1, oe(C)),
5663
- kt(2, oe($))
5659
+ kt(0, ne(Do)),
5660
+ kt(1, ne(C)),
5661
+ kt(2, ne($))
5664
5662
  ], Je);
5665
- function bi(t) {
5663
+ function Di(t) {
5666
5664
  const e = t.get(C), o = t.get(Je), n = e.getCurrentUniverSheetInstance().getUnitId(), r = e.getCurrentUniverSheetInstance().getActiveSheet().getSheetId();
5667
- return new No((i) => {
5665
+ return new xo((i) => {
5668
5666
  var a;
5669
5667
  const s = (a = o.getEditable$(n, r)) == null ? void 0 : a.subscribe((c) => {
5670
5668
  i.next(!c.value);
@@ -5674,16 +5672,16 @@ function bi(t) {
5674
5672
  };
5675
5673
  });
5676
5674
  }
5677
- var Zs = Object.defineProperty, Qs = Object.getOwnPropertyDescriptor, ei = (t, e, o, n) => {
5678
- for (var r = n > 1 ? void 0 : n ? Qs(e, o) : e, i = t.length - 1, s; i >= 0; i--)
5675
+ var Qs = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ti = (t, e, o, n) => {
5676
+ for (var r = n > 1 ? void 0 : n ? ei(e, o) : e, i = t.length - 1, s; i >= 0; i--)
5679
5677
  (s = t[i]) && (r = (n ? s(e, o, r) : s(r)) || r);
5680
- return n && r && Zs(e, o, r), r;
5678
+ return n && r && Qs(e, o, r), r;
5681
5679
  }, At = (t, e) => (o, n) => e(o, n, t);
5682
- const ti = "sheet";
5680
+ const ni = "sheet";
5683
5681
  var Pt;
5684
- let vn = (Pt = class extends Oo {
5682
+ let vn = (Pt = class extends ko {
5685
5683
  constructor(t, e, o, n) {
5686
- super(ti), this._config = t, this._commandService = e, this._localeService = o, this._injector = n, this._initializeDependencies(n);
5684
+ super(ni), this._config = t, this._commandService = e, this._localeService = o, this._injector = n, this._initializeDependencies(n);
5687
5685
  }
5688
5686
  onRendered() {
5689
5687
  this._localeService.load({
@@ -5708,20 +5706,20 @@ let vn = (Pt = class extends Oo {
5708
5706
  t.add(n);
5709
5707
  });
5710
5708
  }
5711
- }, F(Pt, "type", ko.Sheet), Pt);
5712
- vn = ei([
5709
+ }, F(Pt, "type", Ao.Sheet), Pt);
5710
+ vn = ti([
5713
5711
  At(1, _),
5714
- At(2, oe(Vt)),
5715
- At(3, oe(wn))
5712
+ At(2, ne(Vt)),
5713
+ At(3, ne(Mn))
5716
5714
  ], vn);
5717
- const Ui = [
5715
+ const Oi = [
5718
5716
  Ue.id,
5719
- Re.id,
5720
- no.id,
5717
+ Ie.id,
5718
+ oo.id,
5721
5719
  be.id,
5722
5720
  _t.id,
5723
5721
  St.id,
5724
- It.id,
5722
+ Rt.id,
5725
5723
  Xe.id,
5726
5724
  Ye.id,
5727
5725
  Qe.id,
@@ -5730,14 +5728,14 @@ const Ui = [
5730
5728
  Be.id,
5731
5729
  Fe.id,
5732
5730
  je.id
5733
- ], Di = [
5734
- ee.id,
5731
+ ], ki = [
5732
+ Q.id,
5735
5733
  Ct.id,
5736
5734
  G.id,
5737
5735
  z.id
5738
- ], Oi = 1.5, ki = "rgba(255,255,255, 0.01)";
5739
- function Ai(t) {
5740
- const e = t.getCurrentTheme(), o = new Ao(e.primaryColor).setAlpha(0.07).toRgbString();
5736
+ ], Ai = 1.5, Pi = "rgba(255,255,255, 0.01)";
5737
+ function Ni(t) {
5738
+ const e = t.getCurrentTheme(), o = new Po(e.primaryColor).setAlpha(0.07).toRgbString();
5741
5739
  return {
5742
5740
  strokeWidth: 1.5,
5743
5741
  stroke: e.primaryColor,
@@ -5762,7 +5760,7 @@ function Ai(t) {
5762
5760
  columnHeaderStrokeWidth: 1
5763
5761
  };
5764
5762
  }
5765
- function Pi(t) {
5763
+ function Ei(t) {
5766
5764
  const { rangeWithCoord: e, primaryWithCoord: o, style: n } = t, r = {
5767
5765
  range: {
5768
5766
  startRow: e.startRow,
@@ -5774,9 +5772,9 @@ function Pi(t) {
5774
5772
  primary: null,
5775
5773
  style: n
5776
5774
  };
5777
- return o != null && (r.primary = ni(o)), r;
5775
+ return o != null && (r.primary = oi(o)), r;
5778
5776
  }
5779
- function ni(t) {
5777
+ function oi(t) {
5780
5778
  const { actualRow: e, actualColumn: o, isMerged: n, isMergedMainCell: r } = t, { startRow: i, startColumn: s, endRow: a, endColumn: c } = t.mergeInfo;
5781
5779
  return {
5782
5780
  actualRow: e,
@@ -5789,8 +5787,8 @@ function ni(t) {
5789
5787
  endColumn: c
5790
5788
  };
5791
5789
  }
5792
- function Ei(t, e, o) {
5793
- const n = Bo(t, e, o), r = Po(n);
5790
+ function xi(t, e, o) {
5791
+ const n = Wo(t, e, o), r = No(n);
5794
5792
  if (r)
5795
5793
  return {
5796
5794
  range: r,
@@ -5798,7 +5796,7 @@ function Ei(t, e, o) {
5798
5796
  style: null
5799
5797
  };
5800
5798
  }
5801
- const Ni = (t, e, o) => {
5799
+ const Ti = (t, e, o) => {
5802
5800
  const r = t.get(x).getSelections(), { value: i, selections: s, unitId: a, subUnitId: c } = e;
5803
5801
  if (r) {
5804
5802
  const u = r[(r == null ? void 0 : r.length) - 1].primary;
@@ -5821,10 +5819,10 @@ const Ni = (t, e, o) => {
5821
5819
  actualColumn: l,
5822
5820
  isMerged: !0,
5823
5821
  isMergedMainCell: m === g && h === l
5824
- }, M = r.map((w, y, A) => ({
5822
+ }, M = r.map((w, y, P) => ({
5825
5823
  range: w.range,
5826
5824
  style: null,
5827
- primary: y === A.length - 1 ? S : null
5825
+ primary: y === P.length - 1 ? S : null
5828
5826
  })), p = {
5829
5827
  unitId: a,
5830
5828
  subUnitId: c,
@@ -5832,14 +5830,14 @@ const Ni = (t, e, o) => {
5832
5830
  selections: M
5833
5831
  };
5834
5832
  return {
5835
- id: te.id,
5833
+ id: ee.id,
5836
5834
  params: p
5837
5835
  };
5838
5836
  }
5839
5837
  return null;
5840
5838
  }
5841
5839
  return null;
5842
- }, xi = (t, e) => {
5840
+ }, Li = (t, e) => {
5843
5841
  const n = t.get(x).getSelections(), { unitId: r, subUnitId: i } = e;
5844
5842
  if (n && n[(n == null ? void 0 : n.length) - 1].primary) {
5845
5843
  const c = {
@@ -5849,175 +5847,176 @@ const Ni = (t, e, o) => {
5849
5847
  selections: [...n]
5850
5848
  };
5851
5849
  return {
5852
- id: te.id,
5850
+ id: ee.id,
5853
5851
  params: c
5854
5852
  };
5855
5853
  }
5856
5854
  return null;
5857
5855
  };
5858
5856
  export {
5859
- Ni as AddMergeRedoSelectionsOperationFactory,
5857
+ Ti as AddMergeRedoSelectionsOperationFactory,
5860
5858
  pe as AddMergeUndoMutationFactory,
5861
- xi as AddMergeUndoSelectionsOperationFactory,
5859
+ Li as AddMergeUndoSelectionsOperationFactory,
5862
5860
  z as AddWorksheetMergeMutation,
5863
5861
  He as BorderStyleManagerService,
5864
- Ui as COMMAND_LISTENER_SKELETON_CHANGE,
5865
- Di as COMMAND_LISTENER_VALUE_CHANGE,
5862
+ Oi as COMMAND_LISTENER_SKELETON_CHANGE,
5863
+ ki as COMMAND_LISTENER_VALUE_CHANGE,
5866
5864
  Wt as ClearSelectionAllCommand,
5867
- yn as ClearSelectionContentCommand,
5865
+ bn as ClearSelectionContentCommand,
5868
5866
  jt as ClearSelectionFormatCommand,
5869
- lr as CopySheetCommand,
5867
+ dr as CopySheetCommand,
5870
5868
  Ht as DeleteRangeMoveLeftCommand,
5871
5869
  zt as DeleteRangeMoveUpCommand,
5872
- Yn as DeltaColumnWidthCommand,
5873
- rs as DeltaRowHeightCommand,
5870
+ Zn as DeltaColumnWidthCommand,
5871
+ ss as DeltaRowHeightCommand,
5874
5872
  X as EffectRefRangId,
5875
5873
  hs as EmptyMutation,
5876
5874
  qe as INTERCEPTOR_POINT,
5877
5875
  ze as INumfmtService,
5878
- Sr as InsertColAfterCommand,
5879
- Cr as InsertColBeforeCommand,
5876
+ Rr as InsertColAfterCommand,
5877
+ Sr as InsertColBeforeCommand,
5880
5878
  tt as InsertColCommand,
5881
5879
  We as InsertColMutation,
5882
5880
  En as InsertColMutationUndoFactory,
5883
5881
  Gt as InsertRangeMoveDownCommand,
5884
5882
  qt as InsertRangeMoveRightCommand,
5885
- vr as InsertRowAfterCommand,
5886
- fr as InsertRowBeforeCommand,
5883
+ Cr as InsertRowAfterCommand,
5884
+ vr as InsertRowBeforeCommand,
5887
5885
  et as InsertRowCommand,
5888
5886
  Be as InsertRowMutation,
5889
- Pn as InsertRowMutationUndoFactory,
5887
+ Nn as InsertRowMutationUndoFactory,
5890
5888
  Ir as InsertSheetCommand,
5891
5889
  Le as InsertSheetMutation,
5892
- bn as InsertSheetUndoMutationFactory,
5890
+ Un as InsertSheetUndoMutationFactory,
5893
5891
  ms as MAX_CELL_PER_SHEET_KEY,
5894
5892
  mt as MergeCellController,
5895
- Wn as MoveColsCommand,
5896
- It as MoveColsMutation,
5893
+ jn as MoveColsCommand,
5894
+ Rt as MoveColsMutation,
5897
5895
  Ft as MoveRangeCommand,
5898
5896
  Ct as MoveRangeMutation,
5899
- Vn as MoveRowsCommand,
5897
+ Bn as MoveRowsCommand,
5900
5898
  St as MoveRowsMutation,
5901
5899
  se as NORMAL_SELECTION_PLUGIN_NAME,
5902
5900
  ft as NumfmtService,
5903
5901
  Z as OperatorType,
5904
- pi as RangeMergeUtil,
5902
+ Mi as RangeMergeUtil,
5905
5903
  Ke as RefRangeService,
5906
5904
  Jt as RemoveColCommand,
5907
5905
  Fe as RemoveColMutation,
5908
5906
  Ce as RemoveMergeUndoMutationFactory,
5909
- io as RemoveNumfmtMutation,
5907
+ ao as RemoveNumfmtMutation,
5910
5908
  Kt as RemoveRowCommand,
5911
5909
  je as RemoveRowMutation,
5912
- $n as RemoveSheetCommand,
5910
+ Hn as RemoveSheetCommand,
5913
5911
  wt as RemoveSheetMutation,
5914
- ur as RemoveSheetUndoMutationFactory,
5915
- _r as RemoveWorksheetMergeCommand,
5912
+ lr as RemoveSheetUndoMutationFactory,
5913
+ yr as RemoveWorksheetMergeCommand,
5916
5914
  G as RemoveWorksheetMergeMutation,
5917
- zr as ResetBackgroundColorCommand,
5918
- $r as ResetTextColorCommand,
5919
- ki as SELECTION_CONTROL_BORDER_BUFFER_COLOR,
5920
- Oi as SELECTION_CONTROL_BORDER_BUFFER_WIDTH,
5915
+ Gr as ResetBackgroundColorCommand,
5916
+ Hr as ResetTextColorCommand,
5917
+ Pi as SELECTION_CONTROL_BORDER_BUFFER_COLOR,
5918
+ Ai as SELECTION_CONTROL_BORDER_BUFFER_WIDTH,
5921
5919
  x as SelectionManagerService,
5922
- Ho as SelectionMoveType,
5923
- Hr as SetBackgroundColorCommand,
5924
- mi as SetBoldCommand,
5925
- br as SetBorderBasicCommand,
5926
- Or as SetBorderColorCommand,
5920
+ zo as SelectionMoveType,
5921
+ zr as SetBackgroundColorCommand,
5922
+ vi as SetBoldCommand,
5923
+ Ur as SetBorderBasicCommand,
5924
+ kr as SetBorderColorCommand,
5927
5925
  nt as SetBorderCommand,
5928
- Ur as SetBorderPositionCommand,
5929
- Dr as SetBorderStyleCommand,
5926
+ Dr as SetBorderPositionCommand,
5927
+ Or as SetBorderStyleCommand,
5930
5928
  Er as SetColHiddenCommand,
5931
5929
  Xe as SetColHiddenMutation,
5932
5930
  Ye as SetColVisibleMutation,
5933
- Zn as SetColWidthCommand,
5934
- Si as SetFontFamilyCommand,
5935
- Ii as SetFontSizeCommand,
5936
- xr as SetFrozenCommand,
5937
- Ee as SetFrozenMutation,
5938
- Gn as SetFrozenMutationFactory,
5939
- qr as SetHorizontalTextAlignCommand,
5940
- fi as SetItalicCommand,
5931
+ Qn as SetColWidthCommand,
5932
+ Ii as SetFontFamilyCommand,
5933
+ pi as SetFontSizeCommand,
5934
+ Tr as SetFrozenCommand,
5935
+ Ne as SetFrozenMutation,
5936
+ qn as SetFrozenMutationFactory,
5937
+ Kr as SetHorizontalTextAlignCommand,
5938
+ Ci as SetItalicCommand,
5941
5939
  Yt as SetNumfmtMutation,
5942
5940
  Ve as SetRangeValuesCommand,
5943
- ee as SetRangeValuesMutation,
5941
+ Q as SetRangeValuesMutation,
5944
5942
  Ae as SetRangeValuesUndoMutationFactory,
5945
- ss as SetRowHeightCommand,
5946
- Wr as SetRowHiddenCommand,
5943
+ is as SetRowHeightCommand,
5944
+ jr as SetRowHiddenCommand,
5947
5945
  Qe as SetRowHiddenMutation,
5948
5946
  Ze as SetRowVisibleMutation,
5949
- Pr as SetSelectedColsVisibleCommand,
5950
- Br as SetSelectedRowsVisibleCommand,
5951
- te as SetSelectionsOperation,
5952
- Hn as SetSpecificColsVisibleCommand,
5953
- qn as SetSpecificRowsVisibleCommand,
5954
- Ci as SetStrikeThroughCommand,
5947
+ Nr as SetSelectedColsVisibleCommand,
5948
+ Wr as SetSelectedRowsVisibleCommand,
5949
+ ee as SetSelectionsOperation,
5950
+ zn as SetSpecificColsVisibleCommand,
5951
+ Kn as SetSpecificRowsVisibleCommand,
5952
+ Ri as SetStrikeThroughCommand,
5955
5953
  ie as SetStyleCommand,
5956
- Yr as SetTabColorCommand,
5954
+ Zr as SetTabColorCommand,
5957
5955
  ut as SetTabColorMutation,
5958
- Fr as SetTextColorCommand,
5959
- Jr as SetTextRotationCommand,
5960
- Kr as SetTextWrapCommand,
5961
- vi as SetUnderlineCommand,
5962
- Gr as SetVerticalTextAlignCommand,
5963
- Jn as SetWorksheetActivateCommand,
5956
+ $r as SetTextColorCommand,
5957
+ Xr as SetTextRotationCommand,
5958
+ Jr as SetTextWrapCommand,
5959
+ Si as SetUnderlineCommand,
5960
+ qr as SetVerticalTextAlignCommand,
5961
+ Xn as SetWorksheetActivateCommand,
5964
5962
  _t as SetWorksheetActiveOperation,
5965
5963
  be as SetWorksheetColWidthMutation,
5966
- Xn as SetWorksheetColWidthMutationFactory,
5967
- Qr as SetWorksheetHideCommand,
5968
- Ne as SetWorksheetHideMutation,
5969
- eo as SetWorksheetNameCommand,
5964
+ Yn as SetWorksheetColWidthMutationFactory,
5965
+ es as SetWorksheetHideCommand,
5966
+ Ee as SetWorksheetHideMutation,
5967
+ to as SetWorksheetNameCommand,
5970
5968
  xt as SetWorksheetNameMutation,
5971
- ns as SetWorksheetOrderCommand,
5969
+ os as SetWorksheetOrderCommand,
5972
5970
  lt as SetWorksheetOrderMutation,
5973
- no as SetWorksheetRowAutoHeightMutation,
5974
- Ri as SetWorksheetRowAutoHeightMutationFactory,
5971
+ oo as SetWorksheetRowAutoHeightMutation,
5972
+ wi as SetWorksheetRowAutoHeightMutationFactory,
5975
5973
  Ue as SetWorksheetRowHeightMutation,
5976
- oo as SetWorksheetRowIsAutoHeightCommand,
5977
- Re as SetWorksheetRowIsAutoHeightMutation,
5978
- is as SetWorksheetShowCommand,
5974
+ ro as SetWorksheetRowIsAutoHeightCommand,
5975
+ Ie as SetWorksheetRowIsAutoHeightMutation,
5976
+ as as SetWorksheetShowCommand,
5979
5977
  Te as SheetEditablePermission,
5980
5978
  $ as SheetInterceptorService,
5981
5979
  Je as SheetPermissionService,
5982
5980
  vn as UniverSheetsPlugin,
5983
5981
  Mt as alignToMergedCellsBorders,
5984
- ni as convertPrimaryWithCoordToPrimary,
5985
- Pi as convertSelectionDataToRange,
5986
- cs as createTopMatrixFromMatrix,
5987
- as as createTopMatrixFromRanges,
5988
- yi as enUS,
5989
- Mi as factoryRemoveNumfmtUndoMutation,
5990
- wi as factorySetNumfmtUndoMutation,
5991
- ro as findAllRectangle,
5982
+ oi as convertPrimaryWithCoordToPrimary,
5983
+ Ei as convertSelectionDataToRange,
5984
+ us as createTopMatrixFromMatrix,
5985
+ cs as createTopMatrixFromRanges,
5986
+ Ui as enUS,
5987
+ yi as factoryRemoveNumfmtUndoMutation,
5988
+ _i as factorySetNumfmtUndoMutation,
5989
+ so as findAllRectangle,
5992
5990
  Pe as followSelectionOperation,
5993
5991
  Hs as getAddMergeMutationRangeByType,
5994
- di as getCellAtRowCol,
5995
- bi as getCurrentSheetDisabled$,
5996
- Dn as getInsertRangeMutations,
5997
- Ai as getNormalSelectionStyle,
5992
+ gi as getCellAtRowCol,
5993
+ Di as getCurrentSheetDisabled$,
5994
+ On as getInsertRangeMutations,
5995
+ Ni as getNormalSelectionStyle,
5998
5996
  he as getPrimaryForRange,
5999
- On as getRemoveRangeMutations,
5997
+ kn as getRemoveRangeMutations,
6000
5998
  bt as handleBaseInsertRange,
6001
- ao as handleBaseMoveRowsCols,
5999
+ co as handleBaseMoveRowsCols,
6002
6000
  yt as handleBaseRemoveRange,
6003
- _i as handleDefaultRangeChangeWithEffectRefCommands,
6001
+ bi as handleDefaultRangeChangeWithEffectRefCommands,
6004
6002
  Bs as handleDeleteRangeMoveLeft,
6005
6003
  Ws as handleDeleteRangeMoveUp,
6006
- hi as handleDeleteRangeMutation,
6007
- Es as handleIRemoveCol,
6008
- Ns as handleIRemoveRow,
6004
+ fi as handleDeleteRangeMutation,
6005
+ Ns as handleIRemoveCol,
6006
+ Es as handleIRemoveRow,
6009
6007
  Ts as handleInsertCol,
6010
6008
  Ls as handleInsertRangeMoveDown,
6011
6009
  Vs as handleInsertRangeMoveRight,
6012
- gi as handleInsertRangeMutation,
6010
+ mi as handleInsertRangeMutation,
6013
6011
  xs as handleInsertRow,
6014
- uo as handleMoveCols,
6012
+ lo as handleMoveCols,
6015
6013
  Ps as handleMoveRange,
6016
- co as handleMoveRows,
6017
- so as rangeMerge,
6014
+ uo as handleMoveRows,
6015
+ io as rangeMerge,
6018
6016
  De as rotateRange,
6019
6017
  Lt as runRefRangeMutations,
6020
- Ei as transformCellDataToSelectionData,
6018
+ hi as setEndForRange,
6019
+ xi as transformCellDataToSelectionData,
6021
6020
  Tt as transformCellsToRange,
6022
6021
  zs as zhCN
6023
6022
  };