@univerjs/sheets-numfmt 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,26 +1,26 @@
1
1
  var $t = Object.defineProperty;
2
2
  var Ut = (e, t, r) => t in e ? $t(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var Y = (e, t, r) => (Ut(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { CommandType as X, ICommandService as E, IUniverInstanceService as $, IUndoRedoService as At, sequenceExecute as Lt, Tools as Vt, Disposable as H, OnLifecycle as k, LifecycleStages as U, Range as R, Rectangle as De, ObjectMatrix as lt, CellValueType as se, toDisposable as Z, ThemeService as ut, runOnLifecycle as Ht, ILocalStorageService as kt, LocaleService as T, DisposableCollection as dt, UniverInstanceType as de, Plugin as Ft, PluginType as Bt } from "@univerjs/core";
5
- import { transformCellsToRange as me, rangeMerge as z, SetNumfmtMutation as w, factorySetNumfmtUndoMutation as he, RemoveNumfmtMutation as M, factoryRemoveNumfmtUndoMutation as J, INumfmtService as A, INTERCEPTOR_POINT as mt, SheetInterceptorService as Ae, SelectionManagerService as ee, ClearSelectionFormatCommand as zt, ClearSelectionAllCommand as Wt, SetRangeValuesCommand as Kt, getCurrentSheetDisabled$ as fe, RefRangeService as Gt, EffectRefRangId as j, handleMoveRows as Yt, handleMoveCols as qt, handleIRemoveRow as Zt, handleIRemoveCol as Jt, handleMoveRange as Qt, handleInsertRow as Xt, handleInsertRangeMoveRight as en, handleInsertRangeMoveDown as tn, handleInsertCol as nn, handleDeleteRangeMoveUp as rn, handleDeleteRangeMoveLeft as sn, runRefRangeMutations as an, RemoveSheetCommand as on } from "@univerjs/sheets";
6
- import { Inject as g, Injector as K, createIdentifier as cn } from "@wendellhu/redi";
7
- import { IAutoFillService as ln, APPLY_TYPE as He, getAutoFillRepeatRange as un, SheetSkeletonManagerService as Ke, COPY_TYPE as nt, PREDEFINED_HOOK_NAME as rt, getRepeatRange as dn, ISheetClipboardService as mn, IEditorBridgeService as hn } from "@univerjs/sheets-ui";
8
- import { map as le, distinctUntilChanged as ht, switchMap as ft, tap as fn, debounceTime as pn, filter as st, bufferTime as vn } from "rxjs/operators";
9
- import D from "@univerjs/engine-numfmt";
10
- import { IRenderManagerService as gn, ITextSelectionRenderManager as _n } from "@univerjs/engine-render";
11
- import { ComponentManager as pt, ISidebarService as Sn, MenuItemType as pe, MenuGroup as ve, MenuPosition as ge, getMenuHiddenObservable as _e, IMenuService as Cn } from "@univerjs/ui";
12
- import { Observable as q, combineLatest as bn, merge as Ge } from "rxjs";
13
- import yn, { createContext as Rn, useState as x, useEffect as Ye, useRef as qe, useContext as vt, useMemo as V, createElement as te, forwardRef as ie } from "react";
14
- import { InputNumber as Ze, Select as Je, SelectList as Qe, Button as it } from "@univerjs/design";
15
- import { useDependency as N, useInjector as In } from "@wendellhu/redi/react-bindings";
16
- import { FormulaDataModel as Mn } from "@univerjs/engine-formula";
4
+ import { CommandType as X, ICommandService as D, IUniverInstanceService as E, IUndoRedoService as At, sequenceExecute as Lt, Tools as Vt, Disposable as H, OnLifecycle as k, LifecycleStages as $, Range as R, Rectangle as De, LocaleType as Ht, ObjectMatrix as ut, CellValueType as ie, toDisposable as q, ThemeService as dt, LocaleService as j, runOnLifecycle as kt, ILocalStorageService as Ft, DisposableCollection as mt, UniverInstanceType as de, Plugin as Bt, PluginType as zt } from "@univerjs/core";
5
+ import { transformCellsToRange as me, rangeMerge as z, SetNumfmtMutation as w, factorySetNumfmtUndoMutation as he, RemoveNumfmtMutation as M, factoryRemoveNumfmtUndoMutation as J, INumfmtService as U, INTERCEPTOR_POINT as ht, SheetInterceptorService as Ae, SelectionManagerService as ee, ClearSelectionFormatCommand as Wt, ClearSelectionAllCommand as Kt, SetRangeValuesCommand as Gt, getCurrentSheetDisabled$ as fe, RefRangeService as Yt, EffectRefRangId as N, handleMoveRows as Zt, handleMoveCols as qt, handleIRemoveRow as Jt, handleIRemoveCol as Qt, handleMoveRange as Xt, handleInsertRow as en, handleInsertRangeMoveRight as tn, handleInsertRangeMoveDown as nn, handleInsertCol as rn, handleDeleteRangeMoveUp as sn, handleDeleteRangeMoveLeft as an, runRefRangeMutations as on, RemoveSheetCommand as cn } from "@univerjs/sheets";
6
+ import { Inject as g, Injector as K, createIdentifier as ln } from "@wendellhu/redi";
7
+ import { IAutoFillService as un, APPLY_TYPE as He, getAutoFillRepeatRange as dn, SheetSkeletonManagerService as Ke, COPY_TYPE as rt, PREDEFINED_HOOK_NAME as st, getRepeatRange as mn, ISheetClipboardService as hn, IEditorBridgeService as fn } from "@univerjs/sheets-ui";
8
+ import { map as le, distinctUntilChanged as ft, switchMap as pt, tap as pn, debounceTime as vn, filter as it, bufferTime as gn } from "rxjs/operators";
9
+ import V from "@univerjs/engine-numfmt";
10
+ import { IRenderManagerService as _n, ITextSelectionRenderManager as Sn } from "@univerjs/engine-render";
11
+ import { ComponentManager as vt, ISidebarService as Cn, MenuItemType as pe, MenuGroup as ve, MenuPosition as ge, getMenuHiddenObservable as _e, IMenuService as bn } from "@univerjs/ui";
12
+ import { Observable as Z, combineLatest as yn, merge as Ge } from "rxjs";
13
+ import Rn, { createContext as In, useState as x, useEffect as Ye, useRef as Ze, useContext as gt, useMemo as L, createElement as te, forwardRef as ae } from "react";
14
+ import { InputNumber as qe, Select as Je, SelectList as Qe, Button as at } from "@univerjs/design";
15
+ import { useDependency as T, useInjector as Mn } from "@wendellhu/redi/react-bindings";
16
+ import { FormulaDataModel as Pn } from "@univerjs/engine-formula";
17
17
  const Q = {
18
18
  id: "sheet.command.numfmt.set.numfmt",
19
19
  type: X.COMMAND,
20
20
  handler: (e, t) => {
21
21
  if (!t)
22
22
  return !1;
23
- const r = e.get(E), n = e.get($), s = e.get(At), i = n.getCurrentUniverSheetInstance(), a = i.getUnitId(), c = i.getActiveSheet().getSheetId(), d = t.values.filter((f) => !!f.pattern), l = t.values.filter((f) => !f.pattern), u = me(a, c, d), m = {
23
+ const r = e.get(D), n = e.get(E), s = e.get(At), i = n.getCurrentUniverSheetInstance(), a = i.getUnitId(), c = i.getActiveSheet().getSheetId(), d = t.values.filter((f) => !!f.pattern), l = t.values.filter((f) => !f.pattern), u = me(a, c, d), m = {
24
24
  unitId: a,
25
25
  subUnitId: c,
26
26
  ranges: l.map((f) => ({
@@ -59,6 +59,7 @@ const Q = {
59
59
  }, On = {
60
60
  sheet: {
61
61
  numfmt: {
62
+ percent: "Percentage",
62
63
  title: "Number format",
63
64
  numfmtType: "Format types",
64
65
  cancel: "Cancel",
@@ -90,9 +91,10 @@ const Q = {
90
91
  subtractDecimal: "Decreasing decimal places"
91
92
  }
92
93
  }
93
- }, Pn = On, xn = {
94
+ }, xn = On, wn = {
94
95
  sheet: {
95
96
  numfmt: {
97
+ percent: "百分比",
96
98
  title: "数字格式",
97
99
  numfmtType: "格式类型",
98
100
  cancel: "取消",
@@ -124,7 +126,7 @@ const Q = {
124
126
  subtractDecimal: "减少小数位"
125
127
  }
126
128
  }
127
- }, wn = xn, ue = "SHEET_NUMFMT_PLUGIN", Ee = (e) => {
129
+ }, jn = wn, ue = "SHEET_NUMFMT_PLUGIN", Ee = (e) => {
128
130
  const t = e.filter((i) => i.id === M.id).map((i) => i.params), r = e.filter((i) => i.id === w.id).map((i) => i.params), n = [];
129
131
  if (t[0]) {
130
132
  const i = t.reduce(
@@ -171,10 +173,10 @@ const Q = {
171
173
  }
172
174
  return n;
173
175
  };
174
- var jn = Object.defineProperty, Nn = Object.getOwnPropertyDescriptor, Tn = (e, t, r, n) => {
175
- for (var s = n > 1 ? void 0 : n ? Nn(t, r) : t, i = e.length - 1, a; i >= 0; i--)
176
+ var Nn = Object.defineProperty, Tn = Object.getOwnPropertyDescriptor, Dn = (e, t, r, n) => {
177
+ for (var s = n > 1 ? void 0 : n ? Tn(t, r) : t, i = e.length - 1, a; i >= 0; i--)
176
178
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
177
- return n && s && jn(t, r, s), s;
179
+ return n && s && Nn(t, r, s), s;
178
180
  }, Ce = (e, t) => (r, n) => t(r, n, e);
179
181
  let Re = class extends H {
180
182
  constructor(e, t, r, n) {
@@ -241,7 +243,7 @@ let Re = class extends H {
241
243
  row: s.startRow,
242
244
  col: s.startColumn
243
245
  };
244
- return un(s, i).forEach((l) => {
246
+ return dn(s, i).forEach((l) => {
245
247
  const { undos: u, redos: m } = t(c, l.repeatStartCell, l.relativeRange);
246
248
  a.push(...u), o.push(...m);
247
249
  }), {
@@ -261,47 +263,47 @@ let Re = class extends H {
261
263
  this.disposeWithMe(this._autoFillService.addHook(n));
262
264
  }
263
265
  };
264
- Re = Tn([
265
- k(U.Rendered, Re),
266
+ Re = Dn([
267
+ k($.Rendered, Re),
266
268
  Ce(0, g(K)),
267
- Ce(1, g($)),
268
- Ce(2, g(A)),
269
- Ce(3, g(ln))
269
+ Ce(1, g(E)),
270
+ Ce(2, g(U)),
271
+ Ce(3, g(un))
270
272
  ], Re);
271
- const Xe = (e) => D.getInfo(e).type || "unknown", gt = (e, t) => {
272
- const n = D.getInfo(e)._partitions[1], s = D.format(e, t, { locale: "zh-CN" });
273
+ const Xe = (e) => V.getInfo(e).type || "unknown", et = (e, t, r) => {
274
+ const n = V.getInfo(e), s = r === Ht.ZH_CN ? "zh-CN" : "en", i = n._partitions[1], a = V.format(e, t, { locale: s });
273
275
  return t < 0 ? {
274
- result: s,
275
- color: n.color
276
+ result: a,
277
+ color: i.color
276
278
  } : {
277
- result: s
279
+ result: a
278
280
  };
279
281
  };
280
- var Dn = Object.defineProperty, En = Object.getOwnPropertyDescriptor, $n = (e, t, r, n) => {
281
- for (var s = n > 1 ? void 0 : n ? En(t, r) : t, i = e.length - 1, a; i >= 0; i--)
282
+ var En = Object.defineProperty, $n = Object.getOwnPropertyDescriptor, Un = (e, t, r, n) => {
283
+ for (var s = n > 1 ? void 0 : n ? $n(t, r) : t, i = e.length - 1, a; i >= 0; i--)
282
284
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
283
- return n && s && Dn(t, r, s), s;
284
- }, oe = (e, t) => (r, n) => t(r, n, e);
285
+ return n && s && En(t, r, s), s;
286
+ }, re = (e, t) => (r, n) => t(r, n, e);
285
287
  let Ie = class extends H {
286
- constructor(e, t, r, n, s) {
287
- super(), this._sheetInterceptorService = e, this._themeService = t, this._sheetSkeletonManagerService = r, this._commandService = n, this._numfmtService = s, this._initInterceptorCellContent();
288
+ constructor(e, t, r, n, s, i) {
289
+ super(), this._sheetInterceptorService = e, this._themeService = t, this._sheetSkeletonManagerService = r, this._commandService = n, this._numfmtService = s, this._localeService = i, this._initInterceptorCellContent();
288
290
  }
289
291
  _initInterceptorCellContent() {
290
- const e = new lt();
292
+ const e = new ut();
291
293
  this.disposeWithMe(
292
- this._sheetInterceptorService.intercept(mt.CELL_CONTENT, {
294
+ this._sheetInterceptorService.intercept(ht.CELL_CONTENT, {
293
295
  handler: (t, r, n) => {
294
296
  const s = r.unitId, i = r.subUnitId, a = this._numfmtService.getValue(s, i, r.row, r.col);
295
297
  if (!a)
296
298
  return n(t);
297
299
  const o = t;
298
- if (!o || o.t !== se.NUMBER)
300
+ if (!o || o.t !== ie.NUMBER)
299
301
  return n(t);
300
302
  let c = "";
301
303
  const d = e.getValue(r.row, r.col);
302
304
  if (d && d.parameters === o.v)
303
305
  return { ...t, ...d.result };
304
- const l = gt(a.pattern, Number(o.v));
306
+ const l = et(a.pattern, Number(o.v), this._localeService.getCurrentLocale());
305
307
  if (c = l.result, !c)
306
308
  return n(t);
307
309
  const u = { v: c };
@@ -329,10 +331,10 @@ let Ie = class extends H {
329
331
  }
330
332
  })
331
333
  ), this.disposeWithMe(
332
- Z(
334
+ q(
333
335
  this._sheetSkeletonManagerService.currentSkeleton$.pipe(
334
336
  le((t) => t == null ? void 0 : t.sheetId),
335
- ht()
337
+ ft()
336
338
  ).subscribe(() => {
337
339
  e.reset();
338
340
  })
@@ -340,17 +342,18 @@ let Ie = class extends H {
340
342
  );
341
343
  }
342
344
  };
343
- Ie = $n([
344
- k(U.Rendered, Ie),
345
- oe(0, g(Ae)),
346
- oe(1, g(ut)),
347
- oe(2, g(Ke)),
348
- oe(3, g(E)),
349
- oe(4, g(A))
345
+ Ie = Un([
346
+ k($.Rendered, Ie),
347
+ re(0, g(Ae)),
348
+ re(1, g(dt)),
349
+ re(2, g(Ke)),
350
+ re(3, g(D)),
351
+ re(4, g(U)),
352
+ re(5, g(j))
350
353
  ], Ie);
351
354
  const W = (e, t = 0) => {
352
355
  var n;
353
- return e && (n = D.getInfo(e).maxDecimals) != null ? n : t;
356
+ return e && (n = V.getInfo(e).maxDecimals) != null ? n : t;
354
357
  }, Le = (e, t) => {
355
358
  if (e && !t || !e && t)
356
359
  return !1;
@@ -362,19 +365,19 @@ const W = (e, t = 0) => {
362
365
  return u.type === "point" ? (l.isEnd = !0, l) : { ...l, result: l.result + m };
363
366
  },
364
367
  { isEnd: !1, result: "" }
365
- ).result, n = D.getInfo(e)._partitions, s = D.getInfo(t)._partitions, i = r(n[0].tokens), a = r(s[0].tokens), o = r(n[1].tokens), c = r(s[1].tokens);
368
+ ).result, n = V.getInfo(e)._partitions, s = V.getInfo(t)._partitions, i = r(n[0].tokens), a = r(s[0].tokens), o = r(n[1].tokens), c = r(s[1].tokens);
366
369
  return i === a && o === c && n[1].color === s[1].color;
367
- }, at = (e) => new Array(Math.min(Math.max(0, Number(e)), 30)).fill(0).join(""), I = (e, t) => e.split(";").map((n) => /\.0?/.test(n) ? n.replace(
370
+ }, ot = (e) => new Array(Math.min(Math.max(0, Number(e)), 30)).fill(0).join(""), I = (e, t) => e.split(";").map((n) => /\.0?/.test(n) ? n.replace(
368
371
  /\.0*/g,
369
- `${t > 0 ? "." : ""}${at(Number(t || 0))}`
372
+ `${t > 0 ? "." : ""}${ot(Number(t || 0))}`
370
373
  ) : /0([^0]?)|0$/.test(n) ? n.replace(
371
374
  /0([^0]+)|0$/,
372
- `0${t > 0 ? "." : ""}${at(Number(t || 0))}$1`
373
- ) : n).join(";"), Un = (e) => /\.0?/.test(e) || /0([^0]?)|0$/.test(e), _t = {
375
+ `0${t > 0 ? "." : ""}${ot(Number(t || 0))}$1`
376
+ ) : n).join(";"), An = (e) => /\.0?/.test(e) || /0([^0]?)|0$/.test(e), _t = {
374
377
  id: "sheet.command.numfmt.add.decimal.command",
375
378
  type: X.COMMAND,
376
379
  handler: async (e) => {
377
- const t = e.get(E), r = e.get(ee), n = e.get(A), s = e.get($), i = r.getSelections();
380
+ const t = e.get(D), r = e.get(ee), n = e.get(U), s = e.get(E), i = r.getSelections();
378
381
  if (!i || !i.length)
379
382
  return !1;
380
383
  const a = s.getCurrentUniverSheetInstance(), o = a.getActiveSheet(), c = a.getUnitId(), d = o.getSheetId();
@@ -409,7 +412,7 @@ const W = (e, t = 0) => {
409
412
  });
410
413
  }), h.length ? await t.executeCommand(Q.id, { values: h }) : !1;
411
414
  }
412
- }, An = [
415
+ }, Ln = [
413
416
  {
414
417
  label: "1930-08-05",
415
418
  suffix: "yyyy-MM-dd"
@@ -454,7 +457,7 @@ const W = (e, t = 0) => {
454
457
  label: "08-05 下午 01:30",
455
458
  suffix: "MM-dd A/P hh:mm"
456
459
  }
457
- ], Ln = [
460
+ ], Vn = [
458
461
  {
459
462
  label: "(1,235)",
460
463
  suffix: "#,##0_);(#,##0)"
@@ -514,7 +517,7 @@ const W = (e, t = 0) => {
514
517
  id: "sheet.command.numfmt.set.currency",
515
518
  type: X.COMMAND,
516
519
  handler: async (e) => {
517
- const t = e.get(E), n = e.get(ee).getSelections();
520
+ const t = e.get(D), n = e.get(ee).getSelections();
518
521
  if (!n || !n.length)
519
522
  return !1;
520
523
  const s = [], i = St[0].suffix("¥");
@@ -528,7 +531,7 @@ const W = (e, t = 0) => {
528
531
  id: "sheet.command.numfmt.subtract.decimal.command",
529
532
  type: X.COMMAND,
530
533
  handler: async (e) => {
531
- const t = e.get(E), r = e.get(ee), n = e.get(A), s = e.get($), i = r.getSelections();
534
+ const t = e.get(D), r = e.get(ee), n = e.get(U), s = e.get(E), i = r.getSelections();
532
535
  if (!i || !i.length)
533
536
  return !1;
534
537
  const a = s.getCurrentUniverSheetInstance(), o = a.getActiveSheet(), c = a.getUnitId(), d = o.getSheetId();
@@ -570,12 +573,12 @@ const W = (e, t = 0) => {
570
573
  // do nothing,just notify panel is closed
571
574
  !0
572
575
  )
573
- }, et = cn("INumfmtController");
574
- Ht(U.Rendered, et);
576
+ }, tt = ln("INumfmtController");
577
+ kt($.Rendered, tt);
575
578
  const $e = {
576
579
  id: "sheet.operation.open.numfmt.panel",
577
580
  type: X.OPERATION,
578
- handler: (e) => (e.get(et).openPanel(), !0)
581
+ handler: (e) => (e.get(tt).openPanel(), !0)
579
582
  };
580
583
  var yt = { exports: {} }, Ve = {};
581
584
  /**
@@ -587,23 +590,23 @@ var yt = { exports: {} }, Ve = {};
587
590
  * This source code is licensed under the MIT license found in the
588
591
  * LICENSE file in the root directory of this source tree.
589
592
  */
590
- var Vn = yn, Hn = Symbol.for("react.element"), kn = Symbol.for("react.fragment"), Fn = Object.prototype.hasOwnProperty, Bn = Vn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, zn = { key: !0, ref: !0, __self: !0, __source: !0 };
593
+ var Hn = Rn, kn = Symbol.for("react.element"), Fn = Symbol.for("react.fragment"), Bn = Object.prototype.hasOwnProperty, zn = Hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Wn = { key: !0, ref: !0, __self: !0, __source: !0 };
591
594
  function Rt(e, t, r) {
592
595
  var n, s = {}, i = null, a = null;
593
596
  r !== void 0 && (i = "" + r), t.key !== void 0 && (i = "" + t.key), t.ref !== void 0 && (a = t.ref);
594
597
  for (n in t)
595
- Fn.call(t, n) && !zn.hasOwnProperty(n) && (s[n] = t[n]);
598
+ Bn.call(t, n) && !Wn.hasOwnProperty(n) && (s[n] = t[n]);
596
599
  if (e && e.defaultProps)
597
600
  for (n in t = e.defaultProps, t)
598
601
  s[n] === void 0 && (s[n] = t[n]);
599
- return { $$typeof: Hn, type: e, key: i, ref: a, props: s, _owner: Bn.current };
602
+ return { $$typeof: kn, type: e, key: i, ref: a, props: s, _owner: zn.current };
600
603
  }
601
- Ve.Fragment = kn;
604
+ Ve.Fragment = Fn;
602
605
  Ve.jsx = Rt;
603
606
  Ve.jsxs = Rt;
604
607
  yt.exports = Ve;
605
608
  var p = yt.exports;
606
- const tt = Rn([]), We = [
609
+ const nt = In([]), We = [
607
610
  "$",
608
611
  "£",
609
612
  "¥",
@@ -632,11 +635,11 @@ const tt = Rn([]), We = [
632
635
  "₾",
633
636
  "₿"
634
637
  ];
635
- var Wn = Object.defineProperty, Kn = Object.getOwnPropertyDescriptor, Gn = (e, t, r, n) => {
636
- for (var s = n > 1 ? void 0 : n ? Kn(t, r) : t, i = e.length - 1, a; i >= 0; i--)
638
+ var Kn = Object.defineProperty, Gn = Object.getOwnPropertyDescriptor, Yn = (e, t, r, n) => {
639
+ for (var s = n > 1 ? void 0 : n ? Gn(t, r) : t, i = e.length - 1, a; i >= 0; i--)
637
640
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
638
- return n && s && Wn(t, r, s), s;
639
- }, Yn = (e, t) => (r, n) => t(r, n, e);
641
+ return n && s && Kn(t, r, s), s;
642
+ }, Zn = (e, t) => (r, n) => t(r, n, e);
640
643
  let Ue = class {
641
644
  constructor(e) {
642
645
  this._localStorageService = e;
@@ -681,22 +684,22 @@ let Ue = class {
681
684
  this._localStorageService.removeItem(e);
682
685
  }
683
686
  };
684
- Ue = Gn([
685
- Yn(0, g(kt))
687
+ Ue = Yn([
688
+ Zn(0, g(Ft))
686
689
  ], Ue);
687
- const ot = "numfmtCurrency", qn = (e) => {
688
- const t = N(Ue), [r, n] = x(We);
690
+ const ct = "numfmtCurrency", qn = (e) => {
691
+ const t = T(Ue), [r, n] = x(We);
689
692
  return Ye(() => {
690
693
  t.addHabit("numfmtCurrency", []).then(() => {
691
- t.getHabit(ot, [...We]).then((i) => {
694
+ t.getHabit(ct, [...We]).then((i) => {
692
695
  n(i), e && e(i);
693
696
  });
694
697
  });
695
698
  }, []), { userHabitCurrency: r, mark: (i) => {
696
- t.markHabit(ot, i);
699
+ t.markHabit(ct, i);
697
700
  } };
698
- }, Zn = () => {
699
- const e = qe([]), [t, r] = x({});
701
+ }, Jn = () => {
702
+ const e = Ze([]), [t, r] = x({});
700
703
  return Ye(() => {
701
704
  e.current.forEach((s) => {
702
705
  s();
@@ -704,8 +707,8 @@ const ot = "numfmtCurrency", qn = (e) => {
704
707
  }, [t]), (s) => {
705
708
  e.current.push(s), r({});
706
709
  };
707
- }, Se = (e) => We.find((r) => e.includes(r)), Jn = (e) => !!Se(e) && e.startsWith("_("), Qn = (e) => {
708
- const [t, r] = x(() => W(e.defaultPattern || "", 2)), n = vt(tt), [s, i] = x(() => Se(e.defaultPattern) || n[0]), a = V(() => n.map((u) => ({ label: u, value: u })), []), c = N(T).t;
710
+ }, Se = (e) => We.find((r) => e.includes(r)), Qn = (e) => !!Se(e) && e.startsWith("_("), Xn = (e) => {
711
+ const [t, r] = x(() => W(e.defaultPattern || "", 2)), n = gt(nt), [s, i] = x(() => Se(e.defaultPattern) || n[0]), a = L(() => n.map((u) => ({ label: u, value: u })), []), c = T(j).t;
709
712
  e.action.current = () => I(`_("${s}"* #,##0${t > 0 ? ".0" : ""}_)`, t);
710
713
  const d = (u) => {
711
714
  i(u), e.onChange(I(`_("${u}"* #,##0${t > 0 ? ".0" : ""}_)`, t));
@@ -717,7 +720,7 @@ const ot = "numfmtCurrency", qn = (e) => {
717
720
  /* @__PURE__ */ p.jsxs("div", { className: "m-t-16 options ", children: [
718
721
  /* @__PURE__ */ p.jsxs("div", { className: "option", children: [
719
722
  /* @__PURE__ */ p.jsx("div", { className: "label", children: c("sheet.numfmt.decimalLength") }),
720
- /* @__PURE__ */ p.jsx("div", { className: "m-t-8 w-120", children: /* @__PURE__ */ p.jsx(Ze, { value: t, max: 20, min: 0, onChange: l }) })
723
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8 w-120", children: /* @__PURE__ */ p.jsx(qe, { value: t, max: 20, min: 0, onChange: l }) })
721
724
  ] }),
722
725
  /* @__PURE__ */ p.jsxs("div", { className: "option", children: [
723
726
  /* @__PURE__ */ p.jsx("div", { className: "label", children: c("sheet.numfmt.currencyType") }),
@@ -730,12 +733,12 @@ const ot = "numfmtCurrency", qn = (e) => {
730
733
  label: t.label(e),
731
734
  value: t.suffix(e),
732
735
  color: t.color
733
- })), It = () => An.map((e) => ({ label: e.label, value: e.suffix })), Mt = () => Ln.map((e) => ({ label: e.label, value: e.suffix, color: e.color })), Xn = (e) => !!Se(e) && !e.startsWith("_("), er = (e) => {
734
- const r = N(T).t, n = vt(tt), [s, i] = x(() => Se(e.defaultPattern) || n[0]), [a, o] = x(() => W(e.defaultPattern || "", 2)), [c, d] = x(() => {
736
+ })), It = () => Ln.map((e) => ({ label: e.label, value: e.suffix })), Mt = () => Vn.map((e) => ({ label: e.label, value: e.suffix, color: e.color })), er = (e) => !!Se(e) && !e.startsWith("_("), tr = (e) => {
737
+ const r = T(j).t, n = gt(nt), [s, i] = x(() => Se(e.defaultPattern) || n[0]), [a, o] = x(() => W(e.defaultPattern || "", 2)), [c, d] = x(() => {
735
738
  var S;
736
739
  const v = Fe(s);
737
740
  return ((S = v.find((C) => Le(C.value, e.defaultPattern))) == null ? void 0 : S.value) || v[0].value;
738
- }), l = V(() => Fe(s), [s]), u = V(() => n.map((v) => ({ label: v, value: v })), [n]);
741
+ }), l = L(() => Fe(s), [s]), u = L(() => n.map((v) => ({ label: v, value: v })), [n]);
739
742
  e.action.current = () => I(c, a);
740
743
  const m = (v) => {
741
744
  i(v);
@@ -750,7 +753,7 @@ const ot = "numfmtCurrency", qn = (e) => {
750
753
  /* @__PURE__ */ p.jsxs("div", { className: "m-t-16 options ", children: [
751
754
  /* @__PURE__ */ p.jsxs("div", { className: "option", children: [
752
755
  /* @__PURE__ */ p.jsx("div", { className: "label", children: r("sheet.numfmt.decimalLength") }),
753
- /* @__PURE__ */ p.jsx("div", { className: "m-t-8 w-120", children: /* @__PURE__ */ p.jsx(Ze, { value: a, max: 20, min: 0, onChange: _ }) })
756
+ /* @__PURE__ */ p.jsx("div", { className: "m-t-8 w-120", children: /* @__PURE__ */ p.jsx(qe, { value: a, max: 20, min: 0, onChange: _ }) })
754
757
  ] }),
755
758
  /* @__PURE__ */ p.jsxs("div", { className: "option", children: [
756
759
  /* @__PURE__ */ p.jsx("div", { className: "label", children: r("sheet.numfmt.currencyType") }),
@@ -761,11 +764,11 @@ const ot = "numfmtCurrency", qn = (e) => {
761
764
  /* @__PURE__ */ p.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ p.jsx(Qe, { onChange: h, options: l, value: c }) }),
762
765
  /* @__PURE__ */ p.jsx("div", { className: "describe m-t-14", children: r("sheet.numfmt.currencyDes") })
763
766
  ] });
764
- }, tr = (e) => {
765
- const t = D.getInfo(e);
766
- return It().map((r) => r.value).includes(e) || ["date", "datetime", "time"].includes(t.type);
767
767
  }, nr = (e) => {
768
- const t = V(It, []), n = N(T).t, [s, i] = x(() => {
768
+ const t = V.getInfo(e);
769
+ return It().map((r) => r.value).includes(e) || ["date", "datetime", "time"].includes(t.type);
770
+ }, rr = (e) => {
771
+ const t = L(It, []), n = T(j).t, [s, i] = x(() => {
769
772
  if (e.defaultPattern) {
770
773
  const o = t.find((c) => c.value === e.defaultPattern);
771
774
  if (o)
@@ -782,14 +785,14 @@ const ot = "numfmtCurrency", qn = (e) => {
782
785
  /* @__PURE__ */ p.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ p.jsx(Qe, { value: s, options: t, onChange: a }) }),
783
786
  /* @__PURE__ */ p.jsx("div", { className: "describe m-t-14", children: n("sheet.numfmt.dateDes") })
784
787
  ] });
785
- }, rr = (e) => !e, sr = (e) => {
786
- const r = N(T).t;
788
+ }, sr = (e) => !e, ir = (e) => {
789
+ const r = T(j).t;
787
790
  return e.action.current = () => "", /* @__PURE__ */ p.jsx("div", { children: /* @__PURE__ */ p.jsx("div", { className: "describe m-t-14", children: r("sheet.numfmt.generalDes") }) });
788
- }, ir = (e) => Mt().some((t) => Le(t.value, e)), ar = (e) => {
789
- const t = N(T), r = V(Mt, []), [n, s] = x(() => W(e.defaultPattern || "", 0)), [i, a] = x(() => {
791
+ }, ar = (e) => Mt().some((t) => Le(t.value, e)), or = (e) => {
792
+ const t = T(j), r = L(Mt, []), [n, s] = x(() => W(e.defaultPattern || "", 0)), [i, a] = x(() => {
790
793
  const u = r.find((m) => Le(m.value, e.defaultPattern || ""));
791
794
  return (u == null ? void 0 : u.value) || r[0].value;
792
- }), o = V(() => I(i, Number(n || 0)), [i, n]), c = V(() => !Un(i), [i]), d = (u) => {
795
+ }), o = L(() => I(i, Number(n || 0)), [i, n]), c = L(() => !An(i), [i]), d = (u) => {
793
796
  s(u || 0), e.onChange(I(i, Number(u || 0)));
794
797
  }, l = (u) => {
795
798
  s(W(u, 0)), a(u), e.onChange(u);
@@ -797,7 +800,7 @@ const ot = "numfmtCurrency", qn = (e) => {
797
800
  return e.action.current = () => o, /* @__PURE__ */ p.jsxs("div", { children: [
798
801
  /* @__PURE__ */ p.jsx("div", { className: "m-t-16 label", children: t.t("sheet.numfmt.decimalLength") }),
799
802
  /* @__PURE__ */ p.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ p.jsx(
800
- Ze,
803
+ qe,
801
804
  {
802
805
  disabled: c,
803
806
  value: n,
@@ -813,29 +816,29 @@ const ot = "numfmtCurrency", qn = (e) => {
813
816
  /* @__PURE__ */ p.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ p.jsx(Qe, { onChange: l, options: r, value: i }) }),
814
817
  /* @__PURE__ */ p.jsx("div", { className: "describe m-t-14", children: t.t("sheet.numfmt.thousandthPercentileDes") })
815
818
  ] });
816
- }, or = (e) => {
817
- const { defaultValue: t, defaultPattern: r, row: n, col: s } = e.value, i = N(T), a = qe(() => ""), o = i.t, c = Zn(), d = V(
819
+ }, cr = (e) => {
820
+ const { defaultValue: t, defaultPattern: r, row: n, col: s } = e.value, i = T(j), a = Ze(() => ""), o = i.t, c = Jn(), d = L(
818
821
  () => [
819
- { label: "sheet.numfmt.general", component: sr },
820
- { label: "sheet.numfmt.accounting", component: Qn },
821
- { label: "sheet.numfmt.currency", component: er },
822
- { label: "sheet.numfmt.date", component: nr },
823
- { label: "sheet.numfmt.thousandthPercentile", component: ar }
822
+ { label: "sheet.numfmt.general", component: ir },
823
+ { label: "sheet.numfmt.accounting", component: Xn },
824
+ { label: "sheet.numfmt.currency", component: tr },
825
+ { label: "sheet.numfmt.date", component: rr },
826
+ { label: "sheet.numfmt.thousandthPercentile", component: or }
824
827
  ].map((b) => ({ ...b, label: o(b.label) })),
825
828
  []
826
- ), [l, u] = x(S), [m, h] = x(() => `${n}_${s}`), { mark: _, userHabitCurrency: v } = qn(() => h(`${n}_${s}_userCurrency'`)), f = V(() => {
829
+ ), [l, u] = x(S), [m, h] = x(() => `${n}_${s}`), { mark: _, userHabitCurrency: v } = qn(() => h(`${n}_${s}_userCurrency'`)), f = L(() => {
827
830
  var b;
828
831
  return (b = d.find((ne) => ne.label === l)) == null ? void 0 : b.component;
829
832
  }, [l]);
830
833
  function S() {
831
- return [rr, Jn, Xn, tr, ir].reduce((ne, Dt, Et) => ne || (Dt(r) ? d[Et].label : ""), "") || d[0].label;
834
+ return [sr, Qn, er, nr, ar].reduce((ne, Dt, Et) => ne || (Dt(r) ? d[Et].label : ""), "") || d[0].label;
832
835
  }
833
836
  const C = d.map((b) => ({
834
837
  label: b.label,
835
838
  value: b.label
836
839
  })), y = (b) => {
837
840
  u(b), c(() => e.onChange({ type: "change", value: a.current() || "" }));
838
- }, L = (b) => {
841
+ }, A = (b) => {
839
842
  e.onChange({ type: "change", value: b });
840
843
  }, G = () => {
841
844
  const b = a.current() || "", ne = Se(b);
@@ -843,7 +846,7 @@ const ot = "numfmtCurrency", qn = (e) => {
843
846
  }, F = () => {
844
847
  e.onChange({ type: "cancel", value: "" });
845
848
  }, B = {
846
- onChange: L,
849
+ onChange: A,
847
850
  defaultValue: t,
848
851
  defaultPattern: r,
849
852
  action: a
@@ -854,18 +857,18 @@ const ot = "numfmtCurrency", qn = (e) => {
854
857
  /* @__PURE__ */ p.jsxs("div", { children: [
855
858
  /* @__PURE__ */ p.jsx("div", { className: "label m-t-14", children: o("sheet.numfmt.numfmtType") }),
856
859
  /* @__PURE__ */ p.jsx("div", { className: "m-t-8", children: /* @__PURE__ */ p.jsx(Je, { onChange: y, options: C, value: l }) }),
857
- /* @__PURE__ */ p.jsx("div", { children: f && /* @__PURE__ */ p.jsx(tt.Provider, { value: v, children: /* @__PURE__ */ te(f, { ...B, key: m }) }) })
860
+ /* @__PURE__ */ p.jsx("div", { children: f && /* @__PURE__ */ p.jsx(nt.Provider, { value: v, children: /* @__PURE__ */ te(f, { ...B, key: m }) }) })
858
861
  ] }),
859
862
  /* @__PURE__ */ p.jsxs("div", { className: "btn-list m-t-14 m-b-20", children: [
860
- /* @__PURE__ */ p.jsx(it, { size: "small", onClick: F, className: "m-r-12", children: o("sheet.numfmt.cancel") }),
861
- /* @__PURE__ */ p.jsx(it, { type: "primary", size: "small", onClick: G, children: o("sheet.numfmt.confirm") })
863
+ /* @__PURE__ */ p.jsx(at, { size: "small", onClick: F, className: "m-r-12", children: o("sheet.numfmt.cancel") }),
864
+ /* @__PURE__ */ p.jsx(at, { type: "primary", size: "small", onClick: G, children: o("sheet.numfmt.confirm") })
862
865
  ] })
863
866
  ] });
864
- }, Ot = {
867
+ }, Pt = {
865
868
  id: "sheet.command.numfmt.set.percent",
866
869
  type: X.COMMAND,
867
870
  handler: async (e) => {
868
- const t = e.get(E), n = e.get(ee).getSelections();
871
+ const t = e.get(D), n = e.get(ee).getSelections();
869
872
  if (!n || !n.length)
870
873
  return !1;
871
874
  const s = [], i = "0%";
@@ -876,11 +879,11 @@ const ot = "numfmtCurrency", qn = (e) => {
876
879
  }), await t.executeCommand(Q.id, { values: s });
877
880
  }
878
881
  };
879
- var cr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, ur = (e, t, r, n) => {
880
- for (var s = n > 1 ? void 0 : n ? lr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
882
+ var lr = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, dr = (e, t, r, n) => {
883
+ for (var s = n > 1 ? void 0 : n ? ur(t, r) : t, i = e.length - 1, a; i >= 0; i--)
881
884
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
882
- return n && s && cr(t, r, s), s;
883
- }, O = (e, t) => (r, n) => t(r, n, e);
885
+ return n && s && lr(t, r, s), s;
886
+ }, P = (e, t) => (r, n) => t(r, n, e);
884
887
  let Me = class extends H {
885
888
  constructor(t, r, n, s, i, a, o, c, d, l, u, m) {
886
889
  super();
@@ -903,23 +906,23 @@ let Me = class extends H {
903
906
  );
904
907
  let h = "";
905
908
  m && (h = m.pattern);
906
- const _ = (u == null ? void 0 : u.t) === se.NUMBER ? u.v : 12345678, v = {
909
+ const _ = (u == null ? void 0 : u.t) === ie.NUMBER ? u.v : 12345678, v = {
907
910
  onChange: (f) => {
908
911
  var S, C;
909
912
  if (f.type === "change")
910
913
  this._previewPattern = f.value, this._sheetSkeletonManagerService.reCalculate(), (C = (S = this._renderManagerService.getRenderById(d.getUnitId())) == null ? void 0 : S.mainComponent) == null || C.makeDirty();
911
914
  else if (f.type === "confirm") {
912
- const y = r.getSelectionRanges() || [], L = { values: [] }, G = Xe(f.value);
915
+ const y = r.getSelectionRanges() || [], A = { values: [] }, G = Xe(f.value);
913
916
  y.forEach((F) => {
914
917
  R.foreach(F, (B, b) => {
915
- L.values.push({
918
+ A.values.push({
916
919
  row: B,
917
920
  col: b,
918
921
  pattern: f.value,
919
922
  type: G
920
923
  });
921
924
  });
922
- }), n.executeCommand(Q.id, L), t.close();
925
+ }), n.executeCommand(Q.id, A), t.close();
923
926
  } else
924
927
  f.type === "cancel" && t.close();
925
928
  },
@@ -945,7 +948,7 @@ let Me = class extends H {
945
948
  _t,
946
949
  bt,
947
950
  Ct,
948
- Ot,
951
+ Pt,
949
952
  $e,
950
953
  ke,
951
954
  Q
@@ -954,7 +957,7 @@ let Me = class extends H {
954
957
  });
955
958
  }
956
959
  _initPanel() {
957
- this._componentManager.register(ue, or);
960
+ this._componentManager.register(ue, cr);
958
961
  }
959
962
  _initInterceptorCommands() {
960
963
  const t = this;
@@ -962,8 +965,8 @@ let Me = class extends H {
962
965
  this._sheetInterceptorService.interceptCommand({
963
966
  getMutations(r) {
964
967
  switch (r.id) {
965
- case Wt.id:
966
- case zt.id: {
968
+ case Kt.id:
969
+ case Wt.id: {
967
970
  const n = t._univerInstanceService.getCurrentUniverSheetInstance().getUnitId(), s = t._univerInstanceService.getCurrentUniverSheetInstance().getActiveSheet().getSheetId(), i = t._selectionManagerService.getSelectionRanges();
968
971
  if (!(i != null && i.length))
969
972
  break;
@@ -998,35 +1001,35 @@ let Me = class extends H {
998
1001
  );
999
1002
  }
1000
1003
  _initRealTimeRenderingInterceptor() {
1001
- const t = new q((n) => {
1004
+ const t = new Z((n) => {
1002
1005
  this._commandService.onCommandExecuted((s) => {
1003
1006
  s.id === $e.id && n.next(!0), s.id === ke.id && n.next(!1);
1004
1007
  });
1005
- }), r = bn([
1008
+ }), r = yn([
1006
1009
  t,
1007
1010
  this._selectionManagerService.selectionMoveEnd$.pipe(
1008
1011
  le((n) => n ? n.map((s) => s.range) : [])
1009
1012
  )
1010
1013
  ]);
1011
1014
  this.disposeWithMe(
1012
- Z(
1015
+ q(
1013
1016
  r.pipe(
1014
- ft(
1015
- ([n, s]) => new q((i) => {
1016
- const a = new dt();
1017
+ pt(
1018
+ ([n, s]) => new Z((i) => {
1019
+ const a = new mt();
1017
1020
  return n && s.length && i.next({ selectionRanges: s, disposableCollection: a }), () => {
1018
1021
  a.dispose();
1019
1022
  };
1020
1023
  })
1021
1024
  ),
1022
- fn(() => {
1025
+ pn(() => {
1023
1026
  this._previewPattern = null;
1024
1027
  })
1025
1028
  ).subscribe(({ disposableCollection: n, selectionRanges: s }) => {
1026
1029
  var a, o;
1027
1030
  const i = this._univerInstanceService.getCurrentUniverSheetInstance();
1028
1031
  this.openPanel(), n.add(
1029
- this._sheetInterceptorService.intercept(mt.CELL_CONTENT, {
1032
+ this._sheetInterceptorService.intercept(ht.CELL_CONTENT, {
1030
1033
  priority: 99,
1031
1034
  handler: (c, d, l) => {
1032
1035
  const { row: u, col: m } = d;
@@ -1034,22 +1037,22 @@ let Me = class extends H {
1034
1037
  (h) => h.startColumn <= m && h.endColumn >= m && h.startRow <= u && h.endRow >= u
1035
1038
  )) {
1036
1039
  const h = d.worksheet.getCellRaw(u, m), _ = h == null ? void 0 : h.v, v = h == null ? void 0 : h.t;
1037
- if (_ == null || v !== se.NUMBER || this._previewPattern === null)
1040
+ if (_ == null || v !== ie.NUMBER || this._previewPattern === null)
1038
1041
  return l(c);
1039
- const f = gt(this._previewPattern, _);
1042
+ const f = et(this._previewPattern, _, this._localeService.getCurrentLocale());
1040
1043
  if (f.color) {
1041
1044
  const C = this._themeService.getCurrentTheme()[`${f.color}500`];
1042
1045
  return {
1043
1046
  ...c,
1044
1047
  v: f.result,
1045
- t: se.STRING,
1048
+ t: ie.STRING,
1046
1049
  s: { cl: { rgb: C } }
1047
1050
  };
1048
1051
  }
1049
1052
  return {
1050
1053
  ...c,
1051
1054
  v: f.result,
1052
- t: se.STRING
1055
+ t: ie.STRING
1053
1056
  };
1054
1057
  }
1055
1058
  return l(c);
@@ -1063,9 +1066,9 @@ let Me = class extends H {
1063
1066
  _commandExecutedListener() {
1064
1067
  const t = [M.id, w.id];
1065
1068
  this.disposeWithMe(
1066
- Z(
1069
+ q(
1067
1070
  Ge(
1068
- new q((r) => {
1071
+ new Z((r) => {
1069
1072
  const n = this._commandService.onCommandExecuted((s) => {
1070
1073
  if (t.includes(s.id)) {
1071
1074
  const i = s.params;
@@ -1077,7 +1080,7 @@ let Me = class extends H {
1077
1080
  };
1078
1081
  }),
1079
1082
  this._numfmtService.modelReplace$
1080
- ).pipe(pn(16)).subscribe((r) => {
1083
+ ).pipe(vn(16)).subscribe((r) => {
1081
1084
  var n, s;
1082
1085
  this._sheetSkeletonManagerService.reCalculate(), (s = (n = this._renderManagerService.getRenderById(r)) == null ? void 0 : n.mainComponent) == null || s.makeDirty();
1083
1086
  })
@@ -1085,27 +1088,27 @@ let Me = class extends H {
1085
1088
  );
1086
1089
  }
1087
1090
  };
1088
- Me = ur([
1089
- k(U.Rendered, Me),
1090
- O(0, g(Ae)),
1091
- O(1, g(ut)),
1092
- O(2, g(K)),
1093
- O(3, g($)),
1094
- O(4, g(Ke)),
1095
- O(5, g(E)),
1096
- O(6, g(ee)),
1097
- O(7, g(gn)),
1098
- O(8, g(A)),
1099
- O(9, g(pt)),
1100
- O(10, g(Sn)),
1101
- O(11, g(T))
1091
+ Me = dr([
1092
+ k($.Rendered, Me),
1093
+ P(0, g(Ae)),
1094
+ P(1, g(dt)),
1095
+ P(2, g(K)),
1096
+ P(3, g(E)),
1097
+ P(4, g(Ke)),
1098
+ P(5, g(D)),
1099
+ P(6, g(ee)),
1100
+ P(7, g(_n)),
1101
+ P(8, g(U)),
1102
+ P(9, g(vt)),
1103
+ P(10, g(Cn)),
1104
+ P(11, g(j))
1102
1105
  ], Me);
1103
- var dr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, hr = (e, t, r, n) => {
1104
- for (var s = n > 1 ? void 0 : n ? mr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1106
+ var mr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, fr = (e, t, r, n) => {
1107
+ for (var s = n > 1 ? void 0 : n ? hr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1105
1108
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1106
- return n && s && dr(t, r, s), s;
1109
+ return n && s && mr(t, r, s), s;
1107
1110
  }, be = (e, t) => (r, n) => t(r, n, e);
1108
- let Oe = class extends H {
1111
+ let Pe = class extends H {
1109
1112
  constructor(t, r, n, s) {
1110
1113
  super();
1111
1114
  Y(this, "_copyInfo");
@@ -1117,14 +1120,14 @@ let Oe = class extends H {
1117
1120
  id: ue,
1118
1121
  onBeforeCopy: (t, r, n) => this._collectNumfmt(t, r, n),
1119
1122
  onPasteCells: (t, r, n, s) => {
1120
- const { copyType: i = nt.COPY, pasteType: a } = s, { range: o } = t || {}, { range: c } = r;
1123
+ const { copyType: i = rt.COPY, pasteType: a } = s, { range: o } = t || {}, { range: c } = r;
1121
1124
  return this._generateNumfmtMutations(c, { copyType: i, pasteType: a, copyRange: o });
1122
1125
  }
1123
1126
  })
1124
1127
  );
1125
1128
  }
1126
1129
  _collectNumfmt(t, r, n) {
1127
- const s = new lt();
1130
+ const s = new ut();
1128
1131
  this._copyInfo = {
1129
1132
  matrix: s,
1130
1133
  info: {
@@ -1154,15 +1157,15 @@ let Oe = class extends H {
1154
1157
  }
1155
1158
  _generateNumfmtMutations(t, r) {
1156
1159
  const n = this._univerInstanceService.getCurrentUniverSheetInstance(), s = n.getActiveSheet(), i = n.getUnitId(), a = s.getSheetId();
1157
- if (r.copyType === nt.CUT)
1160
+ if (r.copyType === rt.CUT)
1158
1161
  return this._copyInfo = null, { redos: [], undos: [] };
1159
1162
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !r.copyRange)
1160
1163
  return { redos: [], undos: [] };
1161
- if ([rt.SPECIAL_PASTE_COL_WIDTH, rt.SPECIAL_PASTE_VALUE].includes(
1164
+ if ([st.SPECIAL_PASTE_COL_WIDTH, st.SPECIAL_PASTE_VALUE].includes(
1162
1165
  r.pasteType
1163
1166
  ))
1164
1167
  return { redos: [], undos: [] };
1165
- const o = dn(r.copyRange, t, !0), c = [], d = { unitId: i, subUnitId: a, ranges: [] }, l = this._numfmtService.getModel(i, a);
1168
+ const o = mn(r.copyRange, t, !0), c = [], d = { unitId: i, subUnitId: a, ranges: [] }, l = this._numfmtService.getModel(i, a);
1166
1169
  R.foreach(t, (h, _) => {
1167
1170
  this._numfmtService.getValue(i, a, h, _, l) && d.ranges.push({ startRow: h, startColumn: _, endRow: h, endColumn: _ });
1168
1171
  }), o.forEach((h) => {
@@ -1202,19 +1205,19 @@ let Oe = class extends H {
1202
1205
  };
1203
1206
  }
1204
1207
  };
1205
- Oe = hr([
1206
- k(U.Rendered, Oe),
1207
- be(0, g(mn)),
1208
+ Pe = fr([
1209
+ k($.Rendered, Pe),
1210
+ be(0, g(hn)),
1208
1211
  be(1, g(K)),
1209
- be(2, g(A)),
1210
- be(3, g($))
1211
- ], Oe);
1212
- var fr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, vr = (e, t, r, n) => {
1213
- for (var s = n > 1 ? void 0 : n ? pr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1212
+ be(2, g(U)),
1213
+ be(3, g(E))
1214
+ ], Pe);
1215
+ var pr = Object.defineProperty, vr = Object.getOwnPropertyDescriptor, gr = (e, t, r, n) => {
1216
+ for (var s = n > 1 ? void 0 : n ? vr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1214
1217
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1215
- return n && s && fr(t, r, s), s;
1218
+ return n && s && pr(t, r, s), s;
1216
1219
  }, ce = (e, t) => (r, n) => t(r, n, e);
1217
- const gr = () => {
1220
+ const _r = () => {
1218
1221
  let e = [];
1219
1222
  return {
1220
1223
  add: (s, i, a, o, c) => e.push({ unitId: s, subUnitId: i, row: a, col: o, value: c }),
@@ -1224,16 +1227,16 @@ const gr = () => {
1224
1227
  }
1225
1228
  };
1226
1229
  };
1227
- let Pe = class extends H {
1230
+ let Oe = class extends H {
1228
1231
  constructor(t, r, n, s, i) {
1229
1232
  super();
1230
1233
  // collect effect mutations when edit end and push this to commands stack in next commands progress
1231
- Y(this, "_collectEffectMutation", gr());
1234
+ Y(this, "_collectEffectMutation", _r());
1232
1235
  this._sheetInterceptorService = t, this._numfmtService = r, this._univerInstanceService = n, this._injector = s, this._editorBridgeService = i, this._initInterceptorEditorStart(), this._initInterceptorEditorEnd(), this._initInterceptorCommands();
1233
1236
  }
1234
1237
  _initInterceptorEditorStart() {
1235
1238
  this.disposeWithMe(
1236
- Z(
1239
+ q(
1237
1240
  this._editorBridgeService.interceptor.intercept(
1238
1241
  this._editorBridgeService.interceptor.getInterceptPoints().BEFORE_CELL_EDIT,
1239
1242
  {
@@ -1272,7 +1275,7 @@ let Pe = class extends H {
1272
1275
  */
1273
1276
  _initInterceptorEditorEnd() {
1274
1277
  this.disposeWithMe(
1275
- Z(
1278
+ q(
1276
1279
  this._editorBridgeService.interceptor.intercept(
1277
1280
  this._editorBridgeService.interceptor.getInterceptPoints().AFTER_CELL_EDIT,
1278
1281
  {
@@ -1294,7 +1297,7 @@ let Pe = class extends H {
1294
1297
  };
1295
1298
  if (!(t != null && t.v))
1296
1299
  return n(t);
1297
- const a = String(t.v), o = D.parseDate(a) || D.parseTime(a);
1300
+ const a = String(t.v), o = V.parseDate(a) || V.parseTime(a);
1298
1301
  if (!!o) {
1299
1302
  if (o && o.z) {
1300
1303
  const d = Number(o.v);
@@ -1307,10 +1310,10 @@ let Pe = class extends H {
1307
1310
  type: "date",
1308
1311
  pattern: o.z
1309
1312
  }
1310
- ), { ...t, v: d, t: se.NUMBER };
1313
+ ), { ...t, v: d, t: ie.NUMBER };
1311
1314
  }
1312
1315
  } else
1313
- (["date", "time", "datetime"].includes((s == null ? void 0 : s.type) || "") || !_r(a)) && i();
1316
+ (["date", "time", "datetime"].includes((s == null ? void 0 : s.type) || "") || !Sr(a)) && i();
1314
1317
  return n(t);
1315
1318
  }
1316
1319
  }
@@ -1324,7 +1327,7 @@ let Pe = class extends H {
1324
1327
  this._sheetInterceptorService.interceptCommand({
1325
1328
  getMutations(r) {
1326
1329
  switch (r.id) {
1327
- case Kt.id: {
1330
+ case Gt.id: {
1328
1331
  const n = t._univerInstanceService.getCurrentUniverSheetInstance().getUnitId(), s = t._univerInstanceService.getCurrentUniverSheetInstance().getActiveSheet().getSheetId(), i = t._collectEffectMutation.getEffects();
1329
1332
  if (!i.length)
1330
1333
  return {
@@ -1381,45 +1384,45 @@ let Pe = class extends H {
1381
1384
  );
1382
1385
  }
1383
1386
  };
1384
- Pe = vr([
1385
- k(U.Rendered, Pe),
1387
+ Oe = gr([
1388
+ k($.Rendered, Oe),
1386
1389
  ce(0, g(Ae)),
1387
- ce(1, g(A)),
1388
- ce(2, g($)),
1390
+ ce(1, g(U)),
1391
+ ce(2, g(E)),
1389
1392
  ce(3, g(K)),
1390
- ce(4, g(hn))
1391
- ], Pe);
1392
- function _r(e) {
1393
+ ce(4, g(fn))
1394
+ ], Oe);
1395
+ function Sr(e) {
1393
1396
  return /^-?\d+(\.\d+)?$/.test(e);
1394
1397
  }
1395
- var Sr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, br = (e, t, r, n) => {
1396
- for (var s = n > 1 ? void 0 : n ? Cr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1398
+ var Cr = Object.defineProperty, br = Object.getOwnPropertyDescriptor, yr = (e, t, r, n) => {
1399
+ for (var s = n > 1 ? void 0 : n ? br(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1397
1400
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1398
- return n && s && Sr(t, r, s), s;
1399
- }, yr = (e, t) => (r, n) => t(r, n, e);
1401
+ return n && s && Cr(t, r, s), s;
1402
+ }, Rr = (e, t) => (r, n) => t(r, n, e);
1400
1403
  let xe = class extends H {
1401
1404
  constructor(t) {
1402
1405
  super();
1403
1406
  Y(this, "_initLocal", () => {
1404
- this._localeService.load({ zhCN: wn, enUS: Pn });
1407
+ this._localeService.load({ zhCN: jn, enUS: xn });
1405
1408
  });
1406
1409
  this._localeService = t, this._initLocal();
1407
1410
  }
1408
1411
  };
1409
- xe = br([
1410
- k(U.Rendered, xe),
1411
- yr(0, g(T))
1412
+ xe = yr([
1413
+ k($.Rendered, xe),
1414
+ Rr(0, g(j))
1412
1415
  ], xe);
1413
- var P = function() {
1414
- return P = Object.assign || function(e) {
1416
+ var O = function() {
1417
+ return O = Object.assign || function(e) {
1415
1418
  for (var t, r = 1, n = arguments.length; r < n; r++) {
1416
1419
  t = arguments[r];
1417
1420
  for (var s in t)
1418
1421
  Object.prototype.hasOwnProperty.call(t, s) && (e[s] = t[s]);
1419
1422
  }
1420
1423
  return e;
1421
- }, P.apply(this, arguments);
1422
- }, Rr = function(e, t) {
1424
+ }, O.apply(this, arguments);
1425
+ }, Ir = function(e, t) {
1423
1426
  var r = {};
1424
1427
  for (var n in e)
1425
1428
  Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
@@ -1427,17 +1430,17 @@ var P = function() {
1427
1430
  for (var s = 0, n = Object.getOwnPropertySymbols(e); s < n.length; s++)
1428
1431
  t.indexOf(n[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[s]) && (r[n[s]] = e[n[s]]);
1429
1432
  return r;
1430
- }, ae = ie(function(e, t) {
1431
- var r = e.icon, n = e.id, s = e.className, i = e.extend, a = Rr(e, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(n, " ").concat(s || "").trim(), c = qe("_".concat(Or()));
1432
- return Pt(r, "".concat(n), { defIds: r.defIds, idSuffix: c.current }, P({ ref: t, className: o }, a), i);
1433
+ }, oe = ae(function(e, t) {
1434
+ var r = e.icon, n = e.id, s = e.className, i = e.extend, a = Ir(e, ["icon", "id", "className", "extend"]), o = "univerjs-icon univerjs-icon-".concat(n, " ").concat(s || "").trim(), c = Ze("_".concat(Or()));
1435
+ return Ot(r, "".concat(n), { defIds: r.defIds, idSuffix: c.current }, O({ ref: t, className: o }, a), i);
1433
1436
  });
1434
- function Pt(e, t, r, n, s) {
1435
- return te(e.tag, P(P({ key: t }, Ir(e, r, s)), n), (Mr(e, r).children || []).map(function(i, a) {
1436
- return Pt(i, "".concat(t, "-").concat(e.tag, "-").concat(a), r, void 0, s);
1437
+ function Ot(e, t, r, n, s) {
1438
+ return te(e.tag, O(O({ key: t }, Mr(e, r, s)), n), (Pr(e, r).children || []).map(function(i, a) {
1439
+ return Ot(i, "".concat(t, "-").concat(e.tag, "-").concat(a), r, void 0, s);
1437
1440
  }));
1438
1441
  }
1439
- function Ir(e, t, r) {
1440
- var n = P({}, e.attrs);
1442
+ function Mr(e, t, r) {
1443
+ var n = O({}, e.attrs);
1441
1444
  r != null && r.colorChannel1 && n.fill === "colorChannel1" && (n.fill = r.colorChannel1);
1442
1445
  var s = t.defIds;
1443
1446
  return !s || s.length === 0 || (e.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + t.idSuffix), Object.entries(n).forEach(function(i) {
@@ -1445,61 +1448,61 @@ function Ir(e, t, r) {
1445
1448
  typeof o == "string" && (n[a] = o.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
1446
1449
  })), n;
1447
1450
  }
1448
- function Mr(e, t) {
1451
+ function Pr(e, t) {
1449
1452
  var r, n = t.defIds;
1450
- return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? P(P({}, e), { children: e.children.map(function(s) {
1451
- return typeof s.attrs.id == "string" && n && n.indexOf(s.attrs.id) > -1 ? P(P({}, s), { attrs: P(P({}, s.attrs), { id: s.attrs.id + t.idSuffix }) }) : s;
1453
+ return !n || n.length === 0 ? e : e.tag === "defs" && (!((r = e.children) === null || r === void 0) && r.length) ? O(O({}, e), { children: e.children.map(function(s) {
1454
+ return typeof s.attrs.id == "string" && n && n.indexOf(s.attrs.id) > -1 ? O(O({}, s), { attrs: O(O({}, s.attrs), { id: s.attrs.id + t.idSuffix }) }) : s;
1452
1455
  }) }) : e;
1453
1456
  }
1454
1457
  function Or() {
1455
1458
  return Math.random().toString(36).substring(2, 8);
1456
1459
  }
1457
- ae.displayName = "UniverIcon";
1458
- var Pr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.99988 3.60921C3.99988 2.32055 5.04456 1.27588 6.33321 1.27588 7.62187 1.27588 8.66654 2.32055 8.66654 3.60921V6.24136C8.66654 7.53002 7.62187 8.5747 6.33321 8.5747 5.04455 8.5747 3.99988 7.53002 3.99988 6.24136V3.60921zM6.33321 2.60921C5.78093 2.60921 5.33321 3.05693 5.33321 3.60921V6.24136C5.33321 6.79364 5.78093 7.24136 6.33321 7.24136 6.88549 7.24136 7.33321 6.79364 7.33321 6.24136V3.60921C7.33321 3.05693 6.88549 2.60921 6.33321 2.60921zM9.99988 3.60921C9.99988 2.32055 11.0446 1.27588 12.3332 1.27588 13.6219 1.27588 14.6665 2.32055 14.6665 3.60921V6.24136C14.6665 7.53002 13.6219 8.5747 12.3332 8.5747 11.0446 8.5747 9.99988 7.53002 9.99988 6.24136V3.60921zM12.3332 2.60921C11.7809 2.60921 11.3332 3.05693 11.3332 3.60921V6.24136C11.3332 6.79364 11.7809 7.24136 12.3332 7.24136 12.8855 7.24136 13.3332 6.79364 13.3332 6.24136V3.60921C13.3332 3.05693 12.8855 2.60921 12.3332 2.60921z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4713 9.58625C12.211 9.3259 11.7889 9.3259 11.5285 9.58625 11.2682 9.8466 11.2682 10.2687 11.5285 10.5291L12.3904 11.391H6.33329C5.9651 11.391 5.66663 11.6895 5.66663 12.0577 5.66663 12.4258 5.9651 12.7243 6.33329 12.7243H12.3904L11.5285 13.5862C11.2682 13.8466 11.2682 14.2687 11.5285 14.5291 11.7889 14.7894 12.211 14.7894 12.4713 14.5291L14.4669 12.5335C14.4851 12.5156 14.5022 12.4968 14.5183 12.477 14.5484 12.4399 14.5739 12.4003 14.5948 12.359 14.6407 12.2685 14.6666 12.1661 14.6666 12.0577 14.6666 11.9492 14.6407 11.8468 14.5948 11.7563 14.5739 11.715 14.5484 11.6754 14.5183 11.6383 14.5022 11.6185 14.4851 11.5997 14.4669 11.5818L12.4713 9.58625zM1.33325 7.98825C1.33325 7.62006 1.63173 7.32159 1.99992 7.32159H2.33325C2.70144 7.32159 2.99992 7.62006 2.99992 7.98825 2.99992 8.35644 2.70144 8.65492 2.33325 8.65492H1.99992C1.63173 8.65492 1.33325 8.35644 1.33325 7.98825z" } }] }, xt = ie(function(e, t) {
1459
- return te(ae, Object.assign({}, e, {
1460
+ oe.displayName = "UniverIcon";
1461
+ var xr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M3.99988 3.60921C3.99988 2.32055 5.04456 1.27588 6.33321 1.27588 7.62187 1.27588 8.66654 2.32055 8.66654 3.60921V6.24136C8.66654 7.53002 7.62187 8.5747 6.33321 8.5747 5.04455 8.5747 3.99988 7.53002 3.99988 6.24136V3.60921zM6.33321 2.60921C5.78093 2.60921 5.33321 3.05693 5.33321 3.60921V6.24136C5.33321 6.79364 5.78093 7.24136 6.33321 7.24136 6.88549 7.24136 7.33321 6.79364 7.33321 6.24136V3.60921C7.33321 3.05693 6.88549 2.60921 6.33321 2.60921zM9.99988 3.60921C9.99988 2.32055 11.0446 1.27588 12.3332 1.27588 13.6219 1.27588 14.6665 2.32055 14.6665 3.60921V6.24136C14.6665 7.53002 13.6219 8.5747 12.3332 8.5747 11.0446 8.5747 9.99988 7.53002 9.99988 6.24136V3.60921zM12.3332 2.60921C11.7809 2.60921 11.3332 3.05693 11.3332 3.60921V6.24136C11.3332 6.79364 11.7809 7.24136 12.3332 7.24136 12.8855 7.24136 13.3332 6.79364 13.3332 6.24136V3.60921C13.3332 3.05693 12.8855 2.60921 12.3332 2.60921z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.4713 9.58625C12.211 9.3259 11.7889 9.3259 11.5285 9.58625 11.2682 9.8466 11.2682 10.2687 11.5285 10.5291L12.3904 11.391H6.33329C5.9651 11.391 5.66663 11.6895 5.66663 12.0577 5.66663 12.4258 5.9651 12.7243 6.33329 12.7243H12.3904L11.5285 13.5862C11.2682 13.8466 11.2682 14.2687 11.5285 14.5291 11.7889 14.7894 12.211 14.7894 12.4713 14.5291L14.4669 12.5335C14.4851 12.5156 14.5022 12.4968 14.5183 12.477 14.5484 12.4399 14.5739 12.4003 14.5948 12.359 14.6407 12.2685 14.6666 12.1661 14.6666 12.0577 14.6666 11.9492 14.6407 11.8468 14.5948 11.7563 14.5739 11.715 14.5484 11.6754 14.5183 11.6383 14.5022 11.6185 14.4851 11.5997 14.4669 11.5818L12.4713 9.58625zM1.33325 7.98825C1.33325 7.62006 1.63173 7.32159 1.99992 7.32159H2.33325C2.70144 7.32159 2.99992 7.62006 2.99992 7.98825 2.99992 8.35644 2.70144 8.65492 2.33325 8.65492H1.99992C1.63173 8.65492 1.33325 8.35644 1.33325 7.98825z" } }] }, xt = ae(function(e, t) {
1462
+ return te(oe, Object.assign({}, e, {
1460
1463
  id: "add-digits-single",
1461
1464
  ref: t,
1462
- icon: Pr
1465
+ icon: xr
1463
1466
  }));
1464
1467
  });
1465
1468
  xt.displayName = "AddDigitsSingle";
1466
- const xr = xt;
1467
- var wr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_102_556", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { mask: "url(#mask0_102_556)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M0.629584 3.99986C1.13729 3.4922 1.9604 3.49224 2.46806 3.99995L7.57569 9.10806C7.81 9.3424 8.18992 9.3424 8.42424 9.10808L13.5323 3.99998C14.04 3.4923 14.8631 3.4923 15.3708 3.99998C15.8785 4.50766 15.8785 5.33078 15.3708 5.83846L9.41415 11.7951C8.63307 12.5762 7.36669 12.5762 6.58565 11.7951L0.629497 5.83834C0.121839 5.33063 0.121879 4.50752 0.629584 3.99986Z", fillRule: "evenodd", clipRule: "evenodd" } }] }] }, wt = ie(function(e, t) {
1468
- return te(ae, Object.assign({}, e, {
1469
+ const wr = xt;
1470
+ var jr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_102_556", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { mask: "url(#mask0_102_556)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M0.629584 3.99986C1.13729 3.4922 1.9604 3.49224 2.46806 3.99995L7.57569 9.10806C7.81 9.3424 8.18992 9.3424 8.42424 9.10808L13.5323 3.99998C14.04 3.4923 14.8631 3.4923 15.3708 3.99998C15.8785 4.50766 15.8785 5.33078 15.3708 5.83846L9.41415 11.7951C8.63307 12.5762 7.36669 12.5762 6.58565 11.7951L0.629497 5.83834C0.121839 5.33063 0.121879 4.50752 0.629584 3.99986Z", fillRule: "evenodd", clipRule: "evenodd" } }] }] }, wt = ae(function(e, t) {
1471
+ return te(oe, Object.assign({}, e, {
1469
1472
  id: "more-down-single",
1470
1473
  ref: t,
1471
- icon: wr
1474
+ icon: jr
1472
1475
  }));
1473
1476
  });
1474
1477
  wt.displayName = "MoreDownSingle";
1475
- const jr = wt;
1476
- var Nr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_561_2", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_561_2)", fillRule: "evenodd", clipRule: "evenodd" }, children: [{ tag: "path", attrs: { d: "M4.91876 2.65039C3.66601 2.65039 2.65045 3.66595 2.65045 4.9187 2.65045 6.17146 3.66601 7.18702 4.91876 7.18702 6.17152 7.18702 7.18708 6.17146 7.18708 4.9187 7.18708 3.66595 6.17152 2.65039 4.91876 2.65039zM3.94663 4.9187C3.94663 4.38181 4.38187 3.94657 4.91876 3.94657 5.45566 3.94657 5.8909 4.38181 5.8909 4.9187 5.8909 5.4556 5.45566 5.89084 4.91876 5.89084 4.38187 5.89084 3.94663 5.4556 3.94663 4.9187zM11.0812 8.81299C9.82842 8.81299 8.81286 9.82855 8.81286 11.0813 8.81286 12.3341 9.82842 13.3496 11.0812 13.3496 12.3339 13.3496 13.3495 12.3341 13.3495 11.0813 13.3495 9.82855 12.3339 8.81299 11.0812 8.81299zM10.109 11.0813C10.109 10.5444 10.5443 10.1092 11.0812 10.1092 11.6181 10.1092 12.0533 10.5444 12.0533 11.0813 12.0533 11.6182 11.6181 12.0534 11.0812 12.0534 10.5443 12.0534 10.109 11.6182 10.109 11.0813zM13.1597 2.84021C13.4128 3.09331 13.4128 3.50365 13.1597 3.75675L3.7568 13.1596C3.5037 13.4127 3.09336 13.4127 2.84026 13.1596 2.58717 12.9065 2.58717 12.4962 2.84026 12.2431L12.2431 2.84021C12.4962 2.58712 12.9066 2.58712 13.1597 2.84021z" } }] }] }, jt = ie(function(e, t) {
1477
- return te(ae, Object.assign({}, e, {
1478
+ const Nr = wt;
1479
+ var Tr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_561_2", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#D9D9D9", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { fill: "currentColor", mask: "url(#mask0_561_2)", fillRule: "evenodd", clipRule: "evenodd" }, children: [{ tag: "path", attrs: { d: "M4.91876 2.65039C3.66601 2.65039 2.65045 3.66595 2.65045 4.9187 2.65045 6.17146 3.66601 7.18702 4.91876 7.18702 6.17152 7.18702 7.18708 6.17146 7.18708 4.9187 7.18708 3.66595 6.17152 2.65039 4.91876 2.65039zM3.94663 4.9187C3.94663 4.38181 4.38187 3.94657 4.91876 3.94657 5.45566 3.94657 5.8909 4.38181 5.8909 4.9187 5.8909 5.4556 5.45566 5.89084 4.91876 5.89084 4.38187 5.89084 3.94663 5.4556 3.94663 4.9187zM11.0812 8.81299C9.82842 8.81299 8.81286 9.82855 8.81286 11.0813 8.81286 12.3341 9.82842 13.3496 11.0812 13.3496 12.3339 13.3496 13.3495 12.3341 13.3495 11.0813 13.3495 9.82855 12.3339 8.81299 11.0812 8.81299zM10.109 11.0813C10.109 10.5444 10.5443 10.1092 11.0812 10.1092 11.6181 10.1092 12.0533 10.5444 12.0533 11.0813 12.0533 11.6182 11.6181 12.0534 11.0812 12.0534 10.5443 12.0534 10.109 11.6182 10.109 11.0813zM13.1597 2.84021C13.4128 3.09331 13.4128 3.50365 13.1597 3.75675L3.7568 13.1596C3.5037 13.4127 3.09336 13.4127 2.84026 13.1596 2.58717 12.9065 2.58717 12.4962 2.84026 12.2431L12.2431 2.84021C12.4962 2.58712 12.9066 2.58712 13.1597 2.84021z" } }] }] }, jt = ae(function(e, t) {
1480
+ return te(oe, Object.assign({}, e, {
1478
1481
  id: "percent-single",
1479
1482
  ref: t,
1480
- icon: Nr
1483
+ icon: Tr
1481
1484
  }));
1482
1485
  });
1483
1486
  jt.displayName = "PercentSingle";
1484
- const Tr = jt;
1485
- var Dr = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5 3.61825C5 2.32958 6.04468 1.28491 7.33333 1.28491C8.62199 1.28491 9.66667 2.32958 9.66667 3.61825V6.30787C9.66667 7.59653 8.62199 8.64121 7.33333 8.64121C6.04468 8.64121 5 7.59653 5 6.30787V3.61825ZM7.33333 2.61825C6.78105 2.61825 6.33333 3.06596 6.33333 3.61825V6.30787C6.33333 6.86015 6.78106 7.30787 7.33333 7.30787C7.88561 7.30787 8.33333 6.86015 8.33333 6.30787V3.61825C8.33333 3.06596 7.88561 2.61825 7.33333 2.61825Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2 7.9745C2 7.60631 2.29848 7.30783 2.66667 7.30783H3C3.36819 7.30783 3.66667 7.60631 3.66667 7.9745 3.66667 8.34269 3.36819 8.64117 3 8.64117H2.66667C2.29848 8.64117 2 8.34269 2 7.9745zM8.80482 9.56197C9.06517 9.82232 9.06517 10.2444 8.80482 10.5048L7.94289 11.3667H13.3334C13.7016 11.3667 14.0001 11.6652 14.0001 12.0334 14.0001 12.4016 13.7016 12.7 13.3334 12.7H7.94289L8.80482 13.562C9.06517 13.8223 9.06517 14.2444 8.80482 14.5048 8.54447 14.7651 8.12236 14.7651 7.86201 14.5048L5.86201 12.5048C5.79809 12.4409 5.74987 12.3672 5.71733 12.2886 5.68474 12.21 5.66675 12.1238 5.66675 12.0334 5.66675 11.943 5.68474 11.8568 5.71733 11.7782 5.74987 11.6996 5.79809 11.6259 5.86201 11.562L7.86201 9.56197C8.12236 9.30162 8.54447 9.30162 8.80482 9.56197z" } }] }, Nt = ie(function(e, t) {
1486
- return te(ae, Object.assign({}, e, {
1487
+ const Dr = jt;
1488
+ var Er = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5 3.61825C5 2.32958 6.04468 1.28491 7.33333 1.28491C8.62199 1.28491 9.66667 2.32958 9.66667 3.61825V6.30787C9.66667 7.59653 8.62199 8.64121 7.33333 8.64121C6.04468 8.64121 5 7.59653 5 6.30787V3.61825ZM7.33333 2.61825C6.78105 2.61825 6.33333 3.06596 6.33333 3.61825V6.30787C6.33333 6.86015 6.78106 7.30787 7.33333 7.30787C7.88561 7.30787 8.33333 6.86015 8.33333 6.30787V3.61825C8.33333 3.06596 7.88561 2.61825 7.33333 2.61825Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2 7.9745C2 7.60631 2.29848 7.30783 2.66667 7.30783H3C3.36819 7.30783 3.66667 7.60631 3.66667 7.9745 3.66667 8.34269 3.36819 8.64117 3 8.64117H2.66667C2.29848 8.64117 2 8.34269 2 7.9745zM8.80482 9.56197C9.06517 9.82232 9.06517 10.2444 8.80482 10.5048L7.94289 11.3667H13.3334C13.7016 11.3667 14.0001 11.6652 14.0001 12.0334 14.0001 12.4016 13.7016 12.7 13.3334 12.7H7.94289L8.80482 13.562C9.06517 13.8223 9.06517 14.2444 8.80482 14.5048 8.54447 14.7651 8.12236 14.7651 7.86201 14.5048L5.86201 12.5048C5.79809 12.4409 5.74987 12.3672 5.71733 12.2886 5.68474 12.21 5.66675 12.1238 5.66675 12.0334 5.66675 11.943 5.68474 11.8568 5.71733 11.7782 5.74987 11.6996 5.79809 11.6259 5.86201 11.562L7.86201 9.56197C8.12236 9.30162 8.54447 9.30162 8.80482 9.56197z" } }] }, Nt = ae(function(e, t) {
1489
+ return te(oe, Object.assign({}, e, {
1487
1490
  id: "reduce-digits-single",
1488
1491
  ref: t,
1489
- icon: Dr
1492
+ icon: Er
1490
1493
  }));
1491
1494
  });
1492
1495
  Nt.displayName = "ReduceDigitsSingle";
1493
- const Er = Nt;
1494
- var $r = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.05443 1.55744C4.34898 1.33653 4.76685 1.39623 4.98776 1.69078L7.99996 5.98276L11.0122 1.69078C11.2331 1.39623 11.6509 1.33653 11.9455 1.55744C12.24 1.77836 12.2997 2.19623 12.0788 2.49078L9.33338 6.42708H12.0788C12.447 6.42708 12.7455 6.72556 12.7455 7.09375C12.7455 7.46194 12.447 7.76042 12.0788 7.76042H8.66659V9.69702H12.3348C12.703 9.69702 13.0015 9.9955 13.0015 10.3637C13.0015 10.7319 12.703 11.0304 12.3348 11.0304H8.66659V13.9091C8.66659 14.2773 8.36811 14.5758 7.99992 14.5758C7.63173 14.5758 7.33325 14.2773 7.33325 13.9091V11.0304H3.66508C3.29689 11.0304 2.99841 10.7319 2.99841 10.3637C2.99841 9.9955 3.29689 9.69702 3.66508 9.69702H7.33325V7.76042H3.92109C3.5529 7.76042 3.25443 7.46194 3.25443 7.09375C3.25443 6.72556 3.5529 6.42708 3.92109 6.42708H6.66653L3.92109 2.49078C3.70018 2.19623 3.75987 1.77836 4.05443 1.55744Z" } }] }, Tt = ie(function(e, t) {
1495
- return te(ae, Object.assign({}, e, {
1496
+ const $r = Nt;
1497
+ var Ur = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.05443 1.55744C4.34898 1.33653 4.76685 1.39623 4.98776 1.69078L7.99996 5.98276L11.0122 1.69078C11.2331 1.39623 11.6509 1.33653 11.9455 1.55744C12.24 1.77836 12.2997 2.19623 12.0788 2.49078L9.33338 6.42708H12.0788C12.447 6.42708 12.7455 6.72556 12.7455 7.09375C12.7455 7.46194 12.447 7.76042 12.0788 7.76042H8.66659V9.69702H12.3348C12.703 9.69702 13.0015 9.9955 13.0015 10.3637C13.0015 10.7319 12.703 11.0304 12.3348 11.0304H8.66659V13.9091C8.66659 14.2773 8.36811 14.5758 7.99992 14.5758C7.63173 14.5758 7.33325 14.2773 7.33325 13.9091V11.0304H3.66508C3.29689 11.0304 2.99841 10.7319 2.99841 10.3637C2.99841 9.9955 3.29689 9.69702 3.66508 9.69702H7.33325V7.76042H3.92109C3.5529 7.76042 3.25443 7.46194 3.25443 7.09375C3.25443 6.72556 3.5529 6.42708 3.92109 6.42708H6.66653L3.92109 2.49078C3.70018 2.19623 3.75987 1.77836 4.05443 1.55744Z" } }] }, Tt = ae(function(e, t) {
1498
+ return te(oe, Object.assign({}, e, {
1496
1499
  id: "rmb-single",
1497
1500
  ref: t,
1498
- icon: $r
1501
+ icon: Ur
1499
1502
  }));
1500
1503
  });
1501
1504
  Tt.displayName = "RmbSingle";
1502
- const Ur = Tt, we = [
1505
+ const Ar = Tt, we = [
1503
1506
  {
1504
1507
  label: "sheet.numfmt.general",
1505
1508
  pattern: null
@@ -1552,16 +1555,16 @@ const Ur = Tt, we = [
1552
1555
  label: "sheet.numfmt.moreFmt",
1553
1556
  pattern: ""
1554
1557
  }
1555
- ], Ar = (e) => {
1558
+ ], Lr = (e) => {
1556
1559
  var n;
1557
- const t = N(T), r = (n = e.value) != null ? n : t.t("sheet.numfmt.general");
1560
+ const t = T(j), r = (n = e.value) != null ? n : t.t("sheet.numfmt.general");
1558
1561
  return /* @__PURE__ */ p.jsx("span", { className: "more-numfmt-type", children: r });
1559
- }, Lr = () => {
1560
- const e = N(E), t = N(T), r = In(), n = N(ee), s = (o) => {
1562
+ }, Vr = () => {
1563
+ const e = T(D), t = T(j), r = Mn(), n = T(ee), s = (o) => {
1561
1564
  const c = n.getLast();
1562
1565
  if (!c)
1563
1566
  return;
1564
- const d = r.get(_n), l = c.range, u = [];
1567
+ const d = r.get(Sn), l = c.range, u = [];
1565
1568
  R.foreach(l, (m, h) => {
1566
1569
  o ? u.push({ row: m, col: h, pattern: o, type: Xe(o) }) : u.push({ row: m, col: h });
1567
1570
  }), e.executeCommand(Q.id, { values: u }), d.focus();
@@ -1584,14 +1587,14 @@ const Ur = Tt, we = [
1584
1587
  },
1585
1588
  children: [
1586
1589
  /* @__PURE__ */ p.jsx("div", { children: t.t(o.label) }),
1587
- /* @__PURE__ */ p.jsx("div", { className: "m-l-26", children: o.pattern ? D.format(o.pattern || "", a, { locale: "zh-CN" }) : "" })
1590
+ /* @__PURE__ */ p.jsx("div", { className: "m-l-26", children: o.pattern ? et(o.pattern || "", a, t.getCurrentLocale()).result : "" })
1588
1591
  ]
1589
1592
  },
1590
1593
  c
1591
1594
  )) });
1592
- }, Vr = (e) => {
1595
+ }, Hr = (e) => {
1593
1596
  const t = "icon-rmbSingle";
1594
- return e.register(t, Ur), e.register("MoreDownSingle", jr), (r) => ({
1597
+ return e.register(t, Ar), e.register("MoreDownSingle", Nr), (r) => ({
1595
1598
  icon: t,
1596
1599
  id: Ct.id,
1597
1600
  title: "sheet.numfmt.currency",
@@ -1602,9 +1605,9 @@ const Ur = Tt, we = [
1602
1605
  hidden$: _e(r, de.SHEET),
1603
1606
  disabled$: fe(r)
1604
1607
  });
1605
- }, Hr = (e) => {
1608
+ }, kr = (e) => {
1606
1609
  const t = "icon-addDigitsSingle";
1607
- return e.register(t, xr), (r) => ({
1610
+ return e.register(t, wr), (r) => ({
1608
1611
  icon: t,
1609
1612
  id: _t.id,
1610
1613
  title: "sheet.numfmt.addDecimal",
@@ -1615,9 +1618,9 @@ const Ur = Tt, we = [
1615
1618
  hidden$: _e(r, de.SHEET),
1616
1619
  disabled$: fe(r)
1617
1620
  });
1618
- }, kr = (e) => {
1621
+ }, Fr = (e) => {
1619
1622
  const t = "icon-reduceDigitsSingle";
1620
- return e.register(t, Er), (r) => ({
1623
+ return e.register(t, $r), (r) => ({
1621
1624
  icon: t,
1622
1625
  id: bt.id,
1623
1626
  title: "sheet.numfmt.subtractDecimal",
@@ -1628,11 +1631,11 @@ const Ur = Tt, we = [
1628
1631
  hidden$: _e(r, de.SHEET),
1629
1632
  disabled$: fe(r)
1630
1633
  });
1631
- }, Fr = (e) => {
1634
+ }, Br = (e) => {
1632
1635
  const t = "icon-PercentSingle";
1633
- return e.register(t, Tr), (r) => ({
1636
+ return e.register(t, Dr), (r) => ({
1634
1637
  icon: t,
1635
- id: Ot.id,
1638
+ id: Pt.id,
1636
1639
  title: "sheet.numfmt.percent",
1637
1640
  tooltip: "sheet.numfmt.percent",
1638
1641
  type: pe.BUTTON,
@@ -1641,13 +1644,13 @@ const Ur = Tt, we = [
1641
1644
  hidden$: _e(r, de.SHEET),
1642
1645
  disabled$: fe(r)
1643
1646
  });
1644
- }, Br = (e) => {
1647
+ }, zr = (e) => {
1645
1648
  const t = "sheet.numfmt.moreNumfmtType", r = "sheet.numfmt.moreNumfmtType.options";
1646
- return e.register(t, Ar), e.register(r, Lr), (n) => {
1647
- const s = n.get(A), i = n.get(Mn), a = n.get($), o = n.get(E), c = n.get(T), d = n.get(ee), l = new q(
1649
+ return e.register(t, Lr), e.register(r, Vr), (n) => {
1650
+ const s = n.get(U), i = n.get(Pn), a = n.get(E), o = n.get(D), c = n.get(j), d = n.get(ee), l = new Z(
1648
1651
  (u) => Ge(
1649
1652
  d.selectionMoveEnd$,
1650
- new q((m) => {
1653
+ new Z((m) => {
1651
1654
  const h = [M.id, w.id], _ = o.onCommandExecuted((v) => {
1652
1655
  h.includes(v.id) && m.next(null);
1653
1656
  });
@@ -1656,11 +1659,11 @@ const Ur = Tt, we = [
1656
1659
  ).subscribe(() => {
1657
1660
  const m = d.getSelections();
1658
1661
  if (m && m[0]) {
1659
- const h = a.getCurrentUniverSheetInstance(), _ = h.getActiveSheet(), v = m[0].range, f = v.startRow, S = v.startColumn, C = s.getValue(h.getUnitId(), _.getSheetId(), f, S), y = i.getNumfmtValue(h.getUnitId(), _.getSheetId(), f, S), L = (C == null ? void 0 : C.pattern) || y;
1662
+ const h = a.getCurrentUniverSheetInstance(), _ = h.getActiveSheet(), v = m[0].range, f = v.startRow, S = v.startColumn, C = s.getValue(h.getUnitId(), _.getSheetId(), f, S), y = i.getNumfmtValue(h.getUnitId(), _.getSheetId(), f, S), A = (C == null ? void 0 : C.pattern) || y;
1660
1663
  let G = c.t("sheet.numfmt.general");
1661
- if (L) {
1664
+ if (A) {
1662
1665
  const F = we.filter((B) => typeof B == "object" && B.pattern).find(
1663
- (B) => Le(L, B.pattern)
1666
+ (B) => Le(A, B.pattern)
1664
1667
  );
1665
1668
  F && typeof F == "object" && F.pattern ? G = c.t(F.label) : G = c.t("sheet.numfmt.moreFmt");
1666
1669
  }
@@ -1690,33 +1693,33 @@ const Ur = Tt, we = [
1690
1693
  };
1691
1694
  };
1692
1695
  };
1693
- var zr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, Kr = (e, t, r, n) => {
1694
- for (var s = n > 1 ? void 0 : n ? Wr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1696
+ var Wr = Object.defineProperty, Kr = Object.getOwnPropertyDescriptor, Gr = (e, t, r, n) => {
1697
+ for (var s = n > 1 ? void 0 : n ? Kr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1695
1698
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1696
- return n && s && zr(t, r, s), s;
1699
+ return n && s && Wr(t, r, s), s;
1697
1700
  }, Be = (e, t) => (r, n) => t(r, n, e);
1698
1701
  let je = class extends H {
1699
1702
  constructor(e, t, r) {
1700
1703
  super(), this._injector = e, this._componentManager = t, this._menuService = r, this._initMenu();
1701
1704
  }
1702
1705
  _initMenu() {
1703
- [Fr, Hr, kr, Vr, Br].map((e) => e(this._componentManager)).forEach((e) => {
1706
+ [Br, kr, Fr, Hr, zr].map((e) => e(this._componentManager)).forEach((e) => {
1704
1707
  this.disposeWithMe(this._menuService.addMenuItem(e(this._injector)));
1705
1708
  });
1706
1709
  }
1707
1710
  };
1708
- je = Kr([
1709
- k(U.Rendered, je),
1711
+ je = Gr([
1712
+ k($.Rendered, je),
1710
1713
  Be(0, g(K)),
1711
- Be(1, g(pt)),
1712
- Be(2, g(Cn))
1714
+ Be(1, g(vt)),
1715
+ Be(2, g(bn))
1713
1716
  ], je);
1714
- var Gr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, qr = (e, t, r, n) => {
1715
- for (var s = n > 1 ? void 0 : n ? Yr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1717
+ var Yr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, qr = (e, t, r, n) => {
1718
+ for (var s = n > 1 ? void 0 : n ? Zr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1716
1719
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1717
- return n && s && Gr(t, r, s), s;
1718
- }, re = (e, t) => (r, n) => t(r, n, e);
1719
- const Zr = [w.id, M.id];
1720
+ return n && s && Yr(t, r, s), s;
1721
+ }, se = (e, t) => (r, n) => t(r, n, e);
1722
+ const Jr = [w.id, M.id];
1720
1723
  let Ne = class extends H {
1721
1724
  constructor(e, t, r, n, s, i) {
1722
1725
  super(), this._numfmtService = e, this._univerInstanceService = t, this._injector = r, this._refRangeService = n, this._sheetSkeletonManagerService = s, this._commandService = i, this._registerRefRange(), this._mergeRefMutations();
@@ -1726,24 +1729,24 @@ let Ne = class extends H {
1726
1729
  handler: (e, t, r) => {
1727
1730
  if (!e)
1728
1731
  return r(e);
1729
- const n = e.filter((s) => !Zr.includes(s.id));
1732
+ const n = e.filter((s) => !Jr.includes(s.id));
1730
1733
  return n.push(...Ee(e)), r(n);
1731
1734
  }
1732
1735
  });
1733
1736
  }
1734
1737
  _registerRefRange() {
1735
1738
  this.disposeWithMe(
1736
- Z(
1739
+ q(
1737
1740
  Ge(
1738
1741
  this._sheetSkeletonManagerService.currentSkeleton$.pipe(
1739
1742
  le((e) => e == null ? void 0 : e.sheetId),
1740
- ht()
1743
+ ft()
1741
1744
  ),
1742
1745
  this._numfmtService.modelReplace$
1743
1746
  ).pipe(
1744
- ft(
1745
- () => new q((e) => {
1746
- const t = new dt();
1747
+ pt(
1748
+ () => new Z((e) => {
1749
+ const t = new mt();
1747
1750
  return e.next(t), () => {
1748
1751
  t.dispose();
1749
1752
  };
@@ -1759,50 +1762,50 @@ let Ne = class extends H {
1759
1762
  };
1760
1763
  let u = [];
1761
1764
  switch (o.id) {
1762
- case j.DeleteRangeMoveLeftCommandId: {
1765
+ case N.DeleteRangeMoveLeftCommandId: {
1766
+ u = an(o, l);
1767
+ break;
1768
+ }
1769
+ case N.DeleteRangeMoveUpCommandId: {
1763
1770
  u = sn(o, l);
1764
1771
  break;
1765
1772
  }
1766
- case j.DeleteRangeMoveUpCommandId: {
1773
+ case N.InsertColCommandId: {
1767
1774
  u = rn(o, l);
1768
1775
  break;
1769
1776
  }
1770
- case j.InsertColCommandId: {
1777
+ case N.InsertRangeMoveDownCommandId: {
1771
1778
  u = nn(o, l);
1772
1779
  break;
1773
1780
  }
1774
- case j.InsertRangeMoveDownCommandId: {
1781
+ case N.InsertRangeMoveRightCommandId: {
1775
1782
  u = tn(o, l);
1776
1783
  break;
1777
1784
  }
1778
- case j.InsertRangeMoveRightCommandId: {
1785
+ case N.InsertRowCommandId: {
1779
1786
  u = en(o, l);
1780
1787
  break;
1781
1788
  }
1782
- case j.InsertRowCommandId: {
1789
+ case N.MoveRangeCommandId: {
1783
1790
  u = Xt(o, l);
1784
1791
  break;
1785
1792
  }
1786
- case j.MoveRangeCommandId: {
1793
+ case N.RemoveColCommandId: {
1787
1794
  u = Qt(o, l);
1788
1795
  break;
1789
1796
  }
1790
- case j.RemoveColCommandId: {
1797
+ case N.RemoveRowCommandId: {
1791
1798
  u = Jt(o, l);
1792
1799
  break;
1793
1800
  }
1794
- case j.RemoveRowCommandId: {
1795
- u = Zt(o, l);
1796
- break;
1797
- }
1798
- case j.MoveColsCommandId: {
1801
+ case N.MoveColsCommandId: {
1799
1802
  u = qt(o, l);
1800
1803
  break;
1801
1804
  }
1802
- case j.MoveRowsCommandId:
1803
- u = Yt(o, l);
1805
+ case N.MoveRowsCommandId:
1806
+ u = Zt(o, l);
1804
1807
  }
1805
- const m = an(u, l), h = this._numfmtService.getValue(r, n, c, d);
1808
+ const m = on(u, l), h = this._numfmtService.getValue(r, n, c, d);
1806
1809
  if (!m && h) {
1807
1810
  const _ = {
1808
1811
  id: M.id,
@@ -1835,8 +1838,8 @@ let Ne = class extends H {
1835
1838
  subUnitId: n,
1836
1839
  ranges: [{ startColumn: d, startRow: c, endColumn: d, endRow: c }]
1837
1840
  }
1838
- }, L = J(this._injector, y.params);
1839
- return _.push(S, y), v.push(...C, ...L), {
1841
+ }, A = J(this._injector, y.params);
1842
+ return _.push(S, y), v.push(...C, ...A), {
1840
1843
  redos: _,
1841
1844
  undos: v.reverse()
1842
1845
  };
@@ -1855,27 +1858,27 @@ let Ne = class extends H {
1855
1858
  );
1856
1859
  i.set(`${o}_${c}`, l), e.add(l);
1857
1860
  }), e.add(
1858
- Z(
1859
- new q((o) => {
1861
+ q(
1862
+ new Z((o) => {
1860
1863
  e.add(
1861
1864
  this._commandService.onCommandExecuted((c) => {
1862
1865
  [w.id, M.id].includes(c.id) && o.next(c.params);
1863
1866
  })
1864
1867
  );
1865
1868
  }).pipe(
1866
- st(
1869
+ it(
1867
1870
  (o) => o.unitId === r && o.subUnitId === n
1868
1871
  ),
1869
1872
  le((o) => o.ranges ? o.ranges : o.values ? Object.keys(o.values).reduce((c, d) => {
1870
1873
  const l = o.values[d];
1871
1874
  return c.push(...l.ranges), c;
1872
1875
  }, []) : []),
1873
- vn(300),
1876
+ gn(300),
1874
1877
  // updating the listener moves to the next queue
1875
1878
  le(
1876
1879
  (o) => o.reduce((c, d) => (c.push(...d), c), [])
1877
1880
  ),
1878
- st((o) => !!o.length)
1881
+ it((o) => !!o.length)
1879
1882
  ).subscribe((o) => {
1880
1883
  o.forEach((c) => {
1881
1884
  R.foreach(c, (d, l) => {
@@ -1903,18 +1906,18 @@ let Ne = class extends H {
1903
1906
  }
1904
1907
  };
1905
1908
  Ne = qr([
1906
- k(U.Rendered, Ne),
1907
- re(0, g(A)),
1908
- re(1, g($)),
1909
- re(2, g(K)),
1910
- re(3, g(Gt)),
1911
- re(4, g(Ke)),
1912
- re(5, g(E))
1909
+ k($.Rendered, Ne),
1910
+ se(0, g(U)),
1911
+ se(1, g(E)),
1912
+ se(2, g(K)),
1913
+ se(3, g(Yt)),
1914
+ se(4, g(Ke)),
1915
+ se(5, g(D))
1913
1916
  ], Ne);
1914
- var Jr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, Xr = (e, t, r, n) => {
1915
- for (var s = n > 1 ? void 0 : n ? Qr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1917
+ var Qr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, es = (e, t, r, n) => {
1918
+ for (var s = n > 1 ? void 0 : n ? Xr(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1916
1919
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1917
- return n && s && Jr(t, r, s), s;
1920
+ return n && s && Qr(t, r, s), s;
1918
1921
  }, ye = (e, t) => (r, n) => t(r, n, e);
1919
1922
  let Te = class extends H {
1920
1923
  constructor(e, t, r, n) {
@@ -1924,8 +1927,8 @@ let Te = class extends H {
1924
1927
  this.disposeWithMe(
1925
1928
  this._sheetInterceptorService.interceptCommand({
1926
1929
  getMutations: (e) => {
1927
- if (e.id === on.id) {
1928
- const t = e.params, r = t.unitId || es(this._univerInstanceService), n = t.subUnitId || ts(this._univerInstanceService), s = this._numfmtService.getModel(r, n);
1930
+ if (e.id === cn.id) {
1931
+ const t = e.params, r = t.unitId || ts(this._univerInstanceService), n = t.subUnitId || ns(this._univerInstanceService), s = this._numfmtService.getModel(r, n);
1929
1932
  if (!s)
1930
1933
  return { redos: [], undos: [] };
1931
1934
  const i = [];
@@ -1948,34 +1951,34 @@ let Te = class extends H {
1948
1951
  );
1949
1952
  }
1950
1953
  };
1951
- Te = Xr([
1952
- k(U.Rendered, Te),
1953
- ye(0, g(A)),
1954
+ Te = es([
1955
+ k($.Rendered, Te),
1956
+ ye(0, g(U)),
1954
1957
  ye(1, g(Ae)),
1955
- ye(2, g($)),
1958
+ ye(2, g(E)),
1956
1959
  ye(3, g(K))
1957
1960
  ], Te);
1958
- const es = (e) => e.getCurrentUniverSheetInstance().getUnitId(), ts = (e) => e.getCurrentUniverSheetInstance().getActiveSheet().getSheetId();
1959
- var ns = Object.defineProperty, rs = Object.getOwnPropertyDescriptor, ss = (e, t, r, n) => {
1960
- for (var s = n > 1 ? void 0 : n ? rs(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1961
+ const ts = (e) => e.getCurrentUniverSheetInstance().getUnitId(), ns = (e) => e.getCurrentUniverSheetInstance().getActiveSheet().getSheetId();
1962
+ var rs = Object.defineProperty, ss = Object.getOwnPropertyDescriptor, is = (e, t, r, n) => {
1963
+ for (var s = n > 1 ? void 0 : n ? ss(t, r) : t, i = e.length - 1, a; i >= 0; i--)
1961
1964
  (a = e[i]) && (s = (n ? a(t, r, s) : a(s)) || s);
1962
- return n && s && ns(t, r, s), s;
1963
- }, is = (e, t) => (r, n) => t(r, n, e), ze;
1964
- let ct = (ze = class extends Ft {
1965
+ return n && s && rs(t, r, s), s;
1966
+ }, as = (e, t) => (r, n) => t(r, n, e), ze;
1967
+ let lt = (ze = class extends Bt {
1965
1968
  constructor(e, t) {
1966
1969
  super(ue), this._injector = t;
1967
1970
  }
1968
1971
  onStarting() {
1969
- this._injector.add([et, { useClass: Me, lazy: !1 }]), this._injector.add([Pe]), this._injector.add([Ue]), this._injector.add([Ne]), this._injector.add([Te]), this._injector.add([Oe]), this._injector.add([Re]), this._injector.add([Ie]), this._injector.add([xe]), this._injector.add([je]);
1972
+ this._injector.add([tt, { useClass: Me, lazy: !1 }]), this._injector.add([Oe]), this._injector.add([Ue]), this._injector.add([Ne]), this._injector.add([Te]), this._injector.add([Pe]), this._injector.add([Re]), this._injector.add([Ie]), this._injector.add([xe]), this._injector.add([je]);
1970
1973
  }
1971
- }, Y(ze, "type", Bt.Sheet), ze);
1972
- ct = ss([
1973
- is(1, g(K))
1974
- ], ct);
1974
+ }, Y(ze, "type", zt.Sheet), ze);
1975
+ lt = is([
1976
+ as(1, g(K))
1977
+ ], lt);
1975
1978
  export {
1976
1979
  Q as SetNumfmtCommand,
1977
- ct as UniverSheetsNumfmtPlugin,
1978
- Pn as enUS,
1979
- gt as getPatternPreview,
1980
- wn as zhCN
1980
+ lt as UniverSheetsNumfmtPlugin,
1981
+ xn as enUS,
1982
+ et as getPatternPreview,
1983
+ jn as zhCN
1981
1984
  };