@univerjs/sheets-data-validation 0.2.4 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,21 +1,19 @@
1
- var vo = Object.defineProperty;
2
- var _o = (a, t, e) => t in a ? vo(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
- var S = (a, t, e) => _o(a, typeof t != "symbol" ? t + "" : t, e);
4
- import { DEFAULT_EMPTY_DOCUMENT_VALUE as hr, Disposable as ue, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as So, DisposableCollection as mr, IUniverInstanceService as J, UniverInstanceType as re, toDisposable as Oa, CommandType as Ie, ICommandService as ee, ObjectMatrix as Ye, Range as W, isFormulaString as A, ThemeService as Ro, VerticalAlign as me, HorizontalAlign as Be, createInternalEditorID as Na, LocaleService as ie, OnLifecycle as ve, LifecycleStages as _e, IPermissionService as Co, DataValidationType as H, Tools as X, DataValidationOperator as V, DataValidationErrorStyle as ct, UndoCommand as Vo, RedoCommand as Mo, isUnitRangesEqual as Io, isValidRange as wo, debounce as yo, shallowEqual as za, DataValidationRenderMode as le, WrapStrategy as se, DocumentDataModel as Do, BooleanNumber as st, Rectangle as Ue, IUndoRedoService as kt, sequenceExecuteAsync as fr, sequenceExecute as Ta, RxDisposable as Fa, DataValidationStatus as Ce, isRangesEqual as Eo, queryObjectMatrix as Zt, IResourceManagerService as bo, DependentOn as pr, Plugin as gr } from "@univerjs/core";
5
- import { ICommandService as Ql, LocaleService as Zl, Plugin as Jl } from "@univerjs/core";
6
- import { Inject as w, Injector as De, Optional as Oo } from "@wendellhu/redi";
7
- import { DataValidatorRegistryService as we, DataValidationModel as q, BaseDataValidator as Xe, DataValidatorRegistryScope as No, TWO_FORMULA_OPERATOR_COUNT as To, getRuleOptions as pa, getRuleSetting as ga, RemoveDataValidationCommand as vr, createDefaultNewRule as _r, RemoveAllDataValidationCommand as Fo, TextLengthErrorTitleMap as Lo, AddDataValidationMutation as va, RemoveDataValidationMutation as Ft, UpdateRuleType as fe, UpdateDataValidationMutation as pe, removeDataValidationUndoFactory as Po, DataValidationManager as Ao, AddDataValidationCommand as xo, UniverDataValidationPlugin as Sr } from "@univerjs/data-validation";
8
- import { getSheetCommandTarget as Yt, SetRangeValuesCommand as La, WorksheetViewPermission as jo, SetRangeValuesMutation as Lt, SetRangeValuesUndoMutationFactory as Rr, WorkbookEditablePermission as _a, WorksheetSetCellStylePermission as Sa, WorksheetEditPermission as Ra, RangeProtectionPermissionEditPoint as Ca, SheetInterceptorService as Pa, INTERCEPTOR_POINT as Cr, SheetsSelectionsService as $o, ClearSelectionAllCommand as Bo, RefRangeService as Uo, handleCommonDefaultRangeChangeWithEffectRefCommands as Ho, UniverSheetsPlugin as Vr } from "@univerjs/sheets";
9
- import { SheetCanvasPopManagerService as Wo, IMarkSelectionService as ko, IEditorBridgeService as Aa, getCurrentRangeDisable$ as Yo, AutoHeightController as Mr, SheetSkeletonManagerService as Pt, HoverManagerService as Xo, CellAlertManagerService as Go, CellAlertType as qo, IAutoFillService as zo, APPLY_TYPE as It, virtualizeDiscreteRanges as Va, getAutoFillRepeatRange as Ko, COPY_TYPE as Ka, rangeToDiscreteRange as Qo, PREDEFINED_HOOK_NAME as wt, getRepeatRange as Qa, ISheetClipboardService as Zo, SheetPermissionInterceptorBaseController as Jo, UniverSheetsUIPlugin as Ir } from "@univerjs/sheets-ui";
10
- import { useObservable as Ge, ComponentManager as Vt, IZenZoneService as en, ISidebarService as wr, TextEditor as yr, useEvent as Dr, RangeSelector as tn, KeyCode as an, IDialogService as rn, MenuItemType as xa, MenuPosition as on, MenuGroup as nn, getMenuHiddenObservable as sn, IMenuService as ln } from "@univerjs/ui";
11
- import { IRenderManagerService as ja, fixLineWidthByScale as Za, Transform as dn, Checkbox as cn, DeviceInputEventType as un, getDocsSkeletonPageSize as yt, Rect as Er, DocumentViewModel as hn, DocumentSkeleton as mn, Documents as fn, FontCache as pn, Shape as gn, getFontStyleString as Ja } from "@univerjs/engine-render";
12
- import { Subject as br, filter as vn, BehaviorSubject as er, distinctUntilChanged as _n, debounceTime as He, bufferTime as Or } from "rxjs";
13
- import Ma, { forwardRef as Ne, useRef as $a, createElement as Te, useState as te, useMemo as Je, useEffect as et } from "react";
14
- import { useDependency as j } from "@wendellhu/redi/react-bindings";
15
- import { RegisterOtherFormulaService as Nr, FormulaRefRangeService as Sn } from "@univerjs/sheets-formula";
16
- import { FormLayout as Z, Input as je, RadioGroup as Ba, Radio as $e, DraggableList as Rn, Select as Ia, Checkbox as Ua, Button as We, RectPopup as Cn, Scrollbar as Vn, DatePanel as Mn } from "@univerjs/design";
1
+ var _o = Object.defineProperty;
2
+ var So = (a, t, e) => t in a ? _o(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
+ var R = (a, t, e) => So(a, typeof t != "symbol" ? t + "" : t, e);
4
+ import { DEFAULT_EMPTY_DOCUMENT_VALUE as mr, useDependency as j, Inject as w, Disposable as ue, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as Ro, DisposableCollection as fr, IUniverInstanceService as J, UniverInstanceType as re, toDisposable as Oa, CommandType as Ie, ICommandService as ee, ObjectMatrix as Ye, Range as W, isFormulaString as A, ThemeService as Co, VerticalAlign as me, HorizontalAlign as Be, createInternalEditorID as Na, LocaleService as ie, OnLifecycle as ve, LifecycleStages as _e, IPermissionService as Vo, DataValidationType as H, Tools as X, DataValidationOperator as V, DataValidationErrorStyle as dt, UndoCommand as Mo, RedoCommand as Io, isUnitRangesEqual as wo, isValidRange as yo, debounce as Do, shallowEqual as Ka, Injector as De, DataValidationRenderMode as le, WrapStrategy as se, DocumentDataModel as Eo, BooleanNumber as it, Rectangle as Ue, IUndoRedoService as kt, sequenceExecuteAsync as pr, sequenceExecute as Ta, Optional as bo, RxDisposable as Fa, DataValidationStatus as Ce, isRangesEqual as Oo, queryObjectMatrix as Zt, IResourceManagerService as No, DependentOn as gr, Plugin as vr } from "@univerjs/core";
5
+ import { ICommandService as zl, LocaleService as Kl, Plugin as Ql } from "@univerjs/core";
6
+ import { DataValidatorRegistryService as we, DataValidationModel as q, BaseDataValidator as Xe, DataValidatorRegistryScope as To, TWO_FORMULA_OPERATOR_COUNT as Fo, getRuleOptions as pa, getRuleSetting as ga, RemoveDataValidationCommand as _r, createDefaultNewRule as Sr, RemoveAllDataValidationCommand as Lo, TextLengthErrorTitleMap as Po, AddDataValidationMutation as va, RemoveDataValidationMutation as Ft, UpdateRuleType as fe, UpdateDataValidationMutation as pe, removeDataValidationUndoFactory as Ao, DataValidationManager as xo, AddDataValidationCommand as jo, UniverDataValidationPlugin as Rr } from "@univerjs/data-validation";
7
+ import { getSheetCommandTarget as Yt, SetRangeValuesCommand as La, WorksheetViewPermission as $o, SetRangeValuesMutation as Lt, SetRangeValuesUndoMutationFactory as Cr, WorkbookEditablePermission as _a, WorksheetSetCellStylePermission as Sa, WorksheetEditPermission as Ra, RangeProtectionPermissionEditPoint as Ca, SheetInterceptorService as Pa, INTERCEPTOR_POINT as Vr, SheetsSelectionsService as Bo, ClearSelectionAllCommand as Uo, RefRangeService as Ho, handleCommonDefaultRangeChangeWithEffectRefCommands as Wo, UniverSheetsPlugin as Mr } from "@univerjs/sheets";
8
+ import { SheetCanvasPopManagerService as ko, IMarkSelectionService as Yo, IEditorBridgeService as Aa, getCurrentRangeDisable$ as Xo, AutoHeightController as Ir, SheetSkeletonManagerService as Pt, HoverManagerService as Go, CellAlertManagerService as qo, CellAlertType as zo, IAutoFillService as Ko, APPLY_TYPE as It, virtualizeDiscreteRanges as Va, getAutoFillRepeatRange as Qo, COPY_TYPE as Qa, rangeToDiscreteRange as Zo, PREDEFINED_HOOK_NAME as wt, getRepeatRange as Za, ISheetClipboardService as Jo, SheetPermissionInterceptorBaseController as en, UniverSheetsUIPlugin as wr } from "@univerjs/sheets-ui";
9
+ import { useObservable as Ge, ComponentManager as Vt, IZenZoneService as tn, ISidebarService as yr, TextEditor as Dr, useEvent as Er, RangeSelector as an, KeyCode as rn, IDialogService as on, MenuItemType as xa, MenuPosition as nn, MenuGroup as sn, getMenuHiddenObservable as ln, IMenuService as dn } from "@univerjs/ui";
10
+ import { IRenderManagerService as ja, fixLineWidthByScale as Ja, Transform as cn, Checkbox as un, DeviceInputEventType as hn, getDocsSkeletonPageSize as yt, Rect as br, DocumentViewModel as mn, DocumentSkeleton as fn, Documents as pn, FontCache as gn, Shape as vn, getFontStyleString as er } from "@univerjs/engine-render";
11
+ import { Subject as Or, filter as $a, BehaviorSubject as tr, distinctUntilChanged as _n, debounceTime as He, bufferTime as Nr } from "rxjs";
12
+ import Ma, { forwardRef as Ne, useRef as Ba, createElement as Te, useState as te, useMemo as Je, useEffect as et } from "react";
13
+ import { RegisterOtherFormulaService as Tr, FormulaRefRangeService as Sn } from "@univerjs/sheets-formula";
14
+ import { FormLayout as Z, Input as je, RadioGroup as Ua, Radio as $e, DraggableList as Rn, Select as Ia, Checkbox as Ha, Button as We, RectPopup as Cn, Scrollbar as Vn, DatePanel as Mn } from "@univerjs/design";
17
15
  import In from "clsx";
18
- import { LexerTreeBuilder as Ha, deserializeRangeWithSheet as Tr, serializeRange as Fr, isReferenceString as Wa, sequenceNodeType as wn, isFormulaTransformable as yn, transformFormula as tr } from "@univerjs/engine-formula";
16
+ import { LexerTreeBuilder as Wa, deserializeRangeWithSheet as Fr, serializeRange as Lr, isReferenceString as ka, sequenceNodeType as wn, isFormulaTransformable as yn, transformFormula as ar } from "@univerjs/engine-formula";
19
17
  import Ve from "dayjs";
20
18
  import { numfmt as Dn } from "@univerjs/engine-numfmt";
21
19
  function ae(a) {
@@ -26,11 +24,11 @@ function ae(a) {
26
24
  if (t == null)
27
25
  return "";
28
26
  const e = t.dataStream;
29
- return e.substring(e.length - 2, e.length) === hr ? e.substring(0, e.length - 2) : e;
27
+ return e.substring(e.length - 2, e.length) === mr ? e.substring(0, e.length - 2) : e;
30
28
  }
31
29
  return a == null ? void 0 : a.v;
32
30
  }
33
- function Lr(a) {
31
+ function Pr(a) {
34
32
  var t;
35
33
  return String((t = ae(a)) != null ? t : "");
36
34
  }
@@ -38,7 +36,7 @@ var En = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
38
36
  function bn(a) {
39
37
  return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
40
38
  }
41
- var Pr = { exports: {} }, Xt = {};
39
+ var Ar = { exports: {} }, Xt = {};
42
40
  /**
43
41
  * @license React
44
42
  * react-jsx-runtime.production.min.js
@@ -49,7 +47,7 @@ var Pr = { exports: {} }, Xt = {};
49
47
  * LICENSE file in the root directory of this source tree.
50
48
  */
51
49
  var On = Ma, Nn = Symbol.for("react.element"), Tn = Symbol.for("react.fragment"), Fn = Object.prototype.hasOwnProperty, Ln = On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Pn = { key: !0, ref: !0, __self: !0, __source: !0 };
52
- function Ar(a, t, e) {
50
+ function xr(a, t, e) {
53
51
  var r, o = {}, n = null, i = null;
54
52
  e !== void 0 && (n = "" + e), t.key !== void 0 && (n = "" + t.key), t.ref !== void 0 && (i = t.ref);
55
53
  for (r in t) Fn.call(t, r) && !Pn.hasOwnProperty(r) && (o[r] = t[r]);
@@ -57,10 +55,10 @@ function Ar(a, t, e) {
57
55
  return { $$typeof: Nn, type: a, key: n, ref: i, props: o, _owner: Ln.current };
58
56
  }
59
57
  Xt.Fragment = Tn;
60
- Xt.jsx = Ar;
61
- Xt.jsxs = Ar;
62
- Pr.exports = Xt;
63
- var v = Pr.exports;
58
+ Xt.jsx = xr;
59
+ Xt.jsxs = xr;
60
+ Ar.exports = Xt;
61
+ var v = Ar.exports;
64
62
  function An() {
65
63
  const a = j(Oe), t = Ge(a.activeDropdown$, a.activeDropdown), e = j(Vt);
66
64
  if (!t)
@@ -80,7 +78,7 @@ function An() {
80
78
  i
81
79
  );
82
80
  }
83
- const xr = "sheet.ui.dropdown";
81
+ const jr = "sheet.ui.dropdown";
84
82
  var xn = Object.defineProperty, jn = Object.getOwnPropertyDescriptor, $n = (a, t, e, r) => {
85
83
  for (var o = r > 1 ? void 0 : r ? jn(t, e) : t, n = a.length - 1, i; n >= 0; n--)
86
84
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
@@ -89,11 +87,11 @@ var xn = Object.defineProperty, jn = Object.getOwnPropertyDescriptor, $n = (a, t
89
87
  let Oe = class extends ue {
90
88
  constructor(t, e, r, o, n, i) {
91
89
  super();
92
- S(this, "_activeDropdown");
93
- S(this, "_activeDropdown$", new br());
94
- S(this, "_currentPopup", null);
95
- S(this, "activeDropdown$", this._activeDropdown$.asObservable());
96
- S(this, "_zenVisible", !1);
90
+ R(this, "_activeDropdown");
91
+ R(this, "_activeDropdown$", new Or());
92
+ R(this, "_currentPopup", null);
93
+ R(this, "activeDropdown$", this._activeDropdown$.asObservable());
94
+ R(this, "_zenVisible", !1);
97
95
  this._canvasPopupManagerService = t, this._univerInstanceService = e, this._dataValidatorRegistryService = r, this._zenZoneService = o, this._renderManagerService = n, this._dataValidationModel = i, this._init(), this.disposeWithMe(() => {
98
96
  this._activeDropdown$.complete();
99
97
  });
@@ -111,11 +109,11 @@ let Oe = class extends ue {
111
109
  if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
112
110
  return;
113
111
  this._activeDropdown = t, this._activeDropdown$.next(this._activeDropdown);
114
- const i = this._renderManagerService.getRenderById(So), s = this._canvasPopupManagerService.attachPopupToCell(
112
+ const i = this._renderManagerService.getRenderById(Ro), s = this._canvasPopupManagerService.attachPopupToCell(
115
113
  o,
116
114
  n,
117
115
  {
118
- componentKey: xr,
116
+ componentKey: jr,
119
117
  onClickOutside: () => {
120
118
  e && this.hideDropdown();
121
119
  },
@@ -125,7 +123,7 @@ let Oe = class extends ue {
125
123
  );
126
124
  if (!s)
127
125
  throw new Error("[DataValidationDropdownManagerService]: cannot show dropdown!");
128
- const l = new mr();
126
+ const l = new fr();
129
127
  l.add(s), l.add({
130
128
  dispose: () => {
131
129
  var d, c;
@@ -166,10 +164,10 @@ let Oe = class extends ue {
166
164
  }
167
165
  };
168
166
  Oe = $n([
169
- qe(0, w(Wo)),
167
+ qe(0, w(ko)),
170
168
  qe(1, J),
171
169
  qe(2, w(we)),
172
- qe(3, en),
170
+ qe(3, tn),
173
171
  qe(4, ja),
174
172
  qe(5, w(q))
175
173
  ], Oe);
@@ -177,18 +175,18 @@ var Bn = Object.defineProperty, Un = Object.getOwnPropertyDescriptor, Hn = (a, t
177
175
  for (var o = r > 1 ? void 0 : r ? Un(t, e) : t, n = a.length - 1, i; n >= 0; n--)
178
176
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
179
177
  return r && o && Bn(t, e, o), o;
180
- }, ar = (a, t) => (e, r) => t(e, r, a);
178
+ }, rr = (a, t) => (e, r) => t(e, r, a);
181
179
  let Me = class extends ue {
182
180
  constructor(t, e) {
183
181
  super();
184
- S(this, "_open$", new er(!1));
185
- S(this, "open$", this._open$.pipe(_n()));
186
- S(this, "_activeRule");
187
- S(this, "_activeRule$", new er(void 0));
188
- S(this, "activeRule$", this._activeRule$.asObservable());
189
- S(this, "_closeDisposable", null);
182
+ R(this, "_open$", new tr(!1));
183
+ R(this, "open$", this._open$.pipe(_n()));
184
+ R(this, "_activeRule");
185
+ R(this, "_activeRule$", new tr(void 0));
186
+ R(this, "activeRule$", this._activeRule$.asObservable());
187
+ R(this, "_closeDisposable", null);
190
188
  this._univerInstanceService = t, this._sidebarService = e, this.disposeWithMe(
191
- this._univerInstanceService.getCurrentTypeOfUnit$(re.UNIVER_SHEET).pipe(vn((r) => !r)).subscribe(() => {
189
+ this._univerInstanceService.getCurrentTypeOfUnit$(re.UNIVER_SHEET).pipe($a((r) => !r)).subscribe(() => {
192
190
  this.close();
193
191
  })
194
192
  );
@@ -220,16 +218,16 @@ let Me = class extends ue {
220
218
  }
221
219
  };
222
220
  Me = Hn([
223
- ar(0, J),
224
- ar(1, wr)
221
+ rr(0, J),
222
+ rr(1, yr)
225
223
  ], Me);
226
- const jr = "DataValidationPanel", ot = {
224
+ const $r = "DataValidationPanel", rt = {
227
225
  id: "data-validation.operation.open-validation-panel",
228
226
  type: Ie.OPERATION,
229
227
  handler(a, t) {
230
228
  if (!t)
231
229
  return !1;
232
- const { ruleId: e, isAdd: r } = t, o = a.get(Me), n = a.get(q), i = a.get(J), s = a.get(wr), l = Yt(i);
230
+ const { ruleId: e, isAdd: r } = t, o = a.get(Me), n = a.get(q), i = a.get(J), s = a.get(yr), l = Yt(i);
233
231
  if (!l) return !1;
234
232
  const { unitId: d, subUnitId: c } = l, u = e ? n.getRuleById(d, c, e) : void 0;
235
233
  o.open(), o.setActiveRule(u && {
@@ -239,24 +237,24 @@ const jr = "DataValidationPanel", ot = {
239
237
  });
240
238
  const f = s.open({
241
239
  header: { title: r ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
242
- children: { label: jr },
240
+ children: { label: $r },
243
241
  width: 312,
244
242
  onClose: () => o.close()
245
243
  });
246
244
  return o.setCloseDisposable(f), !0;
247
245
  }
248
- }, ka = {
246
+ }, Ya = {
249
247
  id: "data-validation.operation.close-validation-panel",
250
248
  type: Ie.OPERATION,
251
249
  handler(a) {
252
250
  return a.get(Me).close(), !0;
253
251
  }
254
- }, $r = {
252
+ }, Br = {
255
253
  id: "data-validation.operation.toggle-validation-panel",
256
254
  type: Ie.OPERATION,
257
255
  handler(a) {
258
256
  const t = a.get(ee), e = a.get(Me);
259
- return e.open(), e.isOpen ? t.executeCommand(ka.id) : t.executeCommand(ot.id), !0;
257
+ return e.open(), e.isOpen ? t.executeCommand(Ya.id) : t.executeCommand(rt.id), !0;
260
258
  }
261
259
  }, Gt = {
262
260
  type: Ie.OPERATION,
@@ -272,16 +270,16 @@ const jr = "DataValidationPanel", ot = {
272
270
  i
273
271
  ), !0;
274
272
  }
275
- }, Br = {
273
+ }, Ur = {
276
274
  type: Ie.OPERATION,
277
275
  id: "sheet.operation.hide-data-validation-dropdown",
278
276
  handler(a, t) {
279
277
  return t ? (a.get(Oe).hideDropdown(), !0) : !1;
280
278
  }
281
279
  };
282
- class nt {
280
+ class ot {
283
281
  constructor() {
284
- S(this, "_cacheMatrix", /* @__PURE__ */ new Map());
282
+ R(this, "_cacheMatrix", /* @__PURE__ */ new Map());
285
283
  }
286
284
  _ensureCache(t, e) {
287
285
  let r = this._cacheMatrix.get(t);
@@ -351,7 +349,7 @@ var Wn = Object.defineProperty, kn = Object.getOwnPropertyDescriptor, Yn = (a, t
351
349
  let ce = class extends ue {
352
350
  constructor(t, e, r) {
353
351
  super();
354
- S(this, "_formulaRuleMap", /* @__PURE__ */ new Map());
352
+ R(this, "_formulaRuleMap", /* @__PURE__ */ new Map());
355
353
  this._registerOtherFormulaService = t, this._dataValidationCacheService = e, this._dataValidationModel = r, this._initFormulaResultHandler();
356
354
  }
357
355
  _initFormulaResultHandler() {
@@ -448,8 +446,8 @@ let ce = class extends ue {
448
446
  }
449
447
  };
450
448
  ce = Yn([
451
- Jt(0, w(Nr)),
452
- Jt(1, w(nt)),
449
+ Jt(0, w(Tr)),
450
+ Jt(1, w(ot)),
453
451
  Jt(2, w(q))
454
452
  ], ce);
455
453
  function ge(a) {
@@ -520,7 +518,7 @@ let wa = class {
520
518
  const u = this._themeService.getCurrentTheme();
521
519
  if (!c.skipDefaultFontRender(d, l, { unitId: n, subUnitId: i }))
522
520
  return;
523
- const f = c.parseFormulaSync(d, n, i), { formula1: p } = f, m = this._calc(s, e), { a: h, d: R } = a.getTransform(), g = Za(m.left, h), C = Za(m.top, R), _ = dn.create().composeMatrix({
521
+ const f = c.parseFormulaSync(d, n, i), { formula1: p } = f, h = this._calc(s, e), { a: m, d: S } = a.getTransform(), g = Ja(h.left, m), C = Ja(h.top, S), _ = cn.create().composeMatrix({
524
522
  left: g,
525
523
  top: C,
526
524
  scaleX: 1,
@@ -535,7 +533,7 @@ let wa = class {
535
533
  const D = _.getMatrix();
536
534
  a.transform(D[0], D[1], D[2], D[3], D[4], D[5]);
537
535
  const E = ((L = e == null ? void 0 : e.fs) != null ? L : 10) * 1.6, x = String(l) === String(p), T = u.hyacinth500;
538
- cn.drawWith(a, {
536
+ un.drawWith(a, {
539
537
  checked: x,
540
538
  width: E,
541
539
  height: E,
@@ -574,13 +572,13 @@ let wa = class {
574
572
  wa = qn([
575
573
  ea(0, ee),
576
574
  ea(1, w(ce)),
577
- ea(2, w(Ro))
575
+ ea(2, w(Co))
578
576
  ], wa);
579
577
  function zn(a) {
580
578
  var l;
581
579
  const { unitId: t, subUnitId: e, value: r, onChange: o, showError: n, validResult: i } = a, s = n ? i == null ? void 0 : i.formula1 : "";
582
580
  return /* @__PURE__ */ v.jsx(Z, { error: s, children: /* @__PURE__ */ v.jsx(
583
- yr,
581
+ Dr,
584
582
  {
585
583
  value: (l = r == null ? void 0 : r.formula1) != null ? l : "",
586
584
  id: Na(`dataValidation-custom-formula-${t}-${e}`),
@@ -666,12 +664,12 @@ var he = function() {
666
664
  t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(a, r[o]) && (e[r[o]] = a[r[o]]);
667
665
  return e;
668
666
  }, Fe = Ne(function(a, t) {
669
- var e = a.icon, r = a.id, o = a.className, n = a.extend, i = ii(a, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), l = $a("_".concat(di()));
670
- return Ur(e, "".concat(r), { defIds: e.defIds, idSuffix: l.current }, he({ ref: t, className: s }, i), n);
667
+ var e = a.icon, r = a.id, o = a.className, n = a.extend, i = ii(a, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), l = Ba("_".concat(di()));
668
+ return Hr(e, "".concat(r), { defIds: e.defIds, idSuffix: l.current }, he({ ref: t, className: s }, i), n);
671
669
  });
672
- function Ur(a, t, e, r, o) {
670
+ function Hr(a, t, e, r, o) {
673
671
  return Te(a.tag, he(he({ key: t }, si(a, e, o)), r), (li(a, e).children || []).map(function(n, i) {
674
- return Ur(n, "".concat(t, "-").concat(a.tag, "-").concat(i), e, void 0, o);
672
+ return Hr(n, "".concat(t, "-").concat(a.tag, "-").concat(i), e, void 0, o);
675
673
  }));
676
674
  }
677
675
  function si(a, t, e) {
@@ -693,63 +691,63 @@ function di() {
693
691
  return Math.random().toString(36).substring(2, 8);
694
692
  }
695
693
  Fe.displayName = "UniverIcon";
696
- var ci = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Hr = Ne(function(a, t) {
694
+ var ci = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.1544 3.75557C14.3887 3.98988 14.3887 4.36978 14.1544 4.6041L6.51409 12.2444C6.40157 12.3569 6.24896 12.4201 6.08983 12.4201C5.9307 12.4201 5.77808 12.3569 5.66556 12.2444L1.84541 8.42425C1.6111 8.18993 1.6111 7.81003 1.84541 7.57572C2.07973 7.34141 2.45963 7.34141 2.69394 7.57572L6.08983 10.9716L13.3059 3.75557C13.5402 3.52126 13.9201 3.52126 14.1544 3.75557Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Wr = Ne(function(a, t) {
697
695
  return Te(Fe, Object.assign({}, a, {
698
696
  id: "check-mark-single",
699
697
  ref: t,
700
698
  icon: ci
701
699
  }));
702
700
  });
703
- Hr.displayName = "CheckMarkSingle";
704
- var ui = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062 8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767 13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279zM14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217 14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046 13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703 10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046 9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217 9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746 9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732 13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Wr = Ne(function(a, t) {
701
+ Wr.displayName = "CheckMarkSingle";
702
+ var ui = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.4917 3.07803C1.4917 2.19437 2.20804 1.47803 3.0917 1.47803H5.6917C6.57536 1.47803 7.2917 2.19437 7.2917 3.07803V5.67803C7.2917 6.56168 6.57535 7.27803 5.6917 7.27803H3.0917C2.20804 7.27803 1.4917 6.56168 1.4917 5.67803V3.07803ZM3.0917 2.67803C2.87078 2.67803 2.6917 2.85711 2.6917 3.07803V5.67803C2.6917 5.89894 2.87079 6.07803 3.0917 6.07803H5.6917C5.91261 6.07803 6.0917 5.89894 6.0917 5.67803V3.07803C6.0917 2.85711 5.91261 2.67803 5.6917 2.67803H3.0917Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.6175 2.45279C14.8518 2.68711 14.8518 3.06701 14.6175 3.30132L11.6151 6.30365C11.3957 6.52307 11.0451 6.53897 10.8067 6.34031L8.80915 4.67566C8.55458 4.46352 8.52019 4.08518 8.73233 3.83062 8.94447 3.57605 9.32281 3.54166 9.57737 3.7538L11.154 5.06767 13.769 2.45278C14.0033 2.21847 14.3832 2.21848 14.6175 2.45279zM14.1175 9.19746C14.3518 9.43178 14.3518 9.81168 14.1175 10.046L12.5418 11.6217 14.1175 13.1975C14.3518 13.4318 14.3518 13.8117 14.1175 14.046 13.8832 14.2803 13.5033 14.2803 13.269 14.046L11.6933 12.4703 10.1175 14.046C9.88321 14.2803 9.50331 14.2803 9.269 14.046 9.03468 13.8117 9.03468 13.4318 9.269 13.1975L10.8447 11.6217 9.269 10.046C9.03468 9.81168 9.03468 9.43178 9.269 9.19746 9.50331 8.96315 9.88321 8.96315 10.1175 9.19746L11.6933 10.7732 13.269 9.19746C13.5033 8.96315 13.8832 8.96315 14.1175 9.19746z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M3.0917 8.72168C2.20804 8.72168 1.4917 9.43802 1.4917 10.3217V12.9217C1.4917 13.8053 2.20804 14.5217 3.0917 14.5217H5.6917C6.57535 14.5217 7.2917 13.8053 7.2917 12.9217V10.3217C7.2917 9.43802 6.57536 8.72168 5.6917 8.72168H3.0917ZM2.6917 10.3217C2.6917 10.1008 2.87078 9.92168 3.0917 9.92168H5.6917C5.91261 9.92168 6.0917 10.1008 6.0917 10.3217V12.9217C6.0917 13.1426 5.91261 13.3217 5.6917 13.3217H3.0917C2.87079 13.3217 2.6917 13.1426 2.6917 12.9217V10.3217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, kr = Ne(function(a, t) {
705
703
  return Te(Fe, Object.assign({}, a, {
706
704
  id: "data-validation-single",
707
705
  ref: t,
708
706
  icon: ui
709
707
  }));
710
708
  });
711
- Wr.displayName = "DataValidationSingle";
712
- var hi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ya = Ne(function(a, t) {
709
+ kr.displayName = "DataValidationSingle";
710
+ var hi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M5.3313 1.4667C5.3313 1.13533 5.59993.866699 5.9313.866699H10.069C10.4004.866699 10.669 1.13533 10.669 1.4667 10.669 1.79807 10.4004 2.0667 10.069 2.0667H5.9313C5.59993 2.0667 5.3313 1.79807 5.3313 1.4667zM1.09985 3.64443C1.09985 3.31306 1.36848 3.04443 1.69985 3.04443H14.2999C14.6312 3.04443 14.8999 3.31306 14.8999 3.64443 14.8999 3.9758 14.6312 4.24443 14.2999 4.24443H1.69985C1.36848 4.24443 1.09985 3.9758 1.09985 3.64443zM6.12398 8.30171C6.35829 8.0674 6.73819 8.0674 6.97251 8.30171L8.00007 9.32928 9.02764 8.30171C9.26195 8.0674 9.64185 8.0674 9.87617 8.30171 10.1105 8.53603 10.1105 8.91593 9.87617 9.15024L8.8486 10.1778 9.87617 11.2054C10.1105 11.4397 10.1105 11.8196 9.87617 12.0539 9.64185 12.2882 9.26195 12.2882 9.02764 12.0539L8.00007 11.0263 6.97251 12.0539C6.73819 12.2882 6.35829 12.2882 6.12398 12.0539 5.88966 11.8196 5.88966 11.4397 6.12398 11.2054L7.15154 10.1778 6.12398 9.15024C5.88966 8.91593 5.88966 8.53603 6.12398 8.30171z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M4.75332 5.22217C3.86966 5.22217 3.15332 5.93851 3.15332 6.82217V12.5331C3.15332 13.9691 4.31738 15.1332 5.75332 15.1332H10.2465C11.6825 15.1332 12.8465 13.9691 12.8465 12.5331V6.82217C12.8465 5.93851 12.1302 5.22217 11.2465 5.22217H4.75332ZM4.35332 6.82217C4.35332 6.60125 4.53241 6.42217 4.75332 6.42217H11.2465C11.4674 6.42217 11.6465 6.60125 11.6465 6.82217V12.5331C11.6465 13.3063 11.0197 13.9332 10.2465 13.9332H5.75332C4.98012 13.9332 4.35332 13.3063 4.35332 12.5331V6.82217Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Xa = Ne(function(a, t) {
713
711
  return Te(Fe, Object.assign({}, a, {
714
712
  id: "delete-single",
715
713
  ref: t,
716
714
  icon: hi
717
715
  }));
718
716
  });
719
- Ya.displayName = "DeleteSingle";
720
- var mi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, kr = Ne(function(a, t) {
717
+ Xa.displayName = "DeleteSingle";
718
+ var mi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.6 1.99991C8.60001 1.66854 8.33138 1.39991 8.00001 1.3999C7.66864 1.3999 7.40001 1.66853 7.4 1.9999L7.39996 7.3999H1.9999C1.66853 7.3999 1.3999 7.66853 1.3999 7.9999C1.3999 8.33127 1.66853 8.5999 1.9999 8.5999H7.39995L7.3999 13.9999C7.3999 14.3313 7.66853 14.5999 7.9999 14.5999C8.33127 14.5999 8.5999 14.3313 8.5999 13.9999L8.59995 8.5999H13.9999C14.3313 8.5999 14.5999 8.33127 14.5999 7.9999C14.5999 7.66853 14.3313 7.3999 13.9999 7.3999H8.59996L8.6 1.99991Z" } }] }, Yr = Ne(function(a, t) {
721
719
  return Te(Fe, Object.assign({}, a, {
722
720
  id: "increase-single",
723
721
  ref: t,
724
722
  icon: mi
725
723
  }));
726
724
  });
727
- kr.displayName = "IncreaseSingle";
728
- var fi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Yr = Ne(function(a, t) {
725
+ Yr.displayName = "IncreaseSingle";
726
+ var fi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Xr = Ne(function(a, t) {
729
727
  return Te(Fe, Object.assign({}, a, {
730
728
  id: "more-down-single",
731
729
  ref: t,
732
730
  icon: fi
733
731
  }));
734
732
  });
735
- Yr.displayName = "MoreDownSingle";
736
- var pi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Xr = Ne(function(a, t) {
733
+ Xr.displayName = "MoreDownSingle";
734
+ var pi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M4.64645 9.85355C4.45118 9.65829 4.45118 9.34171 4.64645 9.14645L7.64645 6.14645C7.84171 5.95118 8.15829 5.95118 8.35355 6.14645L11.3536 9.14645C11.5488 9.34171 11.5488 9.65829 11.3536 9.85355C11.1583 10.0488 10.8417 10.0488 10.6464 9.85355L8 7.20711L5.35355 9.85355C5.15829 10.0488 4.84171 10.0488 4.64645 9.85355Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Gr = Ne(function(a, t) {
737
735
  return Te(Fe, Object.assign({}, a, {
738
736
  id: "more-up-single",
739
737
  ref: t,
740
738
  icon: pi
741
739
  }));
742
740
  });
743
- Xr.displayName = "MoreUpSingle";
744
- var gi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", 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_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, Gr = Ne(function(a, t) {
741
+ Gr.displayName = "MoreUpSingle";
742
+ var gi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_622_8", 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_622_8)" }, children: [{ tag: "path", attrs: { d: "M6 5C6.55228 5 7 4.55228 7 4 7 3.44772 6.55228 3 6 3 5.44772 3 5 3.44772 5 4 5 4.55228 5.44772 5 6 5zM6 9C6.55228 9 7 8.55229 7 8 7 7.44772 6.55228 7 6 7 5.44772 7 5 7.44772 5 8 5 8.55229 5.44772 9 6 9zM7 12C7 12.5523 6.55228 13 6 13 5.44772 13 5 12.5523 5 12 5 11.4477 5.44772 11 6 11 6.55228 11 7 11.4477 7 12zM10 5C10.5523 5 11 4.55228 11 4 11 3.44772 10.5523 3 10 3 9.44771 3 9 3.44772 9 4 9 4.55228 9.44771 5 10 5zM11 8C11 8.55229 10.5523 9 10 9 9.44771 9 9 8.55229 9 8 9 7.44772 9.44771 7 10 7 10.5523 7 11 7.44772 11 8zM10 13C10.5523 13 11 12.5523 11 12 11 11.4477 10.5523 11 10 11 9.44771 11 9 11.4477 9 12 9 12.5523 9.44771 13 10 13z" } }] }] }, qr = Ne(function(a, t) {
745
743
  return Te(Fe, Object.assign({}, a, {
746
744
  id: "sequence-single",
747
745
  ref: t,
748
746
  icon: gi
749
747
  }));
750
748
  });
751
- Gr.displayName = "SequenceSingle";
752
- function qr(a) {
749
+ qr.displayName = "SequenceSingle";
750
+ function zr(a) {
753
751
  return a.filter(Boolean).join(",");
754
752
  }
755
753
  function Ze(a) {
@@ -778,21 +776,21 @@ let tt = class extends ue {
778
776
  const n = t[o];
779
777
  if (typeof n == "string")
780
778
  continue;
781
- const { token: i } = n, s = Tr(i), l = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET);
779
+ const { token: i } = n, s = Fr(i), l = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET);
782
780
  let d = l.getActiveSheet();
783
781
  const c = l.getUnitId();
784
782
  if (s.sheetName) {
785
783
  if (d = l.getSheetBySheetName(s.sheetName), !d)
786
784
  return !1;
787
- const h = d == null ? void 0 : d.getSheetId();
788
- if (!this._permissionService.getPermissionPoint(new jo(c, h).id)) return !1;
785
+ const m = d == null ? void 0 : d.getSheetId();
786
+ if (!this._permissionService.getPermissionPoint(new $o(c, m).id)) return !1;
789
787
  }
790
788
  if (!d)
791
789
  return !1;
792
- const { startRow: u, endRow: f, startColumn: p, endColumn: m } = s.range;
793
- for (let h = u; h <= f; h++)
794
- for (let R = p; R <= m; R++) {
795
- const g = (r = (e = d.getCell(h, R)) == null ? void 0 : e.selectionProtection) == null ? void 0 : r[0];
790
+ const { startRow: u, endRow: f, startColumn: p, endColumn: h } = s.range;
791
+ for (let m = u; m <= f; m++)
792
+ for (let S = p; S <= h; S++) {
793
+ const g = (r = (e = d.getCell(m, S)) == null ? void 0 : e.selectionProtection) == null ? void 0 : r[0];
796
794
  if ((g == null ? void 0 : g[At.View]) === !1)
797
795
  return !1;
798
796
  }
@@ -803,8 +801,8 @@ let tt = class extends ue {
803
801
  tt = Ri([
804
802
  ve(_e.Rendered, tt),
805
803
  ta(0, J),
806
- ta(1, Co),
807
- ta(2, w(Ha))
804
+ ta(1, Vo),
805
+ ta(2, w(Wa))
808
806
  ], tt);
809
807
  const Ci = [
810
808
  "#FFFFFF",
@@ -865,10 +863,10 @@ const Ci = [
865
863
  ) })
866
864
  }
867
865
  );
868
- }, rr = (a) => {
866
+ }, or = (a) => {
869
867
  const { item: t, commonProps: e, style: r } = a, { onItemChange: o, onItemDelete: n } = e;
870
868
  return /* @__PURE__ */ v.jsxs("div", { className: de.dataValidationFormulaListItem, style: r, children: [
871
- t.isRef ? null : /* @__PURE__ */ v.jsx("div", { className: In(de.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ v.jsx(Gr, {}) }),
869
+ t.isRef ? null : /* @__PURE__ */ v.jsx("div", { className: In(de.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ v.jsx(qr, {}) }),
872
870
  /* @__PURE__ */ v.jsx(
873
871
  Vi,
874
872
  {
@@ -888,12 +886,12 @@ const Ci = [
888
886
  }
889
887
  }
890
888
  ),
891
- t.isRef ? null : /* @__PURE__ */ v.jsx("div", { className: de.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ v.jsx(Ya, { onClick: () => n(t.id) }) })
889
+ t.isRef ? null : /* @__PURE__ */ v.jsx("div", { className: de.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ v.jsx(Xa, { onClick: () => n(t.id) }) })
892
890
  ] });
893
891
  };
894
892
  function Mi(a) {
895
893
  const { value: t, onChange: e = () => {
896
- }, unitId: r, subUnitId: o, validResult: n, showError: i, ruleId: s } = a, { formula1: l = "", formula2: d = "" } = t || {}, c = $a(null), [u, f] = te(() => A(l) ? "1" : "0"), [p, m] = te(u === "1" ? l : "="), [h, R] = te(u === "1" ? l : "="), g = j(ie), C = j(we), _ = j(q), M = j(tt), [I, D] = te(() => d.split(",")), E = C.getValidatorItem(H.LIST), [x, T] = te([]), [O, F] = te(""), L = i ? n == null ? void 0 : n.formula1 : "", B = Je(() => _.ruleChange$.pipe(He(16)), []), U = Ge(B), b = Dr(e);
894
+ }, unitId: r, subUnitId: o, validResult: n, showError: i, ruleId: s } = a, { formula1: l = "", formula2: d = "" } = t || {}, c = Ba(null), [u, f] = te(() => A(l) ? "1" : "0"), [p, h] = te(u === "1" ? l : "="), [m, S] = te(u === "1" ? l : "="), g = j(ie), C = j(we), _ = j(q), M = j(tt), [I, D] = te(() => d.split(",")), E = C.getValidatorItem(H.LIST), [x, T] = te([]), [O, F] = te(""), L = i ? n == null ? void 0 : n.formula1 : "", B = Je(() => _.ruleChange$.pipe(He(16)), []), U = Ge(B), b = Er(e);
897
895
  et(() => {
898
896
  (async () => {
899
897
  await new Promise((Y) => {
@@ -906,8 +904,8 @@ function Mi(a) {
906
904
  }
907
905
  })();
908
906
  }, [_, U, E, s, o, r]), et(() => {
909
- A(l) && l !== h && (m(l), R(h));
910
- }, [h, l]);
907
+ A(l) && l !== m && (h(l), S(m));
908
+ }, [m, l]);
911
909
  const [$, z] = te(() => {
912
910
  const N = u !== "1" ? Ze(l) : [], K = d.split(",");
913
911
  return N.map((Y, ne) => ({
@@ -917,7 +915,7 @@ function Mi(a) {
917
915
  id: X.generateRandomId(4)
918
916
  }));
919
917
  }), k = (N, K, Y) => {
920
- const ne = $.find((it) => it.id === N);
918
+ const ne = $.find((nt) => nt.id === N);
921
919
  ne && (ne.label = K, ne.color = Y, z([...$]));
922
920
  }, y = (N) => {
923
921
  const K = $.findIndex((Y) => Y.id === N);
@@ -952,17 +950,17 @@ function Mi(a) {
952
950
  labelList: Y.label.split(","),
953
951
  item: Y
954
952
  })).forEach(({ item: Y, labelList: ne }) => {
955
- ne.forEach((it) => {
956
- N.has(it) || (N.add(it), K.push({
957
- label: it,
953
+ ne.forEach((nt) => {
954
+ N.has(nt) || (N.add(nt), K.push({
955
+ label: nt,
958
956
  color: Y.color
959
957
  }));
960
958
  });
961
959
  }), b({
962
- formula1: qr(K.map((Y) => Y.label)),
960
+ formula1: zr(K.map((Y) => Y.label)),
963
961
  formula2: K.map((Y) => Y.color === xe ? "" : Y.color).join(",")
964
962
  });
965
- }, [$, b, u, h, I]);
963
+ }, [$, b, u, m, I]);
966
964
  const Le = Je(
967
965
  () => async (N) => {
968
966
  if (!A(N)) {
@@ -978,18 +976,18 @@ function Mi(a) {
978
976
  }), F("")) : (b == null || b({
979
977
  formula1: "",
980
978
  formula2: d
981
- }), m("="), F(g.t("dataValidation.validFail.formulaError")));
979
+ }), h("="), F(g.t("dataValidation.validFail.formulaError")));
982
980
  },
983
981
  [d, b]
984
982
  );
985
983
  return /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
986
984
  /* @__PURE__ */ v.jsx(Z, { label: g.t("dataValidation.list.options"), children: /* @__PURE__ */ v.jsxs(
987
- Ba,
985
+ Ua,
988
986
  {
989
987
  value: u,
990
988
  onChange: (N) => {
991
- f(N), m(h), N === "1" && b({
992
- formula1: h === "=" ? "" : h,
989
+ f(N), h(m), N === "1" && b({
990
+ formula1: m === "=" ? "" : m,
993
991
  formula2: I.join(",")
994
992
  });
995
993
  },
@@ -1001,7 +999,7 @@ function Mi(a) {
1001
999
  ) }),
1002
1000
  u === "1" ? /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
1003
1001
  /* @__PURE__ */ v.jsx(Z, { error: L || O, children: /* @__PURE__ */ v.jsx(
1004
- yr,
1002
+ Dr,
1005
1003
  {
1006
1004
  id: Na(`list-ref-range-${r}-${o}`),
1007
1005
  value: p,
@@ -1010,11 +1008,11 @@ function Mi(a) {
1010
1008
  onlyInputFormula: !0,
1011
1009
  onChange: async (N) => {
1012
1010
  const K = N != null ? N : "";
1013
- R(K), Le(K);
1011
+ S(K), Le(K);
1014
1012
  }
1015
1013
  }
1016
1014
  ) }),
1017
- /* @__PURE__ */ v.jsx(Z, { children: /* @__PURE__ */ v.jsx("div", { ref: c, children: oe.map((N) => /* @__PURE__ */ v.jsx(rr, { item: N, commonProps: { onItemChange: G }, style: { marginBottom: 12 } }, N.id)) }) })
1015
+ /* @__PURE__ */ v.jsx(Z, { children: /* @__PURE__ */ v.jsx("div", { ref: c, children: oe.map((N) => /* @__PURE__ */ v.jsx(or, { item: N, commonProps: { onItemChange: G }, style: { marginBottom: 12 } }, N.id)) }) })
1018
1016
  ] }) : /* @__PURE__ */ v.jsx(Z, { error: L, children: /* @__PURE__ */ v.jsxs("div", { ref: c, style: { marginTop: "-12px" }, children: [
1019
1017
  /* @__PURE__ */ v.jsx(
1020
1018
  Rn,
@@ -1025,7 +1023,7 @@ function Mi(a) {
1025
1023
  margin: [0, 12],
1026
1024
  draggableHandle: ".draggableHandle",
1027
1025
  itemRender: (N) => /* @__PURE__ */ v.jsx(
1028
- rr,
1026
+ or,
1029
1027
  {
1030
1028
  item: N,
1031
1029
  commonProps: {
@@ -1039,7 +1037,7 @@ function Mi(a) {
1039
1037
  }
1040
1038
  ),
1041
1039
  /* @__PURE__ */ v.jsxs("a", { className: de.dataValidationFormulaListAdd, onClick: Se, children: [
1042
- /* @__PURE__ */ v.jsx(kr, {}),
1040
+ /* @__PURE__ */ v.jsx(Yr, {}),
1043
1041
  g.t("dataValidation.list.add")
1044
1042
  ] })
1045
1043
  ] }) })
@@ -1049,7 +1047,7 @@ function Ii(a) {
1049
1047
  const { value: t, onChange: e, showError: r, validResult: o } = a, n = j(ie), i = r ? o == null ? void 0 : o.formula1 : "", s = r ? o == null ? void 0 : o.formula2 : "", [l, d] = te(!((t == null ? void 0 : t.formula1) === void 0 && (t == null ? void 0 : t.formula2) === void 0));
1050
1048
  return /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
1051
1049
  /* @__PURE__ */ v.jsx(Z, { children: /* @__PURE__ */ v.jsx(
1052
- Ua,
1050
+ Ha,
1053
1051
  {
1054
1052
  checked: l,
1055
1053
  onChange: (c) => {
@@ -1092,9 +1090,9 @@ function Ii(a) {
1092
1090
  ) }) : null
1093
1091
  ] });
1094
1092
  }
1095
- const zr = "data-validation.custom-formula-input", Mt = "data-validation.formula-input", Kr = "data-validation.list-formula-input", Qr = "data-validation.checkbox-formula-input", wi = [
1093
+ const Kr = "data-validation.custom-formula-input", Mt = "data-validation.formula-input", Qr = "data-validation.list-formula-input", Zr = "data-validation.checkbox-formula-input", wi = [
1096
1094
  [
1097
- zr,
1095
+ Kr,
1098
1096
  zn
1099
1097
  ],
1100
1098
  [
@@ -1102,27 +1100,27 @@ const zr = "data-validation.custom-formula-input", Mt = "data-validation.formula
1102
1100
  ni
1103
1101
  ],
1104
1102
  [
1105
- Kr,
1103
+ Qr,
1106
1104
  Mi
1107
1105
  ],
1108
1106
  [
1109
- Qr,
1107
+ Zr,
1110
1108
  Ii
1111
1109
  ]
1112
1110
  ], St = 1, Rt = 0;
1113
- function or(a, t) {
1111
+ function nr(a, t) {
1114
1112
  return X.isBlank(a) ? t.t("dataValidation.validFail.value") : A(a) ? t.t("dataValidation.validFail.primitive") : "";
1115
1113
  }
1116
1114
  class yi extends Xe {
1117
1115
  constructor() {
1118
1116
  super(...arguments);
1119
- S(this, "id", H.CHECKBOX);
1120
- S(this, "title", "dataValidation.checkbox.title");
1121
- S(this, "operators", []);
1122
- S(this, "scopes", ["sheet"]);
1123
- S(this, "formulaInput", Qr);
1124
- S(this, "canvasRender", this.injector.createInstance(wa));
1125
- S(this, "_formulaService", this.injector.get(ce));
1117
+ R(this, "id", H.CHECKBOX);
1118
+ R(this, "title", "dataValidation.checkbox.title");
1119
+ R(this, "operators", []);
1120
+ R(this, "scopes", ["sheet"]);
1121
+ R(this, "formulaInput", Zr);
1122
+ R(this, "canvasRender", this.injector.createInstance(wa));
1123
+ R(this, "_formulaService", this.injector.get(ce));
1126
1124
  }
1127
1125
  skipDefaultFontRender(e, r, o) {
1128
1126
  const { formula1: n, formula2: i } = this.parseFormulaSync(e, o.unitId, o.subUnitId), s = `${r != null ? r : ""}`;
@@ -1140,7 +1138,7 @@ class yi extends Xe {
1140
1138
  formula1: this.localeService.t("dataValidation.validFail.checkboxEqual"),
1141
1139
  formula2: this.localeService.t("dataValidation.validFail.checkboxEqual")
1142
1140
  };
1143
- const l = or(n, this.localeService), d = or(i, this.localeService);
1141
+ const l = nr(n, this.localeService), d = nr(i, this.localeService);
1144
1142
  return {
1145
1143
  success: !l && !d,
1146
1144
  formula1: l,
@@ -1178,7 +1176,7 @@ const zt = [
1178
1176
  function Di(a) {
1179
1177
  return new Date((a - 25569) * 86400).getTime();
1180
1178
  }
1181
- const Zr = (a) => a / 86400 + 25569, Ei = "univer-data-validation-options-button", bi = "univer-data-validation-options-button-icon", aa = {
1179
+ const Jr = (a) => a / 86400 + 25569, Ei = "univer-data-validation-options-button", bi = "univer-data-validation-options-button-icon", aa = {
1182
1180
  dataValidationOptionsButton: Ei,
1183
1181
  dataValidationOptionsButtonIcon: bi
1184
1182
  };
@@ -1188,7 +1186,7 @@ function Oi(a) {
1188
1186
  return /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
1189
1187
  /* @__PURE__ */ v.jsxs("div", { className: aa.dataValidationOptionsButton, onClick: () => s(!i), children: [
1190
1188
  t.t("dataValidation.panel.options"),
1191
- i ? /* @__PURE__ */ v.jsx(Xr, { className: aa.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ v.jsx(Yr, { className: aa.dataValidationOptionsButtonIcon })
1189
+ i ? /* @__PURE__ */ v.jsx(Gr, { className: aa.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ v.jsx(Xr, { className: aa.dataValidationOptionsButtonIcon })
1192
1190
  ] }),
1193
1191
  i && /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
1194
1192
  l ? /* @__PURE__ */ v.jsx(l, { value: r, onChange: o }) : null,
@@ -1197,13 +1195,13 @@ function Oi(a) {
1197
1195
  {
1198
1196
  label: t.t("dataValidation.panel.invalid"),
1199
1197
  children: /* @__PURE__ */ v.jsxs(
1200
- Ba,
1198
+ Ua,
1201
1199
  {
1202
- value: `${(d = r.errorStyle) != null ? d : ct.WARNING}`,
1200
+ value: `${(d = r.errorStyle) != null ? d : dt.WARNING}`,
1203
1201
  onChange: (c) => o({ ...r, errorStyle: +c }),
1204
1202
  children: [
1205
- /* @__PURE__ */ v.jsx($e, { value: `${ct.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1206
- /* @__PURE__ */ v.jsx($e, { value: `${ct.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1203
+ /* @__PURE__ */ v.jsx($e, { value: `${dt.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1204
+ /* @__PURE__ */ v.jsx($e, { value: `${dt.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
1207
1205
  ]
1208
1206
  }
1209
1207
  )
@@ -1214,7 +1212,7 @@ function Oi(a) {
1214
1212
  {
1215
1213
  label: t.t("dataValidation.panel.messageInfo"),
1216
1214
  children: /* @__PURE__ */ v.jsx(
1217
- Ua,
1215
+ Ha,
1218
1216
  {
1219
1217
  checked: r.showInputMessage,
1220
1218
  onChange: () => o({
@@ -1234,7 +1232,7 @@ const Ni = "univer-data-validation-detail-form-item", Ti = "univer-data-validati
1234
1232
  dataValidationDetailFormItem: Ni,
1235
1233
  dataValidationDetailButtons: Ti,
1236
1234
  dataValidationDetailButton: Fi
1237
- }, Li = (a) => yo(
1235
+ }, Li = (a) => Do(
1238
1236
  async (t, e, r, o) => {
1239
1237
  const n = await a.executeCommand(t, e, r);
1240
1238
  o == null || o(n);
@@ -1242,24 +1240,24 @@ const Ni = "univer-data-validation-detail-form-item", Ti = "univer-data-validati
1242
1240
  275
1243
1241
  );
1244
1242
  function Pi() {
1245
- const [a, t] = te(0), e = j(Me), r = Ge(e.activeRule$, e.activeRule), { unitId: o, subUnitId: n, rule: i } = r || {}, s = i.uid, l = j(we), d = j(Vt), c = j(ee), u = j(q), f = j(ie), [p, m] = te(i), h = l.getValidatorItem(p.type), [R, g] = te(!1), C = l.getValidatorsByScope(No.SHEET), [_, M] = te(() => p.ranges.map((y) => ({ unitId: "", sheetId: "", range: y }))), I = Je(() => Li(c), [c]);
1243
+ const [a, t] = te(0), e = j(Me), r = Ge(e.activeRule$, e.activeRule), { unitId: o, subUnitId: n, rule: i } = r || {}, s = i.uid, l = j(we), d = j(Vt), c = j(ee), u = j(q), f = j(ie), [p, h] = te(i), m = l.getValidatorItem(p.type), [S, g] = te(!1), C = l.getValidatorsByScope(To.SHEET), [_, M] = te(() => p.ranges.map((y) => ({ unitId: "", sheetId: "", range: y }))), I = Je(() => Li(c), [c]);
1246
1244
  if (et(() => {
1247
1245
  c.onCommandExecuted((y) => {
1248
- (y.id === Vo.id || y.id === Mo.id) && setTimeout(() => {
1246
+ (y.id === Mo.id || y.id === Io.id) && setTimeout(() => {
1249
1247
  const P = u.getRuleById(o, n, s);
1250
- t((oe) => oe + 1), P && (m(P), M(P.ranges.map((oe) => ({ unitId: "", sheetId: "", range: oe }))));
1248
+ t((oe) => oe + 1), P && (h(P), M(P.ranges.map((oe) => ({ unitId: "", sheetId: "", range: oe }))));
1251
1249
  }, 20);
1252
1250
  });
1253
- }, [c, u, s, n, o]), !h)
1251
+ }, [c, u, s, n, o]), !m)
1254
1252
  return null;
1255
- const D = h.operators, E = h.operatorNames, x = p.operator ? To.includes(p.operator) : !1, T = () => {
1256
- h.validatorFormula(p, o, n).success ? e.setActiveRule(null) : g(!0);
1257
- }, O = Dr((y) => {
1258
- if (Io(y, _))
1253
+ const D = m.operators, E = m.operatorNames, x = p.operator ? Fo.includes(p.operator) : !1, T = () => {
1254
+ m.validatorFormula(p, o, n).success ? e.setActiveRule(null) : g(!0);
1255
+ }, O = Er((y) => {
1256
+ if (wo(y, _))
1259
1257
  return;
1260
1258
  M(y);
1261
1259
  const P = y.filter((G) => (!G.unitId || G.unitId === o) && (!G.sheetId || G.sheetId === n)).map((G) => G.range);
1262
- if (m({
1260
+ if (h({
1263
1261
  ...p,
1264
1262
  ranges: P
1265
1263
  }), P.length === 0)
@@ -1272,9 +1270,9 @@ function Pi() {
1272
1270
  };
1273
1271
  I(Kt.id, oe);
1274
1272
  }), F = (y) => {
1275
- if (za(y, ga(p)))
1273
+ if (Ka(y, ga(p)))
1276
1274
  return;
1277
- m({
1275
+ h({
1278
1276
  ...p,
1279
1277
  ...y
1280
1278
  });
@@ -1290,7 +1288,7 @@ function Pi() {
1290
1288
  void 0
1291
1289
  );
1292
1290
  }, L = async () => {
1293
- await c.executeCommand(vr.id, {
1291
+ await c.executeCommand(_r.id, {
1294
1292
  ruleId: s,
1295
1293
  unitId: o,
1296
1294
  subUnitId: n
@@ -1315,18 +1313,18 @@ function Pi() {
1315
1313
  formula1: void 0,
1316
1314
  formula2: void 0
1317
1315
  };
1318
- m(Se), c.executeCommand(Da.id, {
1316
+ h(Se), c.executeCommand(Da.id, {
1319
1317
  unitId: o,
1320
1318
  subUnitId: n,
1321
1319
  ruleId: p.uid,
1322
1320
  setting: ga(Se)
1323
1321
  });
1324
- }, b = d.get(h.formulaInput), $ = Je(() => _.map((y) => Fr(y.range)).join(","), []), z = pa(p), k = (y) => {
1325
- za(y, pa(p)) || (m({
1322
+ }, b = d.get(m.formulaInput), $ = Je(() => _.map((y) => Lr(y.range)).join(","), []), z = pa(p), k = (y) => {
1323
+ Ka(y, pa(p)) || (h({
1326
1324
  ...p,
1327
1325
  ...y
1328
1326
  }), I(
1329
- no.id,
1327
+ io.id,
1330
1328
  {
1331
1329
  unitId: o,
1332
1330
  subUnitId: n,
@@ -1337,7 +1335,7 @@ function Pi() {
1337
1335
  };
1338
1336
  return /* @__PURE__ */ v.jsxs("div", { children: [
1339
1337
  /* @__PURE__ */ v.jsx(Z, { label: f.t("dataValidation.panel.range"), children: /* @__PURE__ */ v.jsx(
1340
- tn,
1338
+ an,
1341
1339
  {
1342
1340
  className: ze.dataValidationDetailFormItem,
1343
1341
  value: $,
@@ -1345,7 +1343,7 @@ function Pi() {
1345
1343
  openForSheetUnitId: o,
1346
1344
  openForSheetSubUnitId: n,
1347
1345
  onChange: (y) => {
1348
- y.some((P) => !wo(P.range) || P.range.endColumn < P.range.startColumn || P.range.endRow < P.range.startRow) || O(y);
1346
+ y.some((P) => !yo(P.range) || P.range.endColumn < P.range.startColumn || P.range.endRow < P.range.startRow) || O(y);
1349
1347
  }
1350
1348
  },
1351
1349
  a
@@ -1393,15 +1391,15 @@ function Pi() {
1393
1391
  ...y
1394
1392
  });
1395
1393
  },
1396
- showError: R,
1397
- validResult: h.validatorFormula(p, o, n),
1394
+ showError: S,
1395
+ validResult: m.validatorFormula(p, o, n),
1398
1396
  unitId: o,
1399
1397
  subUnitId: n,
1400
1398
  ruleId: s
1401
1399
  },
1402
1400
  a + p.type
1403
1401
  ) : null,
1404
- /* @__PURE__ */ v.jsx(Oi, { value: z, onChange: k, extraComponent: h.optionsInput }),
1402
+ /* @__PURE__ */ v.jsx(Oi, { value: z, onChange: k, extraComponent: m.optionsInput }),
1405
1403
  /* @__PURE__ */ v.jsxs("div", { className: ze.dataValidationDetailButtons, children: [
1406
1404
  /* @__PURE__ */ v.jsx(We, { className: ze.dataValidationDetailButton, onClick: L, children: f.t("dataValidation.panel.removeRule") }),
1407
1405
  /* @__PURE__ */ v.jsx(We, { className: ze.dataValidationDetailButton, type: "primary", onClick: T, children: f.t("dataValidation.panel.done") })
@@ -1414,17 +1412,17 @@ const Ai = "univer-data-validation-item-container", xi = "univer-data-validation
1414
1412
  dataValidationItemContent: ji,
1415
1413
  dataValidationItemIcon: $i
1416
1414
  }, Bi = (a) => {
1417
- const { rule: t, onClick: e, unitId: r, subUnitId: o, disable: n } = a, i = j(we), s = j(ee), l = j(ko), d = i.getValidatorItem(t.type), c = $a(), [u, f] = te(!1), p = (m) => {
1418
- s.executeCommand(vr.id, {
1415
+ const { rule: t, onClick: e, unitId: r, subUnitId: o, disable: n } = a, i = j(we), s = j(ee), l = j(Yo), d = i.getValidatorItem(t.type), c = Ba(), [u, f] = te(!1), p = (h) => {
1416
+ s.executeCommand(_r.id, {
1419
1417
  ruleId: t.uid,
1420
1418
  unitId: r,
1421
1419
  subUnitId: o
1422
- }), m.stopPropagation();
1420
+ }), h.stopPropagation();
1423
1421
  };
1424
1422
  return et(() => () => {
1425
- var m;
1426
- c.current && ((m = c.current) == null || m.forEach((h) => {
1427
- h && l.removeShape(h);
1423
+ var h;
1424
+ c.current && ((h = c.current) == null || h.forEach((m) => {
1425
+ m && l.removeShape(m);
1428
1426
  }));
1429
1427
  }, [l]), /* @__PURE__ */ v.jsxs(
1430
1428
  "div",
@@ -1432,8 +1430,8 @@ const Ai = "univer-data-validation-item-container", xi = "univer-data-validation
1432
1430
  className: Et.dataValidationItemContainer,
1433
1431
  onClick: e,
1434
1432
  onMouseEnter: () => {
1435
- n || (f(!0), c.current = t.ranges.map((m) => l.addShape({
1436
- range: m,
1433
+ n || (f(!0), c.current = t.ranges.map((h) => l.addShape({
1434
+ range: h,
1437
1435
  style: {
1438
1436
  hasAutoFill: !1,
1439
1437
  fill: "rgba(73, 184, 17, 0.05)",
@@ -1442,27 +1440,27 @@ const Ai = "univer-data-validation-item-container", xi = "univer-data-validation
1442
1440
  widgets: {}
1443
1441
  },
1444
1442
  primary: {
1445
- startColumn: m.startColumn,
1446
- endColumn: m.endColumn,
1447
- startRow: m.startRow,
1448
- endRow: m.endRow,
1449
- actualRow: m.startRow,
1450
- actualColumn: m.startColumn,
1443
+ startColumn: h.startColumn,
1444
+ endColumn: h.endColumn,
1445
+ startRow: h.startRow,
1446
+ endRow: h.endRow,
1447
+ actualRow: h.startRow,
1448
+ actualColumn: h.startColumn,
1451
1449
  isMerged: !1,
1452
1450
  isMergedMainCell: !1
1453
1451
  }
1454
1452
  })));
1455
1453
  },
1456
1454
  onMouseLeave: () => {
1457
- var m;
1458
- f(!1), (m = c.current) == null || m.forEach((h) => {
1459
- h && l.removeShape(h);
1455
+ var h;
1456
+ f(!1), (h = c.current) == null || h.forEach((m) => {
1457
+ m && l.removeShape(m);
1460
1458
  }), c.current = void 0;
1461
1459
  },
1462
1460
  children: [
1463
1461
  /* @__PURE__ */ v.jsx("div", { className: Et.dataValidationItemTitle, children: d == null ? void 0 : d.generateRuleName(t) }),
1464
- /* @__PURE__ */ v.jsx("div", { className: Et.dataValidationItemContent, children: t.ranges.map((m) => Fr(m)).join(",") }),
1465
- u ? /* @__PURE__ */ v.jsx("div", { className: Et.dataValidationItemIcon, onClick: p, children: /* @__PURE__ */ v.jsx(Ya, {}) }) : null
1462
+ /* @__PURE__ */ v.jsx("div", { className: Et.dataValidationItemContent, children: t.ranges.map((h) => Lr(h)).join(",") }),
1463
+ u ? /* @__PURE__ */ v.jsx("div", { className: Et.dataValidationItemIcon, onClick: p, children: /* @__PURE__ */ v.jsx(Xa, {}) }) : null
1466
1464
  ]
1467
1465
  }
1468
1466
  );
@@ -1490,8 +1488,8 @@ function ki(a) {
1490
1488
  _.unsubscribe();
1491
1489
  };
1492
1490
  }, [p]);
1493
- const m = async () => {
1494
- const _ = _r(o), M = {
1491
+ const h = async () => {
1492
+ const _ = Sr(o), M = {
1495
1493
  unitId: u,
1496
1494
  subUnitId: f,
1497
1495
  rule: _
@@ -1501,8 +1499,8 @@ function ki(a) {
1501
1499
  subUnitId: f,
1502
1500
  rule: _
1503
1501
  });
1504
- }, h = () => {
1505
- r.executeCommand(Fo.id, {
1502
+ }, m = () => {
1503
+ r.executeCommand(Lo.id, {
1506
1504
  unitId: u,
1507
1505
  subUnitId: f
1508
1506
  });
@@ -1545,8 +1543,8 @@ function ki(a) {
1545
1543
  );
1546
1544
  }),
1547
1545
  /* @__PURE__ */ v.jsxs("div", { className: ra.dataValidationListButtons, children: [
1548
- s.length && !C ? /* @__PURE__ */ v.jsx(We, { className: ra.dataValidationListButton, onClick: h, children: i.t("dataValidation.panel.removeAll") }) : null,
1549
- /* @__PURE__ */ v.jsx(We, { className: ra.dataValidationListButton, type: "primary", onClick: m, children: i.t("dataValidation.panel.add") })
1546
+ s.length && !C ? /* @__PURE__ */ v.jsx(We, { className: ra.dataValidationListButton, onClick: m, children: i.t("dataValidation.panel.removeAll") }) : null,
1547
+ /* @__PURE__ */ v.jsx(We, { className: ra.dataValidationListButton, type: "primary", onClick: h, children: i.t("dataValidation.panel.add") })
1550
1548
  ] })
1551
1549
  ] });
1552
1550
  }
@@ -1570,15 +1568,15 @@ const Yi = () => {
1570
1568
  /* @__PURE__ */ v.jsx("div", { className: ye.dvListDropdownList, children: /* @__PURE__ */ v.jsx(Vn, { children: /* @__PURE__ */ v.jsx("div", { className: ye.dvListDropdownListContainer, children: o.map((l, d) => {
1571
1569
  const c = t.indexOf(l.value) > -1, u = () => {
1572
1570
  let f;
1573
- c ? f = new Set(t.filter((m) => m !== l.value)) : f = new Set(r ? [...t, l.value] : [l.value]);
1571
+ c ? f = new Set(t.filter((h) => h !== l.value)) : f = new Set(r ? [...t, l.value] : [l.value]);
1574
1572
  const p = [];
1575
- o.forEach((m) => {
1576
- f.has(m.value) && p.push(m.value);
1573
+ o.forEach((h) => {
1574
+ f.has(h.value) && p.push(h.value);
1577
1575
  }), e(p);
1578
1576
  };
1579
1577
  return /* @__PURE__ */ v.jsxs("div", { className: ye.dvListDropdownItemContainer, onClick: u, children: [
1580
1578
  /* @__PURE__ */ v.jsx("div", { className: ye.dvListDropdownItem, style: { background: l.color || xe }, children: l.label }),
1581
- /* @__PURE__ */ v.jsx("div", { className: ye.dvListDropdownSelectedIcon, children: c ? /* @__PURE__ */ v.jsx(Hr, {}) : null })
1579
+ /* @__PURE__ */ v.jsx("div", { className: ye.dvListDropdownSelectedIcon, children: c ? /* @__PURE__ */ v.jsx(Wr, {}) : null })
1582
1580
  ] }, d);
1583
1581
  }) }) }) }),
1584
1582
  /* @__PURE__ */ v.jsx("div", { className: ye.dvListDropdownSplit }),
@@ -1587,28 +1585,28 @@ const Yi = () => {
1587
1585
  };
1588
1586
  function as(a) {
1589
1587
  var O, F;
1590
- const { location: t, hideFn: e } = a, { worksheet: r, row: o, col: n, unitId: i, subUnitId: s } = t, l = j(q), d = j(ee), c = j(ie), [u, f] = te(""), p = j(Aa), m = Je(() => l.ruleChange$.pipe(He(16)), []);
1591
- Ge(m);
1592
- const h = Cn.useContext(), R = h.right - h.left;
1588
+ const { location: t, hideFn: e } = a, { worksheet: r, row: o, col: n, unitId: i, subUnitId: s } = t, l = j(q), d = j(ee), c = j(ie), [u, f] = te(""), p = j(Aa), h = Je(() => l.ruleChange$.pipe(He(16)), []);
1589
+ Ge(h);
1590
+ const m = Cn.useContext(), S = m.right - m.left;
1593
1591
  if (!r)
1594
1592
  return null;
1595
1593
  const g = r.getCell(o, n), C = (O = g == null ? void 0 : g.dataValidation) == null ? void 0 : O.rule, _ = (F = g == null ? void 0 : g.dataValidation) == null ? void 0 : F.validator, M = (C == null ? void 0 : C.renderMode) === le.CUSTOM || (C == null ? void 0 : C.renderMode) === void 0;
1596
1594
  if (!g || !C || !_)
1597
1595
  return;
1598
1596
  const I = C.type === H.LIST_MULTIPLE, D = _.getListWithColor(C, i, s), E = u || vi(g), x = Ze(E), T = () => {
1599
- d.executeCommand(ot.id, {
1597
+ d.executeCommand(rt.id, {
1600
1598
  ruleId: C.uid
1601
1599
  }), e();
1602
1600
  };
1603
1601
  return /* @__PURE__ */ v.jsx(
1604
1602
  ts,
1605
1603
  {
1606
- style: { minWidth: R, maxWidth: Math.max(R, 200) },
1604
+ style: { minWidth: S, maxWidth: Math.max(S, 200) },
1607
1605
  title: I ? c.t("dataValidation.listMultiple.dropdown") : c.t("dataValidation.list.dropdown"),
1608
1606
  value: x,
1609
1607
  multiple: I,
1610
1608
  onChange: (L) => {
1611
- const B = qr(L), U = {
1609
+ const B = zr(L), U = {
1612
1610
  unitId: i,
1613
1611
  subUnitId: s,
1614
1612
  range: {
@@ -1629,8 +1627,8 @@ function as(a) {
1629
1627
  };
1630
1628
  p.isVisible() && p.changeVisible({
1631
1629
  visible: !1,
1632
- keycode: an.ESC,
1633
- eventType: un.Keyboard,
1630
+ keycode: rn.ESC,
1631
+ eventType: hn.Keyboard,
1634
1632
  unitId: i
1635
1633
  }), d.executeCommand(La.id, U), f(B), I || e();
1636
1634
  },
@@ -1643,7 +1641,7 @@ function as(a) {
1643
1641
  }
1644
1642
  );
1645
1643
  }
1646
- var Jr = { exports: {} };
1644
+ var eo = { exports: {} };
1647
1645
  (function(a, t) {
1648
1646
  (function(e, r) {
1649
1647
  a.exports = r();
@@ -1651,52 +1649,52 @@ var Jr = { exports: {} };
1651
1649
  var e = "minute", r = /[+-]\d\d(?::?\d\d)?/g, o = /([+-]|\d\d)/g;
1652
1650
  return function(n, i, s) {
1653
1651
  var l = i.prototype;
1654
- s.utc = function(h) {
1655
- var R = { date: h, utc: !0, args: arguments };
1656
- return new i(R);
1657
- }, l.utc = function(h) {
1658
- var R = s(this.toDate(), { locale: this.$L, utc: !0 });
1659
- return h ? R.add(this.utcOffset(), e) : R;
1652
+ s.utc = function(m) {
1653
+ var S = { date: m, utc: !0, args: arguments };
1654
+ return new i(S);
1655
+ }, l.utc = function(m) {
1656
+ var S = s(this.toDate(), { locale: this.$L, utc: !0 });
1657
+ return m ? S.add(this.utcOffset(), e) : S;
1660
1658
  }, l.local = function() {
1661
1659
  return s(this.toDate(), { locale: this.$L, utc: !1 });
1662
1660
  };
1663
1661
  var d = l.parse;
1664
- l.parse = function(h) {
1665
- h.utc && (this.$u = !0), this.$utils().u(h.$offset) || (this.$offset = h.$offset), d.call(this, h);
1662
+ l.parse = function(m) {
1663
+ m.utc && (this.$u = !0), this.$utils().u(m.$offset) || (this.$offset = m.$offset), d.call(this, m);
1666
1664
  };
1667
1665
  var c = l.init;
1668
1666
  l.init = function() {
1669
1667
  if (this.$u) {
1670
- var h = this.$d;
1671
- this.$y = h.getUTCFullYear(), this.$M = h.getUTCMonth(), this.$D = h.getUTCDate(), this.$W = h.getUTCDay(), this.$H = h.getUTCHours(), this.$m = h.getUTCMinutes(), this.$s = h.getUTCSeconds(), this.$ms = h.getUTCMilliseconds();
1668
+ var m = this.$d;
1669
+ this.$y = m.getUTCFullYear(), this.$M = m.getUTCMonth(), this.$D = m.getUTCDate(), this.$W = m.getUTCDay(), this.$H = m.getUTCHours(), this.$m = m.getUTCMinutes(), this.$s = m.getUTCSeconds(), this.$ms = m.getUTCMilliseconds();
1672
1670
  } else c.call(this);
1673
1671
  };
1674
1672
  var u = l.utcOffset;
1675
- l.utcOffset = function(h, R) {
1673
+ l.utcOffset = function(m, S) {
1676
1674
  var g = this.$utils().u;
1677
- if (g(h)) return this.$u ? 0 : g(this.$offset) ? u.call(this) : this.$offset;
1678
- if (typeof h == "string" && (h = function(I) {
1675
+ if (g(m)) return this.$u ? 0 : g(this.$offset) ? u.call(this) : this.$offset;
1676
+ if (typeof m == "string" && (m = function(I) {
1679
1677
  I === void 0 && (I = "");
1680
1678
  var D = I.match(r);
1681
1679
  if (!D) return null;
1682
1680
  var E = ("" + D[0]).match(o) || ["-", 0, 0], x = E[0], T = 60 * +E[1] + +E[2];
1683
1681
  return T === 0 ? 0 : x === "+" ? T : -T;
1684
- }(h), h === null)) return this;
1685
- var C = Math.abs(h) <= 16 ? 60 * h : h, _ = this;
1686
- if (R) return _.$offset = C, _.$u = h === 0, _;
1687
- if (h !== 0) {
1682
+ }(m), m === null)) return this;
1683
+ var C = Math.abs(m) <= 16 ? 60 * m : m, _ = this;
1684
+ if (S) return _.$offset = C, _.$u = m === 0, _;
1685
+ if (m !== 0) {
1688
1686
  var M = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
1689
1687
  (_ = this.local().add(C + M, e)).$offset = C, _.$x.$localOffset = M;
1690
1688
  } else _ = this.utc();
1691
1689
  return _;
1692
1690
  };
1693
1691
  var f = l.format;
1694
- l.format = function(h) {
1695
- var R = h || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1696
- return f.call(this, R);
1692
+ l.format = function(m) {
1693
+ var S = m || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
1694
+ return f.call(this, S);
1697
1695
  }, l.valueOf = function() {
1698
- var h = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1699
- return this.$d.valueOf() - 6e4 * h;
1696
+ var m = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
1697
+ return this.$d.valueOf() - 6e4 * m;
1700
1698
  }, l.isUTC = function() {
1701
1699
  return !!this.$u;
1702
1700
  }, l.toISOString = function() {
@@ -1705,26 +1703,26 @@ var Jr = { exports: {} };
1705
1703
  return this.toDate().toUTCString();
1706
1704
  };
1707
1705
  var p = l.toDate;
1708
- l.toDate = function(h) {
1709
- return h === "s" && this.$offset ? s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : p.call(this);
1706
+ l.toDate = function(m) {
1707
+ return m === "s" && this.$offset ? s(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : p.call(this);
1710
1708
  };
1711
- var m = l.diff;
1712
- l.diff = function(h, R, g) {
1713
- if (h && this.$u === h.$u) return m.call(this, h, R, g);
1714
- var C = this.local(), _ = s(h).local();
1715
- return m.call(C, _, R, g);
1709
+ var h = l.diff;
1710
+ l.diff = function(m, S, g) {
1711
+ if (m && this.$u === m.$u) return h.call(this, m, S, g);
1712
+ var C = this.local(), _ = s(m).local();
1713
+ return h.call(C, _, S, g);
1716
1714
  };
1717
1715
  };
1718
1716
  });
1719
- })(Jr);
1720
- var rs = Jr.exports;
1717
+ })(eo);
1718
+ var rs = eo.exports;
1721
1719
  const os = /* @__PURE__ */ bn(rs);
1722
1720
  var ns = Object.defineProperty, is = Object.getOwnPropertyDescriptor, ss = (a, t, e, r) => {
1723
1721
  for (var o = r > 1 ? void 0 : r ? is(t, e) : t, n = a.length - 1, i; n >= 0; n--)
1724
1722
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
1725
1723
  return r && o && ns(t, e, o), o;
1726
- }, lt = (a, t) => (e, r) => t(e, r, a);
1727
- let ut = class extends ue {
1724
+ }, st = (a, t) => (e, r) => t(e, r, a);
1725
+ let ct = class extends ue {
1728
1726
  constructor(a, t, e, r, o) {
1729
1727
  super(), this._editorBridgeService = a, this._dataValidationModel = t, this._dataValidatorRegistryService = e, this._dialogService = r, this._localeService = o, this._initEditorBridgeInterceptor();
1730
1728
  }
@@ -1734,7 +1732,7 @@ let ut = class extends ue {
1734
1732
  {
1735
1733
  handler: async (a, t, e) => {
1736
1734
  const r = await a, { worksheet: o, row: n, col: i, unitId: s, subUnitId: l } = t, d = this._dataValidationModel.ensureManager(s, l), c = d.getRuleIdByLocation(n, i), u = c ? d.getRuleById(c) : void 0;
1737
- if (!u || u.errorStyle !== ct.STOP)
1735
+ if (!u || u.errorStyle !== dt.STOP)
1738
1736
  return e(Promise.resolve(r));
1739
1737
  const f = await this._dataValidatorRegistryService.getValidatorItem(u.type);
1740
1738
  if (!f || await f.validator(
@@ -1748,7 +1746,7 @@ let ut = class extends ue {
1748
1746
  u
1749
1747
  ))
1750
1748
  return e(Promise.resolve(r));
1751
- const m = o.getCellRaw(n, i);
1749
+ const h = o.getCellRaw(n, i);
1752
1750
  return this._dialogService.open({
1753
1751
  width: 368,
1754
1752
  title: {
@@ -1771,7 +1769,7 @@ let ut = class extends ue {
1771
1769
  onClose: () => {
1772
1770
  this._dialogService.close("reject-input-dialog");
1773
1771
  }
1774
- }), e(Promise.resolve(m));
1772
+ }), e(Promise.resolve(h));
1775
1773
  }
1776
1774
  }
1777
1775
  );
@@ -1802,15 +1800,15 @@ let ut = class extends ue {
1802
1800
  });
1803
1801
  }
1804
1802
  };
1805
- ut = ss([
1806
- ve(_e.Ready, ut),
1807
- lt(0, Aa),
1808
- lt(1, w(q)),
1809
- lt(2, w(we)),
1810
- lt(3, rn),
1811
- lt(4, w(ie))
1812
- ], ut);
1813
- const ls = "univer-dv-date-dropdown", ds = "univer-dv-date-dropdown-btns", nr = {
1803
+ ct = ss([
1804
+ ve(_e.Ready, ct),
1805
+ st(0, Aa),
1806
+ st(1, w(q)),
1807
+ st(2, w(we)),
1808
+ st(3, on),
1809
+ st(4, w(ie))
1810
+ ], ct);
1811
+ const ls = "univer-dv-date-dropdown", ds = "univer-dv-date-dropdown-btns", ir = {
1814
1812
  dvDateDropdown: ls,
1815
1813
  dvDateDropdownBtns: ds
1816
1814
  };
@@ -1828,14 +1826,14 @@ const cs = (a) => {
1828
1826
  };
1829
1827
  function us(a) {
1830
1828
  var M, I, D;
1831
- const { location: t, hideFn: e } = a, { worksheet: r, row: o, col: n, unitId: i, subUnitId: s } = t, l = j(ee), d = j(ut), c = r.getCell(o, n), u = (M = c == null ? void 0 : c.dataValidation) == null ? void 0 : M.rule, f = (I = c == null ? void 0 : c.dataValidation) == null ? void 0 : I.validator, p = ae(c), m = cs(p), [h, R] = te(m), g = !!((D = u == null ? void 0 : u.bizInfo) != null && D.showTime), C = h && h.isValid() ? h : Ve();
1829
+ const { location: t, hideFn: e } = a, { worksheet: r, row: o, col: n, unitId: i, subUnitId: s } = t, l = j(ee), d = j(ct), c = r.getCell(o, n), u = (M = c == null ? void 0 : c.dataValidation) == null ? void 0 : M.rule, f = (I = c == null ? void 0 : c.dataValidation) == null ? void 0 : I.validator, p = ae(c), h = cs(p), [m, S] = te(h), g = !!((D = u == null ? void 0 : u.bizInfo) != null && D.showTime), C = m && m.isValid() ? m : Ve();
1832
1830
  if (!c || !u || !f)
1833
1831
  return;
1834
1832
  const _ = async () => {
1835
- if (!h)
1833
+ if (!m)
1836
1834
  return;
1837
- const x = `${h.format(g ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00").split(" ").join("T")}Z`, T = Zr(Ve(x).unix());
1838
- u.errorStyle !== ct.STOP || await f.validator({
1835
+ const x = `${m.format(g ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD 00:00:00").split(" ").join("T")}Z`, T = Jr(Ve(x).unix());
1836
+ u.errorStyle !== dt.STOP || await f.validator({
1839
1837
  value: T,
1840
1838
  unitId: i,
1841
1839
  subUnitId: s,
@@ -1864,25 +1862,25 @@ function us(a) {
1864
1862
  }
1865
1863
  }), e()) : d.showReject(f.getRuleFinalError(u));
1866
1864
  };
1867
- return /* @__PURE__ */ v.jsxs("div", { className: nr.dvDateDropdown, children: [
1865
+ return /* @__PURE__ */ v.jsxs("div", { className: ir.dvDateDropdown, children: [
1868
1866
  /* @__PURE__ */ v.jsx(
1869
1867
  Mn,
1870
1868
  {
1871
- defaultValue: h,
1872
- pickerValue: h != null ? h : C,
1869
+ defaultValue: m,
1870
+ pickerValue: m != null ? m : C,
1873
1871
  showTime: g || void 0,
1874
1872
  onSelect: async (E) => {
1875
- R(E);
1873
+ S(E);
1876
1874
  },
1877
1875
  onPanelChange: (E) => {
1878
- R(E);
1876
+ S(E);
1879
1877
  }
1880
1878
  }
1881
1879
  ),
1882
- /* @__PURE__ */ v.jsx("div", { className: nr.dvDateDropdownBtns, children: /* @__PURE__ */ v.jsx(We, { size: "small", type: "primary", onClick: _, disabled: !h, children: "确定" }) })
1880
+ /* @__PURE__ */ v.jsx("div", { className: ir.dvDateDropdownBtns, children: /* @__PURE__ */ v.jsx(We, { size: "small", type: "primary", onClick: _, disabled: !m, children: "确定" }) })
1883
1881
  ] });
1884
1882
  }
1885
- const eo = "data-validation.list.dropdown", to = "data-validation.date.dropdown", hs = {
1883
+ const to = "data-validation.list.dropdown", ao = "data-validation.date.dropdown", hs = {
1886
1884
  [V.BETWEEN]: "dataValidation.date.operators.between",
1887
1885
  [V.EQUAL]: "dataValidation.date.operators.equal",
1888
1886
  [V.GREATER_THAN]: "dataValidation.date.operators.greaterThan",
@@ -1916,7 +1914,7 @@ function xt(a) {
1916
1914
  var o;
1917
1915
  const { value: t, onChange: e } = a, r = j(ie);
1918
1916
  return /* @__PURE__ */ v.jsx(Z, { children: /* @__PURE__ */ v.jsx(
1919
- Ua,
1917
+ Ha,
1920
1918
  {
1921
1919
  checked: (o = t.bizInfo) == null ? void 0 : o.showTime,
1922
1920
  onChange: (n) => {
@@ -1933,20 +1931,20 @@ function xt(a) {
1933
1931
  ) });
1934
1932
  }
1935
1933
  xt.componentKey = ps;
1936
- const ir = "{FORMULA1}", sr = "{FORMULA2}", dt = (a) => {
1934
+ const sr = "{FORMULA1}", lr = "{FORMULA2}", lt = (a) => {
1937
1935
  if (a == null || typeof a == "boolean")
1938
1936
  return;
1939
1937
  if (typeof a == "number" || !Number.isNaN(+a))
1940
1938
  return +a;
1941
1939
  const t = `${Ve(a).format("YYYY-MM-DD HH:mm:ss").split(" ").join("T")}Z`;
1942
- return Zr(Ve(t).unix());
1940
+ return Jr(Ve(t).unix());
1943
1941
  };
1944
1942
  class gs extends Xe {
1945
1943
  constructor() {
1946
1944
  super(...arguments);
1947
- S(this, "id", H.DATE);
1948
- S(this, "title", "dataValidation.date.title");
1949
- S(this, "operators", [
1945
+ R(this, "id", H.DATE);
1946
+ R(this, "title", "dataValidation.date.title");
1947
+ R(this, "operators", [
1950
1948
  V.BETWEEN,
1951
1949
  V.EQUAL,
1952
1950
  V.GREATER_THAN,
@@ -1956,26 +1954,26 @@ class gs extends Xe {
1956
1954
  V.NOT_BETWEEN,
1957
1955
  V.NOT_EQUAL
1958
1956
  ]);
1959
- S(this, "scopes", ["sheet"]);
1960
- S(this, "formulaInput", Mt);
1961
- S(this, "optionsInput", xt.componentKey);
1962
- S(this, "dropdown", to);
1963
- S(this, "_formulaService", this.injector.get(ce));
1957
+ R(this, "scopes", ["sheet"]);
1958
+ R(this, "formulaInput", Mt);
1959
+ R(this, "optionsInput", xt.componentKey);
1960
+ R(this, "dropdown", ao);
1961
+ R(this, "_formulaService", this.injector.get(ce));
1964
1962
  }
1965
1963
  async parseFormula(e, r, o) {
1966
1964
  var l, d;
1967
1965
  const n = await this._formulaService.getRuleFormulaResult(r, o, e.uid), { formula1: i, formula2: s } = e;
1968
1966
  return {
1969
- formula1: dt(A(i) ? ge((l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) : i),
1970
- formula2: dt(A(s) ? ge((d = n == null ? void 0 : n[1]) == null ? void 0 : d.result) : s)
1967
+ formula1: lt(A(i) ? ge((l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) : i),
1968
+ formula2: lt(A(s) ? ge((d = n == null ? void 0 : n[1]) == null ? void 0 : d.result) : s)
1971
1969
  };
1972
1970
  }
1973
1971
  parseFormulaSync(e, r, o) {
1974
1972
  var l, d;
1975
1973
  const n = this._formulaService.getRuleFormulaResultSync(r, o, e.uid), { formula1: i, formula2: s } = e;
1976
1974
  return {
1977
- formula1: dt(A(i) ? ge((l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) : i),
1978
- formula2: dt(A(s) ? ge((d = n == null ? void 0 : n[1]) == null ? void 0 : d.result) : s)
1975
+ formula1: lt(A(i) ? ge((l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) : i),
1976
+ formula2: lt(A(s) ? ge((d = n == null ? void 0 : n[1]) == null ? void 0 : d.result) : s)
1979
1977
  };
1980
1978
  }
1981
1979
  async isValidType(e) {
@@ -2009,7 +2007,7 @@ class gs extends Xe {
2009
2007
  const { value: n } = e;
2010
2008
  return {
2011
2009
  ...e,
2012
- value: dt(n)
2010
+ value: lt(n)
2013
2011
  };
2014
2012
  }
2015
2013
  async validatorIsEqual(e, r, o) {
@@ -2057,41 +2055,41 @@ class gs extends Xe {
2057
2055
  var o, n;
2058
2056
  if (!e.operator)
2059
2057
  return this.titleStr;
2060
- const r = this.localeService.t(ms[e.operator]).replace(ir, (o = e.formula1) != null ? o : "").replace(sr, (n = e.formula2) != null ? n : "");
2058
+ const r = this.localeService.t(ms[e.operator]).replace(sr, (o = e.formula1) != null ? o : "").replace(lr, (n = e.formula2) != null ? n : "");
2061
2059
  return `${this.titleStr} ${r}`;
2062
2060
  }
2063
2061
  generateRuleErrorMessage(e) {
2064
2062
  var o, n;
2065
- return e.operator ? `${this.localeService.t(fs[e.operator]).replace(ir, (o = e.formula1) != null ? o : "").replace(sr, (n = e.formula2) != null ? n : "")}` : this.titleStr;
2063
+ return e.operator ? `${this.localeService.t(fs[e.operator]).replace(sr, (o = e.formula1) != null ? o : "").replace(lr, (n = e.formula2) != null ? n : "")}` : this.titleStr;
2066
2064
  }
2067
2065
  }
2068
2066
  var vs = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Ss = (a, t, e, r) => {
2069
2067
  for (var o = r > 1 ? void 0 : r ? _s(t, e) : t, n = a.length - 1, i; n >= 0; n--)
2070
2068
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
2071
2069
  return r && o && vs(t, e, o), o;
2072
- }, lr = (a, t) => (e, r) => t(e, r, a);
2073
- const Ke = 4, Rs = 6, Re = 14, Pe = 6, be = 4, Cs = "#565656", dr = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
2070
+ }, dr = (a, t) => (e, r) => t(e, r, a);
2071
+ const Ke = 4, Rs = 6, Re = 14, Pe = 6, be = 4, Cs = "#565656", cr = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
2074
2072
  function Vs(a, t) {
2075
2073
  const e = a.length;
2076
2074
  return {
2077
2075
  id: "d",
2078
2076
  body: {
2079
- dataStream: `${a}${hr}`,
2077
+ dataStream: `${a}${mr}`,
2080
2078
  textRuns: [
2081
2079
  {
2082
2080
  ts: {
2083
2081
  fs: 11,
2084
2082
  ff: void 0,
2085
- it: st.FALSE,
2086
- bl: st.FALSE,
2083
+ it: it.FALSE,
2084
+ bl: it.FALSE,
2087
2085
  ul: {
2088
- s: st.FALSE
2086
+ s: it.FALSE
2089
2087
  },
2090
2088
  st: {
2091
- s: st.FALSE
2089
+ s: it.FALSE
2092
2090
  },
2093
2091
  ol: {
2094
- s: st.FALSE
2092
+ s: it.FALSE
2095
2093
  },
2096
2094
  cl: void 0,
2097
2095
  ...t,
@@ -2111,10 +2109,10 @@ function Vs(a, t) {
2111
2109
  }
2112
2110
  };
2113
2111
  }
2114
- function ao(a, t, e) {
2115
- const r = Vs(a, e), o = new Do(r), n = new hn(o);
2112
+ function ro(a, t, e) {
2113
+ const r = Vs(a, e), o = new Eo(r), n = new mn(o);
2116
2114
  return {
2117
- documentSkeleton: mn.create(n, t),
2115
+ documentSkeleton: fn.create(n, t),
2118
2116
  docModel: o,
2119
2117
  docViewModel: n
2120
2118
  };
@@ -2124,9 +2122,9 @@ function oa(a, t, e) {
2124
2122
  documentSkeleton: r,
2125
2123
  docModel: o,
2126
2124
  docViewModel: n
2127
- } = ao(a, t, e);
2125
+ } = ro(a, t, e);
2128
2126
  return {
2129
- documents: new fn(`DOCUMENTS_${X.generateRandomId()}`, r, {
2127
+ documents: new pn(`DOCUMENTS_${X.generateRandomId()}`, r, {
2130
2128
  pageMarginLeft: 0,
2131
2129
  pageMarginTop: 0
2132
2130
  }),
@@ -2135,7 +2133,7 @@ function oa(a, t, e) {
2135
2133
  docViewModel: n
2136
2134
  };
2137
2135
  }
2138
- function cr(a, t, e, r, o, n) {
2136
+ function ur(a, t, e, r, o, n) {
2139
2137
  let i = 0;
2140
2138
  switch (o) {
2141
2139
  case me.BOTTOM:
@@ -2165,10 +2163,10 @@ function cr(a, t, e, r, o, n) {
2165
2163
  var fa;
2166
2164
  let ya = (fa = class {
2167
2165
  constructor(a, t) {
2168
- S(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2169
- S(this, "zIndex");
2170
- S(this, "onPointerEnter");
2171
- S(this, "onPointerLeave");
2166
+ R(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2167
+ R(this, "zIndex");
2168
+ R(this, "onPointerEnter");
2169
+ R(this, "onPointerLeave");
2172
2170
  this._localeService = a, this._commandService = t;
2173
2171
  }
2174
2172
  _ensureMap(a) {
@@ -2189,26 +2187,26 @@ let ya = (fa = class {
2189
2187
  i = r - Re - 1;
2190
2188
  break;
2191
2189
  }
2192
- a.save(), a.translateWithPrecision(t.startX + n, t.startY + i), a.fillStyle = "#565656", a.fill(dr), a.restore();
2190
+ a.save(), a.translateWithPrecision(t.startX + n, t.startY + i), a.fillStyle = "#565656", a.fill(cr), a.restore();
2193
2191
  }
2194
2192
  // eslint-disable-next-line max-lines-per-function
2195
2193
  drawWith(a, t, e) {
2196
2194
  var B, U;
2197
- const { primaryWithCoord: r, row: o, col: n, style: i, data: s, subUnitId: l } = t, d = r.isMergedMainCell ? r.mergeInfo : r, c = (B = s.dataValidation) == null ? void 0 : B.rule, u = (U = s.dataValidation) == null ? void 0 : U.validator, f = s.fontRenderExtension, { leftOffset: p = 0, rightOffset: m = 0, topOffset: h = 0, downOffset: R = 0 } = f || {};
2195
+ const { primaryWithCoord: r, row: o, col: n, style: i, data: s, subUnitId: l } = t, d = r.isMergedMainCell ? r.mergeInfo : r, c = (B = s.dataValidation) == null ? void 0 : B.rule, u = (U = s.dataValidation) == null ? void 0 : U.validator, f = s.fontRenderExtension, { leftOffset: p = 0, rightOffset: h = 0, topOffset: m = 0, downOffset: S = 0 } = f || {};
2198
2196
  if (!c || !u || !u.skipDefaultFontRender(c))
2199
2197
  return;
2200
2198
  const g = {
2201
2199
  startX: d.startX + p,
2202
- endX: d.endX - m,
2203
- startY: d.startY + h,
2204
- endY: d.endY - R
2200
+ endX: d.endX - h,
2201
+ startY: d.startY + m,
2202
+ endY: d.endY - S
2205
2203
  }, C = g.endX - g.startX, _ = g.endY - g.startY, M = this._ensureMap(l), I = this._generateKey(o, n), D = u.getListWithColor(c), E = ae(s), x = `${E != null ? E : ""}`, T = D.find((b) => b.label === x);
2206
2204
  let { tb: O, vt: F, ht: L } = i || {};
2207
2205
  if (O = O != null ? O : se.WRAP, F = F != null ? F : me.BOTTOM, L = L != null ? L : Be.LEFT, c.renderMode === le.ARROW) {
2208
2206
  this._drawDownIcon(a, g, C, _, F), a.save(), a.translateWithPrecision(g.startX, g.startY), a.beginPath(), a.rect(0, 0, C, _), a.clip();
2209
2207
  const b = C - Re, { documentSkeleton: $, documents: z, docModel: k } = oa(x, this._localeService, i);
2210
2208
  O === se.WRAP && k.updateDocumentDataPageSize(Math.max(b, 1)), $.calculate(), $.getActualSize();
2211
- const y = yt($), { height: P, width: oe } = y, { paddingTop: G, paddingLeft: Se } = cr(b, _, oe, P, F, L);
2209
+ const y = yt($), { height: P, width: oe } = y, { paddingTop: G, paddingLeft: Se } = ur(b, _, oe, P, F, L);
2212
2210
  a.translate(0, G), a.save(), a.translateWithPrecision(Ke, 0), a.beginPath(), a.rect(0, 0, b, P), a.clip(), z.render(a), a.translateWithPrecision(Se, 0), a.restore(), a.restore(), M.set(I, {
2213
2211
  left: g.endX + e.rowHeaderWidth - Re,
2214
2212
  top: g.startY + e.columnHeaderHeight,
@@ -2219,15 +2217,15 @@ let ya = (fa = class {
2219
2217
  a.save(), a.translateWithPrecision(g.startX, g.startY), a.beginPath(), a.rect(0, 0, C, _), a.clip();
2220
2218
  const b = C - Pe * 2 - Ke - Re, { documentSkeleton: $, documents: z, docModel: k } = oa(x, this._localeService, i);
2221
2219
  O === se.WRAP && k.updateDocumentDataPageSize(Math.max(b, 1)), $.calculate();
2222
- const y = yt($), { height: P, width: oe } = y, { paddingTop: G, paddingLeft: Se } = cr(b, _, oe, P, F, L);
2220
+ const y = yt($), { height: P, width: oe } = y, { paddingTop: G, paddingLeft: Se } = ur(b, _, oe, P, F, L);
2223
2221
  a.translate(Pe, G);
2224
2222
  const Le = Math.max(C - Pe * 2, 1), N = P;
2225
- Er.drawWith(a, {
2223
+ br.drawWith(a, {
2226
2224
  width: Le,
2227
2225
  height: N,
2228
2226
  fill: (T == null ? void 0 : T.color) || xe,
2229
2227
  radius: 8
2230
- }), a.save(), a.translateWithPrecision(Ke, 0), a.beginPath(), a.rect(0, 0, b, P), a.clip(), a.translateWithPrecision(Se, 0), z.render(a), a.restore(), a.translate(b + Ke + 4, (P - Rs) / 2), a.fillStyle = Cs, a.fill(dr), a.restore(), M.set(I, {
2228
+ }), a.save(), a.translateWithPrecision(Ke, 0), a.beginPath(), a.rect(0, 0, b, P), a.clip(), a.translateWithPrecision(Se, 0), z.render(a), a.restore(), a.translate(b + Ke + 4, (P - Rs) / 2), a.fillStyle = Cs, a.fill(cr), a.restore(), M.set(I, {
2231
2229
  left: g.startX + Pe + e.rowHeaderWidth,
2232
2230
  top: g.startY + G + e.columnHeaderHeight,
2233
2231
  width: Le,
@@ -2236,8 +2234,8 @@ let ya = (fa = class {
2236
2234
  }
2237
2235
  }
2238
2236
  calcCellAutoHeight(a) {
2239
- var R;
2240
- const { primaryWithCoord: t, style: e, data: r } = a, o = t.isMergedMainCell ? t.mergeInfo : t, n = r.fontRenderExtension, { leftOffset: i = 0, rightOffset: s = 0, topOffset: l = 0, downOffset: d = 0 } = n || {}, c = (R = r.dataValidation) == null ? void 0 : R.rule;
2237
+ var S;
2238
+ const { primaryWithCoord: t, style: e, data: r } = a, o = t.isMergedMainCell ? t.mergeInfo : t, n = r.fontRenderExtension, { leftOffset: i = 0, rightOffset: s = 0, topOffset: l = 0, downOffset: d = 0 } = n || {}, c = (S = r.dataValidation) == null ? void 0 : S.rule;
2241
2239
  if (!c || c.renderMode === le.TEXT)
2242
2240
  return;
2243
2241
  const u = {
@@ -2245,16 +2243,16 @@ let ya = (fa = class {
2245
2243
  endX: o.endX - s,
2246
2244
  startY: o.startY + l,
2247
2245
  endY: o.endY - d
2248
- }, f = u.endX - u.startX, p = ae(r), m = `${p != null ? p : ""}`;
2249
- let { tb: h } = e || {};
2250
- if (h = h != null ? h : se.WRAP, c.renderMode === le.ARROW) {
2251
- const g = f - Re, { documentSkeleton: C, docModel: _ } = oa(m, this._localeService, e);
2252
- h === se.WRAP && _.updateDocumentDataPageSize(Math.max(g, 1)), C.calculate(), C.getActualSize();
2246
+ }, f = u.endX - u.startX, p = ae(r), h = `${p != null ? p : ""}`;
2247
+ let { tb: m } = e || {};
2248
+ if (m = m != null ? m : se.WRAP, c.renderMode === le.ARROW) {
2249
+ const g = f - Re, { documentSkeleton: C, docModel: _ } = oa(h, this._localeService, e);
2250
+ m === se.WRAP && _.updateDocumentDataPageSize(Math.max(g, 1)), C.calculate(), C.getActualSize();
2253
2251
  const M = yt(C), { height: I } = M;
2254
2252
  return I;
2255
2253
  } else {
2256
- const g = f - Pe * 2 - Ke - Re, { documentSkeleton: C, docModel: _ } = ao(m, this._localeService, e);
2257
- h === se.WRAP && _.updateDocumentDataPageSize(Math.max(g, 1)), C.calculate();
2254
+ const g = f - Pe * 2 - Ke - Re, { documentSkeleton: C, docModel: _ } = ro(h, this._localeService, e);
2255
+ m === se.WRAP && _.updateDocumentDataPageSize(Math.max(g, 1)), C.calculate();
2258
2256
  const M = yt(C), {
2259
2257
  height: I
2260
2258
  } = M;
@@ -2265,8 +2263,8 @@ let ya = (fa = class {
2265
2263
  const { data: e, subUnitId: r, row: o, col: n } = t, s = this._ensureMap(r).get(this._generateKey(o, n)), l = e.dataValidation;
2266
2264
  if (!l || !s || l.rule.renderMode === le.TEXT)
2267
2265
  return !1;
2268
- const { top: d, left: c, width: u, height: f } = s, { x: p, y: m } = a;
2269
- return p >= c && p <= c + u && m >= d && m <= d + f;
2266
+ const { top: d, left: c, width: u, height: f } = s, { x: p, y: h } = a;
2267
+ return p >= c && p <= c + u && h >= d && h <= d + f;
2270
2268
  }
2271
2269
  onPointerDown(a, t) {
2272
2270
  if (t.button === 2)
@@ -2279,21 +2277,21 @@ let ya = (fa = class {
2279
2277
  };
2280
2278
  this._commandService.executeCommand(Gt.id, i);
2281
2279
  }
2282
- }, S(fa, "padding", {
2280
+ }, R(fa, "padding", {
2283
2281
  l: Pe + Ke,
2284
2282
  r: Re + Pe,
2285
2283
  t: be,
2286
2284
  b: be
2287
2285
  }), fa);
2288
2286
  ya = Ss([
2289
- lr(0, w(ie)),
2290
- lr(1, ee)
2287
+ dr(0, w(ie)),
2288
+ dr(1, ee)
2291
2289
  ], ya);
2292
2290
  const Ms = "LIST_RENDER_MODE_OPTION_INPUT";
2293
2291
  function jt(a) {
2294
2292
  var o;
2295
2293
  const { value: t, onChange: e } = a, r = j(ie);
2296
- return /* @__PURE__ */ v.jsx(Z, { label: r.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ v.jsxs(Ba, { value: `${(o = t.renderMode) != null ? o : le.CUSTOM}`, onChange: (n) => e({ ...t, renderMode: +n }), children: [
2294
+ return /* @__PURE__ */ v.jsx(Z, { label: r.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ v.jsxs(Ua, { value: `${(o = t.renderMode) != null ? o : le.CUSTOM}`, onChange: (n) => e({ ...t, renderMode: +n }), children: [
2297
2295
  /* @__PURE__ */ v.jsx($e, { value: `${le.CUSTOM}`, children: r.t("dataValidation.renderMode.chip") }),
2298
2296
  /* @__PURE__ */ v.jsx($e, { value: `${le.ARROW}`, children: r.t("dataValidation.renderMode.arrow") }),
2299
2297
  /* @__PURE__ */ v.jsx($e, { value: `${le.TEXT}`, children: r.t("dataValidation.renderMode.text") })
@@ -2327,34 +2325,34 @@ const Is = [
2327
2325
  "offset"
2328
2326
  ];
2329
2327
  function ws(a, t) {
2330
- if (!A(a) || Wa(a.slice(1)))
2328
+ if (!A(a) || ka(a.slice(1)))
2331
2329
  return !0;
2332
2330
  const r = t.sequenceNodesBuilder(a);
2333
2331
  return r && r.some((o) => typeof o == "object" && o.nodeType === wn.FUNCTION && Is.indexOf(o.token.toLowerCase()) > -1);
2334
2332
  }
2335
2333
  function ys(a, t) {
2336
2334
  const { formula1: e = "", ranges: r } = a;
2337
- if (Wa(e.slice(1))) {
2338
- const n = Tr(e.slice(1));
2335
+ if (ka(e.slice(1))) {
2336
+ const n = Fr(e.slice(1));
2339
2337
  if ((!n.sheetName || n.sheetName === t) && r.some((i) => Ue.intersects(i, n.range)))
2340
2338
  return !0;
2341
2339
  }
2342
2340
  return !1;
2343
2341
  }
2344
- class ro extends Xe {
2342
+ class oo extends Xe {
2345
2343
  constructor() {
2346
2344
  super(...arguments);
2347
- S(this, "formulaService", this.injector.get(ce));
2348
- S(this, "_lexer", this.injector.get(Ha));
2349
- S(this, "_univerInstanceService", this.injector.get(J));
2350
- S(this, "id", H.LIST);
2351
- S(this, "title", "dataValidation.list.title");
2352
- S(this, "operators", []);
2353
- S(this, "scopes", ["sheet"]);
2354
- S(this, "formulaInput", Kr);
2355
- S(this, "canvasRender", this.injector.createInstance(ya));
2356
- S(this, "dropdown", eo);
2357
- S(this, "optionsInput", jt.componentKey);
2345
+ R(this, "formulaService", this.injector.get(ce));
2346
+ R(this, "_lexer", this.injector.get(Wa));
2347
+ R(this, "_univerInstanceService", this.injector.get(J));
2348
+ R(this, "id", H.LIST);
2349
+ R(this, "title", "dataValidation.list.title");
2350
+ R(this, "operators", []);
2351
+ R(this, "scopes", ["sheet"]);
2352
+ R(this, "formulaInput", Qr);
2353
+ R(this, "canvasRender", this.injector.createInstance(ya));
2354
+ R(this, "dropdown", to);
2355
+ R(this, "optionsInput", jt.componentKey);
2358
2356
  }
2359
2357
  skipDefaultFontRender(e) {
2360
2358
  return e.renderMode !== le.TEXT;
@@ -2390,22 +2388,22 @@ class ro extends Xe {
2390
2388
  return this.localeService.t("dataValidation.list.error");
2391
2389
  }
2392
2390
  getList(e, r, o) {
2393
- var f, p, m;
2391
+ var f, p, h;
2394
2392
  const { formula1: n = "" } = e, i = this.injector.get(J), s = (f = r ? i.getUniverSheetInstance(r) : void 0) != null ? f : i.getCurrentUnitForType(re.UNIVER_SHEET);
2395
2393
  if (!s) return [];
2396
2394
  const l = (p = o ? s.getSheetBySheetId(o) : void 0) != null ? p : s.getActiveSheet();
2397
2395
  if (!l) return [];
2398
2396
  const d = s.getUnitId(), c = l.getSheetId(), u = this.formulaService.getRuleFormulaResultSync(d, c, e.uid);
2399
- return A(n) ? na((m = u == null ? void 0 : u[0]) == null ? void 0 : m.result) : Ze(n);
2397
+ return A(n) ? na((h = u == null ? void 0 : u[0]) == null ? void 0 : h.result) : Ze(n);
2400
2398
  }
2401
2399
  async getListAsync(e, r, o) {
2402
- var f, p, m;
2400
+ var f, p, h;
2403
2401
  const { formula1: n = "" } = e, i = this.injector.get(J), s = (f = r ? i.getUniverSheetInstance(r) : void 0) != null ? f : i.getCurrentUnitForType(re.UNIVER_SHEET);
2404
2402
  if (!s) return [];
2405
2403
  const l = (p = o ? s.getSheetBySheetId(o) : void 0) != null ? p : s.getActiveSheet();
2406
2404
  if (!l) return [];
2407
2405
  const d = s.getUnitId(), c = l.getSheetId(), u = await this.formulaService.getRuleFormulaResult(d, c, e.uid);
2408
- return A(n) ? na((m = u == null ? void 0 : u[0]) == null ? void 0 : m.result) : Ze(n);
2406
+ return A(n) ? na((h = u == null ? void 0 : u[0]) == null ? void 0 : h.result) : Ze(n);
2409
2407
  }
2410
2408
  getListWithColor(e, r, o) {
2411
2409
  const n = this.getList(e, r, o), i = (e.formula2 || "").split(",");
@@ -2425,10 +2423,10 @@ function $t(a) {
2425
2423
  class Ds extends Xe {
2426
2424
  constructor() {
2427
2425
  super(...arguments);
2428
- S(this, "_formulaService", this.injector.get(ce));
2429
- S(this, "id", H.DECIMAL);
2430
- S(this, "title", "dataValidation.decimal.title");
2431
- S(this, "operators", [
2426
+ R(this, "_formulaService", this.injector.get(ce));
2427
+ R(this, "id", H.DECIMAL);
2428
+ R(this, "title", "dataValidation.decimal.title");
2429
+ R(this, "operators", [
2432
2430
  V.BETWEEN,
2433
2431
  V.EQUAL,
2434
2432
  V.GREATER_THAN,
@@ -2438,9 +2436,9 @@ class Ds extends Xe {
2438
2436
  V.NOT_BETWEEN,
2439
2437
  V.NOT_EQUAL
2440
2438
  ]);
2441
- S(this, "scopes", ["sheet"]);
2442
- S(this, "formulaInput", Mt);
2443
- S(this, "dropDownInput");
2439
+ R(this, "scopes", ["sheet"]);
2440
+ R(this, "formulaInput", Mt);
2441
+ R(this, "dropDownInput");
2444
2442
  }
2445
2443
  _isFormulaOrNumber(e) {
2446
2444
  return !X.isBlank(e) && (A(e) || !Number.isNaN(+e));
@@ -2460,11 +2458,11 @@ class Ds extends Xe {
2460
2458
  return e == null ? Number.NaN : +e;
2461
2459
  }
2462
2460
  async parseFormula(e, r, o) {
2463
- var d, c, u, f, p, m, h, R;
2461
+ var d, c, u, f, p, h, m, S;
2464
2462
  const n = await this._formulaService.getRuleFormulaResult(r, o, e.uid), { formula1: i, formula2: s } = e;
2465
2463
  return {
2466
2464
  formula1: this._parseNumber(A(i) ? (f = (u = (c = (d = n == null ? void 0 : n[0]) == null ? void 0 : d.result) == null ? void 0 : c[0]) == null ? void 0 : u[0]) == null ? void 0 : f.v : i),
2467
- formula2: this._parseNumber(A(s) ? (R = (h = (m = (p = n == null ? void 0 : n[1]) == null ? void 0 : p.result) == null ? void 0 : m[0]) == null ? void 0 : h[0]) == null ? void 0 : R.v : s)
2465
+ formula2: this._parseNumber(A(s) ? (S = (m = (h = (p = n == null ? void 0 : n[1]) == null ? void 0 : p.result) == null ? void 0 : h[0]) == null ? void 0 : m[0]) == null ? void 0 : S.v : s)
2468
2466
  };
2469
2467
  }
2470
2468
  validatorFormula(e, r, o) {
@@ -2526,9 +2524,9 @@ const Es = "{FORMULA1}", bs = "{FORMULA2}";
2526
2524
  class Os extends Xe {
2527
2525
  constructor() {
2528
2526
  super(...arguments);
2529
- S(this, "id", H.TEXT_LENGTH);
2530
- S(this, "title", "dataValidation.textLength.title");
2531
- S(this, "operators", [
2527
+ R(this, "id", H.TEXT_LENGTH);
2528
+ R(this, "title", "dataValidation.textLength.title");
2529
+ R(this, "operators", [
2532
2530
  V.BETWEEN,
2533
2531
  V.EQUAL,
2534
2532
  V.GREATER_THAN,
@@ -2538,9 +2536,9 @@ class Os extends Xe {
2538
2536
  V.NOT_BETWEEN,
2539
2537
  V.NOT_EQUAL
2540
2538
  ]);
2541
- S(this, "scopes", ["sheet"]);
2542
- S(this, "formulaInput", Mt);
2543
- S(this, "_formulaService", this.injector.get(ce));
2539
+ R(this, "scopes", ["sheet"]);
2540
+ R(this, "formulaInput", Mt);
2541
+ R(this, "_formulaService", this.injector.get(ce));
2544
2542
  }
2545
2543
  _isFormulaOrInt(e) {
2546
2544
  return !X.isBlank(e) && (A(e) || !Number.isNaN(+e) && Number.isInteger(+e));
@@ -2568,11 +2566,11 @@ class Os extends Xe {
2568
2566
  return !Number.isNaN(e);
2569
2567
  }
2570
2568
  async parseFormula(e, r, o) {
2571
- var l, d, c, u, f, p, m, h;
2569
+ var l, d, c, u, f, p, h, m;
2572
2570
  const n = await this._formulaService.getRuleFormulaResult(r, o, e.uid), { formula1: i, formula2: s } = e;
2573
2571
  return {
2574
2572
  formula1: this._parseNumber(A(i) ? (u = (c = (d = (l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) == null ? void 0 : d[0]) == null ? void 0 : c[0]) == null ? void 0 : u.v : i),
2575
- formula2: this._parseNumber(A(s) ? (h = (m = (p = (f = n == null ? void 0 : n[1]) == null ? void 0 : f.result) == null ? void 0 : p[0]) == null ? void 0 : m[0]) == null ? void 0 : h.v : s)
2573
+ formula2: this._parseNumber(A(s) ? (m = (h = (p = (f = n == null ? void 0 : n[1]) == null ? void 0 : f.result) == null ? void 0 : p[0]) == null ? void 0 : h[0]) == null ? void 0 : m.v : s)
2576
2574
  };
2577
2575
  }
2578
2576
  transform(e, r, o) {
@@ -2625,120 +2623,126 @@ class Os extends Xe {
2625
2623
  }
2626
2624
  generateRuleErrorMessage(e) {
2627
2625
  var o, n;
2628
- return e.operator ? `${this.localeService.t(Lo[e.operator]).replace(Es, (o = e.formula1) != null ? o : "").replace(bs, (n = e.formula2) != null ? n : "")}` : this.titleStr;
2626
+ return e.operator ? `${this.localeService.t(Po[e.operator]).replace(Es, (o = e.formula1) != null ? o : "").replace(bs, (n = e.formula2) != null ? n : "")}` : this.titleStr;
2629
2627
  }
2630
2628
  }
2631
- function oo(a) {
2629
+ function no(a) {
2632
2630
  var e, r;
2633
2631
  return a ? a.p ? !((r = (e = a.p.body) == null ? void 0 : e.dataStream) != null ? r : "").slice(0, -2).trim() : X.isBlank(a.v) : !0;
2634
2632
  }
2635
- function rt(a, t, e, r) {
2636
- const o = [], n = [], s = r.get(q).ensureManager(a, t), l = r.get(J), d = Yt(l, { unitId: a, subUnitId: t });
2637
- if (!d)
2633
+ function at(a, t, e, r, o = "command") {
2634
+ const n = [], i = [], l = r.get(q).ensureManager(a, t), d = r.get(J), c = Yt(d, { unitId: a, subUnitId: t });
2635
+ if (!c)
2638
2636
  return {
2639
- redoMutations: o,
2640
- undoMutations: n
2637
+ redoMutations: n,
2638
+ undoMutations: i
2641
2639
  };
2642
- const { worksheet: c } = d, u = new Ye();
2643
- function f(h, R) {
2644
- h.forEach((g) => {
2645
- W.foreach(g, (C, _) => {
2646
- const M = c.getCellRaw(C, _), I = Lr(M);
2647
- (oo(M) || I === R) && u.setValue(C, _, {
2648
- v: R,
2640
+ const { worksheet: u } = c, f = new Ye();
2641
+ function p(S, g) {
2642
+ S.forEach((C) => {
2643
+ W.foreach(C, (_, M) => {
2644
+ const I = u.getCellRaw(_, M), D = Pr(I);
2645
+ (no(I) || D === g) && f.setValue(_, M, {
2646
+ v: g,
2649
2647
  p: null
2650
2648
  });
2651
2649
  });
2652
2650
  });
2653
2651
  }
2654
- e.forEach((h) => {
2655
- switch (h.type) {
2652
+ e.forEach((S) => {
2653
+ switch (S.type) {
2656
2654
  case "delete":
2657
- o.push({
2655
+ n.push({
2658
2656
  id: Ft.id,
2659
2657
  params: {
2660
2658
  unitId: a,
2661
2659
  subUnitId: t,
2662
- ruleId: h.rule.uid
2660
+ ruleId: S.rule.uid,
2661
+ source: o
2663
2662
  }
2664
- }), n.unshift({
2663
+ }), i.unshift({
2665
2664
  id: va.id,
2666
2665
  params: {
2667
2666
  unitId: a,
2668
2667
  subUnitId: t,
2669
- rule: h.rule,
2670
- index: h.index
2668
+ rule: S.rule,
2669
+ index: S.index,
2670
+ source: o
2671
2671
  }
2672
2672
  });
2673
2673
  break;
2674
2674
  case "update": {
2675
- o.push({
2675
+ n.push({
2676
2676
  id: pe.id,
2677
2677
  params: {
2678
2678
  unitId: a,
2679
2679
  subUnitId: t,
2680
- ruleId: h.ruleId,
2680
+ ruleId: S.ruleId,
2681
2681
  payload: {
2682
2682
  type: fe.RANGE,
2683
- payload: h.newRanges
2684
- }
2683
+ payload: S.newRanges
2684
+ },
2685
+ source: o
2685
2686
  }
2686
- }), n.unshift({
2687
+ }), i.unshift({
2687
2688
  id: pe.id,
2688
2689
  params: {
2689
2690
  unitId: a,
2690
2691
  subUnitId: t,
2691
- ruleId: h.ruleId,
2692
+ ruleId: S.ruleId,
2692
2693
  payload: {
2693
2694
  type: fe.RANGE,
2694
- payload: h.oldRanges
2695
- }
2695
+ payload: S.oldRanges
2696
+ },
2697
+ source: o
2696
2698
  }
2697
2699
  });
2698
- const R = s.getRuleById(h.ruleId);
2699
- if (R && R.type === H.CHECKBOX) {
2700
- const C = s.getValidator(H.CHECKBOX).parseFormulaSync(R, a, t);
2701
- f(h.newRanges, C.formula2);
2700
+ const g = l.getRuleById(S.ruleId);
2701
+ if (g && g.type === H.CHECKBOX) {
2702
+ const _ = l.getValidator(H.CHECKBOX).parseFormulaSync(g, a, t);
2703
+ p(S.newRanges, _.formula2);
2702
2704
  }
2703
2705
  break;
2704
2706
  }
2705
2707
  case "add": {
2706
- if (o.push({
2708
+ if (n.push({
2707
2709
  id: va.id,
2708
2710
  params: {
2709
2711
  unitId: a,
2710
2712
  subUnitId: t,
2711
- rule: h.rule
2713
+ rule: S.rule,
2714
+ source: o
2712
2715
  }
2713
- }), n.unshift({
2716
+ }), i.unshift({
2714
2717
  id: Ft.id,
2715
2718
  params: {
2716
2719
  unitId: a,
2717
2720
  subUnitId: t,
2718
- ruleId: h.rule.uid
2721
+ ruleId: S.rule.uid,
2722
+ source: o
2719
2723
  }
2720
- }), h.rule.type === H.CHECKBOX) {
2721
- const g = s.getValidator(H.CHECKBOX).parseFormulaSync(h.rule, a, t);
2722
- f(h.rule.ranges, g.formula2);
2724
+ }), S.rule.type === H.CHECKBOX) {
2725
+ const C = l.getValidator(H.CHECKBOX).parseFormulaSync(S.rule, a, t);
2726
+ p(S.rule.ranges, C.formula2);
2723
2727
  }
2724
2728
  break;
2725
2729
  }
2726
2730
  }
2727
2731
  });
2728
- const p = {
2732
+ const h = {
2729
2733
  id: Lt.id,
2730
2734
  params: {
2731
2735
  unitId: a,
2732
2736
  subUnitId: t,
2733
- cellValue: u.getData()
2737
+ cellValue: f.getData()
2734
2738
  }
2735
2739
  }, m = {
2736
2740
  id: Lt.id,
2737
- params: Rr(r, p.params)
2741
+ params: Cr(r, h.params)
2738
2742
  };
2739
- return o.push(p), n.push(m), {
2740
- redoMutations: o,
2741
- undoMutations: n
2743
+ return n.push(h), i.push(m), {
2744
+ redoMutations: n,
2745
+ undoMutations: i
2742
2746
  };
2743
2747
  }
2744
2748
  const Kt = {
@@ -2752,12 +2756,12 @@ const Kt = {
2752
2756
  return !1;
2753
2757
  const u = c.ranges, f = d.getRuleObjectMatrix().clone();
2754
2758
  f.updateRange(n, u, o);
2755
- const p = f.diff(d.getDataValidations()), { redoMutations: m, undoMutations: h } = rt(e, r, p, a);
2759
+ const p = f.diff(d.getDataValidations()), { redoMutations: h, undoMutations: m } = at(e, r, p, a);
2756
2760
  return l.pushUndoRedo({
2757
- undoMutations: h,
2758
- redoMutations: m,
2761
+ undoMutations: m,
2762
+ redoMutations: h,
2759
2763
  unitID: e
2760
- }), await fr(m, s), !0;
2764
+ }), await pr(h, s), !0;
2761
2765
  }
2762
2766
  }, Qt = {
2763
2767
  type: Ie.COMMAND,
@@ -2771,7 +2775,7 @@ const Kt = {
2771
2775
  unitId: e,
2772
2776
  subUnitId: r,
2773
2777
  rule: o
2774
- }, { redoMutations: f, undoMutations: p } = rt(e, r, c, a);
2778
+ }, { redoMutations: f, undoMutations: p } = at(e, r, c, a);
2775
2779
  return f.push({
2776
2780
  id: va.id,
2777
2781
  params: u
@@ -2786,20 +2790,20 @@ const Kt = {
2786
2790
  unitID: e,
2787
2791
  redoMutations: f,
2788
2792
  undoMutations: p
2789
- }), await fr(f, i), !0;
2793
+ }), await pr(f, i), !0;
2790
2794
  }
2791
- }, Xa = {
2795
+ }, Ga = {
2792
2796
  type: Ie.COMMAND,
2793
2797
  id: "data-validation.command.addRuleAndOpen",
2794
2798
  async handler(a) {
2795
2799
  const t = a.get(J), e = Yt(t);
2796
2800
  if (!e) return !1;
2797
- const { workbook: r, worksheet: o } = e, n = _r(a), i = a.get(ee), s = r.getUnitId(), l = o.getSheetId(), d = {
2801
+ const { workbook: r, worksheet: o } = e, n = Sr(a), i = a.get(ee), s = r.getUnitId(), l = o.getSheetId(), d = {
2798
2802
  rule: n,
2799
2803
  unitId: s,
2800
2804
  subUnitId: l
2801
2805
  };
2802
- return await i.executeCommand(Qt.id, d) ? (i.executeCommand(ot.id, {
2806
+ return await i.executeCommand(Qt.id, d) ? (i.executeCommand(rt.id, {
2803
2807
  ruleId: n.uid,
2804
2808
  isAdd: !0
2805
2809
  }), !0) : !1;
@@ -2828,7 +2832,7 @@ const Kt = {
2828
2832
  }, p = [{
2829
2833
  id: pe.id,
2830
2834
  params: f
2831
- }], m = {
2835
+ }], h = {
2832
2836
  unitId: i,
2833
2837
  subUnitId: s,
2834
2838
  ruleId: l,
@@ -2836,9 +2840,9 @@ const Kt = {
2836
2840
  type: fe.SETTING,
2837
2841
  payload: ga(u)
2838
2842
  }
2839
- }, h = [{
2843
+ }, m = [{
2840
2844
  id: pe.id,
2841
- params: m
2845
+ params: h
2842
2846
  }];
2843
2847
  if (d.type === H.CHECKBOX) {
2844
2848
  const g = u.ranges, C = a.get(J), _ = Yt(C, { unitId: i, subUnitId: s });
@@ -2846,8 +2850,8 @@ const Kt = {
2846
2850
  const M = new Ye(), { worksheet: I } = _, { formula2: D = Rt, formula1: E = St } = u, { formula2: x = Rt, formula1: T = St } = d;
2847
2851
  g.forEach((L) => {
2848
2852
  W.foreach(L, (B, U) => {
2849
- const b = I.getCellRaw(B, U), $ = Lr(b);
2850
- oo(b) || $ === String(D) ? M.setValue(B, U, {
2853
+ const b = I.getCellRaw(B, U), $ = Pr(b);
2854
+ no(b) || $ === String(D) ? M.setValue(B, U, {
2851
2855
  v: x,
2852
2856
  p: null
2853
2857
  }) : $ === String(E) && M.setValue(B, U, {
@@ -2865,18 +2869,18 @@ const Kt = {
2865
2869
  }
2866
2870
  }, F = {
2867
2871
  id: Lt.id,
2868
- params: Rr(a, O.params)
2872
+ params: Cr(a, O.params)
2869
2873
  };
2870
- p.push(O), h.push(F);
2874
+ p.push(O), m.push(F);
2871
2875
  }
2872
2876
  }
2873
2877
  return Ta(p, e).result ? (r.pushUndoRedo({
2874
2878
  unitID: i,
2875
2879
  redoMutations: p,
2876
- undoMutations: h
2880
+ undoMutations: m
2877
2881
  }), !0) : !1;
2878
2882
  }
2879
- }, no = {
2883
+ }, io = {
2880
2884
  type: Ie.COMMAND,
2881
2885
  id: "sheets.command.update-data-validation-options",
2882
2886
  handler(a, t) {
@@ -2914,47 +2918,47 @@ const Kt = {
2914
2918
  undoMutations: p
2915
2919
  }), e.executeCommand(pe.id, c), !0;
2916
2920
  }
2917
- }, io = "data-validation-single", Ga = "sheet.menu.data-validation";
2921
+ }, so = "data-validation-single", qa = "sheet.menu.data-validation";
2918
2922
  function Ns(a) {
2919
2923
  return {
2920
- id: Ga,
2924
+ id: qa,
2921
2925
  type: xa.SUBITEMS,
2922
- positions: [on.TOOLBAR_START],
2923
- group: nn.TOOLBAR_FORMULAS_INSERT,
2924
- icon: io,
2926
+ positions: [nn.TOOLBAR_START],
2927
+ group: sn.TOOLBAR_FORMULAS_INSERT,
2928
+ icon: so,
2925
2929
  tooltip: "dataValidation.title",
2926
- hidden$: sn(a, re.UNIVER_SHEET),
2927
- disabled$: Yo(a, { workbookTypes: [_a], worksheetTypes: [Sa, Ra], rangeTypes: [Ca] })
2930
+ hidden$: ln(a, re.UNIVER_SHEET),
2931
+ disabled$: Xo(a, { workbookTypes: [_a], worksheetTypes: [Sa, Ra], rangeTypes: [Ca] })
2928
2932
  };
2929
2933
  }
2930
2934
  function Ts(a) {
2931
2935
  return {
2932
- id: ot.id,
2936
+ id: rt.id,
2933
2937
  title: "dataValidation.panel.title",
2934
2938
  type: xa.BUTTON,
2935
- positions: [Ga]
2939
+ positions: [qa]
2936
2940
  };
2937
2941
  }
2938
2942
  function Fs(a) {
2939
2943
  return {
2940
- id: Xa.id,
2944
+ id: Ga.id,
2941
2945
  title: "dataValidation.panel.add",
2942
2946
  type: xa.BUTTON,
2943
- positions: [Ga]
2947
+ positions: [qa]
2944
2948
  };
2945
2949
  }
2946
- var Ls = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, so = (a, t, e, r) => {
2950
+ var Ls = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, lo = (a, t, e, r) => {
2947
2951
  for (var o = r > 1 ? void 0 : r ? Ps(t, e) : t, n = a.length - 1, i; n >= 0; n--)
2948
2952
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
2949
2953
  return r && o && Ls(t, e, o), o;
2950
2954
  }, Q = (a, t) => (e, r) => t(e, r, a);
2951
- const lo = {}, co = {
2955
+ const co = {}, uo = {
2952
2956
  tr: {
2953
2957
  size: 6,
2954
2958
  color: "#fe4b4b"
2955
2959
  }
2956
2960
  };
2957
- let ht = class extends Fa {
2961
+ let ut = class extends Fa {
2958
2962
  constructor(a, t, e, r, o, n, i, s, l, d, c, u, f) {
2959
2963
  super(), this._config = a, this._commandService = t, this._menuService = e, this._renderManagerService = r, this._univerInstanceService = o, this._autoHeightController = n, this._componentManager = i, this._dropdownManagerService = s, this._dataValidationModel = l, this._dataValidatorRegistryService = d, this._injector = c, this._sheetInterceptorService = u, this._editorBridgeService = f, this._initMenu(), this._initSkeletonChange(), this._initDropdown(), this._initViewModelIntercept(), this._initAutoHeight();
2960
2964
  }
@@ -3027,7 +3031,7 @@ let ht = class extends Fa {
3027
3031
  _initViewModelIntercept() {
3028
3032
  this.disposeWithMe(
3029
3033
  this._sheetInterceptorService.intercept(
3030
- Cr.CELL_CONTENT,
3034
+ Vr.CELL_CONTENT,
3031
3035
  {
3032
3036
  priority: 200,
3033
3037
  // eslint-disable-next-line max-lines-per-function, complexity
@@ -3042,23 +3046,23 @@ let ht = class extends Fa {
3042
3046
  const u = t.workbook.getStyles(), f = (typeof (a == null ? void 0 : a.s) == "string" ? u.get(a == null ? void 0 : a.s) : a == null ? void 0 : a.s) || {}, p = d.getRuleIdByLocation(r, o);
3043
3047
  if (!p)
3044
3048
  return e(a);
3045
- const m = d.getRuleById(p);
3046
- if (!m)
3049
+ const h = d.getRuleById(p);
3050
+ if (!h)
3047
3051
  return e(a);
3048
- const h = l.getCellRaw(t.row, t.col), R = this._dataValidationModel.validator(ae(h), m, t), g = this._dataValidatorRegistryService.getValidatorItem(m.type), C = ae(a);
3052
+ const m = l.getCellRaw(t.row, t.col), S = this._dataValidationModel.validator(ae(m), h, t), g = this._dataValidatorRegistryService.getValidatorItem(h.type), C = ae(a);
3049
3053
  let _ = {};
3050
- if ((m.type === H.LIST || m.type === H.LIST_MULTIPLE) && (_ = {
3054
+ if ((h.type === H.LIST || h.type === H.LIST_MULTIPLE) && (_ = {
3051
3055
  interceptorStyle: {
3052
3056
  ...a == null ? void 0 : a.interceptorStyle,
3053
3057
  tb: (D = f.tb !== se.OVERFLOW ? f.tb : se.CLIP) != null ? D : se.WRAP
3054
3058
  }
3055
- }), m.type === H.CHECKBOX && (_ = {
3059
+ }), h.type === H.CHECKBOX && (_ = {
3056
3060
  interceptorStyle: {
3057
3061
  ...a == null ? void 0 : a.interceptorStyle,
3058
3062
  tb: se.CLIP
3059
3063
  }
3060
- }), m.type === H.LIST && (m.renderMode === le.ARROW || m.renderMode === le.TEXT)) {
3061
- const O = g.getListWithColorMap(m), F = `${(E = ae(a)) != null ? E : ""}`, L = O[F];
3064
+ }), h.type === H.LIST && (h.renderMode === le.ARROW || h.renderMode === le.TEXT)) {
3065
+ const O = g.getListWithColorMap(h), F = `${(E = ae(a)) != null ? E : ""}`, L = O[F];
3062
3066
  L && (_ = {
3063
3067
  ..._,
3064
3068
  interceptorStyle: {
@@ -3074,13 +3078,13 @@ let ht = class extends Fa {
3074
3078
  ..._,
3075
3079
  dataValidation: {
3076
3080
  ruleId: p,
3077
- validStatus: R,
3078
- rule: m,
3081
+ validStatus: S,
3082
+ rule: h,
3079
3083
  validator: g
3080
3084
  },
3081
3085
  markers: {
3082
3086
  ...a == null ? void 0 : a.markers,
3083
- ...R === Ce.INVALID ? co : null
3087
+ ...S === Ce.INVALID ? uo : null
3084
3088
  },
3085
3089
  customRender: [
3086
3090
  ...(x = a == null ? void 0 : a.customRender) != null ? x : [],
@@ -3090,7 +3094,7 @@ let ht = class extends Fa {
3090
3094
  fontRenderExtension: {
3091
3095
  // @ts-ignore
3092
3096
  ...a == null ? void 0 : a.fontRenderExtension,
3093
- isSkip: g == null ? void 0 : g.skipDefaultFontRender(m, C, t)
3097
+ isSkip: g == null ? void 0 : g.skipDefaultFontRender(h, C, t)
3094
3098
  },
3095
3099
  interceptorStyle: {
3096
3100
  ...a == null ? void 0 : a.interceptorStyle,
@@ -3106,8 +3110,8 @@ let ht = class extends Fa {
3106
3110
  ...a,
3107
3111
  dataValidation: {
3108
3112
  ruleId: p,
3109
- validStatus: R,
3110
- rule: m,
3113
+ validStatus: S,
3114
+ rule: h,
3111
3115
  validator: g
3112
3116
  }
3113
3117
  },
@@ -3122,7 +3126,7 @@ let ht = class extends Fa {
3122
3126
  };
3123
3127
  return (b = (U = g == null ? void 0 : g.canvasRender) == null ? void 0 : U.calcCellAutoHeight) == null ? void 0 : b.call(U, F);
3124
3128
  },
3125
- coverable: ((T = a == null ? void 0 : a.coverable) != null ? T : !0) && !(m.type === H.LIST || m.type === H.LIST_MULTIPLE)
3129
+ coverable: ((T = a == null ? void 0 : a.coverable) != null ? T : !0) && !(h.type === H.LIST || h.type === H.LIST_MULTIPLE)
3126
3130
  });
3127
3131
  }
3128
3132
  }
@@ -3130,7 +3134,12 @@ let ht = class extends Fa {
3130
3134
  );
3131
3135
  }
3132
3136
  _initAutoHeight() {
3133
- this._dataValidationModel.ruleChange$.pipe(Or(16)).subscribe((a) => {
3137
+ this._dataValidationModel.ruleChange$.pipe(
3138
+ // patched data-validation change don't need to re-calc row height
3139
+ // re-calc of row height will be triggered precisely by the origin command
3140
+ $a((a) => a.source === "command"),
3141
+ Nr(16)
3142
+ ).subscribe((a) => {
3134
3143
  const t = [];
3135
3144
  if (a.forEach((e) => {
3136
3145
  var r;
@@ -3142,22 +3151,22 @@ let ht = class extends Fa {
3142
3151
  });
3143
3152
  }
3144
3153
  };
3145
- ht = so([
3146
- ve(_e.Rendered, ht),
3154
+ ut = lo([
3155
+ ve(_e.Rendered, ut),
3147
3156
  Q(1, ee),
3148
- Q(2, ln),
3157
+ Q(2, dn),
3149
3158
  Q(3, ja),
3150
3159
  Q(4, J),
3151
- Q(5, w(Mr)),
3160
+ Q(5, w(Ir)),
3152
3161
  Q(6, w(Vt)),
3153
3162
  Q(7, w(Oe)),
3154
3163
  Q(8, w(q)),
3155
3164
  Q(9, w(we)),
3156
3165
  Q(10, w(De)),
3157
3166
  Q(11, w(Pa)),
3158
- Q(12, Oo(Aa))
3159
- ], ht);
3160
- let mt = class extends Fa {
3167
+ Q(12, bo(Aa))
3168
+ ], ut);
3169
+ let ht = class extends Fa {
3161
3170
  constructor(a, t, e, r, o, n, i, s) {
3162
3171
  super(), this._config = a, this._commandService = t, this._renderManagerService = e, this._univerInstanceService = r, this._autoHeightController = o, this._dataValidationModel = n, this._dataValidatorRegistryService = i, this._sheetInterceptorService = s, this._initSkeletonChange(), this._initViewModelIntercept(), this._initAutoHeight();
3163
3172
  }
@@ -3177,7 +3186,7 @@ let mt = class extends Fa {
3177
3186
  _initViewModelIntercept() {
3178
3187
  this.disposeWithMe(
3179
3188
  this._sheetInterceptorService.intercept(
3180
- Cr.CELL_CONTENT,
3189
+ Vr.CELL_CONTENT,
3181
3190
  {
3182
3191
  priority: 200,
3183
3192
  // eslint-disable-next-line max-lines-per-function
@@ -3192,23 +3201,23 @@ let mt = class extends Fa {
3192
3201
  const u = t.workbook.getStyles(), f = (typeof (a == null ? void 0 : a.s) == "string" ? u.get(a == null ? void 0 : a.s) : a == null ? void 0 : a.s) || {}, p = d.getRuleIdByLocation(r, o);
3193
3202
  if (!p)
3194
3203
  return e(a);
3195
- const m = d.getRuleById(p);
3196
- if (!m)
3204
+ const h = d.getRuleById(p);
3205
+ if (!h)
3197
3206
  return e(a);
3198
- const h = t.worksheet.getCellRaw(t.row, t.col), R = this._dataValidationModel.validator(ae(h), m, t), g = this._dataValidatorRegistryService.getValidatorItem(m.type), C = ae(a);
3207
+ const m = t.worksheet.getCellRaw(t.row, t.col), S = this._dataValidationModel.validator(ae(m), h, t), g = this._dataValidatorRegistryService.getValidatorItem(h.type), C = ae(a);
3199
3208
  let _ = {};
3200
- if ((m.type === H.LIST || m.type === H.LIST_MULTIPLE) && (_ = {
3209
+ if ((h.type === H.LIST || h.type === H.LIST_MULTIPLE) && (_ = {
3201
3210
  interceptorStyle: {
3202
3211
  ...a == null ? void 0 : a.interceptorStyle,
3203
3212
  tb: (D = f.tb !== se.OVERFLOW ? f.tb : se.CLIP) != null ? D : se.WRAP
3204
3213
  }
3205
- }), m.type === H.CHECKBOX && (_ = {
3214
+ }), h.type === H.CHECKBOX && (_ = {
3206
3215
  interceptorStyle: {
3207
3216
  ...a == null ? void 0 : a.interceptorStyle,
3208
3217
  tb: se.CLIP
3209
3218
  }
3210
- }), m.type === H.LIST && (m.renderMode === le.ARROW || m.renderMode === le.TEXT)) {
3211
- const T = g.getListWithColorMap(m), O = `${(E = ae(a)) != null ? E : ""}`, F = T[O];
3219
+ }), h.type === H.LIST && (h.renderMode === le.ARROW || h.renderMode === le.TEXT)) {
3220
+ const T = g.getListWithColorMap(h), O = `${(E = ae(a)) != null ? E : ""}`, F = T[O];
3212
3221
  F && (_ = {
3213
3222
  ..._,
3214
3223
  interceptorStyle: {
@@ -3224,13 +3233,13 @@ let mt = class extends Fa {
3224
3233
  ..._,
3225
3234
  dataValidation: {
3226
3235
  ruleId: p,
3227
- validStatus: R,
3228
- rule: m,
3236
+ validStatus: S,
3237
+ rule: h,
3229
3238
  validator: g
3230
3239
  },
3231
3240
  markers: {
3232
3241
  ...a == null ? void 0 : a.markers,
3233
- ...R === Ce.INVALID ? co : null
3242
+ ...S === Ce.INVALID ? uo : null
3234
3243
  },
3235
3244
  customRender: [
3236
3245
  ...(x = a == null ? void 0 : a.customRender) != null ? x : [],
@@ -3240,7 +3249,7 @@ let mt = class extends Fa {
3240
3249
  fontRenderExtension: {
3241
3250
  // @ts-ignore
3242
3251
  ...a == null ? void 0 : a.fontRenderExtension,
3243
- isSkip: g == null ? void 0 : g.skipDefaultFontRender(m, C, t)
3252
+ isSkip: g == null ? void 0 : g.skipDefaultFontRender(h, C, t)
3244
3253
  },
3245
3254
  interceptorStyle: {
3246
3255
  ...a == null ? void 0 : a.interceptorStyle,
@@ -3256,8 +3265,8 @@ let mt = class extends Fa {
3256
3265
  ...a,
3257
3266
  dataValidation: {
3258
3267
  ruleId: p,
3259
- validStatus: R,
3260
- rule: m,
3268
+ validStatus: S,
3269
+ rule: h,
3261
3270
  validator: g
3262
3271
  }
3263
3272
  },
@@ -3279,7 +3288,10 @@ let mt = class extends Fa {
3279
3288
  );
3280
3289
  }
3281
3290
  _initAutoHeight() {
3282
- this._dataValidationModel.ruleChange$.pipe(Or(16)).subscribe((a) => {
3291
+ this._dataValidationModel.ruleChange$.pipe(
3292
+ $a((a) => a.source === "command"),
3293
+ Nr(16)
3294
+ ).subscribe((a) => {
3283
3295
  const t = [];
3284
3296
  if (a.forEach((e) => {
3285
3297
  var r;
@@ -3291,16 +3303,16 @@ let mt = class extends Fa {
3291
3303
  });
3292
3304
  }
3293
3305
  };
3294
- mt = so([
3295
- ve(_e.Rendered, mt),
3306
+ ht = lo([
3307
+ ve(_e.Rendered, ht),
3296
3308
  Q(1, ee),
3297
3309
  Q(2, ja),
3298
3310
  Q(3, J),
3299
- Q(4, w(Mr)),
3311
+ Q(4, w(Ir)),
3300
3312
  Q(5, w(q)),
3301
3313
  Q(6, w(we)),
3302
3314
  Q(7, w(Pa))
3303
- ], mt);
3315
+ ], ht);
3304
3316
  var As = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, js = (a, t, e, r) => {
3305
3317
  for (var o = r > 1 ? void 0 : r ? xs(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3306
3318
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
@@ -3309,9 +3321,9 @@ var As = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, js = (a, t
3309
3321
  let Ct = class extends ue {
3310
3322
  constructor(t) {
3311
3323
  super();
3312
- S(this, "_currentManager");
3313
- S(this, "_currentManager$", new br());
3314
- S(this, "currentManager$", this._currentManager$.asObservable());
3324
+ R(this, "_currentManager");
3325
+ R(this, "_currentManager$", new Or());
3326
+ R(this, "currentManager$", this._currentManager$.asObservable());
3315
3327
  this._dataValidationModel = t, this.disposeWithMe(() => {
3316
3328
  this._currentManager$.complete();
3317
3329
  });
@@ -3348,15 +3360,15 @@ var Bs = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, Hs = (a, t
3348
3360
  let ke = class extends ue {
3349
3361
  constructor(t, e, r, o) {
3350
3362
  super();
3351
- S(this, "_formulaMap", /* @__PURE__ */ new Map());
3363
+ R(this, "_formulaMap", /* @__PURE__ */ new Map());
3352
3364
  /**
3353
3365
  * Map of origin formula of rule
3354
3366
  */
3355
- S(this, "_ruleFormulaMap", /* @__PURE__ */ new Map());
3367
+ R(this, "_ruleFormulaMap", /* @__PURE__ */ new Map());
3356
3368
  /**
3357
3369
  * reflect of formulaId to cell, only store transformable formula
3358
3370
  */
3359
- S(this, "_formulaCellMap", /* @__PURE__ */ new Map());
3371
+ R(this, "_formulaCellMap", /* @__PURE__ */ new Map());
3360
3372
  this._registerOtherFormulaService = t, this._lexerTreeBuilder = e, this._dataValidationModel = r, this._dataValidationCacheService = o, this._initFormulaResultHandler();
3361
3373
  }
3362
3374
  _initFormulaResultHandler() {
@@ -3366,8 +3378,8 @@ let ke = class extends ue {
3366
3378
  for (const o in r) {
3367
3379
  const n = r[o], { formulaCellMap: i, ruleFormulaMap: s } = this._ensureMaps(e, o), l = this._dataValidationModel.ensureManager(e, o);
3368
3380
  n.forEach((d) => {
3369
- var p, m;
3370
- const c = s.get((p = d.extra) == null ? void 0 : p.ruleId), u = i.get(d.formulaId), f = l.getRuleById((m = d.extra) == null ? void 0 : m.ruleId);
3381
+ var p, h;
3382
+ const c = s.get((p = d.extra) == null ? void 0 : p.ruleId), u = i.get(d.formulaId), f = l.getRuleById((h = d.extra) == null ? void 0 : h.ruleId);
3371
3383
  f && c && !c.isTransformable && this._dataValidationCacheService.markRangeDirty(e, o, f.ranges), u && this._dataValidationCacheService.markCellDirty(e, o, u.row, u.column);
3372
3384
  });
3373
3385
  }
@@ -3393,8 +3405,8 @@ let ke = class extends ue {
3393
3405
  W.foreach(c, (u, f) => {
3394
3406
  const p = o.getValue(u, f);
3395
3407
  if (p && p.ruleId === r) {
3396
- const { formulaId: m } = p;
3397
- o.realDeleteValue(u, f), l.add(m), n.delete(m);
3408
+ const { formulaId: h } = p;
3409
+ o.realDeleteValue(u, f), l.add(h), n.delete(h);
3398
3410
  }
3399
3411
  });
3400
3412
  }), this._registerOtherFormulaService.deleteFormula(t, e, Array.from(l.values())));
@@ -3409,24 +3421,24 @@ let ke = class extends ue {
3409
3421
  ), c = n[0].startRow, u = n[0].startColumn;
3410
3422
  let f;
3411
3423
  d ? n.forEach((p) => {
3412
- W.foreach(p, (m, h) => {
3413
- const R = tr(
3424
+ W.foreach(p, (h, m) => {
3425
+ const S = ar(
3414
3426
  this._lexerTreeBuilder,
3415
3427
  o,
3416
3428
  c,
3417
3429
  u,
3418
- m,
3419
- h
3420
- ), g = this._registerFormula(t, e, r, R);
3421
- i.setValue(m, h, {
3430
+ h,
3431
+ m
3432
+ ), g = this._registerFormula(t, e, r, S);
3433
+ i.setValue(h, m, {
3422
3434
  formulaId: g,
3423
3435
  // formulaText: relativeFormula,
3424
3436
  ruleId: r
3425
- }), l.set(g, { row: m, column: h });
3437
+ }), l.set(g, { row: h, column: m });
3426
3438
  });
3427
3439
  }) : (f = this._registerFormula(t, e, r, o), n.forEach((p) => {
3428
- W.foreach(p, (m, h) => {
3429
- i.setValue(m, h, {
3440
+ W.foreach(p, (h, m) => {
3441
+ i.setValue(h, m, {
3430
3442
  formulaId: f,
3431
3443
  // formulaText: formula,
3432
3444
  ruleId: r
@@ -3448,20 +3460,20 @@ let ke = class extends ue {
3448
3460
  const { formulaMap: i, ruleFormulaMap: s, formulaCellMap: l } = this._ensureMaps(t, e), d = s.get(r);
3449
3461
  if (!d)
3450
3462
  return;
3451
- const { formula: c, originCol: u, originRow: f, isTransformable: p, formulaId: m } = d, h = /* @__PURE__ */ new Set();
3452
- o.forEach((R) => {
3453
- W.foreach(R, (g, C) => {
3463
+ const { formula: c, originCol: u, originRow: f, isTransformable: p, formulaId: h } = d, m = /* @__PURE__ */ new Set();
3464
+ o.forEach((S) => {
3465
+ W.foreach(S, (g, C) => {
3454
3466
  const _ = i.getValue(g, C);
3455
3467
  _ && _.ruleId === r && (_.temp = !0);
3456
3468
  });
3457
- }), n.forEach((R) => {
3458
- W.foreach(R, (g, C) => {
3469
+ }), n.forEach((S) => {
3470
+ W.foreach(S, (g, C) => {
3459
3471
  var M;
3460
3472
  const _ = (M = i.getValue(g, C)) != null ? M : {};
3461
3473
  if (_.ruleId !== r) {
3462
3474
  const I = s.get(_.ruleId);
3463
- if (I != null && I.isTransformable && h.add(_.formulaId), p) {
3464
- const D = tr(this._lexerTreeBuilder, c, f, u, g, C), E = this._registerFormula(t, e, r, D);
3475
+ if (I != null && I.isTransformable && m.add(_.formulaId), p) {
3476
+ const D = ar(this._lexerTreeBuilder, c, f, u, g, C), E = this._registerFormula(t, e, r, D);
3465
3477
  i.setValue(g, C, {
3466
3478
  // formulaText: relativeText,
3467
3479
  ruleId: r,
@@ -3471,19 +3483,19 @@ let ke = class extends ue {
3471
3483
  i.setValue(g, C, {
3472
3484
  // formulaText: formula,
3473
3485
  ruleId: r,
3474
- formulaId: m
3486
+ formulaId: h
3475
3487
  });
3476
3488
  } else
3477
3489
  _.temp = !1;
3478
3490
  });
3479
- }), o.forEach((R) => {
3480
- W.foreach(R, (g, C) => {
3491
+ }), o.forEach((S) => {
3492
+ W.foreach(S, (g, C) => {
3481
3493
  const _ = i.getValue(g, C);
3482
- _ && _.ruleId === r && _.temp === !0 && (i.realDeleteValue(g, C), p && h.add(_.formulaId));
3494
+ _ && _.ruleId === r && _.temp === !0 && (i.realDeleteValue(g, C), p && m.add(_.formulaId));
3483
3495
  });
3484
- }), h.forEach((R) => {
3485
- l.delete(R);
3486
- }), this._registerOtherFormulaService.deleteFormula(t, e, Array.from(h.values()));
3496
+ }), m.forEach((S) => {
3497
+ l.delete(S);
3498
+ }), this._registerOtherFormulaService.deleteFormula(t, e, Array.from(m.values()));
3487
3499
  }
3488
3500
  updateRuleFormula(t, e, r, o, n) {
3489
3501
  const { ruleFormulaMap: i } = this._ensureMaps(t, e), s = i.get(r);
@@ -3499,20 +3511,20 @@ let ke = class extends ue {
3499
3511
  }
3500
3512
  };
3501
3513
  ke = Hs([
3502
- bt(0, w(Nr)),
3503
- bt(1, w(Ha)),
3514
+ bt(0, w(Tr)),
3515
+ bt(1, w(Wa)),
3504
3516
  bt(2, w(q)),
3505
- bt(3, w(nt))
3517
+ bt(3, w(ot))
3506
3518
  ], ke);
3507
3519
  class Ws extends Xe {
3508
3520
  constructor() {
3509
3521
  super(...arguments);
3510
- S(this, "id", H.CUSTOM);
3511
- S(this, "title", "dataValidation.custom.title");
3512
- S(this, "operators", []);
3513
- S(this, "scopes", ["sheet"]);
3514
- S(this, "formulaInput", zr);
3515
- S(this, "_customFormulaService", this.injector.get(ke));
3522
+ R(this, "id", H.CUSTOM);
3523
+ R(this, "title", "dataValidation.custom.title");
3524
+ R(this, "operators", []);
3525
+ R(this, "scopes", ["sheet"]);
3526
+ R(this, "formulaInput", Kr);
3527
+ R(this, "_customFormulaService", this.injector.get(ke));
3516
3528
  }
3517
3529
  validatorFormula(e, r, o) {
3518
3530
  const n = A(e.formula1);
@@ -3538,10 +3550,10 @@ class Ws extends Xe {
3538
3550
  class ks extends Xe {
3539
3551
  constructor() {
3540
3552
  super(...arguments);
3541
- S(this, "_formulaService", this.injector.get(ce));
3542
- S(this, "id", H.WHOLE);
3543
- S(this, "title", "dataValidation.whole.title");
3544
- S(this, "operators", [
3553
+ R(this, "_formulaService", this.injector.get(ce));
3554
+ R(this, "id", H.WHOLE);
3555
+ R(this, "title", "dataValidation.whole.title");
3556
+ R(this, "operators", [
3545
3557
  V.BETWEEN,
3546
3558
  V.EQUAL,
3547
3559
  V.GREATER_THAN,
@@ -3551,9 +3563,9 @@ class ks extends Xe {
3551
3563
  V.NOT_BETWEEN,
3552
3564
  V.NOT_EQUAL
3553
3565
  ]);
3554
- S(this, "scopes", ["sheet"]);
3555
- S(this, "formulaInput", Mt);
3556
- S(this, "dropDownInput");
3566
+ R(this, "scopes", ["sheet"]);
3567
+ R(this, "formulaInput", Mt);
3568
+ R(this, "dropDownInput");
3557
3569
  }
3558
3570
  _isFormulaOrInt(e) {
3559
3571
  return !X.isBlank(e) && (A(e) || !Number.isNaN(+e) && Number.isInteger(+e));
@@ -3573,11 +3585,11 @@ class ks extends Xe {
3573
3585
  return e == null ? Number.NaN : +e;
3574
3586
  }
3575
3587
  async parseFormula(e, r, o) {
3576
- var d, c, u, f, p, m, h, R;
3588
+ var d, c, u, f, p, h, m, S;
3577
3589
  const n = await this._formulaService.getRuleFormulaResult(r, o, e.uid), { formula1: i, formula2: s } = e;
3578
3590
  return {
3579
3591
  formula1: this._parseNumber(A(i) ? (f = (u = (c = (d = n == null ? void 0 : n[0]) == null ? void 0 : d.result) == null ? void 0 : c[0]) == null ? void 0 : u[0]) == null ? void 0 : f.v : i),
3580
- formula2: this._parseNumber(A(s) ? (R = (h = (m = (p = n == null ? void 0 : n[1]) == null ? void 0 : p.result) == null ? void 0 : m[0]) == null ? void 0 : h[0]) == null ? void 0 : R.v : s)
3592
+ formula2: this._parseNumber(A(s) ? (S = (m = (h = (p = n == null ? void 0 : n[1]) == null ? void 0 : p.result) == null ? void 0 : h[0]) == null ? void 0 : m[0]) == null ? void 0 : S.v : s)
3581
3593
  };
3582
3594
  }
3583
3595
  validatorFormula(e, r, o) {
@@ -3635,16 +3647,16 @@ class ks extends Xe {
3635
3647
  return Number.isNaN(n) ? !0 : e.value <= n;
3636
3648
  }
3637
3649
  }
3638
- const uo = 4, Ys = 0, ia = 4, ho = 4, Ea = 6, Bt = 6, Ae = 14;
3650
+ const ho = 4, Ys = 0, ia = 4, mo = 4, Ea = 6, Bt = 6, Ae = 14;
3639
3651
  function Xs(a, t) {
3640
- const e = pn.getTextSize(a, t), r = e.width + uo * 2, { ba: o, bd: n } = e, i = o + n;
3652
+ const e = gn.getTextSize(a, t), r = e.width + ho * 2, { ba: o, bd: n } = e, i = o + n;
3641
3653
  return {
3642
3654
  width: r,
3643
3655
  height: i + Ys * 2,
3644
3656
  ba: o
3645
3657
  };
3646
3658
  }
3647
- function ur(a, t, e, r) {
3659
+ function hr(a, t, e, r) {
3648
3660
  const o = e - Ae - Ea, n = r - Bt * 2, i = a.map((c) => ({
3649
3661
  layout: Xs(c, t),
3650
3662
  text: c
@@ -3667,7 +3679,7 @@ function ur(a, t, e, r) {
3667
3679
  });
3668
3680
  let d = 0;
3669
3681
  return l.forEach((c, u) => {
3670
- u === l.length - 1 ? d += c.height : d += c.height + ho;
3682
+ u === l.length - 1 ? d += c.height : d += c.height + mo;
3671
3683
  }), {
3672
3684
  lines: l,
3673
3685
  totalHeight: d,
@@ -3677,15 +3689,15 @@ function ur(a, t, e, r) {
3677
3689
  };
3678
3690
  }
3679
3691
  const Gs = 8;
3680
- class qs extends gn {
3692
+ class qs extends vn {
3681
3693
  static drawWith(t, e) {
3682
3694
  const { fontFamily: r, fontString: o, fontSize: n, info: i, fill: s, color: l } = e, { layout: d, text: c } = i;
3683
- t.save(), Er.drawWith(t, {
3695
+ t.save(), br.drawWith(t, {
3684
3696
  width: d.width,
3685
3697
  height: d.height,
3686
3698
  radius: Gs,
3687
3699
  fill: s || xe
3688
- }), t.translateWithPrecision(uo, d.ba), t.font = o, t.fillStyle = l, t.fillText(c, 0, 0), t.restore();
3700
+ }), t.translateWithPrecision(ho, d.ba), t.font = o, t.fillStyle = l, t.fillText(c, 0, 0), t.restore();
3689
3701
  }
3690
3702
  }
3691
3703
  var zs = Object.defineProperty, Ks = Object.getOwnPropertyDescriptor, Qs = (a, t, e, r) => {
@@ -3696,8 +3708,8 @@ var zs = Object.defineProperty, Ks = Object.getOwnPropertyDescriptor, Qs = (a, t
3696
3708
  const Js = new Path2D("M3.32201 4.84556C3.14417 5.05148 2.85583 5.05148 2.67799 4.84556L0.134292 1.90016C-0.152586 1.56798 0.0505937 1 0.456301 1L5.5437 1C5.94941 1 6.15259 1.56798 5.86571 1.90016L3.32201 4.84556Z");
3697
3709
  let ba = class {
3698
3710
  constructor(a) {
3699
- S(this, "zIndex");
3700
- S(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
3711
+ R(this, "zIndex");
3712
+ R(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
3701
3713
  this._commandService = a;
3702
3714
  }
3703
3715
  _ensureMap(a) {
@@ -3723,15 +3735,15 @@ let ba = class {
3723
3735
  // eslint-disable-next-line max-lines-per-function
3724
3736
  drawWith(a, t, e, r) {
3725
3737
  var P, oe;
3726
- const { primaryWithCoord: o, row: n, col: i, style: s, data: l, subUnitId: d } = t, c = o.isMergedMainCell ? o.mergeInfo : o, u = l.fontRenderExtension, { leftOffset: f = 0, rightOffset: p = 0, topOffset: m = 0, downOffset: h = 0 } = u || {}, R = l.dataValidation, g = this._ensureMap(d), C = this._generateKey(n, i);
3727
- if (!R)
3738
+ const { primaryWithCoord: o, row: n, col: i, style: s, data: l, subUnitId: d } = t, c = o.isMergedMainCell ? o.mergeInfo : o, u = l.fontRenderExtension, { leftOffset: f = 0, rightOffset: p = 0, topOffset: h = 0, downOffset: m = 0 } = u || {}, S = l.dataValidation, g = this._ensureMap(d), C = this._generateKey(n, i);
3739
+ if (!S)
3728
3740
  return;
3729
3741
  const _ = {
3730
3742
  startX: c.startX + f,
3731
3743
  endX: c.endX - p,
3732
- startY: c.startY + m,
3733
- endY: c.endY - h
3734
- }, M = _.endX - _.startX, I = _.endY - _.startY, { cl: D } = s || {}, E = (P = typeof D == "object" ? D == null ? void 0 : D.rgb : D) != null ? P : "#000", x = Ja(s != null ? s : void 0), { rule: T, validator: O } = R, F = O, { vt: L, ht: B } = s || {}, U = L != null ? L : me.MIDDLE, b = (oe = ae(l)) != null ? oe : "", $ = F.parseCellValue(b), z = F.getListWithColorMap(T), k = ur($, x, M, I);
3744
+ startY: c.startY + h,
3745
+ endY: c.endY - m
3746
+ }, M = _.endX - _.startX, I = _.endY - _.startY, { cl: D } = s || {}, E = (P = typeof D == "object" ? D == null ? void 0 : D.rgb : D) != null ? P : "#000", x = er(s != null ? s : void 0), { rule: T, validator: O } = S, F = O, { vt: L, ht: B } = s || {}, U = L != null ? L : me.MIDDLE, b = (oe = ae(l)) != null ? oe : "", $ = F.parseCellValue(b), z = F.getListWithColorMap(T), k = hr($, x, M, I);
3735
3747
  this._drawDownIcon(a, _, M, I, U), a.save(), a.translateWithPrecision(_.startX, _.startY), a.beginPath(), a.rect(0, 0, M - Ae, I), a.clip(), a.translateWithPrecision(Ea, Bt);
3736
3748
  let y = 0;
3737
3749
  switch (U) {
@@ -3754,7 +3766,7 @@ let ba = class {
3754
3766
  Y = (k.contentWidth - Le) / 2;
3755
3767
  break;
3756
3768
  }
3757
- a.translate(Y, Se * (N + ho)), K.forEach((ne) => {
3769
+ a.translate(Y, Se * (N + mo)), K.forEach((ne) => {
3758
3770
  a.save(), a.translateWithPrecision(ne.left, 0), qs.drawWith(a, {
3759
3771
  ...x,
3760
3772
  info: ne,
@@ -3779,8 +3791,8 @@ let ba = class {
3779
3791
  }, u = r.dataValidation;
3780
3792
  if (!u)
3781
3793
  return;
3782
- const f = c.endX - c.startX, p = c.endY - c.startY, m = (M = ae(r)) != null ? M : "", { validator: h } = u, g = h.parseCellValue(m), C = Ja(e != null ? e : void 0);
3783
- return ur(g, C, f, p).cellAutoHeight;
3794
+ const f = c.endX - c.startX, p = c.endY - c.startY, h = (M = ae(r)) != null ? M : "", { validator: m } = u, g = m.parseCellValue(h), C = er(e != null ? e : void 0);
3795
+ return hr(g, C, f, p).cellAutoHeight;
3784
3796
  }
3785
3797
  isHit(a, t) {
3786
3798
  const { primaryWithCoord: e } = t, r = e.isMergedMainCell ? e.mergeInfo : e, { endX: o } = r, { x: n } = a;
@@ -3801,12 +3813,12 @@ let ba = class {
3801
3813
  ba = Qs([
3802
3814
  Zs(0, ee)
3803
3815
  ], ba);
3804
- class el extends ro {
3816
+ class el extends oo {
3805
3817
  constructor() {
3806
3818
  super(...arguments);
3807
- S(this, "id", H.LIST_MULTIPLE);
3808
- S(this, "title", "dataValidation.listMultiple.title");
3809
- S(this, "canvasRender", this.injector.createInstance(ba));
3819
+ R(this, "id", H.LIST_MULTIPLE);
3820
+ R(this, "title", "dataValidation.listMultiple.title");
3821
+ R(this, "canvasRender", this.injector.createInstance(ba));
3810
3822
  }
3811
3823
  skipDefaultFontRender() {
3812
3824
  return !0;
@@ -3817,7 +3829,7 @@ var tl = Object.defineProperty, al = Object.getOwnPropertyDescriptor, rl = (a, t
3817
3829
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
3818
3830
  return r && o && tl(t, e, o), o;
3819
3831
  }, Ee = (a, t) => (e, r) => t(e, r, a);
3820
- let ft = class extends Fa {
3832
+ let mt = class extends Fa {
3821
3833
  constructor(a, t, e, r, o, n, i, s) {
3822
3834
  super(), this._univerInstanceService = a, this._sheetDataValidationService = t, this._dataValidatorRegistryService = e, this._injector = r, this._componentManger = o, this._selectionManagerService = n, this._sheetInterceptorService = i, this._dataValidationModel = s, this._init();
3823
3835
  }
@@ -3831,7 +3843,7 @@ let ft = class extends Fa {
3831
3843
  Os,
3832
3844
  gs,
3833
3845
  yi,
3834
- ro,
3846
+ oo,
3835
3847
  el,
3836
3848
  Ws
3837
3849
  ].forEach((a) => {
@@ -3846,7 +3858,7 @@ let ft = class extends Fa {
3846
3858
  });
3847
3859
  }
3848
3860
  _initInstanceChange() {
3849
- const a = new mr();
3861
+ const a = new fr();
3850
3862
  this.disposeWithMe(this._univerInstanceService.getCurrentTypeOfUnit$(re.UNIVER_SHEET).subscribe((t) => {
3851
3863
  if (a.dispose(), !t)
3852
3864
  return;
@@ -3865,13 +3877,13 @@ let ft = class extends Fa {
3865
3877
  this._sheetInterceptorService.interceptCommand({
3866
3878
  getMutations: (a) => {
3867
3879
  var t;
3868
- if (a.id === Bo.id) {
3880
+ if (a.id === Uo.id) {
3869
3881
  const e = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET), r = e.getUnitId(), o = e.getActiveSheet();
3870
3882
  if (!o)
3871
3883
  throw new Error("No active sheet found");
3872
3884
  const n = o.getSheetId(), i = (t = this._selectionManagerService.getCurrentSelections()) == null ? void 0 : t.map((f) => f.range), s = this._dataValidationModel.ensureManager(r, n), l = s.getRuleObjectMatrix().clone();
3873
3885
  i && l.removeRange(i);
3874
- const d = l.diff(s.getDataValidations()), { redoMutations: c, undoMutations: u } = rt(r, n, d, this._injector);
3886
+ const d = l.diff(s.getDataValidations()), { redoMutations: c, undoMutations: u } = at(r, n, d, this._injector, "patched");
3875
3887
  return {
3876
3888
  undos: u,
3877
3889
  redos: c
@@ -3886,11 +3898,11 @@ let ft = class extends Fa {
3886
3898
  }
3887
3899
  _initComponents() {
3888
3900
  [
3889
- [io, Wr],
3890
- [jr, Yi],
3891
- [xr, An],
3892
- [eo, as],
3893
- [to, us],
3901
+ [so, kr],
3902
+ [$r, Yi],
3903
+ [jr, An],
3904
+ [to, as],
3905
+ [ao, us],
3894
3906
  [jt.componentKey, jt],
3895
3907
  [xt.componentKey, xt],
3896
3908
  ...wi
@@ -3902,24 +3914,24 @@ let ft = class extends Fa {
3902
3914
  });
3903
3915
  }
3904
3916
  };
3905
- ft = rl([
3906
- ve(_e.Rendered, ft),
3917
+ mt = rl([
3918
+ ve(_e.Rendered, mt),
3907
3919
  Ee(0, J),
3908
3920
  Ee(1, w(Ct)),
3909
3921
  Ee(2, w(we)),
3910
3922
  Ee(3, w(De)),
3911
3923
  Ee(4, w(Vt)),
3912
- Ee(5, w($o)),
3924
+ Ee(5, w(Bo)),
3913
3925
  Ee(6, w(Pa)),
3914
3926
  Ee(7, w(q))
3915
- ], ft);
3927
+ ], mt);
3916
3928
  var ol = Object.defineProperty, nl = Object.getOwnPropertyDescriptor, il = (a, t, e, r) => {
3917
3929
  for (var o = r > 1 ? void 0 : r ? nl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3918
3930
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
3919
3931
  return r && o && ol(t, e, o), o;
3920
3932
  }, Ot = (a, t) => (e, r) => t(e, r, a);
3921
3933
  const sa = "SHEET_DATA_VALIDATION_ALERT";
3922
- let pt = class extends ue {
3934
+ let ft = class extends ue {
3923
3935
  constructor(a, t, e, r) {
3924
3936
  super(), this._hoverManagerService = a, this._cellAlertManagerService = t, this._univerInstanceService = e, this._localeService = r, this._init();
3925
3937
  }
@@ -3941,7 +3953,7 @@ let pt = class extends ue {
3941
3953
  if (!l)
3942
3954
  return;
3943
3955
  this._cellAlertManagerService.showAlert({
3944
- type: qo.ERROR,
3956
+ type: zo.ERROR,
3945
3957
  title: this._localeService.t("dataValidation.error.title"),
3946
3958
  message: l == null ? void 0 : l.getRuleFinalError(d),
3947
3959
  location: a.location,
@@ -3956,23 +3968,23 @@ let pt = class extends ue {
3956
3968
  }));
3957
3969
  }
3958
3970
  };
3959
- pt = il([
3960
- ve(_e.Rendered, pt),
3961
- Ot(0, w(Xo)),
3962
- Ot(1, w(Go)),
3971
+ ft = il([
3972
+ ve(_e.Rendered, ft),
3973
+ Ot(0, w(Go)),
3974
+ Ot(1, w(qo)),
3963
3975
  Ot(2, J),
3964
3976
  Ot(3, w(ie))
3965
- ], pt);
3977
+ ], ft);
3966
3978
  var sl = Object.defineProperty, ll = Object.getOwnPropertyDescriptor, dl = (a, t, e, r) => {
3967
3979
  for (var o = r > 1 ? void 0 : r ? ll(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3968
3980
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
3969
3981
  return r && o && sl(t, e, o), o;
3970
3982
  }, Qe = (a, t) => (e, r) => t(e, r, a);
3971
- let at = class extends ue {
3983
+ let pt = class extends ue {
3972
3984
  constructor(t, e, r, o, n, i) {
3973
3985
  super();
3974
- S(this, "_disposableMap", /* @__PURE__ */ new Map());
3975
- S(this, "registerRule", (t, e, r) => {
3986
+ R(this, "_disposableMap", /* @__PURE__ */ new Map());
3987
+ R(this, "registerRule", (t, e, r) => {
3976
3988
  this.register(t, e, r), this.registerFormula(t, e, r);
3977
3989
  });
3978
3990
  this._dataValidationModel = t, this._injector = e, this._refRangeService = r, this._dataValidationCustomFormulaService = o, this._dataValidationFormulaService = n, this._formulaRefRangeService = i, this._initRefRange();
@@ -4003,7 +4015,7 @@ let at = class extends ue {
4003
4015
  [d]: c
4004
4016
  }
4005
4017
  }
4006
- }, m = {
4018
+ }, h = {
4007
4019
  unitId: t,
4008
4020
  subUnitId: e,
4009
4021
  ruleId: r.uid,
@@ -4015,18 +4027,18 @@ let at = class extends ue {
4015
4027
  formula2: u.formula2
4016
4028
  }
4017
4029
  }
4018
- }, h = [
4030
+ }, m = [
4019
4031
  {
4020
4032
  id: pe.id,
4021
4033
  params: p
4022
4034
  }
4023
- ], R = [
4035
+ ], S = [
4024
4036
  {
4025
4037
  id: pe.id,
4026
- params: m
4038
+ params: h
4027
4039
  }
4028
4040
  ];
4029
- return { redos: h, undos: R };
4041
+ return { redos: m, undos: S };
4030
4042
  };
4031
4043
  if (r.type === H.CUSTOM) {
4032
4044
  const d = this._dataValidationCustomFormulaService.getRuleFormulaInfo(t, e, o);
@@ -4062,19 +4074,20 @@ let at = class extends ue {
4062
4074
  register(t, e, r) {
4063
4075
  var l;
4064
4076
  const o = (d) => {
4065
- const c = [...r.ranges], f = c.map((m) => Ho(m, d)).filter((m) => !!m).flat();
4066
- if (Eo(f, c))
4077
+ const c = [...r.ranges], f = c.map((h) => Wo(h, d)).filter((h) => !!h).flat();
4078
+ if (Oo(f, c))
4067
4079
  return { redos: [], undos: [] };
4068
4080
  if (f.length) {
4069
- const m = {
4081
+ const h = {
4070
4082
  unitId: t,
4071
4083
  subUnitId: e,
4072
4084
  ruleId: r.uid,
4073
4085
  payload: {
4074
4086
  type: fe.RANGE,
4075
4087
  payload: f
4076
- }
4077
- }, h = [{ id: pe.id, params: m }], R = [{
4088
+ },
4089
+ source: "patched"
4090
+ }, m = [{ id: pe.id, params: h }], S = [{
4078
4091
  id: pe.id,
4079
4092
  params: {
4080
4093
  unitId: t,
@@ -4083,13 +4096,14 @@ let at = class extends ue {
4083
4096
  payload: {
4084
4097
  type: fe.RANGE,
4085
4098
  payload: c
4086
- }
4099
+ },
4100
+ source: "patched"
4087
4101
  }
4088
4102
  }];
4089
- return { redos: h, undos: R };
4103
+ return { redos: m, undos: S };
4090
4104
  } else {
4091
- const m = { unitId: t, subUnitId: e, ruleId: r.uid }, h = [{ id: Ft.id, params: m }], R = Po(this._injector, m);
4092
- return { redos: h, undos: R };
4105
+ const h = { unitId: t, subUnitId: e, ruleId: r.uid }, m = [{ id: Ft.id, params: h }], S = Ao(this._injector, h);
4106
+ return { redos: m, undos: S };
4093
4107
  }
4094
4108
  }, n = [];
4095
4109
  r.ranges.forEach((d) => {
@@ -4128,15 +4142,15 @@ let at = class extends ue {
4128
4142
  }));
4129
4143
  }
4130
4144
  };
4131
- at = dl([
4132
- ve(_e.Ready, at),
4145
+ pt = dl([
4146
+ ve(_e.Ready, pt),
4133
4147
  Qe(0, w(q)),
4134
4148
  Qe(1, w(De)),
4135
- Qe(2, w(Uo)),
4149
+ Qe(2, w(Ho)),
4136
4150
  Qe(3, w(ke)),
4137
4151
  Qe(4, w(ce)),
4138
4152
  Qe(5, w(Sn))
4139
- ], at);
4153
+ ], pt);
4140
4154
  var cl = Object.defineProperty, ul = Object.getOwnPropertyDescriptor, hl = (a, t, e, r) => {
4141
4155
  for (var o = r > 1 ? void 0 : r ? ul(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4142
4156
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
@@ -4149,16 +4163,16 @@ let Tt = class extends ue {
4149
4163
  // eslint-disable-next-line max-lines-per-function
4150
4164
  _initAutoFill() {
4151
4165
  const a = () => ({ redos: [], undos: [] }), t = (o) => {
4152
- const { source: n, target: i, unitId: s, subUnitId: l } = o, d = this._dataValidationModel.ensureManager(s, l), c = d.getRuleObjectMatrix().clone(), u = Va([n, i]), [f, p] = u.ranges, { mapFunc: m } = u, h = {
4166
+ const { source: n, target: i, unitId: s, subUnitId: l } = o, d = this._dataValidationModel.ensureManager(s, l), c = d.getRuleObjectMatrix().clone(), u = Va([n, i]), [f, p] = u.ranges, { mapFunc: h } = u, m = {
4153
4167
  row: f.startRow,
4154
4168
  col: f.startColumn
4155
4169
  };
4156
- Ko(f, p).forEach((M) => {
4170
+ Qo(f, p).forEach((M) => {
4157
4171
  const I = M.repeatStartCell, D = M.relativeRange, E = {
4158
- startRow: h.row,
4159
- startColumn: h.col,
4160
- endColumn: h.col,
4161
- endRow: h.row
4172
+ startRow: m.row,
4173
+ startColumn: m.col,
4174
+ endColumn: m.col,
4175
+ endRow: m.row
4162
4176
  }, x = {
4163
4177
  startRow: I.row,
4164
4178
  startColumn: I.col,
@@ -4174,7 +4188,7 @@ let Tt = class extends ue {
4174
4188
  endRow: T
4175
4189
  },
4176
4190
  E
4177
- ), { row: L, col: B } = m(F.startRow, F.startColumn), U = d.getRuleIdByLocation(L, B);
4191
+ ), { row: L, col: B } = h(F.startRow, F.startColumn), U = d.getRuleIdByLocation(L, B);
4178
4192
  if (U) {
4179
4193
  const b = Ue.getPositionRange(
4180
4194
  {
@@ -4184,12 +4198,12 @@ let Tt = class extends ue {
4184
4198
  endRow: T
4185
4199
  },
4186
4200
  x
4187
- ), { row: $, col: z } = m(b.startRow, b.startColumn);
4201
+ ), { row: $, col: z } = h(b.startRow, b.startColumn);
4188
4202
  c.setValue($, z, U);
4189
4203
  }
4190
4204
  });
4191
4205
  });
4192
- const g = c.diff(d.getDataValidations()), { redoMutations: C, undoMutations: _ } = rt(s, l, g, this._injector);
4206
+ const g = c.diff(d.getDataValidations()), { redoMutations: C, undoMutations: _ } = at(s, l, g, this._injector, "patched");
4193
4207
  return {
4194
4208
  undos: _,
4195
4209
  redos: C
@@ -4218,7 +4232,7 @@ let Tt = class extends ue {
4218
4232
  };
4219
4233
  Tt = hl([
4220
4234
  ve(_e.Ready, Tt),
4221
- la(0, zo),
4235
+ la(0, Ko),
4222
4236
  la(1, w(q)),
4223
4237
  la(2, w(De))
4224
4238
  ], Tt);
@@ -4230,7 +4244,7 @@ var ml = Object.defineProperty, fl = Object.getOwnPropertyDescriptor, pl = (a, t
4230
4244
  let gt = class extends ue {
4231
4245
  constructor(t, e, r) {
4232
4246
  super();
4233
- S(this, "_copyInfo");
4247
+ R(this, "_copyInfo");
4234
4248
  this._sheetClipboardService = t, this._dataValidationModel = e, this._injector = r, this._initCopyPaste();
4235
4249
  }
4236
4250
  _initCopyPaste() {
@@ -4238,7 +4252,7 @@ let gt = class extends ue {
4238
4252
  id: qt,
4239
4253
  onBeforeCopy: (t, e, r) => this._collect(t, e, r),
4240
4254
  onPasteCells: (t, e, r, o) => {
4241
- const { copyType: n = Ka.COPY, pasteType: i } = o, { range: s } = t || {}, { range: l, unitId: d, subUnitId: c } = e;
4255
+ const { copyType: n = Qa.COPY, pasteType: i } = o, { range: s } = t || {}, { range: l, unitId: d, subUnitId: c } = e;
4242
4256
  return this._generateMutations(l, { copyType: n, pasteType: i, copyRange: s, unitId: d, subUnitId: c });
4243
4257
  }
4244
4258
  });
@@ -4252,14 +4266,14 @@ let gt = class extends ue {
4252
4266
  };
4253
4267
  const n = this._dataValidationModel.ensureManager(t, e), i = {
4254
4268
  get: this._injector.get.bind(this._injector)
4255
- }, s = Qo(r, i, t, e);
4269
+ }, s = Zo(r, i, t, e);
4256
4270
  if (!s)
4257
4271
  return;
4258
4272
  const { rows: l, cols: d } = s;
4259
4273
  l.forEach((c, u) => {
4260
4274
  d.forEach((f, p) => {
4261
- const m = n.getRuleIdByLocation(c, f);
4262
- o.setValue(u, p, m != null ? m : "");
4275
+ const h = n.getRuleIdByLocation(c, f);
4276
+ o.setValue(u, p, h != null ? h : "");
4263
4277
  });
4264
4278
  });
4265
4279
  }
@@ -4267,7 +4281,7 @@ let gt = class extends ue {
4267
4281
  _generateMutations(t, e) {
4268
4282
  if (!this._copyInfo)
4269
4283
  return { redos: [], undos: [] };
4270
- if (e.copyType === Ka.CUT)
4284
+ if (e.copyType === Qa.CUT)
4271
4285
  return this._copyInfo = null, { redos: [], undos: [] };
4272
4286
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !e.copyRange)
4273
4287
  return { redos: [], undos: [] };
@@ -4282,10 +4296,10 @@ let gt = class extends ue {
4282
4296
  return { redos: [], undos: [] };
4283
4297
  const { unitId: r, subUnitId: o } = this._copyInfo;
4284
4298
  if (e.unitId !== r || o !== e.subUnitId) {
4285
- const n = this._dataValidationModel.ensureManager(r, o), i = this._dataValidationModel.ensureManager(e.unitId, e.subUnitId), s = i.getRuleObjectMatrix().clone(), { ranges: [l, d], mapFunc: c } = Va([e.copyRange, t]), u = Qa(l, d, !0), f = /* @__PURE__ */ new Map();
4286
- u.forEach(({ startRange: h }) => {
4287
- var R;
4288
- (R = this._copyInfo) == null || R.matrix.forValue((g, C, _) => {
4299
+ const n = this._dataValidationModel.ensureManager(r, o), i = this._dataValidationModel.ensureManager(e.unitId, e.subUnitId), s = i.getRuleObjectMatrix().clone(), { ranges: [l, d], mapFunc: c } = Va([e.copyRange, t]), u = Za(l, d, !0), f = /* @__PURE__ */ new Map();
4300
+ u.forEach(({ startRange: m }) => {
4301
+ var S;
4302
+ (S = this._copyInfo) == null || S.matrix.forValue((g, C, _) => {
4289
4303
  const M = Ue.getPositionRange(
4290
4304
  {
4291
4305
  startRow: g,
@@ -4293,45 +4307,47 @@ let gt = class extends ue {
4293
4307
  startColumn: C,
4294
4308
  endColumn: C
4295
4309
  },
4296
- h
4310
+ m
4297
4311
  ), I = `${o}-${_}`, D = n.getRuleById(_);
4298
4312
  !i.getRuleById(I) && D && f.set(I, { ...D, uid: I });
4299
4313
  const { row: E, col: x } = c(M.startRow, M.startColumn);
4300
4314
  s.setValue(E, x, I);
4301
4315
  });
4302
4316
  });
4303
- const { redoMutations: p, undoMutations: m } = rt(
4317
+ const { redoMutations: p, undoMutations: h } = at(
4304
4318
  e.unitId,
4305
4319
  e.subUnitId,
4306
4320
  s.diffWithAddition(i.getDataValidations(), f.values()),
4307
- this._injector
4321
+ this._injector,
4322
+ "patched"
4308
4323
  );
4309
4324
  return {
4310
4325
  redos: p,
4311
- undos: m
4326
+ undos: h
4312
4327
  };
4313
4328
  } else {
4314
4329
  const n = this._dataValidationModel.ensureManager(r, o), i = n.getRuleObjectMatrix().clone(), { ranges: [s, l], mapFunc: d } = Va([e.copyRange, t]);
4315
- Qa(s, l, !0).forEach(({ startRange: p }) => {
4316
- var m;
4317
- (m = this._copyInfo) == null || m.matrix.forValue((h, R, g) => {
4330
+ Za(s, l, !0).forEach(({ startRange: p }) => {
4331
+ var h;
4332
+ (h = this._copyInfo) == null || h.matrix.forValue((m, S, g) => {
4318
4333
  const C = Ue.getPositionRange(
4319
4334
  {
4320
- startRow: h,
4321
- endRow: h,
4322
- startColumn: R,
4323
- endColumn: R
4335
+ startRow: m,
4336
+ endRow: m,
4337
+ startColumn: S,
4338
+ endColumn: S
4324
4339
  },
4325
4340
  p
4326
4341
  ), { row: _, col: M } = d(C.startRow, C.startColumn);
4327
4342
  i.setValue(_, M, g);
4328
4343
  });
4329
4344
  });
4330
- const { redoMutations: u, undoMutations: f } = rt(
4345
+ const { redoMutations: u, undoMutations: f } = at(
4331
4346
  r,
4332
4347
  o,
4333
4348
  i.diff(n.getDataValidations()),
4334
- this._injector
4349
+ this._injector,
4350
+ "patched"
4335
4351
  );
4336
4352
  return {
4337
4353
  redos: u,
@@ -4342,13 +4358,13 @@ let gt = class extends ue {
4342
4358
  };
4343
4359
  gt = pl([
4344
4360
  ve(_e.Ready, gt),
4345
- da(0, Zo),
4361
+ da(0, Jo),
4346
4362
  da(1, w(q)),
4347
4363
  da(2, w(De))
4348
4364
  ], gt);
4349
- class qa {
4365
+ class za {
4350
4366
  constructor(t, e) {
4351
- S(this, "value");
4367
+ R(this, "value");
4352
4368
  this._worksheet = e, this.value = t;
4353
4369
  }
4354
4370
  addRule(t) {
@@ -4436,7 +4452,7 @@ class qa {
4436
4452
  }), r;
4437
4453
  }
4438
4454
  clone() {
4439
- return new qa(new Ye(this.value.clone()), this._worksheet);
4455
+ return new za(new Ye(this.value.clone()), this._worksheet);
4440
4456
  }
4441
4457
  getValue(t, e) {
4442
4458
  return this.value.getValue(t, e);
@@ -4445,36 +4461,26 @@ class qa {
4445
4461
  return this.value.setValue(t, e, r);
4446
4462
  }
4447
4463
  }
4448
- class gl extends Ao {
4449
- constructor(e, r, o, n) {
4450
- super(e, r, o);
4464
+ class gl extends xo {
4465
+ constructor(e, r, o) {
4466
+ super(e, r);
4451
4467
  /**
4452
4468
  * save cell's ruleId
4453
4469
  */
4454
- S(this, "_ruleMatrix");
4455
- S(this, "_dataValidatorRegistryService");
4456
- S(this, "_dataValidationCacheService");
4457
- S(this, "_dataValidationFormulaService");
4458
- S(this, "_dataValidationCustomFormulaService");
4459
- S(this, "_cache");
4460
- S(this, "_dataValidationRefRangeController");
4461
- this._injector = n, this._dataValidatorRegistryService = this._injector.get(we), this._dataValidationCacheService = this._injector.get(nt), this._dataValidationFormulaService = this._injector.get(ce), this._dataValidationCustomFormulaService = this._injector.get(ke), this._dataValidationRefRangeController = this._injector.get(at), this._cache = this._dataValidationCacheService.ensureCache(e, r);
4462
- const s = this._injector.get(J).getUnit(e, re.UNIVER_SHEET).getSheetBySheetId(r), l = new Ye();
4463
- o == null || o.forEach((d) => {
4464
- const c = d.uid;
4465
- d.ranges.forEach((u) => {
4466
- W.foreach(u, (f, p) => {
4467
- l.setValue(f, p, c);
4468
- });
4469
- });
4470
- }), o == null || o.forEach((d) => {
4471
- this._dataValidationRefRangeController.register(e, r, d);
4472
- }), this._ruleMatrix = new qa(l, s);
4470
+ R(this, "_ruleMatrix");
4471
+ R(this, "_dataValidatorRegistryService");
4472
+ R(this, "_dataValidationCacheService");
4473
+ R(this, "_dataValidationFormulaService");
4474
+ R(this, "_dataValidationCustomFormulaService");
4475
+ R(this, "_cache");
4476
+ this._injector = o, this._dataValidatorRegistryService = this._injector.get(we), this._dataValidationCacheService = this._injector.get(ot), this._dataValidationFormulaService = this._injector.get(ce), this._dataValidationCustomFormulaService = this._injector.get(ke), this._cache = this._dataValidationCacheService.ensureCache(e, r);
4477
+ const i = this._injector.get(J).getUnit(e, re.UNIVER_SHEET).getSheetBySheetId(r), s = new Ye();
4478
+ this._ruleMatrix = new za(s, i);
4473
4479
  }
4474
4480
  _addRuleSideEffect(e) {
4475
4481
  var n;
4476
4482
  const { unitId: r, subUnitId: o } = this;
4477
- (e.type === H.LIST || e.type === H.LIST_MULTIPLE) && Wa((n = e.formula1) != null ? n : "") && (e.formula1 = `=${e.formula1}`), this._ruleMatrix.addRule(e), this._dataValidationCacheService.addRule(r, o, e), this._dataValidationFormulaService.addRule(r, o, e.uid, e.formula1, e.formula2), this._dataValidationCustomFormulaService.addRule(r, o, e);
4483
+ (e.type === H.LIST || e.type === H.LIST_MULTIPLE) && ka((n = e.formula1) != null ? n : "") && (e.formula1 = `=${e.formula1}`), this._ruleMatrix.addRule(e), this._dataValidationCacheService.addRule(r, o, e), this._dataValidationFormulaService.addRule(r, o, e.uid, e.formula1, e.formula2), this._dataValidationCustomFormulaService.addRule(r, o, e);
4478
4484
  }
4479
4485
  addRule(e, r) {
4480
4486
  (Array.isArray(e) ? e : [e]).forEach((n) => {
@@ -4511,12 +4517,12 @@ class gl extends Ao {
4511
4517
  status: Ce.VALIDATING,
4512
4518
  ruleId: c
4513
4519
  }), u.validator({ value: e, unitId: l, subUnitId: d, row: s, column: i }, r).then((p) => {
4514
- const m = p ? Ce.VALID : Ce.INVALID;
4520
+ const h = p ? Ce.VALID : Ce.INVALID;
4515
4521
  this._cache.setValue(s, i, {
4516
4522
  value: e,
4517
- status: m,
4523
+ status: h,
4518
4524
  ruleId: c
4519
- }), n(m, !0);
4525
+ }), n(h, !0);
4520
4526
  }), Ce.VALIDATING) : (n(f.status, !1), f.status);
4521
4527
  } else
4522
4528
  return n(Ce.VALID, !1), Ce.VALID;
@@ -4545,7 +4551,6 @@ let vt = class extends ue {
4545
4551
  return new gl(
4546
4552
  a,
4547
4553
  t,
4548
- [],
4549
4554
  this._injector
4550
4555
  );
4551
4556
  }
@@ -4555,7 +4560,7 @@ let vt = class extends ue {
4555
4560
  };
4556
4561
  vt = Sl([
4557
4562
  ve(_e.Starting, vt),
4558
- Nt(0, bo),
4563
+ Nt(0, No),
4559
4564
  Nt(1, J),
4560
4565
  Nt(2, w(q)),
4561
4566
  Nt(3, w(De))
@@ -4572,7 +4577,7 @@ let _t = class extends ue {
4572
4577
  _commandExecutedListener() {
4573
4578
  this.disposeWithMe(
4574
4579
  this._commandService.beforeCommandExecuted((a) => {
4575
- a.id === xo.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
4580
+ a.id === jo.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
4576
4581
  workbookTypes: [_a],
4577
4582
  rangeTypes: [Ca],
4578
4583
  worksheetTypes: [Ra, Sa]
@@ -4589,7 +4594,7 @@ _t = Vl([
4589
4594
  ve(_e.Ready, _t),
4590
4595
  ca(0, w(ie)),
4591
4596
  ca(1, ee),
4592
- ca(2, w(Jo))
4597
+ ca(2, w(en))
4593
4598
  ], _t);
4594
4599
  var Ml = Object.defineProperty, Il = Object.getOwnPropertyDescriptor, wl = (a, t, e, r) => {
4595
4600
  for (var o = r > 1 ? void 0 : r ? Il(t, e) : t, n = a.length - 1, i; n >= 0; n--)
@@ -4631,98 +4636,98 @@ let Ut = class {
4631
4636
  Ut = wl([
4632
4637
  ua(0, J),
4633
4638
  ua(1, w(q)),
4634
- ua(2, w(nt))
4639
+ ua(2, w(ot))
4635
4640
  ], Ut);
4636
- var mo = Object.defineProperty, yl = Object.getOwnPropertyDescriptor, Dl = (a, t, e) => t in a ? mo(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, El = (a, t, e, r) => {
4641
+ var fo = Object.defineProperty, yl = Object.getOwnPropertyDescriptor, Dl = (a, t, e) => t in a ? fo(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, El = (a, t, e, r) => {
4637
4642
  for (var o = r > 1 ? void 0 : r ? yl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4638
4643
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
4639
- return r && o && mo(t, e, o), o;
4640
- }, ha = (a, t) => (e, r) => t(e, r, a), fo = (a, t, e) => Dl(a, typeof t != "symbol" ? t + "" : t, e);
4641
- let Ht = class extends gr {
4644
+ return r && o && fo(t, e, o), o;
4645
+ }, ha = (a, t) => (e, r) => t(e, r, a), po = (a, t, e) => Dl(a, typeof t != "symbol" ? t + "" : t, e);
4646
+ let Ht = class extends vr {
4642
4647
  constructor(a = {}, t, e, r) {
4643
- super(), this._config = a, this._injector = t, this._commandService = e, this._localeService = r, this._config = X.deepMerge({}, lo, this._config);
4648
+ super(), this._config = a, this._injector = t, this._commandService = e, this._localeService = r, this._config = X.deepMerge({}, co, this._config);
4644
4649
  }
4645
4650
  onStarting(a) {
4646
4651
  [
4647
4652
  [Me],
4648
4653
  [Ct],
4649
- [nt],
4654
+ [ot],
4650
4655
  [ce],
4651
4656
  [ke],
4652
4657
  [Oe],
4653
4658
  [Ut],
4654
4659
  // controller
4655
4660
  [vt],
4656
- [ft],
4661
+ [mt],
4657
4662
  [
4658
- ht,
4663
+ ut,
4659
4664
  {
4660
- useFactory: () => this._injector.createInstance(ht, this._config)
4665
+ useFactory: () => this._injector.createInstance(ut, this._config)
4661
4666
  }
4662
4667
  ],
4668
+ [ft],
4663
4669
  [pt],
4664
- [at],
4665
4670
  [_t],
4666
4671
  [Tt],
4667
4672
  [gt],
4668
4673
  [tt],
4669
- [ut]
4674
+ [ct]
4670
4675
  ].forEach((t) => {
4671
4676
  a.add(t);
4672
4677
  }), [
4673
4678
  Qt,
4674
- Xa,
4679
+ Ga,
4675
4680
  Kt,
4676
4681
  Da,
4677
- no,
4682
+ io,
4678
4683
  // operation
4679
4684
  Gt,
4680
- Br,
4681
- ka,
4682
- ot,
4683
- $r
4685
+ Ur,
4686
+ Ya,
4687
+ rt,
4688
+ Br
4684
4689
  ].forEach((t) => {
4685
4690
  this._commandService.registerCommand(t);
4686
4691
  });
4687
4692
  }
4688
4693
  };
4689
- fo(Ht, "pluginName", qt);
4690
- fo(Ht, "type", re.UNIVER_SHEET);
4694
+ po(Ht, "pluginName", qt);
4695
+ po(Ht, "type", re.UNIVER_SHEET);
4691
4696
  Ht = El([
4692
- pr(Sr, Vr, Ir),
4697
+ gr(Rr, Mr, wr),
4693
4698
  ha(1, w(De)),
4694
4699
  ha(2, ee),
4695
4700
  ha(3, w(ie))
4696
4701
  ], Ht);
4697
- var po = Object.defineProperty, bl = Object.getOwnPropertyDescriptor, Ol = (a, t, e) => t in a ? po(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, Nl = (a, t, e, r) => {
4702
+ var go = Object.defineProperty, bl = Object.getOwnPropertyDescriptor, Ol = (a, t, e) => t in a ? go(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, Nl = (a, t, e, r) => {
4698
4703
  for (var o = r > 1 ? void 0 : r ? bl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4699
4704
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
4700
- return r && o && po(t, e, o), o;
4701
- }, ma = (a, t) => (e, r) => t(e, r, a), go = (a, t, e) => Ol(a, typeof t != "symbol" ? t + "" : t, e);
4702
- let Wt = class extends gr {
4705
+ return r && o && go(t, e, o), o;
4706
+ }, ma = (a, t) => (e, r) => t(e, r, a), vo = (a, t, e) => Ol(a, typeof t != "symbol" ? t + "" : t, e);
4707
+ let Wt = class extends vr {
4703
4708
  constructor(a = {}, t, e, r) {
4704
- super(), this._config = a, this._injector = t, this._commandService = e, this._localeService = r, this._config = X.deepMerge({}, lo, this._config);
4709
+ super(), this._config = a, this._injector = t, this._commandService = e, this._localeService = r, this._config = X.deepMerge({}, co, this._config);
4705
4710
  }
4706
4711
  onStarting(a) {
4707
4712
  [
4708
4713
  [Me],
4709
4714
  [Ct],
4710
- [nt],
4715
+ [ot],
4711
4716
  [ce],
4712
4717
  [ke],
4713
4718
  [Oe],
4714
4719
  [Ut],
4715
4720
  // controller
4716
4721
  [vt],
4717
- [ft],
4722
+ [mt],
4718
4723
  [
4719
- mt,
4724
+ ht,
4720
4725
  {
4721
- useFactory: () => this._injector.createInstance(mt, this._config)
4726
+ useFactory: () => this._injector.createInstance(ht, this._config)
4722
4727
  }
4723
4728
  ],
4729
+ [ft],
4724
4730
  [pt],
4725
- [at],
4726
4731
  [_t],
4727
4732
  [gt],
4728
4733
  [tt]
@@ -4730,52 +4735,52 @@ let Wt = class extends gr {
4730
4735
  a.add(t);
4731
4736
  }), [
4732
4737
  Qt,
4733
- Xa,
4738
+ Ga,
4734
4739
  Kt,
4735
4740
  // operation
4736
4741
  Gt,
4737
- Br,
4738
- ka,
4739
- ot,
4740
- $r
4742
+ Ur,
4743
+ Ya,
4744
+ rt,
4745
+ Br
4741
4746
  ].forEach((t) => {
4742
4747
  this._commandService.registerCommand(t);
4743
4748
  });
4744
4749
  }
4745
4750
  };
4746
- go(Wt, "pluginName", qt);
4747
- go(Wt, "type", re.UNIVER_SHEET);
4751
+ vo(Wt, "pluginName", qt);
4752
+ vo(Wt, "type", re.UNIVER_SHEET);
4748
4753
  Wt = Nl([
4749
- pr(Sr, Vr, Ir),
4754
+ gr(Rr, Mr, wr),
4750
4755
  ma(1, w(De)),
4751
4756
  ma(2, ee),
4752
4757
  ma(3, w(ie))
4753
4758
  ], Wt);
4754
4759
  export {
4755
- Xa as AddSheetDataValidationAndOpenCommand,
4760
+ Ga as AddSheetDataValidationAndOpenCommand,
4756
4761
  Qt as AddSheetDataValidationCommand,
4757
- ka as CloseValidationPanelOperation,
4762
+ Ya as CloseValidationPanelOperation,
4758
4763
  qt as DATA_VALIDATION_PLUGIN_NAME,
4759
- pt as DataValidationAlertController,
4764
+ ft as DataValidationAlertController,
4760
4765
  Tt as DataValidationAutoFillController,
4761
- nt as DataValidationCacheService,
4762
- ft as DataValidationController,
4766
+ ot as DataValidationCacheService,
4767
+ mt as DataValidationController,
4763
4768
  gt as DataValidationCopyPasteController,
4764
4769
  ke as DataValidationCustomFormulaService,
4765
4770
  tt as DataValidationFormulaController,
4766
4771
  ce as DataValidationFormulaService,
4767
- at as DataValidationRefRangeController,
4768
- ut as DataValidationRejectInputController,
4769
- Br as HideDataValidationDropdown,
4770
- Ql as ICommandService,
4771
- Zl as LocaleService,
4772
- ot as OpenValidationPanelOperation,
4773
- Jl as Plugin,
4772
+ pt as DataValidationRefRangeController,
4773
+ ct as DataValidationRejectInputController,
4774
+ Ur as HideDataValidationDropdown,
4775
+ zl as ICommandService,
4776
+ Kl as LocaleService,
4777
+ rt as OpenValidationPanelOperation,
4778
+ Ql as Plugin,
4774
4779
  Ct as SheetDataValidationService,
4775
- ht as SheetsDataValidationRenderController,
4780
+ ut as SheetsDataValidationRenderController,
4776
4781
  Ut as SheetsDataValidationValidatorService,
4777
4782
  Gt as ShowDataValidationDropdown,
4778
- $r as ToggleValidationPanelOperation,
4783
+ Br as ToggleValidationPanelOperation,
4779
4784
  Wt as UniverSheetsDataValidationMobilePlugin,
4780
4785
  Ht as UniverSheetsDataValidationPlugin,
4781
4786
  Kt as UpdateSheetDataValidationRangeCommand