@univerjs/sheets-table 0.13.0-insiders.20251218-2062647 → 0.13.0-insiders.20251223-857805c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -1,26 +1,26 @@
1
- var ot = Object.defineProperty;
2
- var it = (t, e, n) => e in t ? ot(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var b = (t, e, n) => it(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { CellValueType as J, UniverInstanceType as j, BorderStyleTypes as lt, createREGEXFromWildChar as Z, generateRandomId as B, IUniverInstanceService as A, Inject as C, LocaleService as be, Disposable as H, CommandType as y, IUndoRedoService as L, ICommandService as D, customNameCharacterCheck as Be, sequenceExecute as E, ILogService as We, IResourceManagerService as ut, Rectangle as _e, RTree as ct, InterceptorEffectEnum as dt, Injector as He, IConfigService as Ve, Plugin as ht, merge as gt, registerDependencies as mt, touchDependencies as Me } from "@univerjs/core";
5
- import { IDefinedNamesService as Pe, RemoveSuperTableMutation as ve, SetSuperTableMutation as bt } from "@univerjs/engine-formula";
6
- import { getSheetCommandTarget as $, SheetInterceptorService as Re, INTERCEPTOR_POINT as qe, RemoveSheetCommand as wt, CopySheetCommand as ft, AddRangeThemeMutation as Je, RemoveRangeThemeMutation as ke, SheetRangeThemeModel as Qe, SheetsSelectionsService as we, InsertRowMutation as Ye, RemoveRowMutation as Ge, getMoveRangeUndoRedoMutations as fe, InsertColMutation as je, RemoveColMutation as ze, IExclusiveRangeService as pt, RefRangeService as St, RemoveColCommand as _t, RemoveRowCommand as Ct, InsertColCommand as Rt, InsertRowCommand as Tt, SheetRangeThemeService as It, RangeThemeStyle as Mt, ZebraCrossingCacheController as vt } from "@univerjs/sheets";
7
- import { Subject as Y, BehaviorSubject as Ke, filter as pe, switchMap as Fe } from "rxjs";
8
- var M = /* @__PURE__ */ ((t) => (t.Insert = "insert", t.Delete = "delete", t))(M || {}), N = /* @__PURE__ */ ((t) => (t.Row = "row", t.Col = "column", t))(N || {}), Xe = /* @__PURE__ */ ((t) => (t.None = "none", t.String = "string", t.Number = "number", t.Date = "date", t.Bool = "bool", t.Checkbox = "checkbox", t.List = "list", t))(Xe || {}), ne = /* @__PURE__ */ ((t) => (t.manual = "manual", t.condition = "condition", t))(ne || {}), U = /* @__PURE__ */ ((t) => (t.Date = "date", t.Number = "number", t.String = "string", t.Logic = "logic", t))(U || {}), F = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.GreaterThan = "greaterThan", t.GreaterThanOrEqual = "greaterThanOrEqual", t.LessThan = "lessThan", t.LessThanOrEqual = "lessThanOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Above = "above", t.Below = "below", t.TopN = "topN", t))(F || {}), P = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.Contains = "contains", t.NotContains = "notContains", t.StartsWith = "startsWith", t.EndsWith = "endsWith", t))(P || {}), m = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.After = "after", t.AfterOrEqual = "afterOrEqual", t.Before = "before", t.BeforeOrEqual = "beforeOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Today = "today", t.Yesterday = "yesterday", t.Tomorrow = "tomorrow", t.ThisWeek = "thisWeek", t.LastWeek = "lastWeek", t.NextWeek = "nextWeek", t.ThisMonth = "thisMonth", t.LastMonth = "lastMonth", t.NextMonth = "nextMonth", t.ThisQuarter = "thisQuarter", t.LastQuarter = "lastQuarter", t.NextQuarter = "nextQuarter", t.ThisYear = "thisYear", t.LastYear = "lastYear", t.NextYear = "nextYear", t.YearToDate = "yearToDate", t.Quarter = "quarter", t.Month = "month", t.M1 = "m1", t.M2 = "m2", t.M3 = "m3", t.M4 = "m4", t.M5 = "m5", t.M6 = "m6", t.M7 = "m7", t.M8 = "m8", t.M9 = "m9", t.M10 = "m10", t.M11 = "m11", t.M12 = "m12", t.Q1 = "q1", t.Q2 = "q2", t.Q3 = "q3", t.Q4 = "q4", t))(m || {}), q = /* @__PURE__ */ ((t) => (t[t.FilteredSortNone = 1] = "FilteredSortNone", t[t.FilteredSortAsc = 2] = "FilteredSortAsc", t[t.FilteredSortDesc = 3] = "FilteredSortDesc", t[t.FilterNoneSortNone = 4] = "FilterNoneSortNone", t[t.FilterNoneSortAsc = 5] = "FilterNoneSortAsc", t[t.FilterNoneSortDesc = 6] = "FilterNoneSortDesc", t))(q || {}), G = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t.None = "none", t))(G || {});
1
+ var st = Object.defineProperty;
2
+ var rt = (t, e, n) => e in t ? st(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var b = (t, e, n) => rt(t, typeof e != "symbol" ? e + "" : e, n);
4
+ import { CellValueType as J, BorderStyleTypes as at, createREGEXFromWildChar as Z, generateRandomId as L, IUniverInstanceService as B, Inject as R, LocaleService as be, Disposable as H, CommandType as N, IUndoRedoService as A, ICommandService as D, sequenceExecute as E, ILogService as Le, IResourceManagerService as ot, Rectangle as _e, RTree as it, InterceptorEffectEnum as lt, UniverInstanceType as z, customNameCharacterCheck as ut, Injector as We, IConfigService as He, Plugin as ct, merge as dt, registerDependencies as ht, touchDependencies as Me } from "@univerjs/core";
5
+ import { getSheetCommandTarget as $, SheetInterceptorService as Ce, INTERCEPTOR_POINT as Ve, RemoveSheetCommand as gt, CopySheetCommand as mt, AddRangeThemeMutation as Pe, RemoveRangeThemeMutation as qe, SheetRangeThemeModel as Je, SheetsSelectionsService as we, InsertRowMutation as ke, RemoveRowMutation as Qe, getMoveRangeUndoRedoMutations as fe, InsertColMutation as Ye, RemoveColMutation as Ge, IExclusiveRangeService as bt, RefRangeService as wt, RemoveColCommand as ft, RemoveRowCommand as pt, InsertColCommand as St, InsertRowCommand as _t, SheetRangeThemeService as Rt, RangeThemeStyle as Ct, ZebraCrossingCacheController as Tt } from "@univerjs/sheets";
6
+ import { Subject as Y, BehaviorSubject as ze, filter as pe, switchMap as ve } from "rxjs";
7
+ import { RemoveSuperTableMutation as Fe, SetSuperTableMutation as It } from "@univerjs/engine-formula";
8
+ var M = /* @__PURE__ */ ((t) => (t.Insert = "insert", t.Delete = "delete", t))(M || {}), y = /* @__PURE__ */ ((t) => (t.Row = "row", t.Col = "column", t))(y || {}), je = /* @__PURE__ */ ((t) => (t.None = "none", t.String = "string", t.Number = "number", t.Date = "date", t.Bool = "bool", t.Checkbox = "checkbox", t.List = "list", t))(je || {}), ne = /* @__PURE__ */ ((t) => (t.manual = "manual", t.condition = "condition", t))(ne || {}), O = /* @__PURE__ */ ((t) => (t.Date = "date", t.Number = "number", t.String = "string", t.Logic = "logic", t))(O || {}), F = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.GreaterThan = "greaterThan", t.GreaterThanOrEqual = "greaterThanOrEqual", t.LessThan = "lessThan", t.LessThanOrEqual = "lessThanOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Above = "above", t.Below = "below", t.TopN = "topN", t))(F || {}), P = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.Contains = "contains", t.NotContains = "notContains", t.StartsWith = "startsWith", t.EndsWith = "endsWith", t))(P || {}), m = /* @__PURE__ */ ((t) => (t.Equal = "equal", t.NotEqual = "notEqual", t.After = "after", t.AfterOrEqual = "afterOrEqual", t.Before = "before", t.BeforeOrEqual = "beforeOrEqual", t.Between = "between", t.NotBetween = "notBetween", t.Today = "today", t.Yesterday = "yesterday", t.Tomorrow = "tomorrow", t.ThisWeek = "thisWeek", t.LastWeek = "lastWeek", t.NextWeek = "nextWeek", t.ThisMonth = "thisMonth", t.LastMonth = "lastMonth", t.NextMonth = "nextMonth", t.ThisQuarter = "thisQuarter", t.LastQuarter = "lastQuarter", t.NextQuarter = "nextQuarter", t.ThisYear = "thisYear", t.LastYear = "lastYear", t.NextYear = "nextYear", t.YearToDate = "yearToDate", t.Quarter = "quarter", t.Month = "month", t.M1 = "m1", t.M2 = "m2", t.M3 = "m3", t.M4 = "m4", t.M5 = "m5", t.M6 = "m6", t.M7 = "m7", t.M8 = "m8", t.M9 = "m9", t.M10 = "m10", t.M11 = "m11", t.M12 = "m12", t.Q1 = "q1", t.Q2 = "q2", t.Q3 = "q3", t.Q4 = "q4", t))(m || {}), q = /* @__PURE__ */ ((t) => (t[t.FilteredSortNone = 1] = "FilteredSortNone", t[t.FilteredSortAsc = 2] = "FilteredSortAsc", t[t.FilteredSortDesc = 3] = "FilteredSortDesc", t[t.FilterNoneSortNone = 4] = "FilterNoneSortNone", t[t.FilterNoneSortAsc = 5] = "FilterNoneSortAsc", t[t.FilterNoneSortDesc = 6] = "FilterNoneSortDesc", t))(q || {}), G = /* @__PURE__ */ ((t) => (t.Asc = "asc", t.Desc = "desc", t.None = "none", t))(G || {});
9
9
  function te(t, e) {
10
10
  return `${e} ${t}`;
11
11
  }
12
- const Ne = "TRUE", ye = "FALSE", Ft = (t) => {
12
+ const ye = "TRUE", Ne = "FALSE", Mt = (t) => {
13
13
  var n;
14
14
  return ((n = t.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "")) || "";
15
15
  };
16
- function Ze(t) {
16
+ function Ke(t) {
17
17
  if (t) {
18
18
  const { v: e, t: n, p: s } = t;
19
- return s ? Ft(s) : (n === J.FORCE_STRING || n === J.STRING) && e !== void 0 && e !== null ? String(e) : n === J.BOOLEAN ? e ? Ne : ye : n === J.NUMBER ? String(e) : typeof e === "boolean" ? e ? Ne : ye : e == null ? "" : String(e);
19
+ return s ? Mt(s) : (n === J.FORCE_STRING || n === J.STRING) && e !== void 0 && e !== null ? String(e) : n === J.BOOLEAN ? e ? ye : Ne : n === J.NUMBER ? String(e) : typeof e === "boolean" ? e ? ye : Ne : e == null ? "" : String(e);
20
20
  }
21
21
  return "";
22
22
  }
23
- function Nt(t, e) {
23
+ function vt(t, e) {
24
24
  if (t != null)
25
25
  switch (e) {
26
26
  case G.Asc:
@@ -40,32 +40,18 @@ function Nt(t, e) {
40
40
  return q.FilterNoneSortNone;
41
41
  }
42
42
  }
43
- function yt(t) {
43
+ function Ft(t) {
44
44
  return t ? t.filterType === ne.condition : !1;
45
45
  }
46
- function gs(t) {
46
+ function ds(t) {
47
47
  return t ? t.filterType === ne.manual : !1;
48
48
  }
49
- function et(t, e) {
50
- const { univerInstanceService: n, tableManager: s, definedNamesService: r } = e, a = /* @__PURE__ */ new Set(), o = n == null ? void 0 : n.getUnit(t, j.UNIVER_SHEET);
51
- o && o.getSheets().forEach((i) => {
52
- a.add(i.getName().toLowerCase());
53
- });
54
- const u = s == null ? void 0 : s.getTableList(t);
55
- u && u.length > 0 && u.forEach((i) => {
56
- a.add(i.name.toLowerCase());
57
- });
58
- const l = r == null ? void 0 : r.getDefinedNameMap(t);
59
- return l && Object.values(l).forEach((i) => {
60
- a.add(i.name.toLowerCase());
61
- }), a;
62
- }
63
49
  const x = {
64
- s: lt.THIN,
50
+ s: at.THIN,
65
51
  cl: {
66
52
  rgb: "rgb(95, 101, 116)"
67
53
  }
68
- }, tt = "sheets-table.config", De = {}, ms = {
54
+ }, Xe = "sheets-table.config", De = {}, hs = {
69
55
  headerRowStyle: {
70
56
  bd: {
71
57
  t: x
@@ -86,7 +72,7 @@ const x = {
86
72
  b: x
87
73
  }
88
74
  }
89
- }, bs = (t, e) => {
75
+ }, gs = (t, e) => {
90
76
  if (t === "headerRowStyle") {
91
77
  if (!e.bd)
92
78
  return {
@@ -119,14 +105,14 @@ const x = {
119
105
  }
120
106
  };
121
107
  return e;
122
- }, Dt = [
108
+ }, yt = [
123
109
  [["#6280F9", "#FFFFFF", "#BAC6F8", "#D2DAFA"], ["#fff"]],
124
110
  [["#16BDCA", "#FFFFFF", "#EDFAFA", "#AFECEF"], ["#000"]],
125
111
  [["#31C48D", "#FFFFFF", "#F3FAF7", "#BCF0DA"], ["#fff"]],
126
112
  [["#AC94FA", "#FFFFFF", "#F6F5FF", "#EDEBFE"], ["#fff"]],
127
113
  [["#F17EBB", "#FFFFFF", "#FDF2F8", "#FCE8F3"], ["#fff"]],
128
114
  [["#F98080", "#FFFFFF", "#FDF2F2", "#FDE8E8"], ["#fff"]]
129
- ], nt = Dt.map((t, e) => {
115
+ ], Ze = yt.map((t, e) => {
130
116
  const [n, s] = t, [r, a, o, u] = n, [l] = s;
131
117
  return {
132
118
  name: `table-default-${e}`,
@@ -173,7 +159,7 @@ const x = {
173
159
  }
174
160
  };
175
161
  });
176
- class z {
162
+ class j {
177
163
  constructor(e, n) {
178
164
  b(this, "dataType");
179
165
  b(this, "id");
@@ -181,7 +167,7 @@ class z {
181
167
  b(this, "formula");
182
168
  b(this, "meta");
183
169
  b(this, "style");
184
- this.id = e, this.displayName = n, this.dataType = Xe.String, this.formula = "", this.meta = {}, this.style = {};
170
+ this.id = e, this.displayName = n, this.dataType = je.String, this.formula = "", this.meta = {}, this.style = {};
185
171
  }
186
172
  getMeta() {
187
173
  return this.meta;
@@ -206,45 +192,45 @@ class z {
206
192
  this.id = e.id, this.displayName = e.displayName, this.dataType = e.dataType, this.formula = e.formula, this.meta = e.meta, this.style = e.style;
207
193
  }
208
194
  }
209
- const xt = (t) => t.getMonth() <= 2, Ot = (t) => {
195
+ const Nt = (t) => t.getMonth() <= 2, Dt = (t) => {
210
196
  const e = t.getMonth();
211
197
  return e > 2 && e <= 5;
212
- }, Ut = (t) => {
198
+ }, xt = (t) => {
213
199
  const e = t.getMonth();
214
200
  return e > 5 && e <= 8;
215
- }, $t = (t) => {
201
+ }, Ot = (t) => {
216
202
  const e = t.getMonth();
217
203
  return e > 8 && e <= 11;
218
- }, At = (t) => t.getMonth() === 0, Lt = (t) => t.getMonth() === 1, Et = (t) => t.getMonth() === 2, Bt = (t) => t.getMonth() === 3, Wt = (t) => t.getMonth() === 4, Ht = (t) => t.getMonth() === 5, Vt = (t) => t.getMonth() === 6, Pt = (t) => t.getMonth() === 7, qt = (t) => t.getMonth() === 8, Jt = (t) => t.getMonth() === 9, kt = (t) => t.getMonth() === 10, Qt = (t) => t.getMonth() === 11, Yt = (t, e = /* @__PURE__ */ new Date()) => t.toDateString() === e.toDateString(), Gt = (t, e = /* @__PURE__ */ new Date()) => {
204
+ }, Ut = (t) => t.getMonth() === 0, $t = (t) => t.getMonth() === 1, At = (t) => t.getMonth() === 2, Bt = (t) => t.getMonth() === 3, Et = (t) => t.getMonth() === 4, Lt = (t) => t.getMonth() === 5, Wt = (t) => t.getMonth() === 6, Ht = (t) => t.getMonth() === 7, Vt = (t) => t.getMonth() === 8, Pt = (t) => t.getMonth() === 9, qt = (t) => t.getMonth() === 10, Jt = (t) => t.getMonth() === 11, kt = (t, e = /* @__PURE__ */ new Date()) => t.toDateString() === e.toDateString(), Qt = (t, e = /* @__PURE__ */ new Date()) => {
219
205
  const n = new Date(e);
220
206
  return n.setDate(n.getDate() + 1), t.toDateString() === n.toDateString();
221
- }, jt = (t, e = /* @__PURE__ */ new Date()) => {
207
+ }, Yt = (t, e = /* @__PURE__ */ new Date()) => {
222
208
  const n = new Date(e);
223
209
  return n.setDate(n.getDate() - 1), t.toDateString() === n.toDateString();
224
210
  }, K = (t) => {
225
211
  const e = t.getDay(), n = t.getDate() - e + (e === 0 ? -6 : 1), s = new Date(t);
226
212
  return s.setDate(n), s;
227
- }, st = 10080 * 60 * 1e3, zt = (t, e = /* @__PURE__ */ new Date()) => {
213
+ }, et = 10080 * 60 * 1e3, Gt = (t, e = /* @__PURE__ */ new Date()) => {
228
214
  const n = K(t), s = K(e);
229
215
  return n.toDateString() === s.toDateString();
230
- }, Kt = (t, e = /* @__PURE__ */ new Date()) => {
231
- const n = K(t), s = new Date(K(e).getTime() + st);
216
+ }, zt = (t, e = /* @__PURE__ */ new Date()) => {
217
+ const n = K(t), s = new Date(K(e).getTime() + et);
232
218
  return n.toDateString() === s.toDateString();
233
- }, Xt = (t, e = /* @__PURE__ */ new Date()) => {
234
- const n = K(t), s = new Date(K(e).getTime() - st);
219
+ }, jt = (t, e = /* @__PURE__ */ new Date()) => {
220
+ const n = K(t), s = new Date(K(e).getTime() - et);
235
221
  return n.toDateString() === s.toDateString();
236
- }, Zt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth(), en = (t) => {
222
+ }, Kt = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth(), Xt = (t) => {
237
223
  const e = new Date(t);
238
224
  return e.setHours(0, 0, 0, 0), e.setDate(1), e;
239
- }, tn = (t, e = /* @__PURE__ */ new Date()) => {
225
+ }, Zt = (t, e = /* @__PURE__ */ new Date()) => {
240
226
  const n = new Date(e);
241
227
  n.setHours(0, 0, 0, 0), n.setMonth(n.getMonth() + 1, 1);
242
228
  const s = new Date(n);
243
229
  s.setMonth(s.getMonth() + 1, 0);
244
230
  const r = t.getTime();
245
231
  return r >= n.getTime() && r < s.getTime();
246
- }, nn = (t, e = /* @__PURE__ */ new Date()) => {
247
- const n = en(e), s = new Date(n);
232
+ }, en = (t, e = /* @__PURE__ */ new Date()) => {
233
+ const n = Xt(e), s = new Date(n);
248
234
  s.setMonth(s.getMonth() + 1, 0);
249
235
  const r = t.getTime();
250
236
  return r >= n.getTime() && r < s.getTime();
@@ -253,32 +239,32 @@ const xt = (t) => t.getMonth() <= 2, Ot = (t) => {
253
239
  e.setHours(0, 0, 0, 0), e.setDate(1);
254
240
  const n = e.getMonth();
255
241
  return e.setMonth(n - n % 3), e;
256
- }, sn = (t, e = /* @__PURE__ */ new Date()) => {
242
+ }, tn = (t, e = /* @__PURE__ */ new Date()) => {
257
243
  const n = Te(e), s = new Date(n);
258
244
  s.setMonth(s.getMonth() + 3);
259
245
  const r = t.getTime();
260
246
  return r >= n.getTime() && r < s.getTime();
261
- }, rn = (t, e = /* @__PURE__ */ new Date()) => {
247
+ }, nn = (t, e = /* @__PURE__ */ new Date()) => {
262
248
  const n = Te(e), s = new Date(n);
263
249
  s.setMonth(s.getMonth() + 3);
264
250
  const r = new Date(s);
265
251
  r.setMonth(r.getMonth() + 3, 0);
266
252
  const a = t.getTime();
267
253
  return a >= s.getTime() && a < r.getTime();
268
- }, an = (t, e = /* @__PURE__ */ new Date()) => {
254
+ }, sn = (t, e = /* @__PURE__ */ new Date()) => {
269
255
  const n = Te(e), s = new Date(n);
270
256
  s.setMonth(s.getMonth() - 3);
271
257
  const r = new Date(n);
272
258
  r.setDate(0);
273
259
  const a = t.getTime();
274
260
  return a >= s.getTime() && a < r.getTime();
275
- }, on = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear(), ln = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() + 1, un = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() - 1, cn = (t, e = /* @__PURE__ */ new Date()) => {
261
+ }, rn = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear(), an = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() + 1, on = (t, e = /* @__PURE__ */ new Date()) => t.getFullYear() === e.getFullYear() - 1, ln = (t, e = /* @__PURE__ */ new Date()) => {
276
262
  const n = new Date(e);
277
263
  n.setHours(0, 0, 0, 0), n.setMonth(0, 1);
278
264
  const s = t.getTime();
279
265
  return s >= n.getTime() && s < e.getTime();
280
266
  };
281
- function dn(t) {
267
+ function un(t) {
282
268
  switch (t.compareType) {
283
269
  case m.Equal: {
284
270
  const e = new Date(t.expectedValue);
@@ -316,105 +302,105 @@ function dn(t) {
316
302
  };
317
303
  case m.Today: {
318
304
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
319
- return (n) => Yt(n, e);
305
+ return (n) => kt(n, e);
320
306
  }
321
307
  case m.Yesterday: {
322
308
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
323
- return (n) => jt(n, e);
309
+ return (n) => Yt(n, e);
324
310
  }
325
311
  case m.Tomorrow: {
326
312
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
327
- return (n) => Gt(n, e);
313
+ return (n) => Qt(n, e);
328
314
  }
329
315
  case m.ThisWeek: {
330
316
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
331
- return (n) => zt(n, e);
317
+ return (n) => Gt(n, e);
332
318
  }
333
319
  case m.LastWeek: {
334
320
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
335
- return (n) => Xt(n, e);
321
+ return (n) => jt(n, e);
336
322
  }
337
323
  case m.NextWeek: {
338
324
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
339
- return (n) => Kt(n, e);
325
+ return (n) => zt(n, e);
340
326
  }
341
327
  case m.ThisMonth: {
342
328
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
343
- return (n) => Zt(n, e);
329
+ return (n) => Kt(n, e);
344
330
  }
345
331
  case m.LastMonth: {
346
332
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
347
- return (n) => nn(n, e);
333
+ return (n) => en(n, e);
348
334
  }
349
335
  case m.NextMonth: {
350
336
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
351
- return (n) => tn(n, e);
337
+ return (n) => Zt(n, e);
352
338
  }
353
339
  case m.ThisQuarter: {
354
340
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
355
- return (n) => sn(n, e);
341
+ return (n) => tn(n, e);
356
342
  }
357
343
  case m.LastQuarter: {
358
344
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
359
- return (n) => an(n, e);
345
+ return (n) => sn(n, e);
360
346
  }
361
347
  case m.NextQuarter: {
362
348
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
363
- return (n) => rn(n, e);
349
+ return (n) => nn(n, e);
364
350
  }
365
351
  case m.ThisYear: {
366
352
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
367
- return (n) => on(n, e);
353
+ return (n) => rn(n, e);
368
354
  }
369
355
  case m.LastYear: {
370
356
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
371
- return (n) => un(n, e);
357
+ return (n) => on(n, e);
372
358
  }
373
359
  case m.NextYear: {
374
360
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
375
- return (n) => ln(n, e);
361
+ return (n) => an(n, e);
376
362
  }
377
363
  case m.YearToDate: {
378
364
  const e = t.anchorTime ? new Date(t.anchorTime) : /* @__PURE__ */ new Date();
379
- return (n) => cn(n, e);
365
+ return (n) => ln(n, e);
380
366
  }
381
367
  case m.M1:
382
- return At;
368
+ return Ut;
383
369
  case m.M2:
384
- return Lt;
370
+ return $t;
385
371
  case m.M3:
386
- return Et;
372
+ return At;
387
373
  case m.M4:
388
374
  return Bt;
389
375
  case m.M5:
390
- return Wt;
376
+ return Et;
391
377
  case m.M6:
392
- return Ht;
378
+ return Lt;
393
379
  case m.M7:
394
- return Vt;
380
+ return Wt;
395
381
  case m.M8:
396
- return Pt;
382
+ return Ht;
397
383
  case m.M9:
398
- return qt;
384
+ return Vt;
399
385
  case m.M10:
400
- return Jt;
386
+ return Pt;
401
387
  case m.M11:
402
- return kt;
388
+ return qt;
403
389
  case m.M12:
404
- return Qt;
390
+ return Jt;
405
391
  case m.Q1:
406
- return xt;
392
+ return Nt;
407
393
  case m.Q2:
408
- return Ot;
394
+ return Dt;
409
395
  case m.Q3:
410
- return Ut;
396
+ return xt;
411
397
  case m.Q4:
412
- return $t;
398
+ return Ot;
413
399
  default:
414
400
  throw new Error("Unsupported compare type");
415
401
  }
416
402
  }
417
- class hn {
403
+ class cn {
418
404
  /**
419
405
  * Initializes a new instance of the Heap class.
420
406
  */
@@ -478,7 +464,7 @@ class hn {
478
464
  return this.heap.includes(e);
479
465
  }
480
466
  }
481
- class gn extends hn {
467
+ class dn extends cn {
482
468
  /**
483
469
  * Initializes a new instance of the MinHeap class.
484
470
  */
@@ -517,13 +503,13 @@ class gn extends hn {
517
503
  this.heap[0] = this.heap.pop(), this.shiftDown(0);
518
504
  }
519
505
  }
520
- const mn = (t, e) => {
521
- const n = new gn();
506
+ const hn = (t, e) => {
507
+ const n = new dn();
522
508
  for (const s of t)
523
509
  n.insert(s), n.size() > e && n.pop();
524
510
  return n.heap;
525
- }, bn = (t, e) => t > e, wn = (t, e) => t < e, fn = (t, e, n) => mn(t, e).includes(n);
526
- function pn(t, e) {
511
+ }, gn = (t, e) => t > e, mn = (t, e) => t < e, bn = (t, e, n) => hn(t, e).includes(n);
512
+ function wn(t, e) {
527
513
  switch (t.compareType) {
528
514
  case F.Equal: {
529
515
  const n = Number(t.expectedValue);
@@ -559,84 +545,84 @@ function pn(t, e) {
559
545
  }
560
546
  case F.Above: {
561
547
  const n = e.average;
562
- return (s) => bn(s, n);
548
+ return (s) => gn(s, n);
563
549
  }
564
550
  case F.Below: {
565
551
  const n = e.average;
566
- return (s) => wn(s, n);
552
+ return (s) => mn(s, n);
567
553
  }
568
554
  case F.TopN: {
569
555
  const n = e.list, s = Number(t.expectedValue);
570
- return (r) => fn(n, s, r);
556
+ return (r) => bn(n, s, r);
571
557
  }
572
558
  }
573
559
  }
574
- const Sn = (t, e) => Z(e).test(t), _n = (t, e) => !Z(e).test(t), Cn = (t, e) => Z(`*${e}*`).test(t), Rn = (t, e) => !Z(`*${e}*`).test(t), Tn = (t, e) => Z(`${e}*`).test(t), In = (t, e) => Z(`*${e}`).test(t);
575
- function Mn(t) {
560
+ const fn = (t, e) => Z(e).test(t), pn = (t, e) => !Z(e).test(t), Sn = (t, e) => Z(`*${e}*`).test(t), _n = (t, e) => !Z(`*${e}*`).test(t), Rn = (t, e) => Z(`${e}*`).test(t), Cn = (t, e) => Z(`*${e}`).test(t);
561
+ function Tn(t) {
576
562
  switch (t.compareType) {
577
563
  case P.Equal:
578
- return (e) => Sn(e, t.expectedValue);
564
+ return (e) => fn(e, t.expectedValue);
579
565
  case P.NotEqual:
580
- return (e) => _n(e, t.expectedValue);
566
+ return (e) => pn(e, t.expectedValue);
581
567
  case P.Contains:
582
- return (e) => Cn(e, t.expectedValue);
568
+ return (e) => Sn(e, t.expectedValue);
583
569
  case P.NotContains:
584
- return (e) => Rn(e, t.expectedValue);
570
+ return (e) => _n(e, t.expectedValue);
585
571
  case P.StartsWith:
586
- return (e) => Tn(e, t.expectedValue);
572
+ return (e) => Rn(e, t.expectedValue);
587
573
  case P.EndsWith:
588
- return (e) => In(e, t.expectedValue);
574
+ return (e) => Cn(e, t.expectedValue);
589
575
  default:
590
576
  return console.error(`Unknown filter operator: ${t.compareType}`), (e) => !0;
591
577
  }
592
578
  }
593
- const vn = /* @__PURE__ */ new Set([
579
+ const In = /* @__PURE__ */ new Set([
594
580
  F.Above,
595
581
  F.Below,
596
582
  F.TopN
597
583
  ]);
598
584
  m.Today, m.Yesterday, m.Tomorrow, m.ThisWeek, m.LastWeek, m.NextWeek, m.ThisMonth, m.LastMonth, m.NextMonth, m.ThisQuarter, m.LastQuarter, m.NextQuarter, m.NextYear, m.ThisYear, m.LastYear, m.YearToDate;
599
- function rt(t) {
600
- return vn.has(t);
585
+ function tt(t) {
586
+ return In.has(t);
601
587
  }
602
- function Fn(t, e) {
603
- if (rt(t.filterInfo.compareType))
588
+ function Mn(t, e) {
589
+ if (tt(t.filterInfo.compareType))
604
590
  return (n) => !0;
605
591
  switch (t.filterInfo.conditionType) {
606
- case U.Date:
607
- return dn(t.filterInfo);
608
- case U.Number:
609
- return pn(t.filterInfo, e);
610
- case U.String:
611
- return Mn(t.filterInfo);
612
- case U.Logic:
592
+ case O.Date:
593
+ return un(t.filterInfo);
594
+ case O.Number:
595
+ return wn(t.filterInfo, e);
596
+ case O.String:
597
+ return Tn(t.filterInfo);
598
+ case O.Logic:
613
599
  default:
614
600
  return (n) => !0;
615
601
  }
616
602
  }
617
603
  function ue(t, e, n, s) {
618
604
  switch (s) {
619
- case U.Date: {
605
+ case O.Date: {
620
606
  const r = xe(t, e, n);
621
- return r ? Dn(r) : null;
607
+ return r ? yn(r) : null;
622
608
  }
623
- case U.Number:
609
+ case O.Number:
624
610
  return xe(t, e, n);
625
- case U.String:
611
+ case O.String:
626
612
  default:
627
- return yn(t, e, n);
613
+ return Fn(t, e, n);
628
614
  }
629
615
  }
630
- const Nn = (t) => {
616
+ const vn = (t) => {
631
617
  var n;
632
618
  return ((n = t.body) == null ? void 0 : n.dataStream.replace(/\r\n$/, "")) || "";
633
619
  };
634
- function yn(t, e, n) {
620
+ function Fn(t, e, n) {
635
621
  const s = t.getCell(e, n);
636
622
  if (!s) return null;
637
623
  const { v: r, t: a, p: o } = s;
638
624
  if (o)
639
- return Nn(o);
625
+ return vn(o);
640
626
  if (typeof r == "string")
641
627
  return a === J.BOOLEAN ? r.toUpperCase() : r;
642
628
  if (typeof r == "number")
@@ -651,7 +637,7 @@ function xe(t, e, n) {
651
637
  const { v: r, t: a, p: o } = s;
652
638
  return o ? null : typeof r == "string" && a === J.NUMBER ? Number(t.getCellRaw(e, n).v) : Number(r);
653
639
  }
654
- function Dn(t) {
640
+ function yn(t) {
655
641
  const e = new Date(Date.UTC(1900, 0, 1, 0, 0, 0)), n = new Date(Date.UTC(1900, 1, 28, 0, 0, 0));
656
642
  let s = t - 1;
657
643
  return s > (n.getTime() - e.getTime()) / (1e3 * 3600 * 24) && (s -= 1), s < 0 && (s = t), new Date(e.getTime() + s * (1e3 * 3600 * 24));
@@ -675,7 +661,7 @@ class Oe {
675
661
  getFilterState(e) {
676
662
  var s;
677
663
  const n = ((s = this._tableSortInfo) == null ? void 0 : s.columnIndex) === e ? this._tableSortInfo.sortState : G.None;
678
- return Nt(this._tableColumnFilterList[e], n);
664
+ return vt(this._tableColumnFilterList[e], n);
679
665
  }
680
666
  getSortState() {
681
667
  var e;
@@ -701,7 +687,7 @@ class Oe {
701
687
  if (a && e) {
702
688
  const { startRow: o, endRow: u, startColumn: l } = n, i = l + s, h = this.getExecuteFunc(e, n, s, a);
703
689
  for (let d = o; d <= u; d++) {
704
- const c = yt(a) ? a.filterInfo.conditionType : U.String;
690
+ const c = Ft(a) ? a.filterInfo.conditionType : O.String;
705
691
  ue(e, d, i, c) === null ? r.add(d) : h(ue(e, d, i, c)) || r.add(d);
706
692
  }
707
693
  }
@@ -710,7 +696,7 @@ class Oe {
710
696
  const { startRow: r, endRow: a, startColumn: o } = n, u = o + s, l = [];
711
697
  let i = 0, h = 0;
712
698
  for (let d = r; d <= a; d++) {
713
- const c = ue(e, d, u, U.Number);
699
+ const c = ue(e, d, u, O.Number);
714
700
  c !== null && (l.push(c), i++, h += c);
715
701
  }
716
702
  return {
@@ -723,8 +709,8 @@ class Oe {
723
709
  const a = new Set(r.values);
724
710
  return (o) => a.has(o);
725
711
  } else if (r.filterType === ne.condition) {
726
- const o = rt(r.filterInfo.compareType) ? this._getNumberCalculatedOptions(e, n, s) : void 0;
727
- return Fn(r, o);
712
+ const o = tt(r.filterInfo.compareType) ? this._getNumberCalculatedOptions(e, n, s) : void 0;
713
+ return Mn(r, o);
728
714
  } else
729
715
  return (a) => !0;
730
716
  }
@@ -767,8 +753,8 @@ class Ue {
767
753
  for (let l = r; l <= a; l++) {
768
754
  const i = l - r;
769
755
  let h, d;
770
- (u = n.columns) != null && u[i] ? (h = n.columns[i].id, d = n.columns[i].displayName) : (h = B(), d = e[l - r]);
771
- const c = new z(h, d);
756
+ (u = n.columns) != null && u[i] ? (h = n.columns[i].id, d = n.columns[i].displayName) : (h = L(), d = e[l - r]);
757
+ const c = new j(h, d);
772
758
  this._columns.set(h, c), this._columnOrder.push(h);
773
759
  }
774
760
  n.filters && n.filters.forEach((i, h) => {
@@ -795,7 +781,7 @@ class Ue {
795
781
  }
796
782
  setColumns(e) {
797
783
  this._columns.clear(), this._columnOrder = [], e.forEach((n) => {
798
- const s = new z(n.id, n.displayName);
784
+ const s = new j(n.id, n.displayName);
799
785
  s.fromJSON(n), this._columns.set(n.id, s), this._columnOrder.push(n.id);
800
786
  });
801
787
  }
@@ -856,7 +842,7 @@ class Ue {
856
842
  }
857
843
  getTableStyleId() {
858
844
  var e;
859
- return (e = this._tableStyleId) != null ? e : nt[0].name;
845
+ return (e = this._tableStyleId) != null ? e : Ze[0].name;
860
846
  }
861
847
  setTableStyleId(e) {
862
848
  this._tableStyleId = e;
@@ -919,7 +905,7 @@ class Ue {
919
905
  fromJSON(e) {
920
906
  var s, r;
921
907
  this._id = e.id, this._name = e.name, this._range = e.range, this.tableMeta = e.meta, this._tableStyleId = e.options.tableStyleId || "", this._showHeader = (s = e.options.showHeader) != null ? s : !0, this._showFooter = (r = e.options.showFooter) != null ? r : !0, e.columns.forEach((a) => {
922
- const o = new z(a.id, a.displayName);
908
+ const o = new j(a.id, a.displayName);
923
909
  o.fromJSON(a), this._columns.set(a.id, o), this._columnOrder.push(a.id);
924
910
  }), this._tableFilters = new Oe(), this._tableFilters.fromJSON(e.filters);
925
911
  }
@@ -927,12 +913,12 @@ class Ue {
927
913
  this._id = "", this._name = "", this._tableStyleId = "", this._showHeader = !0, this._showFooter = !0, delete this._range, this._columns.clear(), this._columnOrder = [];
928
914
  }
929
915
  }
930
- var xn = Object.getOwnPropertyDescriptor, On = (t, e, n, s) => {
931
- for (var r = s > 1 ? void 0 : s ? xn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
916
+ var Nn = Object.getOwnPropertyDescriptor, Dn = (t, e, n, s) => {
917
+ for (var r = s > 1 ? void 0 : s ? Nn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
932
918
  (o = t[a]) && (r = o(r) || r);
933
919
  return r;
934
920
  }, $e = (t, e) => (n, s) => e(n, s, t);
935
- let T = class extends H {
921
+ let C = class extends H {
936
922
  constructor(e, n) {
937
923
  super();
938
924
  b(this, "_tableMap");
@@ -948,7 +934,7 @@ let T = class extends H {
948
934
  b(this, "tableThemeChanged$", this._tableThemeChanged$.asObservable());
949
935
  b(this, "_tableFilterChanged$", new Y());
950
936
  b(this, "tableFilterChanged$", this._tableFilterChanged$.asObservable());
951
- b(this, "_tableInitStatus", new Ke(!1));
937
+ b(this, "_tableInitStatus", new ze(!1));
952
938
  b(this, "tableInitStatus$", this._tableInitStatus.asObservable());
953
939
  this._univerInstanceService = e, this._localeService = n, this._tableMap = /* @__PURE__ */ new Map();
954
940
  }
@@ -959,7 +945,7 @@ let T = class extends H {
959
945
  var d;
960
946
  const a = (d = this._univerInstanceService.getUnit(e)) == null ? void 0 : d.getSheetBySheetId(n), { startRow: o, startColumn: u, endColumn: l } = s, i = [], h = r != null ? r : "Column";
961
947
  for (let c = u; c <= l; c++)
962
- i.push(Ze(a == null ? void 0 : a.getCell(o, c)) || te(c - u + 1, h));
948
+ i.push(Ke(a == null ? void 0 : a.getCell(o, c)) || te(c - u + 1, h));
963
949
  return i;
964
950
  }
965
951
  /**
@@ -975,7 +961,7 @@ let T = class extends H {
975
961
  */
976
962
  addTable(e, n, s, r, a, o, u) {
977
963
  var c;
978
- const l = o != null ? o : B(), i = a || this.getColumnHeader(e, n, r), h = new Ue(l, s, r, i, u);
964
+ const l = o != null ? o : L(), i = a || this.getColumnHeader(e, n, r), h = new Ue(l, s, r, i, u);
979
965
  if (h.setSubunitId(n), this._ensureUnit(e).set(l, h), this._tableAdd$.next({
980
966
  unitId: e,
981
967
  subUnitId: n,
@@ -1104,10 +1090,10 @@ let T = class extends H {
1104
1090
  else if (o === "column") {
1105
1091
  d.endColumn += l;
1106
1092
  for (let c = 0; c < l; c++) {
1107
- const g = this._localeService.t("sheets-table.columnPrefix"), _ = new z(B(), te(r.getColumnsCount() + 1 + c, g));
1093
+ const g = this._localeService.t("sheets-table.columnPrefix"), _ = new j(L(), te(r.getColumnsCount() + 1 + c, g));
1108
1094
  i != null && i[c] && _.fromJSON(i[c]);
1109
- const f = u + c - h.startColumn;
1110
- r.insertColumn(f, _);
1095
+ const w = u + c - h.startColumn;
1096
+ r.insertColumn(w, _);
1111
1097
  }
1112
1098
  }
1113
1099
  } else if (o === "row")
@@ -1134,7 +1120,7 @@ let T = class extends H {
1134
1120
  if (o.startColumn < a.startColumn) {
1135
1121
  const u = a.startColumn - o.startColumn, l = this._localeService.t("sheets-table.columnPrefix");
1136
1122
  for (let i = 0; i < u; i++)
1137
- r.insertColumn(a.startColumn, new z(B(), te(r.getColumnsCount() + 1, l)));
1123
+ r.insertColumn(a.startColumn, new j(L(), te(r.getColumnsCount() + 1, l)));
1138
1124
  } else if (o.startColumn > a.startColumn) {
1139
1125
  const u = o.startColumn - a.startColumn;
1140
1126
  for (let l = u - 1; l >= 0; l--) {
@@ -1151,7 +1137,7 @@ let T = class extends H {
1151
1137
  } else if (o.endColumn > a.endColumn) {
1152
1138
  const u = o.endColumn - a.endColumn;
1153
1139
  for (let l = 0; l < u; l++)
1154
- r.insertColumn(a.endColumn, new z(B(), te(r.getColumnsCount() + 1, "Column")));
1140
+ r.insertColumn(a.endColumn, new j(L(), te(r.getColumnsCount() + 1, "Column")));
1155
1141
  }
1156
1142
  r.setRange(o), this._tableRangeChanged$.next({
1157
1143
  unitId: e,
@@ -1241,15 +1227,15 @@ let T = class extends H {
1241
1227
  }), this._tableMap.clear();
1242
1228
  }
1243
1229
  };
1244
- T = On([
1245
- $e(0, A),
1246
- $e(1, C(be))
1247
- ], T);
1248
- var Un = Object.getOwnPropertyDescriptor, $n = (t, e, n, s) => {
1249
- for (var r = s > 1 ? void 0 : s ? Un(e, n) : e, a = t.length - 1, o; a >= 0; a--)
1230
+ C = Dn([
1231
+ $e(0, B),
1232
+ $e(1, R(be))
1233
+ ], C);
1234
+ var xn = Object.getOwnPropertyDescriptor, On = (t, e, n, s) => {
1235
+ for (var r = s > 1 ? void 0 : s ? xn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
1250
1236
  (o = t[a]) && (r = o(r) || r);
1251
1237
  return r;
1252
- }, An = (t, e) => (n, s) => e(n, s, t);
1238
+ }, Un = (t, e) => (n, s) => e(n, s, t);
1253
1239
  let X = class extends H {
1254
1240
  constructor(t) {
1255
1241
  super(), this._tableManager = t;
@@ -1290,64 +1276,54 @@ let X = class extends H {
1290
1276
  addFilter(t, e, n, s) {
1291
1277
  this._tableManager.addFilter(t, e, n, s);
1292
1278
  }
1293
- getCellValueWithConditionType(t, e, n, s = U.String) {
1279
+ getCellValueWithConditionType(t, e, n, s = O.String) {
1294
1280
  return ue(t, e, n, s);
1295
1281
  }
1296
1282
  };
1297
- X = $n([
1298
- An(0, C(T))
1283
+ X = On([
1284
+ Un(0, R(C))
1299
1285
  ], X);
1300
1286
  const k = {
1301
1287
  id: "sheet.mutation.add-table",
1302
- type: y.MUTATION,
1288
+ type: N.MUTATION,
1303
1289
  handler: (t, e) => {
1304
1290
  const { tableId: n, unitId: s, subUnitId: r, name: a, range: o, header: u, options: l } = e;
1305
1291
  return t.get(X).addTable(s, r, a, o, u, n, l), !0;
1306
1292
  }
1307
1293
  }, Q = {
1308
1294
  id: "sheet.mutation.delete-table",
1309
- type: y.MUTATION,
1295
+ type: N.MUTATION,
1310
1296
  handler: (t, e) => {
1311
1297
  const { unitId: n, subUnitId: s, tableId: r } = e;
1312
1298
  return t.get(X).deleteTable(n, s, r), !0;
1313
1299
  }
1314
- }, Ln = {
1300
+ }, $n = {
1315
1301
  id: "sheet.command.add-table",
1316
- type: y.COMMAND,
1302
+ type: N.COMMAND,
1317
1303
  handler: (t, e) => {
1318
- var p;
1304
+ var w;
1319
1305
  if (!e)
1320
1306
  return !1;
1321
- const n = t.get(L), s = t.get(D), r = t.get(be), a = t.get(T), o = (p = e.id) != null ? p : B(), u = et(e.unitId, {
1322
- univerInstanceService: t.get(A),
1323
- tableManager: a,
1324
- definedNamesService: t.get(Pe)
1325
- });
1326
- let l = e.name;
1327
- if (!l || !Be(l.toLowerCase(), u)) {
1328
- const w = r.t("sheets-table.tablePrefix");
1329
- let R = a.getTableList(e.unitId).length + 1;
1330
- for (const O of u)
1331
- if (O.startsWith(w.toLowerCase())) {
1332
- const I = Number(O.slice(w.length));
1333
- Number.isInteger(I) && I >= R && (R = I + 1);
1334
- }
1335
- l = `${w}${R}`;
1307
+ const n = t.get(A), s = t.get(D), r = t.get(be), a = (w = e.id) != null ? w : L();
1308
+ let o = e.name;
1309
+ if (!o) {
1310
+ const f = t.get(C).getTableList(e.unitId).length;
1311
+ o = `${r.t("sheets-table.tablePrefix")}${f + 1}`;
1336
1312
  }
1337
- const i = [], h = [], { unitId: d, subUnitId: c, range: g } = e, _ = a.getColumnHeader(d, c, g, r.t("sheets-table.columnPrefix"));
1338
- return i.push({ id: k.id, params: { ...e, tableId: o, name: l, header: _ } }), h.push({ id: Q.id, params: { tableId: o, unitId: e.unitId } }), E(i, s) && n.pushUndoRedo({
1313
+ const u = [], l = [], i = t.get(C), { unitId: h, subUnitId: d, range: c } = e, g = i.getColumnHeader(h, d, c, r.t("sheets-table.columnPrefix"));
1314
+ return u.push({ id: k.id, params: { ...e, tableId: a, name: o, header: g } }), l.push({ id: Q.id, params: { tableId: a, unitId: e.unitId } }), E(u, s) && n.pushUndoRedo({
1339
1315
  unitID: e.unitId,
1340
- undoMutations: h,
1341
- redoMutations: i
1316
+ undoMutations: l,
1317
+ redoMutations: u
1342
1318
  }), !0;
1343
1319
  }
1344
- }, En = {
1320
+ }, An = {
1345
1321
  id: "sheet.command.delete-table",
1346
- type: y.COMMAND,
1322
+ type: N.COMMAND,
1347
1323
  handler: (t, e) => {
1348
1324
  if (!e)
1349
1325
  return !1;
1350
- const n = t.get(L), s = t.get(D), r = t.get(T), a = t.get(We), o = [], u = [], l = r.getTable(e.unitId, e.tableId), i = l == null ? void 0 : l.toJSON();
1326
+ const n = t.get(A), s = t.get(D), r = t.get(C), a = t.get(Le), o = [], u = [], l = r.getTable(e.unitId, e.tableId), i = l == null ? void 0 : l.toJSON();
1351
1327
  return i ? (o.push({ id: Q.id, params: { ...e } }), u.push({
1352
1328
  id: k.id,
1353
1329
  params: {
@@ -1364,29 +1340,29 @@ const k = {
1364
1340
  redoMutations: o
1365
1341
  }), !0) : (a.error("[TableManager]: Table not found"), !1);
1366
1342
  }
1367
- }, Ce = {
1343
+ }, Re = {
1368
1344
  id: "sheet.mutation.set-table-filter",
1369
- type: y.MUTATION,
1345
+ type: N.MUTATION,
1370
1346
  handler: (t, e) => {
1371
1347
  const { tableId: n, unitId: s, column: r, tableFilter: a } = e;
1372
- return t.get(T).addFilter(s, n, r, a), !0;
1348
+ return t.get(C).addFilter(s, n, r, a), !0;
1373
1349
  }
1374
1350
  }, Bn = {
1375
1351
  id: "sheet.command.set-table-filter",
1376
- type: y.COMMAND,
1352
+ type: N.COMMAND,
1377
1353
  handler: (t, e) => {
1378
1354
  if (!e)
1379
1355
  return !1;
1380
- const n = t.get(L), s = t.get(D), r = e.tableId || B(), a = [], o = [];
1381
- return a.push({ id: Ce.id, params: { ...e, tableId: r } }), o.push({ id: Ce.id, params: { ...e, tableId: r, tableFilter: void 0 } }), E(a, s) && n.pushUndoRedo({
1356
+ const n = t.get(A), s = t.get(D), r = e.tableId || L(), a = [], o = [];
1357
+ return a.push({ id: Re.id, params: { ...e, tableId: r } }), o.push({ id: Re.id, params: { ...e, tableId: r, tableFilter: void 0 } }), E(a, s) && n.pushUndoRedo({
1382
1358
  unitID: e.unitId,
1383
1359
  undoMutations: o,
1384
1360
  redoMutations: a
1385
1361
  }), !0;
1386
1362
  }
1387
- }, at = "SHEET_TABLE_PLUGIN", re = "SHEET_TABLE", Wn = "table-custom";
1388
- var Hn = Object.getOwnPropertyDescriptor, Vn = (t, e, n, s) => {
1389
- for (var r = s > 1 ? void 0 : s ? Hn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
1363
+ }, nt = "SHEET_TABLE_PLUGIN", re = "SHEET_TABLE", En = "table-custom";
1364
+ var Ln = Object.getOwnPropertyDescriptor, Wn = (t, e, n, s) => {
1365
+ for (var r = s > 1 ? void 0 : s ? Ln(e, n) : e, a = t.length - 1, o; a >= 0; a--)
1390
1366
  (o = t[a]) && (r = o(r) || r);
1391
1367
  return r;
1392
1368
  }, ae = (t, e) => (n, s) => e(n, s, t);
@@ -1405,7 +1381,7 @@ let W = class extends H {
1405
1381
  return this._tableManager.getTable(e, String(o));
1406
1382
  }
1407
1383
  _ensureTableRangeRTree(e) {
1408
- return this._tableRangeRTree.has(e) || this._tableRangeRTree.set(e, new ct()), this._tableRangeRTree.get(e);
1384
+ return this._tableRangeRTree.has(e) || this._tableRangeRTree.set(e, new it()), this._tableRangeRTree.get(e);
1409
1385
  }
1410
1386
  registerTableChangeEvent() {
1411
1387
  this.disposeWithMe(
@@ -1447,8 +1423,8 @@ let W = class extends H {
1447
1423
  }
1448
1424
  registerTableHeaderInterceptor() {
1449
1425
  this.disposeWithMe(
1450
- this._sheetInterceptorService.intercept(qe.CELL_CONTENT, {
1451
- effect: dt.Value,
1426
+ this._sheetInterceptorService.intercept(Ve.CELL_CONTENT, {
1427
+ effect: lt.Value,
1452
1428
  handler: (e, n, s) => {
1453
1429
  const { row: r, col: a, unitId: o, subUnitId: u } = n, l = this._ensureTableRangeRTree(o);
1454
1430
  if ((e == null ? void 0 : e.v) === void 0 && l) {
@@ -1458,8 +1434,8 @@ let W = class extends H {
1458
1434
  if (d) {
1459
1435
  const c = d.getRange(), g = a - c.startColumn;
1460
1436
  if (c.startRow === r) {
1461
- const f = d.getColumnNameByIndex(g);
1462
- return (!e || e === n.rawData) && (e = { ...n.rawData }), e.v = f, s(e);
1437
+ const w = d.getColumnNameByIndex(g);
1438
+ return (!e || e === n.rawData) && (e = { ...n.rawData }), e.v = w, s(e);
1463
1439
  }
1464
1440
  }
1465
1441
  }
@@ -1490,8 +1466,8 @@ let W = class extends H {
1490
1466
  return {};
1491
1467
  }
1492
1468
  },
1493
- businesses: [j.UNIVER_SHEET],
1494
- pluginName: at,
1469
+ businesses: [z.UNIVER_SHEET],
1470
+ pluginName: nt,
1495
1471
  onLoad: (e, n) => {
1496
1472
  this._fromJSON(e, n);
1497
1473
  },
@@ -1507,8 +1483,8 @@ let W = class extends H {
1507
1483
  // eslint-disable-next-line max-lines-per-function
1508
1484
  getMutations: (e) => {
1509
1485
  var n;
1510
- if (e.id === wt.id) {
1511
- const s = e.params, r = s.unitId || this._univerInstanceService.getCurrentUnitOfType(j.UNIVER_SHEET).getUnitId(), a = s.subUnitId || ((n = this._univerInstanceService.getCurrentUnitOfType(j.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : n.getSheetId());
1486
+ if (e.id === gt.id) {
1487
+ const s = e.params, r = s.unitId || this._univerInstanceService.getCurrentUnitOfType(z.UNIVER_SHEET).getUnitId(), a = s.subUnitId || ((n = this._univerInstanceService.getCurrentUnitOfType(z.UNIVER_SHEET).getActiveSheet()) == null ? void 0 : n.getSheetId());
1512
1488
  if (!r || !a)
1513
1489
  return { redos: [], undos: [] };
1514
1490
  const o = this._tableManager.getTablesBySubunitId(r, a);
@@ -1540,7 +1516,7 @@ let W = class extends H {
1540
1516
  }
1541
1517
  });
1542
1518
  }), { redos: u, undos: l };
1543
- } else if (e.id === ft.id) {
1519
+ } else if (e.id === mt.id) {
1544
1520
  const s = e.params, { unitId: r, subUnitId: a, targetSubUnitId: o } = s;
1545
1521
  if (!r || !a || !o)
1546
1522
  return { redos: [], undos: [] };
@@ -1549,7 +1525,7 @@ let W = class extends H {
1549
1525
  return { redos: [], undos: [] };
1550
1526
  const l = [], i = [];
1551
1527
  return u.forEach((h) => {
1552
- const d = h.toJSON(), c = B();
1528
+ const d = h.toJSON(), c = L();
1553
1529
  l.push({
1554
1530
  id: k.id,
1555
1531
  params: {
@@ -1586,32 +1562,32 @@ let W = class extends H {
1586
1562
  super.dispose(), this._tableRangeRTree.clear();
1587
1563
  }
1588
1564
  };
1589
- W = Vn([
1590
- ae(0, C(A)),
1591
- ae(1, C(Re)),
1592
- ae(2, C(T)),
1593
- ae(3, C(ut))
1565
+ W = Wn([
1566
+ ae(0, R(B)),
1567
+ ae(1, R(Ce)),
1568
+ ae(2, R(C)),
1569
+ ae(3, R(ot))
1594
1570
  ], W);
1595
1571
  const S = {
1596
1572
  id: "sheet.mutation.set-sheet-table",
1597
- type: y.MUTATION,
1573
+ type: N.MUTATION,
1598
1574
  handler: (t, e) => {
1599
1575
  if (!e)
1600
1576
  return !1;
1601
1577
  const { unitId: n, tableId: s, config: r } = e;
1602
- return t.get(T).setTableByConfig(n, s, r), !0;
1578
+ return t.get(C).setTableByConfig(n, s, r), !0;
1603
1579
  }
1604
- }, Pn = {
1580
+ }, Hn = {
1605
1581
  id: "sheet.command.add-table-theme",
1606
- type: y.COMMAND,
1582
+ type: N.COMMAND,
1607
1583
  handler: (t, e) => {
1608
1584
  if (!e)
1609
1585
  return !1;
1610
- const n = t.get(T), { unitId: s, tableId: r, themeStyle: a } = e, o = [], u = [], l = n.getTableById(s, r);
1586
+ const n = t.get(C), { unitId: s, tableId: r, themeStyle: a } = e, o = [], u = [], l = n.getTableById(s, r);
1611
1587
  if (!l) return !1;
1612
1588
  const i = l.getSubunitId();
1613
1589
  o.push({
1614
- id: Je.id,
1590
+ id: Pe.id,
1615
1591
  params: {
1616
1592
  unitId: s,
1617
1593
  subUnitId: i,
@@ -1638,7 +1614,7 @@ const S = {
1638
1614
  }
1639
1615
  }
1640
1616
  }), u.push({
1641
- id: ke.id,
1617
+ id: qe.id,
1642
1618
  params: {
1643
1619
  unitId: s,
1644
1620
  subUnitId: i,
@@ -1646,49 +1622,49 @@ const S = {
1646
1622
  }
1647
1623
  });
1648
1624
  const h = t.get(D);
1649
- return E(o, h) && t.get(L).pushUndoRedo({
1625
+ return E(o, h) && t.get(A).pushUndoRedo({
1650
1626
  unitID: s,
1651
1627
  undoMutations: u,
1652
1628
  redoMutations: o
1653
1629
  }), !0;
1654
1630
  }
1655
- }, qn = {
1631
+ }, Vn = {
1656
1632
  id: "sheet.command.remove-table-theme",
1657
- type: y.COMMAND,
1633
+ type: N.COMMAND,
1658
1634
  handler: (t, e) => {
1659
1635
  if (!e)
1660
1636
  return !1;
1661
- const { unitId: n, tableId: s, themeName: r } = e, a = t.get(T), o = t.get(Qe), u = a.getTableById(n, s);
1637
+ const { unitId: n, tableId: s, themeName: r } = e, a = t.get(C), o = t.get(Je), u = a.getTableById(n, s);
1662
1638
  if (!u) return !1;
1663
- const l = u.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((w) => w == null ? void 0 : w.startsWith("table-default"));
1664
- let g = o.getRegisteredRangeThemes().filter((w) => w == null ? void 0 : w.startsWith(Wn)).find((w) => w !== r);
1665
- g || (g = d[0]), i.push({ id: S.id, params: { unitId: n, subUnitId: l, tableId: s, config: { theme: g } } }), i.push({ id: ke.id, params: { unitId: n, subUnitId: l, styleName: r } });
1639
+ const l = u.getSubunitId(), i = [], h = [], d = o.getRegisteredRangeThemes().filter((f) => f == null ? void 0 : f.startsWith("table-default"));
1640
+ let g = o.getRegisteredRangeThemes().filter((f) => f == null ? void 0 : f.startsWith(En)).find((f) => f !== r);
1641
+ g || (g = d[0]), i.push({ id: S.id, params: { unitId: n, subUnitId: l, tableId: s, config: { theme: g } } }), i.push({ id: qe.id, params: { unitId: n, subUnitId: l, styleName: r } });
1666
1642
  const _ = o.getDefaultRangeThemeStyle(r);
1667
- _ && (h.push({ id: Je.id, params: { unitId: n, subUnitId: l, styleJSON: _.toJson() } }), h.push({ id: S.id, params: { unitId: n, subUnitId: l, tableId: s, config: { theme: r } } }));
1668
- const f = t.get(D);
1669
- return E(i, f) && t.get(L).pushUndoRedo({
1643
+ _ && (h.push({ id: Pe.id, params: { unitId: n, subUnitId: l, styleJSON: _.toJson() } }), h.push({ id: S.id, params: { unitId: n, subUnitId: l, tableId: s, config: { theme: r } } }));
1644
+ const w = t.get(D);
1645
+ return E(i, w) && t.get(A).pushUndoRedo({
1670
1646
  unitID: n,
1671
1647
  redoMutations: i,
1672
1648
  undoMutations: h
1673
1649
  }), !0;
1674
1650
  }
1675
- }, Jn = {
1651
+ }, Pn = {
1676
1652
  id: "sheet.command.set-table-config",
1677
- type: y.COMMAND,
1653
+ type: N.COMMAND,
1678
1654
  // eslint-disable-next-line max-lines-per-function
1679
1655
  handler: (t, e) => {
1680
1656
  if (!e)
1681
1657
  return !1;
1682
- const { unitId: n, tableId: s, name: r, updateRange: a, rowColOperation: o, theme: u } = e, l = t.get(T), i = l.getTableById(n, s);
1658
+ const { unitId: n, tableId: s, name: r, updateRange: a, rowColOperation: o, theme: u } = e, l = t.get(C), i = l.getTableById(n, s);
1683
1659
  if (!i) return !1;
1684
- const h = {}, d = {}, c = t.get(be), g = et(n, {
1685
- univerInstanceService: t.get(A),
1686
- tableManager: l,
1687
- definedNamesService: t.get(Pe)
1688
- });
1689
- if (r) {
1690
- if (!Be(r.toLowerCase(), g))
1691
- return t.get(We).warn(c.t("sheets-table.tableNameError")), !1;
1660
+ const h = {}, d = {}, c = t.get(be), _ = t.get(B).getCurrentUnitOfType(z.UNIVER_SHEET), w = /* @__PURE__ */ new Set();
1661
+ if (_ && (_.getSheets().forEach((T) => {
1662
+ w.add(T.getName());
1663
+ }), l.getTableList(n).forEach((T) => {
1664
+ w.add(T.name);
1665
+ })), r) {
1666
+ if (!ut(r, w))
1667
+ return t.get(Le).warn(c.t("sheets-table.tableNameError")), !1;
1692
1668
  h.name = i.getDisplayName(), d.name = r;
1693
1669
  }
1694
1670
  o && (h.rowColOperation = {
@@ -1699,13 +1675,13 @@ const S = {
1699
1675
  }, d.rowColOperation = o), a && (h.updateRange = {
1700
1676
  newRange: i.getRange()
1701
1677
  }, d.updateRange = a), u && (h.theme = i.getTableStyleId(), d.theme = u);
1702
- const _ = {
1678
+ const p = {
1703
1679
  unitId: n,
1704
1680
  subUnitId: i.getSubunitId(),
1705
1681
  tableId: s,
1706
1682
  config: d
1707
1683
  };
1708
- return t.get(D).executeCommand(S.id, _), t.get(L).pushUndoRedo({
1684
+ return t.get(D).executeCommand(S.id, p), t.get(A).pushUndoRedo({
1709
1685
  unitID: n,
1710
1686
  undoMutations: [
1711
1687
  {
@@ -1721,34 +1697,34 @@ const S = {
1721
1697
  redoMutations: [
1722
1698
  {
1723
1699
  id: S.id,
1724
- params: _
1700
+ params: p
1725
1701
  }
1726
1702
  ]
1727
1703
  }), !0;
1728
1704
  }
1729
- }, kn = {
1705
+ }, qn = {
1730
1706
  id: "sheet.command.table-insert-row",
1731
- type: y.COMMAND,
1707
+ type: N.COMMAND,
1732
1708
  handler: (t) => {
1733
- const e = t.get(A), n = $(e);
1709
+ const e = t.get(B), n = $(e);
1734
1710
  if (!n)
1735
1711
  return !1;
1736
1712
  const { workbook: s, worksheet: r, unitId: a, subUnitId: o } = n, l = t.get(we).getCurrentSelections();
1737
1713
  if (!l.length || l.length > 1)
1738
1714
  return !1;
1739
- t.get(T);
1715
+ t.get(C);
1740
1716
  const h = l[0].range, c = t.get(W).getContainerTableWithRange(a, o, h);
1741
1717
  if (!c) return !1;
1742
- const g = h.endRow - h.startRow + 1, f = r.getRowCount() - 1, p = r.getCellMatrix().getDataRange().endRow, w = [], R = [];
1743
- if (f - p < g)
1744
- w.push({
1745
- id: Ye.id,
1718
+ const g = h.endRow - h.startRow + 1, w = r.getRowCount() - 1, p = r.getCellMatrix().getDataRange().endRow, f = [], I = [];
1719
+ if (w - p < g)
1720
+ f.push({
1721
+ id: ke.id,
1746
1722
  params: {
1747
1723
  unitId: a,
1748
1724
  subUnitId: o,
1749
1725
  range: { ...h }
1750
1726
  }
1751
- }), w.push({
1727
+ }), f.push({
1752
1728
  id: S.id,
1753
1729
  params: {
1754
1730
  unitId: a,
@@ -1763,7 +1739,7 @@ const S = {
1763
1739
  }
1764
1740
  }
1765
1741
  }
1766
- }), R.push({
1742
+ }), I.push({
1767
1743
  id: S.id,
1768
1744
  params: {
1769
1745
  unitId: a,
@@ -1775,8 +1751,8 @@ const S = {
1775
1751
  }
1776
1752
  }
1777
1753
  }
1778
- }), R.push({
1779
- id: Ge.id,
1754
+ }), I.push({
1755
+ id: Qe.id,
1780
1756
  params: {
1781
1757
  unitId: a,
1782
1758
  subUnitId: o,
@@ -1785,7 +1761,7 @@ const S = {
1785
1761
  });
1786
1762
  else {
1787
1763
  const v = { ...c.getRange() };
1788
- w.push({
1764
+ f.push({
1789
1765
  id: S.id,
1790
1766
  params: {
1791
1767
  unitId: a,
@@ -1800,7 +1776,7 @@ const S = {
1800
1776
  }
1801
1777
  }
1802
1778
  }
1803
- }), R.push({
1779
+ }), I.push({
1804
1780
  id: S.id,
1805
1781
  params: {
1806
1782
  unitId: a,
@@ -1836,20 +1812,20 @@ const S = {
1836
1812
  }
1837
1813
  }
1838
1814
  );
1839
- ee && (w.push(...ee.redos), R.push(...ee.undos));
1815
+ ee && (f.push(...ee.redos), I.push(...ee.undos));
1840
1816
  }
1841
- const O = t.get(D);
1842
- return E(w, O) && t.get(L).pushUndoRedo({
1817
+ const U = t.get(D);
1818
+ return E(f, U) && t.get(A).pushUndoRedo({
1843
1819
  unitID: a,
1844
- undoMutations: R,
1845
- redoMutations: w
1820
+ undoMutations: I,
1821
+ redoMutations: f
1846
1822
  }), !0;
1847
1823
  }
1848
- }, Qn = {
1824
+ }, Jn = {
1849
1825
  id: "sheet.command.table-insert-col",
1850
- type: y.COMMAND,
1826
+ type: N.COMMAND,
1851
1827
  handler: (t) => {
1852
- const e = t.get(A), n = $(e);
1828
+ const e = t.get(B), n = $(e);
1853
1829
  if (!n)
1854
1830
  return !1;
1855
1831
  const { worksheet: s, unitId: r, subUnitId: a } = n, u = t.get(we).getCurrentSelections();
@@ -1857,10 +1833,10 @@ const S = {
1857
1833
  return !1;
1858
1834
  const i = u[0].range, d = t.get(W).getContainerTableWithRange(r, a, i);
1859
1835
  if (!d) return !1;
1860
- const c = i.endColumn - i.startColumn + 1, _ = s.getColumnCount() - 1, f = s.getCellMatrix().getDataRange().endColumn, p = [], w = [];
1861
- if (_ - f < c)
1836
+ const c = i.endColumn - i.startColumn + 1, _ = s.getColumnCount() - 1, w = s.getCellMatrix().getDataRange().endColumn, p = [], f = [];
1837
+ if (_ - w < c)
1862
1838
  p.push({
1863
- id: je.id,
1839
+ id: Ye.id,
1864
1840
  params: {
1865
1841
  unitId: r,
1866
1842
  subUnitId: a,
@@ -1875,13 +1851,13 @@ const S = {
1875
1851
  config: {
1876
1852
  rowColOperation: {
1877
1853
  operationType: M.Insert,
1878
- rowColType: N.Col,
1854
+ rowColType: y.Col,
1879
1855
  index: i.startColumn,
1880
1856
  count: c
1881
1857
  }
1882
1858
  }
1883
1859
  }
1884
- }), w.push({
1860
+ }), f.push({
1885
1861
  id: S.id,
1886
1862
  params: {
1887
1863
  unitId: r,
@@ -1890,14 +1866,14 @@ const S = {
1890
1866
  config: {
1891
1867
  rowColOperation: {
1892
1868
  operationType: M.Delete,
1893
- rowColType: N.Col,
1869
+ rowColType: y.Col,
1894
1870
  index: i.startColumn,
1895
1871
  count: c
1896
1872
  }
1897
1873
  }
1898
1874
  }
1899
- }), w.push({
1900
- id: ze.id,
1875
+ }), f.push({
1876
+ id: Ge.id,
1901
1877
  params: {
1902
1878
  unitId: r,
1903
1879
  subUnitId: a,
@@ -1905,7 +1881,7 @@ const S = {
1905
1881
  }
1906
1882
  });
1907
1883
  else {
1908
- const I = d.getRange();
1884
+ const T = d.getRange();
1909
1885
  p.push({
1910
1886
  id: S.id,
1911
1887
  params: {
@@ -1915,13 +1891,13 @@ const S = {
1915
1891
  config: {
1916
1892
  rowColOperation: {
1917
1893
  operationType: M.Insert,
1918
- rowColType: N.Col,
1894
+ rowColType: y.Col,
1919
1895
  index: i.startColumn,
1920
1896
  count: c
1921
1897
  }
1922
1898
  }
1923
1899
  }
1924
- }), w.push({
1900
+ }), f.push({
1925
1901
  id: S.id,
1926
1902
  params: {
1927
1903
  unitId: r,
@@ -1930,7 +1906,7 @@ const S = {
1930
1906
  config: {
1931
1907
  rowColOperation: {
1932
1908
  operationType: M.Delete,
1933
- rowColType: N.Col,
1909
+ rowColType: y.Col,
1934
1910
  index: i.startColumn,
1935
1911
  count: c
1936
1912
  }
@@ -1943,39 +1919,39 @@ const S = {
1943
1919
  unitId: r,
1944
1920
  subUnitId: a,
1945
1921
  range: {
1946
- startRow: I.startRow,
1947
- endRow: I.endRow,
1922
+ startRow: T.startRow,
1923
+ endRow: T.endRow,
1948
1924
  startColumn: i.startColumn,
1949
- endColumn: f
1925
+ endColumn: w
1950
1926
  }
1951
1927
  },
1952
1928
  {
1953
1929
  unitId: r,
1954
1930
  subUnitId: a,
1955
1931
  range: {
1956
- startRow: I.startRow,
1957
- endRow: I.endRow,
1932
+ startRow: T.startRow,
1933
+ endRow: T.endRow,
1958
1934
  startColumn: i.startColumn + c,
1959
- endColumn: f + c
1935
+ endColumn: w + c
1960
1936
  }
1961
1937
  }
1962
1938
  );
1963
- v && (p.push(...v.redos), w.push(...v.undos));
1939
+ v && (p.push(...v.redos), f.push(...v.undos));
1964
1940
  }
1965
- const R = t.get(D);
1966
- return E(p, R) && t.get(L).pushUndoRedo({
1941
+ const I = t.get(D);
1942
+ return E(p, I) && t.get(A).pushUndoRedo({
1967
1943
  unitID: r,
1968
- undoMutations: w,
1944
+ undoMutations: f,
1969
1945
  redoMutations: p
1970
1946
  }), !0;
1971
1947
  }
1972
- }, Yn = {
1948
+ }, kn = {
1973
1949
  id: "sheet.command.table-remove-row",
1974
- type: y.COMMAND,
1950
+ type: N.COMMAND,
1975
1951
  handler: (t, e) => {
1976
1952
  if (!e)
1977
1953
  return !1;
1978
- const n = t.get(A), s = $(n);
1954
+ const n = t.get(B), s = $(n);
1979
1955
  if (!s)
1980
1956
  return !1;
1981
1957
  const { unitId: r, subUnitId: a } = s, u = t.get(we).getCurrentSelections();
@@ -1983,7 +1959,7 @@ const S = {
1983
1959
  return !1;
1984
1960
  const i = u[0].range, d = t.get(W).getContainerTableWithRange(r, a, i);
1985
1961
  if (!d) return !1;
1986
- const c = i.endRow - i.startRow + 1, g = [], _ = [], f = d.getRange();
1962
+ const c = i.endRow - i.startRow + 1, g = [], _ = [], w = d.getRange();
1987
1963
  g.push({
1988
1964
  id: S.id,
1989
1965
  params: {
@@ -1993,8 +1969,8 @@ const S = {
1993
1969
  config: {
1994
1970
  updateRange: {
1995
1971
  newRange: {
1996
- ...f,
1997
- endRow: f.endRow - c
1972
+ ...w,
1973
+ endRow: w.endRow - c
1998
1974
  }
1999
1975
  }
2000
1976
  }
@@ -2007,21 +1983,21 @@ const S = {
2007
1983
  tableId: d.getId(),
2008
1984
  config: {
2009
1985
  updateRange: {
2010
- newRange: { ...f }
1986
+ newRange: { ...w }
2011
1987
  }
2012
1988
  }
2013
1989
  }
2014
1990
  });
2015
- const w = s.worksheet.getCellMatrix().getDataRange().endRow, R = fe(
1991
+ const f = s.worksheet.getCellMatrix().getDataRange().endRow, I = fe(
2016
1992
  t,
2017
1993
  {
2018
1994
  unitId: r,
2019
1995
  subUnitId: a,
2020
1996
  range: {
2021
1997
  startRow: i.endRow + 1,
2022
- endRow: w,
2023
- startColumn: f.startColumn,
2024
- endColumn: f.endColumn
1998
+ endRow: f,
1999
+ startColumn: w.startColumn,
2000
+ endColumn: w.endColumn
2025
2001
  }
2026
2002
  },
2027
2003
  {
@@ -2029,37 +2005,37 @@ const S = {
2029
2005
  subUnitId: a,
2030
2006
  range: {
2031
2007
  startRow: i.startRow,
2032
- endRow: w - c,
2033
- startColumn: f.startColumn,
2034
- endColumn: f.endColumn
2008
+ endRow: f - c,
2009
+ startColumn: w.startColumn,
2010
+ endColumn: w.endColumn
2035
2011
  }
2036
2012
  }
2037
2013
  );
2038
- R && (g.push(...R.redos), _.push(...R.undos));
2039
- const O = t.get(D);
2040
- return E(g, O) && t.get(L).pushUndoRedo({
2014
+ I && (g.push(...I.redos), _.push(...I.undos));
2015
+ const U = t.get(D);
2016
+ return E(g, U) && t.get(A).pushUndoRedo({
2041
2017
  unitID: r,
2042
2018
  undoMutations: _,
2043
2019
  redoMutations: g
2044
2020
  }), !0;
2045
2021
  }
2046
- }, Gn = {
2022
+ }, Qn = {
2047
2023
  id: "sheet.command.table-remove-col",
2048
- type: y.COMMAND,
2024
+ type: N.COMMAND,
2049
2025
  handler: (t, e) => {
2050
2026
  if (!e)
2051
2027
  return !1;
2052
- const n = t.get(A), s = $(n);
2028
+ const n = t.get(B), s = $(n);
2053
2029
  if (!s)
2054
2030
  return !1;
2055
2031
  const { workbook: r, unitId: a, subUnitId: o } = s;
2056
- t.get(T);
2032
+ t.get(C);
2057
2033
  const l = t.get(we).getCurrentSelections();
2058
2034
  if (!l.length || l.length > 1)
2059
2035
  return !1;
2060
2036
  const h = l[0].range, c = t.get(W).getContainerTableWithRange(a, o, h);
2061
2037
  if (!c) return !1;
2062
- const g = h.endColumn - h.startColumn + 1, _ = [], f = [], p = c.getRange();
2038
+ const g = h.endColumn - h.startColumn + 1, _ = [], w = [], p = c.getRange();
2063
2039
  _.push({
2064
2040
  id: S.id,
2065
2041
  params: {
@@ -2069,19 +2045,19 @@ const S = {
2069
2045
  config: {
2070
2046
  rowColOperation: {
2071
2047
  operationType: M.Delete,
2072
- rowColType: N.Col,
2048
+ rowColType: y.Col,
2073
2049
  index: h.startColumn,
2074
2050
  count: g
2075
2051
  }
2076
2052
  }
2077
2053
  }
2078
2054
  });
2079
- const w = [], R = h.startColumn - p.startColumn;
2055
+ const f = [], I = h.startColumn - p.startColumn;
2080
2056
  for (let se = 0; se < g; se++) {
2081
- const Ie = c.getTableInfo().columns[R + se];
2082
- Ie && w.push(Ie);
2057
+ const Ie = c.getTableInfo().columns[I + se];
2058
+ Ie && f.push(Ie);
2083
2059
  }
2084
- f.push({
2060
+ w.push({
2085
2061
  id: S.id,
2086
2062
  params: {
2087
2063
  unitId: a,
@@ -2090,15 +2066,15 @@ const S = {
2090
2066
  config: {
2091
2067
  rowColOperation: {
2092
2068
  operationType: M.Insert,
2093
- rowColType: N.Col,
2069
+ rowColType: y.Col,
2094
2070
  index: h.startColumn,
2095
2071
  count: g,
2096
- columnsJson: w
2072
+ columnsJson: f
2097
2073
  }
2098
2074
  }
2099
2075
  }
2100
2076
  });
2101
- const I = s.worksheet.getCellMatrix().getDataRange().endColumn, v = fe(
2077
+ const T = s.worksheet.getCellMatrix().getDataRange().endColumn, v = fe(
2102
2078
  t,
2103
2079
  {
2104
2080
  unitId: a,
@@ -2107,7 +2083,7 @@ const S = {
2107
2083
  startRow: p.startRow,
2108
2084
  endRow: p.endRow,
2109
2085
  startColumn: h.endColumn + 1,
2110
- endColumn: I
2086
+ endColumn: T
2111
2087
  }
2112
2088
  },
2113
2089
  {
@@ -2117,21 +2093,21 @@ const S = {
2117
2093
  startRow: p.startRow,
2118
2094
  endRow: p.endRow,
2119
2095
  startColumn: h.startColumn,
2120
- endColumn: I - g
2096
+ endColumn: T - g
2121
2097
  }
2122
2098
  }
2123
2099
  );
2124
- v && (_.push(...v.redos), f.push(...v.undos));
2100
+ v && (_.push(...v.redos), w.push(...v.undos));
2125
2101
  const ee = t.get(D);
2126
- return E(_, ee) && t.get(L).pushUndoRedo({
2102
+ return E(_, ee) && t.get(A).pushUndoRedo({
2127
2103
  unitID: a,
2128
- undoMutations: f,
2104
+ undoMutations: w,
2129
2105
  redoMutations: _
2130
2106
  }), !0;
2131
2107
  }
2132
2108
  };
2133
- var jn = Object.getOwnPropertyDescriptor, zn = (t, e, n, s) => {
2134
- for (var r = s > 1 ? void 0 : s ? jn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2109
+ var Yn = Object.getOwnPropertyDescriptor, Gn = (t, e, n, s) => {
2110
+ for (var r = s > 1 ? void 0 : s ? Yn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2135
2111
  (o = t[a]) && (r = o(r) || r);
2136
2112
  return r;
2137
2113
  }, Ae = (t, e) => (n, s) => e(n, s, t);
@@ -2153,7 +2129,7 @@ let ce = class extends H {
2153
2129
  ), this.disposeWithMe(
2154
2130
  this._tableManager.tableDelete$.subscribe((t) => {
2155
2131
  const { unitId: e, tableName: n } = t;
2156
- this._commandService.executeCommand(ve.id, {
2132
+ this._commandService.executeCommand(Fe.id, {
2157
2133
  unitId: e,
2158
2134
  tableName: n
2159
2135
  });
@@ -2161,7 +2137,7 @@ let ce = class extends H {
2161
2137
  ), this.disposeWithMe(
2162
2138
  this._tableManager.tableNameChanged$.subscribe((t) => {
2163
2139
  const { tableId: e, unitId: n, oldTableName: s } = t;
2164
- this._commandService.executeCommand(ve.id, {
2140
+ this._commandService.executeCommand(Fe.id, {
2165
2141
  unitId: n,
2166
2142
  tableName: s
2167
2143
  });
@@ -2174,7 +2150,7 @@ let ce = class extends H {
2174
2150
  const n = e.getTableInfo(), s = n.name, r = n.columns, a = /* @__PURE__ */ new Map();
2175
2151
  r.forEach((o, u) => {
2176
2152
  a.set(o.displayName, u);
2177
- }), this._commandService.executeCommand(bt.id, {
2153
+ }), this._commandService.executeCommand(It.id, {
2178
2154
  unitId: t,
2179
2155
  tableName: s,
2180
2156
  reference: {
@@ -2185,15 +2161,15 @@ let ce = class extends H {
2185
2161
  });
2186
2162
  }
2187
2163
  };
2188
- ce = zn([
2189
- Ae(0, C(T)),
2164
+ ce = Gn([
2165
+ Ae(0, R(C)),
2190
2166
  Ae(1, D)
2191
2167
  ], ce);
2192
- var Kn = Object.getOwnPropertyDescriptor, Xn = (t, e, n, s) => {
2193
- for (var r = s > 1 ? void 0 : s ? Kn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2168
+ var zn = Object.getOwnPropertyDescriptor, jn = (t, e, n, s) => {
2169
+ for (var r = s > 1 ? void 0 : s ? zn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2194
2170
  (o = t[a]) && (r = o(r) || r);
2195
2171
  return r;
2196
- }, Le = (t, e) => (n, s) => e(n, s, t);
2172
+ }, Be = (t, e) => (n, s) => e(n, s, t);
2197
2173
  let de = class extends H {
2198
2174
  constructor(t, e) {
2199
2175
  super(), this._tableManager = t, this._exclusiveRangeService = e, this._initRangeListener();
@@ -2223,12 +2199,12 @@ let de = class extends H {
2223
2199
  );
2224
2200
  }
2225
2201
  };
2226
- de = Xn([
2227
- Le(0, C(T)),
2228
- Le(1, C(pt))
2202
+ de = jn([
2203
+ Be(0, R(C)),
2204
+ Be(1, R(bt))
2229
2205
  ], de);
2230
- var Zn = Object.getOwnPropertyDescriptor, es = (t, e, n, s) => {
2231
- for (var r = s > 1 ? void 0 : s ? Zn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2206
+ var Kn = Object.getOwnPropertyDescriptor, Xn = (t, e, n, s) => {
2207
+ for (var r = s > 1 ? void 0 : s ? Kn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2232
2208
  (o = t[a]) && (r = o(r) || r);
2233
2209
  return r;
2234
2210
  }, V = (t, e) => (n, s) => e(n, s, t);
@@ -2242,13 +2218,13 @@ let he = class extends H {
2242
2218
  getMutations(e) {
2243
2219
  const n = { redos: [], undos: [] }, { id: s, params: r } = e;
2244
2220
  switch (s) {
2245
- case Tt.id:
2221
+ case _t.id:
2246
2222
  return t._generateTableMutationWithInsertRow(r);
2247
- case Rt.id:
2223
+ case St.id:
2248
2224
  return t._generateTableMutationWithInsertCol(r);
2249
- case Ct.id:
2225
+ case pt.id:
2250
2226
  return t._generateTableMutationWithRemoveRow(r);
2251
- case _t.id:
2227
+ case ft.id:
2252
2228
  return t._generateTableMutationWithRemoveCol(r);
2253
2229
  }
2254
2230
  return n;
@@ -2321,7 +2297,7 @@ let he = class extends H {
2321
2297
  config: {
2322
2298
  rowColOperation: {
2323
2299
  operationType: M.Insert,
2324
- rowColType: N.Col,
2300
+ rowColType: y.Col,
2325
2301
  index: u.startColumn,
2326
2302
  count: h
2327
2303
  }
@@ -2336,7 +2312,7 @@ let he = class extends H {
2336
2312
  config: {
2337
2313
  rowColOperation: {
2338
2314
  operationType: M.Delete,
2339
- rowColType: N.Col,
2315
+ rowColType: y.Col,
2340
2316
  index: u.startColumn,
2341
2317
  count: h
2342
2318
  }
@@ -2459,12 +2435,12 @@ let he = class extends H {
2459
2435
  tableId: d.getId()
2460
2436
  }
2461
2437
  });
2462
- const g = d.toJSON(), { startRow: _, startColumn: f, endColumn: p } = g.range, w = this._univerInstanceService.getUnit(o), R = w == null ? void 0 : w.getSheetBySheetId(u);
2463
- if (!R)
2438
+ const g = d.toJSON(), { startRow: _, startColumn: w, endColumn: p } = g.range, f = this._univerInstanceService.getUnit(o), I = f == null ? void 0 : f.getSheetBySheetId(u);
2439
+ if (!I)
2464
2440
  return { undos: e, redos: n, preRedos: s, preUndos: r };
2465
- const O = [];
2466
- for (let I = f; I <= p; I++)
2467
- O.push(Ze(R == null ? void 0 : R.getCell(_, I)) || te(I - f + 1, this._localeService.t("sheets-table.columnPrefix")));
2441
+ const U = [];
2442
+ for (let T = w; T <= p; T++)
2443
+ U.push(Ke(I == null ? void 0 : I.getCell(_, T)) || te(T - w + 1, this._localeService.t("sheets-table.columnPrefix")));
2468
2444
  e.push({
2469
2445
  id: k.id,
2470
2446
  params: {
@@ -2472,7 +2448,7 @@ let he = class extends H {
2472
2448
  subUnitId: u,
2473
2449
  tableId: g.id,
2474
2450
  name: g.name,
2475
- header: O,
2451
+ header: U,
2476
2452
  range: g.range,
2477
2453
  options: g.options
2478
2454
  }
@@ -2488,7 +2464,7 @@ let he = class extends H {
2488
2464
  config: {
2489
2465
  rowColOperation: {
2490
2466
  operationType: M.Delete,
2491
- rowColType: N.Col,
2467
+ rowColType: y.Col,
2492
2468
  index: c.startColumn,
2493
2469
  count: g
2494
2470
  }
@@ -2496,8 +2472,8 @@ let he = class extends H {
2496
2472
  }
2497
2473
  });
2498
2474
  const _ = [];
2499
- for (let f = 0; f < g; f++) {
2500
- const p = d.getTableColumnByIndex(f);
2475
+ for (let w = 0; w < g; w++) {
2476
+ const p = d.getTableColumnByIndex(w);
2501
2477
  p && _.push(p.toJSON());
2502
2478
  }
2503
2479
  e.push({
@@ -2509,7 +2485,7 @@ let he = class extends H {
2509
2485
  config: {
2510
2486
  rowColOperation: {
2511
2487
  operationType: M.Insert,
2512
- rowColType: N.Col,
2488
+ rowColType: y.Col,
2513
2489
  index: c.startColumn,
2514
2490
  count: g,
2515
2491
  columnsJson: _
@@ -2528,17 +2504,17 @@ let he = class extends H {
2528
2504
  config: {
2529
2505
  rowColOperation: {
2530
2506
  operationType: M.Delete,
2531
- rowColType: N.Col,
2507
+ rowColType: y.Col,
2532
2508
  index: i.startColumn,
2533
2509
  count: g
2534
2510
  }
2535
2511
  }
2536
2512
  }
2537
2513
  });
2538
- const _ = [], f = i.startColumn - c.startColumn;
2514
+ const _ = [], w = i.startColumn - c.startColumn;
2539
2515
  for (let p = 0; p < g; p++) {
2540
- const w = d.getTableColumnByIndex(p + f);
2541
- w && _.push(w.toJSON());
2516
+ const f = d.getTableColumnByIndex(p + w);
2517
+ f && _.push(f.toJSON());
2542
2518
  }
2543
2519
  e.push({
2544
2520
  id: S.id,
@@ -2549,7 +2525,7 @@ let he = class extends H {
2549
2525
  config: {
2550
2526
  rowColOperation: {
2551
2527
  operationType: M.Insert,
2552
- rowColType: N.Col,
2528
+ rowColType: y.Col,
2553
2529
  index: i.startColumn,
2554
2530
  count: h,
2555
2531
  columnsJson: _
@@ -2567,7 +2543,7 @@ let he = class extends H {
2567
2543
  config: {
2568
2544
  rowColOperation: {
2569
2545
  operationType: M.Delete,
2570
- rowColType: N.Col,
2546
+ rowColType: y.Col,
2571
2547
  index: i.startColumn,
2572
2548
  count: h
2573
2549
  }
@@ -2575,8 +2551,8 @@ let he = class extends H {
2575
2551
  }
2576
2552
  });
2577
2553
  const g = [], _ = i.startColumn - c.startColumn;
2578
- for (let f = 0; f < h; f++) {
2579
- const p = d.getTableColumnByIndex(f + _);
2554
+ for (let w = 0; w < h; w++) {
2555
+ const p = d.getTableColumnByIndex(w + _);
2580
2556
  p && g.push(p.toJSON());
2581
2557
  }
2582
2558
  e.push({
@@ -2588,7 +2564,7 @@ let he = class extends H {
2588
2564
  config: {
2589
2565
  rowColOperation: {
2590
2566
  operationType: M.Insert,
2591
- rowColType: N.Col,
2567
+ rowColType: y.Col,
2592
2568
  index: i.startColumn,
2593
2569
  count: h,
2594
2570
  columnsJson: g
@@ -2602,7 +2578,7 @@ let he = class extends H {
2602
2578
  }
2603
2579
  _initCommandListener() {
2604
2580
  this._commandService.onCommandExecuted((t) => {
2605
- if (t.id === Ye.id) {
2581
+ if (t.id === ke.id) {
2606
2582
  const e = t.params, { unitId: n, subUnitId: s, range: r } = e, a = r.endRow - r.startRow + 1;
2607
2583
  this._tableManager.getTablesBySubunitId(n, s).forEach((u) => {
2608
2584
  const l = u.getRange();
@@ -2614,7 +2590,7 @@ let he = class extends H {
2614
2590
  }
2615
2591
  });
2616
2592
  });
2617
- } else if (t.id === je.id) {
2593
+ } else if (t.id === Ye.id) {
2618
2594
  const e = t.params, { unitId: n, subUnitId: s, range: r } = e, a = r.endColumn - r.startColumn + 1;
2619
2595
  this._tableManager.getTablesBySubunitId(n, s).forEach((u) => {
2620
2596
  const l = u.getRange();
@@ -2626,7 +2602,7 @@ let he = class extends H {
2626
2602
  }
2627
2603
  });
2628
2604
  });
2629
- } else if (t.id === Ge.id) {
2605
+ } else if (t.id === Qe.id) {
2630
2606
  const e = t.params, { unitId: n, subUnitId: s, range: r } = e, a = r.endRow - r.startRow + 1;
2631
2607
  this._tableManager.getTablesBySubunitId(n, s).forEach((u) => {
2632
2608
  const l = u.getRange();
@@ -2638,7 +2614,7 @@ let he = class extends H {
2638
2614
  }
2639
2615
  });
2640
2616
  });
2641
- } else if (t.id === ze.id) {
2617
+ } else if (t.id === Ge.id) {
2642
2618
  const e = t.params, { unitId: n, subUnitId: s, range: r } = e, a = r.endColumn - r.startColumn + 1;
2643
2619
  this._tableManager.getTablesBySubunitId(n, s).forEach((u) => {
2644
2620
  const l = u.getRange();
@@ -2654,17 +2630,17 @@ let he = class extends H {
2654
2630
  });
2655
2631
  }
2656
2632
  };
2657
- he = es([
2658
- V(0, C(D)),
2659
- V(1, C(St)),
2660
- V(2, C(A)),
2661
- V(3, C(He)),
2662
- V(4, C(Re)),
2663
- V(5, C(T)),
2664
- V(6, C(be))
2633
+ he = Xn([
2634
+ V(0, R(D)),
2635
+ V(1, R(wt)),
2636
+ V(2, R(B)),
2637
+ V(3, R(We)),
2638
+ V(4, R(Ce)),
2639
+ V(5, R(C)),
2640
+ V(6, R(be))
2665
2641
  ], he);
2666
- var ts = Object.getOwnPropertyDescriptor, ns = (t, e, n, s) => {
2667
- for (var r = s > 1 ? void 0 : s ? ts(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2642
+ var Zn = Object.getOwnPropertyDescriptor, es = (t, e, n, s) => {
2643
+ for (var r = s > 1 ? void 0 : s ? Zn(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2668
2644
  (o = t[a]) && (r = o(r) || r);
2669
2645
  return r;
2670
2646
  }, oe = (t, e) => (n, s) => e(n, s, t);
@@ -2724,12 +2700,12 @@ let ge = class extends H {
2724
2700
  );
2725
2701
  }
2726
2702
  _initUserTableTheme() {
2727
- const e = this._configService.getConfig(tt) || {}, n = e.defaultThemeIndex || 0, s = e.userThemes || [];
2728
- this._defaultThemeIndex = n, this._allThemes = s.concat(nt);
2703
+ const e = this._configService.getConfig(Xe) || {}, n = e.defaultThemeIndex || 0, s = e.userThemes || [];
2704
+ this._defaultThemeIndex = n, this._allThemes = s.concat(Ze);
2729
2705
  }
2730
2706
  _initDefaultTableTheme() {
2731
2707
  for (let e = 0; e < this._allThemes.length; e++) {
2732
- const { name: n, style: s } = this._allThemes[e], r = new Mt(n, s);
2708
+ const { name: n, style: s } = this._allThemes[e], r = new Ct(n, s);
2733
2709
  this._sheetRangeThemeModel.registerDefaultRangeTheme(r);
2734
2710
  }
2735
2711
  }
@@ -2737,21 +2713,21 @@ let ge = class extends H {
2737
2713
  super.dispose(), this._allThemes = [], this._defaultThemeIndex = 0;
2738
2714
  }
2739
2715
  };
2740
- ge = ns([
2741
- oe(0, C(T)),
2742
- oe(1, C(It)),
2743
- oe(2, C(Qe)),
2744
- oe(3, Ve)
2716
+ ge = es([
2717
+ oe(0, R(C)),
2718
+ oe(1, R(Rt)),
2719
+ oe(2, R(Je)),
2720
+ oe(3, He)
2745
2721
  ], ge);
2746
- var ss = Object.getOwnPropertyDescriptor, rs = (t, e, n, s) => {
2747
- for (var r = s > 1 ? void 0 : s ? ss(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2722
+ var ts = Object.getOwnPropertyDescriptor, ns = (t, e, n, s) => {
2723
+ for (var r = s > 1 ? void 0 : s ? ts(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2748
2724
  (o = t[a]) && (r = o(r) || r);
2749
2725
  return r;
2750
2726
  }, ie = (t, e) => (n, s) => e(n, s, t);
2751
2727
  let me = class extends H {
2752
2728
  constructor(e, n, s, r) {
2753
2729
  super();
2754
- b(this, "_tableFilteredOutRows$", new Ke(/* @__PURE__ */ new Set()));
2730
+ b(this, "_tableFilteredOutRows$", new ze(/* @__PURE__ */ new Set()));
2755
2731
  b(this, "tableFilteredOutRows$", this._tableFilteredOutRows$.asObservable());
2756
2732
  b(this, "_subscription", null);
2757
2733
  this._tableManager = e, this._sheetInterceptorService = n, this._univerInstanceService = s, this._zebraCrossingCacheController = r, this.registerFilterChangeEvent(), this.initTableHiddenRowIntercept(), this._initFilteredOutRows();
@@ -2763,7 +2739,7 @@ let me = class extends H {
2763
2739
  this._tableFilteredOutRows$.next(e);
2764
2740
  }
2765
2741
  initTableHiddenRowIntercept() {
2766
- this.disposeWithMe(this._sheetInterceptorService.intercept(qe.ROW_FILTERED, {
2742
+ this.disposeWithMe(this._sheetInterceptorService.intercept(Ve.ROW_FILTERED, {
2767
2743
  // 这里需要保证优先级高于sheet的筛选,因为筛选没有next,低于筛选的不会触发interceptor
2768
2744
  priority: 100,
2769
2745
  handler: (e, n, s) => {
@@ -2776,9 +2752,9 @@ let me = class extends H {
2776
2752
  _initFilteredOutRows() {
2777
2753
  this._tableManager.tableInitStatus$.pipe(
2778
2754
  pe((e) => e),
2779
- Fe(() => this._univerInstanceService.getCurrentTypeOfUnit$(j.UNIVER_SHEET)),
2755
+ ve(() => this._univerInstanceService.getCurrentTypeOfUnit$(z.UNIVER_SHEET)),
2780
2756
  pe((e) => e != null),
2781
- Fe((e) => e.activeSheet$),
2757
+ ve((e) => e.activeSheet$),
2782
2758
  pe((e) => e != null)
2783
2759
  ).subscribe(() => {
2784
2760
  const e = $(this._univerInstanceService);
@@ -2814,30 +2790,30 @@ let me = class extends H {
2814
2790
  super.dispose(), (e = this._subscription) == null || e.unsubscribe();
2815
2791
  }
2816
2792
  };
2817
- me = rs([
2818
- ie(0, C(T)),
2819
- ie(1, C(Re)),
2820
- ie(2, C(A)),
2821
- ie(3, C(vt))
2793
+ me = ns([
2794
+ ie(0, R(C)),
2795
+ ie(1, R(Ce)),
2796
+ ie(2, R(B)),
2797
+ ie(3, R(Tt))
2822
2798
  ], me);
2823
- var as = Object.getOwnPropertyDescriptor, os = (t, e, n, s) => {
2824
- for (var r = s > 1 ? void 0 : s ? as(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2799
+ var ss = Object.getOwnPropertyDescriptor, rs = (t, e, n, s) => {
2800
+ for (var r = s > 1 ? void 0 : s ? ss(e, n) : e, a = t.length - 1, o; a >= 0; a--)
2825
2801
  (o = t[a]) && (r = o(r) || r);
2826
2802
  return r;
2827
2803
  }, Se = (t, e) => (n, s) => e(n, s, t), le;
2828
- let Ee = (le = class extends ht {
2804
+ let Ee = (le = class extends ct {
2829
2805
  constructor(t = De, e, n, s) {
2830
2806
  super(), this._config = t, this._injector = e, this._configService = n, this._commandService = s;
2831
- const { ...r } = gt(
2807
+ const { ...r } = dt(
2832
2808
  {},
2833
2809
  De,
2834
2810
  this._config
2835
2811
  );
2836
- this._configService.setConfig(tt, r), this._initRegisterCommand();
2812
+ this._configService.setConfig(Xe, r), this._initRegisterCommand();
2837
2813
  }
2838
2814
  onStarting() {
2839
- mt(this._injector, [
2840
- [T],
2815
+ ht(this._injector, [
2816
+ [C],
2841
2817
  [ge],
2842
2818
  [W],
2843
2819
  [X],
@@ -2857,63 +2833,63 @@ let Ee = (le = class extends ht {
2857
2833
  [X],
2858
2834
  [me]
2859
2835
  ]), Me(this._injector, [
2860
- [T]
2836
+ [C]
2861
2837
  ]);
2862
2838
  }
2863
2839
  _initRegisterCommand() {
2864
2840
  [
2865
- Ln,
2841
+ $n,
2866
2842
  k,
2867
- En,
2843
+ An,
2868
2844
  Q,
2869
- Ce,
2845
+ Re,
2870
2846
  Bn,
2871
- Jn,
2872
- S,
2873
2847
  Pn,
2848
+ S,
2849
+ Hn,
2850
+ Vn,
2874
2851
  qn,
2852
+ Jn,
2875
2853
  kn,
2876
- Qn,
2877
- Yn,
2878
- Gn
2854
+ Qn
2879
2855
  ].forEach((t) => this._commandService.registerCommand(t));
2880
2856
  }
2881
- }, b(le, "pluginName", at), b(le, "type", j.UNIVER_SHEET), le);
2882
- Ee = os([
2883
- Se(1, C(He)),
2884
- Se(2, Ve),
2885
- Se(3, C(D))
2857
+ }, b(le, "pluginName", nt), b(le, "type", z.UNIVER_SHEET), le);
2858
+ Ee = rs([
2859
+ Se(1, R(We)),
2860
+ Se(2, He),
2861
+ Se(3, R(D))
2886
2862
  ], Ee);
2887
2863
  export {
2888
- Ln as AddSheetTableCommand,
2864
+ $n as AddSheetTableCommand,
2889
2865
  k as AddSheetTableMutation,
2890
- Pn as AddTableThemeCommand,
2891
- En as DeleteSheetTableCommand,
2866
+ Hn as AddTableThemeCommand,
2867
+ An as DeleteSheetTableCommand,
2892
2868
  Q as DeleteSheetTableMutation,
2893
- qn as RemoveTableThemeCommand,
2894
- Wn as SHEET_TABLE_CUSTOM_THEME_PREFIX,
2895
- Jn as SetSheetTableCommand,
2869
+ Vn as RemoveTableThemeCommand,
2870
+ En as SHEET_TABLE_CUSTOM_THEME_PREFIX,
2871
+ Pn as SetSheetTableCommand,
2896
2872
  Bn as SetSheetTableFilterCommand,
2897
- Ce as SetSheetTableFilterMutation,
2873
+ Re as SetSheetTableFilterMutation,
2898
2874
  S as SetSheetTableMutation,
2899
- Qn as SheetTableInsertColCommand,
2900
- kn as SheetTableInsertRowCommand,
2901
- Gn as SheetTableRemoveColCommand,
2902
- Yn as SheetTableRemoveRowCommand,
2875
+ Jn as SheetTableInsertColCommand,
2876
+ qn as SheetTableInsertRowCommand,
2877
+ Qn as SheetTableRemoveColCommand,
2878
+ kn as SheetTableRemoveRowCommand,
2903
2879
  X as SheetTableService,
2904
2880
  q as SheetsTableButtonStateEnum,
2905
2881
  W as SheetsTableController,
2906
2882
  G as SheetsTableSortStateEnum,
2907
- Xe as TableColumnDataTypeEnum,
2883
+ je as TableColumnDataTypeEnum,
2908
2884
  ne as TableColumnFilterTypeEnum,
2909
- U as TableConditionTypeEnum,
2885
+ O as TableConditionTypeEnum,
2910
2886
  m as TableDateCompareTypeEnum,
2911
- T as TableManager,
2887
+ C as TableManager,
2912
2888
  F as TableNumberCompareTypeEnum,
2913
2889
  P as TableStringCompareTypeEnum,
2914
2890
  Ee as UniverSheetsTablePlugin,
2915
- ms as customEmptyThemeWithBorderStyle,
2916
- yt as isConditionFilter,
2917
- gs as isManualFilter,
2918
- bs as processStyleWithBorderStyle
2891
+ hs as customEmptyThemeWithBorderStyle,
2892
+ Ft as isConditionFilter,
2893
+ ds as isManualFilter,
2894
+ gs as processStyleWithBorderStyle
2919
2895
  };