@univerjs/sheets-data-validation 0.2.4-alpha.0 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -1,21 +1,23 @@
1
- var fo = Object.defineProperty;
2
- var po = (a, t, e) => t in a ? fo(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
- var S = (a, t, e) => po(a, typeof t != "symbol" ? t + "" : t, e);
4
- import { DEFAULT_EMPTY_DOCUMENT_VALUE as cr, useDependency as $, Inject as I, Disposable as ue, DOCS_FORMULA_BAR_EDITOR_UNIT_ID_KEY as go, DisposableCollection as ur, IUniverInstanceService as J, UniverInstanceType as re, toDisposable as Ea, CommandType as Ie, ICommandService as ee, ObjectMatrix as ke, Range as W, isFormulaString as A, ThemeService as vo, VerticalAlign as me, HorizontalAlign as Be, createInternalEditorID as ba, LocaleService as ie, OnLifecycle as ve, LifecycleStages as _e, IPermissionService as _o, DataValidationType as B, Tools as Y, DataValidationOperator as V, DataValidationErrorStyle as st, UndoCommand as So, RedoCommand as Ro, isUnitRangesEqual as Co, isValidRange as Vo, debounce as Mo, shallowEqual as Ga, Injector as Ee, DataValidationRenderMode as le, WrapStrategy as se, DocumentDataModel as Io, BooleanNumber as ot, Rectangle as Ue, IUndoRedoService as Ht, sequenceExecuteAsync as hr, sequenceExecute as Oa, Optional as wo, RxDisposable as Na, DataValidationStatus as Ce, isRangesEqual as yo, queryObjectMatrix as Kt, IResourceManagerService as Do, DependentOn as mr, Plugin as fr } from "@univerjs/core";
5
- import { ICommandService as Gl, LocaleService as ql, Plugin as zl } from "@univerjs/core";
6
- import { DataValidatorRegistryService as we, DataValidationModel as z, BaseDataValidator as Ye, DataValidatorRegistryScope as Eo, TWO_FORMULA_OPERATOR_COUNT as bo, getRuleOptions as ma, getRuleSetting as fa, RemoveDataValidationCommand as pr, createDefaultNewRule as gr, RemoveAllDataValidationCommand as Oo, TextLengthErrorTitleMap as No, AddDataValidationMutation as pa, RemoveDataValidationMutation as Ot, UpdateRuleType as fe, UpdateDataValidationMutation as pe, removeDataValidationUndoFactory as To, DataValidationManager as Fo, AddDataValidationCommand as Lo, UniverDataValidationPlugin as vr } from "@univerjs/data-validation";
7
- import { getSheetCommandTarget as Wt, SetRangeValuesCommand as Ta, WorksheetViewPermission as Po, SetRangeValuesMutation as Nt, SetRangeValuesUndoMutationFactory as _r, WorkbookEditablePermission as ga, WorksheetSetCellStylePermission as va, WorksheetEditPermission as _a, RangeProtectionPermissionEditPoint as Sa, SheetInterceptorService as Fa, INTERCEPTOR_POINT as Sr, SheetsSelectionsService as Ao, ClearSelectionAllCommand as xo, RefRangeService as jo, handleCommonDefaultRangeChangeWithEffectRefCommands as $o, UniverSheetsPlugin as Rr } from "@univerjs/sheets";
8
- import { SheetCanvasPopManagerService as Bo, IMarkSelectionService as Uo, IEditorBridgeService as La, getCurrentRangeDisable$ as Ho, AutoHeightController as Cr, SheetSkeletonManagerService as Tt, HoverManagerService as Wo, CellAlertManagerService as ko, CellAlertType as Yo, IAutoFillService as Xo, APPLY_TYPE as Ct, virtualizeDiscreteRanges as Ra, getAutoFillRepeatRange as Go, COPY_TYPE as qa, rangeToDiscreteRange as qo, PREDEFINED_HOOK_NAME as Vt, getRepeatRange as za, ISheetClipboardService as zo, SheetPermissionInterceptorBaseController as Ko, UniverSheetsUIPlugin as Vr } from "@univerjs/sheets-ui";
9
- import { useObservable as Xe, ComponentManager as St, IZenZoneService as Qo, ISidebarService as Mr, TextEditor as Ir, useEvent as wr, RangeSelector as Zo, KeyCode as Jo, IDialogService as en, MenuItemType as Pa, MenuPosition as tn, MenuGroup as an, getMenuHiddenObservable as rn, IMenuService as on } from "@univerjs/ui";
10
- import { IRenderManagerService as Aa, fixLineWidthByScale as Ka, Transform as nn, Checkbox as sn, DeviceInputEventType as ln, getDocsSkeletonPageSize as Mt, Rect as yr, DocumentViewModel as dn, DocumentSkeleton as cn, Documents as un, FontCache as hn, Shape as mn, getFontStyleString as Qa } from "@univerjs/engine-render";
11
- import { Subject as Dr, filter as fn, BehaviorSubject as Za, distinctUntilChanged as pn, debounceTime as gn } from "rxjs";
12
- import Ca, { forwardRef as Te, useRef as xa, createElement as Fe, useState as te, useEffect as Ze, useMemo as Ft } from "react";
13
- import { RegisterOtherFormulaService as Er, FormulaRefRangeService as vn } from "@univerjs/sheets-formula";
14
- import { FormLayout as Z, Input as je, RadioGroup as ja, Radio as $e, DraggableList as _n, Select as Va, Checkbox as $a, Button as He, RectPopup as Sn, Scrollbar as Rn, DatePanel as Cn } from "@univerjs/design";
15
- import Vn from "clsx";
16
- import { LexerTreeBuilder as Ba, deserializeRangeWithSheet as br, serializeRange as Or, isReferenceString as Ua, sequenceNodeType as Mn, isFormulaTransformable as In, transformFormula as Ja } from "@univerjs/engine-formula";
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";
17
+ 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";
17
19
  import Ve from "dayjs";
18
- import wn from "@univerjs/engine-numfmt";
20
+ import { numfmt as Dn } from "@univerjs/engine-numfmt";
19
21
  function ae(a) {
20
22
  if (a === null)
21
23
  return "";
@@ -24,19 +26,19 @@ function ae(a) {
24
26
  if (t == null)
25
27
  return "";
26
28
  const e = t.dataStream;
27
- return e.substring(e.length - 2, e.length) === cr ? e.substring(0, e.length - 2) : e;
29
+ return e.substring(e.length - 2, e.length) === hr ? e.substring(0, e.length - 2) : e;
28
30
  }
29
31
  return a == null ? void 0 : a.v;
30
32
  }
31
- function Nr(a) {
33
+ function Lr(a) {
32
34
  var t;
33
35
  return String((t = ae(a)) != null ? t : "");
34
36
  }
35
- var yn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
36
- function Dn(a) {
37
+ var En = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
38
+ function bn(a) {
37
39
  return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
38
40
  }
39
- var Tr = { exports: {} }, kt = {};
41
+ var Pr = { exports: {} }, Xt = {};
40
42
  /**
41
43
  * @license React
42
44
  * react-jsx-runtime.production.min.js
@@ -46,21 +48,21 @@ var Tr = { exports: {} }, kt = {};
46
48
  * This source code is licensed under the MIT license found in the
47
49
  * LICENSE file in the root directory of this source tree.
48
50
  */
49
- var En = Ca, bn = Symbol.for("react.element"), On = Symbol.for("react.fragment"), Nn = Object.prototype.hasOwnProperty, Tn = En.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Fn = { key: !0, ref: !0, __self: !0, __source: !0 };
50
- function Fr(a, t, e) {
51
+ 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) {
51
53
  var r, o = {}, n = null, i = null;
52
54
  e !== void 0 && (n = "" + e), t.key !== void 0 && (n = "" + t.key), t.ref !== void 0 && (i = t.ref);
53
- for (r in t) Nn.call(t, r) && !Fn.hasOwnProperty(r) && (o[r] = t[r]);
55
+ for (r in t) Fn.call(t, r) && !Pn.hasOwnProperty(r) && (o[r] = t[r]);
54
56
  if (a && a.defaultProps) for (r in t = a.defaultProps, t) o[r] === void 0 && (o[r] = t[r]);
55
- return { $$typeof: bn, type: a, key: n, ref: i, props: o, _owner: Tn.current };
57
+ return { $$typeof: Nn, type: a, key: n, ref: i, props: o, _owner: Ln.current };
56
58
  }
57
- kt.Fragment = On;
58
- kt.jsx = Fr;
59
- kt.jsxs = Fr;
60
- Tr.exports = kt;
61
- var v = Tr.exports;
62
- function Ln() {
63
- const a = $(Ne), t = Xe(a.activeDropdown$, a.activeDropdown), e = $(St);
59
+ Xt.Fragment = Tn;
60
+ Xt.jsx = Ar;
61
+ Xt.jsxs = Ar;
62
+ Pr.exports = Xt;
63
+ var v = Pr.exports;
64
+ function An() {
65
+ const a = j(Oe), t = Ge(a.activeDropdown$, a.activeDropdown), e = j(Vt);
64
66
  if (!t)
65
67
  return null;
66
68
  const { location: r, componentKey: o } = t, n = e.get(o), i = `${r.unitId}-${r.subUnitId}-${r.row}-${r.col}`;
@@ -78,17 +80,17 @@ function Ln() {
78
80
  i
79
81
  );
80
82
  }
81
- const Lr = "sheet.ui.dropdown";
82
- var Pn = Object.defineProperty, An = Object.getOwnPropertyDescriptor, xn = (a, t, e, r) => {
83
- for (var o = r > 1 ? void 0 : r ? An(t, e) : t, n = a.length - 1, i; n >= 0; n--)
83
+ const xr = "sheet.ui.dropdown";
84
+ var xn = Object.defineProperty, jn = Object.getOwnPropertyDescriptor, $n = (a, t, e, r) => {
85
+ for (var o = r > 1 ? void 0 : r ? jn(t, e) : t, n = a.length - 1, i; n >= 0; n--)
84
86
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
85
- return r && o && Pn(t, e, o), o;
86
- }, Ge = (a, t) => (e, r) => t(e, r, a);
87
- let Ne = class extends ue {
87
+ return r && o && xn(t, e, o), o;
88
+ }, qe = (a, t) => (e, r) => t(e, r, a);
89
+ let Oe = class extends ue {
88
90
  constructor(t, e, r, o, n, i) {
89
91
  super();
90
92
  S(this, "_activeDropdown");
91
- S(this, "_activeDropdown$", new Dr());
93
+ S(this, "_activeDropdown$", new br());
92
94
  S(this, "_currentPopup", null);
93
95
  S(this, "activeDropdown$", this._activeDropdown$.asObservable());
94
96
  S(this, "_zenVisible", !1);
@@ -109,11 +111,11 @@ let Ne = class extends ue {
109
111
  if (this._currentPopup && this._currentPopup.dispose(), this._zenVisible)
110
112
  return;
111
113
  this._activeDropdown = t, this._activeDropdown$.next(this._activeDropdown);
112
- const i = this._renderManagerService.getRenderById(go), s = this._canvasPopupManagerService.attachPopupToCell(
114
+ const i = this._renderManagerService.getRenderById(So), s = this._canvasPopupManagerService.attachPopupToCell(
113
115
  o,
114
116
  n,
115
117
  {
116
- componentKey: Lr,
118
+ componentKey: xr,
117
119
  onClickOutside: () => {
118
120
  e && this.hideDropdown();
119
121
  },
@@ -123,7 +125,7 @@ let Ne = class extends ue {
123
125
  );
124
126
  if (!s)
125
127
  throw new Error("[DataValidationDropdownManagerService]: cannot show dropdown!");
126
- const l = new ur();
128
+ const l = new mr();
127
129
  l.add(s), l.add({
128
130
  dispose: () => {
129
131
  var d, c;
@@ -163,30 +165,30 @@ let Ne = class extends ue {
163
165
  });
164
166
  }
165
167
  };
166
- Ne = xn([
167
- Ge(0, I(Bo)),
168
- Ge(1, J),
169
- Ge(2, I(we)),
170
- Ge(3, Qo),
171
- Ge(4, Aa),
172
- Ge(5, I(z))
173
- ], Ne);
174
- var jn = Object.defineProperty, $n = Object.getOwnPropertyDescriptor, Bn = (a, t, e, r) => {
175
- for (var o = r > 1 ? void 0 : r ? $n(t, e) : t, n = a.length - 1, i; n >= 0; n--)
168
+ Oe = $n([
169
+ qe(0, w(Wo)),
170
+ qe(1, J),
171
+ qe(2, w(we)),
172
+ qe(3, en),
173
+ qe(4, ja),
174
+ qe(5, w(q))
175
+ ], Oe);
176
+ var Bn = Object.defineProperty, Un = Object.getOwnPropertyDescriptor, Hn = (a, t, e, r) => {
177
+ for (var o = r > 1 ? void 0 : r ? Un(t, e) : t, n = a.length - 1, i; n >= 0; n--)
176
178
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
177
- return r && o && jn(t, e, o), o;
178
- }, er = (a, t) => (e, r) => t(e, r, a);
179
+ return r && o && Bn(t, e, o), o;
180
+ }, ar = (a, t) => (e, r) => t(e, r, a);
179
181
  let Me = class extends ue {
180
182
  constructor(t, e) {
181
183
  super();
182
- S(this, "_open$", new Za(!1));
183
- S(this, "open$", this._open$.pipe(pn()));
184
+ S(this, "_open$", new er(!1));
185
+ S(this, "open$", this._open$.pipe(_n()));
184
186
  S(this, "_activeRule");
185
- S(this, "_activeRule$", new Za(void 0));
187
+ S(this, "_activeRule$", new er(void 0));
186
188
  S(this, "activeRule$", this._activeRule$.asObservable());
187
189
  S(this, "_closeDisposable", null);
188
190
  this._univerInstanceService = t, this._sidebarService = e, this.disposeWithMe(
189
- this._univerInstanceService.getCurrentTypeOfUnit$(re.UNIVER_SHEET).pipe(fn((r) => !r)).subscribe(() => {
191
+ this._univerInstanceService.getCurrentTypeOfUnit$(re.UNIVER_SHEET).pipe(vn((r) => !r)).subscribe(() => {
190
192
  this.close();
191
193
  })
192
194
  );
@@ -209,7 +211,7 @@ let Me = class extends ue {
209
211
  this._open$.next(!1), (t = this._closeDisposable) == null || t.dispose();
210
212
  }
211
213
  setCloseDisposable(t) {
212
- this._closeDisposable = Ea(() => {
214
+ this._closeDisposable = Oa(() => {
213
215
  t.dispose(), this._closeDisposable = null;
214
216
  });
215
217
  }
@@ -217,17 +219,17 @@ let Me = class extends ue {
217
219
  this._activeRule = t, this._activeRule$.next(t);
218
220
  }
219
221
  };
220
- Me = Bn([
221
- er(0, J),
222
- er(1, Mr)
222
+ Me = Hn([
223
+ ar(0, J),
224
+ ar(1, wr)
223
225
  ], Me);
224
- const Pr = "DataValidationPanel", at = {
226
+ const jr = "DataValidationPanel", ot = {
225
227
  id: "data-validation.operation.open-validation-panel",
226
228
  type: Ie.OPERATION,
227
229
  handler(a, t) {
228
230
  if (!t)
229
231
  return !1;
230
- const { ruleId: e, isAdd: r } = t, o = a.get(Me), n = a.get(z), i = a.get(J), s = a.get(Mr), l = Wt(i);
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);
231
233
  if (!l) return !1;
232
234
  const { unitId: d, subUnitId: c } = l, u = e ? n.getRuleById(d, c, e) : void 0;
233
235
  o.open(), o.setActiveRule(u && {
@@ -237,32 +239,32 @@ const Pr = "DataValidationPanel", at = {
237
239
  });
238
240
  const f = s.open({
239
241
  header: { title: r ? "dataValidation.panel.addTitle" : "dataValidation.panel.title" },
240
- children: { label: Pr },
242
+ children: { label: jr },
241
243
  width: 312,
242
244
  onClose: () => o.close()
243
245
  });
244
246
  return o.setCloseDisposable(f), !0;
245
247
  }
246
- }, Ha = {
248
+ }, ka = {
247
249
  id: "data-validation.operation.close-validation-panel",
248
250
  type: Ie.OPERATION,
249
251
  handler(a) {
250
252
  return a.get(Me).close(), !0;
251
253
  }
252
- }, Ar = {
254
+ }, $r = {
253
255
  id: "data-validation.operation.toggle-validation-panel",
254
256
  type: Ie.OPERATION,
255
257
  handler(a) {
256
258
  const t = a.get(ee), e = a.get(Me);
257
- return e.open(), e.isOpen ? t.executeCommand(Ha.id) : t.executeCommand(at.id), !0;
259
+ return e.open(), e.isOpen ? t.executeCommand(ka.id) : t.executeCommand(ot.id), !0;
258
260
  }
259
- }, Yt = {
261
+ }, Gt = {
260
262
  type: Ie.OPERATION,
261
263
  id: "sheet.operation.show-data-validation-dropdown",
262
264
  handler(a, t) {
263
265
  if (!t)
264
266
  return !1;
265
- const e = a.get(Ne), { unitId: r, subUnitId: o, row: n, column: i } = t, s = e.activeDropdown, l = s == null ? void 0 : s.location;
267
+ const e = a.get(Oe), { unitId: r, subUnitId: o, row: n, column: i } = t, s = e.activeDropdown, l = s == null ? void 0 : s.location;
266
268
  return l && l.unitId === r && l.subUnitId === o && l.row === n && l.col === i || e.showDataValidationDropdown(
267
269
  r,
268
270
  o,
@@ -270,14 +272,14 @@ const Pr = "DataValidationPanel", at = {
270
272
  i
271
273
  ), !0;
272
274
  }
273
- }, xr = {
275
+ }, Br = {
274
276
  type: Ie.OPERATION,
275
277
  id: "sheet.operation.hide-data-validation-dropdown",
276
278
  handler(a, t) {
277
- return t ? (a.get(Ne).hideDropdown(), !0) : !1;
279
+ return t ? (a.get(Oe).hideDropdown(), !0) : !1;
278
280
  }
279
281
  };
280
- class rt {
282
+ class nt {
281
283
  constructor() {
282
284
  S(this, "_cacheMatrix", /* @__PURE__ */ new Map());
283
285
  }
@@ -285,7 +287,7 @@ class rt {
285
287
  let r = this._cacheMatrix.get(t);
286
288
  r || (r = /* @__PURE__ */ new Map(), this._cacheMatrix.set(t, r));
287
289
  let o = r.get(e);
288
- return o || (o = new ke(), r.set(e, o)), o;
290
+ return o || (o = new Ye(), r.set(e, o)), o;
289
291
  }
290
292
  ensureCache(t, e) {
291
293
  return this._ensureCache(t, e);
@@ -341,11 +343,11 @@ class rt {
341
343
  return this._ensureCache(t, e).setValue(r, o, n);
342
344
  }
343
345
  }
344
- var Un = Object.defineProperty, Hn = Object.getOwnPropertyDescriptor, Wn = (a, t, e, r) => {
345
- for (var o = r > 1 ? void 0 : r ? Hn(t, e) : t, n = a.length - 1, i; n >= 0; n--)
346
+ var Wn = Object.defineProperty, kn = Object.getOwnPropertyDescriptor, Yn = (a, t, e, r) => {
347
+ for (var o = r > 1 ? void 0 : r ? kn(t, e) : t, n = a.length - 1, i; n >= 0; n--)
346
348
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
347
- return r && o && Un(t, e, o), o;
348
- }, Qt = (a, t) => (e, r) => t(e, r, a);
349
+ return r && o && Wn(t, e, o), o;
350
+ }, Jt = (a, t) => (e, r) => t(e, r, a);
349
351
  let ce = class extends ue {
350
352
  constructor(t, e, r) {
351
353
  super();
@@ -445,28 +447,28 @@ let ce = class extends ue {
445
447
  return this._ensureRuleFormulaMap(t, e).get(r);
446
448
  }
447
449
  };
448
- ce = Wn([
449
- Qt(0, I(Er)),
450
- Qt(1, I(rt)),
451
- Qt(2, I(z))
450
+ ce = Yn([
451
+ Jt(0, w(Nr)),
452
+ Jt(1, w(nt)),
453
+ Jt(2, w(q))
452
454
  ], ce);
453
455
  function ge(a) {
454
456
  var t, e;
455
457
  return (e = (t = a == null ? void 0 : a[0]) == null ? void 0 : t[0]) == null ? void 0 : e.v;
456
458
  }
457
- var kn = Object.defineProperty, Yn = Object.getOwnPropertyDescriptor, Xn = (a, t, e, r) => {
458
- for (var o = r > 1 ? void 0 : r ? Yn(t, e) : t, n = a.length - 1, i; n >= 0; n--)
459
+ var Xn = Object.defineProperty, Gn = Object.getOwnPropertyDescriptor, qn = (a, t, e, r) => {
460
+ for (var o = r > 1 ? void 0 : r ? Gn(t, e) : t, n = a.length - 1, i; n >= 0; n--)
459
461
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
460
- return r && o && kn(t, e, o), o;
461
- }, Zt = (a, t) => (e, r) => t(e, r, a);
462
- const It = 6;
463
- let Ma = class {
462
+ return r && o && Xn(t, e, o), o;
463
+ }, ea = (a, t) => (e, r) => t(e, r, a);
464
+ const Dt = 6;
465
+ let wa = class {
464
466
  constructor(a, t, e) {
465
467
  this._commandService = a, this._formulaService = t, this._themeService = e;
466
468
  }
467
469
  _calc(a, t) {
468
470
  var d, c, u;
469
- const { vt: e, ht: r } = t || {}, o = a.endX - a.startX - It * 2, n = a.endY - a.startY, i = ((d = t == null ? void 0 : t.fs) != null ? d : 10) * 1.6;
471
+ const { vt: e, ht: r } = t || {}, o = a.endX - a.startX - Dt * 2, n = a.endY - a.startY, i = ((d = t == null ? void 0 : t.fs) != null ? d : 10) * 1.6;
470
472
  let s = 0, l = 0;
471
473
  switch (e) {
472
474
  case me.TOP:
@@ -481,13 +483,13 @@ let Ma = class {
481
483
  }
482
484
  switch (r) {
483
485
  case Be.LEFT:
484
- s = It;
486
+ s = Dt;
485
487
  break;
486
488
  case Be.RIGHT:
487
- s = It + (o - i);
489
+ s = Dt + (o - i);
488
490
  break;
489
491
  default:
490
- s = It + (o - i) / 2;
492
+ s = Dt + (o - i) / 2;
491
493
  break;
492
494
  }
493
495
  return {
@@ -504,21 +506,21 @@ let Ma = class {
504
506
  }
505
507
  async _parseFormula(a, t, e) {
506
508
  var i, s;
507
- const { formula1: r = gt, formula2: o = vt } = a, n = await this._formulaService.getRuleFormulaResult(t, e, a.uid);
509
+ const { formula1: r = St, formula2: o = Rt } = a, n = await this._formulaService.getRuleFormulaResult(t, e, a.uid);
508
510
  return {
509
511
  formula1: A(r) ? ge((i = n == null ? void 0 : n[0]) == null ? void 0 : i.result) : r,
510
512
  formula2: A(o) ? ge((s = n == null ? void 0 : n[1]) == null ? void 0 : s.result) : o
511
513
  };
512
514
  }
513
515
  drawWith(a, t) {
514
- var F, b, P, U, O;
515
- const { style: e, data: r, primaryWithCoord: o, unitId: n, subUnitId: i } = t, s = o.isMergedMainCell ? o.mergeInfo : o, l = ae(r), d = (F = r.dataValidation) == null ? void 0 : F.rule, c = (b = r.dataValidation) == null ? void 0 : b.validator;
516
+ var O, F, L, B, U;
517
+ const { style: e, data: r, primaryWithCoord: o, unitId: n, subUnitId: i } = t, s = o.isMergedMainCell ? o.mergeInfo : o, l = ae(r), d = (O = r.dataValidation) == null ? void 0 : O.rule, c = (F = r.dataValidation) == null ? void 0 : F.validator;
516
518
  if (!d || !c)
517
519
  return;
518
520
  const u = this._themeService.getCurrentTheme();
519
521
  if (!c.skipDefaultFontRender(d, l, { unitId: n, subUnitId: i }))
520
522
  return;
521
- const f = c.parseFormulaSync(d, n, i), { formula1: p } = f, m = this._calc(s, e), { a: h, d: R } = a.getTransform(), g = Ka(m.left, h), C = Ka(m.top, R), _ = nn.create().composeMatrix({
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({
522
524
  left: g,
523
525
  top: C,
524
526
  scaleX: 1,
@@ -528,16 +530,16 @@ let Ma = class {
528
530
  skewY: 0,
529
531
  flipX: !1,
530
532
  flipY: !1
531
- }), M = s.endX - s.startX, y = s.endY - s.startY;
532
- a.save(), a.beginPath(), a.rect(s.startX, s.startY, M, y), a.clip();
533
+ }), M = s.endX - s.startX, I = s.endY - s.startY;
534
+ a.save(), a.beginPath(), a.rect(s.startX, s.startY, M, I), a.clip();
533
535
  const D = _.getMatrix();
534
536
  a.transform(D[0], D[1], D[2], D[3], D[4], D[5]);
535
- const E = ((P = e == null ? void 0 : e.fs) != null ? P : 10) * 1.6, x = String(l) === String(p), T = u.hyacinth500;
536
- sn.drawWith(a, {
537
+ 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, {
537
539
  checked: x,
538
540
  width: E,
539
541
  height: E,
540
- fill: (O = (U = e == null ? void 0 : e.cl) == null ? void 0 : U.rgb) != null ? O : T
542
+ fill: (U = (B = e == null ? void 0 : e.cl) == null ? void 0 : B.rgb) != null ? U : T
541
543
  }), a.restore();
542
544
  }
543
545
  isHit(a, t) {
@@ -564,24 +566,24 @@ let Ma = class {
564
566
  }
565
567
  };
566
568
  this._commandService.executeCommand(
567
- Ta.id,
569
+ La.id,
568
570
  u
569
571
  );
570
572
  }
571
573
  };
572
- Ma = Xn([
573
- Zt(0, ee),
574
- Zt(1, I(ce)),
575
- Zt(2, I(vo))
576
- ], Ma);
577
- function Gn(a) {
574
+ wa = qn([
575
+ ea(0, ee),
576
+ ea(1, w(ce)),
577
+ ea(2, w(Ro))
578
+ ], wa);
579
+ function zn(a) {
578
580
  var l;
579
581
  const { unitId: t, subUnitId: e, value: r, onChange: o, showError: n, validResult: i } = a, s = n ? i == null ? void 0 : i.formula1 : "";
580
582
  return /* @__PURE__ */ v.jsx(Z, { error: s, children: /* @__PURE__ */ v.jsx(
581
- Ir,
583
+ yr,
582
584
  {
583
585
  value: (l = r == null ? void 0 : r.formula1) != null ? l : "",
584
- id: ba(`dataValidation-custom-formula-${t}-${e}`),
586
+ id: Na(`dataValidation-custom-formula-${t}-${e}`),
585
587
  onChange: (d) => {
586
588
  o == null || o({
587
589
  ...r,
@@ -594,18 +596,18 @@ function Gn(a) {
594
596
  }
595
597
  ) });
596
598
  }
597
- const qn = "univer-data-validation-formula", zn = "univer-data-validation-formula-and", Kn = "univer-data-validation-formula-list-item", Qn = "univer-data-validation-formula-list-item-icon", Zn = "univer-data-validation-formula-list-item-drag", Jn = "univer-data-validation-formula-list-add", ei = "univer-data-validation-formula-color-select", ti = "univer-data-validation-formula-color-select-panel", ai = "univer-data-validation-formula-color-item", de = {
598
- dataValidationFormula: qn,
599
- dataValidationFormulaAnd: zn,
600
- dataValidationFormulaListItem: Kn,
601
- dataValidationFormulaListItemIcon: Qn,
602
- dataValidationFormulaListItemDrag: Zn,
603
- dataValidationFormulaListAdd: Jn,
604
- dataValidationFormulaColorSelect: ei,
605
- dataValidationFormulaColorSelectPanel: ti,
606
- dataValidationFormulaColorItem: ai
607
- }, ri = (a) => {
608
- const { isTwoFormula: t = !1, value: e, onChange: r, showError: o, validResult: n } = a, i = $(ie), s = o ? n == null ? void 0 : n.formula1 : "", l = o ? n == null ? void 0 : n.formula2 : "";
599
+ const Kn = "univer-data-validation-formula", Qn = "univer-data-validation-formula-and", Zn = "univer-data-validation-formula-list-item", Jn = "univer-data-validation-formula-list-item-icon", ei = "univer-data-validation-formula-list-item-drag", ti = "univer-data-validation-formula-list-add", ai = "univer-data-validation-formula-color-select", ri = "univer-data-validation-formula-color-select-panel", oi = "univer-data-validation-formula-color-item", de = {
600
+ dataValidationFormula: Kn,
601
+ dataValidationFormulaAnd: Qn,
602
+ dataValidationFormulaListItem: Zn,
603
+ dataValidationFormulaListItemIcon: Jn,
604
+ dataValidationFormulaListItemDrag: ei,
605
+ dataValidationFormulaListAdd: ti,
606
+ dataValidationFormulaColorSelect: ai,
607
+ dataValidationFormulaColorSelectPanel: ri,
608
+ dataValidationFormulaColorItem: oi
609
+ }, ni = (a) => {
610
+ const { isTwoFormula: t = !1, value: e, onChange: r, showError: o, validResult: n } = a, i = j(ie), s = o ? n == null ? void 0 : n.formula1 : "", l = o ? n == null ? void 0 : n.formula2 : "";
609
611
  return t ? /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
610
612
  /* @__PURE__ */ v.jsx(Z, { error: s, children: /* @__PURE__ */ v.jsx(
611
613
  je,
@@ -656,23 +658,23 @@ var he = function() {
656
658
  }
657
659
  return a;
658
660
  }, he.apply(this, arguments);
659
- }, oi = function(a, t) {
661
+ }, ii = function(a, t) {
660
662
  var e = {};
661
663
  for (var r in a) Object.prototype.hasOwnProperty.call(a, r) && t.indexOf(r) < 0 && (e[r] = a[r]);
662
664
  if (a != null && typeof Object.getOwnPropertySymbols == "function")
663
665
  for (var o = 0, r = Object.getOwnPropertySymbols(a); o < r.length; o++)
664
666
  t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(a, r[o]) && (e[r[o]] = a[r[o]]);
665
667
  return e;
666
- }, Le = Te(function(a, t) {
667
- var e = a.icon, r = a.id, o = a.className, n = a.extend, i = oi(a, ["icon", "id", "className", "extend"]), s = "univerjs-icon univerjs-icon-".concat(r, " ").concat(o || "").trim(), l = xa("_".concat(si()));
668
- return jr(e, "".concat(r), { defIds: e.defIds, idSuffix: l.current }, he({ ref: t, className: s }, i), n);
668
+ }, 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);
669
671
  });
670
- function jr(a, t, e, r, o) {
671
- return Fe(a.tag, he(he({ key: t }, ni(a, e, o)), r), (ii(a, e).children || []).map(function(n, i) {
672
- return jr(n, "".concat(t, "-").concat(a.tag, "-").concat(i), e, void 0, o);
672
+ function Ur(a, t, e, r, o) {
673
+ 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);
673
675
  }));
674
676
  }
675
- function ni(a, t, e) {
677
+ function si(a, t, e) {
676
678
  var r = he({}, a.attrs);
677
679
  e != null && e.colorChannel1 && r.fill === "colorChannel1" && (r.fill = e.colorChannel1);
678
680
  var o = t.defIds;
@@ -681,89 +683,89 @@ function ni(a, t, e) {
681
683
  typeof s == "string" && (r[i] = s.replace(/url\(#(.*)\)/, "url(#$1".concat(t.idSuffix, ")")));
682
684
  })), r;
683
685
  }
684
- function ii(a, t) {
686
+ function li(a, t) {
685
687
  var e, r = t.defIds;
686
688
  return !r || r.length === 0 ? a : a.tag === "defs" && (!((e = a.children) === null || e === void 0) && e.length) ? he(he({}, a), { children: a.children.map(function(o) {
687
689
  return typeof o.attrs.id == "string" && r && r.indexOf(o.attrs.id) > -1 ? he(he({}, o), { attrs: he(he({}, o.attrs), { id: o.attrs.id + t.idSuffix }) }) : o;
688
690
  }) }) : a;
689
691
  }
690
- function si() {
692
+ function di() {
691
693
  return Math.random().toString(36).substring(2, 8);
692
694
  }
693
- Le.displayName = "UniverIcon";
694
- var li = { 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" } }] }, $r = Te(function(a, t) {
695
- return Fe(Le, Object.assign({}, a, {
695
+ 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) {
697
+ return Te(Fe, Object.assign({}, a, {
696
698
  id: "check-mark-single",
697
699
  ref: t,
698
- icon: li
700
+ icon: ci
699
701
  }));
700
702
  });
701
- $r.displayName = "CheckMarkSingle";
702
- var di = { 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" } }] }, Br = Te(function(a, t) {
703
- return Fe(Le, Object.assign({}, a, {
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) {
705
+ return Te(Fe, Object.assign({}, a, {
704
706
  id: "data-validation-single",
705
707
  ref: t,
706
- icon: di
708
+ icon: ui
707
709
  }));
708
710
  });
709
- Br.displayName = "DataValidationSingle";
710
- var ci = { 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" } }] }, Wa = Te(function(a, t) {
711
- return Fe(Le, Object.assign({}, a, {
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) {
713
+ return Te(Fe, Object.assign({}, a, {
712
714
  id: "delete-single",
713
715
  ref: t,
714
- icon: ci
716
+ icon: hi
715
717
  }));
716
718
  });
717
- Wa.displayName = "DeleteSingle";
718
- var ui = { 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" } }] }, Ur = Te(function(a, t) {
719
- return Fe(Le, Object.assign({}, a, {
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) {
721
+ return Te(Fe, Object.assign({}, a, {
720
722
  id: "increase-single",
721
723
  ref: t,
722
- icon: ui
724
+ icon: mi
723
725
  }));
724
726
  });
725
- Ur.displayName = "IncreaseSingle";
726
- var hi = { 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" } }] }, Hr = Te(function(a, t) {
727
- return Fe(Le, Object.assign({}, a, {
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) {
729
+ return Te(Fe, Object.assign({}, a, {
728
730
  id: "more-down-single",
729
731
  ref: t,
730
- icon: hi
732
+ icon: fi
731
733
  }));
732
734
  });
733
- Hr.displayName = "MoreDownSingle";
734
- var mi = { 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" } }] }, Wr = Te(function(a, t) {
735
- return Fe(Le, Object.assign({}, a, {
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) {
737
+ return Te(Fe, Object.assign({}, a, {
736
738
  id: "more-up-single",
737
739
  ref: t,
738
- icon: mi
740
+ icon: pi
739
741
  }));
740
742
  });
741
- Wr.displayName = "MoreUpSingle";
742
- var fi = { 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" } }] }] }, kr = Te(function(a, t) {
743
- return Fe(Le, Object.assign({}, a, {
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) {
745
+ return Te(Fe, Object.assign({}, a, {
744
746
  id: "sequence-single",
745
747
  ref: t,
746
- icon: fi
748
+ icon: gi
747
749
  }));
748
750
  });
749
- kr.displayName = "SequenceSingle";
750
- function Yr(a) {
751
+ Gr.displayName = "SequenceSingle";
752
+ function qr(a) {
751
753
  return a.filter(Boolean).join(",");
752
754
  }
753
- function Qe(a) {
755
+ function Ze(a) {
754
756
  return a.split(",").filter(Boolean);
755
757
  }
756
- function pi(a) {
758
+ function vi(a) {
757
759
  const t = ae(a);
758
760
  return t == null ? "" : t.toString();
759
761
  }
760
- const Xt = "SHEET_DATA_VALIDATION_PLUGIN", xe = "#ECECEC";
761
- var Lt = /* @__PURE__ */ ((a) => (a[a.View = 0] = "View", a[a.Edit = 1] = "Edit", a[a.ManageCollaborator = 2] = "ManageCollaborator", a[a.Print = 3] = "Print", a[a.Duplicate = 4] = "Duplicate", a[a.Comment = 5] = "Comment", a[a.Copy = 6] = "Copy", a[a.Share = 7] = "Share", a[a.Export = 8] = "Export", a[a.MoveWorksheet = 9] = "MoveWorksheet", a[a.DeleteWorksheet = 10] = "DeleteWorksheet", a[a.HideWorksheet = 11] = "HideWorksheet", a[a.RenameWorksheet = 12] = "RenameWorksheet", a[a.CreateWorksheet = 13] = "CreateWorksheet", a[a.SetWorksheetStyle = 14] = "SetWorksheetStyle", a[a.EditWorksheetCell = 15] = "EditWorksheetCell", a[a.InsertHyperlink = 16] = "InsertHyperlink", a[a.Sort = 17] = "Sort", a[a.Filter = 18] = "Filter", a[a.PivotTable = 19] = "PivotTable", a[a.FloatImg = 20] = "FloatImg", a[a.History = 21] = "History", a[a.RwHgtClWdt = 22] = "RwHgtClWdt", a[a.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", a[a.ViewFilter = 24] = "ViewFilter", a[a.MoveSheet = 25] = "MoveSheet", a[a.DeleteSheet = 26] = "DeleteSheet", a[a.HideSheet = 27] = "HideSheet", a[a.CopySheet = 28] = "CopySheet", a[a.RenameSheet = 29] = "RenameSheet", a[a.CreateSheet = 30] = "CreateSheet", a[a.SelectProtectedCells = 31] = "SelectProtectedCells", a[a.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", a[a.SetCellStyle = 33] = "SetCellStyle", a[a.SetCellValue = 34] = "SetCellValue", a[a.SetRowStyle = 35] = "SetRowStyle", a[a.SetColumnStyle = 36] = "SetColumnStyle", a[a.InsertRow = 37] = "InsertRow", a[a.InsertColumn = 38] = "InsertColumn", a[a.DeleteRow = 39] = "DeleteRow", a[a.DeleteColumn = 40] = "DeleteColumn", a[a.EditExtraObject = 41] = "EditExtraObject", a[a.Delete = 42] = "Delete", a[a.RecoverHistory = 43] = "RecoverHistory", a[a.ViewHistory = 44] = "ViewHistory", a[a.UNRECOGNIZED = -1] = "UNRECOGNIZED", a))(Lt || {}), gi = Object.defineProperty, vi = Object.getOwnPropertyDescriptor, _i = (a, t, e, r) => {
762
- for (var o = r > 1 ? void 0 : r ? vi(t, e) : t, n = a.length - 1, i; n >= 0; n--)
762
+ const qt = "SHEET_DATA_VALIDATION_PLUGIN", xe = "#ECECEC";
763
+ var At = /* @__PURE__ */ ((a) => (a[a.View = 0] = "View", a[a.Edit = 1] = "Edit", a[a.ManageCollaborator = 2] = "ManageCollaborator", a[a.Print = 3] = "Print", a[a.Duplicate = 4] = "Duplicate", a[a.Comment = 5] = "Comment", a[a.Copy = 6] = "Copy", a[a.Share = 7] = "Share", a[a.Export = 8] = "Export", a[a.MoveWorksheet = 9] = "MoveWorksheet", a[a.DeleteWorksheet = 10] = "DeleteWorksheet", a[a.HideWorksheet = 11] = "HideWorksheet", a[a.RenameWorksheet = 12] = "RenameWorksheet", a[a.CreateWorksheet = 13] = "CreateWorksheet", a[a.SetWorksheetStyle = 14] = "SetWorksheetStyle", a[a.EditWorksheetCell = 15] = "EditWorksheetCell", a[a.InsertHyperlink = 16] = "InsertHyperlink", a[a.Sort = 17] = "Sort", a[a.Filter = 18] = "Filter", a[a.PivotTable = 19] = "PivotTable", a[a.FloatImg = 20] = "FloatImg", a[a.History = 21] = "History", a[a.RwHgtClWdt = 22] = "RwHgtClWdt", a[a.ViemRwHgtClWdt = 23] = "ViemRwHgtClWdt", a[a.ViewFilter = 24] = "ViewFilter", a[a.MoveSheet = 25] = "MoveSheet", a[a.DeleteSheet = 26] = "DeleteSheet", a[a.HideSheet = 27] = "HideSheet", a[a.CopySheet = 28] = "CopySheet", a[a.RenameSheet = 29] = "RenameSheet", a[a.CreateSheet = 30] = "CreateSheet", a[a.SelectProtectedCells = 31] = "SelectProtectedCells", a[a.SelectUnProtectedCells = 32] = "SelectUnProtectedCells", a[a.SetCellStyle = 33] = "SetCellStyle", a[a.SetCellValue = 34] = "SetCellValue", a[a.SetRowStyle = 35] = "SetRowStyle", a[a.SetColumnStyle = 36] = "SetColumnStyle", a[a.InsertRow = 37] = "InsertRow", a[a.InsertColumn = 38] = "InsertColumn", a[a.DeleteRow = 39] = "DeleteRow", a[a.DeleteColumn = 40] = "DeleteColumn", a[a.EditExtraObject = 41] = "EditExtraObject", a[a.Delete = 42] = "Delete", a[a.RecoverHistory = 43] = "RecoverHistory", a[a.ViewHistory = 44] = "ViewHistory", a[a.UNRECOGNIZED = -1] = "UNRECOGNIZED", a))(At || {}), _i = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, Ri = (a, t, e, r) => {
764
+ for (var o = r > 1 ? void 0 : r ? Si(t, e) : t, n = a.length - 1, i; n >= 0; n--)
763
765
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
764
- return r && o && gi(t, e, o), o;
765
- }, Jt = (a, t) => (e, r) => t(e, r, a);
766
- let Je = class extends ue {
766
+ return r && o && _i(t, e, o), o;
767
+ }, ta = (a, t) => (e, r) => t(e, r, a);
768
+ let tt = class extends ue {
767
769
  constructor(a, t, e) {
768
770
  super(), this._univerInstanceService = a, this._permissionService = t, this._lexerTreeBuilder = e;
769
771
  }
@@ -776,14 +778,14 @@ let Je = class extends ue {
776
778
  const n = t[o];
777
779
  if (typeof n == "string")
778
780
  continue;
779
- const { token: i } = n, s = br(i), l = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET);
781
+ const { token: i } = n, s = Tr(i), l = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET);
780
782
  let d = l.getActiveSheet();
781
783
  const c = l.getUnitId();
782
784
  if (s.sheetName) {
783
785
  if (d = l.getSheetBySheetName(s.sheetName), !d)
784
786
  return !1;
785
787
  const h = d == null ? void 0 : d.getSheetId();
786
- if (!this._permissionService.getPermissionPoint(new Po(c, h).id)) return !1;
788
+ if (!this._permissionService.getPermissionPoint(new jo(c, h).id)) return !1;
787
789
  }
788
790
  if (!d)
789
791
  return !1;
@@ -791,20 +793,20 @@ let Je = class extends ue {
791
793
  for (let h = u; h <= f; h++)
792
794
  for (let R = p; R <= m; R++) {
793
795
  const g = (r = (e = d.getCell(h, R)) == null ? void 0 : e.selectionProtection) == null ? void 0 : r[0];
794
- if ((g == null ? void 0 : g[Lt.View]) === !1)
796
+ if ((g == null ? void 0 : g[At.View]) === !1)
795
797
  return !1;
796
798
  }
797
799
  }
798
800
  return !0;
799
801
  }
800
802
  };
801
- Je = _i([
802
- ve(_e.Rendered, Je),
803
- Jt(0, J),
804
- Jt(1, _o),
805
- Jt(2, I(Ba))
806
- ], Je);
807
- const Si = [
803
+ tt = Ri([
804
+ ve(_e.Rendered, tt),
805
+ ta(0, J),
806
+ ta(1, Co),
807
+ ta(2, w(Ha))
808
+ ], tt);
809
+ const Ci = [
808
810
  "#FFFFFF",
809
811
  "#FEE7E7",
810
812
  "#FEF0E6",
@@ -829,10 +831,10 @@ const Si = [
829
831
  "#3A60F7",
830
832
  "#9E6DE3",
831
833
  "#F248A6"
832
- ], Ri = (a) => {
834
+ ], Vi = (a) => {
833
835
  const { value: t, onChange: e, disabled: r } = a, [o, n] = te(!1);
834
836
  return /* @__PURE__ */ v.jsx(
835
- Va,
837
+ Ia,
836
838
  {
837
839
  disabled: r,
838
840
  open: o,
@@ -848,7 +850,7 @@ const Si = [
848
850
  style: { background: i.value, marginTop: 5 }
849
851
  }
850
852
  ),
851
- dropdownRender: () => /* @__PURE__ */ v.jsx("div", { className: de.dataValidationFormulaColorSelectPanel, children: Si.map(
853
+ dropdownRender: () => /* @__PURE__ */ v.jsx("div", { className: de.dataValidationFormulaColorSelectPanel, children: Ci.map(
852
854
  (i) => /* @__PURE__ */ v.jsx(
853
855
  "div",
854
856
  {
@@ -863,12 +865,12 @@ const Si = [
863
865
  ) })
864
866
  }
865
867
  );
866
- }, tr = (a) => {
868
+ }, rr = (a) => {
867
869
  const { item: t, commonProps: e, style: r } = a, { onItemChange: o, onItemDelete: n } = e;
868
870
  return /* @__PURE__ */ v.jsxs("div", { className: de.dataValidationFormulaListItem, style: r, children: [
869
- t.isRef ? null : /* @__PURE__ */ v.jsx("div", { className: Vn(de.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ v.jsx(kr, {}) }),
871
+ t.isRef ? null : /* @__PURE__ */ v.jsx("div", { className: In(de.dataValidationFormulaListItemDrag, "draggableHandle"), children: /* @__PURE__ */ v.jsx(Gr, {}) }),
870
872
  /* @__PURE__ */ v.jsx(
871
- Ri,
873
+ Vi,
872
874
  {
873
875
  value: t.color,
874
876
  onChange: (i) => {
@@ -886,109 +888,109 @@ const Si = [
886
888
  }
887
889
  }
888
890
  ),
889
- t.isRef ? null : /* @__PURE__ */ v.jsx("div", { className: de.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ v.jsx(Wa, { onClick: () => n(t.id) }) })
891
+ t.isRef ? null : /* @__PURE__ */ v.jsx("div", { className: de.dataValidationFormulaListItemIcon, children: /* @__PURE__ */ v.jsx(Ya, { onClick: () => n(t.id) }) })
890
892
  ] });
891
893
  };
892
- function Ci(a) {
894
+ function Mi(a) {
893
895
  const { value: t, onChange: e = () => {
894
- }, unitId: r, subUnitId: o, validResult: n, showError: i, ruleId: s } = a, { formula1: l = "", formula2: d = "" } = t || {}, c = xa(null), [u, f] = te(() => A(l) ? "1" : "0"), [p, m] = te(u === "1" ? l : "="), [h, R] = te(u === "1" ? l : "="), g = $(ie), C = $(we), _ = $(z), M = $(Je), [y, D] = te(() => d.split(",")), E = C.getValidatorItem(B.LIST), [x, T] = te([]), [F, b] = te(""), P = i ? n == null ? void 0 : n.formula1 : "", U = Xe(_.ruleChange$), O = wr(e);
895
- Ze(() => {
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);
897
+ et(() => {
896
898
  (async () => {
897
- await new Promise((q) => {
898
- setTimeout(() => q(!0), 100);
899
+ await new Promise((Y) => {
900
+ setTimeout(() => Y(!0), 100);
899
901
  });
900
- const N = _.getRuleById(r, o, s), X = N == null ? void 0 : N.formula1;
901
- if (A(X) && E && N) {
902
- const q = await E.getListAsync(N, r, o);
903
- T(q);
902
+ const N = _.getRuleById(r, o, s), K = N == null ? void 0 : N.formula1;
903
+ if (A(K) && E && N) {
904
+ const Y = await E.getListAsync(N, r, o);
905
+ T(Y);
904
906
  }
905
907
  })();
906
- }, [_, U, E, s, o, r]), Ze(() => {
908
+ }, [_, U, E, s, o, r]), et(() => {
907
909
  A(l) && l !== h && (m(l), R(h));
908
910
  }, [h, l]);
909
- const [L, H] = te(() => {
910
- const N = u !== "1" ? Qe(l) : [], X = d.split(",");
911
- return N.map((q, ne) => ({
912
- label: q,
913
- color: X[ne] || xe,
911
+ const [$, z] = te(() => {
912
+ const N = u !== "1" ? Ze(l) : [], K = d.split(",");
913
+ return N.map((Y, ne) => ({
914
+ label: Y,
915
+ color: K[ne] || xe,
914
916
  isRef: !1,
915
- id: Y.generateRandomId(4)
917
+ id: X.generateRandomId(4)
916
918
  }));
917
- }), K = (N, X, q) => {
918
- const ne = L.find((ye) => ye.id === N);
919
- ne && (ne.label = X, ne.color = q, H([...L]));
920
- }, k = (N) => {
921
- const X = L.findIndex((q) => q.id === N);
922
- X !== -1 && (L.splice(X, 1), H([...L]));
923
- }, w = d.split(","), j = Ft(() => x.map((N, X) => ({
919
+ }), k = (N, K, Y) => {
920
+ const ne = $.find((it) => it.id === N);
921
+ ne && (ne.label = K, ne.color = Y, z([...$]));
922
+ }, y = (N) => {
923
+ const K = $.findIndex((Y) => Y.id === N);
924
+ K !== -1 && ($.splice(K, 1), z([...$]));
925
+ }, P = d.split(","), oe = Je(() => x.map((N, K) => ({
924
926
  label: N,
925
- color: w[X] || xe,
926
- id: `${X}`,
927
+ color: P[K] || xe,
928
+ id: `${K}`,
927
929
  isRef: !0
928
- })), [w, x]), oe = (N, X, q) => {
929
- const ne = [...y];
930
- ne[+N] = q, D(ne), O({
930
+ })), [P, x]), G = (N, K, Y) => {
931
+ const ne = [...I];
932
+ ne[+N] = Y, D(ne), b({
931
933
  formula1: l,
932
934
  formula2: ne.join(",")
933
935
  });
934
- }, G = () => {
935
- H([
936
- ...L,
936
+ }, Se = () => {
937
+ z([
938
+ ...$,
937
939
  {
938
940
  label: "",
939
941
  color: xe,
940
942
  isRef: !1,
941
- id: Y.generateRandomId(4)
943
+ id: X.generateRandomId(4)
942
944
  }
943
945
  ]);
944
946
  };
945
- Ze(() => {
947
+ et(() => {
946
948
  if (u === "1")
947
949
  return;
948
- const N = /* @__PURE__ */ new Set(), X = [];
949
- L.map((q) => ({
950
- labelList: q.label.split(","),
951
- item: q
952
- })).forEach(({ item: q, labelList: ne }) => {
953
- ne.forEach((ye) => {
954
- N.has(ye) || (N.add(ye), X.push({
955
- label: ye,
956
- color: q.color
950
+ const N = /* @__PURE__ */ new Set(), K = [];
951
+ $.map((Y) => ({
952
+ labelList: Y.label.split(","),
953
+ item: Y
954
+ })).forEach(({ item: Y, labelList: ne }) => {
955
+ ne.forEach((it) => {
956
+ N.has(it) || (N.add(it), K.push({
957
+ label: it,
958
+ color: Y.color
957
959
  }));
958
960
  });
959
- }), O({
960
- formula1: Yr(X.map((q) => q.label)),
961
- formula2: X.map((q) => q.color === xe ? "" : q.color).join(",")
961
+ }), b({
962
+ formula1: qr(K.map((Y) => Y.label)),
963
+ formula2: K.map((Y) => Y.color === xe ? "" : Y.color).join(",")
962
964
  });
963
- }, [L, O, u, h, y]);
964
- const Se = Ft(
965
+ }, [$, b, u, h, I]);
966
+ const Le = Je(
965
967
  () => async (N) => {
966
968
  if (!A(N)) {
967
- O == null || O({
969
+ b == null || b({
968
970
  formula1: "",
969
971
  formula2: d
970
972
  });
971
973
  return;
972
974
  }
973
- M.getFormulaRefCheck(N) ? (O == null || O({
975
+ M.getFormulaRefCheck(N) ? (b == null || b({
974
976
  formula1: A(N) ? N : "",
975
977
  formula2: d
976
- }), b("")) : (O == null || O({
978
+ }), F("")) : (b == null || b({
977
979
  formula1: "",
978
980
  formula2: d
979
- }), m("="), b(g.t("dataValidation.validFail.formulaError")));
981
+ }), m("="), F(g.t("dataValidation.validFail.formulaError")));
980
982
  },
981
- [d, O]
983
+ [d, b]
982
984
  );
983
985
  return /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
984
986
  /* @__PURE__ */ v.jsx(Z, { label: g.t("dataValidation.list.options"), children: /* @__PURE__ */ v.jsxs(
985
- ja,
987
+ Ba,
986
988
  {
987
989
  value: u,
988
990
  onChange: (N) => {
989
- f(N), m(h), N === "1" && O({
991
+ f(N), m(h), N === "1" && b({
990
992
  formula1: h === "=" ? "" : h,
991
- formula2: y.join(",")
993
+ formula2: I.join(",")
992
994
  });
993
995
  },
994
996
  children: [
@@ -998,37 +1000,37 @@ function Ci(a) {
998
1000
  }
999
1001
  ) }),
1000
1002
  u === "1" ? /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
1001
- /* @__PURE__ */ v.jsx(Z, { error: P || F, children: /* @__PURE__ */ v.jsx(
1002
- Ir,
1003
+ /* @__PURE__ */ v.jsx(Z, { error: L || O, children: /* @__PURE__ */ v.jsx(
1004
+ yr,
1003
1005
  {
1004
- id: ba(`list-ref-range-${r}-${o}`),
1006
+ id: Na(`list-ref-range-${r}-${o}`),
1005
1007
  value: p,
1006
1008
  openForSheetUnitId: r,
1007
1009
  openForSheetSubUnitId: o,
1008
1010
  onlyInputFormula: !0,
1009
1011
  onChange: async (N) => {
1010
- const X = N != null ? N : "";
1011
- R(X), Se(X);
1012
+ const K = N != null ? N : "";
1013
+ R(K), Le(K);
1012
1014
  }
1013
1015
  }
1014
1016
  ) }),
1015
- /* @__PURE__ */ v.jsx(Z, { children: /* @__PURE__ */ v.jsx("div", { ref: c, children: j.map((N) => /* @__PURE__ */ v.jsx(tr, { item: N, commonProps: { onItemChange: oe }, style: { marginBottom: 12 } }, N.id)) }) })
1016
- ] }) : /* @__PURE__ */ v.jsx(Z, { error: P, children: /* @__PURE__ */ v.jsxs("div", { ref: c, style: { marginTop: "-12px" }, children: [
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)) }) })
1018
+ ] }) : /* @__PURE__ */ v.jsx(Z, { error: L, children: /* @__PURE__ */ v.jsxs("div", { ref: c, style: { marginTop: "-12px" }, children: [
1017
1019
  /* @__PURE__ */ v.jsx(
1018
- _n,
1020
+ Rn,
1019
1021
  {
1020
- list: L,
1021
- onListChange: H,
1022
+ list: $,
1023
+ onListChange: z,
1022
1024
  rowHeight: 32,
1023
1025
  margin: [0, 12],
1024
1026
  draggableHandle: ".draggableHandle",
1025
1027
  itemRender: (N) => /* @__PURE__ */ v.jsx(
1026
- tr,
1028
+ rr,
1027
1029
  {
1028
1030
  item: N,
1029
1031
  commonProps: {
1030
- onItemChange: K,
1031
- onItemDelete: k
1032
+ onItemChange: k,
1033
+ onItemDelete: y
1032
1034
  }
1033
1035
  },
1034
1036
  N.id
@@ -1036,18 +1038,18 @@ function Ci(a) {
1036
1038
  idKey: "id"
1037
1039
  }
1038
1040
  ),
1039
- /* @__PURE__ */ v.jsxs("a", { className: de.dataValidationFormulaListAdd, onClick: G, children: [
1040
- /* @__PURE__ */ v.jsx(Ur, {}),
1041
+ /* @__PURE__ */ v.jsxs("a", { className: de.dataValidationFormulaListAdd, onClick: Se, children: [
1042
+ /* @__PURE__ */ v.jsx(kr, {}),
1041
1043
  g.t("dataValidation.list.add")
1042
1044
  ] })
1043
1045
  ] }) })
1044
1046
  ] });
1045
1047
  }
1046
- function Vi(a) {
1047
- const { value: t, onChange: e, showError: r, validResult: o } = a, n = $(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));
1048
+ function Ii(a) {
1049
+ 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));
1048
1050
  return /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
1049
1051
  /* @__PURE__ */ v.jsx(Z, { children: /* @__PURE__ */ v.jsx(
1050
- $a,
1052
+ Ua,
1051
1053
  {
1052
1054
  checked: l,
1053
1055
  onChange: (c) => {
@@ -1090,36 +1092,36 @@ function Vi(a) {
1090
1092
  ) }) : null
1091
1093
  ] });
1092
1094
  }
1093
- const Xr = "data-validation.custom-formula-input", Rt = "data-validation.formula-input", Gr = "data-validation.list-formula-input", qr = "data-validation.checkbox-formula-input", Mi = [
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 = [
1094
1096
  [
1095
- Xr,
1096
- Gn
1097
+ zr,
1098
+ zn
1097
1099
  ],
1098
1100
  [
1099
- Rt,
1100
- ri
1101
+ Mt,
1102
+ ni
1101
1103
  ],
1102
1104
  [
1103
- Gr,
1104
- Ci
1105
+ Kr,
1106
+ Mi
1105
1107
  ],
1106
1108
  [
1107
- qr,
1108
- Vi
1109
+ Qr,
1110
+ Ii
1109
1111
  ]
1110
- ], gt = 1, vt = 0;
1111
- function ar(a, t) {
1112
- return Y.isBlank(a) ? t.t("dataValidation.validFail.value") : A(a) ? t.t("dataValidation.validFail.primitive") : "";
1112
+ ], St = 1, Rt = 0;
1113
+ function or(a, t) {
1114
+ return X.isBlank(a) ? t.t("dataValidation.validFail.value") : A(a) ? t.t("dataValidation.validFail.primitive") : "";
1113
1115
  }
1114
- class Ii extends Ye {
1116
+ class yi extends Xe {
1115
1117
  constructor() {
1116
1118
  super(...arguments);
1117
- S(this, "id", B.CHECKBOX);
1119
+ S(this, "id", H.CHECKBOX);
1118
1120
  S(this, "title", "dataValidation.checkbox.title");
1119
1121
  S(this, "operators", []);
1120
1122
  S(this, "scopes", ["sheet"]);
1121
- S(this, "formulaInput", qr);
1122
- S(this, "canvasRender", this.injector.createInstance(Ma));
1123
+ S(this, "formulaInput", Qr);
1124
+ S(this, "canvasRender", this.injector.createInstance(wa));
1123
1125
  S(this, "_formulaService", this.injector.get(ce));
1124
1126
  }
1125
1127
  skipDefaultFontRender(e, r, o) {
@@ -1128,7 +1130,7 @@ class Ii extends Ye {
1128
1130
  }
1129
1131
  validatorFormula(e, r, o) {
1130
1132
  const { formula1: n, formula2: i } = e, s = n === i;
1131
- if (Y.isBlank(n) && Y.isBlank(i))
1133
+ if (X.isBlank(n) && X.isBlank(i))
1132
1134
  return {
1133
1135
  success: !0
1134
1136
  };
@@ -1138,7 +1140,7 @@ class Ii extends Ye {
1138
1140
  formula1: this.localeService.t("dataValidation.validFail.checkboxEqual"),
1139
1141
  formula2: this.localeService.t("dataValidation.validFail.checkboxEqual")
1140
1142
  };
1141
- const l = ar(n, this.localeService), d = ar(i, this.localeService);
1143
+ const l = or(n, this.localeService), d = or(i, this.localeService);
1142
1144
  return {
1143
1145
  success: !l && !d,
1144
1146
  formula1: l,
@@ -1147,7 +1149,7 @@ class Ii extends Ye {
1147
1149
  }
1148
1150
  async parseFormula(e, r, o) {
1149
1151
  var l, d;
1150
- const { formula1: n = gt, formula2: i = vt } = e, s = await this._formulaService.getRuleFormulaResult(r, o, e.uid);
1152
+ const { formula1: n = St, formula2: i = Rt } = e, s = await this._formulaService.getRuleFormulaResult(r, o, e.uid);
1151
1153
  return {
1152
1154
  formula1: A(n) ? ge((l = s == null ? void 0 : s[0]) == null ? void 0 : l.result) : n,
1153
1155
  formula2: A(i) ? ge((d = s == null ? void 0 : s[1]) == null ? void 0 : d.result) : i
@@ -1155,7 +1157,7 @@ class Ii extends Ye {
1155
1157
  }
1156
1158
  parseFormulaSync(e, r, o) {
1157
1159
  var l, d;
1158
- const { formula1: n = gt, formula2: i = vt } = e, s = this._formulaService.getRuleFormulaResultSync(r, o, e.uid);
1160
+ const { formula1: n = St, formula2: i = Rt } = e, s = this._formulaService.getRuleFormulaResultSync(r, o, e.uid);
1159
1161
  return {
1160
1162
  formula1: A(n) ? ge((l = s == null ? void 0 : s[0]) == null ? void 0 : l.result) : n,
1161
1163
  formula2: A(i) ? ge((d = s == null ? void 0 : s[1]) == null ? void 0 : d.result) : i
@@ -1163,30 +1165,30 @@ class Ii extends Ye {
1163
1165
  }
1164
1166
  async isValidType(e, r, o) {
1165
1167
  const { value: n, unitId: i, subUnitId: s } = e, { formula1: l, formula2: d } = await this.parseFormula(o, i, s);
1166
- return !Y.isDefine(l) || !Y.isDefine(d) ? !0 : Y.isDefine(n) && (String(n) === String(l) || String(n) === String(d));
1168
+ return !X.isDefine(l) || !X.isDefine(d) ? !0 : X.isDefine(n) && (String(n) === String(l) || String(n) === String(d));
1167
1169
  }
1168
1170
  generateRuleErrorMessage(e) {
1169
1171
  return this.localeService.t("dataValidation.checkbox.error");
1170
1172
  }
1171
1173
  }
1172
- const Gt = [
1174
+ const zt = [
1173
1175
  V.BETWEEN,
1174
1176
  V.NOT_BETWEEN
1175
1177
  ];
1176
- function wi(a) {
1178
+ function Di(a) {
1177
1179
  return new Date((a - 25569) * 86400).getTime();
1178
1180
  }
1179
- const zr = (a) => a / 86400 + 25569, yi = "univer-data-validation-options-button", Di = "univer-data-validation-options-button-icon", ea = {
1180
- dataValidationOptionsButton: yi,
1181
- dataValidationOptionsButtonIcon: Di
1181
+ const Zr = (a) => a / 86400 + 25569, Ei = "univer-data-validation-options-button", bi = "univer-data-validation-options-button-icon", aa = {
1182
+ dataValidationOptionsButton: Ei,
1183
+ dataValidationOptionsButtonIcon: bi
1182
1184
  };
1183
- function Ei(a) {
1185
+ function Oi(a) {
1184
1186
  var d;
1185
- const t = $(ie), e = $(St), { value: r, onChange: o, extraComponent: n } = a, [i, s] = te(!1), l = n ? e.get(n) : null;
1187
+ const t = j(ie), e = j(Vt), { value: r, onChange: o, extraComponent: n } = a, [i, s] = te(!1), l = n ? e.get(n) : null;
1186
1188
  return /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
1187
- /* @__PURE__ */ v.jsxs("div", { className: ea.dataValidationOptionsButton, onClick: () => s(!i), children: [
1189
+ /* @__PURE__ */ v.jsxs("div", { className: aa.dataValidationOptionsButton, onClick: () => s(!i), children: [
1188
1190
  t.t("dataValidation.panel.options"),
1189
- i ? /* @__PURE__ */ v.jsx(Wr, { className: ea.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ v.jsx(Hr, { className: ea.dataValidationOptionsButtonIcon })
1191
+ i ? /* @__PURE__ */ v.jsx(Xr, { className: aa.dataValidationOptionsButtonIcon }) : /* @__PURE__ */ v.jsx(Yr, { className: aa.dataValidationOptionsButtonIcon })
1190
1192
  ] }),
1191
1193
  i && /* @__PURE__ */ v.jsxs(v.Fragment, { children: [
1192
1194
  l ? /* @__PURE__ */ v.jsx(l, { value: r, onChange: o }) : null,
@@ -1195,13 +1197,13 @@ function Ei(a) {
1195
1197
  {
1196
1198
  label: t.t("dataValidation.panel.invalid"),
1197
1199
  children: /* @__PURE__ */ v.jsxs(
1198
- ja,
1200
+ Ba,
1199
1201
  {
1200
- value: `${(d = r.errorStyle) != null ? d : st.WARNING}`,
1202
+ value: `${(d = r.errorStyle) != null ? d : ct.WARNING}`,
1201
1203
  onChange: (c) => o({ ...r, errorStyle: +c }),
1202
1204
  children: [
1203
- /* @__PURE__ */ v.jsx($e, { value: `${st.WARNING}`, children: t.t("dataValidation.panel.showWarning") }),
1204
- /* @__PURE__ */ v.jsx($e, { value: `${st.STOP}`, children: t.t("dataValidation.panel.rejectInput") })
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") })
1205
1207
  ]
1206
1208
  }
1207
1209
  )
@@ -1212,7 +1214,7 @@ function Ei(a) {
1212
1214
  {
1213
1215
  label: t.t("dataValidation.panel.messageInfo"),
1214
1216
  children: /* @__PURE__ */ v.jsx(
1215
- $a,
1217
+ Ua,
1216
1218
  {
1217
1219
  checked: r.showInputMessage,
1218
1220
  onChange: () => o({
@@ -1228,167 +1230,167 @@ function Ei(a) {
1228
1230
  ] })
1229
1231
  ] });
1230
1232
  }
1231
- const bi = "univer-data-validation-detail-form-item", Oi = "univer-data-validation-detail-buttons", Ni = "univer-data-validation-detail-button", qe = {
1232
- dataValidationDetailFormItem: bi,
1233
- dataValidationDetailButtons: Oi,
1234
- dataValidationDetailButton: Ni
1235
- }, Ti = (a) => Mo(
1233
+ const Ni = "univer-data-validation-detail-form-item", Ti = "univer-data-validation-detail-buttons", Fi = "univer-data-validation-detail-button", ze = {
1234
+ dataValidationDetailFormItem: Ni,
1235
+ dataValidationDetailButtons: Ti,
1236
+ dataValidationDetailButton: Fi
1237
+ }, Li = (a) => yo(
1236
1238
  async (t, e, r, o) => {
1237
1239
  const n = await a.executeCommand(t, e, r);
1238
1240
  o == null || o(n);
1239
1241
  },
1240
1242
  275
1241
1243
  );
1242
- function Fi() {
1243
- const [a, t] = te(0), e = $(Me), r = Xe(e.activeRule$, e.activeRule), { unitId: o, subUnitId: n, rule: i } = r || {}, s = i.uid, l = $(we), d = $(St), c = $(ee), u = $(z), f = $(ie), [p, m] = te(i), h = l.getValidatorItem(p.type), [R, g] = te(!1), C = l.getValidatorsByScope(Eo.SHEET), [_, M] = te(() => p.ranges.map((w) => ({ unitId: "", sheetId: "", range: w }))), y = Ft(() => Ti(c), [c]);
1244
- if (Ze(() => {
1245
- c.onCommandExecuted((w) => {
1246
- (w.id === So.id || w.id === Ro.id) && setTimeout(() => {
1247
- const j = u.getRuleById(o, n, s);
1248
- t((oe) => oe + 1), j && (m(j), M(j.ranges.map((oe) => ({ unitId: "", sheetId: "", range: oe }))));
1244
+ 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]);
1246
+ if (et(() => {
1247
+ c.onCommandExecuted((y) => {
1248
+ (y.id === Vo.id || y.id === Mo.id) && setTimeout(() => {
1249
+ const P = u.getRuleById(o, n, s);
1250
+ t((oe) => oe + 1), P && (m(P), M(P.ranges.map((oe) => ({ unitId: "", sheetId: "", range: oe }))));
1249
1251
  }, 20);
1250
1252
  });
1251
1253
  }, [c, u, s, n, o]), !h)
1252
1254
  return null;
1253
- const D = h.operators, E = h.operatorNames, x = p.operator ? bo.includes(p.operator) : !1, T = () => {
1255
+ const D = h.operators, E = h.operatorNames, x = p.operator ? To.includes(p.operator) : !1, T = () => {
1254
1256
  h.validatorFormula(p, o, n).success ? e.setActiveRule(null) : g(!0);
1255
- }, F = wr((w) => {
1256
- if (Co(w, _))
1257
+ }, O = Dr((y) => {
1258
+ if (Io(y, _))
1257
1259
  return;
1258
- M(w);
1259
- const j = w.filter((G) => (!G.unitId || G.unitId === o) && (!G.sheetId || G.sheetId === n)).map((G) => G.range);
1260
+ M(y);
1261
+ const P = y.filter((G) => (!G.unitId || G.unitId === o) && (!G.sheetId || G.sheetId === n)).map((G) => G.range);
1260
1262
  if (m({
1261
1263
  ...p,
1262
- ranges: j
1263
- }), j.length === 0)
1264
+ ranges: P
1265
+ }), P.length === 0)
1264
1266
  return;
1265
1267
  const oe = {
1266
1268
  unitId: o,
1267
1269
  subUnitId: n,
1268
1270
  ruleId: s,
1269
- ranges: j
1271
+ ranges: P
1270
1272
  };
1271
- y(qt.id, oe);
1272
- }), b = (w) => {
1273
- if (Ga(w, fa(p)))
1273
+ I(Kt.id, oe);
1274
+ }), F = (y) => {
1275
+ if (za(y, ga(p)))
1274
1276
  return;
1275
1277
  m({
1276
1278
  ...p,
1277
- ...w
1279
+ ...y
1278
1280
  });
1279
- const j = {
1281
+ const P = {
1280
1282
  unitId: o,
1281
1283
  subUnitId: n,
1282
1284
  ruleId: s,
1283
- setting: w
1285
+ setting: y
1284
1286
  };
1285
- y(
1286
- wa.id,
1287
- j,
1287
+ I(
1288
+ Da.id,
1289
+ P,
1288
1290
  void 0
1289
1291
  );
1290
- }, P = async () => {
1291
- await c.executeCommand(pr.id, {
1292
+ }, L = async () => {
1293
+ await c.executeCommand(vr.id, {
1292
1294
  ruleId: s,
1293
1295
  unitId: o,
1294
1296
  subUnitId: n
1295
1297
  }), e.setActiveRule(null);
1296
- }, U = {
1298
+ }, B = {
1297
1299
  type: p.type,
1298
1300
  operator: p.operator,
1299
1301
  formula1: p.formula1,
1300
1302
  formula2: p.formula2,
1301
1303
  allowBlank: p.allowBlank
1302
- }, O = (w) => {
1303
- const j = l.getValidatorItem(w);
1304
- if (!j)
1304
+ }, U = (y) => {
1305
+ const P = l.getValidatorItem(y);
1306
+ if (!P)
1305
1307
  return;
1306
- const oe = j.operators, G = u.getRuleById(o, n, s), Se = w === (G == null ? void 0 : G.type) || w.includes("list") && (G != null && G.type.includes("list")) ? {
1308
+ const oe = P.operators, G = u.getRuleById(o, n, s), Se = y === (G == null ? void 0 : G.type) || y.includes("list") && (G != null && G.type.includes("list")) ? {
1307
1309
  ...G,
1308
- type: w
1310
+ type: y
1309
1311
  } : {
1310
1312
  ...p,
1311
- type: w,
1313
+ type: y,
1312
1314
  operator: oe[0],
1313
1315
  formula1: void 0,
1314
1316
  formula2: void 0
1315
1317
  };
1316
- m(Se), c.executeCommand(wa.id, {
1318
+ m(Se), c.executeCommand(Da.id, {
1317
1319
  unitId: o,
1318
1320
  subUnitId: n,
1319
1321
  ruleId: p.uid,
1320
- setting: fa(Se)
1322
+ setting: ga(Se)
1321
1323
  });
1322
- }, L = d.get(h.formulaInput), H = Ft(() => _.map((w) => Or(w.range)).join(","), []), K = ma(p), k = (w) => {
1323
- Ga(w, ma(p)) || (m({
1324
+ }, b = d.get(h.formulaInput), $ = Je(() => _.map((y) => Fr(y.range)).join(","), []), z = pa(p), k = (y) => {
1325
+ za(y, pa(p)) || (m({
1324
1326
  ...p,
1325
- ...w
1326
- }), y(
1327
- ao.id,
1327
+ ...y
1328
+ }), I(
1329
+ no.id,
1328
1330
  {
1329
1331
  unitId: o,
1330
1332
  subUnitId: n,
1331
1333
  ruleId: s,
1332
- options: w
1334
+ options: y
1333
1335
  }
1334
1336
  ));
1335
1337
  };
1336
1338
  return /* @__PURE__ */ v.jsxs("div", { children: [
1337
1339
  /* @__PURE__ */ v.jsx(Z, { label: f.t("dataValidation.panel.range"), children: /* @__PURE__ */ v.jsx(
1338
- Zo,
1340
+ tn,
1339
1341
  {
1340
- className: qe.dataValidationDetailFormItem,
1341
- value: H,
1342
- id: ba("data-validation-detail"),
1342
+ className: ze.dataValidationDetailFormItem,
1343
+ value: $,
1344
+ id: Na("data-validation-detail"),
1343
1345
  openForSheetUnitId: o,
1344
1346
  openForSheetSubUnitId: n,
1345
- onChange: (w) => {
1346
- w.some((j) => !Vo(j.range) || j.range.endColumn < j.range.startColumn || j.range.endRow < j.range.startRow) || F(w);
1347
+ onChange: (y) => {
1348
+ y.some((P) => !wo(P.range) || P.range.endColumn < P.range.startColumn || P.range.endRow < P.range.startRow) || O(y);
1347
1349
  }
1348
1350
  },
1349
1351
  a
1350
1352
  ) }),
1351
1353
  /* @__PURE__ */ v.jsx(Z, { label: f.t("dataValidation.panel.type"), children: /* @__PURE__ */ v.jsx(
1352
- Va,
1354
+ Ia,
1353
1355
  {
1354
- options: C == null ? void 0 : C.map((w) => ({
1355
- label: f.t(w.title),
1356
- value: w.id
1356
+ options: C == null ? void 0 : C.map((y) => ({
1357
+ label: f.t(y.title),
1358
+ value: y.id
1357
1359
  })),
1358
1360
  value: p.type,
1359
- onChange: O,
1360
- className: qe.dataValidationDetailFormItem
1361
+ onChange: U,
1362
+ className: ze.dataValidationDetailFormItem
1361
1363
  }
1362
1364
  ) }),
1363
1365
  D != null && D.length ? /* @__PURE__ */ v.jsx(Z, { label: f.t("dataValidation.panel.operator"), children: /* @__PURE__ */ v.jsx(
1364
- Va,
1366
+ Ia,
1365
1367
  {
1366
- options: D.map((w, j) => ({
1367
- value: `${w}`,
1368
- label: E[j]
1368
+ options: D.map((y, P) => ({
1369
+ value: `${y}`,
1370
+ label: E[P]
1369
1371
  })),
1370
1372
  value: `${p.operator}`,
1371
- onChange: (w) => {
1372
- b({
1373
- ...U,
1374
- operator: w
1373
+ onChange: (y) => {
1374
+ F({
1375
+ ...B,
1376
+ operator: y
1375
1377
  });
1376
1378
  },
1377
- className: qe.dataValidationDetailFormItem
1379
+ className: ze.dataValidationDetailFormItem
1378
1380
  }
1379
1381
  ) }) : null,
1380
- L ? /* @__PURE__ */ v.jsx(
1381
- L,
1382
+ b ? /* @__PURE__ */ v.jsx(
1383
+ b,
1382
1384
  {
1383
1385
  isTwoFormula: x,
1384
1386
  value: {
1385
1387
  formula1: p.formula1,
1386
1388
  formula2: p.formula2
1387
1389
  },
1388
- onChange: (w) => {
1389
- b({
1390
- ...U,
1391
- ...w
1390
+ onChange: (y) => {
1391
+ F({
1392
+ ...B,
1393
+ ...y
1392
1394
  });
1393
1395
  },
1394
1396
  showError: R,
@@ -1399,27 +1401,27 @@ function Fi() {
1399
1401
  },
1400
1402
  a + p.type
1401
1403
  ) : null,
1402
- /* @__PURE__ */ v.jsx(Ei, { value: K, onChange: k, extraComponent: h.optionsInput }),
1403
- /* @__PURE__ */ v.jsxs("div", { className: qe.dataValidationDetailButtons, children: [
1404
- /* @__PURE__ */ v.jsx(He, { className: qe.dataValidationDetailButton, onClick: P, children: f.t("dataValidation.panel.removeRule") }),
1405
- /* @__PURE__ */ v.jsx(He, { className: qe.dataValidationDetailButton, type: "primary", onClick: T, children: f.t("dataValidation.panel.done") })
1404
+ /* @__PURE__ */ v.jsx(Oi, { value: z, onChange: k, extraComponent: h.optionsInput }),
1405
+ /* @__PURE__ */ v.jsxs("div", { className: ze.dataValidationDetailButtons, children: [
1406
+ /* @__PURE__ */ v.jsx(We, { className: ze.dataValidationDetailButton, onClick: L, children: f.t("dataValidation.panel.removeRule") }),
1407
+ /* @__PURE__ */ v.jsx(We, { className: ze.dataValidationDetailButton, type: "primary", onClick: T, children: f.t("dataValidation.panel.done") })
1406
1408
  ] })
1407
1409
  ] });
1408
1410
  }
1409
- const Li = "univer-data-validation-item-container", Pi = "univer-data-validation-item-title", Ai = "univer-data-validation-item-content", xi = "univer-data-validation-item-icon", wt = {
1410
- dataValidationItemContainer: Li,
1411
- dataValidationItemTitle: Pi,
1412
- dataValidationItemContent: Ai,
1413
- dataValidationItemIcon: xi
1414
- }, ji = (a) => {
1415
- const { rule: t, onClick: e, unitId: r, subUnitId: o, disable: n } = a, i = $(we), s = $(ee), l = $(Uo), d = i.getValidatorItem(t.type), c = xa(), [u, f] = te(!1), p = (m) => {
1416
- s.executeCommand(pr.id, {
1411
+ const Ai = "univer-data-validation-item-container", xi = "univer-data-validation-item-title", ji = "univer-data-validation-item-content", $i = "univer-data-validation-item-icon", Et = {
1412
+ dataValidationItemContainer: Ai,
1413
+ dataValidationItemTitle: xi,
1414
+ dataValidationItemContent: ji,
1415
+ dataValidationItemIcon: $i
1416
+ }, 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, {
1417
1419
  ruleId: t.uid,
1418
1420
  unitId: r,
1419
1421
  subUnitId: o
1420
1422
  }), m.stopPropagation();
1421
1423
  };
1422
- return Ze(() => () => {
1424
+ return et(() => () => {
1423
1425
  var m;
1424
1426
  c.current && ((m = c.current) == null || m.forEach((h) => {
1425
1427
  h && l.removeShape(h);
@@ -1427,7 +1429,7 @@ const Li = "univer-data-validation-item-container", Pi = "univer-data-validation
1427
1429
  }, [l]), /* @__PURE__ */ v.jsxs(
1428
1430
  "div",
1429
1431
  {
1430
- className: wt.dataValidationItemContainer,
1432
+ className: Et.dataValidationItemContainer,
1431
1433
  onClick: e,
1432
1434
  onMouseEnter: () => {
1433
1435
  n || (f(!0), c.current = t.ranges.map((m) => l.addShape({
@@ -1458,28 +1460,28 @@ const Li = "univer-data-validation-item-container", Pi = "univer-data-validation
1458
1460
  }), c.current = void 0;
1459
1461
  },
1460
1462
  children: [
1461
- /* @__PURE__ */ v.jsx("div", { className: wt.dataValidationItemTitle, children: d == null ? void 0 : d.generateRuleName(t) }),
1462
- /* @__PURE__ */ v.jsx("div", { className: wt.dataValidationItemContent, children: t.ranges.map((m) => Or(m)).join(",") }),
1463
- u ? /* @__PURE__ */ v.jsx("div", { className: wt.dataValidationItemIcon, onClick: p, children: /* @__PURE__ */ v.jsx(Wa, {}) }) : null
1463
+ /* @__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
1464
1466
  ]
1465
1467
  }
1466
1468
  );
1467
- }, $i = "univer-data-validation-list-buttons", Bi = "univer-data-validation-list-button", ta = {
1468
- dataValidationListButtons: $i,
1469
- dataValidationListButton: Bi
1469
+ }, Ui = "univer-data-validation-list-buttons", Hi = "univer-data-validation-list-button", ra = {
1470
+ dataValidationListButtons: Ui,
1471
+ dataValidationListButton: Hi
1470
1472
  };
1471
- function Ui() {
1472
- const a = $(J), t = Xe(
1473
+ function Wi() {
1474
+ const a = j(J), t = Ge(
1473
1475
  () => a.getCurrentTypeOfUnit$(re.UNIVER_SHEET),
1474
1476
  void 0,
1475
1477
  void 0,
1476
1478
  []
1477
1479
  );
1478
- return t ? /* @__PURE__ */ v.jsx(Hi, { workbook: t }) : null;
1480
+ return t ? /* @__PURE__ */ v.jsx(ki, { workbook: t }) : null;
1479
1481
  }
1480
- function Hi(a) {
1481
- const t = $(z), e = $(J), r = $(ee), o = $(Ee), n = $(Me), i = $(ie), [s, l] = te([]), { workbook: d } = a, c = Xe(d.activeSheet$, void 0, !0), u = d.getUnitId(), f = c == null ? void 0 : c.getSheetId(), p = t.ensureManager(u, f);
1482
- Ze(() => {
1482
+ function ki(a) {
1483
+ const t = j(q), e = j(J), r = j(ee), o = j(De), n = j(Me), i = j(ie), [s, l] = te([]), { workbook: d } = a, c = Ge(d.activeSheet$, void 0, !0), u = d.getUnitId(), f = c == null ? void 0 : c.getSheetId(), p = t.ensureManager(u, f);
1484
+ et(() => {
1483
1485
  l(p.getDataValidations());
1484
1486
  const _ = p.dataValidations$.subscribe((M) => {
1485
1487
  l([...M]);
@@ -1489,32 +1491,32 @@ function Hi(a) {
1489
1491
  };
1490
1492
  }, [p]);
1491
1493
  const m = async () => {
1492
- const _ = gr(o), M = {
1494
+ const _ = _r(o), M = {
1493
1495
  unitId: u,
1494
1496
  subUnitId: f,
1495
1497
  rule: _
1496
1498
  };
1497
- await r.executeCommand(zt.id, M), n.setActiveRule({
1499
+ await r.executeCommand(Qt.id, M), n.setActiveRule({
1498
1500
  unitId: u,
1499
1501
  subUnitId: f,
1500
1502
  rule: _
1501
1503
  });
1502
1504
  }, h = () => {
1503
- r.executeCommand(Oo.id, {
1505
+ r.executeCommand(Fo.id, {
1504
1506
  unitId: u,
1505
1507
  subUnitId: f
1506
1508
  });
1507
1509
  }, g = ((_) => {
1508
- const y = e.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet();
1510
+ const I = e.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet();
1509
1511
  return _.map((E) => {
1510
1512
  const { ranges: x } = E;
1511
- return (x == null ? void 0 : x.some((F) => {
1512
- var L, H;
1513
- const { startRow: b, startColumn: P, endRow: U, endColumn: O } = F;
1514
- for (let K = b; K <= U; K++)
1515
- for (let k = P; k <= O; k++) {
1516
- const w = (H = (L = y == null ? void 0 : y.getCell(K, k)) == null ? void 0 : L.selectionProtection) == null ? void 0 : H[0];
1517
- if ((w == null ? void 0 : w[Lt.Edit]) === !1 || (w == null ? void 0 : w[Lt.View]) === !1)
1513
+ return (x == null ? void 0 : x.some((O) => {
1514
+ var b, $;
1515
+ const { startRow: F, startColumn: L, endRow: B, endColumn: U } = O;
1516
+ for (let z = F; z <= B; z++)
1517
+ for (let k = L; k <= U; k++) {
1518
+ const y = ($ = (b = I == null ? void 0 : I.getCell(z, k)) == null ? void 0 : b.selectionProtection) == null ? void 0 : $[0];
1519
+ if ((y == null ? void 0 : y[At.Edit]) === !1 || (y == null ? void 0 : y[At.View]) === !1)
1518
1520
  return !0;
1519
1521
  }
1520
1522
  return !1;
@@ -1525,7 +1527,7 @@ function Hi(a) {
1525
1527
  g == null ? void 0 : g.map((_) => {
1526
1528
  var M;
1527
1529
  return /* @__PURE__ */ v.jsx(
1528
- ji,
1530
+ Bi,
1529
1531
  {
1530
1532
  unitId: u,
1531
1533
  subUnitId: f,
@@ -1542,30 +1544,30 @@ function Hi(a) {
1542
1544
  _.uid
1543
1545
  );
1544
1546
  }),
1545
- /* @__PURE__ */ v.jsxs("div", { className: ta.dataValidationListButtons, children: [
1546
- s.length && !C ? /* @__PURE__ */ v.jsx(He, { className: ta.dataValidationListButton, onClick: h, children: i.t("dataValidation.panel.removeAll") }) : null,
1547
- /* @__PURE__ */ v.jsx(He, { className: ta.dataValidationListButton, type: "primary", onClick: m, children: i.t("dataValidation.panel.add") })
1547
+ /* @__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") })
1548
1550
  ] })
1549
1551
  ] });
1550
1552
  }
1551
- const Wi = () => {
1552
- const a = $(Me), t = Xe(a.activeRule$, a.activeRule);
1553
- return t ? /* @__PURE__ */ v.jsx(Fi, {}, t.rule.uid) : /* @__PURE__ */ v.jsx(Ui, {});
1554
- }, ki = "univer-dv-list-dropdown", Yi = "univer-dv-list-dropdown-title", Xi = "univer-dv-list-dropdown-list", Gi = "univer-dv-list-dropdown-list-container", qi = "univer-dv-list-dropdown-selected-icon", zi = "univer-dv-list-dropdown-item-container", Ki = "univer-dv-list-dropdown-item", Qi = "univer-dv-list-dropdown-split", Zi = "univer-dv-list-dropdown-edit", De = {
1555
- dvListDropdown: ki,
1556
- dvListDropdownTitle: Yi,
1557
- dvListDropdownList: Xi,
1558
- dvListDropdownListContainer: Gi,
1559
- dvListDropdownSelectedIcon: qi,
1560
- dvListDropdownItemContainer: zi,
1561
- dvListDropdownItem: Ki,
1562
- dvListDropdownSplit: Qi,
1563
- dvListDropdownEdit: Zi
1564
- }, Ji = (a) => {
1553
+ const Yi = () => {
1554
+ const a = j(Me), t = Ge(a.activeRule$, a.activeRule);
1555
+ return t ? /* @__PURE__ */ v.jsx(Pi, {}, t.rule.uid) : /* @__PURE__ */ v.jsx(Wi, {});
1556
+ }, Xi = "univer-dv-list-dropdown", Gi = "univer-dv-list-dropdown-title", qi = "univer-dv-list-dropdown-list", zi = "univer-dv-list-dropdown-list-container", Ki = "univer-dv-list-dropdown-selected-icon", Qi = "univer-dv-list-dropdown-item-container", Zi = "univer-dv-list-dropdown-item", Ji = "univer-dv-list-dropdown-split", es = "univer-dv-list-dropdown-edit", ye = {
1557
+ dvListDropdown: Xi,
1558
+ dvListDropdownTitle: Gi,
1559
+ dvListDropdownList: qi,
1560
+ dvListDropdownListContainer: zi,
1561
+ dvListDropdownSelectedIcon: Ki,
1562
+ dvListDropdownItemContainer: Qi,
1563
+ dvListDropdownItem: Zi,
1564
+ dvListDropdownSplit: Ji,
1565
+ dvListDropdownEdit: es
1566
+ }, ts = (a) => {
1565
1567
  const { value: t, onChange: e, multiple: r, options: o, title: n, onEdit: i, style: s } = a;
1566
- return /* @__PURE__ */ v.jsxs("div", { className: De.dvListDropdown, style: s, children: [
1567
- /* @__PURE__ */ v.jsx("div", { className: De.dvListDropdownTitle, children: n }),
1568
- /* @__PURE__ */ v.jsx("div", { className: De.dvListDropdownList, children: /* @__PURE__ */ v.jsx(Rn, { children: /* @__PURE__ */ v.jsx("div", { className: De.dvListDropdownListContainer, children: o.map((l, d) => {
1568
+ return /* @__PURE__ */ v.jsxs("div", { className: ye.dvListDropdown, style: s, children: [
1569
+ /* @__PURE__ */ v.jsx("div", { className: ye.dvListDropdownTitle, children: n }),
1570
+ /* @__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) => {
1569
1571
  const c = t.indexOf(l.value) > -1, u = () => {
1570
1572
  let f;
1571
1573
  c ? f = new Set(t.filter((m) => m !== l.value)) : f = new Set(r ? [...t, l.value] : [l.value]);
@@ -1574,39 +1576,39 @@ const Wi = () => {
1574
1576
  f.has(m.value) && p.push(m.value);
1575
1577
  }), e(p);
1576
1578
  };
1577
- return /* @__PURE__ */ v.jsxs("div", { className: De.dvListDropdownItemContainer, onClick: u, children: [
1578
- /* @__PURE__ */ v.jsx("div", { className: De.dvListDropdownItem, style: { background: l.color || xe }, children: l.label }),
1579
- /* @__PURE__ */ v.jsx("div", { className: De.dvListDropdownSelectedIcon, children: c ? /* @__PURE__ */ v.jsx($r, {}) : null })
1579
+ return /* @__PURE__ */ v.jsxs("div", { className: ye.dvListDropdownItemContainer, onClick: u, children: [
1580
+ /* @__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 })
1580
1582
  ] }, d);
1581
1583
  }) }) }) }),
1582
- /* @__PURE__ */ v.jsx("div", { className: De.dvListDropdownSplit }),
1583
- /* @__PURE__ */ v.jsx("div", { className: De.dvListDropdownEdit, children: /* @__PURE__ */ v.jsx("a", { onClick: i, children: "编辑" }) })
1584
+ /* @__PURE__ */ v.jsx("div", { className: ye.dvListDropdownSplit }),
1585
+ /* @__PURE__ */ v.jsx("div", { className: ye.dvListDropdownEdit, children: /* @__PURE__ */ v.jsx("a", { onClick: i, children: "编辑" }) })
1584
1586
  ] });
1585
1587
  };
1586
- function es(a) {
1587
- var T, F;
1588
- const { location: t, hideFn: e } = a, { worksheet: r, row: o, col: n, unitId: i, subUnitId: s } = t, l = $(z), d = $(ee), c = $(ie), [u, f] = te(""), p = $(La);
1589
- Xe(l.ruleChange$);
1590
- const m = Sn.useContext(), h = m.right - m.left;
1588
+ function as(a) {
1589
+ 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;
1591
1593
  if (!r)
1592
1594
  return null;
1593
- const R = r.getCell(o, n), g = (T = R == null ? void 0 : R.dataValidation) == null ? void 0 : T.rule, C = (F = R == null ? void 0 : R.dataValidation) == null ? void 0 : F.validator, _ = (g == null ? void 0 : g.renderMode) === le.CUSTOM || (g == null ? void 0 : g.renderMode) === void 0;
1594
- if (!R || !g || !C)
1595
+ 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
+ if (!g || !C || !_)
1595
1597
  return;
1596
- const M = g.type === B.LIST_MULTIPLE, y = C.getListWithColor(g, i, s), D = u || pi(R), E = Qe(D), x = () => {
1597
- d.executeCommand(at.id, {
1598
- ruleId: g.uid
1598
+ 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, {
1600
+ ruleId: C.uid
1599
1601
  }), e();
1600
1602
  };
1601
1603
  return /* @__PURE__ */ v.jsx(
1602
- Ji,
1604
+ ts,
1603
1605
  {
1604
- style: { minWidth: h, maxWidth: Math.max(h, 200) },
1605
- title: M ? c.t("dataValidation.listMultiple.dropdown") : c.t("dataValidation.list.dropdown"),
1606
- value: E,
1607
- multiple: M,
1608
- onChange: (b) => {
1609
- const P = Yr(b), U = {
1606
+ style: { minWidth: R, maxWidth: Math.max(R, 200) },
1607
+ title: I ? c.t("dataValidation.listMultiple.dropdown") : c.t("dataValidation.list.dropdown"),
1608
+ value: x,
1609
+ multiple: I,
1610
+ onChange: (L) => {
1611
+ const B = qr(L), U = {
1610
1612
  unitId: i,
1611
1613
  subUnitId: s,
1612
1614
  range: {
@@ -1616,7 +1618,7 @@ function es(a) {
1616
1618
  endRow: o
1617
1619
  },
1618
1620
  value: {
1619
- v: P,
1621
+ v: B,
1620
1622
  p: null,
1621
1623
  f: null,
1622
1624
  si: null,
@@ -1627,25 +1629,25 @@ function es(a) {
1627
1629
  };
1628
1630
  p.isVisible() && p.changeVisible({
1629
1631
  visible: !1,
1630
- keycode: Jo.ESC,
1631
- eventType: ln.Keyboard,
1632
+ keycode: an.ESC,
1633
+ eventType: un.Keyboard,
1632
1634
  unitId: i
1633
- }), d.executeCommand(Ta.id, U), f(P), M || e();
1635
+ }), d.executeCommand(La.id, U), f(B), I || e();
1634
1636
  },
1635
- options: y.map((b) => ({
1636
- label: b.label,
1637
- value: b.label,
1638
- color: _ ? b.color : "transparent"
1637
+ options: D.map((L) => ({
1638
+ label: L.label,
1639
+ value: L.label,
1640
+ color: M ? L.color : "transparent"
1639
1641
  })),
1640
- onEdit: x
1642
+ onEdit: T
1641
1643
  }
1642
1644
  );
1643
1645
  }
1644
- var Kr = { exports: {} };
1646
+ var Jr = { exports: {} };
1645
1647
  (function(a, t) {
1646
1648
  (function(e, r) {
1647
1649
  a.exports = r();
1648
- })(yn, function() {
1650
+ })(En, function() {
1649
1651
  var e = "minute", r = /[+-]\d\d(?::?\d\d)?/g, o = /([+-]|\d\d)/g;
1650
1652
  return function(n, i, s) {
1651
1653
  var l = i.prototype;
@@ -1673,9 +1675,9 @@ var Kr = { exports: {} };
1673
1675
  l.utcOffset = function(h, R) {
1674
1676
  var g = this.$utils().u;
1675
1677
  if (g(h)) return this.$u ? 0 : g(this.$offset) ? u.call(this) : this.$offset;
1676
- if (typeof h == "string" && (h = function(y) {
1677
- y === void 0 && (y = "");
1678
- var D = y.match(r);
1678
+ if (typeof h == "string" && (h = function(I) {
1679
+ I === void 0 && (I = "");
1680
+ var D = I.match(r);
1679
1681
  if (!D) return null;
1680
1682
  var E = ("" + D[0]).match(o) || ["-", 0, 0], x = E[0], T = 60 * +E[1] + +E[2];
1681
1683
  return T === 0 ? 0 : x === "+" ? T : -T;
@@ -1714,15 +1716,15 @@ var Kr = { exports: {} };
1714
1716
  };
1715
1717
  };
1716
1718
  });
1717
- })(Kr);
1718
- var ts = Kr.exports;
1719
- const as = /* @__PURE__ */ Dn(ts);
1720
- var rs = Object.defineProperty, os = Object.getOwnPropertyDescriptor, ns = (a, t, e, r) => {
1721
- for (var o = r > 1 ? void 0 : r ? os(t, e) : t, n = a.length - 1, i; n >= 0; n--)
1719
+ })(Jr);
1720
+ var rs = Jr.exports;
1721
+ const os = /* @__PURE__ */ bn(rs);
1722
+ var ns = Object.defineProperty, is = Object.getOwnPropertyDescriptor, ss = (a, t, e, r) => {
1723
+ for (var o = r > 1 ? void 0 : r ? is(t, e) : t, n = a.length - 1, i; n >= 0; n--)
1722
1724
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
1723
- return r && o && rs(t, e, o), o;
1724
- }, nt = (a, t) => (e, r) => t(e, r, a);
1725
- let lt = class extends ue {
1725
+ return r && o && ns(t, e, o), o;
1726
+ }, lt = (a, t) => (e, r) => t(e, r, a);
1727
+ let ut = class extends ue {
1726
1728
  constructor(a, t, e, r, o) {
1727
1729
  super(), this._editorBridgeService = a, this._dataValidationModel = t, this._dataValidatorRegistryService = e, this._dialogService = r, this._localeService = o, this._initEditorBridgeInterceptor();
1728
1730
  }
@@ -1732,7 +1734,7 @@ let lt = class extends ue {
1732
1734
  {
1733
1735
  handler: async (a, t, e) => {
1734
1736
  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;
1735
- if (!u || u.errorStyle !== st.STOP)
1737
+ if (!u || u.errorStyle !== ct.STOP)
1736
1738
  return e(Promise.resolve(r));
1737
1739
  const f = await this._dataValidatorRegistryService.getValidatorItem(u.type);
1738
1740
  if (!f || await f.validator(
@@ -1757,8 +1759,8 @@ let lt = class extends ue {
1757
1759
  title: f.getRuleFinalError(u)
1758
1760
  },
1759
1761
  footer: {
1760
- title: Ca.createElement(
1761
- He,
1762
+ title: Ma.createElement(
1763
+ We,
1762
1764
  {
1763
1765
  type: "primary",
1764
1766
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -1785,8 +1787,8 @@ let lt = class extends ue {
1785
1787
  title: a
1786
1788
  },
1787
1789
  footer: {
1788
- title: Ca.createElement(
1789
- He,
1790
+ title: Ma.createElement(
1791
+ We,
1790
1792
  {
1791
1793
  type: "primary",
1792
1794
  onClick: () => this._dialogService.close("reject-input-dialog")
@@ -1800,46 +1802,46 @@ let lt = class extends ue {
1800
1802
  });
1801
1803
  }
1802
1804
  };
1803
- lt = ns([
1804
- ve(_e.Ready, lt),
1805
- nt(0, La),
1806
- nt(1, I(z)),
1807
- nt(2, I(we)),
1808
- nt(3, en),
1809
- nt(4, I(ie))
1810
- ], lt);
1811
- const is = "univer-dv-date-dropdown", ss = "univer-dv-date-dropdown-btns", rr = {
1812
- dvDateDropdown: is,
1813
- dvDateDropdownBtns: ss
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 = {
1814
+ dvDateDropdown: ls,
1815
+ dvDateDropdownBtns: ds
1814
1816
  };
1815
- Ve.extend(as);
1816
- const ls = (a) => {
1817
+ Ve.extend(os);
1818
+ const cs = (a) => {
1817
1819
  if (a == null || typeof a == "boolean")
1818
1820
  return;
1819
1821
  if (typeof a == "number" || !Number.isNaN(+a)) {
1820
- const e = Ve.unix(wi(+a)).utc().format().slice(0, -1);
1822
+ const e = Ve.unix(Di(+a)).utc().format().slice(0, -1);
1821
1823
  return Ve(e);
1822
1824
  }
1823
1825
  const t = Ve(a);
1824
1826
  if (t.isValid())
1825
1827
  return t;
1826
1828
  };
1827
- function ds(a) {
1828
- var M, y, D;
1829
- const { location: t, hideFn: e } = a, { worksheet: r, row: o, col: n, unitId: i, subUnitId: s } = t, l = $(ee), d = $(lt), c = r.getCell(o, n), u = (M = c == null ? void 0 : c.dataValidation) == null ? void 0 : M.rule, f = (y = c == null ? void 0 : c.dataValidation) == null ? void 0 : y.validator, p = ae(c), m = ls(p), [h, R] = te(m), g = !!((D = u == null ? void 0 : u.bizInfo) != null && D.showTime), C = h && h.isValid() ? h : Ve();
1829
+ function us(a) {
1830
+ 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();
1830
1832
  if (!c || !u || !f)
1831
1833
  return;
1832
1834
  const _ = async () => {
1833
1835
  if (!h)
1834
1836
  return;
1835
- 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());
1836
- u.errorStyle !== st.STOP || await f.validator({
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({
1837
1839
  value: T,
1838
1840
  unitId: i,
1839
1841
  subUnitId: s,
1840
1842
  row: o,
1841
1843
  column: n
1842
- }, u) ? (l.executeCommand(Ta.id, {
1844
+ }, u) ? (l.executeCommand(La.id, {
1843
1845
  unitId: i,
1844
1846
  subUnitId: s,
1845
1847
  range: {
@@ -1862,9 +1864,9 @@ function ds(a) {
1862
1864
  }
1863
1865
  }), e()) : d.showReject(f.getRuleFinalError(u));
1864
1866
  };
1865
- return /* @__PURE__ */ v.jsxs("div", { className: rr.dvDateDropdown, children: [
1867
+ return /* @__PURE__ */ v.jsxs("div", { className: nr.dvDateDropdown, children: [
1866
1868
  /* @__PURE__ */ v.jsx(
1867
- Cn,
1869
+ Mn,
1868
1870
  {
1869
1871
  defaultValue: h,
1870
1872
  pickerValue: h != null ? h : C,
@@ -1877,10 +1879,10 @@ function ds(a) {
1877
1879
  }
1878
1880
  }
1879
1881
  ),
1880
- /* @__PURE__ */ v.jsx("div", { className: rr.dvDateDropdownBtns, children: /* @__PURE__ */ v.jsx(He, { size: "small", type: "primary", onClick: _, disabled: !h, children: "确定" }) })
1882
+ /* @__PURE__ */ v.jsx("div", { className: nr.dvDateDropdownBtns, children: /* @__PURE__ */ v.jsx(We, { size: "small", type: "primary", onClick: _, disabled: !h, children: "确定" }) })
1881
1883
  ] });
1882
1884
  }
1883
- const Qr = "data-validation.list.dropdown", Zr = "data-validation.date.dropdown", cs = {
1885
+ const eo = "data-validation.list.dropdown", to = "data-validation.date.dropdown", hs = {
1884
1886
  [V.BETWEEN]: "dataValidation.date.operators.between",
1885
1887
  [V.EQUAL]: "dataValidation.date.operators.equal",
1886
1888
  [V.GREATER_THAN]: "dataValidation.date.operators.greaterThan",
@@ -1891,7 +1893,7 @@ const Qr = "data-validation.list.dropdown", Zr = "data-validation.date.dropdown"
1891
1893
  [V.NOT_EQUAL]: "dataValidation.date.operators.notEqual"
1892
1894
  };
1893
1895
  V.BETWEEN + "", V.EQUAL + "", V.GREATER_THAN + "", V.GREATER_THAN_OR_EQUAL + "", V.LESS_THAN + "", V.LESS_THAN_OR_EQUAL + "", V.NOT_BETWEEN + "", V.NOT_EQUAL + "";
1894
- const us = {
1896
+ const ms = {
1895
1897
  [V.BETWEEN]: "dataValidation.date.ruleName.between",
1896
1898
  [V.EQUAL]: "dataValidation.date.ruleName.equal",
1897
1899
  [V.GREATER_THAN]: "dataValidation.date.ruleName.greaterThan",
@@ -1900,7 +1902,7 @@ const us = {
1900
1902
  [V.LESS_THAN_OR_EQUAL]: "dataValidation.date.ruleName.lessThanOrEqual",
1901
1903
  [V.NOT_BETWEEN]: "dataValidation.date.ruleName.notBetween",
1902
1904
  [V.NOT_EQUAL]: "dataValidation.date.ruleName.notEqual"
1903
- }, hs = {
1905
+ }, fs = {
1904
1906
  [V.BETWEEN]: "dataValidation.date.errorMsg.between",
1905
1907
  [V.EQUAL]: "dataValidation.date.errorMsg.equal",
1906
1908
  [V.GREATER_THAN]: "dataValidation.date.errorMsg.greaterThan",
@@ -1909,12 +1911,12 @@ const us = {
1909
1911
  [V.LESS_THAN_OR_EQUAL]: "dataValidation.date.errorMsg.lessThanOrEqual",
1910
1912
  [V.NOT_BETWEEN]: "dataValidation.date.errorMsg.notBetween",
1911
1913
  [V.NOT_EQUAL]: "dataValidation.date.errorMsg.notEqual"
1912
- }, ms = "DATE_SHOW_TIME_OPTION";
1913
- function Pt(a) {
1914
+ }, ps = "DATE_SHOW_TIME_OPTION";
1915
+ function xt(a) {
1914
1916
  var o;
1915
- const { value: t, onChange: e } = a, r = $(ie);
1917
+ const { value: t, onChange: e } = a, r = j(ie);
1916
1918
  return /* @__PURE__ */ v.jsx(Z, { children: /* @__PURE__ */ v.jsx(
1917
- $a,
1919
+ Ua,
1918
1920
  {
1919
1921
  checked: (o = t.bizInfo) == null ? void 0 : o.showTime,
1920
1922
  onChange: (n) => {
@@ -1930,19 +1932,19 @@ function Pt(a) {
1930
1932
  }
1931
1933
  ) });
1932
1934
  }
1933
- Pt.componentKey = ms;
1934
- const or = "{FORMULA1}", nr = "{FORMULA2}", it = (a) => {
1935
+ xt.componentKey = ps;
1936
+ const ir = "{FORMULA1}", sr = "{FORMULA2}", dt = (a) => {
1935
1937
  if (a == null || typeof a == "boolean")
1936
1938
  return;
1937
1939
  if (typeof a == "number" || !Number.isNaN(+a))
1938
1940
  return +a;
1939
1941
  const t = `${Ve(a).format("YYYY-MM-DD HH:mm:ss").split(" ").join("T")}Z`;
1940
- return zr(Ve(t).unix());
1942
+ return Zr(Ve(t).unix());
1941
1943
  };
1942
- class fs extends Ye {
1944
+ class gs extends Xe {
1943
1945
  constructor() {
1944
1946
  super(...arguments);
1945
- S(this, "id", B.DATE);
1947
+ S(this, "id", H.DATE);
1946
1948
  S(this, "title", "dataValidation.date.title");
1947
1949
  S(this, "operators", [
1948
1950
  V.BETWEEN,
@@ -1955,25 +1957,25 @@ class fs extends Ye {
1955
1957
  V.NOT_EQUAL
1956
1958
  ]);
1957
1959
  S(this, "scopes", ["sheet"]);
1958
- S(this, "formulaInput", Rt);
1959
- S(this, "optionsInput", Pt.componentKey);
1960
- S(this, "dropdown", Zr);
1960
+ S(this, "formulaInput", Mt);
1961
+ S(this, "optionsInput", xt.componentKey);
1962
+ S(this, "dropdown", to);
1961
1963
  S(this, "_formulaService", this.injector.get(ce));
1962
1964
  }
1963
1965
  async parseFormula(e, r, o) {
1964
1966
  var l, d;
1965
1967
  const n = await this._formulaService.getRuleFormulaResult(r, o, e.uid), { formula1: i, formula2: s } = e;
1966
1968
  return {
1967
- formula1: it(A(i) ? ge((l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) : i),
1968
- formula2: it(A(s) ? ge((d = n == null ? void 0 : n[1]) == null ? void 0 : d.result) : s)
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)
1969
1971
  };
1970
1972
  }
1971
1973
  parseFormulaSync(e, r, o) {
1972
1974
  var l, d;
1973
1975
  const n = this._formulaService.getRuleFormulaResultSync(r, o, e.uid), { formula1: i, formula2: s } = e;
1974
1976
  return {
1975
- formula1: it(A(i) ? ge((l = n == null ? void 0 : n[0]) == null ? void 0 : l.result) : i),
1976
- formula2: it(A(s) ? ge((d = n == null ? void 0 : n[1]) == null ? void 0 : d.result) : s)
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)
1977
1979
  };
1978
1980
  }
1979
1981
  async isValidType(e) {
@@ -1981,7 +1983,7 @@ class fs extends Ye {
1981
1983
  return typeof r == "string" ? Ve(r, "YYYY-MM-DD HH:mm:ss", !0).isValid() : typeof r == "number";
1982
1984
  }
1983
1985
  _validatorSingleFormula(e) {
1984
- return !Y.isBlank(e) && (A(e) || !Number.isNaN(+e) || !!e && Ve(e).isValid());
1986
+ return !X.isBlank(e) && (A(e) || !Number.isNaN(+e) || !!e && Ve(e).isValid());
1985
1987
  }
1986
1988
  validatorFormula(e, r, o) {
1987
1989
  const n = e.operator;
@@ -1990,7 +1992,7 @@ class fs extends Ye {
1990
1992
  success: !1
1991
1993
  };
1992
1994
  const i = this._validatorSingleFormula(e.formula1), s = this.localeService.t("dataValidation.validFail.date");
1993
- if (Gt.includes(n)) {
1995
+ if (zt.includes(n)) {
1994
1996
  const d = this._validatorSingleFormula(e.formula2);
1995
1997
  return {
1996
1998
  success: i && d,
@@ -2007,7 +2009,7 @@ class fs extends Ye {
2007
2009
  const { value: n } = e;
2008
2010
  return {
2009
2011
  ...e,
2010
- value: it(n)
2012
+ value: dt(n)
2011
2013
  };
2012
2014
  }
2013
2015
  async validatorIsEqual(e, r, o) {
@@ -2049,47 +2051,47 @@ class fs extends Ye {
2049
2051
  return Number.isNaN(n) ? !0 : e.value <= n;
2050
2052
  }
2051
2053
  get operatorNames() {
2052
- return this.operators.map((e) => this.localeService.t(cs[e]));
2054
+ return this.operators.map((e) => this.localeService.t(hs[e]));
2053
2055
  }
2054
2056
  generateRuleName(e) {
2055
2057
  var o, n;
2056
2058
  if (!e.operator)
2057
2059
  return this.titleStr;
2058
- const r = this.localeService.t(us[e.operator]).replace(or, (o = e.formula1) != null ? o : "").replace(nr, (n = e.formula2) != null ? n : "");
2060
+ const r = this.localeService.t(ms[e.operator]).replace(ir, (o = e.formula1) != null ? o : "").replace(sr, (n = e.formula2) != null ? n : "");
2059
2061
  return `${this.titleStr} ${r}`;
2060
2062
  }
2061
2063
  generateRuleErrorMessage(e) {
2062
2064
  var o, n;
2063
- return e.operator ? `${this.localeService.t(hs[e.operator]).replace(or, (o = e.formula1) != null ? o : "").replace(nr, (n = e.formula2) != null ? n : "")}` : this.titleStr;
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;
2064
2066
  }
2065
2067
  }
2066
- var ps = Object.defineProperty, gs = Object.getOwnPropertyDescriptor, vs = (a, t, e, r) => {
2067
- for (var o = r > 1 ? void 0 : r ? gs(t, e) : t, n = a.length - 1, i; n >= 0; n--)
2068
+ var vs = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Ss = (a, t, e, r) => {
2069
+ for (var o = r > 1 ? void 0 : r ? _s(t, e) : t, n = a.length - 1, i; n >= 0; n--)
2068
2070
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
2069
- return r && o && ps(t, e, o), o;
2070
- }, ir = (a, t) => (e, r) => t(e, r, a);
2071
- const ze = 4, _s = 6, Re = 14, Pe = 6, Oe = 4, Ss = "#565656", sr = 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");
2072
- function Rs(a, t) {
2071
+ 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");
2074
+ function Vs(a, t) {
2073
2075
  const e = a.length;
2074
2076
  return {
2075
2077
  id: "d",
2076
2078
  body: {
2077
- dataStream: `${a}${cr}`,
2079
+ dataStream: `${a}${hr}`,
2078
2080
  textRuns: [
2079
2081
  {
2080
2082
  ts: {
2081
2083
  fs: 11,
2082
2084
  ff: void 0,
2083
- it: ot.FALSE,
2084
- bl: ot.FALSE,
2085
+ it: st.FALSE,
2086
+ bl: st.FALSE,
2085
2087
  ul: {
2086
- s: ot.FALSE
2088
+ s: st.FALSE
2087
2089
  },
2088
2090
  st: {
2089
- s: ot.FALSE
2091
+ s: st.FALSE
2090
2092
  },
2091
2093
  ol: {
2092
- s: ot.FALSE
2094
+ s: st.FALSE
2093
2095
  },
2094
2096
  cl: void 0,
2095
2097
  ...t,
@@ -2109,22 +2111,22 @@ function Rs(a, t) {
2109
2111
  }
2110
2112
  };
2111
2113
  }
2112
- function Jr(a, t, e) {
2113
- const r = Rs(a, e), o = new Io(r), n = new dn(o);
2114
+ function ao(a, t, e) {
2115
+ const r = Vs(a, e), o = new Do(r), n = new hn(o);
2114
2116
  return {
2115
- documentSkeleton: cn.create(n, t),
2117
+ documentSkeleton: mn.create(n, t),
2116
2118
  docModel: o,
2117
2119
  docViewModel: n
2118
2120
  };
2119
2121
  }
2120
- function aa(a, t, e) {
2122
+ function oa(a, t, e) {
2121
2123
  const {
2122
2124
  documentSkeleton: r,
2123
2125
  docModel: o,
2124
2126
  docViewModel: n
2125
- } = Jr(a, t, e);
2127
+ } = ao(a, t, e);
2126
2128
  return {
2127
- documents: new un(`DOCUMENTS_${Y.generateRandomId()}`, r, {
2129
+ documents: new fn(`DOCUMENTS_${X.generateRandomId()}`, r, {
2128
2130
  pageMarginLeft: 0,
2129
2131
  pageMarginTop: 0
2130
2132
  }),
@@ -2133,17 +2135,17 @@ function aa(a, t, e) {
2133
2135
  docViewModel: n
2134
2136
  };
2135
2137
  }
2136
- function lr(a, t, e, r, o, n) {
2138
+ function cr(a, t, e, r, o, n) {
2137
2139
  let i = 0;
2138
2140
  switch (o) {
2139
2141
  case me.BOTTOM:
2140
- i = t - Oe * 2 - r + Oe;
2142
+ i = t - be * 2 - r + be;
2141
2143
  break;
2142
2144
  case me.MIDDLE:
2143
- i = (t - Oe * 2 - r) / 2 + Oe;
2145
+ i = (t - be * 2 - r) / 2 + be;
2144
2146
  break;
2145
2147
  default:
2146
- i = Oe;
2148
+ i = be;
2147
2149
  break;
2148
2150
  }
2149
2151
  let s = 0;
@@ -2160,8 +2162,8 @@ function lr(a, t, e, r, o, n) {
2160
2162
  paddingTop: i
2161
2163
  };
2162
2164
  }
2163
- var ha;
2164
- let Ia = (ha = class {
2165
+ var fa;
2166
+ let ya = (fa = class {
2165
2167
  constructor(a, t) {
2166
2168
  S(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
2167
2169
  S(this, "zIndex");
@@ -2187,12 +2189,12 @@ let Ia = (ha = class {
2187
2189
  i = r - Re - 1;
2188
2190
  break;
2189
2191
  }
2190
- a.save(), a.translateWithPrecision(t.startX + n, t.startY + i), a.fillStyle = "#565656", a.fill(sr), a.restore();
2192
+ a.save(), a.translateWithPrecision(t.startX + n, t.startY + i), a.fillStyle = "#565656", a.fill(dr), a.restore();
2191
2193
  }
2192
2194
  // eslint-disable-next-line max-lines-per-function
2193
2195
  drawWith(a, t, e) {
2194
- var U, O;
2195
- const { primaryWithCoord: r, row: o, col: n, style: i, data: s, subUnitId: l } = t, d = r.isMergedMainCell ? r.mergeInfo : r, c = (U = s.dataValidation) == null ? void 0 : U.rule, u = (O = s.dataValidation) == null ? void 0 : O.validator, f = s.fontRenderExtension, { leftOffset: p = 0, rightOffset: m = 0, topOffset: h = 0, downOffset: R = 0 } = f || {};
2196
+ 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 || {};
2196
2198
  if (!c || !u || !u.skipDefaultFontRender(c))
2197
2199
  return;
2198
2200
  const g = {
@@ -2200,14 +2202,14 @@ let Ia = (ha = class {
2200
2202
  endX: d.endX - m,
2201
2203
  startY: d.startY + h,
2202
2204
  endY: d.endY - R
2203
- }, C = g.endX - g.startX, _ = g.endY - g.startY, M = this._ensureMap(l), y = this._generateKey(o, n), D = u.getListWithColor(c), E = ae(s), x = `${E != null ? E : ""}`, T = D.find((L) => L.label === x);
2204
- let { tb: F, vt: b, ht: P } = i || {};
2205
- if (F = F != null ? F : se.WRAP, b = b != null ? b : me.BOTTOM, P = P != null ? P : Be.LEFT, c.renderMode === le.ARROW) {
2206
- this._drawDownIcon(a, g, C, _, b), a.save(), a.translateWithPrecision(g.startX, g.startY), a.beginPath(), a.rect(0, 0, C, _), a.clip();
2207
- const L = C - Re, { documentSkeleton: H, documents: K, docModel: k } = aa(x, this._localeService, i);
2208
- F === se.WRAP && k.updateDocumentDataPageSize(Math.max(L, 1)), H.calculate(), H.getActualSize();
2209
- const w = Mt(H), { height: j, width: oe } = w, { paddingTop: G, paddingLeft: Se } = lr(L, _, oe, j, b, P);
2210
- a.translate(0, G), a.save(), a.translateWithPrecision(ze, 0), a.beginPath(), a.rect(0, 0, L, j), a.clip(), K.render(a), a.translateWithPrecision(Se, 0), a.restore(), a.restore(), M.set(y, {
2205
+ }, 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
+ let { tb: O, vt: F, ht: L } = i || {};
2207
+ if (O = O != null ? O : se.WRAP, F = F != null ? F : me.BOTTOM, L = L != null ? L : Be.LEFT, c.renderMode === le.ARROW) {
2208
+ this._drawDownIcon(a, g, C, _, F), a.save(), a.translateWithPrecision(g.startX, g.startY), a.beginPath(), a.rect(0, 0, C, _), a.clip();
2209
+ const b = C - Re, { documentSkeleton: $, documents: z, docModel: k } = oa(x, this._localeService, i);
2210
+ 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);
2212
+ 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, {
2211
2213
  left: g.endX + e.rowHeaderWidth - Re,
2212
2214
  top: g.startY + e.columnHeaderHeight,
2213
2215
  width: Re,
@@ -2215,21 +2217,21 @@ let Ia = (ha = class {
2215
2217
  });
2216
2218
  } else {
2217
2219
  a.save(), a.translateWithPrecision(g.startX, g.startY), a.beginPath(), a.rect(0, 0, C, _), a.clip();
2218
- const L = C - Pe * 2 - ze - Re, { documentSkeleton: H, documents: K, docModel: k } = aa(x, this._localeService, i);
2219
- F === se.WRAP && k.updateDocumentDataPageSize(Math.max(L, 1)), H.calculate();
2220
- const w = Mt(H), { height: j, width: oe } = w, { paddingTop: G, paddingLeft: Se } = lr(L, _, oe, j, b, P);
2220
+ const b = C - Pe * 2 - Ke - Re, { documentSkeleton: $, documents: z, docModel: k } = oa(x, this._localeService, i);
2221
+ 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);
2221
2223
  a.translate(Pe, G);
2222
- const N = Math.max(C - Pe * 2, 1), X = j;
2223
- yr.drawWith(a, {
2224
- width: N,
2225
- height: X,
2224
+ const Le = Math.max(C - Pe * 2, 1), N = P;
2225
+ Er.drawWith(a, {
2226
+ width: Le,
2227
+ height: N,
2226
2228
  fill: (T == null ? void 0 : T.color) || xe,
2227
2229
  radius: 8
2228
- }), a.save(), a.translateWithPrecision(ze, 0), a.beginPath(), a.rect(0, 0, L, j), a.clip(), a.translateWithPrecision(Se, 0), K.render(a), a.restore(), a.translate(L + ze + 4, (j - _s) / 2), a.fillStyle = Ss, a.fill(sr), a.restore(), M.set(y, {
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, {
2229
2231
  left: g.startX + Pe + e.rowHeaderWidth,
2230
2232
  top: g.startY + G + e.columnHeaderHeight,
2231
- width: N,
2232
- height: X
2233
+ width: Le,
2234
+ height: N
2233
2235
  });
2234
2236
  }
2235
2237
  }
@@ -2246,17 +2248,17 @@ let Ia = (ha = class {
2246
2248
  }, f = u.endX - u.startX, p = ae(r), m = `${p != null ? p : ""}`;
2247
2249
  let { tb: h } = e || {};
2248
2250
  if (h = h != null ? h : se.WRAP, c.renderMode === le.ARROW) {
2249
- const g = f - Re, { documentSkeleton: C, docModel: _ } = aa(m, this._localeService, e);
2251
+ const g = f - Re, { documentSkeleton: C, docModel: _ } = oa(m, this._localeService, e);
2250
2252
  h === se.WRAP && _.updateDocumentDataPageSize(Math.max(g, 1)), C.calculate(), C.getActualSize();
2251
- const M = Mt(C), { height: y } = M;
2252
- return y;
2253
+ const M = yt(C), { height: I } = M;
2254
+ return I;
2253
2255
  } else {
2254
- const g = f - Pe * 2 - ze - Re, { documentSkeleton: C, docModel: _ } = Jr(m, this._localeService, e);
2256
+ const g = f - Pe * 2 - Ke - Re, { documentSkeleton: C, docModel: _ } = ao(m, this._localeService, e);
2255
2257
  h === se.WRAP && _.updateDocumentDataPageSize(Math.max(g, 1)), C.calculate();
2256
- const M = Mt(C), {
2257
- height: y
2258
+ const M = yt(C), {
2259
+ height: I
2258
2260
  } = M;
2259
- return y + Oe * 2;
2261
+ return I + be * 2;
2260
2262
  }
2261
2263
  }
2262
2264
  isHit(a, t) {
@@ -2275,30 +2277,30 @@ let Ia = (ha = class {
2275
2277
  row: o,
2276
2278
  column: n
2277
2279
  };
2278
- this._commandService.executeCommand(Yt.id, i);
2280
+ this._commandService.executeCommand(Gt.id, i);
2279
2281
  }
2280
- }, S(ha, "padding", {
2281
- l: Pe + ze,
2282
+ }, S(fa, "padding", {
2283
+ l: Pe + Ke,
2282
2284
  r: Re + Pe,
2283
- t: Oe,
2284
- b: Oe
2285
- }), ha);
2286
- Ia = vs([
2287
- ir(0, I(ie)),
2288
- ir(1, ee)
2289
- ], Ia);
2290
- const Cs = "LIST_RENDER_MODE_OPTION_INPUT";
2291
- function At(a) {
2285
+ t: be,
2286
+ b: be
2287
+ }), fa);
2288
+ ya = Ss([
2289
+ lr(0, w(ie)),
2290
+ lr(1, ee)
2291
+ ], ya);
2292
+ const Ms = "LIST_RENDER_MODE_OPTION_INPUT";
2293
+ function jt(a) {
2292
2294
  var o;
2293
- const { value: t, onChange: e } = a, r = $(ie);
2294
- return /* @__PURE__ */ v.jsx(Z, { label: r.t("dataValidation.renderMode.label"), children: /* @__PURE__ */ v.jsxs(ja, { value: `${(o = t.renderMode) != null ? o : le.CUSTOM}`, onChange: (n) => e({ ...t, renderMode: +n }), children: [
2295
+ 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: [
2295
2297
  /* @__PURE__ */ v.jsx($e, { value: `${le.CUSTOM}`, children: r.t("dataValidation.renderMode.chip") }),
2296
2298
  /* @__PURE__ */ v.jsx($e, { value: `${le.ARROW}`, children: r.t("dataValidation.renderMode.arrow") }),
2297
2299
  /* @__PURE__ */ v.jsx($e, { value: `${le.TEXT}`, children: r.t("dataValidation.renderMode.text") })
2298
2300
  ] }) });
2299
2301
  }
2300
- At.componentKey = Cs;
2301
- function ra(a) {
2302
+ jt.componentKey = Ms;
2303
+ function na(a) {
2302
2304
  if (!a)
2303
2305
  return [];
2304
2306
  const t = /* @__PURE__ */ new Set();
@@ -2309,7 +2311,7 @@ function ra(a) {
2309
2311
  const o = ae(r);
2310
2312
  if (o != null) {
2311
2313
  if (typeof o != "string" && typeof (r == null ? void 0 : r.s) == "object" && ((i = (n = r.s) == null ? void 0 : n.n) != null && i.pattern)) {
2312
- t.add(wn.format(r.s.n.pattern, o));
2314
+ t.add(Dn.format(r.s.n.pattern, o));
2313
2315
  return;
2314
2316
  }
2315
2317
  t.add(o.toString());
@@ -2318,48 +2320,48 @@ function ra(a) {
2318
2320
  }
2319
2321
  ), [...t];
2320
2322
  }
2321
- const Vs = [
2323
+ const Is = [
2322
2324
  "if",
2323
2325
  "indirect",
2324
2326
  "choose",
2325
2327
  "offset"
2326
2328
  ];
2327
- function Ms(a, t) {
2328
- if (!A(a) || Ua(a.slice(1)))
2329
+ function ws(a, t) {
2330
+ if (!A(a) || Wa(a.slice(1)))
2329
2331
  return !0;
2330
2332
  const r = t.sequenceNodesBuilder(a);
2331
- return r && r.some((o) => typeof o == "object" && o.nodeType === Mn.FUNCTION && Vs.indexOf(o.token.toLowerCase()) > -1);
2333
+ return r && r.some((o) => typeof o == "object" && o.nodeType === wn.FUNCTION && Is.indexOf(o.token.toLowerCase()) > -1);
2332
2334
  }
2333
- function Is(a, t) {
2335
+ function ys(a, t) {
2334
2336
  const { formula1: e = "", ranges: r } = a;
2335
- if (Ua(e.slice(1))) {
2336
- const n = br(e.slice(1));
2337
+ if (Wa(e.slice(1))) {
2338
+ const n = Tr(e.slice(1));
2337
2339
  if ((!n.sheetName || n.sheetName === t) && r.some((i) => Ue.intersects(i, n.range)))
2338
2340
  return !0;
2339
2341
  }
2340
2342
  return !1;
2341
2343
  }
2342
- class eo extends Ye {
2344
+ class ro extends Xe {
2343
2345
  constructor() {
2344
2346
  super(...arguments);
2345
2347
  S(this, "formulaService", this.injector.get(ce));
2346
- S(this, "_lexer", this.injector.get(Ba));
2348
+ S(this, "_lexer", this.injector.get(Ha));
2347
2349
  S(this, "_univerInstanceService", this.injector.get(J));
2348
- S(this, "id", B.LIST);
2350
+ S(this, "id", H.LIST);
2349
2351
  S(this, "title", "dataValidation.list.title");
2350
2352
  S(this, "operators", []);
2351
2353
  S(this, "scopes", ["sheet"]);
2352
- S(this, "formulaInput", Gr);
2353
- S(this, "canvasRender", this.injector.createInstance(Ia));
2354
- S(this, "dropdown", Qr);
2355
- S(this, "optionsInput", At.componentKey);
2354
+ S(this, "formulaInput", Kr);
2355
+ S(this, "canvasRender", this.injector.createInstance(ya));
2356
+ S(this, "dropdown", eo);
2357
+ S(this, "optionsInput", jt.componentKey);
2356
2358
  }
2357
2359
  skipDefaultFontRender(e) {
2358
2360
  return e.renderMode !== le.TEXT;
2359
2361
  }
2360
2362
  validatorFormula(e, r, o) {
2361
2363
  var d, c, u;
2362
- const n = !Y.isBlank(e.formula1), i = Ms((d = e.formula1) != null ? d : "", this._lexer), s = (u = (c = this._univerInstanceService.getUnit(r, re.UNIVER_SHEET)) == null ? void 0 : c.getSheetBySheetId(o)) == null ? void 0 : u.getName(), l = Is(e, s != null ? s : "");
2364
+ const n = !X.isBlank(e.formula1), i = ws((d = e.formula1) != null ? d : "", this._lexer), s = (u = (c = this._univerInstanceService.getUnit(r, re.UNIVER_SHEET)) == null ? void 0 : c.getSheetBySheetId(o)) == null ? void 0 : u.getName(), l = ys(e, s != null ? s : "");
2363
2365
  return {
2364
2366
  success: !!(n && i && !l),
2365
2367
  formula1: n ? i ? l ? this.localeService.t("dataValidation.validFail.listIntersects") : void 0 : this.localeService.t("dataValidation.validFail.listInvalid") : this.localeService.t("dataValidation.validFail.list")
@@ -2367,13 +2369,13 @@ class eo extends Ye {
2367
2369
  }
2368
2370
  parseCellValue(e) {
2369
2371
  const r = e.toString();
2370
- return Qe(r);
2372
+ return Ze(r);
2371
2373
  }
2372
2374
  async parseFormula(e, r, o) {
2373
2375
  var s;
2374
2376
  const { formula1: n = "" } = e, i = await this.formulaService.getRuleFormulaResult(r, o, e.uid);
2375
2377
  return {
2376
- formula1: A(n) ? ra((s = i == null ? void 0 : i[0]) == null ? void 0 : s.result) : Qe(n),
2378
+ formula1: A(n) ? na((s = i == null ? void 0 : i[0]) == null ? void 0 : s.result) : Ze(n),
2377
2379
  formula2: void 0
2378
2380
  };
2379
2381
  }
@@ -2394,7 +2396,7 @@ class eo extends Ye {
2394
2396
  const l = (p = o ? s.getSheetBySheetId(o) : void 0) != null ? p : s.getActiveSheet();
2395
2397
  if (!l) return [];
2396
2398
  const d = s.getUnitId(), c = l.getSheetId(), u = this.formulaService.getRuleFormulaResultSync(d, c, e.uid);
2397
- return A(n) ? ra((m = u == null ? void 0 : u[0]) == null ? void 0 : m.result) : Qe(n);
2399
+ return A(n) ? na((m = u == null ? void 0 : u[0]) == null ? void 0 : m.result) : Ze(n);
2398
2400
  }
2399
2401
  async getListAsync(e, r, o) {
2400
2402
  var f, p, m;
@@ -2403,7 +2405,7 @@ class eo extends Ye {
2403
2405
  const l = (p = o ? s.getSheetBySheetId(o) : void 0) != null ? p : s.getActiveSheet();
2404
2406
  if (!l) return [];
2405
2407
  const d = s.getUnitId(), c = l.getSheetId(), u = await this.formulaService.getRuleFormulaResult(d, c, e.uid);
2406
- return A(n) ? ra((m = u == null ? void 0 : u[0]) == null ? void 0 : m.result) : Qe(n);
2408
+ return A(n) ? na((m = u == null ? void 0 : u[0]) == null ? void 0 : m.result) : Ze(n);
2407
2409
  }
2408
2410
  getListWithColor(e, r, o) {
2409
2411
  const n = this.getList(e, r, o), i = (e.formula2 || "").split(",");
@@ -2416,15 +2418,15 @@ class eo extends Ye {
2416
2418
  }), i;
2417
2419
  }
2418
2420
  }
2419
- function xt(a) {
2421
+ function $t(a) {
2420
2422
  let t = a;
2421
2423
  return typeof a == "string" ? ((a.startsWith("¥") || a.startsWith("$")) && (t = a.slice(1)), +t) : +a;
2422
2424
  }
2423
- class ws extends Ye {
2425
+ class Ds extends Xe {
2424
2426
  constructor() {
2425
2427
  super(...arguments);
2426
2428
  S(this, "_formulaService", this.injector.get(ce));
2427
- S(this, "id", B.DECIMAL);
2429
+ S(this, "id", H.DECIMAL);
2428
2430
  S(this, "title", "dataValidation.decimal.title");
2429
2431
  S(this, "operators", [
2430
2432
  V.BETWEEN,
@@ -2437,21 +2439,21 @@ class ws extends Ye {
2437
2439
  V.NOT_EQUAL
2438
2440
  ]);
2439
2441
  S(this, "scopes", ["sheet"]);
2440
- S(this, "formulaInput", Rt);
2442
+ S(this, "formulaInput", Mt);
2441
2443
  S(this, "dropDownInput");
2442
2444
  }
2443
2445
  _isFormulaOrNumber(e) {
2444
- return !Y.isBlank(e) && (A(e) || !Number.isNaN(+e));
2446
+ return !X.isBlank(e) && (A(e) || !Number.isNaN(+e));
2445
2447
  }
2446
2448
  async isValidType(e, r, o) {
2447
2449
  const { value: n } = e;
2448
- return !Number.isNaN(xt(n));
2450
+ return !Number.isNaN($t(n));
2449
2451
  }
2450
2452
  transform(e, r, o) {
2451
2453
  const { value: n } = e;
2452
2454
  return {
2453
2455
  ...e,
2454
- value: xt(n)
2456
+ value: $t(n)
2455
2457
  };
2456
2458
  }
2457
2459
  _parseNumber(e) {
@@ -2471,7 +2473,7 @@ class ws extends Ye {
2471
2473
  return {
2472
2474
  success: !1
2473
2475
  };
2474
- const i = Y.isDefine(e.formula1) && this._isFormulaOrNumber(e.formula1), s = Y.isDefine(e.formula2) && this._isFormulaOrNumber(e.formula2), l = Gt.includes(n), d = this.localeService.t("dataValidation.validFail.number");
2476
+ const i = X.isDefine(e.formula1) && this._isFormulaOrNumber(e.formula1), s = X.isDefine(e.formula2) && this._isFormulaOrNumber(e.formula2), l = zt.includes(n), d = this.localeService.t("dataValidation.validFail.number");
2475
2477
  return l ? {
2476
2478
  success: i && s,
2477
2479
  formula1: i ? void 0 : d,
@@ -2520,11 +2522,11 @@ class ws extends Ye {
2520
2522
  return Number.isNaN(n) ? !0 : e.value <= n;
2521
2523
  }
2522
2524
  }
2523
- const ys = "{FORMULA1}", Ds = "{FORMULA2}";
2524
- class Es extends Ye {
2525
+ const Es = "{FORMULA1}", bs = "{FORMULA2}";
2526
+ class Os extends Xe {
2525
2527
  constructor() {
2526
2528
  super(...arguments);
2527
- S(this, "id", B.TEXT_LENGTH);
2529
+ S(this, "id", H.TEXT_LENGTH);
2528
2530
  S(this, "title", "dataValidation.textLength.title");
2529
2531
  S(this, "operators", [
2530
2532
  V.BETWEEN,
@@ -2537,11 +2539,11 @@ class Es extends Ye {
2537
2539
  V.NOT_EQUAL
2538
2540
  ]);
2539
2541
  S(this, "scopes", ["sheet"]);
2540
- S(this, "formulaInput", Rt);
2542
+ S(this, "formulaInput", Mt);
2541
2543
  S(this, "_formulaService", this.injector.get(ce));
2542
2544
  }
2543
2545
  _isFormulaOrInt(e) {
2544
- return !Y.isBlank(e) && (A(e) || !Number.isNaN(+e) && Number.isInteger(+e));
2546
+ return !X.isBlank(e) && (A(e) || !Number.isNaN(+e) && Number.isInteger(+e));
2545
2547
  }
2546
2548
  validatorFormula(e, r, o) {
2547
2549
  const n = e.operator;
@@ -2549,7 +2551,7 @@ class Es extends Ye {
2549
2551
  return {
2550
2552
  success: !1
2551
2553
  };
2552
- const i = Y.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), s = Y.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = Gt.includes(n), d = this.localeService.t("dataValidation.validFail.number");
2554
+ const i = X.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), s = X.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = zt.includes(n), d = this.localeService.t("dataValidation.validFail.number");
2553
2555
  return l ? {
2554
2556
  success: i && s,
2555
2557
  formula1: i ? void 0 : d,
@@ -2585,11 +2587,11 @@ class Es extends Ye {
2585
2587
  }
2586
2588
  async validatorIsEqual(e, r, o) {
2587
2589
  const { formula1: n } = r;
2588
- return Y.isDefine(n) ? e.value === n : !1;
2590
+ return X.isDefine(n) ? e.value === n : !1;
2589
2591
  }
2590
2592
  async validatorIsNotEqual(e, r, o) {
2591
2593
  const { formula1: n } = r;
2592
- return Y.isDefine(n) ? e.value !== n : !1;
2594
+ return X.isDefine(n) ? e.value !== n : !1;
2593
2595
  }
2594
2596
  async validatorIsBetween(e, r, o) {
2595
2597
  const { formula1: n, formula2: i } = r, { value: s } = e;
@@ -2623,26 +2625,26 @@ class Es extends Ye {
2623
2625
  }
2624
2626
  generateRuleErrorMessage(e) {
2625
2627
  var o, n;
2626
- return e.operator ? `${this.localeService.t(No[e.operator]).replace(ys, (o = e.formula1) != null ? o : "").replace(Ds, (n = e.formula2) != null ? n : "")}` : this.titleStr;
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;
2627
2629
  }
2628
2630
  }
2629
- function to(a) {
2631
+ function oo(a) {
2630
2632
  var e, r;
2631
- return a ? a.p ? !((r = (e = a.p.body) == null ? void 0 : e.dataStream) != null ? r : "").slice(0, -2).trim() : Y.isBlank(a.v) : !0;
2633
+ 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;
2632
2634
  }
2633
- function tt(a, t, e, r) {
2634
- const o = [], n = [], s = r.get(z).ensureManager(a, t), l = r.get(J), d = Wt(l, { unitId: a, subUnitId: t });
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 });
2635
2637
  if (!d)
2636
2638
  return {
2637
2639
  redoMutations: o,
2638
2640
  undoMutations: n
2639
2641
  };
2640
- const { worksheet: c } = d, u = new ke();
2642
+ const { worksheet: c } = d, u = new Ye();
2641
2643
  function f(h, R) {
2642
2644
  h.forEach((g) => {
2643
2645
  W.foreach(g, (C, _) => {
2644
- const M = c.getCellRaw(C, _), y = Nr(M);
2645
- (to(M) || y === R) && u.setValue(C, _, {
2646
+ const M = c.getCellRaw(C, _), I = Lr(M);
2647
+ (oo(M) || I === R) && u.setValue(C, _, {
2646
2648
  v: R,
2647
2649
  p: null
2648
2650
  });
@@ -2653,14 +2655,14 @@ function tt(a, t, e, r) {
2653
2655
  switch (h.type) {
2654
2656
  case "delete":
2655
2657
  o.push({
2656
- id: Ot.id,
2658
+ id: Ft.id,
2657
2659
  params: {
2658
2660
  unitId: a,
2659
2661
  subUnitId: t,
2660
2662
  ruleId: h.rule.uid
2661
2663
  }
2662
2664
  }), n.unshift({
2663
- id: pa.id,
2665
+ id: va.id,
2664
2666
  params: {
2665
2667
  unitId: a,
2666
2668
  subUnitId: t,
@@ -2694,29 +2696,29 @@ function tt(a, t, e, r) {
2694
2696
  }
2695
2697
  });
2696
2698
  const R = s.getRuleById(h.ruleId);
2697
- if (R && R.type === B.CHECKBOX) {
2698
- const C = s.getValidator(B.CHECKBOX).parseFormulaSync(R, a, t);
2699
+ if (R && R.type === H.CHECKBOX) {
2700
+ const C = s.getValidator(H.CHECKBOX).parseFormulaSync(R, a, t);
2699
2701
  f(h.newRanges, C.formula2);
2700
2702
  }
2701
2703
  break;
2702
2704
  }
2703
2705
  case "add": {
2704
2706
  if (o.push({
2705
- id: pa.id,
2707
+ id: va.id,
2706
2708
  params: {
2707
2709
  unitId: a,
2708
2710
  subUnitId: t,
2709
2711
  rule: h.rule
2710
2712
  }
2711
2713
  }), n.unshift({
2712
- id: Ot.id,
2714
+ id: Ft.id,
2713
2715
  params: {
2714
2716
  unitId: a,
2715
2717
  subUnitId: t,
2716
2718
  ruleId: h.rule.uid
2717
2719
  }
2718
- }), h.rule.type === B.CHECKBOX) {
2719
- const g = s.getValidator(B.CHECKBOX).parseFormulaSync(h.rule, a, t);
2720
+ }), h.rule.type === H.CHECKBOX) {
2721
+ const g = s.getValidator(H.CHECKBOX).parseFormulaSync(h.rule, a, t);
2720
2722
  f(h.rule.ranges, g.formula2);
2721
2723
  }
2722
2724
  break;
@@ -2724,57 +2726,57 @@ function tt(a, t, e, r) {
2724
2726
  }
2725
2727
  });
2726
2728
  const p = {
2727
- id: Nt.id,
2729
+ id: Lt.id,
2728
2730
  params: {
2729
2731
  unitId: a,
2730
2732
  subUnitId: t,
2731
2733
  cellValue: u.getData()
2732
2734
  }
2733
2735
  }, m = {
2734
- id: Nt.id,
2735
- params: _r(r, p.params)
2736
+ id: Lt.id,
2737
+ params: Rr(r, p.params)
2736
2738
  };
2737
2739
  return o.push(p), n.push(m), {
2738
2740
  redoMutations: o,
2739
2741
  undoMutations: n
2740
2742
  };
2741
2743
  }
2742
- const qt = {
2744
+ const Kt = {
2743
2745
  type: Ie.COMMAND,
2744
2746
  id: "sheet.command.updateDataValidationRuleRange",
2745
2747
  async handler(a, t) {
2746
2748
  if (!t)
2747
2749
  return !1;
2748
- const { unitId: e, subUnitId: r, ranges: o, ruleId: n } = t, i = a.get(z), s = a.get(ee), l = a.get(Ht), d = i.ensureManager(e, r), c = d.getRuleById(n);
2750
+ const { unitId: e, subUnitId: r, ranges: o, ruleId: n } = t, i = a.get(q), s = a.get(ee), l = a.get(kt), d = i.ensureManager(e, r), c = d.getRuleById(n);
2749
2751
  if (!c)
2750
2752
  return !1;
2751
2753
  const u = c.ranges, f = d.getRuleObjectMatrix().clone();
2752
2754
  f.updateRange(n, u, o);
2753
- const p = f.diff(d.getDataValidations()), { redoMutations: m, undoMutations: h } = tt(e, r, p, a);
2755
+ const p = f.diff(d.getDataValidations()), { redoMutations: m, undoMutations: h } = rt(e, r, p, a);
2754
2756
  return l.pushUndoRedo({
2755
2757
  undoMutations: h,
2756
2758
  redoMutations: m,
2757
2759
  unitID: e
2758
- }), await hr(m, s), !0;
2760
+ }), await fr(m, s), !0;
2759
2761
  }
2760
- }, zt = {
2762
+ }, Qt = {
2761
2763
  type: Ie.COMMAND,
2762
2764
  id: "sheet.command.addDataValidation",
2763
2765
  async handler(a, t) {
2764
2766
  if (!t)
2765
2767
  return !1;
2766
- const { unitId: e, subUnitId: r, rule: o } = t, n = a.get(z), i = a.get(ee), s = a.get(Ht), l = n.ensureManager(e, r), d = l.getRuleObjectMatrix().clone();
2768
+ const { unitId: e, subUnitId: r, rule: o } = t, n = a.get(q), i = a.get(ee), s = a.get(kt), l = n.ensureManager(e, r), d = l.getRuleObjectMatrix().clone();
2767
2769
  d.addRule(o);
2768
2770
  const c = d.diff(l.getDataValidations()), u = {
2769
2771
  unitId: e,
2770
2772
  subUnitId: r,
2771
2773
  rule: o
2772
- }, { redoMutations: f, undoMutations: p } = tt(e, r, c, a);
2774
+ }, { redoMutations: f, undoMutations: p } = rt(e, r, c, a);
2773
2775
  return f.push({
2774
- id: pa.id,
2776
+ id: va.id,
2775
2777
  params: u
2776
2778
  }), p.unshift({
2777
- id: Ot.id,
2779
+ id: Ft.id,
2778
2780
  params: {
2779
2781
  unitId: e,
2780
2782
  subUnitId: r,
@@ -2784,32 +2786,32 @@ const qt = {
2784
2786
  unitID: e,
2785
2787
  redoMutations: f,
2786
2788
  undoMutations: p
2787
- }), await hr(f, i), !0;
2789
+ }), await fr(f, i), !0;
2788
2790
  }
2789
- }, ka = {
2791
+ }, Xa = {
2790
2792
  type: Ie.COMMAND,
2791
2793
  id: "data-validation.command.addRuleAndOpen",
2792
2794
  async handler(a) {
2793
- const t = a.get(J), e = Wt(t);
2795
+ const t = a.get(J), e = Yt(t);
2794
2796
  if (!e) return !1;
2795
- const { workbook: r, worksheet: o } = e, n = gr(a), i = a.get(ee), s = r.getUnitId(), l = o.getSheetId(), d = {
2797
+ const { workbook: r, worksheet: o } = e, n = _r(a), i = a.get(ee), s = r.getUnitId(), l = o.getSheetId(), d = {
2796
2798
  rule: n,
2797
2799
  unitId: s,
2798
2800
  subUnitId: l
2799
2801
  };
2800
- return await i.executeCommand(zt.id, d) ? (i.executeCommand(at.id, {
2802
+ return await i.executeCommand(Qt.id, d) ? (i.executeCommand(ot.id, {
2801
2803
  ruleId: n.uid,
2802
2804
  isAdd: !0
2803
2805
  }), !0) : !1;
2804
2806
  }
2805
- }, wa = {
2807
+ }, Da = {
2806
2808
  type: Ie.COMMAND,
2807
2809
  id: "sheets.command.update-data-validation-setting",
2808
2810
  // eslint-disable-next-line max-lines-per-function
2809
2811
  handler(a, t) {
2810
2812
  if (!t)
2811
2813
  return !1;
2812
- const e = a.get(ee), r = a.get(Ht), o = a.get(z), n = a.get(we), { unitId: i, subUnitId: s, ruleId: l, setting: d } = t, c = n.getValidatorItem(d.type);
2814
+ const e = a.get(ee), r = a.get(kt), o = a.get(q), n = a.get(we), { unitId: i, subUnitId: s, ruleId: l, setting: d } = t, c = n.getValidatorItem(d.type);
2813
2815
  if (!c)
2814
2816
  return !1;
2815
2817
  const u = o.getRuleById(i, s, l);
@@ -2832,55 +2834,55 @@ const qt = {
2832
2834
  ruleId: l,
2833
2835
  payload: {
2834
2836
  type: fe.SETTING,
2835
- payload: fa(u)
2837
+ payload: ga(u)
2836
2838
  }
2837
2839
  }, h = [{
2838
2840
  id: pe.id,
2839
2841
  params: m
2840
2842
  }];
2841
- if (d.type === B.CHECKBOX) {
2842
- const g = u.ranges, C = a.get(J), _ = Wt(C, { unitId: i, subUnitId: s });
2843
+ if (d.type === H.CHECKBOX) {
2844
+ const g = u.ranges, C = a.get(J), _ = Yt(C, { unitId: i, subUnitId: s });
2843
2845
  if (_) {
2844
- const M = new ke(), { worksheet: y } = _, { formula2: D = vt, formula1: E = gt } = u, { formula2: x = vt, formula1: T = gt } = d;
2845
- g.forEach((P) => {
2846
- W.foreach(P, (U, O) => {
2847
- const L = y.getCellRaw(U, O), H = Nr(L);
2848
- to(L) || H === String(D) ? M.setValue(U, O, {
2846
+ const M = new Ye(), { worksheet: I } = _, { formula2: D = Rt, formula1: E = St } = u, { formula2: x = Rt, formula1: T = St } = d;
2847
+ g.forEach((L) => {
2848
+ W.foreach(L, (B, U) => {
2849
+ const b = I.getCellRaw(B, U), $ = Lr(b);
2850
+ oo(b) || $ === String(D) ? M.setValue(B, U, {
2849
2851
  v: x,
2850
2852
  p: null
2851
- }) : H === String(E) && M.setValue(U, O, {
2853
+ }) : $ === String(E) && M.setValue(B, U, {
2852
2854
  v: T,
2853
2855
  p: null
2854
2856
  });
2855
2857
  });
2856
2858
  });
2857
- const F = {
2858
- id: Nt.id,
2859
+ const O = {
2860
+ id: Lt.id,
2859
2861
  params: {
2860
2862
  unitId: i,
2861
2863
  subUnitId: s,
2862
2864
  cellValue: M.getData()
2863
2865
  }
2864
- }, b = {
2865
- id: Nt.id,
2866
- params: _r(a, F.params)
2866
+ }, F = {
2867
+ id: Lt.id,
2868
+ params: Rr(a, O.params)
2867
2869
  };
2868
- p.push(F), h.push(b);
2870
+ p.push(O), h.push(F);
2869
2871
  }
2870
2872
  }
2871
- return Oa(p, e).result ? (r.pushUndoRedo({
2873
+ return Ta(p, e).result ? (r.pushUndoRedo({
2872
2874
  unitID: i,
2873
2875
  redoMutations: p,
2874
2876
  undoMutations: h
2875
2877
  }), !0) : !1;
2876
2878
  }
2877
- }, ao = {
2879
+ }, no = {
2878
2880
  type: Ie.COMMAND,
2879
2881
  id: "sheets.command.update-data-validation-options",
2880
2882
  handler(a, t) {
2881
2883
  if (!t)
2882
2884
  return !1;
2883
- const e = a.get(ee), r = a.get(Ht), o = a.get(z), { unitId: n, subUnitId: i, ruleId: s, options: l } = t, d = o.getRuleById(n, i, s);
2885
+ const e = a.get(ee), r = a.get(kt), o = a.get(q), { unitId: n, subUnitId: i, ruleId: s, options: l } = t, d = o.getRuleById(n, i, s);
2884
2886
  if (!d)
2885
2887
  return !1;
2886
2888
  const c = {
@@ -2900,7 +2902,7 @@ const qt = {
2900
2902
  ruleId: s,
2901
2903
  payload: {
2902
2904
  type: fe.OPTIONS,
2903
- payload: ma(d)
2905
+ payload: pa(d)
2904
2906
  }
2905
2907
  }, p = [{
2906
2908
  id: pe.id,
@@ -2912,56 +2914,56 @@ const qt = {
2912
2914
  undoMutations: p
2913
2915
  }), e.executeCommand(pe.id, c), !0;
2914
2916
  }
2915
- }, ro = "data-validation-single", Ya = "sheet.menu.data-validation";
2916
- function bs(a) {
2917
+ }, io = "data-validation-single", Ga = "sheet.menu.data-validation";
2918
+ function Ns(a) {
2917
2919
  return {
2918
- id: Ya,
2919
- type: Pa.SUBITEMS,
2920
- positions: [tn.TOOLBAR_START],
2921
- group: an.TOOLBAR_FORMULAS_INSERT,
2922
- icon: ro,
2920
+ id: Ga,
2921
+ type: xa.SUBITEMS,
2922
+ positions: [on.TOOLBAR_START],
2923
+ group: nn.TOOLBAR_FORMULAS_INSERT,
2924
+ icon: io,
2923
2925
  tooltip: "dataValidation.title",
2924
- hidden$: rn(a, re.UNIVER_SHEET),
2925
- disabled$: Ho(a, { workbookTypes: [ga], worksheetTypes: [va, _a], rangeTypes: [Sa] })
2926
+ hidden$: sn(a, re.UNIVER_SHEET),
2927
+ disabled$: Yo(a, { workbookTypes: [_a], worksheetTypes: [Sa, Ra], rangeTypes: [Ca] })
2926
2928
  };
2927
2929
  }
2928
- function Os(a) {
2930
+ function Ts(a) {
2929
2931
  return {
2930
- id: at.id,
2932
+ id: ot.id,
2931
2933
  title: "dataValidation.panel.title",
2932
- type: Pa.BUTTON,
2933
- positions: [Ya]
2934
+ type: xa.BUTTON,
2935
+ positions: [Ga]
2934
2936
  };
2935
2937
  }
2936
- function Ns(a) {
2938
+ function Fs(a) {
2937
2939
  return {
2938
- id: ka.id,
2940
+ id: Xa.id,
2939
2941
  title: "dataValidation.panel.add",
2940
- type: Pa.BUTTON,
2941
- positions: [Ya]
2942
+ type: xa.BUTTON,
2943
+ positions: [Ga]
2942
2944
  };
2943
2945
  }
2944
- var Ts = Object.defineProperty, Fs = Object.getOwnPropertyDescriptor, oo = (a, t, e, r) => {
2945
- for (var o = r > 1 ? void 0 : r ? Fs(t, e) : t, n = a.length - 1, i; n >= 0; n--)
2946
+ var Ls = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, so = (a, t, e, r) => {
2947
+ for (var o = r > 1 ? void 0 : r ? Ps(t, e) : t, n = a.length - 1, i; n >= 0; n--)
2946
2948
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
2947
- return r && o && Ts(t, e, o), o;
2949
+ return r && o && Ls(t, e, o), o;
2948
2950
  }, Q = (a, t) => (e, r) => t(e, r, a);
2949
- const no = {}, io = {
2951
+ const lo = {}, co = {
2950
2952
  tr: {
2951
2953
  size: 6,
2952
2954
  color: "#fe4b4b"
2953
2955
  }
2954
2956
  };
2955
- let dt = class extends Na {
2957
+ let ht = class extends Fa {
2956
2958
  constructor(a, t, e, r, o, n, i, s, l, d, c, u, f) {
2957
2959
  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();
2958
2960
  }
2959
2961
  _initMenu() {
2960
2962
  const { menu: a = {} } = this._config;
2961
2963
  [
2962
- bs,
2963
- Os,
2964
- Ns
2964
+ Ns,
2965
+ Ts,
2966
+ Fs
2965
2967
  ].forEach((t) => {
2966
2968
  this.disposeWithMe(
2967
2969
  this._menuService.addMenuItem(t(this._injector), a)
@@ -3016,25 +3018,25 @@ let dt = class extends Na {
3016
3018
  if (!t) return;
3017
3019
  const e = t.getUnitId(), r = (i = t.getActiveSheet()) == null ? void 0 : i.getSheetId();
3018
3020
  if (!r) return;
3019
- const o = (l = (s = this._renderManagerService.getRenderById(e)) == null ? void 0 : s.with(Tt).getWorksheetSkeleton(r)) == null ? void 0 : l.skeleton, n = this._renderManagerService.getRenderById(e);
3021
+ const o = (l = (s = this._renderManagerService.getRenderById(e)) == null ? void 0 : s.with(Pt).getWorksheetSkeleton(r)) == null ? void 0 : l.skeleton, n = this._renderManagerService.getRenderById(e);
3020
3022
  o == null || o.makeDirty(!0), o == null || o.calculate(), n && n.mainComponent.makeForceDirty();
3021
3023
  };
3022
- this.disposeWithMe(this._dataValidationModel.ruleChange$.subscribe(() => a())), this.disposeWithMe(this._dataValidationModel.validStatusChange$.subscribe(() => a()));
3024
+ this.disposeWithMe(this._dataValidationModel.ruleChange$.pipe(He(16)).subscribe(() => a())), this.disposeWithMe(this._dataValidationModel.validStatusChange$.pipe(He(16)).subscribe(() => a()));
3023
3025
  }
3024
3026
  // eslint-disable-next-line max-lines-per-function
3025
3027
  _initViewModelIntercept() {
3026
3028
  this.disposeWithMe(
3027
3029
  this._sheetInterceptorService.intercept(
3028
- Sr.CELL_CONTENT,
3030
+ Cr.CELL_CONTENT,
3029
3031
  {
3030
3032
  priority: 200,
3031
3033
  // eslint-disable-next-line max-lines-per-function, complexity
3032
3034
  handler: (a, t, e) => {
3033
- var M, y, D, E, x, T;
3035
+ var M, I, D, E, x, T;
3034
3036
  const { row: r, col: o, unitId: n, subUnitId: i, workbook: s, worksheet: l } = t, d = this._dataValidationModel.ensureManager(n, i);
3035
3037
  if (!d)
3036
3038
  return e(a);
3037
- const c = (y = (M = this._renderManagerService.getRenderById(n)) == null ? void 0 : M.with(Tt).getWorksheetSkeleton(i)) == null ? void 0 : y.skeleton;
3039
+ const c = (I = (M = this._renderManagerService.getRenderById(n)) == null ? void 0 : M.with(Pt).getWorksheetSkeleton(i)) == null ? void 0 : I.skeleton;
3038
3040
  if (!c)
3039
3041
  return e(a);
3040
3042
  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);
@@ -3045,24 +3047,24 @@ let dt = class extends Na {
3045
3047
  return e(a);
3046
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);
3047
3049
  let _ = {};
3048
- if ((m.type === B.LIST || m.type === B.LIST_MULTIPLE) && (_ = {
3050
+ if ((m.type === H.LIST || m.type === H.LIST_MULTIPLE) && (_ = {
3049
3051
  interceptorStyle: {
3050
3052
  ...a == null ? void 0 : a.interceptorStyle,
3051
3053
  tb: (D = f.tb !== se.OVERFLOW ? f.tb : se.CLIP) != null ? D : se.WRAP
3052
3054
  }
3053
- }), m.type === B.CHECKBOX && (_ = {
3055
+ }), m.type === H.CHECKBOX && (_ = {
3054
3056
  interceptorStyle: {
3055
3057
  ...a == null ? void 0 : a.interceptorStyle,
3056
3058
  tb: se.CLIP
3057
3059
  }
3058
- }), m.type === B.LIST && (m.renderMode === le.ARROW || m.renderMode === le.TEXT)) {
3059
- const F = g.getListWithColorMap(m), b = `${(E = ae(a)) != null ? E : ""}`, P = F[b];
3060
- P && (_ = {
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];
3062
+ L && (_ = {
3061
3063
  ..._,
3062
3064
  interceptorStyle: {
3063
3065
  ..._.interceptorStyle,
3064
3066
  bg: {
3065
- rgb: P
3067
+ rgb: L
3066
3068
  }
3067
3069
  }
3068
3070
  });
@@ -3078,7 +3080,7 @@ let dt = class extends Na {
3078
3080
  },
3079
3081
  markers: {
3080
3082
  ...a == null ? void 0 : a.markers,
3081
- ...R === Ce.INVALID ? io : null
3083
+ ...R === Ce.INVALID ? co : null
3082
3084
  },
3083
3085
  customRender: [
3084
3086
  ...(x = a == null ? void 0 : a.customRender) != null ? x : [],
@@ -3095,11 +3097,11 @@ let dt = class extends Na {
3095
3097
  ..._.interceptorStyle
3096
3098
  },
3097
3099
  get interceptorAutoHeight() {
3098
- var P, U, O, L;
3099
- const F = c.mergeData.find((H) => {
3100
- const { startColumn: K, startRow: k, endColumn: w, endRow: j } = H;
3101
- return r >= k && o >= K && r <= j && o <= w;
3102
- }), b = {
3100
+ var L, B, U, b;
3101
+ const O = c.mergeData.find(($) => {
3102
+ const { startColumn: z, startRow: k, endColumn: y, endRow: P } = $;
3103
+ return r >= k && o >= z && r <= P && o <= y;
3104
+ }), F = {
3103
3105
  data: {
3104
3106
  ...a,
3105
3107
  dataValidation: {
@@ -3110,7 +3112,7 @@ let dt = class extends Na {
3110
3112
  }
3111
3113
  },
3112
3114
  style: c.getsStyles().getStyleByCell(a),
3113
- primaryWithCoord: c.getCellByIndex((P = F == null ? void 0 : F.startRow) != null ? P : r, (U = F == null ? void 0 : F.startColumn) != null ? U : o),
3115
+ primaryWithCoord: c.getCellByIndex((L = O == null ? void 0 : O.startRow) != null ? L : r, (B = O == null ? void 0 : O.startColumn) != null ? B : o),
3114
3116
  unitId: n,
3115
3117
  subUnitId: i,
3116
3118
  row: r,
@@ -3118,9 +3120,9 @@ let dt = class extends Na {
3118
3120
  workbook: s,
3119
3121
  worksheet: l
3120
3122
  };
3121
- return (L = (O = g == null ? void 0 : g.canvasRender) == null ? void 0 : O.calcCellAutoHeight) == null ? void 0 : L.call(O, b);
3123
+ return (b = (U = g == null ? void 0 : g.canvasRender) == null ? void 0 : U.calcCellAutoHeight) == null ? void 0 : b.call(U, F);
3122
3124
  },
3123
- coverable: ((T = a == null ? void 0 : a.coverable) != null ? T : !0) && !(m.type === B.LIST || m.type === B.LIST_MULTIPLE)
3125
+ coverable: ((T = a == null ? void 0 : a.coverable) != null ? T : !0) && !(m.type === H.LIST || m.type === H.LIST_MULTIPLE)
3124
3126
  });
3125
3127
  }
3126
3128
  }
@@ -3128,31 +3130,34 @@ let dt = class extends Na {
3128
3130
  );
3129
3131
  }
3130
3132
  _initAutoHeight() {
3131
- this._dataValidationModel.ruleChange$.subscribe((a) => {
3132
- var t;
3133
- if ((t = a.rule) != null && t.ranges) {
3134
- const e = this._autoHeightController.getUndoRedoParamsOfAutoHeight(a.rule.ranges);
3135
- Oa(e.redos, this._commandService);
3133
+ this._dataValidationModel.ruleChange$.pipe(Or(16)).subscribe((a) => {
3134
+ const t = [];
3135
+ if (a.forEach((e) => {
3136
+ var r;
3137
+ (r = e.rule) != null && r.ranges && t.push(...e.rule.ranges);
3138
+ }), t.length) {
3139
+ const e = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
3140
+ Ta(e.redos, this._commandService);
3136
3141
  }
3137
3142
  });
3138
3143
  }
3139
3144
  };
3140
- dt = oo([
3141
- ve(_e.Rendered, dt),
3145
+ ht = so([
3146
+ ve(_e.Rendered, ht),
3142
3147
  Q(1, ee),
3143
- Q(2, on),
3144
- Q(3, Aa),
3148
+ Q(2, ln),
3149
+ Q(3, ja),
3145
3150
  Q(4, J),
3146
- Q(5, I(Cr)),
3147
- Q(6, I(St)),
3148
- Q(7, I(Ne)),
3149
- Q(8, I(z)),
3150
- Q(9, I(we)),
3151
- Q(10, I(Ee)),
3152
- Q(11, I(Fa)),
3153
- Q(12, wo(La))
3154
- ], dt);
3155
- let ct = class extends Na {
3151
+ Q(5, w(Mr)),
3152
+ Q(6, w(Vt)),
3153
+ Q(7, w(Oe)),
3154
+ Q(8, w(q)),
3155
+ Q(9, w(we)),
3156
+ Q(10, w(De)),
3157
+ Q(11, w(Pa)),
3158
+ Q(12, Oo(Aa))
3159
+ ], ht);
3160
+ let mt = class extends Fa {
3156
3161
  constructor(a, t, e, r, o, n, i, s) {
3157
3162
  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();
3158
3163
  }
@@ -3163,25 +3168,25 @@ let ct = class extends Na {
3163
3168
  if (!t) return;
3164
3169
  const e = t.getUnitId(), r = (i = t.getActiveSheet()) == null ? void 0 : i.getSheetId();
3165
3170
  if (!r) return;
3166
- const o = (l = (s = this._renderManagerService.getRenderById(e)) == null ? void 0 : s.with(Tt).getWorksheetSkeleton(r)) == null ? void 0 : l.skeleton, n = this._renderManagerService.getRenderById(e);
3171
+ const o = (l = (s = this._renderManagerService.getRenderById(e)) == null ? void 0 : s.with(Pt).getWorksheetSkeleton(r)) == null ? void 0 : l.skeleton, n = this._renderManagerService.getRenderById(e);
3167
3172
  o == null || o.makeDirty(!0), o == null || o.calculate(), n && n.mainComponent.makeForceDirty();
3168
3173
  };
3169
- this.disposeWithMe(this._dataValidationModel.ruleChange$.subscribe(() => a())), this.disposeWithMe(this._dataValidationModel.validStatusChange$.subscribe(() => a()));
3174
+ this.disposeWithMe(this._dataValidationModel.ruleChange$.pipe(He(16)).subscribe(() => a())), this.disposeWithMe(this._dataValidationModel.validStatusChange$.pipe(He(16)).subscribe(() => a()));
3170
3175
  }
3171
3176
  // eslint-disable-next-line max-lines-per-function
3172
3177
  _initViewModelIntercept() {
3173
3178
  this.disposeWithMe(
3174
3179
  this._sheetInterceptorService.intercept(
3175
- Sr.CELL_CONTENT,
3180
+ Cr.CELL_CONTENT,
3176
3181
  {
3177
3182
  priority: 200,
3178
3183
  // eslint-disable-next-line max-lines-per-function
3179
3184
  handler: (a, t, e) => {
3180
- var M, y, D, E, x;
3185
+ var M, I, D, E, x;
3181
3186
  const { row: r, col: o, unitId: n, subUnitId: i, workbook: s, worksheet: l } = t, d = this._dataValidationModel.ensureManager(n, i);
3182
3187
  if (!d)
3183
3188
  return e(a);
3184
- const c = (y = (M = this._renderManagerService.getRenderById(n)) == null ? void 0 : M.with(Tt).getWorksheetSkeleton(i)) == null ? void 0 : y.skeleton;
3189
+ const c = (I = (M = this._renderManagerService.getRenderById(n)) == null ? void 0 : M.with(Pt).getWorksheetSkeleton(i)) == null ? void 0 : I.skeleton;
3185
3190
  if (!c)
3186
3191
  return e(a);
3187
3192
  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);
@@ -3192,24 +3197,24 @@ let ct = class extends Na {
3192
3197
  return e(a);
3193
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);
3194
3199
  let _ = {};
3195
- if ((m.type === B.LIST || m.type === B.LIST_MULTIPLE) && (_ = {
3200
+ if ((m.type === H.LIST || m.type === H.LIST_MULTIPLE) && (_ = {
3196
3201
  interceptorStyle: {
3197
3202
  ...a == null ? void 0 : a.interceptorStyle,
3198
3203
  tb: (D = f.tb !== se.OVERFLOW ? f.tb : se.CLIP) != null ? D : se.WRAP
3199
3204
  }
3200
- }), m.type === B.CHECKBOX && (_ = {
3205
+ }), m.type === H.CHECKBOX && (_ = {
3201
3206
  interceptorStyle: {
3202
3207
  ...a == null ? void 0 : a.interceptorStyle,
3203
3208
  tb: se.CLIP
3204
3209
  }
3205
- }), m.type === B.LIST && (m.renderMode === le.ARROW || m.renderMode === le.TEXT)) {
3206
- const T = g.getListWithColorMap(m), F = `${(E = ae(a)) != null ? E : ""}`, b = T[F];
3207
- b && (_ = {
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];
3212
+ F && (_ = {
3208
3213
  ..._,
3209
3214
  interceptorStyle: {
3210
3215
  ..._.interceptorStyle,
3211
3216
  bg: {
3212
- rgb: b
3217
+ rgb: F
3213
3218
  }
3214
3219
  }
3215
3220
  });
@@ -3225,7 +3230,7 @@ let ct = class extends Na {
3225
3230
  },
3226
3231
  markers: {
3227
3232
  ...a == null ? void 0 : a.markers,
3228
- ...R === Ce.INVALID ? io : null
3233
+ ...R === Ce.INVALID ? co : null
3229
3234
  },
3230
3235
  customRender: [
3231
3236
  ...(x = a == null ? void 0 : a.customRender) != null ? x : [],
@@ -3242,11 +3247,11 @@ let ct = class extends Na {
3242
3247
  ..._.interceptorStyle
3243
3248
  },
3244
3249
  get interceptorAutoHeight() {
3245
- var b, P, U, O;
3246
- const T = c.mergeData.find((L) => {
3247
- const { startColumn: H, startRow: K, endColumn: k, endRow: w } = L;
3248
- return r >= K && o >= H && r <= w && o <= k;
3249
- }), F = {
3250
+ var F, L, B, U;
3251
+ const T = c.mergeData.find((b) => {
3252
+ const { startColumn: $, startRow: z, endColumn: k, endRow: y } = b;
3253
+ return r >= z && o >= $ && r <= y && o <= k;
3254
+ }), O = {
3250
3255
  data: {
3251
3256
  ...a,
3252
3257
  dataValidation: {
@@ -3257,7 +3262,7 @@ let ct = class extends Na {
3257
3262
  }
3258
3263
  },
3259
3264
  style: c.getsStyles().getStyleByCell(a),
3260
- primaryWithCoord: c.getCellByIndex((b = T == null ? void 0 : T.startRow) != null ? b : r, (P = T == null ? void 0 : T.startColumn) != null ? P : o),
3265
+ primaryWithCoord: c.getCellByIndex((F = T == null ? void 0 : T.startRow) != null ? F : r, (L = T == null ? void 0 : T.startColumn) != null ? L : o),
3261
3266
  unitId: n,
3262
3267
  subUnitId: i,
3263
3268
  row: r,
@@ -3265,7 +3270,7 @@ let ct = class extends Na {
3265
3270
  worksheet: l,
3266
3271
  workbook: s
3267
3272
  };
3268
- return (O = (U = g == null ? void 0 : g.canvasRender) == null ? void 0 : U.calcCellAutoHeight) == null ? void 0 : O.call(U, F);
3273
+ return (U = (B = g == null ? void 0 : g.canvasRender) == null ? void 0 : B.calcCellAutoHeight) == null ? void 0 : U.call(B, O);
3269
3274
  }
3270
3275
  });
3271
3276
  }
@@ -3274,35 +3279,38 @@ let ct = class extends Na {
3274
3279
  );
3275
3280
  }
3276
3281
  _initAutoHeight() {
3277
- this._dataValidationModel.ruleChange$.subscribe((a) => {
3278
- var t;
3279
- if ((t = a.rule) != null && t.ranges) {
3280
- const e = this._autoHeightController.getUndoRedoParamsOfAutoHeight(a.rule.ranges);
3281
- Oa(e.redos, this._commandService);
3282
+ this._dataValidationModel.ruleChange$.pipe(Or(16)).subscribe((a) => {
3283
+ const t = [];
3284
+ if (a.forEach((e) => {
3285
+ var r;
3286
+ (r = e.rule) != null && r.ranges && t.push(...e.rule.ranges);
3287
+ }), t.length) {
3288
+ const e = this._autoHeightController.getUndoRedoParamsOfAutoHeight(t);
3289
+ Ta(e.redos, this._commandService);
3282
3290
  }
3283
3291
  });
3284
3292
  }
3285
3293
  };
3286
- ct = oo([
3287
- ve(_e.Rendered, ct),
3294
+ mt = so([
3295
+ ve(_e.Rendered, mt),
3288
3296
  Q(1, ee),
3289
- Q(2, Aa),
3297
+ Q(2, ja),
3290
3298
  Q(3, J),
3291
- Q(4, I(Cr)),
3292
- Q(5, I(z)),
3293
- Q(6, I(we)),
3294
- Q(7, I(Fa))
3295
- ], ct);
3296
- var Ls = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, As = (a, t, e, r) => {
3297
- for (var o = r > 1 ? void 0 : r ? Ps(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3299
+ Q(4, w(Mr)),
3300
+ Q(5, w(q)),
3301
+ Q(6, w(we)),
3302
+ Q(7, w(Pa))
3303
+ ], mt);
3304
+ var As = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, js = (a, t, e, r) => {
3305
+ for (var o = r > 1 ? void 0 : r ? xs(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3298
3306
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
3299
- return r && o && Ls(t, e, o), o;
3300
- }, xs = (a, t) => (e, r) => t(e, r, a);
3301
- let _t = class extends ue {
3307
+ return r && o && As(t, e, o), o;
3308
+ }, $s = (a, t) => (e, r) => t(e, r, a);
3309
+ let Ct = class extends ue {
3302
3310
  constructor(t) {
3303
3311
  super();
3304
3312
  S(this, "_currentManager");
3305
- S(this, "_currentManager$", new Dr());
3313
+ S(this, "_currentManager$", new br());
3306
3314
  S(this, "currentManager$", this._currentManager$.asObservable());
3307
3315
  this._dataValidationModel = t, this.disposeWithMe(() => {
3308
3316
  this._currentManager$.complete();
@@ -3329,15 +3337,15 @@ let _t = class extends ue {
3329
3337
  return this._ensureManager(t, e);
3330
3338
  }
3331
3339
  };
3332
- _t = As([
3333
- xs(0, I(z))
3334
- ], _t);
3335
- var js = Object.defineProperty, $s = Object.getOwnPropertyDescriptor, Bs = (a, t, e, r) => {
3336
- for (var o = r > 1 ? void 0 : r ? $s(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3340
+ Ct = js([
3341
+ $s(0, w(q))
3342
+ ], Ct);
3343
+ var Bs = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, Hs = (a, t, e, r) => {
3344
+ for (var o = r > 1 ? void 0 : r ? Us(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3337
3345
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
3338
- return r && o && js(t, e, o), o;
3339
- }, yt = (a, t) => (e, r) => t(e, r, a);
3340
- let We = class extends ue {
3346
+ return r && o && Bs(t, e, o), o;
3347
+ }, bt = (a, t) => (e, r) => t(e, r, a);
3348
+ let ke = class extends ue {
3341
3349
  constructor(t, e, r, o) {
3342
3350
  super();
3343
3351
  S(this, "_formulaMap", /* @__PURE__ */ new Map());
@@ -3370,7 +3378,7 @@ let We = class extends ue {
3370
3378
  let r = this._formulaMap.get(t), o = this._ruleFormulaMap.get(t), n = this._formulaCellMap.get(t);
3371
3379
  (!r || !o || !n) && (r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), this._formulaMap.set(t, r), this._ruleFormulaMap.set(t, o), this._formulaCellMap.set(t, n));
3372
3380
  let i = r.get(e), s = o.get(e), l = n.get(e);
3373
- return (!i || !s || !l) && (i = new ke(), r.set(e, i), s = /* @__PURE__ */ new Map(), o.set(e, s), l = /* @__PURE__ */ new Map(), n.set(e, l)), {
3381
+ return (!i || !s || !l) && (i = new Ye(), r.set(e, i), s = /* @__PURE__ */ new Map(), o.set(e, s), l = /* @__PURE__ */ new Map(), n.set(e, l)), {
3374
3382
  formulaMap: i,
3375
3383
  ruleFormulaMap: s,
3376
3384
  formulaCellMap: l
@@ -3395,14 +3403,14 @@ let We = class extends ue {
3395
3403
  const { formulaMap: i, ruleFormulaMap: s, formulaCellMap: l } = this._ensureMaps(t, e);
3396
3404
  if (!o)
3397
3405
  return;
3398
- const d = In(
3406
+ const d = yn(
3399
3407
  this._lexerTreeBuilder,
3400
3408
  o
3401
3409
  ), c = n[0].startRow, u = n[0].startColumn;
3402
3410
  let f;
3403
3411
  d ? n.forEach((p) => {
3404
3412
  W.foreach(p, (m, h) => {
3405
- const R = Ja(
3413
+ const R = tr(
3406
3414
  this._lexerTreeBuilder,
3407
3415
  o,
3408
3416
  c,
@@ -3434,7 +3442,7 @@ let We = class extends ue {
3434
3442
  }
3435
3443
  addRule(t, e, r) {
3436
3444
  const { ranges: o, formula1: n, uid: i, type: s } = r;
3437
- s !== B.CUSTOM || !n || !A(n) || this._addFormulaByRange(t, e, i, n, o);
3445
+ s !== H.CUSTOM || !n || !A(n) || this._addFormulaByRange(t, e, i, n, o);
3438
3446
  }
3439
3447
  updateRuleRanges(t, e, r, o, n) {
3440
3448
  const { formulaMap: i, ruleFormulaMap: s, formulaCellMap: l } = this._ensureMaps(t, e), d = s.get(r);
@@ -3451,9 +3459,9 @@ let We = class extends ue {
3451
3459
  var M;
3452
3460
  const _ = (M = i.getValue(g, C)) != null ? M : {};
3453
3461
  if (_.ruleId !== r) {
3454
- const y = s.get(_.ruleId);
3455
- if (y != null && y.isTransformable && h.add(_.formulaId), p) {
3456
- const D = Ja(this._lexerTreeBuilder, c, f, u, g, C), E = this._registerFormula(t, e, r, D);
3462
+ 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);
3457
3465
  i.setValue(g, C, {
3458
3466
  // formulaText: relativeText,
3459
3467
  ruleId: r,
@@ -3490,21 +3498,21 @@ let We = class extends ue {
3490
3498
  return o.get(r);
3491
3499
  }
3492
3500
  };
3493
- We = Bs([
3494
- yt(0, I(Er)),
3495
- yt(1, I(Ba)),
3496
- yt(2, I(z)),
3497
- yt(3, I(rt))
3498
- ], We);
3499
- class Us extends Ye {
3501
+ ke = Hs([
3502
+ bt(0, w(Nr)),
3503
+ bt(1, w(Ha)),
3504
+ bt(2, w(q)),
3505
+ bt(3, w(nt))
3506
+ ], ke);
3507
+ class Ws extends Xe {
3500
3508
  constructor() {
3501
3509
  super(...arguments);
3502
- S(this, "id", B.CUSTOM);
3510
+ S(this, "id", H.CUSTOM);
3503
3511
  S(this, "title", "dataValidation.custom.title");
3504
3512
  S(this, "operators", []);
3505
3513
  S(this, "scopes", ["sheet"]);
3506
- S(this, "formulaInput", Xr);
3507
- S(this, "_customFormulaService", this.injector.get(We));
3514
+ S(this, "formulaInput", zr);
3515
+ S(this, "_customFormulaService", this.injector.get(ke));
3508
3516
  }
3509
3517
  validatorFormula(e, r, o) {
3510
3518
  const n = A(e.formula1);
@@ -3527,11 +3535,11 @@ class Us extends Ye {
3527
3535
  return this.localeService.t("dataValidation.custom.error");
3528
3536
  }
3529
3537
  }
3530
- class Hs extends Ye {
3538
+ class ks extends Xe {
3531
3539
  constructor() {
3532
3540
  super(...arguments);
3533
3541
  S(this, "_formulaService", this.injector.get(ce));
3534
- S(this, "id", B.WHOLE);
3542
+ S(this, "id", H.WHOLE);
3535
3543
  S(this, "title", "dataValidation.whole.title");
3536
3544
  S(this, "operators", [
3537
3545
  V.BETWEEN,
@@ -3544,21 +3552,21 @@ class Hs extends Ye {
3544
3552
  V.NOT_EQUAL
3545
3553
  ]);
3546
3554
  S(this, "scopes", ["sheet"]);
3547
- S(this, "formulaInput", Rt);
3555
+ S(this, "formulaInput", Mt);
3548
3556
  S(this, "dropDownInput");
3549
3557
  }
3550
3558
  _isFormulaOrInt(e) {
3551
- return !Y.isBlank(e) && (A(e) || !Number.isNaN(+e) && Number.isInteger(+e));
3559
+ return !X.isBlank(e) && (A(e) || !Number.isNaN(+e) && Number.isInteger(+e));
3552
3560
  }
3553
3561
  async isValidType(e, r, o) {
3554
- const { value: n } = e, i = xt(n);
3562
+ const { value: n } = e, i = $t(n);
3555
3563
  return !Number.isNaN(i) && Number.isInteger(i);
3556
3564
  }
3557
3565
  transform(e, r, o) {
3558
3566
  const { value: n } = e;
3559
3567
  return {
3560
3568
  ...e,
3561
- value: xt(n)
3569
+ value: $t(n)
3562
3570
  };
3563
3571
  }
3564
3572
  _parseNumber(e) {
@@ -3578,7 +3586,7 @@ class Hs extends Ye {
3578
3586
  return {
3579
3587
  success: !1
3580
3588
  };
3581
- const i = Y.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), s = Y.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = Gt.includes(n), d = this.localeService.t("dataValidation.validFail.number");
3589
+ const i = X.isDefine(e.formula1) && this._isFormulaOrInt(e.formula1), s = X.isDefine(e.formula2) && this._isFormulaOrInt(e.formula2), l = zt.includes(n), d = this.localeService.t("dataValidation.validFail.number");
3582
3590
  return l ? {
3583
3591
  success: i && s,
3584
3592
  formula1: i ? void 0 : d,
@@ -3627,25 +3635,25 @@ class Hs extends Ye {
3627
3635
  return Number.isNaN(n) ? !0 : e.value <= n;
3628
3636
  }
3629
3637
  }
3630
- const so = 4, Ws = 0, oa = 4, lo = 4, ya = 6, jt = 6, Ae = 14;
3631
- function ks(a, t) {
3632
- const e = hn.getTextSize(a, t), r = e.width + so * 2, { ba: o, bd: n } = e, i = o + n;
3638
+ const uo = 4, Ys = 0, ia = 4, ho = 4, Ea = 6, Bt = 6, Ae = 14;
3639
+ function Xs(a, t) {
3640
+ const e = pn.getTextSize(a, t), r = e.width + uo * 2, { ba: o, bd: n } = e, i = o + n;
3633
3641
  return {
3634
3642
  width: r,
3635
- height: i + Ws * 2,
3643
+ height: i + Ys * 2,
3636
3644
  ba: o
3637
3645
  };
3638
3646
  }
3639
- function dr(a, t, e, r) {
3640
- const o = e - Ae - ya, n = r - jt * 2, i = a.map((c) => ({
3641
- layout: ks(c, t),
3647
+ function ur(a, t, e, r) {
3648
+ const o = e - Ae - Ea, n = r - Bt * 2, i = a.map((c) => ({
3649
+ layout: Xs(c, t),
3642
3650
  text: c
3643
3651
  }));
3644
3652
  let s;
3645
3653
  const l = [];
3646
3654
  i.forEach((c) => {
3647
3655
  const { layout: u } = c, { width: f, height: p } = u;
3648
- !s || s.width + f + oa > o ? (s = {
3656
+ !s || s.width + f + ia > o ? (s = {
3649
3657
  width: f,
3650
3658
  height: p,
3651
3659
  items: [{
@@ -3654,39 +3662,39 @@ function dr(a, t, e, r) {
3654
3662
  }]
3655
3663
  }, l.push(s)) : (s.items.push({
3656
3664
  ...c,
3657
- left: s.width + oa
3658
- }), s.width = s.width + f + oa);
3665
+ left: s.width + ia
3666
+ }), s.width = s.width + f + ia);
3659
3667
  });
3660
3668
  let d = 0;
3661
3669
  return l.forEach((c, u) => {
3662
- u === l.length - 1 ? d += c.height : d += c.height + lo;
3670
+ u === l.length - 1 ? d += c.height : d += c.height + ho;
3663
3671
  }), {
3664
3672
  lines: l,
3665
3673
  totalHeight: d,
3666
3674
  contentWidth: o,
3667
3675
  contentHeight: n,
3668
- cellAutoHeight: d + jt * 2
3676
+ cellAutoHeight: d + Bt * 2
3669
3677
  };
3670
3678
  }
3671
- const Ys = 8;
3672
- class Xs extends mn {
3679
+ const Gs = 8;
3680
+ class qs extends gn {
3673
3681
  static drawWith(t, e) {
3674
3682
  const { fontFamily: r, fontString: o, fontSize: n, info: i, fill: s, color: l } = e, { layout: d, text: c } = i;
3675
- t.save(), yr.drawWith(t, {
3683
+ t.save(), Er.drawWith(t, {
3676
3684
  width: d.width,
3677
3685
  height: d.height,
3678
- radius: Ys,
3686
+ radius: Gs,
3679
3687
  fill: s || xe
3680
- }), t.translateWithPrecision(so, d.ba), t.font = o, t.fillStyle = l, t.fillText(c, 0, 0), t.restore();
3688
+ }), t.translateWithPrecision(uo, d.ba), t.font = o, t.fillStyle = l, t.fillText(c, 0, 0), t.restore();
3681
3689
  }
3682
3690
  }
3683
- var Gs = Object.defineProperty, qs = Object.getOwnPropertyDescriptor, zs = (a, t, e, r) => {
3684
- for (var o = r > 1 ? void 0 : r ? qs(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3691
+ var zs = Object.defineProperty, Ks = Object.getOwnPropertyDescriptor, Qs = (a, t, e, r) => {
3692
+ for (var o = r > 1 ? void 0 : r ? Ks(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3685
3693
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
3686
- return r && o && Gs(t, e, o), o;
3687
- }, Ks = (a, t) => (e, r) => t(e, r, a);
3688
- const Qs = 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");
3689
- let Da = class {
3694
+ return r && o && zs(t, e, o), o;
3695
+ }, Zs = (a, t) => (e, r) => t(e, r, a);
3696
+ 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
+ let ba = class {
3690
3698
  constructor(a) {
3691
3699
  S(this, "zIndex");
3692
3700
  S(this, "_dropdownInfoMap", /* @__PURE__ */ new Map());
@@ -3710,11 +3718,11 @@ let Da = class {
3710
3718
  i = r - Ae + 4;
3711
3719
  break;
3712
3720
  }
3713
- a.save(), a.translateWithPrecision(t.startX + n, t.startY + i), a.fillStyle = "#565656", a.fill(Qs), a.restore();
3721
+ a.save(), a.translateWithPrecision(t.startX + n, t.startY + i), a.fillStyle = "#565656", a.fill(Js), a.restore();
3714
3722
  }
3715
3723
  // eslint-disable-next-line max-lines-per-function
3716
3724
  drawWith(a, t, e, r) {
3717
- var j, oe;
3725
+ var P, oe;
3718
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);
3719
3727
  if (!R)
3720
3728
  return;
@@ -3723,42 +3731,42 @@ let Da = class {
3723
3731
  endX: c.endX - p,
3724
3732
  startY: c.startY + m,
3725
3733
  endY: c.endY - h
3726
- }, M = _.endX - _.startX, y = _.endY - _.startY, { cl: D } = s || {}, E = (j = typeof D == "object" ? D == null ? void 0 : D.rgb : D) != null ? j : "#000", x = Qa(s != null ? s : void 0), { rule: T, validator: F } = R, b = F, { vt: P, ht: U } = s || {}, O = P != null ? P : me.MIDDLE, L = (oe = ae(l)) != null ? oe : "", H = b.parseCellValue(L), K = b.getListWithColorMap(T), k = dr(H, x, M, y);
3727
- this._drawDownIcon(a, _, M, y, O), a.save(), a.translateWithPrecision(_.startX, _.startY), a.beginPath(), a.rect(0, 0, M - Ae, y), a.clip(), a.translateWithPrecision(ya, jt);
3728
- let w = 0;
3729
- switch (O) {
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);
3735
+ 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
+ let y = 0;
3737
+ switch (U) {
3730
3738
  case me.MIDDLE:
3731
- w = (k.contentHeight - k.totalHeight) / 2;
3739
+ y = (k.contentHeight - k.totalHeight) / 2;
3732
3740
  break;
3733
3741
  case me.BOTTOM:
3734
- w = k.contentHeight - k.totalHeight;
3742
+ y = k.contentHeight - k.totalHeight;
3735
3743
  break;
3736
3744
  }
3737
- a.translateWithPrecision(0, w), k.lines.forEach((G, Se) => {
3745
+ a.translateWithPrecision(0, y), k.lines.forEach((G, Se) => {
3738
3746
  a.save();
3739
- const { width: N, height: X, items: q } = G;
3740
- let ne = 0;
3741
- switch (U) {
3747
+ const { width: Le, height: N, items: K } = G;
3748
+ let Y = 0;
3749
+ switch (B) {
3742
3750
  case Be.RIGHT:
3743
- ne = k.contentWidth - N;
3751
+ Y = k.contentWidth - Le;
3744
3752
  break;
3745
3753
  case Be.CENTER:
3746
- ne = (k.contentWidth - N) / 2;
3754
+ Y = (k.contentWidth - Le) / 2;
3747
3755
  break;
3748
3756
  }
3749
- a.translate(ne, Se * (X + lo)), q.forEach((ye) => {
3750
- a.save(), a.translateWithPrecision(ye.left, 0), Xs.drawWith(a, {
3757
+ a.translate(Y, Se * (N + ho)), K.forEach((ne) => {
3758
+ a.save(), a.translateWithPrecision(ne.left, 0), qs.drawWith(a, {
3751
3759
  ...x,
3752
- info: ye,
3760
+ info: ne,
3753
3761
  color: E,
3754
- fill: K[ye.text]
3762
+ fill: z[ne.text]
3755
3763
  }), a.restore();
3756
3764
  }), a.restore();
3757
3765
  }), a.restore(), g.set(C, {
3758
3766
  left: _.startX,
3759
3767
  top: _.startY,
3760
- width: k.contentWidth + ya + Ae,
3761
- height: k.contentHeight + jt * 2
3768
+ width: k.contentWidth + Ea + Ae,
3769
+ height: k.contentHeight + Bt * 2
3762
3770
  });
3763
3771
  }
3764
3772
  calcCellAutoHeight(a) {
@@ -3771,8 +3779,8 @@ let Da = class {
3771
3779
  }, u = r.dataValidation;
3772
3780
  if (!u)
3773
3781
  return;
3774
- 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 = Qa(e != null ? e : void 0);
3775
- return dr(g, C, f, p).cellAutoHeight;
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;
3776
3784
  }
3777
3785
  isHit(a, t) {
3778
3786
  const { primaryWithCoord: e } = t, r = e.isMergedMainCell ? e.mergeInfo : e, { endX: o } = r, { x: n } = a;
@@ -3787,29 +3795,29 @@ let Da = class {
3787
3795
  row: o,
3788
3796
  column: n
3789
3797
  };
3790
- this._commandService.executeCommand(Yt.id, i);
3798
+ this._commandService.executeCommand(Gt.id, i);
3791
3799
  }
3792
3800
  };
3793
- Da = zs([
3794
- Ks(0, ee)
3795
- ], Da);
3796
- class Zs extends eo {
3801
+ ba = Qs([
3802
+ Zs(0, ee)
3803
+ ], ba);
3804
+ class el extends ro {
3797
3805
  constructor() {
3798
3806
  super(...arguments);
3799
- S(this, "id", B.LIST_MULTIPLE);
3807
+ S(this, "id", H.LIST_MULTIPLE);
3800
3808
  S(this, "title", "dataValidation.listMultiple.title");
3801
- S(this, "canvasRender", this.injector.createInstance(Da));
3809
+ S(this, "canvasRender", this.injector.createInstance(ba));
3802
3810
  }
3803
3811
  skipDefaultFontRender() {
3804
3812
  return !0;
3805
3813
  }
3806
3814
  }
3807
- var Js = Object.defineProperty, el = Object.getOwnPropertyDescriptor, tl = (a, t, e, r) => {
3808
- for (var o = r > 1 ? void 0 : r ? el(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3815
+ var tl = Object.defineProperty, al = Object.getOwnPropertyDescriptor, rl = (a, t, e, r) => {
3816
+ for (var o = r > 1 ? void 0 : r ? al(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3809
3817
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
3810
- return r && o && Js(t, e, o), o;
3811
- }, be = (a, t) => (e, r) => t(e, r, a);
3812
- let ut = class extends Na {
3818
+ return r && o && tl(t, e, o), o;
3819
+ }, Ee = (a, t) => (e, r) => t(e, r, a);
3820
+ let ft = class extends Fa {
3813
3821
  constructor(a, t, e, r, o, n, i, s) {
3814
3822
  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();
3815
3823
  }
@@ -3818,14 +3826,14 @@ let ut = class extends Na {
3818
3826
  }
3819
3827
  _registerValidators() {
3820
3828
  [
3821
- ws,
3822
- Hs,
3823
- Es,
3824
- fs,
3825
- Ii,
3826
- eo,
3827
- Zs,
3828
- Us
3829
+ Ds,
3830
+ ks,
3831
+ Os,
3832
+ gs,
3833
+ yi,
3834
+ ro,
3835
+ el,
3836
+ Ws
3829
3837
  ].forEach((a) => {
3830
3838
  const t = this._injector.createInstance(a);
3831
3839
  this.disposeWithMe(
@@ -3838,12 +3846,12 @@ let ut = class extends Na {
3838
3846
  });
3839
3847
  }
3840
3848
  _initInstanceChange() {
3841
- const a = new ur();
3849
+ const a = new mr();
3842
3850
  this.disposeWithMe(this._univerInstanceService.getCurrentTypeOfUnit$(re.UNIVER_SHEET).subscribe((t) => {
3843
3851
  if (a.dispose(), !t)
3844
3852
  return;
3845
3853
  const e = t.getActiveSheet();
3846
- e && (this._sheetDataValidationService.switchCurrent(t.getUnitId(), e.getSheetId()), a.add(Ea(
3854
+ e && (this._sheetDataValidationService.switchCurrent(t.getUnitId(), e.getSheetId()), a.add(Oa(
3847
3855
  t.activeSheet$.subscribe((r) => {
3848
3856
  if (r) {
3849
3857
  const o = t.getUnitId(), n = r.getSheetId();
@@ -3857,13 +3865,13 @@ let ut = class extends Na {
3857
3865
  this._sheetInterceptorService.interceptCommand({
3858
3866
  getMutations: (a) => {
3859
3867
  var t;
3860
- if (a.id === xo.id) {
3868
+ if (a.id === Bo.id) {
3861
3869
  const e = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET), r = e.getUnitId(), o = e.getActiveSheet();
3862
3870
  if (!o)
3863
3871
  throw new Error("No active sheet found");
3864
3872
  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();
3865
3873
  i && l.removeRange(i);
3866
- const d = l.diff(s.getDataValidations()), { redoMutations: c, undoMutations: u } = tt(r, n, d, this._injector);
3874
+ const d = l.diff(s.getDataValidations()), { redoMutations: c, undoMutations: u } = rt(r, n, d, this._injector);
3867
3875
  return {
3868
3876
  undos: u,
3869
3877
  redos: c
@@ -3878,14 +3886,14 @@ let ut = class extends Na {
3878
3886
  }
3879
3887
  _initComponents() {
3880
3888
  [
3881
- [ro, Br],
3882
- [Pr, Wi],
3883
- [Lr, Ln],
3884
- [Qr, es],
3885
- [Zr, ds],
3886
- [At.componentKey, At],
3887
- [Pt.componentKey, Pt],
3888
- ...Mi
3889
+ [io, Wr],
3890
+ [jr, Yi],
3891
+ [xr, An],
3892
+ [eo, as],
3893
+ [to, us],
3894
+ [jt.componentKey, jt],
3895
+ [xt.componentKey, xt],
3896
+ ...wi
3889
3897
  ].forEach(([a, t]) => {
3890
3898
  this.disposeWithMe(this._componentManger.register(
3891
3899
  a,
@@ -3894,24 +3902,24 @@ let ut = class extends Na {
3894
3902
  });
3895
3903
  }
3896
3904
  };
3897
- ut = tl([
3898
- ve(_e.Rendered, ut),
3899
- be(0, J),
3900
- be(1, I(_t)),
3901
- be(2, I(we)),
3902
- be(3, I(Ee)),
3903
- be(4, I(St)),
3904
- be(5, I(Ao)),
3905
- be(6, I(Fa)),
3906
- be(7, I(z))
3907
- ], ut);
3908
- var al = Object.defineProperty, rl = Object.getOwnPropertyDescriptor, ol = (a, t, e, r) => {
3909
- for (var o = r > 1 ? void 0 : r ? rl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3905
+ ft = rl([
3906
+ ve(_e.Rendered, ft),
3907
+ Ee(0, J),
3908
+ Ee(1, w(Ct)),
3909
+ Ee(2, w(we)),
3910
+ Ee(3, w(De)),
3911
+ Ee(4, w(Vt)),
3912
+ Ee(5, w($o)),
3913
+ Ee(6, w(Pa)),
3914
+ Ee(7, w(q))
3915
+ ], ft);
3916
+ var ol = Object.defineProperty, nl = Object.getOwnPropertyDescriptor, il = (a, t, e, r) => {
3917
+ for (var o = r > 1 ? void 0 : r ? nl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3910
3918
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
3911
- return r && o && al(t, e, o), o;
3912
- }, Dt = (a, t) => (e, r) => t(e, r, a);
3913
- const na = "SHEET_DATA_VALIDATION_ALERT";
3914
- let ht = class extends ue {
3919
+ return r && o && ol(t, e, o), o;
3920
+ }, Ot = (a, t) => (e, r) => t(e, r, a);
3921
+ const sa = "SHEET_DATA_VALIDATION_ALERT";
3922
+ let pt = class extends ue {
3915
3923
  constructor(a, t, e, r) {
3916
3924
  super(), this._hoverManagerService = a, this._cellAlertManagerService = t, this._univerInstanceService = e, this._localeService = r, this._init();
3917
3925
  }
@@ -3919,48 +3927,48 @@ let ht = class extends ue {
3919
3927
  this._initCellAlertPopup();
3920
3928
  }
3921
3929
  _initCellAlertPopup() {
3922
- this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(gn(100)).subscribe((a) => {
3930
+ this.disposeWithMe(this._hoverManagerService.currentCell$.pipe(He(100)).subscribe((a) => {
3923
3931
  var t, e;
3924
3932
  if (a) {
3925
3933
  const o = this._univerInstanceService.getCurrentUnitForType(re.UNIVER_SHEET).getActiveSheet();
3926
3934
  if (!o) return;
3927
3935
  const n = o.getCell(a.location.row, a.location.col);
3928
3936
  if (((t = n == null ? void 0 : n.dataValidation) == null ? void 0 : t.validStatus) === Ce.INVALID) {
3929
- const i = this._cellAlertManagerService.currentAlert.get(na), s = (e = i == null ? void 0 : i.alert) == null ? void 0 : e.location;
3937
+ const i = this._cellAlertManagerService.currentAlert.get(sa), s = (e = i == null ? void 0 : i.alert) == null ? void 0 : e.location;
3930
3938
  if (s && s.row === a.location.row && s.col === a.location.col && s.subUnitId === a.location.subUnitId && s.unitId === a.location.unitId)
3931
3939
  return;
3932
3940
  const l = n.dataValidation.validator, d = n.dataValidation.rule;
3933
3941
  if (!l)
3934
3942
  return;
3935
3943
  this._cellAlertManagerService.showAlert({
3936
- type: Yo.ERROR,
3944
+ type: qo.ERROR,
3937
3945
  title: this._localeService.t("dataValidation.error.title"),
3938
3946
  message: l == null ? void 0 : l.getRuleFinalError(d),
3939
3947
  location: a.location,
3940
3948
  width: 200,
3941
3949
  height: 74,
3942
- key: na
3950
+ key: sa
3943
3951
  });
3944
3952
  return;
3945
3953
  }
3946
3954
  }
3947
- this._cellAlertManagerService.removeAlert(na);
3955
+ this._cellAlertManagerService.removeAlert(sa);
3948
3956
  }));
3949
3957
  }
3950
3958
  };
3951
- ht = ol([
3952
- ve(_e.Rendered, ht),
3953
- Dt(0, I(Wo)),
3954
- Dt(1, I(ko)),
3955
- Dt(2, J),
3956
- Dt(3, I(ie))
3957
- ], ht);
3958
- var nl = Object.defineProperty, il = Object.getOwnPropertyDescriptor, sl = (a, t, e, r) => {
3959
- for (var o = r > 1 ? void 0 : r ? il(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3959
+ pt = il([
3960
+ ve(_e.Rendered, pt),
3961
+ Ot(0, w(Xo)),
3962
+ Ot(1, w(Go)),
3963
+ Ot(2, J),
3964
+ Ot(3, w(ie))
3965
+ ], pt);
3966
+ var sl = Object.defineProperty, ll = Object.getOwnPropertyDescriptor, dl = (a, t, e, r) => {
3967
+ for (var o = r > 1 ? void 0 : r ? ll(t, e) : t, n = a.length - 1, i; n >= 0; n--)
3960
3968
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
3961
- return r && o && nl(t, e, o), o;
3962
- }, Ke = (a, t) => (e, r) => t(e, r, a);
3963
- let et = class extends ue {
3969
+ return r && o && sl(t, e, o), o;
3970
+ }, Qe = (a, t) => (e, r) => t(e, r, a);
3971
+ let at = class extends ue {
3964
3972
  constructor(t, e, r, o, n, i) {
3965
3973
  super();
3966
3974
  S(this, "_disposableMap", /* @__PURE__ */ new Map());
@@ -4020,7 +4028,7 @@ let et = class extends ue {
4020
4028
  ];
4021
4029
  return { redos: h, undos: R };
4022
4030
  };
4023
- if (r.type === B.CUSTOM) {
4031
+ if (r.type === H.CUSTOM) {
4024
4032
  const d = this._dataValidationCustomFormulaService.getRuleFormulaInfo(t, e, o);
4025
4033
  if (d) {
4026
4034
  const c = this._formulaRefRangeService.registerFormula(
@@ -4030,7 +4038,7 @@ let et = class extends ue {
4030
4038
  i.add(() => c.dispose());
4031
4039
  }
4032
4040
  }
4033
- if (r.type !== B.CUSTOM) {
4041
+ if (r.type !== H.CUSTOM) {
4034
4042
  const d = this._dataValidationFormulaService.getRuleFormulaInfo(t, e, o);
4035
4043
  if (d) {
4036
4044
  const [c, u] = d;
@@ -4054,8 +4062,8 @@ let et = class extends ue {
4054
4062
  register(t, e, r) {
4055
4063
  var l;
4056
4064
  const o = (d) => {
4057
- const c = [...r.ranges], f = c.map((m) => $o(m, d)).filter((m) => !!m).flat();
4058
- if (yo(f, c))
4065
+ const c = [...r.ranges], f = c.map((m) => Ho(m, d)).filter((m) => !!m).flat();
4066
+ if (Eo(f, c))
4059
4067
  return { redos: [], undos: [] };
4060
4068
  if (f.length) {
4061
4069
  const m = {
@@ -4080,7 +4088,7 @@ let et = class extends ue {
4080
4088
  }];
4081
4089
  return { redos: h, undos: R };
4082
4090
  } else {
4083
- const m = { unitId: t, subUnitId: e, ruleId: r.uid }, h = [{ id: Ot.id, params: m }], R = To(this._injector, m);
4091
+ const m = { unitId: t, subUnitId: e, ruleId: r.uid }, h = [{ id: Ft.id, params: m }], R = Po(this._injector, m);
4084
4092
  return { redos: h, undos: R };
4085
4093
  }
4086
4094
  }, n = [];
@@ -4113,113 +4121,113 @@ let et = class extends ue {
4113
4121
  }
4114
4122
  }
4115
4123
  })
4116
- ), this.disposeWithMe(Ea(() => {
4124
+ ), this.disposeWithMe(Oa(() => {
4117
4125
  this._disposableMap.forEach((t) => {
4118
4126
  t.forEach((e) => e());
4119
4127
  }), this._disposableMap.clear();
4120
4128
  }));
4121
4129
  }
4122
4130
  };
4123
- et = sl([
4124
- ve(_e.Ready, et),
4125
- Ke(0, I(z)),
4126
- Ke(1, I(Ee)),
4127
- Ke(2, I(jo)),
4128
- Ke(3, I(We)),
4129
- Ke(4, I(ce)),
4130
- Ke(5, I(vn))
4131
- ], et);
4132
- var ll = Object.defineProperty, dl = Object.getOwnPropertyDescriptor, cl = (a, t, e, r) => {
4133
- for (var o = r > 1 ? void 0 : r ? dl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4131
+ at = dl([
4132
+ ve(_e.Ready, at),
4133
+ Qe(0, w(q)),
4134
+ Qe(1, w(De)),
4135
+ Qe(2, w(Uo)),
4136
+ Qe(3, w(ke)),
4137
+ Qe(4, w(ce)),
4138
+ Qe(5, w(Sn))
4139
+ ], at);
4140
+ var cl = Object.defineProperty, ul = Object.getOwnPropertyDescriptor, hl = (a, t, e, r) => {
4141
+ for (var o = r > 1 ? void 0 : r ? ul(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4134
4142
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
4135
- return r && o && ll(t, e, o), o;
4136
- }, ia = (a, t) => (e, r) => t(e, r, a);
4137
- let bt = class extends ue {
4143
+ return r && o && cl(t, e, o), o;
4144
+ }, la = (a, t) => (e, r) => t(e, r, a);
4145
+ let Tt = class extends ue {
4138
4146
  constructor(a, t, e) {
4139
4147
  super(), this._autoFillService = a, this._dataValidationModel = t, this._injector = e, this._initAutoFill();
4140
4148
  }
4141
4149
  // eslint-disable-next-line max-lines-per-function
4142
4150
  _initAutoFill() {
4143
4151
  const a = () => ({ redos: [], undos: [] }), t = (o) => {
4144
- const { source: n, target: i, unitId: s, subUnitId: l } = o, d = this._dataValidationModel.ensureManager(s, l), c = d.getRuleObjectMatrix().clone(), u = Ra([n, i]), [f, p] = u.ranges, { mapFunc: m } = u, h = {
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 = {
4145
4153
  row: f.startRow,
4146
4154
  col: f.startColumn
4147
4155
  };
4148
- Go(f, p).forEach((M) => {
4149
- const y = M.repeatStartCell, D = M.relativeRange, E = {
4156
+ Ko(f, p).forEach((M) => {
4157
+ const I = M.repeatStartCell, D = M.relativeRange, E = {
4150
4158
  startRow: h.row,
4151
4159
  startColumn: h.col,
4152
4160
  endColumn: h.col,
4153
4161
  endRow: h.row
4154
4162
  }, x = {
4155
- startRow: y.row,
4156
- startColumn: y.col,
4157
- endColumn: y.col,
4158
- endRow: y.row
4163
+ startRow: I.row,
4164
+ startColumn: I.col,
4165
+ endColumn: I.col,
4166
+ endRow: I.row
4159
4167
  };
4160
- W.foreach(D, (T, F) => {
4161
- const b = Ue.getPositionRange(
4168
+ W.foreach(D, (T, O) => {
4169
+ const F = Ue.getPositionRange(
4162
4170
  {
4163
4171
  startRow: T,
4164
- startColumn: F,
4165
- endColumn: F,
4172
+ startColumn: O,
4173
+ endColumn: O,
4166
4174
  endRow: T
4167
4175
  },
4168
4176
  E
4169
- ), { row: P, col: U } = m(b.startRow, b.startColumn), O = d.getRuleIdByLocation(P, U);
4170
- if (O) {
4171
- const L = Ue.getPositionRange(
4177
+ ), { row: L, col: B } = m(F.startRow, F.startColumn), U = d.getRuleIdByLocation(L, B);
4178
+ if (U) {
4179
+ const b = Ue.getPositionRange(
4172
4180
  {
4173
4181
  startRow: T,
4174
- startColumn: F,
4175
- endColumn: F,
4182
+ startColumn: O,
4183
+ endColumn: O,
4176
4184
  endRow: T
4177
4185
  },
4178
4186
  x
4179
- ), { row: H, col: K } = m(L.startRow, L.startColumn);
4180
- c.setValue(H, K, O);
4187
+ ), { row: $, col: z } = m(b.startRow, b.startColumn);
4188
+ c.setValue($, z, U);
4181
4189
  }
4182
4190
  });
4183
4191
  });
4184
- const g = c.diff(d.getDataValidations()), { redoMutations: C, undoMutations: _ } = tt(s, l, g, this._injector);
4192
+ const g = c.diff(d.getDataValidations()), { redoMutations: C, undoMutations: _ } = rt(s, l, g, this._injector);
4185
4193
  return {
4186
4194
  undos: _,
4187
4195
  redos: C
4188
4196
  };
4189
4197
  }, e = [
4190
- B.CHECKBOX
4198
+ H.CHECKBOX
4191
4199
  ], r = {
4192
- id: Xt,
4200
+ id: qt,
4193
4201
  onBeforeFillData: (o) => {
4194
4202
  const { source: n, unitId: i, subUnitId: s } = o, l = this._dataValidationModel.ensureManager(i, s);
4195
4203
  for (const d of n.rows)
4196
4204
  for (const c of n.cols) {
4197
4205
  const u = l.getRuleByLocation(d, c);
4198
4206
  if (u && e.indexOf(u.type) > -1) {
4199
- this._autoFillService.setDisableApplyType(Ct.SERIES, !0);
4207
+ this._autoFillService.setDisableApplyType(It.SERIES, !0);
4200
4208
  return;
4201
4209
  }
4202
4210
  }
4203
4211
  },
4204
- onFillData: (o, n, i) => i === Ct.COPY || i === Ct.ONLY_FORMAT || i === Ct.SERIES ? t(o) : a(),
4212
+ onFillData: (o, n, i) => i === It.COPY || i === It.ONLY_FORMAT || i === It.SERIES ? t(o) : a(),
4205
4213
  onAfterFillData: () => {
4206
4214
  }
4207
4215
  };
4208
4216
  this.disposeWithMe(this._autoFillService.addHook(r));
4209
4217
  }
4210
4218
  };
4211
- bt = cl([
4212
- ve(_e.Ready, bt),
4213
- ia(0, Xo),
4214
- ia(1, I(z)),
4215
- ia(2, I(Ee))
4216
- ], bt);
4217
- var ul = Object.defineProperty, hl = Object.getOwnPropertyDescriptor, ml = (a, t, e, r) => {
4218
- for (var o = r > 1 ? void 0 : r ? hl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4219
+ Tt = hl([
4220
+ ve(_e.Ready, Tt),
4221
+ la(0, zo),
4222
+ la(1, w(q)),
4223
+ la(2, w(De))
4224
+ ], Tt);
4225
+ var ml = Object.defineProperty, fl = Object.getOwnPropertyDescriptor, pl = (a, t, e, r) => {
4226
+ for (var o = r > 1 ? void 0 : r ? fl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4219
4227
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
4220
- return r && o && ul(t, e, o), o;
4221
- }, sa = (a, t) => (e, r) => t(e, r, a);
4222
- let mt = class extends ue {
4228
+ return r && o && ml(t, e, o), o;
4229
+ }, da = (a, t) => (e, r) => t(e, r, a);
4230
+ let gt = class extends ue {
4223
4231
  constructor(t, e, r) {
4224
4232
  super();
4225
4233
  S(this, "_copyInfo");
@@ -4227,16 +4235,16 @@ let mt = class extends ue {
4227
4235
  }
4228
4236
  _initCopyPaste() {
4229
4237
  this._sheetClipboardService.addClipboardHook({
4230
- id: Xt,
4238
+ id: qt,
4231
4239
  onBeforeCopy: (t, e, r) => this._collect(t, e, r),
4232
4240
  onPasteCells: (t, e, r, o) => {
4233
- const { copyType: n = qa.COPY, pasteType: i } = o, { range: s } = t || {}, { range: l, unitId: d, subUnitId: c } = e;
4241
+ const { copyType: n = Ka.COPY, pasteType: i } = o, { range: s } = t || {}, { range: l, unitId: d, subUnitId: c } = e;
4234
4242
  return this._generateMutations(l, { copyType: n, pasteType: i, copyRange: s, unitId: d, subUnitId: c });
4235
4243
  }
4236
4244
  });
4237
4245
  }
4238
4246
  _collect(t, e, r) {
4239
- const o = new ke();
4247
+ const o = new Ye();
4240
4248
  this._copyInfo = {
4241
4249
  unitId: t,
4242
4250
  subUnitId: e,
@@ -4244,7 +4252,7 @@ let mt = class extends ue {
4244
4252
  };
4245
4253
  const n = this._dataValidationModel.ensureManager(t, e), i = {
4246
4254
  get: this._injector.get.bind(this._injector)
4247
- }, s = qo(r, i, t, e);
4255
+ }, s = Qo(r, i, t, e);
4248
4256
  if (!s)
4249
4257
  return;
4250
4258
  const { rows: l, cols: d } = s;
@@ -4259,22 +4267,22 @@ let mt = class extends ue {
4259
4267
  _generateMutations(t, e) {
4260
4268
  if (!this._copyInfo)
4261
4269
  return { redos: [], undos: [] };
4262
- if (e.copyType === qa.CUT)
4270
+ if (e.copyType === Ka.CUT)
4263
4271
  return this._copyInfo = null, { redos: [], undos: [] };
4264
4272
  if (!this._copyInfo || !this._copyInfo.matrix.getSizeOf() || !e.copyRange)
4265
4273
  return { redos: [], undos: [] };
4266
4274
  if ([
4267
- Vt.SPECIAL_PASTE_COL_WIDTH,
4268
- Vt.SPECIAL_PASTE_VALUE,
4269
- Vt.SPECIAL_PASTE_FORMAT,
4270
- Vt.SPECIAL_PASTE_FORMULA
4275
+ wt.SPECIAL_PASTE_COL_WIDTH,
4276
+ wt.SPECIAL_PASTE_VALUE,
4277
+ wt.SPECIAL_PASTE_FORMAT,
4278
+ wt.SPECIAL_PASTE_FORMULA
4271
4279
  ].includes(
4272
4280
  e.pasteType
4273
4281
  ))
4274
4282
  return { redos: [], undos: [] };
4275
4283
  const { unitId: r, subUnitId: o } = this._copyInfo;
4276
4284
  if (e.unitId !== r || o !== e.subUnitId) {
4277
- const n = this._dataValidationModel.ensureManager(r, o), i = this._dataValidationModel.ensureManager(e.unitId, e.subUnitId), s = i.getRuleObjectMatrix().clone(), { ranges: [l, d], mapFunc: c } = Ra([e.copyRange, t]), u = za(l, d, !0), f = /* @__PURE__ */ new Map();
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();
4278
4286
  u.forEach(({ startRange: h }) => {
4279
4287
  var R;
4280
4288
  (R = this._copyInfo) == null || R.matrix.forValue((g, C, _) => {
@@ -4286,13 +4294,13 @@ let mt = class extends ue {
4286
4294
  endColumn: C
4287
4295
  },
4288
4296
  h
4289
- ), y = `${o}-${_}`, D = n.getRuleById(_);
4290
- !i.getRuleById(y) && D && f.set(y, { ...D, uid: y });
4297
+ ), I = `${o}-${_}`, D = n.getRuleById(_);
4298
+ !i.getRuleById(I) && D && f.set(I, { ...D, uid: I });
4291
4299
  const { row: E, col: x } = c(M.startRow, M.startColumn);
4292
- s.setValue(E, x, y);
4300
+ s.setValue(E, x, I);
4293
4301
  });
4294
4302
  });
4295
- const { redoMutations: p, undoMutations: m } = tt(
4303
+ const { redoMutations: p, undoMutations: m } = rt(
4296
4304
  e.unitId,
4297
4305
  e.subUnitId,
4298
4306
  s.diffWithAddition(i.getDataValidations(), f.values()),
@@ -4303,8 +4311,8 @@ let mt = class extends ue {
4303
4311
  undos: m
4304
4312
  };
4305
4313
  } else {
4306
- const n = this._dataValidationModel.ensureManager(r, o), i = n.getRuleObjectMatrix().clone(), { ranges: [s, l], mapFunc: d } = Ra([e.copyRange, t]);
4307
- za(s, l, !0).forEach(({ startRange: p }) => {
4314
+ 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 }) => {
4308
4316
  var m;
4309
4317
  (m = this._copyInfo) == null || m.matrix.forValue((h, R, g) => {
4310
4318
  const C = Ue.getPositionRange(
@@ -4319,7 +4327,7 @@ let mt = class extends ue {
4319
4327
  i.setValue(_, M, g);
4320
4328
  });
4321
4329
  });
4322
- const { redoMutations: u, undoMutations: f } = tt(
4330
+ const { redoMutations: u, undoMutations: f } = rt(
4323
4331
  r,
4324
4332
  o,
4325
4333
  i.diff(n.getDataValidations()),
@@ -4332,13 +4340,13 @@ let mt = class extends ue {
4332
4340
  }
4333
4341
  }
4334
4342
  };
4335
- mt = ml([
4336
- ve(_e.Ready, mt),
4337
- sa(0, zo),
4338
- sa(1, I(z)),
4339
- sa(2, I(Ee))
4340
- ], mt);
4341
- class Xa {
4343
+ gt = pl([
4344
+ ve(_e.Ready, gt),
4345
+ da(0, Zo),
4346
+ da(1, w(q)),
4347
+ da(2, w(De))
4348
+ ], gt);
4349
+ class qa {
4342
4350
  constructor(t, e) {
4343
4351
  S(this, "value");
4344
4352
  this._worksheet = e, this.value = t;
@@ -4388,7 +4396,7 @@ class Xa {
4388
4396
  const e = [];
4389
4397
  let r = 0;
4390
4398
  return t.forEach((o, n) => {
4391
- const i = Kt(this.value, (l) => l === o.uid), s = o.ranges;
4399
+ const i = Zt(this.value, (l) => l === o.uid), s = o.ranges;
4392
4400
  (i.length !== s.length || i.some((l, d) => !Ue.equals(l, s[d]))) && e.push({
4393
4401
  type: "update",
4394
4402
  ruleId: o.uid,
@@ -4405,7 +4413,7 @@ class Xa {
4405
4413
  const r = [];
4406
4414
  let o = 0;
4407
4415
  return t.forEach((n, i) => {
4408
- const s = Kt(this.value, (d) => d === n.uid), l = n.ranges;
4416
+ const s = Zt(this.value, (d) => d === n.uid), l = n.ranges;
4409
4417
  (s.length !== l.length || s.some((d, c) => !Ue.equals(d, l[c]))) && r.push({
4410
4418
  type: "update",
4411
4419
  ruleId: n.uid,
@@ -4417,7 +4425,7 @@ class Xa {
4417
4425
  index: i - o
4418
4426
  }), o++);
4419
4427
  }), Array.from(e).forEach((n) => {
4420
- const i = Kt(this.value, (s) => s === n.uid);
4428
+ const i = Zt(this.value, (s) => s === n.uid);
4421
4429
  r.push({
4422
4430
  type: "add",
4423
4431
  rule: {
@@ -4428,7 +4436,7 @@ class Xa {
4428
4436
  }), r;
4429
4437
  }
4430
4438
  clone() {
4431
- return new Xa(new ke(this.value.clone()), this._worksheet);
4439
+ return new qa(new Ye(this.value.clone()), this._worksheet);
4432
4440
  }
4433
4441
  getValue(t, e) {
4434
4442
  return this.value.getValue(t, e);
@@ -4437,7 +4445,7 @@ class Xa {
4437
4445
  return this.value.setValue(t, e, r);
4438
4446
  }
4439
4447
  }
4440
- class fl extends Fo {
4448
+ class gl extends Ao {
4441
4449
  constructor(e, r, o, n) {
4442
4450
  super(e, r, o);
4443
4451
  /**
@@ -4450,8 +4458,8 @@ class fl extends Fo {
4450
4458
  S(this, "_dataValidationCustomFormulaService");
4451
4459
  S(this, "_cache");
4452
4460
  S(this, "_dataValidationRefRangeController");
4453
- this._injector = n, this._dataValidatorRegistryService = this._injector.get(we), this._dataValidationCacheService = this._injector.get(rt), this._dataValidationFormulaService = this._injector.get(ce), this._dataValidationCustomFormulaService = this._injector.get(We), this._dataValidationRefRangeController = this._injector.get(et), this._cache = this._dataValidationCacheService.ensureCache(e, r);
4454
- const s = this._injector.get(J).getUnit(e, re.UNIVER_SHEET).getSheetBySheetId(r), l = new ke();
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();
4455
4463
  o == null || o.forEach((d) => {
4456
4464
  const c = d.uid;
4457
4465
  d.ranges.forEach((u) => {
@@ -4461,12 +4469,12 @@ class fl extends Fo {
4461
4469
  });
4462
4470
  }), o == null || o.forEach((d) => {
4463
4471
  this._dataValidationRefRangeController.register(e, r, d);
4464
- }), this._ruleMatrix = new Xa(l, s);
4472
+ }), this._ruleMatrix = new qa(l, s);
4465
4473
  }
4466
4474
  _addRuleSideEffect(e) {
4467
4475
  var n;
4468
4476
  const { unitId: r, subUnitId: o } = this;
4469
- (e.type === B.LIST || e.type === B.LIST_MULTIPLE) && Ua((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);
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);
4470
4478
  }
4471
4479
  addRule(e, r) {
4472
4480
  (Array.isArray(e) ? e : [e]).forEach((n) => {
@@ -4524,17 +4532,17 @@ class fl extends Fo {
4524
4532
  return this._ruleMatrix;
4525
4533
  }
4526
4534
  }
4527
- var pl = Object.defineProperty, gl = Object.getOwnPropertyDescriptor, vl = (a, t, e, r) => {
4528
- for (var o = r > 1 ? void 0 : r ? gl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4535
+ var vl = Object.defineProperty, _l = Object.getOwnPropertyDescriptor, Sl = (a, t, e, r) => {
4536
+ for (var o = r > 1 ? void 0 : r ? _l(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4529
4537
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
4530
- return r && o && pl(t, e, o), o;
4531
- }, Et = (a, t) => (e, r) => t(e, r, a);
4532
- let ft = class extends ue {
4538
+ return r && o && vl(t, e, o), o;
4539
+ }, Nt = (a, t) => (e, r) => t(e, r, a);
4540
+ let vt = class extends ue {
4533
4541
  constructor(a, t, e, r) {
4534
4542
  super(), this._resourceManagerService = a, this._univerInstanceService = t, this._dataValidationModel = e, this._injector = r, this._initDataValidationDataSource();
4535
4543
  }
4536
4544
  _createSheetDataValidationManager(a, t) {
4537
- return new fl(
4545
+ return new gl(
4538
4546
  a,
4539
4547
  t,
4540
4548
  [],
@@ -4545,50 +4553,50 @@ let ft = class extends ue {
4545
4553
  this._dataValidationModel.setManagerCreator(this._createSheetDataValidationManager.bind(this));
4546
4554
  }
4547
4555
  };
4548
- ft = vl([
4549
- ve(_e.Starting, ft),
4550
- Et(0, Do),
4551
- Et(1, J),
4552
- Et(2, I(z)),
4553
- Et(3, I(Ee))
4554
- ], ft);
4555
- var _l = Object.defineProperty, Sl = Object.getOwnPropertyDescriptor, Rl = (a, t, e, r) => {
4556
- for (var o = r > 1 ? void 0 : r ? Sl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4556
+ vt = Sl([
4557
+ ve(_e.Starting, vt),
4558
+ Nt(0, bo),
4559
+ Nt(1, J),
4560
+ Nt(2, w(q)),
4561
+ Nt(3, w(De))
4562
+ ], vt);
4563
+ var Rl = Object.defineProperty, Cl = Object.getOwnPropertyDescriptor, Vl = (a, t, e, r) => {
4564
+ for (var o = r > 1 ? void 0 : r ? Cl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4557
4565
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
4558
- return r && o && _l(t, e, o), o;
4559
- }, la = (a, t) => (e, r) => t(e, r, a);
4560
- let pt = class extends ue {
4566
+ return r && o && Rl(t, e, o), o;
4567
+ }, ca = (a, t) => (e, r) => t(e, r, a);
4568
+ let _t = class extends ue {
4561
4569
  constructor(a, t, e) {
4562
4570
  super(), this._localeService = a, this._commandService = t, this._sheetPermissionInterceptorBaseController = e, this._commandExecutedListener();
4563
4571
  }
4564
4572
  _commandExecutedListener() {
4565
4573
  this.disposeWithMe(
4566
4574
  this._commandService.beforeCommandExecuted((a) => {
4567
- a.id === Lo.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
4568
- workbookTypes: [ga],
4569
- rangeTypes: [Sa],
4570
- worksheetTypes: [_a, va]
4571
- }) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.setStyleErr"))), a.id === qt.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
4572
- workbookTypes: [ga],
4573
- rangeTypes: [Sa],
4574
- worksheetTypes: [_a, va]
4575
+ a.id === xo.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
4576
+ workbookTypes: [_a],
4577
+ rangeTypes: [Ca],
4578
+ worksheetTypes: [Ra, Sa]
4579
+ }) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.setStyleErr"))), a.id === Kt.id && (this._sheetPermissionInterceptorBaseController.permissionCheckWithRanges({
4580
+ workbookTypes: [_a],
4581
+ rangeTypes: [Ca],
4582
+ worksheetTypes: [Ra, Sa]
4575
4583
  }, a.params.ranges) || this._sheetPermissionInterceptorBaseController.haveNotPermissionHandle(this._localeService.t("permission.dialog.setStyleErr")));
4576
4584
  })
4577
4585
  );
4578
4586
  }
4579
4587
  };
4580
- pt = Rl([
4581
- ve(_e.Ready, pt),
4582
- la(0, I(ie)),
4583
- la(1, ee),
4584
- la(2, I(Ko))
4585
- ], pt);
4586
- var Cl = Object.defineProperty, Vl = Object.getOwnPropertyDescriptor, Ml = (a, t, e, r) => {
4587
- for (var o = r > 1 ? void 0 : r ? Vl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4588
+ _t = Vl([
4589
+ ve(_e.Ready, _t),
4590
+ ca(0, w(ie)),
4591
+ ca(1, ee),
4592
+ ca(2, w(Jo))
4593
+ ], _t);
4594
+ var Ml = Object.defineProperty, Il = Object.getOwnPropertyDescriptor, wl = (a, t, e, r) => {
4595
+ for (var o = r > 1 ? void 0 : r ? Il(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4588
4596
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
4589
- return r && o && Cl(t, e, o), o;
4590
- }, da = (a, t) => (e, r) => t(e, r, a);
4591
- let $t = class {
4597
+ return r && o && Ml(t, e, o), o;
4598
+ }, ua = (a, t) => (e, r) => t(e, r, a);
4599
+ let Ut = class {
4592
4600
  constructor(a, t, e) {
4593
4601
  this._univerInstanceService = a, this._dataValidationModel = t, this._dataValidationCacheService = e;
4594
4602
  }
@@ -4620,155 +4628,155 @@ let $t = class {
4620
4628
  }), r;
4621
4629
  }
4622
4630
  };
4623
- $t = Ml([
4624
- da(0, J),
4625
- da(1, I(z)),
4626
- da(2, I(rt))
4627
- ], $t);
4628
- var co = Object.defineProperty, Il = Object.getOwnPropertyDescriptor, wl = (a, t, e) => t in a ? co(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, yl = (a, t, e, r) => {
4629
- for (var o = r > 1 ? void 0 : r ? Il(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4631
+ Ut = wl([
4632
+ ua(0, J),
4633
+ ua(1, w(q)),
4634
+ ua(2, w(nt))
4635
+ ], 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) => {
4637
+ for (var o = r > 1 ? void 0 : r ? yl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4630
4638
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
4631
- return r && o && co(t, e, o), o;
4632
- }, ca = (a, t) => (e, r) => t(e, r, a), uo = (a, t, e) => wl(a, typeof t != "symbol" ? t + "" : t, e);
4633
- let Bt = class extends fr {
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 {
4634
4642
  constructor(a = {}, t, e, r) {
4635
- super(), this._config = a, this._injector = t, this._commandService = e, this._localeService = r, this._config = Y.deepMerge({}, no, this._config);
4643
+ super(), this._config = a, this._injector = t, this._commandService = e, this._localeService = r, this._config = X.deepMerge({}, lo, this._config);
4636
4644
  }
4637
4645
  onStarting(a) {
4638
4646
  [
4639
4647
  [Me],
4640
- [_t],
4641
- [rt],
4648
+ [Ct],
4649
+ [nt],
4642
4650
  [ce],
4643
- [We],
4644
- [Ne],
4645
- [$t],
4651
+ [ke],
4652
+ [Oe],
4653
+ [Ut],
4646
4654
  // controller
4655
+ [vt],
4647
4656
  [ft],
4648
- [ut],
4649
4657
  [
4650
- dt,
4658
+ ht,
4651
4659
  {
4652
- useFactory: () => this._injector.createInstance(dt, this._config)
4660
+ useFactory: () => this._injector.createInstance(ht, this._config)
4653
4661
  }
4654
4662
  ],
4655
- [ht],
4656
- [et],
4657
4663
  [pt],
4658
- [bt],
4659
- [mt],
4660
- [Je],
4661
- [lt]
4664
+ [at],
4665
+ [_t],
4666
+ [Tt],
4667
+ [gt],
4668
+ [tt],
4669
+ [ut]
4662
4670
  ].forEach((t) => {
4663
4671
  a.add(t);
4664
4672
  }), [
4665
- zt,
4666
- ka,
4667
- qt,
4668
- wa,
4669
- ao,
4673
+ Qt,
4674
+ Xa,
4675
+ Kt,
4676
+ Da,
4677
+ no,
4670
4678
  // operation
4671
- Yt,
4672
- xr,
4673
- Ha,
4674
- at,
4675
- Ar
4679
+ Gt,
4680
+ Br,
4681
+ ka,
4682
+ ot,
4683
+ $r
4676
4684
  ].forEach((t) => {
4677
4685
  this._commandService.registerCommand(t);
4678
4686
  });
4679
4687
  }
4680
4688
  };
4681
- uo(Bt, "pluginName", Xt);
4682
- uo(Bt, "type", re.UNIVER_SHEET);
4683
- Bt = yl([
4684
- mr(vr, Rr, Vr),
4685
- ca(1, I(Ee)),
4686
- ca(2, ee),
4687
- ca(3, I(ie))
4688
- ], Bt);
4689
- var ho = Object.defineProperty, Dl = Object.getOwnPropertyDescriptor, El = (a, t, e) => t in a ? ho(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, bl = (a, t, e, r) => {
4690
- for (var o = r > 1 ? void 0 : r ? Dl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4689
+ fo(Ht, "pluginName", qt);
4690
+ fo(Ht, "type", re.UNIVER_SHEET);
4691
+ Ht = El([
4692
+ pr(Sr, Vr, Ir),
4693
+ ha(1, w(De)),
4694
+ ha(2, ee),
4695
+ ha(3, w(ie))
4696
+ ], 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) => {
4698
+ for (var o = r > 1 ? void 0 : r ? bl(t, e) : t, n = a.length - 1, i; n >= 0; n--)
4691
4699
  (i = a[n]) && (o = (r ? i(t, e, o) : i(o)) || o);
4692
- return r && o && ho(t, e, o), o;
4693
- }, ua = (a, t) => (e, r) => t(e, r, a), mo = (a, t, e) => El(a, typeof t != "symbol" ? t + "" : t, e);
4694
- let Ut = class extends fr {
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 {
4695
4703
  constructor(a = {}, t, e, r) {
4696
- super(), this._config = a, this._injector = t, this._commandService = e, this._localeService = r, this._config = Y.deepMerge({}, no, this._config);
4704
+ super(), this._config = a, this._injector = t, this._commandService = e, this._localeService = r, this._config = X.deepMerge({}, lo, this._config);
4697
4705
  }
4698
4706
  onStarting(a) {
4699
4707
  [
4700
4708
  [Me],
4701
- [_t],
4702
- [rt],
4709
+ [Ct],
4710
+ [nt],
4703
4711
  [ce],
4704
- [We],
4705
- [Ne],
4706
- [$t],
4712
+ [ke],
4713
+ [Oe],
4714
+ [Ut],
4707
4715
  // controller
4716
+ [vt],
4708
4717
  [ft],
4709
- [ut],
4710
4718
  [
4711
- ct,
4719
+ mt,
4712
4720
  {
4713
- useFactory: () => this._injector.createInstance(ct, this._config)
4721
+ useFactory: () => this._injector.createInstance(mt, this._config)
4714
4722
  }
4715
4723
  ],
4716
- [ht],
4717
- [et],
4718
4724
  [pt],
4719
- [mt],
4720
- [Je]
4725
+ [at],
4726
+ [_t],
4727
+ [gt],
4728
+ [tt]
4721
4729
  ].forEach((t) => {
4722
4730
  a.add(t);
4723
4731
  }), [
4724
- zt,
4725
- ka,
4726
- qt,
4732
+ Qt,
4733
+ Xa,
4734
+ Kt,
4727
4735
  // operation
4728
- Yt,
4729
- xr,
4730
- Ha,
4731
- at,
4732
- Ar
4736
+ Gt,
4737
+ Br,
4738
+ ka,
4739
+ ot,
4740
+ $r
4733
4741
  ].forEach((t) => {
4734
4742
  this._commandService.registerCommand(t);
4735
4743
  });
4736
4744
  }
4737
4745
  };
4738
- mo(Ut, "pluginName", Xt);
4739
- mo(Ut, "type", re.UNIVER_SHEET);
4740
- Ut = bl([
4741
- mr(vr, Rr, Vr),
4742
- ua(1, I(Ee)),
4743
- ua(2, ee),
4744
- ua(3, I(ie))
4745
- ], Ut);
4746
+ go(Wt, "pluginName", qt);
4747
+ go(Wt, "type", re.UNIVER_SHEET);
4748
+ Wt = Nl([
4749
+ pr(Sr, Vr, Ir),
4750
+ ma(1, w(De)),
4751
+ ma(2, ee),
4752
+ ma(3, w(ie))
4753
+ ], Wt);
4746
4754
  export {
4747
- ka as AddSheetDataValidationAndOpenCommand,
4748
- zt as AddSheetDataValidationCommand,
4749
- Ha as CloseValidationPanelOperation,
4750
- Xt as DATA_VALIDATION_PLUGIN_NAME,
4751
- ht as DataValidationAlertController,
4752
- bt as DataValidationAutoFillController,
4753
- rt as DataValidationCacheService,
4754
- ut as DataValidationController,
4755
- mt as DataValidationCopyPasteController,
4756
- We as DataValidationCustomFormulaService,
4757
- Je as DataValidationFormulaController,
4755
+ Xa as AddSheetDataValidationAndOpenCommand,
4756
+ Qt as AddSheetDataValidationCommand,
4757
+ ka as CloseValidationPanelOperation,
4758
+ qt as DATA_VALIDATION_PLUGIN_NAME,
4759
+ pt as DataValidationAlertController,
4760
+ Tt as DataValidationAutoFillController,
4761
+ nt as DataValidationCacheService,
4762
+ ft as DataValidationController,
4763
+ gt as DataValidationCopyPasteController,
4764
+ ke as DataValidationCustomFormulaService,
4765
+ tt as DataValidationFormulaController,
4758
4766
  ce as DataValidationFormulaService,
4759
- et as DataValidationRefRangeController,
4760
- lt as DataValidationRejectInputController,
4761
- xr as HideDataValidationDropdown,
4762
- Gl as ICommandService,
4763
- ql as LocaleService,
4764
- at as OpenValidationPanelOperation,
4765
- zl as Plugin,
4766
- _t as SheetDataValidationService,
4767
- dt as SheetsDataValidationRenderController,
4768
- $t as SheetsDataValidationValidatorService,
4769
- Yt as ShowDataValidationDropdown,
4770
- Ar as ToggleValidationPanelOperation,
4771
- Ut as UniverSheetsDataValidationMobilePlugin,
4772
- Bt as UniverSheetsDataValidationPlugin,
4773
- qt as UpdateSheetDataValidationRangeCommand
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,
4774
+ Ct as SheetDataValidationService,
4775
+ ht as SheetsDataValidationRenderController,
4776
+ Ut as SheetsDataValidationValidatorService,
4777
+ Gt as ShowDataValidationDropdown,
4778
+ $r as ToggleValidationPanelOperation,
4779
+ Wt as UniverSheetsDataValidationMobilePlugin,
4780
+ Ht as UniverSheetsDataValidationPlugin,
4781
+ Kt as UpdateSheetDataValidationRangeCommand
4774
4782
  };